From a6bd39f1661c19e21c6234bebb7aa6f215ea7c7d Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sun, 9 Oct 2022 14:34:58 -0400 Subject: [PATCH] update release --- CHANGELOG.md | 8 +- demo/faceid/index.js | 351 +- demo/faceid/index.js.map | 4 +- demo/segmentation/index.js | 2 - demo/typescript/index.js | 94 +- demo/typescript/index.js.map | 6 +- demo/typescript/index.ts | 4 - dist/human.esm-nobundle.js | 14254 +-------------- dist/human.esm.js | 7997 +++++---- dist/human.esm.js.map | 6 +- dist/human.js | 1383 +- dist/human.node-gpu.js | 14341 +-------------- dist/human.node-wasm.js | 14342 +--------------- dist/human.node.js | 14341 +-------------- dist/tfjs.esm.js | 9805 ++++++----- dist/tfjs.version.js | 36 +- models/models.json | 3 +- test/build.log | 2767 +-- test/test-backend-node-wasm.js | 12 +- test/test-node-main.js | 1 + test/test.log | 1999 +-- tsconfig.json | 2 +- typedoc/assets/search.js | 2 +- typedoc/classes/Env.html | 8 +- typedoc/classes/GraphModel.html | 52 +- typedoc/classes/Human.html | 108 +- typedoc/classes/Tensor-1.html | 614 +- typedoc/classes/WebCam.html | 8 +- typedoc/classes/models.Models.html | 80 +- typedoc/enums/Rank.html | 24 +- typedoc/functions/draw.all.html | 8 +- typedoc/functions/draw.canvas.html | 8 +- typedoc/functions/draw.person.html | 8 +- typedoc/functions/match.distance.html | 8 +- typedoc/functions/match.match.html | 8 +- typedoc/functions/match.similarity.html | 8 +- typedoc/functions/models.getModelStats.html | 10 +- typedoc/functions/models.load.html | 10 +- typedoc/functions/models.reset.html | 10 +- typedoc/functions/models.validate.html | 10 +- typedoc/functions/models.validateModel.html | 10 +- typedoc/index.html | 10 +- typedoc/interfaces/BodyConfig.html | 22 +- typedoc/interfaces/BodyKeypoint.html | 8 +- typedoc/interfaces/BodyResult.html | 8 +- typedoc/interfaces/Config.html | 52 +- typedoc/interfaces/DrawOptions.html | 8 +- typedoc/interfaces/FaceAntiSpoofConfig.html | 18 +- typedoc/interfaces/FaceAttentionConfig.html | 18 +- typedoc/interfaces/FaceConfig.html | 36 +- typedoc/interfaces/FaceDescriptionConfig.html | 20 +- typedoc/interfaces/FaceDetectorConfig.html | 30 +- typedoc/interfaces/FaceEmotionConfig.html | 20 +- typedoc/interfaces/FaceGearConfig.html | 20 +- typedoc/interfaces/FaceIrisConfig.html | 18 +- typedoc/interfaces/FaceLivenessConfig.html | 18 +- typedoc/interfaces/FaceMeshConfig.html | 20 +- typedoc/interfaces/FaceResult.html | 8 +- typedoc/interfaces/FilterConfig.html | 48 +- typedoc/interfaces/GenericConfig.html | 18 +- typedoc/interfaces/GestureConfig.html | 12 +- typedoc/interfaces/HandConfig.html | 32 +- typedoc/interfaces/HandResult.html | 8 +- typedoc/interfaces/ModelInfo.html | 8 +- typedoc/interfaces/ObjectConfig.html | 24 +- typedoc/interfaces/ObjectResult.html | 8 +- typedoc/interfaces/PersonResult.html | 8 +- typedoc/interfaces/Result.html | 8 +- typedoc/interfaces/SegmentationConfig.html | 49 +- typedoc/interfaces/WebCamConfig.html | 8 +- typedoc/interfaces/models.KernelOps.html | 18 +- typedoc/interfaces/models.ModelStats.html | 33 +- typedoc/modules/Tensor.html | 287 +- typedoc/modules/draw.html | 8 +- typedoc/modules/match.html | 8 +- typedoc/modules/models.html | 8 +- typedoc/types/AnyCanvas.html | 9 +- typedoc/types/AnyImage.html | 9 +- typedoc/types/AnyVideo.html | 9 +- typedoc/types/BackendEnum.html | 11 +- typedoc/types/BodyAnnotation.html | 9 +- typedoc/types/BodyAnnotationBlazePose.html | 9 +- .../types/BodyAnnotationEfficientPose.html | 9 +- typedoc/types/BodyGesture.html | 9 +- typedoc/types/BodyLandmark.html | 9 +- typedoc/types/BodyLandmarkBlazePose.html | 9 +- typedoc/types/BodyLandmarkEfficientNet.html | 9 +- typedoc/types/BodyLandmarkMoveNet.html | 9 +- typedoc/types/BodyLandmarkPoseNet.html | 9 +- typedoc/types/Box.html | 9 +- typedoc/types/Emotion.html | 9 +- typedoc/types/Events.html | 9 +- typedoc/types/ExternalCanvas.html | 9 +- typedoc/types/FaceGesture.html | 9 +- typedoc/types/FaceLandmark.html | 9 +- typedoc/types/Finger.html | 9 +- typedoc/types/FingerCurl.html | 9 +- typedoc/types/FingerDirection.html | 9 +- typedoc/types/Gender.html | 9 +- typedoc/types/GestureResult.html | 9 +- typedoc/types/HandGesture.html | 9 +- typedoc/types/HandType.html | 9 +- typedoc/types/ImageObjects.html | 9 +- typedoc/types/Input.html | 9 +- typedoc/types/IrisGesture.html | 9 +- typedoc/types/ObjectType.html | 9 +- typedoc/types/Point.html | 9 +- typedoc/types/Race.html | 9 +- typedoc/types/SegmentationEnum.html | 117 + typedoc/types/TensorLike.html | 11 +- typedoc/types/WarmupEnum.html | 11 +- typedoc/types/match.Descriptor.html | 8 +- typedoc/types/match.MatchOptions.html | 8 +- typedoc/variables/defaults.html | 11 +- typedoc/variables/draw.options.html | 8 +- typedoc/variables/env-1.html | 9 +- types/human.d.ts | 70 +- 117 files changed, 11917 insertions(+), 72305 deletions(-) create mode 100644 typedoc/types/SegmentationEnum.html diff --git a/CHANGELOG.md b/CHANGELOG.md index b598967ad..1b2267ce7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # @vladmandic/human - Version: **2.11.0** + Version: **2.11.1** Description: **Human: AI-powered 3D Face Detection & Rotation Tracking, Face Description & Recognition, Body Pose Tracking, 3D Hand & Finger Tracking, Iris Analysis, Age & Gender & Emotion Prediction, Gesture Recognition** Author: **Vladimir Mandic ** @@ -9,8 +9,12 @@ ## Changelog -### **HEAD -> main** 2022/09/29 mandic00@live.com +### **HEAD -> main** 2022/10/09 mandic00@live.com + +### **origin/main** 2022/10/02 mandic00@live.com + +- add human.webcam methods - create funding.yml - fix rotation interpolation diff --git a/demo/faceid/index.js b/demo/faceid/index.js index 63fee5da4..2cd259ddf 100644 --- a/demo/faceid/index.js +++ b/demo/faceid/index.js @@ -4,353 +4,6 @@ author: ' */ - -// demo/faceid/index.ts -import * as H from "../../dist/human.esm.js"; - -// demo/faceid/indexdb.ts -var db; -var database = "human"; -var table = "person"; -var log = (...msg) => console.log("indexdb", ...msg); -async function open() { - if (db) - return true; - return new Promise((resolve) => { - const request = indexedDB.open(database, 1); - request.onerror = (evt) => log("error:", evt); - request.onupgradeneeded = (evt) => { - log("create:", evt.target); - db = evt.target.result; - db.createObjectStore(table, { keyPath: "id", autoIncrement: true }); - }; - request.onsuccess = (evt) => { - db = evt.target.result; - log("open:", db); - resolve(true); - }; - }); -} -async function load() { - const faceDB = []; - if (!db) - await open(); - return new Promise((resolve) => { - const cursor = db.transaction([table], "readwrite").objectStore(table).openCursor(null, "next"); - cursor.onerror = (evt) => log("load error:", evt); - cursor.onsuccess = (evt) => { - if (evt.target.result) { - faceDB.push(evt.target.result.value); - evt.target.result.continue(); - } else { - resolve(faceDB); - } - }; - }); -} -async function count() { - if (!db) - await open(); - return new Promise((resolve) => { - const store = db.transaction([table], "readwrite").objectStore(table).count(); - store.onerror = (evt) => log("count error:", evt); - store.onsuccess = () => resolve(store.result); - }); -} -async function save(faceRecord) { - if (!db) - await open(); - const newRecord = { name: faceRecord.name, descriptor: faceRecord.descriptor, image: faceRecord.image }; - db.transaction([table], "readwrite").objectStore(table).put(newRecord); - log("save:", newRecord); -} -async function remove(faceRecord) { - if (!db) - await open(); - db.transaction([table], "readwrite").objectStore(table).delete(faceRecord.id); - log("delete:", faceRecord); -} - -// demo/faceid/index.ts -var humanConfig = { - cacheSensitivity: 0, - modelBasePath: "../../models", - filter: { equalization: true }, - face: { - enabled: true, - detector: { rotation: true, return: true, cropFactor: 1.6, mask: false }, - description: { enabled: true }, - iris: { enabled: true }, - emotion: { enabled: false }, - antispoof: { enabled: true }, - liveness: { enabled: true } - }, - body: { enabled: false }, - hand: { enabled: false }, - object: { enabled: false }, - gesture: { enabled: true } -}; -var matchOptions = { order: 2, multiplier: 25, min: 0.2, max: 0.8 }; -var options = { - minConfidence: 0.6, - minSize: 224, - maxTime: 3e4, - blinkMin: 10, - blinkMax: 800, - threshold: 0.5, - mask: humanConfig.face.detector.mask, - rotation: humanConfig.face.detector.rotation, - cropFactor: humanConfig.face.detector.cropFactor, - ...matchOptions -}; -var ok = { - faceCount: { status: false, val: 0 }, - faceConfidence: { status: false, val: 0 }, - facingCenter: { status: false, val: 0 }, - lookingCenter: { status: false, val: 0 }, - blinkDetected: { status: false, val: 0 }, - faceSize: { status: false, val: 0 }, - antispoofCheck: { status: false, val: 0 }, - livenessCheck: { status: false, val: 0 }, - age: { status: false, val: 0 }, - gender: { status: false, val: 0 }, - timeout: { status: true, val: 0 }, - descriptor: { status: false, val: 0 }, - elapsedMs: { status: void 0, val: 0 }, - detectFPS: { status: void 0, val: 0 }, - drawFPS: { status: void 0, val: 0 } -}; -var allOk = () => ok.faceCount.status && ok.faceSize.status && ok.blinkDetected.status && ok.facingCenter.status && ok.lookingCenter.status && ok.faceConfidence.status && ok.antispoofCheck.status && ok.livenessCheck.status && ok.descriptor.status && ok.age.status && ok.gender.status; -var current = { face: null, record: null }; -var blink = { - start: 0, - end: 0, - time: 0 -}; -var human = new H.Human(humanConfig); -human.env.perfadd = false; -human.draw.options.font = 'small-caps 18px "Lato"'; -human.draw.options.lineHeight = 20; -var dom = { - video: document.getElementById("video"), - canvas: document.getElementById("canvas"), - log: document.getElementById("log"), - fps: document.getElementById("fps"), - match: document.getElementById("match"), - name: document.getElementById("name"), - save: document.getElementById("save"), - delete: document.getElementById("delete"), - retry: document.getElementById("retry"), - source: document.getElementById("source"), - ok: document.getElementById("ok") -}; -var timestamp = { detect: 0, draw: 0 }; -var startTime = 0; -var log2 = (...msg) => { - dom.log.innerText += msg.join(" ") + "\n"; - console.log(...msg); -}; -async function webCam() { - const cameraOptions = { audio: false, video: { facingMode: "user", resizeMode: "none", width: { ideal: document.body.clientWidth } } }; - const stream = await navigator.mediaDevices.getUserMedia(cameraOptions); - const ready = new Promise((resolve) => { - dom.video.onloadeddata = () => resolve(true); - }); - dom.video.srcObject = stream; - void dom.video.play(); - await ready; - dom.canvas.width = dom.video.videoWidth; - dom.canvas.height = dom.video.videoHeight; - dom.canvas.style.width = "50%"; - dom.canvas.style.height = "50%"; - if (human.env.initial) - log2("video:", dom.video.videoWidth, dom.video.videoHeight, "|", stream.getVideoTracks()[0].label); - dom.canvas.onclick = () => { - if (dom.video.paused) - void dom.video.play(); - else - dom.video.pause(); - }; -} -async function detectionLoop() { - var _a; - if (!dom.video.paused) { - if ((_a = current.face) == null ? void 0 : _a.tensor) - human.tf.dispose(current.face.tensor); - await human.detect(dom.video); - const now = human.now(); - ok.detectFPS.val = Math.round(1e4 / (now - timestamp.detect)) / 10; - timestamp.detect = now; - requestAnimationFrame(detectionLoop); - } -} -function drawValidationTests() { - let y = 32; - for (const [key, val] of Object.entries(ok)) { - let el = document.getElementById(`ok-${key}`); - if (!el) { - el = document.createElement("div"); - el.id = `ok-${key}`; - el.innerText = key; - el.className = "ok"; - el.style.top = `${y}px`; - dom.ok.appendChild(el); - } - if (typeof val.status === "boolean") - el.style.backgroundColor = val.status ? "lightgreen" : "lightcoral"; - const status = val.status ? "ok" : "fail"; - el.innerText = `${key}: ${val.val === 0 ? status : val.val}`; - y += 28; - } -} -async function validationLoop() { - var _a; - const interpolated = human.next(human.result); - human.draw.canvas(dom.video, dom.canvas); - await human.draw.all(dom.canvas, interpolated); - const now = human.now(); - ok.drawFPS.val = Math.round(1e4 / (now - timestamp.draw)) / 10; - timestamp.draw = now; - ok.faceCount.val = human.result.face.length; - ok.faceCount.status = ok.faceCount.val === 1; - if (ok.faceCount.status) { - const gestures = Object.values(human.result.gesture).map((gesture) => gesture.gesture); - if (gestures.includes("blink left eye") || gestures.includes("blink right eye")) - blink.start = human.now(); - if (blink.start > 0 && !gestures.includes("blink left eye") && !gestures.includes("blink right eye")) - blink.end = human.now(); - ok.blinkDetected.status = ok.blinkDetected.status || Math.abs(blink.end - blink.start) > options.blinkMin && Math.abs(blink.end - blink.start) < options.blinkMax; - if (ok.blinkDetected.status && blink.time === 0) - blink.time = Math.trunc(blink.end - blink.start); - ok.facingCenter.status = gestures.includes("facing center"); - ok.lookingCenter.status = gestures.includes("looking center"); - ok.faceConfidence.val = human.result.face[0].faceScore || human.result.face[0].boxScore || 0; - ok.faceConfidence.status = ok.faceConfidence.val >= options.minConfidence; - ok.antispoofCheck.val = human.result.face[0].real || 0; - ok.antispoofCheck.status = ok.antispoofCheck.val >= options.minConfidence; - ok.livenessCheck.val = human.result.face[0].live || 0; - ok.livenessCheck.status = ok.livenessCheck.val >= options.minConfidence; - ok.faceSize.val = Math.min(human.result.face[0].box[2], human.result.face[0].box[3]); - ok.faceSize.status = ok.faceSize.val >= options.minSize; - ok.descriptor.val = ((_a = human.result.face[0].embedding) == null ? void 0 : _a.length) || 0; - ok.descriptor.status = ok.descriptor.val > 0; - ok.age.val = human.result.face[0].age || 0; - ok.age.status = ok.age.val > 0; - ok.gender.val = human.result.face[0].genderScore || 0; - ok.gender.status = ok.gender.val >= options.minConfidence; - } - ok.timeout.status = ok.elapsedMs.val <= options.maxTime; - drawValidationTests(); - if (allOk() || !ok.timeout.status) { - dom.video.pause(); - return human.result.face[0]; - } - ok.elapsedMs.val = Math.trunc(human.now() - startTime); - return new Promise((resolve) => { - setTimeout(async () => { - await validationLoop(); - resolve(human.result.face[0]); - }, 30); - }); -} -async function saveRecords() { - var _a, _b, _c, _d; - if (dom.name.value.length > 0) { - const image = (_a = dom.canvas.getContext("2d")) == null ? void 0 : _a.getImageData(0, 0, dom.canvas.width, dom.canvas.height); - const rec = { id: 0, name: dom.name.value, descriptor: (_b = current.face) == null ? void 0 : _b.embedding, image }; - await save(rec); - log2("saved face record:", rec.name, "descriptor length:", (_d = (_c = current.face) == null ? void 0 : _c.embedding) == null ? void 0 : _d.length); - log2("known face records:", await count()); - } else { - log2("invalid name"); - } -} -async function deleteRecord() { - if (current.record && current.record.id > 0) { - await remove(current.record); - } -} -async function detectFace() { - var _a, _b, _c, _d; - dom.canvas.style.height = ""; - (_a = dom.canvas.getContext("2d")) == null ? void 0 : _a.clearRect(0, 0, options.minSize, options.minSize); - if (!((_b = current == null ? void 0 : current.face) == null ? void 0 : _b.tensor) || !((_c = current == null ? void 0 : current.face) == null ? void 0 : _c.embedding)) - return false; - console.log("face record:", current.face); - log2(`detected face: ${current.face.gender} ${current.face.age || 0}y distance ${current.face.iris || 0}cm/${Math.round(100 * (current.face.iris || 0) / 2.54) / 100}in`); - human.tf.browser.toPixels(current.face.tensor, dom.canvas); - if (await count() === 0) { - log2("face database is empty: nothing to compare face with"); - document.body.style.background = "black"; - dom.delete.style.display = "none"; - return false; - } - const db2 = await load(); - const descriptors = db2.map((rec) => rec.descriptor).filter((desc) => desc.length > 0); - const res = human.match(current.face.embedding, descriptors, matchOptions); - current.record = db2[res.index] || null; - if (current.record) { - log2(`best match: ${current.record.name} | id: ${current.record.id} | similarity: ${Math.round(1e3 * res.similarity) / 10}%`); - dom.name.value = current.record.name; - dom.source.style.display = ""; - (_d = dom.source.getContext("2d")) == null ? void 0 : _d.putImageData(current.record.image, 0, 0); - } - document.body.style.background = res.similarity > options.threshold ? "darkgreen" : "maroon"; - return res.similarity > options.threshold; -} -async function main() { - var _a, _b; - ok.faceCount.status = false; - ok.faceConfidence.status = false; - ok.facingCenter.status = false; - ok.blinkDetected.status = false; - ok.faceSize.status = false; - ok.antispoofCheck.status = false; - ok.livenessCheck.status = false; - ok.age.status = false; - ok.gender.status = false; - ok.elapsedMs.val = 0; - dom.match.style.display = "none"; - dom.retry.style.display = "none"; - dom.source.style.display = "none"; - dom.canvas.style.height = "50%"; - document.body.style.background = "black"; - await webCam(); - await detectionLoop(); - startTime = human.now(); - current.face = await validationLoop(); - dom.canvas.width = ((_a = current.face.tensor) == null ? void 0 : _a.shape[1]) || options.minSize; - dom.canvas.height = ((_b = current.face.tensor) == null ? void 0 : _b.shape[0]) || options.minSize; - dom.source.width = dom.canvas.width; - dom.source.height = dom.canvas.height; - dom.canvas.style.width = ""; - dom.match.style.display = "flex"; - dom.save.style.display = "flex"; - dom.delete.style.display = "flex"; - dom.retry.style.display = "block"; - if (!allOk()) { - log2("did not find valid face"); - return false; - } - return detectFace(); -} -async function init() { - var _a, _b; - log2("human version:", human.version, "| tfjs version:", human.tf.version["tfjs-core"]); - log2("options:", JSON.stringify(options).replace(/{|}|"|\[|\]/g, "").replace(/,/g, " ")); - log2("initializing webcam..."); - await webCam(); - log2("loading human models..."); - await human.load(); - log2("initializing human..."); - log2("face embedding model:", humanConfig.face.description.enabled ? "faceres" : "", ((_a = humanConfig.face["mobilefacenet"]) == null ? void 0 : _a.enabled) ? "mobilefacenet" : "", ((_b = humanConfig.face["insightface"]) == null ? void 0 : _b.enabled) ? "insightface" : ""); - log2("loading face database..."); - log2("known face records:", await count()); - dom.retry.addEventListener("click", main); - dom.save.addEventListener("click", saveRecords); - dom.delete.addEventListener("click", deleteRecord); - await human.warmup(); - await main(); -} -window.onload = init; +import*as S from"../../dist/human.esm.js";var l,L="human",f="person",v=(...a)=>console.log("indexdb",...a);async function h(){return l?!0:new Promise(a=>{let n=indexedDB.open(L,1);n.onerror=o=>v("error:",o),n.onupgradeneeded=o=>{v("create:",o.target),l=o.target.result,l.createObjectStore(f,{keyPath:"id",autoIncrement:!0})},n.onsuccess=o=>{l=o.target.result,v("open:",l),a(!0)}})}async function C(){let a=[];return l||await h(),new Promise(n=>{let o=l.transaction([f],"readwrite").objectStore(f).openCursor(null,"next");o.onerror=i=>v("load error:",i),o.onsuccess=i=>{i.target.result?(a.push(i.target.result.value),i.target.result.continue()):n(a)}})}async function b(){return l||await h(),new Promise(a=>{let n=l.transaction([f],"readwrite").objectStore(f).count();n.onerror=o=>v("count error:",o),n.onsuccess=()=>a(n.result)})}async function x(a){l||await h();let n={name:a.name,descriptor:a.descriptor,image:a.image};l.transaction([f],"readwrite").objectStore(f).put(n),v("save:",n)}async function D(a){l||await h(),l.transaction([f],"readwrite").objectStore(f).delete(a.id),v("delete:",a)}var g={cacheSensitivity:0,modelBasePath:"../../models",filter:{equalization:!0},face:{enabled:!0,detector:{rotation:!0,return:!0,cropFactor:1.6,mask:!1},description:{enabled:!0},iris:{enabled:!0},emotion:{enabled:!1},antispoof:{enabled:!0},liveness:{enabled:!0}},body:{enabled:!1},hand:{enabled:!1},object:{enabled:!1},gesture:{enabled:!0}},B={order:2,multiplier:25,min:.2,max:.8},d={minConfidence:.6,minSize:224,maxTime:3e4,blinkMin:10,blinkMax:800,threshold:.5,mask:g.face.detector.mask,rotation:g.face.detector.rotation,cropFactor:g.face.detector.cropFactor,...B},e={faceCount:{status:!1,val:0},faceConfidence:{status:!1,val:0},facingCenter:{status:!1,val:0},lookingCenter:{status:!1,val:0},blinkDetected:{status:!1,val:0},faceSize:{status:!1,val:0},antispoofCheck:{status:!1,val:0},livenessCheck:{status:!1,val:0},age:{status:!1,val:0},gender:{status:!1,val:0},timeout:{status:!0,val:0},descriptor:{status:!1,val:0},elapsedMs:{status:void 0,val:0},detectFPS:{status:void 0,val:0},drawFPS:{status:void 0,val:0}},E=()=>e.faceCount.status&&e.faceSize.status&&e.blinkDetected.status&&e.facingCenter.status&&e.lookingCenter.status&&e.faceConfidence.status&&e.antispoofCheck.status&&e.livenessCheck.status&&e.descriptor.status&&e.age.status&&e.gender.status,c={face:null,record:null},u={start:0,end:0,time:0},s=new S.Human(g);s.env.perfadd=!1;s.draw.options.font='small-caps 18px "Lato"';s.draw.options.lineHeight=20;var t={video:document.getElementById("video"),canvas:document.getElementById("canvas"),log:document.getElementById("log"),fps:document.getElementById("fps"),match:document.getElementById("match"),name:document.getElementById("name"),save:document.getElementById("save"),delete:document.getElementById("delete"),retry:document.getElementById("retry"),source:document.getElementById("source"),ok:document.getElementById("ok")},y={detect:0,draw:0},I=0,r=(...a)=>{t.log.innerText+=a.join(" ")+` +`,console.log(...a)};async function H(){let a={audio:!1,video:{facingMode:"user",resizeMode:"none",width:{ideal:document.body.clientWidth}}},n=await navigator.mediaDevices.getUserMedia(a),o=new Promise(i=>{t.video.onloadeddata=()=>i(!0)});t.video.srcObject=n,t.video.play(),await o,t.canvas.width=t.video.videoWidth,t.canvas.height=t.video.videoHeight,t.canvas.style.width="50%",t.canvas.style.height="50%",s.env.initial&&r("video:",t.video.videoWidth,t.video.videoHeight,"|",n.getVideoTracks()[0].label),t.canvas.onclick=()=>{t.video.paused?t.video.play():t.video.pause()}}async function T(){var a;if(!t.video.paused){(a=c.face)!=null&&a.tensor&&s.tf.dispose(c.face.tensor),await s.detect(t.video);let n=s.now();e.detectFPS.val=Math.round(1e4/(n-y.detect))/10,y.detect=n,requestAnimationFrame(T)}}function P(){let a=32;for(let[n,o]of Object.entries(e)){let i=document.getElementById(`ok-${n}`);i||(i=document.createElement("div"),i.id=`ok-${n}`,i.innerText=n,i.className="ok",i.style.top=`${a}px`,t.ok.appendChild(i)),typeof o.status=="boolean"&&(i.style.backgroundColor=o.status?"lightgreen":"lightcoral");let m=o.status?"ok":"fail";i.innerText=`${n}: ${o.val===0?m:o.val}`,a+=28}}async function R(){var o;let a=s.next(s.result);s.draw.canvas(t.video,t.canvas),await s.draw.all(t.canvas,a);let n=s.now();if(e.drawFPS.val=Math.round(1e4/(n-y.draw))/10,y.draw=n,e.faceCount.val=s.result.face.length,e.faceCount.status=e.faceCount.val===1,e.faceCount.status){let i=Object.values(s.result.gesture).map(m=>m.gesture);(i.includes("blink left eye")||i.includes("blink right eye"))&&(u.start=s.now()),u.start>0&&!i.includes("blink left eye")&&!i.includes("blink right eye")&&(u.end=s.now()),e.blinkDetected.status=e.blinkDetected.status||Math.abs(u.end-u.start)>d.blinkMin&&Math.abs(u.end-u.start)=d.minConfidence,e.antispoofCheck.val=s.result.face[0].real||0,e.antispoofCheck.status=e.antispoofCheck.val>=d.minConfidence,e.livenessCheck.val=s.result.face[0].live||0,e.livenessCheck.status=e.livenessCheck.val>=d.minConfidence,e.faceSize.val=Math.min(s.result.face[0].box[2],s.result.face[0].box[3]),e.faceSize.status=e.faceSize.val>=d.minSize,e.descriptor.val=((o=s.result.face[0].embedding)==null?void 0:o.length)||0,e.descriptor.status=e.descriptor.val>0,e.age.val=s.result.face[0].age||0,e.age.status=e.age.val>0,e.gender.val=s.result.face[0].genderScore||0,e.gender.status=e.gender.val>=d.minConfidence}return e.timeout.status=e.elapsedMs.val<=d.maxTime,P(),E()||!e.timeout.status?(t.video.pause(),s.result.face[0]):(e.elapsedMs.val=Math.trunc(s.now()-I),new Promise(i=>{setTimeout(async()=>{await R(),i(s.result.face[0])},30)}))}async function z(){var a,n,o,i;if(t.name.value.length>0){let m=(a=t.canvas.getContext("2d"))==null?void 0:a.getImageData(0,0,t.canvas.width,t.canvas.height),p={id:0,name:t.name.value,descriptor:(n=c.face)==null?void 0:n.embedding,image:m};await x(p),r("saved face record:",p.name,"descriptor length:",(i=(o=c.face)==null?void 0:o.embedding)==null?void 0:i.length),r("known face records:",await b())}else r("invalid name")}async function j(){c.record&&c.record.id>0&&await D(c.record)}async function $(){var i,m,p,k;if(t.canvas.style.height="",(i=t.canvas.getContext("2d"))==null||i.clearRect(0,0,d.minSize,d.minSize),!((m=c==null?void 0:c.face)!=null&&m.tensor)||!((p=c==null?void 0:c.face)!=null&&p.embedding))return!1;if(console.log("face record:",c.face),r(`detected face: ${c.face.gender} ${c.face.age||0}y distance ${c.face.iris||0}cm/${Math.round(100*(c.face.iris||0)/2.54)/100}in`),s.tf.browser.toPixels(c.face.tensor,t.canvas),await b()===0)return r("face database is empty: nothing to compare face with"),document.body.style.background="black",t.delete.style.display="none",!1;let a=await C(),n=a.map(w=>w.descriptor).filter(w=>w.length>0),o=s.match(c.face.embedding,n,B);return c.record=a[o.index]||null,c.record&&(r(`best match: ${c.record.name} | id: ${c.record.id} | similarity: ${Math.round(1e3*o.similarity)/10}%`),t.name.value=c.record.name,t.source.style.display="",(k=t.source.getContext("2d"))==null||k.putImageData(c.record.image,0,0)),document.body.style.background=o.similarity>d.threshold?"darkgreen":"maroon",o.similarity>d.threshold}async function M(){var a,n;return e.faceCount.status=!1,e.faceConfidence.status=!1,e.facingCenter.status=!1,e.blinkDetected.status=!1,e.faceSize.status=!1,e.antispoofCheck.status=!1,e.livenessCheck.status=!1,e.age.status=!1,e.gender.status=!1,e.elapsedMs.val=0,t.match.style.display="none",t.retry.style.display="none",t.source.style.display="none",t.canvas.style.height="50%",document.body.style.background="black",await H(),await T(),I=s.now(),c.face=await R(),t.canvas.width=((a=c.face.tensor)==null?void 0:a.shape[1])||d.minSize,t.canvas.height=((n=c.face.tensor)==null?void 0:n.shape[0])||d.minSize,t.source.width=t.canvas.width,t.source.height=t.canvas.height,t.canvas.style.width="",t.match.style.display="flex",t.save.style.display="flex",t.delete.style.display="flex",t.retry.style.display="block",E()?$():(r("did not find valid face"),!1)}async function q(){var a,n;r("human version:",s.version,"| tfjs version:",s.tf.version["tfjs-core"]),r("options:",JSON.stringify(d).replace(/{|}|"|\[|\]/g,"").replace(/,/g," ")),r("initializing webcam..."),await H(),r("loading human models..."),await s.load(),r("initializing human..."),r("face embedding model:",g.face.description.enabled?"faceres":"",(a=g.face.mobilefacenet)!=null&&a.enabled?"mobilefacenet":"",(n=g.face.insightface)!=null&&n.enabled?"insightface":""),r("loading face database..."),r("known face records:",await b()),t.retry.addEventListener("click",M),t.save.addEventListener("click",z),t.delete.addEventListener("click",j),await s.warmup(),await M()}window.onload=q; //# sourceMappingURL=index.js.map diff --git a/demo/faceid/index.js.map b/demo/faceid/index.js.map index a2e25b78d..ba7ac80de 100644 --- a/demo/faceid/index.js.map +++ b/demo/faceid/index.js.map @@ -2,6 +2,6 @@ "version": 3, "sources": ["index.ts", "indexdb.ts"], "sourcesContent": ["/**\n * Human demo for browsers\n * @default Human Library\n * @summary \n * @author \n * @copyright \n * @license MIT\n */\n\nimport * as H from '../../dist/human.esm.js'; // equivalent of @vladmandic/Human\nimport * as indexDb from './indexdb'; // methods to deal with indexdb\n\nconst humanConfig = { // user configuration for human, used to fine-tune behavior\n cacheSensitivity: 0,\n modelBasePath: '../../models',\n filter: { equalization: true }, // lets run with histogram equilizer\n face: {\n enabled: true,\n detector: { rotation: true, return: true, cropFactor: 1.6, mask: false }, // return tensor is used to get detected face image\n description: { enabled: true }, // default model for face descriptor extraction is faceres\n // mobilefacenet: { enabled: true, modelPath: 'https://vladmandic.github.io/human-models/models/mobilefacenet.json' }, // alternative model\n // insightface: { enabled: true, modelPath: 'https://vladmandic.github.io/insightface/models/insightface-mobilenet-swish.json' }, // alternative model\n iris: { enabled: true }, // needed to determine gaze direction\n emotion: { enabled: false }, // not needed\n antispoof: { enabled: true }, // enable optional antispoof module\n liveness: { enabled: true }, // enable optional liveness module\n },\n body: { enabled: false },\n hand: { enabled: false },\n object: { enabled: false },\n gesture: { enabled: true }, // parses face and iris gestures\n};\n\n// const matchOptions = { order: 2, multiplier: 1000, min: 0.0, max: 1.0 }; // for embedding model\nconst matchOptions = { order: 2, multiplier: 25, min: 0.2, max: 0.8 }; // for faceres model\n\nconst options = {\n minConfidence: 0.6, // overal face confidence for box, face, gender, real, live\n minSize: 224, // min input to face descriptor model before degradation\n maxTime: 30000, // max time before giving up\n blinkMin: 10, // minimum duration of a valid blink\n blinkMax: 800, // maximum duration of a valid blink\n threshold: 0.5, // minimum similarity\n mask: humanConfig.face.detector.mask,\n rotation: humanConfig.face.detector.rotation,\n cropFactor: humanConfig.face.detector.cropFactor,\n ...matchOptions,\n};\n\nconst ok: Record = { // must meet all rules\n faceCount: { status: false, val: 0 },\n faceConfidence: { status: false, val: 0 },\n facingCenter: { status: false, val: 0 },\n lookingCenter: { status: false, val: 0 },\n blinkDetected: { status: false, val: 0 },\n faceSize: { status: false, val: 0 },\n antispoofCheck: { status: false, val: 0 },\n livenessCheck: { status: false, val: 0 },\n age: { status: false, val: 0 },\n gender: { status: false, val: 0 },\n timeout: { status: true, val: 0 },\n descriptor: { status: false, val: 0 },\n elapsedMs: { status: undefined, val: 0 }, // total time while waiting for valid face\n detectFPS: { status: undefined, val: 0 }, // mark detection fps performance\n drawFPS: { status: undefined, val: 0 }, // mark redraw fps performance\n};\n\nconst allOk = () => ok.faceCount.status\n && ok.faceSize.status\n && ok.blinkDetected.status\n && ok.facingCenter.status\n && ok.lookingCenter.status\n && ok.faceConfidence.status\n && ok.antispoofCheck.status\n && ok.livenessCheck.status\n && ok.descriptor.status\n && ok.age.status\n && ok.gender.status;\n\nconst current: { face: H.FaceResult | null, record: indexDb.FaceRecord | null } = { face: null, record: null }; // current face record and matched database record\n\nconst blink = { // internal timers for blink start/end/duration\n start: 0,\n end: 0,\n time: 0,\n};\n\n// let db: Array<{ name: string, source: string, embedding: number[] }> = []; // holds loaded face descriptor database\nconst human = new H.Human(humanConfig); // create instance of human with overrides from user configuration\n\nhuman.env.perfadd = false; // is performance data showing instant or total values\nhuman.draw.options.font = 'small-caps 18px \"Lato\"'; // set font used to draw labels when using draw methods\nhuman.draw.options.lineHeight = 20;\n\nconst dom = { // grab instances of dom objects so we dont have to look them up later\n video: document.getElementById('video') as HTMLVideoElement,\n canvas: document.getElementById('canvas') as HTMLCanvasElement,\n log: document.getElementById('log') as HTMLPreElement,\n fps: document.getElementById('fps') as HTMLPreElement,\n match: document.getElementById('match') as HTMLDivElement,\n name: document.getElementById('name') as HTMLInputElement,\n save: document.getElementById('save') as HTMLSpanElement,\n delete: document.getElementById('delete') as HTMLSpanElement,\n retry: document.getElementById('retry') as HTMLDivElement,\n source: document.getElementById('source') as HTMLCanvasElement,\n ok: document.getElementById('ok') as HTMLDivElement,\n};\nconst timestamp = { detect: 0, draw: 0 }; // holds information used to calculate performance and possible memory leaks\nlet startTime = 0;\n\nconst log = (...msg) => { // helper method to output messages\n dom.log.innerText += msg.join(' ') + '\\n';\n console.log(...msg); // eslint-disable-line no-console\n};\n\nasync function webCam() { // initialize webcam\n // @ts-ignore resizeMode is not yet defined in tslib\n const cameraOptions: MediaStreamConstraints = { audio: false, video: { facingMode: 'user', resizeMode: 'none', width: { ideal: document.body.clientWidth } } };\n const stream: MediaStream = await navigator.mediaDevices.getUserMedia(cameraOptions);\n const ready = new Promise((resolve) => { dom.video.onloadeddata = () => resolve(true); });\n dom.video.srcObject = stream;\n void dom.video.play();\n await ready;\n dom.canvas.width = dom.video.videoWidth;\n dom.canvas.height = dom.video.videoHeight;\n dom.canvas.style.width = '50%';\n dom.canvas.style.height = '50%';\n if (human.env.initial) log('video:', dom.video.videoWidth, dom.video.videoHeight, '|', stream.getVideoTracks()[0].label);\n dom.canvas.onclick = () => { // pause when clicked on screen and resume on next click\n if (dom.video.paused) void dom.video.play();\n else dom.video.pause();\n };\n}\n\nasync function detectionLoop() { // main detection loop\n if (!dom.video.paused) {\n if (current.face?.tensor) human.tf.dispose(current.face.tensor); // dispose previous tensor\n await human.detect(dom.video); // actual detection; were not capturing output in a local variable as it can also be reached via human.result\n const now = human.now();\n ok.detectFPS.val = Math.round(10000 / (now - timestamp.detect)) / 10;\n timestamp.detect = now;\n requestAnimationFrame(detectionLoop); // start new frame immediately\n }\n}\n\nfunction drawValidationTests() {\n let y = 32;\n for (const [key, val] of Object.entries(ok)) {\n let el = document.getElementById(`ok-${key}`);\n if (!el) {\n el = document.createElement('div');\n el.id = `ok-${key}`;\n el.innerText = key;\n el.className = 'ok';\n el.style.top = `${y}px`;\n dom.ok.appendChild(el);\n }\n if (typeof val.status === 'boolean') el.style.backgroundColor = val.status ? 'lightgreen' : 'lightcoral';\n const status = val.status ? 'ok' : 'fail';\n el.innerText = `${key}: ${val.val === 0 ? status : val.val}`;\n y += 28;\n }\n}\n\nasync function validationLoop(): Promise { // main screen refresh loop\n const interpolated = human.next(human.result); // smoothen result using last-known results\n human.draw.canvas(dom.video, dom.canvas); // draw canvas to screen\n await human.draw.all(dom.canvas, interpolated); // draw labels, boxes, lines, etc.\n const now = human.now();\n ok.drawFPS.val = Math.round(10000 / (now - timestamp.draw)) / 10;\n timestamp.draw = now;\n ok.faceCount.val = human.result.face.length;\n ok.faceCount.status = ok.faceCount.val === 1; // must be exactly detected face\n if (ok.faceCount.status) { // skip the rest if no face\n const gestures: string[] = Object.values(human.result.gesture).map((gesture: H.GestureResult) => gesture.gesture); // flatten all gestures\n if (gestures.includes('blink left eye') || gestures.includes('blink right eye')) blink.start = human.now(); // blink starts when eyes get closed\n if (blink.start > 0 && !gestures.includes('blink left eye') && !gestures.includes('blink right eye')) blink.end = human.now(); // if blink started how long until eyes are back open\n ok.blinkDetected.status = ok.blinkDetected.status || (Math.abs(blink.end - blink.start) > options.blinkMin && Math.abs(blink.end - blink.start) < options.blinkMax);\n if (ok.blinkDetected.status && blink.time === 0) blink.time = Math.trunc(blink.end - blink.start);\n ok.facingCenter.status = gestures.includes('facing center');\n ok.lookingCenter.status = gestures.includes('looking center'); // must face camera and look at camera\n ok.faceConfidence.val = human.result.face[0].faceScore || human.result.face[0].boxScore || 0;\n ok.faceConfidence.status = ok.faceConfidence.val >= options.minConfidence;\n ok.antispoofCheck.val = human.result.face[0].real || 0;\n ok.antispoofCheck.status = ok.antispoofCheck.val >= options.minConfidence;\n ok.livenessCheck.val = human.result.face[0].live || 0;\n ok.livenessCheck.status = ok.livenessCheck.val >= options.minConfidence;\n ok.faceSize.val = Math.min(human.result.face[0].box[2], human.result.face[0].box[3]);\n ok.faceSize.status = ok.faceSize.val >= options.minSize;\n ok.descriptor.val = human.result.face[0].embedding?.length || 0;\n ok.descriptor.status = ok.descriptor.val > 0;\n ok.age.val = human.result.face[0].age || 0;\n ok.age.status = ok.age.val > 0;\n ok.gender.val = human.result.face[0].genderScore || 0;\n ok.gender.status = ok.gender.val >= options.minConfidence;\n }\n // run again\n ok.timeout.status = ok.elapsedMs.val <= options.maxTime;\n drawValidationTests();\n if (allOk() || !ok.timeout.status) { // all criteria met\n dom.video.pause();\n return human.result.face[0];\n }\n ok.elapsedMs.val = Math.trunc(human.now() - startTime);\n return new Promise((resolve) => {\n setTimeout(async () => {\n await validationLoop(); // run validation loop until conditions are met\n resolve(human.result.face[0]); // recursive promise resolve\n }, 30); // use to slow down refresh from max refresh rate to target of 30 fps\n });\n}\n\nasync function saveRecords() {\n if (dom.name.value.length > 0) {\n const image = dom.canvas.getContext('2d')?.getImageData(0, 0, dom.canvas.width, dom.canvas.height) as ImageData;\n const rec = { id: 0, name: dom.name.value, descriptor: current.face?.embedding as number[], image };\n await indexDb.save(rec);\n log('saved face record:', rec.name, 'descriptor length:', current.face?.embedding?.length);\n log('known face records:', await indexDb.count());\n } else {\n log('invalid name');\n }\n}\n\nasync function deleteRecord() {\n if (current.record && current.record.id > 0) {\n await indexDb.remove(current.record);\n }\n}\n\nasync function detectFace() {\n dom.canvas.style.height = '';\n dom.canvas.getContext('2d')?.clearRect(0, 0, options.minSize, options.minSize);\n if (!current?.face?.tensor || !current?.face?.embedding) return false;\n console.log('face record:', current.face); // eslint-disable-line no-console\n log(`detected face: ${current.face.gender} ${current.face.age || 0}y distance ${current.face.iris || 0}cm/${Math.round(100 * (current.face.iris || 0) / 2.54) / 100}in`);\n human.tf.browser.toPixels(current.face.tensor as unknown as H.TensorLike, dom.canvas);\n if (await indexDb.count() === 0) {\n log('face database is empty: nothing to compare face with');\n document.body.style.background = 'black';\n dom.delete.style.display = 'none';\n return false;\n }\n const db = await indexDb.load();\n const descriptors = db.map((rec) => rec.descriptor).filter((desc) => desc.length > 0);\n const res = human.match(current.face.embedding, descriptors, matchOptions);\n current.record = db[res.index] || null;\n if (current.record) {\n log(`best match: ${current.record.name} | id: ${current.record.id} | similarity: ${Math.round(1000 * res.similarity) / 10}%`);\n dom.name.value = current.record.name;\n dom.source.style.display = '';\n dom.source.getContext('2d')?.putImageData(current.record.image, 0, 0);\n }\n document.body.style.background = res.similarity > options.threshold ? 'darkgreen' : 'maroon';\n return res.similarity > options.threshold;\n}\n\nasync function main() { // main entry point\n ok.faceCount.status = false;\n ok.faceConfidence.status = false;\n ok.facingCenter.status = false;\n ok.blinkDetected.status = false;\n ok.faceSize.status = false;\n ok.antispoofCheck.status = false;\n ok.livenessCheck.status = false;\n ok.age.status = false;\n ok.gender.status = false;\n ok.elapsedMs.val = 0;\n dom.match.style.display = 'none';\n dom.retry.style.display = 'none';\n dom.source.style.display = 'none';\n dom.canvas.style.height = '50%';\n document.body.style.background = 'black';\n await webCam();\n await detectionLoop(); // start detection loop\n startTime = human.now();\n current.face = await validationLoop(); // start validation loop\n dom.canvas.width = current.face.tensor?.shape[1] || options.minSize;\n dom.canvas.height = current.face.tensor?.shape[0] || options.minSize;\n dom.source.width = dom.canvas.width;\n dom.source.height = dom.canvas.height;\n dom.canvas.style.width = '';\n dom.match.style.display = 'flex';\n dom.save.style.display = 'flex';\n dom.delete.style.display = 'flex';\n dom.retry.style.display = 'block';\n if (!allOk()) { // is all criteria met?\n log('did not find valid face');\n return false;\n }\n return detectFace();\n}\n\nasync function init() {\n log('human version:', human.version, '| tfjs version:', human.tf.version['tfjs-core']);\n log('options:', JSON.stringify(options).replace(/{|}|\"|\\[|\\]/g, '').replace(/,/g, ' '));\n log('initializing webcam...');\n await webCam(); // start webcam\n log('loading human models...');\n await human.load(); // preload all models\n log('initializing human...');\n log('face embedding model:', humanConfig.face.description.enabled ? 'faceres' : '', humanConfig.face['mobilefacenet']?.enabled ? 'mobilefacenet' : '', humanConfig.face['insightface']?.enabled ? 'insightface' : '');\n log('loading face database...');\n log('known face records:', await indexDb.count());\n dom.retry.addEventListener('click', main);\n dom.save.addEventListener('click', saveRecords);\n dom.delete.addEventListener('click', deleteRecord);\n await human.warmup(); // warmup function to initialize backend for future faster detection\n await main();\n}\n\nwindow.onload = init;\n", "let db: IDBDatabase; // instance of indexdb\n\nconst database = 'human';\nconst table = 'person';\n\nexport interface FaceRecord { id: number, name: string, descriptor: number[], image: ImageData }\n\nconst log = (...msg) => console.log('indexdb', ...msg); // eslint-disable-line no-console\n\nexport async function open() {\n if (db) return true;\n return new Promise((resolve) => {\n const request: IDBOpenDBRequest = indexedDB.open(database, 1);\n request.onerror = (evt) => log('error:', evt);\n request.onupgradeneeded = (evt: IDBVersionChangeEvent) => { // create if doesnt exist\n log('create:', evt.target);\n db = (evt.target as IDBOpenDBRequest).result;\n db.createObjectStore(table, { keyPath: 'id', autoIncrement: true });\n };\n request.onsuccess = (evt) => { // open\n db = (evt.target as IDBOpenDBRequest).result;\n log('open:', db);\n resolve(true);\n };\n });\n}\n\nexport async function load(): Promise {\n const faceDB: FaceRecord[] = [];\n if (!db) await open(); // open or create if not already done\n return new Promise((resolve) => {\n const cursor: IDBRequest = db.transaction([table], 'readwrite').objectStore(table).openCursor(null, 'next');\n cursor.onerror = (evt) => log('load error:', evt);\n cursor.onsuccess = (evt) => {\n if ((evt.target as IDBRequest).result) {\n faceDB.push((evt.target as IDBRequest).result.value);\n (evt.target as IDBRequest).result.continue();\n } else {\n resolve(faceDB);\n }\n };\n });\n}\n\nexport async function count(): Promise {\n if (!db) await open(); // open or create if not already done\n return new Promise((resolve) => {\n const store: IDBRequest = db.transaction([table], 'readwrite').objectStore(table).count();\n store.onerror = (evt) => log('count error:', evt);\n store.onsuccess = () => resolve(store.result);\n });\n}\n\nexport async function save(faceRecord: FaceRecord) {\n if (!db) await open(); // open or create if not already done\n const newRecord = { name: faceRecord.name, descriptor: faceRecord.descriptor, image: faceRecord.image }; // omit id as its autoincrement\n db.transaction([table], 'readwrite').objectStore(table).put(newRecord);\n log('save:', newRecord);\n}\n\nexport async function remove(faceRecord: FaceRecord) {\n if (!db) await open(); // open or create if not already done\n db.transaction([table], 'readwrite').objectStore(table).delete(faceRecord.id); // delete based on id\n log('delete:', faceRecord);\n}\n"], - "mappings": ";;;;;;;;AASA,YAAY,OAAO;;;ACTnB,IAAI;AAEJ,IAAM,WAAW;AACjB,IAAM,QAAQ;AAId,IAAM,MAAM,IAAI,QAAQ,QAAQ,IAAI,WAAW,GAAG,GAAG;AAErD,eAAsB,OAAO;AAC3B,MAAI;AAAI,WAAO;AACf,SAAO,IAAI,QAAQ,CAAC,YAAY;AAC9B,UAAM,UAA4B,UAAU,KAAK,UAAU,CAAC;AAC5D,YAAQ,UAAU,CAAC,QAAQ,IAAI,UAAU,GAAG;AAC5C,YAAQ,kBAAk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cAAgB,EAAE,EACpNrB,EAAI,0BAA0B,EAC9BA,EAAI,sBAAuB,MAAc2B,EAAM,CAAC,EAChD9B,EAAI,MAAM,iBAAiB,QAASuC,CAAI,EACxCvC,EAAI,KAAK,iBAAiB,QAASuB,CAAW,EAC9CvB,EAAI,OAAO,iBAAiB,QAAS+B,CAAY,EACjD,MAAMhC,EAAM,OAAO,EACnB,MAAMwC,EAAK,CACb,CAEA,OAAO,OAASC", + "names": ["H", "db", "database", "table", "log", "msg", "open", "resolve", "request", "evt", "load", "faceDB", "cursor", "count", "store", "save", "faceRecord", "newRecord", "remove", "humanConfig", "matchOptions", "options", "ok", "allOk", "current", "blink", "human", "dom", "timestamp", "startTime", "log", "msg", "webCam", "cameraOptions", "stream", "ready", "resolve", "detectionLoop", "_a", "now", "drawValidationTests", "y", "key", "val", "el", "status", "validationLoop", "interpolated", "gestures", "gesture", "saveRecords", "_b", "_c", "_d", "image", "rec", "save", "count", "deleteRecord", "remove", "detectFace", "db", "load", "descriptors", "desc", "res", "main", "init"] } diff --git a/demo/segmentation/index.js b/demo/segmentation/index.js index 8c7854be1..4de99c168 100644 --- a/demo/segmentation/index.js +++ b/demo/segmentation/index.js @@ -10,8 +10,6 @@ import * as H from '../../dist/human.esm.js'; // equivalent of @vladmandic/Human const humanConfig = { // user configuration for human, used to fine-tune behavior - // backend: 'wasm', - // wasmPath: 'https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm@3.20.0/dist/', modelBasePath: 'https://vladmandic.github.io/human-models/models/', filter: { enabled: true, equalization: false, flip: false }, face: { enabled: false }, diff --git a/demo/typescript/index.js b/demo/typescript/index.js index c35e7f496..50a2ccfe9 100644 --- a/demo/typescript/index.js +++ b/demo/typescript/index.js @@ -4,96 +4,6 @@ author: ' */ - -// demo/typescript/index.ts -import * as H from "../../dist/human.esm.js"; -var humanConfig = { - modelBasePath: "../../models", - filter: { enabled: true, equalization: false, flip: false }, - face: { enabled: true, detector: { rotation: false }, mesh: { enabled: true }, attention: { enabled: false }, iris: { enabled: true }, description: { enabled: true }, emotion: { enabled: true } }, - body: { enabled: true }, - hand: { enabled: true }, - object: { enabled: false }, - segmentation: { enabled: false }, - gesture: { enabled: true } -}; -var human = new H.Human(humanConfig); -human.env.perfadd = false; -human.draw.options.font = 'small-caps 18px "Lato"'; -human.draw.options.lineHeight = 20; -var dom = { - video: document.getElementById("video"), - canvas: document.getElementById("canvas"), - log: document.getElementById("log"), - fps: document.getElementById("status"), - perf: document.getElementById("performance") -}; -var timestamp = { detect: 0, draw: 0, tensors: 0, start: 0 }; -var fps = { detectFPS: 0, drawFPS: 0, frames: 0, averageMs: 0 }; -var log = (...msg) => { - dom.log.innerText += msg.join(" ") + "\n"; - console.log(...msg); -}; -var status = (msg) => dom.fps.innerText = msg; -var perf = (msg) => dom.perf.innerText = "tensors:" + human.tf.memory().numTensors.toString() + " | performance: " + JSON.stringify(msg).replace(/"|{|}/g, "").replace(/,/g, " | "); -async function detectionLoop() { - if (!dom.video.paused) { - if (timestamp.start === 0) - timestamp.start = human.now(); - await human.detect(dom.video); - const tensors = human.tf.memory().numTensors; - if (tensors - timestamp.tensors !== 0) - log("allocated tensors:", tensors - timestamp.tensors); - timestamp.tensors = tensors; - fps.detectFPS = Math.round(1e3 * 1e3 / (human.now() - timestamp.detect)) / 1e3; - fps.frames++; - fps.averageMs = Math.round(1e3 * (human.now() - timestamp.start) / fps.frames) / 1e3; - if (fps.frames % 100 === 0 && !dom.video.paused) - log("performance", { ...fps, tensors: timestamp.tensors }); - } - timestamp.detect = human.now(); - requestAnimationFrame(detectionLoop); -} -async function drawLoop() { - if (!dom.video.paused) { - const interpolated = human.next(human.result); - if (human.config.filter.flip) - human.draw.canvas(interpolated.canvas, dom.canvas); - else - human.draw.canvas(dom.video, dom.canvas); - await human.draw.all(dom.canvas, interpolated); - perf(interpolated.performance); - } - const now = human.now(); - fps.drawFPS = Math.round(1e3 * 1e3 / (now - timestamp.draw)) / 1e3; - timestamp.draw = now; - status(dom.video.paused ? "paused" : `fps: ${fps.detectFPS.toFixed(1).padStart(5, " ")} detect | ${fps.drawFPS.toFixed(1).padStart(5, " ")} draw`); - setTimeout(drawLoop, 30); -} -async function webCam() { - await human.webcam.start({ element: dom.video, crop: true }); - dom.canvas.width = human.webcam.width; - dom.canvas.height = human.webcam.height; - dom.canvas.onclick = async () => { - if (human.webcam.paused) - await human.webcam.play(); - else - human.webcam.pause(); - }; -} -async function main() { - log("human version:", human.version, "| tfjs version:", human.tf.version["tfjs-core"]); - log("platform:", human.env.platform, "| agent:", human.env.agent); - status("loading..."); - await human.load(); - log("backend:", human.tf.getBackend(), "| available:", human.env.backends); - log("models stats:", human.getModelStats()); - log("models loaded:", Object.values(human.models).filter((model) => model !== null).length); - status("initializing..."); - await human.warmup(); - await webCam(); - await detectionLoop(); - await drawLoop(); -} -window.onload = main; +import*as i from"../../dist/human.esm.js";var m={modelBasePath:"../../models",filter:{enabled:!0,equalization:!1,flip:!1},face:{enabled:!0,detector:{rotation:!1},mesh:{enabled:!0},attention:{enabled:!1},iris:{enabled:!0},description:{enabled:!0},emotion:{enabled:!0}},body:{enabled:!0},hand:{enabled:!0},object:{enabled:!1},segmentation:{enabled:!1},gesture:{enabled:!0}},e=new i.Human(m);e.env.perfadd=!1;e.draw.options.font='small-caps 18px "Lato"';e.draw.options.lineHeight=20;var a={video:document.getElementById("video"),canvas:document.getElementById("canvas"),log:document.getElementById("log"),fps:document.getElementById("status"),perf:document.getElementById("performance")},n={detect:0,draw:0,tensors:0,start:0},s={detectFPS:0,drawFPS:0,frames:0,averageMs:0},o=(...t)=>{a.log.innerText+=t.join(" ")+` +`,console.log(...t)},d=t=>a.fps.innerText=t,f=t=>a.perf.innerText="tensors:"+e.tf.memory().numTensors.toString()+" | performance: "+JSON.stringify(t).replace(/"|{|}/g,"").replace(/,/g," | ");async function l(){if(!a.video.paused){n.start===0&&(n.start=e.now()),await e.detect(a.video);let t=e.tf.memory().numTensors;t-n.tensors!==0&&o("allocated tensors:",t-n.tensors),n.tensors=t,s.detectFPS=Math.round(1e3*1e3/(e.now()-n.detect))/1e3,s.frames++,s.averageMs=Math.round(1e3*(e.now()-n.start)/s.frames)/1e3,s.frames%100===0&&!a.video.paused&&o("performance",{...s,tensors:n.tensors})}n.detect=e.now(),requestAnimationFrame(l)}async function c(){if(!a.video.paused){let r=e.next(e.result);e.config.filter.flip?e.draw.canvas(r.canvas,a.canvas):e.draw.canvas(a.video,a.canvas),await e.draw.all(a.canvas,r),f(r.performance)}let t=e.now();s.drawFPS=Math.round(1e3*1e3/(t-n.draw))/1e3,n.draw=t,d(a.video.paused?"paused":`fps: ${s.detectFPS.toFixed(1).padStart(5," ")} detect | ${s.drawFPS.toFixed(1).padStart(5," ")} draw`),setTimeout(c,30)}async function u(){await e.webcam.start({element:a.video,crop:!0}),a.canvas.width=e.webcam.width,a.canvas.height=e.webcam.height,a.canvas.onclick=async()=>{e.webcam.paused?await e.webcam.play():e.webcam.pause()}}async function w(){o("human version:",e.version,"| tfjs version:",e.tf.version["tfjs-core"]),o("platform:",e.env.platform,"| agent:",e.env.agent),d("loading..."),await e.load(),o("backend:",e.tf.getBackend(),"| available:",e.env.backends),o("models stats:",e.getModelStats()),o("models loaded:",Object.values(e.models).filter(t=>t!==null).length),d("initializing..."),await e.warmup(),await u(),await l(),await c()}window.onload=w; //# sourceMappingURL=index.js.map diff --git a/demo/typescript/index.js.map b/demo/typescript/index.js.map index 605a670d6..2d6d226c5 100644 --- a/demo/typescript/index.js.map +++ b/demo/typescript/index.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["index.ts"], - "sourcesContent": ["/**\n * Human demo for browsers\n * @default Human Library\n * @summary \n * @author \n * @copyright \n * @license MIT\n */\n\nimport * as H from '../../dist/human.esm.js'; // equivalent of @vladmandic/Human\n\nconst humanConfig: Partial = { // user configuration for human, used to fine-tune behavior\n // backend: 'wasm',\n // wasmPath: 'https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm@3.20.0/dist/',\n // cacheSensitivity: 0,\n // async: false,\n modelBasePath: '../../models',\n filter: { enabled: true, equalization: false, flip: false },\n face: { enabled: true, detector: { rotation: false }, mesh: { enabled: true }, attention: { enabled: false }, iris: { enabled: true }, description: { enabled: true }, emotion: { enabled: true } },\n body: { enabled: true },\n hand: { enabled: true },\n object: { enabled: false },\n segmentation: { enabled: false },\n gesture: { enabled: true },\n};\n\nconst human = new H.Human(humanConfig); // create instance of human with overrides from user configuration\n\nhuman.env.perfadd = false; // is performance data showing instant or total values\nhuman.draw.options.font = 'small-caps 18px \"Lato\"'; // set font used to draw labels when using draw methods\nhuman.draw.options.lineHeight = 20;\n// human.draw.options.fillPolygons = true;\n\nconst dom = { // grab instances of dom objects so we dont have to look them up later\n video: document.getElementById('video') as HTMLVideoElement,\n canvas: document.getElementById('canvas') as HTMLCanvasElement,\n log: document.getElementById('log') as HTMLPreElement,\n fps: document.getElementById('status') as HTMLPreElement,\n perf: document.getElementById('performance') as HTMLDivElement,\n};\nconst timestamp = { detect: 0, draw: 0, tensors: 0, start: 0 }; // holds information used to calculate performance and possible memory leaks\nconst fps = { detectFPS: 0, drawFPS: 0, frames: 0, averageMs: 0 }; // holds calculated fps information for both detect and screen refresh\n\nconst log = (...msg) => { // helper method to output messages\n dom.log.innerText += msg.join(' ') + '\\n';\n console.log(...msg); // eslint-disable-line no-console\n};\nconst status = (msg) => dom.fps.innerText = msg; // print status element\nconst perf = (msg) => dom.perf.innerText = 'tensors:' + (human.tf.memory().numTensors as number).toString() + ' | performance: ' + JSON.stringify(msg).replace(/\"|{|}/g, '').replace(/,/g, ' | '); // print performance element\n\nasync function detectionLoop() { // main detection loop\n if (!dom.video.paused) {\n if (timestamp.start === 0) timestamp.start = human.now();\n // log('profiling data:', await human.profile(dom.video));\n await human.detect(dom.video); // actual detection; were not capturing output in a local variable as it can also be reached via human.result\n const tensors = human.tf.memory().numTensors; // check current tensor usage for memory leaks\n if (tensors - timestamp.tensors !== 0) log('allocated tensors:', tensors - timestamp.tensors); // printed on start and each time there is a tensor leak\n timestamp.tensors = tensors;\n fps.detectFPS = Math.round(1000 * 1000 / (human.now() - timestamp.detect)) / 1000;\n fps.frames++;\n fps.averageMs = Math.round(1000 * (human.now() - timestamp.start) / fps.frames) / 1000;\n if (fps.frames % 100 === 0 && !dom.video.paused) log('performance', { ...fps, tensors: timestamp.tensors });\n }\n timestamp.detect = human.now();\n requestAnimationFrame(detectionLoop); // start new frame immediately\n}\n\nasync function drawLoop() { // main screen refresh loop\n if (!dom.video.paused) {\n const interpolated = human.next(human.result); // smoothen result using last-known results\n if (human.config.filter.flip) human.draw.canvas(interpolated.canvas as HTMLCanvasElement, dom.canvas); // draw processed image to screen canvas\n else human.draw.canvas(dom.video, dom.canvas); // draw original video to screen canvas // better than using procesed image as this loop happens faster than processing loop\n await human.draw.all(dom.canvas, interpolated); // draw labels, boxes, lines, etc.\n perf(interpolated.performance); // write performance data\n }\n const now = human.now();\n fps.drawFPS = Math.round(1000 * 1000 / (now - timestamp.draw)) / 1000;\n timestamp.draw = now;\n status(dom.video.paused ? 'paused' : `fps: ${fps.detectFPS.toFixed(1).padStart(5, ' ')} detect | ${fps.drawFPS.toFixed(1).padStart(5, ' ')} draw`); // write status\n setTimeout(drawLoop, 30); // use to slow down refresh from max refresh rate to target of 30 fps\n}\n\nasync function webCam() {\n await human.webcam.start({ element: dom.video, crop: true }); // use human webcam helper methods and associate webcam stream with a dom element\n dom.canvas.width = human.webcam.width;\n dom.canvas.height = human.webcam.height;\n dom.canvas.onclick = async () => { // pause when clicked on screen and resume on next click\n if (human.webcam.paused) await human.webcam.play();\n else human.webcam.pause();\n };\n}\n\nasync function main() { // main entry point\n log('human version:', human.version, '| tfjs version:', human.tf.version['tfjs-core']);\n log('platform:', human.env.platform, '| agent:', human.env.agent);\n status('loading...');\n await human.load(); // preload all models\n log('backend:', human.tf.getBackend(), '| available:', human.env.backends);\n log('models stats:', human.getModelStats());\n log('models loaded:', Object.values(human.models).filter((model) => model !== null).length);\n status('initializing...');\n await human.warmup(); // warmup function to initialize backend for future faster detection\n await webCam(); // start webcam\n await detectionLoop(); // start detection loop\n await drawLoop(); // start draw loop\n}\n\nwindow.onload = main;\n"], - "mappings": ";;;;;;;;AASA,YAAY,OAAO;AAEnB,IAAM,cAAiC;AAAA,EAKrC,eAAe;AAAA,EACf,QAAQ,EAAE,SAAS,MAAM,cAAc,OAAO,MAAM,MAAM;AAAA,EAC1D,MAAM,EAAE,SAAS,MAAM,UAAU,EAAE,UAAU,MAAM,GAAG,MAAM,EAAE,SAAS,KAAK,GAAG,WAAW,EAAE,SAAS,MAAM,GAAG,MAAM,EAAE,SAAS,KAAK,GAAG,aAAa,EAAE,SAAS,KAAK,GAAG,SAAS,EAAE,SAAS,KAAK,EAAE;AAAA,EAClM,MAAM,EAAE,SAAS,KAAK;AAAA,EACtB,MAAM,EAAE,SAAS,KAAK;AAAA,EACtB,QAAQ,EAAE,SAAS,MAAM;AAAA,EACzB,cAAc,EAAE,SAAS,MAAM;AAAA,EAC/B,SAAS,EAAE,SAAS,KAAK;AAC3B;AAEA,IAAM,QAAQ,IAAM,QAAM,WAAW;AAErC,MAAM,IAAI,UAAU;AACpB,MAAM,KAAK,QAAQ,OAAO;AAC1B,MAAM,KAAK,QAAQ,aAAa;AAGhC,IAAM,MAAM;AAAA,EACV,OAAO,SAAS,eAAe,OAAO;AAAA,EACtC,QAAQ,SAAS,eAAe,QAAQ;AAAA,EACxC,KAAK,SAAS,eAAe,KAAK;AAAA,EAClC,KAAK,SAAS,eAAe,QAAQ;AAAA,EACrC,MAAM,SAAS,eAAe,aAAa;AAC7C;AACA,IAAM,YAAY,EAAE,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,EAAE;AAC7D,IAAM,MAAM,EAAE,WAAW,GAAG,SAAS,GAAG,QAAQ,GAAG,WAAW,EAAE;AAEhE,IAAM,MAAM,IAAI,QAAQ;AACtB,MAAI,IAAI,aAAa,IAAI,KAAK,GAAG,IAAI;AAC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;AACA,QAAM,MAAM,MAAM,IAAI;AACtB,MAAI,UAAU,KAAK,MAAM,MAAO,OAAQ,MAAM,UAAU,KAAK,IAAI;AACjE,YAAU,OAAO;AACjB,SAAO,IAAI,MAAM,SAAS,WAAW,QAAQ,IAAI,UAAU,QAAQ,CAAC,EAAE,SAAS,GAAG,GAAG,cAAc,IAAI,QAAQ,QAAQ,CAAC,EAAE,SAAS,GAAG,GAAG,QAAQ;AACjJ,aAAW,UAAU,EAAE;AACzB;AAEA,eAAe,SAAS;AACtB,QAAM,MAAM,OAAO,MAAM,EAAE,SAAS,IAAI,OAAO,MAAM,KAAK,CAAC;AAC3D,MAAI,OAAO,QAAQ,MAAM,OAAO;AAChC,MAAI,OAAO,SAAS,MAAM,OAAO;AACjC,MAAI,OAAO,UAAU,YAAY;AAC/B,QAAI,MAAM,OAAO;AAAQ,YAAM,MAAM,OAAO,KAAK;AAAA;AAC5C,YAAM,OAAO,MAAM;AAAA,EAC1B;AACF;AAEA,eAAe,OAAO;AACpB,MAAI,kBAAkB,MAAM,SAAS,mBAAmB,MAAM,GAAG,QAAQ,YAAY;AACrF,MAAI,aAAa,MAAM,IAAI,UAAU,YAAY,MAAM,IAAI,KAAK;AAChE,SAAO,YAAY;AACnB,QAAM,MAAM,KAAK;AACjB,MAAI,YAAY,MAAM,GAAG,WAAW,GAAG,gBAAgB,MAAM,IAAI,QAAQ;AACzE,MAAI,iBAAiB,MAAM,cAAc,CAAC;AAC1C,MAAI,kBAAkB,OAAO,OAAO,MAAM,MAAM,EAAE,OAAO,CAAC,UAAU,UAAU,IAAI,EAAE,MAAM;AAC1F,SAAO,iBAAiB;AACxB,QAAM,MAAM,OAAO;AACnB,QAAM,OAAO;AACb,QAAM,cAAc;AACpB,QAAM,SAAS;AACjB;AAEA,OAAO,SAAS;", - "names": [] + "sourcesContent": ["/**\n * Human demo for browsers\n * @default Human Library\n * @summary \n * @author \n * @copyright \n * @license MIT\n */\n\nimport * as H from '../../dist/human.esm.js'; // equivalent of @vladmandic/Human\n\nconst humanConfig: Partial = { // user configuration for human, used to fine-tune behavior\n modelBasePath: '../../models',\n filter: { enabled: true, equalization: false, flip: false },\n face: { enabled: true, detector: { rotation: false }, mesh: { enabled: true }, attention: { enabled: false }, iris: { enabled: true }, description: { enabled: true }, emotion: { enabled: true } },\n body: { enabled: true },\n hand: { enabled: true },\n object: { enabled: false },\n segmentation: { enabled: false },\n gesture: { enabled: true },\n};\n\nconst human = new H.Human(humanConfig); // create instance of human with overrides from user configuration\n\nhuman.env.perfadd = false; // is performance data showing instant or total values\nhuman.draw.options.font = 'small-caps 18px \"Lato\"'; // set font used to draw labels when using draw methods\nhuman.draw.options.lineHeight = 20;\n// human.draw.options.fillPolygons = true;\n\nconst dom = { // grab instances of dom objects so we dont have to look them up later\n video: document.getElementById('video') as HTMLVideoElement,\n canvas: document.getElementById('canvas') as HTMLCanvasElement,\n log: document.getElementById('log') as HTMLPreElement,\n fps: document.getElementById('status') as HTMLPreElement,\n perf: document.getElementById('performance') as HTMLDivElement,\n};\nconst timestamp = { detect: 0, draw: 0, tensors: 0, start: 0 }; // holds information used to calculate performance and possible memory leaks\nconst fps = { detectFPS: 0, drawFPS: 0, frames: 0, averageMs: 0 }; // holds calculated fps information for both detect and screen refresh\n\nconst log = (...msg) => { // helper method to output messages\n dom.log.innerText += msg.join(' ') + '\\n';\n console.log(...msg); // eslint-disable-line no-console\n};\nconst status = (msg) => dom.fps.innerText = msg; // print status element\nconst perf = (msg) => dom.perf.innerText = 'tensors:' + (human.tf.memory().numTensors as number).toString() + ' | performance: ' + JSON.stringify(msg).replace(/\"|{|}/g, '').replace(/,/g, ' | '); // print performance element\n\nasync function detectionLoop() { // main detection loop\n if (!dom.video.paused) {\n if (timestamp.start === 0) timestamp.start = human.now();\n // log('profiling data:', await human.profile(dom.video));\n await human.detect(dom.video); // actual detection; were not capturing output in a local variable as it can also be reached via human.result\n const tensors = human.tf.memory().numTensors; // check current tensor usage for memory leaks\n if (tensors - timestamp.tensors !== 0) log('allocated tensors:', tensors - timestamp.tensors); // printed on start and each time there is a tensor leak\n timestamp.tensors = tensors;\n fps.detectFPS = Math.round(1000 * 1000 / (human.now() - timestamp.detect)) / 1000;\n fps.frames++;\n fps.averageMs = Math.round(1000 * (human.now() - timestamp.start) / fps.frames) / 1000;\n if (fps.frames % 100 === 0 && !dom.video.paused) log('performance', { ...fps, tensors: timestamp.tensors });\n }\n timestamp.detect = human.now();\n requestAnimationFrame(detectionLoop); // start new frame immediately\n}\n\nasync function drawLoop() { // main screen refresh loop\n if (!dom.video.paused) {\n const interpolated = human.next(human.result); // smoothen result using last-known results\n if (human.config.filter.flip) human.draw.canvas(interpolated.canvas as HTMLCanvasElement, dom.canvas); // draw processed image to screen canvas\n else human.draw.canvas(dom.video, dom.canvas); // draw original video to screen canvas // better than using procesed image as this loop happens faster than processing loop\n await human.draw.all(dom.canvas, interpolated); // draw labels, boxes, lines, etc.\n perf(interpolated.performance); // write performance data\n }\n const now = human.now();\n fps.drawFPS = Math.round(1000 * 1000 / (now - timestamp.draw)) / 1000;\n timestamp.draw = now;\n status(dom.video.paused ? 'paused' : `fps: ${fps.detectFPS.toFixed(1).padStart(5, ' ')} detect | ${fps.drawFPS.toFixed(1).padStart(5, ' ')} draw`); // write status\n setTimeout(drawLoop, 30); // use to slow down refresh from max refresh rate to target of 30 fps\n}\n\nasync function webCam() {\n await human.webcam.start({ element: dom.video, crop: true }); // use human webcam helper methods and associate webcam stream with a dom element\n dom.canvas.width = human.webcam.width;\n dom.canvas.height = human.webcam.height;\n dom.canvas.onclick = async () => { // pause when clicked on screen and resume on next click\n if (human.webcam.paused) await human.webcam.play();\n else human.webcam.pause();\n };\n}\n\nasync function main() { // main entry point\n log('human version:', human.version, '| tfjs version:', human.tf.version['tfjs-core']);\n log('platform:', human.env.platform, '| agent:', human.env.agent);\n status('loading...');\n await human.load(); // preload all models\n log('backend:', human.tf.getBackend(), '| available:', human.env.backends);\n log('models stats:', human.getModelStats());\n log('models loaded:', Object.values(human.models).filter((model) => model !== null).length);\n status('initializing...');\n await human.warmup(); // warmup function to initialize backend for future faster detection\n await webCam(); // start webcam\n await detectionLoop(); // start detection loop\n await drawLoop(); // start draw loop\n}\n\nwindow.onload = main;\n"], + "mappings": ";;;;;;AASA,UAAYA,MAAO,0BAEnB,IAAMC,EAAiC,CACrC,cAAe,eACf,OAAQ,CAAE,QAAS,GAAM,aAAc,GAAO,KAAM,EAAM,EAC1D,KAAM,CAAE,QAAS,GAAM,SAAU,CAAE,SAAU,EAAM,EAAG,KAAM,CAAE,QAAS,EAAK,EAAG,UAAW,CAAE,QAAS,EAAM,EAAG,KAAM,CAAE,QAAS,EAAK,EAAG,YAAa,CAAE,QAAS,EAAK,EAAG,QAAS,CAAE,QAAS,EAAK,CAAE,EAClM,KAAM,CAAE,QAAS,EAAK,EACtB,KAAM,CAAE,QAAS,EAAK,EACtB,OAAQ,CAAE,QAAS,EAAM,EACzB,aAAc,CAAE,QAAS,EAAM,EAC/B,QAAS,CAAE,QAAS,EAAK,CAC3B,EAEMC,EAAQ,IAAM,QAAMD,CAAW,EAErCC,EAAM,IAAI,QAAU,GACpBA,EAAM,KAAK,QAAQ,KAAO,yBAC1BA,EAAM,KAAK,QAAQ,WAAa,GAGhC,IAAMC,EAAM,CACV,MAAO,SAAS,eAAe,OAAO,EACtC,OAAQ,SAAS,eAAe,QAAQ,EACxC,IAAK,SAAS,eAAe,KAAK,EAClC,IAAK,SAAS,eAAe,QAAQ,EACrC,KAAM,SAAS,eAAe,aAAa,CAC7C,EACMC,EAAY,CAAE,OAAQ,EAAG,KAAM,EAAG,QAAS,EAAG,MAAO,CAAE,EACvDC,EAAM,CAAE,UAAW,EAAG,QAAS,EAAG,OAAQ,EAAG,UAAW,CAAE,EAE1DC,EAAM,IAAIC,IAAQ,CACtBJ,EAAI,IAAI,WAAaI,EAAI,KAAK,GAAG,EAAI;AAAA,EACrC,QAAQ,IAAI,GAAGA,CAAG,CACpB,EACMC,EAAUD,GAAQJ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IAAO,KAAQS,EAAMV,EAAU,KAAK,EAAI,IACjEA,EAAU,KAAOU,EACjBN,EAAOL,EAAI,MAAM,OAAS,SAAW,QAAQE,EAAI,UAAU,QAAQ,CAAC,EAAE,SAAS,EAAG,GAAG,cAAcA,EAAI,QAAQ,QAAQ,CAAC,EAAE,SAAS,EAAG,GAAG,QAAQ,EACjJ,WAAWO,EAAU,EAAE,CACzB,CAEA,eAAeG,GAAS,CACtB,MAAMb,EAAM,OAAO,MAAM,CAAE,QAASC,EAAI,MAAO,KAAM,EAAK,CAAC,EAC3DA,EAAI,OAAO,MAAQD,EAAM,OAAO,MAChCC,EAAI,OAAO,OAASD,EAAM,OAAO,OACjCC,EAAI,OAAO,QAAU,SAAY,CAC3BD,EAAM,OAAO,OAAQ,MAAMA,EAAM,OAAO,KAAK,EAC5CA,EAAM,OAAO,MAAM,CAC1B,CACF,CAEA,eAAec,GAAO,CACpBV,EAAI,iBAAkBJ,EAAM,QAAS,kBAAmBA,EAAM,GAAG,QAAQ,YAAY,EACrFI,EAAI,YAAaJ,EAAM,IAAI,SAAU,WAAYA,EAAM,IAAI,KAAK,EAChEM,EAAO,YAAY,EACnB,MAAMN,EAAM,KAAK,EACjBI,EAAI,WAAYJ,EAAM,GAAG,WAAW,EAAG,eAAgBA,EAAM,IAAI,QAAQ,EACzEI,EAAI,gBAAiBJ,EAAM,cAAc,CAAC,EAC1CI,EAAI,iBAAkB,OAAO,OAAOJ,EAAM,MAAM,EAAE,OAAQe,GAAUA,IAAU,IAAI,EAAE,MAAM,EAC1FT,EAAO,iBAAiB,EACxB,MAAMN,EAAM,OAAO,EACnB,MAAMa,EAAO,EACb,MAAML,EAAc,EACpB,MAAME,EAAS,CACjB,CAEA,OAAO,OAASI", + "names": ["H", "humanConfig", "human", "dom", "timestamp", "fps", "log", "msg", "status", "perf", "detectionLoop", "tensors", "drawLoop", "interpolated", "now", "webCam", "main", "model"] } diff --git a/demo/typescript/index.ts b/demo/typescript/index.ts index ae31b5177..d15bb0716 100644 --- a/demo/typescript/index.ts +++ b/demo/typescript/index.ts @@ -10,10 +10,6 @@ import * as H from '../../dist/human.esm.js'; // equivalent of @vladmandic/Human const humanConfig: Partial = { // user configuration for human, used to fine-tune behavior - // backend: 'wasm', - // wasmPath: 'https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm@3.20.0/dist/', - // cacheSensitivity: 0, - // async: false, modelBasePath: '../../models', filter: { enabled: true, equalization: false, flip: false }, face: { enabled: true, detector: { rotation: false }, mesh: { enabled: true }, attention: { enabled: false }, iris: { enabled: true }, description: { enabled: true }, emotion: { enabled: true } }, diff --git a/dist/human.esm-nobundle.js b/dist/human.esm-nobundle.js index c67d923af..42055d5e5 100644 --- a/dist/human.esm-nobundle.js +++ b/dist/human.esm-nobundle.js @@ -4,267 +4,7 @@ author: ' */ -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; -var __export = (target, all2) => { - for (var name in all2) - __defProp(target, name, { get: all2[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __reExport = (target, mod3, secondTarget) => (__copyProps(target, mod3, "default"), secondTarget && __copyProps(secondTarget, mod3, "default")); -var __publicField = (obj, key, value) => { - __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); - return value; -}; -var __accessCheck = (obj, member, msg) => { - if (!member.has(obj)) - throw TypeError("Cannot " + msg); -}; -var __privateGet = (obj, member, getter) => { - __accessCheck(obj, member, "read from private field"); - return getter ? getter.call(obj) : member.get(obj); -}; -var __privateAdd = (obj, member, value) => { - if (member.has(obj)) - throw TypeError("Cannot add the same private member more than once"); - member instanceof WeakSet ? member.add(obj) : member.set(obj, value); -}; -var __privateSet = (obj, member, value, setter) => { - __accessCheck(obj, member, "write to private field"); - setter ? setter.call(obj, value) : member.set(obj, value); - return value; -}; - -// src/util/util.ts -function log(...msg) { - const dt = new Date(); - const ts = `${dt.getHours().toString().padStart(2, "0")}:${dt.getMinutes().toString().padStart(2, "0")}:${dt.getSeconds().toString().padStart(2, "0")}.${dt.getMilliseconds().toString().padStart(3, "0")}`; - if (msg) - console.log(ts, "Human:", ...msg); -} -function join(folder, file) { - const separator = folder.endsWith("/") ? "" : "/"; - const skipJoin = file.startsWith(".") || file.startsWith("/") || file.startsWith("http:") || file.startsWith("https:") || file.startsWith("file:"); - const path = skipJoin ? `${file}` : `${folder}${separator}${file}`; - if (!path.toLocaleLowerCase().includes(".json")) - throw new Error(`modelpath error: expecting json file: ${path}`); - return path; -} -var now = () => { - if (typeof performance !== "undefined") - return performance.now(); - return parseInt((Number(process.hrtime.bigint()) / 1e3 / 1e3).toString()); -}; -function validate(defaults, config3, parent = "config", msgs = []) { - for (const key of Object.keys(config3)) { - if (typeof config3[key] === "object") { - validate(defaults[key], config3[key], key, msgs); - } else { - const defined = defaults && typeof defaults[key] !== "undefined"; - if (!defined) - msgs.push({ reason: "unknown property", where: `${parent}.${key} = ${config3[key]}` }); - const same = defaults && typeof defaults[key] === typeof config3[key]; - if (defined && !same) - msgs.push({ reason: "property type mismatch", where: `${parent}.${key} = ${config3[key]}`, expected: typeof defaults[key] }); - } - } - if (config3.debug && parent === "config" && msgs.length > 0) - log("invalid configuration", msgs); - return msgs; -} -function mergeDeep(...objects) { - const isObject = (obj) => obj && typeof obj === "object"; - return objects.reduce((prev, obj) => { - Object.keys(obj || {}).forEach((key) => { - const pVal = prev[key]; - const oVal = obj[key]; - if (Array.isArray(pVal) && Array.isArray(oVal)) - prev[key] = pVal.concat(...oVal); - else if (isObject(pVal) && isObject(oVal)) - prev[key] = mergeDeep(pVal, oVal); - else - prev[key] = oVal; - }); - return prev; - }, {}); -} - -// src/config.ts -var config = { - backend: "", - modelBasePath: "", - cacheModels: true, - validateModels: true, - wasmPath: "", - wasmPlatformFetch: false, - debug: false, - async: true, - warmup: "full", - cacheSensitivity: 0.7, - skipAllowed: false, - deallocate: false, - flags: {}, - softwareKernels: false, - filter: { - enabled: true, - equalization: false, - width: 0, - height: 0, - flip: false, - return: true, - brightness: 0, - contrast: 0, - sharpness: 0, - blur: 0, - saturation: 0, - hue: 0, - negative: false, - sepia: false, - vintage: false, - kodachrome: false, - technicolor: false, - polaroid: false, - pixelate: 0 - }, - gesture: { - enabled: true - }, - face: { - enabled: true, - detector: { - modelPath: "blazeface.json", - rotation: true, - maxDetected: 1, - skipFrames: 99, - skipTime: 2500, - minConfidence: 0.2, - iouThreshold: 0.1, - mask: false, - return: false - }, - mesh: { - enabled: true, - modelPath: "facemesh.json", - keepInvalid: false - }, - attention: { - enabled: false, - modelPath: "facemesh-attention.json" - }, - iris: { - enabled: true, - modelPath: "iris.json" - }, - emotion: { - enabled: true, - minConfidence: 0.1, - skipFrames: 99, - skipTime: 1500, - modelPath: "emotion.json" - }, - description: { - enabled: true, - modelPath: "faceres.json", - skipFrames: 99, - skipTime: 3e3, - minConfidence: 0.1 - }, - antispoof: { - enabled: false, - skipFrames: 99, - skipTime: 4e3, - modelPath: "antispoof.json" - }, - liveness: { - enabled: false, - skipFrames: 99, - skipTime: 4e3, - modelPath: "liveness.json" - } - }, - body: { - enabled: true, - modelPath: "movenet-lightning.json", - maxDetected: -1, - minConfidence: 0.3, - skipFrames: 1, - skipTime: 200 - }, - hand: { - enabled: true, - rotation: true, - skipFrames: 99, - skipTime: 1e3, - minConfidence: 0.5, - iouThreshold: 0.2, - maxDetected: -1, - landmarks: true, - detector: { - modelPath: "handtrack.json" - }, - skeleton: { - modelPath: "handlandmark-full.json" - } - }, - object: { - enabled: false, - modelPath: "mb3-centernet.json", - minConfidence: 0.2, - iouThreshold: 0.4, - maxDetected: 10, - skipFrames: 99, - skipTime: 2e3 - }, - segmentation: { - enabled: false, - modelPath: "rvm.json", - ratio: 0.5, - mode: "default" - } -}; - -// dist/tfjs.esm.js -var tfjs_esm_exports = {}; -__export(tfjs_esm_exports, { - GraphModel: () => GraphModel, - Tensor: () => Tensor, - version: () => version8 -}); -__reExport(tfjs_esm_exports, dist_star); -__reExport(tfjs_esm_exports, dist_star2); -import * as dist_star from "@tensorflow/tfjs/dist/index.js"; -import * as dist_star2 from "@tensorflow/tfjs-backend-webgl/dist/index.js"; -import { Tensor } from "@tensorflow/tfjs/dist/index.js"; -import { GraphModel } from "@tensorflow/tfjs-converter/dist/index"; -var version = "3.20.0"; -var version2 = "3.20.0"; -var version3 = "3.20.0"; -var version4 = "3.20.0"; -var version5 = "3.20.0"; -var version6 = "3.20.0"; -var version7 = "3.20.0"; -var version8 = { - tfjs: version, - "tfjs-core": version2, - "tfjs-data": version3, - "tfjs-layers": version4, - "tfjs-converter": version5, - "tfjs-backend-webgl": version6, - "tfjs-backend-wasm": version7 -}; - -// src/image/imagefxshaders.ts -var vertexIdentity = ` +var it=Object.defineProperty;var Yn=Object.getOwnPropertyDescriptor;var Kn=Object.getOwnPropertyNames;var Jn=Object.prototype.hasOwnProperty;var Qn=(e,t,n)=>t in e?it(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var te=(e,t)=>{for(var n in t)it(e,n,{get:t[n],enumerable:!0})},q5=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Kn(t))!Jn.call(e,s)&&s!==n&&it(e,s,{get:()=>t[s],enumerable:!(o=Yn(t,s))||o.enumerable});return e},q=(e,t,n)=>(q5(e,t,"default"),n&&q5(n,t,"default"));var k=(e,t,n)=>(Qn(e,typeof t!="symbol"?t+"":t,n),n),U5=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var V0=(e,t,n)=>(U5(e,t,"read from private field"),n?n.call(e):t.get(e)),je=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},$e=(e,t,n,o)=>(U5(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n);function b(...e){let t=new Date,n=`${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}:${t.getSeconds().toString().padStart(2,"0")}.${t.getMilliseconds().toString().padStart(3,"0")}`;e&&console.log(n,"Human:",...e)}function Y5(e,t){let n=e.endsWith("/")?"":"/",s=t.startsWith(".")||t.startsWith("/")||t.startsWith("http:")||t.startsWith("https:")||t.startsWith("file:")?`${t}`:`${e}${n}${t}`;if(!s.toLocaleLowerCase().includes(".json"))throw new Error(`modelpath error: expecting json file: ${s}`);return s}var T=()=>typeof performance!="undefined"?performance.now():parseInt((Number(process.hrtime.bigint())/1e3/1e3).toString());function lt(e,t,n="config",o=[]){for(let s of Object.keys(t))if(typeof t[s]=="object")lt(e[s],t[s],s,o);else{let A=e&&typeof e[s]!="undefined";A||o.push({reason:"unknown property",where:`${n}.${s} = ${t[s]}`});let a=e&&typeof e[s]==typeof t[s];A&&!a&&o.push({reason:"property type mismatch",where:`${n}.${s} = ${t[s]}`,expected:typeof e[s]})}return t.debug&&n==="config"&&o.length>0&&b("invalid configuration",o),o}function J(...e){let t=n=>n&&typeof n=="object";return e.reduce((n,o)=>(Object.keys(o||{}).forEach(s=>{let A=n[s],a=o[s];Array.isArray(A)&&Array.isArray(a)?n[s]=A.concat(...a):t(A)&&t(a)?n[s]=J(A,a):n[s]=a}),n),{})}var pe={backend:"",modelBasePath:"",cacheModels:!0,validateModels:!0,wasmPath:"",wasmPlatformFetch:!1,debug:!1,async:!0,warmup:"full",cacheSensitivity:.7,skipAllowed:!1,deallocate:!1,flags:{},softwareKernels:!1,filter:{enabled:!0,equalization:!1,width:0,height:0,flip:!1,return:!0,brightness:0,contrast:0,sharpness:0,blur:0,saturation:0,hue:0,negative:!1,sepia:!1,vintage:!1,kodachrome:!1,technicolor:!1,polaroid:!1,pixelate:0},gesture:{enabled:!0},face:{enabled:!0,detector:{modelPath:"blazeface.json",rotation:!0,maxDetected:1,skipFrames:99,skipTime:2500,minConfidence:.2,iouThreshold:.1,mask:!1,return:!1},mesh:{enabled:!0,modelPath:"facemesh.json",keepInvalid:!1},attention:{enabled:!1,modelPath:"facemesh-attention.json"},iris:{enabled:!0,modelPath:"iris.json"},emotion:{enabled:!0,minConfidence:.1,skipFrames:99,skipTime:1500,modelPath:"emotion.json"},description:{enabled:!0,modelPath:"faceres.json",skipFrames:99,skipTime:3e3,minConfidence:.1},antispoof:{enabled:!1,skipFrames:99,skipTime:4e3,modelPath:"antispoof.json"},liveness:{enabled:!1,skipFrames:99,skipTime:4e3,modelPath:"liveness.json"}},body:{enabled:!0,modelPath:"movenet-lightning.json",maxDetected:-1,minConfidence:.3,skipFrames:1,skipTime:200},hand:{enabled:!0,rotation:!0,skipFrames:99,skipTime:1e3,minConfidence:.5,iouThreshold:.2,maxDetected:-1,landmarks:!0,detector:{modelPath:"handtrack.json"},skeleton:{modelPath:"handlandmark-full.json"}},object:{enabled:!1,modelPath:"mb3-centernet.json",minConfidence:.2,iouThreshold:.4,maxDetected:10,skipFrames:99,skipTime:2e3},segmentation:{enabled:!1,modelPath:"rvm.json",ratio:.5,mode:"default"}};var r={};te(r,{GraphModel:()=>ct,Tensor:()=>Ne,version:()=>e2});q(r,bA);q(r,gA);import*as bA from"@tensorflow/tfjs/dist/index.js";import*as gA from"@tensorflow/tfjs-backend-webgl/dist/index.js";import{Tensor as Ne}from"@tensorflow/tfjs/dist/index.js";import{GraphModel as ct}from"@tensorflow/tfjs-converter/dist/index";var _n="3.21.0",$n="3.21.0",eo="3.21.0",to="3.21.0",no="3.21.0",oo="3.21.0",ro="3.21.0",e2={tfjs:_n,"tfjs-core":$n,"tfjs-data":eo,"tfjs-layers":to,"tfjs-converter":no,"tfjs-backend-webgl":oo,"tfjs-backend-wasm":ro};var K5=` precision highp float; attribute vec2 pos; attribute vec2 uv; @@ -274,8 +14,7 @@ var vertexIdentity = ` vUv = uv; gl_Position = vec4(pos.x, pos.y*flipY, 0.0, 1.); } -`; -var colorMatrixWithAlpha = ` +`;var J5=` precision highp float; varying vec2 vUv; uniform sampler2D texture; @@ -287,8 +26,7 @@ var colorMatrixWithAlpha = ` gl_FragColor.b = m[10] * c.r + m[11] * c.g + m[12] * c.b + m[13] * c.a + m[14]; gl_FragColor.a = m[15] * c.r + m[16] * c.g + m[17] * c.b + m[18] * c.a + m[19]; } -`; -var colorMatrixWithoutAlpha = ` +`,Q5=` precision highp float; varying vec2 vUv; uniform sampler2D texture; @@ -300,8 +38,7 @@ var colorMatrixWithoutAlpha = ` gl_FragColor.b = m[10] * c.r + m[11] * c.g + m[12] * c.b + m[14]; gl_FragColor.a = c.a; } -`; -var pixelate = ` +`,_5=` precision highp float; varying vec2 vUv; uniform vec2 size; @@ -314,8 +51,7 @@ var pixelate = ` vec2 coord = pixelate(vUv, size); gl_FragColor += texture2D(texture, coord); } -`; -var blur = ` +`,$5=` precision highp float; varying vec2 vUv; uniform sampler2D texture; @@ -338,8 +74,7 @@ var blur = ` gl_FragColor += texture2D(texture, vUv + vec2( 6.0*px.x, 6.0*px.y))*0.00895781211794; gl_FragColor += texture2D(texture, vUv + vec2( 7.0*px.x, 7.0*px.y))*0.0044299121055113265; } -`; -var convolution = ` +`,e1=` precision highp float; varying vec2 vUv; uniform sampler2D texture; @@ -361,13394 +96,19 @@ var convolution = ` c31 * m[6] + c32 * m[7] + c33 * m[8]; gl_FragColor.a = c22.a; } -`; - -// src/image/imagefx.ts -var collect = (source, prefix, collection) => { - const r = new RegExp("\\b" + prefix + " \\w+ (\\w+)", "ig"); - source.replace(r, (match3, name) => { - collection[name] = 0; - return match3; - }); -}; -var GLProgram = class { - constructor(gl, vertexSource, fragmentSource) { - __publicField(this, "uniform", {}); - __publicField(this, "attribute", {}); - __publicField(this, "gl"); - __publicField(this, "id"); - __publicField(this, "compile", (source, type) => { - const shader = this.gl.createShader(type); - if (!shader) { - log("filter: could not create shader"); - return null; - } - this.gl.shaderSource(shader, source); - this.gl.compileShader(shader); - if (!this.gl.getShaderParameter(shader, this.gl.COMPILE_STATUS)) { - log(`filter: gl compile failed: ${this.gl.getShaderInfoLog(shader) || "unknown"}`); - return null; - } - return shader; - }); - this.gl = gl; - const vertexShader = this.compile(vertexSource, this.gl.VERTEX_SHADER); - const fragmentShader = this.compile(fragmentSource, this.gl.FRAGMENT_SHADER); - this.id = this.gl.createProgram(); - if (!vertexShader || !fragmentShader) - return; - if (!this.id) { - log("filter: could not create webgl program"); - return; - } - this.gl.attachShader(this.id, vertexShader); - this.gl.attachShader(this.id, fragmentShader); - this.gl.linkProgram(this.id); - if (!this.gl.getProgramParameter(this.id, this.gl.LINK_STATUS)) { - log(`filter: gl link failed: ${this.gl.getProgramInfoLog(this.id) || "unknown"}`); - return; - } - this.gl.useProgram(this.id); - collect(vertexSource, "attribute", this.attribute); - for (const a in this.attribute) - this.attribute[a] = this.gl.getAttribLocation(this.id, a); - collect(vertexSource, "uniform", this.uniform); - collect(fragmentSource, "uniform", this.uniform); - for (const u in this.uniform) - this.uniform[u] = this.gl.getUniformLocation(this.id, u); - } -}; -function GLImageFilter() { - let drawCount = 0; - let sourceTexture = null; - let lastInChain = false; - let currentFramebufferIndex = -1; - let tempFramebuffers = [null, null]; - let filterChain = []; - let vertexBuffer = null; - let currentProgram = null; - const fxcanvas = canvas(100, 100); - const shaderProgramCache = {}; - const DRAW = { INTERMEDIATE: 1 }; - const gl = fxcanvas.getContext("webgl"); - if (!gl) { - log("filter: cannot get webgl context"); - return; - } - this.gl = gl; - function resize(width, height) { - if (width === fxcanvas.width && height === fxcanvas.height) - return; - fxcanvas.width = width; - fxcanvas.height = height; - if (!vertexBuffer) { - const vertices = new Float32Array([-1, -1, 0, 1, 1, -1, 1, 1, -1, 1, 0, 0, -1, 1, 0, 0, 1, -1, 1, 1, 1, 1, 1, 0]); - vertexBuffer = gl.createBuffer(); - gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer); - gl.bufferData(gl.ARRAY_BUFFER, vertices, gl.STATIC_DRAW); - gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true); - } - gl.viewport(0, 0, fxcanvas.width, fxcanvas.height); - tempFramebuffers = [null, null]; - } - function createFramebufferTexture(width, height) { - const fbo = gl.createFramebuffer(); - gl.bindFramebuffer(gl.FRAMEBUFFER, fbo); - const renderbuffer = gl.createRenderbuffer(); - gl.bindRenderbuffer(gl.RENDERBUFFER, renderbuffer); - const texture = gl.createTexture(); - gl.bindTexture(gl.TEXTURE_2D, texture); - gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE); - gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0); - gl.bindTexture(gl.TEXTURE_2D, null); - gl.bindFramebuffer(gl.FRAMEBUFFER, null); - return { fbo, texture }; - } - function getTempFramebuffer(index2) { - tempFramebuffers[index2] = tempFramebuffers[index2] || createFramebufferTexture(fxcanvas.width, fxcanvas.height); - return tempFramebuffers[index2]; - } - function draw(flags = 0) { - if (!currentProgram) - return; - let source = null; - let target = null; - let flipY = false; - if (drawCount === 0) - source = sourceTexture; - else - source = getTempFramebuffer(currentFramebufferIndex).texture || null; - drawCount++; - if (lastInChain && !(flags & DRAW.INTERMEDIATE)) { - target = null; - flipY = drawCount % 2 === 0; - } else { - currentFramebufferIndex = (currentFramebufferIndex + 1) % 2; - target = getTempFramebuffer(currentFramebufferIndex).fbo || null; - } - gl.bindTexture(gl.TEXTURE_2D, source); - gl.bindFramebuffer(gl.FRAMEBUFFER, target); - gl.uniform1f(currentProgram.uniform["flipY"], flipY ? -1 : 1); - gl.drawArrays(gl.TRIANGLES, 0, 6); - } - function compileShader(fragmentSource) { - if (shaderProgramCache[fragmentSource]) { - currentProgram = shaderProgramCache[fragmentSource]; - gl.useProgram((currentProgram ? currentProgram.id : null) || null); - return currentProgram; - } - currentProgram = new GLProgram(gl, vertexIdentity, fragmentSource); - if (!currentProgram) { - log("filter: could not get webgl program"); - return null; - } - const floatSize = Float32Array.BYTES_PER_ELEMENT; - const vertSize = 4 * floatSize; - gl.enableVertexAttribArray(currentProgram.attribute["pos"]); - gl.vertexAttribPointer(currentProgram.attribute["pos"], 2, gl.FLOAT, false, vertSize, 0 * floatSize); - gl.enableVertexAttribArray(currentProgram.attribute["uv"]); - gl.vertexAttribPointer(currentProgram.attribute["uv"], 2, gl.FLOAT, false, vertSize, 2 * floatSize); - shaderProgramCache[fragmentSource] = currentProgram; - return currentProgram; - } - const filter = { - colorMatrix: (matrix) => { - const m = new Float32Array(matrix); - m[4] /= 255; - m[9] /= 255; - m[14] /= 255; - m[19] /= 255; - const shader = m[18] === 1 && m[3] === 0 && m[8] === 0 && m[13] === 0 && m[15] === 0 && m[16] === 0 && m[17] === 0 && m[19] === 0 ? colorMatrixWithoutAlpha : colorMatrixWithAlpha; - const program = compileShader(shader); - if (!program) - return; - gl.uniform1fv(program.uniform["m"], m); - draw(); - }, - brightness: (brightness) => { - const b = (brightness || 0) + 1; - filter.colorMatrix([ - b, - 0, - 0, - 0, - 0, - 0, - b, - 0, - 0, - 0, - 0, - 0, - b, - 0, - 0, - 0, - 0, - 0, - 1, - 0 - ]); - }, - saturation: (amount) => { - const x = (amount || 0) * 2 / 3 + 1; - const y = (x - 1) * -0.5; - filter.colorMatrix([ - x, - y, - y, - 0, - 0, - y, - x, - y, - 0, - 0, - y, - y, - x, - 0, - 0, - 0, - 0, - 0, - 1, - 0 - ]); - }, - desaturate: () => { - filter.saturation(-1); - }, - contrast: (amount) => { - const v = (amount || 0) + 1; - const o = -128 * (v - 1); - filter.colorMatrix([ - v, - 0, - 0, - 0, - o, - 0, - v, - 0, - 0, - o, - 0, - 0, - v, - 0, - o, - 0, - 0, - 0, - 1, - 0 - ]); - }, - negative: () => { - filter.contrast(-2); - }, - hue: (rotation) => { - rotation = (rotation || 0) / 180 * Math.PI; - const cos = Math.cos(rotation); - const sin = Math.sin(rotation); - const lumR = 0.213; - const lumG = 0.715; - const lumB = 0.072; - filter.colorMatrix([ - lumR + cos * (1 - lumR) + sin * -lumR, - lumG + cos * -lumG + sin * -lumG, - lumB + cos * -lumB + sin * (1 - lumB), - 0, - 0, - lumR + cos * -lumR + sin * 0.143, - lumG + cos * (1 - lumG) + sin * 0.14, - lumB + cos * -lumB + sin * -0.283, - 0, - 0, - lumR + cos * -lumR + sin * -(1 - lumR), - lumG + cos * -lumG + sin * lumG, - lumB + cos * (1 - lumB) + sin * lumB, - 0, - 0, - 0, - 0, - 0, - 1, - 0 - ]); - }, - desaturateLuminance: () => { - filter.colorMatrix([ - 0.2764723, - 0.929708, - 0.0938197, - 0, - -37.1, - 0.2764723, - 0.929708, - 0.0938197, - 0, - -37.1, - 0.2764723, - 0.929708, - 0.0938197, - 0, - -37.1, - 0, - 0, - 0, - 1, - 0 - ]); - }, - sepia: () => { - filter.colorMatrix([ - 0.393, - 0.7689999, - 0.18899999, - 0, - 0, - 0.349, - 0.6859999, - 0.16799999, - 0, - 0, - 0.272, - 0.5339999, - 0.13099999, - 0, - 0, - 0, - 0, - 0, - 1, - 0 - ]); - }, - brownie: () => { - filter.colorMatrix([ - 0.5997023498159715, - 0.34553243048391263, - -0.2708298674538042, - 0, - 47.43192855600873, - -0.037703249837783157, - 0.8609577587992641, - 0.15059552388459913, - 0, - -36.96841498319127, - 0.24113635128153335, - -0.07441037908422492, - 0.44972182064877153, - 0, - -7.562075277591283, - 0, - 0, - 0, - 1, - 0 - ]); - }, - vintagePinhole: () => { - filter.colorMatrix([ - 0.6279345635605994, - 0.3202183420819367, - -0.03965408211312453, - 0, - 9.651285835294123, - 0.02578397704808868, - 0.6441188644374771, - 0.03259127616149294, - 0, - 7.462829176470591, - 0.0466055556782719, - -0.0851232987247891, - 0.5241648018700465, - 0, - 5.159190588235296, - 0, - 0, - 0, - 1, - 0 - ]); - }, - kodachrome: () => { - filter.colorMatrix([ - 1.1285582396593525, - -0.3967382283601348, - -0.03992559172921793, - 0, - 63.72958762196502, - -0.16404339962244616, - 1.0835251566291304, - -0.05498805115633132, - 0, - 24.732407896706203, - -0.16786010706155763, - -0.5603416277695248, - 1.6014850761964943, - 0, - 35.62982807460946, - 0, - 0, - 0, - 1, - 0 - ]); - }, - technicolor: () => { - filter.colorMatrix([ - 1.9125277891456083, - -0.8545344976951645, - -0.09155508482755585, - 0, - 11.793603434377337, - -0.3087833385928097, - 1.7658908555458428, - -0.10601743074722245, - 0, - -70.35205161461398, - -0.231103377548616, - -0.7501899197440212, - 1.847597816108189, - 0, - 30.950940869491138, - 0, - 0, - 0, - 1, - 0 - ]); - }, - polaroid: () => { - filter.colorMatrix([ - 1.438, - -0.062, - -0.062, - 0, - 0, - -0.122, - 1.378, - -0.122, - 0, - 0, - -0.016, - -0.016, - 1.483, - 0, - 0, - 0, - 0, - 0, - 1, - 0 - ]); - }, - shiftToBGR: () => { - filter.colorMatrix([ - 0, - 0, - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 0 - ]); - }, - convolution: (matrix) => { - const m = new Float32Array(matrix); - const pixelSizeX = 1 / fxcanvas.width; - const pixelSizeY = 1 / fxcanvas.height; - const program = compileShader(convolution); - if (!program) - return; - gl.uniform1fv(program.uniform["m"], m); - gl.uniform2f(program.uniform["px"], pixelSizeX, pixelSizeY); - draw(); - }, - detectEdges: () => { - filter.convolution.call(this, [ - 0, - 1, - 0, - 1, - -4, - 1, - 0, - 1, - 0 - ]); - }, - sobelX: () => { - filter.convolution.call(this, [ - -1, - 0, - 1, - -2, - 0, - 2, - -1, - 0, - 1 - ]); - }, - sobelY: () => { - filter.convolution.call(this, [ - -1, - -2, - -1, - 0, - 0, - 0, - 1, - 2, - 1 - ]); - }, - sharpen: (amount) => { - const a = amount || 1; - filter.convolution.call(this, [ - 0, - -1 * a, - 0, - -1 * a, - 1 + 4 * a, - -1 * a, - 0, - -1 * a, - 0 - ]); - }, - emboss: (size2) => { - const s = size2 || 1; - filter.convolution.call(this, [ - -2 * s, - -1 * s, - 0, - -1 * s, - 1, - 1 * s, - 0, - 1 * s, - 2 * s - ]); - }, - blur: (size2) => { - const blurSizeX = size2 / 7 / fxcanvas.width; - const blurSizeY = size2 / 7 / fxcanvas.height; - const program = compileShader(blur); - if (!program) - return; - gl.uniform2f(program.uniform["px"], 0, blurSizeY); - draw(DRAW.INTERMEDIATE); - gl.uniform2f(program.uniform["px"], blurSizeX, 0); - draw(); - }, - pixelate: (size2) => { - const blurSizeX = size2 / fxcanvas.width; - const blurSizeY = size2 / fxcanvas.height; - const program = compileShader(pixelate); - if (!program) - return; - gl.uniform2f(program.uniform["size"], blurSizeX, blurSizeY); - draw(); - } - }; - this.add = function(name) { - const args = Array.prototype.slice.call(arguments, 1); - const func = filter[name]; - filterChain.push({ func, args }); - }; - this.reset = function() { - filterChain = []; - }; - this.get = function() { - return filterChain; - }; - this.apply = function(image27) { - resize(image27.width, image27.height); - drawCount = 0; - if (!sourceTexture) - sourceTexture = gl.createTexture(); - gl.bindTexture(gl.TEXTURE_2D, sourceTexture); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST); - gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image27); - for (let i = 0; i < filterChain.length; i++) { - lastInChain = i === filterChain.length - 1; - const f = filterChain[i]; - f.func.apply(this, f.args || []); - } - return fxcanvas; - }; - this.draw = function(image27) { - this.add("brightness", 0); - return this.apply(image27); - }; -} - -// src/image/enhance.ts -async function histogramEqualization(inputImage) { - const squeeze14 = inputImage.shape.length === 4 ? tfjs_esm_exports.squeeze(inputImage) : inputImage; - const channels = tfjs_esm_exports.split(squeeze14, 3, 2); - const min2 = [tfjs_esm_exports.min(channels[0]), tfjs_esm_exports.min(channels[1]), tfjs_esm_exports.min(channels[2])]; - const max4 = [tfjs_esm_exports.max(channels[0]), tfjs_esm_exports.max(channels[1]), tfjs_esm_exports.max(channels[2])]; - const absMax = await Promise.all(max4.map((channel) => channel.data())); - const maxValue = 0.99 * Math.max(absMax[0][0], absMax[1][0], absMax[2][0]); - const sub11 = [tfjs_esm_exports.sub(channels[0], min2[0]), tfjs_esm_exports.sub(channels[1], min2[1]), tfjs_esm_exports.sub(channels[2], min2[2])]; - const range = [tfjs_esm_exports.sub(max4[0], min2[0]), tfjs_esm_exports.sub(max4[1], min2[1]), tfjs_esm_exports.sub(max4[2], min2[2])]; - const fact = [tfjs_esm_exports.div(maxValue, range[0]), tfjs_esm_exports.div(maxValue, range[1]), tfjs_esm_exports.div(maxValue, range[2])]; - const enh = [tfjs_esm_exports.mul(sub11[0], fact[0]), tfjs_esm_exports.mul(sub11[1], fact[1]), tfjs_esm_exports.mul(sub11[2], fact[2])]; - const rgb2 = tfjs_esm_exports.stack([enh[0], enh[1], enh[2]], 2); - const reshape8 = tfjs_esm_exports.reshape(rgb2, [1, squeeze14.shape[0], squeeze14.shape[1], 3]); - tfjs_esm_exports.dispose([...channels, ...min2, ...max4, ...sub11, ...range, ...fact, ...enh, rgb2, squeeze14]); - return reshape8; -} - -// src/image/image.ts -var maxSize = 3840; -var inCanvas = null; -var outCanvas = null; -var tmpCanvas = null; -var fx; -var last = { - inputSum: 0, - cacheDiff: 1, - sumMethod: 0, - inputTensor: void 0 -}; -function reset() { - last.inputSum = 0; - last.cacheDiff = 1; - last.sumMethod = 0; - last.inputTensor = void 0; -} -function canvas(width, height) { - let c; - if (env.browser) { - if (env.worker) { - if (typeof OffscreenCanvas === "undefined") - throw new Error("canvas error: attempted to run in web worker but OffscreenCanvas is not supported"); - c = new OffscreenCanvas(width, height); - } else { - if (typeof document === "undefined") - throw new Error("canvas error: attempted to run in browser but DOM is not defined"); - c = document.createElement("canvas"); - c.width = width; - c.height = height; - } - } else { - if (typeof env.Canvas !== "undefined") - c = new env.Canvas(width, height); - else if (typeof globalThis.Canvas !== "undefined") - c = new globalThis.Canvas(width, height); - } - return c; -} -function copy(input, output) { - const outputCanvas = output || canvas(input.width, input.height); - const ctx = outputCanvas.getContext("2d"); - ctx.drawImage(input, 0, 0); - return outputCanvas; -} -async function process2(input, config3, getTensor = true) { - var _a, _b; - if (!input) { - if (config3.debug) - log("input error: input is missing"); - return { tensor: null, canvas: null }; - } - if (!(input instanceof Tensor) && !(typeof Image !== "undefined" && input instanceof Image) && !(typeof env.Canvas !== "undefined" && input instanceof env.Canvas) && !(typeof globalThis.Canvas !== "undefined" && input instanceof globalThis.Canvas) && !(typeof ImageData !== "undefined" && input instanceof ImageData) && !(typeof ImageBitmap !== "undefined" && input instanceof ImageBitmap) && !(typeof HTMLImageElement !== "undefined" && input instanceof HTMLImageElement) && !(typeof HTMLMediaElement !== "undefined" && input instanceof HTMLMediaElement) && !(typeof HTMLVideoElement !== "undefined" && input instanceof HTMLVideoElement) && !(typeof HTMLCanvasElement !== "undefined" && input instanceof HTMLCanvasElement) && !(typeof OffscreenCanvas !== "undefined" && input instanceof OffscreenCanvas)) { - throw new Error("input error: type is not recognized"); - } - if (input instanceof Tensor) { - let tensor7 = null; - if (input["isDisposedInternal"]) - throw new Error("input error: attempted to use tensor but it is disposed"); - if (!input.shape) - throw new Error("input error: attempted to use tensor without a shape"); - if (input.shape.length === 3) { - if (input.shape[2] === 3) { - tensor7 = tfjs_esm_exports.expandDims(input, 0); - } else if (input.shape[2] === 4) { - const rgb2 = tfjs_esm_exports.slice3d(input, [0, 0, 0], [-1, -1, 3]); - tensor7 = tfjs_esm_exports.expandDims(rgb2, 0); - tfjs_esm_exports.dispose(rgb2); - } - } else if (input.shape.length === 4) { - if (input.shape[3] === 3) { - tensor7 = tfjs_esm_exports.clone(input); - } else if (input.shape[3] === 4) { - tensor7 = tfjs_esm_exports.slice4d(input, [0, 0, 0, 0], [-1, -1, -1, 3]); - } - } - if (tensor7 == null || tensor7.shape.length !== 4 || tensor7.shape[0] !== 1 || tensor7.shape[3] !== 3) - throw new Error(`input error: attempted to use tensor with unrecognized shape: ${input.shape.toString()}`); - if (tensor7.dtype === "int32") { - const cast8 = tfjs_esm_exports.cast(tensor7, "float32"); - tfjs_esm_exports.dispose(tensor7); - tensor7 = cast8; - } - return { tensor: tensor7, canvas: config3.filter.return ? outCanvas : null }; - } - if (typeof input["readyState"] !== "undefined" && input.readyState <= 2) { - if (config3.debug) - log("input stream is not ready"); - return { tensor: null, canvas: inCanvas }; - } - const originalWidth = input["naturalWidth"] || input["videoWidth"] || input["width"] || input["shape"] && input["shape"][1] > 0; - const originalHeight = input["naturalHeight"] || input["videoHeight"] || input["height"] || input["shape"] && input["shape"][2] > 0; - if (!originalWidth || !originalHeight) { - if (config3.debug) - log("cannot determine input dimensions"); - return { tensor: null, canvas: inCanvas }; - } - let targetWidth = originalWidth; - let targetHeight = originalHeight; - if (targetWidth > maxSize) { - targetWidth = maxSize; - targetHeight = Math.trunc(targetWidth * originalHeight / originalWidth); - } - if (targetHeight > maxSize) { - targetHeight = maxSize; - targetWidth = Math.trunc(targetHeight * originalWidth / originalHeight); - } - if ((((_a = config3.filter) == null ? void 0 : _a.width) || 0) > 0) - targetWidth = config3.filter.width; - else if ((((_b = config3.filter) == null ? void 0 : _b.height) || 0) > 0) - targetWidth = originalWidth * ((config3.filter.height || 0) / originalHeight); - if ((config3.filter.height || 0) > 0) - targetHeight = config3.filter.height; - else if ((config3.filter.width || 0) > 0) - targetHeight = originalHeight * ((config3.filter.width || 0) / originalWidth); - if (!targetWidth || !targetHeight) - throw new Error("input error: cannot determine dimension"); - if (!inCanvas || inCanvas.width !== targetWidth || inCanvas.height !== targetHeight) - inCanvas = canvas(targetWidth, targetHeight); - const inCtx = inCanvas.getContext("2d"); - if (typeof ImageData !== "undefined" && input instanceof ImageData) { - inCtx.putImageData(input, 0, 0); - } else { - if (config3.filter.flip && typeof inCtx.translate !== "undefined") { - inCtx.translate(originalWidth, 0); - inCtx.scale(-1, 1); - inCtx.drawImage(input, 0, 0, originalWidth, originalHeight, 0, 0, inCanvas.width, inCanvas.height); - inCtx.setTransform(1, 0, 0, 1, 0, 0); - } else { - inCtx.drawImage(input, 0, 0, originalWidth, originalHeight, 0, 0, inCanvas.width, inCanvas.height); - } - } - if (!outCanvas || inCanvas.width !== outCanvas.width || inCanvas.height !== outCanvas.height) - outCanvas = canvas(inCanvas.width, inCanvas.height); - if (config3.filter.enabled && env.webgl.supported) { - if (!fx) - fx = env.browser ? new GLImageFilter() : null; - env.filter = !!fx; - if (!(fx == null ? void 0 : fx.add)) { - if (config3.debug) - log("input process error: cannot initialize filters"); - env.webgl.supported = false; - config3.filter.enabled = false; - copy(inCanvas, outCanvas); - } else { - fx.reset(); - if (config3.filter.brightness !== 0) - fx.add("brightness", config3.filter.brightness); - if (config3.filter.contrast !== 0) - fx.add("contrast", config3.filter.contrast); - if (config3.filter.sharpness !== 0) - fx.add("sharpen", config3.filter.sharpness); - if (config3.filter.blur !== 0) - fx.add("blur", config3.filter.blur); - if (config3.filter.saturation !== 0) - fx.add("saturation", config3.filter.saturation); - if (config3.filter.hue !== 0) - fx.add("hue", config3.filter.hue); - if (config3.filter.negative) - fx.add("negative"); - if (config3.filter.sepia) - fx.add("sepia"); - if (config3.filter.vintage) - fx.add("brownie"); - if (config3.filter.sepia) - fx.add("sepia"); - if (config3.filter.kodachrome) - fx.add("kodachrome"); - if (config3.filter.technicolor) - fx.add("technicolor"); - if (config3.filter.polaroid) - fx.add("polaroid"); - if (config3.filter.pixelate !== 0) - fx.add("pixelate", config3.filter.pixelate); - if (fx.get() > 0) - outCanvas = fx.apply(inCanvas); - else - outCanvas = fx.draw(inCanvas); - } - } else { - copy(inCanvas, outCanvas); - if (fx) - fx = null; - env.filter = !!fx; - } - if (!getTensor) - return { tensor: null, canvas: outCanvas }; - if (!outCanvas) - throw new Error("canvas error: cannot create output"); - let pixels; - let depth = 3; - if (typeof ImageData !== "undefined" && input instanceof ImageData || input.data && input.width && input.height) { - if (env.browser && tfjs_esm_exports.browser) { - pixels = tfjs_esm_exports.browser ? tfjs_esm_exports.browser.fromPixels(input) : null; - } else { - depth = input.data.length / input.height / input.width; - const arr = new Uint8Array(input.data.buffer); - pixels = tfjs_esm_exports.tensor(arr, [input.height, input.width, depth], "int32"); - } - } else { - if (!tmpCanvas || outCanvas.width !== tmpCanvas.width || outCanvas.height !== tmpCanvas.height) - tmpCanvas = canvas(outCanvas.width, outCanvas.height); - if (tfjs_esm_exports.browser && env.browser) { - if (config3.backend === "webgl" || config3.backend === "humangl" || config3.backend === "webgpu") { - pixels = tfjs_esm_exports.browser.fromPixels(outCanvas); - } else { - tmpCanvas = copy(outCanvas); - pixels = tfjs_esm_exports.browser.fromPixels(tmpCanvas); - } - } else { - const tempCanvas = copy(outCanvas); - const tempCtx = tempCanvas.getContext("2d"); - const tempData = tempCtx.getImageData(0, 0, targetWidth, targetHeight); - depth = tempData.data.length / targetWidth / targetHeight; - const arr = new Uint8Array(tempData.data.buffer); - pixels = tfjs_esm_exports.tensor(arr, [targetWidth, targetHeight, depth]); - } - } - if (depth === 4) { - const rgb2 = tfjs_esm_exports.slice3d(pixels, [0, 0, 0], [-1, -1, 3]); - tfjs_esm_exports.dispose(pixels); - pixels = rgb2; - } - if (!pixels) - throw new Error("input error: cannot create tensor"); - const casted = tfjs_esm_exports.cast(pixels, "float32"); - const tensor6 = config3.filter.equalization ? await histogramEqualization(casted) : tfjs_esm_exports.expandDims(casted, 0); - tfjs_esm_exports.dispose([pixels, casted]); - return { tensor: tensor6, canvas: config3.filter.return ? outCanvas : null }; -} -async function skip(config3, input) { - let skipFrame = false; - if (config3.cacheSensitivity === 0 || !input.shape || input.shape.length !== 4 || input.shape[1] > 2048 || input.shape[2] > 2048) - return skipFrame; - if (!last.inputTensor) { - last.inputTensor = tfjs_esm_exports.clone(input); - } else if (last.inputTensor.shape[1] !== input.shape[1] || last.inputTensor.shape[2] !== input.shape[2]) { - tfjs_esm_exports.dispose(last.inputTensor); - last.inputTensor = tfjs_esm_exports.clone(input); - } else { - const t2 = {}; - t2.diff = tfjs_esm_exports.sub(input, last.inputTensor); - t2.squared = tfjs_esm_exports.mul(t2.diff, t2.diff); - t2.sum = tfjs_esm_exports.sum(t2.squared); - const diffSum = await t2.sum.data(); - const diffRelative = diffSum[0] / (input.shape[1] || 1) / (input.shape[2] || 1) / 255 / 3; - tfjs_esm_exports.dispose([last.inputTensor, t2.diff, t2.squared, t2.sum]); - last.inputTensor = tfjs_esm_exports.clone(input); - skipFrame = diffRelative <= (config3.cacheSensitivity || 0); - } - return skipFrame; -} -async function compare(config3, input1, input2) { - const t2 = {}; - if (!input1 || !input2 || input1.shape.length !== 4 || input1.shape.length !== input2.shape.length) { - if (!config3.debug) - log("invalid input tensor or tensor shapes do not match:", input1.shape, input2.shape); - return 0; - } - if (input1.shape[0] !== 1 || input2.shape[0] !== 1 || input1.shape[3] !== 3 || input2.shape[3] !== 3) { - if (!config3.debug) - log("input tensors must be of shape [1, height, width, 3]:", input1.shape, input2.shape); - return 0; - } - t2.input1 = tfjs_esm_exports.clone(input1); - t2.input2 = input1.shape[1] !== input2.shape[1] || input1.shape[2] !== input2.shape[2] ? tfjs_esm_exports.image.resizeBilinear(input2, [input1.shape[1], input1.shape[2]]) : tfjs_esm_exports.clone(input2); - t2.diff = tfjs_esm_exports.sub(t2.input1, t2.input2); - t2.squared = tfjs_esm_exports.mul(t2.diff, t2.diff); - t2.sum = tfjs_esm_exports.sum(t2.squared); - const diffSum = await t2.sum.data(); - const diffRelative = diffSum[0] / (input1.shape[1] || 1) / (input1.shape[2] || 1) / 255 / 3; - tfjs_esm_exports.dispose([t2.input1, t2.input2, t2.diff, t2.squared, t2.sum]); - return diffRelative; -} - -// src/util/env.ts -var Env = class { - constructor() { - __publicField(this, "browser"); - __publicField(this, "node"); - __publicField(this, "worker"); - __publicField(this, "platform", ""); - __publicField(this, "agent", ""); - __publicField(this, "backends", []); - __publicField(this, "initial"); - __publicField(this, "filter"); - __publicField(this, "tfjs"); - __publicField(this, "offscreen"); - __publicField(this, "perfadd", false); - __publicField(this, "tensorflow", { - version: void 0, - gpu: void 0 - }); - __publicField(this, "wasm", { - supported: void 0, - backend: void 0, - simd: void 0, - multithread: void 0 - }); - __publicField(this, "webgl", { - supported: void 0, - backend: void 0, - version: void 0, - renderer: void 0 - }); - __publicField(this, "webgpu", { - supported: void 0, - backend: void 0, - adapter: void 0 - }); - __publicField(this, "cpu", { - model: void 0, - flags: [] - }); - __publicField(this, "kernels", []); - __publicField(this, "Canvas"); - __publicField(this, "Image"); - __publicField(this, "ImageData"); - this.browser = typeof navigator !== "undefined"; - this.node = typeof process !== "undefined" && typeof process.versions !== "undefined" && typeof process.versions.node !== "undefined"; - this.tfjs = { version: version8["tfjs-core"] }; - this.offscreen = typeof OffscreenCanvas !== "undefined"; - this.initial = true; - this.worker = this.browser && this.offscreen ? typeof WorkerGlobalScope !== "undefined" : void 0; - if (typeof navigator !== "undefined") { - const raw = navigator.userAgent.match(/\(([^()]+)\)/g); - if (raw == null ? void 0 : raw[0]) { - const platformMatch = raw[0].match(/\(([^()]+)\)/g); - this.platform = (platformMatch == null ? void 0 : platformMatch[0]) ? platformMatch[0].replace(/\(|\)/g, "") : ""; - this.agent = navigator.userAgent.replace(raw[0], ""); - if (this.platform[1]) - this.agent = this.agent.replace(raw[1], ""); - this.agent = this.agent.replace(/ /g, " "); - } - } else if (typeof process !== "undefined") { - this.platform = `${process.platform} ${process.arch}`; - this.agent = `NodeJS ${process.version}`; - } - } - async updateBackend() { - this.backends = Object.keys(tfjs_esm_exports.engine().registryFactory); - this.tensorflow = { - version: tfjs_esm_exports.backend().binding ? tfjs_esm_exports.backend().binding.TF_Version : void 0, - gpu: tfjs_esm_exports.backend().binding ? tfjs_esm_exports.backend().binding.isUsingGpuDevice() : void 0 - }; - this.wasm.supported = typeof WebAssembly !== "undefined"; - this.wasm.backend = this.backends.includes("wasm"); - if (this.wasm.supported && this.wasm.backend && tfjs_esm_exports.getBackend() === "wasm") { - this.wasm.simd = tfjs_esm_exports.env().get("WASM_HAS_SIMD_SUPPORT"); - this.wasm.multithread = tfjs_esm_exports.env().get("WASM_HAS_MULTITHREAD_SUPPORT"); - } - const c = canvas(100, 100); - const ctx = c ? c.getContext("webgl2") : void 0; - this.webgl.supported = typeof ctx !== "undefined"; - this.webgl.backend = this.backends.includes("webgl"); - if (this.webgl.supported && this.webgl.backend && (tfjs_esm_exports.getBackend() === "webgl" || tfjs_esm_exports.getBackend() === "humangl")) { - const gl = tfjs_esm_exports.backend().gpgpu !== "undefined" ? await tfjs_esm_exports.backend().getGPGPUContext().gl : null; - if (gl) { - this.webgl.version = gl.getParameter(gl.VERSION); - this.webgl.renderer = gl.getParameter(gl.RENDERER); - } - } - this.webgpu.supported = this.browser && typeof navigator.gpu !== "undefined"; - this.webgpu.backend = this.backends.includes("webgpu"); - try { - if (this.webgpu.supported) { - const adapter = await navigator.gpu.requestAdapter(); - this.webgpu.adapter = adapter ? adapter.name : void 0; - } - } catch (e) { - this.webgpu.supported = false; - } - try { - this.kernels = tfjs_esm_exports.getKernelsForBackend(tfjs_esm_exports.getBackend()).map((kernel) => kernel.kernelName.toLowerCase()); - } catch (e) { - } - } - updateCPU() { - const cpu = { model: "", flags: [] }; - if (this.node && this.platform.startsWith("linux")) { - } - if (!this.cpu) - Object.defineProperty(this, "cpu", { value: cpu }); - else - this.cpu = cpu; - } -}; -var env = new Env(); - -// src/util/webcam.ts -var WebCam = class { - constructor() { - __publicField(this, "config"); - __publicField(this, "element"); - __publicField(this, "stream"); - __publicField(this, "start", async (webcamConfig) => { - if (webcamConfig == null ? void 0 : webcamConfig.debug) - this.config.debug = webcamConfig == null ? void 0 : webcamConfig.debug; - if (webcamConfig == null ? void 0 : webcamConfig.crop) - this.config.crop = webcamConfig == null ? void 0 : webcamConfig.crop; - if (webcamConfig == null ? void 0 : webcamConfig.mode) - this.config.mode = webcamConfig == null ? void 0 : webcamConfig.mode; - if (webcamConfig == null ? void 0 : webcamConfig.width) - this.config.width = webcamConfig == null ? void 0 : webcamConfig.width; - if (webcamConfig == null ? void 0 : webcamConfig.height) - this.config.height = webcamConfig == null ? void 0 : webcamConfig.height; - if (webcamConfig == null ? void 0 : webcamConfig.element) { - if (typeof webcamConfig.element === "string") { - const el = document.getElementById(webcamConfig.element); - if (el && el instanceof HTMLVideoElement) { - this.element = el; - } else { - if (this.config.debug) - log("webcam", "cannot get dom element", webcamConfig.element); - return; - } - } else if (webcamConfig.element instanceof HTMLVideoElement) { - this.element = webcamConfig.element; - } else { - if (this.config.debug) - log("webcam", "unknown dom element", webcamConfig.element); - return; - } - } else { - this.element = document.createElement("video"); - } - const requestedConstraints = { - audio: false, - video: { - facingMode: this.config.mode === "front" ? "user" : "environment", - resizeMode: this.config.crop ? "crop-and-scale" : "none", - width: { ideal: this.config.width > 0 ? this.config.width : window.innerWidth }, - height: { ideal: this.config.height > 0 ? this.config.height : window.innerHeight } - } - }; - this.element.addEventListener("play", () => { - if (this.config.debug) - log("webcam", "play"); - }); - this.element.addEventListener("pause", () => { - if (this.config.debug) - log("webcam", "pause"); - }); - this.element.addEventListener("click", async () => { - if (!this.element || !this.stream) - return; - if (this.element.paused) - await this.element.play(); - else - this.element.pause(); - }); - if (!(navigator == null ? void 0 : navigator.mediaDevices)) { - if (this.config.debug) - log("webcam", "no devices"); - return; - } - try { - this.stream = await navigator.mediaDevices.getUserMedia(requestedConstraints); - } catch (err) { - log("webcam", err); - return; - } - if (!this.stream) { - if (this.config.debug) - log("webcam", "no stream"); - return; - } - this.element.srcObject = this.stream; - const ready3 = new Promise((resolve) => { - if (!this.element) - resolve(false); - else - this.element.onloadeddata = () => resolve(true); - }); - await ready3; - await this.element.play(); - if (this.config.debug) { - log("webcam", { - width: this.width, - height: this.height, - label: this.label, - stream: this.stream, - track: this.track, - settings: this.settings, - constraints: this.constraints, - capabilities: this.capabilities - }); - } - }); - __publicField(this, "pause", () => { - if (this.element) - this.element.pause(); - }); - __publicField(this, "play", async () => { - if (this.element) - await this.element.play(); - }); - __publicField(this, "stop", () => { - if (this.config.debug) - log("webcam", "stop"); - if (this.track) - this.track.stop(); - }); - this.config = { - element: void 0, - debug: true, - mode: "front", - crop: false, - width: 0, - height: 0 - }; - } - get track() { - if (!this.stream) - return void 0; - return this.stream.getVideoTracks()[0]; - } - get capabilities() { - if (!this.track) - return void 0; - return this.track.getCapabilities ? this.track.getCapabilities() : void 0; - } - get constraints() { - if (!this.track) - return void 0; - return this.track.getConstraints ? this.track.getConstraints() : void 0; - } - get settings() { - if (!this.stream) - return void 0; - const track = this.stream.getVideoTracks()[0]; - return track.getSettings ? track.getSettings() : void 0; - } - get label() { - if (!this.track) - return ""; - return this.track.label; - } - get paused() { - var _a; - return ((_a = this.element) == null ? void 0 : _a.paused) || false; - } - get width() { - var _a; - return ((_a = this.element) == null ? void 0 : _a.videoWidth) || 0; - } - get height() { - var _a; - return ((_a = this.element) == null ? void 0 : _a.videoHeight) || 0; - } -}; - -// models/models.json -var models_exports = {}; -__export(models_exports, { - age: () => age, - "anti-spoofing": () => anti_spoofing, - antispoof: () => antispoof, - blazeface: () => blazeface, - "blazeface-back": () => blazeface_back, - "blazeface-front": () => blazeface_front, - "blazepose-detect": () => blazepose_detect, - "blazepose-detector2d": () => blazepose_detector2d, - "blazepose-detector3d": () => blazepose_detector3d, - "blazepose-full": () => blazepose_full, - "blazepose-heavy": () => blazepose_heavy, - "blazepose-lite": () => blazepose_lite, - default: () => models_default, - efficientpose: () => efficientpose, - "efficientpose-i-lite": () => efficientpose_i_lite, - "efficientpose-ii-lite": () => efficientpose_ii_lite, - "efficientpose-iv": () => efficientpose_iv, - emotion: () => emotion, - faceboxes: () => faceboxes, - facemesh: () => facemesh, - "facemesh-attention": () => facemesh_attention, - "facemesh-attention-alt": () => facemesh_attention_alt, - "facemesh-detection-full": () => facemesh_detection_full, - "facemesh-detection-short": () => facemesh_detection_short, - "facemesh-orig": () => facemesh_orig, - faceres: () => faceres, - "faceres-deep": () => faceres_deep, - gear: () => gear, - gender: () => gender, - "gender-ssrnet-imdb": () => gender_ssrnet_imdb, - handdetect: () => handdetect, - "handlandmark-full": () => handlandmark_full, - "handlandmark-lite": () => handlandmark_lite, - "handlandmark-sparse": () => handlandmark_sparse, - handskeleton: () => handskeleton, - handtrack: () => handtrack, - "insightface-efficientnet-b0": () => insightface_efficientnet_b0, - "insightface-ghostnet-strides1": () => insightface_ghostnet_strides1, - "insightface-ghostnet-strides2": () => insightface_ghostnet_strides2, - "insightface-mobilenet-emore": () => insightface_mobilenet_emore, - "insightface-mobilenet-swish": () => insightface_mobilenet_swish, - iris: () => iris, - liveness: () => liveness, - "mb3-centernet": () => mb3_centernet, - meet: () => meet, - mobileface: () => mobileface, - mobilefacenet: () => mobilefacenet, - models: () => models, - "movenet-lightning": () => movenet_lightning, - "movenet-multipose": () => movenet_multipose, - "movenet-thunder": () => movenet_thunder, - nanodet: () => nanodet, - "nanodet-e": () => nanodet_e, - "nanodet-g": () => nanodet_g, - "nanodet-m": () => nanodet_m, - "nanodet-t": () => nanodet_t, - posenet: () => posenet, - selfie: () => selfie -}); -var antispoof = 853098; -var blazeface = 538928; -var emotion = 820516; -var facemesh = 1477958; -var faceres = 6978814; -var handlandmark_full = 5431368; -var handtrack = 2964837; -var iris = 2599092; -var liveness = 592976; -var mb3_centernet = 4030290; -var models = 0; -var movenet_lightning = 4650216; -var selfie = 212886; -var age = 161240; -var blazeface_back = 538928; -var blazeface_front = 402048; -var blazepose_detector2d = 7499400; -var blazepose_detector3d = 5928856; -var blazepose_full = 6338290; -var blazepose_heavy = 27501554; -var blazepose_lite = 2725490; -var efficientpose = 5651240; -var faceboxes = 2013002; -var facemesh_attention_alt = 2387598; -var facemesh_attention = 2382414; -var facemesh_detection_full = 1026192; -var facemesh_detection_short = 201268; -var facemesh_orig = 2955780; -var faceres_deep = 13957620; -var gear = 1498916; -var gender_ssrnet_imdb = 161236; -var gender = 201808; -var handdetect = 3515612; -var handlandmark_lite = 2023432; -var handlandmark_sparse = 5286322; -var handskeleton = 5502280; -var meet = 372228; -var mobileface = 2183192; -var mobilefacenet = 5171976; -var movenet_multipose = 9448838; -var movenet_thunder = 12477112; -var nanodet = 7574558; -var posenet = 5032780; -var blazepose_detect = 5928804; -var anti_spoofing = 853098; -var efficientpose_i_lite = 2269064; -var efficientpose_ii_lite = 5651240; -var efficientpose_iv = 25643252; -var insightface_efficientnet_b0 = 13013224; -var insightface_ghostnet_strides1 = 8093408; -var insightface_ghostnet_strides2 = 8049584; -var insightface_mobilenet_emore = 6938536; -var insightface_mobilenet_swish = 12168584; -var nanodet_e = 12319156; -var nanodet_g = 7574558; -var nanodet_m = 1887474; -var nanodet_t = 5294216; -var models_default = { - antispoof, - blazeface, - emotion, - facemesh, - faceres, - "handlandmark-full": handlandmark_full, - handtrack, - iris, - liveness, - "mb3-centernet": mb3_centernet, - models, - "movenet-lightning": movenet_lightning, - selfie, - age, - "blazeface-back": blazeface_back, - "blazeface-front": blazeface_front, - "blazepose-detector2d": blazepose_detector2d, - "blazepose-detector3d": blazepose_detector3d, - "blazepose-full": blazepose_full, - "blazepose-heavy": blazepose_heavy, - "blazepose-lite": blazepose_lite, - efficientpose, - faceboxes, - "facemesh-attention-alt": facemesh_attention_alt, - "facemesh-attention": facemesh_attention, - "facemesh-detection-full": facemesh_detection_full, - "facemesh-detection-short": facemesh_detection_short, - "facemesh-orig": facemesh_orig, - "faceres-deep": faceres_deep, - gear, - "gender-ssrnet-imdb": gender_ssrnet_imdb, - gender, - handdetect, - "handlandmark-lite": handlandmark_lite, - "handlandmark-sparse": handlandmark_sparse, - handskeleton, - meet, - mobileface, - mobilefacenet, - "movenet-multipose": movenet_multipose, - "movenet-thunder": movenet_thunder, - nanodet, - posenet, - "blazepose-detect": blazepose_detect, - "anti-spoofing": anti_spoofing, - "efficientpose-i-lite": efficientpose_i_lite, - "efficientpose-ii-lite": efficientpose_ii_lite, - "efficientpose-iv": efficientpose_iv, - "insightface-efficientnet-b0": insightface_efficientnet_b0, - "insightface-ghostnet-strides1": insightface_ghostnet_strides1, - "insightface-ghostnet-strides2": insightface_ghostnet_strides2, - "insightface-mobilenet-emore": insightface_mobilenet_emore, - "insightface-mobilenet-swish": insightface_mobilenet_swish, - "nanodet-e": nanodet_e, - "nanodet-g": nanodet_g, - "nanodet-m": nanodet_m, - "nanodet-t": nanodet_t -}; - -// src/tfjs/load.ts -var options = { - cacheModels: true, - cacheSupported: true, - verbose: true, - debug: false, - modelBasePath: "" -}; -var modelStats = {}; -async function httpHandler(url, init3) { - if (options.debug) - log("load model fetch:", url, init3); - return fetch(url, init3); -} -function setModelLoadOptions(config3) { - options.cacheModels = config3.cacheModels; - options.verbose = config3.debug; - options.modelBasePath = config3.modelBasePath; -} -async function loadModel(modelPath) { - var _a, _b, _c, _d; - let modelUrl = join(options.modelBasePath, modelPath || ""); - if (!modelUrl.toLowerCase().endsWith(".json")) - modelUrl += ".json"; - const modelPathSegments = modelUrl.includes("/") ? modelUrl.split("/") : modelUrl.split("\\"); - const shortModelName = modelPathSegments[modelPathSegments.length - 1].replace(".json", ""); - const cachedModelName = "indexeddb://" + shortModelName; - modelStats[shortModelName] = { - name: shortModelName, - sizeFromManifest: 0, - sizeLoadedWeights: 0, - sizeDesired: models_exports[shortModelName], - inCache: false - }; - options.cacheSupported = typeof indexedDB !== "undefined"; - let cachedModels = {}; - try { - cachedModels = options.cacheSupported && options.cacheModels ? await tfjs_esm_exports.io.listModels() : {}; - } catch (e) { - options.cacheSupported = false; - } - modelStats[shortModelName].inCache = options.cacheSupported && options.cacheModels && Object.keys(cachedModels).includes(cachedModelName); - const tfLoadOptions = typeof fetch === "undefined" ? {} : { fetchFunc: (url, init3) => httpHandler(url, init3) }; - let model21 = new GraphModel(modelStats[shortModelName].inCache ? cachedModelName : modelUrl, tfLoadOptions); - let loaded = false; - try { - model21.findIOHandler(); - if (options.debug) - log("model load handler:", model21["handler"]); - } catch (err) { - log("error finding model i/o handler:", modelUrl, err); - } - try { - const artifacts = await ((_a = model21.handler) == null ? void 0 : _a.load()) || null; - modelStats[shortModelName].sizeFromManifest = ((_b = artifacts == null ? void 0 : artifacts.weightData) == null ? void 0 : _b.byteLength) || 0; - if (artifacts) - model21.loadSync(artifacts); - else - model21 = await tfjs_esm_exports.loadGraphModel(modelStats[shortModelName].inCache ? cachedModelName : modelUrl, tfLoadOptions); - modelStats[shortModelName].sizeLoadedWeights = ((_d = (_c = model21.artifacts) == null ? void 0 : _c.weightData) == null ? void 0 : _d.byteLength) || 0; - if (options.verbose) - log("load:", { model: shortModelName, url: model21["modelUrl"], bytes: modelStats[shortModelName].sizeLoadedWeights }); - loaded = true; - } catch (err) { - log("error loading model:", modelUrl, err); - } - if (loaded && options.cacheModels && options.cacheSupported && !modelStats[shortModelName].inCache) { - try { - const saveResult = await model21.save(cachedModelName); - if (options.debug) - log("model saved:", cachedModelName, saveResult); - } catch (err) { - log("error saving model:", modelUrl, err); - } - } - return model21; -} - -// package.json -var version9 = "2.11.0"; - -// src/models.ts -var models_exports2 = {}; -__export(models_exports2, { - Models: () => Models, - getModelStats: () => getModelStats, - load: () => load22, - reset: () => reset2, - validate: () => validate2, - validateModel: () => validateModel -}); - -// src/face/antispoof.ts -var model; -var cached = []; -var skipped = Number.MAX_SAFE_INTEGER; -var lastCount = 0; -var lastTime = 0; -async function load(config3) { - var _a; - if (env.initial) - model = null; - if (!model) - model = await loadModel((_a = config3.face.antispoof) == null ? void 0 : _a.modelPath); - else if (config3.debug) - log("cached model:", model["modelUrl"]); - return model; -} -async function predict(image27, config3, idx, count2) { - var _a, _b; - if (!model || !(model == null ? void 0 : model["executor"])) - return 0; - const skipTime = (((_a = config3.face.antispoof) == null ? void 0 : _a.skipTime) || 0) > now() - lastTime; - const skipFrame = skipped < (((_b = config3.face.antispoof) == null ? void 0 : _b.skipFrames) || 0); - if (config3.skipAllowed && skipTime && skipFrame && lastCount === count2 && cached[idx]) { - skipped++; - return cached[idx]; - } - skipped = 0; - return new Promise(async (resolve) => { - const resize = tfjs_esm_exports.image.resizeBilinear(image27, [(model == null ? void 0 : model.inputs[0].shape) ? model.inputs[0].shape[2] : 0, (model == null ? void 0 : model.inputs[0].shape) ? model.inputs[0].shape[1] : 0], false); - const res = model == null ? void 0 : model.execute(resize); - const num = (await res.data())[0]; - cached[idx] = Math.round(100 * num) / 100; - lastCount = count2; - lastTime = now(); - tfjs_esm_exports.dispose([resize, res]); - resolve(cached[idx]); - }); -} - -// src/face/facemeshcoords.ts -var meshAnnotations = { - silhouette: [ - 10, - 338, - 297, - 332, - 284, - 251, - 389, - 356, - 454, - 323, - 361, - 288, - 397, - 365, - 379, - 378, - 400, - 377, - 152, - 148, - 176, - 149, - 150, - 136, - 172, - 58, - 132, - 93, - 234, - 127, - 162, - 21, - 54, - 103, - 67, - 109 - ], - lipsUpperOuter: [185, 40, 39, 37, 0, 267, 269, 270, 409], - lipsLowerOuter: [61, 146, 91, 181, 84, 17, 314, 405, 321, 375, 291], - lipsUpperInner: [191, 80, 81, 82, 13, 312, 311, 310, 415], - lipsLowerInner: [78, 95, 88, 178, 87, 14, 317, 402, 318, 324, 308], - lipsLowerSemiOuter: [76, 77, 90, 180, 85, 16, 315, 404, 320, 307, 306], - lipsUpperSemiOuter: [184, 74, 73, 72, 11, 302, 303, 304, 408], - lipsLowerSemiInner: [62, 96, 89, 179, 86, 15, 316, 403, 319, 325, 292], - lipsUpperSemiInner: [183, 42, 41, 38, 12, 268, 271, 272, 407], - rightEyeUpper0: [246, 161, 160, 159, 158, 157, 173], - rightEyeLower0: [33, 7, 163, 144, 145, 153, 154, 155, 133], - rightEyeUpper1: [247, 30, 29, 27, 28, 56, 190], - rightEyeLower1: [130, 25, 110, 24, 23, 22, 26, 112, 243], - rightEyeUpper2: [113, 225, 224, 223, 222, 221, 189], - rightEyeLower2: [226, 31, 228, 229, 230, 231, 232, 233, 244], - rightEyeLower3: [143, 111, 117, 118, 119, 120, 121, 128, 245], - rightEyebrowUpper: [156, 70, 63, 105, 66, 107, 55, 193], - rightEyebrowLower: [35, 124, 46, 53, 52, 65], - rightEyeIris: [473, 474, 475, 476, 477], - leftEyeUpper0: [466, 388, 387, 386, 385, 384, 398], - leftEyeLower0: [263, 249, 390, 373, 374, 380, 381, 382, 362], - leftEyeUpper1: [467, 260, 259, 257, 258, 286, 414], - leftEyeLower1: [359, 255, 339, 254, 253, 252, 256, 341, 463], - leftEyeUpper2: [342, 445, 444, 443, 442, 441, 413], - leftEyeLower2: [446, 261, 448, 449, 450, 451, 452, 453, 464], - leftEyeLower3: [372, 340, 346, 347, 348, 349, 350, 357, 465], - leftEyebrowUpper: [383, 300, 293, 334, 296, 336, 285, 417], - leftEyebrowLower: [265, 353, 276, 283, 282, 295], - leftEyeIris: [468, 469, 470, 471, 472], - midwayBetweenEyes: [168], - noseTip: [1], - noseBottom: [2], - noseRightCorner: [98], - noseLeftCorner: [327], - rightCheek: [205], - leftCheek: [425] -}; -var meshLandmarks = { - count: 468, - mouth: 13, - symmetryLine: [13, meshAnnotations.midwayBetweenEyes[0]] -}; -var blazeFaceLandmarks = { - leftEye: 0, - rightEye: 1, - nose: 2, - mouth: 3, - leftEar: 4, - rightEar: 5, - symmetryLine: [3, 2] -}; -var irisIndices = [ - { key: "EyeUpper0", indices: [9, 10, 11, 12, 13, 14, 15] }, - { key: "EyeUpper1", indices: [25, 26, 27, 28, 29, 30, 31] }, - { key: "EyeUpper2", indices: [41, 42, 43, 44, 45, 46, 47] }, - { key: "EyeLower0", indices: [0, 1, 2, 3, 4, 5, 6, 7, 8] }, - { key: "EyeLower1", indices: [16, 17, 18, 19, 20, 21, 22, 23, 24] }, - { key: "EyeLower2", indices: [32, 33, 34, 35, 36, 37, 38, 39, 40] }, - { key: "EyeLower3", indices: [54, 55, 56, 57, 58, 59, 60, 61, 62] }, - { key: "EyebrowUpper", indices: [63, 64, 65, 66, 67, 68, 69, 70] }, - { key: "EyebrowLower", indices: [48, 49, 50, 51, 52, 53] } -]; -var UV468 = [ - [0.499976992607117, 0.652534008026123], - [0.500025987625122, 0.547487020492554], - [0.499974012374878, 0.602371990680695], - [0.482113003730774, 0.471979022026062], - [0.500150978565216, 0.527155995368958], - [0.499909996986389, 0.498252987861633], - [0.499523013830185, 0.40106201171875], - [0.289712011814117, 0.380764007568359], - [0.499954998493195, 0.312398016452789], - [0.499987006187439, 0.269918978214264], - [0.500023007392883, 0.107050001621246], - [0.500023007392883, 0.666234016418457], - [0.5000159740448, 0.679224014282227], - [0.500023007392883, 0.692348003387451], - [0.499976992607117, 0.695277988910675], - [0.499976992607117, 0.70593398809433], - [0.499976992607117, 0.719385027885437], - [0.499976992607117, 0.737019002437592], - [0.499967992305756, 0.781370997428894], - [0.499816000461578, 0.562981009483337], - [0.473773002624512, 0.573909997940063], - [0.104906998574734, 0.254140973091125], - [0.365929991006851, 0.409575998783112], - [0.338757991790771, 0.41302502155304], - [0.311120003461838, 0.409460008144379], - [0.274657994508743, 0.389131009578705], - [0.393361985683441, 0.403706014156342], - [0.345234006643295, 0.344011008739471], - [0.370094001293182, 0.346076011657715], - [0.319321990013123, 0.347265005111694], - [0.297903001308441, 0.353591024875641], - [0.24779200553894, 0.410809993743896], - [0.396889001131058, 0.842755019664764], - [0.280097991228104, 0.375599980354309], - [0.106310002505779, 0.399955987930298], - [0.2099249958992, 0.391353011131287], - [0.355807989835739, 0.534406006336212], - [0.471751004457474, 0.65040397644043], - [0.474155008792877, 0.680191993713379], - [0.439785003662109, 0.657229006290436], - [0.414617002010345, 0.66654098033905], - [0.450374007225037, 0.680860996246338], - [0.428770989179611, 0.682690978050232], - [0.374971002340317, 0.727805018424988], - [0.486716985702515, 0.547628998756409], - [0.485300987958908, 0.527395009994507], - [0.257764995098114, 0.314490020275116], - [0.401223003864288, 0.455172002315521], - [0.429818987846375, 0.548614978790283], - [0.421351999044418, 0.533740997314453], - [0.276895999908447, 0.532056987285614], - [0.483370006084442, 0.499586999416351], - [0.33721199631691, 0.282882988452911], - [0.296391993761063, 0.293242990970612], - [0.169294998049736, 0.193813979625702], - [0.447580009698868, 0.302609980106354], - [0.392390012741089, 0.353887975215912], - [0.354490011930466, 0.696784019470215], - [0.067304998636246, 0.730105042457581], - [0.442739009857178, 0.572826027870178], - [0.457098007202148, 0.584792017936707], - [0.381974011659622, 0.694710969924927], - [0.392388999462128, 0.694203019142151], - [0.277076005935669, 0.271932005882263], - [0.422551989555359, 0.563233017921448], - [0.385919004678726, 0.281364023685455], - [0.383103013038635, 0.255840003490448], - [0.331431001424789, 0.119714021682739], - [0.229923993349075, 0.232002973556519], - [0.364500999450684, 0.189113974571228], - [0.229622006416321, 0.299540996551514], - [0.173287004232407, 0.278747975826263], - [0.472878992557526, 0.666198015213013], - [0.446828007698059, 0.668527007102966], - [0.422762006521225, 0.673889994621277], - [0.445307999849319, 0.580065965652466], - [0.388103008270264, 0.693961024284363], - [0.403039008378983, 0.706539988517761], - [0.403629004955292, 0.693953037261963], - [0.460041999816895, 0.557139039039612], - [0.431158006191254, 0.692366003990173], - [0.452181994915009, 0.692366003990173], - [0.475387006998062, 0.692366003990173], - [0.465828001499176, 0.779190003871918], - [0.472328990697861, 0.736225962638855], - [0.473087012767792, 0.717857003211975], - [0.473122000694275, 0.704625964164734], - [0.473033010959625, 0.695277988910675], - [0.427942007780075, 0.695277988910675], - [0.426479011774063, 0.703539967536926], - [0.423162013292313, 0.711845993995667], - [0.4183090031147, 0.720062971115112], - [0.390094995498657, 0.639572978019714], - [0.013953999616206, 0.560034036636353], - [0.499913990497589, 0.58014702796936], - [0.413199990987778, 0.69539999961853], - [0.409626007080078, 0.701822996139526], - [0.468080013990402, 0.601534962654114], - [0.422728985548019, 0.585985004901886], - [0.463079988956451, 0.593783974647522], - [0.37211999297142, 0.47341400384903], - [0.334562003612518, 0.496073007583618], - [0.411671012639999, 0.546965003013611], - [0.242175996303558, 0.14767599105835], - [0.290776997804642, 0.201445996761322], - [0.327338010072708, 0.256527006626129], - [0.399509996175766, 0.748921036720276], - [0.441727995872498, 0.261676013469696], - [0.429764986038208, 0.187834024429321], - [0.412198007106781, 0.108901023864746], - [0.288955003023148, 0.398952007293701], - [0.218936994671822, 0.435410976409912], - [0.41278201341629, 0.398970007896423], - [0.257135003805161, 0.355440020561218], - [0.427684992551804, 0.437960982322693], - [0.448339998722076, 0.536936044692993], - [0.178560003638268, 0.45755398273468], - [0.247308000922203, 0.457193970680237], - [0.286267012357712, 0.467674970626831], - [0.332827985286713, 0.460712015628815], - [0.368755996227264, 0.447206974029541], - [0.398963987827301, 0.432654976844788], - [0.476410001516342, 0.405806005001068], - [0.189241006970406, 0.523923993110657], - [0.228962004184723, 0.348950982093811], - [0.490725994110107, 0.562400996685028], - [0.404670000076294, 0.485132992267609], - [0.019469000399113, 0.401564002037048], - [0.426243007183075, 0.420431017875671], - [0.396993011236191, 0.548797011375427], - [0.266469985246658, 0.376977026462555], - [0.439121007919312, 0.51895797252655], - [0.032313998788595, 0.644356966018677], - [0.419054001569748, 0.387154996395111], - [0.462783008813858, 0.505746960639954], - [0.238978996872902, 0.779744982719421], - [0.198220998048782, 0.831938028335571], - [0.107550002634525, 0.540755033493042], - [0.183610007166862, 0.740257024765015], - [0.134409993886948, 0.333683013916016], - [0.385764002799988, 0.883153975009918], - [0.490967005491257, 0.579378008842468], - [0.382384985685349, 0.508572995662689], - [0.174399003386497, 0.397670984268188], - [0.318785011768341, 0.39623498916626], - [0.343364000320435, 0.400596976280212], - [0.396100014448166, 0.710216999053955], - [0.187885001301765, 0.588537991046906], - [0.430987000465393, 0.944064974784851], - [0.318993002176285, 0.898285031318665], - [0.266247987747192, 0.869701027870178], - [0.500023007392883, 0.190576016902924], - [0.499976992607117, 0.954452991485596], - [0.366169989109039, 0.398822009563446], - [0.393207013607025, 0.39553701877594], - [0.410373002290726, 0.391080021858215], - [0.194993004202843, 0.342101991176605], - [0.388664990663528, 0.362284004688263], - [0.365961998701096, 0.355970978736877], - [0.343364000320435, 0.355356991291046], - [0.318785011768341, 0.35834002494812], - [0.301414996385574, 0.363156020641327], - [0.058132998645306, 0.319076001644135], - [0.301414996385574, 0.387449026107788], - [0.499987989664078, 0.618434011936188], - [0.415838003158569, 0.624195992946625], - [0.445681989192963, 0.566076993942261], - [0.465844005346298, 0.620640993118286], - [0.49992299079895, 0.351523995399475], - [0.288718998432159, 0.819945991039276], - [0.335278987884521, 0.852819979190826], - [0.440512001514435, 0.902418971061707], - [0.128294005990028, 0.791940987110138], - [0.408771991729736, 0.373893976211548], - [0.455606997013092, 0.451801002025604], - [0.499877005815506, 0.908990025520325], - [0.375436991453171, 0.924192011356354], - [0.11421000212431, 0.615022003650665], - [0.448662012815475, 0.695277988910675], - [0.4480200111866, 0.704632043838501], - [0.447111994028091, 0.715808033943176], - [0.444831997156143, 0.730794012546539], - [0.430011987686157, 0.766808986663818], - [0.406787008047104, 0.685672998428345], - [0.400738000869751, 0.681069016456604], - [0.392399996519089, 0.677703022956848], - [0.367855995893478, 0.663918972015381], - [0.247923001646996, 0.601333022117615], - [0.452769994735718, 0.420849978923798], - [0.43639200925827, 0.359887003898621], - [0.416164010763168, 0.368713974952698], - [0.413385987281799, 0.692366003990173], - [0.228018000721931, 0.683571994304657], - [0.468268007040024, 0.352671027183533], - [0.411361992359161, 0.804327011108398], - [0.499989002943039, 0.469825029373169], - [0.479153990745544, 0.442654013633728], - [0.499974012374878, 0.439637005329132], - [0.432112008333206, 0.493588984012604], - [0.499886006116867, 0.866917014122009], - [0.49991300702095, 0.821729004383087], - [0.456548988819122, 0.819200992584229], - [0.344549000263214, 0.745438992977142], - [0.37890899181366, 0.574010014533997], - [0.374292999505997, 0.780184984207153], - [0.319687992334366, 0.570737957954407], - [0.357154995203018, 0.604269981384277], - [0.295284003019333, 0.621580958366394], - [0.447750002145767, 0.862477004528046], - [0.410986006259918, 0.508723020553589], - [0.31395098567009, 0.775308012962341], - [0.354128003120422, 0.812552988529205], - [0.324548006057739, 0.703992962837219], - [0.189096003770828, 0.646299958229065], - [0.279776990413666, 0.71465802192688], - [0.1338230073452, 0.682700991630554], - [0.336768001317978, 0.644733011722565], - [0.429883986711502, 0.466521978378296], - [0.455527991056442, 0.548622965812683], - [0.437114000320435, 0.558896005153656], - [0.467287987470627, 0.529924988746643], - [0.414712011814117, 0.335219979286194], - [0.37704598903656, 0.322777986526489], - [0.344107985496521, 0.320150971412659], - [0.312875986099243, 0.32233202457428], - [0.283526003360748, 0.333190023899078], - [0.241245999932289, 0.382785975933075], - [0.102986000478268, 0.468762993812561], - [0.267612010240555, 0.424560010433197], - [0.297879010438919, 0.433175981044769], - [0.333433985710144, 0.433878004550934], - [0.366427004337311, 0.426115989685059], - [0.396012008190155, 0.416696012020111], - [0.420121014118195, 0.41022801399231], - [0.007561000064015, 0.480777025222778], - [0.432949006557465, 0.569517970085144], - [0.458638995885849, 0.479089021682739], - [0.473466008901596, 0.545744001865387], - [0.476087987422943, 0.563830018043518], - [0.468472003936768, 0.555056989192963], - [0.433990985155106, 0.582361996173859], - [0.483518004417419, 0.562983989715576], - [0.482482999563217, 0.57784903049469], - [0.42645001411438, 0.389798998832703], - [0.438998997211456, 0.39649498462677], - [0.450067013502121, 0.400434017181396], - [0.289712011814117, 0.368252992630005], - [0.276670008897781, 0.363372981548309], - [0.517862021923065, 0.471948027610779], - [0.710287988185883, 0.380764007568359], - [0.526226997375488, 0.573909997940063], - [0.895093023777008, 0.254140973091125], - [0.634069979190826, 0.409575998783112], - [0.661242008209229, 0.41302502155304], - [0.688880026340485, 0.409460008144379], - [0.725341975688934, 0.389131009578705], - [0.606630027294159, 0.40370500087738], - [0.654766023159027, 0.344011008739471], - [0.629905998706818, 0.346076011657715], - [0.680678009986877, 0.347265005111694], - [0.702096998691559, 0.353591024875641], - [0.75221198797226, 0.410804986953735], - [0.602918028831482, 0.842862963676453], - [0.719901978969574, 0.375599980354309], - [0.893692970275879, 0.399959981441498], - [0.790081977844238, 0.391354024410248], - [0.643998026847839, 0.534487962722778], - [0.528249025344849, 0.65040397644043], - [0.525849997997284, 0.680191040039062], - [0.560214996337891, 0.657229006290436], - [0.585384011268616, 0.66654098033905], - [0.549625992774963, 0.680860996246338], - [0.57122802734375, 0.682691991329193], - [0.624852001667023, 0.72809898853302], - [0.513050019741058, 0.547281980514526], - [0.51509702205658, 0.527251958847046], - [0.742246985435486, 0.314507007598877], - [0.598631024360657, 0.454979002475739], - [0.570338010787964, 0.548575043678284], - [0.578631997108459, 0.533622980117798], - [0.723087012767792, 0.532054007053375], - [0.516445994377136, 0.499638974666595], - [0.662801027297974, 0.282917976379395], - [0.70362401008606, 0.293271005153656], - [0.830704987049103, 0.193813979625702], - [0.552385985851288, 0.302568018436432], - [0.607609987258911, 0.353887975215912], - [0.645429015159607, 0.696707010269165], - [0.932694971561432, 0.730105042457581], - [0.557260990142822, 0.572826027870178], - [0.542901992797852, 0.584792017936707], - [0.6180260181427, 0.694710969924927], - [0.607590973377228, 0.694203019142151], - [0.722943007946014, 0.271963000297546], - [0.577413976192474, 0.563166975975037], - [0.614082992076874, 0.281386971473694], - [0.616907000541687, 0.255886018276215], - [0.668509006500244, 0.119913995265961], - [0.770092010498047, 0.232020974159241], - [0.635536015033722, 0.189248979091644], - [0.77039098739624, 0.299556016921997], - [0.826722025871277, 0.278755009174347], - [0.527121007442474, 0.666198015213013], - [0.553171992301941, 0.668527007102966], - [0.577238023281097, 0.673889994621277], - [0.554691970348358, 0.580065965652466], - [0.611896991729736, 0.693961024284363], - [0.59696102142334, 0.706539988517761], - [0.596370995044708, 0.693953037261963], - [0.539958000183105, 0.557139039039612], - [0.568841993808746, 0.692366003990173], - [0.547818005084991, 0.692366003990173], - [0.52461302280426, 0.692366003990173], - [0.534089982509613, 0.779141008853912], - [0.527670979499817, 0.736225962638855], - [0.526912987232208, 0.717857003211975], - [0.526877999305725, 0.704625964164734], - [0.526966989040375, 0.695277988910675], - [0.572058022022247, 0.695277988910675], - [0.573521018028259, 0.703539967536926], - [0.57683801651001, 0.711845993995667], - [0.581691026687622, 0.720062971115112], - [0.609944999217987, 0.639909982681274], - [0.986046016216278, 0.560034036636353], - [0.5867999792099, 0.69539999961853], - [0.590372025966644, 0.701822996139526], - [0.531915009021759, 0.601536989212036], - [0.577268004417419, 0.585934996604919], - [0.536915004253387, 0.593786001205444], - [0.627542972564697, 0.473352015018463], - [0.665585994720459, 0.495950996875763], - [0.588353991508484, 0.546862006187439], - [0.757824003696442, 0.14767599105835], - [0.709249973297119, 0.201507985591888], - [0.672684013843536, 0.256581008434296], - [0.600408971309662, 0.74900496006012], - [0.55826598405838, 0.261672019958496], - [0.570303976535797, 0.187870979309082], - [0.588165998458862, 0.109044015407562], - [0.711045026779175, 0.398952007293701], - [0.781069993972778, 0.435405015945435], - [0.587247014045715, 0.398931980133057], - [0.742869973182678, 0.355445981025696], - [0.572156012058258, 0.437651991844177], - [0.55186802148819, 0.536570012569427], - [0.821442008018494, 0.457556009292603], - [0.752701997756958, 0.457181990146637], - [0.71375697851181, 0.467626988887787], - [0.66711300611496, 0.460672974586487], - [0.631101012229919, 0.447153985500336], - [0.6008620262146, 0.432473003864288], - [0.523481011390686, 0.405627012252808], - [0.810747981071472, 0.523926019668579], - [0.771045982837677, 0.348959028720856], - [0.509127020835876, 0.562718033790588], - [0.595292985439301, 0.485023975372314], - [0.980530977249146, 0.401564002037048], - [0.573499977588654, 0.420000016689301], - [0.602994978427887, 0.548687994480133], - [0.733529984951019, 0.376977026462555], - [0.560611009597778, 0.519016981124878], - [0.967685997486115, 0.644356966018677], - [0.580985009670258, 0.387160003185272], - [0.537728011608124, 0.505385041236877], - [0.760966002941132, 0.779752969741821], - [0.801778972148895, 0.831938028335571], - [0.892440974712372, 0.54076099395752], - [0.816350996494293, 0.740260004997253], - [0.865594983100891, 0.333687007427216], - [0.614073991775513, 0.883246004581451], - [0.508952975273132, 0.579437971115112], - [0.617941975593567, 0.508316040039062], - [0.825608015060425, 0.397674977779388], - [0.681214988231659, 0.39623498916626], - [0.656635999679565, 0.400596976280212], - [0.603900015354156, 0.710216999053955], - [0.81208598613739, 0.588539004325867], - [0.56801301240921, 0.944564998149872], - [0.681007981300354, 0.898285031318665], - [0.733752012252808, 0.869701027870178], - [0.633830010890961, 0.398822009563446], - [0.606792986392975, 0.39553701877594], - [0.589659988880157, 0.391062021255493], - [0.805015981197357, 0.342108011245728], - [0.611334979534149, 0.362284004688263], - [0.634037971496582, 0.355970978736877], - [0.656635999679565, 0.355356991291046], - [0.681214988231659, 0.35834002494812], - [0.698584973812103, 0.363156020641327], - [0.941866993904114, 0.319076001644135], - [0.698584973812103, 0.387449026107788], - [0.584177017211914, 0.624107003211975], - [0.554318010807037, 0.566076993942261], - [0.534153997898102, 0.62064003944397], - [0.711217999458313, 0.819975018501282], - [0.664629995822906, 0.852871000766754], - [0.559099972248077, 0.902631998062134], - [0.871706008911133, 0.791940987110138], - [0.591234028339386, 0.373893976211548], - [0.544341027736664, 0.451583981513977], - [0.624562978744507, 0.924192011356354], - [0.88577002286911, 0.615028977394104], - [0.551338016986847, 0.695277988910675], - [0.551980018615723, 0.704632043838501], - [0.552887976169586, 0.715808033943176], - [0.555167973041534, 0.730794012546539], - [0.569944024085999, 0.767035007476807], - [0.593203008174896, 0.685675978660583], - [0.599261999130249, 0.681069016456604], - [0.607599973678589, 0.677703022956848], - [0.631937980651855, 0.663500010967255], - [0.752032995223999, 0.601315021514893], - [0.547226011753082, 0.420395016670227], - [0.563543975353241, 0.359827995300293], - [0.583841025829315, 0.368713974952698], - [0.586614012718201, 0.692366003990173], - [0.771915018558502, 0.683578014373779], - [0.531597018241882, 0.352482974529266], - [0.588370978832245, 0.804440975189209], - [0.52079701423645, 0.442565023899078], - [0.567984998226166, 0.493479013442993], - [0.543282985687256, 0.819254994392395], - [0.655317008495331, 0.745514988899231], - [0.621008992195129, 0.574018001556396], - [0.625559985637665, 0.78031200170517], - [0.680198013782501, 0.570719003677368], - [0.64276397228241, 0.604337990283966], - [0.704662978649139, 0.621529996395111], - [0.552012026309967, 0.862591981887817], - [0.589071989059448, 0.508637011051178], - [0.685944974422455, 0.775357007980347], - [0.645735025405884, 0.812640011310577], - [0.675342977046967, 0.703978002071381], - [0.810858011245728, 0.646304965019226], - [0.72012197971344, 0.714666962623596], - [0.866151988506317, 0.682704985141754], - [0.663187026977539, 0.644596993923187], - [0.570082008838654, 0.466325998306274], - [0.544561982154846, 0.548375964164734], - [0.562758982181549, 0.558784961700439], - [0.531987011432648, 0.530140042304993], - [0.585271000862122, 0.335177004337311], - [0.622952997684479, 0.32277899980545], - [0.655896008014679, 0.320163011550903], - [0.687132000923157, 0.322345972061157], - [0.716481983661652, 0.333200991153717], - [0.758756995201111, 0.382786989212036], - [0.897013008594513, 0.468769013881683], - [0.732392013072968, 0.424547016620636], - [0.70211398601532, 0.433162987232208], - [0.66652500629425, 0.433866024017334], - [0.633504986763, 0.426087975502014], - [0.603875994682312, 0.416586995124817], - [0.579657971858978, 0.409945011138916], - [0.992439985275269, 0.480777025222778], - [0.567192018032074, 0.569419980049133], - [0.54136598110199, 0.478899002075195], - [0.526564002037048, 0.546118021011353], - [0.523913025856018, 0.563830018043518], - [0.531529009342194, 0.555056989192963], - [0.566035985946655, 0.582329034805298], - [0.51631098985672, 0.563053965568542], - [0.5174720287323, 0.577877044677734], - [0.573594987392426, 0.389806985855103], - [0.560697972774506, 0.395331978797913], - [0.549755990505219, 0.399751007556915], - [0.710287988185883, 0.368252992630005], - [0.723330020904541, 0.363372981548309] -]; -var TRI468 = [ - 127, - 34, - 139, - 11, - 0, - 37, - 232, - 231, - 120, - 72, - 37, - 39, - 128, - 121, - 47, - 232, - 121, - 128, - 104, - 69, - 67, - 175, - 171, - 148, - 157, - 154, - 155, - 118, - 50, - 101, - 73, - 39, - 40, - 9, - 151, - 108, - 48, - 115, - 131, - 194, - 204, - 211, - 74, - 40, - 185, - 80, - 42, - 183, - 40, - 92, - 186, - 230, - 229, - 118, - 202, - 212, - 214, - 83, - 18, - 17, - 76, - 61, - 146, - 160, - 29, - 30, - 56, - 157, - 173, - 106, - 204, - 194, - 135, - 214, - 192, - 203, - 165, - 98, - 21, - 71, - 68, - 51, - 45, - 4, - 144, - 24, - 23, - 77, - 146, - 91, - 205, - 50, - 187, - 201, - 200, - 18, - 91, - 106, - 182, - 90, - 91, - 181, - 85, - 84, - 17, - 206, - 203, - 36, - 148, - 171, - 140, - 92, - 40, - 39, - 193, - 189, - 244, - 159, - 158, - 28, - 247, - 246, - 161, - 236, - 3, - 196, - 54, - 68, - 104, - 193, - 168, - 8, - 117, - 228, - 31, - 189, - 193, - 55, - 98, - 97, - 99, - 126, - 47, - 100, - 166, - 79, - 218, - 155, - 154, - 26, - 209, - 49, - 131, - 135, - 136, - 150, - 47, - 126, - 217, - 223, - 52, - 53, - 45, - 51, - 134, - 211, - 170, - 140, - 67, - 69, - 108, - 43, - 106, - 91, - 230, - 119, - 120, - 226, - 130, - 247, - 63, - 53, - 52, - 238, - 20, - 242, - 46, - 70, - 156, - 78, - 62, - 96, - 46, - 53, - 63, - 143, - 34, - 227, - 173, - 155, - 133, - 123, - 117, - 111, - 44, - 125, - 19, - 236, - 134, - 51, - 216, - 206, - 205, - 154, - 153, - 22, - 39, - 37, - 167, - 200, - 201, - 208, - 36, - 142, - 100, - 57, - 212, - 202, - 20, - 60, - 99, - 28, - 158, - 157, - 35, - 226, - 113, - 160, - 159, - 27, - 204, - 202, - 210, - 113, - 225, - 46, - 43, - 202, - 204, - 62, - 76, - 77, - 137, - 123, - 116, - 41, - 38, - 72, - 203, - 129, - 142, - 64, - 98, - 240, - 49, - 102, - 64, - 41, - 73, - 74, - 212, - 216, - 207, - 42, - 74, - 184, - 169, - 170, - 211, - 170, - 149, - 176, - 105, - 66, - 69, - 122, - 6, - 168, - 123, - 147, - 187, - 96, - 77, - 90, - 65, - 55, - 107, - 89, - 90, - 180, - 101, - 100, - 120, - 63, - 105, - 104, - 93, - 137, - 227, - 15, - 86, - 85, - 129, - 102, - 49, - 14, - 87, - 86, - 55, - 8, - 9, - 100, - 47, - 121, - 145, - 23, - 22, - 88, - 89, - 179, - 6, - 122, - 196, - 88, - 95, - 96, - 138, - 172, - 136, - 215, - 58, - 172, - 115, - 48, - 219, - 42, - 80, - 81, - 195, - 3, - 51, - 43, - 146, - 61, - 171, - 175, - 199, - 81, - 82, - 38, - 53, - 46, - 225, - 144, - 163, - 110, - 246, - 33, - 7, - 52, - 65, - 66, - 229, - 228, - 117, - 34, - 127, - 234, - 107, - 108, - 69, - 109, - 108, - 151, - 48, - 64, - 235, - 62, - 78, - 191, - 129, - 209, - 126, - 111, - 35, - 143, - 163, - 161, - 246, - 117, - 123, - 50, - 222, - 65, - 52, - 19, - 125, - 141, - 221, - 55, - 65, - 3, - 195, - 197, - 25, - 7, - 33, - 220, - 237, - 44, - 70, - 71, - 139, - 122, - 193, - 245, - 247, - 130, - 33, - 71, - 21, - 162, - 153, - 158, - 159, - 170, - 169, - 150, - 188, - 174, - 196, - 216, - 186, - 92, - 144, - 160, - 161, - 2, - 97, - 167, - 141, - 125, - 241, - 164, - 167, - 37, - 72, - 38, - 12, - 145, - 159, - 160, - 38, - 82, - 13, - 63, - 68, - 71, - 226, - 35, - 111, - 158, - 153, - 154, - 101, - 50, - 205, - 206, - 92, - 165, - 209, - 198, - 217, - 165, - 167, - 97, - 220, - 115, - 218, - 133, - 112, - 243, - 239, - 238, - 241, - 214, - 135, - 169, - 190, - 173, - 133, - 171, - 208, - 32, - 125, - 44, - 237, - 86, - 87, - 178, - 85, - 86, - 179, - 84, - 85, - 180, - 83, - 84, - 181, - 201, - 83, - 182, - 137, - 93, - 132, - 76, - 62, - 183, - 61, - 76, - 184, - 57, - 61, - 185, - 212, - 57, - 186, - 214, - 207, - 187, - 34, - 143, - 156, - 79, - 239, - 237, - 123, - 137, - 177, - 44, - 1, - 4, - 201, - 194, - 32, - 64, - 102, - 129, - 213, - 215, - 138, - 59, - 166, - 219, - 242, - 99, - 97, - 2, - 94, - 141, - 75, - 59, - 235, - 24, - 110, - 228, - 25, - 130, - 226, - 23, - 24, - 229, - 22, - 23, - 230, - 26, - 22, - 231, - 112, - 26, - 232, - 189, - 190, - 243, - 221, - 56, - 190, - 28, - 56, - 221, - 27, - 28, - 222, - 29, - 27, - 223, - 30, - 29, - 224, - 247, - 30, - 225, - 238, - 79, - 20, - 166, - 59, - 75, - 60, - 75, - 240, - 147, - 177, - 215, - 20, - 79, - 166, - 187, - 147, - 213, - 112, - 233, - 244, - 233, - 128, - 245, - 128, - 114, - 188, - 114, - 217, - 174, - 131, - 115, - 220, - 217, - 198, - 236, - 198, - 131, - 134, - 177, - 132, - 58, - 143, - 35, - 124, - 110, - 163, - 7, - 228, - 110, - 25, - 356, - 389, - 368, - 11, - 302, - 267, - 452, - 350, - 349, - 302, - 303, - 269, - 357, - 343, - 277, - 452, - 453, - 357, - 333, - 332, - 297, - 175, - 152, - 377, - 384, - 398, - 382, - 347, - 348, - 330, - 303, - 304, - 270, - 9, - 336, - 337, - 278, - 279, - 360, - 418, - 262, - 431, - 304, - 408, - 409, - 310, - 415, - 407, - 270, - 409, - 410, - 450, - 348, - 347, - 422, - 430, - 434, - 313, - 314, - 17, - 306, - 307, - 375, - 387, - 388, - 260, - 286, - 414, - 398, - 335, - 406, - 418, - 364, - 367, - 416, - 423, - 358, - 327, - 251, - 284, - 298, - 281, - 5, - 4, - 373, - 374, - 253, - 307, - 320, - 321, - 425, - 427, - 411, - 421, - 313, - 18, - 321, - 405, - 406, - 320, - 404, - 405, - 315, - 16, - 17, - 426, - 425, - 266, - 377, - 400, - 369, - 322, - 391, - 269, - 417, - 465, - 464, - 386, - 257, - 258, - 466, - 260, - 388, - 456, - 399, - 419, - 284, - 332, - 333, - 417, - 285, - 8, - 346, - 340, - 261, - 413, - 441, - 285, - 327, - 460, - 328, - 355, - 371, - 329, - 392, - 439, - 438, - 382, - 341, - 256, - 429, - 420, - 360, - 364, - 394, - 379, - 277, - 343, - 437, - 443, - 444, - 283, - 275, - 440, - 363, - 431, - 262, - 369, - 297, - 338, - 337, - 273, - 375, - 321, - 450, - 451, - 349, - 446, - 342, - 467, - 293, - 334, - 282, - 458, - 461, - 462, - 276, - 353, - 383, - 308, - 324, - 325, - 276, - 300, - 293, - 372, - 345, - 447, - 382, - 398, - 362, - 352, - 345, - 340, - 274, - 1, - 19, - 456, - 248, - 281, - 436, - 427, - 425, - 381, - 256, - 252, - 269, - 391, - 393, - 200, - 199, - 428, - 266, - 330, - 329, - 287, - 273, - 422, - 250, - 462, - 328, - 258, - 286, - 384, - 265, - 353, - 342, - 387, - 259, - 257, - 424, - 431, - 430, - 342, - 353, - 276, - 273, - 335, - 424, - 292, - 325, - 307, - 366, - 447, - 345, - 271, - 303, - 302, - 423, - 266, - 371, - 294, - 455, - 460, - 279, - 278, - 294, - 271, - 272, - 304, - 432, - 434, - 427, - 272, - 407, - 408, - 394, - 430, - 431, - 395, - 369, - 400, - 334, - 333, - 299, - 351, - 417, - 168, - 352, - 280, - 411, - 325, - 319, - 320, - 295, - 296, - 336, - 319, - 403, - 404, - 330, - 348, - 349, - 293, - 298, - 333, - 323, - 454, - 447, - 15, - 16, - 315, - 358, - 429, - 279, - 14, - 15, - 316, - 285, - 336, - 9, - 329, - 349, - 350, - 374, - 380, - 252, - 318, - 402, - 403, - 6, - 197, - 419, - 318, - 319, - 325, - 367, - 364, - 365, - 435, - 367, - 397, - 344, - 438, - 439, - 272, - 271, - 311, - 195, - 5, - 281, - 273, - 287, - 291, - 396, - 428, - 199, - 311, - 271, - 268, - 283, - 444, - 445, - 373, - 254, - 339, - 263, - 466, - 249, - 282, - 334, - 296, - 449, - 347, - 346, - 264, - 447, - 454, - 336, - 296, - 299, - 338, - 10, - 151, - 278, - 439, - 455, - 292, - 407, - 415, - 358, - 371, - 355, - 340, - 345, - 372, - 390, - 249, - 466, - 346, - 347, - 280, - 442, - 443, - 282, - 19, - 94, - 370, - 441, - 442, - 295, - 248, - 419, - 197, - 263, - 255, - 359, - 440, - 275, - 274, - 300, - 383, - 368, - 351, - 412, - 465, - 263, - 467, - 466, - 301, - 368, - 389, - 380, - 374, - 386, - 395, - 378, - 379, - 412, - 351, - 419, - 436, - 426, - 322, - 373, - 390, - 388, - 2, - 164, - 393, - 370, - 462, - 461, - 164, - 0, - 267, - 302, - 11, - 12, - 374, - 373, - 387, - 268, - 12, - 13, - 293, - 300, - 301, - 446, - 261, - 340, - 385, - 384, - 381, - 330, - 266, - 425, - 426, - 423, - 391, - 429, - 355, - 437, - 391, - 327, - 326, - 440, - 457, - 438, - 341, - 382, - 362, - 459, - 457, - 461, - 434, - 430, - 394, - 414, - 463, - 362, - 396, - 369, - 262, - 354, - 461, - 457, - 316, - 403, - 402, - 315, - 404, - 403, - 314, - 405, - 404, - 313, - 406, - 405, - 421, - 418, - 406, - 366, - 401, - 361, - 306, - 408, - 407, - 291, - 409, - 408, - 287, - 410, - 409, - 432, - 436, - 410, - 434, - 416, - 411, - 264, - 368, - 383, - 309, - 438, - 457, - 352, - 376, - 401, - 274, - 275, - 4, - 421, - 428, - 262, - 294, - 327, - 358, - 433, - 416, - 367, - 289, - 455, - 439, - 462, - 370, - 326, - 2, - 326, - 370, - 305, - 460, - 455, - 254, - 449, - 448, - 255, - 261, - 446, - 253, - 450, - 449, - 252, - 451, - 450, - 256, - 452, - 451, - 341, - 453, - 452, - 413, - 464, - 463, - 441, - 413, - 414, - 258, - 442, - 441, - 257, - 443, - 442, - 259, - 444, - 443, - 260, - 445, - 444, - 467, - 342, - 445, - 459, - 458, - 250, - 289, - 392, - 290, - 290, - 328, - 460, - 376, - 433, - 435, - 250, - 290, - 392, - 411, - 416, - 433, - 341, - 463, - 464, - 453, - 464, - 465, - 357, - 465, - 412, - 343, - 412, - 399, - 360, - 363, - 440, - 437, - 399, - 456, - 420, - 456, - 363, - 401, - 435, - 288, - 372, - 383, - 353, - 339, - 255, - 249, - 448, - 261, - 255, - 133, - 243, - 190, - 133, - 155, - 112, - 33, - 246, - 247, - 33, - 130, - 25, - 398, - 384, - 286, - 362, - 398, - 414, - 362, - 463, - 341, - 263, - 359, - 467, - 263, - 249, - 255, - 466, - 467, - 260, - 75, - 60, - 166, - 238, - 239, - 79, - 162, - 127, - 139, - 72, - 11, - 37, - 121, - 232, - 120, - 73, - 72, - 39, - 114, - 128, - 47, - 233, - 232, - 128, - 103, - 104, - 67, - 152, - 175, - 148, - 173, - 157, - 155, - 119, - 118, - 101, - 74, - 73, - 40, - 107, - 9, - 108, - 49, - 48, - 131, - 32, - 194, - 211, - 184, - 74, - 185, - 191, - 80, - 183, - 185, - 40, - 186, - 119, - 230, - 118, - 210, - 202, - 214, - 84, - 83, - 17, - 77, - 76, - 146, - 161, - 160, - 30, - 190, - 56, - 173, - 182, - 106, - 194, - 138, - 135, - 192, - 129, - 203, - 98, - 54, - 21, - 68, - 5, - 51, - 4, - 145, - 144, - 23, - 90, - 77, - 91, - 207, - 205, - 187, - 83, - 201, - 18, - 181, - 91, - 182, - 180, - 90, - 181, - 16, - 85, - 17, - 205, - 206, - 36, - 176, - 148, - 140, - 165, - 92, - 39, - 245, - 193, - 244, - 27, - 159, - 28, - 30, - 247, - 161, - 174, - 236, - 196, - 103, - 54, - 104, - 55, - 193, - 8, - 111, - 117, - 31, - 221, - 189, - 55, - 240, - 98, - 99, - 142, - 126, - 100, - 219, - 166, - 218, - 112, - 155, - 26, - 198, - 209, - 131, - 169, - 135, - 150, - 114, - 47, - 217, - 224, - 223, - 53, - 220, - 45, - 134, - 32, - 211, - 140, - 109, - 67, - 108, - 146, - 43, - 91, - 231, - 230, - 120, - 113, - 226, - 247, - 105, - 63, - 52, - 241, - 238, - 242, - 124, - 46, - 156, - 95, - 78, - 96, - 70, - 46, - 63, - 116, - 143, - 227, - 116, - 123, - 111, - 1, - 44, - 19, - 3, - 236, - 51, - 207, - 216, - 205, - 26, - 154, - 22, - 165, - 39, - 167, - 199, - 200, - 208, - 101, - 36, - 100, - 43, - 57, - 202, - 242, - 20, - 99, - 56, - 28, - 157, - 124, - 35, - 113, - 29, - 160, - 27, - 211, - 204, - 210, - 124, - 113, - 46, - 106, - 43, - 204, - 96, - 62, - 77, - 227, - 137, - 116, - 73, - 41, - 72, - 36, - 203, - 142, - 235, - 64, - 240, - 48, - 49, - 64, - 42, - 41, - 74, - 214, - 212, - 207, - 183, - 42, - 184, - 210, - 169, - 211, - 140, - 170, - 176, - 104, - 105, - 69, - 193, - 122, - 168, - 50, - 123, - 187, - 89, - 96, - 90, - 66, - 65, - 107, - 179, - 89, - 180, - 119, - 101, - 120, - 68, - 63, - 104, - 234, - 93, - 227, - 16, - 15, - 85, - 209, - 129, - 49, - 15, - 14, - 86, - 107, - 55, - 9, - 120, - 100, - 121, - 153, - 145, - 22, - 178, - 88, - 179, - 197, - 6, - 196, - 89, - 88, - 96, - 135, - 138, - 136, - 138, - 215, - 172, - 218, - 115, - 219, - 41, - 42, - 81, - 5, - 195, - 51, - 57, - 43, - 61, - 208, - 171, - 199, - 41, - 81, - 38, - 224, - 53, - 225, - 24, - 144, - 110, - 105, - 52, - 66, - 118, - 229, - 117, - 227, - 34, - 234, - 66, - 107, - 69, - 10, - 109, - 151, - 219, - 48, - 235, - 183, - 62, - 191, - 142, - 129, - 126, - 116, - 111, - 143, - 7, - 163, - 246, - 118, - 117, - 50, - 223, - 222, - 52, - 94, - 19, - 141, - 222, - 221, - 65, - 196, - 3, - 197, - 45, - 220, - 44, - 156, - 70, - 139, - 188, - 122, - 245, - 139, - 71, - 162, - 145, - 153, - 159, - 149, - 170, - 150, - 122, - 188, - 196, - 206, - 216, - 92, - 163, - 144, - 161, - 164, - 2, - 167, - 242, - 141, - 241, - 0, - 164, - 37, - 11, - 72, - 12, - 144, - 145, - 160, - 12, - 38, - 13, - 70, - 63, - 71, - 31, - 226, - 111, - 157, - 158, - 154, - 36, - 101, - 205, - 203, - 206, - 165, - 126, - 209, - 217, - 98, - 165, - 97, - 237, - 220, - 218, - 237, - 239, - 241, - 210, - 214, - 169, - 140, - 171, - 32, - 241, - 125, - 237, - 179, - 86, - 178, - 180, - 85, - 179, - 181, - 84, - 180, - 182, - 83, - 181, - 194, - 201, - 182, - 177, - 137, - 132, - 184, - 76, - 183, - 185, - 61, - 184, - 186, - 57, - 185, - 216, - 212, - 186, - 192, - 214, - 187, - 139, - 34, - 156, - 218, - 79, - 237, - 147, - 123, - 177, - 45, - 44, - 4, - 208, - 201, - 32, - 98, - 64, - 129, - 192, - 213, - 138, - 235, - 59, - 219, - 141, - 242, - 97, - 97, - 2, - 141, - 240, - 75, - 235, - 229, - 24, - 228, - 31, - 25, - 226, - 230, - 23, - 229, - 231, - 22, - 230, - 232, - 26, - 231, - 233, - 112, - 232, - 244, - 189, - 243, - 189, - 221, - 190, - 222, - 28, - 221, - 223, - 27, - 222, - 224, - 29, - 223, - 225, - 30, - 224, - 113, - 247, - 225, - 99, - 60, - 240, - 213, - 147, - 215, - 60, - 20, - 166, - 192, - 187, - 213, - 243, - 112, - 244, - 244, - 233, - 245, - 245, - 128, - 188, - 188, - 114, - 174, - 134, - 131, - 220, - 174, - 217, - 236, - 236, - 198, - 134, - 215, - 177, - 58, - 156, - 143, - 124, - 25, - 110, - 7, - 31, - 228, - 25, - 264, - 356, - 368, - 0, - 11, - 267, - 451, - 452, - 349, - 267, - 302, - 269, - 350, - 357, - 277, - 350, - 452, - 357, - 299, - 333, - 297, - 396, - 175, - 377, - 381, - 384, - 382, - 280, - 347, - 330, - 269, - 303, - 270, - 151, - 9, - 337, - 344, - 278, - 360, - 424, - 418, - 431, - 270, - 304, - 409, - 272, - 310, - 407, - 322, - 270, - 410, - 449, - 450, - 347, - 432, - 422, - 434, - 18, - 313, - 17, - 291, - 306, - 375, - 259, - 387, - 260, - 424, - 335, - 418, - 434, - 364, - 416, - 391, - 423, - 327, - 301, - 251, - 298, - 275, - 281, - 4, - 254, - 373, - 253, - 375, - 307, - 321, - 280, - 425, - 411, - 200, - 421, - 18, - 335, - 321, - 406, - 321, - 320, - 405, - 314, - 315, - 17, - 423, - 426, - 266, - 396, - 377, - 369, - 270, - 322, - 269, - 413, - 417, - 464, - 385, - 386, - 258, - 248, - 456, - 419, - 298, - 284, - 333, - 168, - 417, - 8, - 448, - 346, - 261, - 417, - 413, - 285, - 326, - 327, - 328, - 277, - 355, - 329, - 309, - 392, - 438, - 381, - 382, - 256, - 279, - 429, - 360, - 365, - 364, - 379, - 355, - 277, - 437, - 282, - 443, - 283, - 281, - 275, - 363, - 395, - 431, - 369, - 299, - 297, - 337, - 335, - 273, - 321, - 348, - 450, - 349, - 359, - 446, - 467, - 283, - 293, - 282, - 250, - 458, - 462, - 300, - 276, - 383, - 292, - 308, - 325, - 283, - 276, - 293, - 264, - 372, - 447, - 346, - 352, - 340, - 354, - 274, - 19, - 363, - 456, - 281, - 426, - 436, - 425, - 380, - 381, - 252, - 267, - 269, - 393, - 421, - 200, - 428, - 371, - 266, - 329, - 432, - 287, - 422, - 290, - 250, - 328, - 385, - 258, - 384, - 446, - 265, - 342, - 386, - 387, - 257, - 422, - 424, - 430, - 445, - 342, - 276, - 422, - 273, - 424, - 306, - 292, - 307, - 352, - 366, - 345, - 268, - 271, - 302, - 358, - 423, - 371, - 327, - 294, - 460, - 331, - 279, - 294, - 303, - 271, - 304, - 436, - 432, - 427, - 304, - 272, - 408, - 395, - 394, - 431, - 378, - 395, - 400, - 296, - 334, - 299, - 6, - 351, - 168, - 376, - 352, - 411, - 307, - 325, - 320, - 285, - 295, - 336, - 320, - 319, - 404, - 329, - 330, - 349, - 334, - 293, - 333, - 366, - 323, - 447, - 316, - 15, - 315, - 331, - 358, - 279, - 317, - 14, - 316, - 8, - 285, - 9, - 277, - 329, - 350, - 253, - 374, - 252, - 319, - 318, - 403, - 351, - 6, - 419, - 324, - 318, - 325, - 397, - 367, - 365, - 288, - 435, - 397, - 278, - 344, - 439, - 310, - 272, - 311, - 248, - 195, - 281, - 375, - 273, - 291, - 175, - 396, - 199, - 312, - 311, - 268, - 276, - 283, - 445, - 390, - 373, - 339, - 295, - 282, - 296, - 448, - 449, - 346, - 356, - 264, - 454, - 337, - 336, - 299, - 337, - 338, - 151, - 294, - 278, - 455, - 308, - 292, - 415, - 429, - 358, - 355, - 265, - 340, - 372, - 388, - 390, - 466, - 352, - 346, - 280, - 295, - 442, - 282, - 354, - 19, - 370, - 285, - 441, - 295, - 195, - 248, - 197, - 457, - 440, - 274, - 301, - 300, - 368, - 417, - 351, - 465, - 251, - 301, - 389, - 385, - 380, - 386, - 394, - 395, - 379, - 399, - 412, - 419, - 410, - 436, - 322, - 387, - 373, - 388, - 326, - 2, - 393, - 354, - 370, - 461, - 393, - 164, - 267, - 268, - 302, - 12, - 386, - 374, - 387, - 312, - 268, - 13, - 298, - 293, - 301, - 265, - 446, - 340, - 380, - 385, - 381, - 280, - 330, - 425, - 322, - 426, - 391, - 420, - 429, - 437, - 393, - 391, - 326, - 344, - 440, - 438, - 458, - 459, - 461, - 364, - 434, - 394, - 428, - 396, - 262, - 274, - 354, - 457, - 317, - 316, - 402, - 316, - 315, - 403, - 315, - 314, - 404, - 314, - 313, - 405, - 313, - 421, - 406, - 323, - 366, - 361, - 292, - 306, - 407, - 306, - 291, - 408, - 291, - 287, - 409, - 287, - 432, - 410, - 427, - 434, - 411, - 372, - 264, - 383, - 459, - 309, - 457, - 366, - 352, - 401, - 1, - 274, - 4, - 418, - 421, - 262, - 331, - 294, - 358, - 435, - 433, - 367, - 392, - 289, - 439, - 328, - 462, - 326, - 94, - 2, - 370, - 289, - 305, - 455, - 339, - 254, - 448, - 359, - 255, - 446, - 254, - 253, - 449, - 253, - 252, - 450, - 252, - 256, - 451, - 256, - 341, - 452, - 414, - 413, - 463, - 286, - 441, - 414, - 286, - 258, - 441, - 258, - 257, - 442, - 257, - 259, - 443, - 259, - 260, - 444, - 260, - 467, - 445, - 309, - 459, - 250, - 305, - 289, - 290, - 305, - 290, - 460, - 401, - 376, - 435, - 309, - 250, - 392, - 376, - 411, - 433, - 453, - 341, - 464, - 357, - 453, - 465, - 343, - 357, - 412, - 437, - 343, - 399, - 344, - 360, - 440, - 420, - 437, - 456, - 360, - 420, - 363, - 361, - 401, - 288, - 265, - 372, - 353, - 390, - 339, - 249, - 339, - 448, - 255 -]; -var VTX68 = [ - 127, - 234, - 132, - 58, - 172, - 150, - 149, - 148, - 152, - 377, - 378, - 379, - 397, - 288, - 361, - 454, - 356, - 70, - 63, - 105, - 66, - 107, - 336, - 296, - 334, - 293, - 300, - 168, - 6, - 195, - 4, - 98, - 97, - 2, - 326, - 327, - 33, - 160, - 158, - 133, - 153, - 144, - 362, - 385, - 387, - 263, - 373, - 380, - 57, - 40, - 37, - 0, - 267, - 270, - 287, - 321, - 314, - 17, - 84, - 91, - 78, - 81, - 13, - 311, - 308, - 402, - 14, - 178 -]; -var VTX33 = [33, 133, 362, 263, 1, 62, 308, 159, 145, 386, 374, 6, 102, 331, 2, 13, 14, 70, 105, 107, 336, 334, 300, 54, 10, 284, 50, 280, 234, 454, 58, 288, 152]; -var VTX7 = [33, 133, 362, 263, 1, 78, 308]; -var UV68 = VTX68.map((x) => UV468[x]); -var UV33 = VTX33.map((x) => UV468[x]); -var UV7 = VTX7.map((x) => UV468[x]); -function connectionsToIndices(connections) { - const indices = connections.map((connection) => connection[0]); - indices.push(connections[connections.length - 1][1]); - return indices; -} -var pairsLips = [ - [61, 146], - [146, 91], - [91, 181], - [181, 84], - [84, 17], - [17, 314], - [314, 405], - [405, 321], - [321, 375], - [375, 291], - [61, 185], - [185, 40], - [40, 39], - [39, 37], - [37, 0], - [0, 267], - [267, 269], - [269, 270], - [270, 409], - [409, 291], - [78, 95], - [95, 88], - [88, 178], - [178, 87], - [87, 14], - [14, 317], - [317, 402], - [402, 318], - [318, 324], - [324, 308], - [78, 191], - [191, 80], - [80, 81], - [81, 82], - [82, 13], - [13, 312], - [312, 311], - [311, 310], - [310, 415], - [415, 308] -]; -var pairsLeftEye = [[263, 249], [249, 390], [390, 373], [373, 374], [374, 380], [380, 381], [381, 382], [382, 362], [263, 466], [466, 388], [388, 387], [387, 386], [386, 385], [385, 384], [384, 398], [398, 362]]; -var pairsLeftEyebrow = [[276, 283], [283, 282], [282, 295], [295, 285], [300, 293], [293, 334], [334, 296], [296, 336]]; -var pairsLeftIris = [[474, 475], [475, 476], [476, 477], [477, 474]]; -var pairsRightEye = [[33, 7], [7, 163], [163, 144], [144, 145], [145, 153], [153, 154], [154, 155], [155, 133], [33, 246], [246, 161], [161, 160], [160, 159], [159, 158], [158, 157], [157, 173], [173, 133]]; -var pairsRightEyebrow = [[46, 53], [53, 52], [52, 65], [65, 55], [70, 63], [63, 105], [105, 66], [66, 107]]; -var pairsRightIris = [[469, 470], [470, 471], [471, 472], [472, 469]]; -var pairsFaceContour = [ - [10, 338], - [338, 297], - [297, 332], - [332, 284], - [284, 251], - [251, 389], - [389, 356], - [356, 454], - [454, 323], - [323, 361], - [361, 288], - [288, 397], - [397, 365], - [365, 379], - [379, 378], - [378, 400], - [400, 377], - [377, 152], - [152, 148], - [148, 176], - [176, 149], - [149, 150], - [150, 136], - [136, 172], - [172, 58], - [58, 132], - [132, 93], - [93, 234], - [234, 127], - [127, 162], - [162, 21], - [21, 54], - [54, 103], - [103, 67], - [67, 109], - [109, 10] -]; -var contourKeypoints = { - lips: connectionsToIndices(pairsLips), - leftEye: connectionsToIndices(pairsLeftEye), - leftEyebrow: connectionsToIndices(pairsLeftEyebrow), - leftIris: connectionsToIndices(pairsLeftIris), - rightEye: connectionsToIndices(pairsRightEye), - rightEyebrow: connectionsToIndices(pairsRightEyebrow), - rightIris: connectionsToIndices(pairsRightIris), - faceOval: connectionsToIndices(pairsFaceContour) -}; - -// src/tfjs/constants.ts -var constants = { - tf255: 255, - tf1: 1, - tf2: 2, - tf05: 0.5, - tf127: 127.5, - rgb: [0.2989, 0.587, 0.114] -}; -function init() { - constants.tf255 = tfjs_esm_exports.scalar(255, "float32"); - constants.tf1 = tfjs_esm_exports.scalar(1, "float32"); - constants.tf2 = tfjs_esm_exports.scalar(2, "float32"); - constants.tf05 = tfjs_esm_exports.scalar(0.5, "float32"); - constants.tf127 = tfjs_esm_exports.scalar(127.5, "float32"); - constants.rgb = tfjs_esm_exports.tensor1d([0.2989, 0.587, 0.114], "float32"); -} - -// src/face/facemeshutil.ts -var getBoxSize = (box) => [Math.abs(box.endPoint[0] - box.startPoint[0]), Math.abs(box.endPoint[1] - box.startPoint[1])]; -var getBoxCenter = (box) => [box.startPoint[0] + (box.endPoint[0] - box.startPoint[0]) / 2, box.startPoint[1] + (box.endPoint[1] - box.startPoint[1]) / 2, 1]; -var clampBox = (box, input) => box ? [ - Math.trunc(Math.max(0, box.startPoint[0])), - Math.trunc(Math.max(0, box.startPoint[1])), - Math.trunc(Math.min(input.shape[2] || 0, box.endPoint[0]) - Math.max(0, box.startPoint[0])), - Math.trunc(Math.min(input.shape[1] || 0, box.endPoint[1]) - Math.max(0, box.startPoint[1])) -] : [0, 0, 0, 0]; -var getRawBox = (box, input) => box ? [ - box.startPoint[0] / (input.shape[2] || 0), - box.startPoint[1] / (input.shape[1] || 0), - (box.endPoint[0] - box.startPoint[0]) / (input.shape[2] || 0), - (box.endPoint[1] - box.startPoint[1]) / (input.shape[1] || 0) -] : [0, 0, 0, 0]; -var scaleBoxCoordinates = (box, factor) => { - const startPoint = [box.startPoint[0] * factor[0], box.startPoint[1] * factor[1]]; - const endPoint = [box.endPoint[0] * factor[0], box.endPoint[1] * factor[1]]; - return { startPoint, endPoint, landmarks: box.landmarks, confidence: box.confidence }; -}; -var cutAndResize = (box, image27, cropSize) => { - const h = image27.shape[1]; - const w = image27.shape[2]; - const cutBox = [box.startPoint[1] / h, box.startPoint[0] / w, box.endPoint[1] / h, box.endPoint[0] / w]; - const crop = tfjs_esm_exports.image.cropAndResize(image27, [cutBox], [0], cropSize); - const norm = tfjs_esm_exports.div(crop, constants.tf255); - tfjs_esm_exports.dispose(crop); - return norm; -}; -var enlargeBox = (box, factor) => { - const center = getBoxCenter(box); - const size2 = getBoxSize(box); - const halfSize = [factor * size2[0] / 2, factor * size2[1] / 2]; - return { startPoint: [center[0] - halfSize[0], center[1] - halfSize[1]], endPoint: [center[0] + halfSize[0], center[1] + halfSize[1]], landmarks: box.landmarks, confidence: box.confidence }; -}; -var squarifyBox = (box) => { - const centers = getBoxCenter(box); - const size2 = getBoxSize(box); - const halfSize = Math.max(...size2) / 2; - return { startPoint: [Math.round(centers[0] - halfSize), Math.round(centers[1] - halfSize)], endPoint: [Math.round(centers[0] + halfSize), Math.round(centers[1] + halfSize)], landmarks: box.landmarks, confidence: box.confidence }; -}; -var calculateLandmarksBoundingBox = (landmarks) => { - const x = landmarks.map((d) => d[0]); - const y = landmarks.map((d) => d[1]); - return { startPoint: [Math.min(...x), Math.min(...y)], endPoint: [Math.max(...x), Math.max(...y)], landmarks }; -}; -var fixedRotationMatrix = [[1, 0, 0], [0, 1, 0], [0, 0, 1]]; -var normalizeRadians = (angle) => angle - 2 * Math.PI * Math.floor((angle + Math.PI) / (2 * Math.PI)); -var computeRotation = (point1, point2) => normalizeRadians(Math.PI / 2 - Math.atan2(-(point2[1] - point1[1]), point2[0] - point1[0])); -var buildTranslationMatrix = (x, y) => [[1, 0, x], [0, 1, y], [0, 0, 1]]; -var dot = (v1, v2) => { - let product = 0; - for (let i = 0; i < v1.length; i++) - product += v1[i] * v2[i]; - return product; -}; -var getColumnFrom2DArr = (arr, columnIndex) => { - const column = []; - for (let i = 0; i < arr.length; i++) - column.push(arr[i][columnIndex]); - return column; -}; -var multiplyTransformMatrices = (mat1, mat2) => { - const product = []; - const size2 = mat1.length; - for (let row = 0; row < size2; row++) { - product.push([]); - for (let col = 0; col < size2; col++) - product[row].push(dot(mat1[row], getColumnFrom2DArr(mat2, col))); - } - return product; -}; -var buildRotationMatrix = (rotation, center) => { - const cosA = Math.cos(rotation); - const sinA = Math.sin(rotation); - const rotationMatrix = [[cosA, -sinA, 0], [sinA, cosA, 0], [0, 0, 1]]; - const translationMatrix = buildTranslationMatrix(center[0], center[1]); - const translationTimesRotation = multiplyTransformMatrices(translationMatrix, rotationMatrix); - const negativeTranslationMatrix = buildTranslationMatrix(-center[0], -center[1]); - return multiplyTransformMatrices(translationTimesRotation, negativeTranslationMatrix); -}; -var invertTransformMatrix = (matrix) => { - const rotationComponent = [[matrix[0][0], matrix[1][0]], [matrix[0][1], matrix[1][1]]]; - const translationComponent = [matrix[0][2], matrix[1][2]]; - const invertedTranslation = [-dot(rotationComponent[0], translationComponent), -dot(rotationComponent[1], translationComponent)]; - return [rotationComponent[0].concat(invertedTranslation[0]), rotationComponent[1].concat(invertedTranslation[1]), [0, 0, 1]]; -}; -var rotatePoint = (homogeneousCoordinate, rotationMatrix) => [dot(homogeneousCoordinate, rotationMatrix[0]), dot(homogeneousCoordinate, rotationMatrix[1])]; -function generateAnchors(inputSize10) { - const spec = inputSize10 === 192 ? { strides: [4], anchors: [1] } : { strides: [inputSize10 / 16, inputSize10 / 8], anchors: [2, 6] }; - const anchors3 = []; - for (let i = 0; i < spec.strides.length; i++) { - const stride = spec.strides[i]; - const gridRows = Math.floor((inputSize10 + stride - 1) / stride); - const gridCols = Math.floor((inputSize10 + stride - 1) / stride); - const anchorsNum = spec.anchors[i]; - for (let gridY = 0; gridY < gridRows; gridY++) { - const anchorY = stride * (gridY + 0.5); - for (let gridX = 0; gridX < gridCols; gridX++) { - const anchorX = stride * (gridX + 0.5); - for (let n = 0; n < anchorsNum; n++) - anchors3.push([anchorX, anchorY]); - } - } - } - return anchors3; -} -function transformRawCoords(coordsRaw, box, angle, rotationMatrix, inputSize10) { - const boxSize = getBoxSize(box); - const coordsScaled = coordsRaw.map((coord) => [ - boxSize[0] / inputSize10 * (coord[0] - inputSize10 / 2), - boxSize[1] / inputSize10 * (coord[1] - inputSize10 / 2), - coord[2] || 0 - ]); - const largeAngle = angle && angle !== 0 && Math.abs(angle) > 0.2; - const coordsRotationMatrix = largeAngle ? buildRotationMatrix(angle, [0, 0]) : fixedRotationMatrix; - const coordsRotated = largeAngle ? coordsScaled.map((coord) => [...rotatePoint(coord, coordsRotationMatrix), coord[2]]) : coordsScaled; - const inverseRotationMatrix = largeAngle ? invertTransformMatrix(rotationMatrix) : fixedRotationMatrix; - const boxCenter = getBoxCenter(box); - const offsets = [dot(boxCenter, inverseRotationMatrix[0]), dot(boxCenter, inverseRotationMatrix[1])]; - return coordsRotated.map((coord) => [ - Math.trunc(coord[0] + offsets[0]), - Math.trunc(coord[1] + offsets[1]), - Math.trunc(coord[2] || 0) - ]); -} -function correctFaceRotation(rotate, box, input, inputSize10) { - const symmetryLine = box.landmarks.length >= meshLandmarks.count ? meshLandmarks.symmetryLine : blazeFaceLandmarks.symmetryLine; - let angle = 0; - let rotationMatrix = fixedRotationMatrix; - let face4; - if (rotate && env.kernels.includes("rotatewithoffset")) { - angle = computeRotation(box.landmarks[symmetryLine[0]], box.landmarks[symmetryLine[1]]); - const largeAngle = angle && angle !== 0 && Math.abs(angle) > 0.2; - if (largeAngle) { - const center = getBoxCenter(box); - const centerRaw = [center[0] / input.shape[2], center[1] / input.shape[1]]; - const rotated = tfjs_esm_exports.image.rotateWithOffset(input, angle, 0, centerRaw); - rotationMatrix = buildRotationMatrix(-angle, center); - face4 = cutAndResize(box, rotated, [inputSize10, inputSize10]); - tfjs_esm_exports.dispose(rotated); - } else { - face4 = cutAndResize(box, input, [inputSize10, inputSize10]); - } - } else { - face4 = cutAndResize(box, input, [inputSize10, inputSize10]); - } - return [angle, rotationMatrix, face4]; -} -var findFaceCenter = (mesh) => { - const x = mesh.map((m) => m[0]); - const y = mesh.map((m) => m[1]); - return [Math.min(...x) + (Math.max(...x) - Math.min(...x)) / 2, Math.min(...y) + (Math.max(...y) - Math.min(...y)) / 2]; -}; -var calculateFaceBox = (mesh, previousBox) => { - const center = findFaceCenter(mesh); - const boxSize = getBoxSize(previousBox); - const calculatedBox = { - startPoint: [center[0] - boxSize[0] / 2, center[1] - boxSize[1] / 2], - endPoint: [center[0] + boxSize[0] / 2, center[1] + boxSize[1] / 2] - }; - return calculatedBox; -}; - -// src/face/blazeface.ts -var keypointsCount = 6; -var faceBoxScaleFactor = 1.4; -var model2; -var anchors = null; -var inputSize = 0; -var inputSizeT = null; -var size = () => inputSize; -async function load2(config3) { - var _a; - if (env.initial) - model2 = null; - if (!model2) - model2 = await loadModel((_a = config3.face.detector) == null ? void 0 : _a.modelPath); - else if (config3.debug) - log("cached model:", model2["modelUrl"]); - inputSize = model2["executor"] && model2.inputs[0].shape ? model2.inputs[0].shape[2] : 256; - inputSizeT = tfjs_esm_exports.scalar(inputSize, "int32"); - anchors = tfjs_esm_exports.tensor2d(generateAnchors(inputSize)); - return model2; -} -function decodeBoxes(boxOutputs) { - const t2 = {}; - t2.boxStarts = tfjs_esm_exports.slice(boxOutputs, [0, 1], [-1, 2]); - t2.centers = tfjs_esm_exports.add(t2.boxStarts, anchors); - t2.boxSizes = tfjs_esm_exports.slice(boxOutputs, [0, 3], [-1, 2]); - t2.boxSizesNormalized = tfjs_esm_exports.div(t2.boxSizes, inputSizeT); - t2.centersNormalized = tfjs_esm_exports.div(t2.centers, inputSizeT); - t2.halfBoxSize = tfjs_esm_exports.div(t2.boxSizesNormalized, constants.tf2); - t2.starts = tfjs_esm_exports.sub(t2.centersNormalized, t2.halfBoxSize); - t2.ends = tfjs_esm_exports.add(t2.centersNormalized, t2.halfBoxSize); - t2.startNormalized = tfjs_esm_exports.mul(t2.starts, inputSizeT); - t2.endNormalized = tfjs_esm_exports.mul(t2.ends, inputSizeT); - const boxes = tfjs_esm_exports.concat2d([t2.startNormalized, t2.endNormalized], 1); - Object.keys(t2).forEach((tensor6) => tfjs_esm_exports.dispose(t2[tensor6])); - return boxes; -} -async function getBoxes(inputImage, config3) { - var _a, _b, _c, _d; - if (!inputImage || inputImage["isDisposedInternal"] || inputImage.shape.length !== 4 || inputImage.shape[1] < 1 || inputImage.shape[2] < 1) - return []; - const t2 = {}; - t2.resized = tfjs_esm_exports.image.resizeBilinear(inputImage, [inputSize, inputSize]); - t2.div = tfjs_esm_exports.div(t2.resized, constants.tf127); - t2.normalized = tfjs_esm_exports.sub(t2.div, constants.tf05); - const res = model2 == null ? void 0 : model2.execute(t2.normalized); - if (Array.isArray(res) && res.length > 2) { - const sorted = res.sort((a, b) => a.size - b.size); - t2.concat384 = tfjs_esm_exports.concat([sorted[0], sorted[2]], 2); - t2.concat512 = tfjs_esm_exports.concat([sorted[1], sorted[3]], 2); - t2.concat = tfjs_esm_exports.concat([t2.concat512, t2.concat384], 1); - t2.batch = tfjs_esm_exports.squeeze(t2.concat, 0); - } else if (Array.isArray(res)) { - t2.batch = tfjs_esm_exports.squeeze(res[0]); - } else { - t2.batch = tfjs_esm_exports.squeeze(res); - } - tfjs_esm_exports.dispose(res); - t2.boxes = decodeBoxes(t2.batch); - t2.logits = tfjs_esm_exports.slice(t2.batch, [0, 0], [-1, 1]); - t2.sigmoid = tfjs_esm_exports.sigmoid(t2.logits); - t2.scores = tfjs_esm_exports.squeeze(t2.sigmoid); - t2.nms = await tfjs_esm_exports.image.nonMaxSuppressionAsync(t2.boxes, t2.scores, ((_a = config3.face.detector) == null ? void 0 : _a.maxDetected) || 0, ((_b = config3.face.detector) == null ? void 0 : _b.iouThreshold) || 0, ((_c = config3.face.detector) == null ? void 0 : _c.minConfidence) || 0); - const nms = await t2.nms.array(); - const boxes = []; - const scores = await t2.scores.data(); - for (let i = 0; i < nms.length; i++) { - const confidence = scores[nms[i]]; - if (confidence > (((_d = config3.face.detector) == null ? void 0 : _d.minConfidence) || 0)) { - const b = {}; - b.bbox = tfjs_esm_exports.slice(t2.boxes, [nms[i], 0], [1, -1]); - b.slice = tfjs_esm_exports.slice(t2.batch, [nms[i], keypointsCount - 1], [1, -1]); - b.squeeze = tfjs_esm_exports.squeeze(b.slice); - b.landmarks = tfjs_esm_exports.reshape(b.squeeze, [keypointsCount, -1]); - const points = await b.bbox.data(); - const rawBox = { - startPoint: [points[0], points[1]], - endPoint: [points[2], points[3]], - landmarks: await b.landmarks.array(), - confidence - }; - const scaledBox = scaleBoxCoordinates(rawBox, [(inputImage.shape[2] || 0) / inputSize, (inputImage.shape[1] || 0) / inputSize]); - const enlargedBox = enlargeBox(scaledBox, config3.face["scale"] || faceBoxScaleFactor); - const squaredBox = squarifyBox(enlargedBox); - boxes.push(squaredBox); - Object.keys(b).forEach((tensor6) => tfjs_esm_exports.dispose(b[tensor6])); - } - } - Object.keys(t2).forEach((tensor6) => tfjs_esm_exports.dispose(t2[tensor6])); - return boxes; -} - -// src/body/blazeposecoords.ts -var blazeposecoords_exports = {}; -__export(blazeposecoords_exports, { - connected: () => connected, - kpt: () => kpt -}); -var kpt = [ - "nose", - "leftEyeInside", - "leftEye", - "leftEyeOutside", - "rightEyeInside", - "rightEye", - "rightEyeOutside", - "leftEar", - "rightEar", - "leftMouth", - "rightMouth", - "leftShoulder", - "rightShoulder", - "leftElbow", - "rightElbow", - "leftWrist", - "rightWrist", - "leftPinky", - "rightPinky", - "leftIndex", - "rightIndex", - "leftThumb", - "rightThumb", - "leftHip", - "rightHip", - "leftKnee", - "rightKnee", - "leftAnkle", - "rightAnkle", - "leftHeel", - "rightHeel", - "leftFoot", - "rightFoot", - "bodyCenter", - "bodyTop", - "leftPalm", - "leftHand", - "rightPalm", - "rightHand" -]; -var connected = { - shoulders: ["leftShoulder", "rightShoulder"], - hips: ["rightHip", "leftHip"], - mouth: ["leftMouth", "rightMouth"], - leftLegUpper: ["leftHip", "leftKnee"], - leftLegLower: ["leftKnee", "leftAnkle"], - leftFoot: ["leftAnkle", "leftHeel", "leftFoot"], - leftTorso: ["leftShoulder", "leftHip"], - leftArmUpper: ["leftShoulder", "leftElbow"], - leftArmLower: ["leftElbow", "leftWrist"], - leftHand: ["leftWrist", "leftPalm"], - leftHandPinky: ["leftPalm", "leftPinky"], - leftHandIndex: ["leftPalm", "leftIndex"], - leftHandThumb: ["leftPalm", "leftThumb"], - leftEyeOutline: ["leftEyeInside", "leftEyeOutside"], - rightLegUpper: ["rightHip", "rightKnee"], - rightLegLower: ["rightKnee", "rightAnkle"], - rightFoot: ["rightAnkle", "rightHeel", "rightFoot"], - rightTorso: ["rightShoulder", "rightHip"], - rightArmUpper: ["rightShoulder", "rightElbow"], - rightArmLower: ["rightElbow", "rightWrist"], - rightHand: ["rightWrist", "rightPalm"], - rightHandPinky: ["rightPalm", "rightPinky"], - rightHandIndex: ["rightPalm", "rightIndex"], - rightHandThumb: ["rightPalm", "rightThumb"], - rightEyeOutline: ["rightEyeInside", "rightEyeOutside"] -}; - -// src/body/blazeposedetector.ts -var inputSize2 = 224; -var anchorTensor; -var numLayers = 5; -var strides = [8, 16, 32, 32, 32]; -function createAnchors() { - const anchors3 = []; - let layerId = 0; - while (layerId < numLayers) { - let anchorCount = 0; - let lastSameStrideLayer = layerId; - while (lastSameStrideLayer < strides.length && strides[lastSameStrideLayer] === strides[layerId]) { - anchorCount += 2; - lastSameStrideLayer++; - } - const stride = strides[layerId]; - const featureMapHeight = Math.ceil(inputSize2 / stride); - const featureMapWidth = Math.ceil(inputSize2 / stride); - for (let y = 0; y < featureMapHeight; ++y) { - for (let x = 0; x < featureMapWidth; ++x) { - for (let anchorId = 0; anchorId < anchorCount; ++anchorId) { - anchors3.push({ x: (x + 0.5) / featureMapWidth, y: (y + 0.5) / featureMapHeight }); - } - } - } - layerId = lastSameStrideLayer; - } - anchorTensor = { x: tfjs_esm_exports.tensor1d(anchors3.map((a) => a.x)), y: tfjs_esm_exports.tensor1d(anchors3.map((a) => a.y)) }; -} - -// src/util/box.ts -function calc(keypoints, outputSize2 = [1, 1]) { - const coords = [keypoints.map((pt) => pt[0]), keypoints.map((pt) => pt[1])]; - const min2 = [Math.min(...coords[0]), Math.min(...coords[1])]; - const max4 = [Math.max(...coords[0]), Math.max(...coords[1])]; - const box = [min2[0], min2[1], max4[0] - min2[0], max4[1] - min2[1]]; - const boxRaw = [box[0] / outputSize2[0], box[1] / outputSize2[1], box[2] / outputSize2[0], box[3] / outputSize2[1]]; - return { box, boxRaw }; -} -function square(keypoints, outputSize2 = [1, 1]) { - const coords = [keypoints.map((pt) => pt[0]), keypoints.map((pt) => pt[1])]; - const min2 = [Math.min(...coords[0]), Math.min(...coords[1])]; - const max4 = [Math.max(...coords[0]), Math.max(...coords[1])]; - const center = [(min2[0] + max4[0]) / 2, (min2[1] + max4[1]) / 2]; - const dist = Math.max(center[0] - min2[0], center[1] - min2[1], -center[0] + max4[0], -center[1] + max4[1]); - const box = [Math.trunc(center[0] - dist), Math.trunc(center[1] - dist), Math.trunc(2 * dist), Math.trunc(2 * dist)]; - const boxRaw = [box[0] / outputSize2[0], box[1] / outputSize2[1], box[2] / outputSize2[0], box[3] / outputSize2[1]]; - return { box, boxRaw }; -} -function scale(box, scaleFact) { - const dist = [box[2] * scaleFact, box[3] * scaleFact]; - const newBox = [ - box[0] - (dist[0] - box[2]) / 2, - box[1] - (dist[1] - box[3]) / 2, - dist[0], - dist[1] - ]; - return newBox; -} - -// src/body/blazepose.ts -var env3 = { initial: true }; -var models2 = { detector: null, landmarks: null }; -var inputSize3 = { detector: [224, 224], landmarks: [256, 256] }; -var skipped2 = Number.MAX_SAFE_INTEGER; -var outputNodes = { - landmarks: ["ld_3d", "activation_segmentation", "activation_heatmap", "world_3d", "output_poseflag"], - detector: [] -}; -var cache = null; -var cropBox; -var padding = [[0, 0], [0, 0], [0, 0], [0, 0]]; -var lastTime2 = 0; -var sigmoid3 = (x) => 1 - 1 / (1 + Math.exp(x)); -async function loadDetect(config3) { - var _a; - if (env3.initial) - models2.detector = null; - if (!models2.detector && config3.body["detector"] && config3.body["detector"].modelPath || "") { - models2.detector = await loadModel(config3.body["detector"].modelPath); - const inputs = ((_a = models2.detector) == null ? void 0 : _a["executor"]) ? Object.values(models2.detector.modelSignature["inputs"]) : void 0; - inputSize3.detector[0] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[1].size) : 0; - inputSize3.detector[1] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : 0; - } else if (config3.debug && models2.detector) - log("cached model:", models2.detector["modelUrl"]); - createAnchors(); - return models2.detector; -} -async function loadPose(config3) { - var _a; - if (env3.initial) - models2.landmarks = null; - if (!models2.landmarks) { - models2.landmarks = await loadModel(config3.body.modelPath); - const inputs = ((_a = models2.landmarks) == null ? void 0 : _a["executor"]) ? Object.values(models2.landmarks.modelSignature["inputs"]) : void 0; - inputSize3.landmarks[0] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[1].size) : 0; - inputSize3.landmarks[1] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : 0; - } else if (config3.debug) - log("cached model:", models2.landmarks["modelUrl"]); - return models2.landmarks; -} -function prepareImage(input, size2) { - var _a, _b; - const t2 = {}; - if (!((_a = input == null ? void 0 : input.shape) == null ? void 0 : _a[1]) || !((_b = input == null ? void 0 : input.shape) == null ? void 0 : _b[2])) - return input; - let final; - if (cropBox) { - t2.cropped = tfjs_esm_exports.image.cropAndResize(input, [cropBox], [0], [input.shape[1], input.shape[2]]); - } - if (input.shape[1] !== input.shape[2]) { - const height = [ - input.shape[2] > input.shape[1] ? Math.trunc((input.shape[2] - input.shape[1]) / 2) : 0, - input.shape[2] > input.shape[1] ? Math.trunc((input.shape[2] - input.shape[1]) / 2) : 0 - ]; - const width = [ - input.shape[1] > input.shape[2] ? Math.trunc((input.shape[1] - input.shape[2]) / 2) : 0, - input.shape[1] > input.shape[2] ? Math.trunc((input.shape[1] - input.shape[2]) / 2) : 0 - ]; - padding = [ - [0, 0], - height, - width, - [0, 0] - ]; - t2.pad = tfjs_esm_exports.pad(t2.cropped || input, padding); - t2.resize = tfjs_esm_exports.image.resizeBilinear(t2.pad, [size2, size2]); - final = tfjs_esm_exports.div(t2.resize, constants.tf255); - } else if (input.shape[1] !== size2) { - t2.resize = tfjs_esm_exports.image.resizeBilinear(t2.cropped || input, [size2, size2]); - final = tfjs_esm_exports.div(t2.resize, constants.tf255); - } else { - final = tfjs_esm_exports.div(t2.cropped || input, constants.tf255); - } - Object.keys(t2).forEach((tensor6) => tfjs_esm_exports.dispose(t2[tensor6])); - return final; -} -function rescaleKeypoints(keypoints, outputSize2) { - for (const kpt4 of keypoints) { - kpt4.position = [ - Math.trunc(kpt4.position[0] * (outputSize2[0] + padding[2][0] + padding[2][1]) / outputSize2[0] - padding[2][0]), - Math.trunc(kpt4.position[1] * (outputSize2[1] + padding[1][0] + padding[1][1]) / outputSize2[1] - padding[1][0]), - kpt4.position[2] - ]; - kpt4.positionRaw = [kpt4.position[0] / outputSize2[0], kpt4.position[1] / outputSize2[1], 2 * kpt4.position[2] / (outputSize2[0] + outputSize2[1])]; - } - if (cropBox) { - for (const kpt4 of keypoints) { - kpt4.positionRaw = [ - kpt4.positionRaw[0] + cropBox[1], - kpt4.positionRaw[1] + cropBox[0], - kpt4.positionRaw[2] - ]; - kpt4.position = [ - Math.trunc(kpt4.positionRaw[0] * outputSize2[0]), - Math.trunc(kpt4.positionRaw[1] * outputSize2[1]), - kpt4.positionRaw[2] - ]; - } - } - return keypoints; -} -function fixKeypoints(keypoints) { - const leftPalm = keypoints.find((k) => k.part === "leftPalm"); - const leftWrist = keypoints.find((k) => k.part === "leftWrist"); - const leftIndex = keypoints.find((k) => k.part === "leftIndex"); - leftPalm.position[2] = ((leftWrist.position[2] || 0) + (leftIndex.position[2] || 0)) / 2; - const rightPalm = keypoints.find((k) => k.part === "rightPalm"); - const rightWrist = keypoints.find((k) => k.part === "rightWrist"); - const rightIndex = keypoints.find((k) => k.part === "rightIndex"); - rightPalm.position[2] = ((rightWrist.position[2] || 0) + (rightIndex.position[2] || 0)) / 2; -} -async function detectLandmarks(input, config3, outputSize2) { - var _a, _b; - if (!((_a = models2.landmarks) == null ? void 0 : _a["executor"])) - return null; - const t2 = {}; - [t2.ld, t2.segmentation, t2.heatmap, t2.world, t2.poseflag] = (_b = models2.landmarks) == null ? void 0 : _b.execute(input, outputNodes.landmarks); - const poseScore = (await t2.poseflag.data())[0]; - const points = await t2.ld.data(); - const distances = await t2.world.data(); - Object.keys(t2).forEach((tensor6) => tfjs_esm_exports.dispose(t2[tensor6])); - const keypointsRelative = []; - const depth = 5; - for (let i = 0; i < points.length / depth; i++) { - const score = sigmoid3(points[depth * i + 3]); - const presence = sigmoid3(points[depth * i + 4]); - const adjScore = Math.trunc(100 * score * presence * poseScore) / 100; - const positionRaw = [points[depth * i + 0] / inputSize3.landmarks[0], points[depth * i + 1] / inputSize3.landmarks[1], points[depth * i + 2] + 0]; - const position = [Math.trunc(outputSize2[0] * positionRaw[0]), Math.trunc(outputSize2[1] * positionRaw[1]), positionRaw[2]]; - const distance2 = [distances[depth * i + 0], distances[depth * i + 1], distances[depth * i + 2] + 0]; - keypointsRelative.push({ part: kpt[i], positionRaw, position, distance: distance2, score: adjScore }); - } - if (poseScore < (config3.body.minConfidence || 0)) - return null; - fixKeypoints(keypointsRelative); - const keypoints = rescaleKeypoints(keypointsRelative, outputSize2); - const kpts = keypoints.map((k) => k.position); - const boxes = calc(kpts, [outputSize2[0], outputSize2[1]]); - const annotations2 = {}; - for (const [name, indexes] of Object.entries(connected)) { - const pt = []; - for (let i = 0; i < indexes.length - 1; i++) { - const pt0 = keypoints.find((kpt4) => kpt4.part === indexes[i]); - const pt1 = keypoints.find((kpt4) => kpt4.part === indexes[i + 1]); - if (pt0 && pt1) - pt.push([pt0.position, pt1.position]); - } - annotations2[name] = pt; - } - const body4 = { id: 0, score: Math.trunc(100 * poseScore) / 100, box: boxes.box, boxRaw: boxes.boxRaw, keypoints, annotations: annotations2 }; - return body4; -} -async function predict2(input, config3) { - const outputSize2 = [input.shape[2] || 0, input.shape[1] || 0]; - const skipTime = (config3.body.skipTime || 0) > now() - lastTime2; - const skipFrame = skipped2 < (config3.body.skipFrames || 0); - if (config3.skipAllowed && skipTime && skipFrame && cache !== null) { - skipped2++; - } else { - const t2 = {}; - t2.landmarks = prepareImage(input, 256); - cache = await detectLandmarks(t2.landmarks, config3, outputSize2); - Object.keys(t2).forEach((tensor6) => tfjs_esm_exports.dispose(t2[tensor6])); - lastTime2 = now(); - skipped2 = 0; - } - return cache ? [cache] : []; -} - -// src/object/labels.ts -var labels = [ - { class: 1, label: "person" }, - { class: 2, label: "bicycle" }, - { class: 3, label: "car" }, - { class: 4, label: "motorcycle" }, - { class: 5, label: "airplane" }, - { class: 6, label: "bus" }, - { class: 7, label: "train" }, - { class: 8, label: "truck" }, - { class: 9, label: "boat" }, - { class: 10, label: "traffic light" }, - { class: 11, label: "fire hydrant" }, - { class: 12, label: "stop sign" }, - { class: 13, label: "parking meter" }, - { class: 14, label: "bench" }, - { class: 15, label: "bird" }, - { class: 16, label: "cat" }, - { class: 17, label: "dog" }, - { class: 18, label: "horse" }, - { class: 19, label: "sheep" }, - { class: 20, label: "cow" }, - { class: 21, label: "elephant" }, - { class: 22, label: "bear" }, - { class: 23, label: "zebra" }, - { class: 24, label: "giraffe" }, - { class: 25, label: "backpack" }, - { class: 26, label: "umbrella" }, - { class: 27, label: "handbag" }, - { class: 28, label: "tie" }, - { class: 29, label: "suitcase" }, - { class: 30, label: "frisbee" }, - { class: 31, label: "skis" }, - { class: 32, label: "snowboard" }, - { class: 33, label: "sports ball" }, - { class: 34, label: "kite" }, - { class: 35, label: "baseball bat" }, - { class: 36, label: "baseball glove" }, - { class: 37, label: "skateboard" }, - { class: 38, label: "surfboard" }, - { class: 39, label: "tennis racket" }, - { class: 40, label: "bottle" }, - { class: 41, label: "wine glass" }, - { class: 42, label: "cup" }, - { class: 43, label: "fork" }, - { class: 44, label: "knife" }, - { class: 45, label: "spoon" }, - { class: 46, label: "bowl" }, - { class: 47, label: "banana" }, - { class: 48, label: "apple" }, - { class: 49, label: "sandwich" }, - { class: 50, label: "orange" }, - { class: 51, label: "broccoli" }, - { class: 52, label: "carrot" }, - { class: 53, label: "hot dog" }, - { class: 54, label: "pizza" }, - { class: 55, label: "donut" }, - { class: 56, label: "cake" }, - { class: 57, label: "chair" }, - { class: 58, label: "couch" }, - { class: 59, label: "potted plant" }, - { class: 60, label: "bed" }, - { class: 61, label: "dining table" }, - { class: 62, label: "toilet" }, - { class: 63, label: "tv" }, - { class: 64, label: "laptop" }, - { class: 65, label: "mouse" }, - { class: 66, label: "remote" }, - { class: 67, label: "keyboard" }, - { class: 68, label: "cell phone" }, - { class: 69, label: "microwave" }, - { class: 70, label: "oven" }, - { class: 71, label: "toaster" }, - { class: 72, label: "sink" }, - { class: 73, label: "refrigerator" }, - { class: 74, label: "book" }, - { class: 75, label: "clock" }, - { class: 76, label: "vase" }, - { class: 77, label: "scissors" }, - { class: 78, label: "teddy bear" }, - { class: 79, label: "hair drier" }, - { class: 80, label: "toothbrush" } -]; - -// src/object/centernet.ts -var model3; -var inputSize4 = 0; -var last2 = []; -var lastTime3 = 0; -var skipped3 = Number.MAX_SAFE_INTEGER; -async function load3(config3) { - if (env.initial) - model3 = null; - if (!model3) { - model3 = await loadModel(config3.object.modelPath); - const inputs = (model3 == null ? void 0 : model3["executor"]) ? Object.values(model3.modelSignature["inputs"]) : void 0; - inputSize4 = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : 0; - } else if (config3.debug) - log("cached model:", model3["modelUrl"]); - return model3; -} -async function process3(res, outputShape, config3) { - if (!res) - return []; - const t2 = {}; - const results = []; - const detections = await res.array(); - t2.squeeze = tfjs_esm_exports.squeeze(res); - const arr = tfjs_esm_exports.split(t2.squeeze, 6, 1); - t2.stack = tfjs_esm_exports.stack([arr[1], arr[0], arr[3], arr[2]], 1); - t2.boxes = tfjs_esm_exports.squeeze(t2.stack); - t2.scores = tfjs_esm_exports.squeeze(arr[4]); - t2.classes = tfjs_esm_exports.squeeze(arr[5]); - tfjs_esm_exports.dispose([res, ...arr]); - t2.nms = await tfjs_esm_exports.image.nonMaxSuppressionAsync(t2.boxes, t2.scores, config3.object.maxDetected, config3.object.iouThreshold, config3.object.minConfidence || 0); - const nms = await t2.nms.data(); - let i = 0; - for (const id of Array.from(nms)) { - const score = Math.trunc(100 * detections[0][id][4]) / 100; - const classVal = detections[0][id][5]; - if (Number.isNaN(classVal)) - continue; - const label = labels[classVal].label; - const [x, y] = [ - detections[0][id][0] / inputSize4, - detections[0][id][1] / inputSize4 - ]; - const boxRaw = [ - x, - y, - detections[0][id][2] / inputSize4 - x, - detections[0][id][3] / inputSize4 - y - ]; - const box = [ - Math.trunc(boxRaw[0] * outputShape[0]), - Math.trunc(boxRaw[1] * outputShape[1]), - Math.trunc(boxRaw[2] * outputShape[0]), - Math.trunc(boxRaw[3] * outputShape[1]) - ]; - results.push({ id: i++, score, class: classVal, label, box, boxRaw }); - } - Object.keys(t2).forEach((tensor6) => tfjs_esm_exports.dispose(t2[tensor6])); - return results; -} -async function predict3(input, config3) { - if (!(model3 == null ? void 0 : model3["executor"])) - return []; - const skipTime = (config3.object.skipTime || 0) > now() - lastTime3; - const skipFrame = skipped3 < (config3.object.skipFrames || 0); - if (config3.skipAllowed && skipTime && skipFrame && last2.length > 0) { - skipped3++; - return last2; - } - skipped3 = 0; - return new Promise(async (resolve) => { - const outputSize2 = [input.shape[2] || 0, input.shape[1] || 0]; - const resize = tfjs_esm_exports.image.resizeBilinear(input, [inputSize4, inputSize4]); - const objectT = config3.object.enabled ? model3 == null ? void 0 : model3.execute(resize, ["tower_0/detections"]) : null; - lastTime3 = now(); - tfjs_esm_exports.dispose(resize); - const obj = await process3(objectT, outputSize2, config3); - last2 = obj; - resolve(obj); - }); -} - -// src/body/efficientposecoords.ts -var efficientposecoords_exports = {}; -__export(efficientposecoords_exports, { - connected: () => connected2, - kpt: () => kpt2 -}); -var kpt2 = [ - "head", - "neck", - "rightShoulder", - "rightElbow", - "rightWrist", - "chest", - "leftShoulder", - "leftElbow", - "leftWrist", - "bodyCenter", - "rightHip", - "rightKnee", - "rightAnkle", - "leftHip", - "leftKnee", - "leftAnkle" -]; -var connected2 = { - leftLeg: ["leftHip", "leftKnee", "leftAnkle"], - rightLeg: ["rightHip", "rightKnee", "rightAnkle"], - torso: ["leftShoulder", "rightShoulder", "rightHip", "leftHip", "leftShoulder"], - leftArm: ["leftShoulder", "leftElbow", "leftWrist"], - rightArm: ["rightShoulder", "rightElbow", "rightWrist"], - head: [] -}; - -// src/body/efficientpose.ts -var model4; -var lastTime4 = 0; -var cache2 = { id: 0, keypoints: [], box: [0, 0, 0, 0], boxRaw: [0, 0, 0, 0], score: 0, annotations: {} }; -var skipped4 = Number.MAX_SAFE_INTEGER; -async function load4(config3) { - if (env.initial) - model4 = null; - if (!model4) - model4 = await loadModel(config3.body.modelPath); - else if (config3.debug) - log("cached model:", model4["modelUrl"]); - return model4; -} -async function max2d(inputs, minScore) { - const [width, height] = inputs.shape; - const reshaped = tfjs_esm_exports.reshape(inputs, [height * width]); - const max4 = tfjs_esm_exports.max(reshaped, 0); - const newScore = (await max4.data())[0]; - if (newScore > minScore) { - const coordinates = tfjs_esm_exports.argMax(reshaped, 0); - const mod3 = tfjs_esm_exports.mod(coordinates, width); - const x = (await mod3.data())[0]; - const div16 = tfjs_esm_exports.div(coordinates, width); - const y = (await div16.data())[0]; - tfjs_esm_exports.dispose([reshaped, max4, coordinates, mod3, div16]); - return [x, y, newScore]; - } - tfjs_esm_exports.dispose([reshaped, max4]); - return [0, 0, newScore]; -} -async function predict4(image27, config3) { - if (!(model4 == null ? void 0 : model4["executor"])) - return []; - const skipTime = (config3.body.skipTime || 0) > now() - lastTime4; - const skipFrame = skipped4 < (config3.body.skipFrames || 0); - if (config3.skipAllowed && skipTime && skipFrame && Object.keys(cache2.keypoints).length > 0) { - skipped4++; - return [cache2]; - } - skipped4 = 0; - return new Promise(async (resolve) => { - const tensor6 = tfjs_esm_exports.tidy(() => { - if (!(model4 == null ? void 0 : model4.inputs[0].shape)) - return null; - const resize = tfjs_esm_exports.image.resizeBilinear(image27, [model4.inputs[0].shape[2], model4.inputs[0].shape[1]], false); - const enhance2 = tfjs_esm_exports.mul(resize, constants.tf2); - const norm = tfjs_esm_exports.sub(enhance2, constants.tf1); - return norm; - }); - let resT; - if (config3.body.enabled) - resT = model4 == null ? void 0 : model4.execute(tensor6); - lastTime4 = now(); - tfjs_esm_exports.dispose(tensor6); - if (resT) { - cache2.keypoints.length = 0; - const squeeze14 = tfjs_esm_exports.squeeze(resT); - tfjs_esm_exports.dispose(resT); - const stack5 = tfjs_esm_exports.unstack(squeeze14, 2); - tfjs_esm_exports.dispose(squeeze14); - for (let id = 0; id < stack5.length; id++) { - const [x2, y2, partScore] = await max2d(stack5[id], config3.body.minConfidence); - if (partScore > (config3.body.minConfidence || 0)) { - cache2.keypoints.push({ - score: Math.round(100 * partScore) / 100, - part: kpt2[id], - positionRaw: [ - x2 / model4.inputs[0].shape[2], - y2 / model4.inputs[0].shape[1] - ], - position: [ - Math.round(image27.shape[2] * x2 / model4.inputs[0].shape[2]), - Math.round(image27.shape[1] * y2 / model4.inputs[0].shape[1]) - ] - }); - } - } - stack5.forEach((s) => tfjs_esm_exports.dispose(s)); - } - cache2.score = cache2.keypoints.reduce((prev, curr) => curr.score > prev ? curr.score : prev, 0); - const x = cache2.keypoints.map((a) => a.position[0]); - const y = cache2.keypoints.map((a) => a.position[1]); - cache2.box = [ - Math.min(...x), - Math.min(...y), - Math.max(...x) - Math.min(...x), - Math.max(...y) - Math.min(...y) - ]; - const xRaw = cache2.keypoints.map((a) => a.positionRaw[0]); - const yRaw = cache2.keypoints.map((a) => a.positionRaw[1]); - cache2.boxRaw = [ - Math.min(...xRaw), - Math.min(...yRaw), - Math.max(...xRaw) - Math.min(...xRaw), - Math.max(...yRaw) - Math.min(...yRaw) - ]; - for (const [name, indexes] of Object.entries(connected2)) { - const pt = []; - for (let i = 0; i < indexes.length - 1; i++) { - const pt0 = cache2.keypoints.find((kpt4) => kpt4.part === indexes[i]); - const pt1 = cache2.keypoints.find((kpt4) => kpt4.part === indexes[i + 1]); - if (pt0 && pt1 && pt0.score > (config3.body.minConfidence || 0) && pt1.score > (config3.body.minConfidence || 0)) - pt.push([pt0.position, pt1.position]); - } - cache2.annotations[name] = pt; - } - resolve([cache2]); - }); -} - -// src/gear/emotion.ts -var annotations = ["angry", "disgust", "fear", "happy", "sad", "surprise", "neutral"]; -var model5; -var last3 = []; -var lastCount2 = 0; -var lastTime5 = 0; -var skipped5 = Number.MAX_SAFE_INTEGER; -async function load5(config3) { - var _a; - if (env.initial) - model5 = null; - if (!model5) - model5 = await loadModel((_a = config3.face.emotion) == null ? void 0 : _a.modelPath); - else if (config3.debug) - log("cached model:", model5["modelUrl"]); - return model5; -} -async function predict5(image27, config3, idx, count2) { - var _a, _b; - if (!model5) - return []; - const skipFrame = skipped5 < (((_a = config3.face.emotion) == null ? void 0 : _a.skipFrames) || 0); - const skipTime = (((_b = config3.face.emotion) == null ? void 0 : _b.skipTime) || 0) > now() - lastTime5; - if (config3.skipAllowed && skipTime && skipFrame && lastCount2 === count2 && last3[idx] && last3[idx].length > 0) { - skipped5++; - return last3[idx]; - } - skipped5 = 0; - return new Promise(async (resolve) => { - var _a2; - const obj = []; - if ((_a2 = config3.face.emotion) == null ? void 0 : _a2.enabled) { - const t2 = {}; - const inputSize10 = (model5 == null ? void 0 : model5.inputs[0].shape) ? model5.inputs[0].shape[2] : 0; - t2.resize = tfjs_esm_exports.image.resizeBilinear(image27, [inputSize10, inputSize10], false); - t2.channels = tfjs_esm_exports.mul(t2.resize, constants.rgb); - t2.grayscale = tfjs_esm_exports.sum(t2.channels, 3, true); - t2.grayscaleSub = tfjs_esm_exports.sub(t2.grayscale, constants.tf05); - t2.grayscaleMul = tfjs_esm_exports.mul(t2.grayscaleSub, constants.tf2); - t2.emotion = model5 == null ? void 0 : model5.execute(t2.grayscaleMul); - lastTime5 = now(); - const data = await t2.emotion.data(); - for (let i = 0; i < data.length; i++) { - if (data[i] > (config3.face.emotion.minConfidence || 0)) - obj.push({ score: Math.min(0.99, Math.trunc(100 * data[i]) / 100), emotion: annotations[i] }); - } - obj.sort((a, b) => b.score - a.score); - Object.keys(t2).forEach((tensor6) => tfjs_esm_exports.dispose(t2[tensor6])); - } - last3[idx] = obj; - lastCount2 = count2; - resolve(obj); - }); -} - -// src/face/iris.ts -var model6; -var inputSize5 = 0; -var irisEnlarge = 2.3; -var leftOutline = meshAnnotations.leftEyeLower0; -var rightOutline = meshAnnotations.rightEyeLower0; -var eyeLandmarks = { - leftBounds: [leftOutline[0], leftOutline[leftOutline.length - 1]], - rightBounds: [rightOutline[0], rightOutline[rightOutline.length - 1]] -}; -var irisLandmarks = { - upperCenter: 3, - lowerCenter: 4, - index: 71, - numCoordinates: 76 -}; -async function load6(config3) { - var _a, _b; - if (env.initial) - model6 = null; - if (!model6) - model6 = await loadModel((_a = config3.face.iris) == null ? void 0 : _a.modelPath); - else if (config3.debug) - log("cached model:", model6["modelUrl"]); - inputSize5 = (model6 == null ? void 0 : model6["executor"]) && ((_b = model6.inputs) == null ? void 0 : _b[0].shape) ? model6.inputs[0].shape[2] : 0; - if (inputSize5 === -1) - inputSize5 = 64; - return model6; -} -function replaceIrisCoords(rawCoords, newCoords, prefix, keys) { - for (let i = 0; i < irisIndices.length; i++) { - const { key, indices } = irisIndices[i]; - const originalIndices = meshAnnotations[`${prefix}${key}`]; - if (!keys || keys.includes(key)) { - for (let j = 0; j < indices.length; j++) { - const index2 = indices[j]; - rawCoords[originalIndices[j]] = [ - newCoords[index2][0], - newCoords[index2][1], - (newCoords[index2][2] + rawCoords[originalIndices[j]][2]) / 2 - ]; - } - } - } -} -var getLeftToRightEyeDepthDifference = (rawCoords) => { - const leftEyeZ = rawCoords[eyeLandmarks.leftBounds[0]][2]; - const rightEyeZ = rawCoords[eyeLandmarks.rightBounds[0]][2]; - return leftEyeZ - rightEyeZ; -}; -var getEyeBox = (rawCoords, face4, eyeInnerCornerIndex, eyeOuterCornerIndex, meshSize, flip = false) => { - const box = squarifyBox(enlargeBox(calculateLandmarksBoundingBox([rawCoords[eyeInnerCornerIndex], rawCoords[eyeOuterCornerIndex]]), irisEnlarge)); - const boxSize = getBoxSize(box); - let crop = tfjs_esm_exports.image.cropAndResize(face4, [[ - box.startPoint[1] / meshSize, - box.startPoint[0] / meshSize, - box.endPoint[1] / meshSize, - box.endPoint[0] / meshSize - ]], [0], [inputSize5, inputSize5]); - if (flip && env.kernels.includes("flipleftright")) { - const flipped = tfjs_esm_exports.image.flipLeftRight(crop); - tfjs_esm_exports.dispose(crop); - crop = flipped; - } - return { box, boxSize, crop }; -}; -var getEyeCoords = (eyeData, eyeBox, eyeBoxSize, flip = false) => { - const eyeRawCoords = []; - for (let i = 0; i < irisLandmarks.numCoordinates; i++) { - const x = eyeData[i * 3]; - const y = eyeData[i * 3 + 1]; - const z = eyeData[i * 3 + 2]; - eyeRawCoords.push([ - (flip ? 1 - x / inputSize5 : x / inputSize5) * eyeBoxSize[0] + eyeBox.startPoint[0], - y / inputSize5 * eyeBoxSize[1] + eyeBox.startPoint[1], - z - ]); - } - return { rawCoords: eyeRawCoords, iris: eyeRawCoords.slice(irisLandmarks.index) }; -}; -var getAdjustedIrisCoords = (rawCoords, irisCoords, direction) => { - const upperCenterZ = rawCoords[meshAnnotations[`${direction}EyeUpper0`][irisLandmarks.upperCenter]][2]; - const lowerCenterZ = rawCoords[meshAnnotations[`${direction}EyeLower0`][irisLandmarks.lowerCenter]][2]; - const averageZ = (upperCenterZ + lowerCenterZ) / 2; - return irisCoords.map((coord, i) => { - let z = averageZ; - if (i === 2) { - z = upperCenterZ; - } else if (i === 4) { - z = lowerCenterZ; - } - return [coord[0], coord[1], z]; - }); -}; -async function augmentIris(rawCoords, face4, meshSize) { - if (!(model6 == null ? void 0 : model6["executor"])) - return rawCoords; - const { box: leftEyeBox, boxSize: leftEyeBoxSize, crop: leftEyeCrop } = getEyeBox(rawCoords, face4, eyeLandmarks.leftBounds[0], eyeLandmarks.leftBounds[1], meshSize, true); - const { box: rightEyeBox, boxSize: rightEyeBoxSize, crop: rightEyeCrop } = getEyeBox(rawCoords, face4, eyeLandmarks.rightBounds[0], eyeLandmarks.rightBounds[1], meshSize, true); - const combined = tfjs_esm_exports.concat([leftEyeCrop, rightEyeCrop]); - tfjs_esm_exports.dispose(leftEyeCrop); - tfjs_esm_exports.dispose(rightEyeCrop); - const eyePredictions = model6.execute(combined); - tfjs_esm_exports.dispose(combined); - const eyePredictionsData = await eyePredictions.data(); - tfjs_esm_exports.dispose(eyePredictions); - const leftEyeData = eyePredictionsData.slice(0, irisLandmarks.numCoordinates * 3); - const { rawCoords: leftEyeRawCoords, iris: leftIrisRawCoords } = getEyeCoords(leftEyeData, leftEyeBox, leftEyeBoxSize, true); - const rightEyeData = eyePredictionsData.slice(irisLandmarks.numCoordinates * 3); - const { rawCoords: rightEyeRawCoords, iris: rightIrisRawCoords } = getEyeCoords(rightEyeData, rightEyeBox, rightEyeBoxSize, false); - const leftToRightEyeDepthDifference = getLeftToRightEyeDepthDifference(rawCoords); - if (Math.abs(leftToRightEyeDepthDifference) < 30) { - replaceIrisCoords(rawCoords, leftEyeRawCoords, "left", null); - replaceIrisCoords(rawCoords, rightEyeRawCoords, "right", null); - } else if (leftToRightEyeDepthDifference < 1) { - replaceIrisCoords(rawCoords, leftEyeRawCoords, "left", ["EyeUpper0", "EyeLower0"]); - } else { - replaceIrisCoords(rawCoords, rightEyeRawCoords, "right", ["EyeUpper0", "EyeLower0"]); - } - const adjustedLeftIrisCoords = getAdjustedIrisCoords(rawCoords, leftIrisRawCoords, "left"); - const adjustedRightIrisCoords = getAdjustedIrisCoords(rawCoords, rightIrisRawCoords, "right"); - const newCoords = rawCoords.concat(adjustedLeftIrisCoords).concat(adjustedRightIrisCoords); - return newCoords; -} - -// src/face/constants.ts -var LIPS_CONNECTIONS = [ - [61, 146], - [146, 91], - [91, 181], - [181, 84], - [84, 17], - [17, 314], - [314, 405], - [405, 321], - [321, 375], - [375, 291], - [61, 185], - [185, 40], - [40, 39], - [39, 37], - [37, 0], - [0, 267], - [267, 269], - [269, 270], - [270, 409], - [409, 291], - [78, 95], - [95, 88], - [88, 178], - [178, 87], - [87, 14], - [14, 317], - [317, 402], - [402, 318], - [318, 324], - [324, 308], - [78, 191], - [191, 80], - [80, 81], - [81, 82], - [82, 13], - [13, 312], - [312, 311], - [311, 310], - [310, 415], - [415, 308] -]; -var LEFT_EYE_CONNECTIONS = [[263, 249], [249, 390], [390, 373], [373, 374], [374, 380], [380, 381], [381, 382], [382, 362], [263, 466], [466, 388], [388, 387], [387, 386], [386, 385], [385, 384], [384, 398], [398, 362]]; -var LEFT_EYEBROW_CONNECTIONS = [[276, 283], [283, 282], [282, 295], [295, 285], [300, 293], [293, 334], [334, 296], [296, 336]]; -var LEFT_IRIS_CONNECTIONS = [[474, 475], [475, 476], [476, 477], [477, 474]]; -var RIGHT_EYE_CONNECTIONS = [[33, 7], [7, 163], [163, 144], [144, 145], [145, 153], [153, 154], [154, 155], [155, 133], [33, 246], [246, 161], [161, 160], [160, 159], [159, 158], [158, 157], [157, 173], [173, 133]]; -var RIGHT_EYEBROW_CONNECTIONS = [[46, 53], [53, 52], [52, 65], [65, 55], [70, 63], [63, 105], [105, 66], [66, 107]]; -var RIGHT_IRIS_CONNECTIONS = [[469, 470], [470, 471], [471, 472], [472, 469]]; -var FACE_OVAL_CONNECTIONS = [ - [10, 338], - [338, 297], - [297, 332], - [332, 284], - [284, 251], - [251, 389], - [389, 356], - [356, 454], - [454, 323], - [323, 361], - [361, 288], - [288, 397], - [397, 365], - [365, 379], - [379, 378], - [378, 400], - [400, 377], - [377, 152], - [152, 148], - [148, 176], - [176, 149], - [149, 150], - [150, 136], - [136, 172], - [172, 58], - [58, 132], - [132, 93], - [93, 234], - [234, 127], - [127, 162], - [162, 21], - [21, 54], - [54, 103], - [103, 67], - [67, 109], - [109, 10] -]; -function connectionsToIndices2(connections) { - const indices = connections.map((connection) => connection[0]); - indices.push(connections[connections.length - 1][1]); - return indices; -} -var MEDIAPIPE_FACE_MESH_KEYPOINTS_BY_CONTOUR = { - lips: connectionsToIndices2(LIPS_CONNECTIONS), - leftEye: connectionsToIndices2(LEFT_EYE_CONNECTIONS), - leftEyebrow: connectionsToIndices2(LEFT_EYEBROW_CONNECTIONS), - leftIris: connectionsToIndices2(LEFT_IRIS_CONNECTIONS), - rightEye: connectionsToIndices2(RIGHT_EYE_CONNECTIONS), - rightEyebrow: connectionsToIndices2(RIGHT_EYEBROW_CONNECTIONS), - rightIris: connectionsToIndices2(RIGHT_IRIS_CONNECTIONS), - faceOval: connectionsToIndices2(FACE_OVAL_CONNECTIONS) -}; -var indexLabelPairs = Object.entries(MEDIAPIPE_FACE_MESH_KEYPOINTS_BY_CONTOUR).map(([label, indices]) => indices.map((index2) => [index2, label])).flat(); -var MEDIAPIPE_FACE_MESH_KEYPOINTS = new Map(indexLabelPairs); -var LANDMARKS_REFINEMENT_LIPS_CONFIG = [ - 61, - 146, - 91, - 181, - 84, - 17, - 314, - 405, - 321, - 375, - 291, - 185, - 40, - 39, - 37, - 0, - 267, - 269, - 270, - 409, - 78, - 95, - 88, - 178, - 87, - 14, - 317, - 402, - 318, - 324, - 308, - 191, - 80, - 81, - 82, - 13, - 312, - 311, - 310, - 415, - 76, - 77, - 90, - 180, - 85, - 16, - 315, - 404, - 320, - 307, - 306, - 184, - 74, - 73, - 72, - 11, - 302, - 303, - 304, - 408, - 62, - 96, - 89, - 179, - 86, - 15, - 316, - 403, - 319, - 325, - 292, - 183, - 42, - 41, - 38, - 12, - 268, - 271, - 272, - 407 -]; -var LANDMARKS_REFINEMENT_LEFT_EYE_CONFIG = [ - 33, - 7, - 163, - 144, - 145, - 153, - 154, - 155, - 133, - 246, - 161, - 160, - 159, - 158, - 157, - 173, - 130, - 25, - 110, - 24, - 23, - 22, - 26, - 112, - 243, - 247, - 30, - 29, - 27, - 28, - 56, - 190, - 226, - 31, - 228, - 229, - 230, - 231, - 232, - 233, - 244, - 113, - 225, - 224, - 223, - 222, - 221, - 189, - 35, - 124, - 46, - 53, - 52, - 65, - 143, - 111, - 117, - 118, - 119, - 120, - 121, - 128, - 245, - 156, - 70, - 63, - 105, - 66, - 107, - 55, - 193 -]; -var LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG = [ - 263, - 249, - 390, - 373, - 374, - 380, - 381, - 382, - 362, - 466, - 388, - 387, - 386, - 385, - 384, - 398, - 359, - 255, - 339, - 254, - 253, - 252, - 256, - 341, - 463, - 467, - 260, - 259, - 257, - 258, - 286, - 414, - 446, - 261, - 448, - 449, - 450, - 451, - 452, - 453, - 464, - 342, - 445, - 444, - 443, - 442, - 441, - 413, - 265, - 353, - 276, - 283, - 282, - 295, - 372, - 340, - 346, - 347, - 348, - 349, - 350, - 357, - 465, - 383, - 300, - 293, - 334, - 296, - 336, - 285, - 417 -]; - -// src/face/attention.ts -async function augment(rawCoords, results) { - var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j; - const t2 = { - lips: await ((_b = (_a = results.filter((r) => r.size === 160)) == null ? void 0 : _a[0]) == null ? void 0 : _b.data()), - irisL: await ((_d = (_c = results.filter((r) => r.size === 10)) == null ? void 0 : _c[0]) == null ? void 0 : _d.data()), - eyeL: await ((_f = (_e = results.filter((r) => r.size === 142)) == null ? void 0 : _e[0]) == null ? void 0 : _f.data()), - irisR: await ((_h = (_g = results.filter((r) => r.size === 10)) == null ? void 0 : _g[1]) == null ? void 0 : _h.data()), - eyeR: await ((_j = (_i = results.filter((r) => r.size === 142)) == null ? void 0 : _i[1]) == null ? void 0 : _j.data()) - }; - for (const val of Object.values(t2)) { - if (!val) - return rawCoords; - } - const irisLDepth = LANDMARKS_REFINEMENT_LEFT_EYE_CONFIG.reduce((prev, curr) => prev += rawCoords[curr][2], 0) / LANDMARKS_REFINEMENT_LEFT_EYE_CONFIG.length; - for (let i = 0; i < t2.irisL.length / 2; i++) - rawCoords.push([t2.irisL[2 * i + 0], t2.irisL[2 * i + 1], irisLDepth]); - const irisRDepth = LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG.reduce((prev, curr) => prev += rawCoords[curr][2], 0) / LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG.length; - for (let i = 0; i < t2.irisR.length / 2; i++) - rawCoords.push([t2.irisR[2 * i + 0], t2.irisR[2 * i + 1], irisRDepth]); - for (let i = 0; i < t2.eyeL.length / 2; i++) - rawCoords[LANDMARKS_REFINEMENT_LEFT_EYE_CONFIG[i]] = [t2.eyeL[2 * i + 0], t2.eyeL[2 * i + 1], rawCoords[LANDMARKS_REFINEMENT_LEFT_EYE_CONFIG[i]][2]]; - for (let i = 0; i < t2.eyeR.length / 2; i++) - rawCoords[LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG[i]] = [t2.eyeR[2 * i + 0], t2.eyeR[2 * i + 1], rawCoords[LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG[i]][2]]; - for (let i = 0; i < t2.lips.length / 2; i++) - rawCoords[LANDMARKS_REFINEMENT_LIPS_CONFIG[i]] = [t2.lips[2 * i + 0], t2.lips[2 * i + 1], rawCoords[LANDMARKS_REFINEMENT_LIPS_CONFIG[i]][2]]; - return rawCoords; -} - -// src/face/facemesh.ts -var cache3 = { - boxes: [], - skipped: Number.MAX_SAFE_INTEGER, - timestamp: 0 -}; -var model7 = null; -var inputSize6 = 0; -async function predict6(input, config3) { - var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j; - if (!(model7 == null ? void 0 : model7["executor"])) - return []; - const skipTime = (((_a = config3.face.detector) == null ? void 0 : _a.skipTime) || 0) > now() - cache3.timestamp; - const skipFrame = cache3.skipped < (((_b = config3.face.detector) == null ? void 0 : _b.skipFrames) || 0); - if (!config3.skipAllowed || !skipTime || !skipFrame || cache3.boxes.length === 0) { - cache3.boxes = await getBoxes(input, config3); - cache3.timestamp = now(); - cache3.skipped = 0; - } else { - cache3.skipped++; - } - const faces = []; - const newCache = []; - let id = 0; - const size2 = inputSize6; - for (let i = 0; i < cache3.boxes.length; i++) { - const box = cache3.boxes[i]; - let angle = 0; - let rotationMatrix; - const face4 = { - id: id++, - mesh: [], - meshRaw: [], - box: [0, 0, 0, 0], - boxRaw: [0, 0, 0, 0], - score: 0, - boxScore: 0, - faceScore: 0, - annotations: {} - }; - [angle, rotationMatrix, face4.tensor] = correctFaceRotation((_c = config3.face.detector) == null ? void 0 : _c.rotation, box, input, ((_d = config3.face.mesh) == null ? void 0 : _d.enabled) ? inputSize6 : size()); - if (config3.filter.equalization) { - const equilized = face4.tensor ? await histogramEqualization(face4.tensor) : void 0; - tfjs_esm_exports.dispose(face4.tensor); - if (equilized) - face4.tensor = equilized; - } - face4.boxScore = Math.round(100 * box.confidence) / 100; - if (!((_e = config3.face.mesh) == null ? void 0 : _e.enabled)) { - face4.box = clampBox(box, input); - face4.boxRaw = getRawBox(box, input); - face4.score = face4.boxScore; - face4.mesh = box.landmarks.map((pt) => [ - (box.startPoint[0] + box.endPoint[0]) / 2 + (box.endPoint[0] + box.startPoint[0]) * pt[0] / size(), - (box.startPoint[1] + box.endPoint[1]) / 2 + (box.endPoint[1] + box.startPoint[1]) * pt[1] / size() - ]); - face4.meshRaw = face4.mesh.map((pt) => [pt[0] / (input.shape[2] || 0), pt[1] / (input.shape[1] || 0), (pt[2] || 0) / size2]); - for (const key of Object.keys(blazeFaceLandmarks)) { - face4.annotations[key] = [face4.mesh[blazeFaceLandmarks[key]]]; - } - } else if (!model7) { - if (config3.debug) - log("face mesh detection requested, but model is not loaded"); - } else { - if (((_f = config3.face.attention) == null ? void 0 : _f.enabled) && !env.kernels.includes("atan2")) { - config3.face.attention.enabled = false; - tfjs_esm_exports.dispose(face4.tensor); - return faces; - } - const results = model7.execute(face4.tensor); - const confidenceT = results.find((t2) => t2.shape[t2.shape.length - 1] === 1); - const faceConfidence = await confidenceT.data(); - face4.faceScore = Math.round(100 * faceConfidence[0]) / 100; - if (face4.faceScore < (((_g = config3.face.detector) == null ? void 0 : _g.minConfidence) || 1)) { - box.confidence = face4.faceScore; - if (config3.face.mesh.keepInvalid) { - face4.box = clampBox(box, input); - face4.boxRaw = getRawBox(box, input); - face4.score = face4.boxScore; - face4.mesh = box.landmarks.map((pt) => [ - (box.startPoint[0] + box.endPoint[0]) / 2 + (box.endPoint[0] + box.startPoint[0]) * pt[0] / size(), - (box.startPoint[1] + box.endPoint[1]) / 2 + (box.endPoint[1] + box.startPoint[1]) * pt[1] / size() - ]); - face4.meshRaw = face4.mesh.map((pt) => [pt[0] / (input.shape[2] || 1), pt[1] / (input.shape[1] || 1), (pt[2] || 0) / size2]); - for (const key of Object.keys(blazeFaceLandmarks)) { - face4.annotations[key] = [face4.mesh[blazeFaceLandmarks[key]]]; - } - } - } else { - const meshT = results.find((t2) => t2.shape[t2.shape.length - 1] === 1404); - const coordsReshaped = tfjs_esm_exports.reshape(meshT, [-1, 3]); - let rawCoords = await coordsReshaped.array(); - tfjs_esm_exports.dispose(coordsReshaped); - if ((_h = config3.face.attention) == null ? void 0 : _h.enabled) { - rawCoords = await augment(rawCoords, results); - } else if ((_i = config3.face.iris) == null ? void 0 : _i.enabled) { - rawCoords = await augmentIris(rawCoords, face4.tensor, inputSize6); - } - face4.mesh = transformRawCoords(rawCoords, box, angle, rotationMatrix, inputSize6); - face4.meshRaw = face4.mesh.map((pt) => [pt[0] / (input.shape[2] || 0), pt[1] / (input.shape[1] || 0), (pt[2] || 0) / size2]); - for (const key of Object.keys(meshAnnotations)) - face4.annotations[key] = meshAnnotations[key].map((index2) => face4.mesh[index2]); - face4.score = face4.faceScore; - const calculatedBox = { ...calculateFaceBox(face4.mesh, box), confidence: box.confidence, landmarks: box.landmarks }; - face4.box = clampBox(calculatedBox, input); - face4.boxRaw = getRawBox(calculatedBox, input); - newCache.push(calculatedBox); - } - tfjs_esm_exports.dispose(results); - } - if (face4.score > (((_j = config3.face.detector) == null ? void 0 : _j.minConfidence) || 1)) - faces.push(face4); - else - tfjs_esm_exports.dispose(face4.tensor); - } - cache3.boxes = newCache; - return faces; -} -async function load7(config3) { - var _a, _b, _c, _d, _e, _f; - if (env.initial) - model7 = null; - if (((_a = config3.face.attention) == null ? void 0 : _a.enabled) && (model7 == null ? void 0 : model7["signature"])) { - if (Object.keys(((_b = model7 == null ? void 0 : model7["signature"]) == null ? void 0 : _b.outputs) || {}).length < 6) - model7 = null; - } - if (!model7) { - if ((_c = config3.face.attention) == null ? void 0 : _c.enabled) - model7 = await loadModel(config3.face.attention.modelPath); - else - model7 = await loadModel((_d = config3.face.mesh) == null ? void 0 : _d.modelPath); - } else if (config3.debug) { - log("cached model:", model7["modelUrl"]); - } - inputSize6 = model7["executor"] && ((_e = model7 == null ? void 0 : model7.inputs) == null ? void 0 : _e[0].shape) ? (_f = model7 == null ? void 0 : model7.inputs) == null ? void 0 : _f[0].shape[2] : 256; - return model7; -} -var triangulation = TRI468; -var uvmap = UV468; - -// src/face/faceres.ts -var model8; -var last4 = []; -var lastTime6 = 0; -var lastCount3 = 0; -var skipped6 = Number.MAX_SAFE_INTEGER; -async function load8(config3) { - var _a; - if (env.initial) - model8 = null; - if (!model8) - model8 = await loadModel((_a = config3.face.description) == null ? void 0 : _a.modelPath); - else if (config3.debug) - log("cached model:", model8["modelUrl"]); - return model8; -} -function enhance(input) { - const tensor6 = input.image || input.tensor || input; - if (!(model8 == null ? void 0 : model8.inputs[0].shape)) - return tensor6; - const crop = tfjs_esm_exports.image.resizeBilinear(tensor6, [model8.inputs[0].shape[2], model8.inputs[0].shape[1]], false); - const norm = tfjs_esm_exports.mul(crop, constants.tf255); - tfjs_esm_exports.dispose(crop); - return norm; -} -async function predict7(image27, config3, idx, count2) { - var _a, _b, _c, _d; - const obj = { - age: 0, - gender: "unknown", - genderScore: 0, - descriptor: [] - }; - if (!(model8 == null ? void 0 : model8["executor"])) - return obj; - const skipFrame = skipped6 < (((_a = config3.face.description) == null ? void 0 : _a.skipFrames) || 0); - const skipTime = (((_b = config3.face.description) == null ? void 0 : _b.skipTime) || 0) > now() - lastTime6; - if (config3.skipAllowed && skipFrame && skipTime && lastCount3 === count2 && ((_c = last4 == null ? void 0 : last4[idx]) == null ? void 0 : _c.age) > 0 && ((_d = last4 == null ? void 0 : last4[idx]) == null ? void 0 : _d.genderScore) > 0) { - skipped6++; - return last4[idx]; - } - skipped6 = 0; - return new Promise(async (resolve) => { - var _a2; - if ((_a2 = config3.face.description) == null ? void 0 : _a2.enabled) { - const enhanced = enhance(image27); - const resT = model8 == null ? void 0 : model8.execute(enhanced); - lastTime6 = now(); - tfjs_esm_exports.dispose(enhanced); - const genderT = resT.find((t2) => t2.shape[1] === 1); - const gender2 = await genderT.data(); - const confidence = Math.trunc(200 * Math.abs(gender2[0] - 0.5)) / 100; - if (confidence > (config3.face.description.minConfidence || 0)) { - obj.gender = gender2[0] <= 0.5 ? "female" : "male"; - obj.genderScore = Math.min(0.99, confidence); - } - const argmax = tfjs_esm_exports.argMax(resT.find((t2) => t2.shape[1] === 100), 1); - const ageIdx = (await argmax.data())[0]; - tfjs_esm_exports.dispose(argmax); - const ageT = resT.find((t2) => t2.shape[1] === 100); - const all2 = await ageT.data(); - obj.age = Math.round(all2[ageIdx - 1] > all2[ageIdx + 1] ? 10 * ageIdx - 100 * all2[ageIdx - 1] : 10 * ageIdx + 100 * all2[ageIdx + 1]) / 10; - if (Number.isNaN(gender2[0]) || Number.isNaN(all2[0])) - log("faceres error:", { model: model8, result: resT }); - const desc = resT.find((t2) => t2.shape[1] === 1024); - const descriptor = desc ? await desc.data() : []; - obj.descriptor = Array.from(descriptor); - resT.forEach((t2) => tfjs_esm_exports.dispose(t2)); - } - last4[idx] = obj; - lastCount3 = count2; - resolve(obj); - }); -} - -// src/gear/gear.ts -var model9; -var last5 = []; -var raceNames = ["white", "black", "asian", "indian", "other"]; -var ageWeights = [15, 23, 28, 35.5, 45.5, 55.5, 65]; -var lastCount4 = 0; -var lastTime7 = 0; -var skipped7 = Number.MAX_SAFE_INTEGER; -async function load9(config3) { - var _a; - if (env.initial) - model9 = null; - if (!model9) - model9 = await loadModel((_a = config3.face.gear) == null ? void 0 : _a.modelPath); - else if (config3.debug) - log("cached model:", model9["modelUrl"]); - return model9; -} -async function predict8(image27, config3, idx, count2) { - var _a, _b; - if (!model9) - return { age: 0, gender: "unknown", genderScore: 0, race: [] }; - const skipFrame = skipped7 < (((_a = config3.face.gear) == null ? void 0 : _a.skipFrames) || 0); - const skipTime = (((_b = config3.face.gear) == null ? void 0 : _b.skipTime) || 0) > now() - lastTime7; - if (config3.skipAllowed && skipTime && skipFrame && lastCount4 === count2 && last5[idx]) { - skipped7++; - return last5[idx]; - } - skipped7 = 0; - return new Promise(async (resolve) => { - var _a2, _b2; - if (!(model9 == null ? void 0 : model9.inputs[0].shape)) - return; - const t2 = {}; - const box = [[0, 0.1, 0.9, 0.9]]; - t2.resize = tfjs_esm_exports.image.cropAndResize(image27, box, [0], [model9.inputs[0].shape[2], model9.inputs[0].shape[1]]); - const obj = { age: 0, gender: "unknown", genderScore: 0, race: [] }; - if ((_a2 = config3.face.gear) == null ? void 0 : _a2.enabled) - [t2.age, t2.gender, t2.race] = model9.execute(t2.resize, ["age_output", "gender_output", "race_output"]); - const gender2 = await t2.gender.data(); - obj.gender = gender2[0] > gender2[1] ? "male" : "female"; - obj.genderScore = Math.round(100 * (gender2[0] > gender2[1] ? gender2[0] : gender2[1])) / 100; - const race = await t2.race.data(); - for (let i = 0; i < race.length; i++) { - if (race[i] > (((_b2 = config3.face.gear) == null ? void 0 : _b2.minConfidence) || 0.2)) - obj.race.push({ score: Math.round(100 * race[i]) / 100, race: raceNames[i] }); - } - obj.race.sort((a, b) => b.score - a.score); - const ageDistribution = Array.from(await t2.age.data()); - const ageSorted = ageDistribution.map((a, i) => [ageWeights[i], a]).sort((a, b) => b[1] - a[1]); - let age2 = ageSorted[0][0]; - for (let i = 1; i < ageSorted.length; i++) - age2 += ageSorted[i][1] * (ageSorted[i][0] - age2); - obj.age = Math.round(10 * age2) / 10; - Object.keys(t2).forEach((tensor6) => tfjs_esm_exports.dispose(t2[tensor6])); - last5[idx] = obj; - lastCount4 = count2; - lastTime7 = now(); - resolve(obj); - }); -} - -// src/hand/handposeutil.ts -function getBoxSize2(box) { - return [ - Math.abs(box.endPoint[0] - box.startPoint[0]), - Math.abs(box.endPoint[1] - box.startPoint[1]) - ]; -} -function getBoxCenter2(box) { - return [ - box.startPoint[0] + (box.endPoint[0] - box.startPoint[0]) / 2, - box.startPoint[1] + (box.endPoint[1] - box.startPoint[1]) / 2 - ]; -} -function cutBoxFromImageAndResize(box, image27, cropSize) { - const h = image27.shape[1]; - const w = image27.shape[2]; - const boxes = [[ - box.startPoint[1] / h, - box.startPoint[0] / w, - box.endPoint[1] / h, - box.endPoint[0] / w - ]]; - return tfjs_esm_exports.image.cropAndResize(image27, boxes, [0], cropSize); -} -function scaleBoxCoordinates2(box, factor) { - const startPoint = [box.startPoint[0] * factor[0], box.startPoint[1] * factor[1]]; - const endPoint = [box.endPoint[0] * factor[0], box.endPoint[1] * factor[1]]; - const palmLandmarks = box.palmLandmarks.map((coord) => { - const scaledCoord = [coord[0] * factor[0], coord[1] * factor[1]]; - return scaledCoord; - }); - return { startPoint, endPoint, palmLandmarks, confidence: box.confidence }; -} -function enlargeBox2(box, factor = 1.5) { - const center = getBoxCenter2(box); - const size2 = getBoxSize2(box); - const newHalfSize = [factor * size2[0] / 2, factor * size2[1] / 2]; - const startPoint = [center[0] - newHalfSize[0], center[1] - newHalfSize[1]]; - const endPoint = [center[0] + newHalfSize[0], center[1] + newHalfSize[1]]; - return { startPoint, endPoint, palmLandmarks: box.palmLandmarks }; -} -function squarifyBox2(box) { - const centers = getBoxCenter2(box); - const size2 = getBoxSize2(box); - const maxEdge = Math.max(...size2); - const halfSize = maxEdge / 2; - const startPoint = [centers[0] - halfSize, centers[1] - halfSize]; - const endPoint = [centers[0] + halfSize, centers[1] + halfSize]; - return { startPoint, endPoint, palmLandmarks: box.palmLandmarks }; -} -function normalizeRadians2(angle) { - return angle - 2 * Math.PI * Math.floor((angle + Math.PI) / (2 * Math.PI)); -} -function computeRotation2(point1, point2) { - const radians = Math.PI / 2 - Math.atan2(-(point2[1] - point1[1]), point2[0] - point1[0]); - return normalizeRadians2(radians); -} -var buildTranslationMatrix2 = (x, y) => [[1, 0, x], [0, 1, y], [0, 0, 1]]; -function dot2(v1, v2) { - let product = 0; - for (let i = 0; i < v1.length; i++) { - product += v1[i] * v2[i]; - } - return product; -} -function getColumnFrom2DArr2(arr, columnIndex) { - const column = []; - for (let i = 0; i < arr.length; i++) { - column.push(arr[i][columnIndex]); - } - return column; -} -function multiplyTransformMatrices2(mat1, mat2) { - const product = []; - const size2 = mat1.length; - for (let row = 0; row < size2; row++) { - product.push([]); - for (let col = 0; col < size2; col++) { - product[row].push(dot2(mat1[row], getColumnFrom2DArr2(mat2, col))); - } - } - return product; -} -function buildRotationMatrix2(rotation, center) { - const cosA = Math.cos(rotation); - const sinA = Math.sin(rotation); - const rotationMatrix = [[cosA, -sinA, 0], [sinA, cosA, 0], [0, 0, 1]]; - const translationMatrix = buildTranslationMatrix2(center[0], center[1]); - const translationTimesRotation = multiplyTransformMatrices2(translationMatrix, rotationMatrix); - const negativeTranslationMatrix = buildTranslationMatrix2(-center[0], -center[1]); - return multiplyTransformMatrices2(translationTimesRotation, negativeTranslationMatrix); -} -function invertTransformMatrix2(matrix) { - const rotationComponent = [[matrix[0][0], matrix[1][0]], [matrix[0][1], matrix[1][1]]]; - const translationComponent = [matrix[0][2], matrix[1][2]]; - const invertedTranslation = [ - -dot2(rotationComponent[0], translationComponent), - -dot2(rotationComponent[1], translationComponent) - ]; - return [ - rotationComponent[0].concat(invertedTranslation[0]), - rotationComponent[1].concat(invertedTranslation[1]), - [0, 0, 1] - ]; -} -function rotatePoint2(homogeneousCoordinate, rotationMatrix) { - return [ - dot2(homogeneousCoordinate, rotationMatrix[0]), - dot2(homogeneousCoordinate, rotationMatrix[1]) - ]; -} - -// src/hand/handposeanchors.ts -var anchors2 = [ - { x: 0.015625, y: 0.015625 }, - { x: 0.015625, y: 0.015625 }, - { x: 0.046875, y: 0.015625 }, - { x: 0.046875, y: 0.015625 }, - { x: 0.078125, y: 0.015625 }, - { x: 0.078125, y: 0.015625 }, - { x: 0.109375, y: 0.015625 }, - { x: 0.109375, y: 0.015625 }, - { x: 0.140625, y: 0.015625 }, - { x: 0.140625, y: 0.015625 }, - { x: 0.171875, y: 0.015625 }, - { x: 0.171875, y: 0.015625 }, - { x: 0.203125, y: 0.015625 }, - { x: 0.203125, y: 0.015625 }, - { x: 0.234375, y: 0.015625 }, - { x: 0.234375, y: 0.015625 }, - { x: 0.265625, y: 0.015625 }, - { x: 0.265625, y: 0.015625 }, - { x: 0.296875, y: 0.015625 }, - { x: 0.296875, y: 0.015625 }, - { x: 0.328125, y: 0.015625 }, - { x: 0.328125, y: 0.015625 }, - { x: 0.359375, y: 0.015625 }, - { x: 0.359375, y: 0.015625 }, - { x: 0.390625, y: 0.015625 }, - { x: 0.390625, y: 0.015625 }, - { x: 0.421875, y: 0.015625 }, - { x: 0.421875, y: 0.015625 }, - { x: 0.453125, y: 0.015625 }, - { x: 0.453125, y: 0.015625 }, - { x: 0.484375, y: 0.015625 }, - { x: 0.484375, y: 0.015625 }, - { x: 0.515625, y: 0.015625 }, - { x: 0.515625, y: 0.015625 }, - { x: 0.546875, y: 0.015625 }, - { x: 0.546875, y: 0.015625 }, - { x: 0.578125, y: 0.015625 }, - { x: 0.578125, y: 0.015625 }, - { x: 0.609375, y: 0.015625 }, - { x: 0.609375, y: 0.015625 }, - { x: 0.640625, y: 0.015625 }, - { x: 0.640625, y: 0.015625 }, - { x: 0.671875, y: 0.015625 }, - { x: 0.671875, y: 0.015625 }, - { x: 0.703125, y: 0.015625 }, - { x: 0.703125, y: 0.015625 }, - { x: 0.734375, y: 0.015625 }, - { x: 0.734375, y: 0.015625 }, - { x: 0.765625, y: 0.015625 }, - { x: 0.765625, y: 0.015625 }, - { x: 0.796875, y: 0.015625 }, - { x: 0.796875, y: 0.015625 }, - { x: 0.828125, y: 0.015625 }, - { x: 0.828125, y: 0.015625 }, - { x: 0.859375, y: 0.015625 }, - { x: 0.859375, y: 0.015625 }, - { x: 0.890625, y: 0.015625 }, - { x: 0.890625, y: 0.015625 }, - { x: 0.921875, y: 0.015625 }, - { x: 0.921875, y: 0.015625 }, - { x: 0.953125, y: 0.015625 }, - { x: 0.953125, y: 0.015625 }, - { x: 0.984375, y: 0.015625 }, - { x: 0.984375, y: 0.015625 }, - { x: 0.015625, y: 0.046875 }, - { x: 0.015625, y: 0.046875 }, - { x: 0.046875, y: 0.046875 }, - { x: 0.046875, y: 0.046875 }, - { x: 0.078125, y: 0.046875 }, - { x: 0.078125, y: 0.046875 }, - { x: 0.109375, y: 0.046875 }, - { x: 0.109375, y: 0.046875 }, - { x: 0.140625, y: 0.046875 }, - { x: 0.140625, y: 0.046875 }, - { x: 0.171875, y: 0.046875 }, - { x: 0.171875, y: 0.046875 }, - { x: 0.203125, y: 0.046875 }, - { x: 0.203125, y: 0.046875 }, - { x: 0.234375, y: 0.046875 }, - { x: 0.234375, y: 0.046875 }, - { x: 0.265625, y: 0.046875 }, - { x: 0.265625, y: 0.046875 }, - { x: 0.296875, y: 0.046875 }, - { x: 0.296875, y: 0.046875 }, - { x: 0.328125, y: 0.046875 }, - { x: 0.328125, y: 0.046875 }, - { x: 0.359375, y: 0.046875 }, - { x: 0.359375, y: 0.046875 }, - { x: 0.390625, y: 0.046875 }, - { x: 0.390625, y: 0.046875 }, - { x: 0.421875, y: 0.046875 }, - { x: 0.421875, y: 0.046875 }, - { x: 0.453125, y: 0.046875 }, - { x: 0.453125, y: 0.046875 }, - { x: 0.484375, y: 0.046875 }, - { x: 0.484375, y: 0.046875 }, - { x: 0.515625, y: 0.046875 }, - { x: 0.515625, y: 0.046875 }, - { x: 0.546875, y: 0.046875 }, - { x: 0.546875, y: 0.046875 }, - { x: 0.578125, y: 0.046875 }, - { x: 0.578125, y: 0.046875 }, - { x: 0.609375, y: 0.046875 }, - { x: 0.609375, y: 0.046875 }, - { x: 0.640625, y: 0.046875 }, - { x: 0.640625, y: 0.046875 }, - { x: 0.671875, y: 0.046875 }, - { x: 0.671875, y: 0.046875 }, - { x: 0.703125, y: 0.046875 }, - { x: 0.703125, y: 0.046875 }, - { x: 0.734375, y: 0.046875 }, - { x: 0.734375, y: 0.046875 }, - { x: 0.765625, y: 0.046875 }, - { x: 0.765625, y: 0.046875 }, - { x: 0.796875, y: 0.046875 }, - { x: 0.796875, y: 0.046875 }, - { x: 0.828125, y: 0.046875 }, - { x: 0.828125, y: 0.046875 }, - { x: 0.859375, y: 0.046875 }, - { x: 0.859375, y: 0.046875 }, - { x: 0.890625, y: 0.046875 }, - { x: 0.890625, y: 0.046875 }, - { x: 0.921875, y: 0.046875 }, - { x: 0.921875, y: 0.046875 }, - { x: 0.953125, y: 0.046875 }, - { x: 0.953125, y: 0.046875 }, - { x: 0.984375, y: 0.046875 }, - { x: 0.984375, y: 0.046875 }, - { x: 0.015625, y: 0.078125 }, - { x: 0.015625, y: 0.078125 }, - { x: 0.046875, y: 0.078125 }, - { x: 0.046875, y: 0.078125 }, - { x: 0.078125, y: 0.078125 }, - { x: 0.078125, y: 0.078125 }, - { x: 0.109375, y: 0.078125 }, - { x: 0.109375, y: 0.078125 }, - { x: 0.140625, y: 0.078125 }, - { x: 0.140625, y: 0.078125 }, - { x: 0.171875, y: 0.078125 }, - { x: 0.171875, y: 0.078125 }, - { x: 0.203125, y: 0.078125 }, - { x: 0.203125, y: 0.078125 }, - { x: 0.234375, y: 0.078125 }, - { x: 0.234375, y: 0.078125 }, - { x: 0.265625, y: 0.078125 }, - { x: 0.265625, y: 0.078125 }, - { x: 0.296875, y: 0.078125 }, - { x: 0.296875, y: 0.078125 }, - { x: 0.328125, y: 0.078125 }, - { x: 0.328125, y: 0.078125 }, - { x: 0.359375, y: 0.078125 }, - { x: 0.359375, y: 0.078125 }, - { x: 0.390625, y: 0.078125 }, - { x: 0.390625, y: 0.078125 }, - { x: 0.421875, y: 0.078125 }, - { x: 0.421875, y: 0.078125 }, - { x: 0.453125, y: 0.078125 }, - { x: 0.453125, y: 0.078125 }, - { x: 0.484375, y: 0.078125 }, - { x: 0.484375, y: 0.078125 }, - { x: 0.515625, y: 0.078125 }, - { x: 0.515625, y: 0.078125 }, - { x: 0.546875, y: 0.078125 }, - { x: 0.546875, y: 0.078125 }, - { x: 0.578125, y: 0.078125 }, - { x: 0.578125, y: 0.078125 }, - { x: 0.609375, y: 0.078125 }, - { x: 0.609375, y: 0.078125 }, - { x: 0.640625, y: 0.078125 }, - { x: 0.640625, y: 0.078125 }, - { x: 0.671875, y: 0.078125 }, - { x: 0.671875, y: 0.078125 }, - { x: 0.703125, y: 0.078125 }, - { x: 0.703125, y: 0.078125 }, - { x: 0.734375, y: 0.078125 }, - { x: 0.734375, y: 0.078125 }, - { x: 0.765625, y: 0.078125 }, - { x: 0.765625, y: 0.078125 }, - { x: 0.796875, y: 0.078125 }, - { x: 0.796875, y: 0.078125 }, - { x: 0.828125, y: 0.078125 }, - { x: 0.828125, y: 0.078125 }, - { x: 0.859375, y: 0.078125 }, - { x: 0.859375, y: 0.078125 }, - { x: 0.890625, y: 0.078125 }, - { x: 0.890625, y: 0.078125 }, - { x: 0.921875, y: 0.078125 }, - { x: 0.921875, y: 0.078125 }, - { x: 0.953125, y: 0.078125 }, - { x: 0.953125, y: 0.078125 }, - { x: 0.984375, y: 0.078125 }, - { x: 0.984375, y: 0.078125 }, - { x: 0.015625, y: 0.109375 }, - { x: 0.015625, y: 0.109375 }, - { x: 0.046875, y: 0.109375 }, - { x: 0.046875, y: 0.109375 }, - { x: 0.078125, y: 0.109375 }, - { x: 0.078125, y: 0.109375 }, - { x: 0.109375, y: 0.109375 }, - { x: 0.109375, y: 0.109375 }, - { x: 0.140625, y: 0.109375 }, - { x: 0.140625, y: 0.109375 }, - { x: 0.171875, y: 0.109375 }, - { x: 0.171875, y: 0.109375 }, - { x: 0.203125, y: 0.109375 }, - { x: 0.203125, y: 0.109375 }, - { x: 0.234375, y: 0.109375 }, - { x: 0.234375, y: 0.109375 }, - { x: 0.265625, y: 0.109375 }, - { x: 0.265625, y: 0.109375 }, - { x: 0.296875, y: 0.109375 }, - { x: 0.296875, y: 0.109375 }, - { x: 0.328125, y: 0.109375 }, - { x: 0.328125, y: 0.109375 }, - { x: 0.359375, y: 0.109375 }, - { x: 0.359375, y: 0.109375 }, - { x: 0.390625, y: 0.109375 }, - { x: 0.390625, y: 0.109375 }, - { x: 0.421875, y: 0.109375 }, - { x: 0.421875, y: 0.109375 }, - { x: 0.453125, y: 0.109375 }, - { x: 0.453125, y: 0.109375 }, - { x: 0.484375, y: 0.109375 }, - { x: 0.484375, y: 0.109375 }, - { x: 0.515625, y: 0.109375 }, - { x: 0.515625, y: 0.109375 }, - { x: 0.546875, y: 0.109375 }, - { x: 0.546875, y: 0.109375 }, - { x: 0.578125, y: 0.109375 }, - { x: 0.578125, y: 0.109375 }, - { x: 0.609375, y: 0.109375 }, - { x: 0.609375, y: 0.109375 }, - { x: 0.640625, y: 0.109375 }, - { x: 0.640625, y: 0.109375 }, - { x: 0.671875, y: 0.109375 }, - { x: 0.671875, y: 0.109375 }, - { x: 0.703125, y: 0.109375 }, - { x: 0.703125, y: 0.109375 }, - { x: 0.734375, y: 0.109375 }, - { x: 0.734375, y: 0.109375 }, - { x: 0.765625, y: 0.109375 }, - { x: 0.765625, y: 0.109375 }, - { x: 0.796875, y: 0.109375 }, - { x: 0.796875, y: 0.109375 }, - { x: 0.828125, y: 0.109375 }, - { x: 0.828125, y: 0.109375 }, - { x: 0.859375, y: 0.109375 }, - { x: 0.859375, y: 0.109375 }, - { x: 0.890625, y: 0.109375 }, - { x: 0.890625, y: 0.109375 }, - { x: 0.921875, y: 0.109375 }, - { x: 0.921875, y: 0.109375 }, - { x: 0.953125, y: 0.109375 }, - { x: 0.953125, y: 0.109375 }, - { x: 0.984375, y: 0.109375 }, - { x: 0.984375, y: 0.109375 }, - { x: 0.015625, y: 0.140625 }, - { x: 0.015625, y: 0.140625 }, - { x: 0.046875, y: 0.140625 }, - { x: 0.046875, y: 0.140625 }, - { x: 0.078125, y: 0.140625 }, - { x: 0.078125, y: 0.140625 }, - { x: 0.109375, y: 0.140625 }, - { x: 0.109375, y: 0.140625 }, - { x: 0.140625, y: 0.140625 }, - { x: 0.140625, y: 0.140625 }, - { x: 0.171875, y: 0.140625 }, - { x: 0.171875, y: 0.140625 }, - { x: 0.203125, y: 0.140625 }, - { x: 0.203125, y: 0.140625 }, - { x: 0.234375, y: 0.140625 }, - { x: 0.234375, y: 0.140625 }, - { x: 0.265625, y: 0.140625 }, - { x: 0.265625, y: 0.140625 }, - { x: 0.296875, y: 0.140625 }, - { x: 0.296875, y: 0.140625 }, - { x: 0.328125, y: 0.140625 }, - { x: 0.328125, y: 0.140625 }, - { x: 0.359375, y: 0.140625 }, - { x: 0.359375, y: 0.140625 }, - { x: 0.390625, y: 0.140625 }, - { x: 0.390625, y: 0.140625 }, - { x: 0.421875, y: 0.140625 }, - { x: 0.421875, y: 0.140625 }, - { x: 0.453125, y: 0.140625 }, - { x: 0.453125, y: 0.140625 }, - { x: 0.484375, y: 0.140625 }, - { x: 0.484375, y: 0.140625 }, - { x: 0.515625, y: 0.140625 }, - { x: 0.515625, y: 0.140625 }, - { x: 0.546875, y: 0.140625 }, - { x: 0.546875, y: 0.140625 }, - { x: 0.578125, y: 0.140625 }, - { x: 0.578125, y: 0.140625 }, - { x: 0.609375, y: 0.140625 }, - { x: 0.609375, y: 0.140625 }, - { x: 0.640625, y: 0.140625 }, - { x: 0.640625, y: 0.140625 }, - { x: 0.671875, y: 0.140625 }, - { x: 0.671875, y: 0.140625 }, - { x: 0.703125, y: 0.140625 }, - { x: 0.703125, y: 0.140625 }, - { x: 0.734375, y: 0.140625 }, - { x: 0.734375, y: 0.140625 }, - { x: 0.765625, y: 0.140625 }, - { x: 0.765625, y: 0.140625 }, - { x: 0.796875, y: 0.140625 }, - { x: 0.796875, y: 0.140625 }, - { x: 0.828125, y: 0.140625 }, - { x: 0.828125, y: 0.140625 }, - { x: 0.859375, y: 0.140625 }, - { x: 0.859375, y: 0.140625 }, - { x: 0.890625, y: 0.140625 }, - { x: 0.890625, y: 0.140625 }, - { x: 0.921875, y: 0.140625 }, - { x: 0.921875, y: 0.140625 }, - { x: 0.953125, y: 0.140625 }, - { x: 0.953125, y: 0.140625 }, - { x: 0.984375, y: 0.140625 }, - { x: 0.984375, y: 0.140625 }, - { x: 0.015625, y: 0.171875 }, - { x: 0.015625, y: 0.171875 }, - { x: 0.046875, y: 0.171875 }, - { x: 0.046875, y: 0.171875 }, - { x: 0.078125, y: 0.171875 }, - { x: 0.078125, y: 0.171875 }, - { x: 0.109375, y: 0.171875 }, - { x: 0.109375, y: 0.171875 }, - { x: 0.140625, y: 0.171875 }, - { x: 0.140625, y: 0.171875 }, - { x: 0.171875, y: 0.171875 }, - { x: 0.171875, y: 0.171875 }, - { x: 0.203125, y: 0.171875 }, - { x: 0.203125, y: 0.171875 }, - { x: 0.234375, y: 0.171875 }, - { x: 0.234375, y: 0.171875 }, - { x: 0.265625, y: 0.171875 }, - { x: 0.265625, y: 0.171875 }, - { x: 0.296875, y: 0.171875 }, - { x: 0.296875, y: 0.171875 }, - { x: 0.328125, y: 0.171875 }, - { x: 0.328125, y: 0.171875 }, - { x: 0.359375, y: 0.171875 }, - { x: 0.359375, y: 0.171875 }, - { x: 0.390625, y: 0.171875 }, - { x: 0.390625, y: 0.171875 }, - { x: 0.421875, y: 0.171875 }, - { x: 0.421875, y: 0.171875 }, - { x: 0.453125, y: 0.171875 }, - { x: 0.453125, y: 0.171875 }, - { x: 0.484375, y: 0.171875 }, - { x: 0.484375, y: 0.171875 }, - { x: 0.515625, y: 0.171875 }, - { x: 0.515625, y: 0.171875 }, - { x: 0.546875, y: 0.171875 }, - { x: 0.546875, y: 0.171875 }, - { x: 0.578125, y: 0.171875 }, - { x: 0.578125, y: 0.171875 }, - { x: 0.609375, y: 0.171875 }, - { x: 0.609375, y: 0.171875 }, - { x: 0.640625, y: 0.171875 }, - { x: 0.640625, y: 0.171875 }, - { x: 0.671875, y: 0.171875 }, - { x: 0.671875, y: 0.171875 }, - { x: 0.703125, y: 0.171875 }, - { x: 0.703125, y: 0.171875 }, - { x: 0.734375, y: 0.171875 }, - { x: 0.734375, y: 0.171875 }, - { x: 0.765625, y: 0.171875 }, - { x: 0.765625, y: 0.171875 }, - { x: 0.796875, y: 0.171875 }, - { x: 0.796875, y: 0.171875 }, - { x: 0.828125, y: 0.171875 }, - { x: 0.828125, y: 0.171875 }, - { x: 0.859375, y: 0.171875 }, - { x: 0.859375, y: 0.171875 }, - { x: 0.890625, y: 0.171875 }, - { x: 0.890625, y: 0.171875 }, - { x: 0.921875, y: 0.171875 }, - { x: 0.921875, y: 0.171875 }, - { x: 0.953125, y: 0.171875 }, - { x: 0.953125, y: 0.171875 }, - { x: 0.984375, y: 0.171875 }, - { x: 0.984375, y: 0.171875 }, - { x: 0.015625, y: 0.203125 }, - { x: 0.015625, y: 0.203125 }, - { x: 0.046875, y: 0.203125 }, - { x: 0.046875, y: 0.203125 }, - { x: 0.078125, y: 0.203125 }, - { x: 0.078125, y: 0.203125 }, - { x: 0.109375, y: 0.203125 }, - { x: 0.109375, y: 0.203125 }, - { x: 0.140625, y: 0.203125 }, - { x: 0.140625, y: 0.203125 }, - { x: 0.171875, y: 0.203125 }, - { x: 0.171875, y: 0.203125 }, - { x: 0.203125, y: 0.203125 }, - { x: 0.203125, y: 0.203125 }, - { x: 0.234375, y: 0.203125 }, - { x: 0.234375, y: 0.203125 }, - { x: 0.265625, y: 0.203125 }, - { x: 0.265625, y: 0.203125 }, - { x: 0.296875, y: 0.203125 }, - { x: 0.296875, y: 0.203125 }, - { x: 0.328125, y: 0.203125 }, - { x: 0.328125, y: 0.203125 }, - { x: 0.359375, y: 0.203125 }, - { x: 0.359375, y: 0.203125 }, - { x: 0.390625, y: 0.203125 }, - { x: 0.390625, y: 0.203125 }, - { x: 0.421875, y: 0.203125 }, - { x: 0.421875, y: 0.203125 }, - { x: 0.453125, y: 0.203125 }, - { x: 0.453125, y: 0.203125 }, - { x: 0.484375, y: 0.203125 }, - { x: 0.484375, y: 0.203125 }, - { x: 0.515625, y: 0.203125 }, - { x: 0.515625, y: 0.203125 }, - { x: 0.546875, y: 0.203125 }, - { x: 0.546875, y: 0.203125 }, - { x: 0.578125, y: 0.203125 }, - { x: 0.578125, y: 0.203125 }, - { x: 0.609375, y: 0.203125 }, - { x: 0.609375, y: 0.203125 }, - { x: 0.640625, y: 0.203125 }, - { x: 0.640625, y: 0.203125 }, - { x: 0.671875, y: 0.203125 }, - { x: 0.671875, y: 0.203125 }, - { x: 0.703125, y: 0.203125 }, - { x: 0.703125, y: 0.203125 }, - { x: 0.734375, y: 0.203125 }, - { x: 0.734375, y: 0.203125 }, - { x: 0.765625, y: 0.203125 }, - { x: 0.765625, y: 0.203125 }, - { x: 0.796875, y: 0.203125 }, - { x: 0.796875, y: 0.203125 }, - { x: 0.828125, y: 0.203125 }, - { x: 0.828125, y: 0.203125 }, - { x: 0.859375, y: 0.203125 }, - { x: 0.859375, y: 0.203125 }, - { x: 0.890625, y: 0.203125 }, - { x: 0.890625, y: 0.203125 }, - { x: 0.921875, y: 0.203125 }, - { x: 0.921875, y: 0.203125 }, - { x: 0.953125, y: 0.203125 }, - { x: 0.953125, y: 0.203125 }, - { x: 0.984375, y: 0.203125 }, - { x: 0.984375, y: 0.203125 }, - { x: 0.015625, y: 0.234375 }, - { x: 0.015625, y: 0.234375 }, - { x: 0.046875, y: 0.234375 }, - { x: 0.046875, y: 0.234375 }, - { x: 0.078125, y: 0.234375 }, - { x: 0.078125, y: 0.234375 }, - { x: 0.109375, y: 0.234375 }, - { x: 0.109375, y: 0.234375 }, - { x: 0.140625, y: 0.234375 }, - { x: 0.140625, y: 0.234375 }, - { x: 0.171875, y: 0.234375 }, - { x: 0.171875, y: 0.234375 }, - { x: 0.203125, y: 0.234375 }, - { x: 0.203125, y: 0.234375 }, - { x: 0.234375, y: 0.234375 }, - { x: 0.234375, y: 0.234375 }, - { x: 0.265625, y: 0.234375 }, - { x: 0.265625, y: 0.234375 }, - { x: 0.296875, y: 0.234375 }, - { x: 0.296875, y: 0.234375 }, - { x: 0.328125, y: 0.234375 }, - { x: 0.328125, y: 0.234375 }, - { x: 0.359375, y: 0.234375 }, - { x: 0.359375, y: 0.234375 }, - { x: 0.390625, y: 0.234375 }, - { x: 0.390625, y: 0.234375 }, - { x: 0.421875, y: 0.234375 }, - { x: 0.421875, y: 0.234375 }, - { x: 0.453125, y: 0.234375 }, - { x: 0.453125, y: 0.234375 }, - { x: 0.484375, y: 0.234375 }, - { x: 0.484375, y: 0.234375 }, - { x: 0.515625, y: 0.234375 }, - { x: 0.515625, y: 0.234375 }, - { x: 0.546875, y: 0.234375 }, - { x: 0.546875, y: 0.234375 }, - { x: 0.578125, y: 0.234375 }, - { x: 0.578125, y: 0.234375 }, - { x: 0.609375, y: 0.234375 }, - { x: 0.609375, y: 0.234375 }, - { x: 0.640625, y: 0.234375 }, - { x: 0.640625, y: 0.234375 }, - { x: 0.671875, y: 0.234375 }, - { x: 0.671875, y: 0.234375 }, - { x: 0.703125, y: 0.234375 }, - { x: 0.703125, y: 0.234375 }, - { x: 0.734375, y: 0.234375 }, - { x: 0.734375, y: 0.234375 }, - { x: 0.765625, y: 0.234375 }, - { x: 0.765625, y: 0.234375 }, - { x: 0.796875, y: 0.234375 }, - { x: 0.796875, y: 0.234375 }, - { x: 0.828125, y: 0.234375 }, - { x: 0.828125, y: 0.234375 }, - { x: 0.859375, y: 0.234375 }, - { x: 0.859375, y: 0.234375 }, - { x: 0.890625, y: 0.234375 }, - { x: 0.890625, y: 0.234375 }, - { x: 0.921875, y: 0.234375 }, - { x: 0.921875, y: 0.234375 }, - { x: 0.953125, y: 0.234375 }, - { x: 0.953125, y: 0.234375 }, - { x: 0.984375, y: 0.234375 }, - { x: 0.984375, y: 0.234375 }, - { x: 0.015625, y: 0.265625 }, - { x: 0.015625, y: 0.265625 }, - { x: 0.046875, y: 0.265625 }, - { x: 0.046875, y: 0.265625 }, - { x: 0.078125, y: 0.265625 }, - { x: 0.078125, y: 0.265625 }, - { x: 0.109375, y: 0.265625 }, - { x: 0.109375, y: 0.265625 }, - { x: 0.140625, y: 0.265625 }, - { x: 0.140625, y: 0.265625 }, - { x: 0.171875, y: 0.265625 }, - { x: 0.171875, y: 0.265625 }, - { x: 0.203125, y: 0.265625 }, - { x: 0.203125, y: 0.265625 }, - { x: 0.234375, y: 0.265625 }, - { x: 0.234375, y: 0.265625 }, - { x: 0.265625, y: 0.265625 }, - { x: 0.265625, y: 0.265625 }, - { x: 0.296875, y: 0.265625 }, - { x: 0.296875, y: 0.265625 }, - { x: 0.328125, y: 0.265625 }, - { x: 0.328125, y: 0.265625 }, - { x: 0.359375, y: 0.265625 }, - { x: 0.359375, y: 0.265625 }, - { x: 0.390625, y: 0.265625 }, - { x: 0.390625, y: 0.265625 }, - { x: 0.421875, y: 0.265625 }, - { x: 0.421875, y: 0.265625 }, - { x: 0.453125, y: 0.265625 }, - { x: 0.453125, y: 0.265625 }, - { x: 0.484375, y: 0.265625 }, - { x: 0.484375, y: 0.265625 }, - { x: 0.515625, y: 0.265625 }, - { x: 0.515625, y: 0.265625 }, - { x: 0.546875, y: 0.265625 }, - { x: 0.546875, y: 0.265625 }, - { x: 0.578125, y: 0.265625 }, - { x: 0.578125, y: 0.265625 }, - { x: 0.609375, y: 0.265625 }, - { x: 0.609375, y: 0.265625 }, - { x: 0.640625, y: 0.265625 }, - { x: 0.640625, y: 0.265625 }, - { x: 0.671875, y: 0.265625 }, - { x: 0.671875, y: 0.265625 }, - { x: 0.703125, y: 0.265625 }, - { x: 0.703125, y: 0.265625 }, - { x: 0.734375, y: 0.265625 }, - { x: 0.734375, y: 0.265625 }, - { x: 0.765625, y: 0.265625 }, - { x: 0.765625, y: 0.265625 }, - { x: 0.796875, y: 0.265625 }, - { x: 0.796875, y: 0.265625 }, - { x: 0.828125, y: 0.265625 }, - { x: 0.828125, y: 0.265625 }, - { x: 0.859375, y: 0.265625 }, - { x: 0.859375, y: 0.265625 }, - { x: 0.890625, y: 0.265625 }, - { x: 0.890625, y: 0.265625 }, - { x: 0.921875, y: 0.265625 }, - { x: 0.921875, y: 0.265625 }, - { x: 0.953125, y: 0.265625 }, - { x: 0.953125, y: 0.265625 }, - { x: 0.984375, y: 0.265625 }, - { x: 0.984375, y: 0.265625 }, - { x: 0.015625, y: 0.296875 }, - { x: 0.015625, y: 0.296875 }, - { x: 0.046875, y: 0.296875 }, - { x: 0.046875, y: 0.296875 }, - { x: 0.078125, y: 0.296875 }, - { x: 0.078125, y: 0.296875 }, - { x: 0.109375, y: 0.296875 }, - { x: 0.109375, y: 0.296875 }, - { x: 0.140625, y: 0.296875 }, - { x: 0.140625, y: 0.296875 }, - { x: 0.171875, y: 0.296875 }, - { x: 0.171875, y: 0.296875 }, - { x: 0.203125, y: 0.296875 }, - { x: 0.203125, y: 0.296875 }, - { x: 0.234375, y: 0.296875 }, - { x: 0.234375, y: 0.296875 }, - { x: 0.265625, y: 0.296875 }, - { x: 0.265625, y: 0.296875 }, - { x: 0.296875, y: 0.296875 }, - { x: 0.296875, y: 0.296875 }, - { x: 0.328125, y: 0.296875 }, - { x: 0.328125, y: 0.296875 }, - { x: 0.359375, y: 0.296875 }, - { x: 0.359375, y: 0.296875 }, - { x: 0.390625, y: 0.296875 }, - { x: 0.390625, y: 0.296875 }, - { x: 0.421875, y: 0.296875 }, - { x: 0.421875, y: 0.296875 }, - { x: 0.453125, y: 0.296875 }, - { x: 0.453125, y: 0.296875 }, - { x: 0.484375, y: 0.296875 }, - { x: 0.484375, y: 0.296875 }, - { x: 0.515625, y: 0.296875 }, - { x: 0.515625, y: 0.296875 }, - { x: 0.546875, y: 0.296875 }, - { x: 0.546875, y: 0.296875 }, - { x: 0.578125, y: 0.296875 }, - { x: 0.578125, y: 0.296875 }, - { x: 0.609375, y: 0.296875 }, - { x: 0.609375, y: 0.296875 }, - { x: 0.640625, y: 0.296875 }, - { x: 0.640625, y: 0.296875 }, - { x: 0.671875, y: 0.296875 }, - { x: 0.671875, y: 0.296875 }, - { x: 0.703125, y: 0.296875 }, - { x: 0.703125, y: 0.296875 }, - { x: 0.734375, y: 0.296875 }, - { x: 0.734375, y: 0.296875 }, - { x: 0.765625, y: 0.296875 }, - { x: 0.765625, y: 0.296875 }, - { x: 0.796875, y: 0.296875 }, - { x: 0.796875, y: 0.296875 }, - { x: 0.828125, y: 0.296875 }, - { x: 0.828125, y: 0.296875 }, - { x: 0.859375, y: 0.296875 }, - { x: 0.859375, y: 0.296875 }, - { x: 0.890625, y: 0.296875 }, - { x: 0.890625, y: 0.296875 }, - { x: 0.921875, y: 0.296875 }, - { x: 0.921875, y: 0.296875 }, - { x: 0.953125, y: 0.296875 }, - { x: 0.953125, y: 0.296875 }, - { x: 0.984375, y: 0.296875 }, - { x: 0.984375, y: 0.296875 }, - { x: 0.015625, y: 0.328125 }, - { x: 0.015625, y: 0.328125 }, - { x: 0.046875, y: 0.328125 }, - { x: 0.046875, y: 0.328125 }, - { x: 0.078125, y: 0.328125 }, - { x: 0.078125, y: 0.328125 }, - { x: 0.109375, y: 0.328125 }, - { x: 0.109375, y: 0.328125 }, - { x: 0.140625, y: 0.328125 }, - { x: 0.140625, y: 0.328125 }, - { x: 0.171875, y: 0.328125 }, - { x: 0.171875, y: 0.328125 }, - { x: 0.203125, y: 0.328125 }, - { x: 0.203125, y: 0.328125 }, - { x: 0.234375, y: 0.328125 }, - { x: 0.234375, y: 0.328125 }, - { x: 0.265625, y: 0.328125 }, - { x: 0.265625, y: 0.328125 }, - { x: 0.296875, y: 0.328125 }, - { x: 0.296875, y: 0.328125 }, - { x: 0.328125, y: 0.328125 }, - { x: 0.328125, y: 0.328125 }, - { x: 0.359375, y: 0.328125 }, - { x: 0.359375, y: 0.328125 }, - { x: 0.390625, y: 0.328125 }, - { x: 0.390625, y: 0.328125 }, - { x: 0.421875, y: 0.328125 }, - { x: 0.421875, y: 0.328125 }, - { x: 0.453125, y: 0.328125 }, - { x: 0.453125, y: 0.328125 }, - { x: 0.484375, y: 0.328125 }, - { x: 0.484375, y: 0.328125 }, - { x: 0.515625, y: 0.328125 }, - { x: 0.515625, y: 0.328125 }, - { x: 0.546875, y: 0.328125 }, - { x: 0.546875, y: 0.328125 }, - { x: 0.578125, y: 0.328125 }, - { x: 0.578125, y: 0.328125 }, - { x: 0.609375, y: 0.328125 }, - { x: 0.609375, y: 0.328125 }, - { x: 0.640625, y: 0.328125 }, - { x: 0.640625, y: 0.328125 }, - { x: 0.671875, y: 0.328125 }, - { x: 0.671875, y: 0.328125 }, - { x: 0.703125, y: 0.328125 }, - { x: 0.703125, y: 0.328125 }, - { x: 0.734375, y: 0.328125 }, - { x: 0.734375, y: 0.328125 }, - { x: 0.765625, y: 0.328125 }, - { x: 0.765625, y: 0.328125 }, - { x: 0.796875, y: 0.328125 }, - { x: 0.796875, y: 0.328125 }, - { x: 0.828125, y: 0.328125 }, - { x: 0.828125, y: 0.328125 }, - { x: 0.859375, y: 0.328125 }, - { x: 0.859375, y: 0.328125 }, - { x: 0.890625, y: 0.328125 }, - { x: 0.890625, y: 0.328125 }, - { x: 0.921875, y: 0.328125 }, - { x: 0.921875, y: 0.328125 }, - { x: 0.953125, y: 0.328125 }, - { x: 0.953125, y: 0.328125 }, - { x: 0.984375, y: 0.328125 }, - { x: 0.984375, y: 0.328125 }, - { x: 0.015625, y: 0.359375 }, - { x: 0.015625, y: 0.359375 }, - { x: 0.046875, y: 0.359375 }, - { x: 0.046875, y: 0.359375 }, - { x: 0.078125, y: 0.359375 }, - { x: 0.078125, y: 0.359375 }, - { x: 0.109375, y: 0.359375 }, - { x: 0.109375, y: 0.359375 }, - { x: 0.140625, y: 0.359375 }, - { x: 0.140625, y: 0.359375 }, - { x: 0.171875, y: 0.359375 }, - { x: 0.171875, y: 0.359375 }, - { x: 0.203125, y: 0.359375 }, - { x: 0.203125, y: 0.359375 }, - { x: 0.234375, y: 0.359375 }, - { x: 0.234375, y: 0.359375 }, - { x: 0.265625, y: 0.359375 }, - { x: 0.265625, y: 0.359375 }, - { x: 0.296875, y: 0.359375 }, - { x: 0.296875, y: 0.359375 }, - { x: 0.328125, y: 0.359375 }, - { x: 0.328125, y: 0.359375 }, - { x: 0.359375, y: 0.359375 }, - { x: 0.359375, y: 0.359375 }, - { x: 0.390625, y: 0.359375 }, - { x: 0.390625, y: 0.359375 }, - { x: 0.421875, y: 0.359375 }, - { x: 0.421875, y: 0.359375 }, - { x: 0.453125, y: 0.359375 }, - { x: 0.453125, y: 0.359375 }, - { x: 0.484375, y: 0.359375 }, - { x: 0.484375, y: 0.359375 }, - { x: 0.515625, y: 0.359375 }, - { x: 0.515625, y: 0.359375 }, - { x: 0.546875, y: 0.359375 }, - { x: 0.546875, y: 0.359375 }, - { x: 0.578125, y: 0.359375 }, - { x: 0.578125, y: 0.359375 }, - { x: 0.609375, y: 0.359375 }, - { x: 0.609375, y: 0.359375 }, - { x: 0.640625, y: 0.359375 }, - { x: 0.640625, y: 0.359375 }, - { x: 0.671875, y: 0.359375 }, - { x: 0.671875, y: 0.359375 }, - { x: 0.703125, y: 0.359375 }, - { x: 0.703125, y: 0.359375 }, - { x: 0.734375, y: 0.359375 }, - { x: 0.734375, y: 0.359375 }, - { x: 0.765625, y: 0.359375 }, - { x: 0.765625, y: 0.359375 }, - { x: 0.796875, y: 0.359375 }, - { x: 0.796875, y: 0.359375 }, - { x: 0.828125, y: 0.359375 }, - { x: 0.828125, y: 0.359375 }, - { x: 0.859375, y: 0.359375 }, - { x: 0.859375, y: 0.359375 }, - { x: 0.890625, y: 0.359375 }, - { x: 0.890625, y: 0.359375 }, - { x: 0.921875, y: 0.359375 }, - { x: 0.921875, y: 0.359375 }, - { x: 0.953125, y: 0.359375 }, - { x: 0.953125, y: 0.359375 }, - { x: 0.984375, y: 0.359375 }, - { x: 0.984375, y: 0.359375 }, - { x: 0.015625, y: 0.390625 }, - { x: 0.015625, y: 0.390625 }, - { x: 0.046875, y: 0.390625 }, - { x: 0.046875, y: 0.390625 }, - { x: 0.078125, y: 0.390625 }, - { x: 0.078125, y: 0.390625 }, - { x: 0.109375, y: 0.390625 }, - { x: 0.109375, y: 0.390625 }, - { x: 0.140625, y: 0.390625 }, - { x: 0.140625, y: 0.390625 }, - { x: 0.171875, y: 0.390625 }, - { x: 0.171875, y: 0.390625 }, - { x: 0.203125, y: 0.390625 }, - { x: 0.203125, y: 0.390625 }, - { x: 0.234375, y: 0.390625 }, - { x: 0.234375, y: 0.390625 }, - { x: 0.265625, y: 0.390625 }, - { x: 0.265625, y: 0.390625 }, - { x: 0.296875, y: 0.390625 }, - { x: 0.296875, y: 0.390625 }, - { x: 0.328125, y: 0.390625 }, - { x: 0.328125, y: 0.390625 }, - { x: 0.359375, y: 0.390625 }, - { x: 0.359375, y: 0.390625 }, - { x: 0.390625, y: 0.390625 }, - { x: 0.390625, y: 0.390625 }, - { x: 0.421875, y: 0.390625 }, - { x: 0.421875, y: 0.390625 }, - { x: 0.453125, y: 0.390625 }, - { x: 0.453125, y: 0.390625 }, - { x: 0.484375, y: 0.390625 }, - { x: 0.484375, y: 0.390625 }, - { x: 0.515625, y: 0.390625 }, - { x: 0.515625, y: 0.390625 }, - { x: 0.546875, y: 0.390625 }, - { x: 0.546875, y: 0.390625 }, - { x: 0.578125, y: 0.390625 }, - { x: 0.578125, y: 0.390625 }, - { x: 0.609375, y: 0.390625 }, - { x: 0.609375, y: 0.390625 }, - { x: 0.640625, y: 0.390625 }, - { x: 0.640625, y: 0.390625 }, - { x: 0.671875, y: 0.390625 }, - { x: 0.671875, y: 0.390625 }, - { x: 0.703125, y: 0.390625 }, - { x: 0.703125, y: 0.390625 }, - { x: 0.734375, y: 0.390625 }, - { x: 0.734375, y: 0.390625 }, - { x: 0.765625, y: 0.390625 }, - { x: 0.765625, y: 0.390625 }, - { x: 0.796875, y: 0.390625 }, - { x: 0.796875, y: 0.390625 }, - { x: 0.828125, y: 0.390625 }, - { x: 0.828125, y: 0.390625 }, - { x: 0.859375, y: 0.390625 }, - { x: 0.859375, y: 0.390625 }, - { x: 0.890625, y: 0.390625 }, - { x: 0.890625, y: 0.390625 }, - { x: 0.921875, y: 0.390625 }, - { x: 0.921875, y: 0.390625 }, - { x: 0.953125, y: 0.390625 }, - { x: 0.953125, y: 0.390625 }, - { x: 0.984375, y: 0.390625 }, - { x: 0.984375, y: 0.390625 }, - { x: 0.015625, y: 0.421875 }, - { x: 0.015625, y: 0.421875 }, - { x: 0.046875, y: 0.421875 }, - { x: 0.046875, y: 0.421875 }, - { x: 0.078125, y: 0.421875 }, - { x: 0.078125, y: 0.421875 }, - { x: 0.109375, y: 0.421875 }, - { x: 0.109375, y: 0.421875 }, - { x: 0.140625, y: 0.421875 }, - { x: 0.140625, y: 0.421875 }, - { x: 0.171875, y: 0.421875 }, - { x: 0.171875, y: 0.421875 }, - { x: 0.203125, y: 0.421875 }, - { x: 0.203125, y: 0.421875 }, - { x: 0.234375, y: 0.421875 }, - { x: 0.234375, y: 0.421875 }, - { x: 0.265625, y: 0.421875 }, - { x: 0.265625, y: 0.421875 }, - { x: 0.296875, y: 0.421875 }, - { x: 0.296875, y: 0.421875 }, - { x: 0.328125, y: 0.421875 }, - { x: 0.328125, y: 0.421875 }, - { x: 0.359375, y: 0.421875 }, - { x: 0.359375, y: 0.421875 }, - { x: 0.390625, y: 0.421875 }, - { x: 0.390625, y: 0.421875 }, - { x: 0.421875, y: 0.421875 }, - { x: 0.421875, y: 0.421875 }, - { x: 0.453125, y: 0.421875 }, - { x: 0.453125, y: 0.421875 }, - { x: 0.484375, y: 0.421875 }, - { x: 0.484375, y: 0.421875 }, - { x: 0.515625, y: 0.421875 }, - { x: 0.515625, y: 0.421875 }, - { x: 0.546875, y: 0.421875 }, - { x: 0.546875, y: 0.421875 }, - { x: 0.578125, y: 0.421875 }, - { x: 0.578125, y: 0.421875 }, - { x: 0.609375, y: 0.421875 }, - { x: 0.609375, y: 0.421875 }, - { x: 0.640625, y: 0.421875 }, - { x: 0.640625, y: 0.421875 }, - { x: 0.671875, y: 0.421875 }, - { x: 0.671875, y: 0.421875 }, - { x: 0.703125, y: 0.421875 }, - { x: 0.703125, y: 0.421875 }, - { x: 0.734375, y: 0.421875 }, - { x: 0.734375, y: 0.421875 }, - { x: 0.765625, y: 0.421875 }, - { x: 0.765625, y: 0.421875 }, - { x: 0.796875, y: 0.421875 }, - { x: 0.796875, y: 0.421875 }, - { x: 0.828125, y: 0.421875 }, - { x: 0.828125, y: 0.421875 }, - { x: 0.859375, y: 0.421875 }, - { x: 0.859375, y: 0.421875 }, - { x: 0.890625, y: 0.421875 }, - { x: 0.890625, y: 0.421875 }, - { x: 0.921875, y: 0.421875 }, - { x: 0.921875, y: 0.421875 }, - { x: 0.953125, y: 0.421875 }, - { x: 0.953125, y: 0.421875 }, - { x: 0.984375, y: 0.421875 }, - { x: 0.984375, y: 0.421875 }, - { x: 0.015625, y: 0.453125 }, - { x: 0.015625, y: 0.453125 }, - { x: 0.046875, y: 0.453125 }, - { x: 0.046875, y: 0.453125 }, - { x: 0.078125, y: 0.453125 }, - { x: 0.078125, y: 0.453125 }, - { x: 0.109375, y: 0.453125 }, - { x: 0.109375, y: 0.453125 }, - { x: 0.140625, y: 0.453125 }, - { x: 0.140625, y: 0.453125 }, - { x: 0.171875, y: 0.453125 }, - { x: 0.171875, y: 0.453125 }, - { x: 0.203125, y: 0.453125 }, - { x: 0.203125, y: 0.453125 }, - { x: 0.234375, y: 0.453125 }, - { x: 0.234375, y: 0.453125 }, - { x: 0.265625, y: 0.453125 }, - { x: 0.265625, y: 0.453125 }, - { x: 0.296875, y: 0.453125 }, - { x: 0.296875, y: 0.453125 }, - { x: 0.328125, y: 0.453125 }, - { x: 0.328125, y: 0.453125 }, - { x: 0.359375, y: 0.453125 }, - { x: 0.359375, y: 0.453125 }, - { x: 0.390625, y: 0.453125 }, - { x: 0.390625, y: 0.453125 }, - { x: 0.421875, y: 0.453125 }, - { x: 0.421875, y: 0.453125 }, - { x: 0.453125, y: 0.453125 }, - { x: 0.453125, y: 0.453125 }, - { x: 0.484375, y: 0.453125 }, - { x: 0.484375, y: 0.453125 }, - { x: 0.515625, y: 0.453125 }, - { x: 0.515625, y: 0.453125 }, - { x: 0.546875, y: 0.453125 }, - { x: 0.546875, y: 0.453125 }, - { x: 0.578125, y: 0.453125 }, - { x: 0.578125, y: 0.453125 }, - { x: 0.609375, y: 0.453125 }, - { x: 0.609375, y: 0.453125 }, - { x: 0.640625, y: 0.453125 }, - { x: 0.640625, y: 0.453125 }, - { x: 0.671875, y: 0.453125 }, - { x: 0.671875, y: 0.453125 }, - { x: 0.703125, y: 0.453125 }, - { x: 0.703125, y: 0.453125 }, - { x: 0.734375, y: 0.453125 }, - { x: 0.734375, y: 0.453125 }, - { x: 0.765625, y: 0.453125 }, - { x: 0.765625, y: 0.453125 }, - { x: 0.796875, y: 0.453125 }, - { x: 0.796875, y: 0.453125 }, - { x: 0.828125, y: 0.453125 }, - { x: 0.828125, y: 0.453125 }, - { x: 0.859375, y: 0.453125 }, - { x: 0.859375, y: 0.453125 }, - { x: 0.890625, y: 0.453125 }, - { x: 0.890625, y: 0.453125 }, - { x: 0.921875, y: 0.453125 }, - { x: 0.921875, y: 0.453125 }, - { x: 0.953125, y: 0.453125 }, - { x: 0.953125, y: 0.453125 }, - { x: 0.984375, y: 0.453125 }, - { x: 0.984375, y: 0.453125 }, - { x: 0.015625, y: 0.484375 }, - { x: 0.015625, y: 0.484375 }, - { x: 0.046875, y: 0.484375 }, - { x: 0.046875, y: 0.484375 }, - { x: 0.078125, y: 0.484375 }, - { x: 0.078125, y: 0.484375 }, - { x: 0.109375, y: 0.484375 }, - { x: 0.109375, y: 0.484375 }, - { x: 0.140625, y: 0.484375 }, - { x: 0.140625, y: 0.484375 }, - { x: 0.171875, y: 0.484375 }, - { x: 0.171875, y: 0.484375 }, - { x: 0.203125, y: 0.484375 }, - { x: 0.203125, y: 0.484375 }, - { x: 0.234375, y: 0.484375 }, - { x: 0.234375, y: 0.484375 }, - { x: 0.265625, y: 0.484375 }, - { x: 0.265625, y: 0.484375 }, - { x: 0.296875, y: 0.484375 }, - { x: 0.296875, y: 0.484375 }, - { x: 0.328125, y: 0.484375 }, - { x: 0.328125, y: 0.484375 }, - { x: 0.359375, y: 0.484375 }, - { x: 0.359375, y: 0.484375 }, - { x: 0.390625, y: 0.484375 }, - { x: 0.390625, y: 0.484375 }, - { x: 0.421875, y: 0.484375 }, - { x: 0.421875, y: 0.484375 }, - { x: 0.453125, y: 0.484375 }, - { x: 0.453125, y: 0.484375 }, - { x: 0.484375, y: 0.484375 }, - { x: 0.484375, y: 0.484375 }, - { x: 0.515625, y: 0.484375 }, - { x: 0.515625, y: 0.484375 }, - { x: 0.546875, y: 0.484375 }, - { x: 0.546875, y: 0.484375 }, - { x: 0.578125, y: 0.484375 }, - { x: 0.578125, y: 0.484375 }, - { x: 0.609375, y: 0.484375 }, - { x: 0.609375, y: 0.484375 }, - { x: 0.640625, y: 0.484375 }, - { x: 0.640625, y: 0.484375 }, - { x: 0.671875, y: 0.484375 }, - { x: 0.671875, y: 0.484375 }, - { x: 0.703125, y: 0.484375 }, - { x: 0.703125, y: 0.484375 }, - { x: 0.734375, y: 0.484375 }, - { x: 0.734375, y: 0.484375 }, - { x: 0.765625, y: 0.484375 }, - { x: 0.765625, y: 0.484375 }, - { x: 0.796875, y: 0.484375 }, - { x: 0.796875, y: 0.484375 }, - { x: 0.828125, y: 0.484375 }, - { x: 0.828125, y: 0.484375 }, - { x: 0.859375, y: 0.484375 }, - { x: 0.859375, y: 0.484375 }, - { x: 0.890625, y: 0.484375 }, - { x: 0.890625, y: 0.484375 }, - { x: 0.921875, y: 0.484375 }, - { x: 0.921875, y: 0.484375 }, - { x: 0.953125, y: 0.484375 }, - { x: 0.953125, y: 0.484375 }, - { x: 0.984375, y: 0.484375 }, - { x: 0.984375, y: 0.484375 }, - { x: 0.015625, y: 0.515625 }, - { x: 0.015625, y: 0.515625 }, - { x: 0.046875, y: 0.515625 }, - { x: 0.046875, y: 0.515625 }, - { x: 0.078125, y: 0.515625 }, - { x: 0.078125, y: 0.515625 }, - { x: 0.109375, y: 0.515625 }, - { x: 0.109375, y: 0.515625 }, - { x: 0.140625, y: 0.515625 }, - { x: 0.140625, y: 0.515625 }, - { x: 0.171875, y: 0.515625 }, - { x: 0.171875, y: 0.515625 }, - { x: 0.203125, y: 0.515625 }, - { x: 0.203125, y: 0.515625 }, - { x: 0.234375, y: 0.515625 }, - { x: 0.234375, y: 0.515625 }, - { x: 0.265625, y: 0.515625 }, - { x: 0.265625, y: 0.515625 }, - { x: 0.296875, y: 0.515625 }, - { x: 0.296875, y: 0.515625 }, - { x: 0.328125, y: 0.515625 }, - { x: 0.328125, y: 0.515625 }, - { x: 0.359375, y: 0.515625 }, - { x: 0.359375, y: 0.515625 }, - { x: 0.390625, y: 0.515625 }, - { x: 0.390625, y: 0.515625 }, - { x: 0.421875, y: 0.515625 }, - { x: 0.421875, y: 0.515625 }, - { x: 0.453125, y: 0.515625 }, - { x: 0.453125, y: 0.515625 }, - { x: 0.484375, y: 0.515625 }, - { x: 0.484375, y: 0.515625 }, - { x: 0.515625, y: 0.515625 }, - { x: 0.515625, y: 0.515625 }, - { x: 0.546875, y: 0.515625 }, - { x: 0.546875, y: 0.515625 }, - { x: 0.578125, y: 0.515625 }, - { x: 0.578125, y: 0.515625 }, - { x: 0.609375, y: 0.515625 }, - { x: 0.609375, y: 0.515625 }, - { x: 0.640625, y: 0.515625 }, - { x: 0.640625, y: 0.515625 }, - { x: 0.671875, y: 0.515625 }, - { x: 0.671875, y: 0.515625 }, - { x: 0.703125, y: 0.515625 }, - { x: 0.703125, y: 0.515625 }, - { x: 0.734375, y: 0.515625 }, - { x: 0.734375, y: 0.515625 }, - { x: 0.765625, y: 0.515625 }, - { x: 0.765625, y: 0.515625 }, - { x: 0.796875, y: 0.515625 }, - { x: 0.796875, y: 0.515625 }, - { x: 0.828125, y: 0.515625 }, - { x: 0.828125, y: 0.515625 }, - { x: 0.859375, y: 0.515625 }, - { x: 0.859375, y: 0.515625 }, - { x: 0.890625, y: 0.515625 }, - { x: 0.890625, y: 0.515625 }, - { x: 0.921875, y: 0.515625 }, - { x: 0.921875, y: 0.515625 }, - { x: 0.953125, y: 0.515625 }, - { x: 0.953125, y: 0.515625 }, - { x: 0.984375, y: 0.515625 }, - { x: 0.984375, y: 0.515625 }, - { x: 0.015625, y: 0.546875 }, - { x: 0.015625, y: 0.546875 }, - { x: 0.046875, y: 0.546875 }, - { x: 0.046875, y: 0.546875 }, - { x: 0.078125, y: 0.546875 }, - { x: 0.078125, y: 0.546875 }, - { x: 0.109375, y: 0.546875 }, - { x: 0.109375, y: 0.546875 }, - { x: 0.140625, y: 0.546875 }, - { x: 0.140625, y: 0.546875 }, - { x: 0.171875, y: 0.546875 }, - { x: 0.171875, y: 0.546875 }, - { x: 0.203125, y: 0.546875 }, - { x: 0.203125, y: 0.546875 }, - { x: 0.234375, y: 0.546875 }, - { x: 0.234375, y: 0.546875 }, - { x: 0.265625, y: 0.546875 }, - { x: 0.265625, y: 0.546875 }, - { x: 0.296875, y: 0.546875 }, - { x: 0.296875, y: 0.546875 }, - { x: 0.328125, y: 0.546875 }, - { x: 0.328125, y: 0.546875 }, - { x: 0.359375, y: 0.546875 }, - { x: 0.359375, y: 0.546875 }, - { x: 0.390625, y: 0.546875 }, - { x: 0.390625, y: 0.546875 }, - { x: 0.421875, y: 0.546875 }, - { x: 0.421875, y: 0.546875 }, - { x: 0.453125, y: 0.546875 }, - { x: 0.453125, y: 0.546875 }, - { x: 0.484375, y: 0.546875 }, - { x: 0.484375, y: 0.546875 }, - { x: 0.515625, y: 0.546875 }, - { x: 0.515625, y: 0.546875 }, - { x: 0.546875, y: 0.546875 }, - { x: 0.546875, y: 0.546875 }, - { x: 0.578125, y: 0.546875 }, - { x: 0.578125, y: 0.546875 }, - { x: 0.609375, y: 0.546875 }, - { x: 0.609375, y: 0.546875 }, - { x: 0.640625, y: 0.546875 }, - { x: 0.640625, y: 0.546875 }, - { x: 0.671875, y: 0.546875 }, - { x: 0.671875, y: 0.546875 }, - { x: 0.703125, y: 0.546875 }, - { x: 0.703125, y: 0.546875 }, - { x: 0.734375, y: 0.546875 }, - { x: 0.734375, y: 0.546875 }, - { x: 0.765625, y: 0.546875 }, - { x: 0.765625, y: 0.546875 }, - { x: 0.796875, y: 0.546875 }, - { x: 0.796875, y: 0.546875 }, - { x: 0.828125, y: 0.546875 }, - { x: 0.828125, y: 0.546875 }, - { x: 0.859375, y: 0.546875 }, - { x: 0.859375, y: 0.546875 }, - { x: 0.890625, y: 0.546875 }, - { x: 0.890625, y: 0.546875 }, - { x: 0.921875, y: 0.546875 }, - { x: 0.921875, y: 0.546875 }, - { x: 0.953125, y: 0.546875 }, - { x: 0.953125, y: 0.546875 }, - { x: 0.984375, y: 0.546875 }, - { x: 0.984375, y: 0.546875 }, - { x: 0.015625, y: 0.578125 }, - { x: 0.015625, y: 0.578125 }, - { x: 0.046875, y: 0.578125 }, - { x: 0.046875, y: 0.578125 }, - { x: 0.078125, y: 0.578125 }, - { x: 0.078125, y: 0.578125 }, - { x: 0.109375, y: 0.578125 }, - { x: 0.109375, y: 0.578125 }, - { x: 0.140625, y: 0.578125 }, - { x: 0.140625, y: 0.578125 }, - { x: 0.171875, y: 0.578125 }, - { x: 0.171875, y: 0.578125 }, - { x: 0.203125, y: 0.578125 }, - { x: 0.203125, y: 0.578125 }, - { x: 0.234375, y: 0.578125 }, - { x: 0.234375, y: 0.578125 }, - { x: 0.265625, y: 0.578125 }, - { x: 0.265625, y: 0.578125 }, - { x: 0.296875, y: 0.578125 }, - { x: 0.296875, y: 0.578125 }, - { x: 0.328125, y: 0.578125 }, - { x: 0.328125, y: 0.578125 }, - { x: 0.359375, y: 0.578125 }, - { x: 0.359375, y: 0.578125 }, - { x: 0.390625, y: 0.578125 }, - { x: 0.390625, y: 0.578125 }, - { x: 0.421875, y: 0.578125 }, - { x: 0.421875, y: 0.578125 }, - { x: 0.453125, y: 0.578125 }, - { x: 0.453125, y: 0.578125 }, - { x: 0.484375, y: 0.578125 }, - { x: 0.484375, y: 0.578125 }, - { x: 0.515625, y: 0.578125 }, - { x: 0.515625, y: 0.578125 }, - { x: 0.546875, y: 0.578125 }, - { x: 0.546875, y: 0.578125 }, - { x: 0.578125, y: 0.578125 }, - { x: 0.578125, y: 0.578125 }, - { x: 0.609375, y: 0.578125 }, - { x: 0.609375, y: 0.578125 }, - { x: 0.640625, y: 0.578125 }, - { x: 0.640625, y: 0.578125 }, - { x: 0.671875, y: 0.578125 }, - { x: 0.671875, y: 0.578125 }, - { x: 0.703125, y: 0.578125 }, - { x: 0.703125, y: 0.578125 }, - { x: 0.734375, y: 0.578125 }, - { x: 0.734375, y: 0.578125 }, - { x: 0.765625, y: 0.578125 }, - { x: 0.765625, y: 0.578125 }, - { x: 0.796875, y: 0.578125 }, - { x: 0.796875, y: 0.578125 }, - { x: 0.828125, y: 0.578125 }, - { x: 0.828125, y: 0.578125 }, - { x: 0.859375, y: 0.578125 }, - { x: 0.859375, y: 0.578125 }, - { x: 0.890625, y: 0.578125 }, - { x: 0.890625, y: 0.578125 }, - { x: 0.921875, y: 0.578125 }, - { x: 0.921875, y: 0.578125 }, - { x: 0.953125, y: 0.578125 }, - { x: 0.953125, y: 0.578125 }, - { x: 0.984375, y: 0.578125 }, - { x: 0.984375, y: 0.578125 }, - { x: 0.015625, y: 0.609375 }, - { x: 0.015625, y: 0.609375 }, - { x: 0.046875, y: 0.609375 }, - { x: 0.046875, y: 0.609375 }, - { x: 0.078125, y: 0.609375 }, - { x: 0.078125, y: 0.609375 }, - { x: 0.109375, y: 0.609375 }, - { x: 0.109375, y: 0.609375 }, - { x: 0.140625, y: 0.609375 }, - { x: 0.140625, y: 0.609375 }, - { x: 0.171875, y: 0.609375 }, - { x: 0.171875, y: 0.609375 }, - { x: 0.203125, y: 0.609375 }, - { x: 0.203125, y: 0.609375 }, - { x: 0.234375, y: 0.609375 }, - { x: 0.234375, y: 0.609375 }, - { x: 0.265625, y: 0.609375 }, - { x: 0.265625, y: 0.609375 }, - { x: 0.296875, y: 0.609375 }, - { x: 0.296875, y: 0.609375 }, - { x: 0.328125, y: 0.609375 }, - { x: 0.328125, y: 0.609375 }, - { x: 0.359375, y: 0.609375 }, - { x: 0.359375, y: 0.609375 }, - { x: 0.390625, y: 0.609375 }, - { x: 0.390625, y: 0.609375 }, - { x: 0.421875, y: 0.609375 }, - { x: 0.421875, y: 0.609375 }, - { x: 0.453125, y: 0.609375 }, - { x: 0.453125, y: 0.609375 }, - { x: 0.484375, y: 0.609375 }, - { x: 0.484375, y: 0.609375 }, - { x: 0.515625, y: 0.609375 }, - { x: 0.515625, y: 0.609375 }, - { x: 0.546875, y: 0.609375 }, - { x: 0.546875, y: 0.609375 }, - { x: 0.578125, y: 0.609375 }, - { x: 0.578125, y: 0.609375 }, - { x: 0.609375, y: 0.609375 }, - { x: 0.609375, y: 0.609375 }, - { x: 0.640625, y: 0.609375 }, - { x: 0.640625, y: 0.609375 }, - { x: 0.671875, y: 0.609375 }, - { x: 0.671875, y: 0.609375 }, - { x: 0.703125, y: 0.609375 }, - { x: 0.703125, y: 0.609375 }, - { x: 0.734375, y: 0.609375 }, - { x: 0.734375, y: 0.609375 }, - { x: 0.765625, y: 0.609375 }, - { x: 0.765625, y: 0.609375 }, - { x: 0.796875, y: 0.609375 }, - { x: 0.796875, y: 0.609375 }, - { x: 0.828125, y: 0.609375 }, - { x: 0.828125, y: 0.609375 }, - { x: 0.859375, y: 0.609375 }, - { x: 0.859375, y: 0.609375 }, - { x: 0.890625, y: 0.609375 }, - { x: 0.890625, y: 0.609375 }, - { x: 0.921875, y: 0.609375 }, - { x: 0.921875, y: 0.609375 }, - { x: 0.953125, y: 0.609375 }, - { x: 0.953125, y: 0.609375 }, - { x: 0.984375, y: 0.609375 }, - { x: 0.984375, y: 0.609375 }, - { x: 0.015625, y: 0.640625 }, - { x: 0.015625, y: 0.640625 }, - { x: 0.046875, y: 0.640625 }, - { x: 0.046875, y: 0.640625 }, - { x: 0.078125, y: 0.640625 }, - { x: 0.078125, y: 0.640625 }, - { x: 0.109375, y: 0.640625 }, - { x: 0.109375, y: 0.640625 }, - { x: 0.140625, y: 0.640625 }, - { x: 0.140625, y: 0.640625 }, - { x: 0.171875, y: 0.640625 }, - { x: 0.171875, y: 0.640625 }, - { x: 0.203125, y: 0.640625 }, - { x: 0.203125, y: 0.640625 }, - { x: 0.234375, y: 0.640625 }, - { x: 0.234375, y: 0.640625 }, - { x: 0.265625, y: 0.640625 }, - { x: 0.265625, y: 0.640625 }, - { x: 0.296875, y: 0.640625 }, - { x: 0.296875, y: 0.640625 }, - { x: 0.328125, y: 0.640625 }, - { x: 0.328125, y: 0.640625 }, - { x: 0.359375, y: 0.640625 }, - { x: 0.359375, y: 0.640625 }, - { x: 0.390625, y: 0.640625 }, - { x: 0.390625, y: 0.640625 }, - { x: 0.421875, y: 0.640625 }, - { x: 0.421875, y: 0.640625 }, - { x: 0.453125, y: 0.640625 }, - { x: 0.453125, y: 0.640625 }, - { x: 0.484375, y: 0.640625 }, - { x: 0.484375, y: 0.640625 }, - { x: 0.515625, y: 0.640625 }, - { x: 0.515625, y: 0.640625 }, - { x: 0.546875, y: 0.640625 }, - { x: 0.546875, y: 0.640625 }, - { x: 0.578125, y: 0.640625 }, - { x: 0.578125, y: 0.640625 }, - { x: 0.609375, y: 0.640625 }, - { x: 0.609375, y: 0.640625 }, - { x: 0.640625, y: 0.640625 }, - { x: 0.640625, y: 0.640625 }, - { x: 0.671875, y: 0.640625 }, - { x: 0.671875, y: 0.640625 }, - { x: 0.703125, y: 0.640625 }, - { x: 0.703125, y: 0.640625 }, - { x: 0.734375, y: 0.640625 }, - { x: 0.734375, y: 0.640625 }, - { x: 0.765625, y: 0.640625 }, - { x: 0.765625, y: 0.640625 }, - { x: 0.796875, y: 0.640625 }, - { x: 0.796875, y: 0.640625 }, - { x: 0.828125, y: 0.640625 }, - { x: 0.828125, y: 0.640625 }, - { x: 0.859375, y: 0.640625 }, - { x: 0.859375, y: 0.640625 }, - { x: 0.890625, y: 0.640625 }, - { x: 0.890625, y: 0.640625 }, - { x: 0.921875, y: 0.640625 }, - { x: 0.921875, y: 0.640625 }, - { x: 0.953125, y: 0.640625 }, - { x: 0.953125, y: 0.640625 }, - { x: 0.984375, y: 0.640625 }, - { x: 0.984375, y: 0.640625 }, - { x: 0.015625, y: 0.671875 }, - { x: 0.015625, y: 0.671875 }, - { x: 0.046875, y: 0.671875 }, - { x: 0.046875, y: 0.671875 }, - { x: 0.078125, y: 0.671875 }, - { x: 0.078125, y: 0.671875 }, - { x: 0.109375, y: 0.671875 }, - { x: 0.109375, y: 0.671875 }, - { x: 0.140625, y: 0.671875 }, - { x: 0.140625, y: 0.671875 }, - { x: 0.171875, y: 0.671875 }, - { x: 0.171875, y: 0.671875 }, - { x: 0.203125, y: 0.671875 }, - { x: 0.203125, y: 0.671875 }, - { x: 0.234375, y: 0.671875 }, - { x: 0.234375, y: 0.671875 }, - { x: 0.265625, y: 0.671875 }, - { x: 0.265625, y: 0.671875 }, - { x: 0.296875, y: 0.671875 }, - { x: 0.296875, y: 0.671875 }, - { x: 0.328125, y: 0.671875 }, - { x: 0.328125, y: 0.671875 }, - { x: 0.359375, y: 0.671875 }, - { x: 0.359375, y: 0.671875 }, - { x: 0.390625, y: 0.671875 }, - { x: 0.390625, y: 0.671875 }, - { x: 0.421875, y: 0.671875 }, - { x: 0.421875, y: 0.671875 }, - { x: 0.453125, y: 0.671875 }, - { x: 0.453125, y: 0.671875 }, - { x: 0.484375, y: 0.671875 }, - { x: 0.484375, y: 0.671875 }, - { x: 0.515625, y: 0.671875 }, - { x: 0.515625, y: 0.671875 }, - { x: 0.546875, y: 0.671875 }, - { x: 0.546875, y: 0.671875 }, - { x: 0.578125, y: 0.671875 }, - { x: 0.578125, y: 0.671875 }, - { x: 0.609375, y: 0.671875 }, - { x: 0.609375, y: 0.671875 }, - { x: 0.640625, y: 0.671875 }, - { x: 0.640625, y: 0.671875 }, - { x: 0.671875, y: 0.671875 }, - { x: 0.671875, y: 0.671875 }, - { x: 0.703125, y: 0.671875 }, - { x: 0.703125, y: 0.671875 }, - { x: 0.734375, y: 0.671875 }, - { x: 0.734375, y: 0.671875 }, - { x: 0.765625, y: 0.671875 }, - { x: 0.765625, y: 0.671875 }, - { x: 0.796875, y: 0.671875 }, - { x: 0.796875, y: 0.671875 }, - { x: 0.828125, y: 0.671875 }, - { x: 0.828125, y: 0.671875 }, - { x: 0.859375, y: 0.671875 }, - { x: 0.859375, y: 0.671875 }, - { x: 0.890625, y: 0.671875 }, - { x: 0.890625, y: 0.671875 }, - { x: 0.921875, y: 0.671875 }, - { x: 0.921875, y: 0.671875 }, - { x: 0.953125, y: 0.671875 }, - { x: 0.953125, y: 0.671875 }, - { x: 0.984375, y: 0.671875 }, - { x: 0.984375, y: 0.671875 }, - { x: 0.015625, y: 0.703125 }, - { x: 0.015625, y: 0.703125 }, - { x: 0.046875, y: 0.703125 }, - { x: 0.046875, y: 0.703125 }, - { x: 0.078125, y: 0.703125 }, - { x: 0.078125, y: 0.703125 }, - { x: 0.109375, y: 0.703125 }, - { x: 0.109375, y: 0.703125 }, - { x: 0.140625, y: 0.703125 }, - { x: 0.140625, y: 0.703125 }, - { x: 0.171875, y: 0.703125 }, - { x: 0.171875, y: 0.703125 }, - { x: 0.203125, y: 0.703125 }, - { x: 0.203125, y: 0.703125 }, - { x: 0.234375, y: 0.703125 }, - { x: 0.234375, y: 0.703125 }, - { x: 0.265625, y: 0.703125 }, - { x: 0.265625, y: 0.703125 }, - { x: 0.296875, y: 0.703125 }, - { x: 0.296875, y: 0.703125 }, - { x: 0.328125, y: 0.703125 }, - { x: 0.328125, y: 0.703125 }, - { x: 0.359375, y: 0.703125 }, - { x: 0.359375, y: 0.703125 }, - { x: 0.390625, y: 0.703125 }, - { x: 0.390625, y: 0.703125 }, - { x: 0.421875, y: 0.703125 }, - { x: 0.421875, y: 0.703125 }, - { x: 0.453125, y: 0.703125 }, - { x: 0.453125, y: 0.703125 }, - { x: 0.484375, y: 0.703125 }, - { x: 0.484375, y: 0.703125 }, - { x: 0.515625, y: 0.703125 }, - { x: 0.515625, y: 0.703125 }, - { x: 0.546875, y: 0.703125 }, - { x: 0.546875, y: 0.703125 }, - { x: 0.578125, y: 0.703125 }, - { x: 0.578125, y: 0.703125 }, - { x: 0.609375, y: 0.703125 }, - { x: 0.609375, y: 0.703125 }, - { x: 0.640625, y: 0.703125 }, - { x: 0.640625, y: 0.703125 }, - { x: 0.671875, y: 0.703125 }, - { x: 0.671875, y: 0.703125 }, - { x: 0.703125, y: 0.703125 }, - { x: 0.703125, y: 0.703125 }, - { x: 0.734375, y: 0.703125 }, - { x: 0.734375, y: 0.703125 }, - { x: 0.765625, y: 0.703125 }, - { x: 0.765625, y: 0.703125 }, - { x: 0.796875, y: 0.703125 }, - { x: 0.796875, y: 0.703125 }, - { x: 0.828125, y: 0.703125 }, - { x: 0.828125, y: 0.703125 }, - { x: 0.859375, y: 0.703125 }, - { x: 0.859375, y: 0.703125 }, - { x: 0.890625, y: 0.703125 }, - { x: 0.890625, y: 0.703125 }, - { x: 0.921875, y: 0.703125 }, - { x: 0.921875, y: 0.703125 }, - { x: 0.953125, y: 0.703125 }, - { x: 0.953125, y: 0.703125 }, - { x: 0.984375, y: 0.703125 }, - { x: 0.984375, y: 0.703125 }, - { x: 0.015625, y: 0.734375 }, - { x: 0.015625, y: 0.734375 }, - { x: 0.046875, y: 0.734375 }, - { x: 0.046875, y: 0.734375 }, - { x: 0.078125, y: 0.734375 }, - { x: 0.078125, y: 0.734375 }, - { x: 0.109375, y: 0.734375 }, - { x: 0.109375, y: 0.734375 }, - { x: 0.140625, y: 0.734375 }, - { x: 0.140625, y: 0.734375 }, - { x: 0.171875, y: 0.734375 }, - { x: 0.171875, y: 0.734375 }, - { x: 0.203125, y: 0.734375 }, - { x: 0.203125, y: 0.734375 }, - { x: 0.234375, y: 0.734375 }, - { x: 0.234375, y: 0.734375 }, - { x: 0.265625, y: 0.734375 }, - { x: 0.265625, y: 0.734375 }, - { x: 0.296875, y: 0.734375 }, - { x: 0.296875, y: 0.734375 }, - { x: 0.328125, y: 0.734375 }, - { x: 0.328125, y: 0.734375 }, - { x: 0.359375, y: 0.734375 }, - { x: 0.359375, y: 0.734375 }, - { x: 0.390625, y: 0.734375 }, - { x: 0.390625, y: 0.734375 }, - { x: 0.421875, y: 0.734375 }, - { x: 0.421875, y: 0.734375 }, - { x: 0.453125, y: 0.734375 }, - { x: 0.453125, y: 0.734375 }, - { x: 0.484375, y: 0.734375 }, - { x: 0.484375, y: 0.734375 }, - { x: 0.515625, y: 0.734375 }, - { x: 0.515625, y: 0.734375 }, - { x: 0.546875, y: 0.734375 }, - { x: 0.546875, y: 0.734375 }, - { x: 0.578125, y: 0.734375 }, - { x: 0.578125, y: 0.734375 }, - { x: 0.609375, y: 0.734375 }, - { x: 0.609375, y: 0.734375 }, - { x: 0.640625, y: 0.734375 }, - { x: 0.640625, y: 0.734375 }, - { x: 0.671875, y: 0.734375 }, - { x: 0.671875, y: 0.734375 }, - { x: 0.703125, y: 0.734375 }, - { x: 0.703125, y: 0.734375 }, - { x: 0.734375, y: 0.734375 }, - { x: 0.734375, y: 0.734375 }, - { x: 0.765625, y: 0.734375 }, - { x: 0.765625, y: 0.734375 }, - { x: 0.796875, y: 0.734375 }, - { x: 0.796875, y: 0.734375 }, - { x: 0.828125, y: 0.734375 }, - { x: 0.828125, y: 0.734375 }, - { x: 0.859375, y: 0.734375 }, - { x: 0.859375, y: 0.734375 }, - { x: 0.890625, y: 0.734375 }, - { x: 0.890625, y: 0.734375 }, - { x: 0.921875, y: 0.734375 }, - { x: 0.921875, y: 0.734375 }, - { x: 0.953125, y: 0.734375 }, - { x: 0.953125, y: 0.734375 }, - { x: 0.984375, y: 0.734375 }, - { x: 0.984375, y: 0.734375 }, - { x: 0.015625, y: 0.765625 }, - { x: 0.015625, y: 0.765625 }, - { x: 0.046875, y: 0.765625 }, - { x: 0.046875, y: 0.765625 }, - { x: 0.078125, y: 0.765625 }, - { x: 0.078125, y: 0.765625 }, - { x: 0.109375, y: 0.765625 }, - { x: 0.109375, y: 0.765625 }, - { x: 0.140625, y: 0.765625 }, - { x: 0.140625, y: 0.765625 }, - { x: 0.171875, y: 0.765625 }, - { x: 0.171875, y: 0.765625 }, - { x: 0.203125, y: 0.765625 }, - { x: 0.203125, y: 0.765625 }, - { x: 0.234375, y: 0.765625 }, - { x: 0.234375, y: 0.765625 }, - { x: 0.265625, y: 0.765625 }, - { x: 0.265625, y: 0.765625 }, - { x: 0.296875, y: 0.765625 }, - { x: 0.296875, y: 0.765625 }, - { x: 0.328125, y: 0.765625 }, - { x: 0.328125, y: 0.765625 }, - { x: 0.359375, y: 0.765625 }, - { x: 0.359375, y: 0.765625 }, - { x: 0.390625, y: 0.765625 }, - { x: 0.390625, y: 0.765625 }, - { x: 0.421875, y: 0.765625 }, - { x: 0.421875, y: 0.765625 }, - { x: 0.453125, y: 0.765625 }, - { x: 0.453125, y: 0.765625 }, - { x: 0.484375, y: 0.765625 }, - { x: 0.484375, y: 0.765625 }, - { x: 0.515625, y: 0.765625 }, - { x: 0.515625, y: 0.765625 }, - { x: 0.546875, y: 0.765625 }, - { x: 0.546875, y: 0.765625 }, - { x: 0.578125, y: 0.765625 }, - { x: 0.578125, y: 0.765625 }, - { x: 0.609375, y: 0.765625 }, - { x: 0.609375, y: 0.765625 }, - { x: 0.640625, y: 0.765625 }, - { x: 0.640625, y: 0.765625 }, - { x: 0.671875, y: 0.765625 }, - { x: 0.671875, y: 0.765625 }, - { x: 0.703125, y: 0.765625 }, - { x: 0.703125, y: 0.765625 }, - { x: 0.734375, y: 0.765625 }, - { x: 0.734375, y: 0.765625 }, - { x: 0.765625, y: 0.765625 }, - { x: 0.765625, y: 0.765625 }, - { x: 0.796875, y: 0.765625 }, - { x: 0.796875, y: 0.765625 }, - { x: 0.828125, y: 0.765625 }, - { x: 0.828125, y: 0.765625 }, - { x: 0.859375, y: 0.765625 }, - { x: 0.859375, y: 0.765625 }, - { x: 0.890625, y: 0.765625 }, - { x: 0.890625, y: 0.765625 }, - { x: 0.921875, y: 0.765625 }, - { x: 0.921875, y: 0.765625 }, - { x: 0.953125, y: 0.765625 }, - { x: 0.953125, y: 0.765625 }, - { x: 0.984375, y: 0.765625 }, - { x: 0.984375, y: 0.765625 }, - { x: 0.015625, y: 0.796875 }, - { x: 0.015625, y: 0.796875 }, - { x: 0.046875, y: 0.796875 }, - { x: 0.046875, y: 0.796875 }, - { x: 0.078125, y: 0.796875 }, - { x: 0.078125, y: 0.796875 }, - { x: 0.109375, y: 0.796875 }, - { x: 0.109375, y: 0.796875 }, - { x: 0.140625, y: 0.796875 }, - { x: 0.140625, y: 0.796875 }, - { x: 0.171875, y: 0.796875 }, - { x: 0.171875, y: 0.796875 }, - { x: 0.203125, y: 0.796875 }, - { x: 0.203125, y: 0.796875 }, - { x: 0.234375, y: 0.796875 }, - { x: 0.234375, y: 0.796875 }, - { x: 0.265625, y: 0.796875 }, - { x: 0.265625, y: 0.796875 }, - { x: 0.296875, y: 0.796875 }, - { x: 0.296875, y: 0.796875 }, - { x: 0.328125, y: 0.796875 }, - { x: 0.328125, y: 0.796875 }, - { x: 0.359375, y: 0.796875 }, - { x: 0.359375, y: 0.796875 }, - { x: 0.390625, y: 0.796875 }, - { x: 0.390625, y: 0.796875 }, - { x: 0.421875, y: 0.796875 }, - { x: 0.421875, y: 0.796875 }, - { x: 0.453125, y: 0.796875 }, - { x: 0.453125, y: 0.796875 }, - { x: 0.484375, y: 0.796875 }, - { x: 0.484375, y: 0.796875 }, - { x: 0.515625, y: 0.796875 }, - { x: 0.515625, y: 0.796875 }, - { x: 0.546875, y: 0.796875 }, - { x: 0.546875, y: 0.796875 }, - { x: 0.578125, y: 0.796875 }, - { x: 0.578125, y: 0.796875 }, - { x: 0.609375, y: 0.796875 }, - { x: 0.609375, y: 0.796875 }, - { x: 0.640625, y: 0.796875 }, - { x: 0.640625, y: 0.796875 }, - { x: 0.671875, y: 0.796875 }, - { x: 0.671875, y: 0.796875 }, - { x: 0.703125, y: 0.796875 }, - { x: 0.703125, y: 0.796875 }, - { x: 0.734375, y: 0.796875 }, - { x: 0.734375, y: 0.796875 }, - { x: 0.765625, y: 0.796875 }, - { x: 0.765625, y: 0.796875 }, - { x: 0.796875, y: 0.796875 }, - { x: 0.796875, y: 0.796875 }, - { x: 0.828125, y: 0.796875 }, - { x: 0.828125, y: 0.796875 }, - { x: 0.859375, y: 0.796875 }, - { x: 0.859375, y: 0.796875 }, - { x: 0.890625, y: 0.796875 }, - { x: 0.890625, y: 0.796875 }, - { x: 0.921875, y: 0.796875 }, - { x: 0.921875, y: 0.796875 }, - { x: 0.953125, y: 0.796875 }, - { x: 0.953125, y: 0.796875 }, - { x: 0.984375, y: 0.796875 }, - { x: 0.984375, y: 0.796875 }, - { x: 0.015625, y: 0.828125 }, - { x: 0.015625, y: 0.828125 }, - { x: 0.046875, y: 0.828125 }, - { x: 0.046875, y: 0.828125 }, - { x: 0.078125, y: 0.828125 }, - { x: 0.078125, y: 0.828125 }, - { x: 0.109375, y: 0.828125 }, - { x: 0.109375, y: 0.828125 }, - { x: 0.140625, y: 0.828125 }, - { x: 0.140625, y: 0.828125 }, - { x: 0.171875, y: 0.828125 }, - { x: 0.171875, y: 0.828125 }, - { x: 0.203125, y: 0.828125 }, - { x: 0.203125, y: 0.828125 }, - { x: 0.234375, y: 0.828125 }, - { x: 0.234375, y: 0.828125 }, - { x: 0.265625, y: 0.828125 }, - { x: 0.265625, y: 0.828125 }, - { x: 0.296875, y: 0.828125 }, - { x: 0.296875, y: 0.828125 }, - { x: 0.328125, y: 0.828125 }, - { x: 0.328125, y: 0.828125 }, - { x: 0.359375, y: 0.828125 }, - { x: 0.359375, y: 0.828125 }, - { x: 0.390625, y: 0.828125 }, - { x: 0.390625, y: 0.828125 }, - { x: 0.421875, y: 0.828125 }, - { x: 0.421875, y: 0.828125 }, - { x: 0.453125, y: 0.828125 }, - { x: 0.453125, y: 0.828125 }, - { x: 0.484375, y: 0.828125 }, - { x: 0.484375, y: 0.828125 }, - { x: 0.515625, y: 0.828125 }, - { x: 0.515625, y: 0.828125 }, - { x: 0.546875, y: 0.828125 }, - { x: 0.546875, y: 0.828125 }, - { x: 0.578125, y: 0.828125 }, - { x: 0.578125, y: 0.828125 }, - { x: 0.609375, y: 0.828125 }, - { x: 0.609375, y: 0.828125 }, - { x: 0.640625, y: 0.828125 }, - { x: 0.640625, y: 0.828125 }, - { x: 0.671875, y: 0.828125 }, - { x: 0.671875, y: 0.828125 }, - { x: 0.703125, y: 0.828125 }, - { x: 0.703125, y: 0.828125 }, - { x: 0.734375, y: 0.828125 }, - { x: 0.734375, y: 0.828125 }, - { x: 0.765625, y: 0.828125 }, - { x: 0.765625, y: 0.828125 }, - { x: 0.796875, y: 0.828125 }, - { x: 0.796875, y: 0.828125 }, - { x: 0.828125, y: 0.828125 }, - { x: 0.828125, y: 0.828125 }, - { x: 0.859375, y: 0.828125 }, - { x: 0.859375, y: 0.828125 }, - { x: 0.890625, y: 0.828125 }, - { x: 0.890625, y: 0.828125 }, - { x: 0.921875, y: 0.828125 }, - { x: 0.921875, y: 0.828125 }, - { x: 0.953125, y: 0.828125 }, - { x: 0.953125, y: 0.828125 }, - { x: 0.984375, y: 0.828125 }, - { x: 0.984375, y: 0.828125 }, - { x: 0.015625, y: 0.859375 }, - { x: 0.015625, y: 0.859375 }, - { x: 0.046875, y: 0.859375 }, - { x: 0.046875, y: 0.859375 }, - { x: 0.078125, y: 0.859375 }, - { x: 0.078125, y: 0.859375 }, - { x: 0.109375, y: 0.859375 }, - { x: 0.109375, y: 0.859375 }, - { x: 0.140625, y: 0.859375 }, - { x: 0.140625, y: 0.859375 }, - { x: 0.171875, y: 0.859375 }, - { x: 0.171875, y: 0.859375 }, - { x: 0.203125, y: 0.859375 }, - { x: 0.203125, y: 0.859375 }, - { x: 0.234375, y: 0.859375 }, - { x: 0.234375, y: 0.859375 }, - { x: 0.265625, y: 0.859375 }, - { x: 0.265625, y: 0.859375 }, - { x: 0.296875, y: 0.859375 }, - { x: 0.296875, y: 0.859375 }, - { x: 0.328125, y: 0.859375 }, - { x: 0.328125, y: 0.859375 }, - { x: 0.359375, y: 0.859375 }, - { x: 0.359375, y: 0.859375 }, - { x: 0.390625, y: 0.859375 }, - { x: 0.390625, y: 0.859375 }, - { x: 0.421875, y: 0.859375 }, - { x: 0.421875, y: 0.859375 }, - { x: 0.453125, y: 0.859375 }, - { x: 0.453125, y: 0.859375 }, - { x: 0.484375, y: 0.859375 }, - { x: 0.484375, y: 0.859375 }, - { x: 0.515625, y: 0.859375 }, - { x: 0.515625, y: 0.859375 }, - { x: 0.546875, y: 0.859375 }, - { x: 0.546875, y: 0.859375 }, - { x: 0.578125, y: 0.859375 }, - { x: 0.578125, y: 0.859375 }, - { x: 0.609375, y: 0.859375 }, - { x: 0.609375, y: 0.859375 }, - { x: 0.640625, y: 0.859375 }, - { x: 0.640625, y: 0.859375 }, - { x: 0.671875, y: 0.859375 }, - { x: 0.671875, y: 0.859375 }, - { x: 0.703125, y: 0.859375 }, - { x: 0.703125, y: 0.859375 }, - { x: 0.734375, y: 0.859375 }, - { x: 0.734375, y: 0.859375 }, - { x: 0.765625, y: 0.859375 }, - { x: 0.765625, y: 0.859375 }, - { x: 0.796875, y: 0.859375 }, - { x: 0.796875, y: 0.859375 }, - { x: 0.828125, y: 0.859375 }, - { x: 0.828125, y: 0.859375 }, - { x: 0.859375, y: 0.859375 }, - { x: 0.859375, y: 0.859375 }, - { x: 0.890625, y: 0.859375 }, - { x: 0.890625, y: 0.859375 }, - { x: 0.921875, y: 0.859375 }, - { x: 0.921875, y: 0.859375 }, - { x: 0.953125, y: 0.859375 }, - { x: 0.953125, y: 0.859375 }, - { x: 0.984375, y: 0.859375 }, - { x: 0.984375, y: 0.859375 }, - { x: 0.015625, y: 0.890625 }, - { x: 0.015625, y: 0.890625 }, - { x: 0.046875, y: 0.890625 }, - { x: 0.046875, y: 0.890625 }, - { x: 0.078125, y: 0.890625 }, - { x: 0.078125, y: 0.890625 }, - { x: 0.109375, y: 0.890625 }, - { x: 0.109375, y: 0.890625 }, - { x: 0.140625, y: 0.890625 }, - { x: 0.140625, y: 0.890625 }, - { x: 0.171875, y: 0.890625 }, - { x: 0.171875, y: 0.890625 }, - { x: 0.203125, y: 0.890625 }, - { x: 0.203125, y: 0.890625 }, - { x: 0.234375, y: 0.890625 }, - { x: 0.234375, y: 0.890625 }, - { x: 0.265625, y: 0.890625 }, - { x: 0.265625, y: 0.890625 }, - { x: 0.296875, y: 0.890625 }, - { x: 0.296875, y: 0.890625 }, - { x: 0.328125, y: 0.890625 }, - { x: 0.328125, y: 0.890625 }, - { x: 0.359375, y: 0.890625 }, - { x: 0.359375, y: 0.890625 }, - { x: 0.390625, y: 0.890625 }, - { x: 0.390625, y: 0.890625 }, - { x: 0.421875, y: 0.890625 }, - { x: 0.421875, y: 0.890625 }, - { x: 0.453125, y: 0.890625 }, - { x: 0.453125, y: 0.890625 }, - { x: 0.484375, y: 0.890625 }, - { x: 0.484375, y: 0.890625 }, - { x: 0.515625, y: 0.890625 }, - { x: 0.515625, y: 0.890625 }, - { x: 0.546875, y: 0.890625 }, - { x: 0.546875, y: 0.890625 }, - { x: 0.578125, y: 0.890625 }, - { x: 0.578125, y: 0.890625 }, - { x: 0.609375, y: 0.890625 }, - { x: 0.609375, y: 0.890625 }, - { x: 0.640625, y: 0.890625 }, - { x: 0.640625, y: 0.890625 }, - { x: 0.671875, y: 0.890625 }, - { x: 0.671875, y: 0.890625 }, - { x: 0.703125, y: 0.890625 }, - { x: 0.703125, y: 0.890625 }, - { x: 0.734375, y: 0.890625 }, - { x: 0.734375, y: 0.890625 }, - { x: 0.765625, y: 0.890625 }, - { x: 0.765625, y: 0.890625 }, - { x: 0.796875, y: 0.890625 }, - { x: 0.796875, y: 0.890625 }, - { x: 0.828125, y: 0.890625 }, - { x: 0.828125, y: 0.890625 }, - { x: 0.859375, y: 0.890625 }, - { x: 0.859375, y: 0.890625 }, - { x: 0.890625, y: 0.890625 }, - { x: 0.890625, y: 0.890625 }, - { x: 0.921875, y: 0.890625 }, - { x: 0.921875, y: 0.890625 }, - { x: 0.953125, y: 0.890625 }, - { x: 0.953125, y: 0.890625 }, - { x: 0.984375, y: 0.890625 }, - { x: 0.984375, y: 0.890625 }, - { x: 0.015625, y: 0.921875 }, - { x: 0.015625, y: 0.921875 }, - { x: 0.046875, y: 0.921875 }, - { x: 0.046875, y: 0.921875 }, - { x: 0.078125, y: 0.921875 }, - { x: 0.078125, y: 0.921875 }, - { x: 0.109375, y: 0.921875 }, - { x: 0.109375, y: 0.921875 }, - { x: 0.140625, y: 0.921875 }, - { x: 0.140625, y: 0.921875 }, - { x: 0.171875, y: 0.921875 }, - { x: 0.171875, y: 0.921875 }, - { x: 0.203125, y: 0.921875 }, - { x: 0.203125, y: 0.921875 }, - { x: 0.234375, y: 0.921875 }, - { x: 0.234375, y: 0.921875 }, - { x: 0.265625, y: 0.921875 }, - { x: 0.265625, y: 0.921875 }, - { x: 0.296875, y: 0.921875 }, - { x: 0.296875, y: 0.921875 }, - { x: 0.328125, y: 0.921875 }, - { x: 0.328125, y: 0.921875 }, - { x: 0.359375, y: 0.921875 }, - { x: 0.359375, y: 0.921875 }, - { x: 0.390625, y: 0.921875 }, - { x: 0.390625, y: 0.921875 }, - { x: 0.421875, y: 0.921875 }, - { x: 0.421875, y: 0.921875 }, - { x: 0.453125, y: 0.921875 }, - { x: 0.453125, y: 0.921875 }, - { x: 0.484375, y: 0.921875 }, - { x: 0.484375, y: 0.921875 }, - { x: 0.515625, y: 0.921875 }, - { x: 0.515625, y: 0.921875 }, - { x: 0.546875, y: 0.921875 }, - { x: 0.546875, y: 0.921875 }, - { x: 0.578125, y: 0.921875 }, - { x: 0.578125, y: 0.921875 }, - { x: 0.609375, y: 0.921875 }, - { x: 0.609375, y: 0.921875 }, - { x: 0.640625, y: 0.921875 }, - { x: 0.640625, y: 0.921875 }, - { x: 0.671875, y: 0.921875 }, - { x: 0.671875, y: 0.921875 }, - { x: 0.703125, y: 0.921875 }, - { x: 0.703125, y: 0.921875 }, - { x: 0.734375, y: 0.921875 }, - { x: 0.734375, y: 0.921875 }, - { x: 0.765625, y: 0.921875 }, - { x: 0.765625, y: 0.921875 }, - { x: 0.796875, y: 0.921875 }, - { x: 0.796875, y: 0.921875 }, - { x: 0.828125, y: 0.921875 }, - { x: 0.828125, y: 0.921875 }, - { x: 0.859375, y: 0.921875 }, - { x: 0.859375, y: 0.921875 }, - { x: 0.890625, y: 0.921875 }, - { x: 0.890625, y: 0.921875 }, - { x: 0.921875, y: 0.921875 }, - { x: 0.921875, y: 0.921875 }, - { x: 0.953125, y: 0.921875 }, - { x: 0.953125, y: 0.921875 }, - { x: 0.984375, y: 0.921875 }, - { x: 0.984375, y: 0.921875 }, - { x: 0.015625, y: 0.953125 }, - { x: 0.015625, y: 0.953125 }, - { x: 0.046875, y: 0.953125 }, - { x: 0.046875, y: 0.953125 }, - { x: 0.078125, y: 0.953125 }, - { x: 0.078125, y: 0.953125 }, - { x: 0.109375, y: 0.953125 }, - { x: 0.109375, y: 0.953125 }, - { x: 0.140625, y: 0.953125 }, - { x: 0.140625, y: 0.953125 }, - { x: 0.171875, y: 0.953125 }, - { x: 0.171875, y: 0.953125 }, - { x: 0.203125, y: 0.953125 }, - { x: 0.203125, y: 0.953125 }, - { x: 0.234375, y: 0.953125 }, - { x: 0.234375, y: 0.953125 }, - { x: 0.265625, y: 0.953125 }, - { x: 0.265625, y: 0.953125 }, - { x: 0.296875, y: 0.953125 }, - { x: 0.296875, y: 0.953125 }, - { x: 0.328125, y: 0.953125 }, - { x: 0.328125, y: 0.953125 }, - { x: 0.359375, y: 0.953125 }, - { x: 0.359375, y: 0.953125 }, - { x: 0.390625, y: 0.953125 }, - { x: 0.390625, y: 0.953125 }, - { x: 0.421875, y: 0.953125 }, - { x: 0.421875, y: 0.953125 }, - { x: 0.453125, y: 0.953125 }, - { x: 0.453125, y: 0.953125 }, - { x: 0.484375, y: 0.953125 }, - { x: 0.484375, y: 0.953125 }, - { x: 0.515625, y: 0.953125 }, - { x: 0.515625, y: 0.953125 }, - { x: 0.546875, y: 0.953125 }, - { x: 0.546875, y: 0.953125 }, - { x: 0.578125, y: 0.953125 }, - { x: 0.578125, y: 0.953125 }, - { x: 0.609375, y: 0.953125 }, - { x: 0.609375, y: 0.953125 }, - { x: 0.640625, y: 0.953125 }, - { x: 0.640625, y: 0.953125 }, - { x: 0.671875, y: 0.953125 }, - { x: 0.671875, y: 0.953125 }, - { x: 0.703125, y: 0.953125 }, - { x: 0.703125, y: 0.953125 }, - { x: 0.734375, y: 0.953125 }, - { x: 0.734375, y: 0.953125 }, - { x: 0.765625, y: 0.953125 }, - { x: 0.765625, y: 0.953125 }, - { x: 0.796875, y: 0.953125 }, - { x: 0.796875, y: 0.953125 }, - { x: 0.828125, y: 0.953125 }, - { x: 0.828125, y: 0.953125 }, - { x: 0.859375, y: 0.953125 }, - { x: 0.859375, y: 0.953125 }, - { x: 0.890625, y: 0.953125 }, - { x: 0.890625, y: 0.953125 }, - { x: 0.921875, y: 0.953125 }, - { x: 0.921875, y: 0.953125 }, - { x: 0.953125, y: 0.953125 }, - { x: 0.953125, y: 0.953125 }, - { x: 0.984375, y: 0.953125 }, - { x: 0.984375, y: 0.953125 }, - { x: 0.015625, y: 0.984375 }, - { x: 0.015625, y: 0.984375 }, - { x: 0.046875, y: 0.984375 }, - { x: 0.046875, y: 0.984375 }, - { x: 0.078125, y: 0.984375 }, - { x: 0.078125, y: 0.984375 }, - { x: 0.109375, y: 0.984375 }, - { x: 0.109375, y: 0.984375 }, - { x: 0.140625, y: 0.984375 }, - { x: 0.140625, y: 0.984375 }, - { x: 0.171875, y: 0.984375 }, - { x: 0.171875, y: 0.984375 }, - { x: 0.203125, y: 0.984375 }, - { x: 0.203125, y: 0.984375 }, - { x: 0.234375, y: 0.984375 }, - { x: 0.234375, y: 0.984375 }, - { x: 0.265625, y: 0.984375 }, - { x: 0.265625, y: 0.984375 }, - { x: 0.296875, y: 0.984375 }, - { x: 0.296875, y: 0.984375 }, - { x: 0.328125, y: 0.984375 }, - { x: 0.328125, y: 0.984375 }, - { x: 0.359375, y: 0.984375 }, - { x: 0.359375, y: 0.984375 }, - { x: 0.390625, y: 0.984375 }, - { x: 0.390625, y: 0.984375 }, - { x: 0.421875, y: 0.984375 }, - { x: 0.421875, y: 0.984375 }, - { x: 0.453125, y: 0.984375 }, - { x: 0.453125, y: 0.984375 }, - { x: 0.484375, y: 0.984375 }, - { x: 0.484375, y: 0.984375 }, - { x: 0.515625, y: 0.984375 }, - { x: 0.515625, y: 0.984375 }, - { x: 0.546875, y: 0.984375 }, - { x: 0.546875, y: 0.984375 }, - { x: 0.578125, y: 0.984375 }, - { x: 0.578125, y: 0.984375 }, - { x: 0.609375, y: 0.984375 }, - { x: 0.609375, y: 0.984375 }, - { x: 0.640625, y: 0.984375 }, - { x: 0.640625, y: 0.984375 }, - { x: 0.671875, y: 0.984375 }, - { x: 0.671875, y: 0.984375 }, - { x: 0.703125, y: 0.984375 }, - { x: 0.703125, y: 0.984375 }, - { x: 0.734375, y: 0.984375 }, - { x: 0.734375, y: 0.984375 }, - { x: 0.765625, y: 0.984375 }, - { x: 0.765625, y: 0.984375 }, - { x: 0.796875, y: 0.984375 }, - { x: 0.796875, y: 0.984375 }, - { x: 0.828125, y: 0.984375 }, - { x: 0.828125, y: 0.984375 }, - { x: 0.859375, y: 0.984375 }, - { x: 0.859375, y: 0.984375 }, - { x: 0.890625, y: 0.984375 }, - { x: 0.890625, y: 0.984375 }, - { x: 0.921875, y: 0.984375 }, - { x: 0.921875, y: 0.984375 }, - { x: 0.953125, y: 0.984375 }, - { x: 0.953125, y: 0.984375 }, - { x: 0.984375, y: 0.984375 }, - { x: 0.984375, y: 0.984375 }, - { x: 0.03125, y: 0.03125 }, - { x: 0.03125, y: 0.03125 }, - { x: 0.09375, y: 0.03125 }, - { x: 0.09375, y: 0.03125 }, - { x: 0.15625, y: 0.03125 }, - { x: 0.15625, y: 0.03125 }, - { x: 0.21875, y: 0.03125 }, - { x: 0.21875, y: 0.03125 }, - { x: 0.28125, y: 0.03125 }, - { x: 0.28125, y: 0.03125 }, - { x: 0.34375, y: 0.03125 }, - { x: 0.34375, y: 0.03125 }, - { x: 0.40625, y: 0.03125 }, - { x: 0.40625, y: 0.03125 }, - { x: 0.46875, y: 0.03125 }, - { x: 0.46875, y: 0.03125 }, - { x: 0.53125, y: 0.03125 }, - { x: 0.53125, y: 0.03125 }, - { x: 0.59375, y: 0.03125 }, - { x: 0.59375, y: 0.03125 }, - { x: 0.65625, y: 0.03125 }, - { x: 0.65625, y: 0.03125 }, - { x: 0.71875, y: 0.03125 }, - { x: 0.71875, y: 0.03125 }, - { x: 0.78125, y: 0.03125 }, - { x: 0.78125, y: 0.03125 }, - { x: 0.84375, y: 0.03125 }, - { x: 0.84375, y: 0.03125 }, - { x: 0.90625, y: 0.03125 }, - { x: 0.90625, y: 0.03125 }, - { x: 0.96875, y: 0.03125 }, - { x: 0.96875, y: 0.03125 }, - { x: 0.03125, y: 0.09375 }, - { x: 0.03125, y: 0.09375 }, - { x: 0.09375, y: 0.09375 }, - { x: 0.09375, y: 0.09375 }, - { x: 0.15625, y: 0.09375 }, - { x: 0.15625, y: 0.09375 }, - { x: 0.21875, y: 0.09375 }, - { x: 0.21875, y: 0.09375 }, - { x: 0.28125, y: 0.09375 }, - { x: 0.28125, y: 0.09375 }, - { x: 0.34375, y: 0.09375 }, - { x: 0.34375, y: 0.09375 }, - { x: 0.40625, y: 0.09375 }, - { x: 0.40625, y: 0.09375 }, - { x: 0.46875, y: 0.09375 }, - { x: 0.46875, y: 0.09375 }, - { x: 0.53125, y: 0.09375 }, - { x: 0.53125, y: 0.09375 }, - { x: 0.59375, y: 0.09375 }, - { x: 0.59375, y: 0.09375 }, - { x: 0.65625, y: 0.09375 }, - { x: 0.65625, y: 0.09375 }, - { x: 0.71875, y: 0.09375 }, - { x: 0.71875, y: 0.09375 }, - { x: 0.78125, y: 0.09375 }, - { x: 0.78125, y: 0.09375 }, - { x: 0.84375, y: 0.09375 }, - { x: 0.84375, y: 0.09375 }, - { x: 0.90625, y: 0.09375 }, - { x: 0.90625, y: 0.09375 }, - { x: 0.96875, y: 0.09375 }, - { x: 0.96875, y: 0.09375 }, - { x: 0.03125, y: 0.15625 }, - { x: 0.03125, y: 0.15625 }, - { x: 0.09375, y: 0.15625 }, - { x: 0.09375, y: 0.15625 }, - { x: 0.15625, y: 0.15625 }, - { x: 0.15625, y: 0.15625 }, - { x: 0.21875, y: 0.15625 }, - { x: 0.21875, y: 0.15625 }, - { x: 0.28125, y: 0.15625 }, - { x: 0.28125, y: 0.15625 }, - { x: 0.34375, y: 0.15625 }, - { x: 0.34375, y: 0.15625 }, - { x: 0.40625, y: 0.15625 }, - { x: 0.40625, y: 0.15625 }, - { x: 0.46875, y: 0.15625 }, - { x: 0.46875, y: 0.15625 }, - { x: 0.53125, y: 0.15625 }, - { x: 0.53125, y: 0.15625 }, - { x: 0.59375, y: 0.15625 }, - { x: 0.59375, y: 0.15625 }, - { x: 0.65625, y: 0.15625 }, - { x: 0.65625, y: 0.15625 }, - { x: 0.71875, y: 0.15625 }, - { x: 0.71875, y: 0.15625 }, - { x: 0.78125, y: 0.15625 }, - { x: 0.78125, y: 0.15625 }, - { x: 0.84375, y: 0.15625 }, - { x: 0.84375, y: 0.15625 }, - { x: 0.90625, y: 0.15625 }, - { x: 0.90625, y: 0.15625 }, - { x: 0.96875, y: 0.15625 }, - { x: 0.96875, y: 0.15625 }, - { x: 0.03125, y: 0.21875 }, - { x: 0.03125, y: 0.21875 }, - { x: 0.09375, y: 0.21875 }, - { x: 0.09375, y: 0.21875 }, - { x: 0.15625, y: 0.21875 }, - { x: 0.15625, y: 0.21875 }, - { x: 0.21875, y: 0.21875 }, - { x: 0.21875, y: 0.21875 }, - { x: 0.28125, y: 0.21875 }, - { x: 0.28125, y: 0.21875 }, - { x: 0.34375, y: 0.21875 }, - { x: 0.34375, y: 0.21875 }, - { x: 0.40625, y: 0.21875 }, - { x: 0.40625, y: 0.21875 }, - { x: 0.46875, y: 0.21875 }, - { x: 0.46875, y: 0.21875 }, - { x: 0.53125, y: 0.21875 }, - { x: 0.53125, y: 0.21875 }, - { x: 0.59375, y: 0.21875 }, - { x: 0.59375, y: 0.21875 }, - { x: 0.65625, y: 0.21875 }, - { x: 0.65625, y: 0.21875 }, - { x: 0.71875, y: 0.21875 }, - { x: 0.71875, y: 0.21875 }, - { x: 0.78125, y: 0.21875 }, - { x: 0.78125, y: 0.21875 }, - { x: 0.84375, y: 0.21875 }, - { x: 0.84375, y: 0.21875 }, - { x: 0.90625, y: 0.21875 }, - { x: 0.90625, y: 0.21875 }, - { x: 0.96875, y: 0.21875 }, - { x: 0.96875, y: 0.21875 }, - { x: 0.03125, y: 0.28125 }, - { x: 0.03125, y: 0.28125 }, - { x: 0.09375, y: 0.28125 }, - { x: 0.09375, y: 0.28125 }, - { x: 0.15625, y: 0.28125 }, - { x: 0.15625, y: 0.28125 }, - { x: 0.21875, y: 0.28125 }, - { x: 0.21875, y: 0.28125 }, - { x: 0.28125, y: 0.28125 }, - { x: 0.28125, y: 0.28125 }, - { x: 0.34375, y: 0.28125 }, - { x: 0.34375, y: 0.28125 }, - { x: 0.40625, y: 0.28125 }, - { x: 0.40625, y: 0.28125 }, - { x: 0.46875, y: 0.28125 }, - { x: 0.46875, y: 0.28125 }, - { x: 0.53125, y: 0.28125 }, - { x: 0.53125, y: 0.28125 }, - { x: 0.59375, y: 0.28125 }, - { x: 0.59375, y: 0.28125 }, - { x: 0.65625, y: 0.28125 }, - { x: 0.65625, y: 0.28125 }, - { x: 0.71875, y: 0.28125 }, - { x: 0.71875, y: 0.28125 }, - { x: 0.78125, y: 0.28125 }, - { x: 0.78125, y: 0.28125 }, - { x: 0.84375, y: 0.28125 }, - { x: 0.84375, y: 0.28125 }, - { x: 0.90625, y: 0.28125 }, - { x: 0.90625, y: 0.28125 }, - { x: 0.96875, y: 0.28125 }, - { x: 0.96875, y: 0.28125 }, - { x: 0.03125, y: 0.34375 }, - { x: 0.03125, y: 0.34375 }, - { x: 0.09375, y: 0.34375 }, - { x: 0.09375, y: 0.34375 }, - { x: 0.15625, y: 0.34375 }, - { x: 0.15625, y: 0.34375 }, - { x: 0.21875, y: 0.34375 }, - { x: 0.21875, y: 0.34375 }, - { x: 0.28125, y: 0.34375 }, - { x: 0.28125, y: 0.34375 }, - { x: 0.34375, y: 0.34375 }, - { x: 0.34375, y: 0.34375 }, - { x: 0.40625, y: 0.34375 }, - { x: 0.40625, y: 0.34375 }, - { x: 0.46875, y: 0.34375 }, - { x: 0.46875, y: 0.34375 }, - { x: 0.53125, y: 0.34375 }, - { x: 0.53125, y: 0.34375 }, - { x: 0.59375, y: 0.34375 }, - { x: 0.59375, y: 0.34375 }, - { x: 0.65625, y: 0.34375 }, - { x: 0.65625, y: 0.34375 }, - { x: 0.71875, y: 0.34375 }, - { x: 0.71875, y: 0.34375 }, - { x: 0.78125, y: 0.34375 }, - { x: 0.78125, y: 0.34375 }, - { x: 0.84375, y: 0.34375 }, - { x: 0.84375, y: 0.34375 }, - { x: 0.90625, y: 0.34375 }, - { x: 0.90625, y: 0.34375 }, - { x: 0.96875, y: 0.34375 }, - { x: 0.96875, y: 0.34375 }, - { x: 0.03125, y: 0.40625 }, - { x: 0.03125, y: 0.40625 }, - { x: 0.09375, y: 0.40625 }, - { x: 0.09375, y: 0.40625 }, - { x: 0.15625, y: 0.40625 }, - { x: 0.15625, y: 0.40625 }, - { x: 0.21875, y: 0.40625 }, - { x: 0.21875, y: 0.40625 }, - { x: 0.28125, y: 0.40625 }, - { x: 0.28125, y: 0.40625 }, - { x: 0.34375, y: 0.40625 }, - { x: 0.34375, y: 0.40625 }, - { x: 0.40625, y: 0.40625 }, - { x: 0.40625, y: 0.40625 }, - { x: 0.46875, y: 0.40625 }, - { x: 0.46875, y: 0.40625 }, - { x: 0.53125, y: 0.40625 }, - { x: 0.53125, y: 0.40625 }, - { x: 0.59375, y: 0.40625 }, - { x: 0.59375, y: 0.40625 }, - { x: 0.65625, y: 0.40625 }, - { x: 0.65625, y: 0.40625 }, - { x: 0.71875, y: 0.40625 }, - { x: 0.71875, y: 0.40625 }, - { x: 0.78125, y: 0.40625 }, - { x: 0.78125, y: 0.40625 }, - { x: 0.84375, y: 0.40625 }, - { x: 0.84375, y: 0.40625 }, - { x: 0.90625, y: 0.40625 }, - { x: 0.90625, y: 0.40625 }, - { x: 0.96875, y: 0.40625 }, - { x: 0.96875, y: 0.40625 }, - { x: 0.03125, y: 0.46875 }, - { x: 0.03125, y: 0.46875 }, - { x: 0.09375, y: 0.46875 }, - { x: 0.09375, y: 0.46875 }, - { x: 0.15625, y: 0.46875 }, - { x: 0.15625, y: 0.46875 }, - { x: 0.21875, y: 0.46875 }, - { x: 0.21875, y: 0.46875 }, - { x: 0.28125, y: 0.46875 }, - { x: 0.28125, y: 0.46875 }, - { x: 0.34375, y: 0.46875 }, - { x: 0.34375, y: 0.46875 }, - { x: 0.40625, y: 0.46875 }, - { x: 0.40625, y: 0.46875 }, - { x: 0.46875, y: 0.46875 }, - { x: 0.46875, y: 0.46875 }, - { x: 0.53125, y: 0.46875 }, - { x: 0.53125, y: 0.46875 }, - { x: 0.59375, y: 0.46875 }, - { x: 0.59375, y: 0.46875 }, - { x: 0.65625, y: 0.46875 }, - { x: 0.65625, y: 0.46875 }, - { x: 0.71875, y: 0.46875 }, - { x: 0.71875, y: 0.46875 }, - { x: 0.78125, y: 0.46875 }, - { x: 0.78125, y: 0.46875 }, - { x: 0.84375, y: 0.46875 }, - { x: 0.84375, y: 0.46875 }, - { x: 0.90625, y: 0.46875 }, - { x: 0.90625, y: 0.46875 }, - { x: 0.96875, y: 0.46875 }, - { x: 0.96875, y: 0.46875 }, - { x: 0.03125, y: 0.53125 }, - { x: 0.03125, y: 0.53125 }, - { x: 0.09375, y: 0.53125 }, - { x: 0.09375, y: 0.53125 }, - { x: 0.15625, y: 0.53125 }, - { x: 0.15625, y: 0.53125 }, - { x: 0.21875, y: 0.53125 }, - { x: 0.21875, y: 0.53125 }, - { x: 0.28125, y: 0.53125 }, - { x: 0.28125, y: 0.53125 }, - { x: 0.34375, y: 0.53125 }, - { x: 0.34375, y: 0.53125 }, - { x: 0.40625, y: 0.53125 }, - { x: 0.40625, y: 0.53125 }, - { x: 0.46875, y: 0.53125 }, - { x: 0.46875, y: 0.53125 }, - { x: 0.53125, y: 0.53125 }, - { x: 0.53125, y: 0.53125 }, - { x: 0.59375, y: 0.53125 }, - { x: 0.59375, y: 0.53125 }, - { x: 0.65625, y: 0.53125 }, - { x: 0.65625, y: 0.53125 }, - { x: 0.71875, y: 0.53125 }, - { x: 0.71875, y: 0.53125 }, - { x: 0.78125, y: 0.53125 }, - { x: 0.78125, y: 0.53125 }, - { x: 0.84375, y: 0.53125 }, - { x: 0.84375, y: 0.53125 }, - { x: 0.90625, y: 0.53125 }, - { x: 0.90625, y: 0.53125 }, - { x: 0.96875, y: 0.53125 }, - { x: 0.96875, y: 0.53125 }, - { x: 0.03125, y: 0.59375 }, - { x: 0.03125, y: 0.59375 }, - { x: 0.09375, y: 0.59375 }, - { x: 0.09375, y: 0.59375 }, - { x: 0.15625, y: 0.59375 }, - { x: 0.15625, y: 0.59375 }, - { x: 0.21875, y: 0.59375 }, - { x: 0.21875, y: 0.59375 }, - { x: 0.28125, y: 0.59375 }, - { x: 0.28125, y: 0.59375 }, - { x: 0.34375, y: 0.59375 }, - { x: 0.34375, y: 0.59375 }, - { x: 0.40625, y: 0.59375 }, - { x: 0.40625, y: 0.59375 }, - { x: 0.46875, y: 0.59375 }, - { x: 0.46875, y: 0.59375 }, - { x: 0.53125, y: 0.59375 }, - { x: 0.53125, y: 0.59375 }, - { x: 0.59375, y: 0.59375 }, - { x: 0.59375, y: 0.59375 }, - { x: 0.65625, y: 0.59375 }, - { x: 0.65625, y: 0.59375 }, - { x: 0.71875, y: 0.59375 }, - { x: 0.71875, y: 0.59375 }, - { x: 0.78125, y: 0.59375 }, - { x: 0.78125, y: 0.59375 }, - { x: 0.84375, y: 0.59375 }, - { x: 0.84375, y: 0.59375 }, - { x: 0.90625, y: 0.59375 }, - { x: 0.90625, y: 0.59375 }, - { x: 0.96875, y: 0.59375 }, - { x: 0.96875, y: 0.59375 }, - { x: 0.03125, y: 0.65625 }, - { x: 0.03125, y: 0.65625 }, - { x: 0.09375, y: 0.65625 }, - { x: 0.09375, y: 0.65625 }, - { x: 0.15625, y: 0.65625 }, - { x: 0.15625, y: 0.65625 }, - { x: 0.21875, y: 0.65625 }, - { x: 0.21875, y: 0.65625 }, - { x: 0.28125, y: 0.65625 }, - { x: 0.28125, y: 0.65625 }, - { x: 0.34375, y: 0.65625 }, - { x: 0.34375, y: 0.65625 }, - { x: 0.40625, y: 0.65625 }, - { x: 0.40625, y: 0.65625 }, - { x: 0.46875, y: 0.65625 }, - { x: 0.46875, y: 0.65625 }, - { x: 0.53125, y: 0.65625 }, - { x: 0.53125, y: 0.65625 }, - { x: 0.59375, y: 0.65625 }, - { x: 0.59375, y: 0.65625 }, - { x: 0.65625, y: 0.65625 }, - { x: 0.65625, y: 0.65625 }, - { x: 0.71875, y: 0.65625 }, - { x: 0.71875, y: 0.65625 }, - { x: 0.78125, y: 0.65625 }, - { x: 0.78125, y: 0.65625 }, - { x: 0.84375, y: 0.65625 }, - { x: 0.84375, y: 0.65625 }, - { x: 0.90625, y: 0.65625 }, - { x: 0.90625, y: 0.65625 }, - { x: 0.96875, y: 0.65625 }, - { x: 0.96875, y: 0.65625 }, - { x: 0.03125, y: 0.71875 }, - { x: 0.03125, y: 0.71875 }, - { x: 0.09375, y: 0.71875 }, - { x: 0.09375, y: 0.71875 }, - { x: 0.15625, y: 0.71875 }, - { x: 0.15625, y: 0.71875 }, - { x: 0.21875, y: 0.71875 }, - { x: 0.21875, y: 0.71875 }, - { x: 0.28125, y: 0.71875 }, - { x: 0.28125, y: 0.71875 }, - { x: 0.34375, y: 0.71875 }, - { x: 0.34375, y: 0.71875 }, - { x: 0.40625, y: 0.71875 }, - { x: 0.40625, y: 0.71875 }, - { x: 0.46875, y: 0.71875 }, - { x: 0.46875, y: 0.71875 }, - { x: 0.53125, y: 0.71875 }, - { x: 0.53125, y: 0.71875 }, - { x: 0.59375, y: 0.71875 }, - { x: 0.59375, y: 0.71875 }, - { x: 0.65625, y: 0.71875 }, - { x: 0.65625, y: 0.71875 }, - { x: 0.71875, y: 0.71875 }, - { x: 0.71875, y: 0.71875 }, - { x: 0.78125, y: 0.71875 }, - { x: 0.78125, y: 0.71875 }, - { x: 0.84375, y: 0.71875 }, - { x: 0.84375, y: 0.71875 }, - { x: 0.90625, y: 0.71875 }, - { x: 0.90625, y: 0.71875 }, - { x: 0.96875, y: 0.71875 }, - { x: 0.96875, y: 0.71875 }, - { x: 0.03125, y: 0.78125 }, - { x: 0.03125, y: 0.78125 }, - { x: 0.09375, y: 0.78125 }, - { x: 0.09375, y: 0.78125 }, - { x: 0.15625, y: 0.78125 }, - { x: 0.15625, y: 0.78125 }, - { x: 0.21875, y: 0.78125 }, - { x: 0.21875, y: 0.78125 }, - { x: 0.28125, y: 0.78125 }, - { x: 0.28125, y: 0.78125 }, - { x: 0.34375, y: 0.78125 }, - { x: 0.34375, y: 0.78125 }, - { x: 0.40625, y: 0.78125 }, - { x: 0.40625, y: 0.78125 }, - { x: 0.46875, y: 0.78125 }, - { x: 0.46875, y: 0.78125 }, - { x: 0.53125, y: 0.78125 }, - { x: 0.53125, y: 0.78125 }, - { x: 0.59375, y: 0.78125 }, - { x: 0.59375, y: 0.78125 }, - { x: 0.65625, y: 0.78125 }, - { x: 0.65625, y: 0.78125 }, - { x: 0.71875, y: 0.78125 }, - { x: 0.71875, y: 0.78125 }, - { x: 0.78125, y: 0.78125 }, - { x: 0.78125, y: 0.78125 }, - { x: 0.84375, y: 0.78125 }, - { x: 0.84375, y: 0.78125 }, - { x: 0.90625, y: 0.78125 }, - { x: 0.90625, y: 0.78125 }, - { x: 0.96875, y: 0.78125 }, - { x: 0.96875, y: 0.78125 }, - { x: 0.03125, y: 0.84375 }, - { x: 0.03125, y: 0.84375 }, - { x: 0.09375, y: 0.84375 }, - { x: 0.09375, y: 0.84375 }, - { x: 0.15625, y: 0.84375 }, - { x: 0.15625, y: 0.84375 }, - { x: 0.21875, y: 0.84375 }, - { x: 0.21875, y: 0.84375 }, - { x: 0.28125, y: 0.84375 }, - { x: 0.28125, y: 0.84375 }, - { x: 0.34375, y: 0.84375 }, - { x: 0.34375, y: 0.84375 }, - { x: 0.40625, y: 0.84375 }, - { x: 0.40625, y: 0.84375 }, - { x: 0.46875, y: 0.84375 }, - { x: 0.46875, y: 0.84375 }, - { x: 0.53125, y: 0.84375 }, - { x: 0.53125, y: 0.84375 }, - { x: 0.59375, y: 0.84375 }, - { x: 0.59375, y: 0.84375 }, - { x: 0.65625, y: 0.84375 }, - { x: 0.65625, y: 0.84375 }, - { x: 0.71875, y: 0.84375 }, - { x: 0.71875, y: 0.84375 }, - { x: 0.78125, y: 0.84375 }, - { x: 0.78125, y: 0.84375 }, - { x: 0.84375, y: 0.84375 }, - { x: 0.84375, y: 0.84375 }, - { x: 0.90625, y: 0.84375 }, - { x: 0.90625, y: 0.84375 }, - { x: 0.96875, y: 0.84375 }, - { x: 0.96875, y: 0.84375 }, - { x: 0.03125, y: 0.90625 }, - { x: 0.03125, y: 0.90625 }, - { x: 0.09375, y: 0.90625 }, - { x: 0.09375, y: 0.90625 }, - { x: 0.15625, y: 0.90625 }, - { x: 0.15625, y: 0.90625 }, - { x: 0.21875, y: 0.90625 }, - { x: 0.21875, y: 0.90625 }, - { x: 0.28125, y: 0.90625 }, - { x: 0.28125, y: 0.90625 }, - { x: 0.34375, y: 0.90625 }, - { x: 0.34375, y: 0.90625 }, - { x: 0.40625, y: 0.90625 }, - { x: 0.40625, y: 0.90625 }, - { x: 0.46875, y: 0.90625 }, - { x: 0.46875, y: 0.90625 }, - { x: 0.53125, y: 0.90625 }, - { x: 0.53125, y: 0.90625 }, - { x: 0.59375, y: 0.90625 }, - { x: 0.59375, y: 0.90625 }, - { x: 0.65625, y: 0.90625 }, - { x: 0.65625, y: 0.90625 }, - { x: 0.71875, y: 0.90625 }, - { x: 0.71875, y: 0.90625 }, - { x: 0.78125, y: 0.90625 }, - { x: 0.78125, y: 0.90625 }, - { x: 0.84375, y: 0.90625 }, - { x: 0.84375, y: 0.90625 }, - { x: 0.90625, y: 0.90625 }, - { x: 0.90625, y: 0.90625 }, - { x: 0.96875, y: 0.90625 }, - { x: 0.96875, y: 0.90625 }, - { x: 0.03125, y: 0.96875 }, - { x: 0.03125, y: 0.96875 }, - { x: 0.09375, y: 0.96875 }, - { x: 0.09375, y: 0.96875 }, - { x: 0.15625, y: 0.96875 }, - { x: 0.15625, y: 0.96875 }, - { x: 0.21875, y: 0.96875 }, - { x: 0.21875, y: 0.96875 }, - { x: 0.28125, y: 0.96875 }, - { x: 0.28125, y: 0.96875 }, - { x: 0.34375, y: 0.96875 }, - { x: 0.34375, y: 0.96875 }, - { x: 0.40625, y: 0.96875 }, - { x: 0.40625, y: 0.96875 }, - { x: 0.46875, y: 0.96875 }, - { x: 0.46875, y: 0.96875 }, - { x: 0.53125, y: 0.96875 }, - { x: 0.53125, y: 0.96875 }, - { x: 0.59375, y: 0.96875 }, - { x: 0.59375, y: 0.96875 }, - { x: 0.65625, y: 0.96875 }, - { x: 0.65625, y: 0.96875 }, - { x: 0.71875, y: 0.96875 }, - { x: 0.71875, y: 0.96875 }, - { x: 0.78125, y: 0.96875 }, - { x: 0.78125, y: 0.96875 }, - { x: 0.84375, y: 0.96875 }, - { x: 0.84375, y: 0.96875 }, - { x: 0.90625, y: 0.96875 }, - { x: 0.90625, y: 0.96875 }, - { x: 0.96875, y: 0.96875 }, - { x: 0.96875, y: 0.96875 }, - { x: 0.0625, y: 0.0625 }, - { x: 0.0625, y: 0.0625 }, - { x: 0.0625, y: 0.0625 }, - { x: 0.0625, y: 0.0625 }, - { x: 0.0625, y: 0.0625 }, - { x: 0.0625, y: 0.0625 }, - { x: 0.1875, y: 0.0625 }, - { x: 0.1875, y: 0.0625 }, - { x: 0.1875, y: 0.0625 }, - { x: 0.1875, y: 0.0625 }, - { x: 0.1875, y: 0.0625 }, - { x: 0.1875, y: 0.0625 }, - { x: 0.3125, y: 0.0625 }, - { x: 0.3125, y: 0.0625 }, - { x: 0.3125, y: 0.0625 }, - { x: 0.3125, y: 0.0625 }, - { x: 0.3125, y: 0.0625 }, - { x: 0.3125, y: 0.0625 }, - { x: 0.4375, y: 0.0625 }, - { x: 0.4375, y: 0.0625 }, - { x: 0.4375, y: 0.0625 }, - { x: 0.4375, y: 0.0625 }, - { x: 0.4375, y: 0.0625 }, - { x: 0.4375, y: 0.0625 }, - { x: 0.5625, y: 0.0625 }, - { x: 0.5625, y: 0.0625 }, - { x: 0.5625, y: 0.0625 }, - { x: 0.5625, y: 0.0625 }, - { x: 0.5625, y: 0.0625 }, - { x: 0.5625, y: 0.0625 }, - { x: 0.6875, y: 0.0625 }, - { x: 0.6875, y: 0.0625 }, - { x: 0.6875, y: 0.0625 }, - { x: 0.6875, y: 0.0625 }, - { x: 0.6875, y: 0.0625 }, - { x: 0.6875, y: 0.0625 }, - { x: 0.8125, y: 0.0625 }, - { x: 0.8125, y: 0.0625 }, - { x: 0.8125, y: 0.0625 }, - { x: 0.8125, y: 0.0625 }, - { x: 0.8125, y: 0.0625 }, - { x: 0.8125, y: 0.0625 }, - { x: 0.9375, y: 0.0625 }, - { x: 0.9375, y: 0.0625 }, - { x: 0.9375, y: 0.0625 }, - { x: 0.9375, y: 0.0625 }, - { x: 0.9375, y: 0.0625 }, - { x: 0.9375, y: 0.0625 }, - { x: 0.0625, y: 0.1875 }, - { x: 0.0625, y: 0.1875 }, - { x: 0.0625, y: 0.1875 }, - { x: 0.0625, y: 0.1875 }, - { x: 0.0625, y: 0.1875 }, - { x: 0.0625, y: 0.1875 }, - { x: 0.1875, y: 0.1875 }, - { x: 0.1875, y: 0.1875 }, - { x: 0.1875, y: 0.1875 }, - { x: 0.1875, y: 0.1875 }, - { x: 0.1875, y: 0.1875 }, - { x: 0.1875, y: 0.1875 }, - { x: 0.3125, y: 0.1875 }, - { x: 0.3125, y: 0.1875 }, - { x: 0.3125, y: 0.1875 }, - { x: 0.3125, y: 0.1875 }, - { x: 0.3125, y: 0.1875 }, - { x: 0.3125, y: 0.1875 }, - { x: 0.4375, y: 0.1875 }, - { x: 0.4375, y: 0.1875 }, - { x: 0.4375, y: 0.1875 }, - { x: 0.4375, y: 0.1875 }, - { x: 0.4375, y: 0.1875 }, - { x: 0.4375, y: 0.1875 }, - { x: 0.5625, y: 0.1875 }, - { x: 0.5625, y: 0.1875 }, - { x: 0.5625, y: 0.1875 }, - { x: 0.5625, y: 0.1875 }, - { x: 0.5625, y: 0.1875 }, - { x: 0.5625, y: 0.1875 }, - { x: 0.6875, y: 0.1875 }, - { x: 0.6875, y: 0.1875 }, - { x: 0.6875, y: 0.1875 }, - { x: 0.6875, y: 0.1875 }, - { x: 0.6875, y: 0.1875 }, - { x: 0.6875, y: 0.1875 }, - { x: 0.8125, y: 0.1875 }, - { x: 0.8125, y: 0.1875 }, - { x: 0.8125, y: 0.1875 }, - { x: 0.8125, y: 0.1875 }, - { x: 0.8125, y: 0.1875 }, - { x: 0.8125, y: 0.1875 }, - { x: 0.9375, y: 0.1875 }, - { x: 0.9375, y: 0.1875 }, - { x: 0.9375, y: 0.1875 }, - { x: 0.9375, y: 0.1875 }, - { x: 0.9375, y: 0.1875 }, - { x: 0.9375, y: 0.1875 }, - { x: 0.0625, y: 0.3125 }, - { x: 0.0625, y: 0.3125 }, - { x: 0.0625, y: 0.3125 }, - { x: 0.0625, y: 0.3125 }, - { x: 0.0625, y: 0.3125 }, - { x: 0.0625, y: 0.3125 }, - { x: 0.1875, y: 0.3125 }, - { x: 0.1875, y: 0.3125 }, - { x: 0.1875, y: 0.3125 }, - { x: 0.1875, y: 0.3125 }, - { x: 0.1875, y: 0.3125 }, - { x: 0.1875, y: 0.3125 }, - { x: 0.3125, y: 0.3125 }, - { x: 0.3125, y: 0.3125 }, - { x: 0.3125, y: 0.3125 }, - { x: 0.3125, y: 0.3125 }, - { x: 0.3125, y: 0.3125 }, - { x: 0.3125, y: 0.3125 }, - { x: 0.4375, y: 0.3125 }, - { x: 0.4375, y: 0.3125 }, - { x: 0.4375, y: 0.3125 }, - { x: 0.4375, y: 0.3125 }, - { x: 0.4375, y: 0.3125 }, - { x: 0.4375, y: 0.3125 }, - { x: 0.5625, y: 0.3125 }, - { x: 0.5625, y: 0.3125 }, - { x: 0.5625, y: 0.3125 }, - { x: 0.5625, y: 0.3125 }, - { x: 0.5625, y: 0.3125 }, - { x: 0.5625, y: 0.3125 }, - { x: 0.6875, y: 0.3125 }, - { x: 0.6875, y: 0.3125 }, - { x: 0.6875, y: 0.3125 }, - { x: 0.6875, y: 0.3125 }, - { x: 0.6875, y: 0.3125 }, - { x: 0.6875, y: 0.3125 }, - { x: 0.8125, y: 0.3125 }, - { x: 0.8125, y: 0.3125 }, - { x: 0.8125, y: 0.3125 }, - { x: 0.8125, y: 0.3125 }, - { x: 0.8125, y: 0.3125 }, - { x: 0.8125, y: 0.3125 }, - { x: 0.9375, y: 0.3125 }, - { x: 0.9375, y: 0.3125 }, - { x: 0.9375, y: 0.3125 }, - { x: 0.9375, y: 0.3125 }, - { x: 0.9375, y: 0.3125 }, - { x: 0.9375, y: 0.3125 }, - { x: 0.0625, y: 0.4375 }, - { x: 0.0625, y: 0.4375 }, - { x: 0.0625, y: 0.4375 }, - { x: 0.0625, y: 0.4375 }, - { x: 0.0625, y: 0.4375 }, - { x: 0.0625, y: 0.4375 }, - { x: 0.1875, y: 0.4375 }, - { x: 0.1875, y: 0.4375 }, - { x: 0.1875, y: 0.4375 }, - { x: 0.1875, y: 0.4375 }, - { x: 0.1875, y: 0.4375 }, - { x: 0.1875, y: 0.4375 }, - { x: 0.3125, y: 0.4375 }, - { x: 0.3125, y: 0.4375 }, - { x: 0.3125, y: 0.4375 }, - { x: 0.3125, y: 0.4375 }, - { x: 0.3125, y: 0.4375 }, - { x: 0.3125, y: 0.4375 }, - { x: 0.4375, y: 0.4375 }, - { x: 0.4375, y: 0.4375 }, - { x: 0.4375, y: 0.4375 }, - { x: 0.4375, y: 0.4375 }, - { x: 0.4375, y: 0.4375 }, - { x: 0.4375, y: 0.4375 }, - { x: 0.5625, y: 0.4375 }, - { x: 0.5625, y: 0.4375 }, - { x: 0.5625, y: 0.4375 }, - { x: 0.5625, y: 0.4375 }, - { x: 0.5625, y: 0.4375 }, - { x: 0.5625, y: 0.4375 }, - { x: 0.6875, y: 0.4375 }, - { x: 0.6875, y: 0.4375 }, - { x: 0.6875, y: 0.4375 }, - { x: 0.6875, y: 0.4375 }, - { x: 0.6875, y: 0.4375 }, - { x: 0.6875, y: 0.4375 }, - { x: 0.8125, y: 0.4375 }, - { x: 0.8125, y: 0.4375 }, - { x: 0.8125, y: 0.4375 }, - { x: 0.8125, y: 0.4375 }, - { x: 0.8125, y: 0.4375 }, - { x: 0.8125, y: 0.4375 }, - { x: 0.9375, y: 0.4375 }, - { x: 0.9375, y: 0.4375 }, - { x: 0.9375, y: 0.4375 }, - { x: 0.9375, y: 0.4375 }, - { x: 0.9375, y: 0.4375 }, - { x: 0.9375, y: 0.4375 }, - { x: 0.0625, y: 0.5625 }, - { x: 0.0625, y: 0.5625 }, - { x: 0.0625, y: 0.5625 }, - { x: 0.0625, y: 0.5625 }, - { x: 0.0625, y: 0.5625 }, - { x: 0.0625, y: 0.5625 }, - { x: 0.1875, y: 0.5625 }, - { x: 0.1875, y: 0.5625 }, - { x: 0.1875, y: 0.5625 }, - { x: 0.1875, y: 0.5625 }, - { x: 0.1875, y: 0.5625 }, - { x: 0.1875, y: 0.5625 }, - { x: 0.3125, y: 0.5625 }, - { x: 0.3125, y: 0.5625 }, - { x: 0.3125, y: 0.5625 }, - { x: 0.3125, y: 0.5625 }, - { x: 0.3125, y: 0.5625 }, - { x: 0.3125, y: 0.5625 }, - { x: 0.4375, y: 0.5625 }, - { x: 0.4375, y: 0.5625 }, - { x: 0.4375, y: 0.5625 }, - { x: 0.4375, y: 0.5625 }, - { x: 0.4375, y: 0.5625 }, - { x: 0.4375, y: 0.5625 }, - { x: 0.5625, y: 0.5625 }, - { x: 0.5625, y: 0.5625 }, - { x: 0.5625, y: 0.5625 }, - { x: 0.5625, y: 0.5625 }, - { x: 0.5625, y: 0.5625 }, - { x: 0.5625, y: 0.5625 }, - { x: 0.6875, y: 0.5625 }, - { x: 0.6875, y: 0.5625 }, - { x: 0.6875, y: 0.5625 }, - { x: 0.6875, y: 0.5625 }, - { x: 0.6875, y: 0.5625 }, - { x: 0.6875, y: 0.5625 }, - { x: 0.8125, y: 0.5625 }, - { x: 0.8125, y: 0.5625 }, - { x: 0.8125, y: 0.5625 }, - { x: 0.8125, y: 0.5625 }, - { x: 0.8125, y: 0.5625 }, - { x: 0.8125, y: 0.5625 }, - { x: 0.9375, y: 0.5625 }, - { x: 0.9375, y: 0.5625 }, - { x: 0.9375, y: 0.5625 }, - { x: 0.9375, y: 0.5625 }, - { x: 0.9375, y: 0.5625 }, - { x: 0.9375, y: 0.5625 }, - { x: 0.0625, y: 0.6875 }, - { x: 0.0625, y: 0.6875 }, - { x: 0.0625, y: 0.6875 }, - { x: 0.0625, y: 0.6875 }, - { x: 0.0625, y: 0.6875 }, - { x: 0.0625, y: 0.6875 }, - { x: 0.1875, y: 0.6875 }, - { x: 0.1875, y: 0.6875 }, - { x: 0.1875, y: 0.6875 }, - { x: 0.1875, y: 0.6875 }, - { x: 0.1875, y: 0.6875 }, - { x: 0.1875, y: 0.6875 }, - { x: 0.3125, y: 0.6875 }, - { x: 0.3125, y: 0.6875 }, - { x: 0.3125, y: 0.6875 }, - { x: 0.3125, y: 0.6875 }, - { x: 0.3125, y: 0.6875 }, - { x: 0.3125, y: 0.6875 }, - { x: 0.4375, y: 0.6875 }, - { x: 0.4375, y: 0.6875 }, - { x: 0.4375, y: 0.6875 }, - { x: 0.4375, y: 0.6875 }, - { x: 0.4375, y: 0.6875 }, - { x: 0.4375, y: 0.6875 }, - { x: 0.5625, y: 0.6875 }, - { x: 0.5625, y: 0.6875 }, - { x: 0.5625, y: 0.6875 }, - { x: 0.5625, y: 0.6875 }, - { x: 0.5625, y: 0.6875 }, - { x: 0.5625, y: 0.6875 }, - { x: 0.6875, y: 0.6875 }, - { x: 0.6875, y: 0.6875 }, - { x: 0.6875, y: 0.6875 }, - { x: 0.6875, y: 0.6875 }, - { x: 0.6875, y: 0.6875 }, - { x: 0.6875, y: 0.6875 }, - { x: 0.8125, y: 0.6875 }, - { x: 0.8125, y: 0.6875 }, - { x: 0.8125, y: 0.6875 }, - { x: 0.8125, y: 0.6875 }, - { x: 0.8125, y: 0.6875 }, - { x: 0.8125, y: 0.6875 }, - { x: 0.9375, y: 0.6875 }, - { x: 0.9375, y: 0.6875 }, - { x: 0.9375, y: 0.6875 }, - { x: 0.9375, y: 0.6875 }, - { x: 0.9375, y: 0.6875 }, - { x: 0.9375, y: 0.6875 }, - { x: 0.0625, y: 0.8125 }, - { x: 0.0625, y: 0.8125 }, - { x: 0.0625, y: 0.8125 }, - { x: 0.0625, y: 0.8125 }, - { x: 0.0625, y: 0.8125 }, - { x: 0.0625, y: 0.8125 }, - { x: 0.1875, y: 0.8125 }, - { x: 0.1875, y: 0.8125 }, - { x: 0.1875, y: 0.8125 }, - { x: 0.1875, y: 0.8125 }, - { x: 0.1875, y: 0.8125 }, - { x: 0.1875, y: 0.8125 }, - { x: 0.3125, y: 0.8125 }, - { x: 0.3125, y: 0.8125 }, - { x: 0.3125, y: 0.8125 }, - { x: 0.3125, y: 0.8125 }, - { x: 0.3125, y: 0.8125 }, - { x: 0.3125, y: 0.8125 }, - { x: 0.4375, y: 0.8125 }, - { x: 0.4375, y: 0.8125 }, - { x: 0.4375, y: 0.8125 }, - { x: 0.4375, y: 0.8125 }, - { x: 0.4375, y: 0.8125 }, - { x: 0.4375, y: 0.8125 }, - { x: 0.5625, y: 0.8125 }, - { x: 0.5625, y: 0.8125 }, - { x: 0.5625, y: 0.8125 }, - { x: 0.5625, y: 0.8125 }, - { x: 0.5625, y: 0.8125 }, - { x: 0.5625, y: 0.8125 }, - { x: 0.6875, y: 0.8125 }, - { x: 0.6875, y: 0.8125 }, - { x: 0.6875, y: 0.8125 }, - { x: 0.6875, y: 0.8125 }, - { x: 0.6875, y: 0.8125 }, - { x: 0.6875, y: 0.8125 }, - { x: 0.8125, y: 0.8125 }, - { x: 0.8125, y: 0.8125 }, - { x: 0.8125, y: 0.8125 }, - { x: 0.8125, y: 0.8125 }, - { x: 0.8125, y: 0.8125 }, - { x: 0.8125, y: 0.8125 }, - { x: 0.9375, y: 0.8125 }, - { x: 0.9375, y: 0.8125 }, - { x: 0.9375, y: 0.8125 }, - { x: 0.9375, y: 0.8125 }, - { x: 0.9375, y: 0.8125 }, - { x: 0.9375, y: 0.8125 }, - { x: 0.0625, y: 0.9375 }, - { x: 0.0625, y: 0.9375 }, - { x: 0.0625, y: 0.9375 }, - { x: 0.0625, y: 0.9375 }, - { x: 0.0625, y: 0.9375 }, - { x: 0.0625, y: 0.9375 }, - { x: 0.1875, y: 0.9375 }, - { x: 0.1875, y: 0.9375 }, - { x: 0.1875, y: 0.9375 }, - { x: 0.1875, y: 0.9375 }, - { x: 0.1875, y: 0.9375 }, - { x: 0.1875, y: 0.9375 }, - { x: 0.3125, y: 0.9375 }, - { x: 0.3125, y: 0.9375 }, - { x: 0.3125, y: 0.9375 }, - { x: 0.3125, y: 0.9375 }, - { x: 0.3125, y: 0.9375 }, - { x: 0.3125, y: 0.9375 }, - { x: 0.4375, y: 0.9375 }, - { x: 0.4375, y: 0.9375 }, - { x: 0.4375, y: 0.9375 }, - { x: 0.4375, y: 0.9375 }, - { x: 0.4375, y: 0.9375 }, - { x: 0.4375, y: 0.9375 }, - { x: 0.5625, y: 0.9375 }, - { x: 0.5625, y: 0.9375 }, - { x: 0.5625, y: 0.9375 }, - { x: 0.5625, y: 0.9375 }, - { x: 0.5625, y: 0.9375 }, - { x: 0.5625, y: 0.9375 }, - { x: 0.6875, y: 0.9375 }, - { x: 0.6875, y: 0.9375 }, - { x: 0.6875, y: 0.9375 }, - { x: 0.6875, y: 0.9375 }, - { x: 0.6875, y: 0.9375 }, - { x: 0.6875, y: 0.9375 }, - { x: 0.8125, y: 0.9375 }, - { x: 0.8125, y: 0.9375 }, - { x: 0.8125, y: 0.9375 }, - { x: 0.8125, y: 0.9375 }, - { x: 0.8125, y: 0.9375 }, - { x: 0.8125, y: 0.9375 }, - { x: 0.9375, y: 0.9375 }, - { x: 0.9375, y: 0.9375 }, - { x: 0.9375, y: 0.9375 }, - { x: 0.9375, y: 0.9375 }, - { x: 0.9375, y: 0.9375 }, - { x: 0.9375, y: 0.9375 } -]; - -// src/hand/handposedetector.ts -var HandDetector = class { - constructor(model21) { - __publicField(this, "model"); - __publicField(this, "anchors"); - __publicField(this, "anchorsTensor"); - __publicField(this, "inputSize"); - __publicField(this, "inputSizeTensor"); - __publicField(this, "doubleInputSizeTensor"); - var _a, _b, _c, _d; - this.model = model21; - this.anchors = anchors2.map((anchor) => [anchor.x, anchor.y]); - this.anchorsTensor = tfjs_esm_exports.tensor2d(this.anchors); - this.inputSize = ((_d = (_c = (_b = (_a = this == null ? void 0 : this.model) == null ? void 0 : _a.inputs) == null ? void 0 : _b[0]) == null ? void 0 : _c.shape) == null ? void 0 : _d[2]) || 0; - this.inputSizeTensor = tfjs_esm_exports.tensor1d([this.inputSize, this.inputSize]); - this.doubleInputSizeTensor = tfjs_esm_exports.tensor1d([this.inputSize * 2, this.inputSize * 2]); - } - normalizeBoxes(boxes) { - const t2 = {}; - t2.boxOffsets = tfjs_esm_exports.slice(boxes, [0, 0], [-1, 2]); - t2.boxSizes = tfjs_esm_exports.slice(boxes, [0, 2], [-1, 2]); - t2.div = tfjs_esm_exports.div(t2.boxOffsets, this.inputSizeTensor); - t2.boxCenterPoints = tfjs_esm_exports.add(t2.div, this.anchorsTensor); - t2.halfBoxSizes = tfjs_esm_exports.div(t2.boxSizes, this.doubleInputSizeTensor); - t2.sub = tfjs_esm_exports.sub(t2.boxCenterPoints, t2.halfBoxSizes); - t2.startPoints = tfjs_esm_exports.mul(t2.sub, this.inputSizeTensor); - t2.add = tfjs_esm_exports.add(t2.boxCenterPoints, t2.halfBoxSizes); - t2.endPoints = tfjs_esm_exports.mul(t2.add, this.inputSizeTensor); - const res = tfjs_esm_exports.concat2d([t2.startPoints, t2.endPoints], 1); - Object.keys(t2).forEach((tensor6) => tfjs_esm_exports.dispose(t2[tensor6])); - return res; - } - normalizeLandmarks(rawPalmLandmarks, index2) { - const t2 = {}; - t2.reshape = tfjs_esm_exports.reshape(rawPalmLandmarks, [-1, 7, 2]); - t2.div = tfjs_esm_exports.div(t2.reshape, this.inputSizeTensor); - t2.landmarks = tfjs_esm_exports.add(t2.div, this.anchors[index2] ? this.anchors[index2] : 0); - const res = tfjs_esm_exports.mul(t2.landmarks, this.inputSizeTensor); - Object.keys(t2).forEach((tensor6) => tfjs_esm_exports.dispose(t2[tensor6])); - return res; - } - async predict(input, config3) { - var _a; - const t2 = {}; - t2.resize = tfjs_esm_exports.image.resizeBilinear(input, [this.inputSize, this.inputSize]); - t2.div = tfjs_esm_exports.div(t2.resize, constants.tf127); - t2.image = tfjs_esm_exports.sub(t2.div, constants.tf1); - t2.batched = this.model.execute(t2.image); - t2.predictions = tfjs_esm_exports.squeeze(t2.batched); - t2.slice = tfjs_esm_exports.slice(t2.predictions, [0, 0], [-1, 1]); - t2.sigmoid = tfjs_esm_exports.sigmoid(t2.slice); - t2.scores = tfjs_esm_exports.squeeze(t2.sigmoid); - const scores = await t2.scores.data(); - t2.boxes = tfjs_esm_exports.slice(t2.predictions, [0, 1], [-1, 4]); - t2.norm = this.normalizeBoxes(t2.boxes); - t2.nms = await tfjs_esm_exports.image.nonMaxSuppressionAsync(t2.norm, t2.scores, 3 * (((_a = config3.hand) == null ? void 0 : _a.maxDetected) || 1), config3.hand.iouThreshold, config3.hand.minConfidence); - const nms = await t2.nms.array(); - const hands = []; - for (const index2 of nms) { - const p = {}; - p.box = tfjs_esm_exports.slice(t2.norm, [index2, 0], [1, -1]); - p.slice = tfjs_esm_exports.slice(t2.predictions, [index2, 5], [1, 14]); - p.norm = this.normalizeLandmarks(p.slice, index2); - p.palmLandmarks = tfjs_esm_exports.reshape(p.norm, [-1, 2]); - const box = await p.box.data(); - const startPoint = box.slice(0, 2); - const endPoint = box.slice(2, 4); - const palmLandmarks = await p.palmLandmarks.array(); - const hand3 = { startPoint, endPoint, palmLandmarks, confidence: scores[index2] }; - const scaled = scaleBoxCoordinates2(hand3, [(input.shape[2] || 1) / this.inputSize, (input.shape[1] || 0) / this.inputSize]); - hands.push(scaled); - Object.keys(p).forEach((tensor6) => tfjs_esm_exports.dispose(p[tensor6])); - } - Object.keys(t2).forEach((tensor6) => tfjs_esm_exports.dispose(t2[tensor6])); - return hands; - } -}; - -// src/hand/handposepipeline.ts -var palmBoxEnlargeFactor = 5; -var handBoxEnlargeFactor = 1.65; -var palmLandmarkIds = [0, 5, 9, 13, 17, 1, 2]; -var palmLandmarksPalmBase = 0; -var palmLandmarksMiddleFingerBase = 2; -var lastTime8 = 0; -var HandPipeline = class { - constructor(handDetector, handPoseModel2) { - __publicField(this, "handDetector"); - __publicField(this, "handPoseModel"); - __publicField(this, "inputSize"); - __publicField(this, "storedBoxes"); - __publicField(this, "skipped"); - __publicField(this, "detectedHands"); - var _a, _b, _c; - this.handDetector = handDetector; - this.handPoseModel = handPoseModel2; - this.inputSize = ((_c = (_b = (_a = this.handPoseModel) == null ? void 0 : _a.inputs) == null ? void 0 : _b[0].shape) == null ? void 0 : _c[2]) || 0; - this.storedBoxes = []; - this.skipped = Number.MAX_SAFE_INTEGER; - this.detectedHands = 0; - } - calculateLandmarksBoundingBox(landmarks) { - const xs = landmarks.map((d) => d[0]); - const ys = landmarks.map((d) => d[1]); - const startPoint = [Math.min(...xs), Math.min(...ys)]; - const endPoint = [Math.max(...xs), Math.max(...ys)]; - return { startPoint, endPoint }; - } - getBoxForPalmLandmarks(palmLandmarks, rotationMatrix) { - const rotatedPalmLandmarks = palmLandmarks.map((coord) => rotatePoint2([...coord, 1], rotationMatrix)); - const boxAroundPalm = this.calculateLandmarksBoundingBox(rotatedPalmLandmarks); - return enlargeBox2(squarifyBox2(boxAroundPalm), palmBoxEnlargeFactor); - } - getBoxForHandLandmarks(landmarks) { - const boundingBox = this.calculateLandmarksBoundingBox(landmarks); - const boxAroundHand = enlargeBox2(squarifyBox2(boundingBox), handBoxEnlargeFactor); - boxAroundHand.palmLandmarks = []; - for (let i = 0; i < palmLandmarkIds.length; i++) { - boxAroundHand.palmLandmarks.push(landmarks[palmLandmarkIds[i]].slice(0, 2)); - } - return boxAroundHand; - } - transformRawCoords(rawCoords, box2, angle, rotationMatrix) { - const boxSize = getBoxSize2(box2); - const scaleFactor = [boxSize[0] / this.inputSize, boxSize[1] / this.inputSize, (boxSize[0] + boxSize[1]) / this.inputSize / 2]; - const coordsScaled = rawCoords.map((coord) => [ - scaleFactor[0] * (coord[0] - this.inputSize / 2), - scaleFactor[1] * (coord[1] - this.inputSize / 2), - scaleFactor[2] * coord[2] - ]); - const coordsRotationMatrix = buildRotationMatrix2(angle, [0, 0]); - const coordsRotated = coordsScaled.map((coord) => { - const rotated = rotatePoint2(coord, coordsRotationMatrix); - return [...rotated, coord[2]]; - }); - const inverseRotationMatrix = invertTransformMatrix2(rotationMatrix); - const boxCenter = [...getBoxCenter2(box2), 1]; - const originalBoxCenter = [ - dot2(boxCenter, inverseRotationMatrix[0]), - dot2(boxCenter, inverseRotationMatrix[1]) - ]; - return coordsRotated.map((coord) => [ - Math.trunc(coord[0] + originalBoxCenter[0]), - Math.trunc(coord[1] + originalBoxCenter[1]), - Math.trunc(coord[2]) - ]); - } - async estimateHands(image27, config3) { - let useFreshBox = false; - let boxes; - const skipTime = (config3.hand.skipTime || 0) > now() - lastTime8; - const skipFrame = this.skipped < (config3.hand.skipFrames || 0); - if (config3.skipAllowed && skipTime && skipFrame) { - boxes = await this.handDetector.predict(image27, config3); - this.skipped = 0; - } - if (config3.skipAllowed) - this.skipped++; - if (boxes && boxes.length > 0 && (boxes.length !== this.detectedHands && this.detectedHands !== config3.hand.maxDetected || !config3.hand.landmarks)) { - this.detectedHands = 0; - this.storedBoxes = [...boxes]; - if (this.storedBoxes.length > 0) - useFreshBox = true; - } - const hands = []; - for (let i = 0; i < this.storedBoxes.length; i++) { - const currentBox = this.storedBoxes[i]; - if (!currentBox) - continue; - if (config3.hand.landmarks) { - const angle = config3.hand.rotation ? computeRotation2(currentBox.palmLandmarks[palmLandmarksPalmBase], currentBox.palmLandmarks[palmLandmarksMiddleFingerBase]) : 0; - const palmCenter = getBoxCenter2(currentBox); - const palmCenterNormalized = [palmCenter[0] / image27.shape[2], palmCenter[1] / image27.shape[1]]; - const rotatedImage = config3.hand.rotation && env.kernels.includes("rotatewithoffset") ? tfjs_esm_exports.image.rotateWithOffset(image27, angle, 0, palmCenterNormalized) : image27.clone(); - const rotationMatrix = buildRotationMatrix2(-angle, palmCenter); - const newBox = useFreshBox ? this.getBoxForPalmLandmarks(currentBox.palmLandmarks, rotationMatrix) : currentBox; - const croppedInput = cutBoxFromImageAndResize(newBox, rotatedImage, [this.inputSize, this.inputSize]); - const handImage = tfjs_esm_exports.div(croppedInput, constants.tf255); - tfjs_esm_exports.dispose(croppedInput); - tfjs_esm_exports.dispose(rotatedImage); - const [confidenceT, keypoints] = this.handPoseModel.execute(handImage); - lastTime8 = now(); - tfjs_esm_exports.dispose(handImage); - const confidence = (await confidenceT.data())[0]; - tfjs_esm_exports.dispose(confidenceT); - if (confidence >= config3.hand.minConfidence / 4) { - const keypointsReshaped = tfjs_esm_exports.reshape(keypoints, [-1, 3]); - const rawCoords = await keypointsReshaped.array(); - tfjs_esm_exports.dispose(keypoints); - tfjs_esm_exports.dispose(keypointsReshaped); - const coords = this.transformRawCoords(rawCoords, newBox, angle, rotationMatrix); - const nextBoundingBox = this.getBoxForHandLandmarks(coords); - this.storedBoxes[i] = { ...nextBoundingBox, confidence }; - const result = { - landmarks: coords, - confidence, - boxConfidence: currentBox.confidence, - fingerConfidence: confidence, - box: { topLeft: nextBoundingBox.startPoint, bottomRight: nextBoundingBox.endPoint } - }; - hands.push(result); - } else { - this.storedBoxes[i] = null; - } - tfjs_esm_exports.dispose(keypoints); - } else { - const enlarged = enlargeBox2(squarifyBox2(currentBox), handBoxEnlargeFactor); - const result = { - confidence: currentBox.confidence, - boxConfidence: currentBox.confidence, - fingerConfidence: 0, - box: { topLeft: enlarged.startPoint, bottomRight: enlarged.endPoint }, - landmarks: [] - }; - hands.push(result); - } - } - this.storedBoxes = this.storedBoxes.filter((a) => a !== null); - this.detectedHands = hands.length; - if (hands.length > config3.hand.maxDetected) - hands.length = config3.hand.maxDetected; - return hands; - } -}; - -// src/hand/fingerdef.ts -var Finger = { - thumb: 0, - index: 1, - middle: 2, - ring: 3, - pinky: 4, - all: [0, 1, 2, 3, 4], - nameMapping: { 0: "thumb", 1: "index", 2: "middle", 3: "ring", 4: "pinky" }, - pointsMapping: { - 0: [[0, 1], [1, 2], [2, 3], [3, 4]], - 1: [[0, 5], [5, 6], [6, 7], [7, 8]], - 2: [[0, 9], [9, 10], [10, 11], [11, 12]], - 3: [[0, 13], [13, 14], [14, 15], [15, 16]], - 4: [[0, 17], [17, 18], [18, 19], [19, 20]] - }, - getName: (value) => Finger.nameMapping[value], - getPoints: (value) => Finger.pointsMapping[value] -}; -var FingerCurl = { - none: 0, - half: 1, - full: 2, - nameMapping: { 0: "none", 1: "half", 2: "full" }, - getName: (value) => FingerCurl.nameMapping[value] -}; -var FingerDirection = { - verticalUp: 0, - verticalDown: 1, - horizontalLeft: 2, - horizontalRight: 3, - diagonalUpRight: 4, - diagonalUpLeft: 5, - diagonalDownRight: 6, - diagonalDownLeft: 7, - nameMapping: { 0: "verticalUp", 1: "verticalDown", 2: "horizontalLeft", 3: "horizontalRight", 4: "diagonalUpRight", 5: "diagonalUpLeft", 6: "diagonalDownRight", 7: "diagonalDownLeft" }, - getName: (value) => FingerDirection.nameMapping[value] -}; -var FingerGesture = class { - constructor(name) { - __publicField(this, "name"); - __publicField(this, "curls"); - __publicField(this, "directions"); - __publicField(this, "weights"); - __publicField(this, "weightsRelative"); - this.name = name; - this.curls = {}; - this.directions = {}; - this.weights = [1, 1, 1, 1, 1]; - this.weightsRelative = [1, 1, 1, 1, 1]; - } - curl(finger, curl, confidence) { - if (typeof this.curls[finger] === "undefined") - this.curls[finger] = []; - this.curls[finger].push([curl, confidence]); - } - direction(finger, position, confidence) { - if (!this.directions[finger]) - this.directions[finger] = []; - this.directions[finger].push([position, confidence]); - } - weight(finger, weight) { - this.weights[finger] = weight; - const total = this.weights.reduce((a, b) => a + b, 0); - this.weightsRelative = this.weights.map((el) => el * 5 / total); - } - matchAgainst(detectedCurls, detectedDirections) { - let confidence = 0; - for (const fingerIdx in detectedCurls) { - const detectedCurl = detectedCurls[fingerIdx]; - const expectedCurls = this.curls[fingerIdx]; - if (typeof expectedCurls === "undefined") { - confidence += this.weightsRelative[fingerIdx]; - continue; - } - for (const [expectedCurl, score] of expectedCurls) { - if (detectedCurl === expectedCurl) { - confidence += score * this.weightsRelative[fingerIdx]; - break; - } - } - } - for (const fingerIdx in detectedDirections) { - const detectedDirection = detectedDirections[fingerIdx]; - const expectedDirections = this.directions[fingerIdx]; - if (typeof expectedDirections === "undefined") { - confidence += this.weightsRelative[fingerIdx]; - continue; - } - for (const [expectedDirection, score] of expectedDirections) { - if (detectedDirection === expectedDirection) { - confidence += score * this.weightsRelative[fingerIdx]; - break; - } - } - } - return confidence / 10; - } -}; - -// src/hand/fingergesture.ts -var { thumb, index, middle, ring, pinky } = Finger; -var { none, half, full } = FingerCurl; -var { verticalUp, verticalDown, horizontalLeft, horizontalRight, diagonalUpRight, diagonalUpLeft, diagonalDownRight, diagonalDownLeft } = FingerDirection; -var ThumbsUp = new FingerGesture("thumbs up"); -ThumbsUp.curl(thumb, none, 1); -ThumbsUp.direction(thumb, verticalUp, 1); -ThumbsUp.direction(thumb, diagonalUpLeft, 0.25); -ThumbsUp.direction(thumb, diagonalUpRight, 0.25); -for (const finger of [Finger.index, Finger.middle, Finger.ring, Finger.pinky]) { - ThumbsUp.curl(finger, full, 1); - ThumbsUp.direction(finger, horizontalLeft, 1); - ThumbsUp.direction(finger, horizontalRight, 1); -} -var Victory = new FingerGesture("victory"); -Victory.curl(thumb, half, 0.5); -Victory.curl(thumb, none, 0.5); -Victory.direction(thumb, verticalUp, 1); -Victory.direction(thumb, diagonalUpLeft, 1); -Victory.curl(index, none, 1); -Victory.direction(index, verticalUp, 0.75); -Victory.direction(index, diagonalUpLeft, 1); -Victory.curl(middle, none, 1); -Victory.direction(middle, verticalUp, 1); -Victory.direction(middle, diagonalUpLeft, 0.75); -Victory.curl(ring, full, 1); -Victory.direction(ring, verticalUp, 0.2); -Victory.direction(ring, diagonalUpLeft, 1); -Victory.direction(ring, horizontalLeft, 0.2); -Victory.curl(pinky, full, 1); -Victory.direction(pinky, verticalUp, 0.2); -Victory.direction(pinky, diagonalUpLeft, 1); -Victory.direction(pinky, horizontalLeft, 0.2); -Victory.weight(index, 2); -Victory.weight(middle, 2); -var Point = new FingerGesture("point"); -Point.curl(thumb, full, 1); -Point.curl(index, none, 0.5); -Point.curl(middle, full, 0.5); -Point.curl(ring, full, 0.5); -Point.curl(pinky, full, 0.5); -Point.weight(index, 2); -Point.weight(middle, 2); -var MiddleFinger = new FingerGesture("middle finger"); -MiddleFinger.curl(thumb, none, 1); -MiddleFinger.curl(index, full, 0.5); -MiddleFinger.curl(middle, full, 0.5); -MiddleFinger.curl(ring, full, 0.5); -MiddleFinger.curl(pinky, full, 0.5); -MiddleFinger.weight(index, 2); -MiddleFinger.weight(middle, 2); -var OpenPalm = new FingerGesture("open palm"); -OpenPalm.curl(thumb, none, 0.75); -OpenPalm.curl(index, none, 0.75); -OpenPalm.curl(middle, none, 0.75); -OpenPalm.curl(ring, none, 0.75); -OpenPalm.curl(pinky, none, 0.75); -var fingergesture_default = [ThumbsUp, Victory, Point, MiddleFinger, OpenPalm]; - -// src/hand/fingerpose.ts -var minConfidence = 0.7; -var options2 = { - HALF_CURL_START_LIMIT: 60, - NO_CURL_START_LIMIT: 130, - DISTANCE_VOTE_POWER: 1.1, - SINGLE_ANGLE_VOTE_POWER: 0.9, - TOTAL_ANGLE_VOTE_POWER: 1.6 -}; -function calculateSlope(point1x, point1y, point2x, point2y) { - const value = (point1y - point2y) / (point1x - point2x); - let slope = Math.atan(value) * 180 / Math.PI; - if (slope <= 0) - slope = -slope; - else if (slope > 0) - slope = 180 - slope; - return slope; -} -function getSlopes(point1, point2) { - if (!point1 || !point2) - return [0, 0]; - const slopeXY = calculateSlope(point1[0], point1[1], point2[0], point2[1]); - if (point1.length === 2) - return slopeXY; - const slopeYZ = calculateSlope(point1[1], point1[2], point2[1], point2[2]); - return [slopeXY, slopeYZ]; -} -function angleOrientationAt(angle, weightageAt = 1) { - let isVertical = 0; - let isDiagonal = 0; - let isHorizontal = 0; - if (angle >= 75 && angle <= 105) - isVertical = 1 * weightageAt; - else if (angle >= 25 && angle <= 155) - isDiagonal = 1 * weightageAt; - else - isHorizontal = 1 * weightageAt; - return [isVertical, isDiagonal, isHorizontal]; -} -function estimateFingerCurl(startPoint, midPoint, endPoint) { - const start_mid_x_dist = startPoint[0] - midPoint[0]; - const start_end_x_dist = startPoint[0] - endPoint[0]; - const mid_end_x_dist = midPoint[0] - endPoint[0]; - const start_mid_y_dist = startPoint[1] - midPoint[1]; - const start_end_y_dist = startPoint[1] - endPoint[1]; - const mid_end_y_dist = midPoint[1] - endPoint[1]; - const start_mid_z_dist = startPoint[2] - midPoint[2]; - const start_end_z_dist = startPoint[2] - endPoint[2]; - const mid_end_z_dist = midPoint[2] - endPoint[2]; - const start_mid_dist = Math.sqrt(start_mid_x_dist * start_mid_x_dist + start_mid_y_dist * start_mid_y_dist + start_mid_z_dist * start_mid_z_dist); - const start_end_dist = Math.sqrt(start_end_x_dist * start_end_x_dist + start_end_y_dist * start_end_y_dist + start_end_z_dist * start_end_z_dist); - const mid_end_dist = Math.sqrt(mid_end_x_dist * mid_end_x_dist + mid_end_y_dist * mid_end_y_dist + mid_end_z_dist * mid_end_z_dist); - let cos_in = (mid_end_dist * mid_end_dist + start_mid_dist * start_mid_dist - start_end_dist * start_end_dist) / (2 * mid_end_dist * start_mid_dist); - if (cos_in > 1) - cos_in = 1; - else if (cos_in < -1) - cos_in = -1; - let angleOfCurve = Math.acos(cos_in); - angleOfCurve = 57.2958 * angleOfCurve % 180; - let fingerCurl; - if (angleOfCurve > options2.NO_CURL_START_LIMIT) - fingerCurl = FingerCurl.none; - else if (angleOfCurve > options2.HALF_CURL_START_LIMIT) - fingerCurl = FingerCurl.half; - else - fingerCurl = FingerCurl.full; - return fingerCurl; -} -function estimateHorizontalDirection(start_end_x_dist, start_mid_x_dist, mid_end_x_dist, max_dist_x) { - let estimatedDirection; - if (max_dist_x === Math.abs(start_end_x_dist)) { - if (start_end_x_dist > 0) - estimatedDirection = FingerDirection.horizontalLeft; - else - estimatedDirection = FingerDirection.horizontalRight; - } else if (max_dist_x === Math.abs(start_mid_x_dist)) { - if (start_mid_x_dist > 0) - estimatedDirection = FingerDirection.horizontalLeft; - else - estimatedDirection = FingerDirection.horizontalRight; - } else { - if (mid_end_x_dist > 0) - estimatedDirection = FingerDirection.horizontalLeft; - else - estimatedDirection = FingerDirection.horizontalRight; - } - return estimatedDirection; -} -function estimateVerticalDirection(start_end_y_dist, start_mid_y_dist, mid_end_y_dist, max_dist_y) { - let estimatedDirection; - if (max_dist_y === Math.abs(start_end_y_dist)) { - if (start_end_y_dist < 0) - estimatedDirection = FingerDirection.verticalDown; - else - estimatedDirection = FingerDirection.verticalUp; - } else if (max_dist_y === Math.abs(start_mid_y_dist)) { - if (start_mid_y_dist < 0) - estimatedDirection = FingerDirection.verticalDown; - else - estimatedDirection = FingerDirection.verticalUp; - } else { - if (mid_end_y_dist < 0) - estimatedDirection = FingerDirection.verticalDown; - else - estimatedDirection = FingerDirection.verticalUp; - } - return estimatedDirection; -} -function estimateDiagonalDirection(start_end_y_dist, start_mid_y_dist, mid_end_y_dist, max_dist_y, start_end_x_dist, start_mid_x_dist, mid_end_x_dist, max_dist_x) { - let estimatedDirection; - const reqd_vertical_direction = estimateVerticalDirection(start_end_y_dist, start_mid_y_dist, mid_end_y_dist, max_dist_y); - const reqd_horizontal_direction = estimateHorizontalDirection(start_end_x_dist, start_mid_x_dist, mid_end_x_dist, max_dist_x); - if (reqd_vertical_direction === FingerDirection.verticalUp) { - if (reqd_horizontal_direction === FingerDirection.horizontalLeft) - estimatedDirection = FingerDirection.diagonalUpLeft; - else - estimatedDirection = FingerDirection.diagonalUpRight; - } else { - if (reqd_horizontal_direction === FingerDirection.horizontalLeft) - estimatedDirection = FingerDirection.diagonalDownLeft; - else - estimatedDirection = FingerDirection.diagonalDownRight; - } - return estimatedDirection; -} -function calculateFingerDirection(startPoint, midPoint, endPoint, fingerSlopes) { - const start_mid_x_dist = startPoint[0] - midPoint[0]; - const start_end_x_dist = startPoint[0] - endPoint[0]; - const mid_end_x_dist = midPoint[0] - endPoint[0]; - const start_mid_y_dist = startPoint[1] - midPoint[1]; - const start_end_y_dist = startPoint[1] - endPoint[1]; - const mid_end_y_dist = midPoint[1] - endPoint[1]; - const max_dist_x = Math.max(Math.abs(start_mid_x_dist), Math.abs(start_end_x_dist), Math.abs(mid_end_x_dist)); - const max_dist_y = Math.max(Math.abs(start_mid_y_dist), Math.abs(start_end_y_dist), Math.abs(mid_end_y_dist)); - let voteVertical = 0; - let voteDiagonal = 0; - let voteHorizontal = 0; - const start_end_x_y_dist_ratio = max_dist_y / (max_dist_x + 1e-5); - if (start_end_x_y_dist_ratio > 1.5) - voteVertical += options2.DISTANCE_VOTE_POWER; - else if (start_end_x_y_dist_ratio > 0.66) - voteDiagonal += options2.DISTANCE_VOTE_POWER; - else - voteHorizontal += options2.DISTANCE_VOTE_POWER; - const start_mid_dist = Math.sqrt(start_mid_x_dist * start_mid_x_dist + start_mid_y_dist * start_mid_y_dist); - const start_end_dist = Math.sqrt(start_end_x_dist * start_end_x_dist + start_end_y_dist * start_end_y_dist); - const mid_end_dist = Math.sqrt(mid_end_x_dist * mid_end_x_dist + mid_end_y_dist * mid_end_y_dist); - const max_dist = Math.max(start_mid_dist, start_end_dist, mid_end_dist); - let calc_start_point_x = startPoint[0]; - let calc_start_point_y = startPoint[1]; - let calc_end_point_x = endPoint[0]; - let calc_end_point_y = endPoint[1]; - if (max_dist === start_mid_dist) { - calc_end_point_x = endPoint[0]; - calc_end_point_y = endPoint[1]; - } else if (max_dist === mid_end_dist) { - calc_start_point_x = midPoint[0]; - calc_start_point_y = midPoint[1]; - } - const calcStartPoint = [calc_start_point_x, calc_start_point_y]; - const calcEndPoint = [calc_end_point_x, calc_end_point_y]; - const totalAngle = getSlopes(calcStartPoint, calcEndPoint); - const votes = angleOrientationAt(totalAngle, options2.TOTAL_ANGLE_VOTE_POWER); - voteVertical += votes[0]; - voteDiagonal += votes[1]; - voteHorizontal += votes[2]; - for (const fingerSlope of fingerSlopes) { - const fingerVotes = angleOrientationAt(fingerSlope, options2.SINGLE_ANGLE_VOTE_POWER); - voteVertical += fingerVotes[0]; - voteDiagonal += fingerVotes[1]; - voteHorizontal += fingerVotes[2]; - } - let estimatedDirection; - if (voteVertical === Math.max(voteVertical, voteDiagonal, voteHorizontal)) { - estimatedDirection = estimateVerticalDirection(start_end_y_dist, start_mid_y_dist, mid_end_y_dist, max_dist_y); - } else if (voteHorizontal === Math.max(voteDiagonal, voteHorizontal)) { - estimatedDirection = estimateHorizontalDirection(start_end_x_dist, start_mid_x_dist, mid_end_x_dist, max_dist_x); - } else { - estimatedDirection = estimateDiagonalDirection(start_end_y_dist, start_mid_y_dist, mid_end_y_dist, max_dist_y, start_end_x_dist, start_mid_x_dist, mid_end_x_dist, max_dist_x); - } - return estimatedDirection; -} -function estimate(landmarks) { - const slopesXY = []; - const slopesYZ = []; - const fingerCurls = []; - const fingerDirections = []; - if (!landmarks) - return { curls: fingerCurls, directions: fingerDirections }; - for (const finger of Finger.all) { - const points = Finger.getPoints(finger); - const slopeAtXY = []; - const slopeAtYZ = []; - for (const point2 of points) { - const point1 = landmarks[point2[0]]; - const point22 = landmarks[point2[1]]; - const slopes = getSlopes(point1, point22); - const slopeXY = slopes[0]; - const slopeYZ = slopes[1]; - slopeAtXY.push(slopeXY); - slopeAtYZ.push(slopeYZ); - } - slopesXY.push(slopeAtXY); - slopesYZ.push(slopeAtYZ); - } - for (const finger of Finger.all) { - const pointIndexAt = finger === Finger.thumb ? 1 : 0; - const fingerPointsAt = Finger.getPoints(finger); - const startPoint = landmarks[fingerPointsAt[pointIndexAt][0]]; - const midPoint = landmarks[fingerPointsAt[pointIndexAt + 1][1]]; - const endPoint = landmarks[fingerPointsAt[3][1]]; - const fingerCurled = estimateFingerCurl(startPoint, midPoint, endPoint); - const fingerPosition = calculateFingerDirection(startPoint, midPoint, endPoint, slopesXY[finger].slice(pointIndexAt)); - fingerCurls[finger] = fingerCurled; - fingerDirections[finger] = fingerPosition; - } - return { curls: fingerCurls, directions: fingerDirections }; -} -function analyze(keypoints) { - if (!keypoints || keypoints.length === 0) - return null; - const estimatorRes = estimate(keypoints); - const landmarks = {}; - for (const fingerIdx of Finger.all) { - landmarks[Finger.getName(fingerIdx)] = { - curl: FingerCurl.getName(estimatorRes.curls[fingerIdx]), - direction: FingerDirection.getName(estimatorRes.directions[fingerIdx]) - }; - } - return landmarks; -} -function match(keypoints) { - const poses = []; - if (!keypoints || keypoints.length === 0) - return poses; - const estimatorRes = estimate(keypoints); - for (const gesture2 of fingergesture_default) { - const confidence = gesture2.matchAgainst(estimatorRes.curls, estimatorRes.directions); - if (confidence >= minConfidence) - poses.push({ name: gesture2.name, confidence }); - } - return poses; -} - -// src/hand/handpose.ts -var meshAnnotations2 = { - thumb: [1, 2, 3, 4], - index: [5, 6, 7, 8], - middle: [9, 10, 11, 12], - ring: [13, 14, 15, 16], - pinky: [17, 18, 19, 20], - palm: [0] -}; -var handDetectorModel; -var handPoseModel; -var handPipeline; -async function predict9(input, config3) { - const predictions = await handPipeline.estimateHands(input, config3); - if (!predictions) - return []; - const hands = []; - for (let i = 0; i < predictions.length; i++) { - const annotations2 = {}; - if (predictions[i].landmarks) { - for (const key of Object.keys(meshAnnotations2)) { - annotations2[key] = meshAnnotations2[key].map((index2) => predictions[i].landmarks[index2]); - } - } - const keypoints = predictions[i].landmarks; - let box = [Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER, 0, 0]; - let boxRaw = [0, 0, 0, 0]; - if (keypoints && keypoints.length > 0) { - for (const pt of keypoints) { - if (pt[0] < box[0]) - box[0] = pt[0]; - if (pt[1] < box[1]) - box[1] = pt[1]; - if (pt[0] > box[2]) - box[2] = pt[0]; - if (pt[1] > box[3]) - box[3] = pt[1]; - } - box[2] -= box[0]; - box[3] -= box[1]; - boxRaw = [box[0] / (input.shape[2] || 0), box[1] / (input.shape[1] || 0), box[2] / (input.shape[2] || 0), box[3] / (input.shape[1] || 0)]; - } else { - box = predictions[i].box ? [ - Math.trunc(Math.max(0, predictions[i].box.topLeft[0])), - Math.trunc(Math.max(0, predictions[i].box.topLeft[1])), - Math.trunc(Math.min(input.shape[2] || 0, predictions[i].box.bottomRight[0]) - Math.max(0, predictions[i].box.topLeft[0])), - Math.trunc(Math.min(input.shape[1] || 0, predictions[i].box.bottomRight[1]) - Math.max(0, predictions[i].box.topLeft[1])) - ] : [0, 0, 0, 0]; - boxRaw = [ - predictions[i].box.topLeft[0] / (input.shape[2] || 0), - predictions[i].box.topLeft[1] / (input.shape[1] || 0), - (predictions[i].box.bottomRight[0] - predictions[i].box.topLeft[0]) / (input.shape[2] || 0), - (predictions[i].box.bottomRight[1] - predictions[i].box.topLeft[1]) / (input.shape[1] || 0) - ]; - } - const landmarks = analyze(keypoints); - hands.push({ - id: i, - score: Math.round(100 * predictions[i].confidence) / 100, - boxScore: Math.round(100 * predictions[i].boxConfidence) / 100, - fingerScore: Math.round(100 * predictions[i].fingerConfidence) / 100, - label: "hand", - box, - boxRaw, - keypoints, - annotations: annotations2, - landmarks - }); - } - return hands; -} -async function load10(config3) { - var _a, _b; - if (env.initial) { - handDetectorModel = null; - handPoseModel = null; - } - if (!handDetectorModel || !handPoseModel) { - [handDetectorModel, handPoseModel] = await Promise.all([ - config3.hand.enabled ? loadModel((_a = config3.hand.detector) == null ? void 0 : _a.modelPath) : null, - config3.hand.landmarks ? loadModel((_b = config3.hand.skeleton) == null ? void 0 : _b.modelPath) : null - ]); - } else { - if (config3.debug) - log("cached model:", handDetectorModel["modelUrl"]); - if (config3.debug) - log("cached model:", handPoseModel["modelUrl"]); - } - const handDetector = handDetectorModel ? new HandDetector(handDetectorModel) : void 0; - if (handDetector && handPoseModel) - handPipeline = new HandPipeline(handDetector, handPoseModel); - return [handDetectorModel, handPoseModel]; -} - -// src/hand/handtrack.ts -var models3 = [null, null]; -var modelOutputNodes = ["StatefulPartitionedCall/Postprocessor/Slice", "StatefulPartitionedCall/Postprocessor/ExpandDims_1"]; -var inputSize7 = [[0, 0], [0, 0]]; -var classes = ["hand", "fist", "pinch", "point", "face", "tip", "pinchtip"]; -var faceIndex = 4; -var boxExpandFact = 1.6; -var maxDetectorResolution = 512; -var detectorExpandFact = 1.4; -var skipped8 = Number.MAX_SAFE_INTEGER; -var lastTime9 = 0; -var outputSize = [0, 0]; -var cache4 = { - boxes: [], - hands: [] -}; -var fingerMap = { - thumb: [1, 2, 3, 4], - index: [5, 6, 7, 8], - middle: [9, 10, 11, 12], - ring: [13, 14, 15, 16], - pinky: [17, 18, 19, 20], - base: [0], - palm: [0, 17, 13, 9, 5, 1, 0] -}; -async function loadDetect2(config3) { - var _a; - if (env.initial) - models3[0] = null; - if (!models3[0]) { - fakeOps(["tensorlistreserve", "enter", "tensorlistfromtensor", "merge", "loopcond", "switch", "exit", "tensorliststack", "nextiteration", "tensorlistsetitem", "tensorlistgetitem", "reciprocal", "shape", "split", "where"], config3); - models3[0] = await loadModel((_a = config3.hand.detector) == null ? void 0 : _a.modelPath); - const inputs = models3[0]["executor"] ? Object.values(models3[0].modelSignature["inputs"]) : void 0; - inputSize7[0][0] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[1].size) : 0; - inputSize7[0][1] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : 0; - } else if (config3.debug) - log("cached model:", models3[0]["modelUrl"]); - return models3[0]; -} -async function loadSkeleton(config3) { - var _a; - if (env.initial) - models3[1] = null; - if (!models3[1]) { - models3[1] = await loadModel((_a = config3.hand.skeleton) == null ? void 0 : _a.modelPath); - const inputs = models3[1]["executor"] ? Object.values(models3[1].modelSignature["inputs"]) : void 0; - inputSize7[1][0] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[1].size) : 0; - inputSize7[1][1] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : 0; - } else if (config3.debug) - log("cached model:", models3[1]["modelUrl"]); - return models3[1]; -} -async function detectHands(input, config3) { - const hands = []; - if (!input || !models3[0]) - return hands; - const t2 = {}; - const ratio2 = (input.shape[2] || 1) / (input.shape[1] || 1); - const height = Math.min(Math.round((input.shape[1] || 0) / 8) * 8, maxDetectorResolution); - const width = Math.round(height * ratio2 / 8) * 8; - t2.resize = tfjs_esm_exports.image.resizeBilinear(input, [height, width]); - t2.cast = tfjs_esm_exports.cast(t2.resize, "int32"); - [t2.rawScores, t2.rawBoxes] = await models3[0].executeAsync(t2.cast, modelOutputNodes); - t2.boxes = tfjs_esm_exports.squeeze(t2.rawBoxes, [0, 2]); - t2.scores = tfjs_esm_exports.squeeze(t2.rawScores, [0]); - const classScores = tfjs_esm_exports.unstack(t2.scores, 1); - tfjs_esm_exports.dispose(classScores[faceIndex]); - classScores.splice(faceIndex, 1); - t2.filtered = tfjs_esm_exports.stack(classScores, 1); - tfjs_esm_exports.dispose(classScores); - t2.max = tfjs_esm_exports.max(t2.filtered, 1); - t2.argmax = tfjs_esm_exports.argMax(t2.filtered, 1); - let id = 0; - t2.nms = await tfjs_esm_exports.image.nonMaxSuppressionAsync(t2.boxes, t2.max, (config3.hand.maxDetected || 0) + 1, config3.hand.iouThreshold || 0, config3.hand.minConfidence || 1); - const nms = await t2.nms.data(); - const scores = await t2.max.data(); - const classNum = await t2.argmax.data(); - for (const nmsIndex of Array.from(nms)) { - const boxSlice = tfjs_esm_exports.slice(t2.boxes, nmsIndex, 1); - const boxYX = await boxSlice.data(); - tfjs_esm_exports.dispose(boxSlice); - const boxData = [boxYX[1], boxYX[0], boxYX[3] - boxYX[1], boxYX[2] - boxYX[0]]; - const boxRaw = scale(boxData, detectorExpandFact); - const boxFull = [Math.trunc(boxData[0] * outputSize[0]), Math.trunc(boxData[1] * outputSize[1]), Math.trunc(boxData[2] * outputSize[0]), Math.trunc(boxData[3] * outputSize[1])]; - const score = scores[nmsIndex]; - const label = classes[classNum[nmsIndex]]; - const hand3 = { id: id++, score, box: boxFull, boxRaw, label }; - hands.push(hand3); - } - Object.keys(t2).forEach((tensor6) => tfjs_esm_exports.dispose(t2[tensor6])); - hands.sort((a, b) => b.score - a.score); - if (hands.length > (config3.hand.maxDetected || 1)) - hands.length = config3.hand.maxDetected || 1; - return hands; -} -async function detectFingers(input, h, config3) { - const hand3 = { - id: h.id, - score: Math.round(100 * h.score) / 100, - boxScore: Math.round(100 * h.score) / 100, - fingerScore: 0, - box: h.box, - boxRaw: h.boxRaw, - label: h.label, - keypoints: [], - landmarks: {}, - annotations: {} - }; - if (input && models3[1] && config3.hand.landmarks && h.score > (config3.hand.minConfidence || 0)) { - const t2 = {}; - const boxCrop = [h.boxRaw[1], h.boxRaw[0], h.boxRaw[3] + h.boxRaw[1], h.boxRaw[2] + h.boxRaw[0]]; - t2.crop = tfjs_esm_exports.image.cropAndResize(input, [boxCrop], [0], [inputSize7[1][0], inputSize7[1][1]], "bilinear"); - t2.div = tfjs_esm_exports.div(t2.crop, constants.tf255); - [t2.score, t2.keypoints] = models3[1].execute(t2.div, ["Identity_1", "Identity"]); - const rawScore = (await t2.score.data())[0]; - const score = (100 - Math.trunc(100 / (1 + Math.exp(rawScore)))) / 100; - if (score >= (config3.hand.minConfidence || 0)) { - hand3.fingerScore = score; - t2.reshaped = tfjs_esm_exports.reshape(t2.keypoints, [-1, 3]); - const coordsData = await t2.reshaped.array(); - const coordsRaw = coordsData.map((kpt4) => [kpt4[0] / inputSize7[1][1], kpt4[1] / inputSize7[1][0], kpt4[2] || 0]); - const coordsNorm = coordsRaw.map((kpt4) => [kpt4[0] * h.boxRaw[2], kpt4[1] * h.boxRaw[3], kpt4[2] || 0]); - hand3.keypoints = coordsNorm.map((kpt4) => [outputSize[0] * (kpt4[0] + h.boxRaw[0]), outputSize[1] * (kpt4[1] + h.boxRaw[1]), kpt4[2] || 0]); - hand3.landmarks = analyze(hand3.keypoints); - for (const key of Object.keys(fingerMap)) { - hand3.annotations[key] = fingerMap[key].map((index2) => hand3.landmarks && hand3.keypoints[index2] ? hand3.keypoints[index2] : null); - } - } - Object.keys(t2).forEach((tensor6) => tfjs_esm_exports.dispose(t2[tensor6])); - } - return hand3; -} -async function predict10(input, config3) { - var _a, _b; - if (!((_a = models3[0]) == null ? void 0 : _a["executor"]) || !((_b = models3[1]) == null ? void 0 : _b["executor"]) || !models3[0].inputs[0].shape || !models3[1].inputs[0].shape) - return []; - outputSize = [input.shape[2] || 0, input.shape[1] || 0]; - skipped8++; - const skipTime = (config3.hand.skipTime || 0) > now() - lastTime9; - const skipFrame = skipped8 < (config3.hand.skipFrames || 0); - if (config3.skipAllowed && skipTime && skipFrame) { - return cache4.hands; - } - return new Promise(async (resolve) => { - const skipTimeExtended = 3 * (config3.hand.skipTime || 0) > now() - lastTime9; - const skipFrameExtended = skipped8 < 3 * (config3.hand.skipFrames || 0); - if (config3.skipAllowed && cache4.hands.length === config3.hand.maxDetected) { - cache4.hands = await Promise.all(cache4.boxes.map((handBox) => detectFingers(input, handBox, config3))); - } else if (config3.skipAllowed && skipTimeExtended && skipFrameExtended && cache4.hands.length > 0) { - cache4.hands = await Promise.all(cache4.boxes.map((handBox) => detectFingers(input, handBox, config3))); - } else { - cache4.boxes = await detectHands(input, config3); - lastTime9 = now(); - cache4.hands = await Promise.all(cache4.boxes.map((handBox) => detectFingers(input, handBox, config3))); - skipped8 = 0; - } - const oldCache = [...cache4.boxes]; - cache4.boxes.length = 0; - if (config3.cacheSensitivity > 0) { - for (let i = 0; i < cache4.hands.length; i++) { - const boxKpt = square(cache4.hands[i].keypoints, outputSize); - if (boxKpt.box[2] / (input.shape[2] || 1) > 0.05 && boxKpt.box[3] / (input.shape[1] || 1) > 0.05 && cache4.hands[i].fingerScore && cache4.hands[i].fingerScore > (config3.hand.minConfidence || 0)) { - const boxScale = scale(boxKpt.box, boxExpandFact); - const boxScaleRaw = scale(boxKpt.boxRaw, boxExpandFact); - cache4.boxes.push({ ...oldCache[i], box: boxScale, boxRaw: boxScaleRaw }); - } - } - } - for (let i = 0; i < cache4.hands.length; i++) { - const bbox = calc(cache4.hands[i].keypoints, outputSize); - cache4.hands[i].box = bbox.box; - cache4.hands[i].boxRaw = bbox.boxRaw; - } - resolve(cache4.hands); - }); -} - -// src/face/insightface.ts -var model10; -var last6 = []; -var lastCount5 = 0; -var lastTime10 = 0; -var skipped9 = Number.MAX_SAFE_INTEGER; -async function load11(config3) { - if (env.initial) - model10 = null; - if (!model10) - model10 = await loadModel(config3.face["insightface"].modelPath); - else if (config3.debug) - log("cached model:", model10["modelUrl"]); - return model10; -} -async function predict11(input, config3, idx, count2) { - var _a, _b; - if (!(model10 == null ? void 0 : model10["executor"])) - return []; - const skipFrame = skipped9 < (((_a = config3.face["insightface"]) == null ? void 0 : _a.skipFrames) || 0); - const skipTime = (((_b = config3.face["insightface"]) == null ? void 0 : _b.skipTime) || 0) > now() - lastTime10; - if (config3.skipAllowed && skipTime && skipFrame && lastCount5 === count2 && last6[idx]) { - skipped9++; - return last6[idx]; - } - return new Promise(async (resolve) => { - var _a2; - let data = []; - if (((_a2 = config3.face["insightface"]) == null ? void 0 : _a2.enabled) && (model10 == null ? void 0 : model10.inputs[0].shape)) { - const t2 = {}; - t2.crop = tfjs_esm_exports.image.resizeBilinear(input, [model10.inputs[0].shape[2], model10.inputs[0].shape[1]], false); - t2.data = model10.execute(t2.crop); - const output = await t2.data.data(); - data = Array.from(output); - Object.keys(t2).forEach((tensor6) => tfjs_esm_exports.dispose(t2[tensor6])); - } - last6[idx] = data; - lastCount5 = count2; - lastTime10 = now(); - resolve(data); - }); -} - -// src/face/liveness.ts -var model11; -var cached2 = []; -var skipped10 = Number.MAX_SAFE_INTEGER; -var lastCount6 = 0; -var lastTime11 = 0; -async function load12(config3) { - var _a; - if (env.initial) - model11 = null; - if (!model11) - model11 = await loadModel((_a = config3.face.liveness) == null ? void 0 : _a.modelPath); - else if (config3.debug) - log("cached model:", model11["modelUrl"]); - return model11; -} -async function predict12(image27, config3, idx, count2) { - var _a, _b; - if (!(model11 == null ? void 0 : model11["executor"])) - return 0; - const skipTime = (((_a = config3.face.liveness) == null ? void 0 : _a.skipTime) || 0) > now() - lastTime11; - const skipFrame = skipped10 < (((_b = config3.face.liveness) == null ? void 0 : _b.skipFrames) || 0); - if (config3.skipAllowed && skipTime && skipFrame && lastCount6 === count2 && cached2[idx]) { - skipped10++; - return cached2[idx]; - } - skipped10 = 0; - return new Promise(async (resolve) => { - const resize = tfjs_esm_exports.image.resizeBilinear(image27, [(model11 == null ? void 0 : model11.inputs[0].shape) ? model11.inputs[0].shape[2] : 0, (model11 == null ? void 0 : model11.inputs[0].shape) ? model11.inputs[0].shape[1] : 0], false); - const res = model11 == null ? void 0 : model11.execute(resize); - const num = (await res.data())[0]; - cached2[idx] = Math.round(100 * num) / 100; - lastCount6 = count2; - lastTime11 = now(); - tfjs_esm_exports.dispose([resize, res]); - resolve(cached2[idx]); - }); -} - -// src/segmentation/meet.ts -var model12; -async function load13(config3) { - if (!model12 || env.initial) - model12 = await loadModel(config3.segmentation.modelPath); - else if (config3.debug) - log("cached model:", model12["modelUrl"]); - return model12; -} -async function predict13(input, config3) { - var _a; - if (!model12) - model12 = await load13(config3); - if (!(model12 == null ? void 0 : model12["executor"]) || !((_a = model12 == null ? void 0 : model12.inputs) == null ? void 0 : _a[0].shape)) - return null; - const t2 = {}; - t2.resize = tfjs_esm_exports.image.resizeBilinear(input, [model12.inputs[0].shape ? model12.inputs[0].shape[1] : 0, model12.inputs[0].shape ? model12.inputs[0].shape[2] : 0], false); - t2.norm = tfjs_esm_exports.div(t2.resize, constants.tf255); - t2.res = model12.execute(t2.norm); - t2.squeeze = tfjs_esm_exports.squeeze(t2.res, 0); - [t2.bgRaw, t2.fgRaw] = tfjs_esm_exports.unstack(t2.squeeze, 2); - t2.fg = tfjs_esm_exports.softmax(t2.fgRaw); - t2.mul = tfjs_esm_exports.mul(t2.fg, constants.tf255); - t2.expand = tfjs_esm_exports.expandDims(t2.mul, 2); - t2.output = tfjs_esm_exports.image.resizeBilinear(t2.expand, [input.shape[1], input.shape[2]]); - let rgba; - switch (config3.segmentation.mode || "default") { - case "default": - t2.input = tfjs_esm_exports.squeeze(input); - t2.concat = tfjs_esm_exports.concat([t2.input, t2.output], -1); - rgba = tfjs_esm_exports.cast(t2.concat, "int32"); - break; - case "alpha": - rgba = tfjs_esm_exports.cast(t2.output, "int32"); - break; - default: - rgba = tfjs_esm_exports.tensor(0); - } - Object.keys(t2).forEach((tensor6) => tfjs_esm_exports.dispose(t2[tensor6])); - return rgba; -} - -// src/face/mobilefacenet.ts -var model13; -var last7 = []; -var lastCount7 = 0; -var lastTime12 = 0; -var skipped11 = Number.MAX_SAFE_INTEGER; -async function load14(config3) { - var _a; - if (env.initial) - model13 = null; - if (!model13) - model13 = await loadModel((_a = config3.face["mobilefacenet"]) == null ? void 0 : _a.modelPath); - else if (config3.debug) - log("cached model:", model13["modelUrl"]); - return model13; -} -async function predict14(input, config3, idx, count2) { - var _a, _b; - if (!(model13 == null ? void 0 : model13["executor"])) - return []; - const skipFrame = skipped11 < (((_a = config3.face["mobilefacenet"]) == null ? void 0 : _a.skipFrames) || 0); - const skipTime = (((_b = config3.face["mobilefacenet"]) == null ? void 0 : _b.skipTime) || 0) > now() - lastTime12; - if (config3.skipAllowed && skipTime && skipFrame && lastCount7 === count2 && last7[idx]) { - skipped11++; - return last7[idx]; - } - return new Promise(async (resolve) => { - var _a2; - let data = []; - if (((_a2 = config3.face["mobilefacenet"]) == null ? void 0 : _a2.enabled) && (model13 == null ? void 0 : model13.inputs[0].shape)) { - const t2 = {}; - t2.crop = tfjs_esm_exports.image.resizeBilinear(input, [model13.inputs[0].shape[2], model13.inputs[0].shape[1]], false); - t2.data = model13.execute(t2.crop); - const output = await t2.data.data(); - data = Array.from(output); - Object.keys(t2).forEach((tensor6) => tfjs_esm_exports.dispose(t2[tensor6])); - } - last7[idx] = data; - lastCount7 = count2; - lastTime12 = now(); - resolve(data); - }); -} - -// src/body/movenetcoords.ts -var movenetcoords_exports = {}; -__export(movenetcoords_exports, { - connected: () => connected3, - horizontal: () => horizontal, - kpt: () => kpt3, - relative: () => relative, - vertical: () => vertical -}); -var kpt3 = [ - "nose", - "leftEye", - "rightEye", - "leftEar", - "rightEar", - "leftShoulder", - "rightShoulder", - "leftElbow", - "rightElbow", - "leftWrist", - "rightWrist", - "leftHip", - "rightHip", - "leftKnee", - "rightKnee", - "leftAnkle", - "rightAnkle" -]; -var horizontal = [ - ["leftEye", "rightEye"], - ["leftEar", "rightEar"], - ["leftShoulder", "rightShoulder"], - ["leftElbow", "rightElbow"], - ["leftWrist", "rightWrist"], - ["leftHip", "rightHip"], - ["leftKnee", "rightKnee"], - ["leftAnkle", "rightAnkle"] -]; -var vertical = [ - ["leftKnee", "leftShoulder"], - ["rightKnee", "rightShoulder"], - ["leftAnkle", "leftKnee"], - ["rightAnkle", "rightKnee"] -]; -var relative = [ - [["leftHip", "rightHip"], ["leftShoulder", "rightShoulder"]], - [["leftElbow", "rightElbow"], ["leftShoulder", "rightShoulder"]] -]; -var connected3 = { - leftLeg: ["leftHip", "leftKnee", "leftAnkle"], - rightLeg: ["rightHip", "rightKnee", "rightAnkle"], - torso: ["leftShoulder", "rightShoulder", "rightHip", "leftHip", "leftShoulder"], - leftArm: ["leftShoulder", "leftElbow", "leftWrist"], - rightArm: ["rightShoulder", "rightElbow", "rightWrist"], - head: [] -}; - -// src/body/movenetfix.ts -var maxJitter = 5e-3; -var cache5 = { - keypoints: [], - padding: [[0, 0], [0, 0], [0, 0], [0, 0]] -}; -function bodyParts(body4) { - for (const pair of horizontal) { - const left = body4.keypoints.findIndex((kp) => kp.part === pair[0]); - const right = body4.keypoints.findIndex((kp) => kp.part === pair[1]); - if (body4.keypoints[left] && body4.keypoints[right]) { - if (body4.keypoints[left].position[0] < body4.keypoints[right].position[0]) { - const tmp = body4.keypoints[left]; - body4.keypoints[left] = body4.keypoints[right]; - body4.keypoints[right] = tmp; - } - } - } - for (const pair of vertical) { - const lower = body4.keypoints.findIndex((kp) => kp && kp.part === pair[0]); - const higher = body4.keypoints.findIndex((kp) => kp && kp.part === pair[1]); - if (body4.keypoints[lower] && body4.keypoints[higher]) { - if (body4.keypoints[lower].position[1] < body4.keypoints[higher].position[1]) { - body4.keypoints.splice(lower, 1); - } - } - } - for (const [pair, compare2] of relative) { - const left = body4.keypoints.findIndex((kp) => kp && kp.part === pair[0]); - const right = body4.keypoints.findIndex((kp) => kp && kp.part === pair[1]); - const leftTo = body4.keypoints.findIndex((kp) => kp && kp.part === compare2[0]); - const rightTo = body4.keypoints.findIndex((kp) => kp && kp.part === compare2[1]); - if (!body4.keypoints[leftTo] || !body4.keypoints[rightTo]) - continue; - const distanceLeft = body4.keypoints[left] ? [ - Math.abs(body4.keypoints[leftTo].position[0] - body4.keypoints[left].position[0]), - Math.abs(body4.keypoints[rightTo].position[0] - body4.keypoints[left].position[0]) - ] : [0, 0]; - const distanceRight = body4.keypoints[right] ? [ - Math.abs(body4.keypoints[rightTo].position[0] - body4.keypoints[right].position[0]), - Math.abs(body4.keypoints[leftTo].position[0] - body4.keypoints[right].position[0]) - ] : [0, 0]; - if (distanceLeft[0] > distanceLeft[1] || distanceRight[0] > distanceRight[1]) { - const tmp = body4.keypoints[left]; - body4.keypoints[left] = body4.keypoints[right]; - body4.keypoints[right] = tmp; - } - } -} -function jitter(keypoints) { - for (let i = 0; i < keypoints.length; i++) { - if (keypoints[i] && cache5.keypoints[i]) { - const diff = [Math.abs(keypoints[i].positionRaw[0] - cache5.keypoints[i].positionRaw[0]), Math.abs(keypoints[i].positionRaw[1] - cache5.keypoints[i].positionRaw[1])]; - if (diff[0] < maxJitter && diff[1] < maxJitter) { - keypoints[i] = cache5.keypoints[i]; - } else { - cache5.keypoints[i] = keypoints[i]; - } - } else { - cache5.keypoints[i] = keypoints[i]; - } - } - return keypoints; -} -function padInput(input, inputSize10) { - var _a, _b; - const t2 = {}; - if (!((_a = input == null ? void 0 : input.shape) == null ? void 0 : _a[1]) || !((_b = input == null ? void 0 : input.shape) == null ? void 0 : _b[2])) - return input; - cache5.padding = [ - [0, 0], - [input.shape[2] > input.shape[1] ? Math.trunc((input.shape[2] - input.shape[1]) / 2) : 0, input.shape[2] > input.shape[1] ? Math.trunc((input.shape[2] - input.shape[1]) / 2) : 0], - [input.shape[1] > input.shape[2] ? Math.trunc((input.shape[1] - input.shape[2]) / 2) : 0, input.shape[1] > input.shape[2] ? Math.trunc((input.shape[1] - input.shape[2]) / 2) : 0], - [0, 0] - ]; - t2.pad = tfjs_esm_exports.pad(input, cache5.padding); - t2.resize = tfjs_esm_exports.image.resizeBilinear(t2.pad, [inputSize10, inputSize10]); - const final = tfjs_esm_exports.cast(t2.resize, "int32"); - Object.keys(t2).forEach((tensor6) => tfjs_esm_exports.dispose(t2[tensor6])); - return final; -} -function rescaleBody(body4, outputSize2) { - body4.keypoints = body4.keypoints.filter((kpt4) => kpt4 == null ? void 0 : kpt4.position); - for (const kpt4 of body4.keypoints) { - kpt4.position = [ - kpt4.position[0] * (outputSize2[0] + cache5.padding[2][0] + cache5.padding[2][1]) / outputSize2[0] - cache5.padding[2][0], - kpt4.position[1] * (outputSize2[1] + cache5.padding[1][0] + cache5.padding[1][1]) / outputSize2[1] - cache5.padding[1][0] - ]; - kpt4.positionRaw = [ - kpt4.position[0] / outputSize2[0], - kpt4.position[1] / outputSize2[1] - ]; - } - const rescaledBoxes = calc(body4.keypoints.map((pt) => pt.position), outputSize2); - body4.box = rescaledBoxes.box; - body4.boxRaw = rescaledBoxes.boxRaw; - return body4; -} - -// src/body/movenet.ts -var model14; -var inputSize8 = 0; -var skipped12 = Number.MAX_SAFE_INTEGER; -var cache6 = { - boxes: [], - bodies: [], - last: 0 -}; -async function load15(config3) { - var _a; - if (env.initial) - model14 = null; - if (!model14) { - fakeOps(["size"], config3); - model14 = await loadModel(config3.body.modelPath); - } else if (config3.debug) - log("cached model:", model14["modelUrl"]); - inputSize8 = (model14 == null ? void 0 : model14["executor"]) && ((_a = model14 == null ? void 0 : model14.inputs) == null ? void 0 : _a[0].shape) ? model14.inputs[0].shape[2] : 0; - if (inputSize8 < 64) - inputSize8 = 256; - return model14; -} -function parseSinglePose(res, config3, image27) { - const kpt4 = res[0][0]; - const keypoints = []; - let score = 0; - for (let id = 0; id < kpt4.length; id++) { - score = kpt4[id][2]; - if (score > config3.body.minConfidence) { - const positionRaw = [kpt4[id][1], kpt4[id][0]]; - keypoints.push({ - score: Math.round(100 * score) / 100, - part: kpt3[id], - positionRaw, - position: [ - Math.round((image27.shape[2] || 0) * positionRaw[0]), - Math.round((image27.shape[1] || 0) * positionRaw[1]) - ] - }); - } - } - score = keypoints.reduce((prev, curr) => curr.score > prev ? curr.score : prev, 0); - const bodies = []; - const newBox = calc(keypoints.map((pt) => pt.position), [image27.shape[2], image27.shape[1]]); - const annotations2 = {}; - for (const [name, indexes] of Object.entries(connected3)) { - const pt = []; - for (let i = 0; i < indexes.length - 1; i++) { - const pt0 = keypoints.find((kp) => kp.part === indexes[i]); - const pt1 = keypoints.find((kp) => kp.part === indexes[i + 1]); - if (pt0 && pt1 && pt0.score > (config3.body.minConfidence || 0) && pt1.score > (config3.body.minConfidence || 0)) - pt.push([pt0.position, pt1.position]); - } - annotations2[name] = pt; - } - const body4 = { id: 0, score, box: newBox.box, boxRaw: newBox.boxRaw, keypoints, annotations: annotations2 }; - bodyParts(body4); - bodies.push(body4); - return bodies; -} -function parseMultiPose(res, config3, image27) { - const bodies = []; - for (let id = 0; id < res[0].length; id++) { - const kpt4 = res[0][id]; - const totalScore = Math.round(100 * kpt4[51 + 4]) / 100; - if (totalScore > config3.body.minConfidence) { - const keypoints = []; - for (let i = 0; i < 17; i++) { - const score = kpt4[3 * i + 2]; - if (score > config3.body.minConfidence) { - const positionRaw = [kpt4[3 * i + 1], kpt4[3 * i + 0]]; - keypoints.push({ - part: kpt3[i], - score: Math.round(100 * score) / 100, - positionRaw, - position: [Math.round((image27.shape[2] || 0) * positionRaw[0]), Math.round((image27.shape[1] || 0) * positionRaw[1])] - }); - } - } - const newBox = calc(keypoints.map((pt) => pt.position), [image27.shape[2], image27.shape[1]]); - const annotations2 = {}; - for (const [name, indexes] of Object.entries(connected3)) { - const pt = []; - for (let i = 0; i < indexes.length - 1; i++) { - const pt0 = keypoints.find((kp) => kp.part === indexes[i]); - const pt1 = keypoints.find((kp) => kp.part === indexes[i + 1]); - if (pt0 && pt1 && pt0.score > (config3.body.minConfidence || 0) && pt1.score > (config3.body.minConfidence || 0)) - pt.push([pt0.position, pt1.position]); - } - annotations2[name] = pt; - } - const body4 = { id, score: totalScore, box: newBox.box, boxRaw: newBox.boxRaw, keypoints: [...keypoints], annotations: annotations2 }; - bodyParts(body4); - bodies.push(body4); - } - } - bodies.sort((a, b) => b.score - a.score); - if (bodies.length > config3.body.maxDetected) - bodies.length = config3.body.maxDetected; - return bodies; -} -async function predict15(input, config3) { - var _a; - if (!(model14 == null ? void 0 : model14["executor"]) || !((_a = model14 == null ? void 0 : model14.inputs) == null ? void 0 : _a[0].shape)) - return []; - if (!config3.skipAllowed) - cache6.boxes.length = 0; - skipped12++; - const skipTime = (config3.body.skipTime || 0) > now() - cache6.last; - const skipFrame = skipped12 < (config3.body.skipFrames || 0); - if (config3.skipAllowed && skipTime && skipFrame) { - return cache6.bodies; - } - return new Promise(async (resolve) => { - const t2 = {}; - skipped12 = 0; - t2.input = padInput(input, inputSize8); - t2.res = model14 == null ? void 0 : model14.execute(t2.input); - cache6.last = now(); - const res = await t2.res.array(); - cache6.bodies = t2.res.shape[2] === 17 ? parseSinglePose(res, config3, input) : parseMultiPose(res, config3, input); - for (const body4 of cache6.bodies) { - rescaleBody(body4, [input.shape[2] || 1, input.shape[1] || 1]); - jitter(body4.keypoints); - } - Object.keys(t2).forEach((tensor6) => tfjs_esm_exports.dispose(t2[tensor6])); - resolve(cache6.bodies); - }); -} - -// src/object/nanodet.ts -var model15; -var last8 = []; -var lastTime13 = 0; -var skipped13 = Number.MAX_SAFE_INTEGER; -var inputSize9 = 0; -var scaleBox = 2.5; -async function load16(config3) { - if (!model15 || env.initial) { - model15 = await loadModel(config3.object.modelPath); - const inputs = (model15 == null ? void 0 : model15["executor"]) ? Object.values(model15.modelSignature["inputs"]) : void 0; - inputSize9 = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : 416; - } else if (config3.debug) - log("cached model:", model15["modelUrl"]); - return model15; -} -async function process4(res, outputShape, config3) { - let id = 0; - let results = []; - const size2 = inputSize9; - for (const strideSize of [1, 2, 4]) { - const baseSize = strideSize * 13; - const scoresT = tfjs_esm_exports.squeeze(res.find((a) => a.shape[1] === baseSize ** 2 && (a.shape[2] || 0) === labels.length)); - const scores = await scoresT.array(); - const featuresT = tfjs_esm_exports.squeeze(res.find((a) => a.shape[1] === baseSize ** 2 && (a.shape[2] || 0) < labels.length)); - const boxesMaxT = featuresT.reshape([-1, 4, featuresT.shape[1] / 4]); - const boxIdxT = boxesMaxT.argMax(2); - const boxIdx = await boxIdxT.array(); - for (let i = 0; i < scoresT.shape[0]; i++) { - for (let j = 0; j < scoresT.shape[1]; j++) { - const score = scores[i][j]; - if (score > (config3.object.minConfidence || 0) && j !== 61) { - const cx = (0.5 + Math.trunc(i % baseSize)) / baseSize; - const cy = (0.5 + Math.trunc(i / baseSize)) / baseSize; - const boxOffset = boxIdx[i].map((a) => a * (baseSize / strideSize / size2)); - const [x, y] = [ - cx - scaleBox / strideSize * boxOffset[0], - cy - scaleBox / strideSize * boxOffset[1] - ]; - const [w, h] = [ - cx + scaleBox / strideSize * boxOffset[2] - x, - cy + scaleBox / strideSize * boxOffset[3] - y - ]; - let boxRaw = [x, y, w, h]; - boxRaw = boxRaw.map((a) => Math.max(0, Math.min(a, 1))); - const box = [ - boxRaw[0] * outputShape[0], - boxRaw[1] * outputShape[1], - boxRaw[2] * outputShape[0], - boxRaw[3] * outputShape[1] - ]; - const result = { - id: id++, - score: Math.round(100 * score) / 100, - class: j + 1, - label: labels[j].label, - box: box.map((a) => Math.trunc(a)), - boxRaw - }; - results.push(result); - } - } - } - tfjs_esm_exports.dispose([scoresT, featuresT, boxesMaxT, boxIdxT]); - } - const nmsBoxes = results.map((a) => [a.boxRaw[1], a.boxRaw[0], a.boxRaw[3], a.boxRaw[2]]); - const nmsScores = results.map((a) => a.score); - let nmsIdx = []; - if (nmsBoxes && nmsBoxes.length > 0) { - const nms = await tfjs_esm_exports.image.nonMaxSuppressionAsync(nmsBoxes, nmsScores, config3.object.maxDetected, config3.object.iouThreshold, config3.object.minConfidence); - nmsIdx = await nms.data(); - tfjs_esm_exports.dispose(nms); - } - results = results.filter((_val, idx) => nmsIdx.includes(idx)).sort((a, b) => b.score - a.score); - return results; -} -async function predict16(image27, config3) { - if (!(model15 == null ? void 0 : model15["executor"])) - return []; - const skipTime = (config3.object.skipTime || 0) > now() - lastTime13; - const skipFrame = skipped13 < (config3.object.skipFrames || 0); - if (config3.skipAllowed && skipTime && skipFrame && last8.length > 0) { - skipped13++; - return last8; - } - skipped13 = 0; - if (!env.kernels.includes("mod") || !env.kernels.includes("sparsetodense")) - return last8; - return new Promise(async (resolve) => { - const outputSize2 = [image27.shape[2] || 0, image27.shape[1] || 0]; - const resizeT = tfjs_esm_exports.image.resizeBilinear(image27, [inputSize9, inputSize9], false); - const normT = tfjs_esm_exports.div(resizeT, constants.tf255); - const transposeT = tfjs_esm_exports.transpose(normT, [0, 3, 1, 2]); - let objectT; - if (config3.object.enabled) - objectT = model15.execute(transposeT); - lastTime13 = now(); - const obj = await process4(objectT, outputSize2, config3); - last8 = obj; - tfjs_esm_exports.dispose([resizeT, normT, transposeT, ...objectT]); - resolve(obj); - }); -} - -// src/body/posenetutils.ts -var partNames = [ - "nose", - "leftEye", - "rightEye", - "leftEar", - "rightEar", - "leftShoulder", - "rightShoulder", - "leftElbow", - "rightElbow", - "leftWrist", - "rightWrist", - "leftHip", - "rightHip", - "leftKnee", - "rightKnee", - "leftAnkle", - "rightAnkle" -]; -var count = partNames.length; -var partIds = partNames.reduce((result, jointName, i) => { - result[jointName] = i; - return result; -}, {}); -var connectedPartNames = [ - ["leftHip", "leftShoulder"], - ["leftElbow", "leftShoulder"], - ["leftElbow", "leftWrist"], - ["leftHip", "leftKnee"], - ["leftKnee", "leftAnkle"], - ["rightHip", "rightShoulder"], - ["rightElbow", "rightShoulder"], - ["rightElbow", "rightWrist"], - ["rightHip", "rightKnee"], - ["rightKnee", "rightAnkle"], - ["leftShoulder", "rightShoulder"], - ["leftHip", "rightHip"] -]; -var connectedPartIndices = connectedPartNames.map(([jointNameA, jointNameB]) => [partIds[jointNameA], partIds[jointNameB]]); -var poseChain = [ - ["nose", "leftEye"], - ["leftEye", "leftEar"], - ["nose", "rightEye"], - ["rightEye", "rightEar"], - ["nose", "leftShoulder"], - ["leftShoulder", "leftElbow"], - ["leftElbow", "leftWrist"], - ["leftShoulder", "leftHip"], - ["leftHip", "leftKnee"], - ["leftKnee", "leftAnkle"], - ["nose", "rightShoulder"], - ["rightShoulder", "rightElbow"], - ["rightElbow", "rightWrist"], - ["rightShoulder", "rightHip"], - ["rightHip", "rightKnee"], - ["rightKnee", "rightAnkle"] -]; -function getBoundingBox(keypoints) { - const coord = keypoints.reduce(({ maxX, maxY, minX, minY }, { position: { x, y } }) => ({ - maxX: Math.max(maxX, x), - maxY: Math.max(maxY, y), - minX: Math.min(minX, x), - minY: Math.min(minY, y) - }), { - maxX: Number.NEGATIVE_INFINITY, - maxY: Number.NEGATIVE_INFINITY, - minX: Number.POSITIVE_INFINITY, - minY: Number.POSITIVE_INFINITY - }); - return [coord.minX, coord.minY, coord.maxX - coord.minX, coord.maxY - coord.minY]; -} -function scalePoses(poses, [height, width], [inputResolutionHeight, inputResolutionWidth]) { - const scaleY = height / inputResolutionHeight; - const scaleX = width / inputResolutionWidth; - const scalePose = (pose, i) => ({ - id: i, - score: pose.score, - boxRaw: [pose.box[0] / inputResolutionWidth, pose.box[1] / inputResolutionHeight, pose.box[2] / inputResolutionWidth, pose.box[3] / inputResolutionHeight], - box: [Math.trunc(pose.box[0] * scaleX), Math.trunc(pose.box[1] * scaleY), Math.trunc(pose.box[2] * scaleX), Math.trunc(pose.box[3] * scaleY)], - keypoints: pose.keypoints.map(({ score, part, position }) => ({ - score, - part, - position: [Math.trunc(position.x * scaleX), Math.trunc(position.y * scaleY)], - positionRaw: [position.x / inputResolutionHeight, position.y / inputResolutionHeight] - })), - annotations: {} - }); - const scaledPoses = poses.map((pose, i) => scalePose(pose, i)); - return scaledPoses; -} -var MaxHeap = class { - constructor(maxSize2, getElementValue) { - __publicField(this, "priorityQueue"); - __publicField(this, "numberOfElements"); - __publicField(this, "getElementValue"); - this.priorityQueue = new Array(maxSize2); - this.numberOfElements = -1; - this.getElementValue = getElementValue; - } - enqueue(x) { - this.priorityQueue[++this.numberOfElements] = x; - this.swim(this.numberOfElements); - } - dequeue() { - const max4 = this.priorityQueue[0]; - this.exchange(0, this.numberOfElements--); - this.sink(0); - this.priorityQueue[this.numberOfElements + 1] = null; - return max4; - } - empty() { - return this.numberOfElements === -1; - } - size() { - return this.numberOfElements + 1; - } - all() { - return this.priorityQueue.slice(0, this.numberOfElements + 1); - } - max() { - return this.priorityQueue[0]; - } - swim(k) { - while (k > 0 && this.less(Math.floor(k / 2), k)) { - this.exchange(k, Math.floor(k / 2)); - k = Math.floor(k / 2); - } - } - sink(k) { - while (2 * k <= this.numberOfElements) { - let j = 2 * k; - if (j < this.numberOfElements && this.less(j, j + 1)) - j++; - if (!this.less(k, j)) - break; - this.exchange(k, j); - k = j; - } - } - getValueAt(i) { - return this.getElementValue(this.priorityQueue[i]); - } - less(i, j) { - return this.getValueAt(i) < this.getValueAt(j); - } - exchange(i, j) { - const t2 = this.priorityQueue[i]; - this.priorityQueue[i] = this.priorityQueue[j]; - this.priorityQueue[j] = t2; - } -}; -function getOffsetPoint(y, x, keypoint, offsets) { - return { - y: offsets.get(y, x, keypoint), - x: offsets.get(y, x, keypoint + count) - }; -} -function getImageCoords(part, outputStride2, offsets) { - const { heatmapY, heatmapX, id: keypoint } = part; - const { y, x } = getOffsetPoint(heatmapY, heatmapX, keypoint, offsets); - return { - x: part.heatmapX * outputStride2 + x, - y: part.heatmapY * outputStride2 + y - }; -} -function clamp(a, min2, max4) { - if (a < min2) - return min2; - if (a > max4) - return max4; - return a; -} -function squaredDistance(y1, x1, y2, x2) { - const dy = y2 - y1; - const dx = x2 - x1; - return dy * dy + dx * dx; -} -function addVectors(a, b) { - return { x: a.x + b.x, y: a.y + b.y }; -} - -// src/body/posenet.ts -var model16; -var poseNetOutputs = ["MobilenetV1/offset_2/BiasAdd", "MobilenetV1/heatmap_2/BiasAdd", "MobilenetV1/displacement_fwd_2/BiasAdd", "MobilenetV1/displacement_bwd_2/BiasAdd"]; -var localMaximumRadius = 1; -var outputStride = 16; -var squaredNmsRadius = 50 ** 2; -function traverse(edgeId, sourceKeypoint, targetId, scores, offsets, displacements, offsetRefineStep = 2) { - const getDisplacement = (point2) => ({ - y: displacements.get(point2.y, point2.x, edgeId), - x: displacements.get(point2.y, point2.x, displacements.shape[2] / 2 + edgeId) - }); - const getStridedIndexNearPoint = (point2, height2, width2) => ({ - y: clamp(Math.round(point2.y / outputStride), 0, height2 - 1), - x: clamp(Math.round(point2.x / outputStride), 0, width2 - 1) - }); - const [height, width] = scores.shape; - const sourceKeypointIndices = getStridedIndexNearPoint(sourceKeypoint.position, height, width); - const displacement = getDisplacement(sourceKeypointIndices); - const displacedPoint = addVectors(sourceKeypoint.position, displacement); - let targetKeypoint = displacedPoint; - for (let i = 0; i < offsetRefineStep; i++) { - const targetKeypointIndices = getStridedIndexNearPoint(targetKeypoint, height, width); - const offsetPoint = getOffsetPoint(targetKeypointIndices.y, targetKeypointIndices.x, targetId, offsets); - targetKeypoint = addVectors( - { x: targetKeypointIndices.x * outputStride, y: targetKeypointIndices.y * outputStride }, - { x: offsetPoint.x, y: offsetPoint.y } - ); - } - const targetKeyPointIndices = getStridedIndexNearPoint(targetKeypoint, height, width); - const score = scores.get(targetKeyPointIndices.y, targetKeyPointIndices.x, targetId); - return { position: targetKeypoint, part: partNames[targetId], score }; -} -function decodePose(root, scores, offsets, displacementsFwd, displacementsBwd) { - const tuples = poseChain.map(([parentJoinName, childJoinName]) => [partIds[parentJoinName], partIds[childJoinName]]); - const edgesFwd = tuples.map(([, childJointId]) => childJointId); - const edgesBwd = tuples.map(([parentJointId]) => parentJointId); - const numParts = scores.shape[2]; - const numEdges = edgesFwd.length; - const keypoints = new Array(numParts); - const rootPoint = getImageCoords(root.part, outputStride, offsets); - keypoints[root.part.id] = { - score: root.score, - part: partNames[root.part.id], - position: rootPoint - }; - for (let edge = numEdges - 1; edge >= 0; --edge) { - const sourceId = edgesFwd[edge]; - const targetId = edgesBwd[edge]; - if (keypoints[sourceId] && !keypoints[targetId]) { - keypoints[targetId] = traverse(edge, keypoints[sourceId], targetId, scores, offsets, displacementsBwd); - } - } - for (let edge = 0; edge < numEdges; ++edge) { - const sourceId = edgesBwd[edge]; - const targetId = edgesFwd[edge]; - if (keypoints[sourceId] && !keypoints[targetId]) { - keypoints[targetId] = traverse(edge, keypoints[sourceId], targetId, scores, offsets, displacementsFwd); - } - } - return keypoints; -} -function scoreIsMaximumInLocalWindow(keypointId, score, heatmapY, heatmapX, scores) { - const [height, width] = scores.shape; - let localMaximum = true; - const yStart = Math.max(heatmapY - localMaximumRadius, 0); - const yEnd = Math.min(heatmapY + localMaximumRadius + 1, height); - for (let yCurrent = yStart; yCurrent < yEnd; ++yCurrent) { - const xStart = Math.max(heatmapX - localMaximumRadius, 0); - const xEnd = Math.min(heatmapX + localMaximumRadius + 1, width); - for (let xCurrent = xStart; xCurrent < xEnd; ++xCurrent) { - if (scores.get(yCurrent, xCurrent, keypointId) > score) { - localMaximum = false; - break; - } - } - if (!localMaximum) - break; - } - return localMaximum; -} -function buildPartWithScoreQueue(minConfidence2, scores) { - const [height, width, numKeypoints] = scores.shape; - const queue = new MaxHeap(height * width * numKeypoints, ({ score }) => score); - for (let heatmapY = 0; heatmapY < height; ++heatmapY) { - for (let heatmapX = 0; heatmapX < width; ++heatmapX) { - for (let keypointId = 0; keypointId < numKeypoints; ++keypointId) { - const score = scores.get(heatmapY, heatmapX, keypointId); - if (score < minConfidence2) - continue; - if (scoreIsMaximumInLocalWindow(keypointId, score, heatmapY, heatmapX, scores)) - queue.enqueue({ score, part: { heatmapY, heatmapX, id: keypointId } }); - } - } - } - return queue; -} -function withinRadius(poses, { x, y }, keypointId) { - return poses.some(({ keypoints }) => { - var _a; - const correspondingKeypoint = (_a = keypoints[keypointId]) == null ? void 0 : _a.position; - if (!correspondingKeypoint) - return false; - return squaredDistance(y, x, correspondingKeypoint.y, correspondingKeypoint.x) <= squaredNmsRadius; - }); -} -function getInstanceScore(existingPoses, keypoints) { - const notOverlappedKeypointScores = keypoints.reduce((result, { position, score }, keypointId) => { - if (!withinRadius(existingPoses, position, keypointId)) - result += score; - return result; - }, 0); - return notOverlappedKeypointScores / keypoints.length; -} -function decode(offsets, scores, displacementsFwd, displacementsBwd, maxDetected, minConfidence2) { - const poses = []; - const queue = buildPartWithScoreQueue(minConfidence2, scores); - while (poses.length < maxDetected && !queue.empty()) { - const root = queue.dequeue(); - const rootImageCoords = getImageCoords(root.part, outputStride, offsets); - if (withinRadius(poses, rootImageCoords, root.part.id)) - continue; - let keypoints = decodePose(root, scores, offsets, displacementsFwd, displacementsBwd); - keypoints = keypoints.filter((a) => a.score > minConfidence2); - const score = getInstanceScore(poses, keypoints); - const box = getBoundingBox(keypoints); - if (score > minConfidence2) - poses.push({ keypoints, box, score: Math.round(100 * score) / 100 }); - } - return poses; -} -async function predict17(input, config3) { - if (!(model16 == null ? void 0 : model16["executor"])) - return []; - const res = tfjs_esm_exports.tidy(() => { - if (!model16.inputs[0].shape) - return []; - const resized = tfjs_esm_exports.image.resizeBilinear(input, [model16.inputs[0].shape[2], model16.inputs[0].shape[1]]); - const normalized = tfjs_esm_exports.sub(tfjs_esm_exports.div(tfjs_esm_exports.cast(resized, "float32"), 127.5), 1); - const results = model16.execute(normalized, poseNetOutputs); - const results3d = results.map((y) => tfjs_esm_exports.squeeze(y, [0])); - results3d[1] = tfjs_esm_exports.sigmoid(results3d[1]); - return results3d; - }); - const buffers = await Promise.all(res.map((tensor6) => tensor6.buffer())); - for (const t2 of res) - tfjs_esm_exports.dispose(t2); - const decoded = decode(buffers[0], buffers[1], buffers[2], buffers[3], config3.body.maxDetected, config3.body.minConfidence); - if (!model16.inputs[0].shape) - return []; - const scaled = scalePoses(decoded, [input.shape[1], input.shape[2]], [model16.inputs[0].shape[2], model16.inputs[0].shape[1]]); - return scaled; -} -async function load17(config3) { - if (!model16 || env.initial) - model16 = await loadModel(config3.body.modelPath); - else if (config3.debug) - log("cached model:", model16["modelUrl"]); - return model16; -} - -// src/segmentation/rvm.ts -var model17; -var outputNodes2 = ["fgr", "pha", "r1o", "r2o", "r3o", "r4o"]; -var t = {}; -var ratio = 0; -function init2(config3) { - tfjs_esm_exports.dispose([t.r1i, t.r2i, t.r3i, t.r4i, t.downsample_ratio]); - t.r1i = tfjs_esm_exports.tensor(0); - t.r2i = tfjs_esm_exports.tensor(0); - t.r3i = tfjs_esm_exports.tensor(0); - t.r4i = tfjs_esm_exports.tensor(0); - ratio = config3.segmentation.ratio || 0.5; - t.downsample_ratio = tfjs_esm_exports.tensor(ratio); -} -async function load18(config3) { - if (!model17 || env.initial) - model17 = await loadModel(config3.segmentation.modelPath); - else if (config3.debug) - log("cached model:", model17["modelUrl"]); - init2(config3); - return model17; -} -var normalize = (r) => tfjs_esm_exports.tidy(() => { - const squeeze14 = tfjs_esm_exports.squeeze(r, [0]); - const mul15 = tfjs_esm_exports.mul(squeeze14, constants.tf255); - const cast8 = tfjs_esm_exports.cast(mul15, "int32"); - return cast8; -}); -function getRGBA(fgr, pha) { - const rgb2 = fgr ? normalize(fgr) : tfjs_esm_exports.fill([pha.shape[1] || 0, pha.shape[2] || 0, 3], 255, "int32"); - const a = pha ? normalize(pha) : tfjs_esm_exports.fill([fgr.shape[1] || 0, fgr.shape[2] || 0, 1], 255, "int32"); - const rgba = tfjs_esm_exports.concat([rgb2, a], -1); - tfjs_esm_exports.dispose([rgb2, a]); - return rgba; -} -function getState(state) { - return tfjs_esm_exports.tidy(() => { - const r = {}; - r.unstack = tfjs_esm_exports.unstack(state, -1); - r.concat = tfjs_esm_exports.concat(r.unstack, 1); - r.split = tfjs_esm_exports.split(r.concat, 4, 1); - r.stack = tfjs_esm_exports.concat(r.split, 2); - r.squeeze = tfjs_esm_exports.squeeze(r.stack, [0]); - r.expand = tfjs_esm_exports.expandDims(r.squeeze, -1); - r.add = tfjs_esm_exports.add(r.expand, 1); - r.mul = tfjs_esm_exports.mul(r.add, 127.5); - r.cast = tfjs_esm_exports.cast(r.mul, "int32"); - r.tile = tfjs_esm_exports.tile(r.cast, [1, 1, 3]); - r.alpha = tfjs_esm_exports.fill([r.tile.shape[0] || 0, r.tile.shape[1] || 0, 1], 255, "int32"); - return tfjs_esm_exports.concat([r.tile, r.alpha], -1); - }); -} -async function predict18(input, config3) { - if (!model17) - model17 = await load18(config3); - if (!(model17 == null ? void 0 : model17["executor"])) - return null; - t.src = tfjs_esm_exports.div(input, 255); - if (ratio !== config3.segmentation.ratio) - init2(config3); - const [fgr, pha, r1o, r2o, r3o, r4o] = await model17.executeAsync(t, outputNodes2); - let rgba; - switch (config3.segmentation.mode || "default") { - case "default": - rgba = getRGBA(fgr, pha); - break; - case "alpha": - rgba = getRGBA(null, pha); - break; - case "foreground": - rgba = getRGBA(fgr, null); - break; - case "state": - rgba = getState(r1o); - break; - default: - rgba = tfjs_esm_exports.tensor(0); - } - tfjs_esm_exports.dispose([t.src, fgr, pha, t.r1i, t.r2i, t.r3i, t.r4i]); - [t.r1i, t.r2i, t.r3i, t.r4i] = [r1o, r2o, r3o, r4o]; - return rgba; -} - -// src/segmentation/selfie.ts -var model18; -async function load19(config3) { - if (!model18 || env.initial) - model18 = await loadModel(config3.segmentation.modelPath); - else if (config3.debug) - log("cached model:", model18["modelUrl"]); - return model18; -} -async function predict19(input, config3) { - var _a; - if (!model18) - model18 = await load19(config3); - if (!(model18 == null ? void 0 : model18["executor"]) || !((_a = model18 == null ? void 0 : model18.inputs) == null ? void 0 : _a[0].shape)) - return null; - const t2 = {}; - t2.resize = tfjs_esm_exports.image.resizeBilinear(input, [model18.inputs[0].shape ? model18.inputs[0].shape[1] : 0, model18.inputs[0].shape ? model18.inputs[0].shape[2] : 0], false); - t2.norm = tfjs_esm_exports.div(t2.resize, constants.tf255); - t2.res = model18.execute(t2.norm); - t2.squeeze = tfjs_esm_exports.squeeze(t2.res, 0); - t2.alpha = tfjs_esm_exports.image.resizeBilinear(t2.squeeze, [input.shape[1], input.shape[2]]); - t2.mul = tfjs_esm_exports.mul(t2.alpha, constants.tf255); - let rgba; - switch (config3.segmentation.mode || "default") { - case "default": - t2.input = tfjs_esm_exports.squeeze(input); - t2.concat = tfjs_esm_exports.concat([t2.input, t2.mul], -1); - rgba = tfjs_esm_exports.cast(t2.concat, "int32"); - break; - case "alpha": - rgba = tfjs_esm_exports.cast(t2.mul, "int32"); - break; - default: - rgba = tfjs_esm_exports.tensor(0); - } - Object.keys(t2).forEach((tensor6) => tfjs_esm_exports.dispose(t2[tensor6])); - return rgba; -} - -// src/gear/ssrnet-age.ts -var model19; -var last9 = []; -var lastCount8 = 0; -var lastTime14 = 0; -var skipped14 = Number.MAX_SAFE_INTEGER; -async function load20(config3) { - if (env.initial) - model19 = null; - if (!model19) - model19 = await loadModel(config3.face["ssrnet"].modelPathAge); - else if (config3.debug) - log("cached model:", model19["modelUrl"]); - return model19; -} -async function predict20(image27, config3, idx, count2) { - var _a, _b, _c, _d; - if (!model19) - return { age: 0 }; - const skipFrame = skipped14 < (((_a = config3.face["ssrnet"]) == null ? void 0 : _a.skipFrames) || 0); - const skipTime = (((_b = config3.face["ssrnet"]) == null ? void 0 : _b.skipTime) || 0) > now() - lastTime14; - if (config3.skipAllowed && skipFrame && skipTime && lastCount8 === count2 && ((_c = last9[idx]) == null ? void 0 : _c.age) && ((_d = last9[idx]) == null ? void 0 : _d.age) > 0) { - skipped14++; - return last9[idx]; - } - skipped14 = 0; - return new Promise(async (resolve) => { - var _a2; - if (!(model19 == null ? void 0 : model19.inputs) || !model19.inputs[0] || !model19.inputs[0].shape) - return; - const t2 = {}; - t2.resize = tfjs_esm_exports.image.resizeBilinear(image27, [model19.inputs[0].shape[2], model19.inputs[0].shape[1]], false); - t2.enhance = tfjs_esm_exports.mul(t2.resize, constants.tf255); - const obj = { age: 0 }; - if ((_a2 = config3.face["ssrnet"]) == null ? void 0 : _a2.enabled) - t2.age = model19.execute(t2.enhance); - if (t2.age) { - const data = await t2.age.data(); - obj.age = Math.trunc(10 * data[0]) / 10; - } - Object.keys(t2).forEach((tensor6) => tfjs_esm_exports.dispose(t2[tensor6])); - last9[idx] = obj; - lastCount8 = count2; - lastTime14 = now(); - resolve(obj); - }); -} - -// src/gear/ssrnet-gender.ts -var model20; -var last10 = []; -var lastCount9 = 0; -var lastTime15 = 0; -var skipped15 = Number.MAX_SAFE_INTEGER; -var rgb = [0.2989, 0.587, 0.114]; -async function load21(config3) { - var _a; - if (env.initial) - model20 = null; - if (!model20) - model20 = await loadModel((_a = config3.face["ssrnet"]) == null ? void 0 : _a.modelPathGender); - else if (config3.debug) - log("cached model:", model20["modelUrl"]); - return model20; -} -async function predict21(image27, config3, idx, count2) { - var _a, _b, _c, _d; - if (!model20) - return { gender: "unknown", genderScore: 0 }; - const skipFrame = skipped15 < (((_a = config3.face["ssrnet"]) == null ? void 0 : _a.skipFrames) || 0); - const skipTime = (((_b = config3.face["ssrnet"]) == null ? void 0 : _b.skipTime) || 0) > now() - lastTime15; - if (config3.skipAllowed && skipFrame && skipTime && lastCount9 === count2 && ((_c = last10[idx]) == null ? void 0 : _c.gender) && ((_d = last10[idx]) == null ? void 0 : _d.genderScore) > 0) { - skipped15++; - return last10[idx]; - } - skipped15 = 0; - return new Promise(async (resolve) => { - var _a2; - if (!(model20 == null ? void 0 : model20.inputs[0].shape)) - return; - const t2 = {}; - t2.resize = tfjs_esm_exports.image.resizeBilinear(image27, [model20.inputs[0].shape[2], model20.inputs[0].shape[1]], false); - t2.enhance = tfjs_esm_exports.tidy(() => { - const [red, green, blue] = tfjs_esm_exports.split(t2.resize, 3, 3); - const redNorm = tfjs_esm_exports.mul(red, rgb[0]); - const greenNorm = tfjs_esm_exports.mul(green, rgb[1]); - const blueNorm = tfjs_esm_exports.mul(blue, rgb[2]); - const grayscale = tfjs_esm_exports.addN([redNorm, greenNorm, blueNorm]); - const normalize2 = tfjs_esm_exports.mul(tfjs_esm_exports.sub(grayscale, constants.tf05), 2); - return normalize2; - }); - const obj = { gender: "unknown", genderScore: 0 }; - if ((_a2 = config3.face["ssrnet"]) == null ? void 0 : _a2.enabled) - t2.gender = model20.execute(t2.enhance); - const data = await t2.gender.data(); - obj.gender = data[0] > data[1] ? "female" : "male"; - obj.genderScore = data[0] > data[1] ? Math.trunc(100 * data[0]) / 100 : Math.trunc(100 * data[1]) / 100; - Object.keys(t2).forEach((tensor6) => tfjs_esm_exports.dispose(t2[tensor6])); - last10[idx] = obj; - lastCount9 = count2; - lastTime15 = now(); - resolve(obj); - }); -} - -// src/models.ts -var Models = class { - constructor() { - __publicField(this, "ssrnetage", null); - __publicField(this, "gear", null); - __publicField(this, "blazeposedetect", null); - __publicField(this, "blazepose", null); - __publicField(this, "centernet", null); - __publicField(this, "efficientpose", null); - __publicField(this, "mobilefacenet", null); - __publicField(this, "insightface", null); - __publicField(this, "emotion", null); - __publicField(this, "facedetect", null); - __publicField(this, "faceiris", null); - __publicField(this, "facemesh", null); - __publicField(this, "faceres", null); - __publicField(this, "ssrnetgender", null); - __publicField(this, "handpose", null); - __publicField(this, "handskeleton", null); - __publicField(this, "handtrack", null); - __publicField(this, "liveness", null); - __publicField(this, "meet", null); - __publicField(this, "movenet", null); - __publicField(this, "nanodet", null); - __publicField(this, "posenet", null); - __publicField(this, "selfie", null); - __publicField(this, "rvm", null); - __publicField(this, "antispoof", null); - } -}; -var instance; -var getModelStats = (currentInstance) => { - if (currentInstance) - instance = currentInstance; - if (!instance) - log("instance not registred"); - let totalSizeFromManifest = 0; - let totalSizeWeights = 0; - let totalSizeLoading = 0; - for (const m of Object.values(modelStats)) { - totalSizeFromManifest += m.sizeFromManifest; - totalSizeWeights += m.sizeLoadedWeights; - totalSizeLoading += m.sizeDesired; - } - const percentageLoaded = totalSizeLoading > 0 ? totalSizeWeights / totalSizeLoading : 0; - return { - numLoadedModels: Object.values(modelStats).length, - numDefinedModels: Object.keys(instance.models).length, - percentageLoaded, - totalSizeFromManifest, - totalSizeWeights, - totalSizeLoading, - totalSizeEnabled: void 0, - modelStats: Object.values(modelStats) - }; -}; -function reset2(currentInstance) { - if (currentInstance) - instance = currentInstance; - for (const model21 of Object.keys(instance.models)) - instance.models[model21] = null; -} -async function load22(currentInstance) { - var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C; - if (currentInstance) - instance = currentInstance; - if (!instance) - log("instance not registred"); - if (env.initial) - reset2(instance); - if (instance.config.hand.enabled) { - if (!instance.models.handpose && ((_b = (_a = instance.config.hand.detector) == null ? void 0 : _a.modelPath) == null ? void 0 : _b.includes("handdetect"))) { - [instance.models.handpose, instance.models.handskeleton] = await load10(instance.config); - } - if (!instance.models.handskeleton && instance.config.hand.landmarks && ((_d = (_c = instance.config.hand.detector) == null ? void 0 : _c.modelPath) == null ? void 0 : _d.includes("handdetect"))) { - [instance.models.handpose, instance.models.handskeleton] = await load10(instance.config); - } - } - if (instance.config.body.enabled && !instance.models.blazepose && ((_e = instance.config.body.modelPath) == null ? void 0 : _e.includes("blazepose"))) - instance.models.blazepose = loadPose(instance.config); - if (instance.config.body.enabled && !instance.models.blazeposedetect && instance.config.body["detector"] && instance.config.body["detector"].modelPath) - instance.models.blazeposedetect = loadDetect(instance.config); - if (instance.config.body.enabled && !instance.models.efficientpose && ((_f = instance.config.body.modelPath) == null ? void 0 : _f.includes("efficientpose"))) - instance.models.efficientpose = load4(instance.config); - if (instance.config.body.enabled && !instance.models.movenet && ((_g = instance.config.body.modelPath) == null ? void 0 : _g.includes("movenet"))) - instance.models.movenet = load15(instance.config); - if (instance.config.body.enabled && !instance.models.posenet && ((_h = instance.config.body.modelPath) == null ? void 0 : _h.includes("posenet"))) - instance.models.posenet = load17(instance.config); - if (instance.config.face.enabled && !instance.models.facedetect) - instance.models.facedetect = load2(instance.config); - if (instance.config.face.enabled && ((_i = instance.config.face.antispoof) == null ? void 0 : _i.enabled) && !instance.models.antispoof) - instance.models.antispoof = load(instance.config); - if (instance.config.face.enabled && ((_j = instance.config.face.liveness) == null ? void 0 : _j.enabled) && !instance.models.liveness) - instance.models.liveness = load12(instance.config); - if (instance.config.face.enabled && ((_k = instance.config.face.description) == null ? void 0 : _k.enabled) && !instance.models.faceres) - instance.models.faceres = load8(instance.config); - if (instance.config.face.enabled && ((_l = instance.config.face.emotion) == null ? void 0 : _l.enabled) && !instance.models.emotion) - instance.models.emotion = load5(instance.config); - if (instance.config.face.enabled && ((_m = instance.config.face.iris) == null ? void 0 : _m.enabled) && !((_n = instance.config.face.attention) == null ? void 0 : _n.enabled) && !instance.models.faceiris) - instance.models.faceiris = load6(instance.config); - if (instance.config.face.enabled && ((_o = instance.config.face.mesh) == null ? void 0 : _o.enabled) && !instance.models.facemesh) - instance.models.facemesh = load7(instance.config); - if (instance.config.face.enabled && ((_p = instance.config.face["gear"]) == null ? void 0 : _p.enabled) && !instance.models.gear) - instance.models.gear = load9(instance.config); - if (instance.config.face.enabled && ((_q = instance.config.face["ssrnet"]) == null ? void 0 : _q.enabled) && !instance.models.ssrnetage) - instance.models.ssrnetage = load20(instance.config); - if (instance.config.face.enabled && ((_r = instance.config.face["ssrnet"]) == null ? void 0 : _r.enabled) && !instance.models.ssrnetgender) - instance.models.ssrnetgender = load21(instance.config); - if (instance.config.face.enabled && ((_s = instance.config.face["mobilefacenet"]) == null ? void 0 : _s.enabled) && !instance.models.mobilefacenet) - instance.models.mobilefacenet = load14(instance.config); - if (instance.config.face.enabled && ((_t = instance.config.face["insightface"]) == null ? void 0 : _t.enabled) && !instance.models.insightface) - instance.models.insightface = load11(instance.config); - if (instance.config.hand.enabled && !instance.models.handtrack && ((_v = (_u = instance.config.hand.detector) == null ? void 0 : _u.modelPath) == null ? void 0 : _v.includes("handtrack"))) - instance.models.handtrack = loadDetect2(instance.config); - if (instance.config.hand.enabled && instance.config.hand.landmarks && !instance.models.handskeleton && ((_x = (_w = instance.config.hand.detector) == null ? void 0 : _w.modelPath) == null ? void 0 : _x.includes("handtrack"))) - instance.models.handskeleton = loadSkeleton(instance.config); - if (instance.config.object.enabled && !instance.models.centernet && ((_y = instance.config.object.modelPath) == null ? void 0 : _y.includes("centernet"))) - instance.models.centernet = load3(instance.config); - if (instance.config.object.enabled && !instance.models.nanodet && ((_z = instance.config.object.modelPath) == null ? void 0 : _z.includes("nanodet"))) - instance.models.nanodet = load16(instance.config); - if (instance.config.segmentation.enabled && !instance.models.selfie && ((_A = instance.config.segmentation.modelPath) == null ? void 0 : _A.includes("selfie"))) - instance.models.selfie = load19(instance.config); - if (instance.config.segmentation.enabled && !instance.models.meet && ((_B = instance.config.segmentation.modelPath) == null ? void 0 : _B.includes("meet"))) - instance.models.meet = load13(instance.config); - if (instance.config.segmentation.enabled && !instance.models.rvm && ((_C = instance.config.segmentation.modelPath) == null ? void 0 : _C.includes("rvm"))) - instance.models.rvm = load18(instance.config); - for await (const model21 of Object.keys(instance.models)) { - if (instance.models[model21] && typeof instance.models[model21] !== "undefined") { - instance.models[model21] = await instance.models[model21]; - } - } -} -function validateModel(currentInstance, model21, name) { - var _a, _b; - if (!model21) - return null; - if (currentInstance) - instance = currentInstance; - if (!instance) - log("instance not registred"); - if (!((_a = instance == null ? void 0 : instance.config) == null ? void 0 : _a.validateModels)) - return null; - const simpleOps = ["const", "placeholder", "noop", "pad", "squeeze", "add", "sub", "mul", "div"]; - const ignoreOps = ["biasadd", "fusedbatchnormv3", "matmul", "switch", "shape", "merge", "split", "broadcastto"]; - const ops = []; - const missing = []; - const url = model21["modelUrl"]; - const executor = model21["executor"]; - if ((_b = executor == null ? void 0 : executor.graph) == null ? void 0 : _b.nodes) { - for (const kernel of Object.values(executor.graph.nodes)) { - const op = kernel.op.toLowerCase(); - if (!ops.includes(op)) - ops.push(op); - } - } else { - if (!executor && instance.config.debug) { - log("model not loaded", name); - } - } - for (const op of ops) { - if (!simpleOps.includes(op) && !ignoreOps.includes(op) && !instance.env.kernels.includes(op) && !instance.env.kernels.includes(op.replace("_", "")) && !instance.env.kernels.includes(op.replace("native", "")) && !instance.env.kernels.includes(op.replace("v2", ""))) { - missing.push(op); - } - } - if (instance.config.debug && missing.length > 0) - log("model validation failed:", name, missing); - return missing.length > 0 ? { name, missing, ops, url } : null; -} -function validate2(currentInstance) { - if (currentInstance) - instance = currentInstance; - if (!instance) - log("instance not registred"); - const missing = []; - for (const defined of Object.keys(currentInstance.models)) { - const model21 = currentInstance.models[defined]; - if (!model21) - continue; - const res = validateModel(currentInstance, model21, defined); - if (res) - missing.push(res); - } - return missing; -} - -// src/tfjs/humangl.ts -var config2 = { - name: "humangl", - priority: 999, - canvas: null, - gl: null, - extensions: [], - webGLattr: { - alpha: false, - antialias: false, - premultipliedAlpha: false, - preserveDrawingBuffer: false, - depth: false, - stencil: false, - failIfMajorPerformanceCaveat: false, - desynchronized: true - } -}; -function extensions() { - const gl = config2.gl; - if (!gl) - return; - config2.extensions = gl.getSupportedExtensions(); -} -function register(instance2) { - var _a; - if (instance2.config.backend !== "humangl") - return; - if (config2.name in tfjs_esm_exports.engine().registry && !((_a = config2 == null ? void 0 : config2.gl) == null ? void 0 : _a.getParameter(config2.gl.VERSION))) { - log("humangl error: backend invalid context"); - reset2(instance2); - } - if (!tfjs_esm_exports.findBackend(config2.name)) { - try { - config2.canvas = canvas(100, 100); - } catch (err) { - log("humangl error: cannot create canvas:", err); - return; - } - try { - config2.gl = config2.canvas.getContext("webgl2", config2.webGLattr); - if (!config2.gl) { - log("humangl error: cannot get webgl context"); - return; - } - const glv2 = config2.gl.getParameter(config2.gl.VERSION).includes("2.0"); - if (!glv2) { - log("backend override: using fallback webgl backend as webgl 2.0 is not detected"); - instance2.config.backend = "webgl"; - return; - } - if (config2.canvas) { - config2.canvas.addEventListener("webglcontextlost", (e) => { - log("humangl error:", e.type); - log("possible browser memory leak using webgl or conflict with multiple backend registrations"); - instance2.emit("error"); - throw new Error("backend error: webgl context lost"); - }); - config2.canvas.addEventListener("webglcontextrestored", (e) => { - log("humangl error: context restored:", e); - }); - config2.canvas.addEventListener("webglcontextcreationerror", (e) => { - log("humangl error: context create:", e); - }); - } - } catch (err) { - log("humangl error: cannot get webgl context:", err); - return; - } - try { - tfjs_esm_exports.setWebGLContext(2, config2.gl); - } catch (err) { - log("humangl error: cannot set webgl context:", err); - return; - } - try { - const ctx = new tfjs_esm_exports.GPGPUContext(config2.gl); - tfjs_esm_exports.registerBackend(config2.name, () => new tfjs_esm_exports.MathBackendWebGL(ctx), config2.priority); - } catch (err) { - log("humangl error: cannot register webgl backend:", err); - return; - } - try { - const kernels = tfjs_esm_exports.getKernelsForBackend("webgl"); - kernels.forEach((kernelConfig) => { - const newKernelConfig = { ...kernelConfig, backendName: config2.name }; - tfjs_esm_exports.registerKernel(newKernelConfig); - }); - } catch (err) { - log("humangl error: cannot update webgl backend registration:", err); - return; - } - try { - if (tfjs_esm_exports.env().flagRegistry.WEBGL_VERSION) - tfjs_esm_exports.env().set("WEBGL_VERSION", 2); - } catch (err) { - log("humangl error: cannot set WebGL backend flags:", err); - return; - } - extensions(); - const current = tfjs_esm_exports.backend().getGPGPUContext ? tfjs_esm_exports.backend().getGPGPUContext().gl : null; - if (current) { - if (instance2.config.debug) - log("humangl backend registered:", { webgl: current.getParameter(current.VERSION), renderer: current.getParameter(current.RENDERER) }); - } else { - log("humangl error: no current gl context:", current, config2.gl); - } - } -} - -// src/tfjs/backend.ts -function registerCustomOps(config3) { - const newKernels = []; - if (!env.kernels.includes("mod")) { - const kernelMod = { - kernelName: "Mod", - backendName: tfjs_esm_exports.getBackend(), - kernelFunc: (op) => tfjs_esm_exports.tidy(() => tfjs_esm_exports.sub(op.inputs.a, tfjs_esm_exports.mul(tfjs_esm_exports.div(op.inputs.a, op.inputs.b), op.inputs.b))) - }; - tfjs_esm_exports.registerKernel(kernelMod); - env.kernels.push("mod"); - newKernels.push("mod"); - } - if (!env.kernels.includes("floormod")) { - const kernelFloorMod = { - kernelName: "FloorMod", - backendName: tfjs_esm_exports.getBackend(), - kernelFunc: (op) => tfjs_esm_exports.tidy(() => tfjs_esm_exports.add(tfjs_esm_exports.mul(tfjs_esm_exports.floorDiv(op.inputs.a / op.inputs.b), op.inputs.b), tfjs_esm_exports.mod(op.inputs.a, op.inputs.b))) - }; - tfjs_esm_exports.registerKernel(kernelFloorMod); - env.kernels.push("floormod"); - newKernels.push("floormod"); - } - if (!env.kernels.includes("rotatewithoffset") && config3.softwareKernels) { - const kernelRotateWithOffset = { - kernelName: "RotateWithOffset", - backendName: tfjs_esm_exports.getBackend(), - kernelFunc: (op) => tfjs_esm_exports.tidy(() => { - const backend4 = tfjs_esm_exports.getBackend(); - tfjs_esm_exports.setBackend("cpu"); - const t2 = tfjs_esm_exports.image.rotateWithOffset(op.inputs.image, op.attrs.radians, op.attrs.fillValue, op.attrs.center); - tfjs_esm_exports.setBackend(backend4); - return t2; - }) - }; - tfjs_esm_exports.registerKernel(kernelRotateWithOffset); - env.kernels.push("rotatewithoffset"); - newKernels.push("rotatewithoffset"); - } - if (newKernels.length > 0 && config3.debug) - log("registered kernels:", newKernels); -} -var defaultFlags = {}; -async function check(instance2, force = false) { - instance2.state = "backend"; - if (force || env.initial || instance2.config.backend && instance2.config.backend.length > 0 && tfjs_esm_exports.getBackend() !== instance2.config.backend) { - const timeStamp = now(); - if (instance2.config.backend && instance2.config.backend.length > 0) { - if (typeof window === "undefined" && typeof WorkerGlobalScope !== "undefined" && instance2.config.debug) { - if (instance2.config.debug) - log("running inside web worker"); - } - if (env.browser && instance2.config.backend === "tensorflow") { - if (instance2.config.debug) - log("override: backend set to tensorflow while running in browser"); - instance2.config.backend = "webgl"; - } - if (env.node && (instance2.config.backend === "webgl" || instance2.config.backend === "humangl")) { - if (instance2.config.debug) - log(`override: backend set to ${instance2.config.backend} while running in nodejs`); - instance2.config.backend = "tensorflow"; - } - if (env.browser && instance2.config.backend === "webgpu") { - if (typeof navigator === "undefined" || typeof navigator.gpu === "undefined") { - log("override: backend set to webgpu but browser does not support webgpu"); - instance2.config.backend = "webgl"; - } else { - const adapter = await navigator.gpu.requestAdapter(); - if (instance2.config.debug) - log("enumerated webgpu adapter:", adapter); - if (!adapter) { - log("override: backend set to webgpu but browser reports no available gpu"); - instance2.config.backend = "webgl"; - } else { - const adapterInfo = "requestAdapterInfo" in adapter ? await adapter.requestAdapterInfo() : void 0; - log("webgpu adapter info:", adapterInfo); - } - } - } - let available = Object.keys(tfjs_esm_exports.engine().registryFactory); - if (instance2.config.backend === "humangl" && !available.includes("humangl")) { - register(instance2); - available = Object.keys(tfjs_esm_exports.engine().registryFactory); - } - if (instance2.config.debug) - log("available backends:", available); - if (!available.includes(instance2.config.backend)) { - log(`error: backend ${instance2.config.backend} not found in registry`); - instance2.config.backend = env.node ? "tensorflow" : "webgl"; - if (instance2.config.debug) - log(`override: setting backend ${instance2.config.backend}`); - } - if (instance2.config.debug) - log("setting backend:", [instance2.config.backend]); - if (instance2.config.backend === "wasm") { - if (tfjs_esm_exports.env().flagRegistry.CANVAS2D_WILL_READ_FREQUENTLY) - tfjs_esm_exports.env().set("CANVAS2D_WILL_READ_FREQUENTLY", true); - if (instance2.config.debug) - log("wasm path:", instance2.config.wasmPath); - if (typeof tfjs_esm_exports.setWasmPaths !== "undefined") - tfjs_esm_exports.setWasmPaths(instance2.config.wasmPath, instance2.config.wasmPlatformFetch); - else - throw new Error("backend error: attempting to use wasm backend but wasm path is not set"); - let mt = false; - let simd = false; - try { - mt = await tfjs_esm_exports.env().getAsync("WASM_HAS_MULTITHREAD_SUPPORT"); - simd = await tfjs_esm_exports.env().getAsync("WASM_HAS_SIMD_SUPPORT"); - if (instance2.config.debug) - log(`wasm execution: ${simd ? "simd" : "no simd"} ${mt ? "multithreaded" : "singlethreaded"}`); - if (instance2.config.debug && !simd) - log("warning: wasm simd support is not enabled"); - } catch (e) { - log("wasm detection failed"); - } - } - try { - await tfjs_esm_exports.setBackend(instance2.config.backend); - await tfjs_esm_exports.ready(); - } catch (err) { - log("error: cannot set backend:", instance2.config.backend, err); - return false; - } - if (instance2.config.debug) - defaultFlags = JSON.parse(JSON.stringify(tfjs_esm_exports.env().flags)); - } - if (tfjs_esm_exports.getBackend() === "humangl" || tfjs_esm_exports.getBackend() === "webgl") { - if (tfjs_esm_exports.env().flagRegistry.WEBGL_USE_SHAPES_UNIFORMS) - tfjs_esm_exports.env().set("WEBGL_USE_SHAPES_UNIFORMS", true); - if (tfjs_esm_exports.env().flagRegistry.WEBGL_EXP_CONV) - tfjs_esm_exports.env().set("WEBGL_EXP_CONV", true); - if (instance2.config.debug && typeof instance2.config.deallocate !== "undefined" && instance2.config.deallocate) { - log("changing webgl: WEBGL_DELETE_TEXTURE_THRESHOLD:", true); - tfjs_esm_exports.env().set("WEBGL_DELETE_TEXTURE_THRESHOLD", 0); - } - } - if (tfjs_esm_exports.getBackend() === "webgpu") { - } - if (instance2.config.debug) { - const newFlags = tfjs_esm_exports.env().flags; - const updatedFlags = {}; - for (const key of Object.keys(newFlags)) { - if (defaultFlags[key] === newFlags[key]) - continue; - updatedFlags[key] = newFlags[key]; - } - if (instance2.config.debug && Object.keys(updatedFlags).length > 0) - log("backend:", tfjs_esm_exports.getBackend(), "flags:", updatedFlags); - } - if (instance2.config.flags && Object.keys(instance2.config.flags).length > 0) { - if (instance2.config.debug) - log("flags:", instance2.config["flags"]); - for (const [key, val] of Object.entries(instance2.config.flags)) { - tfjs_esm_exports.env().set(key, val); - } - } - tfjs_esm_exports.enableProdMode(); - init(); - instance2.performance.initBackend = Math.trunc(now() - timeStamp); - instance2.config.backend = tfjs_esm_exports.getBackend(); - await env.updateBackend(); - registerCustomOps(instance2.config); - env.initial = false; - } - return true; -} -function fakeOps(kernelNames, config3) { - for (const kernelName of kernelNames) { - const kernelConfig = { - kernelName, - backendName: config3.backend, - kernelFunc: () => { - if (config3.debug) - log("kernelFunc", kernelName, config3.backend); - } - }; - tfjs_esm_exports.registerKernel(kernelConfig); - } - env.kernels = tfjs_esm_exports.getKernelsForBackend(tfjs_esm_exports.getBackend()).map((kernel) => kernel.kernelName.toLowerCase()); -} - -// src/draw/draw.ts -var draw_exports = {}; -__export(draw_exports, { - all: () => all, - body: () => body, - canvas: () => canvas2, - face: () => face, - gesture: () => gesture, - hand: () => hand, - object: () => object, - options: () => options3, - person: () => person -}); - -// src/draw/primitives.ts -var getCanvasContext = (input) => { - if (!input) - log("draw error: invalid canvas"); - else if (!input.getContext) - log("draw error: canvas context not defined"); - else { - const ctx = input.getContext("2d"); - if (!ctx) - log("draw error: cannot get canvas context"); - else - return ctx; - } - return null; -}; -var rad2deg = (theta) => Math.round(theta * 180 / Math.PI); -var colorDepth = (z, opt2) => { - if (!opt2.useDepth || typeof z === "undefined") - return opt2.color; - const rgb2 = Uint8ClampedArray.from([127 + 2 * z, 127 - 2 * z, 255]); - return `rgba(${rgb2[0]}, ${rgb2[1]}, ${rgb2[2]}, ${opt2.alpha})`; -}; -function point(ctx, x, y, z, localOptions) { - ctx.fillStyle = colorDepth(z, localOptions); - ctx.beginPath(); - ctx.arc(x, y, localOptions.pointSize, 0, 2 * Math.PI); - ctx.fill(); -} -function rect(ctx, x, y, width, height, localOptions) { - ctx.beginPath(); - ctx.lineWidth = localOptions.lineWidth; - if (localOptions.useCurves) { - const cx = (x + x + width) / 2; - const cy = (y + y + height) / 2; - ctx.ellipse(cx, cy, width / 2, height / 2, 0, 0, 2 * Math.PI); - } else { - ctx.moveTo(x + localOptions.roundRect, y); - ctx.lineTo(x + width - localOptions.roundRect, y); - ctx.quadraticCurveTo(x + width, y, x + width, y + localOptions.roundRect); - ctx.lineTo(x + width, y + height - localOptions.roundRect); - ctx.quadraticCurveTo(x + width, y + height, x + width - localOptions.roundRect, y + height); - ctx.lineTo(x + localOptions.roundRect, y + height); - ctx.quadraticCurveTo(x, y + height, x, y + height - localOptions.roundRect); - ctx.lineTo(x, y + localOptions.roundRect); - ctx.quadraticCurveTo(x, y, x + localOptions.roundRect, y); - ctx.closePath(); - } - ctx.stroke(); -} -function lines(ctx, points, localOptions) { - if (points.length < 2) - return; - ctx.beginPath(); - ctx.moveTo(points[0][0], points[0][1]); - for (const pt of points) { - ctx.strokeStyle = colorDepth(pt[2] || 0, localOptions); - ctx.lineTo(Math.trunc(pt[0]), Math.trunc(pt[1])); - } - ctx.stroke(); - if (localOptions.fillPolygons) { - ctx.closePath(); - ctx.fill(); - } -} -function curves(ctx, points, localOptions) { - if (points.length < 2) - return; - ctx.lineWidth = localOptions.lineWidth; - if (!localOptions.useCurves || points.length <= 2) { - lines(ctx, points, localOptions); - return; - } - ctx.moveTo(points[0][0], points[0][1]); - for (let i = 0; i < points.length - 2; i++) { - const xc = (points[i][0] + points[i + 1][0]) / 2; - const yc = (points[i][1] + points[i + 1][1]) / 2; - ctx.quadraticCurveTo(points[i][0], points[i][1], xc, yc); - } - ctx.quadraticCurveTo(points[points.length - 2][0], points[points.length - 2][1], points[points.length - 1][0], points[points.length - 1][1]); - ctx.stroke(); - if (localOptions.fillPolygons) { - ctx.closePath(); - ctx.fill(); - } -} -function arrow(ctx, from, to, radius = 5) { - let angle; - let x; - let y; - ctx.beginPath(); - ctx.moveTo(from[0], from[1]); - ctx.lineTo(to[0], to[1]); - angle = Math.atan2(to[1] - from[1], to[0] - from[0]); - x = radius * Math.cos(angle) + to[0]; - y = radius * Math.sin(angle) + to[1]; - ctx.moveTo(x, y); - angle += 1 / 3 * (2 * Math.PI); - x = radius * Math.cos(angle) + to[0]; - y = radius * Math.sin(angle) + to[1]; - ctx.lineTo(x, y); - angle += 1 / 3 * (2 * Math.PI); - x = radius * Math.cos(angle) + to[0]; - y = radius * Math.sin(angle) + to[1]; - ctx.lineTo(x, y); - ctx.closePath(); - ctx.stroke(); - ctx.fill(); -} - -// src/draw/options.ts -var options3 = { - color: "rgba(173, 216, 230, 0.6)", - labelColor: "rgba(173, 216, 230, 1)", - shadowColor: "black", - alpha: 0.5, - font: 'small-caps 16px "Segoe UI"', - lineHeight: 18, - lineWidth: 4, - pointSize: 2, - roundRect: 8, - drawPoints: false, - drawLabels: true, - drawBoxes: true, - drawAttention: true, - drawGestures: true, - drawPolygons: true, - drawGaze: true, - fillPolygons: false, - useDepth: true, - useCurves: false -}; - -// src/draw/face.ts -var opt; -function drawLabels(f, ctx) { - var _a, _b; - if (opt.drawLabels) { - const labels2 = []; - labels2.push(`face: ${Math.trunc(100 * f.score)}%`); - if (f.genderScore) - labels2.push(`${f.gender || ""} ${Math.trunc(100 * f.genderScore)}%`); - if (f.age) - labels2.push(`age: ${f.age || ""}`); - if (f.iris) - labels2.push(`distance: ${f.iris}`); - if (f.real) - labels2.push(`real: ${Math.trunc(100 * f.real)}%`); - if (f.live) - labels2.push(`live: ${Math.trunc(100 * f.live)}%`); - if (f.emotion && f.emotion.length > 0) { - const emotion2 = f.emotion.map((a) => `${Math.trunc(100 * a.score)}% ${a.emotion}`); - if (emotion2.length > 3) - emotion2.length = 3; - labels2.push(emotion2.join(" ")); - } - if (((_a = f.rotation) == null ? void 0 : _a.angle) && ((_b = f.rotation) == null ? void 0 : _b.gaze)) { - if (f.rotation.angle.roll) - labels2.push(`roll: ${rad2deg(f.rotation.angle.roll)}\xB0 yaw:${rad2deg(f.rotation.angle.yaw)}\xB0 pitch:${rad2deg(f.rotation.angle.pitch)}\xB0`); - if (f.rotation.gaze.bearing) - labels2.push(`gaze: ${rad2deg(f.rotation.gaze.bearing)}\xB0`); - } - if (labels2.length === 0) - labels2.push("face"); - ctx.fillStyle = opt.color; - for (let i = labels2.length - 1; i >= 0; i--) { - const x = Math.max(f.box[0], 0); - const y = i * opt.lineHeight + f.box[1]; - if (opt.shadowColor && opt.shadowColor !== "") { - ctx.fillStyle = opt.shadowColor; - ctx.fillText(labels2[i], x + 5, y + 16); - } - ctx.fillStyle = opt.labelColor; - ctx.fillText(labels2[i], x + 4, y + 15); - } - } -} -function drawIrisElipse(f, ctx) { - var _a, _b, _c, _d; - if (((_a = f.annotations) == null ? void 0 : _a.leftEyeIris) && ((_b = f.annotations) == null ? void 0 : _b.leftEyeIris[0])) { - ctx.strokeStyle = opt.useDepth ? "rgba(255, 200, 255, 0.3)" : opt.color; - ctx.beginPath(); - const sizeX = Math.abs(f.annotations.leftEyeIris[3][0] - f.annotations.leftEyeIris[1][0]) / 2; - const sizeY = Math.abs(f.annotations.leftEyeIris[4][1] - f.annotations.leftEyeIris[2][1]) / 2; - ctx.ellipse(f.annotations.leftEyeIris[0][0], f.annotations.leftEyeIris[0][1], sizeX, sizeY, 0, 0, 2 * Math.PI); - ctx.stroke(); - if (opt.fillPolygons) { - ctx.fillStyle = opt.useDepth ? "rgba(255, 255, 200, 0.3)" : opt.color; - ctx.fill(); - } - } - if (((_c = f.annotations) == null ? void 0 : _c.rightEyeIris) && ((_d = f.annotations) == null ? void 0 : _d.rightEyeIris[0])) { - ctx.strokeStyle = opt.useDepth ? "rgba(255, 200, 255, 0.3)" : opt.color; - ctx.beginPath(); - const sizeX = Math.abs(f.annotations.rightEyeIris[3][0] - f.annotations.rightEyeIris[1][0]) / 2; - const sizeY = Math.abs(f.annotations.rightEyeIris[4][1] - f.annotations.rightEyeIris[2][1]) / 2; - ctx.ellipse(f.annotations.rightEyeIris[0][0], f.annotations.rightEyeIris[0][1], sizeX, sizeY, 0, 0, 2 * Math.PI); - ctx.stroke(); - if (opt.fillPolygons) { - ctx.fillStyle = opt.useDepth ? "rgba(255, 255, 200, 0.3)" : opt.color; - ctx.fill(); - } - } -} -function drawGazeSpheres(f, ctx) { - var _a; - if (opt.drawGaze && ((_a = f.rotation) == null ? void 0 : _a.angle) && typeof Path2D !== "undefined") { - ctx.strokeStyle = "pink"; - const valX = f.box[0] + f.box[2] / 2 - f.box[3] * rad2deg(f.rotation.angle.yaw) / 90; - const valY = f.box[1] + f.box[3] / 2 + f.box[2] * rad2deg(f.rotation.angle.pitch) / 90; - const pathV = new Path2D(` - M ${f.box[0] + f.box[2] / 2} ${f.box[1]} +`;var dt=(e,t,n)=>{let o=new RegExp("\\b"+t+" \\w+ (\\w+)","ig");e.replace(o,(s,A)=>(n[A]=0,s))},xt=class{constructor(t,n,o){k(this,"uniform",{});k(this,"attribute",{});k(this,"gl");k(this,"id");k(this,"compile",(t,n)=>{let o=this.gl.createShader(n);return o?(this.gl.shaderSource(o,t),this.gl.compileShader(o),this.gl.getShaderParameter(o,this.gl.COMPILE_STATUS)?o:(b(`filter: gl compile failed: ${this.gl.getShaderInfoLog(o)||"unknown"}`),null)):(b("filter: could not create shader"),null)});this.gl=t;let s=this.compile(n,this.gl.VERTEX_SHADER),A=this.compile(o,this.gl.FRAGMENT_SHADER);if(this.id=this.gl.createProgram(),!(!s||!A)){if(!this.id){b("filter: could not create webgl program");return}if(this.gl.attachShader(this.id,s),this.gl.attachShader(this.id,A),this.gl.linkProgram(this.id),!this.gl.getProgramParameter(this.id,this.gl.LINK_STATUS)){b(`filter: gl link failed: ${this.gl.getProgramInfoLog(this.id)||"unknown"}`);return}this.gl.useProgram(this.id),dt(n,"attribute",this.attribute);for(let a in this.attribute)this.attribute[a]=this.gl.getAttribLocation(this.id,a);dt(n,"uniform",this.uniform),dt(o,"uniform",this.uniform);for(let a in this.uniform)this.uniform[a]=this.gl.getUniformLocation(this.id,a)}}};function t1(){let e=0,t=null,n=!1,o=-1,s=[null,null],A=[],a=null,i=null,c=N0(100,100),d={},y={INTERMEDIATE:1},l=c.getContext("webgl");if(!l){b("filter: cannot get webgl context");return}this.gl=l;function m(v,f){if(!(v===c.width&&f===c.height)){if(c.width=v,c.height=f,!a){let g=new Float32Array([-1,-1,0,1,1,-1,1,1,-1,1,0,0,-1,1,0,0,1,-1,1,1,1,1,1,0]);a=l.createBuffer(),l.bindBuffer(l.ARRAY_BUFFER,a),l.bufferData(l.ARRAY_BUFFER,g,l.STATIC_DRAW),l.pixelStorei(l.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0)}l.viewport(0,0,c.width,c.height),s=[null,null]}}function x(v,f){let g=l.createFramebuffer();l.bindFramebuffer(l.FRAMEBUFFER,g);let S=l.createRenderbuffer();l.bindRenderbuffer(l.RENDERBUFFER,S);let E=l.createTexture();return l.bindTexture(l.TEXTURE_2D,E),l.texImage2D(l.TEXTURE_2D,0,l.RGBA,v,f,0,l.RGBA,l.UNSIGNED_BYTE,null),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MAG_FILTER,l.LINEAR),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MIN_FILTER,l.LINEAR),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_S,l.CLAMP_TO_EDGE),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_T,l.CLAMP_TO_EDGE),l.framebufferTexture2D(l.FRAMEBUFFER,l.COLOR_ATTACHMENT0,l.TEXTURE_2D,E,0),l.bindTexture(l.TEXTURE_2D,null),l.bindFramebuffer(l.FRAMEBUFFER,null),{fbo:g,texture:E}}function p(v){return s[v]=s[v]||x(c.width,c.height),s[v]}function u(v=0){if(!i)return;let f=null,g=null,S=!1;e===0?f=t:f=p(o).texture||null,e++,n&&!(v&y.INTERMEDIATE)?(g=null,S=e%2===0):(o=(o+1)%2,g=p(o).fbo||null),l.bindTexture(l.TEXTURE_2D,f),l.bindFramebuffer(l.FRAMEBUFFER,g),l.uniform1f(i.uniform.flipY,S?-1:1),l.drawArrays(l.TRIANGLES,0,6)}function M(v){if(d[v])return i=d[v],l.useProgram((i?i.id:null)||null),i;if(i=new xt(l,K5,v),!i)return b("filter: could not get webgl program"),null;let f=Float32Array.BYTES_PER_ELEMENT,g=4*f;return l.enableVertexAttribArray(i.attribute.pos),l.vertexAttribPointer(i.attribute.pos,2,l.FLOAT,!1,g,0*f),l.enableVertexAttribArray(i.attribute.uv),l.vertexAttribPointer(i.attribute.uv,2,l.FLOAT,!1,g,2*f),d[v]=i,i}let P={colorMatrix:v=>{let f=new Float32Array(v);f[4]/=255,f[9]/=255,f[14]/=255,f[19]/=255;let g=f[18]===1&&f[3]===0&&f[8]===0&&f[13]===0&&f[15]===0&&f[16]===0&&f[17]===0&&f[19]===0?Q5:J5,S=M(g);!S||(l.uniform1fv(S.uniform.m,f),u())},brightness:v=>{let f=(v||0)+1;P.colorMatrix([f,0,0,0,0,0,f,0,0,0,0,0,f,0,0,0,0,0,1,0])},saturation:v=>{let f=(v||0)*2/3+1,g=(f-1)*-.5;P.colorMatrix([f,g,g,0,0,g,f,g,0,0,g,g,f,0,0,0,0,0,1,0])},desaturate:()=>{P.saturation(-1)},contrast:v=>{let f=(v||0)+1,g=-128*(f-1);P.colorMatrix([f,0,0,0,g,0,f,0,0,g,0,0,f,0,g,0,0,0,1,0])},negative:()=>{P.contrast(-2)},hue:v=>{v=(v||0)/180*Math.PI;let f=Math.cos(v),g=Math.sin(v),S=.213,E=.715,I=.072;P.colorMatrix([S+f*(1-S)+g*-S,E+f*-E+g*-E,I+f*-I+g*(1-I),0,0,S+f*-S+g*.143,E+f*(1-E)+g*.14,I+f*-I+g*-.283,0,0,S+f*-S+g*-(1-S),E+f*-E+g*E,I+f*(1-I)+g*I,0,0,0,0,0,1,0])},desaturateLuminance:()=>{P.colorMatrix([.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,0,0,0,1,0])},sepia:()=>{P.colorMatrix([.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0])},brownie:()=>{P.colorMatrix([.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0])},vintagePinhole:()=>{P.colorMatrix([.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0])},kodachrome:()=>{P.colorMatrix([1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0])},technicolor:()=>{P.colorMatrix([1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0])},polaroid:()=>{P.colorMatrix([1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0])},shiftToBGR:()=>{P.colorMatrix([0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0])},convolution:v=>{let f=new Float32Array(v),g=1/c.width,S=1/c.height,E=M(e1);!E||(l.uniform1fv(E.uniform.m,f),l.uniform2f(E.uniform.px,g,S),u())},detectEdges:()=>{P.convolution.call(this,[0,1,0,1,-4,1,0,1,0])},sobelX:()=>{P.convolution.call(this,[-1,0,1,-2,0,2,-1,0,1])},sobelY:()=>{P.convolution.call(this,[-1,-2,-1,0,0,0,1,2,1])},sharpen:v=>{let f=v||1;P.convolution.call(this,[0,-1*f,0,-1*f,1+4*f,-1*f,0,-1*f,0])},emboss:v=>{let f=v||1;P.convolution.call(this,[-2*f,-1*f,0,-1*f,1,1*f,0,1*f,2*f])},blur:v=>{let f=v/7/c.width,g=v/7/c.height,S=M($5);!S||(l.uniform2f(S.uniform.px,0,g),u(y.INTERMEDIATE),l.uniform2f(S.uniform.px,f,0),u())},pixelate:v=>{let f=v/c.width,g=v/c.height,S=M(_5);!S||(l.uniform2f(S.uniform.size,f,g),u())}};this.add=function(v){let f=Array.prototype.slice.call(arguments,1),g=P[v];A.push({func:g,args:f})},this.reset=function(){A=[]},this.get=function(){return A},this.apply=function(v){m(v.width,v.height),e=0,t||(t=l.createTexture()),l.bindTexture(l.TEXTURE_2D,t),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_S,l.CLAMP_TO_EDGE),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_T,l.CLAMP_TO_EDGE),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MIN_FILTER,l.NEAREST),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MAG_FILTER,l.NEAREST),l.texImage2D(l.TEXTURE_2D,0,l.RGBA,l.RGBA,l.UNSIGNED_BYTE,v);for(let f=0;fx.data())),a=.99*Math.max(A[0][0],A[1][0],A[2][0]),i=[r.sub(n[0],o[0]),r.sub(n[1],o[1]),r.sub(n[2],o[2])],c=[r.sub(s[0],o[0]),r.sub(s[1],o[1]),r.sub(s[2],o[2])],d=[r.div(a,c[0]),r.div(a,c[1]),r.div(a,c[2])],y=[r.mul(i[0],d[0]),r.mul(i[1],d[1]),r.mul(i[2],d[2])],l=r.stack([y[0],y[1],y[2]],2),m=r.reshape(l,[1,t.shape[0],t.shape[1],3]);return r.dispose([...n,...o,...s,...i,...c,...d,...y,l,t]),m}var u2=3840,a0=null,i0=null,Ie=null,D,k0={inputSum:0,cacheDiff:1,sumMethod:0,inputTensor:void 0};function yt(){k0.inputSum=0,k0.cacheDiff=1,k0.sumMethod=0,k0.inputTensor=void 0}function N0(e,t){let n;if(w.browser)if(w.worker){if(typeof OffscreenCanvas=="undefined")throw new Error("canvas error: attempted to run in web worker but OffscreenCanvas is not supported");n=new OffscreenCanvas(e,t)}else{if(typeof document=="undefined")throw new Error("canvas error: attempted to run in browser but DOM is not defined");n=document.createElement("canvas"),n.width=e,n.height=t}else typeof w.Canvas!="undefined"?n=new w.Canvas(e,t):typeof globalThis.Canvas!="undefined"&&(n=new globalThis.Canvas(e,t));return n}function h2(e,t){let n=t||N0(e.width,e.height);return n.getContext("2d").drawImage(e,0,0),n}async function b2(e,t,n=!0){var m,x;if(!e)return t.debug&&b("input error: input is missing"),{tensor:null,canvas:null};if(!(e instanceof Ne)&&!(typeof Image!="undefined"&&e instanceof Image)&&!(typeof w.Canvas!="undefined"&&e instanceof w.Canvas)&&!(typeof globalThis.Canvas!="undefined"&&e instanceof globalThis.Canvas)&&!(typeof ImageData!="undefined"&&e instanceof ImageData)&&!(typeof ImageBitmap!="undefined"&&e instanceof ImageBitmap)&&!(typeof HTMLImageElement!="undefined"&&e instanceof HTMLImageElement)&&!(typeof HTMLMediaElement!="undefined"&&e instanceof HTMLMediaElement)&&!(typeof HTMLVideoElement!="undefined"&&e instanceof HTMLVideoElement)&&!(typeof HTMLCanvasElement!="undefined"&&e instanceof HTMLCanvasElement)&&!(typeof OffscreenCanvas!="undefined"&&e instanceof OffscreenCanvas))throw new Error("input error: type is not recognized");if(e instanceof Ne){let p=null;if(e.isDisposedInternal)throw new Error("input error: attempted to use tensor but it is disposed");if(!e.shape)throw new Error("input error: attempted to use tensor without a shape");if(e.shape.length===3){if(e.shape[2]===3)p=r.expandDims(e,0);else if(e.shape[2]===4){let u=r.slice3d(e,[0,0,0],[-1,-1,3]);p=r.expandDims(u,0),r.dispose(u)}}else e.shape.length===4&&(e.shape[3]===3?p=r.clone(e):e.shape[3]===4&&(p=r.slice4d(e,[0,0,0,0],[-1,-1,-1,3])));if(p==null||p.shape.length!==4||p.shape[0]!==1||p.shape[3]!==3)throw new Error(`input error: attempted to use tensor with unrecognized shape: ${e.shape.toString()}`);if(p.dtype==="int32"){let u=r.cast(p,"float32");r.dispose(p),p=u}return{tensor:p,canvas:t.filter.return?i0:null}}if(typeof e.readyState!="undefined"&&e.readyState<=2)return t.debug&&b("input stream is not ready"),{tensor:null,canvas:a0};let o=e.naturalWidth||e.videoWidth||e.width||e.shape&&e.shape[1]>0,s=e.naturalHeight||e.videoHeight||e.height||e.shape&&e.shape[2]>0;if(!o||!s)return t.debug&&b("cannot determine input dimensions"),{tensor:null,canvas:a0};let A=o,a=s;if(A>u2&&(A=u2,a=Math.trunc(A*s/o)),a>u2&&(a=u2,A=Math.trunc(a*o/s)),(((m=t.filter)==null?void 0:m.width)||0)>0?A=t.filter.width:(((x=t.filter)==null?void 0:x.height)||0)>0&&(A=o*((t.filter.height||0)/s)),(t.filter.height||0)>0?a=t.filter.height:(t.filter.width||0)>0&&(a=s*((t.filter.width||0)/o)),!A||!a)throw new Error("input error: cannot determine dimension");(!a0||a0.width!==A||a0.height!==a)&&(a0=N0(A,a));let i=a0.getContext("2d");if(typeof ImageData!="undefined"&&e instanceof ImageData?i.putImageData(e,0,0):t.filter.flip&&typeof i.translate!="undefined"?(i.translate(o,0),i.scale(-1,1),i.drawImage(e,0,0,o,s,0,0,a0.width,a0.height),i.setTransform(1,0,0,1,0,0)):i.drawImage(e,0,0,o,s,0,0,a0.width,a0.height),(!i0||a0.width!==i0.width||a0.height!==i0.height)&&(i0=N0(a0.width,a0.height)),t.filter.enabled&&w.webgl.supported?(D||(D=w.browser?new t1:null),w.filter=!!D,D!=null&&D.add?(D.reset(),t.filter.brightness!==0&&D.add("brightness",t.filter.brightness),t.filter.contrast!==0&&D.add("contrast",t.filter.contrast),t.filter.sharpness!==0&&D.add("sharpen",t.filter.sharpness),t.filter.blur!==0&&D.add("blur",t.filter.blur),t.filter.saturation!==0&&D.add("saturation",t.filter.saturation),t.filter.hue!==0&&D.add("hue",t.filter.hue),t.filter.negative&&D.add("negative"),t.filter.sepia&&D.add("sepia"),t.filter.vintage&&D.add("brownie"),t.filter.sepia&&D.add("sepia"),t.filter.kodachrome&&D.add("kodachrome"),t.filter.technicolor&&D.add("technicolor"),t.filter.polaroid&&D.add("polaroid"),t.filter.pixelate!==0&&D.add("pixelate",t.filter.pixelate),D.get()>0?i0=D.apply(a0):i0=D.draw(a0)):(t.debug&&b("input process error: cannot initialize filters"),w.webgl.supported=!1,t.filter.enabled=!1,h2(a0,i0))):(h2(a0,i0),D&&(D=null),w.filter=!!D),!n)return{tensor:null,canvas:i0};if(!i0)throw new Error("canvas error: cannot create output");let c,d=3;if(typeof ImageData!="undefined"&&e instanceof ImageData||e.data&&e.width&&e.height)if(w.browser&&r.browser)c=r.browser?r.browser.fromPixels(e):null;else{d=e.data.length/e.height/e.width;let p=new Uint8Array(e.data.buffer);c=r.tensor(p,[e.height,e.width,d],"int32")}else if((!Ie||i0.width!==Ie.width||i0.height!==Ie.height)&&(Ie=N0(i0.width,i0.height)),r.browser&&w.browser)t.backend==="webgl"||t.backend==="humangl"||t.backend==="webgpu"?c=r.browser.fromPixels(i0):(Ie=h2(i0),c=r.browser.fromPixels(Ie));else{let M=h2(i0).getContext("2d").getImageData(0,0,A,a);d=M.data.length/A/a;let P=new Uint8Array(M.data.buffer);c=r.tensor(P,[A,a,d])}if(d===4){let p=r.slice3d(c,[0,0,0],[-1,-1,3]);r.dispose(c),c=p}if(!c)throw new Error("input error: cannot create tensor");let y=r.cast(c,"float32"),l=t.filter.equalization?await p2(y):r.expandDims(y,0);return r.dispose([c,y]),{tensor:l,canvas:t.filter.return?i0:null}}async function n1(e,t){let n=!1;if(e.cacheSensitivity===0||!t.shape||t.shape.length!==4||t.shape[1]>2048||t.shape[2]>2048)return n;if(!k0.inputTensor)k0.inputTensor=r.clone(t);else if(k0.inputTensor.shape[1]!==t.shape[1]||k0.inputTensor.shape[2]!==t.shape[2])r.dispose(k0.inputTensor),k0.inputTensor=r.clone(t);else{let o={};o.diff=r.sub(t,k0.inputTensor),o.squared=r.mul(o.diff,o.diff),o.sum=r.sum(o.squared);let A=(await o.sum.data())[0]/(t.shape[1]||1)/(t.shape[2]||1)/255/3;r.dispose([k0.inputTensor,o.diff,o.squared,o.sum]),k0.inputTensor=r.clone(t),n=A<=(e.cacheSensitivity||0)}return n}async function o1(e,t,n){let o={};if(!t||!n||t.shape.length!==4||t.shape.length!==n.shape.length)return e.debug||b("invalid input tensor or tensor shapes do not match:",t.shape,n.shape),0;if(t.shape[0]!==1||n.shape[0]!==1||t.shape[3]!==3||n.shape[3]!==3)return e.debug||b("input tensors must be of shape [1, height, width, 3]:",t.shape,n.shape),0;o.input1=r.clone(t),o.input2=t.shape[1]!==n.shape[1]||t.shape[2]!==n.shape[2]?r.image.resizeBilinear(n,[t.shape[1],t.shape[2]]):r.clone(n),o.diff=r.sub(o.input1,o.input2),o.squared=r.mul(o.diff,o.diff),o.sum=r.sum(o.squared);let A=(await o.sum.data())[0]/(t.shape[1]||1)/(t.shape[2]||1)/255/3;return r.dispose([o.input1,o.input2,o.diff,o.squared,o.sum]),A}var M2=class{constructor(){k(this,"browser");k(this,"node");k(this,"worker");k(this,"platform","");k(this,"agent","");k(this,"backends",[]);k(this,"initial");k(this,"filter");k(this,"tfjs");k(this,"offscreen");k(this,"perfadd",!1);k(this,"tensorflow",{version:void 0,gpu:void 0});k(this,"wasm",{supported:void 0,backend:void 0,simd:void 0,multithread:void 0});k(this,"webgl",{supported:void 0,backend:void 0,version:void 0,renderer:void 0});k(this,"webgpu",{supported:void 0,backend:void 0,adapter:void 0});k(this,"cpu",{model:void 0,flags:[]});k(this,"kernels",[]);k(this,"Canvas");k(this,"Image");k(this,"ImageData");if(this.browser=typeof navigator!="undefined",this.node=typeof process!="undefined"&&typeof process.versions!="undefined"&&typeof process.versions.node!="undefined",this.tfjs={version:e2["tfjs-core"]},this.offscreen=typeof OffscreenCanvas!="undefined",this.initial=!0,this.worker=this.browser&&this.offscreen?typeof WorkerGlobalScope!="undefined":void 0,typeof navigator!="undefined"){let t=navigator.userAgent.match(/\(([^()]+)\)/g);if(t!=null&&t[0]){let n=t[0].match(/\(([^()]+)\)/g);this.platform=n!=null&&n[0]?n[0].replace(/\(|\)/g,""):"",this.agent=navigator.userAgent.replace(t[0],""),this.platform[1]&&(this.agent=this.agent.replace(t[1],"")),this.agent=this.agent.replace(/ /g," ")}}else typeof process!="undefined"&&(this.platform=`${process.platform} ${process.arch}`,this.agent=`NodeJS ${process.version}`)}async updateBackend(){this.backends=Object.keys(r.engine().registryFactory),this.tensorflow={version:r.backend().binding?r.backend().binding.TF_Version:void 0,gpu:r.backend().binding?r.backend().binding.isUsingGpuDevice():void 0},this.wasm.supported=typeof WebAssembly!="undefined",this.wasm.backend=this.backends.includes("wasm"),this.wasm.supported&&this.wasm.backend&&r.getBackend()==="wasm"&&(this.wasm.simd=r.env().get("WASM_HAS_SIMD_SUPPORT"),this.wasm.multithread=r.env().get("WASM_HAS_MULTITHREAD_SUPPORT"));let t=N0(100,100),n=t?t.getContext("webgl2"):void 0;if(this.webgl.supported=typeof n!="undefined",this.webgl.backend=this.backends.includes("webgl"),this.webgl.supported&&this.webgl.backend&&(r.getBackend()==="webgl"||r.getBackend()==="humangl")){let o=r.backend().gpgpu!=="undefined"?await r.backend().getGPGPUContext().gl:null;o&&(this.webgl.version=o.getParameter(o.VERSION),this.webgl.renderer=o.getParameter(o.RENDERER))}this.webgpu.supported=this.browser&&typeof navigator.gpu!="undefined",this.webgpu.backend=this.backends.includes("webgpu");try{if(this.webgpu.supported){let o=await navigator.gpu.requestAdapter();this.webgpu.adapter=o?o.name:void 0}}catch(o){this.webgpu.supported=!1}try{this.kernels=r.getKernelsForBackend(r.getBackend()).map(o=>o.kernelName.toLowerCase())}catch(o){}}updateCPU(){let t={model:"",flags:[]};this.node&&this.platform.startsWith("linux"),this.cpu?this.cpu=t:Object.defineProperty(this,"cpu",{value:t})}},w=new M2;var T2=class{constructor(){k(this,"config");k(this,"element");k(this,"stream");k(this,"start",async t=>{if(t!=null&&t.debug&&(this.config.debug=t==null?void 0:t.debug),t!=null&&t.crop&&(this.config.crop=t==null?void 0:t.crop),t!=null&&t.mode&&(this.config.mode=t==null?void 0:t.mode),t!=null&&t.width&&(this.config.width=t==null?void 0:t.width),t!=null&&t.height&&(this.config.height=t==null?void 0:t.height),t!=null&&t.element)if(typeof t.element=="string"){let s=document.getElementById(t.element);if(s&&s instanceof HTMLVideoElement)this.element=s;else{this.config.debug&&b("webcam","cannot get dom element",t.element);return}}else if(t.element instanceof HTMLVideoElement)this.element=t.element;else{this.config.debug&&b("webcam","unknown dom element",t.element);return}else this.element=document.createElement("video");let n={audio:!1,video:{facingMode:this.config.mode==="front"?"user":"environment",resizeMode:this.config.crop?"crop-and-scale":"none",width:{ideal:this.config.width>0?this.config.width:window.innerWidth},height:{ideal:this.config.height>0?this.config.height:window.innerHeight}}};if(this.element.addEventListener("play",()=>{this.config.debug&&b("webcam","play")}),this.element.addEventListener("pause",()=>{this.config.debug&&b("webcam","pause")}),this.element.addEventListener("click",async()=>{!this.element||!this.stream||(this.element.paused?await this.element.play():this.element.pause())}),!(navigator!=null&&navigator.mediaDevices)){this.config.debug&&b("webcam","no devices");return}try{this.stream=await navigator.mediaDevices.getUserMedia(n)}catch(s){b("webcam",s);return}if(!this.stream){this.config.debug&&b("webcam","no stream");return}this.element.srcObject=this.stream,await new Promise(s=>{this.element?this.element.onloadeddata=()=>s(!0):s(!1)}),await this.element.play(),this.config.debug&&b("webcam",{width:this.width,height:this.height,label:this.label,stream:this.stream,track:this.track,settings:this.settings,constraints:this.constraints,capabilities:this.capabilities})});k(this,"pause",()=>{this.element&&this.element.pause()});k(this,"play",async()=>{this.element&&await this.element.play()});k(this,"stop",()=>{this.config.debug&&b("webcam","stop"),this.track&&this.track.stop()});this.config={element:void 0,debug:!0,mode:"front",crop:!1,width:0,height:0}}get track(){if(!!this.stream)return this.stream.getVideoTracks()[0]}get capabilities(){if(!!this.track)return this.track.getCapabilities?this.track.getCapabilities():void 0}get constraints(){if(!!this.track)return this.track.getConstraints?this.track.getConstraints():void 0}get settings(){if(!this.stream)return;let t=this.stream.getVideoTracks()[0];return t.getSettings?t.getSettings():void 0}get label(){return this.track?this.track.label:""}get paused(){var t;return((t=this.element)==null?void 0:t.paused)||!1}get width(){var t;return((t=this.element)==null?void 0:t.videoWidth)||0}get height(){var t;return((t=this.element)==null?void 0:t.videoHeight)||0}};var ft={};te(ft,{age:()=>Mo,"anti-spoofing":()=>er,antispoof:()=>io,blazeface:()=>lo,"blazeface-back":()=>To,"blazeface-front":()=>vo,"blazepose-detect":()=>$o,"blazepose-detector2d":()=>Po,"blazepose-detector3d":()=>Ro,"blazepose-full":()=>ko,"blazepose-heavy":()=>wo,"blazepose-lite":()=>Eo,default:()=>yr,efficientpose:()=>zo,"efficientpose-i-lite":()=>tr,"efficientpose-ii-lite":()=>nr,"efficientpose-iv":()=>or,emotion:()=>co,faceboxes:()=>So,facemesh:()=>xo,"facemesh-attention":()=>No,"facemesh-attention-alt":()=>jo,"facemesh-detection-full":()=>Io,"facemesh-detection-short":()=>Oo,"facemesh-orig":()=>Co,faceres:()=>yo,"faceres-deep":()=>Lo,gear:()=>Wo,gender:()=>Go,"gender-ssrnet-imdb":()=>Fo,handdetect:()=>Bo,"handlandmark-full":()=>fo,"handlandmark-lite":()=>Ho,"handlandmark-sparse":()=>Vo,handskeleton:()=>Do,handtrack:()=>mo,"insightface-efficientnet-b0":()=>rr,"insightface-ghostnet-strides1":()=>sr,"insightface-ghostnet-strides2":()=>Ar,"insightface-mobilenet-emore":()=>ar,"insightface-mobilenet-swish":()=>ir,iris:()=>po,liveness:()=>uo,"mb3-centernet":()=>ho,meet:()=>Zo,mobileface:()=>Xo,mobilefacenet:()=>qo,models:()=>bo,"movenet-lightning":()=>go,"movenet-multipose":()=>Uo,"movenet-thunder":()=>Yo,nanodet:()=>Ko,"nanodet-e":()=>lr,"nanodet-g":()=>cr,"nanodet-m":()=>dr,"nanodet-t":()=>xr,posenet:()=>Jo,rvm:()=>Qo,selfie:()=>_o});var io=853098,lo=538928,co=820516,xo=1477958,yo=6978814,fo=5431368,mo=2964837,po=2599092,uo=592976,ho=4030290,bo=0,go=4650216,Mo=161240,To=538928,vo=402048,Po=7499400,Ro=5928856,ko=6338290,wo=27501554,Eo=2725490,zo=5651240,So=2013002,jo=2387598,No=2382414,Io=1026192,Oo=201268,Co=2955780,Lo=13957620,Wo=1498916,Fo=161236,Go=201808,Bo=3515612,Ho=2023432,Vo=5286322,Do=5502280,Zo=372228,Xo=2183192,qo=5171976,Uo=9448838,Yo=12477112,Ko=7574558,Jo=5032780,Qo=3739355,_o=212886,$o=5928804,er=853098,tr=2269064,nr=5651240,or=25643252,rr=13013224,sr=8093408,Ar=8049584,ar=6938536,ir=12168584,lr=12319156,cr=7574558,dr=1887474,xr=5294216,yr={antispoof:io,blazeface:lo,emotion:co,facemesh:xo,faceres:yo,"handlandmark-full":fo,handtrack:mo,iris:po,liveness:uo,"mb3-centernet":ho,models:bo,"movenet-lightning":go,age:Mo,"blazeface-back":To,"blazeface-front":vo,"blazepose-detector2d":Po,"blazepose-detector3d":Ro,"blazepose-full":ko,"blazepose-heavy":wo,"blazepose-lite":Eo,efficientpose:zo,faceboxes:So,"facemesh-attention-alt":jo,"facemesh-attention":No,"facemesh-detection-full":Io,"facemesh-detection-short":Oo,"facemesh-orig":Co,"faceres-deep":Lo,gear:Wo,"gender-ssrnet-imdb":Fo,gender:Go,handdetect:Bo,"handlandmark-lite":Ho,"handlandmark-sparse":Vo,handskeleton:Do,meet:Zo,mobileface:Xo,mobilefacenet:qo,"movenet-multipose":Uo,"movenet-thunder":Yo,nanodet:Ko,posenet:Jo,rvm:Qo,selfie:_o,"blazepose-detect":$o,"anti-spoofing":er,"efficientpose-i-lite":tr,"efficientpose-ii-lite":nr,"efficientpose-iv":or,"insightface-efficientnet-b0":rr,"insightface-ghostnet-strides1":sr,"insightface-ghostnet-strides2":Ar,"insightface-mobilenet-emore":ar,"insightface-mobilenet-swish":ir,"nanodet-e":lr,"nanodet-g":cr,"nanodet-m":dr,"nanodet-t":xr};var p0={cacheModels:!0,cacheSupported:!0,verbose:!0,debug:!1,modelBasePath:""},I0={};async function fr(e,t){return p0.debug&&b("load model fetch:",e,t),fetch(e,t)}function r1(e){p0.cacheModels=e.cacheModels,p0.verbose=e.debug,p0.modelBasePath=e.modelBasePath}async function O(e){var d,y,l,m;let t=Y5(p0.modelBasePath,e||"");t.toLowerCase().endsWith(".json")||(t+=".json");let n=t.includes("/")?t.split("/"):t.split("\\"),o=n[n.length-1].replace(".json",""),s="indexeddb://"+o;I0[o]={name:o,sizeFromManifest:0,sizeLoadedWeights:0,sizeDesired:ft[o],inCache:!1},p0.cacheSupported=typeof indexedDB!="undefined";let A={};try{A=p0.cacheSupported&&p0.cacheModels?await r.io.listModels():{}}catch(x){p0.cacheSupported=!1}I0[o].inCache=p0.cacheSupported&&p0.cacheModels&&Object.keys(A).includes(s);let a=typeof fetch=="undefined"?{}:{fetchFunc:(x,p)=>fr(x,p)},i=new ct(I0[o].inCache?s:t,a),c=!1;try{i.findIOHandler(),p0.debug&&b("model load handler:",i.handler)}catch(x){b("error finding model i/o handler:",t,x)}try{let x=await((d=i.handler)==null?void 0:d.load())||null;I0[o].sizeFromManifest=((y=x==null?void 0:x.weightData)==null?void 0:y.byteLength)||0,x?i.loadSync(x):i=await r.loadGraphModel(I0[o].inCache?s:t,a),I0[o].sizeLoadedWeights=((m=(l=i.artifacts)==null?void 0:l.weightData)==null?void 0:m.byteLength)||0,p0.verbose&&b("load:",{model:o,url:i.modelUrl,bytes:I0[o].sizeLoadedWeights}),c=!0}catch(x){b("error loading model:",t,x)}if(c&&p0.cacheModels&&p0.cacheSupported&&!I0[o].inCache)try{let x=await i.save(s);p0.debug&&b("model saved:",s,x)}catch(x){b("error saving model:",t,x)}return i}var mt="2.11.1";var d2={};te(d2,{Models:()=>c2,getModelStats:()=>j5,load:()=>N5,reset:()=>nt,validate:()=>rt,validateModel:()=>ot});var s0,v2=[],pt=Number.MAX_SAFE_INTEGER,s1=0,A1=0;async function a1(e){var t;return w.initial&&(s0=null),s0?e.debug&&b("cached model:",s0.modelUrl):s0=await O((t=e.face.antispoof)==null?void 0:t.modelPath),s0}async function ut(e,t,n,o){var a,i;if(!s0||!(s0!=null&&s0.executor))return 0;let s=(((a=t.face.antispoof)==null?void 0:a.skipTime)||0)>T()-A1,A=pt<(((i=t.face.antispoof)==null?void 0:i.skipFrames)||0);return t.skipAllowed&&s&&A&&s1===o&&v2[n]?(pt++,v2[n]):(pt=0,new Promise(async c=>{let d=r.image.resizeBilinear(e,[s0!=null&&s0.inputs[0].shape?s0.inputs[0].shape[2]:0,s0!=null&&s0.inputs[0].shape?s0.inputs[0].shape[1]:0],!1),y=s0==null?void 0:s0.execute(d),l=(await y.data())[0];v2[n]=Math.round(100*l)/100,s1=o,A1=T(),r.dispose([d,y]),c(v2[n])}))}var O0={silhouette:[10,338,297,332,284,251,389,356,454,323,361,288,397,365,379,378,400,377,152,148,176,149,150,136,172,58,132,93,234,127,162,21,54,103,67,109],lipsUpperOuter:[185,40,39,37,0,267,269,270,409],lipsLowerOuter:[61,146,91,181,84,17,314,405,321,375,291],lipsUpperInner:[191,80,81,82,13,312,311,310,415],lipsLowerInner:[78,95,88,178,87,14,317,402,318,324,308],lipsLowerSemiOuter:[76,77,90,180,85,16,315,404,320,307,306],lipsUpperSemiOuter:[184,74,73,72,11,302,303,304,408],lipsLowerSemiInner:[62,96,89,179,86,15,316,403,319,325,292],lipsUpperSemiInner:[183,42,41,38,12,268,271,272,407],rightEyeUpper0:[246,161,160,159,158,157,173],rightEyeLower0:[33,7,163,144,145,153,154,155,133],rightEyeUpper1:[247,30,29,27,28,56,190],rightEyeLower1:[130,25,110,24,23,22,26,112,243],rightEyeUpper2:[113,225,224,223,222,221,189],rightEyeLower2:[226,31,228,229,230,231,232,233,244],rightEyeLower3:[143,111,117,118,119,120,121,128,245],rightEyebrowUpper:[156,70,63,105,66,107,55,193],rightEyebrowLower:[35,124,46,53,52,65],rightEyeIris:[473,474,475,476,477],leftEyeUpper0:[466,388,387,386,385,384,398],leftEyeLower0:[263,249,390,373,374,380,381,382,362],leftEyeUpper1:[467,260,259,257,258,286,414],leftEyeLower1:[359,255,339,254,253,252,256,341,463],leftEyeUpper2:[342,445,444,443,442,441,413],leftEyeLower2:[446,261,448,449,450,451,452,453,464],leftEyeLower3:[372,340,346,347,348,349,350,357,465],leftEyebrowUpper:[383,300,293,334,296,336,285,417],leftEyebrowLower:[265,353,276,283,282,295],leftEyeIris:[468,469,470,471,472],midwayBetweenEyes:[168],noseTip:[1],noseBottom:[2],noseRightCorner:[98],noseLeftCorner:[327],rightCheek:[205],leftCheek:[425]},ht={count:468,mouth:13,symmetryLine:[13,O0.midwayBetweenEyes[0]]},ue={leftEye:0,rightEye:1,nose:2,mouth:3,leftEar:4,rightEar:5,symmetryLine:[3,2]},bt=[{key:"EyeUpper0",indices:[9,10,11,12,13,14,15]},{key:"EyeUpper1",indices:[25,26,27,28,29,30,31]},{key:"EyeUpper2",indices:[41,42,43,44,45,46,47]},{key:"EyeLower0",indices:[0,1,2,3,4,5,6,7,8]},{key:"EyeLower1",indices:[16,17,18,19,20,21,22,23,24]},{key:"EyeLower2",indices:[32,33,34,35,36,37,38,39,40]},{key:"EyeLower3",indices:[54,55,56,57,58,59,60,61,62]},{key:"EyebrowUpper",indices:[63,64,65,66,67,68,69,70]},{key:"EyebrowLower",indices:[48,49,50,51,52,53]}],t2=[[.499976992607117,.652534008026123],[.500025987625122,.547487020492554],[.499974012374878,.602371990680695],[.482113003730774,.471979022026062],[.500150978565216,.527155995368958],[.499909996986389,.498252987861633],[.499523013830185,.40106201171875],[.289712011814117,.380764007568359],[.499954998493195,.312398016452789],[.499987006187439,.269918978214264],[.500023007392883,.107050001621246],[.500023007392883,.666234016418457],[.5000159740448,.679224014282227],[.500023007392883,.692348003387451],[.499976992607117,.695277988910675],[.499976992607117,.70593398809433],[.499976992607117,.719385027885437],[.499976992607117,.737019002437592],[.499967992305756,.781370997428894],[.499816000461578,.562981009483337],[.473773002624512,.573909997940063],[.104906998574734,.254140973091125],[.365929991006851,.409575998783112],[.338757991790771,.41302502155304],[.311120003461838,.409460008144379],[.274657994508743,.389131009578705],[.393361985683441,.403706014156342],[.345234006643295,.344011008739471],[.370094001293182,.346076011657715],[.319321990013123,.347265005111694],[.297903001308441,.353591024875641],[.24779200553894,.410809993743896],[.396889001131058,.842755019664764],[.280097991228104,.375599980354309],[.106310002505779,.399955987930298],[.2099249958992,.391353011131287],[.355807989835739,.534406006336212],[.471751004457474,.65040397644043],[.474155008792877,.680191993713379],[.439785003662109,.657229006290436],[.414617002010345,.66654098033905],[.450374007225037,.680860996246338],[.428770989179611,.682690978050232],[.374971002340317,.727805018424988],[.486716985702515,.547628998756409],[.485300987958908,.527395009994507],[.257764995098114,.314490020275116],[.401223003864288,.455172002315521],[.429818987846375,.548614978790283],[.421351999044418,.533740997314453],[.276895999908447,.532056987285614],[.483370006084442,.499586999416351],[.33721199631691,.282882988452911],[.296391993761063,.293242990970612],[.169294998049736,.193813979625702],[.447580009698868,.302609980106354],[.392390012741089,.353887975215912],[.354490011930466,.696784019470215],[.067304998636246,.730105042457581],[.442739009857178,.572826027870178],[.457098007202148,.584792017936707],[.381974011659622,.694710969924927],[.392388999462128,.694203019142151],[.277076005935669,.271932005882263],[.422551989555359,.563233017921448],[.385919004678726,.281364023685455],[.383103013038635,.255840003490448],[.331431001424789,.119714021682739],[.229923993349075,.232002973556519],[.364500999450684,.189113974571228],[.229622006416321,.299540996551514],[.173287004232407,.278747975826263],[.472878992557526,.666198015213013],[.446828007698059,.668527007102966],[.422762006521225,.673889994621277],[.445307999849319,.580065965652466],[.388103008270264,.693961024284363],[.403039008378983,.706539988517761],[.403629004955292,.693953037261963],[.460041999816895,.557139039039612],[.431158006191254,.692366003990173],[.452181994915009,.692366003990173],[.475387006998062,.692366003990173],[.465828001499176,.779190003871918],[.472328990697861,.736225962638855],[.473087012767792,.717857003211975],[.473122000694275,.704625964164734],[.473033010959625,.695277988910675],[.427942007780075,.695277988910675],[.426479011774063,.703539967536926],[.423162013292313,.711845993995667],[.4183090031147,.720062971115112],[.390094995498657,.639572978019714],[.013953999616206,.560034036636353],[.499913990497589,.58014702796936],[.413199990987778,.69539999961853],[.409626007080078,.701822996139526],[.468080013990402,.601534962654114],[.422728985548019,.585985004901886],[.463079988956451,.593783974647522],[.37211999297142,.47341400384903],[.334562003612518,.496073007583618],[.411671012639999,.546965003013611],[.242175996303558,.14767599105835],[.290776997804642,.201445996761322],[.327338010072708,.256527006626129],[.399509996175766,.748921036720276],[.441727995872498,.261676013469696],[.429764986038208,.187834024429321],[.412198007106781,.108901023864746],[.288955003023148,.398952007293701],[.218936994671822,.435410976409912],[.41278201341629,.398970007896423],[.257135003805161,.355440020561218],[.427684992551804,.437960982322693],[.448339998722076,.536936044692993],[.178560003638268,.45755398273468],[.247308000922203,.457193970680237],[.286267012357712,.467674970626831],[.332827985286713,.460712015628815],[.368755996227264,.447206974029541],[.398963987827301,.432654976844788],[.476410001516342,.405806005001068],[.189241006970406,.523923993110657],[.228962004184723,.348950982093811],[.490725994110107,.562400996685028],[.404670000076294,.485132992267609],[.019469000399113,.401564002037048],[.426243007183075,.420431017875671],[.396993011236191,.548797011375427],[.266469985246658,.376977026462555],[.439121007919312,.51895797252655],[.032313998788595,.644356966018677],[.419054001569748,.387154996395111],[.462783008813858,.505746960639954],[.238978996872902,.779744982719421],[.198220998048782,.831938028335571],[.107550002634525,.540755033493042],[.183610007166862,.740257024765015],[.134409993886948,.333683013916016],[.385764002799988,.883153975009918],[.490967005491257,.579378008842468],[.382384985685349,.508572995662689],[.174399003386497,.397670984268188],[.318785011768341,.39623498916626],[.343364000320435,.400596976280212],[.396100014448166,.710216999053955],[.187885001301765,.588537991046906],[.430987000465393,.944064974784851],[.318993002176285,.898285031318665],[.266247987747192,.869701027870178],[.500023007392883,.190576016902924],[.499976992607117,.954452991485596],[.366169989109039,.398822009563446],[.393207013607025,.39553701877594],[.410373002290726,.391080021858215],[.194993004202843,.342101991176605],[.388664990663528,.362284004688263],[.365961998701096,.355970978736877],[.343364000320435,.355356991291046],[.318785011768341,.35834002494812],[.301414996385574,.363156020641327],[.058132998645306,.319076001644135],[.301414996385574,.387449026107788],[.499987989664078,.618434011936188],[.415838003158569,.624195992946625],[.445681989192963,.566076993942261],[.465844005346298,.620640993118286],[.49992299079895,.351523995399475],[.288718998432159,.819945991039276],[.335278987884521,.852819979190826],[.440512001514435,.902418971061707],[.128294005990028,.791940987110138],[.408771991729736,.373893976211548],[.455606997013092,.451801002025604],[.499877005815506,.908990025520325],[.375436991453171,.924192011356354],[.11421000212431,.615022003650665],[.448662012815475,.695277988910675],[.4480200111866,.704632043838501],[.447111994028091,.715808033943176],[.444831997156143,.730794012546539],[.430011987686157,.766808986663818],[.406787008047104,.685672998428345],[.400738000869751,.681069016456604],[.392399996519089,.677703022956848],[.367855995893478,.663918972015381],[.247923001646996,.601333022117615],[.452769994735718,.420849978923798],[.43639200925827,.359887003898621],[.416164010763168,.368713974952698],[.413385987281799,.692366003990173],[.228018000721931,.683571994304657],[.468268007040024,.352671027183533],[.411361992359161,.804327011108398],[.499989002943039,.469825029373169],[.479153990745544,.442654013633728],[.499974012374878,.439637005329132],[.432112008333206,.493588984012604],[.499886006116867,.866917014122009],[.49991300702095,.821729004383087],[.456548988819122,.819200992584229],[.344549000263214,.745438992977142],[.37890899181366,.574010014533997],[.374292999505997,.780184984207153],[.319687992334366,.570737957954407],[.357154995203018,.604269981384277],[.295284003019333,.621580958366394],[.447750002145767,.862477004528046],[.410986006259918,.508723020553589],[.31395098567009,.775308012962341],[.354128003120422,.812552988529205],[.324548006057739,.703992962837219],[.189096003770828,.646299958229065],[.279776990413666,.71465802192688],[.1338230073452,.682700991630554],[.336768001317978,.644733011722565],[.429883986711502,.466521978378296],[.455527991056442,.548622965812683],[.437114000320435,.558896005153656],[.467287987470627,.529924988746643],[.414712011814117,.335219979286194],[.37704598903656,.322777986526489],[.344107985496521,.320150971412659],[.312875986099243,.32233202457428],[.283526003360748,.333190023899078],[.241245999932289,.382785975933075],[.102986000478268,.468762993812561],[.267612010240555,.424560010433197],[.297879010438919,.433175981044769],[.333433985710144,.433878004550934],[.366427004337311,.426115989685059],[.396012008190155,.416696012020111],[.420121014118195,.41022801399231],[.007561000064015,.480777025222778],[.432949006557465,.569517970085144],[.458638995885849,.479089021682739],[.473466008901596,.545744001865387],[.476087987422943,.563830018043518],[.468472003936768,.555056989192963],[.433990985155106,.582361996173859],[.483518004417419,.562983989715576],[.482482999563217,.57784903049469],[.42645001411438,.389798998832703],[.438998997211456,.39649498462677],[.450067013502121,.400434017181396],[.289712011814117,.368252992630005],[.276670008897781,.363372981548309],[.517862021923065,.471948027610779],[.710287988185883,.380764007568359],[.526226997375488,.573909997940063],[.895093023777008,.254140973091125],[.634069979190826,.409575998783112],[.661242008209229,.41302502155304],[.688880026340485,.409460008144379],[.725341975688934,.389131009578705],[.606630027294159,.40370500087738],[.654766023159027,.344011008739471],[.629905998706818,.346076011657715],[.680678009986877,.347265005111694],[.702096998691559,.353591024875641],[.75221198797226,.410804986953735],[.602918028831482,.842862963676453],[.719901978969574,.375599980354309],[.893692970275879,.399959981441498],[.790081977844238,.391354024410248],[.643998026847839,.534487962722778],[.528249025344849,.65040397644043],[.525849997997284,.680191040039062],[.560214996337891,.657229006290436],[.585384011268616,.66654098033905],[.549625992774963,.680860996246338],[.57122802734375,.682691991329193],[.624852001667023,.72809898853302],[.513050019741058,.547281980514526],[.51509702205658,.527251958847046],[.742246985435486,.314507007598877],[.598631024360657,.454979002475739],[.570338010787964,.548575043678284],[.578631997108459,.533622980117798],[.723087012767792,.532054007053375],[.516445994377136,.499638974666595],[.662801027297974,.282917976379395],[.70362401008606,.293271005153656],[.830704987049103,.193813979625702],[.552385985851288,.302568018436432],[.607609987258911,.353887975215912],[.645429015159607,.696707010269165],[.932694971561432,.730105042457581],[.557260990142822,.572826027870178],[.542901992797852,.584792017936707],[.6180260181427,.694710969924927],[.607590973377228,.694203019142151],[.722943007946014,.271963000297546],[.577413976192474,.563166975975037],[.614082992076874,.281386971473694],[.616907000541687,.255886018276215],[.668509006500244,.119913995265961],[.770092010498047,.232020974159241],[.635536015033722,.189248979091644],[.77039098739624,.299556016921997],[.826722025871277,.278755009174347],[.527121007442474,.666198015213013],[.553171992301941,.668527007102966],[.577238023281097,.673889994621277],[.554691970348358,.580065965652466],[.611896991729736,.693961024284363],[.59696102142334,.706539988517761],[.596370995044708,.693953037261963],[.539958000183105,.557139039039612],[.568841993808746,.692366003990173],[.547818005084991,.692366003990173],[.52461302280426,.692366003990173],[.534089982509613,.779141008853912],[.527670979499817,.736225962638855],[.526912987232208,.717857003211975],[.526877999305725,.704625964164734],[.526966989040375,.695277988910675],[.572058022022247,.695277988910675],[.573521018028259,.703539967536926],[.57683801651001,.711845993995667],[.581691026687622,.720062971115112],[.609944999217987,.639909982681274],[.986046016216278,.560034036636353],[.5867999792099,.69539999961853],[.590372025966644,.701822996139526],[.531915009021759,.601536989212036],[.577268004417419,.585934996604919],[.536915004253387,.593786001205444],[.627542972564697,.473352015018463],[.665585994720459,.495950996875763],[.588353991508484,.546862006187439],[.757824003696442,.14767599105835],[.709249973297119,.201507985591888],[.672684013843536,.256581008434296],[.600408971309662,.74900496006012],[.55826598405838,.261672019958496],[.570303976535797,.187870979309082],[.588165998458862,.109044015407562],[.711045026779175,.398952007293701],[.781069993972778,.435405015945435],[.587247014045715,.398931980133057],[.742869973182678,.355445981025696],[.572156012058258,.437651991844177],[.55186802148819,.536570012569427],[.821442008018494,.457556009292603],[.752701997756958,.457181990146637],[.71375697851181,.467626988887787],[.66711300611496,.460672974586487],[.631101012229919,.447153985500336],[.6008620262146,.432473003864288],[.523481011390686,.405627012252808],[.810747981071472,.523926019668579],[.771045982837677,.348959028720856],[.509127020835876,.562718033790588],[.595292985439301,.485023975372314],[.980530977249146,.401564002037048],[.573499977588654,.420000016689301],[.602994978427887,.548687994480133],[.733529984951019,.376977026462555],[.560611009597778,.519016981124878],[.967685997486115,.644356966018677],[.580985009670258,.387160003185272],[.537728011608124,.505385041236877],[.760966002941132,.779752969741821],[.801778972148895,.831938028335571],[.892440974712372,.54076099395752],[.816350996494293,.740260004997253],[.865594983100891,.333687007427216],[.614073991775513,.883246004581451],[.508952975273132,.579437971115112],[.617941975593567,.508316040039062],[.825608015060425,.397674977779388],[.681214988231659,.39623498916626],[.656635999679565,.400596976280212],[.603900015354156,.710216999053955],[.81208598613739,.588539004325867],[.56801301240921,.944564998149872],[.681007981300354,.898285031318665],[.733752012252808,.869701027870178],[.633830010890961,.398822009563446],[.606792986392975,.39553701877594],[.589659988880157,.391062021255493],[.805015981197357,.342108011245728],[.611334979534149,.362284004688263],[.634037971496582,.355970978736877],[.656635999679565,.355356991291046],[.681214988231659,.35834002494812],[.698584973812103,.363156020641327],[.941866993904114,.319076001644135],[.698584973812103,.387449026107788],[.584177017211914,.624107003211975],[.554318010807037,.566076993942261],[.534153997898102,.62064003944397],[.711217999458313,.819975018501282],[.664629995822906,.852871000766754],[.559099972248077,.902631998062134],[.871706008911133,.791940987110138],[.591234028339386,.373893976211548],[.544341027736664,.451583981513977],[.624562978744507,.924192011356354],[.88577002286911,.615028977394104],[.551338016986847,.695277988910675],[.551980018615723,.704632043838501],[.552887976169586,.715808033943176],[.555167973041534,.730794012546539],[.569944024085999,.767035007476807],[.593203008174896,.685675978660583],[.599261999130249,.681069016456604],[.607599973678589,.677703022956848],[.631937980651855,.663500010967255],[.752032995223999,.601315021514893],[.547226011753082,.420395016670227],[.563543975353241,.359827995300293],[.583841025829315,.368713974952698],[.586614012718201,.692366003990173],[.771915018558502,.683578014373779],[.531597018241882,.352482974529266],[.588370978832245,.804440975189209],[.52079701423645,.442565023899078],[.567984998226166,.493479013442993],[.543282985687256,.819254994392395],[.655317008495331,.745514988899231],[.621008992195129,.574018001556396],[.625559985637665,.78031200170517],[.680198013782501,.570719003677368],[.64276397228241,.604337990283966],[.704662978649139,.621529996395111],[.552012026309967,.862591981887817],[.589071989059448,.508637011051178],[.685944974422455,.775357007980347],[.645735025405884,.812640011310577],[.675342977046967,.703978002071381],[.810858011245728,.646304965019226],[.72012197971344,.714666962623596],[.866151988506317,.682704985141754],[.663187026977539,.644596993923187],[.570082008838654,.466325998306274],[.544561982154846,.548375964164734],[.562758982181549,.558784961700439],[.531987011432648,.530140042304993],[.585271000862122,.335177004337311],[.622952997684479,.32277899980545],[.655896008014679,.320163011550903],[.687132000923157,.322345972061157],[.716481983661652,.333200991153717],[.758756995201111,.382786989212036],[.897013008594513,.468769013881683],[.732392013072968,.424547016620636],[.70211398601532,.433162987232208],[.66652500629425,.433866024017334],[.633504986763,.426087975502014],[.603875994682312,.416586995124817],[.579657971858978,.409945011138916],[.992439985275269,.480777025222778],[.567192018032074,.569419980049133],[.54136598110199,.478899002075195],[.526564002037048,.546118021011353],[.523913025856018,.563830018043518],[.531529009342194,.555056989192963],[.566035985946655,.582329034805298],[.51631098985672,.563053965568542],[.5174720287323,.577877044677734],[.573594987392426,.389806985855103],[.560697972774506,.395331978797913],[.549755990505219,.399751007556915],[.710287988185883,.368252992630005],[.723330020904541,.363372981548309]],he=[127,34,139,11,0,37,232,231,120,72,37,39,128,121,47,232,121,128,104,69,67,175,171,148,157,154,155,118,50,101,73,39,40,9,151,108,48,115,131,194,204,211,74,40,185,80,42,183,40,92,186,230,229,118,202,212,214,83,18,17,76,61,146,160,29,30,56,157,173,106,204,194,135,214,192,203,165,98,21,71,68,51,45,4,144,24,23,77,146,91,205,50,187,201,200,18,91,106,182,90,91,181,85,84,17,206,203,36,148,171,140,92,40,39,193,189,244,159,158,28,247,246,161,236,3,196,54,68,104,193,168,8,117,228,31,189,193,55,98,97,99,126,47,100,166,79,218,155,154,26,209,49,131,135,136,150,47,126,217,223,52,53,45,51,134,211,170,140,67,69,108,43,106,91,230,119,120,226,130,247,63,53,52,238,20,242,46,70,156,78,62,96,46,53,63,143,34,227,173,155,133,123,117,111,44,125,19,236,134,51,216,206,205,154,153,22,39,37,167,200,201,208,36,142,100,57,212,202,20,60,99,28,158,157,35,226,113,160,159,27,204,202,210,113,225,46,43,202,204,62,76,77,137,123,116,41,38,72,203,129,142,64,98,240,49,102,64,41,73,74,212,216,207,42,74,184,169,170,211,170,149,176,105,66,69,122,6,168,123,147,187,96,77,90,65,55,107,89,90,180,101,100,120,63,105,104,93,137,227,15,86,85,129,102,49,14,87,86,55,8,9,100,47,121,145,23,22,88,89,179,6,122,196,88,95,96,138,172,136,215,58,172,115,48,219,42,80,81,195,3,51,43,146,61,171,175,199,81,82,38,53,46,225,144,163,110,246,33,7,52,65,66,229,228,117,34,127,234,107,108,69,109,108,151,48,64,235,62,78,191,129,209,126,111,35,143,163,161,246,117,123,50,222,65,52,19,125,141,221,55,65,3,195,197,25,7,33,220,237,44,70,71,139,122,193,245,247,130,33,71,21,162,153,158,159,170,169,150,188,174,196,216,186,92,144,160,161,2,97,167,141,125,241,164,167,37,72,38,12,145,159,160,38,82,13,63,68,71,226,35,111,158,153,154,101,50,205,206,92,165,209,198,217,165,167,97,220,115,218,133,112,243,239,238,241,214,135,169,190,173,133,171,208,32,125,44,237,86,87,178,85,86,179,84,85,180,83,84,181,201,83,182,137,93,132,76,62,183,61,76,184,57,61,185,212,57,186,214,207,187,34,143,156,79,239,237,123,137,177,44,1,4,201,194,32,64,102,129,213,215,138,59,166,219,242,99,97,2,94,141,75,59,235,24,110,228,25,130,226,23,24,229,22,23,230,26,22,231,112,26,232,189,190,243,221,56,190,28,56,221,27,28,222,29,27,223,30,29,224,247,30,225,238,79,20,166,59,75,60,75,240,147,177,215,20,79,166,187,147,213,112,233,244,233,128,245,128,114,188,114,217,174,131,115,220,217,198,236,198,131,134,177,132,58,143,35,124,110,163,7,228,110,25,356,389,368,11,302,267,452,350,349,302,303,269,357,343,277,452,453,357,333,332,297,175,152,377,384,398,382,347,348,330,303,304,270,9,336,337,278,279,360,418,262,431,304,408,409,310,415,407,270,409,410,450,348,347,422,430,434,313,314,17,306,307,375,387,388,260,286,414,398,335,406,418,364,367,416,423,358,327,251,284,298,281,5,4,373,374,253,307,320,321,425,427,411,421,313,18,321,405,406,320,404,405,315,16,17,426,425,266,377,400,369,322,391,269,417,465,464,386,257,258,466,260,388,456,399,419,284,332,333,417,285,8,346,340,261,413,441,285,327,460,328,355,371,329,392,439,438,382,341,256,429,420,360,364,394,379,277,343,437,443,444,283,275,440,363,431,262,369,297,338,337,273,375,321,450,451,349,446,342,467,293,334,282,458,461,462,276,353,383,308,324,325,276,300,293,372,345,447,382,398,362,352,345,340,274,1,19,456,248,281,436,427,425,381,256,252,269,391,393,200,199,428,266,330,329,287,273,422,250,462,328,258,286,384,265,353,342,387,259,257,424,431,430,342,353,276,273,335,424,292,325,307,366,447,345,271,303,302,423,266,371,294,455,460,279,278,294,271,272,304,432,434,427,272,407,408,394,430,431,395,369,400,334,333,299,351,417,168,352,280,411,325,319,320,295,296,336,319,403,404,330,348,349,293,298,333,323,454,447,15,16,315,358,429,279,14,15,316,285,336,9,329,349,350,374,380,252,318,402,403,6,197,419,318,319,325,367,364,365,435,367,397,344,438,439,272,271,311,195,5,281,273,287,291,396,428,199,311,271,268,283,444,445,373,254,339,263,466,249,282,334,296,449,347,346,264,447,454,336,296,299,338,10,151,278,439,455,292,407,415,358,371,355,340,345,372,390,249,466,346,347,280,442,443,282,19,94,370,441,442,295,248,419,197,263,255,359,440,275,274,300,383,368,351,412,465,263,467,466,301,368,389,380,374,386,395,378,379,412,351,419,436,426,322,373,390,388,2,164,393,370,462,461,164,0,267,302,11,12,374,373,387,268,12,13,293,300,301,446,261,340,385,384,381,330,266,425,426,423,391,429,355,437,391,327,326,440,457,438,341,382,362,459,457,461,434,430,394,414,463,362,396,369,262,354,461,457,316,403,402,315,404,403,314,405,404,313,406,405,421,418,406,366,401,361,306,408,407,291,409,408,287,410,409,432,436,410,434,416,411,264,368,383,309,438,457,352,376,401,274,275,4,421,428,262,294,327,358,433,416,367,289,455,439,462,370,326,2,326,370,305,460,455,254,449,448,255,261,446,253,450,449,252,451,450,256,452,451,341,453,452,413,464,463,441,413,414,258,442,441,257,443,442,259,444,443,260,445,444,467,342,445,459,458,250,289,392,290,290,328,460,376,433,435,250,290,392,411,416,433,341,463,464,453,464,465,357,465,412,343,412,399,360,363,440,437,399,456,420,456,363,401,435,288,372,383,353,339,255,249,448,261,255,133,243,190,133,155,112,33,246,247,33,130,25,398,384,286,362,398,414,362,463,341,263,359,467,263,249,255,466,467,260,75,60,166,238,239,79,162,127,139,72,11,37,121,232,120,73,72,39,114,128,47,233,232,128,103,104,67,152,175,148,173,157,155,119,118,101,74,73,40,107,9,108,49,48,131,32,194,211,184,74,185,191,80,183,185,40,186,119,230,118,210,202,214,84,83,17,77,76,146,161,160,30,190,56,173,182,106,194,138,135,192,129,203,98,54,21,68,5,51,4,145,144,23,90,77,91,207,205,187,83,201,18,181,91,182,180,90,181,16,85,17,205,206,36,176,148,140,165,92,39,245,193,244,27,159,28,30,247,161,174,236,196,103,54,104,55,193,8,111,117,31,221,189,55,240,98,99,142,126,100,219,166,218,112,155,26,198,209,131,169,135,150,114,47,217,224,223,53,220,45,134,32,211,140,109,67,108,146,43,91,231,230,120,113,226,247,105,63,52,241,238,242,124,46,156,95,78,96,70,46,63,116,143,227,116,123,111,1,44,19,3,236,51,207,216,205,26,154,22,165,39,167,199,200,208,101,36,100,43,57,202,242,20,99,56,28,157,124,35,113,29,160,27,211,204,210,124,113,46,106,43,204,96,62,77,227,137,116,73,41,72,36,203,142,235,64,240,48,49,64,42,41,74,214,212,207,183,42,184,210,169,211,140,170,176,104,105,69,193,122,168,50,123,187,89,96,90,66,65,107,179,89,180,119,101,120,68,63,104,234,93,227,16,15,85,209,129,49,15,14,86,107,55,9,120,100,121,153,145,22,178,88,179,197,6,196,89,88,96,135,138,136,138,215,172,218,115,219,41,42,81,5,195,51,57,43,61,208,171,199,41,81,38,224,53,225,24,144,110,105,52,66,118,229,117,227,34,234,66,107,69,10,109,151,219,48,235,183,62,191,142,129,126,116,111,143,7,163,246,118,117,50,223,222,52,94,19,141,222,221,65,196,3,197,45,220,44,156,70,139,188,122,245,139,71,162,145,153,159,149,170,150,122,188,196,206,216,92,163,144,161,164,2,167,242,141,241,0,164,37,11,72,12,144,145,160,12,38,13,70,63,71,31,226,111,157,158,154,36,101,205,203,206,165,126,209,217,98,165,97,237,220,218,237,239,241,210,214,169,140,171,32,241,125,237,179,86,178,180,85,179,181,84,180,182,83,181,194,201,182,177,137,132,184,76,183,185,61,184,186,57,185,216,212,186,192,214,187,139,34,156,218,79,237,147,123,177,45,44,4,208,201,32,98,64,129,192,213,138,235,59,219,141,242,97,97,2,141,240,75,235,229,24,228,31,25,226,230,23,229,231,22,230,232,26,231,233,112,232,244,189,243,189,221,190,222,28,221,223,27,222,224,29,223,225,30,224,113,247,225,99,60,240,213,147,215,60,20,166,192,187,213,243,112,244,244,233,245,245,128,188,188,114,174,134,131,220,174,217,236,236,198,134,215,177,58,156,143,124,25,110,7,31,228,25,264,356,368,0,11,267,451,452,349,267,302,269,350,357,277,350,452,357,299,333,297,396,175,377,381,384,382,280,347,330,269,303,270,151,9,337,344,278,360,424,418,431,270,304,409,272,310,407,322,270,410,449,450,347,432,422,434,18,313,17,291,306,375,259,387,260,424,335,418,434,364,416,391,423,327,301,251,298,275,281,4,254,373,253,375,307,321,280,425,411,200,421,18,335,321,406,321,320,405,314,315,17,423,426,266,396,377,369,270,322,269,413,417,464,385,386,258,248,456,419,298,284,333,168,417,8,448,346,261,417,413,285,326,327,328,277,355,329,309,392,438,381,382,256,279,429,360,365,364,379,355,277,437,282,443,283,281,275,363,395,431,369,299,297,337,335,273,321,348,450,349,359,446,467,283,293,282,250,458,462,300,276,383,292,308,325,283,276,293,264,372,447,346,352,340,354,274,19,363,456,281,426,436,425,380,381,252,267,269,393,421,200,428,371,266,329,432,287,422,290,250,328,385,258,384,446,265,342,386,387,257,422,424,430,445,342,276,422,273,424,306,292,307,352,366,345,268,271,302,358,423,371,327,294,460,331,279,294,303,271,304,436,432,427,304,272,408,395,394,431,378,395,400,296,334,299,6,351,168,376,352,411,307,325,320,285,295,336,320,319,404,329,330,349,334,293,333,366,323,447,316,15,315,331,358,279,317,14,316,8,285,9,277,329,350,253,374,252,319,318,403,351,6,419,324,318,325,397,367,365,288,435,397,278,344,439,310,272,311,248,195,281,375,273,291,175,396,199,312,311,268,276,283,445,390,373,339,295,282,296,448,449,346,356,264,454,337,336,299,337,338,151,294,278,455,308,292,415,429,358,355,265,340,372,388,390,466,352,346,280,295,442,282,354,19,370,285,441,295,195,248,197,457,440,274,301,300,368,417,351,465,251,301,389,385,380,386,394,395,379,399,412,419,410,436,322,387,373,388,326,2,393,354,370,461,393,164,267,268,302,12,386,374,387,312,268,13,298,293,301,265,446,340,380,385,381,280,330,425,322,426,391,420,429,437,393,391,326,344,440,438,458,459,461,364,434,394,428,396,262,274,354,457,317,316,402,316,315,403,315,314,404,314,313,405,313,421,406,323,366,361,292,306,407,306,291,408,291,287,409,287,432,410,427,434,411,372,264,383,459,309,457,366,352,401,1,274,4,418,421,262,331,294,358,435,433,367,392,289,439,328,462,326,94,2,370,289,305,455,339,254,448,359,255,446,254,253,449,253,252,450,252,256,451,256,341,452,414,413,463,286,441,414,286,258,441,258,257,442,257,259,443,259,260,444,260,467,445,309,459,250,305,289,290,305,290,460,401,376,435,309,250,392,376,411,433,453,341,464,357,453,465,343,357,412,437,343,399,344,360,440,420,437,456,360,420,363,361,401,288,265,372,353,390,339,249,339,448,255];var ur=[127,234,132,58,172,150,149,148,152,377,378,379,397,288,361,454,356,70,63,105,66,107,336,296,334,293,300,168,6,195,4,98,97,2,326,327,33,160,158,133,153,144,362,385,387,263,373,380,57,40,37,0,267,270,287,321,314,17,84,91,78,81,13,311,308,402,14,178],hr=[33,133,362,263,1,62,308,159,145,386,374,6,102,331,2,13,14,70,105,107,336,334,300,54,10,284,50,280,234,454,58,288,152],br=[33,133,362,263,1,78,308],LA=ur.map(e=>t2[e]),WA=hr.map(e=>t2[e]),FA=br.map(e=>t2[e]);function ne(e){let t=e.map(n=>n[0]);return t.push(e[e.length-1][1]),t}var gr=[[61,146],[146,91],[91,181],[181,84],[84,17],[17,314],[314,405],[405,321],[321,375],[375,291],[61,185],[185,40],[40,39],[39,37],[37,0],[0,267],[267,269],[269,270],[270,409],[409,291],[78,95],[95,88],[88,178],[178,87],[87,14],[14,317],[317,402],[402,318],[318,324],[324,308],[78,191],[191,80],[80,81],[81,82],[82,13],[13,312],[312,311],[311,310],[310,415],[415,308]],Mr=[[263,249],[249,390],[390,373],[373,374],[374,380],[380,381],[381,382],[382,362],[263,466],[466,388],[388,387],[387,386],[386,385],[385,384],[384,398],[398,362]],Tr=[[276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]],vr=[[474,475],[475,476],[476,477],[477,474]],Pr=[[33,7],[7,163],[163,144],[144,145],[145,153],[153,154],[154,155],[155,133],[33,246],[246,161],[161,160],[160,159],[159,158],[158,157],[157,173],[173,133]],Rr=[[46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]],kr=[[469,470],[470,471],[471,472],[472,469]],wr=[[10,338],[338,297],[297,332],[332,284],[284,251],[251,389],[389,356],[356,454],[454,323],[323,361],[361,288],[288,397],[397,365],[365,379],[379,378],[378,400],[400,377],[377,152],[152,148],[148,176],[176,149],[149,150],[150,136],[136,172],[172,58],[58,132],[132,93],[93,234],[234,127],[127,162],[162,21],[21,54],[54,103],[103,67],[67,109],[109,10]],GA={lips:ne(gr),leftEye:ne(Mr),leftEyebrow:ne(Tr),leftIris:ne(vr),rightEye:ne(Pr),rightEyebrow:ne(Rr),rightIris:ne(kr),faceOval:ne(wr)};var C={tf255:255,tf1:1,tf2:2,tf05:.5,tf127:127.5,rgb:[.2989,.587,.114]};function l1(){C.tf255=r.scalar(255,"float32"),C.tf1=r.scalar(1,"float32"),C.tf2=r.scalar(2,"float32"),C.tf05=r.scalar(.5,"float32"),C.tf127=r.scalar(127.5,"float32"),C.rgb=r.tensor1d([.2989,.587,.114],"float32")}var Oe=e=>[Math.abs(e.endPoint[0]-e.startPoint[0]),Math.abs(e.endPoint[1]-e.startPoint[1])],P2=e=>[e.startPoint[0]+(e.endPoint[0]-e.startPoint[0])/2,e.startPoint[1]+(e.endPoint[1]-e.startPoint[1])/2,1],R2=(e,t)=>e?[Math.trunc(Math.max(0,e.startPoint[0])),Math.trunc(Math.max(0,e.startPoint[1])),Math.trunc(Math.min(t.shape[2]||0,e.endPoint[0])-Math.max(0,e.startPoint[0])),Math.trunc(Math.min(t.shape[1]||0,e.endPoint[1])-Math.max(0,e.startPoint[1]))]:[0,0,0,0],k2=(e,t)=>e?[e.startPoint[0]/(t.shape[2]||0),e.startPoint[1]/(t.shape[1]||0),(e.endPoint[0]-e.startPoint[0])/(t.shape[2]||0),(e.endPoint[1]-e.startPoint[1])/(t.shape[1]||0)]:[0,0,0,0],x1=(e,t)=>{let n=[e.startPoint[0]*t[0],e.startPoint[1]*t[1]],o=[e.endPoint[0]*t[0],e.endPoint[1]*t[1]];return{startPoint:n,endPoint:o,landmarks:e.landmarks,confidence:e.confidence}},Mt=(e,t,n)=>{let o=t.shape[1],s=t.shape[2],A=[e.startPoint[1]/o,e.startPoint[0]/s,e.endPoint[1]/o,e.endPoint[0]/s],a=r.image.cropAndResize(t,[A],[0],n),i=r.div(a,C.tf255);return r.dispose(a),i},w2=(e,t)=>{let n=P2(e),o=Oe(e),s=[t*o[0]/2,t*o[1]/2];return{startPoint:[n[0]-s[0],n[1]-s[1]],endPoint:[n[0]+s[0],n[1]+s[1]],landmarks:e.landmarks,confidence:e.confidence}},E2=e=>{let t=P2(e),n=Oe(e),o=Math.max(...n)/2;return{startPoint:[Math.round(t[0]-o),Math.round(t[1]-o)],endPoint:[Math.round(t[0]+o),Math.round(t[1]+o)],landmarks:e.landmarks,confidence:e.confidence}},y1=e=>{let t=e.map(o=>o[0]),n=e.map(o=>o[1]);return{startPoint:[Math.min(...t),Math.min(...n)],endPoint:[Math.max(...t),Math.max(...n)],landmarks:e}},Tt=[[1,0,0],[0,1,0],[0,0,1]],zr=e=>e-2*Math.PI*Math.floor((e+Math.PI)/(2*Math.PI)),Sr=(e,t)=>zr(Math.PI/2-Math.atan2(-(t[1]-e[1]),t[0]-e[0]));var c1=(e,t)=>[[1,0,e],[0,1,t],[0,0,1]],be=(e,t)=>{let n=0;for(let o=0;o{let n=[];for(let o=0;o{let n=[],o=e.length;for(let s=0;s{let n=Math.cos(e),o=Math.sin(e),s=[[n,-o,0],[o,n,0],[0,0,1]],A=c1(t[0],t[1]),a=d1(A,s),i=c1(-t[0],-t[1]);return d1(a,i)},Nr=e=>{let t=[[e[0][0],e[1][0]],[e[0][1],e[1][1]]],n=[e[0][2],e[1][2]],o=[-be(t[0],n),-be(t[1],n)];return[t[0].concat(o[0]),t[1].concat(o[1]),[0,0,1]]},Ir=(e,t)=>[be(e,t[0]),be(e,t[1])];function m1(e){let t=e===192?{strides:[4],anchors:[1]}:{strides:[e/16,e/8],anchors:[2,6]},n=[];for(let o=0;o[A[0]/s*(x[0]-s/2),A[1]/s*(x[1]-s/2),x[2]||0]),i=n&&n!==0&&Math.abs(n)>.2,c=i?f1(n,[0,0]):Tt,d=i?a.map(x=>[...Ir(x,c),x[2]]):a,y=i?Nr(o):Tt,l=P2(t),m=[be(l,y[0]),be(l,y[1])];return d.map(x=>[Math.trunc(x[0]+m[0]),Math.trunc(x[1]+m[1]),Math.trunc(x[2]||0)])}function u1(e,t,n,o){let s=t.landmarks.length>=ht.count?ht.symmetryLine:ue.symmetryLine,A=0,a=Tt,i;if(e&&w.kernels.includes("rotatewithoffset"))if(A=Sr(t.landmarks[s[0]],t.landmarks[s[1]]),A&&A!==0&&Math.abs(A)>.2){let d=P2(t),y=[d[0]/n.shape[2],d[1]/n.shape[1]],l=r.image.rotateWithOffset(n,A,0,y);a=f1(-A,d),i=Mt(t,l,[o,o]),r.dispose(l)}else i=Mt(t,n,[o,o]);else i=Mt(t,n,[o,o]);return[A,a,i]}var Or=e=>{let t=e.map(o=>o[0]),n=e.map(o=>o[1]);return[Math.min(...t)+(Math.max(...t)-Math.min(...t))/2,Math.min(...n)+(Math.max(...n)-Math.min(...n))/2]},h1=(e,t)=>{let n=Or(e),o=Oe(t);return{startPoint:[n[0]-o[0]/2,n[1]-o[1]/2],endPoint:[n[0]+o[0]/2,n[1]+o[1]/2]}};var b1=6,Cr=1.4,F0,g1=null,oe=0,n2=null,Ce=()=>oe;async function M1(e){var t;return w.initial&&(F0=null),F0?e.debug&&b("cached model:",F0.modelUrl):F0=await O((t=e.face.detector)==null?void 0:t.modelPath),oe=F0.executor&&F0.inputs[0].shape?F0.inputs[0].shape[2]:256,n2=r.scalar(oe,"int32"),g1=r.tensor2d(m1(oe)),F0}function Lr(e){let t={};t.boxStarts=r.slice(e,[0,1],[-1,2]),t.centers=r.add(t.boxStarts,g1),t.boxSizes=r.slice(e,[0,3],[-1,2]),t.boxSizesNormalized=r.div(t.boxSizes,n2),t.centersNormalized=r.div(t.centers,n2),t.halfBoxSize=r.div(t.boxSizesNormalized,C.tf2),t.starts=r.sub(t.centersNormalized,t.halfBoxSize),t.ends=r.add(t.centersNormalized,t.halfBoxSize),t.startNormalized=r.mul(t.starts,n2),t.endNormalized=r.mul(t.ends,n2);let n=r.concat2d([t.startNormalized,t.endNormalized],1);return Object.keys(t).forEach(o=>r.dispose(t[o])),n}async function T1(e,t){var i,c,d,y;if(!e||e.isDisposedInternal||e.shape.length!==4||e.shape[1]<1||e.shape[2]<1)return[];let n={};n.resized=r.image.resizeBilinear(e,[oe,oe]),n.div=r.div(n.resized,C.tf127),n.normalized=r.sub(n.div,C.tf05);let o=F0==null?void 0:F0.execute(n.normalized);if(Array.isArray(o)&&o.length>2){let l=o.sort((m,x)=>m.size-x.size);n.concat384=r.concat([l[0],l[2]],2),n.concat512=r.concat([l[1],l[3]],2),n.concat=r.concat([n.concat512,n.concat384],1),n.batch=r.squeeze(n.concat,0)}else Array.isArray(o)?n.batch=r.squeeze(o[0]):n.batch=r.squeeze(o);r.dispose(o),n.boxes=Lr(n.batch),n.logits=r.slice(n.batch,[0,0],[-1,1]),n.sigmoid=r.sigmoid(n.logits),n.scores=r.squeeze(n.sigmoid),n.nms=await r.image.nonMaxSuppressionAsync(n.boxes,n.scores,((i=t.face.detector)==null?void 0:i.maxDetected)||0,((c=t.face.detector)==null?void 0:c.iouThreshold)||0,((d=t.face.detector)==null?void 0:d.minConfidence)||0);let s=await n.nms.array(),A=[],a=await n.scores.data();for(let l=0;l(((y=t.face.detector)==null?void 0:y.minConfidence)||0)){let x={};x.bbox=r.slice(n.boxes,[s[l],0],[1,-1]),x.slice=r.slice(n.batch,[s[l],b1-1],[1,-1]),x.squeeze=r.squeeze(x.slice),x.landmarks=r.reshape(x.squeeze,[b1,-1]);let p=await x.bbox.data(),u={startPoint:[p[0],p[1]],endPoint:[p[2],p[3]],landmarks:await x.landmarks.array(),confidence:m},M=x1(u,[(e.shape[2]||0)/oe,(e.shape[1]||0)/oe]),P=w2(M,t.face.scale||Cr),v=E2(P);A.push(v),Object.keys(x).forEach(f=>r.dispose(x[f]))}}return Object.keys(n).forEach(l=>r.dispose(n[l])),A}var z2={};te(z2,{connected:()=>Rt,kpt:()=>Pt});var Pt=["nose","leftEyeInside","leftEye","leftEyeOutside","rightEyeInside","rightEye","rightEyeOutside","leftEar","rightEar","leftMouth","rightMouth","leftShoulder","rightShoulder","leftElbow","rightElbow","leftWrist","rightWrist","leftPinky","rightPinky","leftIndex","rightIndex","leftThumb","rightThumb","leftHip","rightHip","leftKnee","rightKnee","leftAnkle","rightAnkle","leftHeel","rightHeel","leftFoot","rightFoot","bodyCenter","bodyTop","leftPalm","leftHand","rightPalm","rightHand"],Rt={shoulders:["leftShoulder","rightShoulder"],hips:["rightHip","leftHip"],mouth:["leftMouth","rightMouth"],leftLegUpper:["leftHip","leftKnee"],leftLegLower:["leftKnee","leftAnkle"],leftFoot:["leftAnkle","leftHeel","leftFoot"],leftTorso:["leftShoulder","leftHip"],leftArmUpper:["leftShoulder","leftElbow"],leftArmLower:["leftElbow","leftWrist"],leftHand:["leftWrist","leftPalm"],leftHandPinky:["leftPalm","leftPinky"],leftHandIndex:["leftPalm","leftIndex"],leftHandThumb:["leftPalm","leftThumb"],leftEyeOutline:["leftEyeInside","leftEyeOutside"],rightLegUpper:["rightHip","rightKnee"],rightLegLower:["rightKnee","rightAnkle"],rightFoot:["rightAnkle","rightHeel","rightFoot"],rightTorso:["rightShoulder","rightHip"],rightArmUpper:["rightShoulder","rightElbow"],rightArmLower:["rightElbow","rightWrist"],rightHand:["rightWrist","rightPalm"],rightHandPinky:["rightPalm","rightPinky"],rightHandIndex:["rightPalm","rightIndex"],rightHandThumb:["rightPalm","rightThumb"],rightEyeOutline:["rightEyeInside","rightEyeOutside"]};var P1=224,Wr,Fr=5,S2=[8,16,32,32,32];function R1(){let e=[],t=0;for(;tn.x)),y:r.tensor1d(e.map(n=>n.y))}}function U0(e,t=[1,1]){let n=[e.map(i=>i[0]),e.map(i=>i[1])],o=[Math.min(...n[0]),Math.min(...n[1])],s=[Math.max(...n[0]),Math.max(...n[1])],A=[o[0],o[1],s[0]-o[0],s[1]-o[1]],a=[A[0]/t[0],A[1]/t[1],A[2]/t[0],A[3]/t[1]];return{box:A,boxRaw:a}}function k1(e,t=[1,1]){let n=[e.map(d=>d[0]),e.map(d=>d[1])],o=[Math.min(...n[0]),Math.min(...n[1])],s=[Math.max(...n[0]),Math.max(...n[1])],A=[(o[0]+s[0])/2,(o[1]+s[1])/2],a=Math.max(A[0]-o[0],A[1]-o[1],-A[0]+s[0],-A[1]+s[1]),i=[Math.trunc(A[0]-a),Math.trunc(A[1]-a),Math.trunc(2*a),Math.trunc(2*a)],c=[i[0]/t[0],i[1]/t[1],i[2]/t[0],i[3]/t[1]];return{box:i,boxRaw:c}}function j2(e,t){let n=[e[2]*t,e[3]*t];return[e[0]-(n[0]-e[2])/2,e[1]-(n[1]-e[3])/2,n[0],n[1]]}var z1={initial:!0},d0={detector:null,landmarks:null},Le={detector:[224,224],landmarks:[256,256]},kt=Number.MAX_SAFE_INTEGER,Br={landmarks:["ld_3d","activation_segmentation","activation_heatmap","world_3d","output_poseflag"],detector:[]},I2=null,o2,re=[[0,0],[0,0],[0,0],[0,0]],w1=0,E1=e=>1-1/(1+Math.exp(e));async function S1(e){var t;if(z1.initial&&(d0.detector=null),!d0.detector&&e.body.detector&&e.body.detector.modelPath){d0.detector=await O(e.body.detector.modelPath);let n=(t=d0.detector)!=null&&t.executor?Object.values(d0.detector.modelSignature.inputs):void 0;Le.detector[0]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[1].size):0,Le.detector[1]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[2].size):0}else e.debug&&d0.detector&&b("cached model:",d0.detector.modelUrl);return R1(),d0.detector}async function j1(e){var t;if(z1.initial&&(d0.landmarks=null),d0.landmarks)e.debug&&b("cached model:",d0.landmarks.modelUrl);else{d0.landmarks=await O(e.body.modelPath);let n=(t=d0.landmarks)!=null&&t.executor?Object.values(d0.landmarks.modelSignature.inputs):void 0;Le.landmarks[0]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[1].size):0,Le.landmarks[1]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[2].size):0}return d0.landmarks}function Hr(e,t){var s,A;let n={};if(!((s=e==null?void 0:e.shape)!=null&&s[1])||!((A=e==null?void 0:e.shape)!=null&&A[2]))return e;let o;if(o2&&(n.cropped=r.image.cropAndResize(e,[o2],[0],[e.shape[1],e.shape[2]])),e.shape[1]!==e.shape[2]){let a=[e.shape[2]>e.shape[1]?Math.trunc((e.shape[2]-e.shape[1])/2):0,e.shape[2]>e.shape[1]?Math.trunc((e.shape[2]-e.shape[1])/2):0],i=[e.shape[1]>e.shape[2]?Math.trunc((e.shape[1]-e.shape[2])/2):0,e.shape[1]>e.shape[2]?Math.trunc((e.shape[1]-e.shape[2])/2):0];re=[[0,0],a,i,[0,0]],n.pad=r.pad(n.cropped||e,re),n.resize=r.image.resizeBilinear(n.pad,[t,t]),o=r.div(n.resize,C.tf255)}else e.shape[1]!==t?(n.resize=r.image.resizeBilinear(n.cropped||e,[t,t]),o=r.div(n.resize,C.tf255)):o=r.div(n.cropped||e,C.tf255);return Object.keys(n).forEach(a=>r.dispose(n[a])),o}function Vr(e,t){for(let n of e)n.position=[Math.trunc(n.position[0]*(t[0]+re[2][0]+re[2][1])/t[0]-re[2][0]),Math.trunc(n.position[1]*(t[1]+re[1][0]+re[1][1])/t[1]-re[1][0]),n.position[2]],n.positionRaw=[n.position[0]/t[0],n.position[1]/t[1],2*n.position[2]/(t[0]+t[1])];if(o2)for(let n of e)n.positionRaw=[n.positionRaw[0]+o2[1],n.positionRaw[1]+o2[0],n.positionRaw[2]],n.position=[Math.trunc(n.positionRaw[0]*t[0]),Math.trunc(n.positionRaw[1]*t[1]),n.positionRaw[2]];return e}function Dr(e){let t=e.find(i=>i.part==="leftPalm"),n=e.find(i=>i.part==="leftWrist"),o=e.find(i=>i.part==="leftIndex");t.position[2]=((n.position[2]||0)+(o.position[2]||0))/2;let s=e.find(i=>i.part==="rightPalm"),A=e.find(i=>i.part==="rightWrist"),a=e.find(i=>i.part==="rightIndex");s.position[2]=((A.position[2]||0)+(a.position[2]||0))/2}async function Zr(e,t,n){var p,u;if(!((p=d0.landmarks)!=null&&p.executor))return null;let o={};[o.ld,o.segmentation,o.heatmap,o.world,o.poseflag]=(u=d0.landmarks)==null?void 0:u.execute(e,Br.landmarks);let s=(await o.poseflag.data())[0],A=await o.ld.data(),a=await o.world.data();Object.keys(o).forEach(M=>r.dispose(o[M]));let i=[],c=5;for(let M=0;MM.position),l=U0(y,[n[0],n[1]]),m={};for(let[M,P]of Object.entries(Rt)){let v=[];for(let f=0;fE.part===P[f]),S=d.find(E=>E.part===P[f+1]);g&&S&&v.push([g.position,S.position])}m[M]=v}return{id:0,score:Math.trunc(100*s)/100,box:l.box,boxRaw:l.boxRaw,keypoints:d,annotations:m}}async function wt(e,t){let n=[e.shape[2]||0,e.shape[1]||0],o=(t.body.skipTime||0)>T()-w1,s=kt<(t.body.skipFrames||0);if(t.skipAllowed&&o&&s&&I2!==null)kt++;else{let A={};A.landmarks=Hr(e,256),I2=await Zr(A.landmarks,t,n),Object.keys(A).forEach(a=>r.dispose(A[a])),w1=T(),kt=0}return I2?[I2]:[]}var We=[{class:1,label:"person"},{class:2,label:"bicycle"},{class:3,label:"car"},{class:4,label:"motorcycle"},{class:5,label:"airplane"},{class:6,label:"bus"},{class:7,label:"train"},{class:8,label:"truck"},{class:9,label:"boat"},{class:10,label:"traffic light"},{class:11,label:"fire hydrant"},{class:12,label:"stop sign"},{class:13,label:"parking meter"},{class:14,label:"bench"},{class:15,label:"bird"},{class:16,label:"cat"},{class:17,label:"dog"},{class:18,label:"horse"},{class:19,label:"sheep"},{class:20,label:"cow"},{class:21,label:"elephant"},{class:22,label:"bear"},{class:23,label:"zebra"},{class:24,label:"giraffe"},{class:25,label:"backpack"},{class:26,label:"umbrella"},{class:27,label:"handbag"},{class:28,label:"tie"},{class:29,label:"suitcase"},{class:30,label:"frisbee"},{class:31,label:"skis"},{class:32,label:"snowboard"},{class:33,label:"sports ball"},{class:34,label:"kite"},{class:35,label:"baseball bat"},{class:36,label:"baseball glove"},{class:37,label:"skateboard"},{class:38,label:"surfboard"},{class:39,label:"tennis racket"},{class:40,label:"bottle"},{class:41,label:"wine glass"},{class:42,label:"cup"},{class:43,label:"fork"},{class:44,label:"knife"},{class:45,label:"spoon"},{class:46,label:"bowl"},{class:47,label:"banana"},{class:48,label:"apple"},{class:49,label:"sandwich"},{class:50,label:"orange"},{class:51,label:"broccoli"},{class:52,label:"carrot"},{class:53,label:"hot dog"},{class:54,label:"pizza"},{class:55,label:"donut"},{class:56,label:"cake"},{class:57,label:"chair"},{class:58,label:"couch"},{class:59,label:"potted plant"},{class:60,label:"bed"},{class:61,label:"dining table"},{class:62,label:"toilet"},{class:63,label:"tv"},{class:64,label:"laptop"},{class:65,label:"mouse"},{class:66,label:"remote"},{class:67,label:"keyboard"},{class:68,label:"cell phone"},{class:69,label:"microwave"},{class:70,label:"oven"},{class:71,label:"toaster"},{class:72,label:"sink"},{class:73,label:"refrigerator"},{class:74,label:"book"},{class:75,label:"clock"},{class:76,label:"vase"},{class:77,label:"scissors"},{class:78,label:"teddy bear"},{class:79,label:"hair drier"},{class:80,label:"toothbrush"}];var b0,ge=0,Et=[],I1=0,zt=Number.MAX_SAFE_INTEGER;async function O1(e){if(w.initial&&(b0=null),b0)e.debug&&b("cached model:",b0.modelUrl);else{b0=await O(e.object.modelPath);let t=b0!=null&&b0.executor?Object.values(b0.modelSignature.inputs):void 0;ge=Array.isArray(t)?parseInt(t[0].tensorShape.dim[2].size):0}return b0}async function Xr(e,t,n){if(!e)return[];let o={},s=[],A=await e.array();o.squeeze=r.squeeze(e);let a=r.split(o.squeeze,6,1);o.stack=r.stack([a[1],a[0],a[3],a[2]],1),o.boxes=r.squeeze(o.stack),o.scores=r.squeeze(a[4]),o.classes=r.squeeze(a[5]),r.dispose([e,...a]),o.nms=await r.image.nonMaxSuppressionAsync(o.boxes,o.scores,n.object.maxDetected,n.object.iouThreshold,n.object.minConfidence||0);let i=await o.nms.data(),c=0;for(let d of Array.from(i)){let y=Math.trunc(100*A[0][d][4])/100,l=A[0][d][5];if(Number.isNaN(l))continue;let m=We[l].label,[x,p]=[A[0][d][0]/ge,A[0][d][1]/ge],u=[x,p,A[0][d][2]/ge-x,A[0][d][3]/ge-p],M=[Math.trunc(u[0]*t[0]),Math.trunc(u[1]*t[1]),Math.trunc(u[2]*t[0]),Math.trunc(u[3]*t[1])];s.push({id:c++,score:y,class:l,label:m,box:M,boxRaw:u})}return Object.keys(o).forEach(d=>r.dispose(o[d])),s}async function St(e,t){if(!(b0!=null&&b0.executor))return[];let n=(t.object.skipTime||0)>T()-I1,o=zt<(t.object.skipFrames||0);return t.skipAllowed&&n&&o&&Et.length>0?(zt++,Et):(zt=0,new Promise(async s=>{let A=[e.shape[2]||0,e.shape[1]||0],a=r.image.resizeBilinear(e,[ge,ge]),i=t.object.enabled?b0==null?void 0:b0.execute(a,["tower_0/detections"]):null;I1=T(),r.dispose(a);let c=await Xr(i,A,t);Et=c,s(c)}))}var O2={};te(O2,{connected:()=>Nt,kpt:()=>jt});var jt=["head","neck","rightShoulder","rightElbow","rightWrist","chest","leftShoulder","leftElbow","leftWrist","bodyCenter","rightHip","rightKnee","rightAnkle","leftHip","leftKnee","leftAnkle"],Nt={leftLeg:["leftHip","leftKnee","leftAnkle"],rightLeg:["rightHip","rightKnee","rightAnkle"],torso:["leftShoulder","rightShoulder","rightHip","leftHip","leftShoulder"],leftArm:["leftShoulder","leftElbow","leftWrist"],rightArm:["rightShoulder","rightElbow","rightWrist"],head:[]};var A0,L1=0,u0={id:0,keypoints:[],box:[0,0,0,0],boxRaw:[0,0,0,0],score:0,annotations:{}},It=Number.MAX_SAFE_INTEGER;async function W1(e){return w.initial&&(A0=null),A0?e.debug&&b("cached model:",A0.modelUrl):A0=await O(e.body.modelPath),A0}async function qr(e,t){let[n,o]=e.shape,s=r.reshape(e,[o*n]),A=r.max(s,0),a=(await A.data())[0];if(a>t){let i=r.argMax(s,0),c=r.mod(i,n),d=(await c.data())[0],y=r.div(i,n),l=(await y.data())[0];return r.dispose([s,A,i,c,y]),[d,l,a]}return r.dispose([s,A]),[0,0,a]}async function Ot(e,t){if(!(A0!=null&&A0.executor))return[];let n=(t.body.skipTime||0)>T()-L1,o=It<(t.body.skipFrames||0);return t.skipAllowed&&n&&o&&Object.keys(u0.keypoints).length>0?(It++,[u0]):(It=0,new Promise(async s=>{let A=r.tidy(()=>{if(!(A0!=null&&A0.inputs[0].shape))return null;let l=r.image.resizeBilinear(e,[A0.inputs[0].shape[2],A0.inputs[0].shape[1]],!1),m=r.mul(l,C.tf2);return r.sub(m,C.tf1)}),a;if(t.body.enabled&&(a=A0==null?void 0:A0.execute(A)),L1=T(),r.dispose(A),a){u0.keypoints.length=0;let l=r.squeeze(a);r.dispose(a);let m=r.unstack(l,2);r.dispose(l);for(let x=0;x(t.body.minConfidence||0)&&u0.keypoints.push({score:Math.round(100*M)/100,part:jt[x],positionRaw:[p/A0.inputs[0].shape[2],u/A0.inputs[0].shape[1]],position:[Math.round(e.shape[2]*p/A0.inputs[0].shape[2]),Math.round(e.shape[1]*u/A0.inputs[0].shape[1])]})}m.forEach(x=>r.dispose(x))}u0.score=u0.keypoints.reduce((l,m)=>m.score>l?m.score:l,0);let i=u0.keypoints.map(l=>l.position[0]),c=u0.keypoints.map(l=>l.position[1]);u0.box=[Math.min(...i),Math.min(...c),Math.max(...i)-Math.min(...i),Math.max(...c)-Math.min(...c)];let d=u0.keypoints.map(l=>l.positionRaw[0]),y=u0.keypoints.map(l=>l.positionRaw[1]);u0.boxRaw=[Math.min(...d),Math.min(...y),Math.max(...d)-Math.min(...d),Math.max(...y)-Math.min(...y)];for(let[l,m]of Object.entries(Nt)){let x=[];for(let p=0;pP.part===m[p]),M=u0.keypoints.find(P=>P.part===m[p+1]);u&&M&&u.score>(t.body.minConfidence||0)&&M.score>(t.body.minConfidence||0)&&x.push([u.position,M.position])}u0.annotations[l]=x}s([u0])}))}var Ur=["angry","disgust","fear","happy","sad","surprise","neutral"],w0,C2=[],G1=0,B1=0,Ct=Number.MAX_SAFE_INTEGER;async function H1(e){var t;return w.initial&&(w0=null),w0?e.debug&&b("cached model:",w0.modelUrl):w0=await O((t=e.face.emotion)==null?void 0:t.modelPath),w0}async function Lt(e,t,n,o){var a,i;if(!w0)return[];let s=Ct<(((a=t.face.emotion)==null?void 0:a.skipFrames)||0),A=(((i=t.face.emotion)==null?void 0:i.skipTime)||0)>T()-B1;return t.skipAllowed&&A&&s&&G1===o&&C2[n]&&C2[n].length>0?(Ct++,C2[n]):(Ct=0,new Promise(async c=>{var y;let d=[];if((y=t.face.emotion)!=null&&y.enabled){let l={},m=w0!=null&&w0.inputs[0].shape?w0.inputs[0].shape[2]:0;l.resize=r.image.resizeBilinear(e,[m,m],!1),l.channels=r.mul(l.resize,C.rgb),l.grayscale=r.sum(l.channels,3,!0),l.grayscaleSub=r.sub(l.grayscale,C.tf05),l.grayscaleMul=r.mul(l.grayscaleSub,C.tf2),l.emotion=w0==null?void 0:w0.execute(l.grayscaleMul),B1=T();let x=await l.emotion.data();for(let p=0;p(t.face.emotion.minConfidence||0)&&d.push({score:Math.min(.99,Math.trunc(100*x[p])/100),emotion:Ur[p]});d.sort((p,u)=>u.score-p.score),Object.keys(l).forEach(p=>r.dispose(l[p]))}C2[n]=d,G1=o,c(d)}))}var g0,se=0,Yr=2.3,Wt=O0.leftEyeLower0,Ft=O0.rightEyeLower0,Fe={leftBounds:[Wt[0],Wt[Wt.length-1]],rightBounds:[Ft[0],Ft[Ft.length-1]]},Ge={upperCenter:3,lowerCenter:4,index:71,numCoordinates:76};async function q1(e){var t,n;return w.initial&&(g0=null),g0?e.debug&&b("cached model:",g0.modelUrl):g0=await O((t=e.face.iris)==null?void 0:t.modelPath),se=(g0==null?void 0:g0.executor)&&((n=g0.inputs)==null?void 0:n[0].shape)?g0.inputs[0].shape[2]:0,se===-1&&(se=64),g0}function L2(e,t,n,o){for(let s=0;s{let t=e[Fe.leftBounds[0]][2],n=e[Fe.rightBounds[0]][2];return t-n},D1=(e,t,n,o,s,A=!1)=>{let a=E2(w2(y1([e[n],e[o]]),Yr)),i=Oe(a),c=r.image.cropAndResize(t,[[a.startPoint[1]/s,a.startPoint[0]/s,a.endPoint[1]/s,a.endPoint[0]/s]],[0],[se,se]);if(A&&w.kernels.includes("flipleftright")){let d=r.image.flipLeftRight(c);r.dispose(c),c=d}return{box:a,boxSize:i,crop:c}},Z1=(e,t,n,o=!1)=>{let s=[];for(let A=0;A{let o=e[O0[`${n}EyeUpper0`][Ge.upperCenter]][2],s=e[O0[`${n}EyeLower0`][Ge.lowerCenter]][2],A=(o+s)/2;return t.map((a,i)=>{let c=A;return i===2?c=o:i===4&&(c=s),[a[0],a[1],c]})};async function U1(e,t,n){if(!(g0!=null&&g0.executor))return e;let{box:o,boxSize:s,crop:A}=D1(e,t,Fe.leftBounds[0],Fe.leftBounds[1],n,!0),{box:a,boxSize:i,crop:c}=D1(e,t,Fe.rightBounds[0],Fe.rightBounds[1],n,!0),d=r.concat([A,c]);r.dispose(A),r.dispose(c);let y=g0.execute(d);r.dispose(d);let l=await y.data();r.dispose(y);let m=l.slice(0,Ge.numCoordinates*3),{rawCoords:x,iris:p}=Z1(m,o,s,!0),u=l.slice(Ge.numCoordinates*3),{rawCoords:M,iris:P}=Z1(u,a,i,!1),v=Kr(e);Math.abs(v)<30?(L2(e,x,"left",null),L2(e,M,"right",null)):v<1?L2(e,x,"left",["EyeUpper0","EyeLower0"]):L2(e,M,"right",["EyeUpper0","EyeLower0"]);let f=X1(e,p,"left"),g=X1(e,P,"right");return e.concat(f).concat(g)}var Jr=[[61,146],[146,91],[91,181],[181,84],[84,17],[17,314],[314,405],[405,321],[321,375],[375,291],[61,185],[185,40],[40,39],[39,37],[37,0],[0,267],[267,269],[269,270],[270,409],[409,291],[78,95],[95,88],[88,178],[178,87],[87,14],[14,317],[317,402],[402,318],[318,324],[324,308],[78,191],[191,80],[80,81],[81,82],[82,13],[13,312],[312,311],[311,310],[310,415],[415,308]],Qr=[[263,249],[249,390],[390,373],[373,374],[374,380],[380,381],[381,382],[382,362],[263,466],[466,388],[388,387],[387,386],[386,385],[385,384],[384,398],[398,362]],_r=[[276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]],$r=[[474,475],[475,476],[476,477],[477,474]],es=[[33,7],[7,163],[163,144],[144,145],[145,153],[153,154],[154,155],[155,133],[33,246],[246,161],[161,160],[160,159],[159,158],[158,157],[157,173],[173,133]],ts=[[46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]],ns=[[469,470],[470,471],[471,472],[472,469]],os=[[10,338],[338,297],[297,332],[332,284],[284,251],[251,389],[389,356],[356,454],[454,323],[323,361],[361,288],[288,397],[397,365],[365,379],[379,378],[378,400],[400,377],[377,152],[152,148],[148,176],[176,149],[149,150],[150,136],[136,172],[172,58],[58,132],[132,93],[93,234],[234,127],[127,162],[162,21],[21,54],[54,103],[103,67],[67,109],[109,10]];function Ae(e){let t=e.map(n=>n[0]);return t.push(e[e.length-1][1]),t}var rs={lips:Ae(Jr),leftEye:Ae(Qr),leftEyebrow:Ae(_r),leftIris:Ae($r),rightEye:Ae(es),rightEyebrow:Ae(ts),rightIris:Ae(ns),faceOval:Ae(os)},ss=Object.entries(rs).map(([e,t])=>t.map(n=>[n,e])).flat(),da=new Map(ss),r2=[61,146,91,181,84,17,314,405,321,375,291,185,40,39,37,0,267,269,270,409,78,95,88,178,87,14,317,402,318,324,308,191,80,81,82,13,312,311,310,415,76,77,90,180,85,16,315,404,320,307,306,184,74,73,72,11,302,303,304,408,62,96,89,179,86,15,316,403,319,325,292,183,42,41,38,12,268,271,272,407],Me=[33,7,163,144,145,153,154,155,133,246,161,160,159,158,157,173,130,25,110,24,23,22,26,112,243,247,30,29,27,28,56,190,226,31,228,229,230,231,232,233,244,113,225,224,223,222,221,189,35,124,46,53,52,65,143,111,117,118,119,120,121,128,245,156,70,63,105,66,107,55,193],Te=[263,249,390,373,374,380,381,382,362,466,388,387,386,385,384,398,359,255,339,254,253,252,256,341,463,467,260,259,257,258,286,414,446,261,448,449,450,451,452,453,464,342,445,444,443,442,441,413,265,353,276,283,282,295,372,340,346,347,348,349,350,357,465,383,300,293,334,296,336,285,417];async function J1(e,t){var A,a,i,c,d,y,l,m,x,p;let n={lips:await((a=(A=t.filter(u=>u.size===160))==null?void 0:A[0])==null?void 0:a.data()),irisL:await((c=(i=t.filter(u=>u.size===10))==null?void 0:i[0])==null?void 0:c.data()),eyeL:await((y=(d=t.filter(u=>u.size===142))==null?void 0:d[0])==null?void 0:y.data()),irisR:await((m=(l=t.filter(u=>u.size===10))==null?void 0:l[1])==null?void 0:m.data()),eyeR:await((p=(x=t.filter(u=>u.size===142))==null?void 0:x[1])==null?void 0:p.data())};for(let u of Object.values(n))if(!u)return e;let o=Me.reduce((u,M)=>u+=e[M][2],0)/Me.length;for(let u=0;uu+=e[M][2],0)/Te.length;for(let u=0;uT()-D0.timestamp,o=D0.skipped<(((d=t.face.detector)==null?void 0:d.skipFrames)||0);!t.skipAllowed||!n||!o||D0.boxes.length===0?(D0.boxes=await T1(e,t),D0.timestamp=T(),D0.skipped=0):D0.skipped++;let s=[],A=[],a=0,i=s2;for(let v=0;vF.shape[F.shape.length-1]===1).data();if(E.faceScore=Math.round(100*U[0])/100,E.faceScore<(((p=t.face.detector)==null?void 0:p.minConfidence)||1)){if(f.confidence=E.faceScore,t.face.mesh.keepInvalid){E.box=R2(f,e),E.boxRaw=k2(f,e),E.score=E.boxScore,E.mesh=f.landmarks.map(F=>[(f.startPoint[0]+f.endPoint[0])/2+(f.endPoint[0]+f.startPoint[0])*F[0]/Ce(),(f.startPoint[1]+f.endPoint[1])/2+(f.endPoint[1]+f.startPoint[1])*F[1]/Ce()]),E.meshRaw=E.mesh.map(F=>[F[0]/(e.shape[2]||1),F[1]/(e.shape[1]||1),(F[2]||0)/i]);for(let F of Object.keys(ue))E.annotations[F]=[E.mesh[ue[F]]]}}else{let F=I.find(L=>L.shape[L.shape.length-1]===1404),H=r.reshape(F,[-1,3]),K=await H.array();r.dispose(H),(u=t.face.attention)!=null&&u.enabled?K=await J1(K,I):(M=t.face.iris)!=null&&M.enabled&&(K=await U1(K,E.tensor,s2)),E.mesh=p1(K,f,g,S,s2),E.meshRaw=E.mesh.map(L=>[L[0]/(e.shape[2]||0),L[1]/(e.shape[1]||0),(L[2]||0)/i]);for(let L of Object.keys(O0))E.annotations[L]=O0[L].map(c0=>E.mesh[c0]);E.score=E.faceScore;let R={...h1(E.mesh,f),confidence:f.confidence,landmarks:f.landmarks};E.box=R2(R,e),E.boxRaw=k2(R,e),A.push(R)}r.dispose(I)}else{E.box=R2(f,e),E.boxRaw=k2(f,e),E.score=E.boxScore,E.mesh=f.landmarks.map(I=>[(f.startPoint[0]+f.endPoint[0])/2+(f.endPoint[0]+f.startPoint[0])*I[0]/Ce(),(f.startPoint[1]+f.endPoint[1])/2+(f.endPoint[1]+f.startPoint[1])*I[1]/Ce()]),E.meshRaw=E.mesh.map(I=>[I[0]/(e.shape[2]||0),I[1]/(e.shape[1]||0),(I[2]||0)/i]);for(let I of Object.keys(ue))E.annotations[I]=[E.mesh[ue[I]]]}E.score>(((P=t.face.detector)==null?void 0:P.minConfidence)||1)?s.push(E):r.dispose(E.tensor)}return D0.boxes=A,s}async function _1(e){var t,n,o,s,A,a;return w.initial&&(Y=null),((t=e.face.attention)==null?void 0:t.enabled)&&(Y==null?void 0:Y.signature)&&Object.keys(((n=Y==null?void 0:Y.signature)==null?void 0:n.outputs)||{}).length<6&&(Y=null),Y?e.debug&&b("cached model:",Y.modelUrl):(o=e.face.attention)!=null&&o.enabled?Y=await O(e.face.attention.modelPath):Y=await O((s=e.face.mesh)==null?void 0:s.modelPath),s2=Y.executor&&((A=Y==null?void 0:Y.inputs)==null?void 0:A[0].shape)?(a=Y==null?void 0:Y.inputs)==null?void 0:a[0].shape[2]:256,Y}var $1=he,e3=t2;var x0,ae=[],t3=0,n3=0,Bt=Number.MAX_SAFE_INTEGER;async function o3(e){var t;return w.initial&&(x0=null),x0?e.debug&&b("cached model:",x0.modelUrl):x0=await O((t=e.face.description)==null?void 0:t.modelPath),x0}function Ht(e){let t=e.image||e.tensor||e;if(!(x0!=null&&x0.inputs[0].shape))return t;let n=r.image.resizeBilinear(t,[x0.inputs[0].shape[2],x0.inputs[0].shape[1]],!1),o=r.mul(n,C.tf255);return r.dispose(n),o}async function Vt(e,t,n,o){var i,c,d,y;let s={age:0,gender:"unknown",genderScore:0,descriptor:[]};if(!(x0!=null&&x0.executor))return s;let A=Bt<(((i=t.face.description)==null?void 0:i.skipFrames)||0),a=(((c=t.face.description)==null?void 0:c.skipTime)||0)>T()-t3;return t.skipAllowed&&A&&a&&n3===o&&((d=ae==null?void 0:ae[n])==null?void 0:d.age)>0&&((y=ae==null?void 0:ae[n])==null?void 0:y.genderScore)>0?(Bt++,ae[n]):(Bt=0,new Promise(async l=>{var m;if((m=t.face.description)!=null&&m.enabled){let x=Ht(e),p=x0==null?void 0:x0.execute(x);t3=T(),r.dispose(x);let M=await p.find(B=>B.shape[1]===1).data(),P=Math.trunc(200*Math.abs(M[0]-.5))/100;P>(t.face.description.minConfidence||0)&&(s.gender=M[0]<=.5?"female":"male",s.genderScore=Math.min(.99,P));let v=r.argMax(p.find(B=>B.shape[1]===100),1),f=(await v.data())[0];r.dispose(v);let S=await p.find(B=>B.shape[1]===100).data();s.age=Math.round(S[f-1]>S[f+1]?10*f-100*S[f-1]:10*f+100*S[f+1])/10,(Number.isNaN(M[0])||Number.isNaN(S[0]))&&b("faceres error:",{model:x0,result:p});let E=p.find(B=>B.shape[1]===1024),I=E?await E.data():[];s.descriptor=Array.from(I),p.forEach(B=>r.dispose(B))}ae[n]=s,n3=o,l(s)}))}var C0,Zt=[],as=["white","black","asian","indian","other"],is=[15,23,28,35.5,45.5,55.5,65],r3=0,s3=0,Xt=Number.MAX_SAFE_INTEGER;async function A3(e){var t;return w.initial&&(C0=null),C0?e.debug&&b("cached model:",C0.modelUrl):C0=await O((t=e.face.gear)==null?void 0:t.modelPath),C0}async function qt(e,t,n,o){var a,i;if(!C0)return{age:0,gender:"unknown",genderScore:0,race:[]};let s=Xt<(((a=t.face.gear)==null?void 0:a.skipFrames)||0),A=(((i=t.face.gear)==null?void 0:i.skipTime)||0)>T()-s3;return t.skipAllowed&&A&&s&&r3===o&&Zt[n]?(Xt++,Zt[n]):(Xt=0,new Promise(async c=>{var P,v;if(!(C0!=null&&C0.inputs[0].shape))return;let d={},y=[[0,.1,.9,.9]];d.resize=r.image.cropAndResize(e,y,[0],[C0.inputs[0].shape[2],C0.inputs[0].shape[1]]);let l={age:0,gender:"unknown",genderScore:0,race:[]};(P=t.face.gear)!=null&&P.enabled&&([d.age,d.gender,d.race]=C0.execute(d.resize,["age_output","gender_output","race_output"]));let m=await d.gender.data();l.gender=m[0]>m[1]?"male":"female",l.genderScore=Math.round(100*(m[0]>m[1]?m[0]:m[1]))/100;let x=await d.race.data();for(let f=0;f(((v=t.face.gear)==null?void 0:v.minConfidence)||.2)&&l.race.push({score:Math.round(100*x[f])/100,race:as[f]});l.race.sort((f,g)=>g.score-f.score);let u=Array.from(await d.age.data()).map((f,g)=>[is[g],f]).sort((f,g)=>g[1]-f[1]),M=u[0][0];for(let f=1;fr.dispose(d[f])),Zt[n]=l,r3=o,s3=T(),c(l)}))}function W2(e){return[Math.abs(e.endPoint[0]-e.startPoint[0]),Math.abs(e.endPoint[1]-e.startPoint[1])]}function A2(e){return[e.startPoint[0]+(e.endPoint[0]-e.startPoint[0])/2,e.startPoint[1]+(e.endPoint[1]-e.startPoint[1])/2]}function c3(e,t,n){let o=t.shape[1],s=t.shape[2],A=[[e.startPoint[1]/o,e.startPoint[0]/s,e.endPoint[1]/o,e.endPoint[0]/s]];return r.image.cropAndResize(t,A,[0],n)}function d3(e,t){let n=[e.startPoint[0]*t[0],e.startPoint[1]*t[1]],o=[e.endPoint[0]*t[0],e.endPoint[1]*t[1]],s=e.palmLandmarks.map(A=>[A[0]*t[0],A[1]*t[1]]);return{startPoint:n,endPoint:o,palmLandmarks:s,confidence:e.confidence}}function F2(e,t=1.5){let n=A2(e),o=W2(e),s=[t*o[0]/2,t*o[1]/2],A=[n[0]-s[0],n[1]-s[1]],a=[n[0]+s[0],n[1]+s[1]];return{startPoint:A,endPoint:a,palmLandmarks:e.palmLandmarks}}function G2(e){let t=A2(e),n=W2(e),s=Math.max(...n)/2,A=[t[0]-s,t[1]-s],a=[t[0]+s,t[1]+s];return{startPoint:A,endPoint:a,palmLandmarks:e.palmLandmarks}}function ls(e){return e-2*Math.PI*Math.floor((e+Math.PI)/(2*Math.PI))}function x3(e,t){let n=Math.PI/2-Math.atan2(-(t[1]-e[1]),t[0]-e[0]);return ls(n)}var i3=(e,t)=>[[1,0,e],[0,1,t],[0,0,1]];function ie(e,t){let n=0;for(let o=0;o[a.x,a.y]),this.anchorsTensor=r.tensor2d(this.anchors),this.inputSize=((A=(s=(o=(n=this==null?void 0:this.model)==null?void 0:n.inputs)==null?void 0:o[0])==null?void 0:s.shape)==null?void 0:A[2])||0,this.inputSizeTensor=r.tensor1d([this.inputSize,this.inputSize]),this.doubleInputSizeTensor=r.tensor1d([this.inputSize*2,this.inputSize*2])}normalizeBoxes(t){let n={};n.boxOffsets=r.slice(t,[0,0],[-1,2]),n.boxSizes=r.slice(t,[0,2],[-1,2]),n.div=r.div(n.boxOffsets,this.inputSizeTensor),n.boxCenterPoints=r.add(n.div,this.anchorsTensor),n.halfBoxSizes=r.div(n.boxSizes,this.doubleInputSizeTensor),n.sub=r.sub(n.boxCenterPoints,n.halfBoxSizes),n.startPoints=r.mul(n.sub,this.inputSizeTensor),n.add=r.add(n.boxCenterPoints,n.halfBoxSizes),n.endPoints=r.mul(n.add,this.inputSizeTensor);let o=r.concat2d([n.startPoints,n.endPoints],1);return Object.keys(n).forEach(s=>r.dispose(n[s])),o}normalizeLandmarks(t,n){let o={};o.reshape=r.reshape(t,[-1,7,2]),o.div=r.div(o.reshape,this.inputSizeTensor),o.landmarks=r.add(o.div,this.anchors[n]?this.anchors[n]:0);let s=r.mul(o.landmarks,this.inputSizeTensor);return Object.keys(o).forEach(A=>r.dispose(o[A])),s}async predict(t,n){var i;let o={};o.resize=r.image.resizeBilinear(t,[this.inputSize,this.inputSize]),o.div=r.div(o.resize,C.tf127),o.image=r.sub(o.div,C.tf1),o.batched=this.model.execute(o.image),o.predictions=r.squeeze(o.batched),o.slice=r.slice(o.predictions,[0,0],[-1,1]),o.sigmoid=r.sigmoid(o.slice),o.scores=r.squeeze(o.sigmoid);let s=await o.scores.data();o.boxes=r.slice(o.predictions,[0,1],[-1,4]),o.norm=this.normalizeBoxes(o.boxes),o.nms=await r.image.nonMaxSuppressionAsync(o.norm,o.scores,3*(((i=n.hand)==null?void 0:i.maxDetected)||1),n.hand.iouThreshold,n.hand.minConfidence);let A=await o.nms.array(),a=[];for(let c of A){let d={};d.box=r.slice(o.norm,[c,0],[1,-1]),d.slice=r.slice(o.predictions,[c,5],[1,14]),d.norm=this.normalizeLandmarks(d.slice,c),d.palmLandmarks=r.reshape(d.norm,[-1,2]);let y=await d.box.data(),l=y.slice(0,2),m=y.slice(2,4),x=await d.palmLandmarks.array(),p={startPoint:l,endPoint:m,palmLandmarks:x,confidence:s[c]},u=d3(p,[(t.shape[2]||1)/this.inputSize,(t.shape[1]||0)/this.inputSize]);a.push(u),Object.keys(d).forEach(M=>r.dispose(d[M]))}return Object.keys(o).forEach(c=>r.dispose(o[c])),a}};var ys=5,p3=1.65,u3=[0,5,9,13,17,1,2],fs=0,ms=2,h3=0,H2=class{constructor(t,n){k(this,"handDetector");k(this,"handPoseModel");k(this,"inputSize");k(this,"storedBoxes");k(this,"skipped");k(this,"detectedHands");var o,s,A;this.handDetector=t,this.handPoseModel=n,this.inputSize=((A=(s=(o=this.handPoseModel)==null?void 0:o.inputs)==null?void 0:s[0].shape)==null?void 0:A[2])||0,this.storedBoxes=[],this.skipped=Number.MAX_SAFE_INTEGER,this.detectedHands=0}calculateLandmarksBoundingBox(t){let n=t.map(a=>a[0]),o=t.map(a=>a[1]),s=[Math.min(...n),Math.min(...o)],A=[Math.max(...n),Math.max(...o)];return{startPoint:s,endPoint:A}}getBoxForPalmLandmarks(t,n){let o=t.map(A=>Yt([...A,1],n)),s=this.calculateLandmarksBoundingBox(o);return F2(G2(s),ys)}getBoxForHandLandmarks(t){let n=this.calculateLandmarksBoundingBox(t),o=F2(G2(n),p3);o.palmLandmarks=[];for(let s=0;s[a[0]*(x[0]-this.inputSize/2),a[1]*(x[1]-this.inputSize/2),a[2]*x[2]]),c=Ut(o,[0,0]),d=i.map(x=>[...Yt(x,c),x[2]]),y=y3(s),l=[...A2(n),1],m=[ie(l,y[0]),ie(l,y[1])];return d.map(x=>[Math.trunc(x[0]+m[0]),Math.trunc(x[1]+m[1]),Math.trunc(x[2])])}async estimateHands(t,n){let o=!1,s,A=(n.hand.skipTime||0)>T()-h3,a=this.skipped<(n.hand.skipFrames||0);n.skipAllowed&&A&&a&&(s=await this.handDetector.predict(t,n),this.skipped=0),n.skipAllowed&&this.skipped++,s&&s.length>0&&(s.length!==this.detectedHands&&this.detectedHands!==n.hand.maxDetected||!n.hand.landmarks)&&(this.detectedHands=0,this.storedBoxes=[...s],this.storedBoxes.length>0&&(o=!0));let i=[];for(let c=0;c=n.hand.minConfidence/4){let S=r.reshape(f,[-1,3]),E=await S.array();r.dispose(f),r.dispose(S);let I=this.transformRawCoords(E,u,y,p),B=this.getBoxForHandLandmarks(I);this.storedBoxes[c]={...B,confidence:g};let U={landmarks:I,confidence:g,boxConfidence:d.confidence,fingerConfidence:g,box:{topLeft:B.startPoint,bottomRight:B.endPoint}};i.push(U)}else this.storedBoxes[c]=null;r.dispose(f)}else{let y=F2(G2(d),p3),l={confidence:d.confidence,boxConfidence:d.confidence,fingerConfidence:0,box:{topLeft:y.startPoint,bottomRight:y.endPoint},landmarks:[]};i.push(l)}}return this.storedBoxes=this.storedBoxes.filter(c=>c!==null),this.detectedHands=i.length,i.length>n.hand.maxDetected&&(i.length=n.hand.maxDetected),i}};var h0={thumb:0,index:1,middle:2,ring:3,pinky:4,all:[0,1,2,3,4],nameMapping:{0:"thumb",1:"index",2:"middle",3:"ring",4:"pinky"},pointsMapping:{0:[[0,1],[1,2],[2,3],[3,4]],1:[[0,5],[5,6],[6,7],[7,8]],2:[[0,9],[9,10],[10,11],[11,12]],3:[[0,13],[13,14],[14,15],[15,16]],4:[[0,17],[17,18],[18,19],[19,20]]},getName:e=>h0.nameMapping[e],getPoints:e=>h0.pointsMapping[e]},ce={none:0,half:1,full:2,nameMapping:{0:"none",1:"half",2:"full"},getName:e=>ce.nameMapping[e]},Q={verticalUp:0,verticalDown:1,horizontalLeft:2,horizontalRight:3,diagonalUpRight:4,diagonalUpLeft:5,diagonalDownRight:6,diagonalDownLeft:7,nameMapping:{0:"verticalUp",1:"verticalDown",2:"horizontalLeft",3:"horizontalRight",4:"diagonalUpRight",5:"diagonalUpLeft",6:"diagonalDownRight",7:"diagonalDownLeft"},getName:e=>Q.nameMapping[e]},le=class{constructor(t){k(this,"name");k(this,"curls");k(this,"directions");k(this,"weights");k(this,"weightsRelative");this.name=t,this.curls={},this.directions={},this.weights=[1,1,1,1,1],this.weightsRelative=[1,1,1,1,1]}curl(t,n,o){typeof this.curls[t]=="undefined"&&(this.curls[t]=[]),this.curls[t].push([n,o])}direction(t,n,o){this.directions[t]||(this.directions[t]=[]),this.directions[t].push([n,o])}weight(t,n){this.weights[t]=n;let o=this.weights.reduce((s,A)=>s+A,0);this.weightsRelative=this.weights.map(s=>s*5/o)}matchAgainst(t,n){let o=0;for(let s in t){let A=t[s],a=this.curls[s];if(typeof a=="undefined"){o+=this.weightsRelative[s];continue}for(let[i,c]of a)if(A===i){o+=c*this.weightsRelative[s];break}}for(let s in n){let A=n[s],a=this.directions[s];if(typeof a=="undefined"){o+=this.weightsRelative[s];continue}for(let[i,c]of a)if(A===i){o+=c*this.weightsRelative[s];break}}return o/10}};var{thumb:G0,index:Y0,middle:K0,ring:ve,pinky:Pe}=h0,{none:B0,half:us,full:H0}=ce,{verticalUp:Be,verticalDown:Na,horizontalLeft:Kt,horizontalRight:hs,diagonalUpRight:bs,diagonalUpLeft:He,diagonalDownRight:Ia,diagonalDownLeft:Oa}=Q,de=new le("thumbs up");de.curl(G0,B0,1);de.direction(G0,Be,1);de.direction(G0,He,.25);de.direction(G0,bs,.25);for(let e of[h0.index,h0.middle,h0.ring,h0.pinky])de.curl(e,H0,1),de.direction(e,Kt,1),de.direction(e,hs,1);var t0=new le("victory");t0.curl(G0,us,.5);t0.curl(G0,B0,.5);t0.direction(G0,Be,1);t0.direction(G0,He,1);t0.curl(Y0,B0,1);t0.direction(Y0,Be,.75);t0.direction(Y0,He,1);t0.curl(K0,B0,1);t0.direction(K0,Be,1);t0.direction(K0,He,.75);t0.curl(ve,H0,1);t0.direction(ve,Be,.2);t0.direction(ve,He,1);t0.direction(ve,Kt,.2);t0.curl(Pe,H0,1);t0.direction(Pe,Be,.2);t0.direction(Pe,He,1);t0.direction(Pe,Kt,.2);t0.weight(Y0,2);t0.weight(K0,2);var xe=new le("point");xe.curl(G0,H0,1);xe.curl(Y0,B0,.5);xe.curl(K0,H0,.5);xe.curl(ve,H0,.5);xe.curl(Pe,H0,.5);xe.weight(Y0,2);xe.weight(K0,2);var ye=new le("middle finger");ye.curl(G0,B0,1);ye.curl(Y0,H0,.5);ye.curl(K0,H0,.5);ye.curl(ve,H0,.5);ye.curl(Pe,H0,.5);ye.weight(Y0,2);ye.weight(K0,2);var Ve=new le("open palm");Ve.curl(G0,B0,.75);Ve.curl(Y0,B0,.75);Ve.curl(K0,B0,.75);Ve.curl(ve,B0,.75);Ve.curl(Pe,B0,.75);var b3=[de,t0,xe,ye,Ve];var gs=.7,Re={HALF_CURL_START_LIMIT:60,NO_CURL_START_LIMIT:130,DISTANCE_VOTE_POWER:1.1,SINGLE_ANGLE_VOTE_POWER:.9,TOTAL_ANGLE_VOTE_POWER:1.6};function g3(e,t,n,o){let s=(t-o)/(e-n),A=Math.atan(s)*180/Math.PI;return A<=0?A=-A:A>0&&(A=180-A),A}function T3(e,t){if(!e||!t)return[0,0];let n=g3(e[0],e[1],t[0],t[1]);if(e.length===2)return n;let o=g3(e[1],e[2],t[1],t[2]);return[n,o]}function M3(e,t=1){let n=0,o=0,s=0;return e>=75&&e<=105?n=1*t:e>=25&&e<=155?o=1*t:s=1*t,[n,o,s]}function Ms(e,t,n){let o=e[0]-t[0],s=e[0]-n[0],A=t[0]-n[0],a=e[1]-t[1],i=e[1]-n[1],c=t[1]-n[1],d=e[2]-t[2],y=e[2]-n[2],l=t[2]-n[2],m=Math.sqrt(o*o+a*a+d*d),x=Math.sqrt(s*s+i*i+y*y),p=Math.sqrt(A*A+c*c+l*l),u=(p*p+m*m-x*x)/(2*p*m);u>1?u=1:u<-1&&(u=-1);let M=Math.acos(u);M=57.2958*M%180;let P;return M>Re.NO_CURL_START_LIMIT?P=ce.none:M>Re.HALF_CURL_START_LIMIT?P=ce.half:P=ce.full,P}function v3(e,t,n,o){let s;return o===Math.abs(e)?e>0?s=Q.horizontalLeft:s=Q.horizontalRight:o===Math.abs(t)?t>0?s=Q.horizontalLeft:s=Q.horizontalRight:n>0?s=Q.horizontalLeft:s=Q.horizontalRight,s}function P3(e,t,n,o){let s;return o===Math.abs(e)?e<0?s=Q.verticalDown:s=Q.verticalUp:o===Math.abs(t)?t<0?s=Q.verticalDown:s=Q.verticalUp:n<0?s=Q.verticalDown:s=Q.verticalUp,s}function Ts(e,t,n,o,s,A,a,i){let c,d=P3(e,t,n,o),y=v3(s,A,a,i);return d===Q.verticalUp?y===Q.horizontalLeft?c=Q.diagonalUpLeft:c=Q.diagonalUpRight:y===Q.horizontalLeft?c=Q.diagonalDownLeft:c=Q.diagonalDownRight,c}function vs(e,t,n,o){let s=e[0]-t[0],A=e[0]-n[0],a=t[0]-n[0],i=e[1]-t[1],c=e[1]-n[1],d=t[1]-n[1],y=Math.max(Math.abs(s),Math.abs(A),Math.abs(a)),l=Math.max(Math.abs(i),Math.abs(c),Math.abs(d)),m=0,x=0,p=0,u=l/(y+1e-5);u>1.5?m+=Re.DISTANCE_VOTE_POWER:u>.66?x+=Re.DISTANCE_VOTE_POWER:p+=Re.DISTANCE_VOTE_POWER;let M=Math.sqrt(s*s+i*i),P=Math.sqrt(A*A+c*c),v=Math.sqrt(a*a+d*d),f=Math.max(M,P,v),g=e[0],S=e[1],E=n[0],I=n[1];f===M?(E=n[0],I=n[1]):f===v&&(g=t[0],S=t[1]);let F=T3([g,S],[E,I]),H=M3(F,Re.TOTAL_ANGLE_VOTE_POWER);m+=H[0],x+=H[1],p+=H[2];for(let R of o){let L=M3(R,Re.SINGLE_ANGLE_VOTE_POWER);m+=L[0],x+=L[1],p+=L[2]}let K;return m===Math.max(m,x,p)?K=P3(c,i,d,l):p===Math.max(x,p)?K=v3(A,s,a,y):K=Ts(c,i,d,l,A,s,a,y),K}function R3(e){let t=[],n=[],o=[],s=[];if(!e)return{curls:o,directions:s};for(let A of h0.all){let a=h0.getPoints(A),i=[],c=[];for(let d of a){let y=e[d[0]],l=e[d[1]],m=T3(y,l),x=m[0],p=m[1];i.push(x),c.push(p)}t.push(i),n.push(c)}for(let A of h0.all){let a=A===h0.thumb?1:0,i=h0.getPoints(A),c=e[i[a][0]],d=e[i[a+1][1]],y=e[i[3][1]],l=Ms(c,d,y),m=vs(c,d,y,t[A].slice(a));o[A]=l,s[A]=m}return{curls:o,directions:s}}function V2(e){if(!e||e.length===0)return null;let t=R3(e),n={};for(let o of h0.all)n[h0.getName(o)]={curl:ce.getName(t.curls[o]),direction:Q.getName(t.directions[o])};return n}function k3(e){let t=[];if(!e||e.length===0)return t;let n=R3(e);for(let o of b3){let s=o.matchAgainst(n.curls,n.directions);s>=gs&&t.push({name:o.name,confidence:s})}return t}var w3={thumb:[1,2,3,4],index:[5,6,7,8],middle:[9,10,11,12],ring:[13,14,15,16],pinky:[17,18,19,20],palm:[0]},ke,we,E3;async function Qt(e,t){let n=await E3.estimateHands(e,t);if(!n)return[];let o=[];for(let s=0;sn[s].landmarks[l]);let a=n[s].landmarks,i=[Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,0,0],c=[0,0,0,0];if(a&&a.length>0){for(let y of a)y[0]i[2]&&(i[2]=y[0]),y[1]>i[3]&&(i[3]=y[1]);i[2]-=i[0],i[3]-=i[1],c=[i[0]/(e.shape[2]||0),i[1]/(e.shape[1]||0),i[2]/(e.shape[2]||0),i[3]/(e.shape[1]||0)]}else i=n[s].box?[Math.trunc(Math.max(0,n[s].box.topLeft[0])),Math.trunc(Math.max(0,n[s].box.topLeft[1])),Math.trunc(Math.min(e.shape[2]||0,n[s].box.bottomRight[0])-Math.max(0,n[s].box.topLeft[0])),Math.trunc(Math.min(e.shape[1]||0,n[s].box.bottomRight[1])-Math.max(0,n[s].box.topLeft[1]))]:[0,0,0,0],c=[n[s].box.topLeft[0]/(e.shape[2]||0),n[s].box.topLeft[1]/(e.shape[1]||0),(n[s].box.bottomRight[0]-n[s].box.topLeft[0])/(e.shape[2]||0),(n[s].box.bottomRight[1]-n[s].box.topLeft[1])/(e.shape[1]||0)];let d=V2(a);o.push({id:s,score:Math.round(100*n[s].confidence)/100,boxScore:Math.round(100*n[s].boxConfidence)/100,fingerScore:Math.round(100*n[s].fingerConfidence)/100,label:"hand",box:i,boxRaw:c,keypoints:a,annotations:A,landmarks:d})}return o}async function _t(e){var n,o;w.initial&&(ke=null,we=null),!ke||!we?[ke,we]=await Promise.all([e.hand.enabled?O((n=e.hand.detector)==null?void 0:n.modelPath):null,e.hand.landmarks?O((o=e.hand.skeleton)==null?void 0:o.modelPath):null]):(e.debug&&b("cached model:",ke.modelUrl),e.debug&&b("cached model:",we.modelUrl));let t=ke?new B2(ke):void 0;return t&&we&&(E3=new H2(t,we)),[ke,we]}var $=[null,null],Ps=["StatefulPartitionedCall/Postprocessor/Slice","StatefulPartitionedCall/Postprocessor/ExpandDims_1"],fe=[[0,0],[0,0]],Rs=["hand","fist","pinch","point","face","tip","pinchtip"],S3=4,j3=1.6,ks=512,ws=1.4,D2=Number.MAX_SAFE_INTEGER,$t=0,J0=[0,0],_={boxes:[],hands:[]},N3={thumb:[1,2,3,4],index:[5,6,7,8],middle:[9,10,11,12],ring:[13,14,15,16],pinky:[17,18,19,20],base:[0],palm:[0,17,13,9,5,1,0]};async function I3(e){var t;if(w.initial&&($[0]=null),$[0])e.debug&&b("cached model:",$[0].modelUrl);else{Z2(["tensorlistreserve","enter","tensorlistfromtensor","merge","loopcond","switch","exit","tensorliststack","nextiteration","tensorlistsetitem","tensorlistgetitem","reciprocal","shape","split","where"],e),$[0]=await O((t=e.hand.detector)==null?void 0:t.modelPath);let n=$[0].executor?Object.values($[0].modelSignature.inputs):void 0;fe[0][0]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[1].size):0,fe[0][1]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[2].size):0}return $[0]}async function O3(e){var t;if(w.initial&&($[1]=null),$[1])e.debug&&b("cached model:",$[1].modelUrl);else{$[1]=await O((t=e.hand.skeleton)==null?void 0:t.modelPath);let n=$[1].executor?Object.values($[1].modelSignature.inputs):void 0;fe[1][0]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[1].size):0,fe[1][1]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[2].size):0}return $[1]}async function Es(e,t){let n=[];if(!e||!$[0])return n;let o={},s=(e.shape[2]||1)/(e.shape[1]||1),A=Math.min(Math.round((e.shape[1]||0)/8)*8,ks),a=Math.round(A*s/8)*8;o.resize=r.image.resizeBilinear(e,[A,a]),o.cast=r.cast(o.resize,"int32"),[o.rawScores,o.rawBoxes]=await $[0].executeAsync(o.cast,Ps),o.boxes=r.squeeze(o.rawBoxes,[0,2]),o.scores=r.squeeze(o.rawScores,[0]);let i=r.unstack(o.scores,1);r.dispose(i[S3]),i.splice(S3,1),o.filtered=r.stack(i,1),r.dispose(i),o.max=r.max(o.filtered,1),o.argmax=r.argMax(o.filtered,1);let c=0;o.nms=await r.image.nonMaxSuppressionAsync(o.boxes,o.max,(t.hand.maxDetected||0)+1,t.hand.iouThreshold||0,t.hand.minConfidence||1);let d=await o.nms.data(),y=await o.max.data(),l=await o.argmax.data();for(let m of Array.from(d)){let x=r.slice(o.boxes,m,1),p=await x.data();r.dispose(x);let u=[p[1],p[0],p[3]-p[1],p[2]-p[0]],M=j2(u,ws),P=[Math.trunc(u[0]*J0[0]),Math.trunc(u[1]*J0[1]),Math.trunc(u[2]*J0[0]),Math.trunc(u[3]*J0[1])],v=y[m],f=Rs[l[m]],g={id:c++,score:v,box:P,boxRaw:M,label:f};n.push(g)}return Object.keys(o).forEach(m=>r.dispose(o[m])),n.sort((m,x)=>x.score-m.score),n.length>(t.hand.maxDetected||1)&&(n.length=t.hand.maxDetected||1),n}async function e5(e,t,n){let o={id:t.id,score:Math.round(100*t.score)/100,boxScore:Math.round(100*t.score)/100,fingerScore:0,box:t.box,boxRaw:t.boxRaw,label:t.label,keypoints:[],landmarks:{},annotations:{}};if(e&&$[1]&&n.hand.landmarks&&t.score>(n.hand.minConfidence||0)){let s={},A=[t.boxRaw[1],t.boxRaw[0],t.boxRaw[3]+t.boxRaw[1],t.boxRaw[2]+t.boxRaw[0]];s.crop=r.image.cropAndResize(e,[A],[0],[fe[1][0],fe[1][1]],"bilinear"),s.div=r.div(s.crop,C.tf255),[s.score,s.keypoints]=$[1].execute(s.div,["Identity_1","Identity"]);let a=(await s.score.data())[0],i=(100-Math.trunc(100/(1+Math.exp(a))))/100;if(i>=(n.hand.minConfidence||0)){o.fingerScore=i,s.reshaped=r.reshape(s.keypoints,[-1,3]);let y=(await s.reshaped.array()).map(l=>[l[0]/fe[1][1],l[1]/fe[1][0],l[2]||0]).map(l=>[l[0]*t.boxRaw[2],l[1]*t.boxRaw[3],l[2]||0]);o.keypoints=y.map(l=>[J0[0]*(l[0]+t.boxRaw[0]),J0[1]*(l[1]+t.boxRaw[1]),l[2]||0]),o.landmarks=V2(o.keypoints);for(let l of Object.keys(N3))o.annotations[l]=N3[l].map(m=>o.landmarks&&o.keypoints[m]?o.keypoints[m]:null)}Object.keys(s).forEach(c=>r.dispose(s[c]))}return o}async function t5(e,t){var s,A;if(!((s=$[0])!=null&&s.executor)||!((A=$[1])!=null&&A.executor)||!$[0].inputs[0].shape||!$[1].inputs[0].shape)return[];J0=[e.shape[2]||0,e.shape[1]||0],D2++;let n=(t.hand.skipTime||0)>T()-$t,o=D2<(t.hand.skipFrames||0);return t.skipAllowed&&n&&o?_.hands:new Promise(async a=>{let i=3*(t.hand.skipTime||0)>T()-$t,c=D2<3*(t.hand.skipFrames||0);t.skipAllowed&&_.hands.length===t.hand.maxDetected?_.hands=await Promise.all(_.boxes.map(y=>e5(e,y,t))):t.skipAllowed&&i&&c&&_.hands.length>0?_.hands=await Promise.all(_.boxes.map(y=>e5(e,y,t))):(_.boxes=await Es(e,t),$t=T(),_.hands=await Promise.all(_.boxes.map(y=>e5(e,y,t))),D2=0);let d=[..._.boxes];if(_.boxes.length=0,t.cacheSensitivity>0)for(let y=0;y<_.hands.length;y++){let l=k1(_.hands[y].keypoints,J0);if(l.box[2]/(e.shape[2]||1)>.05&&l.box[3]/(e.shape[1]||1)>.05&&_.hands[y].fingerScore&&_.hands[y].fingerScore>(t.hand.minConfidence||0)){let m=j2(l.box,j3),x=j2(l.boxRaw,j3);_.boxes.push({...d[y],box:m,boxRaw:x})}}for(let y=0;y<_.hands.length;y++){let l=U0(_.hands[y].keypoints,J0);_.hands[y].box=l.box,_.hands[y].boxRaw=l.boxRaw}a(_.hands)})}var M0,n5=[],L3=0,W3=0,F3=Number.MAX_SAFE_INTEGER;async function G3(e){return w.initial&&(M0=null),M0?e.debug&&b("cached model:",M0.modelUrl):M0=await O(e.face.insightface.modelPath),M0}async function o5(e,t,n,o){var a,i;if(!(M0!=null&&M0.executor))return[];let s=F3<(((a=t.face.insightface)==null?void 0:a.skipFrames)||0),A=(((i=t.face.insightface)==null?void 0:i.skipTime)||0)>T()-W3;return t.skipAllowed&&A&&s&&L3===o&&n5[n]?(F3++,n5[n]):new Promise(async c=>{var y;let d=[];if(((y=t.face.insightface)==null?void 0:y.enabled)&&(M0==null?void 0:M0.inputs[0].shape)){let l={};l.crop=r.image.resizeBilinear(e,[M0.inputs[0].shape[2],M0.inputs[0].shape[1]],!1),l.data=M0.execute(l.crop);let m=await l.data.data();d=Array.from(m),Object.keys(l).forEach(x=>r.dispose(l[x]))}n5[n]=d,L3=o,W3=T(),c(d)})}var l0,X2=[],r5=Number.MAX_SAFE_INTEGER,H3=0,V3=0;async function D3(e){var t;return w.initial&&(l0=null),l0?e.debug&&b("cached model:",l0.modelUrl):l0=await O((t=e.face.liveness)==null?void 0:t.modelPath),l0}async function s5(e,t,n,o){var a,i;if(!(l0!=null&&l0.executor))return 0;let s=(((a=t.face.liveness)==null?void 0:a.skipTime)||0)>T()-V3,A=r5<(((i=t.face.liveness)==null?void 0:i.skipFrames)||0);return t.skipAllowed&&s&&A&&H3===o&&X2[n]?(r5++,X2[n]):(r5=0,new Promise(async c=>{let d=r.image.resizeBilinear(e,[l0!=null&&l0.inputs[0].shape?l0.inputs[0].shape[2]:0,l0!=null&&l0.inputs[0].shape?l0.inputs[0].shape[1]:0],!1),y=l0==null?void 0:l0.execute(d),l=(await y.data())[0];X2[n]=Math.round(100*l)/100,H3=o,V3=T(),r.dispose([d,y]),c(X2[n])}))}var y0;async function A5(e){return!y0||w.initial?y0=await O(e.segmentation.modelPath):e.debug&&b("cached model:",y0.modelUrl),y0}async function X3(e,t){var s;if(y0||(y0=await A5(t)),!(y0!=null&&y0.executor)||!((s=y0==null?void 0:y0.inputs)!=null&&s[0].shape))return null;let n={};n.resize=r.image.resizeBilinear(e,[y0.inputs[0].shape?y0.inputs[0].shape[1]:0,y0.inputs[0].shape?y0.inputs[0].shape[2]:0],!1),n.norm=r.div(n.resize,C.tf255),n.res=y0.execute(n.norm),n.squeeze=r.squeeze(n.res,0),[n.bgRaw,n.fgRaw]=r.unstack(n.squeeze,2),n.fg=r.softmax(n.fgRaw),n.mul=r.mul(n.fg,C.tf255),n.expand=r.expandDims(n.mul,2),n.output=r.image.resizeBilinear(n.expand,[e.shape[1],e.shape[2]]);let o;switch(t.segmentation.mode||"default"){case"default":n.input=r.squeeze(e),n.concat=r.concat([n.input,n.output],-1),o=r.cast(n.concat,"int32");break;case"alpha":o=r.cast(n.output,"int32");break;default:o=r.tensor(0)}return Object.keys(n).forEach(A=>r.dispose(n[A])),o}var T0,a5=[],U3=0,Y3=0,K3=Number.MAX_SAFE_INTEGER;async function J3(e){var t;return w.initial&&(T0=null),T0?e.debug&&b("cached model:",T0.modelUrl):T0=await O((t=e.face.mobilefacenet)==null?void 0:t.modelPath),T0}async function i5(e,t,n,o){var a,i;if(!(T0!=null&&T0.executor))return[];let s=K3<(((a=t.face.mobilefacenet)==null?void 0:a.skipFrames)||0),A=(((i=t.face.mobilefacenet)==null?void 0:i.skipTime)||0)>T()-Y3;return t.skipAllowed&&A&&s&&U3===o&&a5[n]?(K3++,a5[n]):new Promise(async c=>{var y;let d=[];if(((y=t.face.mobilefacenet)==null?void 0:y.enabled)&&(T0==null?void 0:T0.inputs[0].shape)){let l={};l.crop=r.image.resizeBilinear(e,[T0.inputs[0].shape[2],T0.inputs[0].shape[1]],!1),l.data=T0.execute(l.crop);let m=await l.data.data();d=Array.from(m),Object.keys(l).forEach(x=>r.dispose(l[x]))}a5[n]=d,U3=o,Y3=T(),c(d)})}var a2={};te(a2,{connected:()=>U2,horizontal:()=>l5,kpt:()=>q2,relative:()=>d5,vertical:()=>c5});var q2=["nose","leftEye","rightEye","leftEar","rightEar","leftShoulder","rightShoulder","leftElbow","rightElbow","leftWrist","rightWrist","leftHip","rightHip","leftKnee","rightKnee","leftAnkle","rightAnkle"],l5=[["leftEye","rightEye"],["leftEar","rightEar"],["leftShoulder","rightShoulder"],["leftElbow","rightElbow"],["leftWrist","rightWrist"],["leftHip","rightHip"],["leftKnee","rightKnee"],["leftAnkle","rightAnkle"]],c5=[["leftKnee","leftShoulder"],["rightKnee","rightShoulder"],["leftAnkle","leftKnee"],["rightAnkle","rightKnee"]],d5=[[["leftHip","rightHip"],["leftShoulder","rightShoulder"]],[["leftElbow","rightElbow"],["leftShoulder","rightShoulder"]]],U2={leftLeg:["leftHip","leftKnee","leftAnkle"],rightLeg:["rightHip","rightKnee","rightAnkle"],torso:["leftShoulder","rightShoulder","rightHip","leftHip","leftShoulder"],leftArm:["leftShoulder","leftElbow","leftWrist"],rightArm:["rightShoulder","rightElbow","rightWrist"],head:[]};var _3=.005,v0={keypoints:[],padding:[[0,0],[0,0],[0,0],[0,0]]};function x5(e){for(let t of l5){let n=e.keypoints.findIndex(s=>s.part===t[0]),o=e.keypoints.findIndex(s=>s.part===t[1]);if(e.keypoints[n]&&e.keypoints[o]&&e.keypoints[n].position[0]s&&s.part===t[0]),o=e.keypoints.findIndex(s=>s&&s.part===t[1]);e.keypoints[n]&&e.keypoints[o]&&e.keypoints[n].position[1]d&&d.part===t[0]),s=e.keypoints.findIndex(d=>d&&d.part===t[1]),A=e.keypoints.findIndex(d=>d&&d.part===n[0]),a=e.keypoints.findIndex(d=>d&&d.part===n[1]);if(!e.keypoints[A]||!e.keypoints[a])continue;let i=e.keypoints[o]?[Math.abs(e.keypoints[A].position[0]-e.keypoints[o].position[0]),Math.abs(e.keypoints[a].position[0]-e.keypoints[o].position[0])]:[0,0],c=e.keypoints[s]?[Math.abs(e.keypoints[a].position[0]-e.keypoints[s].position[0]),Math.abs(e.keypoints[A].position[0]-e.keypoints[s].position[0])]:[0,0];if(i[0]>i[1]||c[0]>c[1]){let d=e.keypoints[o];e.keypoints[o]=e.keypoints[s],e.keypoints[s]=d}}}function $3(e){for(let t=0;te.shape[1]?Math.trunc((e.shape[2]-e.shape[1])/2):0,e.shape[2]>e.shape[1]?Math.trunc((e.shape[2]-e.shape[1])/2):0],[e.shape[1]>e.shape[2]?Math.trunc((e.shape[1]-e.shape[2])/2):0,e.shape[1]>e.shape[2]?Math.trunc((e.shape[1]-e.shape[2])/2):0],[0,0]],n.pad=r.pad(e,v0.padding),n.resize=r.image.resizeBilinear(n.pad,[t,t]);let o=r.cast(n.resize,"int32");return Object.keys(n).forEach(a=>r.dispose(n[a])),o}function tn(e,t){e.keypoints=e.keypoints.filter(o=>o==null?void 0:o.position);for(let o of e.keypoints)o.position=[o.position[0]*(t[0]+v0.padding[2][0]+v0.padding[2][1])/t[0]-v0.padding[2][0],o.position[1]*(t[1]+v0.padding[1][0]+v0.padding[1][1])/t[1]-v0.padding[1][0]],o.positionRaw=[o.position[0]/t[0],o.position[1]/t[1]];let n=U0(e.keypoints.map(o=>o.position),t);return e.box=n.box,e.boxRaw=n.boxRaw,e}var n0,Y2=0,y5=Number.MAX_SAFE_INTEGER,Ee={boxes:[],bodies:[],last:0};async function nn(e){var t;return w.initial&&(n0=null),n0?e.debug&&b("cached model:",n0.modelUrl):(Z2(["size"],e),n0=await O(e.body.modelPath)),Y2=(n0==null?void 0:n0.executor)&&((t=n0==null?void 0:n0.inputs)==null?void 0:t[0].shape)?n0.inputs[0].shape[2]:0,Y2<64&&(Y2=256),n0}function Ss(e,t,n){let o=e[0][0],s=[],A=0;for(let y=0;yt.body.minConfidence){let l=[o[y][1],o[y][0]];s.push({score:Math.round(100*A)/100,part:q2[y],positionRaw:l,position:[Math.round((n.shape[2]||0)*l[0]),Math.round((n.shape[1]||0)*l[1])]})}A=s.reduce((y,l)=>l.score>y?l.score:y,0);let a=[],i=U0(s.map(y=>y.position),[n.shape[2],n.shape[1]]),c={};for(let[y,l]of Object.entries(U2)){let m=[];for(let x=0;xM.part===l[x]),u=s.find(M=>M.part===l[x+1]);p&&u&&p.score>(t.body.minConfidence||0)&&u.score>(t.body.minConfidence||0)&&m.push([p.position,u.position])}c[y]=m}let d={id:0,score:A,box:i.box,boxRaw:i.boxRaw,keypoints:s,annotations:c};return x5(d),a.push(d),a}function js(e,t,n){let o=[];for(let s=0;st.body.minConfidence){let i=[];for(let l=0;l<17;l++){let m=A[3*l+2];if(m>t.body.minConfidence){let x=[A[3*l+1],A[3*l+0]];i.push({part:q2[l],score:Math.round(100*m)/100,positionRaw:x,position:[Math.round((n.shape[2]||0)*x[0]),Math.round((n.shape[1]||0)*x[1])]})}}let c=U0(i.map(l=>l.position),[n.shape[2],n.shape[1]]),d={};for(let[l,m]of Object.entries(U2)){let x=[];for(let p=0;pP.part===m[p]),M=i.find(P=>P.part===m[p+1]);u&&M&&u.score>(t.body.minConfidence||0)&&M.score>(t.body.minConfidence||0)&&x.push([u.position,M.position])}d[l]=x}let y={id:s,score:a,box:c.box,boxRaw:c.boxRaw,keypoints:[...i],annotations:d};x5(y),o.push(y)}}return o.sort((s,A)=>A.score-s.score),o.length>t.body.maxDetected&&(o.length=t.body.maxDetected),o}async function f5(e,t){var s;if(!(n0!=null&&n0.executor)||!((s=n0==null?void 0:n0.inputs)!=null&&s[0].shape))return[];t.skipAllowed||(Ee.boxes.length=0),y5++;let n=(t.body.skipTime||0)>T()-Ee.last,o=y5<(t.body.skipFrames||0);return t.skipAllowed&&n&&o?Ee.bodies:new Promise(async A=>{let a={};y5=0,a.input=en(e,Y2),a.res=n0==null?void 0:n0.execute(a.input),Ee.last=T();let i=await a.res.array();Ee.bodies=a.res.shape[2]===17?Ss(i,t,e):js(i,t,e);for(let c of Ee.bodies)tn(c,[e.shape[2]||1,e.shape[1]||1]),$3(c.keypoints);Object.keys(a).forEach(c=>r.dispose(a[c])),A(Ee.bodies)})}var L0,K2=[],rn=0,m5=Number.MAX_SAFE_INTEGER,Q2=0,J2=2.5;async function sn(e){if(!L0||w.initial){L0=await O(e.object.modelPath);let t=L0!=null&&L0.executor?Object.values(L0.modelSignature.inputs):void 0;Q2=Array.isArray(t)?parseInt(t[0].tensorShape.dim[2].size):416}else e.debug&&b("cached model:",L0.modelUrl);return L0}async function Ns(e,t,n){let o=0,s=[],A=Q2;for(let d of[1,2,4]){let y=d*13,l=r.squeeze(e.find(P=>P.shape[1]===y**2&&(P.shape[2]||0)===We.length)),m=await l.array(),x=r.squeeze(e.find(P=>P.shape[1]===y**2&&(P.shape[2]||0)(n.object.minConfidence||0)&&v!==61){let g=(.5+Math.trunc(P%y))/y,S=(.5+Math.trunc(P/y))/y,E=M[P].map(L=>L*(y/d/A)),[I,B]=[g-J2/d*E[0],S-J2/d*E[1]],[U,F]=[g+J2/d*E[2]-I,S+J2/d*E[3]-B],H=[I,B,U,F];H=H.map(L=>Math.max(0,Math.min(L,1)));let K=[H[0]*t[0],H[1]*t[1],H[2]*t[0],H[3]*t[1]],R={id:o++,score:Math.round(100*f)/100,class:v+1,label:We[v].label,box:K.map(L=>Math.trunc(L)),boxRaw:H};s.push(R)}}r.dispose([l,x,p,u])}let a=s.map(d=>[d.boxRaw[1],d.boxRaw[0],d.boxRaw[3],d.boxRaw[2]]),i=s.map(d=>d.score),c=[];if(a&&a.length>0){let d=await r.image.nonMaxSuppressionAsync(a,i,n.object.maxDetected,n.object.iouThreshold,n.object.minConfidence);c=await d.data(),r.dispose(d)}return s=s.filter((d,y)=>c.includes(y)).sort((d,y)=>y.score-d.score),s}async function p5(e,t){if(!(L0!=null&&L0.executor))return[];let n=(t.object.skipTime||0)>T()-rn,o=m5<(t.object.skipFrames||0);return t.skipAllowed&&n&&o&&K2.length>0?(m5++,K2):(m5=0,!w.kernels.includes("mod")||!w.kernels.includes("sparsetodense")?K2:new Promise(async s=>{let A=[e.shape[2]||0,e.shape[1]||0],a=r.image.resizeBilinear(e,[Q2,Q2],!1),i=r.div(a,C.tf255),c=r.transpose(i,[0,3,1,2]),d;t.object.enabled&&(d=L0.execute(c)),rn=T();let y=await Ns(d,A,t);K2=y,r.dispose([a,i,c,...d]),s(y)}))}var l2=["nose","leftEye","rightEye","leftEar","rightEar","leftShoulder","rightShoulder","leftElbow","rightElbow","leftWrist","rightWrist","leftHip","rightHip","leftKnee","rightKnee","leftAnkle","rightAnkle"],Is=l2.length,i2=l2.reduce((e,t,n)=>(e[t]=n,e),{}),Os=[["leftHip","leftShoulder"],["leftElbow","leftShoulder"],["leftElbow","leftWrist"],["leftHip","leftKnee"],["leftKnee","leftAnkle"],["rightHip","rightShoulder"],["rightElbow","rightShoulder"],["rightElbow","rightWrist"],["rightHip","rightKnee"],["rightKnee","rightAnkle"],["leftShoulder","rightShoulder"],["leftHip","rightHip"]],f7=Os.map(([e,t])=>[i2[e],i2[t]]),an=[["nose","leftEye"],["leftEye","leftEar"],["nose","rightEye"],["rightEye","rightEar"],["nose","leftShoulder"],["leftShoulder","leftElbow"],["leftElbow","leftWrist"],["leftShoulder","leftHip"],["leftHip","leftKnee"],["leftKnee","leftAnkle"],["nose","rightShoulder"],["rightShoulder","rightElbow"],["rightElbow","rightWrist"],["rightShoulder","rightHip"],["rightHip","rightKnee"],["rightKnee","rightAnkle"]];function ln(e){let t=e.reduce(({maxX:n,maxY:o,minX:s,minY:A},{position:{x:a,y:i}})=>({maxX:Math.max(n,a),maxY:Math.max(o,i),minX:Math.min(s,a),minY:Math.min(A,i)}),{maxX:Number.NEGATIVE_INFINITY,maxY:Number.NEGATIVE_INFINITY,minX:Number.POSITIVE_INFINITY,minY:Number.POSITIVE_INFINITY});return[t.minX,t.minY,t.maxX-t.minX,t.maxY-t.minY]}function cn(e,[t,n],[o,s]){let A=t/o,a=n/s,i=(d,y)=>({id:y,score:d.score,boxRaw:[d.box[0]/s,d.box[1]/o,d.box[2]/s,d.box[3]/o],box:[Math.trunc(d.box[0]*a),Math.trunc(d.box[1]*A),Math.trunc(d.box[2]*a),Math.trunc(d.box[3]*A)],keypoints:d.keypoints.map(({score:l,part:m,position:x})=>({score:l,part:m,position:[Math.trunc(x.x*a),Math.trunc(x.y*A)],positionRaw:[x.x/o,x.y/o]})),annotations:{}});return e.map((d,y)=>i(d,y))}var _2=class{constructor(t,n){k(this,"priorityQueue");k(this,"numberOfElements");k(this,"getElementValue");this.priorityQueue=new Array(t),this.numberOfElements=-1,this.getElementValue=n}enqueue(t){this.priorityQueue[++this.numberOfElements]=t,this.swim(this.numberOfElements)}dequeue(){let t=this.priorityQueue[0];return this.exchange(0,this.numberOfElements--),this.sink(0),this.priorityQueue[this.numberOfElements+1]=null,t}empty(){return this.numberOfElements===-1}size(){return this.numberOfElements+1}all(){return this.priorityQueue.slice(0,this.numberOfElements+1)}max(){return this.priorityQueue[0]}swim(t){for(;t>0&&this.less(Math.floor(t/2),t);)this.exchange(t,Math.floor(t/2)),t=Math.floor(t/2)}sink(t){for(;2*t<=this.numberOfElements;){let n=2*t;if(nn?n:e}function dn(e,t,n,o){let s=n-e,A=o-t;return s*s+A*A}function g5(e,t){return{x:e.x+t.x,y:e.y+t.y}}var P0,Ls=["MobilenetV1/offset_2/BiasAdd","MobilenetV1/heatmap_2/BiasAdd","MobilenetV1/displacement_fwd_2/BiasAdd","MobilenetV1/displacement_bwd_2/BiasAdd"],$2=1,De=16,Ws=50**2;function xn(e,t,n,o,s,A,a=2){let i=P=>({y:A.get(P.y,P.x,e),x:A.get(P.y,P.x,A.shape[2]/2+e)}),c=(P,v,f)=>({y:b5(Math.round(P.y/De),0,v-1),x:b5(Math.round(P.x/De),0,f-1)}),[d,y]=o.shape,l=c(t.position,d,y),m=i(l),p=g5(t.position,m);for(let P=0;P[i2[m],i2[x]]),a=A.map(([,m])=>m),i=A.map(([m])=>m),c=t.shape[2],d=a.length,y=new Array(c),l=h5(e.part,De,n);y[e.part.id]={score:e.score,part:l2[e.part.id],position:l};for(let m=d-1;m>=0;--m){let x=a[m],p=i[m];y[x]&&!y[p]&&(y[p]=xn(m,y[x],p,t,n,s))}for(let m=0;mt){i=!1;break}if(!i)break}return i}function Bs(e,t){let[n,o,s]=t.shape,A=new _2(n*o*s,({score:a})=>a);for(let a=0;a{var a;let A=(a=s[o])==null?void 0:a.position;return A?dn(n,t,A.y,A.x)<=Ws:!1})}function Hs(e,t){return t.reduce((o,{position:s,score:A},a)=>(yn(e,s,a)||(o+=A),o),0)/t.length}function Vs(e,t,n,o,s,A){let a=[],i=Bs(A,t);for(;a.lengthx.score>A);let l=Hs(a,y),m=ln(y);l>A&&a.push({keypoints:y,box:m,score:Math.round(100*l)/100})}return a}async function M5(e,t){if(!(P0!=null&&P0.executor))return[];let n=r.tidy(()=>{if(!P0.inputs[0].shape)return[];let a=r.image.resizeBilinear(e,[P0.inputs[0].shape[2],P0.inputs[0].shape[1]]),i=r.sub(r.div(r.cast(a,"float32"),127.5),1),d=P0.execute(i,Ls).map(y=>r.squeeze(y,[0]));return d[1]=r.sigmoid(d[1]),d}),o=await Promise.all(n.map(a=>a.buffer()));for(let a of n)r.dispose(a);let s=Vs(o[0],o[1],o[2],o[3],t.body.maxDetected,t.body.minConfidence);return P0.inputs[0].shape?cn(s,[e.shape[1],e.shape[2]],[P0.inputs[0].shape[2],P0.inputs[0].shape[1]]):[]}async function fn(e){return!P0||w.initial?P0=await O(e.body.modelPath):e.debug&&b("cached model:",P0.modelUrl),P0}var Z0,Ds=["fgr","pha","r1o","r2o","r3o","r4o"],o0={},v5=0;function un(e){r.dispose([o0.r1i,o0.r2i,o0.r3i,o0.r4i,o0.downsample_ratio]),o0.r1i=r.tensor(0),o0.r2i=r.tensor(0),o0.r3i=r.tensor(0),o0.r4i=r.tensor(0),v5=e.segmentation.ratio||.5,o0.downsample_ratio=r.tensor(v5)}async function P5(e){return!Z0||w.initial?Z0=await O(e.segmentation.modelPath):e.debug&&b("cached model:",Z0.modelUrl),un(e),Z0}var pn=e=>r.tidy(()=>{let t=r.squeeze(e,[0]),n=r.mul(t,C.tf255);return r.cast(n,"int32")});function T5(e,t){let n=e?pn(e):r.fill([t.shape[1]||0,t.shape[2]||0,3],255,"int32"),o=t?pn(t):r.fill([e.shape[1]||0,e.shape[2]||0,1],255,"int32"),s=r.concat([n,o],-1);return r.dispose([n,o]),s}function Zs(e){return r.tidy(()=>{let t={};return t.unstack=r.unstack(e,-1),t.concat=r.concat(t.unstack,1),t.split=r.split(t.concat,4,1),t.stack=r.concat(t.split,2),t.squeeze=r.squeeze(t.stack,[0]),t.expand=r.expandDims(t.squeeze,-1),t.add=r.add(t.expand,1),t.mul=r.mul(t.add,127.5),t.cast=r.cast(t.mul,"int32"),t.tile=r.tile(t.cast,[1,1,3]),t.alpha=r.fill([t.tile.shape[0]||0,t.tile.shape[1]||0,1],255,"int32"),r.concat([t.tile,t.alpha],-1)})}async function hn(e,t){if(Z0||(Z0=await P5(t)),!(Z0!=null&&Z0.executor))return null;o0.src=r.div(e,255),v5!==t.segmentation.ratio&&un(t);let[n,o,s,A,a,i]=await Z0.executeAsync(o0,Ds),c;switch(t.segmentation.mode||"default"){case"default":c=T5(n,o);break;case"alpha":c=T5(null,o);break;case"foreground":c=T5(n,null);break;case"state":c=Zs(s);break;default:c=r.tensor(0)}return r.dispose([o0.src,n,o,o0.r1i,o0.r2i,o0.r3i,o0.r4i]),[o0.r1i,o0.r2i,o0.r3i,o0.r4i]=[s,A,a,i],c}var f0;async function R5(e){return!f0||w.initial?f0=await O(e.segmentation.modelPath):e.debug&&b("cached model:",f0.modelUrl),f0}async function gn(e,t){var s;if(f0||(f0=await R5(t)),!(f0!=null&&f0.executor)||!((s=f0==null?void 0:f0.inputs)!=null&&s[0].shape))return null;let n={};n.resize=r.image.resizeBilinear(e,[f0.inputs[0].shape?f0.inputs[0].shape[1]:0,f0.inputs[0].shape?f0.inputs[0].shape[2]:0],!1),n.norm=r.div(n.resize,C.tf255),n.res=f0.execute(n.norm),n.squeeze=r.squeeze(n.res,0),n.alpha=r.image.resizeBilinear(n.squeeze,[e.shape[1],e.shape[2]]),n.mul=r.mul(n.alpha,C.tf255);let o;switch(t.segmentation.mode||"default"){case"default":n.input=r.squeeze(e),n.concat=r.concat([n.input,n.mul],-1),o=r.cast(n.concat,"int32");break;case"alpha":o=r.cast(n.mul,"int32");break;default:o=r.tensor(0)}return Object.keys(n).forEach(A=>r.dispose(n[A])),o}var R0,et=[],Tn=0,vn=0,k5=Number.MAX_SAFE_INTEGER;async function Pn(e){return w.initial&&(R0=null),R0?e.debug&&b("cached model:",R0.modelUrl):R0=await O(e.face.ssrnet.modelPathAge),R0}async function w5(e,t,n,o){var a,i,c,d;if(!R0)return{age:0};let s=k5<(((a=t.face.ssrnet)==null?void 0:a.skipFrames)||0),A=(((i=t.face.ssrnet)==null?void 0:i.skipTime)||0)>T()-vn;return t.skipAllowed&&s&&A&&Tn===o&&((c=et[n])==null?void 0:c.age)&&((d=et[n])==null?void 0:d.age)>0?(k5++,et[n]):(k5=0,new Promise(async y=>{var x;if(!(R0!=null&&R0.inputs)||!R0.inputs[0]||!R0.inputs[0].shape)return;let l={};l.resize=r.image.resizeBilinear(e,[R0.inputs[0].shape[2],R0.inputs[0].shape[1]],!1),l.enhance=r.mul(l.resize,C.tf255);let m={age:0};if((x=t.face.ssrnet)!=null&&x.enabled&&(l.age=R0.execute(l.enhance)),l.age){let p=await l.age.data();m.age=Math.trunc(10*p[0])/10}Object.keys(l).forEach(p=>r.dispose(l[p])),et[n]=m,Tn=o,vn=T(),y(m)}))}var W0,tt=[],kn=0,wn=0,E5=Number.MAX_SAFE_INTEGER,z5=[.2989,.587,.114];async function En(e){var t;return w.initial&&(W0=null),W0?e.debug&&b("cached model:",W0.modelUrl):W0=await O((t=e.face.ssrnet)==null?void 0:t.modelPathGender),W0}async function S5(e,t,n,o){var a,i,c,d;if(!W0)return{gender:"unknown",genderScore:0};let s=E5<(((a=t.face.ssrnet)==null?void 0:a.skipFrames)||0),A=(((i=t.face.ssrnet)==null?void 0:i.skipTime)||0)>T()-wn;return t.skipAllowed&&s&&A&&kn===o&&((c=tt[n])==null?void 0:c.gender)&&((d=tt[n])==null?void 0:d.genderScore)>0?(E5++,tt[n]):(E5=0,new Promise(async y=>{var p;if(!(W0!=null&&W0.inputs[0].shape))return;let l={};l.resize=r.image.resizeBilinear(e,[W0.inputs[0].shape[2],W0.inputs[0].shape[1]],!1),l.enhance=r.tidy(()=>{let[u,M,P]=r.split(l.resize,3,3),v=r.mul(u,z5[0]),f=r.mul(M,z5[1]),g=r.mul(P,z5[2]),S=r.addN([v,f,g]);return r.mul(r.sub(S,C.tf05),2)});let m={gender:"unknown",genderScore:0};(p=t.face.ssrnet)!=null&&p.enabled&&(l.gender=W0.execute(l.enhance));let x=await l.gender.data();m.gender=x[0]>x[1]?"female":"male",m.genderScore=x[0]>x[1]?Math.trunc(100*x[0])/100:Math.trunc(100*x[1])/100,Object.keys(l).forEach(u=>r.dispose(l[u])),tt[n]=m,kn=o,wn=T(),y(m)}))}var c2=class{constructor(){k(this,"ssrnetage",null);k(this,"gear",null);k(this,"blazeposedetect",null);k(this,"blazepose",null);k(this,"centernet",null);k(this,"efficientpose",null);k(this,"mobilefacenet",null);k(this,"insightface",null);k(this,"emotion",null);k(this,"facedetect",null);k(this,"faceiris",null);k(this,"facemesh",null);k(this,"faceres",null);k(this,"ssrnetgender",null);k(this,"handpose",null);k(this,"handskeleton",null);k(this,"handtrack",null);k(this,"liveness",null);k(this,"meet",null);k(this,"movenet",null);k(this,"nanodet",null);k(this,"posenet",null);k(this,"selfie",null);k(this,"rvm",null);k(this,"antispoof",null)}},h,j5=e=>{e&&(h=e),h||b("instance not registred");let t=0,n=0,o=0;for(let A of Object.values(I0))t+=A.sizeFromManifest,n+=A.sizeLoadedWeights,o+=A.sizeDesired;let s=o>0?n/o:0;return{numLoadedModels:Object.values(I0).length,numDefinedModels:Object.keys(h.models).length,percentageLoaded:s,totalSizeFromManifest:t,totalSizeWeights:n,totalSizeLoading:o,totalSizeEnabled:void 0,modelStats:Object.values(I0)}};function nt(e){e&&(h=e);for(let t of Object.keys(h.models))h.models[t]=null}async function N5(e){var t,n,o,s,A,a,i,c,d,y,l,m,x,p,u,M,P,v,f,g,S,E,I,B,U,F,H,K,R;e&&(h=e),h||b("instance not registred"),w.initial&&nt(h),h.config.hand.enabled&&(!h.models.handpose&&((n=(t=h.config.hand.detector)==null?void 0:t.modelPath)==null?void 0:n.includes("handdetect"))&&([h.models.handpose,h.models.handskeleton]=await _t(h.config)),!h.models.handskeleton&&h.config.hand.landmarks&&((s=(o=h.config.hand.detector)==null?void 0:o.modelPath)==null?void 0:s.includes("handdetect"))&&([h.models.handpose,h.models.handskeleton]=await _t(h.config))),h.config.body.enabled&&!h.models.blazepose&&((A=h.config.body.modelPath)==null?void 0:A.includes("blazepose"))&&(h.models.blazepose=j1(h.config)),h.config.body.enabled&&!h.models.blazeposedetect&&h.config.body.detector&&h.config.body.detector.modelPath&&(h.models.blazeposedetect=S1(h.config)),h.config.body.enabled&&!h.models.efficientpose&&((a=h.config.body.modelPath)==null?void 0:a.includes("efficientpose"))&&(h.models.efficientpose=W1(h.config)),h.config.body.enabled&&!h.models.movenet&&((i=h.config.body.modelPath)==null?void 0:i.includes("movenet"))&&(h.models.movenet=nn(h.config)),h.config.body.enabled&&!h.models.posenet&&((c=h.config.body.modelPath)==null?void 0:c.includes("posenet"))&&(h.models.posenet=fn(h.config)),h.config.face.enabled&&!h.models.facedetect&&(h.models.facedetect=M1(h.config)),h.config.face.enabled&&((d=h.config.face.antispoof)==null?void 0:d.enabled)&&!h.models.antispoof&&(h.models.antispoof=a1(h.config)),h.config.face.enabled&&((y=h.config.face.liveness)==null?void 0:y.enabled)&&!h.models.liveness&&(h.models.liveness=D3(h.config)),h.config.face.enabled&&((l=h.config.face.description)==null?void 0:l.enabled)&&!h.models.faceres&&(h.models.faceres=o3(h.config)),h.config.face.enabled&&((m=h.config.face.emotion)==null?void 0:m.enabled)&&!h.models.emotion&&(h.models.emotion=H1(h.config)),h.config.face.enabled&&((x=h.config.face.iris)==null?void 0:x.enabled)&&!((p=h.config.face.attention)!=null&&p.enabled)&&!h.models.faceiris&&(h.models.faceiris=q1(h.config)),h.config.face.enabled&&((u=h.config.face.mesh)==null?void 0:u.enabled)&&!h.models.facemesh&&(h.models.facemesh=_1(h.config)),h.config.face.enabled&&((M=h.config.face.gear)==null?void 0:M.enabled)&&!h.models.gear&&(h.models.gear=A3(h.config)),h.config.face.enabled&&((P=h.config.face.ssrnet)==null?void 0:P.enabled)&&!h.models.ssrnetage&&(h.models.ssrnetage=Pn(h.config)),h.config.face.enabled&&((v=h.config.face.ssrnet)==null?void 0:v.enabled)&&!h.models.ssrnetgender&&(h.models.ssrnetgender=En(h.config)),h.config.face.enabled&&((f=h.config.face.mobilefacenet)==null?void 0:f.enabled)&&!h.models.mobilefacenet&&(h.models.mobilefacenet=J3(h.config)),h.config.face.enabled&&((g=h.config.face.insightface)==null?void 0:g.enabled)&&!h.models.insightface&&(h.models.insightface=G3(h.config)),h.config.hand.enabled&&!h.models.handtrack&&((E=(S=h.config.hand.detector)==null?void 0:S.modelPath)==null?void 0:E.includes("handtrack"))&&(h.models.handtrack=I3(h.config)),h.config.hand.enabled&&h.config.hand.landmarks&&!h.models.handskeleton&&((B=(I=h.config.hand.detector)==null?void 0:I.modelPath)==null?void 0:B.includes("handtrack"))&&(h.models.handskeleton=O3(h.config)),h.config.object.enabled&&!h.models.centernet&&((U=h.config.object.modelPath)==null?void 0:U.includes("centernet"))&&(h.models.centernet=O1(h.config)),h.config.object.enabled&&!h.models.nanodet&&((F=h.config.object.modelPath)==null?void 0:F.includes("nanodet"))&&(h.models.nanodet=sn(h.config)),h.config.segmentation.enabled&&!h.models.selfie&&((H=h.config.segmentation.modelPath)==null?void 0:H.includes("selfie"))&&(h.models.selfie=R5(h.config)),h.config.segmentation.enabled&&!h.models.meet&&((K=h.config.segmentation.modelPath)==null?void 0:K.includes("meet"))&&(h.models.meet=A5(h.config)),h.config.segmentation.enabled&&!h.models.rvm&&((R=h.config.segmentation.modelPath)==null?void 0:R.includes("rvm"))&&(h.models.rvm=P5(h.config));for await(let L of Object.keys(h.models))h.models[L]&&typeof h.models[L]!="undefined"&&(h.models[L]=await h.models[L])}function ot(e,t,n){var d,y;if(!t||(e&&(h=e),h||b("instance not registred"),!((d=h==null?void 0:h.config)!=null&&d.validateModels)))return null;let o=["const","placeholder","noop","pad","squeeze","add","sub","mul","div"],s=["biasadd","fusedbatchnormv3","matmul","switch","shape","merge","split","broadcastto"],A=[],a=[],i=t.modelUrl,c=t.executor;if((y=c==null?void 0:c.graph)!=null&&y.nodes)for(let l of Object.values(c.graph.nodes)){let m=l.op.toLowerCase();A.includes(m)||A.push(m)}else!c&&h.config.debug&&b("model not loaded",n);for(let l of A)!o.includes(l)&&!s.includes(l)&&!h.env.kernels.includes(l)&&!h.env.kernels.includes(l.replace("_",""))&&!h.env.kernels.includes(l.replace("native",""))&&!h.env.kernels.includes(l.replace("v2",""))&&a.push(l);return h.config.debug&&a.length>0&&b("model validation failed:",n,a),a.length>0?{name:n,missing:a,ops:A,url:i}:null}function rt(e){e&&(h=e),h||b("instance not registred");let t=[];for(let n of Object.keys(e.models)){let o=e.models[n];if(!o)continue;let s=ot(e,o,n);s&&t.push(s)}return t}var Z={name:"humangl",priority:999,canvas:null,gl:null,extensions:[],webGLattr:{alpha:!1,antialias:!1,premultipliedAlpha:!1,preserveDrawingBuffer:!1,depth:!1,stencil:!1,failIfMajorPerformanceCaveat:!1,desynchronized:!0}};function Xs(){let e=Z.gl;!e||(Z.extensions=e.getSupportedExtensions())}function Sn(e){var t;if(e.config.backend==="humangl"&&(Z.name in r.engine().registry&&!((t=Z==null?void 0:Z.gl)!=null&&t.getParameter(Z.gl.VERSION))&&(b("humangl error: backend invalid context"),nt(e)),!r.findBackend(Z.name))){try{Z.canvas=N0(100,100)}catch(o){b("humangl error: cannot create canvas:",o);return}try{if(Z.gl=Z.canvas.getContext("webgl2",Z.webGLattr),!Z.gl){b("humangl error: cannot get webgl context");return}if(!Z.gl.getParameter(Z.gl.VERSION).includes("2.0")){b("backend override: using fallback webgl backend as webgl 2.0 is not detected"),e.config.backend="webgl";return}Z.canvas&&(Z.canvas.addEventListener("webglcontextlost",s=>{throw b("humangl error:",s.type),b("possible browser memory leak using webgl or conflict with multiple backend registrations"),e.emit("error"),new Error("backend error: webgl context lost")}),Z.canvas.addEventListener("webglcontextrestored",s=>{b("humangl error: context restored:",s)}),Z.canvas.addEventListener("webglcontextcreationerror",s=>{b("humangl error: context create:",s)}))}catch(o){b("humangl error: cannot get webgl context:",o);return}try{r.setWebGLContext(2,Z.gl)}catch(o){b("humangl error: cannot set webgl context:",o);return}try{let o=new r.GPGPUContext(Z.gl);r.registerBackend(Z.name,()=>new r.MathBackendWebGL(o),Z.priority)}catch(o){b("humangl error: cannot register webgl backend:",o);return}try{r.getKernelsForBackend("webgl").forEach(s=>{let A={...s,backendName:Z.name};r.registerKernel(A)})}catch(o){b("humangl error: cannot update webgl backend registration:",o);return}try{r.env().flagRegistry.WEBGL_VERSION&&r.env().set("WEBGL_VERSION",2)}catch(o){b("humangl error: cannot set WebGL backend flags:",o);return}Xs();let n=r.backend().getGPGPUContext?r.backend().getGPGPUContext().gl:null;n?e.config.debug&&b("humangl backend registered:",{webgl:n.getParameter(n.VERSION),renderer:n.getParameter(n.RENDERER)}):b("humangl error: no current gl context:",n,Z.gl)}}function qs(e){let t=[];if(!w.kernels.includes("mod")){let n={kernelName:"Mod",backendName:r.getBackend(),kernelFunc:o=>r.tidy(()=>r.sub(o.inputs.a,r.mul(r.div(o.inputs.a,o.inputs.b),o.inputs.b)))};r.registerKernel(n),w.kernels.push("mod"),t.push("mod")}if(!w.kernels.includes("floormod")){let n={kernelName:"FloorMod",backendName:r.getBackend(),kernelFunc:o=>r.tidy(()=>r.add(r.mul(r.floorDiv(o.inputs.a/o.inputs.b),o.inputs.b),r.mod(o.inputs.a,o.inputs.b)))};r.registerKernel(n),w.kernels.push("floormod"),t.push("floormod")}if(!w.kernels.includes("rotatewithoffset")&&e.softwareKernels){let n={kernelName:"RotateWithOffset",backendName:r.getBackend(),kernelFunc:o=>r.tidy(()=>{let s=r.getBackend();r.setBackend("cpu");let A=r.image.rotateWithOffset(o.inputs.image,o.attrs.radians,o.attrs.fillValue,o.attrs.center);return r.setBackend(s),A})};r.registerKernel(n),w.kernels.push("rotatewithoffset"),t.push("rotatewithoffset")}t.length>0&&e.debug&&b("registered kernels:",t)}var Nn={};async function x2(e,t=!1){if(e.state="backend",t||w.initial||e.config.backend&&e.config.backend.length>0&&r.getBackend()!==e.config.backend){let n=T();if(e.config.backend&&e.config.backend.length>0){if(typeof window=="undefined"&&typeof WorkerGlobalScope!="undefined"&&e.config.debug&&e.config.debug&&b("running inside web worker"),w.browser&&e.config.backend==="tensorflow"&&(e.config.debug&&b("override: backend set to tensorflow while running in browser"),e.config.backend="webgl"),w.node&&(e.config.backend==="webgl"||e.config.backend==="humangl")&&(e.config.debug&&b(`override: backend set to ${e.config.backend} while running in nodejs`),e.config.backend="tensorflow"),w.browser&&e.config.backend==="webgpu")if(typeof navigator=="undefined"||typeof navigator.gpu=="undefined")b("override: backend set to webgpu but browser does not support webgpu"),e.config.backend="webgl";else{let s=await navigator.gpu.requestAdapter();if(e.config.debug&&b("enumerated webgpu adapter:",s),!s)b("override: backend set to webgpu but browser reports no available gpu"),e.config.backend="webgl";else{let A="requestAdapterInfo"in s?await s.requestAdapterInfo():void 0;b("webgpu adapter info:",A)}}let o=Object.keys(r.engine().registryFactory);if(e.config.backend==="humangl"&&!o.includes("humangl")&&(Sn(e),o=Object.keys(r.engine().registryFactory)),e.config.debug&&b("available backends:",o),o.includes(e.config.backend)||(b(`error: backend ${e.config.backend} not found in registry`),e.config.backend=w.node?"tensorflow":"webgl",e.config.debug&&b(`override: setting backend ${e.config.backend}`)),e.config.debug&&b("setting backend:",[e.config.backend]),e.config.backend==="wasm"){if(r.env().flagRegistry.CANVAS2D_WILL_READ_FREQUENTLY&&r.env().set("CANVAS2D_WILL_READ_FREQUENTLY",!0),e.config.debug&&b("wasm path:",e.config.wasmPath),typeof r.setWasmPaths!="undefined")r.setWasmPaths(e.config.wasmPath,e.config.wasmPlatformFetch);else throw new Error("backend error: attempting to use wasm backend but wasm path is not set");let s=!1,A=!1;try{s=await r.env().getAsync("WASM_HAS_MULTITHREAD_SUPPORT"),A=await r.env().getAsync("WASM_HAS_SIMD_SUPPORT"),e.config.debug&&b(`wasm execution: ${A?"simd":"no simd"} ${s?"multithreaded":"singlethreaded"}`),e.config.debug&&!A&&b("warning: wasm simd support is not enabled")}catch(a){b("wasm detection failed")}}try{await r.setBackend(e.config.backend),await r.ready()}catch(s){return b("error: cannot set backend:",e.config.backend,s),!1}e.config.debug&&(Nn=JSON.parse(JSON.stringify(r.env().flags)))}if((r.getBackend()==="humangl"||r.getBackend()==="webgl")&&(r.env().flagRegistry.WEBGL_USE_SHAPES_UNIFORMS&&r.env().set("WEBGL_USE_SHAPES_UNIFORMS",!0),r.env().flagRegistry.WEBGL_EXP_CONV&&r.env().set("WEBGL_EXP_CONV",!0),e.config.debug&&typeof e.config.deallocate!="undefined"&&e.config.deallocate&&(b("changing webgl: WEBGL_DELETE_TEXTURE_THRESHOLD:",!0),r.env().set("WEBGL_DELETE_TEXTURE_THRESHOLD",0))),r.getBackend(),e.config.debug){let o=r.env().flags,s={};for(let A of Object.keys(o))Nn[A]!==o[A]&&(s[A]=o[A]);e.config.debug&&Object.keys(s).length>0&&b("backend:",r.getBackend(),"flags:",s)}if(e.config.flags&&Object.keys(e.config.flags).length>0){e.config.debug&&b("flags:",e.config.flags);for(let[o,s]of Object.entries(e.config.flags))r.env().set(o,s)}r.enableProdMode(),l1(),e.performance.initBackend=Math.trunc(T()-n),e.config.backend=r.getBackend(),await w.updateBackend(),qs(e.config),w.initial=!1}return!0}function Z2(e,t){for(let n of e){let o={kernelName:n,backendName:t.backend,kernelFunc:()=>{t.debug&&b("kernelFunc",n,t.backend)}};r.registerKernel(o)}w.kernels=r.getKernelsForBackend(r.getBackend()).map(n=>n.kernelName.toLowerCase())}var Cn={};te(Cn,{all:()=>F5,body:()=>Xe,canvas:()=>W5,face:()=>Ze,gesture:()=>Ye,hand:()=>qe,object:()=>Ue,options:()=>m0,person:()=>L5});var E0=e=>{if(!e)b("draw error: invalid canvas");else if(!e.getContext)b("draw error: canvas context not defined");else{let t=e.getContext("2d");if(!t)b("draw error: cannot get canvas context");else return t}return null},ze=e=>Math.round(e*180/Math.PI),Q0=(e,t)=>{if(!t.useDepth||typeof e=="undefined")return t.color;let n=Uint8ClampedArray.from([127+2*e,127-2*e,255]);return`rgba(${n[0]}, ${n[1]}, ${n[2]}, ${t.alpha})`};function _0(e,t,n,o,s){e.fillStyle=Q0(o,s),e.beginPath(),e.arc(t,n,s.pointSize,0,2*Math.PI),e.fill()}function X0(e,t,n,o,s,A){if(e.beginPath(),e.lineWidth=A.lineWidth,A.useCurves){let a=(t+t+o)/2,i=(n+n+s)/2;e.ellipse(a,i,o/2,s/2,0,0,2*Math.PI)}else e.moveTo(t+A.roundRect,n),e.lineTo(t+o-A.roundRect,n),e.quadraticCurveTo(t+o,n,t+o,n+A.roundRect),e.lineTo(t+o,n+s-A.roundRect),e.quadraticCurveTo(t+o,n+s,t+o-A.roundRect,n+s),e.lineTo(t+A.roundRect,n+s),e.quadraticCurveTo(t,n+s,t,n+s-A.roundRect),e.lineTo(t,n+A.roundRect),e.quadraticCurveTo(t,n,t+A.roundRect,n),e.closePath();e.stroke()}function I5(e,t,n){if(!(t.length<2)){e.beginPath(),e.moveTo(t[0][0],t[0][1]);for(let o of t)e.strokeStyle=Q0(o[2]||0,n),e.lineTo(Math.trunc(o[0]),Math.trunc(o[1]));e.stroke(),n.fillPolygons&&(e.closePath(),e.fill())}}function On(e,t,n){if(!(t.length<2)){if(e.lineWidth=n.lineWidth,!n.useCurves||t.length<=2){I5(e,t,n);return}e.moveTo(t[0][0],t[0][1]);for(let o=0;o0){let A=e.emotion.map(a=>`${Math.trunc(100*a.score)}% ${a.emotion}`);A.length>3&&(A.length=3),s.push(A.join(" "))}((n=e.rotation)==null?void 0:n.angle)&&((o=e.rotation)==null?void 0:o.gaze)&&(e.rotation.angle.roll&&s.push(`roll: ${ze(e.rotation.angle.roll)}\xB0 yaw:${ze(e.rotation.angle.yaw)}\xB0 pitch:${ze(e.rotation.angle.pitch)}\xB0`),e.rotation.gaze.bearing&&s.push(`gaze: ${ze(e.rotation.gaze.bearing)}\xB0`)),s.length===0&&s.push("face"),t.fillStyle=V.color;for(let A=s.length-1;A>=0;A--){let a=Math.max(e.box[0],0),i=A*V.lineHeight+e.box[1];V.shadowColor&&V.shadowColor!==""&&(t.fillStyle=V.shadowColor,t.fillText(s[A],a+5,i+16)),t.fillStyle=V.labelColor,t.fillText(s[A],a+4,i+15)}}}function Ys(e,t){var n,o,s,A;if(((n=e.annotations)==null?void 0:n.leftEyeIris)&&((o=e.annotations)==null?void 0:o.leftEyeIris[0])){t.strokeStyle=V.useDepth?"rgba(255, 200, 255, 0.3)":V.color,t.beginPath();let a=Math.abs(e.annotations.leftEyeIris[3][0]-e.annotations.leftEyeIris[1][0])/2,i=Math.abs(e.annotations.leftEyeIris[4][1]-e.annotations.leftEyeIris[2][1])/2;t.ellipse(e.annotations.leftEyeIris[0][0],e.annotations.leftEyeIris[0][1],a,i,0,0,2*Math.PI),t.stroke(),V.fillPolygons&&(t.fillStyle=V.useDepth?"rgba(255, 255, 200, 0.3)":V.color,t.fill())}if(((s=e.annotations)==null?void 0:s.rightEyeIris)&&((A=e.annotations)==null?void 0:A.rightEyeIris[0])){t.strokeStyle=V.useDepth?"rgba(255, 200, 255, 0.3)":V.color,t.beginPath();let a=Math.abs(e.annotations.rightEyeIris[3][0]-e.annotations.rightEyeIris[1][0])/2,i=Math.abs(e.annotations.rightEyeIris[4][1]-e.annotations.rightEyeIris[2][1])/2;t.ellipse(e.annotations.rightEyeIris[0][0],e.annotations.rightEyeIris[0][1],a,i,0,0,2*Math.PI),t.stroke(),V.fillPolygons&&(t.fillStyle=V.useDepth?"rgba(255, 255, 200, 0.3)":V.color,t.fill())}}function Ks(e,t){var n;if(V.drawGaze&&((n=e.rotation)==null?void 0:n.angle)&&typeof Path2D!="undefined"){t.strokeStyle="pink";let o=e.box[0]+e.box[2]/2-e.box[3]*ze(e.rotation.angle.yaw)/90,s=e.box[1]+e.box[3]/2+e.box[2]*ze(e.rotation.angle.pitch)/90,A=new Path2D(` + M ${e.box[0]+e.box[2]/2} ${e.box[1]} C - ${valX} ${f.box[1]}, - ${valX} ${f.box[1] + f.box[3]}, - ${f.box[0] + f.box[2] / 2} ${f.box[1] + f.box[3]} - `); - const pathH = new Path2D(` - M ${f.box[0]} ${f.box[1] + f.box[3] / 2} + ${o} ${e.box[1]}, + ${o} ${e.box[1]+e.box[3]}, + ${e.box[0]+e.box[2]/2} ${e.box[1]+e.box[3]} + `),a=new Path2D(` + M ${e.box[0]} ${e.box[1]+e.box[3]/2} C - ${f.box[0]} ${valY}, - ${f.box[0] + f.box[2]} ${valY}, - ${f.box[0] + f.box[2]} ${f.box[1] + f.box[3] / 2} - `); - ctx.stroke(pathH); - ctx.stroke(pathV); - } -} -function drawGazeArrows(f, ctx) { - var _a; - if (opt.drawGaze && ((_a = f.rotation) == null ? void 0 : _a.gaze.strength) && f.rotation.gaze.bearing && f.annotations.leftEyeIris && f.annotations.rightEyeIris && f.annotations.leftEyeIris[0] && f.annotations.rightEyeIris[0]) { - ctx.strokeStyle = "pink"; - ctx.fillStyle = "pink"; - const leftGaze = [ - f.annotations.leftEyeIris[0][0] + Math.sin(f.rotation.gaze.bearing) * f.rotation.gaze.strength * f.box[3], - f.annotations.leftEyeIris[0][1] + Math.cos(f.rotation.gaze.bearing) * f.rotation.gaze.strength * f.box[2] - ]; - arrow(ctx, [f.annotations.leftEyeIris[0][0], f.annotations.leftEyeIris[0][1]], [leftGaze[0], leftGaze[1]], 4); - const rightGaze = [ - f.annotations.rightEyeIris[0][0] + Math.sin(f.rotation.gaze.bearing) * f.rotation.gaze.strength * f.box[3], - f.annotations.rightEyeIris[0][1] + Math.cos(f.rotation.gaze.bearing) * f.rotation.gaze.strength * f.box[2] - ]; - arrow(ctx, [f.annotations.rightEyeIris[0][0], f.annotations.rightEyeIris[0][1]], [rightGaze[0], rightGaze[1]], 4); - } -} -function drawFacePolygons(f, ctx) { - if (opt.drawPolygons && f.mesh.length >= 468) { - ctx.lineWidth = 1; - for (let i = 0; i < TRI468.length / 3; i++) { - const points = [TRI468[i * 3 + 0], TRI468[i * 3 + 1], TRI468[i * 3 + 2]].map((index2) => f.mesh[index2]); - lines(ctx, points, opt); - } - drawIrisElipse(f, ctx); - } -} -function drawFacePoints(f, ctx) { - if (opt.drawPoints && f.mesh.length >= 468) { - for (let i = 0; i < f.mesh.length; i++) { - point(ctx, f.mesh[i][0], f.mesh[i][1], f.mesh[i][2], opt); - if (opt.drawAttention) { - if (LANDMARKS_REFINEMENT_LIPS_CONFIG.includes(i)) - point(ctx, f.mesh[i][0], f.mesh[i][1], f.mesh[i][2] + 127, opt); - if (LANDMARKS_REFINEMENT_LEFT_EYE_CONFIG.includes(i)) - point(ctx, f.mesh[i][0], f.mesh[i][1], f.mesh[i][2] - 127, opt); - if (LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG.includes(i)) - point(ctx, f.mesh[i][0], f.mesh[i][1], f.mesh[i][2] - 127, opt); - } - } - } -} -function drawFaceBoxes(f, ctx) { - if (opt.drawBoxes) { - rect(ctx, f.box[0], f.box[1], f.box[2], f.box[3], opt); - } -} -function face(inCanvas2, result, drawOptions) { - opt = mergeDeep(options3, drawOptions); - if (!result || !inCanvas2) - return; - const ctx = getCanvasContext(inCanvas2); - if (!ctx) - return; - ctx.font = opt.font; - ctx.strokeStyle = opt.color; - ctx.fillStyle = opt.color; - for (const f of result) { - drawFaceBoxes(f, ctx); - drawLabels(f, ctx); - if (f.mesh && f.mesh.length > 0) { - drawFacePoints(f, ctx); - drawFacePolygons(f, ctx); - drawGazeSpheres(f, ctx); - drawGazeArrows(f, ctx); - } - } -} - -// src/draw/body.ts -function body(inCanvas2, result, drawOptions) { - const localOptions = mergeDeep(options3, drawOptions); - if (!result || !inCanvas2) - return; - const ctx = getCanvasContext(inCanvas2); - if (!ctx) - return; - ctx.lineJoin = "round"; - for (let i = 0; i < result.length; i++) { - ctx.strokeStyle = localOptions.color; - ctx.fillStyle = localOptions.color; - ctx.lineWidth = localOptions.lineWidth; - ctx.font = localOptions.font; - if (localOptions.drawBoxes && result[i].box && result[i].box.length === 4) { - rect(ctx, result[i].box[0], result[i].box[1], result[i].box[2], result[i].box[3], localOptions); - if (localOptions.drawLabels) { - if (localOptions.shadowColor && localOptions.shadowColor !== "") { - ctx.fillStyle = localOptions.shadowColor; - ctx.fillText(`body ${100 * result[i].score}%`, result[i].box[0] + 3, 1 + result[i].box[1] + localOptions.lineHeight, result[i].box[2]); - } - ctx.fillStyle = localOptions.labelColor; - ctx.fillText(`body ${100 * result[i].score}%`, result[i].box[0] + 2, 0 + result[i].box[1] + localOptions.lineHeight, result[i].box[2]); - } - } - if (localOptions.drawPoints && result[i].keypoints) { - for (let pt = 0; pt < result[i].keypoints.length; pt++) { - if (!result[i].keypoints[pt].score || result[i].keypoints[pt].score === 0) - continue; - ctx.fillStyle = colorDepth(result[i].keypoints[pt].position[2], localOptions); - point(ctx, result[i].keypoints[pt].position[0], result[i].keypoints[pt].position[1], 0, localOptions); - } - } - if (localOptions.drawLabels && result[i].keypoints) { - ctx.font = localOptions.font; - for (const pt of result[i].keypoints) { - if (!pt.score || pt.score === 0) - continue; - ctx.fillStyle = colorDepth(pt.position[2], localOptions); - ctx.fillText(`${pt.part} ${Math.trunc(100 * pt.score)}%`, pt.position[0] + 4, pt.position[1] + 4); - } - } - if (localOptions.drawPolygons && result[i].keypoints && result[i].annotations) { - for (const part of Object.values(result[i].annotations)) { - for (const connected4 of part) - curves(ctx, connected4, localOptions); - } - } - } -} - -// src/draw/hand.ts -function hand(inCanvas2, result, drawOptions) { - const localOptions = mergeDeep(options3, drawOptions); - if (!result || !inCanvas2) - return; - const ctx = getCanvasContext(inCanvas2); - if (!ctx) - return; - ctx.lineJoin = "round"; - ctx.font = localOptions.font; - for (const h of result) { - if (localOptions.drawBoxes) { - ctx.strokeStyle = localOptions.color; - ctx.fillStyle = localOptions.color; - rect(ctx, h.box[0], h.box[1], h.box[2], h.box[3], localOptions); - if (localOptions.drawLabels) { - if (localOptions.shadowColor && localOptions.shadowColor !== "") { - ctx.fillStyle = localOptions.shadowColor; - ctx.fillText(`hand:${Math.trunc(100 * h.score)}%`, h.box[0] + 3, 1 + h.box[1] + localOptions.lineHeight, h.box[2]); - } - ctx.fillStyle = localOptions.labelColor; - ctx.fillText(`hand:${Math.trunc(100 * h.score)}%`, h.box[0] + 2, 0 + h.box[1] + localOptions.lineHeight, h.box[2]); - } - ctx.stroke(); - } - if (localOptions.drawPoints) { - if (h.keypoints && h.keypoints.length > 0) { - for (const pt of h.keypoints) { - ctx.fillStyle = colorDepth(pt[2], localOptions); - point(ctx, pt[0], pt[1], 0, localOptions); - } - } - } - if (localOptions.drawLabels && h.annotations) { - const addHandLabel = (part, title) => { - if (!part || part.length === 0 || !part[0]) - return; - const z = part[part.length - 1][2] || -256; - ctx.fillStyle = colorDepth(z, localOptions); - ctx.fillText(title, part[part.length - 1][0] + 4, part[part.length - 1][1] + 4); - }; - ctx.font = localOptions.font; - addHandLabel(h.annotations.index, "index"); - addHandLabel(h.annotations.middle, "middle"); - addHandLabel(h.annotations.ring, "ring"); - addHandLabel(h.annotations.pinky, "pinky"); - addHandLabel(h.annotations.thumb, "thumb"); - addHandLabel(h.annotations.palm, "palm"); - } - if (localOptions.drawPolygons && h.annotations) { - const addHandLine = (part) => { - if (!part || part.length === 0 || !part[0]) - return; - for (let i = 0; i < part.length; i++) { - ctx.beginPath(); - const z = part[i][2] || 0; - ctx.strokeStyle = colorDepth(i * z, localOptions); - ctx.moveTo(part[i > 0 ? i - 1 : 0][0], part[i > 0 ? i - 1 : 0][1]); - ctx.lineTo(part[i][0], part[i][1]); - ctx.stroke(); - } - }; - ctx.lineWidth = localOptions.lineWidth; - addHandLine(h.annotations.index); - addHandLine(h.annotations.middle); - addHandLine(h.annotations.ring); - addHandLine(h.annotations.pinky); - addHandLine(h.annotations.thumb); - } - } -} - -// src/draw/object.ts -function object(inCanvas2, result, drawOptions) { - const localOptions = mergeDeep(options3, drawOptions); - if (!result || !inCanvas2) - return; - const ctx = getCanvasContext(inCanvas2); - if (!ctx) - return; - ctx.lineJoin = "round"; - ctx.font = localOptions.font; - for (const h of result) { - if (localOptions.drawBoxes) { - ctx.strokeStyle = localOptions.color; - ctx.fillStyle = localOptions.color; - rect(ctx, h.box[0], h.box[1], h.box[2], h.box[3], localOptions); - if (localOptions.drawLabels) { - const label = `${h.label} ${Math.round(100 * h.score)}%`; - if (localOptions.shadowColor && localOptions.shadowColor !== "") { - ctx.fillStyle = localOptions.shadowColor; - ctx.fillText(label, h.box[0] + 3, 1 + h.box[1] + localOptions.lineHeight, h.box[2]); - } - ctx.fillStyle = localOptions.labelColor; - ctx.fillText(label, h.box[0] + 2, 0 + h.box[1] + localOptions.lineHeight, h.box[2]); - } - ctx.stroke(); - } - } -} - -// src/draw/gesture.ts -function gesture(inCanvas2, result, drawOptions) { - const localOptions = mergeDeep(options3, drawOptions); - if (!result || !inCanvas2) - return; - if (localOptions.drawGestures) { - const ctx = getCanvasContext(inCanvas2); - if (!ctx) - return; - ctx.font = localOptions.font; - ctx.fillStyle = localOptions.color; - let i = 1; - for (let j = 0; j < result.length; j++) { - let where = []; - let what = []; - [where, what] = Object.entries(result[j]); - if (what.length > 1 && what[1].length > 0) { - const who = where[1] > 0 ? `#${where[1]}` : ""; - const label = `${where[0]} ${who}: ${what[1]}`; - if (localOptions.shadowColor && localOptions.shadowColor !== "") { - ctx.fillStyle = localOptions.shadowColor; - ctx.fillText(label, 8, 2 + i * localOptions.lineHeight); - } - ctx.fillStyle = localOptions.labelColor; - ctx.fillText(label, 6, 0 + i * localOptions.lineHeight); - i += 1; - } - } - } -} - -// src/draw/draw.ts -var drawTime = 0; -function person(inCanvas2, result, drawOptions) { - const localOptions = mergeDeep(options3, drawOptions); - if (!result || !inCanvas2) - return; - const ctx = getCanvasContext(inCanvas2); - if (!ctx) - return; - ctx.lineJoin = "round"; - ctx.font = localOptions.font; - for (let i = 0; i < result.length; i++) { - if (localOptions.drawBoxes) { - ctx.strokeStyle = localOptions.color; - ctx.fillStyle = localOptions.color; - rect(ctx, result[i].box[0], result[i].box[1], result[i].box[2], result[i].box[3], localOptions); - if (localOptions.drawLabels) { - const label = `person #${i}`; - if (localOptions.shadowColor && localOptions.shadowColor !== "") { - ctx.fillStyle = localOptions.shadowColor; - ctx.fillText(label, result[i].box[0] + 3, 1 + result[i].box[1] + localOptions.lineHeight, result[i].box[2]); - } - ctx.fillStyle = localOptions.labelColor; - ctx.fillText(label, result[i].box[0] + 2, 0 + result[i].box[1] + localOptions.lineHeight, result[i].box[2]); - } - ctx.stroke(); - } - } -} -function canvas2(input, output) { - if (!input || !output) - return; - const ctx = getCanvasContext(output); - if (!ctx) - return; - ctx.drawImage(input, 0, 0); -} -async function all(inCanvas2, result, drawOptions) { - if (!(result == null ? void 0 : result.performance) || !inCanvas2) - return null; - const timeStamp = now(); - const localOptions = mergeDeep(options3, drawOptions); - const promise = Promise.all([ - face(inCanvas2, result.face, localOptions), - body(inCanvas2, result.body, localOptions), - hand(inCanvas2, result.hand, localOptions), - object(inCanvas2, result.object, localOptions), - gesture(inCanvas2, result.gesture, localOptions) - ]); - drawTime = env.perfadd ? drawTime + Math.round(now() - timeStamp) : Math.round(now() - timeStamp); - result.performance.draw = drawTime; - return promise; -} - -// src/face/mask.ts -var expandFact = 0.1; -var alpha = 0.5; -function insidePoly(x, y, polygon) { - let inside = false; - let j = polygon.length - 1; - for (let i = 0; i < polygon.length; j = i++) { - if (polygon[i].y > y !== polygon[j].y > y && x < (polygon[j].x - polygon[i].x) * (y - polygon[i].y) / (polygon[j].y - polygon[i].y) + polygon[i].x) - inside = !inside; - } - return inside; -} -async function mask(face4) { - if (!face4.tensor) - return face4.tensor; - if (!face4.mesh || face4.mesh.length < 100) - return face4.tensor; - const width = face4.tensor.shape[2] || 0; - const height = face4.tensor.shape[1] || 0; - const buffer = await face4.tensor.buffer(); - let silhouette = []; - for (const pt of meshAnnotations.silhouette) - silhouette.push({ x: (face4.mesh[pt][0] - face4.box[0]) / face4.box[2], y: (face4.mesh[pt][1] - face4.box[1]) / face4.box[3] }); - if (expandFact && expandFact > 0) - silhouette = silhouette.map((pt) => ({ x: pt.x > 0.5 ? pt.x + expandFact : pt.x - expandFact, y: pt.y > 0.5 ? pt.y + expandFact : pt.y - expandFact })); - for (let x = 0; x < width; x++) { - for (let y = 0; y < height; y++) { - const inside = insidePoly(x / width, y / width, silhouette); - if (!inside) { - buffer.set(alpha * buffer.get(0, y, x, 0), 0, y, x, 0); - buffer.set(alpha * buffer.get(0, y, x, 1), 0, y, x, 1); - buffer.set(alpha * buffer.get(0, y, x, 2), 0, y, x, 2); - } - } - } - const output = buffer.toTensor(); - tfjs_esm_exports.dispose(buffer); - return output; -} - -// src/face/angles.ts -var calculateGaze = (face4) => { - const radians = (pt1, pt2) => Math.atan2(pt1[1] - pt2[1], pt1[0] - pt2[0]); - if (!face4.annotations.rightEyeIris || !face4.annotations.leftEyeIris) - return { bearing: 0, strength: 0 }; - const offsetIris = [0, -0.1]; - const eyeRatio = 1; - const left = (face4.mesh[33][2] || 0) > (face4.mesh[263][2] || 0); - const irisCenter = left ? face4.mesh[473] : face4.mesh[468]; - const eyeCenter = left ? [(face4.mesh[133][0] + face4.mesh[33][0]) / 2, (face4.mesh[133][1] + face4.mesh[33][1]) / 2] : [(face4.mesh[263][0] + face4.mesh[362][0]) / 2, (face4.mesh[263][1] + face4.mesh[362][1]) / 2]; - const eyeSize = left ? [face4.mesh[133][0] - face4.mesh[33][0], face4.mesh[23][1] - face4.mesh[27][1]] : [face4.mesh[263][0] - face4.mesh[362][0], face4.mesh[253][1] - face4.mesh[257][1]]; - const eyeDiff = [ - (eyeCenter[0] - irisCenter[0]) / eyeSize[0] - offsetIris[0], - eyeRatio * (irisCenter[1] - eyeCenter[1]) / eyeSize[1] - offsetIris[1] - ]; - let strength = Math.sqrt(eyeDiff[0] * eyeDiff[0] + eyeDiff[1] * eyeDiff[1]); - strength = Math.min(strength, face4.boxRaw[2] / 2, face4.boxRaw[3] / 2); - const bearing = (radians([0, 0], eyeDiff) + Math.PI / 2) % Math.PI; - return { bearing, strength }; -}; -var calculateFaceAngle = (face4, imageSize) => { - const normalize2 = (v) => { - const length = Math.sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]); - v[0] /= length; - v[1] /= length; - v[2] /= length; - return v; - }; - const subVectors = (a, b) => { - const x = a[0] - b[0]; - const y = a[1] - b[1]; - const z = a[2] - b[2]; - return [x, y, z]; - }; - const crossVectors = (a, b) => { - const x = a[1] * b[2] - a[2] * b[1]; - const y = a[2] * b[0] - a[0] * b[2]; - const z = a[0] * b[1] - a[1] * b[0]; - return [x, y, z]; - }; - const rotationMatrixToEulerAngle = (r) => { - const [r00, _r01, _r02, r10, r11, r12, r20, r21, r22] = r; - let thetaX; - let thetaY; - let thetaZ; - if (r10 < 1) { - if (r10 > -1) { - thetaZ = Math.asin(r10); - thetaY = Math.atan2(-r20, r00); - thetaX = Math.atan2(-r12, r11); - } else { - thetaZ = -Math.PI / 2; - thetaY = -Math.atan2(r21, r22); - thetaX = 0; - } - } else { - thetaZ = Math.PI / 2; - thetaY = Math.atan2(r21, r22); - thetaX = 0; - } - if (Number.isNaN(thetaX)) - thetaX = 0; - if (Number.isNaN(thetaY)) - thetaY = 0; - if (Number.isNaN(thetaZ)) - thetaZ = 0; - return { pitch: 2 * -thetaX, yaw: 2 * -thetaY, roll: 2 * -thetaZ }; - }; - const mesh = face4.meshRaw; - if (!mesh || mesh.length < 300) - return { angle: { pitch: 0, yaw: 0, roll: 0 }, matrix: [1, 0, 0, 0, 1, 0, 0, 0, 1], gaze: { bearing: 0, strength: 0 } }; - const size2 = Math.max(face4.boxRaw[2] * imageSize[0], face4.boxRaw[3] * imageSize[1]) / 1.5; - const pts = [mesh[10], mesh[152], mesh[234], mesh[454]].map((pt) => [pt[0] * imageSize[0] / size2, pt[1] * imageSize[1] / size2, pt[2]]); - const yAxis = normalize2(subVectors(pts[1], pts[0])); - let xAxis = normalize2(subVectors(pts[3], pts[2])); - const zAxis = normalize2(crossVectors(xAxis, yAxis)); - xAxis = crossVectors(yAxis, zAxis); - const matrix = [ - xAxis[0], - xAxis[1], - xAxis[2], - yAxis[0], - yAxis[1], - yAxis[2], - zAxis[0], - zAxis[1], - zAxis[2] - ]; - const angle = rotationMatrixToEulerAngle(matrix); - const gaze = mesh.length === 478 ? calculateGaze(face4) : { bearing: 0, strength: 0 }; - return { angle, matrix, gaze }; -}; - -// src/face/face.ts -var detectFace = async (instance2, input) => { - var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C; - let timeStamp = now(); - let ageRes; - let gearRes; - let genderRes; - let emotionRes; - let mobilefacenetRes; - let insightfaceRes; - let antispoofRes; - let livenessRes; - let descRes; - const faceRes = []; - instance2.state = "run:face"; - const faces = await predict6(input, instance2.config); - instance2.performance.face = env.perfadd ? (instance2.performance.face || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - if (!input.shape || input.shape.length !== 4) - return []; - if (!faces) - return []; - for (let i = 0; i < faces.length; i++) { - instance2.analyze("Get Face"); - if (!faces[i].tensor || faces[i].tensor.isDisposedInternal) { - log("Face object is disposed:", faces[i].tensor); - continue; - } - if ((_a = instance2.config.face.detector) == null ? void 0 : _a.mask) { - const masked = await mask(faces[i]); - tfjs_esm_exports.dispose(faces[i].tensor); - if (masked) - faces[i].tensor = masked; - } - const rotation = faces[i].mesh && faces[i].mesh.length > 200 ? calculateFaceAngle(faces[i], [input.shape[2], input.shape[1]]) : null; - instance2.analyze("Start Emotion:"); - if (instance2.config.async) { - emotionRes = ((_b = instance2.config.face.emotion) == null ? void 0 : _b.enabled) ? predict5(faces[i].tensor || tfjs_esm_exports.tensor([]), instance2.config, i, faces.length) : []; - } else { - instance2.state = "run:emotion"; - timeStamp = now(); - emotionRes = ((_c = instance2.config.face.emotion) == null ? void 0 : _c.enabled) ? await predict5(faces[i].tensor || tfjs_esm_exports.tensor([]), instance2.config, i, faces.length) : []; - instance2.performance.emotion = env.perfadd ? (instance2.performance.emotion || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - } - instance2.analyze("End Emotion:"); - instance2.analyze("Start AntiSpoof:"); - if (instance2.config.async) { - antispoofRes = ((_d = instance2.config.face.antispoof) == null ? void 0 : _d.enabled) ? predict(faces[i].tensor || tfjs_esm_exports.tensor([]), instance2.config, i, faces.length) : 0; - } else { - instance2.state = "run:antispoof"; - timeStamp = now(); - antispoofRes = ((_e = instance2.config.face.antispoof) == null ? void 0 : _e.enabled) ? await predict(faces[i].tensor || tfjs_esm_exports.tensor([]), instance2.config, i, faces.length) : 0; - instance2.performance.antispoof = env.perfadd ? (instance2.performance.antispoof || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - } - instance2.analyze("End AntiSpoof:"); - instance2.analyze("Start Liveness:"); - if (instance2.config.async) { - livenessRes = ((_f = instance2.config.face.liveness) == null ? void 0 : _f.enabled) ? predict12(faces[i].tensor || tfjs_esm_exports.tensor([]), instance2.config, i, faces.length) : 0; - } else { - instance2.state = "run:liveness"; - timeStamp = now(); - livenessRes = ((_g = instance2.config.face.liveness) == null ? void 0 : _g.enabled) ? await predict12(faces[i].tensor || tfjs_esm_exports.tensor([]), instance2.config, i, faces.length) : 0; - instance2.performance.liveness = env.perfadd ? (instance2.performance.antispoof || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - } - instance2.analyze("End Liveness:"); - instance2.analyze("Start GEAR:"); - if (instance2.config.async) { - gearRes = ((_h = instance2.config.face.gear) == null ? void 0 : _h.enabled) ? predict8(faces[i].tensor || tfjs_esm_exports.tensor([]), instance2.config, i, faces.length) : null; - } else { - instance2.state = "run:gear"; - timeStamp = now(); - gearRes = ((_i = instance2.config.face.gear) == null ? void 0 : _i.enabled) ? await predict8(faces[i].tensor || tfjs_esm_exports.tensor([]), instance2.config, i, faces.length) : null; - instance2.performance.gear = Math.trunc(now() - timeStamp); - } - instance2.analyze("End GEAR:"); - instance2.analyze("Start SSRNet:"); - if (instance2.config.async) { - ageRes = ((_j = instance2.config.face["ssrnet"]) == null ? void 0 : _j.enabled) ? predict20(faces[i].tensor || tfjs_esm_exports.tensor([]), instance2.config, i, faces.length) : null; - genderRes = ((_k = instance2.config.face["ssrnet"]) == null ? void 0 : _k.enabled) ? predict21(faces[i].tensor || tfjs_esm_exports.tensor([]), instance2.config, i, faces.length) : null; - } else { - instance2.state = "run:ssrnet"; - timeStamp = now(); - ageRes = ((_l = instance2.config.face["ssrnet"]) == null ? void 0 : _l.enabled) ? await predict20(faces[i].tensor || tfjs_esm_exports.tensor([]), instance2.config, i, faces.length) : null; - genderRes = ((_m = instance2.config.face["ssrnet"]) == null ? void 0 : _m.enabled) ? await predict21(faces[i].tensor || tfjs_esm_exports.tensor([]), instance2.config, i, faces.length) : null; - instance2.performance.ssrnet = Math.trunc(now() - timeStamp); - } - instance2.analyze("End SSRNet:"); - instance2.analyze("Start MobileFaceNet:"); - if (instance2.config.async) { - mobilefacenetRes = ((_n = instance2.config.face["mobilefacenet"]) == null ? void 0 : _n.enabled) ? predict14(faces[i].tensor || tfjs_esm_exports.tensor([]), instance2.config, i, faces.length) : null; - } else { - instance2.state = "run:mobilefacenet"; - timeStamp = now(); - mobilefacenetRes = ((_o = instance2.config.face["mobilefacenet"]) == null ? void 0 : _o.enabled) ? await predict14(faces[i].tensor || tfjs_esm_exports.tensor([]), instance2.config, i, faces.length) : null; - instance2.performance.mobilefacenet = Math.trunc(now() - timeStamp); - } - instance2.analyze("End MobileFaceNet:"); - instance2.analyze("Start InsightFace:"); - if (instance2.config.async) { - insightfaceRes = ((_p = instance2.config.face["insightface"]) == null ? void 0 : _p.enabled) ? predict11(faces[i].tensor || tfjs_esm_exports.tensor([]), instance2.config, i, faces.length) : null; - } else { - instance2.state = "run:mobilefacenet"; - timeStamp = now(); - insightfaceRes = ((_q = instance2.config.face["insightface"]) == null ? void 0 : _q.enabled) ? await predict11(faces[i].tensor || tfjs_esm_exports.tensor([]), instance2.config, i, faces.length) : null; - instance2.performance.mobilefacenet = Math.trunc(now() - timeStamp); - } - instance2.analyze("End InsightFace:"); - instance2.analyze("Start Description:"); - if (instance2.config.async) { - descRes = predict7(faces[i].tensor || tfjs_esm_exports.tensor([]), instance2.config, i, faces.length); - } else { - instance2.state = "run:description"; - timeStamp = now(); - descRes = await predict7(faces[i].tensor || tfjs_esm_exports.tensor([]), instance2.config, i, faces.length); - instance2.performance.description = env.perfadd ? (instance2.performance.description || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - } - instance2.analyze("End Description:"); - if (instance2.config.async) { - [ageRes, genderRes, emotionRes, mobilefacenetRes, insightfaceRes, descRes, gearRes, antispoofRes, livenessRes] = await Promise.all([ageRes, genderRes, emotionRes, mobilefacenetRes, insightfaceRes, descRes, gearRes, antispoofRes, livenessRes]); - } - instance2.analyze("Finish Face:"); - if (((_r = instance2.config.face["ssrnet"]) == null ? void 0 : _r.enabled) && ageRes && genderRes) { - descRes = { - ...descRes, - age: ageRes.age, - gender: genderRes.gender, - genderScore: genderRes.genderScore - }; - } - if (((_s = instance2.config.face.gear) == null ? void 0 : _s.enabled) && gearRes) { - descRes = { - ...descRes, - age: gearRes.age, - gender: gearRes.gender, - genderScore: gearRes.genderScore, - race: gearRes.race - }; - } - if (((_t = instance2.config.face["mobilefacenet"]) == null ? void 0 : _t.enabled) && mobilefacenetRes) { - descRes.descriptor = mobilefacenetRes; - } - if (((_u = instance2.config.face["insightface"]) == null ? void 0 : _u.enabled) && insightfaceRes) { - descRes.descriptor = insightfaceRes; - } - if (!((_v = instance2.config.face.iris) == null ? void 0 : _v.enabled)) { - } - const irisSize = ((_y = (_x = (_w = faces[i]) == null ? void 0 : _w.annotations) == null ? void 0 : _x.leftEyeIris) == null ? void 0 : _y[0]) && ((_B = (_A = (_z = faces[i]) == null ? void 0 : _z.annotations) == null ? void 0 : _A.rightEyeIris) == null ? void 0 : _B[0]) && faces[i].annotations.leftEyeIris.length > 0 && faces[i].annotations.rightEyeIris.length > 0 && faces[i].annotations.leftEyeIris[0] !== null && faces[i].annotations.rightEyeIris[0] !== null ? Math.max(Math.abs(faces[i].annotations.leftEyeIris[3][0] - faces[i].annotations.leftEyeIris[1][0]), Math.abs(faces[i].annotations.rightEyeIris[4][1] - faces[i].annotations.rightEyeIris[2][1])) / input.shape[2] : 0; - const tensor6 = ((_C = instance2.config.face.detector) == null ? void 0 : _C.return) ? tfjs_esm_exports.squeeze(faces[i].tensor) : null; - tfjs_esm_exports.dispose(faces[i].tensor); - if (faces[i].tensor) - delete faces[i].tensor; - const res = { - ...faces[i], - id: i - }; - if (descRes.age) - res.age = descRes.age; - if (descRes.gender) - res.gender = descRes.gender; - if (descRes.genderScore) - res.genderScore = descRes.genderScore; - if (descRes.descriptor) - res.embedding = descRes.descriptor; - if (descRes.race) - res.race = descRes.race; - if (emotionRes) - res.emotion = emotionRes; - if (antispoofRes) - res.real = antispoofRes; - if (livenessRes) - res.live = livenessRes; - if (irisSize && irisSize !== 0) - res.iris = Math.trunc(500 / irisSize / 11.7) / 100; - if (rotation) - res.rotation = rotation; - if (tensor6) - res.tensor = tensor6; - faceRes.push(res); - instance2.analyze("End Face"); - } - instance2.analyze("End FaceMesh:"); - if (instance2.config.async) { - if (instance2.performance.face) - delete instance2.performance.face; - if (instance2.performance.age) - delete instance2.performance.age; - if (instance2.performance.gender) - delete instance2.performance.gender; - if (instance2.performance.emotion) - delete instance2.performance.emotion; - } - return faceRes; -}; - -// src/gesture/gesture.ts -var body2 = (res) => { - if (!res) - return []; - const gestures = []; - for (let i = 0; i < res.length; i++) { - const leftWrist = res[i].keypoints.find((a) => a.part === "leftWrist"); - const rightWrist = res[i].keypoints.find((a) => a.part === "rightWrist"); - const nose = res[i].keypoints.find((a) => a.part === "nose"); - if (nose && leftWrist && rightWrist && leftWrist.position[1] < nose.position[1] && rightWrist.position[1] < nose.position[1]) - gestures.push({ body: i, gesture: "i give up" }); - else if (nose && leftWrist && leftWrist.position[1] < nose.position[1]) - gestures.push({ body: i, gesture: "raise left hand" }); - else if (nose && rightWrist && rightWrist.position[1] < nose.position[1]) - gestures.push({ body: i, gesture: "raise right hand" }); - const leftShoulder = res[i].keypoints.find((a) => a.part === "leftShoulder"); - const rightShoulder = res[i].keypoints.find((a) => a.part === "rightShoulder"); - if (leftShoulder && rightShoulder && Math.abs(leftShoulder.positionRaw[1] - rightShoulder.positionRaw[1]) > 0.1) { - gestures.push({ body: i, gesture: `leaning ${leftShoulder.position[1] > rightShoulder.position[1] ? "left" : "right"}` }); - } - } - return gestures; -}; -var face2 = (res) => { - if (!res) - return []; - const gestures = []; - for (let i = 0; i < res.length; i++) { - if (res[i].mesh && res[i].mesh.length > 450) { - const zDiff = (res[i].mesh[33][2] || 0) - (res[i].mesh[263][2] || 0); - const xDiff = res[i].mesh[33][0] - res[i].mesh[263][0]; - if (Math.abs(zDiff / xDiff) <= 0.15) - gestures.push({ face: i, gesture: "facing center" }); - else - gestures.push({ face: i, gesture: `facing ${zDiff < 0 ? "left" : "right"}` }); - const openLeft = Math.abs(res[i].mesh[374][1] - res[i].mesh[386][1]) / Math.abs(res[i].mesh[443][1] - res[i].mesh[450][1]); - if (openLeft < 0.2) - gestures.push({ face: i, gesture: "blink left eye" }); - const openRight = Math.abs(res[i].mesh[145][1] - res[i].mesh[159][1]) / Math.abs(res[i].mesh[223][1] - res[i].mesh[230][1]); - if (openRight < 0.2) - gestures.push({ face: i, gesture: "blink right eye" }); - const mouthOpen = Math.min(100, 500 * Math.abs(res[i].mesh[13][1] - res[i].mesh[14][1]) / Math.abs(res[i].mesh[10][1] - res[i].mesh[152][1])); - if (mouthOpen > 10) - gestures.push({ face: i, gesture: `mouth ${Math.trunc(mouthOpen)}% open` }); - const chinDepth = res[i].mesh[152][2] || 0; - if (Math.abs(chinDepth) > 10) - gestures.push({ face: i, gesture: `head ${chinDepth < 0 ? "up" : "down"}` }); - } - } - return gestures; -}; -var iris2 = (res) => { - var _a, _b, _c, _d; - if (!res) - return []; - const gestures = []; - for (let i = 0; i < res.length; i++) { - if (!((_b = (_a = res[i].annotations) == null ? void 0 : _a.leftEyeIris) == null ? void 0 : _b[0]) || !((_d = (_c = res[i].annotations) == null ? void 0 : _c.rightEyeIris) == null ? void 0 : _d[0])) - continue; - const sizeXLeft = res[i].annotations.leftEyeIris[3][0] - res[i].annotations.leftEyeIris[1][0]; - const sizeYLeft = res[i].annotations.leftEyeIris[4][1] - res[i].annotations.leftEyeIris[2][1]; - const areaLeft = Math.abs(sizeXLeft * sizeYLeft); - const sizeXRight = res[i].annotations.rightEyeIris[3][0] - res[i].annotations.rightEyeIris[1][0]; - const sizeYRight = res[i].annotations.rightEyeIris[4][1] - res[i].annotations.rightEyeIris[2][1]; - const areaRight = Math.abs(sizeXRight * sizeYRight); - let center = false; - const difference = Math.abs(areaLeft - areaRight) / Math.max(areaLeft, areaRight); - if (difference < 0.25) { - center = true; - gestures.push({ iris: i, gesture: "facing center" }); - } - const leftIrisCenterX = Math.abs(res[i].mesh[263][0] - res[i].annotations.leftEyeIris[0][0]) / res[i].box[2]; - const rightIrisCenterX = Math.abs(res[i].mesh[33][0] - res[i].annotations.rightEyeIris[0][0]) / res[i].box[2]; - if (leftIrisCenterX > 0.06 || rightIrisCenterX > 0.06) - center = false; - if (leftIrisCenterX > rightIrisCenterX) { - if (leftIrisCenterX > 0.05) - gestures.push({ iris: i, gesture: "looking right" }); - } else { - if (rightIrisCenterX > 0.05) - gestures.push({ iris: i, gesture: "looking left" }); - } - const rightIrisCenterY = Math.abs(res[i].mesh[145][1] - res[i].annotations.rightEyeIris[0][1]) / res[i].box[3]; - const leftIrisCenterY = Math.abs(res[i].mesh[374][1] - res[i].annotations.leftEyeIris[0][1]) / res[i].box[3]; - if (leftIrisCenterY < 0.01 || rightIrisCenterY < 0.01 || leftIrisCenterY > 0.022 || rightIrisCenterY > 0.022) - center = false; - if (leftIrisCenterY < 0.01 || rightIrisCenterY < 0.01) - gestures.push({ iris: i, gesture: "looking down" }); - if (leftIrisCenterY > 0.022 || rightIrisCenterY > 0.022) - gestures.push({ iris: i, gesture: "looking up" }); - if (center) - gestures.push({ iris: i, gesture: "looking center" }); - } - return gestures; -}; -var hand2 = (res) => { - if (!res) - return []; - const gestures = []; - for (let i = 0; i < res.length; i++) { - const fingers = []; - if (res[i].annotations) { - for (const [finger, pos] of Object.entries(res[i].annotations)) { - if (finger !== "palmBase" && Array.isArray(pos) && pos[0]) - fingers.push({ name: finger.toLowerCase(), position: pos[0] }); - } - } - if (fingers && fingers.length > 0) { - const closest = fingers.reduce((best, a) => (best.position[2] || 0) < (a.position[2] || 0) ? best : a); - gestures.push({ hand: i, gesture: `${closest.name} forward` }); - const highest = fingers.reduce((best, a) => best.position[1] < a.position[1] ? best : a); - gestures.push({ hand: i, gesture: `${highest.name} up` }); - } - if (res[i].keypoints) { - const poses = match(res[i].keypoints); - for (const pose of poses) - gestures.push({ hand: i, gesture: pose.name }); - } - } - return gestures; -}; - -// src/util/interpolate.ts -var bufferedResult = { face: [], body: [], hand: [], gesture: [], object: [], persons: [], performance: {}, timestamp: 0, error: null }; -var interpolateTime = 0; -function calc2(newResult, config3) { - var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w; - const t0 = now(); - if (!newResult) - return { face: [], body: [], hand: [], gesture: [], object: [], persons: [], performance: {}, timestamp: 0, error: null }; - const elapsed = Date.now() - newResult.timestamp; - const bufferedFactor = elapsed < 1e3 ? 8 - Math.log(elapsed + 1) : 1; - if (newResult.canvas) - bufferedResult.canvas = newResult.canvas; - if (newResult.error) - bufferedResult.error = newResult.error; - if (!bufferedResult.body || newResult.body.length !== bufferedResult.body.length) { - bufferedResult.body = JSON.parse(JSON.stringify(newResult.body)); - } else { - for (let i = 0; i < newResult.body.length; i++) { - const box = newResult.body[i].box.map((newBoxCoord, j) => ((bufferedFactor - 1) * bufferedResult.body[i].box[j] + newBoxCoord) / bufferedFactor); - const boxRaw = newResult.body[i].boxRaw.map((newBoxCoord, j) => ((bufferedFactor - 1) * bufferedResult.body[i].boxRaw[j] + newBoxCoord) / bufferedFactor); - const keypoints = newResult.body[i].keypoints.map((newKpt, j) => { - var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2; - return { - score: newKpt.score, - part: newKpt.part, - position: [ - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].position[0] || 0) + (newKpt.position[0] || 0)) / bufferedFactor : newKpt.position[0], - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].position[1] || 0) + (newKpt.position[1] || 0)) / bufferedFactor : newKpt.position[1], - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].position[2] || 0) + (newKpt.position[2] || 0)) / bufferedFactor : newKpt.position[2] - ], - positionRaw: [ - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].positionRaw[0] || 0) + (newKpt.positionRaw[0] || 0)) / bufferedFactor : newKpt.positionRaw[0], - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].positionRaw[1] || 0) + (newKpt.positionRaw[1] || 0)) / bufferedFactor : newKpt.positionRaw[1], - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].positionRaw[2] || 0) + (newKpt.positionRaw[2] || 0)) / bufferedFactor : newKpt.positionRaw[2] - ], - distance: [ - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (((_a2 = bufferedResult.body[i].keypoints[j].distance) == null ? void 0 : _a2[0]) || 0) + (((_b2 = newKpt.distance) == null ? void 0 : _b2[0]) || 0)) / bufferedFactor : (_c2 = newKpt.distance) == null ? void 0 : _c2[0], - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (((_d2 = bufferedResult.body[i].keypoints[j].distance) == null ? void 0 : _d2[1]) || 0) + (((_e2 = newKpt.distance) == null ? void 0 : _e2[1]) || 0)) / bufferedFactor : (_f2 = newKpt.distance) == null ? void 0 : _f2[1], - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (((_g2 = bufferedResult.body[i].keypoints[j].distance) == null ? void 0 : _g2[2]) || 0) + (((_h2 = newKpt.distance) == null ? void 0 : _h2[2]) || 0)) / bufferedFactor : (_i2 = newKpt.distance) == null ? void 0 : _i2[2] - ] - }; - }); - const annotations2 = {}; - let coords = { connected: {} }; - if ((_a = config3.body.modelPath) == null ? void 0 : _a.includes("efficientpose")) - coords = efficientposecoords_exports; - else if ((_b = config3.body.modelPath) == null ? void 0 : _b.includes("blazepose")) - coords = blazeposecoords_exports; - else if ((_c = config3.body.modelPath) == null ? void 0 : _c.includes("movenet")) - coords = movenetcoords_exports; - for (const [name, indexes] of Object.entries(coords.connected)) { - const pt = []; - for (let j = 0; j < indexes.length - 1; j++) { - const pt0 = keypoints.find((kp) => kp.part === indexes[j]); - const pt1 = keypoints.find((kp) => kp.part === indexes[j + 1]); - if (pt0 && pt1) - pt.push([pt0.position, pt1.position]); - } - annotations2[name] = pt; - } - bufferedResult.body[i] = { ...newResult.body[i], box, boxRaw, keypoints, annotations: annotations2 }; - } - } - if (!bufferedResult.hand || newResult.hand.length !== bufferedResult.hand.length) { - bufferedResult.hand = JSON.parse(JSON.stringify(newResult.hand)); - } else { - for (let i = 0; i < newResult.hand.length; i++) { - const box = newResult.hand[i].box.map((b, j) => ((bufferedFactor - 1) * bufferedResult.hand[i].box[j] + b) / bufferedFactor); - const boxRaw = newResult.hand[i].boxRaw.map((b, j) => ((bufferedFactor - 1) * bufferedResult.hand[i].boxRaw[j] + b) / bufferedFactor); - if (bufferedResult.hand[i].keypoints.length !== newResult.hand[i].keypoints.length) - bufferedResult.hand[i].keypoints = newResult.hand[i].keypoints; - const keypoints = newResult.hand[i].keypoints && newResult.hand[i].keypoints.length > 0 ? newResult.hand[i].keypoints.map((landmark, j) => landmark.map((coord, k) => ((bufferedFactor - 1) * (bufferedResult.hand[i].keypoints[j][k] || 1) + (coord || 0)) / bufferedFactor)) : []; - let annotations2 = {}; - if (Object.keys(bufferedResult.hand[i].annotations).length !== Object.keys(newResult.hand[i].annotations).length) { - bufferedResult.hand[i].annotations = newResult.hand[i].annotations; - annotations2 = bufferedResult.hand[i].annotations; - } else if (newResult.hand[i].annotations) { - for (const key of Object.keys(newResult.hand[i].annotations)) { - annotations2[key] = ((_f = (_e = (_d = newResult.hand[i]) == null ? void 0 : _d.annotations) == null ? void 0 : _e[key]) == null ? void 0 : _f[0]) ? newResult.hand[i].annotations[key].map((val, j) => val.map((coord, k) => ((bufferedFactor - 1) * bufferedResult.hand[i].annotations[key][j][k] + coord) / bufferedFactor)) : null; - } - } - bufferedResult.hand[i] = { ...newResult.hand[i], box, boxRaw, keypoints, annotations: annotations2 }; - } - } - if (!bufferedResult.face || newResult.face.length !== bufferedResult.face.length) { - bufferedResult.face = JSON.parse(JSON.stringify(newResult.face)); - } else { - for (let i = 0; i < newResult.face.length; i++) { - const box = newResult.face[i].box.map((b, j) => ((bufferedFactor - 1) * bufferedResult.face[i].box[j] + b) / bufferedFactor); - const boxRaw = newResult.face[i].boxRaw.map((b, j) => ((bufferedFactor - 1) * bufferedResult.face[i].boxRaw[j] + b) / bufferedFactor); - if (newResult.face[i].rotation) { - const rotation = { matrix: [0, 0, 0, 0, 0, 0, 0, 0, 0], angle: { roll: 0, yaw: 0, pitch: 0 }, gaze: { bearing: 0, strength: 0 } }; - rotation.matrix = (_g = newResult.face[i].rotation) == null ? void 0 : _g.matrix; - rotation.angle = { - roll: ((bufferedFactor - 1) * (((_i = (_h = bufferedResult.face[i].rotation) == null ? void 0 : _h.angle) == null ? void 0 : _i.roll) || 0) + (((_k = (_j = newResult.face[i].rotation) == null ? void 0 : _j.angle) == null ? void 0 : _k.roll) || 0)) / bufferedFactor, - yaw: ((bufferedFactor - 1) * (((_m = (_l = bufferedResult.face[i].rotation) == null ? void 0 : _l.angle) == null ? void 0 : _m.yaw) || 0) + (((_o = (_n = newResult.face[i].rotation) == null ? void 0 : _n.angle) == null ? void 0 : _o.yaw) || 0)) / bufferedFactor, - pitch: ((bufferedFactor - 1) * (((_q = (_p = bufferedResult.face[i].rotation) == null ? void 0 : _p.angle) == null ? void 0 : _q.pitch) || 0) + (((_s = (_r = newResult.face[i].rotation) == null ? void 0 : _r.angle) == null ? void 0 : _s.pitch) || 0)) / bufferedFactor - }; - rotation.gaze = { - bearing: ((bufferedFactor - 1) * (((_t = bufferedResult.face[i].rotation) == null ? void 0 : _t.gaze.bearing) || 0) + (((_u = newResult.face[i].rotation) == null ? void 0 : _u.gaze.bearing) || 0)) / bufferedFactor, - strength: ((bufferedFactor - 1) * (((_v = bufferedResult.face[i].rotation) == null ? void 0 : _v.gaze.strength) || 0) + (((_w = newResult.face[i].rotation) == null ? void 0 : _w.gaze.strength) || 0)) / bufferedFactor - }; - bufferedResult.face[i] = { ...newResult.face[i], rotation, box, boxRaw }; - } else { - bufferedResult.face[i] = { ...newResult.face[i], box, boxRaw }; - } - } - } - if (!bufferedResult.object || newResult.object.length !== bufferedResult.object.length) { - bufferedResult.object = JSON.parse(JSON.stringify(newResult.object)); - } else { - for (let i = 0; i < newResult.object.length; i++) { - const box = newResult.object[i].box.map((b, j) => ((bufferedFactor - 1) * bufferedResult.object[i].box[j] + b) / bufferedFactor); - const boxRaw = newResult.object[i].boxRaw.map((b, j) => ((bufferedFactor - 1) * bufferedResult.object[i].boxRaw[j] + b) / bufferedFactor); - bufferedResult.object[i] = { ...newResult.object[i], box, boxRaw }; - } - } - if (newResult.persons) { - const newPersons = newResult.persons; - if (!bufferedResult.persons || newPersons.length !== bufferedResult.persons.length) { - bufferedResult.persons = JSON.parse(JSON.stringify(newPersons)); - } else { - for (let i = 0; i < newPersons.length; i++) { - bufferedResult.persons[i].box = newPersons[i].box.map((box, j) => ((bufferedFactor - 1) * bufferedResult.persons[i].box[j] + box) / bufferedFactor); - } - } - } - if (newResult.gesture) - bufferedResult.gesture = newResult.gesture; - const t1 = now(); - interpolateTime = env.perfadd ? interpolateTime + Math.round(t1 - t0) : Math.round(t1 - t0); - if (newResult.performance) - bufferedResult.performance = { ...newResult.performance, interpolate: interpolateTime }; - return bufferedResult; -} - -// src/face/match.ts -var match_exports = {}; -__export(match_exports, { - distance: () => distance, - match: () => match2, - similarity: () => similarity -}); -function distance(descriptor1, descriptor2, options4 = { order: 2, multiplier: 25 }) { - if (!descriptor1 || !descriptor1) - return Number.MAX_SAFE_INTEGER; - let sum3 = 0; - for (let i = 0; i < descriptor1.length; i++) { - const diff = !options4.order || options4.order === 2 ? descriptor1[i] - descriptor2[i] : Math.abs(descriptor1[i] - descriptor2[i]); - sum3 += !options4.order || options4.order === 2 ? diff * diff : diff ** options4.order; - } - return (options4.multiplier || 20) * sum3; -} -var normalizeDistance = (dist, order, min2, max4) => { - if (dist === 0) - return 1; - const root = order === 2 ? Math.sqrt(dist) : dist ** (1 / order); - const norm = (1 - root / 100 - min2) / (max4 - min2); - const clamp2 = Math.max(Math.min(norm, 1), 0); - return clamp2; -}; -function similarity(descriptor1, descriptor2, options4 = { order: 2, multiplier: 25, min: 0.2, max: 0.8 }) { - const dist = distance(descriptor1, descriptor2, options4); - return normalizeDistance(dist, options4.order || 2, options4.min || 0, options4.max || 1); -} -function match2(descriptor, descriptors, options4 = { order: 2, multiplier: 25, threshold: 0, min: 0.2, max: 0.8 }) { - if (!Array.isArray(descriptor) || !Array.isArray(descriptors) || descriptor.length < 64 || descriptors.length === 0) { - return { index: -1, distance: Number.POSITIVE_INFINITY, similarity: 0 }; - } - let lowestDistance = Number.MAX_SAFE_INTEGER; - let index2 = -1; - for (let i = 0; i < descriptors.length; i++) { - const res = descriptors[i].length === descriptor.length ? distance(descriptor, descriptors[i], options4) : Number.MAX_SAFE_INTEGER; - if (res < lowestDistance) { - lowestDistance = res; - index2 = i; - } - if (lowestDistance < (options4.threshold || 0)) - break; - } - const normalizedSimilarity = normalizeDistance(lowestDistance, options4.order || 2, options4.min || 0, options4.max || 1); - return { index: index2, distance: lowestDistance, similarity: normalizedSimilarity }; -} - -// src/util/persons.ts -function join2(faces, bodies, hands, gestures, shape) { - var _a, _b, _c, _d, _e, _f; - let id = 0; - const persons = []; - for (const face4 of faces) { - const person2 = { id: id++, face: face4, body: null, hands: { left: null, right: null }, gestures: [], box: [0, 0, 0, 0] }; - for (const body4 of bodies) { - if (face4.box[0] > body4.box[0] && face4.box[0] < body4.box[0] + body4.box[2] && face4.box[1] + face4.box[3] > body4.box[1] && face4.box[1] + face4.box[3] < body4.box[1] + body4.box[3]) { - person2.body = body4; - } - } - if (person2.body) { - for (const hand3 of hands) { - if (hand3.box[0] + hand3.box[2] > person2.body.box[0] && hand3.box[0] + hand3.box[2] < person2.body.box[0] + person2.body.box[2] && hand3.box[1] + hand3.box[3] > person2.body.box[1] && hand3.box[1] + hand3.box[3] < person2.body.box[1] + person2.body.box[3]) { - if (person2.hands) - person2.hands.left = hand3; - } - if (hand3.box[0] < person2.body.box[0] + person2.body.box[2] && hand3.box[0] > person2.body.box[0] && hand3.box[1] + hand3.box[3] > person2.body.box[1] && hand3.box[1] + hand3.box[3] < person2.body.box[1] + person2.body.box[3]) { - if (person2.hands) - person2.hands.right = hand3; - } - } - } - for (const gesture2 of gestures) { - if (gesture2["face"] !== void 0 && gesture2["face"] === face4.id) - person2.gestures.push(gesture2); - else if (gesture2["iris"] !== void 0 && gesture2["iris"] === face4.id) - person2.gestures.push(gesture2); - else if (gesture2["body"] !== void 0 && gesture2["body"] === ((_a = person2.body) == null ? void 0 : _a.id)) - person2.gestures.push(gesture2); - else if (gesture2["hand"] !== void 0 && gesture2["hand"] === ((_b = person2.hands.left) == null ? void 0 : _b.id)) - person2.gestures.push(gesture2); - else if (gesture2["hand"] !== void 0 && gesture2["hand"] === ((_c = person2.hands.right) == null ? void 0 : _c.id)) - person2.gestures.push(gesture2); - } - const x = []; - const y = []; - const extractXY = (box) => { - if (box && box.length === 4) { - x.push(box[0], box[0] + box[2]); - y.push(box[1], box[1] + box[3]); - } - }; - extractXY(person2.face.box); - extractXY((_d = person2.body) == null ? void 0 : _d.box); - extractXY((_e = person2.hands.left) == null ? void 0 : _e.box); - extractXY((_f = person2.hands.right) == null ? void 0 : _f.box); - const minX = Math.min(...x); - const minY = Math.min(...y); - person2.box = [minX, minY, Math.max(...x) - minX, Math.max(...y) - minY]; - if ((shape == null ? void 0 : shape[1]) && (shape == null ? void 0 : shape[2])) - person2.boxRaw = [person2.box[0] / shape[2], person2.box[1] / shape[1], person2.box[2] / shape[2], person2.box[3] / shape[1]]; - persons.push(person2); - } - return persons; -} - -// src/sample.ts -var face3 = ` + ${e.box[0]} ${s}, + ${e.box[0]+e.box[2]} ${s}, + ${e.box[0]+e.box[2]} ${e.box[1]+e.box[3]/2} + `);t.stroke(a),t.stroke(A)}}function Js(e,t){var n;if(V.drawGaze&&((n=e.rotation)==null?void 0:n.gaze.strength)&&e.rotation.gaze.bearing&&e.annotations.leftEyeIris&&e.annotations.rightEyeIris&&e.annotations.leftEyeIris[0]&&e.annotations.rightEyeIris[0]){t.strokeStyle="pink",t.fillStyle="pink";let o=[e.annotations.leftEyeIris[0][0]+Math.sin(e.rotation.gaze.bearing)*e.rotation.gaze.strength*e.box[3],e.annotations.leftEyeIris[0][1]+Math.cos(e.rotation.gaze.bearing)*e.rotation.gaze.strength*e.box[2]];O5(t,[e.annotations.leftEyeIris[0][0],e.annotations.leftEyeIris[0][1]],[o[0],o[1]],4);let s=[e.annotations.rightEyeIris[0][0]+Math.sin(e.rotation.gaze.bearing)*e.rotation.gaze.strength*e.box[3],e.annotations.rightEyeIris[0][1]+Math.cos(e.rotation.gaze.bearing)*e.rotation.gaze.strength*e.box[2]];O5(t,[e.annotations.rightEyeIris[0][0],e.annotations.rightEyeIris[0][1]],[s[0],s[1]],4)}}function Qs(e,t){if(V.drawPolygons&&e.mesh.length>=468){t.lineWidth=1;for(let n=0;ne.mesh[s]);I5(t,o,V)}Ys(e,t)}}function _s(e,t){if(V.drawPoints&&e.mesh.length>=468)for(let n=0;n0&&(_s(s,o),Qs(s,o),Ks(s,o),Js(s,o))}}function Xe(e,t,n){let o=J(m0,n);if(!t||!e)return;let s=E0(e);if(!!s){s.lineJoin="round";for(let A=0;A0)for(let a of A.keypoints)s.fillStyle=Q0(a[2],o),_0(s,a[0],a[1],0,o);if(o.drawLabels&&A.annotations){let a=(i,c)=>{if(!i||i.length===0||!i[0])return;let d=i[i.length-1][2]||-256;s.fillStyle=Q0(d,o),s.fillText(c,i[i.length-1][0]+4,i[i.length-1][1]+4)};s.font=o.font,a(A.annotations.index,"index"),a(A.annotations.middle,"middle"),a(A.annotations.ring,"ring"),a(A.annotations.pinky,"pinky"),a(A.annotations.thumb,"thumb"),a(A.annotations.palm,"palm")}if(o.drawPolygons&&A.annotations){let a=i=>{if(!(!i||i.length===0||!i[0]))for(let c=0;c0?c-1:0][0],i[c>0?c-1:0][1]),s.lineTo(i[c][0],i[c][1]),s.stroke()}};s.lineWidth=o.lineWidth,a(A.annotations.index),a(A.annotations.middle),a(A.annotations.ring),a(A.annotations.pinky),a(A.annotations.thumb)}}}}function Ue(e,t,n){let o=J(m0,n);if(!t||!e)return;let s=E0(e);if(!!s){s.lineJoin="round",s.font=o.font;for(let A of t)if(o.drawBoxes){if(s.strokeStyle=o.color,s.fillStyle=o.color,X0(s,A.box[0],A.box[1],A.box[2],A.box[3],o),o.drawLabels){let a=`${A.label} ${Math.round(100*A.score)}%`;o.shadowColor&&o.shadowColor!==""&&(s.fillStyle=o.shadowColor,s.fillText(a,A.box[0]+3,1+A.box[1]+o.lineHeight,A.box[2])),s.fillStyle=o.labelColor,s.fillText(a,A.box[0]+2,0+A.box[1]+o.lineHeight,A.box[2])}s.stroke()}}}function Ye(e,t,n){let o=J(m0,n);if(!(!t||!e)&&o.drawGestures){let s=E0(e);if(!s)return;s.font=o.font,s.fillStyle=o.color;let A=1;for(let a=0;a1&&c[1].length>0){let d=i[1]>0?`#${i[1]}`:"",y=`${i[0]} ${d}: ${c[1]}`;o.shadowColor&&o.shadowColor!==""&&(s.fillStyle=o.shadowColor,s.fillText(y,8,2+A*o.lineHeight)),s.fillStyle=o.labelColor,s.fillText(y,6,0+A*o.lineHeight),A+=1}}}}var C5=0;function L5(e,t,n){let o=J(m0,n);if(!t||!e)return;let s=E0(e);if(!!s){s.lineJoin="round",s.font=o.font;for(let A=0;At!=n[s].y>t&&e<(n[s].x-n[A].x)*(t-n[A].y)/(n[s].y-n[A].y)+n[A].x&&(o=!o);return o}async function Ln(e){if(!e.tensor||!e.mesh||e.mesh.length<100)return e.tensor;let t=e.tensor.shape[2]||0,n=e.tensor.shape[1]||0,o=await e.tensor.buffer(),s=[];for(let a of O0.silhouette)s.push({x:(e.mesh[a][0]-e.box[0])/e.box[2],y:(e.mesh[a][1]-e.box[1])/e.box[3]});Ke&&Ke>0&&(s=s.map(a=>({x:a.x>.5?a.x+Ke:a.x-Ke,y:a.y>.5?a.y+Ke:a.y-Ke})));for(let a=0;a{let t=(l,m)=>Math.atan2(l[1]-m[1],l[0]-m[0]);if(!e.annotations.rightEyeIris||!e.annotations.leftEyeIris)return{bearing:0,strength:0};let n=[0,-.1],o=1,s=(e.mesh[33][2]||0)>(e.mesh[263][2]||0),A=s?e.mesh[473]:e.mesh[468],a=s?[(e.mesh[133][0]+e.mesh[33][0])/2,(e.mesh[133][1]+e.mesh[33][1])/2]:[(e.mesh[263][0]+e.mesh[362][0])/2,(e.mesh[263][1]+e.mesh[362][1])/2],i=s?[e.mesh[133][0]-e.mesh[33][0],e.mesh[23][1]-e.mesh[27][1]]:[e.mesh[263][0]-e.mesh[362][0],e.mesh[253][1]-e.mesh[257][1]],c=[(a[0]-A[0])/i[0]-n[0],o*(A[1]-a[1])/i[1]-n[1]],d=Math.sqrt(c[0]*c[0]+c[1]*c[1]);return d=Math.min(d,e.boxRaw[2]/2,e.boxRaw[3]/2),{bearing:(t([0,0],c)+Math.PI/2)%Math.PI,strength:d}},Wn=(e,t)=>{let n=u=>{let M=Math.sqrt(u[0]*u[0]+u[1]*u[1]+u[2]*u[2]);return u[0]/=M,u[1]/=M,u[2]/=M,u},o=(u,M)=>{let P=u[0]-M[0],v=u[1]-M[1],f=u[2]-M[2];return[P,v,f]},s=(u,M)=>{let P=u[1]*M[2]-u[2]*M[1],v=u[2]*M[0]-u[0]*M[2],f=u[0]*M[1]-u[1]*M[0];return[P,v,f]},A=u=>{let[M,P,v,f,g,S,E,I,B]=u,U,F,H;return f<1?f>-1?(H=Math.asin(f),F=Math.atan2(-E,M),U=Math.atan2(-S,g)):(H=-Math.PI/2,F=-Math.atan2(I,B),U=0):(H=Math.PI/2,F=Math.atan2(I,B),U=0),Number.isNaN(U)&&(U=0),Number.isNaN(F)&&(F=0),Number.isNaN(H)&&(H=0),{pitch:2*-U,yaw:2*-F,roll:2*-H}},a=e.meshRaw;if(!a||a.length<300)return{angle:{pitch:0,yaw:0,roll:0},matrix:[1,0,0,0,1,0,0,0,1],gaze:{bearing:0,strength:0}};let i=Math.max(e.boxRaw[2]*t[0],e.boxRaw[3]*t[1])/1.5,c=[a[10],a[152],a[234],a[454]].map(u=>[u[0]*t[0]/i,u[1]*t[1]/i,u[2]]),d=n(o(c[1],c[0])),y=n(o(c[3],c[2])),l=n(s(y,d));y=s(d,l);let m=[y[0],y[1],y[2],d[0],d[1],d[2],l[0],l[1],l[2]],x=A(m),p=a.length===478?nA(e):{bearing:0,strength:0};return{angle:x,matrix:m,gaze:p}};var B5=async(e,t)=>{var p,u,M,P,v,f,g,S,E,I,B,U,F,H,K,R,L,c0,X,r0,e0,W,G,z0,S0,$0,ee,q0,Qe;let n=T(),o,s,A,a,i,c,d,y,l,m=[];e.state="run:face";let x=await Q1(t,e.config);if(e.performance.face=w.perfadd?(e.performance.face||0)+Math.trunc(T()-n):Math.trunc(T()-n),!t.shape||t.shape.length!==4)return[];if(!x)return[];for(let z=0;z200?Wn(x[z],[t.shape[2],t.shape[1]]):null;e.analyze("Start Emotion:"),e.config.async?a=(u=e.config.face.emotion)!=null&&u.enabled?Lt(x[z].tensor||r.tensor([]),e.config,z,x.length):[]:(e.state="run:emotion",n=T(),a=(M=e.config.face.emotion)!=null&&M.enabled?await Lt(x[z].tensor||r.tensor([]),e.config,z,x.length):[],e.performance.emotion=w.perfadd?(e.performance.emotion||0)+Math.trunc(T()-n):Math.trunc(T()-n)),e.analyze("End Emotion:"),e.analyze("Start AntiSpoof:"),e.config.async?d=(P=e.config.face.antispoof)!=null&&P.enabled?ut(x[z].tensor||r.tensor([]),e.config,z,x.length):0:(e.state="run:antispoof",n=T(),d=(v=e.config.face.antispoof)!=null&&v.enabled?await ut(x[z].tensor||r.tensor([]),e.config,z,x.length):0,e.performance.antispoof=w.perfadd?(e.performance.antispoof||0)+Math.trunc(T()-n):Math.trunc(T()-n)),e.analyze("End AntiSpoof:"),e.analyze("Start Liveness:"),e.config.async?y=(f=e.config.face.liveness)!=null&&f.enabled?s5(x[z].tensor||r.tensor([]),e.config,z,x.length):0:(e.state="run:liveness",n=T(),y=(g=e.config.face.liveness)!=null&&g.enabled?await s5(x[z].tensor||r.tensor([]),e.config,z,x.length):0,e.performance.liveness=w.perfadd?(e.performance.antispoof||0)+Math.trunc(T()-n):Math.trunc(T()-n)),e.analyze("End Liveness:"),e.analyze("Start GEAR:"),e.config.async?s=(S=e.config.face.gear)!=null&&S.enabled?qt(x[z].tensor||r.tensor([]),e.config,z,x.length):null:(e.state="run:gear",n=T(),s=(E=e.config.face.gear)!=null&&E.enabled?await qt(x[z].tensor||r.tensor([]),e.config,z,x.length):null,e.performance.gear=Math.trunc(T()-n)),e.analyze("End GEAR:"),e.analyze("Start SSRNet:"),e.config.async?(o=(I=e.config.face.ssrnet)!=null&&I.enabled?w5(x[z].tensor||r.tensor([]),e.config,z,x.length):null,A=(B=e.config.face.ssrnet)!=null&&B.enabled?S5(x[z].tensor||r.tensor([]),e.config,z,x.length):null):(e.state="run:ssrnet",n=T(),o=(U=e.config.face.ssrnet)!=null&&U.enabled?await w5(x[z].tensor||r.tensor([]),e.config,z,x.length):null,A=(F=e.config.face.ssrnet)!=null&&F.enabled?await S5(x[z].tensor||r.tensor([]),e.config,z,x.length):null,e.performance.ssrnet=Math.trunc(T()-n)),e.analyze("End SSRNet:"),e.analyze("Start MobileFaceNet:"),e.config.async?i=(H=e.config.face.mobilefacenet)!=null&&H.enabled?i5(x[z].tensor||r.tensor([]),e.config,z,x.length):null:(e.state="run:mobilefacenet",n=T(),i=(K=e.config.face.mobilefacenet)!=null&&K.enabled?await i5(x[z].tensor||r.tensor([]),e.config,z,x.length):null,e.performance.mobilefacenet=Math.trunc(T()-n)),e.analyze("End MobileFaceNet:"),e.analyze("Start InsightFace:"),e.config.async?c=(R=e.config.face.insightface)!=null&&R.enabled?o5(x[z].tensor||r.tensor([]),e.config,z,x.length):null:(e.state="run:mobilefacenet",n=T(),c=(L=e.config.face.insightface)!=null&&L.enabled?await o5(x[z].tensor||r.tensor([]),e.config,z,x.length):null,e.performance.mobilefacenet=Math.trunc(T()-n)),e.analyze("End InsightFace:"),e.analyze("Start Description:"),e.config.async?l=Vt(x[z].tensor||r.tensor([]),e.config,z,x.length):(e.state="run:description",n=T(),l=await Vt(x[z].tensor||r.tensor([]),e.config,z,x.length),e.performance.description=w.perfadd?(e.performance.description||0)+Math.trunc(T()-n):Math.trunc(T()-n)),e.analyze("End Description:"),e.config.async&&([o,A,a,i,c,l,s,d,y]=await Promise.all([o,A,a,i,c,l,s,d,y])),e.analyze("Finish Face:"),((c0=e.config.face.ssrnet)==null?void 0:c0.enabled)&&o&&A&&(l={...l,age:o.age,gender:A.gender,genderScore:A.genderScore}),((X=e.config.face.gear)==null?void 0:X.enabled)&&s&&(l={...l,age:s.age,gender:s.gender,genderScore:s.genderScore,race:s.race}),((r0=e.config.face.mobilefacenet)==null?void 0:r0.enabled)&&i&&(l.descriptor=i),((e0=e.config.face.insightface)==null?void 0:e0.enabled)&&c&&(l.descriptor=c),(W=e.config.face.iris)!=null&&W.enabled;let Se=((S0=(z0=(G=x[z])==null?void 0:G.annotations)==null?void 0:z0.leftEyeIris)==null?void 0:S0[0])&&((q0=(ee=($0=x[z])==null?void 0:$0.annotations)==null?void 0:ee.rightEyeIris)==null?void 0:q0[0])&&x[z].annotations.leftEyeIris.length>0&&x[z].annotations.rightEyeIris.length>0&&x[z].annotations.leftEyeIris[0]!==null&&x[z].annotations.rightEyeIris[0]!==null?Math.max(Math.abs(x[z].annotations.leftEyeIris[3][0]-x[z].annotations.leftEyeIris[1][0]),Math.abs(x[z].annotations.rightEyeIris[4][1]-x[z].annotations.rightEyeIris[2][1]))/t.shape[2]:0,Z5=(Qe=e.config.face.detector)!=null&&Qe.return?r.squeeze(x[z].tensor):null;r.dispose(x[z].tensor),x[z].tensor&&delete x[z].tensor;let j0={...x[z],id:z};l.age&&(j0.age=l.age),l.gender&&(j0.gender=l.gender),l.genderScore&&(j0.genderScore=l.genderScore),l.descriptor&&(j0.embedding=l.descriptor),l.race&&(j0.race=l.race),a&&(j0.emotion=a),d&&(j0.real=d),y&&(j0.live=y),Se&&Se!==0&&(j0.iris=Math.trunc(500/Se/11.7)/100),_e&&(j0.rotation=_e),Z5&&(j0.tensor=Z5),m.push(j0),e.analyze("End Face")}return e.analyze("End FaceMesh:"),e.config.async&&(e.performance.face&&delete e.performance.face,e.performance.age&&delete e.performance.age,e.performance.gender&&delete e.performance.gender,e.performance.emotion&&delete e.performance.emotion),m};var Fn=e=>{if(!e)return[];let t=[];for(let n=0;nc.part==="leftWrist"),s=e[n].keypoints.find(c=>c.part==="rightWrist"),A=e[n].keypoints.find(c=>c.part==="nose");A&&o&&s&&o.position[1]c.part==="leftShoulder"),i=e[n].keypoints.find(c=>c.part==="rightShoulder");a&&i&&Math.abs(a.positionRaw[1]-i.positionRaw[1])>.1&&t.push({body:n,gesture:`leaning ${a.position[1]>i.position[1]?"left":"right"}`})}return t},Gn=e=>{if(!e)return[];let t=[];for(let n=0;n450){let o=(e[n].mesh[33][2]||0)-(e[n].mesh[263][2]||0),s=e[n].mesh[33][0]-e[n].mesh[263][0];Math.abs(o/s)<=.15?t.push({face:n,gesture:"facing center"}):t.push({face:n,gesture:`facing ${o<0?"left":"right"}`}),Math.abs(e[n].mesh[374][1]-e[n].mesh[386][1])/Math.abs(e[n].mesh[443][1]-e[n].mesh[450][1])<.2&&t.push({face:n,gesture:"blink left eye"}),Math.abs(e[n].mesh[145][1]-e[n].mesh[159][1])/Math.abs(e[n].mesh[223][1]-e[n].mesh[230][1])<.2&&t.push({face:n,gesture:"blink right eye"});let i=Math.min(100,500*Math.abs(e[n].mesh[13][1]-e[n].mesh[14][1])/Math.abs(e[n].mesh[10][1]-e[n].mesh[152][1]));i>10&&t.push({face:n,gesture:`mouth ${Math.trunc(i)}% open`});let c=e[n].mesh[152][2]||0;Math.abs(c)>10&&t.push({face:n,gesture:`head ${c<0?"up":"down"}`})}return t},Bn=e=>{var n,o,s,A;if(!e)return[];let t=[];for(let a=0;a.06||M>.06)&&(x=!1),u>M?u>.05&&t.push({iris:a,gesture:"looking right"}):M>.05&&t.push({iris:a,gesture:"looking left"});let P=Math.abs(e[a].mesh[145][1]-e[a].annotations.rightEyeIris[0][1])/e[a].box[3],v=Math.abs(e[a].mesh[374][1]-e[a].annotations.leftEyeIris[0][1])/e[a].box[3];(v<.01||P<.01||v>.022||P>.022)&&(x=!1),(v<.01||P<.01)&&t.push({iris:a,gesture:"looking down"}),(v>.022||P>.022)&&t.push({iris:a,gesture:"looking up"}),x&&t.push({iris:a,gesture:"looking center"})}return t},Hn=e=>{if(!e)return[];let t=[];for(let n=0;n0){let s=o.reduce((a,i)=>(a.position[2]||0)<(i.position[2]||0)?a:i);t.push({hand:n,gesture:`${s.name} forward`});let A=o.reduce((a,i)=>a.position[1]((s-1)*j.body[R].box[G]+W)/s),c0=e.body[R].boxRaw.map((W,G)=>((s-1)*j.body[R].boxRaw[G]+W)/s),X=e.body[R].keypoints.map((W,G)=>{var z0,S0,$0,ee,q0,Qe,z,_e,Se;return{score:W.score,part:W.part,position:[j.body[R].keypoints[G]?((s-1)*(j.body[R].keypoints[G].position[0]||0)+(W.position[0]||0))/s:W.position[0],j.body[R].keypoints[G]?((s-1)*(j.body[R].keypoints[G].position[1]||0)+(W.position[1]||0))/s:W.position[1],j.body[R].keypoints[G]?((s-1)*(j.body[R].keypoints[G].position[2]||0)+(W.position[2]||0))/s:W.position[2]],positionRaw:[j.body[R].keypoints[G]?((s-1)*(j.body[R].keypoints[G].positionRaw[0]||0)+(W.positionRaw[0]||0))/s:W.positionRaw[0],j.body[R].keypoints[G]?((s-1)*(j.body[R].keypoints[G].positionRaw[1]||0)+(W.positionRaw[1]||0))/s:W.positionRaw[1],j.body[R].keypoints[G]?((s-1)*(j.body[R].keypoints[G].positionRaw[2]||0)+(W.positionRaw[2]||0))/s:W.positionRaw[2]],distance:[j.body[R].keypoints[G]?((s-1)*(((z0=j.body[R].keypoints[G].distance)==null?void 0:z0[0])||0)+(((S0=W.distance)==null?void 0:S0[0])||0))/s:($0=W.distance)==null?void 0:$0[0],j.body[R].keypoints[G]?((s-1)*(((ee=j.body[R].keypoints[G].distance)==null?void 0:ee[1])||0)+(((q0=W.distance)==null?void 0:q0[1])||0))/s:(Qe=W.distance)==null?void 0:Qe[1],j.body[R].keypoints[G]?((s-1)*(((z=j.body[R].keypoints[G].distance)==null?void 0:z[2])||0)+(((_e=W.distance)==null?void 0:_e[2])||0))/s:(Se=W.distance)==null?void 0:Se[2]]}}),r0={},e0={connected:{}};(a=t.body.modelPath)!=null&&a.includes("efficientpose")?e0=O2:(i=t.body.modelPath)!=null&&i.includes("blazepose")?e0=z2:(c=t.body.modelPath)!=null&&c.includes("movenet")&&(e0=a2);for(let[W,G]of Object.entries(e0.connected)){let z0=[];for(let S0=0;S0q0.part===G[S0]),ee=X.find(q0=>q0.part===G[S0+1]);$0&&ee&&z0.push([$0.position,ee.position])}r0[W]=z0}j.body[R]={...e.body[R],box:L,boxRaw:c0,keypoints:X,annotations:r0}}if(!j.hand||e.hand.length!==j.hand.length)j.hand=JSON.parse(JSON.stringify(e.hand));else for(let R=0;R((s-1)*j.hand[R].box[W]+e0)/s),c0=e.hand[R].boxRaw.map((e0,W)=>((s-1)*j.hand[R].boxRaw[W]+e0)/s);j.hand[R].keypoints.length!==e.hand[R].keypoints.length&&(j.hand[R].keypoints=e.hand[R].keypoints);let X=e.hand[R].keypoints&&e.hand[R].keypoints.length>0?e.hand[R].keypoints.map((e0,W)=>e0.map((G,z0)=>((s-1)*(j.hand[R].keypoints[W][z0]||1)+(G||0))/s)):[],r0={};if(Object.keys(j.hand[R].annotations).length!==Object.keys(e.hand[R].annotations).length)j.hand[R].annotations=e.hand[R].annotations,r0=j.hand[R].annotations;else if(e.hand[R].annotations)for(let e0 of Object.keys(e.hand[R].annotations))r0[e0]=(l=(y=(d=e.hand[R])==null?void 0:d.annotations)==null?void 0:y[e0])!=null&&l[0]?e.hand[R].annotations[e0].map((W,G)=>W.map((z0,S0)=>((s-1)*j.hand[R].annotations[e0][G][S0]+z0)/s)):null;j.hand[R]={...e.hand[R],box:L,boxRaw:c0,keypoints:X,annotations:r0}}if(!j.face||e.face.length!==j.face.length)j.face=JSON.parse(JSON.stringify(e.face));else for(let R=0;R((s-1)*j.face[R].box[r0]+X)/s),c0=e.face[R].boxRaw.map((X,r0)=>((s-1)*j.face[R].boxRaw[r0]+X)/s);if(e.face[R].rotation){let X={matrix:[0,0,0,0,0,0,0,0,0],angle:{roll:0,yaw:0,pitch:0},gaze:{bearing:0,strength:0}};X.matrix=(m=e.face[R].rotation)==null?void 0:m.matrix,X.angle={roll:((s-1)*(((p=(x=j.face[R].rotation)==null?void 0:x.angle)==null?void 0:p.roll)||0)+(((M=(u=e.face[R].rotation)==null?void 0:u.angle)==null?void 0:M.roll)||0))/s,yaw:((s-1)*(((v=(P=j.face[R].rotation)==null?void 0:P.angle)==null?void 0:v.yaw)||0)+(((g=(f=e.face[R].rotation)==null?void 0:f.angle)==null?void 0:g.yaw)||0))/s,pitch:((s-1)*(((E=(S=j.face[R].rotation)==null?void 0:S.angle)==null?void 0:E.pitch)||0)+(((B=(I=e.face[R].rotation)==null?void 0:I.angle)==null?void 0:B.pitch)||0))/s},X.gaze={bearing:((s-1)*(((U=j.face[R].rotation)==null?void 0:U.gaze.bearing)||0)+(((F=e.face[R].rotation)==null?void 0:F.gaze.bearing)||0))/s,strength:((s-1)*(((H=j.face[R].rotation)==null?void 0:H.gaze.strength)||0)+(((K=e.face[R].rotation)==null?void 0:K.gaze.strength)||0))/s},j.face[R]={...e.face[R],rotation:X,box:L,boxRaw:c0}}else j.face[R]={...e.face[R],box:L,boxRaw:c0}}if(!j.object||e.object.length!==j.object.length)j.object=JSON.parse(JSON.stringify(e.object));else for(let R=0;R((s-1)*j.object[R].box[r0]+X)/s),c0=e.object[R].boxRaw.map((X,r0)=>((s-1)*j.object[R].boxRaw[r0]+X)/s);j.object[R]={...e.object[R],box:L,boxRaw:c0}}if(e.persons){let R=e.persons;if(!j.persons||R.length!==j.persons.length)j.persons=JSON.parse(JSON.stringify(R));else for(let L=0;L((s-1)*j.persons[L].box[X]+c0)/s)}e.gesture&&(j.gesture=e.gesture);let A=T();return H5=w.perfadd?H5+Math.round(A-n):Math.round(A-n),e.performance&&(j.performance={...e.performance,interpolate:H5}),j}var Zn={};te(Zn,{distance:()=>y2,match:()=>D5,similarity:()=>V5});function y2(e,t,n={order:2,multiplier:25}){if(!e||!e)return Number.MAX_SAFE_INTEGER;let o=0;for(let s=0;s{if(e===0)return 1;let s=t===2?Math.sqrt(e):e**(1/t),A=(1-s/100-n)/(o-n);return Math.max(Math.min(A,1),0)};function V5(e,t,n={order:2,multiplier:25,min:.2,max:.8}){let o=y2(e,t,n);return Dn(o,n.order||2,n.min||0,n.max||1)}function D5(e,t,n={order:2,multiplier:25,threshold:0,min:.2,max:.8}){if(!Array.isArray(e)||!Array.isArray(t)||e.length<64||t.length===0)return{index:-1,distance:Number.POSITIVE_INFINITY,similarity:0};let o=Number.MAX_SAFE_INTEGER,s=-1;for(let a=0;ag.box[0]&&x.box[0]g.box[1]&&x.box[1]+x.box[3]p.body.box[0]&&g.box[0]+g.box[2]p.body.box[1]&&g.box[1]+g.box[3]p.body.box[0]&&g.box[1]+g.box[3]>p.body.box[1]&&g.box[1]+g.box[3]{g&&g.length===4&&(u.push(g[0],g[0]+g[2]),M.push(g[1],g[1]+g[3]))};P(p.face.box),P((y=p.body)==null?void 0:y.box),P((l=p.hands.left)==null?void 0:l.box),P((m=p.hands.right)==null?void 0:m.box);let v=Math.min(...u),f=Math.min(...M);p.box=[v,f,Math.max(...u)-v,Math.max(...M)-f],(s==null?void 0:s[1])&&(s==null?void 0:s[2])&&(p.boxRaw=[p.box[0]/s[2],p.box[1]/s[1],p.box[2]/s[2],p.box[3]/s[1]]),a.push(p)}return a}var st=` /9j/4AAQSkZJRgABAQEAYABgAAD/4QBoRXhpZgAATU0AKgAAAAgABAEaAAUAAAABAAAAPgEbAAUA AAABAAAARgEoAAMAAAABAAIAAAExAAIAAAARAAAATgAAAAAAAABgAAAAAQAAAGAAAAABcGFpbnQu bmV0IDQuMi4xMwAA/9sAQwAGBAUGBQQGBgUGBwcGCAoQCgoJCQoUDg8MEBcUGBgXFBYWGh0lHxob @@ -13899,8 +259,7 @@ PQ4GJ+ashuK0MhWaoWcA0AaOmASMK7jRNPWYBmHyiuepO2x10qfcv6vYxCzYqoGK4HVYVTJrmb5l c6oaM5TUJ8EgGsG4kLNUHT0M64OaqMMikSRsuKbnFMRLG3zVehOaGNE445NNlnVFpDMu6uie9Vo1 8z5mOAOST2pDK91cNN+5tsrH3PrW54a06KxT7fdrlh/q1Pc+tJ6IUdZGvHPLezMcnBOWbsPap5r3 ylFtbdT1xUWNWzU0/Zbwlgfmx8zGsHWtRHmMqE59aAMyNifvHPc1f0gtPdqkY5JosJHeNci2tktY -euPnNY+oXWZEVJNrZ9aun8SIq/CzodHuriIokhDIR1ronbKZr0o6o8ipoz//2Q==`; -var body3 = ` +euPnNY+oXWZEVJNrZ9aun8SIq/CzodHuriIokhDIR1ronbKZr0o6o8ipoz//2Q==`,At=` /9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAsICAoIBwsKCQoNDAsNERwSEQ8PESIZGhQcKSQrKigk JyctMkA3LTA9MCcnOEw5PUNFSElIKzZPVU5GVEBHSEX/2wBDAQwNDREPESESEiFFLicuRUVFRUVF RUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUX/wAARCASwBLADASIA @@ -14468,579 +827,4 @@ AAAAAAJAAAAAAAAAAAAAABAJEAAAAAAAAAAAAAAAIEoBKAAAAAAAAAAAAAAABAlAAAAAAAIAAAAA BAkBAkBAkBAlACEgMZjdjbFW8bWrEx8YWANb6Fp+bfwab+vLDKMFK9qxH5L0bAr8OPRPKz2AY7J2 SbAjYZAI2E7AIEgIEgIEgMdkSy2NgY7MdlmyNoBXsxmFuyNgVTVjNV3KjlBRNTlXTVHKCrlIqt5T lBhEMohlFerLlBjEMohMVTEARDKCITsAk2AEgAAAkAAAAAAAAAAAAAAAAAAAAAAAASAAAAAAAAD/ -2Q==`; - -// src/warmup.ts -async function warmupBitmap(instance2) { - const b64toBlob = (base64, type = "application/octet-stream") => fetch(`data:${type};base64,${base64}`).then((res2) => res2.blob()); - let blob; - let res; - switch (instance2.config.warmup) { - case "face": - blob = await b64toBlob(face3); - break; - case "body": - case "full": - blob = await b64toBlob(body3); - break; - default: - blob = null; - } - if (blob) { - const bitmap = await createImageBitmap(blob); - res = await instance2.detect(bitmap, instance2.config); - bitmap.close(); - } - return res; -} -async function warmupCanvas(instance2) { - return new Promise((resolve) => { - let src; - switch (instance2.config.warmup) { - case "face": - src = "data:image/jpeg;base64," + face3; - break; - case "full": - case "body": - src = "data:image/jpeg;base64," + body3; - break; - default: - src = ""; - } - let img; - if (typeof Image !== "undefined") - img = new Image(); - else if (env.Image) - img = new env.Image(); - else - return; - img.onload = async () => { - const canvas3 = canvas(img.naturalWidth, img.naturalHeight); - if (!canvas3) { - log("Warmup: Canvas not found"); - resolve(void 0); - } else { - const ctx = canvas3.getContext("2d"); - if (ctx) - ctx.drawImage(img, 0, 0); - const tensor6 = await instance2.image(canvas3); - const res = tensor6.tensor ? await instance2.detect(tensor6.tensor, instance2.config) : void 0; - resolve(res); - } - }; - if (src) - img.src = src; - else - resolve(void 0); - }); -} -async function warmupNode(instance2) { - const atob = (str) => Buffer.from(str, "base64"); - let img; - if (instance2.config.warmup === "face") - img = atob(face3); - else - img = atob(body3); - let res; - if ("node" in tfjs_esm_exports && tfjs_esm_exports.getBackend() === "tensorflow") { - const data = tfjs_esm_exports["node"].decodeJpeg(img); - const expanded = tfjs_esm_exports.expandDims(data, 0); - instance2.tf.dispose(data); - res = await instance2.detect(expanded, instance2.config); - instance2.tf.dispose(expanded); - } else { - if (instance2.config.debug) - log("Warmup tfjs-node not loaded"); - } - return res; -} -async function runInference(instance2) { - let res; - if (typeof createImageBitmap === "function") - res = await warmupBitmap(instance2); - else if (typeof Image !== "undefined" || env.Canvas !== void 0) - res = await warmupCanvas(instance2); - else - res = await warmupNode(instance2); - return res; -} -async function runCompile(instance2) { - var _a, _b, _c, _d; - if (!tfjs_esm_exports.env().flagRegistry.ENGINE_COMPILE_ONLY) - return; - const backendType = tfjs_esm_exports.getBackend(); - const webGLBackend = tfjs_esm_exports.backend(); - if (backendType !== "webgl" && backendType !== "humangl" || !(webGLBackend == null ? void 0 : webGLBackend.checkCompileCompletion)) { - return; - } - tfjs_esm_exports.env().set("ENGINE_COMPILE_ONLY", true); - const numTensorsStart = tfjs_esm_exports.engine().state.numTensors; - const compiledModels = []; - for (const [modelName, model21] of Object.entries(instance2.models).filter(([key, val]) => key !== null && val !== null)) { - const shape = ((_b = (_a = model21.inputs) == null ? void 0 : _a[0]) == null ? void 0 : _b.shape) ? [...model21.inputs[0].shape] : [1, 64, 64, 3]; - const dtype = ((_d = (_c = model21.inputs) == null ? void 0 : _c[0]) == null ? void 0 : _d.dtype) ? model21.inputs[0].dtype : "float32"; - for (let dim = 0; dim < shape.length; dim++) { - if (shape[dim] === -1) - shape[dim] = dim === 0 ? 1 : 64; - } - const tensor6 = tfjs_esm_exports.zeros(shape, dtype); - try { - const res = model21.execute(tensor6); - compiledModels.push(modelName); - if (Array.isArray(res)) - res.forEach((t2) => tfjs_esm_exports.dispose(t2)); - else - tfjs_esm_exports.dispose(res); - } catch (e) { - if (instance2.config.debug) - log("compile fail model:", modelName); - } - tfjs_esm_exports.dispose(tensor6); - } - const kernels = await webGLBackend.checkCompileCompletionAsync(); - webGLBackend.getUniformLocations(); - if (instance2.config.debug) - log("compile pass:", { models: compiledModels, kernels: kernels.length }); - tfjs_esm_exports.env().set("ENGINE_COMPILE_ONLY", false); - const numTensorsEnd = tfjs_esm_exports.engine().state.numTensors; - if (numTensorsEnd - numTensorsStart > 0) - log("tensor leak:", numTensorsEnd - numTensorsStart); -} -async function warmup(instance2, userConfig) { - await check(instance2, false); - const t0 = now(); - instance2.state = "warmup"; - if (userConfig) - instance2.config = mergeDeep(instance2.config, userConfig); - if (!instance2.config.warmup || instance2.config.warmup.length === 0 || instance2.config.warmup === "none") { - return { face: [], body: [], hand: [], gesture: [], object: [], performance: instance2.performance, timestamp: now(), persons: [], error: null }; - } - return new Promise(async (resolve) => { - await models_exports2.load(instance2); - await runCompile(instance2); - const res = await runInference(instance2); - const t1 = now(); - if (instance2.config.debug) - log("warmup", instance2.config.warmup, Math.round(t1 - t0), "ms"); - instance2.emit("warmup"); - resolve(res); - }); -} - -// src/human.ts -var _numTensors, _analyzeMemoryLeaks, _checkSanity, _sanity, _loops; -var Human2 = class { - constructor(userConfig) { - __publicField(this, "version"); - __publicField(this, "config"); - __publicField(this, "result"); - __publicField(this, "state"); - __publicField(this, "process"); - __publicField(this, "tf"); - __publicField(this, "env"); - __publicField(this, "draw"); - __publicField(this, "models"); - __publicField(this, "events"); - __publicField(this, "faceTriangulation"); - __publicField(this, "faceUVMap"); - __publicField(this, "performance"); - __privateAdd(this, _numTensors, void 0); - __privateAdd(this, _analyzeMemoryLeaks, void 0); - __privateAdd(this, _checkSanity, void 0); - __publicField(this, "gl"); - __publicField(this, "analyze", (...msg) => { - if (!__privateGet(this, _analyzeMemoryLeaks)) - return; - const currentTensors = this.tf.engine().state.numTensors; - const previousTensors = __privateGet(this, _numTensors); - __privateSet(this, _numTensors, currentTensors); - const leaked = currentTensors - previousTensors; - if (leaked !== 0) - log(...msg, leaked); - }); - __privateAdd(this, _sanity, (input) => { - if (!__privateGet(this, _checkSanity)) - return null; - if (!input) - return "input is not defined"; - if (this.env.node && !(input instanceof Tensor)) - return "input must be a tensor"; - try { - this.tf.getBackend(); - } catch (e) { - return "backend not loaded"; - } - return null; - }); - __publicField(this, "similarity", similarity); - __publicField(this, "distance", distance); - __publicField(this, "match", match2); - __publicField(this, "webcam", new WebCam()); - __publicField(this, "emit", (event) => { - var _a; - if ((_a = this.events) == null ? void 0 : _a.dispatchEvent) - this.events.dispatchEvent(new Event(event)); - }); - __privateAdd(this, _loops, {}); - this.env = env; - const tfVersion = (version8.tfjs || tfjs_esm_exports.version_core).replace(/-(.*)/, ""); - config.wasmPath = `https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm@${tfVersion}/dist/`; - config.modelBasePath = env.browser ? "../models/" : "file://models/"; - config.backend = env.browser ? "webgl" : "tensorflow"; - this.version = version9; - Object.defineProperty(this, "version", { value: version9 }); - this.config = JSON.parse(JSON.stringify(config)); - Object.seal(this.config); - this.config.cacheModels = typeof indexedDB !== "undefined"; - if (userConfig) - this.config = mergeDeep(this.config, userConfig); - setModelLoadOptions(this.config); - this.tf = tfjs_esm_exports; - this.state = "idle"; - __privateSet(this, _numTensors, 0); - __privateSet(this, _analyzeMemoryLeaks, false); - __privateSet(this, _checkSanity, false); - this.performance = {}; - this.events = typeof EventTarget !== "undefined" ? new EventTarget() : void 0; - this.models = new Models(); - this.draw = { - options: options3, - canvas: (input, output) => canvas2(input, output), - face: (output, result, options4) => face(output, result, options4), - body: (output, result, options4) => body(output, result, options4), - hand: (output, result, options4) => hand(output, result, options4), - gesture: (output, result, options4) => gesture(output, result, options4), - object: (output, result, options4) => object(output, result, options4), - person: (output, result, options4) => person(output, result, options4), - all: (output, result, options4) => all(output, result, options4) - }; - this.result = { face: [], body: [], hand: [], gesture: [], object: [], performance: {}, timestamp: 0, persons: [], error: null }; - this.process = { tensor: null, canvas: null }; - this.faceTriangulation = triangulation; - this.faceUVMap = uvmap; - this.gl = config2; - validateModel(this, null, ""); - this.emit("create"); - if (this.config.debug || this.env.browser) - log(`version: ${this.version}`); - if (this.config.debug) - log(`tfjs version: ${this.tf.version["tfjs-core"]}`); - const envTemp = JSON.parse(JSON.stringify(this.env)); - delete envTemp.kernels; - delete envTemp.initial; - delete envTemp.perfadd; - if (this.config.debug) - log("environment:", envTemp); - } - reset() { - const currentBackend = this.config.backend; - this.config = JSON.parse(JSON.stringify(config)); - this.config.backend = currentBackend; - reset(); - env.initial = true; - } - validate(userConfig) { - const msgs = validate(config, userConfig || this.config); - if (msgs.length === 0) - this.config = mergeDeep(this.config, userConfig); - return msgs; - } - check() { - return validate2(this); - } - now() { - return now(); - } - image(input, getTensor = true) { - return process2(input, this.config, getTensor); - } - async segmentation(input, userConfig) { - var _a, _b, _c; - if (userConfig) - this.config = mergeDeep(this.config, userConfig); - if (!this.config.segmentation.enabled) - return null; - const processed = await process2(input, this.config); - if (!processed.tensor) - return null; - let tensor6 = null; - if ((_a = this.config.segmentation.modelPath) == null ? void 0 : _a.includes("rvm")) - tensor6 = await predict18(processed.tensor, this.config); - if ((_b = this.config.segmentation.modelPath) == null ? void 0 : _b.includes("meet")) - tensor6 = await predict13(processed.tensor, this.config); - if ((_c = this.config.segmentation.modelPath) == null ? void 0 : _c.includes("selfie")) - tensor6 = await predict19(processed.tensor, this.config); - tfjs_esm_exports.dispose(processed.tensor); - return tensor6; - } - enhance(input) { - return enhance(input); - } - compare(firstImageTensor, secondImageTensor) { - return compare(this.config, firstImageTensor, secondImageTensor); - } - async init() { - await check(this, true); - await this.tf.ready(); - reset(); - } - async load(userConfig) { - this.state = "load"; - const timeStamp = now(); - const count2 = Object.values(this.models).filter((model21) => model21).length; - if (userConfig) - this.config = mergeDeep(this.config, userConfig); - if (this.env.initial) { - if (!await check(this, false)) - log("error: backend check failed"); - await tfjs_esm_exports.ready(); - if (this.env.browser) { - if (this.config.debug) - log("configuration:", this.config); - if (this.config.debug) - log("tf flags:", this.tf.ENV.flags); - } - } - await load22(this); - if (this.env.initial && this.config.debug) - log("tf engine state:", this.tf.engine().state.numBytes, "bytes", this.tf.engine().state.numTensors, "tensors"); - this.env.initial = false; - const loaded = Object.values(this.models).filter((model21) => model21).length; - if (loaded !== count2) { - validate2(this); - this.emit("load"); - } - const current = Math.trunc(now() - timeStamp); - if (current > (this.performance.loadModels || 0)) - this.performance.loadModels = this.env.perfadd ? (this.performance.loadModels || 0) + current : current; - } - next(result = this.result) { - return calc2(result, this.config); - } - getModelStats() { - return getModelStats(this); - } - async warmup(userConfig) { - const t0 = now(); - const res = await warmup(this, userConfig); - const t1 = now(); - this.performance.warmup = Math.trunc(t1 - t0); - return res; - } - async profile(input, userConfig) { - const profile = await this.tf.profile(() => this.detect(input, userConfig)); - const kernels = {}; - let total = 0; - for (const kernel of profile.kernels) { - if (kernels[kernel.name]) - kernels[kernel.name] += kernel.kernelTimeMs; - else - kernels[kernel.name] = kernel.kernelTimeMs; - total += kernel.kernelTimeMs; - } - const kernelArr = []; - Object.entries(kernels).forEach((key) => kernelArr.push({ kernel: key[0], time: key[1], perc: 0 })); - for (const kernel of kernelArr) { - kernel.perc = Math.round(1e3 * kernel.time / total) / 1e3; - kernel.time = Math.round(1e3 * kernel.time) / 1e3; - } - kernelArr.sort((a, b) => b.time - a.time); - kernelArr.length = 20; - return kernelArr; - } - async detect(input, userConfig) { - this.state = "detect"; - return new Promise(async (resolve) => { - var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u; - this.state = "config"; - let timeStamp; - this.config = mergeDeep(this.config, userConfig); - this.state = "check"; - const error = __privateGet(this, _sanity).call(this, input); - if (error) { - log(error, input); - this.emit("error"); - resolve({ face: [], body: [], hand: [], gesture: [], object: [], performance: this.performance, timestamp: now(), persons: [], error }); - } - const timeStart = now(); - await this.load(); - timeStamp = now(); - this.state = "image"; - const img = await process2(input, this.config); - this.process = img; - this.performance.inputProcess = this.env.perfadd ? (this.performance.inputProcess || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - this.analyze("Get Image:"); - if (!img.tensor) { - if (this.config.debug) - log("could not convert input to tensor"); - this.emit("error"); - resolve({ face: [], body: [], hand: [], gesture: [], object: [], performance: this.performance, timestamp: now(), persons: [], error: "could not convert input to tensor" }); - return; - } - this.emit("image"); - timeStamp = now(); - this.config.skipAllowed = await skip(this.config, img.tensor); - if (!this.performance.totalFrames) - this.performance.totalFrames = 0; - if (!this.performance.cachedFrames) - this.performance.cachedFrames = 0; - this.performance.totalFrames++; - if (this.config.skipAllowed) - this.performance.cachedFrames++; - this.performance.cacheCheck = this.env.perfadd ? (this.performance.cacheCheck || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - this.analyze("Check Changed:"); - let faceRes = []; - let bodyRes = []; - let handRes = []; - let objectRes = []; - this.state = "detect:face"; - if (this.config.async) { - faceRes = this.config.face.enabled ? detectFace(this, img.tensor) : []; - if (this.performance.face) - delete this.performance.face; - } else { - timeStamp = now(); - faceRes = this.config.face.enabled ? await detectFace(this, img.tensor) : []; - this.performance.face = this.env.perfadd ? (this.performance.face || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - } - if (this.config.async && (this.config.body.maxDetected === -1 || this.config.hand.maxDetected === -1)) - faceRes = await faceRes; - this.analyze("Start Body:"); - this.state = "detect:body"; - const bodyConfig = this.config.body.maxDetected === -1 ? mergeDeep(this.config, { body: { maxDetected: this.config.face.enabled ? 1 * faceRes.length : 1 } }) : this.config; - if (this.config.async) { - if ((_a = this.config.body.modelPath) == null ? void 0 : _a.includes("posenet")) - bodyRes = this.config.body.enabled ? predict17(img.tensor, bodyConfig) : []; - else if ((_b = this.config.body.modelPath) == null ? void 0 : _b.includes("blazepose")) - bodyRes = this.config.body.enabled ? predict2(img.tensor, bodyConfig) : []; - else if ((_c = this.config.body.modelPath) == null ? void 0 : _c.includes("efficientpose")) - bodyRes = this.config.body.enabled ? predict4(img.tensor, bodyConfig) : []; - else if ((_d = this.config.body.modelPath) == null ? void 0 : _d.includes("movenet")) - bodyRes = this.config.body.enabled ? predict15(img.tensor, bodyConfig) : []; - if (this.performance.body) - delete this.performance.body; - } else { - timeStamp = now(); - if ((_e = this.config.body.modelPath) == null ? void 0 : _e.includes("posenet")) - bodyRes = this.config.body.enabled ? await predict17(img.tensor, bodyConfig) : []; - else if ((_f = this.config.body.modelPath) == null ? void 0 : _f.includes("blazepose")) - bodyRes = this.config.body.enabled ? await predict2(img.tensor, bodyConfig) : []; - else if ((_g = this.config.body.modelPath) == null ? void 0 : _g.includes("efficientpose")) - bodyRes = this.config.body.enabled ? await predict4(img.tensor, bodyConfig) : []; - else if ((_h = this.config.body.modelPath) == null ? void 0 : _h.includes("movenet")) - bodyRes = this.config.body.enabled ? await predict15(img.tensor, bodyConfig) : []; - this.performance.body = this.env.perfadd ? (this.performance.body || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - } - this.analyze("End Body:"); - this.analyze("Start Hand:"); - this.state = "detect:hand"; - const handConfig = this.config.hand.maxDetected === -1 ? mergeDeep(this.config, { hand: { maxDetected: this.config.face.enabled ? 2 * faceRes.length : 1 } }) : this.config; - if (this.config.async) { - if ((_j = (_i = this.config.hand.detector) == null ? void 0 : _i.modelPath) == null ? void 0 : _j.includes("handdetect")) - handRes = this.config.hand.enabled ? predict9(img.tensor, handConfig) : []; - else if ((_l = (_k = this.config.hand.detector) == null ? void 0 : _k.modelPath) == null ? void 0 : _l.includes("handtrack")) - handRes = this.config.hand.enabled ? predict10(img.tensor, handConfig) : []; - if (this.performance.hand) - delete this.performance.hand; - } else { - timeStamp = now(); - if ((_n = (_m = this.config.hand.detector) == null ? void 0 : _m.modelPath) == null ? void 0 : _n.includes("handdetect")) - handRes = this.config.hand.enabled ? await predict9(img.tensor, handConfig) : []; - else if ((_p = (_o = this.config.hand.detector) == null ? void 0 : _o.modelPath) == null ? void 0 : _p.includes("handtrack")) - handRes = this.config.hand.enabled ? await predict10(img.tensor, handConfig) : []; - this.performance.hand = this.env.perfadd ? (this.performance.hand || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - } - this.analyze("End Hand:"); - this.analyze("Start Object:"); - this.state = "detect:object"; - if (this.config.async) { - if ((_q = this.config.object.modelPath) == null ? void 0 : _q.includes("nanodet")) - objectRes = this.config.object.enabled ? predict16(img.tensor, this.config) : []; - else if ((_r = this.config.object.modelPath) == null ? void 0 : _r.includes("centernet")) - objectRes = this.config.object.enabled ? predict3(img.tensor, this.config) : []; - if (this.performance.object) - delete this.performance.object; - } else { - timeStamp = now(); - if ((_s = this.config.object.modelPath) == null ? void 0 : _s.includes("nanodet")) - objectRes = this.config.object.enabled ? await predict16(img.tensor, this.config) : []; - else if ((_t = this.config.object.modelPath) == null ? void 0 : _t.includes("centernet")) - objectRes = this.config.object.enabled ? await predict3(img.tensor, this.config) : []; - this.performance.object = this.env.perfadd ? (this.performance.object || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - } - this.analyze("End Object:"); - this.state = "detect:await"; - if (this.config.async) - [faceRes, bodyRes, handRes, objectRes] = await Promise.all([faceRes, bodyRes, handRes, objectRes]); - this.state = "detect:gesture"; - let gestureRes = []; - if (this.config.gesture.enabled) { - timeStamp = now(); - gestureRes = [...face2(faceRes), ...body2(bodyRes), ...hand2(handRes), ...iris2(faceRes)]; - if (!this.config.async) - this.performance.gesture = this.env.perfadd ? (this.performance.gesture || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - else if (this.performance.gesture) - delete this.performance.gesture; - } - this.performance.total = this.env.perfadd ? (this.performance.total || 0) + Math.trunc(now() - timeStart) : Math.trunc(now() - timeStart); - const shape = ((_u = this.process.tensor) == null ? void 0 : _u.shape) || []; - this.result = { - face: faceRes, - body: bodyRes, - hand: handRes, - gesture: gestureRes, - object: objectRes, - performance: this.performance, - canvas: this.process.canvas, - timestamp: Date.now(), - error: null, - get persons() { - return join2(faceRes, bodyRes, handRes, gestureRes, shape); - } - }; - tfjs_esm_exports.dispose(img.tensor); - this.emit("detect"); - this.state = "idle"; - resolve(this.result); - }); - } - async sleep(ms) { - return new Promise((resolve) => { - setTimeout(resolve, ms); - }); - } - async video(element, run = true, delay = 0) { - if (run) { - if (!__privateGet(this, _loops)[element.id]) { - if (this.config.debug) - log("video start", element.id); - __privateGet(this, _loops)[element.id] = true; - } - if (!element.paused && __privateGet(this, _loops)[element.id] && element.readyState >= 2) - await this.detect(element); - if (delay > 0) - await this.sleep(delay); - if (__privateGet(this, _loops)[element.id]) - requestAnimationFrame(() => this.video(element, run, delay)); - } else { - if (this.config.debug) - log("video stop", element.id); - __privateGet(this, _loops)[element.id] = false; - } - } -}; -_numTensors = new WeakMap(); -_analyzeMemoryLeaks = new WeakMap(); -_checkSanity = new WeakMap(); -_sanity = new WeakMap(); -_loops = new WeakMap(); -export { - Env, - Human2 as Human, - Human2 as default, - config as defaults, - draw_exports as draw, - env, - match_exports as match, - models_exports2 as models -}; +2Q==`;async function iA(e){let t=(s,A="application/octet-stream")=>fetch(`data:${A};base64,${s}`).then(a=>a.blob()),n,o;switch(e.config.warmup){case"face":n=await t(st);break;case"body":case"full":n=await t(At);break;default:n=null}if(n){let s=await createImageBitmap(n);o=await e.detect(s,e.config),s.close()}return o}async function lA(e){return new Promise(t=>{let n;switch(e.config.warmup){case"face":n="data:image/jpeg;base64,"+st;break;case"full":case"body":n="data:image/jpeg;base64,"+At;break;default:n=""}let o;if(typeof Image!="undefined")o=new Image;else if(w.Image)o=new w.Image;else return;o.onload=async()=>{let s=N0(o.naturalWidth,o.naturalHeight);if(!s)b("Warmup: Canvas not found"),t(void 0);else{let A=s.getContext("2d");A&&A.drawImage(o,0,0);let a=await e.image(s),i=a.tensor?await e.detect(a.tensor,e.config):void 0;t(i)}},n?o.src=n:t(void 0)})}async function cA(e){let t=s=>Buffer.from(s,"base64"),n;e.config.warmup==="face"?n=t(st):n=t(At);let o;if("node"in r&&r.getBackend()==="tensorflow"){let s=r.node.decodeJpeg(n),A=r.expandDims(s,0);e.tf.dispose(s),o=await e.detect(A,e.config),e.tf.dispose(A)}else e.config.debug&&b("Warmup tfjs-node not loaded");return o}async function dA(e){let t;return typeof createImageBitmap=="function"?t=await iA(e):typeof Image!="undefined"||w.Canvas!==void 0?t=await lA(e):t=await cA(e),t}async function xA(e){var i,c,d,y;if(!r.env().flagRegistry.ENGINE_COMPILE_ONLY)return;let t=r.getBackend(),n=r.backend();if(t!=="webgl"&&t!=="humangl"||!(n!=null&&n.checkCompileCompletion))return;r.env().set("ENGINE_COMPILE_ONLY",!0);let o=r.engine().state.numTensors,s=[];for(let[l,m]of Object.entries(e.models).filter(([x,p])=>x!==null&&p!==null)){let x=(c=(i=m.inputs)==null?void 0:i[0])!=null&&c.shape?[...m.inputs[0].shape]:[1,64,64,3],p=(y=(d=m.inputs)==null?void 0:d[0])!=null&&y.dtype?m.inputs[0].dtype:"float32";for(let M=0;Mr.dispose(P)):r.dispose(M)}catch(M){e.config.debug&&b("compile fail model:",l)}r.dispose(u)}let A=await n.checkCompileCompletionAsync();n.getUniformLocations(),e.config.debug&&b("compile pass:",{models:s,kernels:A.length}),r.env().set("ENGINE_COMPILE_ONLY",!1);let a=r.engine().state.numTensors;a-o>0&&b("tensor leak:",a-o)}async function qn(e,t){await x2(e,!1);let n=T();return e.state="warmup",t&&(e.config=J(e.config,t)),!e.config.warmup||e.config.warmup.length===0||e.config.warmup==="none"?{face:[],body:[],hand:[],gesture:[],object:[],performance:e.performance,timestamp:T(),persons:[],error:null}:new Promise(async o=>{await d2.load(e),await xA(e);let s=await dA(e),A=T();e.config.debug&&b("warmup",e.config.warmup,Math.round(A-n),"ms"),e.emit("warmup"),o(s)})}var Je,f2,m2,at,me,Un=class{constructor(t){k(this,"version");k(this,"config");k(this,"result");k(this,"state");k(this,"process");k(this,"tf");k(this,"env");k(this,"draw");k(this,"models");k(this,"events");k(this,"faceTriangulation");k(this,"faceUVMap");k(this,"performance");je(this,Je,void 0);je(this,f2,void 0);je(this,m2,void 0);k(this,"gl");k(this,"analyze",(...t)=>{if(!V0(this,f2))return;let n=this.tf.engine().state.numTensors,o=V0(this,Je);$e(this,Je,n);let s=n-o;s!==0&&b(...t,s)});je(this,at,t=>{if(!V0(this,m2))return null;if(!t)return"input is not defined";if(this.env.node&&!(t instanceof Ne))return"input must be a tensor";try{this.tf.getBackend()}catch(n){return"backend not loaded"}return null});k(this,"similarity",V5);k(this,"distance",y2);k(this,"match",D5);k(this,"webcam",new T2);k(this,"emit",t=>{var n;(n=this.events)!=null&&n.dispatchEvent&&this.events.dispatchEvent(new Event(t))});je(this,me,{});this.env=w;let n=(e2.tfjs||r.version_core).replace(/-(.*)/,"");pe.wasmPath=`https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm@${n}/dist/`,pe.modelBasePath=w.browser?"../models/":"file://models/",pe.backend=w.browser?"webgl":"tensorflow",this.version=mt,Object.defineProperty(this,"version",{value:mt}),this.config=JSON.parse(JSON.stringify(pe)),Object.seal(this.config),this.config.cacheModels=typeof indexedDB!="undefined",t&&(this.config=J(this.config,t)),r1(this.config),this.tf=r,this.state="idle",$e(this,Je,0),$e(this,f2,!1),$e(this,m2,!1),this.performance={},this.events=typeof EventTarget!="undefined"?new EventTarget:void 0,this.models=new c2,this.draw={options:m0,canvas:(s,A)=>W5(s,A),face:(s,A,a)=>Ze(s,A,a),body:(s,A,a)=>Xe(s,A,a),hand:(s,A,a)=>qe(s,A,a),gesture:(s,A,a)=>Ye(s,A,a),object:(s,A,a)=>Ue(s,A,a),person:(s,A,a)=>L5(s,A,a),all:(s,A,a)=>F5(s,A,a)},this.result={face:[],body:[],hand:[],gesture:[],object:[],performance:{},timestamp:0,persons:[],error:null},this.process={tensor:null,canvas:null},this.faceTriangulation=$1,this.faceUVMap=e3,this.gl=Z,ot(this,null,""),this.emit("create"),(this.config.debug||this.env.browser)&&b(`version: ${this.version}`),this.config.debug&&b(`tfjs version: ${this.tf.version["tfjs-core"]}`);let o=JSON.parse(JSON.stringify(this.env));delete o.kernels,delete o.initial,delete o.perfadd,this.config.debug&&b("environment:",o)}reset(){let t=this.config.backend;this.config=JSON.parse(JSON.stringify(pe)),this.config.backend=t,yt(),w.initial=!0}validate(t){let n=lt(pe,t||this.config);return n.length===0&&(this.config=J(this.config,t)),n}check(){return rt(this)}now(){return T()}image(t,n=!0){return b2(t,this.config,n)}async segmentation(t,n){var A,a,i;if(n&&(this.config=J(this.config,n)),!this.config.segmentation.enabled)return null;let o=await b2(t,this.config);if(!o.tensor)return null;let s=null;return(A=this.config.segmentation.modelPath)!=null&&A.includes("rvm")&&(s=await hn(o.tensor,this.config)),(a=this.config.segmentation.modelPath)!=null&&a.includes("meet")&&(s=await X3(o.tensor,this.config)),(i=this.config.segmentation.modelPath)!=null&&i.includes("selfie")&&(s=await gn(o.tensor,this.config)),r.dispose(o.tensor),s}enhance(t){return Ht(t)}compare(t,n){return o1(this.config,t,n)}async init(){await x2(this,!0),await this.tf.ready(),yt()}async load(t){this.state="load";let n=T(),o=Object.values(this.models).filter(a=>a).length;t&&(this.config=J(this.config,t)),this.env.initial&&(await x2(this,!1)||b("error: backend check failed"),await r.ready(),this.env.browser&&(this.config.debug&&b("configuration:",this.config),this.config.debug&&b("tf flags:",this.tf.ENV.flags))),await N5(this),this.env.initial&&this.config.debug&&b("tf engine state:",this.tf.engine().state.numBytes,"bytes",this.tf.engine().state.numTensors,"tensors"),this.env.initial=!1,Object.values(this.models).filter(a=>a).length!==o&&(rt(this),this.emit("load"));let A=Math.trunc(T()-n);A>(this.performance.loadModels||0)&&(this.performance.loadModels=this.env.perfadd?(this.performance.loadModels||0)+A:A)}next(t=this.result){return Vn(t,this.config)}getModelStats(){return j5(this)}async warmup(t){let n=T(),o=await qn(this,t),s=T();return this.performance.warmup=Math.trunc(s-n),o}async profile(t,n){let o=await this.tf.profile(()=>this.detect(t,n)),s={},A=0;for(let i of o.kernels)s[i.name]?s[i.name]+=i.kernelTimeMs:s[i.name]=i.kernelTimeMs,A+=i.kernelTimeMs;let a=[];Object.entries(s).forEach(i=>a.push({kernel:i[0],time:i[1],perc:0}));for(let i of a)i.perc=Math.round(1e3*i.time/A)/1e3,i.time=Math.round(1e3*i.time)/1e3;return a.sort((i,c)=>c.time-i.time),a.length=20,a}async detect(t,n){return this.state="detect",new Promise(async o=>{var M,P,v,f,g,S,E,I,B,U,F,H,K,R,L,c0,X,r0,e0,W,G;this.state="config";let s;this.config=J(this.config,n),this.state="check";let A=V0(this,at).call(this,t);A&&(b(A,t),this.emit("error"),o({face:[],body:[],hand:[],gesture:[],object:[],performance:this.performance,timestamp:T(),persons:[],error:A}));let a=T();await this.load(),s=T(),this.state="image";let i=await b2(t,this.config);if(this.process=i,this.performance.inputProcess=this.env.perfadd?(this.performance.inputProcess||0)+Math.trunc(T()-s):Math.trunc(T()-s),this.analyze("Get Image:"),!i.tensor){this.config.debug&&b("could not convert input to tensor"),this.emit("error"),o({face:[],body:[],hand:[],gesture:[],object:[],performance:this.performance,timestamp:T(),persons:[],error:"could not convert input to tensor"});return}this.emit("image"),s=T(),this.config.skipAllowed=await n1(this.config,i.tensor),this.performance.totalFrames||(this.performance.totalFrames=0),this.performance.cachedFrames||(this.performance.cachedFrames=0),this.performance.totalFrames++,this.config.skipAllowed&&this.performance.cachedFrames++,this.performance.cacheCheck=this.env.perfadd?(this.performance.cacheCheck||0)+Math.trunc(T()-s):Math.trunc(T()-s),this.analyze("Check Changed:");let c=[],d=[],y=[],l=[];this.state="detect:face",this.config.async?(c=this.config.face.enabled?B5(this,i.tensor):[],this.performance.face&&delete this.performance.face):(s=T(),c=this.config.face.enabled?await B5(this,i.tensor):[],this.performance.face=this.env.perfadd?(this.performance.face||0)+Math.trunc(T()-s):Math.trunc(T()-s)),this.config.async&&(this.config.body.maxDetected===-1||this.config.hand.maxDetected===-1)&&(c=await c),this.analyze("Start Body:"),this.state="detect:body";let m=this.config.body.maxDetected===-1?J(this.config,{body:{maxDetected:this.config.face.enabled?1*c.length:1}}):this.config;this.config.async?((M=this.config.body.modelPath)!=null&&M.includes("posenet")?d=this.config.body.enabled?M5(i.tensor,m):[]:(P=this.config.body.modelPath)!=null&&P.includes("blazepose")?d=this.config.body.enabled?wt(i.tensor,m):[]:(v=this.config.body.modelPath)!=null&&v.includes("efficientpose")?d=this.config.body.enabled?Ot(i.tensor,m):[]:(f=this.config.body.modelPath)!=null&&f.includes("movenet")&&(d=this.config.body.enabled?f5(i.tensor,m):[]),this.performance.body&&delete this.performance.body):(s=T(),(g=this.config.body.modelPath)!=null&&g.includes("posenet")?d=this.config.body.enabled?await M5(i.tensor,m):[]:(S=this.config.body.modelPath)!=null&&S.includes("blazepose")?d=this.config.body.enabled?await wt(i.tensor,m):[]:(E=this.config.body.modelPath)!=null&&E.includes("efficientpose")?d=this.config.body.enabled?await Ot(i.tensor,m):[]:(I=this.config.body.modelPath)!=null&&I.includes("movenet")&&(d=this.config.body.enabled?await f5(i.tensor,m):[]),this.performance.body=this.env.perfadd?(this.performance.body||0)+Math.trunc(T()-s):Math.trunc(T()-s)),this.analyze("End Body:"),this.analyze("Start Hand:"),this.state="detect:hand";let x=this.config.hand.maxDetected===-1?J(this.config,{hand:{maxDetected:this.config.face.enabled?2*c.length:1}}):this.config;this.config.async?((U=(B=this.config.hand.detector)==null?void 0:B.modelPath)!=null&&U.includes("handdetect")?y=this.config.hand.enabled?Qt(i.tensor,x):[]:(H=(F=this.config.hand.detector)==null?void 0:F.modelPath)!=null&&H.includes("handtrack")&&(y=this.config.hand.enabled?t5(i.tensor,x):[]),this.performance.hand&&delete this.performance.hand):(s=T(),(R=(K=this.config.hand.detector)==null?void 0:K.modelPath)!=null&&R.includes("handdetect")?y=this.config.hand.enabled?await Qt(i.tensor,x):[]:(c0=(L=this.config.hand.detector)==null?void 0:L.modelPath)!=null&&c0.includes("handtrack")&&(y=this.config.hand.enabled?await t5(i.tensor,x):[]),this.performance.hand=this.env.perfadd?(this.performance.hand||0)+Math.trunc(T()-s):Math.trunc(T()-s)),this.analyze("End Hand:"),this.analyze("Start Object:"),this.state="detect:object",this.config.async?((X=this.config.object.modelPath)!=null&&X.includes("nanodet")?l=this.config.object.enabled?p5(i.tensor,this.config):[]:(r0=this.config.object.modelPath)!=null&&r0.includes("centernet")&&(l=this.config.object.enabled?St(i.tensor,this.config):[]),this.performance.object&&delete this.performance.object):(s=T(),(e0=this.config.object.modelPath)!=null&&e0.includes("nanodet")?l=this.config.object.enabled?await p5(i.tensor,this.config):[]:(W=this.config.object.modelPath)!=null&&W.includes("centernet")&&(l=this.config.object.enabled?await St(i.tensor,this.config):[]),this.performance.object=this.env.perfadd?(this.performance.object||0)+Math.trunc(T()-s):Math.trunc(T()-s)),this.analyze("End Object:"),this.state="detect:await",this.config.async&&([c,d,y,l]=await Promise.all([c,d,y,l])),this.state="detect:gesture";let p=[];this.config.gesture.enabled&&(s=T(),p=[...Gn(c),...Fn(d),...Hn(y),...Bn(c)],this.config.async?this.performance.gesture&&delete this.performance.gesture:this.performance.gesture=this.env.perfadd?(this.performance.gesture||0)+Math.trunc(T()-s):Math.trunc(T()-s)),this.performance.total=this.env.perfadd?(this.performance.total||0)+Math.trunc(T()-a):Math.trunc(T()-a);let u=((G=this.process.tensor)==null?void 0:G.shape)||[];this.result={face:c,body:d,hand:y,gesture:p,object:l,performance:this.performance,canvas:this.process.canvas,timestamp:Date.now(),error:null,get persons(){return Xn(c,d,y,p,u)}},r.dispose(i.tensor),this.emit("detect"),this.state="idle",o(this.result)})}async sleep(t){return new Promise(n=>{setTimeout(n,t)})}async video(t,n=!0,o=0){n?(V0(this,me)[t.id]||(this.config.debug&&b("video start",t.id),V0(this,me)[t.id]=!0),!t.paused&&V0(this,me)[t.id]&&t.readyState>=2&&await this.detect(t),o>0&&await this.sleep(o),V0(this,me)[t.id]&&requestAnimationFrame(()=>this.video(t,n,o))):(this.config.debug&&b("video stop",t.id),V0(this,me)[t.id]=!1)}};Je=new WeakMap,f2=new WeakMap,m2=new WeakMap,at=new WeakMap,me=new WeakMap;export{M2 as Env,Un as Human,Un as default,pe as defaults,Cn as draw,w as env,Zn as match,d2 as models}; diff --git a/dist/human.esm.js b/dist/human.esm.js index 44f09525c..95c3fd190 100644 --- a/dist/human.esm.js +++ b/dist/human.esm.js @@ -6,6 +6,13 @@ var __defProp = Object.defineProperty; var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; +var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { + get: (a, b) => (typeof require !== "undefined" ? require : a)[b] +}) : x)(function(x) { + if (typeof require !== "undefined") + return require.apply(this, arguments); + throw new Error('Dynamic require of "' + x + '" is not supported'); +}); var __export = (target, all6) => { for (var name in all6) __defProp(target, name, { get: all6[name], enumerable: true }); @@ -367,6 +374,7 @@ __export(tfjs_esm_exports, { Prod: () => Prod, RMSPropOptimizer: () => RMSPropOptimizer, RNN: () => RNN, + RaggedGather: () => RaggedGather, RaggedTensorToTensor: () => RaggedTensorToTensor, Range: () => Range, Rank: () => Rank, @@ -614,6 +622,7 @@ __export(tfjs_esm_exports, { print: () => print, prod: () => prod, profile: () => profile, + raggedGather: () => raggedGather, raggedTensorToTensor: () => raggedTensorToTensor, rand: () => rand, randomGamma: () => randomGamma, @@ -716,7 +725,7 @@ __export(tfjs_esm_exports, { valueAndGrads: () => valueAndGrads, variable: () => variable, variableGrads: () => variableGrads, - version: () => version82, + version: () => V, version_converter: () => version3, version_core: () => version, version_layers: () => version2, @@ -736,7 +745,14 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; -var __commonJS = (cb, mod4) => function __require() { +var __require2 = ((x) => typeof __require !== "undefined" ? __require : typeof Proxy !== "undefined" ? new Proxy(x, { + get: (a, b) => (typeof __require !== "undefined" ? __require : a)[b] +}) : x)(function(x) { + if (typeof __require !== "undefined") + return __require.apply(this, arguments); + throw new Error('Dynamic require of "' + x + '" is not supported'); +}); +var __commonJS = (cb, mod4) => function __require22() { return mod4 || (0, cb[__getOwnPropNames(cb)[0]])((mod4 = { exports: {} }).exports, mod4), mod4.exports; }; var __export2 = (target, all52) => { @@ -1048,7 +1064,7 @@ var require_long = __commonJS({ 167, 11 ])), {}).exports; - } catch (e) { + } catch (e2) { } function Long2(low, high, unsigned) { this.low = low | 0; @@ -1135,8 +1151,8 @@ var require_long = __commonJS({ } var radixToPower = fromNumber(pow_dbl(radix, 8)); var result = ZERO; - for (var i = 0; i < str.length; i += 8) { - var size2 = Math.min(8, str.length - i), value = parseInt(str.substring(i, i + size2), radix); + for (var i2 = 0; i2 < str.length; i2 += 8) { + var size2 = Math.min(8, str.length - i2), value = parseInt(str.substring(i2, i2 + size2), radix); if (size2 < 8) { var power = fromNumber(pow_dbl(radix, size2)); result = result.mul(power).add(fromNumber(value)); @@ -1615,10 +1631,10 @@ var require_alea = __commonJS({ function Alea(seed) { var me = this, mash = Mash(); me.next = function() { - var t2 = 2091639 * me.s0 + me.c * 23283064365386963e-26; + var t22 = 2091639 * me.s0 + me.c * 23283064365386963e-26; me.s0 = me.s1; me.s1 = me.s2; - return me.s2 = t2 - (me.c = t2 | 0); + return me.s2 = t22 - (me.c = t22 | 0); }; me.c = 1; me.s0 = mash(" "); @@ -1638,12 +1654,12 @@ var require_alea = __commonJS({ } mash = null; } - function copy2(f, t2) { - t2.c = f.c; - t2.s0 = f.s0; - t2.s1 = f.s1; - t2.s2 = f.s2; - return t2; + function copy2(f, t22) { + t22.c = f.c; + t22.s0 = f.s0; + t22.s1 = f.s1; + t22.s2 = f.s2; + return t22; } function impl(seed, opts) { var xg = new Alea(seed), state = opts && opts.state, prng = xg.next; @@ -1664,20 +1680,20 @@ var require_alea = __commonJS({ return prng; } function Mash() { - var n = 4022871197; + var n2 = 4022871197; var mash = function(data) { data = String(data); - for (var i = 0; i < data.length; i++) { - n += data.charCodeAt(i); - var h = 0.02519603282416938 * n; - n = h >>> 0; - h -= n; - h *= n; - n = h >>> 0; - h -= n; - n += h * 4294967296; + for (var i2 = 0; i2 < data.length; i2++) { + n2 += data.charCodeAt(i2); + var h = 0.02519603282416938 * n2; + n2 = h >>> 0; + h -= n2; + h *= n2; + n2 = h >>> 0; + h -= n2; + n2 += h * 4294967296; } - return (n >>> 0) * 23283064365386963e-26; + return (n2 >>> 0) * 23283064365386963e-26; }; return mash; } @@ -1707,11 +1723,11 @@ var require_xor128 = __commonJS({ me.z = 0; me.w = 0; me.next = function() { - var t2 = me.x ^ me.x << 11; + var t22 = me.x ^ me.x << 11; me.x = me.y; me.y = me.z; me.z = me.w; - return me.w ^= me.w >>> 19 ^ t2 ^ t2 >>> 8; + return me.w ^= me.w >>> 19 ^ t22 ^ t22 >>> 8; }; if (seed === (seed | 0)) { me.x = seed; @@ -1723,12 +1739,12 @@ var require_xor128 = __commonJS({ me.next(); } } - function copy2(f, t2) { - t2.x = f.x; - t2.y = f.y; - t2.z = f.z; - t2.w = f.w; - return t2; + function copy2(f, t22) { + t22.x = f.x; + t22.y = f.y; + t22.z = f.z; + t22.w = f.w; + return t22; } function impl(seed, opts) { var xg = new XorGen(seed), state = opts && opts.state, prng = function() { @@ -1773,12 +1789,12 @@ var require_xorwow = __commonJS({ function XorGen(seed) { var me = this, strseed = ""; me.next = function() { - var t2 = me.x ^ me.x >>> 2; + var t22 = me.x ^ me.x >>> 2; me.x = me.y; me.y = me.z; me.z = me.w; me.w = me.v; - return (me.d = me.d + 362437 | 0) + (me.v = me.v ^ me.v << 4 ^ (t2 ^ t2 << 1)) | 0; + return (me.d = me.d + 362437 | 0) + (me.v = me.v ^ me.v << 4 ^ (t22 ^ t22 << 1)) | 0; }; me.x = 0; me.y = 0; @@ -1798,14 +1814,14 @@ var require_xorwow = __commonJS({ me.next(); } } - function copy2(f, t2) { - t2.x = f.x; - t2.y = f.y; - t2.z = f.z; - t2.w = f.w; - t2.v = f.v; - t2.d = f.d; - return t2; + function copy2(f, t22) { + t22.x = f.x; + t22.y = f.y; + t22.z = f.z; + t22.w = f.w; + t22.v = f.v; + t22.d = f.d; + return t22; } function impl(seed, opts) { var xg = new XorGen(seed), state = opts && opts.state, prng = function() { @@ -1850,21 +1866,21 @@ var require_xorshift7 = __commonJS({ function XorGen(seed) { var me = this; me.next = function() { - var X = me.x, i = me.i, t2, v, w; - t2 = X[i]; - t2 ^= t2 >>> 7; - v = t2 ^ t2 << 24; - t2 = X[i + 1 & 7]; - v ^= t2 ^ t2 >>> 10; - t2 = X[i + 3 & 7]; - v ^= t2 ^ t2 >>> 3; - t2 = X[i + 4 & 7]; - v ^= t2 ^ t2 << 7; - t2 = X[i + 7 & 7]; - t2 = t2 ^ t2 << 13; - v ^= t2 ^ t2 << 9; - X[i] = v; - me.i = i + 1 & 7; + var X = me.x, i2 = me.i, t22, v, w; + t22 = X[i2]; + t22 ^= t22 >>> 7; + v = t22 ^ t22 << 24; + t22 = X[i2 + 1 & 7]; + v ^= t22 ^ t22 >>> 10; + t22 = X[i2 + 3 & 7]; + v ^= t22 ^ t22 >>> 3; + t22 = X[i2 + 4 & 7]; + v ^= t22 ^ t22 << 7; + t22 = X[i2 + 7 & 7]; + t22 = t22 ^ t22 << 13; + v ^= t22 ^ t22 << 9; + X[i2] = v; + me.i = i2 + 1 & 7; return v; }; function init22(me2, seed2) { @@ -1893,10 +1909,10 @@ var require_xorshift7 = __commonJS({ } init22(me, seed); } - function copy2(f, t2) { - t2.x = f.x.slice(); - t2.i = f.i; - return t2; + function copy2(f, t22) { + t22.x = f.x.slice(); + t22.i = f.i; + return t22; } function impl(seed, opts) { if (seed == null) @@ -1943,20 +1959,20 @@ var require_xor4096 = __commonJS({ function XorGen(seed) { var me = this; me.next = function() { - var w = me.w, X = me.X, i = me.i, t2, v; + var w = me.w, X = me.X, i2 = me.i, t22, v; me.w = w = w + 1640531527 | 0; - v = X[i + 34 & 127]; - t2 = X[i = i + 1 & 127]; + v = X[i2 + 34 & 127]; + t22 = X[i2 = i2 + 1 & 127]; v ^= v << 13; - t2 ^= t2 << 17; + t22 ^= t22 << 17; v ^= v >>> 15; - t2 ^= t2 >>> 12; - v = X[i] = v ^ t2; - me.i = i; + t22 ^= t22 >>> 12; + v = X[i2] = v ^ t22; + me.i = i2; return v + (w ^ w >>> 16) | 0; }; function init22(me2, seed2) { - var t2, v, i, j, w, X = [], limit = 128; + var t22, v, i2, j, w, X = [], limit = 128; if (seed2 === (seed2 | 0)) { v = seed2; seed2 = null; @@ -1965,7 +1981,7 @@ var require_xor4096 = __commonJS({ v = 0; limit = Math.max(limit, seed2.length); } - for (i = 0, j = -32; j < limit; ++j) { + for (i2 = 0, j = -32; j < limit; ++j) { if (seed2) v ^= seed2.charCodeAt((j + 32) % seed2.length); if (j === 0) @@ -1976,34 +1992,34 @@ var require_xor4096 = __commonJS({ v ^= v >>> 13; if (j >= 0) { w = w + 1640531527 | 0; - t2 = X[j & 127] ^= v + w; - i = 0 == t2 ? i + 1 : 0; + t22 = X[j & 127] ^= v + w; + i2 = 0 == t22 ? i2 + 1 : 0; } } - if (i >= 128) { + if (i2 >= 128) { X[(seed2 && seed2.length || 0) & 127] = -1; } - i = 127; + i2 = 127; for (j = 4 * 128; j > 0; --j) { - v = X[i + 34 & 127]; - t2 = X[i = i + 1 & 127]; + v = X[i2 + 34 & 127]; + t22 = X[i2 = i2 + 1 & 127]; v ^= v << 13; - t2 ^= t2 << 17; + t22 ^= t22 << 17; v ^= v >>> 15; - t2 ^= t2 >>> 12; - X[i] = v ^ t2; + t22 ^= t22 >>> 12; + X[i2] = v ^ t22; } me2.w = w; me2.X = X; - me2.i = i; + me2.i = i2; } init22(me, seed); } - function copy2(f, t2) { - t2.i = f.i; - t2.w = f.w; - t2.X = f.X.slice(); - return t2; + function copy2(f, t22) { + t22.i = f.i; + t22.w = f.w; + t22.X = f.X.slice(); + return t22; } ; function impl(seed, opts) { @@ -2076,12 +2092,12 @@ var require_tychei = __commonJS({ me.next(); } } - function copy2(f, t2) { - t2.a = f.a; - t2.b = f.b; - t2.c = f.c; - t2.d = f.d; - return t2; + function copy2(f, t22) { + t22.a = f.a; + t22.b = f.b; + t22.c = f.c; + t22.d = f.d; + return t22; } ; function impl(seed, opts) { @@ -2138,18 +2154,18 @@ var require_seedrandom = __commonJS({ ), key); var arc4 = new ARC4(key); var prng = function() { - var n = arc4.g(chunks), d = startdenom, x = 0; - while (n < significance) { - n = (n + x) * width; + var n2 = arc4.g(chunks), d = startdenom, x = 0; + while (n2 < significance) { + n2 = (n2 + x) * width; d *= width; x = arc4.g(1); } - while (n >= overflow) { - n /= 2; + while (n2 >= overflow) { + n2 /= 2; d /= 2; x >>>= 1; } - return (n + x) / d; + return (n2 + x) / d; }; prng.int32 = function() { return arc4.g(4) | 0; @@ -2181,33 +2197,33 @@ var require_seedrandom = __commonJS({ ); } function ARC4(key) { - var t2, keylen = key.length, me = this, i = 0, j = me.i = me.j = 0, s = me.S = []; + var t22, keylen = key.length, me = this, i2 = 0, j = me.i = me.j = 0, s2 = me.S = []; if (!keylen) { key = [keylen++]; } - while (i < width) { - s[i] = i++; + while (i2 < width) { + s2[i2] = i2++; } - for (i = 0; i < width; i++) { - s[i] = s[j = mask2 & j + key[i % keylen] + (t2 = s[i])]; - s[j] = t2; + for (i2 = 0; i2 < width; i2++) { + s2[i2] = s2[j = mask2 & j + key[i2 % keylen] + (t22 = s2[i2])]; + s2[j] = t22; } (me.g = function(count22) { - var t22, r = 0, i2 = me.i, j2 = me.j, s2 = me.S; + var t3, r2 = 0, i3 = me.i, j2 = me.j, s3 = me.S; while (count22--) { - t22 = s2[i2 = mask2 & i2 + 1]; - r = r * width + s2[mask2 & (s2[i2] = s2[j2 = mask2 & j2 + t22]) + (s2[j2] = t22)]; + t3 = s3[i3 = mask2 & i3 + 1]; + r2 = r2 * width + s3[mask2 & (s3[i3] = s3[j2 = mask2 & j2 + t3]) + (s3[j2] = t3)]; } - me.i = i2; + me.i = i3; me.j = j2; - return r; + return r2; })(width); } - function copy2(f, t2) { - t2.i = f.i; - t2.j = f.j; - t2.S = f.S.slice(); - return t2; + function copy2(f, t22) { + t22.i = f.i; + t22.j = f.j; + t22.S = f.S.slice(); + return t22; } ; function flatten4(obj, depth) { @@ -2216,7 +2232,7 @@ var require_seedrandom = __commonJS({ for (prop in obj) { try { result.push(flatten4(obj[prop], depth - 1)); - } catch (e) { + } catch (e2) { } } } @@ -2239,7 +2255,7 @@ var require_seedrandom = __commonJS({ (global2.crypto || global2.msCrypto).getRandomValues(out); } return tostring(out); - } catch (e) { + } catch (e2) { var browser = global2.navigator, plugins = browser && browser.plugins; return [+new Date(), global2, plugins, global2.screen, tostring(pool3)]; } @@ -2311,7 +2327,7 @@ var require_os = __commonJS({ } }); var require_tfjs_backend_wasm_threaded_simd = __commonJS({ - "node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm-threaded-simd.js"(exports, module) { + "node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm-threaded-simd.js"(exports, module) { var WasmBackendModuleThreadedSimd2 = (() => { var _scriptDir = typeof document !== "undefined" && document.currentScript ? document.currentScript.src : void 0; if (typeof __filename !== "undefined") @@ -2336,17 +2352,17 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ } return HEAP16; } - function GROWABLE_HEAP_U16() { + function GROWABLE_HEAP_I32() { if (wasmMemory.buffer != buffer2) { updateGlobalBufferAndViews(wasmMemory.buffer); } - return HEAPU16; + return HEAP32; } - function GROWABLE_HEAP_I32() { + function GROWABLE_HEAP_U32() { if (wasmMemory.buffer != buffer2) { updateGlobalBufferAndViews(wasmMemory.buffer); } - return HEAP32; + return HEAPU32; } function GROWABLE_HEAP_F32() { if (wasmMemory.buffer != buffer2) { @@ -2360,7 +2376,7 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ } return HEAPF64; } - var Module = typeof WasmBackendModuleThreadedSimd3 !== "undefined" ? WasmBackendModuleThreadedSimd3 : {}; + var Module = typeof WasmBackendModuleThreadedSimd3 != "undefined" ? WasmBackendModuleThreadedSimd3 : {}; var readyPromiseResolve, readyPromiseReject; Module["ready"] = new Promise(function(resolve, reject) { readyPromiseResolve = resolve; @@ -2376,9 +2392,9 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ var quit_ = (status, toThrow) => { throw toThrow; }; - var ENVIRONMENT_IS_WEB = typeof window === "object"; - var ENVIRONMENT_IS_WORKER = typeof importScripts === "function"; - var ENVIRONMENT_IS_NODE = typeof process === "object" && typeof process.versions === "object" && typeof process.versions.node === "string"; + var ENVIRONMENT_IS_WEB = typeof window == "object"; + var ENVIRONMENT_IS_WORKER = typeof importScripts == "function"; + var ENVIRONMENT_IS_NODE = typeof process == "object" && typeof process.versions == "object" && typeof process.versions.node == "string"; var ENVIRONMENT_IS_PTHREAD = Module["ENVIRONMENT_IS_PTHREAD"] || false; var scriptDirectory = ""; function locateFile(path) { @@ -2388,29 +2404,24 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ return scriptDirectory + path; } var read_, readAsync, readBinary, setWindowTitle; - function logExceptionOnExit(e) { - if (e instanceof ExitStatus) + function logExceptionOnExit(e2) { + if (e2 instanceof ExitStatus) return; - let toLog = e; + let toLog = e2; err("exiting due to exception: " + toLog); } - var fs; - var nodePath; - var requireNodeFS; if (ENVIRONMENT_IS_NODE) { if (ENVIRONMENT_IS_WORKER) { scriptDirectory = require_path().dirname(scriptDirectory) + "/"; } else { scriptDirectory = __dirname + "/"; } - requireNodeFS = () => { - if (!nodePath) { - fs = require_fs(); - nodePath = require_path(); - } - }; - read_ = function shell_read(filename, binary) { - requireNodeFS(); + var fs, nodePath; + if (typeof __require2 === "function") { + fs = require_fs(); + nodePath = require_path(); + } + read_ = (filename, binary) => { filename = nodePath["normalize"](filename); return fs.readFileSync(filename, binary ? void 0 : "utf8"); }; @@ -2422,7 +2433,6 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ return ret; }; readAsync = (filename, onload, onerror) => { - requireNodeFS(); filename = nodePath["normalize"](filename); fs.readFile(filename, function(err2, data) { if (err2) @@ -2457,15 +2467,15 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ let nodeWorkerThreads; try { nodeWorkerThreads = require_worker_threads(); - } catch (e) { + } catch (e2) { console.error('The "worker_threads" module is not supported in this node.js build - perhaps a newer version is needed?'); - throw e; + throw e2; } global.Worker = nodeWorkerThreads.Worker; } else if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) { if (ENVIRONMENT_IS_WORKER) { scriptDirectory = self.location.href; - } else if (typeof document !== "undefined" && document.currentScript) { + } else if (typeof document != "undefined" && document.currentScript) { scriptDirectory = document.currentScript.src; } if (typeof _scriptDir !== "undefined" && _scriptDir) { @@ -2511,14 +2521,13 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ } else { } if (ENVIRONMENT_IS_NODE) { - if (typeof performance === "undefined") { + if (typeof performance == "undefined") { global.performance = require_perf_hooks().performance; } } var defaultPrint = console.log.bind(console); var defaultPrintErr = console.warn.bind(console); if (ENVIRONMENT_IS_NODE) { - requireNodeFS(); defaultPrint = (str) => fs.writeSync(1, str + "\n"); defaultPrintErr = (str) => fs.writeSync(2, str + "\n"); } @@ -2533,71 +2542,6 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ if (Module["quit"]) quit_ = Module["quit"]; var POINTER_SIZE = 4; - function warnOnce(text) { - if (!warnOnce.shown) - warnOnce.shown = {}; - if (!warnOnce.shown[text]) { - warnOnce.shown[text] = 1; - err(text); - } - } - function convertJsFunctionToWasm(func2, sig) { - if (typeof WebAssembly.Function === "function") { - var typeNames = { "i": "i32", "j": "i64", "f": "f32", "d": "f64" }; - var type = { parameters: [], results: sig[0] == "v" ? [] : [typeNames[sig[0]]] }; - for (var i = 1; i < sig.length; ++i) { - type.parameters.push(typeNames[sig[i]]); - } - return new WebAssembly.Function(type, func2); - } - var typeSection = [1, 0, 1, 96]; - var sigRet = sig.slice(0, 1); - var sigParam = sig.slice(1); - var typeCodes = { "i": 127, "j": 126, "f": 125, "d": 124 }; - typeSection.push(sigParam.length); - for (var i = 0; i < sigParam.length; ++i) { - typeSection.push(typeCodes[sigParam[i]]); - } - if (sigRet == "v") { - typeSection.push(0); - } else { - typeSection = typeSection.concat([1, typeCodes[sigRet]]); - } - typeSection[1] = typeSection.length - 2; - var bytes = new Uint8Array([0, 97, 115, 109, 1, 0, 0, 0].concat(typeSection, [2, 7, 1, 1, 101, 1, 102, 0, 0, 7, 5, 1, 1, 102, 0, 0])); - var module2 = new WebAssembly.Module(bytes); - var instance2 = new WebAssembly.Instance(module2, { "e": { "f": func2 } }); - var wrappedFunc = instance2.exports["f"]; - return wrappedFunc; - } - var freeTableIndexes = []; - var functionsInTableMap; - function getEmptyTableSlot() { - if (freeTableIndexes.length) { - return freeTableIndexes.pop(); - } - try { - wasmTable.grow(1); - } catch (err2) { - if (!(err2 instanceof RangeError)) { - throw err2; - } - throw "Unable to grow wasm table. Set ALLOW_TABLE_GROWTH."; - } - return wasmTable.length - 1; - } - function updateTableMap(offset, count22) { - for (var i = offset; i < offset + count22; i++) { - var item = getWasmTableEntry(i); - if (item) { - functionsInTableMap.set(item, i); - } - } - } - var tempRet0 = 0; - var setTempRet0 = (value) => { - tempRet0 = value; - }; var Atomics_load = Atomics.load; var Atomics_store = Atomics.store; var Atomics_compareExchange = Atomics.compareExchange; @@ -2605,7 +2549,7 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ if (Module["wasmBinary"]) wasmBinary = Module["wasmBinary"]; var noExitRuntime = Module["noExitRuntime"] || true; - if (typeof WebAssembly !== "object") { + if (typeof WebAssembly != "object") { abort("no native wasm support detected"); } var wasmMemory; @@ -2617,111 +2561,38 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ abort(text); } } - function getCFunc(ident) { - var func2 = Module["_" + ident]; - return func2; - } - function ccall(ident, returnType, argTypes, args, opts) { - var toC = { "string": function(str) { - var ret2 = 0; - if (str !== null && str !== void 0 && str !== 0) { - var len = (str.length << 2) + 1; - ret2 = stackAlloc(len); - stringToUTF8(str, ret2, len); - } - return ret2; - }, "array": function(arr) { - var ret2 = stackAlloc(arr.length); - writeArrayToMemory(arr, ret2); - return ret2; - } }; - function convertReturnValue(ret2) { - if (returnType === "string") - return UTF8ToString(ret2); - if (returnType === "boolean") - return Boolean(ret2); - return ret2; - } - var func2 = getCFunc(ident); - var cArgs = []; - var stack2 = 0; - if (args) { - for (var i = 0; i < args.length; i++) { - var converter = toC[argTypes[i]]; - if (converter) { - if (stack2 === 0) - stack2 = stackSave(); - cArgs[i] = converter(args[i]); - } else { - cArgs[i] = args[i]; - } - } - } - var ret = func2.apply(null, cArgs); - function onDone(ret2) { - if (stack2 !== 0) - stackRestore(stack2); - return convertReturnValue(ret2); - } - ret = onDone(ret); - return ret; - } - function cwrap(ident, returnType, argTypes, opts) { - argTypes = argTypes || []; - var numericArgs = argTypes.every(function(type) { - return type === "number"; - }); - var numericRet = returnType !== "string"; - if (numericRet && numericArgs && !opts) { - return getCFunc(ident); - } - return function() { - return ccall(ident, returnType, argTypes, arguments, opts); - }; - } - var ALLOC_STACK = 1; - function TextDecoderWrapper(encoding) { - var textDecoder = new TextDecoder(encoding); - this.decode = (data) => { - if (data.buffer instanceof SharedArrayBuffer) { - data = new Uint8Array(data); - } - return textDecoder.decode.call(textDecoder, data); - }; - } - var UTF8Decoder = typeof TextDecoder !== "undefined" ? new TextDecoderWrapper("utf8") : void 0; - function UTF8ArrayToString(heap, idx, maxBytesToRead) { + var UTF8Decoder = typeof TextDecoder != "undefined" ? new TextDecoder("utf8") : void 0; + function UTF8ArrayToString(heapOrArray, idx, maxBytesToRead) { var endIdx = idx + maxBytesToRead; var endPtr = idx; - while (heap[endPtr] && !(endPtr >= endIdx)) + while (heapOrArray[endPtr] && !(endPtr >= endIdx)) ++endPtr; - if (endPtr - idx > 16 && heap.subarray && UTF8Decoder) { - return UTF8Decoder.decode(heap.subarray(idx, endPtr)); - } else { - var str = ""; - while (idx < endPtr) { - var u0 = heap[idx++]; - if (!(u0 & 128)) { - str += String.fromCharCode(u0); - continue; - } - var u1 = heap[idx++] & 63; - if ((u0 & 224) == 192) { - str += String.fromCharCode((u0 & 31) << 6 | u1); - continue; - } - var u2 = heap[idx++] & 63; - if ((u0 & 240) == 224) { - u0 = (u0 & 15) << 12 | u1 << 6 | u2; - } else { - u0 = (u0 & 7) << 18 | u1 << 12 | u2 << 6 | heap[idx++] & 63; - } - if (u0 < 65536) { - str += String.fromCharCode(u0); - } else { - var ch = u0 - 65536; - str += String.fromCharCode(55296 | ch >> 10, 56320 | ch & 1023); - } + if (endPtr - idx > 16 && heapOrArray.buffer && UTF8Decoder) { + return UTF8Decoder.decode(heapOrArray.buffer instanceof SharedArrayBuffer ? heapOrArray.slice(idx, endPtr) : heapOrArray.subarray(idx, endPtr)); + } + var str = ""; + while (idx < endPtr) { + var u0 = heapOrArray[idx++]; + if (!(u0 & 128)) { + str += String.fromCharCode(u0); + continue; + } + var u1 = heapOrArray[idx++] & 63; + if ((u0 & 224) == 192) { + str += String.fromCharCode((u0 & 31) << 6 | u1); + continue; + } + var u2 = heapOrArray[idx++] & 63; + if ((u0 & 240) == 224) { + u0 = (u0 & 15) << 12 | u1 << 6 | u2; + } else { + u0 = (u0 & 7) << 18 | u1 << 12 | u2 << 6 | heapOrArray[idx++] & 63; + } + if (u0 < 65536) { + str += String.fromCharCode(u0); + } else { + var ch = u0 - 65536; + str += String.fromCharCode(55296 | ch >> 10, 56320 | ch & 1023); } } return str; @@ -2734,10 +2605,10 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ return 0; var startIdx = outIdx; var endIdx = outIdx + maxBytesToWrite - 1; - for (var i = 0; i < str.length; ++i) { - var u = str.charCodeAt(i); + for (var i2 = 0; i2 < str.length; ++i2) { + var u = str.charCodeAt(i2); if (u >= 55296 && u <= 57343) { - var u1 = str.charCodeAt(++i); + var u1 = str.charCodeAt(++i2); u = 65536 + ((u & 1023) << 10) | u1 & 1023; } if (u <= 127) { @@ -2770,40 +2641,6 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ function stringToUTF8(str, outPtr, maxBytesToWrite) { return stringToUTF8Array(str, GROWABLE_HEAP_U8(), outPtr, maxBytesToWrite); } - function lengthBytesUTF8(str) { - var len = 0; - for (var i = 0; i < str.length; ++i) { - var u = str.charCodeAt(i); - if (u >= 55296 && u <= 57343) - u = 65536 + ((u & 1023) << 10) | str.charCodeAt(++i) & 1023; - if (u <= 127) - ++len; - else if (u <= 2047) - len += 2; - else if (u <= 65535) - len += 3; - else - len += 4; - } - return len; - } - var UTF16Decoder = typeof TextDecoder !== "undefined" ? new TextDecoderWrapper("utf-16le") : void 0; - function writeArrayToMemory(array2, buffer3) { - GROWABLE_HEAP_I8().set(array2, buffer3); - } - function writeAsciiToMemory(str, buffer3, dontAddNull) { - for (var i = 0; i < str.length; ++i) { - GROWABLE_HEAP_I8()[buffer3++ >> 0] = str.charCodeAt(i); - } - if (!dontAddNull) - GROWABLE_HEAP_I8()[buffer3 >> 0] = 0; - } - function alignUp(x, multiple) { - if (x % multiple > 0) { - x += multiple - x % multiple; - } - return x; - } var buffer2, HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32, HEAPF32, HEAPF64; if (ENVIRONMENT_IS_PTHREAD) { buffer2 = Module["buffer"]; @@ -2845,13 +2682,10 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ var wasmTable; var __ATPRERUN__ = []; var __ATINIT__ = []; - var __ATEXIT__ = []; var __ATPOSTRUN__ = []; var runtimeInitialized = false; - var runtimeExited = false; - var runtimeKeepaliveCounter = 0; function keepRuntimeAlive() { - return noExitRuntime || runtimeKeepaliveCounter > 0; + return noExitRuntime; } function preRun() { if (Module["preRun"]) { @@ -2869,12 +2703,6 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ return; callRuntimeCallbacks(__ATINIT__); } - function exitRuntime() { - if (ENVIRONMENT_IS_PTHREAD) - return; - PThread.terminateAllThreads(); - runtimeExited = true; - } function postRun() { if (ENVIRONMENT_IS_PTHREAD) return; @@ -2922,8 +2750,6 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ } } } - Module["preloadedImages"] = {}; - Module["preloadedAudios"] = {}; function abort(what) { if (ENVIRONMENT_IS_PTHREAD) { postMessage({ "cmd": "onAbort", "arg": what }); @@ -2936,10 +2762,10 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ err(what); ABORT = true; EXITSTATUS = 1; - what += ". Build with -s ASSERTIONS=1 for more info."; - var e = new WebAssembly.RuntimeError(what); - readyPromiseReject(e); - throw e; + what += ". Build with -sASSERTIONS for more info."; + var e2 = new WebAssembly.RuntimeError(what); + readyPromiseReject(e2); + throw e2; } var dataURIPrefix = "data:application/octet-stream;base64,"; function isDataURI(filename) { @@ -2960,16 +2786,15 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ } if (readBinary) { return readBinary(file); - } else { - throw "both async and sync fetching of the wasm failed"; } + throw "both async and sync fetching of the wasm failed"; } catch (err2) { abort(err2); } } function getBinaryPromise() { if (!wasmBinary && (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER)) { - if (typeof fetch === "function" && !isFileURI(wasmBinaryFile)) { + if (typeof fetch == "function" && !isFileURI(wasmBinaryFile)) { return fetch(wasmBinaryFile, { credentials: "same-origin" }).then(function(response) { if (!response["ok"]) { throw "failed to load wasm binary file at '" + wasmBinaryFile + "'"; @@ -2997,7 +2822,7 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ function receiveInstance(instance2, module2) { var exports3 = instance2.exports; Module["asm"] = exports3; - registerTlsInit(Module["asm"]["emscripten_tls_init"]); + registerTLSInit(Module["asm"]["_emscripten_tls_init"]); wasmTable = Module["asm"]["__indirect_function_table"]; addOnInit(Module["asm"]["__wasm_call_ctors"]); wasmModule = module2; @@ -3028,7 +2853,7 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ }); } function instantiateAsync() { - if (!wasmBinary && typeof WebAssembly.instantiateStreaming === "function" && !isDataURI(wasmBinaryFile) && !isFileURI(wasmBinaryFile) && typeof fetch === "function") { + if (!wasmBinary && typeof WebAssembly.instantiateStreaming == "function" && !isDataURI(wasmBinaryFile) && !isFileURI(wasmBinaryFile) && !ENVIRONMENT_IS_NODE && typeof fetch == "function") { return fetch(wasmBinaryFile, { credentials: "same-origin" }).then(function(response) { var result = WebAssembly.instantiateStreaming(response, info); return result.then(receiveInstantiationResult, function(reason) { @@ -3045,9 +2870,9 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ try { var exports2 = Module["instantiateWasm"](info, receiveInstance); return exports2; - } catch (e) { - err("Module.instantiateWasm callback failed with error: " + e); - return false; + } catch (e2) { + err("Module.instantiateWasm callback failed with error: " + e2); + readyPromiseReject(e2); } } instantiateAsync().catch(readyPromiseReject); @@ -3056,72 +2881,86 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ var tempDouble; var tempI64; var ASM_CONSTS = {}; - function callRuntimeCallbacks(callbacks2) { - while (callbacks2.length > 0) { - var callback = callbacks2.shift(); - if (typeof callback == "function") { - callback(Module); - continue; - } - var func2 = callback.func; - if (typeof func2 === "number") { - if (callback.arg === void 0) { - getWasmTableEntry(func2)(); - } else { - getWasmTableEntry(func2)(callback.arg); - } - } else { - func2(callback.arg === void 0 ? null : callback.arg); - } - } - } - function withStackSave(f) { - var stack2 = stackSave(); - var ret = f(); - stackRestore(stack2); - return ret; - } - function demangle(func2) { - return func2; - } - function demangleAll(text) { - var regex = /\b_Z[\w\d_]+/g; - return text.replace(regex, function(x) { - var y = demangle(x); - return x === y ? x : y + " [" + x + "]"; - }); + function ExitStatus(status) { + this.name = "ExitStatus"; + this.message = "Program terminated with exit(" + status + ")"; + this.status = status; } function killThread(pthread_ptr) { - GROWABLE_HEAP_I32()[pthread_ptr >> 2] = 0; - var pthread = PThread.pthreads[pthread_ptr]; + var worker = PThread.pthreads[pthread_ptr]; delete PThread.pthreads[pthread_ptr]; - pthread.worker.terminate(); + worker.terminate(); __emscripten_thread_free_data(pthread_ptr); - PThread.runningWorkers.splice(PThread.runningWorkers.indexOf(pthread.worker), 1); - pthread.worker.pthread = void 0; + PThread.runningWorkers.splice(PThread.runningWorkers.indexOf(worker), 1); + worker.pthread_ptr = 0; } function cancelThread(pthread_ptr) { - var pthread = PThread.pthreads[pthread_ptr]; - pthread.worker.postMessage({ "cmd": "cancel" }); + var worker = PThread.pthreads[pthread_ptr]; + worker.postMessage({ "cmd": "cancel" }); } function cleanupThread(pthread_ptr) { - var pthread = PThread.pthreads[pthread_ptr]; - if (pthread) { - GROWABLE_HEAP_I32()[pthread_ptr >> 2] = 0; - var worker = pthread.worker; - PThread.returnWorkerToPool(worker); + var worker = PThread.pthreads[pthread_ptr]; + assert3(worker); + PThread.returnWorkerToPool(worker); + } + function spawnThread(threadParams) { + var worker = PThread.getNewWorker(); + if (!worker) { + return 6; } + PThread.runningWorkers.push(worker); + PThread.pthreads[threadParams.pthread_ptr] = worker; + worker.pthread_ptr = threadParams.pthread_ptr; + var msg = { "cmd": "run", "start_routine": threadParams.startRoutine, "arg": threadParams.arg, "pthread_ptr": threadParams.pthread_ptr }; + worker.runPthread = () => { + msg.time = performance.now(); + worker.postMessage(msg, threadParams.transferList); + }; + if (worker.loaded) { + worker.runPthread(); + delete worker.runPthread; + } + return 0; } - function _exit(status) { - exit(status); + var SYSCALLS = { varargs: void 0, get: function() { + SYSCALLS.varargs += 4; + var ret = GROWABLE_HEAP_I32()[SYSCALLS.varargs - 4 >> 2]; + return ret; + }, getStr: function(ptr) { + var ret = UTF8ToString(ptr); + return ret; + } }; + function _proc_exit(code) { + if (ENVIRONMENT_IS_PTHREAD) + return _emscripten_proxy_to_main_thread_js(1, 1, code); + EXITSTATUS = code; + if (!keepRuntimeAlive()) { + PThread.terminateAllThreads(); + if (Module["onExit"]) + Module["onExit"](code); + ABORT = true; + } + quit_(code, new ExitStatus(code)); } - function handleException(e) { - if (e instanceof ExitStatus || e == "unwind") { + function exitJS(status, implicit) { + EXITSTATUS = status; + if (!implicit) { + if (ENVIRONMENT_IS_PTHREAD) { + exitOnMainThread(status); + throw "unwind"; + } else { + } + } + _proc_exit(status); + } + var _exit = exitJS; + function handleException(e2) { + if (e2 instanceof ExitStatus || e2 == "unwind") { return EXITSTATUS; } - quit_(1, e); + quit_(1, e2); } - var PThread = { unusedWorkers: [], runningWorkers: [], tlsInitFunctions: [], init: function() { + var PThread = { unusedWorkers: [], runningWorkers: [], tlsInitFunctions: [], pthreads: {}, init: function() { if (ENVIRONMENT_IS_PTHREAD) { PThread.initWorker(); } else { @@ -3129,63 +2968,49 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ } }, initMainThread: function() { var pthreadPoolSize = 8; - for (var i = 0; i < pthreadPoolSize; ++i) { + while (pthreadPoolSize--) { PThread.allocateUnusedWorker(); } }, initWorker: function() { noExitRuntime = false; - }, pthreads: {}, setExitStatus: function(status) { + }, setExitStatus: function(status) { EXITSTATUS = status; }, terminateAllThreads: function() { - for (var t2 in PThread.pthreads) { - var pthread = PThread.pthreads[t2]; - if (pthread && pthread.worker) { - PThread.returnWorkerToPool(pthread.worker); - } + for (var worker of Object.values(PThread.pthreads)) { + PThread.returnWorkerToPool(worker); } - for (var i = 0; i < PThread.unusedWorkers.length; ++i) { - var worker = PThread.unusedWorkers[i]; + for (var worker of PThread.unusedWorkers) { worker.terminate(); } PThread.unusedWorkers = []; }, returnWorkerToPool: function(worker) { - PThread.runWithoutMainThreadQueuedCalls(function() { - delete PThread.pthreads[worker.pthread.threadInfoStruct]; - PThread.unusedWorkers.push(worker); - PThread.runningWorkers.splice(PThread.runningWorkers.indexOf(worker), 1); - __emscripten_thread_free_data(worker.pthread.threadInfoStruct); - worker.pthread = void 0; - }); - }, runWithoutMainThreadQueuedCalls: function(func2) { - GROWABLE_HEAP_I32()[__emscripten_allow_main_runtime_queued_calls >> 2] = 0; - try { - func2(); - } finally { - GROWABLE_HEAP_I32()[__emscripten_allow_main_runtime_queued_calls >> 2] = 1; - } + var pthread_ptr = worker.pthread_ptr; + delete PThread.pthreads[pthread_ptr]; + PThread.unusedWorkers.push(worker); + PThread.runningWorkers.splice(PThread.runningWorkers.indexOf(worker), 1); + worker.pthread_ptr = 0; + __emscripten_thread_free_data(pthread_ptr); }, receiveObjectTransfer: function(data) { - }, threadInit: function() { - for (var i in PThread.tlsInitFunctions) { - PThread.tlsInitFunctions[i](); - } + }, threadInitTLS: function() { + PThread.tlsInitFunctions.forEach((f) => f()); }, loadWasmModuleToWorker: function(worker, onFinishedLoading) { - worker.onmessage = (e) => { - var d = e["data"]; + worker.onmessage = (e2) => { + var d = e2["data"]; var cmd = d["cmd"]; - if (worker.pthread) - PThread.currentProxiedOperationCallerThread = worker.pthread.threadInfoStruct; + if (worker.pthread_ptr) + PThread.currentProxiedOperationCallerThread = worker.pthread_ptr; if (d["targetThread"] && d["targetThread"] != _pthread_self()) { - var thread = PThread.pthreads[d.targetThread]; - if (thread) { - thread.worker.postMessage(d, d["transferList"]); + var targetWorker = PThread.pthreads[d.targetThread]; + if (targetWorker) { + targetWorker.postMessage(d, d["transferList"]); } else { err('Internal error! Worker sent a message "' + cmd + '" to target pthread ' + d["targetThread"] + ", but that thread no longer exists!"); } PThread.currentProxiedOperationCallerThread = void 0; return; } - if (cmd === "processQueuedMainThreadWork") { - _emscripten_main_thread_process_queued_calls(); + if (cmd === "processProxyingQueue") { + executeNotifiedProxyingQueue(d["queue"]); } else if (cmd === "spawnThread") { spawnThread(d); } else if (cmd === "cleanupThread") { @@ -3214,22 +3039,22 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ if (Module["onAbort"]) { Module["onAbort"](d["arg"]); } - } else { + } else if (cmd) { err("worker sent an unknown command " + cmd); } PThread.currentProxiedOperationCallerThread = void 0; }; - worker.onerror = (e) => { + worker.onerror = (e2) => { var message = "worker sent an error!"; - err(message + " " + e.filename + ":" + e.lineno + ": " + e.message); - throw e; + err(message + " " + e2.filename + ":" + e2.lineno + ": " + e2.message); + throw e2; }; if (ENVIRONMENT_IS_NODE) { worker.on("message", function(data) { worker.onmessage({ data }); }); - worker.on("error", function(e) { - worker.onerror(e); + worker.on("error", function(e2) { + worker.onerror(e2); }); worker.on("detachedExit", function() { }); @@ -3245,6 +3070,28 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ } return PThread.unusedWorkers.pop(); } }; + Module["PThread"] = PThread; + function callRuntimeCallbacks(callbacks2) { + while (callbacks2.length > 0) { + callbacks2.shift()(Module); + } + } + function withStackSave(f) { + var stack2 = stackSave(); + var ret = f(); + stackRestore(stack2); + return ret; + } + function demangle(func2) { + return func2; + } + function demangleAll(text) { + var regex = /\b_Z[\w\d_]+/g; + return text.replace(regex, function(x) { + var y = demangle(x); + return x === y ? x : y + " [" + x + "]"; + }); + } function establishStackSpace() { var pthread_ptr = _pthread_self(); var stackTop = GROWABLE_HEAP_I32()[pthread_ptr + 44 >> 2]; @@ -3256,11 +3103,11 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ Module["establishStackSpace"] = establishStackSpace; function exitOnMainThread(returnCode) { if (ENVIRONMENT_IS_PTHREAD) - return _emscripten_proxy_to_main_thread_js(1, 0, returnCode); + return _emscripten_proxy_to_main_thread_js(2, 0, returnCode); try { _exit(returnCode); - } catch (e) { - handleException(e); + } catch (e2) { + handleException(e2); } } var wasmTableMirror = []; @@ -3274,7 +3121,12 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ return func2; } function invokeEntryPoint(ptr, arg) { - return getWasmTableEntry(ptr)(arg); + var result = getWasmTableEntry(ptr)(arg); + if (keepRuntimeAlive()) { + PThread.setExitStatus(result); + } else { + __emscripten_thread_exit(result); + } } Module["invokeEntryPoint"] = invokeEntryPoint; function jsStackTrace() { @@ -3282,8 +3134,8 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ if (!error.stack) { try { throw new Error(); - } catch (e) { - error = e; + } catch (e2) { + error = e2; } if (!error.stack) { return "(no stack trace available)"; @@ -3291,48 +3143,15 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ } return error.stack.toString(); } - function registerTlsInit(tlsInitFunc, moduleExports, metadata) { + function registerTLSInit(tlsInitFunc) { PThread.tlsInitFunctions.push(tlsInitFunc); } - function setWasmTableEntry(idx, func2) { - wasmTable.set(idx, func2); - wasmTableMirror[idx] = func2; - } - var _emscripten_get_now; - if (ENVIRONMENT_IS_NODE) { - _emscripten_get_now = () => { - var t2 = process["hrtime"](); - return t2[0] * 1e3 + t2[1] / 1e6; - }; - } else if (ENVIRONMENT_IS_PTHREAD) { - _emscripten_get_now = () => performance.now() - Module["__performance_now_clock_drift"]; - } else - _emscripten_get_now = () => performance.now(); - var _emscripten_get_now_is_monotonic = true; - function setErrNo(value) { - GROWABLE_HEAP_I32()[___errno_location() >> 2] = value; - return value; - } - function _clock_gettime(clk_id, tp) { - var now22; - if (clk_id === 0) { - now22 = Date.now(); - } else if ((clk_id === 1 || clk_id === 4) && _emscripten_get_now_is_monotonic) { - now22 = _emscripten_get_now(); - } else { - setErrNo(28); - return -1; - } - GROWABLE_HEAP_I32()[tp >> 2] = now22 / 1e3 | 0; - GROWABLE_HEAP_I32()[tp + 4 >> 2] = now22 % 1e3 * 1e3 * 1e3 | 0; - return 0; - } - function ___clock_gettime(a0, a12) { - return _clock_gettime(a0, a12); + function writeArrayToMemory(array2, buffer3) { + GROWABLE_HEAP_I8().set(array2, buffer3); } function ___emscripten_init_main_thread_js(tb) { __emscripten_thread_init(tb, !ENVIRONMENT_IS_WORKER, 1, !ENVIRONMENT_IS_WEB); - PThread.threadInit(); + PThread.threadInitTLS(); } function ___emscripten_thread_cleanup(thread) { if (!ENVIRONMENT_IS_PTHREAD) @@ -3340,38 +3159,24 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ else postMessage({ "cmd": "cleanupThread", "thread": thread }); } - function spawnThread(threadParams) { - var worker = PThread.getNewWorker(); - if (!worker) { - return 6; - } - PThread.runningWorkers.push(worker); - var pthread = PThread.pthreads[threadParams.pthread_ptr] = { worker, threadInfoStruct: threadParams.pthread_ptr }; - worker.pthread = pthread; - var msg = { "cmd": "run", "start_routine": threadParams.startRoutine, "arg": threadParams.arg, "threadInfoStruct": threadParams.pthread_ptr }; - worker.runPthread = () => { - msg.time = performance.now(); - worker.postMessage(msg, threadParams.transferList); - }; - if (worker.loaded) { - worker.runPthread(); - delete worker.runPthread; - } - return 0; + function pthreadCreateProxied(pthread_ptr, attr, startRoutine, arg) { + if (ENVIRONMENT_IS_PTHREAD) + return _emscripten_proxy_to_main_thread_js(3, 1, pthread_ptr, attr, startRoutine, arg); + return ___pthread_create_js(pthread_ptr, attr, startRoutine, arg); } - function ___pthread_create_js(pthread_ptr, attr, start_routine, arg) { - if (typeof SharedArrayBuffer === "undefined") { + function ___pthread_create_js(pthread_ptr, attr, startRoutine, arg) { + if (typeof SharedArrayBuffer == "undefined") { err("Current environment does not support SharedArrayBuffer, pthreads are not available!"); return 6; } var transferList = []; var error = 0; if (ENVIRONMENT_IS_PTHREAD && (transferList.length === 0 || error)) { - return _emscripten_sync_run_in_main_thread_4(687865856, pthread_ptr, attr, start_routine, arg); + return pthreadCreateProxied(pthread_ptr, attr, startRoutine, arg); } if (error) return error; - var threadParams = { startRoutine: start_routine, pthread_ptr, arg, transferList }; + var threadParams = { startRoutine, pthread_ptr, arg, transferList }; if (ENVIRONMENT_IS_PTHREAD) { threadParams.cmd = "spawnThread"; postMessage(threadParams, transferList); @@ -3382,24 +3187,48 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ function __emscripten_default_pthread_stack_size() { return 2097152; } - function __emscripten_notify_thread_queue(targetThreadId, mainThreadId) { - if (targetThreadId == mainThreadId) { - postMessage({ "cmd": "processQueuedMainThreadWork" }); + var nowIsMonotonic = true; + function __emscripten_get_now_is_monotonic() { + return nowIsMonotonic; + } + function executeNotifiedProxyingQueue(queue) { + Atomics.store(GROWABLE_HEAP_I32(), queue >> 2, 1); + if (_pthread_self()) { + __emscripten_proxy_execute_task_queue(queue); + } + Atomics.compareExchange(GROWABLE_HEAP_I32(), queue >> 2, 1, 0); + } + Module["executeNotifiedProxyingQueue"] = executeNotifiedProxyingQueue; + function __emscripten_notify_task_queue(targetThreadId, currThreadId, mainThreadId, queue) { + if (targetThreadId == currThreadId) { + setTimeout(() => executeNotifiedProxyingQueue(queue)); } else if (ENVIRONMENT_IS_PTHREAD) { - postMessage({ "targetThread": targetThreadId, "cmd": "processThreadQueue" }); + postMessage({ "targetThread": targetThreadId, "cmd": "processProxyingQueue", "queue": queue }); } else { - var pthread = PThread.pthreads[targetThreadId]; - var worker = pthread && pthread.worker; + var worker = PThread.pthreads[targetThreadId]; if (!worker) { return; } - worker.postMessage({ "cmd": "processThreadQueue" }); + worker.postMessage({ "cmd": "processProxyingQueue", "queue": queue }); } return 1; } + function __emscripten_set_offscreencanvas_size(target, width, height) { + return -1; + } function _abort() { abort(""); } + function warnOnce(text) { + if (!warnOnce.shown) + warnOnce.shown = {}; + if (!warnOnce.shown[text]) { + warnOnce.shown[text] = 1; + if (ENVIRONMENT_IS_NODE) + text = "warning: " + text; + err(text); + } + } function _emscripten_check_blocking_allowed() { if (ENVIRONMENT_IS_NODE) return; @@ -3407,9 +3236,25 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ return; warnOnce("Blocking on the main thread is very dangerous, see https://emscripten.org/docs/porting/pthreads.html#blocking-on-the-main-browser-thread"); } - function _emscripten_get_heap_max() { + function _emscripten_date_now() { + return Date.now(); + } + function getHeapMax() { return 2147483648; } + function _emscripten_get_heap_max() { + return getHeapMax(); + } + var _emscripten_get_now; + if (ENVIRONMENT_IS_NODE) { + _emscripten_get_now = () => { + var t22 = process["hrtime"](); + return t22[0] * 1e3 + t22[1] / 1e6; + }; + } else if (ENVIRONMENT_IS_PTHREAD) { + _emscripten_get_now = () => performance.now() - Module["__performance_now_clock_drift"]; + } else + _emscripten_get_now = () => performance.now(); function _emscripten_memcpy_big(dest, src, num) { GROWABLE_HEAP_U8().copyWithin(dest, src, src + num); } @@ -3421,13 +3266,13 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ function _emscripten_proxy_to_main_thread_js(index2, sync) { var numCallArgs = arguments.length - 2; var outerArgs = arguments; - return withStackSave(function() { + return withStackSave(() => { var serializedNumCallArgs = numCallArgs; var args = stackAlloc(serializedNumCallArgs * 8); var b = args >> 3; - for (var i = 0; i < numCallArgs; i++) { - var arg = outerArgs[2 + i]; - GROWABLE_HEAP_F64()[b + i] = arg; + for (var i2 = 0; i2 < numCallArgs; i2++) { + var arg = outerArgs[2 + i2]; + GROWABLE_HEAP_F64()[b + i2] = arg; } return _emscripten_run_in_main_runtime_thread_js(index2, serializedNumCallArgs, args, sync); }); @@ -3436,8 +3281,8 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ function _emscripten_receive_on_main_thread_js(index2, numCallArgs, args) { _emscripten_receive_on_main_thread_js_callArgs.length = numCallArgs; var b = args >> 3; - for (var i = 0; i < numCallArgs; i++) { - _emscripten_receive_on_main_thread_js_callArgs[i] = GROWABLE_HEAP_F64()[b + i]; + for (var i2 = 0; i2 < numCallArgs; i2++) { + _emscripten_receive_on_main_thread_js_callArgs[i2] = GROWABLE_HEAP_F64()[b + i2]; } var isEmAsmConst = index2 < 0; var func2 = !isEmAsmConst ? proxiedFunctionTable[index2] : ASM_CONSTS[-index2 - 1]; @@ -3448,7 +3293,7 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ wasmMemory.grow(size2 - buffer2.byteLength + 65535 >>> 16); updateGlobalBufferAndViews(wasmMemory.buffer); return 1; - } catch (e) { + } catch (e2) { } } function _emscripten_resize_heap(requestedSize) { @@ -3457,10 +3302,11 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ if (requestedSize <= oldSize) { return false; } - var maxHeapSize = _emscripten_get_heap_max(); + var maxHeapSize = getHeapMax(); if (requestedSize > maxHeapSize) { return false; } + let alignUp = (x, multiple) => x + (multiple - x % multiple) % multiple; for (var cutDown = 1; cutDown <= 4; cutDown *= 2) { var overGrownHeapSize = oldSize * (1 + 0.2 / cutDown); overGrownHeapSize = Math.min(overGrownHeapSize, requestedSize + 100663296); @@ -3472,387 +3318,109 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ } return false; } - var JSEvents = { inEventHandler: 0, removeAllEventListeners: function() { - for (var i = JSEvents.eventHandlers.length - 1; i >= 0; --i) { - JSEvents._removeHandler(i); - } - JSEvents.eventHandlers = []; - JSEvents.deferredCalls = []; - }, registerRemoveEventListeners: function() { - if (!JSEvents.removeEventListenersRegistered) { - __ATEXIT__.push(JSEvents.removeAllEventListeners); - JSEvents.removeEventListenersRegistered = true; - } - }, deferredCalls: [], deferCall: function(targetFunction, precedence, argsList) { - function arraysHaveEqualContent(arrA, arrB) { - if (arrA.length != arrB.length) - return false; - for (var i2 in arrA) { - if (arrA[i2] != arrB[i2]) - return false; - } - return true; - } - for (var i in JSEvents.deferredCalls) { - var call = JSEvents.deferredCalls[i]; - if (call.targetFunction == targetFunction && arraysHaveEqualContent(call.argsList, argsList)) { - return; - } - } - JSEvents.deferredCalls.push({ targetFunction, precedence, argsList }); - JSEvents.deferredCalls.sort(function(x, y) { - return x.precedence < y.precedence; - }); - }, removeDeferredCalls: function(targetFunction) { - for (var i = 0; i < JSEvents.deferredCalls.length; ++i) { - if (JSEvents.deferredCalls[i].targetFunction == targetFunction) { - JSEvents.deferredCalls.splice(i, 1); - --i; - } - } - }, canPerformEventHandlerRequests: function() { - return JSEvents.inEventHandler && JSEvents.currentEventHandler.allowsDeferredCalls; - }, runDeferredCalls: function() { - if (!JSEvents.canPerformEventHandlerRequests()) { - return; - } - for (var i = 0; i < JSEvents.deferredCalls.length; ++i) { - var call = JSEvents.deferredCalls[i]; - JSEvents.deferredCalls.splice(i, 1); - --i; - call.targetFunction.apply(null, call.argsList); - } - }, eventHandlers: [], removeAllHandlersOnTarget: function(target, eventTypeString) { - for (var i = 0; i < JSEvents.eventHandlers.length; ++i) { - if (JSEvents.eventHandlers[i].target == target && (!eventTypeString || eventTypeString == JSEvents.eventHandlers[i].eventTypeString)) { - JSEvents._removeHandler(i--); - } - } - }, _removeHandler: function(i) { - var h = JSEvents.eventHandlers[i]; - h.target.removeEventListener(h.eventTypeString, h.eventListenerFunc, h.useCapture); - JSEvents.eventHandlers.splice(i, 1); - }, registerOrRemoveHandler: function(eventHandler) { - var jsEventHandler = function jsEventHandler2(event) { - ++JSEvents.inEventHandler; - JSEvents.currentEventHandler = eventHandler; - JSEvents.runDeferredCalls(); - eventHandler.handlerFunc(event); - JSEvents.runDeferredCalls(); - --JSEvents.inEventHandler; - }; - if (eventHandler.callbackfunc) { - eventHandler.eventListenerFunc = jsEventHandler; - eventHandler.target.addEventListener(eventHandler.eventTypeString, jsEventHandler, eventHandler.useCapture); - JSEvents.eventHandlers.push(eventHandler); - JSEvents.registerRemoveEventListeners(); - } else { - for (var i = 0; i < JSEvents.eventHandlers.length; ++i) { - if (JSEvents.eventHandlers[i].target == eventHandler.target && JSEvents.eventHandlers[i].eventTypeString == eventHandler.eventTypeString) { - JSEvents._removeHandler(i--); - } - } - } - }, queueEventHandlerOnThread_iiii: function(targetThread, eventHandlerFunc, eventTypeId, eventData, userData) { - withStackSave(function() { - var varargs = stackAlloc(12); - GROWABLE_HEAP_I32()[varargs >> 2] = eventTypeId; - GROWABLE_HEAP_I32()[varargs + 4 >> 2] = eventData; - GROWABLE_HEAP_I32()[varargs + 8 >> 2] = userData; - _emscripten_dispatch_to_thread_(targetThread, 637534208, eventHandlerFunc, eventData, varargs); - }); - }, getTargetThreadForEventCallback: function(targetThread) { - switch (targetThread) { - case 1: - return 0; - case 2: - return PThread.currentProxiedOperationCallerThread; - default: - return targetThread; - } - }, getNodeNameForTarget: function(target) { - if (!target) - return ""; - if (target == window) - return "#window"; - if (target == screen) - return "#screen"; - return target && target.nodeName ? target.nodeName : ""; - }, fullscreenEnabled: function() { - return document.fullscreenEnabled || document.webkitFullscreenEnabled; - } }; - function stringToNewUTF8(jsString) { - var length = lengthBytesUTF8(jsString) + 1; - var cString = _malloc(length); - stringToUTF8(jsString, cString, length); - return cString; - } - function _emscripten_set_offscreencanvas_size_on_target_thread_js(targetThread, targetCanvas, width, height) { - withStackSave(function() { - var varargs = stackAlloc(12); - var targetCanvasPtr = 0; - if (targetCanvas) { - targetCanvasPtr = stringToNewUTF8(targetCanvas); - } - GROWABLE_HEAP_I32()[varargs >> 2] = targetCanvasPtr; - GROWABLE_HEAP_I32()[varargs + 4 >> 2] = width; - GROWABLE_HEAP_I32()[varargs + 8 >> 2] = height; - _emscripten_dispatch_to_thread_(targetThread, 657457152, 0, targetCanvasPtr, varargs); - }); - } - function _emscripten_set_offscreencanvas_size_on_target_thread(targetThread, targetCanvas, width, height) { - targetCanvas = targetCanvas ? UTF8ToString(targetCanvas) : ""; - _emscripten_set_offscreencanvas_size_on_target_thread_js(targetThread, targetCanvas, width, height); - } - function maybeCStringToJsString(cString) { - return cString > 2 ? UTF8ToString(cString) : cString; - } - var specialHTMLTargets = [0, typeof document !== "undefined" ? document : 0, typeof window !== "undefined" ? window : 0]; - function findEventTarget(target) { - target = maybeCStringToJsString(target); - var domElement = specialHTMLTargets[target] || (typeof document !== "undefined" ? document.querySelector(target) : void 0); - return domElement; - } - function findCanvasEventTarget(target) { - return findEventTarget(target); - } - function _emscripten_set_canvas_element_size_calling_thread(target, width, height) { - var canvas3 = findCanvasEventTarget(target); - if (!canvas3) - return -4; - if (canvas3.canvasSharedPtr) { - GROWABLE_HEAP_I32()[canvas3.canvasSharedPtr >> 2] = width; - GROWABLE_HEAP_I32()[canvas3.canvasSharedPtr + 4 >> 2] = height; - } - if (canvas3.offscreenCanvas || !canvas3.controlTransferredOffscreen) { - if (canvas3.offscreenCanvas) - canvas3 = canvas3.offscreenCanvas; - var autoResizeViewport = false; - if (canvas3.GLctxObject && canvas3.GLctxObject.GLctx) { - var prevViewport = canvas3.GLctxObject.GLctx.getParameter(2978); - autoResizeViewport = prevViewport[0] === 0 && prevViewport[1] === 0 && prevViewport[2] === canvas3.width && prevViewport[3] === canvas3.height; - } - canvas3.width = width; - canvas3.height = height; - if (autoResizeViewport) { - canvas3.GLctxObject.GLctx.viewport(0, 0, width, height); - } - } else if (canvas3.canvasSharedPtr) { - var targetThread = GROWABLE_HEAP_I32()[canvas3.canvasSharedPtr + 8 >> 2]; - _emscripten_set_offscreencanvas_size_on_target_thread(targetThread, target, width, height); - return 1; - } else { - return -4; - } - return 0; - } - function _emscripten_set_canvas_element_size_main_thread(target, width, height) { - if (ENVIRONMENT_IS_PTHREAD) - return _emscripten_proxy_to_main_thread_js(2, 1, target, width, height); - return _emscripten_set_canvas_element_size_calling_thread(target, width, height); - } - function _emscripten_set_canvas_element_size(target, width, height) { - var canvas3 = findCanvasEventTarget(target); - if (canvas3) { - return _emscripten_set_canvas_element_size_calling_thread(target, width, height); - } else { - return _emscripten_set_canvas_element_size_main_thread(target, width, height); - } - } function _emscripten_unwind_to_js_event_loop() { throw "unwind"; } - function __webgl_enable_ANGLE_instanced_arrays(ctx) { - var ext = ctx.getExtension("ANGLE_instanced_arrays"); - if (ext) { - ctx["vertexAttribDivisor"] = function(index2, divisor) { - ext["vertexAttribDivisorANGLE"](index2, divisor); - }; - ctx["drawArraysInstanced"] = function(mode, first, count22, primcount) { - ext["drawArraysInstancedANGLE"](mode, first, count22, primcount); - }; - ctx["drawElementsInstanced"] = function(mode, count22, type, indices, primcount) { - ext["drawElementsInstancedANGLE"](mode, count22, type, indices, primcount); - }; - return 1; - } - } - function __webgl_enable_OES_vertex_array_object(ctx) { - var ext = ctx.getExtension("OES_vertex_array_object"); - if (ext) { - ctx["createVertexArray"] = function() { - return ext["createVertexArrayOES"](); - }; - ctx["deleteVertexArray"] = function(vao) { - ext["deleteVertexArrayOES"](vao); - }; - ctx["bindVertexArray"] = function(vao) { - ext["bindVertexArrayOES"](vao); - }; - ctx["isVertexArray"] = function(vao) { - return ext["isVertexArrayOES"](vao); - }; - return 1; - } - } - function __webgl_enable_WEBGL_draw_buffers(ctx) { - var ext = ctx.getExtension("WEBGL_draw_buffers"); - if (ext) { - ctx["drawBuffers"] = function(n, bufs) { - ext["drawBuffersWEBGL"](n, bufs); - }; - return 1; - } - } - function __webgl_enable_WEBGL_multi_draw(ctx) { - return !!(ctx.multiDrawWebgl = ctx.getExtension("WEBGL_multi_draw")); - } - var GL = { counter: 1, buffers: [], programs: [], framebuffers: [], renderbuffers: [], textures: [], shaders: [], vaos: [], contexts: {}, offscreenCanvases: {}, queries: [], stringCache: {}, unpackAlignment: 4, recordError: function recordError(errorCode) { - if (!GL.lastError) { - GL.lastError = errorCode; - } - }, getNewId: function(table) { - var ret = GL.counter++; - for (var i = table.length; i < ret; i++) { - table[i] = null; - } - return ret; - }, getSource: function(shader, count22, string2, length) { - var source = ""; - for (var i = 0; i < count22; ++i) { - var len = length ? GROWABLE_HEAP_I32()[length + i * 4 >> 2] : -1; - source += UTF8ToString(GROWABLE_HEAP_I32()[string2 + i * 4 >> 2], len < 0 ? void 0 : len); - } - return source; - }, createContext: function(canvas3, webGLContextAttributes) { - if (!canvas3.getContextSafariWebGL2Fixed) { - canvas3.getContextSafariWebGL2Fixed = canvas3.getContext; - canvas3.getContext = function(ver, attrs) { - var gl = canvas3.getContextSafariWebGL2Fixed(ver, attrs); - return ver == "webgl" == gl instanceof WebGLRenderingContext ? gl : null; - }; - } - var ctx = canvas3.getContext("webgl", webGLContextAttributes); - if (!ctx) - return 0; - var handle = GL.registerContext(ctx, webGLContextAttributes); - return handle; - }, registerContext: function(ctx, webGLContextAttributes) { - var handle = _malloc(8); - GROWABLE_HEAP_I32()[handle + 4 >> 2] = _pthread_self(); - var context = { handle, attributes: webGLContextAttributes, version: webGLContextAttributes.majorVersion, GLctx: ctx }; - if (ctx.canvas) - ctx.canvas.GLctxObject = context; - GL.contexts[handle] = context; - if (typeof webGLContextAttributes.enableExtensionsByDefault === "undefined" || webGLContextAttributes.enableExtensionsByDefault) { - GL.initExtensions(context); - } - return handle; - }, makeContextCurrent: function(contextHandle) { - GL.currentContext = GL.contexts[contextHandle]; - Module.ctx = GLctx = GL.currentContext && GL.currentContext.GLctx; - return !(contextHandle && !GLctx); - }, getContext: function(contextHandle) { - return GL.contexts[contextHandle]; - }, deleteContext: function(contextHandle) { - if (GL.currentContext === GL.contexts[contextHandle]) - GL.currentContext = null; - if (typeof JSEvents === "object") - JSEvents.removeAllHandlersOnTarget(GL.contexts[contextHandle].GLctx.canvas); - if (GL.contexts[contextHandle] && GL.contexts[contextHandle].GLctx.canvas) - GL.contexts[contextHandle].GLctx.canvas.GLctxObject = void 0; - _free(GL.contexts[contextHandle].handle); - GL.contexts[contextHandle] = null; - }, initExtensions: function(context) { - if (!context) - context = GL.currentContext; - if (context.initExtensionsDone) - return; - context.initExtensionsDone = true; - var GLctx2 = context.GLctx; - __webgl_enable_ANGLE_instanced_arrays(GLctx2); - __webgl_enable_OES_vertex_array_object(GLctx2); - __webgl_enable_WEBGL_draw_buffers(GLctx2); - { - GLctx2.disjointTimerQueryExt = GLctx2.getExtension("EXT_disjoint_timer_query"); - } - __webgl_enable_WEBGL_multi_draw(GLctx2); - var exts = GLctx2.getSupportedExtensions() || []; - exts.forEach(function(ext) { - if (!ext.includes("lose_context") && !ext.includes("debug")) { - GLctx2.getExtension(ext); - } - }); - } }; - var __emscripten_webgl_power_preferences = ["default", "low-power", "high-performance"]; - function _emscripten_webgl_do_create_context(target, attributes) { - var a = attributes >> 2; - var powerPreference = GROWABLE_HEAP_I32()[a + (24 >> 2)]; - var contextAttributes = { "alpha": !!GROWABLE_HEAP_I32()[a + (0 >> 2)], "depth": !!GROWABLE_HEAP_I32()[a + (4 >> 2)], "stencil": !!GROWABLE_HEAP_I32()[a + (8 >> 2)], "antialias": !!GROWABLE_HEAP_I32()[a + (12 >> 2)], "premultipliedAlpha": !!GROWABLE_HEAP_I32()[a + (16 >> 2)], "preserveDrawingBuffer": !!GROWABLE_HEAP_I32()[a + (20 >> 2)], "powerPreference": __emscripten_webgl_power_preferences[powerPreference], "failIfMajorPerformanceCaveat": !!GROWABLE_HEAP_I32()[a + (28 >> 2)], majorVersion: GROWABLE_HEAP_I32()[a + (32 >> 2)], minorVersion: GROWABLE_HEAP_I32()[a + (36 >> 2)], enableExtensionsByDefault: GROWABLE_HEAP_I32()[a + (40 >> 2)], explicitSwapControl: GROWABLE_HEAP_I32()[a + (44 >> 2)], proxyContextToMainThread: GROWABLE_HEAP_I32()[a + (48 >> 2)], renderViaOffscreenBackBuffer: GROWABLE_HEAP_I32()[a + (52 >> 2)] }; - var canvas3 = findCanvasEventTarget(target); - if (!canvas3) { - return 0; - } - if (contextAttributes.explicitSwapControl) { - return 0; - } - var contextHandle = GL.createContext(canvas3, contextAttributes); - return contextHandle; + function _fd_close(fd) { + if (ENVIRONMENT_IS_PTHREAD) + return _emscripten_proxy_to_main_thread_js(4, 1, fd); + return 52; } - function _emscripten_webgl_create_context(a0, a12) { - return _emscripten_webgl_do_create_context(a0, a12); + function _fd_seek(fd, offset_low, offset_high, whence, newOffset) { + if (ENVIRONMENT_IS_PTHREAD) + return _emscripten_proxy_to_main_thread_js(5, 1, fd, offset_low, offset_high, whence, newOffset); + return 70; } - var SYSCALLS = { mappings: {}, buffers: [null, [], []], printChar: function(stream, curr) { - var buffer3 = SYSCALLS.buffers[stream]; + var printCharBuffers = [null, [], []]; + function printChar(stream, curr) { + var buffer3 = printCharBuffers[stream]; if (curr === 0 || curr === 10) { (stream === 1 ? out : err)(UTF8ArrayToString(buffer3, 0)); buffer3.length = 0; } else { buffer3.push(curr); } - }, varargs: void 0, get: function() { - SYSCALLS.varargs += 4; - var ret = GROWABLE_HEAP_I32()[SYSCALLS.varargs - 4 >> 2]; - return ret; - }, getStr: function(ptr) { - var ret = UTF8ToString(ptr); - return ret; - }, get64: function(low, high) { - return low; - } }; - function _fd_close(fd) { - if (ENVIRONMENT_IS_PTHREAD) - return _emscripten_proxy_to_main_thread_js(3, 1, fd); - return 0; - } - function _fd_seek(fd, offset_low, offset_high, whence, newOffset) { - if (ENVIRONMENT_IS_PTHREAD) - return _emscripten_proxy_to_main_thread_js(4, 1, fd, offset_low, offset_high, whence, newOffset); } function _fd_write(fd, iov, iovcnt, pnum) { if (ENVIRONMENT_IS_PTHREAD) - return _emscripten_proxy_to_main_thread_js(5, 1, fd, iov, iovcnt, pnum); + return _emscripten_proxy_to_main_thread_js(6, 1, fd, iov, iovcnt, pnum); var num = 0; - for (var i = 0; i < iovcnt; i++) { - var ptr = GROWABLE_HEAP_I32()[iov >> 2]; - var len = GROWABLE_HEAP_I32()[iov + 4 >> 2]; + for (var i2 = 0; i2 < iovcnt; i2++) { + var ptr = GROWABLE_HEAP_U32()[iov >> 2]; + var len = GROWABLE_HEAP_U32()[iov + 4 >> 2]; iov += 8; for (var j = 0; j < len; j++) { - SYSCALLS.printChar(fd, GROWABLE_HEAP_U8()[ptr + j]); + printChar(fd, GROWABLE_HEAP_U8()[ptr + j]); } num += len; } - GROWABLE_HEAP_I32()[pnum >> 2] = num; + GROWABLE_HEAP_U32()[pnum >> 2] = num; return 0; } - function _setTempRet0(val) { - setTempRet0(val); + function getCFunc(ident) { + var func2 = Module["_" + ident]; + return func2; + } + function ccall(ident, returnType, argTypes, args, opts) { + var toC = { "string": (str) => { + var ret2 = 0; + if (str !== null && str !== void 0 && str !== 0) { + var len = (str.length << 2) + 1; + ret2 = stackAlloc(len); + stringToUTF8(str, ret2, len); + } + return ret2; + }, "array": (arr) => { + var ret2 = stackAlloc(arr.length); + writeArrayToMemory(arr, ret2); + return ret2; + } }; + function convertReturnValue(ret2) { + if (returnType === "string") { + return UTF8ToString(ret2); + } + if (returnType === "boolean") + return Boolean(ret2); + return ret2; + } + var func2 = getCFunc(ident); + var cArgs = []; + var stack2 = 0; + if (args) { + for (var i2 = 0; i2 < args.length; i2++) { + var converter = toC[argTypes[i2]]; + if (converter) { + if (stack2 === 0) + stack2 = stackSave(); + cArgs[i2] = converter(args[i2]); + } else { + cArgs[i2] = args[i2]; + } + } + } + var ret = func2.apply(null, cArgs); + function onDone(ret2) { + if (stack2 !== 0) + stackRestore(stack2); + return convertReturnValue(ret2); + } + ret = onDone(ret); + return ret; + } + function cwrap(ident, returnType, argTypes, opts) { + argTypes = argTypes || []; + var numericArgs = argTypes.every((type) => type === "number" || type === "boolean"); + var numericRet = returnType !== "string"; + if (numericRet && numericArgs && !opts) { + return getCFunc(ident); + } + return function() { + return ccall(ident, returnType, argTypes, arguments, opts); + }; } PThread.init(); - var GLctx; - var proxiedFunctionTable = [null, exitOnMainThread, _emscripten_set_canvas_element_size_main_thread, _fd_close, _fd_seek, _fd_write]; - var ASSERTIONS = false; - var asmLibraryArg = { "__clock_gettime": ___clock_gettime, "__emscripten_init_main_thread_js": ___emscripten_init_main_thread_js, "__emscripten_thread_cleanup": ___emscripten_thread_cleanup, "__pthread_create_js": ___pthread_create_js, "_emscripten_default_pthread_stack_size": __emscripten_default_pthread_stack_size, "_emscripten_notify_thread_queue": __emscripten_notify_thread_queue, "abort": _abort, "emscripten_check_blocking_allowed": _emscripten_check_blocking_allowed, "emscripten_get_heap_max": _emscripten_get_heap_max, "emscripten_get_now": _emscripten_get_now, "emscripten_memcpy_big": _emscripten_memcpy_big, "emscripten_num_logical_cores": _emscripten_num_logical_cores, "emscripten_receive_on_main_thread_js": _emscripten_receive_on_main_thread_js, "emscripten_resize_heap": _emscripten_resize_heap, "emscripten_set_canvas_element_size": _emscripten_set_canvas_element_size, "emscripten_unwind_to_js_event_loop": _emscripten_unwind_to_js_event_loop, "emscripten_webgl_create_context": _emscripten_webgl_create_context, "exit": _exit, "fd_close": _fd_close, "fd_seek": _fd_seek, "fd_write": _fd_write, "memory": wasmMemory || Module["wasmMemory"], "setTempRet0": _setTempRet0 }; + var proxiedFunctionTable = [null, _proc_exit, exitOnMainThread, pthreadCreateProxied, _fd_close, _fd_seek, _fd_write]; + var asmLibraryArg = { "__emscripten_init_main_thread_js": ___emscripten_init_main_thread_js, "__emscripten_thread_cleanup": ___emscripten_thread_cleanup, "__pthread_create_js": ___pthread_create_js, "_emscripten_default_pthread_stack_size": __emscripten_default_pthread_stack_size, "_emscripten_get_now_is_monotonic": __emscripten_get_now_is_monotonic, "_emscripten_notify_task_queue": __emscripten_notify_task_queue, "_emscripten_set_offscreencanvas_size": __emscripten_set_offscreencanvas_size, "abort": _abort, "emscripten_check_blocking_allowed": _emscripten_check_blocking_allowed, "emscripten_date_now": _emscripten_date_now, "emscripten_get_heap_max": _emscripten_get_heap_max, "emscripten_get_now": _emscripten_get_now, "emscripten_memcpy_big": _emscripten_memcpy_big, "emscripten_num_logical_cores": _emscripten_num_logical_cores, "emscripten_receive_on_main_thread_js": _emscripten_receive_on_main_thread_js, "emscripten_resize_heap": _emscripten_resize_heap, "emscripten_unwind_to_js_event_loop": _emscripten_unwind_to_js_event_loop, "exit": _exit, "fd_close": _fd_close, "fd_seek": _fd_seek, "fd_write": _fd_write, "memory": wasmMemory || Module["wasmMemory"] }; var asm = createWasm(); var ___wasm_call_ctors = Module["___wasm_call_ctors"] = function() { return (___wasm_call_ctors = Module["___wasm_call_ctors"] = Module["asm"]["__wasm_call_ctors"]).apply(null, arguments); @@ -4148,51 +3716,42 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ var _free = Module["_free"] = function() { return (_free = Module["_free"] = Module["asm"]["free"]).apply(null, arguments); }; - var _emscripten_tls_init = Module["_emscripten_tls_init"] = function() { - return (_emscripten_tls_init = Module["_emscripten_tls_init"] = Module["asm"]["emscripten_tls_init"]).apply(null, arguments); - }; - var ___errno_location = Module["___errno_location"] = function() { - return (___errno_location = Module["___errno_location"] = Module["asm"]["__errno_location"]).apply(null, arguments); + var __emscripten_tls_init = Module["__emscripten_tls_init"] = function() { + return (__emscripten_tls_init = Module["__emscripten_tls_init"] = Module["asm"]["_emscripten_tls_init"]).apply(null, arguments); }; var _pthread_self = Module["_pthread_self"] = function() { return (_pthread_self = Module["_pthread_self"] = Module["asm"]["pthread_self"]).apply(null, arguments); }; - var _emscripten_main_thread_process_queued_calls = Module["_emscripten_main_thread_process_queued_calls"] = function() { - return (_emscripten_main_thread_process_queued_calls = Module["_emscripten_main_thread_process_queued_calls"] = Module["asm"]["emscripten_main_thread_process_queued_calls"]).apply(null, arguments); - }; - var __emscripten_thread_crashed = Module["__emscripten_thread_crashed"] = function() { - return (__emscripten_thread_crashed = Module["__emscripten_thread_crashed"] = Module["asm"]["_emscripten_thread_crashed"]).apply(null, arguments); + var ___errno_location = Module["___errno_location"] = function() { + return (___errno_location = Module["___errno_location"] = Module["asm"]["__errno_location"]).apply(null, arguments); }; var __emscripten_thread_init = Module["__emscripten_thread_init"] = function() { return (__emscripten_thread_init = Module["__emscripten_thread_init"] = Module["asm"]["_emscripten_thread_init"]).apply(null, arguments); }; - var _emscripten_current_thread_process_queued_calls = Module["_emscripten_current_thread_process_queued_calls"] = function() { - return (_emscripten_current_thread_process_queued_calls = Module["_emscripten_current_thread_process_queued_calls"] = Module["asm"]["emscripten_current_thread_process_queued_calls"]).apply(null, arguments); + var __emscripten_thread_crashed = Module["__emscripten_thread_crashed"] = function() { + return (__emscripten_thread_crashed = Module["__emscripten_thread_crashed"] = Module["asm"]["_emscripten_thread_crashed"]).apply(null, arguments); + }; + var _emscripten_main_thread_process_queued_calls = Module["_emscripten_main_thread_process_queued_calls"] = function() { + return (_emscripten_main_thread_process_queued_calls = Module["_emscripten_main_thread_process_queued_calls"] = Module["asm"]["emscripten_main_thread_process_queued_calls"]).apply(null, arguments); }; var _emscripten_main_browser_thread_id = Module["_emscripten_main_browser_thread_id"] = function() { return (_emscripten_main_browser_thread_id = Module["_emscripten_main_browser_thread_id"] = Module["asm"]["emscripten_main_browser_thread_id"]).apply(null, arguments); }; - var _emscripten_sync_run_in_main_thread_2 = Module["_emscripten_sync_run_in_main_thread_2"] = function() { - return (_emscripten_sync_run_in_main_thread_2 = Module["_emscripten_sync_run_in_main_thread_2"] = Module["asm"]["emscripten_sync_run_in_main_thread_2"]).apply(null, arguments); - }; - var _emscripten_sync_run_in_main_thread_4 = Module["_emscripten_sync_run_in_main_thread_4"] = function() { - return (_emscripten_sync_run_in_main_thread_4 = Module["_emscripten_sync_run_in_main_thread_4"] = Module["asm"]["emscripten_sync_run_in_main_thread_4"]).apply(null, arguments); - }; var _emscripten_run_in_main_runtime_thread_js = Module["_emscripten_run_in_main_runtime_thread_js"] = function() { return (_emscripten_run_in_main_runtime_thread_js = Module["_emscripten_run_in_main_runtime_thread_js"] = Module["asm"]["emscripten_run_in_main_runtime_thread_js"]).apply(null, arguments); }; var _emscripten_dispatch_to_thread_ = Module["_emscripten_dispatch_to_thread_"] = function() { return (_emscripten_dispatch_to_thread_ = Module["_emscripten_dispatch_to_thread_"] = Module["asm"]["emscripten_dispatch_to_thread_"]).apply(null, arguments); }; + var __emscripten_proxy_execute_task_queue = Module["__emscripten_proxy_execute_task_queue"] = function() { + return (__emscripten_proxy_execute_task_queue = Module["__emscripten_proxy_execute_task_queue"] = Module["asm"]["_emscripten_proxy_execute_task_queue"]).apply(null, arguments); + }; var __emscripten_thread_free_data = Module["__emscripten_thread_free_data"] = function() { return (__emscripten_thread_free_data = Module["__emscripten_thread_free_data"] = Module["asm"]["_emscripten_thread_free_data"]).apply(null, arguments); }; var __emscripten_thread_exit = Module["__emscripten_thread_exit"] = function() { return (__emscripten_thread_exit = Module["__emscripten_thread_exit"] = Module["asm"]["_emscripten_thread_exit"]).apply(null, arguments); }; - var _memalign = Module["_memalign"] = function() { - return (_memalign = Module["_memalign"] = Module["asm"]["memalign"]).apply(null, arguments); - }; var _emscripten_stack_set_limits = Module["_emscripten_stack_set_limits"] = function() { return (_emscripten_stack_set_limits = Module["_emscripten_stack_set_limits"] = Module["asm"]["emscripten_stack_set_limits"]).apply(null, arguments); }; @@ -4211,19 +3770,12 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ var dynCall_jiji = Module["dynCall_jiji"] = function() { return (dynCall_jiji = Module["dynCall_jiji"] = Module["asm"]["dynCall_jiji"]).apply(null, arguments); }; - var __emscripten_allow_main_runtime_queued_calls = Module["__emscripten_allow_main_runtime_queued_calls"] = 21672; - Module["cwrap"] = cwrap; Module["keepRuntimeAlive"] = keepRuntimeAlive; - Module["PThread"] = PThread; - Module["PThread"] = PThread; Module["wasmMemory"] = wasmMemory; + Module["cwrap"] = cwrap; Module["ExitStatus"] = ExitStatus; + Module["PThread"] = PThread; var calledRun; - function ExitStatus(status) { - this.name = "ExitStatus"; - this.message = "Program terminated with exit(" + status + ")"; - this.status = status; - } dependenciesFulfilled = function runCaller() { if (!calledRun) run(); @@ -4270,32 +3822,6 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ doRun(); } } - Module["run"] = run; - function exit(status, implicit) { - EXITSTATUS = status; - if (!implicit) { - if (ENVIRONMENT_IS_PTHREAD) { - exitOnMainThread(status); - throw "unwind"; - } else { - } - } - if (keepRuntimeAlive()) { - } else { - exitRuntime(); - } - procExit(status); - } - function procExit(code) { - EXITSTATUS = code; - if (!keepRuntimeAlive()) { - PThread.terminateAllThreads(); - if (Module["onExit"]) - Module["onExit"](code); - ABORT = true; - } - quit_(code, new ExitStatus(code)); - } if (Module["preInit"]) { if (typeof Module["preInit"] == "function") Module["preInit"] = [Module["preInit"]]; @@ -4346,20 +3872,20 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ } }); var require_tfjs_backend_wasm_threaded_simd_worker = __commonJS({ - "node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm-threaded-simd.worker.js"(exports, module) { - module.exports.wasmWorkerContents = `"use strict";var Module={};var ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof process.versions==="object"&&typeof process.versions.node==="string";if(ENVIRONMENT_IS_NODE){var nodeWorkerThreads=require("worker_threads");var parentPort=nodeWorkerThreads.parentPort;parentPort.on("message",function(data){onmessage({data:data})});var fs=require("fs");Object.assign(global,{self:global,require:require,Module:Module,location:{href:__filename},Worker:nodeWorkerThreads.Worker,importScripts:function(f){(0,eval)(fs.readFileSync(f,"utf8"))},postMessage:function(msg){parentPort.postMessage(msg)},performance:global.performance||{now:function(){return Date.now()}}})}function threadPrintErr(){var text=Array.prototype.slice.call(arguments).join(" ");if(ENVIRONMENT_IS_NODE){fs.writeSync(2,text+" -");return}console.error(text)}function threadAlert(){var text=Array.prototype.slice.call(arguments).join(" ");postMessage({cmd:"alert",text:text,threadId:Module["_pthread_self"]()})}var err=threadPrintErr;self.alert=threadAlert;Module["instantiateWasm"]=((info,receiveInstance)=>{var instance=new WebAssembly.Instance(Module["wasmModule"],info);receiveInstance(instance);Module["wasmModule"]=null;return instance.exports});self.onmessage=(e=>{try{if(e.data.cmd==="load"){Module["wasmModule"]=e.data.wasmModule;Module["wasmMemory"]=e.data.wasmMemory;Module["buffer"]=Module["wasmMemory"].buffer;Module["ENVIRONMENT_IS_PTHREAD"]=true;if(typeof e.data.urlOrBlob==="string"){importScripts(e.data.urlOrBlob)}else{var objectUrl=URL.createObjectURL(e.data.urlOrBlob);importScripts(objectUrl);URL.revokeObjectURL(objectUrl)}WasmBackendModuleThreadedSimd(Module).then(function(instance){Module=instance})}else if(e.data.cmd==="run"){Module["__performance_now_clock_drift"]=performance.now()-e.data.time;Module["__emscripten_thread_init"](e.data.threadInfoStruct,0,0,1);Module["establishStackSpace"]();Module["PThread"].receiveObjectTransfer(e.data);Module["PThread"].threadInit();try{var result=Module["invokeEntryPoint"](e.data.start_routine,e.data.arg);if(Module["keepRuntimeAlive"]()){Module["PThread"].setExitStatus(result)}else{Module["__emscripten_thread_exit"](result)}}catch(ex){if(ex!="unwind"){if(ex instanceof Module["ExitStatus"]){if(Module["keepRuntimeAlive"]()){}else{Module["__emscripten_thread_exit"](ex.status)}}else{throw ex}}}}else if(e.data.cmd==="cancel"){if(Module["_pthread_self"]()){Module["__emscripten_thread_exit"](-1)}}else if(e.data.target==="setimmediate"){}else if(e.data.cmd==="processThreadQueue"){if(Module["_pthread_self"]()){Module["_emscripten_current_thread_process_queued_calls"]()}}else if(e.data.cmd==="processProxyingQueue"){if(Module["_pthread_self"]()){Module["_emscripten_proxy_execute_queue"](e.data.queue)}}else{err("worker.js received unknown command "+e.data.cmd);err(e.data)}}catch(ex){err("worker.js onmessage() captured an uncaught exception: "+ex);if(ex&&ex.stack)err(ex.stack);if(Module["__emscripten_thread_crashed"]){Module["__emscripten_thread_crashed"]()}throw ex}});`; + "node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm-threaded-simd.worker.js"(exports, module) { + module.exports.wasmWorkerContents = `"use strict";var Module={};var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string";if(ENVIRONMENT_IS_NODE){var nodeWorkerThreads=require("worker_threads");var parentPort=nodeWorkerThreads.parentPort;parentPort.on("message",data=>onmessage({data:data}));var fs=require("fs");Object.assign(global,{self:global,require:require,Module:Module,location:{href:__filename},Worker:nodeWorkerThreads.Worker,importScripts:function(f){(0,eval)(fs.readFileSync(f,"utf8"))},postMessage:function(msg){parentPort.postMessage(msg)},performance:global.performance||{now:function(){return Date.now()}}})}var initializedJS=false;var pendingNotifiedProxyingQueues=[];function threadPrintErr(){var text=Array.prototype.slice.call(arguments).join(" ");if(ENVIRONMENT_IS_NODE){fs.writeSync(2,text+" +");return}console.error(text)}function threadAlert(){var text=Array.prototype.slice.call(arguments).join(" ");postMessage({cmd:"alert",text:text,threadId:Module["_pthread_self"]()})}var err=threadPrintErr;self.alert=threadAlert;Module["instantiateWasm"]=(info,receiveInstance)=>{var instance=new WebAssembly.Instance(Module["wasmModule"],info);receiveInstance(instance);Module["wasmModule"]=null;return instance.exports};self.onunhandledrejection=e=>{throw e.reason??e};self.onmessage=e=>{try{if(e.data.cmd==="load"){Module["wasmModule"]=e.data.wasmModule;Module["wasmMemory"]=e.data.wasmMemory;Module["buffer"]=Module["wasmMemory"].buffer;Module["ENVIRONMENT_IS_PTHREAD"]=true;if(typeof e.data.urlOrBlob=="string"){importScripts(e.data.urlOrBlob)}else{var objectUrl=URL.createObjectURL(e.data.urlOrBlob);importScripts(objectUrl);URL.revokeObjectURL(objectUrl)}WasmBackendModuleThreadedSimd(Module).then(function(instance){Module=instance})}else if(e.data.cmd==="run"){Module["__performance_now_clock_drift"]=performance.now()-e.data.time;Module["__emscripten_thread_init"](e.data.pthread_ptr,0,0,1);Module["establishStackSpace"]();Module["PThread"].receiveObjectTransfer(e.data);Module["PThread"].threadInitTLS();if(!initializedJS){pendingNotifiedProxyingQueues.forEach(queue=>{Module["executeNotifiedProxyingQueue"](queue)});pendingNotifiedProxyingQueues=[];initializedJS=true}try{Module["invokeEntryPoint"](e.data.start_routine,e.data.arg)}catch(ex){if(ex!="unwind"){if(ex instanceof Module["ExitStatus"]){if(Module["keepRuntimeAlive"]()){}else{Module["__emscripten_thread_exit"](ex.status)}}else{throw ex}}}}else if(e.data.cmd==="cancel"){if(Module["_pthread_self"]()){Module["__emscripten_thread_exit"](-1)}}else if(e.data.target==="setimmediate"){}else if(e.data.cmd==="processProxyingQueue"){if(initializedJS){Module["executeNotifiedProxyingQueue"](e.data.queue)}else{pendingNotifiedProxyingQueues.push(e.data.queue)}}else if(e.data.cmd){err("worker.js received unknown command "+e.data.cmd);err(e.data)}}catch(ex){if(Module["__emscripten_thread_crashed"]){Module["__emscripten_thread_crashed"]()}throw ex}};`; } }); var require_tfjs_backend_wasm = __commonJS({ - "node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm.js"(exports, module) { + "node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm.js"(exports, module) { var WasmBackendModule2 = (() => { var _scriptDir = typeof document !== "undefined" && document.currentScript ? document.currentScript.src : void 0; if (typeof __filename !== "undefined") _scriptDir = _scriptDir || __filename; return function(WasmBackendModule3) { WasmBackendModule3 = WasmBackendModule3 || {}; - var Module = typeof WasmBackendModule3 !== "undefined" ? WasmBackendModule3 : {}; + var Module = typeof WasmBackendModule3 != "undefined" ? WasmBackendModule3 : {}; var readyPromiseResolve, readyPromiseReject; Module["ready"] = new Promise(function(resolve, reject) { readyPromiseResolve = resolve; @@ -4375,9 +3901,9 @@ var require_tfjs_backend_wasm = __commonJS({ var quit_ = (status, toThrow) => { throw toThrow; }; - var ENVIRONMENT_IS_WEB = typeof window === "object"; - var ENVIRONMENT_IS_WORKER = typeof importScripts === "function"; - var ENVIRONMENT_IS_NODE = typeof process === "object" && typeof process.versions === "object" && typeof process.versions.node === "string"; + var ENVIRONMENT_IS_WEB = typeof window == "object"; + var ENVIRONMENT_IS_WORKER = typeof importScripts == "function"; + var ENVIRONMENT_IS_NODE = typeof process == "object" && typeof process.versions == "object" && typeof process.versions.node == "string"; var scriptDirectory = ""; function locateFile(path) { if (Module["locateFile"]) { @@ -4386,29 +3912,24 @@ var require_tfjs_backend_wasm = __commonJS({ return scriptDirectory + path; } var read_, readAsync, readBinary, setWindowTitle; - function logExceptionOnExit(e) { - if (e instanceof ExitStatus) + function logExceptionOnExit(e2) { + if (e2 instanceof ExitStatus) return; - let toLog = e; + let toLog = e2; err("exiting due to exception: " + toLog); } - var fs; - var nodePath; - var requireNodeFS; if (ENVIRONMENT_IS_NODE) { if (ENVIRONMENT_IS_WORKER) { scriptDirectory = require_path().dirname(scriptDirectory) + "/"; } else { scriptDirectory = __dirname + "/"; } - requireNodeFS = () => { - if (!nodePath) { - fs = require_fs(); - nodePath = require_path(); - } - }; - read_ = function shell_read(filename, binary) { - requireNodeFS(); + var fs, nodePath; + if (typeof __require2 === "function") { + fs = require_fs(); + nodePath = require_path(); + } + read_ = (filename, binary) => { filename = nodePath["normalize"](filename); return fs.readFileSync(filename, binary ? void 0 : "utf8"); }; @@ -4420,7 +3941,6 @@ var require_tfjs_backend_wasm = __commonJS({ return ret; }; readAsync = (filename, onload, onerror) => { - requireNodeFS(); filename = nodePath["normalize"](filename); fs.readFile(filename, function(err2, data) { if (err2) @@ -4455,7 +3975,7 @@ var require_tfjs_backend_wasm = __commonJS({ } else if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) { if (ENVIRONMENT_IS_WORKER) { scriptDirectory = self.location.href; - } else if (typeof document !== "undefined" && document.currentScript) { + } else if (typeof document != "undefined" && document.currentScript) { scriptDirectory = document.currentScript.src; } if (_scriptDir) { @@ -4511,76 +4031,11 @@ var require_tfjs_backend_wasm = __commonJS({ if (Module["quit"]) quit_ = Module["quit"]; var POINTER_SIZE = 4; - function warnOnce(text) { - if (!warnOnce.shown) - warnOnce.shown = {}; - if (!warnOnce.shown[text]) { - warnOnce.shown[text] = 1; - err(text); - } - } - function convertJsFunctionToWasm(func2, sig) { - if (typeof WebAssembly.Function === "function") { - var typeNames = { "i": "i32", "j": "i64", "f": "f32", "d": "f64" }; - var type = { parameters: [], results: sig[0] == "v" ? [] : [typeNames[sig[0]]] }; - for (var i = 1; i < sig.length; ++i) { - type.parameters.push(typeNames[sig[i]]); - } - return new WebAssembly.Function(type, func2); - } - var typeSection = [1, 0, 1, 96]; - var sigRet = sig.slice(0, 1); - var sigParam = sig.slice(1); - var typeCodes = { "i": 127, "j": 126, "f": 125, "d": 124 }; - typeSection.push(sigParam.length); - for (var i = 0; i < sigParam.length; ++i) { - typeSection.push(typeCodes[sigParam[i]]); - } - if (sigRet == "v") { - typeSection.push(0); - } else { - typeSection = typeSection.concat([1, typeCodes[sigRet]]); - } - typeSection[1] = typeSection.length - 2; - var bytes = new Uint8Array([0, 97, 115, 109, 1, 0, 0, 0].concat(typeSection, [2, 7, 1, 1, 101, 1, 102, 0, 0, 7, 5, 1, 1, 102, 0, 0])); - var module2 = new WebAssembly.Module(bytes); - var instance2 = new WebAssembly.Instance(module2, { "e": { "f": func2 } }); - var wrappedFunc = instance2.exports["f"]; - return wrappedFunc; - } - var freeTableIndexes = []; - var functionsInTableMap; - function getEmptyTableSlot() { - if (freeTableIndexes.length) { - return freeTableIndexes.pop(); - } - try { - wasmTable.grow(1); - } catch (err2) { - if (!(err2 instanceof RangeError)) { - throw err2; - } - throw "Unable to grow wasm table. Set ALLOW_TABLE_GROWTH."; - } - return wasmTable.length - 1; - } - function updateTableMap(offset, count22) { - for (var i = offset; i < offset + count22; i++) { - var item = getWasmTableEntry(i); - if (item) { - functionsInTableMap.set(item, i); - } - } - } - var tempRet0 = 0; - var setTempRet0 = (value) => { - tempRet0 = value; - }; var wasmBinary; if (Module["wasmBinary"]) wasmBinary = Module["wasmBinary"]; var noExitRuntime = Module["noExitRuntime"] || true; - if (typeof WebAssembly !== "object") { + if (typeof WebAssembly != "object") { abort("no native wasm support detected"); } var wasmMemory; @@ -4591,102 +4046,38 @@ var require_tfjs_backend_wasm = __commonJS({ abort(text); } } - function getCFunc(ident) { - var func2 = Module["_" + ident]; - return func2; - } - function ccall(ident, returnType, argTypes, args, opts) { - var toC = { "string": function(str) { - var ret2 = 0; - if (str !== null && str !== void 0 && str !== 0) { - var len = (str.length << 2) + 1; - ret2 = stackAlloc(len); - stringToUTF8(str, ret2, len); - } - return ret2; - }, "array": function(arr) { - var ret2 = stackAlloc(arr.length); - writeArrayToMemory(arr, ret2); - return ret2; - } }; - function convertReturnValue(ret2) { - if (returnType === "string") - return UTF8ToString(ret2); - if (returnType === "boolean") - return Boolean(ret2); - return ret2; - } - var func2 = getCFunc(ident); - var cArgs = []; - var stack2 = 0; - if (args) { - for (var i = 0; i < args.length; i++) { - var converter = toC[argTypes[i]]; - if (converter) { - if (stack2 === 0) - stack2 = stackSave(); - cArgs[i] = converter(args[i]); - } else { - cArgs[i] = args[i]; - } - } - } - var ret = func2.apply(null, cArgs); - function onDone(ret2) { - if (stack2 !== 0) - stackRestore(stack2); - return convertReturnValue(ret2); - } - ret = onDone(ret); - return ret; - } - function cwrap(ident, returnType, argTypes, opts) { - argTypes = argTypes || []; - var numericArgs = argTypes.every(function(type) { - return type === "number"; - }); - var numericRet = returnType !== "string"; - if (numericRet && numericArgs && !opts) { - return getCFunc(ident); - } - return function() { - return ccall(ident, returnType, argTypes, arguments, opts); - }; - } - var ALLOC_STACK = 1; - var UTF8Decoder = typeof TextDecoder !== "undefined" ? new TextDecoder("utf8") : void 0; - function UTF8ArrayToString(heap, idx, maxBytesToRead) { + var UTF8Decoder = typeof TextDecoder != "undefined" ? new TextDecoder("utf8") : void 0; + function UTF8ArrayToString(heapOrArray, idx, maxBytesToRead) { var endIdx = idx + maxBytesToRead; var endPtr = idx; - while (heap[endPtr] && !(endPtr >= endIdx)) + while (heapOrArray[endPtr] && !(endPtr >= endIdx)) ++endPtr; - if (endPtr - idx > 16 && heap.subarray && UTF8Decoder) { - return UTF8Decoder.decode(heap.subarray(idx, endPtr)); - } else { - var str = ""; - while (idx < endPtr) { - var u0 = heap[idx++]; - if (!(u0 & 128)) { - str += String.fromCharCode(u0); - continue; - } - var u1 = heap[idx++] & 63; - if ((u0 & 224) == 192) { - str += String.fromCharCode((u0 & 31) << 6 | u1); - continue; - } - var u2 = heap[idx++] & 63; - if ((u0 & 240) == 224) { - u0 = (u0 & 15) << 12 | u1 << 6 | u2; - } else { - u0 = (u0 & 7) << 18 | u1 << 12 | u2 << 6 | heap[idx++] & 63; - } - if (u0 < 65536) { - str += String.fromCharCode(u0); - } else { - var ch = u0 - 65536; - str += String.fromCharCode(55296 | ch >> 10, 56320 | ch & 1023); - } + if (endPtr - idx > 16 && heapOrArray.buffer && UTF8Decoder) { + return UTF8Decoder.decode(heapOrArray.subarray(idx, endPtr)); + } + var str = ""; + while (idx < endPtr) { + var u0 = heapOrArray[idx++]; + if (!(u0 & 128)) { + str += String.fromCharCode(u0); + continue; + } + var u1 = heapOrArray[idx++] & 63; + if ((u0 & 224) == 192) { + str += String.fromCharCode((u0 & 31) << 6 | u1); + continue; + } + var u2 = heapOrArray[idx++] & 63; + if ((u0 & 240) == 224) { + u0 = (u0 & 15) << 12 | u1 << 6 | u2; + } else { + u0 = (u0 & 7) << 18 | u1 << 12 | u2 << 6 | heapOrArray[idx++] & 63; + } + if (u0 < 65536) { + str += String.fromCharCode(u0); + } else { + var ch = u0 - 65536; + str += String.fromCharCode(55296 | ch >> 10, 56320 | ch & 1023); } } return str; @@ -4699,10 +4090,10 @@ var require_tfjs_backend_wasm = __commonJS({ return 0; var startIdx = outIdx; var endIdx = outIdx + maxBytesToWrite - 1; - for (var i = 0; i < str.length; ++i) { - var u = str.charCodeAt(i); + for (var i2 = 0; i2 < str.length; ++i2) { + var u = str.charCodeAt(i2); if (u >= 55296 && u <= 57343) { - var u1 = str.charCodeAt(++i); + var u1 = str.charCodeAt(++i2); u = 65536 + ((u & 1023) << 10) | u1 & 1023; } if (u <= 127) { @@ -4735,40 +4126,6 @@ var require_tfjs_backend_wasm = __commonJS({ function stringToUTF8(str, outPtr, maxBytesToWrite) { return stringToUTF8Array(str, HEAPU8, outPtr, maxBytesToWrite); } - function lengthBytesUTF8(str) { - var len = 0; - for (var i = 0; i < str.length; ++i) { - var u = str.charCodeAt(i); - if (u >= 55296 && u <= 57343) - u = 65536 + ((u & 1023) << 10) | str.charCodeAt(++i) & 1023; - if (u <= 127) - ++len; - else if (u <= 2047) - len += 2; - else if (u <= 65535) - len += 3; - else - len += 4; - } - return len; - } - var UTF16Decoder = typeof TextDecoder !== "undefined" ? new TextDecoder("utf-16le") : void 0; - function writeArrayToMemory(array2, buffer3) { - HEAP8.set(array2, buffer3); - } - function writeAsciiToMemory(str, buffer3, dontAddNull) { - for (var i = 0; i < str.length; ++i) { - HEAP8[buffer3++ >> 0] = str.charCodeAt(i); - } - if (!dontAddNull) - HEAP8[buffer3 >> 0] = 0; - } - function alignUp(x, multiple) { - if (x % multiple > 0) { - x += multiple - x % multiple; - } - return x; - } var buffer2, HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32, HEAPF32, HEAPF64; function updateGlobalBufferAndViews(buf) { buffer2 = buf; @@ -4787,10 +4144,8 @@ var require_tfjs_backend_wasm = __commonJS({ var __ATINIT__ = []; var __ATPOSTRUN__ = []; var runtimeInitialized = false; - var runtimeExited = false; - var runtimeKeepaliveCounter = 0; function keepRuntimeAlive() { - return noExitRuntime || runtimeKeepaliveCounter > 0; + return noExitRuntime; } function preRun() { if (Module["preRun"]) { @@ -4806,9 +4161,6 @@ var require_tfjs_backend_wasm = __commonJS({ runtimeInitialized = true; callRuntimeCallbacks(__ATINIT__); } - function exitRuntime() { - runtimeExited = true; - } function postRun() { if (Module["postRun"]) { if (typeof Module["postRun"] == "function") @@ -4854,8 +4206,6 @@ var require_tfjs_backend_wasm = __commonJS({ } } } - Module["preloadedImages"] = {}; - Module["preloadedAudios"] = {}; function abort(what) { { if (Module["onAbort"]) { @@ -4866,10 +4216,10 @@ var require_tfjs_backend_wasm = __commonJS({ err(what); ABORT = true; EXITSTATUS = 1; - what += ". Build with -s ASSERTIONS=1 for more info."; - var e = new WebAssembly.RuntimeError(what); - readyPromiseReject(e); - throw e; + what += ". Build with -sASSERTIONS for more info."; + var e2 = new WebAssembly.RuntimeError(what); + readyPromiseReject(e2); + throw e2; } var dataURIPrefix = "data:application/octet-stream;base64,"; function isDataURI(filename) { @@ -4890,16 +4240,15 @@ var require_tfjs_backend_wasm = __commonJS({ } if (readBinary) { return readBinary(file); - } else { - throw "both async and sync fetching of the wasm failed"; } + throw "both async and sync fetching of the wasm failed"; } catch (err2) { abort(err2); } } function getBinaryPromise() { if (!wasmBinary && (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER)) { - if (typeof fetch === "function" && !isFileURI(wasmBinaryFile)) { + if (typeof fetch == "function" && !isFileURI(wasmBinaryFile)) { return fetch(wasmBinaryFile, { credentials: "same-origin" }).then(function(response) { if (!response["ok"]) { throw "failed to load wasm binary file at '" + wasmBinaryFile + "'"; @@ -4948,7 +4297,7 @@ var require_tfjs_backend_wasm = __commonJS({ }); } function instantiateAsync() { - if (!wasmBinary && typeof WebAssembly.instantiateStreaming === "function" && !isDataURI(wasmBinaryFile) && !isFileURI(wasmBinaryFile) && typeof fetch === "function") { + if (!wasmBinary && typeof WebAssembly.instantiateStreaming == "function" && !isDataURI(wasmBinaryFile) && !isFileURI(wasmBinaryFile) && !ENVIRONMENT_IS_NODE && typeof fetch == "function") { return fetch(wasmBinaryFile, { credentials: "same-origin" }).then(function(response) { var result = WebAssembly.instantiateStreaming(response, info); return result.then(receiveInstantiationResult, function(reason) { @@ -4965,9 +4314,9 @@ var require_tfjs_backend_wasm = __commonJS({ try { var exports2 = Module["instantiateWasm"](info, receiveInstance); return exports2; - } catch (e) { - err("Module.instantiateWasm callback failed with error: " + e); - return false; + } catch (e2) { + err("Module.instantiateWasm callback failed with error: " + e2); + readyPromiseReject(e2); } } instantiateAsync().catch(readyPromiseReject); @@ -4975,23 +4324,14 @@ var require_tfjs_backend_wasm = __commonJS({ } var tempDouble; var tempI64; + function ExitStatus(status) { + this.name = "ExitStatus"; + this.message = "Program terminated with exit(" + status + ")"; + this.status = status; + } function callRuntimeCallbacks(callbacks2) { while (callbacks2.length > 0) { - var callback = callbacks2.shift(); - if (typeof callback == "function") { - callback(Module); - continue; - } - var func2 = callback.func; - if (typeof func2 === "number") { - if (callback.arg === void 0) { - getWasmTableEntry(func2)(); - } else { - getWasmTableEntry(func2)(callback.arg); - } - } else { - func2(callback.arg === void 0 ? null : callback.arg); - } + callbacks2.shift()(Module); } } function demangle(func2) { @@ -5004,23 +4344,13 @@ var require_tfjs_backend_wasm = __commonJS({ return x === y ? x : y + " [" + x + "]"; }); } - var wasmTableMirror = []; - function getWasmTableEntry(funcPtr) { - var func2 = wasmTableMirror[funcPtr]; - if (!func2) { - if (funcPtr >= wasmTableMirror.length) - wasmTableMirror.length = funcPtr + 1; - wasmTableMirror[funcPtr] = func2 = wasmTable.get(funcPtr); - } - return func2; - } function jsStackTrace() { var error = new Error(); if (!error.stack) { try { throw new Error(); - } catch (e) { - error = e; + } catch (e2) { + error = e2; } if (!error.stack) { return "(no stack trace available)"; @@ -5028,16 +4358,18 @@ var require_tfjs_backend_wasm = __commonJS({ } return error.stack.toString(); } - function setWasmTableEntry(idx, func2) { - wasmTable.set(idx, func2); - wasmTableMirror[idx] = func2; + function writeArrayToMemory(array2, buffer3) { + HEAP8.set(array2, buffer3); } function _abort() { abort(""); } - function _emscripten_get_heap_max() { + function getHeapMax() { return 2147483648; } + function _emscripten_get_heap_max() { + return getHeapMax(); + } function _emscripten_memcpy_big(dest, src, num) { HEAPU8.copyWithin(dest, src, src + num); } @@ -5046,16 +4378,17 @@ var require_tfjs_backend_wasm = __commonJS({ wasmMemory.grow(size2 - buffer2.byteLength + 65535 >>> 16); updateGlobalBufferAndViews(wasmMemory.buffer); return 1; - } catch (e) { + } catch (e2) { } } function _emscripten_resize_heap(requestedSize) { var oldSize = HEAPU8.length; requestedSize = requestedSize >>> 0; - var maxHeapSize = _emscripten_get_heap_max(); + var maxHeapSize = getHeapMax(); if (requestedSize > maxHeapSize) { return false; } + let alignUp = (x, multiple) => x + (multiple - x % multiple) % multiple; for (var cutDown = 1; cutDown <= 4; cutDown *= 2) { var overGrownHeapSize = oldSize * (1 + 0.2 / cutDown); overGrownHeapSize = Math.min(overGrownHeapSize, requestedSize + 100663296); @@ -5067,48 +4400,106 @@ var require_tfjs_backend_wasm = __commonJS({ } return false; } - var SYSCALLS = { mappings: {}, buffers: [null, [], []], printChar: function(stream, curr) { - var buffer3 = SYSCALLS.buffers[stream]; - if (curr === 0 || curr === 10) { - (stream === 1 ? out : err)(UTF8ArrayToString(buffer3, 0)); - buffer3.length = 0; - } else { - buffer3.push(curr); - } - }, varargs: void 0, get: function() { + var SYSCALLS = { varargs: void 0, get: function() { SYSCALLS.varargs += 4; var ret = HEAP32[SYSCALLS.varargs - 4 >> 2]; return ret; }, getStr: function(ptr) { var ret = UTF8ToString(ptr); return ret; - }, get64: function(low, high) { - return low; } }; function _fd_close(fd) { - return 0; + return 52; } function _fd_seek(fd, offset_low, offset_high, whence, newOffset) { + return 70; + } + var printCharBuffers = [null, [], []]; + function printChar(stream, curr) { + var buffer3 = printCharBuffers[stream]; + if (curr === 0 || curr === 10) { + (stream === 1 ? out : err)(UTF8ArrayToString(buffer3, 0)); + buffer3.length = 0; + } else { + buffer3.push(curr); + } } function _fd_write(fd, iov, iovcnt, pnum) { var num = 0; - for (var i = 0; i < iovcnt; i++) { - var ptr = HEAP32[iov >> 2]; - var len = HEAP32[iov + 4 >> 2]; + for (var i2 = 0; i2 < iovcnt; i2++) { + var ptr = HEAPU32[iov >> 2]; + var len = HEAPU32[iov + 4 >> 2]; iov += 8; for (var j = 0; j < len; j++) { - SYSCALLS.printChar(fd, HEAPU8[ptr + j]); + printChar(fd, HEAPU8[ptr + j]); } num += len; } - HEAP32[pnum >> 2] = num; + HEAPU32[pnum >> 2] = num; return 0; } - function _setTempRet0(val) { - setTempRet0(val); + function getCFunc(ident) { + var func2 = Module["_" + ident]; + return func2; } - var ASSERTIONS = false; - var asmLibraryArg = { "abort": _abort, "emscripten_get_heap_max": _emscripten_get_heap_max, "emscripten_memcpy_big": _emscripten_memcpy_big, "emscripten_resize_heap": _emscripten_resize_heap, "fd_close": _fd_close, "fd_seek": _fd_seek, "fd_write": _fd_write, "setTempRet0": _setTempRet0 }; + function ccall(ident, returnType, argTypes, args, opts) { + var toC = { "string": (str) => { + var ret2 = 0; + if (str !== null && str !== void 0 && str !== 0) { + var len = (str.length << 2) + 1; + ret2 = stackAlloc(len); + stringToUTF8(str, ret2, len); + } + return ret2; + }, "array": (arr) => { + var ret2 = stackAlloc(arr.length); + writeArrayToMemory(arr, ret2); + return ret2; + } }; + function convertReturnValue(ret2) { + if (returnType === "string") { + return UTF8ToString(ret2); + } + if (returnType === "boolean") + return Boolean(ret2); + return ret2; + } + var func2 = getCFunc(ident); + var cArgs = []; + var stack2 = 0; + if (args) { + for (var i2 = 0; i2 < args.length; i2++) { + var converter = toC[argTypes[i2]]; + if (converter) { + if (stack2 === 0) + stack2 = stackSave(); + cArgs[i2] = converter(args[i2]); + } else { + cArgs[i2] = args[i2]; + } + } + } + var ret = func2.apply(null, cArgs); + function onDone(ret2) { + if (stack2 !== 0) + stackRestore(stack2); + return convertReturnValue(ret2); + } + ret = onDone(ret); + return ret; + } + function cwrap(ident, returnType, argTypes, opts) { + argTypes = argTypes || []; + var numericArgs = argTypes.every((type) => type === "number" || type === "boolean"); + var numericRet = returnType !== "string"; + if (numericRet && numericArgs && !opts) { + return getCFunc(ident); + } + return function() { + return ccall(ident, returnType, argTypes, arguments, opts); + }; + } + var asmLibraryArg = { "abort": _abort, "emscripten_get_heap_max": _emscripten_get_heap_max, "emscripten_memcpy_big": _emscripten_memcpy_big, "emscripten_resize_heap": _emscripten_resize_heap, "fd_close": _fd_close, "fd_seek": _fd_seek, "fd_write": _fd_write }; var asm = createWasm(); var ___wasm_call_ctors = Module["___wasm_call_ctors"] = function() { return (___wasm_call_ctors = Module["___wasm_call_ctors"] = Module["asm"]["__wasm_call_ctors"]).apply(null, arguments); @@ -5407,9 +4798,6 @@ var require_tfjs_backend_wasm = __commonJS({ var ___errno_location = Module["___errno_location"] = function() { return (___errno_location = Module["___errno_location"] = Module["asm"]["__errno_location"]).apply(null, arguments); }; - var _emscripten_main_thread_process_queued_calls = Module["_emscripten_main_thread_process_queued_calls"] = function() { - return (_emscripten_main_thread_process_queued_calls = Module["_emscripten_main_thread_process_queued_calls"] = Module["asm"]["emscripten_main_thread_process_queued_calls"]).apply(null, arguments); - }; var stackSave = Module["stackSave"] = function() { return (stackSave = Module["stackSave"] = Module["asm"]["stackSave"]).apply(null, arguments); }; @@ -5427,11 +4815,6 @@ var require_tfjs_backend_wasm = __commonJS({ }; Module["cwrap"] = cwrap; var calledRun; - function ExitStatus(status) { - this.name = "ExitStatus"; - this.message = "Program terminated with exit(" + status + ")"; - this.status = status; - } dependenciesFulfilled = function runCaller() { if (!calledRun) run(); @@ -5472,16 +4855,6 @@ var require_tfjs_backend_wasm = __commonJS({ doRun(); } } - Module["run"] = run; - function procExit(code) { - EXITSTATUS = code; - if (!keepRuntimeAlive()) { - if (Module["onExit"]) - Module["onExit"](code); - ABORT = true; - } - quit_(code, new ExitStatus(code)); - } if (Module["preInit"]) { if (typeof Module["preInit"] == "function") Module["preInit"] = [Module["preInit"]]; @@ -5646,19 +5019,19 @@ function swap(object2, left, right) { } function sum(arr) { let sum7 = 0; - for (let i = 0; i < arr.length; i++) { - sum7 += arr[i]; + for (let i2 = 0; i2 < arr.length; i2++) { + sum7 += arr[i2]; } return sum7; } function randUniform(a, b) { - const r = Math.random(); - return b * r + (1 - r) * a; + const r2 = Math.random(); + return b * r2 + (1 - r2) * a; } function distSquared(a, b) { let result = 0; - for (let i = 0; i < a.length; i++) { - const diff = Number(a[i]) - Number(b[i]); + for (let i2 = 0; i2 < a.length; i2++) { + const diff = Number(a[i2]) - Number(b[i2]); result += diff * diff; } return result; @@ -5679,8 +5052,8 @@ function flatten(arr, result = [], skipTypedArray = false) { result = []; } if (Array.isArray(arr) || isTypedArray(arr) && !skipTypedArray) { - for (let i = 0; i < arr.length; ++i) { - flatten(arr[i], result, skipTypedArray); + for (let i2 = 0; i2 < arr.length; ++i2) { + flatten(arr[i2], result, skipTypedArray); } } else { result.push(arr); @@ -5692,8 +5065,8 @@ function sizeFromShape(shape) { return 1; } let size2 = shape[0]; - for (let i = 1; i < shape.length; i++) { - size2 *= shape[i]; + for (let i2 = 1; i2 < shape.length; i2++) { + size2 *= shape[i2]; } return size2; } @@ -5710,8 +5083,8 @@ function arraysEqual(n1, n2) { if (n1.length !== n2.length) { return false; } - for (let i = 0; i < n1.length; i++) { - if (n1[i] !== n2[i]) { + for (let i2 = 0; i2 < n1.length; i2++) { + if (n1[i2] !== n2[i2]) { return false; } } @@ -5737,10 +5110,10 @@ function sizeToSquarishShape(size2) { const width = Math.ceil(Math.sqrt(size2)); return [width, Math.ceil(size2 / width)]; } -function createShuffledIndices(n) { - const shuffledIndices = new Uint32Array(n); - for (let i = 0; i < n; ++i) { - shuffledIndices[i] = i; +function createShuffledIndices(n2) { + const shuffledIndices = new Uint32Array(n2); + for (let i2 = 0; i2 < n2; ++i2) { + shuffledIndices[i2] = i2; } shuffle(shuffledIndices); return shuffledIndices; @@ -5751,7 +5124,7 @@ function rightPad(a, size2) { } return a + " ".repeat(size2 - a.length); } -function repeatedTry(checkFn, delayFn = (counter) => 0, maxCounter) { +function repeatedTry(checkFn, delayFn = (counter) => 0, maxCounter, scheduleFn = setTimeout) { return new Promise((resolve, reject) => { let tryCount = 0; const tryFn = () => { @@ -5765,7 +5138,7 @@ function repeatedTry(checkFn, delayFn = (counter) => 0, maxCounter) { reject(); return; } - setTimeout(tryFn, nextBackoff); + scheduleFn(tryFn, nextBackoff); }; tryFn(); }); @@ -5773,16 +5146,16 @@ function repeatedTry(checkFn, delayFn = (counter) => 0, maxCounter) { function inferFromImplicitShape(shape, size2) { let shapeProd = 1; let implicitIdx = -1; - for (let i = 0; i < shape.length; ++i) { - if (shape[i] >= 0) { - shapeProd *= shape[i]; - } else if (shape[i] === -1) { + for (let i2 = 0; i2 < shape.length; ++i2) { + if (shape[i2] >= 0) { + shapeProd *= shape[i2]; + } else if (shape[i2] === -1) { if (implicitIdx !== -1) { - throw Error(`Shapes can only have 1 implicit size. Found -1 at dim ${implicitIdx} and dim ${i}`); + throw Error(`Shapes can only have 1 implicit size. Found -1 at dim ${implicitIdx} and dim ${i2}`); } - implicitIdx = i; - } else if (shape[i] < 0) { - throw Error(`Shapes can not be < 0. Found ${shape[i]} at dim ${i}`); + implicitIdx = i2; + } else if (shape[i2] < 0) { + throw Error(`Shapes can not be < 0. Found ${shape[i2]} at dim ${i2}`); } } if (implicitIdx === -1) { @@ -5803,7 +5176,7 @@ function inferFromImplicitShape(shape, size2) { } function parseAxisParam(axis, shape) { const rank = shape.length; - axis = axis == null ? shape.map((s, i) => i) : [].concat(axis); + axis = axis == null ? shape.map((s2, i2) => i2) : [].concat(axis); assert(axis.every((ax) => ax >= -rank && ax < rank), () => `All values in axis param must be in range [-${rank}, ${rank}) but got axis ${axis}`); assert(axis.every((ax) => isInt(ax)), () => `All values in axis param must be integers but got axis ${axis}`); return axis.map((a) => a < 0 ? rank + a : a); @@ -5814,22 +5187,22 @@ function squeezeShape(shape, axis) { const isEmptyArray = axis != null && Array.isArray(axis) && axis.length === 0; const axes = axis == null || isEmptyArray ? null : parseAxisParam(axis, shape).sort(); let j = 0; - for (let i = 0; i < shape.length; ++i) { + for (let i2 = 0; i2 < shape.length; ++i2) { if (axes != null) { - if (axes[j] === i && shape[i] !== 1) { - throw new Error(`Can't squeeze axis ${i} since its dim '${shape[i]}' is not 1`); + if (axes[j] === i2 && shape[i2] !== 1) { + throw new Error(`Can't squeeze axis ${i2} since its dim '${shape[i2]}' is not 1`); } - if ((axes[j] == null || axes[j] > i) && shape[i] === 1) { - newShape.push(shape[i]); - keptDims.push(i); + if ((axes[j] == null || axes[j] > i2) && shape[i2] === 1) { + newShape.push(shape[i2]); + keptDims.push(i2); } - if (axes[j] <= i) { + if (axes[j] <= i2) { j++; } } - if (shape[i] !== 1) { - newShape.push(shape[i]); - keptDims.push(i); + if (shape[i2] !== 1) { + newShape.push(shape[i2]); + keptDims.push(i2); } } return { newShape, keptDims }; @@ -5863,8 +5236,8 @@ function getArrayFromDType(dtype, size2) { return values; } function checkConversionForErrors(vals, dtype) { - for (let i = 0; i < vals.length; i++) { - const num = vals[i]; + for (let i2 = 0; i2 < vals.length; i2++) { + const num = vals[i2]; if (isNaN(num) || !isFinite(num)) { throw Error(`A tensor of type ${dtype} being uploaded contains ${num}.`); } @@ -5940,9 +5313,9 @@ function isFunction(f) { return !!(f && f.constructor && f.call && f.apply); } function nearestDivisor(size2, start) { - for (let i = start; i < size2; ++i) { - if (size2 % i === 0) { - return i; + for (let i2 = start; i2 < size2; ++i2) { + if (size2 % i2 === 0) { + return i2; } } return size2; @@ -5954,8 +5327,8 @@ function computeStrides(shape) { } const strides2 = new Array(rank - 1); strides2[rank - 2] = shape[rank - 1]; - for (let i = rank - 3; i >= 0; --i) { - strides2[i] = strides2[i + 1] * shape[i + 1]; + for (let i2 = rank - 3; i2 >= 0; --i2) { + strides2[i2] = strides2[i2 + 1] * shape[i2 + 1]; } return strides2; } @@ -5963,15 +5336,15 @@ function createNestedArray(offset, shape, a, isComplex = false) { const ret = new Array(); if (shape.length === 1) { const d = shape[0] * (isComplex ? 2 : 1); - for (let i = 0; i < d; i++) { - ret[i] = a[offset + i]; + for (let i2 = 0; i2 < d; i2++) { + ret[i2] = a[offset + i2]; } } else { const d = shape[0]; const rest = shape.slice(1); const len = rest.reduce((acc, c) => acc * c) * (isComplex ? 2 : 1); - for (let i = 0; i < d; i++) { - ret[i] = createNestedArray(offset + i * len, rest, a, isComplex); + for (let i2 = 0; i2 < d; i2++) { + ret[i2] = createNestedArray(offset + i2 * len, rest, a, isComplex); } } return ret; @@ -5991,8 +5364,8 @@ function toNestedArray(shape, a, isComplex = false) { } function makeOnesTypedArray(size2, dtype) { const array2 = makeZerosTypedArray(size2, dtype); - for (let i = 0; i < array2.length; i++) { - array2[i] = 1; + for (let i2 = 0; i2 < array2.length; i2++) { + array2[i2] = 1; } return array2; } @@ -6031,8 +5404,8 @@ function locToIndex(locs, rank, strides2) { return locs[0]; } let index2 = locs[locs.length - 1]; - for (let i = 0; i < locs.length - 1; ++i) { - index2 += strides2[i] * locs[i]; + for (let i2 = 0; i2 < locs.length - 1; ++i2) { + index2 += strides2[i2] * locs[i2]; } return index2; } @@ -6043,9 +5416,9 @@ function indexToLoc(index2, rank, strides2) { return [index2]; } const locs = new Array(rank); - for (let i = 0; i < locs.length - 1; ++i) { - locs[i] = Math.floor(index2 / strides2[i]); - index2 -= locs[i] * strides2[i]; + for (let i2 = 0; i2 < locs.length - 1; ++i2) { + locs[i2] = Math.floor(index2 / strides2[i2]); + index2 -= locs[i2] * strides2[i2]; } locs[locs.length - 1] = index2; return locs; @@ -6151,9 +5524,9 @@ var Environment = class { }; function getQueryParams(queryString) { const params = {}; - queryString.replace(/[?&]([^=?&]+)(?:=([^&]*))?/g, (s, ...t2) => { - decodeParam(params, t2[0], t2[1]); - return t2.join("="); + queryString.replace(/[?&]([^=?&]+)(?:=([^&]*))?/g, (s2, ...t22) => { + decodeParam(params, t22[0], t22[1]); + return t22.join("="); }); return params; } @@ -6327,6 +5700,7 @@ var Pool = "Pool"; var Pow = "Pow"; var Prelu = "Prelu"; var Prod = "Prod"; +var RaggedGather = "RaggedGather"; var RaggedTensorToTensor = "RaggedTensorToTensor"; var Range = "Range"; var Real = "Real"; @@ -6529,15 +5903,15 @@ var k2 = hexToLong("9ae16a3b2f90404f"); function shiftMix(val) { return val.xor(val.shru(47)); } -function fetch2(s, offset, numBytes) { - const bytes = s.slice(offset, offset + numBytes); +function fetch2(s2, offset, numBytes) { + const bytes = s2.slice(offset, offset + numBytes); return Long.fromBytes(Array.from(bytes), true, true); } -function fetch64(s, offset) { - return fetch2(s, offset, 8); +function fetch64(s2, offset) { + return fetch2(s2, offset, 8); } -function fetch32(s, offset) { - return fetch2(s, offset, 4); +function fetch32(s2, offset) { + return fetch2(s2, offset, 4); } function rotate64(val, shift) { return shift === 0 ? val : val.shru(shift).or(val.shl(64 - shift)); @@ -6559,83 +5933,83 @@ function weakHashLen32WithSeeds(w, x, y, z, a, b) { b = b.add(rotate64(a, 44)); return [a.add(z), b.add(c)]; } -function weakHashLen32WithSeedsStr(s, offset, a, b) { - return weakHashLen32WithSeeds(fetch64(s, offset), fetch64(s, offset + 8), fetch64(s, offset + 16), fetch64(s, offset + 24), a, b); +function weakHashLen32WithSeedsStr(s2, offset, a, b) { + return weakHashLen32WithSeeds(fetch64(s2, offset), fetch64(s2, offset + 8), fetch64(s2, offset + 16), fetch64(s2, offset + 24), a, b); } -function hashLen0to16(s, len = s.length) { +function hashLen0to16(s2, len = s2.length) { if (len >= 8) { const mul2 = k2.add(len * 2); - const a = fetch64(s, 0).add(k2); - const b = fetch64(s, len - 8); + const a = fetch64(s2, 0).add(k2); + const b = fetch64(s2, len - 8); const c = rotate64(b, 37).mul(mul2).add(a); const d = rotate64(a, 25).add(b).mul(mul2); return hashLen16(c, d, mul2); } if (len >= 4) { const mul2 = k2.add(len * 2); - const a = fetch32(s, 0); - return hashLen16(a.shl(3).add(len), fetch32(s, len - 4), mul2); + const a = fetch32(s2, 0); + return hashLen16(a.shl(3).add(len), fetch32(s2, len - 4), mul2); } if (len > 0) { - const a = s[0]; - const b = s[len >> 1]; - const c = s[len - 1]; + const a = s2[0]; + const b = s2[len >> 1]; + const c = s2[len - 1]; const y = a + (b << 8); const z = len + (c << 2); return shiftMix(k2.mul(y).xor(k0.mul(z))).mul(k2); } return k2; } -function hashLen17to32(s, len = s.length) { +function hashLen17to32(s2, len = s2.length) { const mul2 = k2.add(len * 2); - const a = fetch64(s, 0).mul(k1); - const b = fetch64(s, 8); - const c = fetch64(s, len - 8).mul(mul2); - const d = fetch64(s, len - 16).mul(k2); + const a = fetch64(s2, 0).mul(k1); + const b = fetch64(s2, 8); + const c = fetch64(s2, len - 8).mul(mul2); + const d = fetch64(s2, len - 16).mul(k2); return hashLen16(rotate64(a.add(b), 43).add(rotate64(c, 30)).add(d), a.add(rotate64(b.add(k2), 18)).add(c), mul2); } -function hashLen33to64(s, len = s.length) { +function hashLen33to64(s2, len = s2.length) { const mul2 = k2.add(len * 2); - const a = fetch64(s, 0).mul(k2); - const b = fetch64(s, 8); - const c = fetch64(s, len - 8).mul(mul2); - const d = fetch64(s, len - 16).mul(k2); + const a = fetch64(s2, 0).mul(k2); + const b = fetch64(s2, 8); + const c = fetch64(s2, len - 8).mul(mul2); + const d = fetch64(s2, len - 16).mul(k2); const y = rotate64(a.add(b), 43).add(rotate64(c, 30)).add(d); const z = hashLen16(y, a.add(rotate64(b.add(k2), 18)).add(c), mul2); - const e = fetch64(s, 16).mul(mul2); - const f = fetch64(s, 24); - const g = y.add(fetch64(s, len - 32)).mul(mul2); - const h = z.add(fetch64(s, len - 24)).mul(mul2); - return hashLen16(rotate64(e.add(f), 43).add(rotate64(g, 30)).add(h), e.add(rotate64(f.add(a), 18)).add(g), mul2); + const e2 = fetch64(s2, 16).mul(mul2); + const f = fetch64(s2, 24); + const g = y.add(fetch64(s2, len - 32)).mul(mul2); + const h = z.add(fetch64(s2, len - 24)).mul(mul2); + return hashLen16(rotate64(e2.add(f), 43).add(rotate64(g, 30)).add(h), e2.add(rotate64(f.add(a), 18)).add(g), mul2); } -function fingerPrint64(s, len = s.length) { +function fingerPrint64(s2, len = s2.length) { const seed = Long.fromNumber(81, true); if (len <= 32) { if (len <= 16) { - return hashLen0to16(s, len); + return hashLen0to16(s2, len); } else { - return hashLen17to32(s, len); + return hashLen17to32(s2, len); } } else if (len <= 64) { - return hashLen33to64(s, len); + return hashLen33to64(s2, len); } let x = seed; let y = seed.mul(k1).add(113); let z = shiftMix(y.mul(k2).add(113)).mul(k2); let v = [Long.UZERO, Long.UZERO]; let w = [Long.UZERO, Long.UZERO]; - x = x.mul(k2).add(fetch64(s, 0)); + x = x.mul(k2).add(fetch64(s2, 0)); let offset = 0; const end = (len - 1 >> 6) * 64; const last64 = end + (len - 1 & 63) - 63; do { - x = rotate64(x.add(y).add(v[0]).add(fetch64(s, offset + 8)), 37).mul(k1); - y = rotate64(y.add(v[1]).add(fetch64(s, offset + 48)), 42).mul(k1); + x = rotate64(x.add(y).add(v[0]).add(fetch64(s2, offset + 8)), 37).mul(k1); + y = rotate64(y.add(v[1]).add(fetch64(s2, offset + 48)), 42).mul(k1); x = x.xor(w[1]); - y = y.add(v[0]).add(fetch64(s, offset + 40)); + y = y.add(v[0]).add(fetch64(s2, offset + 40)); z = rotate64(z.add(w[0]), 33).mul(k1); - v = weakHashLen32WithSeedsStr(s, offset, v[1].mul(k1), x.add(w[0])); - w = weakHashLen32WithSeedsStr(s, offset + 32, z.add(w[1]), y.add(fetch64(s, offset + 16))); + v = weakHashLen32WithSeedsStr(s2, offset, v[1].mul(k1), x.add(w[0])); + w = weakHashLen32WithSeedsStr(s2, offset + 32, z.add(w[1]), y.add(fetch64(s2, offset + 16))); [z, x] = [x, z]; offset += 64; } while (offset !== end); @@ -6644,13 +6018,13 @@ function fingerPrint64(s, len = s.length) { w[0] = w[0].add(len - 1 & 63); v[0] = v[0].add(w[0]); w[0] = w[0].add(v[0]); - x = rotate64(x.add(y).add(v[0]).add(fetch64(s, offset + 8)), 37).mul(mul2); - y = rotate64(y.add(v[1]).add(fetch64(s, offset + 48)), 42).mul(mul2); + x = rotate64(x.add(y).add(v[0]).add(fetch64(s2, offset + 8)), 37).mul(mul2); + y = rotate64(y.add(v[1]).add(fetch64(s2, offset + 48)), 42).mul(mul2); x = x.xor(w[1].mul(9)); - y = y.add(v[0].mul(9).add(fetch64(s, offset + 40))); + y = y.add(v[0].mul(9).add(fetch64(s2, offset + 40))); z = rotate64(z.add(w[0]), 33).mul(mul2); - v = weakHashLen32WithSeedsStr(s, offset, v[1].mul(mul2), x.add(w[0])); - w = weakHashLen32WithSeedsStr(s, offset + 32, z.add(w[1]), y.add(fetch64(s, offset + 16))); + v = weakHashLen32WithSeedsStr(s2, offset, v[1].mul(mul2), x.add(w[0])); + w = weakHashLen32WithSeedsStr(s2, offset + 32, z.add(w[1]), y.add(fetch64(s2, offset + 16))); [z, x] = [x, z]; return hashLen16(hashLen16(v[0], w[0], mul2).add(shiftMix(y).mul(k0)).add(z), hashLen16(v[1], w[1], mul2).add(x), mul2); } @@ -6682,9 +6056,9 @@ function toTypedArray(a, dtype) { return new Int32Array(a); } else if (dtype === "bool") { const bool = new Uint8Array(a.length); - for (let i = 0; i < bool.length; ++i) { - if (Math.round(a[i]) !== 0) { - bool[i] = 1; + for (let i2 = 0; i2 < bool.length; ++i2) { + if (Math.round(a[i2]) !== 0) { + bool[i2] = 1; } } return bool; @@ -6698,9 +6072,9 @@ function now2() { function fetch3(path, requestInits) { return env().platform.fetch(path, requestInits); } -function encodeString(s, encoding = "utf-8") { +function encodeString(s2, encoding = "utf-8") { encoding = encoding || "utf-8"; - return env().platform.encode(s, encoding); + return env().platform.encode(s2, encoding); } function decodeString(bytes, encoding = "utf-8") { encoding = encoding || "utf-8"; @@ -6731,8 +6105,8 @@ var Profiler = class { timer = Promise.resolve({ kernelMs: now2() - start }); } if (env().getBool("CHECK_COMPUTATION_FOR_ERRORS")) { - for (let i = 0; i < outputs.length; i++) { - const output = outputs[i]; + for (let i2 = 0; i2 < outputs.length; i2++) { + const output = outputs[i2]; output.data().then((tensorVals) => { checkComputationForErrors(tensorVals, output.dtype, kernelName); }); @@ -6760,8 +6134,8 @@ function checkComputationForErrors(vals, dtype, kernelName) { if (dtype !== "float32") { return false; } - for (let i = 0; i < vals.length; i++) { - const num = vals[i]; + for (let i2 = 0; i2 < vals.length; i2++) { + const num = vals[i2]; if (isNaN(num) || !isFinite(num)) { console.warn(`Found ${num} in the result of '${kernelName}'`); return true; @@ -6791,11 +6165,11 @@ var Logger = class { function getFilteredNodesXToY(tape, xs, y) { const tensorsFromX = {}; const nodesFromX = {}; - for (let i = 0; i < xs.length; i++) { - tensorsFromX[xs[i].id] = true; + for (let i2 = 0; i2 < xs.length; i2++) { + tensorsFromX[xs[i2].id] = true; } - for (let i = 0; i < tape.length; i++) { - const node2 = tape[i]; + for (let i2 = 0; i2 < tape.length; i2++) { + const node2 = tape[i2]; const nodeInputs = node2.inputs; for (const inputName in nodeInputs) { const input2 = nodeInputs[inputName]; @@ -6816,8 +6190,8 @@ function getFilteredNodesXToY(tape, xs, y) { const tensorsLeadToY = {}; tensorsLeadToY[y.id] = true; const nodesToY = {}; - for (let i = tape.length - 1; i >= 0; i--) { - const node2 = tape[i]; + for (let i2 = tape.length - 1; i2 >= 0; i2--) { + const node2 = tape[i2]; const nodeInputs = node2.inputs; for (let j = 0; j < node2.outputs.length; j++) { if (tensorsLeadToY[node2.outputs[j].id]) { @@ -6830,8 +6204,8 @@ function getFilteredNodesXToY(tape, xs, y) { } } const filteredTape = []; - for (let i = 0; i < tape.length; i++) { - const node2 = tape[i]; + for (let i2 = 0; i2 < tape.length; i2++) { + const node2 = tape[i2]; if (nodesFromX[node2.id] && nodesToY[node2.id]) { const prunedInputs = {}; for (const inputName in node2.inputs) { @@ -6849,8 +6223,8 @@ function getFilteredNodesXToY(tape, xs, y) { return filteredTape; } function backpropagateGradients(tensorAccumulatedGradientMap, filteredTape, tidy2, add5) { - for (let i = filteredTape.length - 1; i >= 0; i--) { - const node2 = filteredTape[i]; + for (let i2 = filteredTape.length - 1; i2 >= 0; i2--) { + const node2 = filteredTape[i2]; const dys = []; node2.outputs.forEach((o) => { const gradTensor = tensorAccumulatedGradientMap[o.id]; @@ -6901,17 +6275,17 @@ function tensorToString(vals, shape, dtype, verbose) { lines2.push(` shape: [${shape}]`); lines2.push(` values:`); } - lines2.push(valsLines.map((l) => " " + l).join("\n")); + lines2.push(valsLines.map((l3) => " " + l3).join("\n")); return lines2.join("\n"); } function computeMaxSizePerColumn(vals, shape, dtype, strides2) { - const n = sizeFromShape(shape); + const n2 = sizeFromShape(shape); const numCols = strides2[strides2.length - 1]; const padPerCol = new Array(numCols).fill(0); const rank = shape.length; const valuesOrTuples = dtype === "complex64" ? createComplexTuples(vals) : vals; if (rank > 1) { - for (let row = 0; row < n / numCols; row++) { + for (let row = 0; row < n2 / numCols; row++) { const offset = row * numCols; for (let j = 0; j < numCols; j++) { padPerCol[j] = Math.max(padPerCol[j], valToString(valuesOrTuples[offset + j], 0, dtype).length); @@ -6960,12 +6334,12 @@ function subTensorToString(vals, shape, dtype, strides2, padPerCol, isLast = tru lastVals = createComplexTuples(lastVals); } return [ - "[" + firstVals.map((x, i) => valToString(x, padPerCol[i], dtype)).join(", ") + ", ..., " + lastVals.map((x, i) => valToString(x, padPerCol[size2 - FORMAT_NUM_FIRST_LAST_VALS + i], dtype)).join(", ") + "]" + "[" + firstVals.map((x, i2) => valToString(x, padPerCol[i2], dtype)).join(", ") + ", ..., " + lastVals.map((x, i2) => valToString(x, padPerCol[size2 - FORMAT_NUM_FIRST_LAST_VALS + i2], dtype)).join(", ") + "]" ]; } const displayVals = dtype === "complex64" ? createComplexTuples(vals) : Array.from(vals); return [ - "[" + displayVals.map((x, i) => valToString(x, padPerCol[i], dtype)).join(", ") + "]" + "[" + displayVals.map((x, i2) => valToString(x, padPerCol[i2], dtype)).join(", ") + "]" ]; } const subshape = shape.slice(1); @@ -6973,31 +6347,31 @@ function subTensorToString(vals, shape, dtype, strides2, padPerCol, isLast = tru const stride = strides2[0] * storagePerElement; const lines2 = []; if (size2 > FORMAT_LIMIT_NUM_VALS) { - for (let i = 0; i < FORMAT_NUM_FIRST_LAST_VALS; i++) { - const start = i * stride; + for (let i2 = 0; i2 < FORMAT_NUM_FIRST_LAST_VALS; i2++) { + const start = i2 * stride; const end = start + stride; lines2.push(...subTensorToString(vals.slice(start, end), subshape, dtype, substrides, padPerCol, false)); } lines2.push("..."); - for (let i = size2 - FORMAT_NUM_FIRST_LAST_VALS; i < size2; i++) { - const start = i * stride; + for (let i2 = size2 - FORMAT_NUM_FIRST_LAST_VALS; i2 < size2; i2++) { + const start = i2 * stride; const end = start + stride; - lines2.push(...subTensorToString(vals.slice(start, end), subshape, dtype, substrides, padPerCol, i === size2 - 1)); + lines2.push(...subTensorToString(vals.slice(start, end), subshape, dtype, substrides, padPerCol, i2 === size2 - 1)); } } else { - for (let i = 0; i < size2; i++) { - const start = i * stride; + for (let i2 = 0; i2 < size2; i2++) { + const start = i2 * stride; const end = start + stride; - lines2.push(...subTensorToString(vals.slice(start, end), subshape, dtype, substrides, padPerCol, i === size2 - 1)); + lines2.push(...subTensorToString(vals.slice(start, end), subshape, dtype, substrides, padPerCol, i2 === size2 - 1)); } } const sep = rank === 2 ? "," : ""; lines2[0] = "[" + lines2[0] + sep; - for (let i = 1; i < lines2.length - 1; i++) { - lines2[i] = " " + lines2[i] + sep; + for (let i2 = 1; i2 < lines2.length - 1; i2++) { + lines2[i2] = " " + lines2[i2] + sep; } let newLineSep = ",\n"; - for (let i = 2; i < rank; i++) { + for (let i2 = 2; i2 < rank; i2++) { newLineSep += "\n"; } lines2[lines2.length - 1] = " " + lines2[lines2.length - 1] + "]" + (isLast ? "" : newLineSep); @@ -7005,8 +6379,8 @@ function subTensorToString(vals, shape, dtype, strides2, padPerCol, isLast = tru } function createComplexTuples(vals) { const complexTuples = []; - for (let i = 0; i < vals.length; i += 2) { - complexTuples.push([vals[i], vals[i + 1]]); + for (let i2 = 0; i2 < vals.length; i2 += 2) { + complexTuples.push([vals[i2], vals[i2 + 1]]); } return complexTuples; } @@ -7016,8 +6390,8 @@ var TensorBuffer = class { this.shape = shape.slice(); this.size = sizeFromShape(shape); if (values != null) { - const n = values.length; - assert(n === this.size, () => `Length of values '${n}' does not match the size inferred by the shape '${this.size}'.`); + const n2 = values.length; + assert(n2 === this.size, () => `Length of values '${n2}' does not match the size inferred by the shape '${this.size}'.`); } if (dtype === "complex64") { throw new Error(`complex64 dtype TensorBuffers are not supported. Please create a TensorBuffer for the real and imaginary parts separately and call tf.complex(real, imag).`); @@ -7037,17 +6411,17 @@ var TensorBuffer = class { if (locs.length === 0) { locs = [0]; } - let i = 0; + let i2 = 0; for (const loc of locs) { - if (loc < 0 || loc >= this.shape[i]) { + if (loc < 0 || loc >= this.shape[i2]) { const msg = `Requested out of range element at ${locs}. Buffer shape=${this.shape}`; throw new Error(msg); } - i++; + i2++; } let index2 = locs[locs.length - 1]; - for (let i2 = 0; i2 < locs.length - 1; ++i2) { - index2 += this.strides[i2] * locs[i2]; + for (let i3 = 0; i3 < locs.length - 1; ++i3) { + index2 += this.strides[i3] * locs[i3]; } return this.values[index2]; } @@ -7058,8 +6432,8 @@ var TensorBuffer = class { return locs[0]; } let index2 = locs[locs.length - 1]; - for (let i = 0; i < locs.length - 1; ++i) { - index2 += this.strides[i] * locs[i]; + for (let i2 = 0; i2 < locs.length - 1; ++i2) { + index2 += this.strides[i2] * locs[i2]; } return index2; } @@ -7070,9 +6444,9 @@ var TensorBuffer = class { return [index2]; } const locs = new Array(this.shape.length); - for (let i = 0; i < locs.length - 1; ++i) { - locs[i] = Math.floor(index2 / this.strides[i]); - index2 -= locs[i] * this.strides[i]; + for (let i2 = 0; i2 < locs.length - 1; ++i2) { + locs[i2] = Math.floor(index2 / this.strides[i2]); + index2 -= locs[i2] * this.strides[i2]; } locs[locs.length - 1] = index2; return locs; @@ -7393,8 +6767,8 @@ var Engine = class { return; } const sortedBackends = this.getSortedBackends(); - for (let i = 0; i < sortedBackends.length; i++) { - const backendName = sortedBackends[i]; + for (let i2 = 0; i2 < sortedBackends.length; i2++) { + const backendName = sortedBackends[i2]; const success = await this.initializeBackend(backendName).success; if (success) { await this.setBackend(backendName); @@ -7546,8 +6920,8 @@ var Engine = class { } initializeBackendsAndReturnBest() { const sortedBackends = this.getSortedBackends(); - for (let i = 0; i < sortedBackends.length; i++) { - const backendName = sortedBackends[i]; + for (let i2 = 0; i2 < sortedBackends.length; i2++) { + const backendName = sortedBackends[i2]; const { success, asyncInit } = this.initializeBackend(backendName); if (asyncInit || success) { return { name: backendName, asyncInit }; @@ -7764,7 +7138,7 @@ var Engine = class { } else { inputTensorsToSave = inputsToSave.map((inputName) => inputs[inputName]); } - const outputTensorsToSave = outputs.filter((_, i) => outputsToSave[i]); + const outputTensorsToSave = outputs.filter((_, i2) => outputsToSave[i2]); return inputTensorsToSave.concat(outputTensorsToSave); } return []; @@ -7780,15 +7154,15 @@ var Engine = class { backendVals = values.map((d) => encodeString(d)); } const dataId = backend2.write(backendVals, shape, dtype); - const t2 = new Tensor(shape, dtype, dataId, this.nextTensorId()); - this.trackTensor(t2, backend2); + const t22 = new Tensor(shape, dtype, dataId, this.nextTensorId()); + this.trackTensor(t22, backend2); if (dtype === "string") { const info = this.state.tensorInfo.get(dataId); const newBytes = bytesFromStringArray(backendVals); this.state.numBytes += newBytes - info.bytes; info.bytes = newBytes; } - return t2; + return t22; } makeTensorFromDataId(dataId, shape, dtype, backend2) { dtype = dtype || "float32"; @@ -7797,9 +7171,9 @@ var Engine = class { } makeTensorFromTensorInfo(tensorInfo, backend2) { const { dataId, shape, dtype } = tensorInfo; - const t2 = new Tensor(shape, dtype, dataId, this.nextTensorId()); - this.trackTensor(t2, backend2); - return t2; + const t22 = new Tensor(shape, dtype, dataId, this.nextTensorId()); + this.trackTensor(t22, backend2); + return t22; } makeVariable(initialValue, trainable = true, name, dtype) { name = name || this.nextVariableId().toString(); @@ -7918,9 +7292,9 @@ var Engine = class { } if (gradientsFunc != null) { tapeNode.gradient = (dys) => { - dys = dys.map((dy, i) => { + dys = dys.map((dy, i2) => { if (dy == null) { - const output = outputs[i]; + const output = outputs[i2]; const vals = makeZerosTypedArray(output.size, output.dtype); return this.makeTensor(vals, output.shape, output.dtype); } @@ -7958,9 +7332,9 @@ var Engine = class { } endScope(result) { const tensorsToTrackInParent = getTensorsInContainer(result); - const tensorsToTrackInParentSet = new Set(tensorsToTrackInParent.map((t2) => t2.id)); - for (let i = 0; i < this.state.activeScope.track.length; i++) { - const tensor2 = this.state.activeScope.track[i]; + const tensorsToTrackInParentSet = new Set(tensorsToTrackInParent.map((t22) => t22.id)); + for (let i2 = 0; i2 < this.state.activeScope.track.length; i2++) { + const tensor2 = this.state.activeScope.track[i2]; if (!tensor2.kept && !tensorsToTrackInParentSet.has(tensor2.id)) { tensor2.dispose(); } @@ -8008,11 +7382,11 @@ var Engine = class { customGrad(f) { assert(isFunction(f), () => "The f passed in customGrad(f) must be a function."); return (...inputs) => { - assert(inputs.every((t2) => t2 instanceof Tensor), () => "The args passed in customGrad(f)(x1, x2,...) must all be tensors"); + assert(inputs.every((t22) => t22 instanceof Tensor), () => "The args passed in customGrad(f)(x1, x2,...) must all be tensors"); let res; const inputMap = {}; - inputs.forEach((input2, i) => { - inputMap[i] = input2; + inputs.forEach((input2, i2) => { + inputMap[i2] = input2; }); const forwardFunc = (_, save) => { res = f(...[...inputs, save]); @@ -8024,10 +7398,10 @@ var Engine = class { const gradRes = res.gradFunc(dy, saved); const grads2 = Array.isArray(gradRes) ? gradRes : [gradRes]; assert(grads2.length === inputs.length, () => "The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function that returns the same number of tensors as inputs passed to f(...)."); - assert(grads2.every((t2) => t2 instanceof Tensor), () => "The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function that returns a list of only tensors."); + assert(grads2.every((t22) => t22 instanceof Tensor), () => "The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function that returns a list of only tensors."); const gradMap = {}; - grads2.forEach((grad2, i) => { - gradMap[i] = () => grad2; + grads2.forEach((grad2, i2) => { + gradMap[i2] = () => grad2; }); return gradMap; }; @@ -8155,6 +7529,7 @@ ENV2.registerFlag("CHECK_COMPUTATION_FOR_ERRORS", () => true); ENV2.registerFlag("WRAP_TO_IMAGEBITMAP", () => false); ENV2.registerFlag("ENGINE_COMPILE_ONLY", () => false); ENV2.registerFlag("CANVAS2D_WILL_READ_FREQUENTLY_FOR_GPU", () => false); +ENV2.registerFlag("USE_SETTIMEOUTCUSTOM", () => false); function inferShape(val, dtype) { let firstElem = val; if (isTypedArray(val)) { @@ -8182,8 +7557,8 @@ function deepAssertShapeConsistency(val, shape, indices) { assert(shape.length > 0, () => `Element arr[${indices.join("][")}] should be a primitive, but is an array of ${val.length} elements`); assert(val.length === shape[0], () => `Element arr[${indices.join("][")}] should have ${shape[0]} elements, but has ${val.length} elements`); const subShape = shape.slice(1); - for (let i = 0; i < val.length; ++i) { - deepAssertShapeConsistency(val[i], subShape, indices.concat(i)); + for (let i2 = 0; i2 < val.length; ++i2) { + deepAssertShapeConsistency(val[i2], subShape, indices.concat(i2)); } } function assertDtype(expectedDtype, actualDType, argName, functionName) { @@ -8224,7 +7599,7 @@ function convertToTensorArray(arg, argName, functionName, parseAsDtype = "numeri throw new Error(`Argument ${argName} passed to ${functionName} must be a \`Tensor[]\` or \`TensorLike[]\``); } const tensors = arg; - return tensors.map((t2, i) => convertToTensor(t2, `${argName}[${i}]`, functionName, parseAsDtype)); + return tensors.map((t22, i2) => convertToTensor(t22, `${argName}[${i2}]`, functionName, parseAsDtype)); } var OP_SCOPE_SUFFIX = "__op"; function op(f) { @@ -8278,10 +7653,10 @@ function makeTensor(values, shape, inferredShape, dtype) { const providedSize = sizeFromShape(shape); const inferredSize = sizeFromShape(inferredShape); assert(providedSize === inferredSize, () => `Based on the provided shape, [${shape}], the tensor should have ${providedSize} values but has ${inferredSize}`); - for (let i = 0; i < inferredShape.length; ++i) { - const inferred = inferredShape[i]; - const flatDimsDontMatch = i === inferredShape.length - 1 ? inferred !== sizeFromShape(shape.slice(i)) : true; - assert(inferredShape[i] === shape[i] || !flatDimsDontMatch, () => `Error creating a new Tensor. Inferred shape (${inferredShape}) does not match the provided shape (${shape}). `); + for (let i2 = 0; i2 < inferredShape.length; ++i2) { + const inferred = inferredShape[i2]; + const flatDimsDontMatch = i2 === inferredShape.length - 1 ? inferred !== sizeFromShape(shape.slice(i2)) : true; + assert(inferredShape[i2] === shape[i2] || !flatDimsDontMatch, () => `Error creating a new Tensor. Inferred shape (${inferredShape}) does not match the provided shape (${shape}). `); } } if (!isTypedArray(values) && !Array.isArray(values)) { @@ -8309,21 +7684,21 @@ async function encodeWeights(tensors, group) { const specs = []; const dataPromises = []; const names = Array.isArray(tensors) ? tensors.map((tensor2) => tensor2.name) : Object.keys(tensors); - for (let i = 0; i < names.length; ++i) { - const name = names[i]; - const t2 = Array.isArray(tensors) ? tensors[i].tensor : tensors[name]; - if (t2.dtype !== "float32" && t2.dtype !== "int32" && t2.dtype !== "bool" && t2.dtype !== "string" && t2.dtype !== "complex64") { - throw new Error(`Unsupported dtype in weight '${name}': ${t2.dtype}`); - } - const spec = { name, shape: t2.shape, dtype: t2.dtype }; - if (t2.dtype === "string") { + for (let i2 = 0; i2 < names.length; ++i2) { + const name = names[i2]; + const t22 = Array.isArray(tensors) ? tensors[i2].tensor : tensors[name]; + if (t22.dtype !== "float32" && t22.dtype !== "int32" && t22.dtype !== "bool" && t22.dtype !== "string" && t22.dtype !== "complex64") { + throw new Error(`Unsupported dtype in weight '${name}': ${t22.dtype}`); + } + const spec = { name, shape: t22.shape, dtype: t22.dtype }; + if (t22.dtype === "string") { const utf8bytes = new Promise(async (resolve) => { - const vals = await t2.bytes(); + const vals = await t22.bytes(); const totalNumBytes = vals.reduce((p2, c) => p2 + c.length, 0) + NUM_BYTES_STRING_LENGTH * vals.length; const bytes = new Uint8Array(totalNumBytes); let offset = 0; - for (let i2 = 0; i2 < vals.length; i2++) { - const val = vals[i2]; + for (let i3 = 0; i3 < vals.length; i3++) { + const val = vals[i3]; const bytesOfLength = new Uint8Array(new Uint32Array([val.length]).buffer); bytes.set(bytesOfLength, offset); offset += NUM_BYTES_STRING_LENGTH; @@ -8334,7 +7709,7 @@ async function encodeWeights(tensors, group) { }); dataPromises.push(utf8bytes); } else { - dataPromises.push(t2.data()); + dataPromises.push(t22.data()); } if (group != null) { spec.group = group; @@ -8373,9 +7748,9 @@ function decodeWeights(buffer2, specs) { if (dtype === "float32") { if (quantization.dtype === "uint8" || quantization.dtype === "uint16") { values = new Float32Array(quantizedArray.length); - for (let i = 0; i < quantizedArray.length; i++) { - const v = quantizedArray[i]; - values[i] = v * quantization.scale + quantization.min; + for (let i2 = 0; i2 < quantizedArray.length; i2++) { + const v = quantizedArray[i2]; + values[i2] = v * quantization.scale + quantization.min; } } else if (quantization.dtype === "float16") { if (float16Decode === void 0) { @@ -8390,9 +7765,9 @@ function decodeWeights(buffer2, specs) { throw new Error(`Unsupported quantization type ${quantization.dtype} for weight type int32.`); } values = new Int32Array(quantizedArray.length); - for (let i = 0; i < quantizedArray.length; i++) { - const v = quantizedArray[i]; - values[i] = Math.round(v * quantization.scale + quantization.min); + for (let i2 = 0; i2 < quantizedArray.length; i2++) { + const v = quantizedArray[i2]; + values[i2] = Math.round(v * quantization.scale + quantization.min); } } else { throw new Error(`Unsupported dtype in weight '${name}': ${dtype}`); @@ -8401,7 +7776,7 @@ function decodeWeights(buffer2, specs) { } else if (dtype === "string") { const size22 = sizeFromShape(spec.shape); values = []; - for (let i = 0; i < size22; i++) { + for (let i2 = 0; i2 < size22; i2++) { const byteLength = new Uint32Array(buffer2.slice(offset, offset + NUM_BYTES_STRING_LENGTH))[0]; offset += NUM_BYTES_STRING_LENGTH; const bytes = new Uint8Array(buffer2.slice(offset, offset + byteLength)); @@ -8421,9 +7796,9 @@ function decodeWeights(buffer2, specs) { values = new Float32Array(byteBuffer); const real5 = new Float32Array(values.length / 2); const image2 = new Float32Array(values.length / 2); - for (let i = 0; i < real5.length; i++) { - real5[i] = values[i * 2]; - image2[i] = values[i * 2 + 1]; + for (let i2 = 0; i2 < real5.length; i2++) { + real5[i2] = values[i2 * 2]; + image2[i2] = values[i2 * 2 + 1]; } const realTensor = tensor(real5, shape, "float32"); const imageTensor = tensor(image2, shape, "float32"); @@ -8474,21 +7849,21 @@ function arrayBufferToBase64String(buffer2) { return Buffer.from(buffer2).toString("base64"); } const buf = new Uint8Array(buffer2); - let s = ""; - for (let i = 0, l = buf.length; i < l; i++) { - s += String.fromCharCode(buf[i]); + let s2 = ""; + for (let i2 = 0, l3 = buf.length; i2 < l3; i2++) { + s2 += String.fromCharCode(buf[i2]); } - return btoa(s); + return btoa(s2); } function base64StringToArrayBuffer(str) { if (useNodeBuffer) { const buf = Buffer.from(str, "base64"); return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); } - const s = atob(str); - const buffer2 = new Uint8Array(s.length); - for (let i = 0; i < s.length; ++i) { - buffer2.set([s.charCodeAt(i)], i); + const s2 = atob(str); + const buffer2 = new Uint8Array(s2.length); + for (let i2 = 0; i2 < s2.length; ++i2) { + buffer2.set([s2.charCodeAt(i2)], i2); } return buffer2.buffer; } @@ -8539,7 +7914,7 @@ function getModelJSONForModelArtifacts(artifacts, manifest) { } return result; } -async function getModelArtifactsForJSON(modelJSON, loadWeights2) { +function getModelArtifactsForJSONSync(modelJSON, weightSpecs, weightData) { const modelArtifacts = { modelTopology: modelJSON.modelTopology, format: modelJSON.format, @@ -8550,7 +7925,12 @@ async function getModelArtifactsForJSON(modelJSON, loadWeights2) { modelArtifacts.trainingConfig = modelJSON.trainingConfig; } if (modelJSON.weightsManifest != null) { - const [weightSpecs, weightData] = await loadWeights2(modelJSON.weightsManifest); + if (!weightSpecs) { + throw new Error("modelJSON has weightsManifest but weightSpecs is null"); + } + if (!weightData) { + throw new Error("modelJSON has weightsManifest but weightData is null"); + } modelArtifacts.weightSpecs = weightSpecs; modelArtifacts.weightData = weightData; } @@ -8565,6 +7945,14 @@ async function getModelArtifactsForJSON(modelJSON, loadWeights2) { } return modelArtifacts; } +async function getModelArtifactsForJSON(modelJSON, loadWeights2) { + let weightSpecs; + let weightData; + if (modelJSON.weightsManifest != null) { + [weightSpecs, weightData] = await loadWeights2(modelJSON.weightsManifest); + } + return getModelArtifactsForJSONSync(modelJSON, weightSpecs, weightData); +} function getModelArtifactsInfoForJSON(modelArtifacts) { if (modelArtifacts.modelTopology instanceof ArrayBuffer) { throw new Error("Expected JSON model topology, received ArrayBuffer."); @@ -8577,25 +7965,32 @@ function getModelArtifactsInfoForJSON(modelArtifacts) { weightDataBytes: modelArtifacts.weightData == null ? 0 : modelArtifacts.weightData.byteLength }; } +function getWeightSpecs(weightsManifest) { + const weightSpecs = []; + for (const entry of weightsManifest) { + weightSpecs.push(...entry.weights); + } + return weightSpecs; +} function computeFloat16MantisaTable() { - const convertMantissa = (i) => { - let m = i << 13; - let e = 0; + const convertMantissa = (i2) => { + let m = i2 << 13; + let e2 = 0; while ((m & 8388608) === 0) { - e -= 8388608; + e2 -= 8388608; m <<= 1; } m &= ~8388608; - e += 947912704; - return m | e; + e2 += 947912704; + return m | e2; }; const mantisaTable = new Uint32Array(2048); mantisaTable[0] = 0; - for (let i = 1; i < 1024; i++) { - mantisaTable[i] = convertMantissa(i); + for (let i2 = 1; i2 < 1024; i2++) { + mantisaTable[i2] = convertMantissa(i2); } - for (let i = 1024; i < 2048; i++) { - mantisaTable[i] = 939524096 + (i - 1024 << 13); + for (let i2 = 1024; i2 < 2048; i2++) { + mantisaTable[i2] = 939524096 + (i2 - 1024 << 13); } return mantisaTable; } @@ -8605,18 +8000,18 @@ function computeFloat16ExponentTable() { exponentTable[31] = 1199570944; exponentTable[32] = 2147483648; exponentTable[63] = 3347054592; - for (let i = 1; i < 31; i++) { - exponentTable[i] = i << 23; + for (let i2 = 1; i2 < 31; i2++) { + exponentTable[i2] = i2 << 23; } - for (let i = 33; i < 63; i++) { - exponentTable[i] = 2147483648 + (i - 32 << 23); + for (let i2 = 33; i2 < 63; i2++) { + exponentTable[i2] = 2147483648 + (i2 - 32 << 23); } return exponentTable; } function computeFloat16OffsetTable() { const offsetTable = new Uint32Array(64); - for (let i = 0; i < 64; i++) { - offsetTable[i] = 1024; + for (let i2 = 0; i2 < 64; i2++) { + offsetTable[i2] = 1024; } offsetTable[0] = offsetTable[32] = 0; return offsetTable; @@ -9022,8 +8417,8 @@ var BrowserLocalStorageManager = class { const out = {}; const prefix = PATH_PREFIX + PATH_SEPARATOR; const suffix = PATH_SEPARATOR + INFO_SUFFIX; - for (let i = 0; i < this.LS.length; ++i) { - const key = this.LS.key(i); + for (let i2 = 0; i2 < this.LS.length; ++i2) { + const key = this.LS.key(i2); if (key.startsWith(prefix) && key.endsWith(suffix)) { const modelPath = getModelPathFromKey(key); out[modelPath] = JSON.parse(this.LS.getItem(key)); @@ -9132,6 +8527,12 @@ async function moveModel(sourceURL, destURL) { return cloneModelInternal(sourceURL, destURL, deleteSource); } var PlatformBrowser = class { + constructor() { + this.messageName = "setTimeoutCustom"; + this.functionRefs = []; + this.handledMessageCount = 0; + this.hasEventListener = false; + } fetch(path, init22) { return fetch(path, init22); } @@ -9150,6 +8551,31 @@ var PlatformBrowser = class { decode(bytes, encoding) { return new TextDecoder(encoding).decode(bytes); } + setTimeoutCustom(functionRef, delay) { + if (!window || !env().getBool("USE_SETTIMEOUTCUSTOM")) { + setTimeout(functionRef, delay); + return; + } + this.functionRefs.push(functionRef); + setTimeout(() => { + window.postMessage({ name: this.messageName, index: this.functionRefs.length - 1 }, "*"); + }, delay); + if (!this.hasEventListener) { + this.hasEventListener = true; + window.addEventListener("message", (event) => { + if (event.source === window && event.data.name === this.messageName) { + event.stopPropagation(); + const functionRef2 = this.functionRefs[event.data.index]; + functionRef2(); + this.handledMessageCount++; + if (this.handledMessageCount === this.functionRefs.length) { + this.functionRefs = []; + this.handledMessageCount = 0; + } + } + }, true); + } + } }; if (env().get("IS_BROWSER")) { env().setPlatform("browser", new PlatformBrowser()); @@ -9247,8 +8673,10 @@ __export2(io_exports, { fromMemorySync: () => fromMemorySync, getLoadHandlers: () => getLoadHandlers, getModelArtifactsForJSON: () => getModelArtifactsForJSON, + getModelArtifactsForJSONSync: () => getModelArtifactsForJSONSync, getModelArtifactsInfoForJSON: () => getModelArtifactsInfoForJSON, getSaveHandlers: () => getSaveHandlers, + getWeightSpecs: () => getWeightSpecs, http: () => http, isHTTPScheme: () => isHTTPScheme, listModels: () => listModels, @@ -9489,19 +8917,19 @@ function weightsLoaderFactory(fetchWeightsFunction) { }); }); if (!weightsFound.every((found) => found)) { - const weightsNotFound = weightNames.filter((_, i) => !weightsFound[i]); + const weightsNotFound = weightNames.filter((_, i2) => !weightsFound[i2]); throw new Error(`Could not find weights in manifest with names: ${weightsNotFound.join(", ")}. Manifest JSON has weights with names: ${allManifestWeightNames.join(", ")}.`); } - const groupIndicesToFetch = groupIndicesToFetchMap.reduce((accumulator, shouldFetch, i) => { + const groupIndicesToFetch = groupIndicesToFetchMap.reduce((accumulator, shouldFetch, i2) => { if (shouldFetch) { - accumulator.push(i); + accumulator.push(i2); } return accumulator; }, []); const fetchUrls = []; - groupIndicesToFetch.forEach((i) => { - manifest[i].paths.forEach((filepath) => { + groupIndicesToFetch.forEach((i2) => { + manifest[i2].paths.forEach((filepath) => { const fetchUrl = filePathPrefix + (!filePathPrefix.endsWith("/") ? "/" : "") + filepath; fetchUrls.push(fetchUrl); }); @@ -9509,21 +8937,21 @@ Manifest JSON has weights with names: ${allManifestWeightNames.join(", ")}.`); const buffers = await fetchWeightsFunction(fetchUrls); const weightsTensorMap = {}; let bufferIndexOffset = 0; - groupIndicesToFetch.forEach((i) => { - const numBuffers = manifest[i].paths.length; + groupIndicesToFetch.forEach((i2) => { + const numBuffers = manifest[i2].paths.length; let groupBytes = 0; - for (let i2 = 0; i2 < numBuffers; i2++) { - groupBytes += buffers[bufferIndexOffset + i2].byteLength; + for (let i3 = 0; i3 < numBuffers; i3++) { + groupBytes += buffers[bufferIndexOffset + i3].byteLength; } const groupBuffer = new ArrayBuffer(groupBytes); const groupByteBuffer = new Uint8Array(groupBuffer); let groupBufferOffset = 0; - for (let i2 = 0; i2 < numBuffers; i2++) { - const buffer2 = new Uint8Array(buffers[bufferIndexOffset + i2]); + for (let i3 = 0; i3 < numBuffers; i3++) { + const buffer2 = new Uint8Array(buffers[bufferIndexOffset + i3]); groupByteBuffer.set(buffer2, groupBufferOffset); groupBufferOffset += buffer2.byteLength; } - const weightsEntries = groupWeightsToFetch[i]; + const weightsEntries = groupWeightsToFetch[i2]; weightsEntries.forEach((weightsEntry) => { const byteBuffer = groupBuffer.slice(weightsEntry.groupOffset, weightsEntry.groupOffset + weightsEntry.sizeBytes); const nameToTensorMap = decodeWeights(byteBuffer, [weightsEntry.manifestEntry]); @@ -9596,7 +9024,7 @@ var HTTPRequest = class { let modelJSON; try { modelJSON = await modelConfigRequest.json(); - } catch (e) { + } catch (e2) { let message = `Failed to parse model JSON of response from ${this.path}.`; if (this.path.endsWith(".pb")) { message += " Your path contains a .pb file extension. Support for .pb models have been removed in TensorFlow.js 1.0 in favor of .json models. You can re-convert your Python TensorFlow model using the TensorFlow.js 1.0 conversion scripts or you can convert your.pb models with the 'pb2json'NPM script in the tensorflow/tfjs-converter repository."; @@ -9616,10 +9044,7 @@ var HTTPRequest = class { const weightPath = Array.isArray(this.path) ? this.path[1] : this.path; const [prefix, suffix] = parseUrl(weightPath); const pathPrefix = this.weightPathPrefix || prefix; - const weightSpecs = []; - for (const entry of weightsManifest) { - weightSpecs.push(...entry.weights); - } + const weightSpecs = getWeightSpecs(weightsManifest); const fetchURLs = []; const urlPromises = []; for (const weightsGroup of weightsManifest) { @@ -9844,7 +9269,7 @@ var real = op({ real_ }); function transpose_(x, perm, conjugate) { const $x = convertToTensor(x, "x", "transpose"); if (perm == null) { - perm = $x.shape.map((s, i) => i).reverse(); + perm = $x.shape.map((s2, i2) => i2).reverse(); } assert($x.rank === perm.length, () => `Error in transpose: rank of input ${$x.rank} must match length of perm ${perm}.`); perm.forEach((axis) => { @@ -9894,10 +9319,10 @@ __export2(broadcast_util_exports, { function getBroadcastDims(inShape, outShape) { const inRank = inShape.length; const dims = []; - for (let i = 0; i < inRank; i++) { - const dim = inRank - 1 - i; + for (let i2 = 0; i2 < inRank; i2++) { + const dim = inRank - 1 - i2; const a = inShape[dim] || 1; - const b = outShape[outShape.length - 1 - i] || 1; + const b = outShape[outShape.length - 1 - i2] || 1; if (b > 1 && a === 1) { dims.unshift(dim); } @@ -9906,9 +9331,9 @@ function getBroadcastDims(inShape, outShape) { } function getReductionAxes(inShape, outShape) { const result = []; - for (let i = 0; i < outShape.length; i++) { - const inDim = inShape[inShape.length - i - 1]; - const outAxis = outShape.length - i - 1; + for (let i2 = 0; i2 < outShape.length; i2++) { + const inDim = inShape[inShape.length - i2 - 1]; + const outAxis = outShape.length - i2 - 1; const outDim = outShape[outAxis]; if (inDim == null || inDim === 1 && outDim > 1) { result.unshift(outAxis); @@ -9918,13 +9343,13 @@ function getReductionAxes(inShape, outShape) { } function assertAndGetBroadcastShape(shapeA, shapeB) { const result = []; - const l = Math.max(shapeA.length, shapeB.length); - for (let i = 0; i < l; i++) { - let a = shapeA[shapeA.length - i - 1]; + const l3 = Math.max(shapeA.length, shapeB.length); + for (let i2 = 0; i2 < l3; i2++) { + let a = shapeA[shapeA.length - i2 - 1]; if (a == null) { a = 1; } - let b = shapeB[shapeB.length - i - 1]; + let b = shapeB[shapeB.length - i2 - 1]; if (b == null) { b = 1; } @@ -10028,9 +9453,9 @@ function fromPixels_(pixels, numChannels = 3) { } else { const numPixels = width * height; values = new Int32Array(numPixels * numChannels); - for (let i = 0; i < numPixels; i++) { + for (let i2 = 0; i2 < numPixels; i2++) { for (let channel = 0; channel < numChannels; ++channel) { - values[i * numChannels + channel] = vals[i * 4 + channel]; + values[i2 * numChannels + channel] = vals[i2 * 4 + channel]; } } } @@ -10055,7 +9480,7 @@ async function fromPixelsAsync(pixels, numChannels = 3) { let imageBitmap; try { imageBitmap = await createImageBitmap(pixels, { premultiplyAlpha: "none" }); - } catch (e) { + } catch (e2) { imageBitmap = null; } if (imageBitmap != null && imageBitmap.width === pixels.width && imageBitmap.height === pixels.height) { @@ -10089,10 +9514,10 @@ async function toPixels(img, canvas3) { const data = await $img.data(); const multiplier = $img.dtype === "float32" ? 255 : 1; const bytes = new Uint8ClampedArray(width * height * 4); - for (let i = 0; i < height * width; ++i) { + for (let i2 = 0; i2 < height * width; ++i2) { const rgba = [0, 0, 0, 255]; for (let d = 0; d < depth; d++) { - const value = data[i * depth + d]; + const value = data[i2 * depth + d]; if ($img.dtype === "float32") { if (value < 0 || value > 1) { throw new Error(`Tensor values for a float32 Tensor must be in the range [0 - 1] but encountered ${value}.`); @@ -10110,7 +9535,7 @@ async function toPixels(img, canvas3) { rgba[d] = value * multiplier; } } - const j = i * 4; + const j = i2 * 4; bytes[j + 0] = Math.round(rgba[0]); bytes[j + 1] = Math.round(rgba[1]); bytes[j + 2] = Math.round(rgba[2]); @@ -10154,16 +9579,16 @@ function prepareAndValidate(tensor2, indices) { const indicesShape = indices.shape; const sliceRank = indicesShape[indicesShape.length - 1]; let nResult = 1; - for (let i = 0; i < indicesShape.length - 1; ++i) { - nResult *= indicesShape[i]; + for (let i2 = 0; i2 < indicesShape.length - 1; ++i2) { + nResult *= indicesShape[i2]; } const inputShape = tensor2.shape; const resultShape = indicesShape.slice(); resultShape.pop(); let sliceSize = 1; - for (let i = sliceRank; i < tensorRank; ++i) { - sliceSize *= inputShape[i]; - resultShape.push(inputShape[i]); + for (let i2 = sliceRank; i2 < tensorRank; ++i2) { + sliceSize *= inputShape[i2]; + resultShape.push(inputShape[i2]); } const strides2 = [ ...computeStrides(tensor2.shape).map((stride) => stride / sliceSize), @@ -10229,8 +9654,8 @@ function calculateShapes(updates, indices, shape) { const sliceRank = indicesRank > 1 ? indices.shape[indicesRank - 1] : 1; const totalNd = shape.length; let sliceSize = 1; - for (let i = sliceRank; i < totalNd; ++i) { - sliceSize *= shape[i]; + for (let i2 = sliceRank; i2 < totalNd; ++i2) { + sliceSize *= shape[i2]; } const safeSliceDim = sliceRank < 1 ? 1 : sliceRank; const numUpdates = sizeFromShape(indices.shape) / safeSliceDim; @@ -10261,8 +9686,8 @@ function assertParamsValid(input2, begin, size2) { const inputRank = input2.shape.length; assert(inputRank === begin.length, () => `Error in slice${inputRank}D: Length of begin ${begin} must match the rank of the array (${inputRank}).`); assert(inputRank === size2.length, () => `Error in slice${inputRank}D: Length of size ${size2} must match the rank of the array (${inputRank}).`); - for (let i = 0; i < inputRank; ++i) { - assert(begin[i] + size2[i] <= input2.shape[i], () => `Error in slice${inputRank}D: begin[${i}] + size[${i}] (${begin[i] + size2[i]}) would overflow input.shape[${i}] (${input2.shape[i]})`); + for (let i2 = 0; i2 < inputRank; ++i2) { + assert(begin[i2] + size2[i2] <= input2.shape[i2], () => `Error in slice${inputRank}D: begin[${i2}] + size[${i2}] (${begin[i2] + size2[i2]}) would overflow input.shape[${i2}] (${input2.shape[i2]})`); } } function maskToAxes(mask2) { @@ -10286,11 +9711,11 @@ function computeOutShape(begin, end, strides2) { } function stridesWithElidedDims(strides2, ellipsisInsertionIndex, numElidedAxes, inputShape) { const newStrides = [...strides2]; - for (let i = newStrides.length; i < inputShape.length; i++) { + for (let i2 = newStrides.length; i2 < inputShape.length; i2++) { newStrides.push(1); } - for (let i = 0; i < numElidedAxes; i++) { - if (i === 0) { + for (let i2 = 0; i2 < numElidedAxes; i2++) { + if (i2 === 0) { newStrides[ellipsisInsertionIndex] = 1; } else { newStrides.splice(ellipsisInsertionIndex, 0, 1); @@ -10307,8 +9732,8 @@ function unnormalizeAxis(ellipsisInsertionIndex, numElidedAxes, normalizedAxis) } function getElidedAxes(numElidedAxes, ellipsisInsertionIndex) { const elidedAxes = []; - for (let i = 0; i < numElidedAxes; i++) { - elidedAxes.push(ellipsisInsertionIndex + i); + for (let i2 = 0; i2 < numElidedAxes; i2++) { + elidedAxes.push(ellipsisInsertionIndex + i2); } return elidedAxes; } @@ -10366,12 +9791,12 @@ function stopIndicesWithElidedDims(endMask, ellipsisInsertionIndex, numElidedAxe newIndices[axis] = originalValue; } } - for (let i = 0; i < newIndices.length; i++) { - const axisSize = inputShape[i]; - if (newIndices[i] < 0) { - newIndices[i] += axisSize; + for (let i2 = 0; i2 < newIndices.length; i2++) { + const axisSize = inputShape[i2]; + if (newIndices[i2] < 0) { + newIndices[i2] += axisSize; } - newIndices[i] = clamp(0, newIndices[i], inputShape[i]); + newIndices[i2] = clamp(0, newIndices[i2], inputShape[i2]); } return newIndices; } @@ -10422,14 +9847,14 @@ function stopForAxis(endMask, stopIndices, strides2, inputShape, axis, ellipsisM } function isSliceContinous(shape, begin, size2) { let firstNonOneAxis = size2.length; - for (let i = 0; i < size2.length; i++) { - if (size2[i] > 1) { - firstNonOneAxis = i; + for (let i2 = 0; i2 < size2.length; i2++) { + if (size2[i2] > 1) { + firstNonOneAxis = i2; break; } } - for (let i = firstNonOneAxis + 1; i < size2.length; i++) { - if (begin[i] > 0 || size2[i] !== shape[i]) { + for (let i2 = firstNonOneAxis + 1; i2 < size2.length; i2++) { + if (begin[i2] > 0 || size2[i2] !== shape[i2]) { return false; } } @@ -10437,8 +9862,8 @@ function isSliceContinous(shape, begin, size2) { } function computeFlatOffset(begin, strides2) { let flatOffset = begin.length > 0 ? begin[begin.length - 1] : 1; - for (let i = 0; i < begin.length - 1; i++) { - flatOffset += begin[i] * strides2[i]; + for (let i2 = 0; i2 < begin.length - 1; i2++) { + flatOffset += begin[i2] * strides2[i2]; } return flatOffset; } @@ -10465,12 +9890,12 @@ function parseSliceParams(x, begin, size2) { } else { size_ = size2; } - size_ = size_.map((d, i) => { + size_ = size_.map((d, i2) => { if (d >= 0) { return d; } else { - assert(d === -1, () => `Negative size values should be exactly -1 but got ${d} for the slice() size at index ${i}.`); - return x.shape[i] - begin_[i]; + assert(d === -1, () => `Negative size values should be exactly -1 but got ${d} for the slice() size at index ${i2}.`); + return x.shape[i2] - begin_[i2]; } }); return [begin_, size_]; @@ -10499,11 +9924,11 @@ function sliceInfo(xShape, begin, end, strides2, beginMask, endMask, ellipsisMas newAxisMask, shrinkAxisMask }; - for (let i = 0; i < sparseSpec.dims; i++) { - if (ellipsisSeen && (1 << i & newAxisMask) !== 0) { + for (let i2 = 0; i2 < sparseSpec.dims; i2++) { + if (ellipsisSeen && (1 << i2 & newAxisMask) !== 0) { sparseSpec.numAddAxisAfterEllipsis++; } - if (1 << i & ellipsisMask) { + if (1 << i2 & ellipsisMask) { ellipsisSeen = true; } } @@ -10524,56 +9949,56 @@ function sliceInfo(xShape, begin, end, strides2, beginMask, endMask, ellipsisMas let isSimpleSlice = true; const processingShape = []; const finalShape = []; - for (let i = 0; i < xShape.length; ++i) { - if (denseSpec.strides[i] === 0) { - throw Error(`strides[${i}] must be non-zero`); + for (let i2 = 0; i2 < xShape.length; ++i2) { + if (denseSpec.strides[i2] === 0) { + throw Error(`strides[${i2}] must be non-zero`); } - const shrinkI = !!(denseSpec.shrinkAxisMask & 1 << i); - const dimI = xShape[i]; + const shrinkI = !!(denseSpec.shrinkAxisMask & 1 << i2); + const dimI = xShape[i2]; if (dimI === -1) { processingShape.push(shrinkI ? 1 : -1); continue; } - const masks = [denseSpec.beginMask & 1 << i, denseSpec.endMask & 1 << i]; + const masks = [denseSpec.beginMask & 1 << i2, denseSpec.endMask & 1 << i2]; const validRange = [ - denseSpec.strides[i] > 0 ? 0 : -1, - denseSpec.strides[i] > 0 ? dimI : dimI - 1 + denseSpec.strides[i2] > 0 ? 0 : -1, + denseSpec.strides[i2] > 0 ? dimI : dimI - 1 ]; - if (shrinkI && denseSpec.strides[i] <= 0) { + if (shrinkI && denseSpec.strides[i2] <= 0) { throw Error("only stride 1 allowed on non-range indexing."); } - isSimpleSlice = isSimpleSlice && denseSpec.strides[i] === 1; - const beginAndEndMasked = !!(denseSpec.beginMask & 1 << i && denseSpec.endMask & 1 << i); + isSimpleSlice = isSimpleSlice && denseSpec.strides[i2] === 1; + const beginAndEndMasked = !!(denseSpec.beginMask & 1 << i2 && denseSpec.endMask & 1 << i2); if (denseSpec.beginValid && denseSpec.endValid) { if (shrinkI) { - const xFwd = denseSpec.begin[i] < 0 ? dimI + denseSpec.begin[i] : denseSpec.begin[i]; - denseSpec.begin[i] = xFwd; - denseSpec.end[i] = denseSpec.begin[i] + 1; + const xFwd = denseSpec.begin[i2] < 0 ? dimI + denseSpec.begin[i2] : denseSpec.begin[i2]; + denseSpec.begin[i2] = xFwd; + denseSpec.end[i2] = denseSpec.begin[i2] + 1; if (xFwd < 0 || xFwd >= dimI) { - throw Error(`slice index ${denseSpec.begin[i]} of dimension ${i} out of bounds.`); + throw Error(`slice index ${denseSpec.begin[i2]} of dimension ${i2} out of bounds.`); } } else { - denseSpec.begin[i] = canonical(denseSpec.begin[i], 0, denseSpec.strides[i], dimI, masks, validRange); - denseSpec.end[i] = canonical(denseSpec.end[i], 1, denseSpec.strides[i], dimI, masks, validRange); + denseSpec.begin[i2] = canonical(denseSpec.begin[i2], 0, denseSpec.strides[i2], dimI, masks, validRange); + denseSpec.end[i2] = canonical(denseSpec.end[i2], 1, denseSpec.strides[i2], dimI, masks, validRange); } - const takeAllInDimension = denseSpec.strides[i] === 1 && denseSpec.begin[i] === 0 && denseSpec.end[i] === dimI; + const takeAllInDimension = denseSpec.strides[i2] === 1 && denseSpec.begin[i2] === 0 && denseSpec.end[i2] === dimI; isIdentity = isIdentity && takeAllInDimension; - sliceDim0 = sliceDim0 && (i === 0 && denseSpec.strides[i] === 1 || takeAllInDimension); + sliceDim0 = sliceDim0 && (i2 === 0 && denseSpec.strides[i2] === 1 || takeAllInDimension); } else { - isIdentity = isIdentity && (denseSpec.strides[i] === 1 && beginAndEndMasked); - sliceDim0 = sliceDim0 && (i === 0 && denseSpec.strides[i] === 1 || beginAndEndMasked); + isIdentity = isIdentity && (denseSpec.strides[i2] === 1 && beginAndEndMasked); + sliceDim0 = sliceDim0 && (i2 === 0 && denseSpec.strides[i2] === 1 || beginAndEndMasked); } let intervalLength; let knownInterval = false; if (denseSpec.beginValid && denseSpec.endValid) { - intervalLength = denseSpec.end[i] - denseSpec.begin[i]; + intervalLength = denseSpec.end[i2] - denseSpec.begin[i2]; knownInterval = true; } else if (shrinkI) { intervalLength = 1; knownInterval = true; } else if (beginAndEndMasked) { if (dimI >= 0) { - if (denseSpec.strides[i] < 0) { + if (denseSpec.strides[i2] < 0) { intervalLength = -dimI; } else { intervalLength = dimI; @@ -10583,10 +10008,10 @@ function sliceInfo(xShape, begin, end, strides2, beginMask, endMask, ellipsisMas } if (knownInterval) { let sizeI; - if (intervalLength === 0 || intervalLength < 0 !== denseSpec.strides[i] < 0) { + if (intervalLength === 0 || intervalLength < 0 !== denseSpec.strides[i2] < 0) { sizeI = 0; } else { - sizeI = Math.trunc(intervalLength / denseSpec.strides[i]) + (intervalLength % denseSpec.strides[i] !== 0 ? 1 : 0); + sizeI = Math.trunc(intervalLength / denseSpec.strides[i2]) + (intervalLength % denseSpec.strides[i2] !== 0 ? 1 : 0); } processingShape.push(sizeI); } else { @@ -10601,7 +10026,7 @@ function sliceInfo(xShape, begin, end, strides2, beginMask, endMask, ellipsisMas finalShape.push(1); } } - const finalShapeSparse = finalShape.filter((dim, i) => denseSpec.finalShapeGatherIndices[i] !== NEW_AXIS); + const finalShapeSparse = finalShape.filter((dim, i2) => denseSpec.finalShapeGatherIndices[i2] !== NEW_AXIS); return { finalShapeSparse, finalShape, @@ -10626,9 +10051,9 @@ function buildDenseSpec(sparse2, dense2) { dense2.finalShapeGatherIndices = []; dense2.finalShapeGatherIndicesSparse = []; dense2.inputShapeGatherIndicesSparse = new Array(dense2.dims); - for (let i = 0; i < sparse2.dims; i++) { - if (1 << i & sparse2.ellipsisMask) { - const nextIndex = Math.min(dense2.dims - (sparse2.dims - i) + 1 + sparse2.numAddAxisAfterEllipsis, dense2.dims); + for (let i2 = 0; i2 < sparse2.dims; i2++) { + if (1 << i2 & sparse2.ellipsisMask) { + const nextIndex = Math.min(dense2.dims - (sparse2.dims - i2) + 1 + sparse2.numAddAxisAfterEllipsis, dense2.dims); for (; fullIndex < nextIndex; fullIndex++) { dense2.begin[fullIndex] = 0; dense2.end[fullIndex] = 0; @@ -10637,9 +10062,9 @@ function buildDenseSpec(sparse2, dense2) { dense2.endMask |= 1 << fullIndex; dense2.finalShapeGatherIndices.push(fullIndex); dense2.finalShapeGatherIndicesSparse.push(-1); - dense2.inputShapeGatherIndicesSparse[fullIndex] = i; + dense2.inputShapeGatherIndicesSparse[fullIndex] = i2; } - } else if (1 << i & sparse2.newAxisMask) { + } else if (1 << i2 & sparse2.newAxisMask) { dense2.finalShapeGatherIndices.push(NEW_AXIS); dense2.finalShapeGatherIndicesSparse.push(-1); } else { @@ -10647,27 +10072,27 @@ function buildDenseSpec(sparse2, dense2) { throw Error(`Index out of range using input dim ${fullIndex}; input has only ${dense2.dims} dims, ${dense2.begin.length}.`); } if (sparse2.begin != null) { - dense2.begin[fullIndex] = sparse2.begin[i]; + dense2.begin[fullIndex] = sparse2.begin[i2]; } if (sparse2.end != null) { - dense2.end[fullIndex] = sparse2.end[i]; + dense2.end[fullIndex] = sparse2.end[i2]; } - dense2.strides[fullIndex] = sparse2.strides[i]; - if (sparse2.beginMask & 1 << i) { + dense2.strides[fullIndex] = sparse2.strides[i2]; + if (sparse2.beginMask & 1 << i2) { dense2.beginMask |= 1 << fullIndex; } - if (sparse2.endMask & 1 << i) { + if (sparse2.endMask & 1 << i2) { dense2.endMask |= 1 << fullIndex; } - if (sparse2.shrinkAxisMask & 1 << i) { + if (sparse2.shrinkAxisMask & 1 << i2) { dense2.finalShapeGatherIndices.push(SHRINK_AXIS); dense2.finalShapeGatherIndicesSparse.push(-1); dense2.shrinkAxisMask |= 1 << fullIndex; } else { dense2.finalShapeGatherIndices.push(fullIndex); - dense2.finalShapeGatherIndicesSparse.push(i); + dense2.finalShapeGatherIndicesSparse.push(i2); } - dense2.inputShapeGatherIndicesSparse[fullIndex] = i; + dense2.inputShapeGatherIndicesSparse[fullIndex] = i2; fullIndex++; } } @@ -10768,11 +10193,11 @@ function expectArraysPredicate(actual, expected, predicate) { Actual: ${actualFlat}. Expected: ${expectedFlat}.`); } - for (let i = 0; i < expectedFlat.length; ++i) { - const a = actualFlat[i]; - const e = expectedFlat[i]; - if (!predicate(a, e)) { - throw new Error(`Arrays differ: actual[${i}] = ${a}, expected[${i}] = ${e}. + for (let i2 = 0; i2 < expectedFlat.length; ++i2) { + const a = actualFlat[i2]; + const e2 = expectedFlat[i2]; + if (!predicate(a, e2)) { + throw new Error(`Arrays differ: actual[${i2}] = ${a}, expected[${i2}] = ${e2}. Actual: ${actualFlat}. Expected: ${expectedFlat}.`); } @@ -10794,30 +10219,30 @@ function expectArraysEqual(actual, expected) { } return expectArraysPredicate(actual, expected, (a, b) => areClose(a, b, 0)); } -function expectNumbersClose(a, e, epsilon3) { +function expectNumbersClose(a, e2, epsilon3) { if (epsilon3 == null) { epsilon3 = testEpsilon(); } - if (!areClose(a, e, epsilon3)) { - throw new Error(`Numbers differ: actual === ${a}, expected === ${e}`); + if (!areClose(a, e2, epsilon3)) { + throw new Error(`Numbers differ: actual === ${a}, expected === ${e2}`); } if (typeof expect !== "undefined") { expect().nothing(); } } -function areClose(a, e, epsilon3) { - if (!isFinite(a) && !isFinite(e)) { +function areClose(a, e2, epsilon3) { + if (!isFinite(a) && !isFinite(e2)) { return true; } - if (isNaN(a) || isNaN(e) || Math.abs(a - e) > epsilon3) { + if (isNaN(a) || isNaN(e2) || Math.abs(a - e2) > epsilon3) { return false; } return true; } function expectValuesInRange(actual, low, high) { - for (let i = 0; i < actual.length; i++) { - if (actual[i] < low || actual[i] > high) { - throw new Error(`Value out of range:${actual[i]} low: ${low}, high: ${high}`); + for (let i2 = 0; i2 < actual.length; i2++) { + if (actual[i2] < low || actual[i2] > high) { + throw new Error(`Value out of range:${actual[i2]} low: ${low}, high: ${high}`); } } } @@ -10827,19 +10252,19 @@ function expectArrayBuffersEqual(actual, expected) { if (actualArray.length !== expectedArray.length) { throw new Error(`Expected ArrayBuffer to be of length ${expectedArray.length}, but it was ${actualArray.length}`); } - for (let i = 0; i < expectedArray.length; i++) { - if (actualArray[i] !== expectedArray[i]) { - throw new Error(`Expected ArrayBuffer value at ${i} to be ${expectedArray[i]} but got ${actualArray[i]} instead`); + for (let i2 = 0; i2 < expectedArray.length; i2++) { + if (actualArray[i2] !== expectedArray[i2]) { + throw new Error(`Expected ArrayBuffer value at ${i2} to be ${expectedArray[i2]} but got ${actualArray[i2]} instead`); } } } function encodeStrings(a) { - for (let i = 0; i < a.length; i++) { - const val = a[i]; + for (let i2 = 0; i2 < a.length; i2++) { + const val = a[i2]; if (Array.isArray(val)) { encodeStrings(val); } else { - a[i] = encodeString(val); + a[i2] = encodeString(val); } } return a; @@ -10869,7 +10294,7 @@ async function play(video) { }); } } -var version = "3.20.0"; +var version = "3.21.0"; function add_(a, b) { let $a = convertToTensor(a, "a", "add"); let $b = convertToTensor(b, "b", "add"); @@ -10932,15 +10357,15 @@ var acosh = op({ acosh_ }); function addN_(tensors) { assert(Array.isArray(tensors), () => "The argument passed to tf.addN() must be a list of tensors"); assert(tensors.length >= 1, () => `Must pass at least one tensor to tf.addN(), but got ${tensors.length}`); - const $tensors = tensors.map((t2, i) => convertToTensor(t2, `tensors${i}`, "addN")); + const $tensors = tensors.map((t22, i2) => convertToTensor(t22, `tensors${i2}`, "addN")); const firstTensor = $tensors[0]; - $tensors.forEach((t2) => { - if (t2.dtype !== firstTensor.dtype) { + $tensors.forEach((t22) => { + if (t22.dtype !== firstTensor.dtype) { throw new Error("All tensors passed to tf.addN() must have the same dtype"); } }); - $tensors.forEach((t2) => { - if (!arraysEqual(t2.shape, firstTensor.shape)) { + $tensors.forEach((t22) => { + if (!arraysEqual(t22.shape, firstTensor.shape)) { throw new Error("All tensors passed to tf.addN() must have the same shape"); } }); @@ -11424,11 +10849,11 @@ function basicLSTMCell_(forgetBias, lstmKernel, lstmBias, data, c, h) { const batchSize = res.shape[0]; const sliceCols = res.shape[1] / 4; const sliceSize = [batchSize, sliceCols]; - const i = slice(res, [0, 0], sliceSize); + const i2 = slice(res, [0, 0], sliceSize); const j = slice(res, [0, sliceCols], sliceSize); const f = slice(res, [0, sliceCols * 2], sliceSize); const o = slice(res, [0, sliceCols * 3], sliceSize); - const newC = add2(mul(sigmoid(i), tanh2(j)), mul($c, sigmoid(add2($forgetBias, f)))); + const newC = add2(mul(sigmoid(i2), tanh2(j)), mul($c, sigmoid(add2($forgetBias, f)))); const newH = mul(tanh2(newC), sigmoid(o)); return [newC, newH]; } @@ -11602,14 +11027,14 @@ function broadcastTo_(x, shape) { } const inputShape = input2.shape; const reps = Array.from(shape); - for (let i = shape.length - 1; i >= 0; i--) { - if (inputShape[i] === shape[i]) { - reps[i] = 1; - } else if (input2.shape[i] !== 1) { + for (let i2 = shape.length - 1; i2 >= 0; i2--) { + if (inputShape[i2] === shape[i2]) { + reps[i2] = 1; + } else if (input2.shape[i2] !== 1) { throw new Error(`broadcastTo(): [${xShape}] cannot be broadcast to [${shape}].`); } } - const axes = reps.map((n, i) => n > 1 ? i : -1).filter((i) => i >= 0); + const axes = reps.map((n2, i2) => n2 > 1 ? i2 : -1).filter((i2) => i2 >= 0); if (axes.length === 0) { return clone(input2); } @@ -11624,9 +11049,16 @@ function ceil_(x) { return ENGINE.runKernel(Ceil, inputs); } var ceil = op({ ceil_ }); +function fill(shape, value, dtype) { + const attrs = { shape, value, dtype }; + return ENGINE.runKernel(Fill, {}, attrs); +} function clipByValue_(x, clipValueMin, clipValueMax) { const $x = convertToTensor(x, "x", "clipByValue"); assert(clipValueMin <= clipValueMax, () => `Error in clip: min (${clipValueMin}) must be less than or equal to max (${clipValueMax}).`); + if (clipValueMin === clipValueMax) { + return fill($x.shape, clipValueMin, $x.dtype); + } const inputs = { x: $x }; const attrs = { clipValueMin, clipValueMax }; return ENGINE.runKernel(ClipByValue, inputs, attrs); @@ -11934,9 +11366,9 @@ function divNoNan_(a, b) { return where(bEqualsZero, zeros4, divResult); } var divNoNan = op({ divNoNan_ }); -function dot_(t1, t2) { +function dot_(t1, t22) { const $t1 = convertToTensor(t1, "t1", "dot"); - const $t2 = convertToTensor(t2, "t2", "dot"); + const $t2 = convertToTensor(t22, "t2", "dot"); assert(($t1.rank === 1 || $t1.rank === 2) && ($t2.rank === 1 || $t2.rank === 2), () => `Error in dot: inputs must all be rank 1 or 2, but got ranks ${$t1.rank} and ${$t2.rank}.`); const t1Inner = $t1.rank === 1 ? $t1.size : $t1.shape[1]; const t2Inner = $t2.rank === 1 ? $t2.size : $t2.shape[0]; @@ -11963,7 +11395,7 @@ function dot_(t1, t2) { } var dot = op({ dot_ }); function einsum_(equation, ...tensors) { - const $tensors = tensors.map((t2, i) => convertToTensor(t2, `tensors${i}`, "einsum")); + const $tensors = tensors.map((t22, i2) => convertToTensor(t22, `tensors${i2}`, "einsum")); const attrs = { equation }; return ENGINE.runKernel(Einsum, $tensors, attrs); } @@ -11985,8 +11417,8 @@ function erf_(x) { } var erf = op({ erf_ }); function axesAreInnerMostDims(axes, rank) { - for (let i = 0; i < axes.length; ++i) { - if (axes[axes.length - i - 1] !== rank - 1 - i) { + for (let i2 = 0; i2 < axes.length; ++i2) { + if (axes[axes.length - i2 - 1] !== rank - 1 - i2) { return false; } } @@ -12029,21 +11461,21 @@ function getAxesPermutation(axes, rank) { return null; } const result = []; - for (let i = 0; i < rank; ++i) { - if (axes.indexOf(i) === -1) { - result.push(i); + for (let i2 = 0; i2 < rank; ++i2) { + if (axes.indexOf(i2) === -1) { + result.push(i2); } } axes.forEach((axis) => result.push(axis)); return result; } function getUndoAxesPermutation(axes) { - return axes.map((axis, i) => [i, axis]).sort((a, b) => a[1] - b[1]).map((x) => x[0]); + return axes.map((axis, i2) => [i2, axis]).sort((a, b) => a[1] - b[1]).map((x) => x[0]); } function getInnerMostAxes(numAxes, rank) { const res = []; - for (let i = rank - numAxes; i < rank; ++i) { - res.push(i); + for (let i2 = rank - numAxes; i2 < rank; ++i2) { + res.push(i2); } return res; } @@ -12189,9 +11621,9 @@ function eye_(numRows, numColumns, batchShape, dtype = "float32") { numColumns = numRows; } const buff = buffer([numRows, numColumns], dtype); - const n = numRows <= numColumns ? numRows : numColumns; - for (let i = 0; i < n; ++i) { - buff.set(1, i, i); + const n2 = numRows <= numColumns ? numRows : numColumns; + for (let i2 = 0; i2 < n2; ++i2) { + buff.set(1, i2, i2); } const out = reshape(buff.toTensor(), [numRows, numColumns]); if (batchShape == null) { @@ -12215,10 +11647,6 @@ function eye_(numRows, numColumns, batchShape, dtype = "float32") { } } var eye = op({ eye_ }); -function fill(shape, value, dtype) { - const attrs = { shape, value, dtype }; - return ENGINE.runKernel(Fill, {}, attrs); -} function floor_(x) { const $x = convertToTensor(x, "x", "floor", "float32"); const inputs = { x: $x }; @@ -12407,9 +11835,9 @@ function variableGrads(f, varList) { assert(grads2.some((g) => g != null), () => "Cannot find a connection between any variable and the result of the loss function y=f(x). Please make sure the operations that use variables are inside the function f passed to minimize()."); assert(value.rank === 0, () => `The f passed in variableGrads(f) must return a scalar, but it returned a rank-${value.rank} tensor`); const namedGrads = {}; - varList.forEach((v, i) => { - if (grads2[i] != null) { - namedGrads[v.name] = grads2[i]; + varList.forEach((v, i2) => { + if (grads2[i2] != null) { + namedGrads[v.name] = grads2[i2]; } }); if (specifiedNonTrainable != null) { @@ -12692,9 +12120,9 @@ function mirrorPad_(x, paddings, mode) { } assert(paddings.length === $x.rank, () => `Padding doesn't match input. Must be ${$x.rank}. Got ${paddings.length}.`); const shapeOffset = mode === "reflect" ? 1 : 0; - for (let i = 0; i < $x.rank; i++) { - assert(paddings[i].length === 2, () => `Invalid number of paddings. Must be length of 2 each.`); - assert(paddings[i][0] >= 0 && paddings[i][0] <= $x.shape[i] - shapeOffset && paddings[i][1] >= 0 && paddings[i][1] <= $x.shape[i] - shapeOffset, () => `Padding in dimension ${i} cannot be greater than or equal to ${$x.shape[i] - shapeOffset} or less than 0 for input of shape ${$x.shape}`); + for (let i2 = 0; i2 < $x.rank; i2++) { + assert(paddings[i2].length === 2, () => `Invalid number of paddings. Must be length of 2 each.`); + assert(paddings[i2][0] >= 0 && paddings[i2][0] <= $x.shape[i2] - shapeOffset && paddings[i2][1] >= 0 && paddings[i2][1] <= $x.shape[i2] - shapeOffset, () => `Padding in dimension ${i2} cannot be greater than or equal to ${$x.shape[i2] - shapeOffset} or less than 0 for input of shape ${$x.shape}`); } const attrs = { paddings, mode }; const inputs = { x: $x }; @@ -12728,17 +12156,17 @@ function multiRNNCell_(lstmCells, data, c, h) { const $h = convertToTensorArray(h, "h", "multiRNNCell"); let input2 = $data; const newStates = []; - for (let i = 0; i < lstmCells.length; i++) { - const output = lstmCells[i](input2, $c[i], $h[i]); + for (let i2 = 0; i2 < lstmCells.length; i2++) { + const output = lstmCells[i2](input2, $c[i2], $h[i2]); newStates.push(output[0]); newStates.push(output[1]); input2 = output[1]; } const newC = []; const newH = []; - for (let i = 0; i < newStates.length; i += 2) { - newC.push(newStates[i]); - newH.push(newStates[i + 1]); + for (let i2 = 0; i2 < newStates.length; i2 += 2) { + newC.push(newStates[i2]); + newH.push(newStates[i2 + 1]); } return [newC, newH]; } @@ -12819,9 +12247,9 @@ function spaceToBatchND_(x, blockShape, paddings) { const $x = convertToTensor(x, "x", "spaceToBatchND"); assert($x.rank >= 1 + blockShape.length, () => `input rank ${$x.rank} should be > than [blockShape] ${blockShape.length}`); assert(paddings.length === blockShape.length, () => `paddings.shape[0] ${paddings.length} must be equal to [blockShape] ${blockShape.length}`); - assert($x.shape.reduce((a, b, i) => { - if (i > 0 && i <= blockShape.length) { - return a && (b + paddings[i - 1][0] + paddings[i - 1][1]) % blockShape[i - 1] === 0; + assert($x.shape.reduce((a, b, i2) => { + if (i2 > 0 && i2 <= blockShape.length) { + return a && (b + paddings[i2 - 1][0] + paddings[i2 - 1][1]) % blockShape[i2 - 1] === 0; } return a; }, true), () => `input spatial dimensions ${$x.shape.slice(1)} with paddings ${paddings.toString()} must be divisible by blockShapes ${blockShape.toString()}`); @@ -12872,21 +12300,21 @@ function requiredSpaceToBatchPaddings(inputShape, blockShape, basePadding) { const padStart = basePadding.map((b) => b[0]); const origPadEnd = basePadding.map((b) => b[1]); const fullInputShape = inputShape.concat(padStart, origPadEnd); - const padEndExtra = blockShape.map((b, i) => (b - fullInputShape[i] % b) % b); - const padEnd = origPadEnd.map((s, i) => s + padEndExtra[i]); - const paddings = blockShape.map((_, i) => [padStart[i], padEnd[i]]); - const crops = blockShape.map((_, i) => [0, padEndExtra[i]]); + const padEndExtra = blockShape.map((b, i2) => (b - fullInputShape[i2] % b) % b); + const padEnd = origPadEnd.map((s2, i2) => s2 + padEndExtra[i2]); + const paddings = blockShape.map((_, i2) => [padStart[i2], padEnd[i2]]); + const crops = blockShape.map((_, i2) => [0, padEndExtra[i2]]); return [paddings, crops]; } function withSpaceToBatchBasePaddings(filterShape, dilation) { - const dilatedFilterShape = filterShape.map((s, i) => { - return s + (s - 1) * (dilation[i] - 1); + const dilatedFilterShape = filterShape.map((s2, i2) => { + return s2 + (s2 - 1) * (dilation[i2] - 1); }); - const padExtraShape = dilatedFilterShape.map((s) => s - 1); - const padExtraStart = padExtraShape.map((s) => Math.floor(s / 2)); - const padExtraEnd = padExtraShape.map((s, i) => s - padExtraStart[i]); - return padExtraShape.map((_, i) => { - return [padExtraStart[i], padExtraEnd[i]]; + const padExtraShape = dilatedFilterShape.map((s2) => s2 - 1); + const padExtraStart = padExtraShape.map((s2) => Math.floor(s2 / 2)); + const padExtraEnd = padExtraShape.map((s2, i2) => s2 - padExtraStart[i2]); + return padExtraShape.map((_, i2) => { + return [padExtraStart[i2], padExtraEnd[i2]]; }); } var pool = op({ pool_ }); @@ -12907,11 +12335,28 @@ function prod_(x, axis = null, keepDims = false) { return ENGINE.runKernel(Prod, inputs, attrs); } var prod = op({ prod_ }); +function raggedGather_(paramsNestedSplits, paramsDenseValues, indices, outputRaggedRank) { + const $paramsNestedSplits = paramsNestedSplits.map((t22, i2) => convertToTensor(t22, `tensors${i2}`, "raggedGather", "int32")); + const $paramsDenseValues = convertToTensor(paramsDenseValues, "paramsDenseValues", "raggedGather"); + const $indices = convertToTensor(indices, "indices", "raggedGather", "int32"); + const inputs = { + paramsNestedSplits: $paramsNestedSplits, + paramsDenseValues: $paramsDenseValues, + indices: $indices + }; + const attrs = { outputRaggedRank }; + const result = ENGINE.runKernel(RaggedGather, inputs, attrs); + return { + outputNestedSplits: result.slice(0, result.length - 1), + outputDenseValues: result[result.length - 1] + }; +} +var raggedGather = op({ raggedGather_ }); function raggedTensorToTensor_(shape, values, defaultValue, rowPartitionTensors, rowPartitionTypes) { const $shape = convertToTensor(shape, "shape", "raggedTensorToTensor", "int32"); const $values = convertToTensor(values, "values", "raggedTensorToTensor"); const $defaultValue = convertToTensor(defaultValue, "defaultValue", "raggedTensorToTensor", $values.dtype); - const $rowPartitionTensors = rowPartitionTensors.map((t2, i) => convertToTensor(t2, `tensors${i}`, "raggedTensorToTensor", "int32")); + const $rowPartitionTensors = rowPartitionTensors.map((t22, i2) => convertToTensor(t22, `tensors${i2}`, "raggedTensorToTensor", "int32")); const inputs = { shape: $shape, values: $values, @@ -12934,8 +12379,8 @@ function rand_(shape, randFunction, dtype) { } else { throw new Error(`Unknown data type ${dtype}`); } - for (let i = 0; i < size2; i++) { - values[i] = randFunction(); + for (let i2 = 0; i2 < size2; i2++) { + values[i2] = randFunction(); } return ENGINE.makeTensor(values, shape, dtype); } @@ -12964,13 +12409,13 @@ var MPRandGauss = class { let resultX, resultY; let isValid = false; while (!isValid) { - let v1, v2, s; + let v1, v2, s2; do { v1 = 2 * this.random() - 1; v2 = 2 * this.random() - 1; - s = v1 * v1 + v2 * v2; - } while (s >= 1 || s === 0); - const mul2 = Math.sqrt(-2 * Math.log(s) / s); + s2 = v1 * v1 + v2 * v2; + } while (s2 >= 1 || s2 === 0); + const mul2 = Math.sqrt(-2 * Math.log(s2) / s2); resultX = this.mean + this.stdDev * v1 * mul2; resultY = this.mean + this.stdDev * v2 * mul2; if (!this.truncated || this.isValidTruncated(resultX)) { @@ -13075,8 +12520,8 @@ function randomGamma_(shape, alpha2, beta = 1, dtype = "float32", seed) { } const rgamma = new RandGamma(alpha2, beta, dtype, seed); const res = buffer(shape, dtype); - for (let i = 0; i < res.values.length; i++) { - res.values[i] = rgamma.nextValue(); + for (let i2 = 0; i2 < res.values.length; i2++) { + res.values[i2] = rgamma.nextValue(); } return res.toTensor(); } @@ -13087,8 +12532,8 @@ function randomNormal_(shape, mean5 = 0, stdDev = 1, dtype, seed) { } const randGauss = new MPRandGauss(mean5, stdDev, dtype, false, seed); const res = buffer(shape, dtype); - for (let i = 0; i < res.values.length; i++) { - res.values[i] = randGauss.nextValue(); + for (let i2 = 0; i2 < res.values.length; i2++) { + res.values[i2] = randGauss.nextValue(); } return res.toTensor(); } @@ -13103,8 +12548,8 @@ var randomStandardNormal = op({ randomStandardNormal_ }); function randomUniform_(shape, minval = 0, maxval = 1, dtype = "float32", seed) { const res = buffer(shape, dtype); const random = new UniformRandom(minval, maxval, null, seed); - for (let i = 0; i < res.values.length; i++) { - res.values[i] = random.nextValue(); + for (let i2 = 0; i2 < res.values.length; i2++) { + res.values[i2] = random.nextValue(); } return res.toTensor(); } @@ -13223,17 +12668,17 @@ async function setdiff1dAsync_(x, y) { const yVals = await $y.data(); const ySet = new Set(yVals); let outputSize2 = 0; - for (let i = 0; i < xVals.length; i++) { - if (!ySet.has(xVals[i])) { + for (let i2 = 0; i2 < xVals.length; i2++) { + if (!ySet.has(xVals[i2])) { outputSize2++; } } const buffer2 = new TensorBuffer([outputSize2], $x.dtype); const indices = new TensorBuffer([outputSize2], "int32"); - for (let i = 0, p2 = 0; i < xVals.length; i++) { - if (!ySet.has(xVals[i])) { - buffer2.values[p2] = xVals[i]; - indices.values[p2] = i; + for (let i2 = 0, p2 = 0; i2 < xVals.length; i2++) { + if (!ySet.has(xVals[i2])) { + buffer2.values[p2] = xVals[i2]; + indices.values[p2] = i2; p2++; } } @@ -13320,9 +12765,9 @@ function irfft_(input2) { const imagInput = reshape(imag(input2), [batch, innerDimensionSize]); const realConjugate = reverse(slice(realInput, [0, 1], [batch, innerDimensionSize - 2]), 1); const imagConjugate = mul(reverse(slice(imagInput, [0, 1], [batch, innerDimensionSize - 2]), 1), scalar(-1)); - const r = concat([realInput, realConjugate], 1); - const i = concat([imagInput, imagConjugate], 1); - const complexInput = reshape(complex(r, i), [outputShape[0], outputShape[1]]); + const r2 = concat([realInput, realConjugate], 1); + const i2 = concat([imagInput, imagConjugate], 1); + const complexInput = reshape(complex(r2, i2), [outputShape[0], outputShape[1]]); ret = ifft(complexInput); } ret = real(ret); @@ -13519,8 +12964,8 @@ function truncatedNormal_(shape, mean5 = 0, stdDev = 1, dtype, seed) { } const randGauss = new MPRandGauss(mean5, stdDev, dtype, true, seed); const res = buffer(shape, dtype); - for (let i = 0; i < res.values.length; i++) { - res.values[i] = randGauss.nextValue(); + for (let i2 = 0; i2 < res.values.length; i2++) { + res.values[i2] = randGauss.nextValue(); } return res.toTensor(); } @@ -13559,16 +13004,16 @@ function variable(initialValue, trainable = true, name, dtype) { } function whereImpl(condShape, condVals) { const indices = []; - for (let i = 0; i < condVals.length; i++) { - if (condVals[i]) { - indices.push(i); + for (let i2 = 0; i2 < condVals.length; i2++) { + if (condVals[i2]) { + indices.push(i2); } } const inBuffer = buffer(condShape, "int32"); const out = buffer([indices.length, condShape.length], "int32"); - for (let i = 0; i < indices.length; i++) { - const loc = inBuffer.indexToLoc(indices[i]); - const offset = i * condShape.length; + for (let i2 = 0; i2 < indices.length; i2++) { + const loc = inBuffer.indexToLoc(indices[i2]); + const offset = i2 * condShape.length; out.values.set(loc, offset); } return out.toTensor(); @@ -13592,8 +13037,8 @@ async function booleanMaskAsync_(tensor2, mask2, axis) { assert(maskDim > 0, () => "mask cannot be scalar"); assertShapesMatch(tensorShape.slice(axisFrom, axisFrom + maskDim), $mask.shape, `mask's shape must match the first K dimensions of tensor's shape,`); let leadingSize = 1; - for (let i = axisFrom; i < axisFrom + maskDim; i++) { - leadingSize *= tensorShape[i]; + for (let i2 = axisFrom; i2 < axisFrom + maskDim; i2++) { + leadingSize *= tensorShape[i2]; } const targetTensorShape = tensorShape.slice(0, axisFrom).concat([leadingSize], tensorShape.slice(axisFrom + maskDim)); const reshapedTensor = reshape($tensor, targetTensorShape); @@ -13690,11 +13135,11 @@ function getNoiseShape(x, noiseShape) { } if (x.shape.length === noiseShape.length) { const newDimension = []; - for (let i = 0; i < x.shape.length; i++) { - if (noiseShape[i] == null && x.shape[i] != null) { - newDimension.push(x.shape[i]); + for (let i2 = 0; i2 < x.shape.length; i2++) { + if (noiseShape[i2] == null && x.shape[i2] != null) { + newDimension.push(x.shape[i2]); } else { - newDimension.push(noiseShape[i]); + newDimension.push(noiseShape[i2]); } } return newDimension; @@ -13720,9 +13165,9 @@ function enclosingPowerOfTwo(value) { function cosineWindow(windowLength, a, b) { const even = 1 - windowLength % 2; const newValues = new Float32Array(windowLength); - for (let i = 0; i < windowLength; ++i) { - const cosArg = 2 * Math.PI * i / (windowLength + even - 1); - newValues[i] = a - b * Math.cos(cosArg); + for (let i2 = 0; i2 < windowLength; ++i2) { + const cosArg = 2 * Math.PI * i2 / (windowLength + even - 1); + newValues[i2] = a - b * Math.cos(cosArg); } return tensor1d(newValues, "float32"); } @@ -13742,13 +13187,13 @@ async function inTopKAsync_(predictions, targets, k = 1) { const offset = b * size2; const vals = predictionsVals.subarray(offset, offset + size2); const valAndInd = []; - for (let i = 0; i < vals.length; i++) { - valAndInd.push({ value: vals[i], index: i }); + for (let i2 = 0; i2 < vals.length; i2++) { + valAndInd.push({ value: vals[i2], index: i2 }); } valAndInd.sort((a, b2) => b2.value - a.value); precision3[b] = 0; - for (let i = 0; i < k; i++) { - if (valAndInd[i].index === targetsVals[b]) { + for (let i2 = 0; i2 < k; i2++) { + if (valAndInd[i2].index === targetsVals[b]) { precision3[b] = 1; break; } @@ -13875,7 +13320,7 @@ function fusedConv2d_({ x, filter, strides: strides2, pad: pad3, dataFormat = "N } else if (alphaShape.length === 3) { try { assertAndGetBroadcastShape(alphaShape, convInfo.outShape); - } catch (e) { + } catch (e2) { const errMsg = `Error in fused conv2d: PReLU activation weights (${alphaShape}) is not compatible with the output shape of the conv2d (${convInfo.outShape}).`; throw Error(errMsg); } @@ -14299,9 +13744,9 @@ function nonMaxSuppressionV5Impl(boxes, scores, maxOutputSize, iouThreshold, sco } function nonMaxSuppressionImpl_(boxes, scores, maxOutputSize, iouThreshold, scoreThreshold, softNmsSigma, returnScoresTensor = false, padToMaxOutputSize = false, returnValidOutputs = false) { const candidates = []; - for (let i = 0; i < scores.length; i++) { - if (scores[i] > scoreThreshold) { - candidates.push({ score: scores[i], boxIndex: i, suppressBeginIndex: 0 }); + for (let i2 = 0; i2 < scores.length; i2++) { + if (scores[i2] > scoreThreshold) { + candidates.push({ score: scores[i2], boxIndex: i2, suppressBeginIndex: 0 }); } } candidates.sort(ascendingComparator); @@ -14351,8 +13796,8 @@ function nonMaxSuppressionImpl_(boxes, scores, maxOutputSize, iouThreshold, scor } return result; } -function intersectionOverUnion(boxes, i, j) { - const iCoord = boxes.subarray(i * 4, i * 4 + 4); +function intersectionOverUnion(boxes, i2, j) { + const iCoord = boxes.subarray(i2 * 4, i2 * 4 + 4); const jCoord = boxes.subarray(j * 4, j * 4 + 4); const yminI = Math.min(iCoord[0], iCoord[2]); const xminI = Math.min(iCoord[1], iCoord[3]); @@ -14528,14 +13973,14 @@ function threshold_(image2, method = "binary", inverted = false, threshValue = 0 const BLUE_INTENCITY_COEF = 0.114; const totalPixelsInImage = $image.shape[0] * $image.shape[1]; let $threshold = mul(tensor1d([threshValue]), 255); - let r, g, b, grayscale; + let r2, g, b, grayscale; assert($image.rank === 3, () => `Error in threshold: image must be rank 3,but got rank ${$image.rank}.`); assert($image.shape[2] === 3 || $image.shape[2] === 1, () => `Error in threshold: image color channel must be equal to 3 or 1but got ${$image.shape[2]}.`); assert($image.dtype === "int32" || $image.dtype === "float32", () => `Error in dtype: image dtype must be int32 or float32,but got dtype ${$image.dtype}.`); assert(method === "otsu" || method === "binary", () => `Method must be binary or otsu, but was ${method}`); if ($image.shape[2] === 3) { - [r, g, b] = split($image, [1, 1, 1], -1); - const $r = mul(r, RED_INTENCITY_COEF); + [r2, g, b] = split($image, [1, 1, 1], -1); + const $r = mul(r2, RED_INTENCITY_COEF); const $g = mul(g, GREEN_INTENCITY_COEF); const $b = mul(b, BLUE_INTENCITY_COEF); grayscale = add2(add2($r, $g), $b); @@ -14607,9 +14052,9 @@ function bandPart_(a, numLower, numUpper) { if (numUpper < 0) { numUpper = N; } - const i = reshape(range(0, M, 1, "int32"), [-1, 1]); + const i2 = reshape(range(0, M, 1, "int32"), [-1, 1]); const j = range(0, N, 1, "int32"); - const ij = sub(i, j); + const ij = sub(i2, j); const inBand = logicalAnd(lessEqual(ij, scalar(+numLower, "int32")), greaterEqual(ij, scalar(-numUpper, "int32"))); const zero = zeros([M, N], $a.dtype); return reshape(stack(unstack(reshape($a, [-1, M, N])).map((mat) => where(inBand, mat, zero))), shape); @@ -14621,8 +14066,8 @@ function gramSchmidt_(xs) { inputIsTensor2D = false; assert(xs != null && xs.length > 0, () => "Gram-Schmidt process: input must not be null, undefined, or empty"); const dim = xs[0].shape[0]; - for (let i = 1; i < xs.length; ++i) { - assert(xs[i].shape[0] === dim, () => `Gram-Schmidt: Non-unique lengths found in the input vectors: (${xs[i].shape[0]} vs. ${dim})`); + for (let i2 = 1; i2 < xs.length; ++i2) { + assert(xs[i2].shape[0] === dim, () => `Gram-Schmidt: Non-unique lengths found in the input vectors: (${xs[i2].shape[0]} vs. ${dim})`); } } else { inputIsTensor2D = true; @@ -14631,11 +14076,11 @@ function gramSchmidt_(xs) { assert(xs.length <= xs[0].shape[0], () => `Gram-Schmidt: Number of vectors (${xs.length}) exceeds number of dimensions (${xs[0].shape[0]}).`); const ys = []; const xs1d = xs; - for (let i = 0; i < xs.length; ++i) { + for (let i2 = 0; i2 < xs.length; ++i2) { ys.push(ENGINE.tidy(() => { - let x = xs1d[i]; - if (i > 0) { - for (let j = 0; j < i; ++j) { + let x = xs1d[i2]; + if (i2 > 0) { + for (let j = 0; j < i2; ++j) { const proj = mul(sum2(mul(ys[j], x)), ys[j]); x = sub(x, proj); } @@ -14669,30 +14114,30 @@ function qr_(x, fullMatrices = false) { r2ds.push(r2d); }); const q = reshape(stack(q2ds, 0), x.shape); - const r = reshape(stack(r2ds, 0), x.shape); - return [q, r]; + const r2 = reshape(stack(r2ds, 0), x.shape); + return [q, r2]; } } function qr2d(x, fullMatrices = false) { return ENGINE.tidy(() => { assert(x.shape.length === 2, () => `qr2d() requires a 2D Tensor, but got a ${x.shape.length}D Tensor.`); const m = x.shape[0]; - const n = x.shape[1]; + const n2 = x.shape[1]; let q = eye(m); - let r = clone(x); + let r2 = clone(x); const one2D = tensor2d([[1]], [1, 1]); let w = clone(one2D); - const iters = m >= n ? n : m; + const iters = m >= n2 ? n2 : m; for (let j = 0; j < iters; ++j) { - const rTemp = r; + const rTemp = r2; const wTemp = w; const qTemp = q; - [w, r, q] = ENGINE.tidy(() => { - const rjEnd1 = slice(r, [j, j], [m - j, 1]); + [w, r2, q] = ENGINE.tidy(() => { + const rjEnd1 = slice(r2, [j, j], [m - j, 1]); const normX = norm(rjEnd1); - const rjj = slice(r, [j, j], [1, 1]); - const s = where(greater(rjj, 0), tensor2d([[-1]]), tensor2d([[1]])); - const u1 = sub(rjj, mul(s, normX)); + const rjj = slice(r2, [j, j], [1, 1]); + const s2 = where(greater(rjj, 0), tensor2d([[-1]]), tensor2d([[1]])); + const u1 = sub(rjj, mul(s2, normX)); const wPre = div(rjEnd1, u1); if (wPre.shape[0] === 1) { w = clone(one2D); @@ -14702,15 +14147,15 @@ function qr2d(x, fullMatrices = false) { slice(wPre, [1, 0], [wPre.shape[0] - 1, wPre.shape[1]]) ], 0); } - const tau = neg(div(matMul(s, u1), normX)); - const rjEndAll = slice(r, [j, 0], [m - j, n]); + const tau = neg(div(matMul(s2, u1), normX)); + const rjEndAll = slice(r2, [j, 0], [m - j, n2]); const tauTimesW = mul(tau, w); const wT = transpose(w); if (j === 0) { - r = sub(rjEndAll, matMul(tauTimesW, matMul(wT, rjEndAll))); + r2 = sub(rjEndAll, matMul(tauTimesW, matMul(wT, rjEndAll))); } else { const rTimesTau = sub(rjEndAll, matMul(tauTimesW, matMul(wT, rjEndAll))); - r = concat([slice(r, [0, 0], [j, n]), rTimesTau], 0); + r2 = concat([slice(r2, [0, 0], [j, n2]), rTimesTau], 0); } const tawTimesWT = transpose(tauTimesW); const qAllJEnd = slice(q, [0, j], [m, q.shape[1] - j]); @@ -14720,15 +14165,15 @@ function qr2d(x, fullMatrices = false) { const qTimesTau = sub(qAllJEnd, matMul(matMul(qAllJEnd, w), tawTimesWT)); q = concat([slice(q, [0, 0], [m, j]), qTimesTau], 1); } - return [w, r, q]; + return [w, r2, q]; }); dispose([rTemp, wTemp, qTemp]); } - if (!fullMatrices && m > n) { - q = slice(q, [0, 0], [m, n]); - r = slice(r, [0, 0], [n, n]); + if (!fullMatrices && m > n2) { + q = slice(q, [0, 0], [m, n2]); + r2 = slice(r2, [0, 0], [n2, n2]); } - return [q, r]; + return [q, r2]; }); } var qr = op({ qr_ }); @@ -15207,27 +14652,27 @@ var AdadeltaOptimizer = class extends Optimizer { } applyGradients(variableGradients) { const variableNames = Array.isArray(variableGradients) ? variableGradients.map((item) => item.name) : Object.keys(variableGradients); - variableNames.forEach((name, i) => { + variableNames.forEach((name, i2) => { const value = ENGINE.registeredVariables[name]; const trainable = false; - if (this.accumulatedGrads[i] == null) { - this.accumulatedGrads[i] = { + if (this.accumulatedGrads[i2] == null) { + this.accumulatedGrads[i2] = { originalName: `${name}/accum_grad`, variable: tidy(() => zerosLike(value).variable(trainable)) }; } - if (this.accumulatedUpdates[i] == null) { - this.accumulatedUpdates[i] = { + if (this.accumulatedUpdates[i2] == null) { + this.accumulatedUpdates[i2] = { originalName: `${name}/accum_var`, variable: tidy(() => zerosLike(value).variable(trainable)) }; } - const gradient = Array.isArray(variableGradients) ? variableGradients[i].tensor : variableGradients[name]; + const gradient = Array.isArray(variableGradients) ? variableGradients[i2].tensor : variableGradients[name]; if (gradient == null) { return; } - const accumulatedGrad = this.accumulatedGrads[i].variable; - const accumulatedUpdate = this.accumulatedUpdates[i].variable; + const accumulatedGrad = this.accumulatedGrads[i2].variable; + const accumulatedUpdate = this.accumulatedUpdates[i2].variable; tidy(() => { const newAccumulatedGrad = add2(mul(accumulatedGrad, this.rho), mul(square(gradient), 1 - this.rho)); const updates = mul(div(sqrt(add2(accumulatedUpdate, this.epsilon)), sqrt(add2(accumulatedGrad, this.epsilon))), gradient); @@ -15285,20 +14730,20 @@ var AdagradOptimizer = class extends Optimizer { } applyGradients(variableGradients) { const variableNames = Array.isArray(variableGradients) ? variableGradients.map((item) => item.name) : Object.keys(variableGradients); - variableNames.forEach((name, i) => { + variableNames.forEach((name, i2) => { const value = ENGINE.registeredVariables[name]; - if (this.accumulatedGrads[i] == null) { + if (this.accumulatedGrads[i2] == null) { const trainable = false; - this.accumulatedGrads[i] = { + this.accumulatedGrads[i2] = { originalName: `${name}/accumulator`, variable: tidy(() => fill(value.shape, this.initialAccumulatorValue).variable(trainable)) }; } - const gradient = Array.isArray(variableGradients) ? variableGradients[i].tensor : variableGradients[name]; + const gradient = Array.isArray(variableGradients) ? variableGradients[i2].tensor : variableGradients[name]; if (gradient == null) { return; } - const accumulatedGrad = this.accumulatedGrads[i].variable; + const accumulatedGrad = this.accumulatedGrads[i2].variable; tidy(() => { const newAccumulatedGrad = add2(accumulatedGrad, square(gradient)); accumulatedGrad.assign(newAccumulatedGrad); @@ -15355,27 +14800,27 @@ var AdamOptimizer = class extends Optimizer { tidy(() => { const oneMinusAccBeta1 = sub(1, this.accBeta1); const oneMinusAccBeta2 = sub(1, this.accBeta2); - varNames.forEach((name, i) => { + varNames.forEach((name, i2) => { const value = ENGINE.registeredVariables[name]; const trainable = false; - if (this.accumulatedFirstMoment[i] == null) { - this.accumulatedFirstMoment[i] = { + if (this.accumulatedFirstMoment[i2] == null) { + this.accumulatedFirstMoment[i2] = { originalName: `${name}/m`, variable: tidy(() => zerosLike(value).variable(trainable)) }; } - if (this.accumulatedSecondMoment[i] == null) { - this.accumulatedSecondMoment[i] = { + if (this.accumulatedSecondMoment[i2] == null) { + this.accumulatedSecondMoment[i2] = { originalName: `${name}/v`, variable: tidy(() => zerosLike(value).variable(trainable)) }; } - const gradient = Array.isArray(variableGradients) ? variableGradients[i].tensor : variableGradients[name]; + const gradient = Array.isArray(variableGradients) ? variableGradients[i2].tensor : variableGradients[name]; if (gradient == null) { return; } - const firstMoment = this.accumulatedFirstMoment[i].variable; - const secondMoment = this.accumulatedSecondMoment[i].variable; + const firstMoment = this.accumulatedFirstMoment[i2].variable; + const secondMoment = this.accumulatedSecondMoment[i2].variable; const newFirstMoment = add2(mul(firstMoment, this.beta1), mul(gradient, 1 - this.beta1)); const newSecondMoment = add2(mul(secondMoment, this.beta2), mul(square(gradient), 1 - this.beta2)); const biasCorrectedFirstMoment = div(newFirstMoment, oneMinusAccBeta1); @@ -15458,27 +14903,27 @@ var AdamaxOptimizer = class extends Optimizer { tidy(() => { const oneMinusAccBeta1 = sub(1, this.accBeta1); const lr = div(-this.learningRate, add2(mul(this.iteration, this.decay), 1)); - variableNames.forEach((name, i) => { + variableNames.forEach((name, i2) => { const value = ENGINE.registeredVariables[name]; const trainable = false; - if (this.accumulatedFirstMoment[i] == null) { - this.accumulatedFirstMoment[i] = { + if (this.accumulatedFirstMoment[i2] == null) { + this.accumulatedFirstMoment[i2] = { originalName: `${name}/m`, variable: zerosLike(value).variable(trainable) }; } - if (this.accumulatedWeightedInfNorm[i] == null) { - this.accumulatedWeightedInfNorm[i] = { + if (this.accumulatedWeightedInfNorm[i2] == null) { + this.accumulatedWeightedInfNorm[i2] = { originalName: `${name}/v`, variable: zerosLike(value).variable(trainable) }; } - const gradient = Array.isArray(variableGradients) ? variableGradients[i].tensor : variableGradients[name]; + const gradient = Array.isArray(variableGradients) ? variableGradients[i2].tensor : variableGradients[name]; if (gradient == null) { return; } - const firstMoment = this.accumulatedFirstMoment[i].variable; - const weightedInfNorm = this.accumulatedWeightedInfNorm[i].variable; + const firstMoment = this.accumulatedFirstMoment[i2].variable; + const weightedInfNorm = this.accumulatedWeightedInfNorm[i2].variable; const newFirstMoment = add2(mul(firstMoment, this.beta1), mul(gradient, 1 - this.beta1)); const ut0 = mul(weightedInfNorm, this.beta2); const ut1 = abs(gradient); @@ -15532,8 +14977,8 @@ var SGDOptimizer = class extends Optimizer { } applyGradients(variableGradients) { const varNames = Array.isArray(variableGradients) ? variableGradients.map((v) => v.name) : Object.keys(variableGradients); - varNames.forEach((name, i) => { - const gradient = Array.isArray(variableGradients) ? variableGradients[i].tensor : variableGradients[name]; + varNames.forEach((name, i2) => { + const gradient = Array.isArray(variableGradients) ? variableGradients[i2].tensor : variableGradients[name]; if (gradient == null) { return; } @@ -15584,17 +15029,17 @@ var MomentumOptimizer = class extends SGDOptimizer { } applyGradients(variableGradients) { const variableNames = Array.isArray(variableGradients) ? variableGradients.map((item) => item.name) : Object.keys(variableGradients); - variableNames.forEach((name, i) => { + variableNames.forEach((name, i2) => { const value = ENGINE.registeredVariables[name]; - if (this.accumulations[i] == null) { + if (this.accumulations[i2] == null) { const trainable = false; - this.accumulations[i] = { + this.accumulations[i2] = { originalName: `${name}/momentum`, variable: tidy(() => zerosLike(value).variable(trainable)) }; } - const accumulation = this.accumulations[i].variable; - const gradient = Array.isArray(variableGradients) ? variableGradients[i].tensor : variableGradients[name]; + const accumulation = this.accumulations[i2].variable; + const gradient = Array.isArray(variableGradients) ? variableGradients[i2].tensor : variableGradients[name]; if (gradient == null) { return; } @@ -15662,37 +15107,37 @@ var RMSPropOptimizer = class extends Optimizer { } applyGradients(variableGradients) { const variableNames = Array.isArray(variableGradients) ? variableGradients.map((item) => item.name) : Object.keys(variableGradients); - variableNames.forEach((name, i) => { + variableNames.forEach((name, i2) => { const value = ENGINE.registeredVariables[name]; const trainable = false; - if (this.accumulatedMeanSquares[i] == null) { - this.accumulatedMeanSquares[i] = { + if (this.accumulatedMeanSquares[i2] == null) { + this.accumulatedMeanSquares[i2] = { originalName: `${name}/rms`, variable: tidy(() => zerosLike(value).variable(trainable)) }; } - if (this.accumulatedMoments[i] == null) { - this.accumulatedMoments[i] = { + if (this.accumulatedMoments[i2] == null) { + this.accumulatedMoments[i2] = { originalName: `${name}/momentum`, variable: tidy(() => zerosLike(value).variable(trainable)) }; } - if (this.accumulatedMeanGrads[i] == null && this.centered) { - this.accumulatedMeanGrads[i] = { + if (this.accumulatedMeanGrads[i2] == null && this.centered) { + this.accumulatedMeanGrads[i2] = { originalName: `${name}/mg`, variable: tidy(() => zerosLike(value).variable(trainable)) }; } - const gradient = Array.isArray(variableGradients) ? variableGradients[i].tensor : variableGradients[name]; + const gradient = Array.isArray(variableGradients) ? variableGradients[i2].tensor : variableGradients[name]; if (gradient == null) { return; } - const accumulatedMeanSquare = this.accumulatedMeanSquares[i].variable; - const accumulatedMoments = this.accumulatedMoments[i].variable; + const accumulatedMeanSquare = this.accumulatedMeanSquares[i2].variable; + const accumulatedMoments = this.accumulatedMoments[i2].variable; tidy(() => { const newAccumulatedMeanSquare = add2(mul(accumulatedMeanSquare, this.decay), mul(square(gradient), 1 - this.decay)); if (this.centered) { - const accumulatedMeanGrad = this.accumulatedMeanGrads[i].variable; + const accumulatedMeanGrad = this.accumulatedMeanGrads[i2].variable; const newAccumulatedMeanGrad = add2(mul(accumulatedMeanGrad, this.decay), mul(gradient, 1 - this.decay)); const gradContribution = div(mul(gradient, this.learningRate), sqrt(sub(newAccumulatedMeanSquare, add2(square(newAccumulatedMeanGrad), this.epsilon)))); const newAccumulatedMoments = add2(mul(accumulatedMoments, this.momentum), gradContribution); @@ -15898,21 +15343,21 @@ __export2(backend_util_exports, { }); function assertParamsConsistent(shapes, axis) { const rank = shapes[0].length; - shapes.forEach((shape, i) => { - assert(shape.length === rank, () => `Error in concat${rank}D: rank of tensors[${i}] must be the same as the rank of the rest (${rank})`); + shapes.forEach((shape, i2) => { + assert(shape.length === rank, () => `Error in concat${rank}D: rank of tensors[${i2}] must be the same as the rank of the rest (${rank})`); }); assert(axis >= 0 && axis < rank, () => `Error in concat${rank}D: axis must be between 0 and ${rank - 1}.`); const firstShape = shapes[0]; - shapes.forEach((shape, i) => { - for (let r = 0; r < rank; r++) { - assert(r === axis || shape[r] === firstShape[r], () => `Error in concat${rank}D: Shape of tensors[${i}] (${shape}) does not match the shape of the rest (${firstShape}) along the non-concatenated axis ${i}.`); + shapes.forEach((shape, i2) => { + for (let r2 = 0; r2 < rank; r2++) { + assert(r2 === axis || shape[r2] === firstShape[r2], () => `Error in concat${rank}D: Shape of tensors[${i2}] (${shape}) does not match the shape of the rest (${firstShape}) along the non-concatenated axis ${i2}.`); } }); } function computeOutShape2(shapes, axis) { const outputShape = shapes[0].slice(); - for (let i = 1; i < shapes.length; i++) { - outputShape[axis] += shapes[i][axis]; + for (let i2 = 1; i2 < shapes.length; i2++) { + outputShape[axis] += shapes[i2][axis]; } return outputShape; } @@ -15943,14 +15388,14 @@ function combineRaggedTensorToTensorShapes(raggedRank, shape, valueShape) { if (raggedRank + valueShape.length !== outputShape.length) { throw new Error(`rt input.shape and shape=${shape} are incompatible: rt input.rank = ${raggedRank + valueShape.length}, but shape.rank = ${outputShape.length}`); } - for (let i = 1; i < valueShape.length; ++i) { - const valueDim = valueShape[i]; - const outputShapeDimIndex = outputShape[outputShape.length - valueShape.length + i]; + for (let i2 = 1; i2 < valueShape.length; ++i2) { + const valueDim = valueShape[i2]; + const outputShapeDimIndex = outputShape[outputShape.length - valueShape.length + i2]; const outputShapeDim = outputShape[outputShapeDimIndex]; if (valueDim >= 0) { if (outputShapeDim >= 0) { if (outputShapeDim !== valueDim) { - throw new Error(`rt input.shape and shape=${shape} are incompatible: rt input.shape[${i + raggedRank}] = ${valueDim} but shape[${i + raggedRank}] = ${outputShapeDim}`); + throw new Error(`rt input.shape and shape=${shape} are incompatible: rt input.shape[${i2 + raggedRank}] = ${valueDim} but shape[${i2 + raggedRank}] = ${outputShapeDim}`); } } else { outputShape[outputShapeDimIndex] = valueDim; @@ -15996,11 +15441,11 @@ function validateDefaultValueShape(defaultValueShape, valueShape) { if (defaultNDims >= valuesNDims) { throw new Error(`defaultValue.shape=${defaultValueShape} and ragged tensor flatValues.shape=${valueShape}, are incompatible: defaultValue.rank = ${defaultNDims} must be less than ragged tensor input flatValues.rank = ${valuesNDims})`); } - for (let i = 0; i < Math.min(defaultNDims, valuesNDims - 1); ++i) { - const defaultDim = defaultValueShape[i]; - const valueDim = valueShape[i + 1]; + for (let i2 = 0; i2 < Math.min(defaultNDims, valuesNDims - 1); ++i2) { + const defaultDim = defaultValueShape[i2]; + const valueDim = valueShape[i2 + 1]; if (defaultDim >= 0 && valueDim >= 0 && defaultDim !== 1 && defaultDim !== valueDim) { - throw new Error(`defaultValue.shape=${defaultValueShape}, and ragged tensor input flatValues.shape=${valueShape} are incompatible: defaultValue.shape[${i - defaultValueShape.length}] = ${defaultDim} but ragged tensor input.flatValues.shape[${i - defaultValueShape.length}] = ${valueDim}`); + throw new Error(`defaultValue.shape=${defaultValueShape}, and ragged tensor input flatValues.shape=${valueShape} are incompatible: defaultValue.shape[${i2 - defaultValueShape.length}] = ${defaultDim} but ragged tensor input.flatValues.shape[${i2 - defaultValueShape.length}] = ${valueDim}`); } } } @@ -16025,8 +15470,8 @@ function getReshaped(inputShape, blockShape, prod6, batchToSpace = true) { } else { reshaped = reshaped.concat(inputShape[0]); const spatialLength = blockShape.length; - for (let i = 0; i < spatialLength; ++i) { - reshaped = reshaped.concat([inputShape[i + 1] / blockShape[i], blockShape[i]]); + for (let i2 = 0; i2 < spatialLength; ++i2) { + reshaped = reshaped.concat([inputShape[i2 + 1] / blockShape[i2], blockShape[i2]]); } reshaped = reshaped.concat(inputShape.slice(spatialLength + 1)); } @@ -16036,22 +15481,22 @@ function getPermuted(reshapedRank, blockShapeRank, batchToSpace = true) { const permuted = []; if (batchToSpace) { permuted.push(blockShapeRank); - for (let i = blockShapeRank + 1; i < reshapedRank; ++i) { - if (i <= 2 * blockShapeRank) { - permuted.push(i); - permuted.push(i - (blockShapeRank + 1)); + for (let i2 = blockShapeRank + 1; i2 < reshapedRank; ++i2) { + if (i2 <= 2 * blockShapeRank) { + permuted.push(i2); + permuted.push(i2 - (blockShapeRank + 1)); } else { - permuted.push(i); + permuted.push(i2); } } } else { const permutedBeforeBatch = []; const permutedAfterBatch = []; - for (let i = 1; i < reshapedRank; ++i) { - if (i >= blockShapeRank * 2 + 1 || i % 2 === 1) { - permutedAfterBatch.push(i); + for (let i2 = 1; i2 < reshapedRank; ++i2) { + if (i2 >= blockShapeRank * 2 + 1 || i2 % 2 === 1) { + permutedAfterBatch.push(i2); } else { - permutedBeforeBatch.push(i); + permutedBeforeBatch.push(i2); } } permuted.push(...permutedBeforeBatch); @@ -16067,30 +15512,30 @@ function getReshapedPermuted(inputShape, blockShape, prod6, batchToSpace = true) } else { reshapedPermuted.push(inputShape[0] * prod6); } - for (let i = 1; i < inputShape.length; ++i) { - if (i <= blockShape.length) { + for (let i2 = 1; i2 < inputShape.length; ++i2) { + if (i2 <= blockShape.length) { if (batchToSpace) { - reshapedPermuted.push(blockShape[i - 1] * inputShape[i]); + reshapedPermuted.push(blockShape[i2 - 1] * inputShape[i2]); } else { - reshapedPermuted.push(inputShape[i] / blockShape[i - 1]); + reshapedPermuted.push(inputShape[i2] / blockShape[i2 - 1]); } } else { - reshapedPermuted.push(inputShape[i]); + reshapedPermuted.push(inputShape[i2]); } } return reshapedPermuted; } function getSliceBeginCoords(crops, blockShape) { const sliceBeginCoords = [0]; - for (let i = 0; i < blockShape; ++i) { - sliceBeginCoords.push(crops[i][0]); + for (let i2 = 0; i2 < blockShape; ++i2) { + sliceBeginCoords.push(crops[i2][0]); } return sliceBeginCoords; } function getSliceSize(uncroppedShape, crops, blockShape) { const sliceSize = uncroppedShape.slice(0, 1); - for (let i = 0; i < blockShape; ++i) { - sliceSize.push(uncroppedShape[i + 1] - crops[i][0] - crops[i][1]); + for (let i2 = 0; i2 < blockShape; ++i2) { + sliceSize.push(uncroppedShape[i2 + 1] - crops[i2][0] - crops[i2][1]); } return sliceSize; } @@ -16107,18 +15552,18 @@ function mergeRealAndImagArrays(real5, imag5) { throw new Error(`Cannot merge real and imag arrays of different lengths. real:${real5.length}, imag: ${imag5.length}.`); } const result = new Float32Array(real5.length * 2); - for (let i = 0; i < result.length; i += 2) { - result[i] = real5[i / 2]; - result[i + 1] = imag5[i / 2]; + for (let i2 = 0; i2 < result.length; i2 += 2) { + result[i2] = real5[i2 / 2]; + result[i2 + 1] = imag5[i2 / 2]; } return result; } function splitRealAndImagArrays(complex5) { const real5 = new Float32Array(complex5.length / 2); const imag5 = new Float32Array(complex5.length / 2); - for (let i = 0; i < complex5.length; i += 2) { - real5[i / 2] = complex5[i]; - imag5[i / 2] = complex5[i + 1]; + for (let i2 = 0; i2 < complex5.length; i2 += 2) { + real5[i2 / 2] = complex5[i2]; + imag5[i2 / 2] = complex5[i2 + 1]; } return { real: real5, imag: imag5 }; } @@ -16126,9 +15571,9 @@ function complexWithEvenIndex(complex5) { const len = Math.ceil(complex5.length / 4); const real5 = new Float32Array(len); const imag5 = new Float32Array(len); - for (let i = 0; i < complex5.length; i += 4) { - real5[Math.floor(i / 4)] = complex5[i]; - imag5[Math.floor(i / 4)] = complex5[i + 1]; + for (let i2 = 0; i2 < complex5.length; i2 += 4) { + real5[Math.floor(i2 / 4)] = complex5[i2]; + imag5[Math.floor(i2 / 4)] = complex5[i2 + 1]; } return { real: real5, imag: imag5 }; } @@ -16136,9 +15581,9 @@ function complexWithOddIndex(complex5) { const len = Math.floor(complex5.length / 4); const real5 = new Float32Array(len); const imag5 = new Float32Array(len); - for (let i = 2; i < complex5.length; i += 4) { - real5[Math.floor(i / 4)] = complex5[i]; - imag5[Math.floor(i / 4)] = complex5[i + 1]; + for (let i2 = 2; i2 < complex5.length; i2 += 4) { + real5[Math.floor(i2 / 4)] = complex5[i2]; + imag5[Math.floor(i2 / 4)] = complex5[i2 + 1]; } return { real: real5, imag: imag5 }; } @@ -16151,18 +15596,18 @@ function assignToTypedArray(data, real5, imag5, index2) { data[index2 * 2] = real5; data[index2 * 2 + 1] = imag5; } -function exponents(n, inverse) { - const real5 = new Float32Array(n / 2); - const imag5 = new Float32Array(n / 2); - for (let i = 0; i < Math.ceil(n / 2); i++) { - const x = (inverse ? 2 : -2) * Math.PI * (i / n); - real5[i] = Math.cos(x); - imag5[i] = Math.sin(x); +function exponents(n2, inverse) { + const real5 = new Float32Array(n2 / 2); + const imag5 = new Float32Array(n2 / 2); + for (let i2 = 0; i2 < Math.ceil(n2 / 2); i2++) { + const x = (inverse ? 2 : -2) * Math.PI * (i2 / n2); + real5[i2] = Math.cos(x); + imag5[i2] = Math.sin(x); } return { real: real5, imag: imag5 }; } -function exponent(k, n, inverse) { - const x = (inverse ? 2 : -2) * Math.PI * (k / n); +function exponent(k, n2, inverse) { + const x = (inverse ? 2 : -2) * Math.PI * (k / n2); const real5 = Math.cos(x); const imag5 = Math.sin(x); return { real: real5, imag: imag5 }; @@ -16190,8 +15635,8 @@ function decodeEinsumEquation(equation, numTensors) { throw new Error("Support for more than 2 input tensors is not implemented yet."); } const allDims = []; - for (let i = 0; i < outputString.length; ++i) { - const dimName = outputString[i]; + for (let i2 = 0; i2 < outputString.length; ++i2) { + const dimName = outputString[i2]; if (!inputTerms.some((inputTerm) => inputTerm.indexOf(dimName) !== -1)) { throw new Error(`Output subscripts contain the label ${dimName} not present in the input subscripts.`); } @@ -16199,40 +15644,40 @@ function decodeEinsumEquation(equation, numTensors) { allDims.push(dimName); } } - for (let i = 0; i < inputString.length; ++i) { - const dimName = inputString[i]; + for (let i2 = 0; i2 < inputString.length; ++i2) { + const dimName = inputString[i2]; if (allDims.indexOf(dimName) === -1 && dimName !== COMMA) { allDims.push(dimName); } } const idDims = new Array(inputTerms.length); - for (let i = 0; i < numInputs; ++i) { - if (new Set(inputTerms[i].split("")).size !== inputTerms[i].length) { - throw new Error(`Found duplicate axes in input component ${inputTerms[i]}. Support for duplicate axes in input is not implemented yet.`); + for (let i2 = 0; i2 < numInputs; ++i2) { + if (new Set(inputTerms[i2].split("")).size !== inputTerms[i2].length) { + throw new Error(`Found duplicate axes in input component ${inputTerms[i2]}. Support for duplicate axes in input is not implemented yet.`); } - idDims[i] = []; - for (let j = 0; j < inputTerms[i].length; ++j) { - idDims[i].push(allDims.indexOf(inputTerms[i][j])); + idDims[i2] = []; + for (let j = 0; j < inputTerms[i2].length; ++j) { + idDims[i2].push(allDims.indexOf(inputTerms[i2][j])); } } const numDims = allDims.length; const numOutDims = outputString.length; const summedDims = []; - for (let i = numOutDims; i < numDims; ++i) { - summedDims.push(i); + for (let i2 = numOutDims; i2 < numDims; ++i2) { + summedDims.push(i2); } return { allDims, summedDims, idDims }; } function getEinsumPermutation(nDims, idDims) { let permutationIndices = new Array(nDims); permutationIndices.fill(-1); - for (let i = 0; i < idDims.length; ++i) { - permutationIndices[idDims[i]] = i; + for (let i2 = 0; i2 < idDims.length; ++i2) { + permutationIndices[idDims[i2]] = i2; } const expandDims7 = []; - for (let i = 0; i < nDims; ++i) { - if (permutationIndices[i] === -1) { - expandDims7.push(i); + for (let i2 = 0; i2 < nDims; ++i2) { + if (permutationIndices[i2] === -1) { + expandDims7.push(i2); } } permutationIndices = permutationIndices.filter((d) => d !== -1); @@ -16240,13 +15685,13 @@ function getEinsumPermutation(nDims, idDims) { } function checkEinsumDimSizes(nDims, idDims, tensors) { const dimSizes = new Array(nDims); - for (let i = 0; i < tensors.length; ++i) { - const shape = tensors[i].shape; - for (let j = 0; j < idDims[i].length; ++j) { - if (dimSizes[idDims[i][j]] === void 0) { - dimSizes[idDims[i][j]] = shape[j]; + for (let i2 = 0; i2 < tensors.length; ++i2) { + const shape = tensors[i2].shape; + for (let j = 0; j < idDims[i2].length; ++j) { + if (dimSizes[idDims[i2][j]] === void 0) { + dimSizes[idDims[i2][j]] = shape[j]; } else { - assert(dimSizes[idDims[i][j]] === shape[j], () => `Expected dimension ${dimSizes[idDims[i][j]]} at axis ${j} of input shaped ${JSON.stringify(shape)}, but got dimension ${shape[j]}`); + assert(dimSizes[idDims[i2][j]] === shape[j], () => `Expected dimension ${dimSizes[idDims[i2][j]]} at axis ${j} of input shaped ${JSON.stringify(shape)}, but got dimension ${shape[j]}`); } } } @@ -16259,16 +15704,16 @@ function getEinsumComputePath(summedDims, idDims) { path.push(-1); } nSteps = summedDims.length + 1; - for (let i = 0; i < nSteps; ++i) { + for (let i2 = 0; i2 < nSteps; ++i2) { steps.push([]); } const computedTermIndices = []; - for (let i = 0; i < path.length; ++i) { - const summedDim = path[i]; + for (let i2 = 0; i2 < path.length; ++i2) { + const summedDim = path[i2]; const termIndices = findTermsWithDim(idDims, summedDim); for (const termIndex of termIndices) { if (computedTermIndices.indexOf(termIndex) === -1) { - steps[i].push(termIndex); + steps[i2].push(termIndex); computedTermIndices.push(termIndex); } } @@ -16280,9 +15725,9 @@ function isIdentityPermutation(perm) { } function findTermsWithDim(idDims, dim) { const termIndices = []; - for (let i = 0; i < idDims.length; ++i) { - if (idDims[i].length === 0 || idDims[i].indexOf(dim) !== -1 || dim === -1) { - termIndices.push(i); + for (let i2 = 0; i2 < idDims.length; ++i2) { + if (idDims[i2].length === 0 || idDims[i2].indexOf(dim) !== -1 || dim === -1) { + termIndices.push(i2); } } return termIndices; @@ -16406,9 +15851,9 @@ function collectGatherOpShapeInfo(x, indices, axis, batchDims) { if (axis < batchDims) { throw new Error(`batchDims (${batchDims}) must be less than or equal to axis (${axis}).`); } - for (let i = 0; i < batchDims; ++i) { - if (x.shape[i] !== indices.shape[i]) { - throw new Error(`x.shape[${i}]: ${x.shape[i]} should be equal to indices.shape[${i}]: ${indices.shape[i]}.`); + for (let i2 = 0; i2 < batchDims; ++i2) { + if (x.shape[i2] !== indices.shape[i2]) { + throw new Error(`x.shape[${i2}]: ${x.shape[i2]} should be equal to indices.shape[${i2}]: ${indices.shape[i2]}.`); } } const dimSize = x.shape[axis]; @@ -16416,20 +15861,20 @@ function collectGatherOpShapeInfo(x, indices, axis, batchDims) { let batchSize = 1; let outerSize = 1; let sliceSize = 1; - for (let i = 0; i < batchDims; ++i) { - outputShape.push(x.shape[i]); - batchSize *= x.shape[i]; + for (let i2 = 0; i2 < batchDims; ++i2) { + outputShape.push(x.shape[i2]); + batchSize *= x.shape[i2]; } - for (let i = batchDims; i < axis; i++) { - outputShape.push(x.shape[i]); - outerSize *= x.shape[i]; + for (let i2 = batchDims; i2 < axis; i2++) { + outputShape.push(x.shape[i2]); + outerSize *= x.shape[i2]; } - for (let i = batchDims; i < indicesRank; i++) { - outputShape.push(indices.shape[i]); + for (let i2 = batchDims; i2 < indicesRank; i2++) { + outputShape.push(indices.shape[i2]); } - for (let i = axis + 1; i < xRank; i++) { - outputShape.push(x.shape[i]); - sliceSize *= x.shape[i]; + for (let i2 = axis + 1; i2 < xRank; i2++) { + outputShape.push(x.shape[i2]); + sliceSize *= x.shape[i2]; } return { batchSize, sliceSize, outerSize, dimSize, outputShape }; } @@ -16441,7 +15886,7 @@ function fromUint8ToStringArray(vals) { } } function fromStringArrayToUint8(strings) { - return strings.map((s) => encodeString(s)); + return strings.map((s2) => encodeString(s2)); } var kernel_impls_exports = {}; __export2(kernel_impls_exports, { @@ -16515,8 +15960,8 @@ var addNGradConfig = { saveAllInputs: true, gradFunc: (dy, saved) => { const ders = {}; - saved.forEach((_, i) => { - ders[i] = () => dy.clone(); + saved.forEach((_, i2) => { + ders[i2] = () => dy.clone(); }); return ders; } @@ -16716,17 +16161,17 @@ var broadcastToGradConfig = { const inputShape = broadCastToAttrs.inputShape; const outputShape = broadCastToAttrs.shape; const reps = Array.from(outputShape); - for (let i = inputShape.length - 1; i >= 0; i--) { - if (inputShape[i] === outputShape[i]) { - reps[i] = 1; - } else if (inputShape[i] !== 1) { + for (let i2 = inputShape.length - 1; i2 >= 0; i2--) { + if (inputShape[i2] === outputShape[i2]) { + reps[i2] = 1; + } else if (inputShape[i2] !== 1) { throw new Error(`broadcastTo(): [${inputShape}] cannot be broadcast to [${outputShape}].`); } } const axes = []; - for (let i = 0; i < reps.length; i++) { - if (reps[i] > 1) { - axes.push(i); + for (let i2 = 0; i2 < reps.length; i2++) { + if (reps[i2] > 1) { + axes.push(i2); } } return { x: () => sum2(dy, axes, true) }; @@ -16764,12 +16209,12 @@ var concatGradConfig = { kernelName: Concat, saveAllInputs: true, gradFunc: (dy, saved, attrs) => { - const shapes = saved.map((t2) => t2.shape); + const shapes = saved.map((t22) => t22.shape); const { axis } = attrs; const $axis = parseAxisParam(axis, saved[0].shape)[0]; - const sizeSplits = shapes.map((s) => s[$axis]); + const sizeSplits = shapes.map((s2) => s2[$axis]); const derTensors = split(dy, sizeSplits, $axis); - return derTensors.map((t2) => () => t2); + return derTensors.map((t22) => () => t22); } }; var conv2DGradConfig = { @@ -16979,8 +16424,8 @@ var fusedBatchNormGradConfig = { const reductionAxes = getReductionAxes(mean5.shape, x.shape); const tileShape = []; if (mean5.rank === 1) { - for (let i = 0; i < x.shape.length - 1; ++i) { - tileShape.push(x.shape[i]); + for (let i2 = 0; i2 < x.shape.length - 1; ++i2) { + tileShape.push(x.shape[i2]); } tileShape.push(1); } @@ -17064,16 +16509,16 @@ var gatherGradConfig = { }; function arrayRange(start, stop) { const result = []; - for (let i = start; i < stop; ++i) { - result.push(i); + for (let i2 = start; i2 < stop; ++i2) { + result.push(i2); } return result; } function arrayConcat(arrays) { const result = []; - for (let i = 0; i < arrays.length; ++i) { - for (let j = 0; j < arrays[i].length; ++j) { - result.push(arrays[i][j]); + for (let i2 = 0; i2 < arrays.length; ++i2) { + for (let j = 0; j < arrays[i2].length; ++j) { + result.push(arrays[i2][j]); } } return result; @@ -17422,7 +16867,7 @@ var packGradConfig = { gradFunc: (dy, saved, attrs) => { const { axis } = attrs; const derTensors = unstack(dy, axis); - return derTensors.map((t2) => () => t2); + return derTensors.map((t22) => () => t22); } }; var padV2GradConfig = { @@ -17523,7 +16968,7 @@ var prodGradConfig = { const { axis } = attrs; let axisArr = []; if (axis === void 0 || axis === null) { - axisArr = x.shape.map((_, i) => i); + axisArr = x.shape.map((_, i2) => i2); } else if (typeof axis === "number") { axisArr = [axis]; } else { @@ -17701,8 +17146,8 @@ var sliceGradConfig = { const inputShape = x.shape; const [begin_, size_] = parseSliceParams(x, begin, size2); const paddings = []; - for (let i = 0; i < dy.rank; i++) { - paddings.push([begin_[i], inputShape[i] - begin_[i] - size_[i]]); + for (let i2 = 0; i2 < dy.rank; i2++) { + paddings.push([begin_[i2], inputShape[i2] - begin_[i2] - size_[i2]]); } return { x: () => pad(dy, paddings) }; } @@ -17841,36 +17286,36 @@ var tileGradConfig = { const derX = () => { let xGrad = zerosLike(x); if (x.rank === 1) { - for (let i = 0; i < reps[0]; ++i) { - xGrad = add2(xGrad, slice(dy, [i * x.shape[0]], [x.shape[0]])); + for (let i2 = 0; i2 < reps[0]; ++i2) { + xGrad = add2(xGrad, slice(dy, [i2 * x.shape[0]], [x.shape[0]])); } } else if (x.rank === 2) { - for (let i = 0; i < reps[0]; ++i) { + for (let i2 = 0; i2 < reps[0]; ++i2) { for (let j = 0; j < reps[1]; ++j) { - xGrad = add2(xGrad, slice(dy, [i * x.shape[0], j * x.shape[1]], [ + xGrad = add2(xGrad, slice(dy, [i2 * x.shape[0], j * x.shape[1]], [ x.shape[0], x.shape[1] ])); } } } else if (x.rank === 3) { - for (let i = 0; i < reps[0]; ++i) { + for (let i2 = 0; i2 < reps[0]; ++i2) { for (let j = 0; j < reps[1]; ++j) { for (let k = 0; k < reps[2]; ++k) { - xGrad = add2(xGrad, slice(dy, [i * x.shape[0], j * x.shape[1], k * x.shape[2]], [x.shape[0], x.shape[1], x.shape[2]])); + xGrad = add2(xGrad, slice(dy, [i2 * x.shape[0], j * x.shape[1], k * x.shape[2]], [x.shape[0], x.shape[1], x.shape[2]])); } } } } else if (x.rank === 4) { - for (let i = 0; i < reps[0]; ++i) { + for (let i2 = 0; i2 < reps[0]; ++i2) { for (let j = 0; j < reps[1]; ++j) { for (let k = 0; k < reps[2]; ++k) { - for (let l = 0; l < reps[3]; ++l) { + for (let l3 = 0; l3 < reps[3]; ++l3) { xGrad = add2(xGrad, slice(dy, [ - i * x.shape[0], + i2 * x.shape[0], j * x.shape[1], k * x.shape[2], - l * x.shape[3] + l3 * x.shape[3] ], [x.shape[0], x.shape[1], x.shape[2], x.shape[3]])); } } @@ -17917,8 +17362,8 @@ function gatherDropNegatives(x, indices) { const gathered = gather(x, zeroClippedIndices); let isPositive = greaterEqual(indices, scalar(0, "int32")); const numIters = gathered.rank - isPositive.rank; - for (let i = 0; i < numIters; ++i) { - isPositive = expandDims(isPositive, i + 1); + for (let i2 = 0; i2 < numIters; ++i2) { + isPositive = expandDims(isPositive, i2 + 1); } isPositive = logicalAnd(isPositive, ones2(gathered.shape, "bool")); const zeroSlice = zerosLike(gathered); @@ -18654,7 +18099,7 @@ var LruCache = class { throw new Error(`The maxEntries of LRU caches must be at least 0, but got ${maxEntries}.`); } if (this.maxEntries > maxEntries) { - for (let i = 0; i < this.maxEntries - maxEntries; i++) { + for (let i2 = 0; i2 < this.maxEntries - maxEntries; i2++) { const keyToDelete = this.cache.keys().next().value; this.cache.delete(keyToDelete); } @@ -18665,7 +18110,7 @@ var LruCache = class { function pyListRepeat(value, numValues) { if (Array.isArray(value)) { let newArray = []; - for (let i = 0; i < numValues; i++) { + for (let i2 = 0; i2 < numValues; i2++) { newArray = newArray.concat(value); } return newArray; @@ -18853,12 +18298,12 @@ function checkStringTypeUnionValue(values, label, value) { function checkArrayTypeAndLength(x, expectedType, minLength = 0, maxLength = Infinity) { assert2(minLength >= 0); assert2(maxLength >= minLength); - return Array.isArray(x) && x.length >= minLength && x.length <= maxLength && x.every((e) => typeof e === expectedType); + return Array.isArray(x) && x.length >= minLength && x.length <= maxLength && x.every((e2) => typeof e2 === expectedType); } function assertPositiveInteger(value, name) { if (Array.isArray(value)) { util_exports.assert(value.length > 0, () => `${name} is unexpectedly an empty array.`); - value.forEach((v, i) => assertPositiveInteger(v, `element ${i + 1} of ${name}`)); + value.forEach((v, i2) => assertPositiveInteger(v, `element ${i2 + 1} of ${name}`)); } else { util_exports.assert(Number.isInteger(value) && value > 0, () => `Expected ${name} to be a positive integer, but got ${formatAsFriendlyString(value)}.`); } @@ -18938,9 +18383,9 @@ function nameScope(name, fn) { const val = fn(); _nameScopeStack.pop(); return val; - } catch (e) { + } catch (e2) { _nameScopeStack.pop(); - throw e; + throw e2; } } function currentNameScopePrefix() { @@ -18988,8 +18433,8 @@ function arrayProd(array2, begin, end) { end = array2.length; } let prod6 = 1; - for (let i = begin; i < end; ++i) { - prod6 *= array2[i]; + for (let i2 = begin; i2 < end; ++i2) { + prod6 *= array2[i2]; } return prod6; } @@ -18998,8 +18443,8 @@ function min2(array2) { return Number.NaN; } let min7 = Number.POSITIVE_INFINITY; - for (let i = 0; i < array2.length; i++) { - const value = array2[i]; + for (let i2 = 0; i2 < array2.length; i2++) { + const value = array2[i2]; if (value < min7) { min7 = value; } @@ -19011,8 +18456,8 @@ function max2(array2) { return Number.NaN; } let max7 = Number.NEGATIVE_INFINITY; - for (let i = 0; i < array2.length; i++) { - const value = array2[i]; + for (let i2 = 0; i2 < array2.length; i2++) { + const value = array2[i2]; if (value > max7) { max7 = value; } @@ -19024,8 +18469,8 @@ function range2(begin, end) { throw new ValueError(`end (${end}) < begin (${begin}) is forbidden.`); } const out = []; - for (let i = begin; i < end; ++i) { - out.push(i); + for (let i2 = begin; i2 < end; ++i2) { + out.push(i2); } return out; } @@ -19050,13 +18495,13 @@ function expandDims2(x, axis = -1) { outShape.splice(axis, 0, 1); return reshape(x, outShape); } -function repeat(x, n) { +function repeat(x, n2) { return tidy(() => { if (x.shape.length !== 2) { throw new ValueError(`repeat() expects a rank-2 tensor, but received a rank-${x.shape.length} tensor.`); } const y = expandDims2(x, 1); - return tile2(y, [1, n, 1]); + return tile2(y, [1, n2, 1]); }); } function flatten2(x) { @@ -19191,14 +18636,14 @@ function concatAlongFirstAxis(a, b) { throw new ValueError(`concatAlongFirstAxis() received an unsupported tensor rank: ${a.rank}`); } } -function tile2(x, n) { - if (!Array.isArray(n)) { - n = [n]; +function tile2(x, n2) { + if (!Array.isArray(n2)) { + n2 = [n2]; } - if (x.rank !== n.length) { - throw new ValueError(`The length of input n (${n.length}) does not match the number of dimensions in input x (${x.rank})`); + if (x.rank !== n2.length) { + throw new ValueError(`The length of input n (${n2.length}) does not match the number of dimensions in input x (${x.rank})`); } - return tile(x, n); + return tile(x, n2); } function randomNormal2(shape, mean5 = 0, stddev = 1, dtype, seed) { return randomNormal(shape, mean5, stddev, dtype, seed); @@ -19233,13 +18678,13 @@ function dot2(a, b, activation2, bias) { const bLastDim = bShape.pop(); const ySecondLastDim = bShape.pop(); const yOtherDims = [...bShape, bLastDim]; - const perm = Array.from({ length: b.rank }, (_, i) => { - if (i === 0) { + const perm = Array.from({ length: b.rank }, (_, i2) => { + if (i2 === 0) { return b.rank - 2; - } else if (i <= b.rank - 2) { - return i - 1; + } else if (i2 <= b.rank - 2) { + return i2 - 1; } - return i; + return i2; }); b = reshape(transpose(b, perm), [ySecondLastDim, -1]); const outputShape = [...aFirstDims, ...yOtherDims]; @@ -20097,9 +19542,9 @@ var Layer = class extends serialization_exports.Serializable { } } if (spec.shape != null) { - for (let i = 0; i < spec.shape.length; ++i) { - const specDim = spec.shape[i]; - const dim = x.shape[i]; + for (let i2 = 0; i2 < spec.shape.length; ++i2) { + const specDim = spec.shape[i2]; + const dim = x.shape[i2]; if (specDim != null && dim != null) { if (specDim !== dim) { throw new ValueError(`Input ${inputIndex} is incompatible with layer ${this.name}: expected shape=${spec.shape}, found shape=${x.shape}.`); @@ -20203,8 +19648,8 @@ var Layer = class extends serialization_exports.Serializable { console.warn(`The rank of the input tensor provided (shape: ${JSON.stringify(inputShape)}) does not match that of the batchInputShape (${JSON.stringify(this.batchInputShape)}) of the layer ${this.name}`); } else { let dimMismatch = false; - this.batchInputShape.forEach((dimension, i) => { - if (dimension != null && inputShape[i] != null && inputShape[i] !== dimension) { + this.batchInputShape.forEach((dimension, i2) => { + if (dimension != null && inputShape[i2] != null && inputShape[i2] !== dimension) { dimMismatch = true; } }); @@ -20258,10 +19703,10 @@ var Layer = class extends serialization_exports.Serializable { } const weightValueTuples = []; const paramValues = batchGetValue(params); - for (let i = 0; i < paramValues.length; ++i) { - const pv = paramValues[i]; - const p2 = params[i]; - const w = weights[i]; + for (let i2 = 0; i2 < paramValues.length; ++i2) { + const pv = paramValues[i2]; + const p2 = params[i2]; + const w = weights[i2]; if (!util_exports.arraysEqual(pv.shape, w.shape)) { throw new ValueError(`Layer weight shape ${pv.shape} not compatible with provided weight shape ${w.shape}`); } @@ -20356,10 +19801,10 @@ var Layer = class extends serialization_exports.Serializable { inputShapes, outputShapes }, kwargs); - for (let i = 0; i < outputTensors.length; i++) { - outputTensors[i].sourceLayer = this; - outputTensors[i].nodeIndex = this.inboundNodes.length - 1; - outputTensors[i].tensorIndex = i; + for (let i2 = 0; i2 < outputTensors.length; i2++) { + outputTensors[i2].sourceLayer = this; + outputTensors[i2].nodeIndex = this.inboundNodes.length - 1; + outputTensors[i2].tensorIndex = i2; } } getConfig() { @@ -20420,10 +19865,10 @@ function getSourceInputs(tensor2, layer, nodeIndex) { return node2.inputTensors; } else { const sourceTensors = []; - for (let i = 0; i < node2.inboundLayers.length; i++) { - const x = node2.inputTensors[i]; - const layer2 = node2.inboundLayers[i]; - const nodeIndex2 = node2.nodeIndices[i]; + for (let i2 = 0; i2 < node2.inboundLayers.length; i2++) { + const x = node2.inputTensors[i2]; + const layer2 = node2.inboundLayers[i2]; + const nodeIndex2 = node2.nodeIndices[i2]; const previousSources = getSourceInputs(x, layer2, nodeIndex2); for (const x2 of previousSources) { if (sourceTensors.indexOf(x2) === -1) { @@ -20628,7 +20073,7 @@ function execute(fetches, feedDict, kwargs, probe) { const training = kwargs == null ? false : kwargs["training"]; const arrayFetches = Array.isArray(fetches); const fetchArray = arrayFetches ? fetches : [fetches]; - const outputNames = fetchArray.map((t2) => t2.name); + const outputNames = fetchArray.map((t22) => t22.name); const finalOutputs = []; const feedNames = feedDict.names(); for (const outputName of outputNames) { @@ -20657,7 +20102,7 @@ function execute(fetches, feedDict, kwargs, probe) { Object.assign(recipientCounts, cachedRecipientCounts.get(fetchAndFeedKey)); } const internalFeedDict = new FeedDict(feedDict); - for (let i = 0; i < sorted.length; ++i) { + for (let i2 = 0; i2 < sorted.length; ++i2) { if (probe != null) { const numTensors = memory().numTensors; if (numTensors > probe.maxNumTensors) { @@ -20667,7 +20112,7 @@ function execute(fetches, feedDict, kwargs, probe) { probe.minNumTensors = numTensors; } } - const symbolic = sorted[i]; + const symbolic = sorted[i2]; const srcLayer = symbolic.sourceLayer; if (srcLayer instanceof InputLayer) { continue; @@ -20702,13 +20147,13 @@ function execute(fetches, feedDict, kwargs, probe) { } const layerOutputs = getNodeOutputs(symbolic); const outputSymbolicTensors = Array.isArray(layerOutputs) ? layerOutputs : [layerOutputs]; - for (let i2 = 0; i2 < outputSymbolicTensors.length; ++i2) { - if (!internalFeedDict.hasKey(outputSymbolicTensors[i2])) { - internalFeedDict.add(outputSymbolicTensors[i2], outputTensors[i2], Array.isArray(outputMask) ? outputMask[0] : outputMask); + for (let i3 = 0; i3 < outputSymbolicTensors.length; ++i3) { + if (!internalFeedDict.hasKey(outputSymbolicTensors[i3])) { + internalFeedDict.add(outputSymbolicTensors[i3], outputTensors[i3], Array.isArray(outputMask) ? outputMask[0] : outputMask); } - const index2 = outputNames.indexOf(outputSymbolicTensors[i2].name); + const index2 = outputNames.indexOf(outputSymbolicTensors[i3].name); if (index2 !== -1) { - finalOutputs[index2] = outputTensors[i2]; + finalOutputs[index2] = outputTensors[i3]; } } if (!training) { @@ -20802,10 +20247,10 @@ function getNodeOutputs(fetch4) { layerOutputs = fetch4.sourceLayer.output; } else { let nodeIndex = null; - for (let i = 0; i < fetch4.sourceLayer.inboundNodes.length; ++i) { - for (const outputTensor of fetch4.sourceLayer.inboundNodes[i].outputTensors) { + for (let i2 = 0; i2 < fetch4.sourceLayer.inboundNodes.length; ++i2) { + for (const outputTensor of fetch4.sourceLayer.inboundNodes[i2].outputTensors) { if (outputTensor.id === fetch4.id) { - nodeIndex = i; + nodeIndex = i2; break; } } @@ -21070,6 +20515,7 @@ __export2(exports_layers_exports, { prelu: () => prelu2, reLU: () => reLU, repeatVector: () => repeatVector, + rescaling: () => rescaling, reshape: () => reshape2, rnn: () => rnn2, separableConv2d: () => separableConv2d2, @@ -21101,8 +20547,8 @@ async function resolveScalarsInLogs(logs) { } if (promises.length > 0) { const values = await Promise.all(promises); - for (let i = 0; i < values.length; ++i) { - logs[keys[i]] = values[i][0]; + for (let i2 = 0; i2 < values.length; ++i2) { + logs[keys[i2]] = values[i2][0]; } dispose(scalarsToDispose); } @@ -21295,20 +20741,20 @@ var History = class extends BaseCallback { const indices = []; for (const key in this.history) { const valueArray = this.history[key]; - for (let i = 0; i < valueArray.length; ++i) { - if (typeof valueArray[i] !== "number") { - const valueScalar = valueArray[i]; + for (let i2 = 0; i2 < valueArray.length; ++i2) { + if (typeof valueArray[i2] !== "number") { + const valueScalar = valueArray[i2]; promises.push(valueScalar.data()); keys.push(key); - indices.push(i); + indices.push(i2); } } } const values = await Promise.all(promises); - for (let n = 0; n < values.length; ++n) { - const tensorToDispose = this.history[keys[n]][indices[n]]; + for (let n2 = 0; n2 < values.length; ++n2) { + const tensorToDispose = this.history[keys[n2]][indices[n2]]; tensorToDispose.dispose(); - this.history[keys[n]][indices[n]] = values[n][0]; + this.history[keys[n2]][indices[n2]] = values[n2][0]; } } }; @@ -21823,13 +21269,13 @@ function printSummary(model22, lineLength, positions, printFn = console.log) { printRow(toDisplay, positions, printFn); printFn("=".repeat(lineLength)); const layers = model22.layers; - for (let i = 0; i < layers.length; ++i) { + for (let i2 = 0; i2 < layers.length; ++i2) { if (sequentialLike) { - printLayerSummary(layers[i], positions, printFn); + printLayerSummary(layers[i2], positions, printFn); } else { - printLayerSummaryWithConnections(layers[i], positions, relevantNodes, printFn); + printLayerSummaryWithConnections(layers[i2], positions, relevantNodes, printFn); } - printFn((i === layers.length - 1 ? "=" : "_").repeat(lineLength)); + printFn((i2 === layers.length - 1 ? "=" : "_").repeat(lineLength)); } model22.checkTrainableWeightsConsistency(); const trainableCount = countTrainableParams(model22); @@ -21884,13 +21330,13 @@ function isModelSequentialLike(model22) { } function printRow(fields, positions, printFn = console.log) { let line = ""; - for (let i = 0; i < fields.length; ++i) { - if (i > 0) { + for (let i2 = 0; i2 < fields.length; ++i2) { + if (i2 > 0) { line = line.slice(0, line.length - 1) + " "; } - line += fields[i]; - line = line.slice(0, positions[i]); - line += " ".repeat(positions[i] - line.length); + line += fields[i2]; + line = line.slice(0, positions[i2]); + line += " ".repeat(positions[i2] - line.length); } printFn(line); } @@ -21935,10 +21381,10 @@ function printLayerSummaryWithConnections(layer, positions, relevantNodes, print if (relevantNodes != null && relevantNodes.length > 0 && relevantNodes.indexOf(node2) === -1) { continue; } - for (let i = 0; i < node2.inboundLayers.length; ++i) { - const inboundLayer = node2.inboundLayers[i].name; - const inboundLayerIndex = node2.nodeIndices[i]; - const inboundTensorIndex = node2.tensorIndices[i]; + for (let i2 = 0; i2 < node2.inboundLayers.length; ++i2) { + const inboundLayer = node2.inboundLayers[i2].name; + const inboundLayerIndex = node2.nodeIndices[i2]; + const inboundTensorIndex = node2.tensorIndices[i2]; connections.push(`${inboundLayer}[${inboundLayerIndex}][${inboundTensorIndex}]`); } } @@ -21953,8 +21399,8 @@ function printLayerSummaryWithConnections(layer, positions, relevantNodes, print firstConnection ]; printRow(fields, positions, printFn); - for (let i = 1; i < connections.length; ++i) { - printRow(["", "", "", "", connections[i]], positions, printFn); + for (let i2 = 1; i2 < connections.length; ++i2) { + printRow(["", "", "", "", connections[i2]], positions, printFn); } } function isArrayItemInputOrOutputName(key, index2, value) { @@ -21970,9 +21416,9 @@ function convertPythonicToTs(pythonicConfig, key) { } else if (pythonicConfig instanceof Array) { const tsArray = []; const arrayLength = pythonicConfig.length; - for (let i = 0; i < arrayLength; ++i) { - const item = pythonicConfig[i]; - if (isArrayItemInputOrOutputName(key, i, item)) { + for (let i2 = 0; i2 < arrayLength; ++i2) { + const item = pythonicConfig[i2]; + if (isArrayItemInputOrOutputName(key, i2, item)) { tsArray.push(item); } else { tsArray.push(convertPythonicToTs(item, key)); @@ -22003,9 +21449,9 @@ function convertTsToPythonic(tsConfig, key) { } else if (tsConfig instanceof Array) { const pyArray = []; const arrayLength = tsConfig.length; - for (let i = 0; i < arrayLength; ++i) { - const item = tsConfig[i]; - if (isArrayItemInputOrOutputName(key, i, item)) { + for (let i2 = 0; i2 < arrayLength; ++i2) { + const item = tsConfig[i2]; + if (isArrayItemInputOrOutputName(key, i2, item)) { pyArray.push(item); } else { pyArray.push(convertTsToPythonic(item, key)); @@ -22026,7 +21472,7 @@ function convertTsToPythonic(tsConfig, key) { return pyDict; } } -var version2 = "3.20.0"; +var version2 = "3.21.0"; var Container = class extends Layer { constructor(args) { super({}); @@ -22085,10 +21531,10 @@ var Container = class extends Layer { this.feedInputShapes = []; this.feedInputNames = []; this.feedOutputNames = []; - for (let i = 0; i < this.inputLayers.length; i++) { - const layer = this.inputLayers[i]; + for (let i2 = 0; i2 < this.inputLayers.length; i2++) { + const layer = this.inputLayers[i2]; if (!(layer instanceof InputLayer)) { - throw new TypeError(`Input layers to a LayersModel must be InputLayer objects. Received inputs: ${args.inputs}. Input ${i} (0-based) originates from layer type ${layer.getClassName()}.`); + throw new TypeError(`Input layers to a LayersModel must be InputLayer objects. Received inputs: ${args.inputs}. Input ${i2} (0-based) originates from layer type ${layer.getClassName()}.`); } this.inputNames.push(layer.name); this.feedInputShapes.push(layer.batchInputShape); @@ -22126,11 +21572,11 @@ var Container = class extends Layer { nodesInProgress2.push(node2); } const numInboundLayers = node2.inboundLayers.length; - for (let i = 0; i < numInboundLayers; i++) { - const x = node2.inputTensors[i]; - const layer2 = node2.inboundLayers[i]; - const nodeIndex2 = node2.nodeIndices[i]; - const tensorIndex2 = node2.tensorIndices[i]; + for (let i2 = 0; i2 < numInboundLayers; i2++) { + const x = node2.inputTensors[i2]; + const layer2 = node2.inboundLayers[i2]; + const nodeIndex2 = node2.nodeIndices[i2]; + const tensorIndex2 = node2.tensorIndices[i2]; buildMapOfGraph(x, finishedNodes2, nodesInProgress2, layer2, nodeIndex2, tensorIndex2); } finishedNodes2.push(node2); @@ -22156,9 +21602,9 @@ var Container = class extends Layer { layersDepths[node2.outboundLayer.id] = depth; layerIDToLayer[node2.outboundLayer.id] = node2.outboundLayer; nodesDepths[node2.id] = depth; - for (let i = 0; i < node2.inboundLayers.length; i++) { - const inboundLayer = node2.inboundLayers[i]; - const nodeIndex = node2.nodeIndices[i]; + for (let i2 = 0; i2 < node2.inboundLayers.length; i2++) { + const inboundLayer = node2.inboundLayers[i2]; + const nodeIndex = node2.nodeIndices[i2]; const inboundNode = inboundLayer.inboundNodes[nodeIndex]; const previousDepth2 = nodesDepths[inboundNode.id] == null ? 0 : nodesDepths[inboundNode.id]; nodesDepths[inboundNode.id] = Math.max(depth + 1, previousDepth2); @@ -22361,8 +21807,8 @@ var Container = class extends Layer { return tidy(() => { inputs = toList(inputs); const feedDict = new FeedDict(); - for (let i = 0; i < this.inputs.length; ++i) { - feedDict.add(this.inputs[i], inputs[i]); + for (let i2 = 0; i2 < this.inputs.length; ++i2) { + feedDict.add(this.inputs[i2], inputs[i2]); } return execute(this.outputs, feedDict, kwargs); }); @@ -22385,9 +21831,9 @@ var Container = class extends Layer { throw new ValueError(`Invalid inputShape argument ${inputShape}: model has ${this.inputLayers.length} tensor inputs.`); } const layersToOutputShapes = {}; - for (let i = 0; i < inputShapes.length; i++) { - const layer = this.inputLayers[i]; - const inputShape2 = inputShapes[i]; + for (let i2 = 0; i2 < inputShapes.length; i2++) { + const layer = this.inputLayers[i2]; + const inputShape2 = inputShapes[i2]; const shapeKey = layer.name + "_0_0"; layersToOutputShapes[shapeKey] = inputShape2; } @@ -22421,15 +21867,15 @@ var Container = class extends Layer { } const outputShapes = []; const outputShapeKeys = []; - for (let i = 0; i < this.outputLayers.length; i++) { - const layer = this.outputLayers[i]; - const nodeIndex = this.outputLayersNodeIndices[i]; - const tensorIndex = this.outputLayersTensorIndices[i]; + for (let i2 = 0; i2 < this.outputLayers.length; i2++) { + const layer = this.outputLayers[i2]; + const nodeIndex = this.outputLayersNodeIndices[i2]; + const tensorIndex = this.outputLayersTensorIndices[i2]; const shapeKey = `${layer.name}_${nodeIndex}_${tensorIndex}`; outputShapeKeys.push(shapeKey); } - for (let i = 0; i < outputShapeKeys.length; i++) { - const key = outputShapeKeys[i]; + for (let i2 = 0; i2 < outputShapeKeys.length; i2++) { + const key = outputShapeKeys[i2]; assert2(key in layersToOutputShapes); outputShapes.push(layersToOutputShapes[key]); } @@ -22440,10 +21886,10 @@ var Container = class extends Layer { masks = pyListRepeat(null, inputs.length); } const tensorMap = {}; - for (let i = 0; i < this.inputs.length; ++i) { - const x = this.inputs[i]; - const y = inputs[i]; - const mask2 = masks[i]; + for (let i2 = 0; i2 < this.inputs.length; ++i2) { + const x = this.inputs[i2]; + const y = inputs[i2]; + const mask2 = masks[i2]; tensorMap[x.id] = [y, mask2]; } const depthKeys = Object.keys(this.nodesByDepth).map((x) => parseInt(x, 10)).sort(reverseNumberCompare); @@ -22489,10 +21935,10 @@ var Container = class extends Layer { if (layer.activityRegularizer) { throw new NotImplementedError("LayersModel invocation with concrete Tensor value(s) in the presence of activity regularizer(s) is not supported yet."); } - for (let i = 0; i < referenceOutputTensors.length; ++i) { - const x = referenceOutputTensors[i]; - const y = outputTensors2[i]; - const mask2 = outputMasks2[i]; + for (let i2 = 0; i2 < referenceOutputTensors.length; ++i2) { + const x = referenceOutputTensors[i2]; + const y = outputTensors2[i2]; + const mask2 = outputMasks2[i2]; tensorMap[x.id] = [y, mask2]; } } @@ -22582,10 +22028,10 @@ var Container = class extends Layer { } if (node2.inboundLayers.length > 0) { const nodeData = []; - for (let i = 0; i < node2.inboundLayers.length; i++) { - const inboundLayer = node2.inboundLayers[i]; - const nodeIndex = node2.nodeIndices[i]; - const tensorIndex = node2.tensorIndices[i]; + for (let i2 = 0; i2 < node2.inboundLayers.length; i2++) { + const inboundLayer = node2.inboundLayers[i2]; + const nodeIndex = node2.nodeIndices[i2]; + const tensorIndex = node2.tensorIndices[i2]; const nodeKey2 = Container.nodeKey(inboundLayer, nodeIndex); let newNodeIndex = nodeConversionMap[nodeKey2]; if (newNodeIndex == null) { @@ -22606,9 +22052,9 @@ var Container = class extends Layer { } config3["layers"] = layerConfigs; const modelInputs = []; - for (let i = 0; i < this.inputLayers.length; i++) { - const layer = this.inputLayers[i]; - const nodeIndex = this.inputLayersNodeIndices[i]; + for (let i2 = 0; i2 < this.inputLayers.length; i2++) { + const layer = this.inputLayers[i2]; + const nodeIndex = this.inputLayersNodeIndices[i2]; const nodeKey = Container.nodeKey(layer, nodeIndex); if (!this.containerNodes.has(nodeKey)) { continue; @@ -22617,14 +22063,14 @@ var Container = class extends Layer { if (newNodeIndex === null || newNodeIndex === void 0) { newNodeIndex = 0; } - const tensorIndex = this.inputLayersTensorIndices[i]; + const tensorIndex = this.inputLayersTensorIndices[i2]; modelInputs.push([layer.name, newNodeIndex, tensorIndex]); } config3["inputLayers"] = modelInputs; const modelOutputs = []; - for (let i = 0; i < this.outputLayers.length; i++) { - const layer = this.outputLayers[i]; - const nodeIndex = this.outputLayersNodeIndices[i]; + for (let i2 = 0; i2 < this.outputLayers.length; i2++) { + const layer = this.outputLayers[i2]; + const nodeIndex = this.outputLayersNodeIndices[i2]; const nodeKey = Container.nodeKey(layer, nodeIndex); if (!this.containerNodes.has(nodeKey)) { continue; @@ -22633,7 +22079,7 @@ var Container = class extends Layer { if (newNodeIndex === null || newNodeIndex === void 0) { newNodeIndex = 0; } - const tensorIndex = this.outputLayersTensorIndices[i]; + const tensorIndex = this.outputLayersTensorIndices[i2]; modelOutputs.push([layer.name, newNodeIndex, tensorIndex]); } config3["outputLayers"] = modelOutputs; @@ -22898,7 +22344,7 @@ async function fitDataset(model22, dataset, args) { const outLabels = model22.getDedupedMetricsNames(); let callbackMetrics; if (doValidation) { - callbackMetrics = outLabels.slice().concat(outLabels.map((n) => "val_" + n)); + callbackMetrics = outLabels.slice().concat(outLabels.map((n2) => "val_" + n2)); } else { callbackMetrics = outLabels.slice(); } @@ -22944,16 +22390,16 @@ async function fitDataset(model22, dataset, args) { const sampleWeights = []; if (args.classWeight != null) { const standardClassWeights = standardizeClassWeights(args.classWeight, model22.outputNames); - for (let i = 0; i < standardClassWeights.length; ++i) { - sampleWeights.push(await standardizeWeights(ys[i], null, standardClassWeights[i])); + for (let i2 = 0; i2 < standardClassWeights.length; ++i2) { + sampleWeights.push(await standardizeWeights(ys[i2], null, standardClassWeights[i2])); } } const ins = xs.concat(ys).concat(sampleWeights); const outs = trainFunction(ins); dispose(ins); - for (let i = 0; i < outLabels.length; ++i) { - const label = outLabels[i]; - const out = outs[i]; + for (let i2 = 0; i2 < outLabels.length; ++i2) { + const label = outLabels[i2]; + const out = outs[i2]; batchLogs[label] = out; keep(out); } @@ -22973,8 +22419,8 @@ async function fitDataset(model22, dataset, args) { verbose: 0 })); } - for (let i = 0; i < model22.metricsNames.length; ++i) { - epochLogs[`val_${model22.metricsNames[i]}`] = valOuts[i]; + for (let i2 = 0; i2 < model22.metricsNames.length; ++i2) { + epochLogs[`val_${model22.metricsNames[i2]}`] = valOuts[i2]; } } break; @@ -23032,15 +22478,15 @@ async function evaluateDataset(model22, dataset, args) { const batchOuts = tidy(() => f(xsAndYs)); dispose(xsAndYs); if (batch === 0) { - for (let i = 0; i < batchOuts.length; ++i) { + for (let i2 = 0; i2 < batchOuts.length; ++i2) { outs.push(scalar(0)); } } const batchSize = xsAndYs[0].shape[0]; - for (let i = 0; i < batchOuts.length; ++i) { - const batchOut = batchOuts[i]; - const oldScalar = outs[i]; - outs[i] = tidy(() => add2(outs[i], mul(batchSize, batchOut))); + for (let i2 = 0; i2 < batchOuts.length; ++i2) { + const batchOut = batchOuts[i2]; + const oldScalar = outs[i2]; + outs[i2] = tidy(() => add2(outs[i2], mul(batchSize, batchOut))); if (batch > 0) { dispose(oldScalar); } @@ -23058,9 +22504,9 @@ async function evaluateDataset(model22, dataset, args) { break; } } - for (let i = 0; i < outs.length; ++i) { - const oldScalar = outs[i]; - outs[i] = div(outs[i], numExamples); + for (let i2 = 0; i2 < outs.length; ++i2) { + const oldScalar = outs[i2]; + outs[i2] = div(outs[i2], numExamples); dispose(oldScalar); } return singletonOrArray(outs); @@ -23162,18 +22608,18 @@ async function fitLoop(model22, f, ins, outLabels, batchSize, epochs, verbose, c batchLogs["size"] = batchEnd - batchStart; const insBatch = sliceArraysByIndices(ins, batchIds); const outs = f(insBatch); - for (let i = 0; i < outLabels.length; ++i) { - const label = outLabels[i]; - const out = outs[i]; + for (let i2 = 0; i2 < outLabels.length; ++i2) { + const label = outLabels[i2]; + const out = outs[i2]; batchLogs[label] = out; keep(out); } if (batchIndex === batches.length - 1) { if (doValidation) { const valOuts = model22.testLoop(valF, valIns, batchSize); - for (let i = 0; i < outLabels.length; ++i) { - const label = outLabels[i]; - const out = valOuts[i]; + for (let i2 = 0; i2 < outLabels.length; ++i2) { + const label = outLabels[i2]; + const out = valOuts[i2]; keep(out); epochLogs["val_" + label] = out; } @@ -23259,7 +22705,7 @@ async function fitTensors(model22, x, y, args = {}) { if (doValidation) { model22.makeTestFunction(); valFunction = model22.testFunction; - callbackMetrics = outLabels.slice().concat(outLabels.map((n) => "val_" + n)); + callbackMetrics = outLabels.slice().concat(outLabels.map((n2) => "val_" + n2)); } else { valFunction = null; valIns = []; @@ -23286,8 +22732,8 @@ function ensureTensorsRank2OrHigher(tensors) { if (tensors instanceof Tensor) { tensors = [tensors]; } - for (let i = 0; i < tensors.length; ++i) { - const tensor2 = tensors[i]; + for (let i2 = 0; i2 < tensors.length; ++i2) { + const tensor2 = tensors[i2]; if (tensor2.rank === 1) { outs.push(expandDims2(tensor2, 1)); } else if (tensor2.rank === 0) { @@ -23306,7 +22752,7 @@ function disposeNewTensors(tensors, refTensors) { if (refTensors instanceof Tensor) { oldTensorIds.push(refTensors.id); } else if (Array.isArray(refTensors)) { - refTensors.forEach((t2) => oldTensorIds.push(t2.id)); + refTensors.forEach((t22) => oldTensorIds.push(t22.id)); } else if (refTensors != null) { for (const name in refTensors) { const oldTensor = refTensors[name]; @@ -23319,9 +22765,9 @@ function disposeNewTensors(tensors, refTensors) { tensorsToDispose.push(tensors); } } else if (Array.isArray(tensors)) { - tensors.forEach((t2) => { - if (oldTensorIds.indexOf(t2.id) === -1) { - tensorsToDispose.push(t2); + tensors.forEach((t22) => { + if (oldTensorIds.indexOf(t22.id) === -1) { + tensorsToDispose.push(t22); } }); } else if (tensors != null) { @@ -23332,9 +22778,9 @@ function disposeNewTensors(tensors, refTensors) { } } } - tensorsToDispose.forEach((t2) => { - if (!t2.isDisposed) { - t2.dispose(); + tensorsToDispose.forEach((t22) => { + if (!t22.isDisposed) { + t22.dispose(); } }); } @@ -23397,22 +22843,22 @@ function standardizeInputData(data, names, shapes, checkBatchAxis = true, except } arrays = ensureTensorsRank2OrHigher(arrays); if (shapes != null) { - for (let i = 0; i < names.length; ++i) { - if (shapes[i] == null) { + for (let i2 = 0; i2 < names.length; ++i2) { + if (shapes[i2] == null) { continue; } - const array2 = arrays[i]; - if (array2.shape.length !== shapes[i].length) { - throw new ValueError(`Error when checking ${exceptionPrefix}: expected ${names[i]} to have ${shapes[i].length} dimension(s). but got array with shape ${array2.shape}`); + const array2 = arrays[i2]; + if (array2.shape.length !== shapes[i2].length) { + throw new ValueError(`Error when checking ${exceptionPrefix}: expected ${names[i2]} to have ${shapes[i2].length} dimension(s). but got array with shape ${array2.shape}`); } - for (let j = 0; j < shapes[i].length; ++j) { + for (let j = 0; j < shapes[i2].length; ++j) { if (j === 0 && !checkBatchAxis) { continue; } const dim = array2.shape[j]; - const refDim = shapes[i][j]; + const refDim = shapes[i2][j]; if (refDim != null && refDim >= 0 && dim !== refDim) { - throw new ValueError(`${exceptionPrefix} expected a batch of elements where each example has shape [${shapes[i].slice(1, shapes[i].length)}] (i.e.,tensor shape [*,${shapes[i].slice(1, shapes[i].length)}]) but the ${exceptionPrefix} received an input with ${array2.shape[0]} examples, each with shape [${array2.shape.slice(1, array2.shape.length)}] (tensor shape [${array2.shape}])`); + throw new ValueError(`${exceptionPrefix} expected a batch of elements where each example has shape [${shapes[i2].slice(1, shapes[i2].length)}] (i.e.,tensor shape [*,${shapes[i2].slice(1, shapes[i2].length)}]) but the ${exceptionPrefix} received an input with ${array2.shape[0]} examples, each with shape [${array2.shape.slice(1, array2.shape.length)}] (tensor shape [${array2.shape}])`); } } } @@ -23440,10 +22886,10 @@ function checkLossAndTargetCompatibility(targets, lossFns, outputShapes) { binaryCrossentropy, categoricalCrossentropy ]; - for (let i = 0; i < targets.length; ++i) { - const y = targets[i]; - const loss = lossFns[i]; - const shape = outputShapes[i]; + for (let i2 = 0; i2 < targets.length; ++i2) { + const y = targets[i2]; + const loss = lossFns[i2]; + const shape = outputShapes[i2]; if (loss == null) { continue; } @@ -23479,23 +22925,23 @@ function checkInputData(data, names, shapes, checkBatchAxis = true, exceptionPre arrays = [data]; } if (shapes != null) { - for (let i = 0; i < names.length; ++i) { - if (shapes[i] == null) { + for (let i2 = 0; i2 < names.length; ++i2) { + if (shapes[i2] == null) { continue; } - const array2 = arrays[i]; - if (array2.shape.length !== shapes[i].length) { - throw new ValueError(`Error when checking ${exceptionPrefix}: expected ${names[i]} to have ${shapes[i].length} dimension(s), but got array with shape ${JSON.stringify(array2.shape)}`); + const array2 = arrays[i2]; + if (array2.shape.length !== shapes[i2].length) { + throw new ValueError(`Error when checking ${exceptionPrefix}: expected ${names[i2]} to have ${shapes[i2].length} dimension(s), but got array with shape ${JSON.stringify(array2.shape)}`); } - for (let j = 0; j < shapes[i].length; ++j) { + for (let j = 0; j < shapes[i2].length; ++j) { if (j === 0 && !checkBatchAxis) { continue; } const dim = array2.shape[j]; - const refDim = shapes[i][j]; + const refDim = shapes[i2][j]; if (refDim != null) { if (refDim !== dim) { - throw new ValueError(`Error when checking ${exceptionPrefix}: expected ${names[i]} to have shape ${JSON.stringify(shapes[i])} but got array with shape ${JSON.stringify(array2.shape)}.`); + throw new ValueError(`Error when checking ${exceptionPrefix}: expected ${names[i2]} to have shape ${JSON.stringify(shapes[i2])} but got array with shape ${JSON.stringify(array2.shape)}.`); } } } @@ -23574,7 +23020,7 @@ var LayersModel = class extends Container { throw new ValueError(`When passing an Array as loss, it should have one entry per model output. The model has ${this.outputs.length} output(s), but you passed loss=${args.loss}.`); } const theLosses = args.loss; - lossFunctions = theLosses.map((l) => get(l)); + lossFunctions = theLosses.map((l3) => get(l3)); } else { const lossFunction = get(args.loss); this.outputs.forEach((_) => { @@ -23585,26 +23031,26 @@ var LayersModel = class extends Container { this.feedOutputNames = []; this.feedOutputShapes = []; this.feedLossFns = []; - for (let i = 0; i < this.outputs.length; ++i) { - const shape = this.internalOutputShapes[i]; - const name = this.outputNames[i]; + for (let i2 = 0; i2 < this.outputs.length; ++i2) { + const shape = this.internalOutputShapes[i2]; + const name = this.outputNames[i2]; this.feedOutputNames.push(name); this.feedOutputShapes.push(shape); - this.feedLossFns.push(this.lossFunctions[i]); + this.feedLossFns.push(this.lossFunctions[i2]); } const skipTargetIndices = []; this.metrics = args.metrics; this.metricsNames = ["loss"]; this.metricsTensors = []; nameScope("loss", () => { - for (let i = 0; i < this.outputs.length; ++i) { - if (skipTargetIndices.indexOf(i) !== -1) { + for (let i2 = 0; i2 < this.outputs.length; ++i2) { + if (skipTargetIndices.indexOf(i2) !== -1) { continue; } - const weightedLoss = this.lossFunctions[i]; + const weightedLoss = this.lossFunctions[i2]; if (this.outputs.length > 1) { - this.metricsTensors.push([weightedLoss, i]); - this.metricsNames.push(this.outputNames[i] + "_loss"); + this.metricsTensors.push([weightedLoss, i2]); + this.metricsNames.push(this.outputNames[i2] + "_loss"); } } }); @@ -23617,11 +23063,11 @@ var LayersModel = class extends Container { this.metricsTensors.push([metricTensor, outputIndex]); }; nameScope("metric", () => { - for (let i = 0; i < this.outputs.length; ++i) { - if (skipTargetIndices.indexOf(i) !== -1) { + for (let i2 = 0; i2 < this.outputs.length; ++i2) { + if (skipTargetIndices.indexOf(i2) !== -1) { continue; } - const outputMetrics = nestedMetrics[i]; + const outputMetrics = nestedMetrics[i2]; const handleMetrics = (metrics) => { const metricNamePrefix = ""; let metricName; @@ -23629,14 +23075,14 @@ var LayersModel = class extends Container { let weightedMetricFn; for (const metric of metrics) { if (typeof metric === "string" && ["accuracy", "acc", "crossentropy", "ce"].indexOf(metric) !== -1) { - const outputShape = this.internalOutputShapes[i]; - if (outputShape[outputShape.length - 1] === 1 || this.lossFunctions[i] === binaryCrossentropy) { + const outputShape = this.internalOutputShapes[i2]; + if (outputShape[outputShape.length - 1] === 1 || this.lossFunctions[i2] === binaryCrossentropy) { if (["accuracy", "acc"].indexOf(metric) !== -1) { accFn = binaryAccuracy; } else if (["crossentropy", "ce"].indexOf(metric) !== -1) { accFn = binaryCrossentropy2; } - } else if (this.lossFunctions[i] === sparseCategoricalCrossentropy) { + } else if (this.lossFunctions[i2] === sparseCategoricalCrossentropy) { if (["accuracy", "acc"].indexOf(metric) !== -1) { accFn = sparseCategoricalAccuracy; } else if (["crossentropy", "ce"].indexOf(metric) !== -1) { @@ -23666,7 +23112,7 @@ var LayersModel = class extends Container { nameScope(metricName, () => { metricResult = weightedMetricFn; }); - appendMetric(i, metricName, metricResult); + appendMetric(i2, metricName, metricResult); } }; handleMetrics(outputMetrics); @@ -23735,8 +23181,8 @@ var LayersModel = class extends Container { if (inputs.length !== this.inputs.length) { throw new ValueError(`The number of inputs provided (${inputs.length}) does not match the number of inputs of this model (${this.inputs.length}).`); } - for (let i = 0; i < this.inputs.length; ++i) { - feedDict.add(this.inputs[i], inputs[i]); + for (let i2 = 0; i2 < this.inputs.length; ++i2) { + feedDict.add(this.inputs[i2], inputs[i2]); } } else { for (const input2 of this.inputs) { @@ -23756,10 +23202,10 @@ var LayersModel = class extends Container { for (const layer of this.layers) { const layerOutputs = Array.isArray(layer.output) ? layer.output : [layer.output]; const layerOutputNames = layerOutputs.map((output) => output.name); - for (let i = 0; i < symbolicTensorNames.length; ++i) { - const index2 = layerOutputNames.indexOf(symbolicTensorNames[i]); + for (let i2 = 0; i2 < symbolicTensorNames.length; ++i2) { + const index2 = layerOutputNames.indexOf(symbolicTensorNames[i2]); if (index2 !== -1) { - outputSymbolicTensors[i] = layerOutputs[index2]; + outputSymbolicTensors[i2] = layerOutputs[index2]; outputsRemaining--; } if (outputsRemaining === 0) { @@ -23772,9 +23218,9 @@ var LayersModel = class extends Container { } if (outputsRemaining > 0) { const remainingNames = []; - outputSymbolicTensors.forEach((tensor2, i) => { + outputSymbolicTensors.forEach((tensor2, i2) => { if (tensor2 == null) { - remainingNames.push(symbolicTensorNames[i]); + remainingNames.push(symbolicTensorNames[i2]); } }); throw new ValueError(`Cannot find SymbolicTensors for output name(s): ${JSON.stringify(remainingNames)}`); @@ -23796,8 +23242,8 @@ var LayersModel = class extends Container { const insBatch = sliceArrays(ins, batchStart, batchEnd); const feeds = []; if (Array.isArray(insBatch)) { - for (let i = 0; i < insBatch.length; ++i) { - feeds.push({ key: this.inputs[i], value: insBatch[i] }); + for (let i2 = 0; i2 < insBatch.length; ++i2) { + feeds.push({ key: this.inputs[i2], value: insBatch[i2] }); } } else { feeds.push({ key: this.inputs[0], value: insBatch }); @@ -23805,7 +23251,7 @@ var LayersModel = class extends Container { const feedDict = new FeedDict(feeds); return execute(this.outputs, feedDict); }); - batchOuts.forEach((batchOut, i) => outsBatches[i].push(batchOut)); + batchOuts.forEach((batchOut, i2) => outsBatches[i2].push(batchOut)); } return singletonOrArray(outsBatches.map((batches2) => concat(batches2, 0))); }); @@ -23831,9 +23277,9 @@ var LayersModel = class extends Container { throw new RuntimeError("You must compile a model before training/testing. Use LayersModel.compile(modelCompileArgs)."); } const outputShapes = []; - for (let i = 0; i < this.feedOutputShapes.length; ++i) { - const outputShape = this.feedOutputShapes[i]; - const lossFn = this.feedLossFns[i]; + for (let i2 = 0; i2 < this.feedOutputShapes.length; ++i2) { + const outputShape = this.feedOutputShapes[i2]; + const lossFn = this.feedLossFns[i2]; if (lossFn === sparseCategoricalCrossentropy) { outputShapes.push(outputShape.slice(0, outputShape.length - 1).concat([1])); } else { @@ -23860,8 +23306,8 @@ var LayersModel = class extends Container { if (classWeight != null) { const classWeights = standardizeClassWeights(classWeight, this.outputNames); standardSampleWeights = []; - for (let i = 0; i < classWeights.length; ++i) { - standardSampleWeights.push(await standardizeWeights(standardYs[i], null, classWeights[i])); + for (let i2 = 0; i2 < classWeights.length; ++i2) { + standardSampleWeights.push(await standardizeWeights(standardYs[i2], null, classWeights[i2])); } } return [standardXs, standardYs, standardSampleWeights]; @@ -23885,17 +23331,17 @@ var LayersModel = class extends Container { const insBatch = sliceArraysByIndices(ins, batchIds); const batchOuts = f(insBatch); if (batchIndex === 0) { - for (let i = 0; i < batchOuts.length; ++i) { + for (let i2 = 0; i2 < batchOuts.length; ++i2) { outs.push(scalar(0)); } } - for (let i = 0; i < batchOuts.length; ++i) { - const batchOut = batchOuts[i]; - outs[i] = add2(outs[i], mul(batchEnd - batchStart, batchOut)); + for (let i2 = 0; i2 < batchOuts.length; ++i2) { + const batchOut = batchOuts[i2]; + outs[i2] = add2(outs[i2], mul(batchEnd - batchStart, batchOut)); } } - for (let i = 0; i < outs.length; ++i) { - outs[i] = div(outs[i], numSamples); + for (let i2 = 0; i2 < outs.length; ++i2) { + outs[i2] = div(outs[i2], numSamples); } } return outs; @@ -23904,11 +23350,11 @@ var LayersModel = class extends Container { getDedupedMetricsNames() { const outLabels = this.metricsNames; const dedupedOutLabels = []; - for (let i = 0; i < outLabels.length; ++i) { - const label = outLabels[i]; + for (let i2 = 0; i2 < outLabels.length; ++i2) { + const label = outLabels[i2]; let newLabel = label; if (count(outLabels, label) > 1) { - const dupIndex = count(outLabels.slice(0, i), label); + const dupIndex = count(outLabels.slice(0, i2), label); newLabel += `_${dupIndex}`; } dedupedOutLabels.push(newLabel); @@ -23924,33 +23370,33 @@ var LayersModel = class extends Container { const metricsValues = []; const totalLossFunction = () => { const feeds = []; - for (let i = 0; i < this.inputs.length; ++i) { - feeds.push({ key: this.inputs[i], value: inputs[i] }); + for (let i2 = 0; i2 < this.inputs.length; ++i2) { + feeds.push({ key: this.inputs[i2], value: inputs[i2] }); } const feedDict = new FeedDict(feeds); const outputs = execute(this.outputs, feedDict, { "training": true }); let totalLoss; - for (let i = 0; i < this.lossFunctions.length; ++i) { - const lossFunction = this.lossFunctions[i]; - let loss = lossFunction(targets[i], outputs[i]); - if (sampleWeights[i] != null) { - loss = computeWeightedLoss2(loss, sampleWeights[i]); + for (let i2 = 0; i2 < this.lossFunctions.length; ++i2) { + const lossFunction = this.lossFunctions[i2]; + let loss = lossFunction(targets[i2], outputs[i2]); + if (sampleWeights[i2] != null) { + loss = computeWeightedLoss2(loss, sampleWeights[i2]); } const meanLoss = mean(loss); lossValues.push(meanLoss); - if (i === 0) { + if (i2 === 0) { totalLoss = loss; } else { totalLoss = add2(totalLoss, loss); } } - for (let i = 0; i < this.metricsTensors.length; ++i) { + for (let i2 = 0; i2 < this.metricsTensors.length; ++i2) { let weightedMetric; - if (this.outputs.length > 1 && i < this.outputs.length) { - weightedMetric = lossValues[i]; + if (this.outputs.length > 1 && i2 < this.outputs.length) { + weightedMetric = lossValues[i2]; } else { - const metric = this.metricsTensors[i][0]; - const outputIndex = this.metricsTensors[i][1]; + const metric = this.metricsTensors[i2][0]; + const outputIndex = this.metricsTensors[i2][1]; weightedMetric = mean(metric(targets[outputIndex], outputs[outputIndex])); } keep(weightedMetric); @@ -23976,24 +23422,24 @@ var LayersModel = class extends Container { const inputs = data.slice(0, this.inputs.length); const targets = data.slice(this.inputs.length, this.inputs.length + this.outputs.length); const feeds = []; - for (let i = 0; i < this.inputs.length; ++i) { - feeds.push({ key: this.inputs[i], value: inputs[i] }); + for (let i2 = 0; i2 < this.inputs.length; ++i2) { + feeds.push({ key: this.inputs[i2], value: inputs[i2] }); } const feedDict = new FeedDict(feeds); const outputs = execute(this.outputs, feedDict); - for (let i = 0; i < this.lossFunctions.length; ++i) { - const lossFunction = this.lossFunctions[i]; - const loss = mean(lossFunction(targets[i], outputs[i])); - if (i === 0) { + for (let i2 = 0; i2 < this.lossFunctions.length; ++i2) { + const lossFunction = this.lossFunctions[i2]; + const loss = mean(lossFunction(targets[i2], outputs[i2])); + if (i2 === 0) { totalLoss = loss; } else { totalLoss = add2(totalLoss, loss); } valOutputs.push(totalLoss); } - for (let i = 0; i < this.metricsTensors.length; ++i) { - const metric = this.metricsTensors[i][0]; - const outputIndex = this.metricsTensors[i][1]; + for (let i2 = 0; i2 < this.metricsTensors.length; ++i2) { + const metric = this.metricsTensors[i2][0]; + const outputIndex = this.metricsTensors[i2][1]; const meanMetric = mean(metric(targets[outputIndex], outputs[outputIndex])); valOutputs.push(meanMetric); } @@ -24028,11 +23474,11 @@ var LayersModel = class extends Container { const trainableOnly = config3 != null && config3.trainableOnly; const weights = trainableOnly ? this.trainableWeights : this.weights; const weightValues = this.getWeights(trainableOnly); - for (let i = 0; i < weights.length; ++i) { - if (trainableOnly && !weights[i].trainable) { + for (let i2 = 0; i2 < weights.length; ++i2) { + if (trainableOnly && !weights[i2].trainable) { continue; } - namedWeights.push({ name: weights[i].originalName, tensor: weightValues[i] }); + namedWeights.push({ name: weights[i2].originalName, tensor: weightValues[i2] }); } return namedWeights; } @@ -24829,15 +24275,15 @@ var PReLU = class extends Layer { inputShape = getExactlyOneShape(inputShape); const paramShape = inputShape.slice(1); if (this.sharedAxes != null) { - for (const i of this.sharedAxes) { - paramShape[i - 1] = 1; + for (const i2 of this.sharedAxes) { + paramShape[i2 - 1] = 1; } } this.alpha = this.addWeight("alpha", paramShape, "float32", this.alphaInitializer, this.alphaRegularizer, true, this.alphaConstraint); const axes = {}; if (this.sharedAxes != null) { - for (let i = 1; i < inputShape.length; ++i) { - axes[i] = inputShape[i]; + for (let i2 = 1; i2 < inputShape.length; ++i2) { + axes[i2] = inputShape[i2]; } } this.inputSpec = [new InputSpec({ @@ -24943,17 +24389,17 @@ var Softmax3 = class extends Layer { }; Softmax3.className = "Softmax"; serialization_exports.registerClass(Softmax3); -function normalizeArray(value, n, name) { +function normalizeArray(value, n2, name) { if (typeof value === "number") { - return pyListRepeat(value, n); + return pyListRepeat(value, n2); } else { - if (value.length !== n) { - throw new ValueError(`The ${name} argument must be an integer or tuple of ${n} integers. Received: ${value.length} elements.`); + if (value.length !== n2) { + throw new ValueError(`The ${name} argument must be an integer or tuple of ${n2} integers. Received: ${value.length} elements.`); } - for (let i = 0; i < n; ++i) { - const singleValue = value[i]; + for (let i2 = 0; i2 < n2; ++i2) { + const singleValue = value[i2]; if (!isInteger(singleValue)) { - throw new ValueError(`The ${name} argument must be an integer or tuple of ${n} integers. Received: ${JSON.stringify(value)} including a non-integer number ${singleValue}`); + throw new ValueError(`The ${name} argument must be an integer or tuple of ${n2} integers. Received: ${JSON.stringify(value)} including a non-integer number ${singleValue}`); } } return value; @@ -25212,8 +24658,8 @@ var Conv = class extends BaseConv { inputShape = getExactlyOneShape(inputShape); const newSpace = []; const space = this.dataFormat === "channelsLast" ? inputShape.slice(1, inputShape.length - 1) : inputShape.slice(2); - for (let i = 0; i < space.length; ++i) { - const newDim = convOutputLength(space[i], this.kernelSize[i], this.padding, this.strides[i], typeof this.dilationRate === "number" ? this.dilationRate : this.dilationRate[i]); + for (let i2 = 0; i2 < space.length; ++i2) { + const newDim = convOutputLength(space[i2], this.kernelSize[i2], this.padding, this.strides[i2], typeof this.dilationRate === "number" ? this.dilationRate : this.dilationRate[i2]); newSpace.push(newDim); } let outputShape = [inputShape[0]]; @@ -25530,7 +24976,7 @@ var SeparableConv = class extends Conv { const inputDim = inputShape[channelAxis]; const depthwiseKernelShape = this.kernelSize.concat([inputDim, this.depthMultiplier]); const pointwiseKernelShape = []; - for (let i = 0; i < this.rank; ++i) { + for (let i2 = 0; i2 < this.rank; ++i2) { pointwiseKernelShape.push(1); } pointwiseKernelShape.push(inputDim * this.depthMultiplier, this.filters); @@ -25869,19 +25315,19 @@ function rnn(stepFunction, inputs, initialStates, goBackwards = false, mask2, co if (mask2 != null) { perStepMasks = unstack(mask2); } - for (let t2 = 0; t2 < timeSteps; ++t2) { - const currentInput = perStepInputs[t2]; + for (let t22 = 0; t22 < timeSteps; ++t22) { + const currentInput = perStepInputs[t22]; const stepOutputs = tidy(() => stepFunction(currentInput, states)); if (mask2 == null) { lastOutput = stepOutputs[0]; states = stepOutputs[1]; } else { const maskedOutputs = tidy(() => { - const stepMask = perStepMasks[t2]; + const stepMask = perStepMasks[t22]; const negStepMask = sub(onesLike(stepMask), stepMask); const output = add2(mul(stepOutputs[0], stepMask), mul(states[0], negStepMask)); - const newStates = states.map((state, i) => { - return add2(mul(stepOutputs[1][i], stepMask), mul(state, negStepMask)); + const newStates = states.map((state, i2) => { + return add2(mul(stepOutputs[1][i2], stepMask), mul(state, negStepMask)); }); return { output, newStates }; }); @@ -25971,7 +25417,7 @@ var RNN = class extends Layer { } const outputMask = this.returnSequences ? mask2 : null; if (this.returnState) { - const stateMask = this.states.map((s) => null); + const stateMask = this.states.map((s2) => null); return [outputMask].concat(stateMask); } else { return outputMask; @@ -25982,7 +25428,7 @@ var RNN = class extends Layer { if (this.states_ == null) { const numStates = Array.isArray(this.cell.stateSize) ? this.cell.stateSize.length : 1; const output = []; - for (let i = 0; i < numStates; ++i) { + for (let i2 = 0; i2 < numStates; ++i2) { output.push(null); } return output; @@ -25990,8 +25436,8 @@ var RNN = class extends Layer { return this.states_; } } - set states(s) { - this.states_ = s; + set states(s2) { + this.states_ = s2; } build(inputShape) { const constantShape = null; @@ -26435,7 +25881,7 @@ var GRUCell = class extends RNNCell { const dpMask = this.dropoutMask; const recDpMask = this.recurrentDropoutMask; let z; - let r; + let r2; let hh; if (0 < this.dropout && this.dropout < 1) { inputs = mul(inputs, dpMask[0]); @@ -26453,8 +25899,8 @@ var GRUCell = class extends RNNCell { const [xZ, xR, xH] = split(matrixX, 3, matrixX.rank - 1); const [recurrentZ, recurrentR] = split(matrixInner, 2, matrixInner.rank - 1); z = this.recurrentActivation.apply(add2(xZ, recurrentZ)); - r = this.recurrentActivation.apply(add2(xR, recurrentR)); - const recurrentH = dot2(mul(r, hTMinus1), rk2); + r2 = this.recurrentActivation.apply(add2(xR, recurrentR)); + const recurrentH = dot2(mul(r2, hTMinus1), rk2); hh = this.activation.apply(add2(xH, recurrentH)); const h = add2(mul(z, hTMinus1), mul(add2(1, neg(z)), hh)); return [h, h]; @@ -26612,7 +26058,7 @@ var LSTMCell = class extends RNNCell { } const dpMask = this.dropoutMask; const recDpMask = this.recurrentDropoutMask; - let i; + let i2; let f; let c; let o; @@ -26628,9 +26074,9 @@ var LSTMCell = class extends RNNCell { z = biasAdd(z, this.bias.read()); } const [z0, z1, z2, z3] = split(z, 4, z.rank - 1); - i = this.recurrentActivation.apply(z0); + i2 = this.recurrentActivation.apply(z0); f = this.recurrentActivation.apply(z1); - c = add2(mul(f, cTMinus1), mul(i, this.activation.apply(z2))); + c = add2(mul(f, cTMinus1), mul(i2, this.activation.apply(z2))); o = this.recurrentActivation.apply(z3); const h = mul(o, this.activation.apply(c)); return [h, h, c]; @@ -26727,10 +26173,10 @@ var StackedRNNCells = class extends RNNCell { nestedStates.reverse(); const newNestedStates = []; let callInputs; - for (let i = 0; i < this.cells.length; ++i) { - const cell = this.cells[i]; - states = nestedStates[i]; - if (i === 0) { + for (let i2 = 0; i2 < this.cells.length; ++i2) { + const cell = this.cells[i2]; + states = nestedStates[i2]; + if (i2 === 0) { callInputs = [inputs[0]].concat(states); } else { callInputs = [callInputs[0]].concat(states); @@ -26751,8 +26197,8 @@ var StackedRNNCells = class extends RNNCell { } inputShape = inputShape; let outputDim; - this.cells.forEach((cell, i) => { - nameScope(`RNNCell_${i}`, () => { + this.cells.forEach((cell, i2) => { + nameScope(`RNNCell_${i2}`, () => { cell.build(inputShape); if (Array.isArray(cell.stateSize)) { outputDim = cell.stateSize[0]; @@ -26819,8 +26265,8 @@ var StackedRNNCells = class extends RNNCell { for (const cell of this.cells) { const numParams = cell.weights.length; const inputWeights = weights.splice(numParams); - for (let i = 0; i < cell.weights.length; ++i) { - tuples.push([cell.weights[i], inputWeights[i]]); + for (let i2 = 0; i2 < cell.weights.length; ++i2) { + tuples.push([cell.weights[i2], inputWeights[i2]]); } } batchSetValue(tuples); @@ -26838,17 +26284,17 @@ function generateDropoutMask(args) { const masks = Array(count22).fill(void 0).map(createMask); return masks.map((m) => keep(m.clone())); } -var __rest = function(s, e) { - var t2 = {}; - for (var p2 in s) - if (Object.prototype.hasOwnProperty.call(s, p2) && e.indexOf(p2) < 0) - t2[p2] = s[p2]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p2 = Object.getOwnPropertySymbols(s); i < p2.length; i++) { - if (e.indexOf(p2[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p2[i])) - t2[p2[i]] = s[p2[i]]; +var __rest = function(s2, e2) { + var t22 = {}; + for (var p2 in s2) + if (Object.prototype.hasOwnProperty.call(s2, p2) && e2.indexOf(p2) < 0) + t22[p2] = s2[p2]; + if (s2 != null && typeof Object.getOwnPropertySymbols === "function") + for (var i2 = 0, p2 = Object.getOwnPropertySymbols(s2); i2 < p2.length; i2++) { + if (e2.indexOf(p2[i2]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p2[i2])) + t22[p2[i2]] = s2[p2[i2]]; } - return t2; + return t22; }; var ConvRNN2D = class extends RNN { constructor(args) { @@ -27077,9 +26523,9 @@ var ConvLSTM2DCell = class extends LSTMCell { hF = this.recurrentConv(hF, recKernelF); hC = this.recurrentConv(hC, recKernelC); hO = this.recurrentConv(hO, recKernelO); - const i = this.recurrentActivation.apply(add2(xI, hI)); + const i2 = this.recurrentActivation.apply(add2(xI, hI)); const f = this.recurrentActivation.apply(add2(xF, hF)); - const c = add2(mul(f, cTMinus1), mul(i, this.activation.apply(add2(xC, hC)))); + const c = add2(mul(f, cTMinus1), mul(i2, this.activation.apply(add2(xC, hC)))); const h = mul(this.recurrentActivation.apply(add2(xO, hO)), this.activation.apply(c)); return [h, h, c]; }); @@ -27135,8 +26581,8 @@ var Dropout = class extends Layer { } const inputShape = input2.shape; const noiseShape = []; - for (let i = 0; i < this.noiseShape.length; ++i) { - noiseShape.push(this.noiseShape[i] == null ? inputShape[i] : this.noiseShape[i]); + for (let i2 = 0; i2 < this.noiseShape.length; ++i2) { + noiseShape.push(this.noiseShape[i2] == null ? inputShape[i2] : this.noiseShape[i2]); } return noiseShape; } @@ -27293,8 +26739,8 @@ var Flatten = class extends Layer { let input2 = getExactlyOneTensor(inputs); if (this.dataFormat === "channelsFirst" && input2.rank > 1) { const permutation = [0]; - for (let i = 2; i < input2.rank; ++i) { - permutation.push(i); + for (let i2 = 2; i2 < input2.rank; ++i2) { + permutation.push(i2); } permutation.push(1); input2 = transpose(input2, permutation); @@ -27366,9 +26812,9 @@ var Reshape2 = class extends Layer { constructor(args) { super(args); this.targetShape = args.targetShape; - for (let i = 0; i < this.targetShape.length; ++i) { - if (this.isUnknown(this.targetShape[i])) { - this.targetShape[i] = null; + for (let i2 = 0; i2 < this.targetShape.length; ++i2) { + if (this.isUnknown(this.targetShape[i2])) { + this.targetShape[i2] = null; } } } @@ -27380,11 +26826,11 @@ var Reshape2 = class extends Layer { const finalShape = outputShape.slice(); let known = 1; let unknown = null; - for (let i = 0; i < finalShape.length; ++i) { - const dim = finalShape[i]; + for (let i2 = 0; i2 < finalShape.length; ++i2) { + const dim = finalShape[i2]; if (this.isUnknown(dim)) { if (unknown === null) { - unknown = i; + unknown = i2; } else { throw new ValueError("Can only specifiy one unknown dimension."); } @@ -27405,8 +26851,8 @@ var Reshape2 = class extends Layer { } computeOutputShape(inputShape) { let anyUnknownDims = false; - for (let i = 0; i < inputShape.length; ++i) { - if (this.isUnknown(inputShape[i])) { + for (let i2 = 0; i2 < inputShape.length; ++i2) { + if (this.isUnknown(inputShape[i2])) { anyUnknownDims = true; break; } @@ -27457,8 +26903,8 @@ var Permute = class extends Layer { computeOutputShape(inputShape) { inputShape = getExactlyOneShape(inputShape); const outputShape = inputShape.slice(); - this.dims.forEach((dim, i) => { - outputShape[i + 1] = inputShape[dim]; + this.dims.forEach((dim, i2) => { + outputShape[i2 + 1] = inputShape[dim]; }); return outputShape; } @@ -27567,16 +27013,16 @@ var Embedding = class extends Layer { if (inLens.length !== inputShape.length - 1) { throw new ValueError(`"inputLength" is ${this.inputLength}, but received input shape has shape ${inputShape}`); } else { - let i = 0; + let i2 = 0; for (let k = 0; k < inLens.length; ++k) { const s1 = inLens[k]; const s2 = inputShape[k + 1]; if (s1 != null && s2 != null && s1 !== s2) { throw new ValueError(`"inputLength" is ${this.inputLength}, but received input shape has shape ${inputShape}`); } else if (s1 == null) { - inLens[i] = s2; + inLens[i2] = s2; } - i++; + i2++; } } return [inputShape[0], ...inLens, this.outputDim]; @@ -27628,19 +27074,19 @@ var Merge = class extends Layer { } const outputShape = shape1.slice(0, shape1.length - shape2.length); for (let k = 0; k < shape2.length; ++k) { - const i = shape1[shape1.length - shape2.length + k]; + const i2 = shape1[shape1.length - shape2.length + k]; const j = shape2[k]; - if (i == null || j == null || i < 0 || j < 0) { + if (i2 == null || j == null || i2 < 0 || j < 0) { outputShape.push(null); - } else if (i === 1) { + } else if (i2 === 1) { outputShape.push(j); } else if (j === 1) { - outputShape.push(i); + outputShape.push(i2); } else { - if (i !== j) { + if (i2 !== j) { throw new ValueError("Operands could not be broadcast together with shapes " + JSON.stringify(shape1) + " " + JSON.stringify(shape2)); } - outputShape.push(i); + outputShape.push(i2); } } return outputShape; @@ -27664,8 +27110,8 @@ var Merge = class extends Layer { throw new ValueError(`Can not merge tensors with different batch sizes. Got tensors with shapes: ${JSON.stringify(inputShape)}.`); } let outputShape = inputShape[0] == null ? null : inputShape[0].slice(1); - for (let i = 1; i < inputShape.length; ++i) { - const shape = inputShape[i] == null ? null : inputShape[i].slice(1); + for (let i2 = 1; i2 < inputShape.length; ++i2) { + const shape = inputShape[i2] == null ? null : inputShape[i2].slice(1); outputShape = this.computeElementwiseOpOutputShape(outputShape, shape); } const allRanks = inputShape.map((shape) => shape.length); @@ -27741,8 +27187,8 @@ var Merge = class extends Layer { } else { outputShape = inputShape[0].slice(1); } - for (let i = 1; i < inputShape.length; ++i) { - const shape = inputShape[i] == null ? null : inputShape[i].slice(1); + for (let i2 = 1; i2 < inputShape.length; ++i2) { + const shape = inputShape[i2] == null ? null : inputShape[i2].slice(1); outputShape = this.computeElementwiseOpOutputShape(outputShape, shape); } let batchSizes = []; @@ -27778,8 +27224,8 @@ var Merge = class extends Layer { } mask2 = mask2.map((m) => m == null ? m : expandDims(m, 0)); let output = mask2[0]; - for (let i = 1; i < mask2.length - 1; ++i) { - output = logicalAnd(output, mask2[i]); + for (let i2 = 1; i2 < mask2.length - 1; ++i2) { + output = logicalAnd(output, mask2[i2]); } return output; }); @@ -27792,8 +27238,8 @@ var Add2 = class extends Merge { mergeFunction(inputs) { return tidy(() => { let output = inputs[0].clone(); - for (let i = 1; i < inputs.length; ++i) { - output = add2(output, inputs[i]); + for (let i2 = 1; i2 < inputs.length; ++i2) { + output = add2(output, inputs[i2]); } return output; }); @@ -27808,8 +27254,8 @@ var Multiply2 = class extends Merge { mergeFunction(inputs) { return tidy(() => { let output = inputs[0].clone(); - for (let i = 1; i < inputs.length; ++i) { - output = mul(output, inputs[i]); + for (let i2 = 1; i2 < inputs.length; ++i2) { + output = mul(output, inputs[i2]); } return output; }); @@ -27824,8 +27270,8 @@ var Average = class extends Merge { mergeFunction(inputs) { return tidy(() => { let output = inputs[0].clone(); - for (let i = 1; i < inputs.length; ++i) { - output = add2(output, inputs[i]); + for (let i2 = 1; i2 < inputs.length; ++i2) { + output = add2(output, inputs[i2]); } return mul(1 / inputs.length, output); }); @@ -27840,8 +27286,8 @@ var Maximum2 = class extends Merge { mergeFunction(inputs) { return tidy(() => { let output = inputs[0]; - for (let i = 1; i < inputs.length; ++i) { - output = maximum(output, inputs[i]); + for (let i2 = 1; i2 < inputs.length; ++i2) { + output = maximum(output, inputs[i2]); } return output; }); @@ -27856,8 +27302,8 @@ var Minimum2 = class extends Merge { mergeFunction(inputs) { return tidy(() => { let output = inputs[0]; - for (let i = 1; i < inputs.length; ++i) { - output = minimum(output, inputs[i]); + for (let i2 = 1; i2 < inputs.length; ++i2) { + output = minimum(output, inputs[i2]); } return output; }); @@ -27892,8 +27338,8 @@ var Concatenate = class extends Merge { return; } const shapeSet = []; - for (let i = 0; i < inputShape.length; ++i) { - const shapeWithoutConcatAxis = inputShape[i].slice(); + for (let i2 = 0; i2 < inputShape.length; ++i2) { + const shapeWithoutConcatAxis = inputShape[i2].slice(); shapeWithoutConcatAxis.splice(this.axis, 1); let exists = false; for (const shape of shapeSet) { @@ -27956,13 +27402,13 @@ var Concatenate = class extends Merge { return null; } const outputMasks = []; - for (let i = 0; i < inputs.length; ++i) { - if (mask2[i] == null) { - outputMasks.push(cast(onesLike(inputs[i]), "bool")); - } else if (mask2[i].rank < inputs[i].rank) { - outputMasks.push(expandDims(mask2[i], -1)); + for (let i2 = 0; i2 < inputs.length; ++i2) { + if (mask2[i2] == null) { + outputMasks.push(cast(onesLike(inputs[i2]), "bool")); + } else if (mask2[i2].rank < inputs[i2].rank) { + outputMasks.push(expandDims(mask2[i2], -1)); } else { - outputMasks.push(mask2[i]); + outputMasks.push(mask2[i2]); } } const concatenatedMasks = concat(outputMasks, this.axis); @@ -28009,14 +27455,14 @@ function batchDot(x, y, axes) { if (xNDim > yNDim) { diff = xNDim - yNDim; const diffShape = []; - for (let i = 0; i < diff; ++i) { + for (let i2 = 0; i2 < diff; ++i2) { diffShape.push(1); } y = reshape(y, y.shape.concat(diffShape)); } else if (yNDim > xNDim) { diff = yNDim - xNDim; const diffShape = []; - for (let i = 0; i < diff; ++i) { + for (let i2 = 0; i2 < diff; ++i2) { diffShape.push(1); } x = reshape(x, x.shape.concat(diffShape)); @@ -28043,8 +27489,8 @@ function batchDot(x, y, axes) { idx = xNDim - 1; } const squeezeAxes = []; - for (let i = idx; i < idx + diff; ++i) { - squeezeAxes.push(i); + for (let i2 = idx; i2 < idx + diff; ++i2) { + squeezeAxes.push(i2); } out = squeeze(out, squeezeAxes); } @@ -28087,7 +27533,7 @@ var Dot = class extends Merge { interpretAxis(this.axes, x2.shape.length) ]; } else { - axes = this.axes.map((axis, i) => interpretAxis(axis, inputs[i].shape.length)); + axes = this.axes.map((axis, i2) => interpretAxis(axis, inputs[i2].shape.length)); } if (this.normalize) { x1 = l2Normalize(x1, axes[0]); @@ -28434,9 +27880,9 @@ var LayerNormalization = class extends Layer { if (typeof this.axis === "number") { this.axis = [this.axis]; } - for (let i = 0; i < this.axis.length; ++i) { - if (this.axis[i] < 0) { - this.axis[i] += nDims; + for (let i2 = 0; i2 < this.axis.length; ++i2) { + if (this.axis[i2] < 0) { + this.axis[i2] += nDims; } } for (const axis of this.axis) { @@ -28483,13 +27929,13 @@ var LayerNormalization = class extends Layer { let offset = this.center ? broadcast(this.beta.read()) : null; const momentsTiling = []; const scaleOffsetTiling = []; - for (let i = 0; i < nDims; ++i) { - if (this.axis.indexOf(i) !== -1) { - momentsTiling.push(inputShape[i]); + for (let i2 = 0; i2 < nDims; ++i2) { + if (this.axis.indexOf(i2) !== -1) { + momentsTiling.push(inputShape[i2]); scaleOffsetTiling.push(1); } else { momentsTiling.push(1); - scaleOffsetTiling.push(inputShape[i]); + scaleOffsetTiling.push(inputShape[i2]); } } mean5 = tile(mean5, momentsTiling); @@ -29391,6 +28837,37 @@ var Bidirectional = class extends Wrapper { }; Bidirectional.className = "Bidirectional"; serialization_exports.registerClass(Bidirectional); +var Rescaling = class extends Layer { + constructor(args) { + super(args); + this.scale = args.scale; + if (args.offset) { + this.offset = args.offset; + } else { + this.offset = 0; + } + } + getConfig() { + const config3 = { + "scale": this.scale, + "offset": this.offset + }; + const baseConfig = super.getConfig(); + Object.assign(config3, baseConfig); + return config3; + } + call(inputs, kwargs) { + return tidy(() => { + inputs = getExactlyOneTensor(inputs); + if (inputs.dtype !== "float32") { + inputs = cast2(inputs, "float32"); + } + return add2(mul(inputs, this.scale), this.offset); + }); + } +}; +Rescaling.className = "Rescaling"; +serialization_exports.registerClass(Rescaling); function inputLayer(args) { return new InputLayer(args); } @@ -29596,6 +29073,9 @@ function alphaDropout(args) { function masking(args) { return new Masking(args); } +function rescaling(args) { + return new Rescaling(args); +} var exports_metrics_exports = {}; __export2(exports_metrics_exports, { MAPE: () => MAPE2, @@ -29919,9 +29399,9 @@ function getPadding(node2, tensorMap, context) { if (pad3 === "explicit") { pad3 = getParamValue("explicitPaddings", node2, tensorMap, context); const explicitPadding = [[0, 0], [0, 0], [0, 0], [0, 0]]; - for (let i = 0; i < 4; i++) { - explicitPadding[i][0] = pad3[i * 2]; - explicitPadding[i][1] = pad3[i * 2 + 1]; + for (let i2 = 0; i2 < 4; i2++) { + explicitPadding[i2][0] = pad3[i2 * 2]; + explicitPadding[i2][1] = pad3[i2 * 2 + 1]; } return explicitPadding; } @@ -36292,8 +35772,8 @@ function decodeBase64(text) { throw new Error("Unable to decode base64 in this environment. Missing built-in atob() or Buffer()"); } } -function parseStringParam(s, keepCase) { - const value = Array.isArray(s) ? String.fromCharCode.apply(null, s) : decodeBase64(s); +function parseStringParam(s2, keepCase) { + const value = Array.isArray(s2) ? String.fromCharCode.apply(null, s2) : decodeBase64(s2); return keepCase ? value : value.toLowerCase(); } function getStringParam(attrs, name, def, keepCase = false) { @@ -36600,6 +36080,7 @@ __export2(ops_for_converter_exports, { prelu: () => prelu, print: () => print, prod: () => prod, + raggedGather: () => raggedGather, raggedTensorToTensor: () => raggedTensorToTensor, rand: () => rand, randomGamma: () => randomGamma, @@ -36826,9 +36307,9 @@ function assertShapesMatchAllowUndefinedSize(shapeA, shapeB, errorMessagePrefix return; } util_exports.assert(shapeA.length === shapeB.length, () => errorMessagePrefix + ` Shapes ${shapeA} and ${shapeB} must match`); - for (let i = 0; i < shapeA.length; i++) { - const dim0 = shapeA[i]; - const dim1 = shapeB[i]; + for (let i2 = 0; i2 < shapeA.length; i2++) { + const dim0 = shapeA[i2]; + const dim1 = shapeB[i2]; util_exports.assert(dim0 < 0 || dim1 < 0 || dim0 === dim1, () => errorMessagePrefix + ` Shapes ${shapeA} and ${shapeB} must match`); } } @@ -36865,13 +36346,13 @@ function mergeElementShape(elementShapeA, elementShapeB) { throw new Error(`Incompatible ranks during merge: ${elementShapeA} vs. ${elementShapeB}`); } const result = []; - for (let i = 0; i < elementShapeA.length; ++i) { - const dim0 = elementShapeA[i]; - const dim1 = elementShapeB[i]; + for (let i2 = 0; i2 < elementShapeA.length; ++i2) { + const dim0 = elementShapeA[i2]; + const dim1 = elementShapeB[i2]; if (dim0 >= 0 && dim1 >= 0 && dim0 !== dim1) { throw new Error(`Incompatible shape during merge: ${elementShapeA} vs. ${elementShapeB}`); } - result[i] = dim0 >= 0 ? dim0 : dim1; + result[i2] = dim0 >= 0 ? dim0 : dim1; } return result; } @@ -36935,7 +36416,7 @@ var TensorArray = class { if (index2 < 0 || !this.dynamicSize && index2 >= this.maxSize) { throw new Error(`Tried to write to index ${index2}, but array is not resizeable and size is: ${this.maxSize}`); } - const t2 = this.tensors[index2] || {}; + const t22 = this.tensors[index2] || {}; if (tensor2.dtype !== this.dtype) { throw new Error(`TensorArray ${this.name}: Could not write to TensorArray index ${index2}, because the value dtype is ${tensor2.dtype}, but TensorArray dtype is ${this.dtype}.`); @@ -36944,22 +36425,22 @@ var TensorArray = class { this.elementShape = tensor2.shape; } assertShapesMatchAllowUndefinedSize(this.elementShape, tensor2.shape, `TensorArray ${this.name}: Could not write to TensorArray index ${index2}.`); - if (t2.read) { + if (t22.read) { throw new Error(`TensorArray ${this.name}: Could not write to TensorArray index ${index2}, because it has already been read.`); } - if (t2.written) { + if (t22.written) { throw new Error(`TensorArray ${this.name}: Could not write to TensorArray index ${index2}, because it has already been written.`); } - t2.tensor = tensor2; + t22.tensor = tensor2; keep(tensor2); - t2.written = true; - this.tensors[index2] = t2; + t22.written = true; + this.tensors[index2] = t22; } writeMany(indices, tensors) { if (indices.length !== tensors.length) { throw new Error(`TensorArray ${this.name}: could not write multiple tensors,because the index size: ${indices.length} is not the same as tensors size: ${tensors.length}.`); } - indices.forEach((i, index2) => this.write(i, tensors[index2])); + indices.forEach((i2, index2) => this.write(i2, tensors[index2])); } gather(indices, dtype) { if (!!dtype && dtype !== this.dtype) { @@ -36967,8 +36448,8 @@ var TensorArray = class { } if (!indices) { indices = []; - for (let i = 0; i < this.size(); i++) { - indices.push(i); + for (let i2 = 0; i2 < this.size(); i2++) { + indices.push(i2); } } else { indices = indices.slice(0, this.size()); @@ -36988,8 +36469,8 @@ var TensorArray = class { return tensor([], [0].concat(this.elementShape)); } const indices = []; - for (let i = 0; i < this.size(); i++) { - indices.push(i); + for (let i2 = 0; i2 < this.size(); i2++) { + indices.push(i2); } const tensors = this.readMany(indices); assertShapesMatchAllowUndefinedSize(this.elementShape, tensors[0].shape, `TensorArray shape mismatch: tensor array shape (${this.elementShape}) vs first tensor shape (${tensors[0].shape})`); @@ -37029,17 +36510,17 @@ var TensorArray = class { const tensors = []; tidy(() => { tensor2 = reshape(tensor2, [1, totalLength, elementPerRow]); - for (let i = 0; i < length.length; ++i) { - const previousLength = i === 0 ? 0 : cumulativeLengths[i - 1]; + for (let i2 = 0; i2 < length.length; ++i2) { + const previousLength = i2 === 0 ? 0 : cumulativeLengths[i2 - 1]; const indices2 = [0, previousLength, 0]; - const sizes = [1, length[i], elementPerRow]; - tensors[i] = reshape(slice(tensor2, indices2, sizes), this.elementShape); + const sizes = [1, length[i2], elementPerRow]; + tensors[i2] = reshape(slice(tensor2, indices2, sizes), this.elementShape); } return tensors; }); const indices = []; - for (let i = 0; i < length.length; i++) { - indices[i] = i; + for (let i2 = 0; i2 < length.length; i2++) { + indices[i2] = i2; } this.writeMany(indices, tensors); } @@ -37127,8 +36608,8 @@ var TensorList = class { } const destTensorList = new TensorList([], this.elementShape, this.elementDtype, this.maxNumElements); destTensorList.tensors.length = size2; - for (let i = 0; i < Math.min(this.tensors.length, size2); ++i) { - destTensorList.tensors[i] = this.tensors[i]; + for (let i2 = 0; i2 < Math.min(this.tensors.length, size2); ++i2) { + destTensorList.tensors[i2] = this.tensors[i2]; } return destTensorList; } @@ -37171,7 +36652,7 @@ var TensorList = class { return tensor([], [0].concat(outputElementShape)); } return tidy(() => { - const tensors = indices.map((i) => reshape(this.tensors[i], outputElementShape)); + const tensors = indices.map((i2) => reshape(this.tensors[i2], outputElementShape)); return stack(tensors, 0); }); } @@ -37185,7 +36666,7 @@ var TensorList = class { return tensor([], [0].concat(outputElementShape)); } return tidy(() => { - const tensors = this.tensors.map((t2) => reshape(t2, outputElementShape)); + const tensors = this.tensors.map((t22) => reshape(t22, outputElementShape)); return concat(tensors, 0); }); } @@ -37238,18 +36719,18 @@ function split2(tensor2, length, elementShape) { const tensors = tidy(() => { const tensors2 = []; tensor2 = reshape(tensor2, [1, totalLength, elementPerRow]); - for (let i = 0; i < length.length; ++i) { - const previousLength = i === 0 ? 0 : cumulativeLengths[i - 1]; + for (let i2 = 0; i2 < length.length; ++i2) { + const previousLength = i2 === 0 ? 0 : cumulativeLengths[i2 - 1]; const indices = [0, previousLength, 0]; - const sizes = [1, length[i], elementPerRow]; - tensors2[i] = reshape(slice(tensor2, indices, sizes), outputElementShape); + const sizes = [1, length[i2], elementPerRow]; + tensors2[i2] = reshape(slice(tensor2, indices, sizes), outputElementShape); } tensor2.dispose(); return tensors2; }); const list = new TensorList([], elementShape, tensor2.dtype, length.length); - for (let i = 0; i < tensors.length; i++) { - list.setItem(i, tensors[i]); + for (let i2 = 0; i2 < tensors.length; i2++) { + list.setItem(i2, tensors[i2]); } return list; } @@ -37835,14 +37316,14 @@ var executeOp8 = (node2, tensorMap, context, ops = ops_for_converter_exports) => return [cloneTensor(data2)]; } case "IdentityN": - return getParamValue("x", node2, tensorMap, context).map((t2) => cloneTensor(t2)); + return getParamValue("x", node2, tensorMap, context).map((t22) => cloneTensor(t22)); case "Snapshot": const snapshot = getParamValue("x", node2, tensorMap, context); return [cloneTensor(snapshot)]; case "Shape": return [ops.tensor1d(getParamValue("x", node2, tensorMap, context).shape, "int32")]; case "ShapeN": - return getParamValue("x", node2, tensorMap, context).map((t2) => ops.tensor1d(t2.shape)); + return getParamValue("x", node2, tensorMap, context).map((t22) => ops.tensor1d(t22.shape)); case "Size": return [ops.scalar(getParamValue("x", node2, tensorMap, context).size, "int32")]; case "Rank": @@ -37856,8 +37337,8 @@ var executeOp8 = (node2, tensorMap, context, ops = ops_for_converter_exports) => const summarize = getParamValue("summarize", node2, tensorMap, context); console.warn("The graph has a tf.print() operation,usually used for debugging, which slows down performance."); console.log(message); - for (let i = 0; i < data.length; i++) { - console.log(Array.prototype.slice.call(data[i].dataSync()).slice(0, summarize)); + for (let i2 = 0; i2 < data.length; i2++) { + console.log(Array.prototype.slice.call(data[i2].dataSync()).slice(0, summarize)); } return [input2]; default: @@ -37896,9 +37377,9 @@ var HashTable = class { const keysLength = $keys.length; const valuesLength = $values.length; util_exports.assert(keysLength === valuesLength, () => `The number of elements doesn't match, keys has ${keysLength} elements, the values has ${valuesLength} elements.`); - for (let i = 0; i < keysLength; i++) { - const key = $keys[i]; - const value = $values[i]; + for (let i2 = 0; i2 < keysLength; i2++) { + const key = $keys[i2]; + const value = $values[i2]; keep(value); this.tensorMap.set(key, value); } @@ -37910,8 +37391,8 @@ var HashTable = class { const $keys = await keys.data(); return tidy(() => { const result = []; - for (let i = 0; i < $keys.length; i++) { - const key = $keys[i]; + for (let i2 = 0; i2 < $keys.length; i2++) { + const key = $keys[i2]; const value = this.findWithDefault(key, defaultValue); result.push(value); } @@ -38185,10 +37666,10 @@ var executeOp15 = (node2, tensorMap, context, ops = ops_for_converter_exports) = switch (node2.op) { case "ConcatV2": case "Concat": { - const n = getParamValue("n", node2, tensorMap, context); + const n2 = getParamValue("n", node2, tensorMap, context); const axis = getParamValue("axis", node2, tensorMap, context); let inputs = getParamValue("tensors", node2, tensorMap, context); - inputs = inputs.slice(0, n); + inputs = inputs.slice(0, n2); return [ops.concat(inputs, axis)]; } case "Gather": { @@ -38206,9 +37687,9 @@ var executeOp15 = (node2, tensorMap, context, ops = ops_for_converter_exports) = case "Reverse": { const dims = getParamValue("dims", node2, tensorMap, context); const axis = []; - for (let i = 0; i < dims.length; i++) { - if (dims[i]) { - axis.push(i); + for (let i2 = 0; i2 < dims.length; i2++) { + if (dims[i2]) { + axis.push(i2); } } const input2 = getParamValue("x", node2, tensorMap, context); @@ -38489,8 +37970,8 @@ var ExecutionContext = class { } generateCurrentContextIds() { const names = []; - for (let i = 0; i < this.contexts.length - 1; i++) { - const contexts2 = this.contexts.slice(0, this.contexts.length - i); + for (let i2 = 0; i2 < this.contexts.length - 1; i2++) { + const contexts2 = this.contexts.slice(0, this.contexts.length - i2); names.push(this.contextIdforContexts(contexts2)); } names.push(""); @@ -38755,7 +38236,7 @@ var GraphExecutor = class { throw new Error(`This execution contains the node '${dynamicNode.name}', which has the dynamic op '${dynamicNode.op}'. Please use model.executeAsync() instead. Alternatively, to avoid the dynamic ops, specify the inputs [${syncInputs}]`); } if (missingInputs.length > 0) { - const outNames = outputs.map((n) => n.name); + const outNames = outputs.map((n2) => n2.name); const inNames = Object.keys(inputs); throw new Error(`Cannot compute the outputs [${outNames}] from the provided inputs [${inNames}]. Missing the following inputs: [${missingInputs}]`); } @@ -38794,8 +38275,8 @@ var GraphExecutor = class { }); const tensorsToKeep = this.getFrozenTensorIds(tensorsMap); const intermediateTensorConsumerCount = {}; - for (let i = 0; i < orderedNodes.length; i++) { - const node2 = orderedNodes[i]; + for (let i2 = 0; i2 < orderedNodes.length; i2++) { + const node2 = orderedNodes[i2]; if (!tensorsMap[node2.name]) { const tensors = executeOp20(node2, tensorsMap, context, this._resourceManager); if (util_exports.isPromise(tensors)) { @@ -38895,14 +38376,14 @@ var GraphExecutor = class { } try { this.keepTensorForDebug = env().getBool("KEEP_INTERMEDIATE_TENSORS"); - } catch (e) { - console.warn(e.message); + } catch (e2) { + console.warn(e2.message); } this.resetIntermediateTensors(); const context = new ExecutionContext(this.weightMap, tensorArrayMap, tensorListMap, this.functionExecutorMap); this.tensorsMap = await this.executeWithControlFlow(inputs, context, outputs, isFunctionExecution); const results = outputs.map((name) => getTensor(name, this.tensorsMap, context)); - const outputIds = results.map((t2) => t2.id); + const outputIds = results.map((t22) => t22.id); const inputIds = Object.keys(inputs).map((name) => inputs[name].id); this.keepIds = /* @__PURE__ */ new Set([...outputIds, ...inputIds, ...this.weightIds]); if (!this.keepTensorForDebug) { @@ -38979,12 +38460,12 @@ var GraphExecutor = class { } const currentContext = context.currentContext; if (util_exports.isPromise(tensors)) { - promises.push(tensors.then((t2) => { - tensorMap[nodeName] = t2; + promises.push(tensors.then((t22) => { + tensorMap[nodeName] = t22; context.currentContext = currentContext; this.checkTensorForDisposal(nodeName, item.node, tensorMap, context, tensorsToKeep, outputNames, intermediateTensorConsumerCount); this.processChildNodes(item.node, stack2, context, tensorMap, added, usedNodes); - return t2; + return t22; })); } else { tensorMap[nodeName] = tensors; @@ -39216,7 +38697,7 @@ var GraphModel = class { if (this.structuredOutputKeys) { const outputTensorsArray = outputTensors instanceof Tensor ? [outputTensors] : outputTensors; const outputTensorMap = {}; - outputTensorsArray.forEach((outputTensor, i) => outputTensorMap[this.structuredOutputKeys[i]] = outputTensor); + outputTensorsArray.forEach((outputTensor, i2) => outputTensorMap[this.structuredOutputKeys[i2]] = outputTensor); return outputTensorMap; } return outputTensors; @@ -39229,8 +38710,8 @@ var GraphModel = class { if (inputs.length !== this.inputNodes.length) { throw new Error(`Input tensor count mismatch,the graph model has ${this.inputNodes.length} placeholders, while there are ${inputs.length} input tensors.`); } - return this.inputNodes.reduce((map, inputName, i) => { - map[inputName] = inputs[i]; + return this.inputNodes.reduce((map, inputName, i2) => { + map[inputName] = inputs[i2]; return map; }, {}); } @@ -39286,12 +38767,34 @@ async function loadGraphModel(modelUrl, options4 = {}, tfio = io_exports) { } function loadGraphModelSync(modelSource) { if (modelSource == null) { - throw new Error("modelUrl in loadGraphModelSync() cannot be null. Please provide a url or an IOHandler that loads the model"); - } - if (!modelSource.load) { - throw new Error(`modelUrl IO Handler ${modelSource} has no load function`); + throw new Error("modelUrl in loadGraphModelSync() cannot be null. Please provide model artifacts or an IOHandler that loads the model"); + } + let ioHandler; + if (modelSource instanceof Array) { + const [modelJSON, weights] = modelSource; + if (!modelJSON) { + throw new Error("modelJSON must be the first element of the array"); + } + if (!weights || !(weights instanceof ArrayBuffer)) { + throw new Error("An ArrayBuffer of weights must be the second element of the array"); + } + if (!("modelTopology" in modelJSON)) { + throw new Error("Model JSON is missing 'modelTopology'"); + } + if (!("weightsManifest" in modelJSON)) { + throw new Error("Model JSON is missing 'weightsManifest'"); + } + const weightSpecs = io_exports.getWeightSpecs(modelJSON.weightsManifest); + const modelArtifacts = io_exports.getModelArtifactsForJSONSync(modelJSON, weightSpecs, weights); + ioHandler = io_exports.fromMemorySync(modelArtifacts); + } else if ("load" in modelSource) { + ioHandler = modelSource; + } else if ("modelTopology" in modelSource && "weightSpecs" in modelSource && "weightData" in modelSource) { + ioHandler = io_exports.fromMemorySync(modelSource); + } else { + throw new Error("Unknown model format"); } - const model22 = new GraphModel(modelSource); + const model22 = new GraphModel(ioHandler); model22.load(); return model22; } @@ -39301,7 +38804,7 @@ function getTFHubUrl(modelUrl) { } return `${modelUrl}${DEFAULT_MODEL_NAME}${TFHUB_SEARCH_PARAM}`; } -var version3 = "3.20.0"; +var version3 = "3.21.0"; var dist_exports2 = {}; __export2(dist_exports2, { CSVDataset: () => CSVDataset, @@ -39554,8 +39057,8 @@ var GrowingRingBuffer = class extends RingBuffer { const newCapacity = this.capacity * 2; const newData = new Array(newCapacity); const len = this.length(); - for (let i = 0; i < len; i++) { - newData[i] = this.get(this.wrap(this.begin + i)); + for (let i2 = 0; i2 < len; i2++) { + newData[i2] = this.get(this.wrap(this.begin + i2)); } this.data = newData; this.capacity = newCapacity; @@ -39696,9 +39199,9 @@ var FunctionCallIterator = class extends LazyIterator { async next() { try { return this.nextFn(); - } catch (e) { - e.message = `Error thrown while iterating through a dataset: ${e.message}`; - throw e; + } catch (e2) { + e2.message = `Error thrown while iterating through a dataset: ${e2.message}`; + throw e2; } } }; @@ -39833,9 +39336,9 @@ var MapIterator = class extends LazyIterator { const inputTensors = tensor_util_exports.getTensorsInContainer(item.value); const mapped = this.transform(item.value); const outputTensors = tensor_util_exports.getTensorsInContainer(mapped); - for (const t2 of inputTensors) { - if (!tensor_util_exports.isTensorInList(t2, outputTensors)) { - t2.dispose(); + for (const t22 of inputTensors) { + if (!tensor_util_exports.isTensorInList(t22, outputTensors)) { + t22.dispose(); } } return { value: mapped, done: false }; @@ -39860,8 +39363,8 @@ var ErrorHandlingLazyIterator = class extends LazyIterator { while (true) { try { return await this.upstream.next(); - } catch (e) { - if (!this.handler(e)) { + } catch (e2) { + if (!this.handler(e2)) { return { value: null, done: true }; } } @@ -39885,9 +39388,9 @@ var AsyncMapIterator = class extends LazyIterator { const inputTensors = tensor_util_exports.getTensorsInContainer(item.value); const mapped = await this.transform(item.value); const outputTensors = tensor_util_exports.getTensorsInContainer(mapped); - for (const t2 of inputTensors) { - if (!tensor_util_exports.isTensorInList(t2, outputTensors)) { - t2.dispose(); + for (const t22 of inputTensors) { + if (!tensor_util_exports.isTensorInList(t22, outputTensors)) { + t22.dispose(); } } return { value: mapped, done: false }; @@ -39930,9 +39433,9 @@ var FlatmapIterator = class extends OneToManyIterator { const mappedArray = this.transform(item.value); const outputTensors = tensor_util_exports.getTensorsInContainer(mappedArray); this.outputQueue.pushAll(mappedArray); - for (const t2 of inputTensors) { - if (!tensor_util_exports.isTensorInList(t2, outputTensors)) { - t2.dispose(); + for (const t22 of inputTensors) { + if (!tensor_util_exports.isTensorInList(t22, outputTensors)) { + t22.dispose(); } } return true; @@ -40251,8 +39754,8 @@ function zip(datasets) { } let size2; if (Array.isArray(datasets)) { - for (let i = 0; i < datasets.length; i++) { - size2 = size2 == null ? datasets[i].size : Math.min(size2, datasets[i].size); + for (let i2 = 0; i2 < datasets.length; i2++) { + size2 = size2 == null ? datasets[i2].size : Math.min(size2, datasets[i2].size); } } else if (datasets instanceof Object) { for (const ds in datasets) { @@ -40403,13 +39906,13 @@ var CSVDataset = class extends Dataset { const values = this.parseRow(line); const features = {}; const labels2 = {}; - for (let i = 0; i < this.fullColumnNames.length; i++) { - const key = this.fullColumnNames[i]; + for (let i2 = 0; i2 < this.fullColumnNames.length; i2++) { + const key = this.fullColumnNames[i2]; const config3 = this.columnConfigs ? this.columnConfigs[key] : null; if (this.configuredColumnsOnly && !config3) { continue; } else { - const value = values[i]; + const value = values[i2]; let parsedValue = null; if (value === "") { if (config3 && config3.default !== void 0) { @@ -40466,16 +39969,16 @@ var CSVDataset = class extends Dataset { let readOffset = 0; const readLength = line.length; let currentState = STATE_OUT; - for (let i = 0; i < readLength; i++) { + for (let i2 = 0; i2 < readLength; i2++) { switch (currentState) { case STATE_OUT: - switch (line.charAt(i)) { + switch (line.charAt(i2)) { case CODE_QUOTE: - readOffset = i + 1; + readOffset = i2 + 1; currentState = STATE_QUOTE; break; case this.delimiter: - readOffset = i + 1; + readOffset = i2 + 1; if (this.delimiter === " " && this.delimWhitespace) { break; } @@ -40484,22 +39987,22 @@ var CSVDataset = class extends Dataset { break; default: currentState = STATE_FIELD; - readOffset = i; + readOffset = i2; break; } break; case STATE_FIELD: - switch (line.charAt(i)) { + switch (line.charAt(i2)) { case this.delimiter: - result.push(line.substring(readOffset, i)); + result.push(line.substring(readOffset, i2)); currentState = STATE_OUT; - readOffset = i + 1; + readOffset = i2 + 1; break; default: } break; case STATE_QUOTE: - switch (line.charAt(i)) { + switch (line.charAt(i2)) { case CODE_QUOTE: currentState = STATE_QUOTE_AFTER_QUOTE; break; @@ -40507,11 +40010,11 @@ var CSVDataset = class extends Dataset { } break; case STATE_QUOTE_AFTER_QUOTE: - switch (line.charAt(i)) { + switch (line.charAt(i2)) { case this.delimiter: - result.push(line.substring(readOffset, i - 1)); + result.push(line.substring(readOffset, i2 - 1)); currentState = STATE_OUT; - readOffset = i + 1; + readOffset = i2 + 1; break; case CODE_QUOTE: currentState = STATE_QUOTE; @@ -40522,7 +40025,7 @@ var CSVDataset = class extends Dataset { } break; case STATE_WITHIN_QUOTE_IN_QUOTE: - switch (line.charAt(i)) { + switch (line.charAt(i2)) { case CODE_QUOTE: currentState = STATE_QUOTE; break; @@ -40581,8 +40084,8 @@ var MicrophoneIterator = class extends LazyIterator { audio: this.audioTrackConstraints == null ? true : this.audioTrackConstraints, video: false }); - } catch (e) { - throw new Error(`Error thrown while initializing video stream: ${e.message}`); + } catch (e2) { + throw new Error(`Error thrown while initializing video stream: ${e2.message}`); } if (!this.stream) { throw new Error("Could not obtain audio from microphone."); @@ -40669,7 +40172,7 @@ var MicrophoneIterator = class extends LazyIterator { flattenQueue(queue) { const frameSize = queue[0].length; const freqData = new Float32Array(queue.length * frameSize); - queue.forEach((data, i) => freqData.set(data, i * frameSize)); + queue.forEach((data, i2) => freqData.set(data, i2 * frameSize)); return freqData; } getTensorFromAudioDataArray(freqData, shape) { @@ -40734,9 +40237,9 @@ var WebcamIterator = class extends LazyIterator { height: this.webcamVideoElement.height } }); - } catch (e) { - e.message = `Error thrown while initializing video stream: ${e.message}`; - throw e; + } catch (e2) { + e2.message = `Error thrown while initializing video stream: ${e2.message}`; + throw e2; } if (!this.stream) { throw new Error("Could not obtain video from webcam."); @@ -40762,14 +40265,14 @@ var WebcamIterator = class extends LazyIterator { let img; try { img = browser_exports.fromPixels(this.webcamVideoElement); - } catch (e) { - throw new Error(`Error thrown converting video to pixels: ${JSON.stringify(e)}`); + } catch (e2) { + throw new Error(`Error thrown converting video to pixels: ${JSON.stringify(e2)}`); } if (this.resize) { try { return { value: this.cropAndResizeFrame(img), done: false }; - } catch (e) { - throw new Error(`Error thrown cropping the video: ${e.message}`); + } catch (e2) { + throw new Error(`Error thrown cropping the video: ${e2.message}`); } finally { img.dispose(); } @@ -41036,14 +40539,14 @@ async function webcam(webcamVideoElement, webcamConfig) { async function microphone(microphoneConfig) { return MicrophoneIterator.create(microphoneConfig); } -var version4 = "3.20.0"; +var version4 = "3.21.0"; function assertNotComplex(tensor2, opName) { if (!Array.isArray(tensor2)) { tensor2 = [tensor2]; } - tensor2.forEach((t2) => { - if (t2 != null) { - util_exports.assert(t2.dtype !== "complex64", () => `${opName} does not support complex64 tensors in the CPU backend.`); + tensor2.forEach((t22) => { + if (t22 != null) { + util_exports.assert(t22.dtype !== "complex64", () => `${opName} does not support complex64 tensors in the CPU backend.`); } }); } @@ -41114,17 +40617,17 @@ var MathBackendCPU = class extends KernelBackend { } return this.data.get(dataId).values; } - bufferSync(t2) { - const data = this.readSync(t2.dataId); - if (t2.dtype === "string") { + bufferSync(t22) { + const data = this.readSync(t22.dataId); + if (t22.dtype === "string") { try { const strings = data.map((d) => util_exports.decodeString(d)); - return buffer(t2.shape, t2.dtype, strings); + return buffer(t22.shape, t22.dtype, strings); } catch (_a) { throw new Error("Failed to decode encoded string bytes into utf-8"); } } - return buffer(t2.shape, t2.dtype, data); + return buffer(t22.shape, t22.dtype, data); } makeOutput(values, shape, dtype) { return engine().makeTensorFromTensorInfo(this.makeTensorInfo(shape, dtype, values), this); @@ -41201,6 +40704,7 @@ __export2(shared_exports, { negImpl: () => negImpl, notEqualImpl: () => notEqualImpl, prodImpl: () => prodImpl, + raggedGatherImpl: () => raggedGatherImpl, raggedTensorToTensorImpl: () => raggedTensorToTensorImpl, rangeImpl: () => rangeImpl, rsqrtImpl: () => rsqrtImpl, @@ -41225,8 +40729,8 @@ __export2(shared_exports, { }); function simpleAbsImpl(vals) { const resultValues = new Float32Array(vals.length); - for (let i = 0; i < vals.length; ++i) { - resultValues[i] = Math.abs(vals[i]); + for (let i2 = 0; i2 < vals.length; ++i2) { + resultValues[i2] = Math.abs(vals[i2]); } return resultValues; } @@ -41258,19 +40762,19 @@ function createSimpleBinaryKernelImpl(op2) { const aBroadcastDims = backend_util_exports.getBroadcastDims(aShape, newShape); const bBroadcastDims = backend_util_exports.getBroadcastDims(bShape, newShape); if (aBroadcastDims.length + bBroadcastDims.length === 0) { - for (let i = 0; i < result.length; ++i) { - result[i] = op2(aVals[i % aVals.length], bVals[i % bVals.length]); + for (let i2 = 0; i2 < result.length; ++i2) { + result[i2] = op2(aVals[i2 % aVals.length], bVals[i2 % bVals.length]); } } else { - for (let i = 0; i < result.length; ++i) { - const loc = util_exports.indexToLoc(i, resultRank, resultStrides); + for (let i2 = 0; i2 < result.length; ++i2) { + const loc = util_exports.indexToLoc(i2, resultRank, resultStrides); const aLoc = loc.slice(-aRank); aBroadcastDims.forEach((d) => aLoc[d] = 0); const aIndex = util_exports.locToIndex(aLoc, aRank, aStrides); const bLoc = loc.slice(-bRank); bBroadcastDims.forEach((d) => bLoc[d] = 0); const bIndex = util_exports.locToIndex(bLoc, bRank, bStrides); - result[i] = op2(aVals[aIndex], bVals[bIndex]); + result[i2] = op2(aVals[aIndex], bVals[bIndex]); } } return [result, newShape]; @@ -41438,16 +40942,16 @@ function createComplexBinaryKernelImpl(op2) { const bRank = bShape.length; const bStrides = util_exports.computeStrides(bShape); if (aBroadcastDims.length + bBroadcastDims.length === 0) { - for (let i = 0; i < resultRealVals.length; i++) { - const aIdx = i % aVals.length; - const bIdx = i % bVals.length; + for (let i2 = 0; i2 < resultRealVals.length; i2++) { + const aIdx = i2 % aVals.length; + const bIdx = i2 % bVals.length; const result = op2(aVals[aIdx * 2], aVals[aIdx * 2 + 1], bVals[bIdx * 2], bVals[bIdx * 2 + 1]); - resultRealVals[i] = result.real; - resultImagVals[i] = result.imag; + resultRealVals[i2] = result.real; + resultImagVals[i2] = result.imag; } } else { - for (let i = 0; i < resultRealVals.length; i++) { - const loc = util_exports.indexToLoc(i, resultRank, resultStrides); + for (let i2 = 0; i2 < resultRealVals.length; i2++) { + const loc = util_exports.indexToLoc(i2, resultRank, resultStrides); const aLoc = loc.slice(-aRank); aBroadcastDims.forEach((d) => aLoc[d] = 0); const aIndex = util_exports.locToIndex(aLoc, aRank, aStrides); @@ -41455,8 +40959,8 @@ function createComplexBinaryKernelImpl(op2) { bBroadcastDims.forEach((d) => bLoc[d] = 0); const bIndex = util_exports.locToIndex(bLoc, bRank, bStrides); const opResult = op2(aVals[aIndex * 2], aVals[aIndex * 2 + 1], bVals[bIndex * 2], bVals[bIndex * 2 + 1]); - resultRealVals[i] = opResult.real; - resultImagVals[i] = opResult.imag; + resultRealVals[i2] = opResult.real; + resultImagVals[i2] = opResult.imag; } } return [resultRealVals, resultImagVals, resultShape]; @@ -41475,8 +40979,8 @@ var addConfig = { function bincountImpl(xVals, weightsVals, weightsDtype, weightsShape, size2) { const weightsSize = util_exports.sizeFromShape(weightsShape); const outVals = util_exports.makeZerosTypedArray(size2, weightsDtype); - for (let i = 0; i < xVals.length; i++) { - const value = xVals[i]; + for (let i2 = 0; i2 < xVals.length; i2++) { + const value = xVals[i2]; if (value < 0) { throw new Error("Input x must be non-negative!"); } @@ -41484,7 +40988,7 @@ function bincountImpl(xVals, weightsVals, weightsDtype, weightsShape, size2) { continue; } if (weightsSize > 0) { - outVals[value] += weightsVals[i]; + outVals[value] += weightsVals[i2]; } else { outVals[value] += 1; } @@ -41495,9 +40999,9 @@ function bincountReduceImpl(xBuf, weightsBuf, size2, binaryOutput = false) { const numRows = xBuf.shape[0]; const numCols = xBuf.shape[1]; const outBuf = buffer([numRows, size2], weightsBuf.dtype); - for (let i = 0; i < numRows; i++) { + for (let i2 = 0; i2 < numRows; i2++) { for (let j = 0; j < numCols; j++) { - const value = xBuf.get(i, j); + const value = xBuf.get(i2, j); if (value < 0) { throw new Error("Input x must be non-negative!"); } @@ -41505,12 +41009,12 @@ function bincountReduceImpl(xBuf, weightsBuf, size2, binaryOutput = false) { continue; } if (binaryOutput) { - outBuf.set(1, i, value); + outBuf.set(1, i2, value); } else { if (weightsBuf.size > 0) { - outBuf.set(outBuf.get(i, value) + weightsBuf.get(i, j), i, value); + outBuf.set(outBuf.get(i2, value) + weightsBuf.get(i2, j), i2, value); } else { - outBuf.set(outBuf.get(i, value) + 1, i, value); + outBuf.set(outBuf.get(i2, value) + 1, i2, value); } } } @@ -41520,8 +41024,8 @@ function bincountReduceImpl(xBuf, weightsBuf, size2, binaryOutput = false) { function createSimpleUnaryImpl(op2) { return (values, dtype, attrs) => { const newValues = util_exports.getTypedArrayFromDType(dtype, values.length); - for (let i = 0; i < values.length; ++i) { - newValues[i] = op2(values[i], attrs); + for (let i2 = 0; i2 < values.length; ++i2) { + newValues[i2] = op2(values[i2], attrs); } return newValues; }; @@ -41538,8 +41042,8 @@ function unaryKernelFunc(name, op2, dtype) { const xSize = util_exports.sizeFromShape(x.shape); const $dtype = dtype || x.dtype; const newValues = util_exports.getArrayFromDType($dtype, xSize); - for (let i = 0; i < xSize; ++i) { - newValues[i] = op2(values[i], attrs); + for (let i2 = 0; i2 < xSize; ++i2) { + newValues[i2] = op2(values[i2], attrs); } return cpuBackend.makeTensorInfo(x.shape, $dtype, newValues); }; @@ -41620,11 +41124,11 @@ var floorConfig = { }; function gatherNdImpl(indicesData, paramsBuf, dtype, numSlices, sliceRank, sliceSize, strides2, paramsShape, paramsSize) { const outBuf = buffer([numSlices, sliceSize], dtype); - for (let i = 0; i < numSlices; i++) { + for (let i2 = 0; i2 < numSlices; i2++) { const index2 = []; let flattenIndex = 0; for (let j = 0; j < sliceRank; j++) { - const dim = indicesData[i * sliceRank + j]; + const dim = indicesData[i2 * sliceRank + j]; flattenIndex += dim * strides2[j]; index2.push(dim); } @@ -41632,15 +41136,15 @@ function gatherNdImpl(indicesData, paramsBuf, dtype, numSlices, sliceRank, slice throw new Error(`Invalid indices: ${index2} does not index into ${paramsShape}`); } for (let k = 0; k < sliceSize; k++) { - outBuf.values[i * sliceSize + k] = paramsBuf.get(...paramsBuf.indexToLoc(flattenIndex * sliceSize + k)); + outBuf.values[i2 * sliceSize + k] = paramsBuf.get(...paramsBuf.indexToLoc(flattenIndex * sliceSize + k)); } } return outBuf; } function gatherV2Impl(xBuf, indicesBuf, flattenOutputShape) { const outBuf = buffer(flattenOutputShape, xBuf.dtype); - for (let i = 0; i < outBuf.size; ++i) { - const newLoc = outBuf.indexToLoc(i); + for (let i2 = 0; i2 < outBuf.size; ++i2) { + const newLoc = outBuf.indexToLoc(i2); const originalLoc = newLoc.slice(); const batchIdx = originalLoc[0]; const indicesIdx = originalLoc[2]; @@ -41648,7 +41152,7 @@ function gatherV2Impl(xBuf, indicesBuf, flattenOutputShape) { originalLoc[2] = indicesBuf.values[indicesIndex]; const originalIndex = xBuf.locToIndex(originalLoc); if (0 <= originalIndex && originalIndex < xBuf.values.length) { - outBuf.values[i] = xBuf.values[originalIndex]; + outBuf.values[i2] = xBuf.values[originalIndex]; } } return outBuf; @@ -41685,8 +41189,8 @@ function linSpaceImpl(start, stop, num) { const step5 = (stop - start) / (num - 1); const values = util_exports.makeZerosTypedArray(num, "float32"); values[0] = start; - for (let i = 1; i < values.length; i++) { - values[i] = values[i - 1] + step5; + for (let i2 = 1; i2 < values.length; i2++) { + values[i2] = values[i2 - 1] + step5; } return values; } @@ -41699,8 +41203,8 @@ var logConfig = { }; function maxImpl(aVals, reduceSize, outShape, dtype) { const vals = util_exports.getTypedArrayFromDType(dtype, util_exports.sizeFromShape(outShape)); - for (let i = 0; i < vals.length; ++i) { - const offset = i * reduceSize; + for (let i2 = 0; i2 < vals.length; ++i2) { + const offset = i2 * reduceSize; let max7 = aVals[offset]; for (let j = 0; j < reduceSize; ++j) { const value = aVals[offset + j]; @@ -41708,7 +41212,7 @@ function maxImpl(aVals, reduceSize, outShape, dtype) { max7 = value; } } - vals[i] = max7; + vals[i2] = max7; } return vals; } @@ -41769,14 +41273,14 @@ function transposeImpl(xVals, xShape, dtype, perm, newShape) { const xStrides = util_exports.computeStrides(xShape); const newStrides = util_exports.computeStrides(newShape); const result = util_exports.getTypedArrayFromDType(dtype, util_exports.sizeFromShape(newShape)); - for (let i = 0; i < xSize; ++i) { - const loc = util_exports.indexToLoc(i, xRank, xStrides); + for (let i2 = 0; i2 < xSize; ++i2) { + const loc = util_exports.indexToLoc(i2, xRank, xStrides); const newLoc = new Array(loc.length); - for (let i2 = 0; i2 < newLoc.length; i2++) { - newLoc[i2] = loc[perm[i2]]; + for (let i3 = 0; i3 < newLoc.length; i3++) { + newLoc[i3] = loc[perm[i3]]; } const newIndex = util_exports.locToIndex(newLoc, xRank, newStrides); - result[newIndex] = xVals[i]; + result[newIndex] = xVals[i2]; } return result; } @@ -41787,8 +41291,8 @@ function transpose2(args) { assertNotComplex(x, "transpose"); const xRank = x.shape.length; const newShape = new Array(xRank); - for (let i = 0; i < newShape.length; i++) { - newShape[i] = x.shape[perm[i]]; + for (let i2 = 0; i2 < newShape.length; i2++) { + newShape[i2] = x.shape[perm[i2]]; } const values = backend2.data.get(x.dataId).values; const result = transposeImpl(values, x.shape, x.dtype, perm, newShape); @@ -41805,13 +41309,13 @@ function prodImpl(xShape, xDtype, xVals, reductionAxes) { const outDtype = upcastType(xDtype, "int32"); const outVals = util_exports.makeZerosTypedArray(util_exports.sizeFromShape(outShape), outDtype); const reduceSize = util_exports.sizeFromShape(reduceShape); - for (let i = 0; i < outVals.length; ++i) { - const offset = i * reduceSize; + for (let i2 = 0; i2 < outVals.length; ++i2) { + const offset = i2 * reduceSize; let prod6 = 1; for (let j = 0; j < reduceSize; ++j) { prod6 *= xVals[offset + j]; } - outVals[i] = prod6; + outVals[i2] = prod6; } return { outVals, outShape, outDtype }; } @@ -41837,7 +41341,7 @@ function prod2(args) { if (keepDims) { resultShape = backend_util_exports.expandShapeToKeepDim(outShape, axes); } - intermediateTensorInfos.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2)); + intermediateTensorInfos.forEach((t22) => backend2.disposeIntermediateTensorInfo(t22)); return backend2.makeTensorInfo(resultShape, outDtype, outVals); } var prodConfig = { @@ -41845,6 +41349,131 @@ var prodConfig = { backendName: "cpu", kernelFunc: prod2 }; +function validateIndices(indices, indicesShape, numParams) { + indices.forEach((index2, i2) => { + if (index2 < 0 || index2 >= numParams) { + const locString = util_exports.indexToLoc(i2, indicesShape.length, util_exports.computeStrides(indicesShape)).join(","); + throw new Error(`indices[${locString}] = ${index2} is not in [0, ${numParams})`); + } + }); +} +function validateSplits(paramsNestedSplits, numParamsDenseValues) { + for (let dim = 0; dim < paramsNestedSplits.length; ++dim) { + const splits = paramsNestedSplits[dim]; + const lastSplit = dim === paramsNestedSplits.length - 1 ? numParamsDenseValues : paramsNestedSplits[dim + 1].length; + if (splits.length === 0) { + throw new Error("Ragged splits may not be empty"); + } + if (splits[0] < 0) { + throw new Error("Ragged splits must be non-negative"); + } + if (splits[splits.length - 1] > lastSplit) { + throw new Error("Ragged splits must not point past values"); + } + for (let i2 = 1; i2 < splits.length; ++i2) { + if (splits[i2 - 1] > splits[i2]) { + throw new Error("Ragged splits must be sorted in ascending order"); + } + } + } +} +function makeSplits(indices, indicesShape, paramsNestedSplits, numParamsDenseValues) { + const valueSlices = []; + let numValues = 0; + const numSplits = indicesShape.length - 1 + paramsNestedSplits.length; + const outSplits = new Array(numSplits).fill(null).map(() => [0]); + validateSplits(paramsNestedSplits, numParamsDenseValues); + let nrows = 1; + for (let dim = 0; dim < indicesShape.length - 1; ++dim) { + nrows *= indicesShape[dim]; + const rowLength = indicesShape[dim + 1]; + for (let i2 = 1; i2 < nrows + 1; ++i2) { + outSplits[dim].push(i2 * rowLength); + } + } + for (let i2 = 0; i2 < indices.length; ++i2) { + let start = indices[i2]; + let limit = indices[i2] + 1; + for (let dim = 0; dim < paramsNestedSplits.length; ++dim) { + const splits = paramsNestedSplits[dim]; + const outDim = dim + indicesShape.length - 1; + if (outDim >= 0) { + const outSplitsOutDim = outSplits[outDim]; + const delta = outSplitsOutDim[outSplitsOutDim.length - 1] - splits[start]; + for (let j = start; j < limit; ++j) { + outSplits[outDim].push(splits[j + 1] + delta); + } + } + start = splits[start]; + limit = splits[limit]; + } + if (limit !== start) { + valueSlices.push([start, limit]); + numValues += limit - start; + } + } + return { outSplits, valueSlices, numValues }; +} +function getSplits(outSplits) { + const splitsOut = []; + for (let i2 = 0; i2 < outSplits.length; ++i2) { + const numSplits = outSplits[i2].length; + const splits = util_exports.getArrayFromDType("int32", numSplits); + splitsOut.push(splits); + outSplits[i2].forEach((value, j) => splits[j] = value); + } + return splitsOut; +} +function computeFlatOuterDims(orig, numOutDims) { + const outDims = orig.slice(0, numOutDims); + while (outDims.length < numOutDims) { + outDims.push(1); + } + for (let inDim = numOutDims; inDim < orig.length; inDim++) { + outDims[numOutDims - 1] *= orig[inDim]; + } + return outDims; +} +function writeValueSlices(paramsDenseValues, paramsDenseValuesShape, valueSlices, valueSize, values, valuesShape) { + const denseM = computeFlatOuterDims(paramsDenseValuesShape, 2)[1]; + const valuesM = computeFlatOuterDims(valuesShape, 2)[1]; + let outPos = 0; + for (const slice6 of valueSlices) { + for (let i2 = slice6[0]; i2 < slice6[1]; ++i2) { + for (let j = 0; j < valueSize; ++j) { + values[outPos * valuesM + j] = paramsDenseValues[i2 * denseM + j]; + } + ++outPos; + } + } +} +function getValues(paramsDenseValues, paramsDenseValuesShape, paramsDenseValuesDType, valueSlices, numValues) { + const valuesShape = paramsDenseValuesShape.slice(); + valuesShape[0] = numValues; + const valuesOut = util_exports.getArrayFromDType(paramsDenseValuesDType, util_exports.sizeFromShape(valuesShape)); + const numElements = paramsDenseValues.length; + const valueSize = numElements === 0 ? 0 : numElements / paramsDenseValuesShape[0]; + writeValueSlices(paramsDenseValues, paramsDenseValuesShape, valueSlices, valueSize, valuesOut, valuesShape); + return [valuesOut, valuesShape]; +} +function raggedGatherImpl(paramsNestedSplits, paramsNestedSplitsShapes, paramsDenseValues, paramsDenseValuesShape, paramsDenseValuesDType, indices, indicesShape, outputRaggedRank) { + if (paramsNestedSplits.length === 0) { + throw new Error("paramsNestedSplits must be non empty"); + } + if (paramsNestedSplitsShapes[0].length === 0) { + throw new Error("Split tensors must not be scalars"); + } + const numParams = paramsNestedSplitsShapes[0][0] - 1; + validateIndices(indices, indicesShape, numParams); + if (paramsDenseValuesShape.length === 0) { + throw new Error("params.rank must be nonzero"); + } + const numParamsDenseValues = paramsDenseValuesShape[0]; + const { outSplits, valueSlices, numValues } = makeSplits(indices, indicesShape, paramsNestedSplits, numParamsDenseValues); + const outputNestedSplits = getSplits(outSplits); + const outputDenseValues = getValues(paramsDenseValues, paramsDenseValuesShape, paramsDenseValuesDType, valueSlices, numValues); + return [outputNestedSplits, outputDenseValues[0], outputDenseValues[1]]; +} var RowPartitionType2 = backend_util_exports.RowPartitionType; var RaggedTensorToTensorOp = class { constructor(shape, shapeShape, values, valuesShape, valuesDType, defaultValue, defaultValueShape, rowPartitionValues, rowPartitionValuesShapes, rowPartitionTypeStrings) { @@ -41891,8 +41520,8 @@ var RaggedTensorToTensorOp = class { return 0; } let maxWidth = 0; - for (let i = 0; i < tensorLength - 1; ++i) { - const currentWidth = rowSplit[i + 1] - rowSplit[i]; + for (let i2 = 0; i2 < tensorLength - 1; ++i2) { + const currentWidth = rowSplit[i2 + 1] - rowSplit[i2]; if (currentWidth > maxWidth) { maxWidth = currentWidth; } @@ -41907,24 +41536,24 @@ var RaggedTensorToTensorOp = class { let firstEqualIndex = 0; let firstEqualIndexValue = valueRowIds[0]; let maxWidth = 0; - for (let i = 1; i < indexLength; ++i) { - const value = valueRowIds[i]; + for (let i2 = 1; i2 < indexLength; ++i2) { + const value = valueRowIds[i2]; if (value !== firstEqualIndexValue) { firstEqualIndexValue = value; - maxWidth = Math.max(i - firstEqualIndex, maxWidth); - firstEqualIndex = i; + maxWidth = Math.max(i2 - firstEqualIndex, maxWidth); + firstEqualIndex = i2; } } return Math.max(indexLength - firstEqualIndex, maxWidth); } - tensorShapeFromTensor(t2, tShape, isPartial = true) { + tensorShapeFromTensor(t22, tShape, isPartial = true) { if (tShape.length === 0) { - if (t2[0] === -1) { + if (t22[0] === -1) { return []; } throw new Error(`The only valid scalar shape tensor is the fully unknown shape specified as -1.`); } - return makeShape(t2, isPartial); + return makeShape(t22, isPartial); } calculateOutputSize(firstDim) { const valueShape = this.valuesShape; @@ -41936,9 +41565,9 @@ var RaggedTensorToTensorOp = class { if (result[0] < 0) { result[0] = firstDim; } - for (let i = 1; i <= this.raggedRank; ++i) { - if (result[i] < 0) { - result[i] = this.getMaxWidth(i); + for (let i2 = 1; i2 <= this.raggedRank; ++i2) { + if (result[i2] < 0) { + result[i2] = this.getMaxWidth(i2); } } return result; @@ -41947,10 +41576,10 @@ var RaggedTensorToTensorOp = class { const minDimension = Math.min(firstDimension, firstDimensionOutput); const result = []; let currentOutputIndex = 0; - for (let i = 0; i < minDimension; ++i, currentOutputIndex += outputIndexMultiplier) { + for (let i2 = 0; i2 < minDimension; ++i2, currentOutputIndex += outputIndexMultiplier) { result.push(currentOutputIndex); } - for (let i = minDimension; i < firstDimension; ++i) { + for (let i2 = minDimension; i2 < firstDimension; ++i2) { result.push(-1); } util_exports.assert(result.length === firstDimension, () => "Final length of result must be equal to firstDimension."); @@ -41959,10 +41588,10 @@ var RaggedTensorToTensorOp = class { calculateOutputIndexRowSplit(rowSplit, parentOutputIndex, outputIndexMultiplier, outputSize2) { const rowSplitSize = rowSplit.length; const result = []; - for (let i = 0; i < rowSplitSize - 1; ++i) { - const rowLength = rowSplit[i + 1] - rowSplit[i]; + for (let i2 = 0; i2 < rowSplitSize - 1; ++i2) { + const rowLength = rowSplit[i2 + 1] - rowSplit[i2]; let realLength = Math.min(outputSize2, rowLength); - let parentOutputIndexCurrent = parentOutputIndex[i]; + let parentOutputIndexCurrent = parentOutputIndex[i2]; if (parentOutputIndexCurrent === -1) { realLength = 0; } @@ -41992,8 +41621,8 @@ var RaggedTensorToTensorOp = class { } let currentOutputIndex = parentOutputIndex[currentValueRowId]; result.push(currentOutputIndex); - for (let i = 1; i < indexSize; ++i) { - const nextValueRowId = valueRowIds[i]; + for (let i2 = 1; i2 < indexSize; ++i2) { + const nextValueRowId = valueRowIds[i2]; if (nextValueRowId === currentValueRowId) { if (currentOutputIndex >= 0) { ++currentOutputColumn; @@ -42059,16 +41688,16 @@ var RaggedTensorToTensorOp = class { const outputSize2 = this.calculateOutputSize(firstDimension); const multiplier = new Array(this.raggedRank + 1); multiplier[multiplier.length - 1] = 1; - for (let i = multiplier.length - 2; i >= 0; --i) { - multiplier[i] = multiplier[i + 1] * outputSize2[i + 1]; + for (let i2 = multiplier.length - 2; i2 >= 0; --i2) { + multiplier[i2] = multiplier[i2 + 1] * outputSize2[i2 + 1]; } const outputShape = makeShape(outputSize2, false); const outputTensor = util_exports.getArrayFromDType(this.valuesDType, util_exports.sizeFromShape(outputShape)); const fullSize = multiplier[0] * outputSize2[0]; if (fullSize > 0) { let outputIndex = this.calculateFirstParentOutputIndex(firstDimension, multiplier[0], outputSize2[0]); - for (let i = 1; i <= this.raggedRank; ++i) { - const newOutputIndex = this.calculateOutputIndex(i - 1, outputIndex, multiplier[i], outputSize2[i]); + for (let i2 = 1; i2 <= this.raggedRank; ++i2) { + const newOutputIndex = this.calculateOutputIndex(i2 - 1, outputIndex, multiplier[i2], outputSize2[i2]); outputIndex = newOutputIndex; } this.setOutput(this.raggedRank, outputIndex, outputTensor, outputShape); @@ -42137,8 +41766,8 @@ var RaggedTensorToTensorOp = class { } }; function copyArray(dst, src, size2) { - for (let i = 0; i < size2; i++) { - dst[i] = src[i]; + for (let i2 = 0; i2 < size2; i2++) { + dst[i2] = src[i2]; } } function makeShape(shape, isPartial) { @@ -42173,8 +41802,8 @@ function rangeImpl(start, stop, step5, dtype) { step5 = -1; } values[0] = start; - for (let i = 1; i < values.length; i++) { - values[i] = values[i - 1] + step5; + for (let i2 = 1; i2 < values.length; i2++) { + values[i2] = values[i2 - 1] + step5; } return values; } @@ -42200,11 +41829,11 @@ function scatterImpl(indices, updates, shape, outputSize2, sliceSize, numUpdates } else if (typeof defaultValue === "boolean") { outBuf.values.fill(+defaultValue); } - for (let i = 0; i < numUpdates; i++) { + for (let i2 = 0; i2 < numUpdates; i2++) { const index2 = []; let flattenIndex = 0; for (let j = 0; j < sliceRank; j++) { - const dim = indicesData[i * sliceRank + j]; + const dim = indicesData[i2 * sliceRank + j]; index2.push(dim); flattenIndex += dim * strides2[j]; } @@ -42213,9 +41842,9 @@ function scatterImpl(indices, updates, shape, outputSize2, sliceSize, numUpdates } for (let k = 0; k < sliceSize; k++) { if (sumDupeIndices) { - outBuf.values[flattenIndex * sliceSize + k] += updatesData[i * sliceSize + k]; + outBuf.values[flattenIndex * sliceSize + k] += updatesData[i2 * sliceSize + k]; } else { - outBuf.values[flattenIndex * sliceSize + k] = updates.rank === 0 ? updatesData[0] : updatesData[i * sliceSize + k]; + outBuf.values[flattenIndex * sliceSize + k] = updates.rank === 0 ? updatesData[0] : updatesData[i2 * sliceSize + k]; } } } @@ -42242,8 +41871,8 @@ function sliceImpl(vals, begin, size2, shape, dtype) { const decodedData = dtype === "string" ? backend_util_exports.fromUint8ToStringArray(vals) : vals; const inBuf = buffer(shape, dtype, decodedData); const outBuf = buffer(size2, dtype); - for (let i = 0; i < outBuf.size; ++i) { - const outLoc = outBuf.indexToLoc(i); + for (let i2 = 0; i2 < outBuf.size; ++i2) { + const outLoc = outBuf.indexToLoc(i2); const inLoc = outLoc.map((idx, j) => idx + begin[j]); outBuf.set(inBuf.get(...inLoc), ...outLoc); } @@ -42291,13 +41920,13 @@ function sparseFillEmptyRowsImpl(indices, indicesShape, indicesDType, values, va let rowsAreOrdered = true; let lastIndicesRow = 0; const csrOffset = new Array(denseRows).fill(0); - for (let i = 0; i < indicesCount; ++i) { - const row = indices[i * rank]; + for (let i2 = 0; i2 < indicesCount; ++i2) { + const row = indices[i2 * rank]; if (row < 0) { - throw new Error(backend_util_exports.getSparseFillEmptyRowsNegativeIndexErrorMessage(i, row)); + throw new Error(backend_util_exports.getSparseFillEmptyRowsNegativeIndexErrorMessage(i2, row)); } if (row >= denseRows) { - throw new Error(backend_util_exports.getSparseFillEmptyRowsOutOfRangeIndexErrorMessage(i, row, denseRows)); + throw new Error(backend_util_exports.getSparseFillEmptyRowsOutOfRangeIndexErrorMessage(i2, row, denseRows)); } ++csrOffset[row]; rowsAreOrdered = rowsAreOrdered && row >= lastIndicesRow; @@ -42316,8 +41945,8 @@ function sparseFillEmptyRowsImpl(indices, indicesShape, indicesDType, values, va if (allRowsFull && rowsAreOrdered) { const outputIndices = indices; const outputValues = values; - for (let i = 0; i < indicesCount; ++i) { - reverseIndexMap[i] = i; + for (let i2 = 0; i2 < indicesCount; ++i2) { + reverseIndexMap[i2] = i2; } return [ outputIndices, @@ -42331,16 +41960,16 @@ function sparseFillEmptyRowsImpl(indices, indicesShape, indicesDType, values, va const outputIndices = util_exports.getArrayFromDType(indicesDType, fullIndicesCount * rank); const outputValues = util_exports.getArrayFromDType(valuesDType, fullIndicesCount); const filledCount = new Array(denseRows).fill(0); - for (let i = 0; i < indicesCount; ++i) { - const row = indices[i * rank]; + for (let i2 = 0; i2 < indicesCount; ++i2) { + const row = indices[i2 * rank]; const offset = filledCount[row]; const outputI = (row === 0 ? 0 : csrOffset[row - 1]) + offset; filledCount[row]++; for (let j = 0; j < rank; ++j) { - outputIndices[outputI * rank + j] = indices[i * rank + j]; + outputIndices[outputI * rank + j] = indices[i2 * rank + j]; } - outputValues[outputI] = values[i]; - reverseIndexMap[i] = outputI; + outputValues[outputI] = values[i2]; + reverseIndexMap[i2] = outputI; } for (let row = 0; row < denseRows; ++row) { const rowCount = filledCount[row]; @@ -42415,13 +42044,13 @@ function sparseReshapeImpl(inputIndices, inputIndicesShape, inputDType, inputSha } } const newIndices = util_exports.getArrayFromDType(inputDType, nnz * outputRank); - for (let i = 0; i < nnz; ++i) { + for (let i2 = 0; i2 < nnz; ++i2) { let id = 0; for (let j = 0; j < inputRank; ++j) { - id += inputIndices[i * inputRank + j] * inputStrides[j]; + id += inputIndices[i2 * inputRank + j] * inputStrides[j]; } for (let j = 0; j < outputRank; ++j) { - newIndices[i * outputRank + j] = Math.trunc(id / outputStrides[j]); + newIndices[i2 * outputRank + j] = Math.trunc(id / outputStrides[j]); id %= outputStrides[j]; } } @@ -42470,10 +42099,10 @@ function sparseSegmentReductionImpl(input2, inputShape, inputDType, indices, seg if (outIndex > uninitializedIndex) { output.fill(defaultValue, uninitializedIndex * numCol, outIndex * numCol); } - for (let i = start; i < end; ++i) { - const index2 = indices[i]; + for (let i2 = start; i2 < end; ++i2) { + const index2 = indices[i2]; if (index2 < 0 || index2 >= inputFlat[0]) { - throw new Error(backend_util_exports.getSparseSegmentReductionIndicesOutOfRangeErrorMessage(i, indices[i], inputFlat[0])); + throw new Error(backend_util_exports.getSparseSegmentReductionIndicesOutOfRangeErrorMessage(i2, indices[i2], inputFlat[0])); } for (let j = 0; j < numCol; j++) { output[outIndex * numCol + j] += input2[index2 * numCol + j]; @@ -42516,8 +42145,8 @@ var squaredDifferenceConfig = { }; function stridedSliceImpl(outShape, xBuf, strides2, begin) { const outBuf = buffer(outShape, xBuf.dtype); - for (let i = 0; i < outBuf.size; i++) { - const loc = outBuf.indexToLoc(i); + for (let i2 = 0; i2 < outBuf.size; i2++) { + const loc = outBuf.indexToLoc(i2); const newLoc = new Array(loc.length); for (let j = 0; j < newLoc.length; j++) { newLoc[j] = loc[j] * strides2[j] + begin[j]; @@ -42551,8 +42180,8 @@ var StringNGramsOp = class { const dataStartIndex = splitIndex + (leftPadding > 0 ? 0 : nGramIndex - padWidth); let nGramSize = 0; nGramSize += leftPadding * this.leftPad.length; - for (let n = 0; n < numTokens; ++n) { - nGramSize += data[dataStartIndex + n].length; + for (let n2 = 0; n2 < numTokens; ++n2) { + nGramSize += data[dataStartIndex + n2].length; } nGramSize += rightPadding * this.rightPad.length; const numSeparators = leftPadding + rightPadding + numTokens - 1; @@ -42561,22 +42190,22 @@ var StringNGramsOp = class { const nGram = output[outputStartIndex + nGramIndex]; let nextNGramIndex = 0; const appendToNGram = (str) => str.forEach((value) => nGram[nextNGramIndex++] = value); - for (let n = 0; n < leftPadding; ++n) { + for (let n2 = 0; n2 < leftPadding; ++n2) { appendToNGram(this.leftPad); appendToNGram(this.separator); } - for (let n = 0; n < numTokens - 1; ++n) { - appendToNGram(data[dataStartIndex + n]); + for (let n2 = 0; n2 < numTokens - 1; ++n2) { + appendToNGram(data[dataStartIndex + n2]); appendToNGram(this.separator); } if (numTokens > 0) { appendToNGram(data[dataStartIndex + numTokens - 1]); - for (let n = 0; n < rightPadding; ++n) { + for (let n2 = 0; n2 < rightPadding; ++n2) { appendToNGram(this.separator); appendToNGram(this.rightPad); } } else { - for (let n = 0; n < rightPadding - 1; ++n) { + for (let n2 = 0; n2 < rightPadding - 1; ++n2) { appendToNGram(this.rightPad); appendToNGram(this.separator); } @@ -42592,13 +42221,13 @@ var StringNGramsOp = class { if (prevSplit !== 0) { throw new Error(`First split value must be 0, got ${prevSplit}`); } - for (let i = 1; i < splitsSize; ++i) { - let validSplits = splits[i] >= prevSplit; - validSplits = validSplits && splits[i] <= inputDataSize; + for (let i2 = 1; i2 < splitsSize; ++i2) { + let validSplits = splits[i2] >= prevSplit; + validSplits = validSplits && splits[i2] <= inputDataSize; if (!validSplits) { - throw new Error(`Invalid split value ${splits[i]}, must be in [${prevSplit}, ${inputDataSize}]`); + throw new Error(`Invalid split value ${splits[i2]}, must be in [${prevSplit}, ${inputDataSize}]`); } - prevSplit = splits[i]; + prevSplit = splits[i2]; } if (prevSplit !== inputDataSize) { throw new Error(`Last split value must be data size. Expected ${inputDataSize}, got ${prevSplit}`); @@ -42608,14 +42237,14 @@ var StringNGramsOp = class { const nGramsSplits = util_exports.getArrayFromDType("int32", splitsSize); if (inputDataSize === 0 || splitsSize === 0) { const empty = new Array(inputDataSize); - for (let i = 0; i <= numBatchItems; ++i) { - nGramsSplits[i] = 0; + for (let i2 = 0; i2 <= numBatchItems; ++i2) { + nGramsSplits[i2] = 0; } return [empty, nGramsSplits]; } nGramsSplits[0] = 0; - for (let i = 1; i <= numBatchItems; ++i) { - const length = splits[i] - splits[i - 1]; + for (let i2 = 1; i2 <= numBatchItems; ++i2) { + const length = splits[i2] - splits[i2 - 1]; let numNGrams = 0; this.nGramWidths.forEach((nGramWidth) => { numNGrams += this.getNumNGrams(length, nGramWidth); @@ -42623,20 +42252,20 @@ var StringNGramsOp = class { if (this.preserveShort && length > 0 && numNGrams === 0) { numNGrams = 1; } - nGramsSplits[i] = nGramsSplits[i - 1] + numNGrams; + nGramsSplits[i2] = nGramsSplits[i2 - 1] + numNGrams; } const nGrams = new Array(nGramsSplits[numBatchItems]); - for (let i = 0; i < numBatchItems; ++i) { - const splitIndex = splits[i]; - let outputStartIdx = nGramsSplits[i]; + for (let i2 = 0; i2 < numBatchItems; ++i2) { + const splitIndex = splits[i2]; + let outputStartIdx = nGramsSplits[i2]; this.nGramWidths.forEach((nGramWidth) => { - const length = splits[i + 1] - splits[i]; + const length = splits[i2 + 1] - splits[i2]; const numNGrams = this.getNumNGrams(length, nGramWidth); this.createNGrams(data, splitIndex, nGrams, outputStartIdx, numNGrams, nGramWidth); outputStartIdx += numNGrams; }); - if (this.preserveShort && outputStartIdx === nGramsSplits[i]) { - const dataLength = splits[i + 1] - splits[i]; + if (this.preserveShort && outputStartIdx === nGramsSplits[i2]) { + const dataLength = splits[i2 + 1] - splits[i2]; if (dataLength === 0) { continue; } @@ -42656,8 +42285,8 @@ function split3(str, delimiters, skipEmpty, result) { return; } if (delimiters.length === 0) { - for (let i = 0; i < str.length; ++i) { - result.push(str.subarray(i, i + 1)); + for (let i2 = 0; i2 < str.length; ++i2) { + result.push(str.subarray(i2, i2 + 1)); } return; } @@ -42678,13 +42307,13 @@ function split3(str, delimiters, skipEmpty, result) { return; } let tokenStart = 0; - for (let i = 0; i < str.length + 1; i++) { - if (i === str.length || delimiters.indexOf(str[i]) !== -1) { - const token = str.subarray(tokenStart, i); + for (let i2 = 0; i2 < str.length + 1; i2++) { + if (i2 === str.length || delimiters.indexOf(str[i2]) !== -1) { + const token = str.subarray(tokenStart, i2); if (!skipEmpty || token.length !== 0) { result.push(token); } - tokenStart = i + 1; + tokenStart = i2 + 1; } } } @@ -42694,11 +42323,11 @@ function stringSplitImpl(input2, delimiter, skipEmpty) { let outputSize2 = 0; let maxNumEntries = 0; const numIndices = new Array(batchSize); - for (let i = 0; i < batchSize; ++i) { + for (let i2 = 0; i2 < batchSize; ++i2) { const prevTokensLength = tokens.length; - split3(input2[i], delimiter, skipEmpty, tokens); + split3(input2[i2], delimiter, skipEmpty, tokens); const nEntries = tokens.length - prevTokensLength; - numIndices[i] = nEntries; + numIndices[i2] = nEntries; outputSize2 += nEntries; maxNumEntries = Math.max(maxNumEntries, nEntries); } @@ -42706,9 +42335,9 @@ function stringSplitImpl(input2, delimiter, skipEmpty) { const values = new Array(outputSize2); const shape = [batchSize, maxNumEntries]; let c = 0; - for (let i = 0; i < batchSize; ++i) { - for (let j = 0; j < numIndices[i]; ++j) { - indices[c * 2] = i; + for (let i2 = 0; i2 < batchSize; ++i2) { + for (let j = 0; j < numIndices[i2]; ++j) { + indices[c * 2] = i2; indices[c * 2 + 1] = j; values[c] = tokens[c]; ++c; @@ -42718,8 +42347,8 @@ function stringSplitImpl(input2, delimiter, skipEmpty) { } function stringToHashBucketFastImpl(input2, numBuckets) { const output = util_exports.getArrayFromDType("int32", input2.length); - for (let i = 0; i < input2.length; ++i) { - output[i] = util_exports.fingerPrint64(input2[i]).modulo(numBuckets).getLowBitsUnsigned(); + for (let i2 = 0; i2 < input2.length; ++i2) { + output[i2] = util_exports.fingerPrint64(input2[i2]).modulo(numBuckets).getLowBitsUnsigned(); } return output; } @@ -42735,18 +42364,18 @@ var subConfig = { }; function tileImpl(xBuf, reps) { const newShape = new Array(xBuf.rank); - for (let i = 0; i < newShape.length; i++) { - newShape[i] = xBuf.shape[i] * reps[i]; + for (let i2 = 0; i2 < newShape.length; i2++) { + newShape[i2] = xBuf.shape[i2] * reps[i2]; } const result = buffer(newShape, xBuf.dtype); - for (let i = 0; i < result.values.length; ++i) { - const newLoc = result.indexToLoc(i); + for (let i2 = 0; i2 < result.values.length; ++i2) { + const newLoc = result.indexToLoc(i2); const originalLoc = new Array(xBuf.rank); for (let j = 0; j < originalLoc.length; j++) { originalLoc[j] = newLoc[j] % xBuf.shape[j]; } const originalIndex = xBuf.locToIndex(originalLoc); - result.values[i] = xBuf.values[originalIndex]; + result.values[i2] = xBuf.values[originalIndex]; } return result; } @@ -42757,34 +42386,34 @@ var comparePair = (a, b) => { function select(array2, k, left = 0, right = array2.length - 1) { while (right > left) { if (right - left > 600) { - const n = right - left + 1; - const i2 = k - left + 1; - const z = Math.log(n); - const s = 0.5 * Math.exp(2 * z / 3); - const sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * Math.sign(i2 - n / 2); - const newLeft = Math.max(left, Math.floor(k - i2 * s / n + sd)); - const newRight = Math.min(right, Math.floor(k + (n - i2) * s / n + sd)); + const n2 = right - left + 1; + const i3 = k - left + 1; + const z = Math.log(n2); + const s2 = 0.5 * Math.exp(2 * z / 3); + const sd = 0.5 * Math.sqrt(z * s2 * (n2 - s2) / n2) * Math.sign(i3 - n2 / 2); + const newLeft = Math.max(left, Math.floor(k - i3 * s2 / n2 + sd)); + const newRight = Math.min(right, Math.floor(k + (n2 - i3) * s2 / n2 + sd)); select(array2, k, newLeft, newRight); } - const t2 = array2[k]; - let i = left; + const t22 = array2[k]; + let i2 = left; let j = right; util_exports.swap(array2, left, k); - if (comparePair(array2[right], t2) > 0) { + if (comparePair(array2[right], t22) > 0) { util_exports.swap(array2, left, right); } - while (i < j) { - util_exports.swap(array2, i, j); - i++; + while (i2 < j) { + util_exports.swap(array2, i2, j); + i2++; j--; - while (comparePair(array2[i], t2) < 0) { - i = i + 1; + while (comparePair(array2[i2], t22) < 0) { + i2 = i2 + 1; } - while (comparePair(array2[j], t2) > 0) { + while (comparePair(array2[j], t22) > 0) { j = j - 1; } } - if (comparePair(array2[left], t2) === 0) { + if (comparePair(array2[left], t22) === 0) { util_exports.swap(array2, left, j); } else { j = j + 1; @@ -42818,9 +42447,9 @@ function topKImpl(x, xShape, xDtype, k, sorted) { const outOffset = b * k; const topKVals = allTopKVals.subarray(outOffset, outOffset + k); const topKIndices = allTopKIndices.subarray(outOffset, outOffset + k); - for (let i = 0; i < k; i++) { - topKVals[i] = valAndInd[i].value; - topKIndices[i] = valAndInd[i].index; + for (let i2 = 0; i2 < k; i2++) { + topKVals[i2] = valAndInd[i2].value; + topKIndices[i2] = valAndInd[i2].index; } } const outputShape = xShape.slice(); @@ -42833,47 +42462,47 @@ function topKImpl(x, xShape, xDtype, k, sorted) { function uniqueImpl(values, axis, shape, dtype) { const $axis = util_exports.parseAxisParam(axis, shape)[0]; const newShape = [1, shape[0], 1]; - for (let i = 0; i < $axis; i++) { - newShape[0] *= shape[i]; + for (let i2 = 0; i2 < $axis; i2++) { + newShape[0] *= shape[i2]; } newShape[1] = shape[$axis]; - for (let i = $axis + 1; i < shape.length; i++) { - newShape[2] *= shape[i]; + for (let i2 = $axis + 1; i2 < shape.length; i2++) { + newShape[2] *= shape[i2]; } const uniqueElements = {}; const indices = new Int32Array(shape[$axis]); const inputBuffer = new TensorBuffer(newShape, dtype, values); const uniqueIndices = []; const is1DTensor = newShape[0] === 1 && newShape[2] === 1; - for (let i = 0; i < shape[$axis]; i++) { + for (let i2 = 0; i2 < shape[$axis]; i2++) { let element; if (is1DTensor) { - element = values[i].toString(); + element = values[i2].toString(); } else { const axisValues = []; for (let m = 0; m < newShape[0]; m++) { - for (let n = 0; n < newShape[2]; n++) { - axisValues.push(inputBuffer.get(m, i, n)); + for (let n2 = 0; n2 < newShape[2]; n2++) { + axisValues.push(inputBuffer.get(m, i2, n2)); } } element = axisValues.join(","); } if (uniqueElements[element] !== void 0) { - indices[i] = uniqueElements[element]; + indices[i2] = uniqueElements[element]; } else { const uniqueIndex = Object.keys(uniqueElements).length; uniqueElements[element] = uniqueIndex; - indices[i] = uniqueIndex; - uniqueIndices.push(i); + indices[i2] = uniqueIndex; + uniqueIndices.push(i2); } } const outputTmpShape = newShape.slice(); outputTmpShape[1] = Object.keys(uniqueElements).length; const outputBuffer = new TensorBuffer(outputTmpShape, dtype); - uniqueIndices.forEach((uniqueElementIndex, i) => { + uniqueIndices.forEach((uniqueElementIndex, i2) => { for (let m = 0; m < newShape[0]; m++) { - for (let n = 0; n < newShape[2]; n++) { - outputBuffer.set(inputBuffer.get(m, uniqueElementIndex, n), m, i, n); + for (let n2 = 0; n2 < newShape[2]; n2++) { + outputBuffer.set(inputBuffer.get(m, uniqueElementIndex, n2), m, i2, n2); } } }); @@ -42900,8 +42529,8 @@ function leakyRelu2(args) { const xSize = util_exports.sizeFromShape(x.shape); const xVals = backend2.data.get(x.dataId).values; const outVals = util_exports.getTypedArrayFromDType("float32", xSize); - for (let i = 0; i < xVals.length; i++) { - outVals[i] = xVals[i] < 0 ? alpha2 * xVals[i] : xVals[i]; + for (let i2 = 0; i2 < xVals.length; i2++) { + outVals[i2] = xVals[i2] < 0 ? alpha2 * xVals[i2] : xVals[i2]; } return backend2.makeTensorInfo(x.shape, "float32", outVals); } @@ -43021,17 +42650,17 @@ function batchMatMul(args) { const iBlock = Math.min(i0 + blockSize, leftDim); const jBlock = Math.min(j0 + blockSize, rightDim); const kBlock = Math.min(k02 + blockSize, sharedDim); - for (let i = i0; i < iBlock; i++) { + for (let i2 = i0; i2 < iBlock; i2++) { for (let j = j0; j < jBlock; j++) { let sum7 = 0; for (let k = k02; k < kBlock; k++) { const batchOffsetA = Math.min(bi, batchDimA - 1) * aBatch; const batchOffsetB = Math.min(bi, batchDimB - 1) * bBatch; - const aVal = a3dValues[batchOffsetA + i * aOuterStep + k * aInnerStep]; + const aVal = a3dValues[batchOffsetA + i2 * aOuterStep + k * aInnerStep]; const bVal = b3dValues[k * bInnerStep + j * bOuterStep + batchOffsetB]; sum7 += aVal * bVal; } - resVals[bi * size2 + (i * rightDim + j)] += sum7; + resVals[bi * size2 + (i2 * rightDim + j)] += sum7; } } } @@ -43067,8 +42696,8 @@ function _fusedMatMul(args) { intermediates.push(current); current = activationRes; } - for (const i of intermediates) { - backend2.disposeIntermediateTensorInfo(i); + for (const i2 of intermediates) { + backend2.disposeIntermediateTensorInfo(i2); } return current; } @@ -43093,11 +42722,11 @@ function addN2(args) { const { inputs, backend: backend2 } = args; const tensors = inputs; assertNotComplex(inputs, "addN"); - const vals = tensors.map((t2) => backend2.data.get(t2.dataId).values); + const vals = tensors.map((t22) => backend2.data.get(t22.dataId).values); const outBuf = buffer(tensors[0].shape, tensors[0].dtype); const outVals = outBuf.values; - for (let i = 0; i < tensors.length; i++) { - const currVals = vals[i]; + for (let i2 = 0; i2 < tensors.length; i2++) { + const currVals = vals[i2]; for (let j = 0; j < outVals.length; j++) { outVals[j] += currVals[j]; } @@ -43127,14 +42756,14 @@ function all2(args) { const reduceSize = util_exports.sizeFromShape(reduceShape); const vals = util_exports.makeZerosTypedArray(util_exports.sizeFromShape(outShape), $x.dtype); const aVals = backend2.data.get($x.dataId).values; - for (let i = 0; i < vals.length; ++i) { - const offset = i * reduceSize; + for (let i2 = 0; i2 < vals.length; ++i2) { + const offset = i2 * reduceSize; let all52 = aVals[offset]; for (let j = 0; j < reduceSize; ++j) { const value = aVals[offset + j]; all52 = all52 && value; } - vals[i] = all52; + vals[i2] = all52; } if (permutedAxes != null) { backend2.disposeIntermediateTensorInfo($x); @@ -43171,14 +42800,14 @@ function any2(args) { const reduceSize = util_exports.sizeFromShape(reduceShape); const vals = util_exports.makeZerosTypedArray(util_exports.sizeFromShape(outShape), $x.dtype); const aVals = backend2.data.get($x.dataId).values; - for (let i = 0; i < vals.length; ++i) { - const offset = i * reduceSize; + for (let i2 = 0; i2 < vals.length; ++i2) { + const offset = i2 * reduceSize; let anyVal = aVals[offset]; for (let j = 0; j < reduceSize; ++j) { const value = aVals[offset + j]; anyVal = anyVal || value; } - vals[i] = anyVal; + vals[i2] = anyVal; } if (permutedAxes != null) { backend2.disposeIntermediateTensorInfo($x); @@ -43218,8 +42847,8 @@ function argMax2(args) { const vals = util_exports.makeZerosTypedArray(outSize, "int32"); const reduceSize = util_exports.sizeFromShape(reduceShape); const aVals = backend2.data.get($x.dataId).values; - for (let i = 0; i < vals.length; ++i) { - const offset = i * reduceSize; + for (let i2 = 0; i2 < vals.length; ++i2) { + const offset = i2 * reduceSize; let max7 = aVals[offset]; let maxIndex = 0; for (let j = 0; j < reduceSize; ++j) { @@ -43229,9 +42858,9 @@ function argMax2(args) { maxIndex = j; } } - vals[i] = maxIndex; + vals[i2] = maxIndex; } - intermediateTensorInfos.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2)); + intermediateTensorInfos.forEach((t22) => backend2.disposeIntermediateTensorInfo(t22)); return backend2.makeTensorInfo(outShape, "int32", vals); } var argMaxConfig = { @@ -43260,8 +42889,8 @@ function argMin2(args) { const vals = util_exports.makeZerosTypedArray(outSize, "int32"); const reduceSize = util_exports.sizeFromShape(reduceShape); const aVals = backend2.data.get($x.dataId).values; - for (let i = 0; i < vals.length; ++i) { - const offset = i * reduceSize; + for (let i2 = 0; i2 < vals.length; ++i2) { + const offset = i2 * reduceSize; let min7 = aVals[offset]; let minIndex = 0; for (let j = 0; j < reduceSize; ++j) { @@ -43271,9 +42900,9 @@ function argMin2(args) { minIndex = j; } } - vals[i] = minIndex; + vals[i2] = minIndex; } - intermediateTensorInfos.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2)); + intermediateTensorInfos.forEach((t22) => backend2.disposeIntermediateTensorInfo(t22)); return backend2.makeTensorInfo(outShape, "int32", vals); } var argMinConfig = { @@ -43748,8 +43377,8 @@ function batchNorm2(args) { let mi = 0; let si = 0; let vi = 0; - for (let i = 0; i < xVals.length; ++i) { - outVals[i] = offVals[offi++] + (xVals[i] - mVals[mi++]) * sVals[si++] / Math.sqrt(varVals[vi++] + varianceEpsilon); + for (let i2 = 0; i2 < xVals.length; ++i2) { + outVals[i2] = offVals[offi++] + (xVals[i2] - mVals[mi++]) * sVals[si++] / Math.sqrt(varVals[vi++] + varianceEpsilon); if (offi >= offValsLength) { offi = 0; } @@ -43847,10 +43476,10 @@ var complexAbs = (args) => { const imag5 = complexVals.complexTensorInfos.imag; const realVals = cpuBackend.data.get(real5.dataId).values; const imagVals = cpuBackend.data.get(imag5.dataId).values; - for (let i = 0; i < realVals.length; i++) { - const real6 = realVals[i]; - const imag6 = imagVals[i]; - resultValues[i] = Math.hypot(real6, imag6); + for (let i2 = 0; i2 < realVals.length; i2++) { + const real6 = realVals[i2]; + const imag6 = imagVals[i2]; + resultValues[i2] = Math.hypot(real6, imag6); } return cpuBackend.makeOutput(resultValues, x.shape, "float32"); }; @@ -43875,42 +43504,42 @@ function concat2(args) { const { inputs, backend: backend2, attrs } = args; const { axis } = attrs; const $axis = util_exports.parseAxisParam(axis, inputs[0].shape)[0]; - let outShape = backend_util_exports.computeOutShape(inputs.map((t2) => t2.shape), $axis); + const shapes = inputs.map((t22) => t22.shape); + backend_util_exports.assertParamsConsistent(shapes, $axis); + let outShape = backend_util_exports.computeOutShape(inputs.map((t22) => t22.shape), $axis); if (util_exports.sizeFromShape(outShape) === 0) { return backend2.makeTensorInfo(outShape, inputs[0].dtype, []); } - const $inputs = inputs.filter((t2) => util_exports.sizeFromShape(t2.shape) > 0); + const $inputs = inputs.filter((t22) => util_exports.sizeFromShape(t22.shape) > 0); if ($inputs.length === 1) { return identity2({ inputs: { x: $inputs[0] }, backend: backend2 }); } - const shapes = $inputs.map((t2) => t2.shape); - backend_util_exports.assertParamsConsistent(shapes, $axis); if ($inputs[0].dtype === "complex64") { - const reals = $inputs.map((t2) => real2({ inputs: { input: t2 }, backend: backend2 })); - const imags = $inputs.map((t2) => imag2({ inputs: { input: t2 }, backend: backend2 })); + const reals = $inputs.map((t22) => real2({ inputs: { input: t22 }, backend: backend2 })); + const imags = $inputs.map((t22) => imag2({ inputs: { input: t22 }, backend: backend2 })); const realConcated = concat2({ inputs: reals, backend: backend2, attrs: { axis: $axis } }); const imagConcated = concat2({ inputs: imags, backend: backend2, attrs: { axis: $axis } }); const result = complex2({ inputs: { real: realConcated, imag: imagConcated }, backend: backend2 }); - reals.forEach((r) => backend2.disposeIntermediateTensorInfo(r)); - imags.forEach((i) => backend2.disposeIntermediateTensorInfo(i)); + reals.forEach((r2) => backend2.disposeIntermediateTensorInfo(r2)); + imags.forEach((i2) => backend2.disposeIntermediateTensorInfo(i2)); backend2.disposeIntermediateTensorInfo(realConcated); backend2.disposeIntermediateTensorInfo(imagConcated); return result; } - const inputs2D = $inputs.map((t2) => { - const innerSize = util_exports.sizeFromShape(t2.shape.slice($axis)); + const inputs2D = $inputs.map((t22) => { + const innerSize = util_exports.sizeFromShape(t22.shape.slice($axis)); const shape = [-1, innerSize]; - return reshape3({ inputs: { x: t2 }, backend: backend2, attrs: { shape } }); + return reshape3({ inputs: { x: t22 }, backend: backend2, attrs: { shape } }); }); - const inputsValShapes = inputs2D.map((t2) => { - return { vals: backend2.data.get(t2.dataId).values, shape: t2.shape }; + const inputsValShapes = inputs2D.map((t22) => { + return { vals: backend2.data.get(t22.dataId).values, shape: t22.shape }; }); - outShape = backend_util_exports.computeOutShape(inputs2D.map((t2) => t2.shape), 1); + outShape = backend_util_exports.computeOutShape(inputs2D.map((t22) => t22.shape), 1); const simplyConcat = inputs2D[0].shape[0] === 1; const outVals = concatImpl(inputsValShapes, outShape, inputs[0].dtype, simplyConcat); - const finalOutShape = backend_util_exports.computeOutShape($inputs.map((t2) => t2.shape), $axis); + const finalOutShape = backend_util_exports.computeOutShape($inputs.map((t22) => t22.shape), $axis); const outInfo = backend2.makeTensorInfo(finalOutShape, inputs[0].dtype, outVals); - inputs2D.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2)); + inputs2D.forEach((t22) => backend2.disposeIntermediateTensorInfo(t22)); return outInfo; } var concatConfig = { @@ -44435,14 +44064,14 @@ function cumprod2(args) { const vals = util_exports.makeOnesTypedArray(util_exports.sizeFromShape($x.shape), resultDtype); const aVals = backend2.data.get($x.dataId).values; const finalDim = $x.shape[$x.shape.length - 1]; - const indexAdjuster = reverse5 ? (i, j) => i + finalDim - j - 1 : (i, j) => i + j; - for (let i = 0; i < aVals.length; i += finalDim) { + const indexAdjuster = reverse5 ? (i2, j) => i2 + finalDim - j - 1 : (i2, j) => i2 + j; + for (let i2 = 0; i2 < aVals.length; i2 += finalDim) { for (let j = 0; j < finalDim; j++) { - const idx = indexAdjuster(i, j); + const idx = indexAdjuster(i2, j); if (j === 0) { vals[idx] = exclusive ? 1 : aVals[idx]; } else { - const prevIdx = indexAdjuster(i, j - 1); + const prevIdx = indexAdjuster(i2, j - 1); vals[idx] = exclusive ? aVals[prevIdx] * vals[prevIdx] : aVals[idx] * vals[prevIdx]; } } @@ -44480,14 +44109,14 @@ function cumsum2(args) { const vals = util_exports.makeZerosTypedArray(util_exports.sizeFromShape($x.shape), resultDtype); const aVals = backend2.data.get($x.dataId).values; const finalDim = $x.shape[$x.shape.length - 1]; - const indexAdjuster = reverse5 ? (i, j) => i + finalDim - j - 1 : (i, j) => i + j; - for (let i = 0; i < aVals.length; i += finalDim) { + const indexAdjuster = reverse5 ? (i2, j) => i2 + finalDim - j - 1 : (i2, j) => i2 + j; + for (let i2 = 0; i2 < aVals.length; i2 += finalDim) { for (let j = 0; j < finalDim; j++) { - const idx = indexAdjuster(i, j); + const idx = indexAdjuster(i2, j); if (j === 0) { vals[idx] = exclusive ? 0 : aVals[idx]; } else { - const prevIdx = indexAdjuster(i, j - 1); + const prevIdx = indexAdjuster(i2, j - 1); vals[idx] = exclusive ? aVals[prevIdx] + vals[prevIdx] : aVals[idx] + vals[prevIdx]; } } @@ -44741,8 +44370,8 @@ function diag2(args) { const xVals = backend2.data.get(x.dataId).values; const outBuf = buffer([xSize, xSize], x.dtype); const vals = outBuf.values; - for (let i = 0; i < xVals.length; i++) { - vals[i * xSize + i] = xVals[i]; + for (let i2 = 0; i2 < xVals.length; i2++) { + vals[i2 * xSize + i2] = xVals[i2]; } const outShape = [...x.shape, ...x.shape]; return backend2.makeTensorInfo(outShape, outBuf.dtype, outBuf.values); @@ -44921,13 +44550,13 @@ function sum3(args) { const reduceSize = util_exports.sizeFromShape(reduceShape); const vals = backend2.data.get(result.dataId).values; const aVals = backend2.data.get(permutedX.dataId).values; - for (let i = 0; i < vals.length; ++i) { - const offset = i * reduceSize; + for (let i2 = 0; i2 < vals.length; ++i2) { + const offset = i2 * reduceSize; let sum7 = 0; for (let j = 0; j < reduceSize; ++j) { sum7 += aVals[offset + j]; } - vals[i] = sum7; + vals[i2] = sum7; } if (keepDims) { const newShape = backend_util_exports.expandShapeToKeepDim(result.shape, axes); @@ -44957,8 +44586,8 @@ function einsum2(args) { let out = null; let numDimsRemaining = allDims.length; const tensorsToDispose = []; - for (let i = 0; i < nSteps; ++i) { - for (const idTerm of steps[i]) { + for (let i2 = 0; i2 < nSteps; ++i2) { + for (const idTerm of steps[i2]) { const { permutationIndices: perm, expandDims: dimsToExpand } = backend_util_exports.getEinsumPermutation(numDimsRemaining, idDims[idTerm]); let x; if (backend_util_exports.isIdentityPermutation(perm)) { @@ -44982,13 +44611,13 @@ function einsum2(args) { tensorsToDispose.push(out); } } - if (i < nSteps - 1) { - if (path[i] >= 0) { + if (i2 < nSteps - 1) { + if (path[i2] >= 0) { out = sum3({ inputs: { x: out }, backend: backend2, attrs: { - axis: path[i] - (allDims.length - numDimsRemaining), + axis: path[i2] - (allDims.length - numDimsRemaining), keepDims: false } }); @@ -45017,12 +44646,12 @@ function eluGrad(args) { const resultValues = new Float32Array(util_exports.sizeFromShape(y.shape)); const values = backend2.data.get(y.dataId).values; const dyValues = backend2.data.get(dy.dataId).values; - for (let i = 0; i < values.length; ++i) { - const v = values[i]; + for (let i2 = 0; i2 < values.length; ++i2) { + const v = values[i2]; if (v >= 1) { - resultValues[i] = dyValues[i]; + resultValues[i2] = dyValues[i2]; } else { - resultValues[i] = dyValues[i] * (v + 1); + resultValues[i2] = dyValues[i2] * (v + 1); } } return backend2.makeTensorInfo(y.shape, "float32", resultValues); @@ -45041,8 +44670,8 @@ var a5 = backend_util_exports.ERF_A5; var erf2 = unaryKernelFunc(Erf, (xi) => { const sign4 = Math.sign(xi); const v = Math.abs(xi); - const t2 = 1 / (1 + p * v); - return sign4 * (1 - ((((a5 * t2 + a4) * t2 + a3) * t2 + a2) * t2 + a1) * t2 * Math.exp(-v * v)); + const t22 = 1 / (1 + p * v); + return sign4 * (1 - ((((a5 * t22 + a4) * t22 + a3) * t22 + a2) * t22 + a1) * t22 * Math.exp(-v * v)); }); var erfConfig = { kernelName: Erf, @@ -45087,17 +44716,17 @@ function fftBatch(input2, inverse, cpuBackend) { const resultReal = util_exports.getTypedArrayFromDType("float32", resultSize); const resultImag = util_exports.getTypedArrayFromDType("float32", resultSize); for (let b = 0; b < batch; b++) { - const r = slice2({ + const r2 = slice2({ inputs: { x: real2D }, backend: cpuBackend, attrs: { begin: [b, 0], size: [1, innerDim] } }); - const i = slice2({ + const i2 = slice2({ inputs: { x: imag2D }, backend: cpuBackend, attrs: { begin: [b, 0], size: [1, innerDim] } }); - const input3 = complex2({ inputs: { real: r, imag: i }, backend: cpuBackend }); + const input3 = complex2({ inputs: { real: r2, imag: i2 }, backend: cpuBackend }); const { real: real5, imag: imag5 } = fftImpl(input3, inverse, cpuBackend); const res = backend_util_exports.mergeRealAndImagArrays(real5, imag5); for (let d = 0; d < innerDim; d++) { @@ -45105,8 +44734,8 @@ function fftBatch(input2, inverse, cpuBackend) { resultReal[b * innerDim + d] = c.real; resultImag[b * innerDim + d] = c.imag; } - cpuBackend.disposeIntermediateTensorInfo(r); - cpuBackend.disposeIntermediateTensorInfo(i); + cpuBackend.disposeIntermediateTensorInfo(r2); + cpuBackend.disposeIntermediateTensorInfo(i2); cpuBackend.disposeIntermediateTensorInfo(input3); } const $realInfo = cpuBackend.makeTensorInfo(resultShape, "float32", resultReal); @@ -45188,10 +44817,10 @@ function fftRadix2(realVals, imagVals, size2, inverse, cpuBackend) { const $oddRealInfo = cpuBackend.makeTensorInfo($oddShape, "float32", $oddRealVals); const $oddImagInfo = cpuBackend.makeTensorInfo($oddShape, "float32", $oddImagVals); const $oddTensorInfo = complex2({ inputs: { real: $oddRealInfo, imag: $oddImagInfo }, backend: cpuBackend }); - const e = backend_util_exports.exponents(size2, inverse); - const eShape = [e.real.length]; - const eRealInfo = cpuBackend.makeTensorInfo(eShape, "float32", e.real); - const eImagInfo = cpuBackend.makeTensorInfo(eShape, "float32", e.imag); + const e2 = backend_util_exports.exponents(size2, inverse); + const eShape = [e2.real.length]; + const eRealInfo = cpuBackend.makeTensorInfo(eShape, "float32", e2.real); + const eImagInfo = cpuBackend.makeTensorInfo(eShape, "float32", e2.imag); const complexInfo = complex2({ inputs: { real: eRealInfo, imag: eImagInfo }, backend: cpuBackend }); const exponentInfo = multiply2({ inputs: { a: complexInfo, b: $oddTensorInfo }, backend: cpuBackend }); const addPart = add4({ @@ -45246,20 +44875,20 @@ function fftRadix2(realVals, imagVals, size2, inverse, cpuBackend) { } function fourierTransformByMatmul(data, size2, inverse) { const ret = new Float32Array(size2 * 2); - for (let r = 0; r < size2; r++) { + for (let r2 = 0; r2 < size2; r2++) { let real5 = 0; let imag5 = 0; for (let c = 0; c < size2; c++) { - const e = backend_util_exports.exponent(r * c, size2, inverse); + const e2 = backend_util_exports.exponent(r2 * c, size2, inverse); const term = backend_util_exports.getComplexWithIndex(data, c); - real5 += term.real * e.real - term.imag * e.imag; - imag5 += term.real * e.imag + term.imag * e.real; + real5 += term.real * e2.real - term.imag * e2.imag; + imag5 += term.real * e2.imag + term.imag * e2.real; } if (inverse) { real5 /= size2; imag5 /= size2; } - backend_util_exports.assignToTypedArray(ret, real5, imag5, r); + backend_util_exports.assignToTypedArray(ret, real5, imag5, r2); } return ret; } @@ -45441,8 +45070,8 @@ function gatherV2(args) { const parsedAxis = util_exports.parseAxisParam(axis, x.shape)[0]; const indicesVals = backend2.data.get(indices.dataId).values; const axisDim = x.shape[parsedAxis]; - for (let i = 0; i < indicesVals.length; ++i) { - const index2 = indicesVals[i]; + for (let i2 = 0; i2 < indicesVals.length; ++i2) { + const index2 = indicesVals[i2]; util_exports.assert(index2 <= axisDim - 1 && index2 >= 0, () => `GatherV2: the index value ${index2} is not in [0, ${axisDim - 1}]`); } let $batchDims = batchDims; @@ -45646,8 +45275,8 @@ function max3(args) { let xVals = cpuBackend.data.get(x.dataId).values; if (permutedAxes != null) { const newShape = new Array(xRank); - for (let i = 0; i < newShape.length; i++) { - newShape[i] = xShape[permutedAxes[i]]; + for (let i2 = 0; i2 < newShape.length; i2++) { + newShape[i2] = xShape[permutedAxes[i2]]; } xVals = transposeImpl(xVals, xShape, x.dtype, permutedAxes, newShape); axes = backend_util_exports.getInnerMostAxes(axes.length, xRank); @@ -45880,7 +45509,7 @@ function mean2(args) { const res = div2({ inputs: { a: $x, b: reduceSizeScalar }, backend: backend2 }); toDispose.push(res); const result = sum3({ inputs: { x: res }, backend: backend2, attrs: { axis, keepDims } }); - toDispose.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2)); + toDispose.forEach((t22) => backend2.disposeIntermediateTensorInfo(t22)); return result; } var meanConfig = { @@ -45906,8 +45535,8 @@ function min3(args) { const reduceSize = util_exports.sizeFromShape(reduceShape); const vals = util_exports.makeZerosTypedArray(util_exports.sizeFromShape(outShape), $x.dtype); const aVals = backend2.data.get($x.dataId).values; - for (let i = 0; i < vals.length; ++i) { - const offset = i * reduceSize; + for (let i2 = 0; i2 < vals.length; ++i2) { + const offset = i2 * reduceSize; let min7 = aVals[offset]; for (let j = 0; j < reduceSize; ++j) { const value = aVals[offset + j]; @@ -45915,7 +45544,7 @@ function min3(args) { min7 = value; } } - vals[i] = min7; + vals[i2] = min7; } if (permutedAxes != null) { backend2.disposeIntermediateTensorInfo($x); @@ -45939,9 +45568,9 @@ function mirrorPad2(args) { const { x } = inputs; const { paddings, mode } = attrs; assertNotComplex(x, "mirrorPad"); - const outShape = paddings.map((p2, i) => p2[0] + x.shape[i] + p2[1]); + const outShape = paddings.map((p2, i2) => p2[0] + x.shape[i2] + p2[1]); const start = paddings.map((p2) => p2[0]); - const end = paddings.map((p2, i) => p2[0] + x.shape[i]); + const end = paddings.map((p2, i2) => p2[0] + x.shape[i2]); const offset = mode === "reflect" ? 0 : 1; const xVals = backend2.data.get(x.dataId).values; const xRank = x.shape.length; @@ -45950,18 +45579,18 @@ function mirrorPad2(args) { const resultRank = outShape.length; const resultStrides = util_exports.computeStrides(outShape); const resVals = util_exports.getTypedArrayFromDType(x.dtype, resultSize); - for (let i = 0; i < resultSize; i++) { - let coords3 = util_exports.indexToLoc(i, resultRank, resultStrides); - for (let i2 = 0; i2 < resultRank; i2++) { - if (coords3[i2] < start[i2]) { - coords3[i2] = start[i2] * 2 - coords3[i2] - offset; - } else if (coords3[i2] >= end[i2]) { - coords3[i2] = (end[i2] - 1) * 2 - coords3[i2] + offset; + for (let i2 = 0; i2 < resultSize; i2++) { + let coords3 = util_exports.indexToLoc(i2, resultRank, resultStrides); + for (let i3 = 0; i3 < resultRank; i3++) { + if (coords3[i3] < start[i3]) { + coords3[i3] = start[i3] * 2 - coords3[i3] - offset; + } else if (coords3[i3] >= end[i3]) { + coords3[i3] = (end[i3] - 1) * 2 - coords3[i3] + offset; } } - coords3 = coords3.map((c, i2) => c - start[i2]); + coords3 = coords3.map((c, i3) => c - start[i3]); const inIndex = util_exports.locToIndex(coords3, xRank, xStrides); - resVals[i] = xVals[inIndex]; + resVals[i2] = xVals[inIndex]; } const outId = backend2.write(resVals, outShape, x.dtype); return { dataId: outId, shape: outShape, dtype: x.dtype }; @@ -46045,10 +45674,10 @@ function multinomial2(args) { const random = seedrandom4.alea(seed.toString()); const outOffset = b * numSamples; for (let sampleId = 0; sampleId < numSamples; ++sampleId) { - const r = random(); + const r2 = random(); resVals[outOffset + sampleId] = cdf.length; for (let event = 0; event < cdf.length; event++) { - if (r < cdf[event]) { + if (r2 < cdf[event]) { resVals[outOffset + sampleId] = event; break; } @@ -46151,14 +45780,14 @@ function zerosLike2(args) { throw new Error("zerosLike is not supported for string tensors"); } else if (x.dtype === "complex64") { const realPart = real2({ inputs: { input: x }, backend: backend2 }); - const r = zerosLike2({ inputs: { x: realPart }, backend: backend2 }); + const r2 = zerosLike2({ inputs: { x: realPart }, backend: backend2 }); const imagPart = imag2({ inputs: { input: x }, backend: backend2 }); - const i = zerosLike2({ inputs: { x: imagPart }, backend: backend2 }); - const result = complex2({ inputs: { real: r, imag: i }, backend: backend2 }); + const i2 = zerosLike2({ inputs: { x: imagPart }, backend: backend2 }); + const result = complex2({ inputs: { real: r2, imag: i2 }, backend: backend2 }); backend2.disposeIntermediateTensorInfo(realPart); - backend2.disposeIntermediateTensorInfo(r); + backend2.disposeIntermediateTensorInfo(r2); backend2.disposeIntermediateTensorInfo(imagPart); - backend2.disposeIntermediateTensorInfo(i); + backend2.disposeIntermediateTensorInfo(i2); return result; } else { return fill2({ backend: backend2, attrs: { shape: x.shape, value: 0, dtype: x.dtype } }); @@ -46176,14 +45805,14 @@ function onesLike2(args) { throw new Error("onesLike is not supported for string tensors"); } else if (x.dtype === "complex64") { const realPart = real2({ inputs: { input: x }, backend: backend2 }); - const r = onesLike2({ inputs: { x: realPart }, backend: backend2 }); + const r2 = onesLike2({ inputs: { x: realPart }, backend: backend2 }); const imagPart = imag2({ inputs: { input: x }, backend: backend2 }); - const i = zerosLike2({ inputs: { x: imagPart }, backend: backend2 }); - const result = complex2({ inputs: { real: r, imag: i }, backend: backend2 }); + const i2 = zerosLike2({ inputs: { x: imagPart }, backend: backend2 }); + const result = complex2({ inputs: { real: r2, imag: i2 }, backend: backend2 }); backend2.disposeIntermediateTensorInfo(realPart); - backend2.disposeIntermediateTensorInfo(r); + backend2.disposeIntermediateTensorInfo(r2); backend2.disposeIntermediateTensorInfo(imagPart); - backend2.disposeIntermediateTensorInfo(i); + backend2.disposeIntermediateTensorInfo(i2); return result; } else { return fill2({ backend: backend2, attrs: { shape: x.shape, value: 1, dtype: x.dtype } }); @@ -46202,18 +45831,18 @@ function pack(args) { } const shape = inputs[0].shape; const dtype = inputs[0].dtype; - inputs.forEach((t2) => { - util_exports.assertShapesMatch(shape, t2.shape, "All tensors passed to stack must have matching shapes"); - util_exports.assert(dtype === t2.dtype, () => "All tensors passed to stack must have matching dtypes"); + inputs.forEach((t22) => { + util_exports.assertShapesMatch(shape, t22.shape, "All tensors passed to stack must have matching shapes"); + util_exports.assert(dtype === t22.dtype, () => "All tensors passed to stack must have matching dtypes"); }); const intermediateTensorInfos = []; - const expandedTensors = inputs.map((t2) => { - const expandedT = expandDims3({ inputs: { input: t2 }, backend: backend2, attrs: { dim: axis } }); + const expandedTensors = inputs.map((t22) => { + const expandedT = expandDims3({ inputs: { input: t22 }, backend: backend2, attrs: { dim: axis } }); intermediateTensorInfos.push(expandedT); return expandedT; }); const result = concat2({ inputs: expandedTensors, backend: backend2, attrs: { axis } }); - intermediateTensorInfos.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2)); + intermediateTensorInfos.forEach((t22) => backend2.disposeIntermediateTensorInfo(t22)); return result; } var packConfig = { @@ -46226,7 +45855,7 @@ function padV2(args) { const { x } = inputs; const { paddings, constantValue } = attrs; assertNotComplex(x, "pad"); - const outShape = paddings.map((p2, i) => p2[0] + x.shape[i] + p2[1]); + const outShape = paddings.map((p2, i2) => p2[0] + x.shape[i2] + p2[1]); const start = paddings.map((p2) => p2[0]); const xVals = backend2.data.get(x.dataId).values; const xSize = util_exports.sizeFromShape(x.shape); @@ -46239,11 +45868,11 @@ function padV2(args) { if (constantValue !== 0) { resVals.fill(constantValue); } - for (let i = 0; i < xSize; i++) { - const coords3 = util_exports.indexToLoc(i, xRank, xStrides); - const outCoords = coords3.map((c, i2) => c + start[i2]); + for (let i2 = 0; i2 < xSize; i2++) { + const coords3 = util_exports.indexToLoc(i2, xRank, xStrides); + const outCoords = coords3.map((c, i3) => c + start[i3]); const outIndex = util_exports.locToIndex(outCoords, resultRank, resultStrides); - resVals[outIndex] = xVals[i]; + resVals[outIndex] = xVals[i2]; } const outId = backend2.write(resVals, outShape, x.dtype); return { dataId: outId, shape: outShape, dtype: x.dtype }; @@ -46260,6 +45889,24 @@ var powConfig = { backendName: "cpu", kernelFunc: pow2 }; +function raggedGather2(args) { + const { inputs, backend: backend2, attrs } = args; + const { paramsNestedSplits, paramsDenseValues, indices } = inputs; + const { outputRaggedRank } = attrs; + const $paramsNestedSplits = paramsNestedSplits.map((t22) => backend2.data.get(t22.dataId).values); + const $paramsNestedSplitsShapes = paramsNestedSplits.map((t22) => t22.shape); + const $paramsDenseValues = backend2.data.get(paramsDenseValues.dataId).values; + const $indices = backend2.data.get(indices.dataId).values; + const [outputNestedSplits, outputDenseValues, outputDenseValuesShape] = raggedGatherImpl($paramsNestedSplits, $paramsNestedSplitsShapes, $paramsDenseValues, paramsDenseValues.shape, paramsDenseValues.dtype, $indices, indices.shape, outputRaggedRank); + const outputNestedSplitsTensors = outputNestedSplits.map((splits) => backend2.makeTensorInfo([splits.length], "int32", splits)); + const outputDenseValuesTensor = backend2.makeTensorInfo(outputDenseValuesShape, paramsDenseValues.dtype, outputDenseValues); + return outputNestedSplitsTensors.concat([outputDenseValuesTensor]); +} +var raggedGatherConfig = { + kernelName: RaggedGather, + backendName: "cpu", + kernelFunc: raggedGather2 +}; function raggedTensorToTensor2(args) { const { inputs, backend: backend2, attrs } = args; const { shape, values, defaultValue, rowPartitionTensors } = inputs; @@ -46267,8 +45914,8 @@ function raggedTensorToTensor2(args) { const $shape = backend2.data.get(shape.dataId).values; const $values = backend2.data.get(values.dataId).values; const $defaultValue = backend2.data.get(defaultValue.dataId).values; - const $rowPartitionValues = rowPartitionTensors.map((t2) => backend2.data.get(t2.dataId).values); - const rowPartitionValuesShapes = rowPartitionTensors.map((t2) => t2.shape); + const $rowPartitionValues = rowPartitionTensors.map((t22) => backend2.data.get(t22.dataId).values); + const rowPartitionValuesShapes = rowPartitionTensors.map((t22) => t22.shape); const [outputShape, output] = raggedTensorToTensorImpl($shape, shape.shape, $values, values.shape, values.dtype, $defaultValue, defaultValue.shape, $rowPartitionValues, rowPartitionValuesShapes, rowPartitionTypes); return backend2.makeTensorInfo(outputShape, values.dtype, output); } @@ -46316,12 +45963,12 @@ function resizeBilinear2(args) { const effectiveRowSizeRatio = effectiveInputSize[0] / effectiveOutputSize[0]; const effectiveColSizeRatio = effectiveInputSize[1] / effectiveOutputSize[1]; for (let b = 0; b < batch; b++) { - for (let r = 0; r < newHeight; r++) { + for (let r2 = 0; r2 < newHeight; r2++) { let sourceFracRow; if (halfPixelCenters) { - sourceFracRow = effectiveRowSizeRatio * (r + 0.5) - 0.5; + sourceFracRow = effectiveRowSizeRatio * (r2 + 0.5) - 0.5; } else { - sourceFracRow = effectiveRowSizeRatio * r; + sourceFracRow = effectiveRowSizeRatio * r2; } const sourceRowFloor = Math.max(0, Math.floor(sourceFracRow)); const rowFrac = sourceFracRow - sourceRowFloor; @@ -46385,8 +46032,8 @@ function resizeBilinearGrad(args) { let offset = 0; for (let b = 0; b < batch; b++) { const bOffset = b * imagesStrides[0]; - for (let r = 0; r < yHeight; r++) { - const dxR = r * heightScale; + for (let r2 = 0; r2 < yHeight; r2++) { + const dxR = r2 * heightScale; const topDxRIndex = Math.floor(dxR); const bottomDxRIndex = Math.min(Math.ceil(dxR), xHeight - 1); const topDxROffset = bOffset + topDxRIndex * imagesStrides[1]; @@ -46447,8 +46094,8 @@ function resizeNearestNeighbor2(args) { let outputOffset = 0; for (let b = 0; b < batch; b++) { const batchOffset = b * imagesStrides[0]; - for (let r = 0; r < newHeight; r++) { - const sourceFracRow = halfPixelCenters ? effectiveRowSizeRatio * (r + 0.5) : effectiveRowSizeRatio * r; + for (let r2 = 0; r2 < newHeight; r2++) { + const sourceFracRow = halfPixelCenters ? effectiveRowSizeRatio * (r2 + 0.5) : effectiveRowSizeRatio * r2; let sourceNearestRow = Math.min(oldHeight - 1, alignCorners ? Math.round(sourceFracRow) : Math.floor(sourceFracRow)); if (halfPixelCenters) { sourceNearestRow = Math.max(0, sourceNearestRow); @@ -46502,9 +46149,9 @@ function resizeNearestNeighborGrad(args) { const winWidth = Math.ceil(invWidthScale) * 2 + 2; for (let b = 0; b < batch; b++) { const batchOffset = b * imagesStrides[0]; - for (let r = 0; r < xHeight; r++) { - const rowOffset = batchOffset + r * imagesStrides[1]; - const startRLerp = Math.floor(r * invHeightScale); + for (let r2 = 0; r2 < xHeight; r2++) { + const rowOffset = batchOffset + r2 * imagesStrides[1]; + const startRLerp = Math.floor(r2 * invHeightScale); const startDyR = Math.floor(startRLerp - winHeight / 2); for (let c = 0; c < xWidth; c++) { const colOffset = rowOffset + c * imagesStrides[2]; @@ -46520,7 +46167,7 @@ function resizeNearestNeighborGrad(args) { const dyROffset = batchOffset + dyR * dyStrides[1]; const sourceFracRow = dyR * heightScale; const sourceNearestRow = Math.min(xHeight - 1, alignCorners ? Math.round(sourceFracRow) : Math.floor(sourceFracRow)); - if (r !== sourceNearestRow) { + if (r2 !== sourceNearestRow) { continue; } for (let dyCIndex = 0; dyCIndex < winWidth; dyCIndex++) { @@ -46560,8 +46207,8 @@ function reverse2(args) { } const outBuf = new TensorBuffer(x.shape, x.dtype); const xBuf = backend2.bufferSync(x); - for (let i = 0; i < outBuf.size; i++) { - const outLoc = outBuf.indexToLoc(i); + for (let i2 = 0; i2 < outBuf.size; i2++) { + const outLoc = outBuf.indexToLoc(i2); const inLoc = outLoc.slice(); $dims.forEach((d) => inLoc[d] = x.shape[d] - 1 - inLoc[d]); outBuf.set(xBuf.get(...inLoc), ...outLoc); @@ -46693,8 +46340,8 @@ function searchSortedImpl(sortedInputs, values, batchSize, numInputs, numValues, for (let b = 0; b < batchSize; ++b) { const sortedInputsSlice = sortedInputs.slice(b * numInputs, (b + 1) * numInputs); const outputOffset = b * numValues; - for (let i = 0; i < numValues; ++i) { - output[outputOffset + i] = side === "left" ? lowerBound2(sortedInputsSlice, values[i + outputOffset]) : upperBound2(sortedInputsSlice, values[i + outputOffset]); + for (let i2 = 0; i2 < numValues; ++i2) { + output[outputOffset + i2] = side === "left" ? lowerBound2(sortedInputsSlice, values[i2 + outputOffset]) : upperBound2(sortedInputsSlice, values[i2 + outputOffset]); } } return output; @@ -46715,26 +46362,26 @@ var searchSortedConfig = { }; function select2(args) { const { inputs, backend: backend2 } = args; - const { condition, t: t2, e } = inputs; - assertNotComplex([condition, t2, e], "select"); + const { condition, t: t22, e: e2 } = inputs; + assertNotComplex([condition, t22, e2], "select"); const conditionRank = condition.shape.length; const values = backend2.data.get(condition.dataId).values; - const tValues = backend2.data.get(t2.dataId).values; - const eValues = backend2.data.get(e.dataId).values; - const resultDtype = upcastType(t2.dtype, e.dtype); - const newValues = util_exports.makeZerosTypedArray(util_exports.sizeFromShape(t2.shape), resultDtype); + const tValues = backend2.data.get(t22.dataId).values; + const eValues = backend2.data.get(e2.dataId).values; + const resultDtype = upcastType(t22.dtype, e2.dtype); + const newValues = util_exports.makeZerosTypedArray(util_exports.sizeFromShape(t22.shape), resultDtype); let index2 = 0; - const offset = conditionRank === 0 || conditionRank > 1 || t2.shape.length === 1 ? 1 : util_exports.sizeFromShape(t2.shape.slice(1)); - for (let i = 0; i < values.length; i++) { + const offset = conditionRank === 0 || conditionRank > 1 || t22.shape.length === 1 ? 1 : util_exports.sizeFromShape(t22.shape.slice(1)); + for (let i2 = 0; i2 < values.length; i2++) { for (let j = 0; j < offset; j++) { - if (values[i] === 1) { - newValues[index2++] = tValues[i]; + if (values[i2] === 1) { + newValues[index2++] = tValues[i2]; } else { - newValues[index2++] = eValues[i]; + newValues[index2++] = eValues[i2]; } } } - return backend2.makeTensorInfo(t2.shape, resultDtype, newValues); + return backend2.makeTensorInfo(t22.shape, resultDtype, newValues); } var selectConfig = { kernelName: Select, @@ -46810,7 +46457,7 @@ function spaceToBatchND2(args) { const prod6 = util_exports.sizeFromShape(blockShape); const completePaddings = [[0, 0]]; completePaddings.push(...paddings); - for (let i = 1 + blockShape.length; i < x.shape.length; ++i) { + for (let i2 = 1 + blockShape.length; i2 < x.shape.length; ++i2) { completePaddings.push([0, 0]); } const paddedX = padV2Config.kernelFunc({ @@ -47011,11 +46658,11 @@ function splitV(args) { const splitSizes = backend_util_exports.prepareSplitSize(x, numOrSizeSplits, $axis); const begin = new Array(x.shape.length).fill(0); const size2 = x.shape.slice(); - return splitSizes.map((s) => { + return splitSizes.map((s2) => { const sliceSize = [...size2]; - sliceSize[$axis] = s; + sliceSize[$axis] = s2; const sliceT = slice2({ inputs: { x }, backend: backend2, attrs: { begin, size: sliceSize } }); - begin[$axis] += s; + begin[$axis] += s2; return sliceT; }); } @@ -47033,9 +46680,9 @@ var squareConfig = { assertNotComplex(x, "square"); const values = cpuBackend.data.get(x.dataId).values; const newValues = new Float32Array(values.length); - for (let i = 0; i < values.length; ++i) { - const value = values[i]; - newValues[i] = value * value; + for (let i2 = 0; i2 < values.length; ++i2) { + const value = values[i2]; + newValues[i2] = value * value; } const dataId = cpuBackend.write(newValues, x.shape, x.dtype); return { dataId, shape: x.shape, dtype: x.dtype }; @@ -47358,19 +47005,19 @@ function unpack(args) { const num = value.shape[axis]; const outShape = new Array(valueRank - 1); let outIndex = 0; - for (let i = 0; i < valueRank; i++) { - if (i !== axis) { - outShape[outIndex++] = value.shape[i]; + for (let i2 = 0; i2 < valueRank; i2++) { + if (i2 !== axis) { + outShape[outIndex++] = value.shape[i2]; } } const begin = new Array(valueRank).fill(0); const size2 = value.shape.slice(); size2[axis] = 1; const res = new Array(num); - for (let i = 0; i < res.length; i++) { - begin[axis] = i; + for (let i2 = 0; i2 < res.length; i2++) { + begin[axis] = i2; const tempRes = slice2({ inputs: { x: value }, backend: backend2, attrs: { begin, size: size2 } }); - res[i] = reshape3({ inputs: { x: tempRes }, backend: backend2, attrs: { shape: outShape } }); + res[i2] = reshape3({ inputs: { x: tempRes }, backend: backend2, attrs: { shape: outShape } }); backend2.disposeIntermediateTensorInfo(tempRes); } return res; @@ -47391,13 +47038,13 @@ function unsortedSegmentSum2(args) { const intermediates = []; const numIters = xRank - segmentIdsRank; let $segmentIds = segmentIds; - for (let i = 0; i < numIters; ++i) { - const expanded = expandDims3({ inputs: { input: $segmentIds }, backend: backend2, attrs: { dim: i + 1 } }); + for (let i2 = 0; i2 < numIters; ++i2) { + const expanded = expandDims3({ inputs: { input: $segmentIds }, backend: backend2, attrs: { dim: i2 + 1 } }); $segmentIds = expanded; intermediates.push(expanded); } - for (let i = 0; i < numSegments; ++i) { - const scalarValue = util_exports.createScalarValue(i, "int32"); + for (let i2 = 0; i2 < numSegments; ++i2) { + const scalarValue = util_exports.createScalarValue(i2, "int32"); const segmentId = backend2.makeTensorInfo([], "int32", scalarValue); const mask2 = equal2({ inputs: { a: segmentId, b: $segmentIds }, backend: backend2 }); const maskCasted = cast3({ inputs: { x: mask2 }, backend: backend2, attrs: { dtype: "float32" } }); @@ -47411,7 +47058,7 @@ function unsortedSegmentSum2(args) { intermediates.push(sumTensorInfo); } const result = pack({ inputs: res, backend: backend2, attrs: { axis: 0 } }); - intermediates.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2)); + intermediates.forEach((t22) => backend2.disposeIntermediateTensorInfo(t22)); return result; } var unsortedSegmentSumConfig = { @@ -47532,6 +47179,7 @@ var kernelConfigs = [ powConfig, preluConfig, prodConfig, + raggedGatherConfig, raggedTensorToTensorConfig, rangeConfig, realConfig, @@ -47870,8 +47518,8 @@ function logShaderSourceAndInfoLog(shaderSource, shaderInfoLog) { const pad3 = shaderLines.length.toString().length + 2; const linesWithLineNumbers = shaderLines.map((line, lineNumber2) => util_exports.rightPad((lineNumber2 + 1).toString(), pad3) + line); let maxLineLength = 0; - for (let i = 0; i < linesWithLineNumbers.length; i++) { - maxLineLength = Math.max(linesWithLineNumbers[i].length, maxLineLength); + for (let i2 = 0; i2 < linesWithLineNumbers.length; i2++) { + maxLineLength = Math.max(linesWithLineNumbers[i2].length, maxLineLength); } const beforeErrorLines = linesWithLineNumbers.slice(0, lineNumber - 1); const errorLine = linesWithLineNumbers.slice(lineNumber - 1, lineNumber); @@ -48037,9 +47685,14 @@ function getShapeAs3D(shape) { } function getTextureShapeFromLogicalShape(logShape, isPacked = false) { let maxTexSize = env().getNumber("WEBGL_MAX_TEXTURE_SIZE"); + let maxSizeForNarrowTex = env().getNumber("WEBGL_MAX_SIZE_FOR_NARROW_TEXTURE"); + if (maxSizeForNarrowTex === Infinity && env().getBool("WEBGL_AUTO_SQUARIFY_NARROW_TEXTURE_SHAPE")) { + maxSizeForNarrowTex = maxTexSize / 2; + } if (isPacked) { maxTexSize = maxTexSize * 2; - logShape = logShape.map((d, i) => i >= logShape.length - 2 ? util_exports.nearestLargerEven(logShape[i]) : logShape[i]); + maxSizeForNarrowTex = maxSizeForNarrowTex * 2; + logShape = logShape.map((d, i2) => i2 >= logShape.length - 2 ? util_exports.nearestLargerEven(logShape[i2]) : logShape[i2]); if (logShape.length === 1) { logShape = [2, logShape[0]]; } @@ -48049,19 +47702,22 @@ function getTextureShapeFromLogicalShape(logShape, isPacked = false) { logShape = squeezeResult.newShape; } let size2 = util_exports.sizeFromShape(logShape); + let textureShape = null; if (logShape.length <= 1 && size2 <= maxTexSize) { - return [1, size2]; + textureShape = [1, size2]; } else if (logShape.length === 2 && logShape[0] <= maxTexSize && logShape[1] <= maxTexSize) { - return logShape; + textureShape = logShape; } else if (logShape.length === 3 && logShape[0] * logShape[1] <= maxTexSize && logShape[2] <= maxTexSize) { - return [logShape[0] * logShape[1], logShape[2]]; + textureShape = [logShape[0] * logShape[1], logShape[2]]; } else if (logShape.length === 3 && logShape[0] <= maxTexSize && logShape[1] * logShape[2] <= maxTexSize) { - return [logShape[0], logShape[1] * logShape[2]]; + textureShape = [logShape[0], logShape[1] * logShape[2]]; } else if (logShape.length === 4 && logShape[0] * logShape[1] * logShape[2] <= maxTexSize && logShape[3] <= maxTexSize) { - return [logShape[0] * logShape[1] * logShape[2], logShape[3]]; + textureShape = [logShape[0] * logShape[1] * logShape[2], logShape[3]]; } else if (logShape.length === 4 && logShape[0] <= maxTexSize && logShape[1] * logShape[2] * logShape[3] <= maxTexSize) { - return [logShape[0], logShape[1] * logShape[2] * logShape[3]]; - } else { + textureShape = [logShape[0], logShape[1] * logShape[2] * logShape[3]]; + } + const isLongNarrowTex = textureShape != null && Math.max(...textureShape) > maxSizeForNarrowTex && Math.min(...textureShape) <= (isPacked ? 2 : 1) && Math.min(...textureShape) > 0; + if (textureShape == null || isLongNarrowTex) { if (isPacked) { const batchDim = getBatchDim(logShape); let rows = 2, cols = 2; @@ -48069,13 +47725,15 @@ function getTextureShapeFromLogicalShape(logShape, isPacked = false) { [rows, cols] = getRowsCols(logShape); } size2 = batchDim * (rows / 2) * (cols / 2); - return util_exports.sizeToSquarishShape(size2).map((d) => d * 2); + textureShape = util_exports.sizeToSquarishShape(size2).map((d) => d * 2); + } else { + textureShape = util_exports.sizeToSquarishShape(size2); } - return util_exports.sizeToSquarishShape(size2); } + return textureShape; } -function isEven(n) { - return n % 2 === 0; +function isEven(n2) { + return n2 % 2 === 0; } function isReshapeFree(shape1, shape2) { shape1 = shape1.slice(-2); @@ -48148,8 +47806,8 @@ function isWebGLVersionEnabled(webGLVersion) { if (gl != null) { return true; } - } catch (e) { - console.log("Error when getting WebGL context: ", e); + } catch (e2) { + console.log("Error when getting WebGL context: ", e2); return false; } return false; @@ -48243,9 +47901,9 @@ function assertNotComplex2(tensor2, opName) { if (!Array.isArray(tensor2)) { tensor2 = [tensor2]; } - tensor2.forEach((t2) => { - if (t2 != null) { - util_exports.assert(t2.dtype !== "complex64", () => `${opName} does not support complex64 tensors in the WebGL backend.`); + tensor2.forEach((t22) => { + if (t22 != null) { + util_exports.assert(t22.dtype !== "complex64", () => `${opName} does not support complex64 tensors in the WebGL backend.`); } }); } @@ -48314,8 +47972,11 @@ ENV5.registerFlag("TOPK_LAST_DIM_CPU_HANDOFF_SIZE_THRESHOLD", () => 1e5); ENV5.registerFlag("TOPK_K_CPU_HANDOFF_THRESHOLD", () => 128); ENV5.registerFlag("WEBGL_EXP_CONV", () => false); ENV5.registerFlag("SOFTWARE_WEBGL_ENABLED", () => ENV5.getBool("IS_TEST")); +ENV5.registerFlag("WEBGL_MAX_SIZE_FOR_NARROW_TEXTURE", () => Infinity); +ENV5.registerFlag("WEBGL_AUTO_SQUARIFY_NARROW_TEXTURE_SHAPE", () => false); +ENV5.registerFlag("WEBGL2_ISNAN_CUSTOM", () => false); function getGlslDifferences() { - let version10; + let version9; let attribute; let varyingVs; let varyingFs; @@ -48326,14 +47987,14 @@ function getGlslDifferences() { let defineSpecialInf; let defineRound; if (env().getNumber("WEBGL_VERSION") === 2) { - version10 = "#version 300 es"; + version9 = "#version 300 es"; attribute = "in"; varyingVs = "out"; varyingFs = "in"; texture2D = "texture"; output = "outputColor"; defineOutput = "out vec4 outputColor;"; - defineSpecialNaN = ` + defineSpecialNaN = env().getBool("WEBGL2_ISNAN_CUSTOM") ? ` bool isnan_custom(float val) { uint floatToUint = floatBitsToUint(val); return (floatToUint & 0x7fffffffu) > 0x7f800000u; @@ -48345,7 +48006,7 @@ function getGlslDifferences() { } #define isnan(value) isnan_custom(value) - `; + ` : ""; defineSpecialInf = ``; defineRound = ` #define round(value) newRound(value) @@ -48358,7 +48019,7 @@ function getGlslDifferences() { } `; } else { - version10 = ""; + version9 = ""; attribute = "attribute"; varyingVs = "varying"; varyingFs = "varying"; @@ -48395,7 +48056,7 @@ function getGlslDifferences() { `; } return { - version: version10, + version: version9, attribute, varyingVs, varyingFs, @@ -48409,17 +48070,17 @@ function getGlslDifferences() { } function getLogicalCoordinatesFromFlatIndex(coords3, shape, index2 = "index") { const strides2 = util_exports.computeStrides(shape); - return strides2.map((stride, i) => { - const line1 = `int ${coords3[i]} = ${index2} / ${stride}`; - const line2 = i === strides2.length - 1 ? `int ${coords3[i + 1]} = ${index2} - ${coords3[i]} * ${stride}` : `index -= ${coords3[i]} * ${stride}`; + return strides2.map((stride, i2) => { + const line1 = `int ${coords3[i2]} = ${index2} / ${stride}`; + const line2 = i2 === strides2.length - 1 ? `int ${coords3[i2 + 1]} = ${index2} - ${coords3[i2]} * ${stride}` : `index -= ${coords3[i2]} * ${stride}`; return `${line1}; ${line2};`; }).join(""); } function getOutputLogicalCoordinatesFromFlatIndexByUniform(coords3, shape, index2 = "index") { const strides2 = util_exports.computeStrides(shape); - return strides2.map((_, i) => { - const line1 = `int ${coords3[i]} = ${index2} / outShapeStrides[${i}]`; - const line2 = i === strides2.length - 1 ? `int ${coords3[i + 1]} = ${index2} - ${coords3[i]} * outShapeStrides[${i}]` : `index -= ${coords3[i]} * outShapeStrides[${i}]`; + return strides2.map((_, i2) => { + const line1 = `int ${coords3[i2]} = ${index2} / outShapeStrides[${i2}]`; + const line2 = i2 === strides2.length - 1 ? `int ${coords3[i2 + 1]} = ${index2} - ${coords3[i2]} * outShapeStrides[${i2}]` : `index -= ${coords3[i2]} * outShapeStrides[${i2}]`; return `${line1}; ${line2};`; }).join(""); } @@ -48428,17 +48089,17 @@ function symbolicallyComputeStrides(indicesArr, variableName) { const shape = indicesArr.map((d) => `${variableName}[${d}]`); const strides2 = new Array(numCoords - 1); strides2[numCoords - 2] = shape[numCoords - 1]; - for (let i = numCoords - 3; i >= 0; --i) { - strides2[i] = `(${strides2[i + 1]} * ${shape[i + 1]})`; + for (let i2 = numCoords - 3; i2 >= 0; --i2) { + strides2[i2] = `(${strides2[i2 + 1]} * ${shape[i2 + 1]})`; } return strides2; } function getLogicalCoordinatesFromFlatIndexByUniform(coords3, variableName, index2 = "index") { - const indicesArray = coords3.map((_, i) => i); + const indicesArray = coords3.map((_, i2) => i2); const strides2 = symbolicallyComputeStrides(indicesArray, variableName); - return strides2.map((_, i) => { - const line1 = `int ${coords3[i]} = ${index2} / ${strides2[i]}`; - const line2 = i === strides2.length - 1 ? `int ${coords3[i + 1]} = ${index2} - ${coords3[i]} * ${strides2[i]}` : `index -= ${coords3[i]} * ${strides2[i]}`; + return strides2.map((_, i2) => { + const line1 = `int ${coords3[i2]} = ${index2} / ${strides2[i2]}`; + const line2 = i2 === strides2.length - 1 ? `int ${coords3[i2 + 1]} = ${index2} - ${coords3[i2]} * ${strides2[i2]}` : `index -= ${coords3[i2]} * ${strides2[i2]}`; return `${line1}; ${line2};`; }).join(""); } @@ -49609,7 +49270,7 @@ function getSampler3D(inputInfo, enableShapeUniforms) { // Explicitly use integer operations as dot() only works on floats. int stride0 = ${texName}Shape[1] * ${texName}Shape[2]; int stride1 = ${texName}Shape[2]; - int index = row * ${stride0} + col * ${stride1} + depth + ${offset}; + int index = row * stride0 + col * stride1 + depth + ${offset}; vec2 uv = uvFromFlat(${texName}TexShape[0], ${texName}TexShape[1], index); return sampleTexture(${texName}, uv); } @@ -49967,7 +49628,7 @@ function getPackedSamplerAtOutputCoords(inputInfo, outShapeInfo) { if (outRank < 2 && inRank > 0) { unpackedCoordsSnippet = "coords"; } else { - unpackedCoordsSnippet = inputInfo.shapeInfo.logicalShape.map((s, i) => `coords.${fields[i + rankDiff]}`).join(", "); + unpackedCoordsSnippet = inputInfo.shapeInfo.logicalShape.map((s2, i2) => `coords.${fields[i2 + rankDiff]}`).join(", "); } let output = `return outputValue;`; const inSize = util_exports.sizeFromShape(inputInfo.shapeInfo.logicalShape); @@ -50039,7 +49700,7 @@ function getSamplerAtOutputCoords(inputInfo, outShapeInfo) { if (outRank < 2 && inRank > 0) { unpackedCoordsSnippet = "coords"; } else { - unpackedCoordsSnippet = inputInfo.shapeInfo.logicalShape.map((s, i) => `coords.${fields[i + rankDiff]}`).join(", "); + unpackedCoordsSnippet = inputInfo.shapeInfo.logicalShape.map((s2, i2) => `coords.${fields[i2 + rankDiff]}`).join(", "); } return ` float ${funcName}() { @@ -50084,7 +49745,7 @@ function getSqueezedParams(params, keptDims) { return keptDims.map((d) => params[d]).join(", "); } function compileProgram(gpgpu, program, inputs, output) { - const inputInfos = inputs.map((input2, i) => { + const inputInfos = inputs.map((input2, i2) => { const shapeInfo = { logicalShape: input2.shape, texShape: input2.isUniform ? null : input2.texData.texShape, @@ -50095,7 +49756,7 @@ function compileProgram(gpgpu, program, inputs, output) { if (input2.texData != null && input2.texData.slice != null && input2.texData.slice.flatOffset > 0) { shapeInfo.flatOffset = input2.texData.slice.flatOffset; } - return { name: program.variableNames[i], shapeInfo }; + return { name: program.variableNames[i2], shapeInfo }; }); const inShapeInfos = inputInfos.map((x) => x.shapeInfo); const outShapeInfo = { @@ -50152,8 +49813,8 @@ function getUniformLocations(gpgpu, program, webGLProgram) { infLoc = gpgpu.getUniformLocation(webGLProgram, "INFINITY", false); } const shouldThrow = false; - for (let i = 0; i < program.variableNames.length; i++) { - const varName = program.variableNames[i]; + for (let i2 = 0; i2 < program.variableNames.length; i2++) { + const varName = program.variableNames[i2]; uniformLocations[varName] = gpgpu.getUniformLocation(webGLProgram, varName, shouldThrow); uniformLocations[`offset${varName}`] = gpgpu.getUniformLocation(webGLProgram, `offset${varName}`, shouldThrow); if (program.enableShapeUniforms) { @@ -50167,8 +49828,8 @@ function getUniformLocations(gpgpu, program, webGLProgram) { outTexShapeLocation = gpgpu.getUniformLocation(webGLProgram, "outTexShape", shouldThrow); } if (program.customUniforms) { - program.customUniforms.forEach((d, i) => { - customUniformLocations[i] = gpgpu.getUniformLocation(webGLProgram, d.name, shouldThrow); + program.customUniforms.forEach((d, i2) => { + customUniformLocations[i2] = gpgpu.getUniformLocation(webGLProgram, d.name, shouldThrow); }); } return { @@ -50187,17 +49848,17 @@ function validateBinaryAndProgram(shapeInfos, inputs) { if (shapeInfos.length !== inputs.length) { throw Error(`Binary was compiled with ${shapeInfos.length} inputs, but was executed with ${inputs.length} inputs`); } - shapeInfos.forEach((s, i) => { - const shapeA = s.logicalShape; - const input2 = inputs[i]; + shapeInfos.forEach((s2, i2) => { + const shapeA = s2.logicalShape; + const input2 = inputs[i2]; const shapeB = input2.shape; if (!util_exports.arraysEqual(shapeA, shapeB)) { throw Error(`Binary was compiled with different shapes than the current args. Shapes ${shapeA} and ${shapeB} must match`); } - if (s.isUniform && input2.isUniform) { + if (s2.isUniform && input2.isUniform) { return; } - const texShapeA = s.texShape; + const texShapeA = s2.texShape; const texShapeB = input2.isUniform ? null : input2.texData.texShape; if (!util_exports.arraysEqual(texShapeA, texShapeB)) { throw Error(`Binary was compiled with different texture shapes than the current args. Shape ${texShapeA} and ${texShapeB} must match`); @@ -50225,8 +49886,8 @@ function runProgram(gpgpu, binary, inputs, output, customUniformValues) { if (binary.nanLoc !== null) { gpgpu.gl.uniform1f(binary.nanLoc, NaN); } - inputs.forEach((input2, i) => { - const varName = binary.program.variableNames[i]; + inputs.forEach((input2, i2) => { + const varName = binary.program.variableNames[i2]; const varLoc = binary.uniformLocations[varName]; const varOffsetLoc = binary.uniformLocations[`offset${varName}`]; const varShapeLoc = binary.inShapesLocations[`${varName}Shape`]; @@ -50271,7 +49932,7 @@ function runProgram(gpgpu, binary, inputs, output, customUniformValues) { if (input2.texData.slice != null && varOffsetLoc != null) { gpgpu.gl.uniform1i(varOffsetLoc, input2.texData.slice.flatOffset); } - gpgpu.setInputMatrixTexture(input2.texData.texture.texture, varLoc, i); + gpgpu.setInputMatrixTexture(input2.texData.texture.texture, varLoc, i2); }); const outShapeLoc = binary.outShapeLocation; if (outShapeLoc) { @@ -50312,9 +49973,9 @@ function runProgram(gpgpu, binary, inputs, output, customUniformValues) { gpgpu.gl.uniform2i(binary.outTexShapeLocation, output.texData.texShape[0], output.texData.texShape[1]); } if (binary.program.customUniforms && customUniformValues) { - binary.program.customUniforms.forEach((d, i) => { - const customLoc = binary.customUniformLocations[i]; - const customValue = customUniformValues[i]; + binary.program.customUniforms.forEach((d, i2) => { + const customLoc = binary.customUniformLocations[i2]; + const customValue = customUniformValues[i2]; if (d.type === "float") { gpgpu.gl.uniform1fv(customLoc, customValue); } else if (d.type === "vec2") { @@ -51088,8 +50749,8 @@ var GPGPUContext = class { } pollItems() { const index2 = linearSearchLastTrue(this.itemsToPoll.map((x) => x.isDoneFn)); - for (let i = 0; i <= index2; ++i) { - const { resolveFn } = this.itemsToPoll[i]; + for (let i2 = 0; i2 <= index2; ++i2) { + const { resolveFn } = this.itemsToPoll[i2]; resolveFn(); } this.itemsToPoll = this.itemsToPoll.slice(index2 + 1); @@ -51099,10 +50760,14 @@ var GPGPUContext = class { if (this.itemsToPoll.length > 1) { return; } + let scheduleFn = void 0; + if ("setTimeoutCustom" in env().platform) { + scheduleFn = env().platform.setTimeoutCustom.bind(env().platform); + } util_exports.repeatedTry(() => { this.pollItems(); return this.itemsToPoll.length === 0; - }); + }, () => 0, null, scheduleFn); } bindTextureToFrameBuffer(texture) { this.throwIfDisposed(); @@ -51154,16 +50819,16 @@ var GPGPUContext = class { } }; function linearSearchLastTrue(arr) { - let i = 0; - for (; i < arr.length; ++i) { - const isDone = arr[i](); + let i2 = 0; + for (; i2 < arr.length; ++i2) { + const isDone = arr[i2](); if (!isDone) { break; } } - return i - 1; + return i2 - 1; } -var { addImpl: addImplCPU, bincountImpl: bincountImplCPU, bincountReduceImpl: bincountReduceImplCPU, castImpl: castImplCPU, ceilImpl: ceilImplCPU, concatImpl: concatImplCPU, equalImpl: equalImplCPU, expImpl: expImplCPU, expm1Impl: expm1ImplCPU, floorImpl: floorImplCPU, gatherNdImpl: gatherNdImplCPU, gatherV2Impl: gatherV2ImplCPU, greaterImpl: greaterImplCPU, greaterEqualImpl: greaterEqualImplCPU, lessImpl: lessImplCPU, lessEqualImpl: lessEqualImplCPU, linSpaceImpl: linSpaceImplCPU, logImpl: logImplCPU, maxImpl: maxImplCPU, maximumImpl: maximumImplCPU, minimumImpl: minimumImplCPU, multiplyImpl: multiplyImplCPU, negImpl: negImplCPU, notEqualImpl: notEqualImplCPU, prodImpl: prodImplCPU, raggedTensorToTensorImpl: raggedTensorToTensorImplCPU, rangeImpl: rangeImplCPU, rsqrtImpl: rsqrtImplCPU, scatterImpl: scatterImplCPU, sigmoidImpl: sigmoidImplCPU, simpleAbsImpl: simpleAbsImplCPU, sliceImpl: sliceImplCPU, sparseFillEmptyRowsImpl: sparseFillEmptyRowsImplCPU, sparseReshapeImpl: sparseReshapeImplCPU, sparseSegmentReductionImpl: sparseSegmentReductionImplCPU, sqrtImpl: sqrtImplCPU, stridedSliceImpl: stridedSliceImplCPU, stringNGramsImpl: stringNGramsImplCPU, stringSplitImpl: stringSplitImplCPU, stringToHashBucketFastImpl: stringToHashBucketFastImplCPU, subImpl: subImplCPU, tileImpl: tileImplCPU, topKImpl: topKImplCPU, transposeImpl: transposeImplCPU, uniqueImpl: uniqueImplCPU } = shared_exports; +var { addImpl: addImplCPU, bincountImpl: bincountImplCPU, bincountReduceImpl: bincountReduceImplCPU, castImpl: castImplCPU, ceilImpl: ceilImplCPU, concatImpl: concatImplCPU, equalImpl: equalImplCPU, expImpl: expImplCPU, expm1Impl: expm1ImplCPU, floorImpl: floorImplCPU, gatherNdImpl: gatherNdImplCPU, gatherV2Impl: gatherV2ImplCPU, greaterImpl: greaterImplCPU, greaterEqualImpl: greaterEqualImplCPU, lessImpl: lessImplCPU, lessEqualImpl: lessEqualImplCPU, linSpaceImpl: linSpaceImplCPU, logImpl: logImplCPU, maxImpl: maxImplCPU, maximumImpl: maximumImplCPU, minimumImpl: minimumImplCPU, multiplyImpl: multiplyImplCPU, negImpl: negImplCPU, notEqualImpl: notEqualImplCPU, prodImpl: prodImplCPU, raggedGatherImpl: raggedGatherImplCPU, raggedTensorToTensorImpl: raggedTensorToTensorImplCPU, rangeImpl: rangeImplCPU, rsqrtImpl: rsqrtImplCPU, scatterImpl: scatterImplCPU, sigmoidImpl: sigmoidImplCPU, simpleAbsImpl: simpleAbsImplCPU, sliceImpl: sliceImplCPU, sparseFillEmptyRowsImpl: sparseFillEmptyRowsImplCPU, sparseReshapeImpl: sparseReshapeImplCPU, sparseSegmentReductionImpl: sparseSegmentReductionImplCPU, sqrtImpl: sqrtImplCPU, stridedSliceImpl: stridedSliceImplCPU, stringNGramsImpl: stringNGramsImplCPU, stringSplitImpl: stringSplitImplCPU, stringToHashBucketFastImpl: stringToHashBucketFastImplCPU, subImpl: subImplCPU, tileImpl: tileImplCPU, topKImpl: topKImplCPU, transposeImpl: transposeImplCPU, uniqueImpl: uniqueImplCPU } = shared_exports; function getVecChannels(name, rank) { return ["x", "y", "z", "w", "u", "v"].slice(0, rank).map((d) => `${name}.${d}`); } @@ -51178,9 +50843,9 @@ function getSourceCoords(rank, dims) { return "rc"; } let coords3 = ""; - for (let i = 0; i < rank; i++) { - coords3 += dims[i]; - if (i < rank - 1) { + for (let i2 = 0; i2 < rank; i2++) { + coords3 += dims[i2]; + if (i2 < rank - 1) { coords3 += ","; } } @@ -51239,9 +50904,9 @@ var PackProgram = class { return `rc > ${this.enableShapeUniforms ? "outShape" : this.outputShape[0]}`; } let cond = ""; - for (let i = this.rank - 2; i < this.rank; i++) { - cond += `${dims[i]} >= ${this.enableShapeUniforms ? `outShape[${i}]` : this.outputShape[i]}`; - if (i < this.rank - 1) { + for (let i2 = this.rank - 2; i2 < this.rank; i2++) { + cond += `${dims[i2]} >= ${this.enableShapeUniforms ? `outShape[${i2}]` : this.outputShape[i2]}`; + if (i2 < this.rank - 1) { cond += "||"; } } @@ -51285,25 +50950,25 @@ var ReshapePackedProgram = class { this.outputShape = outputShape; this.enableShapeUniforms = useShapeUniforms(this.outputShape.length); let mainLoop = ``; - for (let i = 0; i < 4; i++) { + for (let i2 = 0; i2 < 4; i2++) { let thisRC = `thisRC = rc;`; - if (i % 2 === 1) { + if (i2 % 2 === 1) { thisRC += `thisRC.z += 1;`; } - if (i > 1) { + if (i2 > 1) { thisRC += `thisRC.y += 1;`; } mainLoop += ` ${thisRC} - ${i > 0 ? `if(thisRC.y < rows && thisRC.z < cols){` : ""} + ${i2 > 0 ? `if(thisRC.y < rows && thisRC.z < cols){` : ""} int flatIndex = getFlatIndex(thisRC); ivec3 inputRC = inputCoordsFromReshapedOutCoords(flatIndex); vec2 inputRCInnerDims = vec2(float(inputRC.y),float(inputRC.z)); - result[${i}] = + result[${i2}] = getChannel(getA(inputRC.x, inputRC.y, inputRC.z), inputRCInnerDims); - ${i > 0 ? "}" : ""} + ${i2 > 0 ? "}" : ""} `; } this.userCode = ` @@ -51880,24 +51545,24 @@ var MathBackendWebGL = class extends KernelBackend { const tmpData = this.texData.get(tmpTarget.dataId); return Object.assign({ tensorRef }, tmpData.texture); } - bufferSync(t2) { - const data = this.readSync(t2.dataId); - if (t2.dtype === "string") { + bufferSync(t22) { + const data = this.readSync(t22.dataId); + if (t22.dtype === "string") { try { const strings = data.map((d) => util_exports.decodeString(d)); - return buffer(t2.shape, t2.dtype, strings); + return buffer(t22.shape, t22.dtype, strings); } catch (_a) { throw new Error("Failed to decode encoded string bytes into utf-8"); } } - return buffer(t2.shape, t2.dtype, data); + return buffer(t22.shape, t22.dtype, data); } checkNumericalProblems(values) { if (values == null) { return; } - for (let i = 0; i < values.length; i++) { - const num = values[i]; + for (let i2 = 0; i2 < values.length; i2++) { + const num = values[i2]; if (!canBeRepresented(num)) { if (env().getBool("WEBGL_RENDER_FLOAT32_CAPABLE")) { throw Error(`The value ${num} cannot be represented with your current settings. Consider enabling float32 rendering: 'tf.env().set('WEBGL_RENDER_FLOAT32_ENABLED', true);'`); @@ -51956,7 +51621,7 @@ var MathBackendWebGL = class extends KernelBackend { if (env().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE") > 0) { const kernelMs = await Promise.all(flattenedActiveTimerQueries); res["kernelMs"] = util_exports.sum(kernelMs); - res["getExtraProfileInfo"] = () => kernelMs.map((d, i) => ({ name: flattenedActiveTimerNames[i], ms: d })).map((d) => `${d.name}: ${d.ms}`).join(", "); + res["getExtraProfileInfo"] = () => kernelMs.map((d, i2) => ({ name: flattenedActiveTimerNames[i2], ms: d })).map((d) => `${d.name}: ${d.ms}`).join(", "); } else { res["kernelMs"] = { error: "WebGL query timers are not supported in this environment." @@ -52436,15 +52101,15 @@ function float32ToTypedArray(a, dtype) { return a; } else if (dtype === "int32" || dtype === "bool") { const result = dtype === "int32" ? new Int32Array(a.length) : new Uint8Array(a.length); - for (let i = 0; i < result.length; ++i) { - result[i] = Math.round(a[i]); + for (let i2 = 0; i2 < result.length; ++i2) { + result[i2] = Math.round(a[i2]); } return result; } else { throw new Error(`Unknown dtype ${dtype}`); } } -var version6 = "3.20.0"; +var version6 = "3.21.0"; function forceHalfFloat() { env().set("WEBGL_FORCE_F16_TEXTURES", true); } @@ -52474,11 +52139,11 @@ var BinaryOpProgram = class { `; } }; -var CHECK_NAN_SNIPPET3 = ` - result.r = isNaN.r > 0. ? NAN : result.r; - result.g = isNaN.g > 0. ? NAN : result.g; - result.b = isNaN.b > 0. ? NAN : result.b; - result.a = isNaN.a > 0. ? NAN : result.a; +var CHECK_NAN_SNIPPET_PACKED = ` + result.r = isNaN.r ? NAN : result.r; + result.g = isNaN.g ? NAN : result.g; + result.b = isNaN.b ? NAN : result.b; + result.a = isNaN.a ? NAN : result.a; `; var BinaryOpPackedProgram = class { constructor(op2, aShape, bShape, checkOutOfBounds = false) { @@ -52622,16 +52287,6 @@ var preluConfig2 = { kernelFunc: prelu4 }; var CHECK_NAN_SNIPPET_UNARY = `if (isnan(x)) return x;`; -var CHECK_NAN_SNIPPET_BINARY = ` - if (isnan(a)) return a; - if (isnan(b)) return b; -`; -var CHECK_NAN_SNIPPET_BINARY_PACKED = ` - result.r = isNaN.r > 0. ? NAN : result.r; - result.g = isNaN.g > 0. ? NAN : result.g; - result.b = isNaN.b > 0. ? NAN : result.b; - result.a = isNaN.a > 0. ? NAN : result.a; -`; function unaryKernelFunc2({ opSnippet, packedOpSnippet, cpuKernelImpl, dtype }) { return ({ inputs, backend: backend2 }) => { const { x } = inputs; @@ -53178,12 +52833,12 @@ function getReductionStages(inShape) { function reduce(x, dtype, reductionType, backend2) { const reductionStages = getReductionStages(x.shape); let result = x; - for (let i = 0; i < reductionStages.length; i++) { - const { inSize, windowSize, outSize } = reductionStages[i]; + for (let i2 = 0; i2 < reductionStages.length; i2++) { + const { inSize, windowSize, outSize } = reductionStages[i2]; let program; let previousResult; if (reductionType === "mean") { - program = i === 0 ? new MeanProgram({ windowSize, inSize, batchSize: x.shape[0], outSize }, inSize) : new MeanProgram({ windowSize, inSize, batchSize: x.shape[0], outSize }); + program = i2 === 0 ? new MeanProgram({ windowSize, inSize, batchSize: x.shape[0], outSize }, inSize) : new MeanProgram({ windowSize, inSize, batchSize: x.shape[0], outSize }); } else { program = new ReduceProgram({ windowSize, inSize, batchSize: x.shape[0], outSize }, reductionType); } @@ -53199,8 +52854,8 @@ var TransposeProgram = class { constructor(aShape, newDim) { this.variableNames = ["A"]; const outputShape = new Array(aShape.length); - for (let i = 0; i < outputShape.length; i++) { - outputShape[i] = aShape[newDim[i]]; + for (let i2 = 0; i2 < outputShape.length; i2++) { + outputShape[i2] = aShape[newDim[i2]]; } this.outputShape = outputShape; this.rank = outputShape.length; @@ -53221,8 +52876,8 @@ function getSwitchedCoords(newDim) { } const originalOrder = ["resRC.x", "resRC.y", "resRC.z", "resRC.w", "resRC.u", "resRC.v"]; const switchedCoords = new Array(rank); - for (let i = 0; i < newDim.length; i++) { - switchedCoords[newDim[i]] = originalOrder[i]; + for (let i2 = 0; i2 < newDim.length; i2++) { + switchedCoords[newDim[i2]] = originalOrder[i2]; } return switchedCoords.join(); } @@ -53232,8 +52887,8 @@ var TransposePackedProgram = class { this.packedInputs = true; this.packedOutput = true; const outputShape = new Array(aShape.length); - for (let i = 0; i < outputShape.length; i++) { - outputShape[i] = aShape[newDim[i]]; + for (let i2 = 0; i2 < outputShape.length; i2++) { + outputShape[i2] = aShape[newDim[i2]]; } this.outputShape = outputShape; this.rank = outputShape.length; @@ -53243,8 +52898,8 @@ var TransposePackedProgram = class { const dtype = getCoordsDataType(this.rank); const outputOrder = getVecChannels("rc", this.rank); const switchedOrder = new Array(this.rank); - for (let i = 0; i < newDim.length; i++) { - switchedOrder[newDim[i]] = outputOrder[i]; + for (let i2 = 0; i2 < newDim.length; i2++) { + switchedOrder[newDim[i2]] = outputOrder[i2]; } const innerDims = `vec2(${switchedOrder.slice(-2).join()})`; const nextColumn = `++${outputOrder[this.rank - 1]} < ${outputShape[this.rank - 1]}`; @@ -53323,8 +52978,8 @@ function transpose3(args) { const webglBackend = backend2; const xRank = x.shape.length; const newShape = new Array(xRank); - for (let i = 0; i < newShape.length; i++) { - newShape[i] = x.shape[perm[i]]; + for (let i2 = 0; i2 < newShape.length; i2++) { + newShape[i2] = x.shape[perm[i2]]; } let out; if (webglBackend.shouldExecuteOnCPU([x])) { @@ -53426,8 +53081,8 @@ function batchMatMulImpl({ a, b, transposeA, transposeB, backend: backend2, bias } const outReshaped = reshape4({ inputs: { x: out }, backend: backend2, attrs: { shape: outShape } }); intermediates.push(out); - for (const i of intermediates) { - backend2.disposeIntermediateTensorInfo(i); + for (const i2 of intermediates) { + backend2.disposeIntermediateTensorInfo(i2); } return outReshaped; } @@ -53511,7 +53166,7 @@ var AddNProgram = class { constructor(outputShape, shapes) { this.outputShape = []; this.outputShape = outputShape; - this.variableNames = shapes.map((_, i) => `T${i}`); + this.variableNames = shapes.map((_, i2) => `T${i2}`); const snippets = []; this.variableNames.forEach((variable2) => { snippets.push(`float v${variable2} = get${variable2}AtOutCoords();`); @@ -53535,7 +53190,7 @@ var AddNPackedProgram = class { this.packedInputs = true; this.packedOutput = true; this.outputShape = outputShape; - this.variableNames = shapes.map((_, i) => `T${i}`); + this.variableNames = shapes.map((_, i2) => `T${i2}`); const snippets = []; this.variableNames.forEach((variable2) => { snippets.push(`vec4 v${variable2} = get${variable2}AtOutCoords();`); @@ -53565,8 +53220,8 @@ function addN3(args) { const rightSide = addN3({ inputs: tensors.slice(midIndex), backend: backend2 }); return addN3({ inputs: [leftSide, rightSide], backend: backend2 }); } - const dtype = tensors.map((t2) => t2.dtype).reduce((d1, d2) => upcastType(d1, d2)); - const shapes = tensors.map((t2) => t2.shape); + const dtype = tensors.map((t22) => t22.dtype).reduce((d1, d2) => upcastType(d1, d2)); + const shapes = tensors.map((t22) => t22.shape); const usePackedOp = env().getBool("WEBGL_PACK"); const program = usePackedOp ? new AddNPackedProgram(tensors[0].shape, shapes) : new AddNProgram(tensors[0].shape, shapes); return backend2.runWebGLProgram(program, tensors, dtype); @@ -53843,7 +53498,7 @@ function argMinMaxReduce(backend2, x, axis, reduceType) { const reduced = argReduce(backend2, a2D, reduceType); intermediateTensorInfos.push(reduced); const reshaped = reshape4({ inputs: { x: reduced }, backend: backend2, attrs: { shape: outShape } }); - intermediateTensorInfos.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2)); + intermediateTensorInfos.forEach((t22) => backend2.disposeIntermediateTensorInfo(t22)); return reshaped; } return argReducePacked(backend2, x, reduceType); @@ -53863,7 +53518,7 @@ function argMax3(args) { } backend_util_exports.assertAxesAreInnerMostDims("argMax", [axes[0]], $x.shape.length); const out = argMinMaxReduce(backend2, $x, axes[0], "max"); - intermediateTensorInfos.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2)); + intermediateTensorInfos.forEach((t22) => backend2.disposeIntermediateTensorInfo(t22)); return out; } var argMaxConfig2 = { @@ -53886,7 +53541,7 @@ function argMin3(args) { } backend_util_exports.assertAxesAreInnerMostDims("argMin", [axes[0]], $x.shape.length); const out = argMinMaxReduce(backend2, $x, axes[0], "min"); - intermediateTensorInfos.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2)); + intermediateTensorInfos.forEach((t22) => backend2.disposeIntermediateTensorInfo(t22)); return out; } var argMinConfig2 = { @@ -53922,13 +53577,15 @@ var atanConfig2 = { backendName: "webgl", kernelFunc: atan4 }; -var ATAN2 = CHECK_NAN_SNIPPET_BINARY + ` +var ATAN2 = CHECK_NAN_SNIPPET2 + ` return atan(a, b); `; var ATAN2_PACKED = ` vec4 result = atan(a, b); - vec4 isNaN = min(vec4(isnan(a)) + vec4(isnan(b)), vec4(1.0)); - ` + CHECK_NAN_SNIPPET_BINARY_PACKED + ` + bvec4 isNaNA = isnan(a); + bvec4 isNaNB = isnan(b); + bvec4 isNaN = bvec4(isNaNA.x || isNaNB.x, isNaNA.y || isNaNB.y, isNaNA.z || isNaNB.z, isNaNA.w || isNaNB.w); + ` + CHECK_NAN_SNIPPET_PACKED + ` return result; `; var atan23 = binaryKernelFunc2({ opSnippet: ATAN2, packedOpSnippet: ATAN2_PACKED }); @@ -54649,8 +54306,8 @@ var SliceProgram = class { this.customUniforms = [{ name: "start", arrayIndex: this.rank, type: "int" }]; const sourceCoords = getCoords(this.rank); let body4; - const coordSum = destSize.map((_, i) => { - return `sourceLoc.${coords[i]} = start[${i}] + coords.${coords[i]};`; + const coordSum = destSize.map((_, i2) => { + return `sourceLoc.${coords[i2]} = start[${i2}] + coords.${coords[i2]};`; }); body4 = ` ${dtype} sourceLoc; @@ -54708,7 +54365,7 @@ var SlicePackedProgram = class { } `; const sourceLocSetup = this.rank <= 4 ? `sourceLoc = coords + - ${dtype}(${destSize.map((_, i) => `start[${i}]`).join()});` : destSize.map((_, i) => `${sourceLoc[i]} = ${coords3[i]} + start[${i}];`).join("\n"); + ${dtype}(${destSize.map((_, i2) => `start[${i2}]`).join()});` : destSize.map((_, i2) => `${sourceLoc[i2]} = ${coords3[i2]} + start[${i2}];`).join("\n"); this.userCode = ` void main() { ${dtype} coords = getOutputCoords(); @@ -54724,8 +54381,8 @@ var SlicePackedProgram = class { }; function shallowSlice(x, begin, size2, backend2) { const xTexData = backend2.texData.get(x.dataId); - const t2 = backend2.makeTensorInfo(size2, x.dtype); - const newTexData = backend2.texData.get(t2.dataId); + const t22 = backend2.makeTensorInfo(size2, x.dtype); + const newTexData = backend2.texData.get(t22.dataId); Object.assign(newTexData, xTexData); newTexData.refCount = 1; newTexData.shape = size2; @@ -54740,7 +54397,7 @@ function shallowSlice(x, begin, size2, backend2) { }; const refCount = backend2.dataRefCount.get(newTexData.slice.origDataId) || 1; backend2.dataRefCount.set(newTexData.slice.origDataId, refCount + 1); - return t2; + return t22; } function slice3(args) { const { inputs, backend: backend2, attrs } = args; @@ -54798,7 +54455,7 @@ var batchToSpaceND3 = (args) => { toDispose.push(reshapedIntermediate); toDispose.push(transposedIntermediate); toDispose.push(reshapedIntermediate2); - toDispose.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2)); + toDispose.forEach((t22) => backend2.disposeIntermediateTensorInfo(t22)); return sliced; }; var batchToSpaceNDConfig2 = { @@ -55022,16 +54679,16 @@ var ConcatProgram = class { constructor(shapes) { this.outputShape = []; this.outputShape = backend_util_exports.computeOutShape(shapes, 1); - this.variableNames = shapes.map((_, i) => `T${i}`); + this.variableNames = shapes.map((_, i2) => `T${i2}`); const offsets = new Array(shapes.length - 1); offsets[0] = shapes[0][1]; - for (let i = 1; i < offsets.length; i++) { - offsets[i] = offsets[i - 1] + shapes[i][1]; + for (let i2 = 1; i2 < offsets.length; i2++) { + offsets[i2] = offsets[i2 - 1] + shapes[i2][1]; } const snippets = [`if (yC < ${offsets[0]}) setOutput(getT0(yR, yC));`]; - for (let i = 1; i < offsets.length; i++) { - const shift = offsets[i - 1]; - snippets.push(`else if (yC < ${offsets[i]}) setOutput(getT${i}(yR, yC-${shift}));`); + for (let i2 = 1; i2 < offsets.length; i2++) { + const shift = offsets[i2 - 1]; + snippets.push(`else if (yC < ${offsets[i2]}) setOutput(getT${i2}(yR, yC-${shift}));`); } const lastIndex = offsets.length; const lastShift = offsets[offsets.length - 1]; @@ -55058,11 +54715,11 @@ var ConcatPackedProgram = class { const dtype = getCoordsDataType(rank); const coords3 = getChannels("coords", rank); const channels = ["x", "y", "z", "w", "u", "v"].slice(0, rank); - this.variableNames = shapes.map((_, i) => `T${i}`); + this.variableNames = shapes.map((_, i2) => `T${i2}`); const offsets = new Array(shapes.length - 1); offsets[0] = shapes[0][axis]; - for (let i = 1; i < offsets.length; i++) { - offsets[i] = offsets[i - 1] + shapes[i][axis]; + for (let i2 = 1; i2 < offsets.length; i2++) { + offsets[i2] = offsets[i2 - 1] + shapes[i2][axis]; } const channel = channels[axis]; const lastChannels = channels.slice(-2); @@ -55071,12 +54728,12 @@ var ConcatPackedProgram = class { return getChannel( getT0(${allChannels}), vec2(${lastChannels.join()})); }`; - for (let i = 1; i < offsets.length; i++) { - const shift2 = offsets[i - 1]; + for (let i2 = 1; i2 < offsets.length; i2++) { + const shift2 = offsets[i2 - 1]; getValueSnippet += ` - if (${channel} < ${offsets[i]} && ${channel} >= ${offsets[i - 1]}) { + if (${channel} < ${offsets[i2]} && ${channel} >= ${offsets[i2 - 1]}) { return getChannel( - getT${i}(${shiftedChannels(channels, channel, shift2)}), + getT${i2}(${shiftedChannels(channels, channel, shift2)}), vec2(${shiftedChannels(lastChannels, channel, shift2)})); }`; } @@ -55140,13 +54797,13 @@ var imagConfig2 = { function concatImpl2(inputs, axis, backend2) { const dtype = inputs[0].dtype; if (dtype === "complex64") { - const reals = inputs.map((t2) => real3({ inputs: { input: t2 }, backend: backend2 })); - const imags = inputs.map((t2) => imag3({ inputs: { input: t2 }, backend: backend2 })); + const reals = inputs.map((t22) => real3({ inputs: { input: t22 }, backend: backend2 })); + const imags = inputs.map((t22) => imag3({ inputs: { input: t22 }, backend: backend2 })); const realConcated = concatImpl2(reals, axis, backend2); const imagConcated = concatImpl2(imags, axis, backend2); const result2 = complex3({ inputs: { real: realConcated, imag: imagConcated }, backend: backend2 }); - reals.forEach((r) => backend2.disposeIntermediateTensorInfo(r)); - imags.forEach((i) => backend2.disposeIntermediateTensorInfo(i)); + reals.forEach((r2) => backend2.disposeIntermediateTensorInfo(r2)); + imags.forEach((i2) => backend2.disposeIntermediateTensorInfo(i2)); backend2.disposeIntermediateTensorInfo(realConcated); backend2.disposeIntermediateTensorInfo(imagConcated); return result2; @@ -55156,49 +54813,49 @@ function concatImpl2(inputs, axis, backend2) { runOnCpu = true; } if (runOnCpu) { - const tensors2D2 = inputs.map((t2) => { - const innerSize = util_exports.sizeFromShape(t2.shape.slice(axis)); + const tensors2D2 = inputs.map((t22) => { + const innerSize = util_exports.sizeFromShape(t22.shape.slice(axis)); const shape = [-1, innerSize]; - return reshape4({ inputs: { x: t2 }, backend: backend2, attrs: { shape } }); + return reshape4({ inputs: { x: t22 }, backend: backend2, attrs: { shape } }); }); - const inputsValShapes = tensors2D2.map((t2) => { - return { vals: backend2.readSync(t2.dataId), shape: t2.shape }; + const inputsValShapes = tensors2D2.map((t22) => { + return { vals: backend2.readSync(t22.dataId), shape: t22.shape }; }); - const outShape2 = backend_util_exports.computeOutShape(tensors2D2.map((t2) => t2.shape), 1); + const outShape2 = backend_util_exports.computeOutShape(tensors2D2.map((t22) => t22.shape), 1); const simplyConcat = tensors2D2[0].shape[0] === 1; const outVals = concatImplCPU(inputsValShapes, outShape2, dtype, simplyConcat); - const finalOutShape = backend_util_exports.computeOutShape(inputs.map((t2) => t2.shape), axis); + const finalOutShape = backend_util_exports.computeOutShape(inputs.map((t22) => t22.shape), axis); const outInfo = backend2.makeTensorInfo(finalOutShape, dtype, outVals); - tensors2D2.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2)); + tensors2D2.forEach((t22) => backend2.disposeIntermediateTensorInfo(t22)); return outInfo; } const maxTexturesInShader = env().getNumber("WEBGL_MAX_TEXTURES_IN_SHADER"); if (inputs.length > maxTexturesInShader) { const reducedInputs = []; - for (let i = 0; i < inputs.length; i += maxTexturesInShader) { - const subArray = inputs.slice(i, i + maxTexturesInShader); + for (let i2 = 0; i2 < inputs.length; i2 += maxTexturesInShader) { + const subArray = inputs.slice(i2, i2 + maxTexturesInShader); reducedInputs.push(concatImpl2(subArray, axis, backend2)); } const result2 = concatImpl2(reducedInputs, axis, backend2); - for (const i of reducedInputs) { - backend2.disposeIntermediateTensorInfo(i); + for (const i2 of reducedInputs) { + backend2.disposeIntermediateTensorInfo(i2); } return result2; } if (env().getBool("WEBGL_PACK_ARRAY_OPERATIONS") && inputs[0].shape.length > 1) { - const program2 = new ConcatPackedProgram(inputs.map((t2) => t2.shape), axis); + const program2 = new ConcatPackedProgram(inputs.map((t22) => t22.shape), axis); return backend2.runWebGLProgram(program2, inputs, dtype); } const { tensors2D, outShape } = computeTensors2D(inputs, axis, backend2); - const program = new ConcatProgram(tensors2D.map((t2) => t2.shape)); + const program = new ConcatProgram(tensors2D.map((t22) => t22.shape)); const result = backend2.runWebGLProgram(program, tensors2D, dtype); - tensors2D.forEach((r) => backend2.disposeIntermediateTensorInfo(r)); + tensors2D.forEach((r2) => backend2.disposeIntermediateTensorInfo(r2)); const reshapedResult = reshape4({ inputs: { x: result }, attrs: { shape: outShape }, backend: backend2 }); backend2.disposeIntermediateTensorInfo(result); return reshapedResult; } function computeTensors2D(inputs, axis, backend2) { - const outShape = backend_util_exports.computeOutShape(inputs.map((t2) => t2.shape), axis); + const outShape = backend_util_exports.computeOutShape(inputs.map((t22) => t22.shape), axis); const tensors2D = inputs.map((x) => reshape4({ inputs: { x }, attrs: { shape: [-1, util_exports.sizeFromShape(x.shape.slice(axis))] }, @@ -55210,16 +54867,16 @@ function concat3(args) { const { inputs, backend: backend2, attrs } = args; const { axis } = attrs; const $axis = util_exports.parseAxisParam(axis, inputs[0].shape)[0]; - const outShape = backend_util_exports.computeOutShape(inputs.map((t2) => t2.shape), $axis); + const shapes = inputs.map((t22) => t22.shape); + backend_util_exports.assertParamsConsistent(shapes, $axis); + const outShape = backend_util_exports.computeOutShape(inputs.map((t22) => t22.shape), $axis); if (util_exports.sizeFromShape(outShape) === 0) { return backend2.makeTensorInfo(outShape, inputs[0].dtype, []); } - const $inputs = inputs.filter((t2) => util_exports.sizeFromShape(t2.shape) > 0); + const $inputs = inputs.filter((t22) => util_exports.sizeFromShape(t22.shape) > 0); if ($inputs.length === 1) { return identity3({ inputs: { x: $inputs[0] }, backend: backend2 }); } - const shapes = $inputs.map((t2) => t2.shape); - backend_util_exports.assertParamsConsistent(shapes, $axis); return concatImpl2($inputs, $axis, backend2); } var concatConfig2 = { @@ -56010,8 +55667,8 @@ function conv2dByMatMul({ x, filter, convInfo, backend: backend2, bias = null, p intermediates.push(filterReshaped); intermediates.push(result); } - for (const i of intermediates) { - backend2.disposeIntermediateTensorInfo(i); + for (const i2 of intermediates) { + backend2.disposeIntermediateTensorInfo(i2); } return out; } @@ -56082,8 +55739,8 @@ function conv2dWithIm2Row({ x, filter, convInfo, backend: backend2, bias = null, const product = backend2.runWebGLProgram(matmulProgram, inputs, "float32"); const out = reshape4({ inputs: { x: product }, backend: backend2, attrs: { shape: convInfo.outShape } }); intermediates.push(product); - for (const i of intermediates) { - backend2.disposeIntermediateTensorInfo(i); + for (const i2 of intermediates) { + backend2.disposeIntermediateTensorInfo(i2); } return out; } @@ -56641,9 +56298,9 @@ function cumImpl(op2, x, backend2, axis, exclusive, reverse5) { } const size2 = permutedX.shape[permutedAxis]; let result = identity3({ inputs: { x: permutedX }, backend: backend2 }); - for (let i = 0; i <= Math.ceil(Math.log2(size2)) - 1; i++) { + for (let i2 = 0; i2 <= Math.ceil(Math.log2(size2)) - 1; i2++) { const program = new CumProgram(op2, permutedX.shape, false, reverse5); - const customValues = [[i]]; + const customValues = [[i2]]; const prevResult = result; result = backend2.runWebGLProgram(program, [result], result.dtype, customValues); backend2.disposeIntermediateTensorInfo(prevResult); @@ -57448,8 +57105,8 @@ function einsum3(args) { let out = null; let numDimsRemaining = allDims.length; const tensorsToDispose = []; - for (let i = 0; i < nSteps; ++i) { - for (const idTerm of steps[i]) { + for (let i2 = 0; i2 < nSteps; ++i2) { + for (const idTerm of steps[i2]) { const { permutationIndices: perm, expandDims: dimsToExpand } = backend_util_exports.getEinsumPermutation(numDimsRemaining, idDims[idTerm]); let x; if (backend_util_exports.isIdentityPermutation(perm)) { @@ -57473,13 +57130,13 @@ function einsum3(args) { tensorsToDispose.push(out); } } - if (i < nSteps - 1) { - if (path[i] >= 0) { + if (i2 < nSteps - 1) { + if (path[i2] >= 0) { out = sum4({ inputs: { x: out }, backend: backend2, attrs: { - axis: path[i] - (allDims.length - numDimsRemaining), + axis: path[i2] - (allDims.length - numDimsRemaining), keepDims: false } }); @@ -58020,7 +57677,7 @@ function fusedConv2d(args) { } const outReshaped = reshape4({ inputs: { x: out }, backend: backend2, attrs: { shape: convInfo.outShape } }); intermediates.push(out); - intermediates.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2)); + intermediates.forEach((t22) => backend2.disposeIntermediateTensorInfo(t22)); return outReshaped; } var fusedConv2DConfig2 = { @@ -58069,7 +57726,7 @@ function fusedDepthwiseConv2D2(args) { [convInfo.inHeight, convInfo.inWidth] ]; const result = backend2.runWebGLProgram(program, programInputs, "float32", customValues); - intermediates.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2)); + intermediates.forEach((t22) => backend2.disposeIntermediateTensorInfo(t22)); return result; } var fusedDepthwiseConv2DConfig2 = { @@ -58084,24 +57741,24 @@ var GatherNDProgram = class { this.paramsShape = paramsShape; this.variableNames = ["x", "indices"]; this.outputShape = shape; - const stridesType = getCoordsDataType(strides2.length); const dtype = getCoordsDataType(shape.length); - const strideString = this.sliceDim > 1 ? "strides[j]" : "strides"; - const paramsShapeType = getCoordsDataType(paramsShape.length); - const paramsShapeString = paramsShape.length > 1 ? "paramsShape[j]" : "paramsShape"; + let mainLoop = ` + int index;`; + for (let j = 0; j < this.sliceDim; j++) { + mainLoop += ` + index = round(getIndices(coords[0], ${j})); + out_of_bounds = out_of_bounds || index < 0; + out_of_bounds = out_of_bounds || index >= ${this.paramsShape[j]}; + flattenIndex += index * ${this.strides[j]};`; + } this.userCode = ` - ${stridesType} strides = ${stridesType}(${this.strides}); - ${paramsShapeType} paramsShape = ${paramsShapeType}(${this.paramsShape}); void main() { ${dtype} coords = getOutputCoords(); int flattenIndex = 0; bool out_of_bounds = false; - for (int j = 0; j < ${this.sliceDim}; j++) { - int index = round(getIndices(coords[0], j)); - out_of_bounds = out_of_bounds || index < 0; - out_of_bounds = out_of_bounds || index >= ${paramsShapeString}; - flattenIndex += index * ${strideString}; - } + + ${mainLoop} + setOutput(out_of_bounds ? 0.0 : getX(flattenIndex, coords[1])); } `; @@ -58159,11 +57816,11 @@ var GatherProgram = class { function getSourceCoords2(aShape, axis) { const currentCoords = ["resRC.x", "resRC.y", "resRC.z", "resRC.w"]; const sourceCoords = []; - for (let i = 0; i < aShape.length; i++) { - if (i === 2) { + for (let i2 = 0; i2 < aShape.length; i2++) { + if (i2 === 2) { sourceCoords.push("index"); } else { - sourceCoords.push(`${currentCoords[i]}`); + sourceCoords.push(`${currentCoords[i2]}`); } } return sourceCoords.join(); @@ -58176,8 +57833,8 @@ function gatherV22(args) { if (env().get("DEBUG")) { const indicesVals = backend2.readSync(indices.dataId); const axisDim = x.shape[parsedAxis]; - for (let i = 0; i < indicesVals.length; ++i) { - const index2 = indicesVals[i]; + for (let i2 = 0; i2 < indicesVals.length; ++i2) { + const index2 = indicesVals[i2]; util_exports.assert(index2 <= axisDim - 1 && index2 >= 0, () => `GatherV2: the index value ${index2} is not in [0, ${axisDim - 1}]`); } } @@ -58213,14 +57870,14 @@ function gatherV22(args) { const indicesBuf = backend2.bufferSync(flattenIndex); const xBuf = backend2.bufferSync(flattenX); const outBuf = gatherV2ImplCPU(xBuf, indicesBuf, flattenOutputShape); - toDispose.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2)); + toDispose.forEach((t22) => backend2.disposeIntermediateTensorInfo(t22)); return backend2.makeTensorInfo(shapeInfo.outputShape, outBuf.dtype, outBuf.values); } const program = new GatherProgram(flattenX.shape, flattenOutputShape); const res = backend2.runWebGLProgram(program, [flattenX, flattenIndex], flattenX.dtype); toDispose.push(res); const reshaped = reshape4({ inputs: { x: res }, backend: backend2, attrs: { shape: shapeInfo.outputShape } }); - toDispose.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2)); + toDispose.forEach((t22) => backend2.disposeIntermediateTensorInfo(t22)); return reshaped; } var gatherV2Config2 = { @@ -58633,8 +58290,8 @@ function max4(args) { const xTexData = backend2.texData.get(maxInput.dataId); const values = xTexData.values; const newShape = new Array(xRank); - for (let i = 0; i < newShape.length; i++) { - newShape[i] = x.shape[permutedAxes[i]]; + for (let i2 = 0; i2 < newShape.length; i2++) { + newShape[i2] = x.shape[permutedAxes[i2]]; } const maxInputValues = transposeImplCPU(values, x.shape, x.dtype, permutedAxes, newShape); maxInput = backend2.makeTensorInfo(newShape, x.dtype); @@ -58677,8 +58334,10 @@ var MAXIMUM = CHECK_NAN_SNIPPET2 + ` `; var MAXIMUM_PACKED = ` vec4 result = vec4(max(a, b)); - vec4 isNaN = min(vec4(isnan(a)) + vec4(isnan(b)), vec4(1.0)); - ` + CHECK_NAN_SNIPPET3 + ` + bvec4 isNaNA = isnan(a); + bvec4 isNaNB = isnan(b); + bvec4 isNaN = bvec4(isNaNA.x || isNaNB.x, isNaNA.y || isNaNB.y, isNaNA.z || isNaNB.z, isNaNA.w || isNaNB.w); + ` + CHECK_NAN_SNIPPET_PACKED + ` return result; `; var maximum4 = binaryKernelFunc2({ @@ -58961,8 +58620,8 @@ var meanConfig2 = { const xTexData = webglBackend.texData.get(meanInput.dataId); const values = xTexData.values; const newShape = new Array(xRank); - for (let i = 0; i < newShape.length; i++) { - newShape[i] = x.shape[permutedAxes[i]]; + for (let i2 = 0; i2 < newShape.length; i2++) { + newShape[i2] = x.shape[permutedAxes[i2]]; } const meanInputValues = transposeImplCPU(values, x.shape, x.dtype, permutedAxes, newShape); meanInput = webglBackend.makeTensorInfo(newShape, x.dtype); @@ -58981,8 +58640,8 @@ var meanConfig2 = { outShape = backend_util_exports.expandShapeToKeepDim(meanOutShape, origAxes); } const out = meanImpl(meanInput, reduceShape, outShape, webglBackend); - for (const i of intermediates) { - webglBackend.disposeIntermediateTensorInfo(i); + for (const i2 of intermediates) { + webglBackend.disposeIntermediateTensorInfo(i2); } return out; } @@ -59029,8 +58688,10 @@ var MINIMUM = CHECK_NAN_SNIPPET2 + ` `; var MINIMUM_PACKED = ` vec4 result = vec4(min(a, b)); - vec4 isNaN = min(vec4(isnan(a)) + vec4(isnan(b)), vec4(1.0)); - ` + CHECK_NAN_SNIPPET3 + ` + bvec4 isNaNA = isnan(a); + bvec4 isNaNB = isnan(b); + bvec4 isNaN = bvec4(isNaNA.x || isNaNB.x, isNaNA.y || isNaNB.y, isNaNA.z || isNaNB.z, isNaNA.w || isNaNB.w); + ` + CHECK_NAN_SNIPPET_PACKED + ` return result; `; var minimum4 = binaryKernelFunc2({ @@ -59046,11 +58707,11 @@ var minimumConfig2 = { var MirrorPadProgram = class { constructor(xShape, paddings, mode) { this.variableNames = ["x"]; - this.outputShape = paddings.map((p2, i) => p2[0] + xShape[i] + p2[1]); + this.outputShape = paddings.map((p2, i2) => p2[0] + xShape[i2] + p2[1]); const rank = xShape.length; const dtype = getCoordsDataType(rank); const start = paddings.map((p2) => p2[0]).join(","); - const end = paddings.map((p2, i) => p2[0] + xShape[i]).join(","); + const end = paddings.map((p2, i2) => p2[0] + xShape[i2]).join(","); const unpackedCoords = ["coords[0]", "coords[1]", "coords[2]", "coords[3]"].slice(0, rank); const offset = mode === "reflect" ? 0 : 1; if (rank === 1) { @@ -59094,11 +58755,11 @@ var MirrorPadPackedProgram = class { this.variableNames = ["x"]; this.packedInputs = true; this.packedOutput = true; - this.outputShape = paddings.map((p2, i) => p2[0] + xShape[i] + p2[1]); + this.outputShape = paddings.map((p2, i2) => p2[0] + xShape[i2] + p2[1]); const rank = xShape.length; const dtype = getCoordsDataType(rank); const start = paddings.map((p2) => p2[0]).join(","); - const end = paddings.map((p2, i) => p2[0] + xShape[i]).join(","); + const end = paddings.map((p2, i2) => p2[0] + xShape[i2]).join(","); const coords3 = getChannels("rc", rank); const source = getChannels("source", rank); const cLimit = `${coords3[rank - 1]} < ${this.outputShape[rank - 1]}`; @@ -59187,8 +58848,8 @@ var MOD = `if (b == 0.0) return NAN; return mod(a, b);`; var MOD_PACKED = ` vec4 result = mod(a, b); - vec4 isNaN = vec4(equal(b, vec4(0.0))); - ` + CHECK_NAN_SNIPPET3 + ` + bvec4 isNaN = equal(b, vec4(0.0)); + ` + CHECK_NAN_SNIPPET_PACKED + ` return result; `; var mod3 = binaryKernelFunc2({ @@ -59451,14 +59112,14 @@ function zerosLike3(args) { const { x } = inputs; if (x.dtype === "complex64") { const realPart = real3({ inputs: { input: x }, backend: backend2 }); - const r = zerosLike3({ inputs: { x: realPart }, backend: backend2 }); + const r2 = zerosLike3({ inputs: { x: realPart }, backend: backend2 }); const imagPart = imag3({ inputs: { input: x }, backend: backend2 }); - const i = zerosLike3({ inputs: { x: imagPart }, backend: backend2 }); - const result = complex3({ inputs: { real: r, imag: i }, backend: backend2 }); + const i2 = zerosLike3({ inputs: { x: imagPart }, backend: backend2 }); + const result = complex3({ inputs: { real: r2, imag: i2 }, backend: backend2 }); backend2.disposeIntermediateTensorInfo(realPart); - backend2.disposeIntermediateTensorInfo(r); + backend2.disposeIntermediateTensorInfo(r2); backend2.disposeIntermediateTensorInfo(imagPart); - backend2.disposeIntermediateTensorInfo(i); + backend2.disposeIntermediateTensorInfo(i2); return result; } else { return fill3({ @@ -59483,14 +59144,14 @@ function onesLike3(args) { throw new Error("onesLike is not supported under string dtype"); } else if (x.dtype === "complex64") { const realPart = real3({ inputs: { input: x }, backend: backend2 }); - const r = onesLike3({ inputs: { x: realPart }, backend: backend2 }); + const r2 = onesLike3({ inputs: { x: realPart }, backend: backend2 }); const imagPart = imag3({ inputs: { input: x }, backend: backend2 }); - const i = zerosLike3({ inputs: { x: imagPart }, backend: backend2 }); - const result = complex3({ inputs: { real: r, imag: i }, backend: backend2 }); + const i2 = zerosLike3({ inputs: { x: imagPart }, backend: backend2 }); + const result = complex3({ inputs: { real: r2, imag: i2 }, backend: backend2 }); backend2.disposeIntermediateTensorInfo(realPart); - backend2.disposeIntermediateTensorInfo(r); + backend2.disposeIntermediateTensorInfo(r2); backend2.disposeIntermediateTensorInfo(imagPart); - backend2.disposeIntermediateTensorInfo(i); + backend2.disposeIntermediateTensorInfo(i2); return result; } else { return fill3({ attrs: { shape: x.shape, dtype: x.dtype, value: 1 }, backend: backend2 }); @@ -59509,18 +59170,18 @@ function pack2(args) { } const shape = inputs[0].shape; const dtype = inputs[0].dtype; - inputs.forEach((t2) => { - util_exports.assertShapesMatch(shape, t2.shape, "All tensors passed to stack must have matching shapes"); - util_exports.assert(dtype === t2.dtype, () => "All tensors passed to stack must have matching dtypes"); + inputs.forEach((t22) => { + util_exports.assertShapesMatch(shape, t22.shape, "All tensors passed to stack must have matching shapes"); + util_exports.assert(dtype === t22.dtype, () => "All tensors passed to stack must have matching dtypes"); }); const intermediateTensorInfos = []; - const expandedTensors = inputs.map((t2) => { - const expandedT = expandDims4({ inputs: { input: t2 }, backend: backend2, attrs: { dim: axis } }); + const expandedTensors = inputs.map((t22) => { + const expandedT = expandDims4({ inputs: { input: t22 }, backend: backend2, attrs: { dim: axis } }); intermediateTensorInfos.push(expandedT); return expandedT; }); const result = concat3({ inputs: expandedTensors, backend: backend2, attrs: { axis } }); - intermediateTensorInfos.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2)); + intermediateTensorInfos.forEach((t22) => backend2.disposeIntermediateTensorInfo(t22)); return result; } var packConfig2 = { @@ -59532,11 +59193,11 @@ var PadProgram = class { constructor(xShape, paddings, constantValue) { this.variableNames = ["x"]; this.customUniforms = [{ name: "value", type: "float" }]; - this.outputShape = paddings.map((p2, i) => p2[0] + xShape[i] + p2[1]); + this.outputShape = paddings.map((p2, i2) => p2[0] + xShape[i2] + p2[1]); const rank = xShape.length; const type = getCoordsDataType(rank); const start = paddings.map((p2) => p2[0]).join(","); - const end = paddings.map((p2, i) => p2[0] + xShape[i]).join(","); + const end = paddings.map((p2, i2) => p2[0] + xShape[i2]).join(","); const unpackedCoords = ["coords[0]", "coords[1]", "coords[2]", "coords[3]"].slice(0, rank); if (rank === 1) { this.userCode = ` @@ -59576,11 +59237,11 @@ var PadPackedProgram = class { this.packedInputs = true; this.packedOutput = true; this.customUniforms = [{ name: "value", type: "float" }]; - this.outputShape = paddings.map((p2, i) => p2[0] + xShape[i] + p2[1]); + this.outputShape = paddings.map((p2, i2) => p2[0] + xShape[i2] + p2[1]); const rank = xShape.length; const dtype = getCoordsDataType(rank); const start = paddings.map((p2) => p2[0]).join(","); - const end = paddings.map((p2, i) => p2[0] + xShape[i]).join(","); + const end = paddings.map((p2, i2) => p2[0] + xShape[i2]).join(","); const coords3 = getChannels("rc", rank); const source = getChannels("source", rank); const cLimit = `${coords3[rank - 1]} < ${this.outputShape[rank - 1]}`; @@ -59599,14 +59260,14 @@ var PadPackedProgram = class { ]; const paddingArea = rank === 1 ? "rc < start || rc >= end" : "any(lessThan(rc, start)) || any(greaterThanEqual(rc, end))"; let mainLoop = ""; - for (let i = 0, j = rank === 1 ? 2 : 4; i < j; i++) { + for (let i2 = 0, j = rank === 1 ? 2 : 4; i2 < j; i2++) { mainLoop += ` - ${componentSetup[i]} + ${componentSetup[i2]} if (${paddingArea}) { - result[${i}] = float(value); + result[${i2}] = float(value); } else { ${dtype} source = rc - start; - result[${i}] = getChannel(getX(${source.join()}), ${innerDims}); + result[${i2}] = getChannel(getX(${source.join()}), ${innerDims}); } `; } @@ -59629,7 +59290,7 @@ var padV22 = (args) => { const { x } = inputs; const { paddings, constantValue } = attrs; if (util_exports.sizeFromShape(x.shape) === 0) { - const outputShape = paddings.map((p2, i) => p2[0] + x.shape[i] + p2[1]); + const outputShape = paddings.map((p2, i2) => p2[0] + x.shape[i2] + p2[1]); return fill3({ backend: backend2, attrs: { shape: outputShape, value: constantValue, dtype: x.dtype } @@ -59667,8 +59328,10 @@ var POW_PACKED = ` result.b = isExpZero.b ? 1.0 : result.b; result.a = isExpZero.a ? 1.0 : result.a; - vec4 isNaN = vec4(lessThan(a, vec4(0.0))) * vec4(lessThan(floor(b), b)); - ` + CHECK_NAN_SNIPPET3 + ` + bvec4 isNaN1 = lessThan(a, vec4(0.0)); + bvec4 isNaN2 = lessThan(floor(b), b); + bvec4 isNaN = bvec4(isNaN1.x && isNaN2.x, isNaN1.y && isNaN2.y, isNaN1.z && isNaN2.z, isNaN1.w && isNaN2.w); + ` + CHECK_NAN_SNIPPET_PACKED + ` return result; `; var pow3 = binaryKernelFunc2({ opSnippet: POW, packedOpSnippet: POW_PACKED }); @@ -59713,7 +59376,7 @@ function prod3(args) { const newShape = backend_util_exports.expandShapeToKeepDim(res.shape, origAxes); res = reshape4({ inputs: { x: res }, backend: backend2, attrs: { shape: newShape } }); } - toDispose.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2)); + toDispose.forEach((t22) => backend2.disposeIntermediateTensorInfo(t22)); return res; } var prodConfig2 = { @@ -59721,6 +59384,24 @@ var prodConfig2 = { backendName: "webgl", kernelFunc: prod3 }; +function raggedGather3(args) { + const { inputs, backend: backend2, attrs } = args; + const { paramsNestedSplits, paramsDenseValues, indices } = inputs; + const { outputRaggedRank } = attrs; + const $paramsNestedSplits = paramsNestedSplits.map((t22) => backend2.readSync(t22.dataId)); + const $paramsNestedSplitsShapes = paramsNestedSplits.map((t22) => t22.shape); + const $paramsDenseValues = backend2.readSync(paramsDenseValues.dataId); + const $indices = backend2.readSync(indices.dataId); + const [outputNestedSplits, outputDenseValues, outputDenseValuesShape] = raggedGatherImplCPU($paramsNestedSplits, $paramsNestedSplitsShapes, $paramsDenseValues, paramsDenseValues.shape, paramsDenseValues.dtype, $indices, indices.shape, outputRaggedRank); + const outputNestedSplitsTensors = outputNestedSplits.map((splits) => backend2.makeTensorInfo([splits.length], "int32", splits)); + const outputDenseValuesTensor = backend2.makeTensorInfo(outputDenseValuesShape, paramsDenseValues.dtype, outputDenseValues); + return outputNestedSplitsTensors.concat([outputDenseValuesTensor]); +} +var raggedGatherConfig2 = { + kernelName: RaggedGather, + backendName: "webgl", + kernelFunc: raggedGather3 +}; function raggedTensorToTensor3(args) { const { inputs, backend: backend2, attrs } = args; const { shape, values, defaultValue, rowPartitionTensors } = inputs; @@ -59728,8 +59409,8 @@ function raggedTensorToTensor3(args) { const $shape = backend2.readSync(shape.dataId); const $values = backend2.readSync(values.dataId); const $defaultValue = backend2.readSync(defaultValue.dataId); - const $rowPartitionValues = rowPartitionTensors.map((t2) => backend2.readSync(t2.dataId)); - const rowPartitionValuesShapes = rowPartitionTensors.map((t2) => t2.shape); + const $rowPartitionValues = rowPartitionTensors.map((t22) => backend2.readSync(t22.dataId)); + const rowPartitionValuesShapes = rowPartitionTensors.map((t22) => t22.shape); const [outputShape, output] = raggedTensorToTensorImplCPU($shape, shape.shape, $values, values.shape, values.dtype, $defaultValue, defaultValue.shape, $rowPartitionValues, rowPartitionValuesShapes, rowPartitionTypes); return backend2.makeTensorInfo(outputShape, values.dtype, output); } @@ -60333,13 +60014,13 @@ var ReverseProgram = class { `; return; } - const getInCoord = (i) => { - if (axis.indexOf(i) !== -1 && xShape[i] !== 1) { - return `${xShape[i]} - coords[${i}] - 1`; + const getInCoord = (i2) => { + if (axis.indexOf(i2) !== -1 && xShape[i2] !== 1) { + return `${xShape[i2]} - coords[${i2}] - 1`; } - return `coords[${i}]`; + return `coords[${i2}]`; }; - const inCoords = xShape.map((_, i) => getInCoord(i)).join(","); + const inCoords = xShape.map((_, i2) => getInCoord(i2)).join(","); const type = getCoordsDataType(rank); this.userCode = ` void main() { @@ -60413,16 +60094,16 @@ var ReversePackedProgram = class { return getChannel(channels2); } function getChannel(channels2) { - const inCoordsArray = xShape.map((_, i) => getInCoord(i, channels2)); + const inCoordsArray = xShape.map((_, i2) => getInCoord(i2, channels2)); const inCoords = inCoordsArray.join(","); const innerDims = inCoordsArray.slice(-2).join(","); return `getChannel(getX(${inCoords}), vec2(${innerDims}))`; } - function getInCoord(i, channels1) { - if (axis.indexOf(i) !== -1 && xShape[i] !== 1) { - return `${xShape[i]} - ${channels1[i]} - 1`; + function getInCoord(i2, channels1) { + if (axis.indexOf(i2) !== -1 && xShape[i2] !== 1) { + return `${xShape[i2]} - ${channels1[i2]} - 1`; } else { - return `${channels1[i]}`; + return `${channels1[i2]}`; } } } @@ -60659,10 +60340,10 @@ var SelectProgram = class { const currentCoords = ["resRC.x", "resRC.y", "resRC.z", "resRC.w"]; const cCoordVars = []; const abCoordVars = []; - for (let i = 0; i < shape.length; i++) { - abCoordVars.push(`${currentCoords[i]}`); - if (i < cRank) { - cCoordVars.push(`${currentCoords[i]}`); + for (let i2 = 0; i2 < shape.length; i2++) { + abCoordVars.push(`${currentCoords[i2]}`); + if (i2 < cRank) { + cCoordVars.push(`${currentCoords[i2]}`); } } cCoords = cCoordVars.join(); @@ -60684,9 +60365,9 @@ var SelectProgram = class { }; function select3(args) { const { inputs, backend: backend2 } = args; - const { condition, t: t2, e } = inputs; - const program = new SelectProgram(condition.shape.length, t2.shape, t2.shape.length); - return backend2.runWebGLProgram(program, [condition, t2, e], upcastType(t2.dtype, e.dtype)); + const { condition, t: t22, e: e2 } = inputs; + const program = new SelectProgram(condition.shape.length, t22.shape, t22.shape.length); + return backend2.runWebGLProgram(program, [condition, t22, e2], upcastType(t22.dtype, e2.dtype)); } var selectConfig2 = { kernelName: Select, @@ -60794,7 +60475,7 @@ var spaceToBatchND3 = (args) => { const prod6 = blockShape.reduce((a, b) => a * b); const completePaddings = [[0, 0]]; completePaddings.push(...paddings); - for (let i = 1 + blockShape.length; i < x.shape.length; ++i) { + for (let i2 = 1 + blockShape.length; i2 < x.shape.length; ++i2) { completePaddings.push([0, 0]); } const toDispose = []; @@ -60816,7 +60497,7 @@ var spaceToBatchND3 = (args) => { toDispose.push(paddedX); toDispose.push(reshapedPaddedX); toDispose.push(paddedXT); - toDispose.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2)); + toDispose.forEach((t22) => backend2.disposeIntermediateTensorInfo(t22)); return result; }; var spaceToBatchNDConfig2 = { @@ -60969,11 +60650,11 @@ function splitV2(args) { const xRank = x.shape.length; const begin = new Array(xRank).fill(0); const size2 = x.shape.slice(); - return splitSizes.map((s) => { + return splitSizes.map((s2) => { const sliceSize = [...size2]; - sliceSize[$axis] = s; + sliceSize[$axis] = s2; const sliceT = slice3({ inputs: { x }, backend: backend2, attrs: { begin, size: sliceSize } }); - begin[$axis] += s; + begin[$axis] += s2; return sliceT; }); } @@ -61028,9 +60709,9 @@ var StridedSliceProgram = class { newCoords = "coords * strides + begin"; } else { let outputAxis = 0; - newCoords = size2.map((_, i) => { + newCoords = size2.map((_, i2) => { outputAxis++; - return size2.length === 1 ? `coords * strides[${i}] + begin[${i}]` : `coords[${outputAxis - 1}] * strides[${i}] + begin[${i}]`; + return size2.length === 1 ? `coords * strides[${i2}] + begin[${i2}]` : `coords[${outputAxis - 1}] * strides[${i2}] + begin[${i2}]`; }).join(","); } this.userCode = ` @@ -61164,8 +60845,8 @@ var TileProgram = class { constructor(aShape, reps) { this.variableNames = ["A"]; const outputShape = new Array(aShape.length); - for (let i = 0; i < outputShape.length; i++) { - outputShape[i] = aShape[i] * reps[i]; + for (let i2 = 0; i2 < outputShape.length; i2++) { + outputShape[i2] = aShape[i2] * reps[i2]; } this.outputShape = outputShape; this.rank = outputShape.length; @@ -61189,8 +60870,8 @@ function getSourceCoords3(aShape) { } const currentCoords = ["resRC.x", "resRC.y", "resRC.z", "resRC.w", "resRC.u"]; const sourceCoords = []; - for (let i = 0; i < aShape.length; i++) { - sourceCoords.push(`imod(${currentCoords[i]}, ${aShape[i]})`); + for (let i2 = 0; i2 < aShape.length; i2++) { + sourceCoords.push(`imod(${currentCoords[i2]}, ${aShape[i2]})`); } return sourceCoords.join(); } @@ -61605,9 +61286,9 @@ function unpack2(args) { const num = value.shape[axis]; const outShape = new Array(xRank - 1); let outIndex = 0; - for (let i = 0; i < xRank; i++) { - if (i !== axis) { - outShape[outIndex++] = x.shape[i]; + for (let i2 = 0; i2 < xRank; i2++) { + if (i2 !== axis) { + outShape[outIndex++] = x.shape[i2]; } } const toDispose = []; @@ -61615,14 +61296,14 @@ function unpack2(args) { const size2 = x.shape.slice(); size2[axis] = 1; const res = new Array(num); - for (let i = 0; i < res.length; i++) { - begin[axis] = i; + for (let i2 = 0; i2 < res.length; i2++) { + begin[axis] = i2; const sliced = slice3({ inputs: { x }, backend: backend2, attrs: { begin, size: size2 } }); const reshaped = reshape4({ inputs: { x: sliced }, backend: backend2, attrs: { shape: outShape } }); - res[i] = reshaped; + res[i2] = reshaped; toDispose.push(sliced); } - toDispose.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2)); + toDispose.forEach((t22) => backend2.disposeIntermediateTensorInfo(t22)); return res; } var unpackConfig2 = { @@ -61813,7 +61494,7 @@ function unsortedSegmentSum3(args) { const perm = backend_util_exports.getUndoAxesPermutation(permutation); result = transpose3({ inputs: { x: result }, backend: backend2, attrs: { perm } }); } - toDispose.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2)); + toDispose.forEach((t22) => backend2.disposeIntermediateTensorInfo(t22)); return result; } var unsortedSegmentSumConfig2 = { @@ -61933,6 +61614,7 @@ var kernelConfigs2 = [ powConfig2, preluConfig2, prodConfig2, + raggedGatherConfig2, raggedTensorToTensorConfig2, rangeConfig2, realConfig2, @@ -62180,8 +61862,8 @@ function transpose4(args) { const { inputs, backend: backend2, attrs } = args; const [reducedShape, perm] = removeOneSizeDims(inputs.x.shape, attrs.perm); let permIsNoOp = true; - for (let i = 0; i < perm.length; i++) { - if (perm[i] !== i) { + for (let i2 = 0; i2 < perm.length; i2++) { + if (perm[i2] !== i2) { permIsNoOp = false; } } @@ -62206,30 +61888,30 @@ function transpose4(args) { } function computeOutShape4(inShape, perm) { const outShape = new Array(inShape.length); - for (let i = 0; i < outShape.length; i++) { - outShape[i] = inShape[perm[i]]; + for (let i2 = 0; i2 < outShape.length; i2++) { + outShape[i2] = inShape[perm[i2]]; } return outShape; } function removeOneSizeDims(shape, perm) { const newShape = []; const newPerm = []; - for (let i = 0; i < shape.length; ++i) { - if (shape[i] !== 1) { - newShape.push(shape[i]); + for (let i2 = 0; i2 < shape.length; ++i2) { + if (shape[i2] !== 1) { + newShape.push(shape[i2]); } - if (shape[perm[i]] !== 1) { - newPerm.push(perm[i]); + if (shape[perm[i2]] !== 1) { + newPerm.push(perm[i2]); } } - for (let i = 0; i < newPerm.length; ++i) { + for (let i2 = 0; i2 < newPerm.length; ++i2) { let minValIdx = -1; for (let j = 0; j < newPerm.length; ++j) { - if (newPerm[j] >= i && (minValIdx === -1 || newPerm[minValIdx] > newPerm[j])) { + if (newPerm[j] >= i2 && (minValIdx === -1 || newPerm[minValIdx] > newPerm[j])) { minValIdx = j; } } - newPerm[minValIdx] = i; + newPerm[minValIdx] = i2; } return [newShape, newPerm]; } @@ -62249,8 +61931,8 @@ function permuteAxesAndTranspose(x, axis, backend2) { let inputWasTransposed = false; if (permutedAxes != null) { const newShape = new Array(xRank); - for (let i = 0; i < newShape.length; i++) { - newShape[i] = xShape[permutedAxes[i]]; + for (let i2 = 0; i2 < newShape.length; i2++) { + newShape[i2] = xShape[permutedAxes[i2]]; } axes = backend_util_exports.getInnerMostAxes(axes.length, xRank); xTransposed = transpose4({ inputs: { x }, attrs: { perm: permutedAxes }, backend: backend2 }); @@ -62553,8 +62235,8 @@ function slice2d2(xVals, xStride, outVals, begin, size2) { const beginI = begin[0]; const beginJ = begin[1]; const endI = beginI + size2[0]; - for (let i = beginI; i < endI; i++) { - const xOffset = i * xStride + beginJ; + for (let i2 = beginI; i2 < endI; i2++) { + const xOffset = i2 * xStride + beginJ; outVals.set(xVals.subarray(xOffset, xOffset + size2[1]), outOffset); outOffset += size2[1]; } @@ -62566,9 +62248,9 @@ function slice3d2(xVals, xStride1, xStride2, outVals, begin, size2) { const beginK = begin[2]; const endI = beginI + size2[0]; const endJ = beginJ + size2[1]; - for (let i = beginI; i < endI; i++) { + for (let i2 = beginI; i2 < endI; i2++) { for (let j = beginJ; j < endJ; j++) { - const xOffset = i * xStride1 + j * xStride2 + beginK; + const xOffset = i2 * xStride1 + j * xStride2 + beginK; outVals.set(xVals.subarray(xOffset, xOffset + size2[2]), outOffset); outOffset += size2[2]; } @@ -62583,10 +62265,10 @@ function slice4d2(xVals, xStride1, xStride2, xStride3, outVals, begin, size2) { const endJ = beginJ + size2[1]; const endK = beginK + size2[2]; const beginL = begin[3]; - for (let i = beginI; i < endI; i++) { + for (let i2 = beginI; i2 < endI; i2++) { for (let j = beginJ; j < endJ; j++) { for (let k = beginK; k < endK; k++) { - const xOffset = i * xStride1 + j * xStride2 + k * xStride3 + beginL; + const xOffset = i2 * xStride1 + j * xStride2 + k * xStride3 + beginL; outVals.set(xVals.subarray(xOffset, xOffset + size2[3]), outOffset); outOffset += size2[3]; } @@ -62668,8 +62350,10 @@ var clipByValueConfig3 = { function concat4(args) { const { inputs, backend: backend2 } = args; const axis = util_exports.parseAxisParam(args.attrs.axis, inputs[0].shape)[0]; - let outShape = backend_util_exports.computeOutShape(inputs.map((t2) => t2.shape), axis); - const $inputs = inputs.filter((t2) => util_exports.sizeFromShape(t2.shape) > 0); + const shapes = inputs.map((t22) => t22.shape); + backend_util_exports.assertParamsConsistent(shapes, axis); + let outShape = backend_util_exports.computeOutShape(inputs.map((t22) => t22.shape), axis); + const $inputs = inputs.filter((t22) => util_exports.sizeFromShape(t22.shape) > 0); if ($inputs.length === 1) { return identity4({ inputs: { x: $inputs[0] }, backend: backend2 }); } @@ -62677,25 +62361,23 @@ function concat4(args) { if (util_exports.sizeFromShape(outShape) === 0) { return out; } - const shapes = $inputs.map((t2) => t2.shape); - backend_util_exports.assertParamsConsistent(shapes, axis); if ($inputs[0].dtype === "string") { - const inputs2D = $inputs.map((t2) => { - const innerSize = util_exports.sizeFromShape(t2.shape.slice(axis)); + const inputs2D = $inputs.map((t22) => { + const innerSize = util_exports.sizeFromShape(t22.shape.slice(axis)); const shape = [-1, innerSize]; - return reshape5({ inputs: { x: t2 }, backend: backend2, attrs: { shape } }); + return reshape5({ inputs: { x: t22 }, backend: backend2, attrs: { shape } }); }); - const inputsValShapes = inputs2D.map((t2) => { - return { vals: backend2.readSync(t2.dataId), shape: t2.shape }; + const inputsValShapes = inputs2D.map((t22) => { + return { vals: backend2.readSync(t22.dataId), shape: t22.shape }; }); - outShape = backend_util_exports.computeOutShape(inputs2D.map((t2) => t2.shape), 1); + outShape = backend_util_exports.computeOutShape(inputs2D.map((t22) => t22.shape), 1); const simplyConcat = inputs2D[0].shape[0] === 1; const outVals2 = concatImpl(inputsValShapes, outShape, inputs[0].dtype, simplyConcat); - const finalOutShape = backend_util_exports.computeOutShape($inputs.map((t2) => t2.shape), axis); + const finalOutShape = backend_util_exports.computeOutShape($inputs.map((t22) => t22.shape), axis); out.shape = finalOutShape; const outData = backend2.dataIdMap.get(out.dataId); outData.stringBytes = backend_util_exports.fromStringArrayToUint8(outVals2); - inputs2D.forEach((t2) => backend2.disposeData(t2.dataId)); + inputs2D.forEach((t22) => backend2.disposeData(t22.dataId)); return out; } const batchDim = util_exports.sizeFromShape($inputs[0].shape.slice(0, axis)); @@ -62709,10 +62391,10 @@ function concat4(args) { const outVals = backend2.typedArrayFromHeap(out); for (let b = 0; b < batchDim; b++) { let outOffset = b * sumInnerDims; - for (let i = 0; i < inVals.length; i++) { - const innerDim = innerDims[i]; + for (let i2 = 0; i2 < inVals.length; i2++) { + const innerDim = innerDims[i2]; const inOffset = b * innerDim; - const vals = inVals[i].subarray(inOffset, inOffset + innerDim); + const vals = inVals[i2].subarray(inOffset, inOffset + innerDim); outVals.set(vals, outOffset); outOffset += innerDim; } @@ -63405,8 +63087,8 @@ function gatherV23(args) { const parsedAxis = util_exports.parseAxisParam(axis, x.shape)[0]; const indicesVals = backend2.readSync(indices.dataId); const axisDim = x.shape[parsedAxis]; - for (let i = 0; i < indicesVals.length; ++i) { - const index2 = indicesVals[i]; + for (let i2 = 0; i2 < indicesVals.length; ++i2) { + const index2 = indicesVals[i2]; util_exports.assert(index2 <= axisDim - 1 && index2 >= 0, () => `GatherV2: the index value ${index2} is not in [0, ${axisDim - 1}]`); } const shapeInfo = backend_util_exports.segment_util.collectGatherOpShapeInfo(x, indices, parsedAxis, batchDims); @@ -63724,7 +63406,7 @@ function setup26(backend2) { } function mirrorPad3(args) { const { inputs: { x }, backend: backend2, attrs: { paddings, mode } } = args; - const outShape = paddings.map((p2, i) => p2[0] + x.shape[i] + p2[1]); + const outShape = paddings.map((p2, i2) => p2[0] + x.shape[i2] + p2[1]); const xId = backend2.dataIdMap.get(x.dataId).id; const out = backend2.makeOutput(outShape, x.dtype); const outId = backend2.dataIdMap.get(out.dataId).id; @@ -63904,18 +63586,18 @@ function pack3(args) { } const shape = inputs[0].shape; const dtype = inputs[0].dtype; - inputs.forEach((t2) => { - util_exports.assertShapesMatch(shape, t2.shape, "All tensors passed to stack must have matching shapes"); - util_exports.assert(dtype === t2.dtype, () => "All tensors passed to stack must have matching dtypes"); + inputs.forEach((t22) => { + util_exports.assertShapesMatch(shape, t22.shape, "All tensors passed to stack must have matching shapes"); + util_exports.assert(dtype === t22.dtype, () => "All tensors passed to stack must have matching dtypes"); }); const intermediateTensorInfos = []; - const expandedTensors = inputs.map((t2) => { - const expandedT = expandDims5({ inputs: { input: t2 }, backend: backend2, attrs: { dim: axis } }); + const expandedTensors = inputs.map((t22) => { + const expandedT = expandDims5({ inputs: { input: t22 }, backend: backend2, attrs: { dim: axis } }); intermediateTensorInfos.push(expandedT); return expandedT; }); const result = concat4({ inputs: expandedTensors, backend: backend2, attrs: { axis } }); - intermediateTensorInfos.forEach((t2) => backend2.disposeData(t2.dataId)); + intermediateTensorInfos.forEach((t22) => backend2.disposeData(t22.dataId)); return result; } var packConfig3 = { @@ -63938,7 +63620,7 @@ function setup31(backend2) { } function pad2(args) { const { inputs: { x }, backend: backend2, attrs: { paddings, constantValue } } = args; - const outShape = paddings.map((p2, i) => p2[0] + x.shape[i] + p2[1]); + const outShape = paddings.map((p2, i2) => p2[0] + x.shape[i2] + p2[1]); if (util_exports.sizeFromShape(x.shape) === 0) { return fill4({ backend: backend2, @@ -64287,15 +63969,15 @@ function setup39(backend2) { } function select4(args) { const { inputs, backend: backend2 } = args; - const { condition, t: t2, e } = inputs; + const { condition, t: t22, e: e2 } = inputs; const conditionId = backend2.dataIdMap.get(condition.dataId).id; - const tId = backend2.dataIdMap.get(t2.dataId).id; - const eId = backend2.dataIdMap.get(e.dataId).id; - const out = backend2.makeOutput(t2.shape, t2.dtype); + const tId = backend2.dataIdMap.get(t22.dataId).id; + const eId = backend2.dataIdMap.get(e2.dataId).id; + const out = backend2.makeOutput(t22.shape, t22.dtype); const outId = backend2.dataIdMap.get(out.dataId).id; const cRank = condition.shape.length; - const tRank = t2.shape.length; - const offset = cRank === 0 || cRank > 1 || tRank === 1 ? 1 : util_exports.sizeFromShape(t2.shape.slice(1)); + const tRank = t22.shape.length; + const offset = cRank === 0 || cRank > 1 || tRank === 1 ? 1 : util_exports.sizeFromShape(t22.shape.slice(1)); wasmSelect(conditionId, tId, eId, offset, outId); return out; } @@ -64362,7 +64044,7 @@ function spaceToBatchND4(args) { const prod6 = util_exports.sizeFromShape(blockShape); const completePaddings = [[0, 0]]; completePaddings.push(...paddings); - for (let i = 1 + blockShape.length; i < x.shape.length; ++i) { + for (let i2 = 1 + blockShape.length; i2 < x.shape.length; ++i2) { completePaddings.push([0, 0]); } const paddedX = padV2Config3.kernelFunc({ @@ -64645,11 +64327,11 @@ function splitV3(args) { const splitSizes = backend_util_exports.prepareSplitSize(x, numOrSizeSplits, $axis); const begin = new Array(x.shape.length).fill(0); const size2 = x.shape.slice(); - return splitSizes.map((s) => { + return splitSizes.map((s2) => { const xSliceSize = [...size2]; - xSliceSize[$axis] = s; + xSliceSize[$axis] = s2; const xSlice = slice4({ inputs: { x }, attrs: { begin, size: xSliceSize }, backend: backend2 }); - begin[$axis] += s; + begin[$axis] += s2; return xSlice; }); } @@ -64868,8 +64550,8 @@ function tile5(args) { const xId = backend2.dataIdMap.get(x.dataId).id; const { reps } = attrs; const newShape = new Array(x.shape.length); - for (let i = 0; i < newShape.length; i++) { - newShape[i] = x.shape[i] * reps[i]; + for (let i2 = 0; i2 < newShape.length; i2++) { + newShape[i2] = x.shape[i2] * reps[i2]; } const xShapeBytes = new Uint8Array(new Int32Array(x.shape).buffer); const newShapeBytes = new Uint8Array(new Int32Array(newShape).buffer); @@ -64998,18 +64680,18 @@ function unpack3(args) { const rank = value.shape.length; const outShape = new Array(rank - 1); let outIndex = 0; - for (let i = 0; i < rank; i++) { - if (i !== axis) { - outShape[outIndex++] = value.shape[i]; + for (let i2 = 0; i2 < rank; i2++) { + if (i2 !== axis) { + outShape[outIndex++] = value.shape[i2]; } } const outs = new Array(numOutputs); const begin = new Array(rank).fill(0); const size2 = value.shape.slice(); size2[axis] = 1; - for (let i = 0; i < outs.length; i++) { - begin[axis] = i; - outs[i] = slice4({ inputs: { x: value }, attrs: { begin, size: size2 }, backend: backend2 }); + for (let i2 = 0; i2 < outs.length; i2++) { + begin[axis] = i2; + outs[i2] = slice4({ inputs: { x: value }, attrs: { begin, size: size2 }, backend: backend2 }); } return outs.map(({ dataId, dtype }) => ({ dataId, dtype, shape: outShape })); } @@ -65144,40 +64826,43 @@ for (const kernelConfig of kernelConfigs3) { registerKernel(kernelConfig); } var ENV6 = env(); -ENV6.registerFlag( - "WASM_HAS_SIMD_SUPPORT", - async () => WebAssembly.validate(new Uint8Array([ - 0, - 97, - 115, - 109, - 1, - 0, - 0, - 0, - 1, - 4, - 1, - 96, - 0, - 0, - 3, - 2, - 1, - 0, - 10, - 9, - 1, - 7, - 0, - 65, - 0, - 253, - 15, - 26, - 11 - ])) -); +ENV6.registerFlag("WASM_HAS_SIMD_SUPPORT", async () => { + try { + return WebAssembly.validate(new Uint8Array([ + 0, + 97, + 115, + 109, + 1, + 0, + 0, + 0, + 1, + 4, + 1, + 96, + 0, + 0, + 3, + 2, + 1, + 0, + 10, + 9, + 1, + 7, + 0, + 65, + 0, + 253, + 15, + 26, + 11 + ])); + } catch (e2) { + return false; + } +}); ENV6.registerFlag("WASM_HAS_MULTITHREAD_SUPPORT", async () => { if (ENV6.get("IS_NODE")) { return false; @@ -65223,7 +64908,7 @@ ENV6.registerFlag("WASM_HAS_MULTITHREAD_SUPPORT", async () => { 26, 11 ])); - } catch (e) { + } catch (e2) { return false; } }); @@ -65507,7 +65192,7 @@ function getThreadsCount() { } return actualThreadsCount; } -var version8 = "3.20.0"; +var version8 = "3.21.0"; var WASM_PRIORITY = 2; registerBackend("wasm", async () => { const { wasm } = await init(); @@ -65522,6 +65207,17 @@ ENV7.registerFlag("WEBGPU_USE_LOW_POWER_GPU", () => false); ENV7.registerFlag("WEBGPU_CPU_HANDOFF_SIZE_THRESHOLD", () => 1e3); ENV7.registerFlag("WEBGPU_USE_PROFILE_TOOL", () => false); ENV7.registerFlag("WEBGPU_IMPORT_EXTERNAL_TEXTURE", () => true); +ENV7.registerFlag("WEBGPU_USE_NAIVE_CONV2D_DEBUG", () => false); +var AdapterInfo = class { + constructor(adapterInfo) { + if (adapterInfo) { + this.vendor = adapterInfo.vendor; + } + } + isIntel() { + return this.vendor === "intel"; + } +}; var BufferManager = class { constructor(device) { this.device = device; @@ -65710,8 +65406,8 @@ function symbolicallyComputeStrides2(indicesArr, variableName) { const shape = indicesArr.map((d) => `${variableName}[${d}]`); const strides2 = new Array(numCoords - 1); strides2[numCoords - 2] = shape[numCoords - 1]; - for (let i = numCoords - 3; i >= 0; --i) { - strides2[i] = `(${strides2[i + 1]} * ${shape[i + 1]})`; + for (let i2 = numCoords - 3; i2 >= 0; --i2) { + strides2[i2] = `(${strides2[i2 + 1]} * ${shape[i2 + 1]})`; } return strides2; } @@ -65847,8 +65543,8 @@ function makeShader2(inputInfo, outputData, program) { ].join("\n"); } let uniformDeclaration = "struct Uniforms { NAN : f32, "; - program.variableNames.forEach((x, i) => { - const perDataType = getCoordsDataType2(inputInfo[i].shape.length); + program.variableNames.forEach((x, i2) => { + const perDataType = getCoordsDataType2(inputInfo[i2].shape.length); uniformDeclaration += `${x.charAt(0).toLowerCase() + x.slice(1)}Shape : ${perDataType}, `; }); const outputDataType = getCoordsDataType2(outputData.shape.length); @@ -65875,9 +65571,9 @@ function makeShader2(inputInfo, outputData, program) { @group(0) @binding(0) var result: array<${mapToWgslTypes(outputData.dtype, program.isVec4)}>; `); } - program.variableNames.forEach((x, i) => { + program.variableNames.forEach((x, i2) => { prefixSnippets.push(` - @group(0) @binding(${1 + i}) var ${x}: array<${program.variableTypes ? program.variableTypes[i] : mapToWgslTypes(inputInfo[i].dtype, program.isVec4)}>; + @group(0) @binding(${1 + i2}) var ${x}: array<${program.variableTypes ? program.variableTypes[i2] : mapToWgslTypes(inputInfo[i2].dtype, program.isVec4)}>; `); }); if (uniformDeclaration !== "") { @@ -65896,7 +65592,7 @@ function makeShader2(inputInfo, outputData, program) { if (!program.atomic) { sources.push(setOutputSnippet(outputData.shape, outputData.dtype, program.isVec4)); } - const inputSnippet = inputInfo.map((x, i) => getInputSnippet(x, outputData.shape, program.variableTypes ? program.variableTypes[i] === "vec4" : program.isVec4, program.dispatchLayout.x.length === outputData.shape.length)).join("\n"); + const inputSnippet = inputInfo.map((x, i2) => getInputSnippet(x, outputData.shape, program.variableTypes ? program.variableTypes[i2] === "vec4" : program.isVec4, program.dispatchLayout.x.length === outputData.shape.length)).join("\n"); sources.push(inputSnippet); sources.push(program.getUserCode()); const source = sources.join("\n"); @@ -65982,8 +65678,8 @@ function getCoordsFromIndexSnippet(shape) { const strides2 = util_exports.computeStrides(shape); const dtype = getCoordsDataType2(rank); const coords3 = []; - for (let i = 0; i < rank; i++) { - coords3.push(`d${i}`); + for (let i2 = 0; i2 < rank; i2++) { + coords3.push(`d${i2}`); } if (strides2.length === 1) { return ` fn getCoordsFromIndex(index : i32) -> vec2 { @@ -65992,9 +65688,9 @@ function getCoordsFromIndexSnippet(shape) { }`; } let snippet; - snippet = "var index2 = index;" + strides2.map((_, i) => { - const line1 = `let ${coords3[i]} = index2 / uniforms.outShapeStrides.${getCoordsXYZ(i)}`; - const line2 = i === strides2.length - 1 ? `let ${coords3[i + 1]} = index2 - ${coords3[i]} * uniforms.outShapeStrides.${getCoordsXYZ(i)}` : `index2 = index2 - ${coords3[i]} * uniforms.outShapeStrides.${getCoordsXYZ(i)}`; + snippet = "var index2 = index;" + strides2.map((_, i2) => { + const line1 = `let ${coords3[i2]} = index2 / uniforms.outShapeStrides.${getCoordsXYZ(i2)}`; + const line2 = i2 === strides2.length - 1 ? `let ${coords3[i2 + 1]} = index2 - ${coords3[i2]} * uniforms.outShapeStrides.${getCoordsXYZ(i2)}` : `index2 = index2 - ${coords3[i2]} * uniforms.outShapeStrides.${getCoordsXYZ(i2)}`; return `${line1}; ${line2};`; }).join(""); return ` @@ -66112,7 +65808,7 @@ function getInputByOutputSnippet(inputInfo, outShape, isVec4, isFlatDispatchLayo } else { if (outRank > 1) { const coordsType = getCoordsDataType2(inRank); - const coordsValues = inputInfo.shape.map((s, i) => `coords.${getCoordsXYZ(i + rankDiff)}`).join(", "); + const coordsValues = inputInfo.shape.map((s2, i2) => `coords.${getCoordsXYZ(i2 + rankDiff)}`).join(", "); unpackedCoordsSnippet = `${coordsType}(${coordsValues})`; } else { unpackedCoordsSnippet = "coords"; @@ -66160,6 +65856,10 @@ function getInputSnippet(inputInfo, outShape, isVec4, isFlatDispatchLayout) { function getOutputCoordsSnippet(outShape, dispatchLayout) { const { x, y = [], z = [] } = dispatchLayout; const outRank = outShape.length; + const rank = x.length + y.length + z.length; + if (rank !== outRank) { + return ""; + } if (x.length === outRank) { const dtype2 = getCoordsDataType2(outRank); const snippet2 = `fn getOutputCoords() -> ${dtype2}{ @@ -66171,31 +65871,29 @@ function getOutputCoordsSnippet(outShape, dispatchLayout) { } let gatherDimensionsStr = ""; const dims = [x, y, z]; - let rank = 0; - for (let i = 0; i < dims.length; i++) { - const arr = dims[i]; + for (let i2 = 0; i2 < dims.length; i2++) { + const arr = dims[i2]; if (arr.length === 0) { continue; } - rank += arr.length; if (arr.length === 1) { - gatherDimensionsStr += `let d${arr[0]} = i32(globalId[${i}]);`; + gatherDimensionsStr += `let d${arr[0]} = i32(globalId[${i2}]);`; } else { const strides2 = symbolicallyComputeStrides2(arr, "uniforms.outShape"); - gatherDimensionsStr += `var index${i} = i32(globalId[${i}]);`; + gatherDimensionsStr += `var index${i2} = i32(globalId[${i2}]);`; for (let j = 0; j < strides2.length; j++) { - gatherDimensionsStr += `let d${arr[j]} = index${i} / ${strides2[j]};`; + gatherDimensionsStr += `let d${arr[j]} = index${i2} / ${strides2[j]};`; if (j === strides2.length - 1) { - gatherDimensionsStr += `let d${arr[j + 1]} = index${i} - d${arr[j]} * ${strides2[j]};`; + gatherDimensionsStr += `let d${arr[j + 1]} = index${i2} - d${arr[j]} * ${strides2[j]};`; } else { - gatherDimensionsStr += `index${i} = index${i} - d${arr[j]} * ${strides2[j]};`; + gatherDimensionsStr += `index${i2} = index${i2} - d${arr[j]} * ${strides2[j]};`; } } } } const dimensions = []; - for (let i = 0; i < rank; i++) { - dimensions.push(`d${i}`); + for (let i2 = 0; i2 < rank; i2++) { + dimensions.push(`d${i2}`); } const dtype = getCoordsDataType2(rank); let snippet = `fn getOutputCoords() -> ${dtype} { @@ -66357,8 +66055,8 @@ __export2(webgpu_util_exports, { }); var arrayProduct = (arr) => { let product = 1; - for (let i = 0; i < arr.length; i++) { - product *= arr[i]; + for (let i2 = 0; i2 < arr.length; i2++) { + product *= arr[i2]; } return product; }; @@ -66418,7 +66116,7 @@ function computeWorkPerThreadForConv2d(layout, outputShape, isVec4 = false) { return [2, 2, 1]; } function flatDispatchLayout(shape) { - return { x: shape.map((d, i) => i) }; + return { x: shape.map((d, i2) => i2) }; } function GPUBytesPerElement(dtype) { if (dtype === "float32" || dtype === "int32" || dtype === "bool" || dtype === "string") { @@ -66470,7 +66168,7 @@ var reshapeDispatch = (device, program) => { } }; var WebGPUBackend = class extends KernelBackend { - constructor(device) { + constructor(device, adapterInfo) { super(); this.commandQueueOwnedIds = /* @__PURE__ */ new WeakSet(); this.dispatchNumberInEncoder = 0; @@ -66489,6 +66187,7 @@ var WebGPUBackend = class extends KernelBackend { this.currentCommandEncoder = null; this.currentComputePass = null; this.supportTimeQuery = device.features.has("timestamp-query"); + this.adapterInfo = new AdapterInfo(adapterInfo); this.bufferManager = new BufferManager(this.device); this.textureManager = new TextureManager2(this.device); this.tensorMap = new DataStorage(this, engine()); @@ -66716,17 +66415,17 @@ var WebGPUBackend = class extends KernelBackend { tensorData.resourceInfo = { size: size2, usage: this.defaultGpuBufferUsage(), buffer: buffer2 }; return { tensorRef, buffer: buffer2, bufSize: size2 }; } - bufferSync(t2) { - const data = this.readSync(t2.dataId); - if (t2.dtype === "string") { + bufferSync(t22) { + const data = this.readSync(t22.dataId); + if (t22.dtype === "string") { try { const strings = data.map((d) => util_exports.decodeString(d)); - return buffer(t2.shape, t2.dtype, strings); + return buffer(t22.shape, t22.dtype, strings); } catch (_a) { throw new Error("Failed to decode encoded string bytes into utf-8"); } } - return buffer(t2.shape, t2.dtype, data); + return buffer(t22.shape, t22.dtype, data); } async time(f) { if (!this.supportTimeQuery) { @@ -66757,7 +66456,7 @@ var WebGPUBackend = class extends KernelBackend { }; const kernelMs = await Promise.all(flattenedActiveTimerQueries); res["kernelMs"] = util_exports.sum(kernelMs); - res["getExtraProfileInfo"] = () => kernelMs.map((d, i) => ({ name: flattenedActiveTimerNames[i], ms: d })).map((d) => `${d.name}: ${d.ms}`).join(", "); + res["getExtraProfileInfo"] = () => kernelMs.map((d, i2) => ({ name: flattenedActiveTimerNames[i2], ms: d })).map((d) => `${d.name}: ${d.ms}`).join(", "); this.uploadWaitMs = 0; this.downloadWaitMs = 0; return res; @@ -66860,8 +66559,8 @@ var WebGPUBackend = class extends KernelBackend { currentOffset += d.data.length * 4; }); const arrayBuffer = new ArrayBuffer(currentOffset); - programUniform.forEach((d, i) => { - const offset = offsets[i]; + programUniform.forEach((d, i2) => { + const offset = offsets[i2]; if (d.type === "int32") { new Int32Array(arrayBuffer, offset, d.data.length).set(d.data); } else if (d.type === "uint32") { @@ -66906,7 +66605,7 @@ var WebGPUBackend = class extends KernelBackend { programUniform.push({ type: uniformsType, data: [program.isVec4 ? size2 / 4 : size2] }); } } - const inputsData = inputs.map((input2, i) => { + const inputsData = inputs.map((input2, i2) => { if (input2.dtype === "complex64") { throw new Error(`GPGPUProgram does not support complex64 input. For complex64 dtypes, please separate the program into real and imaginary parts.`); } @@ -66914,7 +66613,7 @@ var WebGPUBackend = class extends KernelBackend { return { dtype: this.tensorMap.get(input2.dataId).dtype, shape: input2.shape, - name: program.variableNames[i] + name: program.variableNames[i2] }; }); const key = makeShaderKey2(program, bufferShapes, inputsData, output); @@ -66930,12 +66629,12 @@ var WebGPUBackend = class extends KernelBackend { } const bindings = [ this.tensorToBinding(output), - ...inputs.map((t2) => this.tensorToBinding(t2)), + ...inputs.map((t22) => this.tensorToBinding(t22)), this.makeUniforms(programUniform) ]; const bindGroup = this.device.createBindGroup({ layout: pipeline.getBindGroupLayout(0), - entries: bindings.map((b, i) => ({ binding: i, resource: b })) + entries: bindings.map((b, i2) => ({ binding: i2, resource: b })) }); this.ensureCommandEncoderReady(); const pass = this.getComputePass(); @@ -67020,7 +66719,8 @@ if (isWebGPUSupported()) { deviceDescriptor.requiredFeatures = ["timestamp-query"]; } const device = await adapter.requestDevice(deviceDescriptor); - return new WebGPUBackend(device); + const adapterInfo = await adapter.requestAdapterInfo(); + return new WebGPUBackend(device, adapterInfo); }, 3); } var BinaryOpType; @@ -67046,7 +66746,7 @@ var BinaryOpType; BinaryOpType2[BinaryOpType2["COMPLEX_MULTIPLY_REAL"] = 18] = "COMPLEX_MULTIPLY_REAL"; BinaryOpType2[BinaryOpType2["COMPLEX_MULTIPLY_IMAG"] = 19] = "COMPLEX_MULTIPLY_IMAG"; })(BinaryOpType || (BinaryOpType = {})); -var CHECK_NAN_SNIPPET4 = ` +var CHECK_NAN_SNIPPET3 = ` if (isnan(a)) { return a; } if (isnan(b)) { return b; } `; @@ -67161,7 +66861,7 @@ var POW_VEC4 = ` if (isExpZero.a) { resultTemp.a = 1.0; } - let isNaN = a < vec4(0.0) & floor(b) < b; + let isNaN = (a < vec4(0.0)) & (floor(b) < b); let valueForNaN = uniforms.NAN; ${CHECK_NAN_SNIPPET_VEC4_INNER} return resultTemp; @@ -67172,7 +66872,7 @@ var PRELU_VEC4 = ` return (aLessThanZero * (b * a)) + ((vec4(1.0) - aLessThanZero) * a); `; function getBinaryWithNanString(op2, useVec4, valueForNaN = "uniforms.NAN") { - const checkNanSnippet = useVec4 ? CHECK_NAN_SNIPPET_VEC4 : CHECK_NAN_SNIPPET4; + const checkNanSnippet = useVec4 ? CHECK_NAN_SNIPPET_VEC4 : CHECK_NAN_SNIPPET3; return useVec4 ? ` let valueForNaN = ${valueForNaN}; var resultTemp = vec4(${op2}(a, b)); @@ -67285,7 +66985,7 @@ var EXP2 = `return exp(a);`; var FLOOR2 = `return floor(a);`; var IS_NAN2 = `return f32(isnan(a));`; var LINEAR3 = `return a;`; -var LOG2 = `if (a < 0.0) { return 1.0/0.0; } +var LOG2 = `if (a < 0.0) { return uniforms.NAN; } return log(a);`; var LOGICAL_NOT2 = `return f32(!(a >= 1.0));`; var NEG2 = `return -a;`; @@ -67434,16 +67134,10 @@ function matMulReadFnSource(batchAEqualOne, batchBEqualOne, transposeA, transpos util_exports.assert(transposeA && component === 1 || !transposeA, () => `transposeA ${transposeA} is not compatible with component size ${component}`); const sampleA = ` let batch = ${batchAEqualOne ? "0" : "batchIn"}; - let batchASize = uniforms.aShape[1] * uniforms.aShape[2]; - ${transposeA ? `value = A[(batch * batchASize + col * uniforms.aShape[2] + row) / ${component}];` : `value = A[(batch * batchASize + row * uniforms.aShape[2] + col) / ${component}];`} + ${transposeA ? `value = getA(batch, col, row);` : `value = getA(batch, row, col);`} `; - let sampleB; - if (transposeB === false) { - sampleB = `value = B[(batch * batchBSize + row * uniforms.bShape[2] + col) / ${component}];`; - } else { - sampleB = `value = B[(batch * batchBSize + col * uniforms.bShape[2] + row) / ${component}];`; - } + const sampleB = transposeB ? `value = getB(batch, col, row);` : `value = getB(batch, row, col);`; return ` fn mm_readA(batchIn: i32, row: i32, colIn: i32) -> ${typeSnippet(component)} { var value = ${typeSnippet(component)}(0.0); @@ -67460,7 +67154,6 @@ function matMulReadFnSource(batchAEqualOne, batchBEqualOne, transposeA, transpos fn mm_readB(batchIn: i32, row: i32, colIn: i32) -> ${typeSnippet(component)} { let col = colIn * ${component}; let batch = ${batchBEqualOne ? "0" : "batchIn"}; - let batchBSize = uniforms.bShape[1] * uniforms.bShape[2]; var value = ${typeSnippet(component)}(0.0); ${sampleB} return value; @@ -67618,7 +67311,7 @@ var writeDataToSubASnippet = (transpose6) => { var readDataFromSubASnippet = (transposeA) => { return transposeA ? "let ACached = mm_Asub[k][tileRow + innerRow];" : "let ACached = mm_Asub[tileRow + innerRow][k];"; }; -function makeMatMulPackedSource(workPerThread, workGroupSize, transposeA = false, tileInner = 32, splitK = false, splitedDimInner = 32) { +function makeMatMulPackedSource(workPerThread, workGroupSize, transposeA = false, tileInner = 32, splitK = false, splitedDimInner = 32, sequentialAccessByThreads = false) { const tileAOuter = workPerThread[1] * workGroupSize[1]; const tileBOuter = workPerThread[0] * workGroupSize[0]; const tileAWidth = transposeA ? tileAOuter : tileInner; @@ -67627,64 +67320,26 @@ function makeMatMulPackedSource(workPerThread, workGroupSize, transposeA = false const rowPerThreadA = tileAHight / workGroupSize[1]; const colPerThreadA = tileAWidth / workGroupSize[0]; const rowPerThreadB = tileInner / workGroupSize[1]; - return ` - var mm_Asub : array, ${tileAHight}>; - var mm_Bsub : array, ${tileInner}>; - const RowPerThread = ${workPerThread[1]}; - const ColPerThread = ${workPerThread[0]}; - const TileInner = ${tileInner}; - - @compute @workgroup_size(workGroupSizeX, workGroupSizeY, workGroupSizeZ) - fn _start(@builtin(local_invocation_id) LocalId : vec3, - @builtin(global_invocation_id) GlobalId : vec3, - @builtin(num_workgroups) NumWorkgroups: vec3, - @builtin(workgroup_id) workgroupId: vec3) { - localId = LocalId; - globalId = GlobalId; - numWorkgroups = NumWorkgroups; - - let tileRow = i32(localId.y) * RowPerThread; - let tileCol = i32(localId.x) * ColPerThread; - - let globalRow = i32(globalId.y) * RowPerThread; - let globalCol = i32(globalId.x) * ColPerThread; - let batch = ${splitK ? "0" : "i32(globalId.z)"}; + const matmulSnippet = sequentialAccessByThreads ? ` + let localRow = i32(localId.y); + let localCol = i32(localId.x); let globalRowStart = i32(workgroupId.y) * ${tileAOuter}; + let globalColStart = i32(workgroupId.x) * ${tileBOuter}; - let numTiles = ${splitK ? `${Math.ceil(splitedDimInner / tileInner)}` : "(uniforms.dimInner - 1) / TileInner + 1"}; - var kStart = ${splitK ? `i32(globalId.z) * ${splitedDimInner}` : "0"}; - - var acc : array, RowPerThread>; - - // Without this initialization strange values show up in acc. - for (var innerRow = 0; innerRow < RowPerThread; innerRow = innerRow + 1) { - for (var innerCol = 0; innerCol < ColPerThread; innerCol = innerCol + 1) { - acc[innerRow][innerCol] = 0.0; - } - } - - let tileRowA = i32(localId.y) * ${rowPerThreadA}; - let tileColA = i32(localId.x) * ${colPerThreadA}; - let tileRowB = i32(localId.y) * ${rowPerThreadB}; // Loop over shared dimension. for (var t = 0; t < numTiles; t = t + 1) { // Load one tile of A into local memory. - for (var innerRow = 0; innerRow < ${rowPerThreadA}; innerRow = innerRow + 1) { - for (var innerCol = 0; innerCol < ${colPerThreadA}; innerCol = innerCol + 1) { - let inputRow = tileRowA + innerRow; - let inputCol = tileColA + innerCol; + for (var inputRow = localRow; inputRow < ${tileAHight}; inputRow = inputRow + ${workGroupSize[1]}) { + for (var inputCol = localCol; inputCol < ${tileAWidth}; inputCol = inputCol + ${workGroupSize[0]}) { ${writeDataToSubASnippet(transposeA)} } } - // Load one tile of B into local memory. - for (var innerRow = 0; innerRow < ${rowPerThreadB}; innerRow = innerRow + 1) { - for (var innerCol = 0; innerCol < ColPerThread; innerCol = innerCol + 1) { - let inputRow = tileRowB + innerRow; - let inputCol = tileCol + innerCol; + for (var inputRow = localRow; inputRow < ${tileInner}; inputRow = inputRow + ${workGroupSize[1]}) { + for (var inputCol = localCol; inputCol < ${tileBOuter}; inputCol = inputCol + ${workGroupSize[0]}) { mm_Bsub[inputRow][inputCol] = mm_readB(batch, kStart + inputRow, - globalCol + innerCol); + globalColStart + inputCol); } } kStart = kStart + TileInner; @@ -67694,26 +67349,114 @@ function makeMatMulPackedSource(workPerThread, workGroupSize, transposeA = false var BCached : array; for (var k = 0; k < TileInner; k = k + 1) { for (var inner = 0; inner < ColPerThread; inner = inner + 1) { - BCached[inner] = mm_Bsub[k][tileCol + inner]; + BCached[inner] = mm_Bsub[k][localCol + inner * ${workGroupSize[0]}]; } - for (var innerRow = 0; innerRow < RowPerThread; innerRow = innerRow + 1) { - ${readDataFromSubASnippet(transposeA)} + let ACached = ${transposeA ? `mm_Asub[k][localRow + innerRow * ${workGroupSize[1]}];` : `mm_Asub[localRow + innerRow * ${workGroupSize[1]}][k];`} for (var innerCol = 0; innerCol < ColPerThread; innerCol = innerCol + 1) { - acc[innerRow][innerCol] = acc[innerRow][innerCol] + ACached * BCached[innerCol]; + acc[innerRow][innerCol] = acc[innerRow][innerCol] + + ACached * BCached[innerCol]; } } } - workgroupBarrier(); } + for (var innerRow = 0; innerRow < RowPerThread; innerRow = innerRow + 1) { + let gRow = globalRowStart + localRow + innerRow * ${workGroupSize[1]}; + for (var innerCol = 0; innerCol < ColPerThread; innerCol = innerCol + 1) { + let gCol = globalColStart + localCol + innerCol * ${workGroupSize[0]}; + mm_write(batch, gRow, gCol, acc[innerRow][innerCol]); + } + } + ` : ` + let tileRow = i32(localId.y) * RowPerThread; + let tileCol = i32(localId.x) * ColPerThread; + + let globalRow = i32(globalId.y) * RowPerThread; + let globalCol = i32(globalId.x) * ColPerThread; + let globalRowStart = i32(workgroupId.y) * ${tileAOuter}; + + let tileRowA = i32(localId.y) * ${rowPerThreadA}; + let tileColA = i32(localId.x) * ${colPerThreadA}; + let tileRowB = i32(localId.y) * ${rowPerThreadB}; + // Loop over shared dimension. + for (var t = 0; t < numTiles; t = t + 1) { + // Load one tile of A into local memory. + for (var innerRow = 0; innerRow < ${rowPerThreadA}; innerRow = innerRow + 1) { + for (var innerCol = 0; innerCol < ${colPerThreadA}; innerCol = innerCol + 1) { + let inputRow = tileRowA + innerRow; + let inputCol = tileColA + innerCol; + ${writeDataToSubASnippet(transposeA)} + } + } + + // Load one tile of B into local memory. + for (var innerRow = 0; innerRow < ${rowPerThreadB}; innerRow = innerRow + 1) { + for (var innerCol = 0; innerCol < ColPerThread; innerCol = innerCol + 1) { + let inputRow = tileRowB + innerRow; + let inputCol = tileCol + innerCol; + mm_Bsub[inputRow][inputCol] = mm_readB(batch, + kStart + inputRow, + globalCol + innerCol); + } + } + kStart = kStart + TileInner; + workgroupBarrier(); + + // Compute acc values for a single thread. + var BCached : array; + for (var k = 0; k < TileInner; k = k + 1) { + for (var inner = 0; inner < ColPerThread; inner = inner + 1) { + BCached[inner] = mm_Bsub[k][tileCol + inner]; + } + + for (var innerRow = 0; innerRow < RowPerThread; innerRow = innerRow + 1) { + ${readDataFromSubASnippet(transposeA)} + for (var innerCol = 0; innerCol < ColPerThread; innerCol = innerCol + 1) { + acc[innerRow][innerCol] = acc[innerRow][innerCol] + ACached * BCached[innerCol]; + } + } + } + + workgroupBarrier(); + } + + for (var innerRow = 0; innerRow < RowPerThread; innerRow = innerRow + 1) { + for (var innerCol = 0; innerCol < ColPerThread; innerCol = innerCol + 1) { + mm_write(batch, globalRow + innerRow, globalCol + innerCol, + acc[innerRow][innerCol]); + } + } + `; + return ` + var mm_Asub : array, ${tileAHight}>; + var mm_Bsub : array, ${tileInner}>; + const RowPerThread = ${workPerThread[1]}; + const ColPerThread = ${workPerThread[0]}; + const TileInner = ${tileInner}; + + @compute @workgroup_size(workGroupSizeX, workGroupSizeY, workGroupSizeZ) + fn _start(@builtin(local_invocation_id) LocalId : vec3, + @builtin(global_invocation_id) GlobalId : vec3, + @builtin(num_workgroups) NumWorkgroups: vec3, + @builtin(workgroup_id) workgroupId: vec3) { + localId = LocalId; + globalId = GlobalId; + numWorkgroups = NumWorkgroups; + + let batch = ${splitK ? "0" : "i32(globalId.z)"}; + let numTiles = ${splitK ? `${Math.ceil(splitedDimInner / tileInner)}` : "(uniforms.dimInner - 1) / TileInner + 1"}; + var kStart = ${splitK ? `i32(globalId.z) * ${splitedDimInner}` : "0"}; + var acc : array, RowPerThread>; + + // Without this initialization strange values show up in acc. for (var innerRow = 0; innerRow < RowPerThread; innerRow = innerRow + 1) { for (var innerCol = 0; innerCol < ColPerThread; innerCol = innerCol + 1) { - mm_write(batch, globalRow + innerRow, globalCol + innerCol, - acc[innerRow][innerCol]); + acc[innerRow][innerCol] = 0.0; } } + ${matmulSnippet} } `; } @@ -67773,7 +67516,7 @@ function makeVectorMatrixProductSource(workGroupSize, transposeA = false) { `; } var MatMulPackedProgram2 = class { - constructor(aShape, outputShape, batchAEqualOne, batchBEqualOne, transposeA = false, transposeB = false, bias = null, activation2 = null, preluActivationWeights = null) { + constructor(aShape, outputShape, batchAEqualOne, batchBEqualOne, transposeA = false, transposeB = false, bias = null, activation2 = null, preluActivationWeights = null, sequentialAccessByThreads = false) { this.variableNames = ["A", "B"]; this.uniforms = `dimAOuter : i32, dimBOuter : i32, dimInner : i32,`; this.outputShape = outputShape; @@ -67798,6 +67541,7 @@ var MatMulPackedProgram2 = class { if (hasPreluActivationWeights) { this.variableNames.push("preluActivationWeights"); } + this.sequentialAccessByThreads = sequentialAccessByThreads; this.transposeA = transposeA; this.transposeB = transposeB; this.addBias = addBias; @@ -67806,7 +67550,7 @@ var MatMulPackedProgram2 = class { this.batchAEqualOne = batchAEqualOne; this.batchBEqualOne = batchBEqualOne; [this.fitAOuter, this.fitBOuter, this.fitInner] = this.getShapeFit(outputShape[1], outputShape[2], dimInner); - this.shaderKey = `matMulPacked_${this.elementsPerThread}_${transposeA}_${transposeB}_${this.activation}_${this.fitAOuter}_${this.fitBOuter}_${this.fitInner}_${this.isVec4}_${this.isVectorA}_${this.batchAEqualOne}_${this.batchBEqualOne}`; + this.shaderKey = `matMulPacked_${this.elementsPerThread}_${transposeA}_${transposeB}_${this.activation}_${this.fitAOuter}_${this.fitBOuter}_${this.fitInner}_${this.isVec4}_${this.isVectorA}_${this.batchAEqualOne}_${this.batchBEqualOne}_${this.sequentialAccessByThreads}`; } getShapeFit(dimAOuter, dimBOuter, dimInner) { const tileAOuter = this.workGroupSize[1] * this.elementsPerThread[1]; @@ -67825,7 +67569,7 @@ var MatMulPackedProgram2 = class { const userCode = ` ${activationFnSnippet(this.activation, this.hasPreluActivationWeights, this.isVec4)} ${matMulReadWriteFnSource(this.addBias, this.activation, this.batchAEqualOne, this.batchBEqualOne, false, this.transposeB, this.fitAOuter, this.fitBOuter, this.fitInner, this.isVec4 ? 4 : 1)} - ${this.isVec4 ? makeMatMulPackedVec4Source(this.elementsPerThread, this.workGroupSize, this.transposeA, this.tileInner, false, null, this.isVectorA) : this.isVectorA ? makeVectorMatrixProductSource(this.workGroupSize, this.transposeA) : makeMatMulPackedSource(this.elementsPerThread, this.workGroupSize, this.transposeA, this.tileInner)} + ${this.isVec4 ? makeMatMulPackedVec4Source(this.elementsPerThread, this.workGroupSize, this.transposeA, this.tileInner, false, null, this.isVectorA) : this.isVectorA ? makeVectorMatrixProductSource(this.workGroupSize, this.transposeA) : makeMatMulPackedSource(this.elementsPerThread, this.workGroupSize, this.transposeA, this.tileInner, false, null, this.sequentialAccessByThreads)} `; return userCode; } @@ -68222,8 +67966,8 @@ function batchMatMulImpl2({ a, b, transposeA, transposeB, backend: backend2, bia intermediates.push(out); const outReshaped2 = reshape6({ inputs: { x: outActivated }, backend: backend2, attrs: { shape: outShape } }); intermediates.push(outActivated); - for (const i of intermediates) { - backend2.disposeData(i.dataId); + for (const i2 of intermediates) { + backend2.disposeData(i2.dataId); } return outReshaped2; } @@ -68233,7 +67977,8 @@ function batchMatMulImpl2({ a, b, transposeA, transposeB, backend: backend2, bia program = new MatMulSmallOutputSizeProgram(a3dShape, b3dShape, outputShape, transposeA, transposeB, bias, activation2, preluActivationWeights); break; case MatMulProgramType.MatMulPackedProgram: - program = new MatMulPackedProgram2(a3dShape, outputShape, batchAEqualOne, batchBEqualOne, transposeA, transposeB, bias, activation2, preluActivationWeights); + const sequentialAccessByThreads = backend2.adapterInfo.isIntel(); + program = new MatMulPackedProgram2(a3dShape, outputShape, batchAEqualOne, batchBEqualOne, transposeA, transposeB, bias, activation2, preluActivationWeights, sequentialAccessByThreads); break; default: throw new Error(`Unsupported MatMulProgramType ${matmulProgramType}.`); @@ -68251,8 +67996,8 @@ function batchMatMulImpl2({ a, b, transposeA, transposeB, backend: backend2, bia out = backend2.runWebGPUProgram(program, inputs, a.dtype, dimensions, out); const outReshaped = reshape6({ inputs: { x: out }, backend: backend2, attrs: { shape: outShape } }); intermediates.push(out); - for (const i of intermediates) { - backend2.disposeData(i.dataId); + for (const i2 of intermediates) { + backend2.disposeData(i2.dataId); } return outReshaped; } @@ -68316,21 +68061,15 @@ var BinaryOpProgram2 = class { this.outputShape = backend_util_exports.assertAndGetBroadcastShape(aShape, bShape); this.dispatchLayout = flatDispatchLayout(this.outputShape); this.op = op2; - this.useSharedMemoryWithA = aShape.length === 1 && bShape.length > 1 && aShape[0] < 1024; - this.useSharedMemoryWithB = bShape.length === 1 && aShape.length > 1 && bShape[0] < 1024; + this.useSharedMemoryWithA = aShape.length <= 1 && bShape.length > 1 && aShape[0] < 128; + this.useSharedMemoryWithB = bShape.length <= 1 && aShape.length > 1 && bShape[0] < 128; if (this.useSharedMemoryWithA || this.useSharedMemoryWithB) { this.isVec4 = false; this.lastDimensionSize = this.useSharedMemoryWithB ? bShape[0] : aShape[0]; this.shaderKey = `binary_${this.type}_${op2}_${this.lastDimensionSize}_${this.useSharedMemoryWithB}`; this.type = "shared"; this.workGroupSize = [256, 1, 1]; - if (this.lastDimensionSize < 256) { - this.workPerThread = 1; - } else if (this.lastDimensionSize < 512) { - this.workPerThread = 2; - } else { - this.workPerThread = 4; - } + this.workPerThread = 1; } else { if (util_exports.arraysEqual(aShape, bShape) && util_exports.sizeFromShape(aShape) % 4 === 0) { this.isVec4 = true; @@ -68348,44 +68087,38 @@ var BinaryOpProgram2 = class { } getUserCode() { let userCode; + const dType = this.isVec4 ? "vec4" : "f32"; + const opFnStr = ` + fn binaryOperation(a : ${dType}, b : ${dType}) -> ${dType} { + ${getBinaryOpString(this.op, this.isVec4)} + }; + `; if (this.type === "shared") { const sharedIndexSnippet = this.lastDimensionSize > 1 ? `coords[${this.outputShape.length - 1}]` : "0"; - const accessDataSnippet = this.useSharedMemoryWithB ? `let a = getAByOutputCoords(coords); + const accessDataSnippet = this.useSharedMemoryWithB ? `let a = getAByOutputIndex(index); let b = sharedBuf[${sharedIndexSnippet}];` : `let a = sharedBuf[${sharedIndexSnippet}]; - let b = getBByOutputCoords(coords);`; - const opStr = getBinaryOpString(this.op, this.isVec4); + let b = getBByOutputIndex(index);`; userCode = ` - fn binaryOperation(a : f32, b : f32) -> f32 { - ${opStr} - } + ${opFnStr} var sharedBuf : array; ${getMainHeaderString("index")} { - // Fill in the shared memory buffer. Here we need a loop to make sure - // that all data in A|B are uploaded when |sharedMemorySize| is larger - // than work group size. - for(var localIndex = i32(localId.x); localIndex < ${this.lastDimensionSize}; localIndex = localIndex + ${this.workGroupSize[0]}) { + // Fill in the shared memory buffer. + let localIndex = i32(localId.x); + if(localIndex < ${this.lastDimensionSize}) { sharedBuf[localIndex] = f32(${this.useSharedMemoryWithB ? "B" : "A"}[localIndex]); } workgroupBarrier(); - for(var i = 0; i < ${this.workPerThread}; i = i + 1) { - let flatIndex = index * ${this.workPerThread} + i; - if(flatIndex < uniforms.size) { - let coords = getCoordsFromIndex(flatIndex); - - ${accessDataSnippet} - setOutputAtIndex(flatIndex, binaryOperation(a, b)); - } + if(index < uniforms.size) { + let coords = getCoordsFromIndex(index); + ${accessDataSnippet} + setOutputAtIndex(index, binaryOperation(a, b)); } } `; } else { - const dType = this.type === "vec4" ? "vec4" : "f32"; - const opStr = getBinaryOpString(this.op, this.isVec4); userCode = ` - fn binaryOperation(a : ${dType}, b : ${dType}) -> ${dType} { - ${opStr} - } + ${opFnStr} ${getMainHeaderString("index")} { if (index < uniforms.size) { let a = getAByOutputIndex(index); @@ -68552,11 +68285,11 @@ var addConfig4 = { }; var AddNPackedProgram2 = class { constructor(shapes) { - this.workPerThread = 4; + this.workPerThread = 1; this.workGroupSize = [64, 1, 1]; this.size = true; this.outputShape = shapes[0]; - this.variableNames = shapes.map((_, i) => `T${i}`); + this.variableNames = shapes.map((_, i2) => `T${i2}`); this.dispatchLayout = flatDispatchLayout(this.outputShape); this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize, [this.workPerThread, 1, 1]); this.shaderKey = "addN"; @@ -68590,8 +68323,8 @@ function addN4(args) { if (tensors.length === 1) { return identity5({ inputs: { x: tensors[0] }, backend: backend2 }); } - const dtype = tensors.map((t2) => t2.dtype).reduce((d1, d2) => upcastType(d1, d2)); - const shapes = tensors.map((t2) => t2.shape); + const dtype = tensors.map((t22) => t22.dtype).reduce((d1, d2) => upcastType(d1, d2)); + const shapes = tensors.map((t22) => t22.shape); const program = new AddNPackedProgram2(shapes); return backend2.runWebGPUProgram(program, tensors, dtype); } @@ -68636,8 +68369,8 @@ var ArgMinMaxProgram2 = class { snippet += "outputCoords,"; } } else { - for (let i = 0; i < this.outputShape.length; i++) { - snippet += `outputCoords.${getCoordsXYZ(i)},`; + for (let i2 = 0; i2 < this.outputShape.length; i2++) { + snippet += `outputCoords.${getCoordsXYZ(i2)},`; } } return snippet; @@ -68723,8 +68456,8 @@ var TransposeSharedProgram = class { this.variableNames = ["A"]; this.workGroupSize = [16, 16, 1]; const outputShape = new Array(aShape.length); - for (let i = 0; i < outputShape.length; i++) { - outputShape[i] = aShape[newDim[i]]; + for (let i2 = 0; i2 < outputShape.length; i2++) { + outputShape[i2] = aShape[newDim[i2]]; } this.outputShape = outputShape; this.dispatchLayout = { x: [0], y: [1] }; @@ -68761,12 +68494,12 @@ var TransposeSharedProgram = class { var TransposeProgram2 = class { constructor(aShape, newDim) { this.variableNames = ["A"]; - this.workPerThread = 4; + this.workPerThread = 1; this.workGroupSize = [64, 1, 1]; this.size = true; const outputShape = new Array(aShape.length); - for (let i = 0; i < outputShape.length; i++) { - outputShape[i] = aShape[newDim[i]]; + for (let i2 = 0; i2 < outputShape.length; i2++) { + outputShape[i2] = aShape[newDim[i2]]; } this.outputShape = outputShape; this.dispatchLayout = flatDispatchLayout(this.outputShape); @@ -68798,8 +68531,8 @@ function getSwitchedCoords2(newDim) { throw Error(`Transpose for rank ${rank} is not yet supported`); } const switchedCoords = new Array(rank); - for (let i = 0; i < newDim.length; i++) { - switchedCoords[newDim[i]] = `resRC.${getCoordsXYZ(i)}`; + for (let i2 = 0; i2 < newDim.length; i2++) { + switchedCoords[newDim[i2]] = `resRC.${getCoordsXYZ(i2)}`; } return switchedCoords.join(); } @@ -68810,8 +68543,8 @@ function transpose5(args) { const webgpuBackend = backend2; const xRank = x.shape.length; const newShape = new Array(xRank); - for (let i = 0; i < newShape.length; i++) { - newShape[i] = x.shape[perm[i]]; + for (let i2 = 0; i2 < newShape.length; i2++) { + newShape[i2] = x.shape[perm[i2]]; } if (backend2.shouldExecuteOnCPU([x])) { const xData = webgpuBackend.tensorMap.get(x.dataId); @@ -68848,7 +68581,7 @@ function argMax4(args) { const program = new ArgMinMaxProgram2($x.shape, axes[0], "max"); const uniformData = [{ type: "float32", data: [Number.NEGATIVE_INFINITY] }]; const out = backend2.runWebGPUProgram(program, [$x], "int32", uniformData); - intermediateTensorInfos.forEach((t2) => backend2.disposeData(t2.dataId)); + intermediateTensorInfos.forEach((t22) => backend2.disposeData(t22.dataId)); return out; } var argMaxConfig4 = { @@ -68873,7 +68606,7 @@ function argMin4(args) { const program = new ArgMinMaxProgram2($x.shape, axes[0], "min"); const uniformData = [{ type: "float32", data: [Number.POSITIVE_INFINITY] }]; const out = backend2.runWebGPUProgram(program, [$x], "int32", uniformData); - intermediateTensorInfos.forEach((t2) => backend2.disposeData(t2.dataId)); + intermediateTensorInfos.forEach((t22) => backend2.disposeData(t22.dataId)); return out; } var argMinConfig3 = { @@ -69103,7 +68836,7 @@ function reduce2(x, axis, keepDims, reduceType, backend2) { toDispose.push(reduced); res = reshape6({ inputs: { x: reduced }, attrs: { shape: resOutShape }, backend: backend2 }); } - toDispose.forEach((t2) => backend2.disposeData(t2.dataId)); + toDispose.forEach((t22) => backend2.disposeData(t22.dataId)); return res; } function max6(args) { @@ -69224,12 +68957,12 @@ var SliceProgram2 = class { const sourceCoords = getCoords3(this.rank); let coordSum; if (this.start.length === 1) { - coordSum = this.outputShape.map((_, i) => { + coordSum = this.outputShape.map((_, i2) => { return `sourceLoc = uniforms.start + coords;`; }); } else { - coordSum = this.outputShape.map((_, i) => { - return `sourceLoc.${coords2[i]} = uniforms.start.${getCoordsXYZ(i)} + coords.${coords2[i]};`; + coordSum = this.outputShape.map((_, i2) => { + return `sourceLoc.${coords2[i2]} = uniforms.start.${getCoordsXYZ(i2)} + coords.${coords2[i2]};`; }); } const userCode = ` @@ -69305,7 +69038,7 @@ var batchToSpaceND5 = (args) => { toDispose.push(reshapedIntermediate); toDispose.push(transposedIntermediate); toDispose.push(reshapedIntermediate2); - toDispose.forEach((t2) => backend2.disposeData(t2.dataId)); + toDispose.forEach((t22) => backend2.disposeData(t22.dataId)); return sliced; }; var batchToSpaceNDConfig4 = { @@ -69477,16 +69210,16 @@ var clipByValueConfig4 = { var ConcatProgram2 = class { constructor(shapes) { this.uniforms = ""; - this.workPerThread = 4; + this.workPerThread = 1; this.workGroupSize = [64, 1, 1]; this.size = true; this.outputShape = backend_util_exports.computeOutShape(shapes, 1); - this.variableNames = shapes.map((_, i) => `T${i}`); + this.variableNames = shapes.map((_, i2) => `T${i2}`); this.dispatchLayout = flatDispatchLayout(this.outputShape); this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize, [this.workPerThread, 1, 1]); this.offsetLength = shapes.length - 1; - for (let i = 0; i < this.offsetLength; i++) { - this.uniforms += `offset${i} : i32,`; + for (let i2 = 0; i2 < this.offsetLength; i2++) { + this.uniforms += `offset${i2} : i32,`; } this.shaderKey = "concat"; } @@ -69494,8 +69227,8 @@ var ConcatProgram2 = class { const snippets = []; if (this.offsetLength > 0) { snippets.push(`if (yC < uniforms.offset0){ setOutputAtCoords(coords.x, coords.y, getT0(yR, yC)); }`); - for (let i = 1; i < this.offsetLength; i++) { - snippets.push(`else if (yC < uniforms.offset${[i]}){ setOutputAtCoords(coords.x, coords.y, getT${i}(yR, yC - uniforms.offset${i - 1})); }`); + for (let i2 = 1; i2 < this.offsetLength; i2++) { + snippets.push(`else if (yC < uniforms.offset${[i2]}){ setOutputAtCoords(coords.x, coords.y, getT${i2}(yR, yC - uniforms.offset${i2 - 1})); }`); } const lastIndex = this.offsetLength; const lastShiftIndex = this.offsetLength - 1; @@ -69534,13 +69267,13 @@ var imagConfig3 = { function concatImpl3(inputs, axis, backend2) { const dtype = inputs[0].dtype; if (dtype === "complex64") { - const reals = inputs.map((t2) => real4({ inputs: { input: t2 }, backend: backend2 })); - const imags = inputs.map((t2) => imag4({ inputs: { input: t2 }, backend: backend2 })); + const reals = inputs.map((t22) => real4({ inputs: { input: t22 }, backend: backend2 })); + const imags = inputs.map((t22) => imag4({ inputs: { input: t22 }, backend: backend2 })); const realConcated = concatImpl3(reals, axis, backend2); const imagConcated = concatImpl3(imags, axis, backend2); const result = complex4({ inputs: { real: realConcated, imag: imagConcated }, backend: backend2 }); - reals.forEach((r) => backend2.disposeData(r.dataId)); - imags.forEach((i) => backend2.disposeData(i.dataId)); + reals.forEach((r2) => backend2.disposeData(r2.dataId)); + imags.forEach((i2) => backend2.disposeData(i2.dataId)); backend2.disposeData(realConcated.dataId); backend2.disposeData(imagConcated.dataId); return result; @@ -69550,63 +69283,63 @@ function concatImpl3(inputs, axis, backend2) { runOnCpu = true; } if (runOnCpu) { - const tensors2D2 = inputs.map((t2) => { - const innerSize = util_exports.sizeFromShape(t2.shape.slice(axis)); + const tensors2D2 = inputs.map((t22) => { + const innerSize = util_exports.sizeFromShape(t22.shape.slice(axis)); const shape = [-1, innerSize]; - return reshape6({ inputs: { x: t2 }, backend: backend2, attrs: { shape } }); + return reshape6({ inputs: { x: t22 }, backend: backend2, attrs: { shape } }); }); - const inputsValShapes = tensors2D2.map((t2) => { - return { vals: backend2.readSync(t2.dataId), shape: t2.shape }; + const inputsValShapes = tensors2D2.map((t22) => { + return { vals: backend2.readSync(t22.dataId), shape: t22.shape }; }); - const outShape2 = backend_util_exports.computeOutShape(tensors2D2.map((t2) => t2.shape), 1); + const outShape2 = backend_util_exports.computeOutShape(tensors2D2.map((t22) => t22.shape), 1); const simplyConcat = tensors2D2[0].shape[0] === 1; const outVals = concatImplCPU2(inputsValShapes, outShape2, dtype, simplyConcat); - const finalOutShape = backend_util_exports.computeOutShape(inputs.map((t2) => t2.shape), axis); + const finalOutShape = backend_util_exports.computeOutShape(inputs.map((t22) => t22.shape), axis); const outInfo = backend2.makeTensorInfo(finalOutShape, dtype, outVals); - tensors2D2.forEach((t2) => backend2.disposeData(t2.dataId)); + tensors2D2.forEach((t22) => backend2.disposeData(t22.dataId)); return outInfo; } const maxInputNum = backend2.device.limits.maxStorageBuffersPerShaderStage - 1; if (inputs.length > maxInputNum) { const reducedInputs = []; - for (let i = 0; i < inputs.length; i += maxInputNum) { - const subArray = inputs.slice(i, i + maxInputNum); + for (let i2 = 0; i2 < inputs.length; i2 += maxInputNum) { + const subArray = inputs.slice(i2, i2 + maxInputNum); reducedInputs.push(concatImpl3(subArray, axis, backend2)); } const result = concatImpl3(reducedInputs, axis, backend2); - for (const i of reducedInputs) { - backend2.disposeData(i.dataId); + for (const i2 of reducedInputs) { + backend2.disposeData(i2.dataId); } return result; } const { tensors2D, outShape } = computeTensors2D2(inputs, axis, backend2); - const shapes = tensors2D.map((t2) => t2.shape); + const shapes = tensors2D.map((t22) => t22.shape); const program = new ConcatProgram2(shapes); const uniformData = []; const offsets = new Array(shapes.length - 1); if (offsets.length > 0) { offsets[0] = shapes[0][1]; uniformData.push({ type: "int32", data: [offsets[0]] }); - for (let i = 1; i < offsets.length; i++) { - offsets[i] = offsets[i - 1] + shapes[i][1]; - uniformData.push({ type: "int32", data: [offsets[i]] }); + for (let i2 = 1; i2 < offsets.length; i2++) { + offsets[i2] = offsets[i2 - 1] + shapes[i2][1]; + uniformData.push({ type: "int32", data: [offsets[i2]] }); } } const res = backend2.runWebGPUProgram(program, tensors2D, tensors2D[0].dtype, uniformData); - tensors2D.forEach((r) => backend2.disposeData(r.dataId)); + tensors2D.forEach((r2) => backend2.disposeData(r2.dataId)); const reshapedResult = reshape6({ inputs: { x: res }, backend: backend2, attrs: { shape: outShape } }); backend2.disposeData(res.dataId); return reshapedResult; } function computeTensors2D2(inputs, axis, backend2) { - const outShape = backend_util_exports.computeOutShape(inputs.map((t2) => t2.shape), axis); - const tensors2D = inputs.map((t2) => reshape6({ - inputs: { x: t2 }, + const outShape = backend_util_exports.computeOutShape(inputs.map((t22) => t22.shape), axis); + const tensors2D = inputs.map((t22) => reshape6({ + inputs: { x: t22 }, backend: backend2, attrs: { shape: [ - util_exports.sizeFromShape(t2.shape.slice(0, axis)), - util_exports.sizeFromShape(t2.shape.slice(axis)) + util_exports.sizeFromShape(t22.shape.slice(0, axis)), + util_exports.sizeFromShape(t22.shape.slice(axis)) ] } })); @@ -69616,16 +69349,16 @@ function concat5(args) { const { inputs, backend: backend2, attrs } = args; const { axis } = attrs; const $axis = util_exports.parseAxisParam(axis, inputs[0].shape)[0]; - const outShape = backend_util_exports.computeOutShape(inputs.map((t2) => t2.shape), $axis); + const shapes = inputs.map((t22) => t22.shape); + backend_util_exports.assertParamsConsistent(shapes, $axis); + const outShape = backend_util_exports.computeOutShape(inputs.map((t22) => t22.shape), $axis); if (util_exports.sizeFromShape(outShape) === 0) { return backend2.makeTensorInfo(outShape, inputs[0].dtype, []); } - const $inputs = inputs.filter((t2) => util_exports.sizeFromShape(t2.shape) > 0); + const $inputs = inputs.filter((t22) => util_exports.sizeFromShape(t22.shape) > 0); if ($inputs.length === 1) { return identity5({ inputs: { x: $inputs[0] }, backend: backend2 }); } - const shapes = $inputs.map((t2) => t2.shape); - backend_util_exports.assertParamsConsistent(shapes, $axis); return concatImpl3($inputs, $axis, backend2); } var concatConfig4 = { @@ -69741,7 +69474,7 @@ function conv2dCommonSnippet(isChannelsLast, fitAOuter, fitBOuter, fitInner, add return userCode; } var Conv2DMMProgram = class { - constructor(convInfo, dimAOuter, dimBOuter, dimInner, addBias = false, activation2 = null, hasPreluActivationWeights = false) { + constructor(convInfo, dimAOuter, dimBOuter, dimInner, addBias = false, activation2 = null, hasPreluActivationWeights = false, sequentialAccessByThreads = false) { this.variableNames = ["x", "W"]; this.uniforms = `filterDims : vec2, pad : vec2, stride : vec2, dilation : vec2, dimAOuter : i32, dimBOuter : i32, dimInner : i32,`; this.outputShape = convInfo.outShape; @@ -69776,6 +69509,7 @@ var Conv2DMMProgram = class { this.variableNames.push("preluActivationWeights"); } } + this.sequentialAccessByThreads = sequentialAccessByThreads; this.addBias = addBias; this.activation = activation2; this.hasPreluActivationWeights = hasPreluActivationWeights; @@ -69785,10 +69519,10 @@ var Conv2DMMProgram = class { this.fitAOuter = dimAOuter % this.tileAOuter === 0; this.fitBOuter = dimBOuter % this.tileBOuter === 0; this.fitInner = dimInner % this.tileInner === 0; - this.shaderKey = `conv2DMM_${this.elementsPerThread}_${this.activation}}_${this.fitAOuter}_${this.fitBOuter}_${this.fitInner}_${this.isVec4}_${this.innerElementSize}_${this.isChannelsLast}`; + this.shaderKey = `conv2DMM_${this.elementsPerThread}_${this.activation}}_${this.fitAOuter}_${this.fitBOuter}_${this.fitInner}_${this.isVec4}_${this.innerElementSize}_${this.isChannelsLast}_${this.sequentialAccessByThreads}`; } getUserCode() { - const matMulSource = this.isVec4 ? makeMatMulPackedVec4Source(this.elementsPerThread, this.workGroupSize, !this.isChannelsLast, this.tileInner) : makeMatMulPackedSource(this.elementsPerThread, this.workGroupSize, !this.isChannelsLast, this.tileInner); + const matMulSource = this.isVec4 ? makeMatMulPackedVec4Source(this.elementsPerThread, this.workGroupSize, !this.isChannelsLast, this.tileInner) : makeMatMulPackedSource(this.elementsPerThread, this.workGroupSize, !this.isChannelsLast, this.tileInner, false, null, this.sequentialAccessByThreads); const elementsSize = this.isVec4 ? [this.innerElementSize, 4, 4] : [1, 1, 1]; const userCode = ` ${conv2dCommonSnippet(this.isChannelsLast, this.fitAOuter, this.fitBOuter, this.fitInner, this.addBias, this.activation, this.hasPreluActivationWeights, elementsSize[0], elementsSize[1], elementsSize[2])} @@ -69797,6 +69531,77 @@ var Conv2DMMProgram = class { return userCode; } }; +var Conv2DNaiveProgram = class { + constructor(convInfo, addBias = false, activation2 = null, hasPreluActivationWeights = false) { + this.variableNames = ["x", "W"]; + this.uniforms = "filterDims: vec2, pad: vec2, stride: vec2, dilation: vec2,"; + this.workGroupSize = [4, 4, 8]; + this.outputShape = convInfo.outShape; + this.isChannelsLast = convInfo.dataFormat === "channelsLast"; + this.dispatchLayout = this.isChannelsLast ? { x: [2], y: [1], z: [0, 3] } : { x: [3], y: [2], z: [0, 1] }; + this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize); + this.addBias = addBias; + this.activation = activation2; + this.hasPreluActivationWeights = hasPreluActivationWeights; + if (addBias) { + this.variableNames.push("bias"); + } + if (hasPreluActivationWeights) { + this.variableNames.push("preluActivationWeights"); + } + this.shaderKey = `conv2dnaive_${this.activation}_${this.isChannelsLast}`; + } + getUserCode() { + const userCode = ` + ${activationFnSnippet(this.activation, this.hasPreluActivationWeights, false, 4)} + fn readInp(batch : i32, row : i32, col : i32, chan : i32) -> f32{ + let coords = vec4(batch, row, col, chan); + if (coordsInBounds4D(coords, uniforms.xShape)) { + return getX(batch, row, col, chan); + } else { + return 0.0; + } + } + fn readFilt(row : i32, col : i32, xChannel : i32, outChannel : i32) -> f32{ + let coords = vec4(row, col, xChannel, outChannel); + if(coordsInBounds4D(coords, uniforms.wShape)) { + return getW(row, col, xChannel, outChannel); + } else { + return 0.0; + } + } + fn writeResult(batch : i32, row : i32, col : i32, chan : i32, valueIn : f32) { + let coords = ${this.isChannelsLast ? `vec4(batch, row, col, chan);` : `vec4(batch, chan, row, col);`} + if (coordsInBounds4D(coords, uniforms.outShape)) { + var value = valueIn; + ${biasActivationSnippet(this.addBias, this.activation)} + setOutputAtCoords(coords.x, coords.y, coords.z, coords.w, value); + } + } + ${getMainHeaderString("index")} { + let coords = getOutputCoords(); + let batch = coords[0]; + let outChannel = ${this.isChannelsLast ? `coords[3];` : `coords[1];`} + let outRow = ${this.isChannelsLast ? `coords[1];` : `coords[2];`} + let outCol = ${this.isChannelsLast ? `coords[2];` : `coords[3];`} + var acc : f32 = 0.0; + for (var row = 0; row < uniforms.filterDims[0]; row = row + 1) { + for (var col = 0; col < uniforms.filterDims[1]; col = col + 1) { + let xRow = outRow * uniforms.stride[0] + uniforms.dilation[0] * row - uniforms.pad[0]; + let xCol = outCol * uniforms.stride[1] + uniforms.dilation[1] * col - uniforms.pad[1]; + for (var xChannel = 0; xChannel < ${this.isChannelsLast ? `uniforms.xShape[3];` : `uniforms.xShape[1];`} xChannel = xChannel + 1) { + ${this.isChannelsLast ? `let v = readInp(batch, xRow, xCol, xChannel);` : `let v = readInp(batch, xChannel, xRow, xCol);`} + let f = readFilt(row, col, xChannel, outChannel); + acc = acc + v * f; + } + } + } + writeResult(batch, outRow, outCol, outChannel, acc); + } + `; + return userCode; + } +}; function getShapeForBatchMatMul2(shape, isChannelsLast) { const length = shape.length; if (length >= 3) { @@ -69890,8 +69695,8 @@ function conv2dByMatMul2({ x, filter, convInfo, backend: backend2, bias = null, }); const out = reshape6({ inputs: { x: result }, backend: backend2, attrs: { shape: convInfo.outShape } }); intermediates.push(result); - for (const i of intermediates) { - backend2.disposeData(i.dataId); + for (const i2 of intermediates) { + backend2.disposeData(i2.dataId); } return out; } @@ -69900,7 +69705,8 @@ function conv2DImpl({ x, filter, convInfo, backend: backend2, bias = null, prelu const hasPreluActivationWeights = preluActivationWeights != null; const isChannelsLast = convInfo.dataFormat === "channelsLast"; const sameSize = isChannelsLast && convInfo.filterHeight === convInfo.inHeight && convInfo.filterWidth === convInfo.inWidth && convInfo.padInfo.type === "VALID"; - if (sameSize || convInfo.filterHeight === 1 && convInfo.filterWidth === 1 && convInfo.dilationHeight === 1 && convInfo.dilationWidth === 1 && convInfo.strideHeight === 1 && convInfo.strideWidth === 1 && (convInfo.padInfo.type === "SAME" || convInfo.padInfo.type === "VALID")) { + const useNaiveConv2d = env().getBool("WEBGPU_USE_NAIVE_CONV2D_DEBUG"); + if (!useNaiveConv2d && (sameSize || convInfo.filterHeight === 1 && convInfo.filterWidth === 1 && convInfo.dilationHeight === 1 && convInfo.dilationWidth === 1 && convInfo.strideHeight === 1 && convInfo.strideWidth === 1 && (convInfo.padInfo.type === "SAME" || convInfo.padInfo.type === "VALID"))) { return conv2dByMatMul2({ x, filter, @@ -69912,20 +69718,24 @@ function conv2DImpl({ x, filter, convInfo, backend: backend2, bias = null, prelu leakyreluAlpha }); } - const dimAOuter = isChannelsLast ? convInfo.outHeight * convInfo.outWidth : convInfo.outChannels; - const dimBOuter = isChannelsLast ? convInfo.outChannels : convInfo.outHeight * convInfo.outWidth; - const dimInner = convInfo.filterHeight * convInfo.filterWidth * convInfo.inChannels; + let program; const padInfo = [convInfo.padInfo.top, convInfo.padInfo.left]; const dimensions = [ { type: "int32", data: [convInfo.filterHeight, convInfo.filterWidth] }, { type: "int32", data: [...padInfo] }, { type: "int32", data: [convInfo.strideHeight, convInfo.strideWidth] }, - { type: "int32", data: [convInfo.dilationHeight, convInfo.dilationWidth] }, - { type: "int32", data: [dimAOuter] }, - { type: "int32", data: [dimBOuter] }, - { type: "int32", data: [dimInner] } + { type: "int32", data: [convInfo.dilationHeight, convInfo.dilationWidth] } ]; - const program = new Conv2DMMProgram(convInfo, dimAOuter, dimBOuter, dimInner, hasBias, activation2, hasPreluActivationWeights); + if (useNaiveConv2d) { + program = new Conv2DNaiveProgram(convInfo, hasBias, activation2, hasPreluActivationWeights); + } else { + const dimAOuter = isChannelsLast ? convInfo.outHeight * convInfo.outWidth : convInfo.outChannels; + const dimBOuter = isChannelsLast ? convInfo.outChannels : convInfo.outHeight * convInfo.outWidth; + const dimInner = convInfo.filterHeight * convInfo.filterWidth * convInfo.inChannels; + dimensions.push({ type: "int32", data: [dimAOuter] }, { type: "int32", data: [dimBOuter] }, { type: "int32", data: [dimInner] }); + const sequentialAccessByThreads = backend2.adapterInfo.isIntel(); + program = new Conv2DMMProgram(convInfo, dimAOuter, dimBOuter, dimInner, hasBias, activation2, hasPreluActivationWeights, sequentialAccessByThreads); + } const intermediates = []; const inputVar = [x, filter]; if (hasBias) { @@ -69951,8 +69761,8 @@ function conv2DImpl({ x, filter, convInfo, backend: backend2, bias = null, prelu program.uniforms += " alpha : f32,"; } const out = backend2.runWebGPUProgram(program, inputVar, x.dtype, dimensions); - for (const i of intermediates) { - backend2.disposeData(i.dataId); + for (const i2 of intermediates) { + backend2.disposeData(i2.dataId); } return out; } @@ -70096,7 +69906,7 @@ var Conv2DDerInputProgram2 = class { let batch = coords[0]; let d1 = coords[${channelDim}]; - let dyCorner = vec2(coords[${rowDim}]), coords[${colDim}]) - uniforms.pads; + let dyCorner = vec2(coords[${rowDim}], coords[${colDim}]) - uniforms.pads; let dyRCorner = dyCorner.x; let dyCCorner = dyCorner.y; @@ -70110,7 +69920,7 @@ var Conv2DDerInputProgram2 = class { wRPerm < 0) { continue; } - let idyR = dyR; + let idyR = i32(dyR); for (var wC = 0; wC < uniforms.filterDims.y; wC = wC + 1) { let dyC = (f32(dyCCorner) + f32(wC)) / f32(uniforms.stride.y); @@ -70119,7 +69929,7 @@ var Conv2DDerInputProgram2 = class { fract(dyC) > 0.0 || wCPerm < 0) { continue; } - let idyC = dyC; + let idyC = i32(dyC); for (var d2 = 0; d2 < uniforms.outBackprop[3]; d2 = d2 + 1) { if (${this.isChannelsLast}) { @@ -70168,12 +69978,12 @@ function conv2DBackpropInput5(args) { } ]; let program; - if (env().getBool("WEBGPU_USE_NAIVE_CONV2D_TRANSPOSE")) { + if (env().getBool("WEBGPU_USE_NAIVE_CONV2D_TRANSPOSE") || convInfo.filterHeight <= 2 && convInfo.filterWidth <= 2 && convInfo.outChannels <= 16 && convInfo.inChannels === 1) { program = new Conv2DDerInputProgram2(convInfo); } else { program = new Conv2DDerInputMMProgram(convInfo); - const dimAOuter = convInfo.inShape[1] * convInfo.inShape[2]; - const dimBOuter = convInfo.inShape[3]; + const dimAOuter = convInfo.inHeight * convInfo.inWidth; + const dimBOuter = convInfo.inChannels; const dimInner = convInfo.filterHeight * convInfo.filterWidth * convInfo.outChannels; dimensions.push({ type: "uint32", data: [dimAOuter] }, { type: "uint32", data: [dimBOuter] }, { type: "uint32", data: [dimInner] }); } @@ -70396,10 +70206,10 @@ function cumImpl2(op2, x, backend2, axis, exclusive, reverse5) { } const size2 = permutedX.shape[permutedAxis]; let result = identity5({ inputs: { x: permutedX }, backend: backend2 }); - for (let i = 0; i <= Math.ceil(Math.log2(size2)) - 1; i++) { + for (let i2 = 0; i2 <= Math.ceil(Math.log2(size2)) - 1; i2++) { const program = new CumProgram2(op2, permutedX.shape, false, reverse5); const prevResult = result; - const uniformData = [{ type: "float32", data: [i] }]; + const uniformData = [{ type: "float32", data: [i2] }]; result = backend2.runWebGPUProgram(program, [result], result.dtype, uniformData); backend2.disposeData(prevResult.dataId); } @@ -70641,10 +70451,11 @@ var DepthwiseConv2DVec4Program = class { this.variableNames = ["x", "W"]; this.uniforms = "pad : vec2, inDims : vec2,"; this.workGroupSize = [4, 4, 4]; + this.workPerThread = 4; this.isVec4 = true; this.outputShape = convInfo.outShape; this.dispatchLayout = { x: [3], y: [2], z: [0, 1] }; - this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize, [4, 4, 1]); + this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize, [4, this.workPerThread, 1]); util_exports.assert(convInfo.dataFormat === "channelsLast", () => "TODO: NCHW is unimplemented"); if (addBias) { this.variableNames.push("bias"); @@ -70656,54 +70467,55 @@ var DepthwiseConv2DVec4Program = class { this.addBias = addBias; this.activation = activation2; this.hasPreluActivation = hasPreluActivation; - this.shaderKey = `depthwiseVec4_${activation2}_${this.convInfo.filterHeight}_${this.convInfo.filterWidth}`; + this.shaderKey = `depthwiseVec4_${activation2}_${this.convInfo.filterHeight}_${this.convInfo.filterWidth}_${this.convInfo.strideHeight}_${this.convInfo.strideWidth}_${this.workPerThread}`; } getUserCode() { - const xNumber = 4 + this.convInfo.filterWidth - 1; + const xNumber = (this.workPerThread - 1) * this.convInfo.strideWidth + this.convInfo.filterWidth; const userCode = ` ${activationFnSnippet(this.activation, this.hasPreluActivation, true, 4)} fn readX(batch : i32, row : i32, col : i32, channel : i32) -> vec4 { var value = vec4(0.0); - if (row >=0 && row < uniforms.inDims[0] && col >=0 && col < uniforms.inDims[1]) - { + if (col >=0 && col < uniforms.inDims[1]) { value = getX(batch, row, col, channel); } return value; } + + const strideHeight = ${this.convInfo.strideHeight}; + const strideWidth = ${this.convInfo.strideWidth}; ${getWorkGroupSizeString()} fn _start(@builtin(global_invocation_id) globalId: vec3) { let batch = i32(globalId.z) / uniforms.outShape[1]; let r = i32(globalId.z) % uniforms.outShape[1]; - let c = i32(globalId.y) * 4; + let c = i32(globalId.y) * ${this.workPerThread}; let d1 = i32(globalId.x) * 4; - let xRCCorner = vec2(r, c) - uniforms.pad; + let xRCCorner = vec2(r, c) * vec2(strideHeight, strideWidth) - uniforms.pad; let xRCorner = xRCCorner.x; let xCCorner = xRCCorner.y; var xVals : array, ${xNumber}>; - var dotProd : array, 4>; - dotProd[0] = vec4(0.0); - dotProd[1] = vec4(0.0); - dotProd[2] = vec4(0.0); - dotProd[3] = vec4(0.0); + var dotProd : array, ${this.workPerThread}>; + for (var i = 0; i < ${this.workPerThread}; i++) { + dotProd[i] = vec4(0.0); + } // Use constant instead of uniform can give better performance. for (var wR = 0; wR < ${this.convInfo.filterHeight}; wR = wR + 1) { let xR = xRCorner + wR; - for (var i = 0; i < ${xNumber}; i++) - { - xVals[i] = readX(batch, xR, xCCorner + i, d1); - } - for (var wC = 0; wC < ${this.convInfo.filterWidth}; wC = wC + 1) { - let wValue = getW(wR, wC, d1, 0); - dotProd[0] = dotProd[0] + xVals[0 + wC] * wValue; - dotProd[1] = dotProd[1] + xVals[1 + wC] * wValue; - dotProd[2] = dotProd[2] + xVals[2 + wC] * wValue; - dotProd[3] = dotProd[3] + xVals[3 + wC] * wValue; + if (xR >=0 && xR < uniforms.inDims[0]) { + for (var i = 0; i < ${xNumber}; i++) { + xVals[i] = readX(batch, xR, xCCorner + i, d1); + } + for (var wC = 0; wC < ${this.convInfo.filterWidth}; wC = wC + 1) { + let wValue = getW(wR, wC, d1, 0); + for (var i = 0; i < ${this.workPerThread}; i++) { + dotProd[i] = fma(xVals[i * strideWidth + wC], wValue, dotProd[i]); + } + } } } - for (var i = 0; i < 4; i = i + 1) { + for (var i = 0; i < ${this.workPerThread}; i = i + 1) { let coords = vec4(batch, r, c + i, d1); if (coordsInBounds4D(coords, uniforms.outShape)) { var value = dotProd[i]; @@ -70828,7 +70640,7 @@ function depthwiseConv2dNative3(args) { let program; if (!isChannelsLast && convInfo.inHeight > 16 && convInfo.inWidth > 16 && convInfo.strideHeight === 1 && convInfo.strideWidth === 1 && convInfo.dilationWidth === 1 && convInfo.dilationHeight === 1 && convInfo.inChannels === convInfo.outChannels) { program = new DepthwiseConv2DNCHWSharedProgram(convInfo.outShape, convInfo.filterHeight, convInfo.filterWidth); - } else if (isChannelsLast && convInfo.inHeight > 4 && convInfo.inWidth > 4 && convInfo.strideHeight === 1 && convInfo.strideWidth === 1 && convInfo.inChannels === convInfo.outChannels && convInfo.dilationHeight === 1 && convInfo.dilationWidth === 1 && convInfo.inChannels % 4 === 0) { + } else if (isChannelsLast && convInfo.inHeight > 4 && convInfo.inWidth > 4 && convInfo.strideWidth <= 2 && convInfo.inChannels === convInfo.outChannels && convInfo.dilationHeight === 1 && convInfo.dilationWidth === 1 && convInfo.inChannels % 4 === 0) { program = new DepthwiseConv2DVec4Program(convInfo); } else { program = new DepthwiseConv2DProgram2(convInfo); @@ -70876,8 +70688,8 @@ function einsum4(args) { let out = null; let numDimsRemaining = allDims.length; const tensorsToDispose = []; - for (let i = 0; i < nSteps; ++i) { - for (const idTerm of steps[i]) { + for (let i2 = 0; i2 < nSteps; ++i2) { + for (const idTerm of steps[i2]) { const { permutationIndices: perm, expandDims: dimsToExpand } = backend_util_exports.getEinsumPermutation(numDimsRemaining, idDims[idTerm]); let x; if (backend_util_exports.isIdentityPermutation(perm)) { @@ -70901,13 +70713,13 @@ function einsum4(args) { tensorsToDispose.push(out); } } - if (i < nSteps - 1) { - if (path[i] >= 0) { + if (i2 < nSteps - 1) { + if (path[i2] >= 0) { out = sum6({ inputs: { x: out }, backend: backend2, attrs: { - axis: path[i] - (allDims.length - numDimsRemaining), + axis: path[i2] - (allDims.length - numDimsRemaining), keepDims: false } }); @@ -71078,7 +70890,7 @@ function fromPixels3(args) { pixels.videoHeight ] : [pixels.width, pixels.height]; const outputShape = [height, width, numChannels]; - const importVideo = env().getBool("WEBGPU_IMPORT_EXTERNAL_TEXTURE") && isVideo; + const importVideo = false; const isVideoOrImage = isVideo || isImage; if (isImageBitmap || isCanvas || isVideoOrImage) { let textureInfo; @@ -71134,9 +70946,9 @@ function fromPixels3(args) { pixelArray = new Uint8Array(pixels.width * pixels.height * numChannels); const dataLength = imageData.length; let j = 0; - for (let i = 0; i < dataLength; i++) { - if (i % 4 < numChannels) { - pixelArray[j++] = imageData[i]; + for (let i2 = 0; i2 < dataLength; i2++) { + if (i2 % 4 < numChannels) { + pixelArray[j++] = imageData[i2]; } } } @@ -71262,7 +71074,7 @@ function fusedDepthwiseConv2D3(args) { { type: "int32", data: [convInfo.inHeight, convInfo.inWidth] } ]; let program; - if (convInfo.inHeight > 4 && convInfo.inWidth > 4 && convInfo.strideHeight === 1 && convInfo.strideWidth === 1 && convInfo.inChannels === convInfo.outChannels && convInfo.dilationHeight === 1 && convInfo.dilationWidth === 1 && convInfo.inChannels % 4 === 0) { + if (convInfo.inHeight > 4 && convInfo.inWidth > 4 && convInfo.strideWidth <= 2 && convInfo.inChannels === convInfo.outChannels && convInfo.dilationHeight === 1 && convInfo.dilationWidth === 1 && convInfo.inChannels % 4 === 0) { program = new DepthwiseConv2DVec4Program(convInfo, hasBias, activation2, hasPreluActivationWeights); } else { program = new DepthwiseConv2DProgram2(convInfo, hasBias, activation2, hasPreluActivationWeights); @@ -71383,11 +71195,11 @@ var GatherProgram2 = class { function getSourceCoords4(aShape) { const currentCoords = ["resRC.x", "resRC.y", "resRC.z", "resRC.w"]; const sourceCoords = []; - for (let i = 0; i < aShape.length; i++) { - if (i === 2) { + for (let i2 = 0; i2 < aShape.length; i2++) { + if (i2 === 2) { sourceCoords.push("indexZ"); } else { - sourceCoords.push(`${currentCoords[i]}`); + sourceCoords.push(`${currentCoords[i2]}`); } } return sourceCoords.join(); @@ -71433,14 +71245,14 @@ function gatherV24(args) { const xValues = xBufferInfo.values; const xBuf = buffer(flattenX.shape, flattenX.dtype, xValues); const outBuf = gatherV2ImplCPU2(xBuf, indicesBuf, flattenOutputShape); - toDispose.forEach((t2) => backend2.disposeData(t2.dataId)); + toDispose.forEach((t22) => backend2.disposeData(t22.dataId)); return backend2.makeTensorInfo(shapeInfo.outputShape, outBuf.dtype, outBuf.values); } const program = new GatherProgram2(flattenX.shape, flattenOutputShape); const res = backend2.runWebGPUProgram(program, [flattenX, flattenIndex], flattenX.dtype); toDispose.push(res); const reshaped = reshape6({ inputs: { x: res }, backend: backend2, attrs: { shape: shapeInfo.outputShape } }); - toDispose.forEach((t2) => backend2.disposeData(t2.dataId)); + toDispose.forEach((t22) => backend2.disposeData(t22.dataId)); return reshaped; } var gatherV2Config4 = { @@ -71570,20 +71382,20 @@ var MirrorPadProgram2 = class { this.variableNames = ["x"]; this.workGroupSize = [64, 1, 1]; this.size = true; - this.outputShape = paddings.map((p2, i) => p2[0] + xShape[i] + p2[1]); + this.outputShape = paddings.map((p2, i2) => p2[0] + xShape[i2] + p2[1]); this.dispatchLayout = flatDispatchLayout(this.outputShape); this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize); this.xShape = xShape; - paddings.map((_, i) => { - this.uniforms += ` pad${i} : vec2,`; + paddings.map((_, i2) => { + this.uniforms += ` pad${i2} : vec2,`; }); this.offset = mode === "reflect" ? 0 : 1; this.shaderKey = `mirrorPad_${mode}`; } getUserCode() { const rank = this.xShape.length; - const start = this.xShape.map((_, i) => `uniforms.pad${i}[0]`).join(","); - const end = this.xShape.map((_, i) => `uniforms.pad${i}[0] + uniforms.xShape${rank > 1 ? `[${i}]` : ""}`).join(","); + const start = this.xShape.map((_, i2) => `uniforms.pad${i2}[0]`).join(","); + const end = this.xShape.map((_, i2) => `uniforms.pad${i2}[0] + uniforms.xShape${rank > 1 ? `[${i2}]` : ""}`).join(","); const shaderStart = rank === 1 ? "start" : "start[i]"; const shaderEnd = rank === 1 ? "end" : "end[i]"; const shaderOutC = rank === 1 ? "outC" : "outC[i]"; @@ -71682,14 +71494,14 @@ function zerosLike5(args) { const { x } = inputs; if (x.dtype === "complex64") { const realPart = real4({ inputs: { input: x }, backend: backend2 }); - const r = zerosLike5({ inputs: { x: realPart }, backend: backend2 }); + const r2 = zerosLike5({ inputs: { x: realPart }, backend: backend2 }); const imagPart = imag4({ inputs: { input: x }, backend: backend2 }); - const i = zerosLike5({ inputs: { x: imagPart }, backend: backend2 }); - const result = complex4({ inputs: { real: r, imag: i }, backend: backend2 }); + const i2 = zerosLike5({ inputs: { x: imagPart }, backend: backend2 }); + const result = complex4({ inputs: { real: r2, imag: i2 }, backend: backend2 }); backend2.disposeData(realPart.dataId); - backend2.disposeData(r.dataId); + backend2.disposeData(r2.dataId); backend2.disposeData(imagPart.dataId); - backend2.disposeData(i.dataId); + backend2.disposeData(i2.dataId); return result; } else { return fill5({ @@ -71714,14 +71526,14 @@ function onesLike5(args) { throw new Error("onesLike is not supported under string dtype"); } else if (x.dtype === "complex64") { const realPart = real4({ inputs: { input: x }, backend: backend2 }); - const r = onesLike5({ inputs: { x: realPart }, backend: backend2 }); + const r2 = onesLike5({ inputs: { x: realPart }, backend: backend2 }); const imagPart = imag4({ inputs: { input: x }, backend: backend2 }); - const i = zerosLike5({ inputs: { x: imagPart }, backend: backend2 }); - const result = complex4({ inputs: { real: r, imag: i }, backend: backend2 }); + const i2 = zerosLike5({ inputs: { x: imagPart }, backend: backend2 }); + const result = complex4({ inputs: { real: r2, imag: i2 }, backend: backend2 }); backend2.disposeData(realPart.dataId); - backend2.disposeData(r.dataId); + backend2.disposeData(r2.dataId); backend2.disposeData(imagPart.dataId); - backend2.disposeData(i.dataId); + backend2.disposeData(i2.dataId); return result; } else { return fill5({ attrs: { shape: x.shape, dtype: x.dtype, value: 1 }, backend: backend2 }); @@ -71740,18 +71552,18 @@ function pack4(args) { } const shape = inputs[0].shape; const dtype = inputs[0].dtype; - inputs.forEach((t2) => { - util_exports.assertShapesMatch(shape, t2.shape, "All tensors passed to stack must have matching shapes"); - util_exports.assert(dtype === t2.dtype, () => "All tensors passed to stack must have matching dtypes"); + inputs.forEach((t22) => { + util_exports.assertShapesMatch(shape, t22.shape, "All tensors passed to stack must have matching shapes"); + util_exports.assert(dtype === t22.dtype, () => "All tensors passed to stack must have matching dtypes"); }); const intermediateTensorInfos = []; - const expandedTensors = inputs.map((t2) => { - const expandedT = expandDims6({ inputs: { input: t2 }, backend: backend2, attrs: { dim: axis } }); + const expandedTensors = inputs.map((t22) => { + const expandedT = expandDims6({ inputs: { input: t22 }, backend: backend2, attrs: { dim: axis } }); intermediateTensorInfos.push(expandedT); return expandedT; }); const result = concat5({ inputs: expandedTensors, backend: backend2, attrs: { axis } }); - intermediateTensorInfos.forEach((t2) => backend2.disposeData(t2.dataId)); + intermediateTensorInfos.forEach((t22) => backend2.disposeData(t22.dataId)); return result; } var packConfig4 = { @@ -71765,11 +71577,11 @@ var PadProgram2 = class { this.uniforms = "constantValue : f32,"; this.workGroupSize = [64, 1, 1]; this.size = true; - this.outputShape = paddings.map((p2, i) => p2[0] + xShape[i] + p2[1]); + this.outputShape = paddings.map((p2, i2) => p2[0] + xShape[i2] + p2[1]); this.dispatchLayout = flatDispatchLayout(this.outputShape); this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize); - paddings.map((_, i) => { - this.uniforms += ` pad${i} : vec2,`; + paddings.map((_, i2) => { + this.uniforms += ` pad${i2} : vec2,`; }); this.xShape = xShape; this.shaderKey = "pad"; @@ -71777,8 +71589,8 @@ var PadProgram2 = class { getUserCode() { const rank = this.xShape.length; const type = getCoordsDataType2(rank); - const start = this.xShape.map((_, i) => `uniforms.pad${i}[0]`).join(","); - const end = this.xShape.map((_, i) => `uniforms.pad${i}[0] + uniforms.xShape${rank > 1 ? `[${i}]` : ""}`).join(","); + const start = this.xShape.map((_, i2) => `uniforms.pad${i2}[0]`).join(","); + const end = this.xShape.map((_, i2) => `uniforms.pad${i2}[0] + uniforms.xShape${rank > 1 ? `[${i2}]` : ""}`).join(","); const startValue = rank > 1 ? `${type}(${start})` : `${start}`; const endValue = rank > 1 ? `${type}(${end})` : `${end}`; const leftPadCondition = rank > 1 ? `any(outC < start)` : `outC < start`; @@ -71811,7 +71623,7 @@ var padV23 = (args) => { return identity5({ inputs: { x }, backend: backend2 }); } if (util_exports.sizeFromShape(x.shape) === 0) { - const outputShape = paddings.map((p2, i) => p2[0] + x.shape[i] + p2[1]); + const outputShape = paddings.map((p2, i2) => p2[0] + x.shape[i2] + p2[1]); return fill5({ backend: backend2, attrs: { shape: outputShape, value: constantValue, dtype: x.dtype } @@ -72276,10 +72088,10 @@ var SelectProgram2 = class { const currentCoords = ["resRC.x", "resRC.y", "resRC.z", "resRC.w"]; const cCoordVars = []; const abCoordVars = []; - for (let i = 0; i < this.outputShape.length; i++) { - abCoordVars.push(`${currentCoords[i]}`); - if (i < this.cRank) { - cCoordVars.push(`${currentCoords[i]}`); + for (let i2 = 0; i2 < this.outputShape.length; i2++) { + abCoordVars.push(`${currentCoords[i2]}`); + if (i2 < this.cRank) { + cCoordVars.push(`${currentCoords[i2]}`); } } cCoords = cCoordVars.join(); @@ -72303,9 +72115,9 @@ var SelectProgram2 = class { }; function select5(args) { const { inputs, backend: backend2 } = args; - const { condition, t: t2, e } = inputs; - const program = new SelectProgram2(condition.shape.length, t2.shape, t2.shape.length); - return backend2.runWebGPUProgram(program, [condition, t2, e], upcastType(t2.dtype, e.dtype)); + const { condition, t: t22, e: e2 } = inputs; + const program = new SelectProgram2(condition.shape.length, t22.shape, t22.shape.length); + return backend2.runWebGPUProgram(program, [condition, t22, e2], upcastType(t22.dtype, e2.dtype)); } var selectConfig4 = { kernelName: Select, @@ -72374,7 +72186,7 @@ var spaceToBatchND5 = (args) => { const prod6 = blockShape.reduce((a, b) => a * b); const completePaddings = [[0, 0]]; completePaddings.push(...paddings); - for (let i = 1 + blockShape.length; i < x.shape.length; ++i) { + for (let i2 = 1 + blockShape.length; i2 < x.shape.length; ++i2) { completePaddings.push([0, 0]); } const toDispose = []; @@ -72396,7 +72208,7 @@ var spaceToBatchND5 = (args) => { toDispose.push(paddedX); toDispose.push(reshapedPaddedX); toDispose.push(paddedXT); - toDispose.forEach((t2) => backend2.disposeData(t2.dataId)); + toDispose.forEach((t22) => backend2.disposeData(t22.dataId)); return result; }; var spaceToBatchNDConfig4 = { @@ -72410,8 +72222,8 @@ var TileProgram2 = class { this.workGroupSize = [64, 1, 1]; this.size = true; const outputShape = new Array(aShape.length); - for (let i = 0; i < outputShape.length; i++) { - outputShape[i] = aShape[i] * reps[i]; + for (let i2 = 0; i2 < outputShape.length; i2++) { + outputShape[i2] = aShape[i2] * reps[i2]; } this.outputShape = outputShape; this.dispatchLayout = flatDispatchLayout(this.outputShape); @@ -72441,8 +72253,8 @@ function getSourceCoords5(rank, uniformPrefix = "") { } const currentCoords = ["resRC.x", "resRC.y", "resRC.z", "resRC.w"]; const sourceCoords = []; - for (let i = 0; i < rank; i++) { - sourceCoords.push(`(${currentCoords[i]} % ${uniformPrefix}aShape[${i}])`); + for (let i2 = 0; i2 < rank; i2++) { + sourceCoords.push(`(${currentCoords[i2]} % ${uniformPrefix}aShape[${i2}])`); } return sourceCoords.join(); } @@ -72545,11 +72357,11 @@ function splitV4(args) { const xRank = x.shape.length; const begin = new Array(xRank).fill(0); const size2 = x.shape.slice(); - return splitSizes.map((s) => { + return splitSizes.map((s2) => { const sliceSize = [...size2]; - sliceSize[$axis] = s; + sliceSize[$axis] = s2; const sliceT = slice5({ inputs: { x }, backend: backend2, attrs: { begin, size: sliceSize } }); - begin[$axis] += s; + begin[$axis] += s2; return sliceT; }); } @@ -72602,9 +72414,9 @@ var StridedSliceProgram2 = class { newCoords = "coords * uniforms.strides + uniforms.begin"; } else { let outputAxis = 0; - newCoords = this.outputShape.map((_, i) => { + newCoords = this.outputShape.map((_, i2) => { outputAxis++; - return this.outputShape.length === 1 ? `coords * uniforms.strides[${i}] + uniforms.begin[${i}]` : `coords[${outputAxis - 1}] * uniforms.strides[${i}] + uniforms.begin[${i}]`; + return this.outputShape.length === 1 ? `coords * uniforms.strides[${i2}] + uniforms.begin[${i2}]` : `coords[${outputAxis - 1}] * uniforms.strides[${i2}] + uniforms.begin[${i2}]`; }).join(","); } const userCode = ` @@ -73129,9 +72941,9 @@ function unpack4(args) { const num = value.shape[axis]; const outShape = new Array(xRank - 1); let outIndex = 0; - for (let i = 0; i < xRank; i++) { - if (i !== axis) { - outShape[outIndex++] = x.shape[i]; + for (let i2 = 0; i2 < xRank; i2++) { + if (i2 !== axis) { + outShape[outIndex++] = x.shape[i2]; } } const toDispose = []; @@ -73139,14 +72951,14 @@ function unpack4(args) { const size2 = x.shape.slice(); size2[axis] = 1; const res = new Array(num); - for (let i = 0; i < res.length; i++) { - begin[axis] = i; + for (let i2 = 0; i2 < res.length; i2++) { + begin[axis] = i2; const sliced = slice5({ inputs: { x }, backend: backend2, attrs: { begin, size: size2 } }); const reshaped = reshape6({ inputs: { x: sliced }, backend: backend2, attrs: { shape: outShape } }); - res[i] = reshaped; + res[i2] = reshaped; toDispose.push(sliced); } - toDispose.forEach((t2) => backend2.disposeData(t2.dataId)); + toDispose.forEach((t22) => backend2.disposeData(t22.dataId)); return res; } var unpackConfig4 = { @@ -73263,22 +73075,14 @@ var kernelConfigs4 = [ for (const kernelConfig of kernelConfigs4) { registerKernel(kernelConfig); } -var version9 = "3.20.0"; -var version22 = "3.20.0"; -var version32 = "3.20.0"; -var version42 = "3.20.0"; -var version52 = "3.20.0"; -var version62 = "3.20.0"; -var version72 = "3.20.0"; -var version82 = { - tfjs: version9, - "tfjs-core": version22, - "tfjs-data": version32, - "tfjs-layers": version42, - "tfjs-converter": version52, - "tfjs-backend-webgl": version62, - "tfjs-backend-wasm": version72 -}; +var e = "3.21.0"; +var s = "3.21.0"; +var t = "3.21.0"; +var i = "3.21.0"; +var n = "3.21.0"; +var r = "3.21.0"; +var l = "3.21.0"; +var V = { tfjs: e, "tfjs-core": s, "tfjs-data": t, "tfjs-layers": i, "tfjs-converter": n, "tfjs-backend-webgl": r, "tfjs-backend-wasm": l }; // src/image/imagefxshaders.ts var vertexIdentity = ` @@ -73382,8 +73186,8 @@ var convolution = ` // src/image/imagefx.ts var collect = (source, prefix, collection) => { - const r = new RegExp("\\b" + prefix + " \\w+ (\\w+)", "ig"); - source.replace(r, (match3, name) => { + const r2 = new RegExp("\\b" + prefix + " \\w+ (\\w+)", "ig"); + source.replace(r2, (match3, name) => { collection[name] = 0; return match3; }); @@ -73916,17 +73720,17 @@ function GLImageFilter() { ]); }, emboss: (size2) => { - const s = size2 || 1; + const s2 = size2 || 1; filter.convolution.call(this, [ - -2 * s, - -1 * s, + -2 * s2, + -1 * s2, 0, - -1 * s, + -1 * s2, 1, - 1 * s, + 1 * s2, 0, - 1 * s, - 2 * s + 1 * s2, + 2 * s2 ]); }, blur: (size2) => { @@ -73972,9 +73776,9 @@ function GLImageFilter() { gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST); gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST); gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image2); - for (let i = 0; i < filterChain.length; i++) { - lastInChain = i === filterChain.length - 1; - const f = filterChain[i]; + for (let i2 = 0; i2 < filterChain.length; i2++) { + lastInChain = i2 === filterChain.length - 1; + const f = filterChain[i2]; f.func.apply(this, f.args || []); } return fxcanvas; @@ -74244,20 +74048,20 @@ async function skip(config3, input2) { dispose(last.inputTensor); last.inputTensor = clone(input2); } else { - const t2 = {}; - t2.diff = sub(input2, last.inputTensor); - t2.squared = mul(t2.diff, t2.diff); - t2.sum = sum2(t2.squared); - const diffSum = await t2.sum.data(); + const t3 = {}; + t3.diff = sub(input2, last.inputTensor); + t3.squared = mul(t3.diff, t3.diff); + t3.sum = sum2(t3.squared); + const diffSum = await t3.sum.data(); const diffRelative = diffSum[0] / (input2.shape[1] || 1) / (input2.shape[2] || 1) / 255 / 3; - dispose([last.inputTensor, t2.diff, t2.squared, t2.sum]); + dispose([last.inputTensor, t3.diff, t3.squared, t3.sum]); last.inputTensor = clone(input2); skipFrame = diffRelative <= (config3.cacheSensitivity || 0); } return skipFrame; } async function compare(config3, input1, input2) { - const t2 = {}; + const t3 = {}; if (!input1 || !input2 || input1.shape.length !== 4 || input1.shape.length !== input2.shape.length) { if (!config3.debug) log("invalid input tensor or tensor shapes do not match:", input1.shape, input2.shape); @@ -74268,14 +74072,14 @@ async function compare(config3, input1, input2) { log("input tensors must be of shape [1, height, width, 3]:", input1.shape, input2.shape); return 0; } - t2.input1 = clone(input1); - t2.input2 = input1.shape[1] !== input2.shape[1] || input1.shape[2] !== input2.shape[2] ? image.resizeBilinear(input2, [input1.shape[1], input1.shape[2]]) : clone(input2); - t2.diff = sub(t2.input1, t2.input2); - t2.squared = mul(t2.diff, t2.diff); - t2.sum = sum2(t2.squared); - const diffSum = await t2.sum.data(); + t3.input1 = clone(input1); + t3.input2 = input1.shape[1] !== input2.shape[1] || input1.shape[2] !== input2.shape[2] ? image.resizeBilinear(input2, [input1.shape[1], input1.shape[2]]) : clone(input2); + t3.diff = sub(t3.input1, t3.input2); + t3.squared = mul(t3.diff, t3.diff); + t3.sum = sum2(t3.squared); + const diffSum = await t3.sum.data(); const diffRelative = diffSum[0] / (input1.shape[1] || 1) / (input1.shape[2] || 1) / 255 / 3; - dispose([t2.input1, t2.input2, t2.diff, t2.squared, t2.sum]); + dispose([t3.input1, t3.input2, t3.diff, t3.squared, t3.sum]); return diffRelative; } @@ -74324,7 +74128,7 @@ var Env = class { __publicField(this, "ImageData"); this.browser = typeof navigator !== "undefined"; this.node = typeof process !== "undefined" && typeof process.versions !== "undefined" && typeof process.versions.node !== "undefined"; - this.tfjs = { version: version82["tfjs-core"] }; + this.tfjs = { version: V["tfjs-core"] }; this.offscreen = typeof OffscreenCanvas !== "undefined"; this.initial = true; this.worker = this.browser && this.offscreen ? typeof WorkerGlobalScope !== "undefined" : void 0; @@ -74373,12 +74177,12 @@ var Env = class { const adapter = await navigator.gpu.requestAdapter(); this.webgpu.adapter = adapter ? adapter.name : void 0; } - } catch (e) { + } catch (e2) { this.webgpu.supported = false; } try { this.kernels = getKernelsForBackend(getBackend()).map((kernel) => kernel.kernelName.toLowerCase()); - } catch (e) { + } catch (e2) { } } updateCPU() { @@ -74616,6 +74420,7 @@ __export(models_exports, { "nanodet-m": () => nanodet_m, "nanodet-t": () => nanodet_t, posenet: () => posenet, + rvm: () => rvm, selfie: () => selfie }); var antispoof = 853098; @@ -74630,7 +74435,6 @@ var liveness = 592976; var mb3_centernet = 4030290; var models = 0; var movenet_lightning = 4650216; -var selfie = 212886; var age = 161240; var blazeface_back = 538928; var blazeface_front = 402048; @@ -74661,6 +74465,8 @@ var movenet_multipose = 9448838; var movenet_thunder = 12477112; var nanodet = 7574558; var posenet = 5032780; +var rvm = 3739355; +var selfie = 212886; var blazepose_detect = 5928804; var anti_spoofing = 853098; var efficientpose_i_lite = 2269064; @@ -74688,7 +74494,6 @@ var models_default = { "mb3-centernet": mb3_centernet, models, "movenet-lightning": movenet_lightning, - selfie, age, "blazeface-back": blazeface_back, "blazeface-front": blazeface_front, @@ -74719,6 +74524,8 @@ var models_default = { "movenet-thunder": movenet_thunder, nanodet, posenet, + rvm, + selfie, "blazepose-detect": blazepose_detect, "anti-spoofing": anti_spoofing, "efficientpose-i-lite": efficientpose_i_lite, @@ -74773,7 +74580,7 @@ async function loadModel(modelPath) { let cachedModels = {}; try { cachedModels = options.cacheSupported && options.cacheModels ? await io_exports.listModels() : {}; - } catch (e) { + } catch (e2) { options.cacheSupported = false; } modelStats[shortModelName].inCache = options.cacheSupported && options.cacheModels && Object.keys(cachedModels).includes(cachedModelName); @@ -74814,7 +74621,7 @@ async function loadModel(modelPath) { } // package.json -var version5 = "2.11.0"; +var version5 = "2.11.1"; // src/models.ts var models_exports2 = {}; @@ -78326,14 +78133,14 @@ var computeRotation = (point1, point2) => normalizeRadians(Math.PI / 2 - Math.at var buildTranslationMatrix = (x, y) => [[1, 0, x], [0, 1, y], [0, 0, 1]]; var dot4 = (v1, v2) => { let product = 0; - for (let i = 0; i < v1.length; i++) - product += v1[i] * v2[i]; + for (let i2 = 0; i2 < v1.length; i2++) + product += v1[i2] * v2[i2]; return product; }; var getColumnFrom2DArr = (arr, columnIndex) => { const column = []; - for (let i = 0; i < arr.length; i++) - column.push(arr[i][columnIndex]); + for (let i2 = 0; i2 < arr.length; i2++) + column.push(arr[i2][columnIndex]); return column; }; var multiplyTransformMatrices = (mat1, mat2) => { @@ -78365,16 +78172,16 @@ var rotatePoint = (homogeneousCoordinate, rotationMatrix) => [dot4(homogeneousCo function generateAnchors(inputSize10) { const spec = inputSize10 === 192 ? { strides: [4], anchors: [1] } : { strides: [inputSize10 / 16, inputSize10 / 8], anchors: [2, 6] }; const anchors3 = []; - for (let i = 0; i < spec.strides.length; i++) { - const stride = spec.strides[i]; + for (let i2 = 0; i2 < spec.strides.length; i2++) { + const stride = spec.strides[i2]; const gridRows = Math.floor((inputSize10 + stride - 1) / stride); const gridCols = Math.floor((inputSize10 + stride - 1) / stride); - const anchorsNum = spec.anchors[i]; + const anchorsNum = spec.anchors[i2]; for (let gridY = 0; gridY < gridRows; gridY++) { const anchorY = stride * (gridY + 0.5); for (let gridX = 0; gridX < gridCols; gridX++) { const anchorX = stride * (gridX + 0.5); - for (let n = 0; n < anchorsNum; n++) + for (let n2 = 0; n2 < anchorsNum; n2++) anchors3.push([anchorX, anchorY]); } } @@ -78460,56 +78267,56 @@ async function load2(config3) { return model3; } function decodeBoxes(boxOutputs) { - const t2 = {}; - t2.boxStarts = slice(boxOutputs, [0, 1], [-1, 2]); - t2.centers = add2(t2.boxStarts, anchors); - t2.boxSizes = slice(boxOutputs, [0, 3], [-1, 2]); - t2.boxSizesNormalized = div(t2.boxSizes, inputSizeT); - t2.centersNormalized = div(t2.centers, inputSizeT); - t2.halfBoxSize = div(t2.boxSizesNormalized, constants.tf2); - t2.starts = sub(t2.centersNormalized, t2.halfBoxSize); - t2.ends = add2(t2.centersNormalized, t2.halfBoxSize); - t2.startNormalized = mul(t2.starts, inputSizeT); - t2.endNormalized = mul(t2.ends, inputSizeT); - const boxes = concat2d([t2.startNormalized, t2.endNormalized], 1); - Object.keys(t2).forEach((tensor2) => dispose(t2[tensor2])); + const t3 = {}; + t3.boxStarts = slice(boxOutputs, [0, 1], [-1, 2]); + t3.centers = add2(t3.boxStarts, anchors); + t3.boxSizes = slice(boxOutputs, [0, 3], [-1, 2]); + t3.boxSizesNormalized = div(t3.boxSizes, inputSizeT); + t3.centersNormalized = div(t3.centers, inputSizeT); + t3.halfBoxSize = div(t3.boxSizesNormalized, constants.tf2); + t3.starts = sub(t3.centersNormalized, t3.halfBoxSize); + t3.ends = add2(t3.centersNormalized, t3.halfBoxSize); + t3.startNormalized = mul(t3.starts, inputSizeT); + t3.endNormalized = mul(t3.ends, inputSizeT); + const boxes = concat2d([t3.startNormalized, t3.endNormalized], 1); + Object.keys(t3).forEach((tensor2) => dispose(t3[tensor2])); return boxes; } async function getBoxes(inputImage, config3) { var _a, _b, _c, _d; if (!inputImage || inputImage["isDisposedInternal"] || inputImage.shape.length !== 4 || inputImage.shape[1] < 1 || inputImage.shape[2] < 1) return []; - const t2 = {}; - t2.resized = image.resizeBilinear(inputImage, [inputSize, inputSize]); - t2.div = div(t2.resized, constants.tf127); - t2.normalized = sub(t2.div, constants.tf05); - const res = model3 == null ? void 0 : model3.execute(t2.normalized); + const t3 = {}; + t3.resized = image.resizeBilinear(inputImage, [inputSize, inputSize]); + t3.div = div(t3.resized, constants.tf127); + t3.normalized = sub(t3.div, constants.tf05); + const res = model3 == null ? void 0 : model3.execute(t3.normalized); if (Array.isArray(res) && res.length > 2) { const sorted = res.sort((a, b) => a.size - b.size); - t2.concat384 = concat([sorted[0], sorted[2]], 2); - t2.concat512 = concat([sorted[1], sorted[3]], 2); - t2.concat = concat([t2.concat512, t2.concat384], 1); - t2.batch = squeeze(t2.concat, 0); + t3.concat384 = concat([sorted[0], sorted[2]], 2); + t3.concat512 = concat([sorted[1], sorted[3]], 2); + t3.concat = concat([t3.concat512, t3.concat384], 1); + t3.batch = squeeze(t3.concat, 0); } else if (Array.isArray(res)) { - t2.batch = squeeze(res[0]); + t3.batch = squeeze(res[0]); } else { - t2.batch = squeeze(res); + t3.batch = squeeze(res); } dispose(res); - t2.boxes = decodeBoxes(t2.batch); - t2.logits = slice(t2.batch, [0, 0], [-1, 1]); - t2.sigmoid = sigmoid(t2.logits); - t2.scores = squeeze(t2.sigmoid); - t2.nms = await image.nonMaxSuppressionAsync(t2.boxes, t2.scores, ((_a = config3.face.detector) == null ? void 0 : _a.maxDetected) || 0, ((_b = config3.face.detector) == null ? void 0 : _b.iouThreshold) || 0, ((_c = config3.face.detector) == null ? void 0 : _c.minConfidence) || 0); - const nms = await t2.nms.array(); + t3.boxes = decodeBoxes(t3.batch); + t3.logits = slice(t3.batch, [0, 0], [-1, 1]); + t3.sigmoid = sigmoid(t3.logits); + t3.scores = squeeze(t3.sigmoid); + t3.nms = await image.nonMaxSuppressionAsync(t3.boxes, t3.scores, ((_a = config3.face.detector) == null ? void 0 : _a.maxDetected) || 0, ((_b = config3.face.detector) == null ? void 0 : _b.iouThreshold) || 0, ((_c = config3.face.detector) == null ? void 0 : _c.minConfidence) || 0); + const nms = await t3.nms.array(); const boxes = []; - const scores = await t2.scores.data(); - for (let i = 0; i < nms.length; i++) { - const confidence = scores[nms[i]]; + const scores = await t3.scores.data(); + for (let i2 = 0; i2 < nms.length; i2++) { + const confidence = scores[nms[i2]]; if (confidence > (((_d = config3.face.detector) == null ? void 0 : _d.minConfidence) || 0)) { const b = {}; - b.bbox = slice(t2.boxes, [nms[i], 0], [1, -1]); - b.slice = slice(t2.batch, [nms[i], keypointsCount - 1], [1, -1]); + b.bbox = slice(t3.boxes, [nms[i2], 0], [1, -1]); + b.slice = slice(t3.batch, [nms[i2], keypointsCount - 1], [1, -1]); b.squeeze = squeeze(b.slice); b.landmarks = reshape(b.squeeze, [keypointsCount, -1]); const points = await b.bbox.data(); @@ -78526,7 +78333,7 @@ async function getBoxes(inputImage, config3) { Object.keys(b).forEach((tensor2) => dispose(b[tensor2])); } } - Object.keys(t2).forEach((tensor2) => dispose(t2[tensor2])); + Object.keys(t3).forEach((tensor2) => dispose(t3[tensor2])); return boxes; } @@ -78708,12 +78515,12 @@ async function loadPose(config3) { } function prepareImage(input2, size2) { var _a, _b; - const t2 = {}; + const t3 = {}; if (!((_a = input2 == null ? void 0 : input2.shape) == null ? void 0 : _a[1]) || !((_b = input2 == null ? void 0 : input2.shape) == null ? void 0 : _b[2])) return input2; let final; if (cropBox) { - t2.cropped = image.cropAndResize(input2, [cropBox], [0], [input2.shape[1], input2.shape[2]]); + t3.cropped = image.cropAndResize(input2, [cropBox], [0], [input2.shape[1], input2.shape[2]]); } if (input2.shape[1] !== input2.shape[2]) { const height = [ @@ -78730,16 +78537,16 @@ function prepareImage(input2, size2) { width, [0, 0] ]; - t2.pad = pad(t2.cropped || input2, padding); - t2.resize = image.resizeBilinear(t2.pad, [size2, size2]); - final = div(t2.resize, constants.tf255); + t3.pad = pad(t3.cropped || input2, padding); + t3.resize = image.resizeBilinear(t3.pad, [size2, size2]); + final = div(t3.resize, constants.tf255); } else if (input2.shape[1] !== size2) { - t2.resize = image.resizeBilinear(t2.cropped || input2, [size2, size2]); - final = div(t2.resize, constants.tf255); + t3.resize = image.resizeBilinear(t3.cropped || input2, [size2, size2]); + final = div(t3.resize, constants.tf255); } else { - final = div(t2.cropped || input2, constants.tf255); + final = div(t3.cropped || input2, constants.tf255); } - Object.keys(t2).forEach((tensor2) => dispose(t2[tensor2])); + Object.keys(t3).forEach((tensor2) => dispose(t3[tensor2])); return final; } function rescaleKeypoints(keypoints, outputSize2) { @@ -78781,22 +78588,22 @@ async function detectLandmarks(input2, config3, outputSize2) { var _a, _b; if (!((_a = models2.landmarks) == null ? void 0 : _a["executor"])) return null; - const t2 = {}; - [t2.ld, t2.segmentation, t2.heatmap, t2.world, t2.poseflag] = (_b = models2.landmarks) == null ? void 0 : _b.execute(input2, outputNodes.landmarks); - const poseScore = (await t2.poseflag.data())[0]; - const points = await t2.ld.data(); - const distances = await t2.world.data(); - Object.keys(t2).forEach((tensor2) => dispose(t2[tensor2])); + const t3 = {}; + [t3.ld, t3.segmentation, t3.heatmap, t3.world, t3.poseflag] = (_b = models2.landmarks) == null ? void 0 : _b.execute(input2, outputNodes.landmarks); + const poseScore = (await t3.poseflag.data())[0]; + const points = await t3.ld.data(); + const distances = await t3.world.data(); + Object.keys(t3).forEach((tensor2) => dispose(t3[tensor2])); const keypointsRelative = []; const depth = 5; - for (let i = 0; i < points.length / depth; i++) { - const score = sigmoid6(points[depth * i + 3]); - const presence = sigmoid6(points[depth * i + 4]); + for (let i2 = 0; i2 < points.length / depth; i2++) { + const score = sigmoid6(points[depth * i2 + 3]); + const presence = sigmoid6(points[depth * i2 + 4]); const adjScore = Math.trunc(100 * score * presence * poseScore) / 100; - const positionRaw = [points[depth * i + 0] / inputSize3.landmarks[0], points[depth * i + 1] / inputSize3.landmarks[1], points[depth * i + 2] + 0]; + const positionRaw = [points[depth * i2 + 0] / inputSize3.landmarks[0], points[depth * i2 + 1] / inputSize3.landmarks[1], points[depth * i2 + 2] + 0]; const position = [Math.trunc(outputSize2[0] * positionRaw[0]), Math.trunc(outputSize2[1] * positionRaw[1]), positionRaw[2]]; - const distance2 = [distances[depth * i + 0], distances[depth * i + 1], distances[depth * i + 2] + 0]; - keypointsRelative.push({ part: kpt[i], positionRaw, position, distance: distance2, score: adjScore }); + const distance2 = [distances[depth * i2 + 0], distances[depth * i2 + 1], distances[depth * i2 + 2] + 0]; + keypointsRelative.push({ part: kpt[i2], positionRaw, position, distance: distance2, score: adjScore }); } if (poseScore < (config3.body.minConfidence || 0)) return null; @@ -78807,9 +78614,9 @@ async function detectLandmarks(input2, config3, outputSize2) { const annotations2 = {}; for (const [name, indexes] of Object.entries(connected)) { const pt = []; - for (let i = 0; i < indexes.length - 1; i++) { - const pt0 = keypoints.find((kpt4) => kpt4.part === indexes[i]); - const pt1 = keypoints.find((kpt4) => kpt4.part === indexes[i + 1]); + for (let i2 = 0; i2 < indexes.length - 1; i2++) { + const pt0 = keypoints.find((kpt4) => kpt4.part === indexes[i2]); + const pt1 = keypoints.find((kpt4) => kpt4.part === indexes[i2 + 1]); if (pt0 && pt1) pt.push([pt0.position, pt1.position]); } @@ -78825,10 +78632,10 @@ async function predict2(input2, config3) { if (config3.skipAllowed && skipTime && skipFrame && cache !== null) { skipped2++; } else { - const t2 = {}; - t2.landmarks = prepareImage(input2, 256); - cache = await detectLandmarks(t2.landmarks, config3, outputSize2); - Object.keys(t2).forEach((tensor2) => dispose(t2[tensor2])); + const t3 = {}; + t3.landmarks = prepareImage(input2, 256); + cache = await detectLandmarks(t3.landmarks, config3, outputSize2); + Object.keys(t3).forEach((tensor2) => dispose(t3[tensor2])); lastTime2 = now(); skipped2 = 0; } @@ -78939,19 +78746,19 @@ async function load3(config3) { async function process3(res, outputShape, config3) { if (!res) return []; - const t2 = {}; + const t3 = {}; const results = []; const detections = await res.array(); - t2.squeeze = squeeze(res); - const arr = split(t2.squeeze, 6, 1); - t2.stack = stack([arr[1], arr[0], arr[3], arr[2]], 1); - t2.boxes = squeeze(t2.stack); - t2.scores = squeeze(arr[4]); - t2.classes = squeeze(arr[5]); + t3.squeeze = squeeze(res); + const arr = split(t3.squeeze, 6, 1); + t3.stack = stack([arr[1], arr[0], arr[3], arr[2]], 1); + t3.boxes = squeeze(t3.stack); + t3.scores = squeeze(arr[4]); + t3.classes = squeeze(arr[5]); dispose([res, ...arr]); - t2.nms = await image.nonMaxSuppressionAsync(t2.boxes, t2.scores, config3.object.maxDetected, config3.object.iouThreshold, config3.object.minConfidence || 0); - const nms = await t2.nms.data(); - let i = 0; + t3.nms = await image.nonMaxSuppressionAsync(t3.boxes, t3.scores, config3.object.maxDetected, config3.object.iouThreshold, config3.object.minConfidence || 0); + const nms = await t3.nms.data(); + let i2 = 0; for (const id of Array.from(nms)) { const score = Math.trunc(100 * detections[0][id][4]) / 100; const classVal = detections[0][id][5]; @@ -78974,9 +78781,9 @@ async function process3(res, outputShape, config3) { Math.trunc(boxRaw[2] * outputShape[0]), Math.trunc(boxRaw[3] * outputShape[1]) ]; - results.push({ id: i++, score, class: classVal, label, box, boxRaw }); + results.push({ id: i2++, score, class: classVal, label, box, boxRaw }); } - Object.keys(t2).forEach((tensor2) => dispose(t2[tensor2])); + Object.keys(t3).forEach((tensor2) => dispose(t3[tensor2])); return results; } async function predict3(input2, config3) { @@ -79112,7 +78919,7 @@ async function predict4(image2, config3) { }); } } - stack2.forEach((s) => dispose(s)); + stack2.forEach((s2) => dispose(s2)); } cache2.score = cache2.keypoints.reduce((prev, curr) => curr.score > prev ? curr.score : prev, 0); const x = cache2.keypoints.map((a) => a.position[0]); @@ -79133,9 +78940,9 @@ async function predict4(image2, config3) { ]; for (const [name, indexes] of Object.entries(connected2)) { const pt = []; - for (let i = 0; i < indexes.length - 1; i++) { - const pt0 = cache2.keypoints.find((kpt4) => kpt4.part === indexes[i]); - const pt1 = cache2.keypoints.find((kpt4) => kpt4.part === indexes[i + 1]); + for (let i2 = 0; i2 < indexes.length - 1; i2++) { + const pt0 = cache2.keypoints.find((kpt4) => kpt4.part === indexes[i2]); + const pt1 = cache2.keypoints.find((kpt4) => kpt4.part === indexes[i2 + 1]); if (pt0 && pt1 && pt0.score > (config3.body.minConfidence || 0) && pt1.score > (config3.body.minConfidence || 0)) pt.push([pt0.position, pt1.position]); } @@ -79177,22 +78984,22 @@ async function predict5(image2, config3, idx, count3) { var _a2; const obj = []; if ((_a2 = config3.face.emotion) == null ? void 0 : _a2.enabled) { - const t2 = {}; + const t3 = {}; const inputSize10 = (model6 == null ? void 0 : model6.inputs[0].shape) ? model6.inputs[0].shape[2] : 0; - t2.resize = image.resizeBilinear(image2, [inputSize10, inputSize10], false); - t2.channels = mul(t2.resize, constants.rgb); - t2.grayscale = sum2(t2.channels, 3, true); - t2.grayscaleSub = sub(t2.grayscale, constants.tf05); - t2.grayscaleMul = mul(t2.grayscaleSub, constants.tf2); - t2.emotion = model6 == null ? void 0 : model6.execute(t2.grayscaleMul); + t3.resize = image.resizeBilinear(image2, [inputSize10, inputSize10], false); + t3.channels = mul(t3.resize, constants.rgb); + t3.grayscale = sum2(t3.channels, 3, true); + t3.grayscaleSub = sub(t3.grayscale, constants.tf05); + t3.grayscaleMul = mul(t3.grayscaleSub, constants.tf2); + t3.emotion = model6 == null ? void 0 : model6.execute(t3.grayscaleMul); lastTime5 = now(); - const data = await t2.emotion.data(); - for (let i = 0; i < data.length; i++) { - if (data[i] > (config3.face.emotion.minConfidence || 0)) - obj.push({ score: Math.min(0.99, Math.trunc(100 * data[i]) / 100), emotion: annotations[i] }); + const data = await t3.emotion.data(); + for (let i2 = 0; i2 < data.length; i2++) { + if (data[i2] > (config3.face.emotion.minConfidence || 0)) + obj.push({ score: Math.min(0.99, Math.trunc(100 * data[i2]) / 100), emotion: annotations[i2] }); } obj.sort((a, b) => b.score - a.score); - Object.keys(t2).forEach((tensor2) => dispose(t2[tensor2])); + Object.keys(t3).forEach((tensor2) => dispose(t3[tensor2])); } last3[idx] = obj; lastCount2 = count3; @@ -79230,8 +79037,8 @@ async function load6(config3) { return model7; } function replaceIrisCoords(rawCoords, newCoords, prefix, keys) { - for (let i = 0; i < irisIndices.length; i++) { - const { key, indices } = irisIndices[i]; + for (let i2 = 0; i2 < irisIndices.length; i2++) { + const { key, indices } = irisIndices[i2]; const originalIndices = meshAnnotations[`${prefix}${key}`]; if (!keys || keys.includes(key)) { for (let j = 0; j < indices.length; j++) { @@ -79268,10 +79075,10 @@ var getEyeBox = (rawCoords, face4, eyeInnerCornerIndex, eyeOuterCornerIndex, mes }; var getEyeCoords = (eyeData, eyeBox, eyeBoxSize, flip = false) => { const eyeRawCoords = []; - for (let i = 0; i < irisLandmarks.numCoordinates; i++) { - const x = eyeData[i * 3]; - const y = eyeData[i * 3 + 1]; - const z = eyeData[i * 3 + 2]; + for (let i2 = 0; i2 < irisLandmarks.numCoordinates; i2++) { + const x = eyeData[i2 * 3]; + const y = eyeData[i2 * 3 + 1]; + const z = eyeData[i2 * 3 + 2]; eyeRawCoords.push([ (flip ? 1 - x / inputSize5 : x / inputSize5) * eyeBoxSize[0] + eyeBox.startPoint[0], y / inputSize5 * eyeBoxSize[1] + eyeBox.startPoint[1], @@ -79284,11 +79091,11 @@ var getAdjustedIrisCoords = (rawCoords, irisCoords, direction) => { const upperCenterZ = rawCoords[meshAnnotations[`${direction}EyeUpper0`][irisLandmarks.upperCenter]][2]; const lowerCenterZ = rawCoords[meshAnnotations[`${direction}EyeLower0`][irisLandmarks.lowerCenter]][2]; const averageZ = (upperCenterZ + lowerCenterZ) / 2; - return irisCoords.map((coord, i) => { + return irisCoords.map((coord, i2) => { let z = averageZ; - if (i === 2) { + if (i2 === 2) { z = upperCenterZ; - } else if (i === 4) { + } else if (i2 === 4) { z = lowerCenterZ; } return [coord[0], coord[1], z]; @@ -79661,29 +79468,29 @@ var LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG = [ // src/face/attention.ts async function augment(rawCoords, results) { var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j; - const t2 = { - lips: await ((_b = (_a = results.filter((r) => r.size === 160)) == null ? void 0 : _a[0]) == null ? void 0 : _b.data()), - irisL: await ((_d = (_c = results.filter((r) => r.size === 10)) == null ? void 0 : _c[0]) == null ? void 0 : _d.data()), - eyeL: await ((_f = (_e = results.filter((r) => r.size === 142)) == null ? void 0 : _e[0]) == null ? void 0 : _f.data()), - irisR: await ((_h = (_g = results.filter((r) => r.size === 10)) == null ? void 0 : _g[1]) == null ? void 0 : _h.data()), - eyeR: await ((_j = (_i = results.filter((r) => r.size === 142)) == null ? void 0 : _i[1]) == null ? void 0 : _j.data()) + const t3 = { + lips: await ((_b = (_a = results.filter((r2) => r2.size === 160)) == null ? void 0 : _a[0]) == null ? void 0 : _b.data()), + irisL: await ((_d = (_c = results.filter((r2) => r2.size === 10)) == null ? void 0 : _c[0]) == null ? void 0 : _d.data()), + eyeL: await ((_f = (_e = results.filter((r2) => r2.size === 142)) == null ? void 0 : _e[0]) == null ? void 0 : _f.data()), + irisR: await ((_h = (_g = results.filter((r2) => r2.size === 10)) == null ? void 0 : _g[1]) == null ? void 0 : _h.data()), + eyeR: await ((_j = (_i = results.filter((r2) => r2.size === 142)) == null ? void 0 : _i[1]) == null ? void 0 : _j.data()) }; - for (const val of Object.values(t2)) { + for (const val of Object.values(t3)) { if (!val) return rawCoords; } const irisLDepth = LANDMARKS_REFINEMENT_LEFT_EYE_CONFIG.reduce((prev, curr) => prev += rawCoords[curr][2], 0) / LANDMARKS_REFINEMENT_LEFT_EYE_CONFIG.length; - for (let i = 0; i < t2.irisL.length / 2; i++) - rawCoords.push([t2.irisL[2 * i + 0], t2.irisL[2 * i + 1], irisLDepth]); + for (let i2 = 0; i2 < t3.irisL.length / 2; i2++) + rawCoords.push([t3.irisL[2 * i2 + 0], t3.irisL[2 * i2 + 1], irisLDepth]); const irisRDepth = LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG.reduce((prev, curr) => prev += rawCoords[curr][2], 0) / LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG.length; - for (let i = 0; i < t2.irisR.length / 2; i++) - rawCoords.push([t2.irisR[2 * i + 0], t2.irisR[2 * i + 1], irisRDepth]); - for (let i = 0; i < t2.eyeL.length / 2; i++) - rawCoords[LANDMARKS_REFINEMENT_LEFT_EYE_CONFIG[i]] = [t2.eyeL[2 * i + 0], t2.eyeL[2 * i + 1], rawCoords[LANDMARKS_REFINEMENT_LEFT_EYE_CONFIG[i]][2]]; - for (let i = 0; i < t2.eyeR.length / 2; i++) - rawCoords[LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG[i]] = [t2.eyeR[2 * i + 0], t2.eyeR[2 * i + 1], rawCoords[LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG[i]][2]]; - for (let i = 0; i < t2.lips.length / 2; i++) - rawCoords[LANDMARKS_REFINEMENT_LIPS_CONFIG[i]] = [t2.lips[2 * i + 0], t2.lips[2 * i + 1], rawCoords[LANDMARKS_REFINEMENT_LIPS_CONFIG[i]][2]]; + for (let i2 = 0; i2 < t3.irisR.length / 2; i2++) + rawCoords.push([t3.irisR[2 * i2 + 0], t3.irisR[2 * i2 + 1], irisRDepth]); + for (let i2 = 0; i2 < t3.eyeL.length / 2; i2++) + rawCoords[LANDMARKS_REFINEMENT_LEFT_EYE_CONFIG[i2]] = [t3.eyeL[2 * i2 + 0], t3.eyeL[2 * i2 + 1], rawCoords[LANDMARKS_REFINEMENT_LEFT_EYE_CONFIG[i2]][2]]; + for (let i2 = 0; i2 < t3.eyeR.length / 2; i2++) + rawCoords[LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG[i2]] = [t3.eyeR[2 * i2 + 0], t3.eyeR[2 * i2 + 1], rawCoords[LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG[i2]][2]]; + for (let i2 = 0; i2 < t3.lips.length / 2; i2++) + rawCoords[LANDMARKS_REFINEMENT_LIPS_CONFIG[i2]] = [t3.lips[2 * i2 + 0], t3.lips[2 * i2 + 1], rawCoords[LANDMARKS_REFINEMENT_LIPS_CONFIG[i2]][2]]; return rawCoords; } @@ -79712,8 +79519,8 @@ async function predict6(input2, config3) { const newCache = []; let id = 0; const size2 = inputSize6; - for (let i = 0; i < cache3.boxes.length; i++) { - const box = cache3.boxes[i]; + for (let i2 = 0; i2 < cache3.boxes.length; i2++) { + const box = cache3.boxes[i2]; let angle = 0; let rotationMatrix; const face4 = { @@ -79757,7 +79564,7 @@ async function predict6(input2, config3) { return faces; } const results = model8.execute(face4.tensor); - const confidenceT = results.find((t2) => t2.shape[t2.shape.length - 1] === 1); + const confidenceT = results.find((t3) => t3.shape[t3.shape.length - 1] === 1); const faceConfidence = await confidenceT.data(); face4.faceScore = Math.round(100 * faceConfidence[0]) / 100; if (face4.faceScore < (((_g = config3.face.detector) == null ? void 0 : _g.minConfidence) || 1)) { @@ -79776,7 +79583,7 @@ async function predict6(input2, config3) { } } } else { - const meshT = results.find((t2) => t2.shape[t2.shape.length - 1] === 1404); + const meshT = results.find((t3) => t3.shape[t3.shape.length - 1] === 1404); const coordsReshaped = reshape(meshT, [-1, 3]); let rawCoords = await coordsReshaped.array(); dispose(coordsReshaped); @@ -79876,25 +79683,25 @@ async function predict7(image2, config3, idx, count3) { const resT = model9 == null ? void 0 : model9.execute(enhanced); lastTime6 = now(); dispose(enhanced); - const genderT = resT.find((t2) => t2.shape[1] === 1); + const genderT = resT.find((t3) => t3.shape[1] === 1); const gender2 = await genderT.data(); const confidence = Math.trunc(200 * Math.abs(gender2[0] - 0.5)) / 100; if (confidence > (config3.face.description.minConfidence || 0)) { obj.gender = gender2[0] <= 0.5 ? "female" : "male"; obj.genderScore = Math.min(0.99, confidence); } - const argmax2 = argMax(resT.find((t2) => t2.shape[1] === 100), 1); + const argmax2 = argMax(resT.find((t3) => t3.shape[1] === 100), 1); const ageIdx = (await argmax2.data())[0]; dispose(argmax2); - const ageT = resT.find((t2) => t2.shape[1] === 100); + const ageT = resT.find((t3) => t3.shape[1] === 100); const all6 = await ageT.data(); obj.age = Math.round(all6[ageIdx - 1] > all6[ageIdx + 1] ? 10 * ageIdx - 100 * all6[ageIdx - 1] : 10 * ageIdx + 100 * all6[ageIdx + 1]) / 10; if (Number.isNaN(gender2[0]) || Number.isNaN(all6[0])) log("faceres error:", { model: model9, result: resT }); - const desc = resT.find((t2) => t2.shape[1] === 1024); + const desc = resT.find((t3) => t3.shape[1] === 1024); const descriptor = desc ? await desc.data() : []; obj.descriptor = Array.from(descriptor); - resT.forEach((t2) => dispose(t2)); + resT.forEach((t3) => dispose(t3)); } last4[idx] = obj; lastCount3 = count3; @@ -79935,28 +79742,28 @@ async function predict8(image2, config3, idx, count3) { var _a2, _b2; if (!(model10 == null ? void 0 : model10.inputs[0].shape)) return; - const t2 = {}; + const t3 = {}; const box = [[0, 0.1, 0.9, 0.9]]; - t2.resize = image.cropAndResize(image2, box, [0], [model10.inputs[0].shape[2], model10.inputs[0].shape[1]]); + t3.resize = image.cropAndResize(image2, box, [0], [model10.inputs[0].shape[2], model10.inputs[0].shape[1]]); const obj = { age: 0, gender: "unknown", genderScore: 0, race: [] }; if ((_a2 = config3.face.gear) == null ? void 0 : _a2.enabled) - [t2.age, t2.gender, t2.race] = model10.execute(t2.resize, ["age_output", "gender_output", "race_output"]); - const gender2 = await t2.gender.data(); + [t3.age, t3.gender, t3.race] = model10.execute(t3.resize, ["age_output", "gender_output", "race_output"]); + const gender2 = await t3.gender.data(); obj.gender = gender2[0] > gender2[1] ? "male" : "female"; obj.genderScore = Math.round(100 * (gender2[0] > gender2[1] ? gender2[0] : gender2[1])) / 100; - const race = await t2.race.data(); - for (let i = 0; i < race.length; i++) { - if (race[i] > (((_b2 = config3.face.gear) == null ? void 0 : _b2.minConfidence) || 0.2)) - obj.race.push({ score: Math.round(100 * race[i]) / 100, race: raceNames[i] }); + const race = await t3.race.data(); + for (let i2 = 0; i2 < race.length; i2++) { + if (race[i2] > (((_b2 = config3.face.gear) == null ? void 0 : _b2.minConfidence) || 0.2)) + obj.race.push({ score: Math.round(100 * race[i2]) / 100, race: raceNames[i2] }); } obj.race.sort((a, b) => b.score - a.score); - const ageDistribution = Array.from(await t2.age.data()); - const ageSorted = ageDistribution.map((a, i) => [ageWeights[i], a]).sort((a, b) => b[1] - a[1]); + const ageDistribution = Array.from(await t3.age.data()); + const ageSorted = ageDistribution.map((a, i2) => [ageWeights[i2], a]).sort((a, b) => b[1] - a[1]); let age2 = ageSorted[0][0]; - for (let i = 1; i < ageSorted.length; i++) - age2 += ageSorted[i][1] * (ageSorted[i][0] - age2); + for (let i2 = 1; i2 < ageSorted.length; i2++) + age2 += ageSorted[i2][1] * (ageSorted[i2][0] - age2); obj.age = Math.round(10 * age2) / 10; - Object.keys(t2).forEach((tensor2) => dispose(t2[tensor2])); + Object.keys(t3).forEach((tensor2) => dispose(t3[tensor2])); last5[idx] = obj; lastCount4 = count3; lastTime7 = now(); @@ -80024,15 +79831,15 @@ function computeRotation2(point1, point2) { var buildTranslationMatrix2 = (x, y) => [[1, 0, x], [0, 1, y], [0, 0, 1]]; function dot5(v1, v2) { let product = 0; - for (let i = 0; i < v1.length; i++) { - product += v1[i] * v2[i]; + for (let i2 = 0; i2 < v1.length; i2++) { + product += v1[i2] * v2[i2]; } return product; } function getColumnFrom2DArr2(arr, columnIndex) { const column = []; - for (let i = 0; i < arr.length; i++) { - column.push(arr[i][columnIndex]); + for (let i2 = 0; i2 < arr.length; i2++) { + column.push(arr[i2][columnIndex]); } return column; } @@ -83042,50 +82849,50 @@ var HandDetector = class { this.doubleInputSizeTensor = tensor1d([this.inputSize * 2, this.inputSize * 2]); } normalizeBoxes(boxes) { - const t2 = {}; - t2.boxOffsets = slice(boxes, [0, 0], [-1, 2]); - t2.boxSizes = slice(boxes, [0, 2], [-1, 2]); - t2.div = div(t2.boxOffsets, this.inputSizeTensor); - t2.boxCenterPoints = add2(t2.div, this.anchorsTensor); - t2.halfBoxSizes = div(t2.boxSizes, this.doubleInputSizeTensor); - t2.sub = sub(t2.boxCenterPoints, t2.halfBoxSizes); - t2.startPoints = mul(t2.sub, this.inputSizeTensor); - t2.add = add2(t2.boxCenterPoints, t2.halfBoxSizes); - t2.endPoints = mul(t2.add, this.inputSizeTensor); - const res = concat2d([t2.startPoints, t2.endPoints], 1); - Object.keys(t2).forEach((tensor2) => dispose(t2[tensor2])); + const t3 = {}; + t3.boxOffsets = slice(boxes, [0, 0], [-1, 2]); + t3.boxSizes = slice(boxes, [0, 2], [-1, 2]); + t3.div = div(t3.boxOffsets, this.inputSizeTensor); + t3.boxCenterPoints = add2(t3.div, this.anchorsTensor); + t3.halfBoxSizes = div(t3.boxSizes, this.doubleInputSizeTensor); + t3.sub = sub(t3.boxCenterPoints, t3.halfBoxSizes); + t3.startPoints = mul(t3.sub, this.inputSizeTensor); + t3.add = add2(t3.boxCenterPoints, t3.halfBoxSizes); + t3.endPoints = mul(t3.add, this.inputSizeTensor); + const res = concat2d([t3.startPoints, t3.endPoints], 1); + Object.keys(t3).forEach((tensor2) => dispose(t3[tensor2])); return res; } normalizeLandmarks(rawPalmLandmarks, index2) { - const t2 = {}; - t2.reshape = reshape(rawPalmLandmarks, [-1, 7, 2]); - t2.div = div(t2.reshape, this.inputSizeTensor); - t2.landmarks = add2(t2.div, this.anchors[index2] ? this.anchors[index2] : 0); - const res = mul(t2.landmarks, this.inputSizeTensor); - Object.keys(t2).forEach((tensor2) => dispose(t2[tensor2])); + const t3 = {}; + t3.reshape = reshape(rawPalmLandmarks, [-1, 7, 2]); + t3.div = div(t3.reshape, this.inputSizeTensor); + t3.landmarks = add2(t3.div, this.anchors[index2] ? this.anchors[index2] : 0); + const res = mul(t3.landmarks, this.inputSizeTensor); + Object.keys(t3).forEach((tensor2) => dispose(t3[tensor2])); return res; } async predict(input2, config3) { var _a; - const t2 = {}; - t2.resize = image.resizeBilinear(input2, [this.inputSize, this.inputSize]); - t2.div = div(t2.resize, constants.tf127); - t2.image = sub(t2.div, constants.tf1); - t2.batched = this.model.execute(t2.image); - t2.predictions = squeeze(t2.batched); - t2.slice = slice(t2.predictions, [0, 0], [-1, 1]); - t2.sigmoid = sigmoid(t2.slice); - t2.scores = squeeze(t2.sigmoid); - const scores = await t2.scores.data(); - t2.boxes = slice(t2.predictions, [0, 1], [-1, 4]); - t2.norm = this.normalizeBoxes(t2.boxes); - t2.nms = await image.nonMaxSuppressionAsync(t2.norm, t2.scores, 3 * (((_a = config3.hand) == null ? void 0 : _a.maxDetected) || 1), config3.hand.iouThreshold, config3.hand.minConfidence); - const nms = await t2.nms.array(); + const t3 = {}; + t3.resize = image.resizeBilinear(input2, [this.inputSize, this.inputSize]); + t3.div = div(t3.resize, constants.tf127); + t3.image = sub(t3.div, constants.tf1); + t3.batched = this.model.execute(t3.image); + t3.predictions = squeeze(t3.batched); + t3.slice = slice(t3.predictions, [0, 0], [-1, 1]); + t3.sigmoid = sigmoid(t3.slice); + t3.scores = squeeze(t3.sigmoid); + const scores = await t3.scores.data(); + t3.boxes = slice(t3.predictions, [0, 1], [-1, 4]); + t3.norm = this.normalizeBoxes(t3.boxes); + t3.nms = await image.nonMaxSuppressionAsync(t3.norm, t3.scores, 3 * (((_a = config3.hand) == null ? void 0 : _a.maxDetected) || 1), config3.hand.iouThreshold, config3.hand.minConfidence); + const nms = await t3.nms.array(); const hands = []; for (const index2 of nms) { const p2 = {}; - p2.box = slice(t2.norm, [index2, 0], [1, -1]); - p2.slice = slice(t2.predictions, [index2, 5], [1, 14]); + p2.box = slice(t3.norm, [index2, 0], [1, -1]); + p2.slice = slice(t3.predictions, [index2, 5], [1, 14]); p2.norm = this.normalizeLandmarks(p2.slice, index2); p2.palmLandmarks = reshape(p2.norm, [-1, 2]); const box = await p2.box.data(); @@ -83097,7 +82904,7 @@ var HandDetector = class { hands.push(scaled); Object.keys(p2).forEach((tensor2) => dispose(p2[tensor2])); } - Object.keys(t2).forEach((tensor2) => dispose(t2[tensor2])); + Object.keys(t3).forEach((tensor2) => dispose(t3[tensor2])); return hands; } }; @@ -83141,8 +82948,8 @@ var HandPipeline = class { const boundingBox = this.calculateLandmarksBoundingBox(landmarks); const boxAroundHand = enlargeBox2(squarifyBox2(boundingBox), handBoxEnlargeFactor); boxAroundHand.palmLandmarks = []; - for (let i = 0; i < palmLandmarkIds.length; i++) { - boxAroundHand.palmLandmarks.push(landmarks[palmLandmarkIds[i]].slice(0, 2)); + for (let i2 = 0; i2 < palmLandmarkIds.length; i2++) { + boxAroundHand.palmLandmarks.push(landmarks[palmLandmarkIds[i2]].slice(0, 2)); } return boxAroundHand; } @@ -83189,8 +82996,8 @@ var HandPipeline = class { useFreshBox = true; } const hands = []; - for (let i = 0; i < this.storedBoxes.length; i++) { - const currentBox = this.storedBoxes[i]; + for (let i2 = 0; i2 < this.storedBoxes.length; i2++) { + const currentBox = this.storedBoxes[i2]; if (!currentBox) continue; if (config3.hand.landmarks) { @@ -83216,7 +83023,7 @@ var HandPipeline = class { dispose(keypointsReshaped); const coords3 = this.transformRawCoords(rawCoords, newBox, angle, rotationMatrix); const nextBoundingBox = this.getBoxForHandLandmarks(coords3); - this.storedBoxes[i] = { ...nextBoundingBox, confidence }; + this.storedBoxes[i2] = { ...nextBoundingBox, confidence }; const result = { landmarks: coords3, confidence, @@ -83226,7 +83033,7 @@ var HandPipeline = class { }; hands.push(result); } else { - this.storedBoxes[i] = null; + this.storedBoxes[i2] = null; } dispose(keypoints); } else { @@ -83669,14 +83476,14 @@ async function predict9(input2, config3) { if (!predictions) return []; const hands = []; - for (let i = 0; i < predictions.length; i++) { + for (let i2 = 0; i2 < predictions.length; i2++) { const annotations2 = {}; - if (predictions[i].landmarks) { + if (predictions[i2].landmarks) { for (const key of Object.keys(meshAnnotations2)) { - annotations2[key] = meshAnnotations2[key].map((index2) => predictions[i].landmarks[index2]); + annotations2[key] = meshAnnotations2[key].map((index2) => predictions[i2].landmarks[index2]); } } - const keypoints = predictions[i].landmarks; + const keypoints = predictions[i2].landmarks; let box = [Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER, 0, 0]; let boxRaw = [0, 0, 0, 0]; if (keypoints && keypoints.length > 0) { @@ -83694,25 +83501,25 @@ async function predict9(input2, config3) { box[3] -= box[1]; boxRaw = [box[0] / (input2.shape[2] || 0), box[1] / (input2.shape[1] || 0), box[2] / (input2.shape[2] || 0), box[3] / (input2.shape[1] || 0)]; } else { - box = predictions[i].box ? [ - Math.trunc(Math.max(0, predictions[i].box.topLeft[0])), - Math.trunc(Math.max(0, predictions[i].box.topLeft[1])), - Math.trunc(Math.min(input2.shape[2] || 0, predictions[i].box.bottomRight[0]) - Math.max(0, predictions[i].box.topLeft[0])), - Math.trunc(Math.min(input2.shape[1] || 0, predictions[i].box.bottomRight[1]) - Math.max(0, predictions[i].box.topLeft[1])) + box = predictions[i2].box ? [ + Math.trunc(Math.max(0, predictions[i2].box.topLeft[0])), + Math.trunc(Math.max(0, predictions[i2].box.topLeft[1])), + Math.trunc(Math.min(input2.shape[2] || 0, predictions[i2].box.bottomRight[0]) - Math.max(0, predictions[i2].box.topLeft[0])), + Math.trunc(Math.min(input2.shape[1] || 0, predictions[i2].box.bottomRight[1]) - Math.max(0, predictions[i2].box.topLeft[1])) ] : [0, 0, 0, 0]; boxRaw = [ - predictions[i].box.topLeft[0] / (input2.shape[2] || 0), - predictions[i].box.topLeft[1] / (input2.shape[1] || 0), - (predictions[i].box.bottomRight[0] - predictions[i].box.topLeft[0]) / (input2.shape[2] || 0), - (predictions[i].box.bottomRight[1] - predictions[i].box.topLeft[1]) / (input2.shape[1] || 0) + predictions[i2].box.topLeft[0] / (input2.shape[2] || 0), + predictions[i2].box.topLeft[1] / (input2.shape[1] || 0), + (predictions[i2].box.bottomRight[0] - predictions[i2].box.topLeft[0]) / (input2.shape[2] || 0), + (predictions[i2].box.bottomRight[1] - predictions[i2].box.topLeft[1]) / (input2.shape[1] || 0) ]; } const landmarks = analyze(keypoints); hands.push({ - id: i, - score: Math.round(100 * predictions[i].confidence) / 100, - boxScore: Math.round(100 * predictions[i].boxConfidence) / 100, - fingerScore: Math.round(100 * predictions[i].fingerConfidence) / 100, + id: i2, + score: Math.round(100 * predictions[i2].confidence) / 100, + boxScore: Math.round(100 * predictions[i2].boxConfidence) / 100, + fingerScore: Math.round(100 * predictions[i2].fingerConfidence) / 100, label: "hand", box, boxRaw, @@ -83802,29 +83609,29 @@ async function detectHands(input2, config3) { const hands = []; if (!input2 || !models3[0]) return hands; - const t2 = {}; + const t3 = {}; const ratio2 = (input2.shape[2] || 1) / (input2.shape[1] || 1); const height = Math.min(Math.round((input2.shape[1] || 0) / 8) * 8, maxDetectorResolution); const width = Math.round(height * ratio2 / 8) * 8; - t2.resize = image.resizeBilinear(input2, [height, width]); - t2.cast = cast(t2.resize, "int32"); - [t2.rawScores, t2.rawBoxes] = await models3[0].executeAsync(t2.cast, modelOutputNodes); - t2.boxes = squeeze(t2.rawBoxes, [0, 2]); - t2.scores = squeeze(t2.rawScores, [0]); - const classScores = unstack(t2.scores, 1); + t3.resize = image.resizeBilinear(input2, [height, width]); + t3.cast = cast(t3.resize, "int32"); + [t3.rawScores, t3.rawBoxes] = await models3[0].executeAsync(t3.cast, modelOutputNodes); + t3.boxes = squeeze(t3.rawBoxes, [0, 2]); + t3.scores = squeeze(t3.rawScores, [0]); + const classScores = unstack(t3.scores, 1); dispose(classScores[faceIndex]); classScores.splice(faceIndex, 1); - t2.filtered = stack(classScores, 1); + t3.filtered = stack(classScores, 1); dispose(classScores); - t2.max = max(t2.filtered, 1); - t2.argmax = argMax(t2.filtered, 1); + t3.max = max(t3.filtered, 1); + t3.argmax = argMax(t3.filtered, 1); let id = 0; - t2.nms = await image.nonMaxSuppressionAsync(t2.boxes, t2.max, (config3.hand.maxDetected || 0) + 1, config3.hand.iouThreshold || 0, config3.hand.minConfidence || 1); - const nms = await t2.nms.data(); - const scores = await t2.max.data(); - const classNum = await t2.argmax.data(); + t3.nms = await image.nonMaxSuppressionAsync(t3.boxes, t3.max, (config3.hand.maxDetected || 0) + 1, config3.hand.iouThreshold || 0, config3.hand.minConfidence || 1); + const nms = await t3.nms.data(); + const scores = await t3.max.data(); + const classNum = await t3.argmax.data(); for (const nmsIndex of Array.from(nms)) { - const boxSlice = slice(t2.boxes, nmsIndex, 1); + const boxSlice = slice(t3.boxes, nmsIndex, 1); const boxYX = await boxSlice.data(); dispose(boxSlice); const boxData = [boxYX[1], boxYX[0], boxYX[3] - boxYX[1], boxYX[2] - boxYX[0]]; @@ -83835,7 +83642,7 @@ async function detectHands(input2, config3) { const hand3 = { id: id++, score, box: boxFull, boxRaw, label }; hands.push(hand3); } - Object.keys(t2).forEach((tensor2) => dispose(t2[tensor2])); + Object.keys(t3).forEach((tensor2) => dispose(t3[tensor2])); hands.sort((a, b) => b.score - a.score); if (hands.length > (config3.hand.maxDetected || 1)) hands.length = config3.hand.maxDetected || 1; @@ -83855,17 +83662,17 @@ async function detectFingers(input2, h, config3) { annotations: {} }; if (input2 && models3[1] && config3.hand.landmarks && h.score > (config3.hand.minConfidence || 0)) { - const t2 = {}; + const t3 = {}; const boxCrop = [h.boxRaw[1], h.boxRaw[0], h.boxRaw[3] + h.boxRaw[1], h.boxRaw[2] + h.boxRaw[0]]; - t2.crop = image.cropAndResize(input2, [boxCrop], [0], [inputSize7[1][0], inputSize7[1][1]], "bilinear"); - t2.div = div(t2.crop, constants.tf255); - [t2.score, t2.keypoints] = models3[1].execute(t2.div, ["Identity_1", "Identity"]); - const rawScore = (await t2.score.data())[0]; + t3.crop = image.cropAndResize(input2, [boxCrop], [0], [inputSize7[1][0], inputSize7[1][1]], "bilinear"); + t3.div = div(t3.crop, constants.tf255); + [t3.score, t3.keypoints] = models3[1].execute(t3.div, ["Identity_1", "Identity"]); + const rawScore = (await t3.score.data())[0]; const score = (100 - Math.trunc(100 / (1 + Math.exp(rawScore)))) / 100; if (score >= (config3.hand.minConfidence || 0)) { hand3.fingerScore = score; - t2.reshaped = reshape(t2.keypoints, [-1, 3]); - const coordsData = await t2.reshaped.array(); + t3.reshaped = reshape(t3.keypoints, [-1, 3]); + const coordsData = await t3.reshaped.array(); const coordsRaw = coordsData.map((kpt4) => [kpt4[0] / inputSize7[1][1], kpt4[1] / inputSize7[1][0], kpt4[2] || 0]); const coordsNorm = coordsRaw.map((kpt4) => [kpt4[0] * h.boxRaw[2], kpt4[1] * h.boxRaw[3], kpt4[2] || 0]); hand3.keypoints = coordsNorm.map((kpt4) => [outputSize[0] * (kpt4[0] + h.boxRaw[0]), outputSize[1] * (kpt4[1] + h.boxRaw[1]), kpt4[2] || 0]); @@ -83874,7 +83681,7 @@ async function detectFingers(input2, h, config3) { hand3.annotations[key] = fingerMap[key].map((index2) => hand3.landmarks && hand3.keypoints[index2] ? hand3.keypoints[index2] : null); } } - Object.keys(t2).forEach((tensor2) => dispose(t2[tensor2])); + Object.keys(t3).forEach((tensor2) => dispose(t3[tensor2])); } return hand3; } @@ -83905,19 +83712,19 @@ async function predict10(input2, config3) { const oldCache = [...cache4.boxes]; cache4.boxes.length = 0; if (config3.cacheSensitivity > 0) { - for (let i = 0; i < cache4.hands.length; i++) { - const boxKpt = square4(cache4.hands[i].keypoints, outputSize); - if (boxKpt.box[2] / (input2.shape[2] || 1) > 0.05 && boxKpt.box[3] / (input2.shape[1] || 1) > 0.05 && cache4.hands[i].fingerScore && cache4.hands[i].fingerScore > (config3.hand.minConfidence || 0)) { + for (let i2 = 0; i2 < cache4.hands.length; i2++) { + const boxKpt = square4(cache4.hands[i2].keypoints, outputSize); + if (boxKpt.box[2] / (input2.shape[2] || 1) > 0.05 && boxKpt.box[3] / (input2.shape[1] || 1) > 0.05 && cache4.hands[i2].fingerScore && cache4.hands[i2].fingerScore > (config3.hand.minConfidence || 0)) { const boxScale = scale2(boxKpt.box, boxExpandFact); const boxScaleRaw = scale2(boxKpt.boxRaw, boxExpandFact); - cache4.boxes.push({ ...oldCache[i], box: boxScale, boxRaw: boxScaleRaw }); + cache4.boxes.push({ ...oldCache[i2], box: boxScale, boxRaw: boxScaleRaw }); } } } - for (let i = 0; i < cache4.hands.length; i++) { - const bbox = calc(cache4.hands[i].keypoints, outputSize); - cache4.hands[i].box = bbox.box; - cache4.hands[i].boxRaw = bbox.boxRaw; + for (let i2 = 0; i2 < cache4.hands.length; i2++) { + const bbox = calc(cache4.hands[i2].keypoints, outputSize); + cache4.hands[i2].box = bbox.box; + cache4.hands[i2].boxRaw = bbox.boxRaw; } resolve(cache4.hands); }); @@ -83952,12 +83759,12 @@ async function predict11(input2, config3, idx, count3) { var _a2; let data = []; if (((_a2 = config3.face["insightface"]) == null ? void 0 : _a2.enabled) && (model11 == null ? void 0 : model11.inputs[0].shape)) { - const t2 = {}; - t2.crop = image.resizeBilinear(input2, [model11.inputs[0].shape[2], model11.inputs[0].shape[1]], false); - t2.data = model11.execute(t2.crop); - const output = await t2.data.data(); + const t3 = {}; + t3.crop = image.resizeBilinear(input2, [model11.inputs[0].shape[2], model11.inputs[0].shape[1]], false); + t3.data = model11.execute(t3.crop); + const output = await t3.data.data(); data = Array.from(output); - Object.keys(t2).forEach((tensor2) => dispose(t2[tensor2])); + Object.keys(t3).forEach((tensor2) => dispose(t3[tensor2])); } last6[idx] = data; lastCount5 = count3; @@ -84020,30 +83827,30 @@ async function predict13(input2, config3) { model13 = await load13(config3); if (!(model13 == null ? void 0 : model13["executor"]) || !((_a = model13 == null ? void 0 : model13.inputs) == null ? void 0 : _a[0].shape)) return null; - const t2 = {}; - t2.resize = image.resizeBilinear(input2, [model13.inputs[0].shape ? model13.inputs[0].shape[1] : 0, model13.inputs[0].shape ? model13.inputs[0].shape[2] : 0], false); - t2.norm = div(t2.resize, constants.tf255); - t2.res = model13.execute(t2.norm); - t2.squeeze = squeeze(t2.res, 0); - [t2.bgRaw, t2.fgRaw] = unstack(t2.squeeze, 2); - t2.fg = softmax(t2.fgRaw); - t2.mul = mul(t2.fg, constants.tf255); - t2.expand = expandDims(t2.mul, 2); - t2.output = image.resizeBilinear(t2.expand, [input2.shape[1], input2.shape[2]]); + const t3 = {}; + t3.resize = image.resizeBilinear(input2, [model13.inputs[0].shape ? model13.inputs[0].shape[1] : 0, model13.inputs[0].shape ? model13.inputs[0].shape[2] : 0], false); + t3.norm = div(t3.resize, constants.tf255); + t3.res = model13.execute(t3.norm); + t3.squeeze = squeeze(t3.res, 0); + [t3.bgRaw, t3.fgRaw] = unstack(t3.squeeze, 2); + t3.fg = softmax(t3.fgRaw); + t3.mul = mul(t3.fg, constants.tf255); + t3.expand = expandDims(t3.mul, 2); + t3.output = image.resizeBilinear(t3.expand, [input2.shape[1], input2.shape[2]]); let rgba; switch (config3.segmentation.mode || "default") { case "default": - t2.input = squeeze(input2); - t2.concat = concat([t2.input, t2.output], -1); - rgba = cast(t2.concat, "int32"); + t3.input = squeeze(input2); + t3.concat = concat([t3.input, t3.output], -1); + rgba = cast(t3.concat, "int32"); break; case "alpha": - rgba = cast(t2.output, "int32"); + rgba = cast(t3.output, "int32"); break; default: rgba = tensor(0); } - Object.keys(t2).forEach((tensor2) => dispose(t2[tensor2])); + Object.keys(t3).forEach((tensor2) => dispose(t3[tensor2])); return rgba; } @@ -84077,12 +83884,12 @@ async function predict14(input2, config3, idx, count3) { var _a2; let data = []; if (((_a2 = config3.face["mobilefacenet"]) == null ? void 0 : _a2.enabled) && (model14 == null ? void 0 : model14.inputs[0].shape)) { - const t2 = {}; - t2.crop = image.resizeBilinear(input2, [model14.inputs[0].shape[2], model14.inputs[0].shape[1]], false); - t2.data = model14.execute(t2.crop); - const output = await t2.data.data(); + const t3 = {}; + t3.crop = image.resizeBilinear(input2, [model14.inputs[0].shape[2], model14.inputs[0].shape[1]], false); + t3.data = model14.execute(t3.crop); + const output = await t3.data.data(); data = Array.from(output); - Object.keys(t2).forEach((tensor2) => dispose(t2[tensor2])); + Object.keys(t3).forEach((tensor2) => dispose(t3[tensor2])); } last7[idx] = data; lastCount7 = count3; @@ -84198,23 +84005,23 @@ function bodyParts(body4) { } } function jitter(keypoints) { - for (let i = 0; i < keypoints.length; i++) { - if (keypoints[i] && cache5.keypoints[i]) { - const diff = [Math.abs(keypoints[i].positionRaw[0] - cache5.keypoints[i].positionRaw[0]), Math.abs(keypoints[i].positionRaw[1] - cache5.keypoints[i].positionRaw[1])]; + for (let i2 = 0; i2 < keypoints.length; i2++) { + if (keypoints[i2] && cache5.keypoints[i2]) { + const diff = [Math.abs(keypoints[i2].positionRaw[0] - cache5.keypoints[i2].positionRaw[0]), Math.abs(keypoints[i2].positionRaw[1] - cache5.keypoints[i2].positionRaw[1])]; if (diff[0] < maxJitter && diff[1] < maxJitter) { - keypoints[i] = cache5.keypoints[i]; + keypoints[i2] = cache5.keypoints[i2]; } else { - cache5.keypoints[i] = keypoints[i]; + cache5.keypoints[i2] = keypoints[i2]; } } else { - cache5.keypoints[i] = keypoints[i]; + cache5.keypoints[i2] = keypoints[i2]; } } return keypoints; } function padInput(input2, inputSize10) { var _a, _b; - const t2 = {}; + const t3 = {}; if (!((_a = input2 == null ? void 0 : input2.shape) == null ? void 0 : _a[1]) || !((_b = input2 == null ? void 0 : input2.shape) == null ? void 0 : _b[2])) return input2; cache5.padding = [ @@ -84223,10 +84030,10 @@ function padInput(input2, inputSize10) { [input2.shape[1] > input2.shape[2] ? Math.trunc((input2.shape[1] - input2.shape[2]) / 2) : 0, input2.shape[1] > input2.shape[2] ? Math.trunc((input2.shape[1] - input2.shape[2]) / 2) : 0], [0, 0] ]; - t2.pad = pad(input2, cache5.padding); - t2.resize = image.resizeBilinear(t2.pad, [inputSize10, inputSize10]); - const final = cast(t2.resize, "int32"); - Object.keys(t2).forEach((tensor2) => dispose(t2[tensor2])); + t3.pad = pad(input2, cache5.padding); + t3.resize = image.resizeBilinear(t3.pad, [inputSize10, inputSize10]); + const final = cast(t3.resize, "int32"); + Object.keys(t3).forEach((tensor2) => dispose(t3[tensor2])); return final; } function rescaleBody(body4, outputSize2) { @@ -84295,9 +84102,9 @@ function parseSinglePose(res, config3, image2) { const annotations2 = {}; for (const [name, indexes] of Object.entries(connected3)) { const pt = []; - for (let i = 0; i < indexes.length - 1; i++) { - const pt0 = keypoints.find((kp) => kp.part === indexes[i]); - const pt1 = keypoints.find((kp) => kp.part === indexes[i + 1]); + for (let i2 = 0; i2 < indexes.length - 1; i2++) { + const pt0 = keypoints.find((kp) => kp.part === indexes[i2]); + const pt1 = keypoints.find((kp) => kp.part === indexes[i2 + 1]); if (pt0 && pt1 && pt0.score > (config3.body.minConfidence || 0) && pt1.score > (config3.body.minConfidence || 0)) pt.push([pt0.position, pt1.position]); } @@ -84315,12 +84122,12 @@ function parseMultiPose(res, config3, image2) { const totalScore = Math.round(100 * kpt4[51 + 4]) / 100; if (totalScore > config3.body.minConfidence) { const keypoints = []; - for (let i = 0; i < 17; i++) { - const score = kpt4[3 * i + 2]; + for (let i2 = 0; i2 < 17; i2++) { + const score = kpt4[3 * i2 + 2]; if (score > config3.body.minConfidence) { - const positionRaw = [kpt4[3 * i + 1], kpt4[3 * i + 0]]; + const positionRaw = [kpt4[3 * i2 + 1], kpt4[3 * i2 + 0]]; keypoints.push({ - part: kpt3[i], + part: kpt3[i2], score: Math.round(100 * score) / 100, positionRaw, position: [Math.round((image2.shape[2] || 0) * positionRaw[0]), Math.round((image2.shape[1] || 0) * positionRaw[1])] @@ -84331,9 +84138,9 @@ function parseMultiPose(res, config3, image2) { const annotations2 = {}; for (const [name, indexes] of Object.entries(connected3)) { const pt = []; - for (let i = 0; i < indexes.length - 1; i++) { - const pt0 = keypoints.find((kp) => kp.part === indexes[i]); - const pt1 = keypoints.find((kp) => kp.part === indexes[i + 1]); + for (let i2 = 0; i2 < indexes.length - 1; i2++) { + const pt0 = keypoints.find((kp) => kp.part === indexes[i2]); + const pt1 = keypoints.find((kp) => kp.part === indexes[i2 + 1]); if (pt0 && pt1 && pt0.score > (config3.body.minConfidence || 0) && pt1.score > (config3.body.minConfidence || 0)) pt.push([pt0.position, pt1.position]); } @@ -84362,18 +84169,18 @@ async function predict15(input2, config3) { return cache6.bodies; } return new Promise(async (resolve) => { - const t2 = {}; + const t3 = {}; skipped12 = 0; - t2.input = padInput(input2, inputSize8); - t2.res = model15 == null ? void 0 : model15.execute(t2.input); + t3.input = padInput(input2, inputSize8); + t3.res = model15 == null ? void 0 : model15.execute(t3.input); cache6.last = now(); - const res = await t2.res.array(); - cache6.bodies = t2.res.shape[2] === 17 ? parseSinglePose(res, config3, input2) : parseMultiPose(res, config3, input2); + const res = await t3.res.array(); + cache6.bodies = t3.res.shape[2] === 17 ? parseSinglePose(res, config3, input2) : parseMultiPose(res, config3, input2); for (const body4 of cache6.bodies) { rescaleBody(body4, [input2.shape[2] || 1, input2.shape[1] || 1]); jitter(body4.keypoints); } - Object.keys(t2).forEach((tensor2) => dispose(t2[tensor2])); + Object.keys(t3).forEach((tensor2) => dispose(t3[tensor2])); resolve(cache6.bodies); }); } @@ -84406,13 +84213,13 @@ async function process4(res, outputShape, config3) { const boxesMaxT = featuresT.reshape([-1, 4, featuresT.shape[1] / 4]); const boxIdxT = boxesMaxT.argMax(2); const boxIdx = await boxIdxT.array(); - for (let i = 0; i < scoresT.shape[0]; i++) { + for (let i2 = 0; i2 < scoresT.shape[0]; i2++) { for (let j = 0; j < scoresT.shape[1]; j++) { - const score = scores[i][j]; + const score = scores[i2][j]; if (score > (config3.object.minConfidence || 0) && j !== 61) { - const cx = (0.5 + Math.trunc(i % baseSize)) / baseSize; - const cy = (0.5 + Math.trunc(i / baseSize)) / baseSize; - const boxOffset = boxIdx[i].map((a) => a * (baseSize / strideSize / size2)); + const cx = (0.5 + Math.trunc(i2 % baseSize)) / baseSize; + const cy = (0.5 + Math.trunc(i2 / baseSize)) / baseSize; + const boxOffset = boxIdx[i2].map((a) => a * (baseSize / strideSize / size2)); const [x, y] = [ cx - scaleBox / strideSize * boxOffset[0], cy - scaleBox / strideSize * boxOffset[1] @@ -84503,8 +84310,8 @@ var partNames = [ "rightAnkle" ]; var count2 = partNames.length; -var partIds = partNames.reduce((result, jointName, i) => { - result[jointName] = i; +var partIds = partNames.reduce((result, jointName, i2) => { + result[jointName] = i2; return result; }, {}); var connectedPartNames = [ @@ -84557,8 +84364,8 @@ function getBoundingBox(keypoints) { function scalePoses(poses, [height, width], [inputResolutionHeight, inputResolutionWidth]) { const scaleY = height / inputResolutionHeight; const scaleX = width / inputResolutionWidth; - const scalePose = (pose, i) => ({ - id: i, + const scalePose = (pose, i2) => ({ + id: i2, score: pose.score, boxRaw: [pose.box[0] / inputResolutionWidth, pose.box[1] / inputResolutionHeight, pose.box[2] / inputResolutionWidth, pose.box[3] / inputResolutionHeight], box: [Math.trunc(pose.box[0] * scaleX), Math.trunc(pose.box[1] * scaleY), Math.trunc(pose.box[2] * scaleX), Math.trunc(pose.box[3] * scaleY)], @@ -84570,7 +84377,7 @@ function scalePoses(poses, [height, width], [inputResolutionHeight, inputResolut })), annotations: {} }); - const scaledPoses = poses.map((pose, i) => scalePose(pose, i)); + const scaledPoses = poses.map((pose, i2) => scalePose(pose, i2)); return scaledPoses; } var MaxHeap = class { @@ -84622,16 +84429,16 @@ var MaxHeap = class { k = j; } } - getValueAt(i) { - return this.getElementValue(this.priorityQueue[i]); + getValueAt(i2) { + return this.getElementValue(this.priorityQueue[i2]); } - less(i, j) { - return this.getValueAt(i) < this.getValueAt(j); + less(i2, j) { + return this.getValueAt(i2) < this.getValueAt(j); } - exchange(i, j) { - const t2 = this.priorityQueue[i]; - this.priorityQueue[i] = this.priorityQueue[j]; - this.priorityQueue[j] = t2; + exchange(i2, j) { + const t3 = this.priorityQueue[i2]; + this.priorityQueue[i2] = this.priorityQueue[j]; + this.priorityQueue[j] = t3; } }; function getOffsetPoint(y, x, keypoint, offsets) { @@ -84684,7 +84491,7 @@ function traverse(edgeId, sourceKeypoint, targetId, scores, offsets, displacemen const displacement = getDisplacement(sourceKeypointIndices); const displacedPoint = addVectors(sourceKeypoint.position, displacement); let targetKeypoint = displacedPoint; - for (let i = 0; i < offsetRefineStep; i++) { + for (let i2 = 0; i2 < offsetRefineStep; i2++) { const targetKeypointIndices = getStridedIndexNearPoint(targetKeypoint, height, width); const offsetPoint = getOffsetPoint(targetKeypointIndices.y, targetKeypointIndices.x, targetId, offsets); targetKeypoint = addVectors( @@ -84808,8 +84615,8 @@ async function predict17(input2, config3) { return results3d; }); const buffers = await Promise.all(res.map((tensor2) => tensor2.buffer())); - for (const t2 of res) - dispose(t2); + for (const t3 of res) + dispose(t3); const decoded = decode(buffers[0], buffers[1], buffers[2], buffers[3], config3.body.maxDetected, config3.body.minConfidence); if (!model17.inputs[0].shape) return []; @@ -84827,16 +84634,16 @@ async function load17(config3) { // src/segmentation/rvm.ts var model18; var outputNodes2 = ["fgr", "pha", "r1o", "r2o", "r3o", "r4o"]; -var t = {}; +var t2 = {}; var ratio = 0; function init3(config3) { - dispose([t.r1i, t.r2i, t.r3i, t.r4i, t.downsample_ratio]); - t.r1i = tensor(0); - t.r2i = tensor(0); - t.r3i = tensor(0); - t.r4i = tensor(0); + dispose([t2.r1i, t2.r2i, t2.r3i, t2.r4i, t2.downsample_ratio]); + t2.r1i = tensor(0); + t2.r2i = tensor(0); + t2.r3i = tensor(0); + t2.r4i = tensor(0); ratio = config3.segmentation.ratio || 0.5; - t.downsample_ratio = tensor(ratio); + t2.downsample_ratio = tensor(ratio); } async function load18(config3) { if (!model18 || env2.initial) @@ -84846,8 +84653,8 @@ async function load18(config3) { init3(config3); return model18; } -var normalize = (r) => tidy(() => { - const squeeze2 = squeeze(r, [0]); +var normalize = (r2) => tidy(() => { + const squeeze2 = squeeze(r2, [0]); const mul2 = mul(squeeze2, constants.tf255); const cast7 = cast(mul2, "int32"); return cast7; @@ -84861,19 +84668,19 @@ function getRGBA(fgr, pha) { } function getState(state) { return tidy(() => { - const r = {}; - r.unstack = unstack(state, -1); - r.concat = concat(r.unstack, 1); - r.split = split(r.concat, 4, 1); - r.stack = concat(r.split, 2); - r.squeeze = squeeze(r.stack, [0]); - r.expand = expandDims(r.squeeze, -1); - r.add = add2(r.expand, 1); - r.mul = mul(r.add, 127.5); - r.cast = cast(r.mul, "int32"); - r.tile = tile(r.cast, [1, 1, 3]); - r.alpha = fill([r.tile.shape[0] || 0, r.tile.shape[1] || 0, 1], 255, "int32"); - return concat([r.tile, r.alpha], -1); + const r2 = {}; + r2.unstack = unstack(state, -1); + r2.concat = concat(r2.unstack, 1); + r2.split = split(r2.concat, 4, 1); + r2.stack = concat(r2.split, 2); + r2.squeeze = squeeze(r2.stack, [0]); + r2.expand = expandDims(r2.squeeze, -1); + r2.add = add2(r2.expand, 1); + r2.mul = mul(r2.add, 127.5); + r2.cast = cast(r2.mul, "int32"); + r2.tile = tile(r2.cast, [1, 1, 3]); + r2.alpha = fill([r2.tile.shape[0] || 0, r2.tile.shape[1] || 0, 1], 255, "int32"); + return concat([r2.tile, r2.alpha], -1); }); } async function predict18(input2, config3) { @@ -84881,10 +84688,10 @@ async function predict18(input2, config3) { model18 = await load18(config3); if (!(model18 == null ? void 0 : model18["executor"])) return null; - t.src = div(input2, 255); + t2.src = div(input2, 255); if (ratio !== config3.segmentation.ratio) init3(config3); - const [fgr, pha, r1o, r2o, r3o, r4o] = await model18.executeAsync(t, outputNodes2); + const [fgr, pha, r1o, r2o, r3o, r4o] = await model18.executeAsync(t2, outputNodes2); let rgba; switch (config3.segmentation.mode || "default") { case "default": @@ -84902,8 +84709,8 @@ async function predict18(input2, config3) { default: rgba = tensor(0); } - dispose([t.src, fgr, pha, t.r1i, t.r2i, t.r3i, t.r4i]); - [t.r1i, t.r2i, t.r3i, t.r4i] = [r1o, r2o, r3o, r4o]; + dispose([t2.src, fgr, pha, t2.r1i, t2.r2i, t2.r3i, t2.r4i]); + [t2.r1i, t2.r2i, t2.r3i, t2.r4i] = [r1o, r2o, r3o, r4o]; return rgba; } @@ -84922,27 +84729,27 @@ async function predict19(input2, config3) { model19 = await load19(config3); if (!(model19 == null ? void 0 : model19["executor"]) || !((_a = model19 == null ? void 0 : model19.inputs) == null ? void 0 : _a[0].shape)) return null; - const t2 = {}; - t2.resize = image.resizeBilinear(input2, [model19.inputs[0].shape ? model19.inputs[0].shape[1] : 0, model19.inputs[0].shape ? model19.inputs[0].shape[2] : 0], false); - t2.norm = div(t2.resize, constants.tf255); - t2.res = model19.execute(t2.norm); - t2.squeeze = squeeze(t2.res, 0); - t2.alpha = image.resizeBilinear(t2.squeeze, [input2.shape[1], input2.shape[2]]); - t2.mul = mul(t2.alpha, constants.tf255); + const t3 = {}; + t3.resize = image.resizeBilinear(input2, [model19.inputs[0].shape ? model19.inputs[0].shape[1] : 0, model19.inputs[0].shape ? model19.inputs[0].shape[2] : 0], false); + t3.norm = div(t3.resize, constants.tf255); + t3.res = model19.execute(t3.norm); + t3.squeeze = squeeze(t3.res, 0); + t3.alpha = image.resizeBilinear(t3.squeeze, [input2.shape[1], input2.shape[2]]); + t3.mul = mul(t3.alpha, constants.tf255); let rgba; switch (config3.segmentation.mode || "default") { case "default": - t2.input = squeeze(input2); - t2.concat = concat([t2.input, t2.mul], -1); - rgba = cast(t2.concat, "int32"); + t3.input = squeeze(input2); + t3.concat = concat([t3.input, t3.mul], -1); + rgba = cast(t3.concat, "int32"); break; case "alpha": - rgba = cast(t2.mul, "int32"); + rgba = cast(t3.mul, "int32"); break; default: rgba = tensor(0); } - Object.keys(t2).forEach((tensor2) => dispose(t2[tensor2])); + Object.keys(t3).forEach((tensor2) => dispose(t3[tensor2])); return rgba; } @@ -84976,17 +84783,17 @@ async function predict20(image2, config3, idx, count3) { var _a2; if (!(model20 == null ? void 0 : model20.inputs) || !model20.inputs[0] || !model20.inputs[0].shape) return; - const t2 = {}; - t2.resize = image.resizeBilinear(image2, [model20.inputs[0].shape[2], model20.inputs[0].shape[1]], false); - t2.enhance = mul(t2.resize, constants.tf255); + const t3 = {}; + t3.resize = image.resizeBilinear(image2, [model20.inputs[0].shape[2], model20.inputs[0].shape[1]], false); + t3.enhance = mul(t3.resize, constants.tf255); const obj = { age: 0 }; if ((_a2 = config3.face["ssrnet"]) == null ? void 0 : _a2.enabled) - t2.age = model20.execute(t2.enhance); - if (t2.age) { - const data = await t2.age.data(); + t3.age = model20.execute(t3.enhance); + if (t3.age) { + const data = await t3.age.data(); obj.age = Math.trunc(10 * data[0]) / 10; } - Object.keys(t2).forEach((tensor2) => dispose(t2[tensor2])); + Object.keys(t3).forEach((tensor2) => dispose(t3[tensor2])); last9[idx] = obj; lastCount8 = count3; lastTime14 = now(); @@ -85026,10 +84833,10 @@ async function predict21(image2, config3, idx, count3) { var _a2; if (!(model21 == null ? void 0 : model21.inputs[0].shape)) return; - const t2 = {}; - t2.resize = image.resizeBilinear(image2, [model21.inputs[0].shape[2], model21.inputs[0].shape[1]], false); - t2.enhance = tidy(() => { - const [red, green, blue] = split(t2.resize, 3, 3); + const t3 = {}; + t3.resize = image.resizeBilinear(image2, [model21.inputs[0].shape[2], model21.inputs[0].shape[1]], false); + t3.enhance = tidy(() => { + const [red, green, blue] = split(t3.resize, 3, 3); const redNorm = mul(red, rgb[0]); const greenNorm = mul(green, rgb[1]); const blueNorm = mul(blue, rgb[2]); @@ -85039,11 +84846,11 @@ async function predict21(image2, config3, idx, count3) { }); const obj = { gender: "unknown", genderScore: 0 }; if ((_a2 = config3.face["ssrnet"]) == null ? void 0 : _a2.enabled) - t2.gender = model21.execute(t2.enhance); - const data = await t2.gender.data(); + t3.gender = model21.execute(t3.enhance); + const data = await t3.gender.data(); obj.gender = data[0] > data[1] ? "female" : "male"; obj.genderScore = data[0] > data[1] ? Math.trunc(100 * data[0]) / 100 : Math.trunc(100 * data[1]) / 100; - Object.keys(t2).forEach((tensor2) => dispose(t2[tensor2])); + Object.keys(t3).forEach((tensor2) => dispose(t3[tensor2])); last10[idx] = obj; lastCount9 = count3; lastTime15 = now(); @@ -85288,17 +85095,17 @@ function register(instance2) { return; } if (config2.canvas) { - config2.canvas.addEventListener("webglcontextlost", (e) => { - log("humangl error:", e.type); + config2.canvas.addEventListener("webglcontextlost", (e2) => { + log("humangl error:", e2.type); log("possible browser memory leak using webgl or conflict with multiple backend registrations"); instance2.emit("error"); throw new Error("backend error: webgl context lost"); }); - config2.canvas.addEventListener("webglcontextrestored", (e) => { - log("humangl error: context restored:", e); + config2.canvas.addEventListener("webglcontextrestored", (e2) => { + log("humangl error: context restored:", e2); }); - config2.canvas.addEventListener("webglcontextcreationerror", (e) => { - log("humangl error: context create:", e); + config2.canvas.addEventListener("webglcontextcreationerror", (e2) => { + log("humangl error: context create:", e2); }); } } catch (err) { @@ -85376,9 +85183,9 @@ function registerCustomOps(config3) { kernelFunc: (op2) => tidy(() => { const backend2 = getBackend(); setBackend("cpu"); - const t2 = image.rotateWithOffset(op2.inputs.image, op2.attrs.radians, op2.attrs.fillValue, op2.attrs.center); + const t3 = image.rotateWithOffset(op2.inputs.image, op2.attrs.radians, op2.attrs.fillValue, op2.attrs.center); setBackend(backend2); - return t2; + return t3; }) }; registerKernel(kernelRotateWithOffset); @@ -85458,7 +85265,7 @@ async function check(instance2, force = false) { log(`wasm execution: ${simd ? "simd" : "no simd"} ${mt ? "multithreaded" : "singlethreaded"}`); if (instance2.config.debug && !simd) log("warning: wasm simd support is not enabled"); - } catch (e) { + } catch (e2) { log("wasm detection failed"); } } @@ -85614,10 +85421,10 @@ function curves(ctx, points, localOptions) { return; } ctx.moveTo(points[0][0], points[0][1]); - for (let i = 0; i < points.length - 2; i++) { - const xc = (points[i][0] + points[i + 1][0]) / 2; - const yc = (points[i][1] + points[i + 1][1]) / 2; - ctx.quadraticCurveTo(points[i][0], points[i][1], xc, yc); + for (let i2 = 0; i2 < points.length - 2; i2++) { + const xc = (points[i2][0] + points[i2 + 1][0]) / 2; + const yc = (points[i2][1] + points[i2 + 1][1]) / 2; + ctx.quadraticCurveTo(points[i2][0], points[i2][1], xc, yc); } ctx.quadraticCurveTo(points[points.length - 2][0], points[points.length - 2][1], points[points.length - 1][0], points[points.length - 1][1]); ctx.stroke(); @@ -85705,15 +85512,15 @@ function drawLabels(f, ctx) { if (labels2.length === 0) labels2.push("face"); ctx.fillStyle = opt.color; - for (let i = labels2.length - 1; i >= 0; i--) { + for (let i2 = labels2.length - 1; i2 >= 0; i2--) { const x = Math.max(f.box[0], 0); - const y = i * opt.lineHeight + f.box[1]; + const y = i2 * opt.lineHeight + f.box[1]; if (opt.shadowColor && opt.shadowColor !== "") { ctx.fillStyle = opt.shadowColor; - ctx.fillText(labels2[i], x + 5, y + 16); + ctx.fillText(labels2[i2], x + 5, y + 16); } ctx.fillStyle = opt.labelColor; - ctx.fillText(labels2[i], x + 4, y + 15); + ctx.fillText(labels2[i2], x + 4, y + 15); } } } @@ -85788,8 +85595,8 @@ function drawGazeArrows(f, ctx) { function drawFacePolygons(f, ctx) { if (opt.drawPolygons && f.mesh.length >= 468) { ctx.lineWidth = 1; - for (let i = 0; i < TRI468.length / 3; i++) { - const points = [TRI468[i * 3 + 0], TRI468[i * 3 + 1], TRI468[i * 3 + 2]].map((index2) => f.mesh[index2]); + for (let i2 = 0; i2 < TRI468.length / 3; i2++) { + const points = [TRI468[i2 * 3 + 0], TRI468[i2 * 3 + 1], TRI468[i2 * 3 + 2]].map((index2) => f.mesh[index2]); lines(ctx, points, opt); } drawIrisElipse(f, ctx); @@ -85797,15 +85604,15 @@ function drawFacePolygons(f, ctx) { } function drawFacePoints(f, ctx) { if (opt.drawPoints && f.mesh.length >= 468) { - for (let i = 0; i < f.mesh.length; i++) { - point(ctx, f.mesh[i][0], f.mesh[i][1], f.mesh[i][2], opt); + for (let i2 = 0; i2 < f.mesh.length; i2++) { + point(ctx, f.mesh[i2][0], f.mesh[i2][1], f.mesh[i2][2], opt); if (opt.drawAttention) { - if (LANDMARKS_REFINEMENT_LIPS_CONFIG.includes(i)) - point(ctx, f.mesh[i][0], f.mesh[i][1], f.mesh[i][2] + 127, opt); - if (LANDMARKS_REFINEMENT_LEFT_EYE_CONFIG.includes(i)) - point(ctx, f.mesh[i][0], f.mesh[i][1], f.mesh[i][2] - 127, opt); - if (LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG.includes(i)) - point(ctx, f.mesh[i][0], f.mesh[i][1], f.mesh[i][2] - 127, opt); + if (LANDMARKS_REFINEMENT_LIPS_CONFIG.includes(i2)) + point(ctx, f.mesh[i2][0], f.mesh[i2][1], f.mesh[i2][2] + 127, opt); + if (LANDMARKS_REFINEMENT_LEFT_EYE_CONFIG.includes(i2)) + point(ctx, f.mesh[i2][0], f.mesh[i2][1], f.mesh[i2][2] - 127, opt); + if (LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG.includes(i2)) + point(ctx, f.mesh[i2][0], f.mesh[i2][1], f.mesh[i2][2] - 127, opt); } } } @@ -85846,41 +85653,41 @@ function body(inCanvas2, result, drawOptions) { if (!ctx) return; ctx.lineJoin = "round"; - for (let i = 0; i < result.length; i++) { + for (let i2 = 0; i2 < result.length; i2++) { ctx.strokeStyle = localOptions.color; ctx.fillStyle = localOptions.color; ctx.lineWidth = localOptions.lineWidth; ctx.font = localOptions.font; - if (localOptions.drawBoxes && result[i].box && result[i].box.length === 4) { - rect(ctx, result[i].box[0], result[i].box[1], result[i].box[2], result[i].box[3], localOptions); + if (localOptions.drawBoxes && result[i2].box && result[i2].box.length === 4) { + rect(ctx, result[i2].box[0], result[i2].box[1], result[i2].box[2], result[i2].box[3], localOptions); if (localOptions.drawLabels) { if (localOptions.shadowColor && localOptions.shadowColor !== "") { ctx.fillStyle = localOptions.shadowColor; - ctx.fillText(`body ${100 * result[i].score}%`, result[i].box[0] + 3, 1 + result[i].box[1] + localOptions.lineHeight, result[i].box[2]); + ctx.fillText(`body ${100 * result[i2].score}%`, result[i2].box[0] + 3, 1 + result[i2].box[1] + localOptions.lineHeight, result[i2].box[2]); } ctx.fillStyle = localOptions.labelColor; - ctx.fillText(`body ${100 * result[i].score}%`, result[i].box[0] + 2, 0 + result[i].box[1] + localOptions.lineHeight, result[i].box[2]); + ctx.fillText(`body ${100 * result[i2].score}%`, result[i2].box[0] + 2, 0 + result[i2].box[1] + localOptions.lineHeight, result[i2].box[2]); } } - if (localOptions.drawPoints && result[i].keypoints) { - for (let pt = 0; pt < result[i].keypoints.length; pt++) { - if (!result[i].keypoints[pt].score || result[i].keypoints[pt].score === 0) + if (localOptions.drawPoints && result[i2].keypoints) { + for (let pt = 0; pt < result[i2].keypoints.length; pt++) { + if (!result[i2].keypoints[pt].score || result[i2].keypoints[pt].score === 0) continue; - ctx.fillStyle = colorDepth(result[i].keypoints[pt].position[2], localOptions); - point(ctx, result[i].keypoints[pt].position[0], result[i].keypoints[pt].position[1], 0, localOptions); + ctx.fillStyle = colorDepth(result[i2].keypoints[pt].position[2], localOptions); + point(ctx, result[i2].keypoints[pt].position[0], result[i2].keypoints[pt].position[1], 0, localOptions); } } - if (localOptions.drawLabels && result[i].keypoints) { + if (localOptions.drawLabels && result[i2].keypoints) { ctx.font = localOptions.font; - for (const pt of result[i].keypoints) { + for (const pt of result[i2].keypoints) { if (!pt.score || pt.score === 0) continue; ctx.fillStyle = colorDepth(pt.position[2], localOptions); ctx.fillText(`${pt.part} ${Math.trunc(100 * pt.score)}%`, pt.position[0] + 4, pt.position[1] + 4); } } - if (localOptions.drawPolygons && result[i].keypoints && result[i].annotations) { - for (const part of Object.values(result[i].annotations)) { + if (localOptions.drawPolygons && result[i2].keypoints && result[i2].annotations) { + for (const part of Object.values(result[i2].annotations)) { for (const connected4 of part) curves(ctx, connected4, localOptions); } @@ -85941,12 +85748,12 @@ function hand(inCanvas2, result, drawOptions) { const addHandLine = (part) => { if (!part || part.length === 0 || !part[0]) return; - for (let i = 0; i < part.length; i++) { + for (let i2 = 0; i2 < part.length; i2++) { ctx.beginPath(); - const z = part[i][2] || 0; - ctx.strokeStyle = colorDepth(i * z, localOptions); - ctx.moveTo(part[i > 0 ? i - 1 : 0][0], part[i > 0 ? i - 1 : 0][1]); - ctx.lineTo(part[i][0], part[i][1]); + const z = part[i2][2] || 0; + ctx.strokeStyle = colorDepth(i2 * z, localOptions); + ctx.moveTo(part[i2 > 0 ? i2 - 1 : 0][0], part[i2 > 0 ? i2 - 1 : 0][1]); + ctx.lineTo(part[i2][0], part[i2][1]); ctx.stroke(); } }; @@ -86000,7 +85807,7 @@ function gesture(inCanvas2, result, drawOptions) { return; ctx.font = localOptions.font; ctx.fillStyle = localOptions.color; - let i = 1; + let i2 = 1; for (let j = 0; j < result.length; j++) { let where2 = []; let what = []; @@ -86010,11 +85817,11 @@ function gesture(inCanvas2, result, drawOptions) { const label = `${where2[0]} ${who}: ${what[1]}`; if (localOptions.shadowColor && localOptions.shadowColor !== "") { ctx.fillStyle = localOptions.shadowColor; - ctx.fillText(label, 8, 2 + i * localOptions.lineHeight); + ctx.fillText(label, 8, 2 + i2 * localOptions.lineHeight); } ctx.fillStyle = localOptions.labelColor; - ctx.fillText(label, 6, 0 + i * localOptions.lineHeight); - i += 1; + ctx.fillText(label, 6, 0 + i2 * localOptions.lineHeight); + i2 += 1; } } } @@ -86031,19 +85838,19 @@ function person(inCanvas2, result, drawOptions) { return; ctx.lineJoin = "round"; ctx.font = localOptions.font; - for (let i = 0; i < result.length; i++) { + for (let i2 = 0; i2 < result.length; i2++) { if (localOptions.drawBoxes) { ctx.strokeStyle = localOptions.color; ctx.fillStyle = localOptions.color; - rect(ctx, result[i].box[0], result[i].box[1], result[i].box[2], result[i].box[3], localOptions); + rect(ctx, result[i2].box[0], result[i2].box[1], result[i2].box[2], result[i2].box[3], localOptions); if (localOptions.drawLabels) { - const label = `person #${i}`; + const label = `person #${i2}`; if (localOptions.shadowColor && localOptions.shadowColor !== "") { ctx.fillStyle = localOptions.shadowColor; - ctx.fillText(label, result[i].box[0] + 3, 1 + result[i].box[1] + localOptions.lineHeight, result[i].box[2]); + ctx.fillText(label, result[i2].box[0] + 3, 1 + result[i2].box[1] + localOptions.lineHeight, result[i2].box[2]); } ctx.fillStyle = localOptions.labelColor; - ctx.fillText(label, result[i].box[0] + 2, 0 + result[i].box[1] + localOptions.lineHeight, result[i].box[2]); + ctx.fillText(label, result[i2].box[0] + 2, 0 + result[i2].box[1] + localOptions.lineHeight, result[i2].box[2]); } ctx.stroke(); } @@ -86080,8 +85887,8 @@ var alpha = 0.5; function insidePoly(x, y, polygon) { let inside = false; let j = polygon.length - 1; - for (let i = 0; i < polygon.length; j = i++) { - if (polygon[i].y > y !== polygon[j].y > y && x < (polygon[j].x - polygon[i].x) * (y - polygon[i].y) / (polygon[j].y - polygon[i].y) + polygon[i].x) + for (let i2 = 0; i2 < polygon.length; j = i2++) { + if (polygon[i2].y > y !== polygon[j].y > y && x < (polygon[j].x - polygon[i2].x) * (y - polygon[i2].y) / (polygon[j].y - polygon[i2].y) + polygon[i2].x) inside = !inside; } return inside; @@ -86154,8 +85961,8 @@ var calculateFaceAngle = (face4, imageSize) => { const z = a[0] * b[1] - a[1] * b[0]; return [x, y, z]; }; - const rotationMatrixToEulerAngle = (r) => { - const [r00, _r01, _r02, r10, r11, r12, r20, r21, r22] = r; + const rotationMatrixToEulerAngle = (r2) => { + const [r00, _r01, _r02, r10, r11, r12, r20, r21, r22] = r2; let thetaX; let thetaY; let thetaZ; @@ -86228,98 +86035,98 @@ var detectFace = async (instance2, input2) => { return []; if (!faces) return []; - for (let i = 0; i < faces.length; i++) { + for (let i2 = 0; i2 < faces.length; i2++) { instance2.analyze("Get Face"); - if (!faces[i].tensor || faces[i].tensor.isDisposedInternal) { - log("Face object is disposed:", faces[i].tensor); + if (!faces[i2].tensor || faces[i2].tensor.isDisposedInternal) { + log("Face object is disposed:", faces[i2].tensor); continue; } if ((_a = instance2.config.face.detector) == null ? void 0 : _a.mask) { - const masked = await mask(faces[i]); - dispose(faces[i].tensor); + const masked = await mask(faces[i2]); + dispose(faces[i2].tensor); if (masked) - faces[i].tensor = masked; + faces[i2].tensor = masked; } - const rotation = faces[i].mesh && faces[i].mesh.length > 200 ? calculateFaceAngle(faces[i], [input2.shape[2], input2.shape[1]]) : null; + const rotation = faces[i2].mesh && faces[i2].mesh.length > 200 ? calculateFaceAngle(faces[i2], [input2.shape[2], input2.shape[1]]) : null; instance2.analyze("Start Emotion:"); if (instance2.config.async) { - emotionRes = ((_b = instance2.config.face.emotion) == null ? void 0 : _b.enabled) ? predict5(faces[i].tensor || tensor([]), instance2.config, i, faces.length) : []; + emotionRes = ((_b = instance2.config.face.emotion) == null ? void 0 : _b.enabled) ? predict5(faces[i2].tensor || tensor([]), instance2.config, i2, faces.length) : []; } else { instance2.state = "run:emotion"; timeStamp = now(); - emotionRes = ((_c = instance2.config.face.emotion) == null ? void 0 : _c.enabled) ? await predict5(faces[i].tensor || tensor([]), instance2.config, i, faces.length) : []; + emotionRes = ((_c = instance2.config.face.emotion) == null ? void 0 : _c.enabled) ? await predict5(faces[i2].tensor || tensor([]), instance2.config, i2, faces.length) : []; instance2.performance.emotion = env2.perfadd ? (instance2.performance.emotion || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); } instance2.analyze("End Emotion:"); instance2.analyze("Start AntiSpoof:"); if (instance2.config.async) { - antispoofRes = ((_d = instance2.config.face.antispoof) == null ? void 0 : _d.enabled) ? predict(faces[i].tensor || tensor([]), instance2.config, i, faces.length) : 0; + antispoofRes = ((_d = instance2.config.face.antispoof) == null ? void 0 : _d.enabled) ? predict(faces[i2].tensor || tensor([]), instance2.config, i2, faces.length) : 0; } else { instance2.state = "run:antispoof"; timeStamp = now(); - antispoofRes = ((_e = instance2.config.face.antispoof) == null ? void 0 : _e.enabled) ? await predict(faces[i].tensor || tensor([]), instance2.config, i, faces.length) : 0; + antispoofRes = ((_e = instance2.config.face.antispoof) == null ? void 0 : _e.enabled) ? await predict(faces[i2].tensor || tensor([]), instance2.config, i2, faces.length) : 0; instance2.performance.antispoof = env2.perfadd ? (instance2.performance.antispoof || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); } instance2.analyze("End AntiSpoof:"); instance2.analyze("Start Liveness:"); if (instance2.config.async) { - livenessRes = ((_f = instance2.config.face.liveness) == null ? void 0 : _f.enabled) ? predict12(faces[i].tensor || tensor([]), instance2.config, i, faces.length) : 0; + livenessRes = ((_f = instance2.config.face.liveness) == null ? void 0 : _f.enabled) ? predict12(faces[i2].tensor || tensor([]), instance2.config, i2, faces.length) : 0; } else { instance2.state = "run:liveness"; timeStamp = now(); - livenessRes = ((_g = instance2.config.face.liveness) == null ? void 0 : _g.enabled) ? await predict12(faces[i].tensor || tensor([]), instance2.config, i, faces.length) : 0; + livenessRes = ((_g = instance2.config.face.liveness) == null ? void 0 : _g.enabled) ? await predict12(faces[i2].tensor || tensor([]), instance2.config, i2, faces.length) : 0; instance2.performance.liveness = env2.perfadd ? (instance2.performance.antispoof || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); } instance2.analyze("End Liveness:"); instance2.analyze("Start GEAR:"); if (instance2.config.async) { - gearRes = ((_h = instance2.config.face.gear) == null ? void 0 : _h.enabled) ? predict8(faces[i].tensor || tensor([]), instance2.config, i, faces.length) : null; + gearRes = ((_h = instance2.config.face.gear) == null ? void 0 : _h.enabled) ? predict8(faces[i2].tensor || tensor([]), instance2.config, i2, faces.length) : null; } else { instance2.state = "run:gear"; timeStamp = now(); - gearRes = ((_i = instance2.config.face.gear) == null ? void 0 : _i.enabled) ? await predict8(faces[i].tensor || tensor([]), instance2.config, i, faces.length) : null; + gearRes = ((_i = instance2.config.face.gear) == null ? void 0 : _i.enabled) ? await predict8(faces[i2].tensor || tensor([]), instance2.config, i2, faces.length) : null; instance2.performance.gear = Math.trunc(now() - timeStamp); } instance2.analyze("End GEAR:"); instance2.analyze("Start SSRNet:"); if (instance2.config.async) { - ageRes = ((_j = instance2.config.face["ssrnet"]) == null ? void 0 : _j.enabled) ? predict20(faces[i].tensor || tensor([]), instance2.config, i, faces.length) : null; - genderRes = ((_k = instance2.config.face["ssrnet"]) == null ? void 0 : _k.enabled) ? predict21(faces[i].tensor || tensor([]), instance2.config, i, faces.length) : null; + ageRes = ((_j = instance2.config.face["ssrnet"]) == null ? void 0 : _j.enabled) ? predict20(faces[i2].tensor || tensor([]), instance2.config, i2, faces.length) : null; + genderRes = ((_k = instance2.config.face["ssrnet"]) == null ? void 0 : _k.enabled) ? predict21(faces[i2].tensor || tensor([]), instance2.config, i2, faces.length) : null; } else { instance2.state = "run:ssrnet"; timeStamp = now(); - ageRes = ((_l = instance2.config.face["ssrnet"]) == null ? void 0 : _l.enabled) ? await predict20(faces[i].tensor || tensor([]), instance2.config, i, faces.length) : null; - genderRes = ((_m = instance2.config.face["ssrnet"]) == null ? void 0 : _m.enabled) ? await predict21(faces[i].tensor || tensor([]), instance2.config, i, faces.length) : null; + ageRes = ((_l = instance2.config.face["ssrnet"]) == null ? void 0 : _l.enabled) ? await predict20(faces[i2].tensor || tensor([]), instance2.config, i2, faces.length) : null; + genderRes = ((_m = instance2.config.face["ssrnet"]) == null ? void 0 : _m.enabled) ? await predict21(faces[i2].tensor || tensor([]), instance2.config, i2, faces.length) : null; instance2.performance.ssrnet = Math.trunc(now() - timeStamp); } instance2.analyze("End SSRNet:"); instance2.analyze("Start MobileFaceNet:"); if (instance2.config.async) { - mobilefacenetRes = ((_n = instance2.config.face["mobilefacenet"]) == null ? void 0 : _n.enabled) ? predict14(faces[i].tensor || tensor([]), instance2.config, i, faces.length) : null; + mobilefacenetRes = ((_n = instance2.config.face["mobilefacenet"]) == null ? void 0 : _n.enabled) ? predict14(faces[i2].tensor || tensor([]), instance2.config, i2, faces.length) : null; } else { instance2.state = "run:mobilefacenet"; timeStamp = now(); - mobilefacenetRes = ((_o = instance2.config.face["mobilefacenet"]) == null ? void 0 : _o.enabled) ? await predict14(faces[i].tensor || tensor([]), instance2.config, i, faces.length) : null; + mobilefacenetRes = ((_o = instance2.config.face["mobilefacenet"]) == null ? void 0 : _o.enabled) ? await predict14(faces[i2].tensor || tensor([]), instance2.config, i2, faces.length) : null; instance2.performance.mobilefacenet = Math.trunc(now() - timeStamp); } instance2.analyze("End MobileFaceNet:"); instance2.analyze("Start InsightFace:"); if (instance2.config.async) { - insightfaceRes = ((_p = instance2.config.face["insightface"]) == null ? void 0 : _p.enabled) ? predict11(faces[i].tensor || tensor([]), instance2.config, i, faces.length) : null; + insightfaceRes = ((_p = instance2.config.face["insightface"]) == null ? void 0 : _p.enabled) ? predict11(faces[i2].tensor || tensor([]), instance2.config, i2, faces.length) : null; } else { instance2.state = "run:mobilefacenet"; timeStamp = now(); - insightfaceRes = ((_q = instance2.config.face["insightface"]) == null ? void 0 : _q.enabled) ? await predict11(faces[i].tensor || tensor([]), instance2.config, i, faces.length) : null; + insightfaceRes = ((_q = instance2.config.face["insightface"]) == null ? void 0 : _q.enabled) ? await predict11(faces[i2].tensor || tensor([]), instance2.config, i2, faces.length) : null; instance2.performance.mobilefacenet = Math.trunc(now() - timeStamp); } instance2.analyze("End InsightFace:"); instance2.analyze("Start Description:"); if (instance2.config.async) { - descRes = predict7(faces[i].tensor || tensor([]), instance2.config, i, faces.length); + descRes = predict7(faces[i2].tensor || tensor([]), instance2.config, i2, faces.length); } else { instance2.state = "run:description"; timeStamp = now(); - descRes = await predict7(faces[i].tensor || tensor([]), instance2.config, i, faces.length); + descRes = await predict7(faces[i2].tensor || tensor([]), instance2.config, i2, faces.length); instance2.performance.description = env2.perfadd ? (instance2.performance.description || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); } instance2.analyze("End Description:"); @@ -86352,14 +86159,14 @@ var detectFace = async (instance2, input2) => { } if (!((_v = instance2.config.face.iris) == null ? void 0 : _v.enabled)) { } - const irisSize = ((_y = (_x = (_w = faces[i]) == null ? void 0 : _w.annotations) == null ? void 0 : _x.leftEyeIris) == null ? void 0 : _y[0]) && ((_B = (_A = (_z = faces[i]) == null ? void 0 : _z.annotations) == null ? void 0 : _A.rightEyeIris) == null ? void 0 : _B[0]) && faces[i].annotations.leftEyeIris.length > 0 && faces[i].annotations.rightEyeIris.length > 0 && faces[i].annotations.leftEyeIris[0] !== null && faces[i].annotations.rightEyeIris[0] !== null ? Math.max(Math.abs(faces[i].annotations.leftEyeIris[3][0] - faces[i].annotations.leftEyeIris[1][0]), Math.abs(faces[i].annotations.rightEyeIris[4][1] - faces[i].annotations.rightEyeIris[2][1])) / input2.shape[2] : 0; - const tensor2 = ((_C = instance2.config.face.detector) == null ? void 0 : _C.return) ? squeeze(faces[i].tensor) : null; - dispose(faces[i].tensor); - if (faces[i].tensor) - delete faces[i].tensor; + const irisSize = ((_y = (_x = (_w = faces[i2]) == null ? void 0 : _w.annotations) == null ? void 0 : _x.leftEyeIris) == null ? void 0 : _y[0]) && ((_B = (_A = (_z = faces[i2]) == null ? void 0 : _z.annotations) == null ? void 0 : _A.rightEyeIris) == null ? void 0 : _B[0]) && faces[i2].annotations.leftEyeIris.length > 0 && faces[i2].annotations.rightEyeIris.length > 0 && faces[i2].annotations.leftEyeIris[0] !== null && faces[i2].annotations.rightEyeIris[0] !== null ? Math.max(Math.abs(faces[i2].annotations.leftEyeIris[3][0] - faces[i2].annotations.leftEyeIris[1][0]), Math.abs(faces[i2].annotations.rightEyeIris[4][1] - faces[i2].annotations.rightEyeIris[2][1])) / input2.shape[2] : 0; + const tensor2 = ((_C = instance2.config.face.detector) == null ? void 0 : _C.return) ? squeeze(faces[i2].tensor) : null; + dispose(faces[i2].tensor); + if (faces[i2].tensor) + delete faces[i2].tensor; const res = { - ...faces[i], - id: i + ...faces[i2], + id: i2 }; if (descRes.age) res.age = descRes.age; @@ -86405,20 +86212,20 @@ var body2 = (res) => { if (!res) return []; const gestures = []; - for (let i = 0; i < res.length; i++) { - const leftWrist = res[i].keypoints.find((a) => a.part === "leftWrist"); - const rightWrist = res[i].keypoints.find((a) => a.part === "rightWrist"); - const nose = res[i].keypoints.find((a) => a.part === "nose"); + for (let i2 = 0; i2 < res.length; i2++) { + const leftWrist = res[i2].keypoints.find((a) => a.part === "leftWrist"); + const rightWrist = res[i2].keypoints.find((a) => a.part === "rightWrist"); + const nose = res[i2].keypoints.find((a) => a.part === "nose"); if (nose && leftWrist && rightWrist && leftWrist.position[1] < nose.position[1] && rightWrist.position[1] < nose.position[1]) - gestures.push({ body: i, gesture: "i give up" }); + gestures.push({ body: i2, gesture: "i give up" }); else if (nose && leftWrist && leftWrist.position[1] < nose.position[1]) - gestures.push({ body: i, gesture: "raise left hand" }); + gestures.push({ body: i2, gesture: "raise left hand" }); else if (nose && rightWrist && rightWrist.position[1] < nose.position[1]) - gestures.push({ body: i, gesture: "raise right hand" }); - const leftShoulder = res[i].keypoints.find((a) => a.part === "leftShoulder"); - const rightShoulder = res[i].keypoints.find((a) => a.part === "rightShoulder"); + gestures.push({ body: i2, gesture: "raise right hand" }); + const leftShoulder = res[i2].keypoints.find((a) => a.part === "leftShoulder"); + const rightShoulder = res[i2].keypoints.find((a) => a.part === "rightShoulder"); if (leftShoulder && rightShoulder && Math.abs(leftShoulder.positionRaw[1] - rightShoulder.positionRaw[1]) > 0.1) { - gestures.push({ body: i, gesture: `leaning ${leftShoulder.position[1] > rightShoulder.position[1] ? "left" : "right"}` }); + gestures.push({ body: i2, gesture: `leaning ${leftShoulder.position[1] > rightShoulder.position[1] ? "left" : "right"}` }); } } return gestures; @@ -86427,26 +86234,26 @@ var face2 = (res) => { if (!res) return []; const gestures = []; - for (let i = 0; i < res.length; i++) { - if (res[i].mesh && res[i].mesh.length > 450) { - const zDiff = (res[i].mesh[33][2] || 0) - (res[i].mesh[263][2] || 0); - const xDiff = res[i].mesh[33][0] - res[i].mesh[263][0]; + for (let i2 = 0; i2 < res.length; i2++) { + if (res[i2].mesh && res[i2].mesh.length > 450) { + const zDiff = (res[i2].mesh[33][2] || 0) - (res[i2].mesh[263][2] || 0); + const xDiff = res[i2].mesh[33][0] - res[i2].mesh[263][0]; if (Math.abs(zDiff / xDiff) <= 0.15) - gestures.push({ face: i, gesture: "facing center" }); + gestures.push({ face: i2, gesture: "facing center" }); else - gestures.push({ face: i, gesture: `facing ${zDiff < 0 ? "left" : "right"}` }); - const openLeft = Math.abs(res[i].mesh[374][1] - res[i].mesh[386][1]) / Math.abs(res[i].mesh[443][1] - res[i].mesh[450][1]); + gestures.push({ face: i2, gesture: `facing ${zDiff < 0 ? "left" : "right"}` }); + const openLeft = Math.abs(res[i2].mesh[374][1] - res[i2].mesh[386][1]) / Math.abs(res[i2].mesh[443][1] - res[i2].mesh[450][1]); if (openLeft < 0.2) - gestures.push({ face: i, gesture: "blink left eye" }); - const openRight = Math.abs(res[i].mesh[145][1] - res[i].mesh[159][1]) / Math.abs(res[i].mesh[223][1] - res[i].mesh[230][1]); + gestures.push({ face: i2, gesture: "blink left eye" }); + const openRight = Math.abs(res[i2].mesh[145][1] - res[i2].mesh[159][1]) / Math.abs(res[i2].mesh[223][1] - res[i2].mesh[230][1]); if (openRight < 0.2) - gestures.push({ face: i, gesture: "blink right eye" }); - const mouthOpen = Math.min(100, 500 * Math.abs(res[i].mesh[13][1] - res[i].mesh[14][1]) / Math.abs(res[i].mesh[10][1] - res[i].mesh[152][1])); + gestures.push({ face: i2, gesture: "blink right eye" }); + const mouthOpen = Math.min(100, 500 * Math.abs(res[i2].mesh[13][1] - res[i2].mesh[14][1]) / Math.abs(res[i2].mesh[10][1] - res[i2].mesh[152][1])); if (mouthOpen > 10) - gestures.push({ face: i, gesture: `mouth ${Math.trunc(mouthOpen)}% open` }); - const chinDepth = res[i].mesh[152][2] || 0; + gestures.push({ face: i2, gesture: `mouth ${Math.trunc(mouthOpen)}% open` }); + const chinDepth = res[i2].mesh[152][2] || 0; if (Math.abs(chinDepth) > 10) - gestures.push({ face: i, gesture: `head ${chinDepth < 0 ? "up" : "down"}` }); + gestures.push({ face: i2, gesture: `head ${chinDepth < 0 ? "up" : "down"}` }); } } return gestures; @@ -86456,42 +86263,42 @@ var iris2 = (res) => { if (!res) return []; const gestures = []; - for (let i = 0; i < res.length; i++) { - if (!((_b = (_a = res[i].annotations) == null ? void 0 : _a.leftEyeIris) == null ? void 0 : _b[0]) || !((_d = (_c = res[i].annotations) == null ? void 0 : _c.rightEyeIris) == null ? void 0 : _d[0])) + for (let i2 = 0; i2 < res.length; i2++) { + if (!((_b = (_a = res[i2].annotations) == null ? void 0 : _a.leftEyeIris) == null ? void 0 : _b[0]) || !((_d = (_c = res[i2].annotations) == null ? void 0 : _c.rightEyeIris) == null ? void 0 : _d[0])) continue; - const sizeXLeft = res[i].annotations.leftEyeIris[3][0] - res[i].annotations.leftEyeIris[1][0]; - const sizeYLeft = res[i].annotations.leftEyeIris[4][1] - res[i].annotations.leftEyeIris[2][1]; + const sizeXLeft = res[i2].annotations.leftEyeIris[3][0] - res[i2].annotations.leftEyeIris[1][0]; + const sizeYLeft = res[i2].annotations.leftEyeIris[4][1] - res[i2].annotations.leftEyeIris[2][1]; const areaLeft = Math.abs(sizeXLeft * sizeYLeft); - const sizeXRight = res[i].annotations.rightEyeIris[3][0] - res[i].annotations.rightEyeIris[1][0]; - const sizeYRight = res[i].annotations.rightEyeIris[4][1] - res[i].annotations.rightEyeIris[2][1]; + const sizeXRight = res[i2].annotations.rightEyeIris[3][0] - res[i2].annotations.rightEyeIris[1][0]; + const sizeYRight = res[i2].annotations.rightEyeIris[4][1] - res[i2].annotations.rightEyeIris[2][1]; const areaRight = Math.abs(sizeXRight * sizeYRight); let center = false; const difference = Math.abs(areaLeft - areaRight) / Math.max(areaLeft, areaRight); if (difference < 0.25) { center = true; - gestures.push({ iris: i, gesture: "facing center" }); + gestures.push({ iris: i2, gesture: "facing center" }); } - const leftIrisCenterX = Math.abs(res[i].mesh[263][0] - res[i].annotations.leftEyeIris[0][0]) / res[i].box[2]; - const rightIrisCenterX = Math.abs(res[i].mesh[33][0] - res[i].annotations.rightEyeIris[0][0]) / res[i].box[2]; + const leftIrisCenterX = Math.abs(res[i2].mesh[263][0] - res[i2].annotations.leftEyeIris[0][0]) / res[i2].box[2]; + const rightIrisCenterX = Math.abs(res[i2].mesh[33][0] - res[i2].annotations.rightEyeIris[0][0]) / res[i2].box[2]; if (leftIrisCenterX > 0.06 || rightIrisCenterX > 0.06) center = false; if (leftIrisCenterX > rightIrisCenterX) { if (leftIrisCenterX > 0.05) - gestures.push({ iris: i, gesture: "looking right" }); + gestures.push({ iris: i2, gesture: "looking right" }); } else { if (rightIrisCenterX > 0.05) - gestures.push({ iris: i, gesture: "looking left" }); + gestures.push({ iris: i2, gesture: "looking left" }); } - const rightIrisCenterY = Math.abs(res[i].mesh[145][1] - res[i].annotations.rightEyeIris[0][1]) / res[i].box[3]; - const leftIrisCenterY = Math.abs(res[i].mesh[374][1] - res[i].annotations.leftEyeIris[0][1]) / res[i].box[3]; + const rightIrisCenterY = Math.abs(res[i2].mesh[145][1] - res[i2].annotations.rightEyeIris[0][1]) / res[i2].box[3]; + const leftIrisCenterY = Math.abs(res[i2].mesh[374][1] - res[i2].annotations.leftEyeIris[0][1]) / res[i2].box[3]; if (leftIrisCenterY < 0.01 || rightIrisCenterY < 0.01 || leftIrisCenterY > 0.022 || rightIrisCenterY > 0.022) center = false; if (leftIrisCenterY < 0.01 || rightIrisCenterY < 0.01) - gestures.push({ iris: i, gesture: "looking down" }); + gestures.push({ iris: i2, gesture: "looking down" }); if (leftIrisCenterY > 0.022 || rightIrisCenterY > 0.022) - gestures.push({ iris: i, gesture: "looking up" }); + gestures.push({ iris: i2, gesture: "looking up" }); if (center) - gestures.push({ iris: i, gesture: "looking center" }); + gestures.push({ iris: i2, gesture: "looking center" }); } return gestures; }; @@ -86499,24 +86306,24 @@ var hand2 = (res) => { if (!res) return []; const gestures = []; - for (let i = 0; i < res.length; i++) { + for (let i2 = 0; i2 < res.length; i2++) { const fingers = []; - if (res[i].annotations) { - for (const [finger, pos] of Object.entries(res[i].annotations)) { + if (res[i2].annotations) { + for (const [finger, pos] of Object.entries(res[i2].annotations)) { if (finger !== "palmBase" && Array.isArray(pos) && pos[0]) fingers.push({ name: finger.toLowerCase(), position: pos[0] }); } } if (fingers && fingers.length > 0) { const closest = fingers.reduce((best, a) => (best.position[2] || 0) < (a.position[2] || 0) ? best : a); - gestures.push({ hand: i, gesture: `${closest.name} forward` }); + gestures.push({ hand: i2, gesture: `${closest.name} forward` }); const highest = fingers.reduce((best, a) => best.position[1] < a.position[1] ? best : a); - gestures.push({ hand: i, gesture: `${highest.name} up` }); + gestures.push({ hand: i2, gesture: `${highest.name} up` }); } - if (res[i].keypoints) { - const poses = match(res[i].keypoints); + if (res[i2].keypoints) { + const poses = match(res[i2].keypoints); for (const pose of poses) - gestures.push({ hand: i, gesture: pose.name }); + gestures.push({ hand: i2, gesture: pose.name }); } } return gestures; @@ -86539,28 +86346,28 @@ function calc2(newResult, config3) { if (!bufferedResult.body || newResult.body.length !== bufferedResult.body.length) { bufferedResult.body = JSON.parse(JSON.stringify(newResult.body)); } else { - for (let i = 0; i < newResult.body.length; i++) { - const box = newResult.body[i].box.map((newBoxCoord, j) => ((bufferedFactor - 1) * bufferedResult.body[i].box[j] + newBoxCoord) / bufferedFactor); - const boxRaw = newResult.body[i].boxRaw.map((newBoxCoord, j) => ((bufferedFactor - 1) * bufferedResult.body[i].boxRaw[j] + newBoxCoord) / bufferedFactor); - const keypoints = newResult.body[i].keypoints.map((newKpt, j) => { + for (let i2 = 0; i2 < newResult.body.length; i2++) { + const box = newResult.body[i2].box.map((newBoxCoord, j) => ((bufferedFactor - 1) * bufferedResult.body[i2].box[j] + newBoxCoord) / bufferedFactor); + const boxRaw = newResult.body[i2].boxRaw.map((newBoxCoord, j) => ((bufferedFactor - 1) * bufferedResult.body[i2].boxRaw[j] + newBoxCoord) / bufferedFactor); + const keypoints = newResult.body[i2].keypoints.map((newKpt, j) => { var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2; return { score: newKpt.score, part: newKpt.part, position: [ - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].position[0] || 0) + (newKpt.position[0] || 0)) / bufferedFactor : newKpt.position[0], - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].position[1] || 0) + (newKpt.position[1] || 0)) / bufferedFactor : newKpt.position[1], - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].position[2] || 0) + (newKpt.position[2] || 0)) / bufferedFactor : newKpt.position[2] + bufferedResult.body[i2].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i2].keypoints[j].position[0] || 0) + (newKpt.position[0] || 0)) / bufferedFactor : newKpt.position[0], + bufferedResult.body[i2].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i2].keypoints[j].position[1] || 0) + (newKpt.position[1] || 0)) / bufferedFactor : newKpt.position[1], + bufferedResult.body[i2].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i2].keypoints[j].position[2] || 0) + (newKpt.position[2] || 0)) / bufferedFactor : newKpt.position[2] ], positionRaw: [ - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].positionRaw[0] || 0) + (newKpt.positionRaw[0] || 0)) / bufferedFactor : newKpt.positionRaw[0], - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].positionRaw[1] || 0) + (newKpt.positionRaw[1] || 0)) / bufferedFactor : newKpt.positionRaw[1], - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].positionRaw[2] || 0) + (newKpt.positionRaw[2] || 0)) / bufferedFactor : newKpt.positionRaw[2] + bufferedResult.body[i2].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i2].keypoints[j].positionRaw[0] || 0) + (newKpt.positionRaw[0] || 0)) / bufferedFactor : newKpt.positionRaw[0], + bufferedResult.body[i2].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i2].keypoints[j].positionRaw[1] || 0) + (newKpt.positionRaw[1] || 0)) / bufferedFactor : newKpt.positionRaw[1], + bufferedResult.body[i2].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i2].keypoints[j].positionRaw[2] || 0) + (newKpt.positionRaw[2] || 0)) / bufferedFactor : newKpt.positionRaw[2] ], distance: [ - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (((_a2 = bufferedResult.body[i].keypoints[j].distance) == null ? void 0 : _a2[0]) || 0) + (((_b2 = newKpt.distance) == null ? void 0 : _b2[0]) || 0)) / bufferedFactor : (_c2 = newKpt.distance) == null ? void 0 : _c2[0], - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (((_d2 = bufferedResult.body[i].keypoints[j].distance) == null ? void 0 : _d2[1]) || 0) + (((_e2 = newKpt.distance) == null ? void 0 : _e2[1]) || 0)) / bufferedFactor : (_f2 = newKpt.distance) == null ? void 0 : _f2[1], - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (((_g2 = bufferedResult.body[i].keypoints[j].distance) == null ? void 0 : _g2[2]) || 0) + (((_h2 = newKpt.distance) == null ? void 0 : _h2[2]) || 0)) / bufferedFactor : (_i2 = newKpt.distance) == null ? void 0 : _i2[2] + bufferedResult.body[i2].keypoints[j] ? ((bufferedFactor - 1) * (((_a2 = bufferedResult.body[i2].keypoints[j].distance) == null ? void 0 : _a2[0]) || 0) + (((_b2 = newKpt.distance) == null ? void 0 : _b2[0]) || 0)) / bufferedFactor : (_c2 = newKpt.distance) == null ? void 0 : _c2[0], + bufferedResult.body[i2].keypoints[j] ? ((bufferedFactor - 1) * (((_d2 = bufferedResult.body[i2].keypoints[j].distance) == null ? void 0 : _d2[1]) || 0) + (((_e2 = newKpt.distance) == null ? void 0 : _e2[1]) || 0)) / bufferedFactor : (_f2 = newKpt.distance) == null ? void 0 : _f2[1], + bufferedResult.body[i2].keypoints[j] ? ((bufferedFactor - 1) * (((_g2 = bufferedResult.body[i2].keypoints[j].distance) == null ? void 0 : _g2[2]) || 0) + (((_h2 = newKpt.distance) == null ? void 0 : _h2[2]) || 0)) / bufferedFactor : (_i2 = newKpt.distance) == null ? void 0 : _i2[2] ] }; }); @@ -86582,61 +86389,61 @@ function calc2(newResult, config3) { } annotations2[name] = pt; } - bufferedResult.body[i] = { ...newResult.body[i], box, boxRaw, keypoints, annotations: annotations2 }; + bufferedResult.body[i2] = { ...newResult.body[i2], box, boxRaw, keypoints, annotations: annotations2 }; } } if (!bufferedResult.hand || newResult.hand.length !== bufferedResult.hand.length) { bufferedResult.hand = JSON.parse(JSON.stringify(newResult.hand)); } else { - for (let i = 0; i < newResult.hand.length; i++) { - const box = newResult.hand[i].box.map((b, j) => ((bufferedFactor - 1) * bufferedResult.hand[i].box[j] + b) / bufferedFactor); - const boxRaw = newResult.hand[i].boxRaw.map((b, j) => ((bufferedFactor - 1) * bufferedResult.hand[i].boxRaw[j] + b) / bufferedFactor); - if (bufferedResult.hand[i].keypoints.length !== newResult.hand[i].keypoints.length) - bufferedResult.hand[i].keypoints = newResult.hand[i].keypoints; - const keypoints = newResult.hand[i].keypoints && newResult.hand[i].keypoints.length > 0 ? newResult.hand[i].keypoints.map((landmark, j) => landmark.map((coord, k) => ((bufferedFactor - 1) * (bufferedResult.hand[i].keypoints[j][k] || 1) + (coord || 0)) / bufferedFactor)) : []; + for (let i2 = 0; i2 < newResult.hand.length; i2++) { + const box = newResult.hand[i2].box.map((b, j) => ((bufferedFactor - 1) * bufferedResult.hand[i2].box[j] + b) / bufferedFactor); + const boxRaw = newResult.hand[i2].boxRaw.map((b, j) => ((bufferedFactor - 1) * bufferedResult.hand[i2].boxRaw[j] + b) / bufferedFactor); + if (bufferedResult.hand[i2].keypoints.length !== newResult.hand[i2].keypoints.length) + bufferedResult.hand[i2].keypoints = newResult.hand[i2].keypoints; + const keypoints = newResult.hand[i2].keypoints && newResult.hand[i2].keypoints.length > 0 ? newResult.hand[i2].keypoints.map((landmark, j) => landmark.map((coord, k) => ((bufferedFactor - 1) * (bufferedResult.hand[i2].keypoints[j][k] || 1) + (coord || 0)) / bufferedFactor)) : []; let annotations2 = {}; - if (Object.keys(bufferedResult.hand[i].annotations).length !== Object.keys(newResult.hand[i].annotations).length) { - bufferedResult.hand[i].annotations = newResult.hand[i].annotations; - annotations2 = bufferedResult.hand[i].annotations; - } else if (newResult.hand[i].annotations) { - for (const key of Object.keys(newResult.hand[i].annotations)) { - annotations2[key] = ((_f = (_e = (_d = newResult.hand[i]) == null ? void 0 : _d.annotations) == null ? void 0 : _e[key]) == null ? void 0 : _f[0]) ? newResult.hand[i].annotations[key].map((val, j) => val.map((coord, k) => ((bufferedFactor - 1) * bufferedResult.hand[i].annotations[key][j][k] + coord) / bufferedFactor)) : null; + if (Object.keys(bufferedResult.hand[i2].annotations).length !== Object.keys(newResult.hand[i2].annotations).length) { + bufferedResult.hand[i2].annotations = newResult.hand[i2].annotations; + annotations2 = bufferedResult.hand[i2].annotations; + } else if (newResult.hand[i2].annotations) { + for (const key of Object.keys(newResult.hand[i2].annotations)) { + annotations2[key] = ((_f = (_e = (_d = newResult.hand[i2]) == null ? void 0 : _d.annotations) == null ? void 0 : _e[key]) == null ? void 0 : _f[0]) ? newResult.hand[i2].annotations[key].map((val, j) => val.map((coord, k) => ((bufferedFactor - 1) * bufferedResult.hand[i2].annotations[key][j][k] + coord) / bufferedFactor)) : null; } } - bufferedResult.hand[i] = { ...newResult.hand[i], box, boxRaw, keypoints, annotations: annotations2 }; + bufferedResult.hand[i2] = { ...newResult.hand[i2], box, boxRaw, keypoints, annotations: annotations2 }; } } if (!bufferedResult.face || newResult.face.length !== bufferedResult.face.length) { bufferedResult.face = JSON.parse(JSON.stringify(newResult.face)); } else { - for (let i = 0; i < newResult.face.length; i++) { - const box = newResult.face[i].box.map((b, j) => ((bufferedFactor - 1) * bufferedResult.face[i].box[j] + b) / bufferedFactor); - const boxRaw = newResult.face[i].boxRaw.map((b, j) => ((bufferedFactor - 1) * bufferedResult.face[i].boxRaw[j] + b) / bufferedFactor); - if (newResult.face[i].rotation) { + for (let i2 = 0; i2 < newResult.face.length; i2++) { + const box = newResult.face[i2].box.map((b, j) => ((bufferedFactor - 1) * bufferedResult.face[i2].box[j] + b) / bufferedFactor); + const boxRaw = newResult.face[i2].boxRaw.map((b, j) => ((bufferedFactor - 1) * bufferedResult.face[i2].boxRaw[j] + b) / bufferedFactor); + if (newResult.face[i2].rotation) { const rotation = { matrix: [0, 0, 0, 0, 0, 0, 0, 0, 0], angle: { roll: 0, yaw: 0, pitch: 0 }, gaze: { bearing: 0, strength: 0 } }; - rotation.matrix = (_g = newResult.face[i].rotation) == null ? void 0 : _g.matrix; + rotation.matrix = (_g = newResult.face[i2].rotation) == null ? void 0 : _g.matrix; rotation.angle = { - roll: ((bufferedFactor - 1) * (((_i = (_h = bufferedResult.face[i].rotation) == null ? void 0 : _h.angle) == null ? void 0 : _i.roll) || 0) + (((_k = (_j = newResult.face[i].rotation) == null ? void 0 : _j.angle) == null ? void 0 : _k.roll) || 0)) / bufferedFactor, - yaw: ((bufferedFactor - 1) * (((_m = (_l = bufferedResult.face[i].rotation) == null ? void 0 : _l.angle) == null ? void 0 : _m.yaw) || 0) + (((_o = (_n = newResult.face[i].rotation) == null ? void 0 : _n.angle) == null ? void 0 : _o.yaw) || 0)) / bufferedFactor, - pitch: ((bufferedFactor - 1) * (((_q = (_p = bufferedResult.face[i].rotation) == null ? void 0 : _p.angle) == null ? void 0 : _q.pitch) || 0) + (((_s = (_r = newResult.face[i].rotation) == null ? void 0 : _r.angle) == null ? void 0 : _s.pitch) || 0)) / bufferedFactor + roll: ((bufferedFactor - 1) * (((_i = (_h = bufferedResult.face[i2].rotation) == null ? void 0 : _h.angle) == null ? void 0 : _i.roll) || 0) + (((_k = (_j = newResult.face[i2].rotation) == null ? void 0 : _j.angle) == null ? void 0 : _k.roll) || 0)) / bufferedFactor, + yaw: ((bufferedFactor - 1) * (((_m = (_l = bufferedResult.face[i2].rotation) == null ? void 0 : _l.angle) == null ? void 0 : _m.yaw) || 0) + (((_o = (_n = newResult.face[i2].rotation) == null ? void 0 : _n.angle) == null ? void 0 : _o.yaw) || 0)) / bufferedFactor, + pitch: ((bufferedFactor - 1) * (((_q = (_p = bufferedResult.face[i2].rotation) == null ? void 0 : _p.angle) == null ? void 0 : _q.pitch) || 0) + (((_s = (_r = newResult.face[i2].rotation) == null ? void 0 : _r.angle) == null ? void 0 : _s.pitch) || 0)) / bufferedFactor }; rotation.gaze = { - bearing: ((bufferedFactor - 1) * (((_t = bufferedResult.face[i].rotation) == null ? void 0 : _t.gaze.bearing) || 0) + (((_u = newResult.face[i].rotation) == null ? void 0 : _u.gaze.bearing) || 0)) / bufferedFactor, - strength: ((bufferedFactor - 1) * (((_v = bufferedResult.face[i].rotation) == null ? void 0 : _v.gaze.strength) || 0) + (((_w = newResult.face[i].rotation) == null ? void 0 : _w.gaze.strength) || 0)) / bufferedFactor + bearing: ((bufferedFactor - 1) * (((_t = bufferedResult.face[i2].rotation) == null ? void 0 : _t.gaze.bearing) || 0) + (((_u = newResult.face[i2].rotation) == null ? void 0 : _u.gaze.bearing) || 0)) / bufferedFactor, + strength: ((bufferedFactor - 1) * (((_v = bufferedResult.face[i2].rotation) == null ? void 0 : _v.gaze.strength) || 0) + (((_w = newResult.face[i2].rotation) == null ? void 0 : _w.gaze.strength) || 0)) / bufferedFactor }; - bufferedResult.face[i] = { ...newResult.face[i], rotation, box, boxRaw }; + bufferedResult.face[i2] = { ...newResult.face[i2], rotation, box, boxRaw }; } else { - bufferedResult.face[i] = { ...newResult.face[i], box, boxRaw }; + bufferedResult.face[i2] = { ...newResult.face[i2], box, boxRaw }; } } } if (!bufferedResult.object || newResult.object.length !== bufferedResult.object.length) { bufferedResult.object = JSON.parse(JSON.stringify(newResult.object)); } else { - for (let i = 0; i < newResult.object.length; i++) { - const box = newResult.object[i].box.map((b, j) => ((bufferedFactor - 1) * bufferedResult.object[i].box[j] + b) / bufferedFactor); - const boxRaw = newResult.object[i].boxRaw.map((b, j) => ((bufferedFactor - 1) * bufferedResult.object[i].boxRaw[j] + b) / bufferedFactor); - bufferedResult.object[i] = { ...newResult.object[i], box, boxRaw }; + for (let i2 = 0; i2 < newResult.object.length; i2++) { + const box = newResult.object[i2].box.map((b, j) => ((bufferedFactor - 1) * bufferedResult.object[i2].box[j] + b) / bufferedFactor); + const boxRaw = newResult.object[i2].boxRaw.map((b, j) => ((bufferedFactor - 1) * bufferedResult.object[i2].boxRaw[j] + b) / bufferedFactor); + bufferedResult.object[i2] = { ...newResult.object[i2], box, boxRaw }; } } if (newResult.persons) { @@ -86644,8 +86451,8 @@ function calc2(newResult, config3) { if (!bufferedResult.persons || newPersons.length !== bufferedResult.persons.length) { bufferedResult.persons = JSON.parse(JSON.stringify(newPersons)); } else { - for (let i = 0; i < newPersons.length; i++) { - bufferedResult.persons[i].box = newPersons[i].box.map((box, j) => ((bufferedFactor - 1) * bufferedResult.persons[i].box[j] + box) / bufferedFactor); + for (let i2 = 0; i2 < newPersons.length; i2++) { + bufferedResult.persons[i2].box = newPersons[i2].box.map((box, j) => ((bufferedFactor - 1) * bufferedResult.persons[i2].box[j] + box) / bufferedFactor); } } } @@ -86669,8 +86476,8 @@ function distance(descriptor1, descriptor2, options4 = { order: 2, multiplier: 2 if (!descriptor1 || !descriptor1) return Number.MAX_SAFE_INTEGER; let sum7 = 0; - for (let i = 0; i < descriptor1.length; i++) { - const diff = !options4.order || options4.order === 2 ? descriptor1[i] - descriptor2[i] : Math.abs(descriptor1[i] - descriptor2[i]); + for (let i2 = 0; i2 < descriptor1.length; i2++) { + const diff = !options4.order || options4.order === 2 ? descriptor1[i2] - descriptor2[i2] : Math.abs(descriptor1[i2] - descriptor2[i2]); sum7 += !options4.order || options4.order === 2 ? diff * diff : diff ** options4.order; } return (options4.multiplier || 20) * sum7; @@ -86693,11 +86500,11 @@ function match2(descriptor, descriptors, options4 = { order: 2, multiplier: 25, } let lowestDistance = Number.MAX_SAFE_INTEGER; let index2 = -1; - for (let i = 0; i < descriptors.length; i++) { - const res = descriptors[i].length === descriptor.length ? distance(descriptor, descriptors[i], options4) : Number.MAX_SAFE_INTEGER; + for (let i2 = 0; i2 < descriptors.length; i2++) { + const res = descriptors[i2].length === descriptor.length ? distance(descriptor, descriptors[i2], options4) : Number.MAX_SAFE_INTEGER; if (res < lowestDistance) { lowestDistance = res; - index2 = i; + index2 = i2; } if (lowestDistance < (options4.threshold || 0)) break; @@ -87605,10 +87412,10 @@ async function runCompile(instance2) { const res = model22.execute(tensor2); compiledModels.push(modelName); if (Array.isArray(res)) - res.forEach((t2) => dispose(t2)); + res.forEach((t3) => dispose(t3)); else dispose(res); - } catch (e) { + } catch (e2) { if (instance2.config.debug) log("compile fail model:", modelName); } @@ -87684,7 +87491,7 @@ var Human2 = class { return "input must be a tensor"; try { this.tf.getBackend(); - } catch (e) { + } catch (e2) { return "backend not loaded"; } return null; @@ -87700,7 +87507,7 @@ var Human2 = class { }); __privateAdd(this, _loops, {}); this.env = env2; - const tfVersion = (version82.tfjs || version).replace(/-(.*)/, ""); + const tfVersion = (V.tfjs || version).replace(/-(.*)/, ""); config.wasmPath = `https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm@${tfVersion}/dist/`; config.modelBasePath = env2.browser ? "../models/" : "file://models/"; config.backend = env2.browser ? "webgl" : "tensorflow"; diff --git a/dist/human.esm.js.map b/dist/human.esm.js.map index 296f7fff2..7976ef019 100644 --- a/dist/human.esm.js.map +++ b/dist/human.esm.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["../src/util/util.ts", "../src/config.ts", "tfjs.esm.js", "../src/image/imagefxshaders.ts", "../src/image/imagefx.ts", "../src/image/enhance.ts", "../src/image/image.ts", "../src/util/env.ts", "../src/util/webcam.ts", "../src/tfjs/load.ts", "../src/models.ts", "../src/face/antispoof.ts", "../src/face/facemeshcoords.ts", "../src/tfjs/constants.ts", "../src/face/facemeshutil.ts", "../src/face/blazeface.ts", "../src/body/blazeposecoords.ts", "../src/body/blazeposedetector.ts", "../src/util/box.ts", "../src/body/blazepose.ts", "../src/object/labels.ts", "../src/object/centernet.ts", "../src/body/efficientposecoords.ts", "../src/body/efficientpose.ts", "../src/gear/emotion.ts", "../src/face/iris.ts", "../src/face/constants.ts", "../src/face/attention.ts", "../src/face/facemesh.ts", "../src/face/faceres.ts", "../src/gear/gear.ts", "../src/hand/handposeutil.ts", "../src/hand/handposeanchors.ts", "../src/hand/handposedetector.ts", "../src/hand/handposepipeline.ts", "../src/hand/fingerdef.ts", "../src/hand/fingergesture.ts", "../src/hand/fingerpose.ts", "../src/hand/handpose.ts", "../src/hand/handtrack.ts", "../src/face/insightface.ts", "../src/face/liveness.ts", "../src/segmentation/meet.ts", "../src/face/mobilefacenet.ts", "../src/body/movenetcoords.ts", "../src/body/movenetfix.ts", "../src/body/movenet.ts", "../src/object/nanodet.ts", "../src/body/posenetutils.ts", "../src/body/posenet.ts", "../src/segmentation/rvm.ts", "../src/segmentation/selfie.ts", "../src/gear/ssrnet-age.ts", "../src/gear/ssrnet-gender.ts", "../src/tfjs/humangl.ts", "../src/tfjs/backend.ts", "../src/draw/draw.ts", "../src/draw/primitives.ts", "../src/draw/options.ts", "../src/draw/face.ts", "../src/draw/body.ts", "../src/draw/hand.ts", "../src/draw/object.ts", "../src/draw/gesture.ts", "../src/face/mask.ts", "../src/face/angles.ts", "../src/face/face.ts", "../src/gesture/gesture.ts", "../src/util/interpolate.ts", "../src/face/match.ts", "../src/util/persons.ts", "../src/sample.ts", "../src/warmup.ts", "../src/human.ts"], - "sourcesContent": ["import type { Config } from '../exports';\n\n/**\n * Simple helper functions used accross codebase\n */\n\n// helper function: wrapper around console output\nexport function log(...msg): void {\n const dt = new Date();\n const ts = `${dt.getHours().toString().padStart(2, '0')}:${dt.getMinutes().toString().padStart(2, '0')}:${dt.getSeconds().toString().padStart(2, '0')}.${dt.getMilliseconds().toString().padStart(3, '0')}`;\n if (msg) console.log(ts, 'Human:', ...msg); // eslint-disable-line no-console\n}\n\n// helper function: join two paths\nexport function join(folder: string, file: string): string {\n const separator = folder.endsWith('/') ? '' : '/';\n const skipJoin = file.startsWith('.') || file.startsWith('/') || file.startsWith('http:') || file.startsWith('https:') || file.startsWith('file:');\n const path = skipJoin ? `${file}` : `${folder}${separator}${file}`;\n if (!path.toLocaleLowerCase().includes('.json')) throw new Error(`modelpath error: expecting json file: ${path}`);\n return path;\n}\n\n// helper function: gets elapsed time on both browser and nodejs\nexport const now = () => {\n if (typeof performance !== 'undefined') return performance.now();\n return parseInt((Number(process.hrtime.bigint()) / 1000 / 1000).toString());\n};\n\n// helper function: checks current config validity\nexport function validate(defaults: Partial, config: Partial, parent = 'config', msgs: { reason: string, where: string, expected?: string }[] = []) {\n for (const key of Object.keys(config)) {\n if (typeof config[key] === 'object') {\n validate(defaults[key], config[key], key, msgs);\n } else {\n const defined = defaults && (typeof defaults[key] !== 'undefined');\n if (!defined) msgs.push({ reason: 'unknown property', where: `${parent}.${key} = ${config[key]}` });\n const same = defaults && typeof defaults[key] === typeof config[key];\n if (defined && !same) msgs.push({ reason: 'property type mismatch', where: `${parent}.${key} = ${config[key]}`, expected: typeof defaults[key] });\n }\n // ok = ok && defined && same;\n }\n if (config.debug && parent === 'config' && msgs.length > 0) log('invalid configuration', msgs);\n return msgs;\n}\n\n// helper function: perform deep merge of multiple objects so it allows full inheritance with overrides\nexport function mergeDeep(...objects) {\n const isObject = (obj) => obj && typeof obj === 'object';\n return objects.reduce((prev, obj) => {\n Object.keys(obj || {}).forEach((key) => {\n const pVal = prev[key];\n const oVal = obj[key];\n if (Array.isArray(pVal) && Array.isArray(oVal)) prev[key] = pVal.concat(...oVal);\n else if (isObject(pVal) && isObject(oVal)) prev[key] = mergeDeep(pVal, oVal);\n else prev[key] = oVal;\n });\n return prev;\n }, {});\n}\n\n// helper function: return min and max from input array\nexport const minmax = (data: number[]) => data.reduce((acc: number[], val) => {\n acc[0] = (acc[0] === undefined || val < acc[0]) ? val : acc[0];\n acc[1] = (acc[1] === undefined || val > acc[1]) ? val : acc[1];\n return acc;\n}, []);\n\n// helper function: async wait\nexport async function wait(time: number) {\n const waiting = new Promise((resolve) => { setTimeout(() => resolve(true), time); });\n await waiting;\n}\n", "/* eslint-disable no-multi-spaces */\n\n/** Possible TensorFlow backends */\nexport type BackendEnum = '' | 'cpu' | 'wasm' | 'webgl' | 'humangl' | 'tensorflow' | 'webgpu';\n\n/** Possible values for `human.warmup` */\nexport type WarmupEnum = '' | 'none' | 'face' | 'full' | 'body';\n\n/** Possible segmentation model behavior */\nexport type SegmentationEnum = 'default' | 'alpha' | 'foreground' | 'state'\n\n/** Generic config type inherited by all module types */\nexport interface GenericConfig {\n /** is module enabled? */\n enabled: boolean,\n /** path to model json file (relative to `modelBasePath` */\n modelPath: string,\n /** how many max frames to go without re-running model if cached results are acceptable\n * for two-phase models such as face and hand caching applies to bounding boxes detection only */\n skipFrames: number,\n /** how many max milliseconds to go without re-running model if cached results are acceptable\n * for two-phase models such as face and hand caching applies to bounding boxes detection only */\n skipTime: number,\n}\n\n/** Detector part of face configuration */\nexport interface FaceDetectorConfig extends GenericConfig {\n /** is face rotation correction performed after detecting face?\n * used to correctly analyze faces under high angles\n */\n rotation: boolean,\n /** maximum number of detected faces */\n maxDetected: number,\n /** minimum confidence for a detected face before results are discarded */\n minConfidence: number,\n /** minimum overlap between two detected faces before one is discarded */\n iouThreshold: number,\n /** should child models perform on masked image of a face */\n mask: boolean,\n /** should face detection return processed and cropped face tensor that can with an external model for addtional processing?\n * if enabled it must be manually deallocated to avoid memory leak */\n return: boolean,\n}\n\n/** Mesh part of face configuration */\nexport interface FaceMeshConfig extends GenericConfig {\n /** Keep detected faces that cannot be verified using facemesh */\n keepInvalid: boolean\n}\n\n/** Iris part of face configuration */\nexport interface FaceIrisConfig extends GenericConfig {}\n\n/** Attention part of face configuration */\nexport interface FaceAttentionConfig extends GenericConfig {}\n\n/** Description or face embedding part of face configuration\n * - also used by age and gender detection\n */\nexport interface FaceDescriptionConfig extends GenericConfig {\n /** minimum confidence for a detected face before results are discarded */\n minConfidence: number,\n}\n\n/** Emotion part of face configuration */\nexport interface FaceEmotionConfig extends GenericConfig {\n /** minimum confidence for a detected face before results are discarded */\n minConfidence: number,\n}\n\n/** Anti-spoofing part of face configuration */\nexport interface FaceAntiSpoofConfig extends GenericConfig {}\n\n/** Liveness part of face configuration */\nexport interface FaceLivenessConfig extends GenericConfig {}\n\n/** Gear part of face configuration */\nexport interface FaceGearConfig extends GenericConfig {\n /** minimum confidence for a detected race before results are discarded */\n minConfidence: number,\n}\n\n/** Configures all face-specific options: face detection, mesh analysis, age, gender, emotion detection and face description */\nexport interface FaceConfig extends GenericConfig {\n detector: Partial,\n mesh: Partial,\n attention: Partial,\n iris: Partial,\n description: Partial,\n emotion: Partial,\n antispoof: Partial,\n liveness: Partial,\n gear: Partial,\n}\n\n/** Configures all body detection specific options */\nexport interface BodyConfig extends GenericConfig {\n /** maximum number of detected bodies */\n maxDetected: number,\n /** minimum confidence for a detected body before results are discarded */\n minConfidence: number,\n /* experimental\n /** experimental: detector used for body model before actual analysis\n detector?: {\n /** experimental: enable body detector before body landmarks\n enabled: boolean,\n /** experimental: path to optional body detector model json file\n modelPath: string,\n /** experimental: minimum confidence for a detected body before results are discarded\n minConfidence: number,\n /** experimental: minimum overlap between two detected bodies before one is discarded\n iouThreshold: number\n },\n */\n}\n\n/** Configures all hand detection specific options */\nexport interface HandConfig extends GenericConfig {\n /** should hand rotation correction be performed after hand detection? */\n rotation: boolean,\n /** minimum confidence for a detected hand before results are discarded */\n minConfidence: number,\n /** minimum overlap between two detected hands before one is discarded */\n iouThreshold: number,\n /** maximum number of detected hands */\n maxDetected: number,\n /** should hand landmarks be detected or just return detected hand box */\n landmarks: boolean,\n detector: {\n /** path to hand detector model json */\n modelPath?: string,\n },\n skeleton: {\n /** path to hand skeleton model json */\n modelPath?: string,\n },\n}\n\n/** Configures all object detection specific options */\nexport interface ObjectConfig extends GenericConfig {\n /** minimum confidence for a detected objects before results are discarded */\n minConfidence: number,\n /** minimum overlap between two detected objects before one is discarded */\n iouThreshold: number,\n /** maximum number of detected objects */\n maxDetected: number,\n}\n\n/** Configures all body segmentation module\n * removes background from input containing person\n * if segmentation is enabled it will run as preprocessing task before any other model\n * alternatively leave it disabled and use it on-demand using human.segmentation method which can\n * remove background or replace it with user-provided background\n*/\nexport interface SegmentationConfig extends GenericConfig {\n /** downsample ratio, adjust to reflect approximately how much of input is taken by body */\n ratio: number,\n /** possible rvm segmentation mode */\n mode: SegmentationEnum,\n}\n\n/** Run input through image filters before inference\n * - available only in Browser environments\n * - image filters run with near-zero latency as they are executed on the GPU using WebGL\n*/\nexport interface FilterConfig {\n /** are image filters enabled? */\n enabled: boolean,\n /** perform image histogram equalization\n * - equalization is performed on input as a whole and detected face before its passed for further analysis\n */\n equalization: boolean,\n /** resize input width\n * - if both width and height are set to 0, there is no resizing\n * - if just one is set, second one is scaled automatically\n * - if both are set, values are used as-is\n */\n width: number,\n /** resize input height\n * - if both width and height are set to 0, there is no resizing\n * - if just one is set, second one is scaled automatically\n * - if both are set, values are used as-is\n */\n height: number,\n /** return processed canvas imagedata in result */\n return: boolean,\n /** flip input as mirror image */\n flip: boolean,\n /** range: -1 (darken) to 1 (lighten) */\n brightness: number,\n /** range: -1 (reduce contrast) to 1 (increase contrast) */\n contrast: number,\n /** range: 0 (no sharpening) to 1 (maximum sharpening) */\n sharpness: number,\n /** range: 0 (no blur) to N (blur radius in pixels) */\n blur: number\n /** range: -1 (reduce saturation) to 1 (increase saturation) */\n saturation: number,\n /** range: 0 (no change) to 360 (hue rotation in degrees) */\n hue: number,\n /** image negative */\n negative: boolean,\n /** image sepia colors */\n sepia: boolean,\n /** image vintage colors */\n vintage: boolean,\n /** image kodachrome colors */\n kodachrome: boolean,\n /** image technicolor colors */\n technicolor: boolean,\n /** image polaroid camera effect */\n polaroid: boolean,\n /** range: 0 (no pixelate) to N (number of pixels to pixelate) */\n pixelate: number,\n}\n\n/** Controlls gesture detection */\nexport interface GestureConfig {\n /** is gesture detection enabled? */\n enabled: boolean,\n}\n/**\n * Configuration interface definition for **Human** library\n * Contains all configurable parameters\n * Defaults: [config](https://github.com/vladmandic/human/blob/main/src/config.ts#L262)\n */\nexport interface Config {\n /** Backend used for TFJS operations\n * valid build-in backends are:\n * - Browser: `cpu`, `wasm`, `webgl`, `humangl`, `webgpu`\n * - NodeJS: `cpu`, `wasm`, `tensorflow`\n * default: `webgl` for browser and `tensorflow` for nodejs\n */\n backend: BackendEnum,\n\n /** Path to *.wasm files if backend is set to `wasm`\n *\n * default: auto-detects to link to CDN `jsdelivr` when running in browser\n */\n wasmPath: string,\n\n /** Force WASM loader to use platform fetch\n *\n * default: false\n */\n wasmPlatformFetch: boolean,\n\n /** Print debug statements to console\n *\n * default: `true`\n */\n debug: boolean,\n\n /** Perform model loading and inference concurrently or sequentially\n *\n * default: `true`\n */\n async: boolean,\n\n /** What to use for `human.warmup()`\n * - warmup pre-initializes all models for faster inference but can take significant time on startup\n * - used by `webgl`, `humangl` and `webgpu` backends\n *\n * default: `full`\n */\n warmup: WarmupEnum,\n\n /** Base model path (typically starting with file://, http:// or https://) for all models\n * - individual modelPath values are relative to this path\n *\n * default: `../models/` for browsers and `file://models/` for nodejs\n */\n modelBasePath: string,\n\n /** Cache models in IndexDB on first sucessfull load\n * default: true if indexdb is available (browsers), false if its not (nodejs)\n */\n cacheModels: boolean,\n\n /** Validate kernel ops used in model during model load\n * default: true\n * any errors will be printed on console but will be treated as non-fatal\n */\n validateModels: boolean,\n\n /** Cache sensitivity\n * - values 0..1 where 0.01 means reset cache if input changed more than 1%\n * - set to 0 to disable caching\n *\n * default: 0.7\n */\n cacheSensitivity: number;\n\n /** Explicit flags passed to initialize TFJS */\n flags: Record,\n\n /** Software Kernels\n * Registers software kernel ops running on CPU when accelerated version of kernel is not found in the current backend\n */\n softwareKernels: boolean,\n\n /** Perform immediate garbage collection on deallocated tensors instead of caching them */\n deallocate: boolean;\n\n /** Internal Variable */\n skipAllowed: boolean;\n\n /** Filter config {@link FilterConfig} */\n filter: Partial,\n\n /** Gesture config {@link GestureConfig} */\n gesture: Partial;\n\n /** Face config {@link FaceConfig} */\n face: Partial,\n\n /** Body config {@link BodyConfig} */\n body: Partial,\n\n /** Hand config {@link HandConfig} */\n hand: Partial,\n\n /** Object config {@link ObjectConfig} */\n object: Partial,\n\n /** Segmentation config {@link SegmentationConfig} */\n segmentation: Partial,\n}\n\n/** - [See all default Config values...](https://github.com/vladmandic/human/blob/main/src/config.ts#L262) */\nconst config: Config = {\n backend: '',\n modelBasePath: '',\n cacheModels: true,\n validateModels: true,\n wasmPath: '',\n wasmPlatformFetch: false,\n debug: false,\n async: true,\n warmup: 'full',\n cacheSensitivity: 0.70,\n skipAllowed: false,\n deallocate: false,\n flags: {},\n softwareKernels: false,\n filter: {\n enabled: true,\n equalization: false,\n width: 0,\n height: 0,\n flip: false,\n return: true,\n brightness: 0,\n contrast: 0,\n sharpness: 0,\n blur: 0,\n saturation: 0,\n hue: 0,\n negative: false,\n sepia: false,\n vintage: false,\n kodachrome: false,\n technicolor: false,\n polaroid: false,\n pixelate: 0,\n },\n gesture: {\n enabled: true,\n },\n face: {\n enabled: true,\n detector: {\n modelPath: 'blazeface.json',\n rotation: true,\n maxDetected: 1,\n skipFrames: 99,\n skipTime: 2500,\n minConfidence: 0.2,\n iouThreshold: 0.1,\n mask: false,\n return: false,\n },\n mesh: {\n enabled: true,\n modelPath: 'facemesh.json',\n keepInvalid: false,\n },\n attention: {\n enabled: false,\n modelPath: 'facemesh-attention.json',\n },\n iris: {\n enabled: true,\n modelPath: 'iris.json',\n },\n emotion: {\n enabled: true,\n minConfidence: 0.1,\n skipFrames: 99,\n skipTime: 1500,\n modelPath: 'emotion.json',\n },\n description: {\n enabled: true,\n modelPath: 'faceres.json',\n skipFrames: 99,\n skipTime: 3000,\n minConfidence: 0.1,\n },\n antispoof: {\n enabled: false,\n skipFrames: 99,\n skipTime: 4000,\n modelPath: 'antispoof.json',\n },\n liveness: {\n enabled: false,\n skipFrames: 99,\n skipTime: 4000,\n modelPath: 'liveness.json',\n },\n },\n body: {\n enabled: true,\n modelPath: 'movenet-lightning.json',\n maxDetected: -1,\n minConfidence: 0.3,\n skipFrames: 1,\n skipTime: 200,\n },\n hand: {\n enabled: true,\n rotation: true,\n skipFrames: 99,\n skipTime: 1000,\n minConfidence: 0.50,\n iouThreshold: 0.2,\n maxDetected: -1,\n landmarks: true,\n detector: {\n modelPath: 'handtrack.json',\n },\n skeleton: {\n modelPath: 'handlandmark-full.json',\n },\n },\n object: {\n enabled: false,\n modelPath: 'mb3-centernet.json',\n minConfidence: 0.2,\n iouThreshold: 0.4,\n maxDetected: 10,\n skipFrames: 99,\n skipTime: 2000,\n },\n segmentation: {\n enabled: false,\n modelPath: 'rvm.json',\n ratio: 0.5,\n mode: 'default',\n },\n};\n\nexport { config as defaults };\n", "/*\n Human\n homepage: \n author: '\n*/\n\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __commonJS = (cb, mod4) => function __require() {\n return mod4 || (0, cb[__getOwnPropNames(cb)[0]])((mod4 = { exports: {} }).exports, mod4), mod4.exports;\n};\nvar __export = (target, all5) => {\n for (var name in all5)\n __defProp(target, name, { get: all5[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod4, isNodeMode, target) => (target = mod4 != null ? __create(__getProtoOf(mod4)) : {}, __copyProps(\n isNodeMode || !mod4 || !mod4.__esModule ? __defProp(target, \"default\", { value: mod4, enumerable: true }) : target,\n mod4\n));\n\n// node_modules/.pnpm/long@4.0.0/node_modules/long/src/long.js\nvar require_long = __commonJS({\n \"node_modules/.pnpm/long@4.0.0/node_modules/long/src/long.js\"(exports, module) {\n module.exports = Long2;\n var wasm = null;\n try {\n wasm = new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([\n 0,\n 97,\n 115,\n 109,\n 1,\n 0,\n 0,\n 0,\n 1,\n 13,\n 2,\n 96,\n 0,\n 1,\n 127,\n 96,\n 4,\n 127,\n 127,\n 127,\n 127,\n 1,\n 127,\n 3,\n 7,\n 6,\n 0,\n 1,\n 1,\n 1,\n 1,\n 1,\n 6,\n 6,\n 1,\n 127,\n 1,\n 65,\n 0,\n 11,\n 7,\n 50,\n 6,\n 3,\n 109,\n 117,\n 108,\n 0,\n 1,\n 5,\n 100,\n 105,\n 118,\n 95,\n 115,\n 0,\n 2,\n 5,\n 100,\n 105,\n 118,\n 95,\n 117,\n 0,\n 3,\n 5,\n 114,\n 101,\n 109,\n 95,\n 115,\n 0,\n 4,\n 5,\n 114,\n 101,\n 109,\n 95,\n 117,\n 0,\n 5,\n 8,\n 103,\n 101,\n 116,\n 95,\n 104,\n 105,\n 103,\n 104,\n 0,\n 0,\n 10,\n 191,\n 1,\n 6,\n 4,\n 0,\n 35,\n 0,\n 11,\n 36,\n 1,\n 1,\n 126,\n 32,\n 0,\n 173,\n 32,\n 1,\n 173,\n 66,\n 32,\n 134,\n 132,\n 32,\n 2,\n 173,\n 32,\n 3,\n 173,\n 66,\n 32,\n 134,\n 132,\n 126,\n 34,\n 4,\n 66,\n 32,\n 135,\n 167,\n 36,\n 0,\n 32,\n 4,\n 167,\n 11,\n 36,\n 1,\n 1,\n 126,\n 32,\n 0,\n 173,\n 32,\n 1,\n 173,\n 66,\n 32,\n 134,\n 132,\n 32,\n 2,\n 173,\n 32,\n 3,\n 173,\n 66,\n 32,\n 134,\n 132,\n 127,\n 34,\n 4,\n 66,\n 32,\n 135,\n 167,\n 36,\n 0,\n 32,\n 4,\n 167,\n 11,\n 36,\n 1,\n 1,\n 126,\n 32,\n 0,\n 173,\n 32,\n 1,\n 173,\n 66,\n 32,\n 134,\n 132,\n 32,\n 2,\n 173,\n 32,\n 3,\n 173,\n 66,\n 32,\n 134,\n 132,\n 128,\n 34,\n 4,\n 66,\n 32,\n 135,\n 167,\n 36,\n 0,\n 32,\n 4,\n 167,\n 11,\n 36,\n 1,\n 1,\n 126,\n 32,\n 0,\n 173,\n 32,\n 1,\n 173,\n 66,\n 32,\n 134,\n 132,\n 32,\n 2,\n 173,\n 32,\n 3,\n 173,\n 66,\n 32,\n 134,\n 132,\n 129,\n 34,\n 4,\n 66,\n 32,\n 135,\n 167,\n 36,\n 0,\n 32,\n 4,\n 167,\n 11,\n 36,\n 1,\n 1,\n 126,\n 32,\n 0,\n 173,\n 32,\n 1,\n 173,\n 66,\n 32,\n 134,\n 132,\n 32,\n 2,\n 173,\n 32,\n 3,\n 173,\n 66,\n 32,\n 134,\n 132,\n 130,\n 34,\n 4,\n 66,\n 32,\n 135,\n 167,\n 36,\n 0,\n 32,\n 4,\n 167,\n 11\n ])), {}).exports;\n } catch (e) {\n }\n function Long2(low, high, unsigned) {\n this.low = low | 0;\n this.high = high | 0;\n this.unsigned = !!unsigned;\n }\n Long2.prototype.__isLong__;\n Object.defineProperty(Long2.prototype, \"__isLong__\", { value: true });\n function isLong(obj) {\n return (obj && obj[\"__isLong__\"]) === true;\n }\n Long2.isLong = isLong;\n var INT_CACHE = {};\n var UINT_CACHE = {};\n function fromInt(value, unsigned) {\n var obj, cachedObj, cache;\n if (unsigned) {\n value >>>= 0;\n if (cache = 0 <= value && value < 256) {\n cachedObj = UINT_CACHE[value];\n if (cachedObj)\n return cachedObj;\n }\n obj = fromBits(value, (value | 0) < 0 ? -1 : 0, true);\n if (cache)\n UINT_CACHE[value] = obj;\n return obj;\n } else {\n value |= 0;\n if (cache = -128 <= value && value < 128) {\n cachedObj = INT_CACHE[value];\n if (cachedObj)\n return cachedObj;\n }\n obj = fromBits(value, value < 0 ? -1 : 0, false);\n if (cache)\n INT_CACHE[value] = obj;\n return obj;\n }\n }\n Long2.fromInt = fromInt;\n function fromNumber(value, unsigned) {\n if (isNaN(value))\n return unsigned ? UZERO : ZERO;\n if (unsigned) {\n if (value < 0)\n return UZERO;\n if (value >= TWO_PWR_64_DBL)\n return MAX_UNSIGNED_VALUE;\n } else {\n if (value <= -TWO_PWR_63_DBL)\n return MIN_VALUE;\n if (value + 1 >= TWO_PWR_63_DBL)\n return MAX_VALUE;\n }\n if (value < 0)\n return fromNumber(-value, unsigned).neg();\n return fromBits(value % TWO_PWR_32_DBL | 0, value / TWO_PWR_32_DBL | 0, unsigned);\n }\n Long2.fromNumber = fromNumber;\n function fromBits(lowBits, highBits, unsigned) {\n return new Long2(lowBits, highBits, unsigned);\n }\n Long2.fromBits = fromBits;\n var pow_dbl = Math.pow;\n function fromString(str, unsigned, radix) {\n if (str.length === 0)\n throw Error(\"empty string\");\n if (str === \"NaN\" || str === \"Infinity\" || str === \"+Infinity\" || str === \"-Infinity\")\n return ZERO;\n if (typeof unsigned === \"number\") {\n radix = unsigned, unsigned = false;\n } else {\n unsigned = !!unsigned;\n }\n radix = radix || 10;\n if (radix < 2 || 36 < radix)\n throw RangeError(\"radix\");\n var p2;\n if ((p2 = str.indexOf(\"-\")) > 0)\n throw Error(\"interior hyphen\");\n else if (p2 === 0) {\n return fromString(str.substring(1), unsigned, radix).neg();\n }\n var radixToPower = fromNumber(pow_dbl(radix, 8));\n var result = ZERO;\n for (var i = 0; i < str.length; i += 8) {\n var size = Math.min(8, str.length - i), value = parseInt(str.substring(i, i + size), radix);\n if (size < 8) {\n var power = fromNumber(pow_dbl(radix, size));\n result = result.mul(power).add(fromNumber(value));\n } else {\n result = result.mul(radixToPower);\n result = result.add(fromNumber(value));\n }\n }\n result.unsigned = unsigned;\n return result;\n }\n Long2.fromString = fromString;\n function fromValue(val, unsigned) {\n if (typeof val === \"number\")\n return fromNumber(val, unsigned);\n if (typeof val === \"string\")\n return fromString(val, unsigned);\n return fromBits(val.low, val.high, typeof unsigned === \"boolean\" ? unsigned : val.unsigned);\n }\n Long2.fromValue = fromValue;\n var TWO_PWR_16_DBL = 1 << 16;\n var TWO_PWR_24_DBL = 1 << 24;\n var TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL;\n var TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL;\n var TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2;\n var TWO_PWR_24 = fromInt(TWO_PWR_24_DBL);\n var ZERO = fromInt(0);\n Long2.ZERO = ZERO;\n var UZERO = fromInt(0, true);\n Long2.UZERO = UZERO;\n var ONE = fromInt(1);\n Long2.ONE = ONE;\n var UONE = fromInt(1, true);\n Long2.UONE = UONE;\n var NEG_ONE = fromInt(-1);\n Long2.NEG_ONE = NEG_ONE;\n var MAX_VALUE = fromBits(4294967295 | 0, 2147483647 | 0, false);\n Long2.MAX_VALUE = MAX_VALUE;\n var MAX_UNSIGNED_VALUE = fromBits(4294967295 | 0, 4294967295 | 0, true);\n Long2.MAX_UNSIGNED_VALUE = MAX_UNSIGNED_VALUE;\n var MIN_VALUE = fromBits(0, 2147483648 | 0, false);\n Long2.MIN_VALUE = MIN_VALUE;\n var LongPrototype = Long2.prototype;\n LongPrototype.toInt = function toInt() {\n return this.unsigned ? this.low >>> 0 : this.low;\n };\n LongPrototype.toNumber = function toNumber() {\n if (this.unsigned)\n return (this.high >>> 0) * TWO_PWR_32_DBL + (this.low >>> 0);\n return this.high * TWO_PWR_32_DBL + (this.low >>> 0);\n };\n LongPrototype.toString = function toString(radix) {\n radix = radix || 10;\n if (radix < 2 || 36 < radix)\n throw RangeError(\"radix\");\n if (this.isZero())\n return \"0\";\n if (this.isNegative()) {\n if (this.eq(MIN_VALUE)) {\n var radixLong = fromNumber(radix), div3 = this.div(radixLong), rem1 = div3.mul(radixLong).sub(this);\n return div3.toString(radix) + rem1.toInt().toString(radix);\n } else\n return \"-\" + this.neg().toString(radix);\n }\n var radixToPower = fromNumber(pow_dbl(radix, 6), this.unsigned), rem = this;\n var result = \"\";\n while (true) {\n var remDiv = rem.div(radixToPower), intval = rem.sub(remDiv.mul(radixToPower)).toInt() >>> 0, digits = intval.toString(radix);\n rem = remDiv;\n if (rem.isZero())\n return digits + result;\n else {\n while (digits.length < 6)\n digits = \"0\" + digits;\n result = \"\" + digits + result;\n }\n }\n };\n LongPrototype.getHighBits = function getHighBits() {\n return this.high;\n };\n LongPrototype.getHighBitsUnsigned = function getHighBitsUnsigned() {\n return this.high >>> 0;\n };\n LongPrototype.getLowBits = function getLowBits() {\n return this.low;\n };\n LongPrototype.getLowBitsUnsigned = function getLowBitsUnsigned() {\n return this.low >>> 0;\n };\n LongPrototype.getNumBitsAbs = function getNumBitsAbs() {\n if (this.isNegative())\n return this.eq(MIN_VALUE) ? 64 : this.neg().getNumBitsAbs();\n var val = this.high != 0 ? this.high : this.low;\n for (var bit = 31; bit > 0; bit--)\n if ((val & 1 << bit) != 0)\n break;\n return this.high != 0 ? bit + 33 : bit + 1;\n };\n LongPrototype.isZero = function isZero() {\n return this.high === 0 && this.low === 0;\n };\n LongPrototype.eqz = LongPrototype.isZero;\n LongPrototype.isNegative = function isNegative() {\n return !this.unsigned && this.high < 0;\n };\n LongPrototype.isPositive = function isPositive() {\n return this.unsigned || this.high >= 0;\n };\n LongPrototype.isOdd = function isOdd() {\n return (this.low & 1) === 1;\n };\n LongPrototype.isEven = function isEven2() {\n return (this.low & 1) === 0;\n };\n LongPrototype.equals = function equals(other) {\n if (!isLong(other))\n other = fromValue(other);\n if (this.unsigned !== other.unsigned && this.high >>> 31 === 1 && other.high >>> 31 === 1)\n return false;\n return this.high === other.high && this.low === other.low;\n };\n LongPrototype.eq = LongPrototype.equals;\n LongPrototype.notEquals = function notEquals(other) {\n return !this.eq(other);\n };\n LongPrototype.neq = LongPrototype.notEquals;\n LongPrototype.ne = LongPrototype.notEquals;\n LongPrototype.lessThan = function lessThan(other) {\n return this.comp(other) < 0;\n };\n LongPrototype.lt = LongPrototype.lessThan;\n LongPrototype.lessThanOrEqual = function lessThanOrEqual(other) {\n return this.comp(other) <= 0;\n };\n LongPrototype.lte = LongPrototype.lessThanOrEqual;\n LongPrototype.le = LongPrototype.lessThanOrEqual;\n LongPrototype.greaterThan = function greaterThan(other) {\n return this.comp(other) > 0;\n };\n LongPrototype.gt = LongPrototype.greaterThan;\n LongPrototype.greaterThanOrEqual = function greaterThanOrEqual(other) {\n return this.comp(other) >= 0;\n };\n LongPrototype.gte = LongPrototype.greaterThanOrEqual;\n LongPrototype.ge = LongPrototype.greaterThanOrEqual;\n LongPrototype.compare = function compare(other) {\n if (!isLong(other))\n other = fromValue(other);\n if (this.eq(other))\n return 0;\n var thisNeg = this.isNegative(), otherNeg = other.isNegative();\n if (thisNeg && !otherNeg)\n return -1;\n if (!thisNeg && otherNeg)\n return 1;\n if (!this.unsigned)\n return this.sub(other).isNegative() ? -1 : 1;\n return other.high >>> 0 > this.high >>> 0 || other.high === this.high && other.low >>> 0 > this.low >>> 0 ? -1 : 1;\n };\n LongPrototype.comp = LongPrototype.compare;\n LongPrototype.negate = function negate() {\n if (!this.unsigned && this.eq(MIN_VALUE))\n return MIN_VALUE;\n return this.not().add(ONE);\n };\n LongPrototype.neg = LongPrototype.negate;\n LongPrototype.add = function add5(addend) {\n if (!isLong(addend))\n addend = fromValue(addend);\n var a48 = this.high >>> 16;\n var a32 = this.high & 65535;\n var a16 = this.low >>> 16;\n var a00 = this.low & 65535;\n var b48 = addend.high >>> 16;\n var b32 = addend.high & 65535;\n var b16 = addend.low >>> 16;\n var b00 = addend.low & 65535;\n var c48 = 0, c32 = 0, c16 = 0, c00 = 0;\n c00 += a00 + b00;\n c16 += c00 >>> 16;\n c00 &= 65535;\n c16 += a16 + b16;\n c32 += c16 >>> 16;\n c16 &= 65535;\n c32 += a32 + b32;\n c48 += c32 >>> 16;\n c32 &= 65535;\n c48 += a48 + b48;\n c48 &= 65535;\n return fromBits(c16 << 16 | c00, c48 << 16 | c32, this.unsigned);\n };\n LongPrototype.subtract = function subtract(subtrahend) {\n if (!isLong(subtrahend))\n subtrahend = fromValue(subtrahend);\n return this.add(subtrahend.neg());\n };\n LongPrototype.sub = LongPrototype.subtract;\n LongPrototype.multiply = function multiply4(multiplier) {\n if (this.isZero())\n return ZERO;\n if (!isLong(multiplier))\n multiplier = fromValue(multiplier);\n if (wasm) {\n var low = wasm.mul(\n this.low,\n this.high,\n multiplier.low,\n multiplier.high\n );\n return fromBits(low, wasm.get_high(), this.unsigned);\n }\n if (multiplier.isZero())\n return ZERO;\n if (this.eq(MIN_VALUE))\n return multiplier.isOdd() ? MIN_VALUE : ZERO;\n if (multiplier.eq(MIN_VALUE))\n return this.isOdd() ? MIN_VALUE : ZERO;\n if (this.isNegative()) {\n if (multiplier.isNegative())\n return this.neg().mul(multiplier.neg());\n else\n return this.neg().mul(multiplier).neg();\n } else if (multiplier.isNegative())\n return this.mul(multiplier.neg()).neg();\n if (this.lt(TWO_PWR_24) && multiplier.lt(TWO_PWR_24))\n return fromNumber(this.toNumber() * multiplier.toNumber(), this.unsigned);\n var a48 = this.high >>> 16;\n var a32 = this.high & 65535;\n var a16 = this.low >>> 16;\n var a00 = this.low & 65535;\n var b48 = multiplier.high >>> 16;\n var b32 = multiplier.high & 65535;\n var b16 = multiplier.low >>> 16;\n var b00 = multiplier.low & 65535;\n var c48 = 0, c32 = 0, c16 = 0, c00 = 0;\n c00 += a00 * b00;\n c16 += c00 >>> 16;\n c00 &= 65535;\n c16 += a16 * b00;\n c32 += c16 >>> 16;\n c16 &= 65535;\n c16 += a00 * b16;\n c32 += c16 >>> 16;\n c16 &= 65535;\n c32 += a32 * b00;\n c48 += c32 >>> 16;\n c32 &= 65535;\n c32 += a16 * b16;\n c48 += c32 >>> 16;\n c32 &= 65535;\n c32 += a00 * b32;\n c48 += c32 >>> 16;\n c32 &= 65535;\n c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;\n c48 &= 65535;\n return fromBits(c16 << 16 | c00, c48 << 16 | c32, this.unsigned);\n };\n LongPrototype.mul = LongPrototype.multiply;\n LongPrototype.divide = function divide(divisor) {\n if (!isLong(divisor))\n divisor = fromValue(divisor);\n if (divisor.isZero())\n throw Error(\"division by zero\");\n if (wasm) {\n if (!this.unsigned && this.high === -2147483648 && divisor.low === -1 && divisor.high === -1) {\n return this;\n }\n var low = (this.unsigned ? wasm.div_u : wasm.div_s)(\n this.low,\n this.high,\n divisor.low,\n divisor.high\n );\n return fromBits(low, wasm.get_high(), this.unsigned);\n }\n if (this.isZero())\n return this.unsigned ? UZERO : ZERO;\n var approx, rem, res;\n if (!this.unsigned) {\n if (this.eq(MIN_VALUE)) {\n if (divisor.eq(ONE) || divisor.eq(NEG_ONE))\n return MIN_VALUE;\n else if (divisor.eq(MIN_VALUE))\n return ONE;\n else {\n var halfThis = this.shr(1);\n approx = halfThis.div(divisor).shl(1);\n if (approx.eq(ZERO)) {\n return divisor.isNegative() ? ONE : NEG_ONE;\n } else {\n rem = this.sub(divisor.mul(approx));\n res = approx.add(rem.div(divisor));\n return res;\n }\n }\n } else if (divisor.eq(MIN_VALUE))\n return this.unsigned ? UZERO : ZERO;\n if (this.isNegative()) {\n if (divisor.isNegative())\n return this.neg().div(divisor.neg());\n return this.neg().div(divisor).neg();\n } else if (divisor.isNegative())\n return this.div(divisor.neg()).neg();\n res = ZERO;\n } else {\n if (!divisor.unsigned)\n divisor = divisor.toUnsigned();\n if (divisor.gt(this))\n return UZERO;\n if (divisor.gt(this.shru(1)))\n return UONE;\n res = UZERO;\n }\n rem = this;\n while (rem.gte(divisor)) {\n approx = Math.max(1, Math.floor(rem.toNumber() / divisor.toNumber()));\n var log22 = Math.ceil(Math.log(approx) / Math.LN2), delta = log22 <= 48 ? 1 : pow_dbl(2, log22 - 48), approxRes = fromNumber(approx), approxRem = approxRes.mul(divisor);\n while (approxRem.isNegative() || approxRem.gt(rem)) {\n approx -= delta;\n approxRes = fromNumber(approx, this.unsigned);\n approxRem = approxRes.mul(divisor);\n }\n if (approxRes.isZero())\n approxRes = ONE;\n res = res.add(approxRes);\n rem = rem.sub(approxRem);\n }\n return res;\n };\n LongPrototype.div = LongPrototype.divide;\n LongPrototype.modulo = function modulo(divisor) {\n if (!isLong(divisor))\n divisor = fromValue(divisor);\n if (wasm) {\n var low = (this.unsigned ? wasm.rem_u : wasm.rem_s)(\n this.low,\n this.high,\n divisor.low,\n divisor.high\n );\n return fromBits(low, wasm.get_high(), this.unsigned);\n }\n return this.sub(this.div(divisor).mul(divisor));\n };\n LongPrototype.mod = LongPrototype.modulo;\n LongPrototype.rem = LongPrototype.modulo;\n LongPrototype.not = function not() {\n return fromBits(~this.low, ~this.high, this.unsigned);\n };\n LongPrototype.and = function and(other) {\n if (!isLong(other))\n other = fromValue(other);\n return fromBits(this.low & other.low, this.high & other.high, this.unsigned);\n };\n LongPrototype.or = function or(other) {\n if (!isLong(other))\n other = fromValue(other);\n return fromBits(this.low | other.low, this.high | other.high, this.unsigned);\n };\n LongPrototype.xor = function xor(other) {\n if (!isLong(other))\n other = fromValue(other);\n return fromBits(this.low ^ other.low, this.high ^ other.high, this.unsigned);\n };\n LongPrototype.shiftLeft = function shiftLeft(numBits) {\n if (isLong(numBits))\n numBits = numBits.toInt();\n if ((numBits &= 63) === 0)\n return this;\n else if (numBits < 32)\n return fromBits(this.low << numBits, this.high << numBits | this.low >>> 32 - numBits, this.unsigned);\n else\n return fromBits(0, this.low << numBits - 32, this.unsigned);\n };\n LongPrototype.shl = LongPrototype.shiftLeft;\n LongPrototype.shiftRight = function shiftRight(numBits) {\n if (isLong(numBits))\n numBits = numBits.toInt();\n if ((numBits &= 63) === 0)\n return this;\n else if (numBits < 32)\n return fromBits(this.low >>> numBits | this.high << 32 - numBits, this.high >> numBits, this.unsigned);\n else\n return fromBits(this.high >> numBits - 32, this.high >= 0 ? 0 : -1, this.unsigned);\n };\n LongPrototype.shr = LongPrototype.shiftRight;\n LongPrototype.shiftRightUnsigned = function shiftRightUnsigned(numBits) {\n if (isLong(numBits))\n numBits = numBits.toInt();\n numBits &= 63;\n if (numBits === 0)\n return this;\n else {\n var high = this.high;\n if (numBits < 32) {\n var low = this.low;\n return fromBits(low >>> numBits | high << 32 - numBits, high >>> numBits, this.unsigned);\n } else if (numBits === 32)\n return fromBits(high, 0, this.unsigned);\n else\n return fromBits(high >>> numBits - 32, 0, this.unsigned);\n }\n };\n LongPrototype.shru = LongPrototype.shiftRightUnsigned;\n LongPrototype.shr_u = LongPrototype.shiftRightUnsigned;\n LongPrototype.toSigned = function toSigned() {\n if (!this.unsigned)\n return this;\n return fromBits(this.low, this.high, false);\n };\n LongPrototype.toUnsigned = function toUnsigned() {\n if (this.unsigned)\n return this;\n return fromBits(this.low, this.high, true);\n };\n LongPrototype.toBytes = function toBytes(le) {\n return le ? this.toBytesLE() : this.toBytesBE();\n };\n LongPrototype.toBytesLE = function toBytesLE() {\n var hi = this.high, lo = this.low;\n return [\n lo & 255,\n lo >>> 8 & 255,\n lo >>> 16 & 255,\n lo >>> 24,\n hi & 255,\n hi >>> 8 & 255,\n hi >>> 16 & 255,\n hi >>> 24\n ];\n };\n LongPrototype.toBytesBE = function toBytesBE() {\n var hi = this.high, lo = this.low;\n return [\n hi >>> 24,\n hi >>> 16 & 255,\n hi >>> 8 & 255,\n hi & 255,\n lo >>> 24,\n lo >>> 16 & 255,\n lo >>> 8 & 255,\n lo & 255\n ];\n };\n Long2.fromBytes = function fromBytes(bytes, unsigned, le) {\n return le ? Long2.fromBytesLE(bytes, unsigned) : Long2.fromBytesBE(bytes, unsigned);\n };\n Long2.fromBytesLE = function fromBytesLE(bytes, unsigned) {\n return new Long2(\n bytes[0] | bytes[1] << 8 | bytes[2] << 16 | bytes[3] << 24,\n bytes[4] | bytes[5] << 8 | bytes[6] << 16 | bytes[7] << 24,\n unsigned\n );\n };\n Long2.fromBytesBE = function fromBytesBE(bytes, unsigned) {\n return new Long2(\n bytes[4] << 24 | bytes[5] << 16 | bytes[6] << 8 | bytes[7],\n bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3],\n unsigned\n );\n };\n }\n});\n\n// (disabled):node_modules/.pnpm/node-fetch@2.6.7/node_modules/node-fetch/browser.js\nvar require_browser = __commonJS({\n \"(disabled):node_modules/.pnpm/node-fetch@2.6.7/node_modules/node-fetch/browser.js\"() {\n }\n});\n\n// (disabled):util\nvar require_util = __commonJS({\n \"(disabled):util\"() {\n }\n});\n\n// node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/alea.js\nvar require_alea = __commonJS({\n \"node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/alea.js\"(exports, module) {\n (function(global2, module2, define2) {\n function Alea(seed) {\n var me = this, mash = Mash();\n me.next = function() {\n var t = 2091639 * me.s0 + me.c * 23283064365386963e-26;\n me.s0 = me.s1;\n me.s1 = me.s2;\n return me.s2 = t - (me.c = t | 0);\n };\n me.c = 1;\n me.s0 = mash(\" \");\n me.s1 = mash(\" \");\n me.s2 = mash(\" \");\n me.s0 -= mash(seed);\n if (me.s0 < 0) {\n me.s0 += 1;\n }\n me.s1 -= mash(seed);\n if (me.s1 < 0) {\n me.s1 += 1;\n }\n me.s2 -= mash(seed);\n if (me.s2 < 0) {\n me.s2 += 1;\n }\n mash = null;\n }\n function copy(f, t) {\n t.c = f.c;\n t.s0 = f.s0;\n t.s1 = f.s1;\n t.s2 = f.s2;\n return t;\n }\n function impl(seed, opts) {\n var xg = new Alea(seed), state = opts && opts.state, prng = xg.next;\n prng.int32 = function() {\n return xg.next() * 4294967296 | 0;\n };\n prng.double = function() {\n return prng() + (prng() * 2097152 | 0) * 11102230246251565e-32;\n };\n prng.quick = prng;\n if (state) {\n if (typeof state == \"object\")\n copy(state, xg);\n prng.state = function() {\n return copy(xg, {});\n };\n }\n return prng;\n }\n function Mash() {\n var n = 4022871197;\n var mash = function(data) {\n data = String(data);\n for (var i = 0; i < data.length; i++) {\n n += data.charCodeAt(i);\n var h = 0.02519603282416938 * n;\n n = h >>> 0;\n h -= n;\n h *= n;\n n = h >>> 0;\n h -= n;\n n += h * 4294967296;\n }\n return (n >>> 0) * 23283064365386963e-26;\n };\n return mash;\n }\n if (module2 && module2.exports) {\n module2.exports = impl;\n } else if (define2 && define2.amd) {\n define2(function() {\n return impl;\n });\n } else {\n this.alea = impl;\n }\n })(\n exports,\n typeof module == \"object\" && module,\n typeof define == \"function\" && define\n );\n }\n});\n\n// node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/xor128.js\nvar require_xor128 = __commonJS({\n \"node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/xor128.js\"(exports, module) {\n (function(global2, module2, define2) {\n function XorGen(seed) {\n var me = this, strseed = \"\";\n me.x = 0;\n me.y = 0;\n me.z = 0;\n me.w = 0;\n me.next = function() {\n var t = me.x ^ me.x << 11;\n me.x = me.y;\n me.y = me.z;\n me.z = me.w;\n return me.w ^= me.w >>> 19 ^ t ^ t >>> 8;\n };\n if (seed === (seed | 0)) {\n me.x = seed;\n } else {\n strseed += seed;\n }\n for (var k = 0; k < strseed.length + 64; k++) {\n me.x ^= strseed.charCodeAt(k) | 0;\n me.next();\n }\n }\n function copy(f, t) {\n t.x = f.x;\n t.y = f.y;\n t.z = f.z;\n t.w = f.w;\n return t;\n }\n function impl(seed, opts) {\n var xg = new XorGen(seed), state = opts && opts.state, prng = function() {\n return (xg.next() >>> 0) / 4294967296;\n };\n prng.double = function() {\n do {\n var top = xg.next() >>> 11, bot = (xg.next() >>> 0) / 4294967296, result = (top + bot) / (1 << 21);\n } while (result === 0);\n return result;\n };\n prng.int32 = xg.next;\n prng.quick = prng;\n if (state) {\n if (typeof state == \"object\")\n copy(state, xg);\n prng.state = function() {\n return copy(xg, {});\n };\n }\n return prng;\n }\n if (module2 && module2.exports) {\n module2.exports = impl;\n } else if (define2 && define2.amd) {\n define2(function() {\n return impl;\n });\n } else {\n this.xor128 = impl;\n }\n })(\n exports,\n typeof module == \"object\" && module,\n typeof define == \"function\" && define\n );\n }\n});\n\n// node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/xorwow.js\nvar require_xorwow = __commonJS({\n \"node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/xorwow.js\"(exports, module) {\n (function(global2, module2, define2) {\n function XorGen(seed) {\n var me = this, strseed = \"\";\n me.next = function() {\n var t = me.x ^ me.x >>> 2;\n me.x = me.y;\n me.y = me.z;\n me.z = me.w;\n me.w = me.v;\n return (me.d = me.d + 362437 | 0) + (me.v = me.v ^ me.v << 4 ^ (t ^ t << 1)) | 0;\n };\n me.x = 0;\n me.y = 0;\n me.z = 0;\n me.w = 0;\n me.v = 0;\n if (seed === (seed | 0)) {\n me.x = seed;\n } else {\n strseed += seed;\n }\n for (var k = 0; k < strseed.length + 64; k++) {\n me.x ^= strseed.charCodeAt(k) | 0;\n if (k == strseed.length) {\n me.d = me.x << 10 ^ me.x >>> 4;\n }\n me.next();\n }\n }\n function copy(f, t) {\n t.x = f.x;\n t.y = f.y;\n t.z = f.z;\n t.w = f.w;\n t.v = f.v;\n t.d = f.d;\n return t;\n }\n function impl(seed, opts) {\n var xg = new XorGen(seed), state = opts && opts.state, prng = function() {\n return (xg.next() >>> 0) / 4294967296;\n };\n prng.double = function() {\n do {\n var top = xg.next() >>> 11, bot = (xg.next() >>> 0) / 4294967296, result = (top + bot) / (1 << 21);\n } while (result === 0);\n return result;\n };\n prng.int32 = xg.next;\n prng.quick = prng;\n if (state) {\n if (typeof state == \"object\")\n copy(state, xg);\n prng.state = function() {\n return copy(xg, {});\n };\n }\n return prng;\n }\n if (module2 && module2.exports) {\n module2.exports = impl;\n } else if (define2 && define2.amd) {\n define2(function() {\n return impl;\n });\n } else {\n this.xorwow = impl;\n }\n })(\n exports,\n typeof module == \"object\" && module,\n typeof define == \"function\" && define\n );\n }\n});\n\n// node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/xorshift7.js\nvar require_xorshift7 = __commonJS({\n \"node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/xorshift7.js\"(exports, module) {\n (function(global2, module2, define2) {\n function XorGen(seed) {\n var me = this;\n me.next = function() {\n var X = me.x, i = me.i, t, v, w;\n t = X[i];\n t ^= t >>> 7;\n v = t ^ t << 24;\n t = X[i + 1 & 7];\n v ^= t ^ t >>> 10;\n t = X[i + 3 & 7];\n v ^= t ^ t >>> 3;\n t = X[i + 4 & 7];\n v ^= t ^ t << 7;\n t = X[i + 7 & 7];\n t = t ^ t << 13;\n v ^= t ^ t << 9;\n X[i] = v;\n me.i = i + 1 & 7;\n return v;\n };\n function init2(me2, seed2) {\n var j, w, X = [];\n if (seed2 === (seed2 | 0)) {\n w = X[0] = seed2;\n } else {\n seed2 = \"\" + seed2;\n for (j = 0; j < seed2.length; ++j) {\n X[j & 7] = X[j & 7] << 15 ^ seed2.charCodeAt(j) + X[j + 1 & 7] << 13;\n }\n }\n while (X.length < 8)\n X.push(0);\n for (j = 0; j < 8 && X[j] === 0; ++j)\n ;\n if (j == 8)\n w = X[7] = -1;\n else\n w = X[j];\n me2.x = X;\n me2.i = 0;\n for (j = 256; j > 0; --j) {\n me2.next();\n }\n }\n init2(me, seed);\n }\n function copy(f, t) {\n t.x = f.x.slice();\n t.i = f.i;\n return t;\n }\n function impl(seed, opts) {\n if (seed == null)\n seed = +new Date();\n var xg = new XorGen(seed), state = opts && opts.state, prng = function() {\n return (xg.next() >>> 0) / 4294967296;\n };\n prng.double = function() {\n do {\n var top = xg.next() >>> 11, bot = (xg.next() >>> 0) / 4294967296, result = (top + bot) / (1 << 21);\n } while (result === 0);\n return result;\n };\n prng.int32 = xg.next;\n prng.quick = prng;\n if (state) {\n if (state.x)\n copy(state, xg);\n prng.state = function() {\n return copy(xg, {});\n };\n }\n return prng;\n }\n if (module2 && module2.exports) {\n module2.exports = impl;\n } else if (define2 && define2.amd) {\n define2(function() {\n return impl;\n });\n } else {\n this.xorshift7 = impl;\n }\n })(\n exports,\n typeof module == \"object\" && module,\n typeof define == \"function\" && define\n );\n }\n});\n\n// node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/xor4096.js\nvar require_xor4096 = __commonJS({\n \"node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/xor4096.js\"(exports, module) {\n (function(global2, module2, define2) {\n function XorGen(seed) {\n var me = this;\n me.next = function() {\n var w = me.w, X = me.X, i = me.i, t, v;\n me.w = w = w + 1640531527 | 0;\n v = X[i + 34 & 127];\n t = X[i = i + 1 & 127];\n v ^= v << 13;\n t ^= t << 17;\n v ^= v >>> 15;\n t ^= t >>> 12;\n v = X[i] = v ^ t;\n me.i = i;\n return v + (w ^ w >>> 16) | 0;\n };\n function init2(me2, seed2) {\n var t, v, i, j, w, X = [], limit = 128;\n if (seed2 === (seed2 | 0)) {\n v = seed2;\n seed2 = null;\n } else {\n seed2 = seed2 + \"\\0\";\n v = 0;\n limit = Math.max(limit, seed2.length);\n }\n for (i = 0, j = -32; j < limit; ++j) {\n if (seed2)\n v ^= seed2.charCodeAt((j + 32) % seed2.length);\n if (j === 0)\n w = v;\n v ^= v << 10;\n v ^= v >>> 15;\n v ^= v << 4;\n v ^= v >>> 13;\n if (j >= 0) {\n w = w + 1640531527 | 0;\n t = X[j & 127] ^= v + w;\n i = 0 == t ? i + 1 : 0;\n }\n }\n if (i >= 128) {\n X[(seed2 && seed2.length || 0) & 127] = -1;\n }\n i = 127;\n for (j = 4 * 128; j > 0; --j) {\n v = X[i + 34 & 127];\n t = X[i = i + 1 & 127];\n v ^= v << 13;\n t ^= t << 17;\n v ^= v >>> 15;\n t ^= t >>> 12;\n X[i] = v ^ t;\n }\n me2.w = w;\n me2.X = X;\n me2.i = i;\n }\n init2(me, seed);\n }\n function copy(f, t) {\n t.i = f.i;\n t.w = f.w;\n t.X = f.X.slice();\n return t;\n }\n ;\n function impl(seed, opts) {\n if (seed == null)\n seed = +new Date();\n var xg = new XorGen(seed), state = opts && opts.state, prng = function() {\n return (xg.next() >>> 0) / 4294967296;\n };\n prng.double = function() {\n do {\n var top = xg.next() >>> 11, bot = (xg.next() >>> 0) / 4294967296, result = (top + bot) / (1 << 21);\n } while (result === 0);\n return result;\n };\n prng.int32 = xg.next;\n prng.quick = prng;\n if (state) {\n if (state.X)\n copy(state, xg);\n prng.state = function() {\n return copy(xg, {});\n };\n }\n return prng;\n }\n if (module2 && module2.exports) {\n module2.exports = impl;\n } else if (define2 && define2.amd) {\n define2(function() {\n return impl;\n });\n } else {\n this.xor4096 = impl;\n }\n })(\n exports,\n typeof module == \"object\" && module,\n typeof define == \"function\" && define\n );\n }\n});\n\n// node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/tychei.js\nvar require_tychei = __commonJS({\n \"node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/tychei.js\"(exports, module) {\n (function(global2, module2, define2) {\n function XorGen(seed) {\n var me = this, strseed = \"\";\n me.next = function() {\n var b = me.b, c = me.c, d = me.d, a = me.a;\n b = b << 25 ^ b >>> 7 ^ c;\n c = c - d | 0;\n d = d << 24 ^ d >>> 8 ^ a;\n a = a - b | 0;\n me.b = b = b << 20 ^ b >>> 12 ^ c;\n me.c = c = c - d | 0;\n me.d = d << 16 ^ c >>> 16 ^ a;\n return me.a = a - b | 0;\n };\n me.a = 0;\n me.b = 0;\n me.c = 2654435769 | 0;\n me.d = 1367130551;\n if (seed === Math.floor(seed)) {\n me.a = seed / 4294967296 | 0;\n me.b = seed | 0;\n } else {\n strseed += seed;\n }\n for (var k = 0; k < strseed.length + 20; k++) {\n me.b ^= strseed.charCodeAt(k) | 0;\n me.next();\n }\n }\n function copy(f, t) {\n t.a = f.a;\n t.b = f.b;\n t.c = f.c;\n t.d = f.d;\n return t;\n }\n ;\n function impl(seed, opts) {\n var xg = new XorGen(seed), state = opts && opts.state, prng = function() {\n return (xg.next() >>> 0) / 4294967296;\n };\n prng.double = function() {\n do {\n var top = xg.next() >>> 11, bot = (xg.next() >>> 0) / 4294967296, result = (top + bot) / (1 << 21);\n } while (result === 0);\n return result;\n };\n prng.int32 = xg.next;\n prng.quick = prng;\n if (state) {\n if (typeof state == \"object\")\n copy(state, xg);\n prng.state = function() {\n return copy(xg, {});\n };\n }\n return prng;\n }\n if (module2 && module2.exports) {\n module2.exports = impl;\n } else if (define2 && define2.amd) {\n define2(function() {\n return impl;\n });\n } else {\n this.tychei = impl;\n }\n })(\n exports,\n typeof module == \"object\" && module,\n typeof define == \"function\" && define\n );\n }\n});\n\n// (disabled):crypto\nvar require_crypto = __commonJS({\n \"(disabled):crypto\"() {\n }\n});\n\n// node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/seedrandom.js\nvar require_seedrandom = __commonJS({\n \"node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/seedrandom.js\"(exports, module) {\n (function(global2, pool3, math) {\n var width = 256, chunks = 6, digits = 52, rngname = \"random\", startdenom = math.pow(width, chunks), significance = math.pow(2, digits), overflow = significance * 2, mask = width - 1, nodecrypto;\n function seedrandom5(seed, options, callback) {\n var key = [];\n options = options == true ? { entropy: true } : options || {};\n var shortseed = mixkey(flatten4(\n options.entropy ? [seed, tostring(pool3)] : seed == null ? autoseed() : seed,\n 3\n ), key);\n var arc4 = new ARC4(key);\n var prng = function() {\n var n = arc4.g(chunks), d = startdenom, x = 0;\n while (n < significance) {\n n = (n + x) * width;\n d *= width;\n x = arc4.g(1);\n }\n while (n >= overflow) {\n n /= 2;\n d /= 2;\n x >>>= 1;\n }\n return (n + x) / d;\n };\n prng.int32 = function() {\n return arc4.g(4) | 0;\n };\n prng.quick = function() {\n return arc4.g(4) / 4294967296;\n };\n prng.double = prng;\n mixkey(tostring(arc4.S), pool3);\n return (options.pass || callback || function(prng2, seed2, is_math_call, state) {\n if (state) {\n if (state.S) {\n copy(state, arc4);\n }\n prng2.state = function() {\n return copy(arc4, {});\n };\n }\n if (is_math_call) {\n math[rngname] = prng2;\n return seed2;\n } else\n return prng2;\n })(\n prng,\n shortseed,\n \"global\" in options ? options.global : this == math,\n options.state\n );\n }\n function ARC4(key) {\n var t, keylen = key.length, me = this, i = 0, j = me.i = me.j = 0, s = me.S = [];\n if (!keylen) {\n key = [keylen++];\n }\n while (i < width) {\n s[i] = i++;\n }\n for (i = 0; i < width; i++) {\n s[i] = s[j = mask & j + key[i % keylen] + (t = s[i])];\n s[j] = t;\n }\n (me.g = function(count2) {\n var t2, r = 0, i2 = me.i, j2 = me.j, s2 = me.S;\n while (count2--) {\n t2 = s2[i2 = mask & i2 + 1];\n r = r * width + s2[mask & (s2[i2] = s2[j2 = mask & j2 + t2]) + (s2[j2] = t2)];\n }\n me.i = i2;\n me.j = j2;\n return r;\n })(width);\n }\n function copy(f, t) {\n t.i = f.i;\n t.j = f.j;\n t.S = f.S.slice();\n return t;\n }\n ;\n function flatten4(obj, depth) {\n var result = [], typ = typeof obj, prop;\n if (depth && typ == \"object\") {\n for (prop in obj) {\n try {\n result.push(flatten4(obj[prop], depth - 1));\n } catch (e) {\n }\n }\n }\n return result.length ? result : typ == \"string\" ? obj : obj + \"\\0\";\n }\n function mixkey(seed, key) {\n var stringseed = seed + \"\", smear, j = 0;\n while (j < stringseed.length) {\n key[mask & j] = mask & (smear ^= key[mask & j] * 19) + stringseed.charCodeAt(j++);\n }\n return tostring(key);\n }\n function autoseed() {\n try {\n var out;\n if (nodecrypto && (out = nodecrypto.randomBytes)) {\n out = out(width);\n } else {\n out = new Uint8Array(width);\n (global2.crypto || global2.msCrypto).getRandomValues(out);\n }\n return tostring(out);\n } catch (e) {\n var browser = global2.navigator, plugins = browser && browser.plugins;\n return [+new Date(), global2, plugins, global2.screen, tostring(pool3)];\n }\n }\n function tostring(a) {\n return String.fromCharCode.apply(0, a);\n }\n mixkey(math.random(), pool3);\n if (typeof module == \"object\" && module.exports) {\n module.exports = seedrandom5;\n try {\n nodecrypto = require_crypto();\n } catch (ex) {\n }\n } else if (typeof define == \"function\" && define.amd) {\n define(function() {\n return seedrandom5;\n });\n } else {\n math[\"seed\" + rngname] = seedrandom5;\n }\n })(\n typeof self !== \"undefined\" ? self : exports,\n [],\n Math\n );\n }\n});\n\n// node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/index.js\nvar require_seedrandom2 = __commonJS({\n \"node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/index.js\"(exports, module) {\n var alea5 = require_alea();\n var xor128 = require_xor128();\n var xorwow = require_xorwow();\n var xorshift7 = require_xorshift7();\n var xor4096 = require_xor4096();\n var tychei = require_tychei();\n var sr = require_seedrandom();\n sr.alea = alea5;\n sr.xor128 = xor128;\n sr.xorwow = xorwow;\n sr.xorshift7 = xorshift7;\n sr.xor4096 = xor4096;\n sr.tychei = tychei;\n module.exports = sr;\n }\n});\n\n// (disabled):node_modules/.pnpm/string_decoder@1.3.0/node_modules/string_decoder/lib/string_decoder.js\nvar require_string_decoder = __commonJS({\n \"(disabled):node_modules/.pnpm/string_decoder@1.3.0/node_modules/string_decoder/lib/string_decoder.js\"() {\n }\n});\n\n// (disabled):fs\nvar require_fs = __commonJS({\n \"(disabled):fs\"() {\n }\n});\n\n// (disabled):path\nvar require_path = __commonJS({\n \"(disabled):path\"() {\n }\n});\n\n// (disabled):worker_threads\nvar require_worker_threads = __commonJS({\n \"(disabled):worker_threads\"() {\n }\n});\n\n// (disabled):perf_hooks\nvar require_perf_hooks = __commonJS({\n \"(disabled):perf_hooks\"() {\n }\n});\n\n// (disabled):os\nvar require_os = __commonJS({\n \"(disabled):os\"() {\n }\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm-threaded-simd.js\nvar require_tfjs_backend_wasm_threaded_simd = __commonJS({\n \"node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm-threaded-simd.js\"(exports, module) {\n var WasmBackendModuleThreadedSimd2 = (() => {\n var _scriptDir = typeof document !== \"undefined\" && document.currentScript ? document.currentScript.src : void 0;\n if (typeof __filename !== \"undefined\")\n _scriptDir = _scriptDir || __filename;\n return function(WasmBackendModuleThreadedSimd3) {\n WasmBackendModuleThreadedSimd3 = WasmBackendModuleThreadedSimd3 || {};\n function GROWABLE_HEAP_I8() {\n if (wasmMemory.buffer != buffer2) {\n updateGlobalBufferAndViews(wasmMemory.buffer);\n }\n return HEAP8;\n }\n function GROWABLE_HEAP_U8() {\n if (wasmMemory.buffer != buffer2) {\n updateGlobalBufferAndViews(wasmMemory.buffer);\n }\n return HEAPU8;\n }\n function GROWABLE_HEAP_I16() {\n if (wasmMemory.buffer != buffer2) {\n updateGlobalBufferAndViews(wasmMemory.buffer);\n }\n return HEAP16;\n }\n function GROWABLE_HEAP_U16() {\n if (wasmMemory.buffer != buffer2) {\n updateGlobalBufferAndViews(wasmMemory.buffer);\n }\n return HEAPU16;\n }\n function GROWABLE_HEAP_I32() {\n if (wasmMemory.buffer != buffer2) {\n updateGlobalBufferAndViews(wasmMemory.buffer);\n }\n return HEAP32;\n }\n function GROWABLE_HEAP_F32() {\n if (wasmMemory.buffer != buffer2) {\n updateGlobalBufferAndViews(wasmMemory.buffer);\n }\n return HEAPF32;\n }\n function GROWABLE_HEAP_F64() {\n if (wasmMemory.buffer != buffer2) {\n updateGlobalBufferAndViews(wasmMemory.buffer);\n }\n return HEAPF64;\n }\n var Module = typeof WasmBackendModuleThreadedSimd3 !== \"undefined\" ? WasmBackendModuleThreadedSimd3 : {};\n var readyPromiseResolve, readyPromiseReject;\n Module[\"ready\"] = new Promise(function(resolve, reject) {\n readyPromiseResolve = resolve;\n readyPromiseReject = reject;\n });\n var beforeListeners;\n if (typeof process !== \"undefined\" && process.listeners) {\n beforeListeners = { uncaughtException: process.listeners(\"uncaughtException\"), unhandledRejection: process.listeners(\"unhandledRejection\") };\n }\n var moduleOverrides = Object.assign({}, Module);\n var arguments_ = [];\n var thisProgram = \"./this.program\";\n var quit_ = (status, toThrow) => {\n throw toThrow;\n };\n var ENVIRONMENT_IS_WEB = typeof window === \"object\";\n var ENVIRONMENT_IS_WORKER = typeof importScripts === \"function\";\n var ENVIRONMENT_IS_NODE = typeof process === \"object\" && typeof process.versions === \"object\" && typeof process.versions.node === \"string\";\n var ENVIRONMENT_IS_PTHREAD = Module[\"ENVIRONMENT_IS_PTHREAD\"] || false;\n var scriptDirectory = \"\";\n function locateFile(path) {\n if (Module[\"locateFile\"]) {\n return Module[\"locateFile\"](path, scriptDirectory);\n }\n return scriptDirectory + path;\n }\n var read_, readAsync, readBinary, setWindowTitle;\n function logExceptionOnExit(e) {\n if (e instanceof ExitStatus)\n return;\n let toLog = e;\n err(\"exiting due to exception: \" + toLog);\n }\n var fs;\n var nodePath;\n var requireNodeFS;\n if (ENVIRONMENT_IS_NODE) {\n if (ENVIRONMENT_IS_WORKER) {\n scriptDirectory = require_path().dirname(scriptDirectory) + \"/\";\n } else {\n scriptDirectory = __dirname + \"/\";\n }\n requireNodeFS = () => {\n if (!nodePath) {\n fs = require_fs();\n nodePath = require_path();\n }\n };\n read_ = function shell_read(filename, binary) {\n requireNodeFS();\n filename = nodePath[\"normalize\"](filename);\n return fs.readFileSync(filename, binary ? void 0 : \"utf8\");\n };\n readBinary = (filename) => {\n var ret = read_(filename, true);\n if (!ret.buffer) {\n ret = new Uint8Array(ret);\n }\n return ret;\n };\n readAsync = (filename, onload, onerror) => {\n requireNodeFS();\n filename = nodePath[\"normalize\"](filename);\n fs.readFile(filename, function(err2, data) {\n if (err2)\n onerror(err2);\n else\n onload(data.buffer);\n });\n };\n if (process[\"argv\"].length > 1) {\n thisProgram = process[\"argv\"][1].replace(/\\\\/g, \"/\");\n }\n arguments_ = process[\"argv\"].slice(2);\n process[\"on\"](\"uncaughtException\", function(ex) {\n if (!(ex instanceof ExitStatus)) {\n throw ex;\n }\n });\n process[\"on\"](\"unhandledRejection\", function(reason) {\n throw reason;\n });\n quit_ = (status, toThrow) => {\n if (keepRuntimeAlive()) {\n process[\"exitCode\"] = status;\n throw toThrow;\n }\n logExceptionOnExit(toThrow);\n process[\"exit\"](status);\n };\n Module[\"inspect\"] = function() {\n return \"[Emscripten Module object]\";\n };\n let nodeWorkerThreads;\n try {\n nodeWorkerThreads = require_worker_threads();\n } catch (e) {\n console.error('The \"worker_threads\" module is not supported in this node.js build - perhaps a newer version is needed?');\n throw e;\n }\n global.Worker = nodeWorkerThreads.Worker;\n } else if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) {\n if (ENVIRONMENT_IS_WORKER) {\n scriptDirectory = self.location.href;\n } else if (typeof document !== \"undefined\" && document.currentScript) {\n scriptDirectory = document.currentScript.src;\n }\n if (typeof _scriptDir !== \"undefined\" && _scriptDir) {\n scriptDirectory = _scriptDir;\n }\n if (scriptDirectory.indexOf(\"blob:\") !== 0) {\n scriptDirectory = scriptDirectory.substr(0, scriptDirectory.replace(/[?#].*/, \"\").lastIndexOf(\"/\") + 1);\n } else {\n scriptDirectory = \"\";\n }\n if (!ENVIRONMENT_IS_NODE) {\n read_ = (url) => {\n var xhr = new XMLHttpRequest();\n xhr.open(\"GET\", url, false);\n xhr.send(null);\n return xhr.responseText;\n };\n if (ENVIRONMENT_IS_WORKER) {\n readBinary = (url) => {\n var xhr = new XMLHttpRequest();\n xhr.open(\"GET\", url, false);\n xhr.responseType = \"arraybuffer\";\n xhr.send(null);\n return new Uint8Array(xhr.response);\n };\n }\n readAsync = (url, onload, onerror) => {\n var xhr = new XMLHttpRequest();\n xhr.open(\"GET\", url, true);\n xhr.responseType = \"arraybuffer\";\n xhr.onload = () => {\n if (xhr.status == 200 || xhr.status == 0 && xhr.response) {\n onload(xhr.response);\n return;\n }\n onerror();\n };\n xhr.onerror = onerror;\n xhr.send(null);\n };\n }\n setWindowTitle = (title) => document.title = title;\n } else {\n }\n if (ENVIRONMENT_IS_NODE) {\n if (typeof performance === \"undefined\") {\n global.performance = require_perf_hooks().performance;\n }\n }\n var defaultPrint = console.log.bind(console);\n var defaultPrintErr = console.warn.bind(console);\n if (ENVIRONMENT_IS_NODE) {\n requireNodeFS();\n defaultPrint = (str) => fs.writeSync(1, str + \"\\n\");\n defaultPrintErr = (str) => fs.writeSync(2, str + \"\\n\");\n }\n var out = Module[\"print\"] || defaultPrint;\n var err = Module[\"printErr\"] || defaultPrintErr;\n Object.assign(Module, moduleOverrides);\n moduleOverrides = null;\n if (Module[\"arguments\"])\n arguments_ = Module[\"arguments\"];\n if (Module[\"thisProgram\"])\n thisProgram = Module[\"thisProgram\"];\n if (Module[\"quit\"])\n quit_ = Module[\"quit\"];\n var POINTER_SIZE = 4;\n function warnOnce(text) {\n if (!warnOnce.shown)\n warnOnce.shown = {};\n if (!warnOnce.shown[text]) {\n warnOnce.shown[text] = 1;\n err(text);\n }\n }\n function convertJsFunctionToWasm(func2, sig) {\n if (typeof WebAssembly.Function === \"function\") {\n var typeNames = { \"i\": \"i32\", \"j\": \"i64\", \"f\": \"f32\", \"d\": \"f64\" };\n var type = { parameters: [], results: sig[0] == \"v\" ? [] : [typeNames[sig[0]]] };\n for (var i = 1; i < sig.length; ++i) {\n type.parameters.push(typeNames[sig[i]]);\n }\n return new WebAssembly.Function(type, func2);\n }\n var typeSection = [1, 0, 1, 96];\n var sigRet = sig.slice(0, 1);\n var sigParam = sig.slice(1);\n var typeCodes = { \"i\": 127, \"j\": 126, \"f\": 125, \"d\": 124 };\n typeSection.push(sigParam.length);\n for (var i = 0; i < sigParam.length; ++i) {\n typeSection.push(typeCodes[sigParam[i]]);\n }\n if (sigRet == \"v\") {\n typeSection.push(0);\n } else {\n typeSection = typeSection.concat([1, typeCodes[sigRet]]);\n }\n typeSection[1] = typeSection.length - 2;\n var bytes = new Uint8Array([0, 97, 115, 109, 1, 0, 0, 0].concat(typeSection, [2, 7, 1, 1, 101, 1, 102, 0, 0, 7, 5, 1, 1, 102, 0, 0]));\n var module2 = new WebAssembly.Module(bytes);\n var instance = new WebAssembly.Instance(module2, { \"e\": { \"f\": func2 } });\n var wrappedFunc = instance.exports[\"f\"];\n return wrappedFunc;\n }\n var freeTableIndexes = [];\n var functionsInTableMap;\n function getEmptyTableSlot() {\n if (freeTableIndexes.length) {\n return freeTableIndexes.pop();\n }\n try {\n wasmTable.grow(1);\n } catch (err2) {\n if (!(err2 instanceof RangeError)) {\n throw err2;\n }\n throw \"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.\";\n }\n return wasmTable.length - 1;\n }\n function updateTableMap(offset, count2) {\n for (var i = offset; i < offset + count2; i++) {\n var item = getWasmTableEntry(i);\n if (item) {\n functionsInTableMap.set(item, i);\n }\n }\n }\n var tempRet0 = 0;\n var setTempRet0 = (value) => {\n tempRet0 = value;\n };\n var Atomics_load = Atomics.load;\n var Atomics_store = Atomics.store;\n var Atomics_compareExchange = Atomics.compareExchange;\n var wasmBinary;\n if (Module[\"wasmBinary\"])\n wasmBinary = Module[\"wasmBinary\"];\n var noExitRuntime = Module[\"noExitRuntime\"] || true;\n if (typeof WebAssembly !== \"object\") {\n abort(\"no native wasm support detected\");\n }\n var wasmMemory;\n var wasmModule;\n var ABORT = false;\n var EXITSTATUS;\n function assert3(condition, text) {\n if (!condition) {\n abort(text);\n }\n }\n function getCFunc(ident) {\n var func2 = Module[\"_\" + ident];\n return func2;\n }\n function ccall(ident, returnType, argTypes, args, opts) {\n var toC = { \"string\": function(str) {\n var ret2 = 0;\n if (str !== null && str !== void 0 && str !== 0) {\n var len = (str.length << 2) + 1;\n ret2 = stackAlloc(len);\n stringToUTF8(str, ret2, len);\n }\n return ret2;\n }, \"array\": function(arr) {\n var ret2 = stackAlloc(arr.length);\n writeArrayToMemory(arr, ret2);\n return ret2;\n } };\n function convertReturnValue(ret2) {\n if (returnType === \"string\")\n return UTF8ToString(ret2);\n if (returnType === \"boolean\")\n return Boolean(ret2);\n return ret2;\n }\n var func2 = getCFunc(ident);\n var cArgs = [];\n var stack2 = 0;\n if (args) {\n for (var i = 0; i < args.length; i++) {\n var converter = toC[argTypes[i]];\n if (converter) {\n if (stack2 === 0)\n stack2 = stackSave();\n cArgs[i] = converter(args[i]);\n } else {\n cArgs[i] = args[i];\n }\n }\n }\n var ret = func2.apply(null, cArgs);\n function onDone(ret2) {\n if (stack2 !== 0)\n stackRestore(stack2);\n return convertReturnValue(ret2);\n }\n ret = onDone(ret);\n return ret;\n }\n function cwrap(ident, returnType, argTypes, opts) {\n argTypes = argTypes || [];\n var numericArgs = argTypes.every(function(type) {\n return type === \"number\";\n });\n var numericRet = returnType !== \"string\";\n if (numericRet && numericArgs && !opts) {\n return getCFunc(ident);\n }\n return function() {\n return ccall(ident, returnType, argTypes, arguments, opts);\n };\n }\n var ALLOC_STACK = 1;\n function TextDecoderWrapper(encoding) {\n var textDecoder = new TextDecoder(encoding);\n this.decode = (data) => {\n if (data.buffer instanceof SharedArrayBuffer) {\n data = new Uint8Array(data);\n }\n return textDecoder.decode.call(textDecoder, data);\n };\n }\n var UTF8Decoder = typeof TextDecoder !== \"undefined\" ? new TextDecoderWrapper(\"utf8\") : void 0;\n function UTF8ArrayToString(heap, idx, maxBytesToRead) {\n var endIdx = idx + maxBytesToRead;\n var endPtr = idx;\n while (heap[endPtr] && !(endPtr >= endIdx))\n ++endPtr;\n if (endPtr - idx > 16 && heap.subarray && UTF8Decoder) {\n return UTF8Decoder.decode(heap.subarray(idx, endPtr));\n } else {\n var str = \"\";\n while (idx < endPtr) {\n var u0 = heap[idx++];\n if (!(u0 & 128)) {\n str += String.fromCharCode(u0);\n continue;\n }\n var u1 = heap[idx++] & 63;\n if ((u0 & 224) == 192) {\n str += String.fromCharCode((u0 & 31) << 6 | u1);\n continue;\n }\n var u2 = heap[idx++] & 63;\n if ((u0 & 240) == 224) {\n u0 = (u0 & 15) << 12 | u1 << 6 | u2;\n } else {\n u0 = (u0 & 7) << 18 | u1 << 12 | u2 << 6 | heap[idx++] & 63;\n }\n if (u0 < 65536) {\n str += String.fromCharCode(u0);\n } else {\n var ch = u0 - 65536;\n str += String.fromCharCode(55296 | ch >> 10, 56320 | ch & 1023);\n }\n }\n }\n return str;\n }\n function UTF8ToString(ptr, maxBytesToRead) {\n return ptr ? UTF8ArrayToString(GROWABLE_HEAP_U8(), ptr, maxBytesToRead) : \"\";\n }\n function stringToUTF8Array(str, heap, outIdx, maxBytesToWrite) {\n if (!(maxBytesToWrite > 0))\n return 0;\n var startIdx = outIdx;\n var endIdx = outIdx + maxBytesToWrite - 1;\n for (var i = 0; i < str.length; ++i) {\n var u = str.charCodeAt(i);\n if (u >= 55296 && u <= 57343) {\n var u1 = str.charCodeAt(++i);\n u = 65536 + ((u & 1023) << 10) | u1 & 1023;\n }\n if (u <= 127) {\n if (outIdx >= endIdx)\n break;\n heap[outIdx++] = u;\n } else if (u <= 2047) {\n if (outIdx + 1 >= endIdx)\n break;\n heap[outIdx++] = 192 | u >> 6;\n heap[outIdx++] = 128 | u & 63;\n } else if (u <= 65535) {\n if (outIdx + 2 >= endIdx)\n break;\n heap[outIdx++] = 224 | u >> 12;\n heap[outIdx++] = 128 | u >> 6 & 63;\n heap[outIdx++] = 128 | u & 63;\n } else {\n if (outIdx + 3 >= endIdx)\n break;\n heap[outIdx++] = 240 | u >> 18;\n heap[outIdx++] = 128 | u >> 12 & 63;\n heap[outIdx++] = 128 | u >> 6 & 63;\n heap[outIdx++] = 128 | u & 63;\n }\n }\n heap[outIdx] = 0;\n return outIdx - startIdx;\n }\n function stringToUTF8(str, outPtr, maxBytesToWrite) {\n return stringToUTF8Array(str, GROWABLE_HEAP_U8(), outPtr, maxBytesToWrite);\n }\n function lengthBytesUTF8(str) {\n var len = 0;\n for (var i = 0; i < str.length; ++i) {\n var u = str.charCodeAt(i);\n if (u >= 55296 && u <= 57343)\n u = 65536 + ((u & 1023) << 10) | str.charCodeAt(++i) & 1023;\n if (u <= 127)\n ++len;\n else if (u <= 2047)\n len += 2;\n else if (u <= 65535)\n len += 3;\n else\n len += 4;\n }\n return len;\n }\n var UTF16Decoder = typeof TextDecoder !== \"undefined\" ? new TextDecoderWrapper(\"utf-16le\") : void 0;\n function writeArrayToMemory(array2, buffer3) {\n GROWABLE_HEAP_I8().set(array2, buffer3);\n }\n function writeAsciiToMemory(str, buffer3, dontAddNull) {\n for (var i = 0; i < str.length; ++i) {\n GROWABLE_HEAP_I8()[buffer3++ >> 0] = str.charCodeAt(i);\n }\n if (!dontAddNull)\n GROWABLE_HEAP_I8()[buffer3 >> 0] = 0;\n }\n function alignUp(x, multiple) {\n if (x % multiple > 0) {\n x += multiple - x % multiple;\n }\n return x;\n }\n var buffer2, HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32, HEAPF32, HEAPF64;\n if (ENVIRONMENT_IS_PTHREAD) {\n buffer2 = Module[\"buffer\"];\n }\n function updateGlobalBufferAndViews(buf) {\n buffer2 = buf;\n Module[\"HEAP8\"] = HEAP8 = new Int8Array(buf);\n Module[\"HEAP16\"] = HEAP16 = new Int16Array(buf);\n Module[\"HEAP32\"] = HEAP32 = new Int32Array(buf);\n Module[\"HEAPU8\"] = HEAPU8 = new Uint8Array(buf);\n Module[\"HEAPU16\"] = HEAPU16 = new Uint16Array(buf);\n Module[\"HEAPU32\"] = HEAPU32 = new Uint32Array(buf);\n Module[\"HEAPF32\"] = HEAPF32 = new Float32Array(buf);\n Module[\"HEAPF64\"] = HEAPF64 = new Float64Array(buf);\n }\n var INITIAL_MEMORY = Module[\"INITIAL_MEMORY\"] || 16777216;\n if (ENVIRONMENT_IS_PTHREAD) {\n wasmMemory = Module[\"wasmMemory\"];\n buffer2 = Module[\"buffer\"];\n } else {\n if (Module[\"wasmMemory\"]) {\n wasmMemory = Module[\"wasmMemory\"];\n } else {\n wasmMemory = new WebAssembly.Memory({ \"initial\": INITIAL_MEMORY / 65536, \"maximum\": 2147483648 / 65536, \"shared\": true });\n if (!(wasmMemory.buffer instanceof SharedArrayBuffer)) {\n err(\"requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag\");\n if (ENVIRONMENT_IS_NODE) {\n console.log(\"(on node you may need: --experimental-wasm-threads --experimental-wasm-bulk-memory and also use a recent version)\");\n }\n throw Error(\"bad memory\");\n }\n }\n }\n if (wasmMemory) {\n buffer2 = wasmMemory.buffer;\n }\n INITIAL_MEMORY = buffer2.byteLength;\n updateGlobalBufferAndViews(buffer2);\n var wasmTable;\n var __ATPRERUN__ = [];\n var __ATINIT__ = [];\n var __ATEXIT__ = [];\n var __ATPOSTRUN__ = [];\n var runtimeInitialized = false;\n var runtimeExited = false;\n var runtimeKeepaliveCounter = 0;\n function keepRuntimeAlive() {\n return noExitRuntime || runtimeKeepaliveCounter > 0;\n }\n function preRun() {\n if (Module[\"preRun\"]) {\n if (typeof Module[\"preRun\"] == \"function\")\n Module[\"preRun\"] = [Module[\"preRun\"]];\n while (Module[\"preRun\"].length) {\n addOnPreRun(Module[\"preRun\"].shift());\n }\n }\n callRuntimeCallbacks(__ATPRERUN__);\n }\n function initRuntime() {\n runtimeInitialized = true;\n if (ENVIRONMENT_IS_PTHREAD)\n return;\n callRuntimeCallbacks(__ATINIT__);\n }\n function exitRuntime() {\n if (ENVIRONMENT_IS_PTHREAD)\n return;\n PThread.terminateAllThreads();\n runtimeExited = true;\n }\n function postRun() {\n if (ENVIRONMENT_IS_PTHREAD)\n return;\n if (Module[\"postRun\"]) {\n if (typeof Module[\"postRun\"] == \"function\")\n Module[\"postRun\"] = [Module[\"postRun\"]];\n while (Module[\"postRun\"].length) {\n addOnPostRun(Module[\"postRun\"].shift());\n }\n }\n callRuntimeCallbacks(__ATPOSTRUN__);\n }\n function addOnPreRun(cb) {\n __ATPRERUN__.unshift(cb);\n }\n function addOnInit(cb) {\n __ATINIT__.unshift(cb);\n }\n function addOnPostRun(cb) {\n __ATPOSTRUN__.unshift(cb);\n }\n var runDependencies = 0;\n var runDependencyWatcher = null;\n var dependenciesFulfilled = null;\n function addRunDependency(id) {\n runDependencies++;\n if (Module[\"monitorRunDependencies\"]) {\n Module[\"monitorRunDependencies\"](runDependencies);\n }\n }\n function removeRunDependency(id) {\n runDependencies--;\n if (Module[\"monitorRunDependencies\"]) {\n Module[\"monitorRunDependencies\"](runDependencies);\n }\n if (runDependencies == 0) {\n if (runDependencyWatcher !== null) {\n clearInterval(runDependencyWatcher);\n runDependencyWatcher = null;\n }\n if (dependenciesFulfilled) {\n var callback = dependenciesFulfilled;\n dependenciesFulfilled = null;\n callback();\n }\n }\n }\n Module[\"preloadedImages\"] = {};\n Module[\"preloadedAudios\"] = {};\n function abort(what) {\n if (ENVIRONMENT_IS_PTHREAD) {\n postMessage({ \"cmd\": \"onAbort\", \"arg\": what });\n } else {\n if (Module[\"onAbort\"]) {\n Module[\"onAbort\"](what);\n }\n }\n what = \"Aborted(\" + what + \")\";\n err(what);\n ABORT = true;\n EXITSTATUS = 1;\n what += \". Build with -s ASSERTIONS=1 for more info.\";\n var e = new WebAssembly.RuntimeError(what);\n readyPromiseReject(e);\n throw e;\n }\n var dataURIPrefix = \"data:application/octet-stream;base64,\";\n function isDataURI(filename) {\n return filename.startsWith(dataURIPrefix);\n }\n function isFileURI(filename) {\n return filename.startsWith(\"file://\");\n }\n var wasmBinaryFile;\n wasmBinaryFile = \"tfjs-backend-wasm-threaded-simd.wasm\";\n if (!isDataURI(wasmBinaryFile)) {\n wasmBinaryFile = locateFile(wasmBinaryFile);\n }\n function getBinary(file) {\n try {\n if (file == wasmBinaryFile && wasmBinary) {\n return new Uint8Array(wasmBinary);\n }\n if (readBinary) {\n return readBinary(file);\n } else {\n throw \"both async and sync fetching of the wasm failed\";\n }\n } catch (err2) {\n abort(err2);\n }\n }\n function getBinaryPromise() {\n if (!wasmBinary && (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER)) {\n if (typeof fetch === \"function\" && !isFileURI(wasmBinaryFile)) {\n return fetch(wasmBinaryFile, { credentials: \"same-origin\" }).then(function(response) {\n if (!response[\"ok\"]) {\n throw \"failed to load wasm binary file at '\" + wasmBinaryFile + \"'\";\n }\n return response[\"arrayBuffer\"]();\n }).catch(function() {\n return getBinary(wasmBinaryFile);\n });\n } else {\n if (readAsync) {\n return new Promise(function(resolve, reject) {\n readAsync(wasmBinaryFile, function(response) {\n resolve(new Uint8Array(response));\n }, reject);\n });\n }\n }\n }\n return Promise.resolve().then(function() {\n return getBinary(wasmBinaryFile);\n });\n }\n function createWasm() {\n var info = { \"env\": asmLibraryArg, \"wasi_snapshot_preview1\": asmLibraryArg };\n function receiveInstance(instance, module2) {\n var exports3 = instance.exports;\n Module[\"asm\"] = exports3;\n registerTlsInit(Module[\"asm\"][\"emscripten_tls_init\"]);\n wasmTable = Module[\"asm\"][\"__indirect_function_table\"];\n addOnInit(Module[\"asm\"][\"__wasm_call_ctors\"]);\n wasmModule = module2;\n if (!ENVIRONMENT_IS_PTHREAD) {\n var numWorkersToLoad = PThread.unusedWorkers.length;\n PThread.unusedWorkers.forEach(function(w) {\n PThread.loadWasmModuleToWorker(w, function() {\n if (!--numWorkersToLoad)\n removeRunDependency(\"wasm-instantiate\");\n });\n });\n }\n }\n if (!ENVIRONMENT_IS_PTHREAD) {\n addRunDependency(\"wasm-instantiate\");\n }\n function receiveInstantiationResult(result) {\n receiveInstance(result[\"instance\"], result[\"module\"]);\n }\n function instantiateArrayBuffer(receiver) {\n return getBinaryPromise().then(function(binary) {\n return WebAssembly.instantiate(binary, info);\n }).then(function(instance) {\n return instance;\n }).then(receiver, function(reason) {\n err(\"failed to asynchronously prepare wasm: \" + reason);\n abort(reason);\n });\n }\n function instantiateAsync() {\n if (!wasmBinary && typeof WebAssembly.instantiateStreaming === \"function\" && !isDataURI(wasmBinaryFile) && !isFileURI(wasmBinaryFile) && typeof fetch === \"function\") {\n return fetch(wasmBinaryFile, { credentials: \"same-origin\" }).then(function(response) {\n var result = WebAssembly.instantiateStreaming(response, info);\n return result.then(receiveInstantiationResult, function(reason) {\n err(\"wasm streaming compile failed: \" + reason);\n err(\"falling back to ArrayBuffer instantiation\");\n return instantiateArrayBuffer(receiveInstantiationResult);\n });\n });\n } else {\n return instantiateArrayBuffer(receiveInstantiationResult);\n }\n }\n if (Module[\"instantiateWasm\"]) {\n try {\n var exports2 = Module[\"instantiateWasm\"](info, receiveInstance);\n return exports2;\n } catch (e) {\n err(\"Module.instantiateWasm callback failed with error: \" + e);\n return false;\n }\n }\n instantiateAsync().catch(readyPromiseReject);\n return {};\n }\n var tempDouble;\n var tempI64;\n var ASM_CONSTS = {};\n function callRuntimeCallbacks(callbacks2) {\n while (callbacks2.length > 0) {\n var callback = callbacks2.shift();\n if (typeof callback == \"function\") {\n callback(Module);\n continue;\n }\n var func2 = callback.func;\n if (typeof func2 === \"number\") {\n if (callback.arg === void 0) {\n getWasmTableEntry(func2)();\n } else {\n getWasmTableEntry(func2)(callback.arg);\n }\n } else {\n func2(callback.arg === void 0 ? null : callback.arg);\n }\n }\n }\n function withStackSave(f) {\n var stack2 = stackSave();\n var ret = f();\n stackRestore(stack2);\n return ret;\n }\n function demangle(func2) {\n return func2;\n }\n function demangleAll(text) {\n var regex = /\\b_Z[\\w\\d_]+/g;\n return text.replace(regex, function(x) {\n var y = demangle(x);\n return x === y ? x : y + \" [\" + x + \"]\";\n });\n }\n function killThread(pthread_ptr) {\n GROWABLE_HEAP_I32()[pthread_ptr >> 2] = 0;\n var pthread = PThread.pthreads[pthread_ptr];\n delete PThread.pthreads[pthread_ptr];\n pthread.worker.terminate();\n __emscripten_thread_free_data(pthread_ptr);\n PThread.runningWorkers.splice(PThread.runningWorkers.indexOf(pthread.worker), 1);\n pthread.worker.pthread = void 0;\n }\n function cancelThread(pthread_ptr) {\n var pthread = PThread.pthreads[pthread_ptr];\n pthread.worker.postMessage({ \"cmd\": \"cancel\" });\n }\n function cleanupThread(pthread_ptr) {\n var pthread = PThread.pthreads[pthread_ptr];\n if (pthread) {\n GROWABLE_HEAP_I32()[pthread_ptr >> 2] = 0;\n var worker = pthread.worker;\n PThread.returnWorkerToPool(worker);\n }\n }\n function _exit(status) {\n exit(status);\n }\n function handleException(e) {\n if (e instanceof ExitStatus || e == \"unwind\") {\n return EXITSTATUS;\n }\n quit_(1, e);\n }\n var PThread = { unusedWorkers: [], runningWorkers: [], tlsInitFunctions: [], init: function() {\n if (ENVIRONMENT_IS_PTHREAD) {\n PThread.initWorker();\n } else {\n PThread.initMainThread();\n }\n }, initMainThread: function() {\n var pthreadPoolSize = 8;\n for (var i = 0; i < pthreadPoolSize; ++i) {\n PThread.allocateUnusedWorker();\n }\n }, initWorker: function() {\n noExitRuntime = false;\n }, pthreads: {}, setExitStatus: function(status) {\n EXITSTATUS = status;\n }, terminateAllThreads: function() {\n for (var t in PThread.pthreads) {\n var pthread = PThread.pthreads[t];\n if (pthread && pthread.worker) {\n PThread.returnWorkerToPool(pthread.worker);\n }\n }\n for (var i = 0; i < PThread.unusedWorkers.length; ++i) {\n var worker = PThread.unusedWorkers[i];\n worker.terminate();\n }\n PThread.unusedWorkers = [];\n }, returnWorkerToPool: function(worker) {\n PThread.runWithoutMainThreadQueuedCalls(function() {\n delete PThread.pthreads[worker.pthread.threadInfoStruct];\n PThread.unusedWorkers.push(worker);\n PThread.runningWorkers.splice(PThread.runningWorkers.indexOf(worker), 1);\n __emscripten_thread_free_data(worker.pthread.threadInfoStruct);\n worker.pthread = void 0;\n });\n }, runWithoutMainThreadQueuedCalls: function(func2) {\n GROWABLE_HEAP_I32()[__emscripten_allow_main_runtime_queued_calls >> 2] = 0;\n try {\n func2();\n } finally {\n GROWABLE_HEAP_I32()[__emscripten_allow_main_runtime_queued_calls >> 2] = 1;\n }\n }, receiveObjectTransfer: function(data) {\n }, threadInit: function() {\n for (var i in PThread.tlsInitFunctions) {\n PThread.tlsInitFunctions[i]();\n }\n }, loadWasmModuleToWorker: function(worker, onFinishedLoading) {\n worker.onmessage = (e) => {\n var d = e[\"data\"];\n var cmd = d[\"cmd\"];\n if (worker.pthread)\n PThread.currentProxiedOperationCallerThread = worker.pthread.threadInfoStruct;\n if (d[\"targetThread\"] && d[\"targetThread\"] != _pthread_self()) {\n var thread = PThread.pthreads[d.targetThread];\n if (thread) {\n thread.worker.postMessage(d, d[\"transferList\"]);\n } else {\n err('Internal error! Worker sent a message \"' + cmd + '\" to target pthread ' + d[\"targetThread\"] + \", but that thread no longer exists!\");\n }\n PThread.currentProxiedOperationCallerThread = void 0;\n return;\n }\n if (cmd === \"processQueuedMainThreadWork\") {\n _emscripten_main_thread_process_queued_calls();\n } else if (cmd === \"spawnThread\") {\n spawnThread(d);\n } else if (cmd === \"cleanupThread\") {\n cleanupThread(d[\"thread\"]);\n } else if (cmd === \"killThread\") {\n killThread(d[\"thread\"]);\n } else if (cmd === \"cancelThread\") {\n cancelThread(d[\"thread\"]);\n } else if (cmd === \"loaded\") {\n worker.loaded = true;\n if (onFinishedLoading)\n onFinishedLoading(worker);\n if (worker.runPthread) {\n worker.runPthread();\n delete worker.runPthread;\n }\n } else if (cmd === \"print\") {\n out(\"Thread \" + d[\"threadId\"] + \": \" + d[\"text\"]);\n } else if (cmd === \"printErr\") {\n err(\"Thread \" + d[\"threadId\"] + \": \" + d[\"text\"]);\n } else if (cmd === \"alert\") {\n alert(\"Thread \" + d[\"threadId\"] + \": \" + d[\"text\"]);\n } else if (d.target === \"setimmediate\") {\n worker.postMessage(d);\n } else if (cmd === \"onAbort\") {\n if (Module[\"onAbort\"]) {\n Module[\"onAbort\"](d[\"arg\"]);\n }\n } else {\n err(\"worker sent an unknown command \" + cmd);\n }\n PThread.currentProxiedOperationCallerThread = void 0;\n };\n worker.onerror = (e) => {\n var message = \"worker sent an error!\";\n err(message + \" \" + e.filename + \":\" + e.lineno + \": \" + e.message);\n throw e;\n };\n if (ENVIRONMENT_IS_NODE) {\n worker.on(\"message\", function(data) {\n worker.onmessage({ data });\n });\n worker.on(\"error\", function(e) {\n worker.onerror(e);\n });\n worker.on(\"detachedExit\", function() {\n });\n }\n worker.postMessage({ \"cmd\": \"load\", \"urlOrBlob\": Module[\"mainScriptUrlOrBlob\"] || _scriptDir, \"wasmMemory\": wasmMemory, \"wasmModule\": wasmModule });\n }, allocateUnusedWorker: function() {\n var pthreadMainJs = locateFile(\"tfjs-backend-wasm-threaded-simd.worker.js\");\n PThread.unusedWorkers.push(new Worker(pthreadMainJs));\n }, getNewWorker: function() {\n if (PThread.unusedWorkers.length == 0) {\n PThread.allocateUnusedWorker();\n PThread.loadWasmModuleToWorker(PThread.unusedWorkers[0]);\n }\n return PThread.unusedWorkers.pop();\n } };\n function establishStackSpace() {\n var pthread_ptr = _pthread_self();\n var stackTop = GROWABLE_HEAP_I32()[pthread_ptr + 44 >> 2];\n var stackSize = GROWABLE_HEAP_I32()[pthread_ptr + 48 >> 2];\n var stackMax = stackTop - stackSize;\n _emscripten_stack_set_limits(stackTop, stackMax);\n stackRestore(stackTop);\n }\n Module[\"establishStackSpace\"] = establishStackSpace;\n function exitOnMainThread(returnCode) {\n if (ENVIRONMENT_IS_PTHREAD)\n return _emscripten_proxy_to_main_thread_js(1, 0, returnCode);\n try {\n _exit(returnCode);\n } catch (e) {\n handleException(e);\n }\n }\n var wasmTableMirror = [];\n function getWasmTableEntry(funcPtr) {\n var func2 = wasmTableMirror[funcPtr];\n if (!func2) {\n if (funcPtr >= wasmTableMirror.length)\n wasmTableMirror.length = funcPtr + 1;\n wasmTableMirror[funcPtr] = func2 = wasmTable.get(funcPtr);\n }\n return func2;\n }\n function invokeEntryPoint(ptr, arg) {\n return getWasmTableEntry(ptr)(arg);\n }\n Module[\"invokeEntryPoint\"] = invokeEntryPoint;\n function jsStackTrace() {\n var error = new Error();\n if (!error.stack) {\n try {\n throw new Error();\n } catch (e) {\n error = e;\n }\n if (!error.stack) {\n return \"(no stack trace available)\";\n }\n }\n return error.stack.toString();\n }\n function registerTlsInit(tlsInitFunc, moduleExports, metadata) {\n PThread.tlsInitFunctions.push(tlsInitFunc);\n }\n function setWasmTableEntry(idx, func2) {\n wasmTable.set(idx, func2);\n wasmTableMirror[idx] = func2;\n }\n var _emscripten_get_now;\n if (ENVIRONMENT_IS_NODE) {\n _emscripten_get_now = () => {\n var t = process[\"hrtime\"]();\n return t[0] * 1e3 + t[1] / 1e6;\n };\n } else if (ENVIRONMENT_IS_PTHREAD) {\n _emscripten_get_now = () => performance.now() - Module[\"__performance_now_clock_drift\"];\n } else\n _emscripten_get_now = () => performance.now();\n var _emscripten_get_now_is_monotonic = true;\n function setErrNo(value) {\n GROWABLE_HEAP_I32()[___errno_location() >> 2] = value;\n return value;\n }\n function _clock_gettime(clk_id, tp) {\n var now2;\n if (clk_id === 0) {\n now2 = Date.now();\n } else if ((clk_id === 1 || clk_id === 4) && _emscripten_get_now_is_monotonic) {\n now2 = _emscripten_get_now();\n } else {\n setErrNo(28);\n return -1;\n }\n GROWABLE_HEAP_I32()[tp >> 2] = now2 / 1e3 | 0;\n GROWABLE_HEAP_I32()[tp + 4 >> 2] = now2 % 1e3 * 1e3 * 1e3 | 0;\n return 0;\n }\n function ___clock_gettime(a0, a12) {\n return _clock_gettime(a0, a12);\n }\n function ___emscripten_init_main_thread_js(tb) {\n __emscripten_thread_init(tb, !ENVIRONMENT_IS_WORKER, 1, !ENVIRONMENT_IS_WEB);\n PThread.threadInit();\n }\n function ___emscripten_thread_cleanup(thread) {\n if (!ENVIRONMENT_IS_PTHREAD)\n cleanupThread(thread);\n else\n postMessage({ \"cmd\": \"cleanupThread\", \"thread\": thread });\n }\n function spawnThread(threadParams) {\n var worker = PThread.getNewWorker();\n if (!worker) {\n return 6;\n }\n PThread.runningWorkers.push(worker);\n var pthread = PThread.pthreads[threadParams.pthread_ptr] = { worker, threadInfoStruct: threadParams.pthread_ptr };\n worker.pthread = pthread;\n var msg = { \"cmd\": \"run\", \"start_routine\": threadParams.startRoutine, \"arg\": threadParams.arg, \"threadInfoStruct\": threadParams.pthread_ptr };\n worker.runPthread = () => {\n msg.time = performance.now();\n worker.postMessage(msg, threadParams.transferList);\n };\n if (worker.loaded) {\n worker.runPthread();\n delete worker.runPthread;\n }\n return 0;\n }\n function ___pthread_create_js(pthread_ptr, attr, start_routine, arg) {\n if (typeof SharedArrayBuffer === \"undefined\") {\n err(\"Current environment does not support SharedArrayBuffer, pthreads are not available!\");\n return 6;\n }\n var transferList = [];\n var error = 0;\n if (ENVIRONMENT_IS_PTHREAD && (transferList.length === 0 || error)) {\n return _emscripten_sync_run_in_main_thread_4(687865856, pthread_ptr, attr, start_routine, arg);\n }\n if (error)\n return error;\n var threadParams = { startRoutine: start_routine, pthread_ptr, arg, transferList };\n if (ENVIRONMENT_IS_PTHREAD) {\n threadParams.cmd = \"spawnThread\";\n postMessage(threadParams, transferList);\n return 0;\n }\n return spawnThread(threadParams);\n }\n function __emscripten_default_pthread_stack_size() {\n return 2097152;\n }\n function __emscripten_notify_thread_queue(targetThreadId, mainThreadId) {\n if (targetThreadId == mainThreadId) {\n postMessage({ \"cmd\": \"processQueuedMainThreadWork\" });\n } else if (ENVIRONMENT_IS_PTHREAD) {\n postMessage({ \"targetThread\": targetThreadId, \"cmd\": \"processThreadQueue\" });\n } else {\n var pthread = PThread.pthreads[targetThreadId];\n var worker = pthread && pthread.worker;\n if (!worker) {\n return;\n }\n worker.postMessage({ \"cmd\": \"processThreadQueue\" });\n }\n return 1;\n }\n function _abort() {\n abort(\"\");\n }\n function _emscripten_check_blocking_allowed() {\n if (ENVIRONMENT_IS_NODE)\n return;\n if (ENVIRONMENT_IS_WORKER)\n return;\n warnOnce(\"Blocking on the main thread is very dangerous, see https://emscripten.org/docs/porting/pthreads.html#blocking-on-the-main-browser-thread\");\n }\n function _emscripten_get_heap_max() {\n return 2147483648;\n }\n function _emscripten_memcpy_big(dest, src, num) {\n GROWABLE_HEAP_U8().copyWithin(dest, src, src + num);\n }\n function _emscripten_num_logical_cores() {\n if (ENVIRONMENT_IS_NODE)\n return require_os().cpus().length;\n return navigator[\"hardwareConcurrency\"];\n }\n function _emscripten_proxy_to_main_thread_js(index, sync) {\n var numCallArgs = arguments.length - 2;\n var outerArgs = arguments;\n return withStackSave(function() {\n var serializedNumCallArgs = numCallArgs;\n var args = stackAlloc(serializedNumCallArgs * 8);\n var b = args >> 3;\n for (var i = 0; i < numCallArgs; i++) {\n var arg = outerArgs[2 + i];\n GROWABLE_HEAP_F64()[b + i] = arg;\n }\n return _emscripten_run_in_main_runtime_thread_js(index, serializedNumCallArgs, args, sync);\n });\n }\n var _emscripten_receive_on_main_thread_js_callArgs = [];\n function _emscripten_receive_on_main_thread_js(index, numCallArgs, args) {\n _emscripten_receive_on_main_thread_js_callArgs.length = numCallArgs;\n var b = args >> 3;\n for (var i = 0; i < numCallArgs; i++) {\n _emscripten_receive_on_main_thread_js_callArgs[i] = GROWABLE_HEAP_F64()[b + i];\n }\n var isEmAsmConst = index < 0;\n var func2 = !isEmAsmConst ? proxiedFunctionTable[index] : ASM_CONSTS[-index - 1];\n return func2.apply(null, _emscripten_receive_on_main_thread_js_callArgs);\n }\n function emscripten_realloc_buffer(size) {\n try {\n wasmMemory.grow(size - buffer2.byteLength + 65535 >>> 16);\n updateGlobalBufferAndViews(wasmMemory.buffer);\n return 1;\n } catch (e) {\n }\n }\n function _emscripten_resize_heap(requestedSize) {\n var oldSize = GROWABLE_HEAP_U8().length;\n requestedSize = requestedSize >>> 0;\n if (requestedSize <= oldSize) {\n return false;\n }\n var maxHeapSize = _emscripten_get_heap_max();\n if (requestedSize > maxHeapSize) {\n return false;\n }\n for (var cutDown = 1; cutDown <= 4; cutDown *= 2) {\n var overGrownHeapSize = oldSize * (1 + 0.2 / cutDown);\n overGrownHeapSize = Math.min(overGrownHeapSize, requestedSize + 100663296);\n var newSize = Math.min(maxHeapSize, alignUp(Math.max(requestedSize, overGrownHeapSize), 65536));\n var replacement = emscripten_realloc_buffer(newSize);\n if (replacement) {\n return true;\n }\n }\n return false;\n }\n var JSEvents = { inEventHandler: 0, removeAllEventListeners: function() {\n for (var i = JSEvents.eventHandlers.length - 1; i >= 0; --i) {\n JSEvents._removeHandler(i);\n }\n JSEvents.eventHandlers = [];\n JSEvents.deferredCalls = [];\n }, registerRemoveEventListeners: function() {\n if (!JSEvents.removeEventListenersRegistered) {\n __ATEXIT__.push(JSEvents.removeAllEventListeners);\n JSEvents.removeEventListenersRegistered = true;\n }\n }, deferredCalls: [], deferCall: function(targetFunction, precedence, argsList) {\n function arraysHaveEqualContent(arrA, arrB) {\n if (arrA.length != arrB.length)\n return false;\n for (var i2 in arrA) {\n if (arrA[i2] != arrB[i2])\n return false;\n }\n return true;\n }\n for (var i in JSEvents.deferredCalls) {\n var call = JSEvents.deferredCalls[i];\n if (call.targetFunction == targetFunction && arraysHaveEqualContent(call.argsList, argsList)) {\n return;\n }\n }\n JSEvents.deferredCalls.push({ targetFunction, precedence, argsList });\n JSEvents.deferredCalls.sort(function(x, y) {\n return x.precedence < y.precedence;\n });\n }, removeDeferredCalls: function(targetFunction) {\n for (var i = 0; i < JSEvents.deferredCalls.length; ++i) {\n if (JSEvents.deferredCalls[i].targetFunction == targetFunction) {\n JSEvents.deferredCalls.splice(i, 1);\n --i;\n }\n }\n }, canPerformEventHandlerRequests: function() {\n return JSEvents.inEventHandler && JSEvents.currentEventHandler.allowsDeferredCalls;\n }, runDeferredCalls: function() {\n if (!JSEvents.canPerformEventHandlerRequests()) {\n return;\n }\n for (var i = 0; i < JSEvents.deferredCalls.length; ++i) {\n var call = JSEvents.deferredCalls[i];\n JSEvents.deferredCalls.splice(i, 1);\n --i;\n call.targetFunction.apply(null, call.argsList);\n }\n }, eventHandlers: [], removeAllHandlersOnTarget: function(target, eventTypeString) {\n for (var i = 0; i < JSEvents.eventHandlers.length; ++i) {\n if (JSEvents.eventHandlers[i].target == target && (!eventTypeString || eventTypeString == JSEvents.eventHandlers[i].eventTypeString)) {\n JSEvents._removeHandler(i--);\n }\n }\n }, _removeHandler: function(i) {\n var h = JSEvents.eventHandlers[i];\n h.target.removeEventListener(h.eventTypeString, h.eventListenerFunc, h.useCapture);\n JSEvents.eventHandlers.splice(i, 1);\n }, registerOrRemoveHandler: function(eventHandler) {\n var jsEventHandler = function jsEventHandler2(event) {\n ++JSEvents.inEventHandler;\n JSEvents.currentEventHandler = eventHandler;\n JSEvents.runDeferredCalls();\n eventHandler.handlerFunc(event);\n JSEvents.runDeferredCalls();\n --JSEvents.inEventHandler;\n };\n if (eventHandler.callbackfunc) {\n eventHandler.eventListenerFunc = jsEventHandler;\n eventHandler.target.addEventListener(eventHandler.eventTypeString, jsEventHandler, eventHandler.useCapture);\n JSEvents.eventHandlers.push(eventHandler);\n JSEvents.registerRemoveEventListeners();\n } else {\n for (var i = 0; i < JSEvents.eventHandlers.length; ++i) {\n if (JSEvents.eventHandlers[i].target == eventHandler.target && JSEvents.eventHandlers[i].eventTypeString == eventHandler.eventTypeString) {\n JSEvents._removeHandler(i--);\n }\n }\n }\n }, queueEventHandlerOnThread_iiii: function(targetThread, eventHandlerFunc, eventTypeId, eventData, userData) {\n withStackSave(function() {\n var varargs = stackAlloc(12);\n GROWABLE_HEAP_I32()[varargs >> 2] = eventTypeId;\n GROWABLE_HEAP_I32()[varargs + 4 >> 2] = eventData;\n GROWABLE_HEAP_I32()[varargs + 8 >> 2] = userData;\n _emscripten_dispatch_to_thread_(targetThread, 637534208, eventHandlerFunc, eventData, varargs);\n });\n }, getTargetThreadForEventCallback: function(targetThread) {\n switch (targetThread) {\n case 1:\n return 0;\n case 2:\n return PThread.currentProxiedOperationCallerThread;\n default:\n return targetThread;\n }\n }, getNodeNameForTarget: function(target) {\n if (!target)\n return \"\";\n if (target == window)\n return \"#window\";\n if (target == screen)\n return \"#screen\";\n return target && target.nodeName ? target.nodeName : \"\";\n }, fullscreenEnabled: function() {\n return document.fullscreenEnabled || document.webkitFullscreenEnabled;\n } };\n function stringToNewUTF8(jsString) {\n var length = lengthBytesUTF8(jsString) + 1;\n var cString = _malloc(length);\n stringToUTF8(jsString, cString, length);\n return cString;\n }\n function _emscripten_set_offscreencanvas_size_on_target_thread_js(targetThread, targetCanvas, width, height) {\n withStackSave(function() {\n var varargs = stackAlloc(12);\n var targetCanvasPtr = 0;\n if (targetCanvas) {\n targetCanvasPtr = stringToNewUTF8(targetCanvas);\n }\n GROWABLE_HEAP_I32()[varargs >> 2] = targetCanvasPtr;\n GROWABLE_HEAP_I32()[varargs + 4 >> 2] = width;\n GROWABLE_HEAP_I32()[varargs + 8 >> 2] = height;\n _emscripten_dispatch_to_thread_(targetThread, 657457152, 0, targetCanvasPtr, varargs);\n });\n }\n function _emscripten_set_offscreencanvas_size_on_target_thread(targetThread, targetCanvas, width, height) {\n targetCanvas = targetCanvas ? UTF8ToString(targetCanvas) : \"\";\n _emscripten_set_offscreencanvas_size_on_target_thread_js(targetThread, targetCanvas, width, height);\n }\n function maybeCStringToJsString(cString) {\n return cString > 2 ? UTF8ToString(cString) : cString;\n }\n var specialHTMLTargets = [0, typeof document !== \"undefined\" ? document : 0, typeof window !== \"undefined\" ? window : 0];\n function findEventTarget(target) {\n target = maybeCStringToJsString(target);\n var domElement = specialHTMLTargets[target] || (typeof document !== \"undefined\" ? document.querySelector(target) : void 0);\n return domElement;\n }\n function findCanvasEventTarget(target) {\n return findEventTarget(target);\n }\n function _emscripten_set_canvas_element_size_calling_thread(target, width, height) {\n var canvas = findCanvasEventTarget(target);\n if (!canvas)\n return -4;\n if (canvas.canvasSharedPtr) {\n GROWABLE_HEAP_I32()[canvas.canvasSharedPtr >> 2] = width;\n GROWABLE_HEAP_I32()[canvas.canvasSharedPtr + 4 >> 2] = height;\n }\n if (canvas.offscreenCanvas || !canvas.controlTransferredOffscreen) {\n if (canvas.offscreenCanvas)\n canvas = canvas.offscreenCanvas;\n var autoResizeViewport = false;\n if (canvas.GLctxObject && canvas.GLctxObject.GLctx) {\n var prevViewport = canvas.GLctxObject.GLctx.getParameter(2978);\n autoResizeViewport = prevViewport[0] === 0 && prevViewport[1] === 0 && prevViewport[2] === canvas.width && prevViewport[3] === canvas.height;\n }\n canvas.width = width;\n canvas.height = height;\n if (autoResizeViewport) {\n canvas.GLctxObject.GLctx.viewport(0, 0, width, height);\n }\n } else if (canvas.canvasSharedPtr) {\n var targetThread = GROWABLE_HEAP_I32()[canvas.canvasSharedPtr + 8 >> 2];\n _emscripten_set_offscreencanvas_size_on_target_thread(targetThread, target, width, height);\n return 1;\n } else {\n return -4;\n }\n return 0;\n }\n function _emscripten_set_canvas_element_size_main_thread(target, width, height) {\n if (ENVIRONMENT_IS_PTHREAD)\n return _emscripten_proxy_to_main_thread_js(2, 1, target, width, height);\n return _emscripten_set_canvas_element_size_calling_thread(target, width, height);\n }\n function _emscripten_set_canvas_element_size(target, width, height) {\n var canvas = findCanvasEventTarget(target);\n if (canvas) {\n return _emscripten_set_canvas_element_size_calling_thread(target, width, height);\n } else {\n return _emscripten_set_canvas_element_size_main_thread(target, width, height);\n }\n }\n function _emscripten_unwind_to_js_event_loop() {\n throw \"unwind\";\n }\n function __webgl_enable_ANGLE_instanced_arrays(ctx) {\n var ext = ctx.getExtension(\"ANGLE_instanced_arrays\");\n if (ext) {\n ctx[\"vertexAttribDivisor\"] = function(index, divisor) {\n ext[\"vertexAttribDivisorANGLE\"](index, divisor);\n };\n ctx[\"drawArraysInstanced\"] = function(mode, first, count2, primcount) {\n ext[\"drawArraysInstancedANGLE\"](mode, first, count2, primcount);\n };\n ctx[\"drawElementsInstanced\"] = function(mode, count2, type, indices, primcount) {\n ext[\"drawElementsInstancedANGLE\"](mode, count2, type, indices, primcount);\n };\n return 1;\n }\n }\n function __webgl_enable_OES_vertex_array_object(ctx) {\n var ext = ctx.getExtension(\"OES_vertex_array_object\");\n if (ext) {\n ctx[\"createVertexArray\"] = function() {\n return ext[\"createVertexArrayOES\"]();\n };\n ctx[\"deleteVertexArray\"] = function(vao) {\n ext[\"deleteVertexArrayOES\"](vao);\n };\n ctx[\"bindVertexArray\"] = function(vao) {\n ext[\"bindVertexArrayOES\"](vao);\n };\n ctx[\"isVertexArray\"] = function(vao) {\n return ext[\"isVertexArrayOES\"](vao);\n };\n return 1;\n }\n }\n function __webgl_enable_WEBGL_draw_buffers(ctx) {\n var ext = ctx.getExtension(\"WEBGL_draw_buffers\");\n if (ext) {\n ctx[\"drawBuffers\"] = function(n, bufs) {\n ext[\"drawBuffersWEBGL\"](n, bufs);\n };\n return 1;\n }\n }\n function __webgl_enable_WEBGL_multi_draw(ctx) {\n return !!(ctx.multiDrawWebgl = ctx.getExtension(\"WEBGL_multi_draw\"));\n }\n var GL = { counter: 1, buffers: [], programs: [], framebuffers: [], renderbuffers: [], textures: [], shaders: [], vaos: [], contexts: {}, offscreenCanvases: {}, queries: [], stringCache: {}, unpackAlignment: 4, recordError: function recordError(errorCode) {\n if (!GL.lastError) {\n GL.lastError = errorCode;\n }\n }, getNewId: function(table) {\n var ret = GL.counter++;\n for (var i = table.length; i < ret; i++) {\n table[i] = null;\n }\n return ret;\n }, getSource: function(shader, count2, string2, length) {\n var source = \"\";\n for (var i = 0; i < count2; ++i) {\n var len = length ? GROWABLE_HEAP_I32()[length + i * 4 >> 2] : -1;\n source += UTF8ToString(GROWABLE_HEAP_I32()[string2 + i * 4 >> 2], len < 0 ? void 0 : len);\n }\n return source;\n }, createContext: function(canvas, webGLContextAttributes) {\n if (!canvas.getContextSafariWebGL2Fixed) {\n canvas.getContextSafariWebGL2Fixed = canvas.getContext;\n canvas.getContext = function(ver, attrs) {\n var gl = canvas.getContextSafariWebGL2Fixed(ver, attrs);\n return ver == \"webgl\" == gl instanceof WebGLRenderingContext ? gl : null;\n };\n }\n var ctx = canvas.getContext(\"webgl\", webGLContextAttributes);\n if (!ctx)\n return 0;\n var handle = GL.registerContext(ctx, webGLContextAttributes);\n return handle;\n }, registerContext: function(ctx, webGLContextAttributes) {\n var handle = _malloc(8);\n GROWABLE_HEAP_I32()[handle + 4 >> 2] = _pthread_self();\n var context = { handle, attributes: webGLContextAttributes, version: webGLContextAttributes.majorVersion, GLctx: ctx };\n if (ctx.canvas)\n ctx.canvas.GLctxObject = context;\n GL.contexts[handle] = context;\n if (typeof webGLContextAttributes.enableExtensionsByDefault === \"undefined\" || webGLContextAttributes.enableExtensionsByDefault) {\n GL.initExtensions(context);\n }\n return handle;\n }, makeContextCurrent: function(contextHandle) {\n GL.currentContext = GL.contexts[contextHandle];\n Module.ctx = GLctx = GL.currentContext && GL.currentContext.GLctx;\n return !(contextHandle && !GLctx);\n }, getContext: function(contextHandle) {\n return GL.contexts[contextHandle];\n }, deleteContext: function(contextHandle) {\n if (GL.currentContext === GL.contexts[contextHandle])\n GL.currentContext = null;\n if (typeof JSEvents === \"object\")\n JSEvents.removeAllHandlersOnTarget(GL.contexts[contextHandle].GLctx.canvas);\n if (GL.contexts[contextHandle] && GL.contexts[contextHandle].GLctx.canvas)\n GL.contexts[contextHandle].GLctx.canvas.GLctxObject = void 0;\n _free(GL.contexts[contextHandle].handle);\n GL.contexts[contextHandle] = null;\n }, initExtensions: function(context) {\n if (!context)\n context = GL.currentContext;\n if (context.initExtensionsDone)\n return;\n context.initExtensionsDone = true;\n var GLctx2 = context.GLctx;\n __webgl_enable_ANGLE_instanced_arrays(GLctx2);\n __webgl_enable_OES_vertex_array_object(GLctx2);\n __webgl_enable_WEBGL_draw_buffers(GLctx2);\n {\n GLctx2.disjointTimerQueryExt = GLctx2.getExtension(\"EXT_disjoint_timer_query\");\n }\n __webgl_enable_WEBGL_multi_draw(GLctx2);\n var exts = GLctx2.getSupportedExtensions() || [];\n exts.forEach(function(ext) {\n if (!ext.includes(\"lose_context\") && !ext.includes(\"debug\")) {\n GLctx2.getExtension(ext);\n }\n });\n } };\n var __emscripten_webgl_power_preferences = [\"default\", \"low-power\", \"high-performance\"];\n function _emscripten_webgl_do_create_context(target, attributes) {\n var a = attributes >> 2;\n var powerPreference = GROWABLE_HEAP_I32()[a + (24 >> 2)];\n var contextAttributes = { \"alpha\": !!GROWABLE_HEAP_I32()[a + (0 >> 2)], \"depth\": !!GROWABLE_HEAP_I32()[a + (4 >> 2)], \"stencil\": !!GROWABLE_HEAP_I32()[a + (8 >> 2)], \"antialias\": !!GROWABLE_HEAP_I32()[a + (12 >> 2)], \"premultipliedAlpha\": !!GROWABLE_HEAP_I32()[a + (16 >> 2)], \"preserveDrawingBuffer\": !!GROWABLE_HEAP_I32()[a + (20 >> 2)], \"powerPreference\": __emscripten_webgl_power_preferences[powerPreference], \"failIfMajorPerformanceCaveat\": !!GROWABLE_HEAP_I32()[a + (28 >> 2)], majorVersion: GROWABLE_HEAP_I32()[a + (32 >> 2)], minorVersion: GROWABLE_HEAP_I32()[a + (36 >> 2)], enableExtensionsByDefault: GROWABLE_HEAP_I32()[a + (40 >> 2)], explicitSwapControl: GROWABLE_HEAP_I32()[a + (44 >> 2)], proxyContextToMainThread: GROWABLE_HEAP_I32()[a + (48 >> 2)], renderViaOffscreenBackBuffer: GROWABLE_HEAP_I32()[a + (52 >> 2)] };\n var canvas = findCanvasEventTarget(target);\n if (!canvas) {\n return 0;\n }\n if (contextAttributes.explicitSwapControl) {\n return 0;\n }\n var contextHandle = GL.createContext(canvas, contextAttributes);\n return contextHandle;\n }\n function _emscripten_webgl_create_context(a0, a12) {\n return _emscripten_webgl_do_create_context(a0, a12);\n }\n var SYSCALLS = { mappings: {}, buffers: [null, [], []], printChar: function(stream, curr) {\n var buffer3 = SYSCALLS.buffers[stream];\n if (curr === 0 || curr === 10) {\n (stream === 1 ? out : err)(UTF8ArrayToString(buffer3, 0));\n buffer3.length = 0;\n } else {\n buffer3.push(curr);\n }\n }, varargs: void 0, get: function() {\n SYSCALLS.varargs += 4;\n var ret = GROWABLE_HEAP_I32()[SYSCALLS.varargs - 4 >> 2];\n return ret;\n }, getStr: function(ptr) {\n var ret = UTF8ToString(ptr);\n return ret;\n }, get64: function(low, high) {\n return low;\n } };\n function _fd_close(fd) {\n if (ENVIRONMENT_IS_PTHREAD)\n return _emscripten_proxy_to_main_thread_js(3, 1, fd);\n return 0;\n }\n function _fd_seek(fd, offset_low, offset_high, whence, newOffset) {\n if (ENVIRONMENT_IS_PTHREAD)\n return _emscripten_proxy_to_main_thread_js(4, 1, fd, offset_low, offset_high, whence, newOffset);\n }\n function _fd_write(fd, iov, iovcnt, pnum) {\n if (ENVIRONMENT_IS_PTHREAD)\n return _emscripten_proxy_to_main_thread_js(5, 1, fd, iov, iovcnt, pnum);\n var num = 0;\n for (var i = 0; i < iovcnt; i++) {\n var ptr = GROWABLE_HEAP_I32()[iov >> 2];\n var len = GROWABLE_HEAP_I32()[iov + 4 >> 2];\n iov += 8;\n for (var j = 0; j < len; j++) {\n SYSCALLS.printChar(fd, GROWABLE_HEAP_U8()[ptr + j]);\n }\n num += len;\n }\n GROWABLE_HEAP_I32()[pnum >> 2] = num;\n return 0;\n }\n function _setTempRet0(val) {\n setTempRet0(val);\n }\n PThread.init();\n var GLctx;\n var proxiedFunctionTable = [null, exitOnMainThread, _emscripten_set_canvas_element_size_main_thread, _fd_close, _fd_seek, _fd_write];\n var ASSERTIONS = false;\n var asmLibraryArg = { \"__clock_gettime\": ___clock_gettime, \"__emscripten_init_main_thread_js\": ___emscripten_init_main_thread_js, \"__emscripten_thread_cleanup\": ___emscripten_thread_cleanup, \"__pthread_create_js\": ___pthread_create_js, \"_emscripten_default_pthread_stack_size\": __emscripten_default_pthread_stack_size, \"_emscripten_notify_thread_queue\": __emscripten_notify_thread_queue, \"abort\": _abort, \"emscripten_check_blocking_allowed\": _emscripten_check_blocking_allowed, \"emscripten_get_heap_max\": _emscripten_get_heap_max, \"emscripten_get_now\": _emscripten_get_now, \"emscripten_memcpy_big\": _emscripten_memcpy_big, \"emscripten_num_logical_cores\": _emscripten_num_logical_cores, \"emscripten_receive_on_main_thread_js\": _emscripten_receive_on_main_thread_js, \"emscripten_resize_heap\": _emscripten_resize_heap, \"emscripten_set_canvas_element_size\": _emscripten_set_canvas_element_size, \"emscripten_unwind_to_js_event_loop\": _emscripten_unwind_to_js_event_loop, \"emscripten_webgl_create_context\": _emscripten_webgl_create_context, \"exit\": _exit, \"fd_close\": _fd_close, \"fd_seek\": _fd_seek, \"fd_write\": _fd_write, \"memory\": wasmMemory || Module[\"wasmMemory\"], \"setTempRet0\": _setTempRet0 };\n var asm = createWasm();\n var ___wasm_call_ctors = Module[\"___wasm_call_ctors\"] = function() {\n return (___wasm_call_ctors = Module[\"___wasm_call_ctors\"] = Module[\"asm\"][\"__wasm_call_ctors\"]).apply(null, arguments);\n };\n var _init = Module[\"_init\"] = function() {\n return (_init = Module[\"_init\"] = Module[\"asm\"][\"init\"]).apply(null, arguments);\n };\n var _init_with_threads_count = Module[\"_init_with_threads_count\"] = function() {\n return (_init_with_threads_count = Module[\"_init_with_threads_count\"] = Module[\"asm\"][\"init_with_threads_count\"]).apply(null, arguments);\n };\n var _get_threads_count = Module[\"_get_threads_count\"] = function() {\n return (_get_threads_count = Module[\"_get_threads_count\"] = Module[\"asm\"][\"get_threads_count\"]).apply(null, arguments);\n };\n var _register_tensor = Module[\"_register_tensor\"] = function() {\n return (_register_tensor = Module[\"_register_tensor\"] = Module[\"asm\"][\"register_tensor\"]).apply(null, arguments);\n };\n var _dispose_data = Module[\"_dispose_data\"] = function() {\n return (_dispose_data = Module[\"_dispose_data\"] = Module[\"asm\"][\"dispose_data\"]).apply(null, arguments);\n };\n var _dispose = Module[\"_dispose\"] = function() {\n return (_dispose = Module[\"_dispose\"] = Module[\"asm\"][\"dispose\"]).apply(null, arguments);\n };\n var _Abs = Module[\"_Abs\"] = function() {\n return (_Abs = Module[\"_Abs\"] = Module[\"asm\"][\"Abs\"]).apply(null, arguments);\n };\n var _Add = Module[\"_Add\"] = function() {\n return (_Add = Module[\"_Add\"] = Module[\"asm\"][\"Add\"]).apply(null, arguments);\n };\n var _AddN = Module[\"_AddN\"] = function() {\n return (_AddN = Module[\"_AddN\"] = Module[\"asm\"][\"AddN\"]).apply(null, arguments);\n };\n var _All = Module[\"_All\"] = function() {\n return (_All = Module[\"_All\"] = Module[\"asm\"][\"All\"]).apply(null, arguments);\n };\n var _Any = Module[\"_Any\"] = function() {\n return (_Any = Module[\"_Any\"] = Module[\"asm\"][\"Any\"]).apply(null, arguments);\n };\n var _ArgMax = Module[\"_ArgMax\"] = function() {\n return (_ArgMax = Module[\"_ArgMax\"] = Module[\"asm\"][\"ArgMax\"]).apply(null, arguments);\n };\n var _AvgPool = Module[\"_AvgPool\"] = function() {\n return (_AvgPool = Module[\"_AvgPool\"] = Module[\"asm\"][\"AvgPool\"]).apply(null, arguments);\n };\n var _BatchMatMul = Module[\"_BatchMatMul\"] = function() {\n return (_BatchMatMul = Module[\"_BatchMatMul\"] = Module[\"asm\"][\"BatchMatMul\"]).apply(null, arguments);\n };\n var _Ceil = Module[\"_Ceil\"] = function() {\n return (_Ceil = Module[\"_Ceil\"] = Module[\"asm\"][\"Ceil\"]).apply(null, arguments);\n };\n var _ClipByValue = Module[\"_ClipByValue\"] = function() {\n return (_ClipByValue = Module[\"_ClipByValue\"] = Module[\"asm\"][\"ClipByValue\"]).apply(null, arguments);\n };\n var _Conv2D = Module[\"_Conv2D\"] = function() {\n return (_Conv2D = Module[\"_Conv2D\"] = Module[\"asm\"][\"Conv2D\"]).apply(null, arguments);\n };\n var _Conv2DBackpropInput = Module[\"_Conv2DBackpropInput\"] = function() {\n return (_Conv2DBackpropInput = Module[\"_Conv2DBackpropInput\"] = Module[\"asm\"][\"Conv2DBackpropInput\"]).apply(null, arguments);\n };\n var _Cos = Module[\"_Cos\"] = function() {\n return (_Cos = Module[\"_Cos\"] = Module[\"asm\"][\"Cos\"]).apply(null, arguments);\n };\n var _Cosh = Module[\"_Cosh\"] = function() {\n return (_Cosh = Module[\"_Cosh\"] = Module[\"asm\"][\"Cosh\"]).apply(null, arguments);\n };\n var _CropAndResize = Module[\"_CropAndResize\"] = function() {\n return (_CropAndResize = Module[\"_CropAndResize\"] = Module[\"asm\"][\"CropAndResize\"]).apply(null, arguments);\n };\n var _Cumprod = Module[\"_Cumprod\"] = function() {\n return (_Cumprod = Module[\"_Cumprod\"] = Module[\"asm\"][\"Cumprod\"]).apply(null, arguments);\n };\n var _Cumsum = Module[\"_Cumsum\"] = function() {\n return (_Cumsum = Module[\"_Cumsum\"] = Module[\"asm\"][\"Cumsum\"]).apply(null, arguments);\n };\n var _DepthToSpace = Module[\"_DepthToSpace\"] = function() {\n return (_DepthToSpace = Module[\"_DepthToSpace\"] = Module[\"asm\"][\"DepthToSpace\"]).apply(null, arguments);\n };\n var _DepthwiseConv2dNative = Module[\"_DepthwiseConv2dNative\"] = function() {\n return (_DepthwiseConv2dNative = Module[\"_DepthwiseConv2dNative\"] = Module[\"asm\"][\"DepthwiseConv2dNative\"]).apply(null, arguments);\n };\n var _Elu = Module[\"_Elu\"] = function() {\n return (_Elu = Module[\"_Elu\"] = Module[\"asm\"][\"Elu\"]).apply(null, arguments);\n };\n var _Equal = Module[\"_Equal\"] = function() {\n return (_Equal = Module[\"_Equal\"] = Module[\"asm\"][\"Equal\"]).apply(null, arguments);\n };\n var _Exp = Module[\"_Exp\"] = function() {\n return (_Exp = Module[\"_Exp\"] = Module[\"asm\"][\"Exp\"]).apply(null, arguments);\n };\n var _FlipLeftRight = Module[\"_FlipLeftRight\"] = function() {\n return (_FlipLeftRight = Module[\"_FlipLeftRight\"] = Module[\"asm\"][\"FlipLeftRight\"]).apply(null, arguments);\n };\n var _Floor = Module[\"_Floor\"] = function() {\n return (_Floor = Module[\"_Floor\"] = Module[\"asm\"][\"Floor\"]).apply(null, arguments);\n };\n var _FloorDiv = Module[\"_FloorDiv\"] = function() {\n return (_FloorDiv = Module[\"_FloorDiv\"] = Module[\"asm\"][\"FloorDiv\"]).apply(null, arguments);\n };\n var _FusedBatchNorm = Module[\"_FusedBatchNorm\"] = function() {\n return (_FusedBatchNorm = Module[\"_FusedBatchNorm\"] = Module[\"asm\"][\"FusedBatchNorm\"]).apply(null, arguments);\n };\n var _FusedConv2D = Module[\"_FusedConv2D\"] = function() {\n return (_FusedConv2D = Module[\"_FusedConv2D\"] = Module[\"asm\"][\"FusedConv2D\"]).apply(null, arguments);\n };\n var _FusedDepthwiseConv2D = Module[\"_FusedDepthwiseConv2D\"] = function() {\n return (_FusedDepthwiseConv2D = Module[\"_FusedDepthwiseConv2D\"] = Module[\"asm\"][\"FusedDepthwiseConv2D\"]).apply(null, arguments);\n };\n var _Gather = Module[\"_Gather\"] = function() {\n return (_Gather = Module[\"_Gather\"] = Module[\"asm\"][\"Gather\"]).apply(null, arguments);\n };\n var _GatherNd = Module[\"_GatherNd\"] = function() {\n return (_GatherNd = Module[\"_GatherNd\"] = Module[\"asm\"][\"GatherNd\"]).apply(null, arguments);\n };\n var _Greater = Module[\"_Greater\"] = function() {\n return (_Greater = Module[\"_Greater\"] = Module[\"asm\"][\"Greater\"]).apply(null, arguments);\n };\n var _GreaterEqual = Module[\"_GreaterEqual\"] = function() {\n return (_GreaterEqual = Module[\"_GreaterEqual\"] = Module[\"asm\"][\"GreaterEqual\"]).apply(null, arguments);\n };\n var _LeakyRelu = Module[\"_LeakyRelu\"] = function() {\n return (_LeakyRelu = Module[\"_LeakyRelu\"] = Module[\"asm\"][\"LeakyRelu\"]).apply(null, arguments);\n };\n var _Less = Module[\"_Less\"] = function() {\n return (_Less = Module[\"_Less\"] = Module[\"asm\"][\"Less\"]).apply(null, arguments);\n };\n var _LessEqual = Module[\"_LessEqual\"] = function() {\n return (_LessEqual = Module[\"_LessEqual\"] = Module[\"asm\"][\"LessEqual\"]).apply(null, arguments);\n };\n var _Log = Module[\"_Log\"] = function() {\n return (_Log = Module[\"_Log\"] = Module[\"asm\"][\"Log\"]).apply(null, arguments);\n };\n var _LogicalAnd = Module[\"_LogicalAnd\"] = function() {\n return (_LogicalAnd = Module[\"_LogicalAnd\"] = Module[\"asm\"][\"LogicalAnd\"]).apply(null, arguments);\n };\n var _LogicalNot = Module[\"_LogicalNot\"] = function() {\n return (_LogicalNot = Module[\"_LogicalNot\"] = Module[\"asm\"][\"LogicalNot\"]).apply(null, arguments);\n };\n var _LogicalOr = Module[\"_LogicalOr\"] = function() {\n return (_LogicalOr = Module[\"_LogicalOr\"] = Module[\"asm\"][\"LogicalOr\"]).apply(null, arguments);\n };\n var _LogicalXor = Module[\"_LogicalXor\"] = function() {\n return (_LogicalXor = Module[\"_LogicalXor\"] = Module[\"asm\"][\"LogicalXor\"]).apply(null, arguments);\n };\n var _Max = Module[\"_Max\"] = function() {\n return (_Max = Module[\"_Max\"] = Module[\"asm\"][\"Max\"]).apply(null, arguments);\n };\n var _MaxPool = Module[\"_MaxPool\"] = function() {\n return (_MaxPool = Module[\"_MaxPool\"] = Module[\"asm\"][\"MaxPool\"]).apply(null, arguments);\n };\n var _Maximum = Module[\"_Maximum\"] = function() {\n return (_Maximum = Module[\"_Maximum\"] = Module[\"asm\"][\"Maximum\"]).apply(null, arguments);\n };\n var _Mean = Module[\"_Mean\"] = function() {\n return (_Mean = Module[\"_Mean\"] = Module[\"asm\"][\"Mean\"]).apply(null, arguments);\n };\n var _Min = Module[\"_Min\"] = function() {\n return (_Min = Module[\"_Min\"] = Module[\"asm\"][\"Min\"]).apply(null, arguments);\n };\n var _Minimum = Module[\"_Minimum\"] = function() {\n return (_Minimum = Module[\"_Minimum\"] = Module[\"asm\"][\"Minimum\"]).apply(null, arguments);\n };\n var _MirrorPad = Module[\"_MirrorPad\"] = function() {\n return (_MirrorPad = Module[\"_MirrorPad\"] = Module[\"asm\"][\"MirrorPad\"]).apply(null, arguments);\n };\n var _Multiply = Module[\"_Multiply\"] = function() {\n return (_Multiply = Module[\"_Multiply\"] = Module[\"asm\"][\"Multiply\"]).apply(null, arguments);\n };\n var _Neg = Module[\"_Neg\"] = function() {\n return (_Neg = Module[\"_Neg\"] = Module[\"asm\"][\"Neg\"]).apply(null, arguments);\n };\n var _NonMaxSuppressionV3 = Module[\"_NonMaxSuppressionV3\"] = function() {\n return (_NonMaxSuppressionV3 = Module[\"_NonMaxSuppressionV3\"] = Module[\"asm\"][\"NonMaxSuppressionV3\"]).apply(null, arguments);\n };\n var _NonMaxSuppressionV4 = Module[\"_NonMaxSuppressionV4\"] = function() {\n return (_NonMaxSuppressionV4 = Module[\"_NonMaxSuppressionV4\"] = Module[\"asm\"][\"NonMaxSuppressionV4\"]).apply(null, arguments);\n };\n var _NonMaxSuppressionV5 = Module[\"_NonMaxSuppressionV5\"] = function() {\n return (_NonMaxSuppressionV5 = Module[\"_NonMaxSuppressionV5\"] = Module[\"asm\"][\"NonMaxSuppressionV5\"]).apply(null, arguments);\n };\n var _NotEqual = Module[\"_NotEqual\"] = function() {\n return (_NotEqual = Module[\"_NotEqual\"] = Module[\"asm\"][\"NotEqual\"]).apply(null, arguments);\n };\n var _OneHot = Module[\"_OneHot\"] = function() {\n return (_OneHot = Module[\"_OneHot\"] = Module[\"asm\"][\"OneHot\"]).apply(null, arguments);\n };\n var _PadV2 = Module[\"_PadV2\"] = function() {\n return (_PadV2 = Module[\"_PadV2\"] = Module[\"asm\"][\"PadV2\"]).apply(null, arguments);\n };\n var _Pow = Module[\"_Pow\"] = function() {\n return (_Pow = Module[\"_Pow\"] = Module[\"asm\"][\"Pow\"]).apply(null, arguments);\n };\n var _Prelu = Module[\"_Prelu\"] = function() {\n return (_Prelu = Module[\"_Prelu\"] = Module[\"asm\"][\"Prelu\"]).apply(null, arguments);\n };\n var _Prod = Module[\"_Prod\"] = function() {\n return (_Prod = Module[\"_Prod\"] = Module[\"asm\"][\"Prod\"]).apply(null, arguments);\n };\n var _RealDiv = Module[\"_RealDiv\"] = function() {\n return (_RealDiv = Module[\"_RealDiv\"] = Module[\"asm\"][\"RealDiv\"]).apply(null, arguments);\n };\n var _Relu = Module[\"_Relu\"] = function() {\n return (_Relu = Module[\"_Relu\"] = Module[\"asm\"][\"Relu\"]).apply(null, arguments);\n };\n var _Relu6 = Module[\"_Relu6\"] = function() {\n return (_Relu6 = Module[\"_Relu6\"] = Module[\"asm\"][\"Relu6\"]).apply(null, arguments);\n };\n var _ResizeBilinear = Module[\"_ResizeBilinear\"] = function() {\n return (_ResizeBilinear = Module[\"_ResizeBilinear\"] = Module[\"asm\"][\"ResizeBilinear\"]).apply(null, arguments);\n };\n var _ResizeNearestNeighbor = Module[\"_ResizeNearestNeighbor\"] = function() {\n return (_ResizeNearestNeighbor = Module[\"_ResizeNearestNeighbor\"] = Module[\"asm\"][\"ResizeNearestNeighbor\"]).apply(null, arguments);\n };\n var _Reverse = Module[\"_Reverse\"] = function() {\n return (_Reverse = Module[\"_Reverse\"] = Module[\"asm\"][\"Reverse\"]).apply(null, arguments);\n };\n var _RotateWithOffset = Module[\"_RotateWithOffset\"] = function() {\n return (_RotateWithOffset = Module[\"_RotateWithOffset\"] = Module[\"asm\"][\"RotateWithOffset\"]).apply(null, arguments);\n };\n var _Round = Module[\"_Round\"] = function() {\n return (_Round = Module[\"_Round\"] = Module[\"asm\"][\"Round\"]).apply(null, arguments);\n };\n var _Rsqrt = Module[\"_Rsqrt\"] = function() {\n return (_Rsqrt = Module[\"_Rsqrt\"] = Module[\"asm\"][\"Rsqrt\"]).apply(null, arguments);\n };\n var _ScatterNd = Module[\"_ScatterNd\"] = function() {\n return (_ScatterNd = Module[\"_ScatterNd\"] = Module[\"asm\"][\"ScatterNd\"]).apply(null, arguments);\n };\n var _SelectV2 = Module[\"_SelectV2\"] = function() {\n return (_SelectV2 = Module[\"_SelectV2\"] = Module[\"asm\"][\"SelectV2\"]).apply(null, arguments);\n };\n var _Sigmoid = Module[\"_Sigmoid\"] = function() {\n return (_Sigmoid = Module[\"_Sigmoid\"] = Module[\"asm\"][\"Sigmoid\"]).apply(null, arguments);\n };\n var _Sin = Module[\"_Sin\"] = function() {\n return (_Sin = Module[\"_Sin\"] = Module[\"asm\"][\"Sin\"]).apply(null, arguments);\n };\n var _Softmax = Module[\"_Softmax\"] = function() {\n return (_Softmax = Module[\"_Softmax\"] = Module[\"asm\"][\"Softmax\"]).apply(null, arguments);\n };\n var _SparseFillEmptyRows = Module[\"_SparseFillEmptyRows\"] = function() {\n return (_SparseFillEmptyRows = Module[\"_SparseFillEmptyRows\"] = Module[\"asm\"][\"SparseFillEmptyRows\"]).apply(null, arguments);\n };\n var _SparseReshape = Module[\"_SparseReshape\"] = function() {\n return (_SparseReshape = Module[\"_SparseReshape\"] = Module[\"asm\"][\"SparseReshape\"]).apply(null, arguments);\n };\n var _SparseSegmentReduction = Module[\"_SparseSegmentReduction\"] = function() {\n return (_SparseSegmentReduction = Module[\"_SparseSegmentReduction\"] = Module[\"asm\"][\"SparseSegmentReduction\"]).apply(null, arguments);\n };\n var _Sqrt = Module[\"_Sqrt\"] = function() {\n return (_Sqrt = Module[\"_Sqrt\"] = Module[\"asm\"][\"Sqrt\"]).apply(null, arguments);\n };\n var _Square = Module[\"_Square\"] = function() {\n return (_Square = Module[\"_Square\"] = Module[\"asm\"][\"Square\"]).apply(null, arguments);\n };\n var _SquaredDifference = Module[\"_SquaredDifference\"] = function() {\n return (_SquaredDifference = Module[\"_SquaredDifference\"] = Module[\"asm\"][\"SquaredDifference\"]).apply(null, arguments);\n };\n var _Step = Module[\"_Step\"] = function() {\n return (_Step = Module[\"_Step\"] = Module[\"asm\"][\"Step\"]).apply(null, arguments);\n };\n var _StridedSlice = Module[\"_StridedSlice\"] = function() {\n return (_StridedSlice = Module[\"_StridedSlice\"] = Module[\"asm\"][\"StridedSlice\"]).apply(null, arguments);\n };\n var _Sub = Module[\"_Sub\"] = function() {\n return (_Sub = Module[\"_Sub\"] = Module[\"asm\"][\"Sub\"]).apply(null, arguments);\n };\n var _Sum = Module[\"_Sum\"] = function() {\n return (_Sum = Module[\"_Sum\"] = Module[\"asm\"][\"Sum\"]).apply(null, arguments);\n };\n var _Tan = Module[\"_Tan\"] = function() {\n return (_Tan = Module[\"_Tan\"] = Module[\"asm\"][\"Tan\"]).apply(null, arguments);\n };\n var _Tanh = Module[\"_Tanh\"] = function() {\n return (_Tanh = Module[\"_Tanh\"] = Module[\"asm\"][\"Tanh\"]).apply(null, arguments);\n };\n var _Tile = Module[\"_Tile\"] = function() {\n return (_Tile = Module[\"_Tile\"] = Module[\"asm\"][\"Tile\"]).apply(null, arguments);\n };\n var _TopK = Module[\"_TopK\"] = function() {\n return (_TopK = Module[\"_TopK\"] = Module[\"asm\"][\"TopK\"]).apply(null, arguments);\n };\n var _Transform = Module[\"_Transform\"] = function() {\n return (_Transform = Module[\"_Transform\"] = Module[\"asm\"][\"Transform\"]).apply(null, arguments);\n };\n var _Transpose = Module[\"_Transpose\"] = function() {\n return (_Transpose = Module[\"_Transpose\"] = Module[\"asm\"][\"Transpose\"]).apply(null, arguments);\n };\n var __FusedMatMul = Module[\"__FusedMatMul\"] = function() {\n return (__FusedMatMul = Module[\"__FusedMatMul\"] = Module[\"asm\"][\"_FusedMatMul\"]).apply(null, arguments);\n };\n var _malloc = Module[\"_malloc\"] = function() {\n return (_malloc = Module[\"_malloc\"] = Module[\"asm\"][\"malloc\"]).apply(null, arguments);\n };\n var _free = Module[\"_free\"] = function() {\n return (_free = Module[\"_free\"] = Module[\"asm\"][\"free\"]).apply(null, arguments);\n };\n var _emscripten_tls_init = Module[\"_emscripten_tls_init\"] = function() {\n return (_emscripten_tls_init = Module[\"_emscripten_tls_init\"] = Module[\"asm\"][\"emscripten_tls_init\"]).apply(null, arguments);\n };\n var ___errno_location = Module[\"___errno_location\"] = function() {\n return (___errno_location = Module[\"___errno_location\"] = Module[\"asm\"][\"__errno_location\"]).apply(null, arguments);\n };\n var _pthread_self = Module[\"_pthread_self\"] = function() {\n return (_pthread_self = Module[\"_pthread_self\"] = Module[\"asm\"][\"pthread_self\"]).apply(null, arguments);\n };\n var _emscripten_main_thread_process_queued_calls = Module[\"_emscripten_main_thread_process_queued_calls\"] = function() {\n return (_emscripten_main_thread_process_queued_calls = Module[\"_emscripten_main_thread_process_queued_calls\"] = Module[\"asm\"][\"emscripten_main_thread_process_queued_calls\"]).apply(null, arguments);\n };\n var __emscripten_thread_crashed = Module[\"__emscripten_thread_crashed\"] = function() {\n return (__emscripten_thread_crashed = Module[\"__emscripten_thread_crashed\"] = Module[\"asm\"][\"_emscripten_thread_crashed\"]).apply(null, arguments);\n };\n var __emscripten_thread_init = Module[\"__emscripten_thread_init\"] = function() {\n return (__emscripten_thread_init = Module[\"__emscripten_thread_init\"] = Module[\"asm\"][\"_emscripten_thread_init\"]).apply(null, arguments);\n };\n var _emscripten_current_thread_process_queued_calls = Module[\"_emscripten_current_thread_process_queued_calls\"] = function() {\n return (_emscripten_current_thread_process_queued_calls = Module[\"_emscripten_current_thread_process_queued_calls\"] = Module[\"asm\"][\"emscripten_current_thread_process_queued_calls\"]).apply(null, arguments);\n };\n var _emscripten_main_browser_thread_id = Module[\"_emscripten_main_browser_thread_id\"] = function() {\n return (_emscripten_main_browser_thread_id = Module[\"_emscripten_main_browser_thread_id\"] = Module[\"asm\"][\"emscripten_main_browser_thread_id\"]).apply(null, arguments);\n };\n var _emscripten_sync_run_in_main_thread_2 = Module[\"_emscripten_sync_run_in_main_thread_2\"] = function() {\n return (_emscripten_sync_run_in_main_thread_2 = Module[\"_emscripten_sync_run_in_main_thread_2\"] = Module[\"asm\"][\"emscripten_sync_run_in_main_thread_2\"]).apply(null, arguments);\n };\n var _emscripten_sync_run_in_main_thread_4 = Module[\"_emscripten_sync_run_in_main_thread_4\"] = function() {\n return (_emscripten_sync_run_in_main_thread_4 = Module[\"_emscripten_sync_run_in_main_thread_4\"] = Module[\"asm\"][\"emscripten_sync_run_in_main_thread_4\"]).apply(null, arguments);\n };\n var _emscripten_run_in_main_runtime_thread_js = Module[\"_emscripten_run_in_main_runtime_thread_js\"] = function() {\n return (_emscripten_run_in_main_runtime_thread_js = Module[\"_emscripten_run_in_main_runtime_thread_js\"] = Module[\"asm\"][\"emscripten_run_in_main_runtime_thread_js\"]).apply(null, arguments);\n };\n var _emscripten_dispatch_to_thread_ = Module[\"_emscripten_dispatch_to_thread_\"] = function() {\n return (_emscripten_dispatch_to_thread_ = Module[\"_emscripten_dispatch_to_thread_\"] = Module[\"asm\"][\"emscripten_dispatch_to_thread_\"]).apply(null, arguments);\n };\n var __emscripten_thread_free_data = Module[\"__emscripten_thread_free_data\"] = function() {\n return (__emscripten_thread_free_data = Module[\"__emscripten_thread_free_data\"] = Module[\"asm\"][\"_emscripten_thread_free_data\"]).apply(null, arguments);\n };\n var __emscripten_thread_exit = Module[\"__emscripten_thread_exit\"] = function() {\n return (__emscripten_thread_exit = Module[\"__emscripten_thread_exit\"] = Module[\"asm\"][\"_emscripten_thread_exit\"]).apply(null, arguments);\n };\n var _memalign = Module[\"_memalign\"] = function() {\n return (_memalign = Module[\"_memalign\"] = Module[\"asm\"][\"memalign\"]).apply(null, arguments);\n };\n var _emscripten_stack_set_limits = Module[\"_emscripten_stack_set_limits\"] = function() {\n return (_emscripten_stack_set_limits = Module[\"_emscripten_stack_set_limits\"] = Module[\"asm\"][\"emscripten_stack_set_limits\"]).apply(null, arguments);\n };\n var stackSave = Module[\"stackSave\"] = function() {\n return (stackSave = Module[\"stackSave\"] = Module[\"asm\"][\"stackSave\"]).apply(null, arguments);\n };\n var stackRestore = Module[\"stackRestore\"] = function() {\n return (stackRestore = Module[\"stackRestore\"] = Module[\"asm\"][\"stackRestore\"]).apply(null, arguments);\n };\n var stackAlloc = Module[\"stackAlloc\"] = function() {\n return (stackAlloc = Module[\"stackAlloc\"] = Module[\"asm\"][\"stackAlloc\"]).apply(null, arguments);\n };\n var dynCall_iijjiiii = Module[\"dynCall_iijjiiii\"] = function() {\n return (dynCall_iijjiiii = Module[\"dynCall_iijjiiii\"] = Module[\"asm\"][\"dynCall_iijjiiii\"]).apply(null, arguments);\n };\n var dynCall_jiji = Module[\"dynCall_jiji\"] = function() {\n return (dynCall_jiji = Module[\"dynCall_jiji\"] = Module[\"asm\"][\"dynCall_jiji\"]).apply(null, arguments);\n };\n var __emscripten_allow_main_runtime_queued_calls = Module[\"__emscripten_allow_main_runtime_queued_calls\"] = 21672;\n Module[\"cwrap\"] = cwrap;\n Module[\"keepRuntimeAlive\"] = keepRuntimeAlive;\n Module[\"PThread\"] = PThread;\n Module[\"PThread\"] = PThread;\n Module[\"wasmMemory\"] = wasmMemory;\n Module[\"ExitStatus\"] = ExitStatus;\n var calledRun;\n function ExitStatus(status) {\n this.name = \"ExitStatus\";\n this.message = \"Program terminated with exit(\" + status + \")\";\n this.status = status;\n }\n dependenciesFulfilled = function runCaller() {\n if (!calledRun)\n run();\n if (!calledRun)\n dependenciesFulfilled = runCaller;\n };\n function run(args) {\n args = args || arguments_;\n if (runDependencies > 0) {\n return;\n }\n if (ENVIRONMENT_IS_PTHREAD) {\n readyPromiseResolve(Module);\n initRuntime();\n postMessage({ \"cmd\": \"loaded\" });\n return;\n }\n preRun();\n if (runDependencies > 0) {\n return;\n }\n function doRun() {\n if (calledRun)\n return;\n calledRun = true;\n Module[\"calledRun\"] = true;\n if (ABORT)\n return;\n initRuntime();\n readyPromiseResolve(Module);\n if (Module[\"onRuntimeInitialized\"])\n Module[\"onRuntimeInitialized\"]();\n postRun();\n }\n if (Module[\"setStatus\"]) {\n Module[\"setStatus\"](\"Running...\");\n setTimeout(function() {\n setTimeout(function() {\n Module[\"setStatus\"](\"\");\n }, 1);\n doRun();\n }, 1);\n } else {\n doRun();\n }\n }\n Module[\"run\"] = run;\n function exit(status, implicit) {\n EXITSTATUS = status;\n if (!implicit) {\n if (ENVIRONMENT_IS_PTHREAD) {\n exitOnMainThread(status);\n throw \"unwind\";\n } else {\n }\n }\n if (keepRuntimeAlive()) {\n } else {\n exitRuntime();\n }\n procExit(status);\n }\n function procExit(code) {\n EXITSTATUS = code;\n if (!keepRuntimeAlive()) {\n PThread.terminateAllThreads();\n if (Module[\"onExit\"])\n Module[\"onExit\"](code);\n ABORT = true;\n }\n quit_(code, new ExitStatus(code));\n }\n if (Module[\"preInit\"]) {\n if (typeof Module[\"preInit\"] == \"function\")\n Module[\"preInit\"] = [Module[\"preInit\"]];\n while (Module[\"preInit\"].length > 0) {\n Module[\"preInit\"].pop()();\n }\n }\n run();\n var listenersAdded;\n if (beforeListeners) {\n listenersAdded = { uncaughtException: process.listeners(\"uncaughtException\").filter(function(listener) {\n return !beforeListeners.uncaughtException.indexOf(listener) > -1;\n }), unhandledRejection: process.listeners(\"unhandledRejection\").filter(function(listener) {\n return !beforeListeners.unhandledRejection.indexOf(listener) > -1;\n }) };\n }\n var actualModule;\n if (typeof WasmBackendModule !== \"undefined\") {\n actualModule = WasmBackendModule;\n } else if (typeof WasmBackendModuleThreadedSimd3 !== \"undefined\") {\n actualModule = WasmBackendModuleThreadedSimd3;\n } else {\n throw new Error(\"Could not find wasm module in post.js\");\n }\n if (listenersAdded) {\n var tmpDispose = actualModule[\"_dispose\"];\n actualModule[\"_dispose\"] = function() {\n tmpDispose();\n listenersAdded.uncaughtException.forEach(function(listener) {\n process.removeListener(\"uncaughtException\", listener);\n });\n listenersAdded.unhandledRejection.forEach(function(listener) {\n process.removeListener(\"unhandledRejection\", listener);\n });\n };\n }\n return WasmBackendModuleThreadedSimd3.ready;\n };\n })();\n if (typeof exports === \"object\" && typeof module === \"object\")\n module.exports = WasmBackendModuleThreadedSimd2;\n else if (typeof define === \"function\" && define[\"amd\"])\n define([], function() {\n return WasmBackendModuleThreadedSimd2;\n });\n else if (typeof exports === \"object\")\n exports[\"WasmBackendModuleThreadedSimd\"] = WasmBackendModuleThreadedSimd2;\n }\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm-threaded-simd.worker.js\nvar require_tfjs_backend_wasm_threaded_simd_worker = __commonJS({\n \"node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm-threaded-simd.worker.js\"(exports, module) {\n module.exports.wasmWorkerContents = `\"use strict\";var Module={};var ENVIRONMENT_IS_NODE=typeof process===\"object\"&&typeof process.versions===\"object\"&&typeof process.versions.node===\"string\";if(ENVIRONMENT_IS_NODE){var nodeWorkerThreads=require(\"worker_threads\");var parentPort=nodeWorkerThreads.parentPort;parentPort.on(\"message\",function(data){onmessage({data:data})});var fs=require(\"fs\");Object.assign(global,{self:global,require:require,Module:Module,location:{href:__filename},Worker:nodeWorkerThreads.Worker,importScripts:function(f){(0,eval)(fs.readFileSync(f,\"utf8\"))},postMessage:function(msg){parentPort.postMessage(msg)},performance:global.performance||{now:function(){return Date.now()}}})}function threadPrintErr(){var text=Array.prototype.slice.call(arguments).join(\" \");if(ENVIRONMENT_IS_NODE){fs.writeSync(2,text+\"\n\");return}console.error(text)}function threadAlert(){var text=Array.prototype.slice.call(arguments).join(\" \");postMessage({cmd:\"alert\",text:text,threadId:Module[\"_pthread_self\"]()})}var err=threadPrintErr;self.alert=threadAlert;Module[\"instantiateWasm\"]=((info,receiveInstance)=>{var instance=new WebAssembly.Instance(Module[\"wasmModule\"],info);receiveInstance(instance);Module[\"wasmModule\"]=null;return instance.exports});self.onmessage=(e=>{try{if(e.data.cmd===\"load\"){Module[\"wasmModule\"]=e.data.wasmModule;Module[\"wasmMemory\"]=e.data.wasmMemory;Module[\"buffer\"]=Module[\"wasmMemory\"].buffer;Module[\"ENVIRONMENT_IS_PTHREAD\"]=true;if(typeof e.data.urlOrBlob===\"string\"){importScripts(e.data.urlOrBlob)}else{var objectUrl=URL.createObjectURL(e.data.urlOrBlob);importScripts(objectUrl);URL.revokeObjectURL(objectUrl)}WasmBackendModuleThreadedSimd(Module).then(function(instance){Module=instance})}else if(e.data.cmd===\"run\"){Module[\"__performance_now_clock_drift\"]=performance.now()-e.data.time;Module[\"__emscripten_thread_init\"](e.data.threadInfoStruct,0,0,1);Module[\"establishStackSpace\"]();Module[\"PThread\"].receiveObjectTransfer(e.data);Module[\"PThread\"].threadInit();try{var result=Module[\"invokeEntryPoint\"](e.data.start_routine,e.data.arg);if(Module[\"keepRuntimeAlive\"]()){Module[\"PThread\"].setExitStatus(result)}else{Module[\"__emscripten_thread_exit\"](result)}}catch(ex){if(ex!=\"unwind\"){if(ex instanceof Module[\"ExitStatus\"]){if(Module[\"keepRuntimeAlive\"]()){}else{Module[\"__emscripten_thread_exit\"](ex.status)}}else{throw ex}}}}else if(e.data.cmd===\"cancel\"){if(Module[\"_pthread_self\"]()){Module[\"__emscripten_thread_exit\"](-1)}}else if(e.data.target===\"setimmediate\"){}else if(e.data.cmd===\"processThreadQueue\"){if(Module[\"_pthread_self\"]()){Module[\"_emscripten_current_thread_process_queued_calls\"]()}}else if(e.data.cmd===\"processProxyingQueue\"){if(Module[\"_pthread_self\"]()){Module[\"_emscripten_proxy_execute_queue\"](e.data.queue)}}else{err(\"worker.js received unknown command \"+e.data.cmd);err(e.data)}}catch(ex){err(\"worker.js onmessage() captured an uncaught exception: \"+ex);if(ex&&ex.stack)err(ex.stack);if(Module[\"__emscripten_thread_crashed\"]){Module[\"__emscripten_thread_crashed\"]()}throw ex}});`;\n }\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm.js\nvar require_tfjs_backend_wasm = __commonJS({\n \"node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm.js\"(exports, module) {\n var WasmBackendModule2 = (() => {\n var _scriptDir = typeof document !== \"undefined\" && document.currentScript ? document.currentScript.src : void 0;\n if (typeof __filename !== \"undefined\")\n _scriptDir = _scriptDir || __filename;\n return function(WasmBackendModule3) {\n WasmBackendModule3 = WasmBackendModule3 || {};\n var Module = typeof WasmBackendModule3 !== \"undefined\" ? WasmBackendModule3 : {};\n var readyPromiseResolve, readyPromiseReject;\n Module[\"ready\"] = new Promise(function(resolve, reject) {\n readyPromiseResolve = resolve;\n readyPromiseReject = reject;\n });\n var beforeListeners;\n if (typeof process !== \"undefined\" && process.listeners) {\n beforeListeners = { uncaughtException: process.listeners(\"uncaughtException\"), unhandledRejection: process.listeners(\"unhandledRejection\") };\n }\n var moduleOverrides = Object.assign({}, Module);\n var arguments_ = [];\n var thisProgram = \"./this.program\";\n var quit_ = (status, toThrow) => {\n throw toThrow;\n };\n var ENVIRONMENT_IS_WEB = typeof window === \"object\";\n var ENVIRONMENT_IS_WORKER = typeof importScripts === \"function\";\n var ENVIRONMENT_IS_NODE = typeof process === \"object\" && typeof process.versions === \"object\" && typeof process.versions.node === \"string\";\n var scriptDirectory = \"\";\n function locateFile(path) {\n if (Module[\"locateFile\"]) {\n return Module[\"locateFile\"](path, scriptDirectory);\n }\n return scriptDirectory + path;\n }\n var read_, readAsync, readBinary, setWindowTitle;\n function logExceptionOnExit(e) {\n if (e instanceof ExitStatus)\n return;\n let toLog = e;\n err(\"exiting due to exception: \" + toLog);\n }\n var fs;\n var nodePath;\n var requireNodeFS;\n if (ENVIRONMENT_IS_NODE) {\n if (ENVIRONMENT_IS_WORKER) {\n scriptDirectory = require_path().dirname(scriptDirectory) + \"/\";\n } else {\n scriptDirectory = __dirname + \"/\";\n }\n requireNodeFS = () => {\n if (!nodePath) {\n fs = require_fs();\n nodePath = require_path();\n }\n };\n read_ = function shell_read(filename, binary) {\n requireNodeFS();\n filename = nodePath[\"normalize\"](filename);\n return fs.readFileSync(filename, binary ? void 0 : \"utf8\");\n };\n readBinary = (filename) => {\n var ret = read_(filename, true);\n if (!ret.buffer) {\n ret = new Uint8Array(ret);\n }\n return ret;\n };\n readAsync = (filename, onload, onerror) => {\n requireNodeFS();\n filename = nodePath[\"normalize\"](filename);\n fs.readFile(filename, function(err2, data) {\n if (err2)\n onerror(err2);\n else\n onload(data.buffer);\n });\n };\n if (process[\"argv\"].length > 1) {\n thisProgram = process[\"argv\"][1].replace(/\\\\/g, \"/\");\n }\n arguments_ = process[\"argv\"].slice(2);\n process[\"on\"](\"uncaughtException\", function(ex) {\n if (!(ex instanceof ExitStatus)) {\n throw ex;\n }\n });\n process[\"on\"](\"unhandledRejection\", function(reason) {\n throw reason;\n });\n quit_ = (status, toThrow) => {\n if (keepRuntimeAlive()) {\n process[\"exitCode\"] = status;\n throw toThrow;\n }\n logExceptionOnExit(toThrow);\n process[\"exit\"](status);\n };\n Module[\"inspect\"] = function() {\n return \"[Emscripten Module object]\";\n };\n } else if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) {\n if (ENVIRONMENT_IS_WORKER) {\n scriptDirectory = self.location.href;\n } else if (typeof document !== \"undefined\" && document.currentScript) {\n scriptDirectory = document.currentScript.src;\n }\n if (_scriptDir) {\n scriptDirectory = _scriptDir;\n }\n if (scriptDirectory.indexOf(\"blob:\") !== 0) {\n scriptDirectory = scriptDirectory.substr(0, scriptDirectory.replace(/[?#].*/, \"\").lastIndexOf(\"/\") + 1);\n } else {\n scriptDirectory = \"\";\n }\n {\n read_ = (url) => {\n var xhr = new XMLHttpRequest();\n xhr.open(\"GET\", url, false);\n xhr.send(null);\n return xhr.responseText;\n };\n if (ENVIRONMENT_IS_WORKER) {\n readBinary = (url) => {\n var xhr = new XMLHttpRequest();\n xhr.open(\"GET\", url, false);\n xhr.responseType = \"arraybuffer\";\n xhr.send(null);\n return new Uint8Array(xhr.response);\n };\n }\n readAsync = (url, onload, onerror) => {\n var xhr = new XMLHttpRequest();\n xhr.open(\"GET\", url, true);\n xhr.responseType = \"arraybuffer\";\n xhr.onload = () => {\n if (xhr.status == 200 || xhr.status == 0 && xhr.response) {\n onload(xhr.response);\n return;\n }\n onerror();\n };\n xhr.onerror = onerror;\n xhr.send(null);\n };\n }\n setWindowTitle = (title) => document.title = title;\n } else {\n }\n var out = Module[\"print\"] || console.log.bind(console);\n var err = Module[\"printErr\"] || console.warn.bind(console);\n Object.assign(Module, moduleOverrides);\n moduleOverrides = null;\n if (Module[\"arguments\"])\n arguments_ = Module[\"arguments\"];\n if (Module[\"thisProgram\"])\n thisProgram = Module[\"thisProgram\"];\n if (Module[\"quit\"])\n quit_ = Module[\"quit\"];\n var POINTER_SIZE = 4;\n function warnOnce(text) {\n if (!warnOnce.shown)\n warnOnce.shown = {};\n if (!warnOnce.shown[text]) {\n warnOnce.shown[text] = 1;\n err(text);\n }\n }\n function convertJsFunctionToWasm(func2, sig) {\n if (typeof WebAssembly.Function === \"function\") {\n var typeNames = { \"i\": \"i32\", \"j\": \"i64\", \"f\": \"f32\", \"d\": \"f64\" };\n var type = { parameters: [], results: sig[0] == \"v\" ? [] : [typeNames[sig[0]]] };\n for (var i = 1; i < sig.length; ++i) {\n type.parameters.push(typeNames[sig[i]]);\n }\n return new WebAssembly.Function(type, func2);\n }\n var typeSection = [1, 0, 1, 96];\n var sigRet = sig.slice(0, 1);\n var sigParam = sig.slice(1);\n var typeCodes = { \"i\": 127, \"j\": 126, \"f\": 125, \"d\": 124 };\n typeSection.push(sigParam.length);\n for (var i = 0; i < sigParam.length; ++i) {\n typeSection.push(typeCodes[sigParam[i]]);\n }\n if (sigRet == \"v\") {\n typeSection.push(0);\n } else {\n typeSection = typeSection.concat([1, typeCodes[sigRet]]);\n }\n typeSection[1] = typeSection.length - 2;\n var bytes = new Uint8Array([0, 97, 115, 109, 1, 0, 0, 0].concat(typeSection, [2, 7, 1, 1, 101, 1, 102, 0, 0, 7, 5, 1, 1, 102, 0, 0]));\n var module2 = new WebAssembly.Module(bytes);\n var instance = new WebAssembly.Instance(module2, { \"e\": { \"f\": func2 } });\n var wrappedFunc = instance.exports[\"f\"];\n return wrappedFunc;\n }\n var freeTableIndexes = [];\n var functionsInTableMap;\n function getEmptyTableSlot() {\n if (freeTableIndexes.length) {\n return freeTableIndexes.pop();\n }\n try {\n wasmTable.grow(1);\n } catch (err2) {\n if (!(err2 instanceof RangeError)) {\n throw err2;\n }\n throw \"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.\";\n }\n return wasmTable.length - 1;\n }\n function updateTableMap(offset, count2) {\n for (var i = offset; i < offset + count2; i++) {\n var item = getWasmTableEntry(i);\n if (item) {\n functionsInTableMap.set(item, i);\n }\n }\n }\n var tempRet0 = 0;\n var setTempRet0 = (value) => {\n tempRet0 = value;\n };\n var wasmBinary;\n if (Module[\"wasmBinary\"])\n wasmBinary = Module[\"wasmBinary\"];\n var noExitRuntime = Module[\"noExitRuntime\"] || true;\n if (typeof WebAssembly !== \"object\") {\n abort(\"no native wasm support detected\");\n }\n var wasmMemory;\n var ABORT = false;\n var EXITSTATUS;\n function assert3(condition, text) {\n if (!condition) {\n abort(text);\n }\n }\n function getCFunc(ident) {\n var func2 = Module[\"_\" + ident];\n return func2;\n }\n function ccall(ident, returnType, argTypes, args, opts) {\n var toC = { \"string\": function(str) {\n var ret2 = 0;\n if (str !== null && str !== void 0 && str !== 0) {\n var len = (str.length << 2) + 1;\n ret2 = stackAlloc(len);\n stringToUTF8(str, ret2, len);\n }\n return ret2;\n }, \"array\": function(arr) {\n var ret2 = stackAlloc(arr.length);\n writeArrayToMemory(arr, ret2);\n return ret2;\n } };\n function convertReturnValue(ret2) {\n if (returnType === \"string\")\n return UTF8ToString(ret2);\n if (returnType === \"boolean\")\n return Boolean(ret2);\n return ret2;\n }\n var func2 = getCFunc(ident);\n var cArgs = [];\n var stack2 = 0;\n if (args) {\n for (var i = 0; i < args.length; i++) {\n var converter = toC[argTypes[i]];\n if (converter) {\n if (stack2 === 0)\n stack2 = stackSave();\n cArgs[i] = converter(args[i]);\n } else {\n cArgs[i] = args[i];\n }\n }\n }\n var ret = func2.apply(null, cArgs);\n function onDone(ret2) {\n if (stack2 !== 0)\n stackRestore(stack2);\n return convertReturnValue(ret2);\n }\n ret = onDone(ret);\n return ret;\n }\n function cwrap(ident, returnType, argTypes, opts) {\n argTypes = argTypes || [];\n var numericArgs = argTypes.every(function(type) {\n return type === \"number\";\n });\n var numericRet = returnType !== \"string\";\n if (numericRet && numericArgs && !opts) {\n return getCFunc(ident);\n }\n return function() {\n return ccall(ident, returnType, argTypes, arguments, opts);\n };\n }\n var ALLOC_STACK = 1;\n var UTF8Decoder = typeof TextDecoder !== \"undefined\" ? new TextDecoder(\"utf8\") : void 0;\n function UTF8ArrayToString(heap, idx, maxBytesToRead) {\n var endIdx = idx + maxBytesToRead;\n var endPtr = idx;\n while (heap[endPtr] && !(endPtr >= endIdx))\n ++endPtr;\n if (endPtr - idx > 16 && heap.subarray && UTF8Decoder) {\n return UTF8Decoder.decode(heap.subarray(idx, endPtr));\n } else {\n var str = \"\";\n while (idx < endPtr) {\n var u0 = heap[idx++];\n if (!(u0 & 128)) {\n str += String.fromCharCode(u0);\n continue;\n }\n var u1 = heap[idx++] & 63;\n if ((u0 & 224) == 192) {\n str += String.fromCharCode((u0 & 31) << 6 | u1);\n continue;\n }\n var u2 = heap[idx++] & 63;\n if ((u0 & 240) == 224) {\n u0 = (u0 & 15) << 12 | u1 << 6 | u2;\n } else {\n u0 = (u0 & 7) << 18 | u1 << 12 | u2 << 6 | heap[idx++] & 63;\n }\n if (u0 < 65536) {\n str += String.fromCharCode(u0);\n } else {\n var ch = u0 - 65536;\n str += String.fromCharCode(55296 | ch >> 10, 56320 | ch & 1023);\n }\n }\n }\n return str;\n }\n function UTF8ToString(ptr, maxBytesToRead) {\n return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead) : \"\";\n }\n function stringToUTF8Array(str, heap, outIdx, maxBytesToWrite) {\n if (!(maxBytesToWrite > 0))\n return 0;\n var startIdx = outIdx;\n var endIdx = outIdx + maxBytesToWrite - 1;\n for (var i = 0; i < str.length; ++i) {\n var u = str.charCodeAt(i);\n if (u >= 55296 && u <= 57343) {\n var u1 = str.charCodeAt(++i);\n u = 65536 + ((u & 1023) << 10) | u1 & 1023;\n }\n if (u <= 127) {\n if (outIdx >= endIdx)\n break;\n heap[outIdx++] = u;\n } else if (u <= 2047) {\n if (outIdx + 1 >= endIdx)\n break;\n heap[outIdx++] = 192 | u >> 6;\n heap[outIdx++] = 128 | u & 63;\n } else if (u <= 65535) {\n if (outIdx + 2 >= endIdx)\n break;\n heap[outIdx++] = 224 | u >> 12;\n heap[outIdx++] = 128 | u >> 6 & 63;\n heap[outIdx++] = 128 | u & 63;\n } else {\n if (outIdx + 3 >= endIdx)\n break;\n heap[outIdx++] = 240 | u >> 18;\n heap[outIdx++] = 128 | u >> 12 & 63;\n heap[outIdx++] = 128 | u >> 6 & 63;\n heap[outIdx++] = 128 | u & 63;\n }\n }\n heap[outIdx] = 0;\n return outIdx - startIdx;\n }\n function stringToUTF8(str, outPtr, maxBytesToWrite) {\n return stringToUTF8Array(str, HEAPU8, outPtr, maxBytesToWrite);\n }\n function lengthBytesUTF8(str) {\n var len = 0;\n for (var i = 0; i < str.length; ++i) {\n var u = str.charCodeAt(i);\n if (u >= 55296 && u <= 57343)\n u = 65536 + ((u & 1023) << 10) | str.charCodeAt(++i) & 1023;\n if (u <= 127)\n ++len;\n else if (u <= 2047)\n len += 2;\n else if (u <= 65535)\n len += 3;\n else\n len += 4;\n }\n return len;\n }\n var UTF16Decoder = typeof TextDecoder !== \"undefined\" ? new TextDecoder(\"utf-16le\") : void 0;\n function writeArrayToMemory(array2, buffer3) {\n HEAP8.set(array2, buffer3);\n }\n function writeAsciiToMemory(str, buffer3, dontAddNull) {\n for (var i = 0; i < str.length; ++i) {\n HEAP8[buffer3++ >> 0] = str.charCodeAt(i);\n }\n if (!dontAddNull)\n HEAP8[buffer3 >> 0] = 0;\n }\n function alignUp(x, multiple) {\n if (x % multiple > 0) {\n x += multiple - x % multiple;\n }\n return x;\n }\n var buffer2, HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32, HEAPF32, HEAPF64;\n function updateGlobalBufferAndViews(buf) {\n buffer2 = buf;\n Module[\"HEAP8\"] = HEAP8 = new Int8Array(buf);\n Module[\"HEAP16\"] = HEAP16 = new Int16Array(buf);\n Module[\"HEAP32\"] = HEAP32 = new Int32Array(buf);\n Module[\"HEAPU8\"] = HEAPU8 = new Uint8Array(buf);\n Module[\"HEAPU16\"] = HEAPU16 = new Uint16Array(buf);\n Module[\"HEAPU32\"] = HEAPU32 = new Uint32Array(buf);\n Module[\"HEAPF32\"] = HEAPF32 = new Float32Array(buf);\n Module[\"HEAPF64\"] = HEAPF64 = new Float64Array(buf);\n }\n var INITIAL_MEMORY = Module[\"INITIAL_MEMORY\"] || 16777216;\n var wasmTable;\n var __ATPRERUN__ = [];\n var __ATINIT__ = [];\n var __ATPOSTRUN__ = [];\n var runtimeInitialized = false;\n var runtimeExited = false;\n var runtimeKeepaliveCounter = 0;\n function keepRuntimeAlive() {\n return noExitRuntime || runtimeKeepaliveCounter > 0;\n }\n function preRun() {\n if (Module[\"preRun\"]) {\n if (typeof Module[\"preRun\"] == \"function\")\n Module[\"preRun\"] = [Module[\"preRun\"]];\n while (Module[\"preRun\"].length) {\n addOnPreRun(Module[\"preRun\"].shift());\n }\n }\n callRuntimeCallbacks(__ATPRERUN__);\n }\n function initRuntime() {\n runtimeInitialized = true;\n callRuntimeCallbacks(__ATINIT__);\n }\n function exitRuntime() {\n runtimeExited = true;\n }\n function postRun() {\n if (Module[\"postRun\"]) {\n if (typeof Module[\"postRun\"] == \"function\")\n Module[\"postRun\"] = [Module[\"postRun\"]];\n while (Module[\"postRun\"].length) {\n addOnPostRun(Module[\"postRun\"].shift());\n }\n }\n callRuntimeCallbacks(__ATPOSTRUN__);\n }\n function addOnPreRun(cb) {\n __ATPRERUN__.unshift(cb);\n }\n function addOnInit(cb) {\n __ATINIT__.unshift(cb);\n }\n function addOnPostRun(cb) {\n __ATPOSTRUN__.unshift(cb);\n }\n var runDependencies = 0;\n var runDependencyWatcher = null;\n var dependenciesFulfilled = null;\n function addRunDependency(id) {\n runDependencies++;\n if (Module[\"monitorRunDependencies\"]) {\n Module[\"monitorRunDependencies\"](runDependencies);\n }\n }\n function removeRunDependency(id) {\n runDependencies--;\n if (Module[\"monitorRunDependencies\"]) {\n Module[\"monitorRunDependencies\"](runDependencies);\n }\n if (runDependencies == 0) {\n if (runDependencyWatcher !== null) {\n clearInterval(runDependencyWatcher);\n runDependencyWatcher = null;\n }\n if (dependenciesFulfilled) {\n var callback = dependenciesFulfilled;\n dependenciesFulfilled = null;\n callback();\n }\n }\n }\n Module[\"preloadedImages\"] = {};\n Module[\"preloadedAudios\"] = {};\n function abort(what) {\n {\n if (Module[\"onAbort\"]) {\n Module[\"onAbort\"](what);\n }\n }\n what = \"Aborted(\" + what + \")\";\n err(what);\n ABORT = true;\n EXITSTATUS = 1;\n what += \". Build with -s ASSERTIONS=1 for more info.\";\n var e = new WebAssembly.RuntimeError(what);\n readyPromiseReject(e);\n throw e;\n }\n var dataURIPrefix = \"data:application/octet-stream;base64,\";\n function isDataURI(filename) {\n return filename.startsWith(dataURIPrefix);\n }\n function isFileURI(filename) {\n return filename.startsWith(\"file://\");\n }\n var wasmBinaryFile;\n wasmBinaryFile = \"tfjs-backend-wasm.wasm\";\n if (!isDataURI(wasmBinaryFile)) {\n wasmBinaryFile = locateFile(wasmBinaryFile);\n }\n function getBinary(file) {\n try {\n if (file == wasmBinaryFile && wasmBinary) {\n return new Uint8Array(wasmBinary);\n }\n if (readBinary) {\n return readBinary(file);\n } else {\n throw \"both async and sync fetching of the wasm failed\";\n }\n } catch (err2) {\n abort(err2);\n }\n }\n function getBinaryPromise() {\n if (!wasmBinary && (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER)) {\n if (typeof fetch === \"function\" && !isFileURI(wasmBinaryFile)) {\n return fetch(wasmBinaryFile, { credentials: \"same-origin\" }).then(function(response) {\n if (!response[\"ok\"]) {\n throw \"failed to load wasm binary file at '\" + wasmBinaryFile + \"'\";\n }\n return response[\"arrayBuffer\"]();\n }).catch(function() {\n return getBinary(wasmBinaryFile);\n });\n } else {\n if (readAsync) {\n return new Promise(function(resolve, reject) {\n readAsync(wasmBinaryFile, function(response) {\n resolve(new Uint8Array(response));\n }, reject);\n });\n }\n }\n }\n return Promise.resolve().then(function() {\n return getBinary(wasmBinaryFile);\n });\n }\n function createWasm() {\n var info = { \"env\": asmLibraryArg, \"wasi_snapshot_preview1\": asmLibraryArg };\n function receiveInstance(instance, module2) {\n var exports3 = instance.exports;\n Module[\"asm\"] = exports3;\n wasmMemory = Module[\"asm\"][\"memory\"];\n updateGlobalBufferAndViews(wasmMemory.buffer);\n wasmTable = Module[\"asm\"][\"__indirect_function_table\"];\n addOnInit(Module[\"asm\"][\"__wasm_call_ctors\"]);\n removeRunDependency(\"wasm-instantiate\");\n }\n addRunDependency(\"wasm-instantiate\");\n function receiveInstantiationResult(result) {\n receiveInstance(result[\"instance\"]);\n }\n function instantiateArrayBuffer(receiver) {\n return getBinaryPromise().then(function(binary) {\n return WebAssembly.instantiate(binary, info);\n }).then(function(instance) {\n return instance;\n }).then(receiver, function(reason) {\n err(\"failed to asynchronously prepare wasm: \" + reason);\n abort(reason);\n });\n }\n function instantiateAsync() {\n if (!wasmBinary && typeof WebAssembly.instantiateStreaming === \"function\" && !isDataURI(wasmBinaryFile) && !isFileURI(wasmBinaryFile) && typeof fetch === \"function\") {\n return fetch(wasmBinaryFile, { credentials: \"same-origin\" }).then(function(response) {\n var result = WebAssembly.instantiateStreaming(response, info);\n return result.then(receiveInstantiationResult, function(reason) {\n err(\"wasm streaming compile failed: \" + reason);\n err(\"falling back to ArrayBuffer instantiation\");\n return instantiateArrayBuffer(receiveInstantiationResult);\n });\n });\n } else {\n return instantiateArrayBuffer(receiveInstantiationResult);\n }\n }\n if (Module[\"instantiateWasm\"]) {\n try {\n var exports2 = Module[\"instantiateWasm\"](info, receiveInstance);\n return exports2;\n } catch (e) {\n err(\"Module.instantiateWasm callback failed with error: \" + e);\n return false;\n }\n }\n instantiateAsync().catch(readyPromiseReject);\n return {};\n }\n var tempDouble;\n var tempI64;\n function callRuntimeCallbacks(callbacks2) {\n while (callbacks2.length > 0) {\n var callback = callbacks2.shift();\n if (typeof callback == \"function\") {\n callback(Module);\n continue;\n }\n var func2 = callback.func;\n if (typeof func2 === \"number\") {\n if (callback.arg === void 0) {\n getWasmTableEntry(func2)();\n } else {\n getWasmTableEntry(func2)(callback.arg);\n }\n } else {\n func2(callback.arg === void 0 ? null : callback.arg);\n }\n }\n }\n function demangle(func2) {\n return func2;\n }\n function demangleAll(text) {\n var regex = /\\b_Z[\\w\\d_]+/g;\n return text.replace(regex, function(x) {\n var y = demangle(x);\n return x === y ? x : y + \" [\" + x + \"]\";\n });\n }\n var wasmTableMirror = [];\n function getWasmTableEntry(funcPtr) {\n var func2 = wasmTableMirror[funcPtr];\n if (!func2) {\n if (funcPtr >= wasmTableMirror.length)\n wasmTableMirror.length = funcPtr + 1;\n wasmTableMirror[funcPtr] = func2 = wasmTable.get(funcPtr);\n }\n return func2;\n }\n function jsStackTrace() {\n var error = new Error();\n if (!error.stack) {\n try {\n throw new Error();\n } catch (e) {\n error = e;\n }\n if (!error.stack) {\n return \"(no stack trace available)\";\n }\n }\n return error.stack.toString();\n }\n function setWasmTableEntry(idx, func2) {\n wasmTable.set(idx, func2);\n wasmTableMirror[idx] = func2;\n }\n function _abort() {\n abort(\"\");\n }\n function _emscripten_get_heap_max() {\n return 2147483648;\n }\n function _emscripten_memcpy_big(dest, src, num) {\n HEAPU8.copyWithin(dest, src, src + num);\n }\n function emscripten_realloc_buffer(size) {\n try {\n wasmMemory.grow(size - buffer2.byteLength + 65535 >>> 16);\n updateGlobalBufferAndViews(wasmMemory.buffer);\n return 1;\n } catch (e) {\n }\n }\n function _emscripten_resize_heap(requestedSize) {\n var oldSize = HEAPU8.length;\n requestedSize = requestedSize >>> 0;\n var maxHeapSize = _emscripten_get_heap_max();\n if (requestedSize > maxHeapSize) {\n return false;\n }\n for (var cutDown = 1; cutDown <= 4; cutDown *= 2) {\n var overGrownHeapSize = oldSize * (1 + 0.2 / cutDown);\n overGrownHeapSize = Math.min(overGrownHeapSize, requestedSize + 100663296);\n var newSize = Math.min(maxHeapSize, alignUp(Math.max(requestedSize, overGrownHeapSize), 65536));\n var replacement = emscripten_realloc_buffer(newSize);\n if (replacement) {\n return true;\n }\n }\n return false;\n }\n var SYSCALLS = { mappings: {}, buffers: [null, [], []], printChar: function(stream, curr) {\n var buffer3 = SYSCALLS.buffers[stream];\n if (curr === 0 || curr === 10) {\n (stream === 1 ? out : err)(UTF8ArrayToString(buffer3, 0));\n buffer3.length = 0;\n } else {\n buffer3.push(curr);\n }\n }, varargs: void 0, get: function() {\n SYSCALLS.varargs += 4;\n var ret = HEAP32[SYSCALLS.varargs - 4 >> 2];\n return ret;\n }, getStr: function(ptr) {\n var ret = UTF8ToString(ptr);\n return ret;\n }, get64: function(low, high) {\n return low;\n } };\n function _fd_close(fd) {\n return 0;\n }\n function _fd_seek(fd, offset_low, offset_high, whence, newOffset) {\n }\n function _fd_write(fd, iov, iovcnt, pnum) {\n var num = 0;\n for (var i = 0; i < iovcnt; i++) {\n var ptr = HEAP32[iov >> 2];\n var len = HEAP32[iov + 4 >> 2];\n iov += 8;\n for (var j = 0; j < len; j++) {\n SYSCALLS.printChar(fd, HEAPU8[ptr + j]);\n }\n num += len;\n }\n HEAP32[pnum >> 2] = num;\n return 0;\n }\n function _setTempRet0(val) {\n setTempRet0(val);\n }\n var ASSERTIONS = false;\n var asmLibraryArg = { \"abort\": _abort, \"emscripten_get_heap_max\": _emscripten_get_heap_max, \"emscripten_memcpy_big\": _emscripten_memcpy_big, \"emscripten_resize_heap\": _emscripten_resize_heap, \"fd_close\": _fd_close, \"fd_seek\": _fd_seek, \"fd_write\": _fd_write, \"setTempRet0\": _setTempRet0 };\n var asm = createWasm();\n var ___wasm_call_ctors = Module[\"___wasm_call_ctors\"] = function() {\n return (___wasm_call_ctors = Module[\"___wasm_call_ctors\"] = Module[\"asm\"][\"__wasm_call_ctors\"]).apply(null, arguments);\n };\n var _init = Module[\"_init\"] = function() {\n return (_init = Module[\"_init\"] = Module[\"asm\"][\"init\"]).apply(null, arguments);\n };\n var _init_with_threads_count = Module[\"_init_with_threads_count\"] = function() {\n return (_init_with_threads_count = Module[\"_init_with_threads_count\"] = Module[\"asm\"][\"init_with_threads_count\"]).apply(null, arguments);\n };\n var _get_threads_count = Module[\"_get_threads_count\"] = function() {\n return (_get_threads_count = Module[\"_get_threads_count\"] = Module[\"asm\"][\"get_threads_count\"]).apply(null, arguments);\n };\n var _register_tensor = Module[\"_register_tensor\"] = function() {\n return (_register_tensor = Module[\"_register_tensor\"] = Module[\"asm\"][\"register_tensor\"]).apply(null, arguments);\n };\n var _dispose_data = Module[\"_dispose_data\"] = function() {\n return (_dispose_data = Module[\"_dispose_data\"] = Module[\"asm\"][\"dispose_data\"]).apply(null, arguments);\n };\n var _dispose = Module[\"_dispose\"] = function() {\n return (_dispose = Module[\"_dispose\"] = Module[\"asm\"][\"dispose\"]).apply(null, arguments);\n };\n var _Abs = Module[\"_Abs\"] = function() {\n return (_Abs = Module[\"_Abs\"] = Module[\"asm\"][\"Abs\"]).apply(null, arguments);\n };\n var _Add = Module[\"_Add\"] = function() {\n return (_Add = Module[\"_Add\"] = Module[\"asm\"][\"Add\"]).apply(null, arguments);\n };\n var _AddN = Module[\"_AddN\"] = function() {\n return (_AddN = Module[\"_AddN\"] = Module[\"asm\"][\"AddN\"]).apply(null, arguments);\n };\n var _All = Module[\"_All\"] = function() {\n return (_All = Module[\"_All\"] = Module[\"asm\"][\"All\"]).apply(null, arguments);\n };\n var _Any = Module[\"_Any\"] = function() {\n return (_Any = Module[\"_Any\"] = Module[\"asm\"][\"Any\"]).apply(null, arguments);\n };\n var _ArgMax = Module[\"_ArgMax\"] = function() {\n return (_ArgMax = Module[\"_ArgMax\"] = Module[\"asm\"][\"ArgMax\"]).apply(null, arguments);\n };\n var _AvgPool = Module[\"_AvgPool\"] = function() {\n return (_AvgPool = Module[\"_AvgPool\"] = Module[\"asm\"][\"AvgPool\"]).apply(null, arguments);\n };\n var _BatchMatMul = Module[\"_BatchMatMul\"] = function() {\n return (_BatchMatMul = Module[\"_BatchMatMul\"] = Module[\"asm\"][\"BatchMatMul\"]).apply(null, arguments);\n };\n var _Ceil = Module[\"_Ceil\"] = function() {\n return (_Ceil = Module[\"_Ceil\"] = Module[\"asm\"][\"Ceil\"]).apply(null, arguments);\n };\n var _ClipByValue = Module[\"_ClipByValue\"] = function() {\n return (_ClipByValue = Module[\"_ClipByValue\"] = Module[\"asm\"][\"ClipByValue\"]).apply(null, arguments);\n };\n var _Conv2D = Module[\"_Conv2D\"] = function() {\n return (_Conv2D = Module[\"_Conv2D\"] = Module[\"asm\"][\"Conv2D\"]).apply(null, arguments);\n };\n var _Conv2DBackpropInput = Module[\"_Conv2DBackpropInput\"] = function() {\n return (_Conv2DBackpropInput = Module[\"_Conv2DBackpropInput\"] = Module[\"asm\"][\"Conv2DBackpropInput\"]).apply(null, arguments);\n };\n var _Cos = Module[\"_Cos\"] = function() {\n return (_Cos = Module[\"_Cos\"] = Module[\"asm\"][\"Cos\"]).apply(null, arguments);\n };\n var _Cosh = Module[\"_Cosh\"] = function() {\n return (_Cosh = Module[\"_Cosh\"] = Module[\"asm\"][\"Cosh\"]).apply(null, arguments);\n };\n var _CropAndResize = Module[\"_CropAndResize\"] = function() {\n return (_CropAndResize = Module[\"_CropAndResize\"] = Module[\"asm\"][\"CropAndResize\"]).apply(null, arguments);\n };\n var _Cumprod = Module[\"_Cumprod\"] = function() {\n return (_Cumprod = Module[\"_Cumprod\"] = Module[\"asm\"][\"Cumprod\"]).apply(null, arguments);\n };\n var _Cumsum = Module[\"_Cumsum\"] = function() {\n return (_Cumsum = Module[\"_Cumsum\"] = Module[\"asm\"][\"Cumsum\"]).apply(null, arguments);\n };\n var _DepthToSpace = Module[\"_DepthToSpace\"] = function() {\n return (_DepthToSpace = Module[\"_DepthToSpace\"] = Module[\"asm\"][\"DepthToSpace\"]).apply(null, arguments);\n };\n var _DepthwiseConv2dNative = Module[\"_DepthwiseConv2dNative\"] = function() {\n return (_DepthwiseConv2dNative = Module[\"_DepthwiseConv2dNative\"] = Module[\"asm\"][\"DepthwiseConv2dNative\"]).apply(null, arguments);\n };\n var _Elu = Module[\"_Elu\"] = function() {\n return (_Elu = Module[\"_Elu\"] = Module[\"asm\"][\"Elu\"]).apply(null, arguments);\n };\n var _Equal = Module[\"_Equal\"] = function() {\n return (_Equal = Module[\"_Equal\"] = Module[\"asm\"][\"Equal\"]).apply(null, arguments);\n };\n var _Exp = Module[\"_Exp\"] = function() {\n return (_Exp = Module[\"_Exp\"] = Module[\"asm\"][\"Exp\"]).apply(null, arguments);\n };\n var _FlipLeftRight = Module[\"_FlipLeftRight\"] = function() {\n return (_FlipLeftRight = Module[\"_FlipLeftRight\"] = Module[\"asm\"][\"FlipLeftRight\"]).apply(null, arguments);\n };\n var _Floor = Module[\"_Floor\"] = function() {\n return (_Floor = Module[\"_Floor\"] = Module[\"asm\"][\"Floor\"]).apply(null, arguments);\n };\n var _FloorDiv = Module[\"_FloorDiv\"] = function() {\n return (_FloorDiv = Module[\"_FloorDiv\"] = Module[\"asm\"][\"FloorDiv\"]).apply(null, arguments);\n };\n var _FusedBatchNorm = Module[\"_FusedBatchNorm\"] = function() {\n return (_FusedBatchNorm = Module[\"_FusedBatchNorm\"] = Module[\"asm\"][\"FusedBatchNorm\"]).apply(null, arguments);\n };\n var _FusedConv2D = Module[\"_FusedConv2D\"] = function() {\n return (_FusedConv2D = Module[\"_FusedConv2D\"] = Module[\"asm\"][\"FusedConv2D\"]).apply(null, arguments);\n };\n var _FusedDepthwiseConv2D = Module[\"_FusedDepthwiseConv2D\"] = function() {\n return (_FusedDepthwiseConv2D = Module[\"_FusedDepthwiseConv2D\"] = Module[\"asm\"][\"FusedDepthwiseConv2D\"]).apply(null, arguments);\n };\n var _Gather = Module[\"_Gather\"] = function() {\n return (_Gather = Module[\"_Gather\"] = Module[\"asm\"][\"Gather\"]).apply(null, arguments);\n };\n var _GatherNd = Module[\"_GatherNd\"] = function() {\n return (_GatherNd = Module[\"_GatherNd\"] = Module[\"asm\"][\"GatherNd\"]).apply(null, arguments);\n };\n var _Greater = Module[\"_Greater\"] = function() {\n return (_Greater = Module[\"_Greater\"] = Module[\"asm\"][\"Greater\"]).apply(null, arguments);\n };\n var _GreaterEqual = Module[\"_GreaterEqual\"] = function() {\n return (_GreaterEqual = Module[\"_GreaterEqual\"] = Module[\"asm\"][\"GreaterEqual\"]).apply(null, arguments);\n };\n var _LeakyRelu = Module[\"_LeakyRelu\"] = function() {\n return (_LeakyRelu = Module[\"_LeakyRelu\"] = Module[\"asm\"][\"LeakyRelu\"]).apply(null, arguments);\n };\n var _Less = Module[\"_Less\"] = function() {\n return (_Less = Module[\"_Less\"] = Module[\"asm\"][\"Less\"]).apply(null, arguments);\n };\n var _LessEqual = Module[\"_LessEqual\"] = function() {\n return (_LessEqual = Module[\"_LessEqual\"] = Module[\"asm\"][\"LessEqual\"]).apply(null, arguments);\n };\n var _Log = Module[\"_Log\"] = function() {\n return (_Log = Module[\"_Log\"] = Module[\"asm\"][\"Log\"]).apply(null, arguments);\n };\n var _LogicalAnd = Module[\"_LogicalAnd\"] = function() {\n return (_LogicalAnd = Module[\"_LogicalAnd\"] = Module[\"asm\"][\"LogicalAnd\"]).apply(null, arguments);\n };\n var _LogicalNot = Module[\"_LogicalNot\"] = function() {\n return (_LogicalNot = Module[\"_LogicalNot\"] = Module[\"asm\"][\"LogicalNot\"]).apply(null, arguments);\n };\n var _LogicalOr = Module[\"_LogicalOr\"] = function() {\n return (_LogicalOr = Module[\"_LogicalOr\"] = Module[\"asm\"][\"LogicalOr\"]).apply(null, arguments);\n };\n var _LogicalXor = Module[\"_LogicalXor\"] = function() {\n return (_LogicalXor = Module[\"_LogicalXor\"] = Module[\"asm\"][\"LogicalXor\"]).apply(null, arguments);\n };\n var _Max = Module[\"_Max\"] = function() {\n return (_Max = Module[\"_Max\"] = Module[\"asm\"][\"Max\"]).apply(null, arguments);\n };\n var _MaxPool = Module[\"_MaxPool\"] = function() {\n return (_MaxPool = Module[\"_MaxPool\"] = Module[\"asm\"][\"MaxPool\"]).apply(null, arguments);\n };\n var _Maximum = Module[\"_Maximum\"] = function() {\n return (_Maximum = Module[\"_Maximum\"] = Module[\"asm\"][\"Maximum\"]).apply(null, arguments);\n };\n var _Mean = Module[\"_Mean\"] = function() {\n return (_Mean = Module[\"_Mean\"] = Module[\"asm\"][\"Mean\"]).apply(null, arguments);\n };\n var _Min = Module[\"_Min\"] = function() {\n return (_Min = Module[\"_Min\"] = Module[\"asm\"][\"Min\"]).apply(null, arguments);\n };\n var _Minimum = Module[\"_Minimum\"] = function() {\n return (_Minimum = Module[\"_Minimum\"] = Module[\"asm\"][\"Minimum\"]).apply(null, arguments);\n };\n var _MirrorPad = Module[\"_MirrorPad\"] = function() {\n return (_MirrorPad = Module[\"_MirrorPad\"] = Module[\"asm\"][\"MirrorPad\"]).apply(null, arguments);\n };\n var _Multiply = Module[\"_Multiply\"] = function() {\n return (_Multiply = Module[\"_Multiply\"] = Module[\"asm\"][\"Multiply\"]).apply(null, arguments);\n };\n var _Neg = Module[\"_Neg\"] = function() {\n return (_Neg = Module[\"_Neg\"] = Module[\"asm\"][\"Neg\"]).apply(null, arguments);\n };\n var _NonMaxSuppressionV3 = Module[\"_NonMaxSuppressionV3\"] = function() {\n return (_NonMaxSuppressionV3 = Module[\"_NonMaxSuppressionV3\"] = Module[\"asm\"][\"NonMaxSuppressionV3\"]).apply(null, arguments);\n };\n var _NonMaxSuppressionV4 = Module[\"_NonMaxSuppressionV4\"] = function() {\n return (_NonMaxSuppressionV4 = Module[\"_NonMaxSuppressionV4\"] = Module[\"asm\"][\"NonMaxSuppressionV4\"]).apply(null, arguments);\n };\n var _NonMaxSuppressionV5 = Module[\"_NonMaxSuppressionV5\"] = function() {\n return (_NonMaxSuppressionV5 = Module[\"_NonMaxSuppressionV5\"] = Module[\"asm\"][\"NonMaxSuppressionV5\"]).apply(null, arguments);\n };\n var _NotEqual = Module[\"_NotEqual\"] = function() {\n return (_NotEqual = Module[\"_NotEqual\"] = Module[\"asm\"][\"NotEqual\"]).apply(null, arguments);\n };\n var _OneHot = Module[\"_OneHot\"] = function() {\n return (_OneHot = Module[\"_OneHot\"] = Module[\"asm\"][\"OneHot\"]).apply(null, arguments);\n };\n var _PadV2 = Module[\"_PadV2\"] = function() {\n return (_PadV2 = Module[\"_PadV2\"] = Module[\"asm\"][\"PadV2\"]).apply(null, arguments);\n };\n var _Pow = Module[\"_Pow\"] = function() {\n return (_Pow = Module[\"_Pow\"] = Module[\"asm\"][\"Pow\"]).apply(null, arguments);\n };\n var _Prelu = Module[\"_Prelu\"] = function() {\n return (_Prelu = Module[\"_Prelu\"] = Module[\"asm\"][\"Prelu\"]).apply(null, arguments);\n };\n var _Prod = Module[\"_Prod\"] = function() {\n return (_Prod = Module[\"_Prod\"] = Module[\"asm\"][\"Prod\"]).apply(null, arguments);\n };\n var _RealDiv = Module[\"_RealDiv\"] = function() {\n return (_RealDiv = Module[\"_RealDiv\"] = Module[\"asm\"][\"RealDiv\"]).apply(null, arguments);\n };\n var _Relu = Module[\"_Relu\"] = function() {\n return (_Relu = Module[\"_Relu\"] = Module[\"asm\"][\"Relu\"]).apply(null, arguments);\n };\n var _Relu6 = Module[\"_Relu6\"] = function() {\n return (_Relu6 = Module[\"_Relu6\"] = Module[\"asm\"][\"Relu6\"]).apply(null, arguments);\n };\n var _ResizeBilinear = Module[\"_ResizeBilinear\"] = function() {\n return (_ResizeBilinear = Module[\"_ResizeBilinear\"] = Module[\"asm\"][\"ResizeBilinear\"]).apply(null, arguments);\n };\n var _ResizeNearestNeighbor = Module[\"_ResizeNearestNeighbor\"] = function() {\n return (_ResizeNearestNeighbor = Module[\"_ResizeNearestNeighbor\"] = Module[\"asm\"][\"ResizeNearestNeighbor\"]).apply(null, arguments);\n };\n var _Reverse = Module[\"_Reverse\"] = function() {\n return (_Reverse = Module[\"_Reverse\"] = Module[\"asm\"][\"Reverse\"]).apply(null, arguments);\n };\n var _RotateWithOffset = Module[\"_RotateWithOffset\"] = function() {\n return (_RotateWithOffset = Module[\"_RotateWithOffset\"] = Module[\"asm\"][\"RotateWithOffset\"]).apply(null, arguments);\n };\n var _Round = Module[\"_Round\"] = function() {\n return (_Round = Module[\"_Round\"] = Module[\"asm\"][\"Round\"]).apply(null, arguments);\n };\n var _Rsqrt = Module[\"_Rsqrt\"] = function() {\n return (_Rsqrt = Module[\"_Rsqrt\"] = Module[\"asm\"][\"Rsqrt\"]).apply(null, arguments);\n };\n var _ScatterNd = Module[\"_ScatterNd\"] = function() {\n return (_ScatterNd = Module[\"_ScatterNd\"] = Module[\"asm\"][\"ScatterNd\"]).apply(null, arguments);\n };\n var _SelectV2 = Module[\"_SelectV2\"] = function() {\n return (_SelectV2 = Module[\"_SelectV2\"] = Module[\"asm\"][\"SelectV2\"]).apply(null, arguments);\n };\n var _Sigmoid = Module[\"_Sigmoid\"] = function() {\n return (_Sigmoid = Module[\"_Sigmoid\"] = Module[\"asm\"][\"Sigmoid\"]).apply(null, arguments);\n };\n var _Sin = Module[\"_Sin\"] = function() {\n return (_Sin = Module[\"_Sin\"] = Module[\"asm\"][\"Sin\"]).apply(null, arguments);\n };\n var _Softmax = Module[\"_Softmax\"] = function() {\n return (_Softmax = Module[\"_Softmax\"] = Module[\"asm\"][\"Softmax\"]).apply(null, arguments);\n };\n var _SparseFillEmptyRows = Module[\"_SparseFillEmptyRows\"] = function() {\n return (_SparseFillEmptyRows = Module[\"_SparseFillEmptyRows\"] = Module[\"asm\"][\"SparseFillEmptyRows\"]).apply(null, arguments);\n };\n var _SparseReshape = Module[\"_SparseReshape\"] = function() {\n return (_SparseReshape = Module[\"_SparseReshape\"] = Module[\"asm\"][\"SparseReshape\"]).apply(null, arguments);\n };\n var _SparseSegmentReduction = Module[\"_SparseSegmentReduction\"] = function() {\n return (_SparseSegmentReduction = Module[\"_SparseSegmentReduction\"] = Module[\"asm\"][\"SparseSegmentReduction\"]).apply(null, arguments);\n };\n var _Sqrt = Module[\"_Sqrt\"] = function() {\n return (_Sqrt = Module[\"_Sqrt\"] = Module[\"asm\"][\"Sqrt\"]).apply(null, arguments);\n };\n var _Square = Module[\"_Square\"] = function() {\n return (_Square = Module[\"_Square\"] = Module[\"asm\"][\"Square\"]).apply(null, arguments);\n };\n var _SquaredDifference = Module[\"_SquaredDifference\"] = function() {\n return (_SquaredDifference = Module[\"_SquaredDifference\"] = Module[\"asm\"][\"SquaredDifference\"]).apply(null, arguments);\n };\n var _Step = Module[\"_Step\"] = function() {\n return (_Step = Module[\"_Step\"] = Module[\"asm\"][\"Step\"]).apply(null, arguments);\n };\n var _StridedSlice = Module[\"_StridedSlice\"] = function() {\n return (_StridedSlice = Module[\"_StridedSlice\"] = Module[\"asm\"][\"StridedSlice\"]).apply(null, arguments);\n };\n var _Sub = Module[\"_Sub\"] = function() {\n return (_Sub = Module[\"_Sub\"] = Module[\"asm\"][\"Sub\"]).apply(null, arguments);\n };\n var _Sum = Module[\"_Sum\"] = function() {\n return (_Sum = Module[\"_Sum\"] = Module[\"asm\"][\"Sum\"]).apply(null, arguments);\n };\n var _Tan = Module[\"_Tan\"] = function() {\n return (_Tan = Module[\"_Tan\"] = Module[\"asm\"][\"Tan\"]).apply(null, arguments);\n };\n var _Tanh = Module[\"_Tanh\"] = function() {\n return (_Tanh = Module[\"_Tanh\"] = Module[\"asm\"][\"Tanh\"]).apply(null, arguments);\n };\n var _Tile = Module[\"_Tile\"] = function() {\n return (_Tile = Module[\"_Tile\"] = Module[\"asm\"][\"Tile\"]).apply(null, arguments);\n };\n var _TopK = Module[\"_TopK\"] = function() {\n return (_TopK = Module[\"_TopK\"] = Module[\"asm\"][\"TopK\"]).apply(null, arguments);\n };\n var _Transform = Module[\"_Transform\"] = function() {\n return (_Transform = Module[\"_Transform\"] = Module[\"asm\"][\"Transform\"]).apply(null, arguments);\n };\n var _Transpose = Module[\"_Transpose\"] = function() {\n return (_Transpose = Module[\"_Transpose\"] = Module[\"asm\"][\"Transpose\"]).apply(null, arguments);\n };\n var __FusedMatMul = Module[\"__FusedMatMul\"] = function() {\n return (__FusedMatMul = Module[\"__FusedMatMul\"] = Module[\"asm\"][\"_FusedMatMul\"]).apply(null, arguments);\n };\n var _malloc = Module[\"_malloc\"] = function() {\n return (_malloc = Module[\"_malloc\"] = Module[\"asm\"][\"malloc\"]).apply(null, arguments);\n };\n var _free = Module[\"_free\"] = function() {\n return (_free = Module[\"_free\"] = Module[\"asm\"][\"free\"]).apply(null, arguments);\n };\n var ___errno_location = Module[\"___errno_location\"] = function() {\n return (___errno_location = Module[\"___errno_location\"] = Module[\"asm\"][\"__errno_location\"]).apply(null, arguments);\n };\n var _emscripten_main_thread_process_queued_calls = Module[\"_emscripten_main_thread_process_queued_calls\"] = function() {\n return (_emscripten_main_thread_process_queued_calls = Module[\"_emscripten_main_thread_process_queued_calls\"] = Module[\"asm\"][\"emscripten_main_thread_process_queued_calls\"]).apply(null, arguments);\n };\n var stackSave = Module[\"stackSave\"] = function() {\n return (stackSave = Module[\"stackSave\"] = Module[\"asm\"][\"stackSave\"]).apply(null, arguments);\n };\n var stackRestore = Module[\"stackRestore\"] = function() {\n return (stackRestore = Module[\"stackRestore\"] = Module[\"asm\"][\"stackRestore\"]).apply(null, arguments);\n };\n var stackAlloc = Module[\"stackAlloc\"] = function() {\n return (stackAlloc = Module[\"stackAlloc\"] = Module[\"asm\"][\"stackAlloc\"]).apply(null, arguments);\n };\n var dynCall_iijjiiii = Module[\"dynCall_iijjiiii\"] = function() {\n return (dynCall_iijjiiii = Module[\"dynCall_iijjiiii\"] = Module[\"asm\"][\"dynCall_iijjiiii\"]).apply(null, arguments);\n };\n var dynCall_jiji = Module[\"dynCall_jiji\"] = function() {\n return (dynCall_jiji = Module[\"dynCall_jiji\"] = Module[\"asm\"][\"dynCall_jiji\"]).apply(null, arguments);\n };\n Module[\"cwrap\"] = cwrap;\n var calledRun;\n function ExitStatus(status) {\n this.name = \"ExitStatus\";\n this.message = \"Program terminated with exit(\" + status + \")\";\n this.status = status;\n }\n dependenciesFulfilled = function runCaller() {\n if (!calledRun)\n run();\n if (!calledRun)\n dependenciesFulfilled = runCaller;\n };\n function run(args) {\n args = args || arguments_;\n if (runDependencies > 0) {\n return;\n }\n preRun();\n if (runDependencies > 0) {\n return;\n }\n function doRun() {\n if (calledRun)\n return;\n calledRun = true;\n Module[\"calledRun\"] = true;\n if (ABORT)\n return;\n initRuntime();\n readyPromiseResolve(Module);\n if (Module[\"onRuntimeInitialized\"])\n Module[\"onRuntimeInitialized\"]();\n postRun();\n }\n if (Module[\"setStatus\"]) {\n Module[\"setStatus\"](\"Running...\");\n setTimeout(function() {\n setTimeout(function() {\n Module[\"setStatus\"](\"\");\n }, 1);\n doRun();\n }, 1);\n } else {\n doRun();\n }\n }\n Module[\"run\"] = run;\n function procExit(code) {\n EXITSTATUS = code;\n if (!keepRuntimeAlive()) {\n if (Module[\"onExit\"])\n Module[\"onExit\"](code);\n ABORT = true;\n }\n quit_(code, new ExitStatus(code));\n }\n if (Module[\"preInit\"]) {\n if (typeof Module[\"preInit\"] == \"function\")\n Module[\"preInit\"] = [Module[\"preInit\"]];\n while (Module[\"preInit\"].length > 0) {\n Module[\"preInit\"].pop()();\n }\n }\n run();\n var listenersAdded;\n if (beforeListeners) {\n listenersAdded = { uncaughtException: process.listeners(\"uncaughtException\").filter(function(listener) {\n return !beforeListeners.uncaughtException.indexOf(listener) > -1;\n }), unhandledRejection: process.listeners(\"unhandledRejection\").filter(function(listener) {\n return !beforeListeners.unhandledRejection.indexOf(listener) > -1;\n }) };\n }\n var actualModule;\n if (typeof WasmBackendModule3 !== \"undefined\") {\n actualModule = WasmBackendModule3;\n } else if (typeof WasmBackendModuleThreadedSimd !== \"undefined\") {\n actualModule = WasmBackendModuleThreadedSimd;\n } else {\n throw new Error(\"Could not find wasm module in post.js\");\n }\n if (listenersAdded) {\n var tmpDispose = actualModule[\"_dispose\"];\n actualModule[\"_dispose\"] = function() {\n tmpDispose();\n listenersAdded.uncaughtException.forEach(function(listener) {\n process.removeListener(\"uncaughtException\", listener);\n });\n listenersAdded.unhandledRejection.forEach(function(listener) {\n process.removeListener(\"unhandledRejection\", listener);\n });\n };\n }\n return WasmBackendModule3.ready;\n };\n })();\n if (typeof exports === \"object\" && typeof module === \"object\")\n module.exports = WasmBackendModule2;\n else if (typeof define === \"function\" && define[\"amd\"])\n define([], function() {\n return WasmBackendModule2;\n });\n else if (typeof exports === \"object\")\n exports[\"WasmBackendModule\"] = WasmBackendModule2;\n }\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/backends/backend.js\nvar EPSILON_FLOAT32 = 1e-7;\nvar EPSILON_FLOAT16 = 1e-4;\nvar DataStorage = class {\n constructor(backend2, dataMover) {\n this.backend = backend2;\n this.dataMover = dataMover;\n this.data = /* @__PURE__ */ new WeakMap();\n this.dataIdsCount = 0;\n }\n get(dataId) {\n if (!this.data.has(dataId)) {\n this.dataMover.moveData(this.backend, dataId);\n }\n return this.data.get(dataId);\n }\n set(dataId, value) {\n this.dataIdsCount++;\n this.data.set(dataId, value);\n }\n has(dataId) {\n return this.data.has(dataId);\n }\n delete(dataId) {\n this.dataIdsCount--;\n return this.data.delete(dataId);\n }\n numDataIds() {\n return this.dataIdsCount;\n }\n};\nvar KernelBackend = class {\n refCount(dataId) {\n return notYetImplemented(\"refCount\");\n }\n incRef(dataId) {\n return notYetImplemented(\"incRef\");\n }\n timerAvailable() {\n return true;\n }\n time(f) {\n return notYetImplemented(\"time\");\n }\n read(dataId) {\n return notYetImplemented(\"read\");\n }\n readSync(dataId) {\n return notYetImplemented(\"readSync\");\n }\n readToGPU(dataId, options) {\n return notYetImplemented(\"readToGPU\");\n }\n numDataIds() {\n return notYetImplemented(\"numDataIds\");\n }\n disposeData(dataId, force) {\n return notYetImplemented(\"disposeData\");\n }\n write(values, shape, dtype) {\n return notYetImplemented(\"write\");\n }\n move(dataId, values, shape, dtype, refCount) {\n return notYetImplemented(\"move\");\n }\n memory() {\n return notYetImplemented(\"memory\");\n }\n floatPrecision() {\n return notYetImplemented(\"floatPrecision\");\n }\n epsilon() {\n return this.floatPrecision() === 32 ? EPSILON_FLOAT32 : EPSILON_FLOAT16;\n }\n dispose() {\n return notYetImplemented(\"dispose\");\n }\n};\nfunction notYetImplemented(kernelName) {\n throw new Error(`'${kernelName}' not yet implemented or not found in the registry. This kernel may not be supported by the tfjs backend you have chosen`);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/util_base.js\nfunction shuffle(array2) {\n let counter = array2.length;\n let index = 0;\n while (counter > 0) {\n index = Math.random() * counter | 0;\n counter--;\n swap(array2, counter, index);\n }\n}\nfunction shuffleCombo(array2, array22) {\n if (array2.length !== array22.length) {\n throw new Error(`Array sizes must match to be shuffled together First array length was ${array2.length}Second array length was ${array22.length}`);\n }\n let counter = array2.length;\n let index = 0;\n while (counter > 0) {\n index = Math.random() * counter | 0;\n counter--;\n swap(array2, counter, index);\n swap(array22, counter, index);\n }\n}\nfunction clamp(min7, x, max7) {\n return Math.max(min7, Math.min(x, max7));\n}\nfunction nearestLargerEven(val) {\n return val % 2 === 0 ? val : val + 1;\n}\nfunction swap(object, left, right) {\n const temp = object[left];\n object[left] = object[right];\n object[right] = temp;\n}\nfunction sum(arr) {\n let sum7 = 0;\n for (let i = 0; i < arr.length; i++) {\n sum7 += arr[i];\n }\n return sum7;\n}\nfunction randUniform(a, b) {\n const r = Math.random();\n return b * r + (1 - r) * a;\n}\nfunction distSquared(a, b) {\n let result = 0;\n for (let i = 0; i < a.length; i++) {\n const diff = Number(a[i]) - Number(b[i]);\n result += diff * diff;\n }\n return result;\n}\nfunction assert(expr, msg) {\n if (!expr) {\n throw new Error(typeof msg === \"string\" ? msg : msg());\n }\n}\nfunction assertShapesMatch(shapeA, shapeB, errorMessagePrefix = \"\") {\n assert(arraysEqual(shapeA, shapeB), () => errorMessagePrefix + ` Shapes ${shapeA} and ${shapeB} must match`);\n}\nfunction assertNonNull(a) {\n assert(a != null, () => `The input to the tensor constructor must be a non-null value.`);\n}\nfunction flatten(arr, result = [], skipTypedArray = false) {\n if (result == null) {\n result = [];\n }\n if (Array.isArray(arr) || isTypedArray(arr) && !skipTypedArray) {\n for (let i = 0; i < arr.length; ++i) {\n flatten(arr[i], result, skipTypedArray);\n }\n } else {\n result.push(arr);\n }\n return result;\n}\nfunction sizeFromShape(shape) {\n if (shape.length === 0) {\n return 1;\n }\n let size = shape[0];\n for (let i = 1; i < shape.length; i++) {\n size *= shape[i];\n }\n return size;\n}\nfunction isScalarShape(shape) {\n return shape.length === 0;\n}\nfunction arraysEqual(n1, n2) {\n if (n1 === n2) {\n return true;\n }\n if (n1 == null || n2 == null) {\n return false;\n }\n if (n1.length !== n2.length) {\n return false;\n }\n for (let i = 0; i < n1.length; i++) {\n if (n1[i] !== n2[i]) {\n return false;\n }\n }\n return true;\n}\nfunction isInt(a) {\n return a % 1 === 0;\n}\nfunction tanh(x) {\n if (Math.tanh != null) {\n return Math.tanh(x);\n }\n if (x === Infinity) {\n return 1;\n } else if (x === -Infinity) {\n return -1;\n } else {\n const e2x = Math.exp(2 * x);\n return (e2x - 1) / (e2x + 1);\n }\n}\nfunction sizeToSquarishShape(size) {\n const width = Math.ceil(Math.sqrt(size));\n return [width, Math.ceil(size / width)];\n}\nfunction createShuffledIndices(n) {\n const shuffledIndices = new Uint32Array(n);\n for (let i = 0; i < n; ++i) {\n shuffledIndices[i] = i;\n }\n shuffle(shuffledIndices);\n return shuffledIndices;\n}\nfunction rightPad(a, size) {\n if (size <= a.length) {\n return a;\n }\n return a + \" \".repeat(size - a.length);\n}\nfunction repeatedTry(checkFn, delayFn = (counter) => 0, maxCounter) {\n return new Promise((resolve, reject) => {\n let tryCount = 0;\n const tryFn = () => {\n if (checkFn()) {\n resolve();\n return;\n }\n tryCount++;\n const nextBackoff = delayFn(tryCount);\n if (maxCounter != null && tryCount >= maxCounter) {\n reject();\n return;\n }\n setTimeout(tryFn, nextBackoff);\n };\n tryFn();\n });\n}\nfunction inferFromImplicitShape(shape, size) {\n let shapeProd = 1;\n let implicitIdx = -1;\n for (let i = 0; i < shape.length; ++i) {\n if (shape[i] >= 0) {\n shapeProd *= shape[i];\n } else if (shape[i] === -1) {\n if (implicitIdx !== -1) {\n throw Error(`Shapes can only have 1 implicit size. Found -1 at dim ${implicitIdx} and dim ${i}`);\n }\n implicitIdx = i;\n } else if (shape[i] < 0) {\n throw Error(`Shapes can not be < 0. Found ${shape[i]} at dim ${i}`);\n }\n }\n if (implicitIdx === -1) {\n if (size > 0 && size !== shapeProd) {\n throw Error(`Size(${size}) must match the product of shape ${shape}`);\n }\n return shape;\n }\n if (shapeProd === 0) {\n throw Error(`Cannot infer the missing size in [${shape}] when there are 0 elements`);\n }\n if (size % shapeProd !== 0) {\n throw Error(`The implicit shape can't be a fractional number. Got ${size} / ${shapeProd}`);\n }\n const newShape = shape.slice();\n newShape[implicitIdx] = size / shapeProd;\n return newShape;\n}\nfunction parseAxisParam(axis, shape) {\n const rank = shape.length;\n axis = axis == null ? shape.map((s, i) => i) : [].concat(axis);\n assert(axis.every((ax) => ax >= -rank && ax < rank), () => `All values in axis param must be in range [-${rank}, ${rank}) but got axis ${axis}`);\n assert(axis.every((ax) => isInt(ax)), () => `All values in axis param must be integers but got axis ${axis}`);\n return axis.map((a) => a < 0 ? rank + a : a);\n}\nfunction squeezeShape(shape, axis) {\n const newShape = [];\n const keptDims = [];\n const isEmptyArray = axis != null && Array.isArray(axis) && axis.length === 0;\n const axes = axis == null || isEmptyArray ? null : parseAxisParam(axis, shape).sort();\n let j = 0;\n for (let i = 0; i < shape.length; ++i) {\n if (axes != null) {\n if (axes[j] === i && shape[i] !== 1) {\n throw new Error(`Can't squeeze axis ${i} since its dim '${shape[i]}' is not 1`);\n }\n if ((axes[j] == null || axes[j] > i) && shape[i] === 1) {\n newShape.push(shape[i]);\n keptDims.push(i);\n }\n if (axes[j] <= i) {\n j++;\n }\n }\n if (shape[i] !== 1) {\n newShape.push(shape[i]);\n keptDims.push(i);\n }\n }\n return { newShape, keptDims };\n}\nfunction getTypedArrayFromDType(dtype, size) {\n let values = null;\n if (dtype == null || dtype === \"float32\") {\n values = new Float32Array(size);\n } else if (dtype === \"int32\") {\n values = new Int32Array(size);\n } else if (dtype === \"bool\") {\n values = new Uint8Array(size);\n } else {\n throw new Error(`Unknown data type ${dtype}`);\n }\n return values;\n}\nfunction getArrayFromDType(dtype, size) {\n let values = null;\n if (dtype == null || dtype === \"float32\") {\n values = new Float32Array(size);\n } else if (dtype === \"int32\") {\n values = new Int32Array(size);\n } else if (dtype === \"bool\") {\n values = new Uint8Array(size);\n } else if (dtype === \"string\") {\n values = new Array(size);\n } else {\n throw new Error(`Unknown data type ${dtype}`);\n }\n return values;\n}\nfunction checkConversionForErrors(vals, dtype) {\n for (let i = 0; i < vals.length; i++) {\n const num = vals[i];\n if (isNaN(num) || !isFinite(num)) {\n throw Error(`A tensor of type ${dtype} being uploaded contains ${num}.`);\n }\n }\n}\nfunction isValidDtype(dtype) {\n return dtype === \"bool\" || dtype === \"complex64\" || dtype === \"float32\" || dtype === \"int32\" || dtype === \"string\";\n}\nfunction hasEncodingLoss(oldType, newType) {\n if (newType === \"complex64\") {\n return false;\n }\n if (newType === \"float32\" && oldType !== \"complex64\") {\n return false;\n }\n if (newType === \"int32\" && oldType !== \"float32\" && oldType !== \"complex64\") {\n return false;\n }\n if (newType === \"bool\" && oldType === \"bool\") {\n return false;\n }\n return true;\n}\nfunction isTypedArray(a) {\n return a instanceof Float32Array || a instanceof Int32Array || a instanceof Uint8Array || a instanceof Uint8ClampedArray;\n}\nfunction bytesPerElement(dtype) {\n if (dtype === \"float32\" || dtype === \"int32\") {\n return 4;\n } else if (dtype === \"complex64\") {\n return 8;\n } else if (dtype === \"bool\") {\n return 1;\n } else {\n throw new Error(`Unknown dtype ${dtype}`);\n }\n}\nfunction bytesFromStringArray(arr) {\n if (arr == null) {\n return 0;\n }\n let bytes = 0;\n arr.forEach((x) => bytes += x.length);\n return bytes;\n}\nfunction isString(value) {\n return typeof value === \"string\" || value instanceof String;\n}\nfunction isBoolean(value) {\n return typeof value === \"boolean\";\n}\nfunction isNumber(value) {\n return typeof value === \"number\";\n}\nfunction inferDtype(values) {\n if (Array.isArray(values)) {\n return inferDtype(values[0]);\n }\n if (values instanceof Float32Array) {\n return \"float32\";\n } else if (values instanceof Int32Array || values instanceof Uint8Array || values instanceof Uint8ClampedArray) {\n return \"int32\";\n } else if (isNumber(values)) {\n return \"float32\";\n } else if (isString(values)) {\n return \"string\";\n } else if (isBoolean(values)) {\n return \"bool\";\n }\n return \"float32\";\n}\nfunction isFunction(f) {\n return !!(f && f.constructor && f.call && f.apply);\n}\nfunction nearestDivisor(size, start) {\n for (let i = start; i < size; ++i) {\n if (size % i === 0) {\n return i;\n }\n }\n return size;\n}\nfunction computeStrides(shape) {\n const rank = shape.length;\n if (rank < 2) {\n return [];\n }\n const strides = new Array(rank - 1);\n strides[rank - 2] = shape[rank - 1];\n for (let i = rank - 3; i >= 0; --i) {\n strides[i] = strides[i + 1] * shape[i + 1];\n }\n return strides;\n}\nfunction createNestedArray(offset, shape, a, isComplex = false) {\n const ret = new Array();\n if (shape.length === 1) {\n const d = shape[0] * (isComplex ? 2 : 1);\n for (let i = 0; i < d; i++) {\n ret[i] = a[offset + i];\n }\n } else {\n const d = shape[0];\n const rest = shape.slice(1);\n const len = rest.reduce((acc, c) => acc * c) * (isComplex ? 2 : 1);\n for (let i = 0; i < d; i++) {\n ret[i] = createNestedArray(offset + i * len, rest, a, isComplex);\n }\n }\n return ret;\n}\nfunction toNestedArray(shape, a, isComplex = false) {\n if (shape.length === 0) {\n return a[0];\n }\n const size = shape.reduce((acc, c) => acc * c) * (isComplex ? 2 : 1);\n if (size === 0) {\n return [];\n }\n if (size !== a.length) {\n throw new Error(`[${shape}] does not match the input size ${a.length}${isComplex ? \" for a complex tensor\" : \"\"}.`);\n }\n return createNestedArray(0, shape, a, isComplex);\n}\nfunction makeOnesTypedArray(size, dtype) {\n const array2 = makeZerosTypedArray(size, dtype);\n for (let i = 0; i < array2.length; i++) {\n array2[i] = 1;\n }\n return array2;\n}\nfunction makeZerosTypedArray(size, dtype) {\n if (dtype == null || dtype === \"float32\" || dtype === \"complex64\") {\n return new Float32Array(size);\n } else if (dtype === \"int32\") {\n return new Int32Array(size);\n } else if (dtype === \"bool\") {\n return new Uint8Array(size);\n } else {\n throw new Error(`Unknown data type ${dtype}`);\n }\n}\nfunction makeZerosNestedTypedArray(shape, dtype) {\n const size = shape.reduce((prev, curr) => prev * curr, 1);\n if (dtype == null || dtype === \"float32\") {\n return toNestedArray(shape, new Float32Array(size));\n } else if (dtype === \"int32\") {\n return toNestedArray(shape, new Int32Array(size));\n } else if (dtype === \"bool\") {\n return toNestedArray(shape, new Uint8Array(size));\n } else {\n throw new Error(`Unknown data type ${dtype}`);\n }\n}\nfunction assertNonNegativeIntegerDimensions(shape) {\n shape.forEach((dimSize) => {\n assert(Number.isInteger(dimSize) && dimSize >= 0, () => `Tensor must have a shape comprised of positive integers but got shape [${shape}].`);\n });\n}\nfunction locToIndex(locs, rank, strides) {\n if (rank === 0) {\n return 0;\n } else if (rank === 1) {\n return locs[0];\n }\n let index = locs[locs.length - 1];\n for (let i = 0; i < locs.length - 1; ++i) {\n index += strides[i] * locs[i];\n }\n return index;\n}\nfunction indexToLoc(index, rank, strides) {\n if (rank === 0) {\n return [];\n } else if (rank === 1) {\n return [index];\n }\n const locs = new Array(rank);\n for (let i = 0; i < locs.length - 1; ++i) {\n locs[i] = Math.floor(index / strides[i]);\n index -= locs[i] * strides[i];\n }\n locs[locs.length - 1] = index;\n return locs;\n}\nfunction isPromise(object) {\n return object && object.then && typeof object.then === \"function\";\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/environment.js\nvar TENSORFLOWJS_FLAGS_PREFIX = \"tfjsflags\";\nvar Environment = class {\n constructor(global2) {\n this.global = global2;\n this.flags = {};\n this.flagRegistry = {};\n this.urlFlags = {};\n this.getQueryParams = getQueryParams;\n this.populateURLFlags();\n }\n setPlatform(platformName, platform) {\n if (this.platform != null) {\n if (!(env().getBool(\"IS_TEST\") || env().getBool(\"PROD\"))) {\n console.warn(`Platform ${this.platformName} has already been set. Overwriting the platform with ${platformName}.`);\n }\n }\n this.platformName = platformName;\n this.platform = platform;\n }\n registerFlag(flagName, evaluationFn, setHook) {\n this.flagRegistry[flagName] = { evaluationFn, setHook };\n if (this.urlFlags[flagName] != null) {\n const flagValue = this.urlFlags[flagName];\n if (!(env().getBool(\"IS_TEST\") || env().getBool(\"PROD\"))) {\n console.warn(`Setting feature override from URL ${flagName}: ${flagValue}.`);\n }\n this.set(flagName, flagValue);\n }\n }\n async getAsync(flagName) {\n if (flagName in this.flags) {\n return this.flags[flagName];\n }\n this.flags[flagName] = await this.evaluateFlag(flagName);\n return this.flags[flagName];\n }\n get(flagName) {\n if (flagName in this.flags) {\n return this.flags[flagName];\n }\n const flagValue = this.evaluateFlag(flagName);\n if (isPromise(flagValue)) {\n throw new Error(`Flag ${flagName} cannot be synchronously evaluated. Please use getAsync() instead.`);\n }\n this.flags[flagName] = flagValue;\n return this.flags[flagName];\n }\n getNumber(flagName) {\n return this.get(flagName);\n }\n getBool(flagName) {\n return this.get(flagName);\n }\n getFlags() {\n return this.flags;\n }\n get features() {\n return this.flags;\n }\n set(flagName, value) {\n if (this.flagRegistry[flagName] == null) {\n throw new Error(`Cannot set flag ${flagName} as it has not been registered.`);\n }\n this.flags[flagName] = value;\n if (this.flagRegistry[flagName].setHook != null) {\n this.flagRegistry[flagName].setHook(value);\n }\n }\n evaluateFlag(flagName) {\n if (this.flagRegistry[flagName] == null) {\n throw new Error(`Cannot evaluate flag '${flagName}': no evaluation function found.`);\n }\n return this.flagRegistry[flagName].evaluationFn();\n }\n setFlags(flags) {\n this.flags = Object.assign({}, flags);\n }\n reset() {\n this.flags = {};\n this.urlFlags = {};\n this.populateURLFlags();\n }\n populateURLFlags() {\n if (typeof this.global === \"undefined\" || typeof this.global.location === \"undefined\" || typeof this.global.location.search === \"undefined\") {\n return;\n }\n const urlParams = this.getQueryParams(this.global.location.search);\n if (TENSORFLOWJS_FLAGS_PREFIX in urlParams) {\n const keyValues = urlParams[TENSORFLOWJS_FLAGS_PREFIX].split(\",\");\n keyValues.forEach((keyValue) => {\n const [key, value] = keyValue.split(\":\");\n this.urlFlags[key] = parseValue(key, value);\n });\n }\n }\n};\nfunction getQueryParams(queryString) {\n const params = {};\n queryString.replace(/[?&]([^=?&]+)(?:=([^&]*))?/g, (s, ...t) => {\n decodeParam(params, t[0], t[1]);\n return t.join(\"=\");\n });\n return params;\n}\nfunction decodeParam(params, name, value) {\n params[decodeURIComponent(name)] = decodeURIComponent(value || \"\");\n}\nfunction parseValue(flagName, value) {\n value = value.toLowerCase();\n if (value === \"true\" || value === \"false\") {\n return value === \"true\";\n } else if (`${+value}` === value) {\n return +value;\n }\n throw new Error(`Could not parse value flag value ${value} for flag ${flagName}.`);\n}\nfunction env() {\n return ENV;\n}\nvar ENV = null;\nfunction setEnvironmentGlobal(environment) {\n ENV = environment;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/global_util.js\nvar globalNameSpace;\nfunction getGlobalNamespace() {\n if (globalNameSpace == null) {\n let ns;\n if (typeof window !== \"undefined\") {\n ns = window;\n } else if (typeof global !== \"undefined\") {\n ns = global;\n } else if (typeof process !== \"undefined\") {\n ns = process;\n } else if (typeof self !== \"undefined\") {\n ns = self;\n } else {\n throw new Error(\"Could not find a global object\");\n }\n globalNameSpace = ns;\n }\n return globalNameSpace;\n}\nfunction getGlobalMap() {\n const ns = getGlobalNamespace();\n if (ns._tfGlobals == null) {\n ns._tfGlobals = /* @__PURE__ */ new Map();\n }\n return ns._tfGlobals;\n}\nfunction getGlobal(key, init2) {\n const globalMap = getGlobalMap();\n if (globalMap.has(key)) {\n return globalMap.get(key);\n } else {\n const singleton = init2();\n globalMap.set(key, singleton);\n return globalMap.get(key);\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/kernel_names.js\nvar Abs = \"Abs\";\nvar Acos = \"Acos\";\nvar Acosh = \"Acosh\";\nvar Add = \"Add\";\nvar AddN = \"AddN\";\nvar All = \"All\";\nvar Any = \"Any\";\nvar ArgMax = \"ArgMax\";\nvar ArgMin = \"ArgMin\";\nvar Asin = \"Asin\";\nvar Asinh = \"Asinh\";\nvar Atan = \"Atan\";\nvar Atanh = \"Atanh\";\nvar Atan2 = \"Atan2\";\nvar AvgPool = \"AvgPool\";\nvar AvgPoolGrad = \"AvgPoolGrad\";\nvar AvgPool3D = \"AvgPool3D\";\nvar AvgPool3DGrad = \"AvgPool3DGrad\";\nvar BatchMatMul = \"BatchMatMul\";\nvar BatchToSpaceND = \"BatchToSpaceND\";\nvar Bincount = \"Bincount\";\nvar BroadcastTo = \"BroadcastTo\";\nvar BroadcastArgs = \"BroadcastArgs\";\nvar Cast = \"Cast\";\nvar Ceil = \"Ceil\";\nvar ClipByValue = \"ClipByValue\";\nvar Complex = \"Complex\";\nvar ComplexAbs = \"ComplexAbs\";\nvar Concat = \"Concat\";\nvar Conv2D = \"Conv2D\";\nvar Conv2DBackpropFilter = \"Conv2DBackpropFilter\";\nvar Conv2DBackpropInput = \"Conv2DBackpropInput\";\nvar Conv3D = \"Conv3D\";\nvar Conv3DBackpropFilterV2 = \"Conv3DBackpropFilterV2\";\nvar Conv3DBackpropInputV2 = \"Conv3DBackpropInputV2\";\nvar Cos = \"Cos\";\nvar Cosh = \"Cosh\";\nvar Cumprod = \"Cumprod\";\nvar Cumsum = \"Cumsum\";\nvar CropAndResize = \"CropAndResize\";\nvar DenseBincount = \"DenseBincount\";\nvar DepthToSpace = \"DepthToSpace\";\nvar DepthwiseConv2dNative = \"DepthwiseConv2dNative\";\nvar DepthwiseConv2dNativeBackpropFilter = \"DepthwiseConv2dNativeBackpropFilter\";\nvar DepthwiseConv2dNativeBackpropInput = \"DepthwiseConv2dNativeBackpropInput\";\nvar Diag = \"Diag\";\nvar Dilation2D = \"Dilation2D\";\nvar Dilation2DBackpropInput = \"Dilation2DBackpropInput\";\nvar Dilation2DBackpropFilter = \"Dilation2DBackpropFilter\";\nvar RealDiv = \"RealDiv\";\nvar Einsum = \"Einsum\";\nvar Elu = \"Elu\";\nvar EluGrad = \"EluGrad\";\nvar Erf = \"Erf\";\nvar Equal = \"Equal\";\nvar Exp = \"Exp\";\nvar ExpandDims = \"ExpandDims\";\nvar Expm1 = \"Expm1\";\nvar FFT = \"FFT\";\nvar Fill = \"Fill\";\nvar FlipLeftRight = \"FlipLeftRight\";\nvar Floor = \"Floor\";\nvar FloorDiv = \"FloorDiv\";\nvar FusedBatchNorm = \"FusedBatchNorm\";\nvar GatherV2 = \"GatherV2\";\nvar GatherNd = \"GatherNd\";\nvar Greater = \"Greater\";\nvar GreaterEqual = \"GreaterEqual\";\nvar Identity = \"Identity\";\nvar IFFT = \"IFFT\";\nvar Imag = \"Imag\";\nvar IsFinite = \"IsFinite\";\nvar IsInf = \"IsInf\";\nvar IsNan = \"IsNan\";\nvar LeakyRelu = \"LeakyRelu\";\nvar Less = \"Less\";\nvar LessEqual = \"LessEqual\";\nvar LinSpace = \"LinSpace\";\nvar Log = \"Log\";\nvar Log1p = \"Log1p\";\nvar LogicalAnd = \"LogicalAnd\";\nvar LogicalNot = \"LogicalNot\";\nvar LogicalOr = \"LogicalOr\";\nvar LogicalXor = \"LogicalXor\";\nvar LogSoftmax = \"LogSoftmax\";\nvar LowerBound = \"LowerBound\";\nvar LRN = \"LRN\";\nvar LRNGrad = \"LRNGrad\";\nvar Max = \"Max\";\nvar Maximum = \"Maximum\";\nvar MaxPool = \"MaxPool\";\nvar MaxPoolGrad = \"MaxPoolGrad\";\nvar MaxPool3D = \"MaxPool3D\";\nvar MaxPool3DGrad = \"MaxPool3DGrad\";\nvar MaxPoolWithArgmax = \"MaxPoolWithArgmax\";\nvar Mean = \"Mean\";\nvar Min = \"Min\";\nvar Minimum = \"Minimum\";\nvar MirrorPad = \"MirrorPad\";\nvar Mod = \"Mod\";\nvar Multinomial = \"Multinomial\";\nvar Multiply = \"Multiply\";\nvar Neg = \"Neg\";\nvar NotEqual = \"NotEqual\";\nvar NonMaxSuppressionV3 = \"NonMaxSuppressionV3\";\nvar NonMaxSuppressionV4 = \"NonMaxSuppressionV4\";\nvar NonMaxSuppressionV5 = \"NonMaxSuppressionV5\";\nvar OnesLike = \"OnesLike\";\nvar OneHot = \"OneHot\";\nvar Pack = \"Pack\";\nvar PadV2 = \"PadV2\";\nvar Pool = \"Pool\";\nvar Pow = \"Pow\";\nvar Prelu = \"Prelu\";\nvar Prod = \"Prod\";\nvar RaggedTensorToTensor = \"RaggedTensorToTensor\";\nvar Range = \"Range\";\nvar Real = \"Real\";\nvar Reciprocal = \"Reciprocal\";\nvar Relu = \"Relu\";\nvar Reshape = \"Reshape\";\nvar ResizeNearestNeighbor = \"ResizeNearestNeighbor\";\nvar ResizeNearestNeighborGrad = \"ResizeNearestNeighborGrad\";\nvar ResizeBilinear = \"ResizeBilinear\";\nvar ResizeBilinearGrad = \"ResizeBilinearGrad\";\nvar Relu6 = \"Relu6\";\nvar Reverse = \"Reverse\";\nvar Round = \"Round\";\nvar Rsqrt = \"Rsqrt\";\nvar ScatterNd = \"ScatterNd\";\nvar SearchSorted = \"SearchSorted\";\nvar Select = \"Select\";\nvar Selu = \"Selu\";\nvar Slice = \"Slice\";\nvar Sin = \"Sin\";\nvar Sinh = \"Sinh\";\nvar Sign = \"Sign\";\nvar Sigmoid = \"Sigmoid\";\nvar Softplus = \"Softplus\";\nvar Sqrt = \"Sqrt\";\nvar Sum = \"Sum\";\nvar SpaceToBatchND = \"SpaceToBatchND\";\nvar SplitV = \"SplitV\";\nvar Softmax = \"Softmax\";\nvar SparseFillEmptyRows = \"SparseFillEmptyRows\";\nvar SparseReshape = \"SparseReshape\";\nvar SparseSegmentMean = \"SparseSegmentMean\";\nvar SparseSegmentSum = \"SparseSegmentSum\";\nvar SparseToDense = \"SparseToDense\";\nvar SquaredDifference = \"SquaredDifference\";\nvar Square = \"Square\";\nvar StridedSlice = \"StridedSlice\";\nvar StringNGrams = \"StringNGrams\";\nvar StringSplit = \"StringSplit\";\nvar StringToHashBucketFast = \"StringToHashBucketFast\";\nvar Sub = \"Sub\";\nvar Tan = \"Tan\";\nvar Tanh = \"Tanh\";\nvar Tile = \"Tile\";\nvar TopK = \"TopK\";\nvar Transform = \"Transform\";\nvar Transpose = \"Transpose\";\nvar Unique = \"Unique\";\nvar Unpack = \"Unpack\";\nvar UnsortedSegmentSum = \"UnsortedSegmentSum\";\nvar UpperBound = \"UpperBound\";\nvar ZerosLike = \"ZerosLike\";\nvar Step = \"Step\";\nvar FromPixels = \"FromPixels\";\nvar RotateWithOffset = \"RotateWithOffset\";\nvar _FusedMatMul = \"_FusedMatMul\";\nvar FusedConv2D = \"FusedConv2D\";\nvar FusedDepthwiseConv2D = \"FusedDepthwiseConv2D\";\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/log.js\nfunction warn(...msg) {\n if (!(env().getBool(\"IS_TEST\") || env().getBool(\"PROD\"))) {\n console.warn(...msg);\n }\n}\nfunction log(...msg) {\n if (!(env().getBool(\"IS_TEST\") || env().getBool(\"PROD\"))) {\n console.log(...msg);\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/kernel_registry.js\nvar kernelRegistry = getGlobal(\"kernelRegistry\", () => /* @__PURE__ */ new Map());\nvar gradRegistry = getGlobal(\"gradRegistry\", () => /* @__PURE__ */ new Map());\nfunction getKernel(kernelName, backendName) {\n const key = makeKey(kernelName, backendName);\n return kernelRegistry.get(key);\n}\nfunction getGradient(kernelName) {\n return gradRegistry.get(kernelName);\n}\nfunction getKernelsForBackend(backendName) {\n const it = kernelRegistry.entries();\n const result = [];\n while (true) {\n const { done, value } = it.next();\n if (done) {\n break;\n }\n const [key, config] = value;\n const [backend2] = key.split(\"_\");\n if (backend2 === backendName) {\n result.push(config);\n }\n }\n return result;\n}\nfunction registerKernel(config) {\n const { kernelName, backendName } = config;\n const key = makeKey(kernelName, backendName);\n if (kernelRegistry.has(key)) {\n warn(`The kernel '${kernelName}' for backend '${backendName}' is already registered`);\n }\n kernelRegistry.set(key, config);\n}\nfunction registerGradient(config) {\n const { kernelName } = config;\n if (gradRegistry.has(kernelName)) {\n if (env().getBool(\"DEBUG\")) {\n warn(`Overriding the gradient for '${kernelName}'`);\n }\n }\n gradRegistry.set(kernelName, config);\n}\nfunction unregisterKernel(kernelName, backendName) {\n const key = makeKey(kernelName, backendName);\n if (!kernelRegistry.has(key)) {\n throw new Error(`The kernel '${kernelName}' for backend '${backendName}' is not registered`);\n }\n kernelRegistry.delete(key);\n}\nfunction unregisterGradient(kernelName) {\n if (!gradRegistry.has(kernelName)) {\n throw new Error(`The gradient '${kernelName}' for backend is not registered`);\n }\n gradRegistry.delete(kernelName);\n}\nfunction copyRegisteredKernels(registeredBackendName, newBackendName) {\n const kernels = getKernelsForBackend(registeredBackendName);\n kernels.forEach((kernelConfig) => {\n const newKernelConfig = Object.assign({}, kernelConfig, { backendName: newBackendName });\n registerKernel(newKernelConfig);\n });\n}\nfunction makeKey(kernelName, backendName) {\n return `${backendName}_${kernelName}`;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/util.js\nvar util_exports = {};\n__export(util_exports, {\n arraysEqual: () => arraysEqual,\n assert: () => assert,\n assertNonNegativeIntegerDimensions: () => assertNonNegativeIntegerDimensions,\n assertNonNull: () => assertNonNull,\n assertShapesMatch: () => assertShapesMatch,\n bytesFromStringArray: () => bytesFromStringArray,\n bytesPerElement: () => bytesPerElement,\n checkConversionForErrors: () => checkConversionForErrors,\n clamp: () => clamp,\n computeStrides: () => computeStrides,\n createScalarValue: () => createScalarValue,\n createShuffledIndices: () => createShuffledIndices,\n decodeString: () => decodeString,\n distSquared: () => distSquared,\n encodeString: () => encodeString,\n fetch: () => fetch3,\n fingerPrint64: () => fingerPrint64,\n flatten: () => flatten,\n getArrayFromDType: () => getArrayFromDType,\n getTypedArrayFromDType: () => getTypedArrayFromDType,\n hasEncodingLoss: () => hasEncodingLoss,\n hexToLong: () => hexToLong,\n indexToLoc: () => indexToLoc,\n inferDtype: () => inferDtype,\n inferFromImplicitShape: () => inferFromImplicitShape,\n isBoolean: () => isBoolean,\n isFunction: () => isFunction,\n isInt: () => isInt,\n isNumber: () => isNumber,\n isPromise: () => isPromise,\n isScalarShape: () => isScalarShape,\n isString: () => isString,\n isTypedArray: () => isTypedArray,\n isValidDtype: () => isValidDtype,\n locToIndex: () => locToIndex,\n makeOnesTypedArray: () => makeOnesTypedArray,\n makeZerosNestedTypedArray: () => makeZerosNestedTypedArray,\n makeZerosTypedArray: () => makeZerosTypedArray,\n nearestDivisor: () => nearestDivisor,\n nearestLargerEven: () => nearestLargerEven,\n now: () => now,\n parseAxisParam: () => parseAxisParam,\n randUniform: () => randUniform,\n repeatedTry: () => repeatedTry,\n rightPad: () => rightPad,\n shuffle: () => shuffle,\n shuffleCombo: () => shuffleCombo,\n sizeFromShape: () => sizeFromShape,\n sizeToSquarishShape: () => sizeToSquarishShape,\n squeezeShape: () => squeezeShape,\n sum: () => sum,\n swap: () => swap,\n tanh: () => tanh,\n toNestedArray: () => toNestedArray,\n toTypedArray: () => toTypedArray\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/hash_util.js\nvar LongExports = __toESM(require_long());\nvar Long = LongExports.default || LongExports;\nfunction hexToLong(hex) {\n return Long.fromString(hex, true, 16);\n}\nvar k0 = hexToLong(\"c3a5c85c97cb3127\");\nvar k1 = hexToLong(\"b492b66fbe98f273\");\nvar k2 = hexToLong(\"9ae16a3b2f90404f\");\nfunction shiftMix(val) {\n return val.xor(val.shru(47));\n}\nfunction fetch2(s, offset, numBytes) {\n const bytes = s.slice(offset, offset + numBytes);\n return Long.fromBytes(Array.from(bytes), true, true);\n}\nfunction fetch64(s, offset) {\n return fetch2(s, offset, 8);\n}\nfunction fetch32(s, offset) {\n return fetch2(s, offset, 4);\n}\nfunction rotate64(val, shift) {\n return shift === 0 ? val : val.shru(shift).or(val.shl(64 - shift));\n}\nfunction hashLen16(u, v, mul2 = hexToLong(\"9ddfea08eb382d69\")) {\n let a = u.xor(v).mul(mul2);\n a = a.xor(a.shru(47));\n let b = v.xor(a).mul(mul2);\n b = b.xor(b.shru(47));\n b = b.mul(mul2);\n return b;\n}\nfunction weakHashLen32WithSeeds(w, x, y, z, a, b) {\n a = a.add(w);\n b = rotate64(b.add(a).add(z), 21);\n const c = a;\n a = a.add(x);\n a = a.add(y);\n b = b.add(rotate64(a, 44));\n return [a.add(z), b.add(c)];\n}\nfunction weakHashLen32WithSeedsStr(s, offset, a, b) {\n return weakHashLen32WithSeeds(fetch64(s, offset), fetch64(s, offset + 8), fetch64(s, offset + 16), fetch64(s, offset + 24), a, b);\n}\nfunction hashLen0to16(s, len = s.length) {\n if (len >= 8) {\n const mul2 = k2.add(len * 2);\n const a = fetch64(s, 0).add(k2);\n const b = fetch64(s, len - 8);\n const c = rotate64(b, 37).mul(mul2).add(a);\n const d = rotate64(a, 25).add(b).mul(mul2);\n return hashLen16(c, d, mul2);\n }\n if (len >= 4) {\n const mul2 = k2.add(len * 2);\n const a = fetch32(s, 0);\n return hashLen16(a.shl(3).add(len), fetch32(s, len - 4), mul2);\n }\n if (len > 0) {\n const a = s[0];\n const b = s[len >> 1];\n const c = s[len - 1];\n const y = a + (b << 8);\n const z = len + (c << 2);\n return shiftMix(k2.mul(y).xor(k0.mul(z))).mul(k2);\n }\n return k2;\n}\nfunction hashLen17to32(s, len = s.length) {\n const mul2 = k2.add(len * 2);\n const a = fetch64(s, 0).mul(k1);\n const b = fetch64(s, 8);\n const c = fetch64(s, len - 8).mul(mul2);\n const d = fetch64(s, len - 16).mul(k2);\n return hashLen16(rotate64(a.add(b), 43).add(rotate64(c, 30)).add(d), a.add(rotate64(b.add(k2), 18)).add(c), mul2);\n}\nfunction hashLen33to64(s, len = s.length) {\n const mul2 = k2.add(len * 2);\n const a = fetch64(s, 0).mul(k2);\n const b = fetch64(s, 8);\n const c = fetch64(s, len - 8).mul(mul2);\n const d = fetch64(s, len - 16).mul(k2);\n const y = rotate64(a.add(b), 43).add(rotate64(c, 30)).add(d);\n const z = hashLen16(y, a.add(rotate64(b.add(k2), 18)).add(c), mul2);\n const e = fetch64(s, 16).mul(mul2);\n const f = fetch64(s, 24);\n const g = y.add(fetch64(s, len - 32)).mul(mul2);\n const h = z.add(fetch64(s, len - 24)).mul(mul2);\n return hashLen16(rotate64(e.add(f), 43).add(rotate64(g, 30)).add(h), e.add(rotate64(f.add(a), 18)).add(g), mul2);\n}\nfunction fingerPrint64(s, len = s.length) {\n const seed = Long.fromNumber(81, true);\n if (len <= 32) {\n if (len <= 16) {\n return hashLen0to16(s, len);\n } else {\n return hashLen17to32(s, len);\n }\n } else if (len <= 64) {\n return hashLen33to64(s, len);\n }\n let x = seed;\n let y = seed.mul(k1).add(113);\n let z = shiftMix(y.mul(k2).add(113)).mul(k2);\n let v = [Long.UZERO, Long.UZERO];\n let w = [Long.UZERO, Long.UZERO];\n x = x.mul(k2).add(fetch64(s, 0));\n let offset = 0;\n const end = (len - 1 >> 6) * 64;\n const last64 = end + (len - 1 & 63) - 63;\n do {\n x = rotate64(x.add(y).add(v[0]).add(fetch64(s, offset + 8)), 37).mul(k1);\n y = rotate64(y.add(v[1]).add(fetch64(s, offset + 48)), 42).mul(k1);\n x = x.xor(w[1]);\n y = y.add(v[0]).add(fetch64(s, offset + 40));\n z = rotate64(z.add(w[0]), 33).mul(k1);\n v = weakHashLen32WithSeedsStr(s, offset, v[1].mul(k1), x.add(w[0]));\n w = weakHashLen32WithSeedsStr(s, offset + 32, z.add(w[1]), y.add(fetch64(s, offset + 16)));\n [z, x] = [x, z];\n offset += 64;\n } while (offset !== end);\n const mul2 = k1.add(z.and(255).shl(1));\n offset = last64;\n w[0] = w[0].add(len - 1 & 63);\n v[0] = v[0].add(w[0]);\n w[0] = w[0].add(v[0]);\n x = rotate64(x.add(y).add(v[0]).add(fetch64(s, offset + 8)), 37).mul(mul2);\n y = rotate64(y.add(v[1]).add(fetch64(s, offset + 48)), 42).mul(mul2);\n x = x.xor(w[1].mul(9));\n y = y.add(v[0].mul(9).add(fetch64(s, offset + 40)));\n z = rotate64(z.add(w[0]), 33).mul(mul2);\n v = weakHashLen32WithSeedsStr(s, offset, v[1].mul(mul2), x.add(w[0]));\n w = weakHashLen32WithSeedsStr(s, offset + 32, z.add(w[1]), y.add(fetch64(s, offset + 16)));\n [z, x] = [x, z];\n return hashLen16(hashLen16(v[0], w[0], mul2).add(shiftMix(y).mul(k0)).add(z), hashLen16(v[1], w[1], mul2).add(x), mul2);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/util.js\nfunction createScalarValue(value, dtype) {\n if (dtype === \"string\") {\n return encodeString(value);\n }\n return toTypedArray([value], dtype);\n}\nfunction noConversionNeeded(a, dtype) {\n return a instanceof Float32Array && dtype === \"float32\" || a instanceof Int32Array && dtype === \"int32\" || a instanceof Uint8Array && dtype === \"bool\";\n}\nfunction toTypedArray(a, dtype) {\n if (dtype === \"string\") {\n throw new Error(\"Cannot convert a string[] to a TypedArray\");\n }\n if (Array.isArray(a)) {\n a = flatten(a);\n }\n if (env().getBool(\"DEBUG\")) {\n checkConversionForErrors(a, dtype);\n }\n if (noConversionNeeded(a, dtype)) {\n return a;\n }\n if (dtype == null || dtype === \"float32\" || dtype === \"complex64\") {\n return new Float32Array(a);\n } else if (dtype === \"int32\") {\n return new Int32Array(a);\n } else if (dtype === \"bool\") {\n const bool = new Uint8Array(a.length);\n for (let i = 0; i < bool.length; ++i) {\n if (Math.round(a[i]) !== 0) {\n bool[i] = 1;\n }\n }\n return bool;\n } else {\n throw new Error(`Unknown data type ${dtype}`);\n }\n}\nfunction now() {\n return env().platform.now();\n}\nfunction fetch3(path, requestInits) {\n return env().platform.fetch(path, requestInits);\n}\nfunction encodeString(s, encoding = \"utf-8\") {\n encoding = encoding || \"utf-8\";\n return env().platform.encode(s, encoding);\n}\nfunction decodeString(bytes, encoding = \"utf-8\") {\n encoding = encoding || \"utf-8\";\n return env().platform.decode(bytes, encoding);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/profiler.js\nvar Profiler = class {\n constructor(backendTimer, logger) {\n this.backendTimer = backendTimer;\n this.logger = logger;\n if (logger == null) {\n this.logger = new Logger();\n }\n }\n profileKernel(kernelName, inputs, f) {\n let outputs;\n const holdResultWrapperFn = () => {\n outputs = f();\n };\n let timer;\n const start = now();\n if (this.backendTimer.timerAvailable()) {\n timer = this.backendTimer.time(holdResultWrapperFn);\n } else {\n holdResultWrapperFn();\n for (const output of outputs) {\n output.dataSync();\n }\n timer = Promise.resolve({ kernelMs: now() - start });\n }\n if (env().getBool(\"CHECK_COMPUTATION_FOR_ERRORS\")) {\n for (let i = 0; i < outputs.length; i++) {\n const output = outputs[i];\n output.data().then((tensorVals) => {\n checkComputationForErrors(tensorVals, output.dtype, kernelName);\n });\n }\n }\n const kernelProfile = {\n kernelName,\n outputs,\n inputs,\n timeMs: timer.then((timing) => timing.kernelMs),\n extraInfo: timer.then((timing) => timing.getExtraProfileInfo != null ? timing.getExtraProfileInfo() : \"\")\n };\n return kernelProfile;\n }\n logKernelProfile(kernelProfile) {\n const { kernelName, outputs, timeMs, inputs, extraInfo } = kernelProfile;\n outputs.forEach((result) => {\n Promise.all([result.data(), timeMs, extraInfo]).then((valueContainer) => {\n this.logger.logKernelProfile(kernelName, result, valueContainer[0], valueContainer[1], inputs, valueContainer[2]);\n });\n });\n }\n};\nfunction checkComputationForErrors(vals, dtype, kernelName) {\n if (dtype !== \"float32\") {\n return false;\n }\n for (let i = 0; i < vals.length; i++) {\n const num = vals[i];\n if (isNaN(num) || !isFinite(num)) {\n console.warn(`Found ${num} in the result of '${kernelName}'`);\n return true;\n }\n }\n return false;\n}\nvar Logger = class {\n logKernelProfile(name, result, vals, timeMs, inputs, extraInfo) {\n const time2 = typeof timeMs === \"number\" ? rightPad(`${timeMs}ms`, 9) : timeMs[\"error\"];\n const paddedName = rightPad(name, 25);\n const rank = result.rank;\n const size = result.size;\n const shape = rightPad(result.shape.toString(), 14);\n let inputShapesDescription = \"\";\n for (const name2 in inputs) {\n const input2 = inputs[name2];\n if (input2 != null) {\n const inputShape = input2.shape || result.shape;\n const inputRank = inputShape.length;\n inputShapesDescription += `${name2}: ${inputRank}D ${inputRank > 0 ? inputShape : \"\"} `;\n }\n }\n console.log(`%c${paddedName}\t%c${time2}\t%c${rank}D ${shape}\t%c${size}\t%c${inputShapesDescription}\t%c${extraInfo}`, \"font-weight:bold\", \"color:red\", \"color:blue\", \"color: orange\", \"color: green\", \"color: steelblue\");\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/tape.js\nfunction getFilteredNodesXToY(tape, xs, y) {\n const tensorsFromX = {};\n const nodesFromX = {};\n for (let i = 0; i < xs.length; i++) {\n tensorsFromX[xs[i].id] = true;\n }\n for (let i = 0; i < tape.length; i++) {\n const node = tape[i];\n const nodeInputs = node.inputs;\n for (const inputName in nodeInputs) {\n const input2 = nodeInputs[inputName];\n let anyInputFromX = false;\n for (let j = 0; j < xs.length; j++) {\n if (tensorsFromX[input2.id]) {\n node.outputs.forEach((output) => tensorsFromX[output.id] = true);\n anyInputFromX = true;\n nodesFromX[node.id] = true;\n break;\n }\n }\n if (anyInputFromX) {\n break;\n }\n }\n }\n const tensorsLeadToY = {};\n tensorsLeadToY[y.id] = true;\n const nodesToY = {};\n for (let i = tape.length - 1; i >= 0; i--) {\n const node = tape[i];\n const nodeInputs = node.inputs;\n for (let j = 0; j < node.outputs.length; j++) {\n if (tensorsLeadToY[node.outputs[j].id]) {\n for (const inputName in nodeInputs) {\n tensorsLeadToY[nodeInputs[inputName].id] = true;\n nodesToY[node.id] = true;\n }\n break;\n }\n }\n }\n const filteredTape = [];\n for (let i = 0; i < tape.length; i++) {\n const node = tape[i];\n if (nodesFromX[node.id] && nodesToY[node.id]) {\n const prunedInputs = {};\n for (const inputName in node.inputs) {\n const nodeInput = node.inputs[inputName];\n if (tensorsFromX[nodeInput.id]) {\n prunedInputs[inputName] = nodeInput;\n }\n }\n const prunedNode = Object.assign({}, node);\n prunedNode.inputs = prunedInputs;\n prunedNode.outputs = node.outputs;\n filteredTape.push(prunedNode);\n }\n }\n return filteredTape;\n}\nfunction backpropagateGradients(tensorAccumulatedGradientMap, filteredTape, tidy2, add5) {\n for (let i = filteredTape.length - 1; i >= 0; i--) {\n const node = filteredTape[i];\n const dys = [];\n node.outputs.forEach((o) => {\n const gradTensor = tensorAccumulatedGradientMap[o.id];\n if (gradTensor != null) {\n dys.push(gradTensor);\n } else {\n dys.push(null);\n }\n });\n if (node.gradient == null) {\n throw new Error(`Cannot compute gradient: gradient function not found for ${node.kernelName}.`);\n }\n const inputGradients = node.gradient(dys);\n for (const inputName in node.inputs) {\n if (!(inputName in inputGradients)) {\n throw new Error(`Cannot backprop through input ${inputName}. Available gradients found: ${Object.keys(inputGradients)}.`);\n }\n const dx = tidy2(() => inputGradients[inputName]());\n if (dx.dtype !== \"float32\") {\n throw new Error(`Error in gradient for op ${node.kernelName}. The gradient of input ${inputName} must have 'float32' dtype, but has '${dx.dtype}'`);\n }\n const x = node.inputs[inputName];\n if (!arraysEqual(dx.shape, x.shape)) {\n throw new Error(`Error in gradient for op ${node.kernelName}. The gradient of input '${inputName}' has shape '${dx.shape}', which does not match the shape of the input '${x.shape}'`);\n }\n if (tensorAccumulatedGradientMap[x.id] == null) {\n tensorAccumulatedGradientMap[x.id] = dx;\n } else {\n const curGradient = tensorAccumulatedGradientMap[x.id];\n tensorAccumulatedGradientMap[x.id] = add5(curGradient, dx);\n curGradient.dispose();\n }\n }\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/tensor_format.js\nvar FORMAT_LIMIT_NUM_VALS = 20;\nvar FORMAT_NUM_FIRST_LAST_VALS = 3;\nvar FORMAT_NUM_SIG_DIGITS = 7;\nfunction tensorToString(vals, shape, dtype, verbose) {\n const strides = computeStrides(shape);\n const padPerCol = computeMaxSizePerColumn(vals, shape, dtype, strides);\n const rank = shape.length;\n const valsLines = subTensorToString(vals, shape, dtype, strides, padPerCol);\n const lines = [\"Tensor\"];\n if (verbose) {\n lines.push(` dtype: ${dtype}`);\n lines.push(` rank: ${rank}`);\n lines.push(` shape: [${shape}]`);\n lines.push(` values:`);\n }\n lines.push(valsLines.map((l) => \" \" + l).join(\"\\n\"));\n return lines.join(\"\\n\");\n}\nfunction computeMaxSizePerColumn(vals, shape, dtype, strides) {\n const n = sizeFromShape(shape);\n const numCols = strides[strides.length - 1];\n const padPerCol = new Array(numCols).fill(0);\n const rank = shape.length;\n const valuesOrTuples = dtype === \"complex64\" ? createComplexTuples(vals) : vals;\n if (rank > 1) {\n for (let row = 0; row < n / numCols; row++) {\n const offset = row * numCols;\n for (let j = 0; j < numCols; j++) {\n padPerCol[j] = Math.max(padPerCol[j], valToString(valuesOrTuples[offset + j], 0, dtype).length);\n }\n }\n }\n return padPerCol;\n}\nfunction valToString(val, pad3, dtype) {\n let valStr;\n if (Array.isArray(val)) {\n valStr = `${parseFloat(val[0].toFixed(FORMAT_NUM_SIG_DIGITS))} + ${parseFloat(val[1].toFixed(FORMAT_NUM_SIG_DIGITS))}j`;\n } else if (isString(val)) {\n valStr = `'${val}'`;\n } else if (dtype === \"bool\") {\n valStr = boolNumToString(val);\n } else {\n valStr = parseFloat(val.toFixed(FORMAT_NUM_SIG_DIGITS)).toString();\n }\n return rightPad(valStr, pad3);\n}\nfunction boolNumToString(v) {\n return v === 0 ? \"false\" : \"true\";\n}\nfunction subTensorToString(vals, shape, dtype, strides, padPerCol, isLast = true) {\n const storagePerElement = dtype === \"complex64\" ? 2 : 1;\n const size = shape[0];\n const rank = shape.length;\n if (rank === 0) {\n if (dtype === \"complex64\") {\n const complexTuple = createComplexTuples(vals);\n return [valToString(complexTuple[0], 0, dtype)];\n }\n if (dtype === \"bool\") {\n return [boolNumToString(vals[0])];\n }\n return [vals[0].toString()];\n }\n if (rank === 1) {\n if (size > FORMAT_LIMIT_NUM_VALS) {\n const firstValsSize = FORMAT_NUM_FIRST_LAST_VALS * storagePerElement;\n let firstVals = Array.from(vals.slice(0, firstValsSize));\n let lastVals = Array.from(vals.slice((size - FORMAT_NUM_FIRST_LAST_VALS) * storagePerElement, size * storagePerElement));\n if (dtype === \"complex64\") {\n firstVals = createComplexTuples(firstVals);\n lastVals = createComplexTuples(lastVals);\n }\n return [\n \"[\" + firstVals.map((x, i) => valToString(x, padPerCol[i], dtype)).join(\", \") + \", ..., \" + lastVals.map((x, i) => valToString(x, padPerCol[size - FORMAT_NUM_FIRST_LAST_VALS + i], dtype)).join(\", \") + \"]\"\n ];\n }\n const displayVals = dtype === \"complex64\" ? createComplexTuples(vals) : Array.from(vals);\n return [\n \"[\" + displayVals.map((x, i) => valToString(x, padPerCol[i], dtype)).join(\", \") + \"]\"\n ];\n }\n const subshape = shape.slice(1);\n const substrides = strides.slice(1);\n const stride = strides[0] * storagePerElement;\n const lines = [];\n if (size > FORMAT_LIMIT_NUM_VALS) {\n for (let i = 0; i < FORMAT_NUM_FIRST_LAST_VALS; i++) {\n const start = i * stride;\n const end = start + stride;\n lines.push(...subTensorToString(vals.slice(start, end), subshape, dtype, substrides, padPerCol, false));\n }\n lines.push(\"...\");\n for (let i = size - FORMAT_NUM_FIRST_LAST_VALS; i < size; i++) {\n const start = i * stride;\n const end = start + stride;\n lines.push(...subTensorToString(vals.slice(start, end), subshape, dtype, substrides, padPerCol, i === size - 1));\n }\n } else {\n for (let i = 0; i < size; i++) {\n const start = i * stride;\n const end = start + stride;\n lines.push(...subTensorToString(vals.slice(start, end), subshape, dtype, substrides, padPerCol, i === size - 1));\n }\n }\n const sep = rank === 2 ? \",\" : \"\";\n lines[0] = \"[\" + lines[0] + sep;\n for (let i = 1; i < lines.length - 1; i++) {\n lines[i] = \" \" + lines[i] + sep;\n }\n let newLineSep = \",\\n\";\n for (let i = 2; i < rank; i++) {\n newLineSep += \"\\n\";\n }\n lines[lines.length - 1] = \" \" + lines[lines.length - 1] + \"]\" + (isLast ? \"\" : newLineSep);\n return lines;\n}\nfunction createComplexTuples(vals) {\n const complexTuples = [];\n for (let i = 0; i < vals.length; i += 2) {\n complexTuples.push([vals[i], vals[i + 1]]);\n }\n return complexTuples;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/tensor.js\nvar TensorBuffer = class {\n constructor(shape, dtype, values) {\n this.dtype = dtype;\n this.shape = shape.slice();\n this.size = sizeFromShape(shape);\n if (values != null) {\n const n = values.length;\n assert(n === this.size, () => `Length of values '${n}' does not match the size inferred by the shape '${this.size}'.`);\n }\n if (dtype === \"complex64\") {\n throw new Error(`complex64 dtype TensorBuffers are not supported. Please create a TensorBuffer for the real and imaginary parts separately and call tf.complex(real, imag).`);\n }\n this.values = values || getArrayFromDType(dtype, this.size);\n this.strides = computeStrides(shape);\n }\n set(value, ...locs) {\n if (locs.length === 0) {\n locs = [0];\n }\n assert(locs.length === this.rank, () => `The number of provided coordinates (${locs.length}) must match the rank (${this.rank})`);\n const index = this.locToIndex(locs);\n this.values[index] = value;\n }\n get(...locs) {\n if (locs.length === 0) {\n locs = [0];\n }\n let i = 0;\n for (const loc of locs) {\n if (loc < 0 || loc >= this.shape[i]) {\n const msg = `Requested out of range element at ${locs}. Buffer shape=${this.shape}`;\n throw new Error(msg);\n }\n i++;\n }\n let index = locs[locs.length - 1];\n for (let i2 = 0; i2 < locs.length - 1; ++i2) {\n index += this.strides[i2] * locs[i2];\n }\n return this.values[index];\n }\n locToIndex(locs) {\n if (this.rank === 0) {\n return 0;\n } else if (this.rank === 1) {\n return locs[0];\n }\n let index = locs[locs.length - 1];\n for (let i = 0; i < locs.length - 1; ++i) {\n index += this.strides[i] * locs[i];\n }\n return index;\n }\n indexToLoc(index) {\n if (this.rank === 0) {\n return [];\n } else if (this.rank === 1) {\n return [index];\n }\n const locs = new Array(this.shape.length);\n for (let i = 0; i < locs.length - 1; ++i) {\n locs[i] = Math.floor(index / this.strides[i]);\n index -= locs[i] * this.strides[i];\n }\n locs[locs.length - 1] = index;\n return locs;\n }\n get rank() {\n return this.shape.length;\n }\n toTensor() {\n return trackerFn().makeTensor(this.values, this.shape, this.dtype);\n }\n};\nvar trackerFn = null;\nvar opHandler = null;\nvar deprecationWarningFn = null;\nfunction setTensorTracker(fn) {\n trackerFn = fn;\n}\nfunction setOpHandler(handler) {\n opHandler = handler;\n}\nfunction setDeprecationWarningFn(fn) {\n deprecationWarningFn = fn;\n}\nvar Tensor = class {\n constructor(shape, dtype, dataId, id) {\n this.kept = false;\n this.isDisposedInternal = false;\n this.shape = shape.slice();\n this.dtype = dtype || \"float32\";\n this.size = sizeFromShape(shape);\n this.strides = computeStrides(shape);\n this.dataId = dataId;\n this.id = id;\n this.rankType = this.rank < 5 ? this.rank.toString() : \"higher\";\n }\n get rank() {\n return this.shape.length;\n }\n async buffer() {\n const vals = await this.data();\n return opHandler.buffer(this.shape, this.dtype, vals);\n }\n bufferSync() {\n return opHandler.buffer(this.shape, this.dtype, this.dataSync());\n }\n async array() {\n const vals = await this.data();\n return toNestedArray(this.shape, vals, this.dtype === \"complex64\");\n }\n arraySync() {\n return toNestedArray(this.shape, this.dataSync(), this.dtype === \"complex64\");\n }\n async data() {\n this.throwIfDisposed();\n const data = trackerFn().read(this.dataId);\n if (this.dtype === \"string\") {\n const bytes = await data;\n try {\n return bytes.map((b) => decodeString(b));\n } catch (_a) {\n throw new Error(\"Failed to decode the string bytes into utf-8. To get the original bytes, call tensor.bytes().\");\n }\n }\n return data;\n }\n dataToGPU(options) {\n this.throwIfDisposed();\n return trackerFn().readToGPU(this.dataId, options);\n }\n dataSync() {\n this.throwIfDisposed();\n const data = trackerFn().readSync(this.dataId);\n if (this.dtype === \"string\") {\n try {\n return data.map((b) => decodeString(b));\n } catch (_a) {\n throw new Error(\"Failed to decode the string bytes into utf-8. To get the original bytes, call tensor.bytes().\");\n }\n }\n return data;\n }\n async bytes() {\n this.throwIfDisposed();\n const data = await trackerFn().read(this.dataId);\n if (this.dtype === \"string\") {\n return data;\n } else {\n return new Uint8Array(data.buffer);\n }\n }\n dispose() {\n if (this.isDisposed) {\n return;\n }\n trackerFn().disposeTensor(this);\n this.isDisposedInternal = true;\n }\n get isDisposed() {\n return this.isDisposedInternal;\n }\n throwIfDisposed() {\n if (this.isDisposed) {\n throw new Error(`Tensor is disposed.`);\n }\n }\n print(verbose = false) {\n return opHandler.print(this, verbose);\n }\n clone() {\n this.throwIfDisposed();\n return opHandler.clone(this);\n }\n toString(verbose = false) {\n const vals = this.dataSync();\n return tensorToString(vals, this.shape, this.dtype, verbose);\n }\n cast(dtype) {\n this.throwIfDisposed();\n return opHandler.cast(this, dtype);\n }\n variable(trainable = true, name, dtype) {\n this.throwIfDisposed();\n return trackerFn().makeVariable(this, trainable, name, dtype);\n }\n};\nObject.defineProperty(Tensor, Symbol.hasInstance, {\n value: (instance) => {\n return !!instance && instance.data != null && instance.dataSync != null && instance.throwIfDisposed != null;\n }\n});\nfunction getGlobalTensorClass() {\n return getGlobal(\"Tensor\", () => {\n return Tensor;\n });\n}\ngetGlobalTensorClass();\nvar Variable = class extends Tensor {\n constructor(initialValue, trainable, name, tensorId) {\n super(initialValue.shape, initialValue.dtype, initialValue.dataId, tensorId);\n this.trainable = trainable;\n this.name = name;\n }\n assign(newValue) {\n if (newValue.dtype !== this.dtype) {\n throw new Error(`dtype of the new value (${newValue.dtype}) and previous value (${this.dtype}) must match`);\n }\n if (!arraysEqual(newValue.shape, this.shape)) {\n throw new Error(`shape of the new value (${newValue.shape}) and previous value (${this.shape}) must match`);\n }\n trackerFn().disposeTensor(this);\n this.dataId = newValue.dataId;\n trackerFn().incRef(this, null);\n }\n dispose() {\n trackerFn().disposeVariable(this);\n this.isDisposedInternal = true;\n }\n};\nObject.defineProperty(Variable, Symbol.hasInstance, {\n value: (instance) => {\n return instance instanceof Tensor && instance.assign != null && instance.assign instanceof Function;\n }\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/tensor_util.js\nvar tensor_util_exports = {};\n__export(tensor_util_exports, {\n assertTypesMatch: () => assertTypesMatch,\n getTensorsInContainer: () => getTensorsInContainer,\n isTensorInList: () => isTensorInList,\n makeTypesMatch: () => makeTypesMatch\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/types.js\nvar Rank;\n(function(Rank2) {\n Rank2[\"R0\"] = \"R0\";\n Rank2[\"R1\"] = \"R1\";\n Rank2[\"R2\"] = \"R2\";\n Rank2[\"R3\"] = \"R3\";\n Rank2[\"R4\"] = \"R4\";\n Rank2[\"R5\"] = \"R5\";\n Rank2[\"R6\"] = \"R6\";\n})(Rank || (Rank = {}));\nvar UpcastInt32AndMap;\n(function(UpcastInt32AndMap2) {\n UpcastInt32AndMap2[\"float32\"] = \"float32\";\n UpcastInt32AndMap2[\"int32\"] = \"int32\";\n UpcastInt32AndMap2[\"bool\"] = \"int32\";\n UpcastInt32AndMap2[\"complex64\"] = \"complex64\";\n})(UpcastInt32AndMap || (UpcastInt32AndMap = {}));\nvar UpcastBoolAndMap;\n(function(UpcastBoolAndMap2) {\n UpcastBoolAndMap2[\"float32\"] = \"float32\";\n UpcastBoolAndMap2[\"int32\"] = \"int32\";\n UpcastBoolAndMap2[\"bool\"] = \"bool\";\n UpcastBoolAndMap2[\"complex64\"] = \"complex64\";\n})(UpcastBoolAndMap || (UpcastBoolAndMap = {}));\nvar UpcastFloat32AndMap;\n(function(UpcastFloat32AndMap2) {\n UpcastFloat32AndMap2[\"float32\"] = \"float32\";\n UpcastFloat32AndMap2[\"int32\"] = \"float32\";\n UpcastFloat32AndMap2[\"bool\"] = \"float32\";\n UpcastFloat32AndMap2[\"complex64\"] = \"complex64\";\n})(UpcastFloat32AndMap || (UpcastFloat32AndMap = {}));\nvar UpcastComplex64AndMap;\n(function(UpcastComplex64AndMap2) {\n UpcastComplex64AndMap2[\"float32\"] = \"complex64\";\n UpcastComplex64AndMap2[\"int32\"] = \"complex64\";\n UpcastComplex64AndMap2[\"bool\"] = \"complex64\";\n UpcastComplex64AndMap2[\"complex64\"] = \"complex64\";\n})(UpcastComplex64AndMap || (UpcastComplex64AndMap = {}));\nvar upcastTypeMap = {\n \"float32\": UpcastFloat32AndMap,\n \"int32\": UpcastInt32AndMap,\n \"bool\": UpcastBoolAndMap,\n \"complex64\": UpcastComplex64AndMap\n};\nfunction upcastType(typeA, typeB) {\n if (typeA === \"string\" || typeB === \"string\") {\n if (typeA === \"string\" && typeB === \"string\") {\n return \"string\";\n }\n throw new Error(`Can not upcast ${typeA} with ${typeB}`);\n }\n return upcastTypeMap[typeA][typeB];\n}\nfunction sumOutType(type) {\n return upcastType(type, \"int32\");\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/tensor_util.js\nfunction makeTypesMatch(a, b) {\n if (a.dtype === b.dtype) {\n return [a, b];\n }\n const dtype = upcastType(a.dtype, b.dtype);\n return [a.cast(dtype), b.cast(dtype)];\n}\nfunction assertTypesMatch(a, b) {\n assert(a.dtype === b.dtype, () => `The dtypes of the first(${a.dtype}) and second(${b.dtype}) input must match`);\n}\nfunction isTensorInList(tensor2, tensorList) {\n return tensorList.some((x) => x.id === tensor2.id);\n}\nfunction getTensorsInContainer(result) {\n const list = [];\n const seen = /* @__PURE__ */ new Set();\n walkTensorContainer(result, list, seen);\n return list;\n}\nfunction walkTensorContainer(container, list, seen) {\n if (container == null) {\n return;\n }\n if (container instanceof Tensor) {\n list.push(container);\n return;\n }\n if (!isIterable(container)) {\n return;\n }\n const iterable = container;\n for (const k in iterable) {\n const val = iterable[k];\n if (!seen.has(val)) {\n seen.add(val);\n walkTensorContainer(val, list, seen);\n }\n }\n}\nfunction isIterable(obj) {\n return Array.isArray(obj) || typeof obj === \"object\";\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/engine.js\nfunction isRegisteredKernelInvocation(kernelInvocation) {\n return kernelInvocation.kernelName != null;\n}\nvar EngineState = class {\n constructor() {\n this.registeredVariables = {};\n this.nextTapeNodeId = 0;\n this.numBytes = 0;\n this.numTensors = 0;\n this.numStringTensors = 0;\n this.numDataBuffers = 0;\n this.gradientDepth = 0;\n this.kernelDepth = 0;\n this.scopeStack = [];\n this.numDataMovesStack = [];\n this.nextScopeId = 0;\n this.tensorInfo = /* @__PURE__ */ new WeakMap();\n this.profiling = false;\n this.activeProfile = {\n newBytes: 0,\n newTensors: 0,\n peakBytes: 0,\n kernels: [],\n result: null,\n get kernelNames() {\n return Array.from(new Set(this.kernels.map((k) => k.name)));\n }\n };\n }\n dispose() {\n for (const variableName in this.registeredVariables) {\n this.registeredVariables[variableName].dispose();\n }\n }\n};\nvar Engine = class {\n constructor(ENV8) {\n this.ENV = ENV8;\n this.registry = {};\n this.registryFactory = {};\n this.pendingBackendInitId = 0;\n this.state = new EngineState();\n }\n async ready() {\n if (this.pendingBackendInit != null) {\n return this.pendingBackendInit.then(() => {\n });\n }\n if (this.backendInstance != null) {\n return;\n }\n const sortedBackends = this.getSortedBackends();\n for (let i = 0; i < sortedBackends.length; i++) {\n const backendName = sortedBackends[i];\n const success = await this.initializeBackend(backendName).success;\n if (success) {\n await this.setBackend(backendName);\n return;\n }\n }\n throw new Error(`Could not initialize any backends, all backend initializations failed.`);\n }\n get backend() {\n if (this.pendingBackendInit != null) {\n throw new Error(`Backend '${this.backendName}' has not yet been initialized. Make sure to await tf.ready() or await tf.setBackend() before calling other methods`);\n }\n if (this.backendInstance == null) {\n const { name, asyncInit } = this.initializeBackendsAndReturnBest();\n if (asyncInit) {\n throw new Error(`The highest priority backend '${name}' has not yet been initialized. Make sure to await tf.ready() or await tf.setBackend() before calling other methods`);\n }\n this.setBackend(name);\n }\n return this.backendInstance;\n }\n backendNames() {\n return Object.keys(this.registryFactory);\n }\n findBackend(backendName) {\n if (!(backendName in this.registry)) {\n if (backendName in this.registryFactory) {\n const { asyncInit } = this.initializeBackend(backendName);\n if (asyncInit) {\n return null;\n }\n } else {\n return null;\n }\n }\n return this.registry[backendName];\n }\n findBackendFactory(backendName) {\n if (!(backendName in this.registryFactory)) {\n return null;\n }\n return this.registryFactory[backendName].factory;\n }\n registerBackend(backendName, factory, priority = 1) {\n if (backendName in this.registryFactory) {\n warn(`${backendName} backend was already registered. Reusing existing backend factory.`);\n return false;\n }\n this.registryFactory[backendName] = { factory, priority };\n return true;\n }\n async setBackend(backendName) {\n if (this.registryFactory[backendName] == null) {\n throw new Error(`Backend name '${backendName}' not found in registry`);\n }\n this.backendName = backendName;\n if (this.registry[backendName] == null) {\n this.backendInstance = null;\n const { success, asyncInit } = this.initializeBackend(backendName);\n const result = asyncInit ? await success : success;\n if (!result) {\n return false;\n }\n }\n this.backendInstance = this.registry[backendName];\n this.setupRegisteredKernels();\n this.profiler = new Profiler(this.backendInstance);\n return true;\n }\n setupRegisteredKernels() {\n const kernels = getKernelsForBackend(this.backendName);\n kernels.forEach((kernel) => {\n if (kernel.setupFunc != null) {\n kernel.setupFunc(this.backendInstance);\n }\n });\n }\n disposeRegisteredKernels(backendName) {\n const kernels = getKernelsForBackend(backendName);\n kernels.forEach((kernel) => {\n if (kernel.disposeFunc != null) {\n kernel.disposeFunc(this.registry[backendName]);\n }\n });\n }\n initializeBackend(backendName) {\n const registryFactoryEntry = this.registryFactory[backendName];\n if (registryFactoryEntry == null) {\n throw new Error(`Cannot initialize backend ${backendName}, no registration found.`);\n }\n try {\n const backend2 = registryFactoryEntry.factory();\n if (backend2 && !(backend2 instanceof KernelBackend) && typeof backend2.then === \"function\") {\n const promiseId = ++this.pendingBackendInitId;\n const success = backend2.then((backendInstance) => {\n if (promiseId < this.pendingBackendInitId) {\n return false;\n }\n this.registry[backendName] = backendInstance;\n this.pendingBackendInit = null;\n return true;\n }).catch((err) => {\n if (promiseId < this.pendingBackendInitId) {\n return false;\n }\n this.pendingBackendInit = null;\n warn(`Initialization of backend ${backendName} failed`);\n warn(err.stack || err.message);\n return false;\n });\n this.pendingBackendInit = success;\n return { success, asyncInit: true };\n } else {\n this.registry[backendName] = backend2;\n return { success: true, asyncInit: false };\n }\n } catch (err) {\n warn(`Initialization of backend ${backendName} failed`);\n warn(err.stack || err.message);\n return { success: false, asyncInit: false };\n }\n }\n removeBackend(backendName) {\n if (!(backendName in this.registryFactory)) {\n throw new Error(`${backendName} backend not found in registry`);\n }\n if (this.backendName === backendName && this.pendingBackendInit != null) {\n this.pendingBackendInitId++;\n }\n if (backendName in this.registry) {\n this.disposeRegisteredKernels(backendName);\n this.registry[backendName].dispose();\n delete this.registry[backendName];\n }\n delete this.registryFactory[backendName];\n if (this.backendName === backendName) {\n this.pendingBackendInit = null;\n this.backendName = null;\n this.backendInstance = null;\n }\n }\n getSortedBackends() {\n if (Object.keys(this.registryFactory).length === 0) {\n throw new Error(\"No backend found in registry.\");\n }\n return Object.keys(this.registryFactory).sort((a, b) => {\n return this.registryFactory[b].priority - this.registryFactory[a].priority;\n });\n }\n initializeBackendsAndReturnBest() {\n const sortedBackends = this.getSortedBackends();\n for (let i = 0; i < sortedBackends.length; i++) {\n const backendName = sortedBackends[i];\n const { success, asyncInit } = this.initializeBackend(backendName);\n if (asyncInit || success) {\n return { name: backendName, asyncInit };\n }\n }\n throw new Error(`Could not initialize any backends, all backend initializations failed.`);\n }\n moveData(backend2, dataId) {\n const info = this.state.tensorInfo.get(dataId);\n const srcBackend = info.backend;\n const values = this.readSync(dataId);\n const refCount = srcBackend.refCount(dataId);\n srcBackend.disposeData(dataId, true);\n info.backend = backend2;\n backend2.move(dataId, values, info.shape, info.dtype, refCount);\n if (this.shouldCheckForMemLeaks()) {\n this.state.numDataMovesStack[this.state.numDataMovesStack.length - 1]++;\n }\n }\n tidy(nameOrFn, fn) {\n let name = null;\n if (fn == null) {\n if (typeof nameOrFn !== \"function\") {\n throw new Error(\"Please provide a function to tidy()\");\n }\n fn = nameOrFn;\n } else {\n if (typeof nameOrFn !== \"string\" && !(nameOrFn instanceof String)) {\n throw new Error(\"When calling with two arguments, the first argument to tidy() must be a string\");\n }\n if (typeof fn !== \"function\") {\n throw new Error(\"When calling with two arguments, the 2nd argument to tidy() must be a function\");\n }\n name = nameOrFn;\n }\n let result;\n return this.scopedRun(() => this.startScope(name), () => this.endScope(result), () => {\n result = fn();\n if (result instanceof Promise) {\n console.error(\"Cannot return a Promise inside of tidy.\");\n }\n return result;\n });\n }\n scopedRun(start, end, f) {\n start();\n try {\n const res = f();\n end();\n return res;\n } catch (ex) {\n end();\n throw ex;\n }\n }\n nextTensorId() {\n return Engine.nextTensorId++;\n }\n nextVariableId() {\n return Engine.nextVariableId++;\n }\n clone(x) {\n const y = ENGINE.runKernel(Identity, { x });\n const inputs = { x };\n const grad2 = (dy) => ({\n x: () => {\n const dtype = \"float32\";\n const gradInputs = { x: dy };\n const attrs = { dtype };\n return ENGINE.runKernel(\n Cast,\n gradInputs,\n attrs\n );\n }\n });\n const saved = [];\n this.addTapeNode(this.state.activeScope.name, inputs, [y], grad2, saved, {});\n return y;\n }\n runKernel(kernelName, inputs, attrs) {\n if (this.backendName == null) {\n this.backend;\n }\n const hasKernel = getKernel(kernelName, this.backendName) != null;\n if (!hasKernel) {\n throw new Error(`Kernel '${kernelName}' not registered for backend '${this.backendName}'`);\n }\n return this.runKernelFunc({ kernelName, inputs, attrs });\n }\n shouldCheckForMemLeaks() {\n return this.ENV.getBool(\"IS_TEST\");\n }\n checkKernelForMemLeak(kernelName, numDataIdsBefore, outInfos) {\n const numDataIdsAfter = this.backend.numDataIds();\n let numOutputDataIds = 0;\n outInfos.forEach((info) => {\n numOutputDataIds += info.dtype === \"complex64\" ? 3 : 1;\n });\n const numMoves = this.state.numDataMovesStack[this.state.numDataMovesStack.length - 1];\n const dataIdsLeaked = numDataIdsAfter - numDataIdsBefore - numOutputDataIds - numMoves;\n if (dataIdsLeaked > 0) {\n throw new Error(`Backend '${this.backendName}' has an internal memory leak (${dataIdsLeaked} data ids) after running '${kernelName}'`);\n }\n }\n runKernelFunc(kernelParams) {\n let outputs;\n let saved = [];\n const isTapeOn = this.isTapeOn();\n const startingBytecount = this.state.numBytes;\n const startingNumTensors = this.state.numTensors;\n if (this.shouldCheckForMemLeaks()) {\n this.state.numDataMovesStack.push(0);\n }\n let kernelFunc3;\n if (this.backendName == null) {\n this.backend;\n }\n let out;\n const kernelOrScopeName = isRegisteredKernelInvocation(kernelParams) ? kernelParams.kernelName : this.state.activeScope != null ? this.state.activeScope.name : \"\";\n if (isRegisteredKernelInvocation(kernelParams)) {\n const { kernelName, inputs: inputs2, attrs: attrs2 } = kernelParams;\n if (this.backendName == null) {\n this.backend;\n }\n const kernel = getKernel(kernelName, this.backendName);\n assert(kernel != null, () => `Cannot find registered kernel '${kernelName}' for backend '${this.backendName}'`);\n kernelFunc3 = () => {\n const numDataIdsBefore = this.backend.numDataIds();\n out = kernel.kernelFunc({ inputs: inputs2, attrs: attrs2, backend: this.backend });\n const outInfos = Array.isArray(out) ? out : [out];\n if (this.shouldCheckForMemLeaks()) {\n this.checkKernelForMemLeak(kernelName, numDataIdsBefore, outInfos);\n }\n const outTensors = outInfos.map((outInfo) => {\n if (outInfo.rank != null) {\n return outInfo;\n }\n return this.makeTensorFromTensorInfo(outInfo);\n });\n if (isTapeOn) {\n const tensorsToSave = this.getTensorsForGradient(kernelName, inputs2, outTensors);\n saved = this.saveTensorsForBackwardMode(tensorsToSave);\n }\n return outTensors;\n };\n } else {\n const { forwardFunc } = kernelParams;\n const saveFunc = (tensors) => {\n if (!isTapeOn) {\n return;\n }\n saved = tensors.map((tensor2) => this.keep(this.clone(tensor2)));\n };\n kernelFunc3 = () => {\n const numDataIdsBefore = this.backend.numDataIds();\n out = this.tidy(() => forwardFunc(this.backend, saveFunc));\n const outs = Array.isArray(out) ? out : [out];\n if (this.shouldCheckForMemLeaks()) {\n this.checkKernelForMemLeak(kernelOrScopeName, numDataIdsBefore, outs);\n }\n return outs;\n };\n }\n const { inputs, attrs } = kernelParams;\n const backwardsFunc = isRegisteredKernelInvocation(kernelParams) ? null : kernelParams.backwardsFunc;\n let kernelProfile;\n this.scopedRun(\n () => this.state.kernelDepth++,\n () => this.state.kernelDepth--,\n () => {\n if (!this.ENV.getBool(\"DEBUG\") && !this.state.profiling) {\n outputs = kernelFunc3();\n } else {\n kernelProfile = this.profiler.profileKernel(kernelOrScopeName, inputs, () => kernelFunc3());\n if (this.ENV.getBool(\"DEBUG\")) {\n this.profiler.logKernelProfile(kernelProfile);\n }\n outputs = kernelProfile.outputs;\n }\n }\n );\n if (isTapeOn) {\n this.addTapeNode(kernelOrScopeName, inputs, outputs, backwardsFunc, saved, attrs);\n }\n if (this.state.profiling) {\n this.state.activeProfile.kernels.push({\n name: kernelOrScopeName,\n bytesAdded: this.state.numBytes - startingBytecount,\n totalBytesSnapshot: this.state.numBytes,\n tensorsAdded: this.state.numTensors - startingNumTensors,\n totalTensorsSnapshot: this.state.numTensors,\n inputShapes: Object.keys(inputs).map((key) => inputs[key] != null ? inputs[key].shape : null),\n outputShapes: outputs.map((item) => item.shape),\n kernelTimeMs: kernelProfile.timeMs,\n extraInfo: kernelProfile.extraInfo\n });\n }\n return Array.isArray(out) ? outputs : outputs[0];\n }\n saveTensorsForBackwardMode(tensors) {\n const saved = tensors.map((tensor2) => this.keep(this.clone(tensor2)));\n return saved;\n }\n getTensorsForGradient(kernelName, inputs, outputs) {\n const gradConfig = getGradient(kernelName);\n if (gradConfig != null) {\n const inputsToSave = gradConfig.inputsToSave || [];\n const outputsToSave = gradConfig.outputsToSave || [];\n let inputTensorsToSave;\n if (gradConfig.saveAllInputs) {\n assert(Array.isArray(inputs), () => \"saveAllInputs is true, expected inputs to be an array.\");\n inputTensorsToSave = Object.keys(inputs).map((key) => inputs[key]);\n } else {\n inputTensorsToSave = inputsToSave.map((inputName) => inputs[inputName]);\n }\n const outputTensorsToSave = outputs.filter((_, i) => outputsToSave[i]);\n return inputTensorsToSave.concat(outputTensorsToSave);\n }\n return [];\n }\n makeTensor(values, shape, dtype, backend2) {\n if (values == null) {\n throw new Error(\"Values passed to engine.makeTensor() are null\");\n }\n dtype = dtype || \"float32\";\n backend2 = backend2 || this.backend;\n let backendVals = values;\n if (dtype === \"string\" && isString(values[0])) {\n backendVals = values.map((d) => encodeString(d));\n }\n const dataId = backend2.write(backendVals, shape, dtype);\n const t = new Tensor(shape, dtype, dataId, this.nextTensorId());\n this.trackTensor(t, backend2);\n if (dtype === \"string\") {\n const info = this.state.tensorInfo.get(dataId);\n const newBytes = bytesFromStringArray(backendVals);\n this.state.numBytes += newBytes - info.bytes;\n info.bytes = newBytes;\n }\n return t;\n }\n makeTensorFromDataId(dataId, shape, dtype, backend2) {\n dtype = dtype || \"float32\";\n const tensorInfo = { dataId, shape, dtype };\n return this.makeTensorFromTensorInfo(tensorInfo, backend2);\n }\n makeTensorFromTensorInfo(tensorInfo, backend2) {\n const { dataId, shape, dtype } = tensorInfo;\n const t = new Tensor(shape, dtype, dataId, this.nextTensorId());\n this.trackTensor(t, backend2);\n return t;\n }\n makeVariable(initialValue, trainable = true, name, dtype) {\n name = name || this.nextVariableId().toString();\n if (dtype != null && dtype !== initialValue.dtype) {\n initialValue = initialValue.cast(dtype);\n }\n const v = new Variable(initialValue, trainable, name, this.nextTensorId());\n if (this.state.registeredVariables[v.name] != null) {\n throw new Error(`Variable with name ${v.name} was already registered`);\n }\n this.state.registeredVariables[v.name] = v;\n this.incRef(v, this.backend);\n return v;\n }\n trackTensor(a, backend2) {\n this.state.numTensors++;\n if (a.dtype === \"string\") {\n this.state.numStringTensors++;\n }\n let bytes = 0;\n if (a.dtype !== \"complex64\" && a.dtype !== \"string\") {\n bytes = a.size * bytesPerElement(a.dtype);\n }\n this.state.numBytes += bytes;\n if (!this.state.tensorInfo.has(a.dataId)) {\n this.state.numDataBuffers++;\n this.state.tensorInfo.set(a.dataId, {\n backend: backend2 || this.backend,\n dtype: a.dtype,\n shape: a.shape,\n bytes\n });\n }\n if (!(a instanceof Variable)) {\n this.track(a);\n }\n }\n incRef(a, backend2) {\n this.trackTensor(a, backend2);\n this.backend.incRef(a.dataId);\n }\n removeDataId(dataId, backend2) {\n if (this.state.tensorInfo.has(dataId) && this.state.tensorInfo.get(dataId).backend === backend2) {\n this.state.tensorInfo.delete(dataId);\n this.state.numDataBuffers--;\n }\n }\n disposeTensor(a) {\n if (!this.state.tensorInfo.has(a.dataId)) {\n return;\n }\n const info = this.state.tensorInfo.get(a.dataId);\n this.state.numTensors--;\n if (a.dtype === \"string\") {\n this.state.numStringTensors--;\n this.state.numBytes -= info.bytes;\n }\n if (a.dtype !== \"complex64\" && a.dtype !== \"string\") {\n const bytes = a.size * bytesPerElement(a.dtype);\n this.state.numBytes -= bytes;\n }\n if (info.backend.disposeData(a.dataId)) {\n this.removeDataId(a.dataId, info.backend);\n }\n }\n disposeVariables() {\n for (const varName in this.state.registeredVariables) {\n const v = this.state.registeredVariables[varName];\n this.disposeVariable(v);\n }\n }\n disposeVariable(v) {\n this.disposeTensor(v);\n if (this.state.registeredVariables[v.name] != null) {\n delete this.state.registeredVariables[v.name];\n }\n }\n memory() {\n const info = this.backend.memory();\n info.numTensors = this.state.numTensors;\n info.numDataBuffers = this.state.numDataBuffers;\n info.numBytes = this.state.numBytes;\n if (this.state.numStringTensors > 0) {\n info.unreliable = true;\n if (info.reasons == null) {\n info.reasons = [];\n }\n info.reasons.push(\"Memory usage by string tensors is approximate (2 bytes per character)\");\n }\n return info;\n }\n async profile(query) {\n this.state.profiling = true;\n const startBytes = this.state.numBytes;\n const startNumTensors = this.state.numTensors;\n this.state.activeProfile.kernels = [];\n this.state.activeProfile.result = await query();\n this.state.profiling = false;\n this.state.activeProfile.peakBytes = Math.max(...this.state.activeProfile.kernels.map((d) => d.totalBytesSnapshot));\n this.state.activeProfile.newBytes = this.state.numBytes - startBytes;\n this.state.activeProfile.newTensors = this.state.numTensors - startNumTensors;\n for (const kernel of this.state.activeProfile.kernels) {\n kernel.kernelTimeMs = await kernel.kernelTimeMs;\n kernel.extraInfo = await kernel.extraInfo;\n }\n return this.state.activeProfile;\n }\n isTapeOn() {\n return this.state.gradientDepth > 0 && this.state.kernelDepth === 0;\n }\n addTapeNode(kernelName, inputs, outputs, gradientsFunc, saved, attrs) {\n const tapeNode = { id: this.state.nextTapeNodeId++, kernelName, inputs, outputs, saved };\n const gradConfig = getGradient(kernelName);\n if (gradConfig != null) {\n gradientsFunc = gradConfig.gradFunc;\n }\n if (gradientsFunc != null) {\n tapeNode.gradient = (dys) => {\n dys = dys.map((dy, i) => {\n if (dy == null) {\n const output = outputs[i];\n const vals = makeZerosTypedArray(output.size, output.dtype);\n return this.makeTensor(vals, output.shape, output.dtype);\n }\n return dy;\n });\n return gradientsFunc(dys.length > 1 ? dys : dys[0], saved, attrs);\n };\n }\n this.state.activeTape.push(tapeNode);\n }\n keep(result) {\n result.kept = true;\n return result;\n }\n startTape() {\n if (this.state.gradientDepth === 0) {\n this.state.activeTape = [];\n }\n this.state.gradientDepth++;\n }\n endTape() {\n this.state.gradientDepth--;\n }\n startScope(name) {\n const scopeInfo = {\n track: [],\n name: \"unnamed scope\",\n id: this.state.nextScopeId++\n };\n if (name) {\n scopeInfo.name = name;\n }\n this.state.scopeStack.push(scopeInfo);\n this.state.activeScope = scopeInfo;\n }\n endScope(result) {\n const tensorsToTrackInParent = getTensorsInContainer(result);\n const tensorsToTrackInParentSet = new Set(tensorsToTrackInParent.map((t) => t.id));\n for (let i = 0; i < this.state.activeScope.track.length; i++) {\n const tensor2 = this.state.activeScope.track[i];\n if (!tensor2.kept && !tensorsToTrackInParentSet.has(tensor2.id)) {\n tensor2.dispose();\n }\n }\n const oldScope = this.state.scopeStack.pop();\n this.state.activeScope = this.state.scopeStack.length === 0 ? null : this.state.scopeStack[this.state.scopeStack.length - 1];\n tensorsToTrackInParent.forEach((tensor2) => {\n if (!tensor2.kept && tensor2.scopeId === oldScope.id) {\n this.track(tensor2);\n }\n });\n }\n gradients(f, xs, dy, allowNoGradients = false) {\n assert(xs.length > 0, () => \"gradients() received an empty list of xs.\");\n if (dy != null && dy.dtype !== \"float32\") {\n throw new Error(`dy must have 'float32' dtype, but has '${dy.dtype}'`);\n }\n const y = this.scopedRun(() => this.startTape(), () => this.endTape(), () => this.tidy(\"forward\", f));\n assert(y instanceof Tensor, () => \"The result y returned by f() must be a tensor.\");\n const filteredTape = getFilteredNodesXToY(this.state.activeTape, xs, y);\n if (!allowNoGradients && filteredTape.length === 0 && xs.length > 0) {\n throw new Error(\"Cannot compute gradient of y=f(x) with respect to x. Make sure that the f you passed encloses all operations that lead from x to y.\");\n }\n return this.tidy(\"backward\", () => {\n const accumulatedGradientMap = {};\n accumulatedGradientMap[y.id] = dy == null ? ones(y.shape) : dy;\n backpropagateGradients(\n accumulatedGradientMap,\n filteredTape,\n (f2) => this.tidy(f2),\n add\n );\n const grads2 = xs.map((x) => accumulatedGradientMap[x.id]);\n if (this.state.gradientDepth === 0) {\n this.state.activeTape.forEach((node) => {\n for (const tensor2 of node.saved) {\n tensor2.dispose();\n }\n });\n this.state.activeTape = null;\n }\n return { value: y, grads: grads2 };\n });\n }\n customGrad(f) {\n assert(isFunction(f), () => \"The f passed in customGrad(f) must be a function.\");\n return (...inputs) => {\n assert(inputs.every((t) => t instanceof Tensor), () => \"The args passed in customGrad(f)(x1, x2,...) must all be tensors\");\n let res;\n const inputMap = {};\n inputs.forEach((input2, i) => {\n inputMap[i] = input2;\n });\n const forwardFunc = (_, save) => {\n res = f(...[...inputs, save]);\n assert(res.value instanceof Tensor, () => \"The function f passed in customGrad(f) must return an object where `obj.value` is a tensor\");\n assert(isFunction(res.gradFunc), () => \"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function.\");\n return res.value;\n };\n const backwardsFunc = (dy, saved) => {\n const gradRes = res.gradFunc(dy, saved);\n const grads2 = Array.isArray(gradRes) ? gradRes : [gradRes];\n assert(grads2.length === inputs.length, () => \"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function that returns the same number of tensors as inputs passed to f(...).\");\n assert(grads2.every((t) => t instanceof Tensor), () => \"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function that returns a list of only tensors.\");\n const gradMap = {};\n grads2.forEach((grad2, i) => {\n gradMap[i] = () => grad2;\n });\n return gradMap;\n };\n return this.runKernelFunc({\n forwardFunc,\n backwardsFunc,\n inputs: inputMap\n });\n };\n }\n readSync(dataId) {\n const info = this.state.tensorInfo.get(dataId);\n return info.backend.readSync(dataId);\n }\n read(dataId) {\n const info = this.state.tensorInfo.get(dataId);\n return info.backend.read(dataId);\n }\n readToGPU(dataId, options) {\n const info = this.state.tensorInfo.get(dataId);\n return info.backend.readToGPU(dataId, options);\n }\n async time(query) {\n const start = now();\n const timingInfo = await this.backend.time(query);\n timingInfo.wallMs = now() - start;\n return timingInfo;\n }\n track(result) {\n if (this.state.activeScope != null) {\n result.scopeId = this.state.activeScope.id;\n this.state.activeScope.track.push(result);\n }\n return result;\n }\n get registeredVariables() {\n return this.state.registeredVariables;\n }\n reset() {\n this.pendingBackendInitId++;\n this.state.dispose();\n this.ENV.reset();\n this.state = new EngineState();\n for (const backendName in this.registry) {\n this.disposeRegisteredKernels(backendName);\n this.registry[backendName].dispose();\n delete this.registry[backendName];\n }\n this.backendName = null;\n this.backendInstance = null;\n this.pendingBackendInit = null;\n }\n};\nEngine.nextTensorId = 0;\nEngine.nextVariableId = 0;\nfunction ones(shape) {\n const values = makeOnesTypedArray(sizeFromShape(shape), \"float32\");\n return ENGINE.makeTensor(values, shape, \"float32\");\n}\nfunction getOrMakeEngine() {\n const ns = getGlobalNamespace();\n if (ns._tfengine == null) {\n const environment = new Environment(ns);\n ns._tfengine = new Engine(environment);\n }\n setEnvironmentGlobal(ns._tfengine.ENV);\n setTensorTracker(() => ns._tfengine);\n return ns._tfengine;\n}\nvar ENGINE = getOrMakeEngine();\nfunction add(a, b) {\n const inputs = { a, b };\n return ENGINE.runKernel(Add, inputs);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/device_util.js\nvar device_util_exports = {};\n__export(device_util_exports, {\n isBrowser: () => isBrowser,\n isMobile: () => isMobile,\n mockIsMobile: () => mockIsMobile\n});\nfunction _isNavigatorDefined() {\n return typeof navigator !== \"undefined\" && navigator != null;\n}\nvar isMobileMockValue;\nfunction mockIsMobile(value) {\n isMobileMockValue = value;\n}\nfunction isMobile(nav) {\n if (isMobileMockValue !== void 0) {\n return isMobileMockValue;\n }\n if (nav || _isNavigatorDefined()) {\n if (!nav) {\n nav = navigator;\n }\n if (nav.product === \"ReactNative\") {\n return true;\n }\n const a = nav.userAgent || nav.vendor || (typeof window !== \"undefined\" ? window.opera : \"\");\n if (!a) {\n const navAny = nav;\n return navAny.userAgentData && navAny.userAgentData.mobile;\n }\n return /(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(a.substr(0, 4));\n }\n return false;\n}\nfunction isBrowser() {\n return typeof window !== \"undefined\" && window.document != null || typeof WorkerGlobalScope !== \"undefined\";\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/flags.js\nvar ENV2 = env();\nENV2.registerFlag(\"DEBUG\", () => false, (debugValue) => {\n if (debugValue) {\n console.warn(\"Debugging mode is ON. The output of every math call will be downloaded to CPU and checked for NaNs. This significantly impacts performance.\");\n }\n});\nENV2.registerFlag(\"IS_BROWSER\", () => isBrowser());\nENV2.registerFlag(\"IS_NODE\", () => typeof process !== \"undefined\" && typeof process.versions !== \"undefined\" && typeof process.versions.node !== \"undefined\");\nENV2.registerFlag(\"IS_CHROME\", () => typeof navigator !== \"undefined\" && navigator != null && navigator.userAgent != null && /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor));\nENV2.registerFlag(\"PROD\", () => false);\nENV2.registerFlag(\"TENSORLIKE_CHECK_SHAPE_CONSISTENCY\", () => ENV2.getBool(\"DEBUG\"));\nENV2.registerFlag(\"DEPRECATION_WARNINGS_ENABLED\", () => true);\nENV2.registerFlag(\"IS_TEST\", () => false);\nENV2.registerFlag(\"CHECK_COMPUTATION_FOR_ERRORS\", () => true);\nENV2.registerFlag(\"WRAP_TO_IMAGEBITMAP\", () => false);\nENV2.registerFlag(\"ENGINE_COMPILE_ONLY\", () => false);\nENV2.registerFlag(\"CANVAS2D_WILL_READ_FREQUENTLY_FOR_GPU\", () => false);\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/tensor_util_env.js\nfunction inferShape(val, dtype) {\n let firstElem = val;\n if (isTypedArray(val)) {\n return dtype === \"string\" ? [] : [val.length];\n }\n if (!Array.isArray(val)) {\n return [];\n }\n const shape = [];\n while (Array.isArray(firstElem) || isTypedArray(firstElem) && dtype !== \"string\") {\n shape.push(firstElem.length);\n firstElem = firstElem[0];\n }\n if (Array.isArray(val) && env().getBool(\"TENSORLIKE_CHECK_SHAPE_CONSISTENCY\")) {\n deepAssertShapeConsistency(val, shape, []);\n }\n return shape;\n}\nfunction deepAssertShapeConsistency(val, shape, indices) {\n indices = indices || [];\n if (!Array.isArray(val) && !isTypedArray(val)) {\n assert(shape.length === 0, () => `Element arr[${indices.join(\"][\")}] is a primitive, but should be an array/TypedArray of ${shape[0]} elements`);\n return;\n }\n assert(shape.length > 0, () => `Element arr[${indices.join(\"][\")}] should be a primitive, but is an array of ${val.length} elements`);\n assert(val.length === shape[0], () => `Element arr[${indices.join(\"][\")}] should have ${shape[0]} elements, but has ${val.length} elements`);\n const subShape = shape.slice(1);\n for (let i = 0; i < val.length; ++i) {\n deepAssertShapeConsistency(val[i], subShape, indices.concat(i));\n }\n}\nfunction assertDtype(expectedDtype, actualDType, argName, functionName) {\n if (expectedDtype === \"string_or_numeric\") {\n return;\n }\n if (expectedDtype == null) {\n throw new Error(`Expected dtype cannot be null.`);\n }\n if (expectedDtype !== \"numeric\" && expectedDtype !== actualDType || expectedDtype === \"numeric\" && actualDType === \"string\") {\n throw new Error(`Argument '${argName}' passed to '${functionName}' must be ${expectedDtype} tensor, but got ${actualDType} tensor`);\n }\n}\nfunction convertToTensor(x, argName, functionName, parseAsDtype = \"numeric\") {\n if (x instanceof Tensor) {\n assertDtype(parseAsDtype, x.dtype, argName, functionName);\n return x;\n }\n let inferredDtype = inferDtype(x);\n if (inferredDtype !== \"string\" && [\"bool\", \"int32\", \"float32\"].indexOf(parseAsDtype) >= 0) {\n inferredDtype = parseAsDtype;\n }\n assertDtype(parseAsDtype, inferredDtype, argName, functionName);\n if (x == null || !isTypedArray(x) && !Array.isArray(x) && typeof x !== \"number\" && typeof x !== \"boolean\" && typeof x !== \"string\") {\n const type = x == null ? \"null\" : x.constructor.name;\n throw new Error(`Argument '${argName}' passed to '${functionName}' must be a Tensor or TensorLike, but got '${type}'`);\n }\n const inferredShape = inferShape(x, inferredDtype);\n if (!isTypedArray(x) && !Array.isArray(x)) {\n x = [x];\n }\n const skipTypedArray = true;\n const values = inferredDtype !== \"string\" ? toTypedArray(x, inferredDtype) : flatten(x, [], skipTypedArray);\n return ENGINE.makeTensor(values, inferredShape, inferredDtype);\n}\nfunction convertToTensorArray(arg, argName, functionName, parseAsDtype = \"numeric\") {\n if (!Array.isArray(arg)) {\n throw new Error(`Argument ${argName} passed to ${functionName} must be a \\`Tensor[]\\` or \\`TensorLike[]\\``);\n }\n const tensors = arg;\n return tensors.map((t, i) => convertToTensor(t, `${argName}[${i}]`, functionName, parseAsDtype));\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/operation.js\nvar OP_SCOPE_SUFFIX = \"__op\";\nfunction op(f) {\n const keys = Object.keys(f);\n if (keys.length !== 1) {\n throw new Error(`Please provide an object with a single key (operation name) mapping to a function. Got an object with ${keys.length} keys.`);\n }\n let opName = keys[0];\n const fn = f[opName];\n if (opName.endsWith(\"_\")) {\n opName = opName.substring(0, opName.length - 1);\n }\n opName = opName + OP_SCOPE_SUFFIX;\n const f2 = (...args) => {\n ENGINE.startScope(opName);\n try {\n const result = fn(...args);\n if (isPromise(result)) {\n console.error(\"Cannot return a Promise inside of tidy.\");\n }\n ENGINE.endScope(result);\n return result;\n } catch (ex) {\n ENGINE.endScope(null);\n throw ex;\n }\n };\n Object.defineProperty(f2, \"name\", { value: opName, configurable: true });\n return f2;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/complex.js\nfunction complex_(real5, imag5) {\n const $real = convertToTensor(real5, \"real\", \"complex\");\n const $imag = convertToTensor(imag5, \"imag\", \"complex\");\n assertShapesMatch($real.shape, $imag.shape, `real and imag shapes, ${$real.shape} and ${$imag.shape}, must match in call to tf.complex().`);\n const inputs = { real: $real, imag: $imag };\n return ENGINE.runKernel(Complex, inputs);\n}\nvar complex = op({ complex_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/tensor_ops_util.js\nfunction makeTensor(values, shape, inferredShape, dtype) {\n if (dtype == null) {\n dtype = inferDtype(values);\n }\n if (dtype === \"complex64\") {\n throw new Error(`Cannot construct a complex64 tensor directly. Please use tf.complex(real, imag).`);\n }\n if (!isTypedArray(values) && !Array.isArray(values) && typeof values !== \"number\" && typeof values !== \"boolean\" && typeof values !== \"string\") {\n throw new Error(\"values passed to tensor(values) must be a number/boolean/string or an array of numbers/booleans/strings, or a TypedArray\");\n }\n if (shape != null) {\n assertNonNegativeIntegerDimensions(shape);\n const providedSize = sizeFromShape(shape);\n const inferredSize = sizeFromShape(inferredShape);\n assert(providedSize === inferredSize, () => `Based on the provided shape, [${shape}], the tensor should have ${providedSize} values but has ${inferredSize}`);\n for (let i = 0; i < inferredShape.length; ++i) {\n const inferred = inferredShape[i];\n const flatDimsDontMatch = i === inferredShape.length - 1 ? inferred !== sizeFromShape(shape.slice(i)) : true;\n assert(inferredShape[i] === shape[i] || !flatDimsDontMatch, () => `Error creating a new Tensor. Inferred shape (${inferredShape}) does not match the provided shape (${shape}). `);\n }\n }\n if (!isTypedArray(values) && !Array.isArray(values)) {\n values = [values];\n }\n shape = shape || inferredShape;\n values = dtype !== \"string\" ? toTypedArray(values, dtype) : flatten(values, [], true);\n return ENGINE.makeTensor(values, shape, dtype);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/tensor.js\nfunction tensor(values, shape, dtype) {\n const inferredShape = inferShape(values, dtype);\n return makeTensor(values, shape, inferredShape, dtype);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/io/types.js\nvar DTYPE_VALUE_SIZE_MAP = {\n \"float32\": 4,\n \"float16\": 2,\n \"int32\": 4,\n \"uint16\": 2,\n \"uint8\": 1,\n \"bool\": 1,\n \"complex64\": 8\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/io/io_utils.js\nvar NUM_BYTES_STRING_LENGTH = 4;\nasync function encodeWeights(tensors, group) {\n const specs = [];\n const dataPromises = [];\n const names = Array.isArray(tensors) ? tensors.map((tensor2) => tensor2.name) : Object.keys(tensors);\n for (let i = 0; i < names.length; ++i) {\n const name = names[i];\n const t = Array.isArray(tensors) ? tensors[i].tensor : tensors[name];\n if (t.dtype !== \"float32\" && t.dtype !== \"int32\" && t.dtype !== \"bool\" && t.dtype !== \"string\" && t.dtype !== \"complex64\") {\n throw new Error(`Unsupported dtype in weight '${name}': ${t.dtype}`);\n }\n const spec = { name, shape: t.shape, dtype: t.dtype };\n if (t.dtype === \"string\") {\n const utf8bytes = new Promise(async (resolve) => {\n const vals = await t.bytes();\n const totalNumBytes = vals.reduce((p2, c) => p2 + c.length, 0) + NUM_BYTES_STRING_LENGTH * vals.length;\n const bytes = new Uint8Array(totalNumBytes);\n let offset = 0;\n for (let i2 = 0; i2 < vals.length; i2++) {\n const val = vals[i2];\n const bytesOfLength = new Uint8Array(new Uint32Array([val.length]).buffer);\n bytes.set(bytesOfLength, offset);\n offset += NUM_BYTES_STRING_LENGTH;\n bytes.set(val, offset);\n offset += val.length;\n }\n resolve(bytes);\n });\n dataPromises.push(utf8bytes);\n } else {\n dataPromises.push(t.data());\n }\n if (group != null) {\n spec.group = group;\n }\n specs.push(spec);\n }\n const tensorValues = await Promise.all(dataPromises);\n return { data: concatenateTypedArrays(tensorValues), specs };\n}\nfunction decodeWeights(buffer2, specs) {\n const out = {};\n let float16Decode;\n let offset = 0;\n for (const spec of specs) {\n const name = spec.name;\n const dtype = spec.dtype;\n const shape = spec.shape;\n const size = sizeFromShape(shape);\n let values;\n if (\"quantization\" in spec) {\n const quantization = spec.quantization;\n if (quantization.dtype === \"uint8\" || quantization.dtype === \"uint16\") {\n if (!(\"min\" in quantization && \"scale\" in quantization)) {\n throw new Error(`Weight ${spec.name} with quantization ${quantization.dtype} doesn't have corresponding metadata min and scale.`);\n }\n } else if (quantization.dtype === \"float16\") {\n if (dtype !== \"float32\") {\n throw new Error(`Weight ${spec.name} is quantized with ${quantization.dtype} which only supports weights of type float32 not ${dtype}.`);\n }\n } else {\n throw new Error(`Weight ${spec.name} has unknown quantization dtype ${quantization.dtype}. Supported quantization dtypes are: 'uint8', 'uint16', and 'float16'.`);\n }\n const quantizationSizeFactor = DTYPE_VALUE_SIZE_MAP[quantization.dtype];\n const byteBuffer = buffer2.slice(offset, offset + size * quantizationSizeFactor);\n const quantizedArray = quantization.dtype === \"uint8\" ? new Uint8Array(byteBuffer) : new Uint16Array(byteBuffer);\n if (dtype === \"float32\") {\n if (quantization.dtype === \"uint8\" || quantization.dtype === \"uint16\") {\n values = new Float32Array(quantizedArray.length);\n for (let i = 0; i < quantizedArray.length; i++) {\n const v = quantizedArray[i];\n values[i] = v * quantization.scale + quantization.min;\n }\n } else if (quantization.dtype === \"float16\") {\n if (float16Decode === void 0) {\n float16Decode = getFloat16Decoder();\n }\n values = float16Decode(quantizedArray);\n } else {\n throw new Error(`Unsupported quantization type ${quantization.dtype} for weight type float32.`);\n }\n } else if (dtype === \"int32\") {\n if (quantization.dtype !== \"uint8\" && quantization.dtype !== \"uint16\") {\n throw new Error(`Unsupported quantization type ${quantization.dtype} for weight type int32.`);\n }\n values = new Int32Array(quantizedArray.length);\n for (let i = 0; i < quantizedArray.length; i++) {\n const v = quantizedArray[i];\n values[i] = Math.round(v * quantization.scale + quantization.min);\n }\n } else {\n throw new Error(`Unsupported dtype in weight '${name}': ${dtype}`);\n }\n offset += size * quantizationSizeFactor;\n } else if (dtype === \"string\") {\n const size2 = sizeFromShape(spec.shape);\n values = [];\n for (let i = 0; i < size2; i++) {\n const byteLength = new Uint32Array(buffer2.slice(offset, offset + NUM_BYTES_STRING_LENGTH))[0];\n offset += NUM_BYTES_STRING_LENGTH;\n const bytes = new Uint8Array(buffer2.slice(offset, offset + byteLength));\n values.push(bytes);\n offset += byteLength;\n }\n } else {\n const dtypeFactor = DTYPE_VALUE_SIZE_MAP[dtype];\n const byteBuffer = buffer2.slice(offset, offset + size * dtypeFactor);\n if (dtype === \"float32\") {\n values = new Float32Array(byteBuffer);\n } else if (dtype === \"int32\") {\n values = new Int32Array(byteBuffer);\n } else if (dtype === \"bool\") {\n values = new Uint8Array(byteBuffer);\n } else if (dtype === \"complex64\") {\n values = new Float32Array(byteBuffer);\n const real5 = new Float32Array(values.length / 2);\n const image2 = new Float32Array(values.length / 2);\n for (let i = 0; i < real5.length; i++) {\n real5[i] = values[i * 2];\n image2[i] = values[i * 2 + 1];\n }\n const realTensor = tensor(real5, shape, \"float32\");\n const imageTensor = tensor(image2, shape, \"float32\");\n out[name] = complex(realTensor, imageTensor);\n realTensor.dispose();\n imageTensor.dispose();\n } else {\n throw new Error(`Unsupported dtype in weight '${name}': ${dtype}`);\n }\n offset += size * dtypeFactor;\n }\n if (dtype !== \"complex64\") {\n out[name] = tensor(values, shape, dtype);\n }\n }\n return out;\n}\nfunction concatenateTypedArrays(xs) {\n if (xs === null) {\n throw new Error(`Invalid input value: ${JSON.stringify(xs)}`);\n }\n let totalByteLength = 0;\n const normalizedXs = [];\n xs.forEach((x) => {\n totalByteLength += x.byteLength;\n normalizedXs.push(x.byteLength === x.buffer.byteLength ? x : new x.constructor(x));\n if (!(x instanceof Float32Array || x instanceof Int32Array || x instanceof Uint8Array)) {\n throw new Error(`Unsupported TypedArray subtype: ${x.constructor.name}`);\n }\n });\n const y = new Uint8Array(totalByteLength);\n let offset = 0;\n normalizedXs.forEach((x) => {\n y.set(new Uint8Array(x.buffer), offset);\n offset += x.byteLength;\n });\n return y.buffer;\n}\nvar useNodeBuffer = typeof Buffer !== \"undefined\" && (typeof Blob === \"undefined\" || typeof atob === \"undefined\" || typeof btoa === \"undefined\");\nfunction stringByteLength(str) {\n if (useNodeBuffer) {\n return Buffer.byteLength(str);\n }\n return new Blob([str]).size;\n}\nfunction arrayBufferToBase64String(buffer2) {\n if (useNodeBuffer) {\n return Buffer.from(buffer2).toString(\"base64\");\n }\n const buf = new Uint8Array(buffer2);\n let s = \"\";\n for (let i = 0, l = buf.length; i < l; i++) {\n s += String.fromCharCode(buf[i]);\n }\n return btoa(s);\n}\nfunction base64StringToArrayBuffer(str) {\n if (useNodeBuffer) {\n const buf = Buffer.from(str, \"base64\");\n return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);\n }\n const s = atob(str);\n const buffer2 = new Uint8Array(s.length);\n for (let i = 0; i < s.length; ++i) {\n buffer2.set([s.charCodeAt(i)], i);\n }\n return buffer2.buffer;\n}\nfunction concatenateArrayBuffers(buffers) {\n if (buffers.length === 1) {\n return buffers[0];\n }\n let totalByteLength = 0;\n buffers.forEach((buffer2) => {\n totalByteLength += buffer2.byteLength;\n });\n const temp = new Uint8Array(totalByteLength);\n let offset = 0;\n buffers.forEach((buffer2) => {\n temp.set(new Uint8Array(buffer2), offset);\n offset += buffer2.byteLength;\n });\n return temp.buffer;\n}\nfunction basename(path) {\n const SEPARATOR = \"/\";\n path = path.trim();\n while (path.endsWith(SEPARATOR)) {\n path = path.slice(0, path.length - 1);\n }\n const items = path.split(SEPARATOR);\n return items[items.length - 1];\n}\nfunction getModelJSONForModelArtifacts(artifacts, manifest) {\n const result = {\n modelTopology: artifacts.modelTopology,\n format: artifacts.format,\n generatedBy: artifacts.generatedBy,\n convertedBy: artifacts.convertedBy,\n weightsManifest: manifest\n };\n if (artifacts.signature != null) {\n result.signature = artifacts.signature;\n }\n if (artifacts.userDefinedMetadata != null) {\n result.userDefinedMetadata = artifacts.userDefinedMetadata;\n }\n if (artifacts.modelInitializer != null) {\n result.modelInitializer = artifacts.modelInitializer;\n }\n if (artifacts.trainingConfig != null) {\n result.trainingConfig = artifacts.trainingConfig;\n }\n return result;\n}\nasync function getModelArtifactsForJSON(modelJSON, loadWeights2) {\n const modelArtifacts = {\n modelTopology: modelJSON.modelTopology,\n format: modelJSON.format,\n generatedBy: modelJSON.generatedBy,\n convertedBy: modelJSON.convertedBy\n };\n if (modelJSON.trainingConfig != null) {\n modelArtifacts.trainingConfig = modelJSON.trainingConfig;\n }\n if (modelJSON.weightsManifest != null) {\n const [weightSpecs, weightData] = await loadWeights2(modelJSON.weightsManifest);\n modelArtifacts.weightSpecs = weightSpecs;\n modelArtifacts.weightData = weightData;\n }\n if (modelJSON.signature != null) {\n modelArtifacts.signature = modelJSON.signature;\n }\n if (modelJSON.userDefinedMetadata != null) {\n modelArtifacts.userDefinedMetadata = modelJSON.userDefinedMetadata;\n }\n if (modelJSON.modelInitializer != null) {\n modelArtifacts.modelInitializer = modelJSON.modelInitializer;\n }\n return modelArtifacts;\n}\nfunction getModelArtifactsInfoForJSON(modelArtifacts) {\n if (modelArtifacts.modelTopology instanceof ArrayBuffer) {\n throw new Error(\"Expected JSON model topology, received ArrayBuffer.\");\n }\n return {\n dateSaved: new Date(),\n modelTopologyType: \"JSON\",\n modelTopologyBytes: modelArtifacts.modelTopology == null ? 0 : stringByteLength(JSON.stringify(modelArtifacts.modelTopology)),\n weightSpecsBytes: modelArtifacts.weightSpecs == null ? 0 : stringByteLength(JSON.stringify(modelArtifacts.weightSpecs)),\n weightDataBytes: modelArtifacts.weightData == null ? 0 : modelArtifacts.weightData.byteLength\n };\n}\nfunction computeFloat16MantisaTable() {\n const convertMantissa = (i) => {\n let m = i << 13;\n let e = 0;\n while ((m & 8388608) === 0) {\n e -= 8388608;\n m <<= 1;\n }\n m &= ~8388608;\n e += 947912704;\n return m | e;\n };\n const mantisaTable = new Uint32Array(2048);\n mantisaTable[0] = 0;\n for (let i = 1; i < 1024; i++) {\n mantisaTable[i] = convertMantissa(i);\n }\n for (let i = 1024; i < 2048; i++) {\n mantisaTable[i] = 939524096 + (i - 1024 << 13);\n }\n return mantisaTable;\n}\nfunction computeFloat16ExponentTable() {\n const exponentTable = new Uint32Array(64);\n exponentTable[0] = 0;\n exponentTable[31] = 1199570944;\n exponentTable[32] = 2147483648;\n exponentTable[63] = 3347054592;\n for (let i = 1; i < 31; i++) {\n exponentTable[i] = i << 23;\n }\n for (let i = 33; i < 63; i++) {\n exponentTable[i] = 2147483648 + (i - 32 << 23);\n }\n return exponentTable;\n}\nfunction computeFloat16OffsetTable() {\n const offsetTable = new Uint32Array(64);\n for (let i = 0; i < 64; i++) {\n offsetTable[i] = 1024;\n }\n offsetTable[0] = offsetTable[32] = 0;\n return offsetTable;\n}\nfunction getFloat16Decoder() {\n const mantisaTable = computeFloat16MantisaTable();\n const exponentTable = computeFloat16ExponentTable();\n const offsetTable = computeFloat16OffsetTable();\n return (quantizedArray) => {\n const buffer2 = new ArrayBuffer(4 * quantizedArray.length);\n const bufferUint32View = new Uint32Array(buffer2);\n for (let index = 0; index < quantizedArray.length; index++) {\n const float16Bits = quantizedArray[index];\n const float32Bits = mantisaTable[offsetTable[float16Bits >> 10] + (float16Bits & 1023)] + exponentTable[float16Bits >> 10];\n bufferUint32View[index] = float32Bits;\n }\n return new Float32Array(buffer2);\n };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/io/router_registry.js\nvar IORouterRegistry = class {\n constructor() {\n this.saveRouters = [];\n this.loadRouters = [];\n }\n static getInstance() {\n if (IORouterRegistry.instance == null) {\n IORouterRegistry.instance = new IORouterRegistry();\n }\n return IORouterRegistry.instance;\n }\n static registerSaveRouter(saveRouter) {\n IORouterRegistry.getInstance().saveRouters.push(saveRouter);\n }\n static registerLoadRouter(loadRouter) {\n IORouterRegistry.getInstance().loadRouters.push(loadRouter);\n }\n static getSaveHandlers(url) {\n return IORouterRegistry.getHandlers(url, \"save\");\n }\n static getLoadHandlers(url, loadOptions) {\n return IORouterRegistry.getHandlers(url, \"load\", loadOptions);\n }\n static getHandlers(url, handlerType, loadOptions) {\n const validHandlers = [];\n const routers = handlerType === \"load\" ? IORouterRegistry.getInstance().loadRouters : IORouterRegistry.getInstance().saveRouters;\n routers.forEach((router) => {\n const handler = router(url, loadOptions);\n if (handler !== null) {\n validHandlers.push(handler);\n }\n });\n return validHandlers;\n }\n};\nvar registerSaveRouter = (loudRouter) => IORouterRegistry.registerSaveRouter(loudRouter);\nvar registerLoadRouter = (loudRouter) => IORouterRegistry.registerLoadRouter(loudRouter);\nvar getSaveHandlers = (url) => IORouterRegistry.getSaveHandlers(url);\nvar getLoadHandlers = (url, loadOptions) => IORouterRegistry.getLoadHandlers(url, loadOptions);\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/io/indexed_db.js\nvar DATABASE_NAME = \"tensorflowjs\";\nvar DATABASE_VERSION = 1;\nvar MODEL_STORE_NAME = \"models_store\";\nvar INFO_STORE_NAME = \"model_info_store\";\nfunction getIndexedDBFactory() {\n if (!env().getBool(\"IS_BROWSER\")) {\n throw new Error(\"Failed to obtain IndexedDB factory because the current environmentis not a web browser.\");\n }\n const theWindow = typeof window === \"undefined\" ? self : window;\n const factory = theWindow.indexedDB || theWindow.mozIndexedDB || theWindow.webkitIndexedDB || theWindow.msIndexedDB || theWindow.shimIndexedDB;\n if (factory == null) {\n throw new Error(\"The current browser does not appear to support IndexedDB.\");\n }\n return factory;\n}\nfunction setUpDatabase(openRequest) {\n const db = openRequest.result;\n db.createObjectStore(MODEL_STORE_NAME, { keyPath: \"modelPath\" });\n db.createObjectStore(INFO_STORE_NAME, { keyPath: \"modelPath\" });\n}\nvar BrowserIndexedDB = class {\n constructor(modelPath) {\n this.indexedDB = getIndexedDBFactory();\n if (modelPath == null || !modelPath) {\n throw new Error(\"For IndexedDB, modelPath must not be null, undefined or empty.\");\n }\n this.modelPath = modelPath;\n }\n async save(modelArtifacts) {\n if (modelArtifacts.modelTopology instanceof ArrayBuffer) {\n throw new Error(\"BrowserLocalStorage.save() does not support saving model topology in binary formats yet.\");\n }\n return this.databaseAction(this.modelPath, modelArtifacts);\n }\n async load() {\n return this.databaseAction(this.modelPath);\n }\n databaseAction(modelPath, modelArtifacts) {\n return new Promise((resolve, reject) => {\n const openRequest = this.indexedDB.open(DATABASE_NAME, DATABASE_VERSION);\n openRequest.onupgradeneeded = () => setUpDatabase(openRequest);\n openRequest.onsuccess = () => {\n const db = openRequest.result;\n if (modelArtifacts == null) {\n const modelTx = db.transaction(MODEL_STORE_NAME, \"readonly\");\n const modelStore = modelTx.objectStore(MODEL_STORE_NAME);\n const getRequest = modelStore.get(this.modelPath);\n getRequest.onsuccess = () => {\n if (getRequest.result == null) {\n db.close();\n return reject(new Error(`Cannot find model with path '${this.modelPath}' in IndexedDB.`));\n } else {\n resolve(getRequest.result.modelArtifacts);\n }\n };\n getRequest.onerror = (error) => {\n db.close();\n return reject(getRequest.error);\n };\n modelTx.oncomplete = () => db.close();\n } else {\n const modelArtifactsInfo = getModelArtifactsInfoForJSON(modelArtifacts);\n const infoTx = db.transaction(INFO_STORE_NAME, \"readwrite\");\n let infoStore = infoTx.objectStore(INFO_STORE_NAME);\n const putInfoRequest = infoStore.put({ modelPath: this.modelPath, modelArtifactsInfo });\n let modelTx;\n putInfoRequest.onsuccess = () => {\n modelTx = db.transaction(MODEL_STORE_NAME, \"readwrite\");\n const modelStore = modelTx.objectStore(MODEL_STORE_NAME);\n const putModelRequest = modelStore.put({\n modelPath: this.modelPath,\n modelArtifacts,\n modelArtifactsInfo\n });\n putModelRequest.onsuccess = () => resolve({ modelArtifactsInfo });\n putModelRequest.onerror = (error) => {\n infoStore = infoTx.objectStore(INFO_STORE_NAME);\n const deleteInfoRequest = infoStore.delete(this.modelPath);\n deleteInfoRequest.onsuccess = () => {\n db.close();\n return reject(putModelRequest.error);\n };\n deleteInfoRequest.onerror = (error2) => {\n db.close();\n return reject(putModelRequest.error);\n };\n };\n };\n putInfoRequest.onerror = (error) => {\n db.close();\n return reject(putInfoRequest.error);\n };\n infoTx.oncomplete = () => {\n if (modelTx == null) {\n db.close();\n } else {\n modelTx.oncomplete = () => db.close();\n }\n };\n }\n };\n openRequest.onerror = (error) => reject(openRequest.error);\n });\n }\n};\nBrowserIndexedDB.URL_SCHEME = \"indexeddb://\";\nvar indexedDBRouter = (url) => {\n if (!env().getBool(\"IS_BROWSER\")) {\n return null;\n } else {\n if (!Array.isArray(url) && url.startsWith(BrowserIndexedDB.URL_SCHEME)) {\n return browserIndexedDB(url.slice(BrowserIndexedDB.URL_SCHEME.length));\n } else {\n return null;\n }\n }\n};\nIORouterRegistry.registerSaveRouter(indexedDBRouter);\nIORouterRegistry.registerLoadRouter(indexedDBRouter);\nfunction browserIndexedDB(modelPath) {\n return new BrowserIndexedDB(modelPath);\n}\nfunction maybeStripScheme(key) {\n return key.startsWith(BrowserIndexedDB.URL_SCHEME) ? key.slice(BrowserIndexedDB.URL_SCHEME.length) : key;\n}\nvar BrowserIndexedDBManager = class {\n constructor() {\n this.indexedDB = getIndexedDBFactory();\n }\n async listModels() {\n return new Promise((resolve, reject) => {\n const openRequest = this.indexedDB.open(DATABASE_NAME, DATABASE_VERSION);\n openRequest.onupgradeneeded = () => setUpDatabase(openRequest);\n openRequest.onsuccess = () => {\n const db = openRequest.result;\n const tx = db.transaction(INFO_STORE_NAME, \"readonly\");\n const store = tx.objectStore(INFO_STORE_NAME);\n const getAllInfoRequest = store.getAll();\n getAllInfoRequest.onsuccess = () => {\n const out = {};\n for (const item of getAllInfoRequest.result) {\n out[item.modelPath] = item.modelArtifactsInfo;\n }\n resolve(out);\n };\n getAllInfoRequest.onerror = (error) => {\n db.close();\n return reject(getAllInfoRequest.error);\n };\n tx.oncomplete = () => db.close();\n };\n openRequest.onerror = (error) => reject(openRequest.error);\n });\n }\n async removeModel(path) {\n path = maybeStripScheme(path);\n return new Promise((resolve, reject) => {\n const openRequest = this.indexedDB.open(DATABASE_NAME, DATABASE_VERSION);\n openRequest.onupgradeneeded = () => setUpDatabase(openRequest);\n openRequest.onsuccess = () => {\n const db = openRequest.result;\n const infoTx = db.transaction(INFO_STORE_NAME, \"readwrite\");\n const infoStore = infoTx.objectStore(INFO_STORE_NAME);\n const getInfoRequest = infoStore.get(path);\n let modelTx;\n getInfoRequest.onsuccess = () => {\n if (getInfoRequest.result == null) {\n db.close();\n return reject(new Error(`Cannot find model with path '${path}' in IndexedDB.`));\n } else {\n const deleteInfoRequest = infoStore.delete(path);\n const deleteModelData = () => {\n modelTx = db.transaction(MODEL_STORE_NAME, \"readwrite\");\n const modelStore = modelTx.objectStore(MODEL_STORE_NAME);\n const deleteModelRequest = modelStore.delete(path);\n deleteModelRequest.onsuccess = () => resolve(getInfoRequest.result.modelArtifactsInfo);\n deleteModelRequest.onerror = (error) => reject(getInfoRequest.error);\n };\n deleteInfoRequest.onsuccess = deleteModelData;\n deleteInfoRequest.onerror = (error) => {\n deleteModelData();\n db.close();\n return reject(getInfoRequest.error);\n };\n }\n };\n getInfoRequest.onerror = (error) => {\n db.close();\n return reject(getInfoRequest.error);\n };\n infoTx.oncomplete = () => {\n if (modelTx == null) {\n db.close();\n } else {\n modelTx.oncomplete = () => db.close();\n }\n };\n };\n openRequest.onerror = (error) => reject(openRequest.error);\n });\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/io/local_storage.js\nvar PATH_SEPARATOR = \"/\";\nvar PATH_PREFIX = \"tensorflowjs_models\";\nvar INFO_SUFFIX = \"info\";\nvar MODEL_TOPOLOGY_SUFFIX = \"model_topology\";\nvar WEIGHT_SPECS_SUFFIX = \"weight_specs\";\nvar WEIGHT_DATA_SUFFIX = \"weight_data\";\nvar MODEL_METADATA_SUFFIX = \"model_metadata\";\nfunction getModelKeys(path) {\n return {\n info: [PATH_PREFIX, path, INFO_SUFFIX].join(PATH_SEPARATOR),\n topology: [PATH_PREFIX, path, MODEL_TOPOLOGY_SUFFIX].join(PATH_SEPARATOR),\n weightSpecs: [PATH_PREFIX, path, WEIGHT_SPECS_SUFFIX].join(PATH_SEPARATOR),\n weightData: [PATH_PREFIX, path, WEIGHT_DATA_SUFFIX].join(PATH_SEPARATOR),\n modelMetadata: [PATH_PREFIX, path, MODEL_METADATA_SUFFIX].join(PATH_SEPARATOR)\n };\n}\nfunction removeItems(keys) {\n for (const key of Object.values(keys)) {\n window.localStorage.removeItem(key);\n }\n}\nfunction getModelPathFromKey(key) {\n const items = key.split(PATH_SEPARATOR);\n if (items.length < 3) {\n throw new Error(`Invalid key format: ${key}`);\n }\n return items.slice(1, items.length - 1).join(PATH_SEPARATOR);\n}\nfunction maybeStripScheme2(key) {\n return key.startsWith(BrowserLocalStorage.URL_SCHEME) ? key.slice(BrowserLocalStorage.URL_SCHEME.length) : key;\n}\nvar BrowserLocalStorage = class {\n constructor(modelPath) {\n if (!env().getBool(\"IS_BROWSER\") || typeof window === \"undefined\" || typeof window.localStorage === \"undefined\") {\n throw new Error(\"The current environment does not support local storage.\");\n }\n this.LS = window.localStorage;\n if (modelPath == null || !modelPath) {\n throw new Error(\"For local storage, modelPath must not be null, undefined or empty.\");\n }\n this.modelPath = modelPath;\n this.keys = getModelKeys(this.modelPath);\n }\n async save(modelArtifacts) {\n if (modelArtifacts.modelTopology instanceof ArrayBuffer) {\n throw new Error(\"BrowserLocalStorage.save() does not support saving model topology in binary formats yet.\");\n } else {\n const topology = JSON.stringify(modelArtifacts.modelTopology);\n const weightSpecs = JSON.stringify(modelArtifacts.weightSpecs);\n const modelArtifactsInfo = getModelArtifactsInfoForJSON(modelArtifacts);\n try {\n this.LS.setItem(this.keys.info, JSON.stringify(modelArtifactsInfo));\n this.LS.setItem(this.keys.topology, topology);\n this.LS.setItem(this.keys.weightSpecs, weightSpecs);\n this.LS.setItem(this.keys.weightData, arrayBufferToBase64String(modelArtifacts.weightData));\n const metadata = {\n format: modelArtifacts.format,\n generatedBy: modelArtifacts.generatedBy,\n convertedBy: modelArtifacts.convertedBy,\n signature: modelArtifacts.signature != null ? modelArtifacts.signature : void 0,\n userDefinedMetadata: modelArtifacts.userDefinedMetadata != null ? modelArtifacts.userDefinedMetadata : void 0,\n modelInitializer: modelArtifacts.modelInitializer != null ? modelArtifacts.modelInitializer : void 0,\n trainingConfig: modelArtifacts.trainingConfig != null ? modelArtifacts.trainingConfig : void 0\n };\n this.LS.setItem(this.keys.modelMetadata, JSON.stringify(metadata));\n return { modelArtifactsInfo };\n } catch (err) {\n removeItems(this.keys);\n throw new Error(`Failed to save model '${this.modelPath}' to local storage: size quota being exceeded is a possible cause of this failure: modelTopologyBytes=${modelArtifactsInfo.modelTopologyBytes}, weightSpecsBytes=${modelArtifactsInfo.weightSpecsBytes}, weightDataBytes=${modelArtifactsInfo.weightDataBytes}.`);\n }\n }\n }\n async load() {\n const info = JSON.parse(this.LS.getItem(this.keys.info));\n if (info == null) {\n throw new Error(`In local storage, there is no model with name '${this.modelPath}'`);\n }\n if (info.modelTopologyType !== \"JSON\") {\n throw new Error(\"BrowserLocalStorage does not support loading non-JSON model topology yet.\");\n }\n const out = {};\n const topology = JSON.parse(this.LS.getItem(this.keys.topology));\n if (topology == null) {\n throw new Error(`In local storage, the topology of model '${this.modelPath}' is missing.`);\n }\n out.modelTopology = topology;\n const weightSpecs = JSON.parse(this.LS.getItem(this.keys.weightSpecs));\n if (weightSpecs == null) {\n throw new Error(`In local storage, the weight specs of model '${this.modelPath}' are missing.`);\n }\n out.weightSpecs = weightSpecs;\n const metadataString = this.LS.getItem(this.keys.modelMetadata);\n if (metadataString != null) {\n const metadata = JSON.parse(metadataString);\n out.format = metadata.format;\n out.generatedBy = metadata.generatedBy;\n out.convertedBy = metadata.convertedBy;\n if (metadata.signature != null) {\n out.signature = metadata.signature;\n }\n if (metadata.userDefinedMetadata != null) {\n out.userDefinedMetadata = metadata.userDefinedMetadata;\n }\n if (metadata.modelInitializer != null) {\n out.modelInitializer = metadata.modelInitializer;\n }\n if (metadata.trainingConfig != null) {\n out.trainingConfig = metadata.trainingConfig;\n }\n }\n const weightDataBase64 = this.LS.getItem(this.keys.weightData);\n if (weightDataBase64 == null) {\n throw new Error(`In local storage, the binary weight values of model '${this.modelPath}' are missing.`);\n }\n out.weightData = base64StringToArrayBuffer(weightDataBase64);\n return out;\n }\n};\nBrowserLocalStorage.URL_SCHEME = \"localstorage://\";\nvar localStorageRouter = (url) => {\n if (!env().getBool(\"IS_BROWSER\")) {\n return null;\n } else {\n if (!Array.isArray(url) && url.startsWith(BrowserLocalStorage.URL_SCHEME)) {\n return browserLocalStorage(url.slice(BrowserLocalStorage.URL_SCHEME.length));\n } else {\n return null;\n }\n }\n};\nIORouterRegistry.registerSaveRouter(localStorageRouter);\nIORouterRegistry.registerLoadRouter(localStorageRouter);\nfunction browserLocalStorage(modelPath) {\n return new BrowserLocalStorage(modelPath);\n}\nvar BrowserLocalStorageManager = class {\n constructor() {\n assert(env().getBool(\"IS_BROWSER\"), () => \"Current environment is not a web browser\");\n assert(typeof window === \"undefined\" || typeof window.localStorage !== \"undefined\", () => \"Current browser does not appear to support localStorage\");\n this.LS = window.localStorage;\n }\n async listModels() {\n const out = {};\n const prefix = PATH_PREFIX + PATH_SEPARATOR;\n const suffix = PATH_SEPARATOR + INFO_SUFFIX;\n for (let i = 0; i < this.LS.length; ++i) {\n const key = this.LS.key(i);\n if (key.startsWith(prefix) && key.endsWith(suffix)) {\n const modelPath = getModelPathFromKey(key);\n out[modelPath] = JSON.parse(this.LS.getItem(key));\n }\n }\n return out;\n }\n async removeModel(path) {\n path = maybeStripScheme2(path);\n const keys = getModelKeys(path);\n if (this.LS.getItem(keys.info) == null) {\n throw new Error(`Cannot find model at path '${path}'`);\n }\n const info = JSON.parse(this.LS.getItem(keys.info));\n removeItems(keys);\n return info;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/io/model_management.js\nvar URL_SCHEME_SUFFIX = \"://\";\nvar ModelStoreManagerRegistry = class {\n constructor() {\n this.managers = {};\n }\n static getInstance() {\n if (ModelStoreManagerRegistry.instance == null) {\n ModelStoreManagerRegistry.instance = new ModelStoreManagerRegistry();\n }\n return ModelStoreManagerRegistry.instance;\n }\n static registerManager(scheme, manager) {\n assert(scheme != null, () => \"scheme must not be undefined or null.\");\n if (scheme.endsWith(URL_SCHEME_SUFFIX)) {\n scheme = scheme.slice(0, scheme.indexOf(URL_SCHEME_SUFFIX));\n }\n assert(scheme.length > 0, () => \"scheme must not be an empty string.\");\n const registry = ModelStoreManagerRegistry.getInstance();\n assert(registry.managers[scheme] == null, () => `A model store manager is already registered for scheme '${scheme}'.`);\n registry.managers[scheme] = manager;\n }\n static getManager(scheme) {\n const manager = ModelStoreManagerRegistry.getInstance().managers[scheme];\n if (manager == null) {\n throw new Error(`Cannot find model manager for scheme '${scheme}'`);\n }\n return manager;\n }\n static getSchemes() {\n return Object.keys(ModelStoreManagerRegistry.getInstance().managers);\n }\n};\nfunction parseURL(url) {\n if (url.indexOf(URL_SCHEME_SUFFIX) === -1) {\n throw new Error(`The url string provided does not contain a scheme. Supported schemes are: ${ModelStoreManagerRegistry.getSchemes().join(\",\")}`);\n }\n return {\n scheme: url.split(URL_SCHEME_SUFFIX)[0],\n path: url.split(URL_SCHEME_SUFFIX)[1]\n };\n}\nasync function cloneModelInternal(sourceURL, destURL, deleteSource = false) {\n assert(sourceURL !== destURL, () => `Old path and new path are the same: '${sourceURL}'`);\n const loadHandlers = IORouterRegistry.getLoadHandlers(sourceURL);\n assert(loadHandlers.length > 0, () => `Copying failed because no load handler is found for source URL ${sourceURL}.`);\n assert(loadHandlers.length < 2, () => `Copying failed because more than one (${loadHandlers.length}) load handlers for source URL ${sourceURL}.`);\n const loadHandler = loadHandlers[0];\n const saveHandlers = IORouterRegistry.getSaveHandlers(destURL);\n assert(saveHandlers.length > 0, () => `Copying failed because no save handler is found for destination URL ${destURL}.`);\n assert(saveHandlers.length < 2, () => `Copying failed because more than one (${loadHandlers.length}) save handlers for destination URL ${destURL}.`);\n const saveHandler = saveHandlers[0];\n const sourceScheme = parseURL(sourceURL).scheme;\n const sourcePath = parseURL(sourceURL).path;\n const sameMedium = sourceScheme === parseURL(sourceURL).scheme;\n const modelArtifacts = await loadHandler.load();\n if (deleteSource && sameMedium) {\n await ModelStoreManagerRegistry.getManager(sourceScheme).removeModel(sourcePath);\n }\n const saveResult = await saveHandler.save(modelArtifacts);\n if (deleteSource && !sameMedium) {\n await ModelStoreManagerRegistry.getManager(sourceScheme).removeModel(sourcePath);\n }\n return saveResult.modelArtifactsInfo;\n}\nasync function listModels() {\n const schemes = ModelStoreManagerRegistry.getSchemes();\n const out = {};\n for (const scheme of schemes) {\n const schemeOut = await ModelStoreManagerRegistry.getManager(scheme).listModels();\n for (const path in schemeOut) {\n const url = scheme + URL_SCHEME_SUFFIX + path;\n out[url] = schemeOut[path];\n }\n }\n return out;\n}\nasync function removeModel(url) {\n const schemeAndPath = parseURL(url);\n const manager = ModelStoreManagerRegistry.getManager(schemeAndPath.scheme);\n return manager.removeModel(schemeAndPath.path);\n}\nasync function copyModel(sourceURL, destURL) {\n const deleteSource = false;\n return cloneModelInternal(sourceURL, destURL, deleteSource);\n}\nasync function moveModel(sourceURL, destURL) {\n const deleteSource = true;\n return cloneModelInternal(sourceURL, destURL, deleteSource);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/platforms/platform_browser.js\nvar PlatformBrowser = class {\n fetch(path, init2) {\n return fetch(path, init2);\n }\n now() {\n return performance.now();\n }\n encode(text, encoding) {\n if (encoding !== \"utf-8\" && encoding !== \"utf8\") {\n throw new Error(`Browser's encoder only supports utf-8, but got ${encoding}`);\n }\n if (this.textEncoder == null) {\n this.textEncoder = new TextEncoder();\n }\n return this.textEncoder.encode(text);\n }\n decode(bytes, encoding) {\n return new TextDecoder(encoding).decode(bytes);\n }\n};\nif (env().get(\"IS_BROWSER\")) {\n env().setPlatform(\"browser\", new PlatformBrowser());\n try {\n ModelStoreManagerRegistry.registerManager(BrowserLocalStorage.URL_SCHEME, new BrowserLocalStorageManager());\n } catch (err) {\n }\n try {\n ModelStoreManagerRegistry.registerManager(BrowserIndexedDB.URL_SCHEME, new BrowserIndexedDBManager());\n } catch (err) {\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/platforms/platform_node.js\nvar getNodeFetch = {\n importFetch: () => require_browser()\n};\nvar systemFetch;\nvar PlatformNode = class {\n constructor() {\n this.util = require_util();\n this.textEncoder = new this.util.TextEncoder();\n }\n fetch(path, requestInits) {\n if (env().global.fetch != null) {\n return env().global.fetch(path, requestInits);\n }\n if (systemFetch == null) {\n systemFetch = getNodeFetch.importFetch();\n }\n return systemFetch(path, requestInits);\n }\n now() {\n const time2 = process.hrtime();\n return time2[0] * 1e3 + time2[1] / 1e6;\n }\n encode(text, encoding) {\n if (encoding !== \"utf-8\" && encoding !== \"utf8\") {\n throw new Error(`Node built-in encoder only supports utf-8, but got ${encoding}`);\n }\n return this.textEncoder.encode(text);\n }\n decode(bytes, encoding) {\n if (bytes.length === 0) {\n return \"\";\n }\n return new this.util.TextDecoder(encoding).decode(bytes);\n }\n};\nif (env().get(\"IS_NODE\") && !env().get(\"IS_BROWSER\")) {\n env().setPlatform(\"node\", new PlatformNode());\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/buffer.js\nfunction buffer(shape, dtype = \"float32\", values) {\n dtype = dtype || \"float32\";\n assertNonNegativeIntegerDimensions(shape);\n return new TensorBuffer(shape, dtype, values);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/cast.js\nfunction cast_(x, dtype) {\n const $x = convertToTensor(x, \"x\", \"cast\");\n if (!isValidDtype(dtype)) {\n throw new Error(`Failed to cast to unknown dtype ${dtype}`);\n }\n if (dtype === \"string\" && $x.dtype !== \"string\" || dtype !== \"string\" && $x.dtype === \"string\") {\n throw new Error(\"Only strings can be casted to strings\");\n }\n const inputs = { x: $x };\n const attrs = { dtype };\n return ENGINE.runKernel(Cast, inputs, attrs);\n}\nvar cast = op({ cast_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/clone.js\nfunction clone_(x) {\n const $x = convertToTensor(x, \"x\", \"clone\", \"string_or_numeric\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Identity, inputs);\n}\nvar clone = op({ clone_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/print.js\nfunction print(x, verbose = false) {\n console.log(x.toString(verbose));\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/base_side_effects.js\ngetOrMakeEngine();\nvar opHandler2 = {\n buffer,\n cast,\n clone,\n print\n};\nsetOpHandler(opHandler2);\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/io/io.js\nvar io_exports = {};\n__export(io_exports, {\n browserFiles: () => browserFiles,\n browserHTTPRequest: () => browserHTTPRequest,\n concatenateArrayBuffers: () => concatenateArrayBuffers,\n copyModel: () => copyModel,\n decodeWeights: () => decodeWeights,\n encodeWeights: () => encodeWeights,\n fromMemory: () => fromMemory,\n fromMemorySync: () => fromMemorySync,\n getLoadHandlers: () => getLoadHandlers,\n getModelArtifactsForJSON: () => getModelArtifactsForJSON,\n getModelArtifactsInfoForJSON: () => getModelArtifactsInfoForJSON,\n getSaveHandlers: () => getSaveHandlers,\n http: () => http,\n isHTTPScheme: () => isHTTPScheme,\n listModels: () => listModels,\n loadWeights: () => loadWeights,\n moveModel: () => moveModel,\n registerLoadRouter: () => registerLoadRouter,\n registerSaveRouter: () => registerSaveRouter,\n removeModel: () => removeModel,\n weightsLoaderFactory: () => weightsLoaderFactory,\n withSaveHandler: () => withSaveHandler,\n withSaveHandlerSync: () => withSaveHandlerSync\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/io/browser_files.js\nvar DEFAULT_FILE_NAME_PREFIX = \"model\";\nvar DEFAULT_JSON_EXTENSION_NAME = \".json\";\nvar DEFAULT_WEIGHT_DATA_EXTENSION_NAME = \".weights.bin\";\nfunction defer(f) {\n return new Promise((resolve) => setTimeout(resolve)).then(f);\n}\nvar BrowserDownloads = class {\n constructor(fileNamePrefix) {\n if (!env().getBool(\"IS_BROWSER\")) {\n throw new Error(\"browserDownloads() cannot proceed because the current environment is not a browser.\");\n }\n if (fileNamePrefix.startsWith(BrowserDownloads.URL_SCHEME)) {\n fileNamePrefix = fileNamePrefix.slice(BrowserDownloads.URL_SCHEME.length);\n }\n if (fileNamePrefix == null || fileNamePrefix.length === 0) {\n fileNamePrefix = DEFAULT_FILE_NAME_PREFIX;\n }\n this.modelJsonFileName = fileNamePrefix + DEFAULT_JSON_EXTENSION_NAME;\n this.weightDataFileName = fileNamePrefix + DEFAULT_WEIGHT_DATA_EXTENSION_NAME;\n }\n async save(modelArtifacts) {\n if (typeof document === \"undefined\") {\n throw new Error(\"Browser downloads are not supported in this environment since `document` is not present\");\n }\n const weightsURL = window.URL.createObjectURL(new Blob([modelArtifacts.weightData], { type: \"application/octet-stream\" }));\n if (modelArtifacts.modelTopology instanceof ArrayBuffer) {\n throw new Error(\"BrowserDownloads.save() does not support saving model topology in binary formats yet.\");\n } else {\n const weightsManifest = [{\n paths: [\"./\" + this.weightDataFileName],\n weights: modelArtifacts.weightSpecs\n }];\n const modelJSON = getModelJSONForModelArtifacts(modelArtifacts, weightsManifest);\n const modelJsonURL = window.URL.createObjectURL(new Blob([JSON.stringify(modelJSON)], { type: \"application/json\" }));\n const jsonAnchor = this.modelJsonAnchor == null ? document.createElement(\"a\") : this.modelJsonAnchor;\n jsonAnchor.download = this.modelJsonFileName;\n jsonAnchor.href = modelJsonURL;\n await defer(() => jsonAnchor.dispatchEvent(new MouseEvent(\"click\")));\n if (modelArtifacts.weightData != null) {\n const weightDataAnchor = this.weightDataAnchor == null ? document.createElement(\"a\") : this.weightDataAnchor;\n weightDataAnchor.download = this.weightDataFileName;\n weightDataAnchor.href = weightsURL;\n await defer(() => weightDataAnchor.dispatchEvent(new MouseEvent(\"click\")));\n }\n return { modelArtifactsInfo: getModelArtifactsInfoForJSON(modelArtifacts) };\n }\n }\n};\nBrowserDownloads.URL_SCHEME = \"downloads://\";\nvar BrowserFiles = class {\n constructor(files) {\n if (files == null || files.length < 1) {\n throw new Error(`When calling browserFiles, at least 1 file is required, but received ${files}`);\n }\n this.jsonFile = files[0];\n this.weightsFiles = files.slice(1);\n }\n async load() {\n return new Promise((resolve, reject) => {\n const jsonReader = new FileReader();\n jsonReader.onload = (event) => {\n const modelJSON = JSON.parse(event.target.result);\n const modelTopology = modelJSON.modelTopology;\n if (modelTopology == null) {\n reject(new Error(`modelTopology field is missing from file ${this.jsonFile.name}`));\n return;\n }\n const weightsManifest = modelJSON.weightsManifest;\n if (weightsManifest == null) {\n reject(new Error(`weightManifest field is missing from file ${this.jsonFile.name}`));\n return;\n }\n if (this.weightsFiles.length === 0) {\n resolve({ modelTopology });\n return;\n }\n const modelArtifactsPromise = getModelArtifactsForJSON(modelJSON, (weightsManifest2) => this.loadWeights(weightsManifest2));\n resolve(modelArtifactsPromise);\n };\n jsonReader.onerror = (error) => reject(`Failed to read model topology and weights manifest JSON from file '${this.jsonFile.name}'. BrowserFiles supports loading Keras-style tf.Model artifacts only.`);\n jsonReader.readAsText(this.jsonFile);\n });\n }\n loadWeights(weightsManifest) {\n const weightSpecs = [];\n const paths = [];\n for (const entry of weightsManifest) {\n weightSpecs.push(...entry.weights);\n paths.push(...entry.paths);\n }\n const pathToFile = this.checkManifestAndWeightFiles(weightsManifest);\n const promises = paths.map((path) => this.loadWeightsFile(path, pathToFile[path]));\n return Promise.all(promises).then((buffers) => [weightSpecs, concatenateArrayBuffers(buffers)]);\n }\n loadWeightsFile(path, file) {\n return new Promise((resolve, reject) => {\n const weightFileReader = new FileReader();\n weightFileReader.onload = (event) => {\n const weightData = event.target.result;\n resolve(weightData);\n };\n weightFileReader.onerror = (error) => reject(`Failed to weights data from file of path '${path}'.`);\n weightFileReader.readAsArrayBuffer(file);\n });\n }\n checkManifestAndWeightFiles(manifest) {\n const basenames = [];\n const fileNames = this.weightsFiles.map((file) => basename(file.name));\n const pathToFile = {};\n for (const group of manifest) {\n group.paths.forEach((path) => {\n const pathBasename = basename(path);\n if (basenames.indexOf(pathBasename) !== -1) {\n throw new Error(`Duplicate file basename found in weights manifest: '${pathBasename}'`);\n }\n basenames.push(pathBasename);\n if (fileNames.indexOf(pathBasename) === -1) {\n throw new Error(`Weight file with basename '${pathBasename}' is not provided.`);\n } else {\n pathToFile[path] = this.weightsFiles[fileNames.indexOf(pathBasename)];\n }\n });\n }\n if (basenames.length !== this.weightsFiles.length) {\n throw new Error(`Mismatch in the number of files in weights manifest (${basenames.length}) and the number of weight files provided (${this.weightsFiles.length}).`);\n }\n return pathToFile;\n }\n};\nvar browserDownloadsRouter = (url) => {\n if (!env().getBool(\"IS_BROWSER\")) {\n return null;\n } else {\n if (!Array.isArray(url) && url.startsWith(BrowserDownloads.URL_SCHEME)) {\n return browserDownloads(url.slice(BrowserDownloads.URL_SCHEME.length));\n } else {\n return null;\n }\n }\n};\nIORouterRegistry.registerSaveRouter(browserDownloadsRouter);\nfunction browserDownloads(fileNamePrefix = \"model\") {\n return new BrowserDownloads(fileNamePrefix);\n}\nfunction browserFiles(files) {\n return new BrowserFiles(files);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/io/progress.js\nfunction monitorPromisesProgress(promises, onProgress, startFraction, endFraction) {\n checkPromises(promises);\n startFraction = startFraction == null ? 0 : startFraction;\n endFraction = endFraction == null ? 1 : endFraction;\n checkFraction(startFraction, endFraction);\n let resolvedPromise = 0;\n const registerMonitor = (promise) => {\n promise.then((value) => {\n const fraction = startFraction + ++resolvedPromise / promises.length * (endFraction - startFraction);\n onProgress(fraction);\n return value;\n });\n return promise;\n };\n function checkPromises(promises2) {\n assert(promises2 != null && Array.isArray(promises2) && promises2.length > 0, () => \"promises must be a none empty array\");\n }\n function checkFraction(startFraction2, endFraction2) {\n assert(startFraction2 >= 0 && startFraction2 <= 1, () => `Progress fraction must be in range [0, 1], but got startFraction ${startFraction2}`);\n assert(endFraction2 >= 0 && endFraction2 <= 1, () => `Progress fraction must be in range [0, 1], but got endFraction ${endFraction2}`);\n assert(endFraction2 >= startFraction2, () => `startFraction must be no more than endFraction, but got startFraction ${startFraction2} and endFraction ${endFraction2}`);\n }\n return Promise.all(promises.map(registerMonitor));\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/io/weights_loader.js\nasync function loadWeightsAsArrayBuffer(fetchURLs, loadOptions) {\n if (loadOptions == null) {\n loadOptions = {};\n }\n const fetchFunc = loadOptions.fetchFunc == null ? env().platform.fetch : loadOptions.fetchFunc;\n const requests = fetchURLs.map((fetchURL) => fetchFunc(fetchURL, loadOptions.requestInit, { isBinary: true }));\n const fetchStartFraction = 0;\n const fetchEndFraction = 0.5;\n const responses = loadOptions.onProgress == null ? await Promise.all(requests) : await monitorPromisesProgress(requests, loadOptions.onProgress, fetchStartFraction, fetchEndFraction);\n const bufferPromises = responses.map((response) => response.arrayBuffer());\n const bufferStartFraction = 0.5;\n const bufferEndFraction = 1;\n const buffers = loadOptions.onProgress == null ? await Promise.all(bufferPromises) : await monitorPromisesProgress(bufferPromises, loadOptions.onProgress, bufferStartFraction, bufferEndFraction);\n return buffers;\n}\nasync function loadWeights(manifest, filePathPrefix = \"\", weightNames, requestInit) {\n const fetchWeights = (fetchUrls) => loadWeightsAsArrayBuffer(fetchUrls, { requestInit });\n const loadWeights2 = weightsLoaderFactory(fetchWeights);\n return loadWeights2(manifest, filePathPrefix, weightNames);\n}\nfunction weightsLoaderFactory(fetchWeightsFunction) {\n return async (manifest, filePathPrefix = \"\", weightNames) => {\n const groupIndicesToFetchMap = manifest.map(() => false);\n const groupWeightsToFetch = {};\n const weightsFound = weightNames != null ? weightNames.map(() => false) : [];\n const allManifestWeightNames = [];\n manifest.forEach((manifestGroupConfig, groupIndex) => {\n let groupOffset = 0;\n manifestGroupConfig.weights.forEach((weightsEntry) => {\n const rawDtype = \"quantization\" in weightsEntry ? weightsEntry.quantization.dtype : weightsEntry.dtype;\n const weightsBytes = DTYPE_VALUE_SIZE_MAP[rawDtype] * sizeFromShape(weightsEntry.shape);\n const enqueueWeightsForFetchingFn = () => {\n groupIndicesToFetchMap[groupIndex] = true;\n if (groupWeightsToFetch[groupIndex] == null) {\n groupWeightsToFetch[groupIndex] = [];\n }\n groupWeightsToFetch[groupIndex].push({\n manifestEntry: weightsEntry,\n groupOffset,\n sizeBytes: weightsBytes\n });\n };\n if (weightNames != null) {\n weightNames.forEach((weightName, weightIndex) => {\n if (weightName === weightsEntry.name) {\n enqueueWeightsForFetchingFn();\n weightsFound[weightIndex] = true;\n }\n });\n } else {\n enqueueWeightsForFetchingFn();\n }\n allManifestWeightNames.push(weightsEntry.name);\n groupOffset += weightsBytes;\n });\n });\n if (!weightsFound.every((found) => found)) {\n const weightsNotFound = weightNames.filter((_, i) => !weightsFound[i]);\n throw new Error(`Could not find weights in manifest with names: ${weightsNotFound.join(\", \")}. \nManifest JSON has weights with names: ${allManifestWeightNames.join(\", \")}.`);\n }\n const groupIndicesToFetch = groupIndicesToFetchMap.reduce((accumulator, shouldFetch, i) => {\n if (shouldFetch) {\n accumulator.push(i);\n }\n return accumulator;\n }, []);\n const fetchUrls = [];\n groupIndicesToFetch.forEach((i) => {\n manifest[i].paths.forEach((filepath) => {\n const fetchUrl = filePathPrefix + (!filePathPrefix.endsWith(\"/\") ? \"/\" : \"\") + filepath;\n fetchUrls.push(fetchUrl);\n });\n });\n const buffers = await fetchWeightsFunction(fetchUrls);\n const weightsTensorMap = {};\n let bufferIndexOffset = 0;\n groupIndicesToFetch.forEach((i) => {\n const numBuffers = manifest[i].paths.length;\n let groupBytes = 0;\n for (let i2 = 0; i2 < numBuffers; i2++) {\n groupBytes += buffers[bufferIndexOffset + i2].byteLength;\n }\n const groupBuffer = new ArrayBuffer(groupBytes);\n const groupByteBuffer = new Uint8Array(groupBuffer);\n let groupBufferOffset = 0;\n for (let i2 = 0; i2 < numBuffers; i2++) {\n const buffer2 = new Uint8Array(buffers[bufferIndexOffset + i2]);\n groupByteBuffer.set(buffer2, groupBufferOffset);\n groupBufferOffset += buffer2.byteLength;\n }\n const weightsEntries = groupWeightsToFetch[i];\n weightsEntries.forEach((weightsEntry) => {\n const byteBuffer = groupBuffer.slice(weightsEntry.groupOffset, weightsEntry.groupOffset + weightsEntry.sizeBytes);\n const nameToTensorMap = decodeWeights(byteBuffer, [weightsEntry.manifestEntry]);\n for (const name in nameToTensorMap) {\n weightsTensorMap[name] = nameToTensorMap[name];\n }\n });\n bufferIndexOffset += numBuffers;\n });\n return weightsTensorMap;\n };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/io/http.js\nvar OCTET_STREAM_MIME_TYPE = \"application/octet-stream\";\nvar JSON_TYPE = \"application/json\";\nvar HTTPRequest = class {\n constructor(path, loadOptions) {\n this.DEFAULT_METHOD = \"POST\";\n if (loadOptions == null) {\n loadOptions = {};\n }\n this.weightPathPrefix = loadOptions.weightPathPrefix;\n this.onProgress = loadOptions.onProgress;\n this.weightUrlConverter = loadOptions.weightUrlConverter;\n if (loadOptions.fetchFunc != null) {\n assert(typeof loadOptions.fetchFunc === \"function\", () => \"Must pass a function that matches the signature of `fetch` (see https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)\");\n this.fetch = loadOptions.fetchFunc;\n } else {\n this.fetch = env().platform.fetch;\n }\n assert(path != null && path.length > 0, () => \"URL path for http must not be null, undefined or empty.\");\n if (Array.isArray(path)) {\n assert(path.length === 2, () => `URL paths for http must have a length of 2, (actual length is ${path.length}).`);\n }\n this.path = path;\n if (loadOptions.requestInit != null && loadOptions.requestInit.body != null) {\n throw new Error(\"requestInit is expected to have no pre-existing body, but has one.\");\n }\n this.requestInit = loadOptions.requestInit || {};\n }\n async save(modelArtifacts) {\n if (modelArtifacts.modelTopology instanceof ArrayBuffer) {\n throw new Error(\"BrowserHTTPRequest.save() does not support saving model topology in binary formats yet.\");\n }\n const init2 = Object.assign({ method: this.DEFAULT_METHOD }, this.requestInit);\n init2.body = new FormData();\n const weightsManifest = [{\n paths: [\"./model.weights.bin\"],\n weights: modelArtifacts.weightSpecs\n }];\n const modelTopologyAndWeightManifest = getModelJSONForModelArtifacts(modelArtifacts, weightsManifest);\n init2.body.append(\"model.json\", new Blob([JSON.stringify(modelTopologyAndWeightManifest)], { type: JSON_TYPE }), \"model.json\");\n if (modelArtifacts.weightData != null) {\n init2.body.append(\"model.weights.bin\", new Blob([modelArtifacts.weightData], { type: OCTET_STREAM_MIME_TYPE }), \"model.weights.bin\");\n }\n const response = await this.fetch(this.path, init2);\n if (response.ok) {\n return {\n modelArtifactsInfo: getModelArtifactsInfoForJSON(modelArtifacts),\n responses: [response]\n };\n } else {\n throw new Error(`BrowserHTTPRequest.save() failed due to HTTP response status ${response.status}.`);\n }\n }\n async load() {\n const modelConfigRequest = await this.fetch(this.path, this.requestInit);\n if (!modelConfigRequest.ok) {\n throw new Error(`Request to ${this.path} failed with status code ${modelConfigRequest.status}. Please verify this URL points to the model JSON of the model to load.`);\n }\n let modelJSON;\n try {\n modelJSON = await modelConfigRequest.json();\n } catch (e) {\n let message = `Failed to parse model JSON of response from ${this.path}.`;\n if (this.path.endsWith(\".pb\")) {\n message += \" Your path contains a .pb file extension. Support for .pb models have been removed in TensorFlow.js 1.0 in favor of .json models. You can re-convert your Python TensorFlow model using the TensorFlow.js 1.0 conversion scripts or you can convert your.pb models with the 'pb2json'NPM script in the tensorflow/tfjs-converter repository.\";\n } else {\n message += \" Please make sure the server is serving valid JSON for this request.\";\n }\n throw new Error(message);\n }\n const modelTopology = modelJSON.modelTopology;\n const weightsManifest = modelJSON.weightsManifest;\n if (modelTopology == null && weightsManifest == null) {\n throw new Error(`The JSON from HTTP path ${this.path} contains neither model topology or manifest for weights.`);\n }\n return getModelArtifactsForJSON(modelJSON, (weightsManifest2) => this.loadWeights(weightsManifest2));\n }\n async loadWeights(weightsManifest) {\n const weightPath = Array.isArray(this.path) ? this.path[1] : this.path;\n const [prefix, suffix] = parseUrl(weightPath);\n const pathPrefix = this.weightPathPrefix || prefix;\n const weightSpecs = [];\n for (const entry of weightsManifest) {\n weightSpecs.push(...entry.weights);\n }\n const fetchURLs = [];\n const urlPromises = [];\n for (const weightsGroup of weightsManifest) {\n for (const path of weightsGroup.paths) {\n if (this.weightUrlConverter != null) {\n urlPromises.push(this.weightUrlConverter(path));\n } else {\n fetchURLs.push(pathPrefix + path + suffix);\n }\n }\n }\n if (this.weightUrlConverter) {\n fetchURLs.push(...await Promise.all(urlPromises));\n }\n const buffers = await loadWeightsAsArrayBuffer(fetchURLs, {\n requestInit: this.requestInit,\n fetchFunc: this.fetch,\n onProgress: this.onProgress\n });\n return [weightSpecs, concatenateArrayBuffers(buffers)];\n }\n};\nHTTPRequest.URL_SCHEME_REGEX = /^https?:\\/\\//;\nfunction parseUrl(url) {\n const lastSlash = url.lastIndexOf(\"/\");\n const lastSearchParam = url.lastIndexOf(\"?\");\n const prefix = url.substring(0, lastSlash);\n const suffix = lastSearchParam > lastSlash ? url.substring(lastSearchParam) : \"\";\n return [prefix + \"/\", suffix];\n}\nfunction isHTTPScheme(url) {\n return url.match(HTTPRequest.URL_SCHEME_REGEX) != null;\n}\nvar httpRouter = (url, loadOptions) => {\n if (typeof fetch === \"undefined\" && (loadOptions == null || loadOptions.fetchFunc == null)) {\n return null;\n } else {\n let isHTTP = true;\n if (Array.isArray(url)) {\n isHTTP = url.every((urlItem) => isHTTPScheme(urlItem));\n } else {\n isHTTP = isHTTPScheme(url);\n }\n if (isHTTP) {\n return http(url, loadOptions);\n }\n }\n return null;\n};\nIORouterRegistry.registerSaveRouter(httpRouter);\nIORouterRegistry.registerLoadRouter(httpRouter);\nfunction http(path, loadOptions) {\n return new HTTPRequest(path, loadOptions);\n}\nfunction browserHTTPRequest(path, loadOptions) {\n return http(path, loadOptions);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/io/passthrough.js\nvar PassthroughLoader = class {\n constructor(modelArtifacts) {\n this.modelArtifacts = modelArtifacts;\n }\n load() {\n return this.modelArtifacts;\n }\n};\nvar PassthroughSaver = class {\n constructor(saveHandler) {\n this.saveHandler = saveHandler;\n }\n save(modelArtifacts) {\n return this.saveHandler(modelArtifacts);\n }\n};\nvar PassthroughAsync = class {\n constructor(handler) {\n if (handler.load) {\n this.load = () => Promise.resolve(handler.load());\n }\n if (handler.save) {\n this.save = (modelArtifacts) => Promise.resolve(handler.save(modelArtifacts));\n }\n }\n};\nfunction fromMemory(modelArtifacts, weightSpecs, weightData, trainingConfig) {\n const args = arguments;\n return new PassthroughAsync(fromMemorySync(...args));\n}\nfunction fromMemorySync(modelArtifacts, weightSpecs, weightData, trainingConfig) {\n if (arguments.length === 1) {\n const isModelArtifacts = modelArtifacts.modelTopology != null || modelArtifacts.weightSpecs != null;\n if (isModelArtifacts) {\n return new PassthroughLoader(modelArtifacts);\n } else {\n console.warn(\"Please call tf.io.fromMemory() with only one argument. The argument should be of type ModelArtifacts. The multi-argument signature of tf.io.fromMemory() has been deprecated and will be removed in a future release.\");\n return new PassthroughLoader({ modelTopology: modelArtifacts });\n }\n } else {\n console.warn(\"Please call tf.io.fromMemory() with only one argument. The argument should be of type ModelArtifacts. The multi-argument signature of tf.io.fromMemory() has been deprecated and will be removed in a future release.\");\n return new PassthroughLoader({\n modelTopology: modelArtifacts,\n weightSpecs,\n weightData,\n trainingConfig\n });\n }\n}\nfunction withSaveHandler(saveHandler) {\n return new PassthroughSaver(saveHandler);\n}\nfunction withSaveHandlerSync(saveHandler) {\n return new PassthroughSaver(saveHandler);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/math.js\nvar math_exports = {};\n__export(math_exports, {\n confusionMatrix: () => confusionMatrix\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/mat_mul.js\nfunction matMul_(a, b, transposeA = false, transposeB = false) {\n let $a = convertToTensor(a, \"a\", \"matMul\");\n let $b = convertToTensor(b, \"b\", \"matMul\");\n [$a, $b] = makeTypesMatch($a, $b);\n const inputs = { a: $a, b: $b };\n const attrs = { transposeA, transposeB };\n return ENGINE.runKernel(BatchMatMul, inputs, attrs);\n}\nvar matMul = op({ matMul_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/one_hot.js\nfunction oneHot_(indices, depth, onValue = 1, offValue = 0, dtype = \"int32\") {\n if (depth < 2) {\n throw new Error(`Error in oneHot: depth must be >=2, but it is ${depth}`);\n }\n const $indices = convertToTensor(indices, \"indices\", \"oneHot\", \"int32\");\n const inputs = { indices: $indices };\n const attrs = { dtype, depth, onValue, offValue };\n return ENGINE.runKernel(OneHot, inputs, attrs);\n}\nvar oneHot = op({ oneHot_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/globals.js\nfunction enableProdMode() {\n env().set(\"PROD\", true);\n}\nfunction enableDebugMode() {\n env().set(\"DEBUG\", true);\n}\nfunction disableDeprecationWarnings() {\n env().set(\"DEPRECATION_WARNINGS_ENABLED\", false);\n console.warn(`TensorFlow.js deprecation warnings have been disabled.`);\n}\nfunction deprecationWarn(msg) {\n if (env().getBool(\"DEPRECATION_WARNINGS_ENABLED\")) {\n console.warn(msg + \" You can disable deprecation warnings with tf.disableDeprecationWarnings().\");\n }\n}\nsetDeprecationWarningFn(deprecationWarn);\nfunction disposeVariables() {\n ENGINE.disposeVariables();\n}\nfunction engine() {\n return ENGINE;\n}\nfunction memory() {\n return ENGINE.memory();\n}\nfunction profile(f) {\n return ENGINE.profile(f);\n}\nfunction tidy(nameOrFn, fn) {\n return ENGINE.tidy(nameOrFn, fn);\n}\nfunction dispose(container) {\n const tensors = getTensorsInContainer(container);\n tensors.forEach((tensor2) => tensor2.dispose());\n}\nfunction keep(result) {\n return ENGINE.keep(result);\n}\nfunction time(f) {\n return ENGINE.time(f);\n}\nfunction setBackend(backendName) {\n return ENGINE.setBackend(backendName);\n}\nfunction ready() {\n return ENGINE.ready();\n}\nfunction getBackend() {\n return ENGINE.backendName;\n}\nfunction removeBackend(name) {\n ENGINE.removeBackend(name);\n}\nfunction findBackend(name) {\n return ENGINE.findBackend(name);\n}\nfunction findBackendFactory(name) {\n return ENGINE.findBackendFactory(name);\n}\nfunction registerBackend(name, factory, priority = 1) {\n return ENGINE.registerBackend(name, factory, priority);\n}\nfunction backend() {\n return ENGINE.backend;\n}\nfunction setPlatform(platformName, platform) {\n env().setPlatform(platformName, platform);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/imag.js\nfunction imag_(input2) {\n const $input = convertToTensor(input2, \"input\", \"imag\");\n const inputs = { input: $input };\n return ENGINE.runKernel(Imag, inputs);\n}\nvar imag = op({ imag_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/neg.js\nfunction neg_(x) {\n const $x = convertToTensor(x, \"x\", \"neg\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Neg, inputs);\n}\nvar neg = op({ neg_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/real.js\nfunction real_(input2) {\n const $input = convertToTensor(input2, \"input\", \"real\");\n const inputs = { input: $input };\n return ENGINE.runKernel(Real, inputs);\n}\nvar real = op({ real_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/transpose.js\nfunction transpose_(x, perm, conjugate) {\n const $x = convertToTensor(x, \"x\", \"transpose\");\n if (perm == null) {\n perm = $x.shape.map((s, i) => i).reverse();\n }\n assert($x.rank === perm.length, () => `Error in transpose: rank of input ${$x.rank} must match length of perm ${perm}.`);\n perm.forEach((axis) => {\n assert(axis >= 0 && axis < $x.rank, () => `All entries in 'perm' must be between 0 and ${$x.rank - 1} but got ${perm}`);\n });\n if ($x.rank <= 1) {\n return $x.clone();\n }\n const inputs = { x: $x };\n const attrs = { perm };\n if ($x.dtype === \"complex64\") {\n return tidy(() => {\n let $real = real($x);\n let $imag = imag($x);\n $real = ENGINE.runKernel(Transpose, { x: $real }, attrs);\n $imag = ENGINE.runKernel(Transpose, { x: $imag }, attrs);\n if (conjugate) {\n $imag = neg($imag);\n }\n return complex($real, $imag);\n });\n }\n return ENGINE.runKernel(Transpose, inputs, attrs);\n}\nvar transpose = op({ transpose_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/confusion_matrix.js\nfunction confusionMatrix_(labels, predictions, numClasses) {\n const $labels = convertToTensor(labels, \"labels\", \"confusionMatrix\");\n const $predictions = convertToTensor(predictions, \"predictions\", \"confusionMatrix\");\n assert(numClasses == null || numClasses > 0 && Number.isInteger(numClasses), () => `If provided, numClasses must be a positive integer, but got ${numClasses}`);\n assert($labels.rank === 1, () => `Expected the rank of labels to be 1, but got ${$labels.rank}`);\n assert($predictions.rank === 1, () => `Expected the rank of predictions to be 1, but got ${$predictions.rank}`);\n assert($labels.shape[0] === $predictions.shape[0], () => `Mismatch in the number of examples: ${$labels.shape[0]} vs. ${$predictions.shape[0]}. Labels and predictions should have the same number of elements.`);\n assert(numClasses > 0 && Number.isInteger(numClasses), () => `numClasses is required to be a positive integer, but got ${numClasses}`);\n const oneHotLabels = oneHot(cast($labels, \"int32\"), numClasses);\n const oneHotPredictions = oneHot(cast($predictions, \"int32\"), numClasses);\n const oneHotLabelsT = transpose(oneHotLabels);\n const product = matMul(oneHotLabelsT, oneHotPredictions);\n return cast(product, \"int32\");\n}\nvar confusionMatrix = op({ confusionMatrix_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/broadcast_util.js\nvar broadcast_util_exports = {};\n__export(broadcast_util_exports, {\n assertAndGetBroadcastShape: () => assertAndGetBroadcastShape,\n getBroadcastDims: () => getBroadcastDims,\n getReductionAxes: () => getReductionAxes\n});\nfunction getBroadcastDims(inShape, outShape) {\n const inRank = inShape.length;\n const dims = [];\n for (let i = 0; i < inRank; i++) {\n const dim = inRank - 1 - i;\n const a = inShape[dim] || 1;\n const b = outShape[outShape.length - 1 - i] || 1;\n if (b > 1 && a === 1) {\n dims.unshift(dim);\n }\n }\n return dims;\n}\nfunction getReductionAxes(inShape, outShape) {\n const result = [];\n for (let i = 0; i < outShape.length; i++) {\n const inDim = inShape[inShape.length - i - 1];\n const outAxis = outShape.length - i - 1;\n const outDim = outShape[outAxis];\n if (inDim == null || inDim === 1 && outDim > 1) {\n result.unshift(outAxis);\n }\n }\n return result;\n}\nfunction assertAndGetBroadcastShape(shapeA, shapeB) {\n const result = [];\n const l = Math.max(shapeA.length, shapeB.length);\n for (let i = 0; i < l; i++) {\n let a = shapeA[shapeA.length - i - 1];\n if (a == null) {\n a = 1;\n }\n let b = shapeB[shapeB.length - i - 1];\n if (b == null) {\n b = 1;\n }\n if (a === 1) {\n result.unshift(b);\n } else if (b === 1) {\n result.unshift(a);\n } else if (a !== b) {\n const errMsg = `Operands could not be broadcast together with shapes ${shapeA} and ${shapeB}.`;\n throw Error(errMsg);\n } else {\n result.unshift(a);\n }\n }\n return result;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/browser.js\nvar browser_exports = {};\n__export(browser_exports, {\n fromPixels: () => fromPixels,\n fromPixelsAsync: () => fromPixelsAsync,\n toPixels: () => toPixels\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/tensor3d.js\nfunction tensor3d(values, shape, dtype) {\n assertNonNull(values);\n if (shape != null && shape.length !== 3) {\n throw new Error(\"tensor3d() requires shape to have three numbers\");\n }\n const inferredShape = inferShape(values, dtype);\n if (inferredShape.length !== 3 && inferredShape.length !== 1) {\n throw new Error(\"tensor3d() requires values to be number[][][] or flat/TypedArray\");\n }\n if (inferredShape.length === 1 && shape == null) {\n throw new Error(\"tensor3d() requires shape to be provided when `values` are a flat array\");\n }\n return makeTensor(values, shape, inferredShape, dtype);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/browser.js\nvar fromPixels2DContext;\nfunction fromPixels_(pixels, numChannels = 3) {\n if (numChannels > 4) {\n throw new Error(\"Cannot construct Tensor with more than 4 channels from pixels.\");\n }\n if (pixels == null) {\n throw new Error(\"pixels passed to tf.browser.fromPixels() can not be null\");\n }\n let isPixelData2 = false;\n let isImageData = false;\n let isVideo = false;\n let isImage = false;\n let isCanvasLike = false;\n let isImageBitmap = false;\n if (pixels.data instanceof Uint8Array) {\n isPixelData2 = true;\n } else if (typeof ImageData !== \"undefined\" && pixels instanceof ImageData) {\n isImageData = true;\n } else if (typeof HTMLVideoElement !== \"undefined\" && pixels instanceof HTMLVideoElement) {\n isVideo = true;\n } else if (typeof HTMLImageElement !== \"undefined\" && pixels instanceof HTMLImageElement) {\n isImage = true;\n } else if (pixels.getContext != null) {\n isCanvasLike = true;\n } else if (typeof ImageBitmap !== \"undefined\" && pixels instanceof ImageBitmap) {\n isImageBitmap = true;\n } else {\n throw new Error(`pixels passed to tf.browser.fromPixels() must be either an HTMLVideoElement, HTMLImageElement, HTMLCanvasElement, ImageData in browser, or OffscreenCanvas, ImageData in webworker or {data: Uint32Array, width: number, height: number}, but was ${pixels.constructor.name}`);\n }\n const kernel = getKernel(FromPixels, ENGINE.backendName);\n if (kernel != null) {\n const inputs = { pixels };\n const attrs = { numChannels };\n return ENGINE.runKernel(FromPixels, inputs, attrs);\n }\n const [width, height] = isVideo ? [\n pixels.videoWidth,\n pixels.videoHeight\n ] : [pixels.width, pixels.height];\n let vals;\n if (isCanvasLike) {\n vals = pixels.getContext(\"2d\").getImageData(0, 0, width, height).data;\n } else if (isImageData || isPixelData2) {\n vals = pixels.data;\n } else if (isImage || isVideo || isImageBitmap) {\n if (fromPixels2DContext == null) {\n if (typeof document === \"undefined\") {\n if (typeof OffscreenCanvas !== \"undefined\" && typeof OffscreenCanvasRenderingContext2D !== \"undefined\") {\n fromPixels2DContext = new OffscreenCanvas(1, 1).getContext(\"2d\");\n } else {\n throw new Error(\"Cannot parse input in current context. Reason: OffscreenCanvas Context2D rendering is not supported.\");\n }\n } else {\n fromPixels2DContext = document.createElement(\"canvas\").getContext(\"2d\", { willReadFrequently: true });\n }\n }\n fromPixels2DContext.canvas.width = width;\n fromPixels2DContext.canvas.height = height;\n fromPixels2DContext.drawImage(pixels, 0, 0, width, height);\n vals = fromPixels2DContext.getImageData(0, 0, width, height).data;\n }\n let values;\n if (numChannels === 4) {\n values = new Int32Array(vals);\n } else {\n const numPixels = width * height;\n values = new Int32Array(numPixels * numChannels);\n for (let i = 0; i < numPixels; i++) {\n for (let channel = 0; channel < numChannels; ++channel) {\n values[i * numChannels + channel] = vals[i * 4 + channel];\n }\n }\n }\n const outShape = [height, width, numChannels];\n return tensor3d(values, outShape, \"int32\");\n}\nfunction isPixelData(pixels) {\n return pixels != null && pixels.data instanceof Uint8Array;\n}\nfunction isImageBitmapFullySupported() {\n return typeof window !== \"undefined\" && typeof ImageBitmap !== \"undefined\" && window.hasOwnProperty(\"createImageBitmap\");\n}\nfunction isNonEmptyPixels(pixels) {\n return pixels != null && pixels.width !== 0 && pixels.height !== 0;\n}\nfunction canWrapPixelsToImageBitmap(pixels) {\n return isImageBitmapFullySupported() && !(pixels instanceof ImageBitmap) && isNonEmptyPixels(pixels) && !isPixelData(pixels);\n}\nasync function fromPixelsAsync(pixels, numChannels = 3) {\n let inputs = null;\n if (env().getBool(\"WRAP_TO_IMAGEBITMAP\") && canWrapPixelsToImageBitmap(pixels)) {\n let imageBitmap;\n try {\n imageBitmap = await createImageBitmap(pixels, { premultiplyAlpha: \"none\" });\n } catch (e) {\n imageBitmap = null;\n }\n if (imageBitmap != null && imageBitmap.width === pixels.width && imageBitmap.height === pixels.height) {\n inputs = imageBitmap;\n } else {\n inputs = pixels;\n }\n } else {\n inputs = pixels;\n }\n return fromPixels_(inputs, numChannels);\n}\nasync function toPixels(img, canvas) {\n let $img = convertToTensor(img, \"img\", \"toPixels\");\n if (!(img instanceof Tensor)) {\n const originalImgTensor = $img;\n $img = cast(originalImgTensor, \"int32\");\n originalImgTensor.dispose();\n }\n if ($img.rank !== 2 && $img.rank !== 3) {\n throw new Error(`toPixels only supports rank 2 or 3 tensors, got rank ${$img.rank}.`);\n }\n const [height, width] = $img.shape.slice(0, 2);\n const depth = $img.rank === 2 ? 1 : $img.shape[2];\n if (depth > 4 || depth === 2) {\n throw new Error(`toPixels only supports depth of size 1, 3 or 4 but got ${depth}`);\n }\n if ($img.dtype !== \"float32\" && $img.dtype !== \"int32\") {\n throw new Error(`Unsupported type for toPixels: ${$img.dtype}. Please use float32 or int32 tensors.`);\n }\n const data = await $img.data();\n const multiplier = $img.dtype === \"float32\" ? 255 : 1;\n const bytes = new Uint8ClampedArray(width * height * 4);\n for (let i = 0; i < height * width; ++i) {\n const rgba = [0, 0, 0, 255];\n for (let d = 0; d < depth; d++) {\n const value = data[i * depth + d];\n if ($img.dtype === \"float32\") {\n if (value < 0 || value > 1) {\n throw new Error(`Tensor values for a float32 Tensor must be in the range [0 - 1] but encountered ${value}.`);\n }\n } else if ($img.dtype === \"int32\") {\n if (value < 0 || value > 255) {\n throw new Error(`Tensor values for a int32 Tensor must be in the range [0 - 255] but encountered ${value}.`);\n }\n }\n if (depth === 1) {\n rgba[0] = value * multiplier;\n rgba[1] = value * multiplier;\n rgba[2] = value * multiplier;\n } else {\n rgba[d] = value * multiplier;\n }\n }\n const j = i * 4;\n bytes[j + 0] = Math.round(rgba[0]);\n bytes[j + 1] = Math.round(rgba[1]);\n bytes[j + 2] = Math.round(rgba[2]);\n bytes[j + 3] = Math.round(rgba[3]);\n }\n if (canvas != null) {\n canvas.width = width;\n canvas.height = height;\n const ctx = canvas.getContext(\"2d\");\n const imageData = new ImageData(bytes, width, height);\n ctx.putImageData(imageData, 0, 0);\n }\n if ($img !== img) {\n $img.dispose();\n }\n return bytes;\n}\nvar fromPixels = op({ fromPixels_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/gather_nd_util.js\nvar gather_nd_util_exports = {};\n__export(gather_nd_util_exports, {\n prepareAndValidate: () => prepareAndValidate\n});\nfunction prepareAndValidate(tensor2, indices) {\n const tensorRank = tensor2.shape.length;\n const indicesRank = indices.shape.length;\n if (tensorRank < 1) {\n throw new Error(`tf.gatherND() expects the input to be rank 1 or higher, but the rank was ${tensorRank}.`);\n }\n if (indicesRank < 1) {\n throw new Error(`tf.gatherND() expects the indices to be rank 1 or higher, but the rank was ${indicesRank}.`);\n }\n if (indices.dtype !== \"int32\") {\n throw new Error(`tf.gatherND() expects the indices to be int32 type, but the dtype was ${indices.dtype}.`);\n }\n if (indices.shape[indicesRank - 1] > tensorRank) {\n throw new Error(`index innermost dimension length must be <= tensor rank; saw: ${indices.shape[indicesRank - 1]} vs. ${tensorRank}`);\n }\n if (sizeFromShape(tensor2.shape) === 0) {\n throw new Error(`Requested more than 0 entries, but input is empty. Input shape: ${tensor2.shape}.`);\n }\n const indicesShape = indices.shape;\n const sliceRank = indicesShape[indicesShape.length - 1];\n let nResult = 1;\n for (let i = 0; i < indicesShape.length - 1; ++i) {\n nResult *= indicesShape[i];\n }\n const inputShape = tensor2.shape;\n const resultShape = indicesShape.slice();\n resultShape.pop();\n let sliceSize = 1;\n for (let i = sliceRank; i < tensorRank; ++i) {\n sliceSize *= inputShape[i];\n resultShape.push(inputShape[i]);\n }\n const strides = [\n ...computeStrides(tensor2.shape).map((stride) => stride / sliceSize),\n 1\n ].slice(0, sliceRank);\n return [resultShape, nResult, sliceSize, strides];\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/scatter_nd_util.js\nvar scatter_nd_util_exports = {};\n__export(scatter_nd_util_exports, {\n calculateShapes: () => calculateShapes,\n validateInput: () => validateInput,\n validateUpdateShape: () => validateUpdateShape\n});\nfunction validateUpdateShape(shape, indices, updates) {\n const sliceDim = indices.rank > 1 ? indices.shape[indices.rank - 1] : 1;\n const batchDim = indices.rank > 1 ? indices.rank - 1 : 1;\n const shapeError = `Must have updates.shape = indices.shape[:batchDim] + shape[sliceDim:], got updates.shape: ${updates.shape}, indices.shape: ${indices.shape}, shape: ${shape}, sliceDim: ${sliceDim}, and batchDim: ${batchDim}.`;\n if (updates.rank < batchDim) {\n throw new Error(shapeError + ` update.rank < ${batchDim}. `);\n }\n if (shape.length < sliceDim + (updates.rank - batchDim)) {\n throw new Error(shapeError + ` Output shape length < ${sliceDim + (updates.rank - batchDim)}`);\n }\n if (updates.rank !== batchDim + shape.length - sliceDim) {\n throw new Error(shapeError + ` update.rank != ${batchDim + shape.length - sliceDim}`);\n }\n for (let d = 0; d < batchDim; ++d) {\n if (updates.shape[d] !== indices.shape[d]) {\n throw new Error(shapeError + ` updates.shape[${d}] (${updates.shape[d]}) != indices.shape[${d}] (${indices.shape[d]}).`);\n }\n }\n for (let d = 0; d < updates.rank - batchDim; ++d) {\n if (updates.shape[d + batchDim] !== shape[d + sliceDim]) {\n throw new Error(shapeError + ` updates.shape[${d + batchDim}] (${updates.shape[d + batchDim]}) != shape[${d + batchDim}] (${shape[d + batchDim]})`);\n }\n }\n}\nfunction validateInput(updates, indices, shape) {\n if (indices.rank < 1) {\n throw new Error(`tf.scatterND() expects the indices to be rank 1 or higher, but the rank was ${indices.rank}.`);\n }\n if (updates.rank < 1) {\n throw new Error(`tf.scatterND() expects the updates to be rank 1 or higher, but the rank was ${updates.rank}.`);\n }\n if (indices.dtype !== \"int32\") {\n throw new Error(`The dtype of 'indices' should be int32, but got dtype: ${indices.dtype}`);\n }\n if (shape.length < 1) {\n throw new Error(`Output rank must be greater or equal to 1, but got shape: ${shape}`);\n }\n if (shape.length === 0) {\n if (indices.size === 0) {\n throw new Error(`Indices specified for empty output. indices shape: ${indices.shape}`);\n }\n if (updates.size === 0) {\n throw new Error(`Updates specified for empty output. updates shape: ${updates.shape}`);\n }\n }\n validateUpdateShape(shape, indices, updates);\n}\nfunction calculateShapes(updates, indices, shape) {\n const indicesRank = indices.shape.length;\n const sliceRank = indicesRank > 1 ? indices.shape[indicesRank - 1] : 1;\n const totalNd = shape.length;\n let sliceSize = 1;\n for (let i = sliceRank; i < totalNd; ++i) {\n sliceSize *= shape[i];\n }\n const safeSliceDim = sliceRank < 1 ? 1 : sliceRank;\n const numUpdates = sizeFromShape(indices.shape) / safeSliceDim;\n const strides = [...computeStrides(shape.slice(0, sliceRank)), 1];\n const outputSize = sizeFromShape(shape);\n return { sliceRank, numUpdates, sliceSize, strides, outputSize };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/slice_util.js\nvar slice_util_exports = {};\n__export(slice_util_exports, {\n assertParamsValid: () => assertParamsValid,\n computeFlatOffset: () => computeFlatOffset,\n computeOutShape: () => computeOutShape,\n getNormalizedAxes: () => getNormalizedAxes,\n isSliceContinous: () => isSliceContinous,\n maskToAxes: () => maskToAxes,\n parseSliceParams: () => parseSliceParams,\n sliceInfo: () => sliceInfo,\n startForAxis: () => startForAxis,\n startIndicesWithElidedDims: () => startIndicesWithElidedDims,\n stopForAxis: () => stopForAxis,\n stopIndicesWithElidedDims: () => stopIndicesWithElidedDims,\n stridesForAxis: () => stridesForAxis,\n stridesWithElidedDims: () => stridesWithElidedDims\n});\nvar NEW_AXIS = -2;\nvar SHRINK_AXIS = -1;\nfunction assertParamsValid(input2, begin, size) {\n const inputRank = input2.shape.length;\n assert(inputRank === begin.length, () => `Error in slice${inputRank}D: Length of begin ${begin} must match the rank of the array (${inputRank}).`);\n assert(inputRank === size.length, () => `Error in slice${inputRank}D: Length of size ${size} must match the rank of the array (${inputRank}).`);\n for (let i = 0; i < inputRank; ++i) {\n assert(begin[i] + size[i] <= input2.shape[i], () => `Error in slice${inputRank}D: begin[${i}] + size[${i}] (${begin[i] + size[i]}) would overflow input.shape[${i}] (${input2.shape[i]})`);\n }\n}\nfunction maskToAxes(mask) {\n const axes = [];\n let axis = 0;\n while (mask > 0) {\n if (mask & 1) {\n axes.push(axis);\n }\n mask /= 2;\n axis++;\n }\n return axes;\n}\nfunction computeOutShape(begin, end, strides) {\n const size = [];\n for (let axis = 0; axis < begin.length; axis++) {\n size[axis] = Math.ceil((end[axis] - begin[axis]) / strides[axis]);\n }\n return size;\n}\nfunction stridesWithElidedDims(strides, ellipsisInsertionIndex, numElidedAxes, inputShape) {\n const newStrides = [...strides];\n for (let i = newStrides.length; i < inputShape.length; i++) {\n newStrides.push(1);\n }\n for (let i = 0; i < numElidedAxes; i++) {\n if (i === 0) {\n newStrides[ellipsisInsertionIndex] = 1;\n } else {\n newStrides.splice(ellipsisInsertionIndex, 0, 1);\n newStrides.pop();\n }\n }\n return newStrides;\n}\nfunction unnormalizeAxis(ellipsisInsertionIndex, numElidedAxes, normalizedAxis) {\n if (normalizedAxis <= ellipsisInsertionIndex) {\n return normalizedAxis;\n }\n return normalizedAxis - (numElidedAxes - 1);\n}\nfunction getElidedAxes(numElidedAxes, ellipsisInsertionIndex) {\n const elidedAxes = [];\n for (let i = 0; i < numElidedAxes; i++) {\n elidedAxes.push(ellipsisInsertionIndex + i);\n }\n return elidedAxes;\n}\nfunction getNormalizedAxes(inputShape, ellipsisAxes, numInterpolatedAxes, begin, end, strides, beginMask, endMask, ellipsisMask) {\n const inputRank = inputShape.length;\n let normalizedBegin = new Array(inputRank), normalizedEnd = new Array(inputRank), normalizedStrides = new Array(inputRank);\n if (ellipsisAxes.length && numInterpolatedAxes > 0) {\n const fullIndex = ellipsisAxes[0];\n const numElidedAxes = numInterpolatedAxes + 1;\n normalizedBegin = startIndicesWithElidedDims(beginMask, fullIndex, numElidedAxes, begin, inputShape);\n normalizedEnd = stopIndicesWithElidedDims(endMask, fullIndex, numElidedAxes, end, inputShape);\n normalizedStrides = stridesWithElidedDims(strides, fullIndex, numElidedAxes, inputShape);\n } else {\n for (let axis = 0; axis < inputRank; axis++) {\n normalizedBegin[axis] = startForAxis(beginMask, begin, strides, inputShape, axis, ellipsisMask);\n normalizedEnd[axis] = stopForAxis(endMask, end, strides, inputShape, axis, ellipsisMask);\n normalizedStrides[axis] = stridesForAxis(strides, axis, ellipsisMask);\n }\n }\n return {\n begin: normalizedBegin,\n end: normalizedEnd,\n strides: normalizedStrides\n };\n}\nfunction startIndicesWithElidedDims(beginMask, ellipsisInsertionIndex, numElidedAxes, originalBegin, inputShape) {\n const newIndices = [...inputShape];\n const elidedAxes = getElidedAxes(numElidedAxes, ellipsisInsertionIndex);\n for (let axis = 0; axis < newIndices.length; axis++) {\n if (elidedAxes.indexOf(axis) > -1) {\n newIndices[axis] = 0;\n } else {\n const originalAxis = unnormalizeAxis(ellipsisInsertionIndex, numElidedAxes, axis);\n let originalValue = originalBegin[originalAxis];\n if (beginMask & 1 << originalAxis) {\n originalValue = 0;\n }\n newIndices[axis] = originalValue;\n }\n }\n return newIndices;\n}\nfunction stopIndicesWithElidedDims(endMask, ellipsisInsertionIndex, numElidedAxes, originalEnd, inputShape) {\n const newIndices = [...inputShape];\n const elidedAxes = getElidedAxes(numElidedAxes, ellipsisInsertionIndex);\n for (let axis = 0; axis < newIndices.length; axis++) {\n if (elidedAxes.indexOf(axis) > -1) {\n newIndices[axis] = Number.MAX_SAFE_INTEGER;\n } else {\n const originalAxis = unnormalizeAxis(ellipsisInsertionIndex, numElidedAxes, axis);\n let originalValue = originalEnd[originalAxis];\n if (endMask & 1 << originalAxis) {\n originalValue = Number.MAX_SAFE_INTEGER;\n }\n newIndices[axis] = originalValue;\n }\n }\n for (let i = 0; i < newIndices.length; i++) {\n const axisSize = inputShape[i];\n if (newIndices[i] < 0) {\n newIndices[i] += axisSize;\n }\n newIndices[i] = clamp(0, newIndices[i], inputShape[i]);\n }\n return newIndices;\n}\nfunction stridesForAxis(strides, axis, ellipsisMask) {\n let stride = strides[axis];\n if (ellipsisMask & 1 << axis || stride == null) {\n stride = 1;\n }\n return stride;\n}\nfunction startForAxis(beginMask, startIndices, strides, inputShape, axis, ellipsisMask) {\n let start = startIndices[axis];\n const stride = strides[axis] || 1;\n if (beginMask & 1 << axis || ellipsisMask & 1 << axis || start == null) {\n if (stride > 0) {\n start = Number.MIN_SAFE_INTEGER;\n } else {\n start = Number.MAX_SAFE_INTEGER;\n }\n }\n const axisSize = inputShape[axis];\n if (start < 0) {\n start += axisSize;\n }\n start = clamp(0, start, axisSize - 1);\n return start;\n}\nfunction stopForAxis(endMask, stopIndices, strides, inputShape, axis, ellipsisMask) {\n let stop = stopIndices[axis];\n const stride = strides[axis] || 1;\n if (endMask & 1 << axis || ellipsisMask & 1 << axis || stop == null) {\n if (stride > 0) {\n stop = Number.MAX_SAFE_INTEGER;\n } else {\n stop = Number.MIN_SAFE_INTEGER;\n }\n }\n const axisSize = inputShape[axis];\n if (stop < 0) {\n stop += axisSize;\n }\n if (stride > 0) {\n stop = clamp(0, stop, axisSize);\n } else {\n stop = clamp(-1, stop, axisSize - 1);\n }\n return stop;\n}\nfunction isSliceContinous(shape, begin, size) {\n let firstNonOneAxis = size.length;\n for (let i = 0; i < size.length; i++) {\n if (size[i] > 1) {\n firstNonOneAxis = i;\n break;\n }\n }\n for (let i = firstNonOneAxis + 1; i < size.length; i++) {\n if (begin[i] > 0 || size[i] !== shape[i]) {\n return false;\n }\n }\n return true;\n}\nfunction computeFlatOffset(begin, strides) {\n let flatOffset = begin.length > 0 ? begin[begin.length - 1] : 1;\n for (let i = 0; i < begin.length - 1; i++) {\n flatOffset += begin[i] * strides[i];\n }\n return flatOffset;\n}\nfunction parseSliceParams(x, begin, size) {\n let begin_;\n const xRank = x.shape.length;\n if (typeof begin === \"number\") {\n begin_ = [begin, ...new Array(xRank - 1).fill(0)];\n } else if (begin.length < xRank) {\n begin_ = begin.concat(new Array(xRank - begin.length).fill(0));\n } else {\n begin_ = begin.slice();\n }\n begin_.forEach((d) => {\n assert(d !== -1, () => \"slice() does not support negative begin indexing.\");\n });\n let size_;\n if (size == null) {\n size_ = new Array(xRank).fill(-1);\n } else if (typeof size === \"number\") {\n size_ = [size, ...new Array(xRank - 1).fill(-1)];\n } else if (size.length < xRank) {\n size_ = size.concat(new Array(xRank - size.length).fill(-1));\n } else {\n size_ = size;\n }\n size_ = size_.map((d, i) => {\n if (d >= 0) {\n return d;\n } else {\n assert(d === -1, () => `Negative size values should be exactly -1 but got ${d} for the slice() size at index ${i}.`);\n return x.shape[i] - begin_[i];\n }\n });\n return [begin_, size_];\n}\nfunction sliceInfo(xShape, begin, end, strides, beginMask, endMask, ellipsisMask, newAxisMask, shrinkAxisMask) {\n let stridesNonNull;\n if (strides == null) {\n stridesNonNull = new Array(begin.length);\n stridesNonNull.fill(1);\n } else {\n stridesNonNull = strides;\n }\n if (ellipsisMask != null && (ellipsisMask & ellipsisMask - 1) !== 0) {\n throw new Error(\"Multiple ellipses in slice is not allowed.\");\n }\n let ellipsisSeen = false;\n const sparseSpec = {\n dims: stridesNonNull.length,\n numAddAxisAfterEllipsis: 0,\n begin: begin.slice(),\n end: end.slice(),\n strides: stridesNonNull.slice(),\n beginMask,\n endMask,\n ellipsisMask,\n newAxisMask,\n shrinkAxisMask\n };\n for (let i = 0; i < sparseSpec.dims; i++) {\n if (ellipsisSeen && (1 << i & newAxisMask) !== 0) {\n sparseSpec.numAddAxisAfterEllipsis++;\n }\n if (1 << i & ellipsisMask) {\n ellipsisSeen = true;\n }\n }\n if (!ellipsisSeen) {\n sparseSpec.ellipsisMask |= 1 << sparseSpec.dims;\n sparseSpec.dims++;\n }\n const denseSpec = {\n dims: xShape.length,\n beginMask: 0,\n endMask: 0,\n beginValid: false,\n endValid: false\n };\n buildDenseSpec(sparseSpec, denseSpec);\n let isIdentity = true;\n let sliceDim0 = true;\n let isSimpleSlice = true;\n const processingShape = [];\n const finalShape = [];\n for (let i = 0; i < xShape.length; ++i) {\n if (denseSpec.strides[i] === 0) {\n throw Error(`strides[${i}] must be non-zero`);\n }\n const shrinkI = !!(denseSpec.shrinkAxisMask & 1 << i);\n const dimI = xShape[i];\n if (dimI === -1) {\n processingShape.push(shrinkI ? 1 : -1);\n continue;\n }\n const masks = [denseSpec.beginMask & 1 << i, denseSpec.endMask & 1 << i];\n const validRange = [\n denseSpec.strides[i] > 0 ? 0 : -1,\n denseSpec.strides[i] > 0 ? dimI : dimI - 1\n ];\n if (shrinkI && denseSpec.strides[i] <= 0) {\n throw Error(\"only stride 1 allowed on non-range indexing.\");\n }\n isSimpleSlice = isSimpleSlice && denseSpec.strides[i] === 1;\n const beginAndEndMasked = !!(denseSpec.beginMask & 1 << i && denseSpec.endMask & 1 << i);\n if (denseSpec.beginValid && denseSpec.endValid) {\n if (shrinkI) {\n const xFwd = denseSpec.begin[i] < 0 ? dimI + denseSpec.begin[i] : denseSpec.begin[i];\n denseSpec.begin[i] = xFwd;\n denseSpec.end[i] = denseSpec.begin[i] + 1;\n if (xFwd < 0 || xFwd >= dimI) {\n throw Error(`slice index ${denseSpec.begin[i]} of dimension ${i} out of bounds.`);\n }\n } else {\n denseSpec.begin[i] = canonical(denseSpec.begin[i], 0, denseSpec.strides[i], dimI, masks, validRange);\n denseSpec.end[i] = canonical(denseSpec.end[i], 1, denseSpec.strides[i], dimI, masks, validRange);\n }\n const takeAllInDimension = denseSpec.strides[i] === 1 && denseSpec.begin[i] === 0 && denseSpec.end[i] === dimI;\n isIdentity = isIdentity && takeAllInDimension;\n sliceDim0 = sliceDim0 && (i === 0 && denseSpec.strides[i] === 1 || takeAllInDimension);\n } else {\n isIdentity = isIdentity && (denseSpec.strides[i] === 1 && beginAndEndMasked);\n sliceDim0 = sliceDim0 && (i === 0 && denseSpec.strides[i] === 1 || beginAndEndMasked);\n }\n let intervalLength;\n let knownInterval = false;\n if (denseSpec.beginValid && denseSpec.endValid) {\n intervalLength = denseSpec.end[i] - denseSpec.begin[i];\n knownInterval = true;\n } else if (shrinkI) {\n intervalLength = 1;\n knownInterval = true;\n } else if (beginAndEndMasked) {\n if (dimI >= 0) {\n if (denseSpec.strides[i] < 0) {\n intervalLength = -dimI;\n } else {\n intervalLength = dimI;\n }\n knownInterval = true;\n }\n }\n if (knownInterval) {\n let sizeI;\n if (intervalLength === 0 || intervalLength < 0 !== denseSpec.strides[i] < 0) {\n sizeI = 0;\n } else {\n sizeI = Math.trunc(intervalLength / denseSpec.strides[i]) + (intervalLength % denseSpec.strides[i] !== 0 ? 1 : 0);\n }\n processingShape.push(sizeI);\n } else {\n processingShape.push(-1);\n }\n }\n for (let denseDim = 0; denseDim < denseSpec.finalShapeGatherIndices.length; ++denseDim) {\n const gatherIndex = denseSpec.finalShapeGatherIndices[denseDim];\n if (gatherIndex >= 0) {\n finalShape.push(processingShape[gatherIndex]);\n } else if (gatherIndex === NEW_AXIS) {\n finalShape.push(1);\n }\n }\n const finalShapeSparse = finalShape.filter((dim, i) => denseSpec.finalShapeGatherIndices[i] !== NEW_AXIS);\n return {\n finalShapeSparse,\n finalShape,\n isIdentity,\n sliceDim0,\n isSimpleSlice,\n begin: denseSpec.begin,\n end: denseSpec.end,\n strides: denseSpec.strides\n };\n}\nfunction buildDenseSpec(sparse2, dense2) {\n dense2.beginMask = 0;\n dense2.endMask = 0;\n dense2.shrinkAxisMask = 0;\n let fullIndex = 0;\n dense2.beginValid = sparse2.begin != null;\n dense2.endValid = sparse2.end != null;\n dense2.begin = new Array(dense2.dims);\n dense2.end = new Array(dense2.dims);\n dense2.strides = new Array(dense2.dims);\n dense2.finalShapeGatherIndices = [];\n dense2.finalShapeGatherIndicesSparse = [];\n dense2.inputShapeGatherIndicesSparse = new Array(dense2.dims);\n for (let i = 0; i < sparse2.dims; i++) {\n if (1 << i & sparse2.ellipsisMask) {\n const nextIndex = Math.min(dense2.dims - (sparse2.dims - i) + 1 + sparse2.numAddAxisAfterEllipsis, dense2.dims);\n for (; fullIndex < nextIndex; fullIndex++) {\n dense2.begin[fullIndex] = 0;\n dense2.end[fullIndex] = 0;\n dense2.strides[fullIndex] = 1;\n dense2.beginMask |= 1 << fullIndex;\n dense2.endMask |= 1 << fullIndex;\n dense2.finalShapeGatherIndices.push(fullIndex);\n dense2.finalShapeGatherIndicesSparse.push(-1);\n dense2.inputShapeGatherIndicesSparse[fullIndex] = i;\n }\n } else if (1 << i & sparse2.newAxisMask) {\n dense2.finalShapeGatherIndices.push(NEW_AXIS);\n dense2.finalShapeGatherIndicesSparse.push(-1);\n } else {\n if (fullIndex === dense2.begin.length) {\n throw Error(`Index out of range using input dim ${fullIndex}; input has only ${dense2.dims} dims, ${dense2.begin.length}.`);\n }\n if (sparse2.begin != null) {\n dense2.begin[fullIndex] = sparse2.begin[i];\n }\n if (sparse2.end != null) {\n dense2.end[fullIndex] = sparse2.end[i];\n }\n dense2.strides[fullIndex] = sparse2.strides[i];\n if (sparse2.beginMask & 1 << i) {\n dense2.beginMask |= 1 << fullIndex;\n }\n if (sparse2.endMask & 1 << i) {\n dense2.endMask |= 1 << fullIndex;\n }\n if (sparse2.shrinkAxisMask & 1 << i) {\n dense2.finalShapeGatherIndices.push(SHRINK_AXIS);\n dense2.finalShapeGatherIndicesSparse.push(-1);\n dense2.shrinkAxisMask |= 1 << fullIndex;\n } else {\n dense2.finalShapeGatherIndices.push(fullIndex);\n dense2.finalShapeGatherIndicesSparse.push(i);\n }\n dense2.inputShapeGatherIndicesSparse[fullIndex] = i;\n fullIndex++;\n }\n }\n}\nfunction canonical(x, c, strideI, dimI, masks, validRange) {\n if (masks[c]) {\n return strideI > 0 ? validRange[c] : validRange[c + 1 & 1];\n } else {\n const xFwd = x < 0 ? dimI + x : x;\n return xFwd < validRange[0] ? validRange[0] : xFwd > validRange[1] ? validRange[1] : xFwd;\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/serialization.js\nvar serialization_exports = {};\n__export(serialization_exports, {\n Serializable: () => Serializable,\n SerializationMap: () => SerializationMap,\n registerClass: () => registerClass\n});\nvar Serializable = class {\n getClassName() {\n return this.constructor.className;\n }\n static fromConfig(cls, config) {\n return new cls(config);\n }\n};\nvar SerializationMap = class {\n constructor() {\n this.classNameMap = {};\n }\n static getMap() {\n if (SerializationMap.instance == null) {\n SerializationMap.instance = new SerializationMap();\n }\n return SerializationMap.instance;\n }\n static register(cls) {\n SerializationMap.getMap().classNameMap[cls.className] = [cls, cls.fromConfig];\n }\n};\nfunction registerClass(cls) {\n assert(cls.className != null, () => `Class being registered does not have the static className property defined.`);\n assert(typeof cls.className === \"string\", () => `className is required to be a string, but got type ` + typeof cls.className);\n assert(cls.className.length > 0, () => `Class being registered has an empty-string as its className, which is disallowed.`);\n SerializationMap.register(cls);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/test_util.js\nvar test_util_exports = {};\n__export(test_util_exports, {\n TEST_EPSILON_FLOAT16: () => TEST_EPSILON_FLOAT16,\n createVideoElement: () => createVideoElement,\n encodeStrings: () => encodeStrings,\n expectArrayBuffersEqual: () => expectArrayBuffersEqual,\n expectArraysClose: () => expectArraysClose,\n expectArraysEqual: () => expectArraysEqual,\n expectNumbersClose: () => expectNumbersClose,\n expectPromiseToFail: () => expectPromiseToFail,\n expectValuesInRange: () => expectValuesInRange,\n play: () => play,\n testEpsilon: () => testEpsilon\n});\nvar TEST_EPSILON_FLOAT32 = 1e-3;\nvar TEST_EPSILON_FLOAT16 = 0.1;\nfunction expectArraysClose(actual, expected, epsilon3) {\n if (epsilon3 == null) {\n epsilon3 = testEpsilon();\n }\n return expectArraysPredicate(actual, expected, (a, b) => areClose(a, b, epsilon3));\n}\nfunction testEpsilon() {\n return ENGINE.backend.floatPrecision() === 32 ? TEST_EPSILON_FLOAT32 : TEST_EPSILON_FLOAT16;\n}\nfunction expectArraysPredicate(actual, expected, predicate) {\n let checkClassType = true;\n if (isTypedArray(actual) || isTypedArray(expected)) {\n checkClassType = false;\n }\n if (isTypedArray(actual) && isTypedArray(expected)) {\n checkClassType = true;\n }\n if (checkClassType) {\n const aType = actual.constructor.name;\n const bType = expected.constructor.name;\n if (aType !== bType) {\n throw new Error(`Arrays are of different type. Actual: ${aType}. Expected: ${bType}`);\n }\n }\n if (Array.isArray(actual) && Array.isArray(expected)) {\n const actualShape = inferShape(actual);\n const expectedShape = inferShape(expected);\n if (!arraysEqual(actualShape, expectedShape)) {\n throw new Error(`Arrays have different shapes. Actual: [${actualShape}]. Expected: [${expectedShape}]`);\n }\n }\n const actualFlat = isTypedArray(actual) ? actual : flatten(actual);\n const expectedFlat = isTypedArray(expected) ? expected : flatten(expected);\n if (actualFlat.length !== expectedFlat.length) {\n throw new Error(`Arrays have different lengths actual: ${actualFlat.length} vs expected: ${expectedFlat.length}.\nActual: ${actualFlat}.\nExpected: ${expectedFlat}.`);\n }\n for (let i = 0; i < expectedFlat.length; ++i) {\n const a = actualFlat[i];\n const e = expectedFlat[i];\n if (!predicate(a, e)) {\n throw new Error(`Arrays differ: actual[${i}] = ${a}, expected[${i}] = ${e}.\nActual: ${actualFlat}.\nExpected: ${expectedFlat}.`);\n }\n }\n if (typeof expect !== \"undefined\") {\n expect().nothing();\n }\n}\nfunction expectPromiseToFail(fn, done) {\n fn().then(() => done.fail(), () => done());\n if (typeof expect !== \"undefined\") {\n expect().nothing();\n }\n}\nfunction expectArraysEqual(actual, expected) {\n const exp5 = typeof expected === \"string\" || typeof expected === \"number\" || typeof expected === \"boolean\" ? [expected] : expected;\n if (isString(actual) || isString(actual[0]) || isString(expected) || isString(expected[0])) {\n return expectArraysPredicate(actual, exp5, (a, b) => a == b);\n }\n return expectArraysPredicate(actual, expected, (a, b) => areClose(a, b, 0));\n}\nfunction expectNumbersClose(a, e, epsilon3) {\n if (epsilon3 == null) {\n epsilon3 = testEpsilon();\n }\n if (!areClose(a, e, epsilon3)) {\n throw new Error(`Numbers differ: actual === ${a}, expected === ${e}`);\n }\n if (typeof expect !== \"undefined\") {\n expect().nothing();\n }\n}\nfunction areClose(a, e, epsilon3) {\n if (!isFinite(a) && !isFinite(e)) {\n return true;\n }\n if (isNaN(a) || isNaN(e) || Math.abs(a - e) > epsilon3) {\n return false;\n }\n return true;\n}\nfunction expectValuesInRange(actual, low, high) {\n for (let i = 0; i < actual.length; i++) {\n if (actual[i] < low || actual[i] > high) {\n throw new Error(`Value out of range:${actual[i]} low: ${low}, high: ${high}`);\n }\n }\n}\nfunction expectArrayBuffersEqual(actual, expected) {\n const actualArray = new Float32Array(actual);\n const expectedArray = new Float32Array(expected);\n if (actualArray.length !== expectedArray.length) {\n throw new Error(`Expected ArrayBuffer to be of length ${expectedArray.length}, but it was ${actualArray.length}`);\n }\n for (let i = 0; i < expectedArray.length; i++) {\n if (actualArray[i] !== expectedArray[i]) {\n throw new Error(`Expected ArrayBuffer value at ${i} to be ${expectedArray[i]} but got ${actualArray[i]} instead`);\n }\n }\n}\nfunction encodeStrings(a) {\n for (let i = 0; i < a.length; i++) {\n const val = a[i];\n if (Array.isArray(val)) {\n encodeStrings(val);\n } else {\n a[i] = encodeString(val);\n }\n }\n return a;\n}\nfunction createVideoElement(source) {\n const video = document.createElement(\"video\");\n if (\"playsInline\" in video) {\n video.playsInline = true;\n }\n video.muted = true;\n video.loop = true;\n video.style.position = \"fixed\";\n video.style.left = \"0px\";\n video.style.top = \"0px\";\n video.preload = \"auto\";\n video.appendChild(source);\n return new Promise((resolve) => {\n video.addEventListener(\"loadeddata\", (_) => resolve(video));\n video.load();\n });\n}\nasync function play(video) {\n await video.play();\n if (\"requestVideoFrameCallback\" in video) {\n await new Promise((resolve) => {\n video.requestVideoFrameCallback(resolve);\n });\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/version.js\nvar version = \"3.20.0\";\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/add.js\nfunction add_(a, b) {\n let $a = convertToTensor(a, \"a\", \"add\");\n let $b = convertToTensor(b, \"b\", \"add\");\n [$a, $b] = makeTypesMatch($a, $b);\n const inputs = { a: $a, b: $b };\n return ENGINE.runKernel(Add, inputs);\n}\nvar add2 = op({ add_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/floorDiv.js\nfunction floorDiv_(a, b) {\n let $a = convertToTensor(a, \"a\", \"floorDiv\");\n let $b = convertToTensor(b, \"b\", \"floorDiv\");\n [$a, $b] = makeTypesMatch($a, $b);\n const inputs = { a: $a, b: $b };\n return ENGINE.runKernel(FloorDiv, inputs);\n}\nvar floorDiv = op({ floorDiv_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/div.js\nfunction div_(a, b) {\n let $a = convertToTensor(a, \"a\", \"div\");\n let $b = convertToTensor(b, \"b\", \"div\");\n [$a, $b] = makeTypesMatch($a, $b);\n if ($a.dtype === \"int32\" && $b.dtype === \"int32\") {\n return floorDiv($a, $b);\n }\n const inputs = { a: $a, b: $b };\n const attrs = {};\n return ENGINE.runKernel(RealDiv, inputs, attrs);\n}\nvar div = op({ div_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/mul.js\nfunction mul_(a, b) {\n let $a = convertToTensor(a, \"a\", \"mul\");\n let $b = convertToTensor(b, \"b\", \"mul\");\n [$a, $b] = makeTypesMatch($a, $b);\n const inputs = { a: $a, b: $b };\n return ENGINE.runKernel(Multiply, inputs);\n}\nvar mul = op({ mul_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/abs.js\nfunction abs_(x) {\n const $x = convertToTensor(x, \"x\", \"abs\");\n if ($x.dtype === \"complex64\") {\n const inputs = { x: $x };\n return ENGINE.runKernel(ComplexAbs, inputs);\n } else {\n const inputs = { x: $x };\n return ENGINE.runKernel(Abs, inputs);\n }\n}\nvar abs = op({ abs_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/acos.js\nfunction acos_(x) {\n const $x = convertToTensor(x, \"x\", \"acos\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Acos, inputs);\n}\nvar acos = op({ acos_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/acosh.js\nfunction acosh_(x) {\n const $x = convertToTensor(x, \"x\", \"acosh\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Acosh, inputs);\n}\nvar acosh = op({ acosh_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/add_n.js\nfunction addN_(tensors) {\n assert(Array.isArray(tensors), () => \"The argument passed to tf.addN() must be a list of tensors\");\n assert(tensors.length >= 1, () => `Must pass at least one tensor to tf.addN(), but got ${tensors.length}`);\n const $tensors = tensors.map((t, i) => convertToTensor(t, `tensors${i}`, \"addN\"));\n const firstTensor = $tensors[0];\n $tensors.forEach((t) => {\n if (t.dtype !== firstTensor.dtype) {\n throw new Error(\"All tensors passed to tf.addN() must have the same dtype\");\n }\n });\n $tensors.forEach((t) => {\n if (!arraysEqual(t.shape, firstTensor.shape)) {\n throw new Error(\"All tensors passed to tf.addN() must have the same shape\");\n }\n });\n const inputs = $tensors;\n return ENGINE.runKernel(AddN, inputs);\n}\nvar addN = op({ addN_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/all.js\nfunction all_(x, axis = null, keepDims = false) {\n const $x = convertToTensor(x, \"x\", \"all\", \"bool\");\n const inputs = { x: $x };\n const attrs = { axis, keepDims };\n return ENGINE.runKernel(All, inputs, attrs);\n}\nvar all = op({ all_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/any.js\nfunction any_(x, axis = null, keepDims = false) {\n const $x = convertToTensor(x, \"x\", \"any\", \"bool\");\n const inputs = { x: $x };\n const attrs = { axis, keepDims };\n return ENGINE.runKernel(Any, inputs, attrs);\n}\nvar any = op({ any_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/arg_max.js\nfunction argMax_(x, axis = 0) {\n const $x = convertToTensor(x, \"x\", \"argMax\");\n const inputs = { x: $x };\n const attrs = { axis };\n return ENGINE.runKernel(ArgMax, inputs, attrs);\n}\nvar argMax = op({ argMax_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/arg_min.js\nfunction argMin_(x, axis = 0) {\n const $x = convertToTensor(x, \"x\", \"argMin\");\n const inputs = { x: $x };\n const attrs = { axis };\n return ENGINE.runKernel(ArgMin, inputs, attrs);\n}\nvar argMin = op({ argMin_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/asin.js\nfunction asin_(x) {\n const $x = convertToTensor(x, \"x\", \"asin\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Asin, inputs);\n}\nvar asin = op({ asin_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/asinh.js\nfunction asinh_(x) {\n const $x = convertToTensor(x, \"x\", \"asinh\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Asinh, inputs);\n}\nvar asinh = op({ asinh_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/atan.js\nfunction atan_(x) {\n const $x = convertToTensor(x, \"x\", \"atan\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Atan, inputs);\n}\nvar atan = op({ atan_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/atan2.js\nfunction atan2_(a, b) {\n let $a = convertToTensor(a, \"a\", \"atan2\");\n let $b = convertToTensor(b, \"b\", \"atan2\");\n [$a, $b] = makeTypesMatch($a, $b);\n const inputs = { a: $a, b: $b };\n return ENGINE.runKernel(Atan2, inputs);\n}\nvar atan2 = op({ atan2_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/atanh.js\nfunction atanh_(x) {\n const $x = convertToTensor(x, \"x\", \"atanh\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Atanh, inputs);\n}\nvar atanh = op({ atanh_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/conv_util.js\nfunction computeDilation2DInfo(inputShape, filterShape, strides, pad3, dataFormat = \"NHWC\", dilations) {\n const inputChannels = inputShape[3];\n const $filterShape = [...filterShape, inputChannels];\n const $dataFormat = convertConv2DDataFormat(dataFormat);\n return computeConv2DInfo(inputShape, $filterShape, strides, dilations, pad3, null, null, $dataFormat);\n}\nfunction computePool2DInfo(inShape, filterSize, strides, dilations, pad3, roundingMode, dataFormat = \"channelsLast\") {\n const [filterHeight, filterWidth] = parseTupleParam(filterSize);\n let filterShape;\n if (dataFormat === \"channelsLast\") {\n filterShape = [filterHeight, filterWidth, inShape[3], inShape[3]];\n } else if (dataFormat === \"channelsFirst\") {\n filterShape = [filterHeight, filterWidth, inShape[1], inShape[1]];\n } else {\n throw new Error(`Unknown dataFormat ${dataFormat}`);\n }\n return computeConv2DInfo(inShape, filterShape, strides, dilations, pad3, roundingMode, false, dataFormat);\n}\nfunction computePool3DInfo(inShape, filterSize, strides, dilations, pad3, roundingMode, dataFormat = \"NDHWC\") {\n const [filterDepth, filterHeight, filterWidth] = parse3TupleParam(filterSize);\n let filterShape;\n let $dataFormat;\n if (dataFormat === \"NDHWC\") {\n $dataFormat = \"channelsLast\";\n filterShape = [filterDepth, filterHeight, filterWidth, inShape[4], inShape[4]];\n } else if (dataFormat === \"NCDHW\") {\n $dataFormat = \"channelsFirst\";\n filterShape = [filterDepth, filterHeight, filterWidth, inShape[1], inShape[1]];\n } else {\n throw new Error(`Unknown dataFormat ${dataFormat}`);\n }\n return computeConv3DInfo(inShape, filterShape, strides, dilations, pad3, false, $dataFormat, roundingMode);\n}\nfunction computeConv2DInfo(inShape, filterShape, strides, dilations, pad3, roundingMode, depthwise = false, dataFormat = \"channelsLast\") {\n let [batchSize, inHeight, inWidth, inChannels] = [-1, -1, -1, -1];\n if (dataFormat === \"channelsLast\") {\n [batchSize, inHeight, inWidth, inChannels] = inShape;\n } else if (dataFormat === \"channelsFirst\") {\n [batchSize, inChannels, inHeight, inWidth] = inShape;\n } else {\n throw new Error(`Unknown dataFormat ${dataFormat}`);\n }\n const [filterHeight, filterWidth, , filterChannels] = filterShape;\n const [strideHeight, strideWidth] = parseTupleParam(strides);\n const [dilationHeight, dilationWidth] = parseTupleParam(dilations);\n const effectiveFilterHeight = getEffectiveFilterSize(filterHeight, dilationHeight);\n const effectiveFilterWidth = getEffectiveFilterSize(filterWidth, dilationWidth);\n const { padInfo, outHeight, outWidth } = getPadAndOutInfo(pad3, inHeight, inWidth, strideHeight, strideWidth, effectiveFilterHeight, effectiveFilterWidth, roundingMode, dataFormat);\n const outChannels = depthwise ? filterChannels * inChannels : filterChannels;\n let outShape;\n if (dataFormat === \"channelsFirst\") {\n outShape = [batchSize, outChannels, outHeight, outWidth];\n } else if (dataFormat === \"channelsLast\") {\n outShape = [batchSize, outHeight, outWidth, outChannels];\n }\n return {\n batchSize,\n dataFormat,\n inHeight,\n inWidth,\n inChannels,\n outHeight,\n outWidth,\n outChannels,\n padInfo,\n strideHeight,\n strideWidth,\n filterHeight,\n filterWidth,\n effectiveFilterHeight,\n effectiveFilterWidth,\n dilationHeight,\n dilationWidth,\n inShape,\n outShape,\n filterShape\n };\n}\nfunction computeConv3DInfo(inShape, filterShape, strides, dilations, pad3, depthwise = false, dataFormat = \"channelsLast\", roundingMode) {\n let [batchSize, inDepth, inHeight, inWidth, inChannels] = [-1, -1, -1, -1, -1];\n if (dataFormat === \"channelsLast\") {\n [batchSize, inDepth, inHeight, inWidth, inChannels] = inShape;\n } else if (dataFormat === \"channelsFirst\") {\n [batchSize, inChannels, inDepth, inHeight, inWidth] = inShape;\n } else {\n throw new Error(`Unknown dataFormat ${dataFormat}`);\n }\n const [filterDepth, filterHeight, filterWidth, , filterChannels] = filterShape;\n const [strideDepth, strideHeight, strideWidth] = parse3TupleParam(strides);\n const [dilationDepth, dilationHeight, dilationWidth] = parse3TupleParam(dilations);\n const effectiveFilterDepth = getEffectiveFilterSize(filterDepth, dilationDepth);\n const effectiveFilterHeight = getEffectiveFilterSize(filterHeight, dilationHeight);\n const effectiveFilterWidth = getEffectiveFilterSize(filterWidth, dilationWidth);\n const { padInfo, outDepth, outHeight, outWidth } = get3DPadAndOutInfo(pad3, inDepth, inHeight, inWidth, strideDepth, strideHeight, strideWidth, effectiveFilterDepth, effectiveFilterHeight, effectiveFilterWidth, roundingMode);\n const outChannels = depthwise ? filterChannels * inChannels : filterChannels;\n let outShape;\n if (dataFormat === \"channelsFirst\") {\n outShape = [batchSize, outChannels, outDepth, outHeight, outWidth];\n } else if (dataFormat === \"channelsLast\") {\n outShape = [batchSize, outDepth, outHeight, outWidth, outChannels];\n }\n return {\n batchSize,\n dataFormat,\n inDepth,\n inHeight,\n inWidth,\n inChannels,\n outDepth,\n outHeight,\n outWidth,\n outChannels,\n padInfo,\n strideDepth,\n strideHeight,\n strideWidth,\n filterDepth,\n filterHeight,\n filterWidth,\n effectiveFilterDepth,\n effectiveFilterHeight,\n effectiveFilterWidth,\n dilationDepth,\n dilationHeight,\n dilationWidth,\n inShape,\n outShape,\n filterShape\n };\n}\nfunction computeOutputShape2D(inShape, fieldSize, stride, zeroPad, roundingMode) {\n if (zeroPad == null) {\n zeroPad = computeDefaultPad(inShape, fieldSize, stride);\n }\n const inputRows = inShape[0];\n const inputCols = inShape[1];\n const outputRows = round((inputRows - fieldSize + 2 * zeroPad) / stride + 1, roundingMode);\n const outputCols = round((inputCols - fieldSize + 2 * zeroPad) / stride + 1, roundingMode);\n return [outputRows, outputCols];\n}\nfunction computeOutputShape4D(inShape, fieldSize, outChannels, stride, zeroPad, roundingMode) {\n if (zeroPad == null) {\n zeroPad = computeDefaultPad(inShape, fieldSize, stride);\n }\n const inputDepth = inShape[0];\n const inputRows = inShape[1];\n const inputCols = inShape[2];\n const outputDepths = round((inputDepth - fieldSize + 2 * zeroPad) / stride + 1, roundingMode);\n const outputRows = round((inputRows - fieldSize + 2 * zeroPad) / stride + 1, roundingMode);\n const outputCols = round((inputCols - fieldSize + 2 * zeroPad) / stride + 1, roundingMode);\n return [outputDepths, outputRows, outputCols, outChannels];\n}\nfunction computeDefaultPad(inputShape, fieldSize, stride, dilation = 1) {\n const effectiveFieldSize = getEffectiveFilterSize(fieldSize, dilation);\n return Math.floor((inputShape[0] * (stride - 1) - stride + effectiveFieldSize) / 2);\n}\nfunction parseTupleParam(param) {\n if (typeof param === \"number\") {\n return [param, param, param];\n }\n if (param.length === 2) {\n return [param[0], param[1], 1];\n }\n return param;\n}\nfunction parse3TupleParam(param) {\n return typeof param === \"number\" ? [param, param, param] : param;\n}\nfunction getEffectiveFilterSize(filterSize, dilation) {\n if (dilation <= 1) {\n return filterSize;\n }\n return filterSize + (filterSize - 1) * (dilation - 1);\n}\nfunction getPadAndOutInfo(pad3, inHeight, inWidth, strideHeight, strideWidth, filterHeight, filterWidth, roundingMode, dataFormat) {\n let padInfo;\n let outHeight;\n let outWidth;\n if (typeof pad3 === \"number\") {\n const padType = pad3 === 0 ? \"VALID\" : \"NUMBER\";\n padInfo = { top: pad3, bottom: pad3, left: pad3, right: pad3, type: padType };\n const outShape = computeOutputShape2D([inHeight, inWidth], filterHeight, strideHeight, pad3, roundingMode);\n outHeight = outShape[0];\n outWidth = outShape[1];\n } else if (pad3 === \"same\") {\n outHeight = Math.ceil(inHeight / strideHeight);\n outWidth = Math.ceil(inWidth / strideWidth);\n const padAlongHeight = Math.max(0, (outHeight - 1) * strideHeight + filterHeight - inHeight);\n const padAlongWidth = Math.max(0, (outWidth - 1) * strideWidth + filterWidth - inWidth);\n const top = Math.floor(padAlongHeight / 2);\n const bottom = padAlongHeight - top;\n const left = Math.floor(padAlongWidth / 2);\n const right = padAlongWidth - left;\n padInfo = { top, bottom, left, right, type: \"SAME\" };\n } else if (pad3 === \"valid\") {\n padInfo = { top: 0, bottom: 0, left: 0, right: 0, type: \"VALID\" };\n outHeight = Math.ceil((inHeight - filterHeight + 1) / strideHeight);\n outWidth = Math.ceil((inWidth - filterWidth + 1) / strideWidth);\n } else if (typeof pad3 === \"object\") {\n const top = dataFormat === \"channelsLast\" ? pad3[1][0] : pad3[2][0];\n const bottom = dataFormat === \"channelsLast\" ? pad3[1][1] : pad3[2][1];\n const left = dataFormat === \"channelsLast\" ? pad3[2][0] : pad3[3][0];\n const right = dataFormat === \"channelsLast\" ? pad3[2][1] : pad3[3][1];\n const padType = top === 0 && bottom === 0 && left === 0 && right === 0 ? \"VALID\" : \"EXPLICIT\";\n padInfo = { top, bottom, left, right, type: padType };\n outHeight = round((inHeight - filterHeight + top + bottom) / strideHeight + 1, roundingMode);\n outWidth = round((inWidth - filterWidth + left + right) / strideWidth + 1, roundingMode);\n } else {\n throw Error(`Unknown padding parameter: ${pad3}`);\n }\n return { padInfo, outHeight, outWidth };\n}\nfunction get3DPadAndOutInfo(pad3, inDepth, inHeight, inWidth, strideDepth, strideHeight, strideWidth, filterDepth, filterHeight, filterWidth, roundingMode) {\n let padInfo;\n let outDepth;\n let outHeight;\n let outWidth;\n if (typeof pad3 === \"number\") {\n const padType = pad3 === 0 ? \"VALID\" : \"NUMBER\";\n padInfo = {\n top: pad3,\n bottom: pad3,\n left: pad3,\n right: pad3,\n front: pad3,\n back: pad3,\n type: padType\n };\n const outShape = computeOutputShape4D([inDepth, inHeight, inWidth, 1], filterDepth, 1, strideDepth, pad3, roundingMode);\n outDepth = outShape[0];\n outHeight = outShape[1];\n outWidth = outShape[2];\n } else if (pad3 === \"same\") {\n outDepth = Math.ceil(inDepth / strideDepth);\n outHeight = Math.ceil(inHeight / strideHeight);\n outWidth = Math.ceil(inWidth / strideWidth);\n const padAlongDepth = (outDepth - 1) * strideDepth + filterDepth - inDepth;\n const padAlongHeight = (outHeight - 1) * strideHeight + filterHeight - inHeight;\n const padAlongWidth = (outWidth - 1) * strideWidth + filterWidth - inWidth;\n const front = Math.floor(padAlongDepth / 2);\n const back = padAlongDepth - front;\n const top = Math.floor(padAlongHeight / 2);\n const bottom = padAlongHeight - top;\n const left = Math.floor(padAlongWidth / 2);\n const right = padAlongWidth - left;\n padInfo = { top, bottom, left, right, front, back, type: \"SAME\" };\n } else if (pad3 === \"valid\") {\n padInfo = {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n front: 0,\n back: 0,\n type: \"VALID\"\n };\n outDepth = Math.ceil((inDepth - filterDepth + 1) / strideDepth);\n outHeight = Math.ceil((inHeight - filterHeight + 1) / strideHeight);\n outWidth = Math.ceil((inWidth - filterWidth + 1) / strideWidth);\n } else {\n throw Error(`Unknown padding parameter: ${pad3}`);\n }\n return { padInfo, outDepth, outHeight, outWidth };\n}\nfunction round(value, roundingMode) {\n if (!roundingMode) {\n return Math.trunc(value);\n }\n switch (roundingMode) {\n case \"round\":\n return Math.round(value);\n case \"ceil\":\n return Math.ceil(value);\n case \"floor\":\n return Math.floor(value);\n default:\n throw new Error(`Unknown roundingMode ${roundingMode}`);\n }\n}\nfunction tupleValuesAreOne(param) {\n const [dimA, dimB, dimC] = parseTupleParam(param);\n return dimA === 1 && dimB === 1 && dimC === 1;\n}\nfunction eitherStridesOrDilationsAreOne(strides, dilations) {\n return tupleValuesAreOne(strides) || tupleValuesAreOne(dilations);\n}\nfunction convertConv2DDataFormat(dataFormat) {\n if (dataFormat === \"NHWC\") {\n return \"channelsLast\";\n } else if (dataFormat === \"NCHW\") {\n return \"channelsFirst\";\n } else {\n throw new Error(`Unknown dataFormat ${dataFormat}`);\n }\n}\nfunction checkPadOnDimRoundingMode(opDesc, pad3, dimRoundingMode) {\n if (dimRoundingMode != null) {\n if (typeof pad3 === \"string\") {\n throw Error(`Error in ${opDesc}: pad must be an integer when using dimRoundingMode ${dimRoundingMode} but got pad ${pad3}.`);\n } else if (typeof pad3 === \"number\") {\n assert(isInt(pad3), () => `Error in ${opDesc}: pad must be an integer when using dimRoundingMode ${dimRoundingMode} but got pad ${pad3}.`);\n } else if (typeof pad3 === \"object\") {\n pad3.forEach((p2) => {\n p2.forEach((v) => {\n assert(isInt(v), () => `Error in ${opDesc}: pad must be an integer when using dimRoundingMode ${dimRoundingMode} but got pad ${v}.`);\n });\n });\n } else {\n throw Error(`Error in ${opDesc}: Unknown padding parameter: ${pad3}`);\n }\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/reshape.js\nfunction reshape_(x, shape) {\n const $x = convertToTensor(x, \"x\", \"reshape\", \"string_or_numeric\");\n const inputs = { x: $x };\n const attrs = { shape };\n return ENGINE.runKernel(Reshape, inputs, attrs);\n}\nvar reshape = op({ reshape_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/avg_pool.js\nfunction avgPool_(x, filterSize, strides, pad3, dimRoundingMode) {\n const $x = convertToTensor(x, \"x\", \"avgPool\", \"float32\");\n const dilations = 1;\n assert(eitherStridesOrDilationsAreOne(strides, dilations), () => `Error in avgPool: Either strides or dilations must be 1. Got strides ${strides} and dilations '${dilations}'`);\n let x4D = $x;\n let reshapedTo4D = false;\n if ($x.rank === 3) {\n reshapedTo4D = true;\n x4D = reshape($x, [1, $x.shape[0], $x.shape[1], $x.shape[2]]);\n }\n assert(x4D.rank === 4, () => `Error in avgPool: x must be rank 4 but got rank ${x4D.rank}.`);\n checkPadOnDimRoundingMode(\"avgPool\", pad3, dimRoundingMode);\n const inputs = { x: x4D };\n const attrs = { filterSize, strides, pad: pad3, dimRoundingMode };\n let res = ENGINE.runKernel(AvgPool, inputs, attrs);\n res = cast(res, $x.dtype);\n if (reshapedTo4D) {\n return reshape(res, [res.shape[1], res.shape[2], res.shape[3]]);\n }\n return res;\n}\nvar avgPool = op({ avgPool_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/avg_pool_3d.js\nfunction avgPool3d_(x, filterSize, strides, pad3, dimRoundingMode, dataFormat = \"NDHWC\") {\n const $x = convertToTensor(x, \"x\", \"avgPool3d\", \"float32\");\n let x5D = $x;\n let reshapedTo5D = false;\n if ($x.rank === 4) {\n reshapedTo5D = true;\n x5D = reshape($x, [1, $x.shape[0], $x.shape[1], $x.shape[2], $x.shape[3]]);\n }\n assert(x5D.rank === 5, () => `Error in avgPool3d: x must be rank 5 but got rank ${x5D.rank}.`);\n assert(dataFormat === \"NDHWC\", () => `Error in avgPool3d: Only NDHWC is currently supported, but got dataFormat of ${dataFormat}`);\n checkPadOnDimRoundingMode(\"avgPool3d\", pad3, dimRoundingMode);\n const inputs = { x: x5D };\n const attrs = { filterSize, strides, pad: pad3, dimRoundingMode, dataFormat };\n let res = ENGINE.runKernel(AvgPool3D, inputs, attrs);\n res = cast(res, x5D.dtype);\n if (reshapedTo5D) {\n return reshape(res, [res.shape[1], res.shape[2], res.shape[3], res.shape[4]]);\n }\n return res;\n}\nvar avgPool3d = op({ avgPool3d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/concat.js\nfunction concat_(tensors, axis = 0) {\n assert(tensors.length >= 1, () => \"Pass at least one tensor to concat\");\n const $tensors = convertToTensorArray(tensors, \"tensors\", \"concat\", \"string_or_numeric\");\n if ($tensors[0].dtype === \"complex64\") {\n $tensors.forEach((tensor2) => {\n if (tensor2.dtype !== \"complex64\") {\n throw new Error(`Cannot concatenate complex64 tensors with a tensor\n with dtype ${tensor2.dtype}. `);\n }\n });\n }\n if ($tensors.length === 1) {\n return clone($tensors[0]);\n }\n const inputs = $tensors;\n const attr = { axis };\n return ENGINE.runKernel(Concat, inputs, attr);\n}\nvar concat = op({ concat_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/sigmoid.js\nfunction sigmoid_(x) {\n const $x = convertToTensor(x, \"x\", \"sigmoid\", \"float32\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Sigmoid, inputs);\n}\nvar sigmoid = op({ sigmoid_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/slice.js\nfunction slice_(x, begin, size) {\n const $x = convertToTensor(x, \"x\", \"slice\", \"string_or_numeric\");\n if ($x.rank === 0) {\n throw new Error(\"Slicing scalar is not possible\");\n }\n const inputs = { x: $x };\n const attrs = { begin, size };\n return ENGINE.runKernel(Slice, inputs, attrs);\n}\nvar slice = op({ slice_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/tanh.js\nfunction tanh_(x) {\n const $x = convertToTensor(x, \"x\", \"tanh\", \"float32\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Tanh, inputs);\n}\nvar tanh2 = op({ tanh_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/basic_lstm_cell.js\nfunction basicLSTMCell_(forgetBias, lstmKernel, lstmBias, data, c, h) {\n const $forgetBias = convertToTensor(forgetBias, \"forgetBias\", \"basicLSTMCell\");\n const $lstmKernel = convertToTensor(lstmKernel, \"lstmKernel\", \"basicLSTMCell\");\n const $lstmBias = convertToTensor(lstmBias, \"lstmBias\", \"basicLSTMCell\");\n const $data = convertToTensor(data, \"data\", \"basicLSTMCell\");\n const $c = convertToTensor(c, \"c\", \"basicLSTMCell\");\n const $h = convertToTensor(h, \"h\", \"basicLSTMCell\");\n const combined = concat([$data, $h], 1);\n const weighted = matMul(combined, $lstmKernel);\n const res = add2(weighted, $lstmBias);\n const batchSize = res.shape[0];\n const sliceCols = res.shape[1] / 4;\n const sliceSize = [batchSize, sliceCols];\n const i = slice(res, [0, 0], sliceSize);\n const j = slice(res, [0, sliceCols], sliceSize);\n const f = slice(res, [0, sliceCols * 2], sliceSize);\n const o = slice(res, [0, sliceCols * 3], sliceSize);\n const newC = add2(mul(sigmoid(i), tanh2(j)), mul($c, sigmoid(add2($forgetBias, f))));\n const newH = mul(tanh2(newC), sigmoid(o));\n return [newC, newH];\n}\nvar basicLSTMCell = op({ basicLSTMCell_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/batch_to_space_nd.js\nfunction batchToSpaceND_(x, blockShape, crops) {\n const $x = convertToTensor(x, \"x\", \"batchToSpaceND\");\n const prod6 = blockShape.reduce((a, b) => a * b);\n assert($x.rank >= 1 + blockShape.length, () => `input rank is ${$x.rank} but should be > than blockShape.length ${blockShape.length}`);\n assert(crops.length === blockShape.length, () => `crops.length is ${crops.length} but should be equal to blockShape.length ${blockShape.length}`);\n assert($x.shape[0] % prod6 === 0, () => `input tensor batch is ${$x.shape[0]} but is not divisible by the product of the elements of blockShape ${blockShape.join(\" * \")} === ${prod6}`);\n const inputs = { x: $x };\n const attrs = { blockShape, crops };\n return ENGINE.runKernel(BatchToSpaceND, inputs, attrs);\n}\nvar batchToSpaceND = op({ batchToSpaceND_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/batchnorm_util.js\nfunction xAs4D(x) {\n let x4D;\n if (x.rank === 0 || x.rank === 1) {\n x4D = reshape(x, [1, 1, 1, x.size]);\n } else if (x.rank === 2) {\n x4D = reshape(x, [1, 1, x.shape[0], x.shape[1]]);\n } else if (x.rank === 3) {\n x4D = reshape(x, [1, x.shape[0], x.shape[1], x.shape[2]]);\n } else {\n x4D = x;\n }\n return x4D;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/batchnorm.js\nfunction batchNorm_(x, mean5, variance, offset, scale2, varianceEpsilon) {\n if (varianceEpsilon == null) {\n varianceEpsilon = 1e-3;\n }\n const $x = convertToTensor(x, \"x\", \"batchNorm\");\n const $mean = convertToTensor(mean5, \"mean\", \"batchNorm\");\n const $variance = convertToTensor(variance, \"variance\", \"batchNorm\");\n let $scale;\n if (scale2 != null) {\n $scale = convertToTensor(scale2, \"scale\", \"batchNorm\");\n }\n let $offset;\n if (offset != null) {\n $offset = convertToTensor(offset, \"offset\", \"batchNorm\");\n }\n assert($mean.rank === $variance.rank, () => \"Batch normalization gradient requires mean and variance to have equal ranks.\");\n assert($offset == null || $mean.rank === $offset.rank, () => \"Batch normalization gradient requires mean and offset to have equal ranks.\");\n assert($scale == null || $mean.rank === $scale.rank, () => \"Batch normalization gradient requires mean and scale to have equal ranks.\");\n const x4D = xAs4D($x);\n const inputs = {\n x: x4D,\n scale: $scale,\n offset: $offset,\n mean: $mean,\n variance: $variance\n };\n const attrs = { varianceEpsilon };\n const res = ENGINE.runKernel(FusedBatchNorm, inputs, attrs);\n return reshape(res, $x.shape);\n}\nvar batchNorm = op({ batchNorm_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/batchnorm2d.js\nfunction batchNorm2d_(x, mean5, variance, offset, scale2, varianceEpsilon) {\n const $x = convertToTensor(x, \"x\", \"batchNorm\");\n const $mean = convertToTensor(mean5, \"mean\", \"batchNorm\");\n const $variance = convertToTensor(variance, \"variance\", \"batchNorm\");\n let $scale;\n if (scale2 != null) {\n $scale = convertToTensor(scale2, \"scale\", \"batchNorm\");\n }\n let $offset;\n if (offset != null) {\n $offset = convertToTensor(offset, \"offset\", \"batchNorm\");\n }\n assert($x.rank === 2, () => `Error in batchNorm2D: x must be rank 2 but got rank ${$x.rank}.`);\n assert($mean.rank === 2 || $mean.rank === 1, () => `Error in batchNorm2D: mean must be rank 2 or rank 1 but got rank ${$mean.rank}.`);\n assert($variance.rank === 2 || $variance.rank === 1, () => `Error in batchNorm2D: variance must be rank 2 or rank 1 but got rank ${$variance.rank}.`);\n if ($scale != null) {\n assert($scale.rank === 2 || $scale.rank === 1, () => `Error in batchNorm2D: scale must be rank 2 or rank 1 but got rank ${$scale.rank}.`);\n }\n if ($offset != null) {\n assert($offset.rank === 2 || $offset.rank === 1, () => `Error in batchNorm2D: offset must be rank 2 or rank 1 but got rank ${$offset.rank}.`);\n }\n return batchNorm($x, $mean, $variance, $offset, $scale, varianceEpsilon);\n}\nvar batchNorm2d = op({ batchNorm2d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/batchnorm3d.js\nfunction batchNorm3d_(x, mean5, variance, offset, scale2, varianceEpsilon) {\n const $x = convertToTensor(x, \"x\", \"batchNorm\");\n const $mean = convertToTensor(mean5, \"mean\", \"batchNorm\");\n const $variance = convertToTensor(variance, \"variance\", \"batchNorm\");\n let $scale;\n if (scale2 != null) {\n $scale = convertToTensor(scale2, \"scale\", \"batchNorm\");\n }\n let $offset;\n if (offset != null) {\n $offset = convertToTensor(offset, \"offset\", \"batchNorm\");\n }\n assert($x.rank === 3, () => `Error in batchNorm3D: x must be rank 3 but got rank ${$x.rank}.`);\n assert($mean.rank === 3 || $mean.rank === 1, () => `Error in batchNorm3D: mean must be rank 3 or rank 1 but got rank ${$mean.rank}.`);\n assert($variance.rank === 3 || $variance.rank === 1, () => `Error in batchNorm3D: variance must be rank 3 or rank 1 but got rank ${$variance.rank}.`);\n if ($scale != null) {\n assert($scale.rank === 3 || $scale.rank === 1, () => `Error in batchNorm3D: scale must be rank 3 or rank 1 but got rank ${$scale.rank}.`);\n }\n if ($offset != null) {\n assert($offset.rank === 3 || $offset.rank === 1, () => `Error in batchNorm3D: offset must be rank 3 or rank 1 but got rank ${$offset.rank}.`);\n }\n return batchNorm($x, $mean, $variance, $offset, $scale, varianceEpsilon);\n}\nvar batchNorm3d = op({ batchNorm3d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/batchnorm4d.js\nfunction batchNorm4d_(x, mean5, variance, offset, scale2, varianceEpsilon) {\n const $x = convertToTensor(x, \"x\", \"batchNorm\");\n const $mean = convertToTensor(mean5, \"mean\", \"batchNorm\");\n const $variance = convertToTensor(variance, \"variance\", \"batchNorm\");\n let $scale;\n if (scale2 != null) {\n $scale = convertToTensor(scale2, \"scale\", \"batchNorm\");\n }\n let $offset;\n if (offset != null) {\n $offset = convertToTensor(offset, \"offset\", \"batchNorm\");\n }\n assert($x.rank === 4, () => `Error in batchNorm4D: x must be rank 4 but got rank ${$x.rank}.`);\n assert($mean.rank === 4 || $mean.rank === 1, () => `Error in batchNorm4D: mean must be rank 4 or rank 1 but got rank ${$mean.rank}.`);\n assert($variance.rank === 4 || $variance.rank === 1, () => `Error in batchNorm4D: variance must be rank 4 or rank 1 but got rank ${$variance.rank}.`);\n if ($scale != null) {\n assert($scale.rank === 4 || $scale.rank === 1, () => `Error in batchNorm4D: scale must be rank 4 or rank 1 but got rank ${$scale.rank}.`);\n }\n if ($offset != null) {\n assert($offset.rank === 4 || $offset.rank === 1, () => `Error in batchNorm4D: offset must be rank 4 or rank 1 but got rank ${$offset.rank}.`);\n }\n return batchNorm($x, $mean, $variance, $offset, $scale, varianceEpsilon);\n}\nvar batchNorm4d = op({ batchNorm4d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/bincount.js\nfunction bincount_(x, weights, size) {\n const $x = convertToTensor(x, \"x\", \"bincount\");\n const $weights = convertToTensor(weights, \"weights\", \"bincount\");\n assert($x.dtype === \"int32\", () => `Error in bincount: input dtype must be int32, but got ${$x.dtype}`);\n assert(size >= 0, () => `size must be non-negative, but got ${size}.`);\n assert($weights.size === $x.size || $weights.size === 0, () => `Error in bincount: weights must have the same size as input or0-length, but got input shape: ${$x.shape}, weights shape: ${$weights.shape}.`);\n const inputs = { x: $x, weights: $weights };\n const attrs = { size };\n return ENGINE.runKernel(Bincount, inputs, attrs);\n}\nvar bincount = op({ bincount_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/broadcast_args.js\nfunction broadcastArgs_(s0, s1) {\n const shape1Input = convertToTensor(s0, \"s0\", \"broadcastArgs\", \"int32\");\n const shape2Input = convertToTensor(s1, \"s1\", \"broadcastArgs\", \"int32\");\n if (shape1Input.rank !== 1) {\n throw new Error(`broadcastArgs(): first input must be a vector (rank=1). Has rank ${shape1Input.rank}`);\n }\n if (shape2Input.rank !== 1) {\n throw new Error(`broadcastArgs(): second input must be a vector (rank=1). Has rank ${shape2Input.rank}`);\n }\n const inputs = { s0: shape1Input, s1: shape2Input };\n return ENGINE.runKernel(BroadcastArgs, inputs);\n}\nvar broadcastArgs = op({ broadcastArgs_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/broadcast_to.js\nfunction broadcastTo_(x, shape) {\n let input2 = convertToTensor(x, \"broadcastTo\", \"x\");\n const xShape = input2.shape;\n if (shape.some((d) => !(d > 0) || d % 1 !== 0)) {\n throw new Error(`broadcastTo(): Invalid broadcast shape [${shape}].`);\n }\n if (shape.length < input2.rank) {\n throw new Error(`broadcastTo(): shape.length=${shape.length} < input.rank=${input2.rank}.`);\n }\n if (shape.length > input2.rank) {\n const newShape = input2.shape.slice();\n while (newShape.length < shape.length) {\n newShape.unshift(1);\n }\n input2 = reshape(input2, newShape);\n }\n const inputShape = input2.shape;\n const reps = Array.from(shape);\n for (let i = shape.length - 1; i >= 0; i--) {\n if (inputShape[i] === shape[i]) {\n reps[i] = 1;\n } else if (input2.shape[i] !== 1) {\n throw new Error(`broadcastTo(): [${xShape}] cannot be broadcast to [${shape}].`);\n }\n }\n const axes = reps.map((n, i) => n > 1 ? i : -1).filter((i) => i >= 0);\n if (axes.length === 0) {\n return clone(input2);\n }\n const inputs = { x: input2 };\n const attrs = { reps };\n return ENGINE.runKernel(Tile, inputs, attrs);\n}\nvar broadcastTo = op({ broadcastTo_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/ceil.js\nfunction ceil_(x) {\n const $x = convertToTensor(x, \"x\", \"ceil\", \"float32\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Ceil, inputs);\n}\nvar ceil = op({ ceil_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/clip_by_value.js\nfunction clipByValue_(x, clipValueMin, clipValueMax) {\n const $x = convertToTensor(x, \"x\", \"clipByValue\");\n assert(clipValueMin <= clipValueMax, () => `Error in clip: min (${clipValueMin}) must be less than or equal to max (${clipValueMax}).`);\n const inputs = { x: $x };\n const attrs = { clipValueMin, clipValueMax };\n return ENGINE.runKernel(ClipByValue, inputs, attrs);\n}\nvar clipByValue = op({ clipByValue_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/concat_1d.js\nfunction concat1d_(tensors) {\n return concat(tensors, 0);\n}\nvar concat1d = op({ concat1d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/concat_2d.js\nfunction concat2d_(tensors, axis) {\n return concat(tensors, axis);\n}\nvar concat2d = op({ concat2d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/concat_3d.js\nfunction concat3d_(tensors, axis) {\n return concat(tensors, axis);\n}\nvar concat3d = op({ concat3d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/concat_4d.js\nfunction concat4d_(tensors, axis) {\n return concat(tensors, axis);\n}\nvar concat4d = op({ concat4d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/conv2d.js\nfunction conv2d_(x, filter, strides, pad3, dataFormat = \"NHWC\", dilations = [1, 1], dimRoundingMode) {\n const $x = convertToTensor(x, \"x\", \"conv2d\", \"float32\");\n const $filter = convertToTensor(filter, \"filter\", \"conv2d\", \"float32\");\n let x4D = $x;\n let reshapedTo4D = false;\n if ($x.rank === 3) {\n reshapedTo4D = true;\n x4D = reshape($x, [1, $x.shape[0], $x.shape[1], $x.shape[2]]);\n }\n assert(x4D.rank === 4, () => `Error in conv2d: input must be rank 4, but got rank ${x4D.rank}.`);\n assert($filter.rank === 4, () => `Error in conv2d: filter must be rank 4, but got rank ${$filter.rank}.`);\n checkPadOnDimRoundingMode(\"conv2d\", pad3, dimRoundingMode);\n const inDepth = dataFormat === \"NHWC\" ? x4D.shape[3] : x4D.shape[1];\n assert(inDepth === $filter.shape[2], () => `Error in conv2d: depth of input (${inDepth}) must match input depth for filter ${$filter.shape[2]}.`);\n assert(eitherStridesOrDilationsAreOne(strides, dilations), () => `Error in conv2D: Either strides or dilations must be 1. Got strides ${strides} and dilations '${dilations}'`);\n const inputs = { x: x4D, filter: $filter };\n const attrs = { strides, pad: pad3, dataFormat, dilations, dimRoundingMode };\n const res = ENGINE.runKernel(Conv2D, inputs, attrs);\n if (reshapedTo4D) {\n return reshape(res, [res.shape[1], res.shape[2], res.shape[3]]);\n }\n return res;\n}\nvar conv2d = op({ conv2d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/conv1d.js\nfunction conv1d_(x, filter, stride, pad3, dataFormat = \"NWC\", dilation = 1, dimRoundingMode) {\n const $x = convertToTensor(x, \"x\", \"conv1d\");\n const $filter = convertToTensor(filter, \"filter\", \"conv1d\");\n let x3D = $x;\n let reshapedTo3D = false;\n if ($x.rank === 2) {\n reshapedTo3D = true;\n x3D = reshape($x, [1, $x.shape[0], $x.shape[1]]);\n }\n assert(x3D.rank === 3, () => `Error in conv1d: input must be rank 3, but got rank ${x3D.rank}.`);\n assert($filter.rank === 3, () => `Error in conv1d: filter must be rank 3, but got rank ${$filter.rank}.`);\n checkPadOnDimRoundingMode(\"conv1d\", pad3, dimRoundingMode);\n assert(x3D.shape[2] === $filter.shape[1], () => `Error in conv1d: depth of input (${x3D.shape[2]}) must match input depth for filter ${$filter.shape[1]}.`);\n assert(eitherStridesOrDilationsAreOne(stride, dilation), () => `Error in conv1D: Either stride or dilation must be 1. Got stride ${stride} and dilation '${dilation}'`);\n assert(dataFormat === \"NWC\", () => `Error in conv1d: got dataFormat of ${dataFormat} but only NWC is currently supported.`);\n const filter4D = reshape($filter, [1, $filter.shape[0], $filter.shape[1], $filter.shape[2]]);\n const input4D = reshape(x3D, [x3D.shape[0], 1, x3D.shape[1], x3D.shape[2]]);\n const strides = [1, stride];\n const dilations = [1, dilation];\n const conv2dDataFormat = \"NHWC\";\n const res = conv2d(input4D, filter4D, strides, pad3, conv2dDataFormat, dilations, dimRoundingMode);\n if (reshapedTo3D) {\n return reshape(res, [res.shape[2], res.shape[3]]);\n }\n return reshape(res, [res.shape[0], res.shape[2], res.shape[3]]);\n}\nvar conv1d = op({ conv1d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/conv2d_backprop_input.js\nfunction conv2DBackpropInput_(xShape, dy, filter, strides, pad3, dataFormat = \"NHWC\", dimRoundingMode) {\n assert(xShape.length === dy.rank, () => `Length of inShape (${xShape.length}) and rank of dy (${dy.rank}) must match`);\n let xShape4D = xShape;\n let dy4D = dy;\n let reshapedTo4D = false;\n if (dy.rank === 3) {\n reshapedTo4D = true;\n dy4D = reshape(dy, [1, dy.shape[0], dy.shape[1], dy.shape[2]]);\n xShape4D = [1, xShape[0], xShape[1], xShape[2]];\n }\n assert(xShape4D.length === 4, () => `Error in conv2dDerInput: inShape must be length 4, but got length ${xShape4D.length}.`);\n assert(dy4D.rank === 4, () => `Error in conv2dDerInput: dy must be rank 4, but got rank ${dy4D.rank}`);\n assert(filter.rank === 4, () => `Error in conv2dDerInput: filter must be rank 4, but got rank ${filter.rank}`);\n const inDepth = dataFormat === \"NHWC\" ? xShape4D[3] : xShape4D[1];\n const outDepth = dataFormat === \"NHWC\" ? dy4D.shape[3] : dy4D.shape[1];\n assert(inDepth === filter.shape[2], () => `Error in conv2dDerInput: depth of input (${inDepth}) must match input depth for filter ${filter.shape[2]}.`);\n assert(outDepth === filter.shape[3], () => `Error in conv2dDerInput: depth of output (${outDepth}) must match output depth for filter ${filter.shape[3]}.`);\n checkPadOnDimRoundingMode(\"conv2dDerInput\", pad3, dimRoundingMode);\n const inputs = { dy: dy4D, filter };\n const attrs = { strides, pad: pad3, dataFormat, dimRoundingMode, inputShape: xShape4D };\n const res = ENGINE.runKernel(Conv2DBackpropInput, inputs, attrs);\n if (reshapedTo4D) {\n return reshape(res, [res.shape[1], res.shape[2], res.shape[3]]);\n }\n return res;\n}\nvar conv2DBackpropInput = op({ conv2DBackpropInput_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/conv2d_transpose.js\nfunction conv2dTranspose_(x, filter, outputShape, strides, pad3, dimRoundingMode) {\n const $x = convertToTensor(x, \"x\", \"conv2dTranspose\");\n const $filter = convertToTensor(filter, \"filter\", \"conv2dTranspose\");\n return conv2DBackpropInput(outputShape, $x, $filter, strides, pad3, \"NHWC\", dimRoundingMode);\n}\nvar conv2dTranspose = op({ conv2dTranspose_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/conv3d.js\nfunction conv3d_(x, filter, strides, pad3, dataFormat = \"NDHWC\", dilations = [1, 1, 1]) {\n const $x = convertToTensor(x, \"x\", \"conv3d\");\n const $filter = convertToTensor(filter, \"filter\", \"conv3d\");\n let x5D = $x;\n let reshapedTo5D = false;\n if ($x.rank === 4) {\n reshapedTo5D = true;\n x5D = reshape($x, [1, $x.shape[0], $x.shape[1], $x.shape[2], $x.shape[3]]);\n }\n assert(x5D.rank === 5, () => `Error in conv3d: input must be rank 5, but got rank ${x5D.rank}.`);\n assert($filter.rank === 5, () => `Error in conv3d: filter must be rank 5, but got rank ${$filter.rank}.`);\n assert(x5D.shape[4] === $filter.shape[3], () => `Error in conv3d: depth of input (${x5D.shape[4]}) must match input depth for filter ${$filter.shape[3]}.`);\n assert(eitherStridesOrDilationsAreOne(strides, dilations), () => `Error in conv3D: Either strides or dilations must be 1. Got strides ${strides} and dilations '${dilations}'`);\n assert(dataFormat === \"NDHWC\", () => `Error in conv3d: got dataFormat of ${dataFormat} but only NDHWC is currently supported.`);\n const inputs = { x: x5D, filter: $filter };\n const attrs = { strides, pad: pad3, dataFormat, dilations };\n const res = ENGINE.runKernel(Conv3D, inputs, attrs);\n if (reshapedTo5D) {\n return reshape(res, [res.shape[1], res.shape[2], res.shape[3], res.shape[4]]);\n }\n return res;\n}\nvar conv3d = op({ conv3d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/conv3d_backprop_input.js\nfunction conv3DBackpropInput_(xShape, dy, filter, strides, pad3) {\n assert(xShape.length === dy.rank, () => `Length of inShape (${xShape.length}) and rank of dy (${dy.rank}) must match`);\n let xShape5D = xShape;\n let dy5D = dy;\n let reshapedTo5D = false;\n if (dy.rank === 4) {\n reshapedTo5D = true;\n dy5D = reshape(dy, [1, dy.shape[0], dy.shape[1], dy.shape[2], dy.shape[3]]);\n xShape5D = [1, xShape[0], xShape[1], xShape[2], xShape[3]];\n }\n const inDepth = xShape5D[4];\n const outDepth = dy5D.shape[4];\n assert(xShape5D.length === 5, () => `Error in conv3dDerInput: inShape must be length 5, but got length ${xShape5D.length}.`);\n assert(dy5D.rank === 5, () => `Error in conv3dDerInput: dy must be rank 5, but got rank ${dy5D.rank}`);\n assert(filter.rank === 5, () => `Error in conv3dDerInput: filter must be rank 5, but got rank ${filter.rank}`);\n assert(inDepth === filter.shape[3], () => `Error in conv3dDerInput: depth of input (${inDepth}) must match input depth for filter ${filter.shape[3]}.`);\n assert(outDepth === filter.shape[4], () => `Error in conv3dDerInput: depth of output (${outDepth}) must match output depth for filter ${filter.shape[4]}.`);\n const inputs = { dy: dy5D, filter };\n const attrs = { pad: pad3, strides, inputShape: xShape5D };\n const res = ENGINE.runKernel(Conv3DBackpropInputV2, inputs, attrs);\n if (reshapedTo5D) {\n return reshape(res, [res.shape[1], res.shape[2], res.shape[3], res.shape[4]]);\n }\n return res;\n}\nvar conv3DBackpropInput = op({ conv3DBackpropInput_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/conv3d_transpose.js\nfunction conv3dTranspose_(x, filter, outputShape, strides, pad3) {\n const $x = convertToTensor(x, \"x\", \"conv3dTranspose\");\n const $filter = convertToTensor(filter, \"filter\", \"conv3dTranspose\");\n return conv3DBackpropInput(outputShape, $x, $filter, strides, pad3);\n}\nvar conv3dTranspose = op({ conv3dTranspose_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/cos.js\nfunction cos_(x) {\n const $x = convertToTensor(x, \"x\", \"cos\", \"float32\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Cos, inputs);\n}\nvar cos = op({ cos_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/cosh.js\nfunction cosh_(x) {\n const $x = convertToTensor(x, \"x\", \"cosh\", \"float32\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Cosh, inputs);\n}\nvar cosh = op({ cosh_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/cumprod.js\nfunction cumprod_(x, axis = 0, exclusive = false, reverse5 = false) {\n const $x = convertToTensor(x, \"x\", \"cumprod\");\n const inputs = { x: $x };\n const attrs = { axis, exclusive, reverse: reverse5 };\n return ENGINE.runKernel(Cumprod, inputs, attrs);\n}\nvar cumprod = op({ cumprod_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/cumsum.js\nfunction cumsum_(x, axis = 0, exclusive = false, reverse5 = false) {\n const $x = convertToTensor(x, \"x\", \"cumsum\");\n const inputs = { x: $x };\n const attrs = { axis, exclusive, reverse: reverse5 };\n return ENGINE.runKernel(Cumsum, inputs, attrs);\n}\nvar cumsum = op({ cumsum_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/dense_bincount.js\nfunction denseBincount_(x, weights, size, binaryOutput = false) {\n const $x = convertToTensor(x, \"x\", \"denseBincount\");\n const $weights = convertToTensor(weights, \"weights\", \"denseBincount\");\n assert($x.dtype === \"int32\", () => `Error in denseBincount: input dtype must be int32, but got ${$x.dtype}`);\n assert($x.rank <= 2, () => `Error in denseBincount: input must be at most rank 2, but got rank ${$x.rank}.`);\n assert(size >= 0, () => `size must be non-negative, but got ${size}.`);\n assert($weights.size === $x.size || $weights.size === 0, () => `Error in denseBincount: weights must have the same shape as x or 0-length, but got x shape: ${$x.shape}, weights shape: ${$weights.shape}.`);\n const inputs = { x: $x, weights: $weights };\n const attrs = { size, binaryOutput };\n return ENGINE.runKernel(DenseBincount, inputs, attrs);\n}\nvar denseBincount = op({ denseBincount_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/depth_to_space.js\nfunction depthToSpace_(x, blockSize, dataFormat = \"NHWC\") {\n const $x = convertToTensor(x, \"x\", \"depthToSpace\", \"float32\");\n const inputHeight = dataFormat === \"NHWC\" ? $x.shape[1] : $x.shape[2];\n const inputWidth = dataFormat === \"NHWC\" ? $x.shape[2] : $x.shape[3];\n const inputDepth = dataFormat === \"NHWC\" ? $x.shape[3] : $x.shape[1];\n assert(blockSize > 1, () => `blockSize should be > 1 for depthToSpace, but was: ${blockSize}`);\n assert(inputHeight * blockSize >= 0, () => `Negative dimension size caused by overflow when multiplying\n ${inputHeight} and ${blockSize} for depthToSpace with input shape\n ${$x.shape}`);\n assert(inputWidth * blockSize >= 0, () => `Negative dimension size caused by overflow when multiplying\n ${inputWidth} and ${blockSize} for depthToSpace with input shape\n ${$x.shape}`);\n assert(inputDepth % (blockSize * blockSize) === 0, () => `Dimension size must be evenly divisible by ${blockSize * blockSize} but is ${inputDepth} for depthToSpace with input shape ${$x.shape}`);\n const inputs = { x: $x };\n const attrs = { blockSize, dataFormat };\n return ENGINE.runKernel(DepthToSpace, inputs, attrs);\n}\nvar depthToSpace = op({ depthToSpace_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/depthwise_conv2d.js\nfunction depthwiseConv2d_(x, filter, strides, pad3, dataFormat = \"NHWC\", dilations = [1, 1], dimRoundingMode) {\n const $x = convertToTensor(x, \"x\", \"depthwiseConv2d\", \"float32\");\n const $filter = convertToTensor(filter, \"filter\", \"depthwiseConv2d\", \"float32\");\n let x4D = $x;\n let reshapedTo4D = false;\n if ($x.rank === 3) {\n reshapedTo4D = true;\n x4D = reshape($x, [1, $x.shape[0], $x.shape[1], $x.shape[2]]);\n }\n assert(x4D.rank === 4, () => `Error in depthwiseConv2d: input must be rank 4, but got rank ${x4D.rank}.`);\n assert($filter.rank === 4, () => `Error in depthwiseConv2d: filter must be rank 4, but got rank ${$filter.rank}.`);\n const inChannels = dataFormat === \"NHWC\" ? x4D.shape[3] : x4D.shape[1];\n assert(inChannels === $filter.shape[2], () => `Error in depthwiseConv2d: number of input channels (${inChannels}) must match the inChannels dimension in filter ${$filter.shape[2]}.`);\n checkPadOnDimRoundingMode(\"depthwiseConv2d\", pad3, dimRoundingMode);\n const inputs = { x: x4D, filter: $filter };\n const attrs = { strides, pad: pad3, dataFormat, dilations, dimRoundingMode };\n const res = ENGINE.runKernel(DepthwiseConv2dNative, inputs, attrs);\n if (reshapedTo4D) {\n return reshape(res, [res.shape[1], res.shape[2], res.shape[3]]);\n }\n return res;\n}\nvar depthwiseConv2d = op({ depthwiseConv2d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/diag.js\nfunction diag_(x) {\n const $x = convertToTensor(x, \"x\", \"diag\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Diag, inputs);\n}\nvar diag = op({ diag_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/dilation2d.js\nfunction dilation2d_(x, filter, strides, pad3, dilations = [1, 1], dataFormat = \"NHWC\") {\n const $x = convertToTensor(x, \"x\", \"dilation2d\");\n const $filter = convertToTensor(filter, \"filter\", \"dilation2d\");\n assert($x.rank === 3 || $x.rank === 4, () => `Error in dilation2d: input must be rank 3 or 4, but got rank ${$x.rank}.`);\n assert($filter.rank === 3, () => `Error in dilation2d: filter must be rank 3, but got rank ${$filter.rank}.`);\n assert(dataFormat === \"NHWC\", () => `Error in dilation2d: Only NHWC is currently supported, but got dataFormat of ${dataFormat}`);\n let x4D = $x;\n let reshapedTo4D = false;\n if ($x.rank === 3) {\n x4D = reshape($x, [1, $x.shape[0], $x.shape[1], $x.shape[2]]);\n reshapedTo4D = true;\n }\n const inputs = { x: x4D, filter: $filter };\n const attrs = { strides, pad: pad3, dilations };\n const res = ENGINE.runKernel(Dilation2D, inputs, attrs);\n if (reshapedTo4D) {\n return reshape(res, [res.shape[1], res.shape[2], res.shape[3]]);\n }\n return res;\n}\nvar dilation2d = op({ dilation2d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/equal.js\nfunction equal_(a, b) {\n let $a = convertToTensor(a, \"a\", \"equal\", \"string_or_numeric\");\n let $b = convertToTensor(b, \"b\", \"equal\", \"string_or_numeric\");\n [$a, $b] = makeTypesMatch($a, $b);\n assertAndGetBroadcastShape($a.shape, $b.shape);\n const inputs = { a: $a, b: $b };\n return ENGINE.runKernel(Equal, inputs);\n}\nvar equal = op({ equal_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/where.js\nfunction where_(condition, a, b) {\n const $a = convertToTensor(a, \"a\", \"where\");\n const $b = convertToTensor(b, \"b\", \"where\");\n const $condition = convertToTensor(condition, \"condition\", \"where\", \"bool\");\n const broadcastShape = assertAndGetBroadcastShape(assertAndGetBroadcastShape($condition.shape, $a.shape), $b.shape);\n const $broadcastedCondition = broadcastTo($condition, broadcastShape);\n const $broadcastedA = broadcastTo($a, broadcastShape);\n const $broadcastedB = broadcastTo($b, broadcastShape);\n const inputs = {\n condition: $broadcastedCondition,\n t: $broadcastedA,\n e: $broadcastedB\n };\n return ENGINE.runKernel(Select, inputs);\n}\nvar where = op({ where_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/zeros_like.js\nfunction zerosLike_(x) {\n const $x = convertToTensor(x, \"x\", \"zerosLike\");\n const inputs = { x: $x };\n return ENGINE.runKernel(ZerosLike, inputs);\n}\nvar zerosLike = op({ zerosLike_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/div_no_nan.js\nfunction divNoNan_(a, b) {\n let $a = convertToTensor(a, \"a\", \"div\");\n let $b = convertToTensor(b, \"b\", \"div\");\n [$a, $b] = makeTypesMatch($a, $b);\n const divResult = div($a, $b);\n const zeros4 = zerosLike(divResult);\n const bEqualsZero = equal($b, zeros4);\n return where(bEqualsZero, zeros4, divResult);\n}\nvar divNoNan = op({ divNoNan_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/dot.js\nfunction dot_(t1, t2) {\n const $t1 = convertToTensor(t1, \"t1\", \"dot\");\n const $t2 = convertToTensor(t2, \"t2\", \"dot\");\n assert(($t1.rank === 1 || $t1.rank === 2) && ($t2.rank === 1 || $t2.rank === 2), () => `Error in dot: inputs must all be rank 1 or 2, but got ranks ${$t1.rank} and ${$t2.rank}.`);\n const t1Inner = $t1.rank === 1 ? $t1.size : $t1.shape[1];\n const t2Inner = $t2.rank === 1 ? $t2.size : $t2.shape[0];\n assert(t1Inner === t2Inner, () => `Error in dot: inner dimensions of inputs must match, but got ${t1Inner} and ${t2Inner}.`);\n if ($t1.rank === 1 && $t2.rank === 1) {\n const t12D = reshape($t1, [1, -1]);\n const t22D = reshape($t2, [-1, 1]);\n const t1t2 = matMul(t12D, t22D);\n return reshape(t1t2, []);\n } else if ($t1.rank === 1 && $t2.rank === 2) {\n const t12D = reshape($t1, [1, -1]);\n const t22D = reshape($t2, [$t2.shape[0], $t2.shape[1]]);\n const t1t2 = matMul(t12D, t22D);\n return reshape(t1t2, [t1t2.size]);\n } else if ($t1.rank === 2 && $t2.rank === 1) {\n const t22D = reshape($t2, [-1, 1]);\n const t1t2 = matMul($t1, t22D);\n return reshape(t1t2, [t1t2.size]);\n } else {\n const t22D = reshape($t2, [$t2.shape[0], $t2.shape[1]]);\n const t1t2 = matMul($t1, t22D);\n return t1t2;\n }\n}\nvar dot = op({ dot_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/einsum.js\nfunction einsum_(equation, ...tensors) {\n const $tensors = tensors.map((t, i) => convertToTensor(t, `tensors${i}`, \"einsum\"));\n const attrs = { equation };\n return ENGINE.runKernel(Einsum, $tensors, attrs);\n}\nvar einsum = op({ einsum_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/elu.js\nfunction elu_(x) {\n const $x = convertToTensor(x, \"x\", \"elu\", \"float32\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Elu, inputs);\n}\nvar elu = op({ elu_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/erf.js\nfunction erf_(x) {\n let $x = convertToTensor(x, \"x\", \"erf\");\n assert($x.dtype === \"int32\" || $x.dtype === \"float32\", () => \"Input dtype must be `int32` or `float32`.\");\n if ($x.dtype === \"int32\") {\n $x = cast($x, \"float32\");\n }\n const inputs = { x: $x };\n return ENGINE.runKernel(Erf, inputs);\n}\nvar erf = op({ erf_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/axis_util.js\nfunction axesAreInnerMostDims(axes, rank) {\n for (let i = 0; i < axes.length; ++i) {\n if (axes[axes.length - i - 1] !== rank - 1 - i) {\n return false;\n }\n }\n return true;\n}\nfunction combineLocations(outputLoc, reduceLoc, axes) {\n const rank = outputLoc.length + reduceLoc.length;\n const loc = [];\n let outIdx = 0;\n let reduceIdx = 0;\n for (let dim = 0; dim < rank; dim++) {\n if (axes.indexOf(dim) === -1) {\n loc.push(outputLoc[outIdx++]);\n } else {\n loc.push(reduceLoc[reduceIdx++]);\n }\n }\n return loc;\n}\nfunction computeOutAndReduceShapes(aShape, axes) {\n const outShape = [];\n const rank = aShape.length;\n for (let dim = 0; dim < rank; dim++) {\n if (axes.indexOf(dim) === -1) {\n outShape.push(aShape[dim]);\n }\n }\n const reduceShape = axes.map((dim) => aShape[dim]);\n return [outShape, reduceShape];\n}\nfunction expandShapeToKeepDim(shape, axes) {\n const reduceSubShape = axes.map((x) => 1);\n return combineLocations(shape, reduceSubShape, axes);\n}\nfunction assertAxesAreInnerMostDims(msg, axes, rank) {\n assert(axesAreInnerMostDims(axes, rank), () => `${msg} supports only inner-most axes for now. Got axes ${axes} and rank-${rank} input.`);\n}\nfunction getAxesPermutation(axes, rank) {\n if (axesAreInnerMostDims(axes, rank)) {\n return null;\n }\n const result = [];\n for (let i = 0; i < rank; ++i) {\n if (axes.indexOf(i) === -1) {\n result.push(i);\n }\n }\n axes.forEach((axis) => result.push(axis));\n return result;\n}\nfunction getUndoAxesPermutation(axes) {\n return axes.map((axis, i) => [i, axis]).sort((a, b) => a[1] - b[1]).map((x) => x[0]);\n}\nfunction getInnerMostAxes(numAxes, rank) {\n const res = [];\n for (let i = rank - numAxes; i < rank; ++i) {\n res.push(i);\n }\n return res;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/max.js\nfunction max_(x, axis = null, keepDims = false) {\n const $x = convertToTensor(x, \"x\", \"max\");\n const inputs = { x: $x };\n const attrs = { reductionIndices: axis, keepDims };\n return ENGINE.runKernel(Max, inputs, attrs);\n}\nvar max = op({ max_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/min.js\nfunction min_(x, axis = null, keepDims = false) {\n const $x = convertToTensor(x, \"x\", \"min\");\n const inputs = { x: $x };\n const attrs = { axis, keepDims };\n return ENGINE.runKernel(Min, inputs, attrs);\n}\nvar min = op({ min_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/pow.js\nfunction pow_(base, exp5) {\n let $base = convertToTensor(base, \"base\", \"pow\");\n let $exp = convertToTensor(exp5, \"exp\", \"pow\");\n [$base, $exp] = makeTypesMatch($base, $exp);\n const inputs = { a: $base, b: $exp };\n return ENGINE.runKernel(Pow, inputs);\n}\nvar pow = op({ pow_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/scalar.js\nfunction scalar(value, dtype) {\n if ((isTypedArray(value) && dtype !== \"string\" || Array.isArray(value)) && dtype !== \"complex64\") {\n throw new Error(\"Error creating a new Scalar: value must be a primitive (number|boolean|string)\");\n }\n if (dtype === \"string\" && isTypedArray(value) && !(value instanceof Uint8Array)) {\n throw new Error(\"When making a scalar from encoded string, the value must be `Uint8Array`.\");\n }\n const shape = [];\n const inferredShape = [];\n return makeTensor(value, shape, inferredShape, dtype);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/sqrt.js\nfunction sqrt_(x) {\n const $x = convertToTensor(x, \"x\", \"sqrt\", \"float32\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Sqrt, inputs);\n}\nvar sqrt = op({ sqrt_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/square.js\nfunction square_(x) {\n const $x = convertToTensor(x, \"x\", \"square\");\n const attrs = {};\n return ENGINE.runKernel(\"Square\", { x: $x }, attrs);\n}\nvar square = op({ square_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/sum.js\nfunction sum_(x, axis = null, keepDims = false) {\n let $x = convertToTensor(x, \"x\", \"sum\");\n if ($x.dtype === \"bool\") {\n $x = cast($x, \"int32\");\n }\n const inputs = { x: $x };\n const attrs = { axis, keepDims };\n return ENGINE.runKernel(Sum, inputs, attrs);\n}\nvar sum2 = op({ sum_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/norm.js\nfunction norm_(x, ord = \"euclidean\", axis = null, keepDims = false) {\n x = convertToTensor(x, \"x\", \"norm\");\n const norm2 = normImpl(x, ord, axis);\n let keepDimsShape = norm2.shape;\n if (keepDims) {\n const axes = parseAxisParam(axis, x.shape);\n keepDimsShape = expandShapeToKeepDim(norm2.shape, axes);\n }\n return reshape(norm2, keepDimsShape);\n}\nfunction normImpl(x, p2, axis = null) {\n if (x.rank === 0) {\n return abs(x);\n }\n if (x.rank !== 1 && axis === null) {\n return normImpl(reshape(x, [-1]), p2, axis);\n }\n if (x.rank === 1 || typeof axis === \"number\" || Array.isArray(axis) && axis.length === 1) {\n if (p2 === 1) {\n return sum2(abs(x), axis);\n }\n if (p2 === Infinity) {\n return max(abs(x), axis);\n }\n if (p2 === -Infinity) {\n return min(abs(x), axis);\n }\n if (p2 === \"euclidean\" || p2 === 2) {\n return sqrt(sum2(pow(abs(x), scalar(2, \"int32\")), axis));\n }\n throw new Error(`Error in norm: invalid ord value: ${p2}`);\n }\n if (Array.isArray(axis) && axis.length === 2) {\n if (p2 === 1) {\n return max(sum2(abs(x), axis[0]), axis[1] - 1);\n }\n if (p2 === Infinity) {\n return max(sum2(abs(x), axis[1]), axis[0]);\n }\n if (p2 === -Infinity) {\n return min(sum2(abs(x), axis[1]), axis[0]);\n }\n if (p2 === \"fro\" || p2 === \"euclidean\") {\n return sqrt(sum2(square(x), axis));\n }\n throw new Error(`Error in norm: invalid ord value: ${p2}`);\n }\n throw new Error(`Error in norm: invalid axis: ${axis}`);\n}\nvar norm = op({ norm_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/euclidean_norm.js\nfunction euclideanNorm_(x, axis = null, keepDims = false) {\n return norm(x, \"euclidean\", axis, keepDims);\n}\nvar euclideanNorm = op({ euclideanNorm_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/exp.js\nfunction exp_(x) {\n const $x = convertToTensor(x, \"x\", \"exp\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Exp, inputs);\n}\nvar exp = op({ exp_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/expand_dims.js\nfunction expandDims_(x, axis = 0) {\n const $x = convertToTensor(x, \"x\", \"expandDims\", \"string_or_numeric\");\n assert(axis <= $x.rank, () => \"Axis must be <= rank of the tensor\");\n const inputs = { input: $x };\n const attrs = { dim: axis };\n return ENGINE.runKernel(ExpandDims, inputs, attrs);\n}\nvar expandDims = op({ expandDims_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/expm1.js\nfunction expm1_(x) {\n const $x = convertToTensor(x, \"x\", \"expm1\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Expm1, inputs);\n}\nvar expm1 = op({ expm1_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/tile.js\nfunction tile_(x, reps) {\n const $x = convertToTensor(x, \"x\", \"tile\", \"string_or_numeric\");\n assert($x.rank === reps.length, () => `Error in transpose: rank of input ${$x.rank} must match length of reps ${reps}.`);\n const inputs = { x: $x };\n const attrs = { reps };\n return ENGINE.runKernel(Tile, inputs, attrs);\n}\nvar tile = op({ tile_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/eye.js\nfunction eye_(numRows, numColumns, batchShape, dtype = \"float32\") {\n if (numColumns == null) {\n numColumns = numRows;\n }\n const buff = buffer([numRows, numColumns], dtype);\n const n = numRows <= numColumns ? numRows : numColumns;\n for (let i = 0; i < n; ++i) {\n buff.set(1, i, i);\n }\n const out = reshape(buff.toTensor(), [numRows, numColumns]);\n if (batchShape == null) {\n return out;\n } else {\n if (batchShape.length === 1) {\n return tile(expandDims(out, 0), [batchShape[0], 1, 1]);\n } else if (batchShape.length === 2) {\n return tile(expandDims(expandDims(out, 0), 0), [batchShape[0], batchShape[1], 1, 1]);\n } else if (batchShape.length === 3) {\n return tile(expandDims(expandDims(expandDims(out, 0), 0), 0), [\n batchShape[0],\n batchShape[1],\n batchShape[2],\n 1,\n 1\n ]);\n } else {\n throw new Error(`eye() currently supports only 1D and 2D batchShapes, but received ${batchShape.length}D.`);\n }\n }\n}\nvar eye = op({ eye_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/fill.js\nfunction fill(shape, value, dtype) {\n const attrs = { shape, value, dtype };\n return ENGINE.runKernel(Fill, {}, attrs);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/floor.js\nfunction floor_(x) {\n const $x = convertToTensor(x, \"x\", \"floor\", \"float32\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Floor, inputs);\n}\nvar floor = op({ floor_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/gather.js\nfunction gather_(x, indices, axis = 0, batchDims = 0) {\n const $x = convertToTensor(x, \"x\", \"gather\");\n const $indices = convertToTensor(indices, \"indices\", \"gather\", \"int32\");\n const inputs = { x: $x, indices: $indices };\n const attrs = { axis, batchDims };\n return ENGINE.runKernel(GatherV2, inputs, attrs);\n}\nvar gather = op({ gather_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/greater.js\nfunction greater_(a, b) {\n let $a = convertToTensor(a, \"a\", \"greater\", \"string_or_numeric\");\n let $b = convertToTensor(b, \"b\", \"greater\", \"string_or_numeric\");\n [$a, $b] = makeTypesMatch($a, $b);\n assertAndGetBroadcastShape($a.shape, $b.shape);\n const inputs = { a: $a, b: $b };\n return ENGINE.runKernel(Greater, inputs);\n}\nvar greater = op({ greater_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/greater_equal.js\nfunction greaterEqual_(a, b) {\n let $a = convertToTensor(a, \"a\", \"greaterEqual\", \"string_or_numeric\");\n let $b = convertToTensor(b, \"b\", \"greaterEqual\", \"string_or_numeric\");\n [$a, $b] = makeTypesMatch($a, $b);\n assertAndGetBroadcastShape($a.shape, $b.shape);\n const inputs = { a: $a, b: $b };\n return ENGINE.runKernel(GreaterEqual, inputs);\n}\nvar greaterEqual = op({ greaterEqual_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/is_finite.js\nfunction isFinite_(x) {\n const $x = convertToTensor(x, \"x\", \"isFinite\");\n const inputs = { x: $x };\n return ENGINE.runKernel(IsFinite, inputs);\n}\nvar isFinite2 = op({ isFinite_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/is_inf.js\nfunction isInf_(x) {\n const $x = convertToTensor(x, \"x\", \"isInf\");\n const inputs = { x: $x };\n return ENGINE.runKernel(IsInf, inputs);\n}\nvar isInf = op({ isInf_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/is_nan.js\nfunction isNaN_(x) {\n const $x = convertToTensor(x, \"x\", \"isNaN\");\n const inputs = { x: $x };\n return ENGINE.runKernel(IsNan, inputs);\n}\nvar isNaN2 = op({ isNaN_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/leaky_relu.js\nfunction leakyRelu_(x, alpha = 0.2) {\n const $x = convertToTensor(x, \"x\", \"leakyRelu\");\n const inputs = { x: $x };\n const attrs = { alpha };\n return ENGINE.runKernel(LeakyRelu, inputs, attrs);\n}\nvar leakyRelu = op({ leakyRelu_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/less.js\nfunction less_(a, b) {\n let $a = convertToTensor(a, \"a\", \"less\", \"string_or_numeric\");\n let $b = convertToTensor(b, \"b\", \"less\", \"string_or_numeric\");\n [$a, $b] = makeTypesMatch($a, $b);\n assertAndGetBroadcastShape($a.shape, $b.shape);\n const inputs = { a: $a, b: $b };\n return ENGINE.runKernel(Less, inputs);\n}\nvar less = op({ less_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/less_equal.js\nfunction lessEqual_(a, b) {\n let $a = convertToTensor(a, \"a\", \"lessEqual\", \"string_or_numeric\");\n let $b = convertToTensor(b, \"b\", \"lessEqual\", \"string_or_numeric\");\n [$a, $b] = makeTypesMatch($a, $b);\n assertAndGetBroadcastShape($a.shape, $b.shape);\n const inputs = { a: $a, b: $b };\n return ENGINE.runKernel(LessEqual, inputs);\n}\nvar lessEqual = op({ lessEqual_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/linspace.js\nfunction linspace(start, stop, num) {\n if (num <= 0) {\n throw new Error(\"The number of values should be positive.\");\n }\n const attrs = { start, stop, num };\n return ENGINE.runKernel(LinSpace, {}, attrs);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/local_response_normalization.js\nfunction localResponseNormalization_(x, depthRadius = 5, bias = 1, alpha = 1, beta = 0.5) {\n const $x = convertToTensor(x, \"x\", \"localResponseNormalization\");\n assert($x.rank === 4 || $x.rank === 3, () => `Error in localResponseNormalization: x must be rank 3 or 4 but got\n rank ${$x.rank}.`);\n assert(isInt(depthRadius), () => `Error in localResponseNormalization: depthRadius must be an integer but got depthRadius ${depthRadius}.`);\n let x4D = $x;\n let reshapedTo4D = false;\n if ($x.rank === 3) {\n reshapedTo4D = true;\n x4D = reshape($x, [1, $x.shape[0], $x.shape[1], $x.shape[2]]);\n }\n const inputs = { x: x4D };\n const attrs = { depthRadius, bias, alpha, beta };\n const res = ENGINE.runKernel(LRN, inputs, attrs);\n if (reshapedTo4D) {\n return reshape(res, [res.shape[1], res.shape[2], res.shape[3]]);\n } else {\n return res;\n }\n}\nvar localResponseNormalization = op({ localResponseNormalization_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/log.js\nfunction log_(x) {\n const $x = convertToTensor(x, \"x\", \"log\", \"float32\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Log, inputs);\n}\nvar log2 = op({ log_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/log1p.js\nfunction log1p_(x) {\n const $x = convertToTensor(x, \"x\", \"log1p\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Log1p, inputs);\n}\nvar log1p = op({ log1p_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients.js\nfunction grad(f) {\n assert(isFunction(f), () => \"The f passed in grad(f) must be a function\");\n return (x, dy) => {\n const $x = convertToTensor(x, \"x\", \"tf.grad\", \"string_or_numeric\");\n const $dy = dy != null ? convertToTensor(dy, \"dy\", \"tf.grad\") : null;\n return ENGINE.tidy(() => {\n const { value, grads: grads2 } = ENGINE.gradients(() => f($x), [$x], $dy);\n if ($dy != null) {\n assertShapesMatch(value.shape, $dy.shape, \"The shape of dy passed in grad(f)(x, dy) must match the shape returned by f(x)\");\n }\n checkGrads(grads2);\n return grads2[0];\n });\n };\n}\nfunction grads(f) {\n assert(isFunction(f), () => \"The f passed in grads(f) must be a function\");\n return (args, dy) => {\n assert(Array.isArray(args), () => \"The args passed in grads(f)(args) must be an array of `Tensor`s or `TensorLike`s\");\n const $args = convertToTensorArray(args, \"args\", \"tf.grads\", \"string_or_numeric\");\n const $dy = dy != null ? convertToTensor(dy, \"dy\", \"tf.grads\") : null;\n return ENGINE.tidy(() => {\n const { value, grads: grads2 } = ENGINE.gradients(() => f(...$args), $args, $dy);\n if ($dy != null) {\n assertShapesMatch(value.shape, $dy.shape, \"The shape of dy passed in grads(f)([x1,...], dy) must match the shape returned by f([x1,...])\");\n }\n checkGrads(grads2);\n return grads2;\n });\n };\n}\nfunction valueAndGrad(f) {\n assert(isFunction(f), () => \"The f passed in valueAndGrad(f) must be a function\");\n return (x, dy) => {\n assert(x instanceof Tensor, () => \"The x passed in valueAndGrad(f)(x) must be a tensor\");\n assert(dy == null || dy instanceof Tensor, () => \"The dy passed in valueAndGrad(f)(x, dy) must be a tensor\");\n const { grads: grads2, value } = ENGINE.gradients(() => f(x), [x], dy);\n checkGrads(grads2);\n return { grad: grads2[0], value };\n };\n}\nfunction valueAndGrads(f) {\n assert(isFunction(f), () => \"The f passed in valueAndGrads(f) must be a function\");\n return (args, dy) => {\n assert(Array.isArray(args) && args.every((arg) => arg instanceof Tensor), () => \"The args passed in valueAndGrads(f)(args) must be array of tensors\");\n assert(dy == null || dy instanceof Tensor, () => \"The dy passed in valueAndGrads(f)(args, dy) must be a tensor\");\n const res = ENGINE.gradients(() => f(...args), args, dy);\n if (dy != null) {\n assertShapesMatch(res.value.shape, dy.shape, \"The shape of dy passed in valueAndGrads(f)([x1,...], dy) must match the shape returned by f([x1,...])\");\n }\n checkGrads(res.grads);\n return res;\n };\n}\nfunction variableGrads(f, varList) {\n assert(isFunction(f), () => \"The f passed in variableGrads(f) must be a function\");\n assert(varList == null || Array.isArray(varList) && varList.every((v) => v instanceof Variable), () => \"The varList passed in variableGrads(f, varList) must be an array of variables\");\n const specifiedVarList = varList != null;\n if (!specifiedVarList) {\n varList = [];\n for (const varName in ENGINE.registeredVariables) {\n varList.push(ENGINE.registeredVariables[varName]);\n }\n }\n const specifiedNonTrainable = specifiedVarList ? varList.filter((variable2) => !variable2.trainable) : null;\n const originalVarCount = varList.length;\n varList = varList.filter((variable2) => variable2.trainable);\n assert(varList.length > 0, () => `variableGrads() expects at least one of the input variables to be trainable, but none of the ${originalVarCount} variables is trainable.`);\n const allowNoGradients = true;\n const { value, grads: grads2 } = ENGINE.gradients(f, varList, null, allowNoGradients);\n assert(grads2.some((g) => g != null), () => \"Cannot find a connection between any variable and the result of the loss function y=f(x). Please make sure the operations that use variables are inside the function f passed to minimize().\");\n assert(value.rank === 0, () => `The f passed in variableGrads(f) must return a scalar, but it returned a rank-${value.rank} tensor`);\n const namedGrads = {};\n varList.forEach((v, i) => {\n if (grads2[i] != null) {\n namedGrads[v.name] = grads2[i];\n }\n });\n if (specifiedNonTrainable != null) {\n specifiedNonTrainable.forEach((v) => namedGrads[v.name] = null);\n }\n return { value, grads: namedGrads };\n}\nfunction customGrad(f) {\n return ENGINE.customGrad(f);\n}\nfunction checkGrads(grads2) {\n const numNullGradients = grads2.filter((g) => g == null).length;\n if (numNullGradients > 0) {\n throw new Error(`Cannot compute gradient of y=f(x) with respect to x. Make sure that\n the f you passed encloses all operations that lead from x to y.`);\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/softplus.js\nfunction softplus_(x) {\n const $x = convertToTensor(x, \"x\", \"softplus\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Softplus, inputs);\n}\nvar softplus = op({ softplus_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/log_sigmoid.js\nfunction logSigmoid_(x) {\n const $x = convertToTensor(x, \"x\", \"logSigmoid\");\n const customOp = customGrad((x2) => {\n const value = neg(softplus(neg(x2)));\n const gradFunc = (dy) => {\n const derX = mul(dy, sigmoid(neg(x2)));\n return derX;\n };\n return { value, gradFunc };\n });\n return customOp($x);\n}\nvar logSigmoid = op({ logSigmoid_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/sub.js\nfunction sub_(a, b) {\n let $a = convertToTensor(a, \"a\", \"sub\");\n let $b = convertToTensor(b, \"b\", \"sub\");\n [$a, $b] = makeTypesMatch($a, $b);\n const inputs = { a: $a, b: $b };\n return ENGINE.runKernel(Sub, inputs);\n}\nvar sub = op({ sub_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/log_softmax.js\nfunction logSoftmax_(logits, axis = -1) {\n const $logits = convertToTensor(logits, \"logits\", \"logSoftmax\");\n if (axis === -1) {\n axis = $logits.rank - 1;\n }\n if (axis !== $logits.rank - 1) {\n throw Error(`Log Softmax along a non-last dimension is not yet supported. Logits was rank ${$logits.rank} and axis was ${axis}`);\n }\n const customOp = customGrad((logits2, save) => {\n const keepDims = true;\n const xMax = max(logits2, axis, true);\n const shifted = sub(logits2, xMax);\n const value = sub(cast(shifted, \"float32\"), log2(sum2(exp(shifted), axis, keepDims)));\n save([value]);\n const gradFunc = (dy, saved) => {\n const [value2] = saved;\n const keepDims2 = true;\n const softmax7 = exp(value2);\n return sub(dy, mul(sum2(dy, axis, keepDims2), softmax7));\n };\n return { value, gradFunc };\n });\n return customOp($logits);\n}\nvar logSoftmax = op({ logSoftmax_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/log_sum_exp.js\nfunction logSumExp_(x, axis = null, keepDims = false) {\n const $x = convertToTensor(x, \"x\", \"logSumExp\");\n const axes = parseAxisParam(axis, $x.shape);\n const xMax = max($x, axes, true);\n const a = sub($x, xMax);\n const b = exp(a);\n const c = sum2(b, axes);\n const d = log2(c);\n const res = add2(reshape(xMax, d.shape), d);\n if (keepDims) {\n const newShape = expandShapeToKeepDim(res.shape, axes);\n return reshape(res, newShape);\n }\n return res;\n}\nvar logSumExp = op({ logSumExp_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/logical_and.js\nfunction logicalAnd_(a, b) {\n const $a = convertToTensor(a, \"a\", \"logicalAnd\", \"bool\");\n const $b = convertToTensor(b, \"b\", \"logicalAnd\", \"bool\");\n assertAndGetBroadcastShape($a.shape, $b.shape);\n const inputs = { a: $a, b: $b };\n return ENGINE.runKernel(LogicalAnd, inputs);\n}\nvar logicalAnd = op({ logicalAnd_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/logical_not.js\nfunction logicalNot_(x) {\n const $x = convertToTensor(x, \"x\", \"logicalNot\", \"bool\");\n const inputs = { x: $x };\n return ENGINE.runKernel(LogicalNot, inputs);\n}\nvar logicalNot = op({ logicalNot_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/logical_or.js\nfunction logicalOr_(a, b) {\n const $a = convertToTensor(a, \"a\", \"logicalOr\", \"bool\");\n const $b = convertToTensor(b, \"b\", \"logicalOr\", \"bool\");\n assertAndGetBroadcastShape($a.shape, $b.shape);\n const inputs = { a: $a, b: $b };\n return ENGINE.runKernel(LogicalOr, inputs);\n}\nvar logicalOr = op({ logicalOr_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/logical_xor.js\nfunction logicalXor_(a, b) {\n const $a = convertToTensor(a, \"a\", \"logicalXor\", \"bool\");\n const $b = convertToTensor(b, \"b\", \"logicalXor\", \"bool\");\n assertAndGetBroadcastShape($a.shape, $b.shape);\n return logicalAnd(logicalOr(a, b), logicalNot(logicalAnd(a, b)));\n}\nvar logicalXor = op({ logicalXor_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/search_sorted.js\nvar INT32_MAX = 2147483648;\nfunction searchSorted_(sortedSequence, values, side = \"left\") {\n const $sortedSequence = convertToTensor(sortedSequence, \"sortedSequence\", \"searchSorted\");\n const $values = convertToTensor(values, \"values\", \"searchSorted\");\n const sequenceSize = $sortedSequence.shape[$sortedSequence.shape.length - 1];\n const valuesSize = $values.shape[$values.shape.length - 1];\n const $sortedSequence2D = reshape($sortedSequence, [-1, sequenceSize]);\n const $values2D = reshape($values, [-1, valuesSize]);\n if ($sortedSequence2D.rank < 2) {\n throw new Error(`Sorted input argument must be at least 2-dimensional`);\n }\n if ($sortedSequence2D.shape[0] !== $values2D.shape[0]) {\n throw new Error(`Leading dimension of 'sortedSequence' and 'values' must match.`);\n }\n if (sizeFromShape($values2D.shape) >= INT32_MAX) {\n throw new Error(`values tensor size must less than ${INT32_MAX}`);\n }\n if ($sortedSequence2D.shape[1] >= INT32_MAX) {\n throw new Error(`trailing dim_size must less than ${INT32_MAX} for int32 output type, was ${$sortedSequence2D.shape[1]}`);\n }\n const inputs = {\n sortedSequence: $sortedSequence2D,\n values: $values2D\n };\n const attrs = { side };\n return ENGINE.runKernel(SearchSorted, inputs, attrs);\n}\nvar searchSorted = op({ searchSorted_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/lower_bound.js\nfunction lowerBound(sortedSequence, values) {\n return searchSorted(sortedSequence, values, \"left\");\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/max_pool.js\nfunction maxPool_(x, filterSize, strides, pad3, dimRoundingMode) {\n const $x = convertToTensor(x, \"x\", \"maxPool\");\n const dilations = 1;\n let x4D = $x;\n let reshapedTo4D = false;\n if ($x.rank === 3) {\n reshapedTo4D = true;\n x4D = reshape($x, [1, $x.shape[0], $x.shape[1], $x.shape[2]]);\n }\n assert(x4D.rank === 4, () => `Error in maxPool: input must be rank 4 but got rank ${x4D.rank}.`);\n assert(eitherStridesOrDilationsAreOne(strides, dilations), () => `Error in maxPool: Either strides or dilations must be 1. Got strides ${strides} and dilations '${dilations}'`);\n checkPadOnDimRoundingMode(\"maxPool\", pad3, dimRoundingMode);\n const inputs = { x: x4D };\n const attrs = { filterSize, strides, pad: pad3, dimRoundingMode };\n const res = ENGINE.runKernel(MaxPool, inputs, attrs);\n if (reshapedTo4D) {\n return reshape(res, [res.shape[1], res.shape[2], res.shape[3]]);\n }\n return res;\n}\nvar maxPool = op({ maxPool_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/max_pool_3d.js\nfunction maxPool3d_(x, filterSize = [1, 1, 1], strides, pad3, dimRoundingMode, dataFormat = \"NDHWC\") {\n const $x = convertToTensor(x, \"x\", \"maxPool3d\");\n let x5D = $x;\n let reshapedTo5D = false;\n if ($x.rank === 4) {\n reshapedTo5D = true;\n x5D = reshape($x, [1, $x.shape[0], $x.shape[1], $x.shape[2], $x.shape[3]]);\n }\n assert(x5D.rank === 5, () => `Error in maxPool3d: x must be rank 5 but got rank ${x5D.rank}.`);\n assert(dataFormat === \"NDHWC\", () => `Error in maxPool3d: Only NDHWC is currently supported, but got dataFormat of ${dataFormat}`);\n checkPadOnDimRoundingMode(\"maxPool3d\", pad3, dimRoundingMode);\n const inputs = { x: x5D };\n const attrs = { filterSize, strides, pad: pad3, dimRoundingMode, dataFormat };\n const res = ENGINE.runKernel(MaxPool3D, inputs, attrs);\n if (reshapedTo5D) {\n return reshape(res, [res.shape[1], res.shape[2], res.shape[3], res.shape[4]]);\n }\n return res;\n}\nvar maxPool3d = op({ maxPool3d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/max_pool_with_argmax.js\nfunction maxPoolWithArgmax_(x, filterSize, strides, pad3, includeBatchInIndex = false) {\n const $x = convertToTensor(x, \"x\", \"maxPoolWithArgmax\");\n const inputs = { x: $x };\n const attrs = { filterSize, strides, pad: pad3, includeBatchInIndex };\n const result = ENGINE.runKernel(MaxPoolWithArgmax, inputs, attrs);\n return { result: result[0], indexes: result[1] };\n}\nvar maxPoolWithArgmax = op({ maxPoolWithArgmax_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/maximum.js\nfunction maximum_(a, b) {\n let $a = convertToTensor(a, \"a\", \"maximum\");\n let $b = convertToTensor(b, \"b\", \"maximum\");\n [$a, $b] = makeTypesMatch($a, $b);\n if ($a.dtype === \"bool\") {\n $a = cast($a, \"int32\");\n $b = cast($b, \"int32\");\n }\n assertAndGetBroadcastShape($a.shape, $b.shape);\n const inputs = { a: $a, b: $b };\n return ENGINE.runKernel(Maximum, inputs);\n}\nvar maximum = op({ maximum_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/mean.js\nfunction mean_(x, axis = null, keepDims = false) {\n const $x = convertToTensor(x, \"x\", \"mean\");\n const inputs = { x: $x };\n const attrs = { axis, keepDims };\n return ENGINE.runKernel(Mean, inputs, attrs);\n}\nvar mean = op({ mean_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/zeros.js\nfunction zeros(shape, dtype = \"float32\") {\n if (dtype === \"complex64\") {\n const real5 = zeros(shape, \"float32\");\n const imag5 = zeros(shape, \"float32\");\n return complex(real5, imag5);\n }\n const values = makeZerosTypedArray(sizeFromShape(shape), dtype);\n return ENGINE.makeTensor(values, shape, dtype);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/ones.js\nfunction ones2(shape, dtype = \"float32\") {\n if (dtype === \"complex64\") {\n const real5 = ones2(shape, \"float32\");\n const imag5 = zeros(shape, \"float32\");\n return complex(real5, imag5);\n }\n const values = makeOnesTypedArray(sizeFromShape(shape), dtype);\n return ENGINE.makeTensor(values, shape, dtype);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/meshgrid.js\nfunction meshgrid(x, y, { indexing = \"xy\" } = {}) {\n if (indexing !== \"xy\" && indexing !== \"ij\") {\n throw new TypeError(`${indexing} is not a valid third argument to meshgrid`);\n }\n if (x === void 0) {\n return [];\n }\n let $x = convertToTensor(x, \"x\", \"meshgrid\", x instanceof Tensor ? x.dtype : \"float32\");\n if (y === void 0) {\n return [$x];\n }\n let $y = convertToTensor(y, \"y\", \"meshgrid\", y instanceof Tensor ? y.dtype : \"float32\");\n const w = sizeFromShape($x.shape);\n const h = sizeFromShape($y.shape);\n if (indexing === \"xy\") {\n $x = reshape($x, [1, -1]);\n $y = reshape($y, [-1, 1]);\n return [\n matMul(ones2([h, 1], $x.dtype), $x),\n matMul($y, ones2([1, w], $y.dtype))\n ];\n }\n $x = reshape($x, [-1, 1]);\n $y = reshape($y, [1, -1]);\n return [\n matMul($x, ones2([1, h], $x.dtype)),\n matMul(ones2([w, 1], $y.dtype), $y)\n ];\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/minimum.js\nfunction minimum_(a, b) {\n let $a = convertToTensor(a, \"a\", \"minimum\");\n let $b = convertToTensor(b, \"b\", \"minimum\");\n [$a, $b] = makeTypesMatch($a, $b);\n if ($a.dtype === \"bool\") {\n $a = cast($a, \"int32\");\n $b = cast($b, \"int32\");\n }\n assertAndGetBroadcastShape($a.shape, $b.shape);\n const inputs = { a: $a, b: $b };\n return ENGINE.runKernel(Minimum, inputs);\n}\nvar minimum = op({ minimum_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/mirror_pad.js\nfunction mirrorPad_(x, paddings, mode) {\n assert(mode === \"reflect\" || mode === \"symmetric\", () => `Invalid mode. Mode must be either reflect or symmetric. Got ${mode}.`);\n const $x = convertToTensor(x, \"x\", \"mirrorPad\");\n if ($x.rank === 0) {\n throw new Error(\"mirrorPad(scalar) is not defined. Pass non-scalar to mirrorPad\");\n }\n assert(paddings.length === $x.rank, () => `Padding doesn't match input. Must be ${$x.rank}. Got ${paddings.length}.`);\n const shapeOffset = mode === \"reflect\" ? 1 : 0;\n for (let i = 0; i < $x.rank; i++) {\n assert(paddings[i].length === 2, () => `Invalid number of paddings. Must be length of 2 each.`);\n assert(paddings[i][0] >= 0 && paddings[i][0] <= $x.shape[i] - shapeOffset && paddings[i][1] >= 0 && paddings[i][1] <= $x.shape[i] - shapeOffset, () => `Padding in dimension ${i} cannot be greater than or equal to ${$x.shape[i] - shapeOffset} or less than 0 for input of shape ${$x.shape}`);\n }\n const attrs = { paddings, mode };\n const inputs = { x: $x };\n return ENGINE.runKernel(MirrorPad, inputs, attrs);\n}\nvar mirrorPad = op({ mirrorPad_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/mod.js\nfunction mod_(a, b) {\n let $a = convertToTensor(a, \"a\", \"mod\");\n let $b = convertToTensor(b, \"b\", \"mod\");\n [$a, $b] = makeTypesMatch($a, $b);\n const inputs = { a: $a, b: $b };\n return ENGINE.runKernel(Mod, inputs);\n}\nvar mod = op({ mod_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/moments.js\nfunction moments_(x, axis = null, keepDims = false) {\n x = convertToTensor(x, \"x\", \"moments\");\n const axes = parseAxisParam(axis, x.shape);\n const xMean = mean(x, axes, keepDims);\n let keepDimsShape = xMean.shape;\n if (!keepDims) {\n keepDimsShape = expandShapeToKeepDim(xMean.shape, axes);\n }\n const devSquared = square(sub(cast(x, \"float32\"), reshape(xMean, keepDimsShape)));\n const variance = mean(devSquared, axes, keepDims);\n return { mean: xMean, variance };\n}\nvar moments = op({ moments_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/multi_rnn_cell.js\nfunction multiRNNCell_(lstmCells, data, c, h) {\n const $data = convertToTensor(data, \"data\", \"multiRNNCell\");\n const $c = convertToTensorArray(c, \"c\", \"multiRNNCell\");\n const $h = convertToTensorArray(h, \"h\", \"multiRNNCell\");\n let input2 = $data;\n const newStates = [];\n for (let i = 0; i < lstmCells.length; i++) {\n const output = lstmCells[i](input2, $c[i], $h[i]);\n newStates.push(output[0]);\n newStates.push(output[1]);\n input2 = output[1];\n }\n const newC = [];\n const newH = [];\n for (let i = 0; i < newStates.length; i += 2) {\n newC.push(newStates[i]);\n newH.push(newStates[i + 1]);\n }\n return [newC, newH];\n}\nvar multiRNNCell = op({ multiRNNCell_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/multinomial.js\nfunction multinomial_(logits, numSamples, seed, normalized = false) {\n const $logits = convertToTensor(logits, \"logits\", \"multinomial\");\n const numOutcomes = $logits.size;\n const origRank = $logits.rank;\n if (numOutcomes < 2) {\n throw new Error(`Error in multinomial: you need at least 2 outcomes, but got ${numOutcomes}.`);\n }\n if (origRank > 2) {\n throw new Error(`Rank of probabilities must be 1 or 2, but is ${origRank}`);\n }\n seed = seed || Math.random();\n const logits2D = origRank === 1 ? reshape($logits, [1, -1]) : $logits;\n const inputs = { logits: logits2D };\n const attrs = { numSamples, seed, normalized };\n const res = ENGINE.runKernel(Multinomial, inputs, attrs);\n return origRank === 1 ? reshape(res, [res.size]) : res;\n}\nvar multinomial = op({ multinomial_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/not_equal.js\nfunction notEqual_(a, b) {\n let $a = convertToTensor(a, \"a\", \"notEqual\", \"string_or_numeric\");\n let $b = convertToTensor(b, \"b\", \"notEqual\", \"string_or_numeric\");\n [$a, $b] = makeTypesMatch($a, $b);\n assertAndGetBroadcastShape($a.shape, $b.shape);\n const inputs = { a: $a, b: $b };\n return ENGINE.runKernel(NotEqual, inputs);\n}\nvar notEqual = op({ notEqual_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/ones_like.js\nfunction onesLike_(x) {\n const $x = convertToTensor(x, \"x\", \"onesLike\");\n const inputs = { x: $x };\n return ENGINE.runKernel(OnesLike, inputs);\n}\nvar onesLike = op({ onesLike_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/outer_product.js\nfunction outerProduct_(v1, v2) {\n const $v1 = convertToTensor(v1, \"v1\", \"outerProduct\");\n const $v2 = convertToTensor(v2, \"v2\", \"outerProduct\");\n assert($v1.rank === 1 && $v2.rank === 1, () => `Error in outerProduct: inputs must be rank 1, but got ranks ${$v1.rank} and ${$v2.rank}.`);\n const v12D = reshape($v1, [-1, 1]);\n const v22D = reshape($v2, [1, -1]);\n return matMul(v12D, v22D);\n}\nvar outerProduct = op({ outerProduct_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/pad.js\nfunction pad_(x, paddings, constantValue = 0) {\n const $x = convertToTensor(x, \"x\", \"pad\");\n if ($x.rank === 0) {\n throw new Error(\"pad(scalar) is not defined. Pass non-scalar to pad\");\n }\n const attrs = { paddings, constantValue };\n const inputs = { x: $x };\n return ENGINE.runKernel(PadV2, inputs, attrs);\n}\nvar pad = op({ pad_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/pad1d.js\nfunction pad1d_(x, paddings, constantValue = 0) {\n assert(paddings.length === 2, () => \"Invalid number of paddings. Must be length of 2.\");\n return pad(x, [paddings], constantValue);\n}\nvar pad1d = op({ pad1d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/pad2d.js\nfunction pad2d_(x, paddings, constantValue = 0) {\n assert(paddings.length === 2 && paddings[0].length === 2 && paddings[1].length === 2, () => \"Invalid number of paddings. Must be length of 2 each.\");\n return pad(x, paddings, constantValue);\n}\nvar pad2d = op({ pad2d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/pad3d.js\nfunction pad3d_(x, paddings, constantValue = 0) {\n assert(paddings.length === 3 && paddings[0].length === 2 && paddings[1].length === 2 && paddings[2].length === 2, () => \"Invalid number of paddings. Must be length of 2 each.\");\n return pad(x, paddings, constantValue);\n}\nvar pad3d = op({ pad3d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/pad4d.js\nfunction pad4d_(x, paddings, constantValue = 0) {\n assert(paddings.length === 4 && paddings[0].length === 2 && paddings[1].length === 2 && paddings[2].length === 2 && paddings[3].length === 2, () => \"Invalid number of paddings. Must be length of 2 each.\");\n return pad(x, paddings, constantValue);\n}\nvar pad4d = op({ pad4d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/space_to_batch_nd.js\nfunction spaceToBatchND_(x, blockShape, paddings) {\n const $x = convertToTensor(x, \"x\", \"spaceToBatchND\");\n assert($x.rank >= 1 + blockShape.length, () => `input rank ${$x.rank} should be > than [blockShape] ${blockShape.length}`);\n assert(paddings.length === blockShape.length, () => `paddings.shape[0] ${paddings.length} must be equal to [blockShape] ${blockShape.length}`);\n assert($x.shape.reduce((a, b, i) => {\n if (i > 0 && i <= blockShape.length) {\n return a && (b + paddings[i - 1][0] + paddings[i - 1][1]) % blockShape[i - 1] === 0;\n }\n return a;\n }, true), () => `input spatial dimensions ${$x.shape.slice(1)} with paddings ${paddings.toString()} must be divisible by blockShapes ${blockShape.toString()}`);\n const inputs = { x: $x };\n const attrs = { blockShape, paddings };\n return ENGINE.runKernel(SpaceToBatchND, inputs, attrs);\n}\nvar spaceToBatchND = op({ spaceToBatchND_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/pool.js\nfunction pool_(input2, windowShape, poolingType, pad3, dilations, strides, dimRoundingMode) {\n if (dilations == null) {\n dilations = [1, 1];\n }\n if (strides == null) {\n strides = 1;\n }\n if (pad3 === 0) {\n pad3 = \"valid\";\n }\n const $x = convertToTensor(input2, \"x\", \"maxPool\");\n let x4D = $x;\n let reshapedTo4D = false;\n if ($x.rank === 3) {\n reshapedTo4D = true;\n x4D = reshape($x, [1, $x.shape[0], $x.shape[1], $x.shape[2]]);\n }\n assert(eitherStridesOrDilationsAreOne(strides, dilations), () => `Error in pool: Either strides or dilations must be 1. Got strides ${strides} and dilations '${dilations}'`);\n const convInfo = computePool2DInfo(x4D.shape, windowShape, strides, dilations, pad3);\n const dilation = [convInfo.dilationHeight, convInfo.dilationWidth];\n let basePadding;\n if (pad3 === \"same\") {\n basePadding = withSpaceToBatchBasePaddings([convInfo.filterHeight, convInfo.filterWidth], dilation);\n } else {\n basePadding = [[0, 0], [0, 0]];\n }\n const isDilationOne = dilation[0] === 1 && dilation[1] === 1;\n const [adjustedPadding, adjustedCrops] = requiredSpaceToBatchPaddings([convInfo.inHeight, convInfo.inWidth], dilation, basePadding);\n const convertedPad = isDilationOne ? pad3 : \"valid\";\n const convertedX = isDilationOne ? x4D : spaceToBatchND(x4D, dilation, adjustedPadding);\n const forwardOp = poolingType === \"avg\" ? () => avgPool(convertedX, windowShape, strides, convertedPad, dimRoundingMode) : () => maxPool(convertedX, windowShape, strides, convertedPad, dimRoundingMode);\n const y = forwardOp();\n const res = isDilationOne ? y : batchToSpaceND(y, dilation, adjustedCrops);\n if (reshapedTo4D) {\n return reshape(res, [res.shape[1], res.shape[2], res.shape[3]]);\n }\n return res;\n}\nfunction requiredSpaceToBatchPaddings(inputShape, blockShape, basePadding) {\n const padStart = basePadding.map((b) => b[0]);\n const origPadEnd = basePadding.map((b) => b[1]);\n const fullInputShape = inputShape.concat(padStart, origPadEnd);\n const padEndExtra = blockShape.map((b, i) => (b - fullInputShape[i] % b) % b);\n const padEnd = origPadEnd.map((s, i) => s + padEndExtra[i]);\n const paddings = blockShape.map((_, i) => [padStart[i], padEnd[i]]);\n const crops = blockShape.map((_, i) => [0, padEndExtra[i]]);\n return [paddings, crops];\n}\nfunction withSpaceToBatchBasePaddings(filterShape, dilation) {\n const dilatedFilterShape = filterShape.map((s, i) => {\n return s + (s - 1) * (dilation[i] - 1);\n });\n const padExtraShape = dilatedFilterShape.map((s) => s - 1);\n const padExtraStart = padExtraShape.map((s) => Math.floor(s / 2));\n const padExtraEnd = padExtraShape.map((s, i) => s - padExtraStart[i]);\n return padExtraShape.map((_, i) => {\n return [padExtraStart[i], padExtraEnd[i]];\n });\n}\nvar pool = op({ pool_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/prelu.js\nfunction prelu_(x, alpha) {\n const $x = convertToTensor(x, \"x\", \"prelu\");\n const $alpha = convertToTensor(alpha, \"alpha\", \"prelu\");\n const inputs = { x: $x, alpha: $alpha };\n return ENGINE.runKernel(Prelu, inputs);\n}\nvar prelu = op({ prelu_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/prod.js\nfunction prod_(x, axis = null, keepDims = false) {\n let $x = convertToTensor(x, \"x\", \"prod\");\n if ($x.dtype === \"bool\") {\n $x = cast($x, \"int32\");\n }\n const inputs = { x: $x };\n const attrs = { axis, keepDims };\n return ENGINE.runKernel(Prod, inputs, attrs);\n}\nvar prod = op({ prod_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/ragged_tensor_to_tensor.js\nfunction raggedTensorToTensor_(shape, values, defaultValue, rowPartitionTensors, rowPartitionTypes) {\n const $shape = convertToTensor(shape, \"shape\", \"raggedTensorToTensor\", \"int32\");\n const $values = convertToTensor(values, \"values\", \"raggedTensorToTensor\");\n const $defaultValue = convertToTensor(defaultValue, \"defaultValue\", \"raggedTensorToTensor\", $values.dtype);\n const $rowPartitionTensors = rowPartitionTensors.map((t, i) => convertToTensor(t, `tensors${i}`, \"raggedTensorToTensor\", \"int32\"));\n const inputs = {\n shape: $shape,\n values: $values,\n defaultValue: $defaultValue,\n rowPartitionTensors: $rowPartitionTensors\n };\n const attrs = { rowPartitionTypes };\n return ENGINE.runKernel(RaggedTensorToTensor, inputs, attrs);\n}\nvar raggedTensorToTensor = op({ raggedTensorToTensor_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/rand.js\nfunction rand_(shape, randFunction, dtype) {\n const size = sizeFromShape(shape);\n let values = null;\n if (dtype == null || dtype === \"float32\") {\n values = new Float32Array(size);\n } else if (dtype === \"int32\") {\n values = new Int32Array(size);\n } else if (dtype === \"bool\") {\n values = new Uint8Array(size);\n } else {\n throw new Error(`Unknown data type ${dtype}`);\n }\n for (let i = 0; i < size; i++) {\n values[i] = randFunction();\n }\n return ENGINE.makeTensor(values, shape, dtype);\n}\nvar rand = op({ rand_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/rand_util.js\nvar seedrandom = __toESM(require_seedrandom2());\nvar MPRandGauss = class {\n constructor(mean5, stdDeviation, dtype, truncated, seed) {\n this.mean = mean5;\n this.stdDev = stdDeviation;\n this.dtype = dtype;\n this.nextVal = NaN;\n this.truncated = truncated;\n if (this.truncated) {\n this.upper = this.mean + this.stdDev * 2;\n this.lower = this.mean - this.stdDev * 2;\n }\n const seedValue = seed ? seed : Math.random();\n this.random = seedrandom.alea(seedValue.toString());\n }\n nextValue() {\n if (!isNaN(this.nextVal)) {\n const value = this.nextVal;\n this.nextVal = NaN;\n return value;\n }\n let resultX, resultY;\n let isValid = false;\n while (!isValid) {\n let v1, v2, s;\n do {\n v1 = 2 * this.random() - 1;\n v2 = 2 * this.random() - 1;\n s = v1 * v1 + v2 * v2;\n } while (s >= 1 || s === 0);\n const mul2 = Math.sqrt(-2 * Math.log(s) / s);\n resultX = this.mean + this.stdDev * v1 * mul2;\n resultY = this.mean + this.stdDev * v2 * mul2;\n if (!this.truncated || this.isValidTruncated(resultX)) {\n isValid = true;\n }\n }\n if (!this.truncated || this.isValidTruncated(resultY)) {\n this.nextVal = this.convertValue(resultY);\n }\n return this.convertValue(resultX);\n }\n convertValue(value) {\n if (this.dtype == null || this.dtype === \"float32\") {\n return value;\n }\n return Math.round(value);\n }\n isValidTruncated(value) {\n return value <= this.upper && value >= this.lower;\n }\n};\nvar RandGamma = class {\n constructor(alpha, beta, dtype, seed) {\n this.alpha = alpha;\n this.beta = 1 / beta;\n this.dtype = dtype;\n const seedValue = seed ? seed : Math.random();\n this.randu = seedrandom.alea(seedValue.toString());\n this.randn = new MPRandGauss(0, 1, dtype, false, this.randu());\n if (alpha < 1) {\n this.d = alpha + 2 / 3;\n } else {\n this.d = alpha - 1 / 3;\n }\n this.c = 1 / Math.sqrt(9 * this.d);\n }\n nextValue() {\n let x2, v0, v1, x, u, v;\n while (true) {\n do {\n x = this.randn.nextValue();\n v = 1 + this.c * x;\n } while (v <= 0);\n v *= v * v;\n x2 = x * x;\n v0 = 1 - 0.331 * x2 * x2;\n v1 = 0.5 * x2 + this.d * (1 - v + Math.log(v));\n u = this.randu();\n if (u < v0 || Math.log(u) < v1) {\n break;\n }\n }\n v = 1 / this.beta * this.d * v;\n if (this.alpha < 1) {\n v *= Math.pow(this.randu(), 1 / this.alpha);\n }\n return this.convertValue(v);\n }\n convertValue(value) {\n if (this.dtype === \"float32\") {\n return value;\n }\n return Math.round(value);\n }\n};\nvar UniformRandom = class {\n constructor(min7 = 0, max7 = 1, dtype, seed) {\n this.canReturnFloat = () => this.dtype == null || this.dtype === \"float32\";\n this.min = min7;\n this.range = max7 - min7;\n this.dtype = dtype;\n if (seed == null) {\n seed = Math.random();\n }\n if (typeof seed === \"number\") {\n seed = seed.toString();\n }\n if (!this.canReturnFloat() && this.range <= 1) {\n throw new Error(`The difference between ${min7} - ${max7} <= 1 and dtype is not float`);\n }\n this.random = seedrandom.alea(seed);\n }\n convertValue(value) {\n if (this.canReturnFloat()) {\n return value;\n }\n return Math.round(value);\n }\n nextValue() {\n return this.convertValue(this.min + this.range * this.random());\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/random_gamma.js\nfunction randomGamma_(shape, alpha, beta = 1, dtype = \"float32\", seed) {\n if (beta == null) {\n beta = 1;\n }\n if (dtype == null) {\n dtype = \"float32\";\n }\n if (dtype !== \"float32\" && dtype !== \"int32\") {\n throw new Error(`Unsupported data type ${dtype}`);\n }\n const rgamma = new RandGamma(alpha, beta, dtype, seed);\n const res = buffer(shape, dtype);\n for (let i = 0; i < res.values.length; i++) {\n res.values[i] = rgamma.nextValue();\n }\n return res.toTensor();\n}\nvar randomGamma = op({ randomGamma_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/random_normal.js\nfunction randomNormal_(shape, mean5 = 0, stdDev = 1, dtype, seed) {\n if (dtype != null && dtype === \"bool\") {\n throw new Error(`Unsupported data type ${dtype}`);\n }\n const randGauss = new MPRandGauss(mean5, stdDev, dtype, false, seed);\n const res = buffer(shape, dtype);\n for (let i = 0; i < res.values.length; i++) {\n res.values[i] = randGauss.nextValue();\n }\n return res.toTensor();\n}\nvar randomNormal = op({ randomNormal_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/random_standard_normal.js\nfunction randomStandardNormal_(shape, dtype, seed) {\n if (dtype != null && dtype === \"bool\") {\n throw new Error(`Unsupported data type ${dtype}`);\n }\n return randomNormal(shape, 0, 1, dtype, seed);\n}\nvar randomStandardNormal = op({ randomStandardNormal_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/random_uniform.js\nfunction randomUniform_(shape, minval = 0, maxval = 1, dtype = \"float32\", seed) {\n const res = buffer(shape, dtype);\n const random = new UniformRandom(minval, maxval, null, seed);\n for (let i = 0; i < res.values.length; i++) {\n res.values[i] = random.nextValue();\n }\n return res.toTensor();\n}\nvar randomUniform = op({ randomUniform_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/range.js\nfunction range(start, stop, step5 = 1, dtype = \"float32\") {\n if (step5 === 0) {\n throw new Error(\"Cannot have a step of zero\");\n }\n const attrs = { start, stop, step: step5, dtype };\n return ENGINE.runKernel(Range, {}, attrs);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/reciprocal.js\nfunction reciprocal_(x) {\n const $x = convertToTensor(x, \"x\", \"reciprocal\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Reciprocal, inputs);\n}\nvar reciprocal = op({ reciprocal_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/relu.js\nfunction relu_(x) {\n const $x = convertToTensor(x, \"x\", \"relu\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Relu, inputs);\n}\nvar relu = op({ relu_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/relu6.js\nfunction relu6_(x) {\n const $x = convertToTensor(x, \"x\", \"relu6\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Relu6, inputs);\n}\nvar relu6 = op({ relu6_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/reverse.js\nfunction reverse_(x, axis) {\n const $x = convertToTensor(x, \"x\", \"reverse\");\n const inputs = { x: $x };\n const attrs = { dims: axis };\n return ENGINE.runKernel(Reverse, inputs, attrs);\n}\nvar reverse = op({ reverse_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/reverse_1d.js\nfunction reverse1d_(x) {\n const $x = convertToTensor(x, \"x\", \"reverse\");\n assert($x.rank === 1, () => `Error in reverse1D: x must be rank 1 but got rank ${$x.rank}.`);\n return reverse($x, 0);\n}\nvar reverse1d = op({ reverse1d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/reverse_2d.js\nfunction reverse2d_(x, axis) {\n const $x = convertToTensor(x, \"x\", \"reverse\");\n assert($x.rank === 2, () => `Error in reverse2D: x must be rank 2 but got rank ${$x.rank}.`);\n return reverse($x, axis);\n}\nvar reverse2d = op({ reverse2d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/reverse_3d.js\nfunction reverse3d_(x, axis) {\n const $x = convertToTensor(x, \"x\", \"reverse\");\n assert($x.rank === 3, () => `Error in reverse3D: x must be rank 3 but got rank ${$x.rank}.`);\n return reverse($x, axis);\n}\nvar reverse3d = op({ reverse3d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/reverse_4d.js\nfunction reverse4d_(x, axis) {\n const $x = convertToTensor(x, \"x\", \"reverse\");\n assert($x.rank === 4, () => `Error in reverse4D: x must be rank 4 but got rank ${$x.rank}.`);\n return reverse($x, axis);\n}\nvar reverse4d = op({ reverse4d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/round.js\nfunction round_(x) {\n const $x = convertToTensor(x, \"x\", \"round\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Round, inputs);\n}\nvar round2 = op({ round_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/rsqrt.js\nfunction rsqrt_(x) {\n const $x = convertToTensor(x, \"x\", \"rsqrt\", \"float32\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Rsqrt, inputs);\n}\nvar rsqrt = op({ rsqrt_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/selu.js\nfunction selu_(x) {\n const $x = convertToTensor(x, \"x\", \"selu\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Selu, inputs);\n}\nvar selu = op({ selu_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/separable_conv2d.js\nfunction separableConv2d_(x, depthwiseFilter, pointwiseFilter, strides, pad3, dilation = [1, 1], dataFormat = \"NHWC\") {\n const $x = convertToTensor(x, \"x\", \"separableConv2d\");\n const $depthwiseFilter = convertToTensor(depthwiseFilter, \"depthwiseFilter\", \"separableConv2d\");\n const $pointwiseFilter = convertToTensor(pointwiseFilter, \"pointwiseFilter\", \"separableConv2d\");\n let x4D = $x;\n let reshapedTo4D = false;\n if ($x.rank === 3) {\n reshapedTo4D = true;\n x4D = reshape($x, [1, $x.shape[0], $x.shape[1], $x.shape[2]]);\n }\n if (dataFormat === \"NCHW\") {\n throw new Error(\"separableConv2d currently does not support dataFormat NCHW; only NHWC is supported\");\n }\n assert(x4D.rank === 4, () => `Error in separableConv2d: input must be rank 4, but got rank ${x4D.rank}.`);\n assert($depthwiseFilter.rank === 4, () => `Error in separableConv2d: depthwise filter must be rank 4, but got rank ${$depthwiseFilter.rank}.`);\n assert($pointwiseFilter.rank === 4, () => `Error in separableConv2d: pointwise filter must be rank 4, but got rank ${$depthwiseFilter.rank}.`);\n assert($pointwiseFilter.shape[0] === 1, () => `Error in separableConv2d: the first dimension of pointwise filter must be 1, but got ${$pointwiseFilter.shape[0]}.`);\n assert($pointwiseFilter.shape[1] === 1, () => `Error in separableConv2d: the second dimension of pointwise filter must be 1, but got ${$pointwiseFilter.shape[1]}.`);\n const inChannels = $depthwiseFilter.shape[2];\n const channelMultiplier = $depthwiseFilter.shape[3];\n assert($pointwiseFilter.shape[2] === inChannels * channelMultiplier, () => `Error in separableConv2d: the third dimension of pointwise filter must be ${inChannels * channelMultiplier}, but got ${$pointwiseFilter.shape[2]}.`);\n const depthwise = depthwiseConv2d(x4D, $depthwiseFilter, strides, pad3, dataFormat, dilation);\n const pointwiseStride = 1;\n const res = conv2d(depthwise, $pointwiseFilter, pointwiseStride, \"valid\", dataFormat);\n if (reshapedTo4D) {\n return reshape(res, [res.shape[1], res.shape[2], res.shape[3]]);\n }\n return res;\n}\nvar separableConv2d = op({ separableConv2d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/setdiff1d_async.js\nasync function setdiff1dAsync_(x, y) {\n const $x = convertToTensor(x, \"x\", \"setdiff1d\");\n const $y = convertToTensor(y, \"y\", \"setdiff1d\");\n assert($x.dtype === $y.dtype, () => `x and y should have the same dtype, but got x (${$x.dtype}) and y (${$y.dtype}).`);\n assert($x.rank === 1, () => `x should be 1D tensor, but got x (${$x.shape}).`);\n assert($y.rank === 1, () => `y should be 1D tensor, but got y (${$y.shape}).`);\n const xVals = await $x.data();\n const yVals = await $y.data();\n const ySet = new Set(yVals);\n let outputSize = 0;\n for (let i = 0; i < xVals.length; i++) {\n if (!ySet.has(xVals[i])) {\n outputSize++;\n }\n }\n const buffer2 = new TensorBuffer([outputSize], $x.dtype);\n const indices = new TensorBuffer([outputSize], \"int32\");\n for (let i = 0, p2 = 0; i < xVals.length; i++) {\n if (!ySet.has(xVals[i])) {\n buffer2.values[p2] = xVals[i];\n indices.values[p2] = i;\n p2++;\n }\n }\n return [buffer2.toTensor(), indices.toTensor()];\n}\nvar setdiff1dAsync = setdiff1dAsync_;\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/sign.js\nfunction sign_(x) {\n const $x = convertToTensor(x, \"x\", \"sign\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Sign, inputs);\n}\nvar sign = op({ sign_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/sin.js\nfunction sin_(x) {\n const $x = convertToTensor(x, \"x\", \"sin\", \"float32\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Sin, inputs);\n}\nvar sin = op({ sin_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/sinh.js\nfunction sinh_(x) {\n const $x = convertToTensor(x, \"x\", \"sinh\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Sinh, inputs);\n}\nvar sinh = op({ sinh_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/slice1d.js\nfunction slice1d_(x, begin, size) {\n const $x = convertToTensor(x, \"x\", \"slice1d\");\n assert($x.rank === 1, () => `slice1d expects a rank-1 tensor, but got a rank-${$x.rank} tensor`);\n return slice($x, [begin], [size]);\n}\nvar slice1d = op({ slice1d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/slice2d.js\nfunction slice2d_(x, begin, size) {\n const $x = convertToTensor(x, \"x\", \"slice2d\");\n assert($x.rank === 2, () => `slice2d expects a rank-2 tensor, but got a rank-${$x.rank} tensor`);\n return slice($x, begin, size);\n}\nvar slice2d = op({ slice2d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/slice3d.js\nfunction slice3d_(x, begin, size) {\n const $x = convertToTensor(x, \"x\", \"slice3d\");\n assert($x.rank === 3, () => `slice3d expects a rank-3 tensor, but got a rank-${$x.rank} tensor`);\n return slice($x, begin, size);\n}\nvar slice3d = op({ slice3d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/slice4d.js\nfunction slice4d_(x, begin, size) {\n const $x = convertToTensor(x, \"x\", \"slice4d\");\n assert($x.rank === 4, () => `slice4d expects a rank-4 tensor, but got a rank-${$x.rank} tensor`);\n return slice($x, begin, size);\n}\nvar slice4d = op({ slice4d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/softmax.js\nfunction softmax_(logits, dim = -1) {\n const $logits = convertToTensor(logits, \"logits\", \"softmax\", \"float32\");\n if (dim === -1) {\n dim = $logits.rank - 1;\n }\n if (dim !== $logits.rank - 1) {\n throw Error(`Softmax along a non-last dimension is not yet supported. Logits was rank ${$logits.rank} and dim was ${dim}`);\n }\n const inputs = { logits: $logits };\n const attrs = { dim };\n return ENGINE.runKernel(Softmax, inputs, attrs);\n}\nvar softmax = op({ softmax_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/spectral/fft.js\nfunction fft_(input2) {\n assert(input2.dtype === \"complex64\", () => `The dtype for tf.spectral.fft() must be complex64 but got ${input2.dtype}.`);\n const inputs = { input: input2 };\n return ENGINE.runKernel(FFT, inputs);\n}\nvar fft = op({ fft_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/spectral/ifft.js\nfunction ifft_(input2) {\n assert(input2.dtype === \"complex64\", () => `The dtype for tf.spectral.ifft() must be complex64 but got ${input2.dtype}.`);\n const inputs = { input: input2 };\n return ENGINE.runKernel(IFFT, inputs);\n}\nvar ifft = op({ ifft_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/spectral/irfft.js\nfunction irfft_(input2) {\n const innerDimensionSize = input2.shape[input2.shape.length - 1];\n const batch = input2.size / innerDimensionSize;\n let ret;\n if (innerDimensionSize <= 2) {\n const complexInput = reshape(input2, [batch, innerDimensionSize]);\n ret = ifft(complexInput);\n } else {\n const outputShape = [batch, 2 * (innerDimensionSize - 1)];\n const realInput = reshape(real(input2), [batch, innerDimensionSize]);\n const imagInput = reshape(imag(input2), [batch, innerDimensionSize]);\n const realConjugate = reverse(slice(realInput, [0, 1], [batch, innerDimensionSize - 2]), 1);\n const imagConjugate = mul(reverse(slice(imagInput, [0, 1], [batch, innerDimensionSize - 2]), 1), scalar(-1));\n const r = concat([realInput, realConjugate], 1);\n const i = concat([imagInput, imagConjugate], 1);\n const complexInput = reshape(complex(r, i), [outputShape[0], outputShape[1]]);\n ret = ifft(complexInput);\n }\n ret = real(ret);\n if (input2.rank === 3 && input2.shape[0] !== 0) {\n const temp = ret;\n const batch2 = input2.shape[0];\n ret = reshape(ret, [batch2, ret.shape[0] / batch2, ret.shape[1]]);\n temp.dispose();\n }\n return ret;\n}\nvar irfft = op({ irfft_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/split.js\nfunction split_(x, numOrSizeSplits, axis = 0) {\n const $x = convertToTensor(x, \"x\", \"split\");\n const inputs = { x: $x };\n const attr = { numOrSizeSplits, axis };\n return ENGINE.runKernel(SplitV, inputs, attr);\n}\nvar split = op({ split_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/spectral/rfft.js\nfunction rfft_(input2, fftLength) {\n assert(input2.dtype === \"float32\", () => `The dtype for rfft() must be real value but got ${input2.dtype}`);\n let innerDimensionSize = input2.shape[input2.shape.length - 1];\n const batch = input2.size / innerDimensionSize;\n let adjustedInput;\n if (fftLength != null && fftLength < innerDimensionSize) {\n const begin = input2.shape.map((v) => 0);\n const size = input2.shape.map((v) => v);\n size[input2.shape.length - 1] = fftLength;\n adjustedInput = slice(input2, begin, size);\n innerDimensionSize = fftLength;\n } else if (fftLength != null && fftLength > innerDimensionSize) {\n const zerosShape = input2.shape.map((v) => v);\n zerosShape[input2.shape.length - 1] = fftLength - innerDimensionSize;\n adjustedInput = concat([input2, zeros(zerosShape)], input2.shape.length - 1);\n innerDimensionSize = fftLength;\n } else {\n adjustedInput = input2;\n }\n const zerosInput = zerosLike(adjustedInput);\n const complexInput = reshape(complex(adjustedInput, zerosInput), [batch, innerDimensionSize]);\n const ret = fft(complexInput);\n const half = Math.floor(innerDimensionSize / 2) + 1;\n const realValues = real(ret);\n const imagValues = imag(ret);\n const realComplexConjugate = split(realValues, [half, innerDimensionSize - half], realValues.shape.length - 1);\n const imagComplexConjugate = split(imagValues, [half, innerDimensionSize - half], imagValues.shape.length - 1);\n const outputShape = adjustedInput.shape.slice();\n outputShape[adjustedInput.shape.length - 1] = half;\n return reshape(complex(realComplexConjugate[0], imagComplexConjugate[0]), outputShape);\n}\nvar rfft = op({ rfft_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/squared_difference.js\nfunction squaredDifference_(a, b) {\n let $a = convertToTensor(a, \"a\", \"squaredDifference\");\n let $b = convertToTensor(b, \"b\", \"squaredDifference\");\n [$a, $b] = makeTypesMatch($a, $b);\n assertAndGetBroadcastShape($a.shape, $b.shape);\n const inputs = { a: $a, b: $b };\n const attrs = {};\n return ENGINE.runKernel(SquaredDifference, inputs, attrs);\n}\nvar squaredDifference = op({ squaredDifference_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/squeeze.js\nfunction squeeze_(x, axis) {\n const $x = convertToTensor(x, \"x\", \"squeeze\", \"string_or_numeric\");\n return reshape($x, squeezeShape($x.shape, axis).newShape);\n}\nvar squeeze = op({ squeeze_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/stack.js\nfunction stack_(tensors, axis = 0) {\n const $tensors = convertToTensorArray(tensors, \"tensors\", \"stack\", \"string_or_numeric\");\n assert($tensors.length >= 1, () => \"Pass at least one tensor to tf.stack\");\n if ($tensors.length > 0) {\n assert(axis <= $tensors[0].rank, () => \"Axis must be <= rank of the tensor\");\n }\n const inputs = $tensors;\n const attrs = { axis };\n return ENGINE.runKernel(Pack, inputs, attrs);\n}\nvar stack = op({ stack_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/step.js\nfunction step_(x, alpha = 0) {\n const $x = convertToTensor(x, \"x\", \"step\");\n const inputs = { x: $x };\n const attrs = { alpha };\n return ENGINE.runKernel(Step, inputs, attrs);\n}\nvar step = op({ step_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/strided_slice.js\nfunction stridedSlice_(x, begin, end, strides, beginMask = 0, endMask = 0, ellipsisMask = 0, newAxisMask = 0, shrinkAxisMask = 0) {\n const $x = convertToTensor(x, \"x\", \"stridedSlice\", \"string_or_numeric\");\n const inputs = { x: $x };\n const attrs = {\n begin,\n end,\n strides,\n beginMask,\n endMask,\n ellipsisMask,\n newAxisMask,\n shrinkAxisMask\n };\n return ENGINE.runKernel(StridedSlice, inputs, attrs);\n}\nvar stridedSlice = op({ stridedSlice_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/tan.js\nfunction tan_(x) {\n const $x = convertToTensor(x, \"x\", \"tan\", \"float32\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Tan, inputs);\n}\nvar tan = op({ tan_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/tensor1d.js\nfunction tensor1d(values, dtype) {\n assertNonNull(values);\n const inferredShape = inferShape(values, dtype);\n if (inferredShape.length !== 1) {\n throw new Error(\"tensor1d() requires values to be a flat/TypedArray\");\n }\n const shape = null;\n return makeTensor(values, shape, inferredShape, dtype);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/tensor2d.js\nfunction tensor2d(values, shape, dtype) {\n assertNonNull(values);\n if (shape != null && shape.length !== 2) {\n throw new Error(\"tensor2d() requires shape to have two numbers\");\n }\n const inferredShape = inferShape(values, dtype);\n if (inferredShape.length !== 2 && inferredShape.length !== 1) {\n throw new Error(\"tensor2d() requires values to be number[][] or flat/TypedArray\");\n }\n if (inferredShape.length === 1 && shape == null) {\n throw new Error(\"tensor2d() requires shape to be provided when `values` are a flat/TypedArray\");\n }\n return makeTensor(values, shape, inferredShape, dtype);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/tensor4d.js\nfunction tensor4d(values, shape, dtype) {\n assertNonNull(values);\n if (shape != null && shape.length !== 4) {\n throw new Error(\"tensor4d() requires shape to have four numbers\");\n }\n const inferredShape = inferShape(values, dtype);\n if (inferredShape.length !== 4 && inferredShape.length !== 1) {\n throw new Error(\"tensor4d() requires values to be number[][][][] or flat/TypedArray\");\n }\n if (inferredShape.length === 1 && shape == null) {\n throw new Error(\"tensor4d() requires shape to be provided when `values` are a flat array\");\n }\n return makeTensor(values, shape, inferredShape, dtype);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/tensor5d.js\nfunction tensor5d(values, shape, dtype) {\n assertNonNull(values);\n if (shape != null && shape.length !== 5) {\n throw new Error(\"tensor5d() requires shape to have five numbers\");\n }\n const inferredShape = inferShape(values, dtype);\n if (inferredShape.length !== 5 && inferredShape.length !== 1) {\n throw new Error(\"tensor5d() requires values to be number[][][][][] or flat/TypedArray\");\n }\n if (inferredShape.length === 1 && shape == null) {\n throw new Error(\"tensor5d() requires shape to be provided when `values` are a flat array\");\n }\n return makeTensor(values, shape, inferredShape, dtype);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/tensor6d.js\nfunction tensor6d(values, shape, dtype) {\n assertNonNull(values);\n if (shape != null && shape.length !== 6) {\n throw new Error(\"tensor6d() requires shape to have six numbers\");\n }\n const inferredShape = inferShape(values, dtype);\n if (inferredShape.length !== 6 && inferredShape.length !== 1) {\n throw new Error(\"tensor6d() requires values to be number[][][][][][] or flat/TypedArray\");\n }\n if (inferredShape.length === 1 && shape == null) {\n throw new Error(\"tensor6d() requires shape to be provided when `values` are a flat array\");\n }\n shape = shape || inferredShape;\n return makeTensor(values, shape, inferredShape, dtype);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/topk.js\nfunction topk_(x, k = 1, sorted = true) {\n const $x = convertToTensor(x, \"x\", \"topk\");\n if ($x.rank === 0) {\n throw new Error(\"topk() expects the input to be of rank 1 or higher\");\n }\n const lastDim = $x.shape[$x.shape.length - 1];\n if (k < 0) {\n throw new Error(`'k' passed to topk() must be >= 0 but got ${k}`);\n }\n if (k > lastDim) {\n throw new Error(`'k' passed to topk() must be <= the last dimension (${lastDim}) but got ${k}`);\n }\n const inputs = { x: $x };\n const attrs = { k, sorted };\n const [values, indices] = ENGINE.runKernel(TopK, inputs, attrs);\n return { values, indices };\n}\nvar topk = op({ topk_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/truncated_normal.js\nfunction truncatedNormal_(shape, mean5 = 0, stdDev = 1, dtype, seed) {\n if (dtype != null && dtype === \"bool\") {\n throw new Error(`Unsupported data type $ { dtype }`);\n }\n const randGauss = new MPRandGauss(mean5, stdDev, dtype, true, seed);\n const res = buffer(shape, dtype);\n for (let i = 0; i < res.values.length; i++) {\n res.values[i] = randGauss.nextValue();\n }\n return res.toTensor();\n}\nvar truncatedNormal = op({ truncatedNormal_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/unique.js\nfunction unique_(x, axis = 0) {\n const $x = convertToTensor(x, \"x\", \"unique\", \"string_or_numeric\");\n assert($x.rank > 0, () => \"The input tensor must be at least 1D\");\n const inputs = { x: $x };\n const attrs = { axis };\n const [values, indices] = ENGINE.runKernel(Unique, inputs, attrs);\n return { values, indices };\n}\nvar unique = op({ unique_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/unsorted_segment_sum.js\nfunction unsortedSegmentSum_(x, segmentIds, numSegments) {\n const $x = convertToTensor(x, \"x\", \"unsortedSegmentSum\");\n const $segmentIds = convertToTensor(segmentIds, \"segmentIds\", \"unsortedSegmentSum\", \"int32\");\n assert(isInt(numSegments), () => \"numSegments must be of dtype int\");\n const inputs = { x: $x, segmentIds: $segmentIds };\n const attrs = { numSegments };\n return ENGINE.runKernel(UnsortedSegmentSum, inputs, attrs);\n}\nvar unsortedSegmentSum = op({ unsortedSegmentSum_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/unstack.js\nfunction unstack_(x, axis = 0) {\n const $x = convertToTensor(x, \"x\", \"unstack\", \"string_or_numeric\");\n assert(axis >= -$x.shape.length && axis < $x.shape.length, () => `Axis = ${axis} is not in [-${$x.shape.length}, ${$x.shape.length})`);\n const inputs = { value: $x };\n const attrs = { axis };\n return ENGINE.runKernel(Unpack, inputs, attrs);\n}\nvar unstack = op({ unstack_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/upper_bound.js\nfunction upperBound(sortedSequence, values) {\n return searchSorted(sortedSequence, values, \"right\");\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/variable.js\nfunction variable(initialValue, trainable = true, name, dtype) {\n return ENGINE.makeVariable(initialValue, trainable, name, dtype);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/backends/where_impl.js\nfunction whereImpl(condShape, condVals) {\n const indices = [];\n for (let i = 0; i < condVals.length; i++) {\n if (condVals[i]) {\n indices.push(i);\n }\n }\n const inBuffer = buffer(condShape, \"int32\");\n const out = buffer([indices.length, condShape.length], \"int32\");\n for (let i = 0; i < indices.length; i++) {\n const loc = inBuffer.indexToLoc(indices[i]);\n const offset = i * condShape.length;\n out.values.set(loc, offset);\n }\n return out.toTensor();\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/where_async.js\nasync function whereAsync_(condition) {\n const $condition = convertToTensor(condition, \"condition\", \"whereAsync\", \"bool\");\n const vals = await $condition.data();\n const res = whereImpl($condition.shape, vals);\n if (condition !== $condition) {\n $condition.dispose();\n }\n return res;\n}\nvar whereAsync = whereAsync_;\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/boolean_mask.js\nasync function booleanMaskAsync_(tensor2, mask, axis) {\n const $tensor = convertToTensor(tensor2, \"tensor\", \"boolMask\");\n const $mask = convertToTensor(mask, \"mask\", \"boolMask\", \"bool\");\n const axisFrom = axis == null ? 0 : axis;\n const maskDim = $mask.rank;\n const tensorShape = $tensor.shape;\n assert(maskDim > 0, () => \"mask cannot be scalar\");\n assertShapesMatch(tensorShape.slice(axisFrom, axisFrom + maskDim), $mask.shape, `mask's shape must match the first K dimensions of tensor's shape,`);\n let leadingSize = 1;\n for (let i = axisFrom; i < axisFrom + maskDim; i++) {\n leadingSize *= tensorShape[i];\n }\n const targetTensorShape = tensorShape.slice(0, axisFrom).concat([leadingSize], tensorShape.slice(axisFrom + maskDim));\n const reshapedTensor = reshape($tensor, targetTensorShape);\n const reshapedMask = reshape($mask, [-1]);\n const positivePositions = await whereAsync(reshapedMask);\n const indices = squeeze(positivePositions, [1]);\n const res = gather(reshapedTensor, indices, axisFrom);\n if (tensor2 !== $tensor) {\n $tensor.dispose();\n }\n if (mask !== $mask) {\n $mask.dispose();\n }\n indices.dispose();\n reshapedTensor.dispose();\n reshapedMask.dispose();\n positivePositions.dispose();\n return res;\n}\nvar booleanMaskAsync = booleanMaskAsync_;\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/moving_average.js\nfunction movingAverage_(v, x, decay, step5, zeroDebias = true) {\n const $v = convertToTensor(v, \"v\", \"movingAverage\");\n const $x = convertToTensor(x, \"x\", \"movingAverage\");\n const $decay = convertToTensor(decay, \"decay\", \"movingAverage\");\n assertTypesMatch($v, $x);\n assert(arraysEqual($v.shape, $x.shape), () => \"Shape mismatch in v and x\");\n const one = scalar(1);\n const oneMinusDecay = sub(one, $decay);\n let update = mul(sub($x, $v), oneMinusDecay);\n if (zeroDebias) {\n assert(step5 != null, () => \"When using zeroDebias: true, step is required.\");\n const $step = convertToTensor(step5, \"step\", \"movingAverage\");\n update = div(update, sub(one, pow($decay, $step)));\n }\n return add2($v, update);\n}\nvar movingAverage = op({ movingAverage_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/scatter_nd.js\nfunction scatterND_(indices, updates, shape) {\n const $indices = convertToTensor(indices, \"indices\", \"scatterND\", \"int32\");\n const $updates = convertToTensor(updates, \"updates\", \"scatterND\");\n validateInput($updates, $indices, shape);\n const inputs = { indices: $indices, updates: $updates };\n const attrs = { shape };\n return ENGINE.runKernel(ScatterNd, inputs, attrs);\n}\nvar scatterND = op({ scatterND_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/sparse_to_dense_util.js\nfunction validateInput2(sparseIndices, sparseValues, outputShape, defaultValues) {\n if (sparseIndices.dtype !== \"int32\") {\n throw new Error(`tf.sparseToDense() expects the indices to be int32 type, but the dtype was ${sparseIndices.dtype}.`);\n }\n if (sparseIndices.rank > 2) {\n throw new Error(`sparseIndices should be a scalar, vector, or matrix, but got shape ${sparseIndices.shape}.`);\n }\n const numElems = sparseIndices.rank > 0 ? sparseIndices.shape[0] : 1;\n const numDims = sparseIndices.rank > 1 ? sparseIndices.shape[1] : 1;\n if (outputShape.length !== numDims) {\n throw new Error(`outputShape has incorrect number of elements:, ${outputShape.length}, should be: ${numDims}.`);\n }\n const numValues = sparseValues.size;\n if (!(sparseValues.rank === 0 || sparseValues.rank === 1 && numValues === numElems)) {\n throw new Error(`sparseValues has incorrect shape ${sparseValues.shape}, should be [] or [${numElems}]`);\n }\n if (sparseValues.dtype !== defaultValues.dtype) {\n throw new Error(\"sparseValues.dtype must match defaultValues.dtype\");\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/sparse_to_dense.js\nfunction sparseToDense_(sparseIndices, sparseValues, outputShape, defaultValue = 0) {\n const $sparseIndices = convertToTensor(sparseIndices, \"sparseIndices\", \"sparseToDense\", \"int32\");\n const $sparseValues = convertToTensor(sparseValues, \"sparseValues\", \"sparseToDense\", \"string_or_numeric\");\n const $defaultValue = convertToTensor(defaultValue, \"defaultValue\", \"sparseToDense\", $sparseValues.dtype);\n validateInput2($sparseIndices, $sparseValues, outputShape, $defaultValue);\n const inputs = {\n sparseIndices: $sparseIndices,\n sparseValues: $sparseValues,\n defaultValue: $defaultValue\n };\n const attrs = { outputShape };\n return ENGINE.runKernel(SparseToDense, inputs, attrs);\n}\nvar sparseToDense = op({ sparseToDense_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/gather_nd.js\nfunction gatherND_(x, indices) {\n const $indices = convertToTensor(indices, \"indices\", \"gatherND\", \"int32\");\n const $x = convertToTensor(x, \"x\", \"gatherND\", \"string_or_numeric\");\n const inputs = { params: $x, indices: $indices };\n return ENGINE.runKernel(GatherNd, inputs);\n}\nvar gatherND = op({ gatherND_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/dropout_util.js\nfunction getNoiseShape(x, noiseShape) {\n if (noiseShape == null) {\n return x.shape.slice();\n }\n if (arraysEqual(x.shape, noiseShape)) {\n return noiseShape;\n }\n if (x.shape.length === noiseShape.length) {\n const newDimension = [];\n for (let i = 0; i < x.shape.length; i++) {\n if (noiseShape[i] == null && x.shape[i] != null) {\n newDimension.push(x.shape[i]);\n } else {\n newDimension.push(noiseShape[i]);\n }\n }\n return newDimension;\n }\n return noiseShape;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/dropout.js\nfunction dropout_(x, rate, noiseShape, seed) {\n const $x = convertToTensor(x, \"x\", \"dropout\");\n assert($x.dtype === \"float32\", () => `x has to be a floating point tensor since it's going to be scaled, but got a ${$x.dtype} tensor instead.`);\n assert(rate >= 0 && rate < 1, () => `rate must be a float in the range [0, 1), but got ${rate}.`);\n if (rate === 0) {\n return x instanceof Tensor ? $x.clone() : $x;\n }\n const $noiseShape = getNoiseShape($x, noiseShape);\n const keepProb = 1 - rate;\n const multiplier = div(floor(add2(randomUniform($noiseShape, 0, 1, \"float32\", seed), keepProb)), keepProb);\n return mul($x, multiplier);\n}\nvar dropout = op({ dropout_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/signal_ops_util.js\nfunction enclosingPowerOfTwo(value) {\n return Math.floor(Math.pow(2, Math.ceil(Math.log(value) / Math.log(2))));\n}\nfunction cosineWindow(windowLength, a, b) {\n const even = 1 - windowLength % 2;\n const newValues = new Float32Array(windowLength);\n for (let i = 0; i < windowLength; ++i) {\n const cosArg = 2 * Math.PI * i / (windowLength + even - 1);\n newValues[i] = a - b * Math.cos(cosArg);\n }\n return tensor1d(newValues, \"float32\");\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/in_top_k.js\nasync function inTopKAsync_(predictions, targets, k = 1) {\n const $predictions = convertToTensor(predictions, \"predictions\", \"inTopK\");\n const $targets = convertToTensor(targets, \"targets\", \"inTopK\");\n assert($predictions.rank > 1, () => `inTopK() expects the predictions to be of rank 2 or higher, but got ${$predictions.rank}`);\n assert($predictions.rank - 1 === $targets.rank, () => `predictions rank should be 1 larger than targets rank, but got predictions rank ${$predictions.rank} and targets rank ${$targets.rank}`);\n assertShapesMatch($predictions.shape.slice(0, $predictions.shape.length - 1), $targets.shape, `predictions's shape should be align with the targets' shape, except the last dimension.`);\n const lastDim = $predictions.shape[$predictions.shape.length - 1];\n assert(k > 0 && k <= lastDim, () => `'k' passed to inTopK() must be > 0 && <= the predictions last dimension (${lastDim}), but got ${k}`);\n const predictionsVals = await $predictions.data();\n const targetsVals = await $targets.data();\n const [batch, size] = [predictionsVals.length / lastDim, lastDim];\n const precision3 = getTypedArrayFromDType(\"bool\", batch);\n for (let b = 0; b < batch; b++) {\n const offset = b * size;\n const vals = predictionsVals.subarray(offset, offset + size);\n const valAndInd = [];\n for (let i = 0; i < vals.length; i++) {\n valAndInd.push({ value: vals[i], index: i });\n }\n valAndInd.sort((a, b2) => b2.value - a.value);\n precision3[b] = 0;\n for (let i = 0; i < k; i++) {\n if (valAndInd[i].index === targetsVals[b]) {\n precision3[b] = 1;\n break;\n }\n }\n }\n if (predictions !== $predictions) {\n $predictions.dispose();\n }\n if (targets !== $targets) {\n $targets.dispose();\n }\n return tensor(precision3, $targets.shape, \"bool\");\n}\nvar inTopKAsync = inTopKAsync_;\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/fused_ops.js\nvar fused_ops_exports = {};\n__export(fused_ops_exports, {\n conv2d: () => conv2d2,\n depthwiseConv2d: () => depthwiseConv2d2,\n matMul: () => matMul2\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/conv2d_backprop_filter.js\nfunction conv2DBackpropFilter_(x, dy, filterShape, strides, pad3, dataFormat = \"NHWC\", dimRoundingMode) {\n let x4D = x;\n if (x.rank === 3) {\n x4D = reshape(x, [1, x.shape[0], x.shape[1], x.shape[2]]);\n }\n let dy4D = dy;\n if (dy4D.rank === 3) {\n dy4D = reshape(dy, [1, dy.shape[0], dy.shape[1], dy.shape[2]]);\n }\n assert(x4D.rank === 4, () => `Error in conv2dDerFilter: input must be rank 4, but got shape ${x4D.shape}.`);\n assert(dy4D.rank === 4, () => `Error in conv2dDerFilter: dy must be rank 4, but got shape ${dy4D.shape}.`);\n assert(filterShape.length === 4, () => `Error in conv2dDerFilter: filterShape must be length 4, but got ${filterShape}.`);\n const inDepth = dataFormat === \"NHWC\" ? x4D.shape[3] : x4D.shape[1];\n const outDepth = dataFormat === \"NHWC\" ? dy4D.shape[3] : dy4D.shape[1];\n assert(inDepth === filterShape[2], () => `Error in conv2dDerFilter: depth of input ${inDepth}) must match input depth in filter (${filterShape[2]}.`);\n assert(outDepth === filterShape[3], () => `Error in conv2dDerFilter: depth of dy (${outDepth}) must match output depth for filter (${filterShape[3]}).`);\n checkPadOnDimRoundingMode(\"conv2dDerFilter\", pad3, dimRoundingMode);\n const inputs = { x: x4D, dy: dy4D };\n const attrs = { strides, pad: pad3, dataFormat, dimRoundingMode, filterShape };\n return ENGINE.runKernel(Conv2DBackpropFilter, inputs, attrs);\n}\nvar conv2DBackpropFilter = op({ conv2DBackpropFilter_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/fused_util.js\nfunction getFusedDyActivation(dy, y, activation2) {\n if (activation2 == null || activation2 === \"linear\") {\n return dy;\n }\n if (activation2 === \"relu\") {\n return mul(dy, step(y));\n }\n throw new Error(`Cannot compute gradient for fused activation ${activation2}.`);\n}\nfunction getFusedBiasGradient(bias, dyActivation) {\n let res = dyActivation;\n const reduceAxes = getReductionAxes(bias.shape, dyActivation.shape);\n if (reduceAxes.length > 0) {\n res = sum2(res, reduceAxes);\n }\n return reshape(res, bias.shape);\n}\nfunction applyActivation(x, activation2, preluActivationWeights, leakyreluAlpha) {\n if (activation2 === \"linear\") {\n return x;\n } else if (activation2 === \"relu\") {\n return relu(x);\n } else if (activation2 === \"elu\") {\n return elu(x);\n } else if (activation2 === \"relu6\") {\n return relu6(x);\n } else if (activation2 === \"prelu\") {\n return prelu(x, preluActivationWeights);\n } else if (activation2 === \"leakyrelu\") {\n return leakyRelu(x, leakyreluAlpha);\n } else if (activation2 === \"sigmoid\") {\n return sigmoid(x);\n }\n throw new Error(`Unknown fused activation ${activation2}.`);\n}\nvar shouldFuse = (gradientDepth, activation2) => {\n const gradientMode = gradientDepth > 0;\n return !gradientMode || activation2 === \"linear\";\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/fused/conv2d.js\nfunction fusedConv2d_({ x, filter, strides, pad: pad3, dataFormat = \"NHWC\", dilations = [1, 1], dimRoundingMode, bias, activation: activation2 = \"linear\", preluActivationWeights, leakyreluAlpha }) {\n activation2 = activation2 || \"linear\";\n if (shouldFuse(ENGINE.state.gradientDepth, activation2) === false) {\n assert(dataFormat === \"NHWC\", () => `Error in fused conv2d: got dataFormat of ${dataFormat} but only NHWC is currently supported for the case of gradient depth is 0 and the activation is not linear.`);\n let result = conv2d(x, filter, strides, pad3, dataFormat, dilations, dimRoundingMode);\n if (bias != null) {\n result = add2(result, bias);\n }\n return applyActivation(result, activation2, preluActivationWeights, leakyreluAlpha);\n }\n const $x = convertToTensor(x, \"x\", \"conv2d\", \"float32\");\n const $filter = convertToTensor(filter, \"filter\", \"conv2d\", \"float32\");\n let x4D = $x;\n let reshapedTo4D = false;\n if ($x.rank === 3) {\n reshapedTo4D = true;\n x4D = reshape($x, [1, $x.shape[0], $x.shape[1], $x.shape[2]]);\n }\n assert(x4D.rank === 4, () => `Error in fused conv2d: input must be rank 4, but got rank ${x4D.rank}.`);\n assert($filter.rank === 4, () => `Error in fused conv2d: filter must be rank 4, but got rank ${$filter.rank}.`);\n checkPadOnDimRoundingMode(\"fused conv2d\", pad3, dimRoundingMode);\n const inputChannels = dataFormat === \"NHWC\" ? x4D.shape[3] : x4D.shape[1];\n assert($filter.shape[2] === inputChannels, () => `Error in conv2d: depth of input (${inputChannels}) must match input depth for filter ${$filter.shape[2]}.`);\n assert(eitherStridesOrDilationsAreOne(strides, dilations), () => `Error in conv2D: Either strides or dilations must be 1. Got strides ${strides} and dilations '${dilations}'`);\n const convInfo = computeConv2DInfo(x4D.shape, $filter.shape, strides, dilations, pad3, dimRoundingMode);\n let $bias;\n if (bias != null) {\n $bias = convertToTensor(bias, \"bias\", \"fused conv2d\");\n [$bias] = makeTypesMatch($bias, $x);\n if (dataFormat === \"NHWC\") {\n assertAndGetBroadcastShape(convInfo.outShape, $bias.shape);\n } else {\n assert($bias.shape.length <= 1, () => `Error in fused conv2d: only supports scalar or 1-D Tensor bias for NCHW format but got the bias of rank-${$bias.shape.length}.`);\n assert($bias.shape.length === 0 || $bias.shape[0] === convInfo.outChannels || $bias.shape[0] === 1, () => `Error in fused conv2d: bias shape (${$bias.shape}) is not compatible with the number of output channels (${convInfo.outChannels})`);\n }\n }\n let $preluActivationWeights;\n if (preluActivationWeights != null) {\n const alphaShape = preluActivationWeights.shape;\n assert(alphaShape.length <= 1 || alphaShape.length === 3, () => `Error in fused conv2d: only supports scalar, 1-D Tensor or 3-D Tensor PReLU activation weights but got a tensor of rank-${alphaShape.length}.`);\n if (alphaShape.length === 1) {\n assert(alphaShape[0] === 1 || alphaShape[0] === convInfo.outChannels, () => `Error in fused conv2d: PReLU activation weights (${alphaShape}) is not compatible with the number of output channels (${convInfo.outChannels}).`);\n } else if (alphaShape.length === 3) {\n try {\n assertAndGetBroadcastShape(alphaShape, convInfo.outShape);\n } catch (e) {\n const errMsg = `Error in fused conv2d: PReLU activation weights (${alphaShape}) is not compatible with the output shape of the conv2d (${convInfo.outShape}).`;\n throw Error(errMsg);\n }\n }\n $preluActivationWeights = convertToTensor(preluActivationWeights, \"prelu weights\", \"fused conv2d\");\n }\n const grad2 = (dy, saved) => {\n assert(dataFormat === \"NHWC\", () => `Error in gradient of fused conv2D: got dataFormat of ${dataFormat} but only NHWC is currently supported.`);\n const [$filter2, x4D2, y, $bias2] = saved;\n const dyActivation = getFusedDyActivation(dy, y, activation2);\n assert(tupleValuesAreOne(dilations), () => `Error in gradient of fused conv2D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '${dilations}'`);\n const xDer = conv2DBackpropInput(x4D2.shape, dyActivation, $filter2, strides, pad3);\n const filterDer = conv2DBackpropFilter(x4D2, dyActivation, $filter2.shape, strides, pad3);\n const der = [xDer, filterDer];\n if ($bias2 != null) {\n const biasDer = getFusedBiasGradient($bias2, dyActivation);\n der.push(biasDer);\n }\n return der;\n };\n const inputs = {\n x: x4D,\n filter: $filter,\n bias: $bias,\n preluActivationWeights: $preluActivationWeights\n };\n const attrs = {\n strides,\n pad: pad3,\n dataFormat,\n dilations,\n dimRoundingMode,\n activation: activation2,\n leakyreluAlpha\n };\n if (bias == null) {\n const customOp = customGrad((x4D2, filter2, save) => {\n let res = ENGINE.runKernel(FusedConv2D, inputs, attrs);\n save([filter2, x4D2, res]);\n if (reshapedTo4D) {\n res = reshape(res, [res.shape[1], res.shape[2], res.shape[3]]);\n }\n return { value: res, gradFunc: grad2 };\n });\n return customOp(x4D, $filter);\n } else {\n const customOpWithBias = customGrad((x4D2, filter2, bias2, save) => {\n let res = ENGINE.runKernel(FusedConv2D, inputs, attrs);\n save([filter2, x4D2, res, bias2]);\n if (reshapedTo4D) {\n res = reshape(res, [res.shape[1], res.shape[2], res.shape[3]]);\n }\n return { value: res, gradFunc: grad2 };\n });\n return customOpWithBias(x4D, $filter, $bias);\n }\n}\nvar conv2d2 = op({ fusedConv2d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/depthwise_conv2d_native_backprop_filter.js\nfunction depthwiseConv2dNativeBackpropFilter_(x, dy, filterShape, strides, pad3, dilations = [1, 1], dimRoundingMode) {\n let x4D = x;\n if (x.rank === 3) {\n x4D = reshape(x, [1, x.shape[0], x.shape[1], x.shape[2]]);\n }\n let dy4D = dy;\n if (dy4D.rank === 3) {\n dy4D = reshape(dy, [1, dy.shape[0], dy.shape[1], dy.shape[2]]);\n }\n const inputs = { x: x4D, dy: dy4D };\n const attrs = { strides, pad: pad3, dimRoundingMode, dilations, filterShape };\n return ENGINE.runKernel(DepthwiseConv2dNativeBackpropFilter, inputs, attrs);\n}\nvar depthwiseConv2dNativeBackpropFilter = op({ depthwiseConv2dNativeBackpropFilter_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/depthwise_conv2d_native_backprop_input.js\nfunction depthwiseConv2dNativeBackpropInput_(xShape, dy, filter, strides, pad3, dilations = [1, 1], dimRoundingMode) {\n let dy4D = dy;\n let reshapedTo4D = false;\n if (dy.rank === 3) {\n reshapedTo4D = true;\n dy4D = reshape(dy, [1, dy.shape[0], dy.shape[1], dy.shape[2]]);\n }\n const inputs = { dy: dy4D, filter };\n const attrs = { strides, pad: pad3, dimRoundingMode, dilations, inputShape: xShape };\n const res = ENGINE.runKernel(DepthwiseConv2dNativeBackpropInput, inputs, attrs);\n if (reshapedTo4D) {\n return reshape(res, [res.shape[1], res.shape[2], res.shape[3]]);\n }\n return res;\n}\nvar depthwiseConv2dNativeBackpropInput = op({ depthwiseConv2dNativeBackpropInput_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/fused/depthwise_conv2d.js\nfunction fusedDepthwiseConv2d_({ x, filter, strides, pad: pad3, dataFormat = \"NHWC\", dilations = [1, 1], dimRoundingMode, bias, activation: activation2 = \"linear\", preluActivationWeights, leakyreluAlpha }) {\n if (shouldFuse(ENGINE.state.gradientDepth, activation2) === false) {\n let result = depthwiseConv2d(x, filter, strides, pad3, dataFormat, dilations, dimRoundingMode);\n if (bias != null) {\n result = add2(result, bias);\n }\n return applyActivation(result, activation2, preluActivationWeights, leakyreluAlpha);\n }\n const $x = convertToTensor(x, \"x\", \"depthwiseConv2d\", \"float32\");\n const $filter = convertToTensor(filter, \"filter\", \"depthwiseConv2d\", \"float32\");\n let x4D = $x;\n let reshapedTo4D = false;\n if ($x.rank === 3) {\n reshapedTo4D = true;\n x4D = reshape($x, [1, $x.shape[0], $x.shape[1], $x.shape[2]]);\n }\n assert(x4D.rank === 4, () => `Error in fused depthwiseConv2d: input must be rank 4, but got rank ${x4D.rank}.`);\n assert($filter.rank === 4, () => `Error in fused depthwiseConv2d: filter must be rank 4, but got rank ${$filter.rank}.`);\n assert(x4D.shape[3] === $filter.shape[2], () => `Error in fused depthwiseConv2d: number of input channels (${x4D.shape[3]}) must match the inChannels dimension in filter ${$filter.shape[2]}.`);\n if (dilations == null) {\n dilations = [1, 1];\n }\n assert(eitherStridesOrDilationsAreOne(strides, dilations), () => `Error in fused depthwiseConv2d: Either strides or dilations must be 1. Got strides ${strides} and dilations '${dilations}'`);\n checkPadOnDimRoundingMode(\"fused depthwiseConv2d\", pad3, dimRoundingMode);\n const convInfo = computeConv2DInfo(x4D.shape, $filter.shape, strides, dilations, pad3, dimRoundingMode, true);\n let $bias;\n if (bias != null) {\n $bias = convertToTensor(bias, \"bias\", \"fused conv2d\");\n [$bias] = makeTypesMatch($bias, $x);\n assertAndGetBroadcastShape(convInfo.outShape, $bias.shape);\n }\n let $preluActivationWeights;\n if (preluActivationWeights != null) {\n $preluActivationWeights = convertToTensor(preluActivationWeights, \"prelu weights\", \"fused depthwiseConv2d\");\n }\n const grad2 = (dy, saved) => {\n assert(tupleValuesAreOne(dilations), () => `Error in gradient of fused depthwiseConv2d: dilation rates greater than 1 are not yet supported. Got dilations '${dilations}'`);\n const [$filter2, x4D2, y, bias2] = saved;\n const dyActivation = getFusedDyActivation(dy, y, activation2);\n const xDer = depthwiseConv2dNativeBackpropInput(x4D2.shape, dyActivation, $filter2, strides, pad3, dilations, dimRoundingMode);\n const filterDer = depthwiseConv2dNativeBackpropFilter(x4D2, dyActivation, $filter2.shape, strides, pad3, dilations, dimRoundingMode);\n if (bias2 != null) {\n const biasDer = getFusedBiasGradient($bias, dyActivation);\n return [xDer, filterDer, biasDer];\n }\n return [xDer, filterDer];\n };\n const inputs = {\n x: x4D,\n filter: $filter,\n bias: $bias,\n preluActivationWeights: $preluActivationWeights\n };\n const attrs = {\n strides,\n pad: pad3,\n dataFormat,\n dilations,\n dimRoundingMode,\n activation: activation2,\n leakyreluAlpha\n };\n if (bias == null) {\n const customOp = customGrad((x4D2, filter2, save) => {\n let res = ENGINE.runKernel(FusedDepthwiseConv2D, inputs, attrs);\n save([filter2, x4D2, res]);\n if (reshapedTo4D) {\n res = reshape(res, [res.shape[1], res.shape[2], res.shape[3]]);\n }\n return { value: res, gradFunc: grad2 };\n });\n return customOp(x4D, $filter);\n } else {\n const customOpWithBias = customGrad((x4D2, filter2, bias2, save) => {\n let res = ENGINE.runKernel(FusedDepthwiseConv2D, inputs, attrs);\n save([filter2, x4D2, res, bias2]);\n if (reshapedTo4D) {\n res = reshape(res, [res.shape[1], res.shape[2], res.shape[3]]);\n }\n return { value: res, gradFunc: grad2 };\n });\n return customOpWithBias(x4D, $filter, $bias);\n }\n}\nvar depthwiseConv2d2 = op({ fusedDepthwiseConv2d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/fused/mat_mul.js\nfunction fusedMatMul_({ a, b, transposeA = false, transposeB = false, bias, activation: activation2 = \"linear\", preluActivationWeights, leakyreluAlpha = 0.2 }) {\n if (shouldFuse(ENGINE.state.gradientDepth, activation2) === false) {\n let result = matMul(a, b, transposeA, transposeB);\n if (bias != null) {\n result = add2(result, bias);\n }\n return applyActivation(result, activation2, preluActivationWeights, leakyreluAlpha);\n }\n let $a = convertToTensor(a, \"a\", \"fused matMul\");\n let $b = convertToTensor(b, \"b\", \"fused matMul\");\n [$a, $b] = makeTypesMatch($a, $b);\n const innerShapeA = transposeA ? $a.shape[$a.rank - 2] : $a.shape[$a.rank - 1];\n const innerShapeB = transposeB ? $b.shape[$b.rank - 1] : $b.shape[$b.rank - 2];\n const outerShapeA = transposeA ? $a.shape[$a.rank - 1] : $a.shape[$a.rank - 2];\n const outerShapeB = transposeB ? $b.shape[$b.rank - 2] : $b.shape[$b.rank - 1];\n const outerDimsA = $a.shape.slice(0, -2);\n const outerDimsB = $b.shape.slice(0, -2);\n const batchDimA = sizeFromShape(outerDimsA);\n const batchDimB = sizeFromShape(outerDimsB);\n assert(innerShapeA === innerShapeB, () => `Error in fused matMul: inner shapes (${innerShapeA}) and (${innerShapeB}) of Tensors with shapes ${$a.shape} and ${$b.shape} and transposeA=${transposeA} and transposeB=${transposeB} must match.`);\n const outShapeOuterDims = assertAndGetBroadcastShape($a.shape.slice(0, -2), $b.shape.slice(0, -2));\n const outShape = outShapeOuterDims.concat([outerShapeA, outerShapeB]);\n const a3D = transposeA ? reshape($a, [batchDimA, innerShapeA, outerShapeA]) : reshape($a, [batchDimA, outerShapeA, innerShapeA]);\n const b3D = transposeB ? reshape($b, [batchDimB, outerShapeB, innerShapeB]) : reshape($b, [batchDimB, innerShapeB, outerShapeB]);\n let $bias;\n if (bias != null) {\n $bias = convertToTensor(bias, \"bias\", \"fused matMul\");\n [$bias] = makeTypesMatch($bias, $a);\n assertAndGetBroadcastShape(outShape, $bias.shape);\n }\n let $preluActivationWeights;\n if (preluActivationWeights != null) {\n $preluActivationWeights = convertToTensor(preluActivationWeights, \"prelu weights\", \"fused matMul\");\n }\n const grad2 = (dy, saved) => {\n const [a3D2, b3D2, y, $bias2] = saved;\n const dyActivation = getFusedDyActivation(reshape(dy, y.shape), y, activation2);\n let aDer;\n let bDer;\n if (!transposeA && !transposeB) {\n aDer = matMul(dyActivation, b3D2, false, true);\n bDer = matMul(a3D2, dyActivation, true, false);\n } else if (!transposeA && transposeB) {\n aDer = matMul(dyActivation, b3D2, false, false);\n bDer = matMul(dyActivation, a3D2, true, false);\n } else if (transposeA && !transposeB) {\n aDer = matMul(b3D2, dyActivation, false, true);\n bDer = matMul(a3D2, dyActivation, false, false);\n } else {\n aDer = matMul(b3D2, dyActivation, true, true);\n bDer = matMul(dyActivation, a3D2, true, true);\n }\n if (bias != null) {\n const biasDer = getFusedBiasGradient($bias2, dyActivation);\n return [aDer, bDer, biasDer];\n } else {\n return [aDer, bDer];\n }\n };\n const inputs = {\n a: a3D,\n b: b3D,\n bias: $bias,\n preluActivationWeights: $preluActivationWeights\n };\n const attrs = { transposeA, transposeB, activation: activation2, leakyreluAlpha };\n if (bias == null) {\n const customOp = customGrad((a3D2, b3D2, save) => {\n const res = ENGINE.runKernel(_FusedMatMul, inputs, attrs);\n save([a3D2, b3D2, res]);\n return { value: reshape(res, outShape), gradFunc: grad2 };\n });\n return customOp(a3D, b3D);\n } else {\n const customOpWithBias = customGrad((a3D2, b3D2, $bias2, save) => {\n const res = ENGINE.runKernel(_FusedMatMul, inputs, attrs);\n save([a3D2, b3D2, res, $bias2]);\n return { value: reshape(res, outShape), gradFunc: grad2 };\n });\n return customOpWithBias(a3D, b3D, $bias);\n }\n}\nvar matMul2 = op({ fusedMatMul_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/signal/hamming_window.js\nfunction hammingWindow_(windowLength) {\n return cosineWindow(windowLength, 0.54, 0.46);\n}\nvar hammingWindow = op({ hammingWindow_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/signal/hann_window.js\nfunction hannWindow_(windowLength) {\n return cosineWindow(windowLength, 0.5, 0.5);\n}\nvar hannWindow = op({ hannWindow_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/signal/frame.js\nfunction frame_(signal2, frameLength, frameStep, padEnd = false, padValue = 0) {\n let start = 0;\n const output = [];\n while (start + frameLength <= signal2.size) {\n output.push(slice(signal2, start, frameLength));\n start += frameStep;\n }\n if (padEnd) {\n while (start < signal2.size) {\n const padLen = start + frameLength - signal2.size;\n const pad3 = concat([\n slice(signal2, start, frameLength - padLen),\n fill([padLen], padValue)\n ]);\n output.push(pad3);\n start += frameStep;\n }\n }\n if (output.length === 0) {\n return tensor2d([], [0, frameLength]);\n }\n return reshape(concat(output), [output.length, frameLength]);\n}\nvar frame = op({ frame_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/signal/stft.js\nfunction stft_(signal2, frameLength, frameStep, fftLength, windowFn = hannWindow) {\n if (fftLength == null) {\n fftLength = enclosingPowerOfTwo(frameLength);\n }\n const framedSignal = frame(signal2, frameLength, frameStep);\n const windowedSignal = mul(framedSignal, windowFn(frameLength));\n return rfft(windowedSignal, fftLength);\n}\nvar stft = op({ stft_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/crop_and_resize.js\nfunction cropAndResize_(image2, boxes, boxInd, cropSize, method = \"bilinear\", extrapolationValue = 0) {\n const $image = convertToTensor(image2, \"image\", \"cropAndResize\");\n const $boxes = convertToTensor(boxes, \"boxes\", \"cropAndResize\", \"float32\");\n const $boxInd = convertToTensor(boxInd, \"boxInd\", \"cropAndResize\", \"int32\");\n const numBoxes = $boxes.shape[0];\n assert($image.rank === 4, () => `Error in cropAndResize: image must be rank 4,but got rank ${$image.rank}.`);\n assert($boxes.rank === 2 && $boxes.shape[1] === 4, () => `Error in cropAndResize: boxes must be have size [${numBoxes},4] but had shape ${$boxes.shape}.`);\n assert($boxInd.rank === 1 && $boxInd.shape[0] === numBoxes, () => `Error in cropAndResize: boxInd must be have size [${numBoxes}] but had shape ${$boxes.shape}.`);\n assert(cropSize.length === 2, () => `Error in cropAndResize: cropSize must be of length 2, but got length ${cropSize.length}.`);\n assert(cropSize[0] >= 1 && cropSize[1] >= 1, () => `cropSize must be atleast [1,1], but was ${cropSize}`);\n assert(method === \"bilinear\" || method === \"nearest\", () => `method must be bilinear or nearest, but was ${method}`);\n const inputs = { image: $image, boxes: $boxes, boxInd: $boxInd };\n const attrs = { method, extrapolationValue, cropSize };\n const res = ENGINE.runKernel(CropAndResize, inputs, attrs);\n return res;\n}\nvar cropAndResize = op({ cropAndResize_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/flip_left_right.js\nfunction flipLeftRight_(image2) {\n const $image = convertToTensor(image2, \"image\", \"flipLeftRight\", \"float32\");\n assert($image.rank === 4, () => `Error in flipLeftRight: image must be rank 4,but got rank ${$image.rank}.`);\n const inputs = { image: $image };\n const res = ENGINE.runKernel(FlipLeftRight, inputs, {});\n return res;\n}\nvar flipLeftRight = op({ flipLeftRight_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/grayscale_to_rgb.js\nfunction grayscaleToRGB_(image2) {\n const $image = convertToTensor(image2, \"image\", \"grayscaleToRGB\");\n const lastDimsIdx = $image.rank - 1;\n const lastDims = $image.shape[lastDimsIdx];\n assert($image.rank >= 2, () => `Error in grayscaleToRGB: images must be at least rank 2, but got rank ${$image.rank}.`);\n assert(lastDims === 1, () => `Error in grayscaleToRGB: last dimension of a grayscale image should be size 1, but got size ${lastDims}.`);\n const reps = new Array($image.rank);\n reps.fill(1, 0, lastDimsIdx);\n reps[lastDimsIdx] = 3;\n return tile($image, reps);\n}\nvar grayscaleToRGB = op({ grayscaleToRGB_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/rotate_with_offset.js\nfunction rotateWithOffset_(image2, radians, fillValue = 0, center = 0.5) {\n const $image = convertToTensor(image2, \"image\", \"rotateWithOffset\", \"float32\");\n assert($image.rank === 4, () => `Error in rotateWithOffset: image must be rank 4,but got rank ${$image.rank}.`);\n const inputs = { image: $image };\n const attrs = { radians, fillValue, center };\n const res = ENGINE.runKernel(RotateWithOffset, inputs, attrs);\n return res;\n}\nvar rotateWithOffset = op({ rotateWithOffset_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/nonmax_util.js\nfunction nonMaxSuppSanityCheck(boxes, scores, maxOutputSize, iouThreshold, scoreThreshold, softNmsSigma) {\n if (iouThreshold == null) {\n iouThreshold = 0.5;\n }\n if (scoreThreshold == null) {\n scoreThreshold = Number.NEGATIVE_INFINITY;\n }\n if (softNmsSigma == null) {\n softNmsSigma = 0;\n }\n const numBoxes = boxes.shape[0];\n maxOutputSize = Math.min(maxOutputSize, numBoxes);\n assert(0 <= iouThreshold && iouThreshold <= 1, () => `iouThreshold must be in [0, 1], but was '${iouThreshold}'`);\n assert(boxes.rank === 2, () => `boxes must be a 2D tensor, but was of rank '${boxes.rank}'`);\n assert(boxes.shape[1] === 4, () => `boxes must have 4 columns, but 2nd dimension was ${boxes.shape[1]}`);\n assert(scores.rank === 1, () => \"scores must be a 1D tensor\");\n assert(scores.shape[0] === numBoxes, () => `scores has incompatible shape with boxes. Expected ${numBoxes}, but was ${scores.shape[0]}`);\n assert(0 <= softNmsSigma && softNmsSigma <= 1, () => `softNmsSigma must be in [0, 1], but was '${softNmsSigma}'`);\n return { maxOutputSize, iouThreshold, scoreThreshold, softNmsSigma };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/non_max_suppression.js\nfunction nonMaxSuppression_(boxes, scores, maxOutputSize, iouThreshold = 0.5, scoreThreshold = Number.NEGATIVE_INFINITY) {\n const $boxes = convertToTensor(boxes, \"boxes\", \"nonMaxSuppression\", \"float32\");\n const $scores = convertToTensor(scores, \"scores\", \"nonMaxSuppression\", \"float32\");\n const inputs = nonMaxSuppSanityCheck($boxes, $scores, maxOutputSize, iouThreshold, scoreThreshold);\n maxOutputSize = inputs.maxOutputSize;\n iouThreshold = inputs.iouThreshold;\n scoreThreshold = inputs.scoreThreshold;\n const attrs = { maxOutputSize, iouThreshold, scoreThreshold };\n return ENGINE.runKernel(NonMaxSuppressionV3, { boxes: $boxes, scores: $scores }, attrs);\n}\nvar nonMaxSuppression = op({ nonMaxSuppression_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/backends/non_max_suppression_util.js\nfunction binaryInsert(arr, element, comparator) {\n const index = binarySearch(arr, element, comparator);\n const insertionPoint = index < 0 ? -(index + 1) : index;\n arr.splice(insertionPoint, 0, element);\n}\nfunction binarySearch(arr, target, comparator) {\n return binarySearch_(arr, target, comparator || defaultComparator);\n}\nfunction defaultComparator(a, b) {\n return a > b ? 1 : a < b ? -1 : 0;\n}\nfunction binarySearch_(arr, target, comparator) {\n let left = 0;\n let right = arr.length;\n let middle = 0;\n let found = false;\n while (left < right) {\n middle = left + (right - left >>> 1);\n const compareResult = comparator(target, arr[middle]);\n if (compareResult > 0) {\n left = middle + 1;\n } else {\n right = middle;\n found = !compareResult;\n }\n }\n return found ? left : -left - 1;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/backends/non_max_suppression_impl.js\nfunction nonMaxSuppressionV3Impl(boxes, scores, maxOutputSize, iouThreshold, scoreThreshold) {\n return nonMaxSuppressionImpl_(boxes, scores, maxOutputSize, iouThreshold, scoreThreshold, 0);\n}\nfunction nonMaxSuppressionV4Impl(boxes, scores, maxOutputSize, iouThreshold, scoreThreshold, padToMaxOutputSize) {\n return nonMaxSuppressionImpl_(\n boxes,\n scores,\n maxOutputSize,\n iouThreshold,\n scoreThreshold,\n 0,\n false,\n padToMaxOutputSize,\n true\n );\n}\nfunction nonMaxSuppressionV5Impl(boxes, scores, maxOutputSize, iouThreshold, scoreThreshold, softNmsSigma) {\n return nonMaxSuppressionImpl_(boxes, scores, maxOutputSize, iouThreshold, scoreThreshold, softNmsSigma, true);\n}\nfunction nonMaxSuppressionImpl_(boxes, scores, maxOutputSize, iouThreshold, scoreThreshold, softNmsSigma, returnScoresTensor = false, padToMaxOutputSize = false, returnValidOutputs = false) {\n const candidates = [];\n for (let i = 0; i < scores.length; i++) {\n if (scores[i] > scoreThreshold) {\n candidates.push({ score: scores[i], boxIndex: i, suppressBeginIndex: 0 });\n }\n }\n candidates.sort(ascendingComparator);\n const scale2 = softNmsSigma > 0 ? -0.5 / softNmsSigma : 0;\n const selectedIndices = [];\n const selectedScores = [];\n while (selectedIndices.length < maxOutputSize && candidates.length > 0) {\n const candidate = candidates.pop();\n const { score: originalScore, boxIndex, suppressBeginIndex } = candidate;\n if (originalScore < scoreThreshold) {\n break;\n }\n let ignoreCandidate = false;\n for (let j = selectedIndices.length - 1; j >= suppressBeginIndex; --j) {\n const iou = intersectionOverUnion(boxes, boxIndex, selectedIndices[j]);\n if (iou >= iouThreshold) {\n ignoreCandidate = true;\n break;\n }\n candidate.score = candidate.score * suppressWeight(iouThreshold, scale2, iou);\n if (candidate.score <= scoreThreshold) {\n break;\n }\n }\n candidate.suppressBeginIndex = selectedIndices.length;\n if (!ignoreCandidate) {\n if (candidate.score === originalScore) {\n selectedIndices.push(boxIndex);\n selectedScores.push(candidate.score);\n } else if (candidate.score > scoreThreshold) {\n binaryInsert(candidates, candidate, ascendingComparator);\n }\n }\n }\n const validOutputs = selectedIndices.length;\n const elemsToPad = maxOutputSize - validOutputs;\n if (padToMaxOutputSize && elemsToPad > 0) {\n selectedIndices.push(...new Array(elemsToPad).fill(0));\n selectedScores.push(...new Array(elemsToPad).fill(0));\n }\n const result = { selectedIndices };\n if (returnScoresTensor) {\n result[\"selectedScores\"] = selectedScores;\n }\n if (returnValidOutputs) {\n result[\"validOutputs\"] = validOutputs;\n }\n return result;\n}\nfunction intersectionOverUnion(boxes, i, j) {\n const iCoord = boxes.subarray(i * 4, i * 4 + 4);\n const jCoord = boxes.subarray(j * 4, j * 4 + 4);\n const yminI = Math.min(iCoord[0], iCoord[2]);\n const xminI = Math.min(iCoord[1], iCoord[3]);\n const ymaxI = Math.max(iCoord[0], iCoord[2]);\n const xmaxI = Math.max(iCoord[1], iCoord[3]);\n const yminJ = Math.min(jCoord[0], jCoord[2]);\n const xminJ = Math.min(jCoord[1], jCoord[3]);\n const ymaxJ = Math.max(jCoord[0], jCoord[2]);\n const xmaxJ = Math.max(jCoord[1], jCoord[3]);\n const areaI = (ymaxI - yminI) * (xmaxI - xminI);\n const areaJ = (ymaxJ - yminJ) * (xmaxJ - xminJ);\n if (areaI <= 0 || areaJ <= 0) {\n return 0;\n }\n const intersectionYmin = Math.max(yminI, yminJ);\n const intersectionXmin = Math.max(xminI, xminJ);\n const intersectionYmax = Math.min(ymaxI, ymaxJ);\n const intersectionXmax = Math.min(xmaxI, xmaxJ);\n const intersectionArea = Math.max(intersectionYmax - intersectionYmin, 0) * Math.max(intersectionXmax - intersectionXmin, 0);\n return intersectionArea / (areaI + areaJ - intersectionArea);\n}\nfunction suppressWeight(iouThreshold, scale2, iou) {\n const weight = Math.exp(scale2 * iou * iou);\n return iou <= iouThreshold ? weight : 0;\n}\nfunction ascendingComparator(c1, c2) {\n return c1.score - c2.score || c1.score === c2.score && c2.boxIndex - c1.boxIndex;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/non_max_suppression_async.js\nasync function nonMaxSuppressionAsync_(boxes, scores, maxOutputSize, iouThreshold = 0.5, scoreThreshold = Number.NEGATIVE_INFINITY) {\n const $boxes = convertToTensor(boxes, \"boxes\", \"nonMaxSuppressionAsync\");\n const $scores = convertToTensor(scores, \"scores\", \"nonMaxSuppressionAsync\");\n const inputs = nonMaxSuppSanityCheck($boxes, $scores, maxOutputSize, iouThreshold, scoreThreshold);\n maxOutputSize = inputs.maxOutputSize;\n iouThreshold = inputs.iouThreshold;\n scoreThreshold = inputs.scoreThreshold;\n const boxesAndScores = await Promise.all([$boxes.data(), $scores.data()]);\n const boxesVals = boxesAndScores[0];\n const scoresVals = boxesAndScores[1];\n const { selectedIndices } = nonMaxSuppressionV3Impl(boxesVals, scoresVals, maxOutputSize, iouThreshold, scoreThreshold);\n if ($boxes !== boxes) {\n $boxes.dispose();\n }\n if ($scores !== scores) {\n $scores.dispose();\n }\n return tensor1d(selectedIndices, \"int32\");\n}\nvar nonMaxSuppressionAsync = nonMaxSuppressionAsync_;\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/non_max_suppression_with_score.js\nfunction nonMaxSuppressionWithScore_(boxes, scores, maxOutputSize, iouThreshold = 0.5, scoreThreshold = Number.NEGATIVE_INFINITY, softNmsSigma = 0) {\n const $boxes = convertToTensor(boxes, \"boxes\", \"nonMaxSuppression\");\n const $scores = convertToTensor(scores, \"scores\", \"nonMaxSuppression\");\n const params = nonMaxSuppSanityCheck($boxes, $scores, maxOutputSize, iouThreshold, scoreThreshold, softNmsSigma);\n maxOutputSize = params.maxOutputSize;\n iouThreshold = params.iouThreshold;\n scoreThreshold = params.scoreThreshold;\n softNmsSigma = params.softNmsSigma;\n const inputs = { boxes: $boxes, scores: $scores };\n const attrs = { maxOutputSize, iouThreshold, scoreThreshold, softNmsSigma };\n const result = ENGINE.runKernel(NonMaxSuppressionV5, inputs, attrs);\n return { selectedIndices: result[0], selectedScores: result[1] };\n}\nvar nonMaxSuppressionWithScore = op({ nonMaxSuppressionWithScore_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/non_max_suppression_with_score_async.js\nasync function nonMaxSuppressionWithScoreAsync_(boxes, scores, maxOutputSize, iouThreshold = 0.5, scoreThreshold = Number.NEGATIVE_INFINITY, softNmsSigma = 0) {\n const $boxes = convertToTensor(boxes, \"boxes\", \"nonMaxSuppressionAsync\");\n const $scores = convertToTensor(scores, \"scores\", \"nonMaxSuppressionAsync\");\n const params = nonMaxSuppSanityCheck($boxes, $scores, maxOutputSize, iouThreshold, scoreThreshold, softNmsSigma);\n maxOutputSize = params.maxOutputSize;\n iouThreshold = params.iouThreshold;\n scoreThreshold = params.scoreThreshold;\n softNmsSigma = params.softNmsSigma;\n const boxesAndScores = await Promise.all([$boxes.data(), $scores.data()]);\n const boxesVals = boxesAndScores[0];\n const scoresVals = boxesAndScores[1];\n const { selectedIndices, selectedScores } = nonMaxSuppressionV5Impl(boxesVals, scoresVals, maxOutputSize, iouThreshold, scoreThreshold, softNmsSigma);\n if ($boxes !== boxes) {\n $boxes.dispose();\n }\n if ($scores !== scores) {\n $scores.dispose();\n }\n return {\n selectedIndices: tensor1d(selectedIndices, \"int32\"),\n selectedScores: tensor1d(selectedScores)\n };\n}\nvar nonMaxSuppressionWithScoreAsync = nonMaxSuppressionWithScoreAsync_;\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/non_max_suppression_padded.js\nfunction nonMaxSuppressionPadded_(boxes, scores, maxOutputSize, iouThreshold = 0.5, scoreThreshold = Number.NEGATIVE_INFINITY, padToMaxOutputSize = false) {\n const $boxes = convertToTensor(boxes, \"boxes\", \"nonMaxSuppression\");\n const $scores = convertToTensor(scores, \"scores\", \"nonMaxSuppression\");\n const params = nonMaxSuppSanityCheck($boxes, $scores, maxOutputSize, iouThreshold, scoreThreshold, null);\n const $maxOutputSize = params.maxOutputSize;\n const $iouThreshold = params.iouThreshold;\n const $scoreThreshold = params.scoreThreshold;\n const inputs = { boxes: $boxes, scores: $scores };\n const attrs = {\n maxOutputSize: $maxOutputSize,\n iouThreshold: $iouThreshold,\n scoreThreshold: $scoreThreshold,\n padToMaxOutputSize\n };\n const result = ENGINE.runKernel(NonMaxSuppressionV4, inputs, attrs);\n return { selectedIndices: result[0], validOutputs: result[1] };\n}\nvar nonMaxSuppressionPadded = op({ nonMaxSuppressionPadded_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/non_max_suppression_padded_async.js\nasync function nonMaxSuppressionPaddedAsync_(boxes, scores, maxOutputSize, iouThreshold = 0.5, scoreThreshold = Number.NEGATIVE_INFINITY, padToMaxOutputSize = false) {\n const $boxes = convertToTensor(boxes, \"boxes\", \"nonMaxSuppressionAsync\");\n const $scores = convertToTensor(scores, \"scores\", \"nonMaxSuppressionAsync\");\n const params = nonMaxSuppSanityCheck($boxes, $scores, maxOutputSize, iouThreshold, scoreThreshold, null);\n const $maxOutputSize = params.maxOutputSize;\n const $iouThreshold = params.iouThreshold;\n const $scoreThreshold = params.scoreThreshold;\n const [boxesVals, scoresVals] = await Promise.all([$boxes.data(), $scores.data()]);\n const { selectedIndices, validOutputs } = nonMaxSuppressionV4Impl(boxesVals, scoresVals, $maxOutputSize, $iouThreshold, $scoreThreshold, padToMaxOutputSize);\n if ($boxes !== boxes) {\n $boxes.dispose();\n }\n if ($scores !== scores) {\n $scores.dispose();\n }\n return {\n selectedIndices: tensor1d(selectedIndices, \"int32\"),\n validOutputs: scalar(validOutputs, \"int32\")\n };\n}\nvar nonMaxSuppressionPaddedAsync = nonMaxSuppressionPaddedAsync_;\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/resize_bilinear.js\nfunction resizeBilinear_(images, size, alignCorners = false, halfPixelCenters = false) {\n const $images = convertToTensor(images, \"images\", \"resizeBilinear\");\n assert($images.rank === 3 || $images.rank === 4, () => `Error in resizeBilinear: x must be rank 3 or 4, but got rank ${$images.rank}.`);\n assert(size.length === 2, () => `Error in resizeBilinear: new shape must 2D, but got shape ${size}.`);\n assert(halfPixelCenters === false || alignCorners === false, () => `Error in resizeBilinear: If halfPixelCenters is true, alignCorners must be false.`);\n let batchImages = $images;\n let reshapedTo4D = false;\n if ($images.rank === 3) {\n reshapedTo4D = true;\n batchImages = reshape($images, [1, $images.shape[0], $images.shape[1], $images.shape[2]]);\n }\n const [] = size;\n const inputs = { images: batchImages };\n const attrs = { alignCorners, halfPixelCenters, size };\n const res = ENGINE.runKernel(ResizeBilinear, inputs, attrs);\n if (reshapedTo4D) {\n return reshape(res, [res.shape[1], res.shape[2], res.shape[3]]);\n }\n return res;\n}\nvar resizeBilinear = op({ resizeBilinear_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/resize_nearest_neighbor.js\nfunction resizeNearestNeighbor_(images, size, alignCorners = false, halfPixelCenters = false) {\n const $images = convertToTensor(images, \"images\", \"resizeNearestNeighbor\");\n assert($images.rank === 3 || $images.rank === 4, () => `Error in resizeNearestNeighbor: x must be rank 3 or 4, but got rank ${$images.rank}.`);\n assert(size.length === 2, () => `Error in resizeNearestNeighbor: new shape must 2D, but got shape ${size}.`);\n assert($images.dtype === \"float32\" || $images.dtype === \"int32\", () => \"`images` must have `int32` or `float32` as dtype\");\n assert(halfPixelCenters === false || alignCorners === false, () => `Error in resizeNearestNeighbor: If halfPixelCenters is true, alignCorners must be false.`);\n let batchImages = $images;\n let reshapedTo4D = false;\n if ($images.rank === 3) {\n reshapedTo4D = true;\n batchImages = reshape($images, [1, $images.shape[0], $images.shape[1], $images.shape[2]]);\n }\n const [] = size;\n const inputs = { images: batchImages };\n const attrs = { alignCorners, halfPixelCenters, size };\n const res = ENGINE.runKernel(ResizeNearestNeighbor, inputs, attrs);\n if (reshapedTo4D) {\n return reshape(res, [res.shape[1], res.shape[2], res.shape[3]]);\n }\n return res;\n}\nvar resizeNearestNeighbor = op({ resizeNearestNeighbor_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/threshold.js\nfunction threshold_(image2, method = \"binary\", inverted = false, threshValue = 0.5) {\n const $image = convertToTensor(image2, \"image\", \"threshold\");\n const RED_INTENCITY_COEF = 0.2989;\n const GREEN_INTENCITY_COEF = 0.587;\n const BLUE_INTENCITY_COEF = 0.114;\n const totalPixelsInImage = $image.shape[0] * $image.shape[1];\n let $threshold = mul(tensor1d([threshValue]), 255);\n let r, g, b, grayscale;\n assert($image.rank === 3, () => `Error in threshold: image must be rank 3,but got rank ${$image.rank}.`);\n assert($image.shape[2] === 3 || $image.shape[2] === 1, () => `Error in threshold: image color channel must be equal to 3 or 1but got ${$image.shape[2]}.`);\n assert($image.dtype === \"int32\" || $image.dtype === \"float32\", () => `Error in dtype: image dtype must be int32 or float32,but got dtype ${$image.dtype}.`);\n assert(method === \"otsu\" || method === \"binary\", () => `Method must be binary or otsu, but was ${method}`);\n if ($image.shape[2] === 3) {\n [r, g, b] = split($image, [1, 1, 1], -1);\n const $r = mul(r, RED_INTENCITY_COEF);\n const $g = mul(g, GREEN_INTENCITY_COEF);\n const $b = mul(b, BLUE_INTENCITY_COEF);\n grayscale = add2(add2($r, $g), $b);\n } else {\n grayscale = image2;\n }\n if (method === \"otsu\") {\n const $histogram = bincount(cast(round2(grayscale), \"int32\"), tensor([]), 256);\n $threshold = otsu($histogram, totalPixelsInImage);\n }\n const invCondition = inverted ? lessEqual(grayscale, $threshold) : greater(grayscale, $threshold);\n const result = cast(mul(invCondition, 255), \"int32\");\n return result;\n}\nfunction otsu(histogram, total) {\n let bestThresh = tensor1d([-1]);\n let bestInBetVar = tensor1d([0]);\n let cInBetVar = tensor1d([0]);\n let classFirst, classSecond, meanFirst, meanSec, weightForeground, weightBack;\n for (let index = 0; index < histogram.size - 1; index++) {\n classFirst = slice(histogram, 0, index + 1);\n classSecond = slice(histogram, index + 1);\n weightForeground = div(sum2(classFirst), total);\n weightBack = div(sum2(classSecond), total);\n const meanFirstDivA = sum2(mul(classFirst, range(0, classFirst.size)));\n meanFirst = div(meanFirstDivA, sum2(classFirst));\n const meanSecFill = fill(classSecond.shape, classFirst.size);\n const meanSecAdd = add2(range(0, classSecond.size), meanSecFill);\n const meanSecMul = mul(classSecond, meanSecAdd);\n meanSec = div(sum2(meanSecMul), sum2(classSecond));\n const cInBetVarSubA = sub(meanFirst, meanSec);\n const cInBetVarSubB = sub(meanFirst, meanSec);\n const cInBetVarMul = mul(weightForeground, weightBack);\n cInBetVar = mul(mul(cInBetVarMul, cInBetVarSubA), cInBetVarSubB);\n const condition = greater(cInBetVar, bestInBetVar);\n bestInBetVar = where(condition, cInBetVar, bestInBetVar);\n bestThresh = where(condition, tensor1d([index]), bestThresh);\n }\n return bestThresh;\n}\nvar threshold = op({ threshold_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/transform.js\nfunction transform_(image2, transforms, interpolation = \"nearest\", fillMode = \"constant\", fillValue = 0, outputShape) {\n const $image = convertToTensor(image2, \"image\", \"transform\", \"float32\");\n const $transforms = convertToTensor(transforms, \"transforms\", \"transform\", \"float32\");\n assert($image.rank === 4, () => `Error in transform: image must be rank 4,but got rank ${$image.rank}.`);\n assert($transforms.rank === 2 && ($transforms.shape[0] === $image.shape[0] || $transforms.shape[0] === 1) && $transforms.shape[1] === 8, () => `Error in transform: Input transform should be batch x 8 or 1 x 8`);\n assert(outputShape == null || outputShape.length === 2, () => `Error in transform: outputShape must be [height, width] or null, but got ${outputShape}.`);\n const inputs = { image: $image, transforms: $transforms };\n const attrs = { interpolation, fillMode, fillValue, outputShape };\n return ENGINE.runKernel(Transform, inputs, attrs);\n}\nvar transform = op({ transform_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/linalg/band_part.js\nfunction bandPart_(a, numLower, numUpper) {\n assert(numLower % 1 === 0, () => `bandPart(): numLower must be an integer, got ${numLower}.`);\n assert(numUpper % 1 === 0, () => `bandPart(): numUpper must be an integer, got ${numUpper}.`);\n const $a = convertToTensor(a, \"a\", \"bandPart\");\n assert($a.rank >= 2, () => `bandPart(): Rank must be at least 2, got ${$a.rank}.`);\n const shape = $a.shape;\n const [M, N] = $a.shape.slice(-2);\n if (!(numLower <= M)) {\n throw new Error(`bandPart(): numLower (${numLower}) must not be greater than the number of rows (${M}).`);\n }\n if (!(numUpper <= N)) {\n throw new Error(`bandPart(): numUpper (${numUpper}) must not be greater than the number of columns (${N}).`);\n }\n if (numLower < 0) {\n numLower = M;\n }\n if (numUpper < 0) {\n numUpper = N;\n }\n const i = reshape(range(0, M, 1, \"int32\"), [-1, 1]);\n const j = range(0, N, 1, \"int32\");\n const ij = sub(i, j);\n const inBand = logicalAnd(lessEqual(ij, scalar(+numLower, \"int32\")), greaterEqual(ij, scalar(-numUpper, \"int32\")));\n const zero = zeros([M, N], $a.dtype);\n return reshape(stack(unstack(reshape($a, [-1, M, N])).map((mat) => where(inBand, mat, zero))), shape);\n}\nvar bandPart = op({ bandPart_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/linalg/gram_schmidt.js\nfunction gramSchmidt_(xs) {\n let inputIsTensor2D;\n if (Array.isArray(xs)) {\n inputIsTensor2D = false;\n assert(xs != null && xs.length > 0, () => \"Gram-Schmidt process: input must not be null, undefined, or empty\");\n const dim = xs[0].shape[0];\n for (let i = 1; i < xs.length; ++i) {\n assert(xs[i].shape[0] === dim, () => `Gram-Schmidt: Non-unique lengths found in the input vectors: (${xs[i].shape[0]} vs. ${dim})`);\n }\n } else {\n inputIsTensor2D = true;\n xs = split(xs, xs.shape[0], 0).map((x) => squeeze(x, [0]));\n }\n assert(xs.length <= xs[0].shape[0], () => `Gram-Schmidt: Number of vectors (${xs.length}) exceeds number of dimensions (${xs[0].shape[0]}).`);\n const ys = [];\n const xs1d = xs;\n for (let i = 0; i < xs.length; ++i) {\n ys.push(ENGINE.tidy(() => {\n let x = xs1d[i];\n if (i > 0) {\n for (let j = 0; j < i; ++j) {\n const proj = mul(sum2(mul(ys[j], x)), ys[j]);\n x = sub(x, proj);\n }\n }\n return div(x, norm(x, \"euclidean\"));\n }));\n }\n if (inputIsTensor2D) {\n return stack(ys, 0);\n } else {\n return ys;\n }\n}\nvar gramSchmidt = op({ gramSchmidt_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/linalg/qr.js\nfunction qr_(x, fullMatrices = false) {\n assert(x.rank >= 2, () => `qr() requires input tensor to have a rank >= 2, but got rank ${x.rank}`);\n if (x.rank === 2) {\n return qr2d(x, fullMatrices);\n } else {\n const outerDimsProd = x.shape.slice(0, x.shape.length - 2).reduce((value, prev) => value * prev);\n const x2ds = unstack(reshape(x, [\n outerDimsProd,\n x.shape[x.shape.length - 2],\n x.shape[x.shape.length - 1]\n ]), 0);\n const q2ds = [];\n const r2ds = [];\n x2ds.forEach((x2d) => {\n const [q2d, r2d] = qr2d(x2d, fullMatrices);\n q2ds.push(q2d);\n r2ds.push(r2d);\n });\n const q = reshape(stack(q2ds, 0), x.shape);\n const r = reshape(stack(r2ds, 0), x.shape);\n return [q, r];\n }\n}\nfunction qr2d(x, fullMatrices = false) {\n return ENGINE.tidy(() => {\n assert(x.shape.length === 2, () => `qr2d() requires a 2D Tensor, but got a ${x.shape.length}D Tensor.`);\n const m = x.shape[0];\n const n = x.shape[1];\n let q = eye(m);\n let r = clone(x);\n const one2D = tensor2d([[1]], [1, 1]);\n let w = clone(one2D);\n const iters = m >= n ? n : m;\n for (let j = 0; j < iters; ++j) {\n const rTemp = r;\n const wTemp = w;\n const qTemp = q;\n [w, r, q] = ENGINE.tidy(() => {\n const rjEnd1 = slice(r, [j, j], [m - j, 1]);\n const normX = norm(rjEnd1);\n const rjj = slice(r, [j, j], [1, 1]);\n const s = where(greater(rjj, 0), tensor2d([[-1]]), tensor2d([[1]]));\n const u1 = sub(rjj, mul(s, normX));\n const wPre = div(rjEnd1, u1);\n if (wPre.shape[0] === 1) {\n w = clone(one2D);\n } else {\n w = concat([\n one2D,\n slice(wPre, [1, 0], [wPre.shape[0] - 1, wPre.shape[1]])\n ], 0);\n }\n const tau = neg(div(matMul(s, u1), normX));\n const rjEndAll = slice(r, [j, 0], [m - j, n]);\n const tauTimesW = mul(tau, w);\n const wT = transpose(w);\n if (j === 0) {\n r = sub(rjEndAll, matMul(tauTimesW, matMul(wT, rjEndAll)));\n } else {\n const rTimesTau = sub(rjEndAll, matMul(tauTimesW, matMul(wT, rjEndAll)));\n r = concat([slice(r, [0, 0], [j, n]), rTimesTau], 0);\n }\n const tawTimesWT = transpose(tauTimesW);\n const qAllJEnd = slice(q, [0, j], [m, q.shape[1] - j]);\n if (j === 0) {\n q = sub(qAllJEnd, matMul(matMul(qAllJEnd, w), tawTimesWT));\n } else {\n const qTimesTau = sub(qAllJEnd, matMul(matMul(qAllJEnd, w), tawTimesWT));\n q = concat([slice(q, [0, 0], [m, j]), qTimesTau], 1);\n }\n return [w, r, q];\n });\n dispose([rTemp, wTemp, qTemp]);\n }\n if (!fullMatrices && m > n) {\n q = slice(q, [0, 0], [m, n]);\n r = slice(r, [0, 0], [n, n]);\n }\n return [q, r];\n });\n}\nvar qr = op({ qr_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/loss_ops_utils.js\nvar Reduction;\n(function(Reduction2) {\n Reduction2[Reduction2[\"NONE\"] = 0] = \"NONE\";\n Reduction2[Reduction2[\"MEAN\"] = 1] = \"MEAN\";\n Reduction2[Reduction2[\"SUM\"] = 2] = \"SUM\";\n Reduction2[Reduction2[\"SUM_BY_NONZERO_WEIGHTS\"] = 3] = \"SUM_BY_NONZERO_WEIGHTS\";\n})(Reduction || (Reduction = {}));\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/losses/compute_weighted_loss.js\nfunction computeWeightedLoss_(losses2, weights, reduction = Reduction.SUM_BY_NONZERO_WEIGHTS) {\n const $losses = convertToTensor(losses2, \"losses\", \"computeWeightedLoss\");\n let $weights = null;\n if (weights != null) {\n $weights = convertToTensor(weights, \"weights\", \"computeWeightedLoss\");\n }\n const weightedLoss = $weights == null ? $losses : mul($losses, $weights);\n if (reduction === Reduction.NONE) {\n return weightedLoss;\n }\n if (reduction === Reduction.SUM) {\n return sum2(weightedLoss);\n }\n if (reduction === Reduction.MEAN) {\n if ($weights == null) {\n return mean(weightedLoss);\n } else {\n const broadcastFactor = $losses.size / $weights.size;\n const result = div(sum2(weightedLoss), sum2($weights));\n return broadcastFactor > 1 ? div(result, scalar(broadcastFactor)) : result;\n }\n }\n if (reduction === Reduction.SUM_BY_NONZERO_WEIGHTS) {\n if ($weights == null) {\n return div(sum2(weightedLoss), scalar($losses.size));\n } else {\n const broadcastedWeights = mul($weights, ones2($losses.shape));\n const numNonZeros = cast(sum2(notEqual(broadcastedWeights, scalar(0))), \"float32\");\n return div(sum2(weightedLoss), numNonZeros);\n }\n }\n throw Error(`Unknown reduction: ${reduction}`);\n}\nvar computeWeightedLoss = op({ computeWeightedLoss_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/losses/absolute_difference.js\nfunction absoluteDifference_(labels, predictions, weights, reduction = Reduction.SUM_BY_NONZERO_WEIGHTS) {\n const $labels = convertToTensor(labels, \"labels\", \"absoluteDifference\");\n const $predictions = convertToTensor(predictions, \"predictions\", \"absoluteDifference\");\n let $weights = null;\n if (weights != null) {\n $weights = convertToTensor(weights, \"weights\", \"absoluteDifference\");\n }\n assertShapesMatch($labels.shape, $predictions.shape, \"Error in absoluteDifference: \");\n const losses2 = abs(sub($labels, $predictions));\n return computeWeightedLoss(losses2, $weights, reduction);\n}\nvar absoluteDifference = op({ absoluteDifference_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/losses/cosine_distance.js\nfunction cosineDistance_(labels, predictions, axis, weights, reduction = Reduction.SUM_BY_NONZERO_WEIGHTS) {\n const $labels = convertToTensor(labels, \"labels\", \"cosineDistance\");\n const $predictions = convertToTensor(predictions, \"predictions\", \"cosineDistance\");\n let $weights = null;\n if (weights != null) {\n $weights = convertToTensor(weights, \"weights\", \"cosineDistance\");\n }\n assertShapesMatch($labels.shape, $predictions.shape, \"Error in cosineDistance: \");\n const one = scalar(1);\n const losses2 = sub(one, sum2(mul($labels, $predictions), axis, true));\n return computeWeightedLoss(losses2, $weights, reduction);\n}\nvar cosineDistance = op({ cosineDistance_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/losses/hinge_loss.js\nfunction hingeLoss_(labels, predictions, weights, reduction = Reduction.SUM_BY_NONZERO_WEIGHTS) {\n let $labels = convertToTensor(labels, \"labels\", \"hingeLoss\");\n const $predictions = convertToTensor(predictions, \"predictions\", \"hingeLoss\");\n let $weights = null;\n if (weights != null) {\n $weights = convertToTensor(weights, \"weights\", \"hingeLoss\");\n }\n assertShapesMatch($labels.shape, $predictions.shape, \"Error in hingeLoss: \");\n const one = scalar(1);\n $labels = sub(mul(scalar(2), $labels), one);\n const losses2 = relu(sub(one, mul($labels, $predictions)));\n return computeWeightedLoss(losses2, $weights, reduction);\n}\nvar hingeLoss = op({ hingeLoss_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/losses/huber_loss.js\nfunction huberLoss_(labels, predictions, weights, delta = 1, reduction = Reduction.SUM_BY_NONZERO_WEIGHTS) {\n const $labels = convertToTensor(labels, \"labels\", \"huberLoss\");\n const $predictions = convertToTensor(predictions, \"predictions\", \"huberLoss\");\n let $weights = null;\n if (weights != null) {\n $weights = convertToTensor(weights, \"weights\", \"huberLoss\");\n }\n assertShapesMatch($labels.shape, $predictions.shape, \"Error in huberLoss: \");\n const deltaScalar = scalar(delta);\n const error = abs(sub($predictions, $labels));\n const quadratic = minimum(error, deltaScalar);\n const linear = sub(error, quadratic);\n const losses2 = add2(mul(scalar(0.5), square(quadratic)), mul(deltaScalar, linear));\n return computeWeightedLoss(losses2, $weights, reduction);\n}\nvar huberLoss = op({ huberLoss_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/losses/log_loss.js\nfunction logLoss_(labels, predictions, weights, epsilon3 = 1e-7, reduction = Reduction.SUM_BY_NONZERO_WEIGHTS) {\n const $labels = convertToTensor(labels, \"labels\", \"logLoss\");\n const $predictions = convertToTensor(predictions, \"predictions\", \"logLoss\");\n let $weights = null;\n if (weights != null) {\n $weights = convertToTensor(weights, \"weights\", \"logLoss\");\n }\n assertShapesMatch($labels.shape, $predictions.shape, \"Error in logLoss: \");\n const one = scalar(1);\n const epsilonScalar = scalar(epsilon3);\n const l13 = neg(mul($labels, log2(add2($predictions, epsilonScalar))));\n const l23 = mul(sub(one, $labels), log2(add2(sub(one, $predictions), epsilonScalar)));\n const losses2 = sub(l13, l23);\n return computeWeightedLoss(losses2, $weights, reduction);\n}\nvar logLoss = op({ logLoss_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/losses/mean_squared_error.js\nfunction meanSquaredError_(labels, predictions, weights, reduction = Reduction.SUM_BY_NONZERO_WEIGHTS) {\n const $labels = convertToTensor(labels, \"labels\", \"meanSquaredError\");\n const $predictions = convertToTensor(predictions, \"predictions\", \"meanSquaredError\");\n let $weights = null;\n if (weights != null) {\n $weights = convertToTensor(weights, \"weights\", \"meanSquaredError\");\n }\n assertShapesMatch($labels.shape, $predictions.shape, \"Error in meanSquaredError: \");\n const losses2 = squaredDifference($labels, $predictions);\n return computeWeightedLoss(losses2, $weights, reduction);\n}\nvar meanSquaredError = op({ meanSquaredError_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/losses/sigmoid_cross_entropy.js\nfunction sigmoidCrossEntropyWithLogits_(labels, logits) {\n const $labels = convertToTensor(labels, \"labels\", \"sigmoidCrossEntropyWithLogits\");\n const $logits = convertToTensor(logits, \"logits\", \"sigmoidCrossEntropyWithLogits\");\n assertShapesMatch($labels.shape, $logits.shape, \"Error in sigmoidCrossEntropyWithLogits: \");\n const maxOutput = relu($logits);\n const outputXTarget = mul($logits, $labels);\n const sigmoidOutput = log1p(exp(neg(abs($logits))));\n return add2(sub(maxOutput, outputXTarget), sigmoidOutput);\n}\nfunction sigmoidCrossEntropy_(multiClassLabels, logits, weights, labelSmoothing = 0, reduction = Reduction.SUM_BY_NONZERO_WEIGHTS) {\n let $multiClassLabels = convertToTensor(multiClassLabels, \"multiClassLabels\", \"sigmoidCrossEntropy\");\n const $logits = convertToTensor(logits, \"logits\", \"sigmoidCrossEntropy\");\n let $weights = null;\n if (weights != null) {\n $weights = convertToTensor(weights, \"weights\", \"sigmoidCrossEntropy\");\n }\n assertShapesMatch($multiClassLabels.shape, $logits.shape, \"Error in sigmoidCrossEntropy: \");\n if (labelSmoothing > 0) {\n const labelSmoothingScalar = scalar(labelSmoothing);\n const one = scalar(1);\n const half = scalar(0.5);\n $multiClassLabels = add2(mul($multiClassLabels, sub(one, labelSmoothingScalar)), mul(half, labelSmoothingScalar));\n }\n const losses2 = sigmoidCrossEntropyWithLogits_($multiClassLabels, $logits);\n return computeWeightedLoss(losses2, $weights, reduction);\n}\nvar sigmoidCrossEntropy = op({ sigmoidCrossEntropy_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/losses/softmax_cross_entropy.js\nfunction softmaxCrossEntropyWithLogits_(labels, logits, dim = -1) {\n if (dim === -1) {\n dim = logits.rank - 1;\n }\n if (dim !== logits.rank - 1) {\n throw Error(`Softmax cross entropy along a non-last dimension is not yet supported. Labels / logits was rank ${logits.rank} and dim was ${dim}`);\n }\n const customOp = customGrad((labels2, logits2, save) => {\n const keepDims = true;\n const lse = logSumExp(logits2, [dim], keepDims);\n const logResult = sub(cast(logits2, \"float32\"), lse);\n save([labels2, logResult]);\n const costVector = neg(mul(logResult, labels2));\n const value = sum2(costVector, [dim]);\n const gradFunc = (dy, saved) => {\n const [labels3, logResult2] = saved;\n const dyShape = expandShapeToKeepDim(dy.shape, [dim]);\n return [\n mul(reshape(dy, dyShape), sub(cast(labels3, \"float32\"), exp(logResult2))),\n mul(reshape(dy, dyShape), sub(exp(logResult2), cast(labels3, \"float32\")))\n ];\n };\n return { value, gradFunc };\n });\n return customOp(labels, logits);\n}\nfunction softmaxCrossEntropy_(onehotLabels, logits, weights, labelSmoothing = 0, reduction = Reduction.SUM_BY_NONZERO_WEIGHTS) {\n let $onehotLabels = convertToTensor(onehotLabels, \"onehotLabels\", \"softmaxCrossEntropy\");\n const $logits = convertToTensor(logits, \"logits\", \"softmaxCrossEntropy\");\n let $weights = null;\n if (weights != null) {\n $weights = convertToTensor(weights, \"weights\", \"softmaxCrossEntropy\");\n }\n assertShapesMatch($onehotLabels.shape, $logits.shape, \"Error in softmaxCrossEntropy: \");\n if (labelSmoothing > 0) {\n const labelSmoothingScalar = scalar(labelSmoothing);\n const one = scalar(1);\n const numClasses = scalar($onehotLabels.shape[1]);\n $onehotLabels = add2(mul($onehotLabels, sub(one, labelSmoothingScalar)), div(labelSmoothingScalar, numClasses));\n }\n const losses2 = softmaxCrossEntropyWithLogits_($onehotLabels, $logits);\n return computeWeightedLoss(losses2, $weights, reduction);\n}\nvar softmaxCrossEntropy = op({ softmaxCrossEntropy_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/sparse/sparse_fill_empty_rows.js\nfunction sparseFillEmptyRows_(indices, values, denseShape, defaultValue) {\n const $indices = convertToTensor(indices, \"indices\", \"sparseFillEmptyRows\", \"int32\");\n const $values = convertToTensor(values, \"values\", \"sparseFillEmptyRows\");\n const $denseShape = convertToTensor(denseShape, \"denseShape\", \"sparseFillEmptyRows\", \"int32\");\n const $defaultValue = convertToTensor(defaultValue, \"defaultValue\", \"sparseFillEmptyRows\", $values.dtype);\n if ($indices.rank !== 2) {\n throw new Error(`Indices should be Tensor2D but received shape\n ${$indices.shape}`);\n }\n if ($values.rank !== 1) {\n throw new Error(`Values should be Tensor1D but received shape ${$values.shape}`);\n }\n if ($denseShape.rank !== 1) {\n throw new Error(`Dense shape should be Tensor1D but received shape ${$denseShape.shape}`);\n }\n if ($defaultValue.rank !== 0) {\n throw new Error(`Default value should be a scalar but received shape ${$defaultValue.shape}`);\n }\n const inputs = {\n indices: $indices,\n values: $values,\n denseShape: $denseShape,\n defaultValue: $defaultValue\n };\n const result = ENGINE.runKernel(SparseFillEmptyRows, inputs);\n return {\n outputIndices: result[0],\n outputValues: result[1],\n emptyRowIndicator: result[2],\n reverseIndexMap: result[3]\n };\n}\nvar sparseFillEmptyRows = op({ sparseFillEmptyRows_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/sparse/sparse_reshape.js\nfunction sparseReshape_(inputIndices, inputShape, newShape) {\n const $inputIndices = convertToTensor(inputIndices, \"inputIndices\", \"sparseReshape\", \"int32\");\n const $inputShape = convertToTensor(inputShape, \"inputShape\", \"sparseReshape\", \"int32\");\n const $newShape = convertToTensor(newShape, \"newShape\", \"sparseReshape\", \"int32\");\n if ($inputIndices.rank !== 2) {\n throw new Error(`Input indices should be Tensor2D but received shape\n ${$inputIndices.shape}`);\n }\n if ($inputShape.rank !== 1) {\n throw new Error(`Input shape should be Tensor1D but received shape ${$inputShape.shape}`);\n }\n if ($newShape.rank !== 1) {\n throw new Error(`New shape should be Tensor1D but received shape ${$newShape.shape}`);\n }\n const inputs = {\n inputIndices: $inputIndices,\n inputShape: $inputShape,\n newShape: $newShape\n };\n const result = ENGINE.runKernel(SparseReshape, inputs);\n return { outputIndices: result[0], outputShape: result[1] };\n}\nvar sparseReshape = op({ sparseReshape_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/sparse/sparse_segment_mean.js\nfunction sparseSegmentMean_(data, indices, segmentIds) {\n const $data = convertToTensor(data, \"data\", \"sparseSegmentMean\");\n const $indices = convertToTensor(indices, \"indices\", \"sparseSegmentMean\", \"int32\");\n const $segmentIds = convertToTensor(segmentIds, \"segmentIds\", \"sparseSegmentMean\", \"int32\");\n if ($data.rank < 1) {\n throw new Error(`Data should be at least 1 dimensional but received scalar`);\n }\n if ($indices.rank !== 1) {\n throw new Error(`Indices should be Tensor1D but received shape\n ${$indices.shape}`);\n }\n if ($segmentIds.rank !== 1) {\n throw new Error(`Segment ids should be Tensor1D but received shape\n ${$segmentIds.shape}`);\n }\n const inputs = {\n data: $data,\n indices: $indices,\n segmentIds: $segmentIds\n };\n return ENGINE.runKernel(SparseSegmentMean, inputs);\n}\nvar sparseSegmentMean = op({ sparseSegmentMean_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/sparse/sparse_segment_sum.js\nfunction sparseSegmentSum_(data, indices, segmentIds) {\n const $data = convertToTensor(data, \"data\", \"sparseSegmentSum\");\n const $indices = convertToTensor(indices, \"indices\", \"sparseSegmentSum\", \"int32\");\n const $segmentIds = convertToTensor(segmentIds, \"segmentIds\", \"sparseSegmentSum\", \"int32\");\n if ($data.rank < 1) {\n throw new Error(`Data should be at least 1 dimensional but received scalar`);\n }\n if ($indices.rank !== 1) {\n throw new Error(`Indices should be Tensor1D but received shape\n ${$indices.shape}`);\n }\n if ($segmentIds.rank !== 1) {\n throw new Error(`Segment ids should be Tensor1D but received shape\n ${$segmentIds.shape}`);\n }\n const inputs = {\n data: $data,\n indices: $indices,\n segmentIds: $segmentIds\n };\n return ENGINE.runKernel(SparseSegmentSum, inputs);\n}\nvar sparseSegmentSum = op({ sparseSegmentSum_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/string/string_n_grams.js\nfunction stringNGrams_(data, dataSplits, separator, nGramWidths, leftPad, rightPad2, padWidth, preserveShortSequences) {\n const $data = convertToTensor(data, \"data\", \"stringNGrams\", \"string\");\n if ($data.dtype !== \"string\") {\n throw new Error(\"Data must be of datatype string\");\n }\n if ($data.shape.length !== 1) {\n throw new Error(`Data must be a vector, saw: ${$data.shape}`);\n }\n const $dataSplits = convertToTensor(dataSplits, \"dataSplits\", \"stringNGrams\");\n if ($dataSplits.dtype !== \"int32\") {\n throw new Error(\"Data splits must be of datatype int32\");\n }\n const attrs = {\n separator,\n nGramWidths,\n leftPad,\n rightPad: rightPad2,\n padWidth,\n preserveShortSequences\n };\n const inputs = { data: $data, dataSplits: $dataSplits };\n const result = ENGINE.runKernel(StringNGrams, inputs, attrs);\n return { nGrams: result[0], nGramsSplits: result[1] };\n}\nvar stringNGrams = op({ stringNGrams_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/string/string_split.js\nfunction stringSplit_(input2, delimiter, skipEmpty = true) {\n const $input = convertToTensor(input2, \"input\", \"stringSplit\", \"string\");\n const $delimiter = convertToTensor(delimiter, \"delimiter\", \"stringSplit\", \"string\");\n if ($input.rank !== 1) {\n throw new Error(`Input should be Tensor1D but received shape ${$input.shape}`);\n }\n if ($delimiter.rank !== 0) {\n throw new Error(`Delimiter should be a scalar but received shape ${$delimiter.shape}`);\n }\n const attrs = { skipEmpty };\n const inputs = { input: $input, delimiter: $delimiter };\n const result = ENGINE.runKernel(StringSplit, inputs, attrs);\n return { indices: result[0], values: result[1], shape: result[2] };\n}\nvar stringSplit = op({ stringSplit_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/string/string_to_hash_bucket_fast.js\nfunction stringToHashBucketFast_(input2, numBuckets) {\n const $input = convertToTensor(input2, \"input\", \"stringToHashBucketFast\", \"string\");\n const attrs = { numBuckets };\n if (numBuckets <= 0) {\n throw new Error(`Number of buckets must be at least 1`);\n }\n const inputs = { input: $input };\n return ENGINE.runKernel(StringToHashBucketFast, inputs, attrs);\n}\nvar stringToHashBucketFast = op({ stringToHashBucketFast_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/ops.js\nvar spectral = {\n fft,\n ifft,\n rfft,\n irfft\n};\nvar signal = {\n hammingWindow,\n hannWindow,\n frame,\n stft\n};\nvar image = {\n flipLeftRight,\n grayscaleToRGB,\n resizeNearestNeighbor,\n resizeBilinear,\n rotateWithOffset,\n cropAndResize,\n nonMaxSuppression,\n nonMaxSuppressionAsync,\n nonMaxSuppressionWithScore,\n nonMaxSuppressionWithScoreAsync,\n nonMaxSuppressionPadded,\n nonMaxSuppressionPaddedAsync,\n threshold,\n transform\n};\nvar linalg = {\n bandPart,\n gramSchmidt,\n qr\n};\nvar losses = {\n absoluteDifference,\n computeWeightedLoss,\n cosineDistance,\n hingeLoss,\n huberLoss,\n logLoss,\n meanSquaredError,\n sigmoidCrossEntropy,\n softmaxCrossEntropy\n};\nvar sparse = {\n sparseFillEmptyRows,\n sparseReshape,\n sparseSegmentMean,\n sparseSegmentSum\n};\nvar string = {\n stringNGrams,\n stringSplit,\n stringToHashBucketFast\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/optimizers/optimizer.js\nvar Optimizer = class extends Serializable {\n minimize(f, returnCost = false, varList) {\n const { value, grads: grads2 } = this.computeGradients(f, varList);\n if (varList != null) {\n const gradArray = varList.map((v) => ({ name: v.name, tensor: grads2[v.name] }));\n this.applyGradients(gradArray);\n } else {\n this.applyGradients(grads2);\n }\n dispose(grads2);\n if (returnCost) {\n return value;\n } else {\n value.dispose();\n return null;\n }\n }\n get iterations() {\n if (this.iterations_ == null) {\n this.iterations_ = 0;\n }\n return this.iterations_;\n }\n incrementIterations() {\n this.iterations_ = this.iterations + 1;\n }\n computeGradients(f, varList) {\n return variableGrads(f, varList);\n }\n dispose() {\n if (this.iterations_ != null) {\n dispose(this.iterations_);\n }\n }\n async saveIterations() {\n if (this.iterations_ == null) {\n this.iterations_ = 0;\n }\n return {\n name: \"iter\",\n tensor: scalar(this.iterations_, \"int32\")\n };\n }\n async getWeights() {\n throw new Error(\"getWeights() is not implemented for this optimizer yet.\");\n }\n async setWeights(weightValues) {\n throw new Error(`setWeights() is not implemented for this optimizer class ${this.getClassName()}`);\n }\n async extractIterations(weightValues) {\n this.iterations_ = (await weightValues[0].tensor.data())[0];\n return weightValues.slice(1);\n }\n};\nObject.defineProperty(Optimizer, Symbol.hasInstance, {\n value: (instance) => {\n return instance.minimize != null && instance.computeGradients != null && instance.applyGradients != null;\n }\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/optimizers/adadelta_optimizer.js\nvar AdadeltaOptimizer = class extends Optimizer {\n constructor(learningRate, rho, epsilon3 = null) {\n super();\n this.learningRate = learningRate;\n this.rho = rho;\n this.epsilon = epsilon3;\n this.accumulatedGrads = [];\n this.accumulatedUpdates = [];\n if (epsilon3 == null) {\n this.epsilon = ENGINE.backend.epsilon();\n }\n }\n applyGradients(variableGradients) {\n const variableNames = Array.isArray(variableGradients) ? variableGradients.map((item) => item.name) : Object.keys(variableGradients);\n variableNames.forEach((name, i) => {\n const value = ENGINE.registeredVariables[name];\n const trainable = false;\n if (this.accumulatedGrads[i] == null) {\n this.accumulatedGrads[i] = {\n originalName: `${name}/accum_grad`,\n variable: tidy(() => zerosLike(value).variable(trainable))\n };\n }\n if (this.accumulatedUpdates[i] == null) {\n this.accumulatedUpdates[i] = {\n originalName: `${name}/accum_var`,\n variable: tidy(() => zerosLike(value).variable(trainable))\n };\n }\n const gradient = Array.isArray(variableGradients) ? variableGradients[i].tensor : variableGradients[name];\n if (gradient == null) {\n return;\n }\n const accumulatedGrad = this.accumulatedGrads[i].variable;\n const accumulatedUpdate = this.accumulatedUpdates[i].variable;\n tidy(() => {\n const newAccumulatedGrad = add2(mul(accumulatedGrad, this.rho), mul(square(gradient), 1 - this.rho));\n const updates = mul(div(sqrt(add2(accumulatedUpdate, this.epsilon)), sqrt(add2(accumulatedGrad, this.epsilon))), gradient);\n const newAccumulatedUpdate = add2(mul(accumulatedUpdate, this.rho), mul(square(updates), 1 - this.rho));\n accumulatedGrad.assign(newAccumulatedGrad);\n accumulatedUpdate.assign(newAccumulatedUpdate);\n const newValue = add2(mul(updates, -this.learningRate), value);\n value.assign(newValue);\n });\n });\n this.incrementIterations();\n }\n dispose() {\n if (this.accumulatedUpdates != null) {\n dispose(this.accumulatedGrads.map((v) => v.variable));\n dispose(this.accumulatedUpdates.map((v) => v.variable));\n }\n }\n async getWeights() {\n const variables = [...this.accumulatedGrads, ...this.accumulatedUpdates];\n return [await this.saveIterations()].concat(variables.map((v) => ({ name: v.originalName, tensor: v.variable })));\n }\n async setWeights(weightValues) {\n weightValues = await this.extractIterations(weightValues);\n const variableCount = weightValues.length / 2;\n const trainable = false;\n this.accumulatedGrads = weightValues.slice(0, variableCount).map((v) => ({\n originalName: v.name,\n variable: v.tensor.variable(trainable)\n }));\n this.accumulatedUpdates = weightValues.slice(variableCount, variableCount * 2).map((v) => ({\n originalName: v.name,\n variable: v.tensor.variable(trainable)\n }));\n }\n getConfig() {\n return {\n \"learningRate\": this.learningRate,\n \"rho\": this.rho,\n \"epsilon\": this.epsilon\n };\n }\n static fromConfig(cls, config) {\n return new cls(config[\"learningRate\"], config[\"rho\"], config[\"epsilon\"]);\n }\n};\nAdadeltaOptimizer.className = \"Adadelta\";\nregisterClass(AdadeltaOptimizer);\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/optimizers/adagrad_optimizer.js\nvar AdagradOptimizer = class extends Optimizer {\n constructor(learningRate, initialAccumulatorValue = 0.1) {\n super();\n this.learningRate = learningRate;\n this.initialAccumulatorValue = initialAccumulatorValue;\n this.accumulatedGrads = [];\n }\n applyGradients(variableGradients) {\n const variableNames = Array.isArray(variableGradients) ? variableGradients.map((item) => item.name) : Object.keys(variableGradients);\n variableNames.forEach((name, i) => {\n const value = ENGINE.registeredVariables[name];\n if (this.accumulatedGrads[i] == null) {\n const trainable = false;\n this.accumulatedGrads[i] = {\n originalName: `${name}/accumulator`,\n variable: tidy(() => fill(value.shape, this.initialAccumulatorValue).variable(trainable))\n };\n }\n const gradient = Array.isArray(variableGradients) ? variableGradients[i].tensor : variableGradients[name];\n if (gradient == null) {\n return;\n }\n const accumulatedGrad = this.accumulatedGrads[i].variable;\n tidy(() => {\n const newAccumulatedGrad = add2(accumulatedGrad, square(gradient));\n accumulatedGrad.assign(newAccumulatedGrad);\n const newValue = add2(mul(div(gradient, sqrt(add2(newAccumulatedGrad, ENGINE.backend.epsilon()))), -this.learningRate), value);\n value.assign(newValue);\n });\n });\n this.incrementIterations();\n }\n dispose() {\n if (this.accumulatedGrads != null) {\n dispose(this.accumulatedGrads.map((v) => v.variable));\n }\n }\n async getWeights() {\n return [await this.saveIterations()].concat(this.accumulatedGrads.map((v) => ({ name: v.originalName, tensor: v.variable })));\n }\n async setWeights(weightValues) {\n weightValues = await this.extractIterations(weightValues);\n const trainable = false;\n this.accumulatedGrads = weightValues.map((v) => ({ originalName: v.name, variable: v.tensor.variable(trainable) }));\n }\n getConfig() {\n return {\n \"learningRate\": this.learningRate,\n \"initialAccumulatorValue\": this.initialAccumulatorValue\n };\n }\n static fromConfig(cls, config) {\n return new cls(config[\"learningRate\"], config[\"initialAccumulatorValue\"]);\n }\n};\nAdagradOptimizer.className = \"Adagrad\";\nregisterClass(AdagradOptimizer);\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/optimizers/adam_optimizer.js\nvar AdamOptimizer = class extends Optimizer {\n constructor(learningRate, beta1, beta2, epsilon3 = null) {\n super();\n this.learningRate = learningRate;\n this.beta1 = beta1;\n this.beta2 = beta2;\n this.epsilon = epsilon3;\n this.accumulatedFirstMoment = [];\n this.accumulatedSecondMoment = [];\n tidy(() => {\n this.accBeta1 = scalar(beta1).variable();\n this.accBeta2 = scalar(beta2).variable();\n });\n if (epsilon3 == null) {\n this.epsilon = ENGINE.backend.epsilon();\n }\n }\n applyGradients(variableGradients) {\n const varNames = Array.isArray(variableGradients) ? variableGradients.map((v) => v.name) : Object.keys(variableGradients);\n tidy(() => {\n const oneMinusAccBeta1 = sub(1, this.accBeta1);\n const oneMinusAccBeta2 = sub(1, this.accBeta2);\n varNames.forEach((name, i) => {\n const value = ENGINE.registeredVariables[name];\n const trainable = false;\n if (this.accumulatedFirstMoment[i] == null) {\n this.accumulatedFirstMoment[i] = {\n originalName: `${name}/m`,\n variable: tidy(() => zerosLike(value).variable(trainable))\n };\n }\n if (this.accumulatedSecondMoment[i] == null) {\n this.accumulatedSecondMoment[i] = {\n originalName: `${name}/v`,\n variable: tidy(() => zerosLike(value).variable(trainable))\n };\n }\n const gradient = Array.isArray(variableGradients) ? variableGradients[i].tensor : variableGradients[name];\n if (gradient == null) {\n return;\n }\n const firstMoment = this.accumulatedFirstMoment[i].variable;\n const secondMoment = this.accumulatedSecondMoment[i].variable;\n const newFirstMoment = add2(mul(firstMoment, this.beta1), mul(gradient, 1 - this.beta1));\n const newSecondMoment = add2(mul(secondMoment, this.beta2), mul(square(gradient), 1 - this.beta2));\n const biasCorrectedFirstMoment = div(newFirstMoment, oneMinusAccBeta1);\n const biasCorrectedSecondMoment = div(newSecondMoment, oneMinusAccBeta2);\n firstMoment.assign(newFirstMoment);\n secondMoment.assign(newSecondMoment);\n const newValue = add2(mul(div(biasCorrectedFirstMoment, add2(sqrt(biasCorrectedSecondMoment), this.epsilon)), -this.learningRate), value);\n value.assign(newValue);\n });\n this.accBeta1.assign(mul(this.accBeta1, this.beta1));\n this.accBeta2.assign(mul(this.accBeta2, this.beta2));\n });\n this.incrementIterations();\n }\n dispose() {\n this.accBeta1.dispose();\n this.accBeta2.dispose();\n if (this.accumulatedFirstMoment != null) {\n dispose(this.accumulatedFirstMoment.map((v) => v.variable));\n }\n if (this.accumulatedSecondMoment != null) {\n dispose(this.accumulatedSecondMoment.map((v) => v.variable));\n }\n }\n async getWeights() {\n const variables = [...this.accumulatedFirstMoment, ...this.accumulatedSecondMoment];\n return [await this.saveIterations()].concat(variables.map((v) => ({ name: v.originalName, tensor: v.variable })));\n }\n async setWeights(weightValues) {\n weightValues = await this.extractIterations(weightValues);\n tidy(() => {\n this.accBeta1.assign(pow(this.beta1, this.iterations_ + 1));\n this.accBeta2.assign(pow(this.beta2, this.iterations_ + 1));\n });\n const variableCount = weightValues.length / 2;\n const trainable = false;\n this.accumulatedFirstMoment = weightValues.slice(0, variableCount).map((v) => ({\n originalName: v.name,\n variable: v.tensor.variable(trainable)\n }));\n this.accumulatedSecondMoment = weightValues.slice(variableCount, variableCount * 2).map((v) => ({\n originalName: v.name,\n variable: v.tensor.variable(trainable)\n }));\n }\n getConfig() {\n return {\n \"learningRate\": this.learningRate,\n \"beta1\": this.beta1,\n \"beta2\": this.beta2,\n \"epsilon\": this.epsilon\n };\n }\n static fromConfig(cls, config) {\n return new cls(config[\"learningRate\"], config[\"beta1\"], config[\"beta2\"], config[\"epsilon\"]);\n }\n};\nAdamOptimizer.className = \"Adam\";\nregisterClass(AdamOptimizer);\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/optimizers/adamax_optimizer.js\nvar AdamaxOptimizer = class extends Optimizer {\n constructor(learningRate, beta1, beta2, epsilon3 = null, decay = 0) {\n super();\n this.learningRate = learningRate;\n this.beta1 = beta1;\n this.beta2 = beta2;\n this.epsilon = epsilon3;\n this.decay = decay;\n this.accumulatedFirstMoment = [];\n this.accumulatedWeightedInfNorm = [];\n tidy(() => {\n this.iteration = scalar(0).variable();\n this.accBeta1 = scalar(beta1).variable();\n });\n if (epsilon3 == null) {\n this.epsilon = ENGINE.backend.epsilon();\n }\n }\n applyGradients(variableGradients) {\n const variableNames = Array.isArray(variableGradients) ? variableGradients.map((item) => item.name) : Object.keys(variableGradients);\n tidy(() => {\n const oneMinusAccBeta1 = sub(1, this.accBeta1);\n const lr = div(-this.learningRate, add2(mul(this.iteration, this.decay), 1));\n variableNames.forEach((name, i) => {\n const value = ENGINE.registeredVariables[name];\n const trainable = false;\n if (this.accumulatedFirstMoment[i] == null) {\n this.accumulatedFirstMoment[i] = {\n originalName: `${name}/m`,\n variable: zerosLike(value).variable(trainable)\n };\n }\n if (this.accumulatedWeightedInfNorm[i] == null) {\n this.accumulatedWeightedInfNorm[i] = {\n originalName: `${name}/v`,\n variable: zerosLike(value).variable(trainable)\n };\n }\n const gradient = Array.isArray(variableGradients) ? variableGradients[i].tensor : variableGradients[name];\n if (gradient == null) {\n return;\n }\n const firstMoment = this.accumulatedFirstMoment[i].variable;\n const weightedInfNorm = this.accumulatedWeightedInfNorm[i].variable;\n const newFirstMoment = add2(mul(firstMoment, this.beta1), mul(gradient, 1 - this.beta1));\n const ut0 = mul(weightedInfNorm, this.beta2);\n const ut1 = abs(gradient);\n const newWeightedInfNorm = maximum(ut0, ut1);\n firstMoment.assign(newFirstMoment);\n weightedInfNorm.assign(newWeightedInfNorm);\n const newValue = add2(mul(div(lr, oneMinusAccBeta1), div(newFirstMoment, add2(newWeightedInfNorm, this.epsilon))), value);\n value.assign(newValue);\n });\n this.iteration.assign(add2(this.iteration, 1));\n this.accBeta1.assign(mul(this.accBeta1, this.beta1));\n });\n this.incrementIterations();\n }\n dispose() {\n this.accBeta1.dispose();\n this.iteration.dispose();\n if (this.accumulatedFirstMoment != null) {\n dispose(this.accumulatedFirstMoment.map((v) => v.variable));\n }\n if (this.accumulatedWeightedInfNorm != null) {\n dispose(this.accumulatedWeightedInfNorm.map((v) => v.variable));\n }\n }\n async getWeights() {\n throw new Error(\"getWeights() is not implemented for Adamax yet.\");\n }\n async setWeights(weightValues) {\n throw new Error(\"setWeights() is not implemented for Adamax yet.\");\n }\n getConfig() {\n return {\n \"learningRate\": this.learningRate,\n \"beta1\": this.beta1,\n \"beta2\": this.beta2,\n \"epsilon\": this.epsilon,\n \"decay\": this.decay\n };\n }\n static fromConfig(cls, config) {\n return new cls(config[\"learningRate\"], config[\"beta1\"], config[\"beta2\"], config[\"epsilon\"], config[\"decay\"]);\n }\n};\nAdamaxOptimizer.className = \"Adamax\";\nregisterClass(AdamaxOptimizer);\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/optimizers/sgd_optimizer.js\nvar SGDOptimizer = class extends Optimizer {\n constructor(learningRate) {\n super();\n this.learningRate = learningRate;\n this.setLearningRate(learningRate);\n }\n applyGradients(variableGradients) {\n const varNames = Array.isArray(variableGradients) ? variableGradients.map((v) => v.name) : Object.keys(variableGradients);\n varNames.forEach((name, i) => {\n const gradient = Array.isArray(variableGradients) ? variableGradients[i].tensor : variableGradients[name];\n if (gradient == null) {\n return;\n }\n const value = ENGINE.registeredVariables[name];\n tidy(() => {\n const newValue = add2(mul(this.c, gradient), value);\n value.assign(newValue);\n });\n });\n this.incrementIterations();\n }\n setLearningRate(learningRate) {\n this.learningRate = learningRate;\n if (this.c != null) {\n this.c.dispose();\n }\n this.c = keep(scalar(-learningRate));\n }\n dispose() {\n this.c.dispose();\n }\n async getWeights() {\n return [await this.saveIterations()];\n }\n async setWeights(weightValues) {\n weightValues = await this.extractIterations(weightValues);\n if (weightValues.length !== 0) {\n throw new Error(\"SGD optimizer does not have settable weights.\");\n }\n }\n getConfig() {\n return { \"learningRate\": this.learningRate };\n }\n static fromConfig(cls, config) {\n return new cls(config[\"learningRate\"]);\n }\n};\nSGDOptimizer.className = \"SGD\";\nregisterClass(SGDOptimizer);\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/optimizers/momentum_optimizer.js\nvar MomentumOptimizer = class extends SGDOptimizer {\n constructor(learningRate, momentum, useNesterov = false) {\n super(learningRate);\n this.learningRate = learningRate;\n this.momentum = momentum;\n this.useNesterov = useNesterov;\n this.accumulations = [];\n this.m = scalar(this.momentum);\n }\n applyGradients(variableGradients) {\n const variableNames = Array.isArray(variableGradients) ? variableGradients.map((item) => item.name) : Object.keys(variableGradients);\n variableNames.forEach((name, i) => {\n const value = ENGINE.registeredVariables[name];\n if (this.accumulations[i] == null) {\n const trainable = false;\n this.accumulations[i] = {\n originalName: `${name}/momentum`,\n variable: tidy(() => zerosLike(value).variable(trainable))\n };\n }\n const accumulation = this.accumulations[i].variable;\n const gradient = Array.isArray(variableGradients) ? variableGradients[i].tensor : variableGradients[name];\n if (gradient == null) {\n return;\n }\n tidy(() => {\n let newValue;\n const newAccumulation = add2(mul(this.m, accumulation), gradient);\n if (this.useNesterov) {\n newValue = add2(mul(this.c, add2(gradient, mul(newAccumulation, this.m))), value);\n } else {\n newValue = add2(mul(this.c, newAccumulation), value);\n }\n accumulation.assign(newAccumulation);\n value.assign(newValue);\n });\n });\n this.incrementIterations();\n }\n dispose() {\n this.m.dispose();\n if (this.accumulations != null) {\n dispose(this.accumulations.map((v) => v.variable));\n }\n }\n setMomentum(momentum) {\n this.momentum = momentum;\n }\n async getWeights() {\n return [await this.saveIterations()].concat(this.accumulations.map((v) => ({ name: v.originalName, tensor: v.variable })));\n }\n async setWeights(weightValues) {\n weightValues = await this.extractIterations(weightValues);\n const trainable = false;\n this.accumulations = weightValues.map((v) => ({ originalName: v.name, variable: v.tensor.variable(trainable) }));\n }\n getConfig() {\n return {\n \"learningRate\": this.learningRate,\n \"momentum\": this.momentum,\n \"useNesterov\": this.useNesterov\n };\n }\n static fromConfig(cls, config) {\n return new cls(config[\"learningRate\"], config[\"momentum\"], config[\"useNesterov\"]);\n }\n};\nMomentumOptimizer.className = \"Momentum\";\nregisterClass(MomentumOptimizer);\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/optimizers/rmsprop_optimizer.js\nvar RMSPropOptimizer = class extends Optimizer {\n constructor(learningRate, decay = 0.9, momentum = 0, epsilon3 = null, centered = false) {\n super();\n this.learningRate = learningRate;\n this.decay = decay;\n this.momentum = momentum;\n this.epsilon = epsilon3;\n this.accumulatedMeanSquares = [];\n this.accumulatedMoments = [];\n this.accumulatedMeanGrads = [];\n this.centered = centered;\n if (epsilon3 == null) {\n this.epsilon = ENGINE.backend.epsilon();\n }\n if (learningRate == null) {\n throw new Error(`learningRate for RMSPropOptimizer must be defined.`);\n }\n }\n applyGradients(variableGradients) {\n const variableNames = Array.isArray(variableGradients) ? variableGradients.map((item) => item.name) : Object.keys(variableGradients);\n variableNames.forEach((name, i) => {\n const value = ENGINE.registeredVariables[name];\n const trainable = false;\n if (this.accumulatedMeanSquares[i] == null) {\n this.accumulatedMeanSquares[i] = {\n originalName: `${name}/rms`,\n variable: tidy(() => zerosLike(value).variable(trainable))\n };\n }\n if (this.accumulatedMoments[i] == null) {\n this.accumulatedMoments[i] = {\n originalName: `${name}/momentum`,\n variable: tidy(() => zerosLike(value).variable(trainable))\n };\n }\n if (this.accumulatedMeanGrads[i] == null && this.centered) {\n this.accumulatedMeanGrads[i] = {\n originalName: `${name}/mg`,\n variable: tidy(() => zerosLike(value).variable(trainable))\n };\n }\n const gradient = Array.isArray(variableGradients) ? variableGradients[i].tensor : variableGradients[name];\n if (gradient == null) {\n return;\n }\n const accumulatedMeanSquare = this.accumulatedMeanSquares[i].variable;\n const accumulatedMoments = this.accumulatedMoments[i].variable;\n tidy(() => {\n const newAccumulatedMeanSquare = add2(mul(accumulatedMeanSquare, this.decay), mul(square(gradient), 1 - this.decay));\n if (this.centered) {\n const accumulatedMeanGrad = this.accumulatedMeanGrads[i].variable;\n const newAccumulatedMeanGrad = add2(mul(accumulatedMeanGrad, this.decay), mul(gradient, 1 - this.decay));\n const gradContribution = div(mul(gradient, this.learningRate), sqrt(sub(newAccumulatedMeanSquare, add2(square(newAccumulatedMeanGrad), this.epsilon))));\n const newAccumulatedMoments = add2(mul(accumulatedMoments, this.momentum), gradContribution);\n accumulatedMeanSquare.assign(newAccumulatedMeanSquare);\n accumulatedMeanGrad.assign(newAccumulatedMeanGrad);\n accumulatedMoments.assign(newAccumulatedMoments);\n const newValue = sub(value, newAccumulatedMoments);\n value.assign(newValue);\n } else {\n const newAccumulatedMeanSquare2 = add2(mul(accumulatedMeanSquare, this.decay), mul(square(gradient), 1 - this.decay));\n const newAccumulatedMoments = add2(mul(accumulatedMoments, this.momentum), div(mul(gradient, this.learningRate), sqrt(add2(newAccumulatedMeanSquare2, this.epsilon))));\n accumulatedMeanSquare.assign(newAccumulatedMeanSquare2);\n accumulatedMoments.assign(newAccumulatedMoments);\n const newValue = sub(value, newAccumulatedMoments);\n value.assign(newValue);\n }\n });\n });\n this.incrementIterations();\n }\n dispose() {\n if (this.accumulatedMeanSquares != null) {\n dispose(this.accumulatedMeanSquares.map((v) => v.variable));\n }\n if (this.accumulatedMeanGrads != null && this.centered) {\n dispose(this.accumulatedMeanGrads.map((v) => v.variable));\n }\n if (this.accumulatedMoments != null) {\n dispose(this.accumulatedMoments.map((v) => v.variable));\n }\n }\n async getWeights() {\n const variables = [...this.accumulatedMeanSquares, ...this.accumulatedMoments];\n if (this.centered) {\n variables.push(...this.accumulatedMeanGrads);\n }\n return [await this.saveIterations()].concat(variables.map((v) => ({ name: v.originalName, tensor: v.variable })));\n }\n async setWeights(weightValues) {\n weightValues = await this.extractIterations(weightValues);\n const variableCount = this.centered ? weightValues.length / 3 : weightValues.length / 2;\n const trainable = false;\n this.accumulatedMeanSquares = weightValues.slice(0, variableCount).map((v) => ({\n originalName: v.name,\n variable: v.tensor.variable(trainable)\n }));\n this.accumulatedMoments = weightValues.slice(variableCount, variableCount * 2).map((v) => ({\n originalName: v.name,\n variable: v.tensor.variable(trainable)\n }));\n if (this.centered) {\n this.accumulatedMeanGrads = weightValues.slice(variableCount * 2, variableCount * 3).map((v) => ({\n originalName: v.name,\n variable: v.tensor.variable(trainable)\n }));\n }\n }\n getConfig() {\n return {\n \"learningRate\": this.learningRate,\n \"decay\": this.decay,\n \"momentum\": this.momentum,\n \"epsilon\": this.epsilon,\n \"centered\": this.centered\n };\n }\n static fromConfig(cls, config) {\n return new cls(config[\"learningRate\"], config[\"decay\"], config[\"momentum\"], config[\"epsilon\"], config[\"centered\"]);\n }\n};\nRMSPropOptimizer.className = \"RMSProp\";\nregisterClass(RMSPropOptimizer);\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/optimizers/optimizer_constructors.js\nvar OptimizerConstructors = class {\n static sgd(learningRate) {\n return new SGDOptimizer(learningRate);\n }\n static momentum(learningRate, momentum, useNesterov = false) {\n return new MomentumOptimizer(learningRate, momentum, useNesterov);\n }\n static rmsprop(learningRate, decay = 0.9, momentum = 0, epsilon3 = null, centered = false) {\n return new RMSPropOptimizer(learningRate, decay, momentum, epsilon3, centered);\n }\n static adam(learningRate = 1e-3, beta1 = 0.9, beta2 = 0.999, epsilon3 = null) {\n return new AdamOptimizer(learningRate, beta1, beta2, epsilon3);\n }\n static adadelta(learningRate = 1e-3, rho = 0.95, epsilon3 = null) {\n return new AdadeltaOptimizer(learningRate, rho, epsilon3);\n }\n static adamax(learningRate = 2e-3, beta1 = 0.9, beta2 = 0.999, epsilon3 = null, decay = 0) {\n return new AdamaxOptimizer(learningRate, beta1, beta2, epsilon3, decay);\n }\n static adagrad(learningRate, initialAccumulatorValue = 0.1) {\n return new AdagradOptimizer(learningRate, initialAccumulatorValue);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/train.js\nvar train = {\n sgd: OptimizerConstructors.sgd,\n momentum: OptimizerConstructors.momentum,\n adadelta: OptimizerConstructors.adadelta,\n adagrad: OptimizerConstructors.adagrad,\n rmsprop: OptimizerConstructors.rmsprop,\n adamax: OptimizerConstructors.adamax,\n adam: OptimizerConstructors.adam\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/browser_util.js\nvar delayCallback = (() => {\n if (typeof requestAnimationFrame !== \"undefined\") {\n return requestAnimationFrame;\n } else if (typeof setImmediate !== \"undefined\") {\n return setImmediate;\n }\n return (f) => f();\n})();\nfunction nextFrame() {\n return new Promise((resolve) => delayCallback(() => resolve()));\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/backends/backend_util.js\nvar backend_util_exports = {};\n__export(backend_util_exports, {\n ERF_A1: () => ERF_A1,\n ERF_A2: () => ERF_A2,\n ERF_A3: () => ERF_A3,\n ERF_A4: () => ERF_A4,\n ERF_A5: () => ERF_A5,\n ERF_P: () => ERF_P,\n PARALLELIZE_THRESHOLD: () => PARALLELIZE_THRESHOLD,\n RowPartitionType: () => RowPartitionType,\n SELU_SCALE: () => SELU_SCALE,\n SELU_SCALEALPHA: () => SELU_SCALEALPHA,\n applyActivation: () => applyActivation,\n assertAndGetBroadcastShape: () => assertAndGetBroadcastShape,\n assertAxesAreInnerMostDims: () => assertAxesAreInnerMostDims,\n assertParamsConsistent: () => assertParamsConsistent,\n assignToTypedArray: () => assignToTypedArray,\n axesAreInnerMostDims: () => axesAreInnerMostDims,\n calculateShapes: () => calculateShapes,\n checkEinsumDimSizes: () => checkEinsumDimSizes,\n checkPadOnDimRoundingMode: () => checkPadOnDimRoundingMode,\n combineLocations: () => combineLocations,\n combineRaggedTensorToTensorShapes: () => combineRaggedTensorToTensorShapes,\n complexWithEvenIndex: () => complexWithEvenIndex,\n complexWithOddIndex: () => complexWithOddIndex,\n computeConv2DInfo: () => computeConv2DInfo,\n computeConv3DInfo: () => computeConv3DInfo,\n computeDefaultPad: () => computeDefaultPad,\n computeDilation2DInfo: () => computeDilation2DInfo,\n computeOptimalWindowSize: () => computeOptimalWindowSize,\n computeOutAndReduceShapes: () => computeOutAndReduceShapes,\n computeOutShape: () => computeOutShape2,\n computePool2DInfo: () => computePool2DInfo,\n computePool3DInfo: () => computePool3DInfo,\n convertConv2DDataFormat: () => convertConv2DDataFormat,\n decodeEinsumEquation: () => decodeEinsumEquation,\n eitherStridesOrDilationsAreOne: () => eitherStridesOrDilationsAreOne,\n expandShapeToKeepDim: () => expandShapeToKeepDim,\n exponent: () => exponent,\n exponents: () => exponents,\n fromStringArrayToUint8: () => fromStringArrayToUint8,\n fromUint8ToStringArray: () => fromUint8ToStringArray,\n getAxesPermutation: () => getAxesPermutation,\n getBroadcastDims: () => getBroadcastDims,\n getComplexWithIndex: () => getComplexWithIndex,\n getEinsumComputePath: () => getEinsumComputePath,\n getEinsumPermutation: () => getEinsumPermutation,\n getFusedBiasGradient: () => getFusedBiasGradient,\n getFusedDyActivation: () => getFusedDyActivation,\n getImageCenter: () => getImageCenter,\n getInnerMostAxes: () => getInnerMostAxes,\n getPermuted: () => getPermuted,\n getRaggedRank: () => getRaggedRank,\n getReductionAxes: () => getReductionAxes,\n getReshaped: () => getReshaped,\n getReshapedPermuted: () => getReshapedPermuted,\n getRowPartitionTypesHelper: () => getRowPartitionTypesHelper,\n getSliceBeginCoords: () => getSliceBeginCoords,\n getSliceSize: () => getSliceSize,\n getSparseFillEmptyRowsIndicesDenseShapeMismatch: () => getSparseFillEmptyRowsIndicesDenseShapeMismatch,\n getSparseFillEmptyRowsNegativeIndexErrorMessage: () => getSparseFillEmptyRowsNegativeIndexErrorMessage,\n getSparseFillEmptyRowsOutOfRangeIndexErrorMessage: () => getSparseFillEmptyRowsOutOfRangeIndexErrorMessage,\n getSparseReshapeEmptyTensorZeroOutputDimErrorMessage: () => getSparseReshapeEmptyTensorZeroOutputDimErrorMessage,\n getSparseReshapeInputOutputMismatchErrorMessage: () => getSparseReshapeInputOutputMismatchErrorMessage,\n getSparseReshapeInputOutputMultipleErrorMessage: () => getSparseReshapeInputOutputMultipleErrorMessage,\n getSparseReshapeMultipleNegativeOneOutputDimErrorMessage: () => getSparseReshapeMultipleNegativeOneOutputDimErrorMessage,\n getSparseReshapeNegativeOutputDimErrorMessage: () => getSparseReshapeNegativeOutputDimErrorMessage,\n getSparseSegmentReductionIndicesOutOfRangeErrorMessage: () => getSparseSegmentReductionIndicesOutOfRangeErrorMessage,\n getSparseSegmentReductionNegativeSegmentIdsErrorMessage: () => getSparseSegmentReductionNegativeSegmentIdsErrorMessage,\n getSparseSegmentReductionNonIncreasingSegmentIdsErrorMessage: () => getSparseSegmentReductionNonIncreasingSegmentIdsErrorMessage,\n getSparseSegmentReductionSegmentIdOutOfRangeErrorMessage: () => getSparseSegmentReductionSegmentIdOutOfRangeErrorMessage,\n getUndoAxesPermutation: () => getUndoAxesPermutation,\n isIdentityPermutation: () => isIdentityPermutation,\n log: () => log,\n mergeRealAndImagArrays: () => mergeRealAndImagArrays,\n prepareAndValidate: () => prepareAndValidate,\n prepareSplitSize: () => prepareSplitSize,\n segment_util: () => segment_util_exports,\n shouldFuse: () => shouldFuse,\n slice_util: () => slice_util_exports,\n splitRealAndImagArrays: () => splitRealAndImagArrays,\n tupleValuesAreOne: () => tupleValuesAreOne,\n upcastType: () => upcastType,\n validateDefaultValueShape: () => validateDefaultValueShape,\n validateInput: () => validateInput,\n validateUpdateShape: () => validateUpdateShape,\n warn: () => warn\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/concat_util.js\nfunction assertParamsConsistent(shapes, axis) {\n const rank = shapes[0].length;\n shapes.forEach((shape, i) => {\n assert(shape.length === rank, () => `Error in concat${rank}D: rank of tensors[${i}] must be the same as the rank of the rest (${rank})`);\n });\n assert(axis >= 0 && axis < rank, () => `Error in concat${rank}D: axis must be between 0 and ${rank - 1}.`);\n const firstShape = shapes[0];\n shapes.forEach((shape, i) => {\n for (let r = 0; r < rank; r++) {\n assert(r === axis || shape[r] === firstShape[r], () => `Error in concat${rank}D: Shape of tensors[${i}] (${shape}) does not match the shape of the rest (${firstShape}) along the non-concatenated axis ${i}.`);\n }\n });\n}\nfunction computeOutShape2(shapes, axis) {\n const outputShape = shapes[0].slice();\n for (let i = 1; i < shapes.length; i++) {\n outputShape[axis] += shapes[i][axis];\n }\n return outputShape;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/ragged_to_dense_util.js\nvar RowPartitionType;\n(function(RowPartitionType3) {\n RowPartitionType3[RowPartitionType3[\"FIRST_DIM_SIZE\"] = 0] = \"FIRST_DIM_SIZE\";\n RowPartitionType3[RowPartitionType3[\"VALUE_ROWIDS\"] = 1] = \"VALUE_ROWIDS\";\n RowPartitionType3[RowPartitionType3[\"ROW_LENGTHS\"] = 2] = \"ROW_LENGTHS\";\n RowPartitionType3[RowPartitionType3[\"ROW_SPLITS\"] = 3] = \"ROW_SPLITS\";\n RowPartitionType3[RowPartitionType3[\"ROW_LIMITS\"] = 4] = \"ROW_LIMITS\";\n RowPartitionType3[RowPartitionType3[\"ROW_STARTS\"] = 5] = \"ROW_STARTS\";\n})(RowPartitionType || (RowPartitionType = {}));\nfunction combineRaggedTensorToTensorShapes(raggedRank, shape, valueShape) {\n let outputShape = new Array();\n if (valueShape == null && shape == null) {\n return outputShape;\n }\n if (shape == null) {\n while (outputShape.length < raggedRank + valueShape.length) {\n outputShape.push(-1);\n }\n } else {\n outputShape = shape.slice();\n }\n if (valueShape == null) {\n return outputShape;\n }\n if (raggedRank + valueShape.length !== outputShape.length) {\n throw new Error(`rt input.shape and shape=${shape} are incompatible: rt input.rank = ${raggedRank + valueShape.length}, but shape.rank = ${outputShape.length}`);\n }\n for (let i = 1; i < valueShape.length; ++i) {\n const valueDim = valueShape[i];\n const outputShapeDimIndex = outputShape[outputShape.length - valueShape.length + i];\n const outputShapeDim = outputShape[outputShapeDimIndex];\n if (valueDim >= 0) {\n if (outputShapeDim >= 0) {\n if (outputShapeDim !== valueDim) {\n throw new Error(`rt input.shape and shape=${shape} are incompatible: rt input.shape[${i + raggedRank}] = ${valueDim} but shape[${i + raggedRank}] = ${outputShapeDim}`);\n }\n } else {\n outputShape[outputShapeDimIndex] = valueDim;\n }\n }\n }\n return outputShape;\n}\nfunction getRowPartitionTypesHelper(rowPartitionTypeStrings) {\n const stringToType = {\n \"FIRST_DIM_SIZE\": RowPartitionType.FIRST_DIM_SIZE,\n \"VALUE_ROWIDS\": RowPartitionType.VALUE_ROWIDS,\n \"ROW_LENGTHS\": RowPartitionType.ROW_LENGTHS,\n \"ROW_SPLITS\": RowPartitionType.ROW_SPLITS,\n \"ROW_LIMITS\": RowPartitionType.ROW_LIMITS,\n \"ROW_STARTS\": RowPartitionType.ROW_STARTS\n };\n const result = [];\n for (const typeStr of rowPartitionTypeStrings) {\n if (typeStr in stringToType) {\n result.push(stringToType[typeStr]);\n } else {\n break;\n }\n }\n return result;\n}\nfunction getRaggedRank(rowPartitionTypes) {\n if (rowPartitionTypes.length === 0) {\n return 0;\n }\n if (rowPartitionTypes[0] === RowPartitionType.FIRST_DIM_SIZE) {\n return rowPartitionTypes.length - 1;\n }\n return rowPartitionTypes.length;\n}\nfunction validateDefaultValueShape(defaultValueShape, valueShape) {\n if (defaultValueShape == null || valueShape == null) {\n return;\n }\n const defaultNDims = defaultValueShape.length;\n const valuesNDims = valueShape.length;\n if (defaultNDims >= valuesNDims) {\n throw new Error(`defaultValue.shape=${defaultValueShape} and ragged tensor flatValues.shape=${valueShape}, are incompatible: defaultValue.rank = ${defaultNDims} must be less than ragged tensor input flatValues.rank = ${valuesNDims})`);\n }\n for (let i = 0; i < Math.min(defaultNDims, valuesNDims - 1); ++i) {\n const defaultDim = defaultValueShape[i];\n const valueDim = valueShape[i + 1];\n if (defaultDim >= 0 && valueDim >= 0 && defaultDim !== 1 && defaultDim !== valueDim) {\n throw new Error(`defaultValue.shape=${defaultValueShape}, and ragged tensor input flatValues.shape=${valueShape} are incompatible: defaultValue.shape[${i - defaultValueShape.length}] = ${defaultDim} but ragged tensor input.flatValues.shape[${i - defaultValueShape.length}] = ${valueDim}`);\n }\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/reduce_util.js\nvar PARALLELIZE_THRESHOLD = 30;\nfunction computeOptimalWindowSize(inSize) {\n if (inSize <= PARALLELIZE_THRESHOLD) {\n return inSize;\n }\n return nearestDivisor(inSize, Math.floor(Math.sqrt(inSize)));\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/rotate_util.js\nfunction getImageCenter(center, imageHeight, imageWidth) {\n const centerX = imageWidth * (typeof center === \"number\" ? center : center[0]);\n const centerY = imageHeight * (typeof center === \"number\" ? center : center[1]);\n return [centerX, centerY];\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/array_ops_util.js\nfunction getReshaped(inputShape, blockShape, prod6, batchToSpace = true) {\n let reshaped = [];\n if (batchToSpace) {\n reshaped = reshaped.concat(blockShape.slice(0));\n reshaped.push(inputShape[0] / prod6);\n reshaped = reshaped.concat(inputShape.slice(1));\n } else {\n reshaped = reshaped.concat(inputShape[0]);\n const spatialLength = blockShape.length;\n for (let i = 0; i < spatialLength; ++i) {\n reshaped = reshaped.concat([inputShape[i + 1] / blockShape[i], blockShape[i]]);\n }\n reshaped = reshaped.concat(inputShape.slice(spatialLength + 1));\n }\n return reshaped;\n}\nfunction getPermuted(reshapedRank, blockShapeRank, batchToSpace = true) {\n const permuted = [];\n if (batchToSpace) {\n permuted.push(blockShapeRank);\n for (let i = blockShapeRank + 1; i < reshapedRank; ++i) {\n if (i <= 2 * blockShapeRank) {\n permuted.push(i);\n permuted.push(i - (blockShapeRank + 1));\n } else {\n permuted.push(i);\n }\n }\n } else {\n const permutedBeforeBatch = [];\n const permutedAfterBatch = [];\n for (let i = 1; i < reshapedRank; ++i) {\n if (i >= blockShapeRank * 2 + 1 || i % 2 === 1) {\n permutedAfterBatch.push(i);\n } else {\n permutedBeforeBatch.push(i);\n }\n }\n permuted.push(...permutedBeforeBatch);\n permuted.push(0);\n permuted.push(...permutedAfterBatch);\n }\n return permuted;\n}\nfunction getReshapedPermuted(inputShape, blockShape, prod6, batchToSpace = true) {\n const reshapedPermuted = [];\n if (batchToSpace) {\n reshapedPermuted.push(inputShape[0] / prod6);\n } else {\n reshapedPermuted.push(inputShape[0] * prod6);\n }\n for (let i = 1; i < inputShape.length; ++i) {\n if (i <= blockShape.length) {\n if (batchToSpace) {\n reshapedPermuted.push(blockShape[i - 1] * inputShape[i]);\n } else {\n reshapedPermuted.push(inputShape[i] / blockShape[i - 1]);\n }\n } else {\n reshapedPermuted.push(inputShape[i]);\n }\n }\n return reshapedPermuted;\n}\nfunction getSliceBeginCoords(crops, blockShape) {\n const sliceBeginCoords = [0];\n for (let i = 0; i < blockShape; ++i) {\n sliceBeginCoords.push(crops[i][0]);\n }\n return sliceBeginCoords;\n}\nfunction getSliceSize(uncroppedShape, crops, blockShape) {\n const sliceSize = uncroppedShape.slice(0, 1);\n for (let i = 0; i < blockShape; ++i) {\n sliceSize.push(uncroppedShape[i + 1] - crops[i][0] - crops[i][1]);\n }\n return sliceSize;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/selu_util.js\nvar SELU_SCALEALPHA = 1.7580993408473768;\nvar SELU_SCALE = 1.0507009873554805;\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/erf_util.js\nvar ERF_P = 0.3275911;\nvar ERF_A1 = 0.254829592;\nvar ERF_A2 = -0.284496736;\nvar ERF_A3 = 1.421413741;\nvar ERF_A4 = -1.453152027;\nvar ERF_A5 = 1.061405429;\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/backends/complex_util.js\nfunction mergeRealAndImagArrays(real5, imag5) {\n if (real5.length !== imag5.length) {\n throw new Error(`Cannot merge real and imag arrays of different lengths. real:${real5.length}, imag: ${imag5.length}.`);\n }\n const result = new Float32Array(real5.length * 2);\n for (let i = 0; i < result.length; i += 2) {\n result[i] = real5[i / 2];\n result[i + 1] = imag5[i / 2];\n }\n return result;\n}\nfunction splitRealAndImagArrays(complex5) {\n const real5 = new Float32Array(complex5.length / 2);\n const imag5 = new Float32Array(complex5.length / 2);\n for (let i = 0; i < complex5.length; i += 2) {\n real5[i / 2] = complex5[i];\n imag5[i / 2] = complex5[i + 1];\n }\n return { real: real5, imag: imag5 };\n}\nfunction complexWithEvenIndex(complex5) {\n const len = Math.ceil(complex5.length / 4);\n const real5 = new Float32Array(len);\n const imag5 = new Float32Array(len);\n for (let i = 0; i < complex5.length; i += 4) {\n real5[Math.floor(i / 4)] = complex5[i];\n imag5[Math.floor(i / 4)] = complex5[i + 1];\n }\n return { real: real5, imag: imag5 };\n}\nfunction complexWithOddIndex(complex5) {\n const len = Math.floor(complex5.length / 4);\n const real5 = new Float32Array(len);\n const imag5 = new Float32Array(len);\n for (let i = 2; i < complex5.length; i += 4) {\n real5[Math.floor(i / 4)] = complex5[i];\n imag5[Math.floor(i / 4)] = complex5[i + 1];\n }\n return { real: real5, imag: imag5 };\n}\nfunction getComplexWithIndex(complex5, index) {\n const real5 = complex5[index * 2];\n const imag5 = complex5[index * 2 + 1];\n return { real: real5, imag: imag5 };\n}\nfunction assignToTypedArray(data, real5, imag5, index) {\n data[index * 2] = real5;\n data[index * 2 + 1] = imag5;\n}\nfunction exponents(n, inverse) {\n const real5 = new Float32Array(n / 2);\n const imag5 = new Float32Array(n / 2);\n for (let i = 0; i < Math.ceil(n / 2); i++) {\n const x = (inverse ? 2 : -2) * Math.PI * (i / n);\n real5[i] = Math.cos(x);\n imag5[i] = Math.sin(x);\n }\n return { real: real5, imag: imag5 };\n}\nfunction exponent(k, n, inverse) {\n const x = (inverse ? 2 : -2) * Math.PI * (k / n);\n const real5 = Math.cos(x);\n const imag5 = Math.sin(x);\n return { real: real5, imag: imag5 };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/backends/einsum_util.js\nvar ARROW = \"->\";\nvar ARROW_REGEX = /->/g;\nvar COMMA = \",\";\nvar ELLIPSIS = \"...\";\nfunction decodeEinsumEquation(equation, numTensors) {\n equation = equation.replace(/\\s/g, \"\");\n const numArrows = (equation.length - equation.replace(ARROW_REGEX, \"\").length) / ARROW.length;\n if (numArrows < 1) {\n throw new Error(\"Equations without an arrow are not supported.\");\n } else if (numArrows > 1) {\n throw new Error(`Equation must contain exactly one arrow (\"${ARROW}\").`);\n }\n const [inputString, outputString] = equation.split(ARROW);\n assert(inputString.indexOf(ELLIPSIS) === -1, () => `The ellipsis notation (\"${ELLIPSIS}\") is not supported yet.`);\n const inputTerms = inputString.split(COMMA);\n const numInputs = inputTerms.length;\n if (numTensors !== numInputs) {\n throw new Error(`Expected ${numInputs} input tensors, received ${numTensors}`);\n }\n if (numInputs > 2) {\n throw new Error(\"Support for more than 2 input tensors is not implemented yet.\");\n }\n const allDims = [];\n for (let i = 0; i < outputString.length; ++i) {\n const dimName = outputString[i];\n if (!inputTerms.some((inputTerm) => inputTerm.indexOf(dimName) !== -1)) {\n throw new Error(`Output subscripts contain the label ${dimName} not present in the input subscripts.`);\n }\n if (allDims.indexOf(dimName) === -1) {\n allDims.push(dimName);\n }\n }\n for (let i = 0; i < inputString.length; ++i) {\n const dimName = inputString[i];\n if (allDims.indexOf(dimName) === -1 && dimName !== COMMA) {\n allDims.push(dimName);\n }\n }\n const idDims = new Array(inputTerms.length);\n for (let i = 0; i < numInputs; ++i) {\n if (new Set(inputTerms[i].split(\"\")).size !== inputTerms[i].length) {\n throw new Error(`Found duplicate axes in input component ${inputTerms[i]}. Support for duplicate axes in input is not implemented yet.`);\n }\n idDims[i] = [];\n for (let j = 0; j < inputTerms[i].length; ++j) {\n idDims[i].push(allDims.indexOf(inputTerms[i][j]));\n }\n }\n const numDims = allDims.length;\n const numOutDims = outputString.length;\n const summedDims = [];\n for (let i = numOutDims; i < numDims; ++i) {\n summedDims.push(i);\n }\n return { allDims, summedDims, idDims };\n}\nfunction getEinsumPermutation(nDims, idDims) {\n let permutationIndices = new Array(nDims);\n permutationIndices.fill(-1);\n for (let i = 0; i < idDims.length; ++i) {\n permutationIndices[idDims[i]] = i;\n }\n const expandDims7 = [];\n for (let i = 0; i < nDims; ++i) {\n if (permutationIndices[i] === -1) {\n expandDims7.push(i);\n }\n }\n permutationIndices = permutationIndices.filter((d) => d !== -1);\n return { permutationIndices, expandDims: expandDims7 };\n}\nfunction checkEinsumDimSizes(nDims, idDims, tensors) {\n const dimSizes = new Array(nDims);\n for (let i = 0; i < tensors.length; ++i) {\n const shape = tensors[i].shape;\n for (let j = 0; j < idDims[i].length; ++j) {\n if (dimSizes[idDims[i][j]] === void 0) {\n dimSizes[idDims[i][j]] = shape[j];\n } else {\n assert(dimSizes[idDims[i][j]] === shape[j], () => `Expected dimension ${dimSizes[idDims[i][j]]} at axis ${j} of input shaped ${JSON.stringify(shape)}, but got dimension ${shape[j]}`);\n }\n }\n }\n}\nfunction getEinsumComputePath(summedDims, idDims) {\n const path = summedDims;\n const steps = [];\n let nSteps = 0;\n if (summedDims.length === 0) {\n path.push(-1);\n }\n nSteps = summedDims.length + 1;\n for (let i = 0; i < nSteps; ++i) {\n steps.push([]);\n }\n const computedTermIndices = [];\n for (let i = 0; i < path.length; ++i) {\n const summedDim = path[i];\n const termIndices = findTermsWithDim(idDims, summedDim);\n for (const termIndex of termIndices) {\n if (computedTermIndices.indexOf(termIndex) === -1) {\n steps[i].push(termIndex);\n computedTermIndices.push(termIndex);\n }\n }\n }\n return { path, steps };\n}\nfunction isIdentityPermutation(perm) {\n return perm.every((dim, index) => dim === index);\n}\nfunction findTermsWithDim(idDims, dim) {\n const termIndices = [];\n for (let i = 0; i < idDims.length; ++i) {\n if (idDims[i].length === 0 || idDims[i].indexOf(dim) !== -1 || dim === -1) {\n termIndices.push(i);\n }\n }\n return termIndices;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/split_util.js\nfunction prepareSplitSize(x, numOrSizeSplits, axis = 0) {\n let splitSizes = [];\n if (typeof numOrSizeSplits === \"number\") {\n assert(x.shape[axis] % numOrSizeSplits === 0, () => \"Number of splits must evenly divide the axis.\");\n splitSizes = new Array(numOrSizeSplits).fill(x.shape[axis] / numOrSizeSplits);\n } else {\n const numOfNegs = numOrSizeSplits.reduce((count2, value) => {\n if (value === -1) {\n count2 += 1;\n }\n return count2;\n }, 0);\n assert(numOfNegs <= 1, () => \"There should be only one negative value in split array.\");\n const negIndex = numOrSizeSplits.indexOf(-1);\n if (negIndex !== -1) {\n const total = numOrSizeSplits.reduce((a, b) => b > 0 ? a + b : a);\n numOrSizeSplits[negIndex] = x.shape[axis] - total;\n }\n assert(x.shape[axis] === numOrSizeSplits.reduce((a, b) => a + b), () => \"The sum of sizes must match the size of the axis dimension.\");\n splitSizes = numOrSizeSplits;\n }\n return splitSizes;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/sparse/sparse_fill_empty_rows_util.js\nfunction getSparseFillEmptyRowsIndicesDenseShapeMismatch(indicesLength) {\n return `Received SparseTensor with denseShape[0] = 0 but\n indices.shape[0] = ${indicesLength}`;\n}\nfunction getSparseFillEmptyRowsNegativeIndexErrorMessage(index, value) {\n return `indices(${index}, 0) is invalid: ${value} < 0`;\n}\nfunction getSparseFillEmptyRowsOutOfRangeIndexErrorMessage(index, value, limit) {\n return `indices(${index}, 0) is invalid: ${value} >= ${limit}`;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/sparse/sparse_reshape_util.js\nfunction getSparseReshapeMultipleNegativeOneOutputDimErrorMessage(dim1, dim2) {\n return `only one output dimension may be -1, not both ${dim1} and ${dim2}`;\n}\nfunction getSparseReshapeNegativeOutputDimErrorMessage(dim, value) {\n return `size ${dim} must be non-negative, not ${value}`;\n}\nfunction getSparseReshapeEmptyTensorZeroOutputDimErrorMessage() {\n return \"reshape cannot infer the missing input size for an empty tensor unless all specified input sizes are non-zero\";\n}\nfunction getSparseReshapeInputOutputMultipleErrorMessage(inputShape, outputShape) {\n const inputSize = sizeFromShape(inputShape);\n const outputSize = sizeFromShape(outputShape);\n return `Input to reshape is a SparseTensor with ${inputSize}\n dense values, but the requested shape requires a multiple of ${outputSize}. inputShape=${inputShape} outputShape= ${outputShape}`;\n}\nfunction getSparseReshapeInputOutputMismatchErrorMessage(inputShape, outputShape) {\n const inputSize = sizeFromShape(inputShape);\n const outputSize = sizeFromShape(outputShape);\n return `Input to reshape is a tensor with ${inputSize} dense values, but the requested shape has ${outputSize}. inputShape=${inputShape} outputShape=${outputShape}`;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/sparse/sparse_segment_reduction_util.js\nfunction getSparseSegmentReductionNegativeSegmentIdsErrorMessage() {\n return `segment ids must be >= 0`;\n}\nfunction getSparseSegmentReductionNonIncreasingSegmentIdsErrorMessage() {\n return `segment ids are not increasing`;\n}\nfunction getSparseSegmentReductionSegmentIdOutOfRangeErrorMessage(segmentId, outputRows) {\n return `Segment id ${segmentId} out of range [0, ${outputRows}), possibly because segmentIds input is not sorted.`;\n}\nfunction getSparseSegmentReductionIndicesOutOfRangeErrorMessage(index, indexValue, inputRows) {\n return `Bad: indices[${index}] == ${indexValue} out of range [0, ${inputRows})`;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/segment_util.js\nvar segment_util_exports = {};\n__export(segment_util_exports, {\n collectGatherOpShapeInfo: () => collectGatherOpShapeInfo,\n computeOutShape: () => computeOutShape3,\n segOpComputeOptimalWindowSize: () => segOpComputeOptimalWindowSize\n});\nfunction segOpComputeOptimalWindowSize(inSize, numSegments) {\n let done = false;\n let res;\n if (inSize <= PARALLELIZE_THRESHOLD) {\n res = inSize;\n done = true;\n } else {\n res = nearestDivisor(inSize, Math.floor(Math.sqrt(inSize)));\n }\n while (!done) {\n if (res > numSegments || res === inSize) {\n done = true;\n } else {\n res = nearestDivisor(inSize, res + 1);\n }\n }\n return res;\n}\nfunction computeOutShape3(aShape, axis, numSegments) {\n const outShape = [];\n const rank = aShape.length;\n for (let dim = 0; dim < rank; dim++) {\n if (dim !== axis) {\n outShape.push(aShape[dim]);\n } else {\n outShape.push(numSegments);\n }\n }\n return outShape;\n}\nfunction collectGatherOpShapeInfo(x, indices, axis, batchDims) {\n const indicesRank = indices.shape.length;\n const xRank = x.shape.length;\n if (batchDims !== 0) {\n if (batchDims < -indicesRank || batchDims > indicesRank) {\n throw new Error(`Expect batchDims in the range of [-${indicesRank}, ${indicesRank}], but got ${batchDims}`);\n }\n }\n if (batchDims < 0) {\n batchDims += indicesRank;\n }\n if (batchDims > xRank) {\n throw new Error(`batchDims (${batchDims}) must be less than rank(x) (\n ${xRank}).`);\n }\n if (axis < batchDims) {\n throw new Error(`batchDims (${batchDims}) must be less than or equal to axis (${axis}).`);\n }\n for (let i = 0; i < batchDims; ++i) {\n if (x.shape[i] !== indices.shape[i]) {\n throw new Error(`x.shape[${i}]: ${x.shape[i]} should be equal to indices.shape[${i}]: ${indices.shape[i]}.`);\n }\n }\n const dimSize = x.shape[axis];\n const outputShape = [];\n let batchSize = 1;\n let outerSize = 1;\n let sliceSize = 1;\n for (let i = 0; i < batchDims; ++i) {\n outputShape.push(x.shape[i]);\n batchSize *= x.shape[i];\n }\n for (let i = batchDims; i < axis; i++) {\n outputShape.push(x.shape[i]);\n outerSize *= x.shape[i];\n }\n for (let i = batchDims; i < indicesRank; i++) {\n outputShape.push(indices.shape[i]);\n }\n for (let i = axis + 1; i < xRank; i++) {\n outputShape.push(x.shape[i]);\n sliceSize *= x.shape[i];\n }\n return { batchSize, sliceSize, outerSize, dimSize, outputShape };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/backends/backend_util.js\nfunction fromUint8ToStringArray(vals) {\n try {\n return vals.map((val) => decodeString(val));\n } catch (err) {\n throw new Error(`Failed to decode encoded string bytes into utf-8, error: ${err}`);\n }\n}\nfunction fromStringArrayToUint8(strings) {\n return strings.map((s) => encodeString(s));\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/backends/kernel_impls.js\nvar kernel_impls_exports = {};\n__export(kernel_impls_exports, {\n nonMaxSuppressionV3Impl: () => nonMaxSuppressionV3Impl,\n nonMaxSuppressionV4Impl: () => nonMaxSuppressionV4Impl,\n nonMaxSuppressionV5Impl: () => nonMaxSuppressionV5Impl,\n whereImpl: () => whereImpl\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Abs_grad.js\nvar absGradConfig = {\n kernelName: Abs,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return { x: () => mul(dy, step(cast(x, \"float32\"), -1)) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Acos_grad.js\nvar acosGradConfig = {\n kernelName: Acos,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return {\n x: () => {\n const a = square(cast(x, \"float32\"));\n const b = sqrt(sub(scalar(1), a));\n return neg(div(dy, b));\n }\n };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Acosh_grad.js\nvar acoshGradConfig = {\n kernelName: Acosh,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return {\n x: () => {\n const a = sqrt(sub(square(cast(x, \"float32\")), 1));\n return div(dy, a);\n }\n };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Add_grad.js\nvar addGradConfig = {\n kernelName: Add,\n inputsToSave: [\"a\", \"b\"],\n gradFunc: (dy, saved) => {\n const [a, b] = saved;\n const outShape = assertAndGetBroadcastShape(a.shape, b.shape);\n const derA = () => {\n let res = dy;\n const reduceAxes = getReductionAxes(a.shape, outShape);\n if (reduceAxes.length > 0) {\n res = sum2(res, reduceAxes);\n }\n return reshape(res, a.shape);\n };\n const derB = () => {\n let res = dy;\n const reduceAxes = getReductionAxes(b.shape, outShape);\n if (reduceAxes.length > 0) {\n res = sum2(res, reduceAxes);\n }\n return reshape(res, b.shape);\n };\n return { a: derA, b: derB };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/AddN_grad.js\nvar addNGradConfig = {\n kernelName: AddN,\n saveAllInputs: true,\n gradFunc: (dy, saved) => {\n const ders = {};\n saved.forEach((_, i) => {\n ders[i] = () => dy.clone();\n });\n return ders;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/ArgMax_grad.js\nvar argMaxGradConfig = {\n kernelName: ArgMax,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return { x: () => zerosLike(x) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/ArgMin_grad.js\nvar argMinGradConfig = {\n kernelName: ArgMin,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return { x: () => zerosLike(x) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Asin_grad.js\nvar asinGradConfig = {\n kernelName: Asin,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return { x: () => div(dy, sqrt(sub(scalar(1), square(cast(x, \"float32\"))))) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Asinh_grad.js\nvar asinhGradConfig = {\n kernelName: Asinh,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return {\n x: () => {\n const a = sqrt(add2(scalar(1), square(cast(x, \"float32\"))));\n return div(dy, a);\n }\n };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Atan2_grad.js\nvar atan2GradConfig = {\n kernelName: Atan2,\n inputsToSave: [\"a\", \"b\"],\n gradFunc: (dy, saved) => {\n const [a, b] = saved;\n const outShape = assertAndGetBroadcastShape(a.shape, b.shape);\n const derA = () => {\n const d = add2(square(a), square(b));\n let res = mul(dy, div(b, d));\n const reduceAxes = getReductionAxes(a.shape, outShape);\n if (reduceAxes.length > 0) {\n res = sum2(res, reduceAxes);\n }\n return reshape(res, a.shape);\n };\n const derB = () => {\n const d = add2(square(a), square(b));\n let res = neg(mul(dy, div(a, d)));\n const reduceAxes = getReductionAxes(b.shape, outShape);\n if (reduceAxes.length > 0) {\n res = sum2(res, reduceAxes);\n }\n return reshape(res, b.shape);\n };\n return { a: derA, b: derB };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Atan_grad.js\nvar atanGradConfig = {\n kernelName: Atan,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return { x: () => div(dy, add2(square(cast(x, \"float32\")), 1)) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Atanh_grad.js\nvar atanhGradConfig = {\n kernelName: Atanh,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return { x: () => div(dy, sub(scalar(1), square(cast(x, \"float32\")))) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/avg_pool_3d_grad.js\nfunction avgPool3dGrad_(dy, input2, filterSize, strides, pad3, dimRoundingMode) {\n const $dy = convertToTensor(dy, \"dy\", \"avgPool3dGrad\");\n const $input = convertToTensor(input2, \"input\", \"avgPool3dGrad\");\n let dy5D = $dy;\n let input5D = $input;\n let reshapedTo5D = false;\n if ($input.rank === 4) {\n reshapedTo5D = true;\n dy5D = reshape($dy, [1, $dy.shape[0], $dy.shape[1], $dy.shape[2], $dy.shape[3]]);\n input5D = reshape($input, [\n 1,\n $input.shape[0],\n $input.shape[1],\n $input.shape[2],\n $input.shape[3]\n ]);\n }\n assert(dy5D.rank === 5, () => `Error in avgPool3dGrad: dy must be rank 5 but got rank ${dy5D.rank}.`);\n assert(input5D.rank === 5, () => `Error in avgPool3dGrad: input must be rank 5 but got rank ${input5D.rank}.`);\n checkPadOnDimRoundingMode(\"avgPool3dGrad\", pad3, dimRoundingMode);\n const inputs = { dy: dy5D, input: input5D };\n const attrs = { filterSize, strides, pad: pad3, dimRoundingMode };\n const res = ENGINE.runKernel(AvgPool3DGrad, inputs, attrs);\n if (reshapedTo5D) {\n return reshape(res, [res.shape[1], res.shape[2], res.shape[3], res.shape[4]]);\n }\n return res;\n}\nvar avgPool3dGrad = op({ avgPool3dGrad_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/AvgPool3D_grad.js\nvar avgPool3DGradConfig = {\n kernelName: AvgPool3D,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved, attrs) => {\n const [x] = saved;\n const { filterSize, strides, pad: pad3, dimRoundingMode } = attrs;\n return {\n x: () => avgPool3dGrad(dy, x, filterSize, strides, pad3, dimRoundingMode)\n };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/avg_pool_grad.js\nfunction avgPoolGrad_(dy, input2, filterSize, strides, pad3) {\n const $dy = convertToTensor(dy, \"dy\", \"avgPoolGrad\");\n const $input = convertToTensor(input2, \"input\", \"avgPoolGrad\");\n assert($input.rank === $dy.rank, () => `Rank of input (${$input.rank}) does not match rank of dy (${$dy.rank})`);\n let input4D = $input;\n let dy4D = $dy;\n let reshapedTo4D = false;\n if ($input.rank === 3) {\n reshapedTo4D = true;\n input4D = reshape($input, [1, $input.shape[0], $input.shape[1], $input.shape[2]]);\n dy4D = reshape($dy, [1, $dy.shape[0], $dy.shape[1], $dy.shape[2]]);\n }\n assert(dy4D.rank === 4, () => `Error in avgPoolGrad: dy must be rank 4 but got rank ${dy4D.rank}.`);\n assert(input4D.rank === 4, () => `Error in avgPoolGrad: input must be rank 4 but got rank ${input4D.rank}.`);\n const inputs = { dy: dy4D, input: input4D };\n const attrs = { filterSize, strides, pad: pad3 };\n const res = ENGINE.runKernel(AvgPoolGrad, inputs, attrs);\n if (reshapedTo4D) {\n return reshape(res, [res.shape[1], res.shape[2], res.shape[3]]);\n }\n return res;\n}\nvar avgPoolGrad = op({ avgPoolGrad_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/AvgPool_grad.js\nvar avgPoolGradConfig = {\n kernelName: AvgPool,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved, attrs) => {\n const [x] = saved;\n const { filterSize, strides, pad: pad3 } = attrs;\n return { x: () => avgPoolGrad(dy, x, filterSize, strides, pad3) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/BatchMatMul_grad.js\nvar batchMatMulGradConfig = {\n kernelName: BatchMatMul,\n inputsToSave: [\"a\", \"b\"],\n gradFunc: (dy, saved, attrs) => {\n const [a, b] = saved;\n const { transposeA, transposeB } = attrs;\n if (!transposeA && !transposeB) {\n return {\n a: () => matMul(dy, b, false, true),\n b: () => matMul(a, dy, true, false)\n };\n } else if (!transposeA && transposeB) {\n return {\n a: () => matMul(dy, b, false, false),\n b: () => matMul(dy, a, true, false)\n };\n } else if (transposeA && !transposeB) {\n return {\n a: () => matMul(b, dy, false, true),\n b: () => matMul(a, dy, false, false)\n };\n } else {\n return {\n a: () => matMul(b, dy, true, true),\n b: () => matMul(dy, a, true, true)\n };\n }\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/BatchToSpaceND_grad.js\nvar batchToSpaceNDGradConfig = {\n kernelName: BatchToSpaceND,\n gradFunc: (dy, saved, attrs) => {\n const { blockShape, crops } = attrs;\n return { x: () => spaceToBatchND(dy, blockShape, crops) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/BroadcastTo_grad.js\nvar broadcastToGradConfig = {\n kernelName: BroadcastTo,\n gradFunc: (dy, saved, attrs) => {\n const broadCastToAttrs = attrs;\n const inputShape = broadCastToAttrs.inputShape;\n const outputShape = broadCastToAttrs.shape;\n const reps = Array.from(outputShape);\n for (let i = inputShape.length - 1; i >= 0; i--) {\n if (inputShape[i] === outputShape[i]) {\n reps[i] = 1;\n } else if (inputShape[i] !== 1) {\n throw new Error(`broadcastTo(): [${inputShape}] cannot be broadcast to [${outputShape}].`);\n }\n }\n const axes = [];\n for (let i = 0; i < reps.length; i++) {\n if (reps[i] > 1) {\n axes.push(i);\n }\n }\n return { x: () => sum2(dy, axes, true) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Cast_grad.js\nvar castGradConfig = {\n kernelName: Cast,\n gradFunc: (dy) => {\n return { x: () => dy.clone() };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Ceil_grad.js\nvar ceilGradConfig = {\n kernelName: Ceil,\n gradFunc: (dy) => {\n return { x: () => zerosLike(dy) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/ClipByValue_grad.js\nvar clipByValueGradConfig = {\n kernelName: ClipByValue,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved, attrs) => {\n const [x] = saved;\n const { clipValueMin, clipValueMax } = attrs;\n return {\n x: () => where(logicalAnd(greaterEqual(x, clipValueMin), lessEqual(x, clipValueMax)), dy, zerosLike(dy))\n };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/ComplexAbs_grad.js\nvar complexAbsGradConfig = {\n kernelName: ComplexAbs,\n inputsToSave: [\"x\"],\n gradFunc: absGradConfig.gradFunc\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Concat_grad.js\nvar concatGradConfig = {\n kernelName: Concat,\n saveAllInputs: true,\n gradFunc: (dy, saved, attrs) => {\n const shapes = saved.map((t) => t.shape);\n const { axis } = attrs;\n const $axis = parseAxisParam(axis, saved[0].shape)[0];\n const sizeSplits = shapes.map((s) => s[$axis]);\n const derTensors = split(dy, sizeSplits, $axis);\n return derTensors.map((t) => () => t);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Conv2D_grad.js\nvar conv2DGradConfig = {\n kernelName: Conv2D,\n inputsToSave: [\"x\", \"filter\"],\n gradFunc: (dy, saved, attrs) => {\n const [x4D, $filter] = saved;\n const { dilations, strides, pad: pad3, dataFormat } = attrs;\n assert(tupleValuesAreOne(dilations), () => `Error in gradient of conv2D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '${dilations}'`);\n return {\n x: () => conv2DBackpropInput(x4D.shape, dy, $filter, strides, pad3, dataFormat),\n filter: () => conv2DBackpropFilter(x4D, dy, $filter.shape, strides, pad3, dataFormat)\n };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Conv2DBackpropInput_grad.js\nvar conv2DBackpropInputGradConfig = {\n kernelName: Conv2DBackpropInput,\n inputsToSave: [\"dy\", \"filter\"],\n gradFunc: (ddx, saved, attrs) => {\n const [dy, filter] = saved;\n const { strides, pad: pad3, dataFormat, dimRoundingMode } = attrs;\n return {\n dy: () => conv2d(ddx, filter, strides, pad3, dataFormat, 1, dimRoundingMode),\n filter: () => conv2DBackpropFilter(ddx, dy, filter.shape, strides, pad3, dataFormat, dimRoundingMode)\n };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/conv3d_backprop_filter.js\nfunction conv3DBackpropFilter_(x, dy, filterShape, strides, pad3) {\n let x5D = x;\n if (x.rank === 4) {\n x5D = reshape(x, [1, x.shape[0], x.shape[1], x.shape[2], x.shape[3]]);\n }\n let dy5D = dy;\n if (dy5D.rank === 4) {\n dy5D = reshape(dy, [1, dy.shape[0], dy.shape[1], dy.shape[2], dy.shape[3]]);\n }\n assert(x5D.rank === 5, () => `Error in conv3dDerFilter: input must be rank 5, but got shape ${x5D.shape}.`);\n assert(dy5D.rank === 5, () => `Error in conv3dDerFilter: dy must be rank 5, but got shape ${dy5D.shape}.`);\n assert(filterShape.length === 5, () => `Error in conv3dDerFilter: filterShape must be length 5, but got ${filterShape}.`);\n assert(x5D.shape[4] === filterShape[3], () => `Error in conv3dDerFilter: depth of input ${x5D.shape[4]}) must match input depth in filter (${filterShape[3]}.`);\n assert(dy5D.shape[4] === filterShape[4], () => `Error in conv3dDerFilter: depth of dy (${dy5D.shape[4]}) must match output depth for filter (${filterShape[4]}).`);\n const inputs = { x: x5D, dy: dy5D };\n const attrs = { strides, pad: pad3, filterShape };\n return ENGINE.runKernel(Conv3DBackpropFilterV2, inputs, attrs);\n}\nvar conv3DBackpropFilter = op({ conv3DBackpropFilter_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Conv3D_grad.js\nvar conv3DGradConfig = {\n kernelName: Conv3D,\n inputsToSave: [\"x\", \"filter\"],\n gradFunc: (dy, saved, attrs) => {\n const { dilations, strides, pad: pad3 } = attrs;\n assert(tupleValuesAreOne(dilations), () => `Error in gradient of conv3D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '${dilations}'`);\n const [x5D, $filter] = saved;\n return {\n x: () => conv3DBackpropInput(x5D.shape, dy, $filter, strides, pad3),\n filter: () => conv3DBackpropFilter(x5D, dy, $filter.shape, strides, pad3)\n };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Cos_grad.js\nvar cosGradConfig = {\n kernelName: Cos,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return { x: () => mul(neg(sin(cast(x, \"float32\"))), dy) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Cosh_grad.js\nvar coshGradConfig = {\n kernelName: Cosh,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return { x: () => mul(sinh(cast(x, \"float32\")), dy) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Cumsum_grad.js\nvar cumsumGradConfig = {\n kernelName: Cumsum,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved, attrs) => {\n const [x] = saved;\n const { axis, exclusive, reverse: reverse5 } = attrs;\n return {\n x: () => {\n const permutation = getAxesPermutation([axis], x.rank);\n let out = cumsum(dy, axis, exclusive, !reverse5);\n if (permutation != null) {\n out = transpose(out, permutation);\n }\n return out;\n }\n };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/DepthwiseConv2dNative_grad.js\nvar depthwiseConv2dNativeGradConfig = {\n kernelName: DepthwiseConv2dNative,\n inputsToSave: [\"x\", \"filter\"],\n gradFunc: (dy, saved, attrs) => {\n const { dilations, strides, pad: pad3, dimRoundingMode } = attrs;\n const $dilations = dilations == null ? [1, 1] : dilations;\n assert(tupleValuesAreOne($dilations), () => `Error in gradient of depthwiseConv2dNative: dilation rates greater than 1 are not yet supported. Got dilations '${$dilations}'`);\n const [x, filter] = saved;\n assert(x.rank === 4, () => `Error in gradient of depthwiseConv2dNative: input must be rank 4, but got rank ${x.rank}.`);\n assert(filter.rank === 4, () => `Error in gradient of depthwiseConv2dNative: filter must be rank 4, but got rank ${filter.rank}.`);\n assert(x.shape[3] === filter.shape[2], () => `Error in gradient of depthwiseConv2d: number of input channels (${x.shape[3]}) must match the inChannels dimension in filter ${filter.shape[2]}.`);\n assert(eitherStridesOrDilationsAreOne(strides, $dilations), () => `Error in gradient of depthwiseConv2d: Either strides or dilations must be 1. Got strides ${strides} and dilations '${$dilations}'.`);\n checkPadOnDimRoundingMode(\"depthwiseConv2d\", pad3, dimRoundingMode);\n return {\n x: () => depthwiseConv2dNativeBackpropInput(x.shape, dy, filter, strides, pad3, $dilations, dimRoundingMode),\n filter: () => depthwiseConv2dNativeBackpropFilter(x, dy, filter.shape, strides, pad3, $dilations, dimRoundingMode)\n };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Dilation2D_grad.js\nvar dilation2dGradConfig = {\n kernelName: Dilation2D,\n inputsToSave: [\"x\", \"filter\"],\n gradFunc: (dy, saved, attrs) => {\n const [x, filter] = saved;\n const inputInputs = { x, filter, dy };\n const filterInputs = { x, filter, dy };\n return {\n x: () => ENGINE.runKernel(Dilation2DBackpropInput, inputInputs, attrs),\n filter: () => ENGINE.runKernel(Dilation2DBackpropFilter, filterInputs, attrs)\n };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Elu_grad.js\nvar eluGradConfig = {\n kernelName: Elu,\n outputsToSave: [true],\n gradFunc: (dy, saved) => {\n const [y] = saved;\n const inputs = { dy, y };\n return { x: () => ENGINE.runKernel(EluGrad, inputs) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Erf_grad.js\nvar erfGradConfig = {\n kernelName: Erf,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n const a = mul(exp(neg(square(x))), 2 / Math.sqrt(Math.PI));\n return { x: () => mul(dy, a) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Exp_grad.js\nvar expGradConfig = {\n kernelName: Exp,\n outputsToSave: [true],\n gradFunc: (dy, saved) => {\n const [y] = saved;\n return { x: () => mul(dy, y) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/ExpandDims_grad.js\nvar expandDimsGradConfig = {\n kernelName: ExpandDims,\n inputsToSave: [\"input\"],\n gradFunc: (dy, saved) => {\n const [input2] = saved;\n return { input: () => reshape(dy, input2.shape) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Expm1_grad.js\nvar expm1GradConfig = {\n kernelName: Expm1,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return { x: () => mul(dy, exp(x)) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Floor_grad.js\nvar floorGradConfig = {\n kernelName: Floor,\n gradFunc: (dy) => {\n return { x: () => zerosLike(dy) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/FloorDiv_grad.js\nvar floorDivGradConfig = {\n kernelName: FloorDiv,\n inputsToSave: [\"a\", \"b\"],\n gradFunc: (dy, saved) => {\n const [a, b] = saved;\n const outShape = assertAndGetBroadcastShape(a.shape, b.shape);\n const derA = () => {\n const res = div(dy, cast(b, \"float32\"));\n const reduceAxes = getReductionAxes(a.shape, outShape);\n if (reduceAxes.length > 0) {\n return reshape(sum2(res, reduceAxes), a.shape);\n }\n return res;\n };\n const derB = () => {\n let res = mul(dy, cast(a, \"float32\"));\n const reduceAxes = getReductionAxes(b.shape, outShape);\n if (reduceAxes.length > 0) {\n res = reshape(sum2(res, reduceAxes), b.shape);\n }\n const tmp = square(b);\n return neg(div(res, cast(tmp, \"float32\")));\n };\n return { a: derA, b: derB };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/FusedBatchNorm_grad.js\nvar fusedBatchNormGradConfig = {\n kernelName: FusedBatchNorm,\n inputsToSave: [\"x\", \"mean\", \"variance\", \"scale\"],\n gradFunc: (dy, saved, attrs) => {\n const { varianceEpsilon } = attrs;\n const [x, mean5, variance, scale2] = saved;\n const scaleValue = scale2 == null ? scalar(1) : scale2;\n const reductionAxes = getReductionAxes(mean5.shape, x.shape);\n const tileShape = [];\n if (mean5.rank === 1) {\n for (let i = 0; i < x.shape.length - 1; ++i) {\n tileShape.push(x.shape[i]);\n }\n tileShape.push(1);\n }\n const xMinusMean = sub(x, mean5);\n const dyTimesScaleValue = mul(dy, scaleValue);\n const oneOverSqrtVariance = rsqrt(add2(variance, scalar(varianceEpsilon)));\n const minusHalfRCube = mul(mul(mul(oneOverSqrtVariance, oneOverSqrtVariance), oneOverSqrtVariance), scalar(-0.5));\n const derX = () => {\n if (mean5.rank === 1) {\n return reshape(mul(mul(dy, tile(reshape(oneOverSqrtVariance, [1, 1, 1, mean5.shape[0]]), tileShape)), scaleValue), x.shape);\n } else {\n return reshape(mul(mul(dy, oneOverSqrtVariance), scaleValue), x.shape);\n }\n };\n const derMean = () => {\n let meanDer = mul(mul(oneOverSqrtVariance, scalar(-1)), dyTimesScaleValue);\n if (mean5.rank === 1) {\n meanDer = sum2(meanDer, reductionAxes);\n }\n return reshape(meanDer, mean5.shape);\n };\n const derVariance = () => {\n let varianceDer = mul(mul(minusHalfRCube, xMinusMean), dyTimesScaleValue);\n if (mean5.rank === 1) {\n varianceDer = sum2(varianceDer, reductionAxes);\n }\n return reshape(varianceDer, mean5.shape);\n };\n const derScale = () => {\n const xMinusMean2TimesRsqrt = mul(xMinusMean, oneOverSqrtVariance);\n let scaleDer = mul(dy, xMinusMean2TimesRsqrt);\n if (mean5.rank === 1) {\n scaleDer = sum2(scaleDer, reductionAxes);\n }\n return reshape(scaleDer, mean5.shape);\n };\n const derOffset = () => {\n let offsetDer = dy;\n if (mean5.rank === 1) {\n offsetDer = sum2(offsetDer, reductionAxes);\n }\n return reshape(offsetDer, mean5.shape);\n };\n return {\n x: derX,\n mean: derMean,\n variance: derVariance,\n scale: derScale,\n offset: derOffset\n };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/GatherV2_grad.js\nvar gatherGradConfig = {\n kernelName: GatherV2,\n inputsToSave: [\"x\", \"indices\"],\n gradFunc: (dy, saved, attrs) => {\n const [x, indices] = saved;\n const { axis } = attrs;\n const parsedAxis = parseAxisParam(axis, x.shape)[0];\n const derX = () => {\n const paramsShape = x.shape;\n const indicesSize = indices.size;\n const outerShape = paramsShape.slice(0, parsedAxis);\n const outerDims = outerShape.length;\n const innerShape = paramsShape.slice(axis, paramsShape.length).slice(1);\n const innerDims = innerShape.length;\n const outerAxesIndices = arrayRange(0, outerDims);\n const innerAxesIndices = arrayRange(outerDims + 1, outerDims + 1 + innerDims);\n const valuesShape = arrayConcat([outerShape, [indicesSize], innerShape]);\n const values = reshape(dy, valuesShape);\n const reshapedIndices = reshape(indices, [indicesSize]);\n const transposeDims = arrayConcat([[outerDims], outerAxesIndices, innerAxesIndices]);\n const valuesTranspose = transpose(values, transposeDims);\n let paramsGrad = unsortedSegmentSum(valuesTranspose, reshapedIndices, x.shape[parsedAxis]);\n const invertTransposeDims = getUndoAxesPermutation(transposeDims);\n paramsGrad = transpose(paramsGrad, invertTransposeDims);\n return paramsGrad;\n };\n return { x: derX, indices: () => indices };\n }\n};\nfunction arrayRange(start, stop) {\n const result = [];\n for (let i = start; i < stop; ++i) {\n result.push(i);\n }\n return result;\n}\nfunction arrayConcat(arrays) {\n const result = [];\n for (let i = 0; i < arrays.length; ++i) {\n for (let j = 0; j < arrays[i].length; ++j) {\n result.push(arrays[i][j]);\n }\n }\n return result;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/GreaterEqual_grad.js\nvar greaterEqualGradConfig = {\n kernelName: GreaterEqual,\n inputsToSave: [\"a\", \"b\"],\n gradFunc: (dy, saved) => {\n const [a, b] = saved;\n return { a: () => zerosLike(a), b: () => zerosLike(b) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Identity_grad.js\nvar identityGradConfig = {\n kernelName: Identity,\n gradFunc: (dy) => {\n return { x: () => cast(dy, \"float32\") };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/IsFinite_grad.js\nvar isFiniteGradConfig = {\n kernelName: IsFinite,\n gradFunc: (dy) => {\n return { x: () => zerosLike(dy) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/IsInf_grad.js\nvar isInfGradConfig = {\n kernelName: IsInf,\n gradFunc: (dy) => {\n return { x: () => zerosLike(dy) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/IsNan_grad.js\nvar isNanGradConfig = {\n kernelName: IsNan,\n gradFunc: (dy) => {\n return { x: () => zerosLike(dy) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/LeakyRelu_grad.js\nvar leakyReluGradConfig = {\n kernelName: LeakyRelu,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved, attrs) => {\n const [x] = saved;\n const { alpha } = attrs;\n const mask = greater(x, 0);\n return { x: () => where(mask, dy, mul(dy, alpha)) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Log1p_grad.js\nvar log1pGradConfig = {\n kernelName: Log1p,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return { x: () => div(dy, add2(x, 1)) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Log_grad.js\nvar logGradConfig = {\n kernelName: Log,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return { x: () => div(dy, cast(x, \"float32\")) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/LogSoftmax_grad.js\nvar logSoftmaxGradConfig = {\n kernelName: LogSoftmax,\n inputsToSave: [],\n outputsToSave: [true],\n gradFunc: (dy, saved, attrs) => {\n const [value] = saved;\n const { axis } = attrs;\n return {\n logits: () => {\n const keepDims = true;\n const softmax7 = exp(value);\n return sub(dy, mul(sum2(dy, axis, keepDims), softmax7));\n }\n };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/local_response_normalization_backprop.js\nfunction localResponseNormalizationBackprop_(x, y, dy, depthRadius = 5, bias = 1, alpha = 1, beta = 0.5) {\n const inputs = { x, y, dy };\n const attrs = { depthRadius, bias, alpha, beta };\n return ENGINE.runKernel(LRNGrad, inputs, attrs);\n}\nvar localResponseNormalizationBackprop = op({ localResponseNormalizationBackprop_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/LRN_grad.js\nvar lrnGradConfig = {\n kernelName: LRN,\n inputsToSave: [\"x\"],\n outputsToSave: [true],\n gradFunc: (dy, saved, attrs) => {\n const [x, y] = saved;\n const { depthRadius, bias, alpha, beta } = attrs;\n return {\n x: () => localResponseNormalizationBackprop(x, y, dy, depthRadius, bias, alpha, beta)\n };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/min_max_grad_util.js\nfunction gradForMinAndMax(dy, y, xOrig, origAxes) {\n if (y.rank < xOrig.rank) {\n y = reshape(y, expandShapeToKeepDim(y.shape, origAxes));\n }\n if (dy.rank < xOrig.rank) {\n dy = reshape(dy, expandShapeToKeepDim(dy.shape, origAxes));\n }\n return {\n x: () => {\n const dx = mul(dy, cast(equal(xOrig, y), dy.dtype));\n return dx;\n }\n };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Max_grad.js\nvar maxGradConfig = {\n kernelName: Max,\n inputsToSave: [\"x\"],\n outputsToSave: [true],\n gradFunc: (dy, saved, attrs) => {\n const maxAttrs = attrs;\n const { reductionIndices } = maxAttrs;\n const x = saved[0];\n const y = saved[1];\n const origAxes = parseAxisParam(reductionIndices, x.shape);\n const maxGrad = gradForMinAndMax(dy, y, x, origAxes);\n return {\n x: () => {\n return maxGrad[\"x\"]();\n }\n };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Maximum_grad.js\nvar maximumGradConfig = {\n kernelName: Maximum,\n inputsToSave: [\"a\", \"b\"],\n gradFunc: (dy, saved) => {\n const [a, b] = saved;\n const derA = () => mul(dy, cast(greaterEqual(a, b), \"float32\"));\n const derB = () => mul(dy, cast(less(a, b), \"float32\"));\n return { a: derA, b: derB };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/max_pool_3d_grad.js\nfunction maxPool3dGrad_(dy, input2, output, filterSize, strides, pad3, dimRoundingMode) {\n const $dy = convertToTensor(dy, \"dy\", \"maxPool3dGrad\");\n const $input = convertToTensor(input2, \"input\", \"maxPool3dGrad\");\n const $output = convertToTensor(output, \"output\", \"maxPool3dGrad\");\n let dy5D = $dy;\n let input5D = $input;\n let output5D = $output;\n let reshapedTo5D = false;\n if ($input.rank === 4) {\n reshapedTo5D = true;\n dy5D = reshape($dy, [1, $dy.shape[0], $dy.shape[1], $dy.shape[2], $dy.shape[3]]);\n input5D = reshape($input, [\n 1,\n $input.shape[0],\n $input.shape[1],\n $input.shape[2],\n $input.shape[3]\n ]);\n output5D = reshape($output, [\n 1,\n $output.shape[0],\n $output.shape[1],\n $output.shape[2],\n $output.shape[3]\n ]);\n }\n assert(dy5D.rank === 5, () => `Error in maxPool3dGrad: dy must be rank 5 but got rank ${dy5D.rank}.`);\n assert(input5D.rank === 5, () => `Error in maxPool3dGrad: input must be rank 5 but got rank ${input5D.rank}.`);\n assert(output5D.rank === 5, () => `Error in maxPool3dGrad: output must be rank 5 but got rank ${output5D.rank}.`);\n checkPadOnDimRoundingMode(\"maxPool3dGrad\", pad3, dimRoundingMode);\n const inputs = { dy: dy5D, input: input5D, output: output5D };\n const attrs = { filterSize, strides, pad: pad3, dimRoundingMode };\n const res = ENGINE.runKernel(MaxPool3DGrad, inputs, attrs);\n if (reshapedTo5D) {\n return reshape(res, [res.shape[1], res.shape[2], res.shape[3], res.shape[4]]);\n }\n return res;\n}\nvar maxPool3dGrad = op({ maxPool3dGrad_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/MaxPool3D_grad.js\nvar maxPool3DGradConfig = {\n kernelName: MaxPool3D,\n inputsToSave: [\"x\"],\n outputsToSave: [true],\n gradFunc: (dy, saved, attrs) => {\n const [x, y] = saved;\n const { filterSize, strides, pad: pad3, dimRoundingMode } = attrs;\n return {\n x: () => maxPool3dGrad(dy, x, y, filterSize, strides, pad3, dimRoundingMode)\n };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/max_pool_grad.js\nfunction maxPoolGrad_(dy, input2, output, filterSize, strides, pad3, dimRoundingMode) {\n const $dy = convertToTensor(dy, \"dy\", \"maxPoolGrad\");\n const $input = convertToTensor(input2, \"input\", \"maxPoolGrad\");\n const $output = convertToTensor(output, \"output\", \"maxPoolGrad\");\n assert($input.rank === $dy.rank, () => `Rank of input (${$input.rank}) does not match rank of dy (${$dy.rank})`);\n assert($dy.rank === 4, () => `Error in maxPoolGrad: dy must be rank 4 but got rank ${$dy.rank}.`);\n assert($input.rank === 4, () => `Error in maxPoolGrad: input must be rank 4 but got rank ${$input.rank}.`);\n checkPadOnDimRoundingMode(\"maxPoolGrad\", pad3, dimRoundingMode);\n const inputs = { dy: $dy, input: $input, output: $output };\n const attrs = { filterSize, strides, pad: pad3, dimRoundingMode };\n return ENGINE.runKernel(MaxPoolGrad, inputs, attrs);\n}\nvar maxPoolGrad = op({ maxPoolGrad_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/MaxPool_grad.js\nvar maxPoolGradConfig = {\n kernelName: MaxPool,\n inputsToSave: [\"x\"],\n outputsToSave: [true],\n gradFunc: (dy, saved, attrs) => {\n const [x, y] = saved;\n const { filterSize, strides, pad: pad3 } = attrs;\n return {\n x: () => maxPoolGrad(dy, x, y, filterSize, strides, pad3)\n };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Mean_grad.js\nvar meanGradConfig = {\n kernelName: Mean,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved, attrs) => {\n const [x] = saved;\n const { axis } = attrs;\n const axes = parseAxisParam(axis, x.shape);\n const shapes = computeOutAndReduceShapes(x.shape, axes);\n const reduceShape = shapes[1];\n const reduceSize = sizeFromShape(reduceShape);\n const derX = () => {\n const expandedDyShape = x.shape.slice();\n axes.forEach((axis2) => {\n expandedDyShape[axis2] = 1;\n });\n const expandedDy = reshape(dy, expandedDyShape);\n const res = div(mul(expandedDy, ones2(x.shape, \"float32\")), reduceSize);\n return res;\n };\n return { x: derX };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Min_grad.js\nvar minGradConfig = {\n kernelName: Min,\n inputsToSave: [\"x\"],\n outputsToSave: [true],\n gradFunc: (dy, saved, attrs) => {\n const minAttrs = attrs;\n const { axis } = minAttrs;\n const [x, y] = saved;\n const origAxes = parseAxisParam(axis, x.shape);\n const minGrad = gradForMinAndMax(dy, y, x, origAxes);\n return {\n x: () => {\n return minGrad[\"x\"]();\n }\n };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Minimum_grad.js\nvar minimumGradConfig = {\n kernelName: Minimum,\n inputsToSave: [\"a\", \"b\"],\n gradFunc: (dy, saved) => {\n const [a, b] = saved;\n const derA = () => mul(dy, cast(lessEqual(a, b), \"float32\"));\n const derB = () => mul(dy, cast(greater(a, b), \"float32\"));\n return { a: derA, b: derB };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/MirrorPad_grad.js\nvar mirrorPadGradConfig = {\n kernelName: MirrorPad,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved, attrs) => {\n const x = saved[0];\n const { paddings } = attrs;\n const begin = paddings.map((p2) => p2[0]);\n return { x: () => slice(dy, begin, x.shape) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Mod_grad.js\nvar modGradConfig = {\n kernelName: Mod,\n inputsToSave: [\"a\", \"b\"],\n gradFunc: (dy, saved) => {\n const [a, b] = saved;\n const outShape = assertAndGetBroadcastShape(a.shape, b.shape);\n const derA = () => {\n const reduceAxes = getReductionAxes(a.shape, outShape);\n if (reduceAxes.length > 0) {\n return reshape(sum2(dy, reduceAxes), a.shape);\n }\n return dy;\n };\n const derB = () => {\n const res = mul(dy, neg(floor(div(a, b))));\n const reduceAxes = getReductionAxes(b.shape, outShape);\n if (reduceAxes.length > 0) {\n return reshape(sum2(res, reduceAxes), b.shape);\n }\n return res;\n };\n return { a: derA, b: derB };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Multiply_grad.js\nvar multiplyGradConfig = {\n kernelName: Multiply,\n inputsToSave: [\"a\", \"b\"],\n gradFunc: (dy, saved) => {\n const [a, b] = saved;\n const outShape = assertAndGetBroadcastShape(a.shape, b.shape);\n const derA = () => {\n const res = mul(dy, cast(b, \"float32\"));\n const reduceAxes = getReductionAxes(a.shape, outShape);\n if (reduceAxes.length > 0) {\n return reshape(sum2(res, reduceAxes), a.shape);\n }\n return res;\n };\n const derB = () => {\n const res = mul(dy, cast(a, \"float32\"));\n const reduceAxes = getReductionAxes(b.shape, outShape);\n if (reduceAxes.length > 0) {\n return reshape(sum2(res, reduceAxes), b.shape);\n }\n return res;\n };\n return { a: derA, b: derB };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Neg_grad.js\nvar negGradConfig = {\n kernelName: Neg,\n gradFunc: (dy) => {\n return { x: () => neg(dy) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/OneHot_grad.js\nvar oneHotGradConfig = {\n kernelName: OneHot,\n inputsToSave: [\"indices\"],\n gradFunc: (dy, saved) => {\n const indices = saved[0];\n return { indices: () => zeros(indices.shape, \"float32\") };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/OnesLike_grad.js\nvar onesLikeGradConfig = {\n kernelName: OnesLike,\n gradFunc: (dy) => {\n return { x: () => zerosLike(dy) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Pack_grad.js\nvar packGradConfig = {\n kernelName: Pack,\n saveAllInputs: true,\n gradFunc: (dy, saved, attrs) => {\n const { axis } = attrs;\n const derTensors = unstack(dy, axis);\n return derTensors.map((t) => () => t);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/PadV2_grad.js\nvar padV2GradConfig = {\n kernelName: PadV2,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved, attrs) => {\n const x = saved[0];\n const { paddings } = attrs;\n const begin = paddings.map((p2) => p2[0]);\n return { x: () => slice(dy, begin, x.shape) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Pow_grad.js\nvar powGradConfig = {\n kernelName: Pow,\n inputsToSave: [\"a\", \"b\"],\n outputsToSave: [true],\n gradFunc: (dy, saved) => {\n const [a, b, y] = saved;\n const base = a;\n const exp5 = b;\n const outShape = assertAndGetBroadcastShape(base.shape, exp5.shape);\n const derBase = () => {\n const expFloat = cast(exp5, \"float32\");\n let res = mul(dy, mul(expFloat, pow(base, sub(expFloat, scalar(1)))));\n const reduceAxes = getReductionAxes(base.shape, outShape);\n if (reduceAxes.length > 0) {\n res = sum2(res, reduceAxes);\n }\n return reshape(res, base.shape);\n };\n const derExp = () => {\n const condition = greater(base, 0);\n const logBase = where(condition, log2(base), zerosLike(base));\n let res = mul(dy, mul(y, logBase));\n const reduceAxes = getReductionAxes(exp5.shape, outShape);\n if (reduceAxes.length > 0) {\n res = sum2(res, reduceAxes);\n }\n return reshape(res, exp5.shape);\n };\n return { a: derBase, b: derExp };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Prelu_grad.js\nvar preluGradConfig = {\n kernelName: Prelu,\n inputsToSave: [\"x\", \"alpha\"],\n gradFunc: (dy, saved) => {\n const [x, alpha] = saved;\n const mask = greater(x, 0);\n return {\n x: () => where(mask, dy, mul(dy, alpha)),\n alpha: () => {\n let res = where(mask, zerosLike(dy), mul(dy, x));\n const reduceAxes = getReductionAxes(alpha.shape, dy.shape);\n if (reduceAxes.length > 0) {\n res = sum2(res, reduceAxes);\n }\n return reshape(res, alpha.shape);\n }\n };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Prod_grad.js\nfunction prodGradFn_(x, dy, axis) {\n const expandedYShape = x.shape.slice();\n expandedYShape[axis] = 1;\n const expandedDy = reshape(dy, expandedYShape);\n const xCumProd = cumprod(x, axis, true, false);\n const xCumRevProd = cumprod(x, axis, true, true);\n const dx = mul(xCumProd, xCumRevProd);\n return mul(expandedDy, dx);\n}\nfunction prodsGradFn_(x, dy, axis) {\n const xRank = x.shape.length;\n const finalProdAxis = xRank - axis.length;\n const xPermutation = backend_util_exports.getAxesPermutation(axis, xRank);\n let permutedX = x;\n if (xPermutation != null) {\n permutedX = transpose(x, xPermutation);\n }\n const newShape = permutedX.shape.slice();\n const removedShape = newShape.splice(xRank - axis.length, axis.length);\n const endPartShape = removedShape.reduce((p2, c) => p2 * c, 1);\n newShape.push(endPartShape);\n const reshapedPermutedX = permutedX.reshape(newShape);\n let prodGrad = prodGradFn_(reshapedPermutedX, dy, finalProdAxis);\n prodGrad = prodGrad.reshape(permutedX.shape);\n if (xPermutation != null) {\n const undoPermutation = backend_util_exports.getUndoAxesPermutation(xPermutation);\n prodGrad = transpose(prodGrad, undoPermutation);\n }\n return prodGrad;\n}\nvar prodGradConfig = {\n kernelName: Prod,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved, attrs) => {\n const [x] = saved;\n const { axis } = attrs;\n let axisArr = [];\n if (axis === void 0 || axis === null) {\n axisArr = x.shape.map((_, i) => i);\n } else if (typeof axis === \"number\") {\n axisArr = [axis];\n } else {\n axisArr = axis;\n }\n return { x: () => prodsGradFn_(x, dy, axisArr) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/RealDiv_grad.js\nvar divGradConfig = {\n kernelName: RealDiv,\n inputsToSave: [\"a\", \"b\"],\n gradFunc: (dy, saved) => {\n const [a, b] = saved;\n const outShape = assertAndGetBroadcastShape(a.shape, b.shape);\n const derA = () => {\n const res = div(dy, cast(b, \"float32\"));\n const reduceAxes = getReductionAxes(a.shape, outShape);\n if (reduceAxes.length > 0) {\n return reshape(sum2(res, reduceAxes), a.shape);\n }\n return res;\n };\n const derB = () => {\n let res = mul(dy, cast(a, \"float32\"));\n const reduceAxes = getReductionAxes(b.shape, outShape);\n if (reduceAxes.length > 0) {\n res = reshape(sum2(res, reduceAxes), b.shape);\n }\n const tmp = square(b);\n return neg(div(res, cast(tmp, \"float32\")));\n };\n return { a: derA, b: derB };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Reciprocal_grad.js\nvar reciprocalGradConfig = {\n kernelName: Reciprocal,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return { x: () => div(dy, neg(square(x))) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Relu6_grad.js\nvar relu6GradConfig = {\n kernelName: Relu6,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n const mask = mul(lessEqual(x, 6), step(x));\n return { x: () => mul(dy, cast(mask, \"float32\")) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Relu_grad.js\nvar reluGradConfig = {\n kernelName: Relu,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return { x: () => mul(dy, cast(step(x), \"float32\")) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Reshape_grad.js\nvar reshapeGradConfig = {\n kernelName: Reshape,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return { x: () => reshape(dy, x.shape) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/ResizeBilinear_grad.js\nvar resizeBilinearGradConfig = {\n kernelName: ResizeBilinear,\n inputsToSave: [\"images\"],\n gradFunc: (dy, saved, attrs) => {\n const [images] = saved;\n const inputs = { dy, images };\n const imagesDer = () => ENGINE.runKernel(ResizeBilinearGrad, inputs, attrs);\n return { images: imagesDer };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/ResizeNearestNeighbor_grad.js\nvar resizeNearestNeighborGradConfig = {\n kernelName: ResizeNearestNeighbor,\n inputsToSave: [\"images\"],\n gradFunc: (dy, saved, attrs) => {\n const [images] = saved;\n const inputs = { dy, images };\n const imagesDer = () => ENGINE.runKernel(ResizeNearestNeighborGrad, inputs, attrs);\n return { images: imagesDer };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Reverse_grad.js\nvar reverseGradConfig = {\n kernelName: Reverse,\n gradFunc: (dy, saved, attrs) => {\n const { dims } = attrs;\n const axes = parseAxisParam(dims, dy.shape);\n return { x: () => reverse(dy, axes) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Round_grad.js\nvar roundGradConfig = {\n kernelName: Round,\n gradFunc: (dy) => {\n return { x: () => zerosLike(dy) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Rsqrt_grad.js\nvar rsqrtGradConfig = {\n kernelName: Rsqrt,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return { x: () => neg(div(dy, mul(pow(x, 1.5), 2))) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Select_grad.js\nvar selectGradConfig = {\n kernelName: Select,\n inputsToSave: [\"condition\"],\n gradFunc: (dy, saved) => {\n const [condition] = saved;\n return {\n condition: () => cast(zerosLike(condition), \"float32\"),\n t: () => mul(dy, cast(condition, dy.dtype)),\n e: () => mul(dy, cast(logicalNot(condition), dy.dtype))\n };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Selu_grad.js\nvar seluGradConfig = {\n kernelName: Selu,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return {\n x: () => {\n const mask = greater(x, scalar(0));\n const scaleAlpha2 = scalar(SELU_SCALEALPHA);\n const scale2 = scalar(SELU_SCALE);\n const greaterThanZeroDer = mul(dy, scale2);\n const lessEqualZeroDer = mul(mul(dy, scaleAlpha2), exp(cast(x, \"float32\")));\n return where(mask, greaterThanZeroDer, lessEqualZeroDer);\n }\n };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Sigmoid_grad.js\nvar sigmoidGradConfig = {\n kernelName: Sigmoid,\n outputsToSave: [true],\n gradFunc: (dy, saved) => {\n const [y] = saved;\n return { x: () => mul(dy, mul(y, sub(scalar(1), y))) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Sign_grad.js\nvar signGradConfig = {\n kernelName: Sign,\n gradFunc: (dy) => {\n return { x: () => zerosLike(dy) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Sin_grad.js\nvar sinGradConfig = {\n kernelName: Sin,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return { x: () => mul(cos(cast(x, \"float32\")), dy) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Sinh_grad.js\nvar sinhGradConfig = {\n kernelName: Sinh,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return { x: () => mul(cosh(cast(x, \"float32\")), dy) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Slice_grad.js\nvar sliceGradConfig = {\n kernelName: Slice,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved, attrs) => {\n const [x] = saved;\n const { begin, size } = attrs;\n const inputShape = x.shape;\n const [begin_, size_] = parseSliceParams(x, begin, size);\n const paddings = [];\n for (let i = 0; i < dy.rank; i++) {\n paddings.push([begin_[i], inputShape[i] - begin_[i] - size_[i]]);\n }\n return { x: () => pad(dy, paddings) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Softmax_grad.js\nvar softmaxGradConfig = {\n kernelName: Softmax,\n outputsToSave: [true],\n gradFunc: (dy, saved, attrs) => {\n const [y] = saved;\n const { dim } = attrs;\n const keepDims = true;\n const dyTimesY = mul(dy, y);\n return {\n logits: () => sub(dyTimesY, mul(sum2(dyTimesY, [dim], keepDims), y))\n };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Softplus_grad.js\nvar softplusGradConfig = {\n kernelName: Softplus,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return { x: () => mul(dy, sigmoid(x)) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/SpaceToBatchND_grad.js\nvar spaceToBatchNDGradConfig = {\n kernelName: SpaceToBatchND,\n gradFunc: (dy, saved, attrs) => {\n const { blockShape, paddings } = attrs;\n return { x: () => batchToSpaceND(dy, blockShape, paddings) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/SplitV_grad.js\nvar splitVGradConfig = {\n kernelName: SplitV,\n gradFunc: (dy, saved, attrs) => {\n const { axis } = attrs;\n return { x: () => concat(dy, axis) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Sqrt_grad.js\nvar sqrtGradConfig = {\n kernelName: Sqrt,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return { x: () => div(dy, mul(sqrt(cast(x, \"float32\")), 2)) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Square_grad.js\nvar squareGradConfig = {\n kernelName: Square,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return { x: () => mul(dy, mul(cast(x, \"float32\"), 2)) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/SquaredDifference_grad.js\nvar squaredDifferenceGradConfig = {\n kernelName: SquaredDifference,\n inputsToSave: [\"a\", \"b\"],\n gradFunc: (dy, saved) => {\n const [a, b] = saved;\n const two = scalar(2);\n const derA = () => mul(dy, mul(two, sub(a, b)));\n const derB = () => mul(dy, mul(two, sub(b, a)));\n return { a: derA, b: derB };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Step_grad.js\nvar stepGradConfig = {\n kernelName: Step,\n gradFunc: (dy) => {\n return { x: () => zerosLike(dy) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Sub_grad.js\nvar subGradConfig = {\n kernelName: Sub,\n inputsToSave: [\"a\", \"b\"],\n gradFunc: (dy, saved) => {\n const [a, b] = saved;\n const outShape = assertAndGetBroadcastShape(a.shape, b.shape);\n const derA = () => {\n let res = dy;\n const reduceAxes = getReductionAxes(a.shape, outShape);\n if (reduceAxes.length > 0) {\n res = sum2(res, reduceAxes);\n }\n return reshape(res, a.shape);\n };\n const derB = () => {\n let res = dy;\n const reduceAxes = getReductionAxes(b.shape, outShape);\n if (reduceAxes.length > 0) {\n res = sum2(res, reduceAxes);\n }\n return reshape(neg(res), b.shape);\n };\n return { a: derA, b: derB };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Sum_grad.js\nvar sumGradConfig = {\n kernelName: Sum,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved, attrs) => {\n const [x] = saved;\n const expandedDyShape = x.shape.slice();\n const { axis } = attrs;\n const axes = parseAxisParam(axis, x.shape);\n axes.forEach((axis2) => {\n expandedDyShape[axis2] = 1;\n });\n const expandedDy = reshape(dy, expandedDyShape);\n const derX = mul(expandedDy, ones2(x.shape, \"float32\"));\n return { x: () => derX };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Tan_grad.js\nvar tanGradConfig = {\n kernelName: Tan,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return { x: () => div(dy, square(cos(x))) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Tanh_grad.js\nvar tanhGradConfig = {\n kernelName: Tanh,\n outputsToSave: [true],\n gradFunc: (dy, saved) => {\n const [y] = saved;\n return { x: () => mul(sub(scalar(1), square(y)), dy) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Tile_grad.js\nvar tileGradConfig = {\n kernelName: Tile,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved, attrs) => {\n const [x] = saved;\n const { reps } = attrs;\n const derX = () => {\n let xGrad = zerosLike(x);\n if (x.rank === 1) {\n for (let i = 0; i < reps[0]; ++i) {\n xGrad = add2(xGrad, slice(dy, [i * x.shape[0]], [x.shape[0]]));\n }\n } else if (x.rank === 2) {\n for (let i = 0; i < reps[0]; ++i) {\n for (let j = 0; j < reps[1]; ++j) {\n xGrad = add2(xGrad, slice(dy, [i * x.shape[0], j * x.shape[1]], [\n x.shape[0],\n x.shape[1]\n ]));\n }\n }\n } else if (x.rank === 3) {\n for (let i = 0; i < reps[0]; ++i) {\n for (let j = 0; j < reps[1]; ++j) {\n for (let k = 0; k < reps[2]; ++k) {\n xGrad = add2(xGrad, slice(dy, [i * x.shape[0], j * x.shape[1], k * x.shape[2]], [x.shape[0], x.shape[1], x.shape[2]]));\n }\n }\n }\n } else if (x.rank === 4) {\n for (let i = 0; i < reps[0]; ++i) {\n for (let j = 0; j < reps[1]; ++j) {\n for (let k = 0; k < reps[2]; ++k) {\n for (let l = 0; l < reps[3]; ++l) {\n xGrad = add2(xGrad, slice(dy, [\n i * x.shape[0],\n j * x.shape[1],\n k * x.shape[2],\n l * x.shape[3]\n ], [x.shape[0], x.shape[1], x.shape[2], x.shape[3]]));\n }\n }\n }\n }\n } else {\n throw new Error(`Gradient for tile operation is not implemented for rank-${x.rank} tensors yet.`);\n }\n return xGrad;\n };\n return { x: derX };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Transpose_grad.js\nvar transposeGradConfig = {\n kernelName: Transpose,\n gradFunc: (dy, saved, attrs) => {\n const transposeAttrs = attrs;\n const { perm } = transposeAttrs;\n const undoPerm = getUndoAxesPermutation(perm);\n return { x: () => transpose(dy, undoPerm) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Unpack_grad.js\nvar unpackGradConfig = {\n kernelName: Unpack,\n gradFunc: (dy, saved, attrs) => {\n const unpackAttrs = attrs;\n const { axis } = unpackAttrs;\n return { value: () => stack(dy, axis) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/UnsortedSegmentSum_grad.js\nvar unsortedSegmentSumGradConfig = {\n kernelName: UnsortedSegmentSum,\n inputsToSave: [\"segmentIds\"],\n gradFunc: (dy, saved) => {\n const [segmentIds] = saved;\n const derX = () => {\n return gatherDropNegatives(dy, segmentIds);\n };\n return { x: derX };\n }\n};\nfunction gatherDropNegatives(x, indices) {\n const zeroClippedIndices = maximum(indices, zerosLike(indices));\n const gathered = gather(x, zeroClippedIndices);\n let isPositive = greaterEqual(indices, scalar(0, \"int32\"));\n const numIters = gathered.rank - isPositive.rank;\n for (let i = 0; i < numIters; ++i) {\n isPositive = expandDims(isPositive, i + 1);\n }\n isPositive = logicalAnd(isPositive, ones2(gathered.shape, \"bool\"));\n const zeroSlice = zerosLike(gathered);\n return where(isPositive, gathered, zeroSlice);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/ZerosLike_grad.js\nvar zerosLikeGradConfig = {\n kernelName: ZerosLike,\n gradFunc: (dy) => {\n return { x: () => zerosLike(dy) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/register_all_gradients.js\nvar gradConfigs = [\n absGradConfig,\n acosGradConfig,\n acoshGradConfig,\n addGradConfig,\n addNGradConfig,\n argMaxGradConfig,\n argMinGradConfig,\n asinGradConfig,\n asinhGradConfig,\n atan2GradConfig,\n atanGradConfig,\n atanhGradConfig,\n avgPool3DGradConfig,\n avgPoolGradConfig,\n batchMatMulGradConfig,\n batchToSpaceNDGradConfig,\n broadcastToGradConfig,\n castGradConfig,\n ceilGradConfig,\n clipByValueGradConfig,\n complexAbsGradConfig,\n concatGradConfig,\n conv2DBackpropInputGradConfig,\n conv2DGradConfig,\n conv3DGradConfig,\n cosGradConfig,\n coshGradConfig,\n cumsumGradConfig,\n depthwiseConv2dNativeGradConfig,\n dilation2dGradConfig,\n divGradConfig,\n eluGradConfig,\n erfGradConfig,\n expGradConfig,\n expandDimsGradConfig,\n expm1GradConfig,\n floorDivGradConfig,\n floorGradConfig,\n fusedBatchNormGradConfig,\n gatherGradConfig,\n greaterEqualGradConfig,\n identityGradConfig,\n isFiniteGradConfig,\n isInfGradConfig,\n isNanGradConfig,\n leakyReluGradConfig,\n log1pGradConfig,\n logGradConfig,\n logSoftmaxGradConfig,\n lrnGradConfig,\n maxGradConfig,\n maxGradConfig,\n maximumGradConfig,\n maxPool3DGradConfig,\n maxPoolGradConfig,\n meanGradConfig,\n minGradConfig,\n minimumGradConfig,\n mirrorPadGradConfig,\n modGradConfig,\n multiplyGradConfig,\n negGradConfig,\n oneHotGradConfig,\n onesLikeGradConfig,\n packGradConfig,\n padV2GradConfig,\n padV2GradConfig,\n powGradConfig,\n preluGradConfig,\n prodGradConfig,\n reciprocalGradConfig,\n relu6GradConfig,\n reluGradConfig,\n reshapeGradConfig,\n resizeBilinearGradConfig,\n resizeNearestNeighborGradConfig,\n reverseGradConfig,\n roundGradConfig,\n rsqrtGradConfig,\n selectGradConfig,\n seluGradConfig,\n sigmoidGradConfig,\n signGradConfig,\n sinGradConfig,\n sinhGradConfig,\n sliceGradConfig,\n softmaxGradConfig,\n softplusGradConfig,\n spaceToBatchNDGradConfig,\n spaceToBatchNDGradConfig,\n splitVGradConfig,\n splitVGradConfig,\n sqrtGradConfig,\n squaredDifferenceGradConfig,\n squareGradConfig,\n stepGradConfig,\n subGradConfig,\n sumGradConfig,\n tanGradConfig,\n tanhGradConfig,\n tileGradConfig,\n transposeGradConfig,\n unpackGradConfig,\n unsortedSegmentSumGradConfig,\n zerosLikeGradConfig\n];\nfor (const gradientConfig of gradConfigs) {\n registerGradient(gradientConfig);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/abs.js\ngetGlobalTensorClass().prototype.abs = function() {\n this.throwIfDisposed();\n return abs(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/acos.js\ngetGlobalTensorClass().prototype.acos = function() {\n this.throwIfDisposed();\n return acos(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/acosh.js\ngetGlobalTensorClass().prototype.acosh = function() {\n this.throwIfDisposed();\n return acosh(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/add.js\ngetGlobalTensorClass().prototype.add = function(b) {\n this.throwIfDisposed();\n return add2(this, b);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/all.js\ngetGlobalTensorClass().prototype.all = function(axis, keepDims) {\n this.throwIfDisposed();\n return all(this, axis, keepDims);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/any.js\ngetGlobalTensorClass().prototype.any = function(axis, keepDims) {\n this.throwIfDisposed();\n return any(this, axis, keepDims);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/arg_max.js\ngetGlobalTensorClass().prototype.argMax = function(axis) {\n this.throwIfDisposed();\n return argMax(this, axis);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/arg_min.js\ngetGlobalTensorClass().prototype.argMin = function(axis) {\n this.throwIfDisposed();\n return argMin(this, axis);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as_scalar.js\ngetGlobalTensorClass().prototype.asScalar = function() {\n this.throwIfDisposed();\n assert(this.size === 1, () => \"The array must have only 1 element.\");\n return reshape(this, []);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as_type.js\ngetGlobalTensorClass().prototype.asType = function(dtype) {\n this.throwIfDisposed();\n return cast(this, dtype);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as1d.js\ngetGlobalTensorClass().prototype.as1D = function() {\n this.throwIfDisposed();\n return reshape(this, [this.size]);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as2d.js\ngetGlobalTensorClass().prototype.as2D = function(rows, columns) {\n this.throwIfDisposed();\n return reshape(this, [rows, columns]);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as3d.js\ngetGlobalTensorClass().prototype.as3D = function(rows, columns, depth) {\n this.throwIfDisposed();\n return reshape(this, [rows, columns, depth]);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as4d.js\ngetGlobalTensorClass().prototype.as4D = function(rows, columns, depth, depth2) {\n this.throwIfDisposed();\n return reshape(this, [rows, columns, depth, depth2]);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as5d.js\ngetGlobalTensorClass().prototype.as5D = function(rows, columns, depth, depth2, depth3) {\n this.throwIfDisposed();\n return reshape(this, [rows, columns, depth, depth2, depth3]);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/asin.js\ngetGlobalTensorClass().prototype.asin = function() {\n this.throwIfDisposed();\n return asin(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/asinh.js\ngetGlobalTensorClass().prototype.asinh = function() {\n this.throwIfDisposed();\n return asinh(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/atan.js\ngetGlobalTensorClass().prototype.atan = function() {\n this.throwIfDisposed();\n return atan(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/atan2.js\ngetGlobalTensorClass().prototype.atan2 = function(b) {\n this.throwIfDisposed();\n return atan2(this, b);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/atanh.js\ngetGlobalTensorClass().prototype.atanh = function() {\n this.throwIfDisposed();\n return atanh(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/avg_pool.js\ngetGlobalTensorClass().prototype.avgPool = function(filterSize, strides, pad3, dimRoundingMode) {\n this.throwIfDisposed();\n return avgPool(this, filterSize, strides, pad3, dimRoundingMode);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/batch_to_space_nd.js\ngetGlobalTensorClass().prototype.batchToSpaceND = function(blockShape, crops) {\n this.throwIfDisposed();\n return batchToSpaceND(this, blockShape, crops);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/batchnorm.js\ngetGlobalTensorClass().prototype.batchNorm = function(mean5, variance, offset, scale2, varianceEpsilon) {\n this.throwIfDisposed();\n return batchNorm(this, mean5, variance, offset, scale2, varianceEpsilon);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/broadcast_to.js\ngetGlobalTensorClass().prototype.broadcastTo = function(shape) {\n this.throwIfDisposed();\n return broadcastTo(this, shape);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/cast.js\ngetGlobalTensorClass().prototype.cast = function(dtype) {\n this.throwIfDisposed();\n return cast(this, dtype);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/ceil.js\ngetGlobalTensorClass().prototype.ceil = function() {\n this.throwIfDisposed();\n return ceil(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/clip_by_value.js\ngetGlobalTensorClass().prototype.clipByValue = function(min7, max7) {\n this.throwIfDisposed();\n return clipByValue(this, min7, max7);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/concat.js\ngetGlobalTensorClass().prototype.concat = function(x, axis) {\n this.throwIfDisposed();\n if (x instanceof Tensor) {\n x = [x];\n }\n return concat([this, ...x], axis);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/conv1d.js\ngetGlobalTensorClass().prototype.conv1d = function(filter, stride, pad3, dataFormat, dilation, dimRoundingMode) {\n this.throwIfDisposed();\n return conv1d(this, filter, stride, pad3, dataFormat, dilation, dimRoundingMode);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/conv2d_transpose.js\ngetGlobalTensorClass().prototype.conv2dTranspose = function(filter, outputShape, strides, pad3, dimRoundingMode) {\n this.throwIfDisposed();\n return conv2dTranspose(this, filter, outputShape, strides, pad3, dimRoundingMode);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/conv2d.js\ngetGlobalTensorClass().prototype.conv2d = function(filter, strides, pad3, dataFormat, dilations, dimRoundingMode) {\n this.throwIfDisposed();\n return conv2d(this, filter, strides, pad3, dataFormat, dilations, dimRoundingMode);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/cos.js\ngetGlobalTensorClass().prototype.cos = function() {\n this.throwIfDisposed();\n return cos(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/cosh.js\ngetGlobalTensorClass().prototype.cosh = function() {\n this.throwIfDisposed();\n return cosh(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/cumprod.js\ngetGlobalTensorClass().prototype.cumprod = function(axis, exclusive, reverse5) {\n this.throwIfDisposed();\n return cumprod(this, axis, exclusive, reverse5);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/cumsum.js\ngetGlobalTensorClass().prototype.cumsum = function(axis, exclusive, reverse5) {\n this.throwIfDisposed();\n return cumsum(this, axis, exclusive, reverse5);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/depth_to_space.js\ngetGlobalTensorClass().prototype.depthToSpace = function(blockSize, dataFormat) {\n this.throwIfDisposed();\n return depthToSpace(this, blockSize, dataFormat);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/depthwise_conv2d.js\ngetGlobalTensorClass().prototype.depthwiseConv2d = function(filter, strides, pad3, dataFormat, dilations, dimRoundingMode) {\n this.throwIfDisposed();\n return depthwiseConv2d(this, filter, strides, pad3, dataFormat, dilations, dimRoundingMode);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/dilation2d.js\ngetGlobalTensorClass().prototype.dilation2d = function(filter, strides, pad3, dilations, dataFormat) {\n this.throwIfDisposed();\n return dilation2d(this, filter, strides, pad3, dilations, dataFormat);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/div_no_nan.js\ngetGlobalTensorClass().prototype.divNoNan = function(b) {\n this.throwIfDisposed();\n return divNoNan(this, b);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/div.js\ngetGlobalTensorClass().prototype.div = function(b) {\n this.throwIfDisposed();\n return div(this, b);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/dot.js\ngetGlobalTensorClass().prototype.dot = function(b) {\n this.throwIfDisposed();\n return dot(this, b);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/elu.js\ngetGlobalTensorClass().prototype.elu = function() {\n this.throwIfDisposed();\n return elu(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/equal.js\ngetGlobalTensorClass().prototype.equal = function(b) {\n this.throwIfDisposed();\n return equal(this, b);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/erf.js\ngetGlobalTensorClass().prototype.erf = function() {\n this.throwIfDisposed();\n return erf(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/euclidean_norm.js\ngetGlobalTensorClass().prototype.euclideanNorm = function(axis, keepDims) {\n this.throwIfDisposed();\n return euclideanNorm(this, axis, keepDims);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/exp.js\ngetGlobalTensorClass().prototype.exp = function() {\n this.throwIfDisposed();\n return exp(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/expand_dims.js\ngetGlobalTensorClass().prototype.expandDims = function(axis) {\n this.throwIfDisposed();\n return expandDims(this, axis);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/expm1.js\ngetGlobalTensorClass().prototype.expm1 = function() {\n this.throwIfDisposed();\n return expm1(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/fft.js\ngetGlobalTensorClass().prototype.fft = function() {\n this.throwIfDisposed();\n return fft(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/flatten.js\ngetGlobalTensorClass().prototype.flatten = function() {\n this.throwIfDisposed();\n return reshape(this, [this.size]);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/floor.js\ngetGlobalTensorClass().prototype.floor = function() {\n this.throwIfDisposed();\n return floor(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/floorDiv.js\ngetGlobalTensorClass().prototype.floorDiv = function(b) {\n this.throwIfDisposed();\n return floorDiv(this, b);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/gather.js\ngetGlobalTensorClass().prototype.gather = function(indices, axis) {\n this.throwIfDisposed();\n return gather(this, indices, axis);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/greater_equal.js\ngetGlobalTensorClass().prototype.greaterEqual = function(b) {\n this.throwIfDisposed();\n return greaterEqual(this, b);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/greater.js\ngetGlobalTensorClass().prototype.greater = function(b) {\n this.throwIfDisposed();\n return greater(this, b);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/ifft.js\ngetGlobalTensorClass().prototype.ifft = function() {\n this.throwIfDisposed();\n return ifft(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/irfft.js\ngetGlobalTensorClass().prototype.irfft = function() {\n this.throwIfDisposed();\n return irfft(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/is_finite.js\ngetGlobalTensorClass().prototype.isFinite = function() {\n this.throwIfDisposed();\n return isFinite2(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/is_inf.js\ngetGlobalTensorClass().prototype.isInf = function() {\n this.throwIfDisposed();\n return isInf(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/is_nan.js\ngetGlobalTensorClass().prototype.isNaN = function() {\n this.throwIfDisposed();\n return isNaN2(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/leaky_relu.js\ngetGlobalTensorClass().prototype.leakyRelu = function(alpha) {\n this.throwIfDisposed();\n return leakyRelu(this, alpha);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/less_equal.js\ngetGlobalTensorClass().prototype.lessEqual = function(b) {\n this.throwIfDisposed();\n return lessEqual(this, b);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/less.js\ngetGlobalTensorClass().prototype.less = function(b) {\n this.throwIfDisposed();\n return less(this, b);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/local_response_normalization.js\ngetGlobalTensorClass().prototype.localResponseNormalization = function(depthRadius, bias, alpha, beta) {\n this.throwIfDisposed();\n return localResponseNormalization(this, depthRadius, bias, alpha, beta);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/log_sigmoid.js\ngetGlobalTensorClass().prototype.logSigmoid = function() {\n this.throwIfDisposed();\n return logSigmoid(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/log_softmax.js\ngetGlobalTensorClass().prototype.logSoftmax = function(axis) {\n this.throwIfDisposed();\n return logSoftmax(this, axis);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/log_sum_exp.js\ngetGlobalTensorClass().prototype.logSumExp = function(axis, keepDims) {\n this.throwIfDisposed();\n return logSumExp(this, axis, keepDims);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/log.js\ngetGlobalTensorClass().prototype.log = function() {\n this.throwIfDisposed();\n return log2(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/log1p.js\ngetGlobalTensorClass().prototype.log1p = function() {\n this.throwIfDisposed();\n return log1p(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/logical_and.js\ngetGlobalTensorClass().prototype.logicalAnd = function(b) {\n this.throwIfDisposed();\n return logicalAnd(this, b);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/logical_not.js\ngetGlobalTensorClass().prototype.logicalNot = function() {\n this.throwIfDisposed();\n return logicalNot(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/logical_or.js\ngetGlobalTensorClass().prototype.logicalOr = function(b) {\n this.throwIfDisposed();\n return logicalOr(this, b);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/logical_xor.js\ngetGlobalTensorClass().prototype.logicalXor = function(b) {\n this.throwIfDisposed();\n return logicalXor(this, b);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/mat_mul.js\ngetGlobalTensorClass().prototype.matMul = function(b, transposeA, transposeB) {\n this.throwIfDisposed();\n return matMul(this, b, transposeA, transposeB);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/max_pool.js\ngetGlobalTensorClass().prototype.maxPool = function(filterSize, strides, pad3, dimRoundingMode) {\n this.throwIfDisposed();\n return maxPool(this, filterSize, strides, pad3, dimRoundingMode);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/max.js\ngetGlobalTensorClass().prototype.max = function(axis, keepDims) {\n this.throwIfDisposed();\n return max(this, axis, keepDims);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/maximum.js\ngetGlobalTensorClass().prototype.maximum = function(b) {\n this.throwIfDisposed();\n return maximum(this, b);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/mean.js\ngetGlobalTensorClass().prototype.mean = function(axis, keepDims) {\n this.throwIfDisposed();\n return mean(this, axis, keepDims);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/min.js\ngetGlobalTensorClass().prototype.min = function(axis, keepDims) {\n this.throwIfDisposed();\n return min(this, axis, keepDims);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/minimum.js\ngetGlobalTensorClass().prototype.minimum = function(b) {\n this.throwIfDisposed();\n return minimum(this, b);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/mirror_pad.js\ngetGlobalTensorClass().prototype.mirrorPad = function(paddings, mode) {\n this.throwIfDisposed();\n return mirrorPad(this, paddings, mode);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/mod.js\ngetGlobalTensorClass().prototype.mod = function(b) {\n this.throwIfDisposed();\n return mod(this, b);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/mul.js\ngetGlobalTensorClass().prototype.mul = function(b) {\n this.throwIfDisposed();\n return mul(this, b);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/neg.js\ngetGlobalTensorClass().prototype.neg = function() {\n this.throwIfDisposed();\n return neg(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/norm.js\ngetGlobalTensorClass().prototype.norm = function(ord, axis, keepDims) {\n this.throwIfDisposed();\n return norm(this, ord, axis, keepDims);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/not_equal.js\ngetGlobalTensorClass().prototype.notEqual = function(b) {\n this.throwIfDisposed();\n return notEqual(this, b);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/one_hot.js\ngetGlobalTensorClass().prototype.oneHot = function(depth, onValue = 1, offValue = 0) {\n this.throwIfDisposed();\n return oneHot(this, depth, onValue, offValue);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/ones_like.js\ngetGlobalTensorClass().prototype.onesLike = function() {\n this.throwIfDisposed();\n return onesLike(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/pad.js\ngetGlobalTensorClass().prototype.pad = function(paddings, constantValue) {\n this.throwIfDisposed();\n return pad(this, paddings, constantValue);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/pool.js\ngetGlobalTensorClass().prototype.pool = function(windowShape, poolingType, padding, dilationRate, strides, dimRoundingMode) {\n this.throwIfDisposed();\n return pool(this, windowShape, poolingType, padding, dilationRate, strides, dimRoundingMode);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/pow.js\ngetGlobalTensorClass().prototype.pow = function(exp5) {\n this.throwIfDisposed();\n return pow(this, exp5);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/prelu.js\ngetGlobalTensorClass().prototype.prelu = function(alpha) {\n this.throwIfDisposed();\n return prelu(this, alpha);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/prod.js\ngetGlobalTensorClass().prototype.prod = function(axis, keepDims) {\n this.throwIfDisposed();\n return prod(this, axis, keepDims);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/reciprocal.js\ngetGlobalTensorClass().prototype.reciprocal = function() {\n this.throwIfDisposed();\n return reciprocal(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/relu.js\ngetGlobalTensorClass().prototype.relu = function() {\n this.throwIfDisposed();\n return relu(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/relu6.js\ngetGlobalTensorClass().prototype.relu6 = function() {\n this.throwIfDisposed();\n return relu6(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/reshape_as.js\ngetGlobalTensorClass().prototype.reshapeAs = function(x) {\n this.throwIfDisposed();\n return reshape(this, x.shape);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/reshape.js\ngetGlobalTensorClass().prototype.reshape = function(shape) {\n this.throwIfDisposed();\n return reshape(this, shape);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/resize_bilinear.js\ngetGlobalTensorClass().prototype.resizeBilinear = function(newShape2D, alignCorners, halfPixelCenters) {\n this.throwIfDisposed();\n return resizeBilinear(this, newShape2D, alignCorners, halfPixelCenters);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/resize_nearest_neighbor.js\ngetGlobalTensorClass().prototype.resizeNearestNeighbor = function(newShape2D, alignCorners, halfFloatCenters) {\n this.throwIfDisposed();\n return resizeNearestNeighbor(this, newShape2D, alignCorners, halfFloatCenters);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/reverse.js\ngetGlobalTensorClass().prototype.reverse = function(axis) {\n this.throwIfDisposed();\n return reverse(this, axis);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/rfft.js\ngetGlobalTensorClass().prototype.rfft = function() {\n this.throwIfDisposed();\n return rfft(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/round.js\ngetGlobalTensorClass().prototype.round = function() {\n this.throwIfDisposed();\n return round2(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/rsqrt.js\ngetGlobalTensorClass().prototype.rsqrt = function() {\n this.throwIfDisposed();\n return rsqrt(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/selu.js\ngetGlobalTensorClass().prototype.selu = function() {\n this.throwIfDisposed();\n return selu(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/separable_conv2d.js\ngetGlobalTensorClass().prototype.separableConv2d = function(depthwiseFilter, pointwiseFilter, strides, pad3, dilation, dataFormat) {\n this.throwIfDisposed();\n return separableConv2d(this, depthwiseFilter, pointwiseFilter, strides, pad3, dilation, dataFormat);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sigmoid.js\ngetGlobalTensorClass().prototype.sigmoid = function() {\n this.throwIfDisposed();\n return sigmoid(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sign.js\ngetGlobalTensorClass().prototype.sign = function() {\n this.throwIfDisposed();\n return sign(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sin.js\ngetGlobalTensorClass().prototype.sin = function() {\n this.throwIfDisposed();\n return sin(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sinh.js\ngetGlobalTensorClass().prototype.sinh = function() {\n this.throwIfDisposed();\n return sinh(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/slice.js\ngetGlobalTensorClass().prototype.slice = function(begin, size) {\n this.throwIfDisposed();\n return slice(this, begin, size);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/softmax.js\ngetGlobalTensorClass().prototype.softmax = function(dim) {\n this.throwIfDisposed();\n return softmax(this, dim);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/softplus.js\ngetGlobalTensorClass().prototype.softplus = function() {\n this.throwIfDisposed();\n return softplus(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/space_to_batch_nd.js\ngetGlobalTensorClass().prototype.spaceToBatchND = function(blockShape, paddings) {\n this.throwIfDisposed();\n return spaceToBatchND(this, blockShape, paddings);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/split.js\ngetGlobalTensorClass().prototype.split = function(numOrSizeSplits, axis) {\n this.throwIfDisposed();\n return split(this, numOrSizeSplits, axis);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sqrt.js\ngetGlobalTensorClass().prototype.sqrt = function() {\n this.throwIfDisposed();\n return sqrt(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/square.js\ngetGlobalTensorClass().prototype.square = function() {\n this.throwIfDisposed();\n return square(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/squared_difference.js\ngetGlobalTensorClass().prototype.squaredDifference = function(b) {\n this.throwIfDisposed();\n return squaredDifference(this, b);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/squeeze.js\ngetGlobalTensorClass().prototype.squeeze = function(axis) {\n this.throwIfDisposed();\n return squeeze(this, axis);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/stack.js\ngetGlobalTensorClass().prototype.stack = function(x, axis) {\n this.throwIfDisposed();\n const tensorsToBeStacked = x instanceof Tensor ? [this, x] : [this, ...x];\n return stack(tensorsToBeStacked, axis);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/step.js\ngetGlobalTensorClass().prototype.step = function(alpha) {\n this.throwIfDisposed();\n return step(this, alpha);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/strided_slice.js\ngetGlobalTensorClass().prototype.stridedSlice = function(begin, end, strides, beginMask, endMask, ellipsisMask, newAxisMask, shrinkAxisMask) {\n this.throwIfDisposed();\n return stridedSlice(this, begin, end, strides, beginMask, endMask, ellipsisMask, newAxisMask, shrinkAxisMask);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sub.js\ngetGlobalTensorClass().prototype.sub = function(b) {\n this.throwIfDisposed();\n return sub(this, b);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sum.js\ngetGlobalTensorClass().prototype.sum = function(axis, keepDims) {\n this.throwIfDisposed();\n return sum2(this, axis, keepDims);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/tan.js\ngetGlobalTensorClass().prototype.tan = function() {\n this.throwIfDisposed();\n return tan(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/tanh.js\ngetGlobalTensorClass().prototype.tanh = function() {\n this.throwIfDisposed();\n return tanh2(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/tile.js\ngetGlobalTensorClass().prototype.tile = function(reps) {\n this.throwIfDisposed();\n return tile(this, reps);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/to_bool.js\ngetGlobalTensorClass().prototype.toBool = function() {\n this.throwIfDisposed();\n return cast(this, \"bool\");\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/to_float.js\ngetGlobalTensorClass().prototype.toFloat = function() {\n this.throwIfDisposed();\n return cast(this, \"float32\");\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/to_int.js\ngetGlobalTensorClass().prototype.toInt = function() {\n this.throwIfDisposed();\n return cast(this, \"int32\");\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/topk.js\ngetGlobalTensorClass().prototype.topk = function(k, sorted) {\n this.throwIfDisposed();\n return topk(this, k, sorted);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/transpose.js\ngetGlobalTensorClass().prototype.transpose = function(perm) {\n this.throwIfDisposed();\n return transpose(this, perm);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/unique.js\ngetGlobalTensorClass().prototype.unique = function(axis) {\n this.throwIfDisposed();\n return unique(this, axis);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/unsorted_segment_sum.js\ngetGlobalTensorClass().prototype.unsortedSegmentSum = function(segmentIds, numSegments) {\n this.throwIfDisposed();\n return unsortedSegmentSum(this, segmentIds, numSegments);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/unstack.js\ngetGlobalTensorClass().prototype.unstack = function(axis) {\n this.throwIfDisposed();\n return unstack(this, axis);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/where.js\ngetGlobalTensorClass().prototype.where = function(condition, x) {\n this.throwIfDisposed();\n return where(condition, this, x);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/zeros_like.js\ngetGlobalTensorClass().prototype.zerosLike = function() {\n this.throwIfDisposed();\n return zerosLike(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/errors.js\nvar AttributeError = class extends Error {\n constructor(message) {\n super(message);\n Object.setPrototypeOf(this, AttributeError.prototype);\n }\n};\nvar RuntimeError = class extends Error {\n constructor(message) {\n super(message);\n Object.setPrototypeOf(this, RuntimeError.prototype);\n }\n};\nvar ValueError = class extends Error {\n constructor(message) {\n super(message);\n Object.setPrototypeOf(this, ValueError.prototype);\n }\n};\nvar NotImplementedError = class extends Error {\n constructor(message) {\n super(message);\n Object.setPrototypeOf(this, NotImplementedError.prototype);\n }\n};\nvar AssertionError = class extends Error {\n constructor(message) {\n super(message);\n Object.setPrototypeOf(this, AssertionError.prototype);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/utils/executor_utils.js\nvar LruCache = class {\n constructor(maxEntries) {\n this.maxEntries = maxEntries || 100;\n this.cache = /* @__PURE__ */ new Map();\n }\n get(key) {\n let entry;\n if (this.cache.has(key)) {\n entry = this.cache.get(key);\n this.cache.delete(key);\n this.cache.set(key, entry);\n }\n return entry;\n }\n put(key, value) {\n if (this.cache.has(key)) {\n this.cache.delete(key);\n } else if (this.cache.size >= this.maxEntries) {\n const keyToDelete = this.cache.keys().next().value;\n this.cache.delete(keyToDelete);\n }\n this.cache.set(key, value);\n }\n getMaxEntries() {\n return this.maxEntries;\n }\n setMaxEntries(maxEntries) {\n if (maxEntries < 0) {\n throw new Error(`The maxEntries of LRU caches must be at least 0, but got ${maxEntries}.`);\n }\n if (this.maxEntries > maxEntries) {\n for (let i = 0; i < this.maxEntries - maxEntries; i++) {\n const keyToDelete = this.cache.keys().next().value;\n this.cache.delete(keyToDelete);\n }\n }\n this.maxEntries = maxEntries;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/utils/generic_utils.js\nfunction pyListRepeat(value, numValues) {\n if (Array.isArray(value)) {\n let newArray = [];\n for (let i = 0; i < numValues; i++) {\n newArray = newArray.concat(value);\n }\n return newArray;\n } else {\n const newArray = new Array(numValues);\n newArray.fill(value);\n return newArray;\n }\n}\nfunction assert2(val, message) {\n if (!val) {\n throw new AssertionError(message);\n }\n}\nfunction count(array2, refernce) {\n let counter = 0;\n for (const item of array2) {\n if (item === refernce) {\n counter++;\n }\n }\n return counter;\n}\nfunction singletonOrArray(xs) {\n if (xs.length === 1) {\n return xs[0];\n }\n return xs;\n}\nfunction toList(x) {\n if (Array.isArray(x)) {\n return x;\n }\n return [x];\n}\nfunction toSnakeCase(name) {\n const intermediate = name.replace(/(.)([A-Z][a-z0-9]+)/g, \"$1_$2\");\n const insecure = intermediate.replace(/([a-z])([A-Z])/g, \"$1_$2\").toLowerCase();\n if (insecure[0] !== \"_\") {\n return insecure;\n }\n return \"private\" + insecure;\n}\nfunction toCamelCase(identifier) {\n if (identifier.length <= 1) {\n return identifier;\n }\n if (identifier.indexOf(\"_\") === -1) {\n return identifier;\n }\n return identifier.replace(/[_]+(\\w|$)/g, (m, p1) => p1.toUpperCase());\n}\nvar _GLOBAL_CUSTOM_OBJECTS = {};\nfunction serializeKerasObject(instance) {\n if (instance === null || instance === void 0) {\n return null;\n }\n const dict = {};\n dict[\"className\"] = instance.getClassName();\n dict[\"config\"] = instance.getConfig();\n return dict;\n}\nfunction convertNDArrayScalarsInConfig(config) {\n if (config == null || typeof config !== \"object\") {\n return;\n } else if (Array.isArray(config)) {\n config.forEach((configItem) => convertNDArrayScalarsInConfig(configItem));\n } else {\n const fields = Object.keys(config);\n for (const field of fields) {\n const value = config[field];\n if (value != null && typeof value === \"object\") {\n if (!Array.isArray(value) && value[\"type\"] === \"ndarray\" && typeof value[\"value\"] === \"number\") {\n config[field] = value[\"value\"];\n } else {\n convertNDArrayScalarsInConfig(value);\n }\n }\n }\n }\n}\nfunction deserializeKerasObject(identifier, moduleObjects = {}, customObjects = {}, printableModuleName = \"object\", fastWeightInit = false) {\n if (typeof identifier === \"string\") {\n const functionName = identifier;\n let fn;\n if (functionName in customObjects) {\n fn = customObjects[functionName];\n } else if (functionName in _GLOBAL_CUSTOM_OBJECTS) {\n fn = _GLOBAL_CUSTOM_OBJECTS[functionName];\n } else {\n fn = moduleObjects[functionName];\n if (fn == null) {\n throw new ValueError(`Unknown ${printableModuleName}: ${identifier}. This may be due to one of the following reasons:\n1. The ${printableModuleName} is defined in Python, in which case it needs to be ported to TensorFlow.js or your JavaScript code.\n2. The custom ${printableModuleName} is defined in JavaScript, but is not registered properly with tf.serialization.registerClass().`);\n }\n }\n return fn;\n } else {\n const config = identifier;\n if (config[\"className\"] == null || config[\"config\"] == null) {\n throw new ValueError(`${printableModuleName}: Improper config format: ${JSON.stringify(config)}.\n'className' and 'config' must set.`);\n }\n const className = config[\"className\"];\n let cls, fromConfig;\n if (className in customObjects) {\n [cls, fromConfig] = customObjects[className];\n } else if (className in _GLOBAL_CUSTOM_OBJECTS) {\n [cls, fromConfig] = _GLOBAL_CUSTOM_OBJECTS[\"className\"];\n } else if (className in moduleObjects) {\n [cls, fromConfig] = moduleObjects[className];\n }\n if (cls == null) {\n throw new ValueError(`Unknown ${printableModuleName}: ${className}. This may be due to one of the following reasons:\n1. The ${printableModuleName} is defined in Python, in which case it needs to be ported to TensorFlow.js or your JavaScript code.\n2. The custom ${printableModuleName} is defined in JavaScript, but is not registered properly with tf.serialization.registerClass().`);\n }\n if (fromConfig != null) {\n const customObjectsCombined = {};\n for (const key of Object.keys(_GLOBAL_CUSTOM_OBJECTS)) {\n customObjectsCombined[key] = _GLOBAL_CUSTOM_OBJECTS[key];\n }\n for (const key of Object.keys(customObjects)) {\n customObjectsCombined[key] = customObjects[key];\n }\n const nestedConfig = config[\"config\"];\n nestedConfig[\"customObjects\"] = customObjectsCombined;\n const backupCustomObjects = Object.assign({}, _GLOBAL_CUSTOM_OBJECTS);\n for (const key of Object.keys(customObjects)) {\n _GLOBAL_CUSTOM_OBJECTS[key] = customObjects[key];\n }\n convertNDArrayScalarsInConfig(config[\"config\"]);\n const returnObj = fromConfig(cls, config[\"config\"], customObjects, fastWeightInit);\n _GLOBAL_CUSTOM_OBJECTS = Object.assign({}, backupCustomObjects);\n return returnObj;\n } else {\n const backupCustomObjects = Object.assign({}, _GLOBAL_CUSTOM_OBJECTS);\n for (const key of Object.keys(customObjects)) {\n _GLOBAL_CUSTOM_OBJECTS[key] = customObjects[key];\n }\n const returnObj = new cls(config[\"config\"]);\n _GLOBAL_CUSTOM_OBJECTS = Object.assign({}, backupCustomObjects);\n return returnObj;\n }\n }\n}\nfunction numberCompare(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}\nfunction reverseNumberCompare(a, b) {\n return -1 * numberCompare(a, b);\n}\nfunction unique2(xs) {\n if (xs == null) {\n return xs;\n }\n const out = [];\n for (const x of xs) {\n if (out.indexOf(x) === -1) {\n out.push(x);\n }\n }\n return out;\n}\nfunction isObjectEmpty(obj) {\n if (obj == null) {\n throw new ValueError(`Invalid value in obj: ${JSON.stringify(obj)}`);\n }\n for (const key in obj) {\n if (obj.hasOwnProperty(key)) {\n return false;\n }\n }\n return true;\n}\nfunction checkStringTypeUnionValue(values, label, value) {\n if (value == null) {\n return;\n }\n if (values.indexOf(value) < 0) {\n throw new ValueError(`${value} is not a valid ${label}. Valid values are ${values} or null/undefined.`);\n }\n}\nfunction checkArrayTypeAndLength(x, expectedType, minLength = 0, maxLength = Infinity) {\n assert2(minLength >= 0);\n assert2(maxLength >= minLength);\n return Array.isArray(x) && x.length >= minLength && x.length <= maxLength && x.every((e) => typeof e === expectedType);\n}\nfunction assertPositiveInteger(value, name) {\n if (Array.isArray(value)) {\n util_exports.assert(value.length > 0, () => `${name} is unexpectedly an empty array.`);\n value.forEach((v, i) => assertPositiveInteger(v, `element ${i + 1} of ${name}`));\n } else {\n util_exports.assert(Number.isInteger(value) && value > 0, () => `Expected ${name} to be a positive integer, but got ${formatAsFriendlyString(value)}.`);\n }\n}\nfunction formatAsFriendlyString(value) {\n if (value === null) {\n return \"null\";\n } else if (Array.isArray(value)) {\n return \"[\" + value.map((v) => formatAsFriendlyString(v)).join(\",\") + \"]\";\n } else if (typeof value === \"string\") {\n return `\"${value}\"`;\n } else {\n return `${value}`;\n }\n}\nfunction debounce(f, waitMs, nowFunc) {\n let lastTime = nowFunc != null ? nowFunc() : util_exports.now();\n let lastResult;\n const f2 = (...args) => {\n const now2 = nowFunc != null ? nowFunc() : util_exports.now();\n if (now2 - lastTime < waitMs) {\n return lastResult;\n }\n lastTime = now2;\n lastResult = f(...args);\n return lastResult;\n };\n return f2;\n}\nfunction mapActivationToFusedKernel(activationName) {\n if (activationName === \"relu\") {\n return \"relu\";\n }\n if (activationName === \"linear\") {\n return \"linear\";\n }\n if (activationName === \"elu\") {\n return \"elu\";\n }\n return null;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/backend/state.js\nvar _nextUniqueTensorId = 0;\nfunction getNextUniqueTensorId() {\n return _nextUniqueTensorId++;\n}\nvar _uidPrefixes = {};\nfunction getUid(prefix = \"\") {\n if (!(prefix in _uidPrefixes)) {\n _uidPrefixes[prefix] = 0;\n }\n _uidPrefixes[prefix] += 1;\n return prefix + _uidPrefixes[prefix].toString();\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/keras_format/common.js\nvar VALID_DATA_FORMAT_VALUES = [\"channelsFirst\", \"channelsLast\"];\nvar VALID_INTERPOLATION_FORMAT_VALUES = [\"nearest\", \"bilinear\"];\nvar VALID_PADDING_MODE_VALUES = [\"valid\", \"same\", \"causal\"];\nvar VALID_POOL_MODE_VALUES = [\"max\", \"avg\"];\nvar VALID_BIDIRECTIONAL_MERGE_MODES = [\"sum\", \"mul\", \"concat\", \"ave\"];\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/common.js\nvar nameMap = /* @__PURE__ */ new Map();\nfunction checkDataFormat(value) {\n checkStringTypeUnionValue(VALID_DATA_FORMAT_VALUES, \"DataFormat\", value);\n}\nfunction checkInterpolationFormat(value) {\n checkStringTypeUnionValue(VALID_INTERPOLATION_FORMAT_VALUES, \"InterpolationFormat\", value);\n}\nfunction checkPaddingMode(value) {\n checkStringTypeUnionValue(VALID_PADDING_MODE_VALUES, \"PaddingMode\", value);\n}\nfunction checkPoolMode(value) {\n checkStringTypeUnionValue(VALID_POOL_MODE_VALUES, \"PoolMode\", value);\n}\nvar _nameScopeStack = [];\nvar _nameScopeDivider = \"/\";\nfunction nameScope(name, fn) {\n _nameScopeStack.push(name);\n try {\n const val = fn();\n _nameScopeStack.pop();\n return val;\n } catch (e) {\n _nameScopeStack.pop();\n throw e;\n }\n}\nfunction currentNameScopePrefix() {\n if (_nameScopeStack.length === 0) {\n return \"\";\n } else {\n return _nameScopeStack.join(_nameScopeDivider) + _nameScopeDivider;\n }\n}\nfunction getScopedTensorName(tensorName) {\n if (!isValidTensorName(tensorName)) {\n throw new Error(\"Not a valid tensor name: '\" + tensorName + \"'\");\n }\n return currentNameScopePrefix() + tensorName;\n}\nfunction getUniqueTensorName(scopedName) {\n if (!isValidTensorName(scopedName)) {\n throw new Error(\"Not a valid tensor name: '\" + scopedName + \"'\");\n }\n if (!nameMap.has(scopedName)) {\n nameMap.set(scopedName, 0);\n }\n const index = nameMap.get(scopedName);\n nameMap.set(scopedName, nameMap.get(scopedName) + 1);\n if (index > 0) {\n const result = `${scopedName}_${index}`;\n nameMap.set(result, 1);\n return result;\n } else {\n return scopedName;\n }\n}\nvar tensorNameRegex = new RegExp(/^[A-Za-z0-9][-A-Za-z0-9\\._\\/]*$/);\nfunction isValidTensorName(name) {\n return !!name.match(tensorNameRegex);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/utils/math_utils.js\nfunction isInteger(x) {\n return x === parseInt(x.toString(), 10);\n}\nfunction arrayProd(array2, begin, end) {\n if (begin == null) {\n begin = 0;\n }\n if (end == null) {\n end = array2.length;\n }\n let prod6 = 1;\n for (let i = begin; i < end; ++i) {\n prod6 *= array2[i];\n }\n return prod6;\n}\nfunction min2(array2) {\n if (array2.length === 0) {\n return Number.NaN;\n }\n let min7 = Number.POSITIVE_INFINITY;\n for (let i = 0; i < array2.length; i++) {\n const value = array2[i];\n if (value < min7) {\n min7 = value;\n }\n }\n return min7;\n}\nfunction max2(array2) {\n if (array2.length === 0) {\n return Number.NaN;\n }\n let max7 = Number.NEGATIVE_INFINITY;\n for (let i = 0; i < array2.length; i++) {\n const value = array2[i];\n if (value > max7) {\n max7 = value;\n }\n }\n return max7;\n}\nfunction range2(begin, end) {\n if (end < begin) {\n throw new ValueError(`end (${end}) < begin (${begin}) is forbidden.`);\n }\n const out = [];\n for (let i = begin; i < end; ++i) {\n out.push(i);\n }\n return out;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/backend/common.js\nvar _epsilon;\nfunction epsilon() {\n if (_epsilon == null) {\n _epsilon = backend().epsilon();\n }\n return _epsilon;\n}\nfunction imageDataFormat() {\n return \"channelsLast\";\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/backend/tfjs_backend.js\nfunction cast2(x, dtype) {\n return cast(x, dtype);\n}\nfunction expandDims2(x, axis = -1) {\n const outShape = x.shape.slice();\n if (axis < 0) {\n axis = outShape.length + axis + 1;\n }\n outShape.splice(axis, 0, 1);\n return reshape(x, outShape);\n}\nfunction repeat(x, n) {\n return tidy(() => {\n if (x.shape.length !== 2) {\n throw new ValueError(`repeat() expects a rank-2 tensor, but received a rank-${x.shape.length} tensor.`);\n }\n const y = expandDims2(x, 1);\n return tile2(y, [1, n, 1]);\n });\n}\nfunction flatten2(x) {\n const newShape = [arrayProd(x.shape)];\n return reshape(x, newShape);\n}\nfunction batchFlatten(x) {\n if (x.rank <= 1) {\n throw new ValueError(`batchFlatten requires a minimum rank of 2. Got rank: ${x.rank}.`);\n }\n const newShape = [x.shape[0], arrayProd(x.shape, 1)];\n return reshape(x, newShape);\n}\nfunction sliceAlongFirstAxis(array2, start, size) {\n return tidy(() => {\n switch (array2.rank) {\n case 1:\n return slice1d(array2, start, size);\n case 2:\n return slice2d(array2, [start, 0], [size, array2.shape[1]]);\n case 3:\n return slice3d(array2, [start, 0, 0], [size, array2.shape[1], array2.shape[2]]);\n case 4:\n return slice4d(array2, [start, 0, 0, 0], [size, array2.shape[1], array2.shape[2], array2.shape[3]]);\n case 5:\n return slice(array2, [start, 0, 0, 0, 0], [\n size,\n array2.shape[1],\n array2.shape[2],\n array2.shape[3],\n array2.shape[4]\n ]);\n case 6:\n return slice(array2, [start, 0, 0, 0, 0, 0], [\n size,\n array2.shape[1],\n array2.shape[2],\n array2.shape[3],\n array2.shape[4],\n array2.shape[5]\n ]);\n default:\n throw new ValueError(`sliceAlongFirstAxis() received an unsupported tensor rank: ${array2.rank}`);\n }\n });\n}\nfunction sliceAlongLastAxis(array2, start, size) {\n return tidy(() => {\n switch (array2.rank) {\n case 1:\n return slice1d(array2, start, size);\n case 2:\n return slice2d(array2, [0, start], [array2.shape[0], size]);\n case 3:\n return slice3d(array2, [0, 0, start], [array2.shape[0], array2.shape[1], size]);\n case 4:\n return slice4d(array2, [0, 0, 0, start], [array2.shape[0], array2.shape[1], array2.shape[2], size]);\n default:\n throw new ValueError(`sliceAlongLastAxis() received an unsupported tensor rank: ${array2.rank}`);\n }\n });\n}\nfunction sliceAlongAxis(array2, start, size, axis) {\n return tidy(() => {\n switch (array2.rank) {\n case 1:\n return slice1d(array2, start, size);\n case 2:\n switch (axis) {\n case 1:\n return sliceAlongFirstAxis(array2, start, size);\n case 2:\n return sliceAlongLastAxis(array2, start, size);\n default:\n throw new ValueError(`The axis is not within the rank of the tensor ${axis}`);\n }\n case 3:\n switch (axis) {\n case 1:\n return sliceAlongFirstAxis(array2, start, size);\n case 2:\n return slice3d(array2, [0, start, 0], [array2.shape[0], size, array2.shape[2]]);\n case 3:\n return sliceAlongLastAxis(array2, start, size);\n default:\n throw new ValueError(`The axis is not within the rank of the tensor ${axis}`);\n }\n case 4:\n switch (axis) {\n case 1:\n return sliceAlongFirstAxis(array2, start, size);\n case 2:\n return slice4d(array2, [0, start, 0, 0], [array2.shape[0], size, array2.shape[2], array2.shape[3]]);\n case 3:\n return slice4d(array2, [0, 0, start, 0], [array2.shape[0], array2.shape[1], size, array2.shape[3]]);\n case 4:\n return sliceAlongLastAxis(array2, start, size);\n default:\n throw new ValueError(`The axis is not within the rank of the tensor ${axis}`);\n }\n default:\n throw new ValueError(`sliceAlongLastAxis() received an unsupported tensor rank: ${array2.rank}`);\n }\n });\n}\nfunction concatenate(tensors, axis = -1) {\n let rank;\n if (axis < 0) {\n rank = tensors[0].rank;\n if (rank !== 0) {\n axis = rank;\n } else {\n axis = 0;\n }\n }\n if (axis === tensors[0].rank) {\n axis = -1;\n }\n return concat(tensors, axis);\n}\nfunction concatAlongFirstAxis(a, b) {\n switch (a.rank) {\n case 1:\n return concat1d([a, b]);\n case 2:\n return concat2d([a, b], 0);\n case 3:\n return concat3d([a, b], 0);\n case 4:\n return concat4d([a, b], 0);\n default:\n throw new ValueError(`concatAlongFirstAxis() received an unsupported tensor rank: ${a.rank}`);\n }\n}\nfunction tile2(x, n) {\n if (!Array.isArray(n)) {\n n = [n];\n }\n if (x.rank !== n.length) {\n throw new ValueError(`The length of input n (${n.length}) does not match the number of dimensions in input x (${x.rank})`);\n }\n return tile(x, n);\n}\nfunction randomNormal2(shape, mean5 = 0, stddev = 1, dtype, seed) {\n return randomNormal(shape, mean5, stddev, dtype, seed);\n}\nfunction dot2(a, b, activation2, bias) {\n if (a.rank < 2 || b.rank < 2) {\n throw new NotImplementedError(`dot requires both inputs to be rank >= 2 but got x shape = ${a.shape} and y shape = ${b.shape}`);\n }\n if (b.rank >= 3) {\n const xLastDim = a.shape.slice(-1)[0];\n const ySecondLastDim = b.shape.slice(-2)[0];\n if (xLastDim !== ySecondLastDim) {\n throw new NotImplementedError(`If rank y >= 3, then the second last dim of y must equal the last dim of x but got x shape = ${a.shape} and y shape = ${b.shape}`);\n }\n }\n if (a.rank === 2 && b.rank === 2) {\n const transposeA = false;\n const transposeB = false;\n return fused_ops_exports.matMul({\n a,\n b,\n transposeA,\n transposeB,\n bias: bias ? reshapeBias(a.rank, bias, imageDataFormat()) : null,\n activation: activation2\n });\n } else {\n const aFirstDims = a.shape.slice();\n const aLastDim = aFirstDims.pop();\n a = reshape(a, [-1, aLastDim]);\n const bShape = b.shape.slice();\n const bLastDim = bShape.pop();\n const ySecondLastDim = bShape.pop();\n const yOtherDims = [...bShape, bLastDim];\n const perm = Array.from({ length: b.rank }, (_, i) => {\n if (i === 0) {\n return b.rank - 2;\n } else if (i <= b.rank - 2) {\n return i - 1;\n }\n return i;\n });\n b = reshape(transpose(b, perm), [ySecondLastDim, -1]);\n const outputShape = [...aFirstDims, ...yOtherDims];\n const transposeA = false;\n const transposeB = false;\n return reshape(fused_ops_exports.matMul({\n a,\n b,\n transposeA,\n transposeB,\n bias: bias ? reshapeBias(a.rank, bias, imageDataFormat()) : null,\n activation: activation2\n }), outputShape);\n }\n}\nfunction gather2(reference, indices, axis) {\n return tidy(() => {\n if (Array.isArray(indices)) {\n indices = tensor1d(indices, \"int32\");\n } else {\n indices = cast(indices, \"int32\");\n }\n return gather(reference, indices, axis);\n });\n}\nfunction square2(x) {\n return mul(x, x);\n}\nfunction reshapeBias(xRank, bias, dataFormat) {\n const biasShape = bias.shape;\n if (bias.rank !== 1 && bias.rank !== xRank) {\n throw new ValueError(`Unexpected bias dimensions: ${bias.rank}; expected it to be 1 or ${xRank}`);\n }\n if (xRank === 5) {\n if (dataFormat === \"channelsFirst\") {\n if (biasShape.length === 1) {\n return reshape(bias, [1, biasShape[0], 1, 1, 1]);\n } else {\n return reshape(bias, [1, biasShape[3], biasShape[0], biasShape[1], biasShape[2]]);\n }\n } else if (dataFormat === \"channelsLast\") {\n if (biasShape.length === 1) {\n return reshape(bias, [1, 1, 1, 1, biasShape[0]]);\n } else {\n return reshape(bias, [1].concat(biasShape));\n }\n }\n } else if (xRank === 4) {\n if (dataFormat === \"channelsFirst\") {\n if (biasShape.length === 1) {\n return reshape(bias, [1, biasShape[0], 1, 1]);\n } else {\n return reshape(bias, [1, biasShape[2], biasShape[0], biasShape[1]]);\n }\n } else if (dataFormat === \"channelsLast\") {\n if (biasShape.length === 1) {\n return reshape(bias, [1, 1, 1, biasShape[0]]);\n } else {\n return reshape(bias, [1].concat(biasShape));\n }\n }\n } else if (xRank === 3) {\n if (dataFormat === \"channelsFirst\") {\n if (biasShape.length === 1) {\n return reshape(bias, [1, biasShape[0], 1]);\n } else {\n return reshape(bias, [1, biasShape[1], biasShape[0]]);\n }\n } else if (dataFormat === \"channelsLast\") {\n if (biasShape.length === 1) {\n return reshape(bias, [1, 1, biasShape[0]]);\n } else {\n return reshape(bias, [1].concat(biasShape));\n }\n }\n } else if (xRank < 3) {\n return bias;\n }\n throw new ValueError(`Unsupported input rank by biasAdd: ${bias.rank}`);\n}\nfunction biasAdd(x, bias, dataFormat) {\n return tidy(() => {\n if (dataFormat == null) {\n dataFormat = imageDataFormat();\n }\n checkDataFormat(dataFormat);\n return add2(x, reshapeBias(x.rank, bias, dataFormat));\n });\n}\nfunction elu2(x, alpha = 1) {\n if (alpha !== 1) {\n throw new NotImplementedError(`Support for alpha values other than 1 (${alpha}) is not implemented yet.`);\n }\n return elu(x);\n}\nfunction softsign(x) {\n return tidy(() => div(x, add2(abs(x), 1)));\n}\nfunction dropout2(x, level, noiseShape, seed) {\n return tidy(() => dropout(x, level, noiseShape, seed));\n}\nfunction hardSigmoid(x) {\n return tidy(() => {\n const y = add2(0.5, mul(0.2, x));\n return clipByValue(y, 0, 1);\n });\n}\nfunction inTrainPhase(x, alt, training = false) {\n return training ? x() : alt();\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/keras_format/initializer_config.js\nvar VALID_FAN_MODE_VALUES = [\"fanIn\", \"fanOut\", \"fanAvg\"];\nvar VALID_DISTRIBUTION_VALUES = [\"normal\", \"uniform\", \"truncatedNormal\"];\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/initializers.js\nfunction checkFanMode(value) {\n checkStringTypeUnionValue(VALID_FAN_MODE_VALUES, \"FanMode\", value);\n}\nfunction checkDistribution(value) {\n checkStringTypeUnionValue(VALID_DISTRIBUTION_VALUES, \"Distribution\", value);\n}\nvar Initializer = class extends serialization_exports.Serializable {\n fromConfigUsesCustomObjects() {\n return false;\n }\n getConfig() {\n return {};\n }\n};\nvar Zeros = class extends Initializer {\n apply(shape, dtype) {\n return zeros(shape, dtype);\n }\n};\nZeros.className = \"Zeros\";\nserialization_exports.registerClass(Zeros);\nvar Ones = class extends Initializer {\n apply(shape, dtype) {\n return ones2(shape, dtype);\n }\n};\nOnes.className = \"Ones\";\nserialization_exports.registerClass(Ones);\nvar Constant = class extends Initializer {\n constructor(args) {\n super();\n if (typeof args !== \"object\") {\n throw new ValueError(`Expected argument of type ConstantConfig but got ${args}`);\n }\n if (args.value === void 0) {\n throw new ValueError(`config must have value set but got ${args}`);\n }\n this.value = args.value;\n }\n apply(shape, dtype) {\n return tidy(() => mul(scalar(this.value), ones2(shape, dtype)));\n }\n getConfig() {\n return {\n value: this.value\n };\n }\n};\nConstant.className = \"Constant\";\nserialization_exports.registerClass(Constant);\nvar RandomUniform = class extends Initializer {\n constructor(args) {\n super();\n this.DEFAULT_MINVAL = -0.05;\n this.DEFAULT_MAXVAL = 0.05;\n this.minval = args.minval || this.DEFAULT_MINVAL;\n this.maxval = args.maxval || this.DEFAULT_MAXVAL;\n this.seed = args.seed;\n }\n apply(shape, dtype) {\n return randomUniform(shape, this.minval, this.maxval, dtype);\n }\n getConfig() {\n return { minval: this.minval, maxval: this.maxval, seed: this.seed };\n }\n};\nRandomUniform.className = \"RandomUniform\";\nserialization_exports.registerClass(RandomUniform);\nvar RandomNormal = class extends Initializer {\n constructor(args) {\n super();\n this.DEFAULT_MEAN = 0;\n this.DEFAULT_STDDEV = 0.05;\n this.mean = args.mean || this.DEFAULT_MEAN;\n this.stddev = args.stddev || this.DEFAULT_STDDEV;\n this.seed = args.seed;\n }\n apply(shape, dtype) {\n dtype = dtype || \"float32\";\n if (dtype !== \"float32\" && dtype !== \"int32\") {\n throw new NotImplementedError(`randomNormal does not support dType ${dtype}.`);\n }\n return randomNormal2(shape, this.mean, this.stddev, dtype, this.seed);\n }\n getConfig() {\n return { mean: this.mean, stddev: this.stddev, seed: this.seed };\n }\n};\nRandomNormal.className = \"RandomNormal\";\nserialization_exports.registerClass(RandomNormal);\nvar TruncatedNormal = class extends Initializer {\n constructor(args) {\n super();\n this.DEFAULT_MEAN = 0;\n this.DEFAULT_STDDEV = 0.05;\n this.mean = args.mean || this.DEFAULT_MEAN;\n this.stddev = args.stddev || this.DEFAULT_STDDEV;\n this.seed = args.seed;\n }\n apply(shape, dtype) {\n dtype = dtype || \"float32\";\n if (dtype !== \"float32\" && dtype !== \"int32\") {\n throw new NotImplementedError(`truncatedNormal does not support dType ${dtype}.`);\n }\n return truncatedNormal(shape, this.mean, this.stddev, dtype, this.seed);\n }\n getConfig() {\n return { mean: this.mean, stddev: this.stddev, seed: this.seed };\n }\n};\nTruncatedNormal.className = \"TruncatedNormal\";\nserialization_exports.registerClass(TruncatedNormal);\nvar Identity2 = class extends Initializer {\n constructor(args) {\n super();\n this.gain = args.gain != null ? args.gain : 1;\n }\n apply(shape, dtype) {\n return tidy(() => {\n if (shape.length !== 2 || shape[0] !== shape[1]) {\n throw new ValueError(\"Identity matrix initializer can only be used for 2D square matrices.\");\n } else {\n return mul(this.gain, eye(shape[0]));\n }\n });\n }\n getConfig() {\n return { gain: this.gain };\n }\n};\nIdentity2.className = \"Identity\";\nserialization_exports.registerClass(Identity2);\nfunction computeFans(shape, dataFormat = \"channelsLast\") {\n let fanIn;\n let fanOut;\n checkDataFormat(dataFormat);\n if (shape.length === 2) {\n fanIn = shape[0];\n fanOut = shape[1];\n } else if ([3, 4, 5].indexOf(shape.length) !== -1) {\n if (dataFormat === \"channelsFirst\") {\n const receptiveFieldSize = arrayProd(shape, 2);\n fanIn = shape[1] * receptiveFieldSize;\n fanOut = shape[0] * receptiveFieldSize;\n } else if (dataFormat === \"channelsLast\") {\n const receptiveFieldSize = arrayProd(shape, 0, shape.length - 2);\n fanIn = shape[shape.length - 2] * receptiveFieldSize;\n fanOut = shape[shape.length - 1] * receptiveFieldSize;\n }\n } else {\n const shapeProd = arrayProd(shape);\n fanIn = Math.sqrt(shapeProd);\n fanOut = Math.sqrt(shapeProd);\n }\n return [fanIn, fanOut];\n}\nvar VarianceScaling = class extends Initializer {\n constructor(args) {\n super();\n if (args.scale < 0) {\n throw new ValueError(`scale must be a positive float. Got: ${args.scale}`);\n }\n this.scale = args.scale == null ? 1 : args.scale;\n this.mode = args.mode == null ? \"fanIn\" : args.mode;\n checkFanMode(this.mode);\n this.distribution = args.distribution == null ? \"normal\" : args.distribution;\n checkDistribution(this.distribution);\n this.seed = args.seed;\n }\n apply(shape, dtype) {\n const fans = computeFans(shape);\n const fanIn = fans[0];\n const fanOut = fans[1];\n let scale2 = this.scale;\n if (this.mode === \"fanIn\") {\n scale2 /= Math.max(1, fanIn);\n } else if (this.mode === \"fanOut\") {\n scale2 /= Math.max(1, fanOut);\n } else {\n scale2 /= Math.max(1, (fanIn + fanOut) / 2);\n }\n if (this.distribution === \"normal\") {\n const stddev = Math.sqrt(scale2);\n dtype = dtype || \"float32\";\n if (dtype !== \"float32\" && dtype !== \"int32\") {\n throw new NotImplementedError(`${this.getClassName()} does not support dType ${dtype}.`);\n }\n return truncatedNormal(shape, 0, stddev, dtype, this.seed);\n } else {\n const limit = Math.sqrt(3 * scale2);\n return randomUniform(shape, -limit, limit, dtype);\n }\n }\n getConfig() {\n return {\n scale: this.scale,\n mode: this.mode,\n distribution: this.distribution,\n seed: this.seed\n };\n }\n};\nVarianceScaling.className = \"VarianceScaling\";\nserialization_exports.registerClass(VarianceScaling);\nvar GlorotUniform = class extends VarianceScaling {\n constructor(args) {\n super({\n scale: 1,\n mode: \"fanAvg\",\n distribution: \"uniform\",\n seed: args == null ? null : args.seed\n });\n }\n getClassName() {\n return VarianceScaling.className;\n }\n};\nGlorotUniform.className = \"GlorotUniform\";\nserialization_exports.registerClass(GlorotUniform);\nvar GlorotNormal = class extends VarianceScaling {\n constructor(args) {\n super({\n scale: 1,\n mode: \"fanAvg\",\n distribution: \"normal\",\n seed: args == null ? null : args.seed\n });\n }\n getClassName() {\n return VarianceScaling.className;\n }\n};\nGlorotNormal.className = \"GlorotNormal\";\nserialization_exports.registerClass(GlorotNormal);\nvar HeNormal = class extends VarianceScaling {\n constructor(args) {\n super({\n scale: 2,\n mode: \"fanIn\",\n distribution: \"normal\",\n seed: args == null ? null : args.seed\n });\n }\n getClassName() {\n return VarianceScaling.className;\n }\n};\nHeNormal.className = \"HeNormal\";\nserialization_exports.registerClass(HeNormal);\nvar HeUniform = class extends VarianceScaling {\n constructor(args) {\n super({\n scale: 2,\n mode: \"fanIn\",\n distribution: \"uniform\",\n seed: args == null ? null : args.seed\n });\n }\n getClassName() {\n return VarianceScaling.className;\n }\n};\nHeUniform.className = \"HeUniform\";\nserialization_exports.registerClass(HeUniform);\nvar LeCunNormal = class extends VarianceScaling {\n constructor(args) {\n super({\n scale: 1,\n mode: \"fanIn\",\n distribution: \"normal\",\n seed: args == null ? null : args.seed\n });\n }\n getClassName() {\n return VarianceScaling.className;\n }\n};\nLeCunNormal.className = \"LeCunNormal\";\nserialization_exports.registerClass(LeCunNormal);\nvar LeCunUniform = class extends VarianceScaling {\n constructor(args) {\n super({\n scale: 1,\n mode: \"fanIn\",\n distribution: \"uniform\",\n seed: args == null ? null : args.seed\n });\n }\n getClassName() {\n return VarianceScaling.className;\n }\n};\nLeCunUniform.className = \"LeCunNormal\";\nserialization_exports.registerClass(LeCunUniform);\nvar Orthogonal = class extends Initializer {\n constructor(args) {\n super();\n this.DEFAULT_GAIN = 1;\n this.gain = args.gain == null ? this.DEFAULT_GAIN : args.gain;\n this.seed = args.seed;\n if (this.seed != null) {\n throw new NotImplementedError(\"Random seed is not implemented for Orthogonal Initializer yet.\");\n }\n }\n apply(shape, dtype) {\n return tidy(() => {\n if (shape.length < 2) {\n throw new NotImplementedError(\"Shape must be at least 2D.\");\n }\n if (shape[0] * shape[1] > 2e3) {\n console.warn(`Orthogonal initializer is being called on a matrix with more than 2000 (${shape[0] * shape[1]}) elements: Slowness may result.`);\n }\n const normalizedShape = shape[0] > shape[1] ? [shape[1], shape[0]] : shape;\n const a = randomNormal2(normalizedShape, 0, 1, \"float32\");\n let q = linalg.gramSchmidt(a);\n if (shape[0] > shape[1]) {\n q = transpose(q);\n }\n return mul(this.gain, q);\n });\n }\n getConfig() {\n return {\n gain: this.gain,\n seed: this.seed\n };\n }\n};\nOrthogonal.className = \"Orthogonal\";\nserialization_exports.registerClass(Orthogonal);\nvar INITIALIZER_IDENTIFIER_REGISTRY_SYMBOL_MAP = {\n \"constant\": \"Constant\",\n \"glorotNormal\": \"GlorotNormal\",\n \"glorotUniform\": \"GlorotUniform\",\n \"heNormal\": \"HeNormal\",\n \"heUniform\": \"HeUniform\",\n \"identity\": \"Identity\",\n \"leCunNormal\": \"LeCunNormal\",\n \"leCunUniform\": \"LeCunUniform\",\n \"ones\": \"Ones\",\n \"orthogonal\": \"Orthogonal\",\n \"randomNormal\": \"RandomNormal\",\n \"randomUniform\": \"RandomUniform\",\n \"truncatedNormal\": \"TruncatedNormal\",\n \"varianceScaling\": \"VarianceScaling\",\n \"zeros\": \"Zeros\"\n};\nfunction deserializeInitializer(config, customObjects = {}) {\n return deserializeKerasObject(config, serialization_exports.SerializationMap.getMap().classNameMap, customObjects, \"initializer\");\n}\nfunction serializeInitializer(initializer) {\n return serializeKerasObject(initializer);\n}\nfunction getInitializer(identifier) {\n if (typeof identifier === \"string\") {\n const className = identifier in INITIALIZER_IDENTIFIER_REGISTRY_SYMBOL_MAP ? INITIALIZER_IDENTIFIER_REGISTRY_SYMBOL_MAP[identifier] : identifier;\n if (className === \"GlorotNormal\") {\n return new GlorotNormal();\n } else if (className === \"GlorotUniform\") {\n return new GlorotUniform();\n } else if (className === \"HeNormal\") {\n return new HeNormal();\n } else if (className === \"HeUniform\") {\n return new HeUniform();\n } else if (className === \"LeCunNormal\") {\n return new LeCunNormal();\n } else if (className === \"LeCunUniform\") {\n return new LeCunUniform();\n } else {\n const config = {};\n config[\"className\"] = className;\n config[\"config\"] = {};\n return deserializeInitializer(config);\n }\n } else if (identifier instanceof Initializer) {\n return identifier;\n } else {\n return deserializeInitializer(identifier);\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/utils/types_utils.js\nfunction isArrayOfShapes(x) {\n return Array.isArray(x) && Array.isArray(x[0]);\n}\nfunction normalizeShapeList(x) {\n if (x.length === 0) {\n return [];\n }\n if (!Array.isArray(x[0])) {\n return [x];\n }\n return x;\n}\nfunction getExactlyOneTensor(xs) {\n let x;\n if (Array.isArray(xs)) {\n if (xs.length !== 1) {\n throw new ValueError(`Expected Tensor length to be 1; got ${xs.length}`);\n }\n x = xs[0];\n } else {\n x = xs;\n }\n return x;\n}\nfunction getExactlyOneShape(shapes) {\n if (Array.isArray(shapes) && Array.isArray(shapes[0])) {\n if (shapes.length === 1) {\n shapes = shapes;\n return shapes[0];\n } else {\n throw new ValueError(`Expected exactly 1 Shape; got ${shapes.length}`);\n }\n } else {\n return shapes;\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/utils/variable_utils.js\nfunction countParamsInWeights(weights) {\n let count2 = 0;\n for (const weight of weights) {\n if (weight.shape.length === 0) {\n count2 += 1;\n } else {\n count2 += weight.shape.reduce((a, b) => a * b);\n }\n }\n return count2;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/variables.js\nvar DEFAULT_VARIABLE_NAME_PREFIX = \"Variable\";\nvar LayerVariable = class {\n constructor(val, dtype = \"float32\", name = DEFAULT_VARIABLE_NAME_PREFIX, trainable = true, constraint = null) {\n this.dtype = dtype == null ? \"float32\" : dtype;\n this.shape = val.shape;\n this.id = getNextUniqueTensorId();\n name = name == null ? DEFAULT_VARIABLE_NAME_PREFIX : name;\n this.originalName = getScopedTensorName(name);\n this.name = getUniqueTensorName(this.originalName);\n this.trainable_ = trainable;\n this.constraint = constraint;\n this.val = variable(val, this.trainable_, this.name, this.dtype);\n }\n read() {\n this.assertNotDisposed();\n return this.val;\n }\n write(newVal) {\n this.assertNotDisposed();\n checkShapesMatch(this.val, newVal);\n if (this.val.id !== newVal.id) {\n this.val.assign(newVal);\n if (this.constraint != null) {\n this.val.assign(this.constraint.apply(this.val));\n }\n }\n return this;\n }\n dispose() {\n this.assertNotDisposed();\n this.val.dispose();\n }\n assertNotDisposed() {\n if (this.val.isDisposed) {\n throw new Error(`LayersVariable ${this.name} is already disposed.`);\n }\n }\n get trainable() {\n return this.trainable_;\n }\n set trainable(trainable) {\n this.trainable_ = trainable;\n this.val.trainable = trainable;\n }\n};\nfunction checkShapesMatch(x, y) {\n if (x.shape.toString() !== y.shape.toString()) {\n throw new Error(\"Shape mismatch: \" + JSON.stringify(x.shape) + \" vs. \" + JSON.stringify(y.shape));\n }\n}\nfunction batchGetValue(xs) {\n return xs.map((x) => x.read());\n}\nfunction batchSetValue(variablesAndValues) {\n variablesAndValues.forEach((variableAndValue) => {\n const variable2 = variableAndValue[0];\n variable2.write(variableAndValue[1]);\n });\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/engine/topology.js\nvar InputSpec = class {\n constructor(args) {\n this.dtype = args.dtype;\n this.shape = args.shape;\n if (args.shape != null) {\n this.ndim = args.shape.length;\n } else {\n this.ndim = args.ndim;\n }\n this.maxNDim = args.maxNDim;\n this.minNDim = args.minNDim;\n this.axes = args.axes || {};\n }\n};\nvar SymbolicTensor = class {\n constructor(dtype, shape, sourceLayer, inputs, callArgs, name, outputTensorIndex) {\n this.dtype = dtype;\n this.shape = shape;\n this.sourceLayer = sourceLayer;\n this.inputs = inputs;\n this.callArgs = callArgs;\n this.outputTensorIndex = outputTensorIndex;\n this.id = getNextUniqueTensorId();\n if (name != null) {\n this.originalName = getScopedTensorName(name);\n this.name = getUniqueTensorName(this.originalName);\n }\n this.rank = shape.length;\n }\n};\nvar _nextNodeID = 0;\nvar Node = class {\n constructor(args, callArgs) {\n this.callArgs = callArgs;\n this.id = _nextNodeID++;\n this.outboundLayer = args.outboundLayer;\n this.inboundLayers = args.inboundLayers;\n this.nodeIndices = args.nodeIndices;\n this.tensorIndices = args.tensorIndices;\n this.inputTensors = args.inputTensors;\n this.outputTensors = args.outputTensors;\n this.inputMasks = args.inputMasks;\n this.outputMasks = args.outputMasks;\n this.inputShapes = args.inputShapes;\n this.outputShapes = args.outputShapes;\n for (const layer of args.inboundLayers) {\n if (layer != null) {\n layer.outboundNodes.push(this);\n }\n }\n args.outboundLayer.inboundNodes.push(this);\n }\n getConfig() {\n const inboundNames = [];\n for (const layer of this.inboundLayers) {\n if (layer != null) {\n inboundNames.push(layer.name);\n } else {\n inboundNames.push(null);\n }\n }\n return {\n outboundLayer: this.outboundLayer ? this.outboundLayer.name : null,\n inboundLayers: inboundNames,\n nodeIndices: this.nodeIndices,\n tensorIndices: this.tensorIndices\n };\n }\n};\nvar _nextLayerID = 0;\nvar Layer = class extends serialization_exports.Serializable {\n constructor(args = {}) {\n super();\n this._callHook = null;\n this._addedWeightNames = [];\n this._stateful = false;\n this.id = _nextLayerID++;\n this.activityRegularizer = null;\n this.inputSpec = null;\n this.supportsMasking = false;\n this._trainableWeights = [];\n this._nonTrainableWeights = [];\n this._losses = [];\n this._updates = [];\n this._built = false;\n this.inboundNodes = [];\n this.outboundNodes = [];\n let name = args.name;\n if (!name) {\n const prefix = this.getClassName();\n name = toSnakeCase(prefix) + \"_\" + getUid(prefix);\n }\n this.name = name;\n this.trainable_ = args.trainable == null ? true : args.trainable;\n if (args.inputShape != null || args.batchInputShape != null) {\n let batchInputShape;\n if (args.batchInputShape != null) {\n batchInputShape = args.batchInputShape;\n } else if (args.inputShape != null) {\n let batchSize = null;\n if (args.batchSize != null) {\n batchSize = args.batchSize;\n }\n batchInputShape = [batchSize].concat(args.inputShape);\n }\n this.batchInputShape = batchInputShape;\n let dtype = args.dtype;\n if (dtype == null) {\n dtype = args.inputDType;\n }\n if (dtype == null) {\n dtype = \"float32\";\n }\n this.dtype = dtype;\n }\n if (args.weights != null) {\n this.initialWeights = args.weights;\n } else {\n this.initialWeights = null;\n }\n this._refCount = null;\n this.fastWeightInitDuringBuild = false;\n }\n static nodeKey(layer, nodeIndex) {\n return layer.name + \"_ib-\" + nodeIndex.toString();\n }\n getNodeAtIndex(nodeIndex, attrName) {\n if (this.inboundNodes.length === 0) {\n throw new RuntimeError(`The layer has never been called and thus has no defined ${attrName}.`);\n }\n if (this.inboundNodes.length <= nodeIndex) {\n throw new ValueError(`Asked to get ${attrName} at node ${nodeIndex}, but the layer has only ${this.inboundNodes.length} inbound nodes.`);\n }\n return this.inboundNodes[nodeIndex];\n }\n getInputAt(nodeIndex) {\n return singletonOrArray(this.getNodeAtIndex(nodeIndex, \"input\").inputTensors);\n }\n getOutputAt(nodeIndex) {\n return singletonOrArray(this.getNodeAtIndex(nodeIndex, \"output\").outputTensors);\n }\n get input() {\n if (this.inboundNodes.length > 1) {\n throw new AttributeError(`Layer ${this.name} has multiple inbound nodes, hence the notion of \"layer input\" is ill-defined. Use \\`getInputAt(nodeIndex)\\` instead.`);\n } else if (this.inboundNodes.length === 0) {\n throw new AttributeError(`Layer ${this.name} is not connected, no input to return.`);\n }\n return singletonOrArray(this.getNodeAtIndex(0, \"input\").inputTensors);\n }\n get output() {\n if (this.inboundNodes.length === 0) {\n throw new AttributeError(`Layer ${this.name} has no inbound nodes.`);\n }\n if (this.inboundNodes.length > 1) {\n throw new AttributeError(`Layer ${this.name} has multiple inbound nodes, hence the notion of \"layer output\" is ill-defined. Use \\`getOutputAt(nodeIndex)\\` instead.`);\n }\n return singletonOrArray(this.getNodeAtIndex(0, \"output\").outputTensors);\n }\n get losses() {\n return this._losses;\n }\n calculateLosses() {\n return this.losses.map((lossFn) => lossFn());\n }\n get updates() {\n return this._updates;\n }\n get built() {\n return this._built;\n }\n set built(built) {\n this._built = built;\n }\n get trainable() {\n return this.trainable_;\n }\n set trainable(trainable) {\n this._trainableWeights.forEach((w) => w.trainable = trainable);\n this.trainable_ = trainable;\n }\n get trainableWeights() {\n if (this.trainable_) {\n return this._trainableWeights.filter((w) => w.trainable);\n } else {\n return [];\n }\n }\n set trainableWeights(weights) {\n this._trainableWeights = weights;\n }\n get nonTrainableWeights() {\n if (this.trainable) {\n return this._trainableWeights.filter((w) => !w.trainable).concat(this._nonTrainableWeights);\n } else {\n return this._trainableWeights.concat(this._nonTrainableWeights);\n }\n }\n set nonTrainableWeights(weights) {\n this._nonTrainableWeights = weights;\n }\n get weights() {\n return this.trainableWeights.concat(this.nonTrainableWeights);\n }\n get stateful() {\n return this._stateful;\n }\n resetStates() {\n if (!this.stateful) {\n throw new Error(\"Cannot call the resetStates() method of a non-stateful Layer object.\");\n }\n }\n assertInputCompatibility(inputs) {\n inputs = toList(inputs);\n if (this.inputSpec == null || this.inputSpec.length === 0) {\n return;\n }\n const inputSpec = toList(this.inputSpec);\n if (inputs.length !== inputSpec.length) {\n throw new ValueError(`Layer ${this.name} expects ${inputSpec.length} inputs, but it received ${inputs.length} input tensors. Input received: ${inputs}`);\n }\n for (let inputIndex = 0; inputIndex < inputs.length; inputIndex++) {\n const x = inputs[inputIndex];\n const spec = inputSpec[inputIndex];\n if (spec == null) {\n continue;\n }\n const ndim = x.rank;\n if (spec.ndim != null) {\n if (ndim !== spec.ndim) {\n throw new ValueError(`Input ${inputIndex} is incompatible with layer ${this.name}: expected ndim=${spec.ndim}, found ndim=${ndim}`);\n }\n }\n if (spec.maxNDim != null) {\n if (ndim > spec.maxNDim) {\n throw new ValueError(`Input ${inputIndex} is incompatible with layer ${this.name}: expected max_ndim=${spec.maxNDim}, found ndim=${ndim}`);\n }\n }\n if (spec.minNDim != null) {\n if (ndim < spec.minNDim) {\n throw new ValueError(`Input ${inputIndex} is incompatible with layer ${this.name}: expected min_ndim=${spec.minNDim}, found ndim=${ndim}.`);\n }\n }\n if (spec.dtype != null) {\n if (x.dtype !== spec.dtype) {\n throw new ValueError(`Input ${inputIndex} is incompatible with layer ${this.name} : expected dtype=${spec.dtype}, found dtype=${x.dtype}.`);\n }\n }\n if (spec.axes) {\n const xShape = x.shape;\n for (const key in spec.axes) {\n const axis = Number(key);\n const value = spec.axes[key];\n const xShapeAtAxis = axis >= 0 ? xShape[axis] : xShape[xShape.length + axis];\n if (value != null && [value, null].indexOf(xShapeAtAxis) === -1) {\n throw new ValueError(`Input ${inputIndex} is incompatible with layer ${this.name}: expected axis ${axis} of input shape to have value ${value} but got shape ${xShape}.`);\n }\n }\n }\n if (spec.shape != null) {\n for (let i = 0; i < spec.shape.length; ++i) {\n const specDim = spec.shape[i];\n const dim = x.shape[i];\n if (specDim != null && dim != null) {\n if (specDim !== dim) {\n throw new ValueError(`Input ${inputIndex} is incompatible with layer ${this.name}: expected shape=${spec.shape}, found shape=${x.shape}.`);\n }\n }\n }\n }\n }\n }\n call(inputs, kwargs) {\n return inputs;\n }\n invokeCallHook(inputs, kwargs) {\n if (this._callHook != null) {\n this._callHook(inputs, kwargs);\n }\n }\n setCallHook(callHook) {\n this._callHook = callHook;\n }\n clearCallHook() {\n this._callHook = null;\n }\n apply(inputs, kwargs) {\n kwargs = kwargs || {};\n this.assertNotDisposed();\n const inputsList = toList(inputs);\n let allAreSymbolic = true;\n for (const input2 of inputsList) {\n if (!(input2 instanceof SymbolicTensor)) {\n allAreSymbolic = false;\n break;\n }\n }\n let noneAreSymbolic = true;\n for (const input2 of inputsList) {\n if (input2 instanceof SymbolicTensor) {\n noneAreSymbolic = false;\n break;\n }\n }\n if (allAreSymbolic === noneAreSymbolic) {\n throw new ValueError(\"Arguments to apply() must be all SymbolicTensors or all Tensors\");\n }\n return nameScope(this.name, () => {\n if (!this.built) {\n this.assertInputCompatibility(inputs);\n const inputShapes = [];\n for (const xElem of toList(inputs)) {\n inputShapes.push(xElem.shape);\n }\n this.build(singletonOrArray(inputShapes));\n this.built = true;\n if (this.initialWeights) {\n this.setWeights(this.initialWeights);\n }\n if (this._refCount === null && noneAreSymbolic) {\n this._refCount = 1;\n }\n }\n this.assertInputCompatibility(inputs);\n if (noneAreSymbolic) {\n let output = this.call(inputs, kwargs);\n const outputList = toList(output);\n const outputListCopy = [];\n for (let x of outputList) {\n if (inputsList.indexOf(x) !== -1) {\n x = x.clone();\n }\n outputListCopy.push(x);\n }\n output = singletonOrArray(outputListCopy);\n if (this.activityRegularizer != null) {\n throw new NotImplementedError(\"Layer invocation in the presence of activity regularizer(s) is not supported yet.\");\n }\n return output;\n } else {\n const inputShape = collectInputShape(inputs);\n const outputShape = this.computeOutputShape(inputShape);\n let output;\n const outputDType = guessOutputDType(inputs);\n this.warnOnIncompatibleInputShape(Array.isArray(inputs) ? inputShape[0] : inputShape);\n if (outputShape != null && outputShape.length > 0 && Array.isArray(outputShape[0])) {\n output = outputShape.map((shape, index) => new SymbolicTensor(outputDType, shape, this, toList(inputs), kwargs, this.name, index));\n } else {\n output = new SymbolicTensor(outputDType, outputShape, this, toList(inputs), kwargs, this.name);\n }\n this.addInboundNode(inputs, output, null, null, inputShape, outputShape, kwargs);\n this._refCount++;\n if (this.activityRegularizer != null) {\n throw new NotImplementedError(\"Layer invocation in the presence of activity regularizer(s) is not supported yet.\");\n }\n return output;\n }\n });\n }\n warnOnIncompatibleInputShape(inputShape) {\n if (this.batchInputShape == null) {\n return;\n } else if (inputShape.length !== this.batchInputShape.length) {\n console.warn(`The rank of the input tensor provided (shape: ${JSON.stringify(inputShape)}) does not match that of the batchInputShape (${JSON.stringify(this.batchInputShape)}) of the layer ${this.name}`);\n } else {\n let dimMismatch = false;\n this.batchInputShape.forEach((dimension, i) => {\n if (dimension != null && inputShape[i] != null && inputShape[i] !== dimension) {\n dimMismatch = true;\n }\n });\n if (dimMismatch) {\n console.warn(`The shape of the input tensor (${JSON.stringify(inputShape)}) does not match the expectation of layer ${this.name}: ${JSON.stringify(this.batchInputShape)}`);\n }\n }\n }\n get outputShape() {\n if (this.inboundNodes == null || this.inboundNodes.length === 0) {\n throw new AttributeError(`The layer ${this.name} has never been called and thus has no defined output shape.`);\n }\n const allOutputShapes = [];\n for (const node of this.inboundNodes) {\n const shapeString = JSON.stringify(node.outputShapes);\n if (allOutputShapes.indexOf(shapeString) === -1) {\n allOutputShapes.push(shapeString);\n }\n }\n if (allOutputShapes.length === 1) {\n const outputShapes = this.inboundNodes[0].outputShapes;\n if (Array.isArray(outputShapes) && Array.isArray(outputShapes[0]) && outputShapes.length === 1) {\n return outputShapes[0];\n } else {\n return outputShapes;\n }\n } else {\n throw new AttributeError(`The layer ${this.name} has multiple inbound nodes with different output shapes. Hence the notion of \"output shape\" is ill-defined for the layer.`);\n }\n }\n countParams() {\n if (!this.built) {\n throw new RuntimeError(`You tried to call countParams() on ${this.name}, but the layer is not built yet. Build it first by calling build(batchInputShape).`);\n }\n return countParamsInWeights(this.weights);\n }\n build(inputShape) {\n this.built = true;\n }\n getWeights(trainableOnly = false) {\n return batchGetValue(trainableOnly ? this.trainableWeights : this.weights);\n }\n setWeights(weights) {\n tidy(() => {\n const params = this.weights;\n if (params.length !== weights.length) {\n throw new ValueError(`You called setWeights(weights) on layer \"${this.name}\" with a weight list of length ${weights.length}, but the layer was expecting ${params.length} weights. Provided weights: ${weights}...`);\n }\n if (params.length === 0) {\n return;\n }\n const weightValueTuples = [];\n const paramValues = batchGetValue(params);\n for (let i = 0; i < paramValues.length; ++i) {\n const pv = paramValues[i];\n const p2 = params[i];\n const w = weights[i];\n if (!util_exports.arraysEqual(pv.shape, w.shape)) {\n throw new ValueError(`Layer weight shape ${pv.shape} not compatible with provided weight shape ${w.shape}`);\n }\n weightValueTuples.push([p2, w]);\n }\n batchSetValue(weightValueTuples);\n });\n }\n addWeight(name, shape, dtype, initializer, regularizer, trainable, constraint, getInitializerFunc) {\n if (this._addedWeightNames.indexOf(name) !== -1) {\n throw new ValueError(`Duplicate weight name ${name} for layer ${this.name}`);\n }\n this._addedWeightNames.push(name);\n if (dtype == null) {\n dtype = \"float32\";\n }\n if (this.fastWeightInitDuringBuild) {\n initializer = getInitializerFunc != null ? getInitializerFunc() : getInitializer(\"zeros\");\n }\n const initValue = initializer.apply(shape, dtype);\n const weight = new LayerVariable(initValue, dtype, name, trainable, constraint);\n initValue.dispose();\n if (regularizer != null) {\n this.addLoss(() => regularizer.apply(weight.read()));\n }\n if (trainable == null) {\n trainable = true;\n }\n if (trainable) {\n this._trainableWeights.push(weight);\n } else {\n this._nonTrainableWeights.push(weight);\n }\n return weight;\n }\n setFastWeightInitDuringBuild(value) {\n this.fastWeightInitDuringBuild = value;\n }\n addLoss(losses2) {\n if (losses2 == null || Array.isArray(losses2) && losses2.length === 0) {\n return;\n }\n losses2 = toList(losses2);\n if (this._losses !== void 0 && this._losses !== null) {\n this.losses.push(...losses2);\n }\n }\n computeOutputShape(inputShape) {\n return inputShape;\n }\n computeMask(inputs, mask) {\n if (!this.supportsMasking) {\n if (mask != null) {\n if (Array.isArray(mask)) {\n mask.forEach((maskElement) => {\n if (maskElement != null) {\n throw new TypeError(`Layer ${this.name} does not support masking, but was passed an inputMask.`);\n }\n });\n } else {\n throw new TypeError(`Layer ${this.name} does not support masking, but was passed an inputMask.`);\n }\n }\n return null;\n }\n return mask;\n }\n addInboundNode(inputTensors, outputTensors, inputMasks, outputMasks, inputShapes, outputShapes, kwargs = null) {\n const inputTensorList = toList(inputTensors);\n outputTensors = toList(outputTensors);\n inputMasks = toList(inputMasks);\n outputMasks = toList(outputMasks);\n inputShapes = normalizeShapeList(inputShapes);\n outputShapes = normalizeShapeList(outputShapes);\n const inboundLayers = [];\n const nodeIndices = [];\n const tensorIndices = [];\n for (const x of inputTensorList) {\n inboundLayers.push(x.sourceLayer);\n nodeIndices.push(x.nodeIndex);\n tensorIndices.push(x.tensorIndex);\n }\n new Node({\n outboundLayer: this,\n inboundLayers,\n nodeIndices,\n tensorIndices,\n inputTensors: inputTensorList,\n outputTensors,\n inputMasks,\n outputMasks,\n inputShapes,\n outputShapes\n }, kwargs);\n for (let i = 0; i < outputTensors.length; i++) {\n outputTensors[i].sourceLayer = this;\n outputTensors[i].nodeIndex = this.inboundNodes.length - 1;\n outputTensors[i].tensorIndex = i;\n }\n }\n getConfig() {\n const config = { name: this.name, trainable: this.trainable };\n if (this.batchInputShape != null) {\n config[\"batchInputShape\"] = this.batchInputShape;\n }\n if (this.dtype != null) {\n config[\"dtype\"] = this.dtype;\n }\n return config;\n }\n disposeWeights() {\n this.weights.forEach((weight) => weight.dispose());\n return this.weights.length;\n }\n assertNotDisposed() {\n if (this._refCount === 0) {\n throw new Error(`Layer '${this.name}' is already disposed.`);\n }\n }\n dispose() {\n if (!this.built) {\n throw new Error(`Cannot dispose Layer ${this.name} because it has not been built yet.`);\n }\n if (this._refCount === null) {\n throw new Error(`Cannot dispose Layer ${this.name} because it has not been used yet.`);\n }\n this.assertNotDisposed();\n let numDisposedVariables = 0;\n if (--this._refCount === 0) {\n numDisposedVariables = this.disposeWeights();\n }\n return { refCountAfterDispose: this._refCount, numDisposedVariables };\n }\n};\nfunction collectInputShape(inputTensors) {\n inputTensors = toList(inputTensors);\n const shapes = [];\n for (const x of inputTensors) {\n shapes.push(x.shape);\n }\n return singletonOrArray(shapes);\n}\nfunction guessOutputDType(inputTensors) {\n return \"float32\";\n}\nfunction getSourceInputs(tensor2, layer, nodeIndex) {\n if (layer == null || nodeIndex != null && nodeIndex > 0) {\n layer = tensor2.sourceLayer;\n nodeIndex = tensor2.nodeIndex;\n }\n if (layer.inboundNodes.length === 0) {\n return [tensor2];\n } else {\n const node = layer.inboundNodes[nodeIndex];\n if (node.inboundLayers.length === 0) {\n return node.inputTensors;\n } else {\n const sourceTensors = [];\n for (let i = 0; i < node.inboundLayers.length; i++) {\n const x = node.inputTensors[i];\n const layer2 = node.inboundLayers[i];\n const nodeIndex2 = node.nodeIndices[i];\n const previousSources = getSourceInputs(x, layer2, nodeIndex2);\n for (const x2 of previousSources) {\n if (sourceTensors.indexOf(x2) === -1) {\n sourceTensors.push(x2);\n }\n }\n }\n return sourceTensors;\n }\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/engine/input_layer.js\nvar InputLayer = class extends Layer {\n constructor(args) {\n super({\n dtype: args.dtype,\n name: args.name != null ? args.name : getUid(\"input\").toString()\n });\n if (args.batchSize == null) {\n args.batchSize = null;\n }\n if (args.sparse == null) {\n args.sparse = false;\n }\n this.trainable = false;\n this.built = true;\n this.sparse = args.sparse;\n if (args.inputShape != null && args.batchInputShape != null) {\n throw new ValueError(\"Only provide the inputShape OR batchInputShape argument to inputLayer, not both at the same time.\");\n }\n let batchInputShape = args.batchInputShape;\n if (batchInputShape == null) {\n if (args.inputShape == null) {\n throw new ValueError(\"An InputLayer should be passed either a `batchInputShape` or an `inputShape`.\");\n } else {\n batchInputShape = [args.batchSize].concat(args.inputShape);\n }\n } else {\n if (args.batchSize != null) {\n throw new ValueError(\"Cannot specify batchSize if batchInputShape is specified when creating an InputLayer.\");\n }\n }\n const dtype = args.dtype || \"float32\";\n this.batchInputShape = batchInputShape;\n this.dtype = dtype;\n this.inputSpec = [{ shape: batchInputShape }];\n const inputTensor = new SymbolicTensor(this.dtype, this.batchInputShape, this, [], {}, this.name);\n inputTensor.nodeIndex = 0;\n inputTensor.tensorIndex = 0;\n new Node({\n outboundLayer: this,\n inboundLayers: [],\n nodeIndices: [],\n tensorIndices: [],\n inputTensors: [inputTensor],\n outputTensors: [inputTensor],\n inputMasks: [null],\n outputMasks: [null],\n inputShapes: [batchInputShape],\n outputShapes: [batchInputShape]\n });\n }\n apply(inputs, kwargs) {\n throw new ValueError(`Cannot pass any input to an InputLayer's apply() method. InputLayer name: ${this.name}`);\n }\n dispose() {\n return { refCountAfterDispose: this._refCount, numDisposedVariables: 0 };\n }\n getConfig() {\n return {\n batchInputShape: this.batchInputShape,\n dtype: this.dtype,\n sparse: this.sparse,\n name: this.name\n };\n }\n};\nInputLayer.className = \"InputLayer\";\nserialization_exports.registerClass(InputLayer);\nfunction Input(config) {\n if (config.batchShape == null && config.shape == null) {\n throw new Error(\"Please provide to Input either a `shape` or a `batchShape` argument. Note that `shape` does not include the batch dimension.\");\n }\n if (config.batchShape != null && config.shape != null) {\n throw new ValueError(\"Please provide either a `shape` or `batchShape` argument to Input, but not both.\");\n }\n let batchShape = config.batchShape;\n if (config.shape != null && batchShape == null) {\n batchShape = [null].concat(config.shape);\n }\n let dtype = config.dtype;\n if (dtype == null) {\n dtype = \"float32\";\n }\n const inputLayer2 = new InputLayer({\n batchInputShape: batchShape,\n name: config.name,\n dtype,\n sparse: config.sparse\n });\n const outputs = inputLayer2.inboundNodes[0].outputTensors;\n return outputs[0];\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/engine/executor.js\nfunction assertFeedCompatibility(key, val) {\n if (key.dtype == null || key.dtype === val.dtype) {\n return val;\n }\n try {\n return cast(val, key.dtype);\n } catch (err) {\n throw new ValueError(`The dtype of the feed (${val.dtype}) can not be cast to the dtype of the key '${key.name}' (${key.dtype}).`);\n }\n}\nvar FeedDict = class {\n constructor(feeds) {\n this.id2Value = {};\n this.id2Mask = {};\n this.name2Id = {};\n if (feeds instanceof FeedDict) {\n for (const id in feeds.id2Value) {\n this.id2Value[id] = feeds.id2Value[id];\n if (id in feeds.id2Mask) {\n this.id2Mask[id] = feeds.id2Mask[id];\n }\n }\n } else {\n if (feeds == null) {\n return;\n }\n for (const feed of feeds) {\n this.add(feed.key, feed.value);\n }\n }\n }\n add(key, value, mask) {\n if (this.id2Value[key.id] == null) {\n this.id2Value[key.id] = assertFeedCompatibility(key, value);\n this.name2Id[key.name] = key.id;\n if (mask != null) {\n this.id2Mask[key.id] = mask;\n }\n } else {\n throw new ValueError(`Duplicate key: name=${key.name}, id=${key.id}`);\n }\n return this;\n }\n addFeed(feed) {\n this.add(feed.key, feed.value);\n }\n hasKey(key) {\n return this.id2Value[key.id] != null;\n }\n names() {\n return Object.keys(this.name2Id);\n }\n getValue(key) {\n if (key instanceof SymbolicTensor) {\n if (this.id2Value[key.id] == null) {\n throw new ValueError(`Nonexistent key: ${key.name}`);\n } else {\n return this.id2Value[key.id];\n }\n } else {\n const id = this.name2Id[key];\n if (id == null) {\n throw new ValueError(`Feed dict has no SymbolicTensor name: ${key}`);\n }\n return this.id2Value[id];\n }\n }\n getMask(key) {\n if (key instanceof SymbolicTensor) {\n if (this.id2Value[key.id] == null) {\n throw new ValueError(`Nonexistent key: ${key.name}`);\n } else {\n return this.id2Mask[key.id];\n }\n } else {\n const id = this.name2Id[key];\n if (id == null) {\n throw new ValueError(`Feed dict has no SymbolicTensor name: ${key}`);\n }\n return this.id2Mask[id];\n }\n }\n disposeMasks() {\n if (this.id2Mask != null) {\n dispose(this.id2Mask);\n }\n }\n};\nvar cachedSorted = new LruCache();\nvar cachedRecipientCounts = new LruCache();\nfunction updateCacheMaxEntries(maxEntries) {\n if (cachedSorted != null) {\n cachedSorted.setMaxEntries(maxEntries);\n }\n if (cachedRecipientCounts != null) {\n cachedRecipientCounts.setMaxEntries(maxEntries);\n }\n}\nfunction execute(fetches, feedDict, kwargs, probe) {\n const training = kwargs == null ? false : kwargs[\"training\"];\n const arrayFetches = Array.isArray(fetches);\n const fetchArray = arrayFetches ? fetches : [fetches];\n const outputNames = fetchArray.map((t) => t.name);\n const finalOutputs = [];\n const feedNames = feedDict.names();\n for (const outputName of outputNames) {\n if (feedNames.indexOf(outputName) !== -1) {\n finalOutputs.push(feedDict.getValue(outputName));\n } else {\n finalOutputs.push(null);\n }\n }\n if (probe != null) {\n probe.maxNumTensors = -Infinity;\n probe.minNumTensors = Infinity;\n }\n const fetchAndFeedKey = outputNames.join(\",\") + \"|\" + feedDict.names().sort().join(\",\");\n let sorted = cachedSorted.get(fetchAndFeedKey);\n let recipientCounts;\n if (sorted == null) {\n const out = getTopologicalSortAndRecipientCounts(fetchArray, feedDict);\n sorted = out.sorted;\n recipientCounts = out.recipientCounts;\n cachedSorted.put(fetchAndFeedKey, sorted);\n cachedRecipientCounts.put(fetchAndFeedKey, recipientCounts);\n }\n recipientCounts = {};\n if (!training) {\n Object.assign(recipientCounts, cachedRecipientCounts.get(fetchAndFeedKey));\n }\n const internalFeedDict = new FeedDict(feedDict);\n for (let i = 0; i < sorted.length; ++i) {\n if (probe != null) {\n const numTensors = memory().numTensors;\n if (numTensors > probe.maxNumTensors) {\n probe.maxNumTensors = numTensors;\n }\n if (numTensors < probe.minNumTensors) {\n probe.minNumTensors = numTensors;\n }\n }\n const symbolic = sorted[i];\n const srcLayer = symbolic.sourceLayer;\n if (srcLayer instanceof InputLayer) {\n continue;\n }\n const inputValues = [];\n const inputMasks = [];\n const tensorsToDispose = [];\n let maskExists = false;\n for (const input2 of symbolic.inputs) {\n const value = internalFeedDict.getValue(input2);\n const mask = internalFeedDict.getMask(input2);\n inputValues.push(value);\n inputMasks.push(mask);\n if (mask != null) {\n maskExists = true;\n }\n if (!training) {\n recipientCounts[input2.name]--;\n if (recipientCounts[input2.name] === 0 && !feedDict.hasKey(input2) && outputNames.indexOf(input2.name) === -1 && !value.isDisposed && input2.sourceLayer.stateful !== true) {\n tensorsToDispose.push(value);\n }\n }\n }\n if (maskExists) {\n kwargs = kwargs || {};\n kwargs[\"mask\"] = inputMasks[0];\n }\n const outputTensors = toList(srcLayer.apply(inputValues, kwargs));\n let outputMask = null;\n if (srcLayer.supportsMasking) {\n outputMask = srcLayer.computeMask(inputValues, inputMasks);\n }\n const layerOutputs = getNodeOutputs(symbolic);\n const outputSymbolicTensors = Array.isArray(layerOutputs) ? layerOutputs : [layerOutputs];\n for (let i2 = 0; i2 < outputSymbolicTensors.length; ++i2) {\n if (!internalFeedDict.hasKey(outputSymbolicTensors[i2])) {\n internalFeedDict.add(outputSymbolicTensors[i2], outputTensors[i2], Array.isArray(outputMask) ? outputMask[0] : outputMask);\n }\n const index = outputNames.indexOf(outputSymbolicTensors[i2].name);\n if (index !== -1) {\n finalOutputs[index] = outputTensors[i2];\n }\n }\n if (!training) {\n dispose(tensorsToDispose);\n }\n }\n internalFeedDict.disposeMasks();\n return arrayFetches ? finalOutputs : finalOutputs[0];\n}\nfunction getTopologicalSortAndRecipientCounts(fetches, feedDict) {\n util_exports.assert(fetches != null && fetches.length > 0, () => `Expected at least one fetch, got none`);\n let finalSorted = [];\n let finalRecipientMap = {};\n if (fetches.length === 1) {\n const out = getTopologicalSortAndRecipientCountsForOneFetch(fetches[0], feedDict);\n finalSorted = out.sorted;\n finalRecipientMap = out.recipientMap;\n } else {\n const visited = /* @__PURE__ */ new Set();\n for (const fetch4 of fetches) {\n const { sorted, recipientMap } = getTopologicalSortAndRecipientCountsForOneFetch(fetch4, feedDict);\n for (const symbolicTensor of sorted) {\n if (!visited.has(symbolicTensor.name)) {\n finalSorted.push(symbolicTensor);\n visited.add(symbolicTensor.name);\n }\n }\n for (const name in recipientMap) {\n if (finalRecipientMap[name] == null) {\n finalRecipientMap[name] = /* @__PURE__ */ new Set();\n }\n recipientMap[name].forEach((recipient) => finalRecipientMap[name].add(recipient));\n }\n }\n }\n return {\n sorted: finalSorted,\n recipientCounts: recipientMap2Counts(finalRecipientMap)\n };\n}\nfunction recipientMap2Counts(recipientMap) {\n const recipientCounts = {};\n for (const name in recipientMap) {\n recipientCounts[name] = recipientMap[name].size;\n }\n return recipientCounts;\n}\nfunction getTopologicalSortAndRecipientCountsForOneFetch(fetch4, feedDict) {\n const visited = /* @__PURE__ */ new Set();\n const sorted = [];\n const recipientMap = {};\n for (const key of feedDict.names()) {\n visited.add(key);\n }\n const stack2 = [];\n const marks = [];\n stack2.push(fetch4);\n while (stack2.length > 0) {\n const top = stack2[stack2.length - 1];\n if (visited.has(top.name)) {\n stack2.pop();\n continue;\n }\n const topIsMarked = marks[marks.length - 1] === stack2.length - 1;\n if (top.inputs.length === 0 || topIsMarked) {\n stack2.pop();\n sorted.push(top);\n visited.add(top.name);\n if (topIsMarked) {\n marks.pop();\n }\n } else {\n marks.push(stack2.length - 1);\n for (const input2 of top.inputs) {\n if (recipientMap[input2.name] == null) {\n recipientMap[input2.name] = /* @__PURE__ */ new Set();\n }\n recipientMap[input2.name].add(top.name);\n if (visited.has(input2.name)) {\n continue;\n }\n stack2.push(input2);\n }\n }\n }\n return { sorted, recipientMap };\n}\nfunction getNodeOutputs(fetch4) {\n let layerOutputs;\n if (fetch4.sourceLayer.inboundNodes.length === 1) {\n layerOutputs = fetch4.sourceLayer.output;\n } else {\n let nodeIndex = null;\n for (let i = 0; i < fetch4.sourceLayer.inboundNodes.length; ++i) {\n for (const outputTensor of fetch4.sourceLayer.inboundNodes[i].outputTensors) {\n if (outputTensor.id === fetch4.id) {\n nodeIndex = i;\n break;\n }\n }\n }\n layerOutputs = fetch4.sourceLayer.getOutputAt(nodeIndex);\n }\n return layerOutputs;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/flags_layers.js\nvar ENV3 = env();\nENV3.registerFlag(\"TOPOLOGICAL_SORT_CACHE_MAX_ENTRIES\", () => 100, updateCacheMaxEntries);\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/exports_constraints.js\nvar exports_constraints_exports = {};\n__export(exports_constraints_exports, {\n maxNorm: () => maxNorm,\n minMaxNorm: () => minMaxNorm,\n nonNeg: () => nonNeg,\n unitNorm: () => unitNorm\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/constraints.js\nfunction calcL2Norms(w, axis) {\n return tidy(() => sqrt(sum2(mul(w, w), axis, true)));\n}\nvar Constraint = class extends serialization_exports.Serializable {\n getConfig() {\n return {};\n }\n};\nvar MaxNorm = class extends Constraint {\n constructor(args) {\n super();\n this.defaultMaxValue = 2;\n this.defaultAxis = 0;\n this.maxValue = args.maxValue != null ? args.maxValue : this.defaultMaxValue;\n this.axis = args.axis != null ? args.axis : this.defaultAxis;\n }\n apply(w) {\n return tidy(() => {\n const norms = calcL2Norms(w, this.axis);\n const desired = clipByValue(norms, 0, this.maxValue);\n return mul(w, div(desired, add2(epsilon(), norms)));\n });\n }\n getConfig() {\n return { maxValue: this.maxValue, axis: this.axis };\n }\n};\nMaxNorm.className = \"MaxNorm\";\nserialization_exports.registerClass(MaxNorm);\nvar UnitNorm = class extends Constraint {\n constructor(args) {\n super();\n this.defaultAxis = 0;\n this.axis = args.axis != null ? args.axis : this.defaultAxis;\n }\n apply(w) {\n return tidy(() => div(w, add2(epsilon(), calcL2Norms(w, this.axis))));\n }\n getConfig() {\n return { axis: this.axis };\n }\n};\nUnitNorm.className = \"UnitNorm\";\nserialization_exports.registerClass(UnitNorm);\nvar NonNeg = class extends Constraint {\n apply(w) {\n return relu(w);\n }\n};\nNonNeg.className = \"NonNeg\";\nserialization_exports.registerClass(NonNeg);\nvar MinMaxNorm = class extends Constraint {\n constructor(args) {\n super();\n this.defaultMinValue = 0;\n this.defaultMaxValue = 1;\n this.defaultRate = 1;\n this.defaultAxis = 0;\n this.minValue = args.minValue != null ? args.minValue : this.defaultMinValue;\n this.maxValue = args.maxValue != null ? args.maxValue : this.defaultMaxValue;\n this.rate = args.rate != null ? args.rate : this.defaultRate;\n this.axis = args.axis != null ? args.axis : this.defaultAxis;\n }\n apply(w) {\n return tidy(() => {\n const norms = calcL2Norms(w, this.axis);\n const desired = add2(mul(this.rate, clipByValue(norms, this.minValue, this.maxValue)), mul(1 - this.rate, norms));\n return mul(w, div(desired, add2(epsilon(), norms)));\n });\n }\n getConfig() {\n return {\n minValue: this.minValue,\n maxValue: this.maxValue,\n rate: this.rate,\n axis: this.axis\n };\n }\n};\nMinMaxNorm.className = \"MinMaxNorm\";\nserialization_exports.registerClass(MinMaxNorm);\nvar CONSTRAINT_IDENTIFIER_REGISTRY_SYMBOL_MAP = {\n \"maxNorm\": \"MaxNorm\",\n \"minMaxNorm\": \"MinMaxNorm\",\n \"nonNeg\": \"NonNeg\",\n \"unitNorm\": \"UnitNorm\"\n};\nfunction serializeConstraint(constraint) {\n return serializeKerasObject(constraint);\n}\nfunction deserializeConstraint(config, customObjects = {}) {\n return deserializeKerasObject(config, serialization_exports.SerializationMap.getMap().classNameMap, customObjects, \"constraint\");\n}\nfunction getConstraint(identifier) {\n if (identifier == null) {\n return null;\n }\n if (typeof identifier === \"string\") {\n const className = identifier in CONSTRAINT_IDENTIFIER_REGISTRY_SYMBOL_MAP ? CONSTRAINT_IDENTIFIER_REGISTRY_SYMBOL_MAP[identifier] : identifier;\n const config = { className, config: {} };\n return deserializeConstraint(config);\n } else if (identifier instanceof Constraint) {\n return identifier;\n } else {\n return deserializeConstraint(identifier);\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/exports_constraints.js\nfunction maxNorm(args) {\n return new MaxNorm(args);\n}\nfunction unitNorm(args) {\n return new UnitNorm(args);\n}\nfunction nonNeg() {\n return new NonNeg();\n}\nfunction minMaxNorm(config) {\n return new MinMaxNorm(config);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/exports_initializers.js\nvar exports_initializers_exports = {};\n__export(exports_initializers_exports, {\n constant: () => constant,\n glorotNormal: () => glorotNormal,\n glorotUniform: () => glorotUniform,\n heNormal: () => heNormal,\n heUniform: () => heUniform,\n identity: () => identity,\n leCunNormal: () => leCunNormal,\n leCunUniform: () => leCunUniform,\n ones: () => ones3,\n orthogonal: () => orthogonal,\n randomNormal: () => randomNormal3,\n randomUniform: () => randomUniform2,\n truncatedNormal: () => truncatedNormal2,\n varianceScaling: () => varianceScaling,\n zeros: () => zeros2\n});\nfunction zeros2() {\n return new Zeros();\n}\nfunction ones3() {\n return new Ones();\n}\nfunction constant(args) {\n return new Constant(args);\n}\nfunction randomUniform2(args) {\n return new RandomUniform(args);\n}\nfunction randomNormal3(args) {\n return new RandomNormal(args);\n}\nfunction truncatedNormal2(args) {\n return new TruncatedNormal(args);\n}\nfunction identity(args) {\n return new Identity2(args);\n}\nfunction varianceScaling(config) {\n return new VarianceScaling(config);\n}\nfunction glorotUniform(args) {\n return new GlorotUniform(args);\n}\nfunction glorotNormal(args) {\n return new GlorotNormal(args);\n}\nfunction heNormal(args) {\n return new HeNormal(args);\n}\nfunction heUniform(args) {\n return new HeUniform(args);\n}\nfunction leCunNormal(args) {\n return new LeCunNormal(args);\n}\nfunction leCunUniform(args) {\n return new LeCunUniform(args);\n}\nfunction orthogonal(args) {\n return new Orthogonal(args);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/exports_layers.js\nvar exports_layers_exports = {};\n__export(exports_layers_exports, {\n Layer: () => Layer,\n RNN: () => RNN,\n RNNCell: () => RNNCell,\n activation: () => activation,\n add: () => add3,\n alphaDropout: () => alphaDropout,\n average: () => average,\n averagePooling1d: () => averagePooling1d,\n averagePooling2d: () => averagePooling2d,\n averagePooling3d: () => averagePooling3d,\n avgPool1d: () => avgPool1d,\n avgPool2d: () => avgPool2d,\n avgPool3d: () => avgPool3d2,\n avgPooling1d: () => avgPooling1d,\n avgPooling2d: () => avgPooling2d,\n avgPooling3d: () => avgPooling3d,\n batchNormalization: () => batchNormalization2,\n bidirectional: () => bidirectional,\n concatenate: () => concatenate2,\n conv1d: () => conv1d2,\n conv2d: () => conv2d3,\n conv2dTranspose: () => conv2dTranspose2,\n conv3d: () => conv3d2,\n conv3dTranspose: () => conv3dTranspose2,\n convLstm2d: () => convLstm2d,\n convLstm2dCell: () => convLstm2dCell,\n cropping2D: () => cropping2D,\n dense: () => dense,\n depthwiseConv2d: () => depthwiseConv2d4,\n dot: () => dot3,\n dropout: () => dropout3,\n elu: () => elu3,\n embedding: () => embedding,\n flatten: () => flatten3,\n gaussianDropout: () => gaussianDropout,\n gaussianNoise: () => gaussianNoise,\n globalAveragePooling1d: () => globalAveragePooling1d,\n globalAveragePooling2d: () => globalAveragePooling2d,\n globalMaxPool1d: () => globalMaxPool1d,\n globalMaxPool2d: () => globalMaxPool2d,\n globalMaxPooling1d: () => globalMaxPooling1d,\n globalMaxPooling2d: () => globalMaxPooling2d,\n gru: () => gru,\n gruCell: () => gruCell,\n input: () => input,\n inputLayer: () => inputLayer,\n layerNormalization: () => layerNormalization,\n leakyReLU: () => leakyReLU,\n lstm: () => lstm,\n lstmCell: () => lstmCell,\n masking: () => masking,\n maxPool1d: () => maxPool1d,\n maxPool2d: () => maxPool2d,\n maxPooling1d: () => maxPooling1d,\n maxPooling2d: () => maxPooling2d,\n maxPooling3d: () => maxPooling3d,\n maximum: () => maximum2,\n minimum: () => minimum2,\n multiply: () => multiply,\n permute: () => permute,\n prelu: () => prelu2,\n reLU: () => reLU,\n repeatVector: () => repeatVector,\n reshape: () => reshape2,\n rnn: () => rnn2,\n separableConv2d: () => separableConv2d2,\n simpleRNN: () => simpleRNN,\n simpleRNNCell: () => simpleRNNCell,\n softmax: () => softmax2,\n spatialDropout1d: () => spatialDropout1d,\n stackedRNNCells: () => stackedRNNCells,\n thresholdedReLU: () => thresholdedReLU,\n timeDistributed: () => timeDistributed,\n upSampling2d: () => upSampling2d,\n zeroPadding2d: () => zeroPadding2d\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/logs.js\nasync function resolveScalarsInLogs(logs) {\n if (logs == null) {\n return;\n }\n const promises = [];\n const keys = [];\n const scalarsToDispose = [];\n for (const key in logs) {\n const value = logs[key];\n if (typeof value !== \"number\") {\n const valueScalar = value;\n promises.push(valueScalar.data());\n keys.push(key);\n scalarsToDispose.push(valueScalar);\n }\n }\n if (promises.length > 0) {\n const values = await Promise.all(promises);\n for (let i = 0; i < values.length; ++i) {\n logs[keys[i]] = values[i][0];\n }\n dispose(scalarsToDispose);\n }\n}\nfunction disposeTensorsInLogs(logs) {\n if (logs == null) {\n return;\n }\n for (const key in logs) {\n const value = logs[key];\n if (typeof value !== \"number\") {\n value.dispose();\n }\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/base_callbacks.js\nvar ModelLoggingVerbosity;\n(function(ModelLoggingVerbosity2) {\n ModelLoggingVerbosity2[ModelLoggingVerbosity2[\"SILENT\"] = 0] = \"SILENT\";\n ModelLoggingVerbosity2[ModelLoggingVerbosity2[\"VERBOSE\"] = 1] = \"VERBOSE\";\n})(ModelLoggingVerbosity || (ModelLoggingVerbosity = {}));\nvar DEFAULT_YIELD_EVERY_MS = 125;\nvar BaseCallback = class {\n constructor() {\n this.validationData = null;\n }\n setParams(params) {\n this.params = params;\n }\n async onEpochBegin(epoch, logs) {\n }\n async onEpochEnd(epoch, logs) {\n }\n async onBatchBegin(batch, logs) {\n }\n async onBatchEnd(batch, logs) {\n }\n async onTrainBegin(logs) {\n }\n async onTrainEnd(logs) {\n }\n setModel(model2) {\n }\n};\nvar CallbackList = class {\n constructor(callbacks2, queueLength = 10) {\n if (callbacks2 == null) {\n callbacks2 = [];\n }\n this.callbacks = callbacks2;\n this.queueLength = queueLength;\n }\n append(callback) {\n this.callbacks.push(callback);\n }\n setParams(params) {\n for (const callback of this.callbacks) {\n callback.setParams(params);\n }\n }\n setModel(model2) {\n for (const callback of this.callbacks) {\n callback.setModel(model2);\n }\n }\n async onEpochBegin(epoch, logs) {\n if (logs == null) {\n logs = {};\n }\n for (const callback of this.callbacks) {\n await callback.onEpochBegin(epoch, logs);\n }\n }\n async onEpochEnd(epoch, logs) {\n if (logs == null) {\n logs = {};\n }\n for (const callback of this.callbacks) {\n await callback.onEpochEnd(epoch, logs);\n }\n }\n async onBatchBegin(batch, logs) {\n if (logs == null) {\n logs = {};\n }\n for (const callback of this.callbacks) {\n await callback.onBatchBegin(batch, logs);\n }\n }\n async onBatchEnd(batch, logs) {\n if (logs == null) {\n logs = {};\n }\n for (const callback of this.callbacks) {\n await callback.onBatchEnd(batch, logs);\n }\n }\n async onTrainBegin(logs) {\n if (logs == null) {\n logs = {};\n }\n for (const callback of this.callbacks) {\n await callback.onTrainBegin(logs);\n }\n }\n async onTrainEnd(logs) {\n if (logs == null) {\n logs = {};\n }\n for (const callback of this.callbacks) {\n await callback.onTrainEnd(logs);\n }\n }\n};\nvar BaseLogger = class extends BaseCallback {\n constructor() {\n super();\n }\n async onEpochBegin(epoch) {\n this.seen = 0;\n this.totals = {};\n }\n async onBatchEnd(batch, logs) {\n if (logs == null) {\n logs = {};\n }\n const batchSize = logs[\"size\"] == null ? 0 : logs[\"size\"];\n this.seen += batchSize;\n for (const key in logs) {\n const value = logs[key];\n if (typeof value === \"number\") {\n if (!this.totals.hasOwnProperty(key)) {\n this.totals[key] = 0;\n }\n this.totals[key] = this.totals[key] + value * batchSize;\n } else {\n let oldTotalsToDispose;\n if (key in this.totals) {\n oldTotalsToDispose = this.totals[key];\n } else {\n this.totals[key] = 0;\n }\n const total = tidy(() => add2(this.totals[key], mul(value, batchSize)));\n this.totals[key] = total;\n if (oldTotalsToDispose != null) {\n oldTotalsToDispose.dispose();\n }\n }\n }\n }\n async onEpochEnd(epoch, logs) {\n if (logs != null) {\n for (const key of this.params[\"metrics\"]) {\n if (this.totals[key] == null) {\n continue;\n }\n if (typeof this.totals[key] === \"number\") {\n logs[key] = this.totals[key] / this.seen;\n } else {\n tidy(() => {\n const log6 = mul(div(1, this.seen), this.totals[key]);\n logs[key] = log6;\n this.totals[key].dispose();\n keep(logs[key]);\n });\n }\n }\n }\n }\n};\nvar History = class extends BaseCallback {\n async onTrainBegin(logs) {\n this.epoch = [];\n this.history = {};\n }\n async onEpochEnd(epoch, logs) {\n if (logs == null) {\n logs = {};\n }\n this.epoch.push(epoch);\n for (const key in logs) {\n if (this.history[key] == null) {\n this.history[key] = [];\n }\n this.history[key].push(logs[key]);\n }\n }\n async syncData() {\n const promises = [];\n const keys = [];\n const indices = [];\n for (const key in this.history) {\n const valueArray = this.history[key];\n for (let i = 0; i < valueArray.length; ++i) {\n if (typeof valueArray[i] !== \"number\") {\n const valueScalar = valueArray[i];\n promises.push(valueScalar.data());\n keys.push(key);\n indices.push(i);\n }\n }\n }\n const values = await Promise.all(promises);\n for (let n = 0; n < values.length; ++n) {\n const tensorToDispose = this.history[keys[n]][indices[n]];\n tensorToDispose.dispose();\n this.history[keys[n]][indices[n]] = values[n][0];\n }\n }\n};\nvar CustomCallback = class extends BaseCallback {\n constructor(args, yieldEvery) {\n super();\n this.currentEpoch = 0;\n this.nowFunc = args.nowFunc;\n this.nextFrameFunc = args.nextFrameFunc || nextFrame;\n this.yieldEvery = yieldEvery || \"auto\";\n if (this.yieldEvery === \"auto\") {\n this.yieldEvery = DEFAULT_YIELD_EVERY_MS;\n }\n if (this.yieldEvery === \"never\" && args.onYield != null) {\n throw new Error(\"yieldEvery is `never` but you provided an `onYield` callback. Either change `yieldEvery` or remove the callback\");\n }\n if (util_exports.isNumber(this.yieldEvery)) {\n this.maybeWait = debounce(this.maybeWait.bind(this), this.yieldEvery, this.nowFunc);\n }\n this.trainBegin = args.onTrainBegin;\n this.trainEnd = args.onTrainEnd;\n this.epochBegin = args.onEpochBegin;\n this.epochEnd = args.onEpochEnd;\n this.batchBegin = args.onBatchBegin;\n this.batchEnd = args.onBatchEnd;\n this.yield = args.onYield;\n }\n async maybeWait(epoch, batch, logs) {\n const ps = [];\n if (this.yield != null) {\n await resolveScalarsInLogs(logs);\n ps.push(this.yield(epoch, batch, logs));\n }\n ps.push(this.nextFrameFunc());\n await Promise.all(ps);\n }\n async onEpochBegin(epoch, logs) {\n this.currentEpoch = epoch;\n if (this.epochBegin != null) {\n await resolveScalarsInLogs(logs);\n await this.epochBegin(epoch, logs);\n }\n }\n async onEpochEnd(epoch, logs) {\n const ps = [];\n if (this.epochEnd != null) {\n await resolveScalarsInLogs(logs);\n ps.push(this.epochEnd(epoch, logs));\n }\n if (this.yieldEvery === \"epoch\") {\n ps.push(this.nextFrameFunc());\n }\n await Promise.all(ps);\n }\n async onBatchBegin(batch, logs) {\n if (this.batchBegin != null) {\n await resolveScalarsInLogs(logs);\n await this.batchBegin(batch, logs);\n }\n }\n async onBatchEnd(batch, logs) {\n const ps = [];\n if (this.batchEnd != null) {\n await resolveScalarsInLogs(logs);\n ps.push(this.batchEnd(batch, logs));\n }\n if (this.yieldEvery === \"batch\") {\n ps.push(this.nextFrameFunc());\n } else if (util_exports.isNumber(this.yieldEvery)) {\n ps.push(this.maybeWait(this.currentEpoch, batch, logs));\n }\n await Promise.all(ps);\n }\n async onTrainBegin(logs) {\n if (this.trainBegin != null) {\n await resolveScalarsInLogs(logs);\n await this.trainBegin(logs);\n }\n }\n async onTrainEnd(logs) {\n if (this.trainEnd != null) {\n await resolveScalarsInLogs(logs);\n await this.trainEnd(logs);\n }\n }\n};\nfunction standardizeCallbacks(callbacks2, yieldEvery) {\n if (callbacks2 == null) {\n callbacks2 = {};\n }\n if (callbacks2 instanceof BaseCallback) {\n return [callbacks2];\n }\n if (Array.isArray(callbacks2) && callbacks2[0] instanceof BaseCallback) {\n return callbacks2;\n }\n const callbackConfigs = toList(callbacks2);\n return callbackConfigs.map((callbackConfig) => new CustomCallback(callbackConfig, yieldEvery));\n}\nvar CallbackConstructorRegistry = class {\n constructor() {\n }\n static registerCallbackConstructor(verbosityLevel, callbackConstructor) {\n util_exports.assert(verbosityLevel >= 0 && Number.isInteger(verbosityLevel), () => `Verbosity level is expected to be an integer >= 0, but got ${verbosityLevel}`);\n CallbackConstructorRegistry.checkForDuplicate(callbackConstructor);\n if (CallbackConstructorRegistry.constructors[verbosityLevel] == null) {\n CallbackConstructorRegistry.constructors[verbosityLevel] = [];\n }\n CallbackConstructorRegistry.constructors[verbosityLevel].push(callbackConstructor);\n }\n static checkForDuplicate(callbackConstructor) {\n for (const levelName in CallbackConstructorRegistry.constructors) {\n const constructors = CallbackConstructorRegistry.constructors[+levelName];\n constructors.forEach((ctor) => {\n if (ctor === callbackConstructor) {\n throw new ValueError(\"Duplicate callback constructor.\");\n }\n });\n }\n }\n static clear() {\n CallbackConstructorRegistry.constructors = {};\n }\n static createCallbacks(verbosityLevel) {\n const constructors = [];\n for (const levelName in CallbackConstructorRegistry.constructors) {\n const level = +levelName;\n if (verbosityLevel >= level) {\n constructors.push(...CallbackConstructorRegistry.constructors[level]);\n }\n }\n return constructors.map((ctor) => new ctor());\n }\n};\nCallbackConstructorRegistry.constructors = {};\nfunction configureCallbacks(callbacks2, verbose, epochs, initialEpoch, numTrainSamples, stepsPerEpoch, batchSize, doValidation, callbackMetrics) {\n const history = new History();\n const actualCallbacks = [\n new BaseLogger(),\n ...CallbackConstructorRegistry.createCallbacks(verbose)\n ];\n if (callbacks2 != null) {\n actualCallbacks.push(...callbacks2);\n }\n actualCallbacks.push(history);\n const callbackList = new CallbackList(actualCallbacks);\n callbackList.setParams({\n epochs,\n initialEpoch,\n samples: numTrainSamples,\n steps: stepsPerEpoch,\n batchSize,\n verbose,\n doValidation,\n metrics: callbackMetrics\n });\n return { callbackList, history };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/layers/serialization.js\nfunction deserialize(config, customObjects = {}, fastWeightInit = false) {\n return deserializeKerasObject(config, serialization_exports.SerializationMap.getMap().classNameMap, customObjects, \"layer\", fastWeightInit);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/losses.js\nfunction l2Normalize(x, axis) {\n return tidy(() => {\n if (x.dtype !== \"float32\") {\n x = cast(x, \"float32\");\n }\n const squareSum = sum2(square2(x), axis, true);\n const epsilonTensor = fill(squareSum.shape, epsilon());\n const norm2 = sqrt(maximum(squareSum, epsilonTensor));\n return div(x, norm2);\n });\n}\nfunction meanSquaredError2(yTrue, yPred) {\n return tidy(() => mean(square2(sub(yPred, yTrue)), -1));\n}\nfunction meanAbsoluteError(yTrue, yPred) {\n return tidy(() => mean(abs(sub(yPred, yTrue)), -1));\n}\nfunction meanAbsolutePercentageError(yTrue, yPred) {\n return tidy(() => {\n const diff = sub(yTrue, yPred);\n const clippedTrue = clipByValue(abs(yTrue), epsilon(), Number.MAX_VALUE);\n const absResult = abs(div(diff, clippedTrue));\n return mul(100, mean(absResult, -1));\n });\n}\nfunction meanSquaredLogarithmicError(yTrue, yPred) {\n return tidy(() => {\n const clippedPred = clipByValue(yPred, epsilon(), Number.MAX_VALUE);\n const firstLog = log2(add2(1, clippedPred));\n const clippedTrue = clipByValue(yTrue, epsilon(), Number.MAX_VALUE);\n const secondLog = log2(add2(1, clippedTrue));\n return mean(square2(sub(firstLog, secondLog)), -1);\n });\n}\nfunction squaredHinge(yTrue, yPred) {\n return tidy(() => {\n const maxResult = maximum(0, sub(1, mul(yTrue, yPred)));\n return mean(square2(maxResult), -1);\n });\n}\nfunction hinge(yTrue, yPred) {\n return tidy(() => {\n const maxResult = maximum(0, sub(1, mul(yTrue, yPred)));\n return mean(maxResult, -1);\n });\n}\nfunction categoricalHinge(yTrue, yPred) {\n return tidy(() => {\n const pos = sum2(mul(yTrue, yPred), -1);\n const neg5 = max(mul(sub(1, yTrue), yPred), -1);\n return maximum(0, add2(1, sub(neg5, pos)));\n });\n}\nfunction logcosh(yTrue, yPred) {\n return tidy(() => {\n const log22 = Math.log(2);\n const predictionDiff = sub(yPred, yTrue);\n const logcoshResult = sub(add2(predictionDiff, softplus(mul(-2, predictionDiff))), log22);\n return mean(logcoshResult, -1);\n });\n}\nfunction categoricalCrossentropy(target, output, fromLogits = false) {\n return tidy(() => {\n if (fromLogits) {\n output = softmax(output);\n } else {\n const outputSum = sum2(output, output.shape.length - 1, true);\n output = div(output, outputSum);\n }\n output = clipByValue(output, epsilon(), 1 - epsilon());\n return neg(sum2(mul(cast(target, \"float32\"), log2(output)), output.shape.length - 1));\n });\n}\nfunction sparseCategoricalCrossentropy(target, output, fromLogits = false) {\n return tidy(() => {\n const flatTarget = cast(floor(flatten2(target)), \"int32\");\n output = clipByValue(output, epsilon(), 1 - epsilon());\n const outputShape = output.shape;\n const oneHotTarget = reshape(oneHot(flatTarget, outputShape[outputShape.length - 1]), outputShape);\n return categoricalCrossentropy(oneHotTarget, output, fromLogits);\n });\n}\nfunction sigmoidCrossEntropyWithLogits(labels, logits) {\n if (!util_exports.arraysEqual(labels.shape, logits.shape)) {\n throw new ValueError(`logits and labels must have the same shape, but got shapes ${JSON.stringify(labels.shape)} and ${JSON.stringify(logits.shape)}`);\n }\n return tidy(() => {\n const reluLogits = relu(logits);\n const negAbsLogits = neg(abs(logits));\n return add2(sub(reluLogits, mul(logits, labels)), log1p(exp(negAbsLogits)));\n });\n}\nfunction binaryCrossentropy(yTrue, yPred) {\n return tidy(() => {\n let y;\n y = clipByValue(yPred, epsilon(), 1 - epsilon());\n y = log2(div(y, sub(1, y)));\n return mean(sigmoidCrossEntropyWithLogits(yTrue, y), -1);\n });\n}\nfunction kullbackLeiblerDivergence(yTrue, yPred) {\n return tidy(() => {\n const clippedTrue = clipByValue(yTrue, epsilon(), 1);\n const clippedPred = clipByValue(yPred, epsilon(), 1);\n return sum2(mul(yTrue, log2(div(clippedTrue, clippedPred))), -1);\n });\n}\nfunction poisson(yTrue, yPred) {\n return tidy(() => {\n const logPred = log2(add2(epsilon(), yPred));\n return mean(sub(yPred, mul(yTrue, logPred)), -1);\n });\n}\nfunction cosineProximity(yTrue, yPred) {\n return tidy(() => {\n const trueNormalized = l2Normalize(yTrue, -1);\n const predNormalized = l2Normalize(yPred, -1);\n const trueXPred = mul(trueNormalized, predNormalized);\n return neg(sum2(trueXPred, -1));\n });\n}\nvar lossesMap = {\n meanSquaredError: meanSquaredError2,\n meanAbsoluteError,\n meanAbsolutePercentageError,\n meanSquaredLogarithmicError,\n squaredHinge,\n hinge,\n categoricalHinge,\n logcosh,\n categoricalCrossentropy,\n sparseCategoricalCrossentropy,\n binaryCrossentropy,\n kullbackLeiblerDivergence,\n poisson,\n cosineProximity\n};\nfunction get(identifierOrFn) {\n if (typeof identifierOrFn === \"string\") {\n if (identifierOrFn in lossesMap) {\n return lossesMap[identifierOrFn];\n }\n let errMsg = `Unknown loss ${identifierOrFn}`;\n if (identifierOrFn.toLowerCase().includes(\"softmaxcrossentropy\")) {\n errMsg = `Unknown loss ${identifierOrFn}. Use \"categoricalCrossentropy\" as the string name for tf.losses.softmaxCrossEntropy`;\n }\n throw new ValueError(errMsg);\n } else {\n return identifierOrFn;\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/metrics.js\nfunction binaryAccuracy(yTrue, yPred) {\n return tidy(() => {\n const threshold3 = mul(0.5, onesLike(yPred));\n const yPredThresholded = cast2(greater(yPred, threshold3), yTrue.dtype);\n return mean(equal(yTrue, yPredThresholded), -1);\n });\n}\nfunction categoricalAccuracy(yTrue, yPred) {\n return tidy(() => cast2(equal(argMax(yTrue, -1), argMax(yPred, -1)), \"float32\"));\n}\nfunction truePositives(yTrue, yPred) {\n return tidy(() => {\n return cast(sum2(logicalAnd(equal(yTrue, 1), equal(yPred, 1))), \"float32\");\n });\n}\nfunction falseNegatives(yTrue, yPred) {\n return tidy(() => {\n return cast(sum2(logicalAnd(equal(yTrue, 1), equal(yPred, 0))), \"float32\");\n });\n}\nfunction falsePositives(yTrue, yPred) {\n return tidy(() => {\n return cast(sum2(logicalAnd(equal(yTrue, 0), equal(yPred, 1))), \"float32\");\n });\n}\nfunction precision(yTrue, yPred) {\n return tidy(() => {\n const tp = truePositives(yTrue, yPred);\n const fp = falsePositives(yTrue, yPred);\n const denominator = add2(tp, fp);\n return cast(where(greater(denominator, 0), div(tp, denominator), 0), \"float32\");\n });\n}\nfunction recall(yTrue, yPred) {\n return tidy(() => {\n const tp = truePositives(yTrue, yPred);\n const fn = falseNegatives(yTrue, yPred);\n const denominator = add2(tp, fn);\n return cast(where(greater(denominator, 0), div(tp, denominator), 0), \"float32\");\n });\n}\nfunction binaryCrossentropy2(yTrue, yPred) {\n return binaryCrossentropy(yTrue, yPred);\n}\nfunction sparseCategoricalAccuracy(yTrue, yPred) {\n if (yTrue.rank === yPred.rank) {\n yTrue = squeeze(yTrue, [yTrue.rank - 1]);\n }\n yPred = argMax(yPred, -1);\n if (yPred.dtype !== yTrue.dtype) {\n yPred = cast(yPred, yTrue.dtype);\n }\n return cast(equal(yTrue, yPred), \"float32\");\n}\nvar mse = meanSquaredError2;\nvar MSE = meanSquaredError2;\nvar mae = meanAbsoluteError;\nvar MAE = meanAbsoluteError;\nvar mape = meanAbsolutePercentageError;\nvar MAPE = meanAbsolutePercentageError;\nvar categoricalCrossentropy2 = categoricalCrossentropy;\nvar cosine = cosineProximity;\nvar sparseCategoricalCrossentropy2 = sparseCategoricalCrossentropy;\nvar metricsMap = {\n binaryAccuracy,\n categoricalAccuracy,\n precision,\n categoricalCrossentropy: categoricalCrossentropy2,\n sparseCategoricalCrossentropy: sparseCategoricalCrossentropy2,\n mse,\n MSE,\n mae,\n MAE,\n mape,\n MAPE,\n cosine\n};\nfunction get2(identifier) {\n if (typeof identifier === \"string\" && identifier in metricsMap) {\n return metricsMap[identifier];\n } else if (typeof identifier !== \"string\" && identifier != null) {\n return identifier;\n } else {\n throw new ValueError(`Unknown metric ${identifier}`);\n }\n}\nfunction getLossOrMetricName(fn) {\n assert2(fn !== null, `Unknown LossOrMetricFn ${fn}`);\n if (typeof fn === \"string\") {\n return fn;\n } else {\n let fnName;\n for (const key of Object.keys(lossesMap)) {\n if (lossesMap[key] === fn) {\n fnName = key;\n break;\n }\n }\n if (fnName !== void 0) {\n return fnName;\n }\n for (const key of Object.keys(metricsMap)) {\n if (metricsMap[key] === fn) {\n fnName = key;\n break;\n }\n }\n if (fnName !== void 0) {\n return fnName;\n }\n return fn.name;\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/optimizers.js\nfunction getOptimizer(identifier) {\n const optimizerMap = {\n \"Adagrad\": () => train.adagrad(0.01),\n \"Adadelta\": () => train.adadelta(1, 0.95, epsilon()),\n \"Adam\": () => train.adam(1e-3, 0.9, 0.999, epsilon()),\n \"Adamax\": () => train.adamax(2e-3, 0.9, 0.999, epsilon(), 0),\n \"RMSProp\": () => train.rmsprop(1e-3, 0.9, 0, epsilon()),\n \"SGD\": () => train.sgd(0.01)\n };\n optimizerMap[\"adagrad\"] = optimizerMap[\"Adagrad\"];\n optimizerMap[\"adadelta\"] = optimizerMap[\"Adadelta\"];\n optimizerMap[\"adam\"] = optimizerMap[\"Adam\"];\n optimizerMap[\"adamax\"] = optimizerMap[\"Adamax\"];\n optimizerMap[\"rmsprop\"] = optimizerMap[\"RMSProp\"];\n optimizerMap[\"sgd\"] = optimizerMap[\"SGD\"];\n if (identifier in optimizerMap) {\n return optimizerMap[identifier]();\n }\n throw new ValueError(`Unknown Optimizer ${identifier}`);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/user_defined_metadata.js\nvar MAX_USER_DEFINED_METADATA_SERIALIZED_LENGTH = 1 * 1024 * 1024;\nfunction checkUserDefinedMetadata(userDefinedMetadata, modelName, checkSize = false) {\n if (userDefinedMetadata == null || typeof userDefinedMetadata !== \"object\" || Object.getPrototypeOf(userDefinedMetadata) !== Object.prototype || !plainObjectCheck(userDefinedMetadata)) {\n throw new Error(\"User-defined metadata is expected to be a JSON object, but is not.\");\n }\n if (checkSize) {\n const out = JSON.stringify(userDefinedMetadata);\n if (out.length > MAX_USER_DEFINED_METADATA_SERIALIZED_LENGTH) {\n console.warn(`User-defined metadata of model \"${modelName}\" is too large in size (length=${out.length} when serialized). It is not recommended to store such large objects in user-defined metadata. Please make sure its serialized length is <= ${MAX_USER_DEFINED_METADATA_SERIALIZED_LENGTH}.`);\n }\n }\n}\nfunction plainObjectCheck(x) {\n if (x === null) {\n return true;\n } else if (typeof x === \"object\") {\n if (Object.getPrototypeOf(x) === Object.prototype) {\n const keys = Object.keys(x);\n for (const key of keys) {\n if (typeof key !== \"string\") {\n return false;\n }\n if (!plainObjectCheck(x[key])) {\n return false;\n }\n }\n return true;\n } else {\n if (Array.isArray(x)) {\n for (const item of x) {\n if (!plainObjectCheck(item)) {\n return false;\n }\n }\n return true;\n } else {\n return false;\n }\n }\n } else {\n const xType = typeof x;\n return xType === \"string\" || xType === \"number\" || xType === \"boolean\";\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/utils/layer_utils.js\nfunction printSummary(model2, lineLength, positions, printFn = console.log) {\n const sequentialLike = isModelSequentialLike(model2);\n const toDisplay = [\"Layer (type)\", \"Input Shape\", \"Output shape\", \"Param #\"];\n if (sequentialLike) {\n lineLength = lineLength || 90;\n positions = positions || [0.32, 0.61, 0.89, 1];\n } else {\n lineLength = lineLength || 115;\n positions = positions || [0.24, 0.48, 0.7, 0.8, 1];\n }\n if (positions[positions.length - 1] <= 1) {\n positions = positions.map((p2) => Math.floor(lineLength * p2));\n }\n let relevantNodes;\n if (!sequentialLike) {\n toDisplay.push(\"Receives inputs\");\n relevantNodes = [];\n for (const depth in model2.nodesByDepth) {\n relevantNodes.push(...model2.nodesByDepth[depth]);\n }\n }\n printFn(\"_\".repeat(lineLength));\n printRow(toDisplay, positions, printFn);\n printFn(\"=\".repeat(lineLength));\n const layers = model2.layers;\n for (let i = 0; i < layers.length; ++i) {\n if (sequentialLike) {\n printLayerSummary(layers[i], positions, printFn);\n } else {\n printLayerSummaryWithConnections(layers[i], positions, relevantNodes, printFn);\n }\n printFn((i === layers.length - 1 ? \"=\" : \"_\").repeat(lineLength));\n }\n model2.checkTrainableWeightsConsistency();\n const trainableCount = countTrainableParams(model2);\n const nonTrainableCount = countParamsInWeights(model2.nonTrainableWeights);\n printFn(`Total params: ${trainableCount + nonTrainableCount}`);\n printFn(`Trainable params: ${trainableCount}`);\n printFn(`Non-trainable params: ${nonTrainableCount}`);\n printFn(\"_\".repeat(lineLength));\n}\nfunction countTrainableParams(model2) {\n let trainableCount;\n if (model2.collectedTrainableWeights != null) {\n trainableCount = countParamsInWeights(model2.collectedTrainableWeights);\n } else {\n trainableCount = countParamsInWeights(model2.trainableWeights);\n }\n return trainableCount;\n}\nfunction isModelSequentialLike(model2) {\n let sequentialLike = true;\n const nodesByDepth = [];\n const nodes = [];\n for (const depth in model2.nodesByDepth) {\n nodesByDepth.push(model2.nodesByDepth[depth]);\n }\n for (const depthNodes of nodesByDepth) {\n if (depthNodes.length > 1 || depthNodes.length === 1 && depthNodes[0].inboundLayers.length > 1) {\n sequentialLike = false;\n break;\n }\n nodes.push(...depthNodes);\n }\n if (sequentialLike) {\n for (const layer of model2.layers) {\n let flag = false;\n for (const node of layer.inboundNodes) {\n if (nodes.indexOf(node) !== -1) {\n if (flag) {\n sequentialLike = false;\n break;\n } else {\n flag = true;\n }\n }\n }\n if (!sequentialLike) {\n break;\n }\n }\n }\n return sequentialLike;\n}\nfunction printRow(fields, positions, printFn = console.log) {\n let line = \"\";\n for (let i = 0; i < fields.length; ++i) {\n if (i > 0) {\n line = line.slice(0, line.length - 1) + \" \";\n }\n line += fields[i];\n line = line.slice(0, positions[i]);\n line += \" \".repeat(positions[i] - line.length);\n }\n printFn(line);\n}\nfunction printLayerSummary(layer, positions, printFn) {\n let outputShape;\n let inputShape;\n try {\n inputShape = layer.inboundNodes.map((x) => JSON.stringify(x.inputShapes)).join(\",\");\n } catch (err) {\n inputShape = \"multiple\";\n }\n try {\n outputShape = JSON.stringify(layer.outputShape);\n } catch (err) {\n outputShape = \"multiple\";\n }\n const name = layer.name;\n const className = layer.getClassName();\n const fields = [\n `${name} (${className})`,\n inputShape,\n outputShape,\n layer.countParams().toString()\n ];\n printRow(fields, positions, printFn);\n}\nfunction printLayerSummaryWithConnections(layer, positions, relevantNodes, printFn) {\n let outputShape;\n let inputShape;\n try {\n inputShape = layer.inboundNodes.map((x) => JSON.stringify(x.inputShapes)).join(\",\");\n } catch (err) {\n inputShape = \"multiple\";\n }\n try {\n outputShape = JSON.stringify(layer.outputShape);\n } catch (err) {\n outputShape = \"multiple\";\n }\n const connections = [];\n for (const node of layer.inboundNodes) {\n if (relevantNodes != null && relevantNodes.length > 0 && relevantNodes.indexOf(node) === -1) {\n continue;\n }\n for (let i = 0; i < node.inboundLayers.length; ++i) {\n const inboundLayer = node.inboundLayers[i].name;\n const inboundLayerIndex = node.nodeIndices[i];\n const inboundTensorIndex = node.tensorIndices[i];\n connections.push(`${inboundLayer}[${inboundLayerIndex}][${inboundTensorIndex}]`);\n }\n }\n const name = layer.name;\n const className = layer.getClassName();\n const firstConnection = connections.length === 0 ? \"\" : connections[0];\n const fields = [\n `${name} (${className})`,\n inputShape,\n outputShape,\n layer.countParams().toString(),\n firstConnection\n ];\n printRow(fields, positions, printFn);\n for (let i = 1; i < connections.length; ++i) {\n printRow([\"\", \"\", \"\", \"\", connections[i]], positions, printFn);\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/utils/serialization_utils.js\nfunction isArrayItemInputOrOutputName(key, index, value) {\n return (key === \"inboundNodes\" || key === \"outputLayers\" || key === \"inputLayers\") && index === 0 && typeof value === \"string\";\n}\nfunction convertPythonicToTs(pythonicConfig, key) {\n if (pythonicConfig === null) {\n return null;\n } else if (typeof pythonicConfig === \"string\") {\n return toCamelCase(pythonicConfig);\n } else if (typeof pythonicConfig === \"number\" || typeof pythonicConfig === \"boolean\") {\n return pythonicConfig;\n } else if (pythonicConfig instanceof Array) {\n const tsArray = [];\n const arrayLength = pythonicConfig.length;\n for (let i = 0; i < arrayLength; ++i) {\n const item = pythonicConfig[i];\n if (isArrayItemInputOrOutputName(key, i, item)) {\n tsArray.push(item);\n } else {\n tsArray.push(convertPythonicToTs(item, key));\n }\n }\n return tsArray;\n } else {\n const tsDict = {};\n for (const pythonicKey of Object.keys(pythonicConfig)) {\n const pythonicValue = pythonicConfig[pythonicKey];\n if (pythonicKey === \"name\" && typeof pythonicValue === \"string\") {\n tsDict[pythonicKey] = pythonicValue;\n } else {\n const tsKey = toCamelCase(pythonicKey);\n tsDict[tsKey] = convertPythonicToTs(pythonicValue, tsKey);\n }\n }\n return tsDict;\n }\n}\nfunction convertTsToPythonic(tsConfig, key) {\n if (tsConfig === null || tsConfig === void 0) {\n return null;\n } else if (typeof tsConfig === \"string\") {\n return toSnakeCase(tsConfig);\n } else if (typeof tsConfig === \"number\" || typeof tsConfig === \"boolean\") {\n return tsConfig;\n } else if (tsConfig instanceof Array) {\n const pyArray = [];\n const arrayLength = tsConfig.length;\n for (let i = 0; i < arrayLength; ++i) {\n const item = tsConfig[i];\n if (isArrayItemInputOrOutputName(key, i, item)) {\n pyArray.push(item);\n } else {\n pyArray.push(convertTsToPythonic(item, key));\n }\n }\n return pyArray;\n } else {\n const pyDict = {};\n for (const tsKey of Object.keys(tsConfig)) {\n const tsValue = tsConfig[tsKey];\n const pyKey = toSnakeCase(tsKey);\n if ((tsKey === \"name\" || tsKey === \"className\") && typeof tsValue === \"string\") {\n pyDict[pyKey] = tsValue;\n } else {\n pyDict[pyKey] = convertTsToPythonic(tsValue, tsKey);\n }\n }\n return pyDict;\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/version.js\nvar version2 = \"3.20.0\";\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/engine/container.js\nvar Container = class extends Layer {\n constructor(args) {\n super({});\n this.containerNodes = /* @__PURE__ */ new Set();\n this.name = args.name;\n if (this.name == null) {\n const prefix = this.getClassName().toLowerCase();\n this.name = getUid(prefix);\n }\n this.supportsMasking = false;\n this.trainable_ = true;\n if (Array.isArray(args.inputs)) {\n this.inputs = args.inputs.slice();\n } else {\n this.inputs = [args.inputs];\n }\n if (Array.isArray(args.outputs)) {\n this.outputs = args.outputs.slice();\n } else {\n this.outputs = [args.outputs];\n }\n if (unique2(this.inputs).length !== this.inputs.length) {\n throw new ValueError(`The list of inputs passed to the model is redundant. All inputs should only appear once. Found: ${this.inputs.map((x) => x.name)}`);\n }\n if (unique2(this.outputs).length !== this.outputs.length) {\n console.warn(`The list of outputs passed to the model is redundant. All outputs should only appear once. Found: ${this.outputs.map((x) => x.name)}`);\n }\n this.inputLayers = [];\n this.inputLayersNodeIndices = [];\n this.inputLayersTensorIndices = [];\n this.outputLayers = [];\n this.outputLayersNodeIndices = [];\n this.outputLayersTensorIndices = [];\n this.layers = [];\n this.internalContainerRefs = [];\n for (const x of this.outputs) {\n const layer = x.sourceLayer;\n const nodeIndex = x.nodeIndex;\n const tensorIndex = x.tensorIndex;\n this.outputLayers.push(layer);\n this.outputLayersNodeIndices.push(nodeIndex);\n this.outputLayersTensorIndices.push(tensorIndex);\n }\n for (const x of this.inputs) {\n const layer = x.sourceLayer;\n const nodeIndex = x.nodeIndex;\n const tensorIndex = x.tensorIndex;\n assert2(nodeIndex === 0, \"input layer has >1 nodes\");\n assert2(tensorIndex === 0, \"input layer has >1 tensors\");\n this.inputLayers.push(layer);\n this.inputLayersNodeIndices.push(nodeIndex);\n this.inputLayersTensorIndices.push(tensorIndex);\n }\n this.inputNames = [];\n this.outputNames = [];\n this.feedInputShapes = [];\n this.feedInputNames = [];\n this.feedOutputNames = [];\n for (let i = 0; i < this.inputLayers.length; i++) {\n const layer = this.inputLayers[i];\n if (!(layer instanceof InputLayer)) {\n throw new TypeError(`Input layers to a LayersModel must be InputLayer objects. Received inputs: ${args.inputs}. Input ${i} (0-based) originates from layer type ${layer.getClassName()}.`);\n }\n this.inputNames.push(layer.name);\n this.feedInputShapes.push(layer.batchInputShape);\n this.feedInputNames.push(layer.name);\n }\n for (const layer of this.outputLayers) {\n this.outputNames.push(layer.name);\n }\n this.internalInputShapes = this.inputs.map((x) => x.shape);\n this.internalOutputShapes = this.outputs.map((x) => x.shape);\n const nodesDepths = {};\n const nodeIDToNode = {};\n const layersDepths = {};\n const layerIDToLayer = {};\n const layerIndices = {};\n const nodesInDecreasingDepth = [];\n const buildMapOfGraph = (tensor2, finishedNodes2, nodesInProgress2, layer, nodeIndex, tensorIndex) => {\n if (layer == null || nodeIndex == null || tensorIndex == null) {\n layer = tensor2.sourceLayer;\n nodeIndex = tensor2.nodeIndex;\n tensorIndex = tensor2.tensorIndex;\n }\n const node = layer.inboundNodes[nodeIndex];\n if (nodesInProgress2.indexOf(node) !== -1) {\n throw new RuntimeError(`The tensor ${tensor2.name} at layer \"${layer.name}\" is part of a cycle.`);\n }\n if (finishedNodes2.indexOf(node) !== -1) {\n return;\n }\n this.containerNodes.add(Container.nodeKey(layer, nodeIndex));\n if (!(layer.id in layerIndices)) {\n layerIndices[layer.id] = Object.keys(layerIndices).length;\n }\n if (nodesInProgress2.indexOf(node) === -1) {\n nodesInProgress2.push(node);\n }\n const numInboundLayers = node.inboundLayers.length;\n for (let i = 0; i < numInboundLayers; i++) {\n const x = node.inputTensors[i];\n const layer2 = node.inboundLayers[i];\n const nodeIndex2 = node.nodeIndices[i];\n const tensorIndex2 = node.tensorIndices[i];\n buildMapOfGraph(x, finishedNodes2, nodesInProgress2, layer2, nodeIndex2, tensorIndex2);\n }\n finishedNodes2.push(node);\n while (nodesInProgress2.indexOf(node) >= 0) {\n nodesInProgress2.splice(nodesInProgress2.indexOf(node), 1);\n }\n nodesInDecreasingDepth.push(node);\n };\n const finishedNodes = [];\n const nodesInProgress = [];\n for (const x of this.outputs) {\n buildMapOfGraph(x, finishedNodes, nodesInProgress);\n }\n const reversedNodesInDecreasingDepth = nodesInDecreasingDepth.slice().reverse();\n for (const node of reversedNodesInDecreasingDepth) {\n nodeIDToNode[node.id] = node;\n if (!(node.id in nodesDepths)) {\n nodesDepths[node.id] = 0;\n }\n let depth = nodesDepths[node.id];\n const previousDepth = layersDepths[node.outboundLayer.id] == null ? 0 : layersDepths[node.outboundLayer.id];\n depth = Math.max(depth, previousDepth);\n layersDepths[node.outboundLayer.id] = depth;\n layerIDToLayer[node.outboundLayer.id] = node.outboundLayer;\n nodesDepths[node.id] = depth;\n for (let i = 0; i < node.inboundLayers.length; i++) {\n const inboundLayer = node.inboundLayers[i];\n const nodeIndex = node.nodeIndices[i];\n const inboundNode = inboundLayer.inboundNodes[nodeIndex];\n const previousDepth2 = nodesDepths[inboundNode.id] == null ? 0 : nodesDepths[inboundNode.id];\n nodesDepths[inboundNode.id] = Math.max(depth + 1, previousDepth2);\n nodeIDToNode[inboundNode.id] = inboundNode;\n }\n }\n const nodesByDepth = {};\n for (const nodeID in nodesDepths) {\n const depth = nodesDepths[nodeID];\n if (!(depth in nodesByDepth)) {\n nodesByDepth[depth] = [];\n }\n nodesByDepth[depth].push(nodeIDToNode[nodeID]);\n }\n const layersByDepth = {};\n for (const layerID in layersDepths) {\n const depth = layersDepths[layerID];\n if (!(depth in layersByDepth)) {\n layersByDepth[depth] = [];\n }\n layersByDepth[depth].push(layerIDToLayer[layerID]);\n }\n let depthKeys = Object.keys(layersByDepth).map((x) => parseInt(x, 10)).sort(reverseNumberCompare);\n this.layers = [];\n for (const depth of depthKeys) {\n const layersForDepth = layersByDepth[depth];\n layersForDepth.sort((a, b) => {\n const aIndex = layerIndices[a.id];\n const bIndex = layerIndices[b.id];\n if (aIndex < bIndex) {\n return -1;\n }\n if (aIndex > bIndex) {\n return 1;\n }\n return 0;\n });\n for (const layer of layersForDepth) {\n if (layer instanceof Container) {\n this.internalContainerRefs.push(layer);\n }\n this.layers.push(layer);\n }\n }\n this.layersByDepth = layersByDepth;\n depthKeys = Object.keys(nodesByDepth).map((x) => parseInt(x, 10)).sort(reverseNumberCompare);\n const computableTensors = this.inputs.slice();\n const layersWithCompleteInput = [];\n for (const depth of depthKeys) {\n for (const node of nodesByDepth[depth]) {\n const layer = node.outboundLayer;\n if (layer != null) {\n for (const x of node.inputTensors) {\n if (computableTensors.indexOf(x) === -1) {\n throw new RuntimeError(`Graph disconnected: cannot obtain value for tensor ${x} at layer \"${layer.name}\". The following previous layers were accessed without issue: ${layersWithCompleteInput}`);\n }\n }\n for (const x of node.outputTensors) {\n computableTensors.push(x);\n }\n layersWithCompleteInput.push(layer.name);\n }\n }\n }\n this.nodesByDepth = nodesByDepth;\n const allNames = this.layers.map((x) => x.name);\n for (const name of allNames) {\n const numOccurrences = allNames.filter((x) => x === name).length;\n if (numOccurrences !== 1) {\n throw new RuntimeError(`The name \"${name}\" is used ${numOccurrences} times in the model. All layer names should be unique. Layer names: ` + JSON.stringify(allNames));\n }\n }\n this.outboundNodes = [];\n this.inboundNodes = [];\n new Node({\n outboundLayer: this,\n inboundLayers: [],\n nodeIndices: [],\n tensorIndices: [],\n inputTensors: this.inputs,\n outputTensors: this.outputs,\n inputMasks: this.inputs.map((x) => null),\n outputMasks: this.outputs.map((x) => null),\n inputShapes: this.inputs.map((x) => x.shape),\n outputShapes: this.outputs.map((x) => x.shape)\n });\n this.built = true;\n this._refCount = 1;\n }\n assertNotDisposed() {\n if (this._refCount === 0) {\n throw new Error(`Container '${this.name}' is already disposed.`);\n }\n }\n dispose() {\n this.assertNotDisposed();\n const result = { refCountAfterDispose: null, numDisposedVariables: 0 };\n if (--this._refCount === 0) {\n for (const layer of this.layers) {\n result.numDisposedVariables += layer.dispose().numDisposedVariables;\n }\n for (const container of this.internalContainerRefs) {\n result.numDisposedVariables += container.dispose().numDisposedVariables;\n }\n }\n result.refCountAfterDispose = this._refCount;\n return result;\n }\n get trainable() {\n return this.trainable_;\n }\n set trainable(trainable) {\n this.layers.forEach((layer) => {\n layer._trainableWeights.forEach((w) => w.trainable = trainable);\n });\n this.trainable_ = trainable;\n }\n get trainableWeights() {\n if (this._trainableWeights.length > 0) {\n throw new ValueError(\"Container instance unexpectedly contains _trainableWeights.The trainable weights of a Container are a union of the trainable weights of its consituent Layers. Its own _trainableWeights must remain an empty Array.\");\n }\n if (!this.trainable) {\n return [];\n }\n let weights = [];\n for (const layer of this.layers) {\n weights = weights.concat(layer.trainableWeights);\n }\n return weights;\n }\n get nonTrainableWeights() {\n const weights = [];\n for (const layer of this.layers) {\n weights.push(...layer.nonTrainableWeights);\n }\n if (!this.trainable) {\n const trainableWeights = [];\n for (const layer of this.layers) {\n trainableWeights.push(...layer.trainableWeights);\n }\n return trainableWeights.concat(weights);\n }\n return weights;\n }\n get weights() {\n return this.trainableWeights.concat(this.nonTrainableWeights);\n }\n loadWeights(weights, strict = true) {\n const nameToWeight = {};\n let totalWeightsCount = 0;\n for (const layer of this.layers) {\n for (const weight of layer.weights) {\n if (nameToWeight[weight.originalName] != null) {\n throw new ValueError(`Duplicate weight name: ${weight.originalName}`);\n }\n nameToWeight[weight.originalName] = weight;\n totalWeightsCount++;\n }\n }\n const weightValueTuples = [];\n for (const name in weights) {\n let validatedName = name;\n if (nameToWeight[name] == null) {\n const tokens = name.split(\"/\");\n const shortenNameArray = tokens.slice(0, -2).concat([tokens[tokens.length - 1]]);\n validatedName = shortenNameArray.join(\"/\");\n }\n if (nameToWeight[validatedName] != null) {\n weightValueTuples.push([nameToWeight[validatedName], weights[name]]);\n } else if (strict) {\n throw new ValueError(`Provided weight data has no target variable: ${name}`);\n }\n delete nameToWeight[validatedName];\n }\n if (strict) {\n const unsetNames = [];\n for (const name in nameToWeight) {\n unsetNames.push(name);\n }\n if (unsetNames.length > 0) {\n throw new ValueError(`${unsetNames.length} of ${totalWeightsCount} weights are not set: ${unsetNames}`);\n }\n }\n batchSetValue(weightValueTuples);\n }\n updatedConfig() {\n const theConfig = this.getConfig();\n const modelConfig = {};\n modelConfig[\"className\"] = this.getClassName();\n modelConfig[\"config\"] = theConfig;\n modelConfig[\"kerasVersion\"] = `tfjs-layers ${version2}`;\n modelConfig[\"backend\"] = \"TensorFlow.js\";\n return modelConfig;\n }\n toJSON(unused, returnString = true) {\n const modelConfig = convertTsToPythonic(this.updatedConfig());\n return returnString ? JSON.stringify(modelConfig) : modelConfig;\n }\n call(inputs, kwargs) {\n return tidy(() => {\n inputs = toList(inputs);\n const feedDict = new FeedDict();\n for (let i = 0; i < this.inputs.length; ++i) {\n feedDict.add(this.inputs[i], inputs[i]);\n }\n return execute(this.outputs, feedDict, kwargs);\n });\n }\n computeMask(inputs, mask) {\n return tidy(() => {\n inputs = toList(inputs);\n let masks;\n if (mask == null) {\n masks = pyListRepeat(null, inputs.length);\n } else {\n masks = toList(mask);\n }\n return this.runInternalGraph(inputs, masks)[1];\n });\n }\n computeOutputShape(inputShape) {\n const inputShapes = normalizeShapeList(inputShape);\n if (inputShapes.length !== this.inputLayers.length) {\n throw new ValueError(`Invalid inputShape argument ${inputShape}: model has ${this.inputLayers.length} tensor inputs.`);\n }\n const layersToOutputShapes = {};\n for (let i = 0; i < inputShapes.length; i++) {\n const layer = this.inputLayers[i];\n const inputShape2 = inputShapes[i];\n const shapeKey = layer.name + \"_0_0\";\n layersToOutputShapes[shapeKey] = inputShape2;\n }\n const depthKeys = Object.keys(this.nodesByDepth).map((x) => parseInt(x, 10)).sort(reverseNumberCompare);\n if (depthKeys.length > 1) {\n for (const depth of depthKeys) {\n const nodes = this.nodesByDepth[depth];\n for (const node of nodes) {\n const layer = node.outboundLayer;\n if (this.inputLayers.map((x) => x.id).indexOf(layer.id) !== -1) {\n continue;\n }\n const inputShapes2 = [];\n for (let j = 0; j < node.inboundLayers.length; j++) {\n const inboundLayer = node.inboundLayers[j];\n const nodeIndex2 = node.nodeIndices[j];\n const tensorIndex = node.tensorIndices[j];\n const shapeKey = `${inboundLayer.name}_${nodeIndex2}_${tensorIndex}`;\n const inputShape2 = layersToOutputShapes[shapeKey];\n inputShapes2.push(inputShape2);\n }\n const outputShape = layer.computeOutputShape(singletonOrArray(inputShapes2));\n const outputShapes2 = normalizeShapeList(outputShape);\n const nodeIndex = layer.inboundNodes.indexOf(node);\n for (let j = 0; j < outputShapes2.length; j++) {\n const shapeKey = `${layer.name}_${nodeIndex}_${j}`;\n layersToOutputShapes[shapeKey] = outputShapes2[j];\n }\n }\n }\n }\n const outputShapes = [];\n const outputShapeKeys = [];\n for (let i = 0; i < this.outputLayers.length; i++) {\n const layer = this.outputLayers[i];\n const nodeIndex = this.outputLayersNodeIndices[i];\n const tensorIndex = this.outputLayersTensorIndices[i];\n const shapeKey = `${layer.name}_${nodeIndex}_${tensorIndex}`;\n outputShapeKeys.push(shapeKey);\n }\n for (let i = 0; i < outputShapeKeys.length; i++) {\n const key = outputShapeKeys[i];\n assert2(key in layersToOutputShapes);\n outputShapes.push(layersToOutputShapes[key]);\n }\n return singletonOrArray(outputShapes);\n }\n runInternalGraph(inputs, masks) {\n if (masks == null) {\n masks = pyListRepeat(null, inputs.length);\n }\n const tensorMap = {};\n for (let i = 0; i < this.inputs.length; ++i) {\n const x = this.inputs[i];\n const y = inputs[i];\n const mask = masks[i];\n tensorMap[x.id] = [y, mask];\n }\n const depthKeys = Object.keys(this.nodesByDepth).map((x) => parseInt(x, 10)).sort(reverseNumberCompare);\n for (const depth of depthKeys) {\n const nodes = this.nodesByDepth[depth];\n for (const node of nodes) {\n const layer = node.outboundLayer;\n const referenceInputTensors = node.inputTensors;\n const referenceOutputTensors = node.outputTensors;\n const computedData = new Array();\n for (const x of referenceInputTensors) {\n if (x.id in tensorMap) {\n computedData.push(tensorMap[x.id]);\n }\n }\n if (computedData.length === referenceInputTensors.length) {\n let kwargs = {};\n let computedTensors;\n let computedMasks;\n let outputTensors2;\n let outputMasks2;\n if (node.callArgs != null) {\n kwargs = node.callArgs;\n }\n if (computedData.length === 1) {\n const [computedTensor, computedMask] = computedData[0];\n if (kwargs[\"mask\"] == null) {\n kwargs[\"mask\"] = computedMask;\n }\n outputTensors2 = toList(layer.call(computedTensor, kwargs));\n outputMasks2 = toList(layer.computeMask(computedTensor, computedMask));\n computedTensors = [computedTensor];\n computedMasks = [computedMask];\n } else {\n computedTensors = computedData.map((x) => x[0]);\n computedMasks = computedData.map((x) => x[1]);\n if (kwargs[\"mask\"] == null) {\n kwargs[\"mask\"] = computedMasks;\n }\n outputTensors2 = toList(layer.call(computedTensors, kwargs));\n outputMasks2 = toList(layer.computeMask(computedTensors, computedMasks));\n }\n if (layer.activityRegularizer) {\n throw new NotImplementedError(\"LayersModel invocation with concrete Tensor value(s) in the presence of activity regularizer(s) is not supported yet.\");\n }\n for (let i = 0; i < referenceOutputTensors.length; ++i) {\n const x = referenceOutputTensors[i];\n const y = outputTensors2[i];\n const mask = outputMasks2[i];\n tensorMap[x.id] = [y, mask];\n }\n }\n }\n }\n const outputTensors = [];\n const outputMasks = [];\n const outputShapes = [];\n for (const x of this.outputs) {\n assert2(x.id in tensorMap, `Could not compute output ${x.name} : ${x.id}`);\n const [tensor2, mask] = tensorMap[x.id];\n outputShapes.push(tensor2.shape);\n outputTensors.push(tensor2);\n outputMasks.push(mask);\n }\n return [outputTensors, outputMasks, outputShapes];\n }\n buildNodeConversionMap(layers) {\n const nodeConversionMap = {};\n let keptNodes;\n for (const layer of this.layers) {\n keptNodes = layer instanceof Container ? 1 : 0;\n for (let originalNodeIndex = 0; originalNodeIndex < layer.inboundNodes.length; originalNodeIndex++) {\n const nodeKey = Container.nodeKey(layer, originalNodeIndex);\n if (this.containerNodes.has(nodeKey)) {\n nodeConversionMap[nodeKey] = keptNodes;\n keptNodes += 1;\n }\n }\n }\n return nodeConversionMap;\n }\n getLayer(name, index) {\n if (index != null) {\n if (this.layers.length <= index) {\n throw new ValueError(`Was asked to retrieve layer at index ${index}, but model only has ${this.layers.length} layer(s).`);\n } else {\n return this.layers[index];\n }\n } else {\n if (name == null) {\n throw new ValueError(\"Provide either a layer name or layer index\");\n }\n }\n for (const layer of this.layers) {\n if (layer.name === name) {\n return layer;\n }\n }\n throw new ValueError(`No such layer: ${name}`);\n }\n calculateLosses() {\n return tidy(() => {\n const losses2 = [];\n for (const layer of this.layers) {\n for (let nodeIndex = 0; nodeIndex < layer.inboundNodes.length; ++nodeIndex) {\n const nodeKey = Container.nodeKey(layer, nodeIndex);\n if (this.containerNodes.has(nodeKey)) {\n losses2.push(...layer.calculateLosses());\n }\n }\n }\n return losses2;\n });\n }\n getConfig() {\n const config = { name: this.name };\n const nodeConversionMap = this.buildNodeConversionMap(this.layers);\n const layerConfigs = [];\n for (const layer of this.layers) {\n const layerClassName = layer.getClassName();\n const layerConfig = layer.getConfig();\n const filteredInboundNodes = [];\n for (let originalNodeIndex = 0; originalNodeIndex < layer.inboundNodes.length; originalNodeIndex++) {\n const node = layer.inboundNodes[originalNodeIndex];\n const nodeKey = Container.nodeKey(layer, originalNodeIndex);\n let kwargs = {};\n if (this.containerNodes.has(nodeKey)) {\n if (node.callArgs) {\n try {\n JSON.stringify(node.callArgs);\n kwargs = node.callArgs;\n } catch (err) {\n console.warn(`Layer ${layer.name} was passed non-serializable keyword arguments: ${node.callArgs}. They will not be included in the serialized model (and thus will be missing at deserialization time).`);\n kwargs = {};\n }\n }\n if (node.inboundLayers.length > 0) {\n const nodeData = [];\n for (let i = 0; i < node.inboundLayers.length; i++) {\n const inboundLayer = node.inboundLayers[i];\n const nodeIndex = node.nodeIndices[i];\n const tensorIndex = node.tensorIndices[i];\n const nodeKey2 = Container.nodeKey(inboundLayer, nodeIndex);\n let newNodeIndex = nodeConversionMap[nodeKey2];\n if (newNodeIndex == null) {\n newNodeIndex = 0;\n }\n nodeData.push([inboundLayer.name, newNodeIndex, tensorIndex, kwargs]);\n }\n filteredInboundNodes.push(nodeData);\n }\n }\n }\n const dict = {};\n dict[\"name\"] = layer.name;\n dict[\"className\"] = layerClassName;\n dict[\"config\"] = layerConfig;\n dict[\"inboundNodes\"] = filteredInboundNodes;\n layerConfigs.push(dict);\n }\n config[\"layers\"] = layerConfigs;\n const modelInputs = [];\n for (let i = 0; i < this.inputLayers.length; i++) {\n const layer = this.inputLayers[i];\n const nodeIndex = this.inputLayersNodeIndices[i];\n const nodeKey = Container.nodeKey(layer, nodeIndex);\n if (!this.containerNodes.has(nodeKey)) {\n continue;\n }\n let newNodeIndex = nodeConversionMap[nodeKey];\n if (newNodeIndex === null || newNodeIndex === void 0) {\n newNodeIndex = 0;\n }\n const tensorIndex = this.inputLayersTensorIndices[i];\n modelInputs.push([layer.name, newNodeIndex, tensorIndex]);\n }\n config[\"inputLayers\"] = modelInputs;\n const modelOutputs = [];\n for (let i = 0; i < this.outputLayers.length; i++) {\n const layer = this.outputLayers[i];\n const nodeIndex = this.outputLayersNodeIndices[i];\n const nodeKey = Container.nodeKey(layer, nodeIndex);\n if (!this.containerNodes.has(nodeKey)) {\n continue;\n }\n let newNodeIndex = nodeConversionMap[nodeKey];\n if (newNodeIndex === null || newNodeIndex === void 0) {\n newNodeIndex = 0;\n }\n const tensorIndex = this.outputLayersTensorIndices[i];\n modelOutputs.push([layer.name, newNodeIndex, tensorIndex]);\n }\n config[\"outputLayers\"] = modelOutputs;\n return config;\n }\n static fromConfig(cls, config, customObjects = {}, fastWeightInit = false) {\n const createdLayers = {};\n const unprocessedNodes = {};\n function addUnprocessedNode(layer, nodeData) {\n if (!(layer.name in unprocessedNodes)) {\n unprocessedNodes[layer.name] = [nodeData];\n } else {\n unprocessedNodes[layer.name].push(nodeData);\n }\n }\n function processNode(layer, nodeData) {\n const inputTensors2 = [];\n let kwargs;\n for (const inputData of nodeData) {\n const inboundLayerName = inputData[0];\n const inboundNodeIndex = inputData[1];\n const inboundTensorIndex = inputData[2];\n kwargs = inputData[3] == null ? {} : inputData[3];\n if (!(inboundLayerName in createdLayers)) {\n addUnprocessedNode(layer, nodeData);\n return;\n }\n const inboundLayer = createdLayers[inboundLayerName];\n if (inboundLayer.inboundNodes.length <= inboundNodeIndex) {\n addUnprocessedNode(layer, nodeData);\n return;\n }\n const inboundNode = inboundLayer.inboundNodes[inboundNodeIndex];\n inputTensors2.push(inboundNode.outputTensors[inboundTensorIndex]);\n }\n if (inputTensors2.length > 0) {\n layer.apply(singletonOrArray(inputTensors2), kwargs);\n }\n }\n function processLayer(layerData) {\n const layerName = layerData[\"name\"];\n const layer = deserialize(layerData, config[\"customObjects\"] != null ? config[\"customObjects\"] : {});\n layer.setFastWeightInitDuringBuild(fastWeightInit);\n createdLayers[layerName] = layer;\n const inboundNodesData = layerData[\"inboundNodes\"];\n inboundNodesData.forEach((nodeData) => {\n if (!(nodeData instanceof Array)) {\n throw new ValueError(`Corrupted configuration, expected array for nodeData: ${nodeData}`);\n }\n addUnprocessedNode(layer, nodeData);\n });\n }\n const name = config[\"name\"];\n const layersFromConfig = config[\"layers\"];\n for (const layerData of layersFromConfig) {\n processLayer(layerData);\n }\n while (!isObjectEmpty(unprocessedNodes)) {\n for (const layerData of layersFromConfig) {\n const layer = createdLayers[layerData[\"name\"]];\n if (layer.name in unprocessedNodes) {\n const currentUnprocessedNodesForLayer = unprocessedNodes[layer.name];\n delete unprocessedNodes[layer.name];\n for (const nodeData of currentUnprocessedNodesForLayer) {\n processNode(layer, nodeData);\n }\n }\n }\n }\n const inputTensors = [];\n const outputTensors = [];\n const inputLayersFromConfig = config[\"inputLayers\"];\n for (const layerData of inputLayersFromConfig) {\n const layerName = layerData[0];\n const nodeIndex = layerData[1];\n const tensorIndex = layerData[2];\n assert2(layerName in createdLayers);\n const layer = createdLayers[layerName];\n const layerOutputTensors = layer.inboundNodes[nodeIndex].outputTensors;\n inputTensors.push(layerOutputTensors[tensorIndex]);\n }\n const outputLayersFromConfig = config[\"outputLayers\"];\n for (const layerData of outputLayersFromConfig) {\n const layerName = layerData[0];\n const nodeIndex = layerData[1];\n const tensorIndex = layerData[2];\n assert2(layerName in createdLayers);\n const layer = createdLayers[layerName];\n const layerOutputTensors = layer.inboundNodes[nodeIndex].outputTensors;\n outputTensors.push(layerOutputTensors[tensorIndex]);\n }\n return new cls({ inputs: inputTensors, outputs: outputTensors, name });\n }\n get stateful() {\n if (this._stateful) {\n throw new ValueError(\"Container instance unexpectedly has _stateful = true. The statefulness of a Container is determined by the Layers it contains. Its _stateful property must remain the default false.\");\n }\n for (const layer of this.layers) {\n if (layer.stateful) {\n return true;\n }\n }\n return false;\n }\n resetStates() {\n tidy(() => {\n this.layers.forEach((layer) => {\n if (layer.stateful) {\n layer.resetStates();\n }\n });\n });\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/engine/training_utils.js\nfunction standardizeSampleOrClassWeights(xWeight, outputNames, weightType) {\n const numOutputs = outputNames.length;\n if (xWeight == null || Array.isArray(xWeight) && xWeight.length === 0) {\n return outputNames.map((name) => null);\n }\n if (numOutputs === 1) {\n if (Array.isArray(xWeight) && xWeight.length === 1) {\n return xWeight;\n } else if (typeof xWeight === \"object\" && outputNames[0] in xWeight) {\n return [xWeight[outputNames[0]]];\n } else {\n return [xWeight];\n }\n }\n if (Array.isArray(xWeight)) {\n if (xWeight.length !== numOutputs) {\n throw new Error(`Provided ${weightType} is an array of ${xWeight.length} element(s), but the model has ${numOutputs} outputs. Make sure a set of weights is provided for each model output.`);\n }\n return xWeight;\n } else if (typeof xWeight === \"object\" && Object.keys(xWeight).length > 0 && typeof xWeight[Object.keys(xWeight)[0]] === \"object\") {\n const output = [];\n outputNames.forEach((outputName) => {\n if (outputName in xWeight) {\n output.push(xWeight[outputName]);\n } else {\n output.push(null);\n }\n });\n return output;\n } else {\n throw new Error(`The model has multiple (${numOutputs}) outputs, so ${weightType} must be either an array with ${numOutputs} elements or an object with ${outputNames} keys. Provided ${weightType} not understood: ${JSON.stringify(xWeight)}`);\n }\n}\nfunction standardizeClassWeights(classWeight, outputNames) {\n return standardizeSampleOrClassWeights(classWeight, outputNames, \"classWeight\");\n}\nasync function standardizeWeights(y, sampleWeight, classWeight, sampleWeightMode) {\n if (sampleWeight != null || sampleWeightMode != null) {\n throw new Error(\"Support sampleWeight is not implemented yet\");\n }\n if (classWeight != null) {\n const yClasses = tidy(() => {\n if (y.shape.length === 1) {\n return clone(y);\n } else if (y.shape.length === 2) {\n if (y.shape[1] > 1) {\n const axis = 1;\n return argMax(y, axis);\n } else if (y.shape[1] === 1) {\n return reshape(y, [y.shape[0]]);\n } else {\n throw new Error(`Encountered unexpected last-dimension size (${y.shape[1]}) during handling of class weights. The size is expected to be >= 1.`);\n }\n } else {\n throw new Error(`Unexpected rank of target (y) tensor (${y.rank}) during handling of class weights. The rank is expected to be 1 or 2.`);\n }\n });\n const yClassIndices = Array.from(await yClasses.data());\n dispose(yClasses);\n const classSampleWeight = [];\n yClassIndices.forEach((classIndex) => {\n if (classWeight[classIndex] == null) {\n throw new Error(`classWeight must contain all classes in the training data. The class ${classIndex} exists in the data but not in classWeight`);\n } else {\n classSampleWeight.push(classWeight[classIndex]);\n }\n });\n return tensor1d(classSampleWeight, \"float32\");\n } else {\n return null;\n }\n}\nfunction computeWeightedLoss2(losses2, sampleWeights) {\n return mul(losses2, sampleWeights);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/engine/training_dataset.js\nvar DEFAULT_VALIDATION_BATCH_SIZE = 32;\nfunction standardizeDataIteratorOutput(model2, iteratorOut) {\n let xs;\n let ys;\n const iteratorOutObj = iteratorOut;\n xs = iteratorOutObj[\"xs\"];\n ys = iteratorOutObj[\"ys\"];\n util_exports.assert(xs != null && ys != null, () => `A Dataset iterator for fitDataset() is expected to generate objects of the form \\`{xs: xVal, ys: yVal}\\`, where the two values may be \\`tf.Tensor\\`, an array of Tensors, or a map of string to Tensor. The provided Dataset instead generates ${iteratorOut}`);\n const flattenedXs = flattenTensorOrArrayOrMap(\"input\", model2.inputNames, xs);\n const flattenedYs = flattenTensorOrArrayOrMap(\"output\", model2.outputNames, ys);\n const batchSize = flattenedXs[0].shape[0];\n util_exports.assert(flattenedXs.length === model2.inputs.length, () => `LayersModel has ${model2.inputs.length} inputs, but the dataset provides ${flattenedXs.length} inputs. (Expected input keys: ${JSON.stringify(model2.inputNames)})`);\n util_exports.assert(flattenedYs.length === model2.outputs.length, () => `LayersModel has ${model2.outputs.length} outputs, but the dataset provides ${flattenedYs.length} outputs. (Expected output keys: ${JSON.stringify(model2.outputNames)})`);\n for (let xIndex = 0; xIndex < flattenedXs.length; xIndex++) {\n util_exports.assert(flattenedXs[xIndex].shape[0] === batchSize, () => `Batch size mismatch: input ${model2.inputNames[xIndex]} has ${flattenedXs[xIndex].shape[0]}; expected ${batchSize} based on input ${model2.inputNames[0]}.`);\n }\n for (let yIndex = 0; yIndex < flattenedYs.length; yIndex++) {\n util_exports.assert(flattenedYs[yIndex].shape[0] === batchSize, () => `Batch size mismatch: output ${model2.outputNames[yIndex]} has ${flattenedYs[yIndex].shape[0]}; expected ${batchSize} based on input ${model2.inputNames[0]}.`);\n }\n return { xs: flattenedXs, ys: flattenedYs };\n}\nfunction flattenTensorOrArrayOrMap(inputOrOutput, names, values) {\n if (values instanceof Tensor) {\n return [values];\n } else if (Array.isArray(values)) {\n util_exports.assert(values.length === names.length, () => `Received an array of ${values.length} Tensors, but expected ${names.length} to match the ${inputOrOutput} keys ${names}.`);\n return values;\n } else {\n const result = [];\n for (const name of names) {\n if (values[name] == null) {\n throw new ValueError(`The feature data generated by the dataset lacks the required ${inputOrOutput} key '${name}'.`);\n }\n result.push(values[name]);\n }\n return result;\n }\n}\nfunction standardizeTensorValidationData(data) {\n if (data.length === 3) {\n throw new NotImplementedError(\"Validation with sample weights is not implemented yet.\");\n }\n return { xs: data[0], ys: data[1] };\n}\nasync function fitDataset(model2, dataset, args) {\n const hasBatchesPerEpoch = args.batchesPerEpoch != null;\n util_exports.assert(model2.optimizer != null, () => \"You must compile a model before training/testing. Use LayersModel.compile(modelCompileConfig).\");\n util_exports.assert(args != null, () => `For fitDataset(), the 2nd argument (config) is required, but it is not provided in this call.`);\n util_exports.assert(args.epochs != null && args.epochs > 0 && Number.isInteger(args.epochs), () => `For fitDataset(), config.epochs is expected to be a positive integer, but got ${args.epochs}`);\n util_exports.assert(!hasBatchesPerEpoch || args.batchesPerEpoch > 0 && Number.isInteger(args.batchesPerEpoch), () => `For fitDataset(), config.batchesPerEpoch is expected to be a positive integer if specified, but got ${args.batchesPerEpoch}`);\n util_exports.assert(\n args[\"validationSplit\"] == null,\n () => \"`validationSplit` is not supported by `fitDataset()`. Use validationData instead.\"\n );\n if (model2.isTraining) {\n throw new Error(\"Cannot start training because another fit() call is ongoing.\");\n }\n model2.isTraining = true;\n try {\n const doValidation = args.validationData != null;\n let valXs;\n let valYs;\n if (doValidation) {\n if (isDatasetObject(args.validationData)) {\n util_exports.assert(args.validationBatches == null || args.validationBatches > 0 && Number.isInteger(args.validationBatches), () => `For fitDataset() with dataset-based validation, config.validationBatches is expected not to be provided, or to be a positive integer, but got ${args.validationBatches}`);\n } else {\n const validationData = standardizeTensorValidationData(args.validationData);\n valXs = validationData.xs;\n valYs = validationData.ys;\n }\n }\n const trainFunction = model2.makeTrainFunction();\n const outLabels = model2.getDedupedMetricsNames();\n let callbackMetrics;\n if (doValidation) {\n callbackMetrics = outLabels.slice().concat(outLabels.map((n) => \"val_\" + n));\n } else {\n callbackMetrics = outLabels.slice();\n }\n const callbacks2 = standardizeCallbacks(args.callbacks, args.yieldEvery);\n const verbose = args.verbose == null ? 1 : args.verbose;\n const { callbackList, history } = configureCallbacks(\n callbacks2,\n verbose,\n args.epochs,\n null,\n null,\n getStepsPerEpoch(dataset, args),\n null,\n doValidation,\n callbackMetrics\n );\n callbackList.setModel(model2);\n model2.history = history;\n await callbackList.onTrainBegin();\n model2.stopTraining_ = false;\n let epoch = args.initialEpoch == null ? 0 : args.initialEpoch;\n let dataIterator = await dataset.iterator();\n while (epoch < args.epochs) {\n const epochLogs = {};\n await callbackList.onEpochBegin(epoch);\n let stepsDone = 0;\n let batchIndex = 0;\n if (!hasBatchesPerEpoch) {\n dataIterator = await dataset.iterator();\n }\n while (hasBatchesPerEpoch ? stepsDone < args.batchesPerEpoch : true) {\n const iteratorOut = await dataIterator.next();\n if (hasBatchesPerEpoch && iteratorOut.done) {\n console.warn(`You provided \\`batchesPerEpoch\\` as ${args.batchesPerEpoch}, but your dataset iterator ran out of data after ${stepsDone} batches; interrupting training. Make sure that your dataset can generate at least \\`batchesPerEpoch * epochs\\` batches (in this case, ${args.batchesPerEpoch * args.epochs} batches). You may need to use the repeat() function when building your dataset.`);\n break;\n }\n if (iteratorOut.value != null) {\n const { xs, ys } = standardizeDataIteratorOutput(model2, iteratorOut.value);\n const batchLogs = {};\n batchLogs[\"batch\"] = batchIndex;\n batchLogs[\"size\"] = xs[0].shape[0];\n await callbackList.onBatchBegin(batchIndex, batchLogs);\n const sampleWeights = [];\n if (args.classWeight != null) {\n const standardClassWeights = standardizeClassWeights(args.classWeight, model2.outputNames);\n for (let i = 0; i < standardClassWeights.length; ++i) {\n sampleWeights.push(await standardizeWeights(ys[i], null, standardClassWeights[i]));\n }\n }\n const ins = xs.concat(ys).concat(sampleWeights);\n const outs = trainFunction(ins);\n dispose(ins);\n for (let i = 0; i < outLabels.length; ++i) {\n const label = outLabels[i];\n const out = outs[i];\n batchLogs[label] = out;\n keep(out);\n }\n await callbackList.onBatchEnd(batchIndex, batchLogs);\n disposeTensorsInLogs(batchLogs);\n batchIndex++;\n stepsDone++;\n }\n if (hasBatchesPerEpoch ? stepsDone >= args.batchesPerEpoch : iteratorOut.done) {\n if (doValidation) {\n let valOuts;\n if (isDatasetObject(args.validationData)) {\n valOuts = toList(await model2.evaluateDataset(args.validationData, { batches: args.validationBatches }));\n } else {\n valOuts = toList(model2.evaluate(valXs, valYs, {\n batchSize: args.validationBatchSize == null ? DEFAULT_VALIDATION_BATCH_SIZE : args.validationBatchSize,\n verbose: 0\n }));\n }\n for (let i = 0; i < model2.metricsNames.length; ++i) {\n epochLogs[`val_${model2.metricsNames[i]}`] = valOuts[i];\n }\n }\n break;\n }\n if (model2.stopTraining_) {\n break;\n }\n }\n await callbackList.onEpochEnd(epoch, epochLogs);\n epoch++;\n if (model2.stopTraining_) {\n break;\n }\n }\n await callbackList.onTrainEnd();\n await model2.history.syncData();\n return model2.history;\n } finally {\n model2.isTraining = false;\n }\n}\nfunction getStepsPerEpoch(dataset, args) {\n let stepsPerEpoch = null;\n if (args.batchesPerEpoch != null) {\n stepsPerEpoch = args.batchesPerEpoch;\n } else if (Number.isFinite(dataset.size)) {\n stepsPerEpoch = dataset.size;\n }\n return stepsPerEpoch;\n}\nfunction isDatasetObject(dataset) {\n return typeof dataset.iterator === \"function\";\n}\nfunction isLazyIteratorObject(iterator) {\n return typeof iterator.next === \"function\";\n}\nasync function evaluateDataset(model2, dataset, args) {\n args = args || {};\n const hasBatches = args.batches != null;\n const f = model2.testFunction;\n let outs = [];\n if (args.verbose > 0) {\n throw new NotImplementedError(\"Verbose mode is not implemented yet.\");\n }\n util_exports.assert(!hasBatches || args.batches > 0 && Number.isInteger(args.batches), () => `Test loop expects \\`batches\\` to be a positive integer, but received ${JSON.stringify(args.batches)}`);\n const dataIterator = isLazyIteratorObject(dataset) ? dataset : await dataset.iterator();\n let numExamples = 0;\n let batch = 0;\n while (hasBatches ? batch < args.batches : true) {\n const iteratorOut = await dataIterator.next();\n outs = tidy(() => {\n if (iteratorOut.value) {\n const { xs, ys } = standardizeDataIteratorOutput(model2, iteratorOut.value);\n const xsAndYs = xs.concat(ys);\n const batchOuts = tidy(() => f(xsAndYs));\n dispose(xsAndYs);\n if (batch === 0) {\n for (let i = 0; i < batchOuts.length; ++i) {\n outs.push(scalar(0));\n }\n }\n const batchSize = xsAndYs[0].shape[0];\n for (let i = 0; i < batchOuts.length; ++i) {\n const batchOut = batchOuts[i];\n const oldScalar = outs[i];\n outs[i] = tidy(() => add2(outs[i], mul(batchSize, batchOut)));\n if (batch > 0) {\n dispose(oldScalar);\n }\n }\n dispose(batchOuts);\n numExamples += batchSize;\n ++batch;\n }\n return outs;\n });\n if (iteratorOut.done) {\n if (hasBatches) {\n console.warn(`Your dataset iterator ran out of data during evaluateDataset(). Interrupting evalution. Make sure that your dataset can generate at least \\`batches\\` batches (in this case, ${args.batches} batches). You may need to use the repeat() function when building your dataset.`);\n }\n break;\n }\n }\n for (let i = 0; i < outs.length; ++i) {\n const oldScalar = outs[i];\n outs[i] = div(outs[i], numExamples);\n dispose(oldScalar);\n }\n return singletonOrArray(outs);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/engine/training_tensors.js\nfunction checkBatchSize(batchSize) {\n util_exports.assert(batchSize > 0 && Number.isInteger(batchSize), () => `batchSize is required to be a positive integer, but got ${batchSize}`);\n}\nfunction sliceArrays(arrays, start, stop) {\n if (arrays == null) {\n return [null];\n } else if (Array.isArray(arrays)) {\n return arrays.map((array2) => sliceAlongFirstAxis(array2, start, stop - start));\n } else {\n return sliceAlongFirstAxis(arrays, start, stop - start);\n }\n}\nfunction sliceArraysByIndices(arrays, indices) {\n return tidy(() => {\n if (arrays == null) {\n return null;\n } else if (Array.isArray(arrays)) {\n return arrays.map((array2) => sliceArraysByIndices(array2, indices));\n } else {\n return gather2(arrays, indices.dtype === \"int32\" ? indices : cast(indices, \"int32\"));\n }\n });\n}\nfunction makeBatches(size, batchSize) {\n const output = [];\n let batchStart = 0;\n let batchEnd = null;\n while (batchStart < size) {\n batchEnd = batchStart + batchSize;\n if (batchEnd >= size) {\n batchEnd = size;\n }\n output.push([batchStart, batchEnd]);\n batchStart = batchEnd;\n }\n return output;\n}\nasync function fitLoop(model2, f, ins, outLabels, batchSize, epochs, verbose, callbacks2, valF, valIns, shuffle2, callbackMetrics, initialEpoch, stepsPerEpoch, validationSteps) {\n if (batchSize == null) {\n batchSize = 32;\n }\n if (epochs == null) {\n epochs = 1;\n }\n if (shuffle2 == null) {\n shuffle2 = true;\n }\n if (initialEpoch == null) {\n initialEpoch = 0;\n }\n let doValidation = false;\n if (valF != null && valIns != null) {\n doValidation = true;\n }\n if (validationSteps != null) {\n doValidation = true;\n if (stepsPerEpoch == null) {\n throw new ValueError(\"Can only use `validationSteps` when doing step-wise training, i.e., `stepsPerEpoch` must be set.\");\n }\n }\n const numTrainSamples = model2.checkNumSamples(ins, batchSize, stepsPerEpoch, \"steps_per_epoch\");\n let indexArray;\n if (numTrainSamples != null) {\n indexArray = range2(0, numTrainSamples);\n }\n if (verbose == null) {\n verbose = 1;\n }\n const { callbackList, history } = configureCallbacks(callbacks2, verbose, epochs, initialEpoch, numTrainSamples, stepsPerEpoch, batchSize, doValidation, callbackMetrics);\n callbackList.setModel(model2);\n model2.history = history;\n await callbackList.onTrainBegin();\n model2.stopTraining_ = false;\n for (let epoch = initialEpoch; epoch < epochs; ++epoch) {\n await callbackList.onEpochBegin(epoch);\n const epochLogs = {};\n if (stepsPerEpoch != null) {\n throw new NotImplementedError(\"stepsPerEpoch mode is not implemented yet.\");\n } else {\n if (shuffle2 === \"batch\") {\n throw new NotImplementedError(\"batch shuffling is not implemneted yet\");\n } else if (shuffle2) {\n util_exports.shuffle(indexArray);\n }\n const epochIndexArray1D = tensor1d(indexArray);\n const batches = makeBatches(numTrainSamples, batchSize);\n for (let batchIndex = 0; batchIndex < batches.length; ++batchIndex) {\n const batchLogs = {};\n await callbackList.onBatchBegin(batchIndex, batchLogs);\n tidy(() => {\n const batchStart = batches[batchIndex][0];\n const batchEnd = batches[batchIndex][1];\n const batchIds = sliceAlongFirstAxis(epochIndexArray1D, batchStart, batchEnd - batchStart);\n batchLogs[\"batch\"] = batchIndex;\n batchLogs[\"size\"] = batchEnd - batchStart;\n const insBatch = sliceArraysByIndices(ins, batchIds);\n const outs = f(insBatch);\n for (let i = 0; i < outLabels.length; ++i) {\n const label = outLabels[i];\n const out = outs[i];\n batchLogs[label] = out;\n keep(out);\n }\n if (batchIndex === batches.length - 1) {\n if (doValidation) {\n const valOuts = model2.testLoop(valF, valIns, batchSize);\n for (let i = 0; i < outLabels.length; ++i) {\n const label = outLabels[i];\n const out = valOuts[i];\n keep(out);\n epochLogs[\"val_\" + label] = out;\n }\n }\n }\n });\n await callbackList.onBatchEnd(batchIndex, batchLogs);\n disposeTensorsInLogs(batchLogs);\n if (model2.stopTraining_) {\n break;\n }\n }\n epochIndexArray1D.dispose();\n }\n await callbackList.onEpochEnd(epoch, epochLogs);\n if (model2.stopTraining_) {\n break;\n }\n }\n await callbackList.onTrainEnd();\n await model2.history.syncData();\n return model2.history;\n}\nasync function fitTensors(model2, x, y, args = {}) {\n if (model2.isTraining) {\n throw new Error(\"Cannot start training because another fit() call is ongoing.\");\n }\n model2.isTraining = true;\n let inputs;\n let targets;\n let originalInputs;\n let originalTargets;\n let inputValX;\n let inputValY;\n let valX;\n let valY;\n let sampleWeights;\n try {\n const batchSize = args.batchSize == null ? 32 : args.batchSize;\n checkBatchSize(batchSize);\n const checkBatchAxis = false;\n const standardizedOuts = await model2.standardizeUserData(x, y, args.sampleWeight, args.classWeight, checkBatchAxis, batchSize);\n inputs = standardizedOuts[0];\n targets = standardizedOuts[1];\n sampleWeights = standardizedOuts[2];\n let doValidation = false;\n let valIns;\n if (args.validationData != null && args.validationData.length > 0) {\n doValidation = true;\n if (args.validationData.length === 2) {\n inputValX = args.validationData[0];\n inputValY = args.validationData[1];\n } else if (args.validationData.length === 3) {\n throw new NotImplementedError(\"validationData including sample weights is not supported yet.\");\n } else {\n throw new ValueError(`When passing validation data, it must contain 2 (valX, valY) or 3 (valX, valY, valSampleWeight) items; ${args.validationData} is invalid.`);\n }\n const checkBatchAxis2 = true;\n const valStandardized = await model2.standardizeUserData(inputValX, inputValY, null, null, checkBatchAxis2, batchSize);\n valX = valStandardized[0];\n valY = valStandardized[1];\n valIns = valX.concat(valY);\n } else if (args.validationSplit != null && args.validationSplit > 0 && args.validationSplit < 1) {\n doValidation = true;\n const splitAt = Math.floor(inputs[0].shape[0] * (1 - args.validationSplit));\n const originalBatchSize = inputs[0].shape[0];\n valX = sliceArrays(inputs, splitAt, originalBatchSize);\n originalInputs = inputs;\n inputs = sliceArrays(inputs, 0, splitAt);\n valY = sliceArrays(targets, splitAt, originalBatchSize);\n originalTargets = targets;\n targets = sliceArrays(targets, 0, splitAt);\n valIns = valX.concat(valY);\n } else if (args.validationSteps != null) {\n doValidation = true;\n }\n const ins = inputs.concat(targets).concat(sampleWeights);\n model2.checkTrainableWeightsConsistency();\n const trainFunction = model2.makeTrainFunction();\n const outLabels = model2.getDedupedMetricsNames();\n let valFunction;\n let callbackMetrics;\n if (doValidation) {\n model2.makeTestFunction();\n valFunction = model2.testFunction;\n callbackMetrics = outLabels.slice().concat(outLabels.map((n) => \"val_\" + n));\n } else {\n valFunction = null;\n valIns = [];\n callbackMetrics = outLabels.slice();\n }\n const callbacks2 = standardizeCallbacks(args.callbacks, args.yieldEvery);\n const out = await fitLoop(model2, trainFunction, ins, outLabels, batchSize, args.epochs, args.verbose, callbacks2, valFunction, valIns, args.shuffle, callbackMetrics, args.initialEpoch, null, null);\n return out;\n } finally {\n model2.isTraining = false;\n disposeNewTensors(inputs, x);\n disposeNewTensors(targets, y);\n disposeNewTensors(originalInputs, x);\n disposeNewTensors(originalTargets, y);\n disposeNewTensors(valX, inputValX);\n disposeNewTensors(valY, inputValY);\n if (sampleWeights != null) {\n dispose(sampleWeights);\n }\n }\n}\nfunction ensureTensorsRank2OrHigher(tensors) {\n const outs = [];\n if (tensors instanceof Tensor) {\n tensors = [tensors];\n }\n for (let i = 0; i < tensors.length; ++i) {\n const tensor2 = tensors[i];\n if (tensor2.rank === 1) {\n outs.push(expandDims2(tensor2, 1));\n } else if (tensor2.rank === 0) {\n throw new Error(\"Expected tensor to be at least 1D, but received a 0D tensor (scalar).\");\n } else {\n outs.push(tensor2);\n }\n }\n return outs;\n}\nfunction disposeNewTensors(tensors, refTensors) {\n if (tensors == null) {\n return;\n }\n const oldTensorIds = [];\n if (refTensors instanceof Tensor) {\n oldTensorIds.push(refTensors.id);\n } else if (Array.isArray(refTensors)) {\n refTensors.forEach((t) => oldTensorIds.push(t.id));\n } else if (refTensors != null) {\n for (const name in refTensors) {\n const oldTensor = refTensors[name];\n oldTensorIds.push(oldTensor.id);\n }\n }\n const tensorsToDispose = [];\n if (tensors instanceof Tensor) {\n if (oldTensorIds.indexOf(tensors.id) === -1) {\n tensorsToDispose.push(tensors);\n }\n } else if (Array.isArray(tensors)) {\n tensors.forEach((t) => {\n if (oldTensorIds.indexOf(t.id) === -1) {\n tensorsToDispose.push(t);\n }\n });\n } else if (tensors != null) {\n for (const name in tensors) {\n const tensor2 = tensors[name];\n if (oldTensorIds.indexOf(tensor2.id) === -1) {\n tensorsToDispose.push(tensor2);\n }\n }\n }\n tensorsToDispose.forEach((t) => {\n if (!t.isDisposed) {\n t.dispose();\n }\n });\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/engine/training.js\nfunction isDataTensor(x) {\n return x instanceof Tensor;\n}\nfunction isDataArray(x) {\n return Array.isArray(x);\n}\nfunction isDataDict(x) {\n return !isDataTensor(x) && !isDataArray(x);\n}\nfunction standardizeInputData(data, names, shapes, checkBatchAxis = true, exceptionPrefix = \"\") {\n if (names == null || names.length === 0) {\n if (data != null) {\n let gotUnexpectedData = false;\n if (isDataArray(data) && data.length > 0) {\n gotUnexpectedData = true;\n } else if (isDataDict(data)) {\n for (const key in data) {\n if (data.hasOwnProperty(key)) {\n gotUnexpectedData = true;\n break;\n }\n }\n } else {\n gotUnexpectedData = true;\n }\n if (gotUnexpectedData) {\n throw new ValueError(`Error when checking model ${exceptionPrefix} expected no data, but got ${data}`);\n }\n }\n return [];\n }\n if (data == null) {\n return names.map((name) => null);\n }\n let arrays;\n if (isDataDict(data)) {\n data = data;\n arrays = [];\n for (const name of names) {\n if (data[name] == null) {\n throw new ValueError(`No data provided for \"${name}\". Need data for each key in: ${names}`);\n }\n arrays.push(data[name]);\n }\n } else if (isDataArray(data)) {\n data = data;\n if (data.length !== names.length) {\n throw new ValueError(`Error when checking model ${exceptionPrefix}: the Array of Tensors that you are passing to your model is not the size the model expected. Expected to see ${names.length} Tensor(s), but instead got the following list of Tensor(s): ${data}`);\n }\n arrays = data;\n } else {\n data = data;\n if (names.length > 1) {\n throw new ValueError(`The model ${exceptionPrefix} expects ${names.length} Tensor(s), but only received one Tensor. Found: Tensor with shape ${data.shape}`);\n }\n arrays = [data];\n }\n arrays = ensureTensorsRank2OrHigher(arrays);\n if (shapes != null) {\n for (let i = 0; i < names.length; ++i) {\n if (shapes[i] == null) {\n continue;\n }\n const array2 = arrays[i];\n if (array2.shape.length !== shapes[i].length) {\n throw new ValueError(`Error when checking ${exceptionPrefix}: expected ${names[i]} to have ${shapes[i].length} dimension(s). but got array with shape ${array2.shape}`);\n }\n for (let j = 0; j < shapes[i].length; ++j) {\n if (j === 0 && !checkBatchAxis) {\n continue;\n }\n const dim = array2.shape[j];\n const refDim = shapes[i][j];\n if (refDim != null && refDim >= 0 && dim !== refDim) {\n throw new ValueError(`${exceptionPrefix} expected a batch of elements where each example has shape [${shapes[i].slice(1, shapes[i].length)}] (i.e.,tensor shape [*,${shapes[i].slice(1, shapes[i].length)}]) but the ${exceptionPrefix} received an input with ${array2.shape[0]} examples, each with shape [${array2.shape.slice(1, array2.shape.length)}] (tensor shape [${array2.shape}])`);\n }\n }\n }\n }\n return arrays;\n}\nfunction checkArrayLengths(inputs, targets, weights) {\n const setX = unique2(inputs.map((input2) => input2.shape[0]));\n setX.sort();\n const setY = unique2(targets.map((target) => target.shape[0]));\n setY.sort();\n if (setX.length > 1) {\n throw new ValueError(`All input Tensors (x) should have the same number of samples. Got array shapes: ${JSON.stringify(inputs.map((input2) => input2.shape))}`);\n }\n if (setY.length > 1) {\n throw new ValueError(`All target Tensors (y) should have the same number of samples. Got array shapes: ${JSON.stringify(targets.map((target) => target.shape))}`);\n }\n if (setX.length > 0 && setY.length > 0 && !util_exports.arraysEqual(setX, setY)) {\n throw new ValueError(`Input Tensors should have the same number of samples as target Tensors. Found ${setX[0]} input sample(s) and ${setY[0]} target sample(s).`);\n }\n}\nfunction checkLossAndTargetCompatibility(targets, lossFns, outputShapes) {\n const keyLosses = [\n meanSquaredError2,\n binaryCrossentropy,\n categoricalCrossentropy\n ];\n for (let i = 0; i < targets.length; ++i) {\n const y = targets[i];\n const loss = lossFns[i];\n const shape = outputShapes[i];\n if (loss == null) {\n continue;\n }\n if (loss === categoricalCrossentropy) {\n if (y.shape[y.shape.length - 1] === 1) {\n throw new ValueError(`You are passing a target array of shape ${y.shape} while using a loss 'categorical_crossentropy'. 'categorical_crossentropy'expects targets to be binary matrices (1s and 0s) of shape [samples, classes].`);\n }\n }\n if (keyLosses.indexOf(loss) !== -1) {\n const slicedYShape = y.shape.slice(1);\n const slicedShape = shape.slice(1);\n for (let j = 0; j < slicedYShape.length; ++j) {\n const targetDim = slicedYShape[j];\n const outDim = slicedShape[j];\n if (outDim != null && targetDim !== outDim) {\n throw new ValueError(`A target Tensor with shape ${y.shape} was passed for an output of shape ${shape}, while using a loss function that expects targets to have the same shape as the output.`);\n }\n }\n }\n }\n}\nfunction checkInputData(data, names, shapes, checkBatchAxis = true, exceptionPrefix = \"\") {\n let arrays;\n if (Array.isArray(data)) {\n if (data.length !== names.length) {\n throw new ValueError(`Error when checking model ${exceptionPrefix}: the Array of Tensors that you are passing to your model is not the size the the model expected. Expected to see ${names.length} Tensor(s), but instead got ${data.length} Tensors(s).`);\n }\n arrays = data;\n } else {\n if (names.length > 1) {\n throw new ValueError(`The model expects ${names.length} ${exceptionPrefix} Tensors, but only received one Tensor. Found: array with shape ${JSON.stringify(data.shape)}.`);\n }\n arrays = [data];\n }\n if (shapes != null) {\n for (let i = 0; i < names.length; ++i) {\n if (shapes[i] == null) {\n continue;\n }\n const array2 = arrays[i];\n if (array2.shape.length !== shapes[i].length) {\n throw new ValueError(`Error when checking ${exceptionPrefix}: expected ${names[i]} to have ${shapes[i].length} dimension(s), but got array with shape ${JSON.stringify(array2.shape)}`);\n }\n for (let j = 0; j < shapes[i].length; ++j) {\n if (j === 0 && !checkBatchAxis) {\n continue;\n }\n const dim = array2.shape[j];\n const refDim = shapes[i][j];\n if (refDim != null) {\n if (refDim !== dim) {\n throw new ValueError(`Error when checking ${exceptionPrefix}: expected ${names[i]} to have shape ${JSON.stringify(shapes[i])} but got array with shape ${JSON.stringify(array2.shape)}.`);\n }\n }\n }\n }\n }\n}\nfunction collectMetrics(metrics, outputNames) {\n if (metrics == null || Array.isArray(metrics) && metrics.length === 0) {\n return outputNames.map((name) => []);\n }\n let wrappedMetrics;\n if (typeof metrics === \"string\" || typeof metrics === \"function\") {\n wrappedMetrics = [metrics];\n } else if (Array.isArray(metrics) || typeof metrics === \"object\") {\n wrappedMetrics = metrics;\n } else {\n throw new TypeError(`Type of metrics argument not understood. Expected an string,function, Array, or Object, found: ${metrics}`);\n }\n if (Array.isArray(wrappedMetrics)) {\n return outputNames.map((name) => wrappedMetrics);\n } else {\n const nestedMetrics = [];\n for (const name of outputNames) {\n let outputMetrics = wrappedMetrics.hasOwnProperty(name) ? wrappedMetrics[name] : [];\n if (!Array.isArray(outputMetrics)) {\n outputMetrics = [outputMetrics];\n }\n nestedMetrics.push(outputMetrics);\n }\n return nestedMetrics;\n }\n}\nvar LAYERS_MODEL_FORMAT_NAME = \"layers-model\";\nvar LayersModel = class extends Container {\n constructor(args) {\n super(args);\n this.isTraining = false;\n }\n summary(lineLength, positions, printFn = console.log) {\n if (!this.built) {\n throw new ValueError(`This model has never been called, thus its weights have not been created yet. So no summary can be displayed. Build the model first (e.g., by calling it on some test data).`);\n }\n printSummary(this, lineLength, positions, printFn);\n }\n compile(args) {\n if (args.loss == null) {\n args.loss = [];\n }\n this.loss = args.loss;\n if (typeof args.optimizer === \"string\") {\n this.optimizer_ = getOptimizer(args.optimizer);\n this.isOptimizerOwned = true;\n } else {\n if (!(args.optimizer instanceof Optimizer)) {\n throw new ValueError(`User-defined optimizer must be an instance of tf.Optimizer.`);\n }\n this.optimizer_ = args.optimizer;\n this.isOptimizerOwned = false;\n }\n let lossFunctions = [];\n if (!Array.isArray(args.loss) && typeof args.loss !== \"string\" && typeof args.loss !== \"function\") {\n args.loss = args.loss;\n for (const name in args.loss) {\n if (this.outputNames.indexOf(name) === -1) {\n throw new ValueError(`Unknown entry in loss dictionary: \"${name}\". Only expected the following keys: ${this.outputNames}`);\n }\n }\n for (const name of this.outputNames) {\n if (args.loss[name] == null) {\n console.warn(`Output \"${name}\" is missing from loss dictionary. We assume this was done on purpose, and we will not be expecting data to be passed to ${name} during training`);\n }\n lossFunctions.push(get(args.loss[name]));\n }\n } else if (Array.isArray(args.loss)) {\n if (args.loss.length !== this.outputs.length) {\n throw new ValueError(`When passing an Array as loss, it should have one entry per model output. The model has ${this.outputs.length} output(s), but you passed loss=${args.loss}.`);\n }\n const theLosses = args.loss;\n lossFunctions = theLosses.map((l) => get(l));\n } else {\n const lossFunction = get(args.loss);\n this.outputs.forEach((_) => {\n lossFunctions.push(lossFunction);\n });\n }\n this.lossFunctions = lossFunctions;\n this.feedOutputNames = [];\n this.feedOutputShapes = [];\n this.feedLossFns = [];\n for (let i = 0; i < this.outputs.length; ++i) {\n const shape = this.internalOutputShapes[i];\n const name = this.outputNames[i];\n this.feedOutputNames.push(name);\n this.feedOutputShapes.push(shape);\n this.feedLossFns.push(this.lossFunctions[i]);\n }\n const skipTargetIndices = [];\n this.metrics = args.metrics;\n this.metricsNames = [\"loss\"];\n this.metricsTensors = [];\n nameScope(\"loss\", () => {\n for (let i = 0; i < this.outputs.length; ++i) {\n if (skipTargetIndices.indexOf(i) !== -1) {\n continue;\n }\n const weightedLoss = this.lossFunctions[i];\n if (this.outputs.length > 1) {\n this.metricsTensors.push([weightedLoss, i]);\n this.metricsNames.push(this.outputNames[i] + \"_loss\");\n }\n }\n });\n const nestedMetrics = collectMetrics(args.metrics, this.outputNames);\n const appendMetric = (outputIndex, metricName, metricTensor) => {\n if (this.outputNames.length > 1) {\n metricName = this.outputNames[outputIndex] + \"_\" + metricName;\n }\n this.metricsNames.push(metricName);\n this.metricsTensors.push([metricTensor, outputIndex]);\n };\n nameScope(\"metric\", () => {\n for (let i = 0; i < this.outputs.length; ++i) {\n if (skipTargetIndices.indexOf(i) !== -1) {\n continue;\n }\n const outputMetrics = nestedMetrics[i];\n const handleMetrics = (metrics) => {\n const metricNamePrefix = \"\";\n let metricName;\n let accFn;\n let weightedMetricFn;\n for (const metric of metrics) {\n if (typeof metric === \"string\" && [\"accuracy\", \"acc\", \"crossentropy\", \"ce\"].indexOf(metric) !== -1) {\n const outputShape = this.internalOutputShapes[i];\n if (outputShape[outputShape.length - 1] === 1 || this.lossFunctions[i] === binaryCrossentropy) {\n if ([\"accuracy\", \"acc\"].indexOf(metric) !== -1) {\n accFn = binaryAccuracy;\n } else if ([\"crossentropy\", \"ce\"].indexOf(metric) !== -1) {\n accFn = binaryCrossentropy2;\n }\n } else if (this.lossFunctions[i] === sparseCategoricalCrossentropy) {\n if ([\"accuracy\", \"acc\"].indexOf(metric) !== -1) {\n accFn = sparseCategoricalAccuracy;\n } else if ([\"crossentropy\", \"ce\"].indexOf(metric) !== -1) {\n accFn = sparseCategoricalCrossentropy2;\n }\n } else {\n if ([\"accuracy\", \"acc\"].indexOf(metric) !== -1) {\n accFn = categoricalAccuracy;\n } else if ([\"crossentropy\", \"ce\"].indexOf(metric) !== -1) {\n accFn = categoricalCrossentropy2;\n }\n }\n let suffix;\n if ([\"accuracy\", \"acc\"].indexOf(metric) !== -1) {\n suffix = \"acc\";\n } else if ([\"crossentropy\", \"ce\"].indexOf(metric) !== -1) {\n suffix = \"ce\";\n }\n weightedMetricFn = accFn;\n metricName = metricNamePrefix + suffix;\n } else {\n const metricFn = get2(metric);\n weightedMetricFn = metricFn;\n metricName = metricNamePrefix + getLossOrMetricName(metric);\n }\n let metricResult;\n nameScope(metricName, () => {\n metricResult = weightedMetricFn;\n });\n appendMetric(i, metricName, metricResult);\n }\n };\n handleMetrics(outputMetrics);\n }\n });\n this.collectedTrainableWeights = this.trainableWeights;\n }\n checkTrainableWeightsConsistency() {\n if (this.collectedTrainableWeights == null) {\n return;\n }\n if (this.trainableWeights.length !== this.collectedTrainableWeights.length) {\n console.warn(\"Discrepancy between trainableweights and collected trainable weights. Did you set `model.trainable` without calling `model.compile()` afterwards?\");\n }\n }\n evaluate(x, y, args = {}) {\n const batchSize = args.batchSize == null ? 32 : args.batchSize;\n checkBatchSize(batchSize);\n const checkBatchAxis = true;\n const standardizedOuts = this.standardizeUserDataXY(x, y, checkBatchAxis, batchSize);\n try {\n const ins = standardizedOuts[0].concat(standardizedOuts[1]);\n this.makeTestFunction();\n const f = this.testFunction;\n const testOuts = this.testLoop(f, ins, batchSize, args.verbose, args.steps);\n return singletonOrArray(testOuts);\n } finally {\n disposeNewTensors(standardizedOuts[0], x);\n disposeNewTensors(standardizedOuts[1], y);\n }\n }\n async evaluateDataset(dataset, args) {\n this.makeTestFunction();\n return evaluateDataset(this, dataset, args);\n }\n checkNumSamples(ins, batchSize, steps, stepsName = \"steps\") {\n let numSamples;\n if (steps != null) {\n numSamples = null;\n if (batchSize != null) {\n throw new ValueError(`If ${stepsName} is set, batchSize must be null or undefined.Got batchSize = ${batchSize}`);\n }\n } else if (ins != null) {\n if (Array.isArray(ins)) {\n numSamples = ins[0].shape[0];\n } else {\n numSamples = ins.shape[0];\n }\n } else {\n throw new ValueError(`Either the input data should have a defined shape, or ${stepsName} shoud be specified.`);\n }\n return numSamples;\n }\n execute(inputs, outputs) {\n if (Array.isArray(outputs) && outputs.length === 0) {\n throw new ValueError(\"`outputs` is an empty Array, which is not allowed.\");\n }\n const outputsIsArray = Array.isArray(outputs);\n const outputNames = outputsIsArray ? outputs : [outputs];\n const outputSymbolicTensors = this.retrieveSymbolicTensors(outputNames);\n const feedDict = new FeedDict();\n if (inputs instanceof Tensor) {\n inputs = [inputs];\n }\n if (Array.isArray(inputs)) {\n if (inputs.length !== this.inputs.length) {\n throw new ValueError(`The number of inputs provided (${inputs.length}) does not match the number of inputs of this model (${this.inputs.length}).`);\n }\n for (let i = 0; i < this.inputs.length; ++i) {\n feedDict.add(this.inputs[i], inputs[i]);\n }\n } else {\n for (const input2 of this.inputs) {\n const tensorValue = inputs[input2.name];\n if (tensorValue == null) {\n throw new ValueError(`No value is provided for the model's input ${input2.name}`);\n }\n feedDict.add(input2, tensorValue);\n }\n }\n const executeOutputs = execute(outputSymbolicTensors, feedDict);\n return outputsIsArray ? executeOutputs : executeOutputs[0];\n }\n retrieveSymbolicTensors(symbolicTensorNames) {\n const outputSymbolicTensors = pyListRepeat(null, symbolicTensorNames.length);\n let outputsRemaining = symbolicTensorNames.length;\n for (const layer of this.layers) {\n const layerOutputs = Array.isArray(layer.output) ? layer.output : [layer.output];\n const layerOutputNames = layerOutputs.map((output) => output.name);\n for (let i = 0; i < symbolicTensorNames.length; ++i) {\n const index = layerOutputNames.indexOf(symbolicTensorNames[i]);\n if (index !== -1) {\n outputSymbolicTensors[i] = layerOutputs[index];\n outputsRemaining--;\n }\n if (outputsRemaining === 0) {\n break;\n }\n }\n if (outputsRemaining === 0) {\n break;\n }\n }\n if (outputsRemaining > 0) {\n const remainingNames = [];\n outputSymbolicTensors.forEach((tensor2, i) => {\n if (tensor2 == null) {\n remainingNames.push(symbolicTensorNames[i]);\n }\n });\n throw new ValueError(`Cannot find SymbolicTensors for output name(s): ${JSON.stringify(remainingNames)}`);\n }\n return outputSymbolicTensors;\n }\n predictLoop(ins, batchSize = 32, verbose = false) {\n return tidy(() => {\n const numSamples = this.checkNumSamples(ins);\n if (verbose) {\n throw new NotImplementedError(\"Verbose predictLoop() is not implemented yet.\");\n }\n const batches = makeBatches(numSamples, batchSize);\n const outsBatches = this.outputs.map((output) => []);\n for (let batchIndex = 0; batchIndex < batches.length; ++batchIndex) {\n const batchOuts = tidy(() => {\n const batchStart = batches[batchIndex][0];\n const batchEnd = batches[batchIndex][1];\n const insBatch = sliceArrays(ins, batchStart, batchEnd);\n const feeds = [];\n if (Array.isArray(insBatch)) {\n for (let i = 0; i < insBatch.length; ++i) {\n feeds.push({ key: this.inputs[i], value: insBatch[i] });\n }\n } else {\n feeds.push({ key: this.inputs[0], value: insBatch });\n }\n const feedDict = new FeedDict(feeds);\n return execute(this.outputs, feedDict);\n });\n batchOuts.forEach((batchOut, i) => outsBatches[i].push(batchOut));\n }\n return singletonOrArray(outsBatches.map((batches2) => concat(batches2, 0)));\n });\n }\n predict(x, args = {}) {\n const xsRank2OrHigher = ensureTensorsRank2OrHigher(x);\n checkInputData(xsRank2OrHigher, this.inputNames, this.feedInputShapes, false);\n try {\n const batchSize = args.batchSize == null ? 32 : args.batchSize;\n checkBatchSize(batchSize);\n return this.predictLoop(xsRank2OrHigher, batchSize);\n } finally {\n disposeNewTensors(xsRank2OrHigher, x);\n }\n }\n predictOnBatch(x) {\n checkInputData(x, this.inputNames, this.feedInputShapes, true);\n const batchSize = (Array.isArray(x) ? x[0] : x).shape[0];\n return this.predictLoop(x, batchSize);\n }\n standardizeUserDataXY(x, y, checkBatchAxis = true, batchSize) {\n if (this.optimizer_ == null) {\n throw new RuntimeError(\"You must compile a model before training/testing. Use LayersModel.compile(modelCompileArgs).\");\n }\n const outputShapes = [];\n for (let i = 0; i < this.feedOutputShapes.length; ++i) {\n const outputShape = this.feedOutputShapes[i];\n const lossFn = this.feedLossFns[i];\n if (lossFn === sparseCategoricalCrossentropy) {\n outputShapes.push(outputShape.slice(0, outputShape.length - 1).concat([1]));\n } else {\n outputShapes.push(outputShape);\n }\n }\n x = standardizeInputData(x, this.feedInputNames, this.feedInputShapes, false, \"input\");\n y = standardizeInputData(y, this.feedOutputNames, outputShapes, false, \"target\");\n checkArrayLengths(x, y, null);\n checkLossAndTargetCompatibility(y, this.feedLossFns, this.feedOutputShapes);\n if (this.stateful && batchSize != null && batchSize > 0) {\n if (x[0].shape[0] % batchSize !== 0) {\n throw new ValueError(`In a stateful network, you should only pass inputs with a number of samples that is divisible by the batch size ${batchSize}. Found: ${x[0].shape[0]} sample(s).`);\n }\n }\n return [x, y];\n }\n async standardizeUserData(x, y, sampleWeight, classWeight, checkBatchAxis = true, batchSize) {\n const [standardXs, standardYs] = this.standardizeUserDataXY(x, y, checkBatchAxis, batchSize);\n if (sampleWeight != null) {\n throw new Error(\"sample weight is not supported yet.\");\n }\n let standardSampleWeights = null;\n if (classWeight != null) {\n const classWeights = standardizeClassWeights(classWeight, this.outputNames);\n standardSampleWeights = [];\n for (let i = 0; i < classWeights.length; ++i) {\n standardSampleWeights.push(await standardizeWeights(standardYs[i], null, classWeights[i]));\n }\n }\n return [standardXs, standardYs, standardSampleWeights];\n }\n testLoop(f, ins, batchSize, verbose = 0, steps) {\n return tidy(() => {\n const numSamples = this.checkNumSamples(ins, batchSize, steps, \"steps\");\n const outs = [];\n if (verbose > 0) {\n throw new NotImplementedError(\"Verbose mode is not implemented yet.\");\n }\n if (steps != null) {\n throw new NotImplementedError(\"steps mode in testLoop() is not implemented yet\");\n } else {\n const batches = makeBatches(numSamples, batchSize);\n const indexArray = tensor1d(range2(0, numSamples));\n for (let batchIndex = 0; batchIndex < batches.length; ++batchIndex) {\n const batchStart = batches[batchIndex][0];\n const batchEnd = batches[batchIndex][1];\n const batchIds = sliceAlongFirstAxis(indexArray, batchStart, batchEnd - batchStart);\n const insBatch = sliceArraysByIndices(ins, batchIds);\n const batchOuts = f(insBatch);\n if (batchIndex === 0) {\n for (let i = 0; i < batchOuts.length; ++i) {\n outs.push(scalar(0));\n }\n }\n for (let i = 0; i < batchOuts.length; ++i) {\n const batchOut = batchOuts[i];\n outs[i] = add2(outs[i], mul(batchEnd - batchStart, batchOut));\n }\n }\n for (let i = 0; i < outs.length; ++i) {\n outs[i] = div(outs[i], numSamples);\n }\n }\n return outs;\n });\n }\n getDedupedMetricsNames() {\n const outLabels = this.metricsNames;\n const dedupedOutLabels = [];\n for (let i = 0; i < outLabels.length; ++i) {\n const label = outLabels[i];\n let newLabel = label;\n if (count(outLabels, label) > 1) {\n const dupIndex = count(outLabels.slice(0, i), label);\n newLabel += `_${dupIndex}`;\n }\n dedupedOutLabels.push(newLabel);\n }\n return dedupedOutLabels;\n }\n makeTrainFunction() {\n return (data) => {\n const lossValues = [];\n const inputs = data.slice(0, this.inputs.length);\n const targets = data.slice(this.inputs.length, this.inputs.length + this.outputs.length);\n const sampleWeights = data.slice(this.inputs.length + this.outputs.length, this.inputs.length + this.outputs.length * 2);\n const metricsValues = [];\n const totalLossFunction = () => {\n const feeds = [];\n for (let i = 0; i < this.inputs.length; ++i) {\n feeds.push({ key: this.inputs[i], value: inputs[i] });\n }\n const feedDict = new FeedDict(feeds);\n const outputs = execute(this.outputs, feedDict, { \"training\": true });\n let totalLoss;\n for (let i = 0; i < this.lossFunctions.length; ++i) {\n const lossFunction = this.lossFunctions[i];\n let loss = lossFunction(targets[i], outputs[i]);\n if (sampleWeights[i] != null) {\n loss = computeWeightedLoss2(loss, sampleWeights[i]);\n }\n const meanLoss = mean(loss);\n lossValues.push(meanLoss);\n if (i === 0) {\n totalLoss = loss;\n } else {\n totalLoss = add2(totalLoss, loss);\n }\n }\n for (let i = 0; i < this.metricsTensors.length; ++i) {\n let weightedMetric;\n if (this.outputs.length > 1 && i < this.outputs.length) {\n weightedMetric = lossValues[i];\n } else {\n const metric = this.metricsTensors[i][0];\n const outputIndex = this.metricsTensors[i][1];\n weightedMetric = mean(metric(targets[outputIndex], outputs[outputIndex]));\n }\n keep(weightedMetric);\n metricsValues.push(weightedMetric);\n }\n totalLoss = mean(totalLoss);\n this.calculateLosses().forEach((regularizerLoss) => {\n totalLoss = add2(totalLoss, regularizerLoss);\n });\n return totalLoss;\n };\n const variables = this.collectedTrainableWeights.map((param) => param.read());\n const returnCost = true;\n const totalLossValue = this.optimizer_.minimize(totalLossFunction, returnCost, variables);\n return [totalLossValue].concat(metricsValues);\n };\n }\n makeTestFunction() {\n this.testFunction = (data) => {\n return tidy(() => {\n const valOutputs = [];\n let totalLoss;\n const inputs = data.slice(0, this.inputs.length);\n const targets = data.slice(this.inputs.length, this.inputs.length + this.outputs.length);\n const feeds = [];\n for (let i = 0; i < this.inputs.length; ++i) {\n feeds.push({ key: this.inputs[i], value: inputs[i] });\n }\n const feedDict = new FeedDict(feeds);\n const outputs = execute(this.outputs, feedDict);\n for (let i = 0; i < this.lossFunctions.length; ++i) {\n const lossFunction = this.lossFunctions[i];\n const loss = mean(lossFunction(targets[i], outputs[i]));\n if (i === 0) {\n totalLoss = loss;\n } else {\n totalLoss = add2(totalLoss, loss);\n }\n valOutputs.push(totalLoss);\n }\n for (let i = 0; i < this.metricsTensors.length; ++i) {\n const metric = this.metricsTensors[i][0];\n const outputIndex = this.metricsTensors[i][1];\n const meanMetric = mean(metric(targets[outputIndex], outputs[outputIndex]));\n valOutputs.push(meanMetric);\n }\n return valOutputs;\n });\n };\n }\n async fit(x, y, args = {}) {\n return fitTensors(this, x, y, args);\n }\n async fitDataset(dataset, args) {\n return fitDataset(this, dataset, args);\n }\n async trainOnBatch(x, y) {\n const standardizeOut = await this.standardizeUserData(x, y);\n const inputs = standardizeOut[0];\n const targets = standardizeOut[1];\n const trainFunction = this.makeTrainFunction();\n const losses2 = trainFunction(inputs.concat(targets));\n const lossValues = [];\n for (const loss of losses2) {\n const v = await loss.data();\n lossValues.push(v[0]);\n }\n dispose(losses2);\n disposeNewTensors(standardizeOut[0], x);\n disposeNewTensors(standardizeOut[1], y);\n return singletonOrArray(lossValues);\n }\n getNamedWeights(config) {\n const namedWeights = [];\n const trainableOnly = config != null && config.trainableOnly;\n const weights = trainableOnly ? this.trainableWeights : this.weights;\n const weightValues = this.getWeights(trainableOnly);\n for (let i = 0; i < weights.length; ++i) {\n if (trainableOnly && !weights[i].trainable) {\n continue;\n }\n namedWeights.push({ name: weights[i].originalName, tensor: weightValues[i] });\n }\n return namedWeights;\n }\n set stopTraining(stop) {\n this.stopTraining_ = stop;\n }\n get stopTraining() {\n return this.stopTraining_;\n }\n get optimizer() {\n return this.optimizer_;\n }\n set optimizer(optimizer) {\n if (this.optimizer_ !== optimizer) {\n this.optimizer_ = optimizer;\n this.isOptimizerOwned = false;\n }\n }\n dispose() {\n const result = super.dispose();\n if (result.refCountAfterDispose === 0 && this.optimizer != null && this.isOptimizerOwned) {\n const numTensorsBeforeOptmizerDisposal = memory().numTensors;\n this.optimizer_.dispose();\n result.numDisposedVariables += numTensorsBeforeOptmizerDisposal - memory().numTensors;\n }\n return result;\n }\n getLossIdentifiers() {\n let lossNames;\n if (typeof this.loss === \"string\") {\n lossNames = toSnakeCase(this.loss);\n } else if (Array.isArray(this.loss)) {\n for (const loss of this.loss) {\n if (typeof loss !== \"string\") {\n throw new Error(\"Serialization of non-string loss is not supported.\");\n }\n }\n lossNames = this.loss.map((name) => toSnakeCase(name));\n } else {\n const outputNames = Object.keys(this.loss);\n lossNames = {};\n const losses2 = this.loss;\n for (const outputName of outputNames) {\n if (typeof losses2[outputName] === \"string\") {\n lossNames[outputName] = toSnakeCase(losses2[outputName]);\n } else {\n throw new Error(\"Serialization of non-string loss is not supported.\");\n }\n }\n }\n return lossNames;\n }\n getMetricIdentifiers() {\n if (typeof this.metrics === \"string\" || typeof this.metrics === \"function\") {\n return [toSnakeCase(getLossOrMetricName(this.metrics))];\n } else if (Array.isArray(this.metrics)) {\n return this.metrics.map((metric) => toSnakeCase(getLossOrMetricName(metric)));\n } else {\n const metricsIdentifiers = {};\n for (const key in this.metrics) {\n metricsIdentifiers[key] = toSnakeCase(getLossOrMetricName(this.metrics[key]));\n }\n return metricsIdentifiers;\n }\n }\n getTrainingConfig() {\n return {\n loss: this.getLossIdentifiers(),\n metrics: this.getMetricIdentifiers(),\n optimizer_config: {\n class_name: this.optimizer.getClassName(),\n config: this.optimizer.getConfig()\n }\n };\n }\n loadTrainingConfig(trainingConfig) {\n if (trainingConfig.weighted_metrics != null) {\n throw new Error(\"Loading weight_metrics is not supported yet.\");\n }\n if (trainingConfig.loss_weights != null) {\n throw new Error(\"Loading loss_weights is not supported yet.\");\n }\n if (trainingConfig.sample_weight_mode != null) {\n throw new Error(\"Loading sample_weight_mode is not supported yet.\");\n }\n const tsConfig = convertPythonicToTs(trainingConfig.optimizer_config);\n const optimizer = deserialize(tsConfig);\n let loss;\n if (typeof trainingConfig.loss === \"string\") {\n loss = toCamelCase(trainingConfig.loss);\n } else if (Array.isArray(trainingConfig.loss)) {\n loss = trainingConfig.loss.map((lossEntry) => toCamelCase(lossEntry));\n } else if (trainingConfig.loss != null) {\n loss = {};\n for (const key in trainingConfig.loss) {\n loss[key] = toCamelCase(trainingConfig.loss[key]);\n }\n }\n let metrics;\n if (Array.isArray(trainingConfig.metrics)) {\n metrics = trainingConfig.metrics.map((metric) => toCamelCase(metric));\n } else if (trainingConfig.metrics != null) {\n metrics = {};\n for (const key in trainingConfig.metrics) {\n metrics[key] = toCamelCase(trainingConfig.metrics[key]);\n }\n }\n this.compile({ loss, metrics, optimizer });\n }\n async save(handlerOrURL, config) {\n if (typeof handlerOrURL === \"string\") {\n const handlers = io_exports.getSaveHandlers(handlerOrURL);\n if (handlers.length === 0) {\n throw new ValueError(`Cannot find any save handlers for URL '${handlerOrURL}'`);\n } else if (handlers.length > 1) {\n throw new ValueError(`Found more than one (${handlers.length}) save handlers for URL '${handlerOrURL}'`);\n }\n handlerOrURL = handlers[0];\n }\n if (handlerOrURL.save == null) {\n throw new ValueError(\"LayersModel.save() cannot proceed because the IOHandler provided does not have the `save` attribute defined.\");\n }\n const weightDataAndSpecs = await io_exports.encodeWeights(this.getNamedWeights(config));\n const returnString = false;\n const unusedArg = null;\n const modelConfig = this.toJSON(unusedArg, returnString);\n const modelArtifacts = {\n modelTopology: modelConfig,\n format: LAYERS_MODEL_FORMAT_NAME,\n generatedBy: `TensorFlow.js tfjs-layers v${version2}`,\n convertedBy: null\n };\n const includeOptimizer = config == null ? false : config.includeOptimizer;\n if (includeOptimizer && this.optimizer != null) {\n modelArtifacts.trainingConfig = this.getTrainingConfig();\n const weightType = \"optimizer\";\n const { data: optimizerWeightData, specs: optimizerWeightSpecs } = await io_exports.encodeWeights(await this.optimizer.getWeights(), weightType);\n weightDataAndSpecs.specs.push(...optimizerWeightSpecs);\n weightDataAndSpecs.data = io_exports.concatenateArrayBuffers([weightDataAndSpecs.data, optimizerWeightData]);\n }\n if (this.userDefinedMetadata != null) {\n const checkSize = true;\n checkUserDefinedMetadata(this.userDefinedMetadata, this.name, checkSize);\n modelArtifacts.userDefinedMetadata = this.userDefinedMetadata;\n }\n modelArtifacts.weightData = weightDataAndSpecs.data;\n modelArtifacts.weightSpecs = weightDataAndSpecs.specs;\n return handlerOrURL.save(modelArtifacts);\n }\n setUserDefinedMetadata(userDefinedMetadata) {\n checkUserDefinedMetadata(userDefinedMetadata, this.name);\n this.userDefinedMetadata = userDefinedMetadata;\n }\n getUserDefinedMetadata() {\n return this.userDefinedMetadata;\n }\n};\nLayersModel.className = \"Model\";\nserialization_exports.registerClass(LayersModel);\nvar Functional = class extends LayersModel {\n};\nFunctional.className = \"Functional\";\nserialization_exports.registerClass(Functional);\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/models.js\nasync function modelFromJSON(modelAndWeightsConfig, customObjects) {\n if (!(\"modelTopology\" in modelAndWeightsConfig)) {\n modelAndWeightsConfig = { modelTopology: modelAndWeightsConfig };\n }\n modelAndWeightsConfig = modelAndWeightsConfig;\n let modelTopology = modelAndWeightsConfig.modelTopology;\n if (modelTopology[\"model_config\"] != null) {\n modelTopology = modelTopology[\"model_config\"];\n }\n const tsConfig = convertPythonicToTs(modelTopology);\n const model2 = deserialize(tsConfig, customObjects);\n if (modelAndWeightsConfig.weightsManifest != null) {\n const weightValues = await io_exports.loadWeights(modelAndWeightsConfig.weightsManifest, modelAndWeightsConfig.pathPrefix, model2.weights.map((weight) => weight.originalName));\n const uniqueWeightValues = {};\n for (const weight of model2.weights) {\n uniqueWeightValues[weight.originalName] = weightValues[weight.originalName];\n }\n model2.loadWeights(uniqueWeightValues);\n dispose(weightValues);\n }\n return model2;\n}\nasync function loadLayersModelInternal(pathOrIOHandler, options) {\n if (options == null) {\n options = {};\n }\n if (typeof pathOrIOHandler === \"string\") {\n const handlers = io_exports.getLoadHandlers(pathOrIOHandler, options);\n if (handlers.length === 0) {\n handlers.push(io_exports.browserHTTPRequest(pathOrIOHandler, options));\n } else if (handlers.length > 1) {\n throw new ValueError(`Found more than one (${handlers.length}) load handlers for URL '${pathOrIOHandler}'`);\n }\n pathOrIOHandler = handlers[0];\n }\n return loadLayersModelFromIOHandler(pathOrIOHandler, void 0, options);\n}\nasync function loadLayersModelFromIOHandler(handler, customObjects, options) {\n if (options == null) {\n options = {};\n }\n if (handler.load == null) {\n throw new ValueError(\"Cannot proceed with model loading because the IOHandler provided does not have the `load` method implemented.\");\n }\n const artifacts = await handler.load();\n let modelTopology = artifacts.modelTopology;\n if (modelTopology[\"model_config\"] != null) {\n modelTopology = modelTopology[\"model_config\"];\n }\n const strict = options.strict == null ? true : options.strict;\n const fastWeightInit = artifacts.weightData != null && artifacts.weightSpecs != null && strict;\n const model2 = deserialize(convertPythonicToTs(modelTopology), customObjects, fastWeightInit);\n const trainingConfig = artifacts.trainingConfig;\n if (trainingConfig != null) {\n model2.loadTrainingConfig(trainingConfig);\n }\n if (artifacts.userDefinedMetadata != null) {\n model2.setUserDefinedMetadata(artifacts.userDefinedMetadata);\n }\n if (artifacts.weightData != null) {\n if (artifacts.weightSpecs == null) {\n throw new ValueError(\"LayersModel artifacts contains weight data, but not weight specs. Therefore loading of weights cannot proceed.\");\n }\n const { modelWeights, optimizerWeights } = decodeModelAndOptimizerWeights(artifacts.weightData, artifacts.weightSpecs);\n model2.loadWeights(modelWeights, strict);\n if (model2.optimizer != null && optimizerWeights.length > 0) {\n await model2.optimizer.setWeights(optimizerWeights);\n }\n dispose(modelWeights);\n dispose(optimizerWeights.map((w) => w.tensor));\n }\n return model2;\n}\nfunction decodeModelAndOptimizerWeights(buffer2, specs) {\n const name2Tensor = io_exports.decodeWeights(buffer2, specs);\n const modelWeights = {};\n const optimizerWeights = [];\n specs.forEach((spec) => {\n if (spec.group === \"optimizer\") {\n optimizerWeights.push({ name: spec.name, tensor: name2Tensor[spec.name] });\n } else {\n modelWeights[spec.name] = name2Tensor[spec.name];\n }\n });\n return { modelWeights, optimizerWeights };\n}\nvar Sequential = class extends LayersModel {\n constructor(args) {\n super({ inputs: [], outputs: [] });\n args = args || {};\n this.trainable = true;\n this.built = false;\n this.name = args.name != null ? args.name : getUid(\"sequential_\");\n if (args.layers != null) {\n for (const layer of args.layers) {\n this.add(layer);\n }\n }\n }\n checkShape(layer) {\n const shape = layer.inboundNodes[0].outputTensors[0].shape;\n if (shape.some((x) => x < 0)) {\n throw new ValueError(`Negative dimension size caused by adding layer ${layer.name} with input shape [${layer.inboundNodes[0].inputTensors[0].shape}]`);\n }\n }\n add(layer) {\n const isLayerModelInstance = layer instanceof Sequential || layer instanceof LayersModel;\n let modelLayer;\n if (isLayerModelInstance) {\n modelLayer = layer;\n if (modelLayer.outputs.length !== 1) {\n throw new ValueError(\"All layers in a Sequential model should have a single output tensor. For multi-output layers, use the functional API.\");\n }\n if (modelLayer.inputs.length !== 1) {\n throw new ValueError(\"All layers in a Sequential model should have a single input tensor. For multi-input layers, use the functional API.\");\n }\n }\n if (this.outputs.length === 0) {\n if (layer.inboundNodes.length === 0) {\n if (layer.batchInputShape == null) {\n throw new ValueError(\"The first layer in a Sequential model must get an `inputShape` or `batchInputShape` argument.\");\n }\n const x = Input({\n batchShape: layer.batchInputShape,\n dtype: layer.dtype,\n name: layer.name + \"_input\"\n });\n layer.apply(x);\n }\n if (isLayerModelInstance) {\n this.outputs = modelLayer.outputs;\n this.inputs = modelLayer.inputs;\n } else {\n if (layer.inboundNodes.length !== 1) {\n throw new ValueError(`A layer added to a Sequential model must not already be connected somewhere else. LayersModel received layer ${layer.name} which has ${layer.inboundNodes.length} pre-existing inbound connections.`);\n }\n if (layer.inboundNodes[0].outputTensors.length !== 1) {\n throw new ValueError(\"All layers in a Sequential model should have a single output tensor. For multi-output layers, use the functional API.\");\n }\n this.checkShape(layer);\n this.outputs = [layer.inboundNodes[0].outputTensors[0]];\n this.inputs = getSourceInputs(this.outputs[0]);\n }\n this.inboundNodes = [];\n new Node({\n outboundLayer: this,\n inboundLayers: [],\n nodeIndices: [],\n tensorIndices: [],\n inputTensors: this.inputs,\n outputTensors: this.outputs,\n inputMasks: pyListRepeat(null, this.inputs.length),\n outputMasks: [null],\n inputShapes: this.inputs.map((x) => x.shape),\n outputShapes: this.outputs[0].shape\n });\n } else {\n const outputTensor = layer.apply(this.outputs[0]);\n if (Array.isArray(outputTensor)) {\n throw new TypeError(\"All layers in a Sequential model should have a single output tensor. For multi-output layers, use the functional API.\");\n }\n this.checkShape(layer);\n this.outputs = [outputTensor];\n this.inboundNodes[0].outputTensors = this.outputs;\n this.inboundNodes[0].outputShapes = [this.outputs[0].shape];\n }\n this.layers.push(layer);\n this.built = false;\n }\n pop() {\n if (this.layers.length === 0) {\n throw new TypeError(\"There are no layers in the model.\");\n }\n this.layers.pop();\n if (this.layers.length === 0) {\n this.outputs = [];\n this.inboundNodes = [];\n this.outboundNodes = [];\n } else {\n const lastLayerIndex = this.layers.length - 1;\n this.layers[lastLayerIndex].outboundNodes = [];\n this.outputs = [this.layers[lastLayerIndex].output];\n this.inboundNodes[0].outputTensors = this.outputs;\n this.inboundNodes[0].outputShapes = [this.outputs[0].shape];\n }\n }\n call(inputs, kwargs) {\n if (this.model == null) {\n this.build();\n }\n return this.model.call(inputs, kwargs);\n }\n build(inputShape) {\n getExactlyOneShape(inputShape);\n if (this.inputs.length === 0 || this.outputs.length === 0) {\n throw new TypeError(\"Sequential model cannot be built: model is empty. Add some layers first.\");\n }\n this.model = new LayersModel({\n inputs: this.inputs,\n outputs: this.outputs[0],\n name: this.name + \"_model\"\n });\n this.model.trainable = this.trainable;\n this.supportsMasking = this.model.supportsMasking;\n this.inputLayers = this.model.inputLayers;\n this.inputLayersNodeIndices = this.model.inputLayersNodeIndices;\n this.inputLayersTensorIndices = this.model.inputLayersTensorIndices;\n this.outputLayers = this.model.outputLayers;\n this.outputLayersNodeIndices = this.model.outputLayersNodeIndices;\n this.outputLayersTensorIndices = this.model.outputLayersTensorIndices;\n this.nodesByDepth = this.model.nodesByDepth;\n this.containerNodes = this.model.containerNodes;\n this.outputNames = this.model.outputNames;\n this.inputNames = this.model.inputNames;\n this.built = true;\n }\n countParams() {\n if (!this.built) {\n this.build();\n }\n return super.countParams();\n }\n summary(lineLength, positions, printFn = console.log) {\n if (!this.built) {\n this.build();\n }\n super.summary(lineLength, positions, printFn);\n }\n setWeights(weights) {\n if (this.model == null) {\n this.build();\n }\n this.model.setWeights(weights);\n }\n evaluate(x, y, args = {}) {\n if (!this.built) {\n throw new RuntimeError(\"The model needs to be compiled before being used.\");\n }\n return this.model.evaluate(x, y, args);\n }\n async evaluateDataset(dataset, args) {\n if (!this.built) {\n throw new RuntimeError(\"The model needs to be compiled before being used.\");\n }\n return this.model.evaluateDataset(dataset, args);\n }\n predict(x, args = {}) {\n if (this.model == null) {\n this.build();\n }\n return this.model.predict(x, args);\n }\n predictOnBatch(x) {\n if (this.model == null) {\n this.build();\n }\n return this.model.predictOnBatch(x);\n }\n compile(args) {\n this.build();\n this.model.compile(args);\n this.optimizer_ = this.model.optimizer;\n this.isOptimizerOwned = this.model.isOptimizerOwned;\n this.loss = this.model.loss;\n this.metrics = this.model.metrics;\n this.metricsTensors = this.model.metricsTensors;\n this.metricsNames = this.model.metricsNames;\n }\n get optimizer() {\n return this.model == null ? void 0 : this.model.optimizer;\n }\n set optimizer(optimizer) {\n this.model.optimizer = optimizer;\n }\n async fit(x, y, args = {}) {\n if (!this.built) {\n throw new RuntimeError(\"The model needs to be compiled before being used.\");\n }\n return this.model.fit(x, y, args);\n }\n async fitDataset(dataset, args) {\n if (!this.built) {\n throw new RuntimeError(\"The model needs to be compiled before being used.\");\n }\n return this.model.fitDataset(dataset, args);\n }\n async trainOnBatch(x, y) {\n return this.model.trainOnBatch(x, y);\n }\n static fromConfig(cls, config, customObjects = {}, fastWeightInit = false) {\n let configArray;\n let extraModelConfig = {};\n if (config instanceof Array) {\n if (!(config[0].className != null) || config[0][\"className\"] === \"Merge\") {\n throw new ValueError(\"Legacy serialization format not supported yet.\");\n }\n configArray = config;\n } else {\n util_exports.assert(config[\"layers\"] != null, () => `When the config data for a Sequential model is not an Array, it must be an Object that contains the 'layers' field.`);\n configArray = config[\"layers\"];\n delete config[\"layers\"];\n extraModelConfig = config;\n }\n const model2 = new cls(extraModelConfig);\n if (!(model2 instanceof Sequential)) {\n throw new NotImplementedError(`Sequential.fromConfig called on non-Sequential input: ${model2}`);\n }\n for (const conf of configArray) {\n const customObjects2 = void 0;\n const layer = deserialize(conf, customObjects2, fastWeightInit);\n if (fastWeightInit) {\n layer.setFastWeightInitDuringBuild(true);\n }\n model2.add(layer);\n }\n return model2;\n }\n set stopTraining(stop) {\n if (this.model == null) {\n throw new ValueError(\"Cannot set the stopTraining property of a sequential model before it is compiled.\");\n }\n this.model.stopTraining = stop;\n }\n get stopTraining() {\n if (this.model == null) {\n throw new ValueError(\"Cannot get the stopTraining property of a sequential model before it is compiled.\");\n }\n return this.model.stopTraining;\n }\n getConfig() {\n const layers = [];\n for (const layer of this.layers) {\n const dict = {};\n dict[\"className\"] = layer.getClassName();\n dict[\"config\"] = layer.getConfig();\n layers.push(dict);\n }\n return { name: this.name, layers };\n }\n};\nSequential.className = \"Sequential\";\nserialization_exports.registerClass(Sequential);\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/exports.js\nfunction model(args) {\n return new LayersModel(args);\n}\nfunction sequential(config) {\n return new Sequential(config);\n}\nfunction loadLayersModel(pathOrIOHandler, options) {\n if (options == null) {\n options = {};\n }\n return loadLayersModelInternal(pathOrIOHandler, options);\n}\nfunction input(config) {\n return Input(config);\n}\nfunction registerCallbackConstructor(verbosityLevel, callbackConstructor) {\n CallbackConstructorRegistry.registerCallbackConstructor(verbosityLevel, callbackConstructor);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/activations.js\nvar Activation = class extends serialization_exports.Serializable {\n getConfig() {\n return {};\n }\n};\nvar Elu2 = class extends Activation {\n apply(x, alpha = 1) {\n return elu2(x, alpha);\n }\n};\nElu2.className = \"elu\";\nserialization_exports.registerClass(Elu2);\nvar Selu2 = class extends Activation {\n apply(x) {\n return selu(x);\n }\n};\nSelu2.className = \"selu\";\nserialization_exports.registerClass(Selu2);\nvar Relu2 = class extends Activation {\n apply(x) {\n return relu(x);\n }\n};\nRelu2.className = \"relu\";\nserialization_exports.registerClass(Relu2);\nvar Relu62 = class extends Activation {\n apply(x) {\n return tidy(() => minimum(6, relu(x)));\n }\n};\nRelu62.className = \"relu6\";\nserialization_exports.registerClass(Relu62);\nvar Linear = class extends Activation {\n apply(x) {\n return x;\n }\n};\nLinear.className = \"linear\";\nserialization_exports.registerClass(Linear);\nvar Sigmoid2 = class extends Activation {\n apply(x) {\n return sigmoid(x);\n }\n};\nSigmoid2.className = \"sigmoid\";\nserialization_exports.registerClass(Sigmoid2);\nvar HardSigmoid = class extends Activation {\n apply(x) {\n return hardSigmoid(x);\n }\n};\nHardSigmoid.className = \"hardSigmoid\";\nserialization_exports.registerClass(HardSigmoid);\nvar Softplus2 = class extends Activation {\n apply(x) {\n return softplus(x);\n }\n};\nSoftplus2.className = \"softplus\";\nserialization_exports.registerClass(Softplus2);\nvar Softsign = class extends Activation {\n apply(x) {\n return softsign(x);\n }\n};\nSoftsign.className = \"softsign\";\nserialization_exports.registerClass(Softsign);\nvar Tanh2 = class extends Activation {\n apply(x) {\n return tanh2(x);\n }\n};\nTanh2.className = \"tanh\";\nserialization_exports.registerClass(Tanh2);\nvar Softmax2 = class extends Activation {\n apply(x, axis = -1) {\n return softmax(x, axis);\n }\n};\nSoftmax2.className = \"softmax\";\nserialization_exports.registerClass(Softmax2);\nvar LogSoftmax2 = class extends Activation {\n apply(x, axis = -1) {\n return logSoftmax(x, axis);\n }\n};\nLogSoftmax2.className = \"logSoftmax\";\nserialization_exports.registerClass(LogSoftmax2);\nvar Swish = class extends Activation {\n apply(x, alpha = 1) {\n return tidy(() => mul(sigmoid(mul(x, alpha)), x));\n }\n};\nSwish.className = \"swish\";\nserialization_exports.registerClass(Swish);\nvar Mish = class extends Activation {\n apply(x) {\n return tidy(() => mul(x, tanh2(softplus(x))));\n }\n};\nMish.className = \"mish\";\nserialization_exports.registerClass(Mish);\nfunction serializeActivation(activation2) {\n return activation2.getClassName();\n}\nfunction deserializeActivation(config, customObjects = {}) {\n return deserializeKerasObject(config, serialization_exports.SerializationMap.getMap().classNameMap, customObjects, \"activation\");\n}\nfunction getActivation(identifier) {\n if (identifier == null) {\n const config = {};\n config[\"className\"] = \"linear\";\n config[\"config\"] = {};\n return deserializeActivation(config);\n }\n if (typeof identifier === \"string\") {\n const config = {};\n config[\"className\"] = identifier;\n config[\"config\"] = {};\n return deserializeActivation(config);\n } else if (identifier instanceof Activation) {\n return identifier;\n } else {\n return deserializeActivation(identifier);\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/regularizers.js\nfunction assertObjectArgs(args) {\n if (args != null && typeof args !== \"object\") {\n throw new Error(`Argument to L1L2 regularizer's constructor is expected to be an object, but received: ${args}`);\n }\n}\nvar Regularizer = class extends serialization_exports.Serializable {\n};\nvar L1L2 = class extends Regularizer {\n constructor(args) {\n super();\n assertObjectArgs(args);\n this.l1 = args == null || args.l1 == null ? 0.01 : args.l1;\n this.l2 = args == null || args.l2 == null ? 0.01 : args.l2;\n this.hasL1 = this.l1 !== 0;\n this.hasL2 = this.l2 !== 0;\n }\n apply(x) {\n return tidy(() => {\n let regularization = zeros([1]);\n if (this.hasL1) {\n regularization = add2(regularization, sum2(mul(this.l1, abs(x))));\n }\n if (this.hasL2) {\n regularization = add2(regularization, sum2(mul(this.l2, square2(x))));\n }\n return reshape(regularization, []);\n });\n }\n getConfig() {\n return { \"l1\": this.l1, \"l2\": this.l2 };\n }\n static fromConfig(cls, config) {\n return new cls({ l1: config[\"l1\"], l2: config[\"l2\"] });\n }\n};\nL1L2.className = \"L1L2\";\nserialization_exports.registerClass(L1L2);\nfunction l1(args) {\n assertObjectArgs(args);\n return new L1L2({ l1: args != null ? args.l1 : null, l2: 0 });\n}\nfunction l2(args) {\n assertObjectArgs(args);\n return new L1L2({ l2: args != null ? args.l2 : null, l1: 0 });\n}\nvar REGULARIZER_IDENTIFIER_REGISTRY_SYMBOL_MAP = {\n \"l1l2\": \"L1L2\"\n};\nfunction serializeRegularizer(constraint) {\n return serializeKerasObject(constraint);\n}\nfunction deserializeRegularizer(config, customObjects = {}) {\n return deserializeKerasObject(config, serialization_exports.SerializationMap.getMap().classNameMap, customObjects, \"regularizer\");\n}\nfunction getRegularizer(identifier) {\n if (identifier == null) {\n return null;\n }\n if (typeof identifier === \"string\") {\n const className = identifier in REGULARIZER_IDENTIFIER_REGISTRY_SYMBOL_MAP ? REGULARIZER_IDENTIFIER_REGISTRY_SYMBOL_MAP[identifier] : identifier;\n const config = { className, config: {} };\n return deserializeRegularizer(config);\n } else if (identifier instanceof Regularizer) {\n return identifier;\n } else {\n return deserializeRegularizer(identifier);\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/layers/advanced_activations.js\nvar ReLU = class extends Layer {\n constructor(args) {\n super(args == null ? {} : args);\n this.supportsMasking = true;\n if (args != null) {\n this.maxValue = args.maxValue;\n }\n }\n call(inputs, kwargs) {\n inputs = getExactlyOneTensor(inputs);\n let output = relu(inputs);\n if (this.maxValue != null) {\n output = clipByValue(output, 0, this.maxValue);\n }\n return output;\n }\n computeOutputShape(inputShape) {\n return inputShape;\n }\n getConfig() {\n const config = { maxValue: this.maxValue };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nReLU.className = \"ReLU\";\nserialization_exports.registerClass(ReLU);\nvar LeakyReLU = class extends Layer {\n constructor(args) {\n super(args == null ? {} : args);\n this.DEFAULT_ALPHA = 0.3;\n if (args == null) {\n args = {};\n }\n this.alpha = args.alpha == null ? this.DEFAULT_ALPHA : args.alpha;\n }\n call(inputs, kwargs) {\n const x = getExactlyOneTensor(inputs);\n return leakyRelu(x, this.alpha);\n }\n computeOutputShape(inputShape) {\n return inputShape;\n }\n getConfig() {\n const config = { alpha: this.alpha };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nLeakyReLU.className = \"LeakyReLU\";\nserialization_exports.registerClass(LeakyReLU);\nvar PReLU = class extends Layer {\n constructor(args) {\n super(args == null ? {} : args);\n this.DEFAULT_ALPHA_INITIALIZER = \"zeros\";\n if (args == null) {\n args = {};\n }\n this.supportsMasking = true;\n this.alphaInitializer = getInitializer(args.alphaInitializer || this.DEFAULT_ALPHA_INITIALIZER);\n this.alphaRegularizer = getRegularizer(args.alphaRegularizer);\n this.alphaConstraint = getConstraint(args.alphaConstraint);\n if (args.sharedAxes == null) {\n this.sharedAxes = null;\n } else if (Array.isArray(args.sharedAxes)) {\n this.sharedAxes = args.sharedAxes;\n } else if (typeof args.sharedAxes === \"number\") {\n this.sharedAxes = [args.sharedAxes];\n } else {\n throw new ValueError(`Expected sharedAxes to be a number or an array of numbers, but got ${args.sharedAxes}`);\n }\n }\n build(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n const paramShape = inputShape.slice(1);\n if (this.sharedAxes != null) {\n for (const i of this.sharedAxes) {\n paramShape[i - 1] = 1;\n }\n }\n this.alpha = this.addWeight(\"alpha\", paramShape, \"float32\", this.alphaInitializer, this.alphaRegularizer, true, this.alphaConstraint);\n const axes = {};\n if (this.sharedAxes != null) {\n for (let i = 1; i < inputShape.length; ++i) {\n axes[i] = inputShape[i];\n }\n }\n this.inputSpec = [new InputSpec({\n ndim: inputShape.length,\n axes\n })];\n this.built = true;\n }\n call(inputs, kwargs) {\n inputs = getExactlyOneTensor(inputs);\n return prelu(inputs, this.alpha.read());\n }\n getConfig() {\n const config = {\n alphaInitializer: serializeInitializer(this.alphaInitializer),\n alphaRegularizer: serializeRegularizer(this.alphaRegularizer),\n alphaConstraint: serializeConstraint(this.alphaConstraint),\n sharedAxes: this.sharedAxes\n };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nPReLU.className = \"PReLU\";\nserialization_exports.registerClass(PReLU);\nvar ELU = class extends Layer {\n constructor(args) {\n super(args == null ? {} : args);\n this.DEFAULT_ALPHA = 1;\n if (args == null) {\n args = {};\n }\n if (args.alpha != null && args.alpha !== this.DEFAULT_ALPHA) {\n throw new NotImplementedError(`Non-default alpha value (${args.alpha}) is not supported by the ELU layer yet.`);\n }\n this.alpha = args.alpha == null ? this.DEFAULT_ALPHA : args.alpha;\n }\n call(inputs, kwargs) {\n const x = getExactlyOneTensor(inputs);\n return elu(x);\n }\n computeOutputShape(inputShape) {\n return inputShape;\n }\n getConfig() {\n const config = { alpha: this.alpha };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nELU.className = \"ELU\";\nserialization_exports.registerClass(ELU);\nvar ThresholdedReLU = class extends Layer {\n constructor(args) {\n super(args == null ? {} : args);\n this.DEFAULT_THETA = 1;\n if (args == null) {\n args = {};\n }\n this.theta = args.theta == null ? this.DEFAULT_THETA : args.theta;\n }\n call(inputs, kwargs) {\n const x = getExactlyOneTensor(inputs);\n return mul(x, cast(greater(x, this.theta), \"float32\"));\n }\n computeOutputShape(inputShape) {\n return inputShape;\n }\n getConfig() {\n const config = { theta: this.theta };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nThresholdedReLU.className = \"ThresholdedReLU\";\nserialization_exports.registerClass(ThresholdedReLU);\nvar Softmax3 = class extends Layer {\n constructor(args) {\n super(args == null ? {} : args);\n this.DEFAULT_AXIS = 1;\n if (args == null) {\n args = {};\n }\n this.softmax = new Softmax2().apply;\n this.axis = args.axis == null ? this.DEFAULT_AXIS : args.axis;\n }\n call(inputs, kwargs) {\n const x = getExactlyOneTensor(inputs);\n return this.softmax(x, this.axis);\n }\n computeOutputShape(inputShape) {\n return inputShape;\n }\n getConfig() {\n const config = { axis: this.axis };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nSoftmax3.className = \"Softmax\";\nserialization_exports.registerClass(Softmax3);\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/utils/conv_utils.js\nfunction normalizeArray(value, n, name) {\n if (typeof value === \"number\") {\n return pyListRepeat(value, n);\n } else {\n if (value.length !== n) {\n throw new ValueError(`The ${name} argument must be an integer or tuple of ${n} integers. Received: ${value.length} elements.`);\n }\n for (let i = 0; i < n; ++i) {\n const singleValue = value[i];\n if (!isInteger(singleValue)) {\n throw new ValueError(`The ${name} argument must be an integer or tuple of ${n} integers. Received: ${JSON.stringify(value)} including a non-integer number ${singleValue}`);\n }\n }\n return value;\n }\n}\nfunction convOutputLength(inputLength, filterSize, padding, stride, dilation = 1) {\n if (inputLength == null) {\n return inputLength;\n }\n const dilatedFilterSize = filterSize + (filterSize - 1) * (dilation - 1);\n let outputLength;\n if (padding === \"same\") {\n outputLength = inputLength;\n } else {\n outputLength = inputLength - dilatedFilterSize + 1;\n }\n return Math.floor((outputLength + stride - 1) / stride);\n}\nfunction deconvLength(dimSize, strideSize, kernelSize, padding) {\n if (dimSize == null) {\n return null;\n }\n if (padding === \"valid\") {\n dimSize = dimSize * strideSize + max2([kernelSize - strideSize, 0]);\n } else if (padding === \"same\") {\n dimSize = dimSize * strideSize;\n } else {\n throw new ValueError(`Unsupport padding mode: ${padding}.`);\n }\n return dimSize;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/layers/convolutional.js\nfunction preprocessConv2DInput(x, dataFormat) {\n return tidy(() => {\n checkDataFormat(dataFormat);\n if (dataFormat === \"channelsFirst\") {\n return transpose(x, [0, 2, 3, 1]);\n } else {\n return x;\n }\n });\n}\nfunction preprocessConv3DInput(x, dataFormat) {\n return tidy(() => {\n checkDataFormat(dataFormat);\n if (dataFormat === \"channelsFirst\") {\n return transpose(x, [0, 2, 3, 4, 1]);\n } else {\n return x;\n }\n });\n}\nfunction conv1dWithBias(x, kernel, bias, strides = 1, padding = \"valid\", dataFormat, dilationRate = 1) {\n return tidy(() => {\n if (dataFormat == null) {\n dataFormat = imageDataFormat();\n }\n checkDataFormat(dataFormat);\n if (x.shape.length !== 3) {\n throw new ValueError(`The input of a conv1dWithBias operation should be 3, but is ${x.shape.length} instead.`);\n }\n if (kernel.shape.length !== 3) {\n throw new ValueError(`The kernel for a conv1dWithBias operation should be 3, but is ${kernel.shape.length} instead`);\n }\n if (bias != null && bias.shape.length !== 1) {\n throw new ValueError(`The bias for a conv1dWithBias operation should be 1, but is ${kernel.shape.length} instead`);\n }\n if (dataFormat === \"channelsFirst\") {\n x = transpose(x, [0, 2, 1]);\n }\n if (padding === \"causal\") {\n throw new NotImplementedError(\"The support for CAUSAL padding mode in conv1dWithBias is not implemented yet.\");\n }\n let y = conv1d(x, kernel, strides, padding === \"same\" ? \"same\" : \"valid\", \"NWC\", dilationRate);\n if (bias != null) {\n y = biasAdd(y, bias);\n }\n return y;\n });\n}\nfunction conv2dWithBiasActivation(x, kernel, bias, strides = [1, 1], padding = \"valid\", dataFormat, dilationRate, activation2 = null) {\n return tidy(() => {\n if (dataFormat == null) {\n dataFormat = imageDataFormat();\n }\n checkDataFormat(dataFormat);\n if (x.rank !== 3 && x.rank !== 4) {\n throw new ValueError(`conv2dWithBiasActivation expects input to be of rank 3 or 4, but received ${x.rank}.`);\n }\n if (kernel.rank !== 3 && kernel.rank !== 4) {\n throw new ValueError(`conv2dWithBiasActivation expects kernel to be of rank 3 or 4, but received ${x.rank}.`);\n }\n let y = preprocessConv2DInput(x, dataFormat);\n if (padding === \"causal\") {\n throw new NotImplementedError(\"The support for CAUSAL padding mode in conv1dWithBias is not implemented yet.\");\n }\n y = fused_ops_exports.conv2d({\n x: y,\n filter: kernel,\n strides,\n pad: padding === \"same\" ? \"same\" : \"valid\",\n dilations: dilationRate,\n dataFormat: \"NHWC\",\n bias,\n activation: activation2\n });\n if (dataFormat === \"channelsFirst\") {\n y = transpose(y, [0, 3, 1, 2]);\n }\n return y;\n });\n}\nfunction conv3dWithBias(x, kernel, bias, strides = [1, 1, 1], padding = \"valid\", dataFormat, dilationRate) {\n return tidy(() => {\n if (dataFormat == null) {\n dataFormat = imageDataFormat();\n }\n checkDataFormat(dataFormat);\n if (x.rank !== 4 && x.rank !== 5) {\n throw new ValueError(`conv3dWithBias expects input to be of rank 4 or 5, but received ${x.rank}.`);\n }\n if (kernel.rank !== 4 && kernel.rank !== 5) {\n throw new ValueError(`conv3dWithBias expects kernel to be of rank 4 or 5, but received ${x.rank}.`);\n }\n let y = preprocessConv3DInput(x, dataFormat);\n if (padding === \"causal\") {\n throw new NotImplementedError(\"The support for CAUSAL padding mode in conv3dWithBias is not implemented yet.\");\n }\n y = conv3d(y, kernel, strides, padding === \"same\" ? \"same\" : \"valid\", \"NDHWC\", dilationRate);\n if (bias != null) {\n y = biasAdd(y, bias);\n }\n if (dataFormat === \"channelsFirst\") {\n y = transpose(y, [0, 4, 1, 2, 3]);\n }\n return y;\n });\n}\nvar BaseConv = class extends Layer {\n constructor(rank, args) {\n super(args);\n this.bias = null;\n this.DEFAULT_KERNEL_INITIALIZER = \"glorotNormal\";\n this.DEFAULT_BIAS_INITIALIZER = \"zeros\";\n BaseConv.verifyArgs(args);\n this.rank = rank;\n assertPositiveInteger(this.rank, \"rank\");\n if (this.rank !== 1 && this.rank !== 2 && this.rank !== 3) {\n throw new NotImplementedError(`Convolution layer for rank other than 1, 2, or 3 (${this.rank}) is not implemented yet.`);\n }\n this.kernelSize = normalizeArray(args.kernelSize, rank, \"kernelSize\");\n this.strides = normalizeArray(args.strides == null ? 1 : args.strides, rank, \"strides\");\n this.padding = args.padding == null ? \"valid\" : args.padding;\n checkPaddingMode(this.padding);\n this.dataFormat = args.dataFormat == null ? \"channelsLast\" : args.dataFormat;\n checkDataFormat(this.dataFormat);\n this.activation = getActivation(args.activation);\n this.useBias = args.useBias == null ? true : args.useBias;\n this.biasInitializer = getInitializer(args.biasInitializer || this.DEFAULT_BIAS_INITIALIZER);\n this.biasConstraint = getConstraint(args.biasConstraint);\n this.biasRegularizer = getRegularizer(args.biasRegularizer);\n this.activityRegularizer = getRegularizer(args.activityRegularizer);\n this.dilationRate = normalizeArray(args.dilationRate == null ? 1 : args.dilationRate, rank, \"dilationRate\");\n if (this.rank === 1 && (Array.isArray(this.dilationRate) && this.dilationRate.length !== 1)) {\n throw new ValueError(`dilationRate must be a number or an array of a single number for 1D convolution, but received ${JSON.stringify(this.dilationRate)}`);\n } else if (this.rank === 2) {\n if (typeof this.dilationRate === \"number\") {\n this.dilationRate = [this.dilationRate, this.dilationRate];\n } else if (this.dilationRate.length !== 2) {\n throw new ValueError(`dilationRate must be a number or array of two numbers for 2D convolution, but received ${JSON.stringify(this.dilationRate)}`);\n }\n } else if (this.rank === 3) {\n if (typeof this.dilationRate === \"number\") {\n this.dilationRate = [this.dilationRate, this.dilationRate, this.dilationRate];\n } else if (this.dilationRate.length !== 3) {\n throw new ValueError(`dilationRate must be a number or array of three numbers for 3D convolution, but received ${JSON.stringify(this.dilationRate)}`);\n }\n }\n }\n static verifyArgs(args) {\n assert2(\"kernelSize\" in args, `required key 'kernelSize' not in config`);\n if (typeof args.kernelSize !== \"number\" && !checkArrayTypeAndLength(args.kernelSize, \"number\", 1, 3)) {\n throw new ValueError(`BaseConv expects config.kernelSize to be number or number[] with length 1, 2, or 3, but received ${JSON.stringify(args.kernelSize)}.`);\n }\n }\n getConfig() {\n const config = {\n kernelSize: this.kernelSize,\n strides: this.strides,\n padding: this.padding,\n dataFormat: this.dataFormat,\n dilationRate: this.dilationRate,\n activation: serializeActivation(this.activation),\n useBias: this.useBias,\n biasInitializer: serializeInitializer(this.biasInitializer),\n biasRegularizer: serializeRegularizer(this.biasRegularizer),\n activityRegularizer: serializeRegularizer(this.activityRegularizer),\n biasConstraint: serializeConstraint(this.biasConstraint)\n };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nvar Conv = class extends BaseConv {\n constructor(rank, args) {\n super(rank, args);\n this.kernel = null;\n Conv.verifyArgs(args);\n this.filters = args.filters;\n assertPositiveInteger(this.filters, \"filters\");\n this.kernelInitializer = getInitializer(args.kernelInitializer || this.DEFAULT_KERNEL_INITIALIZER);\n this.kernelConstraint = getConstraint(args.kernelConstraint);\n this.kernelRegularizer = getRegularizer(args.kernelRegularizer);\n }\n build(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n const channelAxis = this.dataFormat === \"channelsFirst\" ? 1 : inputShape.length - 1;\n if (inputShape[channelAxis] == null) {\n throw new ValueError(`The channel dimension of the input should be defined. Found ${inputShape[channelAxis]}`);\n }\n const inputDim = inputShape[channelAxis];\n const kernelShape = this.kernelSize.concat([inputDim, this.filters]);\n this.kernel = this.addWeight(\"kernel\", kernelShape, null, this.kernelInitializer, this.kernelRegularizer, true, this.kernelConstraint);\n if (this.useBias) {\n this.bias = this.addWeight(\"bias\", [this.filters], null, this.biasInitializer, this.biasRegularizer, true, this.biasConstraint);\n }\n this.inputSpec = [{ ndim: this.rank + 2, axes: { [channelAxis]: inputDim } }];\n this.built = true;\n }\n call(inputs, kwargs) {\n return tidy(() => {\n inputs = getExactlyOneTensor(inputs);\n let outputs;\n const biasValue = this.bias == null ? null : this.bias.read();\n const fusedActivationName = mapActivationToFusedKernel(this.activation.getClassName());\n if (fusedActivationName != null && this.rank === 2) {\n outputs = conv2dWithBiasActivation(inputs, this.kernel.read(), biasValue, this.strides, this.padding, this.dataFormat, this.dilationRate, fusedActivationName);\n } else {\n if (this.rank === 1) {\n outputs = conv1dWithBias(inputs, this.kernel.read(), biasValue, this.strides[0], this.padding, this.dataFormat, this.dilationRate[0]);\n } else if (this.rank === 2) {\n outputs = conv2dWithBiasActivation(inputs, this.kernel.read(), biasValue, this.strides, this.padding, this.dataFormat, this.dilationRate);\n } else if (this.rank === 3) {\n outputs = conv3dWithBias(inputs, this.kernel.read(), biasValue, this.strides, this.padding, this.dataFormat, this.dilationRate);\n } else {\n throw new NotImplementedError(\"convolutions greater than 3D are not implemented yet.\");\n }\n if (this.activation != null) {\n outputs = this.activation.apply(outputs);\n }\n }\n return outputs;\n });\n }\n computeOutputShape(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n const newSpace = [];\n const space = this.dataFormat === \"channelsLast\" ? inputShape.slice(1, inputShape.length - 1) : inputShape.slice(2);\n for (let i = 0; i < space.length; ++i) {\n const newDim = convOutputLength(space[i], this.kernelSize[i], this.padding, this.strides[i], typeof this.dilationRate === \"number\" ? this.dilationRate : this.dilationRate[i]);\n newSpace.push(newDim);\n }\n let outputShape = [inputShape[0]];\n if (this.dataFormat === \"channelsLast\") {\n outputShape = outputShape.concat(newSpace);\n outputShape.push(this.filters);\n } else {\n outputShape.push(this.filters);\n outputShape = outputShape.concat(newSpace);\n }\n return outputShape;\n }\n getConfig() {\n const config = {\n filters: this.filters,\n kernelInitializer: serializeInitializer(this.kernelInitializer),\n kernelRegularizer: serializeRegularizer(this.kernelRegularizer),\n kernelConstraint: serializeConstraint(this.kernelConstraint)\n };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n static verifyArgs(args) {\n if (!(\"filters\" in args) || typeof args.filters !== \"number\" || args.filters < 1) {\n throw new ValueError(`Convolution layer expected config.filters to be a 'number' > 0 but got ${JSON.stringify(args.filters)}`);\n }\n }\n};\nvar Conv2D2 = class extends Conv {\n constructor(args) {\n super(2, args);\n Conv2D2.verifyArgs(args);\n }\n getConfig() {\n const config = super.getConfig();\n delete config[\"rank\"];\n return config;\n }\n static verifyArgs(args) {\n if (typeof args.kernelSize !== \"number\" && !checkArrayTypeAndLength(args.kernelSize, \"number\", 1, 2)) {\n throw new ValueError(`Conv2D expects config.kernelSize to be number or number[] with length 1 or 2, but received ${JSON.stringify(args.kernelSize)}.`);\n }\n }\n};\nConv2D2.className = \"Conv2D\";\nserialization_exports.registerClass(Conv2D2);\nvar Conv3D2 = class extends Conv {\n constructor(args) {\n super(3, args);\n Conv3D2.verifyArgs(args);\n }\n getConfig() {\n const config = super.getConfig();\n delete config[\"rank\"];\n return config;\n }\n static verifyArgs(args) {\n if (typeof args.kernelSize !== \"number\") {\n if (!(Array.isArray(args.kernelSize) && (args.kernelSize.length === 1 || args.kernelSize.length === 3))) {\n throw new ValueError(`Conv3D expects config.kernelSize to be number or [number, number, number], but received ${JSON.stringify(args.kernelSize)}.`);\n }\n }\n }\n};\nConv3D2.className = \"Conv3D\";\nserialization_exports.registerClass(Conv3D2);\nvar Conv2DTranspose = class extends Conv2D2 {\n constructor(args) {\n super(args);\n this.inputSpec = [new InputSpec({ ndim: 4 })];\n if (this.padding !== \"same\" && this.padding !== \"valid\") {\n throw new ValueError(`Conv2DTranspose currently supports only padding modes 'same' and 'valid', but received padding mode ${this.padding}`);\n }\n }\n build(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n if (inputShape.length !== 4) {\n throw new ValueError(\"Input should have rank 4; Received input shape: \" + JSON.stringify(inputShape));\n }\n const channelAxis = this.dataFormat === \"channelsFirst\" ? 1 : inputShape.length - 1;\n if (inputShape[channelAxis] == null) {\n throw new ValueError(\"The channel dimension of the inputs should be defined. Found `None`.\");\n }\n const inputDim = inputShape[channelAxis];\n const kernelShape = this.kernelSize.concat([this.filters, inputDim]);\n this.kernel = this.addWeight(\"kernel\", kernelShape, \"float32\", this.kernelInitializer, this.kernelRegularizer, true, this.kernelConstraint);\n if (this.useBias) {\n this.bias = this.addWeight(\"bias\", [this.filters], \"float32\", this.biasInitializer, this.biasRegularizer, true, this.biasConstraint);\n }\n this.inputSpec = [new InputSpec({ ndim: 4, axes: { [channelAxis]: inputDim } })];\n this.built = true;\n }\n call(inputs, kwargs) {\n return tidy(() => {\n let input2 = getExactlyOneTensor(inputs);\n if (input2.shape.length !== 4) {\n throw new ValueError(`Conv2DTranspose.call() expects input tensor to be rank-4, but received a tensor of rank-${input2.shape.length}`);\n }\n const inputShape = input2.shape;\n const batchSize = inputShape[0];\n let hAxis;\n let wAxis;\n if (this.dataFormat === \"channelsFirst\") {\n hAxis = 2;\n wAxis = 3;\n } else {\n hAxis = 1;\n wAxis = 2;\n }\n const height = inputShape[hAxis];\n const width = inputShape[wAxis];\n const kernelH = this.kernelSize[0];\n const kernelW = this.kernelSize[1];\n const strideH = this.strides[0];\n const strideW = this.strides[1];\n const outHeight = deconvLength(height, strideH, kernelH, this.padding);\n const outWidth = deconvLength(width, strideW, kernelW, this.padding);\n const outputShape = [batchSize, outHeight, outWidth, this.filters];\n if (this.dataFormat !== \"channelsLast\") {\n input2 = transpose(input2, [0, 2, 3, 1]);\n }\n let outputs = conv2dTranspose(input2, this.kernel.read(), outputShape, this.strides, this.padding);\n if (this.dataFormat !== \"channelsLast\") {\n outputs = transpose(outputs, [0, 3, 1, 2]);\n }\n if (this.bias != null) {\n outputs = biasAdd(outputs, this.bias.read(), this.dataFormat);\n }\n if (this.activation != null) {\n outputs = this.activation.apply(outputs);\n }\n return outputs;\n });\n }\n computeOutputShape(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n const outputShape = inputShape.slice();\n let channelAxis;\n let heightAxis;\n let widthAxis;\n if (this.dataFormat === \"channelsFirst\") {\n channelAxis = 1;\n heightAxis = 2;\n widthAxis = 3;\n } else {\n channelAxis = 3;\n heightAxis = 1;\n widthAxis = 2;\n }\n const kernelH = this.kernelSize[0];\n const kernelW = this.kernelSize[1];\n const strideH = this.strides[0];\n const strideW = this.strides[1];\n outputShape[channelAxis] = this.filters;\n outputShape[heightAxis] = deconvLength(outputShape[heightAxis], strideH, kernelH, this.padding);\n outputShape[widthAxis] = deconvLength(outputShape[widthAxis], strideW, kernelW, this.padding);\n return outputShape;\n }\n getConfig() {\n const config = super.getConfig();\n delete config[\"dilationRate\"];\n return config;\n }\n};\nConv2DTranspose.className = \"Conv2DTranspose\";\nserialization_exports.registerClass(Conv2DTranspose);\nvar Conv3DTranspose = class extends Conv3D2 {\n constructor(args) {\n super(args);\n this.inputSpec = [new InputSpec({ ndim: 5 })];\n if (this.padding !== \"same\" && this.padding !== \"valid\") {\n throw new ValueError(`Conv3DTranspose currently supports only padding modes 'same' and 'valid', but received padding mode ${this.padding}`);\n }\n }\n build(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n if (inputShape.length !== 5) {\n throw new ValueError(\"Input should have rank 5; Received input shape: \" + JSON.stringify(inputShape));\n }\n const channelAxis = this.dataFormat === \"channelsFirst\" ? 1 : inputShape.length - 1;\n if (inputShape[channelAxis] == null) {\n throw new ValueError(\"The channel dimension of the inputs should be defined. Found `None`.\");\n }\n const inputDim = inputShape[channelAxis];\n const kernelShape = this.kernelSize.concat([this.filters, inputDim]);\n this.kernel = this.addWeight(\"kernel\", kernelShape, \"float32\", this.kernelInitializer, this.kernelRegularizer, true, this.kernelConstraint);\n if (this.useBias) {\n this.bias = this.addWeight(\"bias\", [this.filters], \"float32\", this.biasInitializer, this.biasRegularizer, true, this.biasConstraint);\n }\n this.inputSpec = [new InputSpec({ ndim: 5, axes: { [channelAxis]: inputDim } })];\n this.built = true;\n }\n call(inputs, kwargs) {\n return tidy(() => {\n let input2 = getExactlyOneTensor(inputs);\n if (input2.shape.length !== 5) {\n throw new ValueError(`Conv3DTranspose.call() expects input tensor to be rank-4, but received a tensor of rank-${input2.shape.length}`);\n }\n const inputShape = input2.shape;\n const batchSize = inputShape[0];\n let hAxis;\n let wAxis;\n let dAxis;\n if (this.dataFormat === \"channelsFirst\") {\n dAxis = 2;\n hAxis = 3;\n wAxis = 4;\n } else {\n dAxis = 1;\n hAxis = 2;\n wAxis = 3;\n }\n const depth = inputShape[dAxis];\n const height = inputShape[hAxis];\n const width = inputShape[wAxis];\n const kernelD = this.kernelSize[0];\n const kernelH = this.kernelSize[1];\n const kernelW = this.kernelSize[2];\n const strideD = this.strides[0];\n const strideH = this.strides[1];\n const strideW = this.strides[2];\n const outDepth = deconvLength(depth, strideD, kernelD, this.padding);\n const outHeight = deconvLength(height, strideH, kernelH, this.padding);\n const outWidth = deconvLength(width, strideW, kernelW, this.padding);\n const outputShape = [batchSize, outDepth, outHeight, outWidth, this.filters];\n if (this.dataFormat !== \"channelsLast\") {\n input2 = transpose(input2, [0, 2, 3, 4, 1]);\n }\n let outputs = conv3dTranspose(input2, this.kernel.read(), outputShape, this.strides, this.padding);\n if (this.dataFormat !== \"channelsLast\") {\n outputs = transpose(outputs, [0, 4, 1, 2, 3]);\n }\n if (this.bias !== null) {\n outputs = biasAdd(outputs, this.bias.read(), this.dataFormat);\n }\n if (this.activation !== null) {\n outputs = this.activation.apply(outputs);\n }\n return outputs;\n });\n }\n computeOutputShape(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n const outputShape = inputShape.slice();\n let channelAxis;\n let depthAxis;\n let heightAxis;\n let widthAxis;\n if (this.dataFormat === \"channelsFirst\") {\n channelAxis = 1;\n depthAxis = 2;\n heightAxis = 3;\n widthAxis = 4;\n } else {\n channelAxis = 4;\n depthAxis = 1;\n heightAxis = 2;\n widthAxis = 3;\n }\n const kernelD = this.kernelSize[0];\n const kernelH = this.kernelSize[1];\n const kernelW = this.kernelSize[2];\n const strideD = this.strides[0];\n const strideH = this.strides[1];\n const strideW = this.strides[2];\n outputShape[channelAxis] = this.filters;\n outputShape[depthAxis] = deconvLength(outputShape[depthAxis], strideD, kernelD, this.padding);\n outputShape[heightAxis] = deconvLength(outputShape[heightAxis], strideH, kernelH, this.padding);\n outputShape[widthAxis] = deconvLength(outputShape[widthAxis], strideW, kernelW, this.padding);\n return outputShape;\n }\n getConfig() {\n const config = super.getConfig();\n delete config[\"dilationRate\"];\n return config;\n }\n};\nConv3DTranspose.className = \"Conv3DTranspose\";\nserialization_exports.registerClass(Conv3DTranspose);\nvar SeparableConv = class extends Conv {\n constructor(rank, config) {\n super(rank, config);\n this.DEFAULT_DEPTHWISE_INITIALIZER = \"glorotUniform\";\n this.DEFAULT_POINTWISE_INITIALIZER = \"glorotUniform\";\n this.depthwiseKernel = null;\n this.pointwiseKernel = null;\n if (config.filters == null) {\n throw new ValueError(\"The `filters` configuration field is required by SeparableConv, but is unspecified.\");\n }\n if (config.kernelInitializer != null || config.kernelRegularizer != null || config.kernelConstraint != null) {\n throw new ValueError(\"Fields kernelInitializer, kernelRegularizer and kernelConstraint are invalid for SeparableConv2D. Use depthwiseInitializer, depthwiseRegularizer, depthwiseConstraint, pointwiseInitializer, pointwiseRegularizer and pointwiseConstraint instead.\");\n }\n if (config.padding != null && config.padding !== \"same\" && config.padding !== \"valid\") {\n throw new ValueError(`SeparableConv${this.rank}D supports only padding modes: 'same' and 'valid', but received ${JSON.stringify(config.padding)}`);\n }\n this.depthMultiplier = config.depthMultiplier == null ? 1 : config.depthMultiplier;\n this.depthwiseInitializer = getInitializer(config.depthwiseInitializer || this.DEFAULT_DEPTHWISE_INITIALIZER);\n this.depthwiseRegularizer = getRegularizer(config.depthwiseRegularizer);\n this.depthwiseConstraint = getConstraint(config.depthwiseConstraint);\n this.pointwiseInitializer = getInitializer(config.depthwiseInitializer || this.DEFAULT_POINTWISE_INITIALIZER);\n this.pointwiseRegularizer = getRegularizer(config.pointwiseRegularizer);\n this.pointwiseConstraint = getConstraint(config.pointwiseConstraint);\n }\n build(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n if (inputShape.length < this.rank + 2) {\n throw new ValueError(`Inputs to SeparableConv${this.rank}D should have rank ${this.rank + 2}, but received input shape: ${JSON.stringify(inputShape)}`);\n }\n const channelAxis = this.dataFormat === \"channelsFirst\" ? 1 : inputShape.length - 1;\n if (inputShape[channelAxis] == null || inputShape[channelAxis] < 0) {\n throw new ValueError(`The channel dimension of the inputs should be defined, but found ${JSON.stringify(inputShape[channelAxis])}`);\n }\n const inputDim = inputShape[channelAxis];\n const depthwiseKernelShape = this.kernelSize.concat([inputDim, this.depthMultiplier]);\n const pointwiseKernelShape = [];\n for (let i = 0; i < this.rank; ++i) {\n pointwiseKernelShape.push(1);\n }\n pointwiseKernelShape.push(inputDim * this.depthMultiplier, this.filters);\n const trainable = true;\n this.depthwiseKernel = this.addWeight(\"depthwise_kernel\", depthwiseKernelShape, \"float32\", this.depthwiseInitializer, this.depthwiseRegularizer, trainable, this.depthwiseConstraint);\n this.pointwiseKernel = this.addWeight(\"pointwise_kernel\", pointwiseKernelShape, \"float32\", this.pointwiseInitializer, this.pointwiseRegularizer, trainable, this.pointwiseConstraint);\n if (this.useBias) {\n this.bias = this.addWeight(\"bias\", [this.filters], \"float32\", this.biasInitializer, this.biasRegularizer, trainable, this.biasConstraint);\n } else {\n this.bias = null;\n }\n this.inputSpec = [new InputSpec({ ndim: this.rank + 2, axes: { [channelAxis]: inputDim } })];\n this.built = true;\n }\n call(inputs, kwargs) {\n return tidy(() => {\n inputs = getExactlyOneTensor(inputs);\n let output;\n if (this.rank === 1) {\n throw new NotImplementedError(\"1D separable convolution is not implemented yet.\");\n } else if (this.rank === 2) {\n if (this.dataFormat === \"channelsFirst\") {\n inputs = transpose(inputs, [0, 2, 3, 1]);\n }\n output = separableConv2d(inputs, this.depthwiseKernel.read(), this.pointwiseKernel.read(), this.strides, this.padding, this.dilationRate, \"NHWC\");\n }\n if (this.useBias) {\n output = biasAdd(output, this.bias.read(), this.dataFormat);\n }\n if (this.activation != null) {\n output = this.activation.apply(output);\n }\n if (this.dataFormat === \"channelsFirst\") {\n output = transpose(output, [0, 3, 1, 2]);\n }\n return output;\n });\n }\n getConfig() {\n const config = super.getConfig();\n delete config[\"rank\"];\n delete config[\"kernelInitializer\"];\n delete config[\"kernelRegularizer\"];\n delete config[\"kernelConstraint\"];\n config[\"depthwiseInitializer\"] = serializeInitializer(this.depthwiseInitializer);\n config[\"pointwiseInitializer\"] = serializeInitializer(this.pointwiseInitializer);\n config[\"depthwiseRegularizer\"] = serializeRegularizer(this.depthwiseRegularizer);\n config[\"pointwiseRegularizer\"] = serializeRegularizer(this.pointwiseRegularizer);\n config[\"depthwiseConstraint\"] = serializeConstraint(this.depthwiseConstraint);\n config[\"pointwiseConstraint\"] = serializeConstraint(this.pointwiseConstraint);\n return config;\n }\n};\nSeparableConv.className = \"SeparableConv\";\nvar SeparableConv2D = class extends SeparableConv {\n constructor(args) {\n super(2, args);\n }\n};\nSeparableConv2D.className = \"SeparableConv2D\";\nserialization_exports.registerClass(SeparableConv2D);\nvar Conv1D = class extends Conv {\n constructor(args) {\n super(1, args);\n Conv1D.verifyArgs(args);\n this.inputSpec = [{ ndim: 3 }];\n }\n getConfig() {\n const config = super.getConfig();\n delete config[\"rank\"];\n delete config[\"dataFormat\"];\n return config;\n }\n static verifyArgs(args) {\n if (typeof args.kernelSize !== \"number\" && !checkArrayTypeAndLength(args.kernelSize, \"number\", 1, 1)) {\n throw new ValueError(`Conv1D expects config.kernelSize to be number or number[] with length 1, but received ${JSON.stringify(args.kernelSize)}.`);\n }\n }\n};\nConv1D.className = \"Conv1D\";\nserialization_exports.registerClass(Conv1D);\nvar Cropping2D = class extends Layer {\n constructor(args) {\n super(args);\n if (typeof args.cropping === \"number\") {\n this.cropping = [[args.cropping, args.cropping], [args.cropping, args.cropping]];\n } else if (typeof args.cropping[0] === \"number\") {\n this.cropping = [\n [args.cropping[0], args.cropping[0]],\n [args.cropping[1], args.cropping[1]]\n ];\n } else {\n this.cropping = args.cropping;\n }\n this.dataFormat = args.dataFormat === void 0 ? \"channelsLast\" : args.dataFormat;\n this.inputSpec = [{ ndim: 4 }];\n }\n computeOutputShape(inputShape) {\n if (this.dataFormat === \"channelsFirst\") {\n return [\n inputShape[0],\n inputShape[1],\n inputShape[2] - this.cropping[0][0] - this.cropping[0][1],\n inputShape[3] - this.cropping[1][0] - this.cropping[1][1]\n ];\n } else {\n return [\n inputShape[0],\n inputShape[1] - this.cropping[0][0] - this.cropping[0][1],\n inputShape[2] - this.cropping[1][0] - this.cropping[1][1],\n inputShape[3]\n ];\n }\n }\n call(inputs, kwargs) {\n return tidy(() => {\n inputs = getExactlyOneTensor(inputs);\n if (this.dataFormat === \"channelsLast\") {\n const hSliced = sliceAlongAxis(inputs, this.cropping[0][0], inputs.shape[1] - this.cropping[0][0] - this.cropping[0][1], 2);\n return sliceAlongAxis(hSliced, this.cropping[1][0], inputs.shape[2] - this.cropping[1][1] - this.cropping[1][0], 3);\n } else {\n const hSliced = sliceAlongAxis(inputs, this.cropping[0][0], inputs.shape[2] - this.cropping[0][0] - this.cropping[0][1], 3);\n return sliceAlongAxis(hSliced, this.cropping[1][0], inputs.shape[3] - this.cropping[1][1] - this.cropping[1][0], 4);\n }\n });\n }\n getConfig() {\n const config = { cropping: this.cropping, dataFormat: this.dataFormat };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nCropping2D.className = \"Cropping2D\";\nserialization_exports.registerClass(Cropping2D);\nvar UpSampling2D = class extends Layer {\n constructor(args) {\n super(args);\n this.DEFAULT_SIZE = [2, 2];\n this.inputSpec = [{ ndim: 4 }];\n this.size = args.size == null ? this.DEFAULT_SIZE : args.size;\n this.dataFormat = args.dataFormat == null ? \"channelsLast\" : args.dataFormat;\n checkDataFormat(this.dataFormat);\n this.interpolation = args.interpolation == null ? \"nearest\" : args.interpolation;\n checkInterpolationFormat(this.interpolation);\n }\n computeOutputShape(inputShape) {\n if (this.dataFormat === \"channelsFirst\") {\n const height = inputShape[2] == null ? null : this.size[0] * inputShape[2];\n const width = inputShape[3] == null ? null : this.size[1] * inputShape[3];\n return [inputShape[0], inputShape[1], height, width];\n } else {\n const height = inputShape[1] == null ? null : this.size[0] * inputShape[1];\n const width = inputShape[2] == null ? null : this.size[1] * inputShape[2];\n return [inputShape[0], height, width, inputShape[3]];\n }\n }\n call(inputs, kwargs) {\n return tidy(() => {\n let input2 = getExactlyOneTensor(inputs);\n const inputShape = input2.shape;\n if (this.dataFormat === \"channelsFirst\") {\n input2 = transpose(input2, [0, 2, 3, 1]);\n const height = this.size[0] * inputShape[2];\n const width = this.size[1] * inputShape[3];\n const resized = this.interpolation === \"nearest\" ? image.resizeNearestNeighbor(input2, [height, width]) : image.resizeBilinear(input2, [height, width]);\n return transpose(resized, [0, 3, 1, 2]);\n } else {\n const height = this.size[0] * inputShape[1];\n const width = this.size[1] * inputShape[2];\n return this.interpolation === \"nearest\" ? image.resizeNearestNeighbor(input2, [height, width]) : image.resizeBilinear(input2, [height, width]);\n }\n });\n }\n getConfig() {\n const config = {\n size: this.size,\n dataFormat: this.dataFormat,\n interpolation: this.interpolation\n };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nUpSampling2D.className = \"UpSampling2D\";\nserialization_exports.registerClass(UpSampling2D);\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/layers/convolutional_depthwise.js\nfunction depthwiseConv2d3(x, depthwiseKernel, strides = [1, 1], padding = \"valid\", dataFormat, dilationRate) {\n return tidy(() => {\n if (dataFormat == null) {\n dataFormat = imageDataFormat();\n }\n checkDataFormat(dataFormat);\n let y = preprocessConv2DInput(x, dataFormat);\n if (x.rank !== 4) {\n throw new ValueError(`Input for depthwiseConv2d is required to be 4-D, but is instead ${x.rank}-D`);\n }\n if (depthwiseKernel.rank !== 4) {\n throw new ValueError(`depthwiseKernel is required to be 4-D, but is instead ${depthwiseKernel.rank}-D`);\n }\n y = depthwiseConv2d(y, depthwiseKernel, strides, padding === \"same\" ? \"same\" : \"valid\", \"NHWC\", dilationRate);\n if (dataFormat === \"channelsFirst\") {\n y = transpose(y, [0, 3, 1, 2]);\n }\n return y;\n });\n}\nvar DepthwiseConv2D = class extends BaseConv {\n constructor(args) {\n super(2, args);\n this.depthwiseKernel = null;\n this.depthMultiplier = args.depthMultiplier == null ? 1 : args.depthMultiplier;\n this.depthwiseInitializer = getInitializer(args.depthwiseInitializer || this.DEFAULT_KERNEL_INITIALIZER);\n this.depthwiseConstraint = getConstraint(args.depthwiseConstraint);\n this.depthwiseRegularizer = getRegularizer(args.depthwiseRegularizer);\n }\n build(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n if (inputShape.length < 4) {\n throw new ValueError(`Inputs to DepthwiseConv2D should have rank 4. Received input shape: ${JSON.stringify(inputShape)}.`);\n }\n const channelAxis = this.dataFormat === \"channelsFirst\" ? 1 : 3;\n if (inputShape[channelAxis] == null || inputShape[channelAxis] < 0) {\n throw new ValueError(`The channel dimension of the inputs to DepthwiseConv2D should be defined, but is not (${inputShape[channelAxis]}).`);\n }\n const inputDim = inputShape[channelAxis];\n const depthwiseKernelShape = [\n this.kernelSize[0],\n this.kernelSize[1],\n inputDim,\n this.depthMultiplier\n ];\n this.depthwiseKernel = this.addWeight(\"depthwise_kernel\", depthwiseKernelShape, null, this.depthwiseInitializer, this.depthwiseRegularizer, true, this.depthwiseConstraint);\n if (this.useBias) {\n this.bias = this.addWeight(\"bias\", [inputDim * this.depthMultiplier], null, this.biasInitializer, this.biasRegularizer, true, this.biasConstraint);\n } else {\n this.bias = null;\n }\n this.built = true;\n }\n call(inputs, kwargs) {\n return tidy(() => {\n inputs = getExactlyOneTensor(inputs);\n let outputs = depthwiseConv2d3(inputs, this.depthwiseKernel.read(), this.strides, this.padding, this.dataFormat, null);\n if (this.useBias) {\n outputs = biasAdd(outputs, this.bias.read(), this.dataFormat);\n }\n if (this.activation != null) {\n outputs = this.activation.apply(outputs);\n }\n return outputs;\n });\n }\n computeOutputShape(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n const rows = this.dataFormat === \"channelsFirst\" ? inputShape[2] : inputShape[1];\n const cols = this.dataFormat === \"channelsFirst\" ? inputShape[3] : inputShape[2];\n const outFilters = this.dataFormat === \"channelsFirst\" ? inputShape[1] * this.depthMultiplier : inputShape[3] * this.depthMultiplier;\n const outRows = convOutputLength(rows, this.kernelSize[0], this.padding, this.strides[0]);\n const outCols = convOutputLength(cols, this.kernelSize[1], this.padding, this.strides[1]);\n if (this.dataFormat === \"channelsFirst\") {\n return [inputShape[0], outFilters, outRows, outCols];\n } else {\n return [inputShape[0], outRows, outCols, outFilters];\n }\n }\n getConfig() {\n const config = super.getConfig();\n config[\"depthMultiplier\"] = this.depthMultiplier;\n config[\"depthwiseInitializer\"] = serializeInitializer(this.depthwiseInitializer);\n config[\"depthwiseRegularizer\"] = serializeRegularizer(this.depthwiseRegularizer);\n config[\"depthwiseConstraint\"] = serializeConstraint(this.depthwiseRegularizer);\n return config;\n }\n};\nDepthwiseConv2D.className = \"DepthwiseConv2D\";\nserialization_exports.registerClass(DepthwiseConv2D);\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/layers/recurrent.js\nfunction standardizeArgs(inputs, initialState, constants, numConstants) {\n if (Array.isArray(inputs)) {\n if (initialState != null || constants != null) {\n throw new ValueError(\"When inputs is an array, neither initialState or constants should be provided\");\n }\n if (numConstants != null) {\n constants = inputs.slice(inputs.length - numConstants, inputs.length);\n inputs = inputs.slice(0, inputs.length - numConstants);\n }\n if (inputs.length > 1) {\n initialState = inputs.slice(1, inputs.length);\n }\n inputs = inputs[0];\n }\n function toListOrNull(x) {\n if (x == null || Array.isArray(x)) {\n return x;\n } else {\n return [x];\n }\n }\n initialState = toListOrNull(initialState);\n constants = toListOrNull(constants);\n return { inputs, initialState, constants };\n}\nfunction rnn(stepFunction, inputs, initialStates, goBackwards = false, mask, constants, unroll = false, needPerStepOutputs = false) {\n return tidy(() => {\n const ndim = inputs.shape.length;\n if (ndim < 3) {\n throw new ValueError(`Input should be at least 3D, but is ${ndim}D.`);\n }\n const axes = [1, 0].concat(range2(2, ndim));\n inputs = transpose(inputs, axes);\n if (constants != null) {\n throw new NotImplementedError(\"The rnn() functoin of the deeplearn.js backend does not support constants yet.\");\n }\n if (unroll) {\n console.warn(\"Backend rnn(): the unroll = true option is not applicable to the imperative deeplearn.js backend.\");\n }\n if (mask != null) {\n mask = cast(cast(mask, \"bool\"), \"float32\");\n if (mask.rank === ndim - 1) {\n mask = expandDims(mask, -1);\n }\n mask = transpose(mask, axes);\n }\n if (goBackwards) {\n inputs = reverse(inputs, 0);\n if (mask != null) {\n mask = reverse(mask, 0);\n }\n }\n const perStepOutputs = [];\n let lastOutput;\n let states = initialStates;\n const timeSteps = inputs.shape[0];\n const perStepInputs = unstack(inputs);\n let perStepMasks;\n if (mask != null) {\n perStepMasks = unstack(mask);\n }\n for (let t = 0; t < timeSteps; ++t) {\n const currentInput = perStepInputs[t];\n const stepOutputs = tidy(() => stepFunction(currentInput, states));\n if (mask == null) {\n lastOutput = stepOutputs[0];\n states = stepOutputs[1];\n } else {\n const maskedOutputs = tidy(() => {\n const stepMask = perStepMasks[t];\n const negStepMask = sub(onesLike(stepMask), stepMask);\n const output = add2(mul(stepOutputs[0], stepMask), mul(states[0], negStepMask));\n const newStates = states.map((state, i) => {\n return add2(mul(stepOutputs[1][i], stepMask), mul(state, negStepMask));\n });\n return { output, newStates };\n });\n lastOutput = maskedOutputs.output;\n states = maskedOutputs.newStates;\n }\n if (needPerStepOutputs) {\n perStepOutputs.push(lastOutput);\n }\n }\n let outputs;\n if (needPerStepOutputs) {\n const axis = 1;\n outputs = stack(perStepOutputs, axis);\n }\n return [lastOutput, outputs, states];\n });\n}\nvar RNN = class extends Layer {\n constructor(args) {\n super(args);\n let cell;\n if (args.cell == null) {\n throw new ValueError(\"cell property is missing for the constructor of RNN.\");\n } else if (Array.isArray(args.cell)) {\n cell = new StackedRNNCells({ cells: args.cell });\n } else {\n cell = args.cell;\n }\n if (cell.stateSize == null) {\n throw new ValueError(\"The RNN cell should have an attribute `stateSize` (tuple of integers, one integer per RNN state).\");\n }\n this.cell = cell;\n this.returnSequences = args.returnSequences == null ? false : args.returnSequences;\n this.returnState = args.returnState == null ? false : args.returnState;\n this.goBackwards = args.goBackwards == null ? false : args.goBackwards;\n this._stateful = args.stateful == null ? false : args.stateful;\n this.unroll = args.unroll == null ? false : args.unroll;\n this.supportsMasking = true;\n this.inputSpec = [new InputSpec({ ndim: 3 })];\n this.stateSpec = null;\n this.states_ = null;\n this.numConstants = null;\n this.keptStates = [];\n }\n getStates() {\n if (this.states_ == null) {\n const numStates = Array.isArray(this.cell.stateSize) ? this.cell.stateSize.length : 1;\n return range2(0, numStates).map((x) => null);\n } else {\n return this.states_;\n }\n }\n setStates(states) {\n this.states_ = states;\n }\n computeOutputShape(inputShape) {\n if (isArrayOfShapes(inputShape)) {\n inputShape = inputShape[0];\n }\n inputShape = inputShape;\n let stateSize = this.cell.stateSize;\n if (!Array.isArray(stateSize)) {\n stateSize = [stateSize];\n }\n const outputDim = stateSize[0];\n let outputShape;\n if (this.returnSequences) {\n outputShape = [inputShape[0], inputShape[1], outputDim];\n } else {\n outputShape = [inputShape[0], outputDim];\n }\n if (this.returnState) {\n const stateShape = [];\n for (const dim of stateSize) {\n stateShape.push([inputShape[0], dim]);\n }\n return [outputShape].concat(stateShape);\n } else {\n return outputShape;\n }\n }\n computeMask(inputs, mask) {\n return tidy(() => {\n if (Array.isArray(mask)) {\n mask = mask[0];\n }\n const outputMask = this.returnSequences ? mask : null;\n if (this.returnState) {\n const stateMask = this.states.map((s) => null);\n return [outputMask].concat(stateMask);\n } else {\n return outputMask;\n }\n });\n }\n get states() {\n if (this.states_ == null) {\n const numStates = Array.isArray(this.cell.stateSize) ? this.cell.stateSize.length : 1;\n const output = [];\n for (let i = 0; i < numStates; ++i) {\n output.push(null);\n }\n return output;\n } else {\n return this.states_;\n }\n }\n set states(s) {\n this.states_ = s;\n }\n build(inputShape) {\n const constantShape = null;\n if (this.numConstants != null) {\n throw new NotImplementedError(\"Constants support is not implemented in RNN yet.\");\n }\n if (isArrayOfShapes(inputShape)) {\n inputShape = inputShape[0];\n }\n inputShape = inputShape;\n const batchSize = this.stateful ? inputShape[0] : null;\n const inputDim = inputShape.slice(2);\n this.inputSpec[0] = new InputSpec({ shape: [batchSize, null, ...inputDim] });\n const stepInputShape = [inputShape[0]].concat(inputShape.slice(2));\n if (constantShape != null) {\n throw new NotImplementedError(\"Constants support is not implemented in RNN yet.\");\n } else {\n this.cell.build(stepInputShape);\n }\n let stateSize;\n if (Array.isArray(this.cell.stateSize)) {\n stateSize = this.cell.stateSize;\n } else {\n stateSize = [this.cell.stateSize];\n }\n if (this.stateSpec != null) {\n if (!util_exports.arraysEqual(this.stateSpec.map((spec) => spec.shape[spec.shape.length - 1]), stateSize)) {\n throw new ValueError(`An initialState was passed that is not compatible with cell.stateSize. Received stateSpec=${this.stateSpec}; However cell.stateSize is ${this.cell.stateSize}`);\n }\n } else {\n this.stateSpec = stateSize.map((dim) => new InputSpec({ shape: [null, dim] }));\n }\n if (this.stateful) {\n this.resetStates();\n }\n }\n resetStates(states, training = false) {\n tidy(() => {\n if (!this.stateful) {\n throw new AttributeError(\"Cannot call resetStates() on an RNN Layer that is not stateful.\");\n }\n const batchSize = this.inputSpec[0].shape[0];\n if (batchSize == null) {\n throw new ValueError(\"If an RNN is stateful, it needs to know its batch size. Specify the batch size of your input tensors: \\n- If using a Sequential model, specify the batch size by passing a `batchInputShape` option to your first layer.\\n- If using the functional API, specify the batch size by passing a `batchShape` option to your Input layer.\");\n }\n if (this.states_ == null) {\n if (Array.isArray(this.cell.stateSize)) {\n this.states_ = this.cell.stateSize.map((dim) => zeros([batchSize, dim]));\n } else {\n this.states_ = [zeros([batchSize, this.cell.stateSize])];\n }\n } else if (states == null) {\n dispose(this.states_);\n if (this.keptStates != null) {\n dispose(this.keptStates);\n this.keptStates = [];\n }\n if (Array.isArray(this.cell.stateSize)) {\n this.states_ = this.cell.stateSize.map((dim) => zeros([batchSize, dim]));\n } else {\n this.states_[0] = zeros([batchSize, this.cell.stateSize]);\n }\n } else {\n if (!Array.isArray(states)) {\n states = [states];\n }\n if (states.length !== this.states_.length) {\n throw new ValueError(`Layer ${this.name} expects ${this.states_.length} state(s), but it received ${states.length} state value(s). Input received: ${states}`);\n }\n if (training === true) {\n this.keptStates.push(this.states_.slice());\n } else {\n dispose(this.states_);\n }\n for (let index = 0; index < this.states_.length; ++index) {\n const value = states[index];\n const dim = Array.isArray(this.cell.stateSize) ? this.cell.stateSize[index] : this.cell.stateSize;\n const expectedShape = [batchSize, dim];\n if (!util_exports.arraysEqual(value.shape, expectedShape)) {\n throw new ValueError(`State ${index} is incompatible with layer ${this.name}: expected shape=${expectedShape}, received shape=${value.shape}`);\n }\n this.states_[index] = value;\n }\n }\n this.states_ = this.states_.map((state) => keep(state.clone()));\n });\n }\n apply(inputs, kwargs) {\n let initialState = kwargs == null ? null : kwargs[\"initialState\"];\n let constants = kwargs == null ? null : kwargs[\"constants\"];\n if (kwargs == null) {\n kwargs = {};\n }\n const standardized = standardizeArgs(inputs, initialState, constants, this.numConstants);\n inputs = standardized.inputs;\n initialState = standardized.initialState;\n constants = standardized.constants;\n let additionalInputs = [];\n let additionalSpecs = [];\n if (initialState != null) {\n kwargs[\"initialState\"] = initialState;\n additionalInputs = additionalInputs.concat(initialState);\n this.stateSpec = [];\n for (const state of initialState) {\n this.stateSpec.push(new InputSpec({ shape: state.shape }));\n }\n additionalSpecs = additionalSpecs.concat(this.stateSpec);\n }\n if (constants != null) {\n kwargs[\"constants\"] = constants;\n additionalInputs = additionalInputs.concat(constants);\n this.numConstants = constants.length;\n }\n const isTensor = additionalInputs[0] instanceof SymbolicTensor;\n if (isTensor) {\n const fullInput = [inputs].concat(additionalInputs);\n const fullInputSpec = this.inputSpec.concat(additionalSpecs);\n const originalInputSpec = this.inputSpec;\n this.inputSpec = fullInputSpec;\n const output = super.apply(fullInput, kwargs);\n this.inputSpec = originalInputSpec;\n return output;\n } else {\n return super.apply(inputs, kwargs);\n }\n }\n call(inputs, kwargs) {\n return tidy(() => {\n const mask = kwargs == null ? null : kwargs[\"mask\"];\n const training = kwargs == null ? null : kwargs[\"training\"];\n let initialState = kwargs == null ? null : kwargs[\"initialState\"];\n inputs = getExactlyOneTensor(inputs);\n if (initialState == null) {\n if (this.stateful) {\n initialState = this.states_;\n } else {\n initialState = this.getInitialState(inputs);\n }\n }\n const numStates = Array.isArray(this.cell.stateSize) ? this.cell.stateSize.length : 1;\n if (initialState.length !== numStates) {\n throw new ValueError(`RNN Layer has ${numStates} state(s) but was passed ${initialState.length} initial state(s).`);\n }\n if (this.unroll) {\n console.warn(\"Ignoring unroll = true for RNN layer, due to imperative backend.\");\n }\n const cellCallKwargs = { training };\n const step5 = (inputs2, states2) => {\n const outputs2 = this.cell.call([inputs2].concat(states2), cellCallKwargs);\n return [outputs2[0], outputs2.slice(1)];\n };\n const rnnOutputs = rnn(step5, inputs, initialState, this.goBackwards, mask, null, this.unroll, this.returnSequences);\n const lastOutput = rnnOutputs[0];\n const outputs = rnnOutputs[1];\n const states = rnnOutputs[2];\n if (this.stateful) {\n this.resetStates(states, training);\n }\n const output = this.returnSequences ? outputs : lastOutput;\n if (this.returnState) {\n return [output].concat(states);\n } else {\n return output;\n }\n });\n }\n getInitialState(inputs) {\n return tidy(() => {\n let initialState = zeros(inputs.shape);\n initialState = sum2(initialState, [1, 2]);\n initialState = expandDims2(initialState);\n if (Array.isArray(this.cell.stateSize)) {\n return this.cell.stateSize.map((dim) => dim > 1 ? tile2(initialState, [1, dim]) : initialState);\n } else {\n return this.cell.stateSize > 1 ? [tile2(initialState, [1, this.cell.stateSize])] : [initialState];\n }\n });\n }\n get trainableWeights() {\n if (!this.trainable) {\n return [];\n }\n return this.cell.trainableWeights;\n }\n get nonTrainableWeights() {\n if (!this.trainable) {\n return this.cell.weights;\n }\n return this.cell.nonTrainableWeights;\n }\n setFastWeightInitDuringBuild(value) {\n super.setFastWeightInitDuringBuild(value);\n if (this.cell != null) {\n this.cell.setFastWeightInitDuringBuild(value);\n }\n }\n getConfig() {\n const baseConfig = super.getConfig();\n const config = {\n returnSequences: this.returnSequences,\n returnState: this.returnState,\n goBackwards: this.goBackwards,\n stateful: this.stateful,\n unroll: this.unroll\n };\n if (this.numConstants != null) {\n config[\"numConstants\"] = this.numConstants;\n }\n const cellConfig = this.cell.getConfig();\n if (this.getClassName() === RNN.className) {\n config[\"cell\"] = {\n \"className\": this.cell.getClassName(),\n \"config\": cellConfig\n };\n }\n return Object.assign({}, cellConfig, baseConfig, config);\n }\n static fromConfig(cls, config, customObjects = {}) {\n const cellConfig = config[\"cell\"];\n const cell = deserialize(cellConfig, customObjects);\n return new cls(Object.assign(config, { cell }));\n }\n};\nRNN.className = \"RNN\";\nserialization_exports.registerClass(RNN);\nvar RNNCell = class extends Layer {\n};\nvar SimpleRNNCell = class extends RNNCell {\n constructor(args) {\n super(args);\n this.DEFAULT_ACTIVATION = \"tanh\";\n this.DEFAULT_KERNEL_INITIALIZER = \"glorotNormal\";\n this.DEFAULT_RECURRENT_INITIALIZER = \"orthogonal\";\n this.DEFAULT_BIAS_INITIALIZER = \"zeros\";\n this.units = args.units;\n assertPositiveInteger(this.units, `units`);\n this.activation = getActivation(args.activation == null ? this.DEFAULT_ACTIVATION : args.activation);\n this.useBias = args.useBias == null ? true : args.useBias;\n this.kernelInitializer = getInitializer(args.kernelInitializer || this.DEFAULT_KERNEL_INITIALIZER);\n this.recurrentInitializer = getInitializer(args.recurrentInitializer || this.DEFAULT_RECURRENT_INITIALIZER);\n this.biasInitializer = getInitializer(args.biasInitializer || this.DEFAULT_BIAS_INITIALIZER);\n this.kernelRegularizer = getRegularizer(args.kernelRegularizer);\n this.recurrentRegularizer = getRegularizer(args.recurrentRegularizer);\n this.biasRegularizer = getRegularizer(args.biasRegularizer);\n this.kernelConstraint = getConstraint(args.kernelConstraint);\n this.recurrentConstraint = getConstraint(args.recurrentConstraint);\n this.biasConstraint = getConstraint(args.biasConstraint);\n this.dropout = min2([1, max2([0, args.dropout == null ? 0 : args.dropout])]);\n this.recurrentDropout = min2([\n 1,\n max2([0, args.recurrentDropout == null ? 0 : args.recurrentDropout])\n ]);\n this.dropoutFunc = args.dropoutFunc;\n this.stateSize = this.units;\n this.dropoutMask = null;\n this.recurrentDropoutMask = null;\n }\n build(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n this.kernel = this.addWeight(\"kernel\", [inputShape[inputShape.length - 1], this.units], null, this.kernelInitializer, this.kernelRegularizer, true, this.kernelConstraint);\n this.recurrentKernel = this.addWeight(\"recurrent_kernel\", [this.units, this.units], null, this.recurrentInitializer, this.recurrentRegularizer, true, this.recurrentConstraint);\n if (this.useBias) {\n this.bias = this.addWeight(\"bias\", [this.units], null, this.biasInitializer, this.biasRegularizer, true, this.biasConstraint);\n } else {\n this.bias = null;\n }\n this.built = true;\n }\n call(inputs, kwargs) {\n return tidy(() => {\n inputs = inputs;\n if (inputs.length !== 2) {\n throw new ValueError(`SimpleRNNCell expects 2 input Tensors, got ${inputs.length}.`);\n }\n let prevOutput = inputs[1];\n inputs = inputs[0];\n const training = kwargs[\"training\"] == null ? false : kwargs[\"training\"];\n if (0 < this.dropout && this.dropout < 1 && this.dropoutMask == null) {\n this.dropoutMask = generateDropoutMask({\n ones: () => onesLike(inputs),\n rate: this.dropout,\n training,\n dropoutFunc: this.dropoutFunc\n });\n }\n if (0 < this.recurrentDropout && this.recurrentDropout < 1 && this.recurrentDropoutMask == null) {\n this.recurrentDropoutMask = generateDropoutMask({\n ones: () => onesLike(prevOutput),\n rate: this.recurrentDropout,\n training,\n dropoutFunc: this.dropoutFunc\n });\n }\n let h;\n const dpMask = this.dropoutMask;\n const recDpMask = this.recurrentDropoutMask;\n if (dpMask != null) {\n h = dot2(mul(inputs, dpMask), this.kernel.read());\n } else {\n h = dot2(inputs, this.kernel.read());\n }\n if (this.bias != null) {\n h = biasAdd(h, this.bias.read());\n }\n if (recDpMask != null) {\n prevOutput = mul(prevOutput, recDpMask);\n }\n let output = add2(h, dot2(prevOutput, this.recurrentKernel.read()));\n if (this.activation != null) {\n output = this.activation.apply(output);\n }\n return [output, output];\n });\n }\n getConfig() {\n const baseConfig = super.getConfig();\n const config = {\n units: this.units,\n activation: serializeActivation(this.activation),\n useBias: this.useBias,\n kernelInitializer: serializeInitializer(this.kernelInitializer),\n recurrentInitializer: serializeInitializer(this.recurrentInitializer),\n biasInitializer: serializeInitializer(this.biasInitializer),\n kernelRegularizer: serializeRegularizer(this.kernelRegularizer),\n recurrentRegularizer: serializeRegularizer(this.recurrentRegularizer),\n biasRegularizer: serializeRegularizer(this.biasRegularizer),\n activityRegularizer: serializeRegularizer(this.activityRegularizer),\n kernelConstraint: serializeConstraint(this.kernelConstraint),\n recurrentConstraint: serializeConstraint(this.recurrentConstraint),\n biasConstraint: serializeConstraint(this.biasConstraint),\n dropout: this.dropout,\n recurrentDropout: this.recurrentDropout\n };\n return Object.assign({}, baseConfig, config);\n }\n};\nSimpleRNNCell.className = \"SimpleRNNCell\";\nserialization_exports.registerClass(SimpleRNNCell);\nvar SimpleRNN = class extends RNN {\n constructor(args) {\n args.cell = new SimpleRNNCell(args);\n super(args);\n }\n call(inputs, kwargs) {\n return tidy(() => {\n if (this.cell.dropoutMask != null) {\n dispose(this.cell.dropoutMask);\n this.cell.dropoutMask = null;\n }\n if (this.cell.recurrentDropoutMask != null) {\n dispose(this.cell.recurrentDropoutMask);\n this.cell.recurrentDropoutMask = null;\n }\n const mask = kwargs == null ? null : kwargs[\"mask\"];\n const training = kwargs == null ? null : kwargs[\"training\"];\n const initialState = kwargs == null ? null : kwargs[\"initialState\"];\n return super.call(inputs, { mask, training, initialState });\n });\n }\n static fromConfig(cls, config) {\n return new cls(config);\n }\n};\nSimpleRNN.className = \"SimpleRNN\";\nserialization_exports.registerClass(SimpleRNN);\nvar GRUCell = class extends RNNCell {\n constructor(args) {\n super(args);\n this.DEFAULT_ACTIVATION = \"tanh\";\n this.DEFAULT_RECURRENT_ACTIVATION = \"hardSigmoid\";\n this.DEFAULT_KERNEL_INITIALIZER = \"glorotNormal\";\n this.DEFAULT_RECURRENT_INITIALIZER = \"orthogonal\";\n this.DEFAULT_BIAS_INITIALIZER = \"zeros\";\n if (args.resetAfter) {\n throw new ValueError(`GRUCell does not support reset_after parameter set to true.`);\n }\n this.units = args.units;\n assertPositiveInteger(this.units, \"units\");\n this.activation = getActivation(args.activation === void 0 ? this.DEFAULT_ACTIVATION : args.activation);\n this.recurrentActivation = getActivation(args.recurrentActivation === void 0 ? this.DEFAULT_RECURRENT_ACTIVATION : args.recurrentActivation);\n this.useBias = args.useBias == null ? true : args.useBias;\n this.kernelInitializer = getInitializer(args.kernelInitializer || this.DEFAULT_KERNEL_INITIALIZER);\n this.recurrentInitializer = getInitializer(args.recurrentInitializer || this.DEFAULT_RECURRENT_INITIALIZER);\n this.biasInitializer = getInitializer(args.biasInitializer || this.DEFAULT_BIAS_INITIALIZER);\n this.kernelRegularizer = getRegularizer(args.kernelRegularizer);\n this.recurrentRegularizer = getRegularizer(args.recurrentRegularizer);\n this.biasRegularizer = getRegularizer(args.biasRegularizer);\n this.kernelConstraint = getConstraint(args.kernelConstraint);\n this.recurrentConstraint = getConstraint(args.recurrentConstraint);\n this.biasConstraint = getConstraint(args.biasConstraint);\n this.dropout = min2([1, max2([0, args.dropout == null ? 0 : args.dropout])]);\n this.recurrentDropout = min2([\n 1,\n max2([0, args.recurrentDropout == null ? 0 : args.recurrentDropout])\n ]);\n this.dropoutFunc = args.dropoutFunc;\n this.implementation = args.implementation;\n this.stateSize = this.units;\n this.dropoutMask = null;\n this.recurrentDropoutMask = null;\n }\n build(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n const inputDim = inputShape[inputShape.length - 1];\n this.kernel = this.addWeight(\"kernel\", [inputDim, this.units * 3], null, this.kernelInitializer, this.kernelRegularizer, true, this.kernelConstraint);\n this.recurrentKernel = this.addWeight(\"recurrent_kernel\", [this.units, this.units * 3], null, this.recurrentInitializer, this.recurrentRegularizer, true, this.recurrentConstraint);\n if (this.useBias) {\n this.bias = this.addWeight(\"bias\", [this.units * 3], null, this.biasInitializer, this.biasRegularizer, true, this.biasConstraint);\n } else {\n this.bias = null;\n }\n this.built = true;\n }\n call(inputs, kwargs) {\n return tidy(() => {\n inputs = inputs;\n if (inputs.length !== 2) {\n throw new ValueError(`GRUCell expects 2 input Tensors (inputs, h, c), got ${inputs.length}.`);\n }\n const training = kwargs[\"training\"] == null ? false : kwargs[\"training\"];\n let hTMinus1 = inputs[1];\n inputs = inputs[0];\n if (0 < this.dropout && this.dropout < 1 && this.dropoutMask == null) {\n this.dropoutMask = generateDropoutMask({\n ones: () => onesLike(inputs),\n rate: this.dropout,\n training,\n count: 3,\n dropoutFunc: this.dropoutFunc\n });\n }\n if (0 < this.recurrentDropout && this.recurrentDropout < 1 && this.recurrentDropoutMask == null) {\n this.recurrentDropoutMask = generateDropoutMask({\n ones: () => onesLike(hTMinus1),\n rate: this.recurrentDropout,\n training,\n count: 3,\n dropoutFunc: this.dropoutFunc\n });\n }\n const dpMask = this.dropoutMask;\n const recDpMask = this.recurrentDropoutMask;\n let z;\n let r;\n let hh;\n if (0 < this.dropout && this.dropout < 1) {\n inputs = mul(inputs, dpMask[0]);\n }\n let matrixX = dot2(inputs, this.kernel.read());\n if (this.useBias) {\n matrixX = biasAdd(matrixX, this.bias.read());\n }\n if (0 < this.recurrentDropout && this.recurrentDropout < 1) {\n hTMinus1 = mul(hTMinus1, recDpMask[0]);\n }\n const recurrentKernelValue = this.recurrentKernel.read();\n const [rk1, rk2] = split(recurrentKernelValue, [2 * this.units, this.units], recurrentKernelValue.rank - 1);\n const matrixInner = dot2(hTMinus1, rk1);\n const [xZ, xR, xH] = split(matrixX, 3, matrixX.rank - 1);\n const [recurrentZ, recurrentR] = split(matrixInner, 2, matrixInner.rank - 1);\n z = this.recurrentActivation.apply(add2(xZ, recurrentZ));\n r = this.recurrentActivation.apply(add2(xR, recurrentR));\n const recurrentH = dot2(mul(r, hTMinus1), rk2);\n hh = this.activation.apply(add2(xH, recurrentH));\n const h = add2(mul(z, hTMinus1), mul(add2(1, neg(z)), hh));\n return [h, h];\n });\n }\n getConfig() {\n const baseConfig = super.getConfig();\n const config = {\n units: this.units,\n activation: serializeActivation(this.activation),\n recurrentActivation: serializeActivation(this.recurrentActivation),\n useBias: this.useBias,\n kernelInitializer: serializeInitializer(this.kernelInitializer),\n recurrentInitializer: serializeInitializer(this.recurrentInitializer),\n biasInitializer: serializeInitializer(this.biasInitializer),\n kernelRegularizer: serializeRegularizer(this.kernelRegularizer),\n recurrentRegularizer: serializeRegularizer(this.recurrentRegularizer),\n biasRegularizer: serializeRegularizer(this.biasRegularizer),\n activityRegularizer: serializeRegularizer(this.activityRegularizer),\n kernelConstraint: serializeConstraint(this.kernelConstraint),\n recurrentConstraint: serializeConstraint(this.recurrentConstraint),\n biasConstraint: serializeConstraint(this.biasConstraint),\n dropout: this.dropout,\n recurrentDropout: this.recurrentDropout,\n implementation: this.implementation,\n resetAfter: false\n };\n return Object.assign({}, baseConfig, config);\n }\n};\nGRUCell.className = \"GRUCell\";\nserialization_exports.registerClass(GRUCell);\nvar GRU = class extends RNN {\n constructor(args) {\n if (args.implementation === 0) {\n console.warn(\"`implementation=0` has been deprecated, and now defaults to `implementation=1`. Please update your layer call.\");\n }\n args.cell = new GRUCell(args);\n super(args);\n }\n call(inputs, kwargs) {\n return tidy(() => {\n if (this.cell.dropoutMask != null) {\n dispose(this.cell.dropoutMask);\n this.cell.dropoutMask = null;\n }\n if (this.cell.recurrentDropoutMask != null) {\n dispose(this.cell.recurrentDropoutMask);\n this.cell.recurrentDropoutMask = null;\n }\n const mask = kwargs == null ? null : kwargs[\"mask\"];\n const training = kwargs == null ? null : kwargs[\"training\"];\n const initialState = kwargs == null ? null : kwargs[\"initialState\"];\n return super.call(inputs, { mask, training, initialState });\n });\n }\n static fromConfig(cls, config) {\n if (config[\"implmentation\"] === 0) {\n config[\"implementation\"] = 1;\n }\n return new cls(config);\n }\n};\nGRU.className = \"GRU\";\nserialization_exports.registerClass(GRU);\nvar LSTMCell = class extends RNNCell {\n constructor(args) {\n super(args);\n this.DEFAULT_ACTIVATION = \"tanh\";\n this.DEFAULT_RECURRENT_ACTIVATION = \"hardSigmoid\";\n this.DEFAULT_KERNEL_INITIALIZER = \"glorotNormal\";\n this.DEFAULT_RECURRENT_INITIALIZER = \"orthogonal\";\n this.DEFAULT_BIAS_INITIALIZER = \"zeros\";\n this.units = args.units;\n assertPositiveInteger(this.units, \"units\");\n this.activation = getActivation(args.activation === void 0 ? this.DEFAULT_ACTIVATION : args.activation);\n this.recurrentActivation = getActivation(args.recurrentActivation === void 0 ? this.DEFAULT_RECURRENT_ACTIVATION : args.recurrentActivation);\n this.useBias = args.useBias == null ? true : args.useBias;\n this.kernelInitializer = getInitializer(args.kernelInitializer || this.DEFAULT_KERNEL_INITIALIZER);\n this.recurrentInitializer = getInitializer(args.recurrentInitializer || this.DEFAULT_RECURRENT_INITIALIZER);\n this.biasInitializer = getInitializer(args.biasInitializer || this.DEFAULT_BIAS_INITIALIZER);\n this.unitForgetBias = args.unitForgetBias;\n this.kernelRegularizer = getRegularizer(args.kernelRegularizer);\n this.recurrentRegularizer = getRegularizer(args.recurrentRegularizer);\n this.biasRegularizer = getRegularizer(args.biasRegularizer);\n this.kernelConstraint = getConstraint(args.kernelConstraint);\n this.recurrentConstraint = getConstraint(args.recurrentConstraint);\n this.biasConstraint = getConstraint(args.biasConstraint);\n this.dropout = min2([1, max2([0, args.dropout == null ? 0 : args.dropout])]);\n this.recurrentDropout = min2([\n 1,\n max2([0, args.recurrentDropout == null ? 0 : args.recurrentDropout])\n ]);\n this.dropoutFunc = args.dropoutFunc;\n this.implementation = args.implementation;\n this.stateSize = [this.units, this.units];\n this.dropoutMask = null;\n this.recurrentDropoutMask = null;\n }\n build(inputShape) {\n var _a;\n inputShape = getExactlyOneShape(inputShape);\n const inputDim = inputShape[inputShape.length - 1];\n this.kernel = this.addWeight(\"kernel\", [inputDim, this.units * 4], null, this.kernelInitializer, this.kernelRegularizer, true, this.kernelConstraint);\n this.recurrentKernel = this.addWeight(\"recurrent_kernel\", [this.units, this.units * 4], null, this.recurrentInitializer, this.recurrentRegularizer, true, this.recurrentConstraint);\n let biasInitializer;\n if (this.useBias) {\n if (this.unitForgetBias) {\n const capturedBiasInit = this.biasInitializer;\n const capturedUnits = this.units;\n biasInitializer = new (_a = class CustomInit extends Initializer {\n apply(shape, dtype) {\n const bI = capturedBiasInit.apply([capturedUnits]);\n const bF = new Ones().apply([capturedUnits]);\n const bCAndH = capturedBiasInit.apply([capturedUnits * 2]);\n return concatAlongFirstAxis(concatAlongFirstAxis(bI, bF), bCAndH);\n }\n }, _a.className = \"CustomInit\", _a)();\n } else {\n biasInitializer = this.biasInitializer;\n }\n this.bias = this.addWeight(\"bias\", [this.units * 4], null, biasInitializer, this.biasRegularizer, true, this.biasConstraint);\n } else {\n this.bias = null;\n }\n this.built = true;\n }\n call(inputs, kwargs) {\n return tidy(() => {\n const training = kwargs[\"training\"] == null ? false : kwargs[\"training\"];\n inputs = inputs;\n if (inputs.length !== 3) {\n throw new ValueError(`LSTMCell expects 3 input Tensors (inputs, h, c), got ${inputs.length}.`);\n }\n let hTMinus1 = inputs[1];\n const cTMinus1 = inputs[2];\n inputs = inputs[0];\n if (0 < this.dropout && this.dropout < 1 && this.dropoutMask == null) {\n this.dropoutMask = generateDropoutMask({\n ones: () => onesLike(inputs),\n rate: this.dropout,\n training,\n count: 4,\n dropoutFunc: this.dropoutFunc\n });\n }\n if (0 < this.recurrentDropout && this.recurrentDropout < 1 && this.recurrentDropoutMask == null) {\n this.recurrentDropoutMask = generateDropoutMask({\n ones: () => onesLike(hTMinus1),\n rate: this.recurrentDropout,\n training,\n count: 4,\n dropoutFunc: this.dropoutFunc\n });\n }\n const dpMask = this.dropoutMask;\n const recDpMask = this.recurrentDropoutMask;\n let i;\n let f;\n let c;\n let o;\n if (0 < this.dropout && this.dropout < 1) {\n inputs = mul(inputs, dpMask[0]);\n }\n let z = dot2(inputs, this.kernel.read());\n if (0 < this.recurrentDropout && this.recurrentDropout < 1) {\n hTMinus1 = mul(hTMinus1, recDpMask[0]);\n }\n z = add2(z, dot2(hTMinus1, this.recurrentKernel.read()));\n if (this.useBias) {\n z = biasAdd(z, this.bias.read());\n }\n const [z0, z1, z2, z3] = split(z, 4, z.rank - 1);\n i = this.recurrentActivation.apply(z0);\n f = this.recurrentActivation.apply(z1);\n c = add2(mul(f, cTMinus1), mul(i, this.activation.apply(z2)));\n o = this.recurrentActivation.apply(z3);\n const h = mul(o, this.activation.apply(c));\n return [h, h, c];\n });\n }\n getConfig() {\n const baseConfig = super.getConfig();\n const config = {\n units: this.units,\n activation: serializeActivation(this.activation),\n recurrentActivation: serializeActivation(this.recurrentActivation),\n useBias: this.useBias,\n kernelInitializer: serializeInitializer(this.kernelInitializer),\n recurrentInitializer: serializeInitializer(this.recurrentInitializer),\n biasInitializer: serializeInitializer(this.biasInitializer),\n unitForgetBias: this.unitForgetBias,\n kernelRegularizer: serializeRegularizer(this.kernelRegularizer),\n recurrentRegularizer: serializeRegularizer(this.recurrentRegularizer),\n biasRegularizer: serializeRegularizer(this.biasRegularizer),\n activityRegularizer: serializeRegularizer(this.activityRegularizer),\n kernelConstraint: serializeConstraint(this.kernelConstraint),\n recurrentConstraint: serializeConstraint(this.recurrentConstraint),\n biasConstraint: serializeConstraint(this.biasConstraint),\n dropout: this.dropout,\n recurrentDropout: this.recurrentDropout,\n implementation: this.implementation\n };\n return Object.assign({}, baseConfig, config);\n }\n};\nLSTMCell.className = \"LSTMCell\";\nserialization_exports.registerClass(LSTMCell);\nvar LSTM = class extends RNN {\n constructor(args) {\n if (args.implementation === 0) {\n console.warn(\"`implementation=0` has been deprecated, and now defaults to `implementation=1`. Please update your layer call.\");\n }\n args.cell = new LSTMCell(args);\n super(args);\n }\n call(inputs, kwargs) {\n return tidy(() => {\n if (this.cell.dropoutMask != null) {\n dispose(this.cell.dropoutMask);\n this.cell.dropoutMask = null;\n }\n if (this.cell.recurrentDropoutMask != null) {\n dispose(this.cell.recurrentDropoutMask);\n this.cell.recurrentDropoutMask = null;\n }\n const mask = kwargs == null ? null : kwargs[\"mask\"];\n const training = kwargs == null ? null : kwargs[\"training\"];\n const initialState = kwargs == null ? null : kwargs[\"initialState\"];\n return super.call(inputs, { mask, training, initialState });\n });\n }\n static fromConfig(cls, config) {\n if (config[\"implmentation\"] === 0) {\n config[\"implementation\"] = 1;\n }\n return new cls(config);\n }\n};\nLSTM.className = \"LSTM\";\nserialization_exports.registerClass(LSTM);\nvar StackedRNNCells = class extends RNNCell {\n constructor(args) {\n super(args);\n this.cells = args.cells;\n }\n get stateSize() {\n const stateSize = [];\n for (const cell of this.cells.slice().reverse()) {\n if (Array.isArray(cell.stateSize)) {\n stateSize.push(...cell.stateSize);\n } else {\n stateSize.push(cell.stateSize);\n }\n }\n return stateSize;\n }\n call(inputs, kwargs) {\n return tidy(() => {\n inputs = inputs;\n let states = inputs.slice(1);\n const nestedStates = [];\n for (const cell of this.cells.slice().reverse()) {\n if (Array.isArray(cell.stateSize)) {\n nestedStates.push(states.splice(0, cell.stateSize.length));\n } else {\n nestedStates.push(states.splice(0, 1));\n }\n }\n nestedStates.reverse();\n const newNestedStates = [];\n let callInputs;\n for (let i = 0; i < this.cells.length; ++i) {\n const cell = this.cells[i];\n states = nestedStates[i];\n if (i === 0) {\n callInputs = [inputs[0]].concat(states);\n } else {\n callInputs = [callInputs[0]].concat(states);\n }\n callInputs = cell.call(callInputs, kwargs);\n newNestedStates.push(callInputs.slice(1));\n }\n states = [];\n for (const cellStates of newNestedStates.slice().reverse()) {\n states.push(...cellStates);\n }\n return [callInputs[0]].concat(states);\n });\n }\n build(inputShape) {\n if (isArrayOfShapes(inputShape)) {\n inputShape = inputShape[0];\n }\n inputShape = inputShape;\n let outputDim;\n this.cells.forEach((cell, i) => {\n nameScope(`RNNCell_${i}`, () => {\n cell.build(inputShape);\n if (Array.isArray(cell.stateSize)) {\n outputDim = cell.stateSize[0];\n } else {\n outputDim = cell.stateSize;\n }\n inputShape = [inputShape[0], outputDim];\n });\n });\n this.built = true;\n }\n getConfig() {\n const baseConfig = super.getConfig();\n const getCellConfig = (cell) => {\n return {\n \"className\": cell.getClassName(),\n \"config\": cell.getConfig()\n };\n };\n const cellConfigs = this.cells.map(getCellConfig);\n const config = { \"cells\": cellConfigs };\n return Object.assign({}, baseConfig, config);\n }\n static fromConfig(cls, config, customObjects = {}) {\n const cells = [];\n for (const cellConfig of config[\"cells\"]) {\n cells.push(deserialize(cellConfig, customObjects));\n }\n return new cls({ cells });\n }\n get trainableWeights() {\n if (!this.trainable) {\n return [];\n }\n const weights = [];\n for (const cell of this.cells) {\n weights.push(...cell.trainableWeights);\n }\n return weights;\n }\n get nonTrainableWeights() {\n const weights = [];\n for (const cell of this.cells) {\n weights.push(...cell.nonTrainableWeights);\n }\n if (!this.trainable) {\n const trainableWeights = [];\n for (const cell of this.cells) {\n trainableWeights.push(...cell.trainableWeights);\n }\n return trainableWeights.concat(weights);\n }\n return weights;\n }\n getWeights() {\n const weights = [];\n for (const cell of this.cells) {\n weights.push(...cell.weights);\n }\n return batchGetValue(weights);\n }\n setWeights(weights) {\n const tuples = [];\n for (const cell of this.cells) {\n const numParams = cell.weights.length;\n const inputWeights = weights.splice(numParams);\n for (let i = 0; i < cell.weights.length; ++i) {\n tuples.push([cell.weights[i], inputWeights[i]]);\n }\n }\n batchSetValue(tuples);\n }\n};\nStackedRNNCells.className = \"StackedRNNCells\";\nserialization_exports.registerClass(StackedRNNCells);\nfunction generateDropoutMask(args) {\n const { ones: ones4, rate, training = false, count: count2 = 1, dropoutFunc } = args;\n const droppedInputs = () => dropoutFunc != null ? dropoutFunc(ones4(), rate) : dropout2(ones4(), rate);\n const createMask = () => inTrainPhase(droppedInputs, ones4, training);\n if (!count2 || count2 <= 1) {\n return keep(createMask().clone());\n }\n const masks = Array(count2).fill(void 0).map(createMask);\n return masks.map((m) => keep(m.clone()));\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/layers/convolutional_recurrent.js\nvar __rest = function(s, e) {\n var t = {};\n for (var p2 in s)\n if (Object.prototype.hasOwnProperty.call(s, p2) && e.indexOf(p2) < 0)\n t[p2] = s[p2];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p2 = Object.getOwnPropertySymbols(s); i < p2.length; i++) {\n if (e.indexOf(p2[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p2[i]))\n t[p2[i]] = s[p2[i]];\n }\n return t;\n};\nvar ConvRNN2D = class extends RNN {\n constructor(args) {\n if (args.unroll) {\n throw new NotImplementedError(\"Unrolling is not possible with convolutional RNNs.\");\n }\n if (Array.isArray(args.cell)) {\n throw new NotImplementedError(\"It is not possible at the moment to stack convolutional cells.\");\n }\n super(args);\n this.inputSpec = [new InputSpec({ ndim: 5 })];\n }\n call(inputs, kwargs) {\n return tidy(() => {\n if (this.cell.dropoutMask != null) {\n dispose(this.cell.dropoutMask);\n this.cell.dropoutMask = null;\n }\n if (this.cell.recurrentDropoutMask != null) {\n dispose(this.cell.recurrentDropoutMask);\n this.cell.recurrentDropoutMask = null;\n }\n if (kwargs && kwargs[\"constants\"]) {\n throw new ValueError(\"ConvRNN2D cell does not support constants\");\n }\n const mask = kwargs == null ? null : kwargs[\"mask\"];\n const training = kwargs == null ? null : kwargs[\"training\"];\n const initialState = kwargs == null ? null : kwargs[\"initialState\"];\n return super.call(inputs, { mask, training, initialState });\n });\n }\n computeOutputShape(inputShape) {\n let outShape = this.computeSingleOutputShape(inputShape);\n if (!this.returnSequences) {\n outShape = [outShape[0], ...outShape.slice(2)];\n }\n if (this.returnState) {\n outShape = [outShape, ...Array(2).fill([inputShape[0], ...outShape.slice(-3)])];\n }\n return outShape;\n }\n getInitialState(inputs) {\n return tidy(() => {\n const { stateSize } = this.cell;\n const inputShape = inputs.shape;\n const outputShape = this.computeSingleOutputShape(inputShape);\n const stateShape = [outputShape[0], ...outputShape.slice(2)];\n const initialState = zeros(stateShape);\n if (Array.isArray(stateSize)) {\n return Array(stateSize.length).fill(initialState);\n }\n return [initialState];\n });\n }\n resetStates(states, training = false) {\n tidy(() => {\n if (!this.stateful) {\n throw new AttributeError(\"Cannot call resetStates() on an RNN Layer that is not stateful.\");\n }\n const inputShape = this.inputSpec[0].shape;\n const outputShape = this.computeSingleOutputShape(inputShape);\n const stateShape = [outputShape[0], ...outputShape.slice(2)];\n const batchSize = inputShape[0];\n if (batchSize == null) {\n throw new ValueError(\"If an RNN is stateful, it needs to know its batch size. Specify the batch size of your input tensors: \\n- If using a Sequential model, specify the batch size by passing a `batchInputShape` option to your first layer.\\n- If using the functional API, specify the batch size by passing a `batchShape` option to your Input layer.\");\n }\n if (this.getStates() == null) {\n if (Array.isArray(this.cell.stateSize)) {\n this.states_ = this.cell.stateSize.map(() => zeros(stateShape));\n } else {\n this.states_ = [zeros(stateShape)];\n }\n } else if (states == null) {\n dispose(this.states_);\n if (this.keptStates != null) {\n dispose(this.keptStates);\n this.keptStates = [];\n }\n if (Array.isArray(this.cell.stateSize)) {\n this.states_ = this.cell.stateSize.map(() => zeros(stateShape));\n } else {\n this.states_[0] = zeros(stateShape);\n }\n } else {\n if (!Array.isArray(states)) {\n states = [states];\n }\n if (states.length !== this.states_.length) {\n throw new ValueError(`Layer ${this.name} expects ${this.states_.length} state(s), but it received ${states.length} state value(s). Input received: ${states}`);\n }\n if (training) {\n this.keptStates.push(this.states_.slice());\n } else {\n dispose(this.states_);\n }\n for (let index = 0; index < this.states_.length; ++index) {\n const value = states[index];\n const expectedShape = stateShape;\n if (!util_exports.arraysEqual(value.shape, expectedShape)) {\n throw new ValueError(`State ${index} is incompatible with layer ${this.name}: expected shape=${expectedShape}, received shape=${value.shape}`);\n }\n this.states_[index] = value;\n }\n }\n this.states_ = this.states_.map((state) => keep(state.clone()));\n });\n }\n computeSingleOutputShape(inputShape) {\n const { dataFormat, filters, kernelSize, padding, strides, dilationRate } = this.cell;\n const isChannelsFirst = dataFormat === \"channelsFirst\";\n const h = inputShape[isChannelsFirst ? 3 : 2];\n const w = inputShape[isChannelsFirst ? 4 : 3];\n const hOut = convOutputLength(h, kernelSize[0], padding, strides[0], dilationRate[0]);\n const wOut = convOutputLength(w, kernelSize[1], padding, strides[1], dilationRate[1]);\n const outShape = [\n ...inputShape.slice(0, 2),\n ...isChannelsFirst ? [filters, hOut, wOut] : [hOut, wOut, filters]\n ];\n return outShape;\n }\n};\nConvRNN2D.className = \"ConvRNN2D\";\nvar ConvLSTM2DCell = class extends LSTMCell {\n constructor(args) {\n const { filters, kernelSize, strides, padding, dataFormat, dilationRate } = args;\n super(Object.assign({}, args, { units: filters }));\n this.filters = filters;\n assertPositiveInteger(this.filters, \"filters\");\n this.kernelSize = normalizeArray(kernelSize, 2, \"kernelSize\");\n this.kernelSize.forEach((size) => assertPositiveInteger(size, \"kernelSize\"));\n this.strides = normalizeArray(strides || 1, 2, \"strides\");\n this.strides.forEach((stride) => assertPositiveInteger(stride, \"strides\"));\n this.padding = padding || \"valid\";\n checkPaddingMode(this.padding);\n this.dataFormat = dataFormat || \"channelsLast\";\n checkDataFormat(this.dataFormat);\n this.dilationRate = normalizeArray(dilationRate || 1, 2, \"dilationRate\");\n this.dilationRate.forEach((rate) => assertPositiveInteger(rate, \"dilationRate\"));\n }\n build(inputShape) {\n var _a;\n inputShape = getExactlyOneShape(inputShape);\n const channelAxis = this.dataFormat === \"channelsFirst\" ? 1 : inputShape.length - 1;\n if (inputShape[channelAxis] == null) {\n throw new ValueError(`The channel dimension of the input should be defined. Found ${inputShape[channelAxis]}`);\n }\n const inputDim = inputShape[channelAxis];\n const numOfKernels = 4;\n const kernelShape = this.kernelSize.concat([inputDim, this.filters * numOfKernels]);\n this.kernel = this.addWeight(\"kernel\", kernelShape, null, this.kernelInitializer, this.kernelRegularizer, true, this.kernelConstraint);\n const recurrentKernelShape = this.kernelSize.concat([this.filters, this.filters * numOfKernels]);\n this.recurrentKernel = this.addWeight(\"recurrent_kernel\", recurrentKernelShape, null, this.recurrentInitializer, this.recurrentRegularizer, true, this.recurrentConstraint);\n if (this.useBias) {\n let biasInitializer;\n if (this.unitForgetBias) {\n const init2 = this.biasInitializer;\n const filters = this.filters;\n biasInitializer = new (_a = class CustomInit extends Initializer {\n apply(shape, dtype) {\n const biasI = init2.apply([filters]);\n const biasF = ones2([filters]);\n const biasCAndO = init2.apply([filters * 2]);\n return concatenate([biasI, biasF, biasCAndO]);\n }\n }, _a.className = \"CustomInit\", _a)();\n } else {\n biasInitializer = this.biasInitializer;\n }\n this.bias = this.addWeight(\"bias\", [this.filters * numOfKernels], null, biasInitializer, this.biasRegularizer, true, this.biasConstraint);\n }\n this.built = true;\n }\n call(inputs, kwargs) {\n return tidy(() => {\n if (inputs.length !== 3) {\n throw new ValueError(`ConvLSTM2DCell expects 3 input Tensors (inputs, h, c), got ${inputs.length}.`);\n }\n const training = kwargs[\"training\"] || false;\n const x = inputs[0];\n const hTMinus1 = inputs[1];\n const cTMinus1 = inputs[2];\n const numOfKernels = 4;\n if (0 < this.dropout && this.dropout < 1 && this.dropoutMask == null) {\n this.dropoutMask = generateDropoutMask({\n ones: () => onesLike(x),\n rate: this.dropout,\n training,\n count: numOfKernels,\n dropoutFunc: this.dropoutFunc\n });\n }\n const dropoutMask = this.dropoutMask;\n const applyDropout = (x2, mask, index) => {\n if (!mask || !mask[index]) {\n return x2;\n }\n return mul(mask[index], x2);\n };\n let xI = applyDropout(x, dropoutMask, 0);\n let xF = applyDropout(x, dropoutMask, 1);\n let xC = applyDropout(x, dropoutMask, 2);\n let xO = applyDropout(x, dropoutMask, 3);\n if (0 < this.recurrentDropout && this.recurrentDropout < 1 && this.recurrentDropoutMask == null) {\n this.recurrentDropoutMask = generateDropoutMask({\n ones: () => onesLike(hTMinus1),\n rate: this.recurrentDropout,\n training,\n count: numOfKernels,\n dropoutFunc: this.dropoutFunc\n });\n }\n const recDropoutMask = this.recurrentDropoutMask;\n let hI = applyDropout(hTMinus1, recDropoutMask, 0);\n let hF = applyDropout(hTMinus1, recDropoutMask, 1);\n let hC = applyDropout(hTMinus1, recDropoutMask, 2);\n let hO = applyDropout(hTMinus1, recDropoutMask, 3);\n const kernelChannelAxis = 3;\n const [kernelI, kernelF, kernelC, kernelO] = split(this.kernel.read(), numOfKernels, kernelChannelAxis);\n const [biasI, biasF, biasC, biasO] = this.useBias ? split(this.bias.read(), numOfKernels) : [null, null, null, null];\n xI = this.inputConv(xI, kernelI, biasI, this.padding);\n xF = this.inputConv(xF, kernelF, biasF, this.padding);\n xC = this.inputConv(xC, kernelC, biasC, this.padding);\n xO = this.inputConv(xO, kernelO, biasO, this.padding);\n const [recKernelI, recKernelF, recKernelC, recKernelO] = split(this.recurrentKernel.read(), numOfKernels, kernelChannelAxis);\n hI = this.recurrentConv(hI, recKernelI);\n hF = this.recurrentConv(hF, recKernelF);\n hC = this.recurrentConv(hC, recKernelC);\n hO = this.recurrentConv(hO, recKernelO);\n const i = this.recurrentActivation.apply(add2(xI, hI));\n const f = this.recurrentActivation.apply(add2(xF, hF));\n const c = add2(mul(f, cTMinus1), mul(i, this.activation.apply(add2(xC, hC))));\n const h = mul(this.recurrentActivation.apply(add2(xO, hO)), this.activation.apply(c));\n return [h, h, c];\n });\n }\n getConfig() {\n const _a = super.getConfig(), { \"units\": _ } = _a, baseConfig = __rest(_a, [\"units\"]);\n const config = {\n filters: this.filters,\n kernelSize: this.kernelSize,\n padding: this.padding,\n dataFormat: this.dataFormat,\n dilationRate: this.dilationRate,\n strides: this.strides\n };\n return Object.assign({}, baseConfig, config);\n }\n inputConv(x, w, b, padding) {\n const out = conv2d(x, w, this.strides, padding || \"valid\", this.dataFormat === \"channelsFirst\" ? \"NCHW\" : \"NHWC\", this.dilationRate);\n if (b) {\n return biasAdd(out, b, this.dataFormat);\n }\n return out;\n }\n recurrentConv(x, w) {\n const strides = 1;\n return conv2d(x, w, strides, \"same\", this.dataFormat === \"channelsFirst\" ? \"NCHW\" : \"NHWC\");\n }\n};\nConvLSTM2DCell.className = \"ConvLSTM2DCell\";\nserialization_exports.registerClass(ConvLSTM2DCell);\nvar ConvLSTM2D = class extends ConvRNN2D {\n constructor(args) {\n const cell = new ConvLSTM2DCell(args);\n super(Object.assign({}, args, { cell }));\n }\n static fromConfig(cls, config) {\n return new cls(config);\n }\n};\nConvLSTM2D.className = \"ConvLSTM2D\";\nserialization_exports.registerClass(ConvLSTM2D);\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/layers/core.js\nvar Dropout = class extends Layer {\n constructor(args) {\n super(args);\n this.rate = Math.max(Math.min(args.rate, 1), 0);\n this.noiseShape = args.noiseShape;\n this.seed = args.seed;\n this.supportsMasking = true;\n }\n getNoiseShape(input2) {\n if (this.noiseShape == null) {\n return this.noiseShape;\n }\n const inputShape = input2.shape;\n const noiseShape = [];\n for (let i = 0; i < this.noiseShape.length; ++i) {\n noiseShape.push(this.noiseShape[i] == null ? inputShape[i] : this.noiseShape[i]);\n }\n return noiseShape;\n }\n call(inputs, kwargs) {\n return tidy(() => {\n this.invokeCallHook(inputs, kwargs);\n const input2 = getExactlyOneTensor(inputs);\n if (0 < this.rate && this.rate < 1) {\n const training = kwargs[\"training\"] == null ? false : kwargs[\"training\"];\n const noiseShape = this.getNoiseShape(input2);\n const output = inTrainPhase(() => dropout2(input2, this.rate, noiseShape, this.seed), () => input2, training);\n return output;\n }\n return inputs;\n });\n }\n getConfig() {\n const config = {\n rate: this.rate,\n noiseShape: this.noiseShape,\n seed: this.seed\n };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n dispose() {\n return super.dispose();\n }\n};\nDropout.className = \"Dropout\";\nserialization_exports.registerClass(Dropout);\nvar SpatialDropout1D = class extends Dropout {\n constructor(args) {\n super(args);\n this.inputSpec = [{ ndim: 3 }];\n }\n getNoiseShape(input2) {\n const inputShape = input2.shape;\n return [inputShape[0], 1, inputShape[2]];\n }\n};\nSpatialDropout1D.className = \"SpatialDropout1D\";\nserialization_exports.registerClass(SpatialDropout1D);\nvar Dense = class extends Layer {\n constructor(args) {\n super(args);\n this.activation = null;\n this.useBias = true;\n this.kernel = null;\n this.bias = null;\n this.DEFAULT_KERNEL_INITIALIZER = \"glorotNormal\";\n this.DEFAULT_BIAS_INITIALIZER = \"zeros\";\n if (args.batchInputShape == null && args.inputShape == null && args.inputDim != null) {\n let batchSize = null;\n if (args.batchSize != null) {\n batchSize = args.batchSize;\n }\n this.batchInputShape = [batchSize, args.inputDim];\n }\n this.units = args.units;\n assertPositiveInteger(this.units, \"units\");\n this.activation = getActivation(args.activation);\n if (args.useBias != null) {\n this.useBias = args.useBias;\n }\n this.kernelInitializer = getInitializer(args.kernelInitializer || this.DEFAULT_KERNEL_INITIALIZER);\n this.biasInitializer = getInitializer(args.biasInitializer || this.DEFAULT_BIAS_INITIALIZER);\n this.kernelConstraint = getConstraint(args.kernelConstraint);\n this.biasConstraint = getConstraint(args.biasConstraint);\n this.kernelRegularizer = getRegularizer(args.kernelRegularizer);\n this.biasRegularizer = getRegularizer(args.biasRegularizer);\n this.activityRegularizer = getRegularizer(args.activityRegularizer);\n this.supportsMasking = true;\n this.inputSpec = [{ minNDim: 2 }];\n }\n build(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n const inputLastDim = inputShape[inputShape.length - 1];\n if (this.kernel == null) {\n this.kernel = this.addWeight(\"kernel\", [inputLastDim, this.units], null, this.kernelInitializer, this.kernelRegularizer, true, this.kernelConstraint);\n if (this.useBias) {\n this.bias = this.addWeight(\"bias\", [this.units], null, this.biasInitializer, this.biasRegularizer, true, this.biasConstraint);\n }\n }\n this.inputSpec = [{ minNDim: 2, axes: { [-1]: inputLastDim } }];\n this.built = true;\n }\n computeOutputShape(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n const outputShape = inputShape.slice();\n outputShape[outputShape.length - 1] = this.units;\n return outputShape;\n }\n call(inputs, kwargs) {\n return tidy(() => {\n this.invokeCallHook(inputs, kwargs);\n const input2 = getExactlyOneTensor(inputs);\n const fusedActivationName = mapActivationToFusedKernel(this.activation.getClassName());\n let output;\n if (fusedActivationName != null) {\n output = dot2(input2, this.kernel.read(), fusedActivationName, this.bias ? this.bias.read() : null);\n } else {\n output = dot2(input2, this.kernel.read());\n if (this.bias != null) {\n output = biasAdd(output, this.bias.read());\n }\n if (this.activation != null) {\n output = this.activation.apply(output);\n }\n }\n return output;\n });\n }\n getConfig() {\n const config = {\n units: this.units,\n activation: serializeActivation(this.activation),\n useBias: this.useBias,\n kernelInitializer: serializeInitializer(this.kernelInitializer),\n biasInitializer: serializeInitializer(this.biasInitializer),\n kernelRegularizer: serializeRegularizer(this.kernelRegularizer),\n biasRegularizer: serializeRegularizer(this.biasRegularizer),\n activityRegularizer: serializeRegularizer(this.activityRegularizer),\n kernelConstraint: serializeConstraint(this.kernelConstraint),\n biasConstraint: serializeConstraint(this.biasConstraint)\n };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nDense.className = \"Dense\";\nserialization_exports.registerClass(Dense);\nvar Flatten = class extends Layer {\n constructor(args) {\n args = args || {};\n super(args);\n this.inputSpec = [{ minNDim: 3 }];\n this.dataFormat = args.dataFormat;\n }\n computeOutputShape(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n for (const dim of inputShape.slice(1)) {\n if (dim == null) {\n throw new ValueError(`The shape of the input to \"Flatten\" is not fully defined (got ${inputShape.slice(1)}). Make sure to pass a complete \"input_shape\" or \"batch_input_shape\" argument to the first layer in your model.`);\n }\n }\n return [inputShape[0], arrayProd(inputShape, 1)];\n }\n call(inputs, kwargs) {\n return tidy(() => {\n this.invokeCallHook(inputs, kwargs);\n let input2 = getExactlyOneTensor(inputs);\n if (this.dataFormat === \"channelsFirst\" && input2.rank > 1) {\n const permutation = [0];\n for (let i = 2; i < input2.rank; ++i) {\n permutation.push(i);\n }\n permutation.push(1);\n input2 = transpose(input2, permutation);\n }\n return batchFlatten(input2);\n });\n }\n getConfig() {\n const config = {};\n if (this.dataFormat != null) {\n config[\"dataFormat\"] = this.dataFormat;\n }\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nFlatten.className = \"Flatten\";\nserialization_exports.registerClass(Flatten);\nvar Activation2 = class extends Layer {\n constructor(args) {\n super(args);\n this.supportsMasking = true;\n this.activation = getActivation(args.activation);\n }\n call(inputs, kwargs) {\n return tidy(() => {\n this.invokeCallHook(inputs, kwargs);\n const input2 = getExactlyOneTensor(inputs);\n return this.activation.apply(input2);\n });\n }\n getConfig() {\n const config = { activation: serializeActivation(this.activation) };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nActivation2.className = \"Activation\";\nserialization_exports.registerClass(Activation2);\nvar RepeatVector = class extends Layer {\n constructor(args) {\n super(args);\n this.n = args.n;\n this.inputSpec = [{ ndim: 2 }];\n }\n computeOutputShape(inputShape) {\n return [inputShape[0], this.n, inputShape[1]];\n }\n call(inputs, kwargs) {\n return tidy(() => {\n inputs = getExactlyOneTensor(inputs);\n return repeat(inputs, this.n);\n });\n }\n getConfig() {\n const config = {\n n: this.n\n };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nRepeatVector.className = \"RepeatVector\";\nserialization_exports.registerClass(RepeatVector);\nvar Reshape2 = class extends Layer {\n constructor(args) {\n super(args);\n this.targetShape = args.targetShape;\n for (let i = 0; i < this.targetShape.length; ++i) {\n if (this.isUnknown(this.targetShape[i])) {\n this.targetShape[i] = null;\n }\n }\n }\n isUnknown(dim) {\n return dim < 0 || dim == null;\n }\n fixUnknownDimension(inputShape, outputShape) {\n const errorMsg = \"Total size of new array must be unchanged.\";\n const finalShape = outputShape.slice();\n let known = 1;\n let unknown = null;\n for (let i = 0; i < finalShape.length; ++i) {\n const dim = finalShape[i];\n if (this.isUnknown(dim)) {\n if (unknown === null) {\n unknown = i;\n } else {\n throw new ValueError(\"Can only specifiy one unknown dimension.\");\n }\n } else {\n known *= dim;\n }\n }\n const originalSize = arrayProd(inputShape);\n if (unknown !== null) {\n if (known === 0 || originalSize % known !== 0) {\n throw new ValueError(errorMsg);\n }\n finalShape[unknown] = originalSize / known;\n } else if (originalSize !== known) {\n throw new ValueError(errorMsg);\n }\n return finalShape;\n }\n computeOutputShape(inputShape) {\n let anyUnknownDims = false;\n for (let i = 0; i < inputShape.length; ++i) {\n if (this.isUnknown(inputShape[i])) {\n anyUnknownDims = true;\n break;\n }\n }\n if (anyUnknownDims) {\n return inputShape.slice(0, 1).concat(this.targetShape);\n } else {\n return inputShape.slice(0, 1).concat(this.fixUnknownDimension(inputShape.slice(1), this.targetShape));\n }\n }\n call(inputs, kwargs) {\n return tidy(() => {\n this.invokeCallHook(inputs, kwargs);\n const input2 = getExactlyOneTensor(inputs);\n const inputShape = input2.shape;\n const outputShape = inputShape.slice(0, 1).concat(this.fixUnknownDimension(inputShape.slice(1), this.targetShape));\n return reshape(input2, outputShape);\n });\n }\n getConfig() {\n const config = {\n targetShape: this.targetShape\n };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nReshape2.className = \"Reshape\";\nserialization_exports.registerClass(Reshape2);\nvar Permute = class extends Layer {\n constructor(args) {\n super(args);\n if (args.dims == null) {\n throw new Error(\"Required configuration field `dims` is missing during Permute constructor call.\");\n }\n if (!Array.isArray(args.dims)) {\n throw new Error(`Permute constructor requires \\`dims\\` to be an Array, but received ${args.dims} instead.`);\n }\n const expectedSortedIndices = range2(1, args.dims.length + 1);\n if (!util_exports.arraysEqual(args.dims.slice().sort(), expectedSortedIndices)) {\n throw new Error(\"Invalid permutation `dims`: \" + JSON.stringify(args.dims) + \" `dims` must contain consecutive integers starting from 1.\");\n }\n this.dims = args.dims;\n this.dimsIncludingBatch = [0].concat(this.dims);\n this.inputSpec = [new InputSpec({ ndim: this.dims.length + 1 })];\n }\n computeOutputShape(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n const outputShape = inputShape.slice();\n this.dims.forEach((dim, i) => {\n outputShape[i + 1] = inputShape[dim];\n });\n return outputShape;\n }\n call(inputs, kwargs) {\n return transpose(getExactlyOneTensor(inputs), this.dimsIncludingBatch);\n }\n getConfig() {\n const config = {\n dims: this.dims\n };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nPermute.className = \"Permute\";\nserialization_exports.registerClass(Permute);\nvar Masking = class extends Layer {\n constructor(args) {\n super(args == null ? {} : args);\n this.supportsMasking = true;\n if (args != null) {\n this.maskValue = args.maskValue == null ? 0 : args.maskValue;\n } else {\n this.maskValue = 0;\n }\n }\n computeOutputShape(inputShape) {\n return inputShape;\n }\n getConfig() {\n const baseConfig = super.getConfig();\n const config = { maskValue: this.maskValue };\n Object.assign(config, baseConfig);\n return config;\n }\n computeMask(inputs, mask) {\n const input2 = getExactlyOneTensor(inputs);\n const axis = -1;\n return any(notEqual(input2, this.maskValue), axis);\n }\n call(inputs, kwargs) {\n return tidy(() => {\n this.invokeCallHook(inputs, kwargs);\n const input2 = getExactlyOneTensor(inputs);\n const axis = -1;\n const keepDims = true;\n const booleanMask = any(notEqual(input2, this.maskValue), axis, keepDims);\n const output = mul(input2, cast(booleanMask, input2.dtype));\n return output;\n });\n }\n};\nMasking.className = \"Masking\";\nserialization_exports.registerClass(Masking);\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/layers/embeddings.js\nvar Embedding = class extends Layer {\n constructor(args) {\n super(args);\n this.embeddings = null;\n this.DEFAULT_EMBEDDINGS_INITIALIZER = \"randomUniform\";\n if (args.batchInputShape == null && args.inputShape == null) {\n let batchSize = null;\n if (args.batchSize != null) {\n batchSize = args.batchSize;\n }\n if (args.inputLength == null) {\n this.batchInputShape = [batchSize, null];\n } else {\n this.batchInputShape = [batchSize].concat(toList(args.inputLength));\n }\n }\n this.inputDim = args.inputDim;\n assertPositiveInteger(this.inputDim, \"inputDim\");\n this.outputDim = args.outputDim;\n assertPositiveInteger(this.outputDim, \"outputDim\");\n this.embeddingsInitializer = getInitializer(args.embeddingsInitializer || this.DEFAULT_EMBEDDINGS_INITIALIZER);\n this.embeddingsRegularizer = getRegularizer(args.embeddingsRegularizer);\n this.activityRegularizer = getRegularizer(args.activityRegularizer);\n this.embeddingsConstraint = getConstraint(args.embeddingsConstraint);\n this.maskZero = args.maskZero;\n this.supportsMasking = args.maskZero;\n this.inputLength = args.inputLength;\n }\n build(inputShape) {\n this.embeddings = this.addWeight(\"embeddings\", [this.inputDim, this.outputDim], this.dtype, this.embeddingsInitializer, this.embeddingsRegularizer, true, this.embeddingsConstraint);\n this.built = true;\n }\n warnOnIncompatibleInputShape(inputShape) {\n }\n computeMask(inputs, mask) {\n return tidy(() => {\n if (!this.maskZero) {\n return null;\n } else {\n inputs = getExactlyOneTensor(inputs);\n return notEqual(inputs, zerosLike(inputs));\n }\n });\n }\n computeOutputShape(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n if (this.inputLength == null) {\n return [...inputShape, this.outputDim];\n }\n const inLens = toList(this.inputLength);\n if (inLens.length !== inputShape.length - 1) {\n throw new ValueError(`\"inputLength\" is ${this.inputLength}, but received input shape has shape ${inputShape}`);\n } else {\n let i = 0;\n for (let k = 0; k < inLens.length; ++k) {\n const s1 = inLens[k];\n const s2 = inputShape[k + 1];\n if (s1 != null && s2 != null && s1 !== s2) {\n throw new ValueError(`\"inputLength\" is ${this.inputLength}, but received input shape has shape ${inputShape}`);\n } else if (s1 == null) {\n inLens[i] = s2;\n }\n i++;\n }\n }\n return [inputShape[0], ...inLens, this.outputDim];\n }\n call(inputs, kwargs) {\n return tidy(() => {\n this.invokeCallHook(inputs, kwargs);\n let input2 = getExactlyOneTensor(inputs);\n if (input2.dtype !== \"int32\") {\n input2 = cast2(input2, \"int32\");\n }\n const output = gather2(this.embeddings.read(), reshape(input2, [input2.size]));\n return reshape(output, getExactlyOneShape(this.computeOutputShape(input2.shape)));\n });\n }\n getConfig() {\n const config = {\n inputDim: this.inputDim,\n outputDim: this.outputDim,\n embeddingsInitializer: serializeInitializer(this.embeddingsInitializer),\n embeddingsRegularizer: serializeRegularizer(this.embeddingsRegularizer),\n activityRegularizer: serializeRegularizer(this.activityRegularizer),\n embeddingsConstraint: serializeConstraint(this.embeddingsConstraint),\n maskZero: this.maskZero,\n inputLength: this.inputLength\n };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nEmbedding.className = \"Embedding\";\nserialization_exports.registerClass(Embedding);\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/layers/merge.js\nvar Merge = class extends Layer {\n constructor(args) {\n super(args || {});\n this.supportsMasking = true;\n }\n mergeFunction(inputs) {\n throw new NotImplementedError();\n }\n computeElementwiseOpOutputShape(shape1, shape2) {\n if (shape1 == null || shape2 == null) {\n return null;\n } else if (shape1.length < shape2.length) {\n return this.computeElementwiseOpOutputShape(shape2, shape1);\n } else if (shape2.length === 0) {\n return shape1;\n }\n const outputShape = shape1.slice(0, shape1.length - shape2.length);\n for (let k = 0; k < shape2.length; ++k) {\n const i = shape1[shape1.length - shape2.length + k];\n const j = shape2[k];\n if (i == null || j == null || i < 0 || j < 0) {\n outputShape.push(null);\n } else if (i === 1) {\n outputShape.push(j);\n } else if (j === 1) {\n outputShape.push(i);\n } else {\n if (i !== j) {\n throw new ValueError(\"Operands could not be broadcast together with shapes \" + JSON.stringify(shape1) + \" \" + JSON.stringify(shape2));\n }\n outputShape.push(i);\n }\n }\n return outputShape;\n }\n build(inputShape) {\n if (Array.isArray(inputShape) && !Array.isArray(inputShape[0])) {\n inputShape = [getExactlyOneShape(inputShape)];\n }\n inputShape = inputShape;\n if (inputShape.length < 2) {\n throw new ValueError(`A merge layer should be called on an Array of at least 2 inputs. Got ${inputShape.length} input(s).`);\n }\n let batchSizes = [];\n for (const shape of inputShape) {\n if (shape != null && shape[0] !== null) {\n batchSizes.push(shape[0]);\n }\n }\n batchSizes = unique2(batchSizes);\n if (batchSizes.length > 1) {\n throw new ValueError(`Can not merge tensors with different batch sizes. Got tensors with shapes: ${JSON.stringify(inputShape)}.`);\n }\n let outputShape = inputShape[0] == null ? null : inputShape[0].slice(1);\n for (let i = 1; i < inputShape.length; ++i) {\n const shape = inputShape[i] == null ? null : inputShape[i].slice(1);\n outputShape = this.computeElementwiseOpOutputShape(outputShape, shape);\n }\n const allRanks = inputShape.map((shape) => shape.length);\n if (inputShape.indexOf(null) === -1 && unique2(allRanks).length === 1) {\n this.reshapeRequired = false;\n } else {\n this.reshapeRequired = true;\n }\n }\n call(inputs, kwargs) {\n return tidy(() => {\n inputs = inputs;\n if (this.reshapeRequired) {\n const reshapedInputs = [];\n const inputDims = inputs.map((input2) => input2.rank);\n if (inputDims.indexOf(null) === -1) {\n const maxNDim = max2(inputDims);\n for (let x of inputs) {\n const xNDim = x.rank;\n for (let k = 0; k < maxNDim - xNDim; ++k) {\n x = expandDims2(x, 1);\n }\n reshapedInputs.push(x);\n }\n return this.mergeFunction(reshapedInputs);\n } else {\n let transposed = false;\n for (const x of inputs) {\n const xNDim = x.rank;\n if (xNDim == null) {\n const xShape = x.shape;\n const batchSize = xShape[0];\n const newShape = xShape.slice(1).concat([batchSize]);\n let xTransposed = reshape(x, [batchSize].concat(arrayProd(xShape.slice(1))));\n xTransposed = transpose(xTransposed, [1, 0]);\n xTransposed = reshape(xTransposed, newShape);\n reshapedInputs.push(xTransposed);\n transposed = true;\n } else if (xNDim > 1) {\n const dims = range2(1, xNDim).concat([0]);\n reshapedInputs.push(transpose(x, dims));\n transposed = true;\n } else {\n reshapedInputs.push(x);\n }\n }\n let y = this.mergeFunction(reshapedInputs);\n const yNDim = y.rank;\n if (transposed) {\n if (yNDim == null) {\n const yShape = y.shape;\n const yNDim2 = yShape.length;\n const batchSize = yShape[yNDim2 - 1];\n const newShape = [batchSize].concat(yShape.slice(0, yShape.length - 1));\n y = reshape(transpose(reshape(y, [-1, batchSize]), [1, 0]), newShape);\n } else if (yNDim > 1) {\n const dims = [yNDim - 1].concat(range2(0, yNDim - 1));\n y = transpose(y, dims);\n }\n }\n return y;\n }\n } else {\n return this.mergeFunction(inputs);\n }\n });\n }\n computeOutputShape(inputShape) {\n inputShape = inputShape;\n let outputShape;\n if (inputShape[0] == null) {\n outputShape = null;\n } else {\n outputShape = inputShape[0].slice(1);\n }\n for (let i = 1; i < inputShape.length; ++i) {\n const shape = inputShape[i] == null ? null : inputShape[i].slice(1);\n outputShape = this.computeElementwiseOpOutputShape(outputShape, shape);\n }\n let batchSizes = [];\n for (const shape of inputShape) {\n if (shape != null && shape[0] !== null) {\n batchSizes.push(shape[0]);\n }\n }\n batchSizes = unique2(batchSizes);\n if (batchSizes.length === 1) {\n outputShape = batchSizes.concat(outputShape);\n } else {\n outputShape = [null].concat(outputShape);\n }\n return outputShape;\n }\n computeMask(inputs, mask) {\n return tidy(() => {\n if (mask == null) {\n return null;\n }\n if (!Array.isArray(mask)) {\n throw new ValueError(\"`mask` should be an Array\");\n }\n if (!Array.isArray(inputs)) {\n throw new ValueError(\"`inputs` should be an Array\");\n }\n if (mask.length !== inputs.length) {\n throw new ValueError(`The Array 'inputs' and 'mask' are expected to have the same length, but have different lengths (${inputs.length} vs ${mask.length})`);\n }\n if (mask.every((m) => m == null)) {\n return null;\n }\n mask = mask.map((m) => m == null ? m : expandDims(m, 0));\n let output = mask[0];\n for (let i = 1; i < mask.length - 1; ++i) {\n output = logicalAnd(output, mask[i]);\n }\n return output;\n });\n }\n};\nvar Add2 = class extends Merge {\n constructor(args) {\n super(args);\n }\n mergeFunction(inputs) {\n return tidy(() => {\n let output = inputs[0].clone();\n for (let i = 1; i < inputs.length; ++i) {\n output = add2(output, inputs[i]);\n }\n return output;\n });\n }\n};\nAdd2.className = \"Add\";\nserialization_exports.registerClass(Add2);\nvar Multiply2 = class extends Merge {\n constructor(args) {\n super(args);\n }\n mergeFunction(inputs) {\n return tidy(() => {\n let output = inputs[0].clone();\n for (let i = 1; i < inputs.length; ++i) {\n output = mul(output, inputs[i]);\n }\n return output;\n });\n }\n};\nMultiply2.className = \"Multiply\";\nserialization_exports.registerClass(Multiply2);\nvar Average = class extends Merge {\n constructor(args) {\n super(args);\n }\n mergeFunction(inputs) {\n return tidy(() => {\n let output = inputs[0].clone();\n for (let i = 1; i < inputs.length; ++i) {\n output = add2(output, inputs[i]);\n }\n return mul(1 / inputs.length, output);\n });\n }\n};\nAverage.className = \"Average\";\nserialization_exports.registerClass(Average);\nvar Maximum2 = class extends Merge {\n constructor(args) {\n super(args);\n }\n mergeFunction(inputs) {\n return tidy(() => {\n let output = inputs[0];\n for (let i = 1; i < inputs.length; ++i) {\n output = maximum(output, inputs[i]);\n }\n return output;\n });\n }\n};\nMaximum2.className = \"Maximum\";\nserialization_exports.registerClass(Maximum2);\nvar Minimum2 = class extends Merge {\n constructor(args) {\n super(args);\n }\n mergeFunction(inputs) {\n return tidy(() => {\n let output = inputs[0];\n for (let i = 1; i < inputs.length; ++i) {\n output = minimum(output, inputs[i]);\n }\n return output;\n });\n }\n};\nMinimum2.className = \"Minimum\";\nserialization_exports.registerClass(Minimum2);\nvar Concatenate = class extends Merge {\n constructor(args) {\n super(args);\n this.DEFAULT_AXIS = -1;\n if (args == null) {\n args = {};\n }\n this.axis = args.axis == null ? this.DEFAULT_AXIS : args.axis;\n this.supportsMasking = true;\n this.reshapeRequired = false;\n }\n build(inputShape) {\n if (!(Array.isArray(inputShape) && Array.isArray(inputShape[0])) || inputShape.length === 1) {\n throw new ValueError(\"A `Concatenate` layer should be called on a list of at least 2 inputs\");\n }\n inputShape = inputShape;\n let allNoneShape = true;\n for (const shape of inputShape) {\n if (shape != null) {\n allNoneShape = false;\n break;\n }\n }\n if (allNoneShape) {\n return;\n }\n const shapeSet = [];\n for (let i = 0; i < inputShape.length; ++i) {\n const shapeWithoutConcatAxis = inputShape[i].slice();\n shapeWithoutConcatAxis.splice(this.axis, 1);\n let exists = false;\n for (const shape of shapeSet) {\n if (util_exports.arraysEqual(shape, shapeWithoutConcatAxis)) {\n exists = true;\n break;\n }\n }\n if (!exists) {\n shapeSet.push(shapeWithoutConcatAxis);\n }\n }\n if (shapeSet.length > 1) {\n throw new ValueError(\"A `Concatenate` layer requires inputs with matching shapes except for the concat axis. Got input shapes: \" + JSON.stringify(inputShape));\n }\n }\n mergeFunction(inputs) {\n return tidy(() => {\n return concatenate(inputs, this.axis);\n });\n }\n computeOutputShape(inputShape) {\n if (!(Array.isArray(inputShape) && Array.isArray(inputShape[0]))) {\n throw new ValueError(\"A `Concatenate` layer should be called on a list of inputs.\");\n }\n const inputShapes = inputShape;\n const outputShape = inputShapes[0].slice();\n const axis = this.axis < 0 ? outputShape.length + this.axis : this.axis;\n for (const shape of inputShapes.slice(1)) {\n if (outputShape[axis] == null || shape[axis] == null) {\n outputShape[axis] = null;\n break;\n }\n outputShape[axis] += shape[axis];\n }\n return outputShape;\n }\n computeMask(inputs, mask) {\n if (mask == null) {\n return null;\n }\n if (!Array.isArray(mask)) {\n throw new ValueError(\"`mask` should be an array for Concatenate\");\n }\n if (!Array.isArray(inputs)) {\n throw new ValueError(\"`inputs` should be an array for Concatenate\");\n }\n if (mask.length !== inputs.length) {\n throw new ValueError(`Mismatch in the length of mask (${mask.length}) and the legnth of inputs (${inputs.length})`);\n }\n return tidy(() => {\n let allNullMasks = true;\n mask.forEach((m) => {\n if (m != null) {\n allNullMasks = false;\n return;\n }\n });\n if (allNullMasks) {\n return null;\n }\n const outputMasks = [];\n for (let i = 0; i < inputs.length; ++i) {\n if (mask[i] == null) {\n outputMasks.push(cast(onesLike(inputs[i]), \"bool\"));\n } else if (mask[i].rank < inputs[i].rank) {\n outputMasks.push(expandDims(mask[i], -1));\n } else {\n outputMasks.push(mask[i]);\n }\n }\n const concatenatedMasks = concat(outputMasks, this.axis);\n return all(concatenatedMasks, -1, false);\n });\n }\n getConfig() {\n const config = {\n \"axis\": this.axis\n };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nConcatenate.className = \"Concatenate\";\nserialization_exports.registerClass(Concatenate);\nfunction interpretAxis(axis, dim) {\n while (axis < 0) {\n axis += dim;\n }\n return axis;\n}\nfunction batchDot(x, y, axes) {\n if (x.shape.length > 3 || y.shape.length > 3) {\n throw new NotImplementedError(\"batchDot is not implemented for tensors of 4D or higher rank yet\");\n }\n util_exports.assert(x.shape.length >= 2, () => `batchDot requires the rank of x to be >= 2, but got ${x.shape.length}`);\n util_exports.assert(x.shape.length >= 2, () => `batchDot requires the rank of y to be >= 2, but got ${y.shape.length}`);\n if (typeof axes === \"number\") {\n axes = [axes, axes];\n }\n if (x.dtype === \"complex64\" || y.dtype === \"complex64\") {\n throw new NotImplementedError(\"batchDot is not implemented for complex64-type Tensors yet.\");\n }\n const xNDim = x.shape.length;\n const yNDim = y.shape.length;\n if (axes == null) {\n axes = [xNDim - 1, yNDim - 2];\n }\n const axesArray = axes;\n return tidy(() => {\n let diff;\n if (xNDim > yNDim) {\n diff = xNDim - yNDim;\n const diffShape = [];\n for (let i = 0; i < diff; ++i) {\n diffShape.push(1);\n }\n y = reshape(y, y.shape.concat(diffShape));\n } else if (yNDim > xNDim) {\n diff = yNDim - xNDim;\n const diffShape = [];\n for (let i = 0; i < diff; ++i) {\n diffShape.push(1);\n }\n x = reshape(x, x.shape.concat(diffShape));\n } else {\n diff = 0;\n }\n let out;\n if (x.shape.length === 2 && y.shape.length === 2) {\n if (axesArray[0] === axesArray[1]) {\n out = sum2(mul(x, y), axesArray[0]);\n } else {\n out = sum2(mul(transpose(x, [1, 0]), y), axesArray[1]);\n }\n } else {\n const adjX = axesArray[0] !== x.shape.length - 1;\n const adjY = axesArray[1] === y.shape.length - 1;\n out = matMul(x, y, adjX, adjY);\n }\n if (diff > 0) {\n let idx;\n if (xNDim > yNDim) {\n idx = xNDim + yNDim - 3;\n } else {\n idx = xNDim - 1;\n }\n const squeezeAxes = [];\n for (let i = idx; i < idx + diff; ++i) {\n squeezeAxes.push(i);\n }\n out = squeeze(out, squeezeAxes);\n }\n if (out.shape.length === 1) {\n out = expandDims(out, 1);\n }\n return out;\n });\n}\nvar Dot = class extends Merge {\n constructor(args) {\n super(args);\n this.axes = args.axes;\n this.normalize = args.normalize == null ? false : args.normalize;\n this.supportsMasking = true;\n this.reshapeRequired = false;\n }\n build(inputShape) {\n util_exports.assert(Array.isArray(inputShape) && inputShape.length === 2 && Array.isArray(inputShape[0]) && Array.isArray(inputShape[1]), () => \"A `Dot` layer should be called on a list of exactly 2 inputs.\");\n const shape1 = inputShape[0];\n const shape2 = inputShape[1];\n if (shape1.length > 3 || shape2.length > 3) {\n throw new NotImplementedError(\"Dot layer does not support tensors of 4D or higher rank yet.\");\n }\n const axes = this.interpretAxes(shape1, shape2);\n if (shape1[axes[0]] !== shape2[axes[1]]) {\n throw new ValueError(`Dimension incompatibility: ${shape1[axes[0]]} !== ${shape2[axes[1]]}`);\n }\n }\n mergeFunction(inputs) {\n if (inputs.length !== 2) {\n throw new ValueError(`A \\`Dot\\` layer must be called on exactly 2 inputs, but received ${inputs.length} input(s).`);\n }\n let x1 = inputs[0];\n let x2 = inputs[1];\n let axes;\n if (!Array.isArray(this.axes)) {\n axes = [\n interpretAxis(this.axes, x1.shape.length),\n interpretAxis(this.axes, x2.shape.length)\n ];\n } else {\n axes = this.axes.map((axis, i) => interpretAxis(axis, inputs[i].shape.length));\n }\n if (this.normalize) {\n x1 = l2Normalize(x1, axes[0]);\n x2 = l2Normalize(x2, axes[1]);\n }\n return batchDot(x1, x2, axes);\n }\n interpretAxes(shape1, shape2) {\n let axes;\n if (!Array.isArray(this.axes)) {\n axes = [\n interpretAxis(this.axes, shape1.length),\n interpretAxis(this.axes, shape2.length)\n ];\n } else {\n axes = this.axes;\n }\n return axes;\n }\n computeOutputShape(inputShape) {\n util_exports.assert(Array.isArray(inputShape) && inputShape.length === 2 && Array.isArray(inputShape[0]) && Array.isArray(inputShape[1]), () => \"A `Dot` layer should be called on a list of exactly 2 inputs.\");\n const shape1 = inputShape[0].slice();\n const shape2 = inputShape[1].slice();\n if (shape1.length > 3 || shape2.length > 3) {\n throw new NotImplementedError(\"Dot layer does not support tensors of 4D or higher rank yet.\");\n }\n const axes = this.interpretAxes(shape1, shape2);\n shape1.splice(axes[0], 1);\n shape2.splice(axes[1], 1);\n shape2.splice(0, 1);\n const outputShape = shape1.concat(shape2);\n if (outputShape.length === 1) {\n outputShape.push(1);\n }\n return outputShape;\n }\n computeMask(inputs, mask) {\n return null;\n }\n getConfig() {\n const config = {\n \"axes\": this.axes,\n \"normalize\": this.normalize\n };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nDot.className = \"Dot\";\nserialization_exports.registerClass(Dot);\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/layers/noise.js\nvar GaussianNoise = class extends Layer {\n constructor(args) {\n super(args);\n this.supportsMasking = true;\n this.stddev = args.stddev;\n }\n computeOutputShape(inputShape) {\n return inputShape;\n }\n getConfig() {\n const baseConfig = super.getConfig();\n const config = { stddev: this.stddev };\n Object.assign(config, baseConfig);\n return config;\n }\n call(inputs, kwargs) {\n return tidy(() => {\n this.invokeCallHook(inputs, kwargs);\n const input2 = getExactlyOneTensor(inputs);\n const noised = () => add2(randomNormal2(input2.shape, 0, this.stddev), input2);\n const output = inTrainPhase(noised, () => input2, kwargs[\"training\"] || false);\n return output;\n });\n }\n};\nGaussianNoise.className = \"GaussianNoise\";\nserialization_exports.registerClass(GaussianNoise);\nvar GaussianDropout = class extends Layer {\n constructor(args) {\n super(args);\n this.supportsMasking = true;\n this.rate = args.rate;\n }\n computeOutputShape(inputShape) {\n return inputShape;\n }\n getConfig() {\n const baseConfig = super.getConfig();\n const config = { rate: this.rate };\n Object.assign(config, baseConfig);\n return config;\n }\n call(inputs, kwargs) {\n return tidy(() => {\n this.invokeCallHook(inputs, kwargs);\n const input2 = getExactlyOneTensor(inputs);\n if (this.rate > 0 && this.rate < 1) {\n const noised = () => {\n const stddev = Math.sqrt(this.rate / (1 - this.rate));\n return mul(input2, randomNormal2(input2.shape, 1, stddev));\n };\n return inTrainPhase(noised, () => input2, kwargs[\"training\"] || false);\n }\n return input2;\n });\n }\n};\nGaussianDropout.className = \"GaussianDropout\";\nserialization_exports.registerClass(GaussianDropout);\nvar AlphaDropout = class extends Layer {\n constructor(args) {\n super(args);\n this.supportsMasking = true;\n this.rate = args.rate;\n this.noiseShape = args.noiseShape;\n }\n _getNoiseShape(inputs) {\n return this.noiseShape || getExactlyOneTensor(inputs).shape;\n }\n computeOutputShape(inputShape) {\n return inputShape;\n }\n getConfig() {\n const baseConfig = super.getConfig();\n const config = { rate: this.rate };\n Object.assign(config, baseConfig);\n return config;\n }\n call(inputs, kwargs) {\n return tidy(() => {\n if (this.rate < 1 && this.rate > 0) {\n const noiseShape = this._getNoiseShape(inputs);\n const droppedInputs = () => {\n const input2 = getExactlyOneTensor(inputs);\n const alpha = 1.6732632423543772;\n const scale2 = 1.0507009873554805;\n const alphaP = -alpha * scale2;\n let keptIdx = greaterEqual(randomUniform(noiseShape), this.rate);\n keptIdx = cast2(keptIdx, \"float32\");\n const a = ((1 - this.rate) * (1 + this.rate * alphaP ** 2)) ** -0.5;\n const b = -a * alphaP * this.rate;\n const x = add2(mul(input2, keptIdx), mul(add2(keptIdx, -1), alphaP));\n return add2(mul(x, a), b);\n };\n return inTrainPhase(droppedInputs, () => getExactlyOneTensor(inputs), kwargs[\"training\"] || false);\n }\n return inputs;\n });\n }\n};\nAlphaDropout.className = \"AlphaDropout\";\nserialization_exports.registerClass(AlphaDropout);\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/layers/normalization.js\nfunction batchNormalization(x, mean5, variance, beta, gamma, epsilon3 = 1e-3) {\n let out;\n if (x.rank === 2) {\n out = batchNorm2d(x, mean5, variance, beta, gamma, epsilon3);\n } else if (x.rank === 3) {\n out = batchNorm3d(x, mean5, variance, beta, gamma, epsilon3);\n } else if (x.rank === 4) {\n out = batchNorm4d(x, mean5, variance, beta, gamma, epsilon3);\n } else {\n throw new NotImplementedError(`batchNormalization is not implemented for array of rank ${x.rank} yet`);\n }\n return out;\n}\nfunction regularNormalizeBatchInTraining(x, gamma, beta, reductionAxes, epsilon3 = 1e-3) {\n return tidy(() => {\n const meanAndVariance = moments(x, reductionAxes);\n const mean5 = meanAndVariance.mean;\n const variance = meanAndVariance.variance;\n const normed = batchNormalization(x, mean5, variance, beta, gamma, epsilon3);\n return [normed, mean5, variance];\n });\n}\nfunction broadcastNormalizeBatchInTraining(x, gamma, beta, reductionAxes, epsilon3 = 1e-3) {\n return tidy(() => {\n const meanAndVariance = moments(x, reductionAxes);\n const mean5 = meanAndVariance.mean;\n const variance = meanAndVariance.variance;\n const targetShape = [];\n for (const axis of range2(0, x.rank)) {\n if (reductionAxes.indexOf(axis) !== -1) {\n targetShape.push(1);\n } else {\n targetShape.push(x.shape[axis]);\n }\n }\n const broadcastMean = reshape(mean5, targetShape);\n const broadcastVariance = reshape(variance, targetShape);\n const broadcastGamma = gamma == null ? null : reshape(gamma, targetShape);\n const broadcastBeta = beta == null ? null : reshape(beta, targetShape);\n const normed = batchNormalization(x, broadcastMean, broadcastVariance, broadcastBeta, broadcastGamma, epsilon3);\n return [normed, mean5, variance];\n });\n}\nfunction normalizeBatchInTraining(x, gamma, beta, reductionAxes, epsilon3 = 1e-3) {\n if (util_exports.arraysEqual(reductionAxes.slice().sort(), range2(0, x.rank - 1))) {\n return regularNormalizeBatchInTraining(x, gamma, beta, reductionAxes, epsilon3);\n } else {\n return broadcastNormalizeBatchInTraining(x, gamma, beta, reductionAxes, epsilon3);\n }\n}\nvar BatchNormalization = class extends Layer {\n constructor(args) {\n if (args == null) {\n args = {};\n }\n super(args);\n this.supportsMasking = true;\n this.axis = args.axis == null ? -1 : args.axis;\n this.momentum = args.momentum == null ? 0.99 : args.momentum;\n this.epsilon = args.epsilon == null ? 1e-3 : args.epsilon;\n this.center = args.center == null ? true : args.center;\n this.scale = args.scale == null ? true : args.scale;\n this.betaInitializer = getInitializer(args.betaInitializer || \"zeros\");\n this.gammaInitializer = getInitializer(args.gammaInitializer || \"ones\");\n this.movingMeanInitializer = getInitializer(args.movingMeanInitializer || \"zeros\");\n this.movingVarianceInitializer = getInitializer(args.movingVarianceInitializer || \"ones\");\n this.betaConstraint = getConstraint(args.betaConstraint);\n this.gammaConstraint = getConstraint(args.gammaConstraint);\n this.betaRegularizer = getRegularizer(args.betaRegularizer);\n this.gammaRegularizer = getRegularizer(args.gammaRegularizer);\n }\n build(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n const axis = this.axis >= 0 ? this.axis : this.axis + inputShape.length;\n const dim = inputShape[axis];\n if (dim == null) {\n throw new ValueError(`Axis ${axis} of input tensor should have a defined dimension but the layer received an input with shape ${JSON.stringify(inputShape)}.`);\n }\n this.inputSpec = [new InputSpec({ ndim: inputShape.length, axes: { [axis]: dim } })];\n const shape = [dim];\n if (this.scale) {\n this.gamma = this.addWeight(\"gamma\", shape, null, this.gammaInitializer, this.gammaRegularizer, true, this.gammaConstraint);\n }\n if (this.center) {\n this.beta = this.addWeight(\"beta\", shape, null, this.betaInitializer, this.betaRegularizer, true, this.betaConstraint);\n }\n this.movingMean = this.addWeight(\"moving_mean\", shape, null, this.movingMeanInitializer, null, false);\n this.movingVariance = this.addWeight(\"moving_variance\", shape, null, this.movingVarianceInitializer, null, false);\n this.built = true;\n }\n call(inputs, kwargs) {\n return tidy(() => {\n const training = kwargs[\"training\"] == null ? false : kwargs[\"training\"];\n const input2 = getExactlyOneTensor(inputs);\n const inputShape = input2.shape;\n const ndim = inputShape.length;\n const reductionAxes = range2(0, ndim);\n const axis = this.axis >= 0 ? this.axis : this.axis + ndim;\n reductionAxes.splice(axis, 1);\n const broadcastShape = pyListRepeat(1, ndim);\n broadcastShape[axis] = inputShape[axis];\n const sortedReductionAxes = reductionAxes.slice();\n sortedReductionAxes.sort();\n const needsBroadcasting = !util_exports.arraysEqual(sortedReductionAxes, range2(0, ndim).slice(0, ndim - 1));\n const normalizeInference = () => {\n if (needsBroadcasting) {\n const broadcastMovingMean = reshape(this.movingMean.read(), broadcastShape);\n const broadcastMovingVariance = reshape(this.movingVariance.read(), broadcastShape);\n const broadcastBeta = this.center ? reshape(this.beta.read(), broadcastShape) : null;\n const broadcastGamma = this.scale ? reshape(this.gamma.read(), broadcastShape) : null;\n return batchNormalization(input2, broadcastMovingMean, broadcastMovingVariance, broadcastBeta, broadcastGamma, this.epsilon);\n } else {\n return batchNormalization(input2, this.movingMean.read(), this.movingVariance.read(), this.beta == null ? null : this.beta.read(), this.gamma == null ? null : this.gamma.read(), this.epsilon);\n }\n };\n if (!training) {\n return normalizeInference();\n }\n const [normedTraining, mean5, variance] = normalizeBatchInTraining(input2, this.gamma.read(), this.beta.read(), reductionAxes, this.epsilon);\n const doMovingAverage = (variable2, value, momentum) => {\n tidy(() => {\n const decay = 1 - momentum;\n const origValue = variable2.read();\n const updateDelta = mul(sub(origValue, value), decay);\n variable2.write(sub(origValue, updateDelta));\n });\n };\n const updateMovingMeanAndVariance = () => {\n doMovingAverage(this.movingMean, mean5, this.momentum);\n doMovingAverage(this.movingVariance, variance, this.momentum);\n };\n updateMovingMeanAndVariance();\n return normedTraining;\n });\n }\n getConfig() {\n const config = {\n axis: this.axis,\n momentum: this.momentum,\n epsilon: this.epsilon,\n center: this.center,\n scale: this.scale,\n betaInitializer: serializeInitializer(this.betaInitializer),\n gammaInitializer: serializeInitializer(this.gammaInitializer),\n movingMeanInitializer: serializeInitializer(this.movingMeanInitializer),\n movingVarianceInitializer: serializeInitializer(this.movingVarianceInitializer),\n betaRegularizer: serializeRegularizer(this.betaRegularizer),\n gammaRegularizer: serializeRegularizer(this.gammaRegularizer),\n betaConstraint: serializeConstraint(this.betaConstraint),\n gammaConstraint: serializeConstraint(this.gammaConstraint)\n };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nBatchNormalization.className = \"BatchNormalization\";\nserialization_exports.registerClass(BatchNormalization);\nvar LayerNormalization = class extends Layer {\n constructor(args) {\n if (args == null) {\n args = {};\n }\n super(args);\n this.axis = args.axis == null ? -1 : args.axis;\n if (typeof this.axis === \"number\") {\n if (!Number.isInteger(this.axis)) {\n throw new Error(`Expected axis to be an integer, but received ${this.axis}`);\n }\n } else if (Array.isArray(this.axis)) {\n for (const axis of this.axis) {\n if (!Number.isInteger(axis)) {\n throw new Error(`Expected axis to be an array of integers, but received ${JSON.stringify(this.axis)}`);\n }\n }\n } else {\n throw new Error(`Expected axis to be an integer or an array of integers, but received ${JSON.stringify(this.axis)}`);\n }\n this.epsilon = args.epsilon == null ? 1e-3 : args.epsilon;\n this.center = args.center == null ? true : args.center;\n this.scale = args.scale == null ? true : args.scale;\n this.betaInitializer = getInitializer(args.betaInitializer || \"zeros\");\n this.gammaInitializer = getInitializer(args.gammaInitializer || \"ones\");\n this.betaRegularizer = getRegularizer(args.betaRegularizer);\n this.gammaRegularizer = getRegularizer(args.gammaRegularizer);\n this.supportsMasking = true;\n }\n build(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n const nDims = inputShape.length;\n if (typeof this.axis === \"number\") {\n this.axis = [this.axis];\n }\n for (let i = 0; i < this.axis.length; ++i) {\n if (this.axis[i] < 0) {\n this.axis[i] += nDims;\n }\n }\n for (const axis of this.axis) {\n if (axis < 0 || axis >= nDims) {\n throw new Error(`Invalid axis: ${axis}`);\n }\n }\n if (this.axis.length !== unique2(this.axis).length) {\n throw new Error(`Found duplicate axes in: ${this.axis}`);\n }\n const paramShape = this.axis.map((axis) => inputShape[axis]);\n const trainable = true;\n if (this.scale) {\n this.gamma = this.addWeight(\"gamma\", paramShape, \"float32\", this.gammaInitializer, this.gammaRegularizer, trainable);\n } else {\n this.gamma = null;\n }\n if (this.center) {\n this.beta = this.addWeight(\"beta\", paramShape, \"float32\", this.betaInitializer, this.betaRegularizer, trainable);\n } else {\n this.beta = null;\n }\n this.built = true;\n }\n call(inputs, kwargs) {\n const input2 = getExactlyOneTensor(inputs);\n const inputShape = input2.shape;\n const nDims = inputShape.length;\n return tidy(() => {\n const keepDims = true;\n let { mean: mean5, variance } = moments(input2, this.axis, keepDims);\n const broadcastShape = pyListRepeat(1, nDims);\n for (const dim of this.axis) {\n broadcastShape[dim] = inputShape[dim];\n }\n const broadcast = (v) => {\n if (v != null && v.shape.length !== nDims) {\n return reshape(v, broadcastShape);\n } else {\n return v;\n }\n };\n let scale2 = this.scale ? broadcast(this.gamma.read()) : null;\n let offset = this.center ? broadcast(this.beta.read()) : null;\n const momentsTiling = [];\n const scaleOffsetTiling = [];\n for (let i = 0; i < nDims; ++i) {\n if (this.axis.indexOf(i) !== -1) {\n momentsTiling.push(inputShape[i]);\n scaleOffsetTiling.push(1);\n } else {\n momentsTiling.push(1);\n scaleOffsetTiling.push(inputShape[i]);\n }\n }\n mean5 = tile(mean5, momentsTiling);\n variance = tile(variance, momentsTiling);\n if (scale2 != null) {\n scale2 = tile(scale2, scaleOffsetTiling);\n }\n if (offset != null) {\n offset = tile(offset, scaleOffsetTiling);\n }\n return batchNormalization(input2, mean5, variance, offset, scale2, this.epsilon);\n });\n }\n getConfig() {\n const config = {\n axis: this.axis,\n epsilon: this.epsilon,\n center: this.center,\n scale: this.scale,\n betaInitializer: serializeInitializer(this.betaInitializer),\n gammaInitializer: serializeInitializer(this.gammaInitializer),\n betaRegularizer: serializeRegularizer(this.betaRegularizer),\n gammaRegularizer: serializeRegularizer(this.gammaRegularizer)\n };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nLayerNormalization.className = \"LayerNormalization\";\nserialization_exports.registerClass(LayerNormalization);\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/layers/padding.js\nfunction spatial2dPadding(x, padding, dataFormat) {\n return tidy(() => {\n if (x.rank !== 4) {\n throw new ValueError(`temporalPadding expects input tensor to be 4-D, but received a ${x.rank}-D tensor.`);\n }\n if (padding == null) {\n padding = [[1, 1], [1, 1]];\n }\n if (padding.length !== 2 || padding[0].length !== 2 || padding[1].length !== 2) {\n throw new ValueError(\"spatial2dPadding expects `padding` to be an Array of two Arrays, each of which is an Array of two integers.\");\n }\n if (dataFormat == null) {\n dataFormat = imageDataFormat();\n }\n if (dataFormat !== \"channelsLast\" && dataFormat !== \"channelsFirst\") {\n throw new ValueError(`Unknown data format: ${dataFormat}. Supported data formats are 'channelsLast' and 'channelsFirst.`);\n }\n let pattern;\n if (dataFormat === \"channelsFirst\") {\n pattern = [[0, 0], [0, 0], padding[0], padding[1]];\n } else {\n pattern = [[0, 0], padding[0], padding[1], [0, 0]];\n }\n return pad(x, pattern);\n });\n}\nvar ZeroPadding2D = class extends Layer {\n constructor(args) {\n if (args == null) {\n args = {};\n }\n super(args);\n this.dataFormat = args.dataFormat == null ? imageDataFormat() : args.dataFormat;\n if (args.padding == null) {\n this.padding = [[1, 1], [1, 1]];\n } else if (typeof args.padding === \"number\") {\n this.padding = [[args.padding, args.padding], [args.padding, args.padding]];\n } else {\n args.padding = args.padding;\n if (args.padding.length !== 2) {\n throw new ValueError(`ZeroPadding2D expects padding to be a length-2 array, but received a length-${args.padding.length} array.`);\n }\n let heightPadding;\n let widthPadding;\n if (typeof args.padding[0] === \"number\") {\n heightPadding = [args.padding[0], args.padding[0]];\n widthPadding = [args.padding[1], args.padding[1]];\n } else {\n args.padding = args.padding;\n if (args.padding[0].length !== 2) {\n throw new ValueError(`ZeroPadding2D expects height padding to be a length-2 array, but received a length-${args.padding[0].length} array.`);\n }\n heightPadding = args.padding[0];\n if (args.padding[1].length !== 2) {\n throw new ValueError(`ZeroPadding2D expects width padding to be a length-2 array, but received a length-${args.padding[1].length} array.`);\n }\n widthPadding = args.padding[1];\n }\n this.padding = [heightPadding, widthPadding];\n }\n this.inputSpec = [new InputSpec({ ndim: 4 })];\n }\n computeOutputShape(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n let rows;\n let cols;\n if (this.dataFormat === \"channelsFirst\") {\n if (inputShape[2] != null && inputShape[2] >= 0) {\n rows = inputShape[2] + this.padding[0][0] + this.padding[0][1];\n } else {\n rows = null;\n }\n if (inputShape[3] != null && inputShape[3] >= 0) {\n cols = inputShape[3] + this.padding[1][0] + this.padding[1][1];\n } else {\n cols = null;\n }\n return [inputShape[0], inputShape[1], rows, cols];\n } else {\n if (inputShape[1] != null && inputShape[1] >= 0) {\n rows = inputShape[1] + this.padding[0][0] + this.padding[0][1];\n } else {\n rows = null;\n }\n if (inputShape[2] != null && inputShape[2] >= 0) {\n cols = inputShape[2] + this.padding[1][0] + this.padding[1][1];\n } else {\n cols = null;\n }\n return [inputShape[0], rows, cols, inputShape[3]];\n }\n }\n call(inputs, kwargs) {\n return tidy(() => spatial2dPadding(getExactlyOneTensor(inputs), this.padding, this.dataFormat));\n }\n getConfig() {\n const config = {\n padding: this.padding,\n dataFormat: this.dataFormat\n };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nZeroPadding2D.className = \"ZeroPadding2D\";\nserialization_exports.registerClass(ZeroPadding2D);\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/layers/pooling.js\nfunction pool2d(x, poolSize, strides, padding, dataFormat, poolMode) {\n return tidy(() => {\n checkDataFormat(dataFormat);\n checkPoolMode(poolMode);\n checkPaddingMode(padding);\n if (strides == null) {\n strides = [1, 1];\n }\n if (padding == null) {\n padding = \"valid\";\n }\n if (dataFormat == null) {\n dataFormat = imageDataFormat();\n }\n if (poolMode == null) {\n poolMode = \"max\";\n }\n x = preprocessConv2DInput(x, dataFormat);\n let y;\n const paddingString = padding === \"same\" ? \"same\" : \"valid\";\n if (poolMode === \"max\") {\n y = maxPool(x, poolSize, strides, paddingString);\n } else {\n y = avgPool(\n x,\n poolSize,\n strides,\n paddingString\n );\n }\n if (dataFormat === \"channelsFirst\") {\n y = transpose(y, [0, 3, 1, 2]);\n }\n return y;\n });\n}\nfunction pool3d(x, poolSize, strides, padding, dataFormat, poolMode) {\n return tidy(() => {\n checkDataFormat(dataFormat);\n checkPoolMode(poolMode);\n checkPaddingMode(padding);\n if (strides == null) {\n strides = [1, 1, 1];\n }\n if (padding == null) {\n padding = \"valid\";\n }\n if (dataFormat == null) {\n dataFormat = imageDataFormat();\n }\n if (poolMode == null) {\n poolMode = \"max\";\n }\n x = preprocessConv3DInput(x, dataFormat);\n let y;\n const paddingString = padding === \"same\" ? \"same\" : \"valid\";\n if (poolMode === \"max\") {\n y = maxPool3d(x, poolSize, strides, paddingString);\n } else {\n y = avgPool3d(x, poolSize, strides, paddingString);\n }\n if (dataFormat === \"channelsFirst\") {\n y = transpose(y, [0, 4, 1, 2, 3]);\n }\n return y;\n });\n}\nvar Pooling1D = class extends Layer {\n constructor(args) {\n if (args.poolSize == null) {\n args.poolSize = 2;\n }\n super(args);\n if (typeof args.poolSize === \"number\") {\n this.poolSize = [args.poolSize];\n } else if (Array.isArray(args.poolSize) && args.poolSize.length === 1 && typeof args.poolSize[0] === \"number\") {\n this.poolSize = args.poolSize;\n } else {\n throw new ValueError(`poolSize for 1D convolutional layer must be a number or an Array of a single number, but received ${JSON.stringify(args.poolSize)}`);\n }\n assertPositiveInteger(this.poolSize, \"poolSize\");\n if (args.strides == null) {\n this.strides = this.poolSize;\n } else {\n if (typeof args.strides === \"number\") {\n this.strides = [args.strides];\n } else if (Array.isArray(args.strides) && args.strides.length === 1 && typeof args.strides[0] === \"number\") {\n this.strides = args.strides;\n } else {\n throw new ValueError(`strides for 1D convolutional layer must be a number or an Array of a single number, but received ${JSON.stringify(args.strides)}`);\n }\n }\n assertPositiveInteger(this.strides, \"strides\");\n this.padding = args.padding == null ? \"valid\" : args.padding;\n checkPaddingMode(this.padding);\n this.inputSpec = [new InputSpec({ ndim: 3 })];\n }\n computeOutputShape(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n const length = convOutputLength(inputShape[1], this.poolSize[0], this.padding, this.strides[0]);\n return [inputShape[0], length, inputShape[2]];\n }\n call(inputs, kwargs) {\n return tidy(() => {\n this.invokeCallHook(inputs, kwargs);\n inputs = expandDims2(getExactlyOneTensor(inputs), 2);\n const output = this.poolingFunction(getExactlyOneTensor(inputs), [this.poolSize[0], 1], [this.strides[0], 1], this.padding, \"channelsLast\");\n return squeeze(output, [2]);\n });\n }\n getConfig() {\n const config = {\n poolSize: this.poolSize,\n padding: this.padding,\n strides: this.strides\n };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nvar MaxPooling1D = class extends Pooling1D {\n constructor(args) {\n super(args);\n }\n poolingFunction(inputs, poolSize, strides, padding, dataFormat) {\n checkDataFormat(dataFormat);\n checkPaddingMode(padding);\n return pool2d(inputs, poolSize, strides, padding, dataFormat, \"max\");\n }\n};\nMaxPooling1D.className = \"MaxPooling1D\";\nserialization_exports.registerClass(MaxPooling1D);\nvar AveragePooling1D = class extends Pooling1D {\n constructor(args) {\n super(args);\n }\n poolingFunction(inputs, poolSize, strides, padding, dataFormat) {\n checkDataFormat(dataFormat);\n checkPaddingMode(padding);\n return pool2d(inputs, poolSize, strides, padding, dataFormat, \"avg\");\n }\n};\nAveragePooling1D.className = \"AveragePooling1D\";\nserialization_exports.registerClass(AveragePooling1D);\nvar Pooling2D = class extends Layer {\n constructor(args) {\n if (args.poolSize == null) {\n args.poolSize = [2, 2];\n }\n super(args);\n this.poolSize = Array.isArray(args.poolSize) ? args.poolSize : [args.poolSize, args.poolSize];\n if (args.strides == null) {\n this.strides = this.poolSize;\n } else if (Array.isArray(args.strides)) {\n if (args.strides.length !== 2) {\n throw new ValueError(`If the strides property of a 2D pooling layer is an Array, it is expected to have a length of 2, but received length ${args.strides.length}.`);\n }\n this.strides = args.strides;\n } else {\n this.strides = [args.strides, args.strides];\n }\n assertPositiveInteger(this.poolSize, \"poolSize\");\n assertPositiveInteger(this.strides, \"strides\");\n this.padding = args.padding == null ? \"valid\" : args.padding;\n this.dataFormat = args.dataFormat == null ? \"channelsLast\" : args.dataFormat;\n checkDataFormat(this.dataFormat);\n checkPaddingMode(this.padding);\n this.inputSpec = [new InputSpec({ ndim: 4 })];\n }\n computeOutputShape(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n let rows = this.dataFormat === \"channelsFirst\" ? inputShape[2] : inputShape[1];\n let cols = this.dataFormat === \"channelsFirst\" ? inputShape[3] : inputShape[2];\n rows = convOutputLength(rows, this.poolSize[0], this.padding, this.strides[0]);\n cols = convOutputLength(cols, this.poolSize[1], this.padding, this.strides[1]);\n if (this.dataFormat === \"channelsFirst\") {\n return [inputShape[0], inputShape[1], rows, cols];\n } else {\n return [inputShape[0], rows, cols, inputShape[3]];\n }\n }\n call(inputs, kwargs) {\n return tidy(() => {\n this.invokeCallHook(inputs, kwargs);\n return this.poolingFunction(getExactlyOneTensor(inputs), this.poolSize, this.strides, this.padding, this.dataFormat);\n });\n }\n getConfig() {\n const config = {\n poolSize: this.poolSize,\n padding: this.padding,\n strides: this.strides,\n dataFormat: this.dataFormat\n };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nvar MaxPooling2D = class extends Pooling2D {\n constructor(args) {\n super(args);\n }\n poolingFunction(inputs, poolSize, strides, padding, dataFormat) {\n checkDataFormat(dataFormat);\n checkPaddingMode(padding);\n return pool2d(inputs, poolSize, strides, padding, dataFormat, \"max\");\n }\n};\nMaxPooling2D.className = \"MaxPooling2D\";\nserialization_exports.registerClass(MaxPooling2D);\nvar AveragePooling2D = class extends Pooling2D {\n constructor(args) {\n super(args);\n }\n poolingFunction(inputs, poolSize, strides, padding, dataFormat) {\n checkDataFormat(dataFormat);\n checkPaddingMode(padding);\n return pool2d(inputs, poolSize, strides, padding, dataFormat, \"avg\");\n }\n};\nAveragePooling2D.className = \"AveragePooling2D\";\nserialization_exports.registerClass(AveragePooling2D);\nvar Pooling3D = class extends Layer {\n constructor(args) {\n if (args.poolSize == null) {\n args.poolSize = [2, 2, 2];\n }\n super(args);\n this.poolSize = Array.isArray(args.poolSize) ? args.poolSize : [args.poolSize, args.poolSize, args.poolSize];\n if (args.strides == null) {\n this.strides = this.poolSize;\n } else if (Array.isArray(args.strides)) {\n if (args.strides.length !== 3) {\n throw new ValueError(`If the strides property of a 3D pooling layer is an Array, it is expected to have a length of 3, but received length ${args.strides.length}.`);\n }\n this.strides = args.strides;\n } else {\n this.strides = [args.strides, args.strides, args.strides];\n }\n assertPositiveInteger(this.poolSize, \"poolSize\");\n assertPositiveInteger(this.strides, \"strides\");\n this.padding = args.padding == null ? \"valid\" : args.padding;\n this.dataFormat = args.dataFormat == null ? \"channelsLast\" : args.dataFormat;\n checkDataFormat(this.dataFormat);\n checkPaddingMode(this.padding);\n this.inputSpec = [new InputSpec({ ndim: 5 })];\n }\n computeOutputShape(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n let depths = this.dataFormat === \"channelsFirst\" ? inputShape[2] : inputShape[1];\n let rows = this.dataFormat === \"channelsFirst\" ? inputShape[3] : inputShape[2];\n let cols = this.dataFormat === \"channelsFirst\" ? inputShape[4] : inputShape[3];\n depths = convOutputLength(depths, this.poolSize[0], this.padding, this.strides[0]);\n rows = convOutputLength(rows, this.poolSize[1], this.padding, this.strides[1]);\n cols = convOutputLength(cols, this.poolSize[2], this.padding, this.strides[2]);\n if (this.dataFormat === \"channelsFirst\") {\n return [inputShape[0], inputShape[1], depths, rows, cols];\n } else {\n return [inputShape[0], depths, rows, cols, inputShape[4]];\n }\n }\n call(inputs, kwargs) {\n return tidy(() => {\n this.invokeCallHook(inputs, kwargs);\n return this.poolingFunction(getExactlyOneTensor(inputs), this.poolSize, this.strides, this.padding, this.dataFormat);\n });\n }\n getConfig() {\n const config = {\n poolSize: this.poolSize,\n padding: this.padding,\n strides: this.strides,\n dataFormat: this.dataFormat\n };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nvar MaxPooling3D = class extends Pooling3D {\n constructor(args) {\n super(args);\n }\n poolingFunction(inputs, poolSize, strides, padding, dataFormat) {\n checkDataFormat(dataFormat);\n checkPaddingMode(padding);\n return pool3d(inputs, poolSize, strides, padding, dataFormat, \"max\");\n }\n};\nMaxPooling3D.className = \"MaxPooling3D\";\nserialization_exports.registerClass(MaxPooling3D);\nvar AveragePooling3D = class extends Pooling3D {\n constructor(args) {\n super(args);\n }\n poolingFunction(inputs, poolSize, strides, padding, dataFormat) {\n checkDataFormat(dataFormat);\n checkPaddingMode(padding);\n return pool3d(inputs, poolSize, strides, padding, dataFormat, \"avg\");\n }\n};\nAveragePooling3D.className = \"AveragePooling3D\";\nserialization_exports.registerClass(AveragePooling3D);\nvar GlobalPooling1D = class extends Layer {\n constructor(args) {\n super(args);\n this.inputSpec = [new InputSpec({ ndim: 3 })];\n }\n computeOutputShape(inputShape) {\n return [inputShape[0], inputShape[2]];\n }\n call(inputs, kwargs) {\n throw new NotImplementedError();\n }\n};\nvar GlobalAveragePooling1D = class extends GlobalPooling1D {\n constructor(args) {\n super(args || {});\n }\n call(inputs, kwargs) {\n return tidy(() => {\n const input2 = getExactlyOneTensor(inputs);\n return mean(input2, 1);\n });\n }\n};\nGlobalAveragePooling1D.className = \"GlobalAveragePooling1D\";\nserialization_exports.registerClass(GlobalAveragePooling1D);\nvar GlobalMaxPooling1D = class extends GlobalPooling1D {\n constructor(args) {\n super(args || {});\n }\n call(inputs, kwargs) {\n return tidy(() => {\n const input2 = getExactlyOneTensor(inputs);\n return max(input2, 1);\n });\n }\n};\nGlobalMaxPooling1D.className = \"GlobalMaxPooling1D\";\nserialization_exports.registerClass(GlobalMaxPooling1D);\nvar GlobalPooling2D = class extends Layer {\n constructor(args) {\n super(args);\n this.dataFormat = args.dataFormat == null ? \"channelsLast\" : args.dataFormat;\n checkDataFormat(this.dataFormat);\n this.inputSpec = [new InputSpec({ ndim: 4 })];\n }\n computeOutputShape(inputShape) {\n inputShape = inputShape;\n if (this.dataFormat === \"channelsLast\") {\n return [inputShape[0], inputShape[3]];\n } else {\n return [inputShape[0], inputShape[1]];\n }\n }\n call(inputs, kwargs) {\n throw new NotImplementedError();\n }\n getConfig() {\n const config = { dataFormat: this.dataFormat };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nvar GlobalAveragePooling2D = class extends GlobalPooling2D {\n call(inputs, kwargs) {\n return tidy(() => {\n const input2 = getExactlyOneTensor(inputs);\n if (this.dataFormat === \"channelsLast\") {\n return mean(input2, [1, 2]);\n } else {\n return mean(input2, [2, 3]);\n }\n });\n }\n};\nGlobalAveragePooling2D.className = \"GlobalAveragePooling2D\";\nserialization_exports.registerClass(GlobalAveragePooling2D);\nvar GlobalMaxPooling2D = class extends GlobalPooling2D {\n call(inputs, kwargs) {\n return tidy(() => {\n const input2 = getExactlyOneTensor(inputs);\n if (this.dataFormat === \"channelsLast\") {\n return max(input2, [1, 2]);\n } else {\n return max(input2, [2, 3]);\n }\n });\n }\n};\nGlobalMaxPooling2D.className = \"GlobalMaxPooling2D\";\nserialization_exports.registerClass(GlobalMaxPooling2D);\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/layers/wrappers.js\nvar Wrapper = class extends Layer {\n constructor(args) {\n super(args);\n this.layer = args.layer;\n }\n build(inputShape) {\n this.built = true;\n }\n get trainable() {\n if (this.layer != null) {\n return this.layer.trainable;\n } else {\n return false;\n }\n }\n set trainable(value) {\n if (this.layer != null) {\n this.layer.trainable = value;\n }\n }\n get trainableWeights() {\n return this.layer.trainableWeights;\n }\n get nonTrainableWeights() {\n return this.layer.nonTrainableWeights;\n }\n get updates() {\n return this.layer._updates;\n }\n get losses() {\n return this.layer.losses;\n }\n getWeights() {\n return this.layer.getWeights();\n }\n setWeights(weights) {\n this.layer.setWeights(weights);\n }\n getConfig() {\n const config = {\n \"layer\": {\n \"className\": this.layer.getClassName(),\n \"config\": this.layer.getConfig()\n }\n };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n setFastWeightInitDuringBuild(value) {\n super.setFastWeightInitDuringBuild(value);\n if (this.layer != null) {\n this.layer.setFastWeightInitDuringBuild(value);\n }\n }\n static fromConfig(cls, config, customObjects = {}) {\n const layerConfig = config[\"layer\"];\n const layer = deserialize(layerConfig, customObjects);\n delete config[\"layer\"];\n const newConfig = { layer };\n Object.assign(newConfig, config);\n return new cls(newConfig);\n }\n};\nvar TimeDistributed = class extends Wrapper {\n constructor(args) {\n super(args);\n this.supportsMasking = true;\n }\n build(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n if (inputShape.length < 3) {\n throw new ValueError(`TimeDistributed layer expects an input shape >= 3D, but received input shape ${JSON.stringify(inputShape)}`);\n }\n this.inputSpec = [{ shape: inputShape }];\n const childInputShape = [inputShape[0]].concat(inputShape.slice(2));\n if (!this.layer.built) {\n this.layer.build(childInputShape);\n this.layer.built = true;\n }\n super.build(inputShape);\n }\n computeOutputShape(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n const childInputShape = [inputShape[0]].concat(inputShape.slice(2));\n const childOutputShape = this.layer.computeOutputShape(childInputShape);\n const timesteps = inputShape[1];\n return [childOutputShape[0], timesteps].concat(childOutputShape.slice(1));\n }\n call(inputs, kwargs) {\n return tidy(() => {\n inputs = getExactlyOneTensor(inputs);\n const step5 = (inputs2, states) => {\n const output = getExactlyOneTensor(this.layer.call(inputs2, kwargs));\n return [output, []];\n };\n const rnnOutputs = rnn(step5, inputs, [], false, null, null, false, true);\n const y = rnnOutputs[1];\n return y;\n });\n }\n};\nTimeDistributed.className = \"TimeDistributed\";\nserialization_exports.registerClass(TimeDistributed);\nfunction checkBidirectionalMergeMode(value) {\n checkStringTypeUnionValue(VALID_BIDIRECTIONAL_MERGE_MODES, \"BidirectionalMergeMode\", value);\n}\nvar DEFAULT_BIDIRECTIONAL_MERGE_MODE = \"concat\";\nvar Bidirectional = class extends Wrapper {\n constructor(args) {\n super(args);\n const layerConfig = args.layer.getConfig();\n const forwDict = {};\n forwDict[\"className\"] = args.layer.getClassName();\n forwDict[\"config\"] = layerConfig;\n this.forwardLayer = deserialize(forwDict);\n layerConfig[\"goBackwards\"] = layerConfig[\"goBackwards\"] === true ? false : true;\n const backDict = {};\n backDict[\"className\"] = args.layer.getClassName();\n backDict[\"config\"] = layerConfig;\n this.backwardLayer = deserialize(backDict);\n this.forwardLayer.name = \"forward_\" + this.forwardLayer.name;\n this.backwardLayer.name = \"backward_\" + this.backwardLayer.name;\n this.mergeMode = args.mergeMode === void 0 ? DEFAULT_BIDIRECTIONAL_MERGE_MODE : args.mergeMode;\n checkBidirectionalMergeMode(this.mergeMode);\n if (args.weights) {\n throw new NotImplementedError(\"weights support is not implemented for Bidirectional layer yet.\");\n }\n this._stateful = args.layer.stateful;\n this.returnSequences = args.layer.returnSequences;\n this.returnState = args.layer.returnState;\n this.supportsMasking = true;\n this._trainable = true;\n this.inputSpec = args.layer.inputSpec;\n this.numConstants = null;\n }\n get trainable() {\n return this._trainable;\n }\n set trainable(value) {\n this._trainable = value;\n if (this.forwardLayer != null) {\n this.forwardLayer.trainable = value;\n }\n if (this.backwardLayer != null) {\n this.backwardLayer.trainable = value;\n }\n }\n getWeights() {\n return this.forwardLayer.getWeights().concat(this.backwardLayer.getWeights());\n }\n setWeights(weights) {\n const numWeights = weights.length;\n const numeightsOver2 = Math.floor(numWeights / 2);\n this.forwardLayer.setWeights(weights.slice(0, numeightsOver2));\n this.backwardLayer.setWeights(weights.slice(numeightsOver2));\n }\n computeOutputShape(inputShape) {\n let layerShapes = this.forwardLayer.computeOutputShape(inputShape);\n if (!(Array.isArray(layerShapes) && Array.isArray(layerShapes[0]))) {\n layerShapes = [layerShapes];\n }\n layerShapes = layerShapes;\n let outputShape;\n let outputShapes;\n let stateShape;\n if (this.returnState) {\n stateShape = layerShapes.slice(1);\n outputShape = layerShapes[0];\n } else {\n outputShape = layerShapes[0];\n }\n outputShape = outputShape;\n if (this.mergeMode === \"concat\") {\n outputShape[outputShape.length - 1] *= 2;\n outputShapes = [outputShape];\n } else if (this.mergeMode == null) {\n outputShapes = [outputShape, outputShape.slice()];\n } else {\n outputShapes = [outputShape];\n }\n if (this.returnState) {\n if (this.mergeMode == null) {\n return outputShapes.concat(stateShape).concat(stateShape.slice());\n }\n return [outputShape].concat(stateShape).concat(stateShape.slice());\n }\n return singletonOrArray(outputShapes);\n }\n apply(inputs, kwargs) {\n let initialState = kwargs == null ? null : kwargs[\"initialState\"];\n let constants = kwargs == null ? null : kwargs[\"constants\"];\n if (kwargs == null) {\n kwargs = {};\n }\n const standardized = standardizeArgs(inputs, initialState, constants, this.numConstants);\n inputs = standardized.inputs;\n initialState = standardized.initialState;\n constants = standardized.constants;\n if (Array.isArray(inputs)) {\n initialState = inputs.slice(1);\n inputs = inputs[0];\n }\n if ((initialState == null || initialState.length === 0) && constants == null) {\n return super.apply(inputs, kwargs);\n }\n const additionalInputs = [];\n const additionalSpecs = [];\n if (initialState != null) {\n const numStates = initialState.length;\n if (numStates % 2 > 0) {\n throw new ValueError(\"When passing `initialState` to a Bidrectional RNN, the state should be an Array containing the states of the underlying RNNs.\");\n }\n kwargs[\"initialState\"] = initialState;\n additionalInputs.push(...initialState);\n const stateSpecs = initialState.map((state) => new InputSpec({ shape: state.shape }));\n this.forwardLayer.stateSpec = stateSpecs.slice(0, numStates / 2);\n this.backwardLayer.stateSpec = stateSpecs.slice(numStates / 2);\n additionalSpecs.push(...stateSpecs);\n }\n if (constants != null) {\n throw new NotImplementedError(\"Support for constants in Bidirectional layers is not implemented yet.\");\n }\n const isSymbolicTensor = additionalInputs[0] instanceof SymbolicTensor;\n for (const tensor2 of additionalInputs) {\n if (tensor2 instanceof SymbolicTensor !== isSymbolicTensor) {\n throw new ValueError(\"The initial state of a Bidirectional layer cannot be specified as a mix of symbolic and non-symbolic tensors\");\n }\n }\n if (isSymbolicTensor) {\n const fullInput = [inputs].concat(additionalInputs);\n const fullInputSpec = this.inputSpec.concat(additionalSpecs);\n const originalInputSpec = this.inputSpec;\n this.inputSpec = fullInputSpec;\n const output = super.apply(fullInput, kwargs);\n this.inputSpec = originalInputSpec;\n return output;\n } else {\n return super.apply(inputs, kwargs);\n }\n }\n call(inputs, kwargs) {\n return tidy(() => {\n const initialState = kwargs[\"initialState\"];\n let y;\n let yRev;\n if (initialState == null) {\n y = this.forwardLayer.call(inputs, kwargs);\n yRev = this.backwardLayer.call(inputs, kwargs);\n } else {\n const forwardState = initialState.slice(0, initialState.length / 2);\n const backwardState = initialState.slice(initialState.length / 2);\n y = this.forwardLayer.call(inputs, Object.assign(kwargs, { initialState: forwardState }));\n yRev = this.backwardLayer.call(inputs, Object.assign(kwargs, { initialState: backwardState }));\n }\n let states;\n if (this.returnState) {\n if (Array.isArray(y)) {\n states = y.slice(1).concat(yRev.slice(1));\n } else {\n }\n y = y[0];\n yRev = yRev[0];\n }\n if (this.returnSequences) {\n yRev = reverse(yRev, 1);\n }\n let output;\n if (this.mergeMode === \"concat\") {\n output = concatenate([y, yRev]);\n } else if (this.mergeMode === \"sum\") {\n output = add2(y, yRev);\n } else if (this.mergeMode === \"ave\") {\n output = mul(0.5, add2(y, yRev));\n } else if (this.mergeMode === \"mul\") {\n output = mul(y, yRev);\n } else if (this.mergeMode == null) {\n output = [y, yRev];\n }\n if (this.returnState) {\n if (this.mergeMode == null) {\n return output.concat(states);\n }\n return [output].concat(states);\n }\n return output;\n });\n }\n resetStates(states) {\n this.forwardLayer.resetStates();\n this.backwardLayer.resetStates();\n }\n build(inputShape) {\n nameScope(this.forwardLayer.name, () => {\n this.forwardLayer.build(inputShape);\n });\n nameScope(this.backwardLayer.name, () => {\n this.backwardLayer.build(inputShape);\n });\n this.built = true;\n }\n computeMask(inputs, mask) {\n if (Array.isArray(mask)) {\n mask = mask[0];\n }\n let outputMask;\n if (this.returnSequences) {\n if (this.mergeMode == null) {\n outputMask = [mask, mask];\n } else {\n outputMask = mask;\n }\n } else {\n if (this.mergeMode == null) {\n outputMask = [null, null];\n } else {\n outputMask = null;\n }\n }\n if (this.returnState) {\n const states = this.forwardLayer.states;\n const stateMask = states.map((state) => null);\n if (Array.isArray(outputMask)) {\n return outputMask.concat(stateMask).concat(stateMask);\n } else {\n return [outputMask].concat(stateMask).concat(stateMask);\n }\n } else {\n return outputMask;\n }\n }\n get trainableWeights() {\n return this.forwardLayer.trainableWeights.concat(this.backwardLayer.trainableWeights);\n }\n get nonTrainableWeights() {\n return this.forwardLayer.nonTrainableWeights.concat(this.backwardLayer.nonTrainableWeights);\n }\n setFastWeightInitDuringBuild(value) {\n super.setFastWeightInitDuringBuild(value);\n if (this.forwardLayer != null) {\n this.forwardLayer.setFastWeightInitDuringBuild(value);\n }\n if (this.backwardLayer != null) {\n this.backwardLayer.setFastWeightInitDuringBuild(value);\n }\n }\n getConfig() {\n const config = {\n \"mergeMode\": this.mergeMode\n };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n static fromConfig(cls, config) {\n const rnnLayer = deserialize(config[\"layer\"]);\n delete config[\"layer\"];\n if (config[\"numConstants\"] != null) {\n throw new NotImplementedError(`Deserialization of a Bidirectional layer with numConstants present is not supported yet.`);\n }\n const newConfig = config;\n newConfig[\"layer\"] = rnnLayer;\n return new cls(newConfig);\n }\n};\nBidirectional.className = \"Bidirectional\";\nserialization_exports.registerClass(Bidirectional);\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/exports_layers.js\nfunction inputLayer(args) {\n return new InputLayer(args);\n}\nfunction elu3(args) {\n return new ELU(args);\n}\nfunction reLU(args) {\n return new ReLU(args);\n}\nfunction leakyReLU(args) {\n return new LeakyReLU(args);\n}\nfunction prelu2(args) {\n return new PReLU(args);\n}\nfunction softmax2(args) {\n return new Softmax3(args);\n}\nfunction thresholdedReLU(args) {\n return new ThresholdedReLU(args);\n}\nfunction conv1d2(args) {\n return new Conv1D(args);\n}\nfunction conv2d3(args) {\n return new Conv2D2(args);\n}\nfunction conv2dTranspose2(args) {\n return new Conv2DTranspose(args);\n}\nfunction conv3d2(args) {\n return new Conv3D2(args);\n}\nfunction conv3dTranspose2(args) {\n return new Conv3DTranspose(args);\n}\nfunction separableConv2d2(args) {\n return new SeparableConv2D(args);\n}\nfunction cropping2D(args) {\n return new Cropping2D(args);\n}\nfunction upSampling2d(args) {\n return new UpSampling2D(args);\n}\nfunction depthwiseConv2d4(args) {\n return new DepthwiseConv2D(args);\n}\nfunction activation(args) {\n return new Activation2(args);\n}\nfunction dense(args) {\n return new Dense(args);\n}\nfunction dropout3(args) {\n return new Dropout(args);\n}\nfunction spatialDropout1d(args) {\n return new SpatialDropout1D(args);\n}\nfunction flatten3(args) {\n return new Flatten(args);\n}\nfunction repeatVector(args) {\n return new RepeatVector(args);\n}\nfunction reshape2(args) {\n return new Reshape2(args);\n}\nfunction permute(args) {\n return new Permute(args);\n}\nfunction embedding(args) {\n return new Embedding(args);\n}\nfunction add3(args) {\n return new Add2(args);\n}\nfunction average(args) {\n return new Average(args);\n}\nfunction concatenate2(args) {\n return new Concatenate(args);\n}\nfunction maximum2(args) {\n return new Maximum2(args);\n}\nfunction minimum2(args) {\n return new Minimum2(args);\n}\nfunction multiply(args) {\n return new Multiply2(args);\n}\nfunction dot3(args) {\n return new Dot(args);\n}\nfunction batchNormalization2(args) {\n return new BatchNormalization(args);\n}\nfunction layerNormalization(args) {\n return new LayerNormalization(args);\n}\nfunction zeroPadding2d(args) {\n return new ZeroPadding2D(args);\n}\nfunction averagePooling1d(args) {\n return new AveragePooling1D(args);\n}\nfunction avgPool1d(args) {\n return averagePooling1d(args);\n}\nfunction avgPooling1d(args) {\n return averagePooling1d(args);\n}\nfunction averagePooling2d(args) {\n return new AveragePooling2D(args);\n}\nfunction avgPool2d(args) {\n return averagePooling2d(args);\n}\nfunction avgPooling2d(args) {\n return averagePooling2d(args);\n}\nfunction averagePooling3d(args) {\n return new AveragePooling3D(args);\n}\nfunction avgPool3d2(args) {\n return averagePooling3d(args);\n}\nfunction avgPooling3d(args) {\n return averagePooling3d(args);\n}\nfunction globalAveragePooling1d(args) {\n return new GlobalAveragePooling1D(args);\n}\nfunction globalAveragePooling2d(args) {\n return new GlobalAveragePooling2D(args);\n}\nfunction globalMaxPooling1d(args) {\n return new GlobalMaxPooling1D(args);\n}\nfunction globalMaxPooling2d(args) {\n return new GlobalMaxPooling2D(args);\n}\nfunction maxPooling1d(args) {\n return new MaxPooling1D(args);\n}\nfunction maxPooling2d(args) {\n return new MaxPooling2D(args);\n}\nfunction maxPooling3d(args) {\n return new MaxPooling3D(args);\n}\nfunction gru(args) {\n return new GRU(args);\n}\nfunction gruCell(args) {\n return new GRUCell(args);\n}\nfunction lstm(args) {\n return new LSTM(args);\n}\nfunction lstmCell(args) {\n return new LSTMCell(args);\n}\nfunction simpleRNN(args) {\n return new SimpleRNN(args);\n}\nfunction simpleRNNCell(args) {\n return new SimpleRNNCell(args);\n}\nfunction convLstm2d(args) {\n return new ConvLSTM2D(args);\n}\nfunction convLstm2dCell(args) {\n return new ConvLSTM2DCell(args);\n}\nfunction rnn2(args) {\n return new RNN(args);\n}\nfunction stackedRNNCells(args) {\n return new StackedRNNCells(args);\n}\nfunction bidirectional(args) {\n return new Bidirectional(args);\n}\nfunction timeDistributed(args) {\n return new TimeDistributed(args);\n}\nvar globalMaxPool1d = globalMaxPooling1d;\nvar globalMaxPool2d = globalMaxPooling2d;\nvar maxPool1d = maxPooling1d;\nvar maxPool2d = maxPooling2d;\nfunction gaussianNoise(args) {\n return new GaussianNoise(args);\n}\nfunction gaussianDropout(args) {\n return new GaussianDropout(args);\n}\nfunction alphaDropout(args) {\n return new AlphaDropout(args);\n}\nfunction masking(args) {\n return new Masking(args);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/exports_metrics.js\nvar exports_metrics_exports = {};\n__export(exports_metrics_exports, {\n MAPE: () => MAPE2,\n MSE: () => MSE2,\n binaryAccuracy: () => binaryAccuracy2,\n binaryCrossentropy: () => binaryCrossentropy3,\n categoricalAccuracy: () => categoricalAccuracy2,\n categoricalCrossentropy: () => categoricalCrossentropy3,\n cosineProximity: () => cosineProximity2,\n mape: () => mape2,\n meanAbsoluteError: () => meanAbsoluteError2,\n meanAbsolutePercentageError: () => meanAbsolutePercentageError2,\n meanSquaredError: () => meanSquaredError3,\n mse: () => mse2,\n precision: () => precision2,\n recall: () => recall2,\n sparseCategoricalAccuracy: () => sparseCategoricalAccuracy2\n});\nfunction binaryAccuracy2(yTrue, yPred) {\n return binaryAccuracy(yTrue, yPred);\n}\nfunction binaryCrossentropy3(yTrue, yPred) {\n return binaryCrossentropy2(yTrue, yPred);\n}\nfunction sparseCategoricalAccuracy2(yTrue, yPred) {\n return sparseCategoricalAccuracy(yTrue, yPred);\n}\nfunction categoricalAccuracy2(yTrue, yPred) {\n return categoricalAccuracy(yTrue, yPred);\n}\nfunction categoricalCrossentropy3(yTrue, yPred) {\n return categoricalCrossentropy2(yTrue, yPred);\n}\nfunction precision2(yTrue, yPred) {\n return precision(yTrue, yPred);\n}\nfunction recall2(yTrue, yPred) {\n return recall(yTrue, yPred);\n}\nfunction cosineProximity2(yTrue, yPred) {\n return cosineProximity(yTrue, yPred);\n}\nfunction meanAbsoluteError2(yTrue, yPred) {\n return meanAbsoluteError(yTrue, yPred);\n}\nfunction meanAbsolutePercentageError2(yTrue, yPred) {\n return meanAbsolutePercentageError(yTrue, yPred);\n}\nfunction MAPE2(yTrue, yPred) {\n return meanAbsolutePercentageError(yTrue, yPred);\n}\nfunction mape2(yTrue, yPred) {\n return meanAbsolutePercentageError(yTrue, yPred);\n}\nfunction meanSquaredError3(yTrue, yPred) {\n return meanSquaredError2(yTrue, yPred);\n}\nfunction MSE2(yTrue, yPred) {\n return meanSquaredError2(yTrue, yPred);\n}\nfunction mse2(yTrue, yPred) {\n return meanSquaredError2(yTrue, yPred);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/exports_models.js\nvar exports_models_exports = {};\n__export(exports_models_exports, {\n modelFromJSON: () => modelFromJSON\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/exports_regularizers.js\nvar exports_regularizers_exports = {};\n__export(exports_regularizers_exports, {\n l1: () => l12,\n l1l2: () => l1l2,\n l2: () => l22\n});\nfunction l1l2(config) {\n return new L1L2(config);\n}\nfunction l12(config) {\n return l1(config);\n}\nfunction l22(config) {\n return l2(config);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/callbacks.js\nvar Callback = class extends BaseCallback {\n constructor() {\n super(...arguments);\n this.model = null;\n }\n setModel(model2) {\n if (!(model2 instanceof LayersModel)) {\n throw new Error(\"model must be a LayersModel, not some other Container\");\n }\n this.model = model2;\n }\n};\nfunction less2(currVal, prevVal) {\n return currVal < prevVal;\n}\nfunction greater2(currVal, prevVal) {\n return currVal > prevVal;\n}\nvar EarlyStopping = class extends Callback {\n constructor(args) {\n super();\n if (args == null) {\n args = {};\n }\n if (args.restoreBestWeights) {\n throw new NotImplementedError(\"restoreBestWeights = True is not implemented in EarlyStopping yet.\");\n }\n this.monitor = args.monitor || \"val_loss\";\n this.minDelta = Math.abs(args.minDelta || 0);\n this.patience = args.patience || 0;\n this.verbose = args.verbose || 0;\n this.mode = args.mode || \"auto\";\n this.baseline = args.baseline;\n if ([\"auto\", \"min\", \"max\"].indexOf(this.mode) === -1) {\n console.warn(`EarlyStopping mode '${this.mode}' is invalid. Falling back to mode 'auto'.`);\n this.mode = \"auto\";\n }\n if (this.mode === \"min\") {\n this.monitorFunc = less2;\n } else if (this.mode === \"max\") {\n this.monitorFunc = greater2;\n } else {\n if (this.monitor.indexOf(\"acc\") !== -1) {\n this.monitorFunc = greater2;\n } else {\n this.monitorFunc = less2;\n }\n }\n if (this.monitorFunc === less2) {\n this.minDelta *= -1;\n }\n }\n async onTrainBegin(logs) {\n this.wait = 0;\n this.stoppedEpoch = 0;\n if (this.baseline != null) {\n this.best = this.baseline;\n } else {\n this.best = this.monitorFunc === less2 ? Infinity : -Infinity;\n }\n }\n async onEpochEnd(epoch, logs) {\n await resolveScalarsInLogs(logs);\n const current = this.getMonitorValue(logs);\n if (current == null) {\n return;\n }\n if (this.monitorFunc(current - this.minDelta, this.best)) {\n this.best = current;\n this.wait = 0;\n } else {\n this.wait++;\n if (this.wait >= this.patience) {\n this.stoppedEpoch = epoch;\n this.model.stopTraining = true;\n }\n }\n }\n async onTrainEnd(logs) {\n if (this.stoppedEpoch > 0 && this.verbose) {\n console.log(`Epoch ${this.stoppedEpoch}: early stopping.`);\n }\n }\n getMonitorValue(logs) {\n if (logs == null) {\n logs = {};\n }\n const monitorValue = logs[this.monitor];\n if (monitorValue == null) {\n console.warn(`Metric for EarlyStopping ${this.monitor} is not available. Available metrics are: ${Object.keys(logs)}`);\n }\n return monitorValue;\n }\n};\nfunction earlyStopping(args) {\n return new EarlyStopping(args);\n}\nvar callbacks = { earlyStopping };\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/flags.js\nvar ENV4 = env();\nENV4.registerFlag(\"KEEP_INTERMEDIATE_TENSORS\", () => false, (debugValue) => {\n if (debugValue) {\n console.warn(\"Keep intermediate tensors is ON. This will print the values of all intermediate tensors during model inference. Not all models support this mode. For details, check e2e/benchmarks/ model_config.js. This significantly impacts performance.\");\n }\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/data/compiled_api.js\nvar DataType;\n(function(DataType2) {\n DataType2[DataType2[\"DT_INVALID\"] = 0] = \"DT_INVALID\";\n DataType2[DataType2[\"DT_FLOAT\"] = 1] = \"DT_FLOAT\";\n DataType2[DataType2[\"DT_DOUBLE\"] = 2] = \"DT_DOUBLE\";\n DataType2[DataType2[\"DT_INT32\"] = 3] = \"DT_INT32\";\n DataType2[DataType2[\"DT_UINT8\"] = 4] = \"DT_UINT8\";\n DataType2[DataType2[\"DT_INT16\"] = 5] = \"DT_INT16\";\n DataType2[DataType2[\"DT_INT8\"] = 6] = \"DT_INT8\";\n DataType2[DataType2[\"DT_STRING\"] = 7] = \"DT_STRING\";\n DataType2[DataType2[\"DT_COMPLEX64\"] = 8] = \"DT_COMPLEX64\";\n DataType2[DataType2[\"DT_INT64\"] = 9] = \"DT_INT64\";\n DataType2[DataType2[\"DT_BOOL\"] = 10] = \"DT_BOOL\";\n DataType2[DataType2[\"DT_QINT8\"] = 11] = \"DT_QINT8\";\n DataType2[DataType2[\"DT_QUINT8\"] = 12] = \"DT_QUINT8\";\n DataType2[DataType2[\"DT_QINT32\"] = 13] = \"DT_QINT32\";\n DataType2[DataType2[\"DT_BFLOAT16\"] = 14] = \"DT_BFLOAT16\";\n DataType2[DataType2[\"DT_QINT16\"] = 15] = \"DT_QINT16\";\n DataType2[DataType2[\"DT_QUINT16\"] = 16] = \"DT_QUINT16\";\n DataType2[DataType2[\"DT_UINT16\"] = 17] = \"DT_UINT16\";\n DataType2[DataType2[\"DT_COMPLEX128\"] = 18] = \"DT_COMPLEX128\";\n DataType2[DataType2[\"DT_HALF\"] = 19] = \"DT_HALF\";\n DataType2[DataType2[\"DT_RESOURCE\"] = 20] = \"DT_RESOURCE\";\n DataType2[DataType2[\"DT_VARIANT\"] = 21] = \"DT_VARIANT\";\n DataType2[DataType2[\"DT_UINT32\"] = 22] = \"DT_UINT32\";\n DataType2[DataType2[\"DT_UINT64\"] = 23] = \"DT_UINT64\";\n DataType2[DataType2[\"DT_FLOAT_REF\"] = 101] = \"DT_FLOAT_REF\";\n DataType2[DataType2[\"DT_DOUBLE_REF\"] = 102] = \"DT_DOUBLE_REF\";\n DataType2[DataType2[\"DT_INT32_REF\"] = 103] = \"DT_INT32_REF\";\n DataType2[DataType2[\"DT_UINT8_REF\"] = 104] = \"DT_UINT8_REF\";\n DataType2[DataType2[\"DT_INT16_REF\"] = 105] = \"DT_INT16_REF\";\n DataType2[DataType2[\"DT_INT8_REF\"] = 106] = \"DT_INT8_REF\";\n DataType2[DataType2[\"DT_STRING_REF\"] = 107] = \"DT_STRING_REF\";\n DataType2[DataType2[\"DT_COMPLEX64_REF\"] = 108] = \"DT_COMPLEX64_REF\";\n DataType2[DataType2[\"DT_INT64_REF\"] = 109] = \"DT_INT64_REF\";\n DataType2[DataType2[\"DT_BOOL_REF\"] = 110] = \"DT_BOOL_REF\";\n DataType2[DataType2[\"DT_QINT8_REF\"] = 111] = \"DT_QINT8_REF\";\n DataType2[DataType2[\"DT_QUINT8_REF\"] = 112] = \"DT_QUINT8_REF\";\n DataType2[DataType2[\"DT_QINT32_REF\"] = 113] = \"DT_QINT32_REF\";\n DataType2[DataType2[\"DT_BFLOAT16_REF\"] = 114] = \"DT_BFLOAT16_REF\";\n DataType2[DataType2[\"DT_QINT16_REF\"] = 115] = \"DT_QINT16_REF\";\n DataType2[DataType2[\"DT_QUINT16_REF\"] = 116] = \"DT_QUINT16_REF\";\n DataType2[DataType2[\"DT_UINT16_REF\"] = 117] = \"DT_UINT16_REF\";\n DataType2[DataType2[\"DT_COMPLEX128_REF\"] = 118] = \"DT_COMPLEX128_REF\";\n DataType2[DataType2[\"DT_HALF_REF\"] = 119] = \"DT_HALF_REF\";\n DataType2[DataType2[\"DT_RESOURCE_REF\"] = 120] = \"DT_RESOURCE_REF\";\n DataType2[DataType2[\"DT_VARIANT_REF\"] = 121] = \"DT_VARIANT_REF\";\n DataType2[DataType2[\"DT_UINT32_REF\"] = 122] = \"DT_UINT32_REF\";\n DataType2[DataType2[\"DT_UINT64_REF\"] = 123] = \"DT_UINT64_REF\";\n})(DataType || (DataType = {}));\nvar SaverDef;\n(function(SaverDef2) {\n let CheckpointFormatVersion;\n (function(CheckpointFormatVersion2) {\n CheckpointFormatVersion2[CheckpointFormatVersion2[\"LEGACY\"] = 0] = \"LEGACY\";\n CheckpointFormatVersion2[CheckpointFormatVersion2[\"V1\"] = 1] = \"V1\";\n CheckpointFormatVersion2[CheckpointFormatVersion2[\"V2\"] = 2] = \"V2\";\n })(CheckpointFormatVersion = SaverDef2.CheckpointFormatVersion || (SaverDef2.CheckpointFormatVersion = {}));\n})(SaverDef || (SaverDef = {}));\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/custom_op/register.js\nvar CUSTOM_OPS = {};\nfunction registerOp(name, opFunc) {\n const opMapper = {\n tfOpName: name,\n category: \"custom\",\n inputs: [],\n attrs: [],\n customExecutor: opFunc\n };\n CUSTOM_OPS[name] = opMapper;\n}\nfunction getRegisteredOp(name) {\n return CUSTOM_OPS[name];\n}\nfunction deregisterOp(name) {\n delete CUSTOM_OPS[name];\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/utils.js\nfunction getParamValue(paramName, node, tensorMap, context, resourceManager) {\n const inputParam = node.inputParams[paramName];\n if (inputParam && inputParam.inputIndexStart !== void 0) {\n const start = inputParam.inputIndexStart;\n const end = inputParam.inputIndexEnd === 0 ? void 0 : inputParam.inputIndexEnd === void 0 ? start + 1 : inputParam.inputIndexEnd;\n if (inputParam.type === \"tensor\") {\n return getTensor(node.inputNames[inputParam.inputIndexStart], tensorMap, context, resourceManager);\n }\n if (inputParam.type === \"tensors\") {\n const inputs = node.inputNames.slice(start, end);\n return inputs.map((name) => getTensor(name, tensorMap, context, resourceManager));\n }\n const tensor2 = getTensor(node.inputNames.slice(start)[0], tensorMap, context, resourceManager);\n const data = tensor2.dataSync();\n return inputParam.type === \"number\" ? data[0] : util_exports.toNestedArray(tensor2.shape, data);\n }\n const attrParam = node.attrParams[paramName];\n return attrParam && attrParam.value;\n}\nfunction getTensor(name, tensorsMap, context, resourceManager) {\n const [nodeName, index] = parseNodeName(name);\n if (resourceManager != null) {\n const tensor2 = resourceManager.getHashTableHandleByName(nodeName);\n if (tensor2 != null) {\n return tensor2;\n }\n }\n const contextId = context.currentContextIds.find((contextId2) => {\n return !!tensorsMap[getNodeNameWithContextId(nodeName, contextId2)];\n });\n return contextId !== void 0 ? tensorsMap[getNodeNameWithContextId(nodeName, contextId)][index] : void 0;\n}\nfunction getTensorsForCurrentContenxt(name, tensorsMap, context) {\n return tensorsMap[getNodeNameWithContextId(name, context.currentContextId)];\n}\nfunction getNodeNameAndIndex(inputName, context) {\n const [nodeName, index, outputName] = parseNodeName(inputName);\n return [\n getNodeNameWithContextId(nodeName, context && context.currentContextId),\n index,\n outputName\n ];\n}\nfunction getNodeNameWithContextId(name, contextId) {\n return !!contextId ? `${name}-${contextId}` : name;\n}\nfunction parseNodeName(name) {\n const parts = name.split(\":\");\n if (parts.length === 1) {\n return [name, 0, void 0];\n }\n const nodeName = parts[0];\n const outputName = parts.length === 3 ? parts[1] : void 0;\n const index = Number(parts[parts.length - 1]);\n return [nodeName, index, outputName];\n}\nfunction getPadding(node, tensorMap, context) {\n let pad3 = getParamValue(\"pad\", node, tensorMap, context);\n if (pad3 === \"explicit\") {\n pad3 = getParamValue(\"explicitPaddings\", node, tensorMap, context);\n const explicitPadding = [[0, 0], [0, 0], [0, 0], [0, 0]];\n for (let i = 0; i < 4; i++) {\n explicitPadding[i][0] = pad3[i * 2];\n explicitPadding[i][1] = pad3[i * 2 + 1];\n }\n return explicitPadding;\n }\n return pad3;\n}\nfunction cloneTensor(tensor2) {\n return tensor2.kept ? tensor2 : clone(tensor2);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/arithmetic.js\nvar arithmetic_exports = {};\n__export(arithmetic_exports, {\n json: () => json\n});\nvar json = [\n {\n \"tfOpName\": \"Add\",\n \"category\": \"arithmetic\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"AddV2\",\n \"category\": \"arithmetic\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"AddN\",\n \"category\": \"arithmetic\",\n \"inputs\": [\n {\n \"start\": 0,\n \"end\": 0,\n \"name\": \"tensors\",\n \"type\": \"tensors\"\n }\n ]\n },\n {\n \"tfOpName\": \"BiasAdd\",\n \"category\": \"arithmetic\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"data_format\",\n \"name\": \"dataFormat\",\n \"type\": \"string\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Sub\",\n \"category\": \"arithmetic\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"RealDiv\",\n \"category\": \"arithmetic\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Div\",\n \"category\": \"arithmetic\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"DivNoNan\",\n \"category\": \"arithmetic\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"FloorDiv\",\n \"category\": \"arithmetic\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Mul\",\n \"category\": \"arithmetic\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Maximum\",\n \"category\": \"arithmetic\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Minimum\",\n \"category\": \"arithmetic\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Pow\",\n \"category\": \"arithmetic\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"SquaredDifference\",\n \"category\": \"arithmetic\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Mod\",\n \"category\": \"arithmetic\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"FloorMod\",\n \"category\": \"arithmetic\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n }\n];\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/basic_math.js\nvar basic_math_exports = {};\n__export(basic_math_exports, {\n json: () => json2\n});\nvar json2 = [\n {\n \"tfOpName\": \"Abs\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Acos\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Asin\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Atan\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Atan2\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"y\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Ceil\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"ClipByValue\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"clipValueMin\",\n \"type\": \"number\"\n },\n {\n \"start\": 2,\n \"name\": \"clipValueMax\",\n \"type\": \"number\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Complex\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"real\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"imag\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"ComplexAbs\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Cos\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Cosh\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Elu\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Exp\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Floor\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Log\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Imag\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"Tout\",\n \"name\": \"outputType\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Neg\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Real\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"Tout\",\n \"name\": \"outputType\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Prelu\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"alpha\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Relu\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Relu6\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Selu\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Sigmoid\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Sin\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Sinh\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Sqrt\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Rsqrt\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Square\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Tan\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Tanh\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Sign\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Round\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Expm1\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Log1p\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Reciprocal\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Softplus\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Asinh\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Acosh\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Atanh\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Erf\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Prod\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"axes\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"keep_dims\",\n \"name\": \"keepDims\",\n \"type\": \"bool\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"LeakyRelu\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"alpha\",\n \"name\": \"alpha\",\n \"type\": \"number\",\n \"defaultValue\": 0.2\n },\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"IsNan\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n }\n];\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/control.js\nvar control_exports = {};\n__export(control_exports, {\n json: () => json3\n});\nvar json3 = [\n {\n \"tfOpName\": \"EmptyTensorList\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"elementShape\",\n \"type\": \"shape\"\n },\n {\n \"start\": 1,\n \"name\": \"maxNumElements\",\n \"type\": \"number\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"element_dtype\",\n \"name\": \"elementDType\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"LoopCond\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"pred\",\n \"type\": \"tensor\"\n }\n ]\n },\n {\n \"tfOpName\": \"Switch\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"data\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"pred\",\n \"type\": \"tensor\"\n }\n ]\n },\n {\n \"tfOpName\": \"Merge\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"end\": 0,\n \"name\": \"tensors\",\n \"type\": \"tensors\"\n }\n ]\n },\n {\n \"tfOpName\": \"Enter\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensor\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"frame_name\",\n \"name\": \"frameName\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"is_constant\",\n \"name\": \"isConstant\",\n \"type\": \"bool\"\n }\n ]\n },\n {\n \"tfOpName\": \"Exit\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensor\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"NextIteration\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensor\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"TensorArrayV3\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"size\",\n \"type\": \"number\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"dtype\",\n \"name\": \"dtype\",\n \"type\": \"dtype\"\n },\n {\n \"tfName\": \"element_shape\",\n \"name\": \"elementShape\",\n \"type\": \"shape\"\n },\n {\n \"tfName\": \"dynamic_size\",\n \"name\": \"dynamicSize\",\n \"type\": \"bool\"\n },\n {\n \"tfName\": \"clear_after_read\",\n \"name\": \"clearAfterRead\",\n \"type\": \"bool\"\n },\n {\n \"tfName\": \"identical_element_shapes\",\n \"name\": \"identicalElementShapes\",\n \"type\": \"bool\"\n },\n {\n \"tfName\": \"tensor_array_name\",\n \"name\": \"name\",\n \"type\": \"string\"\n }\n ]\n },\n {\n \"tfOpName\": \"TensorArrayWriteV3\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensorArrayId\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"index\",\n \"type\": \"number\"\n },\n {\n \"start\": 2,\n \"name\": \"tensor\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 3,\n \"name\": \"flowIn\",\n \"type\": \"number\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"TensorArrayReadV3\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensorArrayId\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"index\",\n \"type\": \"number\"\n },\n {\n \"start\": 2,\n \"name\": \"flowIn\",\n \"type\": \"number\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"dtype\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"TensorArrayGatherV3\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensorArrayId\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"indices\",\n \"type\": \"number[]\"\n },\n {\n \"start\": 2,\n \"name\": \"flowIn\",\n \"type\": \"number\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"dtype\",\n \"name\": \"dtype\",\n \"type\": \"dtype\"\n },\n {\n \"tfName\": \"element_shape\",\n \"name\": \"elementShape\",\n \"type\": \"shape\"\n }\n ]\n },\n {\n \"tfOpName\": \"TensorArrayScatterV3\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensorArrayId\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"indices\",\n \"type\": \"number[]\"\n },\n {\n \"start\": 2,\n \"name\": \"tensor\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 3,\n \"name\": \"flowIn\",\n \"type\": \"number\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"TensorArrayConcatV3\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensorArrayId\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"flowIn\",\n \"type\": \"number\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"dtype\",\n \"name\": \"dtype\",\n \"type\": \"dtype\"\n },\n {\n \"tfName\": \"element_shape_except0\",\n \"name\": \"elementShapeExcept0\",\n \"type\": \"shape\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"TensorArraySplitV3\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensorArrayId\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"tensor\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"name\": \"lengths\",\n \"type\": \"number[]\"\n },\n {\n \"start\": 3,\n \"name\": \"flowIn\",\n \"type\": \"number\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"TensorArraySizeV3\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensorArrayId\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"flowIn\",\n \"type\": \"number\"\n }\n ]\n },\n {\n \"tfOpName\": \"TensorArrayCloseV3\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensorArrayId\",\n \"type\": \"tensor\"\n }\n ]\n },\n {\n \"tfOpName\": \"StatelessIf\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"cond\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"end\": 0,\n \"name\": \"args\",\n \"type\": \"tensors\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"then_branch\",\n \"name\": \"thenBranch\",\n \"type\": \"func\"\n },\n {\n \"tfName\": \"else_branch\",\n \"name\": \"elseBranch\",\n \"type\": \"func\"\n }\n ]\n },\n {\n \"tfOpName\": \"If\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"cond\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"end\": 0,\n \"name\": \"args\",\n \"type\": \"tensors\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"then_branch\",\n \"name\": \"thenBranch\",\n \"type\": \"func\"\n },\n {\n \"tfName\": \"else_branch\",\n \"name\": \"elseBranch\",\n \"type\": \"func\"\n }\n ]\n },\n {\n \"tfOpName\": \"StatelessWhile\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"end\": 0,\n \"name\": \"args\",\n \"type\": \"tensors\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"cond\",\n \"name\": \"cond\",\n \"type\": \"func\"\n },\n {\n \"tfName\": \"body\",\n \"name\": \"body\",\n \"type\": \"func\"\n }\n ]\n },\n {\n \"tfOpName\": \"While\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"end\": 0,\n \"name\": \"args\",\n \"type\": \"tensors\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"cond\",\n \"name\": \"cond\",\n \"type\": \"func\"\n },\n {\n \"tfName\": \"body\",\n \"name\": \"body\",\n \"type\": \"func\"\n }\n ]\n },\n {\n \"tfOpName\": \"TensorListScatter\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensor\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"indices\",\n \"type\": \"number[]\"\n },\n {\n \"start\": 2,\n \"name\": \"elementShape\",\n \"type\": \"shape\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"element_dtype\",\n \"name\": \"elementDType\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"TensorListScatterV2\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensor\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"indices\",\n \"type\": \"number[]\"\n },\n {\n \"start\": 2,\n \"name\": \"elementShape\",\n \"type\": \"shape\"\n },\n {\n \"start\": 3,\n \"name\": \"numElements\",\n \"type\": \"number\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"element_dtype\",\n \"name\": \"elementDType\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"TensorListGather\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensorListId\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"indices\",\n \"type\": \"number[]\"\n },\n {\n \"start\": 2,\n \"name\": \"elementShape\",\n \"type\": \"shape\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"element_dtype\",\n \"name\": \"elementDType\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"TensorListGetItem\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensorListId\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"index\",\n \"type\": \"number\"\n },\n {\n \"start\": 2,\n \"name\": \"elementShape\",\n \"type\": \"shape\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"element_dtype\",\n \"name\": \"elementDType\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"TensorListSetItem\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensorListId\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"index\",\n \"type\": \"number\"\n },\n {\n \"start\": 2,\n \"name\": \"tensor\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"element_dtype\",\n \"name\": \"elementDType\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"TensorListReserve\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"elementShape\",\n \"type\": \"shape\"\n },\n {\n \"start\": 1,\n \"name\": \"numElements\",\n \"type\": \"number\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"element_dtype\",\n \"name\": \"elementDType\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"TensorListFromTensor\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensor\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"elementShape\",\n \"type\": \"shape\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"element_dtype\",\n \"name\": \"elementDType\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"TensorListStack\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensorListId\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"elementShape\",\n \"type\": \"shape\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"element_dtype\",\n \"name\": \"elementDType\",\n \"type\": \"dtype\"\n },\n {\n \"tfName\": \"num_elements\",\n \"name\": \"numElements\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"TensorListSplit\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensor\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"elementShape\",\n \"type\": \"shape\"\n },\n {\n \"start\": 2,\n \"name\": \"lengths\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"element_dtype\",\n \"name\": \"elementDType\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"TensorListConcat\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensorListId\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"element_shape\",\n \"name\": \"elementShape\",\n \"type\": \"shape\"\n },\n {\n \"tfName\": \"element_dtype\",\n \"name\": \"elementDType\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"TensorListConcatV2\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensorListId\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"element_shape\",\n \"name\": \"elementShape\",\n \"type\": \"shape\"\n },\n {\n \"tfName\": \"element_dtype\",\n \"name\": \"elementDType\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"TensorListPopBack\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensorListId\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"elementShape\",\n \"type\": \"shape\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"element_dtype\",\n \"name\": \"elementDType\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"TensorListPushBack\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensorListId\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"tensor\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"element_dtype\",\n \"name\": \"elementDType\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"TensorListLength\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensorListId\",\n \"type\": \"tensor\"\n }\n ]\n },\n {\n \"tfOpName\": \"TensorListResize\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensorListId\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"size\",\n \"type\": \"number\"\n }\n ]\n }\n];\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/convolution.js\nvar convolution_exports = {};\n__export(convolution_exports, {\n json: () => json4\n});\nvar json4 = [\n {\n \"tfOpName\": \"AvgPool\",\n \"category\": \"convolution\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"strides\",\n \"name\": \"strides\",\n \"type\": \"number[]\"\n },\n {\n \"tfName\": \"padding\",\n \"name\": \"pad\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"data_format\",\n \"name\": \"dataFormat\",\n \"type\": \"string\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"ksize\",\n \"name\": \"kernelSize\",\n \"type\": \"number[]\"\n },\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"MaxPool\",\n \"category\": \"convolution\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"strides\",\n \"name\": \"strides\",\n \"type\": \"number[]\"\n },\n {\n \"tfName\": \"padding\",\n \"name\": \"pad\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"data_format\",\n \"name\": \"dataFormat\",\n \"type\": \"string\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"ksize\",\n \"name\": \"kernelSize\",\n \"type\": \"number[]\"\n },\n {\n \"tfName\": \"explicit_paddings\",\n \"name\": \"explicitPaddings\",\n \"type\": \"number[]\",\n \"defaultValue\": [],\n \"notSupported\": true\n },\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"MaxPoolWithArgmax\",\n \"category\": \"convolution\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"strides\",\n \"name\": \"strides\",\n \"type\": \"number[]\"\n },\n {\n \"tfName\": \"padding\",\n \"name\": \"pad\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"ksize\",\n \"name\": \"kernelSize\",\n \"type\": \"number[]\"\n },\n {\n \"tfName\": \"include_batch_in_index\",\n \"name\": \"includeBatchInIndex\",\n \"type\": \"bool\"\n },\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"AvgPool3D\",\n \"category\": \"convolution\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"strides\",\n \"name\": \"strides\",\n \"type\": \"number[]\"\n },\n {\n \"tfName\": \"padding\",\n \"name\": \"pad\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"data_format\",\n \"name\": \"dataFormat\",\n \"type\": \"string\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"ksize\",\n \"name\": \"kernelSize\",\n \"type\": \"number[]\"\n },\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"MaxPool3D\",\n \"category\": \"convolution\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"strides\",\n \"name\": \"strides\",\n \"type\": \"number[]\"\n },\n {\n \"tfName\": \"padding\",\n \"name\": \"pad\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"data_format\",\n \"name\": \"dataFormat\",\n \"type\": \"string\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"ksize\",\n \"name\": \"kernelSize\",\n \"type\": \"number[]\"\n },\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Conv1D\",\n \"category\": \"convolution\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"filter\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"stride\",\n \"name\": \"stride\",\n \"type\": \"number\"\n },\n {\n \"tfName\": \"padding\",\n \"name\": \"pad\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"data_format\",\n \"name\": \"dataFormat\",\n \"type\": \"string\",\n \"defaultValue\": \"NWC\"\n },\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"dilation\",\n \"name\": \"dilation\",\n \"type\": \"number\",\n \"defaultValue\": 1\n }\n ]\n },\n {\n \"tfOpName\": \"Conv2D\",\n \"category\": \"convolution\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"filter\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"strides\",\n \"name\": \"strides\",\n \"type\": \"number[]\"\n },\n {\n \"tfName\": \"padding\",\n \"name\": \"pad\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"useCudnnOnGpu\",\n \"name\": \"useCudnnOnGpu\",\n \"type\": \"bool\"\n },\n {\n \"tfName\": \"data_format\",\n \"name\": \"dataFormat\",\n \"type\": \"string\",\n \"defaultValue\": \"NHWC\"\n },\n {\n \"tfName\": \"explicit_paddings\",\n \"name\": \"explicitPaddings\",\n \"type\": \"number[]\",\n \"defaultValue\": []\n },\n {\n \"tfName\": \"dilations\",\n \"name\": \"dilations\",\n \"type\": \"number[]\"\n }\n ]\n },\n {\n \"tfOpName\": \"_FusedConv2D\",\n \"category\": \"convolution\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"filter\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"end\": 0,\n \"name\": \"args\",\n \"type\": \"tensors\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"num_args\",\n \"name\": \"numArgs\",\n \"type\": \"number\"\n },\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"strides\",\n \"name\": \"strides\",\n \"type\": \"number[]\"\n },\n {\n \"tfName\": \"padding\",\n \"name\": \"pad\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"explicit_paddings\",\n \"name\": \"explicitPaddings\",\n \"type\": \"number[]\",\n \"defaultValue\": []\n },\n {\n \"tfName\": \"use_cudnn_on_gpu\",\n \"name\": \"useCudnnOnGpu\",\n \"type\": \"bool\",\n \"defaultValue\": true\n },\n {\n \"tfName\": \"data_format\",\n \"name\": \"dataFormat\",\n \"type\": \"string\",\n \"defaultValue\": \"NHWC\"\n },\n {\n \"tfName\": \"dilations\",\n \"name\": \"dilations\",\n \"type\": \"number[]\",\n \"defaultValue\": [\n 1,\n 1,\n 1,\n 1\n ]\n },\n {\n \"tfName\": \"fused_ops\",\n \"name\": \"fusedOps\",\n \"type\": \"string[]\",\n \"defaultValue\": []\n },\n {\n \"tfName\": \"epsilon\",\n \"name\": \"epsilon\",\n \"type\": \"number\",\n \"defaultValue\": 1e-4\n },\n {\n \"tfName\": \"leakyrelu_alpha\",\n \"name\": \"leakyreluAlpha\",\n \"type\": \"number\",\n \"defaultValue\": 0.2\n }\n ]\n },\n {\n \"tfOpName\": \"Conv2DBackpropInput\",\n \"category\": \"convolution\",\n \"inputs\": [\n {\n \"start\": 2,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"filter\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 0,\n \"name\": \"outputShape\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"strides\",\n \"name\": \"strides\",\n \"type\": \"number[]\"\n },\n {\n \"tfName\": \"padding\",\n \"name\": \"pad\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"data_format\",\n \"name\": \"dataFormat\",\n \"type\": \"string\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"explicit_paddings\",\n \"name\": \"explicitPaddings\",\n \"type\": \"number[]\",\n \"defaultValue\": []\n },\n {\n \"tfName\": \"dilations\",\n \"name\": \"dilations\",\n \"type\": \"number[]\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"DepthwiseConv2d\",\n \"category\": \"convolution\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"input\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"filter\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"strides\",\n \"name\": \"strides\",\n \"type\": \"number[]\"\n },\n {\n \"tfName\": \"padding\",\n \"name\": \"pad\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"data_format\",\n \"name\": \"dataFormat\",\n \"type\": \"string\",\n \"defaultValue\": \"NHWC\"\n },\n {\n \"tfName\": \"explicit_paddings\",\n \"name\": \"explicitPaddings\",\n \"type\": \"number[]\",\n \"defaultValue\": []\n },\n {\n \"tfName\": \"dilations\",\n \"name\": \"dilations\",\n \"type\": \"number[]\"\n }\n ]\n },\n {\n \"tfOpName\": \"DepthwiseConv2dNative\",\n \"category\": \"convolution\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"input\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"filter\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"strides\",\n \"name\": \"strides\",\n \"type\": \"number[]\"\n },\n {\n \"tfName\": \"padding\",\n \"name\": \"pad\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"data_format\",\n \"name\": \"dataFormat\",\n \"type\": \"string\",\n \"defaultValue\": \"NHWC\"\n },\n {\n \"tfName\": \"explicit_paddings\",\n \"name\": \"explicitPaddings\",\n \"type\": \"number[]\",\n \"defaultValue\": []\n },\n {\n \"tfName\": \"dilations\",\n \"name\": \"dilations\",\n \"type\": \"number[]\"\n }\n ]\n },\n {\n \"tfOpName\": \"FusedDepthwiseConv2dNative\",\n \"category\": \"convolution\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"filter\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"end\": 0,\n \"name\": \"args\",\n \"type\": \"tensors\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"num_args\",\n \"name\": \"numArgs\",\n \"type\": \"number\"\n },\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"strides\",\n \"name\": \"strides\",\n \"type\": \"number[]\"\n },\n {\n \"tfName\": \"padding\",\n \"name\": \"pad\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"data_format\",\n \"name\": \"dataFormat\",\n \"type\": \"string\",\n \"defaultValue\": \"NHWC\"\n },\n {\n \"tfName\": \"dilations\",\n \"name\": \"dilations\",\n \"type\": \"number[]\",\n \"defaultValue\": [\n 1,\n 1,\n 1,\n 1\n ]\n },\n {\n \"tfName\": \"fused_ops\",\n \"name\": \"fusedOps\",\n \"type\": \"string[]\",\n \"defaultValue\": []\n },\n {\n \"tfName\": \"explicit_paddings\",\n \"name\": \"explicitPaddings\",\n \"type\": \"number[]\",\n \"defaultValue\": []\n }\n ]\n },\n {\n \"tfOpName\": \"Conv3D\",\n \"category\": \"convolution\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"filter\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"strides\",\n \"name\": \"strides\",\n \"type\": \"number[]\"\n },\n {\n \"tfName\": \"padding\",\n \"name\": \"pad\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"data_format\",\n \"name\": \"dataFormat\",\n \"type\": \"string\",\n \"defaultValue\": \"NHWC\"\n },\n {\n \"tfName\": \"dilations\",\n \"name\": \"dilations\",\n \"type\": \"number[]\"\n }\n ]\n },\n {\n \"tfOpName\": \"Dilation2D\",\n \"category\": \"convolution\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"filter\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"strides\",\n \"name\": \"strides\",\n \"type\": \"number[]\"\n },\n {\n \"tfName\": \"rates\",\n \"name\": \"dilations\",\n \"type\": \"number[]\"\n },\n {\n \"tfName\": \"padding\",\n \"name\": \"pad\",\n \"type\": \"string\"\n }\n ]\n }\n];\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/creation.js\nvar creation_exports = {};\n__export(creation_exports, {\n json: () => json5\n});\nvar json5 = [\n {\n \"tfOpName\": \"Fill\",\n \"category\": \"creation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"shape\",\n \"type\": \"number[]\"\n },\n {\n \"start\": 1,\n \"name\": \"value\",\n \"type\": \"number\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"LinSpace\",\n \"category\": \"creation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"start\",\n \"type\": \"number\"\n },\n {\n \"start\": 1,\n \"name\": \"stop\",\n \"type\": \"number\"\n },\n {\n \"start\": 2,\n \"name\": \"num\",\n \"type\": \"number\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"OneHot\",\n \"category\": \"creation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"indices\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"depth\",\n \"type\": \"number\"\n },\n {\n \"start\": 2,\n \"name\": \"onValue\",\n \"type\": \"number\",\n \"defaultValue\": 1\n },\n {\n \"start\": 3,\n \"name\": \"offValue\",\n \"type\": \"number\",\n \"defaultValue\": 0\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"axis\",\n \"name\": \"axis\",\n \"type\": \"number\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"Ones\",\n \"category\": \"creation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"shape\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"OnesLike\",\n \"category\": \"creation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"dtype\",\n \"name\": \"dtype\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"RandomStandardNormal\",\n \"category\": \"creation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"shape\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"seed\",\n \"name\": \"seed\",\n \"type\": \"number\",\n \"defaultValue\": 0\n },\n {\n \"tfName\": \"seed2\",\n \"name\": \"seed2\",\n \"type\": \"number\",\n \"defaultValue\": 0,\n \"notSupported\": true\n },\n {\n \"tfName\": \"dtype\",\n \"name\": \"dtype\",\n \"type\": \"dtype\"\n },\n {\n \"tfName\": \"T\",\n \"name\": \"T\",\n \"type\": \"number\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"RandomUniform\",\n \"category\": \"creation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"shape\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"minval\",\n \"name\": \"minval\",\n \"type\": \"number\",\n \"defaultValue\": 0\n },\n {\n \"tfName\": \"maxval\",\n \"name\": \"maxval\",\n \"type\": \"number\",\n \"defaultValue\": 1\n },\n {\n \"tfName\": \"dtype\",\n \"name\": \"dtype\",\n \"type\": \"dtype\"\n },\n {\n \"tfName\": \"seed\",\n \"name\": \"seed\",\n \"type\": \"number\",\n \"defaultValue\": 0\n },\n {\n \"tfName\": \"seed2\",\n \"name\": \"seed2\",\n \"type\": \"number\",\n \"defaultValue\": 0,\n \"notSupported\": true\n },\n {\n \"tfName\": \"T\",\n \"name\": \"T\",\n \"type\": \"number\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Range\",\n \"category\": \"creation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"start\",\n \"type\": \"number\"\n },\n {\n \"start\": 1,\n \"name\": \"stop\",\n \"type\": \"number\"\n },\n {\n \"start\": 2,\n \"name\": \"step\",\n \"type\": \"number\",\n \"defaultValue\": 0\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"Tidx\",\n \"name\": \"dtype\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"TruncatedNormal\",\n \"category\": \"creation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"shape\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"means\",\n \"name\": \"mean\",\n \"type\": \"number\",\n \"defaultValue\": 0\n },\n {\n \"tfName\": \"stddev\",\n \"name\": \"stdDev\",\n \"type\": \"number\",\n \"defaultValue\": 1\n },\n {\n \"tfName\": \"seed\",\n \"name\": \"seed\",\n \"type\": \"number\"\n },\n {\n \"tfName\": \"seed2\",\n \"name\": \"seed2\",\n \"type\": \"number\",\n \"defaultValue\": 0,\n \"notSupported\": true\n },\n {\n \"tfName\": \"dtype\",\n \"name\": \"dtype\",\n \"type\": \"dtype\"\n },\n {\n \"tfName\": \"T\",\n \"name\": \"T\",\n \"type\": \"number\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Zeros\",\n \"category\": \"creation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"shape\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"ZerosLike\",\n \"category\": \"creation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"Multinomial\",\n \"category\": \"creation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"logits\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"numSamples\",\n \"type\": \"number\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"seed\",\n \"name\": \"seed\",\n \"type\": \"number\"\n },\n {\n \"tfName\": \"seed2\",\n \"name\": \"seed2\",\n \"type\": \"number\"\n },\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\"\n },\n {\n \"tfName\": \"output_dtype\",\n \"name\": \"output_dtype\",\n \"type\": \"dtype\"\n }\n ]\n }\n];\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/dynamic.js\nvar dynamic_exports = {};\n__export(dynamic_exports, {\n json: () => json6\n});\nvar json6 = [\n {\n \"tfOpName\": \"NonMaxSuppressionV2\",\n \"category\": \"dynamic\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"boxes\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"scores\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"name\": \"maxOutputSize\",\n \"type\": \"number\"\n },\n {\n \"start\": 3,\n \"name\": \"iouThreshold\",\n \"type\": \"number\"\n }\n ]\n },\n {\n \"tfOpName\": \"NonMaxSuppressionV3\",\n \"category\": \"dynamic\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"boxes\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"scores\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"name\": \"maxOutputSize\",\n \"type\": \"number\"\n },\n {\n \"start\": 3,\n \"name\": \"iouThreshold\",\n \"type\": \"number\"\n },\n {\n \"start\": 4,\n \"name\": \"scoreThreshold\",\n \"type\": \"number\"\n }\n ]\n },\n {\n \"tfOpName\": \"NonMaxSuppressionV4\",\n \"category\": \"dynamic\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"boxes\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"scores\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"name\": \"maxOutputSize\",\n \"type\": \"number\"\n },\n {\n \"start\": 3,\n \"name\": \"iouThreshold\",\n \"type\": \"number\"\n },\n {\n \"start\": 4,\n \"name\": \"scoreThreshold\",\n \"type\": \"number\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"T_threshold\",\n \"name\": \"threshold\",\n \"type\": \"dtype\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"pad_to_max_output_size\",\n \"name\": \"padToMaxOutputSize\",\n \"type\": \"bool\"\n }\n ]\n },\n {\n \"tfOpName\": \"NonMaxSuppressionV5\",\n \"category\": \"dynamic\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"boxes\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"scores\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"name\": \"maxOutputSize\",\n \"type\": \"number\"\n },\n {\n \"start\": 3,\n \"name\": \"iouThreshold\",\n \"type\": \"number\"\n },\n {\n \"start\": 4,\n \"name\": \"scoreThreshold\",\n \"type\": \"number\"\n },\n {\n \"start\": 5,\n \"name\": \"softNmsSigma\",\n \"type\": \"number\"\n }\n ]\n },\n {\n \"tfOpName\": \"Where\",\n \"category\": \"dynamic\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"condition\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"ListDiff\",\n \"category\": \"dynamic\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"y\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n }\n];\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/evaluation.js\nvar evaluation_exports = {};\n__export(evaluation_exports, {\n json: () => json7\n});\nvar json7 = [\n {\n \"tfOpName\": \"LowerBound\",\n \"category\": \"evaluation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"sortedSequence\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"values\",\n \"type\": \"tensor\"\n }\n ]\n },\n {\n \"tfOpName\": \"TopKV2\",\n \"category\": \"evaluation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"k\",\n \"type\": \"number\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"sorted\",\n \"name\": \"sorted\",\n \"type\": \"bool\"\n }\n ]\n },\n {\n \"tfOpName\": \"UpperBound\",\n \"category\": \"evaluation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"sortedSequence\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"values\",\n \"type\": \"tensor\"\n }\n ]\n },\n {\n \"tfOpName\": \"Unique\",\n \"category\": \"evaluation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ]\n },\n {\n \"tfOpName\": \"UniqueV2\",\n \"category\": \"evaluation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"axis\",\n \"type\": \"number\"\n }\n ]\n }\n];\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/graph.js\nvar graph_exports = {};\n__export(graph_exports, {\n json: () => json8\n});\nvar json8 = [\n {\n \"tfOpName\": \"PlaceholderWithDefault\",\n \"category\": \"graph\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"default\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"shape\",\n \"name\": \"shape\",\n \"type\": \"shape\"\n },\n {\n \"tfName\": \"dtype\",\n \"name\": \"dtype\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"Placeholder\",\n \"category\": \"graph\",\n \"attrs\": [\n {\n \"tfName\": \"shape\",\n \"name\": \"shape\",\n \"type\": \"shape\"\n },\n {\n \"tfName\": \"dtype\",\n \"name\": \"dtype\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"Const\",\n \"category\": \"graph\"\n },\n {\n \"tfOpName\": \"Identity\",\n \"category\": \"graph\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ]\n },\n {\n \"tfOpName\": \"IdentityN\",\n \"category\": \"graph\",\n \"inputs\": [\n {\n \"start\": 0,\n \"end\": 0,\n \"name\": \"x\",\n \"type\": \"tensors\"\n }\n ]\n },\n {\n \"tfOpName\": \"Snapshot\",\n \"category\": \"graph\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ]\n },\n {\n \"tfOpName\": \"Rank\",\n \"category\": \"graph\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ]\n },\n {\n \"tfOpName\": \"Size\",\n \"category\": \"graph\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ]\n },\n {\n \"tfOpName\": \"Shape\",\n \"category\": \"graph\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ]\n },\n {\n \"tfOpName\": \"ShapeN\",\n \"category\": \"graph\",\n \"inputs\": [\n {\n \"start\": 0,\n \"end\": 0,\n \"name\": \"x\",\n \"type\": \"tensors\"\n }\n ]\n },\n {\n \"tfOpName\": \"Print\",\n \"category\": \"graph\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"data\",\n \"type\": \"tensors\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"message\",\n \"name\": \"message\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"first_n\",\n \"name\": \"firstN\",\n \"type\": \"number\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"summarize\",\n \"name\": \"summarize\",\n \"type\": \"number\",\n \"defaultValue\": 3\n }\n ]\n },\n {\n \"tfOpName\": \"NoOp\",\n \"category\": \"graph\",\n \"inputs\": []\n },\n {\n \"tfOpName\": \"StopGradient\",\n \"category\": \"graph\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ]\n },\n {\n \"tfOpName\": \"FakeQuantWithMinMaxVars\",\n \"category\": \"graph\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"min\",\n \"name\": \"min\",\n \"type\": \"number\"\n },\n {\n \"tfName\": \"max\",\n \"name\": \"max\",\n \"type\": \"number\"\n }\n ]\n }\n];\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/hash_table.js\nvar hash_table_exports = {};\n__export(hash_table_exports, {\n json: () => json9\n});\nvar json9 = [\n {\n \"tfOpName\": \"HashTable\",\n \"category\": \"hash_table\",\n \"inputs\": [],\n \"attrs\": [\n {\n \"tfName\": \"shared_name\",\n \"name\": \"sharedName\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"use_node_name_sharing\",\n \"name\": \"useNodeNameSharing\",\n \"type\": \"bool\"\n },\n {\n \"tfName\": \"key_dtype\",\n \"name\": \"keyDType\",\n \"type\": \"dtype\"\n },\n {\n \"tfName\": \"value_dtype\",\n \"name\": \"valueDType\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"HashTableV2\",\n \"category\": \"hash_table\",\n \"inputs\": [],\n \"attrs\": [\n {\n \"tfName\": \"shared_name\",\n \"name\": \"sharedName\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"use_node_name_sharing\",\n \"name\": \"useNodeNameSharing\",\n \"type\": \"bool\"\n },\n {\n \"tfName\": \"key_dtype\",\n \"name\": \"keyDType\",\n \"type\": \"dtype\"\n },\n {\n \"tfName\": \"value_dtype\",\n \"name\": \"valueDType\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"LookupTableImport\",\n \"category\": \"hash_table\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tableHandle\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"keys\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"name\": \"values\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"Tin\",\n \"name\": \"tIn\",\n \"type\": \"dtype\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"Tout\",\n \"name\": \"tOut\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"LookupTableImportV2\",\n \"category\": \"hash_table\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tableHandle\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"keys\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"name\": \"values\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"Tin\",\n \"name\": \"tIn\",\n \"type\": \"dtype\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"Tout\",\n \"name\": \"tOut\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"LookupTableFind\",\n \"category\": \"hash_table\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tableHandle\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"keys\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"name\": \"defaultValue\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"Tin\",\n \"name\": \"tIn\",\n \"type\": \"dtype\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"Tout\",\n \"name\": \"tOut\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"LookupTableFindV2\",\n \"category\": \"hash_table\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tableHandle\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"keys\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"name\": \"defaultValue\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"Tin\",\n \"name\": \"tIn\",\n \"type\": \"dtype\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"Tout\",\n \"name\": \"tOut\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"LookupTableSize\",\n \"category\": \"hash_table\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tableHandle\",\n \"type\": \"tensor\"\n }\n ]\n },\n {\n \"tfOpName\": \"LookupTableSizeV2\",\n \"category\": \"hash_table\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tableHandle\",\n \"type\": \"tensor\"\n }\n ]\n }\n];\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/image.js\nvar image_exports = {};\n__export(image_exports, {\n json: () => json10\n});\nvar json10 = [\n {\n \"tfOpName\": \"ResizeBilinear\",\n \"category\": \"image\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"images\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"size\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"align_corners\",\n \"name\": \"alignCorners\",\n \"type\": \"bool\"\n },\n {\n \"tfName\": \"half_pixel_centers\",\n \"name\": \"halfPixelCenters\",\n \"type\": \"bool\"\n },\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"ResizeNearestNeighbor\",\n \"category\": \"image\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"images\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"size\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"align_corners\",\n \"name\": \"alignCorners\",\n \"type\": \"bool\"\n },\n {\n \"tfName\": \"half_pixel_centers\",\n \"name\": \"halfPixelCenters\",\n \"type\": \"bool\"\n },\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"CropAndResize\",\n \"category\": \"image\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"image\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"boxes\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"name\": \"boxInd\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 3,\n \"name\": \"cropSize\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"method\",\n \"name\": \"method\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"extrapolation_value\",\n \"name\": \"extrapolationValue\",\n \"type\": \"number\"\n }\n ]\n },\n {\n \"tfOpName\": \"ImageProjectiveTransformV3\",\n \"category\": \"image\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"images\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"transforms\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"name\": \"outputShape\",\n \"type\": \"number[]\"\n },\n {\n \"start\": 3,\n \"name\": \"fillValue\",\n \"type\": \"number\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"interpolation\",\n \"name\": \"interpolation\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"fill_mode\",\n \"name\": \"fillMode\",\n \"type\": \"string\"\n }\n ]\n }\n];\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/logical.js\nvar logical_exports = {};\n__export(logical_exports, {\n json: () => json11\n});\nvar json11 = [\n {\n \"tfOpName\": \"Equal\",\n \"category\": \"logical\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"NotEqual\",\n \"category\": \"logical\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Greater\",\n \"category\": \"logical\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"GreaterEqual\",\n \"category\": \"logical\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Less\",\n \"category\": \"logical\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"LessEqual\",\n \"category\": \"logical\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"LogicalAnd\",\n \"category\": \"logical\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"LogicalNot\",\n \"category\": \"logical\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"LogicalOr\",\n \"category\": \"logical\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Select\",\n \"category\": \"logical\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"condition\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"SelectV2\",\n \"category\": \"logical\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"condition\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n }\n];\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/matrices.js\nvar matrices_exports = {};\n__export(matrices_exports, {\n json: () => json12\n});\nvar json12 = [\n {\n \"tfOpName\": \"_FusedMatMul\",\n \"category\": \"matrices\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"end\": 0,\n \"name\": \"args\",\n \"type\": \"tensors\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"num_args\",\n \"name\": \"numArgs\",\n \"type\": \"number\"\n },\n {\n \"tfName\": \"fused_ops\",\n \"name\": \"fusedOps\",\n \"type\": \"string[]\",\n \"defaultValue\": []\n },\n {\n \"tfName\": \"epsilon\",\n \"name\": \"epsilon\",\n \"type\": \"number\",\n \"defaultValue\": 1e-4\n },\n {\n \"tfName\": \"transpose_a\",\n \"name\": \"transposeA\",\n \"type\": \"bool\",\n \"defaultValue\": false\n },\n {\n \"tfName\": \"transpose_b\",\n \"name\": \"transposeB\",\n \"type\": \"bool\",\n \"defaultValue\": false\n },\n {\n \"tfName\": \"leakyrelu_alpha\",\n \"name\": \"leakyreluAlpha\",\n \"type\": \"number\",\n \"defaultValue\": 0.2\n },\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"MatMul\",\n \"category\": \"matrices\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"transpose_a\",\n \"name\": \"transposeA\",\n \"type\": \"bool\",\n \"defaultValue\": false\n },\n {\n \"tfName\": \"transpose_b\",\n \"name\": \"transposeB\",\n \"type\": \"bool\",\n \"defaultValue\": false\n },\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"BatchMatMul\",\n \"category\": \"matrices\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"adj_x\",\n \"name\": \"transposeA\",\n \"type\": \"bool\",\n \"defaultValue\": false\n },\n {\n \"tfName\": \"adj_y\",\n \"name\": \"transposeB\",\n \"type\": \"bool\",\n \"defaultValue\": false\n },\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"BatchMatMulV2\",\n \"category\": \"matrices\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"adj_x\",\n \"name\": \"transposeA\",\n \"type\": \"bool\",\n \"defaultValue\": false\n },\n {\n \"tfName\": \"adj_y\",\n \"name\": \"transposeB\",\n \"type\": \"bool\",\n \"defaultValue\": false\n },\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Transpose\",\n \"category\": \"matrices\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"perm\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Einsum\",\n \"category\": \"matrices\",\n \"inputs\": [\n {\n \"start\": 0,\n \"end\": 0,\n \"name\": \"tensors\",\n \"type\": \"tensors\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"equation\",\n \"name\": \"equation\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"N\",\n \"name\": \"n\",\n \"type\": \"number\",\n \"defaultValue\": 2\n },\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\"\n }\n ]\n }\n];\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/normalization.js\nvar normalization_exports = {};\n__export(normalization_exports, {\n json: () => json13\n});\nvar json13 = [\n {\n \"tfOpName\": \"EuclideanNorm\",\n \"category\": \"normalization\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"axis\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"keep_dims\",\n \"name\": \"keepDims\",\n \"type\": \"bool\",\n \"defaultValue\": false\n }\n ]\n },\n {\n \"tfOpName\": \"FusedBatchNorm\",\n \"category\": \"normalization\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"scale\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"name\": \"offset\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 3,\n \"name\": \"mean\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 4,\n \"name\": \"variance\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"epsilon\",\n \"name\": \"epsilon\",\n \"type\": \"number\",\n \"defaultValue\": 1e-3\n },\n {\n \"tfName\": \"data_format\",\n \"name\": \"dataFormat\",\n \"type\": \"string\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"FusedBatchNormV2\",\n \"category\": \"normalization\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"scale\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"name\": \"offset\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 3,\n \"name\": \"mean\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 4,\n \"name\": \"variance\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"epsilon\",\n \"name\": \"epsilon\",\n \"type\": \"number\",\n \"defaultValue\": 1e-3\n },\n {\n \"tfName\": \"data_format\",\n \"name\": \"dataFormat\",\n \"type\": \"string\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"FusedBatchNormV3\",\n \"category\": \"normalization\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"scale\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"name\": \"offset\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 3,\n \"name\": \"mean\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 4,\n \"name\": \"variance\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"epsilon\",\n \"name\": \"epsilon\",\n \"type\": \"number\",\n \"defaultValue\": 1e-3\n },\n {\n \"tfName\": \"data_format\",\n \"name\": \"dataFormat\",\n \"type\": \"string\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"LRN\",\n \"category\": \"normalization\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"depth_radius\",\n \"name\": \"radius\",\n \"type\": \"number\",\n \"defaultValue\": 5\n },\n {\n \"tfName\": \"bias\",\n \"name\": \"bias\",\n \"type\": \"number\",\n \"defaultValue\": 1\n },\n {\n \"tfName\": \"alpha\",\n \"name\": \"alpha\",\n \"type\": \"number\",\n \"defaultValue\": 1\n },\n {\n \"tfName\": \"beta\",\n \"name\": \"beta\",\n \"type\": \"number\",\n \"defaultValue\": 0.5\n }\n ]\n },\n {\n \"tfOpName\": \"Softmax\",\n \"category\": \"normalization\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ]\n },\n {\n \"tfOpName\": \"LogSoftmax\",\n \"category\": \"normalization\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ]\n },\n {\n \"tfOpName\": \"SparseToDense\",\n \"category\": \"normalization\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"sparseIndices\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"outputShape\",\n \"type\": \"number[]\"\n },\n {\n \"start\": 2,\n \"name\": \"sparseValues\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 3,\n \"name\": \"defaultValue\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"validate_indices\",\n \"name\": \"validateIndices\",\n \"type\": \"bool\",\n \"defaultValue\": true,\n \"notSupported\": true\n }\n ]\n }\n];\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/reduction.js\nvar reduction_exports = {};\n__export(reduction_exports, {\n json: () => json14\n});\nvar json14 = [\n {\n \"tfOpName\": \"Bincount\",\n \"category\": \"reduction\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"size\",\n \"type\": \"number\"\n },\n {\n \"start\": 2,\n \"name\": \"weights\",\n \"type\": \"tensor\"\n }\n ]\n },\n {\n \"tfOpName\": \"DenseBincount\",\n \"category\": \"reduction\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"size\",\n \"type\": \"number\"\n },\n {\n \"start\": 2,\n \"name\": \"weights\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"binary_output\",\n \"name\": \"binaryOutput\",\n \"type\": \"bool\"\n }\n ]\n },\n {\n \"tfOpName\": \"Max\",\n \"category\": \"reduction\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"axis\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"keep_dims\",\n \"name\": \"keepDims\",\n \"type\": \"bool\"\n }\n ]\n },\n {\n \"tfOpName\": \"Mean\",\n \"category\": \"reduction\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"axis\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"keep_dims\",\n \"name\": \"keepDims\",\n \"type\": \"bool\"\n }\n ]\n },\n {\n \"tfOpName\": \"Min\",\n \"category\": \"reduction\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"axis\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"keep_dims\",\n \"name\": \"keepDims\",\n \"type\": \"bool\"\n }\n ]\n },\n {\n \"tfOpName\": \"Sum\",\n \"category\": \"reduction\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"axis\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"keep_dims\",\n \"name\": \"keepDims\",\n \"type\": \"bool\"\n }\n ]\n },\n {\n \"tfOpName\": \"All\",\n \"category\": \"reduction\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"axis\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"keep_dims\",\n \"name\": \"keepDims\",\n \"type\": \"bool\"\n }\n ]\n },\n {\n \"tfOpName\": \"Any\",\n \"category\": \"reduction\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"axis\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"keep_dims\",\n \"name\": \"keepDims\",\n \"type\": \"bool\"\n }\n ]\n },\n {\n \"tfOpName\": \"ArgMax\",\n \"category\": \"reduction\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"axis\",\n \"type\": \"number\"\n }\n ]\n },\n {\n \"tfOpName\": \"ArgMin\",\n \"category\": \"reduction\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"axis\",\n \"type\": \"number\"\n }\n ]\n },\n {\n \"tfOpName\": \"Prod\",\n \"category\": \"reduction\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"axis\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"keep_dims\",\n \"name\": \"keepDims\",\n \"type\": \"bool\"\n }\n ]\n },\n {\n \"tfOpName\": \"Cumprod\",\n \"category\": \"reduction\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"axis\",\n \"type\": \"number\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"exclusive\",\n \"name\": \"exclusive\",\n \"type\": \"bool\"\n },\n {\n \"tfName\": \"reverse\",\n \"name\": \"reverse\",\n \"type\": \"bool\"\n }\n ]\n },\n {\n \"tfOpName\": \"Cumsum\",\n \"category\": \"reduction\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"axis\",\n \"type\": \"number\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"exclusive\",\n \"name\": \"exclusive\",\n \"type\": \"bool\"\n },\n {\n \"tfName\": \"reverse\",\n \"name\": \"reverse\",\n \"type\": \"bool\"\n }\n ]\n }\n];\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/slice_join.js\nvar slice_join_exports = {};\n__export(slice_join_exports, {\n json: () => json15\n});\nvar json15 = [\n {\n \"tfOpName\": \"ConcatV2\",\n \"category\": \"slice_join\",\n \"inputs\": [\n {\n \"start\": 0,\n \"end\": -1,\n \"name\": \"tensors\",\n \"type\": \"tensors\"\n },\n {\n \"start\": -1,\n \"name\": \"axis\",\n \"type\": \"number\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"N\",\n \"name\": \"n\",\n \"type\": \"number\",\n \"defaultValue\": 2\n }\n ]\n },\n {\n \"tfOpName\": \"Concat\",\n \"category\": \"slice_join\",\n \"inputs\": [\n {\n \"start\": 1,\n \"end\": 0,\n \"name\": \"tensors\",\n \"type\": \"tensors\"\n },\n {\n \"start\": 0,\n \"name\": \"axis\",\n \"type\": \"number\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"N\",\n \"name\": \"n\",\n \"type\": \"number\",\n \"defaultValue\": 2\n }\n ]\n },\n {\n \"tfOpName\": \"GatherV2\",\n \"category\": \"slice_join\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"indices\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"name\": \"axis\",\n \"type\": \"number\",\n \"defaultValue\": 0\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"batch_dims\",\n \"name\": \"batchDims\",\n \"type\": \"number\",\n \"defaultValue\": 0\n }\n ]\n },\n {\n \"tfOpName\": \"Gather\",\n \"category\": \"slice_join\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"indices\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"validate_indices\",\n \"name\": \"validateIndices\",\n \"type\": \"bool\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Reverse\",\n \"category\": \"slice_join\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"dims\",\n \"type\": \"bool[]\"\n }\n ]\n },\n {\n \"tfOpName\": \"ReverseV2\",\n \"category\": \"slice_join\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"axis\",\n \"type\": \"number[]\"\n }\n ]\n },\n {\n \"tfOpName\": \"Slice\",\n \"category\": \"slice_join\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"begin\",\n \"type\": \"number[]\"\n },\n {\n \"start\": 2,\n \"name\": \"size\",\n \"type\": \"number[]\"\n }\n ]\n },\n {\n \"tfOpName\": \"StridedSlice\",\n \"category\": \"slice_join\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"begin\",\n \"type\": \"number[]\"\n },\n {\n \"start\": 2,\n \"name\": \"end\",\n \"type\": \"number[]\"\n },\n {\n \"start\": 3,\n \"name\": \"strides\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"begin_mask\",\n \"name\": \"beginMask\",\n \"type\": \"number\",\n \"defaultValue\": 0\n },\n {\n \"tfName\": \"end_mask\",\n \"name\": \"endMask\",\n \"type\": \"number\",\n \"defaultValue\": 0\n },\n {\n \"tfName\": \"new_axis_mask\",\n \"name\": \"newAxisMask\",\n \"type\": \"number\",\n \"defaultValue\": 0\n },\n {\n \"tfName\": \"ellipsis_mask\",\n \"name\": \"ellipsisMask\",\n \"type\": \"number\",\n \"defaultValue\": 0\n },\n {\n \"tfName\": \"shrink_axis_mask\",\n \"name\": \"shrinkAxisMask\",\n \"type\": \"number\",\n \"defaultValue\": 0\n }\n ]\n },\n {\n \"tfOpName\": \"Pack\",\n \"category\": \"slice_join\",\n \"inputs\": [\n {\n \"start\": 0,\n \"end\": 0,\n \"name\": \"tensors\",\n \"type\": \"tensors\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"axis\",\n \"name\": \"axis\",\n \"type\": \"number\",\n \"defaultValue\": 0\n }\n ]\n },\n {\n \"tfOpName\": \"Unpack\",\n \"category\": \"slice_join\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensor\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"axis\",\n \"name\": \"axis\",\n \"type\": \"number\",\n \"defaultValue\": 0\n },\n {\n \"tfName\": \"num\",\n \"name\": \"num\",\n \"type\": \"number\",\n \"defaultValue\": 0,\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Tile\",\n \"category\": \"slice_join\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"reps\",\n \"type\": \"number[]\"\n }\n ]\n },\n {\n \"tfOpName\": \"Split\",\n \"category\": \"slice_join\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"axis\",\n \"type\": \"number\",\n \"defaultValue\": 0\n },\n {\n \"start\": 1,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"num_split\",\n \"name\": \"numOrSizeSplits\",\n \"type\": \"number\",\n \"defaultValue\": 1\n }\n ]\n },\n {\n \"tfOpName\": \"SplitV\",\n \"category\": \"slice_join\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"numOrSizeSplits\",\n \"type\": \"number[]\"\n },\n {\n \"start\": 2,\n \"name\": \"axis\",\n \"type\": \"number\",\n \"defaultValue\": 0\n }\n ]\n },\n {\n \"tfOpName\": \"ScatterNd\",\n \"category\": \"slice_join\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"indices\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"values\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"name\": \"shape\",\n \"type\": \"number[]\"\n }\n ]\n },\n {\n \"tfOpName\": \"GatherNd\",\n \"category\": \"slice_join\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"indices\",\n \"type\": \"tensor\"\n }\n ]\n },\n {\n \"tfOpName\": \"SparseToDense\",\n \"category\": \"slice_join\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"sparseIndices\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"outputShape\",\n \"type\": \"number[]\"\n },\n {\n \"start\": 2,\n \"name\": \"sparseValues\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 3,\n \"name\": \"defaultValue\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"validate_indices\",\n \"name\": \"validateIndices\",\n \"type\": \"bool\",\n \"defaultValue\": false,\n \"notSupported\": true\n }\n ]\n }\n];\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/sparse.js\nvar sparse_exports = {};\n__export(sparse_exports, {\n json: () => json16\n});\nvar json16 = [\n {\n \"tfOpName\": \"SparseFillEmptyRows\",\n \"category\": \"sparse\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"indices\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"values\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"name\": \"denseShape\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 3,\n \"name\": \"defaultValue\",\n \"type\": \"tensor\"\n }\n ]\n },\n {\n \"tfOpName\": \"SparseReshape\",\n \"category\": \"sparse\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"inputIndices\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"inputShape\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"name\": \"newShape\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"SparseSegmentMean\",\n \"category\": \"sparse\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"data\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"indices\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"name\": \"segmentIds\",\n \"type\": \"tensor\"\n }\n ]\n },\n {\n \"tfOpName\": \"SparseSegmentSum\",\n \"category\": \"sparse\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"data\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"indices\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"name\": \"segmentIds\",\n \"type\": \"tensor\"\n }\n ]\n }\n];\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/spectral.js\nvar spectral_exports = {};\n__export(spectral_exports, {\n json: () => json17\n});\nvar json17 = [\n {\n \"tfOpName\": \"FFT\",\n \"category\": \"spectral\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ]\n },\n {\n \"tfOpName\": \"IFFT\",\n \"category\": \"spectral\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ]\n },\n {\n \"tfOpName\": \"RFFT\",\n \"category\": \"spectral\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"fft_length\",\n \"type\": \"number\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"IRFFT\",\n \"category\": \"spectral\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"fft_length\",\n \"type\": \"number\",\n \"notSupported\": true\n }\n ]\n }\n];\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/string.js\nvar string_exports = {};\n__export(string_exports, {\n json: () => json18\n});\nvar json18 = [\n {\n \"tfOpName\": \"StringNGrams\",\n \"category\": \"string\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"data\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"dataSplits\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"separator\",\n \"name\": \"separator\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"ngram_widths\",\n \"name\": \"nGramWidths\",\n \"type\": \"number[]\"\n },\n {\n \"tfName\": \"left_pad\",\n \"name\": \"leftPad\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"right_pad\",\n \"name\": \"rightPad\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"pad_width\",\n \"name\": \"padWidth\",\n \"type\": \"number\"\n },\n {\n \"tfName\": \"preserve_short_sequences\",\n \"name\": \"preserveShortSequences\",\n \"type\": \"bool\"\n }\n ],\n \"outputs\": [\n \"ngrams\",\n \"ngrams_splits\"\n ]\n },\n {\n \"tfOpName\": \"StringSplit\",\n \"category\": \"string\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"input\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"delimiter\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"skip_empty\",\n \"name\": \"skipEmpty\",\n \"type\": \"bool\"\n }\n ],\n \"outputs\": [\n \"indices\",\n \"values\",\n \"shape\"\n ]\n },\n {\n \"tfOpName\": \"StringToHashBucketFast\",\n \"category\": \"string\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"input\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"num_buckets\",\n \"name\": \"numBuckets\",\n \"type\": \"number\"\n }\n ]\n }\n];\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/transformation.js\nvar transformation_exports = {};\n__export(transformation_exports, {\n json: () => json19\n});\nvar json19 = [\n {\n \"tfOpName\": \"Cast\",\n \"category\": \"transformation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"SrcT\",\n \"name\": \"sdtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"DstT\",\n \"name\": \"dtype\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"ExpandDims\",\n \"category\": \"transformation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"axis\",\n \"type\": \"number\"\n }\n ]\n },\n {\n \"tfOpName\": \"MirrorPad\",\n \"category\": \"transformation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"padding\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"mode\",\n \"name\": \"mode\",\n \"type\": \"string\"\n }\n ]\n },\n {\n \"tfOpName\": \"Pad\",\n \"category\": \"transformation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"padding\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"constant_value\",\n \"name\": \"constantValue\",\n \"type\": \"number\",\n \"defaultValue\": 0\n }\n ]\n },\n {\n \"tfOpName\": \"PadV2\",\n \"category\": \"transformation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"padding\",\n \"type\": \"number[]\"\n },\n {\n \"start\": 2,\n \"name\": \"constantValue\",\n \"type\": \"number\",\n \"defaultValue\": 0\n }\n ]\n },\n {\n \"tfOpName\": \"Reshape\",\n \"category\": \"transformation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"shape\",\n \"type\": \"number[]\"\n }\n ]\n },\n {\n \"tfOpName\": \"Squeeze\",\n \"category\": \"transformation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"axis\",\n \"tfDeprecatedName\": \"squeeze_dims\",\n \"name\": \"axis\",\n \"type\": \"number[]\"\n }\n ]\n },\n {\n \"tfOpName\": \"SpaceToBatchND\",\n \"category\": \"transformation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"blockShape\",\n \"type\": \"number[]\"\n },\n {\n \"start\": 2,\n \"name\": \"paddings\",\n \"type\": \"number[]\"\n }\n ]\n },\n {\n \"tfOpName\": \"BatchToSpaceND\",\n \"category\": \"transformation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"blockShape\",\n \"type\": \"number[]\"\n },\n {\n \"start\": 2,\n \"name\": \"crops\",\n \"type\": \"number[]\"\n }\n ]\n },\n {\n \"tfOpName\": \"DepthToSpace\",\n \"category\": \"transformation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"block_size\",\n \"name\": \"blockSize\",\n \"type\": \"number\"\n },\n {\n \"tfName\": \"data_format\",\n \"name\": \"dataFormat\",\n \"type\": \"string\"\n }\n ]\n },\n {\n \"tfOpName\": \"BroadcastTo\",\n \"category\": \"transformation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"shape\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": []\n },\n {\n \"tfOpName\": \"BroadcastArgs\",\n \"category\": \"transformation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"s0\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"s1\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": []\n }\n];\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/operation_mapper.js\nvar OperationMapper = class {\n static get Instance() {\n return this._instance || (this._instance = new this());\n }\n constructor() {\n const ops = [\n arithmetic_exports,\n basic_math_exports,\n control_exports,\n convolution_exports,\n creation_exports,\n dynamic_exports,\n evaluation_exports,\n graph_exports,\n hash_table_exports,\n image_exports,\n logical_exports,\n matrices_exports,\n normalization_exports,\n reduction_exports,\n slice_join_exports,\n sparse_exports,\n spectral_exports,\n string_exports,\n transformation_exports\n ];\n const mappersJson = [].concat(...ops.map((op2) => op2.json));\n this.opMappers = mappersJson.reduce((map, mapper) => {\n map[mapper.tfOpName] = mapper;\n return map;\n }, {});\n }\n transformGraph(graph, signature = {}) {\n const tfNodes = graph.node;\n const placeholders = [];\n const weights = [];\n const initNodes = [];\n const nodes = tfNodes.reduce((map, node) => {\n map[node.name] = this.mapNode(node);\n if (node.op.startsWith(\"Placeholder\")) {\n placeholders.push(map[node.name]);\n } else if (node.op === \"Const\") {\n weights.push(map[node.name]);\n } else if (node.input == null || node.input.length === 0) {\n initNodes.push(map[node.name]);\n }\n return map;\n }, {});\n let inputs = [];\n const outputs = [];\n let inputNodeNameToKey = {};\n let outputNodeNameToKey = {};\n if (signature != null) {\n inputNodeNameToKey = this.mapSignatureEntries(signature.inputs);\n outputNodeNameToKey = this.mapSignatureEntries(signature.outputs);\n }\n const allNodes = Object.keys(nodes);\n allNodes.forEach((key) => {\n const node = nodes[key];\n node.inputNames.forEach((name, index) => {\n const [nodeName, , outputName] = getNodeNameAndIndex(name);\n const inputNode = nodes[nodeName];\n if (inputNode.outputs != null) {\n const outputIndex = inputNode.outputs.indexOf(outputName);\n if (outputIndex !== -1) {\n const inputName = `${nodeName}:${outputIndex}`;\n node.inputNames[index] = inputName;\n }\n }\n node.inputs.push(inputNode);\n inputNode.children.push(node);\n });\n });\n if (Object.keys(outputNodeNameToKey).length === 0) {\n allNodes.forEach((key) => {\n const node = nodes[key];\n if (node.children.length === 0) {\n outputs.push(node);\n }\n });\n } else {\n Object.keys(outputNodeNameToKey).forEach((name) => {\n const [nodeName] = getNodeNameAndIndex(name);\n const node = nodes[nodeName];\n if (node != null) {\n node.signatureKey = outputNodeNameToKey[name];\n outputs.push(node);\n }\n });\n }\n if (Object.keys(inputNodeNameToKey).length > 0) {\n Object.keys(inputNodeNameToKey).forEach((name) => {\n const [nodeName] = getNodeNameAndIndex(name);\n const node = nodes[nodeName];\n if (node) {\n node.signatureKey = inputNodeNameToKey[name];\n inputs.push(node);\n }\n });\n } else {\n inputs = placeholders;\n }\n let functions = {};\n if (graph.library != null && graph.library.function != null) {\n functions = graph.library.function.reduce((functions2, func2) => {\n functions2[func2.signature.name] = this.mapFunction(func2);\n return functions2;\n }, {});\n }\n const result = { nodes, inputs, outputs, weights, placeholders, signature, functions };\n if (initNodes.length > 0) {\n result.initNodes = initNodes;\n }\n return result;\n }\n mapSignatureEntries(entries) {\n return Object.keys(entries || {}).reduce((prev, curr) => {\n prev[entries[curr].name] = curr;\n return prev;\n }, {});\n }\n mapNode(node) {\n const mapper = getRegisteredOp(node.op) || this.opMappers[node.op] || {};\n if (node.attr == null) {\n node.attr = {};\n }\n const newNode = {\n name: node.name,\n op: node.op,\n category: mapper.category,\n inputNames: (node.input || []).map((input2) => input2.startsWith(\"^\") ? input2.slice(1) : input2),\n inputs: [],\n children: [],\n inputParams: {},\n attrParams: {},\n rawAttrs: node.attr,\n outputs: mapper.outputs\n };\n if (mapper.inputs != null) {\n newNode.inputParams = mapper.inputs.reduce((map, param) => {\n map[param.name] = {\n type: param.type,\n inputIndexStart: param.start,\n inputIndexEnd: param.end\n };\n return map;\n }, {});\n }\n if (mapper.attrs != null) {\n newNode.attrParams = mapper.attrs.reduce((map, param) => {\n const type = param.type;\n let value = void 0;\n switch (param.type) {\n case \"string\":\n value = getStringParam(node.attr, param.tfName, param.defaultValue);\n if (value === void 0 && !!param.tfDeprecatedName) {\n value = getStringParam(node.attr, param.tfDeprecatedName, param.defaultValue);\n }\n break;\n case \"string[]\":\n value = getStringArrayParam(node.attr, param.tfName, param.defaultValue);\n if (value === void 0 && !!param.tfDeprecatedName) {\n value = getStringArrayParam(node.attr, param.tfDeprecatedName, param.defaultValue);\n }\n break;\n case \"number\":\n value = getNumberParam(node.attr, param.tfName, param.defaultValue || 0);\n if (value === void 0 && !!param.tfDeprecatedName) {\n value = getNumberParam(node.attr, param.tfDeprecatedName, param.defaultValue);\n }\n break;\n case \"number[]\":\n value = getNumericArrayParam(node.attr, param.tfName, param.defaultValue);\n if (value === void 0 && !!param.tfDeprecatedName) {\n value = getNumericArrayParam(node.attr, param.tfDeprecatedName, param.defaultValue);\n }\n break;\n case \"bool\":\n value = getBoolParam(node.attr, param.tfName, param.defaultValue);\n if (value === void 0 && !!param.tfDeprecatedName) {\n value = getBoolParam(node.attr, param.tfDeprecatedName, param.defaultValue);\n }\n break;\n case \"bool[]\":\n value = getBoolArrayParam(node.attr, param.tfName, param.defaultValue);\n if (value === void 0 && !!param.tfDeprecatedName) {\n value = getBoolArrayParam(node.attr, param.tfDeprecatedName, param.defaultValue);\n }\n break;\n case \"shape\":\n value = getTensorShapeParam(node.attr, param.tfName, param.defaultValue);\n if (value === void 0 && !!param.tfDeprecatedName) {\n value = getTensorShapeParam(node.attr, param.tfDeprecatedName, param.defaultValue);\n }\n break;\n case \"shape[]\":\n value = getTensorShapeArrayParam(node.attr, param.tfName, param.defaultValue);\n if (value === void 0 && !!param.tfDeprecatedName) {\n value = getTensorShapeArrayParam(node.attr, param.tfDeprecatedName, param.defaultValue);\n }\n break;\n case \"dtype\":\n value = getDtypeParam(node.attr, param.tfName, param.defaultValue);\n if (value === void 0 && !!param.tfDeprecatedName) {\n value = getDtypeParam(node.attr, param.tfDeprecatedName, param.defaultValue);\n }\n break;\n case \"dtype[]\":\n value = getDtypeArrayParam(node.attr, param.tfName, param.defaultValue);\n if (value === void 0 && !!param.tfDeprecatedName) {\n value = getDtypeArrayParam(node.attr, param.tfDeprecatedName, param.defaultValue);\n }\n break;\n case \"func\":\n value = getFuncParam(node.attr, param.tfName, param.defaultValue);\n if (value === void 0 && !!param.tfDeprecatedName) {\n value = getFuncParam(node.attr, param.tfDeprecatedName, param.defaultValue);\n }\n break;\n case \"tensor\":\n case \"tensors\":\n break;\n default:\n throw new Error(`Unsupported param type: ${param.type} for op: ${node.op}`);\n }\n map[param.name] = { value, type };\n return map;\n }, {});\n }\n return newNode;\n }\n mapFunction(functionDef) {\n const tfNodes = functionDef.nodeDef;\n const placeholders = [];\n const weights = [];\n let nodes = {};\n if (tfNodes != null) {\n nodes = tfNodes.reduce((map, node) => {\n map[node.name] = this.mapNode(node);\n if (node.op === \"Const\") {\n weights.push(map[node.name]);\n }\n return map;\n }, {});\n }\n const inputs = [];\n const outputs = [];\n functionDef.signature.inputArg.forEach((arg) => {\n const [nodeName] = getNodeNameAndIndex(arg.name);\n const node = {\n name: nodeName,\n op: \"Placeholder\",\n inputs: [],\n inputNames: [],\n category: \"graph\",\n inputParams: {},\n attrParams: { dtype: { value: parseDtypeParam(arg.type), type: \"dtype\" } },\n children: []\n };\n node.signatureKey = arg.name;\n inputs.push(node);\n nodes[nodeName] = node;\n });\n const allNodes = Object.keys(nodes);\n allNodes.forEach((key) => {\n const node = nodes[key];\n node.inputNames.forEach((name, index) => {\n const [nodeName, , outputName] = getNodeNameAndIndex(name);\n const inputNode = nodes[nodeName];\n if (inputNode.outputs != null) {\n const outputIndex = inputNode.outputs.indexOf(outputName);\n if (outputIndex !== -1) {\n const inputName = `${nodeName}:${outputIndex}`;\n node.inputNames[index] = inputName;\n }\n }\n node.inputs.push(inputNode);\n inputNode.children.push(node);\n });\n });\n const returnNodeMap = functionDef.ret;\n functionDef.signature.outputArg.forEach((output) => {\n const [nodeName, index] = getNodeNameAndIndex(returnNodeMap[output.name]);\n const node = nodes[nodeName];\n if (node != null) {\n node.defaultOutput = index;\n outputs.push(node);\n }\n });\n const signature = this.mapArgsToSignature(functionDef);\n return { nodes, inputs, outputs, weights, placeholders, signature };\n }\n mapArgsToSignature(functionDef) {\n return {\n methodName: functionDef.signature.name,\n inputs: functionDef.signature.inputArg.reduce((map, arg) => {\n map[arg.name] = this.mapArgToTensorInfo(arg);\n return map;\n }, {}),\n outputs: functionDef.signature.outputArg.reduce((map, arg) => {\n map[arg.name] = this.mapArgToTensorInfo(arg, functionDef.ret);\n return map;\n }, {})\n };\n }\n mapArgToTensorInfo(arg, nameMap2) {\n let name = arg.name;\n if (nameMap2 != null) {\n name = nameMap2[name];\n }\n return { name, dtype: arg.type };\n }\n};\nfunction decodeBase64(text) {\n const global2 = env().global;\n if (typeof global2.atob !== \"undefined\") {\n return global2.atob(text);\n } else if (typeof Buffer !== \"undefined\") {\n return new Buffer(text, \"base64\").toString();\n } else {\n throw new Error(\"Unable to decode base64 in this environment. Missing built-in atob() or Buffer()\");\n }\n}\nfunction parseStringParam(s, keepCase) {\n const value = Array.isArray(s) ? String.fromCharCode.apply(null, s) : decodeBase64(s);\n return keepCase ? value : value.toLowerCase();\n}\nfunction getStringParam(attrs, name, def, keepCase = false) {\n const param = attrs[name];\n if (param != null) {\n return parseStringParam(param.s, keepCase);\n }\n return def;\n}\nfunction getBoolParam(attrs, name, def) {\n const param = attrs[name];\n return param ? param.b : def;\n}\nfunction getNumberParam(attrs, name, def) {\n const param = attrs[name] || {};\n const value = param[\"i\"] != null ? param[\"i\"] : param[\"f\"] != null ? param[\"f\"] : def;\n return typeof value === \"number\" ? value : parseInt(value, 10);\n}\nfunction parseDtypeParam(value) {\n if (typeof value === \"string\") {\n value = DataType[value];\n }\n switch (value) {\n case DataType.DT_FLOAT:\n case DataType.DT_HALF:\n return \"float32\";\n case DataType.DT_INT32:\n case DataType.DT_INT64:\n case DataType.DT_INT8:\n case DataType.DT_UINT8:\n return \"int32\";\n case DataType.DT_BOOL:\n return \"bool\";\n case DataType.DT_DOUBLE:\n return \"float32\";\n case DataType.DT_STRING:\n return \"string\";\n default:\n return null;\n }\n}\nfunction getFuncParam(attrs, name, def) {\n const param = attrs[name];\n if (param && param.func) {\n return param.func.name;\n }\n return def;\n}\nfunction getDtypeParam(attrs, name, def) {\n const param = attrs[name];\n if (param && param.type) {\n return parseDtypeParam(param.type);\n }\n return def;\n}\nfunction getDtypeArrayParam(attrs, name, def) {\n const param = attrs[name];\n if (param && param.list && param.list.type) {\n return param.list.type.map((v) => parseDtypeParam(v));\n }\n return def;\n}\nfunction parseTensorShapeParam(shape) {\n if (shape.unknownRank) {\n return void 0;\n }\n if (shape.dim != null) {\n return shape.dim.map((dim) => typeof dim.size === \"number\" ? dim.size : parseInt(dim.size, 10));\n }\n return [];\n}\nfunction getTensorShapeParam(attrs, name, def) {\n const param = attrs[name];\n if (param && param.shape) {\n return parseTensorShapeParam(param.shape);\n }\n return def;\n}\nfunction getNumericArrayParam(attrs, name, def) {\n const param = attrs[name];\n if (param) {\n return ((param.list.f && param.list.f.length ? param.list.f : param.list.i) || []).map((v) => typeof v === \"number\" ? v : parseInt(v, 10));\n }\n return def;\n}\nfunction getStringArrayParam(attrs, name, def, keepCase = false) {\n const param = attrs[name];\n if (param && param.list && param.list.s) {\n return param.list.s.map((v) => {\n return parseStringParam(v, keepCase);\n });\n }\n return def;\n}\nfunction getTensorShapeArrayParam(attrs, name, def) {\n const param = attrs[name];\n if (param && param.list && param.list.shape) {\n return param.list.shape.map((v) => {\n return parseTensorShapeParam(v);\n });\n }\n return def;\n}\nfunction getBoolArrayParam(attrs, name, def) {\n const param = attrs[name];\n if (param && param.list && param.list.b) {\n return param.list.b;\n }\n return def;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/custom_op/node_value_impl.js\nvar NodeValueImpl = class {\n constructor(node, tensorMap, context) {\n this.node = node;\n this.tensorMap = tensorMap;\n this.context = context;\n this.inputs = [];\n this.attrs = {};\n this.inputs = node.inputNames.map((name) => this.getInput(name));\n if (node.rawAttrs != null) {\n this.attrs = Object.keys(node.rawAttrs).reduce((attrs, key) => {\n attrs[key] = this.getAttr(key);\n return attrs;\n }, {});\n }\n }\n getInput(name) {\n return getTensor(name, this.tensorMap, this.context);\n }\n getAttr(name, defaultValue) {\n const value = this.node.rawAttrs[name];\n if (value.tensor != null) {\n return getTensor(name, this.tensorMap, this.context);\n }\n if (value.i != null || value.f != null) {\n return getNumberParam(this.node.rawAttrs, name, defaultValue);\n }\n if (value.s != null) {\n return getStringParam(this.node.rawAttrs, name, defaultValue);\n }\n if (value.b != null) {\n return getBoolParam(this.node.rawAttrs, name, defaultValue);\n }\n if (value.shape != null) {\n return getTensorShapeParam(this.node.rawAttrs, name, defaultValue);\n }\n if (value.type != null) {\n return getDtypeParam(this.node.rawAttrs, name, defaultValue);\n }\n if (value.list != null) {\n if (value.list.i != null || value.list.f != null) {\n return getNumericArrayParam(this.node.rawAttrs, name, defaultValue);\n }\n if (value.list.s != null) {\n return getStringArrayParam(this.node.rawAttrs, name, defaultValue);\n }\n if (value.list.shape != null) {\n return getTensorShapeArrayParam(this.node.rawAttrs, name, defaultValue);\n }\n if (value.list.b != null) {\n return getBoolArrayParam(this.node.rawAttrs, name, defaultValue);\n }\n if (value.list.type != null) {\n return getDtypeArrayParam(this.node.rawAttrs, name, defaultValue);\n }\n }\n return defaultValue;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/ops_for_converter.js\nvar ops_for_converter_exports = {};\n__export(ops_for_converter_exports, {\n OP_SCOPE_SUFFIX: () => OP_SCOPE_SUFFIX,\n abs: () => abs,\n acos: () => acos,\n acosh: () => acosh,\n add: () => add2,\n addN: () => addN,\n all: () => all,\n any: () => any,\n argMax: () => argMax,\n argMin: () => argMin,\n asin: () => asin,\n asinh: () => asinh,\n atan: () => atan,\n atan2: () => atan2,\n atanh: () => atanh,\n avgPool: () => avgPool,\n avgPool3d: () => avgPool3d,\n basicLSTMCell: () => basicLSTMCell,\n batchNorm: () => batchNorm,\n batchNorm2d: () => batchNorm2d,\n batchNorm3d: () => batchNorm3d,\n batchNorm4d: () => batchNorm4d,\n batchToSpaceND: () => batchToSpaceND,\n bincount: () => bincount,\n booleanMaskAsync: () => booleanMaskAsync,\n broadcastArgs: () => broadcastArgs,\n broadcastTo: () => broadcastTo,\n buffer: () => buffer,\n cast: () => cast,\n ceil: () => ceil,\n clipByValue: () => clipByValue,\n clone: () => clone,\n complex: () => complex,\n concat: () => concat,\n concat1d: () => concat1d,\n concat2d: () => concat2d,\n concat3d: () => concat3d,\n concat4d: () => concat4d,\n conv1d: () => conv1d,\n conv2d: () => conv2d,\n conv2dTranspose: () => conv2dTranspose,\n conv3d: () => conv3d,\n conv3dTranspose: () => conv3dTranspose,\n cos: () => cos,\n cosh: () => cosh,\n cosineWindow: () => cosineWindow,\n cumprod: () => cumprod,\n cumsum: () => cumsum,\n denseBincount: () => denseBincount,\n depthToSpace: () => depthToSpace,\n depthwiseConv2d: () => depthwiseConv2d,\n diag: () => diag,\n dilation2d: () => dilation2d,\n div: () => div,\n divNoNan: () => divNoNan,\n dot: () => dot,\n dropout: () => dropout,\n einsum: () => einsum,\n elu: () => elu,\n enclosingPowerOfTwo: () => enclosingPowerOfTwo,\n equal: () => equal,\n erf: () => erf,\n euclideanNorm: () => euclideanNorm,\n exp: () => exp,\n expandDims: () => expandDims,\n expm1: () => expm1,\n eye: () => eye,\n fft: () => fft,\n fill: () => fill,\n floor: () => floor,\n floorDiv: () => floorDiv,\n fused: () => fused_ops_exports,\n gather: () => gather,\n gatherND: () => gatherND,\n greater: () => greater,\n greaterEqual: () => greaterEqual,\n ifft: () => ifft,\n imag: () => imag,\n image: () => image,\n inTopKAsync: () => inTopKAsync,\n irfft: () => irfft,\n isFinite: () => isFinite2,\n isInf: () => isInf,\n isNaN: () => isNaN2,\n leakyRelu: () => leakyRelu,\n less: () => less,\n lessEqual: () => lessEqual,\n linalg: () => linalg,\n linspace: () => linspace,\n localResponseNormalization: () => localResponseNormalization,\n log: () => log2,\n log1p: () => log1p,\n logSigmoid: () => logSigmoid,\n logSoftmax: () => logSoftmax,\n logSumExp: () => logSumExp,\n logicalAnd: () => logicalAnd,\n logicalNot: () => logicalNot,\n logicalOr: () => logicalOr,\n logicalXor: () => logicalXor,\n losses: () => losses,\n lowerBound: () => lowerBound,\n matMul: () => matMul,\n max: () => max,\n maxPool: () => maxPool,\n maxPool3d: () => maxPool3d,\n maxPoolWithArgmax: () => maxPoolWithArgmax,\n maximum: () => maximum,\n mean: () => mean,\n meshgrid: () => meshgrid,\n min: () => min,\n minimum: () => minimum,\n mirrorPad: () => mirrorPad,\n mod: () => mod,\n moments: () => moments,\n movingAverage: () => movingAverage,\n mul: () => mul,\n multiRNNCell: () => multiRNNCell,\n multinomial: () => multinomial,\n neg: () => neg,\n norm: () => norm,\n notEqual: () => notEqual,\n oneHot: () => oneHot,\n ones: () => ones2,\n onesLike: () => onesLike,\n op: () => op,\n outerProduct: () => outerProduct,\n pad: () => pad,\n pad1d: () => pad1d,\n pad2d: () => pad2d,\n pad3d: () => pad3d,\n pad4d: () => pad4d,\n pool: () => pool,\n pow: () => pow,\n prelu: () => prelu,\n print: () => print,\n prod: () => prod,\n raggedTensorToTensor: () => raggedTensorToTensor,\n rand: () => rand,\n randomGamma: () => randomGamma,\n randomNormal: () => randomNormal,\n randomStandardNormal: () => randomStandardNormal,\n randomUniform: () => randomUniform,\n range: () => range,\n real: () => real,\n reciprocal: () => reciprocal,\n relu: () => relu,\n relu6: () => relu6,\n reshape: () => reshape,\n reverse: () => reverse,\n reverse1d: () => reverse1d,\n reverse2d: () => reverse2d,\n reverse3d: () => reverse3d,\n reverse4d: () => reverse4d,\n rfft: () => rfft,\n round: () => round2,\n rsqrt: () => rsqrt,\n scalar: () => scalar,\n scatterND: () => scatterND,\n searchSorted: () => searchSorted,\n selu: () => selu,\n separableConv2d: () => separableConv2d,\n setdiff1dAsync: () => setdiff1dAsync,\n sigmoid: () => sigmoid,\n sign: () => sign,\n signal: () => signal,\n sin: () => sin,\n sinh: () => sinh,\n slice: () => slice,\n slice1d: () => slice1d,\n slice2d: () => slice2d,\n slice3d: () => slice3d,\n slice4d: () => slice4d,\n softmax: () => softmax,\n softplus: () => softplus,\n spaceToBatchND: () => spaceToBatchND,\n sparse: () => sparse,\n sparseToDense: () => sparseToDense,\n spectral: () => spectral,\n split: () => split,\n sqrt: () => sqrt,\n square: () => square,\n squaredDifference: () => squaredDifference,\n squeeze: () => squeeze,\n stack: () => stack,\n step: () => step,\n stridedSlice: () => stridedSlice,\n string: () => string,\n sub: () => sub,\n sum: () => sum2,\n tan: () => tan,\n tanh: () => tanh2,\n tensor: () => tensor,\n tensor1d: () => tensor1d,\n tensor2d: () => tensor2d,\n tensor3d: () => tensor3d,\n tensor4d: () => tensor4d,\n tensor5d: () => tensor5d,\n tensor6d: () => tensor6d,\n tile: () => tile,\n topk: () => topk,\n transpose: () => transpose,\n truncatedNormal: () => truncatedNormal,\n unique: () => unique,\n unsortedSegmentSum: () => unsortedSegmentSum,\n unstack: () => unstack,\n upperBound: () => upperBound,\n variable: () => variable,\n where: () => where,\n whereAsync: () => whereAsync,\n zeros: () => zeros,\n zerosLike: () => zerosLike\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/arithmetic_executor.js\nvar executeOp = (node, tensorMap, context, ops = ops_for_converter_exports) => {\n switch (node.op) {\n case \"BiasAdd\":\n case \"AddV2\":\n case \"Add\": {\n return [ops.add(getParamValue(\"a\", node, tensorMap, context), getParamValue(\"b\", node, tensorMap, context))];\n }\n case \"AddN\": {\n return [ops.addN(getParamValue(\"tensors\", node, tensorMap, context))];\n }\n case \"FloorMod\":\n case \"Mod\":\n return [ops.mod(getParamValue(\"a\", node, tensorMap, context), getParamValue(\"b\", node, tensorMap, context))];\n case \"Mul\":\n return [ops.mul(getParamValue(\"a\", node, tensorMap, context), getParamValue(\"b\", node, tensorMap, context))];\n case \"RealDiv\":\n case \"Div\": {\n return [ops.div(getParamValue(\"a\", node, tensorMap, context), getParamValue(\"b\", node, tensorMap, context))];\n }\n case \"DivNoNan\": {\n return [ops.divNoNan(getParamValue(\"a\", node, tensorMap, context), getParamValue(\"b\", node, tensorMap, context))];\n }\n case \"FloorDiv\": {\n return [ops.floorDiv(getParamValue(\"a\", node, tensorMap, context), getParamValue(\"b\", node, tensorMap, context))];\n }\n case \"Sub\": {\n return [ops.sub(getParamValue(\"a\", node, tensorMap, context), getParamValue(\"b\", node, tensorMap, context))];\n }\n case \"Minimum\": {\n return [ops.minimum(getParamValue(\"a\", node, tensorMap, context), getParamValue(\"b\", node, tensorMap, context))];\n }\n case \"Maximum\": {\n return [ops.maximum(getParamValue(\"a\", node, tensorMap, context), getParamValue(\"b\", node, tensorMap, context))];\n }\n case \"Pow\": {\n return [ops.pow(getParamValue(\"a\", node, tensorMap, context), getParamValue(\"b\", node, tensorMap, context))];\n }\n case \"SquaredDifference\": {\n return [ops.squaredDifference(getParamValue(\"a\", node, tensorMap, context), getParamValue(\"b\", node, tensorMap, context))];\n }\n default:\n throw TypeError(`Node type ${node.op} is not implemented`);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/basic_math_executor.js\nvar executeOp2 = (node, tensorMap, context, ops = ops_for_converter_exports) => {\n switch (node.op) {\n case \"Abs\":\n case \"ComplexAbs\":\n return [ops.abs(getParamValue(\"x\", node, tensorMap, context))];\n case \"Acos\":\n return [ops.acos(getParamValue(\"x\", node, tensorMap, context))];\n case \"Acosh\":\n return [ops.acosh(getParamValue(\"x\", node, tensorMap, context))];\n case \"Asin\":\n return [ops.asin(getParamValue(\"x\", node, tensorMap, context))];\n case \"Asinh\":\n return [ops.asinh(getParamValue(\"x\", node, tensorMap, context))];\n case \"Atan\":\n return [ops.atan(getParamValue(\"x\", node, tensorMap, context))];\n case \"Atan2\":\n return [ops.atan2(getParamValue(\"x\", node, tensorMap, context), getParamValue(\"y\", node, tensorMap, context))];\n case \"Atanh\":\n return [ops.atanh(getParamValue(\"x\", node, tensorMap, context))];\n case \"Ceil\":\n return [ops.ceil(getParamValue(\"x\", node, tensorMap, context))];\n case \"Complex\":\n return [ops.complex(getParamValue(\"real\", node, tensorMap, context), getParamValue(\"imag\", node, tensorMap, context))];\n case \"Cos\":\n return [ops.cos(getParamValue(\"x\", node, tensorMap, context))];\n case \"Cosh\":\n return [ops.cosh(getParamValue(\"x\", node, tensorMap, context))];\n case \"Elu\":\n return [ops.elu(getParamValue(\"x\", node, tensorMap, context))];\n case \"Erf\":\n return [ops.erf(getParamValue(\"x\", node, tensorMap, context))];\n case \"Exp\":\n return [ops.exp(getParamValue(\"x\", node, tensorMap, context))];\n case \"Expm1\": {\n return [ops.expm1(getParamValue(\"x\", node, tensorMap, context))];\n }\n case \"Floor\":\n return [ops.floor(getParamValue(\"x\", node, tensorMap, context))];\n case \"Log\":\n return [ops.log(getParamValue(\"x\", node, tensorMap, context))];\n case \"Log1p\": {\n return [ops.log1p(getParamValue(\"x\", node, tensorMap, context))];\n }\n case \"Imag\":\n return [ops.imag(getParamValue(\"x\", node, tensorMap, context))];\n case \"Neg\":\n return [ops.neg(getParamValue(\"x\", node, tensorMap, context))];\n case \"Reciprocal\": {\n return [ops.reciprocal(getParamValue(\"x\", node, tensorMap, context))];\n }\n case \"Real\":\n return [ops.real(getParamValue(\"x\", node, tensorMap, context))];\n case \"Relu\":\n return [ops.relu(getParamValue(\"x\", node, tensorMap, context))];\n case \"Round\": {\n return [ops.round(getParamValue(\"x\", node, tensorMap, context))];\n }\n case \"Selu\":\n return [ops.selu(getParamValue(\"x\", node, tensorMap, context))];\n case \"Sigmoid\":\n return [ops.sigmoid(getParamValue(\"x\", node, tensorMap, context))];\n case \"Sin\":\n return [ops.sin(getParamValue(\"x\", node, tensorMap, context))];\n case \"Sign\": {\n return [ops.sign(getParamValue(\"x\", node, tensorMap, context))];\n }\n case \"Sinh\": {\n return [ops.sinh(getParamValue(\"x\", node, tensorMap, context))];\n }\n case \"Softplus\": {\n return [ops.softplus(getParamValue(\"x\", node, tensorMap, context))];\n }\n case \"Sqrt\": {\n return [ops.sqrt(getParamValue(\"x\", node, tensorMap, context))];\n }\n case \"Square\": {\n return [ops.square(getParamValue(\"x\", node, tensorMap, context))];\n }\n case \"Tanh\": {\n return [ops.tanh(getParamValue(\"x\", node, tensorMap, context))];\n }\n case \"Tan\":\n return [ops.tan(getParamValue(\"x\", node, tensorMap, context))];\n case \"ClipByValue\":\n return [ops.clipByValue(getParamValue(\"x\", node, tensorMap, context), getParamValue(\"clipValueMin\", node, tensorMap, context), getParamValue(\"clipValueMax\", node, tensorMap, context))];\n case \"Relu6\":\n return [ops.relu6(getParamValue(\"x\", node, tensorMap, context))];\n case \"Rsqrt\":\n return [ops.rsqrt(getTensor(node.inputNames[0], tensorMap, context))];\n case \"Prod\":\n return [ops.prod(getParamValue(\"x\", node, tensorMap, context), getParamValue(\"axes\", node, tensorMap, context))];\n case \"LeakyRelu\":\n return [ops.leakyRelu(getParamValue(\"x\", node, tensorMap, context), getParamValue(\"alpha\", node, tensorMap, context))];\n case \"Prelu\":\n return [ops.prelu(getParamValue(\"x\", node, tensorMap, context), getParamValue(\"alpha\", node, tensorMap, context))];\n case \"IsNan\":\n return [ops.isNaN(getTensor(node.inputNames[0], tensorMap, context))];\n default:\n throw TypeError(`Node type ${node.op} is not implemented`);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/executor/tensor_utils.js\nfunction assertShapesMatchAllowUndefinedSize(shapeA, shapeB, errorMessagePrefix = \"\") {\n if (typeof shapeA === \"number\" || typeof shapeB === \"number\") {\n return;\n }\n util_exports.assert(shapeA.length === shapeB.length, () => errorMessagePrefix + ` Shapes ${shapeA} and ${shapeB} must match`);\n for (let i = 0; i < shapeA.length; i++) {\n const dim0 = shapeA[i];\n const dim1 = shapeB[i];\n util_exports.assert(dim0 < 0 || dim1 < 0 || dim0 === dim1, () => errorMessagePrefix + ` Shapes ${shapeA} and ${shapeB} must match`);\n }\n}\nfunction fullDefinedShape(elementShape) {\n if (typeof elementShape === \"number\" || elementShape.some((dim) => dim < 0)) {\n return false;\n }\n return true;\n}\nfunction inferElementShape(listElementShape, tensors, elementShape) {\n let partialShape = mergeElementShape(listElementShape, elementShape);\n const notfullDefinedShape = !fullDefinedShape(partialShape);\n if (notfullDefinedShape && tensors.length === 0) {\n throw new Error(`Tried to calculate elements of an empty list with non-fully-defined elementShape: ${partialShape}`);\n }\n if (notfullDefinedShape) {\n tensors.forEach((tensor2) => {\n partialShape = mergeElementShape(tensor2.shape, partialShape);\n });\n }\n if (!fullDefinedShape(partialShape)) {\n throw new Error(`Non-fully-defined elementShape: ${partialShape}`);\n }\n return partialShape;\n}\nfunction mergeElementShape(elementShapeA, elementShapeB) {\n if (typeof elementShapeA === \"number\") {\n return elementShapeB;\n }\n if (typeof elementShapeB === \"number\") {\n return elementShapeA;\n }\n if (elementShapeA.length !== elementShapeB.length) {\n throw new Error(`Incompatible ranks during merge: ${elementShapeA} vs. ${elementShapeB}`);\n }\n const result = [];\n for (let i = 0; i < elementShapeA.length; ++i) {\n const dim0 = elementShapeA[i];\n const dim1 = elementShapeB[i];\n if (dim0 >= 0 && dim1 >= 0 && dim0 !== dim1) {\n throw new Error(`Incompatible shape during merge: ${elementShapeA} vs. ${elementShapeB}`);\n }\n result[i] = dim0 >= 0 ? dim0 : dim1;\n }\n return result;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/executor/tensor_array.js\nvar TensorArray = class {\n constructor(name, dtype, maxSize, elementShape, identicalElementShapes, dynamicSize, clearAfterRead) {\n this.name = name;\n this.dtype = dtype;\n this.maxSize = maxSize;\n this.elementShape = elementShape;\n this.identicalElementShapes = identicalElementShapes;\n this.dynamicSize = dynamicSize;\n this.clearAfterRead = clearAfterRead;\n this.tensors = [];\n this.closed_ = false;\n this.idTensor = scalar(0);\n keep(this.idTensor);\n }\n get id() {\n return this.idTensor.id;\n }\n get closed() {\n return this.closed_;\n }\n clearAndClose(keepIds) {\n this.tensors.forEach((tensor2) => {\n if (keepIds == null || !keepIds.has(tensor2.tensor.id)) {\n tensor2.tensor.dispose();\n }\n });\n this.tensors = [];\n this.closed_ = true;\n this.idTensor.dispose();\n }\n size() {\n return this.tensors.length;\n }\n read(index) {\n if (this.closed_) {\n throw new Error(`TensorArray ${this.name} has already been closed.`);\n }\n if (index < 0 || index >= this.size()) {\n throw new Error(`Tried to read from index ${index}, but array size is: ${this.size()}`);\n }\n const tensorWithState = this.tensors[index];\n if (tensorWithState.cleared) {\n throw new Error(`TensorArray ${this.name}: Could not read index ${index} twice because it was cleared after a previous read (perhaps try setting clear_after_read = false?).`);\n }\n if (this.clearAfterRead) {\n tensorWithState.cleared = true;\n }\n tensorWithState.read = true;\n return tensorWithState.tensor;\n }\n readMany(indices) {\n return indices.map((index) => this.read(index));\n }\n write(index, tensor2) {\n if (this.closed_) {\n throw new Error(`TensorArray ${this.name} has already been closed.`);\n }\n if (index < 0 || !this.dynamicSize && index >= this.maxSize) {\n throw new Error(`Tried to write to index ${index}, but array is not resizeable and size is: ${this.maxSize}`);\n }\n const t = this.tensors[index] || {};\n if (tensor2.dtype !== this.dtype) {\n throw new Error(`TensorArray ${this.name}: Could not write to TensorArray index ${index},\n because the value dtype is ${tensor2.dtype}, but TensorArray dtype is ${this.dtype}.`);\n }\n if (this.size() === 0 && (this.elementShape == null || this.elementShape.length === 0)) {\n this.elementShape = tensor2.shape;\n }\n assertShapesMatchAllowUndefinedSize(this.elementShape, tensor2.shape, `TensorArray ${this.name}: Could not write to TensorArray index ${index}.`);\n if (t.read) {\n throw new Error(`TensorArray ${this.name}: Could not write to TensorArray index ${index}, because it has already been read.`);\n }\n if (t.written) {\n throw new Error(`TensorArray ${this.name}: Could not write to TensorArray index ${index}, because it has already been written.`);\n }\n t.tensor = tensor2;\n keep(tensor2);\n t.written = true;\n this.tensors[index] = t;\n }\n writeMany(indices, tensors) {\n if (indices.length !== tensors.length) {\n throw new Error(`TensorArray ${this.name}: could not write multiple tensors,because the index size: ${indices.length} is not the same as tensors size: ${tensors.length}.`);\n }\n indices.forEach((i, index) => this.write(i, tensors[index]));\n }\n gather(indices, dtype) {\n if (!!dtype && dtype !== this.dtype) {\n throw new Error(`TensorArray dtype is ${this.dtype} but gather requested dtype ${dtype}`);\n }\n if (!indices) {\n indices = [];\n for (let i = 0; i < this.size(); i++) {\n indices.push(i);\n }\n } else {\n indices = indices.slice(0, this.size());\n }\n if (indices.length === 0) {\n return tensor([], [0].concat(this.elementShape));\n }\n const tensors = this.readMany(indices);\n assertShapesMatchAllowUndefinedSize(this.elementShape, tensors[0].shape, \"TensorArray shape mismatch: \");\n return stack(tensors, 0);\n }\n concat(dtype) {\n if (!!dtype && dtype !== this.dtype) {\n throw new Error(`TensorArray dtype is ${this.dtype} but concat requested dtype ${dtype}`);\n }\n if (this.size() === 0) {\n return tensor([], [0].concat(this.elementShape));\n }\n const indices = [];\n for (let i = 0; i < this.size(); i++) {\n indices.push(i);\n }\n const tensors = this.readMany(indices);\n assertShapesMatchAllowUndefinedSize(this.elementShape, tensors[0].shape, `TensorArray shape mismatch: tensor array shape (${this.elementShape}) vs first tensor shape (${tensors[0].shape})`);\n return concat(tensors, 0);\n }\n scatter(indices, tensor2) {\n if (tensor2.dtype !== this.dtype) {\n throw new Error(`TensorArray dtype is ${this.dtype} but tensor has dtype ${tensor2.dtype}`);\n }\n if (indices.length !== tensor2.shape[0]) {\n throw new Error(`Expected len(indices) == tensor.shape[0], but saw: ${indices.length} vs. ${tensor2.shape[0]}`);\n }\n const maxIndex = Math.max(...indices);\n if (!this.dynamicSize && maxIndex >= this.maxSize) {\n throw new Error(`Max index must be < array size (${maxIndex} vs. ${this.maxSize})`);\n }\n this.writeMany(indices, unstack(tensor2, 0));\n }\n split(length, tensor2) {\n if (tensor2.dtype !== this.dtype) {\n throw new Error(`TensorArray dtype is ${this.dtype} but tensor has dtype ${tensor2.dtype}`);\n }\n let totalLength = 0;\n const cumulativeLengths = length.map((len) => {\n totalLength += len;\n return totalLength;\n });\n if (totalLength !== tensor2.shape[0]) {\n throw new Error(`Expected sum of lengths to be equal to\n tensor.shape[0], but sum of lengths is\n ${totalLength}, and tensor's shape is: ${tensor2.shape}`);\n }\n if (!this.dynamicSize && length.length !== this.maxSize) {\n throw new Error(`TensorArray's size is not equal to the size of lengths (${this.maxSize} vs. ${length.length}), and the TensorArray is not marked as dynamically resizeable`);\n }\n const elementPerRow = totalLength === 0 ? 0 : tensor2.size / totalLength;\n const tensors = [];\n tidy(() => {\n tensor2 = reshape(tensor2, [1, totalLength, elementPerRow]);\n for (let i = 0; i < length.length; ++i) {\n const previousLength = i === 0 ? 0 : cumulativeLengths[i - 1];\n const indices2 = [0, previousLength, 0];\n const sizes = [1, length[i], elementPerRow];\n tensors[i] = reshape(slice(tensor2, indices2, sizes), this.elementShape);\n }\n return tensors;\n });\n const indices = [];\n for (let i = 0; i < length.length; i++) {\n indices[i] = i;\n }\n this.writeMany(indices, tensors);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/executor/tensor_list.js\nvar TensorList = class {\n constructor(tensors, elementShape, elementDtype, maxNumElements = -1) {\n this.tensors = tensors;\n this.elementShape = elementShape;\n this.elementDtype = elementDtype;\n if (tensors != null) {\n tensors.forEach((tensor2) => {\n if (elementDtype !== tensor2.dtype) {\n throw new Error(`Invalid data types; op elements ${elementDtype}, but list elements ${tensor2.dtype}`);\n }\n assertShapesMatchAllowUndefinedSize(elementShape, tensor2.shape, \"TensorList shape mismatch: \");\n keep(tensor2);\n });\n }\n this.idTensor = scalar(0);\n this.maxNumElements = maxNumElements;\n keep(this.idTensor);\n }\n get id() {\n return this.idTensor.id;\n }\n copy() {\n return new TensorList([...this.tensors], this.elementShape, this.elementDtype);\n }\n clearAndClose(keepIds) {\n this.tensors.forEach((tensor2) => {\n if (keepIds == null || !keepIds.has(tensor2.id)) {\n tensor2.dispose();\n }\n });\n this.tensors.length = 0;\n this.idTensor.dispose();\n }\n size() {\n return this.tensors.length;\n }\n stack(elementShape, elementDtype, numElements = -1) {\n if (elementDtype !== this.elementDtype) {\n throw new Error(`Invalid data types; op elements ${elementDtype}, but list elements ${this.elementDtype}`);\n }\n if (numElements !== -1 && this.tensors.length !== numElements) {\n throw new Error(`Operation expected a list with ${numElements} elements but got a list with ${this.tensors.length} elements.`);\n }\n assertShapesMatchAllowUndefinedSize(elementShape, this.elementShape, \"TensorList shape mismatch: \");\n const outputElementShape = inferElementShape(this.elementShape, this.tensors, elementShape);\n return tidy(() => {\n const reshapedTensors = this.tensors.map((tensor2) => reshape(tensor2, outputElementShape));\n return stack(reshapedTensors, 0);\n });\n }\n popBack(elementShape, elementDtype) {\n if (elementDtype !== this.elementDtype) {\n throw new Error(`Invalid data types; op elements ${elementDtype}, but list elements ${this.elementDtype}`);\n }\n if (this.size() === 0) {\n throw new Error(\"Trying to pop from an empty list.\");\n }\n const outputElementShape = inferElementShape(this.elementShape, this.tensors, elementShape);\n const tensor2 = this.tensors.pop();\n tensor2.kept = false;\n assertShapesMatchAllowUndefinedSize(tensor2.shape, elementShape, \"TensorList shape mismatch: \");\n return reshape(tensor2, outputElementShape);\n }\n pushBack(tensor2) {\n if (tensor2.dtype !== this.elementDtype) {\n throw new Error(`Invalid data types; op elements ${tensor2.dtype}, but list elements ${this.elementDtype}`);\n }\n assertShapesMatchAllowUndefinedSize(tensor2.shape, this.elementShape, \"TensorList shape mismatch: \");\n if (this.maxNumElements === this.size()) {\n throw new Error(`Trying to push element into a full list.`);\n }\n keep(tensor2);\n this.tensors.push(tensor2);\n }\n resize(size) {\n if (size < 0) {\n throw new Error(`TensorListResize expects size to be non-negative. Got: ${size}`);\n }\n if (this.maxNumElements !== -1 && size > this.maxNumElements) {\n throw new Error(`TensorListResize input size ${size} is greater maxNumElement ${this.maxNumElements}.`);\n }\n const destTensorList = new TensorList([], this.elementShape, this.elementDtype, this.maxNumElements);\n destTensorList.tensors.length = size;\n for (let i = 0; i < Math.min(this.tensors.length, size); ++i) {\n destTensorList.tensors[i] = this.tensors[i];\n }\n return destTensorList;\n }\n getItem(elementIndex, elementShape, elementDtype) {\n if (elementDtype !== this.elementDtype) {\n throw new Error(`Invalid data types; op elements ${elementDtype}, but list elements ${this.elementDtype}`);\n }\n if (elementIndex < 0 || elementIndex > this.tensors.length) {\n throw new Error(`Trying to access element ${elementIndex} in a list with ${this.tensors.length} elements.`);\n }\n if (this.tensors[elementIndex] == null) {\n throw new Error(`element at index ${elementIndex} is null.`);\n }\n assertShapesMatchAllowUndefinedSize(this.tensors[elementIndex].shape, elementShape, \"TensorList shape mismatch: \");\n const outputElementShape = inferElementShape(this.elementShape, this.tensors, elementShape);\n return reshape(this.tensors[elementIndex], outputElementShape);\n }\n setItem(elementIndex, tensor2) {\n if (tensor2.dtype !== this.elementDtype) {\n throw new Error(`Invalid data types; op elements ${tensor2.dtype}, but list elements ${this.elementDtype}`);\n }\n if (elementIndex < 0 || this.maxNumElements !== -1 && elementIndex >= this.maxNumElements) {\n throw new Error(`Trying to set element ${elementIndex} in a list with max ${this.maxNumElements} elements.`);\n }\n assertShapesMatchAllowUndefinedSize(this.elementShape, tensor2.shape, \"TensorList shape mismatch: \");\n keep(tensor2);\n if (this.tensors[elementIndex] != null) {\n this.tensors[elementIndex].kept = false;\n }\n this.tensors[elementIndex] = tensor2;\n }\n gather(indices, elementDtype, elementShape) {\n if (elementDtype !== this.elementDtype) {\n throw new Error(`Invalid data types; op elements ${elementDtype}, but list elements ${this.elementDtype}`);\n }\n assertShapesMatchAllowUndefinedSize(this.elementShape, elementShape, \"TensorList shape mismatch: \");\n indices = indices.slice(0, this.size());\n const outputElementShape = inferElementShape(this.elementShape, this.tensors, elementShape);\n if (indices.length === 0) {\n return tensor([], [0].concat(outputElementShape));\n }\n return tidy(() => {\n const tensors = indices.map((i) => reshape(this.tensors[i], outputElementShape));\n return stack(tensors, 0);\n });\n }\n concat(elementDtype, elementShape) {\n if (!!elementDtype && elementDtype !== this.elementDtype) {\n throw new Error(`TensorList dtype is ${this.elementDtype} but concat requested dtype ${elementDtype}`);\n }\n assertShapesMatchAllowUndefinedSize(this.elementShape, elementShape, \"TensorList shape mismatch: \");\n const outputElementShape = inferElementShape(this.elementShape, this.tensors, elementShape);\n if (this.size() === 0) {\n return tensor([], [0].concat(outputElementShape));\n }\n return tidy(() => {\n const tensors = this.tensors.map((t) => reshape(t, outputElementShape));\n return concat(tensors, 0);\n });\n }\n};\nfunction fromTensor(tensor2, elementShape, elementDtype) {\n const dtype = tensor2.dtype;\n if (tensor2.shape.length < 1) {\n throw new Error(`Tensor must be at least a vector, but saw shape: ${tensor2.shape}`);\n }\n if (tensor2.dtype !== elementDtype) {\n throw new Error(`Invalid data types; op elements ${tensor2.dtype}, but list elements ${elementDtype}`);\n }\n const tensorElementShape = tensor2.shape.slice(1);\n assertShapesMatchAllowUndefinedSize(tensorElementShape, elementShape, \"TensorList shape mismatch: \");\n const tensorList = unstack(tensor2);\n return new TensorList(tensorList, elementShape, dtype);\n}\nfunction reserve(elementShape, elementDtype, numElements, maxNumElements) {\n return new TensorList([], elementShape, elementDtype, maxNumElements);\n}\nfunction scatter(tensor2, indices, elementShape, numElements) {\n if (indices.length !== tensor2.shape[0]) {\n throw new Error(`Expected len(indices) == tensor.shape[0], but saw: ${indices.length} vs. ${tensor2.shape[0]}`);\n }\n const maxIndex = Math.max(...indices);\n if (numElements != null && numElements !== -1 && maxIndex >= numElements) {\n throw new Error(`Max index must be < array size (${maxIndex} vs. ${numElements})`);\n }\n const list = new TensorList([], elementShape, tensor2.dtype, numElements);\n const tensors = unstack(tensor2, 0);\n indices.forEach((value, index) => {\n list.setItem(value, tensors[index]);\n });\n return list;\n}\nfunction split2(tensor2, length, elementShape) {\n let totalLength = 0;\n const cumulativeLengths = length.map((len) => {\n totalLength += len;\n return totalLength;\n });\n if (totalLength !== tensor2.shape[0]) {\n throw new Error(`Expected sum of lengths to be equal to\n tensor.shape[0], but sum of lengths is\n ${totalLength}, and tensor's shape is: ${tensor2.shape}`);\n }\n const shapeWithoutFirstDim = tensor2.shape.slice(1);\n const outputElementShape = mergeElementShape(shapeWithoutFirstDim, elementShape);\n const elementPerRow = totalLength === 0 ? 0 : tensor2.size / totalLength;\n const tensors = tidy(() => {\n const tensors2 = [];\n tensor2 = reshape(tensor2, [1, totalLength, elementPerRow]);\n for (let i = 0; i < length.length; ++i) {\n const previousLength = i === 0 ? 0 : cumulativeLengths[i - 1];\n const indices = [0, previousLength, 0];\n const sizes = [1, length[i], elementPerRow];\n tensors2[i] = reshape(slice(tensor2, indices, sizes), outputElementShape);\n }\n tensor2.dispose();\n return tensors2;\n });\n const list = new TensorList([], elementShape, tensor2.dtype, length.length);\n for (let i = 0; i < tensors.length; i++) {\n list.setItem(i, tensors[i]);\n }\n return list;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/control_executor.js\nvar executeOp3 = async (node, tensorMap, context) => {\n switch (node.op) {\n case \"If\":\n case \"StatelessIf\": {\n const thenFunc = getParamValue(\"thenBranch\", node, tensorMap, context);\n const elseFunc = getParamValue(\"elseBranch\", node, tensorMap, context);\n const cond = getParamValue(\"cond\", node, tensorMap, context);\n const args = getParamValue(\"args\", node, tensorMap, context);\n const condValue = await cond.data();\n if (condValue[0]) {\n return context.functionMap[thenFunc].executeFunctionAsync(args, context.tensorArrayMap, context.tensorListMap);\n } else {\n return context.functionMap[elseFunc].executeFunctionAsync(args, context.tensorArrayMap, context.tensorListMap);\n }\n }\n case \"While\":\n case \"StatelessWhile\": {\n const bodyFunc = getParamValue(\"body\", node, tensorMap, context);\n const condFunc = getParamValue(\"cond\", node, tensorMap, context);\n const args = getParamValue(\"args\", node, tensorMap, context);\n const condResult = await context.functionMap[condFunc].executeFunctionAsync(args, context.tensorArrayMap, context.tensorListMap);\n const argIds = args.map((tensor2) => tensor2.id);\n let condValue = await condResult[0].data();\n condResult.forEach((tensor2) => {\n if (!tensor2.kept && argIds.indexOf(tensor2.id) === -1) {\n tensor2.dispose();\n }\n });\n let result = args;\n while (condValue[0]) {\n const origResult = result;\n result = await context.functionMap[bodyFunc].executeFunctionAsync(result, context.tensorArrayMap, context.tensorListMap);\n const resultIds = result.map((tensor2) => tensor2.id);\n origResult.forEach((tensor2) => {\n if (!tensor2.kept && argIds.indexOf(tensor2.id) === -1 && resultIds.indexOf(tensor2.id) === -1) {\n tensor2.dispose();\n }\n });\n const condResult2 = await context.functionMap[condFunc].executeFunctionAsync(result, context.tensorArrayMap, context.tensorListMap);\n condValue = await condResult2[0].data();\n condResult2.forEach((tensor2) => {\n if (!tensor2.kept && argIds.indexOf(tensor2.id) === -1 && resultIds.indexOf(tensor2.id) === -1) {\n tensor2.dispose();\n }\n });\n }\n return result;\n }\n case \"LoopCond\": {\n const pred = getParamValue(\"pred\", node, tensorMap, context);\n return [cloneTensor(pred)];\n }\n case \"Switch\": {\n const pred = getParamValue(\"pred\", node, tensorMap, context);\n let data = getParamValue(\"data\", node, tensorMap, context);\n if (!data.kept) {\n data = cloneTensor(data);\n }\n return (await pred.data())[0] ? [void 0, data] : [data, void 0];\n }\n case \"Merge\": {\n const inputName = node.inputNames.find((name) => getTensor(name, tensorMap, context) !== void 0);\n if (inputName) {\n const data = getTensor(inputName, tensorMap, context);\n return [cloneTensor(data)];\n }\n return void 0;\n }\n case \"Enter\": {\n const frameId = getParamValue(\"frameName\", node, tensorMap, context);\n const data = getParamValue(\"tensor\", node, tensorMap, context);\n context.enterFrame(frameId);\n return [cloneTensor(data)];\n }\n case \"Exit\": {\n const data = getParamValue(\"tensor\", node, tensorMap, context);\n context.exitFrame();\n return [cloneTensor(data)];\n }\n case \"NextIteration\": {\n const data = getParamValue(\"tensor\", node, tensorMap, context);\n context.nextIteration();\n return [cloneTensor(data)];\n }\n case \"TensorArrayV3\": {\n const size = getParamValue(\"size\", node, tensorMap, context);\n const dtype = getParamValue(\"dtype\", node, tensorMap, context);\n const elementShape = getParamValue(\"elementShape\", node, tensorMap, context);\n const dynamicSize = getParamValue(\"dynamicSize\", node, tensorMap, context);\n const clearAfterRead = getParamValue(\"clearAfterRead\", node, tensorMap, context);\n const identicalElementShapes = getParamValue(\"identicalElementShapes\", node, tensorMap, context);\n const name = getParamValue(\"name\", node, tensorMap, context);\n const tensorArray = new TensorArray(name, dtype, size, elementShape, identicalElementShapes, dynamicSize, clearAfterRead);\n context.addTensorArray(tensorArray);\n return [tensorArray.idTensor, scalar(1)];\n }\n case \"TensorArrayWriteV3\": {\n const id = getParamValue(\"tensorArrayId\", node, tensorMap, context);\n const index = getParamValue(\"index\", node, tensorMap, context);\n const writeTensor = getParamValue(\"tensor\", node, tensorMap, context);\n const writeTensorArray = context.getTensorArray(id.id);\n writeTensorArray.write(index, writeTensor);\n return [writeTensorArray.idTensor];\n }\n case \"TensorArrayReadV3\": {\n const readId = getParamValue(\"tensorArrayId\", node, tensorMap, context);\n const readIndex = getParamValue(\"index\", node, tensorMap, context);\n const readTensorArray = context.getTensorArray(readId.id);\n return [readTensorArray.read(readIndex)];\n }\n case \"TensorArrayGatherV3\": {\n const gatherId = getParamValue(\"tensorArrayId\", node, tensorMap, context);\n const gatherIndices = getParamValue(\"indices\", node, tensorMap, context);\n const gatherDtype = getParamValue(\"dtype\", node, tensorMap, context);\n const gatherTensorArray = context.getTensorArray(gatherId.id);\n return [gatherTensorArray.gather(gatherIndices, gatherDtype)];\n }\n case \"TensorArrayScatterV3\": {\n const scatterId = getParamValue(\"tensorArrayId\", node, tensorMap, context);\n const scatterIndices = getParamValue(\"indices\", node, tensorMap, context);\n const scatterTensor = getParamValue(\"tensor\", node, tensorMap, context);\n const scatterTensorArray = context.getTensorArray(scatterId.id);\n scatterTensorArray.scatter(scatterIndices, scatterTensor);\n return [scatterTensorArray.idTensor];\n }\n case \"TensorArrayConcatV3\": {\n const concatId = getParamValue(\"tensorArrayId\", node, tensorMap, context);\n const concatTensorArray = context.getTensorArray(concatId.id);\n const concatDtype = getParamValue(\"dtype\", node, tensorMap, context);\n return [concatTensorArray.concat(concatDtype)];\n }\n case \"TensorArraySplitV3\": {\n const splitId = getParamValue(\"tensorArrayId\", node, tensorMap, context);\n const splitTensor = getParamValue(\"tensor\", node, tensorMap, context);\n const lengths = getParamValue(\"lengths\", node, tensorMap, context);\n const splitTensorArray = context.getTensorArray(splitId.id);\n splitTensorArray.split(lengths, splitTensor);\n return [splitTensorArray.idTensor];\n }\n case \"TensorArraySizeV3\": {\n const sizeId = getParamValue(\"tensorArrayId\", node, tensorMap, context);\n const sizeTensorArray = context.getTensorArray(sizeId.id);\n return [scalar(sizeTensorArray.size(), \"int32\")];\n }\n case \"TensorArrayCloseV3\": {\n const closeId = getParamValue(\"tensorArrayId\", node, tensorMap, context);\n const closeTensorArray = context.getTensorArray(closeId.id);\n closeTensorArray.clearAndClose();\n return [closeTensorArray.idTensor];\n }\n case \"TensorListSetItem\": {\n const idTensor = getParamValue(\"tensorListId\", node, tensorMap, context);\n const index = getParamValue(\"index\", node, tensorMap, context);\n const writeTensor = getParamValue(\"tensor\", node, tensorMap, context);\n const tensorList = context.getTensorList(idTensor.id);\n tensorList.setItem(index, writeTensor);\n return [tensorList.idTensor];\n }\n case \"TensorListGetItem\": {\n const idTensor = getParamValue(\"tensorListId\", node, tensorMap, context);\n const readIndex = getParamValue(\"index\", node, tensorMap, context);\n const elementShape = getParamValue(\"elementShape\", node, tensorMap, context);\n const elementDType = getParamValue(\"elementDType\", node, tensorMap, context);\n const tensorList = context.getTensorList(idTensor.id);\n return [tensorList.getItem(readIndex, elementShape, elementDType)];\n }\n case \"TensorListScatterV2\":\n case \"TensorListScatter\": {\n const scatterIndices = getParamValue(\"indices\", node, tensorMap, context);\n const scatterTensor = getParamValue(\"tensor\", node, tensorMap, context);\n const elementShape = getParamValue(\"elementShape\", node, tensorMap, context);\n const numElements = getParamValue(\"numElements\", node, tensorMap, context);\n const tensorList = scatter(scatterTensor, scatterIndices, elementShape, numElements);\n context.addTensorList(tensorList);\n return [tensorList.idTensor];\n }\n case \"TensorListReserve\":\n case \"EmptyTensorList\": {\n const elementShape = getParamValue(\"elementShape\", node, tensorMap, context);\n const elementDtype = getParamValue(\"elementDType\", node, tensorMap, context);\n let numElementsParam;\n if (node.op === \"TensorListReserve\") {\n numElementsParam = \"numElements\";\n } else {\n numElementsParam = \"maxNumElements\";\n }\n const numElements = getParamValue(numElementsParam, node, tensorMap, context);\n const maxNumElements = node.op === \"TensorListReserve\" ? -1 : numElements;\n const tensorList = reserve(elementShape, elementDtype, numElements, maxNumElements);\n context.addTensorList(tensorList);\n return [tensorList.idTensor];\n }\n case \"TensorListGather\": {\n const gatherId = getParamValue(\"tensorListId\", node, tensorMap, context);\n const gatherIndices = getParamValue(\"indices\", node, tensorMap, context);\n const elementShape = getParamValue(\"elementShape\", node, tensorMap, context);\n const elementDtype = getParamValue(\"elementDType\", node, tensorMap, context);\n const tensorList = context.getTensorList(gatherId.id);\n return [tensorList.gather(gatherIndices, elementDtype, elementShape)];\n }\n case \"TensorListStack\": {\n const idTensor = getParamValue(\"tensorListId\", node, tensorMap, context);\n const elementShape = getParamValue(\"elementShape\", node, tensorMap, context);\n const elementDtype = getParamValue(\"elementDType\", node, tensorMap, context);\n const numElements = getParamValue(\"numElements\", node, tensorMap, context);\n const tensorList = context.getTensorList(idTensor.id);\n return [tensorList.stack(elementShape, elementDtype, numElements)];\n }\n case \"TensorListFromTensor\": {\n const tensor2 = getParamValue(\"tensor\", node, tensorMap, context);\n const elementShape = getParamValue(\"elementShape\", node, tensorMap, context);\n const elementDtype = getParamValue(\"elementDType\", node, tensorMap, context);\n const tensorList = fromTensor(tensor2, elementShape, elementDtype);\n context.addTensorList(tensorList);\n return [tensorList.idTensor];\n }\n case \"TensorListConcat\":\n case \"TensorListConcatV2\": {\n const concatId = getParamValue(\"tensorListId\", node, tensorMap, context);\n const tensorList = context.getTensorList(concatId.id);\n const concatDtype = getParamValue(\"dtype\", node, tensorMap, context);\n const elementShape = getParamValue(\"elementShape\", node, tensorMap, context);\n return [tensorList.concat(concatDtype, elementShape)];\n }\n case \"TensorListPushBack\": {\n const idTensor = getParamValue(\"tensorListId\", node, tensorMap, context);\n const writeTensor = getParamValue(\"tensor\", node, tensorMap, context);\n const tensorList = context.getTensorList(idTensor.id);\n tensorList.pushBack(writeTensor);\n return [tensorList.idTensor];\n }\n case \"TensorListPopBack\": {\n const idTensor = getParamValue(\"tensorListId\", node, tensorMap, context);\n const elementShape = getParamValue(\"elementShape\", node, tensorMap, context);\n const elementDType = getParamValue(\"elementDType\", node, tensorMap, context);\n const tensorList = context.getTensorList(idTensor.id);\n return [tensorList.popBack(elementShape, elementDType)];\n }\n case \"TensorListSplit\": {\n const splitTensor = getParamValue(\"tensor\", node, tensorMap, context);\n const elementShape = getParamValue(\"elementShape\", node, tensorMap, context);\n const lengths = getParamValue(\"lengths\", node, tensorMap, context);\n const tensorList = split2(splitTensor, lengths, elementShape);\n context.addTensorList(tensorList);\n return [tensorList.idTensor];\n }\n case \"TensorListLength\": {\n const idTensor = getParamValue(\"tensorListId\", node, tensorMap, context);\n const tensorList = context.getTensorList(idTensor.id);\n return [scalar(tensorList.size(), \"int32\")];\n }\n case \"TensorListResize\": {\n const idTensor = getParamValue(\"tensorListId\", node, tensorMap, context);\n const size = getParamValue(\"size\", node, tensorMap, context);\n const srcTensorList = context.getTensorList(idTensor.id);\n const destTensorList = srcTensorList.resize(size);\n context.addTensorList(destTensorList);\n return [destTensorList.idTensor];\n }\n default:\n throw TypeError(`Node type ${node.op} is not implemented`);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/convolution_executor.js\nfunction fusedConvAndDepthWiseParams(node, tensorMap, context) {\n const [extraOp, activationFunc] = getParamValue(\"fusedOps\", node, tensorMap, context);\n const isBiasAdd = extraOp === \"biasadd\";\n const noBiasAdd = !isBiasAdd;\n const isPrelu = activationFunc === \"prelu\";\n const isBatchNorm = extraOp === \"fusedbatchnorm\";\n const numArgs = getParamValue(\"numArgs\", node, tensorMap, context);\n if (isBiasAdd) {\n if (isPrelu && numArgs !== 2) {\n throw new Error(\"FusedConv2d and DepthwiseConv2d with BiasAdd and Prelu must have two extra arguments: bias and alpha.\");\n }\n if (!isPrelu && isBiasAdd && numArgs !== 1) {\n throw new Error(\"FusedConv2d and DepthwiseConv2d with BiasAdd must have one extra argument: bias.\");\n }\n }\n if (isBatchNorm) {\n throw new Error(\"FusedConv2d and DepthwiseConv2d with FusedBatchNorm is not supported\");\n }\n const stride = getParamValue(\"strides\", node, tensorMap, context);\n const pad3 = getPadding(node, tensorMap, context);\n const dataFormat = getParamValue(\"dataFormat\", node, tensorMap, context).toUpperCase();\n const dilations = getParamValue(\"dilations\", node, tensorMap, context);\n let [biasArg, preluArg] = getParamValue(\"args\", node, tensorMap, context);\n if (noBiasAdd) {\n preluArg = biasArg;\n biasArg = void 0;\n }\n const leakyreluAlpha = getParamValue(\"leakyreluAlpha\", node, tensorMap, context);\n return {\n stride,\n pad: pad3,\n dataFormat,\n dilations,\n biasArg,\n preluArg,\n activationFunc,\n leakyreluAlpha\n };\n}\nvar executeOp4 = (node, tensorMap, context, ops = ops_for_converter_exports) => {\n switch (node.op) {\n case \"Conv1D\": {\n const stride = getParamValue(\"stride\", node, tensorMap, context);\n const pad3 = getParamValue(\"pad\", node, tensorMap, context);\n const dataFormat = getParamValue(\"dataFormat\", node, tensorMap, context).toUpperCase();\n const dilation = getParamValue(\"dilation\", node, tensorMap, context);\n return [ops.conv1d(getParamValue(\"x\", node, tensorMap, context), getParamValue(\"filter\", node, tensorMap, context), stride, pad3, dataFormat, dilation)];\n }\n case \"Conv2D\": {\n const stride = getParamValue(\"strides\", node, tensorMap, context);\n const pad3 = getPadding(node, tensorMap, context);\n const dataFormat = getParamValue(\"dataFormat\", node, tensorMap, context).toUpperCase();\n const dilations = getParamValue(\"dilations\", node, tensorMap, context);\n return [ops.conv2d(getParamValue(\"x\", node, tensorMap, context), getParamValue(\"filter\", node, tensorMap, context), [stride[1], stride[2]], pad3, dataFormat, [dilations[1], dilations[2]])];\n }\n case \"_FusedConv2D\": {\n const { stride, pad: pad3, dataFormat, dilations, biasArg, preluArg, activationFunc, leakyreluAlpha } = fusedConvAndDepthWiseParams(node, tensorMap, context);\n return [ops.fused.conv2d({\n x: getParamValue(\"x\", node, tensorMap, context),\n filter: getParamValue(\"filter\", node, tensorMap, context),\n strides: [stride[1], stride[2]],\n pad: pad3,\n dataFormat,\n dilations: [dilations[1], dilations[2]],\n bias: biasArg,\n activation: activationFunc,\n preluActivationWeights: preluArg,\n leakyreluAlpha\n })];\n }\n case \"FusedDepthwiseConv2dNative\": {\n const { stride, pad: pad3, dataFormat, dilations, biasArg, preluArg, activationFunc, leakyreluAlpha } = fusedConvAndDepthWiseParams(node, tensorMap, context);\n return [ops.fused.depthwiseConv2d({\n x: getParamValue(\"x\", node, tensorMap, context),\n filter: getParamValue(\"filter\", node, tensorMap, context),\n strides: [stride[1], stride[2]],\n pad: pad3,\n dataFormat,\n dilations: [dilations[1], dilations[2]],\n bias: biasArg,\n activation: activationFunc,\n preluActivationWeights: preluArg,\n leakyreluAlpha\n })];\n }\n case \"Conv2DBackpropInput\":\n case \"Conv2dTranspose\": {\n const shape = getParamValue(\"outputShape\", node, tensorMap, context);\n const stride = getParamValue(\"strides\", node, tensorMap, context);\n const pad3 = getPadding(node, tensorMap, context);\n return [ops.conv2dTranspose(getParamValue(\"x\", node, tensorMap, context), getParamValue(\"filter\", node, tensorMap, context), shape, [stride[1], stride[2]], pad3)];\n }\n case \"DepthwiseConv2dNative\":\n case \"DepthwiseConv2d\": {\n const stride = getParamValue(\"strides\", node, tensorMap, context);\n const pad3 = getPadding(node, tensorMap, context);\n const dilations = getParamValue(\"dilations\", node, tensorMap, context);\n const dataFormat = getParamValue(\"dataFormat\", node, tensorMap, context).toUpperCase();\n return [ops.depthwiseConv2d(getParamValue(\"input\", node, tensorMap, context), getParamValue(\"filter\", node, tensorMap, context), [stride[1], stride[2]], pad3, dataFormat, [dilations[1], dilations[2]])];\n }\n case \"Conv3D\": {\n const stride = getParamValue(\"strides\", node, tensorMap, context);\n const pad3 = getParamValue(\"pad\", node, tensorMap, context);\n const dataFormat = getParamValue(\"dataFormat\", node, tensorMap, context).toUpperCase();\n const dilations = getParamValue(\"dilations\", node, tensorMap, context);\n return [ops.conv3d(getParamValue(\"x\", node, tensorMap, context), getParamValue(\"filter\", node, tensorMap, context), [stride[1], stride[2], stride[3]], pad3, dataFormat, [dilations[1], dilations[2], dilations[3]])];\n }\n case \"AvgPool\": {\n const stride = getParamValue(\"strides\", node, tensorMap, context);\n const pad3 = getParamValue(\"pad\", node, tensorMap, context);\n const kernelSize = getParamValue(\"kernelSize\", node, tensorMap, context);\n return [ops.avgPool(getParamValue(\"x\", node, tensorMap, context), [kernelSize[1], kernelSize[2]], [stride[1], stride[2]], pad3)];\n }\n case \"MaxPool\": {\n const stride = getParamValue(\"strides\", node, tensorMap, context);\n const pad3 = getParamValue(\"pad\", node, tensorMap, context);\n const kernelSize = getParamValue(\"kernelSize\", node, tensorMap, context);\n return [ops.maxPool(getParamValue(\"x\", node, tensorMap, context), [kernelSize[1], kernelSize[2]], [stride[1], stride[2]], pad3)];\n }\n case \"MaxPoolWithArgmax\": {\n const stride = getParamValue(\"strides\", node, tensorMap, context);\n const pad3 = getParamValue(\"pad\", node, tensorMap, context);\n const kernelSize = getParamValue(\"kernelSize\", node, tensorMap, context);\n const includeBatchInIndex = getParamValue(\"includeBatchInIndex\", node, tensorMap, context);\n const { result, indexes } = ops.maxPoolWithArgmax(getParamValue(\"x\", node, tensorMap, context), [kernelSize[1], kernelSize[2]], [stride[1], stride[2]], pad3, includeBatchInIndex);\n return [result, indexes];\n }\n case \"AvgPool3D\": {\n const stride = getParamValue(\"strides\", node, tensorMap, context);\n const pad3 = getParamValue(\"pad\", node, tensorMap, context);\n const kernelSize = getParamValue(\"kernelSize\", node, tensorMap, context);\n return [ops.avgPool3d(getParamValue(\"x\", node, tensorMap, context), [kernelSize[1], kernelSize[2], kernelSize[3]], [stride[1], stride[2], stride[3]], pad3)];\n }\n case \"MaxPool3D\": {\n const stride = getParamValue(\"strides\", node, tensorMap, context);\n const pad3 = getParamValue(\"pad\", node, tensorMap, context);\n const kernelSize = getParamValue(\"kernelSize\", node, tensorMap, context);\n return [ops.maxPool3d(getParamValue(\"x\", node, tensorMap, context), [kernelSize[1], kernelSize[2], kernelSize[3]], [stride[1], stride[2], stride[3]], pad3)];\n }\n case \"Dilation2D\": {\n const strides = getParamValue(\"strides\", node, tensorMap, context);\n const pad3 = getParamValue(\"pad\", node, tensorMap, context);\n const dilations = getParamValue(\"dilations\", node, tensorMap, context);\n const strideHeight = strides[1];\n const strideWidth = strides[2];\n const dilationHeight = dilations[1];\n const dilationWidth = dilations[2];\n return [ops.dilation2d(getParamValue(\"x\", node, tensorMap, context), getParamValue(\"filter\", node, tensorMap, context), [strideHeight, strideWidth], pad3, [dilationHeight, dilationWidth], \"NHWC\")];\n }\n default:\n throw TypeError(`Node type ${node.op} is not implemented`);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/creation_executor.js\nvar executeOp5 = (node, tensorMap, context, ops = ops_for_converter_exports) => {\n switch (node.op) {\n case \"Fill\": {\n const shape = getParamValue(\"shape\", node, tensorMap, context);\n const dtype = getParamValue(\"dtype\", node, tensorMap, context);\n const value = getParamValue(\"value\", node, tensorMap, context);\n return [ops.fill(shape, value, dtype)];\n }\n case \"LinSpace\": {\n const start = getParamValue(\"start\", node, tensorMap, context);\n const stop = getParamValue(\"stop\", node, tensorMap, context);\n const num = getParamValue(\"num\", node, tensorMap, context);\n return [ops.linspace(start, stop, num)];\n }\n case \"Multinomial\": {\n const logits = getParamValue(\"logits\", node, tensorMap, context);\n const numSamples = getParamValue(\"numSamples\", node, tensorMap, context);\n const seed = getParamValue(\"seed\", node, tensorMap, context);\n return [ops.multinomial(logits, numSamples, seed)];\n }\n case \"OneHot\": {\n const indices = getParamValue(\"indices\", node, tensorMap, context);\n const depth = getParamValue(\"depth\", node, tensorMap, context);\n const onValue = getParamValue(\"onValue\", node, tensorMap, context);\n const offValue = getParamValue(\"offValue\", node, tensorMap, context);\n const dtype = getParamValue(\"dtype\", node, tensorMap, context);\n return [ops.oneHot(indices, depth, onValue, offValue, dtype)];\n }\n case \"Ones\": {\n return [ops.ones(getParamValue(\"shape\", node, tensorMap, context), getParamValue(\"dtype\", node, tensorMap, context))];\n }\n case \"OnesLike\": {\n return [ops.onesLike(getParamValue(\"x\", node, tensorMap, context))];\n }\n case \"RandomStandardNormal\": {\n return [ops.randomStandardNormal(getParamValue(\"shape\", node, tensorMap, context), getParamValue(\"dtype\", node, tensorMap, context), getParamValue(\"seed\", node, tensorMap, context))];\n }\n case \"RandomUniform\": {\n return [ops.randomUniform(\n getParamValue(\"shape\", node, tensorMap, context),\n getParamValue(\"minval\", node, tensorMap, context),\n getParamValue(\"maxval\", node, tensorMap, context),\n getParamValue(\"dtype\", node, tensorMap, context)\n )];\n }\n case \"Range\": {\n const start = getParamValue(\"start\", node, tensorMap, context);\n const stop = getParamValue(\"stop\", node, tensorMap, context);\n const step5 = getParamValue(\"step\", node, tensorMap, context);\n return [ops.range(start, stop, step5, getParamValue(\"dtype\", node, tensorMap, context))];\n }\n case \"TruncatedNormal\": {\n const shape = getParamValue(\"shape\", node, tensorMap, context);\n const mean5 = getParamValue(\"mean\", node, tensorMap, context);\n const stdDev = getParamValue(\"stdDev\", node, tensorMap, context);\n const seed = getParamValue(\"seed\", node, tensorMap, context);\n return [ops.truncatedNormal(shape, mean5, stdDev, getParamValue(\"dtype\", node, tensorMap, context), seed)];\n }\n case \"Zeros\": {\n return [ops.zeros(getParamValue(\"shape\", node, tensorMap, context), getParamValue(\"dtype\", node, tensorMap, context))];\n }\n case \"ZerosLike\": {\n return [ops.zerosLike(getParamValue(\"x\", node, tensorMap, context))];\n }\n default:\n throw TypeError(`Node type ${node.op} is not implemented`);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/dynamic_executor.js\nfunction nmsParams(node, tensorMap, context) {\n const boxes = getParamValue(\"boxes\", node, tensorMap, context);\n const scores = getParamValue(\"scores\", node, tensorMap, context);\n const maxOutputSize = getParamValue(\"maxOutputSize\", node, tensorMap, context);\n const iouThreshold = getParamValue(\"iouThreshold\", node, tensorMap, context);\n const scoreThreshold = getParamValue(\"scoreThreshold\", node, tensorMap, context);\n const softNmsSigma = getParamValue(\"softNmsSigma\", node, tensorMap, context);\n return {\n boxes,\n scores,\n maxOutputSize,\n iouThreshold,\n scoreThreshold,\n softNmsSigma\n };\n}\nvar executeOp6 = async (node, tensorMap, context, resourceManager, ops = ops_for_converter_exports) => {\n switch (node.op) {\n case \"NonMaxSuppressionV5\": {\n const { boxes, scores, maxOutputSize, iouThreshold, scoreThreshold, softNmsSigma } = nmsParams(node, tensorMap, context);\n const result = await ops.image.nonMaxSuppressionWithScoreAsync(boxes, scores, maxOutputSize, iouThreshold, scoreThreshold, softNmsSigma);\n return [result.selectedIndices, result.selectedScores];\n }\n case \"NonMaxSuppressionV4\": {\n const { boxes, scores, maxOutputSize, iouThreshold, scoreThreshold } = nmsParams(node, tensorMap, context);\n const padToMaxOutputSize = getParamValue(\"padToMaxOutputSize\", node, tensorMap, context);\n const result = await ops.image.nonMaxSuppressionPaddedAsync(boxes, scores, maxOutputSize, iouThreshold, scoreThreshold, padToMaxOutputSize);\n return [result.selectedIndices, result.validOutputs];\n }\n case \"NonMaxSuppressionV3\":\n case \"NonMaxSuppressionV2\": {\n const { boxes, scores, maxOutputSize, iouThreshold, scoreThreshold } = nmsParams(node, tensorMap, context);\n return [await ops.image.nonMaxSuppressionAsync(boxes, scores, maxOutputSize, iouThreshold, scoreThreshold)];\n }\n case \"Where\": {\n const condition = ops.cast(getParamValue(\"condition\", node, tensorMap, context), \"bool\");\n const result = [await ops.whereAsync(condition)];\n condition.dispose();\n return result;\n }\n case \"ListDiff\": {\n return ops.setdiff1dAsync(getParamValue(\"x\", node, tensorMap, context), getParamValue(\"y\", node, tensorMap, context));\n }\n default:\n throw TypeError(`Node type ${node.op} is not implemented`);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/evaluation_executor.js\nvar executeOp7 = (node, tensorMap, context, ops = ops_for_converter_exports) => {\n switch (node.op) {\n case \"LowerBound\": {\n const sortedSequence = getParamValue(\"sortedSequence\", node, tensorMap, context);\n const values = getParamValue(\"values\", node, tensorMap, context);\n return [ops.lowerBound(sortedSequence, values)];\n }\n case \"TopKV2\": {\n const x = getParamValue(\"x\", node, tensorMap, context);\n const k = getParamValue(\"k\", node, tensorMap, context);\n const sorted = getParamValue(\"sorted\", node, tensorMap, context);\n const result = ops.topk(x, k, sorted);\n return [result.values, result.indices];\n }\n case \"UpperBound\": {\n const sortedSequence = getParamValue(\"sortedSequence\", node, tensorMap, context);\n const values = getParamValue(\"values\", node, tensorMap, context);\n return [ops.upperBound(sortedSequence, values)];\n }\n case \"Unique\": {\n const x = getParamValue(\"x\", node, tensorMap, context);\n const result = ops.unique(x);\n return [result.values, result.indices];\n }\n case \"UniqueV2\": {\n const x = getParamValue(\"x\", node, tensorMap, context);\n const axis = getParamValue(\"axis\", node, tensorMap, context);\n const result = ops.unique(x, axis);\n return [result.values, result.indices];\n }\n default:\n throw TypeError(`Node type ${node.op} is not implemented`);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/graph_executor.js\nvar executeOp8 = (node, tensorMap, context, ops = ops_for_converter_exports) => {\n switch (node.op) {\n case \"Const\": {\n return tensorMap[node.name];\n }\n case \"PlaceholderWithDefault\":\n const def = getParamValue(\"default\", node, tensorMap, context);\n return [getTensor(node.name, tensorMap, context) || def];\n case \"Placeholder\":\n return [getTensor(node.name, tensorMap, context)];\n case \"Identity\":\n case \"StopGradient\":\n case \"FakeQuantWithMinMaxVars\": {\n const data2 = getParamValue(\"x\", node, tensorMap, context);\n return [cloneTensor(data2)];\n }\n case \"IdentityN\":\n return getParamValue(\"x\", node, tensorMap, context).map((t) => cloneTensor(t));\n case \"Snapshot\":\n const snapshot = getParamValue(\"x\", node, tensorMap, context);\n return [cloneTensor(snapshot)];\n case \"Shape\":\n return [ops.tensor1d(getParamValue(\"x\", node, tensorMap, context).shape, \"int32\")];\n case \"ShapeN\":\n return getParamValue(\"x\", node, tensorMap, context).map((t) => ops.tensor1d(t.shape));\n case \"Size\":\n return [ops.scalar(getParamValue(\"x\", node, tensorMap, context).size, \"int32\")];\n case \"Rank\":\n return [ops.scalar(getParamValue(\"x\", node, tensorMap, context).rank, \"int32\")];\n case \"NoOp\":\n return [ops.scalar(1)];\n case \"Print\":\n const input2 = getParamValue(\"x\", node, tensorMap, context);\n const data = getParamValue(\"data\", node, tensorMap, context);\n const message = getParamValue(\"message\", node, tensorMap, context);\n const summarize = getParamValue(\"summarize\", node, tensorMap, context);\n console.warn(\"The graph has a tf.print() operation,usually used for debugging, which slows down performance.\");\n console.log(message);\n for (let i = 0; i < data.length; i++) {\n console.log(Array.prototype.slice.call(data[i].dataSync()).slice(0, summarize));\n }\n return [input2];\n default:\n throw TypeError(`Node type ${node.op} is not implemented`);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/executor/hash_table.js\nvar HashTable = class {\n constructor(keyDType, valueDType) {\n this.keyDType = keyDType;\n this.valueDType = valueDType;\n this.handle = scalar(0);\n this.tensorMap = /* @__PURE__ */ new Map();\n keep(this.handle);\n }\n get id() {\n return this.handle.id;\n }\n clearAndClose() {\n this.tensorMap.forEach((value) => value.dispose());\n this.tensorMap.clear();\n this.handle.dispose();\n }\n size() {\n return this.tensorMap.size;\n }\n tensorSize() {\n return scalar(this.size(), \"int32\");\n }\n async import(keys, values) {\n this.checkKeyAndValueTensor(keys, values);\n const $keys = await keys.data();\n this.tensorMap.forEach((value) => value.dispose());\n this.tensorMap.clear();\n return tidy(() => {\n const $values = unstack(values);\n const keysLength = $keys.length;\n const valuesLength = $values.length;\n util_exports.assert(keysLength === valuesLength, () => `The number of elements doesn't match, keys has ${keysLength} elements, the values has ${valuesLength} elements.`);\n for (let i = 0; i < keysLength; i++) {\n const key = $keys[i];\n const value = $values[i];\n keep(value);\n this.tensorMap.set(key, value);\n }\n return this.handle;\n });\n }\n async find(keys, defaultValue) {\n this.checkKeyAndValueTensor(keys, defaultValue);\n const $keys = await keys.data();\n return tidy(() => {\n const result = [];\n for (let i = 0; i < $keys.length; i++) {\n const key = $keys[i];\n const value = this.findWithDefault(key, defaultValue);\n result.push(value);\n }\n return stack(result);\n });\n }\n findWithDefault(key, defaultValue) {\n const result = this.tensorMap.get(key);\n return result != null ? result : defaultValue;\n }\n checkKeyAndValueTensor(key, value) {\n if (key.dtype !== this.keyDType) {\n throw new Error(`Expect key dtype ${this.keyDType}, but got ${key.dtype}`);\n }\n if (value.dtype !== this.valueDType) {\n throw new Error(`Expect value dtype ${this.valueDType}, but got ${value.dtype}`);\n }\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/hash_table_executor.js\nvar executeOp9 = async (node, tensorMap, context, resourceManager) => {\n switch (node.op) {\n case \"HashTable\":\n case \"HashTableV2\": {\n const keyDType = getParamValue(\"keyDType\", node, tensorMap, context);\n const valueDType = getParamValue(\"valueDType\", node, tensorMap, context);\n const hashTable = new HashTable(keyDType, valueDType);\n resourceManager.addHashTable(node.name, hashTable);\n return [hashTable.handle];\n }\n case \"LookupTableImport\":\n case \"LookupTableImportV2\": {\n const handle = getParamValue(\"tableHandle\", node, tensorMap, context, resourceManager);\n const keys = getParamValue(\"keys\", node, tensorMap, context);\n const values = getParamValue(\"values\", node, tensorMap, context);\n const hashTable = resourceManager.getHashTableById(handle.id);\n return [await hashTable.import(keys, values)];\n }\n case \"LookupTableFind\":\n case \"LookupTableFindV2\": {\n const handle = getParamValue(\"tableHandle\", node, tensorMap, context, resourceManager);\n const keys = getParamValue(\"keys\", node, tensorMap, context);\n const defaultValue = getParamValue(\"defaultValue\", node, tensorMap, context);\n const hashTable = resourceManager.getHashTableById(handle.id);\n return [await hashTable.find(keys, defaultValue)];\n }\n case \"LookupTableSize\":\n case \"LookupTableSizeV2\": {\n const handle = getParamValue(\"tableHandle\", node, tensorMap, context, resourceManager);\n const hashTable = resourceManager.getHashTableById(handle.id);\n return [hashTable.tensorSize()];\n }\n default:\n throw TypeError(`Node type ${node.op} is not implemented`);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/image_executor.js\nvar executeOp10 = (node, tensorMap, context, ops = ops_for_converter_exports) => {\n switch (node.op) {\n case \"ResizeBilinear\": {\n const images = getParamValue(\"images\", node, tensorMap, context);\n const size = getParamValue(\"size\", node, tensorMap, context);\n const alignCorners = getParamValue(\"alignCorners\", node, tensorMap, context);\n const halfPixelCenters = getParamValue(\"halfPixelCenters\", node, tensorMap, context);\n return [ops.image.resizeBilinear(images, [size[0], size[1]], alignCorners, halfPixelCenters)];\n }\n case \"ResizeNearestNeighbor\": {\n const images = getParamValue(\"images\", node, tensorMap, context);\n const size = getParamValue(\"size\", node, tensorMap, context);\n const alignCorners = getParamValue(\"alignCorners\", node, tensorMap, context);\n const halfPixelCenters = getParamValue(\"halfPixelCenters\", node, tensorMap, context);\n return [ops.image.resizeNearestNeighbor(images, [size[0], size[1]], alignCorners, halfPixelCenters)];\n }\n case \"CropAndResize\": {\n const image2 = getParamValue(\"image\", node, tensorMap, context);\n const boxes = getParamValue(\"boxes\", node, tensorMap, context);\n const boxInd = getParamValue(\"boxInd\", node, tensorMap, context);\n const cropSize = getParamValue(\"cropSize\", node, tensorMap, context);\n const method = getParamValue(\"method\", node, tensorMap, context);\n const extrapolationValue = getParamValue(\"extrapolationValue\", node, tensorMap, context);\n return [ops.image.cropAndResize(image2, boxes, boxInd, cropSize, method, extrapolationValue)];\n }\n case \"ImageProjectiveTransformV3\": {\n const images = getParamValue(\"images\", node, tensorMap, context);\n const transforms = getParamValue(\"transforms\", node, tensorMap, context);\n const outputShape = getParamValue(\"outputShape\", node, tensorMap, context);\n const fillValue = getParamValue(\"fillValue\", node, tensorMap, context);\n const interpolation = getParamValue(\"interpolation\", node, tensorMap, context);\n const fillMode = getParamValue(\"fillMode\", node, tensorMap, context);\n return [ops.image.transform(images, transforms, interpolation.toLowerCase(), fillMode.toLowerCase(), fillValue, outputShape)];\n }\n default:\n throw TypeError(`Node type ${node.op} is not implemented`);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/logical_executor.js\nvar executeOp11 = (node, tensorMap, context, ops = ops_for_converter_exports) => {\n switch (node.op) {\n case \"Equal\": {\n return [ops.equal(getParamValue(\"a\", node, tensorMap, context), getParamValue(\"b\", node, tensorMap, context))];\n }\n case \"NotEqual\": {\n return [ops.notEqual(getParamValue(\"a\", node, tensorMap, context), getParamValue(\"b\", node, tensorMap, context))];\n }\n case \"Greater\": {\n return [ops.greater(getParamValue(\"a\", node, tensorMap, context), getParamValue(\"b\", node, tensorMap, context))];\n }\n case \"GreaterEqual\": {\n return [ops.greaterEqual(getParamValue(\"a\", node, tensorMap, context), getParamValue(\"b\", node, tensorMap, context))];\n }\n case \"Less\": {\n return [ops.less(getParamValue(\"a\", node, tensorMap, context), getParamValue(\"b\", node, tensorMap, context))];\n }\n case \"LessEqual\": {\n return [ops.lessEqual(getParamValue(\"a\", node, tensorMap, context), getParamValue(\"b\", node, tensorMap, context))];\n }\n case \"LogicalAnd\": {\n return [ops.logicalAnd(getParamValue(\"a\", node, tensorMap, context), getParamValue(\"b\", node, tensorMap, context))];\n }\n case \"LogicalNot\": {\n return [ops.logicalNot(getParamValue(\"a\", node, tensorMap, context))];\n }\n case \"LogicalOr\": {\n return [ops.logicalOr(getParamValue(\"a\", node, tensorMap, context), getParamValue(\"b\", node, tensorMap, context))];\n }\n case \"Select\":\n case \"SelectV2\": {\n return [ops.where(getParamValue(\"condition\", node, tensorMap, context), getParamValue(\"a\", node, tensorMap, context), getParamValue(\"b\", node, tensorMap, context))];\n }\n default:\n throw TypeError(`Node type ${node.op} is not implemented`);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/matrices_executor.js\nvar executeOp12 = (node, tensorMap, context, ops = ops_for_converter_exports) => {\n switch (node.op) {\n case \"BatchMatMul\":\n case \"BatchMatMulV2\":\n case \"MatMul\":\n return [ops.matMul(getParamValue(\"a\", node, tensorMap, context), getParamValue(\"b\", node, tensorMap, context), getParamValue(\"transposeA\", node, tensorMap, context), getParamValue(\"transposeB\", node, tensorMap, context))];\n case \"Einsum\":\n return [ops.einsum(getParamValue(\"equation\", node, tensorMap, context), ...getParamValue(\"tensors\", node, tensorMap, context))];\n case \"Transpose\":\n return [ops.transpose(getParamValue(\"x\", node, tensorMap, context), getParamValue(\"perm\", node, tensorMap, context))];\n case \"_FusedMatMul\":\n const [extraOp, activationFunc] = getParamValue(\"fusedOps\", node, tensorMap, context);\n const isBiasAdd = extraOp === \"biasadd\";\n const isPrelu = activationFunc === \"prelu\";\n const numArgs = getParamValue(\"numArgs\", node, tensorMap, context);\n const leakyreluAlpha = getParamValue(\"leakyreluAlpha\", node, tensorMap, context);\n if (isBiasAdd) {\n if (isPrelu && numArgs !== 2) {\n throw new Error(\"Fused MatMul with BiasAdd and Prelu must have two extra arguments: bias and alpha.\");\n }\n if (!isPrelu && numArgs !== 1) {\n throw new Error(\"Fused MatMul with BiasAdd must have one extra argument: bias.\");\n }\n }\n const [biasArg, preluArg] = getParamValue(\"args\", node, tensorMap, context);\n return [ops.fused.matMul({\n a: getParamValue(\"a\", node, tensorMap, context),\n b: getParamValue(\"b\", node, tensorMap, context),\n transposeA: getParamValue(\"transposeA\", node, tensorMap, context),\n transposeB: getParamValue(\"transposeB\", node, tensorMap, context),\n bias: biasArg,\n activation: activationFunc,\n preluActivationWeights: preluArg,\n leakyreluAlpha\n })];\n default:\n throw TypeError(`Node type ${node.op} is not implemented`);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/normalization_executor.js\nvar executeOp13 = (node, tensorMap, context, ops = ops_for_converter_exports) => {\n switch (node.op) {\n case \"EuclideanNorm\":\n return [ops.euclideanNorm(getParamValue(\"x\", node, tensorMap, context), getParamValue(\"axis\", node, tensorMap, context), getParamValue(\"keepDims\", node, tensorMap, context))];\n case \"FusedBatchNorm\":\n case \"FusedBatchNormV2\": {\n return [ops.batchNorm(getParamValue(\"x\", node, tensorMap, context), getParamValue(\"mean\", node, tensorMap, context), getParamValue(\"variance\", node, tensorMap, context), getParamValue(\"offset\", node, tensorMap, context), getParamValue(\"scale\", node, tensorMap, context), getParamValue(\"epsilon\", node, tensorMap, context))];\n }\n case \"FusedBatchNormV3\": {\n return [ops.batchNorm(getParamValue(\"x\", node, tensorMap, context), getParamValue(\"mean\", node, tensorMap, context), getParamValue(\"variance\", node, tensorMap, context), getParamValue(\"offset\", node, tensorMap, context), getParamValue(\"scale\", node, tensorMap, context), getParamValue(\"epsilon\", node, tensorMap, context))];\n }\n case \"LRN\": {\n return [ops.localResponseNormalization(getParamValue(\"x\", node, tensorMap, context), getParamValue(\"radius\", node, tensorMap, context), getParamValue(\"bias\", node, tensorMap, context), getParamValue(\"alpha\", node, tensorMap, context), getParamValue(\"beta\", node, tensorMap, context))];\n }\n case \"Softmax\": {\n return [ops.softmax(getParamValue(\"x\", node, tensorMap, context))];\n }\n case \"LogSoftmax\": {\n return [ops.logSoftmax(getParamValue(\"x\", node, tensorMap, context))];\n }\n case \"SparseToDense\": {\n return [ops.sparseToDense(getParamValue(\"sparseIndices\", node, tensorMap, context), getParamValue(\"outputShape\", node, tensorMap, context), getParamValue(\"sparseValues\", node, tensorMap, context), getParamValue(\"defaultValue\", node, tensorMap, context))];\n }\n default:\n throw TypeError(`Node type ${node.op} is not implemented`);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/reduction_executor.js\nvar executeOp14 = (node, tensorMap, context, ops = ops_for_converter_exports) => {\n switch (node.op) {\n case \"Max\": {\n const axis = getParamValue(\"axis\", node, tensorMap, context);\n const keepDims = getParamValue(\"keepDims\", node, tensorMap, context);\n return [ops.max(getParamValue(\"x\", node, tensorMap, context), axis, keepDims)];\n }\n case \"Mean\": {\n const axis = getParamValue(\"axis\", node, tensorMap, context);\n const keepDims = getParamValue(\"keepDims\", node, tensorMap, context);\n return [ops.mean(getParamValue(\"x\", node, tensorMap, context), axis, keepDims)];\n }\n case \"Min\": {\n const axis = getParamValue(\"axis\", node, tensorMap, context);\n const keepDims = getParamValue(\"keepDims\", node, tensorMap, context);\n return [ops.min(getParamValue(\"x\", node, tensorMap, context), axis, keepDims)];\n }\n case \"Sum\": {\n const axis = getParamValue(\"axis\", node, tensorMap, context);\n const keepDims = getParamValue(\"keepDims\", node, tensorMap, context);\n return [ops.sum(getParamValue(\"x\", node, tensorMap, context), axis, keepDims)];\n }\n case \"All\": {\n const axis = getParamValue(\"axis\", node, tensorMap, context);\n const keepDims = getParamValue(\"keepDims\", node, tensorMap, context);\n return [ops.all(getParamValue(\"x\", node, tensorMap, context), axis, keepDims)];\n }\n case \"Any\": {\n const axis = getParamValue(\"axis\", node, tensorMap, context);\n const keepDims = getParamValue(\"keepDims\", node, tensorMap, context);\n return [ops.any(getParamValue(\"x\", node, tensorMap, context), axis, keepDims)];\n }\n case \"ArgMax\": {\n const axis = getParamValue(\"axis\", node, tensorMap, context);\n return [ops.argMax(getParamValue(\"x\", node, tensorMap, context), axis)];\n }\n case \"ArgMin\": {\n const axis = getParamValue(\"axis\", node, tensorMap, context);\n return [ops.argMin(getParamValue(\"x\", node, tensorMap, context), axis)];\n }\n case \"Prod\": {\n const axis = getParamValue(\"axis\", node, tensorMap, context);\n const keepDims = getParamValue(\"keepDims\", node, tensorMap, context);\n return [ops.prod(getParamValue(\"x\", node, tensorMap, context), axis, keepDims)];\n }\n case \"Cumprod\": {\n const axis = getParamValue(\"axis\", node, tensorMap, context);\n const exclusive = getParamValue(\"exclusive\", node, tensorMap, context);\n const reverse5 = getParamValue(\"reverse\", node, tensorMap, context);\n return [ops.cumprod(getParamValue(\"x\", node, tensorMap, context), axis, exclusive, reverse5)];\n }\n case \"Cumsum\": {\n const axis = getParamValue(\"axis\", node, tensorMap, context);\n const exclusive = getParamValue(\"exclusive\", node, tensorMap, context);\n const reverse5 = getParamValue(\"reverse\", node, tensorMap, context);\n return [ops.cumsum(getParamValue(\"x\", node, tensorMap, context), axis, exclusive, reverse5)];\n }\n case \"Bincount\":\n const x = getParamValue(\"x\", node, tensorMap, context);\n const weights = getParamValue(\"weights\", node, tensorMap, context);\n const size = getParamValue(\"size\", node, tensorMap, context);\n return [ops.bincount(x, weights, size)];\n case \"DenseBincount\": {\n const x2 = getParamValue(\"x\", node, tensorMap, context);\n const weights2 = getParamValue(\"weights\", node, tensorMap, context);\n const size2 = getParamValue(\"size\", node, tensorMap, context);\n const binaryOutput = getParamValue(\"binaryOutput\", node, tensorMap, context);\n return [ops.denseBincount(x2, weights2, size2, binaryOutput)];\n }\n default:\n throw TypeError(`Node type ${node.op} is not implemented`);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/slice_join_executor.js\nvar executeOp15 = (node, tensorMap, context, ops = ops_for_converter_exports) => {\n switch (node.op) {\n case \"ConcatV2\":\n case \"Concat\": {\n const n = getParamValue(\"n\", node, tensorMap, context);\n const axis = getParamValue(\"axis\", node, tensorMap, context);\n let inputs = getParamValue(\"tensors\", node, tensorMap, context);\n inputs = inputs.slice(0, n);\n return [ops.concat(inputs, axis)];\n }\n case \"Gather\": {\n const input2 = getParamValue(\"x\", node, tensorMap, context);\n const indices = getParamValue(\"indices\", node, tensorMap, context);\n return [ops.gather(input2, ops.cast(indices, \"int32\"), 0)];\n }\n case \"GatherV2\": {\n const axis = getParamValue(\"axis\", node, tensorMap, context);\n const batchDims = getParamValue(\"batchDims\", node, tensorMap, context);\n const input2 = getParamValue(\"x\", node, tensorMap, context);\n const indices = getParamValue(\"indices\", node, tensorMap, context);\n return [ops.gather(input2, ops.cast(indices, \"int32\"), axis, batchDims)];\n }\n case \"Reverse\": {\n const dims = getParamValue(\"dims\", node, tensorMap, context);\n const axis = [];\n for (let i = 0; i < dims.length; i++) {\n if (dims[i]) {\n axis.push(i);\n }\n }\n const input2 = getParamValue(\"x\", node, tensorMap, context);\n return [ops.reverse(input2, axis)];\n }\n case \"ReverseV2\": {\n const axis = getParamValue(\"axis\", node, tensorMap, context);\n const input2 = getParamValue(\"x\", node, tensorMap, context);\n return [ops.reverse(input2, axis)];\n }\n case \"Slice\": {\n const begin = getParamValue(\"begin\", node, tensorMap, context);\n const size = getParamValue(\"size\", node, tensorMap, context);\n return [ops.slice(getParamValue(\"x\", node, tensorMap, context), begin, size)];\n }\n case \"StridedSlice\": {\n const begin = getParamValue(\"begin\", node, tensorMap, context);\n const end = getParamValue(\"end\", node, tensorMap, context);\n const strides = getParamValue(\"strides\", node, tensorMap, context);\n const beginMask = getParamValue(\"beginMask\", node, tensorMap, context);\n const endMask = getParamValue(\"endMask\", node, tensorMap, context);\n const ellipsisMask = getParamValue(\"ellipsisMask\", node, tensorMap, context);\n const newAxisMask = getParamValue(\"newAxisMask\", node, tensorMap, context);\n const shrinkAxisMask = getParamValue(\"shrinkAxisMask\", node, tensorMap, context);\n const tensor2 = getParamValue(\"x\", node, tensorMap, context);\n return [ops.stridedSlice(tensor2, begin, end, strides, beginMask, endMask, ellipsisMask, newAxisMask, shrinkAxisMask)];\n }\n case \"Pack\": {\n return tidy(() => {\n const axis = getParamValue(\"axis\", node, tensorMap, context);\n const tensors = getParamValue(\"tensors\", node, tensorMap, context);\n const shape = tensors[0].shape;\n const squeezedShape = ops.squeeze(tensors[0]).shape;\n const mapped = tensors.map((tensor2) => {\n const sameShape = util_exports.arraysEqual(tensor2.shape, shape);\n if (!sameShape && !util_exports.arraysEqual(ops.squeeze(tensor2).shape, squeezedShape)) {\n throw new Error(\"the input tensors shape does not match\");\n }\n return sameShape ? tensor2 : ops.reshape(tensor2, shape);\n });\n return [ops.stack(mapped, axis)];\n });\n }\n case \"Unpack\": {\n const axis = getParamValue(\"axis\", node, tensorMap, context);\n const tensor2 = getParamValue(\"tensor\", node, tensorMap, context);\n return ops.unstack(tensor2, axis);\n }\n case \"Tile\": {\n const reps = getParamValue(\"reps\", node, tensorMap, context);\n return [ops.tile(getParamValue(\"x\", node, tensorMap, context), reps)];\n }\n case \"Split\":\n case \"SplitV\": {\n const axis = getParamValue(\"axis\", node, tensorMap, context);\n const numOrSizeSplits = getParamValue(\"numOrSizeSplits\", node, tensorMap, context);\n const tensor2 = getParamValue(\"x\", node, tensorMap, context);\n return ops.split(tensor2, numOrSizeSplits, axis);\n }\n case \"ScatterNd\": {\n const indices = getParamValue(\"indices\", node, tensorMap, context);\n const values = getParamValue(\"values\", node, tensorMap, context);\n const shape = getParamValue(\"shape\", node, tensorMap, context);\n return [ops.scatterND(indices, values, shape)];\n }\n case \"GatherNd\": {\n const x = getParamValue(\"x\", node, tensorMap, context);\n const indices = getParamValue(\"indices\", node, tensorMap, context);\n return [ops.gatherND(x, indices)];\n }\n case \"SparseToDense\": {\n const indices = getParamValue(\"sparseIndices\", node, tensorMap, context);\n const shape = getParamValue(\"outputShape\", node, tensorMap, context);\n const sparseValues = getParamValue(\"sparseValues\", node, tensorMap, context);\n const defaultValue = getParamValue(\"defaultValue\", node, tensorMap, context);\n return [ops.sparseToDense(indices, sparseValues, shape, sparseValues.dtype === defaultValue.dtype ? defaultValue : ops.cast(defaultValue, sparseValues.dtype))];\n }\n default:\n throw TypeError(`Node type ${node.op} is not implemented`);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/sparse_executor.js\nvar executeOp16 = (node, tensorMap, context, ops = ops_for_converter_exports) => {\n switch (node.op) {\n case \"SparseFillEmptyRows\": {\n const { outputIndices, outputValues, emptyRowIndicator, reverseIndexMap } = ops.sparse.sparseFillEmptyRows(getParamValue(\"indices\", node, tensorMap, context), getParamValue(\"values\", node, tensorMap, context), getParamValue(\"denseShape\", node, tensorMap, context), getParamValue(\"defaultValue\", node, tensorMap, context));\n return [\n outputIndices,\n outputValues,\n emptyRowIndicator,\n reverseIndexMap\n ];\n }\n case \"SparseReshape\": {\n const { outputIndices, outputShape } = ops.sparse.sparseReshape(getParamValue(\"inputIndices\", node, tensorMap, context), getParamValue(\"inputShape\", node, tensorMap, context), getParamValue(\"newShape\", node, tensorMap, context));\n return [outputIndices, outputShape];\n }\n case \"SparseSegmentMean\": {\n const outputData = ops.sparse.sparseSegmentMean(getParamValue(\"data\", node, tensorMap, context), getParamValue(\"indices\", node, tensorMap, context), getParamValue(\"segmentIds\", node, tensorMap, context));\n return [outputData];\n }\n case \"SparseSegmentSum\": {\n const outputData = ops.sparse.sparseSegmentSum(getParamValue(\"data\", node, tensorMap, context), getParamValue(\"indices\", node, tensorMap, context), getParamValue(\"segmentIds\", node, tensorMap, context));\n return [outputData];\n }\n default:\n throw TypeError(`Node type ${node.op} is not implemented`);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/spectral_executor.js\nvar executeOp17 = (node, tensorMap, context, ops = ops_for_converter_exports) => {\n switch (node.op) {\n case \"FFT\": {\n return [ops.fft(getParamValue(\"x\", node, tensorMap, context))];\n }\n case \"IFFT\": {\n return [ops.ifft(getParamValue(\"x\", node, tensorMap, context))];\n }\n case \"RFFT\": {\n return [ops.rfft(getParamValue(\"x\", node, tensorMap, context))];\n }\n case \"IRFFT\": {\n return [ops.irfft(getParamValue(\"x\", node, tensorMap, context))];\n }\n default:\n throw TypeError(`Node type ${node.op} is not implemented`);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/string_executor.js\nvar executeOp18 = (node, tensorMap, context, ops = ops_for_converter_exports) => {\n switch (node.op) {\n case \"StringNGrams\": {\n const { nGrams, nGramsSplits } = ops.string.stringNGrams(getParamValue(\"data\", node, tensorMap, context), getParamValue(\"dataSplits\", node, tensorMap, context), getParamValue(\"separator\", node, tensorMap, context), getParamValue(\"nGramWidths\", node, tensorMap, context), getParamValue(\"leftPad\", node, tensorMap, context), getParamValue(\"rightPad\", node, tensorMap, context), getParamValue(\"padWidth\", node, tensorMap, context), getParamValue(\"preserveShortSequences\", node, tensorMap, context));\n return [nGrams, nGramsSplits];\n }\n case \"StringSplit\": {\n const { indices, values, shape } = ops.string.stringSplit(getParamValue(\"input\", node, tensorMap, context), getParamValue(\"delimiter\", node, tensorMap, context), getParamValue(\"skipEmpty\", node, tensorMap, context));\n return [indices, values, shape];\n }\n case \"StringToHashBucketFast\": {\n const output = ops.string.stringToHashBucketFast(getParamValue(\"input\", node, tensorMap, context), getParamValue(\"numBuckets\", node, tensorMap, context));\n return [output];\n }\n default:\n throw TypeError(`Node type ${node.op} is not implemented`);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/transformation_executor.js\nvar executeOp19 = (node, tensorMap, context, ops = ops_for_converter_exports) => {\n switch (node.op) {\n case \"Cast\": {\n return [ops.cast(getParamValue(\"x\", node, tensorMap, context), getParamValue(\"dtype\", node, tensorMap, context))];\n }\n case \"ExpandDims\": {\n const axis = getParamValue(\"axis\", node, tensorMap, context);\n return [ops.expandDims(getParamValue(\"x\", node, tensorMap, context), axis)];\n }\n case \"Squeeze\": {\n const axis = getParamValue(\"axis\", node, tensorMap, context);\n return [ops.squeeze(getParamValue(\"x\", node, tensorMap, context), axis)];\n }\n case \"Reshape\": {\n return [ops.reshape(getParamValue(\"x\", node, tensorMap, context), getParamValue(\"shape\", node, tensorMap, context))];\n }\n case \"MirrorPad\": {\n return [ops.mirrorPad(getParamValue(\"x\", node, tensorMap, context), getParamValue(\"padding\", node, tensorMap, context), getParamValue(\"mode\", node, tensorMap, context))];\n }\n case \"PadV2\":\n case \"Pad\": {\n return [ops.pad(getParamValue(\"x\", node, tensorMap, context), getParamValue(\"padding\", node, tensorMap, context), getParamValue(\"constantValue\", node, tensorMap, context))];\n }\n case \"SpaceToBatchND\": {\n const blockShape = getParamValue(\"blockShape\", node, tensorMap, context);\n const paddings = getParamValue(\"paddings\", node, tensorMap, context);\n return [ops.spaceToBatchND(getParamValue(\"x\", node, tensorMap, context), blockShape, paddings)];\n }\n case \"BatchToSpaceND\": {\n const blockShape = getParamValue(\"blockShape\", node, tensorMap, context);\n const crops = getParamValue(\"crops\", node, tensorMap, context);\n return [ops.batchToSpaceND(getParamValue(\"x\", node, tensorMap, context), blockShape, crops)];\n }\n case \"DepthToSpace\": {\n const blockSize = getParamValue(\"blockSize\", node, tensorMap, context);\n const dataFormat = getParamValue(\"dataFormat\", node, tensorMap, context).toUpperCase();\n return [ops.depthToSpace(getParamValue(\"x\", node, tensorMap, context), blockSize, dataFormat)];\n }\n case \"BroadcastTo\": {\n return [ops.broadcastTo(getParamValue(\"x\", node, tensorMap, context), getParamValue(\"shape\", node, tensorMap, context))];\n }\n case \"BroadcastArgs\": {\n return [ops.broadcastArgs(getParamValue(\"s0\", node, tensorMap, context), getParamValue(\"s1\", node, tensorMap, context))];\n }\n default:\n throw TypeError(`Node type ${node.op} is not implemented`);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/operation_executor.js\nfunction executeOp20(node, tensorMap, context, resourceManager, tidy2 = tidy) {\n const value = ((node2, tensorMap2, context2) => {\n switch (node2.category) {\n case \"arithmetic\":\n return tidy2(() => executeOp(node2, tensorMap2, context2));\n case \"basic_math\":\n return tidy2(() => executeOp2(node2, tensorMap2, context2));\n case \"control\":\n return executeOp3(node2, tensorMap2, context2);\n case \"convolution\":\n return tidy2(() => executeOp4(node2, tensorMap2, context2));\n case \"creation\":\n return tidy2(() => executeOp5(node2, tensorMap2, context2));\n case \"dynamic\":\n return executeOp6(node2, tensorMap2, context2);\n case \"evaluation\":\n return tidy2(() => executeOp7(node2, tensorMap2, context2));\n case \"image\":\n return tidy2(() => executeOp10(node2, tensorMap2, context2));\n case \"graph\":\n return tidy2(() => executeOp8(node2, tensorMap2, context2));\n case \"logical\":\n return tidy2(() => executeOp11(node2, tensorMap2, context2));\n case \"matrices\":\n return tidy2(() => executeOp12(node2, tensorMap2, context2));\n case \"normalization\":\n return tidy2(() => executeOp13(node2, tensorMap2, context2));\n case \"reduction\":\n return tidy2(() => executeOp14(node2, tensorMap2, context2));\n case \"slice_join\":\n return tidy2(() => executeOp15(node2, tensorMap2, context2));\n case \"sparse\":\n return tidy2(() => executeOp16(node2, tensorMap2, context2));\n case \"spectral\":\n return tidy2(() => executeOp17(node2, tensorMap2, context2));\n case \"string\":\n return tidy2(() => executeOp18(node2, tensorMap2, context2));\n case \"transformation\":\n return tidy2(() => executeOp19(node2, tensorMap2, context2));\n case \"hash_table\":\n return executeOp9(node2, tensorMap2, context2, resourceManager);\n case \"custom\":\n const opMapper = getRegisteredOp(node2.op);\n if (opMapper && opMapper.customExecutor) {\n return opMapper.customExecutor(new NodeValueImpl(node2, tensorMap2, context2));\n } else {\n throw TypeError(`Custom op ${node2.op} is not registered.`);\n }\n default:\n throw TypeError(`Unknown op '${node2.op}'. File an issue at https://github.com/tensorflow/tfjs/issues so we can add it, or register a custom execution with tf.registerOp()`);\n }\n })(node, tensorMap, context);\n if (util_exports.isPromise(value)) {\n return value.then((data) => [].concat(data));\n }\n return [].concat(value);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/executor/execution_context.js\nvar ExecutionContext = class {\n constructor(weightMap = {}, tensorArrayMap = {}, tensorListMap = {}, functionMap = {}) {\n this.weightMap = weightMap;\n this.tensorArrayMap = tensorArrayMap;\n this.tensorListMap = tensorListMap;\n this.functionMap = functionMap;\n this.rootContext = { id: 0, frameName: \"\", iterationId: 0 };\n this.contexts = [this.rootContext];\n this.lastId = 0;\n this.generateCurrentContextIds();\n }\n newFrame(id, frameName) {\n return { id, frameName, iterationId: 0 };\n }\n set currentContext(contexts2) {\n if (this.contexts !== contexts2) {\n this.contexts = contexts2;\n this.generateCurrentContextIds();\n }\n }\n get currentContext() {\n return this.contexts;\n }\n get currentContextId() {\n return this._currentContextIds[0];\n }\n get currentContextIds() {\n return this._currentContextIds;\n }\n generateCurrentContextIds() {\n const names = [];\n for (let i = 0; i < this.contexts.length - 1; i++) {\n const contexts2 = this.contexts.slice(0, this.contexts.length - i);\n names.push(this.contextIdforContexts(contexts2));\n }\n names.push(\"\");\n this._currentContextIds = names;\n }\n contextIdforContexts(contexts2) {\n return contexts2 ? contexts2.map((context) => context.id === 0 && context.iterationId === 0 ? \"\" : `${context.frameName}-${context.iterationId}`).join(\"/\") : \"\";\n }\n enterFrame(frameId) {\n if (this.contexts) {\n this.lastId++;\n this.contexts = this.contexts.slice();\n this.contexts.push(this.newFrame(this.lastId, frameId));\n this._currentContextIds.unshift(this.contextIdforContexts(this.contexts));\n }\n }\n exitFrame() {\n if (this.contexts && this.contexts.length > 1) {\n this.contexts = this.contexts.slice();\n this.contexts.splice(-1);\n this.currentContextIds.shift();\n } else {\n throw new Error(\"Cannot exit frame, the context is empty\");\n }\n }\n nextIteration() {\n if (this.contexts && this.contexts.length > 0) {\n this.contexts = this.contexts.slice();\n this.lastId++;\n const context = Object.assign({}, this.contexts[this.contexts.length - 1]);\n context.iterationId += 1;\n context.id = this.lastId;\n this.contexts.splice(-1, 1, context);\n this._currentContextIds.splice(0, 1, this.contextIdforContexts(this.contexts));\n } else {\n throw new Error(\"Cannot increase frame iteration, the context is empty\");\n }\n }\n getWeight(name) {\n return this.weightMap[name];\n }\n addTensorArray(tensorArray) {\n this.tensorArrayMap[tensorArray.id] = tensorArray;\n }\n getTensorArray(id) {\n return this.tensorArrayMap[id];\n }\n addTensorList(tensorList) {\n this.tensorListMap[tensorList.id] = tensorList;\n }\n getTensorList(id) {\n return this.tensorListMap[id];\n }\n dispose(keepIds) {\n for (const key in this.tensorArrayMap) {\n this.tensorArrayMap[key].clearAndClose(keepIds);\n }\n for (const key in this.tensorListMap) {\n this.tensorListMap[key].clearAndClose(keepIds);\n }\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/executor/model_analysis.js\nfunction getExecutionSubgraph(inputs, outputs, weightMap, initNodes) {\n const usedNodes = /* @__PURE__ */ new Set();\n const missingInputs = [];\n let dynamicNode = null;\n let syncInputs = null;\n const seen = /* @__PURE__ */ new Set();\n const inputNodeNames = Object.keys(inputs).map((name) => parseNodeName(name)[0]);\n let initNodeNames = [];\n if (initNodes != null) {\n initNodeNames = initNodes.map((node) => parseNodeName(node.name)[0]);\n }\n const frontier = [...outputs];\n while (frontier.length > 0) {\n const node = frontier.pop();\n if (isControlFlow(node) || isDynamicShape(node) || isHashTable(node)) {\n if (dynamicNode == null) {\n dynamicNode = node;\n syncInputs = dynamicNode.children.map((child) => child.name).filter((name) => usedNodes.has(name));\n }\n }\n usedNodes.add(node.name);\n if (weightMap[node.name] != null) {\n continue;\n }\n if (inputNodeNames.indexOf(node.name) !== -1) {\n continue;\n }\n if (initNodeNames.indexOf(node.name) !== -1) {\n continue;\n }\n if (node.inputs.length === 0) {\n missingInputs.push(node.name);\n continue;\n }\n node.inputs.forEach((input2) => {\n if (seen.has(input2.name)) {\n return;\n }\n seen.add(input2.name);\n frontier.push(input2);\n });\n }\n return { inputs, outputs, usedNodes, missingInputs, dynamicNode, syncInputs };\n}\nfunction getNodesInTopologicalOrder(graph, weightMap, executionInfo) {\n const { usedNodes, inputs } = executionInfo;\n const frontier = [];\n const inputNodes = Object.keys(inputs).map((name) => parseNodeName(name)[0]).map((name) => graph.nodes[name]);\n const initNodes = graph.initNodes;\n inputNodes.forEach((input2) => {\n if (usedNodes.has(input2.name)) {\n frontier.push(input2);\n }\n });\n graph.weights.forEach((weight) => {\n if (usedNodes.has(weight.name)) {\n frontier.push(weight);\n }\n });\n if (initNodes != null) {\n initNodes.forEach((node) => {\n if (usedNodes.has(node.name)) {\n frontier.push(node);\n }\n });\n }\n const seen = /* @__PURE__ */ new Set();\n const orderedNodes = [];\n while (frontier.length > 0) {\n const node = frontier.pop();\n seen.add(node.name);\n if (!weightMap[node.name]) {\n orderedNodes.push(node);\n }\n node.children.forEach((child) => {\n if (!seen.has(child.name) && usedNodes.has(child.name) && child.inputs.every((input2) => seen.has(input2.name))) {\n frontier.push(child);\n }\n });\n }\n return orderedNodes;\n}\nvar CONTROL_FLOW_OPS = [\n \"Switch\",\n \"Merge\",\n \"Enter\",\n \"Exit\",\n \"NextIteration\",\n \"StatelessIf\",\n \"StatelessWhile\",\n \"if\",\n \"While\"\n];\nvar DYNAMIC_SHAPE_OPS = [\n \"NonMaxSuppressionV2\",\n \"NonMaxSuppressionV3\",\n \"NonMaxSuppressionV5\",\n \"Where\"\n];\nvar HASH_TABLE_OPS = [\n \"HashTable\",\n \"HashTableV2\",\n \"LookupTableImport\",\n \"LookupTableImportV2\",\n \"LookupTableFind\",\n \"LookupTableFindV2\",\n \"LookupTableSize\",\n \"LookupTableSizeV2\"\n];\nfunction isControlFlow(node) {\n return CONTROL_FLOW_OPS.indexOf(node.op) >= 0;\n}\nfunction isDynamicShape(node) {\n return DYNAMIC_SHAPE_OPS.indexOf(node.op) >= 0;\n}\nfunction isHashTable(node) {\n return HASH_TABLE_OPS.indexOf(node.op) >= 0;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/executor/graph_executor.js\nvar GraphExecutor = class {\n constructor(graph, parent) {\n this.graph = graph;\n this.parent = parent;\n this.compiledMap = /* @__PURE__ */ new Map();\n this._weightMap = {};\n this.SEPERATOR = \",\";\n this._functions = {};\n this._functionExecutorMap = {};\n this.intermediateTensors = {};\n this.keepTensorForDebug = false;\n this._outputs = graph.outputs;\n this._inputs = graph.inputs;\n this._initNodes = graph.initNodes;\n this._signature = graph.signature;\n this._functions = graph.functions;\n if (graph.functions != null) {\n Object.keys(graph.functions).forEach((name) => {\n this._functionExecutorMap[name] = new GraphExecutor(graph.functions[name], this);\n });\n }\n }\n get weightIds() {\n return this.parent ? this.parent.weightIds : this._weightIds;\n }\n get functionExecutorMap() {\n return this.parent ? this.parent.functionExecutorMap : this._functionExecutorMap;\n }\n get weightMap() {\n return this.parent ? this.parent.weightMap : this._weightMap;\n }\n set weightMap(weightMap) {\n const weightIds = Object.keys(weightMap).map((key) => weightMap[key].map((tensor2) => tensor2.id));\n this._weightIds = [].concat(...weightIds);\n this._weightMap = weightMap;\n }\n set resourceManager(resourceManager) {\n this._resourceManager = resourceManager;\n }\n get inputs() {\n return this._inputs.map((node) => {\n return {\n name: node.name,\n shape: node.attrParams[\"shape\"] ? node.attrParams[\"shape\"].value : void 0,\n dtype: node.attrParams[\"dtype\"] ? node.attrParams[\"dtype\"].value : void 0\n };\n });\n }\n get outputs() {\n return this._outputs.map((node) => {\n return {\n name: node.name,\n shape: node.attrParams[\"shape\"] ? node.attrParams[\"shape\"].value : void 0,\n dtype: node.attrParams[\"dtype\"] ? node.attrParams[\"dtype\"].value : void 0\n };\n });\n }\n get inputNodes() {\n return this._inputs.map((node) => node.signatureKey || node.name);\n }\n get outputNodes() {\n return this._outputs.map((node) => {\n const name = node.signatureKey || node.name;\n return node.defaultOutput ? `${name}:${node.defaultOutput}` : name;\n });\n }\n get functions() {\n return Object.keys(this._functions).reduce((map, key) => {\n map[key] = this._functions[key].signature;\n return map;\n }, {});\n }\n getCompilationKey(inputs, outputs) {\n const sortedInputs = inputs.map((node) => node.name).sort();\n const sortedOutputs = outputs.map((node) => node.name).sort();\n return sortedInputs.join(this.SEPERATOR) + \"--\" + sortedOutputs.join(this.SEPERATOR);\n }\n compile(inputs, outputs) {\n const executionInfo = getExecutionSubgraph(inputs, outputs, this.weightMap, this._initNodes);\n const { missingInputs, dynamicNode, syncInputs } = executionInfo;\n if (dynamicNode != null) {\n throw new Error(`This execution contains the node '${dynamicNode.name}', which has the dynamic op '${dynamicNode.op}'. Please use model.executeAsync() instead. Alternatively, to avoid the dynamic ops, specify the inputs [${syncInputs}]`);\n }\n if (missingInputs.length > 0) {\n const outNames = outputs.map((n) => n.name);\n const inNames = Object.keys(inputs);\n throw new Error(`Cannot compute the outputs [${outNames}] from the provided inputs [${inNames}]. Missing the following inputs: [${missingInputs}]`);\n }\n return getNodesInTopologicalOrder(this.graph, this.weightMap, executionInfo);\n }\n execute(inputs, outputs) {\n inputs = this.mapInputs(inputs);\n const names = Object.keys(inputs).sort();\n this.checkInputs(inputs);\n this.checkInputShapeAndType(inputs);\n outputs = this.mapOutputs(outputs);\n this.checkOutputs(outputs);\n const inputNodes = names.map((name) => this.graph.nodes[parseNodeName(name)[0]]);\n const outputNodeNames = outputs.map((name) => parseNodeName(name)[0]);\n let outputNodes = outputNodeNames.map((name) => this.graph.nodes[name]);\n this.resetIntermediateTensors();\n if (outputNodes.length === 0) {\n outputNodes = this._outputs;\n }\n const compilationKey = this.getCompilationKey(inputNodes, outputNodes);\n let orderedNodes = this.compiledMap.get(compilationKey);\n if (orderedNodes == null) {\n orderedNodes = this.compile(inputs, outputNodes);\n this.compiledMap.set(compilationKey, orderedNodes);\n }\n const tensorArrayMap = {};\n const tensorListMap = {};\n return tidy(() => {\n const context = new ExecutionContext(this.weightMap, tensorArrayMap, tensorListMap, this.functionExecutorMap);\n const tensorsMap = Object.assign({}, this.weightMap);\n Object.keys(inputs).forEach((name) => {\n const [nodeName, index] = parseNodeName(name);\n const tensors = [];\n tensors[index] = inputs[name];\n tensorsMap[nodeName] = tensors;\n });\n const tensorsToKeep = this.getFrozenTensorIds(tensorsMap);\n const intermediateTensorConsumerCount = {};\n for (let i = 0; i < orderedNodes.length; i++) {\n const node = orderedNodes[i];\n if (!tensorsMap[node.name]) {\n const tensors = executeOp20(node, tensorsMap, context, this._resourceManager);\n if (util_exports.isPromise(tensors)) {\n throw new Error(`The execution of the op '${node.op}' returned a promise. Please use model.executeAsync() instead.`);\n }\n tensorsMap[node.name] = tensors;\n this.checkTensorForDisposal(node.name, node, tensorsMap, context, tensorsToKeep, outputNodeNames, intermediateTensorConsumerCount);\n }\n }\n if (this.parent == null) {\n context.dispose(tensorsToKeep);\n }\n return outputs.map((name) => getTensor(name, tensorsMap, context));\n });\n }\n getFrozenTensorIds(tensorMap) {\n const ids = [].concat.apply([], Object.keys(tensorMap).map((key) => tensorMap[key]).map((tensors) => tensors.map((tensor2) => tensor2.id)));\n return new Set(ids);\n }\n checkTensorForDisposal(nodeName, node, tensorMap, context, tensorsToKeep, outputNames, intermediateTensorConsumerCount) {\n if (node.category === \"control\" || outputNames.indexOf(nodeName) !== -1) {\n return;\n }\n tensorMap[nodeName].forEach((tensor2) => {\n if (tensor2 != null) {\n intermediateTensorConsumerCount[tensor2.id] = (intermediateTensorConsumerCount[tensor2.id] || 0) + node.children.length;\n }\n });\n node.inputs.forEach((input2) => {\n if (input2.category !== \"control\") {\n const tensors = getTensorsForCurrentContenxt(input2.name, tensorMap, context);\n if (tensors != null) {\n tensors.forEach((tensor2) => {\n if (tensor2 && !tensor2.kept && !tensorsToKeep.has(tensor2.id)) {\n const count2 = intermediateTensorConsumerCount[tensor2.id];\n if (count2 === 1) {\n if (!this.keepTensorForDebug) {\n tensor2.dispose();\n } else {\n const [nodeName2, index] = getNodeNameAndIndex(node.name, context);\n if (this.intermediateTensors[nodeName2]) {\n this.intermediateTensors[nodeName2][index] = tensor2;\n } else {\n this.intermediateTensors[nodeName2] = [];\n this.intermediateTensors[nodeName2][index] = tensor2;\n }\n }\n delete intermediateTensorConsumerCount[tensor2.id];\n } else if (count2 != null) {\n intermediateTensorConsumerCount[tensor2.id]--;\n }\n }\n });\n }\n }\n });\n }\n async executeAsync(inputs, outputs) {\n return this._executeAsync(inputs, outputs);\n }\n disposeIntermediateTensors() {\n if (!this.intermediateTensors) {\n return;\n }\n Object.keys(this.intermediateTensors).forEach((key) => this.intermediateTensors[key].forEach((tensor2) => tensor2.dispose()));\n this.disposeTensorsMap();\n }\n disposeTensorsMap() {\n if (!this.tensorsMap) {\n return;\n }\n Object.keys(this.tensorsMap).forEach((key) => {\n const tensorArray = this.tensorsMap[key];\n tensorArray.forEach((tensor2) => {\n if (tensor2 && !tensor2.kept && !tensor2.isDisposed && !this.keepIds.has(tensor2.id)) {\n tensor2.dispose();\n }\n });\n });\n }\n getIntermediateTensors() {\n return this.tensorsMap;\n }\n resetIntermediateTensors() {\n for (const key in this.intermediateTensors) {\n this.intermediateTensors[key].forEach((tensor2) => tensor2.dispose());\n delete this.intermediateTensors[key];\n }\n }\n async _executeAsync(inputs, outputs, isFunctionExecution = false, tensorArrayMap = {}, tensorListMap = {}) {\n if (!isFunctionExecution) {\n inputs = this.mapInputs(inputs);\n this.checkInputs(inputs);\n this.checkInputShapeAndType(inputs);\n outputs = this.mapOutputs(outputs);\n this.checkOutputs(outputs);\n }\n try {\n this.keepTensorForDebug = env().getBool(\"KEEP_INTERMEDIATE_TENSORS\");\n } catch (e) {\n console.warn(e.message);\n }\n this.resetIntermediateTensors();\n const context = new ExecutionContext(this.weightMap, tensorArrayMap, tensorListMap, this.functionExecutorMap);\n this.tensorsMap = await this.executeWithControlFlow(inputs, context, outputs, isFunctionExecution);\n const results = outputs.map((name) => getTensor(name, this.tensorsMap, context));\n const outputIds = results.map((t) => t.id);\n const inputIds = Object.keys(inputs).map((name) => inputs[name].id);\n this.keepIds = /* @__PURE__ */ new Set([...outputIds, ...inputIds, ...this.weightIds]);\n if (!this.keepTensorForDebug) {\n this.disposeTensorsMap();\n }\n if (this.parent == null) {\n context.dispose(this.keepIds);\n }\n return results;\n }\n async executeFunctionAsync(inputs, tensorArrayMap, tensorListMap) {\n const mappedInputs = inputs.reduce((map, tensor2, index) => {\n map[this.inputs[index].name] = tensor2;\n return map;\n }, {});\n return this._executeAsync(mappedInputs, this.outputNodes, true, tensorArrayMap, tensorListMap);\n }\n async executeWithControlFlow(inputs, context, outputNames, isFunctionExecution) {\n const names = Object.keys(inputs);\n const inputNodes = names.map((name) => this.graph.nodes[parseNodeName(name)[0]]);\n const outputNodeNames = outputNames.map((name) => parseNodeName(name)[0]);\n let outputNodes = outputNodeNames.map((name) => this.graph.nodes[name]);\n if (outputNodes.length === 0) {\n outputNodes = this._outputs;\n }\n const { usedNodes, missingInputs, dynamicNode, syncInputs } = getExecutionSubgraph(inputs, outputNodes, this.weightMap, this._initNodes);\n const stack2 = [\n ...inputNodes,\n ...this.graph.weights,\n ...this._initNodes || []\n ].map((node) => {\n return { node, contexts: context.currentContext };\n });\n const tensorsMap = Object.assign({}, this.weightMap);\n Object.keys(inputs).forEach((name) => {\n const [nodeName, index] = parseNodeName(name);\n const tensors = [];\n tensors[index] = inputs[name];\n tensorsMap[nodeName] = tensors;\n });\n const intermediateTensorConsumerCount = {};\n const tensorsToKeep = this.getFrozenTensorIds(tensorsMap);\n const added = {};\n while (stack2.length > 0) {\n const promises = this.processStack(inputNodes, stack2, context, tensorsMap, added, tensorsToKeep, outputNodeNames, intermediateTensorConsumerCount, usedNodes);\n await Promise.all(promises);\n }\n if (dynamicNode == null && !isFunctionExecution) {\n console.warn(`This model execution did not contain any nodes with control flow or dynamic output shapes. You can use model.execute() instead.`);\n }\n const missingOutputs = outputNodes.filter((node) => !isControlFlow(node) && !getTensor(node.name, tensorsMap, context)).map((node) => node.name);\n if (missingOutputs.length > 0) {\n let alternativeMsg = \"\";\n if (dynamicNode != null) {\n alternativeMsg = `Alternatively, to avoid the dynamic ops, use model.execute() and specify the inputs [${syncInputs}]`;\n }\n throw new Error(`Cannot compute the outputs [${missingOutputs}] from the provided inputs [${names}]. Consider providing the following inputs: [${missingInputs}]. ${alternativeMsg}`);\n }\n return tensorsMap;\n }\n processStack(inputNodes, stack2, context, tensorMap, added, tensorsToKeep, outputNames, intermediateTensorConsumerCount, usedNodes) {\n const promises = [];\n while (stack2.length > 0) {\n const item = stack2.pop();\n context.currentContext = item.contexts;\n let nodeName = \"\";\n if (item.node.op === \"Enter\" && getParamValue(\"isConstant\", item.node, tensorMap, context)) {\n [nodeName] = getNodeNameAndIndex(item.node.name, context);\n }\n if (tensorMap[item.node.name] == null) {\n const tensors = executeOp20(item.node, tensorMap, context, this._resourceManager);\n if (!nodeName) {\n [nodeName] = getNodeNameAndIndex(item.node.name, context);\n }\n const currentContext = context.currentContext;\n if (util_exports.isPromise(tensors)) {\n promises.push(tensors.then((t) => {\n tensorMap[nodeName] = t;\n context.currentContext = currentContext;\n this.checkTensorForDisposal(nodeName, item.node, tensorMap, context, tensorsToKeep, outputNames, intermediateTensorConsumerCount);\n this.processChildNodes(item.node, stack2, context, tensorMap, added, usedNodes);\n return t;\n }));\n } else {\n tensorMap[nodeName] = tensors;\n this.checkTensorForDisposal(nodeName, item.node, tensorMap, context, tensorsToKeep, outputNames, intermediateTensorConsumerCount);\n this.processChildNodes(item.node, stack2, context, tensorMap, added, usedNodes);\n }\n } else {\n this.processChildNodes(item.node, stack2, context, tensorMap, added, usedNodes);\n }\n }\n return promises;\n }\n processChildNodes(node, stack2, context, tensorMap, added, usedNodes) {\n node.children.forEach((childNode) => {\n const [nodeName] = getNodeNameAndIndex(childNode.name, context);\n if (added[nodeName] || !usedNodes.has(childNode.name)) {\n return;\n }\n if (childNode.op === \"Merge\") {\n if (childNode.inputNames.some((name) => {\n return !!getTensor(name, tensorMap, context);\n })) {\n added[nodeName] = true;\n stack2.push({ contexts: context.currentContext, node: childNode });\n }\n } else if (childNode.inputNames.every((name) => {\n return !!getTensor(name, tensorMap, context);\n })) {\n added[nodeName] = true;\n stack2.push({ contexts: context.currentContext, node: childNode });\n }\n });\n }\n dispose() {\n Object.keys(this.weightMap).forEach((key) => this.weightMap[key].forEach((tensor2) => tensor2.dispose()));\n }\n checkInputShapeAndType(inputs) {\n Object.keys(inputs).forEach((name) => {\n const input2 = inputs[name];\n const [nodeName] = parseNodeName(name);\n const node = this.graph.nodes[nodeName];\n if (node.attrParams[\"shape\"] && node.attrParams[\"shape\"].value) {\n const shape = node.attrParams[\"shape\"].value;\n const match = shape.length === input2.shape.length && input2.shape.every((dim, index) => shape[index] === -1 || shape[index] === dim);\n util_exports.assert(match, () => `The shape of dict['${node.name}'] provided in model.execute(dict) must be [${shape}], but was [${input2.shape}]`);\n }\n if (node.attrParams[\"dtype\"] && node.attrParams[\"dtype\"].value) {\n util_exports.assert(input2.dtype === node.attrParams[\"dtype\"].value, () => `The dtype of dict['${node.name}'] provided in model.execute(dict) must be ${node.attrParams[\"dtype\"].value}, but was ${input2.dtype}`);\n }\n });\n }\n mapInputs(inputs) {\n const result = {};\n for (const inputName in inputs) {\n if (this._signature != null && this._signature.inputs != null && this._signature.inputs[inputName] != null) {\n const tensor2 = this._signature.inputs[inputName];\n result[tensor2.name] = inputs[inputName];\n } else {\n result[inputName] = inputs[inputName];\n }\n }\n return result;\n }\n checkInputs(inputs) {\n const notInGraph = Object.keys(inputs).filter((name) => {\n const [nodeName] = parseNodeName(name);\n return this.graph.nodes[nodeName] == null;\n });\n if (notInGraph.length > 0) {\n throw new Error(`The dict provided in model.execute(dict) has keys: [${notInGraph}] that are not part of graph`);\n }\n }\n mapOutputs(outputs) {\n return outputs.map((name) => {\n if (this._signature != null && this._signature.outputs != null && this._signature.outputs[name] != null) {\n const tensor2 = this._signature.outputs[name];\n return tensor2.name;\n }\n return name;\n }, {});\n }\n checkOutputs(outputs) {\n outputs.forEach((name) => {\n const [normalizedName] = parseNodeName(name);\n if (!this.graph.nodes[normalizedName]) {\n throw new Error(`The output '${name}' is not found in the graph`);\n }\n });\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/executor/resource_manager.js\nvar ResourceManager = class {\n constructor(hashTableNameToHandle = {}, hashTableMap = {}) {\n this.hashTableNameToHandle = hashTableNameToHandle;\n this.hashTableMap = hashTableMap;\n }\n addHashTable(name, hashTable) {\n this.hashTableNameToHandle[name] = hashTable.handle;\n this.hashTableMap[hashTable.id] = hashTable;\n }\n getHashTableHandleByName(name) {\n return this.hashTableNameToHandle[name];\n }\n getHashTableById(id) {\n return this.hashTableMap[id];\n }\n dispose() {\n for (const key in this.hashTableMap) {\n this.hashTableMap[key].clearAndClose();\n delete this.hashTableMap[key];\n }\n for (const name in this.hashTableNameToHandle) {\n this.hashTableNameToHandle[name].dispose();\n delete this.hashTableNameToHandle[name];\n }\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/executor/graph_model.js\nvar TFHUB_SEARCH_PARAM = \"?tfjs-format=file\";\nvar DEFAULT_MODEL_NAME = \"model.json\";\nvar GraphModel = class {\n constructor(modelUrl, loadOptions = {}, tfio = io_exports) {\n this.modelUrl = modelUrl;\n this.loadOptions = loadOptions;\n this.version = \"n/a\";\n this.io = tfio;\n if (loadOptions == null) {\n this.loadOptions = {};\n }\n this.resourceManager = new ResourceManager();\n }\n get modelVersion() {\n return this.version;\n }\n get inputNodes() {\n return this.executor.inputNodes;\n }\n get outputNodes() {\n return this.executor.outputNodes;\n }\n get inputs() {\n return this.executor.inputs;\n }\n get outputs() {\n return this.executor.outputs;\n }\n get weights() {\n return this.executor.weightMap;\n }\n get metadata() {\n return this.artifacts.userDefinedMetadata;\n }\n get modelSignature() {\n return this.signature;\n }\n get modelStructuredOutputKeys() {\n return this.structuredOutputKeys;\n }\n findIOHandler() {\n const path = this.modelUrl;\n if (path.load != null) {\n this.handler = path;\n } else if (this.loadOptions.requestInit != null) {\n this.handler = this.io.browserHTTPRequest(path, this.loadOptions);\n } else {\n const handlers = this.io.getLoadHandlers(path, this.loadOptions);\n if (handlers.length === 0) {\n handlers.push(this.io.browserHTTPRequest(path, this.loadOptions));\n } else if (handlers.length > 1) {\n throw new Error(`Found more than one (${handlers.length}) load handlers for URL '${[path]}'`);\n }\n this.handler = handlers[0];\n }\n }\n load() {\n this.findIOHandler();\n if (this.handler.load == null) {\n throw new Error(\"Cannot proceed with model loading because the IOHandler provided does not have the `load` method implemented.\");\n }\n const loadResult = this.handler.load();\n if (util_exports.isPromise(loadResult)) {\n return loadResult.then((artifacts) => this.loadSync(artifacts));\n }\n return this.loadSync(loadResult);\n }\n loadSync(artifacts) {\n this.artifacts = artifacts;\n const graph = this.artifacts.modelTopology;\n let signature = this.artifacts.signature;\n if (this.artifacts.userDefinedMetadata != null) {\n const metadata = this.artifacts.userDefinedMetadata;\n if (metadata.signature != null) {\n signature = metadata.signature;\n }\n if (metadata.structuredOutputKeys != null) {\n this.structuredOutputKeys = metadata.structuredOutputKeys;\n }\n }\n this.signature = signature;\n this.version = `${graph.versions.producer}.${graph.versions.minConsumer}`;\n const weightMap = this.io.decodeWeights(this.artifacts.weightData, this.artifacts.weightSpecs);\n this.executor = new GraphExecutor(OperationMapper.Instance.transformGraph(graph, this.signature));\n this.executor.weightMap = this.convertTensorMapToTensorsMap(weightMap);\n this.executor.resourceManager = this.resourceManager;\n if (artifacts.modelInitializer != null && artifacts.modelInitializer.node != null) {\n const initializer = OperationMapper.Instance.transformGraph(artifacts.modelInitializer);\n this.initializer = new GraphExecutor(initializer);\n this.initializer.weightMap = this.executor.weightMap;\n this.initializer.resourceManager = this.resourceManager;\n this.initializer.executeAsync({}, []);\n }\n return true;\n }\n async save(handlerOrURL, config) {\n if (typeof handlerOrURL === \"string\") {\n const handlers = this.io.getSaveHandlers(handlerOrURL);\n if (handlers.length === 0) {\n throw new Error(`Cannot find any save handlers for URL '${handlerOrURL}'`);\n } else if (handlers.length > 1) {\n throw new Error(`Found more than one (${handlers.length}) save handlers for URL '${handlerOrURL}'`);\n }\n handlerOrURL = handlers[0];\n }\n if (handlerOrURL.save == null) {\n throw new Error(\"GraphModel.save() cannot proceed because the IOHandler provided does not have the `save` attribute defined.\");\n }\n return handlerOrURL.save(this.artifacts);\n }\n predict(inputs, config) {\n const outputTensors = this.execute(inputs, this.outputNodes);\n if (this.structuredOutputKeys) {\n const outputTensorsArray = outputTensors instanceof Tensor ? [outputTensors] : outputTensors;\n const outputTensorMap = {};\n outputTensorsArray.forEach((outputTensor, i) => outputTensorMap[this.structuredOutputKeys[i]] = outputTensor);\n return outputTensorMap;\n }\n return outputTensors;\n }\n normalizeInputs(inputs) {\n if (!(inputs instanceof Tensor) && !Array.isArray(inputs)) {\n return inputs;\n }\n inputs = Array.isArray(inputs) ? inputs : [inputs];\n if (inputs.length !== this.inputNodes.length) {\n throw new Error(`Input tensor count mismatch,the graph model has ${this.inputNodes.length} placeholders, while there are ${inputs.length} input tensors.`);\n }\n return this.inputNodes.reduce((map, inputName, i) => {\n map[inputName] = inputs[i];\n return map;\n }, {});\n }\n normalizeOutputs(outputs) {\n outputs = outputs || this.outputNodes;\n return !Array.isArray(outputs) ? [outputs] : outputs;\n }\n execute(inputs, outputs) {\n inputs = this.normalizeInputs(inputs);\n outputs = this.normalizeOutputs(outputs);\n const result = this.executor.execute(inputs, outputs);\n return result.length > 1 ? result : result[0];\n }\n async executeAsync(inputs, outputs) {\n inputs = this.normalizeInputs(inputs);\n outputs = this.normalizeOutputs(outputs);\n const result = await this.executor.executeAsync(inputs, outputs);\n return result.length > 1 ? result : result[0];\n }\n getIntermediateTensors() {\n return this.executor.getIntermediateTensors();\n }\n disposeIntermediateTensors() {\n this.executor.disposeIntermediateTensors();\n }\n convertTensorMapToTensorsMap(map) {\n return Object.keys(map).reduce((newMap, key) => {\n newMap[key] = [map[key]];\n return newMap;\n }, {});\n }\n dispose() {\n this.executor.dispose();\n if (this.initializer) {\n this.initializer.dispose();\n }\n this.resourceManager.dispose();\n }\n};\nasync function loadGraphModel(modelUrl, options = {}, tfio = io_exports) {\n if (modelUrl == null) {\n throw new Error(\"modelUrl in loadGraphModel() cannot be null. Please provide a url or an IOHandler that loads the model\");\n }\n if (options == null) {\n options = {};\n }\n if (options.fromTFHub && typeof modelUrl === \"string\") {\n modelUrl = getTFHubUrl(modelUrl);\n }\n const model2 = new GraphModel(modelUrl, options, tfio);\n await model2.load();\n return model2;\n}\nfunction loadGraphModelSync(modelSource) {\n if (modelSource == null) {\n throw new Error(\"modelUrl in loadGraphModelSync() cannot be null. Please provide a url or an IOHandler that loads the model\");\n }\n if (!modelSource.load) {\n throw new Error(`modelUrl IO Handler ${modelSource} has no load function`);\n }\n const model2 = new GraphModel(modelSource);\n model2.load();\n return model2;\n}\nfunction getTFHubUrl(modelUrl) {\n if (!modelUrl.endsWith(\"/\")) {\n modelUrl = modelUrl + \"/\";\n }\n return `${modelUrl}${DEFAULT_MODEL_NAME}${TFHUB_SEARCH_PARAM}`;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/version.js\nvar version3 = \"3.20.0\";\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/index.js\nvar dist_exports2 = {};\n__export(dist_exports2, {\n CSVDataset: () => CSVDataset,\n Dataset: () => Dataset,\n FileDataSource: () => FileDataSource,\n TextLineDataset: () => TextLineDataset,\n URLDataSource: () => URLDataSource,\n array: () => array,\n csv: () => csv,\n func: () => func,\n generator: () => generator,\n microphone: () => microphone,\n version_data: () => version4,\n webcam: () => webcam,\n zip: () => zip\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/dataset.js\nvar seedrandom3 = __toESM(require_seedrandom2());\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/iterators/lazy_iterator.js\nvar seedrandom2 = __toESM(require_seedrandom2());\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/util/deep_map.js\nfunction deepMap(input2, mapFn) {\n return deepMapInternal(input2, mapFn);\n}\nfunction deepMapInternal(input2, mapFn, seen = /* @__PURE__ */ new Map(), containedIn = /* @__PURE__ */ new Set()) {\n if (input2 == null) {\n return null;\n }\n if (typeof Blob === \"function\" && input2 instanceof Blob) {\n return input2.slice();\n }\n if (containedIn.has(input2)) {\n throw new Error(\"Circular references are not supported.\");\n }\n if (seen.has(input2)) {\n return seen.get(input2);\n }\n const result = mapFn(input2);\n if (result.recurse && result.value !== null) {\n throw new Error(\"A deep map function may not return both a value and recurse=true.\");\n }\n if (!result.recurse) {\n seen.set(input2, result.value);\n return result.value;\n } else if (isIterable2(input2)) {\n const mappedIterable = Array.isArray(input2) ? [] : {};\n containedIn.add(input2);\n for (const k in input2) {\n const child = input2[k];\n const childResult = deepMapInternal(child, mapFn, seen, containedIn);\n mappedIterable[k] = childResult;\n }\n containedIn.delete(input2);\n if (input2.__proto__) {\n mappedIterable.__proto__ = input2.__proto__;\n }\n return mappedIterable;\n } else {\n throw new Error(`Can't recurse into non-iterable type: ${input2}`);\n }\n}\nfunction deepZip(inputs, zipFn = zipToList) {\n return deepZipInternal(inputs, zipFn);\n}\nfunction deepZipInternal(inputs, zipFn, containedIn = /* @__PURE__ */ new Set()) {\n const input2 = inputs[0];\n if (containedIn.has(input2)) {\n throw new Error(\"Circular references are not supported.\");\n }\n const result = zipFn(inputs);\n if (result.recurse && result.value !== null) {\n throw new Error(\"A deep zip function may not return both a value and recurse=true.\");\n }\n if (!result.recurse) {\n return result.value;\n } else if (isIterable2(input2)) {\n const mappedIterable = Array.isArray(input2) ? [] : {};\n containedIn.add(input2);\n for (const k in input2) {\n const children = inputs.map((x) => x[k]);\n const childResult = deepZipInternal(children, zipFn, containedIn);\n mappedIterable[k] = childResult;\n }\n containedIn.delete(input2);\n return mappedIterable;\n } else {\n throw new Error(`Can't recurse into non-iterable type: ${input2}`);\n }\n}\nfunction zipToList(x) {\n if (x === null) {\n return null;\n }\n if (isIterable2(x[0])) {\n return { value: null, recurse: true };\n } else {\n return { value: x, recurse: false };\n }\n}\nasync function deepMapAndAwaitAll(input2, mapFn) {\n const seen = /* @__PURE__ */ new Map();\n deepMapInternal(input2, mapFn, seen);\n for (const key of Array.from(seen.keys())) {\n const value = seen.get(key);\n if (util_exports.isPromise(value)) {\n const mappedValue = await value;\n seen.set(key, mappedValue);\n }\n }\n const result = deepMapInternal(input2, mapFn, seen);\n return result;\n}\nfunction isIterable2(obj) {\n let isTextDecoder = false;\n if (env().get(\"IS_BROWSER\")) {\n isTextDecoder = obj instanceof TextDecoder;\n } else {\n const { StringDecoder } = require_string_decoder();\n isTextDecoder = obj instanceof StringDecoder;\n }\n return obj != null && !ArrayBuffer.isView(obj) && (Array.isArray(obj) || typeof obj === \"object\" && !(obj instanceof Tensor) && !(obj instanceof Promise) && !isTextDecoder);\n}\nfunction canTensorify(obj) {\n return obj == null || isPrimitive(obj) || Array.isArray(obj) || typeof obj === \"object\" && obj instanceof Tensor || util_exports.isTypedArray(obj);\n}\nfunction isPrimitive(value) {\n return value === null || typeof value !== \"object\" && typeof value !== \"function\";\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/util/deep_clone.js\nfunction deepClone(container) {\n return deepMap(container, cloneIfTensor);\n}\nfunction cloneIfTensor(item) {\n if (item instanceof Tensor) {\n return { value: item.clone(), recurse: false };\n } else if (isIterable2(item)) {\n return { value: null, recurse: true };\n } else {\n return { value: item, recurse: false };\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/util/ring_buffer.js\nvar RingBuffer = class {\n constructor(capacity) {\n this.capacity = capacity;\n this.begin = 0;\n this.end = 0;\n if (capacity == null) {\n throw new RangeError(\"Can't create a ring buffer of unknown capacity.\");\n }\n if (capacity < 1) {\n throw new RangeError(\"Can't create ring buffer of capacity < 1.\");\n }\n this.data = new Array(capacity);\n this.doubledCapacity = 2 * capacity;\n }\n wrap(index) {\n while (index < 0) {\n index += this.doubledCapacity;\n }\n return index % this.doubledCapacity;\n }\n get(index) {\n if (index < 0) {\n throw new RangeError(\"Can't get item at a negative index.\");\n }\n return this.data[index % this.capacity];\n }\n set(index, value) {\n if (index < 0) {\n throw new RangeError(\"Can't set item at a negative index.\");\n }\n this.data[index % this.capacity] = value;\n }\n length() {\n let length = this.end - this.begin;\n if (length < 0) {\n length = this.doubledCapacity + length;\n }\n return length;\n }\n isFull() {\n return this.length() === this.capacity;\n }\n isEmpty() {\n return this.length() === 0;\n }\n push(value) {\n if (this.isFull()) {\n throw new RangeError(\"Ring buffer is full.\");\n }\n this.set(this.end, value);\n this.end = this.wrap(this.end + 1);\n }\n pushAll(values) {\n for (const value of values) {\n this.push(value);\n }\n }\n pop() {\n if (this.isEmpty()) {\n throw new RangeError(\"Ring buffer is empty.\");\n }\n this.end = this.wrap(this.end - 1);\n const result = this.get(this.end);\n this.set(this.end, void 0);\n return result;\n }\n unshift(value) {\n if (this.isFull()) {\n throw new RangeError(\"Ring buffer is full.\");\n }\n this.begin = this.wrap(this.begin - 1);\n this.set(this.begin, value);\n }\n shift() {\n if (this.isEmpty()) {\n throw new RangeError(\"Ring buffer is empty.\");\n }\n const result = this.get(this.begin);\n this.set(this.begin, void 0);\n this.begin = this.wrap(this.begin + 1);\n return result;\n }\n shuffleExcise(relativeIndex) {\n if (this.isEmpty()) {\n throw new RangeError(\"Ring buffer is empty.\");\n }\n const index = this.wrap(this.begin + relativeIndex);\n const result = this.get(index);\n this.set(index, this.pop());\n return result;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/util/growing_ring_buffer.js\nvar GrowingRingBuffer = class extends RingBuffer {\n constructor() {\n super(GrowingRingBuffer.INITIAL_CAPACITY);\n }\n isFull() {\n return false;\n }\n push(value) {\n if (super.isFull()) {\n this.expand();\n }\n super.push(value);\n }\n unshift(value) {\n if (super.isFull()) {\n this.expand();\n }\n super.unshift(value);\n }\n expand() {\n const newCapacity = this.capacity * 2;\n const newData = new Array(newCapacity);\n const len = this.length();\n for (let i = 0; i < len; i++) {\n newData[i] = this.get(this.wrap(this.begin + i));\n }\n this.data = newData;\n this.capacity = newCapacity;\n this.doubledCapacity = 2 * this.capacity;\n this.begin = 0;\n this.end = len;\n }\n};\nGrowingRingBuffer.INITIAL_CAPACITY = 32;\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/iterators/lazy_iterator.js\nfunction iteratorFromItems(items) {\n return new ArrayIterator(items);\n}\nfunction iteratorFromFunction(func2) {\n return new FunctionCallIterator(func2);\n}\nfunction iteratorFromConcatenated(baseIterators, baseErrorHandler) {\n return new ChainedIterator(baseIterators, baseErrorHandler);\n}\nfunction iteratorFromZipped(iterators, mismatchMode = ZipMismatchMode.FAIL) {\n return new ZipIterator(iterators, mismatchMode);\n}\nvar LazyIterator = class {\n async toArray() {\n const result = [];\n let x = await this.next();\n while (!x.done) {\n result.push(x.value);\n x = await this.next();\n }\n return result;\n }\n async toArrayForTest() {\n const stream = this.prefetch(100);\n const result = [];\n let x = await stream.next();\n while (!x.done) {\n result.push(x.value);\n x = await stream.next();\n }\n return result;\n }\n async resolveFully() {\n let x = await this.next();\n while (!x.done) {\n x = await this.next();\n }\n }\n async resolveWhile(predicate) {\n let x = await this.next();\n let shouldContinue = predicate(x.value);\n while (!x.done && shouldContinue) {\n x = await this.next();\n shouldContinue = predicate(x.value);\n }\n }\n handleErrors(handler) {\n return new ErrorHandlingLazyIterator(this, handler);\n }\n filter(predicate) {\n return new FilterIterator(this, predicate);\n }\n map(transform6) {\n return new MapIterator(this, transform6);\n }\n mapAsync(transform6) {\n return new AsyncMapIterator(this, transform6);\n }\n serialMapAsync(transform6) {\n return new AsyncMapIterator(this, transform6).serial();\n }\n flatmap(transform6) {\n return new FlatmapIterator(this, transform6);\n }\n async forEachAsync(f) {\n return this.map(f).resolveFully();\n }\n async serialForEach(f) {\n return this.serialMapAsync(f).resolveWhile((x) => x === true);\n }\n rowMajorBatch(batchSize, smallLastBatch = true) {\n return new RowMajorBatchIterator(this, batchSize, smallLastBatch);\n }\n columnMajorBatch(batchSize, smallLastBatch = true, zipFn = zipToList) {\n const rowBatches = this.rowMajorBatch(batchSize, smallLastBatch);\n return rowBatches.map((x) => deepZip(x, zipFn));\n }\n concatenate(iterator, baseErrorHandler) {\n return new ChainedIterator(iteratorFromItems([this, iterator]), baseErrorHandler);\n }\n take(count2) {\n if (count2 < 0 || count2 == null) {\n return this;\n }\n return new TakeIterator(this, count2);\n }\n skip(count2) {\n if (count2 < 0 || count2 == null) {\n return this;\n }\n return new SkipIterator(this, count2);\n }\n prefetch(bufferSize) {\n return new PrefetchIterator(this, bufferSize);\n }\n shuffle(windowSize, seed) {\n return new ShuffleIterator(this, windowSize, seed);\n }\n serial() {\n return new SerialIterator(this);\n }\n};\nvar ArrayIterator = class extends LazyIterator {\n constructor(items) {\n super();\n this.items = items;\n this.trav = 0;\n }\n summary() {\n return `Array of ${this.items.length} items`;\n }\n async next() {\n if (this.trav >= this.items.length) {\n return { value: null, done: true };\n }\n const item = this.items[this.trav];\n this.trav++;\n return { value: deepClone(item), done: false };\n }\n};\nvar FunctionCallIterator = class extends LazyIterator {\n constructor(nextFn) {\n super();\n this.nextFn = nextFn;\n }\n summary() {\n return `Function call`;\n }\n async next() {\n try {\n return this.nextFn();\n } catch (e) {\n e.message = `Error thrown while iterating through a dataset: ${e.message}`;\n throw e;\n }\n }\n};\nvar SerialIterator = class extends LazyIterator {\n constructor(upstream) {\n super();\n this.upstream = upstream;\n this.lastRead = Promise.resolve({ value: null, done: false });\n }\n summary() {\n return `${this.upstream.summary()} -> Serial`;\n }\n async next() {\n this.lastRead = this.lastRead.then(() => this.serialNext());\n return this.lastRead;\n }\n async serialNext() {\n return this.upstream.next();\n }\n};\nvar SkipIterator = class extends LazyIterator {\n constructor(upstream, maxCount) {\n super();\n this.upstream = upstream;\n this.maxCount = maxCount;\n this.count = 0;\n this.lastRead = Promise.resolve({ value: null, done: false });\n }\n summary() {\n return `${this.upstream.summary()} -> Skip`;\n }\n async next() {\n this.lastRead = this.lastRead.then(() => this.serialNext());\n return this.lastRead;\n }\n async serialNext() {\n while (this.count++ < this.maxCount) {\n const skipped = await this.upstream.next();\n if (skipped.done) {\n return skipped;\n }\n dispose(skipped.value);\n }\n return this.upstream.next();\n }\n};\nvar TakeIterator = class extends LazyIterator {\n constructor(upstream, maxCount) {\n super();\n this.upstream = upstream;\n this.maxCount = maxCount;\n this.count = 0;\n }\n summary() {\n return `${this.upstream.summary()} -> Take`;\n }\n async next() {\n if (this.count++ >= this.maxCount) {\n return { value: null, done: true };\n }\n return this.upstream.next();\n }\n};\nvar RowMajorBatchIterator = class extends LazyIterator {\n constructor(upstream, batchSize, enableSmallLastBatch = true) {\n super();\n this.upstream = upstream;\n this.batchSize = batchSize;\n this.enableSmallLastBatch = enableSmallLastBatch;\n this.lastRead = Promise.resolve({ value: null, done: false });\n }\n summary() {\n return `${this.upstream.summary()} -> RowMajorBatch`;\n }\n async next() {\n this.lastRead = this.lastRead.then(() => this.serialNext());\n return this.lastRead;\n }\n async serialNext() {\n const batch = [];\n while (batch.length < this.batchSize) {\n const item = await this.upstream.next();\n if (item.done) {\n if (this.enableSmallLastBatch && batch.length > 0) {\n return { value: batch, done: false };\n }\n return { value: null, done: true };\n }\n batch.push(item.value);\n }\n return { value: batch, done: false };\n }\n};\nvar FilterIterator = class extends LazyIterator {\n constructor(upstream, predicate) {\n super();\n this.upstream = upstream;\n this.predicate = predicate;\n this.lastRead = Promise.resolve({ value: null, done: false });\n }\n summary() {\n return `${this.upstream.summary()} -> Filter`;\n }\n async next() {\n this.lastRead = this.lastRead.then(() => this.serialNext());\n return this.lastRead;\n }\n async serialNext() {\n while (true) {\n const item = await this.upstream.next();\n if (item.done || this.predicate(item.value)) {\n return item;\n }\n dispose(item.value);\n }\n }\n};\nvar MapIterator = class extends LazyIterator {\n constructor(upstream, transform6) {\n super();\n this.upstream = upstream;\n this.transform = transform6;\n }\n summary() {\n return `${this.upstream.summary()} -> Map`;\n }\n async next() {\n const item = await this.upstream.next();\n if (item.done) {\n return { value: null, done: true };\n }\n const inputTensors = tensor_util_exports.getTensorsInContainer(item.value);\n const mapped = this.transform(item.value);\n const outputTensors = tensor_util_exports.getTensorsInContainer(mapped);\n for (const t of inputTensors) {\n if (!tensor_util_exports.isTensorInList(t, outputTensors)) {\n t.dispose();\n }\n }\n return { value: mapped, done: false };\n }\n};\nvar ErrorHandlingLazyIterator = class extends LazyIterator {\n constructor(upstream, handler) {\n super();\n this.upstream = upstream;\n this.handler = handler;\n this.count = 0;\n this.lastRead = Promise.resolve({ value: null, done: false });\n }\n summary() {\n return `${this.upstream.summary()} -> handleErrors`;\n }\n async next() {\n this.lastRead = this.lastRead.then(() => this.serialNext());\n return this.lastRead;\n }\n async serialNext() {\n while (true) {\n try {\n return await this.upstream.next();\n } catch (e) {\n if (!this.handler(e)) {\n return { value: null, done: true };\n }\n }\n }\n }\n};\nvar AsyncMapIterator = class extends LazyIterator {\n constructor(upstream, transform6) {\n super();\n this.upstream = upstream;\n this.transform = transform6;\n }\n summary() {\n return `${this.upstream.summary()} -> AsyncMap`;\n }\n async next() {\n const item = await this.upstream.next();\n if (item.done) {\n return { value: null, done: true };\n }\n const inputTensors = tensor_util_exports.getTensorsInContainer(item.value);\n const mapped = await this.transform(item.value);\n const outputTensors = tensor_util_exports.getTensorsInContainer(mapped);\n for (const t of inputTensors) {\n if (!tensor_util_exports.isTensorInList(t, outputTensors)) {\n t.dispose();\n }\n }\n return { value: mapped, done: false };\n }\n};\nvar OneToManyIterator = class extends LazyIterator {\n constructor() {\n super();\n this.outputQueue = new GrowingRingBuffer();\n this.lastRead = Promise.resolve({ value: null, done: false });\n }\n async next() {\n this.lastRead = this.lastRead.then(() => this.serialNext());\n return this.lastRead;\n }\n async serialNext() {\n while (this.outputQueue.length() === 0) {\n if (!await this.pump()) {\n return { value: null, done: true };\n }\n }\n return { value: this.outputQueue.shift(), done: false };\n }\n};\nvar FlatmapIterator = class extends OneToManyIterator {\n constructor(upstream, transform6) {\n super();\n this.upstream = upstream;\n this.transform = transform6;\n }\n summary() {\n return `${this.upstream.summary()} -> Flatmap`;\n }\n async pump() {\n const item = await this.upstream.next();\n if (item.done) {\n return false;\n }\n const inputTensors = tensor_util_exports.getTensorsInContainer(item.value);\n const mappedArray = this.transform(item.value);\n const outputTensors = tensor_util_exports.getTensorsInContainer(mappedArray);\n this.outputQueue.pushAll(mappedArray);\n for (const t of inputTensors) {\n if (!tensor_util_exports.isTensorInList(t, outputTensors)) {\n t.dispose();\n }\n }\n return true;\n }\n};\nvar ChainedIterator = class extends LazyIterator {\n constructor(iterators, baseErrorHandler) {\n super();\n this.baseErrorHandler = baseErrorHandler;\n this.lastRead = null;\n this.iterator = null;\n this.moreIterators = iterators;\n }\n summary() {\n const upstreamSummaries = \"TODO: fill in upstream of chained summaries\";\n return `${upstreamSummaries} -> Chained`;\n }\n async next() {\n this.lastRead = this.readFromChain(this.lastRead);\n return this.lastRead;\n }\n async readFromChain(lastRead) {\n await lastRead;\n if (this.iterator == null) {\n const iteratorResult = await this.moreIterators.next();\n if (iteratorResult.done) {\n return { value: null, done: true };\n }\n this.iterator = iteratorResult.value;\n if (this.baseErrorHandler != null) {\n this.iterator = this.iterator.handleErrors(this.baseErrorHandler);\n }\n }\n const itemResult = await this.iterator.next();\n if (itemResult.done) {\n this.iterator = null;\n return this.readFromChain(lastRead);\n }\n return itemResult;\n }\n};\nvar ZipMismatchMode;\n(function(ZipMismatchMode2) {\n ZipMismatchMode2[ZipMismatchMode2[\"FAIL\"] = 0] = \"FAIL\";\n ZipMismatchMode2[ZipMismatchMode2[\"SHORTEST\"] = 1] = \"SHORTEST\";\n ZipMismatchMode2[ZipMismatchMode2[\"LONGEST\"] = 2] = \"LONGEST\";\n})(ZipMismatchMode || (ZipMismatchMode = {}));\nvar ZipIterator = class extends LazyIterator {\n constructor(iterators, mismatchMode = ZipMismatchMode.FAIL) {\n super();\n this.iterators = iterators;\n this.mismatchMode = mismatchMode;\n this.count = 0;\n this.currentPromise = null;\n }\n summary() {\n const upstreamSummaries = \"TODO: fill in upstream of zip summaries\";\n return `{${upstreamSummaries}} -> Zip`;\n }\n async nextState(afterState) {\n await afterState;\n let numIterators = 0;\n let iteratorsDone = 0;\n function getNext(container) {\n if (container instanceof LazyIterator) {\n const result = container.next();\n return {\n value: result.then((x) => {\n numIterators++;\n if (x.done) {\n iteratorsDone++;\n }\n return x.value;\n }),\n recurse: false\n };\n } else {\n return { value: null, recurse: true };\n }\n }\n const mapped = await deepMapAndAwaitAll(this.iterators, getNext);\n if (numIterators === iteratorsDone) {\n return { value: null, done: true };\n }\n if (iteratorsDone > 0) {\n switch (this.mismatchMode) {\n case ZipMismatchMode.FAIL:\n throw new Error(`Zipped streams should have the same length. Mismatched at element ${this.count}.`);\n case ZipMismatchMode.SHORTEST:\n return { value: null, done: true };\n case ZipMismatchMode.LONGEST:\n default:\n }\n }\n this.count++;\n return { value: mapped, done: false };\n }\n async next() {\n this.currentPromise = this.nextState(this.currentPromise);\n return this.currentPromise;\n }\n};\nvar PrefetchIterator = class extends LazyIterator {\n constructor(upstream, bufferSize) {\n super();\n this.upstream = upstream;\n this.bufferSize = bufferSize;\n this.buffer = new RingBuffer(bufferSize);\n }\n summary() {\n return `${this.upstream.summary()} -> Prefetch`;\n }\n refill() {\n while (!this.buffer.isFull()) {\n const v = this.upstream.next();\n this.buffer.push(v);\n }\n }\n next() {\n this.refill();\n return this.buffer.shift();\n }\n};\nvar ShuffleIterator = class extends PrefetchIterator {\n constructor(upstream, windowSize, seed) {\n super(upstream, windowSize);\n this.upstream = upstream;\n this.windowSize = windowSize;\n this.upstreamExhausted = false;\n this.random = seedrandom2.alea(seed || util_exports.now().toString());\n this.lastRead = Promise.resolve({ value: null, done: false });\n }\n async next() {\n this.lastRead = this.lastRead.then(() => this.serialNext());\n return this.lastRead;\n }\n randomInt(max7) {\n return Math.floor(this.random() * max7);\n }\n chooseIndex() {\n return this.randomInt(this.buffer.length());\n }\n async serialNext() {\n if (!this.upstreamExhausted) {\n this.refill();\n }\n while (!this.buffer.isEmpty()) {\n const chosenIndex = this.chooseIndex();\n const result = await this.buffer.shuffleExcise(chosenIndex);\n if (result.done) {\n this.upstreamExhausted = true;\n } else {\n this.refill();\n return result;\n }\n }\n return { value: null, done: true };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/dataset.js\nvar Dataset = class {\n constructor() {\n this.size = null;\n }\n batch(batchSize, smallLastBatch = true) {\n const base = this;\n util_exports.assert(batchSize > 0, () => `batchSize needs to be positive, but it is\n ${batchSize}`);\n let size;\n if (this.size === Infinity || this.size == null) {\n size = this.size;\n } else if (smallLastBatch) {\n size = Math.ceil(this.size / batchSize);\n } else {\n size = Math.floor(this.size / batchSize);\n }\n return datasetFromIteratorFn(async () => {\n return (await base.iterator()).columnMajorBatch(batchSize, smallLastBatch, deepBatchConcat);\n }, size);\n }\n concatenate(dataset) {\n const base = this;\n let size;\n if (this.size === Infinity || dataset.size === Infinity) {\n size = Infinity;\n } else if (this.size != null && dataset.size != null) {\n size = this.size + dataset.size;\n } else {\n size = null;\n }\n return datasetFromIteratorFn(async () => (await base.iterator()).concatenate(await dataset.iterator()), size);\n }\n filter(predicate) {\n const base = this;\n let size;\n if (this.size === Infinity) {\n size = Infinity;\n } else {\n size = null;\n }\n return datasetFromIteratorFn(async () => {\n return (await base.iterator()).filter((x) => tidy(() => predicate(x)));\n }, size);\n }\n async forEachAsync(f) {\n return (await this.iterator()).forEachAsync(f);\n }\n map(transform6) {\n const base = this;\n return datasetFromIteratorFn(async () => {\n return (await base.iterator()).map((x) => tidy(() => transform6(x)));\n }, this.size);\n }\n mapAsync(transform6) {\n const base = this;\n return datasetFromIteratorFn(async () => {\n return (await base.iterator()).mapAsync(transform6);\n }, this.size);\n }\n prefetch(bufferSize) {\n if (bufferSize == null) {\n throw new RangeError(\"`Dataset.prefetch()` requires bufferSize to be specified.\");\n }\n const base = this;\n return datasetFromIteratorFn(async () => (await base.iterator()).prefetch(bufferSize), this.size);\n }\n repeat(count2) {\n const base = this;\n let size;\n if (this.size != null && count2 > 0) {\n size = this.size * count2;\n } else if (count2 === 0) {\n size = 0;\n } else if (this.size != null && (count2 === void 0 || count2 < 0)) {\n size = Infinity;\n } else {\n size = null;\n }\n return datasetFromIteratorFn(async () => {\n const iteratorIterator = iteratorFromFunction(async () => ({ value: await base.iterator(), done: false }));\n return iteratorFromConcatenated(iteratorIterator.take(count2));\n }, size);\n }\n skip(count2) {\n const base = this;\n let size;\n if (this.size != null && count2 >= 0 && this.size >= count2) {\n size = this.size - count2;\n } else if (this.size != null && (this.size < count2 || count2 === void 0 || count2 < 0)) {\n size = 0;\n } else {\n size = null;\n }\n return datasetFromIteratorFn(async () => (await base.iterator()).skip(count2), size);\n }\n shuffle(bufferSize, seed, reshuffleEachIteration = true) {\n if (bufferSize == null || bufferSize < 0) {\n if (this.size == null) {\n throw new RangeError(\"`Dataset.shuffle()` requires bufferSize to be specified.\");\n } else {\n throw new RangeError(`\\`Dataset.shuffle()\\` requires bufferSize to be specified. If your data fits in main memory (for regular JS objects), and/or GPU memory (for \\`tf.Tensor\\`s), consider setting bufferSize to the dataset size (${this.size} elements)`);\n }\n }\n const base = this;\n const random = seedrandom3.alea(seed || util_exports.now().toString());\n return datasetFromIteratorFn(async () => {\n let seed2 = random.int32();\n if (reshuffleEachIteration) {\n seed2 += random.int32();\n }\n return (await base.iterator()).shuffle(bufferSize, seed2.toString());\n }, this.size);\n }\n take(count2) {\n const base = this;\n let size;\n if (this.size != null && this.size > count2) {\n size = count2;\n } else if (this.size != null && this.size <= count2) {\n size = this.size;\n } else {\n size = null;\n }\n return datasetFromIteratorFn(async () => (await base.iterator()).take(count2), size);\n }\n async toArray() {\n if (this.size === Infinity) {\n throw new Error(\"Can not convert infinite data stream to array.\");\n }\n return (await this.iterator()).toArray();\n }\n async toArrayForTest() {\n if (this.size === Infinity) {\n throw new Error(\"Can not convert infinite data stream to array.\");\n }\n return (await this.iterator()).toArrayForTest();\n }\n};\nDataset.MAX_BUFFER_SIZE = 1e4;\nfunction datasetFromIteratorFn(iteratorFn, size = null) {\n return new class extends Dataset {\n constructor() {\n super(...arguments);\n this.size = size;\n }\n async iterator() {\n return iteratorFn();\n }\n }();\n}\nfunction array(items) {\n return datasetFromIteratorFn(async () => iteratorFromItems(items), items.length);\n}\nfunction zip(datasets) {\n if (!isIterable2(datasets)) {\n throw new Error(\"The argument to zip() must be an object or array.\");\n }\n let size;\n if (Array.isArray(datasets)) {\n for (let i = 0; i < datasets.length; i++) {\n size = size == null ? datasets[i].size : Math.min(size, datasets[i].size);\n }\n } else if (datasets instanceof Object) {\n for (const ds in datasets) {\n size = size == null ? datasets[ds].size : Math.min(size, datasets[ds].size);\n }\n }\n return datasetFromIteratorFn(async () => {\n const streams = await deepMapAndAwaitAll(datasets, (d) => {\n if (d instanceof Dataset) {\n return { value: d.iterator(), recurse: false };\n } else if (isIterable2(d)) {\n return { value: null, recurse: true };\n } else {\n throw new Error(\"Leaves of the structure passed to zip() must be Datasets, not primitives.\");\n }\n });\n return iteratorFromZipped(streams, ZipMismatchMode.SHORTEST);\n }, size);\n}\nfunction deepBatchConcat(rows) {\n if (rows === null) {\n return null;\n }\n const exampleRow = rows[0];\n if (canTensorify(exampleRow)) {\n const value = batchConcat(rows);\n return { value, recurse: false };\n }\n return { value: null, recurse: true };\n}\nfunction batchConcat(arrays) {\n if (arrays.length === 0) {\n throw new Error(\"Can't make a batch of zero elements.\");\n }\n if (arrays[0] instanceof Tensor) {\n return stack(arrays);\n } else {\n return tensor(arrays);\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/datasets/text_line_dataset.js\nvar TextLineDataset = class extends Dataset {\n constructor(input2) {\n super();\n this.input = input2;\n }\n async iterator() {\n const inputIterator = await this.input.iterator();\n const utf8Iterator = inputIterator.decodeUTF8();\n const lineIterator = utf8Iterator.split(\"\\n\").map((line) => {\n if (line.endsWith(\"\\r\")) {\n line = line.slice(0, -1);\n }\n return line;\n });\n return lineIterator;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/datasets/csv_dataset.js\nvar CODE_QUOTE = '\"';\nvar STATE_OUT = Symbol(\"out\");\nvar STATE_FIELD = Symbol(\"field\");\nvar STATE_QUOTE = Symbol(\"quote\");\nvar STATE_QUOTE_AFTER_QUOTE = Symbol(\"quoteafterquote\");\nvar STATE_WITHIN_QUOTE_IN_QUOTE = Symbol(\"quoteinquote\");\nvar CSVDataset = class extends Dataset {\n constructor(input2, csvConfig) {\n super();\n this.input = input2;\n this.hasHeader = true;\n this.fullColumnNames = null;\n this.columnNamesValidated = false;\n this.columnConfigs = null;\n this.configuredColumnsOnly = false;\n this.delimiter = \",\";\n this.delimWhitespace = false;\n this.base = new TextLineDataset(input2);\n if (!csvConfig) {\n csvConfig = {};\n }\n this.hasHeader = csvConfig.hasHeader === false ? false : true;\n this.fullColumnNames = csvConfig.columnNames;\n this.columnConfigs = csvConfig.columnConfigs;\n this.configuredColumnsOnly = csvConfig.configuredColumnsOnly;\n if (csvConfig.delimWhitespace) {\n util_exports.assert(csvConfig.delimiter == null, () => \"Delimiter should not be provided when delimWhitespace is true.\");\n this.delimWhitespace = true;\n this.delimiter = \" \";\n } else {\n this.delimiter = csvConfig.delimiter ? csvConfig.delimiter : \",\";\n }\n }\n async columnNames() {\n if (!this.columnNamesValidated) {\n await this.setColumnNames();\n }\n return this.configuredColumnsOnly ? Object.keys(this.columnConfigs) : this.fullColumnNames;\n }\n async setColumnNames() {\n const columnNamesFromFile = await this.maybeReadHeaderLine();\n if (!this.fullColumnNames && !columnNamesFromFile) {\n throw new Error(\"Column names must be provided if there is no header line.\");\n } else if (this.fullColumnNames && columnNamesFromFile) {\n util_exports.assert(columnNamesFromFile.length === this.fullColumnNames.length, () => \"The length of provided columnNames (\" + this.fullColumnNames.length.toString() + \") does not match the length of the header line read from file (\" + columnNamesFromFile.length.toString() + \").\");\n }\n if (!this.fullColumnNames) {\n this.fullColumnNames = columnNamesFromFile;\n }\n const counts = this.fullColumnNames.reduce((countAcc, name) => {\n countAcc[name] = countAcc[name] + 1 || 1;\n return countAcc;\n }, {});\n const duplicateNames = Object.keys(counts).filter((name) => counts[name] > 1);\n util_exports.assert(duplicateNames.length === 0, () => \"Duplicate column names found: \" + duplicateNames.toString());\n if (this.columnConfigs) {\n for (const key of Object.keys(this.columnConfigs)) {\n const index = this.fullColumnNames.indexOf(key);\n if (index === -1) {\n throw new Error('The key \"' + key + '\" provided in columnConfigs does not match any of the column names (' + this.fullColumnNames.toString() + \").\");\n }\n }\n }\n this.columnNamesValidated = true;\n }\n async maybeReadHeaderLine() {\n if (this.hasHeader) {\n const iter = await this.base.iterator();\n const firstElement = await iter.next();\n if (firstElement.done) {\n throw new Error(\"No data was found for CSV parsing.\");\n }\n const firstLine = firstElement.value;\n const headers = this.parseRow(firstLine, false);\n return headers;\n } else {\n return null;\n }\n }\n async iterator() {\n if (!this.columnNamesValidated) {\n await this.setColumnNames();\n }\n let lines = await this.base.iterator();\n if (this.hasHeader) {\n lines = lines.skip(1);\n }\n return lines.map((x) => this.makeDataElement(x));\n }\n makeDataElement(line) {\n const values = this.parseRow(line);\n const features = {};\n const labels = {};\n for (let i = 0; i < this.fullColumnNames.length; i++) {\n const key = this.fullColumnNames[i];\n const config = this.columnConfigs ? this.columnConfigs[key] : null;\n if (this.configuredColumnsOnly && !config) {\n continue;\n } else {\n const value = values[i];\n let parsedValue = null;\n if (value === \"\") {\n if (config && config.default !== void 0) {\n parsedValue = config.default;\n } else if (config && (config.required || config.isLabel)) {\n throw new Error(`Required column ${key} is empty in this line: ${line}`);\n } else {\n parsedValue = void 0;\n }\n } else {\n const valueAsNum = Number(value);\n if (isNaN(valueAsNum)) {\n if (config && config.dtype === \"bool\") {\n parsedValue = this.getBoolean(value);\n } else {\n parsedValue = value;\n }\n } else if (!config || !config.dtype) {\n parsedValue = valueAsNum;\n } else {\n switch (config.dtype) {\n case \"float32\":\n parsedValue = valueAsNum;\n break;\n case \"int32\":\n parsedValue = Math.floor(valueAsNum);\n break;\n case \"bool\":\n parsedValue = this.getBoolean(value);\n break;\n default:\n parsedValue = valueAsNum;\n }\n }\n }\n config && config.isLabel ? labels[key] = parsedValue : features[key] = parsedValue;\n }\n }\n if (Object.keys(labels).length === 0) {\n return features;\n } else {\n return { xs: features, ys: labels };\n }\n }\n getBoolean(value) {\n if (value === \"1\" || value.toLowerCase() === \"true\") {\n return 1;\n } else {\n return 0;\n }\n }\n parseRow(line, validateElementCount = true) {\n const result = [];\n let readOffset = 0;\n const readLength = line.length;\n let currentState = STATE_OUT;\n for (let i = 0; i < readLength; i++) {\n switch (currentState) {\n case STATE_OUT:\n switch (line.charAt(i)) {\n case CODE_QUOTE:\n readOffset = i + 1;\n currentState = STATE_QUOTE;\n break;\n case this.delimiter:\n readOffset = i + 1;\n if (this.delimiter === \" \" && this.delimWhitespace) {\n break;\n }\n result.push(\"\");\n currentState = STATE_OUT;\n break;\n default:\n currentState = STATE_FIELD;\n readOffset = i;\n break;\n }\n break;\n case STATE_FIELD:\n switch (line.charAt(i)) {\n case this.delimiter:\n result.push(line.substring(readOffset, i));\n currentState = STATE_OUT;\n readOffset = i + 1;\n break;\n default:\n }\n break;\n case STATE_QUOTE:\n switch (line.charAt(i)) {\n case CODE_QUOTE:\n currentState = STATE_QUOTE_AFTER_QUOTE;\n break;\n default:\n }\n break;\n case STATE_QUOTE_AFTER_QUOTE:\n switch (line.charAt(i)) {\n case this.delimiter:\n result.push(line.substring(readOffset, i - 1));\n currentState = STATE_OUT;\n readOffset = i + 1;\n break;\n case CODE_QUOTE:\n currentState = STATE_QUOTE;\n break;\n default:\n currentState = STATE_WITHIN_QUOTE_IN_QUOTE;\n break;\n }\n break;\n case STATE_WITHIN_QUOTE_IN_QUOTE:\n switch (line.charAt(i)) {\n case CODE_QUOTE:\n currentState = STATE_QUOTE;\n break;\n default:\n }\n break;\n default:\n }\n }\n if (currentState === STATE_QUOTE_AFTER_QUOTE) {\n result.push(line.substring(readOffset, readLength - 1));\n } else {\n result.push(line.substring(readOffset));\n }\n if (validateElementCount && result.length !== this.fullColumnNames.length) {\n throw new Error(`Invalid row in csv file. Should have ${this.fullColumnNames.length} elements in a row, but got ${result}`);\n }\n return result;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/iterators/microphone_iterator.js\nvar MicrophoneIterator = class extends LazyIterator {\n constructor(microphoneConfig) {\n super();\n this.microphoneConfig = microphoneConfig;\n this.isClosed = false;\n this.fftSize = microphoneConfig.fftSize || 1024;\n const fftSizeLog2 = Math.log2(this.fftSize);\n if (this.fftSize < 0 || fftSizeLog2 < 4 || fftSizeLog2 > 14 || !Number.isInteger(fftSizeLog2)) {\n throw new Error(`Invalid fftSize: it must be a power of 2 between 2 to 4 and 2 to 14, but got ${this.fftSize}`);\n }\n this.numFrames = microphoneConfig.numFramesPerSpectrogram || 43;\n this.sampleRateHz = microphoneConfig.sampleRateHz;\n this.columnTruncateLength = microphoneConfig.columnTruncateLength || this.fftSize;\n this.audioTrackConstraints = microphoneConfig.audioTrackConstraints;\n this.smoothingTimeConstant = microphoneConfig.smoothingTimeConstant || 0;\n this.includeSpectrogram = microphoneConfig.includeSpectrogram === false ? false : true;\n this.includeWaveform = microphoneConfig.includeWaveform === true ? true : false;\n if (!this.includeSpectrogram && !this.includeWaveform) {\n throw new Error(\"Both includeSpectrogram and includeWaveform are false. At least one type of data should be returned.\");\n }\n }\n summary() {\n return `microphone`;\n }\n static async create(microphoneConfig = {}) {\n if (!env().get(\"IS_BROWSER\")) {\n throw new Error(\"microphone API is only supported in browser environment.\");\n }\n const microphoneIterator = new MicrophoneIterator(microphoneConfig);\n await microphoneIterator.start();\n return microphoneIterator;\n }\n async start() {\n try {\n this.stream = await navigator.mediaDevices.getUserMedia({\n audio: this.audioTrackConstraints == null ? true : this.audioTrackConstraints,\n video: false\n });\n } catch (e) {\n throw new Error(`Error thrown while initializing video stream: ${e.message}`);\n }\n if (!this.stream) {\n throw new Error(\"Could not obtain audio from microphone.\");\n }\n const ctxConstructor = window.AudioContext || window.webkitAudioContext;\n this.audioContext = new ctxConstructor();\n if (!this.sampleRateHz) {\n this.sampleRateHz = this.audioContext.sampleRate;\n } else if (this.audioContext.sampleRate !== this.sampleRateHz) {\n throw new Error(`Mismatch in sampling rate: Expected: ${this.sampleRateHz}; Actual: ${this.audioContext.sampleRate}`);\n }\n const streamSource = this.audioContext.createMediaStreamSource(this.stream);\n this.analyser = this.audioContext.createAnalyser();\n this.analyser.fftSize = this.fftSize * 2;\n this.analyser.smoothingTimeConstant = this.smoothingTimeConstant;\n streamSource.connect(this.analyser);\n this.freqData = new Float32Array(this.fftSize);\n this.timeData = new Float32Array(this.fftSize);\n return;\n }\n async next() {\n if (this.isClosed) {\n return { value: null, done: true };\n }\n let spectrogramTensor;\n let waveformTensor;\n const audioDataQueue = await this.getAudioData();\n if (this.includeSpectrogram) {\n const freqData = this.flattenQueue(audioDataQueue.freqDataQueue);\n spectrogramTensor = this.getTensorFromAudioDataArray(freqData, [this.numFrames, this.columnTruncateLength, 1]);\n }\n if (this.includeWaveform) {\n const timeData = this.flattenQueue(audioDataQueue.timeDataQueue);\n waveformTensor = this.getTensorFromAudioDataArray(timeData, [this.numFrames * this.fftSize, 1]);\n }\n return {\n value: { \"spectrogram\": spectrogramTensor, \"waveform\": waveformTensor },\n done: false\n };\n }\n async capture() {\n return (await this.next()).value;\n }\n async getAudioData() {\n const freqDataQueue = [];\n const timeDataQueue = [];\n let currentFrames = 0;\n return new Promise((resolve) => {\n const intervalID = setInterval(() => {\n if (this.includeSpectrogram) {\n this.analyser.getFloatFrequencyData(this.freqData);\n if (this.freqData[0] === -Infinity) {\n resolve({ freqDataQueue, timeDataQueue });\n }\n freqDataQueue.push(this.freqData.slice(0, this.columnTruncateLength));\n }\n if (this.includeWaveform) {\n this.analyser.getFloatTimeDomainData(this.timeData);\n timeDataQueue.push(this.timeData.slice());\n }\n if (++currentFrames === this.numFrames) {\n clearInterval(intervalID);\n resolve({ freqDataQueue, timeDataQueue });\n }\n }, this.fftSize / this.sampleRateHz * 1e3);\n });\n }\n stop() {\n if (!this.isClosed) {\n this.isClosed = true;\n this.analyser.disconnect();\n this.audioContext.close();\n if (this.stream != null && this.stream.getTracks().length > 0) {\n this.stream.getTracks()[0].stop();\n }\n }\n }\n toArray() {\n throw new Error(\"Can not convert infinite audio stream to array.\");\n }\n getSampleRate() {\n return this.sampleRateHz;\n }\n flattenQueue(queue) {\n const frameSize = queue[0].length;\n const freqData = new Float32Array(queue.length * frameSize);\n queue.forEach((data, i) => freqData.set(data, i * frameSize));\n return freqData;\n }\n getTensorFromAudioDataArray(freqData, shape) {\n const vals = new Float32Array(util_exports.sizeFromShape(shape));\n vals.set(freqData, vals.length - freqData.length);\n return tensor(vals, shape);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/iterators/webcam_iterator.js\nvar WebcamIterator = class extends LazyIterator {\n constructor(webcamVideoElement, webcamConfig) {\n super();\n this.webcamVideoElement = webcamVideoElement;\n this.webcamConfig = webcamConfig;\n this.isClosed = true;\n this.resize = false;\n if (this.needToResize()) {\n this.resize = true;\n this.cropSize = [this.webcamConfig.resizeHeight, this.webcamConfig.resizeWidth];\n this.cropBoxInd = tensor1d([0], \"int32\");\n if (this.webcamConfig.centerCrop) {\n const widthCroppingRatio = this.webcamConfig.resizeWidth * 1 / this.webcamVideoElement.width;\n const heightCroppingRatio = this.webcamConfig.resizeHeight * 1 / this.webcamVideoElement.height;\n const widthCropStart = (1 - widthCroppingRatio) / 2;\n const heightCropStart = (1 - heightCroppingRatio) / 2;\n const widthCropEnd = widthCropStart + widthCroppingRatio;\n const heightCropEnd = heightCroppingRatio + heightCropStart;\n this.cropBox = tensor2d([heightCropStart, widthCropStart, heightCropEnd, widthCropEnd], [1, 4]);\n } else {\n this.cropBox = tensor2d([0, 0, 1, 1], [1, 4]);\n }\n }\n }\n summary() {\n return `webcam`;\n }\n static async create(webcamVideoElement, webcamConfig = {}) {\n if (!env().get(\"IS_BROWSER\")) {\n throw new Error(\"tf.data.webcam is only supported in browser environment.\");\n }\n if (!webcamVideoElement) {\n webcamVideoElement = document.createElement(\"video\");\n if (!webcamConfig.resizeWidth || !webcamConfig.resizeHeight) {\n throw new Error(\"Please provide webcam video element, or resizeWidth and resizeHeight to create a hidden video element.\");\n }\n webcamVideoElement.width = webcamConfig.resizeWidth;\n webcamVideoElement.height = webcamConfig.resizeHeight;\n }\n const webcamIterator = new WebcamIterator(webcamVideoElement, webcamConfig);\n await webcamIterator.start();\n return webcamIterator;\n }\n async start() {\n if (this.webcamConfig.facingMode) {\n util_exports.assert(this.webcamConfig.facingMode === \"user\" || this.webcamConfig.facingMode === \"environment\", () => `Invalid webcam facing mode: ${this.webcamConfig.facingMode}. Please provide 'user' or 'environment'`);\n }\n try {\n this.stream = await navigator.mediaDevices.getUserMedia({\n video: {\n deviceId: this.webcamConfig.deviceId,\n facingMode: this.webcamConfig.facingMode ? this.webcamConfig.facingMode : \"user\",\n width: this.webcamVideoElement.width,\n height: this.webcamVideoElement.height\n }\n });\n } catch (e) {\n e.message = `Error thrown while initializing video stream: ${e.message}`;\n throw e;\n }\n if (!this.stream) {\n throw new Error(\"Could not obtain video from webcam.\");\n }\n try {\n this.webcamVideoElement.srcObject = this.stream;\n } catch (error) {\n console.log(error);\n this.webcamVideoElement.src = window.URL.createObjectURL(this.stream);\n }\n this.webcamVideoElement.play();\n this.isClosed = false;\n return new Promise((resolve) => {\n this.webcamVideoElement.onloadedmetadata = () => {\n resolve();\n };\n });\n }\n async next() {\n if (this.isClosed) {\n return { value: null, done: true };\n }\n let img;\n try {\n img = browser_exports.fromPixels(this.webcamVideoElement);\n } catch (e) {\n throw new Error(`Error thrown converting video to pixels: ${JSON.stringify(e)}`);\n }\n if (this.resize) {\n try {\n return { value: this.cropAndResizeFrame(img), done: false };\n } catch (e) {\n throw new Error(`Error thrown cropping the video: ${e.message}`);\n } finally {\n img.dispose();\n }\n } else {\n return { value: img, done: false };\n }\n }\n needToResize() {\n if (this.webcamConfig.resizeWidth && this.webcamConfig.resizeHeight && (this.webcamVideoElement.width !== this.webcamConfig.resizeWidth || this.webcamVideoElement.height !== this.webcamConfig.resizeHeight)) {\n return true;\n }\n return false;\n }\n cropAndResizeFrame(img) {\n return tidy(() => {\n const expandedImage = expandDims(cast(img, \"float32\"), 0);\n let resizedImage;\n resizedImage = image.cropAndResize(expandedImage, this.cropBox, this.cropBoxInd, this.cropSize, \"bilinear\");\n const shape = resizedImage.shape;\n return reshape(resizedImage, shape.slice(1));\n });\n }\n async capture() {\n return (await this.next()).value;\n }\n stop() {\n const tracks = this.stream.getTracks();\n tracks.forEach((track) => track.stop());\n try {\n this.webcamVideoElement.srcObject = null;\n } catch (error) {\n console.log(error);\n this.webcamVideoElement.src = null;\n }\n this.isClosed = true;\n }\n toArray() {\n throw new Error(\"Can not convert infinite video stream to array.\");\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/datasource.js\nvar DataSource = class {\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/iterators/string_iterator.js\nvar StringIterator = class extends LazyIterator {\n split(separator) {\n return new SplitIterator(this, separator);\n }\n};\nvar SplitIterator = class extends StringIterator {\n constructor(upstream, separator) {\n super();\n this.upstream = upstream;\n this.impl = new SplitIteratorImpl(upstream, separator);\n }\n summary() {\n return this.impl.summary();\n }\n async next() {\n return this.impl.next();\n }\n};\nvar SplitIteratorImpl = class extends OneToManyIterator {\n constructor(upstream, separator) {\n super();\n this.upstream = upstream;\n this.separator = separator;\n this.carryover = \"\";\n }\n summary() {\n return `${this.upstream.summary()} -> Split('${this.separator}')`;\n }\n async pump() {\n const chunkResult = await this.upstream.next();\n if (chunkResult.done) {\n if (this.carryover === \"\") {\n return false;\n }\n this.outputQueue.push(this.carryover);\n this.carryover = \"\";\n return true;\n }\n const lines = chunkResult.value.split(this.separator);\n lines[0] = this.carryover + lines[0];\n for (const line of lines.slice(0, -1)) {\n this.outputQueue.push(line);\n }\n this.carryover = lines[lines.length - 1];\n return true;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/iterators/byte_chunk_iterator.js\nvar ByteChunkIterator = class extends LazyIterator {\n decodeUTF8() {\n return new Utf8Iterator(this);\n }\n};\nvar Utf8Iterator = class extends StringIterator {\n constructor(upstream) {\n super();\n this.upstream = upstream;\n this.impl = new Utf8IteratorImpl(upstream);\n }\n summary() {\n return this.impl.summary();\n }\n async next() {\n return this.impl.next();\n }\n};\nvar Utf8IteratorImpl = class extends OneToManyIterator {\n constructor(upstream) {\n super();\n this.upstream = upstream;\n if (env().get(\"IS_BROWSER\")) {\n this.decoder = new TextDecoder(\"utf-8\");\n } else {\n const { StringDecoder } = require_string_decoder();\n this.decoder = new StringDecoder(\"utf8\");\n }\n }\n summary() {\n return `${this.upstream.summary()} -> Utf8`;\n }\n async pump() {\n const chunkResult = await this.upstream.next();\n let chunk;\n if (chunkResult.done) {\n return false;\n } else {\n chunk = chunkResult.value;\n }\n let text;\n if (env().get(\"IS_BROWSER\")) {\n text = this.decoder.decode(chunk, { stream: true });\n } else {\n text = this.decoder.write(Buffer.from(chunk.buffer));\n }\n this.outputQueue.push(text);\n return true;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/iterators/file_chunk_iterator.js\nvar FileChunkIterator = class extends ByteChunkIterator {\n constructor(file, options = {}) {\n super();\n this.file = file;\n this.options = options;\n util_exports.assert(file instanceof Uint8Array || (env().get(\"IS_BROWSER\") ? file instanceof File || file instanceof Blob : false), () => \"FileChunkIterator only supports File, Blob and Uint8Array right now.\");\n this.offset = options.offset || 0;\n this.chunkSize = options.chunkSize || 1024 * 1024;\n }\n summary() {\n return `FileChunks ${this.file}`;\n }\n async next() {\n if (this.offset >= (this.file instanceof Uint8Array ? this.file.byteLength : this.file.size)) {\n return { value: null, done: true };\n }\n const chunk = new Promise((resolve, reject) => {\n const end = this.offset + this.chunkSize;\n if (this.file instanceof Uint8Array) {\n resolve(new Uint8Array(this.file.slice(this.offset, end)));\n } else {\n const fileReader = new FileReader();\n fileReader.onload = (event) => {\n let data = fileReader.result;\n if (data instanceof ArrayBuffer) {\n data = new Uint8Array(data);\n }\n if (!(data instanceof Uint8Array)) {\n return reject(new TypeError(\"FileReader returned unknown type.\"));\n }\n resolve(data);\n };\n fileReader.onabort = (event) => {\n return reject(new Error(\"Aborted\"));\n };\n fileReader.onerror = (event) => {\n return reject(new Error(event.type));\n };\n const slice6 = this.file.slice(this.offset, end);\n fileReader.readAsArrayBuffer(slice6);\n }\n this.offset = end;\n });\n return { value: await chunk, done: false };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/iterators/url_chunk_iterator.js\nasync function urlChunkIterator(url, options = {}, fetchFunc) {\n let urlString;\n let requestInit;\n if (typeof url === \"string\") {\n urlString = url;\n } else {\n urlString = url.url;\n requestInit = getRequestInitFromRequest(url);\n }\n const response = await (fetchFunc || util_exports.fetch)(urlString, requestInit);\n if (response.ok) {\n const uint8Array = new Uint8Array(await response.arrayBuffer());\n return new FileChunkIterator(uint8Array, options);\n } else {\n throw new Error(response.statusText);\n }\n}\nvar getRequestInitFromRequest = (request) => {\n const init2 = {\n method: request.method,\n headers: request.headers,\n body: request.body,\n mode: request.mode,\n credentials: request.credentials,\n cache: request.cache,\n redirect: request.redirect,\n referrer: request.referrer,\n integrity: request.integrity\n };\n return init2;\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/util/source_util.js\nfunction isLocalPath(source) {\n return typeof source === \"string\" && source.slice(0, 7) === \"file://\";\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/sources/file_data_source.js\nvar FileDataSource = class extends DataSource {\n constructor(input2, options = {}) {\n super();\n this.input = input2;\n this.options = options;\n }\n async iterator() {\n if (isLocalPath(this.input) && env().get(\"IS_NODE\")) {\n const fs = require_fs();\n this.input = fs.readFileSync(this.input.slice(7));\n }\n return new FileChunkIterator(this.input, this.options);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/sources/url_data_source.js\nvar URLDataSource = class extends DataSource {\n constructor(url, fileOptions = {}) {\n super();\n this.url = url;\n this.fileOptions = fileOptions;\n }\n async iterator() {\n if (isLocalPath(this.url)) {\n return new FileDataSource(this.url, this.fileOptions).iterator();\n } else {\n return urlChunkIterator(this.url, this.fileOptions);\n }\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/readers.js\nfunction csv(source, csvConfig = {}) {\n return new CSVDataset(new URLDataSource(source), csvConfig);\n}\nfunction func(f) {\n const iter = iteratorFromFunction(f);\n return datasetFromIteratorFn(async () => iter);\n}\nfunction generator(generator2) {\n return datasetFromIteratorFn(async () => {\n const gen = await generator2();\n return iteratorFromFunction(() => gen.next());\n });\n}\nasync function webcam(webcamVideoElement, webcamConfig) {\n return WebcamIterator.create(webcamVideoElement, webcamConfig);\n}\nasync function microphone(microphoneConfig) {\n return MicrophoneIterator.create(microphoneConfig);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/version.js\nvar version4 = \"3.20.0\";\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/cpu_util.js\nfunction assertNotComplex(tensor2, opName) {\n if (!Array.isArray(tensor2)) {\n tensor2 = [tensor2];\n }\n tensor2.forEach((t) => {\n if (t != null) {\n util_exports.assert(t.dtype !== \"complex64\", () => `${opName} does not support complex64 tensors in the CPU backend.`);\n }\n });\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/backend_cpu.js\nvar whereImpl2 = kernel_impls_exports.whereImpl;\nvar MathBackendCPU = class extends KernelBackend {\n constructor() {\n super();\n this.blockSize = 48;\n this.firstUse = true;\n this.data = new DataStorage(this, engine());\n }\n nextDataId() {\n return MathBackendCPU.nextDataId++;\n }\n write(values, shape, dtype) {\n if (this.firstUse) {\n this.firstUse = false;\n if (env().get(\"IS_NODE\")) {\n backend_util_exports.warn(\"\\n============================\\nHi, looks like you are running TensorFlow.js in Node.js. To speed things up dramatically, install our node backend, visit https://github.com/tensorflow/tfjs-node for more details. \\n============================\");\n }\n }\n const dataId = { id: this.nextDataId() };\n this.data.set(dataId, { values, dtype, refCount: 1 });\n return dataId;\n }\n makeTensorInfo(shape, dtype, values) {\n let outId;\n if (dtype === \"string\" && values != null && values.length > 0 && util_exports.isString(values[0])) {\n const encodedValues = values.map((d) => util_exports.encodeString(d));\n outId = this.write(encodedValues, shape, dtype);\n } else {\n outId = this.write(values, shape, dtype);\n }\n return { dataId: outId, shape, dtype };\n }\n refCount(dataId) {\n if (this.data.has(dataId)) {\n const tensorData = this.data.get(dataId);\n return tensorData.refCount;\n }\n return 0;\n }\n incRef(dataId) {\n const tensorData = this.data.get(dataId);\n tensorData.refCount++;\n }\n decRef(dataId) {\n if (this.data.has(dataId)) {\n const tensorData = this.data.get(dataId);\n tensorData.refCount--;\n }\n }\n move(dataId, values, shape, dtype, refCount) {\n this.data.set(dataId, { values, dtype, refCount });\n }\n numDataIds() {\n return this.data.numDataIds();\n }\n async read(dataId) {\n return this.readSync(dataId);\n }\n readSync(dataId) {\n const { dtype, complexTensorInfos } = this.data.get(dataId);\n if (dtype === \"complex64\") {\n const realValues = this.readSync(complexTensorInfos.real.dataId);\n const imagValues = this.readSync(complexTensorInfos.imag.dataId);\n return backend_util_exports.mergeRealAndImagArrays(realValues, imagValues);\n }\n return this.data.get(dataId).values;\n }\n bufferSync(t) {\n const data = this.readSync(t.dataId);\n if (t.dtype === \"string\") {\n try {\n const strings = data.map((d) => util_exports.decodeString(d));\n return buffer(t.shape, t.dtype, strings);\n } catch (_a) {\n throw new Error(\"Failed to decode encoded string bytes into utf-8\");\n }\n }\n return buffer(t.shape, t.dtype, data);\n }\n makeOutput(values, shape, dtype) {\n return engine().makeTensorFromTensorInfo(this.makeTensorInfo(shape, dtype, values), this);\n }\n disposeData(dataId, force = false) {\n if (this.data.has(dataId)) {\n this.data.get(dataId).refCount--;\n if (!force && this.data.get(dataId).refCount > 0) {\n return false;\n }\n const { complexTensorInfos } = this.data.get(dataId);\n if (complexTensorInfos != null) {\n this.disposeData(complexTensorInfos.real.dataId, true);\n this.disposeData(complexTensorInfos.imag.dataId, true);\n }\n this.data.delete(dataId);\n }\n return true;\n }\n disposeIntermediateTensorInfo(tensorInfo) {\n this.disposeData(tensorInfo.dataId);\n }\n async time(f) {\n const start = util_exports.now();\n f();\n const kernelMs = util_exports.now() - start;\n return { kernelMs };\n }\n memory() {\n return {\n unreliable: true,\n reasons: [\"The reported memory is an upper bound. Due to automatic garbage collection, the true allocated memory may be less.\"]\n };\n }\n where(condition) {\n assertNotComplex([condition], \"where\");\n const condVals = this.readSync(condition.dataId);\n return whereImpl2(condition.shape, condVals);\n }\n dispose() {\n }\n floatPrecision() {\n return 32;\n }\n epsilon() {\n return super.epsilon();\n }\n};\nMathBackendCPU.nextDataId = 0;\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/shared.js\nvar shared_exports = {};\n__export(shared_exports, {\n addImpl: () => addImpl,\n bincountImpl: () => bincountImpl,\n bincountReduceImpl: () => bincountReduceImpl,\n castImpl: () => castImpl,\n ceilImpl: () => ceilImpl,\n concatImpl: () => concatImpl,\n equalImpl: () => equalImpl,\n expImpl: () => expImpl,\n expm1Impl: () => expm1Impl,\n floorImpl: () => floorImpl,\n gatherNdImpl: () => gatherNdImpl,\n gatherV2Impl: () => gatherV2Impl,\n greaterEqualImpl: () => greaterEqualImpl,\n greaterImpl: () => greaterImpl,\n lessEqualImpl: () => lessEqualImpl,\n lessImpl: () => lessImpl,\n linSpaceImpl: () => linSpaceImpl,\n logImpl: () => logImpl,\n maxImpl: () => maxImpl,\n maximumImpl: () => maximumImpl,\n minimumImpl: () => minimumImpl,\n multiplyImpl: () => multiplyImpl,\n negImpl: () => negImpl,\n notEqualImpl: () => notEqualImpl,\n prodImpl: () => prodImpl,\n raggedTensorToTensorImpl: () => raggedTensorToTensorImpl,\n rangeImpl: () => rangeImpl,\n rsqrtImpl: () => rsqrtImpl,\n scatterImpl: () => scatterImpl,\n sigmoidImpl: () => sigmoidImpl,\n simpleAbsImpl: () => simpleAbsImpl,\n sliceImpl: () => sliceImpl,\n sparseFillEmptyRowsImpl: () => sparseFillEmptyRowsImpl,\n sparseReshapeImpl: () => sparseReshapeImpl,\n sparseSegmentReductionImpl: () => sparseSegmentReductionImpl,\n sqrtImpl: () => sqrtImpl,\n squaredDifferenceImpl: () => squaredDifferenceImpl,\n stridedSliceImpl: () => stridedSliceImpl,\n stringNGramsImpl: () => stringNGramsImpl,\n stringSplitImpl: () => stringSplitImpl,\n stringToHashBucketFastImpl: () => stringToHashBucketFastImpl,\n subImpl: () => subImpl,\n tileImpl: () => tileImpl,\n topKImpl: () => topKImpl,\n transposeImpl: () => transposeImpl,\n uniqueImpl: () => uniqueImpl\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Abs.js\nfunction simpleAbsImpl(vals) {\n const resultValues = new Float32Array(vals.length);\n for (let i = 0; i < vals.length; ++i) {\n resultValues[i] = Math.abs(vals[i]);\n }\n return resultValues;\n}\nvar abs2 = (args) => {\n const { x } = args.inputs;\n const cpuBackend = args.backend;\n assertNotComplex(x, \"abs\");\n let resultValues = new Float32Array(util_exports.sizeFromShape(x.shape));\n const values = cpuBackend.data.get(x.dataId).values;\n resultValues = simpleAbsImpl(values);\n return cpuBackend.makeOutput(resultValues, x.shape, x.dtype);\n};\nvar absConfig = {\n kernelName: Abs,\n backendName: \"cpu\",\n kernelFunc: abs2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/utils/binary_impl.js\nfunction createSimpleBinaryKernelImpl(op2) {\n return (aShape, bShape, aVals, bVals, dtype) => {\n const newShape = backend_util_exports.assertAndGetBroadcastShape(aShape, bShape);\n const resultRank = newShape.length;\n const resultStrides = util_exports.computeStrides(newShape);\n const resultSize = util_exports.sizeFromShape(newShape);\n const result = util_exports.getTypedArrayFromDType(dtype, resultSize);\n const aRank = aShape.length;\n const bRank = bShape.length;\n const aStrides = util_exports.computeStrides(aShape);\n const bStrides = util_exports.computeStrides(bShape);\n const aBroadcastDims = backend_util_exports.getBroadcastDims(aShape, newShape);\n const bBroadcastDims = backend_util_exports.getBroadcastDims(bShape, newShape);\n if (aBroadcastDims.length + bBroadcastDims.length === 0) {\n for (let i = 0; i < result.length; ++i) {\n result[i] = op2(aVals[i % aVals.length], bVals[i % bVals.length]);\n }\n } else {\n for (let i = 0; i < result.length; ++i) {\n const loc = util_exports.indexToLoc(i, resultRank, resultStrides);\n const aLoc = loc.slice(-aRank);\n aBroadcastDims.forEach((d) => aLoc[d] = 0);\n const aIndex = util_exports.locToIndex(aLoc, aRank, aStrides);\n const bLoc = loc.slice(-bRank);\n bBroadcastDims.forEach((d) => bLoc[d] = 0);\n const bIndex = util_exports.locToIndex(bLoc, bRank, bStrides);\n result[i] = op2(aVals[aIndex], bVals[bIndex]);\n }\n }\n return [result, newShape];\n };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Complex.js\nfunction complex2(args) {\n const { inputs, backend: backend2 } = args;\n const { real: real5, imag: imag5 } = inputs;\n const realVals = backend2.data.get(real5.dataId).values;\n const imagVals = backend2.data.get(imag5.dataId).values;\n const complexInfo = backend2.makeTensorInfo(real5.shape, \"complex64\");\n const complex5 = backend2.data.get(complexInfo.dataId);\n complex5.complexTensorInfos = {\n real: backend2.makeTensorInfo(real5.shape, \"float32\", realVals),\n imag: backend2.makeTensorInfo(imag5.shape, \"float32\", imagVals)\n };\n return complexInfo;\n}\nvar complexConfig = {\n kernelName: Complex,\n backendName: \"cpu\",\n kernelFunc: complex2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/utils/zeros_impl.js\nfunction zeros3(backend2, shape, dtype = \"float32\") {\n if (dtype === \"complex64\") {\n const real5 = zeros3(backend2, shape, \"float32\");\n const imag5 = zeros3(backend2, shape, \"float32\");\n return complex2({ inputs: { real: real5, imag: imag5 }, backend: backend2 });\n }\n const values = util_exports.makeZerosTypedArray(util_exports.sizeFromShape(shape), dtype);\n return backend2.makeTensorInfo(shape, dtype, values);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Identity.js\nfunction identity2(args) {\n const { inputs, backend: backend2 } = args;\n const { x } = inputs;\n backend2.incRef(x.dataId);\n return { dataId: x.dataId, shape: x.shape, dtype: x.dtype };\n}\nvar identityConfig = {\n kernelName: Identity,\n backendName: \"cpu\",\n kernelFunc: identity2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Real.js\nfunction real2(args) {\n const { inputs, backend: backend2 } = args;\n const { input: input2 } = inputs;\n const real5 = backend2.data.get(input2.dataId).complexTensorInfos.real;\n const realVal = backend2.data.get(real5.dataId).values;\n return backend2.makeTensorInfo(real5.shape, real5.dtype, realVal);\n}\nvar realConfig = {\n kernelName: Real,\n backendName: \"cpu\",\n kernelFunc: real2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Cast.js\nfunction castImpl(values, shape, inputType, dtype) {\n if (dtype === \"int32\") {\n const resultValues = Int32Array.from(values);\n return [shape, \"int32\", resultValues];\n }\n if (dtype === \"bool\") {\n const zero = util_exports.toTypedArray([0], inputType);\n const [resultData, resultShape] = createSimpleBinaryKernelImpl((a, b) => a !== b ? 1 : 0)(shape, [], values, zero, \"bool\");\n return [resultShape, \"bool\", resultData];\n }\n throw new Error(`Error in Cast: failed to cast ${inputType} to ${dtype}`);\n}\nfunction cast3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { dtype } = attrs;\n if (dtype === \"complex64\") {\n if (x.dtype === \"complex64\") {\n return identity2({ inputs: { x }, backend: backend2 });\n }\n const zerosTensorInfo = zeros3(backend2, x.shape, x.dtype);\n const floatX = cast3({ inputs: { x }, backend: backend2, attrs: { dtype: \"float32\" } });\n const result = complex2({ inputs: { real: floatX, imag: zerosTensorInfo }, backend: backend2 });\n backend2.disposeIntermediateTensorInfo(zerosTensorInfo);\n backend2.disposeIntermediateTensorInfo(floatX);\n return result;\n }\n if (x.dtype === \"complex64\") {\n const realPart = real2({ inputs: { input: x }, backend: backend2 });\n const result = cast3({ inputs: { x: realPart }, backend: backend2, attrs: { dtype } });\n backend2.disposeIntermediateTensorInfo(realPart);\n return result;\n }\n if (!util_exports.hasEncodingLoss(x.dtype, dtype)) {\n const result = identity2({ inputs: { x }, backend: backend2 });\n return { dataId: result.dataId, shape: result.shape, dtype };\n }\n const values = backend2.data.get(x.dataId).values;\n const [resultShape, resultType, resultData] = castImpl(values, x.shape, x.dtype, dtype);\n return backend2.makeTensorInfo(resultShape, resultType, resultData);\n}\nvar castConfig = {\n kernelName: Cast,\n backendName: \"cpu\",\n kernelFunc: cast3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/utils/binary_utils.js\nfunction binaryKernelFunc(name, simpleImpl, complexImpl, dtype) {\n if (complexImpl == null) {\n return ({ inputs, backend: backend2 }) => {\n const { a, b } = inputs;\n const cpuBackend = backend2;\n assertNotComplex([a, b], name);\n const aVals = cpuBackend.data.get(a.dataId).values;\n const bVals = cpuBackend.data.get(b.dataId).values;\n const decodedAVals = a.dtype === \"string\" ? backend_util_exports.fromUint8ToStringArray(aVals) : aVals;\n const decodedBVals = a.dtype === \"string\" ? backend_util_exports.fromUint8ToStringArray(bVals) : bVals;\n const $dtype = dtype || a.dtype;\n const [resultData, resultShape] = simpleImpl(a.shape, b.shape, decodedAVals, decodedBVals, $dtype);\n return cpuBackend.makeTensorInfo(resultShape, $dtype, resultData);\n };\n }\n return ({ inputs, backend: backend2 }) => {\n const { a, b } = inputs;\n const cpuBackend = backend2;\n if (a.dtype === \"complex64\" || b.dtype === \"complex64\") {\n const $aComplex = cast3({ inputs: { x: a }, backend: cpuBackend, attrs: { dtype: \"complex64\" } });\n const $aComplexVals = cpuBackend.data.get($aComplex.dataId);\n const aReal = $aComplexVals.complexTensorInfos.real;\n const aImag = $aComplexVals.complexTensorInfos.imag;\n const aRealVals = cpuBackend.data.get(aReal.dataId).values;\n const aImagVals = cpuBackend.data.get(aImag.dataId).values;\n const $bComplex = cast3({ inputs: { x: b }, backend: cpuBackend, attrs: { dtype: \"complex64\" } });\n const $bComplexVals = cpuBackend.data.get($bComplex.dataId);\n const bReal = $bComplexVals.complexTensorInfos.real;\n const bImag = $bComplexVals.complexTensorInfos.imag;\n const bRealVals = cpuBackend.data.get(bReal.dataId).values;\n const bImagVals = cpuBackend.data.get(bImag.dataId).values;\n const [resultRealData, resultImagData, resultShape] = complexImpl(a.shape, b.shape, aRealVals, aImagVals, bRealVals, bImagVals);\n const resultReal = cpuBackend.makeTensorInfo(resultShape, \"float32\", resultRealData);\n const resultImag = cpuBackend.makeTensorInfo(resultShape, \"float32\", resultImagData);\n const result = complex2({ inputs: { real: resultReal, imag: resultImag }, backend: cpuBackend });\n cpuBackend.disposeIntermediateTensorInfo($aComplex);\n cpuBackend.disposeIntermediateTensorInfo($bComplex);\n cpuBackend.disposeIntermediateTensorInfo(resultReal);\n cpuBackend.disposeIntermediateTensorInfo(resultImag);\n return result;\n } else {\n const aVals = cpuBackend.data.get(a.dataId).values;\n const bVals = cpuBackend.data.get(b.dataId).values;\n const $dtype = dtype || a.dtype;\n const [resultData, resultShape] = simpleImpl(a.shape, b.shape, aVals, bVals, $dtype);\n return cpuBackend.makeTensorInfo(resultShape, $dtype, resultData);\n }\n };\n}\nfunction createComplexBinaryKernelImpl(op2) {\n return (aShape, bShape, aRealVals, aImagVals, bRealVals, bImagVals) => {\n const resultShape = backend_util_exports.assertAndGetBroadcastShape(aShape, bShape);\n const resultSize = util_exports.sizeFromShape(resultShape);\n const resultRank = resultShape.length;\n const resultStrides = util_exports.computeStrides(resultShape);\n const resultRealVals = util_exports.getTypedArrayFromDType(\"float32\", resultSize);\n const resultImagVals = util_exports.getTypedArrayFromDType(\"float32\", resultSize);\n const aBroadcastDims = backend_util_exports.getBroadcastDims(aShape, resultShape);\n const bBroadcastDims = backend_util_exports.getBroadcastDims(bShape, resultShape);\n const aVals = backend_util_exports.mergeRealAndImagArrays(aRealVals, aImagVals);\n const bVals = backend_util_exports.mergeRealAndImagArrays(bRealVals, bImagVals);\n const aRank = aShape.length;\n const aStrides = util_exports.computeStrides(aShape);\n const bRank = bShape.length;\n const bStrides = util_exports.computeStrides(bShape);\n if (aBroadcastDims.length + bBroadcastDims.length === 0) {\n for (let i = 0; i < resultRealVals.length; i++) {\n const aIdx = i % aVals.length;\n const bIdx = i % bVals.length;\n const result = op2(aVals[aIdx * 2], aVals[aIdx * 2 + 1], bVals[bIdx * 2], bVals[bIdx * 2 + 1]);\n resultRealVals[i] = result.real;\n resultImagVals[i] = result.imag;\n }\n } else {\n for (let i = 0; i < resultRealVals.length; i++) {\n const loc = util_exports.indexToLoc(i, resultRank, resultStrides);\n const aLoc = loc.slice(-aRank);\n aBroadcastDims.forEach((d) => aLoc[d] = 0);\n const aIndex = util_exports.locToIndex(aLoc, aRank, aStrides);\n const bLoc = loc.slice(-bRank);\n bBroadcastDims.forEach((d) => bLoc[d] = 0);\n const bIndex = util_exports.locToIndex(bLoc, bRank, bStrides);\n const opResult = op2(aVals[aIndex * 2], aVals[aIndex * 2 + 1], bVals[bIndex * 2], bVals[bIndex * 2 + 1]);\n resultRealVals[i] = opResult.real;\n resultImagVals[i] = opResult.imag;\n }\n }\n return [resultRealVals, resultImagVals, resultShape];\n };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Add.js\nvar addImpl = createSimpleBinaryKernelImpl((a, b) => a + b);\nvar addComplexImpl = createComplexBinaryKernelImpl((aReal, aImag, bReal, bImag) => {\n return { real: aReal + bReal, imag: aImag + bImag };\n});\nvar add4 = binaryKernelFunc(Add, addImpl, addComplexImpl);\nvar addConfig = {\n kernelName: Add,\n backendName: \"cpu\",\n kernelFunc: add4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Bincount_impl.js\nfunction bincountImpl(xVals, weightsVals, weightsDtype, weightsShape, size) {\n const weightsSize = util_exports.sizeFromShape(weightsShape);\n const outVals = util_exports.makeZerosTypedArray(size, weightsDtype);\n for (let i = 0; i < xVals.length; i++) {\n const value = xVals[i];\n if (value < 0) {\n throw new Error(\"Input x must be non-negative!\");\n }\n if (value >= size) {\n continue;\n }\n if (weightsSize > 0) {\n outVals[value] += weightsVals[i];\n } else {\n outVals[value] += 1;\n }\n }\n return outVals;\n}\nfunction bincountReduceImpl(xBuf, weightsBuf, size, binaryOutput = false) {\n const numRows = xBuf.shape[0];\n const numCols = xBuf.shape[1];\n const outBuf = buffer([numRows, size], weightsBuf.dtype);\n for (let i = 0; i < numRows; i++) {\n for (let j = 0; j < numCols; j++) {\n const value = xBuf.get(i, j);\n if (value < 0) {\n throw new Error(\"Input x must be non-negative!\");\n }\n if (value >= size) {\n continue;\n }\n if (binaryOutput) {\n outBuf.set(1, i, value);\n } else {\n if (weightsBuf.size > 0) {\n outBuf.set(outBuf.get(i, value) + weightsBuf.get(i, j), i, value);\n } else {\n outBuf.set(outBuf.get(i, value) + 1, i, value);\n }\n }\n }\n }\n return outBuf;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/utils/unary_impl.js\nfunction createSimpleUnaryImpl(op2) {\n return (values, dtype, attrs) => {\n const newValues = util_exports.getTypedArrayFromDType(dtype, values.length);\n for (let i = 0; i < values.length; ++i) {\n newValues[i] = op2(values[i], attrs);\n }\n return newValues;\n };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/utils/unary_utils.js\nfunction unaryKernelFunc(name, op2, dtype) {\n return ({ inputs, attrs, backend: backend2 }) => {\n const { x } = inputs;\n assertNotComplex(x, name);\n if (x.dtype === \"string\" || dtype === \"string\") {\n throw new Error(\"unaryKernelFunc does not support string input/output\");\n }\n const cpuBackend = backend2;\n const values = cpuBackend.data.get(x.dataId).values;\n const xSize = util_exports.sizeFromShape(x.shape);\n const $dtype = dtype || x.dtype;\n const newValues = util_exports.getArrayFromDType($dtype, xSize);\n for (let i = 0; i < xSize; ++i) {\n newValues[i] = op2(values[i], attrs);\n }\n return cpuBackend.makeTensorInfo(x.shape, $dtype, newValues);\n };\n}\nfunction unaryKernelFuncFromImpl(name, unaryImpl, dtype) {\n return ({ inputs, attrs, backend: backend2 }) => {\n const { x } = inputs;\n assertNotComplex(x, name);\n if (x.dtype === \"string\" || dtype === \"string\") {\n throw new Error(\"unaryKernelFunc does not support string input/output\");\n }\n const cpuBackend = backend2;\n const values = cpuBackend.data.get(x.dataId).values;\n const $dtype = dtype || x.dtype;\n const newValues = unaryImpl(values, $dtype, attrs);\n return cpuBackend.makeTensorInfo(x.shape, $dtype, newValues);\n };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Ceil.js\nvar ceilImpl = createSimpleUnaryImpl((xi) => Math.ceil(xi));\nvar ceil2 = unaryKernelFuncFromImpl(Ceil, ceilImpl);\nvar ceilConfig = {\n kernelName: Ceil,\n backendName: \"cpu\",\n kernelFunc: ceil2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Concat_impl.js\nfunction concatImpl(inputs, outShape, dtype, simplyConcat) {\n const outVals = util_exports.getArrayFromDType(dtype, util_exports.sizeFromShape(outShape));\n if (simplyConcat && dtype !== \"string\") {\n let offset = 0;\n inputs.forEach((input2) => {\n const size = util_exports.sizeFromShape(input2.shape);\n outVals.set(input2.vals, offset);\n offset += size;\n });\n } else {\n let colOffset = 0;\n inputs.forEach((input2) => {\n const decodedData = dtype === \"string\" ? backend_util_exports.fromUint8ToStringArray(input2.vals) : input2.vals;\n let tIdx = 0;\n for (let row = 0; row < input2.shape[0]; ++row) {\n const resIdx = row * outShape[1] + colOffset;\n for (let col = 0; col < input2.shape[1]; ++col) {\n outVals[resIdx + col] = decodedData[tIdx++];\n }\n }\n colOffset += input2.shape[1];\n });\n }\n return outVals;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Equal.js\nvar equalImpl = createSimpleBinaryKernelImpl((a, b) => a === b ? 1 : 0);\nvar equal2 = binaryKernelFunc(Equal, equalImpl, null, \"bool\");\nvar equalConfig = {\n kernelName: Equal,\n backendName: \"cpu\",\n kernelFunc: equal2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Exp.js\nvar expImpl = createSimpleUnaryImpl((xi) => Math.exp(xi));\nvar exp2 = unaryKernelFuncFromImpl(Exp, expImpl, \"float32\");\nvar expConfig = {\n kernelName: Exp,\n backendName: \"cpu\",\n kernelFunc: exp2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Expm1.js\nvar expm1Impl = createSimpleUnaryImpl((xi) => Math.expm1(xi));\nvar expm12 = unaryKernelFuncFromImpl(Expm1, expm1Impl);\nvar expm1Config = {\n kernelName: Expm1,\n backendName: \"cpu\",\n kernelFunc: expm12\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Floor.js\nvar floorImpl = createSimpleUnaryImpl((xi) => Math.floor(xi));\nvar floor2 = unaryKernelFuncFromImpl(Floor, floorImpl);\nvar floorConfig = {\n kernelName: Floor,\n backendName: \"cpu\",\n kernelFunc: floor2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/GatherNd_Impl.js\nfunction gatherNdImpl(indicesData, paramsBuf, dtype, numSlices, sliceRank, sliceSize, strides, paramsShape, paramsSize) {\n const outBuf = buffer([numSlices, sliceSize], dtype);\n for (let i = 0; i < numSlices; i++) {\n const index = [];\n let flattenIndex = 0;\n for (let j = 0; j < sliceRank; j++) {\n const dim = indicesData[i * sliceRank + j];\n flattenIndex += dim * strides[j];\n index.push(dim);\n }\n if (flattenIndex < 0 || flattenIndex >= paramsSize / sliceSize) {\n throw new Error(`Invalid indices: ${index} does not index into ${paramsShape}`);\n }\n for (let k = 0; k < sliceSize; k++) {\n outBuf.values[i * sliceSize + k] = paramsBuf.get(...paramsBuf.indexToLoc(flattenIndex * sliceSize + k));\n }\n }\n return outBuf;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/GatherV2_impl.js\nfunction gatherV2Impl(xBuf, indicesBuf, flattenOutputShape) {\n const outBuf = buffer(flattenOutputShape, xBuf.dtype);\n for (let i = 0; i < outBuf.size; ++i) {\n const newLoc = outBuf.indexToLoc(i);\n const originalLoc = newLoc.slice();\n const batchIdx = originalLoc[0];\n const indicesIdx = originalLoc[2];\n const indicesIndex = indicesBuf.locToIndex([batchIdx, indicesIdx]);\n originalLoc[2] = indicesBuf.values[indicesIndex];\n const originalIndex = xBuf.locToIndex(originalLoc);\n if (0 <= originalIndex && originalIndex < xBuf.values.length) {\n outBuf.values[i] = xBuf.values[originalIndex];\n }\n }\n return outBuf;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Greater.js\nvar greaterImpl = createSimpleBinaryKernelImpl((a, b) => a > b ? 1 : 0);\nvar greater3 = binaryKernelFunc(Greater, greaterImpl, null, \"bool\");\nvar greaterConfig = {\n kernelName: Greater,\n backendName: \"cpu\",\n kernelFunc: greater3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/GreaterEqual.js\nvar greaterEqualImpl = createSimpleBinaryKernelImpl((a, b) => a >= b ? 1 : 0);\nvar greaterEqual2 = binaryKernelFunc(GreaterEqual, greaterEqualImpl, null, \"bool\");\nvar greaterEqualConfig = {\n kernelName: GreaterEqual,\n backendName: \"cpu\",\n kernelFunc: greaterEqual2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Less.js\nvar lessImpl = createSimpleBinaryKernelImpl((a, b) => a < b ? 1 : 0);\nvar less3 = binaryKernelFunc(Less, lessImpl, null, \"bool\");\nvar lessConfig = {\n kernelName: Less,\n backendName: \"cpu\",\n kernelFunc: less3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/LessEqual.js\nvar lessEqualImpl = createSimpleBinaryKernelImpl((a, b) => a <= b ? 1 : 0);\nvar lessEqual2 = binaryKernelFunc(LessEqual, lessEqualImpl, null, \"bool\");\nvar lessEqualConfig = {\n kernelName: LessEqual,\n backendName: \"cpu\",\n kernelFunc: lessEqual2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/LinSpace_impl.js\nfunction linSpaceImpl(start, stop, num) {\n const step5 = (stop - start) / (num - 1);\n const values = util_exports.makeZerosTypedArray(num, \"float32\");\n values[0] = start;\n for (let i = 1; i < values.length; i++) {\n values[i] = values[i - 1] + step5;\n }\n return values;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Log.js\nvar logImpl = createSimpleUnaryImpl((xi) => Math.log(xi));\nvar log3 = unaryKernelFuncFromImpl(Log, logImpl);\nvar logConfig = {\n kernelName: Log,\n backendName: \"cpu\",\n kernelFunc: log3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Max_impl.js\nfunction maxImpl(aVals, reduceSize, outShape, dtype) {\n const vals = util_exports.getTypedArrayFromDType(dtype, util_exports.sizeFromShape(outShape));\n for (let i = 0; i < vals.length; ++i) {\n const offset = i * reduceSize;\n let max7 = aVals[offset];\n for (let j = 0; j < reduceSize; ++j) {\n const value = aVals[offset + j];\n if (Number.isNaN(value) || value > max7) {\n max7 = value;\n }\n }\n vals[i] = max7;\n }\n return vals;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Maximum.js\nvar maximumImpl = createSimpleBinaryKernelImpl((aValue, bValue) => Math.max(aValue, bValue));\nvar maximum3 = binaryKernelFunc(Maximum, maximumImpl);\nvar maximumConfig = {\n kernelName: Maximum,\n backendName: \"cpu\",\n kernelFunc: maximum3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Minimum.js\nvar minimumImpl = createSimpleBinaryKernelImpl((aValue, bValue) => Math.min(aValue, bValue));\nvar minimum3 = binaryKernelFunc(Minimum, minimumImpl);\nvar minimumConfig = {\n kernelName: Minimum,\n backendName: \"cpu\",\n kernelFunc: minimum3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Multiply.js\nvar multiplyImpl = createSimpleBinaryKernelImpl((aValue, bValue) => aValue * bValue);\nvar multiplyComplexImpl = createComplexBinaryKernelImpl((aReal, aImag, bReal, bImag) => {\n return {\n real: aReal * bReal - aImag * bImag,\n imag: aReal * bImag + aImag * bReal\n };\n});\nvar multiply2 = binaryKernelFunc(Multiply, multiplyImpl, multiplyComplexImpl);\nvar multiplyConfig = {\n kernelName: Multiply,\n backendName: \"cpu\",\n kernelFunc: multiply2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Neg.js\nfunction negImpl(xVals, xShape, xDtype) {\n const minusOne = util_exports.createScalarValue(-1, xDtype);\n return multiplyImpl([], xShape, minusOne, xVals, xDtype);\n}\nfunction neg2(args) {\n const { inputs, backend: backend2 } = args;\n const { x } = inputs;\n assertNotComplex(x, \"neg\");\n const xVals = backend2.data.get(x.dataId).values;\n const [res, newShape] = negImpl(xVals, x.shape, x.dtype);\n return backend2.makeTensorInfo(newShape, x.dtype, res);\n}\nvar negConfig = {\n kernelName: Neg,\n backendName: \"cpu\",\n kernelFunc: neg2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/NotEqual.js\nvar notEqualImpl = createSimpleBinaryKernelImpl((a, b) => a !== b ? 1 : 0);\nvar notEqual2 = binaryKernelFunc(NotEqual, notEqualImpl, null, \"bool\");\nvar notEqualConfig = {\n kernelName: NotEqual,\n backendName: \"cpu\",\n kernelFunc: notEqual2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Transpose_impl.js\nfunction transposeImpl(xVals, xShape, dtype, perm, newShape) {\n const xRank = xShape.length;\n const xSize = util_exports.sizeFromShape(xShape);\n const xStrides = util_exports.computeStrides(xShape);\n const newStrides = util_exports.computeStrides(newShape);\n const result = util_exports.getTypedArrayFromDType(dtype, util_exports.sizeFromShape(newShape));\n for (let i = 0; i < xSize; ++i) {\n const loc = util_exports.indexToLoc(i, xRank, xStrides);\n const newLoc = new Array(loc.length);\n for (let i2 = 0; i2 < newLoc.length; i2++) {\n newLoc[i2] = loc[perm[i2]];\n }\n const newIndex = util_exports.locToIndex(newLoc, xRank, newStrides);\n result[newIndex] = xVals[i];\n }\n return result;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Transpose.js\nfunction transpose2(args) {\n const { inputs, attrs, backend: backend2 } = args;\n const { x } = inputs;\n const { perm } = attrs;\n assertNotComplex(x, \"transpose\");\n const xRank = x.shape.length;\n const newShape = new Array(xRank);\n for (let i = 0; i < newShape.length; i++) {\n newShape[i] = x.shape[perm[i]];\n }\n const values = backend2.data.get(x.dataId).values;\n const result = transposeImpl(values, x.shape, x.dtype, perm, newShape);\n const dataId = backend2.write(result, newShape, x.dtype);\n return { dataId, shape: newShape, dtype: x.dtype };\n}\nvar transposeConfig = {\n kernelName: Transpose,\n backendName: \"cpu\",\n kernelFunc: transpose2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Prod.js\nfunction prodImpl(xShape, xDtype, xVals, reductionAxes) {\n const [outShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes(xShape, reductionAxes);\n const outDtype = upcastType(xDtype, \"int32\");\n const outVals = util_exports.makeZerosTypedArray(util_exports.sizeFromShape(outShape), outDtype);\n const reduceSize = util_exports.sizeFromShape(reduceShape);\n for (let i = 0; i < outVals.length; ++i) {\n const offset = i * reduceSize;\n let prod6 = 1;\n for (let j = 0; j < reduceSize; ++j) {\n prod6 *= xVals[offset + j];\n }\n outVals[i] = prod6;\n }\n return { outVals, outShape, outDtype };\n}\nfunction prod2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis, keepDims } = attrs;\n assertNotComplex(x, \"prod\");\n const xRank = x.shape.length;\n const axes = util_exports.parseAxisParam(axis, x.shape);\n const permutation = backend_util_exports.getAxesPermutation(axes, xRank);\n let reductionAxes = axes;\n let permutedX = x;\n const intermediateTensorInfos = [];\n if (permutation != null) {\n permutedX = transpose2({ inputs: { x }, backend: backend2, attrs: { perm: permutation } });\n intermediateTensorInfos.push(permutedX);\n reductionAxes = backend_util_exports.getInnerMostAxes(reductionAxes.length, xRank);\n }\n const xVals = backend2.data.get(permutedX.dataId).values;\n const { outVals, outShape, outDtype } = prodImpl(permutedX.shape, permutedX.dtype, xVals, reductionAxes);\n let resultShape = outShape;\n if (keepDims) {\n resultShape = backend_util_exports.expandShapeToKeepDim(outShape, axes);\n }\n intermediateTensorInfos.forEach((t) => backend2.disposeIntermediateTensorInfo(t));\n return backend2.makeTensorInfo(resultShape, outDtype, outVals);\n}\nvar prodConfig = {\n kernelName: Prod,\n backendName: \"cpu\",\n kernelFunc: prod2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/RaggedTensorToTensor_impl.js\nvar RowPartitionType2 = backend_util_exports.RowPartitionType;\nvar RaggedTensorToTensorOp = class {\n constructor(shape, shapeShape, values, valuesShape, valuesDType, defaultValue, defaultValueShape, rowPartitionValues, rowPartitionValuesShapes, rowPartitionTypeStrings) {\n this.shape = shape;\n this.shapeShape = shapeShape;\n this.values = values;\n this.valuesShape = valuesShape;\n this.valuesDType = valuesDType;\n this.defaultValue = defaultValue;\n this.defaultValueShape = defaultValueShape;\n this.rowPartitionValues = rowPartitionValues;\n this.rowPartitionValuesShapes = rowPartitionValuesShapes;\n this.rowPartitionTypes = backend_util_exports.getRowPartitionTypesHelper(rowPartitionTypeStrings);\n this.raggedRank = backend_util_exports.getRaggedRank(this.rowPartitionTypes);\n }\n getRowPartitionTypeByDimension(dimension) {\n if (this.rowPartitionTypes[0] === RowPartitionType2.FIRST_DIM_SIZE) {\n return this.rowPartitionTypes[dimension + 1];\n } else {\n return this.rowPartitionTypes[dimension];\n }\n }\n getRowPartitionTensor(dimension) {\n if (this.rowPartitionTypes[0] === RowPartitionType2.FIRST_DIM_SIZE) {\n return this.rowPartitionValues[dimension + 1];\n } else {\n return this.rowPartitionValues[dimension];\n }\n }\n getMaxWidth(dimension) {\n const rowPartitionTensor = this.getRowPartitionTensor(dimension - 1);\n switch (this.getRowPartitionTypeByDimension(dimension - 1)) {\n case RowPartitionType2.VALUE_ROWIDS:\n return RaggedTensorToTensorOp.getMaxWidthValueRowID(rowPartitionTensor);\n case RowPartitionType2.ROW_SPLITS:\n return RaggedTensorToTensorOp.getMaxWidthRowSplit(rowPartitionTensor);\n default:\n throw new Error(`Cannot handle partition type ${RowPartitionType2[this.getRowPartitionTypeByDimension(dimension - 1)]}`);\n }\n }\n static getMaxWidthRowSplit(rowSplit) {\n const tensorLength = rowSplit.length;\n if (tensorLength === 0 || tensorLength === 1) {\n return 0;\n }\n let maxWidth = 0;\n for (let i = 0; i < tensorLength - 1; ++i) {\n const currentWidth = rowSplit[i + 1] - rowSplit[i];\n if (currentWidth > maxWidth) {\n maxWidth = currentWidth;\n }\n }\n return maxWidth;\n }\n static getMaxWidthValueRowID(valueRowIds) {\n const indexLength = valueRowIds.length;\n if (indexLength === 0) {\n return 0;\n }\n let firstEqualIndex = 0;\n let firstEqualIndexValue = valueRowIds[0];\n let maxWidth = 0;\n for (let i = 1; i < indexLength; ++i) {\n const value = valueRowIds[i];\n if (value !== firstEqualIndexValue) {\n firstEqualIndexValue = value;\n maxWidth = Math.max(i - firstEqualIndex, maxWidth);\n firstEqualIndex = i;\n }\n }\n return Math.max(indexLength - firstEqualIndex, maxWidth);\n }\n tensorShapeFromTensor(t, tShape, isPartial = true) {\n if (tShape.length === 0) {\n if (t[0] === -1) {\n return [];\n }\n throw new Error(`The only valid scalar shape tensor is the fully unknown shape specified as -1.`);\n }\n return makeShape(t, isPartial);\n }\n calculateOutputSize(firstDim) {\n const valueShape = this.valuesShape;\n const defaultValueShape = this.defaultValueShape;\n backend_util_exports.validateDefaultValueShape(defaultValueShape, valueShape);\n const shape = this.tensorShapeFromTensor(this.shape, this.shapeShape);\n const outputShape = backend_util_exports.combineRaggedTensorToTensorShapes(this.raggedRank, shape, valueShape);\n const result = outputShape;\n if (result[0] < 0) {\n result[0] = firstDim;\n }\n for (let i = 1; i <= this.raggedRank; ++i) {\n if (result[i] < 0) {\n result[i] = this.getMaxWidth(i);\n }\n }\n return result;\n }\n calculateFirstParentOutputIndex(firstDimension, outputIndexMultiplier, firstDimensionOutput) {\n const minDimension = Math.min(firstDimension, firstDimensionOutput);\n const result = [];\n let currentOutputIndex = 0;\n for (let i = 0; i < minDimension; ++i, currentOutputIndex += outputIndexMultiplier) {\n result.push(currentOutputIndex);\n }\n for (let i = minDimension; i < firstDimension; ++i) {\n result.push(-1);\n }\n util_exports.assert(result.length === firstDimension, () => \"Final length of result must be equal to firstDimension.\");\n return result;\n }\n calculateOutputIndexRowSplit(rowSplit, parentOutputIndex, outputIndexMultiplier, outputSize) {\n const rowSplitSize = rowSplit.length;\n const result = [];\n for (let i = 0; i < rowSplitSize - 1; ++i) {\n const rowLength = rowSplit[i + 1] - rowSplit[i];\n let realLength = Math.min(outputSize, rowLength);\n let parentOutputIndexCurrent = parentOutputIndex[i];\n if (parentOutputIndexCurrent === -1) {\n realLength = 0;\n }\n for (let j = 0; j < realLength; ++j) {\n result.push(parentOutputIndexCurrent);\n parentOutputIndexCurrent += outputIndexMultiplier;\n }\n for (let j = 0; j < rowLength - realLength; ++j) {\n result.push(-1);\n }\n }\n if (rowSplitSize > 0 && result.length !== rowSplit[rowSplitSize - 1]) {\n throw new Error(\"Invalid row split size.\");\n }\n return result;\n }\n calculateOutputIndexValueRowID(valueRowIds, parentOutputIndex, outputIndexMultiplier, outputSize) {\n const indexSize = valueRowIds.length;\n const result = [];\n if (indexSize === 0) {\n return [];\n }\n let currentOutputColumn = 0;\n let currentValueRowId = valueRowIds[0];\n if (currentValueRowId >= parentOutputIndex.length) {\n throw new Error(`Got currentValueRowId=${currentValueRowId}, which is not less than ${parentOutputIndex.length}`);\n }\n let currentOutputIndex = parentOutputIndex[currentValueRowId];\n result.push(currentOutputIndex);\n for (let i = 1; i < indexSize; ++i) {\n const nextValueRowId = valueRowIds[i];\n if (nextValueRowId === currentValueRowId) {\n if (currentOutputIndex >= 0) {\n ++currentOutputColumn;\n if (currentOutputColumn < outputSize) {\n currentOutputIndex += outputIndexMultiplier;\n } else {\n currentOutputIndex = -1;\n }\n }\n } else {\n currentOutputColumn = 0;\n currentValueRowId = nextValueRowId;\n if (nextValueRowId >= parentOutputIndex.length) {\n throw new Error(`Got nextValueRowId=${nextValueRowId} which is not less than ${parentOutputIndex.length}`);\n }\n currentOutputIndex = parentOutputIndex[nextValueRowId];\n }\n result.push(currentOutputIndex);\n }\n if (result.length !== valueRowIds.length) {\n throw new Error(\"Invalid row ids.\");\n }\n return result;\n }\n calculateOutputIndex(dimension, parentOutputIndex, outputIndexMultiplier, outputSize) {\n const rowPartitionTensor = this.getRowPartitionTensor(dimension);\n const partitionType = this.getRowPartitionTypeByDimension(dimension);\n switch (partitionType) {\n case RowPartitionType2.VALUE_ROWIDS:\n return this.calculateOutputIndexValueRowID(rowPartitionTensor, parentOutputIndex, outputIndexMultiplier, outputSize);\n case RowPartitionType2.ROW_SPLITS:\n if (rowPartitionTensor.length - 1 > parentOutputIndex.length) {\n throw new Error(`Row partition size is greater than output size: ${rowPartitionTensor.length - 1} > ${parentOutputIndex.length}`);\n }\n return this.calculateOutputIndexRowSplit(rowPartitionTensor, parentOutputIndex, outputIndexMultiplier, outputSize);\n default:\n throw new Error(`Unsupported partition type: ${RowPartitionType2[partitionType]}`);\n }\n }\n getFirstDimensionSize() {\n const firstPartitionTensor = this.rowPartitionValues[0];\n if (this.rowPartitionTypes.length === 0) {\n throw new Error(\"No row_partition_types given.\");\n }\n const firstPartitionType = this.rowPartitionTypes[0];\n switch (firstPartitionType) {\n case RowPartitionType2.FIRST_DIM_SIZE:\n return firstPartitionTensor[0];\n case RowPartitionType2.VALUE_ROWIDS:\n throw new Error(\"Cannot handle VALUE_ROWIDS in first dimension.\");\n case RowPartitionType2.ROW_SPLITS:\n return this.rowPartitionValuesShapes[0][0] - 1;\n default:\n throw new Error(`Cannot handle type ${RowPartitionType2[firstPartitionType]}`);\n }\n }\n compute() {\n const firstPartitionTensor = this.rowPartitionValues[0];\n if (firstPartitionTensor.length <= 0) {\n throw new Error(\"Invalid first partition input. Tensor requires at least one element.\");\n }\n const firstDimension = this.getFirstDimensionSize();\n const outputSize = this.calculateOutputSize(firstDimension);\n const multiplier = new Array(this.raggedRank + 1);\n multiplier[multiplier.length - 1] = 1;\n for (let i = multiplier.length - 2; i >= 0; --i) {\n multiplier[i] = multiplier[i + 1] * outputSize[i + 1];\n }\n const outputShape = makeShape(outputSize, false);\n const outputTensor = util_exports.getArrayFromDType(this.valuesDType, util_exports.sizeFromShape(outputShape));\n const fullSize = multiplier[0] * outputSize[0];\n if (fullSize > 0) {\n let outputIndex = this.calculateFirstParentOutputIndex(firstDimension, multiplier[0], outputSize[0]);\n for (let i = 1; i <= this.raggedRank; ++i) {\n const newOutputIndex = this.calculateOutputIndex(i - 1, outputIndex, multiplier[i], outputSize[i]);\n outputIndex = newOutputIndex;\n }\n this.setOutput(this.raggedRank, outputIndex, outputTensor, outputShape);\n }\n return [outputShape, outputTensor];\n }\n setOutput(raggedRank, outputIndex, outputTensor, outputShape) {\n if (outputTensor.length === 0) {\n return;\n }\n const valuesBase = this.values;\n const outputBase = outputTensor;\n let elementShape = outputShape.slice();\n elementShape = elementShape.slice(raggedRank + 1);\n const valueElementSize = util_exports.sizeFromShape(elementShape);\n const outputIndexSize = outputIndex.length;\n let defaultValue = this.defaultValue;\n if (defaultValue.length !== valueElementSize && defaultValue.length !== 1) {\n const srcShape = this.defaultValueShape;\n tidy(() => {\n const defaultValueTensor = reshape(defaultValue, srcShape);\n const bCastDefault = broadcastTo(defaultValueTensor, elementShape);\n defaultValue = bCastDefault.dataSync();\n });\n }\n let srcStart = 0;\n let dstStart = 0;\n let dstEnd = 0;\n for (let srcI = 0; srcI <= outputIndexSize; ++srcI) {\n let dstI = srcI < outputIndexSize ? outputIndex[srcI] : -1;\n if (dstI === dstEnd) {\n ++dstEnd;\n continue;\n }\n if (dstStart < dstEnd) {\n const src = valuesBase.subarray(srcStart * valueElementSize);\n const dst = outputBase.subarray(dstStart * valueElementSize);\n const nVals = (dstEnd - dstStart) * valueElementSize;\n copyArray(dst, src, nVals);\n }\n if (srcI >= outputIndexSize) {\n const outputSize = outputTensor.length;\n dstI = Math.floor(outputSize / valueElementSize);\n }\n if (dstI > dstEnd) {\n if (this.defaultValue.length === 1) {\n outputBase.subarray(dstEnd * valueElementSize, dstI * valueElementSize).fill(this.defaultValue[0]);\n dstEnd = dstI;\n } else {\n while (dstI > dstEnd) {\n const dst = outputBase.slice(dstEnd * valueElementSize);\n copyArray(dst, defaultValue, valueElementSize);\n ++dstEnd;\n }\n }\n }\n if (dstI < 0) {\n srcStart = srcI + 1;\n dstStart = dstEnd;\n } else {\n srcStart = srcI;\n dstStart = dstEnd;\n dstEnd = dstStart + 1;\n }\n }\n }\n};\nfunction copyArray(dst, src, size) {\n for (let i = 0; i < size; i++) {\n dst[i] = src[i];\n }\n}\nfunction makeShape(shape, isPartial) {\n const out = [];\n for (let dim of shape) {\n if (dim < 0) {\n if (!isPartial) {\n throw new Error(`Dimension ${dim} must be >= 0`);\n }\n if (dim < -1) {\n throw new Error(`Dimension ${dim} must be >= -1`);\n }\n dim = -1;\n }\n out.push(dim);\n }\n return out;\n}\nfunction raggedTensorToTensorImpl(shape, shapesShape, values, valuesShape, valuesDType, defaultValue, defaultValueShape, rowPartitionValues, rowPartitionValuesShapes, rowPartitionTypes) {\n return new RaggedTensorToTensorOp(shape, shapesShape, values, valuesShape, valuesDType, defaultValue, defaultValueShape, rowPartitionValues, rowPartitionValuesShapes, rowPartitionTypes).compute();\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Range_impl.js\nfunction rangeImpl(start, stop, step5, dtype) {\n const sameStartStop = start === stop;\n const increasingRangeNegativeStep = start < stop && step5 < 0;\n const decreasingRangePositiveStep = stop < start && step5 > 1;\n if (sameStartStop || increasingRangeNegativeStep || decreasingRangePositiveStep) {\n return util_exports.makeZerosTypedArray(0, dtype);\n }\n const numElements = Math.abs(Math.ceil((stop - start) / step5));\n const values = util_exports.makeZerosTypedArray(numElements, dtype);\n if (stop < start && step5 === 1) {\n step5 = -1;\n }\n values[0] = start;\n for (let i = 1; i < values.length; i++) {\n values[i] = values[i - 1] + step5;\n }\n return values;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Rsqrt.js\nvar rsqrtImpl = createSimpleUnaryImpl((xi) => 1 / Math.sqrt(xi));\nvar rsqrt2 = unaryKernelFuncFromImpl(Rsqrt, rsqrtImpl);\nvar rsqrtConfig = {\n kernelName: Rsqrt,\n backendName: \"cpu\",\n kernelFunc: rsqrt2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Scatter_impl.js\nfunction scatterImpl(indices, updates, shape, outputSize, sliceSize, numUpdates, sliceRank, strides, defaultValue, sumDupeIndices) {\n const flattenShape = [outputSize / sliceSize, sliceSize];\n const indicesData = indices.values;\n const updatesData = updates.values;\n if (outputSize === 0) {\n return buffer(shape, updates.dtype);\n }\n const outBuf = buffer(flattenShape, updates.dtype);\n if (typeof defaultValue === \"string\") {\n outBuf.values.fill(defaultValue);\n } else if (typeof defaultValue === \"number\") {\n outBuf.values.fill(defaultValue);\n } else if (typeof defaultValue === \"boolean\") {\n outBuf.values.fill(+defaultValue);\n }\n for (let i = 0; i < numUpdates; i++) {\n const index = [];\n let flattenIndex = 0;\n for (let j = 0; j < sliceRank; j++) {\n const dim = indicesData[i * sliceRank + j];\n index.push(dim);\n flattenIndex += dim * strides[j];\n }\n if (flattenIndex < 0 || flattenIndex >= outputSize / sliceSize) {\n throw new Error(`Invalid indices: ${index} does not index into ${shape}`);\n }\n for (let k = 0; k < sliceSize; k++) {\n if (sumDupeIndices) {\n outBuf.values[flattenIndex * sliceSize + k] += updatesData[i * sliceSize + k];\n } else {\n outBuf.values[flattenIndex * sliceSize + k] = updates.rank === 0 ? updatesData[0] : updatesData[i * sliceSize + k];\n }\n }\n }\n return outBuf;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Sigmoid.js\nvar sigmoidImpl = createSimpleUnaryImpl((xi) => 1 / (1 + Math.exp(-xi)));\nvar sigmoid2 = unaryKernelFunc(Sigmoid, (xi) => 1 / (1 + Math.exp(-xi)));\nvar sigmoidConfig = {\n kernelName: Sigmoid,\n backendName: \"cpu\",\n kernelFunc: sigmoid2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Slice.js\nfunction sliceImpl(vals, begin, size, shape, dtype) {\n const isContinous = slice_util_exports.isSliceContinous(shape, begin, size);\n const length = util_exports.sizeFromShape(size);\n const xStrides = util_exports.computeStrides(shape);\n if (isContinous) {\n const flatOffset = slice_util_exports.computeFlatOffset(begin, xStrides);\n if (dtype === \"string\") {\n return vals.slice(flatOffset, flatOffset + length);\n }\n return vals.subarray(flatOffset, flatOffset + length);\n }\n const decodedData = dtype === \"string\" ? backend_util_exports.fromUint8ToStringArray(vals) : vals;\n const inBuf = buffer(shape, dtype, decodedData);\n const outBuf = buffer(size, dtype);\n for (let i = 0; i < outBuf.size; ++i) {\n const outLoc = outBuf.indexToLoc(i);\n const inLoc = outLoc.map((idx, j) => idx + begin[j]);\n outBuf.set(inBuf.get(...inLoc), ...outLoc);\n }\n if (dtype === \"string\") {\n return backend_util_exports.fromStringArrayToUint8(outBuf.values);\n }\n return outBuf.values;\n}\nfunction slice2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { begin, size } = attrs;\n assertNotComplex(x, \"slice\");\n const [$begin, $size] = slice_util_exports.parseSliceParams(x, begin, size);\n slice_util_exports.assertParamsValid(x, $begin, $size);\n const vals = backend2.data.get(x.dataId).values;\n const outVals = sliceImpl(vals, $begin, $size, x.shape, x.dtype);\n return backend2.makeTensorInfo($size, x.dtype, outVals);\n}\nvar sliceConfig = {\n kernelName: Slice,\n backendName: \"cpu\",\n kernelFunc: slice2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SparseFillEmptyRows_impl.js\nfunction sparseFillEmptyRowsImpl(indices, indicesShape, indicesDType, values, valuesDType, denseShape, defaultValue) {\n const indicesCount = indicesShape[0];\n const denseRows = denseShape[0];\n const emptyRowIndicator = new Array(denseRows);\n const reverseIndexMap = new Array(indicesCount);\n const rank = indicesShape[1];\n if (denseRows === 0) {\n if (indicesCount !== 0) {\n throw new Error(backend_util_exports.getSparseFillEmptyRowsIndicesDenseShapeMismatch(indicesCount));\n }\n const outputIndices = util_exports.getArrayFromDType(indicesDType, 0);\n const outputValues = util_exports.getArrayFromDType(valuesDType, 0);\n return [\n outputIndices,\n [0, rank],\n outputValues,\n emptyRowIndicator,\n reverseIndexMap\n ];\n }\n let rowsAreOrdered = true;\n let lastIndicesRow = 0;\n const csrOffset = new Array(denseRows).fill(0);\n for (let i = 0; i < indicesCount; ++i) {\n const row = indices[i * rank];\n if (row < 0) {\n throw new Error(backend_util_exports.getSparseFillEmptyRowsNegativeIndexErrorMessage(i, row));\n }\n if (row >= denseRows) {\n throw new Error(backend_util_exports.getSparseFillEmptyRowsOutOfRangeIndexErrorMessage(i, row, denseRows));\n }\n ++csrOffset[row];\n rowsAreOrdered = rowsAreOrdered && row >= lastIndicesRow;\n lastIndicesRow = row;\n }\n let allRowsFull = true;\n for (let row = 0; row < denseRows; ++row) {\n const rowEmpty = csrOffset[row] === 0;\n emptyRowIndicator[row] = rowEmpty;\n allRowsFull = allRowsFull && !rowEmpty;\n csrOffset[row] = Math.max(csrOffset[row], 1);\n if (row > 0) {\n csrOffset[row] += csrOffset[row - 1];\n }\n }\n if (allRowsFull && rowsAreOrdered) {\n const outputIndices = indices;\n const outputValues = values;\n for (let i = 0; i < indicesCount; ++i) {\n reverseIndexMap[i] = i;\n }\n return [\n outputIndices,\n [indicesCount, rank],\n outputValues,\n emptyRowIndicator,\n reverseIndexMap\n ];\n } else {\n const fullIndicesCount = csrOffset[denseRows - 1];\n const outputIndices = util_exports.getArrayFromDType(indicesDType, fullIndicesCount * rank);\n const outputValues = util_exports.getArrayFromDType(valuesDType, fullIndicesCount);\n const filledCount = new Array(denseRows).fill(0);\n for (let i = 0; i < indicesCount; ++i) {\n const row = indices[i * rank];\n const offset = filledCount[row];\n const outputI = (row === 0 ? 0 : csrOffset[row - 1]) + offset;\n filledCount[row]++;\n for (let j = 0; j < rank; ++j) {\n outputIndices[outputI * rank + j] = indices[i * rank + j];\n }\n outputValues[outputI] = values[i];\n reverseIndexMap[i] = outputI;\n }\n for (let row = 0; row < denseRows; ++row) {\n const rowCount = filledCount[row];\n if (rowCount === 0) {\n const startingIndex = row === 0 ? 0 : csrOffset[row - 1];\n outputIndices[startingIndex * rank + 0] = row;\n for (let col = 1; col < rank; ++col) {\n outputIndices[startingIndex * rank + col] = 0;\n }\n outputValues[startingIndex] = defaultValue;\n }\n }\n return [\n outputIndices,\n [fullIndicesCount, rank],\n outputValues,\n emptyRowIndicator,\n reverseIndexMap\n ];\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SparseReshape_impl.js\nfunction sparseReshapeImpl(inputIndices, inputIndicesShape, inputDType, inputShape, targetShape) {\n const denseSize = util_exports.sizeFromShape(inputShape);\n const nnz = inputIndicesShape[0];\n const outputRank = targetShape.length;\n const outputShape = [];\n let product = 1;\n let unknownIndex = -1;\n for (let d = 0; d < outputRank; ++d) {\n const size = targetShape[d];\n if (size === -1) {\n if (unknownIndex !== -1) {\n throw new Error(backend_util_exports.getSparseReshapeMultipleNegativeOneOutputDimErrorMessage(unknownIndex, d));\n }\n unknownIndex = d;\n outputShape.push(1);\n } else {\n if (size < 0) {\n throw new Error(backend_util_exports.getSparseReshapeNegativeOutputDimErrorMessage(d, size));\n }\n product *= size;\n outputShape.push(size);\n }\n }\n if (unknownIndex !== -1) {\n if (product <= 0) {\n throw new Error(backend_util_exports.getSparseReshapeEmptyTensorZeroOutputDimErrorMessage());\n }\n const missing = Math.trunc(denseSize / product);\n if (product * missing !== denseSize) {\n throw new Error(backend_util_exports.getSparseReshapeInputOutputMultipleErrorMessage(inputShape, outputShape));\n }\n outputShape[unknownIndex] = missing;\n }\n const outputSize = util_exports.sizeFromShape(outputShape);\n if (outputSize !== denseSize) {\n throw new Error(backend_util_exports.getSparseReshapeInputOutputMismatchErrorMessage(inputShape, outputShape));\n }\n const inputRank = inputShape.length;\n const inputStrides = [];\n if (inputRank > 0) {\n inputStrides[inputRank - 1] = 1;\n for (let d = inputRank - 2; d >= 0; --d) {\n inputStrides[d] = inputStrides[d + 1] * inputShape[d + 1];\n }\n }\n const outputStrides = [];\n if (outputRank > 0) {\n outputStrides[outputRank - 1] = 1;\n for (let d = outputRank - 2; d >= 0; --d) {\n outputStrides[d] = outputStrides[d + 1] * outputShape[d + 1];\n }\n }\n const newIndices = util_exports.getArrayFromDType(inputDType, nnz * outputRank);\n for (let i = 0; i < nnz; ++i) {\n let id = 0;\n for (let j = 0; j < inputRank; ++j) {\n id += inputIndices[i * inputRank + j] * inputStrides[j];\n }\n for (let j = 0; j < outputRank; ++j) {\n newIndices[i * outputRank + j] = Math.trunc(id / outputStrides[j]);\n id %= outputStrides[j];\n }\n }\n return [newIndices, [nnz, outputRank], outputShape];\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SparseSegmentReduction_impl.js\nfunction sparseSegmentReductionImpl(input2, inputShape, inputDType, indices, segmentIds, isMean = false, defaultValue = 0) {\n const numIndices = indices.length;\n const inputFlat = [inputShape[0], input2.length / inputShape[0]];\n const numCol = inputFlat[1];\n const lastSegmentIdPlusOne = numIndices > 0 ? segmentIds[numIndices - 1] + 1 : 0;\n const outputRows = lastSegmentIdPlusOne;\n if (outputRows < 0) {\n throw new Error(backend_util_exports.getSparseSegmentReductionNegativeSegmentIdsErrorMessage());\n }\n const outputShape = inputShape.slice();\n outputShape[0] = outputRows;\n const outputLength = outputShape.reduce((product, value) => product * value, 1);\n const output = util_exports.getArrayFromDType(inputDType, outputLength);\n if (numIndices === 0) {\n if (outputRows > 0) {\n output.fill(defaultValue);\n }\n return [output, outputShape];\n }\n if (outputRows <= 0) {\n throw new Error(backend_util_exports.getSparseSegmentReductionNegativeSegmentIdsErrorMessage());\n }\n let start = 0, end = 1;\n let uninitializedIndex = 0;\n let outIndex = segmentIds[start];\n while (true) {\n let nextIndex = 0;\n if (end < numIndices) {\n nextIndex = segmentIds[end];\n if (outIndex === nextIndex) {\n ++end;\n continue;\n }\n if (outIndex >= nextIndex) {\n throw new Error(backend_util_exports.getSparseSegmentReductionNonIncreasingSegmentIdsErrorMessage());\n }\n }\n if (outIndex < 0 || outIndex >= outputRows) {\n throw new Error(backend_util_exports.getSparseSegmentReductionSegmentIdOutOfRangeErrorMessage(outIndex, outputRows));\n }\n if (outIndex > uninitializedIndex) {\n output.fill(defaultValue, uninitializedIndex * numCol, outIndex * numCol);\n }\n for (let i = start; i < end; ++i) {\n const index = indices[i];\n if (index < 0 || index >= inputFlat[0]) {\n throw new Error(backend_util_exports.getSparseSegmentReductionIndicesOutOfRangeErrorMessage(i, indices[i], inputFlat[0]));\n }\n for (let j = 0; j < numCol; j++) {\n output[outIndex * numCol + j] += input2[index * numCol + j];\n }\n }\n if (isMean) {\n for (let j = 0; j < numCol; j++) {\n output[outIndex * numCol + j] /= end - start;\n }\n }\n start = end;\n ++end;\n uninitializedIndex = outIndex + 1;\n outIndex = nextIndex;\n if (end > numIndices) {\n break;\n }\n }\n if (uninitializedIndex < outputRows) {\n output.fill(defaultValue, uninitializedIndex * numCol, outputRows * numCol);\n }\n return [output, outputShape];\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Sqrt.js\nvar sqrtImpl = createSimpleUnaryImpl((xi) => Math.sqrt(xi));\nvar sqrt2 = unaryKernelFunc(Sqrt, (xi) => Math.sqrt(xi));\nvar sqrtConfig = {\n kernelName: Sqrt,\n backendName: \"cpu\",\n kernelFunc: sqrt2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SquaredDifference.js\nvar squaredDifferenceImpl = createSimpleBinaryKernelImpl((a, b) => {\n const diff = a - b;\n return diff * diff;\n});\nvar squaredDifference2 = binaryKernelFunc(SquaredDifference, squaredDifferenceImpl);\nvar squaredDifferenceConfig = {\n kernelName: SquaredDifference,\n backendName: \"cpu\",\n kernelFunc: squaredDifference2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/StridedSlice_impl.js\nfunction stridedSliceImpl(outShape, xBuf, strides, begin) {\n const outBuf = buffer(outShape, xBuf.dtype);\n for (let i = 0; i < outBuf.size; i++) {\n const loc = outBuf.indexToLoc(i);\n const newLoc = new Array(loc.length);\n for (let j = 0; j < newLoc.length; j++) {\n newLoc[j] = loc[j] * strides[j] + begin[j];\n }\n outBuf.set(xBuf.get(...newLoc), ...loc);\n }\n return outBuf;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/StringNGrams_impl.js\nvar StringNGramsOp = class {\n constructor(separator, nGramWidths, leftPad, rightPad2, padWidth, preserveShortSequences) {\n this.separator = util_exports.encodeString(separator);\n this.nGramWidths = nGramWidths;\n this.leftPad = util_exports.encodeString(leftPad);\n this.rightPad = util_exports.encodeString(rightPad2);\n this.padWidth = padWidth;\n this.preserveShort = preserveShortSequences;\n }\n getPadWidth(nGramWidth) {\n return Math.min(this.padWidth < 0 ? nGramWidth - 1 : this.padWidth, nGramWidth - 1);\n }\n getNumNGrams(length, nGramWidth) {\n const padWidth = this.getPadWidth(nGramWidth);\n return Math.max(0, length + 2 * padWidth - nGramWidth + 1);\n }\n createNGrams(data, splitIndex, output, outputStartIndex, numNGrams, nGramWidth) {\n for (let nGramIndex = 0; nGramIndex < numNGrams; ++nGramIndex) {\n const padWidth = this.getPadWidth(nGramWidth);\n const leftPadding = Math.max(0, padWidth - nGramIndex);\n const rightPadding = Math.max(0, padWidth - (numNGrams - (nGramIndex + 1)));\n const numTokens = nGramWidth - (leftPadding + rightPadding);\n const dataStartIndex = splitIndex + (leftPadding > 0 ? 0 : nGramIndex - padWidth);\n let nGramSize = 0;\n nGramSize += leftPadding * this.leftPad.length;\n for (let n = 0; n < numTokens; ++n) {\n nGramSize += data[dataStartIndex + n].length;\n }\n nGramSize += rightPadding * this.rightPad.length;\n const numSeparators = leftPadding + rightPadding + numTokens - 1;\n nGramSize += numSeparators * this.separator.length;\n output[outputStartIndex + nGramIndex] = new Uint8Array(nGramSize);\n const nGram = output[outputStartIndex + nGramIndex];\n let nextNGramIndex = 0;\n const appendToNGram = (str) => str.forEach((value) => nGram[nextNGramIndex++] = value);\n for (let n = 0; n < leftPadding; ++n) {\n appendToNGram(this.leftPad);\n appendToNGram(this.separator);\n }\n for (let n = 0; n < numTokens - 1; ++n) {\n appendToNGram(data[dataStartIndex + n]);\n appendToNGram(this.separator);\n }\n if (numTokens > 0) {\n appendToNGram(data[dataStartIndex + numTokens - 1]);\n for (let n = 0; n < rightPadding; ++n) {\n appendToNGram(this.separator);\n appendToNGram(this.rightPad);\n }\n } else {\n for (let n = 0; n < rightPadding - 1; ++n) {\n appendToNGram(this.rightPad);\n appendToNGram(this.separator);\n }\n appendToNGram(this.rightPad);\n }\n }\n }\n compute(data, splits) {\n const inputDataSize = data.length;\n const splitsSize = splits.length;\n if (splitsSize > 0) {\n let prevSplit = splits[0];\n if (prevSplit !== 0) {\n throw new Error(`First split value must be 0, got ${prevSplit}`);\n }\n for (let i = 1; i < splitsSize; ++i) {\n let validSplits = splits[i] >= prevSplit;\n validSplits = validSplits && splits[i] <= inputDataSize;\n if (!validSplits) {\n throw new Error(`Invalid split value ${splits[i]}, must be in [${prevSplit}, ${inputDataSize}]`);\n }\n prevSplit = splits[i];\n }\n if (prevSplit !== inputDataSize) {\n throw new Error(`Last split value must be data size. Expected ${inputDataSize}, got ${prevSplit}`);\n }\n }\n const numBatchItems = splitsSize - 1;\n const nGramsSplits = util_exports.getArrayFromDType(\"int32\", splitsSize);\n if (inputDataSize === 0 || splitsSize === 0) {\n const empty = new Array(inputDataSize);\n for (let i = 0; i <= numBatchItems; ++i) {\n nGramsSplits[i] = 0;\n }\n return [empty, nGramsSplits];\n }\n nGramsSplits[0] = 0;\n for (let i = 1; i <= numBatchItems; ++i) {\n const length = splits[i] - splits[i - 1];\n let numNGrams = 0;\n this.nGramWidths.forEach((nGramWidth) => {\n numNGrams += this.getNumNGrams(length, nGramWidth);\n });\n if (this.preserveShort && length > 0 && numNGrams === 0) {\n numNGrams = 1;\n }\n nGramsSplits[i] = nGramsSplits[i - 1] + numNGrams;\n }\n const nGrams = new Array(nGramsSplits[numBatchItems]);\n for (let i = 0; i < numBatchItems; ++i) {\n const splitIndex = splits[i];\n let outputStartIdx = nGramsSplits[i];\n this.nGramWidths.forEach((nGramWidth) => {\n const length = splits[i + 1] - splits[i];\n const numNGrams = this.getNumNGrams(length, nGramWidth);\n this.createNGrams(data, splitIndex, nGrams, outputStartIdx, numNGrams, nGramWidth);\n outputStartIdx += numNGrams;\n });\n if (this.preserveShort && outputStartIdx === nGramsSplits[i]) {\n const dataLength = splits[i + 1] - splits[i];\n if (dataLength === 0) {\n continue;\n }\n const nGramWidth = dataLength + 2 * this.padWidth;\n const numNGrams = 1;\n this.createNGrams(data, splitIndex, nGrams, outputStartIdx, numNGrams, nGramWidth);\n }\n }\n return [nGrams, nGramsSplits];\n }\n};\nfunction stringNGramsImpl(data, dataSplits, separator, nGramWidths, leftPad, rightPad2, padWidth, preserveShortSequences) {\n return new StringNGramsOp(separator, nGramWidths, leftPad, rightPad2, padWidth, preserveShortSequences).compute(data, dataSplits);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/StringSplit_impl.js\nfunction split3(str, delimiters, skipEmpty, result) {\n if (!str.length) {\n return;\n }\n if (delimiters.length === 0) {\n for (let i = 0; i < str.length; ++i) {\n result.push(str.subarray(i, i + 1));\n }\n return;\n }\n if (delimiters.length === 1) {\n const delimiter = delimiters[0];\n let f = str.indexOf(delimiter);\n while (f !== -1) {\n const token = str.subarray(0, f);\n if (!skipEmpty || token.length !== 0) {\n result.push(token);\n }\n str = str.subarray(f + 1);\n f = str.indexOf(delimiter);\n }\n if (!skipEmpty || str.length !== 0) {\n result.push(str);\n }\n return;\n }\n let tokenStart = 0;\n for (let i = 0; i < str.length + 1; i++) {\n if (i === str.length || delimiters.indexOf(str[i]) !== -1) {\n const token = str.subarray(tokenStart, i);\n if (!skipEmpty || token.length !== 0) {\n result.push(token);\n }\n tokenStart = i + 1;\n }\n }\n}\nfunction stringSplitImpl(input2, delimiter, skipEmpty) {\n const batchSize = input2.length;\n const tokens = [];\n let outputSize = 0;\n let maxNumEntries = 0;\n const numIndices = new Array(batchSize);\n for (let i = 0; i < batchSize; ++i) {\n const prevTokensLength = tokens.length;\n split3(input2[i], delimiter, skipEmpty, tokens);\n const nEntries = tokens.length - prevTokensLength;\n numIndices[i] = nEntries;\n outputSize += nEntries;\n maxNumEntries = Math.max(maxNumEntries, nEntries);\n }\n const indices = util_exports.getArrayFromDType(\"int32\", outputSize * 2);\n const values = new Array(outputSize);\n const shape = [batchSize, maxNumEntries];\n let c = 0;\n for (let i = 0; i < batchSize; ++i) {\n for (let j = 0; j < numIndices[i]; ++j) {\n indices[c * 2] = i;\n indices[c * 2 + 1] = j;\n values[c] = tokens[c];\n ++c;\n }\n }\n return [indices, values, shape];\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/StringToHashBucketFast_impl.js\nfunction stringToHashBucketFastImpl(input2, numBuckets) {\n const output = util_exports.getArrayFromDType(\"int32\", input2.length);\n for (let i = 0; i < input2.length; ++i) {\n output[i] = util_exports.fingerPrint64(input2[i]).modulo(numBuckets).getLowBitsUnsigned();\n }\n return output;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Sub.js\nvar subImpl = createSimpleBinaryKernelImpl((aValue, bValue) => aValue - bValue);\nvar subComplexImpl = createComplexBinaryKernelImpl((aReal, aImag, bReal, bImag) => {\n return { real: aReal - bReal, imag: aImag - bImag };\n});\nvar sub2 = binaryKernelFunc(Sub, subImpl, subComplexImpl);\nvar subConfig = {\n kernelName: Sub,\n backendName: \"cpu\",\n kernelFunc: sub2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Tile_impl.js\nfunction tileImpl(xBuf, reps) {\n const newShape = new Array(xBuf.rank);\n for (let i = 0; i < newShape.length; i++) {\n newShape[i] = xBuf.shape[i] * reps[i];\n }\n const result = buffer(newShape, xBuf.dtype);\n for (let i = 0; i < result.values.length; ++i) {\n const newLoc = result.indexToLoc(i);\n const originalLoc = new Array(xBuf.rank);\n for (let j = 0; j < originalLoc.length; j++) {\n originalLoc[j] = newLoc[j] % xBuf.shape[j];\n }\n const originalIndex = xBuf.locToIndex(originalLoc);\n result.values[i] = xBuf.values[originalIndex];\n }\n return result;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/TopK_impl.js\nvar comparePair = (a, b) => {\n const valueDiff = b.value - a.value;\n return valueDiff === 0 ? a.index - b.index : valueDiff;\n};\nfunction select(array2, k, left = 0, right = array2.length - 1) {\n while (right > left) {\n if (right - left > 600) {\n const n = right - left + 1;\n const i2 = k - left + 1;\n const z = Math.log(n);\n const s = 0.5 * Math.exp(2 * z / 3);\n const sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * Math.sign(i2 - n / 2);\n const newLeft = Math.max(left, Math.floor(k - i2 * s / n + sd));\n const newRight = Math.min(right, Math.floor(k + (n - i2) * s / n + sd));\n select(array2, k, newLeft, newRight);\n }\n const t = array2[k];\n let i = left;\n let j = right;\n util_exports.swap(array2, left, k);\n if (comparePair(array2[right], t) > 0) {\n util_exports.swap(array2, left, right);\n }\n while (i < j) {\n util_exports.swap(array2, i, j);\n i++;\n j--;\n while (comparePair(array2[i], t) < 0) {\n i = i + 1;\n }\n while (comparePair(array2[j], t) > 0) {\n j = j - 1;\n }\n }\n if (comparePair(array2[left], t) === 0) {\n util_exports.swap(array2, left, j);\n } else {\n j = j + 1;\n util_exports.swap(array2, j, right);\n }\n if (j <= k) {\n left = j + 1;\n }\n if (k <= j) {\n right = j - 1;\n }\n }\n}\nfunction topKImpl(x, xShape, xDtype, k, sorted) {\n const lastDim = xShape[xShape.length - 1];\n const [batch, size] = [x.length / lastDim, lastDim];\n const allTopKVals = util_exports.getTypedArrayFromDType(xDtype, batch * k);\n const allTopKIndices = util_exports.getTypedArrayFromDType(\"int32\", batch * k);\n for (let b = 0; b < batch; b++) {\n const offset = b * size;\n const vals = x.subarray(offset, offset + size);\n let valAndInd = new Array(vals.length);\n vals.forEach((value, index) => valAndInd[index] = { value, index });\n if (k < valAndInd.length) {\n select(valAndInd, k);\n valAndInd = valAndInd.slice(0, k);\n }\n if (sorted) {\n valAndInd.sort(comparePair);\n }\n const outOffset = b * k;\n const topKVals = allTopKVals.subarray(outOffset, outOffset + k);\n const topKIndices = allTopKIndices.subarray(outOffset, outOffset + k);\n for (let i = 0; i < k; i++) {\n topKVals[i] = valAndInd[i].value;\n topKIndices[i] = valAndInd[i].index;\n }\n }\n const outputShape = xShape.slice();\n outputShape[outputShape.length - 1] = k;\n return [\n buffer(outputShape, xDtype, allTopKVals),\n buffer(outputShape, \"int32\", allTopKIndices)\n ];\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Unique_impl.js\nfunction uniqueImpl(values, axis, shape, dtype) {\n const $axis = util_exports.parseAxisParam(axis, shape)[0];\n const newShape = [1, shape[0], 1];\n for (let i = 0; i < $axis; i++) {\n newShape[0] *= shape[i];\n }\n newShape[1] = shape[$axis];\n for (let i = $axis + 1; i < shape.length; i++) {\n newShape[2] *= shape[i];\n }\n const uniqueElements = {};\n const indices = new Int32Array(shape[$axis]);\n const inputBuffer = new TensorBuffer(newShape, dtype, values);\n const uniqueIndices = [];\n const is1DTensor = newShape[0] === 1 && newShape[2] === 1;\n for (let i = 0; i < shape[$axis]; i++) {\n let element;\n if (is1DTensor) {\n element = values[i].toString();\n } else {\n const axisValues = [];\n for (let m = 0; m < newShape[0]; m++) {\n for (let n = 0; n < newShape[2]; n++) {\n axisValues.push(inputBuffer.get(m, i, n));\n }\n }\n element = axisValues.join(\",\");\n }\n if (uniqueElements[element] !== void 0) {\n indices[i] = uniqueElements[element];\n } else {\n const uniqueIndex = Object.keys(uniqueElements).length;\n uniqueElements[element] = uniqueIndex;\n indices[i] = uniqueIndex;\n uniqueIndices.push(i);\n }\n }\n const outputTmpShape = newShape.slice();\n outputTmpShape[1] = Object.keys(uniqueElements).length;\n const outputBuffer = new TensorBuffer(outputTmpShape, dtype);\n uniqueIndices.forEach((uniqueElementIndex, i) => {\n for (let m = 0; m < newShape[0]; m++) {\n for (let n = 0; n < newShape[2]; n++) {\n outputBuffer.set(inputBuffer.get(m, uniqueElementIndex, n), m, i, n);\n }\n }\n });\n const outputShape = shape.slice();\n outputShape[$axis] = outputTmpShape[1];\n return {\n outputValues: outputBuffer.values,\n outputShape,\n indices\n };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/base.js\nregisterBackend(\"cpu\", () => new MathBackendCPU(), 1);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Elu.js\nvar elu4 = unaryKernelFunc(Elu, (xi) => xi >= 0 ? xi : Math.exp(xi) - 1);\nvar eluConfig = {\n kernelName: Elu,\n backendName: \"cpu\",\n kernelFunc: elu4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/LeakyRelu.js\nfunction leakyRelu2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { alpha } = attrs;\n assertNotComplex([x], \"leakyRelu\");\n const xSize = util_exports.sizeFromShape(x.shape);\n const xVals = backend2.data.get(x.dataId).values;\n const outVals = util_exports.getTypedArrayFromDType(\"float32\", xSize);\n for (let i = 0; i < xVals.length; i++) {\n outVals[i] = xVals[i] < 0 ? alpha * xVals[i] : xVals[i];\n }\n return backend2.makeTensorInfo(x.shape, \"float32\", outVals);\n}\nvar leakyReluConfig = {\n kernelName: LeakyRelu,\n backendName: \"cpu\",\n kernelFunc: leakyRelu2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Prelu.js\nvar preluImpl = createSimpleBinaryKernelImpl((xValue, aValue) => xValue < 0 ? aValue * xValue : xValue);\nfunction prelu3(args) {\n const { inputs, backend: backend2 } = args;\n const { x, alpha } = inputs;\n assertNotComplex([x, alpha], \"prelu\");\n const aVals = backend2.data.get(x.dataId).values;\n const bVals = backend2.data.get(alpha.dataId).values;\n const [resultData, resultShape] = preluImpl(x.shape, alpha.shape, aVals, bVals, \"float32\");\n return backend2.makeTensorInfo(resultShape, \"float32\", resultData);\n}\nvar preluConfig = {\n kernelName: Prelu,\n backendName: \"cpu\",\n kernelFunc: prelu3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Relu.js\nvar relu2 = unaryKernelFunc(Relu, (xi) => Math.max(0, xi));\nvar reluConfig = {\n kernelName: Relu,\n backendName: \"cpu\",\n kernelFunc: relu2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Relu6.js\nvar relu62 = unaryKernelFunc(Relu6, (xi) => Math.min(Math.max(0, xi), 6));\nvar relu6Config = {\n kernelName: Relu6,\n backendName: \"cpu\",\n kernelFunc: relu62\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/utils/fused_utils.js\nfunction applyActivation2(backend2, x, activation2, preluActivationWeights, leakyreluAlpha) {\n if (activation2 === \"linear\") {\n return identity2({ inputs: { x }, backend: backend2 });\n } else if (activation2 === \"relu\") {\n return relu2({ inputs: { x }, backend: backend2 });\n } else if (activation2 === \"elu\") {\n return elu4({ inputs: { x }, backend: backend2 });\n } else if (activation2 === \"relu6\") {\n return relu62({ inputs: { x }, backend: backend2 });\n } else if (activation2 === \"prelu\") {\n return prelu3({ inputs: { x, alpha: preluActivationWeights }, backend: backend2 });\n } else if (activation2 === \"leakyrelu\") {\n return leakyRelu2({ inputs: { x }, backend: backend2, attrs: { alpha: leakyreluAlpha } });\n } else if (activation2 === \"sigmoid\") {\n return sigmoid2({ inputs: { x }, backend: backend2 });\n }\n throw new Error(`Activation ${activation2} has not been implemented for the CPU backend.`);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Reshape.js\nfunction reshape3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { shape } = attrs;\n const xSize = util_exports.sizeFromShape(x.shape);\n const $shape = util_exports.inferFromImplicitShape(shape, xSize);\n const $xSize = util_exports.sizeFromShape($shape);\n util_exports.assert(xSize === $xSize, () => `The new shape (${$shape}) has ${$xSize} elements and the old shape (${x.shape}) has ${xSize} elements. The new shape and old shape must have the same number of elements.`);\n backend2.incRef(x.dataId);\n const xData = backend2.data.get(x.dataId);\n if (xData.complexTensorInfos != null) {\n const real5 = xData.complexTensorInfos.real;\n const imag5 = xData.complexTensorInfos.imag;\n real5.shape = $shape;\n imag5.shape = $shape;\n }\n return { dataId: x.dataId, shape: $shape, dtype: x.dtype };\n}\nvar reshapeConfig = {\n kernelName: Reshape,\n backendName: \"cpu\",\n kernelFunc: reshape3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/BatchMatMul.js\nfunction batchMatMul(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { a, b } = inputs;\n const { transposeA, transposeB } = attrs;\n assertNotComplex([a, b], \"matMul\");\n const aRank = a.shape.length;\n const bRank = b.shape.length;\n const innerShapeA = transposeA ? a.shape[aRank - 2] : a.shape[aRank - 1];\n const innerShapeB = transposeB ? b.shape[bRank - 1] : b.shape[bRank - 2];\n const outerShapeA = transposeA ? a.shape[aRank - 1] : a.shape[aRank - 2];\n const outerShapeB = transposeB ? b.shape[bRank - 2] : b.shape[bRank - 1];\n const outerDimsA = a.shape.slice(0, -2);\n const outerDimsB = b.shape.slice(0, -2);\n const batchDimA = util_exports.sizeFromShape(outerDimsA);\n const batchDimB = util_exports.sizeFromShape(outerDimsB);\n const outShapeOuterDims = broadcast_util_exports.assertAndGetBroadcastShape(a.shape.slice(0, -2), b.shape.slice(0, -2));\n const outShape = outShapeOuterDims.concat([outerShapeA, outerShapeB]);\n util_exports.assert(innerShapeA === innerShapeB, () => `Error in matMul: inner shapes (${innerShapeA}) and (${innerShapeB}) of Tensors with shapes ${a.shape} and ${b.shape} and transposeA=${transposeA} and transposeB=${transposeB} must match.`);\n const a3dShape = transposeA ? [batchDimA, innerShapeA, outerShapeA] : [batchDimA, outerShapeA, innerShapeA];\n const b3dShape = transposeB ? [batchDimB, outerShapeB, innerShapeB] : [batchDimB, innerShapeB, outerShapeB];\n const a3d = reshape3({ inputs: { x: a }, backend: backend2, attrs: { shape: a3dShape } });\n const b3d = reshape3({ inputs: { x: b }, backend: backend2, attrs: { shape: b3dShape } });\n const sharedDim = transposeA ? a3d.shape[1] : a3d.shape[2];\n const leftDim = transposeA ? a3d.shape[2] : a3d.shape[1];\n const rightDim = transposeB ? b3d.shape[1] : b3d.shape[2];\n const batchDim = Math.max(batchDimA, batchDimB);\n const a3dValues = backend2.data.get(a3d.dataId).values;\n const b3dValues = backend2.data.get(b3d.dataId).values;\n const a3dStrides = util_exports.computeStrides(a3d.shape);\n const b3dStrides = util_exports.computeStrides(b3d.shape);\n const [aBatch, aOuterStep, aInnerStep] = transposeA ? [a3dStrides[0], 1, a3dStrides[1]] : [a3dStrides[0], a3dStrides[1], 1];\n const [bInnerStep, bOuterStep, bBatch] = transposeB ? [1, b3dStrides[1], b3dStrides[0]] : [b3dStrides[1], 1, b3dStrides[0]];\n const size = leftDim * rightDim;\n const result = buffer([batchDim, leftDim, rightDim], a3d.dtype);\n const resVals = result.values;\n const blockSize = backend2.blockSize;\n for (let bi = 0; bi < batchDim; bi++) {\n for (let i0 = 0; i0 < leftDim; i0 += blockSize) {\n for (let j0 = 0; j0 < rightDim; j0 += blockSize) {\n for (let k02 = 0; k02 < sharedDim; k02 += blockSize) {\n const iBlock = Math.min(i0 + blockSize, leftDim);\n const jBlock = Math.min(j0 + blockSize, rightDim);\n const kBlock = Math.min(k02 + blockSize, sharedDim);\n for (let i = i0; i < iBlock; i++) {\n for (let j = j0; j < jBlock; j++) {\n let sum7 = 0;\n for (let k = k02; k < kBlock; k++) {\n const batchOffsetA = Math.min(bi, batchDimA - 1) * aBatch;\n const batchOffsetB = Math.min(bi, batchDimB - 1) * bBatch;\n const aVal = a3dValues[batchOffsetA + i * aOuterStep + k * aInnerStep];\n const bVal = b3dValues[k * bInnerStep + j * bOuterStep + batchOffsetB];\n sum7 += aVal * bVal;\n }\n resVals[bi * size + (i * rightDim + j)] += sum7;\n }\n }\n }\n }\n }\n }\n backend2.disposeIntermediateTensorInfo(a3d);\n backend2.disposeIntermediateTensorInfo(b3d);\n return backend2.makeTensorInfo(outShape, result.dtype, result.values);\n}\nvar batchMatMulConfig = {\n kernelName: BatchMatMul,\n backendName: \"cpu\",\n kernelFunc: batchMatMul\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/_FusedMatMul.js\nfunction _fusedMatMul(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { a, b, bias, preluActivationWeights } = inputs;\n const { transposeA, transposeB, activation: activation2, leakyreluAlpha } = attrs;\n let current;\n let addRes;\n let activationRes;\n const intermediates = [];\n const matMulRes = batchMatMul({ inputs: { a, b }, attrs: { transposeA, transposeB }, backend: backend2 });\n current = matMulRes;\n if (bias) {\n addRes = add4({ inputs: { a: current, b: bias }, backend: backend2 });\n intermediates.push(current);\n current = addRes;\n }\n if (activation2) {\n activationRes = applyActivation2(backend2, current, activation2, preluActivationWeights, leakyreluAlpha);\n intermediates.push(current);\n current = activationRes;\n }\n for (const i of intermediates) {\n backend2.disposeIntermediateTensorInfo(i);\n }\n return current;\n}\nvar _fusedMatMulConfig = {\n kernelName: _FusedMatMul,\n backendName: \"cpu\",\n kernelFunc: _fusedMatMul\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Acos.js\nvar acos2 = unaryKernelFunc(Acos, (xi) => Math.acos(xi));\nvar acosConfig = {\n kernelName: Acos,\n backendName: \"cpu\",\n kernelFunc: acos2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Acosh.js\nvar acosh2 = unaryKernelFunc(Acosh, (xi) => Math.acosh(xi));\nvar acoshConfig = {\n kernelName: Acosh,\n backendName: \"cpu\",\n kernelFunc: acosh2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/AddN.js\nfunction addN2(args) {\n const { inputs, backend: backend2 } = args;\n const tensors = inputs;\n assertNotComplex(inputs, \"addN\");\n const vals = tensors.map((t) => backend2.data.get(t.dataId).values);\n const outBuf = buffer(tensors[0].shape, tensors[0].dtype);\n const outVals = outBuf.values;\n for (let i = 0; i < tensors.length; i++) {\n const currVals = vals[i];\n for (let j = 0; j < outVals.length; j++) {\n outVals[j] += currVals[j];\n }\n }\n return backend2.makeTensorInfo(outBuf.shape, outBuf.dtype, outBuf.values);\n}\nvar addNConfig = {\n kernelName: AddN,\n backendName: \"cpu\",\n kernelFunc: addN2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/All.js\nfunction all2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis, keepDims } = attrs;\n assertNotComplex(x, \"all\");\n const origAxes = util_exports.parseAxisParam(axis, x.shape);\n let axes = origAxes;\n const permutedAxes = backend_util_exports.getAxesPermutation(axes, x.shape.length);\n let $x = x;\n if (permutedAxes != null) {\n $x = transpose2({ inputs: { x }, backend: backend2, attrs: { perm: permutedAxes } });\n axes = backend_util_exports.getInnerMostAxes(axes.length, x.shape.length);\n }\n backend_util_exports.assertAxesAreInnerMostDims(\"all\", axes, $x.shape.length);\n const [outShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes($x.shape, axes);\n const reduceSize = util_exports.sizeFromShape(reduceShape);\n const vals = util_exports.makeZerosTypedArray(util_exports.sizeFromShape(outShape), $x.dtype);\n const aVals = backend2.data.get($x.dataId).values;\n for (let i = 0; i < vals.length; ++i) {\n const offset = i * reduceSize;\n let all5 = aVals[offset];\n for (let j = 0; j < reduceSize; ++j) {\n const value = aVals[offset + j];\n all5 = all5 && value;\n }\n vals[i] = all5;\n }\n if (permutedAxes != null) {\n backend2.disposeIntermediateTensorInfo($x);\n }\n const result = backend2.makeTensorInfo(outShape, $x.dtype, vals);\n if (keepDims) {\n const expandedShape = backend_util_exports.expandShapeToKeepDim(outShape, origAxes);\n const reshapedResult = reshape3({ inputs: { x: result }, backend: backend2, attrs: { shape: expandedShape } });\n backend2.disposeIntermediateTensorInfo(result);\n return reshapedResult;\n }\n return result;\n}\nvar allConfig = {\n kernelName: All,\n backendName: \"cpu\",\n kernelFunc: all2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Any.js\nfunction any2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis, keepDims } = attrs;\n assertNotComplex(x, \"any\");\n const origAxes = util_exports.parseAxisParam(axis, x.shape);\n let axes = origAxes;\n const permutedAxes = backend_util_exports.getAxesPermutation(axes, x.shape.length);\n let $x = x;\n if (permutedAxes != null) {\n $x = transpose2({ inputs: { x }, backend: backend2, attrs: { perm: permutedAxes } });\n axes = backend_util_exports.getInnerMostAxes(axes.length, x.shape.length);\n }\n backend_util_exports.assertAxesAreInnerMostDims(\"any\", axes, $x.shape.length);\n const [outShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes($x.shape, axes);\n const reduceSize = util_exports.sizeFromShape(reduceShape);\n const vals = util_exports.makeZerosTypedArray(util_exports.sizeFromShape(outShape), $x.dtype);\n const aVals = backend2.data.get($x.dataId).values;\n for (let i = 0; i < vals.length; ++i) {\n const offset = i * reduceSize;\n let anyVal = aVals[offset];\n for (let j = 0; j < reduceSize; ++j) {\n const value = aVals[offset + j];\n anyVal = anyVal || value;\n }\n vals[i] = anyVal;\n }\n if (permutedAxes != null) {\n backend2.disposeIntermediateTensorInfo($x);\n }\n const result = backend2.makeTensorInfo(outShape, $x.dtype, vals);\n if (keepDims) {\n const expandedShape = backend_util_exports.expandShapeToKeepDim(outShape, origAxes);\n const reshapedResult = reshape3({ inputs: { x: result }, backend: backend2, attrs: { shape: expandedShape } });\n backend2.disposeIntermediateTensorInfo(result);\n return reshapedResult;\n }\n return result;\n}\nvar anyConfig = {\n kernelName: Any,\n backendName: \"cpu\",\n kernelFunc: any2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ArgMax.js\nfunction argMax2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis } = attrs;\n assertNotComplex(x, \"argMax\");\n let axes = util_exports.parseAxisParam(axis, x.shape);\n const permutedAxes = backend_util_exports.getAxesPermutation(axes, x.shape.length);\n let $x = x;\n const intermediateTensorInfos = [];\n if (permutedAxes != null) {\n $x = transpose2({ inputs: { x }, backend: backend2, attrs: { perm: permutedAxes } });\n intermediateTensorInfos.push($x);\n axes = backend_util_exports.getInnerMostAxes(axes.length, $x.shape.length);\n }\n axes = [axes[0]];\n backend_util_exports.assertAxesAreInnerMostDims(\"argMax\", axes, $x.shape.length);\n const [outShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes($x.shape, axes);\n const outSize = util_exports.sizeFromShape(outShape);\n const vals = util_exports.makeZerosTypedArray(outSize, \"int32\");\n const reduceSize = util_exports.sizeFromShape(reduceShape);\n const aVals = backend2.data.get($x.dataId).values;\n for (let i = 0; i < vals.length; ++i) {\n const offset = i * reduceSize;\n let max7 = aVals[offset];\n let maxIndex = 0;\n for (let j = 0; j < reduceSize; ++j) {\n const value = aVals[offset + j];\n if (value > max7) {\n max7 = value;\n maxIndex = j;\n }\n }\n vals[i] = maxIndex;\n }\n intermediateTensorInfos.forEach((t) => backend2.disposeIntermediateTensorInfo(t));\n return backend2.makeTensorInfo(outShape, \"int32\", vals);\n}\nvar argMaxConfig = {\n kernelName: ArgMax,\n backendName: \"cpu\",\n kernelFunc: argMax2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ArgMin.js\nfunction argMin2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis } = attrs;\n assertNotComplex(x, \"argMin\");\n let axes = util_exports.parseAxisParam(axis, x.shape);\n const permutedAxes = backend_util_exports.getAxesPermutation(axes, x.shape.length);\n let $x = x;\n const intermediateTensorInfos = [];\n if (permutedAxes != null) {\n $x = transpose2({ inputs: { x }, backend: backend2, attrs: { perm: permutedAxes } });\n intermediateTensorInfos.push($x);\n axes = backend_util_exports.getInnerMostAxes(axes.length, $x.shape.length);\n }\n axes = [axes[0]];\n backend_util_exports.assertAxesAreInnerMostDims(\"argMin\", axes, $x.shape.length);\n const [outShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes($x.shape, axes);\n const outSize = util_exports.sizeFromShape(outShape);\n const vals = util_exports.makeZerosTypedArray(outSize, \"int32\");\n const reduceSize = util_exports.sizeFromShape(reduceShape);\n const aVals = backend2.data.get($x.dataId).values;\n for (let i = 0; i < vals.length; ++i) {\n const offset = i * reduceSize;\n let min7 = aVals[offset];\n let minIndex = 0;\n for (let j = 0; j < reduceSize; ++j) {\n const value = aVals[offset + j];\n if (value < min7) {\n min7 = value;\n minIndex = j;\n }\n }\n vals[i] = minIndex;\n }\n intermediateTensorInfos.forEach((t) => backend2.disposeIntermediateTensorInfo(t));\n return backend2.makeTensorInfo(outShape, \"int32\", vals);\n}\nvar argMinConfig = {\n kernelName: ArgMin,\n backendName: \"cpu\",\n kernelFunc: argMin2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Asin.js\nvar asin2 = unaryKernelFunc(Asin, (xi) => Math.asin(xi));\nvar asinConfig = {\n kernelName: Asin,\n backendName: \"cpu\",\n kernelFunc: asin2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Asinh.js\nvar asinh2 = unaryKernelFunc(Asinh, (xi) => Math.asinh(xi));\nvar asinhConfig = {\n kernelName: Asinh,\n backendName: \"cpu\",\n kernelFunc: asinh2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Atan.js\nvar atan3 = unaryKernelFunc(Atan, (xi) => Math.atan(xi));\nvar atanConfig = {\n kernelName: Atan,\n backendName: \"cpu\",\n kernelFunc: atan3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Atan2.js\nvar atan2Impl = createSimpleBinaryKernelImpl((aValue, bValue) => Math.atan2(aValue, bValue));\nvar atan22 = binaryKernelFunc(Atan2, atan2Impl);\nvar atan2Config = {\n kernelName: Atan2,\n backendName: \"cpu\",\n kernelFunc: atan22\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Atanh.js\nvar atanh2 = unaryKernelFunc(Atanh, (xi) => Math.atanh(xi));\nvar atanhConfig = {\n kernelName: Atanh,\n backendName: \"cpu\",\n kernelFunc: atanh2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/utils/pool_utils.js\nfunction pool2(xValues, xShape, dtype, strides, convInfo, poolType) {\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const dilationHeight = convInfo.dilationHeight;\n const dilationWidth = convInfo.dilationWidth;\n const effectiveFilterHeight = convInfo.effectiveFilterHeight;\n const effectiveFilterWidth = convInfo.effectiveFilterWidth;\n const padTop = convInfo.padInfo.top;\n const padLeft = convInfo.padInfo.left;\n const initialValue = poolType === \"max\" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY;\n const output = buffer(convInfo.outShape, dtype);\n const outputVals = output.values;\n const outputBatchStrides = convInfo.outShape[1] * convInfo.outShape[2] * convInfo.outShape[3];\n const outputRowStrides = convInfo.outShape[2] * convInfo.outShape[3];\n const outputColStrides = convInfo.outShape[3];\n for (let b = 0; b < convInfo.batchSize; ++b) {\n const outputBatchOffset = b * outputBatchStrides;\n const inputBatchOffset = b * strides[0];\n for (let d = 0; d < convInfo.inChannels; ++d) {\n for (let yR = 0; yR < convInfo.outHeight; ++yR) {\n const xRCorner = yR * strideHeight - padTop;\n const xRMin = Math.max(0, xRCorner);\n const xRMax = Math.min(convInfo.inHeight, effectiveFilterHeight + xRCorner);\n const outputRowOffset = outputBatchOffset + yR * outputRowStrides;\n for (let yC = 0; yC < convInfo.outWidth; ++yC) {\n const xCCorner = yC * strideWidth - padLeft;\n const xCMin = Math.max(0, xCCorner);\n const xCMax = Math.min(convInfo.inWidth, effectiveFilterWidth + xCCorner);\n let minMaxValue = initialValue;\n let avgValue = 0;\n let count2 = 0;\n for (let xR = xRMin; xR < xRMax; xR += dilationHeight) {\n const xROffset = inputBatchOffset + xR * strides[1];\n for (let xC = xCMin; xC < xCMax; xC += dilationWidth) {\n const xCOffset = xROffset + xC * strides[2];\n const pixel = xValues[xCOffset + d];\n if (poolType === \"max\" && pixel > minMaxValue) {\n minMaxValue = pixel;\n } else if (poolType === \"avg\") {\n avgValue += pixel;\n count2++;\n }\n }\n if (isNaN(minMaxValue)) {\n break;\n }\n }\n const outputOffset = outputRowOffset + yC * outputColStrides + d;\n outputVals[outputOffset] = poolType === \"avg\" ? avgValue / count2 : minMaxValue;\n }\n }\n }\n }\n return output;\n}\nfunction maxPoolPositions(xValues, xShape, dtype, convInfo, flattenPositions = false, includeBatchInIndex = false) {\n const maxPositions = buffer(convInfo.outShape, \"int32\");\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const dilationHeight = convInfo.dilationHeight;\n const dilationWidth = convInfo.dilationWidth;\n const effectiveFilterHeight = convInfo.effectiveFilterHeight;\n const effectiveFilterWidth = convInfo.effectiveFilterWidth;\n const padTop = convInfo.padInfo.top;\n const padLeft = convInfo.padInfo.left;\n const xBuf = buffer(xShape, dtype, xValues);\n for (let b = 0; b < convInfo.batchSize; ++b) {\n for (let d = 0; d < convInfo.inChannels; ++d) {\n for (let yR = 0; yR < convInfo.outHeight; ++yR) {\n const xRCorner = yR * strideHeight - padTop;\n let xRMin = xRCorner;\n while (xRMin < 0) {\n xRMin += dilationHeight;\n }\n const xRMax = Math.min(convInfo.inHeight, effectiveFilterHeight + xRCorner);\n for (let yC = 0; yC < convInfo.outWidth; ++yC) {\n const xCCorner = yC * strideWidth - padLeft;\n let xCMin = xCCorner;\n while (xCMin < 0) {\n xCMin += dilationWidth;\n }\n const xCMax = Math.min(convInfo.inWidth, effectiveFilterWidth + xCCorner);\n let maxValue = Number.NEGATIVE_INFINITY;\n let maxPosition = -1;\n for (let xR = xRMin; xR < xRMax; xR += dilationHeight) {\n const wR = xR - xRCorner;\n for (let xC = xCMin; xC < xCMax; xC += dilationWidth) {\n const wC = xC - xCCorner;\n const pixel = xBuf.get(b, xR, xC, d);\n if (pixel > maxValue) {\n maxValue = pixel;\n if (flattenPositions) {\n maxPosition = includeBatchInIndex ? ((b * convInfo.inHeight + xR) * convInfo.inWidth + xC) * convInfo.inChannels + d : (xR * convInfo.inWidth + xC) * convInfo.inChannels + d;\n } else {\n maxPosition = wR * effectiveFilterWidth + wC;\n }\n }\n }\n }\n maxPositions.set(maxPosition, b, yR, yC, d);\n }\n }\n }\n }\n return maxPositions;\n}\nfunction pool3d2(xValues, xShape, dtype, strides, convInfo, poolType) {\n const strideDepth = convInfo.strideDepth;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const dilationDepth = convInfo.dilationDepth;\n const dilationHeight = convInfo.dilationHeight;\n const dilationWidth = convInfo.dilationWidth;\n const effectiveFilterDepth = convInfo.effectiveFilterDepth;\n const effectiveFilterHeight = convInfo.effectiveFilterHeight;\n const effectiveFilterWidth = convInfo.effectiveFilterWidth;\n const padFront = convInfo.padInfo.front;\n const padTop = convInfo.padInfo.top;\n const padLeft = convInfo.padInfo.left;\n const initialValue = poolType === \"max\" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY;\n const output = buffer(convInfo.outShape, dtype);\n const outputVals = output.values;\n const outputBatchStrides = convInfo.outShape[1] * convInfo.outShape[2] * convInfo.outShape[3] * convInfo.outShape[4];\n const outputDepthStrides = convInfo.outShape[2] * convInfo.outShape[3] * convInfo.outShape[4];\n const outputRowStrides = convInfo.outShape[3] * convInfo.outShape[4];\n const outputColStrides = convInfo.outShape[4];\n for (let batch = 0; batch < convInfo.batchSize; ++batch) {\n const outputBatchOffset = batch * outputBatchStrides;\n const inputBatchOffset = batch * strides[0];\n for (let channel = 0; channel < convInfo.inChannels; ++channel) {\n for (let yDepth = 0; yDepth < convInfo.outDepth; ++yDepth) {\n const xDepthCorner = yDepth * strideDepth - padFront;\n let xDepthMin = xDepthCorner;\n while (xDepthMin < 0) {\n xDepthMin += dilationDepth;\n }\n const xDepthMax = Math.min(convInfo.inDepth, effectiveFilterDepth + xDepthCorner);\n const outputDepthOffset = outputBatchOffset + yDepth * outputDepthStrides;\n for (let yRow = 0; yRow < convInfo.outHeight; ++yRow) {\n const xRowCorner = yRow * strideHeight - padTop;\n let xRowMin = xRowCorner;\n while (xRowMin < 0) {\n xRowMin += dilationHeight;\n }\n const xRowMax = Math.min(convInfo.inHeight, effectiveFilterHeight + xRowCorner);\n const outputRowOffset = outputDepthOffset + yRow * outputRowStrides;\n for (let yCol = 0; yCol < convInfo.outWidth; ++yCol) {\n const xColCorner = yCol * strideWidth - padLeft;\n let xColMin = xColCorner;\n while (xColMin < 0) {\n xColMin += dilationWidth;\n }\n const xColMax = Math.min(convInfo.inWidth, effectiveFilterWidth + xColCorner);\n const outputColOffset = outputRowOffset + yCol * outputColStrides;\n let minMaxValue = initialValue;\n let avgValue = 0;\n let count2 = 0;\n for (let xDepth = xDepthMin; xDepth < xDepthMax; xDepth += dilationDepth) {\n const xDepthOffset = inputBatchOffset + xDepth * strides[1];\n for (let xRow = xRowMin; xRow < xRowMax; xRow += dilationHeight) {\n const xRowOffset = xDepthOffset + xRow * strides[2];\n for (let xCol = xColMin; xCol < xColMax; xCol += dilationWidth) {\n const xColOffset = xRowOffset + xCol * strides[3];\n const pixel = xValues[xColOffset + channel];\n if (poolType === \"max\" && pixel > minMaxValue) {\n minMaxValue = pixel;\n } else if (poolType === \"avg\") {\n avgValue += pixel;\n count2++;\n }\n if (isNaN(minMaxValue)) {\n break;\n }\n }\n if (isNaN(minMaxValue)) {\n break;\n }\n }\n if (isNaN(minMaxValue)) {\n break;\n }\n }\n const outputOffset = outputColOffset + channel;\n outputVals[outputOffset] = poolType === \"avg\" ? avgValue / count2 : minMaxValue;\n }\n }\n }\n }\n }\n return output;\n}\nfunction maxPool3dPositions(xBuf, convInfo) {\n const maxPositions = buffer(convInfo.outShape, \"int32\");\n const strideDepth = convInfo.strideDepth;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const dilationDepth = convInfo.dilationDepth;\n const dilationHeight = convInfo.dilationHeight;\n const dilationWidth = convInfo.dilationWidth;\n const effectiveFilterDepth = convInfo.effectiveFilterDepth;\n const effectiveFilterHeight = convInfo.effectiveFilterHeight;\n const effectiveFilterWidth = convInfo.effectiveFilterWidth;\n const padFront = convInfo.padInfo.front;\n const padTop = convInfo.padInfo.top;\n const padLeft = convInfo.padInfo.left;\n for (let batch = 0; batch < convInfo.batchSize; ++batch) {\n for (let channel = 0; channel < convInfo.inChannels; ++channel) {\n for (let yDepth = 0; yDepth < convInfo.outDepth; ++yDepth) {\n const xDepthCorner = yDepth * strideDepth - padFront;\n let xDepthMin = xDepthCorner;\n while (xDepthMin < 0) {\n xDepthMin += dilationDepth;\n }\n const xDepthMax = Math.min(convInfo.inDepth, effectiveFilterDepth + xDepthCorner);\n for (let yRow = 0; yRow < convInfo.outHeight; ++yRow) {\n const xRowCorner = yRow * strideHeight - padTop;\n let xRowMin = xRowCorner;\n while (xRowMin < 0) {\n xRowMin += dilationHeight;\n }\n const xRowMax = Math.min(convInfo.inHeight, effectiveFilterHeight + xRowCorner);\n for (let yCol = 0; yCol < convInfo.outWidth; ++yCol) {\n const xColCorner = yCol * strideWidth - padLeft;\n let xColMin = xColCorner;\n while (xColMin < 0) {\n xColMin += dilationWidth;\n }\n const xColMax = Math.min(convInfo.inWidth, effectiveFilterWidth + xColCorner);\n let maxValue = Number.NEGATIVE_INFINITY;\n let maxPosition = -1;\n for (let xDepth = xDepthMin; xDepth < xDepthMax; xDepth += dilationDepth) {\n const wDepth = xDepth - xDepthCorner;\n for (let xRow = xRowMin; xRow < xRowMax; xRow += dilationHeight) {\n const wRow = xRow - xRowCorner;\n for (let xCol = xColMin; xCol < xColMax; xCol += dilationWidth) {\n const wCol = xCol - xColCorner;\n const pixel = xBuf.get(batch, xDepth, xRow, xCol, channel);\n if (pixel >= maxValue) {\n maxValue = pixel;\n maxPosition = wDepth * effectiveFilterHeight * effectiveFilterWidth + wRow * effectiveFilterHeight + wCol;\n }\n }\n }\n }\n maxPositions.set(maxPosition, batch, yDepth, yRow, yCol, channel);\n }\n }\n }\n }\n }\n return maxPositions;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/AvgPool.js\nfunction avgPool2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n assertNotComplex(x, \"avgPool\");\n const { filterSize, strides, pad: pad3, dimRoundingMode } = attrs;\n const dilations = 1;\n util_exports.assert(backend_util_exports.eitherStridesOrDilationsAreOne(strides, dilations), () => `Error in avgPool: Either strides or dilations must be 1. Got strides ${strides} and dilations '${dilations}'`);\n const convInfo = backend_util_exports.computePool2DInfo(x.shape, filterSize, strides, dilations, pad3, dimRoundingMode);\n let res;\n if (convInfo.filterWidth === 1 && convInfo.filterHeight === 1 && util_exports.arraysEqual(convInfo.inShape, convInfo.outShape)) {\n res = identity2({ inputs: { x }, backend: backend2 });\n } else {\n const xValues = backend2.data.get(x.dataId).values;\n const strides2 = util_exports.computeStrides(x.shape);\n const buffer2 = pool2(xValues, x.shape, x.dtype, strides2, convInfo, \"avg\");\n res = backend2.makeTensorInfo(convInfo.outShape, x.dtype, buffer2.values);\n }\n return res;\n}\nvar avgPoolConfig = {\n kernelName: AvgPool,\n backendName: \"cpu\",\n kernelFunc: avgPool2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/AvgPool3D.js\nfunction avgPool3D(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { filterSize, strides, pad: pad3, dimRoundingMode, dataFormat } = attrs;\n assertNotComplex(x, \"avgPool3d\");\n const convInfo = backend_util_exports.computePool3DInfo(x.shape, filterSize, strides, 1, pad3, dimRoundingMode, dataFormat);\n const xValues = backend2.data.get(x.dataId).values;\n const outBuf = pool3d2(xValues, x.shape, x.dtype, util_exports.computeStrides(x.shape), convInfo, \"avg\");\n return backend2.makeTensorInfo(outBuf.shape, \"float32\", outBuf.values);\n}\nvar avgPool3DConfig = {\n kernelName: AvgPool3D,\n backendName: \"cpu\",\n kernelFunc: avgPool3D\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/AvgPool3DGrad.js\nfunction avgPool3DGrad(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { dy, input: input2 } = inputs;\n const { filterSize, strides, pad: pad3, dimRoundingMode } = attrs;\n assertNotComplex([dy, input2], \"avgPool3DGrad\");\n const convInfo = backend_util_exports.computePool3DInfo(input2.shape, filterSize, strides, 1, pad3, dimRoundingMode);\n const strideDepth = convInfo.strideDepth;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const filterDepth = convInfo.filterDepth;\n const filterHeight = convInfo.filterHeight;\n const filterWidth = convInfo.filterWidth;\n const dilationDepth = convInfo.dilationDepth;\n const dilationHeight = convInfo.dilationHeight;\n const dilationWidth = convInfo.dilationWidth;\n const effectiveFilterDepth = convInfo.effectiveFilterDepth;\n const effectiveFilterHeight = convInfo.effectiveFilterHeight;\n const effectiveFilterWidth = convInfo.effectiveFilterWidth;\n const padFront = effectiveFilterDepth - 1 - convInfo.padInfo.front;\n const padLeft = effectiveFilterWidth - 1 - convInfo.padInfo.left;\n const padTop = effectiveFilterHeight - 1 - convInfo.padInfo.top;\n const dx = buffer(input2.shape, \"float32\");\n const avgMultiplier = 1 / (filterDepth * filterHeight * filterWidth);\n const dyBuf = backend2.bufferSync(dy);\n for (let batch = 0; batch < convInfo.batchSize; ++batch) {\n for (let channel = 0; channel < convInfo.inChannels; ++channel) {\n for (let dxDepth = 0; dxDepth < convInfo.inDepth; ++dxDepth) {\n for (let dxRow = 0; dxRow < convInfo.inHeight; ++dxRow) {\n for (let dxCol = 0; dxCol < convInfo.inWidth; ++dxCol) {\n const dyDepthCorner = dxDepth - padFront;\n const dyRowCorner = dxRow - padTop;\n const dyColCorner = dxCol - padLeft;\n let dotProd = 0;\n for (let wDepth = 0; wDepth < effectiveFilterDepth; wDepth += dilationDepth) {\n const dyDepth = (dyDepthCorner + wDepth) / strideDepth;\n if (dyDepth < 0 || dyDepth >= convInfo.outDepth || Math.floor(dyDepth) !== dyDepth) {\n continue;\n }\n for (let wRow = 0; wRow < effectiveFilterHeight; wRow += dilationHeight) {\n const dyRow = (dyRowCorner + wRow) / strideHeight;\n if (dyRow < 0 || dyRow >= convInfo.outHeight || Math.floor(dyRow) !== dyRow) {\n continue;\n }\n for (let wCol = 0; wCol < effectiveFilterWidth; wCol += dilationWidth) {\n const dyCol = (dyColCorner + wCol) / strideWidth;\n if (dyCol < 0 || dyCol >= convInfo.outWidth || Math.floor(dyCol) !== dyCol) {\n continue;\n }\n const pixel = dyBuf.get(batch, dyDepth, dyRow, dyCol, channel);\n dotProd += pixel;\n }\n }\n }\n dx.set(dotProd * avgMultiplier, batch, dxDepth, dxRow, dxCol, channel);\n }\n }\n }\n }\n }\n return backend2.makeTensorInfo(dx.shape, dx.dtype, dx.values);\n}\nvar avgPool3DGradConfig2 = {\n kernelName: AvgPool3DGrad,\n backendName: \"cpu\",\n kernelFunc: avgPool3DGrad\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/AvgPoolGrad.js\nfunction avgPoolGrad2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { dy, input: input2 } = inputs;\n const x = input2;\n assertNotComplex([dy, input2], \"avgPoolGrad\");\n const { filterSize, strides, pad: pad3 } = attrs;\n const convInfo = backend_util_exports.computePool2DInfo(x.shape, filterSize, strides, 1, pad3);\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const filterHeight = convInfo.filterHeight;\n const filterWidth = convInfo.filterWidth;\n const dilationHeight = convInfo.dilationHeight;\n const dilationWidth = convInfo.dilationWidth;\n const effectiveFilterHeight = convInfo.effectiveFilterHeight;\n const effectiveFilterWidth = convInfo.effectiveFilterWidth;\n const padLeft = effectiveFilterWidth - 1 - convInfo.padInfo.left;\n const padTop = effectiveFilterHeight - 1 - convInfo.padInfo.top;\n const dx = buffer(x.shape, \"float32\");\n const avgMultiplier = 1 / (filterHeight * filterWidth);\n const dyData = backend2.data.get(dy.dataId).values;\n const dyBuf = buffer(dy.shape, \"float32\", dyData);\n for (let b = 0; b < convInfo.batchSize; ++b) {\n for (let d = 0; d < convInfo.inChannels; ++d) {\n for (let dxR = 0; dxR < convInfo.inHeight; ++dxR) {\n for (let dxC = 0; dxC < convInfo.inWidth; ++dxC) {\n const dyRCorner = dxR - padTop;\n const dyCCorner = dxC - padLeft;\n let dotProd = 0;\n for (let wR = 0; wR < effectiveFilterHeight; wR += dilationHeight) {\n const dyR = (dyRCorner + wR) / strideHeight;\n if (dyR < 0 || dyR >= convInfo.outHeight || Math.floor(dyR) !== dyR) {\n continue;\n }\n for (let wC = 0; wC < effectiveFilterWidth; wC += dilationWidth) {\n const dyC = (dyCCorner + wC) / strideWidth;\n if (dyC < 0 || dyC >= convInfo.outWidth || Math.floor(dyC) !== dyC) {\n continue;\n }\n const pixel = dyBuf.get(b, dyR, dyC, d);\n dotProd += pixel;\n }\n }\n dx.set(dotProd * avgMultiplier, b, dxR, dxC, d);\n }\n }\n }\n }\n return backend2.makeTensorInfo(dx.shape, dx.dtype, dx.values);\n}\nvar avgPoolGradConfig2 = {\n kernelName: AvgPoolGrad,\n backendName: \"cpu\",\n kernelFunc: avgPoolGrad2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/BatchNorm.js\nfunction batchNorm2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, scale: scale2, offset, mean: mean5, variance } = inputs;\n util_exports.assert(mean5.shape.length === variance.shape.length, () => \"Batch normalization gradient requires mean and variance to have equal ranks.\");\n util_exports.assert(offset == null || mean5.shape.length === offset.shape.length, () => \"Batch normalization gradient requires mean and offset to have equal ranks.\");\n util_exports.assert(scale2 == null || mean5.shape.length === scale2.shape.length, () => \"Batch normalization gradient requires mean and scale to have equal ranks.\");\n assertNotComplex([x, mean5, variance, scale2, offset], \"batchNorm\");\n let { varianceEpsilon } = attrs;\n if (varianceEpsilon == null) {\n varianceEpsilon = 1e-3;\n }\n const xVals = backend2.data.get(x.dataId).values;\n const mVals = backend2.data.get(mean5.dataId).values;\n const varVals = backend2.data.get(variance.dataId).values;\n const sVals = scale2 ? backend2.data.get(scale2.dataId).values : new Float32Array([1]);\n const offVals = offset ? backend2.data.get(offset.dataId).values : new Float32Array([0]);\n const outVals = new Float32Array(xVals.length);\n const offValsLength = offVals.length;\n const sValsLength = sVals.length;\n const varValsLength = varVals.length;\n const mValsLength = mVals.length;\n let offi = 0;\n let mi = 0;\n let si = 0;\n let vi = 0;\n for (let i = 0; i < xVals.length; ++i) {\n outVals[i] = offVals[offi++] + (xVals[i] - mVals[mi++]) * sVals[si++] / Math.sqrt(varVals[vi++] + varianceEpsilon);\n if (offi >= offValsLength) {\n offi = 0;\n }\n if (mi >= mValsLength) {\n mi = 0;\n }\n if (si >= sValsLength) {\n si = 0;\n }\n if (vi >= varValsLength) {\n vi = 0;\n }\n }\n return backend2.makeTensorInfo(x.shape, x.dtype, outVals);\n}\nvar batchNormConfig = {\n kernelName: FusedBatchNorm,\n backendName: \"cpu\",\n kernelFunc: batchNorm2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/BatchToSpaceND.js\nfunction batchToSpaceND2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { blockShape, crops } = attrs;\n assertNotComplex([x], \"batchToSpaceND\");\n const prod6 = blockShape.reduce((a, b) => a * b);\n const reshaped = backend_util_exports.getReshaped(x.shape, blockShape, prod6);\n const permuted = backend_util_exports.getPermuted(reshaped.length, blockShape.length);\n const reshapedPermuted = backend_util_exports.getReshapedPermuted(x.shape, blockShape, prod6);\n const sliceBeginCoords = backend_util_exports.getSliceBeginCoords(crops, blockShape.length);\n const sliceSize = backend_util_exports.getSliceSize(reshapedPermuted, crops, blockShape.length);\n const xReshaped = reshape3({ inputs: { x }, backend: backend2, attrs: { shape: reshaped } });\n const xTransposed = transpose2({ inputs: { x: xReshaped }, backend: backend2, attrs: { perm: permuted } });\n const xTransposedReshaped = reshape3({ inputs: { x: xTransposed }, backend: backend2, attrs: { shape: reshapedPermuted } });\n const result = slice2({\n inputs: { x: xTransposedReshaped },\n backend: backend2,\n attrs: { begin: sliceBeginCoords, size: sliceSize }\n });\n backend2.disposeIntermediateTensorInfo(xReshaped);\n backend2.disposeIntermediateTensorInfo(xTransposed);\n backend2.disposeIntermediateTensorInfo(xTransposedReshaped);\n return result;\n}\nvar batchToSpaceNDConfig = {\n kernelName: BatchToSpaceND,\n backendName: \"cpu\",\n kernelFunc: batchToSpaceND2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Bincount.js\nfunction bincount2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, weights } = inputs;\n const { size } = attrs;\n const xVals = backend2.data.get(x.dataId).values;\n const weightsVals = backend2.data.get(weights.dataId).values;\n const outVals = bincountImpl(xVals, weightsVals, weights.dtype, weights.shape, size);\n return backend2.makeTensorInfo([size], weights.dtype, outVals);\n}\nvar bincountConfig = {\n kernelName: Bincount,\n backendName: \"cpu\",\n kernelFunc: bincount2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/BroadcastArgs.js\nfunction broadcastArgs2(args) {\n const { inputs, backend: backend2 } = args;\n const { s0, s1 } = inputs;\n const s0Vals = backend2.data.get(s0.dataId).values;\n const s1Vals = backend2.data.get(s1.dataId).values;\n const broadcastShape = backend_util_exports.assertAndGetBroadcastShape(Array.from(s0Vals), Array.from(s1Vals));\n return backend2.makeTensorInfo([broadcastShape.length], \"int32\", Int32Array.from(broadcastShape));\n}\nvar broadcastArgsConfig = {\n kernelName: BroadcastArgs,\n backendName: \"cpu\",\n kernelFunc: broadcastArgs2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ClipByValue.js\nvar clipByValue2 = unaryKernelFunc(ClipByValue, (xi, attrs) => {\n const clipAttrs = attrs;\n if (xi > clipAttrs.clipValueMax) {\n return clipAttrs.clipValueMax;\n }\n return xi < clipAttrs.clipValueMin ? clipAttrs.clipValueMin : xi;\n});\nvar clipByValueConfig = {\n kernelName: ClipByValue,\n backendName: \"cpu\",\n kernelFunc: clipByValue2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ComplexAbs.js\nvar complexAbs = (args) => {\n const { x } = args.inputs;\n const cpuBackend = args.backend;\n const resultValues = new Float32Array(util_exports.sizeFromShape(x.shape));\n const complexVals = cpuBackend.data.get(x.dataId);\n const real5 = complexVals.complexTensorInfos.real;\n const imag5 = complexVals.complexTensorInfos.imag;\n const realVals = cpuBackend.data.get(real5.dataId).values;\n const imagVals = cpuBackend.data.get(imag5.dataId).values;\n for (let i = 0; i < realVals.length; i++) {\n const real6 = realVals[i];\n const imag6 = imagVals[i];\n resultValues[i] = Math.hypot(real6, imag6);\n }\n return cpuBackend.makeOutput(resultValues, x.shape, \"float32\");\n};\nvar complexAbsConfig = {\n kernelName: ComplexAbs,\n backendName: \"cpu\",\n kernelFunc: complexAbs\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Imag.js\nfunction imag2(args) {\n const { inputs, backend: backend2 } = args;\n const { input: input2 } = inputs;\n const imag5 = backend2.data.get(input2.dataId).complexTensorInfos.imag;\n const imagVal = backend2.data.get(imag5.dataId).values;\n return backend2.makeTensorInfo(imag5.shape, imag5.dtype, imagVal);\n}\nvar imagConfig = {\n kernelName: Imag,\n backendName: \"cpu\",\n kernelFunc: imag2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Concat.js\nfunction concat2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { axis } = attrs;\n const $axis = util_exports.parseAxisParam(axis, inputs[0].shape)[0];\n let outShape = backend_util_exports.computeOutShape(inputs.map((t) => t.shape), $axis);\n if (util_exports.sizeFromShape(outShape) === 0) {\n return backend2.makeTensorInfo(outShape, inputs[0].dtype, []);\n }\n const $inputs = inputs.filter((t) => util_exports.sizeFromShape(t.shape) > 0);\n if ($inputs.length === 1) {\n return identity2({ inputs: { x: $inputs[0] }, backend: backend2 });\n }\n const shapes = $inputs.map((t) => t.shape);\n backend_util_exports.assertParamsConsistent(shapes, $axis);\n if ($inputs[0].dtype === \"complex64\") {\n const reals = $inputs.map((t) => real2({ inputs: { input: t }, backend: backend2 }));\n const imags = $inputs.map((t) => imag2({ inputs: { input: t }, backend: backend2 }));\n const realConcated = concat2({ inputs: reals, backend: backend2, attrs: { axis: $axis } });\n const imagConcated = concat2({ inputs: imags, backend: backend2, attrs: { axis: $axis } });\n const result = complex2({ inputs: { real: realConcated, imag: imagConcated }, backend: backend2 });\n reals.forEach((r) => backend2.disposeIntermediateTensorInfo(r));\n imags.forEach((i) => backend2.disposeIntermediateTensorInfo(i));\n backend2.disposeIntermediateTensorInfo(realConcated);\n backend2.disposeIntermediateTensorInfo(imagConcated);\n return result;\n }\n const inputs2D = $inputs.map((t) => {\n const innerSize = util_exports.sizeFromShape(t.shape.slice($axis));\n const shape = [-1, innerSize];\n return reshape3({ inputs: { x: t }, backend: backend2, attrs: { shape } });\n });\n const inputsValShapes = inputs2D.map((t) => {\n return { vals: backend2.data.get(t.dataId).values, shape: t.shape };\n });\n outShape = backend_util_exports.computeOutShape(inputs2D.map((t) => t.shape), 1);\n const simplyConcat = inputs2D[0].shape[0] === 1;\n const outVals = concatImpl(inputsValShapes, outShape, inputs[0].dtype, simplyConcat);\n const finalOutShape = backend_util_exports.computeOutShape($inputs.map((t) => t.shape), $axis);\n const outInfo = backend2.makeTensorInfo(finalOutShape, inputs[0].dtype, outVals);\n inputs2D.forEach((t) => backend2.disposeIntermediateTensorInfo(t));\n return outInfo;\n}\nvar concatConfig = {\n kernelName: Concat,\n backendName: \"cpu\",\n kernelFunc: concat2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Conv2D.js\nfunction conv2D(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, filter } = inputs;\n const { strides, pad: pad3, dataFormat, dilations, dimRoundingMode } = attrs;\n assertNotComplex([x, filter], \"conv2d\");\n const $dataFormat = backend_util_exports.convertConv2DDataFormat(dataFormat);\n const convInfo = backend_util_exports.computeConv2DInfo(x.shape, filter.shape, strides, dilations, pad3, dimRoundingMode, false, $dataFormat);\n const filterHeight = convInfo.filterHeight;\n const filterWidth = convInfo.filterWidth;\n const dilationHeight = convInfo.dilationHeight;\n const dilationWidth = convInfo.dilationWidth;\n const padLeft = convInfo.padInfo.left;\n const padTop = convInfo.padInfo.top;\n const isChannelsLast = convInfo.dataFormat === \"channelsLast\";\n const y = new TensorBuffer(convInfo.outShape, x.dtype);\n const xStrides = util_exports.computeStrides(x.shape);\n const filterStrides = util_exports.computeStrides(filter.shape);\n const xBatchStride = xStrides[0];\n const xRowStride = isChannelsLast ? xStrides[1] : xStrides[2];\n const xColStride = isChannelsLast ? xStrides[2] : 1;\n const xChannelStride = isChannelsLast ? 1 : xStrides[1];\n const yBatchStride = y.strides[0];\n const yRowStride = isChannelsLast ? y.strides[1] : y.strides[2];\n const yColStride = isChannelsLast ? y.strides[2] : 1;\n const yChannelStride = isChannelsLast ? 1 : y.strides[1];\n const xVals = backend2.data.get(x.dataId).values;\n const wVals = backend2.data.get(filter.dataId).values;\n const yVals = y.values;\n for (let b = 0; b < convInfo.batchSize; ++b) {\n const xOffset1 = b * xBatchStride;\n const yOffset1 = b * yBatchStride;\n for (let yR = 0; yR < convInfo.outHeight; ++yR) {\n const yOffset2 = yOffset1 + yR * yRowStride;\n const xRCorner = yR * convInfo.strideHeight - padTop;\n for (let wR = 0; wR < filterHeight; ++wR) {\n const xR = xRCorner + wR * dilationHeight;\n if (xR < 0 || xR >= convInfo.inHeight) {\n continue;\n }\n const wOffset1 = wR * filterStrides[0];\n const xOffset2 = xOffset1 + xR * xRowStride;\n for (let yC = 0; yC < convInfo.outWidth; ++yC) {\n const yOffset3 = yOffset2 + yC * yColStride;\n const xCCorner = yC * convInfo.strideWidth - padLeft;\n for (let wC = 0; wC < filterWidth; ++wC) {\n const xC = xCCorner + wC * dilationWidth;\n if (xC < 0 || xC >= convInfo.inWidth) {\n continue;\n }\n const wOffset2 = wOffset1 + wC * filterStrides[1];\n const xOffset3 = xOffset2 + xC * xColStride;\n let wOffset3 = wOffset2;\n for (let d1 = 0; d1 < convInfo.inChannels; ++d1) {\n const xVal = xVals[xOffset3 + d1 * xChannelStride];\n for (let d2 = 0; d2 < convInfo.outChannels; ++d2) {\n yVals[yOffset3 + d2 * yChannelStride] += xVal * wVals[wOffset3 + d2];\n }\n wOffset3 += convInfo.outChannels;\n }\n }\n }\n }\n }\n }\n return backend2.makeTensorInfo(y.shape, y.dtype, yVals);\n}\nvar conv2DConfig = {\n kernelName: Conv2D,\n backendName: \"cpu\",\n kernelFunc: conv2D\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Conv2DBackpropFilter.js\nfunction conv2DBackpropFilter2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, dy } = inputs;\n const { strides, pad: pad3, dataFormat, dimRoundingMode, filterShape } = attrs;\n assertNotComplex([x, dy], \"conv2dBackpropFilter\");\n const $dataFormat = backend_util_exports.convertConv2DDataFormat(dataFormat);\n const convInfo = backend_util_exports.computeConv2DInfo(x.shape, filterShape, strides, 1, pad3, dimRoundingMode, false, $dataFormat);\n const { strideHeight, strideWidth, filterHeight, filterWidth } = convInfo;\n const isChannelsLast = convInfo.dataFormat === \"channelsLast\";\n const dW = new TensorBuffer(convInfo.filterShape, \"float32\");\n const leftPad = convInfo.padInfo.left;\n const topPad = convInfo.padInfo.top;\n const xVals = backend2.data.get(x.dataId).values;\n const dyVals = backend2.data.get(dy.dataId).values;\n const xBuf = new TensorBuffer(x.shape, x.dtype, xVals);\n const dyBuf = new TensorBuffer(dy.shape, dy.dtype, dyVals);\n for (let wR = 0; wR < filterHeight; ++wR) {\n const yRMin = Math.max(0, Math.ceil((topPad - wR) / strideHeight));\n const yRMax = Math.min(convInfo.outHeight, (convInfo.inHeight + topPad - wR) / strideHeight);\n for (let wC = 0; wC < filterWidth; ++wC) {\n const yCMin = Math.max(0, Math.ceil((leftPad - wC) / strideWidth));\n const yCMax = Math.min(convInfo.outWidth, (convInfo.inWidth + leftPad - wC) / strideWidth);\n for (let d1 = 0; d1 < convInfo.inChannels; ++d1) {\n for (let d2 = 0; d2 < convInfo.outChannels; ++d2) {\n let dotProd = 0;\n for (let b = 0; b < convInfo.batchSize; ++b) {\n for (let yR = yRMin; yR < yRMax; ++yR) {\n const xR = wR + yR * strideHeight - topPad;\n for (let yC = yCMin; yC < yCMax; ++yC) {\n const xC = wC + yC * strideWidth - leftPad;\n if (isChannelsLast) {\n dotProd += xBuf.get(b, xR, xC, d1) * dyBuf.get(b, yR, yC, d2);\n } else {\n dotProd += xBuf.get(b, d1, xR, xC) * dyBuf.get(b, d2, yR, yC);\n }\n }\n }\n }\n dW.set(dotProd, wR, wC, d1, d2);\n }\n }\n }\n }\n return backend2.makeTensorInfo(dW.shape, dW.dtype, dW.values);\n}\nvar conv2DBackpropFilterConfig = {\n kernelName: Conv2DBackpropFilter,\n backendName: \"cpu\",\n kernelFunc: conv2DBackpropFilter2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Conv2DBackpropInput.js\nfunction conv2DBackpropInput2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { dy, filter } = inputs;\n const { inputShape, strides, pad: pad3, dataFormat, dimRoundingMode } = attrs;\n assertNotComplex([dy, filter], \"conv2dBackpropInput\");\n const filterStrides = util_exports.computeStrides(filter.shape);\n const dyStrides = util_exports.computeStrides(dy.shape);\n let $dataFormat = backend_util_exports.convertConv2DDataFormat(dataFormat);\n const convInfo = backend_util_exports.computeConv2DInfo(inputShape, filter.shape, strides, 1, pad3, dimRoundingMode, false, $dataFormat);\n const dx = new TensorBuffer(convInfo.inShape, \"float32\");\n const dxValues = dx.values;\n const dyValues = backend2.data.get(dy.dataId).values;\n const fltValues = backend2.data.get(filter.dataId).values;\n const [fltS0, fltS1, fltS2] = filterStrides;\n const { batchSize, filterHeight, filterWidth, inChannels, inHeight, inWidth, outChannels, outHeight, outWidth, strideHeight, strideWidth } = convInfo;\n $dataFormat = convInfo.dataFormat;\n const topPad = filterHeight - 1 - convInfo.padInfo.top;\n const leftPad = filterWidth - 1 - convInfo.padInfo.left;\n const isChannelsLast = $dataFormat === \"channelsLast\";\n const xBatchStride = dx.strides[0];\n const xRowStride = isChannelsLast ? dx.strides[1] : dx.strides[2];\n const xColStride = isChannelsLast ? dx.strides[2] : 1;\n const xChannelStride = isChannelsLast ? 1 : dx.strides[1];\n const yBatchStride = dyStrides[0];\n const yRowStride = isChannelsLast ? dyStrides[1] : dyStrides[2];\n const yColStride = isChannelsLast ? dyStrides[2] : 1;\n const yChannelStride = isChannelsLast ? 1 : dyStrides[1];\n for (let b = 0; b < batchSize; ++b) {\n for (let d1 = 0; d1 < inChannels; ++d1) {\n for (let xR = 0; xR < inHeight; ++xR) {\n const xRCorner = xR - topPad;\n const xRMin = Math.max(0, Math.ceil(xRCorner / strideHeight));\n const yRMax = Math.min(outHeight, (filterHeight + xRCorner) / strideHeight);\n for (let xC = 0; xC < inWidth; ++xC) {\n const xCCorner = xC - leftPad;\n const xCMin = Math.max(0, Math.ceil(xCCorner / strideWidth));\n const yCMax = Math.min(outWidth, (filterWidth + xCCorner) / strideWidth);\n let dotProd = 0;\n for (let yR = xRMin; yR < yRMax; ++yR) {\n const wR = yR * strideHeight - xRCorner;\n for (let yC = xCMin; yC < yCMax; ++yC) {\n const wC = yC * strideWidth - xCCorner;\n const dyOffset = yBatchStride * b + yRowStride * yR + yColStride * yC;\n const fltOffset = fltS0 * (filterHeight - 1 - wR) + fltS1 * (filterWidth - 1 - wC) + fltS2 * d1;\n for (let d2 = 0; d2 < outChannels; ++d2) {\n const pixel = dyValues[dyOffset + yChannelStride * d2];\n const weight = fltValues[fltOffset + d2];\n dotProd += pixel * weight;\n }\n }\n }\n const dxOffset = xBatchStride * b + xRowStride * xR + xColStride * xC + xChannelStride * d1;\n dxValues[dxOffset] = dotProd;\n }\n }\n }\n }\n return backend2.makeTensorInfo(dx.shape, dx.dtype, dx.values);\n}\nvar conv2DBackpropInputConfig = {\n kernelName: Conv2DBackpropInput,\n backendName: \"cpu\",\n kernelFunc: conv2DBackpropInput2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Conv3D.js\nfunction conv3D(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, filter } = inputs;\n const { strides, pad: pad3, dilations } = attrs;\n assertNotComplex([x, filter], \"conv3d\");\n const convInfo = backend_util_exports.computeConv3DInfo(x.shape, filter.shape, strides, dilations, pad3);\n const { filterDepth, filterHeight, filterWidth, dilationDepth, dilationHeight, dilationWidth, padInfo } = convInfo;\n const padFront = padInfo.front;\n const padLeft = padInfo.left;\n const padTop = padInfo.top;\n const y = new TensorBuffer(convInfo.outShape, x.dtype);\n const xVals = backend2.data.get(x.dataId).values;\n const wVals = backend2.data.get(filter.dataId).values;\n const yVals = y.values;\n const xStrides = util_exports.computeStrides(x.shape);\n const filterStrides = util_exports.computeStrides(filter.shape);\n for (let b = 0; b < convInfo.batchSize; ++b) {\n const xOffset1 = b * xStrides[0];\n const yOffset1 = b * y.strides[0];\n for (let yF = 0; yF < convInfo.outDepth; ++yF) {\n const yOffset2 = yOffset1 + yF * y.strides[1];\n const xFCorner = yF * convInfo.strideDepth - padFront;\n for (let wF = 0; wF < filterDepth; ++wF) {\n const xF = xFCorner + wF * dilationDepth;\n if (xF < 0 || xF >= convInfo.inDepth) {\n continue;\n }\n const wOffset1 = wF * filterStrides[0];\n const xOffset2 = xOffset1 + xF * xStrides[1];\n for (let yR = 0; yR < convInfo.outHeight; ++yR) {\n const yOffset3 = yOffset2 + yR * y.strides[2];\n const xRCorner = yR * convInfo.strideHeight - padTop;\n for (let wR = 0; wR < filterHeight; ++wR) {\n const xR = xRCorner + wR * dilationHeight;\n if (xR < 0 || xR >= convInfo.inHeight) {\n continue;\n }\n const wOffset2 = wOffset1 + wR * filterStrides[1];\n const xOffset3 = xOffset2 + xR * xStrides[2];\n for (let yC = 0; yC < convInfo.outWidth; ++yC) {\n const yOffset4 = yOffset3 + yC * convInfo.outChannels;\n const xCCorner = yC * convInfo.strideWidth - padLeft;\n for (let wC = 0; wC < filterWidth; ++wC) {\n const xC = xCCorner + wC * dilationWidth;\n if (xC < 0 || xC >= convInfo.inWidth) {\n continue;\n }\n const wOffset3 = wOffset2 + wC * filterStrides[2];\n const xOffset4 = xOffset3 + xC * convInfo.inChannels;\n let wOffset4 = wOffset3;\n for (let d1 = 0; d1 < convInfo.inChannels; ++d1) {\n const xVal = xVals[xOffset4 + d1];\n for (let d2 = 0; d2 < convInfo.outChannels; ++d2) {\n yVals[yOffset4 + d2] += xVal * wVals[wOffset4 + d2];\n }\n wOffset4 += convInfo.outChannels;\n }\n }\n }\n }\n }\n }\n }\n }\n return backend2.makeTensorInfo(y.shape, y.dtype, y.values);\n}\nvar conv3DConfig = {\n kernelName: Conv3D,\n backendName: \"cpu\",\n kernelFunc: conv3D\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Conv3DBackpropFilterV2.js\nfunction conv3DBackpropFilterV2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, dy } = inputs;\n const { strides, pad: pad3, filterShape } = attrs;\n assertNotComplex([x, dy], \"conv3dBackpropFilterV2\");\n const xStrides = util_exports.computeStrides(x.shape);\n const dyStrides = util_exports.computeStrides(dy.shape);\n const convInfo = backend_util_exports.computeConv3DInfo(x.shape, filterShape, strides, 1, pad3);\n const strideDepth = convInfo.strideDepth;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const filterDepth = convInfo.filterDepth;\n const filterHeight = convInfo.filterHeight;\n const filterWidth = convInfo.filterWidth;\n const dw = new TensorBuffer(convInfo.filterShape, \"float32\");\n const dwValues = dw.values;\n const [dwS0, dwS1, dwS2, dwS3] = dw.strides;\n const dyValues = backend2.data.get(dy.dataId).values;\n const [dyS0, dyS1, dyS2, dyS3] = dyStrides;\n const xValues = backend2.data.get(x.dataId).values;\n const [xS0, xS1, xS2, xS3] = xStrides;\n const frontPad = convInfo.padInfo.front;\n const leftPad = convInfo.padInfo.left;\n const topPad = convInfo.padInfo.top;\n for (let wF = 0; wF < filterDepth; ++wF) {\n const yFMin = Math.max(0, Math.ceil((frontPad - wF) / strideDepth));\n const yFMax = Math.min(convInfo.outDepth, (convInfo.inDepth + frontPad - wF) / strideDepth);\n const wOffset1 = wF * dwS0;\n for (let wR = 0; wR < filterHeight; ++wR) {\n const yRMin = Math.max(0, Math.ceil((topPad - wR) / strideHeight));\n const yRMax = Math.min(convInfo.outHeight, (convInfo.inHeight + topPad - wR) / strideHeight);\n const wOffset2 = wR * dwS1 + wOffset1;\n for (let wC = 0; wC < filterWidth; ++wC) {\n const yCMin = Math.max(0, Math.ceil((leftPad - wC) / strideWidth));\n const yCMax = Math.min(convInfo.outWidth, (convInfo.inWidth + leftPad - wC) / strideWidth);\n const wOffset3 = wC * dwS2 + wOffset2;\n for (let d1 = 0; d1 < convInfo.inChannels; ++d1) {\n const wOffset4 = d1 * dwS3 + wOffset3;\n for (let d2 = 0; d2 < convInfo.outChannels; ++d2) {\n let dotProd = 0;\n for (let b = 0; b < convInfo.batchSize; ++b) {\n const xOffset1 = b * xS0;\n const yOffset1 = b * dyS0;\n for (let yF = yFMin; yF < yFMax; ++yF) {\n const xF = wF + yF * strideDepth - frontPad;\n const xOffset2 = xF * xS1 + xOffset1;\n const yOffset2 = yF * dyS1 + yOffset1;\n for (let yR = yRMin; yR < yRMax; ++yR) {\n const xR = wR + yR * strideHeight - topPad;\n const xOffset3 = xR * xS2 + xOffset2;\n const yOffset3 = yR * dyS2 + yOffset2;\n for (let yC = yCMin; yC < yCMax; ++yC) {\n const xC = wC + yC * strideWidth - leftPad;\n const xOffset4 = xC * xS3 + xOffset3;\n const yOffset4 = yC * dyS3 + yOffset3;\n dotProd += xValues[xOffset4 + d1] * dyValues[yOffset4 + d2];\n }\n }\n }\n }\n dwValues[wOffset4 + d2] = dotProd;\n }\n }\n }\n }\n }\n return backend2.makeTensorInfo(dw.shape, dw.dtype, dw.values);\n}\nvar conv3DBackpropFilterV2Config = {\n kernelName: Conv3DBackpropFilterV2,\n backendName: \"cpu\",\n kernelFunc: conv3DBackpropFilterV2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Conv3DBackpropInputV2.js\nfunction conv3DBackpropInputV2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { dy, filter } = inputs;\n const { pad: pad3, strides, inputShape } = attrs;\n assertNotComplex([dy], \"conv3dBackpropInputV2\");\n const dyStrides = util_exports.computeStrides(dy.shape);\n const filterStrides = util_exports.computeStrides(filter.shape);\n const convInfo = backend_util_exports.computeConv3DInfo(inputShape, filter.shape, strides, 1, pad3);\n const dx = new TensorBuffer(convInfo.inShape, \"float32\");\n const dxValues = dx.values;\n const [dxS0, dxS1, dxS2, dxS3] = dx.strides;\n const dyValues = backend2.data.get(dy.dataId).values;\n const [dyS0, dyS1, dyS2, dyS3] = dyStrides;\n const fltValues = backend2.data.get(filter.dataId).values;\n const [fltS0, fltS1, fltS2, fltS3] = filterStrides;\n const { batchSize, filterDepth, filterHeight, filterWidth, inChannels, inDepth, inHeight, inWidth, outChannels, outDepth, outHeight, outWidth, strideDepth, strideHeight, strideWidth } = convInfo;\n const frontPad = filterDepth - 1 - convInfo.padInfo.front;\n const topPad = filterHeight - 1 - convInfo.padInfo.top;\n const leftPad = filterWidth - 1 - convInfo.padInfo.left;\n for (let b = 0; b < batchSize; ++b) {\n for (let d1 = 0; d1 < inChannels; ++d1) {\n for (let xF = 0; xF < inDepth; ++xF) {\n const xFCorner = xF - frontPad;\n const xFMin = Math.max(0, Math.ceil(xFCorner / strideDepth));\n const yFMax = Math.min(outDepth, (filterDepth + xFCorner) / strideDepth);\n for (let xR = 0; xR < inHeight; ++xR) {\n const xRCorner = xR - topPad;\n const xRMin = Math.max(0, Math.ceil(xRCorner / strideHeight));\n const yRMax = Math.min(outHeight, (filterHeight + xRCorner) / strideHeight);\n for (let xC = 0; xC < inWidth; ++xC) {\n const xCCorner = xC - leftPad;\n const xCMin = Math.max(0, Math.ceil(xCCorner / strideWidth));\n const yCMax = Math.min(outWidth, (filterWidth + xCCorner) / strideWidth);\n let dotProd = 0;\n for (let yF = xFMin; yF < yFMax; ++yF) {\n const wF = yF * strideDepth - xFCorner;\n for (let yR = xRMin; yR < yRMax; ++yR) {\n const wR = yR * strideHeight - xRCorner;\n for (let yC = xCMin; yC < yCMax; ++yC) {\n const wC = yC * strideWidth - xCCorner;\n const dyOffset = dyS0 * b + dyS1 * yF + dyS2 * yR + dyS3 * yC;\n const fltOffset = fltS0 * (filterDepth - 1 - wF) + fltS1 * (filterHeight - 1 - wR) + fltS2 * (filterWidth - 1 - wC) + fltS3 * d1;\n for (let d2 = 0; d2 < outChannels; ++d2) {\n const pixel = dyValues[dyOffset + d2];\n const weight = fltValues[fltOffset + d2];\n dotProd += pixel * weight;\n }\n }\n }\n }\n dxValues[dxS0 * b + dxS1 * xF + dxS2 * xR + dxS3 * xC + d1] = dotProd;\n }\n }\n }\n }\n }\n return backend2.makeTensorInfo(dx.shape, dx.dtype, dx.values);\n}\nvar conv3DBackpropInputV2Config = {\n kernelName: Conv3DBackpropInputV2,\n backendName: \"cpu\",\n kernelFunc: conv3DBackpropInputV2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Cos.js\nvar cos2 = unaryKernelFunc(Cos, (xi) => Math.cos(xi));\nvar cosConfig = {\n kernelName: Cos,\n backendName: \"cpu\",\n kernelFunc: cos2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Cosh.js\nvar cosh2 = unaryKernelFunc(Cosh, (xi) => Math.cosh(xi));\nvar coshConfig = {\n kernelName: Cosh,\n backendName: \"cpu\",\n kernelFunc: cosh2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/CropAndResize.js\nfunction cropAndResize2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { image: image2, boxes, boxInd } = inputs;\n const { cropSize, method, extrapolationValue } = attrs;\n const [batch, imageHeight, imageWidth, numChannels] = image2.shape;\n const numBoxes = boxes.shape[0];\n const [cropHeight, cropWidth] = cropSize;\n const output = buffer([numBoxes, cropHeight, cropWidth, numChannels], \"float32\");\n const boxVals = backend2.data.get(boxes.dataId).values;\n const boxIndVals = backend2.data.get(boxInd.dataId).values;\n const imageVals = backend2.data.get(image2.dataId).values;\n const inStride = util_exports.computeStrides(image2.shape);\n const outStride = util_exports.computeStrides(output.shape);\n for (let b = 0; b < numBoxes; b++) {\n const startInd = b * 4;\n const y1 = boxVals[startInd];\n const x1 = boxVals[startInd + 1];\n const y2 = boxVals[startInd + 2];\n const x2 = boxVals[startInd + 3];\n const bInd = boxIndVals[b];\n if (bInd >= batch) {\n continue;\n }\n const heightScale = cropHeight > 1 ? (y2 - y1) * (imageHeight - 1) / (cropHeight - 1) : 0;\n const widthScale = cropWidth > 1 ? (x2 - x1) * (imageWidth - 1) / (cropWidth - 1) : 0;\n for (let y = 0; y < cropHeight; y++) {\n const yInd = cropHeight > 1 ? y1 * (imageHeight - 1) + y * heightScale : 0.5 * (y1 + y2) * (imageHeight - 1);\n if (yInd < 0 || yInd > imageHeight - 1) {\n for (let x = 0; x < cropWidth; x++) {\n for (let c = 0; c < numChannels; c++) {\n const ind = c + x * outStride[2] + y * outStride[1] + b * outStride[0];\n output.values[ind] = extrapolationValue;\n }\n }\n continue;\n }\n if (method === \"bilinear\") {\n const topInd = Math.floor(yInd);\n const bottomInd = Math.ceil(yInd);\n const yLerp = yInd - topInd;\n for (let x = 0; x < cropWidth; x++) {\n const xInd = cropWidth > 1 ? x1 * (imageWidth - 1) + x * widthScale : 0.5 * (x1 + x2) * (imageWidth - 1);\n if (xInd < 0 || xInd > imageWidth - 1) {\n for (let c = 0; c < numChannels; c++) {\n const ind = c + x * outStride[2] + y * outStride[1] + b * outStride[0];\n output.values[ind] = extrapolationValue;\n }\n continue;\n }\n const leftInd = Math.floor(xInd);\n const rightInd = Math.ceil(xInd);\n const xLerp = xInd - leftInd;\n for (let c = 0; c < numChannels; c++) {\n let ind = c + leftInd * inStride[2] + topInd * inStride[1] + bInd * inStride[0];\n const topLeft = imageVals[ind];\n ind = c + rightInd * inStride[2] + topInd * inStride[1] + bInd * inStride[0];\n const topRight = imageVals[ind];\n ind = c + leftInd * inStride[2] + bottomInd * inStride[1] + bInd * inStride[0];\n const bottomLeft = imageVals[ind];\n ind = c + rightInd * inStride[2] + bottomInd * inStride[1] + bInd * inStride[0];\n const bottomRight = imageVals[ind];\n const top = topLeft + (topRight - topLeft) * xLerp;\n const bottom = bottomLeft + (bottomRight - bottomLeft) * xLerp;\n ind = c + x * outStride[2] + y * outStride[1] + b * outStride[0];\n output.values[ind] = top + (bottom - top) * yLerp;\n }\n }\n } else {\n for (let x = 0; x < cropWidth; ++x) {\n const xInd = cropWidth > 1 ? x1 * (imageWidth - 1) + x * widthScale : 0.5 * (x1 + x2) * (imageWidth - 1);\n if (xInd < 0 || xInd > imageWidth - 1) {\n for (let c = 0; c < numChannels; c++) {\n const ind = c + x * outStride[2] + y * outStride[1] + b * outStride[0];\n output.values[ind] = extrapolationValue;\n }\n continue;\n }\n const closestX = Math.round(xInd);\n const closestY = Math.round(yInd);\n for (let c = 0; c < numChannels; c++) {\n const inInd = c + closestX * inStride[2] + closestY * inStride[1] + bInd * inStride[0];\n const outInd = c + x * outStride[2] + y * outStride[1] + b * outStride[0];\n output.values[outInd] = imageVals[inInd];\n }\n }\n }\n }\n }\n return backend2.makeTensorInfo(output.shape, output.dtype, output.values);\n}\nvar cropAndResizeConfig = {\n kernelName: CropAndResize,\n backendName: \"cpu\",\n kernelFunc: cropAndResize2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Cumprod.js\nfunction cumprod2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis, exclusive, reverse: reverse5 } = attrs;\n assertNotComplex(x, \"cumprod\");\n const permutation = backend_util_exports.getAxesPermutation([axis], x.shape.length);\n let $x = x;\n if (permutation != null) {\n $x = transpose2({ inputs: { x }, backend: backend2, attrs: { perm: permutation } });\n }\n const permutedAxis = backend_util_exports.getInnerMostAxes(1, x.shape.length)[0];\n if (permutedAxis !== $x.shape.length - 1) {\n throw new Error(`backend.cumprod in CPU expects an inner-most axis=${$x.shape.length - 1} but got axis=${permutedAxis}`);\n }\n const resultDtype = upcastType($x.dtype, \"int32\");\n const vals = util_exports.makeOnesTypedArray(util_exports.sizeFromShape($x.shape), resultDtype);\n const aVals = backend2.data.get($x.dataId).values;\n const finalDim = $x.shape[$x.shape.length - 1];\n const indexAdjuster = reverse5 ? (i, j) => i + finalDim - j - 1 : (i, j) => i + j;\n for (let i = 0; i < aVals.length; i += finalDim) {\n for (let j = 0; j < finalDim; j++) {\n const idx = indexAdjuster(i, j);\n if (j === 0) {\n vals[idx] = exclusive ? 1 : aVals[idx];\n } else {\n const prevIdx = indexAdjuster(i, j - 1);\n vals[idx] = exclusive ? aVals[prevIdx] * vals[prevIdx] : aVals[idx] * vals[prevIdx];\n }\n }\n }\n const result = backend2.makeTensorInfo($x.shape, resultDtype, vals);\n if (permutation != null) {\n const reversePermutation = backend_util_exports.getUndoAxesPermutation(permutation);\n const reverseTransposedResult = transpose2({ inputs: { x: result }, backend: backend2, attrs: { perm: reversePermutation } });\n backend2.disposeIntermediateTensorInfo(result);\n backend2.disposeIntermediateTensorInfo($x);\n return reverseTransposedResult;\n }\n return result;\n}\nvar cumprodConfig = {\n kernelName: Cumprod,\n backendName: \"cpu\",\n kernelFunc: cumprod2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Cumsum.js\nfunction cumsum2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis, exclusive, reverse: reverse5 } = attrs;\n assertNotComplex(x, \"cumsum\");\n const permutation = backend_util_exports.getAxesPermutation([axis], x.shape.length);\n let $x = x;\n if (permutation != null) {\n $x = transpose2({ inputs: { x }, backend: backend2, attrs: { perm: permutation } });\n }\n const permutedAxis = backend_util_exports.getInnerMostAxes(1, x.shape.length)[0];\n if (permutedAxis !== $x.shape.length - 1) {\n throw new Error(`backend.cumsum in CPU expects an inner-most axis=${$x.shape.length - 1} but got axis=${permutedAxis}`);\n }\n const resultDtype = upcastType($x.dtype, \"int32\");\n const vals = util_exports.makeZerosTypedArray(util_exports.sizeFromShape($x.shape), resultDtype);\n const aVals = backend2.data.get($x.dataId).values;\n const finalDim = $x.shape[$x.shape.length - 1];\n const indexAdjuster = reverse5 ? (i, j) => i + finalDim - j - 1 : (i, j) => i + j;\n for (let i = 0; i < aVals.length; i += finalDim) {\n for (let j = 0; j < finalDim; j++) {\n const idx = indexAdjuster(i, j);\n if (j === 0) {\n vals[idx] = exclusive ? 0 : aVals[idx];\n } else {\n const prevIdx = indexAdjuster(i, j - 1);\n vals[idx] = exclusive ? aVals[prevIdx] + vals[prevIdx] : aVals[idx] + vals[prevIdx];\n }\n }\n }\n const result = backend2.makeTensorInfo($x.shape, resultDtype, vals);\n if (permutation != null) {\n const reversePermutation = backend_util_exports.getUndoAxesPermutation(permutation);\n const reverseTransposedResult = transpose2({ inputs: { x: result }, backend: backend2, attrs: { perm: reversePermutation } });\n backend2.disposeIntermediateTensorInfo(result);\n backend2.disposeIntermediateTensorInfo($x);\n return reverseTransposedResult;\n }\n return result;\n}\nvar cumsumConfig = {\n kernelName: Cumsum,\n backendName: \"cpu\",\n kernelFunc: cumsum2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/DenseBincount.js\nfunction denseBincount2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, weights } = inputs;\n const { size, binaryOutput } = attrs;\n if (x.shape.length === 1) {\n const xVals = backend2.data.get(x.dataId).values;\n const weightsVals = backend2.data.get(weights.dataId).values;\n const outVals = bincountImpl(xVals, weightsVals, weights.dtype, weights.shape, size);\n return backend2.makeTensorInfo([size], weights.dtype, outVals);\n } else if (x.shape.length === 2) {\n const xBuf = backend2.bufferSync(x);\n const weightsBuf = backend2.bufferSync(weights);\n const outBuf = bincountReduceImpl(xBuf, weightsBuf, size, binaryOutput);\n return backend2.makeTensorInfo(outBuf.shape, weights.dtype, outBuf.values);\n }\n throw new Error(`Error in denseBincount: input must be at most rank 2, but got rank${x.shape.length}.`);\n}\nvar denseBincountConfig = {\n kernelName: DenseBincount,\n backendName: \"cpu\",\n kernelFunc: denseBincount2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/DepthToSpace.js\nfunction depthToSpace2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { blockSize, dataFormat } = attrs;\n util_exports.assert(dataFormat === \"NHWC\", () => `Only NHWC dataFormat supported on CPU for depthToSpace. Got ${dataFormat}`);\n const batchSize = x.shape[0];\n const inputHeight = x.shape[1];\n const inputWidth = x.shape[2];\n const inputDepth = x.shape[3];\n const outputHeight = inputHeight * blockSize;\n const outputWidth = inputWidth * blockSize;\n const outputDepth = inputDepth / (blockSize * blockSize);\n const xValues = backend2.data.get(x.dataId).values;\n const result = new Float32Array(batchSize * outputHeight * outputWidth * outputDepth);\n let outputIdx = 0;\n for (let b = 0; b < batchSize; ++b) {\n for (let h = 0; h < outputHeight; ++h) {\n const inH = Math.floor(h / blockSize);\n const offsetH = h % blockSize;\n for (let w = 0; w < outputWidth; ++w) {\n const inW = Math.floor(w / blockSize);\n const offsetW = w % blockSize;\n const offsetD = (offsetH * blockSize + offsetW) * outputDepth;\n for (let d = 0; d < outputDepth; ++d) {\n const inD = d + offsetD;\n const inputIdx = inD + inputDepth * (inW + inputWidth * (inH + inputHeight * b));\n result[outputIdx++] = xValues[inputIdx];\n }\n }\n }\n }\n return backend2.makeTensorInfo([batchSize, outputHeight, outputWidth, outputDepth], x.dtype, result);\n}\nvar depthToSpaceConfig = {\n kernelName: DepthToSpace,\n backendName: \"cpu\",\n kernelFunc: depthToSpace2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/DepthwiseConv2dNative.js\nfunction depthwiseConv2dNative(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, filter } = inputs;\n const { strides, pad: pad3, dilations, dimRoundingMode } = attrs;\n assertNotComplex([x, filter], \"depthwiseConv2DNative\");\n const xStrides = util_exports.computeStrides(x.shape);\n const filterStrides = util_exports.computeStrides(filter.shape);\n let $dilations = dilations;\n if ($dilations == null) {\n $dilations = [1, 1];\n }\n util_exports.assert(backend_util_exports.eitherStridesOrDilationsAreOne(strides, $dilations), () => `Error in depthwiseConv2d: Either strides or dilations must be 1. Got strides ${strides} and dilations '${$dilations}'`);\n const convInfo = backend_util_exports.computeConv2DInfo(x.shape, filter.shape, strides, $dilations, pad3, dimRoundingMode, true);\n const { filterHeight, filterWidth, dilationHeight, dilationWidth, padInfo } = convInfo;\n const padLeft = padInfo.left;\n const padTop = padInfo.top;\n const chMul = convInfo.outChannels / convInfo.inChannels;\n const y = new TensorBuffer(convInfo.outShape, x.dtype);\n const xVals = backend2.data.get(x.dataId).values;\n const wVals = backend2.data.get(filter.dataId).values;\n const yVals = y.values;\n for (let b = 0; b < convInfo.batchSize; ++b) {\n const xOffset1 = b * xStrides[0];\n const yOffset1 = b * y.strides[0];\n for (let yR = 0; yR < convInfo.outHeight; ++yR) {\n const yOffset2 = yOffset1 + yR * y.strides[1];\n const xRCorner = yR * convInfo.strideHeight - padTop;\n for (let wR = 0; wR < filterHeight; ++wR) {\n const xR = xRCorner + wR * dilationHeight;\n if (xR < 0 || xR >= convInfo.inHeight) {\n continue;\n }\n const wOffset1 = wR * filterStrides[0];\n const xOffset2 = xOffset1 + xR * xStrides[1];\n for (let yC = 0; yC < convInfo.outWidth; ++yC) {\n const yOffset3 = yOffset2 + yC * y.strides[2];\n const xCCorner = yC * convInfo.strideWidth - padLeft;\n for (let wC = 0; wC < filterWidth; ++wC) {\n const xC = xCCorner + wC * dilationWidth;\n if (xC < 0 || xC >= convInfo.inWidth) {\n continue;\n }\n const wOffset2 = wOffset1 + wC * filterStrides[1];\n const xOffset3 = xOffset2 + xC * convInfo.inChannels;\n let yOffset4 = yOffset3;\n let wOffset3 = wOffset2;\n for (let d1 = 0; d1 < convInfo.inChannels; ++d1) {\n const xVal = xVals[xOffset3 + d1];\n for (let q = 0; q < chMul; ++q) {\n yVals[yOffset4 + q] += xVal * wVals[wOffset3 + q];\n }\n yOffset4 += chMul;\n wOffset3 += chMul;\n }\n }\n }\n }\n }\n }\n return backend2.makeTensorInfo(y.shape, y.dtype, y.values);\n}\nvar depthwiseConv2dNativeConfig = {\n kernelName: DepthwiseConv2dNative,\n backendName: \"cpu\",\n kernelFunc: depthwiseConv2dNative\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/DepthwiseConv2dNativeBackpropFilter.js\nfunction depthwiseConv2dNativeBackpropFilter2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, dy } = inputs;\n const { strides, dilations, pad: pad3, dimRoundingMode, filterShape } = attrs;\n assertNotComplex([x, dy], \"depthwiseConv2dNativeBackpropFilter\");\n const convInfo = backend_util_exports.computeConv2DInfo(x.shape, filterShape, strides, dilations, pad3, dimRoundingMode, true);\n const { strideHeight, strideWidth, filterHeight, filterWidth } = convInfo;\n const dW = new TensorBuffer(convInfo.filterShape, \"float32\");\n const leftPad = convInfo.padInfo.left;\n const topPad = convInfo.padInfo.top;\n const chMul = convInfo.outChannels / convInfo.inChannels;\n const xVals = backend2.data.get(x.dataId).values;\n const xBuf = new TensorBuffer(x.shape, x.dtype, xVals);\n const dyVals = backend2.data.get(dy.dataId).values;\n const dyBuf = new TensorBuffer(dy.shape, dy.dtype, dyVals);\n for (let wR = 0; wR < filterHeight; ++wR) {\n const yRMin = Math.max(0, Math.ceil((topPad - wR) / strideHeight));\n const yRMax = Math.min(convInfo.outHeight, (convInfo.inHeight + topPad - wR) / strideHeight);\n for (let wC = 0; wC < filterWidth; ++wC) {\n const yCMin = Math.max(0, Math.ceil((leftPad - wC) / strideWidth));\n const yCMax = Math.min(convInfo.outWidth, (convInfo.inWidth + leftPad - wC) / strideWidth);\n for (let d2 = 0; d2 < convInfo.outChannels; ++d2) {\n const d1 = Math.trunc(d2 / chMul);\n const dm = d2 % chMul;\n let dotProd = 0;\n for (let b = 0; b < convInfo.batchSize; ++b) {\n for (let yR = yRMin; yR < yRMax; ++yR) {\n const xR = wR + yR * strideHeight - topPad;\n for (let yC = yCMin; yC < yCMax; ++yC) {\n const xC = wC + yC * strideWidth - leftPad;\n dotProd += xBuf.get(b, xR, xC, d1) * dyBuf.get(b, yR, yC, d2);\n }\n }\n }\n dW.set(dotProd, wR, wC, d1, dm);\n }\n }\n }\n return backend2.makeTensorInfo(dW.shape, dW.dtype, dW.values);\n}\nvar depthwiseConv2dNativeBackpropFilterConfig = {\n kernelName: DepthwiseConv2dNativeBackpropFilter,\n backendName: \"cpu\",\n kernelFunc: depthwiseConv2dNativeBackpropFilter2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/DepthwiseConv2dNativeBackpropInput.js\nfunction depthwiseConv2dNativeBackpropInput2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { dy, filter } = inputs;\n const { strides, dilations, pad: pad3, dimRoundingMode, inputShape } = attrs;\n assertNotComplex([dy, filter], \"depthwiseConv2DNativeBackpropInput\");\n const dyStrides = util_exports.computeStrides(dy.shape);\n const filterStrides = util_exports.computeStrides(filter.shape);\n const convInfo = backend_util_exports.computeConv2DInfo(inputShape, filter.shape, strides, dilations, pad3, dimRoundingMode, true);\n const dx = new TensorBuffer(convInfo.inShape, \"float32\");\n const dxValues = dx.values;\n const [dxS0, dxS1, dxS2] = dx.strides;\n const dyValues = backend2.data.get(dy.dataId).values;\n const [dyS0, dyS1, dyS2] = dyStrides;\n const fltValues = backend2.data.get(filter.dataId).values;\n const [fltS0, fltS1, fltS2] = filterStrides;\n const { batchSize, filterHeight, filterWidth, inChannels, inHeight, inWidth, outChannels, outHeight, outWidth, strideHeight, strideWidth } = convInfo;\n const topPad = filterHeight - 1 - convInfo.padInfo.top;\n const leftPad = filterWidth - 1 - convInfo.padInfo.left;\n const chMul = outChannels / inChannels;\n for (let b = 0; b < batchSize; ++b) {\n for (let d1 = 0; d1 < inChannels; ++d1) {\n for (let xR = 0; xR < inHeight; ++xR) {\n const xRCorner = xR - topPad;\n const xRMin = Math.max(0, Math.ceil(xRCorner / strideHeight));\n const yRMax = Math.min(outHeight, (filterHeight + xRCorner) / strideHeight);\n for (let xC = 0; xC < inWidth; ++xC) {\n const xCCorner = xC - leftPad;\n const xCMin = Math.max(0, Math.ceil(xCCorner / strideWidth));\n const yCMax = Math.min(outWidth, (filterWidth + xCCorner) / strideWidth);\n let dotProd = 0;\n for (let yR = xRMin; yR < yRMax; ++yR) {\n const wR = yR * strideHeight - xRCorner;\n for (let yC = xCMin; yC < yCMax; ++yC) {\n const wC = yC * strideWidth - xCCorner;\n const dyOffset = dyS0 * b + dyS1 * yR + dyS2 * yC;\n const fltOffset = fltS0 * (filterHeight - 1 - wR) + fltS1 * (filterWidth - 1 - wC) + fltS2 * d1;\n for (let dm = 0; dm < chMul; ++dm) {\n const d2 = d1 * chMul + dm;\n const pixel = dyValues[dyOffset + d2];\n const weight = fltValues[fltOffset + dm];\n dotProd += pixel * weight;\n }\n }\n }\n dxValues[dxS0 * b + dxS1 * xR + dxS2 * xC + d1] = dotProd;\n }\n }\n }\n }\n return backend2.makeTensorInfo(dx.shape, dx.dtype, dx.values);\n}\nvar depthwiseConv2dNativeBackpropInputConfig = {\n kernelName: DepthwiseConv2dNativeBackpropInput,\n backendName: \"cpu\",\n kernelFunc: depthwiseConv2dNativeBackpropInput2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Diag.js\nfunction diag2(args) {\n const { inputs, backend: backend2 } = args;\n const { x } = inputs;\n const xSize = util_exports.sizeFromShape(x.shape);\n const xVals = backend2.data.get(x.dataId).values;\n const outBuf = buffer([xSize, xSize], x.dtype);\n const vals = outBuf.values;\n for (let i = 0; i < xVals.length; i++) {\n vals[i * xSize + i] = xVals[i];\n }\n const outShape = [...x.shape, ...x.shape];\n return backend2.makeTensorInfo(outShape, outBuf.dtype, outBuf.values);\n}\nvar diagConfig = {\n kernelName: Diag,\n backendName: \"cpu\",\n kernelFunc: diag2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Dilation2D.js\nvar dilation2DConfig = {\n kernelName: Dilation2D,\n backendName: \"cpu\",\n kernelFunc: ({ inputs, backend: backend2, attrs }) => {\n const { x, filter } = inputs;\n const { strides, pad: pad3, dilations } = attrs;\n const cpuBackend = backend2;\n const xVals = cpuBackend.data.get(x.dataId).values;\n const xRank = x.shape.length;\n const filterVals = cpuBackend.data.get(filter.dataId).values;\n const filterRank = filter.shape.length;\n const { batchSize, inHeight, inWidth, inChannels, outHeight, outWidth, padInfo, strideHeight, strideWidth, filterHeight, filterWidth, dilationHeight, dilationWidth, outShape } = backend_util_exports.computeDilation2DInfo(x.shape, filter.shape, strides, pad3, \"NHWC\", dilations);\n const outSize = util_exports.sizeFromShape(outShape);\n const outRank = outShape.length;\n const outputVals = util_exports.getArrayFromDType(x.dtype, outSize);\n for (let b = 0; b < batchSize; ++b) {\n for (let hOut = 0; hOut < outHeight; ++hOut) {\n const hBeg = hOut * strideHeight - padInfo.top;\n for (let wOut = 0; wOut < outWidth; ++wOut) {\n const wBeg = wOut * strideWidth - padInfo.left;\n for (let d = 0; d < inChannels; ++d) {\n let curVal = Number.MIN_SAFE_INTEGER;\n for (let h = 0; h < filterHeight; ++h) {\n const hIn = hBeg + h * dilationHeight;\n if (hIn >= 0 && hIn < inHeight) {\n for (let w = 0; w < filterWidth; ++w) {\n const wIn = wBeg + w * dilationWidth;\n if (wIn >= 0 && wIn < inWidth) {\n const xIndex = util_exports.locToIndex([b, hIn, wIn, d], xRank, util_exports.computeStrides(x.shape));\n const filterIndex = util_exports.locToIndex([h, w, d], filterRank, util_exports.computeStrides(filter.shape));\n const val = xVals[xIndex] + filterVals[filterIndex];\n if (val > curVal) {\n curVal = val;\n }\n }\n }\n }\n }\n const outputIndex = util_exports.locToIndex([b, hOut, wOut, d], outRank, util_exports.computeStrides(outShape));\n outputVals[outputIndex] = curVal;\n }\n }\n }\n }\n const dataId = cpuBackend.write(util_exports.toTypedArray(outputVals, x.dtype), outShape, x.dtype);\n return { dataId, shape: outShape, dtype: x.dtype };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Dilation2DBackpropFilter.js\nvar dilation2DBackpropFilterConfig = {\n kernelName: Dilation2DBackpropFilter,\n backendName: \"cpu\",\n kernelFunc: ({ inputs, backend: backend2, attrs }) => {\n const { x, filter, dy } = inputs;\n const { strides, pad: pad3, dilations } = attrs;\n const cpuBackend = backend2;\n const $x = util_exports.toNestedArray(x.shape, cpuBackend.data.get(x.dataId).values);\n const $filter = util_exports.toNestedArray(filter.shape, cpuBackend.data.get(filter.dataId).values);\n const { batchSize, inHeight, inWidth, inChannels, outHeight, outWidth, padInfo, strideHeight, strideWidth, filterHeight, filterWidth, dilationHeight, dilationWidth, outShape } = backend_util_exports.computeDilation2DInfo(x.shape, filter.shape, strides, pad3, \"NHWC\", dilations);\n util_exports.assert(dy.rank === outShape.length, () => `Error in ${Dilation2DBackpropFilter}, dy must have the same rank as output ${outShape.length}, but got ${dy.rank}`);\n const $dy = util_exports.toNestedArray(outShape, cpuBackend.data.get(dy.dataId).values);\n const gradients = util_exports.makeZerosNestedTypedArray(filter.shape, filter.dtype);\n for (let b = 0; b < batchSize; ++b) {\n for (let hOut = 0; hOut < outHeight; ++hOut) {\n const hBeg = hOut * strideHeight - padInfo.top;\n for (let wOut = 0; wOut < outWidth; ++wOut) {\n const wBeg = wOut * strideWidth - padInfo.left;\n for (let d = 0; d < inChannels; ++d) {\n let curVal = Number.MIN_SAFE_INTEGER;\n let hMax = 0;\n let wMax = 0;\n for (let h = 0; h < filterHeight; ++h) {\n const hIn = hBeg + h * dilationHeight;\n if (hIn >= 0 && hIn < inHeight) {\n for (let w = 0; w < filterWidth; ++w) {\n const wIn = wBeg + w * dilationWidth;\n if (wIn >= 0 && wIn < inWidth) {\n const val = $x[b][hIn][wIn][d] + $filter[h][w][d];\n if (val > curVal) {\n curVal = val;\n hMax = h;\n wMax = w;\n }\n }\n }\n }\n }\n gradients[hMax][wMax][d] += $dy[b][hOut][wOut][d];\n }\n }\n }\n }\n const dataId = cpuBackend.write(util_exports.toTypedArray(gradients, x.dtype), filter.shape, filter.dtype);\n return { dataId, shape: filter.shape, dtype: filter.dtype };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Dilation2DBackpropInput.js\nvar dilation2DBackpropInputConfig = {\n kernelName: Dilation2DBackpropInput,\n backendName: \"cpu\",\n kernelFunc: ({ inputs, backend: backend2, attrs }) => {\n const { x, filter, dy } = inputs;\n const { strides, pad: pad3, dilations } = attrs;\n const cpuBackend = backend2;\n const $x = util_exports.toNestedArray(x.shape, cpuBackend.data.get(x.dataId).values);\n const $filter = util_exports.toNestedArray(filter.shape, cpuBackend.data.get(filter.dataId).values);\n const { batchSize, inHeight, inWidth, inChannels, outHeight, outWidth, padInfo, strideHeight, strideWidth, filterHeight, filterWidth, dilationHeight, dilationWidth, outShape } = backend_util_exports.computeDilation2DInfo(x.shape, filter.shape, strides, pad3, \"NHWC\", dilations);\n util_exports.assert(dy.rank === outShape.length, () => `Error in ${Dilation2DBackpropInput}, dy must have the same rank as output ${outShape.length}, but got ${dy.rank}`);\n const $dy = util_exports.toNestedArray(outShape, cpuBackend.data.get(dy.dataId).values);\n const gradients = util_exports.makeZerosNestedTypedArray(x.shape, x.dtype);\n for (let b = 0; b < batchSize; ++b) {\n for (let hOut = 0; hOut < outHeight; ++hOut) {\n const hBeg = hOut * strideHeight - padInfo.top;\n for (let wOut = 0; wOut < outWidth; ++wOut) {\n const wBeg = wOut * strideWidth - padInfo.left;\n for (let d = 0; d < inChannels; ++d) {\n let curVal = Number.MIN_SAFE_INTEGER;\n let hInMax = hBeg < 0 ? 0 : hBeg;\n let wInMax = wBeg < 0 ? 0 : wBeg;\n for (let h = 0; h < filterHeight; ++h) {\n const hIn = hBeg + h * dilationHeight;\n if (hIn >= 0 && hIn < inHeight) {\n for (let w = 0; w < filterWidth; ++w) {\n const wIn = wBeg + w * dilationWidth;\n if (wIn >= 0 && wIn < inWidth) {\n const val = $x[b][hIn][wIn][d] + $filter[h][w][d];\n if (val > curVal) {\n curVal = val;\n hInMax = hIn;\n wInMax = wIn;\n }\n }\n }\n }\n }\n gradients[b][hInMax][wInMax][d] += $dy[b][hOut][wOut][d];\n }\n }\n }\n }\n const dataId = cpuBackend.write(util_exports.toTypedArray(gradients, x.dtype), x.shape, x.dtype);\n return { dataId, shape: x.shape, dtype: x.dtype };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Sum.js\nfunction sum3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis, keepDims } = attrs;\n assertNotComplex(x, \"sum\");\n let $x;\n if (x.dtype === \"bool\") {\n $x = cast3({ inputs: { x }, backend: backend2, attrs: { dtype: \"int32\" } });\n } else {\n $x = identity2({ inputs: { x }, backend: backend2 });\n }\n const xRank = $x.shape.length;\n const axes = util_exports.parseAxisParam(axis, $x.shape);\n const permutation = backend_util_exports.getAxesPermutation(axes, xRank);\n let reductionAxes = axes;\n let permutedX = $x;\n if (permutation != null) {\n permutedX = transpose2({ inputs: { x: $x }, backend: backend2, attrs: { perm: permutation } });\n reductionAxes = backend_util_exports.getInnerMostAxes(reductionAxes.length, xRank);\n }\n backend_util_exports.assertAxesAreInnerMostDims(\"sum\", reductionAxes, permutedX.shape.length);\n const [outShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes(permutedX.shape, reductionAxes);\n const resultDtype = backend_util_exports.upcastType(permutedX.dtype, \"int32\");\n let result = zeros3(backend2, outShape, resultDtype);\n const reduceSize = util_exports.sizeFromShape(reduceShape);\n const vals = backend2.data.get(result.dataId).values;\n const aVals = backend2.data.get(permutedX.dataId).values;\n for (let i = 0; i < vals.length; ++i) {\n const offset = i * reduceSize;\n let sum7 = 0;\n for (let j = 0; j < reduceSize; ++j) {\n sum7 += aVals[offset + j];\n }\n vals[i] = sum7;\n }\n if (keepDims) {\n const newShape = backend_util_exports.expandShapeToKeepDim(result.shape, axes);\n const oldResult = result;\n result = reshape3({ inputs: { x: result }, backend: backend2, attrs: { shape: newShape } });\n backend2.disposeIntermediateTensorInfo(oldResult);\n }\n backend2.disposeIntermediateTensorInfo($x);\n if (permutation != null) {\n backend2.disposeIntermediateTensorInfo(permutedX);\n }\n return result;\n}\nvar sumConfig = {\n kernelName: Sum,\n backendName: \"cpu\",\n kernelFunc: sum3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Einsum.js\nfunction einsum2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { equation } = attrs;\n const tensors = inputs;\n const { allDims, summedDims, idDims } = backend_util_exports.decodeEinsumEquation(equation, tensors.length);\n backend_util_exports.checkEinsumDimSizes(allDims.length, idDims, tensors);\n const { path, steps } = backend_util_exports.getEinsumComputePath(summedDims, idDims);\n const nSteps = steps.length;\n let out = null;\n let numDimsRemaining = allDims.length;\n const tensorsToDispose = [];\n for (let i = 0; i < nSteps; ++i) {\n for (const idTerm of steps[i]) {\n const { permutationIndices: perm, expandDims: dimsToExpand } = backend_util_exports.getEinsumPermutation(numDimsRemaining, idDims[idTerm]);\n let x;\n if (backend_util_exports.isIdentityPermutation(perm)) {\n x = tensors[idTerm];\n } else {\n x = transpose2({ inputs: { x: tensors[idTerm] }, backend: backend2, attrs: { perm } });\n tensorsToDispose.push(x);\n }\n const targetShape = x.shape.slice();\n for (let k = 0; k < dimsToExpand.length; ++k) {\n targetShape.splice(dimsToExpand[k], 0, 1);\n }\n if (!util_exports.arraysEqual(x.shape, targetShape)) {\n x = reshape3({ inputs: { x }, backend: backend2, attrs: { shape: targetShape } });\n tensorsToDispose.push(x);\n }\n if (out === null) {\n out = x;\n } else {\n out = multiply2({ inputs: { a: x, b: out }, backend: backend2 });\n tensorsToDispose.push(out);\n }\n }\n if (i < nSteps - 1) {\n if (path[i] >= 0) {\n out = sum3({\n inputs: { x: out },\n backend: backend2,\n attrs: {\n axis: path[i] - (allDims.length - numDimsRemaining),\n keepDims: false\n }\n });\n tensorsToDispose.push(out);\n }\n numDimsRemaining--;\n }\n }\n for (const tensorInfo of tensorsToDispose) {\n if (tensorInfo === out) {\n continue;\n }\n backend2.disposeIntermediateTensorInfo(tensorInfo);\n }\n return out;\n}\nvar einsumConfig = {\n kernelName: Einsum,\n backendName: \"cpu\",\n kernelFunc: einsum2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/EluGrad.js\nfunction eluGrad(args) {\n const { inputs, backend: backend2 } = args;\n const { dy, y } = inputs;\n assertNotComplex([dy, y], \"eluGrad\");\n const resultValues = new Float32Array(util_exports.sizeFromShape(y.shape));\n const values = backend2.data.get(y.dataId).values;\n const dyValues = backend2.data.get(dy.dataId).values;\n for (let i = 0; i < values.length; ++i) {\n const v = values[i];\n if (v >= 1) {\n resultValues[i] = dyValues[i];\n } else {\n resultValues[i] = dyValues[i] * (v + 1);\n }\n }\n return backend2.makeTensorInfo(y.shape, \"float32\", resultValues);\n}\nvar eluGradConfig2 = {\n kernelName: EluGrad,\n backendName: \"cpu\",\n kernelFunc: eluGrad\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Erf.js\nvar p = backend_util_exports.ERF_P;\nvar a1 = backend_util_exports.ERF_A1;\nvar a2 = backend_util_exports.ERF_A2;\nvar a3 = backend_util_exports.ERF_A3;\nvar a4 = backend_util_exports.ERF_A4;\nvar a5 = backend_util_exports.ERF_A5;\nvar erf2 = unaryKernelFunc(Erf, (xi) => {\n const sign4 = Math.sign(xi);\n const v = Math.abs(xi);\n const t = 1 / (1 + p * v);\n return sign4 * (1 - ((((a5 * t + a4) * t + a3) * t + a2) * t + a1) * t * Math.exp(-v * v));\n});\nvar erfConfig = {\n kernelName: Erf,\n backendName: \"cpu\",\n kernelFunc: erf2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ExpandDims.js\nfunction expandDims3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { input: input2 } = inputs;\n const { dim } = attrs;\n const inputRank = input2.shape.length;\n const newShape = input2.shape.slice();\n let $dim = dim;\n if (dim < 0) {\n util_exports.assert(-(inputRank + 1) <= dim, () => `Axis must be in the interval [${-(inputRank + 1)}, ${inputRank}]`);\n $dim = inputRank + dim + 1;\n }\n newShape.splice($dim, 0, 1);\n return reshape3({ inputs: { x: input2 }, backend: backend2, attrs: { shape: newShape } });\n}\nvar expandDimsConfig = {\n kernelName: ExpandDims,\n backendName: \"cpu\",\n kernelFunc: expandDims3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/RealDiv.js\nvar realDivImpl = createSimpleBinaryKernelImpl((a, b) => a / b);\nvar div2 = binaryKernelFunc(RealDiv, realDivImpl);\nvar realDivConfig = {\n kernelName: RealDiv,\n backendName: \"cpu\",\n kernelFunc: div2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/utils/fft_utils.js\nfunction fftBatch(input2, inverse, cpuBackend) {\n const inputShape = input2.shape;\n const batch = inputShape[0];\n const innerDim = inputShape[1];\n const inputVals = cpuBackend.data.get(input2.dataId);\n const real2D = inputVals.complexTensorInfos.real;\n const imag2D = inputVals.complexTensorInfos.imag;\n const resultShape = [batch, innerDim];\n const resultSize = util_exports.sizeFromShape(resultShape);\n const resultReal = util_exports.getTypedArrayFromDType(\"float32\", resultSize);\n const resultImag = util_exports.getTypedArrayFromDType(\"float32\", resultSize);\n for (let b = 0; b < batch; b++) {\n const r = slice2({\n inputs: { x: real2D },\n backend: cpuBackend,\n attrs: { begin: [b, 0], size: [1, innerDim] }\n });\n const i = slice2({\n inputs: { x: imag2D },\n backend: cpuBackend,\n attrs: { begin: [b, 0], size: [1, innerDim] }\n });\n const input3 = complex2({ inputs: { real: r, imag: i }, backend: cpuBackend });\n const { real: real5, imag: imag5 } = fftImpl(input3, inverse, cpuBackend);\n const res = backend_util_exports.mergeRealAndImagArrays(real5, imag5);\n for (let d = 0; d < innerDim; d++) {\n const c = backend_util_exports.getComplexWithIndex(res, d);\n resultReal[b * innerDim + d] = c.real;\n resultImag[b * innerDim + d] = c.imag;\n }\n cpuBackend.disposeIntermediateTensorInfo(r);\n cpuBackend.disposeIntermediateTensorInfo(i);\n cpuBackend.disposeIntermediateTensorInfo(input3);\n }\n const $realInfo = cpuBackend.makeTensorInfo(resultShape, \"float32\", resultReal);\n const $imagInfo = cpuBackend.makeTensorInfo(resultShape, \"float32\", resultImag);\n const result = complex2({ inputs: { real: $realInfo, imag: $imagInfo }, backend: cpuBackend });\n cpuBackend.disposeIntermediateTensorInfo($realInfo);\n cpuBackend.disposeIntermediateTensorInfo($imagInfo);\n return result;\n}\nfunction fftImpl(input2, inverse, cpuBackend) {\n const inputSize = util_exports.sizeFromShape(input2.shape);\n const inputVals = cpuBackend.data.get(input2.dataId);\n const realVals = cpuBackend.data.get(inputVals.complexTensorInfos.real.dataId).values;\n const imagVals = cpuBackend.data.get(inputVals.complexTensorInfos.imag.dataId).values;\n if (isExponentOf2(inputSize)) {\n const result = fftRadix2(realVals, imagVals, inputSize, inverse, cpuBackend);\n const resultShape = [input2.shape[0], input2.shape[1]];\n if (inverse) {\n const realInfo = cpuBackend.makeTensorInfo(resultShape, \"float32\", result.real);\n const imagInfo = cpuBackend.makeTensorInfo(resultShape, \"float32\", result.imag);\n const sizeInfo = cpuBackend.makeTensorInfo([], \"float32\", util_exports.createScalarValue(inputSize, \"float32\"));\n const sizeInfoCopy = identity2({ inputs: { x: sizeInfo }, backend: cpuBackend });\n const divRealInfo = realDivConfig.kernelFunc({ inputs: { a: realInfo, b: sizeInfo }, backend: cpuBackend });\n const divImagInfo = realDivConfig.kernelFunc({ inputs: { a: imagInfo, b: sizeInfoCopy }, backend: cpuBackend });\n const divRealVals = cpuBackend.data.get(divRealInfo.dataId).values;\n const divImagVals = cpuBackend.data.get(divImagInfo.dataId).values;\n cpuBackend.disposeIntermediateTensorInfo(realInfo);\n cpuBackend.disposeIntermediateTensorInfo(imagInfo);\n cpuBackend.disposeIntermediateTensorInfo(sizeInfo);\n cpuBackend.disposeIntermediateTensorInfo(sizeInfoCopy);\n cpuBackend.disposeIntermediateTensorInfo(divRealInfo);\n cpuBackend.disposeIntermediateTensorInfo(divImagInfo);\n return { real: divRealVals, imag: divImagVals };\n }\n return result;\n } else {\n const data = backend_util_exports.mergeRealAndImagArrays(realVals, imagVals);\n const rawOutput = fourierTransformByMatmul(data, inputSize, inverse);\n return backend_util_exports.splitRealAndImagArrays(rawOutput);\n }\n}\nfunction isExponentOf2(size) {\n return (size & size - 1) === 0;\n}\nfunction fftRadix2(realVals, imagVals, size, inverse, cpuBackend) {\n if (size === 1) {\n return { real: realVals, imag: imagVals };\n }\n const data = backend_util_exports.mergeRealAndImagArrays(realVals, imagVals);\n const half = size / 2;\n const evenComplex = backend_util_exports.complexWithEvenIndex(data);\n const evenRealVals = evenComplex.real;\n const evenImagVals = evenComplex.imag;\n const evenShape = [evenRealVals.length];\n const evenRealInfo = cpuBackend.makeTensorInfo(evenShape, \"float32\", evenRealVals);\n const evenImagInfo = cpuBackend.makeTensorInfo(evenShape, \"float32\", evenImagVals);\n const evenTensorInfo = complex2({ inputs: { real: evenRealInfo, imag: evenImagInfo }, backend: cpuBackend });\n const oddComplex = backend_util_exports.complexWithOddIndex(data);\n const oddRealVals = oddComplex.real;\n const oddImagVals = oddComplex.imag;\n const oddShape = [oddRealVals.length];\n const oddRealInfo = cpuBackend.makeTensorInfo(oddShape, \"float32\", oddRealVals);\n const oddImagInfo = cpuBackend.makeTensorInfo(oddShape, \"float32\", oddImagVals);\n const oddTensorInfo = complex2({ inputs: { real: oddRealInfo, imag: oddImagInfo }, backend: cpuBackend });\n const $evenComplex = fftRadix2(evenRealVals, evenImagVals, half, inverse, cpuBackend);\n const $evenRealVals = $evenComplex.real;\n const $evenImagVals = $evenComplex.imag;\n const $evenShape = [$evenRealVals.length];\n const $evenRealInfo = cpuBackend.makeTensorInfo($evenShape, \"float32\", $evenRealVals);\n const $evenImagInfo = cpuBackend.makeTensorInfo($evenShape, \"float32\", $evenImagVals);\n const $evenTensorInfo = complex2({\n inputs: { real: $evenRealInfo, imag: $evenImagInfo },\n backend: cpuBackend\n });\n const $oddComplex = fftRadix2(oddRealVals, oddImagVals, half, inverse, cpuBackend);\n const $oddRealVals = $oddComplex.real;\n const $oddImagVals = $oddComplex.imag;\n const $oddShape = [$oddRealVals.length];\n const $oddRealInfo = cpuBackend.makeTensorInfo($oddShape, \"float32\", $oddRealVals);\n const $oddImagInfo = cpuBackend.makeTensorInfo($oddShape, \"float32\", $oddImagVals);\n const $oddTensorInfo = complex2({ inputs: { real: $oddRealInfo, imag: $oddImagInfo }, backend: cpuBackend });\n const e = backend_util_exports.exponents(size, inverse);\n const eShape = [e.real.length];\n const eRealInfo = cpuBackend.makeTensorInfo(eShape, \"float32\", e.real);\n const eImagInfo = cpuBackend.makeTensorInfo(eShape, \"float32\", e.imag);\n const complexInfo = complex2({ inputs: { real: eRealInfo, imag: eImagInfo }, backend: cpuBackend });\n const exponentInfo = multiply2({ inputs: { a: complexInfo, b: $oddTensorInfo }, backend: cpuBackend });\n const addPart = add4({\n inputs: { a: $evenTensorInfo, b: exponentInfo },\n backend: cpuBackend\n });\n const subPart = sub2({\n inputs: { a: $evenTensorInfo, b: exponentInfo },\n backend: cpuBackend\n });\n const addPartReal = real2({ inputs: { input: addPart }, backend: cpuBackend });\n const subPartReal = real2({ inputs: { input: subPart }, backend: cpuBackend });\n const addPartImag = imag2({ inputs: { input: addPart }, backend: cpuBackend });\n const subPartImag = imag2({ inputs: { input: subPart }, backend: cpuBackend });\n const $real = concat2({\n inputs: [addPartReal, subPartReal],\n backend: cpuBackend,\n attrs: { axis: 0 }\n });\n const $imag = concat2({\n inputs: [addPartImag, subPartImag],\n backend: cpuBackend,\n attrs: { axis: 0 }\n });\n const $realVals = cpuBackend.data.get($real.dataId).values;\n const $imagVals = cpuBackend.data.get($imag.dataId).values;\n cpuBackend.disposeIntermediateTensorInfo(evenRealInfo);\n cpuBackend.disposeIntermediateTensorInfo(evenImagInfo);\n cpuBackend.disposeIntermediateTensorInfo(evenTensorInfo);\n cpuBackend.disposeIntermediateTensorInfo(oddRealInfo);\n cpuBackend.disposeIntermediateTensorInfo(oddImagInfo);\n cpuBackend.disposeIntermediateTensorInfo(oddTensorInfo);\n cpuBackend.disposeIntermediateTensorInfo($evenRealInfo);\n cpuBackend.disposeIntermediateTensorInfo($evenImagInfo);\n cpuBackend.disposeIntermediateTensorInfo($evenTensorInfo);\n cpuBackend.disposeIntermediateTensorInfo($oddRealInfo);\n cpuBackend.disposeIntermediateTensorInfo($oddImagInfo);\n cpuBackend.disposeIntermediateTensorInfo($oddTensorInfo);\n cpuBackend.disposeIntermediateTensorInfo(eRealInfo);\n cpuBackend.disposeIntermediateTensorInfo(eImagInfo);\n cpuBackend.disposeIntermediateTensorInfo(complexInfo);\n cpuBackend.disposeIntermediateTensorInfo(exponentInfo);\n cpuBackend.disposeIntermediateTensorInfo(addPart);\n cpuBackend.disposeIntermediateTensorInfo(subPart);\n cpuBackend.disposeIntermediateTensorInfo(addPartReal);\n cpuBackend.disposeIntermediateTensorInfo(addPartImag);\n cpuBackend.disposeIntermediateTensorInfo(subPartReal);\n cpuBackend.disposeIntermediateTensorInfo(subPartImag);\n cpuBackend.disposeIntermediateTensorInfo($real);\n cpuBackend.disposeIntermediateTensorInfo($imag);\n return { real: $realVals, imag: $imagVals };\n}\nfunction fourierTransformByMatmul(data, size, inverse) {\n const ret = new Float32Array(size * 2);\n for (let r = 0; r < size; r++) {\n let real5 = 0;\n let imag5 = 0;\n for (let c = 0; c < size; c++) {\n const e = backend_util_exports.exponent(r * c, size, inverse);\n const term = backend_util_exports.getComplexWithIndex(data, c);\n real5 += term.real * e.real - term.imag * e.imag;\n imag5 += term.real * e.imag + term.imag * e.real;\n }\n if (inverse) {\n real5 /= size;\n imag5 /= size;\n }\n backend_util_exports.assignToTypedArray(ret, real5, imag5, r);\n }\n return ret;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/FFT.js\nfunction fft2(args) {\n const { inputs, backend: backend2 } = args;\n const { input: input2 } = inputs;\n const inputSize = util_exports.sizeFromShape(input2.shape);\n const innerDimensionSize = input2.shape[input2.shape.length - 1];\n const batch = inputSize / innerDimensionSize;\n const input2D = reshape3({\n inputs: { x: input2 },\n backend: backend2,\n attrs: { shape: [batch, innerDimensionSize] }\n });\n const result = fftBatch(input2D, false, backend2);\n const resultReshaped = reshape3({ inputs: { x: result }, backend: backend2, attrs: { shape: input2.shape } });\n backend2.disposeIntermediateTensorInfo(input2D);\n backend2.disposeIntermediateTensorInfo(result);\n return resultReshaped;\n}\nvar fftConfig = {\n kernelName: FFT,\n backendName: \"cpu\",\n kernelFunc: fft2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Fill.js\nfunction fill2(args) {\n const { backend: backend2, attrs } = args;\n const { shape, value, dtype } = attrs;\n const $dtype = dtype || util_exports.inferDtype(value);\n const values = util_exports.getArrayFromDType($dtype, util_exports.sizeFromShape(shape));\n fillValues(values, value, $dtype);\n return backend2.makeTensorInfo(shape, $dtype, values);\n}\nvar fillConfig = {\n kernelName: Fill,\n backendName: \"cpu\",\n kernelFunc: fill2\n};\nfunction fillValues(values, value, dtype) {\n if (dtype === \"string\") {\n values.fill(value);\n } else {\n values.fill(value);\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/FlipLeftRight.js\nvar flipLeftRightConfig = {\n kernelName: FlipLeftRight,\n backendName: \"cpu\",\n kernelFunc: ({ inputs, attrs, backend: backend2 }) => {\n const { image: image2 } = inputs;\n const cpuBackend = backend2;\n const output = util_exports.getTypedArrayFromDType(image2.dtype, util_exports.sizeFromShape(image2.shape));\n const [batch, imageHeight, imageWidth, numChannels] = image2.shape;\n const imageVals = cpuBackend.data.get(image2.dataId).values;\n for (let batchIdx = 0; batchIdx < batch; batchIdx++) {\n const batchOffset = batchIdx * imageWidth * imageHeight * numChannels;\n for (let row = 0; row < imageHeight; row++) {\n const rowOffset = row * (imageWidth * numChannels);\n for (let col = 0; col < imageWidth; col++) {\n const colOffset = col * numChannels;\n for (let channel = 0; channel < numChannels; channel++) {\n const coordX = Math.round(imageWidth - col - 1);\n const outIdx = batchOffset + rowOffset + colOffset + channel;\n let outputValue = imageVals[outIdx];\n if (coordX >= 0 && coordX < imageWidth) {\n const rotatedColOffset = coordX * numChannels;\n const imageIdx = batchOffset + rowOffset + rotatedColOffset + channel;\n outputValue = imageVals[imageIdx];\n }\n output[outIdx] = outputValue;\n }\n }\n }\n }\n const dataId = cpuBackend.write(output, image2.shape, image2.dtype);\n return { dataId, shape: image2.shape, dtype: image2.dtype };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/FloorDiv.js\nvar floorDivImpl = createSimpleBinaryKernelImpl((a, b) => Math.floor(a / b));\nvar floorDiv2 = binaryKernelFunc(FloorDiv, floorDivImpl, null, \"int32\");\nvar floorDivConfig = {\n kernelName: FloorDiv,\n backendName: \"cpu\",\n kernelFunc: floorDiv2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/FusedConv2D.js\nfunction fusedConv2D(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, filter, bias, preluActivationWeights } = inputs;\n const { strides, pad: pad3, dataFormat, dilations, dimRoundingMode, activation: activation2, leakyreluAlpha } = attrs;\n let result = conv2D({\n inputs: { x, filter },\n backend: backend2,\n attrs: { strides, pad: pad3, dataFormat, dilations, dimRoundingMode }\n });\n if (bias) {\n const resultOld = result;\n if (dataFormat === \"NCHW\" && bias.shape.length === 1 && bias.shape[0] !== 1) {\n const reshapedBias = reshape3({ inputs: { x: bias }, backend: backend2, attrs: { shape: [bias.shape[0], 1, 1] } });\n result = add4({ inputs: { a: result, b: reshapedBias }, backend: backend2 });\n backend2.disposeIntermediateTensorInfo(reshapedBias);\n } else {\n result = add4({ inputs: { a: result, b: bias }, backend: backend2 });\n }\n backend2.disposeIntermediateTensorInfo(resultOld);\n }\n if (activation2) {\n const resultOld = result;\n if (dataFormat === \"NCHW\" && activation2 === \"prelu\" && preluActivationWeights.shape.length === 1 && preluActivationWeights.shape[0] !== 1) {\n const reshapedAlpha = reshape3({\n inputs: { x: preluActivationWeights },\n backend: backend2,\n attrs: { shape: [preluActivationWeights.shape[0], 1, 1] }\n });\n result = applyActivation2(backend2, result, activation2, reshapedAlpha, leakyreluAlpha);\n backend2.disposeIntermediateTensorInfo(reshapedAlpha);\n } else {\n result = applyActivation2(backend2, result, activation2, preluActivationWeights, leakyreluAlpha);\n }\n backend2.disposeIntermediateTensorInfo(resultOld);\n }\n return result;\n}\nvar fusedConv2DConfig = {\n kernelName: FusedConv2D,\n backendName: \"cpu\",\n kernelFunc: fusedConv2D\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/FusedDepthwiseConv2D.js\nfunction fusedDepthwiseConv2D(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, filter, bias, preluActivationWeights } = inputs;\n const { strides, pad: pad3, dataFormat, dilations, dimRoundingMode, activation: activation2, leakyreluAlpha } = attrs;\n let result = depthwiseConv2dNative({\n inputs: { x, filter },\n backend: backend2,\n attrs: { strides, pad: pad3, dataFormat, dilations, dimRoundingMode }\n });\n if (bias) {\n const oldResult = result;\n result = add4({ inputs: { a: result, b: bias }, backend: backend2 });\n backend2.disposeIntermediateTensorInfo(oldResult);\n }\n if (activation2) {\n const oldResult = result;\n result = applyActivation2(backend2, result, activation2, preluActivationWeights, leakyreluAlpha);\n backend2.disposeIntermediateTensorInfo(oldResult);\n }\n return result;\n}\nvar fusedDepthwiseConv2DConfig = {\n kernelName: FusedDepthwiseConv2D,\n backendName: \"cpu\",\n kernelFunc: fusedDepthwiseConv2D\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/GatherNd.js\nfunction gatherNd(args) {\n const { inputs, backend: backend2 } = args;\n const { params, indices } = inputs;\n const paramsSize = util_exports.sizeFromShape(params.shape);\n const indicesShape = indices.shape;\n const sliceRank = indicesShape[indicesShape.length - 1];\n const [resultShape, numSlices, sliceSize, strides] = backend_util_exports.prepareAndValidate(params, indices);\n if (numSlices === 0) {\n return backend2.makeTensorInfo(resultShape, params.dtype, []);\n }\n const indicesData = backend2.data.get(indices.dataId).values;\n const paramsBuf = backend2.bufferSync(params);\n const outBuf = gatherNdImpl(indicesData, paramsBuf, params.dtype, numSlices, sliceRank, sliceSize, strides, params.shape, paramsSize);\n return backend2.makeTensorInfo(resultShape, params.dtype, outBuf.values);\n}\nvar gatherNdConfig = {\n kernelName: GatherNd,\n backendName: \"cpu\",\n kernelFunc: gatherNd\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/GatherV2.js\nfunction gatherV2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, indices } = inputs;\n const { axis, batchDims } = attrs;\n assertNotComplex([x, indices], \"gatherV2\");\n const parsedAxis = util_exports.parseAxisParam(axis, x.shape)[0];\n const indicesVals = backend2.data.get(indices.dataId).values;\n const axisDim = x.shape[parsedAxis];\n for (let i = 0; i < indicesVals.length; ++i) {\n const index = indicesVals[i];\n util_exports.assert(index <= axisDim - 1 && index >= 0, () => `GatherV2: the index value ${index} is not in [0, ${axisDim - 1}]`);\n }\n let $batchDims = batchDims;\n if (batchDims == null) {\n $batchDims = 0;\n }\n const indicesSize = util_exports.sizeFromShape(indices.shape);\n const shapeInfo = backend_util_exports.segment_util.collectGatherOpShapeInfo(x, indices, parsedAxis, $batchDims);\n const flattenX = reshape3({\n inputs: { x },\n backend: backend2,\n attrs: {\n shape: [\n shapeInfo.batchSize,\n shapeInfo.outerSize,\n shapeInfo.dimSize,\n shapeInfo.sliceSize\n ]\n }\n });\n const flattenIndex = reshape3({\n inputs: { x: indices },\n backend: backend2,\n attrs: { shape: [shapeInfo.batchSize, indicesSize / shapeInfo.batchSize] }\n });\n const flattenOutputShape = [\n shapeInfo.batchSize,\n shapeInfo.outerSize,\n indicesSize / shapeInfo.batchSize,\n shapeInfo.sliceSize\n ];\n const indicesBuf = backend2.bufferSync(flattenIndex);\n const xBuf = backend2.bufferSync(flattenX);\n const outBuf = gatherV2Impl(xBuf, indicesBuf, flattenOutputShape);\n backend2.disposeIntermediateTensorInfo(flattenX);\n backend2.disposeIntermediateTensorInfo(flattenIndex);\n return backend2.makeTensorInfo(shapeInfo.outputShape, outBuf.dtype, outBuf.values);\n}\nvar gatherV2Config = {\n kernelName: GatherV2,\n backendName: \"cpu\",\n kernelFunc: gatherV2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/IFFT.js\nfunction ifft2(args) {\n const { inputs, backend: backend2 } = args;\n const { input: input2 } = inputs;\n const inputSize = util_exports.sizeFromShape(input2.shape);\n const innerDimensionSize = input2.shape[input2.shape.length - 1];\n const batch = inputSize / innerDimensionSize;\n const input2D = reshape3({\n inputs: { x: input2 },\n backend: backend2,\n attrs: { shape: [batch, innerDimensionSize] }\n });\n const result = fftBatch(input2D, true, backend2);\n const resultReshaped = reshape3({ inputs: { x: result }, backend: backend2, attrs: { shape: input2.shape } });\n backend2.disposeIntermediateTensorInfo(input2D);\n backend2.disposeIntermediateTensorInfo(result);\n return resultReshaped;\n}\nvar ifftConfig = {\n kernelName: IFFT,\n backendName: \"cpu\",\n kernelFunc: ifft2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/IsFinite.js\nvar isFinite3 = unaryKernelFunc(IsFinite, (xi) => Number.isFinite(xi) ? 1 : 0, \"bool\");\nvar isFiniteConfig = {\n kernelName: IsFinite,\n backendName: \"cpu\",\n kernelFunc: isFinite3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/IsInf.js\nvar isInf2 = unaryKernelFunc(IsInf, (xi) => Math.abs(xi) === Infinity ? 1 : 0, \"bool\");\nvar isInfConfig = {\n kernelName: IsInf,\n backendName: \"cpu\",\n kernelFunc: isInf2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/IsNaN.js\nvar isNaN3 = unaryKernelFunc(IsNan, (xi) => Number.isNaN(xi) ? 1 : 0, \"bool\");\nvar isNaNConfig = {\n kernelName: IsNan,\n backendName: \"cpu\",\n kernelFunc: isNaN3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/LinSpace.js\nfunction linSpace(args) {\n const { backend: backend2, attrs } = args;\n const { start, stop, num } = attrs;\n const outVals = linSpaceImpl(start, stop, num);\n return backend2.makeTensorInfo([outVals.length], \"float32\", outVals);\n}\nvar linSpaceConfig = {\n kernelName: LinSpace,\n backendName: \"cpu\",\n kernelFunc: linSpace\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Log1p.js\nvar log1p2 = unaryKernelFunc(Log1p, (xi) => Math.log1p(xi));\nvar log1pConfig = {\n kernelName: Log1p,\n backendName: \"cpu\",\n kernelFunc: log1p2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/LogicalAnd.js\nvar logicalAndImpl = createSimpleBinaryKernelImpl((a, b) => a && b);\nvar logicalAnd2 = binaryKernelFunc(LogicalAnd, logicalAndImpl, null, \"bool\");\nvar logicalAndConfig = {\n kernelName: LogicalAnd,\n backendName: \"cpu\",\n kernelFunc: logicalAnd2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/LogicalNot.js\nvar logicalNot2 = unaryKernelFunc(LogicalNot, (xi) => xi ? 0 : 1, \"bool\");\nvar logicalNotConfig = {\n kernelName: LogicalNot,\n backendName: \"cpu\",\n kernelFunc: logicalNot2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/LogicalOr.js\nvar logicalOrImpl = createSimpleBinaryKernelImpl((a, b) => a || b);\nvar logicalOr2 = binaryKernelFunc(LogicalOr, logicalOrImpl, null, \"bool\");\nvar logicalOrConfig = {\n kernelName: LogicalOr,\n backendName: \"cpu\",\n kernelFunc: logicalOr2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/LRN.js\nfunction lRN(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { depthRadius, bias, alpha, beta } = attrs;\n assertNotComplex(x, \"LRN\");\n const channels = x.shape[3];\n const maxD = channels - 1;\n const xValues = backend2.data.get(x.dataId).values;\n const size = util_exports.sizeFromShape(x.shape);\n const result = new Float32Array(size);\n function sumAcrossChannels(offset) {\n const currentChannel = offset % channels;\n let beginSumOffset = offset - currentChannel + Math.max(0, currentChannel - depthRadius);\n const endSumOffset = offset - currentChannel + Math.min(currentChannel + depthRadius, maxD);\n let sum7 = 0;\n for (; beginSumOffset <= endSumOffset; beginSumOffset++) {\n const z = xValues[beginSumOffset];\n sum7 += z * z;\n }\n return sum7;\n }\n for (let offset = 0; offset < size; offset++) {\n const sum7 = sumAcrossChannels(offset);\n const val = xValues[offset] * Math.pow(bias + alpha * sum7, -beta);\n result[offset] = val;\n }\n return backend2.makeTensorInfo(x.shape, x.dtype, result);\n}\nvar LRNConfig = {\n kernelName: LRN,\n backendName: \"cpu\",\n kernelFunc: lRN\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/LRNGrad.js\nfunction lRNGrad(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, y, dy } = inputs;\n const { depthRadius, bias, alpha, beta } = attrs;\n assertNotComplex(dy, \"LRNGrad\");\n const dySize = util_exports.sizeFromShape(dy.shape);\n const channels = dy.shape[3];\n const dyValues = backend2.data.get(dy.dataId).values;\n const xValues = backend2.data.get(x.dataId).values;\n const yValues = backend2.data.get(y.dataId).values;\n const result = new Float32Array(dySize);\n const size = dySize;\n for (let offset = 0; offset < size; offset++) {\n const currentChannel = offset % channels;\n const depthBegin = offset - currentChannel + Math.max(0, currentChannel - depthRadius);\n const depthEnd = offset - currentChannel + Math.min(channels, currentChannel + depthRadius + 1);\n let norm2 = 0;\n for (let k = depthBegin; k < depthEnd; k++) {\n norm2 += Math.pow(xValues[k], 2);\n }\n norm2 = alpha * norm2 + bias;\n for (let k = depthBegin; k < depthEnd; k++) {\n let dyi = -2 * alpha * beta * xValues[k] * yValues[offset] / norm2;\n if (offset === k) {\n dyi += Math.pow(norm2, -beta);\n }\n dyi *= dyValues[offset];\n result[k] += dyi;\n }\n }\n return backend2.makeTensorInfo(dy.shape, x.dtype, result);\n}\nvar LRNGradConfig = {\n kernelName: LRNGrad,\n backendName: \"cpu\",\n kernelFunc: lRNGrad\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Max.js\nfunction max3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { reductionIndices, keepDims } = attrs;\n const cpuBackend = backend2;\n let xShape = x.shape;\n const xRank = xShape.length;\n const origAxes = util_exports.parseAxisParam(reductionIndices, xShape);\n let axes = origAxes;\n const permutedAxes = backend_util_exports.getAxesPermutation(axes, xRank);\n let xVals = cpuBackend.data.get(x.dataId).values;\n if (permutedAxes != null) {\n const newShape = new Array(xRank);\n for (let i = 0; i < newShape.length; i++) {\n newShape[i] = xShape[permutedAxes[i]];\n }\n xVals = transposeImpl(xVals, xShape, x.dtype, permutedAxes, newShape);\n axes = backend_util_exports.getInnerMostAxes(axes.length, xRank);\n xShape = newShape;\n }\n assertNotComplex(x, \"max\");\n backend_util_exports.assertAxesAreInnerMostDims(\"max\", axes, xRank);\n const [maxOutShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes(xShape, axes);\n const reduceSize = util_exports.sizeFromShape(reduceShape);\n const result = maxImpl(xVals, reduceSize, maxOutShape, x.dtype);\n const dataId = cpuBackend.write(result, maxOutShape, x.dtype);\n let outShape = maxOutShape;\n if (keepDims) {\n const newShape = backend_util_exports.expandShapeToKeepDim(maxOutShape, origAxes);\n outShape = newShape;\n }\n return { dataId, shape: outShape, dtype: x.dtype };\n}\nvar maxConfig = {\n kernelName: Max,\n backendName: \"cpu\",\n kernelFunc: max3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/MaxPool.js\nfunction maxPool2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n assertNotComplex(x, \"maxPool\");\n const { filterSize, strides, pad: pad3, dimRoundingMode } = attrs;\n const dilations = 1;\n util_exports.assert(backend_util_exports.eitherStridesOrDilationsAreOne(strides, dilations), () => `Error in maxPool: Either strides or dilations must be 1. Got strides ${strides} and dilations '${dilations}'`);\n const convInfo = backend_util_exports.computePool2DInfo(x.shape, filterSize, strides, dilations, pad3, dimRoundingMode);\n let res;\n if (convInfo.filterWidth === 1 && convInfo.filterHeight === 1 && util_exports.arraysEqual(convInfo.inShape, convInfo.outShape)) {\n res = identity2({ inputs: { x }, backend: backend2 });\n } else {\n const xValues = backend2.data.get(x.dataId).values;\n const strides2 = util_exports.computeStrides(x.shape);\n const buffer2 = pool2(xValues, x.shape, x.dtype, strides2, convInfo, \"max\");\n res = backend2.makeTensorInfo(convInfo.outShape, x.dtype, buffer2.values);\n }\n return res;\n}\nvar maxPoolConfig = {\n kernelName: MaxPool,\n backendName: \"cpu\",\n kernelFunc: maxPool2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/MaxPool3D.js\nfunction maxPool3D(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { filterSize, strides, pad: pad3, dimRoundingMode, dataFormat } = attrs;\n assertNotComplex(x, \"maxPool3d\");\n const convInfo = backend_util_exports.computePool3DInfo(x.shape, filterSize, strides, 1, pad3, dimRoundingMode, dataFormat);\n const xValues = backend2.data.get(x.dataId).values;\n const outBuf = pool3d2(xValues, x.shape, x.dtype, util_exports.computeStrides(x.shape), convInfo, \"max\");\n return backend2.makeTensorInfo(outBuf.shape, \"float32\", outBuf.values);\n}\nvar maxPool3DConfig = {\n kernelName: MaxPool3D,\n backendName: \"cpu\",\n kernelFunc: maxPool3D\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/MaxPool3DGrad.js\nfunction maxPool3DGrad(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { dy, input: input2 } = inputs;\n const { filterSize, strides, pad: pad3, dimRoundingMode } = attrs;\n assertNotComplex([dy, input2], \"maxPool3DGrad\");\n const convInfo = backend_util_exports.computePool3DInfo(input2.shape, filterSize, strides, 1, pad3, dimRoundingMode);\n const inputBuf = backend2.bufferSync(input2);\n const maxPosBuf = maxPool3dPositions(inputBuf, convInfo);\n const strideDepth = convInfo.strideDepth;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const dilationDepth = convInfo.dilationDepth;\n const dilationHeight = convInfo.dilationHeight;\n const dilationWidth = convInfo.dilationWidth;\n const effectiveFilterDepth = convInfo.effectiveFilterDepth;\n const effectiveFilterHeight = convInfo.effectiveFilterHeight;\n const effectiveFilterWidth = convInfo.effectiveFilterWidth;\n const padFront = effectiveFilterDepth - 1 - convInfo.padInfo.front;\n const padLeft = effectiveFilterWidth - 1 - convInfo.padInfo.left;\n const padTop = effectiveFilterHeight - 1 - convInfo.padInfo.top;\n const dx = buffer(input2.shape, \"float32\");\n const dyBuf = backend2.bufferSync(dy);\n for (let batch = 0; batch < convInfo.batchSize; ++batch) {\n for (let channel = 0; channel < convInfo.inChannels; ++channel) {\n for (let dxDepth = 0; dxDepth < convInfo.inDepth; ++dxDepth) {\n for (let dxRow = 0; dxRow < convInfo.inHeight; ++dxRow) {\n for (let dxCol = 0; dxCol < convInfo.inWidth; ++dxCol) {\n const dyDepthCorner = dxDepth - padFront;\n const dyRowCorner = dxRow - padTop;\n const dyColCorner = dxCol - padLeft;\n let dotProd = 0;\n for (let wDepth = 0; wDepth < effectiveFilterDepth; wDepth += dilationDepth) {\n const dyDepth = (dyDepthCorner + wDepth) / strideDepth;\n if (dyDepth < 0 || dyDepth >= convInfo.outDepth || Math.floor(dyDepth) !== dyDepth) {\n continue;\n }\n for (let wRow = 0; wRow < effectiveFilterHeight; wRow += dilationHeight) {\n const dyRow = (dyRowCorner + wRow) / strideHeight;\n if (dyRow < 0 || dyRow >= convInfo.outHeight || Math.floor(dyRow) !== dyRow) {\n continue;\n }\n for (let wCol = 0; wCol < effectiveFilterWidth; wCol += dilationWidth) {\n const dyCol = (dyColCorner + wCol) / strideWidth;\n if (dyCol < 0 || dyCol >= convInfo.outWidth || Math.floor(dyCol) !== dyCol) {\n continue;\n }\n const maxPos = effectiveFilterDepth * effectiveFilterHeight * effectiveFilterWidth - 1 - maxPosBuf.get(batch, dyDepth, dyRow, dyCol, channel);\n const curPos = wDepth * effectiveFilterHeight * effectiveFilterWidth + wRow * effectiveFilterWidth + wCol;\n const mask = maxPos === curPos ? 1 : 0;\n if (mask === 0) {\n continue;\n }\n const pixel = dyBuf.get(batch, dyDepth, dyRow, dyCol, channel);\n dotProd += pixel * mask;\n }\n }\n }\n dx.set(dotProd, batch, dxDepth, dxRow, dxCol, channel);\n }\n }\n }\n }\n }\n return backend2.makeTensorInfo(dx.shape, dx.dtype, dx.values);\n}\nvar maxPool3DGradConfig2 = {\n kernelName: MaxPool3DGrad,\n backendName: \"cpu\",\n kernelFunc: maxPool3DGrad\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/MaxPoolGrad.js\nfunction maxPoolGrad2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { dy, input: input2, output } = inputs;\n const x = input2;\n assertNotComplex([input2, output], \"maxPoolGrad\");\n const { filterSize, strides, pad: pad3, dimRoundingMode } = attrs;\n const convInfo = backend_util_exports.computePool2DInfo(x.shape, filterSize, strides, 1, pad3, dimRoundingMode);\n const xValues = backend2.data.get(x.dataId).values;\n const maxPosBuf = buffer(convInfo.outShape, x.dtype, maxPoolPositions(xValues, x.shape, x.dtype, convInfo).values);\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const dilationHeight = convInfo.dilationHeight;\n const dilationWidth = convInfo.dilationWidth;\n const effectiveFilterHeight = convInfo.effectiveFilterHeight;\n const effectiveFilterWidth = convInfo.effectiveFilterWidth;\n const padLeft = effectiveFilterWidth - 1 - convInfo.padInfo.left;\n const padTop = effectiveFilterHeight - 1 - convInfo.padInfo.top;\n const dx = buffer(x.shape, \"float32\");\n const dyData = backend2.data.get(dy.dataId).values;\n const dyBuf = buffer(dy.shape, \"float32\", dyData);\n for (let b = 0; b < convInfo.batchSize; ++b) {\n for (let d = 0; d < convInfo.inChannels; ++d) {\n for (let dxR = 0; dxR < convInfo.inHeight; ++dxR) {\n for (let dxC = 0; dxC < convInfo.inWidth; ++dxC) {\n const dyRCorner = dxR - padTop;\n const dyCCorner = dxC - padLeft;\n let dotProd = 0;\n for (let wR = 0; wR < effectiveFilterHeight; wR += dilationHeight) {\n const dyR = (dyRCorner + wR) / strideHeight;\n if (dyR < 0 || dyR >= convInfo.outHeight || Math.floor(dyR) !== dyR) {\n continue;\n }\n for (let wC = 0; wC < effectiveFilterWidth; wC += dilationWidth) {\n const dyC = (dyCCorner + wC) / strideWidth;\n if (dyC < 0 || dyC >= convInfo.outWidth || Math.floor(dyC) !== dyC) {\n continue;\n }\n const maxPos = effectiveFilterHeight * effectiveFilterWidth - 1 - maxPosBuf.get(b, dyR, dyC, d);\n const curPos = wR * effectiveFilterWidth + wC;\n const mask = maxPos === curPos ? 1 : 0;\n if (mask === 0) {\n continue;\n }\n const pixel = dyBuf.get(b, dyR, dyC, d);\n dotProd += pixel * mask;\n }\n }\n dx.set(dotProd, b, dxR, dxC, d);\n }\n }\n }\n }\n return backend2.makeTensorInfo(dx.shape, dx.dtype, dx.values);\n}\nvar maxPoolGradConfig2 = {\n kernelName: MaxPoolGrad,\n backendName: \"cpu\",\n kernelFunc: maxPoolGrad2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/MaxPoolWithArgmax_impl.js\nfunction maxPoolWithArgmaxImpl(xValues, xShape, dtype, includeBatchInIndex, convInfo) {\n const strides = util_exports.computeStrides(xShape);\n const maxPools = pool2(xValues, xShape, dtype, strides, convInfo, \"max\");\n const maxPositions = maxPoolPositions(xValues, xShape, dtype, convInfo, true, includeBatchInIndex);\n return [maxPools.values, maxPositions.values];\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/MaxPoolWithArgmax.js\nvar maxPoolWithArgmaxConfig = {\n kernelName: MaxPoolWithArgmax,\n backendName: \"cpu\",\n kernelFunc: ({ inputs, attrs, backend: backend2 }) => {\n const { x } = inputs;\n const { filterSize, strides, pad: pad3, includeBatchInIndex } = attrs;\n const cpuBackend = backend2;\n assertNotComplex(x, \"MaxPoolWithArgmax\");\n const values = cpuBackend.data.get(x.dataId).values;\n const convInfo = backend_util_exports.computePool2DInfo(x.shape, filterSize, strides, [1, 1], pad3);\n const [pooled, indexes] = maxPoolWithArgmaxImpl(values, x.shape, x.dtype, includeBatchInIndex, convInfo);\n const pooledDataId = cpuBackend.write(pooled, convInfo.outShape, x.dtype);\n const indexesDataId = cpuBackend.write(indexes, convInfo.outShape, x.dtype);\n return [\n { dataId: pooledDataId, shape: convInfo.outShape, dtype: x.dtype },\n { dataId: indexesDataId, shape: convInfo.outShape, dtype: \"int32\" }\n ];\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Mean.js\nfunction mean2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis, keepDims } = attrs;\n const axes = util_exports.parseAxisParam(axis, x.shape);\n const shapes = backend_util_exports.computeOutAndReduceShapes(x.shape, axes);\n const reduceShape = shapes[1];\n const reduceSize = util_exports.sizeFromShape(reduceShape);\n const toDispose = [];\n const reduceSizeScalar = backend2.makeTensorInfo([], \"float32\", new Float32Array([reduceSize]));\n toDispose.push(reduceSizeScalar);\n const $x = cast3({ inputs: { x }, backend: backend2, attrs: { dtype: \"float32\" } });\n toDispose.push($x);\n const res = div2({ inputs: { a: $x, b: reduceSizeScalar }, backend: backend2 });\n toDispose.push(res);\n const result = sum3({ inputs: { x: res }, backend: backend2, attrs: { axis, keepDims } });\n toDispose.forEach((t) => backend2.disposeIntermediateTensorInfo(t));\n return result;\n}\nvar meanConfig = {\n kernelName: Mean,\n backendName: \"cpu\",\n kernelFunc: mean2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Min.js\nfunction min3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis, keepDims } = attrs;\n assertNotComplex(x, \"min\");\n const origAxes = util_exports.parseAxisParam(axis, x.shape);\n let axes = origAxes;\n const permutedAxes = backend_util_exports.getAxesPermutation(axes, x.shape.length);\n let $x = x;\n if (permutedAxes != null) {\n $x = transpose2({ inputs: { x }, backend: backend2, attrs: { perm: permutedAxes } });\n axes = backend_util_exports.getInnerMostAxes(axes.length, x.shape.length);\n }\n backend_util_exports.assertAxesAreInnerMostDims(\"min\", axes, $x.shape.length);\n const [outShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes($x.shape, axes);\n const reduceSize = util_exports.sizeFromShape(reduceShape);\n const vals = util_exports.makeZerosTypedArray(util_exports.sizeFromShape(outShape), $x.dtype);\n const aVals = backend2.data.get($x.dataId).values;\n for (let i = 0; i < vals.length; ++i) {\n const offset = i * reduceSize;\n let min7 = aVals[offset];\n for (let j = 0; j < reduceSize; ++j) {\n const value = aVals[offset + j];\n if (Number.isNaN(value) || value < min7) {\n min7 = value;\n }\n }\n vals[i] = min7;\n }\n if (permutedAxes != null) {\n backend2.disposeIntermediateTensorInfo($x);\n }\n const result = backend2.makeTensorInfo(outShape, $x.dtype, vals);\n if (keepDims) {\n const expandedShape = backend_util_exports.expandShapeToKeepDim(outShape, origAxes);\n const reshapedResult = reshape3({ inputs: { x: result }, backend: backend2, attrs: { shape: expandedShape } });\n backend2.disposeIntermediateTensorInfo(result);\n return reshapedResult;\n }\n return result;\n}\nvar minConfig = {\n kernelName: Min,\n backendName: \"cpu\",\n kernelFunc: min3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/MirrorPad.js\nfunction mirrorPad2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { paddings, mode } = attrs;\n assertNotComplex(x, \"mirrorPad\");\n const outShape = paddings.map((p2, i) => p2[0] + x.shape[i] + p2[1]);\n const start = paddings.map((p2) => p2[0]);\n const end = paddings.map((p2, i) => p2[0] + x.shape[i]);\n const offset = mode === \"reflect\" ? 0 : 1;\n const xVals = backend2.data.get(x.dataId).values;\n const xRank = x.shape.length;\n const xStrides = util_exports.computeStrides(x.shape);\n const resultSize = util_exports.sizeFromShape(outShape);\n const resultRank = outShape.length;\n const resultStrides = util_exports.computeStrides(outShape);\n const resVals = util_exports.getTypedArrayFromDType(x.dtype, resultSize);\n for (let i = 0; i < resultSize; i++) {\n let coords3 = util_exports.indexToLoc(i, resultRank, resultStrides);\n for (let i2 = 0; i2 < resultRank; i2++) {\n if (coords3[i2] < start[i2]) {\n coords3[i2] = start[i2] * 2 - coords3[i2] - offset;\n } else if (coords3[i2] >= end[i2]) {\n coords3[i2] = (end[i2] - 1) * 2 - coords3[i2] + offset;\n }\n }\n coords3 = coords3.map((c, i2) => c - start[i2]);\n const inIndex = util_exports.locToIndex(coords3, xRank, xStrides);\n resVals[i] = xVals[inIndex];\n }\n const outId = backend2.write(resVals, outShape, x.dtype);\n return { dataId: outId, shape: outShape, dtype: x.dtype };\n}\nvar mirrorPadConfig = {\n kernelName: MirrorPad,\n backendName: \"cpu\",\n kernelFunc: mirrorPad2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Mod.js\nvar modImpl = createSimpleBinaryKernelImpl((aValue, bValue) => {\n const rem = aValue % bValue;\n if (aValue < 0 && bValue < 0 || aValue >= 0 && bValue >= 0) {\n return rem;\n } else {\n return (rem + bValue) % bValue;\n }\n});\nvar mod2 = binaryKernelFunc(Mod, modImpl);\nvar modConfig = {\n kernelName: Mod,\n backendName: \"cpu\",\n kernelFunc: mod2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Multinomial.js\nvar seedrandom4 = __toESM(require_seedrandom2());\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Softmax.js\nfunction softmax3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { logits } = inputs;\n const { dim } = attrs;\n const logitsRank = logits.shape.length;\n let $dim = dim;\n if ($dim === -1) {\n $dim = logitsRank - 1;\n }\n if ($dim !== logitsRank - 1) {\n throw Error(`Softmax along a non-last dimension is not yet supported. Logits was rank ${logitsRank} and dim was ${$dim}`);\n }\n const axes = util_exports.parseAxisParam([$dim], logits.shape);\n const maxLogit = max3({\n inputs: { x: logits },\n backend: backend2,\n attrs: { reductionIndices: axes, keepDims: false }\n });\n const expandedShape = backend_util_exports.expandShapeToKeepDim(maxLogit.shape, axes);\n const maxLogitReshaped = reshape3({ inputs: { x: maxLogit }, backend: backend2, attrs: { shape: expandedShape } });\n const a = sub2({ inputs: { a: logits, b: maxLogitReshaped }, backend: backend2 });\n const b = exp2({ inputs: { x: a }, backend: backend2 });\n const sumExp = sum3({ inputs: { x: b }, backend: backend2, attrs: { axis: axes, keepDims: false } });\n const sumReshaped = reshape3({ inputs: { x: sumExp }, backend: backend2, attrs: { shape: expandedShape } });\n const result = div2({ inputs: { a: b, b: sumReshaped }, backend: backend2 });\n backend2.disposeIntermediateTensorInfo(maxLogit);\n backend2.disposeIntermediateTensorInfo(maxLogitReshaped);\n backend2.disposeIntermediateTensorInfo(a);\n backend2.disposeIntermediateTensorInfo(b);\n backend2.disposeIntermediateTensorInfo(sumExp);\n backend2.disposeIntermediateTensorInfo(sumReshaped);\n return result;\n}\nvar softmaxConfig = {\n kernelName: Softmax,\n backendName: \"cpu\",\n kernelFunc: softmax3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Multinomial.js\nfunction multinomial2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { logits } = inputs;\n const { numSamples, seed, normalized } = attrs;\n assertNotComplex(logits, \"multinomial\");\n const probabilities = normalized ? logits : softmax3({ inputs: { logits }, backend: backend2, attrs: { dim: -1 } });\n const batchSize = probabilities.shape[0];\n const numEvents = probabilities.shape[1];\n const probVals = backend2.data.get(probabilities.dataId).values;\n const resShape = [batchSize, numSamples];\n const resVals = util_exports.makeZerosTypedArray(util_exports.sizeFromShape(resShape), \"int32\");\n for (let b = 0; b < batchSize; ++b) {\n const offset = b * numEvents;\n const cdf = new Float32Array(numEvents - 1);\n cdf[0] = probVals[offset];\n for (let event = 1; event < cdf.length; ++event) {\n cdf[event] = cdf[event - 1] + probVals[offset + event];\n }\n const random = seedrandom4.alea(seed.toString());\n const outOffset = b * numSamples;\n for (let sampleId = 0; sampleId < numSamples; ++sampleId) {\n const r = random();\n resVals[outOffset + sampleId] = cdf.length;\n for (let event = 0; event < cdf.length; event++) {\n if (r < cdf[event]) {\n resVals[outOffset + sampleId] = event;\n break;\n }\n }\n }\n }\n if (!normalized) {\n backend2.disposeIntermediateTensorInfo(probabilities);\n }\n return backend2.makeTensorInfo(resShape, \"int32\", resVals);\n}\nvar multinomialConfig = {\n kernelName: Multinomial,\n backendName: \"cpu\",\n kernelFunc: multinomial2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/NonMaxSuppressionV3.js\nvar nonMaxSuppressionV3Impl2 = kernel_impls_exports.nonMaxSuppressionV3Impl;\nfunction nonMaxSuppressionV3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { boxes, scores } = inputs;\n const { maxOutputSize, iouThreshold, scoreThreshold } = attrs;\n assertNotComplex(boxes, \"NonMaxSuppression\");\n const boxesVals = backend2.data.get(boxes.dataId).values;\n const scoresVals = backend2.data.get(scores.dataId).values;\n const { selectedIndices } = nonMaxSuppressionV3Impl2(boxesVals, scoresVals, maxOutputSize, iouThreshold, scoreThreshold);\n return backend2.makeTensorInfo([selectedIndices.length], \"int32\", new Int32Array(selectedIndices));\n}\nvar nonMaxSuppressionV3Config = {\n kernelName: NonMaxSuppressionV3,\n backendName: \"cpu\",\n kernelFunc: nonMaxSuppressionV3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/NonMaxSuppressionV4.js\nvar nonMaxSuppressionV4Impl2 = kernel_impls_exports.nonMaxSuppressionV4Impl;\nfunction nonMaxSuppressionV4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { boxes, scores } = inputs;\n const { maxOutputSize, iouThreshold, scoreThreshold, padToMaxOutputSize } = attrs;\n assertNotComplex(boxes, \"NonMaxSuppressionPadded\");\n const boxesVals = backend2.data.get(boxes.dataId).values;\n const scoresVals = backend2.data.get(scores.dataId).values;\n const { selectedIndices, validOutputs } = nonMaxSuppressionV4Impl2(boxesVals, scoresVals, maxOutputSize, iouThreshold, scoreThreshold, padToMaxOutputSize);\n return [\n backend2.makeTensorInfo([selectedIndices.length], \"int32\", new Int32Array(selectedIndices)),\n backend2.makeTensorInfo([], \"int32\", new Int32Array([validOutputs]))\n ];\n}\nvar nonMaxSuppressionV4Config = {\n kernelName: NonMaxSuppressionV4,\n backendName: \"cpu\",\n kernelFunc: nonMaxSuppressionV4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/NonMaxSuppressionV5.js\nvar nonMaxSuppressionV5Impl2 = kernel_impls_exports.nonMaxSuppressionV5Impl;\nfunction nonMaxSuppressionV5(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { boxes, scores } = inputs;\n const { maxOutputSize, iouThreshold, scoreThreshold, softNmsSigma } = attrs;\n assertNotComplex(boxes, \"NonMaxSuppressionWithScore\");\n const boxesVals = backend2.data.get(boxes.dataId).values;\n const scoresVals = backend2.data.get(scores.dataId).values;\n const maxOutputSizeVal = maxOutputSize;\n const iouThresholdVal = iouThreshold;\n const scoreThresholdVal = scoreThreshold;\n const softNmsSigmaVal = softNmsSigma;\n const { selectedIndices, selectedScores } = nonMaxSuppressionV5Impl2(boxesVals, scoresVals, maxOutputSizeVal, iouThresholdVal, scoreThresholdVal, softNmsSigmaVal);\n return [\n backend2.makeTensorInfo([selectedIndices.length], \"int32\", new Int32Array(selectedIndices)),\n backend2.makeTensorInfo([selectedScores.length], \"float32\", new Float32Array(selectedScores))\n ];\n}\nvar nonMaxSuppressionV5Config = {\n kernelName: NonMaxSuppressionV5,\n backendName: \"cpu\",\n kernelFunc: nonMaxSuppressionV5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/OneHot.js\nfunction oneHot2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { indices } = inputs;\n const { dtype, depth, onValue, offValue } = attrs;\n assertNotComplex(indices, \"oneHot\");\n const indicesSize = util_exports.sizeFromShape(indices.shape);\n const res = new Float32Array(indicesSize * depth);\n res.fill(offValue);\n const indicesVal = backend2.data.get(indices.dataId).values;\n for (let event = 0; event < indicesSize; ++event) {\n if (indicesVal[event] >= 0 && indicesVal[event] < depth) {\n res[event * depth + indicesVal[event]] = onValue;\n }\n }\n return backend2.makeTensorInfo([...indices.shape, depth], dtype, res);\n}\nvar oneHotConfig = {\n kernelName: OneHot,\n backendName: \"cpu\",\n kernelFunc: oneHot2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ZerosLike.js\nfunction zerosLike2(args) {\n const { inputs, backend: backend2 } = args;\n const { x } = inputs;\n if (x.dtype === \"string\") {\n throw new Error(\"zerosLike is not supported for string tensors\");\n } else if (x.dtype === \"complex64\") {\n const realPart = real2({ inputs: { input: x }, backend: backend2 });\n const r = zerosLike2({ inputs: { x: realPart }, backend: backend2 });\n const imagPart = imag2({ inputs: { input: x }, backend: backend2 });\n const i = zerosLike2({ inputs: { x: imagPart }, backend: backend2 });\n const result = complex2({ inputs: { real: r, imag: i }, backend: backend2 });\n backend2.disposeIntermediateTensorInfo(realPart);\n backend2.disposeIntermediateTensorInfo(r);\n backend2.disposeIntermediateTensorInfo(imagPart);\n backend2.disposeIntermediateTensorInfo(i);\n return result;\n } else {\n return fill2({ backend: backend2, attrs: { shape: x.shape, value: 0, dtype: x.dtype } });\n }\n}\nvar zerosLikeConfig = {\n kernelName: ZerosLike,\n backendName: \"cpu\",\n kernelFunc: zerosLike2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/OnesLike.js\nfunction onesLike2(args) {\n const { inputs, backend: backend2 } = args;\n const { x } = inputs;\n if (x.dtype === \"string\") {\n throw new Error(\"onesLike is not supported for string tensors\");\n } else if (x.dtype === \"complex64\") {\n const realPart = real2({ inputs: { input: x }, backend: backend2 });\n const r = onesLike2({ inputs: { x: realPart }, backend: backend2 });\n const imagPart = imag2({ inputs: { input: x }, backend: backend2 });\n const i = zerosLike2({ inputs: { x: imagPart }, backend: backend2 });\n const result = complex2({ inputs: { real: r, imag: i }, backend: backend2 });\n backend2.disposeIntermediateTensorInfo(realPart);\n backend2.disposeIntermediateTensorInfo(r);\n backend2.disposeIntermediateTensorInfo(imagPart);\n backend2.disposeIntermediateTensorInfo(i);\n return result;\n } else {\n return fill2({ backend: backend2, attrs: { shape: x.shape, value: 1, dtype: x.dtype } });\n }\n}\nvar onesLikeConfig = {\n kernelName: OnesLike,\n backendName: \"cpu\",\n kernelFunc: onesLike2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Pack.js\nfunction pack(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { axis } = attrs;\n if (inputs.length === 1) {\n return expandDims3({ inputs: { input: inputs[0] }, backend: backend2, attrs: { dim: axis } });\n }\n const shape = inputs[0].shape;\n const dtype = inputs[0].dtype;\n inputs.forEach((t) => {\n util_exports.assertShapesMatch(shape, t.shape, \"All tensors passed to stack must have matching shapes\");\n util_exports.assert(dtype === t.dtype, () => \"All tensors passed to stack must have matching dtypes\");\n });\n const intermediateTensorInfos = [];\n const expandedTensors = inputs.map((t) => {\n const expandedT = expandDims3({ inputs: { input: t }, backend: backend2, attrs: { dim: axis } });\n intermediateTensorInfos.push(expandedT);\n return expandedT;\n });\n const result = concat2({ inputs: expandedTensors, backend: backend2, attrs: { axis } });\n intermediateTensorInfos.forEach((t) => backend2.disposeIntermediateTensorInfo(t));\n return result;\n}\nvar packConfig = {\n kernelName: Pack,\n backendName: \"cpu\",\n kernelFunc: pack\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/PadV2.js\nfunction padV2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { paddings, constantValue } = attrs;\n assertNotComplex(x, \"pad\");\n const outShape = paddings.map((p2, i) => p2[0] + x.shape[i] + p2[1]);\n const start = paddings.map((p2) => p2[0]);\n const xVals = backend2.data.get(x.dataId).values;\n const xSize = util_exports.sizeFromShape(x.shape);\n const xRank = x.shape.length;\n const xStrides = util_exports.computeStrides(x.shape);\n const resultSize = util_exports.sizeFromShape(outShape);\n const resultRank = outShape.length;\n const resultStrides = util_exports.computeStrides(outShape);\n const resVals = util_exports.getTypedArrayFromDType(x.dtype, resultSize);\n if (constantValue !== 0) {\n resVals.fill(constantValue);\n }\n for (let i = 0; i < xSize; i++) {\n const coords3 = util_exports.indexToLoc(i, xRank, xStrides);\n const outCoords = coords3.map((c, i2) => c + start[i2]);\n const outIndex = util_exports.locToIndex(outCoords, resultRank, resultStrides);\n resVals[outIndex] = xVals[i];\n }\n const outId = backend2.write(resVals, outShape, x.dtype);\n return { dataId: outId, shape: outShape, dtype: x.dtype };\n}\nvar padV2Config = {\n kernelName: PadV2,\n backendName: \"cpu\",\n kernelFunc: padV2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Pow.js\nvar powImpl = createSimpleBinaryKernelImpl((a, b) => Math.pow(a, b));\nvar pow2 = binaryKernelFunc(Pow, powImpl);\nvar powConfig = {\n kernelName: Pow,\n backendName: \"cpu\",\n kernelFunc: pow2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/RaggedTensorToTensor.js\nfunction raggedTensorToTensor2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { shape, values, defaultValue, rowPartitionTensors } = inputs;\n const { rowPartitionTypes } = attrs;\n const $shape = backend2.data.get(shape.dataId).values;\n const $values = backend2.data.get(values.dataId).values;\n const $defaultValue = backend2.data.get(defaultValue.dataId).values;\n const $rowPartitionValues = rowPartitionTensors.map((t) => backend2.data.get(t.dataId).values);\n const rowPartitionValuesShapes = rowPartitionTensors.map((t) => t.shape);\n const [outputShape, output] = raggedTensorToTensorImpl($shape, shape.shape, $values, values.shape, values.dtype, $defaultValue, defaultValue.shape, $rowPartitionValues, rowPartitionValuesShapes, rowPartitionTypes);\n return backend2.makeTensorInfo(outputShape, values.dtype, output);\n}\nvar raggedTensorToTensorConfig = {\n kernelName: RaggedTensorToTensor,\n backendName: \"cpu\",\n kernelFunc: raggedTensorToTensor2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Range.js\nfunction range3(args) {\n const { backend: backend2, attrs } = args;\n const { start, stop, dtype, step: step5 } = attrs;\n const values = rangeImpl(start, stop, step5, dtype);\n return backend2.makeTensorInfo([values.length], dtype, values);\n}\nvar rangeConfig = {\n kernelName: Range,\n backendName: \"cpu\",\n kernelFunc: range3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Reciprocal.js\nvar reciprocal2 = unaryKernelFunc(Reciprocal, (xi) => 1 / xi);\nvar reciprocalConfig = {\n kernelName: Reciprocal,\n backendName: \"cpu\",\n kernelFunc: reciprocal2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ResizeBilinear.js\nfunction resizeBilinear2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { images } = inputs;\n const { alignCorners, halfPixelCenters, size } = attrs;\n assertNotComplex(images, \"resizeBilinear\");\n const imagesStrides = util_exports.computeStrides(images.shape);\n const [newHeight, newWidth] = size;\n const [batch, oldHeight, oldWidth, numChannels] = images.shape;\n const xValues = backend2.data.get(images.dataId).values;\n const result = new Float32Array(util_exports.sizeFromShape([batch, newHeight, newWidth, numChannels]));\n const effectiveInputSize = [\n alignCorners && newHeight > 1 ? oldHeight - 1 : oldHeight,\n alignCorners && newWidth > 1 ? oldWidth - 1 : oldWidth\n ];\n const effectiveOutputSize = [\n alignCorners && newHeight > 1 ? newHeight - 1 : newHeight,\n alignCorners && newWidth > 1 ? newWidth - 1 : newWidth\n ];\n let outputIdx = 0;\n const effectiveRowSizeRatio = effectiveInputSize[0] / effectiveOutputSize[0];\n const effectiveColSizeRatio = effectiveInputSize[1] / effectiveOutputSize[1];\n for (let b = 0; b < batch; b++) {\n for (let r = 0; r < newHeight; r++) {\n let sourceFracRow;\n if (halfPixelCenters) {\n sourceFracRow = effectiveRowSizeRatio * (r + 0.5) - 0.5;\n } else {\n sourceFracRow = effectiveRowSizeRatio * r;\n }\n const sourceRowFloor = Math.max(0, Math.floor(sourceFracRow));\n const rowFrac = sourceFracRow - sourceRowFloor;\n const sourceRowCeil = Math.min(oldHeight - 1, Math.ceil(sourceFracRow));\n const topRowOffset = b * imagesStrides[0] + sourceRowFloor * imagesStrides[1];\n const botRowOffset = b * imagesStrides[0] + sourceRowCeil * imagesStrides[1];\n for (let c = 0; c < newWidth; c++) {\n let sourceFracCol;\n if (halfPixelCenters) {\n sourceFracCol = effectiveColSizeRatio * (c + 0.5) - 0.5;\n } else {\n sourceFracCol = effectiveColSizeRatio * c;\n }\n const sourceColFloor = Math.max(0, Math.floor(sourceFracCol));\n const colFrac = sourceFracCol - sourceColFloor;\n const sourceColCeil = Math.min(oldWidth - 1, Math.ceil(sourceFracCol));\n const topLeftOffest = topRowOffset + sourceColFloor * imagesStrides[2];\n const botLeftOffset = botRowOffset + sourceColFloor * imagesStrides[2];\n const topRightOffset = topRowOffset + sourceColCeil * imagesStrides[2];\n const botRightOffest = botRowOffset + sourceColCeil * imagesStrides[2];\n for (let d = 0; d < numChannels; d++) {\n const topLeft = xValues[topLeftOffest + d];\n const bottomLeft = xValues[botLeftOffset + d];\n const topRight = xValues[topRightOffset + d];\n const bottomRight = xValues[botRightOffest + d];\n const top = topLeft + (topRight - topLeft) * colFrac;\n const bottom = bottomLeft + (bottomRight - bottomLeft) * colFrac;\n const newValue = top + (bottom - top) * rowFrac;\n result[outputIdx++] = newValue;\n }\n }\n }\n }\n return backend2.makeTensorInfo([batch, newHeight, newWidth, numChannels], \"float32\", result);\n}\nvar resizeBilinearConfig = {\n kernelName: ResizeBilinear,\n backendName: \"cpu\",\n kernelFunc: resizeBilinear2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ResizeBilinearGrad.js\nfunction resizeBilinearGrad(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { images, dy } = inputs;\n const { alignCorners } = attrs;\n assertNotComplex([dy, images], \"resizeBilinearGrad\");\n const imagesStrides = util_exports.computeStrides(images.shape);\n const [batch, xHeight, xWidth, depth] = images.shape;\n const [, yHeight, yWidth] = dy.shape;\n const output = new Float32Array(batch * xHeight * xWidth * depth);\n const effectiveXSize = [\n alignCorners && yHeight > 1 ? xHeight - 1 : xHeight,\n alignCorners && yWidth > 1 ? xWidth - 1 : xWidth\n ];\n const effectiveYSize = [\n alignCorners && yHeight > 1 ? yHeight - 1 : yHeight,\n alignCorners && yWidth > 1 ? yWidth - 1 : yWidth\n ];\n const heightScale = effectiveXSize[0] / effectiveYSize[0];\n const widthScale = effectiveXSize[1] / effectiveYSize[1];\n const dyValues = backend2.data.get(dy.dataId).values;\n let offset = 0;\n for (let b = 0; b < batch; b++) {\n const bOffset = b * imagesStrides[0];\n for (let r = 0; r < yHeight; r++) {\n const dxR = r * heightScale;\n const topDxRIndex = Math.floor(dxR);\n const bottomDxRIndex = Math.min(Math.ceil(dxR), xHeight - 1);\n const topDxROffset = bOffset + topDxRIndex * imagesStrides[1];\n const bottomDxROffset = bOffset + bottomDxRIndex * imagesStrides[1];\n const dxRLerp = dxR - topDxRIndex;\n const inverseDxRLerp = 1 - dxRLerp;\n for (let c = 0; c < yWidth; c++) {\n const dxC = c * widthScale;\n const leftDxCIndex = Math.floor(dxC);\n const rightDxCIndex = Math.min(Math.ceil(dxC), xWidth - 1);\n const dxCLerp = dxC - leftDxCIndex;\n const inverseDxCLerp = 1 - dxCLerp;\n const topLeftRCOffset = topDxROffset + leftDxCIndex * imagesStrides[2];\n const topRightRCOffset = topDxROffset + rightDxCIndex * imagesStrides[2];\n const bottomLeftRCOffset = bottomDxROffset + leftDxCIndex * imagesStrides[2];\n const bottomRightRCOffset = bottomDxROffset + rightDxCIndex * imagesStrides[2];\n const inverseDxRLerpTimesInverseDxCLerp = inverseDxRLerp * inverseDxCLerp;\n const inverseDxRLerpTimesDxCLerp = inverseDxRLerp * dxCLerp;\n const dxRLerpTimesInverseDxCLerp = dxRLerp * inverseDxCLerp;\n const dxRLerpTimesDxCLerp = dxRLerp * dxCLerp;\n for (let d = 0; d < depth; d++) {\n const dyVal = dyValues[offset++];\n output[topLeftRCOffset + d] += dyVal * inverseDxRLerpTimesInverseDxCLerp;\n output[topRightRCOffset + d] += dyVal * inverseDxRLerpTimesDxCLerp;\n output[bottomLeftRCOffset + d] += dyVal * dxRLerpTimesInverseDxCLerp;\n output[bottomRightRCOffset + d] += dyVal * dxRLerpTimesDxCLerp;\n }\n }\n }\n }\n return backend2.makeTensorInfo([batch, xWidth, xHeight, depth], \"float32\", output);\n}\nvar resizeBilinearGradConfig2 = {\n kernelName: ResizeBilinearGrad,\n backendName: \"cpu\",\n kernelFunc: resizeBilinearGrad\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ResizeNearestNeighbor.js\nfunction resizeNearestNeighbor2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { images } = inputs;\n const { alignCorners, halfPixelCenters, size } = attrs;\n assertNotComplex(images, \"resizeNearestNeighbor\");\n const imagesStrides = util_exports.computeStrides(images.shape);\n const [newHeight, newWidth] = size;\n const [batch, oldHeight, oldWidth, numChannels] = images.shape;\n const xValues = backend2.data.get(images.dataId).values;\n const output = new Float32Array(batch * newHeight * newWidth * numChannels);\n const effectiveInputSize = [\n alignCorners && newHeight > 1 ? oldHeight - 1 : oldHeight,\n alignCorners && newWidth > 1 ? oldWidth - 1 : oldWidth\n ];\n const effectiveOutputSize = [\n alignCorners && newHeight > 1 ? newHeight - 1 : newHeight,\n alignCorners && newWidth > 1 ? newWidth - 1 : newWidth\n ];\n const effectiveRowSizeRatio = effectiveInputSize[0] / effectiveOutputSize[0];\n const effectiveColSizeRatio = effectiveInputSize[1] / effectiveOutputSize[1];\n let outputOffset = 0;\n for (let b = 0; b < batch; b++) {\n const batchOffset = b * imagesStrides[0];\n for (let r = 0; r < newHeight; r++) {\n const sourceFracRow = halfPixelCenters ? effectiveRowSizeRatio * (r + 0.5) : effectiveRowSizeRatio * r;\n let sourceNearestRow = Math.min(oldHeight - 1, alignCorners ? Math.round(sourceFracRow) : Math.floor(sourceFracRow));\n if (halfPixelCenters) {\n sourceNearestRow = Math.max(0, sourceNearestRow);\n }\n const rowOffset = batchOffset + sourceNearestRow * imagesStrides[1];\n for (let c = 0; c < newWidth; c++) {\n const sourceFracCol = halfPixelCenters ? effectiveColSizeRatio * (c + 0.5) : effectiveColSizeRatio * c;\n let sourceNearestCol = Math.min(oldWidth - 1, alignCorners ? Math.round(sourceFracCol) : Math.floor(sourceFracCol));\n if (halfPixelCenters) {\n sourceNearestCol = Math.max(0, sourceNearestCol);\n }\n const colOffset = rowOffset + sourceNearestCol * imagesStrides[2];\n for (let d = 0; d < numChannels; d++) {\n const newVal = xValues[colOffset + d];\n output[outputOffset++] = newVal;\n }\n }\n }\n }\n return backend2.makeTensorInfo([batch, newHeight, newWidth, numChannels], images.dtype, output);\n}\nvar resizeNearestNeighborConfig = {\n kernelName: ResizeNearestNeighbor,\n backendName: \"cpu\",\n kernelFunc: resizeNearestNeighbor2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ResizeNearestNeighborGrad.js\nfunction resizeNearestNeighborGrad(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { images, dy } = inputs;\n const { alignCorners } = attrs;\n assertNotComplex([dy, images], \"resizeNearestNeighborGrad\");\n const imagesStrides = util_exports.computeStrides(images.shape);\n const dyStrides = util_exports.computeStrides(dy.shape);\n const [batch, xHeight, xWidth, depth] = images.shape;\n const [, yHeight, yWidth] = dy.shape;\n const output = new Float32Array(batch * xHeight * xWidth * depth);\n const dyValues = backend2.data.get(dy.dataId).values;\n const effectiveXSize = [\n alignCorners && yHeight > 1 ? xHeight - 1 : xHeight,\n alignCorners && yWidth > 1 ? xWidth - 1 : xWidth\n ];\n const effectiveYSize = [\n alignCorners && yHeight > 1 ? yHeight - 1 : yHeight,\n alignCorners && yWidth > 1 ? yWidth - 1 : yWidth\n ];\n const heightScale = effectiveXSize[0] / effectiveYSize[0];\n const widthScale = effectiveXSize[1] / effectiveYSize[1];\n const invHeightScale = 1 / heightScale;\n const invWidthScale = 1 / widthScale;\n const winHeight = Math.ceil(invHeightScale) * 2 + 2;\n const winWidth = Math.ceil(invWidthScale) * 2 + 2;\n for (let b = 0; b < batch; b++) {\n const batchOffset = b * imagesStrides[0];\n for (let r = 0; r < xHeight; r++) {\n const rowOffset = batchOffset + r * imagesStrides[1];\n const startRLerp = Math.floor(r * invHeightScale);\n const startDyR = Math.floor(startRLerp - winHeight / 2);\n for (let c = 0; c < xWidth; c++) {\n const colOffset = rowOffset + c * imagesStrides[2];\n const startCLerp = Math.floor(c * invWidthScale);\n const startDyC = Math.floor(startCLerp - winWidth / 2);\n for (let d = 0; d < depth; d++) {\n let accum = 0;\n for (let dyRIndex = 0; dyRIndex < winHeight; dyRIndex++) {\n const dyR = dyRIndex + startDyR;\n if (dyR < 0 || dyR >= yHeight) {\n continue;\n }\n const dyROffset = batchOffset + dyR * dyStrides[1];\n const sourceFracRow = dyR * heightScale;\n const sourceNearestRow = Math.min(xHeight - 1, alignCorners ? Math.round(sourceFracRow) : Math.floor(sourceFracRow));\n if (r !== sourceNearestRow) {\n continue;\n }\n for (let dyCIndex = 0; dyCIndex < winWidth; dyCIndex++) {\n const dyC = dyCIndex + startDyC;\n if (dyC < 0 || dyC >= yWidth) {\n continue;\n }\n const dyCOffset = dyROffset + dyC * dyStrides[2];\n const sourceFracCol = dyC * widthScale;\n const sourceNearestCol = Math.min(xWidth - 1, alignCorners ? Math.round(sourceFracCol) : Math.floor(sourceFracCol));\n if (c === sourceNearestCol) {\n accum += dyValues[dyCOffset + d];\n }\n }\n }\n output[colOffset + d] = accum;\n }\n }\n }\n }\n return backend2.makeTensorInfo(images.shape, images.dtype, output);\n}\nvar resizeNearestNeighborGradConfig2 = {\n kernelName: ResizeNearestNeighborGrad,\n backendName: \"cpu\",\n kernelFunc: resizeNearestNeighborGrad\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Reverse.js\nfunction reverse2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { dims } = attrs;\n assertNotComplex(x, \"reverse\");\n const xRank = x.shape.length;\n const $dims = util_exports.parseAxisParam(dims, x.shape);\n if (xRank === 0) {\n return identity2({ inputs: { x }, backend: backend2 });\n }\n const outBuf = new TensorBuffer(x.shape, x.dtype);\n const xBuf = backend2.bufferSync(x);\n for (let i = 0; i < outBuf.size; i++) {\n const outLoc = outBuf.indexToLoc(i);\n const inLoc = outLoc.slice();\n $dims.forEach((d) => inLoc[d] = x.shape[d] - 1 - inLoc[d]);\n outBuf.set(xBuf.get(...inLoc), ...outLoc);\n }\n return backend2.makeTensorInfo(outBuf.shape, outBuf.dtype, outBuf.values);\n}\nvar reverseConfig = {\n kernelName: Reverse,\n backendName: \"cpu\",\n kernelFunc: reverse2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/RotateWithOffset.js\nvar rotateWithOffsetConfig = {\n kernelName: RotateWithOffset,\n backendName: \"cpu\",\n kernelFunc: ({ inputs, attrs, backend: backend2 }) => {\n const { image: image2 } = inputs;\n const { radians, fillValue, center } = attrs;\n const cpuBackend = backend2;\n const output = util_exports.getTypedArrayFromDType(image2.dtype, util_exports.sizeFromShape(image2.shape));\n const [batch, imageHeight, imageWidth, numChannels] = image2.shape;\n const [centerX, centerY] = backend_util_exports.getImageCenter(center, imageHeight, imageWidth);\n const fullOpacityValue = 255;\n const sinFactor = Math.sin(radians);\n const cosFactor = Math.cos(radians);\n const imageVals = cpuBackend.data.get(image2.dataId).values;\n for (let batchIdx = 0; batchIdx < batch; batchIdx++) {\n const batchOffset = batchIdx * imageWidth * imageHeight * numChannels;\n for (let row = 0; row < imageHeight; row++) {\n const rowOffset = row * (imageWidth * numChannels);\n for (let col = 0; col < imageWidth; col++) {\n const colOffset = col * numChannels;\n for (let channel = 0; channel < numChannels; channel++) {\n const coords3 = [batch, row, col, channel];\n const x = coords3[2];\n const y = coords3[1];\n let coordX = (x - centerX) * cosFactor - (y - centerY) * sinFactor;\n let coordY = (x - centerX) * sinFactor + (y - centerY) * cosFactor;\n coordX = Math.round(coordX + centerX);\n coordY = Math.round(coordY + centerY);\n let outputValue = fillValue;\n if (typeof fillValue !== \"number\") {\n if (channel === 3) {\n outputValue = fullOpacityValue;\n } else {\n outputValue = fillValue[channel];\n }\n }\n if (coordX >= 0 && coordX < imageWidth && coordY >= 0 && coordY < imageHeight) {\n const rotatedRowOffset = coordY * (imageWidth * numChannels);\n const rotatedColOffset = coordX * numChannels;\n const imageIdx = batchOffset + rotatedRowOffset + rotatedColOffset + channel;\n outputValue = imageVals[imageIdx];\n }\n const outIdx = batchOffset + rowOffset + colOffset + channel;\n output[outIdx] = outputValue;\n }\n }\n }\n }\n const dataId = cpuBackend.write(output, image2.shape, image2.dtype);\n return { dataId, shape: image2.shape, dtype: image2.dtype };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Round.js\nvar round3 = unaryKernelFunc(Round, (xi) => {\n const base = Math.floor(xi);\n if (xi - base < 0.5) {\n return Math.floor(xi);\n } else if (xi - base > 0.5) {\n return Math.ceil(xi);\n } else {\n if (base % 2 === 0) {\n return base;\n } else {\n return base + 1;\n }\n }\n});\nvar roundConfig = {\n kernelName: Round,\n backendName: \"cpu\",\n kernelFunc: round3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ScatterNd.js\nfunction scatterNd(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { indices, updates } = inputs;\n const { shape } = attrs;\n const { sliceRank, numUpdates, sliceSize, strides, outputSize } = backend_util_exports.calculateShapes(updates, indices, shape);\n const sumDupeIndices = true;\n const indicesBuf = backend2.bufferSync(indices);\n const updatesBuf = backend2.bufferSync(updates);\n const outBuf = scatterImpl(indicesBuf, updatesBuf, shape, outputSize, sliceSize, numUpdates, sliceRank, strides, 0, sumDupeIndices);\n return backend2.makeTensorInfo(shape, outBuf.dtype, outBuf.values);\n}\nvar scatterNdConfig = {\n kernelName: ScatterNd,\n backendName: \"cpu\",\n kernelFunc: scatterNd\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SearchSorted_impl.js\nfunction lowerBound2(array2, value) {\n let left = 0;\n let right = array2.length;\n let mid = 0;\n while (left < right) {\n mid = Math.floor((left + right) / 2);\n if (array2[mid] < value) {\n left = mid + 1;\n } else {\n right = mid;\n }\n }\n return right;\n}\nfunction upperBound2(array2, value) {\n let left = 0;\n let right = array2.length;\n let mid = 0;\n while (left < right) {\n mid = Math.floor((left + right) / 2);\n if (array2[mid] <= value) {\n left = mid + 1;\n } else {\n right = mid;\n }\n }\n return right;\n}\nfunction searchSortedImpl(sortedInputs, values, batchSize, numInputs, numValues, side) {\n const output = util_exports.getArrayFromDType(\"int32\", batchSize * numValues);\n for (let b = 0; b < batchSize; ++b) {\n const sortedInputsSlice = sortedInputs.slice(b * numInputs, (b + 1) * numInputs);\n const outputOffset = b * numValues;\n for (let i = 0; i < numValues; ++i) {\n output[outputOffset + i] = side === \"left\" ? lowerBound2(sortedInputsSlice, values[i + outputOffset]) : upperBound2(sortedInputsSlice, values[i + outputOffset]);\n }\n }\n return output;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SearchSorted.js\nfunction searchSorted2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { sortedSequence, values } = inputs;\n const { side } = attrs;\n const $sortedSequence = backend2.data.get(sortedSequence.dataId).values;\n const $values = backend2.data.get(values.dataId).values;\n const output = searchSortedImpl($sortedSequence, $values, sortedSequence.shape[0], sortedSequence.shape[1], values.shape[1], side);\n return backend2.makeTensorInfo(values.shape, \"int32\", output);\n}\nvar searchSortedConfig = {\n kernelName: SearchSorted,\n backendName: \"cpu\",\n kernelFunc: searchSorted2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Select.js\nfunction select2(args) {\n const { inputs, backend: backend2 } = args;\n const { condition, t, e } = inputs;\n assertNotComplex([condition, t, e], \"select\");\n const conditionRank = condition.shape.length;\n const values = backend2.data.get(condition.dataId).values;\n const tValues = backend2.data.get(t.dataId).values;\n const eValues = backend2.data.get(e.dataId).values;\n const resultDtype = upcastType(t.dtype, e.dtype);\n const newValues = util_exports.makeZerosTypedArray(util_exports.sizeFromShape(t.shape), resultDtype);\n let index = 0;\n const offset = conditionRank === 0 || conditionRank > 1 || t.shape.length === 1 ? 1 : util_exports.sizeFromShape(t.shape.slice(1));\n for (let i = 0; i < values.length; i++) {\n for (let j = 0; j < offset; j++) {\n if (values[i] === 1) {\n newValues[index++] = tValues[i];\n } else {\n newValues[index++] = eValues[i];\n }\n }\n }\n return backend2.makeTensorInfo(t.shape, resultDtype, newValues);\n}\nvar selectConfig = {\n kernelName: Select,\n backendName: \"cpu\",\n kernelFunc: select2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Selu.js\nvar scaleAlpha = backend_util_exports.SELU_SCALEALPHA;\nvar scale = backend_util_exports.SELU_SCALE;\nvar selu2 = unaryKernelFunc(Selu, (xi) => {\n if (xi >= 0) {\n return scale * xi;\n } else {\n return scaleAlpha * (Math.exp(xi) - 1);\n }\n});\nvar seluConfig = {\n kernelName: Selu,\n backendName: \"cpu\",\n kernelFunc: selu2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Sign.js\nvar sign2 = unaryKernelFunc(Sign, (xi) => {\n if (xi < 0) {\n return -1;\n } else if (xi > 0) {\n return 1;\n } else {\n return 0;\n }\n});\nvar signConfig = {\n kernelName: Sign,\n backendName: \"cpu\",\n kernelFunc: sign2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Sin.js\nvar sin2 = unaryKernelFunc(Sin, (xi) => Math.sin(xi));\nvar sinConfig = {\n kernelName: Sin,\n backendName: \"cpu\",\n kernelFunc: sin2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Sinh.js\nvar sinh2 = unaryKernelFunc(Sinh, (xi) => Math.sinh(xi));\nvar sinhConfig = {\n kernelName: Sinh,\n backendName: \"cpu\",\n kernelFunc: sinh2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Softplus.js\nvar epsilon2 = 11920928955078125e-23;\nvar threshold2 = Math.log(epsilon2) + 2;\nvar softplus2 = unaryKernelFunc(Softplus, (xi) => {\n const tooLarge = xi > -threshold2;\n const tooSmall = xi < threshold2;\n const expX = Math.exp(xi);\n let result;\n if (tooSmall) {\n result = expX;\n } else if (tooLarge) {\n result = xi;\n } else {\n result = Math.log(1 + expX);\n }\n return result;\n});\nvar softplusConfig = {\n kernelName: Softplus,\n backendName: \"cpu\",\n kernelFunc: softplus2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SpaceToBatchND.js\nfunction spaceToBatchND2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { blockShape, paddings } = attrs;\n assertNotComplex([x], \"spaceToBatchND\");\n const prod6 = util_exports.sizeFromShape(blockShape);\n const completePaddings = [[0, 0]];\n completePaddings.push(...paddings);\n for (let i = 1 + blockShape.length; i < x.shape.length; ++i) {\n completePaddings.push([0, 0]);\n }\n const paddedX = padV2Config.kernelFunc({\n inputs: { x },\n backend: backend2,\n attrs: { paddings: completePaddings, constantValue: 0 }\n });\n const reshapedPaddedShape = backend_util_exports.getReshaped(paddedX.shape, blockShape, prod6, false);\n const permutedReshapedPaddedPermutation = backend_util_exports.getPermuted(reshapedPaddedShape.length, blockShape.length, false);\n const flattenShape = backend_util_exports.getReshapedPermuted(paddedX.shape, blockShape, prod6, false);\n const reshapeInputs = { x: paddedX };\n const reshapeAttrs = { shape: reshapedPaddedShape };\n const paddedXReshaped = reshape3({ inputs: reshapeInputs, backend: backend2, attrs: reshapeAttrs });\n const transposeInputs = { x: paddedXReshaped };\n const transposeAttrs = { perm: permutedReshapedPaddedPermutation };\n const paddedXT = transpose2({ inputs: transposeInputs, backend: backend2, attrs: transposeAttrs });\n const resultReshapeInputs = { x: paddedXT };\n const resultReshapeAttrs = { shape: flattenShape };\n const result = reshape3({ inputs: resultReshapeInputs, backend: backend2, attrs: resultReshapeAttrs });\n backend2.disposeIntermediateTensorInfo(paddedX);\n backend2.disposeIntermediateTensorInfo(paddedXReshaped);\n backend2.disposeIntermediateTensorInfo(paddedXT);\n return result;\n}\nvar spaceToBatchNDConfig = {\n kernelName: SpaceToBatchND,\n backendName: \"cpu\",\n kernelFunc: spaceToBatchND2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SparseFillEmptyRows.js\nfunction sparseFillEmptyRows2(args) {\n const { inputs, backend: backend2 } = args;\n const { indices, values, denseShape, defaultValue } = inputs;\n if (denseShape.shape.length !== 1) {\n throw new Error(`Dense shape must be a vector, saw:\n ${denseShape.shape}`);\n }\n if (indices.shape.length !== 2) {\n throw new Error(`Indices must be a matrix, saw:\n ${indices.shape}`);\n }\n if (values.shape.length !== 1) {\n throw new Error(`Values must be a vector, saw:\n ${values.shape}`);\n }\n if (defaultValue.shape.length !== 0) {\n throw new Error(`Default value must be a scalar, saw:\n ${defaultValue.shape}`);\n }\n const $indices = backend2.data.get(indices.dataId).values;\n const $values = backend2.data.get(values.dataId).values;\n const $denseShape = backend2.data.get(denseShape.dataId).values;\n const $defaultValue = backend2.data.get(defaultValue.dataId).values[0];\n const [outputIndices, outputIndicesShape, outputValues, emptyRowIndicator, reverseIndexMap] = sparseFillEmptyRowsImpl($indices, indices.shape, indices.dtype, $values, values.dtype, $denseShape, $defaultValue);\n return [\n backend2.makeTensorInfo(outputIndicesShape, indices.dtype, outputIndices),\n backend2.makeTensorInfo([outputIndicesShape[0]], values.dtype, outputValues),\n backend2.makeTensorInfo([emptyRowIndicator.length], \"bool\", new Uint8Array(emptyRowIndicator.map((value) => Number(value)))),\n backend2.makeTensorInfo([reverseIndexMap.length], indices.dtype, new Int32Array(reverseIndexMap))\n ];\n}\nvar sparseFillEmptyRowsConfig = {\n kernelName: SparseFillEmptyRows,\n backendName: \"cpu\",\n kernelFunc: sparseFillEmptyRows2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SparseReshape.js\nfunction sparseReshape2(args) {\n const { inputs, backend: backend2 } = args;\n const { inputIndices, inputShape, newShape } = inputs;\n if (inputIndices.shape.length !== 2) {\n throw new Error(`Input indices should be a matrix but received shape\n ${inputIndices.shape}`);\n }\n if (inputShape.shape.length !== 1) {\n throw new Error(`Input shape should be a vector but received shape\n ${inputShape.shape}`);\n }\n if (newShape.shape.length !== 1) {\n throw new Error(`Target shape should be a vector but received shape ${newShape.shape}`);\n }\n const $inputShape = Array.from(backend2.data.get(inputShape.dataId).values);\n const $inputIndices = backend2.data.get(inputIndices.dataId).values;\n const targetShape = Array.from(backend2.data.get(newShape.dataId).values);\n const [newIndices, indicesShape, outputShape] = sparseReshapeImpl($inputIndices, inputIndices.shape, inputIndices.dtype, $inputShape, targetShape);\n return [\n backend2.makeTensorInfo(indicesShape, inputIndices.dtype, newIndices),\n backend2.makeTensorInfo([outputShape.length], newShape.dtype, new Int32Array(outputShape))\n ];\n}\nvar sparseReshapeConfig = {\n kernelName: SparseReshape,\n backendName: \"cpu\",\n kernelFunc: sparseReshape2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SparseSegmentMean.js\nfunction sparseSegmentMean2(args) {\n const { inputs, backend: backend2 } = args;\n const { data, indices, segmentIds } = inputs;\n if (data.shape.length < 1) {\n throw new Error(`Data should be at least 1 dimensional but received scalar`);\n }\n if (indices.shape.length !== 1) {\n throw new Error(`Indices should be a vector but received shape\n ${indices.shape}`);\n }\n if (segmentIds.shape.length !== 1) {\n throw new Error(`Segment ids should be a vector but received shape\n ${segmentIds.shape}`);\n }\n if (indices.shape[0] !== segmentIds.shape[0]) {\n throw new Error(`segmentIds and indices should have same size.`);\n }\n const $data = backend2.data.get(data.dataId).values;\n const $indices = backend2.data.get(indices.dataId).values;\n const $segmentIds = backend2.data.get(segmentIds.dataId).values;\n const [outputData, outputDataShape] = sparseSegmentReductionImpl($data, data.shape, data.dtype, $indices, $segmentIds, true);\n return backend2.makeTensorInfo(outputDataShape, data.dtype, outputData);\n}\nvar sparseSegmentMeanConfig = {\n kernelName: SparseSegmentMean,\n backendName: \"cpu\",\n kernelFunc: sparseSegmentMean2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SparseSegmentSum.js\nfunction sparseSegmentSum2(args) {\n const { inputs, backend: backend2 } = args;\n const { data, indices, segmentIds } = inputs;\n if (data.shape.length < 1) {\n throw new Error(`Data should be at least 1 dimensional but received scalar`);\n }\n if (indices.shape.length !== 1) {\n throw new Error(`Indices should be a vector but received shape\n ${indices.shape}`);\n }\n if (segmentIds.shape.length !== 1) {\n throw new Error(`Segment ids should be a vector but received shape\n ${segmentIds.shape}`);\n }\n if (indices.shape[0] !== segmentIds.shape[0]) {\n throw new Error(`segmentIds and indices should have same size.`);\n }\n const $data = backend2.data.get(data.dataId).values;\n const $indices = backend2.data.get(indices.dataId).values;\n const $segmentIds = backend2.data.get(segmentIds.dataId).values;\n const [outputData, outputDataShape] = sparseSegmentReductionImpl($data, data.shape, data.dtype, $indices, $segmentIds);\n return backend2.makeTensorInfo(outputDataShape, data.dtype, outputData);\n}\nvar sparseSegmentSumConfig = {\n kernelName: SparseSegmentSum,\n backendName: \"cpu\",\n kernelFunc: sparseSegmentSum2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SparseToDense.js\nfunction sparseToDense2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { sparseIndices, sparseValues, defaultValue } = inputs;\n const { outputShape } = attrs;\n const { sliceRank, numUpdates, sliceSize, strides, outputSize } = backend_util_exports.calculateShapes(sparseValues, sparseIndices, outputShape);\n const sumDupeIndices = false;\n const indicesBuf = backend2.bufferSync(sparseIndices);\n let outBuf;\n switch (sparseValues.dtype) {\n case \"bool\": {\n const updatesBuf = backend2.bufferSync(sparseValues);\n const $defaultValue = Boolean(backend2.data.get(defaultValue.dataId).values[0]);\n outBuf = scatterImpl(indicesBuf, updatesBuf, outputShape, outputSize, sliceSize, numUpdates, sliceRank, strides, $defaultValue, sumDupeIndices);\n break;\n }\n case \"float32\": {\n const updatesBuf = backend2.bufferSync(sparseValues);\n const $defaultValue = backend2.data.get(defaultValue.dataId).values[0];\n outBuf = scatterImpl(indicesBuf, updatesBuf, outputShape, outputSize, sliceSize, numUpdates, sliceRank, strides, $defaultValue, sumDupeIndices);\n break;\n }\n case \"int32\": {\n const updatesBuf = backend2.bufferSync(sparseValues);\n const $defaultValue = backend2.data.get(defaultValue.dataId).values[0];\n outBuf = scatterImpl(indicesBuf, updatesBuf, outputShape, outputSize, sliceSize, numUpdates, sliceRank, strides, $defaultValue, sumDupeIndices);\n break;\n }\n case \"string\": {\n const updatesBuf = backend2.bufferSync(sparseValues);\n const $defaultValue = util_exports.decodeString(backend2.data.get(defaultValue.dataId).values[0]);\n outBuf = scatterImpl(indicesBuf, updatesBuf, outputShape, outputSize, sliceSize, numUpdates, sliceRank, strides, $defaultValue, sumDupeIndices);\n break;\n }\n default:\n throw new Error(`Unsupported type ${sparseValues.dtype}`);\n }\n return backend2.makeTensorInfo(outputShape, outBuf.dtype, outBuf.values);\n}\nvar sparseToDenseConfig = {\n kernelName: SparseToDense,\n backendName: \"cpu\",\n kernelFunc: sparseToDense2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SplitV.js\nfunction splitV(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { numOrSizeSplits, axis } = attrs;\n const $axis = util_exports.parseAxisParam(axis, x.shape)[0];\n const splitSizes = backend_util_exports.prepareSplitSize(x, numOrSizeSplits, $axis);\n const begin = new Array(x.shape.length).fill(0);\n const size = x.shape.slice();\n return splitSizes.map((s) => {\n const sliceSize = [...size];\n sliceSize[$axis] = s;\n const sliceT = slice2({ inputs: { x }, backend: backend2, attrs: { begin, size: sliceSize } });\n begin[$axis] += s;\n return sliceT;\n });\n}\nvar splitVConfig = {\n kernelName: SplitV,\n backendName: \"cpu\",\n kernelFunc: splitV\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Square.js\nvar squareConfig = {\n kernelName: Square,\n backendName: \"cpu\",\n kernelFunc: ({ inputs, backend: backend2 }) => {\n const { x } = inputs;\n const cpuBackend = backend2;\n assertNotComplex(x, \"square\");\n const values = cpuBackend.data.get(x.dataId).values;\n const newValues = new Float32Array(values.length);\n for (let i = 0; i < values.length; ++i) {\n const value = values[i];\n newValues[i] = value * value;\n }\n const dataId = cpuBackend.write(newValues, x.shape, x.dtype);\n return { dataId, shape: x.shape, dtype: x.dtype };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Step.js\nvar step2 = unaryKernelFunc(Step, (xi, attrs) => {\n const stepAttrs = attrs;\n if (isNaN(xi)) {\n return NaN;\n } else {\n return xi > 0 ? 1 : stepAttrs.alpha;\n }\n});\nvar stepConfig = {\n kernelName: Step,\n backendName: \"cpu\",\n kernelFunc: step2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/StridedSlice.js\nfunction stridedSlice2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { begin, end, strides, beginMask, endMask, ellipsisMask, newAxisMask, shrinkAxisMask } = attrs;\n assertNotComplex(x, \"stridedSlice\");\n const { finalShapeSparse, finalShape, isIdentity, sliceDim0, isSimpleSlice, begin: $begin, end: $end, strides: $strides } = slice_util_exports.sliceInfo(x.shape, begin, end, strides, beginMask, endMask, ellipsisMask, newAxisMask, shrinkAxisMask);\n let result;\n if (isIdentity) {\n result = reshape3({ inputs: { x }, backend: backend2, attrs: { shape: finalShape } });\n } else if (sliceDim0 || isSimpleSlice) {\n util_exports.assert(x.shape.length >= 1, () => `Input must have rank at least 1, got: ${x.shape.length}`);\n const size = slice_util_exports.computeOutShape($begin, $end, $strides);\n const sliced = slice2({ inputs: { x }, backend: backend2, attrs: { begin: $begin, size } });\n result = reshape3({ inputs: { x: sliced }, backend: backend2, attrs: { shape: finalShape } });\n backend2.disposeIntermediateTensorInfo(sliced);\n } else {\n const xBuf = backend2.bufferSync(x);\n const outBuf = stridedSliceImpl(finalShapeSparse, xBuf, $strides, $begin);\n result = backend2.makeTensorInfo(finalShape, outBuf.dtype, outBuf.values);\n }\n return result;\n}\nvar stridedSliceConfig = {\n kernelName: StridedSlice,\n backendName: \"cpu\",\n kernelFunc: stridedSlice2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/StringNGrams.js\nfunction stringNGrams2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { separator, nGramWidths, leftPad, rightPad: rightPad2, padWidth, preserveShortSequences } = attrs;\n const { data, dataSplits } = inputs;\n const $data = backend2.data.get(data.dataId).values;\n const $dataSplits = backend2.data.get(dataSplits.dataId).values;\n const [nGrams, nGramsSplits] = stringNGramsImpl($data, $dataSplits, separator, nGramWidths, leftPad, rightPad2, padWidth, preserveShortSequences);\n return [\n backend2.makeTensorInfo([nGrams.length], \"string\", nGrams),\n backend2.makeTensorInfo(dataSplits.shape, \"int32\", nGramsSplits)\n ];\n}\nvar stringNGramsConfig = {\n kernelName: StringNGrams,\n backendName: \"cpu\",\n kernelFunc: stringNGrams2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/StringSplit.js\nfunction stringSplit2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { skipEmpty } = attrs;\n const { input: input2, delimiter } = inputs;\n if (input2.dtype !== \"string\") {\n throw new Error(\"Input must be of datatype string\");\n }\n if (input2.shape.length !== 1) {\n throw new Error(`Input must be a vector, got shape: ${input2.shape}`);\n }\n if (delimiter.shape.length !== 0) {\n throw new Error(`Delimiter must be a scalar, got shape: ${delimiter.shape}`);\n }\n const $input = backend2.data.get(input2.dataId).values;\n const $delimiter = backend2.data.get(delimiter.dataId).values[0];\n const [indices, values, shape] = stringSplitImpl($input, $delimiter, skipEmpty);\n const outputSize = values.length;\n return [\n backend2.makeTensorInfo([outputSize, 2], \"int32\", indices),\n backend2.makeTensorInfo([outputSize], \"string\", values),\n backend2.makeTensorInfo([2], \"int32\", new Int32Array(shape))\n ];\n}\nvar stringSplitConfig = {\n kernelName: StringSplit,\n backendName: \"cpu\",\n kernelFunc: stringSplit2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/StringToHashBucketFast.js\nfunction stringToHashBucketFast2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { numBuckets } = attrs;\n const { input: input2 } = inputs;\n if (input2.dtype !== \"string\") {\n throw new Error(\"Input must be of datatype string\");\n }\n if (numBuckets <= 0) {\n throw new Error(`Number of buckets must be at least 1`);\n }\n const $input = backend2.data.get(input2.dataId).values;\n const output = stringToHashBucketFastImpl($input, numBuckets);\n return backend2.makeTensorInfo(input2.shape, \"int32\", output);\n}\nvar stringToHashBucketFastConfig = {\n kernelName: StringToHashBucketFast,\n backendName: \"cpu\",\n kernelFunc: stringToHashBucketFast2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Tan.js\nvar tan2 = unaryKernelFunc(Tan, (xi) => Math.tan(xi));\nvar tanConfig = {\n kernelName: Tan,\n backendName: \"cpu\",\n kernelFunc: tan2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Tanh.js\nvar tanh3 = unaryKernelFunc(Tanh, (xi) => Math.tanh(xi));\nvar tanhConfig = {\n kernelName: Tanh,\n backendName: \"cpu\",\n kernelFunc: tanh3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Tile.js\nfunction tile3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { reps } = attrs;\n assertNotComplex(x, \"tile\");\n const outBuf = tileImpl(backend2.bufferSync(x), reps);\n return backend2.makeTensorInfo(outBuf.shape, outBuf.dtype, outBuf.values);\n}\nvar tileConfig = {\n kernelName: Tile,\n backendName: \"cpu\",\n kernelFunc: tile3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/TopK.js\nfunction topK(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { k, sorted } = attrs;\n assertNotComplex(x, \"topk\");\n const xVals = backend2.data.get(x.dataId).values;\n const [allTopKVals, allTopKIndices] = topKImpl(xVals, x.shape, x.dtype, k, sorted);\n return [\n backend2.makeTensorInfo(allTopKVals.shape, allTopKVals.dtype, allTopKVals.values),\n backend2.makeTensorInfo(allTopKIndices.shape, allTopKIndices.dtype, allTopKIndices.values)\n ];\n}\nvar topKConfig = {\n kernelName: TopK,\n backendName: \"cpu\",\n kernelFunc: topK\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Transform.js\nfunction transform2(args) {\n const { inputs, attrs, backend: backend2 } = args;\n const { image: image2, transforms } = inputs;\n const { interpolation, fillMode, fillValue, outputShape } = attrs;\n const [batch, imageHeight, imageWidth, numChannels] = image2.shape;\n const [outHeight, outWidth] = outputShape != null ? outputShape : [imageHeight, imageWidth];\n const outShape = [batch, outHeight, outWidth, numChannels];\n const inStrides = util_exports.computeStrides(image2.shape);\n const batchInStride = inStrides[0];\n const rowInStride = inStrides[1];\n const colInStride = inStrides[2];\n const outStrides = util_exports.computeStrides(outShape);\n const batchOutStride = outStrides[0];\n const rowOutStride = outStrides[1];\n const colOutStride = outStrides[2];\n const outVals = util_exports.getTypedArrayFromDType(image2.dtype, util_exports.sizeFromShape(outShape));\n outVals.fill(fillValue);\n const imageVals = backend2.data.get(image2.dataId).values;\n const transformVals = backend2.data.get(transforms.dataId).values;\n for (let b = 0; b < batch; ++b) {\n const transform6 = transforms.shape[0] === 1 ? transformVals : transformVals.subarray(b * 8, b * 8 + 8);\n for (let outY = 0; outY < outHeight; ++outY) {\n for (let outX = 0; outX < outWidth; ++outX) {\n for (let channel = 0; channel < numChannels; ++channel) {\n let val;\n const projection = transform6[6] * outX + transform6[7] * outY + 1;\n if (projection === 0) {\n continue;\n }\n const inX = (transform6[0] * outX + transform6[1] * outY + transform6[2]) / projection;\n const inY = (transform6[3] * outX + transform6[4] * outY + transform6[5]) / projection;\n const x = mapCoord(inX, imageWidth, fillMode);\n const y = mapCoord(inY, imageHeight, fillMode);\n switch (interpolation) {\n case \"nearest\":\n val = nearestInterpolation(imageVals, imageHeight, imageWidth, batchInStride, rowInStride, colInStride, b, y, x, channel, fillValue);\n break;\n case \"bilinear\":\n val = bilinearInterpolation(imageVals, imageHeight, imageWidth, batchInStride, rowInStride, colInStride, b, y, x, channel, fillValue);\n break;\n default:\n throw new Error(`Error in Transform: Expect 'nearest' or 'bilinear', but got ${interpolation}`);\n }\n const ind = b * batchOutStride + outY * rowOutStride + outX * colOutStride + channel;\n outVals[ind] = val;\n }\n }\n }\n return backend2.makeTensorInfo(outShape, image2.dtype, outVals);\n }\n const dataId = backend2.write(outVals, outShape, image2.dtype);\n return { dataId, shape: image2.shape, dtype: image2.dtype };\n}\nvar transformConfig = {\n kernelName: Transform,\n backendName: \"cpu\",\n kernelFunc: transform2\n};\nfunction mapCoord(outCoord, len, mode) {\n switch (mode) {\n case \"reflect\":\n return mapCoordReflect(outCoord, len);\n case \"wrap\":\n return mapCoordWrap(outCoord, len);\n case \"nearest\":\n return mapCoordNearest(outCoord, len);\n case \"constant\":\n default:\n return mapCoordConstant(outCoord, len);\n }\n}\nfunction mapCoordReflect(outCoord, len) {\n let inCoord = outCoord;\n if (inCoord < 0) {\n if (len <= 1) {\n inCoord = 0;\n } else {\n const sz2 = 2 * len;\n if (inCoord < sz2) {\n inCoord = sz2 * Math.trunc(-inCoord / sz2) + inCoord;\n }\n inCoord = inCoord < -len ? inCoord + sz2 : -inCoord - 1;\n }\n } else if (inCoord > len - 1) {\n if (len <= 1) {\n inCoord = 0;\n } else {\n const sz2 = 2 * len;\n inCoord -= sz2 * Math.trunc(inCoord / sz2);\n if (inCoord >= len) {\n inCoord = sz2 - inCoord - 1;\n }\n }\n }\n return util_exports.clamp(0, inCoord, len - 1);\n}\nfunction mapCoordWrap(outCoord, len) {\n let inCoord = outCoord;\n if (inCoord < 0) {\n if (len <= 1) {\n inCoord = 0;\n } else {\n const sz = len - 1;\n inCoord += len * (Math.trunc(-inCoord / sz) + 1);\n }\n } else if (inCoord > len - 1) {\n if (len <= 1) {\n inCoord = 0;\n } else {\n const sz = len - 1;\n inCoord -= len * Math.trunc(inCoord / sz);\n }\n }\n return util_exports.clamp(0, inCoord, len - 1);\n}\nfunction mapCoordConstant(outCoord, len) {\n return outCoord;\n}\nfunction mapCoordNearest(outCoord, len) {\n return util_exports.clamp(0, outCoord, len - 1);\n}\nfunction readWithFillValue(imageVals, imageHeight, imageWidth, batchStride, rowStride, colStride, batch, y, x, channel, fillValue) {\n const ind = batch * batchStride + y * rowStride + x * colStride + channel;\n if (0 <= y && y < imageHeight && 0 <= x && x < imageWidth) {\n return imageVals[ind];\n } else {\n return fillValue;\n }\n}\nfunction nearestInterpolation(imageVals, imageHeight, imageWidth, batchStride, rowStride, colStride, batch, y, x, channel, fillValue) {\n const $y = Math.round(y);\n const $x = Math.round(x);\n return readWithFillValue(imageVals, imageHeight, imageWidth, batchStride, rowStride, colStride, batch, $y, $x, channel, fillValue);\n}\nfunction bilinearInterpolation(imageVals, imageHeight, imageWidth, batchStride, rowStride, colStride, batch, y, x, channel, fillValue) {\n const yFloor = Math.floor(y);\n const xFloor = Math.floor(x);\n const yCeil = yFloor + 1;\n const xCeil = xFloor + 1;\n const valueYFloor = (xCeil - x) * readWithFillValue(imageVals, imageHeight, imageWidth, batchStride, rowStride, colStride, batch, yFloor, xFloor, channel, fillValue) + (x - xFloor) * readWithFillValue(imageVals, imageHeight, imageWidth, batchStride, rowStride, colStride, batch, yFloor, xCeil, channel, fillValue);\n const valueYCeil = (xCeil - x) * readWithFillValue(imageVals, imageHeight, imageWidth, batchStride, rowStride, colStride, batch, yCeil, xFloor, channel, fillValue) + (x - xFloor) * readWithFillValue(imageVals, imageHeight, imageWidth, batchStride, rowStride, colStride, batch, yCeil, xCeil, channel, fillValue);\n return (yCeil - y) * valueYFloor + (y - yFloor) * valueYCeil;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Unique.js\nfunction unique3(args) {\n const { inputs, attrs, backend: backend2 } = args;\n const { axis } = attrs;\n const { x } = inputs;\n assertNotComplex(x, \"unique\");\n const values = backend2.data.get(x.dataId).values;\n const { outputValues, outputShape, indices } = uniqueImpl(values, axis, x.shape, x.dtype);\n return [\n backend2.makeTensorInfo(outputShape, x.dtype, outputValues),\n backend2.makeTensorInfo([indices.length], \"int32\", indices)\n ];\n}\nvar uniqueConfig = {\n kernelName: Unique,\n backendName: \"cpu\",\n kernelFunc: unique3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Unpack.js\nfunction unpack(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { value } = inputs;\n let { axis } = attrs;\n if (axis < 0) {\n axis += value.shape.length;\n }\n const valueRank = value.shape.length;\n const num = value.shape[axis];\n const outShape = new Array(valueRank - 1);\n let outIndex = 0;\n for (let i = 0; i < valueRank; i++) {\n if (i !== axis) {\n outShape[outIndex++] = value.shape[i];\n }\n }\n const begin = new Array(valueRank).fill(0);\n const size = value.shape.slice();\n size[axis] = 1;\n const res = new Array(num);\n for (let i = 0; i < res.length; i++) {\n begin[axis] = i;\n const tempRes = slice2({ inputs: { x: value }, backend: backend2, attrs: { begin, size } });\n res[i] = reshape3({ inputs: { x: tempRes }, backend: backend2, attrs: { shape: outShape } });\n backend2.disposeIntermediateTensorInfo(tempRes);\n }\n return res;\n}\nvar unpackConfig = {\n kernelName: Unpack,\n backendName: \"cpu\",\n kernelFunc: unpack\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/UnsortedSegmentSum.js\nfunction unsortedSegmentSum2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, segmentIds } = inputs;\n const { numSegments } = attrs;\n assertNotComplex(x, \"unsortedSegmentSum\");\n const xRank = x.shape.length;\n const segmentIdsRank = segmentIds.shape.length;\n const res = [];\n const intermediates = [];\n const numIters = xRank - segmentIdsRank;\n let $segmentIds = segmentIds;\n for (let i = 0; i < numIters; ++i) {\n const expanded = expandDims3({ inputs: { input: $segmentIds }, backend: backend2, attrs: { dim: i + 1 } });\n $segmentIds = expanded;\n intermediates.push(expanded);\n }\n for (let i = 0; i < numSegments; ++i) {\n const scalarValue = util_exports.createScalarValue(i, \"int32\");\n const segmentId = backend2.makeTensorInfo([], \"int32\", scalarValue);\n const mask = equal2({ inputs: { a: segmentId, b: $segmentIds }, backend: backend2 });\n const maskCasted = cast3({ inputs: { x: mask }, backend: backend2, attrs: { dtype: \"float32\" } });\n const mul2 = multiply2({ inputs: { a: maskCasted, b: x }, backend: backend2 });\n const sumTensorInfo = sum3({ inputs: { x: mul2 }, backend: backend2, attrs: { axis: 0, keepDims: false } });\n res.push(sumTensorInfo);\n intermediates.push(segmentId);\n intermediates.push(mask);\n intermediates.push(maskCasted);\n intermediates.push(mul2);\n intermediates.push(sumTensorInfo);\n }\n const result = pack({ inputs: res, backend: backend2, attrs: { axis: 0 } });\n intermediates.forEach((t) => backend2.disposeIntermediateTensorInfo(t));\n return result;\n}\nvar unsortedSegmentSumConfig = {\n kernelName: UnsortedSegmentSum,\n backendName: \"cpu\",\n kernelFunc: unsortedSegmentSum2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/register_all_kernels.js\nvar kernelConfigs = [\n _fusedMatMulConfig,\n absConfig,\n acosConfig,\n acoshConfig,\n addConfig,\n addNConfig,\n allConfig,\n anyConfig,\n argMaxConfig,\n argMinConfig,\n asinConfig,\n asinhConfig,\n atanConfig,\n atan2Config,\n atanhConfig,\n avgPoolConfig,\n avgPool3DConfig,\n avgPool3DGradConfig2,\n avgPoolGradConfig2,\n batchMatMulConfig,\n batchNormConfig,\n batchToSpaceNDConfig,\n bincountConfig,\n broadcastArgsConfig,\n castConfig,\n ceilConfig,\n clipByValueConfig,\n complexConfig,\n complexAbsConfig,\n concatConfig,\n conv2DConfig,\n conv2DBackpropFilterConfig,\n conv2DBackpropInputConfig,\n conv3DConfig,\n conv3DBackpropFilterV2Config,\n conv3DBackpropInputV2Config,\n cosConfig,\n coshConfig,\n cropAndResizeConfig,\n cumprodConfig,\n cumsumConfig,\n denseBincountConfig,\n depthToSpaceConfig,\n depthwiseConv2dNativeConfig,\n depthwiseConv2dNativeBackpropFilterConfig,\n depthwiseConv2dNativeBackpropInputConfig,\n diagConfig,\n dilation2DConfig,\n dilation2DBackpropFilterConfig,\n dilation2DBackpropInputConfig,\n einsumConfig,\n eluConfig,\n eluGradConfig2,\n equalConfig,\n erfConfig,\n expConfig,\n expandDimsConfig,\n expm1Config,\n fftConfig,\n fillConfig,\n flipLeftRightConfig,\n floorConfig,\n floorDivConfig,\n fusedConv2DConfig,\n fusedDepthwiseConv2DConfig,\n gatherNdConfig,\n gatherV2Config,\n greaterConfig,\n greaterEqualConfig,\n identityConfig,\n ifftConfig,\n imagConfig,\n isFiniteConfig,\n isInfConfig,\n isNaNConfig,\n leakyReluConfig,\n lessConfig,\n lessEqualConfig,\n linSpaceConfig,\n logConfig,\n log1pConfig,\n logicalAndConfig,\n logicalNotConfig,\n logicalOrConfig,\n LRNConfig,\n LRNGradConfig,\n maxConfig,\n maximumConfig,\n maxPoolConfig,\n maxPool3DConfig,\n maxPool3DGradConfig2,\n maxPoolGradConfig2,\n maxPoolWithArgmaxConfig,\n meanConfig,\n minConfig,\n minimumConfig,\n mirrorPadConfig,\n modConfig,\n multinomialConfig,\n multiplyConfig,\n negConfig,\n nonMaxSuppressionV3Config,\n nonMaxSuppressionV4Config,\n nonMaxSuppressionV5Config,\n notEqualConfig,\n oneHotConfig,\n onesLikeConfig,\n packConfig,\n padV2Config,\n powConfig,\n preluConfig,\n prodConfig,\n raggedTensorToTensorConfig,\n rangeConfig,\n realConfig,\n realDivConfig,\n reciprocalConfig,\n reluConfig,\n relu6Config,\n reshapeConfig,\n resizeBilinearConfig,\n resizeBilinearGradConfig2,\n resizeNearestNeighborConfig,\n resizeNearestNeighborGradConfig2,\n reverseConfig,\n rotateWithOffsetConfig,\n roundConfig,\n rsqrtConfig,\n scatterNdConfig,\n searchSortedConfig,\n selectConfig,\n seluConfig,\n sigmoidConfig,\n signConfig,\n sinConfig,\n sinhConfig,\n sliceConfig,\n softmaxConfig,\n softplusConfig,\n spaceToBatchNDConfig,\n sparseFillEmptyRowsConfig,\n sparseReshapeConfig,\n sparseSegmentMeanConfig,\n sparseSegmentSumConfig,\n sparseToDenseConfig,\n splitVConfig,\n sqrtConfig,\n squareConfig,\n squaredDifferenceConfig,\n stepConfig,\n stridedSliceConfig,\n stringNGramsConfig,\n stringSplitConfig,\n stringToHashBucketFastConfig,\n subConfig,\n sumConfig,\n tanConfig,\n tanhConfig,\n tileConfig,\n topKConfig,\n transformConfig,\n transposeConfig,\n uniqueConfig,\n unpackConfig,\n unsortedSegmentSumConfig,\n zerosLikeConfig\n];\nfor (const kernelConfig of kernelConfigs) {\n registerKernel(kernelConfig);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/webgl_util.js\nvar webgl_util_exports = {};\n__export(webgl_util_exports, {\n assertNotComplex: () => assertNotComplex2,\n bindCanvasToFramebuffer: () => bindCanvasToFramebuffer,\n bindColorTextureToFramebuffer: () => bindColorTextureToFramebuffer,\n bindTextureToProgramUniformSampler: () => bindTextureToProgramUniformSampler,\n bindTextureUnit: () => bindTextureUnit,\n bindVertexBufferToProgramAttribute: () => bindVertexBufferToProgramAttribute,\n callAndCheck: () => callAndCheck,\n canBeRepresented: () => canBeRepresented,\n createFragmentShader: () => createFragmentShader,\n createFramebuffer: () => createFramebuffer,\n createProgram: () => createProgram,\n createStaticIndexBuffer: () => createStaticIndexBuffer,\n createStaticVertexBuffer: () => createStaticVertexBuffer,\n createTexture: () => createTexture,\n createVertexShader: () => createVertexShader,\n getBatchDim: () => getBatchDim,\n getExtensionOrThrow: () => getExtensionOrThrow,\n getFramebufferErrorMessage: () => getFramebufferErrorMessage,\n getMaxTexturesInShader: () => getMaxTexturesInShader,\n getNumChannels: () => getNumChannels,\n getProgramUniformLocation: () => getProgramUniformLocation,\n getProgramUniformLocationOrThrow: () => getProgramUniformLocationOrThrow,\n getRowsCols: () => getRowsCols,\n getShapeAs3D: () => getShapeAs3D,\n getTextureShapeFromLogicalShape: () => getTextureShapeFromLogicalShape,\n getWebGLDisjointQueryTimerVersion: () => getWebGLDisjointQueryTimerVersion,\n getWebGLErrorMessage: () => getWebGLErrorMessage,\n getWebGLMaxTextureSize: () => getWebGLMaxTextureSize,\n hasExtension: () => hasExtension,\n isCapableOfRenderingToFloatTexture: () => isCapableOfRenderingToFloatTexture,\n isDownloadFloatTextureEnabled: () => isDownloadFloatTextureEnabled,\n isReshapeFree: () => isReshapeFree,\n isWebGLFenceEnabled: () => isWebGLFenceEnabled,\n isWebGLVersionEnabled: () => isWebGLVersionEnabled,\n linkProgram: () => linkProgram,\n logShaderSourceAndInfoLog: () => logShaderSourceAndInfoLog,\n resetMaxTextureSize: () => resetMaxTextureSize,\n resetMaxTexturesInShader: () => resetMaxTexturesInShader,\n unbindColorTextureFromFramebuffer: () => unbindColorTextureFromFramebuffer,\n unbindTextureUnit: () => unbindTextureUnit,\n validateFramebuffer: () => validateFramebuffer,\n validateProgram: () => validateProgram,\n validateTextureSize: () => validateTextureSize\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/canvas_util.js\nvar contexts = {};\nvar WEBGL_ATTRIBUTES = {\n alpha: false,\n antialias: false,\n premultipliedAlpha: false,\n preserveDrawingBuffer: false,\n depth: false,\n stencil: false,\n failIfMajorPerformanceCaveat: true\n};\nfunction setWebGLContext(webGLVersion, gl) {\n contexts[webGLVersion] = gl;\n}\nfunction getWebGLContext(webGLVersion, customCanvas) {\n if (!(webGLVersion in contexts) || customCanvas != null) {\n const newCtx = getWebGLRenderingContext(webGLVersion, customCanvas);\n if (newCtx !== null) {\n contexts[webGLVersion] = newCtx;\n } else {\n console.log(\"Could not get context for WebGL version\", webGLVersion);\n return null;\n }\n }\n const gl = contexts[webGLVersion];\n if (gl == null || gl.isContextLost()) {\n delete contexts[webGLVersion];\n return getWebGLContext(webGLVersion);\n }\n gl.disable(gl.DEPTH_TEST);\n gl.disable(gl.STENCIL_TEST);\n gl.disable(gl.BLEND);\n gl.disable(gl.DITHER);\n gl.disable(gl.POLYGON_OFFSET_FILL);\n gl.disable(gl.SAMPLE_COVERAGE);\n gl.enable(gl.SCISSOR_TEST);\n gl.enable(gl.CULL_FACE);\n gl.cullFace(gl.BACK);\n return contexts[webGLVersion];\n}\nfunction createCanvas(webGLVersion) {\n if (typeof OffscreenCanvas !== \"undefined\" && webGLVersion === 2) {\n return new OffscreenCanvas(300, 150);\n } else if (typeof document !== \"undefined\") {\n return document.createElement(\"canvas\");\n } else {\n throw new Error(\"Cannot create a canvas in this context\");\n }\n}\nfunction getWebGLRenderingContext(webGLVersion, customCanvas) {\n if (webGLVersion !== 1 && webGLVersion !== 2) {\n throw new Error(\"Cannot get WebGL rendering context, WebGL is disabled.\");\n }\n const canvas = customCanvas == null ? createCanvas(webGLVersion) : customCanvas;\n canvas.addEventListener(\"webglcontextlost\", (ev) => {\n ev.preventDefault();\n delete contexts[webGLVersion];\n }, false);\n if (env().getBool(\"SOFTWARE_WEBGL_ENABLED\")) {\n WEBGL_ATTRIBUTES.failIfMajorPerformanceCaveat = false;\n }\n if (webGLVersion === 1) {\n return canvas.getContext(\"webgl\", WEBGL_ATTRIBUTES) || canvas.getContext(\"experimental-webgl\", WEBGL_ATTRIBUTES);\n }\n return canvas.getContext(\"webgl2\", WEBGL_ATTRIBUTES);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/tex_util.js\nvar PackingScheme;\n(function(PackingScheme2) {\n PackingScheme2[PackingScheme2[\"DENSE\"] = 0] = \"DENSE\";\n PackingScheme2[PackingScheme2[\"SHARED_BATCH\"] = 1] = \"SHARED_BATCH\";\n})(PackingScheme || (PackingScheme = {}));\nvar TextureUsage;\n(function(TextureUsage2) {\n TextureUsage2[TextureUsage2[\"RENDER\"] = 0] = \"RENDER\";\n TextureUsage2[TextureUsage2[\"UPLOAD\"] = 1] = \"UPLOAD\";\n TextureUsage2[TextureUsage2[\"PIXELS\"] = 2] = \"PIXELS\";\n TextureUsage2[TextureUsage2[\"DOWNLOAD\"] = 3] = \"DOWNLOAD\";\n})(TextureUsage || (TextureUsage = {}));\nvar PhysicalTextureType;\n(function(PhysicalTextureType2) {\n PhysicalTextureType2[PhysicalTextureType2[\"UNPACKED_FLOAT16\"] = 0] = \"UNPACKED_FLOAT16\";\n PhysicalTextureType2[PhysicalTextureType2[\"UNPACKED_FLOAT32\"] = 1] = \"UNPACKED_FLOAT32\";\n PhysicalTextureType2[PhysicalTextureType2[\"PACKED_4X1_UNSIGNED_BYTE\"] = 2] = \"PACKED_4X1_UNSIGNED_BYTE\";\n PhysicalTextureType2[PhysicalTextureType2[\"PACKED_2X2_FLOAT32\"] = 3] = \"PACKED_2X2_FLOAT32\";\n PhysicalTextureType2[PhysicalTextureType2[\"PACKED_2X2_FLOAT16\"] = 4] = \"PACKED_2X2_FLOAT16\";\n})(PhysicalTextureType || (PhysicalTextureType = {}));\nfunction getUnpackedMatrixTextureShapeWidthHeight(rows, columns) {\n return [columns, rows];\n}\nfunction getUnpackedArraySizeFromMatrixSize(matrixSize, channelsPerTexture) {\n return matrixSize * channelsPerTexture;\n}\nfunction getDenseTexShape(shape) {\n const size = util_exports.sizeFromShape(shape);\n const texelsNeeded = Math.ceil(size / 4);\n return util_exports.sizeToSquarishShape(texelsNeeded);\n}\nfunction getPackedMatrixTextureShapeWidthHeight(rows, columns) {\n return [\n Math.max(1, Math.ceil(columns / 2)),\n Math.max(1, Math.ceil(rows / 2))\n ];\n}\nfunction getPackedRGBAArraySizeFromMatrixShape(rows, columns) {\n const [w, h] = getPackedMatrixTextureShapeWidthHeight(rows, columns);\n return w * h * 4;\n}\nfunction getTextureConfig(gl, textureHalfFloatExtension) {\n const glany = gl;\n let internalFormatFloat;\n let internalFormatHalfFloat;\n let internalFormatPackedHalfFloat;\n let internalFormatPackedFloat;\n let textureFormatFloat;\n let downloadTextureFormat;\n let downloadUnpackNumChannels;\n let defaultNumChannels;\n let textureTypeHalfFloat;\n let textureTypeFloat;\n if (env().getNumber(\"WEBGL_VERSION\") === 2) {\n internalFormatFloat = glany.R32F;\n internalFormatHalfFloat = glany.R16F;\n internalFormatPackedHalfFloat = glany.RGBA16F;\n internalFormatPackedFloat = glany.RGBA32F;\n textureFormatFloat = glany.RED;\n downloadUnpackNumChannels = 4;\n defaultNumChannels = 1;\n textureTypeHalfFloat = glany.HALF_FLOAT;\n textureTypeFloat = glany.FLOAT;\n downloadTextureFormat = glany.RGBA8;\n } else {\n internalFormatFloat = gl.RGBA;\n internalFormatHalfFloat = gl.RGBA;\n internalFormatPackedHalfFloat = gl.RGBA;\n internalFormatPackedFloat = glany.RGBA;\n textureFormatFloat = gl.RGBA;\n downloadUnpackNumChannels = 4;\n defaultNumChannels = 4;\n textureTypeHalfFloat = textureHalfFloatExtension != null ? textureHalfFloatExtension.HALF_FLOAT_OES : null;\n textureTypeFloat = gl.FLOAT;\n downloadTextureFormat = gl.RGBA;\n }\n return {\n internalFormatFloat,\n internalFormatHalfFloat,\n internalFormatPackedHalfFloat,\n internalFormatPackedFloat,\n textureFormatFloat,\n downloadTextureFormat,\n downloadUnpackNumChannels,\n defaultNumChannels,\n textureTypeHalfFloat,\n textureTypeFloat\n };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/webgl_util.js\nfunction callAndCheck(gl, func2) {\n const returnValue = func2();\n if (env().getBool(\"DEBUG\")) {\n checkWebGLError(gl);\n }\n return returnValue;\n}\nfunction checkWebGLError(gl) {\n const error = gl.getError();\n if (error !== gl.NO_ERROR) {\n throw new Error(\"WebGL Error: \" + getWebGLErrorMessage(gl, error));\n }\n}\nvar MIN_FLOAT16 = 596e-10;\nvar MAX_FLOAT16 = 65504;\nfunction canBeRepresented(num) {\n if (env().getBool(\"WEBGL_RENDER_FLOAT32_ENABLED\") || num === 0 || MIN_FLOAT16 < Math.abs(num) && Math.abs(num) < MAX_FLOAT16) {\n return true;\n }\n return false;\n}\nfunction getWebGLErrorMessage(gl, status) {\n switch (status) {\n case gl.NO_ERROR:\n return \"NO_ERROR\";\n case gl.INVALID_ENUM:\n return \"INVALID_ENUM\";\n case gl.INVALID_VALUE:\n return \"INVALID_VALUE\";\n case gl.INVALID_OPERATION:\n return \"INVALID_OPERATION\";\n case gl.INVALID_FRAMEBUFFER_OPERATION:\n return \"INVALID_FRAMEBUFFER_OPERATION\";\n case gl.OUT_OF_MEMORY:\n return \"OUT_OF_MEMORY\";\n case gl.CONTEXT_LOST_WEBGL:\n return \"CONTEXT_LOST_WEBGL\";\n default:\n return `Unknown error code ${status}`;\n }\n}\nfunction getExtensionOrThrow(gl, extensionName) {\n return throwIfNull(gl, () => gl.getExtension(extensionName), 'Extension \"' + extensionName + '\" not supported on this browser.');\n}\nfunction createVertexShader(gl, vertexShaderSource) {\n const vertexShader = throwIfNull(gl, () => gl.createShader(gl.VERTEX_SHADER), \"Unable to create vertex WebGLShader.\");\n callAndCheck(gl, () => gl.shaderSource(vertexShader, vertexShaderSource));\n callAndCheck(gl, () => gl.compileShader(vertexShader));\n if (gl.getShaderParameter(vertexShader, gl.COMPILE_STATUS) === false) {\n console.log(gl.getShaderInfoLog(vertexShader));\n throw new Error(\"Failed to compile vertex shader.\");\n }\n return vertexShader;\n}\nfunction createFragmentShader(gl, fragmentShaderSource) {\n const fragmentShader = throwIfNull(gl, () => gl.createShader(gl.FRAGMENT_SHADER), \"Unable to create fragment WebGLShader.\");\n callAndCheck(gl, () => gl.shaderSource(fragmentShader, fragmentShaderSource));\n callAndCheck(gl, () => gl.compileShader(fragmentShader));\n if (env().get(\"ENGINE_COMPILE_ONLY\")) {\n return fragmentShader;\n }\n if (gl.getShaderParameter(fragmentShader, gl.COMPILE_STATUS) === false) {\n logShaderSourceAndInfoLog(fragmentShaderSource, gl.getShaderInfoLog(fragmentShader));\n throw new Error(\"Failed to compile fragment shader.\");\n }\n return fragmentShader;\n}\nvar lineNumberRegex = /ERROR: [0-9]+:([0-9]+):/g;\nfunction logShaderSourceAndInfoLog(shaderSource, shaderInfoLog) {\n const lineNumberRegexResult = lineNumberRegex.exec(shaderInfoLog);\n if (lineNumberRegexResult == null) {\n console.log(`Couldn't parse line number in error: ${shaderInfoLog}`);\n console.log(shaderSource);\n return;\n }\n const lineNumber = +lineNumberRegexResult[1];\n const shaderLines = shaderSource.split(\"\\n\");\n const pad3 = shaderLines.length.toString().length + 2;\n const linesWithLineNumbers = shaderLines.map((line, lineNumber2) => util_exports.rightPad((lineNumber2 + 1).toString(), pad3) + line);\n let maxLineLength = 0;\n for (let i = 0; i < linesWithLineNumbers.length; i++) {\n maxLineLength = Math.max(linesWithLineNumbers[i].length, maxLineLength);\n }\n const beforeErrorLines = linesWithLineNumbers.slice(0, lineNumber - 1);\n const errorLine = linesWithLineNumbers.slice(lineNumber - 1, lineNumber);\n const afterErrorLines = linesWithLineNumbers.slice(lineNumber);\n console.log(beforeErrorLines.join(\"\\n\"));\n console.log(shaderInfoLog.split(\"\\n\")[0]);\n console.log(`%c ${util_exports.rightPad(errorLine[0], maxLineLength)}`, \"border:1px solid red; background-color:#e3d2d2; color:#a61717\");\n console.log(afterErrorLines.join(\"\\n\"));\n}\nfunction createProgram(gl) {\n return throwIfNull(gl, () => gl.createProgram(), \"Unable to create WebGLProgram.\");\n}\nfunction linkProgram(gl, program) {\n callAndCheck(gl, () => gl.linkProgram(program));\n if (env().get(\"ENGINE_COMPILE_ONLY\")) {\n return;\n }\n if (gl.getProgramParameter(program, gl.LINK_STATUS) === false) {\n console.log(gl.getProgramInfoLog(program));\n throw new Error(\"Failed to link vertex and fragment shaders.\");\n }\n}\nfunction validateProgram(gl, program) {\n callAndCheck(gl, () => gl.validateProgram(program));\n if (gl.getProgramParameter(program, gl.VALIDATE_STATUS) === false) {\n console.log(gl.getProgramInfoLog(program));\n throw new Error(\"Shader program validation failed.\");\n }\n}\nfunction createStaticVertexBuffer(gl, data) {\n const buffer2 = throwIfNull(gl, () => gl.createBuffer(), \"Unable to create WebGLBuffer\");\n callAndCheck(gl, () => gl.bindBuffer(gl.ARRAY_BUFFER, buffer2));\n callAndCheck(gl, () => gl.bufferData(gl.ARRAY_BUFFER, data, gl.STATIC_DRAW));\n return buffer2;\n}\nfunction createStaticIndexBuffer(gl, data) {\n const buffer2 = throwIfNull(gl, () => gl.createBuffer(), \"Unable to create WebGLBuffer\");\n callAndCheck(gl, () => gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, buffer2));\n callAndCheck(gl, () => gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, data, gl.STATIC_DRAW));\n return buffer2;\n}\nfunction getNumChannels() {\n if (env().getNumber(\"WEBGL_VERSION\") === 2) {\n return 1;\n }\n return 4;\n}\nfunction createTexture(gl) {\n return throwIfNull(gl, () => gl.createTexture(), \"Unable to create WebGLTexture.\");\n}\nfunction validateTextureSize(width, height) {\n const maxTextureSize = env().getNumber(\"WEBGL_MAX_TEXTURE_SIZE\");\n if (width <= 0 || height <= 0) {\n const requested = `[${width}x${height}]`;\n throw new Error(\"Requested texture size \" + requested + \" is invalid.\");\n }\n if (width > maxTextureSize || height > maxTextureSize) {\n const requested = `[${width}x${height}]`;\n const max7 = `[${maxTextureSize}x${maxTextureSize}]`;\n throw new Error(\"Requested texture size \" + requested + \" greater than WebGL maximum on this browser / GPU \" + max7 + \".\");\n }\n}\nfunction createFramebuffer(gl) {\n return throwIfNull(gl, () => gl.createFramebuffer(), \"Unable to create WebGLFramebuffer.\");\n}\nfunction bindVertexBufferToProgramAttribute(gl, program, attribute, buffer2, arrayEntriesPerItem, itemStrideInBytes, itemOffsetInBytes) {\n const loc = gl.getAttribLocation(program, attribute);\n if (loc === -1) {\n return false;\n }\n callAndCheck(gl, () => gl.bindBuffer(gl.ARRAY_BUFFER, buffer2));\n callAndCheck(gl, () => gl.vertexAttribPointer(loc, arrayEntriesPerItem, gl.FLOAT, false, itemStrideInBytes, itemOffsetInBytes));\n callAndCheck(gl, () => gl.enableVertexAttribArray(loc));\n return true;\n}\nfunction bindTextureUnit(gl, texture, textureUnit) {\n validateTextureUnit(gl, textureUnit);\n callAndCheck(gl, () => gl.activeTexture(gl.TEXTURE0 + textureUnit));\n callAndCheck(gl, () => gl.bindTexture(gl.TEXTURE_2D, texture));\n}\nfunction unbindTextureUnit(gl, textureUnit) {\n validateTextureUnit(gl, textureUnit);\n callAndCheck(gl, () => gl.activeTexture(gl.TEXTURE0 + textureUnit));\n callAndCheck(gl, () => gl.bindTexture(gl.TEXTURE_2D, null));\n}\nfunction getProgramUniformLocationOrThrow(gl, program, uniformName) {\n return throwIfNull(gl, () => gl.getUniformLocation(program, uniformName), 'uniform \"' + uniformName + '\" not present in program.');\n}\nfunction getProgramUniformLocation(gl, program, uniformName) {\n return gl.getUniformLocation(program, uniformName);\n}\nfunction bindTextureToProgramUniformSampler(gl, texture, uniformSamplerLocation, textureUnit) {\n callAndCheck(gl, () => bindTextureUnit(gl, texture, textureUnit));\n callAndCheck(gl, () => gl.uniform1i(uniformSamplerLocation, textureUnit));\n}\nfunction bindCanvasToFramebuffer(gl) {\n callAndCheck(gl, () => gl.bindFramebuffer(gl.FRAMEBUFFER, null));\n callAndCheck(gl, () => gl.viewport(0, 0, gl.canvas.width, gl.canvas.height));\n callAndCheck(gl, () => gl.scissor(0, 0, gl.canvas.width, gl.canvas.height));\n}\nfunction bindColorTextureToFramebuffer(gl, texture, framebuffer) {\n callAndCheck(gl, () => gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer));\n callAndCheck(gl, () => gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0));\n}\nfunction unbindColorTextureFromFramebuffer(gl, framebuffer) {\n callAndCheck(gl, () => gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer));\n callAndCheck(gl, () => gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0));\n}\nfunction validateFramebuffer(gl) {\n const status = gl.checkFramebufferStatus(gl.FRAMEBUFFER);\n if (status !== gl.FRAMEBUFFER_COMPLETE) {\n throw new Error(\"Error binding framebuffer: \" + getFramebufferErrorMessage(gl, status));\n }\n}\nfunction getFramebufferErrorMessage(gl, status) {\n switch (status) {\n case gl.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:\n return \"FRAMEBUFFER_INCOMPLETE_ATTACHMENT\";\n case gl.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:\n return \"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT\";\n case gl.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:\n return \"FRAMEBUFFER_INCOMPLETE_DIMENSIONS\";\n case gl.FRAMEBUFFER_UNSUPPORTED:\n return \"FRAMEBUFFER_UNSUPPORTED\";\n default:\n return `unknown error ${status}`;\n }\n}\nfunction throwIfNull(gl, returnTOrNull, failureMessage) {\n const tOrNull = callAndCheck(gl, () => returnTOrNull());\n if (tOrNull == null) {\n throw new Error(failureMessage);\n }\n return tOrNull;\n}\nfunction validateTextureUnit(gl, textureUnit) {\n const maxTextureUnit = gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS - 1;\n const glTextureUnit = textureUnit + gl.TEXTURE0;\n if (glTextureUnit < gl.TEXTURE0 || glTextureUnit > maxTextureUnit) {\n const textureUnitRange = `[gl.TEXTURE0, gl.TEXTURE${maxTextureUnit}]`;\n throw new Error(`textureUnit must be in ${textureUnitRange}.`);\n }\n}\nfunction getBatchDim(shape, dimsToSkip = 2) {\n return util_exports.sizeFromShape(shape.slice(0, shape.length - dimsToSkip));\n}\nfunction getRowsCols(shape) {\n if (shape.length === 0) {\n throw Error(\"Cannot get rows and columns of an empty shape array.\");\n }\n return [\n shape.length > 1 ? shape[shape.length - 2] : 1,\n shape[shape.length - 1]\n ];\n}\nfunction getShapeAs3D(shape) {\n let shapeAs3D = [1, 1, 1];\n const isScalar = shape.length === 0 || shape.length === 1 && shape[0] === 1;\n if (!isScalar) {\n shapeAs3D = [getBatchDim(shape), ...getRowsCols(shape)];\n }\n return shapeAs3D;\n}\nfunction getTextureShapeFromLogicalShape(logShape, isPacked = false) {\n let maxTexSize = env().getNumber(\"WEBGL_MAX_TEXTURE_SIZE\");\n if (isPacked) {\n maxTexSize = maxTexSize * 2;\n logShape = logShape.map((d, i) => i >= logShape.length - 2 ? util_exports.nearestLargerEven(logShape[i]) : logShape[i]);\n if (logShape.length === 1) {\n logShape = [2, logShape[0]];\n }\n }\n if (logShape.length !== 2) {\n const squeezeResult = util_exports.squeezeShape(logShape);\n logShape = squeezeResult.newShape;\n }\n let size = util_exports.sizeFromShape(logShape);\n if (logShape.length <= 1 && size <= maxTexSize) {\n return [1, size];\n } else if (logShape.length === 2 && logShape[0] <= maxTexSize && logShape[1] <= maxTexSize) {\n return logShape;\n } else if (logShape.length === 3 && logShape[0] * logShape[1] <= maxTexSize && logShape[2] <= maxTexSize) {\n return [logShape[0] * logShape[1], logShape[2]];\n } else if (logShape.length === 3 && logShape[0] <= maxTexSize && logShape[1] * logShape[2] <= maxTexSize) {\n return [logShape[0], logShape[1] * logShape[2]];\n } else if (logShape.length === 4 && logShape[0] * logShape[1] * logShape[2] <= maxTexSize && logShape[3] <= maxTexSize) {\n return [logShape[0] * logShape[1] * logShape[2], logShape[3]];\n } else if (logShape.length === 4 && logShape[0] <= maxTexSize && logShape[1] * logShape[2] * logShape[3] <= maxTexSize) {\n return [logShape[0], logShape[1] * logShape[2] * logShape[3]];\n } else {\n if (isPacked) {\n const batchDim = getBatchDim(logShape);\n let rows = 2, cols = 2;\n if (logShape.length) {\n [rows, cols] = getRowsCols(logShape);\n }\n size = batchDim * (rows / 2) * (cols / 2);\n return util_exports.sizeToSquarishShape(size).map((d) => d * 2);\n }\n return util_exports.sizeToSquarishShape(size);\n }\n}\nfunction isEven(n) {\n return n % 2 === 0;\n}\nfunction isReshapeFree(shape1, shape2) {\n shape1 = shape1.slice(-2);\n shape2 = shape2.slice(-2);\n if (util_exports.arraysEqual(shape1, shape2)) {\n return true;\n }\n if (!shape1.length || !shape2.length) {\n return true;\n }\n if (shape1[0] === 0 || shape1[1] === 0 || shape2[0] === 0 || shape2[1] === 0) {\n return true;\n }\n if (shape1.length !== shape2.length) {\n const shape1Cols = shape1.slice(-1)[0];\n const shape2Cols = shape2.slice(-1)[0];\n if (shape1Cols === shape2Cols) {\n return true;\n }\n if (isEven(shape1Cols) && isEven(shape2Cols) && (shape1[0] === 1 || shape2[0] === 1)) {\n return true;\n }\n }\n return shape1[1] === shape2[1] && isEven(shape1[0]) && isEven(shape2[0]);\n}\nvar MAX_TEXTURE_SIZE;\nvar MAX_TEXTURES_IN_SHADER;\nfunction getWebGLMaxTextureSize(webGLVersion) {\n if (MAX_TEXTURE_SIZE == null) {\n const gl = getWebGLContext(webGLVersion);\n MAX_TEXTURE_SIZE = gl.getParameter(gl.MAX_TEXTURE_SIZE);\n }\n return MAX_TEXTURE_SIZE;\n}\nfunction resetMaxTextureSize() {\n MAX_TEXTURE_SIZE = null;\n}\nfunction resetMaxTexturesInShader() {\n MAX_TEXTURES_IN_SHADER = null;\n}\nfunction getMaxTexturesInShader(webGLVersion) {\n if (MAX_TEXTURES_IN_SHADER == null) {\n const gl = getWebGLContext(webGLVersion);\n MAX_TEXTURES_IN_SHADER = gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS);\n }\n return Math.min(16, MAX_TEXTURES_IN_SHADER);\n}\nfunction getWebGLDisjointQueryTimerVersion(webGLVersion) {\n if (webGLVersion === 0) {\n return 0;\n }\n let queryTimerVersion;\n const gl = getWebGLContext(webGLVersion);\n if (hasExtension(gl, \"EXT_disjoint_timer_query_webgl2\") && webGLVersion === 2) {\n queryTimerVersion = 2;\n } else if (hasExtension(gl, \"EXT_disjoint_timer_query\")) {\n queryTimerVersion = 1;\n } else {\n queryTimerVersion = 0;\n }\n return queryTimerVersion;\n}\nfunction hasExtension(gl, extensionName) {\n const ext = gl.getExtension(extensionName);\n return ext != null;\n}\nfunction isWebGLVersionEnabled(webGLVersion) {\n try {\n const gl = getWebGLContext(webGLVersion);\n if (gl != null) {\n return true;\n }\n } catch (e) {\n console.log(\"Error when getting WebGL context: \", e);\n return false;\n }\n return false;\n}\nfunction isCapableOfRenderingToFloatTexture(webGLVersion) {\n if (webGLVersion === 0) {\n return false;\n }\n const gl = getWebGLContext(webGLVersion);\n if (webGLVersion === 1) {\n if (!hasExtension(gl, \"OES_texture_float\")) {\n return false;\n }\n } else {\n if (!hasExtension(gl, \"EXT_color_buffer_float\")) {\n return false;\n }\n }\n const isFrameBufferComplete = createFloatTextureAndBindToFramebuffer(gl);\n return isFrameBufferComplete;\n}\nfunction isDownloadFloatTextureEnabled(webGLVersion) {\n if (webGLVersion === 0) {\n return false;\n }\n const gl = getWebGLContext(webGLVersion);\n if (webGLVersion === 1) {\n if (!hasExtension(gl, \"OES_texture_float\")) {\n return false;\n }\n if (!hasExtension(gl, \"WEBGL_color_buffer_float\")) {\n return false;\n }\n } else {\n if (hasExtension(gl, \"EXT_color_buffer_float\")) {\n return createFloatTextureAndBindToFramebuffer(gl);\n }\n const COLOR_BUFFER_HALF_FLOAT = \"EXT_color_buffer_half_float\";\n if (hasExtension(gl, COLOR_BUFFER_HALF_FLOAT)) {\n const textureHalfFloatExtension = gl.getExtension(COLOR_BUFFER_HALF_FLOAT);\n return createHalfFloatTextureAndBindToFramebuffer(gl, textureHalfFloatExtension);\n }\n return false;\n }\n const isFrameBufferComplete = createFloatTextureAndBindToFramebuffer(gl);\n return isFrameBufferComplete;\n}\nfunction createFloatTextureAndBindToFramebuffer(gl) {\n const texConfig = getTextureConfig(gl);\n const texture = gl.createTexture();\n gl.bindTexture(gl.TEXTURE_2D, texture);\n const width = 1;\n const height = 1;\n gl.texImage2D(gl.TEXTURE_2D, 0, texConfig.internalFormatFloat, width, height, 0, texConfig.textureFormatFloat, texConfig.textureTypeFloat, null);\n const frameBuffer = gl.createFramebuffer();\n gl.bindFramebuffer(gl.FRAMEBUFFER, frameBuffer);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);\n const isFrameBufferComplete = gl.checkFramebufferStatus(gl.FRAMEBUFFER) === gl.FRAMEBUFFER_COMPLETE;\n gl.bindTexture(gl.TEXTURE_2D, null);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteTexture(texture);\n gl.deleteFramebuffer(frameBuffer);\n return isFrameBufferComplete;\n}\nfunction createHalfFloatTextureAndBindToFramebuffer(gl, textureHalfFloatExtension) {\n const texConfig = getTextureConfig(gl, textureHalfFloatExtension);\n const texture = gl.createTexture();\n gl.bindTexture(gl.TEXTURE_2D, texture);\n const width = 1;\n const height = 1;\n gl.texImage2D(gl.TEXTURE_2D, 0, texConfig.internalFormatHalfFloat, width, height, 0, texConfig.textureFormatFloat, texConfig.textureTypeHalfFloat, null);\n const frameBuffer = gl.createFramebuffer();\n gl.bindFramebuffer(gl.FRAMEBUFFER, frameBuffer);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);\n const isFrameBufferComplete = gl.checkFramebufferStatus(gl.FRAMEBUFFER) === gl.FRAMEBUFFER_COMPLETE;\n gl.bindTexture(gl.TEXTURE_2D, null);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteTexture(texture);\n gl.deleteFramebuffer(frameBuffer);\n return isFrameBufferComplete;\n}\nfunction isWebGLFenceEnabled(webGLVersion) {\n if (webGLVersion !== 2) {\n return false;\n }\n const gl = getWebGLContext(webGLVersion);\n const isEnabled = gl.fenceSync != null;\n return isEnabled;\n}\nfunction assertNotComplex2(tensor2, opName) {\n if (!Array.isArray(tensor2)) {\n tensor2 = [tensor2];\n }\n tensor2.forEach((t) => {\n if (t != null) {\n util_exports.assert(t.dtype !== \"complex64\", () => `${opName} does not support complex64 tensors in the WebGL backend.`);\n }\n });\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/flags_webgl.js\nvar ENV5 = env();\nENV5.registerFlag(\"HAS_WEBGL\", () => ENV5.getNumber(\"WEBGL_VERSION\") > 0);\nENV5.registerFlag(\"WEBGL_VERSION\", () => {\n if (isWebGLVersionEnabled(2)) {\n return 2;\n } else if (isWebGLVersionEnabled(1)) {\n return 1;\n }\n return 0;\n});\nENV5.registerFlag(\"WEBGL_CHECK_NUMERICAL_PROBLEMS\", () => false);\nENV5.registerFlag(\"WEBGL_BUFFER_SUPPORTED\", () => ENV5.get(\"WEBGL_VERSION\") === 2);\nENV5.registerFlag(\"WEBGL_CPU_FORWARD\", () => true);\nENV5.registerFlag(\"WEBGL_FORCE_F16_TEXTURES\", () => false);\nENV5.registerFlag(\"WEBGL_PACK\", () => ENV5.getBool(\"HAS_WEBGL\"));\nENV5.registerFlag(\"WEBGL_PACK_NORMALIZATION\", () => ENV5.getBool(\"WEBGL_PACK\"));\nENV5.registerFlag(\"WEBGL_PACK_CLIP\", () => ENV5.getBool(\"WEBGL_PACK\"));\nENV5.registerFlag(\"WEBGL_PACK_DEPTHWISECONV\", () => ENV5.getBool(\"WEBGL_PACK\"));\nENV5.registerFlag(\"WEBGL_PACK_BINARY_OPERATIONS\", () => ENV5.getBool(\"WEBGL_PACK\"));\nENV5.registerFlag(\"WEBGL_PACK_UNARY_OPERATIONS\", () => ENV5.getBool(\"WEBGL_PACK\"));\nENV5.registerFlag(\"WEBGL_PACK_ARRAY_OPERATIONS\", () => ENV5.getBool(\"WEBGL_PACK\"));\nENV5.registerFlag(\"WEBGL_PACK_IMAGE_OPERATIONS\", () => ENV5.getBool(\"WEBGL_PACK\"));\nENV5.registerFlag(\"WEBGL_PACK_REDUCE\", () => ENV5.getBool(\"WEBGL_PACK\"));\nENV5.registerFlag(\"WEBGL_LAZILY_UNPACK\", () => ENV5.getBool(\"WEBGL_PACK\"));\nENV5.registerFlag(\"WEBGL_CONV_IM2COL\", () => ENV5.getBool(\"WEBGL_PACK\"));\nENV5.registerFlag(\"WEBGL_MAX_TEXTURE_SIZE\", () => getWebGLMaxTextureSize(ENV5.getNumber(\"WEBGL_VERSION\")));\nENV5.registerFlag(\"WEBGL_MAX_TEXTURES_IN_SHADER\", () => getMaxTexturesInShader(ENV5.getNumber(\"WEBGL_VERSION\")));\nENV5.registerFlag(\"WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION\", () => {\n const webGLVersion = ENV5.getNumber(\"WEBGL_VERSION\");\n if (webGLVersion === 0) {\n return 0;\n }\n return getWebGLDisjointQueryTimerVersion(webGLVersion);\n});\nENV5.registerFlag(\"WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE\", () => ENV5.getNumber(\"WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION\") > 0 && !device_util_exports.isMobile());\nENV5.registerFlag(\"WEBGL_RENDER_FLOAT32_CAPABLE\", () => isCapableOfRenderingToFloatTexture(ENV5.getNumber(\"WEBGL_VERSION\")));\nENV5.registerFlag(\"WEBGL_RENDER_FLOAT32_ENABLED\", () => {\n return ENV5.getBool(\"WEBGL_FORCE_F16_TEXTURES\") ? false : ENV5.getBool(\"WEBGL_RENDER_FLOAT32_CAPABLE\");\n});\nENV5.registerFlag(\"WEBGL_DOWNLOAD_FLOAT_ENABLED\", () => isDownloadFloatTextureEnabled(ENV5.getNumber(\"WEBGL_VERSION\")));\nENV5.registerFlag(\"WEBGL_FENCE_API_ENABLED\", () => isWebGLFenceEnabled(ENV5.getNumber(\"WEBGL_VERSION\")));\nENV5.registerFlag(\"WEBGL_SIZE_UPLOAD_UNIFORM\", () => {\n const useUniforms = ENV5.getBool(\"WEBGL_RENDER_FLOAT32_ENABLED\");\n return useUniforms ? 4 : 0;\n});\nENV5.registerFlag(\"WEBGL_DELETE_TEXTURE_THRESHOLD\", () => {\n return -1;\n}, (threshold3) => {\n if (threshold3 < 0 && threshold3 !== -1) {\n throw new Error(`WEBGL_DELETE_TEXTURE_THRESHOLD must be -1 (indicating never delete) or at least 0, but got ${threshold3}.`);\n }\n});\nENV5.registerFlag(\"WEBGL_FLUSH_THRESHOLD\", () => {\n return device_util_exports.isMobile() ? 1 : -1;\n}, (threshold3) => {\n if (threshold3 < 0 && threshold3 !== -1) {\n throw new Error(`WEBGL_FLUSH_THRESHOLD must be -1 (indicating never manual flush) or at least 0, but got ${threshold3}.`);\n }\n});\nENV5.registerFlag(\"CPU_HANDOFF_SIZE_THRESHOLD\", () => 128);\nENV5.registerFlag(\"WEBGL_USE_SHAPES_UNIFORMS\", () => false);\nENV5.registerFlag(\"TOPK_LAST_DIM_CPU_HANDOFF_SIZE_THRESHOLD\", () => 1e5);\nENV5.registerFlag(\"TOPK_K_CPU_HANDOFF_THRESHOLD\", () => 128);\nENV5.registerFlag(\"WEBGL_EXP_CONV\", () => false);\nENV5.registerFlag(\"SOFTWARE_WEBGL_ENABLED\", () => ENV5.getBool(\"IS_TEST\"));\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/glsl_version.js\nfunction getGlslDifferences() {\n let version10;\n let attribute;\n let varyingVs;\n let varyingFs;\n let texture2D;\n let output;\n let defineOutput;\n let defineSpecialNaN;\n let defineSpecialInf;\n let defineRound;\n if (env().getNumber(\"WEBGL_VERSION\") === 2) {\n version10 = \"#version 300 es\";\n attribute = \"in\";\n varyingVs = \"out\";\n varyingFs = \"in\";\n texture2D = \"texture\";\n output = \"outputColor\";\n defineOutput = \"out vec4 outputColor;\";\n defineSpecialNaN = `\n bool isnan_custom(float val) {\n uint floatToUint = floatBitsToUint(val);\n return (floatToUint & 0x7fffffffu) > 0x7f800000u;\n }\n\n bvec4 isnan_custom(vec4 val) {\n return bvec4(isnan_custom(val.x),\n isnan_custom(val.y), isnan_custom(val.z), isnan_custom(val.w));\n }\n\n #define isnan(value) isnan_custom(value)\n `;\n defineSpecialInf = ``;\n defineRound = `\n #define round(value) newRound(value)\n int newRound(float value) {\n return int(floor(value + 0.5));\n }\n\n ivec4 newRound(vec4 value) {\n return ivec4(floor(value + vec4(0.5)));\n }\n `;\n } else {\n version10 = \"\";\n attribute = \"attribute\";\n varyingVs = \"varying\";\n varyingFs = \"varying\";\n texture2D = \"texture2D\";\n output = \"gl_FragColor\";\n defineOutput = \"\";\n defineSpecialNaN = `\n #define isnan(value) isnan_custom(value)\n bool isnan_custom(float val) {\n return (val > 0. || val < 1. || val == 0.) ? false : true;\n }\n bvec4 isnan_custom(vec4 val) {\n return bvec4(isnan(val.x), isnan(val.y), isnan(val.z), isnan(val.w));\n }\n `;\n defineSpecialInf = `\n uniform float INFINITY;\n\n bool isinf(float val) {\n return abs(val) == INFINITY;\n }\n bvec4 isinf(vec4 val) {\n return equal(abs(val), vec4(INFINITY));\n }\n `;\n defineRound = `\n int round(float value) {\n return int(floor(value + 0.5));\n }\n\n ivec4 round(vec4 value) {\n return ivec4(floor(value + vec4(0.5)));\n }\n `;\n }\n return {\n version: version10,\n attribute,\n varyingVs,\n varyingFs,\n texture2D,\n output,\n defineOutput,\n defineSpecialNaN,\n defineSpecialInf,\n defineRound\n };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/shader_compiler_util.js\nfunction getLogicalCoordinatesFromFlatIndex(coords3, shape, index = \"index\") {\n const strides = util_exports.computeStrides(shape);\n return strides.map((stride, i) => {\n const line1 = `int ${coords3[i]} = ${index} / ${stride}`;\n const line2 = i === strides.length - 1 ? `int ${coords3[i + 1]} = ${index} - ${coords3[i]} * ${stride}` : `index -= ${coords3[i]} * ${stride}`;\n return `${line1}; ${line2};`;\n }).join(\"\");\n}\nfunction getOutputLogicalCoordinatesFromFlatIndexByUniform(coords3, shape, index = \"index\") {\n const strides = util_exports.computeStrides(shape);\n return strides.map((_, i) => {\n const line1 = `int ${coords3[i]} = ${index} / outShapeStrides[${i}]`;\n const line2 = i === strides.length - 1 ? `int ${coords3[i + 1]} = ${index} - ${coords3[i]} * outShapeStrides[${i}]` : `index -= ${coords3[i]} * outShapeStrides[${i}]`;\n return `${line1}; ${line2};`;\n }).join(\"\");\n}\nfunction symbolicallyComputeStrides(indicesArr, variableName) {\n const numCoords = indicesArr.length;\n const shape = indicesArr.map((d) => `${variableName}[${d}]`);\n const strides = new Array(numCoords - 1);\n strides[numCoords - 2] = shape[numCoords - 1];\n for (let i = numCoords - 3; i >= 0; --i) {\n strides[i] = `(${strides[i + 1]} * ${shape[i + 1]})`;\n }\n return strides;\n}\nfunction getLogicalCoordinatesFromFlatIndexByUniform(coords3, variableName, index = \"index\") {\n const indicesArray = coords3.map((_, i) => i);\n const strides = symbolicallyComputeStrides(indicesArray, variableName);\n return strides.map((_, i) => {\n const line1 = `int ${coords3[i]} = ${index} / ${strides[i]}`;\n const line2 = i === strides.length - 1 ? `int ${coords3[i + 1]} = ${index} - ${coords3[i]} * ${strides[i]}` : `index -= ${coords3[i]} * ${strides[i]}`;\n return `${line1}; ${line2};`;\n }).join(\"\");\n}\nfunction getFlatIndexFrom3D(shape) {\n const strides = util_exports.computeStrides(shape).map((d) => d.toString());\n return `\n int getFlatIndex(ivec3 coords) {\n return coords.x * ${strides[0]} + coords.y * ${strides[1]} + coords.z;\n }\n`;\n}\nfunction getFlatIndexFrom3DOutput() {\n return `\n int getFlatIndex(ivec3 coords) {\n return coords.x * outShapeStrides[0] + coords.y * outShapeStrides[1] + coords.z;\n }\n`;\n}\nvar ENCODE_FLOAT_SNIPPET = `\n const float FLOAT_MAX = 1.70141184e38;\n const float FLOAT_MIN = 1.17549435e-38;\n\n lowp vec4 encode_float(highp float v) {\n if (isnan(v)) {\n return vec4(255, 255, 255, 255);\n }\n\n highp float av = abs(v);\n\n if(av < FLOAT_MIN) {\n return vec4(0.0, 0.0, 0.0, 0.0);\n } else if(v > FLOAT_MAX) {\n return vec4(0.0, 0.0, 128.0, 127.0) / 255.0;\n } else if(v < -FLOAT_MAX) {\n return vec4(0.0, 0.0, 128.0, 255.0) / 255.0;\n }\n\n highp vec4 c = vec4(0,0,0,0);\n\n highp float e = floor(log2(av));\n highp float m = exp2(fract(log2(av))) - 1.0;\n\n c[2] = floor(128.0 * m);\n m -= c[2] / 128.0;\n c[1] = floor(32768.0 * m);\n m -= c[1] / 32768.0;\n c[0] = floor(8388608.0 * m);\n\n highp float ebias = e + 127.0;\n c[3] = floor(ebias / 2.0);\n ebias -= c[3] * 2.0;\n c[2] += floor(ebias) * 128.0;\n\n c[3] += 128.0 * step(0.0, -v);\n\n return c / 255.0;\n }\n`;\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/shader_compiler.js\nvar { getBroadcastDims: getBroadcastDims2 } = backend_util_exports;\nfunction makeShader(inputsInfo, outputShape, program) {\n const prefixSnippets = [];\n inputsInfo.forEach((x) => {\n const size = util_exports.sizeFromShape(x.shapeInfo.logicalShape);\n if (x.shapeInfo.isUniform) {\n prefixSnippets.push(`uniform float ${x.name}${size > 1 ? `[${size}]` : \"\"};`);\n } else {\n prefixSnippets.push(`uniform sampler2D ${x.name};`);\n prefixSnippets.push(`uniform int offset${x.name};`);\n }\n if (program.enableShapeUniforms) {\n const { uniformShape } = getUniformInfoFromShape(program.packedInputs, x.shapeInfo.logicalShape, x.shapeInfo.texShape);\n switch (uniformShape.length) {\n case 1:\n prefixSnippets.push(`uniform int ${x.name}Shape;`);\n break;\n case 2:\n prefixSnippets.push(`uniform ivec2 ${x.name}Shape;`);\n break;\n case 3:\n prefixSnippets.push(`uniform ivec3 ${x.name}Shape;`);\n break;\n case 4:\n prefixSnippets.push(`uniform ivec4 ${x.name}Shape;`);\n break;\n default:\n break;\n }\n prefixSnippets.push(`uniform ivec2 ${x.name}TexShape;`);\n }\n });\n if (program.enableShapeUniforms) {\n switch (outputShape.logicalShape.length) {\n case 1:\n prefixSnippets.push(`uniform int outShape;`);\n break;\n case 2:\n prefixSnippets.push(`uniform ivec2 outShape;`);\n prefixSnippets.push(`uniform int outShapeStrides;`);\n break;\n case 3:\n prefixSnippets.push(`uniform ivec3 outShape;`);\n prefixSnippets.push(`uniform ivec2 outShapeStrides;`);\n break;\n case 4:\n prefixSnippets.push(`uniform ivec4 outShape;`);\n prefixSnippets.push(`uniform ivec3 outShapeStrides;`);\n break;\n default:\n break;\n }\n prefixSnippets.push(`uniform ivec2 outTexShape;`);\n }\n if (program.customUniforms) {\n program.customUniforms.forEach((d) => {\n prefixSnippets.push(`uniform ${d.type} ${d.name}${d.arrayIndex ? `[${d.arrayIndex}]` : \"\"};`);\n });\n }\n const inputPrefixSnippet = prefixSnippets.join(\"\\n\");\n const inputSamplingSnippet = inputsInfo.map((x) => getInputSamplingSnippet(x, outputShape, program.packedInputs, program.enableShapeUniforms)).join(\"\\n\");\n const outTexShape = outputShape.texShape;\n const glsl = getGlslDifferences();\n const floatTextureSampleSnippet = getFloatTextureSampleSnippet(glsl);\n let outputSamplingSnippet;\n let floatTextureSetOutputSnippet;\n let shaderPrefix = getShaderPrefix(glsl);\n if (outputShape.isPacked) {\n outputSamplingSnippet = getPackedOutputSamplingSnippet(outputShape.logicalShape, outTexShape, program.enableShapeUniforms);\n floatTextureSetOutputSnippet = getFloatTextureSetRGBASnippet(glsl);\n } else {\n outputSamplingSnippet = getOutputSamplingSnippet(outputShape.logicalShape, outTexShape, program.enableShapeUniforms);\n floatTextureSetOutputSnippet = getFloatTextureSetRSnippet(glsl);\n }\n if (program.packedInputs) {\n shaderPrefix += SHADER_PACKED_PREFIX;\n }\n const source = [\n shaderPrefix,\n floatTextureSampleSnippet,\n floatTextureSetOutputSnippet,\n inputPrefixSnippet,\n outputSamplingSnippet,\n inputSamplingSnippet,\n program.userCode\n ].join(\"\\n\");\n return source;\n}\nfunction getSamplerFromInInfo(inInfo, enableShapeUniforms = false) {\n const shape = inInfo.shapeInfo.logicalShape;\n switch (shape.length) {\n case 0:\n return getSamplerScalar(inInfo, enableShapeUniforms);\n case 1:\n return getSampler1D(inInfo, enableShapeUniforms);\n case 2:\n return getSampler2D(inInfo, enableShapeUniforms);\n case 3:\n return getSampler3D(inInfo, enableShapeUniforms);\n case 4:\n return getSampler4D(inInfo, enableShapeUniforms);\n case 5:\n return getSampler5D(inInfo);\n case 6:\n return getSampler6D(inInfo);\n default:\n throw new Error(`${shape.length}-D input sampling is not yet supported`);\n }\n}\nfunction getPackedSamplerFromInInfo(inInfo, enableShapeUniforms) {\n const shape = inInfo.shapeInfo.logicalShape;\n switch (shape.length) {\n case 0:\n return getPackedSamplerScalar(inInfo);\n case 1:\n return getPackedSampler1D(inInfo, enableShapeUniforms);\n case 2:\n return getPackedSampler2D(inInfo, enableShapeUniforms);\n case 3:\n return getPackedSampler3D(inInfo, enableShapeUniforms);\n default:\n return getPackedSamplerND(inInfo, enableShapeUniforms);\n }\n}\nfunction getInputSamplingSnippet(inInfo, outShapeInfo, usesPackedTextures = false, enableShapeUniforms) {\n let res = \"\";\n if (usesPackedTextures) {\n res += getPackedSamplerFromInInfo(inInfo, enableShapeUniforms);\n } else {\n res += getSamplerFromInInfo(inInfo, enableShapeUniforms);\n }\n const inShape = inInfo.shapeInfo.logicalShape;\n const outShape = outShapeInfo.logicalShape;\n if (inShape.length <= outShape.length) {\n if (usesPackedTextures) {\n res += getPackedSamplerAtOutputCoords(inInfo, outShapeInfo);\n } else {\n res += getSamplerAtOutputCoords(inInfo, outShapeInfo);\n }\n }\n return res;\n}\nfunction getPackedOutputSamplingSnippet(outShape, outTexShape, enableShapeUniforms) {\n switch (outShape.length) {\n case 0:\n return getOutputScalarCoords();\n case 1:\n return getOutputPacked1DCoords(outShape, outTexShape, enableShapeUniforms);\n case 2:\n return getOutputPacked2DCoords(outShape, outTexShape, enableShapeUniforms);\n case 3:\n return getOutputPacked3DCoords(outShape, outTexShape, enableShapeUniforms);\n default:\n return getOutputPackedNDCoords(outShape, outTexShape, enableShapeUniforms);\n }\n}\nfunction getOutputSamplingSnippet(outShape, outTexShape, enableShapeUniforms) {\n switch (outShape.length) {\n case 0:\n return getOutputScalarCoords();\n case 1:\n return getOutput1DCoords(outShape, outTexShape, enableShapeUniforms);\n case 2:\n return getOutput2DCoords(outShape, outTexShape, enableShapeUniforms);\n case 3:\n return getOutput3DCoords(outShape, outTexShape, enableShapeUniforms);\n case 4:\n return getOutput4DCoords(outShape, outTexShape, enableShapeUniforms);\n case 5:\n return getOutput5DCoords(outShape, outTexShape);\n case 6:\n return getOutput6DCoords(outShape, outTexShape);\n default:\n throw new Error(`${outShape.length}-D output sampling is not yet supported`);\n }\n}\nfunction getFloatTextureSampleSnippet(glsl) {\n return `\n float sampleTexture(sampler2D textureSampler, vec2 uv) {\n return ${glsl.texture2D}(textureSampler, uv).r;\n }\n `;\n}\nfunction getFloatTextureSetRSnippet(glsl) {\n return `\n void setOutput(float val) {\n ${glsl.output} = vec4(val, 0, 0, 0);\n }\n `;\n}\nfunction getFloatTextureSetRGBASnippet(glsl) {\n return `\n void setOutput(vec4 val) {\n ${glsl.output} = val;\n }\n `;\n}\nfunction getShaderPrefix(glsl) {\n const SHADER_PREFIX = `${glsl.version}\n precision highp float;\n precision highp int;\n precision highp sampler2D;\n ${glsl.varyingFs} vec2 resultUV;\n ${glsl.defineOutput}\n const vec2 halfCR = vec2(0.5, 0.5);\n\n struct ivec5\n {\n int x;\n int y;\n int z;\n int w;\n int u;\n };\n\n struct ivec6\n {\n int x;\n int y;\n int z;\n int w;\n int u;\n int v;\n };\n\n uniform float NAN;\n ${glsl.defineSpecialNaN}\n ${glsl.defineSpecialInf}\n ${glsl.defineRound}\n\n int imod(int x, int y) {\n return x - y * (x / y);\n }\n\n int idiv(int a, int b, float sign) {\n int res = a / b;\n int mod = imod(a, b);\n if (sign < 0. && mod != 0) {\n res -= 1;\n }\n return res;\n }\n\n //Based on the work of Dave Hoskins\n //https://www.shadertoy.com/view/4djSRW\n #define HASHSCALE1 443.8975\n float random(float seed){\n vec2 p = resultUV * seed;\n vec3 p3 = fract(vec3(p.xyx) * HASHSCALE1);\n p3 += dot(p3, p3.yzx + 19.19);\n return fract((p3.x + p3.y) * p3.z);\n }\n\n ${SAMPLE_1D_SNIPPET}\n ${SAMPLE_2D_SNIPPET}\n ${SAMPLE_3D_SNIPPET}\n `;\n return SHADER_PREFIX;\n}\nvar SAMPLE_1D_SNIPPET = `\nvec2 uvFromFlat(int texNumR, int texNumC, int index) {\n int texR = index / texNumC;\n int texC = index - texR * texNumC;\n return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);\n}\nvec2 packedUVfrom1D(int texNumR, int texNumC, int index) {\n int texelIndex = index / 2;\n int texR = texelIndex / texNumC;\n int texC = texelIndex - texR * texNumC;\n return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);\n}\n`;\nvar SAMPLE_2D_SNIPPET = `\nvec2 packedUVfrom2D(int texelsInLogicalRow, int texNumR,\n int texNumC, int row, int col) {\n int texelIndex = (row / 2) * texelsInLogicalRow + (col / 2);\n int texR = texelIndex / texNumC;\n int texC = texelIndex - texR * texNumC;\n return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);\n}\n`;\nvar SAMPLE_3D_SNIPPET = `\nvec2 packedUVfrom3D(int texNumR, int texNumC,\n int texelsInBatch, int texelsInLogicalRow, int b,\n int row, int col) {\n int index = b * texelsInBatch + (row / 2) * texelsInLogicalRow + (col / 2);\n int texR = index / texNumC;\n int texC = index - texR * texNumC;\n return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);\n}\n`;\nvar SHADER_PACKED_PREFIX = `\n float getChannel(vec4 frag, vec2 innerDims) {\n vec2 modCoord = mod(innerDims, 2.);\n return modCoord.x == 0. ?\n (modCoord.y == 0. ? frag.r : frag.g) :\n (modCoord.y == 0. ? frag.b : frag.a);\n }\n float getChannel(vec4 frag, int dim) {\n float modCoord = mod(float(dim), 2.);\n return modCoord == 0. ? frag.r : frag.g;\n }\n`;\nfunction getOutputScalarCoords() {\n return `\n int getOutputCoords() {\n return 0;\n }\n `;\n}\nfunction getOutputPacked1DCoords(shape, texShape, enableShapeUniforms) {\n const packedTexShape = [Math.ceil(texShape[0] / 2), Math.ceil(texShape[1] / 2)];\n if (packedTexShape[0] === 1) {\n if (enableShapeUniforms) {\n return `\n int getOutputCoords() {\n return 2 * int(resultUV.x * ceil(float(outTexShape[1]) / 2.0));\n }\n `;\n }\n return `\n int getOutputCoords() {\n return 2 * int(resultUV.x * ${packedTexShape[1]}.0);\n }\n `;\n }\n if (packedTexShape[1] === 1) {\n if (enableShapeUniforms) {\n return `\n int getOutputCoords() {\n return 2 * int(resultUV.y * ceil(float(outTexShape[0]) / 2.0));\n }\n `;\n }\n return `\n int getOutputCoords() {\n return 2 * int(resultUV.y * ${packedTexShape[0]}.0);\n }\n `;\n }\n if (enableShapeUniforms) {\n return `\n int getOutputCoords() {\n ivec2 packedTexShape = ivec2(ceil(float(outTexShape[0]) / 2.0), ceil(float(outTexShape[1]) / 2.0));\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(packedTexShape[0], packedTexShape[1]));\n return 2 * (resTexRC.x * packedTexShape[1] + resTexRC.y);\n }\n `;\n }\n return `\n int getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(${packedTexShape[0]}, ${packedTexShape[1]}));\n return 2 * (resTexRC.x * ${packedTexShape[1]} + resTexRC.y);\n }\n `;\n}\nfunction getOutput1DCoords(shape, texShape, enableShapeUniforms) {\n if (texShape[0] === 1) {\n if (enableShapeUniforms) {\n return `\n int getOutputCoords() {\n return int(resultUV.x * float(outTexShape[1]));\n }\n `;\n }\n return `\n int getOutputCoords() {\n return int(resultUV.x * ${texShape[1]}.0);\n }\n `;\n }\n if (texShape[1] === 1) {\n if (enableShapeUniforms) {\n return `\n int getOutputCoords() {\n return int(resultUV.y * float(outTexShape[0]));\n }\n `;\n }\n return `\n int getOutputCoords() {\n return int(resultUV.y * ${texShape[0]}.0);\n }\n `;\n }\n if (enableShapeUniforms) {\n return `\n int getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(outTexShape[0], outTexShape[1]));\n return resTexRC.x * outTexShape[1] + resTexRC.y;\n }\n `;\n }\n return `\n int getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(${texShape[0]}, ${texShape[1]}));\n return resTexRC.x * ${texShape[1]} + resTexRC.y;\n }\n `;\n}\nfunction getOutputPacked3DCoords(shape, texShape, enableShapeUniforms) {\n if (enableShapeUniforms) {\n return `\n ivec3 getOutputCoords() {\n ivec2 packedTexShape = ivec2(ceil(float(outTexShape[0]) / 2.0), ceil(float(outTexShape[1]) / 2.0));\n int texelsInLogicalRow = int(ceil(float(outShape[2]) / 2.0));\n int texelsInBatch = texelsInLogicalRow * int(ceil(float(outShape[1]) / 2.0));\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(packedTexShape[0], packedTexShape[1]));\n int index = resTexRC.x * packedTexShape[1] + resTexRC.y;\n\n int b = index / texelsInBatch;\n index -= b * texelsInBatch;\n\n int r = 2 * (index / texelsInLogicalRow);\n int c = imod(index, texelsInLogicalRow) * 2;\n\n return ivec3(b, r, c);\n }\n `;\n }\n const packedTexShape = [Math.ceil(texShape[0] / 2), Math.ceil(texShape[1] / 2)];\n const texelsInLogicalRow = Math.ceil(shape[2] / 2);\n const texelsInBatch = texelsInLogicalRow * Math.ceil(shape[1] / 2);\n return `\n ivec3 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(${packedTexShape[0]}, ${packedTexShape[1]}));\n int index = resTexRC.x * ${packedTexShape[1]} + resTexRC.y;\n\n int b = index / ${texelsInBatch};\n index -= b * ${texelsInBatch};\n\n int r = 2 * (index / ${texelsInLogicalRow});\n int c = imod(index, ${texelsInLogicalRow}) * 2;\n\n return ivec3(b, r, c);\n }\n `;\n}\nfunction getOutput3DCoords(shape, texShape, enableShapeUniforms) {\n if (enableShapeUniforms) {\n const coordsFromIndexSnippet2 = getOutputLogicalCoordinatesFromFlatIndexByUniform([\"r\", \"c\", \"d\"], shape);\n return `\n ivec3 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(outTexShape[0], outTexShape[1]));\n int index = resTexRC.x * outTexShape[1] + resTexRC.y;\n ${coordsFromIndexSnippet2}\n return ivec3(r, c, d);\n }\n`;\n }\n const coordsFromIndexSnippet = getLogicalCoordinatesFromFlatIndex([\"r\", \"c\", \"d\"], shape);\n return `\n ivec3 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(${texShape[0]}, ${texShape[1]}));\n int index = resTexRC.x * ${texShape[1]} + resTexRC.y;\n ${coordsFromIndexSnippet}\n return ivec3(r, c, d);\n }\n `;\n}\nfunction getOutputPackedNDCoords(shape, texShape, enableShapeUniforms) {\n if (enableShapeUniforms) {\n return `\n ivec4 getOutputCoords() {\n ivec2 packedTexShape = ivec2(ceil(float(outTexShape[0]) / 2.0), ceil(float(outTexShape[1]) / 2.0));\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(packedTexShape[0], packedTexShape[1]));\n int index = resTexRC.x * packedTexShape[1] + resTexRC.y;\n\n int texelsInLogicalRow = int(ceil(float(outShape[3]) / 2.0));\n int texelsInBatch = texelsInLogicalRow * int(ceil(float(outShape[2]) / 2.0));\n int texelsInBatchN = texelsInBatch * outShape[1];\n\n int b2 = index / texelsInBatchN;\n index -= b2 * texelsInBatchN;\n\n int b = index / texelsInBatch;\n index -= b * texelsInBatch;\n\n int r = 2 * (index / texelsInLogicalRow);\n int c = imod(index, texelsInLogicalRow) * 2;\n\n return ivec4(b2, b, r, c);\n }\n `;\n }\n const packedTexShape = [Math.ceil(texShape[0] / 2), Math.ceil(texShape[1] / 2)];\n const texelsInLogicalRow = Math.ceil(shape[shape.length - 1] / 2);\n const texelsInBatch = texelsInLogicalRow * Math.ceil(shape[shape.length - 2] / 2);\n let texelsInBatchN = texelsInBatch;\n let batches = ``;\n let coords3 = \"b, r, c\";\n for (let b = 2; b < shape.length - 1; b++) {\n texelsInBatchN *= shape[shape.length - b - 1];\n batches = `\n int b${b} = index / ${texelsInBatchN};\n index -= b${b} * ${texelsInBatchN};\n ` + batches;\n coords3 = `b${b}, ` + coords3;\n }\n return `\n ivec${shape.length} getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(${packedTexShape[0]}, ${packedTexShape[1]}));\n int index = resTexRC.x * ${packedTexShape[1]} + resTexRC.y;\n\n ${batches}\n\n int b = index / ${texelsInBatch};\n index -= b * ${texelsInBatch};\n\n int r = 2 * (index / ${texelsInLogicalRow});\n int c = imod(index, ${texelsInLogicalRow}) * 2;\n\n return ivec${shape.length}(${coords3});\n }\n `;\n}\nfunction getOutput4DCoords(shape, texShape, enableShapeUniforms) {\n if (enableShapeUniforms) {\n const coordsFromIndexSnippet2 = getOutputLogicalCoordinatesFromFlatIndexByUniform([\"r\", \"c\", \"d\", \"d2\"], shape);\n return `\n ivec4 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(outTexShape[0], outTexShape[1]));\n int index = resTexRC.x * outTexShape[1] + resTexRC.y;\n ${coordsFromIndexSnippet2}\n return ivec4(r, c, d, d2);\n }\n `;\n }\n const coordsFromIndexSnippet = getLogicalCoordinatesFromFlatIndex([\"r\", \"c\", \"d\", \"d2\"], shape);\n return `\n ivec4 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(${texShape[0]}, ${texShape[1]}));\n int index = resTexRC.x * ${texShape[1]} + resTexRC.y;\n ${coordsFromIndexSnippet}\n return ivec4(r, c, d, d2);\n }\n `;\n}\nfunction getOutput5DCoords(shape, texShape) {\n const coordsFromIndexSnippet = getLogicalCoordinatesFromFlatIndex([\"r\", \"c\", \"d\", \"d2\", \"d3\"], shape);\n return `\n ivec5 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx * vec2(${texShape[0]},\n ${texShape[1]}));\n\n int index = resTexRC.x * ${texShape[1]} + resTexRC.y;\n\n ${coordsFromIndexSnippet}\n\n ivec5 outShape = ivec5(r, c, d, d2, d3);\n return outShape;\n }\n `;\n}\nfunction getOutput6DCoords(shape, texShape) {\n const coordsFromIndexSnippet = getLogicalCoordinatesFromFlatIndex([\"r\", \"c\", \"d\", \"d2\", \"d3\", \"d4\"], shape);\n return `\n ivec6 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(${texShape[0]}, ${texShape[1]}));\n int index = resTexRC.x * ${texShape[1]} + resTexRC.y;\n\n ${coordsFromIndexSnippet}\n\n ivec6 result = ivec6(r, c, d, d2, d3, d4);\n return result;\n }\n `;\n}\nfunction getOutputPacked2DCoords(shape, texShape, enableShapeUniforms) {\n const packedTexShape = [Math.ceil(texShape[0] / 2), Math.ceil(texShape[1] / 2)];\n if (util_exports.arraysEqual(shape, texShape)) {\n if (enableShapeUniforms) {\n return `\n ivec2 getOutputCoords() {\n ivec2 packedTexShape = ivec2(ceil(float(outTexShape[0]) / 2.0), ceil(float(outTexShape[1]) / 2.0));\n return 2 * ivec2(resultUV.yx * vec2(packedTexShape[0], packedTexShape[1]));\n }\n `;\n }\n return `\n ivec2 getOutputCoords() {\n return 2 * ivec2(resultUV.yx * vec2(${packedTexShape[0]}, ${packedTexShape[1]}));\n }\n `;\n }\n const texelsInLogicalRow = Math.ceil(shape[1] / 2);\n if (enableShapeUniforms) {\n return `\n ivec2 getOutputCoords() {\n ivec2 packedTexShape = ivec2(ceil(float(outTexShape[0]) / 2.0), ceil(float(outTexShape[1]) / 2.0));\n int texelsInLogicalRow = int(ceil(float(outShape[1]) / 2.0));\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(packedTexShape[0], packedTexShape[1]));\n\n int index = resTexRC.x * packedTexShape[1] + resTexRC.y;\n int r = 2 * (index / texelsInLogicalRow);\n int c = imod(index, texelsInLogicalRow) * 2;\n\n return ivec2(r, c);\n }\n `;\n }\n return `\n ivec2 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(${packedTexShape[0]}, ${packedTexShape[1]}));\n\n int index = resTexRC.x * ${packedTexShape[1]} + resTexRC.y;\n int r = 2 * (index / ${texelsInLogicalRow});\n int c = imod(index, ${texelsInLogicalRow}) * 2;\n\n return ivec2(r, c);\n }\n `;\n}\nfunction getOutput2DCoords(shape, texShape, enableShapeUniforms) {\n if (util_exports.arraysEqual(shape, texShape)) {\n if (enableShapeUniforms) {\n return `\n ivec2 getOutputCoords() {\n return ivec2(resultUV.yx * vec2(outTexShape[0], outTexShape[1]));\n }\n `;\n }\n return `\n ivec2 getOutputCoords() {\n return ivec2(resultUV.yx * vec2(${texShape[0]}, ${texShape[1]}));\n }\n `;\n }\n if (shape[1] === 1) {\n if (enableShapeUniforms) {\n return `\n ivec2 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(outTexShape[0], outTexShape[1]));\n int index = resTexRC.x * outTexShape[1] + resTexRC.y;\n return ivec2(index, 0);\n }\n `;\n }\n return `\n ivec2 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(${texShape[0]}, ${texShape[1]}));\n int index = resTexRC.x * ${texShape[1]} + resTexRC.y;\n return ivec2(index, 0);\n }\n `;\n }\n if (shape[0] === 1) {\n if (enableShapeUniforms) {\n return `\n ivec2 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(outTexShape[0], outTexShape[1]));\n int index = resTexRC.x * outTexShape[1] + resTexRC.y;\n return ivec2(0, index);\n }\n `;\n }\n return `\n ivec2 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(${texShape[0]}, ${texShape[1]}));\n int index = resTexRC.x * ${texShape[1]} + resTexRC.y;\n return ivec2(0, index);\n }\n `;\n }\n if (enableShapeUniforms) {\n return `\n ivec2 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(outTexShape[0], outTexShape[1]));\n int index = resTexRC.x * outTexShape[1] + resTexRC.y;\n int r = index / outShape[1];\n int c = index - r * outShape[1];\n return ivec2(r, c);\n }\n `;\n }\n return `\n ivec2 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(${texShape[0]}, ${texShape[1]}));\n int index = resTexRC.x * ${texShape[1]} + resTexRC.y;\n int r = index / ${shape[1]};\n int c = index - r * ${shape[1]};\n return ivec2(r, c);\n }\n `;\n}\nfunction getFlatOffsetUniformName(texName) {\n return `offset${texName}`;\n}\nfunction getPackedSamplerScalar(inputInfo) {\n const texName = inputInfo.name;\n const funcName = \"get\" + texName.charAt(0).toUpperCase() + texName.slice(1);\n const glsl = getGlslDifferences();\n return `\n vec4 ${funcName}() {\n return ${glsl.texture2D}(${texName}, halfCR);\n }\n `;\n}\nfunction getSamplerScalar(inputInfo, enableShapeUniforms) {\n const texName = inputInfo.name;\n const funcName = \"get\" + texName.charAt(0).toUpperCase() + texName.slice(1);\n if (inputInfo.shapeInfo.isUniform) {\n return `float ${funcName}() {return ${texName};}`;\n }\n const [texNumR, texNumC] = inputInfo.shapeInfo.texShape;\n if (texNumR === 1 && texNumC === 1) {\n return `\n float ${funcName}() {\n return sampleTexture(${texName}, halfCR);\n }\n `;\n }\n const offset = getFlatOffsetUniformName(texName);\n if (enableShapeUniforms) {\n return `\n float ${funcName}() {\n vec2 uv = uvFromFlat(${texName}TexShape[0], ${texName}TexShape[1], ${offset});\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n const [tNumR, tNumC] = inputInfo.shapeInfo.texShape;\n return `\n float ${funcName}() {\n vec2 uv = uvFromFlat(${tNumR}, ${tNumC}, ${offset});\n return sampleTexture(${texName}, uv);\n }\n `;\n}\nfunction getPackedSampler1D(inputInfo, enableShapeUniforms) {\n const texName = inputInfo.name;\n const funcName = \"get\" + texName.charAt(0).toUpperCase() + texName.slice(1);\n const texShape = inputInfo.shapeInfo.texShape;\n const glsl = getGlslDifferences();\n if (enableShapeUniforms) {\n return `\n vec4 ${funcName}(int index) {\n ivec2 packedTexShape = ivec2(ceil(float(${texName}TexShape[0]) / 2.0), ceil(float(${texName}TexShape[1]) / 2.0));\n vec2 uv = packedUVfrom1D(\n packedTexShape[0], packedTexShape[1], index);\n return ${glsl.texture2D}(${texName}, uv);\n }\n `;\n }\n const packedTexShape = [Math.ceil(texShape[0] / 2), Math.ceil(texShape[1] / 2)];\n return `\n vec4 ${funcName}(int index) {\n vec2 uv = packedUVfrom1D(\n ${packedTexShape[0]}, ${packedTexShape[1]}, index);\n return ${glsl.texture2D}(${texName}, uv);\n }\n `;\n}\nfunction getSampler1D(inputInfo, enableShapeUniforms) {\n const texName = inputInfo.name;\n const funcName = \"get\" + texName.charAt(0).toUpperCase() + texName.slice(1);\n if (inputInfo.shapeInfo.isUniform) {\n return `\n float ${funcName}(int index) {\n ${getUniformSampler(inputInfo)}\n }\n `;\n }\n const texShape = inputInfo.shapeInfo.texShape;\n const tNumR = texShape[0];\n const tNumC = texShape[1];\n if (tNumC === 1 && tNumR === 1) {\n return `\n float ${funcName}(int index) {\n return sampleTexture(${texName}, halfCR);\n }\n `;\n }\n const offset = getFlatOffsetUniformName(texName);\n if (tNumC === 1) {\n if (enableShapeUniforms) {\n return `\n float ${funcName}(int index) {\n vec2 uv = vec2(0.5, (float(index + ${offset}) + 0.5) / float(${texName}TexShape[0]));\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n return `\n float ${funcName}(int index) {\n vec2 uv = vec2(0.5, (float(index + ${offset}) + 0.5) / ${tNumR}.0);\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n if (tNumR === 1) {\n if (enableShapeUniforms) {\n return `\n float ${funcName}(int index) {\n vec2 uv = vec2((float(index + ${offset}) + 0.5) / float(${texName}TexShape[1]), 0.5);\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n return `\n float ${funcName}(int index) {\n vec2 uv = vec2((float(index + ${offset}) + 0.5) / ${tNumC}.0, 0.5);\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n if (enableShapeUniforms) {\n return `\n float ${funcName}(int index) {\n vec2 uv = uvFromFlat(${texName}TexShape[0], ${texName}TexShape[1], index + ${offset});\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n return `\n float ${funcName}(int index) {\n vec2 uv = uvFromFlat(${tNumR}, ${tNumC}, index + ${offset});\n return sampleTexture(${texName}, uv);\n }\n `;\n}\nfunction getPackedSampler2D(inputInfo, enableShapeUniforms) {\n const shape = inputInfo.shapeInfo.logicalShape;\n const texName = inputInfo.name;\n const funcName = \"get\" + texName.charAt(0).toUpperCase() + texName.slice(1);\n const texShape = inputInfo.shapeInfo.texShape;\n const texNumR = texShape[0];\n const texNumC = texShape[1];\n const glsl = getGlslDifferences();\n if (texShape != null && util_exports.arraysEqual(shape, texShape)) {\n if (enableShapeUniforms) {\n return `\n vec4 ${funcName}(int row, int col) {\n vec2 uv = (vec2(col, row) + halfCR) / vec2(${texName}TexShape[1], ${texName}TexShape[0]);\n\n return ${glsl.texture2D}(${texName}, uv);\n }\n `;\n }\n return `\n vec4 ${funcName}(int row, int col) {\n vec2 uv = (vec2(col, row) + halfCR) / vec2(${texNumC}.0, ${texNumR}.0);\n\n return ${glsl.texture2D}(${texName}, uv);\n }\n `;\n }\n if (enableShapeUniforms) {\n return `\n vec4 ${funcName}(int row, int col) {\n ivec2 packedTexShape = ivec2(ceil(float(${texName}TexShape[0]) / 2.0), ceil(float(${texName}TexShape[1]) / 2.0));\n int valuesPerRow = int(ceil(float(${texName}Shape[1]) / 2.0));\n vec2 uv = packedUVfrom2D(valuesPerRow, packedTexShape[0], packedTexShape[1], row, col);\n return ${glsl.texture2D}(${texName}, uv);\n }\n `;\n }\n const packedTexShape = [Math.ceil(texShape[0] / 2), Math.ceil(texShape[1] / 2)];\n const valuesPerRow = Math.ceil(shape[1] / 2);\n return `\n vec4 ${funcName}(int row, int col) {\n vec2 uv = packedUVfrom2D(${valuesPerRow}, ${packedTexShape[0]}, ${packedTexShape[1]}, row, col);\n return ${glsl.texture2D}(${texName}, uv);\n }\n `;\n}\nfunction getSampler2D(inputInfo, enableShapeUniforms) {\n const shape = inputInfo.shapeInfo.logicalShape;\n const texName = inputInfo.name;\n const funcName = \"get\" + texName.charAt(0).toUpperCase() + texName.slice(1);\n const texShape = inputInfo.shapeInfo.texShape;\n if (texShape != null && util_exports.arraysEqual(shape, texShape)) {\n if (enableShapeUniforms) {\n return `\n float ${funcName}(int row, int col) {\n vec2 uv = (vec2(col, row) + halfCR) / vec2(${texName}TexShape[1], ${texName}TexShape[0]);\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n const texNumR2 = texShape[0];\n const texNumC2 = texShape[1];\n return `\n float ${funcName}(int row, int col) {\n vec2 uv = (vec2(col, row) + halfCR) / vec2(${texNumC2}.0, ${texNumR2}.0);\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n const { newShape, keptDims } = util_exports.squeezeShape(shape);\n const squeezedShape = newShape;\n if (squeezedShape.length < shape.length) {\n const newInputInfo = squeezeInputInfo(inputInfo, squeezedShape);\n const params = [\"row\", \"col\"];\n return `\n ${getSamplerFromInInfo(newInputInfo, enableShapeUniforms)}\n float ${funcName}(int row, int col) {\n return ${funcName}(${getSqueezedParams(params, keptDims)});\n }\n `;\n }\n if (inputInfo.shapeInfo.isUniform) {\n return `\n float ${funcName}(int row, int col) {\n int index = round(dot(vec2(row, col), vec2(${shape[1]}, 1)));\n ${getUniformSampler(inputInfo)}\n }\n `;\n }\n const texNumR = texShape[0];\n const texNumC = texShape[1];\n const offset = getFlatOffsetUniformName(texName);\n if (texNumC === 1) {\n if (enableShapeUniforms) {\n return `\n float ${funcName}(int row, int col) {\n float index = dot(vec3(row, col, ${offset}), vec3(${texName}Shape[1], 1, 1));\n vec2 uv = vec2(0.5, (index + 0.5) / float(${texName}TexShape[0]));\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n return `\n float ${funcName}(int row, int col) {\n float index = dot(vec3(row, col, ${offset}), vec3(${shape[1]}, 1, 1));\n vec2 uv = vec2(0.5, (index + 0.5) / ${texNumR}.0);\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n if (texNumR === 1) {\n if (enableShapeUniforms) {\n return `\n float ${funcName}(int row, int col) {\n float index = dot(vec3(row, col, ${offset}), vec3(${texName}Shape[1], 1, 1));\n vec2 uv = vec2((index + 0.5) / float(${texName}TexShape[1]), 0.5);\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n return `\n float ${funcName}(int row, int col) {\n float index = dot(vec3(row, col, ${offset}), vec3(${shape[1]}, 1, 1));\n vec2 uv = vec2((index + 0.5) / ${texNumC}.0, 0.5);\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n if (enableShapeUniforms) {\n return `\n float ${funcName}(int row, int col) {\n // Explicitly use integer operations as dot() only works on floats.\n int index = row * ${texName}Shape[1] + col + ${offset};\n vec2 uv = uvFromFlat(${texName}TexShape[0], ${texName}TexShape[1], index);\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n return `\n float ${funcName}(int row, int col) {\n // Explicitly use integer operations as dot() only works on floats.\n int index = row * ${shape[1]} + col + ${offset};\n vec2 uv = uvFromFlat(${texNumR}, ${texNumC}, index);\n return sampleTexture(${texName}, uv);\n }\n`;\n}\nfunction getPackedSampler3D(inputInfo, enableShapeUniforms) {\n const shape = inputInfo.shapeInfo.logicalShape;\n const texName = inputInfo.name;\n const funcName = \"get\" + texName.charAt(0).toUpperCase() + texName.slice(1);\n const texShape = inputInfo.shapeInfo.texShape;\n const packedTexShape = [Math.ceil(texShape[0] / 2), Math.ceil(texShape[1] / 2)];\n if (shape[0] === 1) {\n const squeezedShape = shape.slice(1);\n const keptDims = [1, 2];\n const newInputInfo = squeezeInputInfo(inputInfo, squeezedShape);\n const params = [\"b\", \"row\", \"col\"];\n return `\n ${getPackedSamplerFromInInfo(newInputInfo, enableShapeUniforms)}\n vec4 ${funcName}(int b, int row, int col) {\n return ${funcName}(${getSqueezedParams(params, keptDims)});\n }\n `;\n }\n const glsl = getGlslDifferences();\n if (enableShapeUniforms) {\n return `\n vec4 ${funcName}(int b, int row, int col) {\n ivec2 packedTexShape = ivec2(ceil(float(${texName}TexShape[0]) / 2.0), ceil(float(${texName}TexShape[1]) / 2.0));\n int valuesPerRow = int(ceil(float(${texName}Shape[2]) / 2.0));\n int texelsInBatch = valuesPerRow * int(ceil(float(${texName}Shape[1]) / 2.0));\n vec2 uv = packedUVfrom3D(\n packedTexShape[0], packedTexShape[1], texelsInBatch, valuesPerRow, b, row, col);\n return ${glsl.texture2D}(${texName}, uv);\n }\n `;\n }\n const texNumR = packedTexShape[0];\n const texNumC = packedTexShape[1];\n const valuesPerRow = Math.ceil(shape[2] / 2);\n const texelsInBatch = valuesPerRow * Math.ceil(shape[1] / 2);\n return `\n vec4 ${funcName}(int b, int row, int col) {\n vec2 uv = packedUVfrom3D(\n ${texNumR}, ${texNumC}, ${texelsInBatch}, ${valuesPerRow}, b, row, col);\n return ${glsl.texture2D}(${texName}, uv);\n }\n `;\n}\nfunction getSampler3D(inputInfo, enableShapeUniforms) {\n const shape = inputInfo.shapeInfo.logicalShape;\n const texName = inputInfo.name;\n const funcName = \"get\" + texName.charAt(0).toUpperCase() + texName.slice(1);\n const stride0 = shape[1] * shape[2];\n const stride1 = shape[2];\n const { newShape, keptDims } = util_exports.squeezeShape(shape);\n const squeezedShape = newShape;\n if (squeezedShape.length < shape.length) {\n const newInputInfo = squeezeInputInfo(inputInfo, squeezedShape);\n const params = [\"row\", \"col\", \"depth\"];\n return `\n ${getSamplerFromInInfo(newInputInfo, enableShapeUniforms)}\n float ${funcName}(int row, int col, int depth) {\n return ${funcName}(${getSqueezedParams(params, keptDims)});\n }\n `;\n }\n if (inputInfo.shapeInfo.isUniform) {\n return `\n float ${funcName}(int row, int col, int depth) {\n int index = round(dot(vec3(row, col, depth),\n vec3(${stride0}, ${stride1}, 1)));\n ${getUniformSampler(inputInfo)}\n }\n `;\n }\n const texShape = inputInfo.shapeInfo.texShape;\n const texNumR = texShape[0];\n const texNumC = texShape[1];\n const flatOffset = inputInfo.shapeInfo.flatOffset;\n if (texNumC === stride0 && flatOffset == null) {\n if (enableShapeUniforms) {\n return `\n float ${funcName}(int row, int col, int depth) {\n int stride1 = ${texName}Shape[2];\n float texR = float(row);\n float texC = dot(vec2(col, depth), vec2(stride1, 1));\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2(${texName}TexShape[1], ${texName}TexShape[0]);\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n return `\n float ${funcName}(int row, int col, int depth) {\n float texR = float(row);\n float texC = dot(vec2(col, depth), vec2(${stride1}, 1));\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2(${texNumC}.0, ${texNumR}.0);\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n if (texNumC === stride1 && flatOffset == null) {\n if (enableShapeUniforms) {\n return `\n float ${funcName}(int row, int col, int depth) {\n float texR = dot(vec2(row, col), vec2(${texName}Shape[1], 1));\n float texC = float(depth);\n vec2 uv = (vec2(texC, texR) + halfCR) / vec2(${texName}TexShape[1], ${texName}TexShape[0]);\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n return `\n float ${funcName}(int row, int col, int depth) {\n float texR = dot(vec2(row, col), vec2(${shape[1]}, 1));\n float texC = float(depth);\n vec2 uv = (vec2(texC, texR) + halfCR) / vec2(${texNumC}.0, ${texNumR}.0);\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n const offset = getFlatOffsetUniformName(texName);\n if (enableShapeUniforms) {\n return `\n float ${funcName}(int row, int col, int depth) {\n // Explicitly use integer operations as dot() only works on floats.\n int stride0 = ${texName}Shape[1] * ${texName}Shape[2];\n int stride1 = ${texName}Shape[2];\n int index = row * ${stride0} + col * ${stride1} + depth + ${offset};\n vec2 uv = uvFromFlat(${texName}TexShape[0], ${texName}TexShape[1], index);\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n return `\n float ${funcName}(int row, int col, int depth) {\n // Explicitly use integer operations as dot() only works on floats.\n int index = row * ${stride0} + col * ${stride1} + depth + ${offset};\n vec2 uv = uvFromFlat(${texNumR}, ${texNumC}, index);\n return sampleTexture(${texName}, uv);\n }\n `;\n}\nfunction getPackedSamplerND(inputInfo, enableShapeUniforms) {\n const texName = inputInfo.name;\n const funcName = \"get\" + texName.charAt(0).toUpperCase() + texName.slice(1);\n const glsl = getGlslDifferences();\n if (enableShapeUniforms) {\n return `\n vec4 ${funcName}(int b2, int b, int row, int col) {\n int valuesPerRow = int(ceil(float(${texName}Shape[3]) / 2.0));\n int texelsInBatch = valuesPerRow * int(ceil(float(${texName}Shape[2]) / 2.0));\n int index = b * texelsInBatch + (row / 2) * valuesPerRow + (col / 2);\n texelsInBatch *= ${texName}Shape[1];\n index = b2 * texelsInBatch + index;\n ivec2 packedTexShape = ivec2(ceil(float(${texName}TexShape[0]) / 2.0), ceil(float(${texName}TexShape[1]) / 2.0));\n int texR = index / packedTexShape[1];\n int texC = index - texR * packedTexShape[1];\n vec2 uv = (vec2(texC, texR) + halfCR) / vec2(packedTexShape[1], packedTexShape[0]); return ${glsl.texture2D}(${texName}, uv);\n }\n `;\n }\n const shape = inputInfo.shapeInfo.logicalShape;\n const rank = shape.length;\n const texShape = inputInfo.shapeInfo.texShape;\n const packedTexShape = [Math.ceil(texShape[0] / 2), Math.ceil(texShape[1] / 2)];\n const texNumR = packedTexShape[0];\n const texNumC = packedTexShape[1];\n const valuesPerRow = Math.ceil(shape[rank - 1] / 2);\n let texelsInBatch = valuesPerRow * Math.ceil(shape[rank - 2] / 2);\n let params = `int b, int row, int col`;\n let index = `b * ${texelsInBatch} + (row / 2) * ${valuesPerRow} + (col / 2)`;\n for (let b = 2; b < rank - 1; b++) {\n params = `int b${b}, ` + params;\n texelsInBatch *= shape[rank - b - 1];\n index = `b${b} * ${texelsInBatch} + ` + index;\n }\n return `\n vec4 ${funcName}(${params}) {\n int index = ${index};\n int texR = index / ${texNumC};\n int texC = index - texR * ${texNumC};\n vec2 uv = (vec2(texC, texR) + halfCR) / vec2(${texNumC}, ${texNumR});\n return ${glsl.texture2D}(${texName}, uv);\n }\n `;\n}\nfunction getSampler4D(inputInfo, enableShapeUniforms) {\n const shape = inputInfo.shapeInfo.logicalShape;\n const texName = inputInfo.name;\n const funcName = \"get\" + texName.charAt(0).toUpperCase() + texName.slice(1);\n const stride2 = shape[3];\n const stride1 = shape[2] * stride2;\n const stride0 = shape[1] * stride1;\n const { newShape, keptDims } = util_exports.squeezeShape(shape);\n if (newShape.length < shape.length) {\n const newInputInfo = squeezeInputInfo(inputInfo, newShape);\n const params = [\"row\", \"col\", \"depth\", \"depth2\"];\n return `\n ${getSamplerFromInInfo(newInputInfo, enableShapeUniforms)}\n float ${funcName}(int row, int col, int depth, int depth2) {\n return ${funcName}(${getSqueezedParams(params, keptDims)});\n }\n `;\n }\n if (inputInfo.shapeInfo.isUniform) {\n return `\n float ${funcName}(int row, int col, int depth, int depth2) {\n int index = round(dot(vec4(row, col, depth, depth2),\n vec4(${stride0}, ${stride1}, ${stride2}, 1)));\n ${getUniformSampler(inputInfo)}\n }\n `;\n }\n const flatOffset = inputInfo.shapeInfo.flatOffset;\n const texShape = inputInfo.shapeInfo.texShape;\n const texNumR = texShape[0];\n const texNumC = texShape[1];\n const stride2Str = `int stride2 = ${texName}Shape[3];`;\n const stride1Str = `int stride1 = ${texName}Shape[2] * stride2;`;\n const stride0Str = `int stride0 = ${texName}Shape[1] * stride1;`;\n if (texNumC === stride0 && flatOffset == null) {\n if (enableShapeUniforms) {\n return `\n float ${funcName}(int row, int col, int depth, int depth2) {\n ${stride2Str}\n ${stride1Str}\n float texR = float(row);\n float texC =\n dot(vec3(col, depth, depth2),\n vec3(stride1, stride2, 1));\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2(${texName}TexShape[1], ${texName}TexShape[0]);\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n return `\n float ${funcName}(int row, int col, int depth, int depth2) {\n float texR = float(row);\n float texC =\n dot(vec3(col, depth, depth2),\n vec3(${stride1}, ${stride2}, 1));\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2(${texNumC}.0, ${texNumR}.0);\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n if (texNumC === stride2 && flatOffset == null) {\n if (enableShapeUniforms) {\n return `\n float ${funcName}(int row, int col, int depth, int depth2) {\n float texR = dot(vec3(row, col, depth),\n vec3(${texName}Shape[1] * ${texName}Shape[2], ${texName}Shape[2], 1));\n float texC = float(depth2);\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2(${texName}TexShape[1], ${texName}TexShape[0]);\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n return `\n float ${funcName}(int row, int col, int depth, int depth2) {\n float texR = dot(vec3(row, col, depth),\n vec3(${shape[1] * shape[2]}, ${shape[2]}, 1));\n float texC = float(depth2);\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2(${texNumC}.0, ${texNumR}.0);\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n const offset = getFlatOffsetUniformName(texName);\n if (enableShapeUniforms) {\n return `\n float ${funcName}(int row, int col, int depth, int depth2) {\n // Explicitly use integer operations as dot() only works on floats.\n ${stride2Str}\n ${stride1Str}\n ${stride0Str}\n int index = row * stride0 + col * stride1 +\n depth * stride2 + depth2;\n vec2 uv = uvFromFlat(${texName}TexShape[0], ${texName}TexShape[1], index + ${offset});\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n return `\n float ${funcName}(int row, int col, int depth, int depth2) {\n // Explicitly use integer operations as dot() only works on floats.\n int index = row * ${stride0} + col * ${stride1} +\n depth * ${stride2} + depth2;\n vec2 uv = uvFromFlat(${texNumR}, ${texNumC}, index + ${offset});\n return sampleTexture(${texName}, uv);\n }\n `;\n}\nfunction getSampler5D(inputInfo) {\n const shape = inputInfo.shapeInfo.logicalShape;\n const texName = inputInfo.name;\n const funcName = \"get\" + texName.charAt(0).toUpperCase() + texName.slice(1);\n const stride3 = shape[4];\n const stride2 = shape[3] * stride3;\n const stride1 = shape[2] * stride2;\n const stride0 = shape[1] * stride1;\n const { newShape, keptDims } = util_exports.squeezeShape(shape);\n if (newShape.length < shape.length) {\n const newInputInfo = squeezeInputInfo(inputInfo, newShape);\n const params = [\"row\", \"col\", \"depth\", \"depth2\", \"depth3\"];\n return `\n ${getSamplerFromInInfo(newInputInfo)}\n float ${funcName}(int row, int col, int depth, int depth2, int depth3) {\n return ${funcName}(${getSqueezedParams(params, keptDims)});\n }\n `;\n }\n if (inputInfo.shapeInfo.isUniform) {\n return `\n float ${funcName}(int row, int col, int depth, int depth2, int depth3) {\n float index = dot(\n vec4(row, col, depth, depth2),\n vec4(${stride0}, ${stride1}, ${stride2}, ${stride3})) +\n depth3;\n ${getUniformSampler(inputInfo)}\n }\n `;\n }\n const flatOffset = inputInfo.shapeInfo.flatOffset;\n const texShape = inputInfo.shapeInfo.texShape;\n const texNumR = texShape[0];\n const texNumC = texShape[1];\n if (texNumC === stride0 && flatOffset == null) {\n return `\n float ${funcName}(int row, int col, int depth, int depth2, int depth3) {\n int texR = row;\n float texC = dot(vec4(col, depth, depth2, depth3),\n vec4(${stride1}, ${stride2}, ${stride3}, 1));\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2(${texNumC}.0, ${texNumR}.0);\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n if (texNumC === stride3 && flatOffset == null) {\n return `\n float ${funcName}(int row, int col, int depth, int depth2, int depth3) {\n float texR = dot(\n vec4(row, col, depth, depth2),\n vec4(${shape[1] * shape[2] * shape[3]},\n ${shape[2] * shape[3]}, ${shape[3]}, 1));\n int texC = depth3;\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2(${texNumC}.0, ${texNumR}.0);\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n const offset = getFlatOffsetUniformName(texName);\n return `\n float ${funcName}(int row, int col, int depth, int depth2, int depth3) {\n // Explicitly use integer operations as dot() only works on floats.\n int index = row * ${stride0} + col * ${stride1} + depth * ${stride2} +\n depth2 * ${stride3} + depth3 + ${offset};\n vec2 uv = uvFromFlat(${texNumR}, ${texNumC}, index);\n return sampleTexture(${texName}, uv);\n }\n `;\n}\nfunction getSampler6D(inputInfo) {\n const shape = inputInfo.shapeInfo.logicalShape;\n const texName = inputInfo.name;\n const funcName = \"get\" + texName.charAt(0).toUpperCase() + texName.slice(1);\n const { newShape, keptDims } = util_exports.squeezeShape(shape);\n if (newShape.length < shape.length) {\n const newInputInfo = squeezeInputInfo(inputInfo, newShape);\n const params = [\"row\", \"col\", \"depth\", \"depth2\", \"depth3\", \"depth4\"];\n return `\n ${getSamplerFromInInfo(newInputInfo)}\n float ${funcName}(int row, int col, int depth,\n int depth2, int depth3, int depth4) {\n return ${funcName}(${getSqueezedParams(params, keptDims)});\n }\n `;\n }\n const stride4 = shape[5];\n const stride3 = shape[4] * stride4;\n const stride2 = shape[3] * stride3;\n const stride1 = shape[2] * stride2;\n const stride0 = shape[1] * stride1;\n if (inputInfo.shapeInfo.isUniform) {\n return `\n float ${funcName}(int row, int col, int depth,\n int depth2, int depth3, int depth4) {\n int index = round(dot(\n vec4(row, col, depth, depth2),\n vec4(${stride0}, ${stride1}, ${stride2}, ${stride3})) +\n dot(\n vec2(depth3, depth4),\n vec2(${stride4}, 1)));\n ${getUniformSampler(inputInfo)}\n }\n `;\n }\n const flatOffset = inputInfo.shapeInfo.flatOffset;\n const texShape = inputInfo.shapeInfo.texShape;\n const texNumR = texShape[0];\n const texNumC = texShape[1];\n if (texNumC === stride0 && flatOffset == null) {\n return `\n float ${funcName}(int row, int col, int depth,\n int depth2, int depth3, int depth4) {\n int texR = row;\n float texC = dot(vec4(col, depth, depth2, depth3),\n vec4(${stride1}, ${stride2}, ${stride3}, ${stride4})) +\n float(depth4);\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2(${texNumC}.0, ${texNumR}.0);\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n if (texNumC === stride4 && flatOffset == null) {\n return `\n float ${funcName}(int row, int col, int depth,\n int depth2, int depth3, int depth4) {\n float texR = dot(vec4(row, col, depth, depth2),\n vec4(${shape[1] * shape[2] * shape[3] * shape[4]},\n ${shape[2] * shape[3] * shape[4]},\n ${shape[3] * shape[4]},\n ${shape[4]})) + float(depth3);\n int texC = depth4;\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2(${texNumC}.0, ${texNumR}.0);\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n const offset = getFlatOffsetUniformName(texName);\n return `\n float ${funcName}(int row, int col, int depth,\n int depth2, int depth3, int depth4) {\n // Explicitly use integer operations as dot() only works on floats.\n int index = row * ${stride0} + col * ${stride1} + depth * ${stride2} +\n depth2 * ${stride3} + depth3 * ${stride4} + depth4 + ${offset};\n vec2 uv = uvFromFlat(${texNumR}, ${texNumC}, index);\n return sampleTexture(${texName}, uv);\n }\n `;\n}\nfunction getUniformSampler(inputInfo) {\n const texName = inputInfo.name;\n const inSize = util_exports.sizeFromShape(inputInfo.shapeInfo.logicalShape);\n if (inSize < 2) {\n return `return ${texName};`;\n }\n return `\n for (int i = 0; i < ${inSize}; i++) {\n if (i == index) {\n return ${texName}[i];\n }\n }\n `;\n}\nfunction getPackedSamplerAtOutputCoords(inputInfo, outShapeInfo) {\n const texName = inputInfo.name;\n const texFuncSnippet = texName.charAt(0).toUpperCase() + texName.slice(1);\n const funcName = \"get\" + texFuncSnippet + \"AtOutCoords\";\n const inRank = inputInfo.shapeInfo.logicalShape.length;\n const outRank = outShapeInfo.logicalShape.length;\n const broadcastDims = getBroadcastDims2(inputInfo.shapeInfo.logicalShape, outShapeInfo.logicalShape);\n const type = getCoordsDataType(outRank);\n const rankDiff = outRank - inRank;\n let coordsSnippet;\n const fields = [\"x\", \"y\", \"z\", \"w\", \"u\", \"v\"];\n if (inRank === 0) {\n coordsSnippet = \"\";\n } else if (outRank < 2 && broadcastDims.length >= 1) {\n coordsSnippet = \"coords = 0;\";\n } else {\n coordsSnippet = broadcastDims.map((d) => `coords.${fields[d + rankDiff]} = 0;`).join(\"\\n\");\n }\n let unpackedCoordsSnippet = \"\";\n if (outRank < 2 && inRank > 0) {\n unpackedCoordsSnippet = \"coords\";\n } else {\n unpackedCoordsSnippet = inputInfo.shapeInfo.logicalShape.map((s, i) => `coords.${fields[i + rankDiff]}`).join(\", \");\n }\n let output = `return outputValue;`;\n const inSize = util_exports.sizeFromShape(inputInfo.shapeInfo.logicalShape);\n const isInputScalar = inSize === 1;\n const outSize = util_exports.sizeFromShape(outShapeInfo.logicalShape);\n const isOutputScalar = outSize === 1;\n if (inRank === 1 && !isInputScalar && !isOutputScalar) {\n output = `\n return vec4(outputValue.xy, outputValue.xy);\n `;\n } else if (isInputScalar && !isOutputScalar) {\n if (outRank === 1) {\n output = `\n return vec4(outputValue.x, outputValue.x, 0., 0.);\n `;\n } else {\n output = `\n return vec4(outputValue.x);\n `;\n }\n } else if (broadcastDims.length) {\n const rows = inRank - 2;\n const cols = inRank - 1;\n if (broadcastDims.indexOf(rows) > -1 && broadcastDims.indexOf(cols) > -1) {\n output = `return vec4(outputValue.x);`;\n } else if (broadcastDims.indexOf(rows) > -1) {\n output = `return vec4(outputValue.x, outputValue.y, outputValue.x, outputValue.y);`;\n } else if (broadcastDims.indexOf(cols) > -1) {\n output = `return vec4(outputValue.xx, outputValue.zz);`;\n }\n }\n return `\n vec4 ${funcName}() {\n ${type} coords = getOutputCoords();\n ${coordsSnippet}\n vec4 outputValue = get${texFuncSnippet}(${unpackedCoordsSnippet});\n ${output}\n }\n `;\n}\nfunction getSamplerAtOutputCoords(inputInfo, outShapeInfo) {\n const texName = inputInfo.name;\n const texFuncSnippet = texName.charAt(0).toUpperCase() + texName.slice(1);\n const funcName = \"get\" + texFuncSnippet + \"AtOutCoords\";\n const outTexShape = outShapeInfo.texShape;\n const inTexShape = inputInfo.shapeInfo.texShape;\n const inRank = inputInfo.shapeInfo.logicalShape.length;\n const outRank = outShapeInfo.logicalShape.length;\n if (!inputInfo.shapeInfo.isUniform && inRank === outRank && inputInfo.shapeInfo.flatOffset == null && util_exports.arraysEqual(inTexShape, outTexShape)) {\n return `\n float ${funcName}() {\n return sampleTexture(${texName}, resultUV);\n }\n `;\n }\n const type = getCoordsDataType(outRank);\n const broadcastDims = getBroadcastDims2(inputInfo.shapeInfo.logicalShape, outShapeInfo.logicalShape);\n const rankDiff = outRank - inRank;\n let coordsSnippet;\n const fields = [\"x\", \"y\", \"z\", \"w\", \"u\", \"v\"];\n if (inRank === 0) {\n coordsSnippet = \"\";\n } else if (outRank < 2 && broadcastDims.length >= 1) {\n coordsSnippet = \"coords = 0;\";\n } else {\n coordsSnippet = broadcastDims.map((d) => `coords.${fields[d + rankDiff]} = 0;`).join(\"\\n\");\n }\n let unpackedCoordsSnippet = \"\";\n if (outRank < 2 && inRank > 0) {\n unpackedCoordsSnippet = \"coords\";\n } else {\n unpackedCoordsSnippet = inputInfo.shapeInfo.logicalShape.map((s, i) => `coords.${fields[i + rankDiff]}`).join(\", \");\n }\n return `\n float ${funcName}() {\n ${type} coords = getOutputCoords();\n ${coordsSnippet}\n return get${texFuncSnippet}(${unpackedCoordsSnippet});\n }\n `;\n}\nfunction getCoordsDataType(rank) {\n if (rank <= 1) {\n return \"int\";\n } else if (rank === 2) {\n return \"ivec2\";\n } else if (rank === 3) {\n return \"ivec3\";\n } else if (rank === 4) {\n return \"ivec4\";\n } else if (rank === 5) {\n return \"ivec5\";\n } else if (rank === 6) {\n return \"ivec6\";\n } else {\n throw Error(`GPU for rank ${rank} is not yet supported`);\n }\n}\nfunction getUniformInfoFromShape(isPacked, shape, texShape) {\n const { newShape, keptDims } = util_exports.squeezeShape(shape);\n const rank = shape.length;\n const useSqueezePackedShape = isPacked && rank === 3 && shape[0] === 1;\n const squeezeShape2 = useSqueezePackedShape ? shape.slice(1) : newShape;\n const useSqueezeShape = !isPacked && rank > 1 && !util_exports.arraysEqual(shape, texShape) && newShape.length < rank || useSqueezePackedShape;\n const uniformShape = useSqueezeShape ? squeezeShape2 : shape;\n return { useSqueezeShape, uniformShape, keptDims };\n}\nfunction squeezeInputInfo(inInfo, squeezedShape) {\n const newInputInfo = JSON.parse(JSON.stringify(inInfo));\n newInputInfo.shapeInfo.logicalShape = squeezedShape;\n return newInputInfo;\n}\nfunction getSqueezedParams(params, keptDims) {\n return keptDims.map((d) => params[d]).join(\", \");\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/gpgpu_math.js\nfunction compileProgram(gpgpu, program, inputs, output) {\n const inputInfos = inputs.map((input2, i) => {\n const shapeInfo = {\n logicalShape: input2.shape,\n texShape: input2.isUniform ? null : input2.texData.texShape,\n isUniform: input2.isUniform,\n isPacked: input2.isUniform ? false : input2.texData.isPacked,\n flatOffset: null\n };\n if (input2.texData != null && input2.texData.slice != null && input2.texData.slice.flatOffset > 0) {\n shapeInfo.flatOffset = input2.texData.slice.flatOffset;\n }\n return { name: program.variableNames[i], shapeInfo };\n });\n const inShapeInfos = inputInfos.map((x) => x.shapeInfo);\n const outShapeInfo = {\n logicalShape: output.shape,\n texShape: output.texData.texShape,\n isUniform: false,\n isPacked: output.texData.isPacked,\n flatOffset: null\n };\n const source = makeShader(inputInfos, outShapeInfo, program);\n const fragmentShader = createFragmentShader(gpgpu.gl, source);\n const webGLProgram = gpgpu.createProgram(fragmentShader);\n if (!env().get(\"ENGINE_COMPILE_ONLY\")) {\n return Object.assign({\n program,\n fragmentShader,\n source,\n webGLProgram,\n inShapeInfos,\n outShapeInfo\n }, getUniformLocations(gpgpu, program, webGLProgram));\n } else {\n return {\n program,\n fragmentShader,\n source,\n webGLProgram,\n inShapeInfos,\n outShapeInfo,\n uniformLocations: null,\n customUniformLocations: null,\n infLoc: null,\n nanLoc: null,\n inShapesLocations: null,\n inTexShapesLocations: null,\n outShapeLocation: null,\n outShapeStridesLocation: null,\n outTexShapeLocation: null\n };\n }\n}\nfunction getUniformLocations(gpgpu, program, webGLProgram) {\n const uniformLocations = {};\n const inShapesLocations = {};\n const inTexShapesLocations = {};\n const customUniformLocations = [];\n let outShapeLocation;\n let outTexShapeLocation;\n let outShapeStridesLocation;\n let infLoc = null;\n let nanLoc = null;\n nanLoc = gpgpu.getUniformLocation(webGLProgram, \"NAN\", false);\n if (env().getNumber(\"WEBGL_VERSION\") === 1) {\n infLoc = gpgpu.getUniformLocation(webGLProgram, \"INFINITY\", false);\n }\n const shouldThrow = false;\n for (let i = 0; i < program.variableNames.length; i++) {\n const varName = program.variableNames[i];\n uniformLocations[varName] = gpgpu.getUniformLocation(webGLProgram, varName, shouldThrow);\n uniformLocations[`offset${varName}`] = gpgpu.getUniformLocation(webGLProgram, `offset${varName}`, shouldThrow);\n if (program.enableShapeUniforms) {\n inShapesLocations[`${varName}Shape`] = gpgpu.getUniformLocation(webGLProgram, `${varName}Shape`, shouldThrow);\n inTexShapesLocations[`${varName}TexShape`] = gpgpu.getUniformLocation(webGLProgram, `${varName}TexShape`, shouldThrow);\n }\n }\n if (program.enableShapeUniforms) {\n outShapeLocation = gpgpu.getUniformLocation(webGLProgram, \"outShape\", shouldThrow);\n outShapeStridesLocation = gpgpu.getUniformLocation(webGLProgram, \"outShapeStrides\", shouldThrow);\n outTexShapeLocation = gpgpu.getUniformLocation(webGLProgram, \"outTexShape\", shouldThrow);\n }\n if (program.customUniforms) {\n program.customUniforms.forEach((d, i) => {\n customUniformLocations[i] = gpgpu.getUniformLocation(webGLProgram, d.name, shouldThrow);\n });\n }\n return {\n uniformLocations,\n customUniformLocations,\n infLoc,\n nanLoc,\n inShapesLocations,\n inTexShapesLocations,\n outShapeLocation,\n outShapeStridesLocation,\n outTexShapeLocation\n };\n}\nfunction validateBinaryAndProgram(shapeInfos, inputs) {\n if (shapeInfos.length !== inputs.length) {\n throw Error(`Binary was compiled with ${shapeInfos.length} inputs, but was executed with ${inputs.length} inputs`);\n }\n shapeInfos.forEach((s, i) => {\n const shapeA = s.logicalShape;\n const input2 = inputs[i];\n const shapeB = input2.shape;\n if (!util_exports.arraysEqual(shapeA, shapeB)) {\n throw Error(`Binary was compiled with different shapes than the current args. Shapes ${shapeA} and ${shapeB} must match`);\n }\n if (s.isUniform && input2.isUniform) {\n return;\n }\n const texShapeA = s.texShape;\n const texShapeB = input2.isUniform ? null : input2.texData.texShape;\n if (!util_exports.arraysEqual(texShapeA, texShapeB)) {\n throw Error(`Binary was compiled with different texture shapes than the current args. Shape ${texShapeA} and ${texShapeB} must match`);\n }\n });\n}\nfunction runProgram(gpgpu, binary, inputs, output, customUniformValues) {\n if (!binary.program.enableShapeUniforms) {\n validateBinaryAndProgram(binary.inShapeInfos, inputs);\n validateBinaryAndProgram([binary.outShapeInfo], [output]);\n }\n const outTex = output.texData.texture;\n const outTexShape = output.texData.texShape;\n if (output.texData.isPacked) {\n gpgpu.setOutputPackedMatrixTexture(outTex.texture, outTexShape[0], outTexShape[1]);\n } else {\n gpgpu.setOutputMatrixTexture(outTex.texture, outTexShape[0], outTexShape[1]);\n }\n gpgpu.setProgram(binary.webGLProgram);\n if (env().getNumber(\"WEBGL_VERSION\") === 1) {\n if (binary.infLoc !== null) {\n gpgpu.gl.uniform1f(binary.infLoc, Infinity);\n }\n }\n if (binary.nanLoc !== null) {\n gpgpu.gl.uniform1f(binary.nanLoc, NaN);\n }\n inputs.forEach((input2, i) => {\n const varName = binary.program.variableNames[i];\n const varLoc = binary.uniformLocations[varName];\n const varOffsetLoc = binary.uniformLocations[`offset${varName}`];\n const varShapeLoc = binary.inShapesLocations[`${varName}Shape`];\n const varTexShapeLoc = binary.inTexShapesLocations[`${varName}TexShape`];\n if (varShapeLoc) {\n const { uniformShape } = getUniformInfoFromShape(binary.program.packedInputs, input2.shape, input2.texData.texShape);\n switch (uniformShape.length) {\n case 1:\n gpgpu.gl.uniform1iv(varShapeLoc, new Int32Array(uniformShape));\n break;\n case 2:\n gpgpu.gl.uniform2iv(varShapeLoc, new Int32Array(uniformShape));\n break;\n case 3:\n gpgpu.gl.uniform3iv(varShapeLoc, new Int32Array(uniformShape));\n break;\n case 4:\n gpgpu.gl.uniform4iv(varShapeLoc, new Int32Array(uniformShape));\n break;\n default:\n break;\n }\n }\n if (varTexShapeLoc) {\n gpgpu.gl.uniform2i(varTexShapeLoc, input2.texData.texShape[0], input2.texData.texShape[1]);\n }\n if (varLoc == null) {\n return;\n }\n if (input2.isUniform) {\n if (util_exports.sizeFromShape(input2.shape) < 2) {\n gpgpu.gl.uniform1f(varLoc, input2.uniformValues[0]);\n } else {\n let vals = input2.uniformValues;\n if (!(vals instanceof Float32Array)) {\n vals = new Float32Array(vals);\n }\n gpgpu.gl.uniform1fv(varLoc, vals);\n }\n return;\n }\n if (input2.texData.slice != null && varOffsetLoc != null) {\n gpgpu.gl.uniform1i(varOffsetLoc, input2.texData.slice.flatOffset);\n }\n gpgpu.setInputMatrixTexture(input2.texData.texture.texture, varLoc, i);\n });\n const outShapeLoc = binary.outShapeLocation;\n if (outShapeLoc) {\n switch (output.shape.length) {\n case 1:\n gpgpu.gl.uniform1iv(outShapeLoc, new Int32Array(output.shape));\n break;\n case 2:\n gpgpu.gl.uniform2iv(outShapeLoc, new Int32Array(output.shape));\n break;\n case 3:\n gpgpu.gl.uniform3iv(outShapeLoc, new Int32Array(output.shape));\n break;\n case 4:\n gpgpu.gl.uniform4iv(outShapeLoc, new Int32Array(output.shape));\n break;\n default:\n break;\n }\n }\n if (binary.outShapeStridesLocation) {\n const strides = util_exports.computeStrides(output.shape);\n switch (output.shape.length) {\n case 2:\n gpgpu.gl.uniform1iv(binary.outShapeStridesLocation, new Int32Array(strides));\n break;\n case 3:\n gpgpu.gl.uniform2iv(binary.outShapeStridesLocation, new Int32Array(strides));\n break;\n case 4:\n gpgpu.gl.uniform3iv(binary.outShapeStridesLocation, new Int32Array(strides));\n break;\n default:\n break;\n }\n }\n if (binary.outTexShapeLocation) {\n gpgpu.gl.uniform2i(binary.outTexShapeLocation, output.texData.texShape[0], output.texData.texShape[1]);\n }\n if (binary.program.customUniforms && customUniformValues) {\n binary.program.customUniforms.forEach((d, i) => {\n const customLoc = binary.customUniformLocations[i];\n const customValue = customUniformValues[i];\n if (d.type === \"float\") {\n gpgpu.gl.uniform1fv(customLoc, customValue);\n } else if (d.type === \"vec2\") {\n gpgpu.gl.uniform2fv(customLoc, customValue);\n } else if (d.type === \"vec3\") {\n gpgpu.gl.uniform3fv(customLoc, customValue);\n } else if (d.type === \"vec4\") {\n gpgpu.gl.uniform4fv(customLoc, customValue);\n } else if (d.type === \"int\") {\n gpgpu.gl.uniform1iv(customLoc, customValue);\n } else if (d.type === \"ivec2\") {\n gpgpu.gl.uniform2iv(customLoc, customValue);\n } else if (d.type === \"ivec3\") {\n gpgpu.gl.uniform3iv(customLoc, customValue);\n } else if (d.type === \"ivec4\") {\n gpgpu.gl.uniform4iv(customLoc, customValue);\n } else {\n throw Error(`uniform type ${d.type} is not supported yet.`);\n }\n });\n }\n gpgpu.executeProgram();\n}\nfunction makeShaderKey(program, inputs, output) {\n let keyInputs = \"\";\n inputs.concat(output).forEach((x) => {\n const hasOffset = x.texData != null && x.texData.slice != null && x.texData.slice.flatOffset > 0;\n if (program.enableShapeUniforms && !x.isUniform) {\n const xTexShape = x.texData.texShape;\n const { useSqueezeShape, uniformShape, keptDims } = getUniformInfoFromShape(program.packedInputs, x.shape, xTexShape);\n let rank1 = \"\", rank2 = \"\", rank34 = \"\";\n if (uniformShape.length === 1 && program.packedInputs) {\n const packedTexShape = [Math.ceil(xTexShape[0] / 2), Math.ceil(xTexShape[1] / 2)];\n rank1 = `${packedTexShape[0] > 1}_${packedTexShape[1] > 1}`;\n } else if (uniformShape.length === 2 && !program.packedInputs) {\n rank2 = `${uniformShape[0] > 1}_${uniformShape[1] > 1}`;\n } else if (uniformShape.length > 2 && !program.packedInputs) {\n const strides = util_exports.computeStrides(uniformShape);\n rank34 = `${strides[0] === xTexShape[1]}_${strides[strides.length - 1] === xTexShape[1]}`;\n }\n const xRank = x.shape.length;\n const isLogicalShapTexShapeEqual = uniformShape.length === 2 && util_exports.arraysEqual(x.shape, xTexShape);\n const isScalar = util_exports.sizeFromShape(x.shape) === 1;\n const broadcastDims = backend_util_exports.getBroadcastDims(x.shape, output.shape);\n const isInOutTexShapeEqual = !program.packedInputs && xRank === output.shape.length && util_exports.arraysEqual(xTexShape, output.texData.texShape);\n const isTexShapeGreaterThanOne = program.packedInputs || uniformShape.length > 2 ? \"\" : `${xTexShape[0] > 1}_${xTexShape[1] > 1}`;\n keyInputs += `${xRank}_${isInOutTexShapeEqual}_${useSqueezeShape ? keptDims : \"\"}_${uniformShape.length}_${isScalar}_${broadcastDims}_${isLogicalShapTexShapeEqual}_${rank1}_${rank2}_${rank34}_${isTexShapeGreaterThanOne}_${hasOffset}`;\n } else {\n const texShape = x.isUniform ? \"uniform\" : x.texData.texShape;\n keyInputs += `${x.shape}_${texShape}_${hasOffset}`;\n }\n });\n const keyUserCode = program.userCode;\n let key = program.constructor.name;\n key += \"_\" + keyInputs + \"_\" + keyUserCode + `${env().getNumber(\"WEBGL_VERSION\")}`;\n return key;\n}\nfunction useShapeUniforms(rank) {\n return env().getBool(\"WEBGL_USE_SHAPES_UNIFORMS\") && rank <= 4;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/decode_matrix_gpu.js\nvar DecodeMatrixProgram = class {\n constructor(outputShape) {\n this.variableNames = [\"A\"];\n this.packedInputs = false;\n this.packedOutput = true;\n this.outPackingScheme = PackingScheme.DENSE;\n this.customUniforms = [{ name: \"texShape\", type: \"ivec2\" }];\n const glsl = getGlslDifferences();\n this.outputShape = outputShape;\n this.enableShapeUniforms = useShapeUniforms(this.outputShape.length);\n this.userCode = `\n ivec3 outCoordsFromFlatIndex(int index) {\n ${this.enableShapeUniforms ? getOutputLogicalCoordinatesFromFlatIndexByUniform([\"r\", \"c\", \"d\"], outputShape) : getLogicalCoordinatesFromFlatIndex([\"r\", \"c\", \"d\"], outputShape)}\n return ivec3(r, c, d);\n }\n\n void main() {\n ivec2 resTexRC = ivec2(resultUV.yx * vec2(texShape[0], texShape[1]));\n int index = 4 * (resTexRC.x * texShape[1] + resTexRC.y);\n\n vec4 result = vec4(0.);\n\n for (int i=0; i<4; i++) {\n int flatIndex = index + i;\n ivec3 rc = outCoordsFromFlatIndex(flatIndex);\n result[i] = getA(rc.x, rc.y, rc.z);\n }\n\n ${glsl.output} = result;\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/decode_matrix_packed_gpu.js\nvar DecodeMatrixPackedProgram = class {\n constructor(outputShape) {\n this.variableNames = [\"A\"];\n this.packedInputs = true;\n this.packedOutput = true;\n this.outPackingScheme = PackingScheme.DENSE;\n this.customUniforms = [{ name: \"texShape\", type: \"ivec2\" }];\n const glsl = getGlslDifferences();\n this.outputShape = outputShape;\n this.enableShapeUniforms = useShapeUniforms(this.outputShape.length);\n this.userCode = `\n ivec3 outCoordsFromFlatIndex(int index) {\n ${this.enableShapeUniforms ? getOutputLogicalCoordinatesFromFlatIndexByUniform([\"r\", \"c\", \"d\"], outputShape) : getLogicalCoordinatesFromFlatIndex([\"r\", \"c\", \"d\"], outputShape)}\n return ivec3(r, c, d);\n }\n\n void main() {\n ivec2 resTexRC = ivec2(resultUV.yx * vec2(texShape[0], texShape[1]));\n int index = 4 * (resTexRC.x * texShape[1] + resTexRC.y);\n\n vec4 result = vec4(0.);\n\n for (int i=0; i<4; i++) {\n int flatIndex = index + i;\n ivec3 rc = outCoordsFromFlatIndex(flatIndex);\n result[i] = getChannel(getA(rc.x, rc.y, rc.z), vec2(rc.y, rc.z));\n }\n\n ${glsl.output} = result;\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/encode_float_gpu.js\nvar EncodeFloatProgram = class {\n constructor(outputShape) {\n this.variableNames = [\"A\"];\n this.outTexUsage = TextureUsage.DOWNLOAD;\n const glsl = getGlslDifferences();\n this.outputShape = outputShape;\n this.userCode = `\n ${ENCODE_FLOAT_SNIPPET}\n\n void main() {\n float x = getAAtOutCoords();\n ${glsl.output} = encode_float(x);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/encode_float_packed_gpu.js\nvar EncodeFloatPackedProgram = class {\n constructor(outputShape) {\n this.variableNames = [\"A\"];\n this.packedInputs = true;\n this.packedOutput = false;\n this.outTexUsage = TextureUsage.DOWNLOAD;\n const glsl = getGlslDifferences();\n this.outputShape = outputShape;\n this.userCode = `\n ${ENCODE_FLOAT_SNIPPET}\n\n void main() {\n ivec3 coords = getOutputCoords();\n float x = getChannel(getAAtOutCoords(), vec2(coords.y, coords.z));\n ${glsl.output} = encode_float(x);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/encode_matrix_gpu.js\nvar EncodeMatrixProgram = class {\n constructor(outputShape, inputIsUnsignedByte = false) {\n this.variableNames = [\"A\"];\n this.customUniforms = [{ name: \"texShape\", type: \"ivec2\" }];\n const glsl = getGlslDifferences();\n this.outputShape = outputShape;\n this.enableShapeUniforms = useShapeUniforms(this.outputShape.length);\n let output = `result`;\n if (inputIsUnsignedByte) {\n output = `floor(result * 255. + 0.5)`;\n }\n this.userCode = `\n ${this.enableShapeUniforms ? getFlatIndexFrom3DOutput() : getFlatIndexFrom3D(outputShape)}\n\n void main() {\n ivec3 coords = getOutputCoords();\n\n int flatIndex = getFlatIndex(coords);\n int offset = imod(flatIndex, 4);\n\n flatIndex = idiv(flatIndex, 4, 1.);\n\n int r = flatIndex / texShape[1];\n int c = imod(flatIndex, texShape[1]);\n vec2 uv = (vec2(c, r) + halfCR) / vec2(texShape[1], texShape[0]);\n vec4 values = ${glsl.texture2D}(A, uv);\n\n float result;\n\n if(offset == 0) {\n result = values[0];\n } else if(offset == 1) {\n result = values[1];\n } else if(offset == 2) {\n result = values[2];\n } else {\n result = values[3];\n }\n\n ${glsl.output} = vec4(${output}, 0., 0., 0.);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/encode_matrix_packed_gpu.js\nvar EncodeMatrixPackedProgram = class {\n constructor(outputShape, inputIsUnsignedByte = false) {\n this.variableNames = [\"A\"];\n this.packedInputs = false;\n this.packedOutput = true;\n this.customUniforms = [{ name: \"texShape\", type: \"ivec2\" }];\n const glsl = getGlslDifferences();\n this.outputShape = outputShape;\n this.enableShapeUniforms = useShapeUniforms(this.outputShape.length);\n let mainLoop = \"\";\n let output = \"result\";\n if (inputIsUnsignedByte) {\n output = \"floor(result * 255. + 0.5)\";\n }\n for (let row = 0; row <= 1; row++) {\n for (let col = 0; col <= 1; col++) {\n const channel = row * 2 + col;\n mainLoop += `\n localCoords = coords;\n if(localCoords[2] + ${col} < ${this.enableShapeUniforms ? \"outShape[2]\" : `${outputShape[2]}`}) {\n localCoords[2] += ${col};\n if (localCoords[1] + ${row} < ${this.enableShapeUniforms ? \"outShape[1]\" : `${outputShape[1]}`}) {\n localCoords[1] += ${row};\n\n flatIndex = getFlatIndex(localCoords);\n offset = imod(flatIndex, 4);\n\n flatIndex = idiv(flatIndex, 4, 1.);\n\n int r = flatIndex / texShape[1];\n int c = imod(flatIndex, texShape[1]);\n vec2 uv = (vec2(c, r) + halfCR) / vec2(texShape[1], texShape[0]);\n values = ${glsl.texture2D}(A, uv);\n\n if (offset == 0) {\n result[${channel}] = values[0];\n } else if (offset == 1) {\n result[${channel}] = values[1];\n } else if (offset == 2) {\n result[${channel}] = values[2];\n } else {\n result[${channel}] = values[3];\n }\n }\n }\n `;\n }\n }\n this.userCode = `\n ${this.enableShapeUniforms ? getFlatIndexFrom3DOutput() : getFlatIndexFrom3D(outputShape)}\n\n void main() {\n ivec3 coords = getOutputCoords();\n\n vec4 result = vec4(0.);\n int flatIndex, r, c, offset;\n ivec3 localCoords;\n vec2 uv;\n vec4 values;\n\n ${mainLoop}\n\n ${glsl.output} = ${output};\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/gpgpu_util.js\nvar gpgpu_util_exports = {};\n__export(gpgpu_util_exports, {\n bindVertexProgramAttributeStreams: () => bindVertexProgramAttributeStreams,\n createBufferFromOutputTexture: () => createBufferFromOutputTexture,\n createFloat16MatrixTexture: () => createFloat16MatrixTexture,\n createFloat16PackedMatrixTexture: () => createFloat16PackedMatrixTexture,\n createFloat32MatrixTexture: () => createFloat32MatrixTexture,\n createIndexBuffer: () => createIndexBuffer,\n createPackedMatrixTexture: () => createPackedMatrixTexture,\n createUnsignedBytesMatrixTexture: () => createUnsignedBytesMatrixTexture,\n createVertexBuffer: () => createVertexBuffer,\n createVertexShader: () => createVertexShader2,\n downloadByteEncodedFloatMatrixFromOutputTexture: () => downloadByteEncodedFloatMatrixFromOutputTexture,\n downloadFloat32MatrixFromBuffer: () => downloadFloat32MatrixFromBuffer,\n downloadMatrixFromPackedOutputTexture: () => downloadMatrixFromPackedOutputTexture,\n downloadPackedMatrixFromBuffer: () => downloadPackedMatrixFromBuffer,\n getInternalFormatForFloat16MatrixTexture: () => getInternalFormatForFloat16MatrixTexture,\n getInternalFormatForFloat16PackedMatrixTexture: () => getInternalFormatForFloat16PackedMatrixTexture,\n getInternalFormatForFloat32MatrixTexture: () => getInternalFormatForFloat32MatrixTexture,\n getInternalFormatForPackedMatrixTexture: () => getInternalFormatForPackedMatrixTexture,\n getInternalFormatForUnsignedBytesMatrixTexture: () => getInternalFormatForUnsignedBytesMatrixTexture,\n uploadDenseMatrixToTexture: () => uploadDenseMatrixToTexture,\n uploadPixelDataToTexture: () => uploadPixelDataToTexture\n});\nfunction createVertexShader2(gl) {\n const glsl = getGlslDifferences();\n const vertexShaderSource = `${glsl.version}\n precision highp float;\n ${glsl.attribute} vec3 clipSpacePos;\n ${glsl.attribute} vec2 uv;\n ${glsl.varyingVs} vec2 resultUV;\n\n void main() {\n gl_Position = vec4(clipSpacePos, 1);\n resultUV = uv;\n }`;\n return createVertexShader(gl, vertexShaderSource);\n}\nfunction createVertexBuffer(gl) {\n const vertexArray = new Float32Array([-1, 1, 0, 0, 1, -1, -1, 0, 0, 0, 1, 1, 0, 1, 1, 1, -1, 0, 1, 0]);\n return createStaticVertexBuffer(gl, vertexArray);\n}\nfunction createIndexBuffer(gl) {\n const triangleVertexIndices = new Uint16Array([0, 1, 2, 2, 1, 3]);\n return createStaticIndexBuffer(gl, triangleVertexIndices);\n}\nfunction createAndConfigureTexture(gl, width, height, internalFormat, textureFormat, textureType) {\n validateTextureSize(width, height);\n const texture = createTexture(gl);\n const tex2d = gl.TEXTURE_2D;\n callAndCheck(gl, () => gl.bindTexture(tex2d, texture));\n callAndCheck(gl, () => gl.texParameteri(tex2d, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE));\n callAndCheck(gl, () => gl.texParameteri(tex2d, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE));\n callAndCheck(gl, () => gl.texParameteri(tex2d, gl.TEXTURE_MIN_FILTER, gl.NEAREST));\n callAndCheck(gl, () => gl.texParameteri(tex2d, gl.TEXTURE_MAG_FILTER, gl.NEAREST));\n if (env().getNumber(\"WEBGL_VERSION\") === 1) {\n callAndCheck(gl, () => gl.texImage2D(tex2d, 0, internalFormat, width, height, 0, textureFormat, textureType, null));\n } else {\n callAndCheck(gl, () => gl.texStorage2D(tex2d, 1, internalFormat, width, height));\n }\n callAndCheck(gl, () => gl.bindTexture(gl.TEXTURE_2D, null));\n return { texture, texShape: [height, width] };\n}\nfunction getInternalFormatForFloat32MatrixTexture(textureConfig) {\n return textureConfig.internalFormatFloat;\n}\nfunction createFloat32MatrixTexture(gl, rows, columns, textureConfig) {\n const [width, height] = getUnpackedMatrixTextureShapeWidthHeight(rows, columns);\n return createAndConfigureTexture(gl, width, height, getInternalFormatForFloat32MatrixTexture(textureConfig), textureConfig.textureFormatFloat, gl.FLOAT);\n}\nfunction getInternalFormatForFloat16MatrixTexture(textureConfig) {\n return textureConfig.internalFormatHalfFloat;\n}\nfunction createFloat16MatrixTexture(gl, rows, columns, textureConfig) {\n const [width, height] = getUnpackedMatrixTextureShapeWidthHeight(rows, columns);\n return createAndConfigureTexture(gl, width, height, getInternalFormatForFloat16MatrixTexture(textureConfig), textureConfig.textureFormatFloat, textureConfig.textureTypeHalfFloat);\n}\nfunction getInternalFormatForUnsignedBytesMatrixTexture(textureConfig) {\n return textureConfig.downloadTextureFormat;\n}\nfunction createUnsignedBytesMatrixTexture(gl, rows, columns, textureConfig) {\n const [width, height] = getUnpackedMatrixTextureShapeWidthHeight(rows, columns);\n return createAndConfigureTexture(gl, width, height, getInternalFormatForUnsignedBytesMatrixTexture(textureConfig), gl.RGBA, gl.UNSIGNED_BYTE);\n}\nfunction getInternalFormatForPackedMatrixTexture(textureConfig) {\n return textureConfig.internalFormatPackedFloat;\n}\nfunction createPackedMatrixTexture(gl, rows, columns, textureConfig) {\n const [width, height] = getPackedMatrixTextureShapeWidthHeight(rows, columns);\n return createAndConfigureTexture(gl, width, height, getInternalFormatForPackedMatrixTexture(textureConfig), gl.RGBA, gl.FLOAT);\n}\nfunction getInternalFormatForFloat16PackedMatrixTexture(textureConfig) {\n return textureConfig.internalFormatPackedHalfFloat;\n}\nfunction createFloat16PackedMatrixTexture(gl, rows, columns, textureConfig) {\n const [width, height] = getPackedMatrixTextureShapeWidthHeight(rows, columns);\n return createAndConfigureTexture(gl, width, height, getInternalFormatForFloat16PackedMatrixTexture(textureConfig), gl.RGBA, textureConfig.textureTypeHalfFloat);\n}\nfunction bindVertexProgramAttributeStreams(gl, program, vertexBuffer) {\n const posOffset = 0;\n const uvOffset = 3 * 4;\n const stride = 3 * 4 + 2 * 4;\n callAndCheck(gl, () => gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer));\n const success = bindVertexBufferToProgramAttribute(gl, program, \"clipSpacePos\", vertexBuffer, 3, stride, posOffset);\n return success && bindVertexBufferToProgramAttribute(gl, program, \"uv\", vertexBuffer, 2, stride, uvOffset);\n}\nfunction uploadDenseMatrixToTexture(gl, texture, width, height, data, textureConfig) {\n callAndCheck(gl, () => gl.bindTexture(gl.TEXTURE_2D, texture));\n let dataForUpload, texelDataType, internalFormat;\n if (data instanceof Uint8Array) {\n dataForUpload = new Uint8Array(width * height * 4);\n texelDataType = gl.UNSIGNED_BYTE;\n internalFormat = gl.RGBA;\n } else {\n dataForUpload = new Float32Array(width * height * 4);\n texelDataType = gl.FLOAT;\n internalFormat = textureConfig.internalFormatPackedFloat;\n }\n dataForUpload.set(data);\n if (env().getNumber(\"WEBGL_VERSION\") === 2) {\n callAndCheck(gl, () => gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, width, height, gl.RGBA, texelDataType, dataForUpload));\n } else {\n callAndCheck(gl, () => gl.texImage2D(gl.TEXTURE_2D, 0, internalFormat, width, height, 0, gl.RGBA, texelDataType, dataForUpload));\n }\n callAndCheck(gl, () => gl.bindTexture(gl.TEXTURE_2D, null));\n}\nfunction uploadPixelDataToTexture(gl, texture, pixels) {\n callAndCheck(gl, () => gl.bindTexture(gl.TEXTURE_2D, texture));\n if (pixels.data instanceof Uint8Array) {\n if (env().getNumber(\"WEBGL_VERSION\") === 2) {\n callAndCheck(gl, () => gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, pixels.width, pixels.height, gl.RGBA, gl.UNSIGNED_BYTE, pixels.data));\n } else {\n callAndCheck(gl, () => gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, pixels.width, pixels.height, 0, gl.RGBA, gl.UNSIGNED_BYTE, pixels.data));\n }\n } else {\n if (env().getNumber(\"WEBGL_VERSION\") === 2) {\n callAndCheck(gl, () => gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, pixels));\n } else {\n callAndCheck(gl, () => gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, pixels));\n }\n }\n callAndCheck(gl, () => gl.bindTexture(gl.TEXTURE_2D, null));\n}\nfunction createBufferFromOutputTexture(gl2, rows, columns, textureConfig) {\n const buffer2 = gl2.createBuffer();\n callAndCheck(gl2, () => gl2.bindBuffer(gl2.PIXEL_PACK_BUFFER, buffer2));\n const bytesPerFloat = 4;\n const valuesPerTexel = 4;\n const bufferSizeBytes = bytesPerFloat * valuesPerTexel * rows * columns;\n callAndCheck(gl2, () => gl2.bufferData(gl2.PIXEL_PACK_BUFFER, bufferSizeBytes, gl2.STREAM_READ));\n callAndCheck(gl2, () => gl2.readPixels(0, 0, columns, rows, gl2.RGBA, gl2.FLOAT, 0));\n callAndCheck(gl2, () => gl2.bindBuffer(gl2.PIXEL_PACK_BUFFER, null));\n return buffer2;\n}\nfunction downloadFloat32MatrixFromBuffer(gl, buffer2, size) {\n const gl2 = gl;\n const downloadTarget = new Float32Array(size);\n gl2.bindBuffer(gl2.PIXEL_PACK_BUFFER, buffer2);\n gl2.getBufferSubData(gl2.PIXEL_PACK_BUFFER, 0, downloadTarget);\n gl2.bindBuffer(gl2.PIXEL_PACK_BUFFER, null);\n return downloadTarget;\n}\nfunction downloadByteEncodedFloatMatrixFromOutputTexture(gl, rows, columns, textureConfig) {\n const [w, h] = getUnpackedMatrixTextureShapeWidthHeight(rows, columns);\n const numChannels = 4;\n const downloadTarget = new Uint8Array(getUnpackedArraySizeFromMatrixSize(rows * columns, numChannels));\n callAndCheck(gl, () => gl.readPixels(0, 0, w, h, textureConfig.downloadTextureFormat, gl.UNSIGNED_BYTE, downloadTarget));\n return new Float32Array(downloadTarget.buffer);\n}\nfunction downloadPackedMatrixFromBuffer(gl, buffer2, batch, rows, cols, physicalRows, physicalCols, textureConfig) {\n const gl2 = gl;\n const downloadTarget = new Float32Array(getPackedRGBAArraySizeFromMatrixShape(physicalRows, physicalCols));\n gl2.bindBuffer(gl2.PIXEL_PACK_BUFFER, buffer2);\n gl2.getBufferSubData(gl2.PIXEL_PACK_BUFFER, 0, downloadTarget);\n gl2.bindBuffer(gl2.PIXEL_PACK_BUFFER, null);\n return downloadTarget;\n}\nfunction downloadMatrixFromPackedOutputTexture(gl, physicalRows, physicalCols) {\n const packedRGBA = new Float32Array(physicalRows * physicalCols * 4);\n callAndCheck(gl, () => gl.readPixels(0, 0, physicalCols, physicalRows, gl.RGBA, gl.FLOAT, packedRGBA));\n return packedRGBA;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/gpgpu_context.js\nvar GPGPUContext = class {\n constructor(gl) {\n this.outputTexture = null;\n this.program = null;\n this.disposed = false;\n this.vertexAttrsAreBound = false;\n this.itemsToPoll = [];\n const glVersion = env().getNumber(\"WEBGL_VERSION\");\n if (gl != null) {\n this.gl = gl;\n setWebGLContext(glVersion, gl);\n } else {\n this.gl = getWebGLContext(glVersion);\n }\n let COLOR_BUFFER_FLOAT = \"WEBGL_color_buffer_float\";\n const COLOR_BUFFER_HALF_FLOAT = \"EXT_color_buffer_half_float\";\n this.parallelCompilationExtension = this.gl.getExtension(\"KHR_parallel_shader_compile\");\n if (env().getNumber(\"WEBGL_VERSION\") === 1) {\n const TEXTURE_FLOAT = \"OES_texture_float\";\n const TEXTURE_HALF_FLOAT = \"OES_texture_half_float\";\n this.textureFloatExtension = getExtensionOrThrow(this.gl, TEXTURE_FLOAT);\n if (hasExtension(this.gl, TEXTURE_HALF_FLOAT)) {\n this.textureHalfFloatExtension = getExtensionOrThrow(this.gl, TEXTURE_HALF_FLOAT);\n } else if (env().get(\"WEBGL_FORCE_F16_TEXTURES\")) {\n throw new Error(\"GL context does not support half float textures, yet the environment flag WEBGL_FORCE_F16_TEXTURES is set to true.\");\n }\n this.colorBufferFloatExtension = this.gl.getExtension(COLOR_BUFFER_FLOAT);\n if (hasExtension(this.gl, COLOR_BUFFER_HALF_FLOAT)) {\n this.colorBufferHalfFloatExtension = getExtensionOrThrow(this.gl, COLOR_BUFFER_HALF_FLOAT);\n } else if (env().get(\"WEBGL_FORCE_F16_TEXTURES\")) {\n throw new Error(\"GL context does not support color renderable half floats, yet the environment flag WEBGL_FORCE_F16_TEXTURES is set to true.\");\n }\n } else {\n COLOR_BUFFER_FLOAT = \"EXT_color_buffer_float\";\n if (hasExtension(this.gl, COLOR_BUFFER_FLOAT)) {\n this.colorBufferFloatExtension = this.gl.getExtension(COLOR_BUFFER_FLOAT);\n } else if (hasExtension(this.gl, COLOR_BUFFER_HALF_FLOAT)) {\n this.colorBufferHalfFloatExtension = this.gl.getExtension(COLOR_BUFFER_HALF_FLOAT);\n } else {\n throw new Error(\"GL context does not support color renderable floats\");\n }\n }\n this.vertexBuffer = createVertexBuffer(this.gl);\n this.indexBuffer = createIndexBuffer(this.gl);\n this.framebuffer = createFramebuffer(this.gl);\n this.textureConfig = getTextureConfig(this.gl, this.textureHalfFloatExtension);\n }\n get debug() {\n return env().getBool(\"DEBUG\");\n }\n dispose() {\n if (this.disposed) {\n return;\n }\n if (this.program != null) {\n console.warn(\"Disposing a GPGPUContext that still has a bound WebGLProgram. This is probably a resource leak, delete the program with GPGPUContext.deleteProgram before disposing.\");\n }\n if (this.outputTexture != null) {\n console.warn(\"Disposing a GPGPUContext that still has a bound output matrix texture. This is probably a resource leak, delete the output matrix texture with GPGPUContext.deleteMatrixTexture before disposing.\");\n }\n const gl = this.gl;\n callAndCheck(gl, () => gl.finish());\n callAndCheck(gl, () => gl.bindFramebuffer(gl.FRAMEBUFFER, null));\n callAndCheck(gl, () => gl.deleteFramebuffer(this.framebuffer));\n callAndCheck(gl, () => gl.bindBuffer(gl.ARRAY_BUFFER, null));\n callAndCheck(gl, () => gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null));\n callAndCheck(gl, () => gl.deleteBuffer(this.indexBuffer));\n this.disposed = true;\n }\n createFloat32MatrixTexture(rows, columns) {\n this.throwIfDisposed();\n return createFloat32MatrixTexture(this.gl, rows, columns, this.textureConfig);\n }\n createFloat16MatrixTexture(rows, columns) {\n this.throwIfDisposed();\n return createFloat16MatrixTexture(this.gl, rows, columns, this.textureConfig);\n }\n createUnsignedBytesMatrixTexture(rows, columns) {\n this.throwIfDisposed();\n return createUnsignedBytesMatrixTexture(this.gl, rows, columns, this.textureConfig);\n }\n uploadPixelDataToTexture(texture, pixels) {\n this.throwIfDisposed();\n uploadPixelDataToTexture(this.gl, texture, pixels);\n }\n uploadDenseMatrixToTexture(texture, width, height, data) {\n this.throwIfDisposed();\n uploadDenseMatrixToTexture(this.gl, texture, width, height, data, this.textureConfig);\n }\n createFloat16PackedMatrixTexture(rows, columns) {\n this.throwIfDisposed();\n return createFloat16PackedMatrixTexture(this.gl, rows, columns, this.textureConfig);\n }\n createPackedMatrixTexture(rows, columns) {\n this.throwIfDisposed();\n return createPackedMatrixTexture(this.gl, rows, columns, this.textureConfig);\n }\n deleteMatrixTexture(texture) {\n this.throwIfDisposed();\n if (this.outputTexture === texture) {\n unbindColorTextureFromFramebuffer(this.gl, this.framebuffer);\n this.outputTexture = null;\n }\n callAndCheck(this.gl, () => this.gl.deleteTexture(texture));\n }\n downloadByteEncodedFloatMatrixFromOutputTexture(texture, rows, columns) {\n return this.downloadMatrixDriver(texture, () => downloadByteEncodedFloatMatrixFromOutputTexture(this.gl, rows, columns, this.textureConfig));\n }\n downloadPackedMatrixFromBuffer(buffer2, batch, rows, columns, physicalRows, physicalCols) {\n return downloadPackedMatrixFromBuffer(this.gl, buffer2, batch, rows, columns, physicalRows, physicalCols, this.textureConfig);\n }\n downloadFloat32MatrixFromBuffer(buffer2, size) {\n return downloadFloat32MatrixFromBuffer(this.gl, buffer2, size);\n }\n createBufferFromTexture(texture, rows, columns) {\n this.bindTextureToFrameBuffer(texture);\n const result = createBufferFromOutputTexture(this.gl, rows, columns, this.textureConfig);\n this.unbindTextureToFrameBuffer();\n return result;\n }\n createAndWaitForFence() {\n const fenceContext = this.createFence(this.gl);\n return this.pollFence(fenceContext);\n }\n createFence(gl) {\n let query;\n let isFencePassed;\n if (env().getBool(\"WEBGL_FENCE_API_ENABLED\")) {\n const gl2 = gl;\n const sync = gl2.fenceSync(gl2.SYNC_GPU_COMMANDS_COMPLETE, 0);\n gl.flush();\n isFencePassed = () => {\n const status = gl2.clientWaitSync(sync, 0, 0);\n return status === gl2.ALREADY_SIGNALED || status === gl2.CONDITION_SATISFIED;\n };\n query = sync;\n } else if (env().getNumber(\"WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION\") > 0) {\n query = this.beginQuery();\n this.endQuery();\n isFencePassed = () => this.isQueryAvailable(query, env().getNumber(\"WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION\"));\n } else {\n isFencePassed = () => true;\n }\n return { query, isFencePassed };\n }\n downloadMatrixFromPackedTexture(texture, physicalRows, physicalCols) {\n return this.downloadMatrixDriver(texture, () => downloadMatrixFromPackedOutputTexture(this.gl, physicalRows, physicalCols));\n }\n createProgram(fragmentShader) {\n this.throwIfDisposed();\n const gl = this.gl;\n if (this.vertexShader == null) {\n this.vertexShader = createVertexShader2(gl);\n }\n const program = createProgram(gl);\n callAndCheck(gl, () => gl.attachShader(program, this.vertexShader));\n callAndCheck(gl, () => gl.attachShader(program, fragmentShader));\n linkProgram(gl, program);\n if (this.debug) {\n validateProgram(gl, program);\n }\n if (!this.vertexAttrsAreBound) {\n this.setProgram(program);\n this.vertexAttrsAreBound = bindVertexProgramAttributeStreams(gl, this.program, this.vertexBuffer);\n }\n return program;\n }\n deleteProgram(program) {\n this.throwIfDisposed();\n if (program === this.program) {\n this.program = null;\n }\n if (program != null) {\n callAndCheck(this.gl, () => this.gl.deleteProgram(program));\n }\n }\n setProgram(program) {\n this.throwIfDisposed();\n this.program = program;\n if (this.program != null && this.debug) {\n validateProgram(this.gl, this.program);\n }\n callAndCheck(this.gl, () => this.gl.useProgram(program));\n }\n getUniformLocation(program, uniformName, shouldThrow = true) {\n this.throwIfDisposed();\n if (shouldThrow) {\n return getProgramUniformLocationOrThrow(this.gl, program, uniformName);\n } else {\n return getProgramUniformLocation(this.gl, program, uniformName);\n }\n }\n getAttributeLocation(program, attribute) {\n this.throwIfDisposed();\n return callAndCheck(this.gl, () => this.gl.getAttribLocation(program, attribute));\n }\n getUniformLocationNoThrow(program, uniformName) {\n this.throwIfDisposed();\n return this.gl.getUniformLocation(program, uniformName);\n }\n setInputMatrixTexture(inputMatrixTexture, uniformLocation, textureUnit) {\n this.throwIfDisposed();\n this.throwIfNoProgram();\n bindTextureToProgramUniformSampler(this.gl, inputMatrixTexture, uniformLocation, textureUnit);\n }\n setOutputMatrixTexture(outputMatrixTexture, rows, columns) {\n this.setOutputMatrixTextureDriver(outputMatrixTexture, columns, rows);\n }\n setOutputPackedMatrixTexture(outputPackedMatrixTexture, rows, columns) {\n this.throwIfDisposed();\n const [width, height] = getPackedMatrixTextureShapeWidthHeight(rows, columns);\n this.setOutputMatrixTextureDriver(outputPackedMatrixTexture, width, height);\n }\n setOutputMatrixWriteRegion(startRow, numRows, startColumn, numColumns) {\n this.setOutputMatrixWriteRegionDriver(startColumn, startRow, numColumns, numRows);\n }\n setOutputPackedMatrixWriteRegion(startRow, numRows, startColumn, numColumns) {\n throw new Error(\"setOutputPackedMatrixWriteRegion not implemented.\");\n }\n debugValidate() {\n if (this.program != null) {\n validateProgram(this.gl, this.program);\n }\n validateFramebuffer(this.gl);\n }\n executeProgram() {\n this.throwIfDisposed();\n this.throwIfNoProgram();\n const gl = this.gl;\n if (this.debug) {\n this.debugValidate();\n }\n callAndCheck(gl, () => gl.drawElements(gl.TRIANGLES, 6, gl.UNSIGNED_SHORT, 0));\n }\n blockUntilAllProgramsCompleted() {\n this.throwIfDisposed();\n callAndCheck(this.gl, () => this.gl.finish());\n }\n getQueryTimerExtension() {\n if (this.disjointQueryTimerExtension == null) {\n this.disjointQueryTimerExtension = getExtensionOrThrow(this.gl, env().getNumber(\"WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION\") === 2 ? \"EXT_disjoint_timer_query_webgl2\" : \"EXT_disjoint_timer_query\");\n }\n return this.disjointQueryTimerExtension;\n }\n getQueryTimerExtensionWebGL2() {\n return this.getQueryTimerExtension();\n }\n getQueryTimerExtensionWebGL1() {\n return this.getQueryTimerExtension();\n }\n beginQuery() {\n if (env().getNumber(\"WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION\") === 2) {\n const gl2 = this.gl;\n const ext2 = this.getQueryTimerExtensionWebGL2();\n const query2 = gl2.createQuery();\n gl2.beginQuery(ext2.TIME_ELAPSED_EXT, query2);\n return query2;\n }\n const ext = this.getQueryTimerExtensionWebGL1();\n const query = ext.createQueryEXT();\n ext.beginQueryEXT(ext.TIME_ELAPSED_EXT, query);\n return query;\n }\n endQuery() {\n if (env().getNumber(\"WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION\") === 2) {\n const gl2 = this.gl;\n const ext2 = this.getQueryTimerExtensionWebGL2();\n gl2.endQuery(ext2.TIME_ELAPSED_EXT);\n return;\n }\n const ext = this.getQueryTimerExtensionWebGL1();\n ext.endQueryEXT(ext.TIME_ELAPSED_EXT);\n }\n async waitForQueryAndGetTime(query) {\n await util_exports.repeatedTry(() => this.disposed || this.isQueryAvailable(query, env().getNumber(\"WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION\")));\n return this.getQueryTime(query, env().getNumber(\"WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION\"));\n }\n getQueryTime(query, queryTimerVersion) {\n if (queryTimerVersion === 0) {\n return null;\n }\n if (queryTimerVersion === 2) {\n const gl2 = this.gl;\n const timeElapsedNanos = gl2.getQueryParameter(query, gl2.QUERY_RESULT);\n return timeElapsedNanos / 1e6;\n } else {\n const ext = this.getQueryTimerExtensionWebGL1();\n const timeElapsedNanos = ext.getQueryObjectEXT(query, ext.QUERY_RESULT_EXT);\n return timeElapsedNanos / 1e6;\n }\n }\n isQueryAvailable(query, queryTimerVersion) {\n if (queryTimerVersion === 0) {\n return true;\n }\n if (queryTimerVersion === 2) {\n const gl2 = this.gl;\n const ext = this.getQueryTimerExtensionWebGL2();\n const available = gl2.getQueryParameter(query, gl2.QUERY_RESULT_AVAILABLE);\n if (this.disjoint == null) {\n this.disjoint = this.gl.getParameter(ext.GPU_DISJOINT_EXT);\n }\n return available && !this.disjoint;\n } else {\n const ext = this.getQueryTimerExtensionWebGL1();\n const available = ext.getQueryObjectEXT(query, ext.QUERY_RESULT_AVAILABLE_EXT);\n if (this.disjoint == null) {\n this.disjoint = this.gl.getParameter(ext.GPU_DISJOINT_EXT);\n }\n return available && !this.disjoint;\n }\n }\n pollFence(fenceContext) {\n return new Promise((resolve) => {\n this.addItemToPoll(() => fenceContext.isFencePassed(), () => resolve());\n });\n }\n pollItems() {\n const index = linearSearchLastTrue(this.itemsToPoll.map((x) => x.isDoneFn));\n for (let i = 0; i <= index; ++i) {\n const { resolveFn } = this.itemsToPoll[i];\n resolveFn();\n }\n this.itemsToPoll = this.itemsToPoll.slice(index + 1);\n }\n addItemToPoll(isDoneFn, resolveFn) {\n this.itemsToPoll.push({ isDoneFn, resolveFn });\n if (this.itemsToPoll.length > 1) {\n return;\n }\n util_exports.repeatedTry(() => {\n this.pollItems();\n return this.itemsToPoll.length === 0;\n });\n }\n bindTextureToFrameBuffer(texture) {\n this.throwIfDisposed();\n bindColorTextureToFramebuffer(this.gl, texture, this.framebuffer);\n if (this.debug) {\n validateFramebuffer(this.gl);\n }\n }\n unbindTextureToFrameBuffer() {\n if (this.outputTexture != null) {\n bindColorTextureToFramebuffer(this.gl, this.outputTexture, this.framebuffer);\n if (this.debug) {\n validateFramebuffer(this.gl);\n }\n } else {\n unbindColorTextureFromFramebuffer(this.gl, this.framebuffer);\n }\n }\n downloadMatrixDriver(texture, downloadAndDecode) {\n this.bindTextureToFrameBuffer(texture);\n const result = downloadAndDecode();\n this.unbindTextureToFrameBuffer();\n return result;\n }\n setOutputMatrixTextureDriver(outputMatrixTextureMaybePacked, width, height) {\n this.throwIfDisposed();\n const gl = this.gl;\n bindColorTextureToFramebuffer(gl, outputMatrixTextureMaybePacked, this.framebuffer);\n if (this.debug) {\n validateFramebuffer(gl);\n }\n this.outputTexture = outputMatrixTextureMaybePacked;\n callAndCheck(gl, () => gl.viewport(0, 0, width, height));\n callAndCheck(gl, () => gl.scissor(0, 0, width, height));\n }\n setOutputMatrixWriteRegionDriver(x, y, width, height) {\n this.throwIfDisposed();\n callAndCheck(this.gl, () => this.gl.scissor(x, y, width, height));\n }\n throwIfDisposed() {\n if (this.disposed) {\n throw new Error(\"Attempted to use disposed GPGPUContext.\");\n }\n }\n throwIfNoProgram() {\n if (this.program == null) {\n throw new Error(\"No GPU program is currently set.\");\n }\n }\n};\nfunction linearSearchLastTrue(arr) {\n let i = 0;\n for (; i < arr.length; ++i) {\n const isDone = arr[i]();\n if (!isDone) {\n break;\n }\n }\n return i - 1;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernel_utils/shared.js\nvar { addImpl: addImplCPU, bincountImpl: bincountImplCPU, bincountReduceImpl: bincountReduceImplCPU, castImpl: castImplCPU, ceilImpl: ceilImplCPU, concatImpl: concatImplCPU, equalImpl: equalImplCPU, expImpl: expImplCPU, expm1Impl: expm1ImplCPU, floorImpl: floorImplCPU, gatherNdImpl: gatherNdImplCPU, gatherV2Impl: gatherV2ImplCPU, greaterImpl: greaterImplCPU, greaterEqualImpl: greaterEqualImplCPU, lessImpl: lessImplCPU, lessEqualImpl: lessEqualImplCPU, linSpaceImpl: linSpaceImplCPU, logImpl: logImplCPU, maxImpl: maxImplCPU, maximumImpl: maximumImplCPU, minimumImpl: minimumImplCPU, multiplyImpl: multiplyImplCPU, negImpl: negImplCPU, notEqualImpl: notEqualImplCPU, prodImpl: prodImplCPU, raggedTensorToTensorImpl: raggedTensorToTensorImplCPU, rangeImpl: rangeImplCPU, rsqrtImpl: rsqrtImplCPU, scatterImpl: scatterImplCPU, sigmoidImpl: sigmoidImplCPU, simpleAbsImpl: simpleAbsImplCPU, sliceImpl: sliceImplCPU, sparseFillEmptyRowsImpl: sparseFillEmptyRowsImplCPU, sparseReshapeImpl: sparseReshapeImplCPU, sparseSegmentReductionImpl: sparseSegmentReductionImplCPU, sqrtImpl: sqrtImplCPU, stridedSliceImpl: stridedSliceImplCPU, stringNGramsImpl: stringNGramsImplCPU, stringSplitImpl: stringSplitImplCPU, stringToHashBucketFastImpl: stringToHashBucketFastImplCPU, subImpl: subImplCPU, tileImpl: tileImplCPU, topKImpl: topKImplCPU, transposeImpl: transposeImplCPU, uniqueImpl: uniqueImplCPU } = shared_exports;\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/packing_util.js\nfunction getVecChannels(name, rank) {\n return [\"x\", \"y\", \"z\", \"w\", \"u\", \"v\"].slice(0, rank).map((d) => `${name}.${d}`);\n}\nfunction getChannels(name, rank) {\n if (rank === 1) {\n return [name];\n }\n return getVecChannels(name, rank);\n}\nfunction getSourceCoords(rank, dims) {\n if (rank === 1) {\n return \"rc\";\n }\n let coords3 = \"\";\n for (let i = 0; i < rank; i++) {\n coords3 += dims[i];\n if (i < rank - 1) {\n coords3 += \",\";\n }\n }\n return coords3;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/pack_gpu.js\nvar PackProgram = class {\n constructor(outputShape) {\n this.variableNames = [\"A\"];\n this.packedInputs = false;\n this.packedOutput = true;\n this.outputShape = outputShape;\n this.rank = outputShape.length;\n this.enableShapeUniforms = useShapeUniforms(this.outputShape.length);\n if (this.rank === 0) {\n this.userCode = `\n void main() {\n setOutput(vec4(getA(), 0., 0., 0.));\n }\n `;\n } else {\n const channels = getChannels(\"rc\", this.rank);\n const dtype = getCoordsDataType(this.rank);\n const outOfBoundsCondition = this.getOutOfBoundsCondition(channels);\n const setup51 = this.getSetup(channels);\n const output = this.getOutput(channels);\n this.userCode = `\n void main() {\n ${dtype} rc = getOutputCoords();\n\n if(${outOfBoundsCondition}) {\n setOutput(vec4(0));\n } else {\n ${setup51}\n\n setOutput(vec4(${output}));\n }\n }\n `;\n }\n }\n getSourceCoordsArr(dims) {\n const coords3 = [];\n for (let row = 0; row <= 1; row++) {\n for (let col = 0; col <= 1; col++) {\n let coord = `${row === 0 ? \"r\" : \"rp1\"}, ${col === 0 ? \"c\" : \"cp1\"}`;\n for (let d = 2; d < this.rank; d++) {\n coord = `${dims[dims.length - 1 - d]},` + coord;\n }\n coords3.push(coord);\n }\n }\n return coords3;\n }\n getOutOfBoundsCondition(dims) {\n if (this.rank === 1) {\n return `rc > ${this.enableShapeUniforms ? \"outShape\" : this.outputShape[0]}`;\n }\n let cond = \"\";\n for (let i = this.rank - 2; i < this.rank; i++) {\n cond += `${dims[i]} >= ${this.enableShapeUniforms ? `outShape[${i}]` : this.outputShape[i]}`;\n if (i < this.rank - 1) {\n cond += \"||\";\n }\n }\n return cond;\n }\n getSetup(dims) {\n if (this.rank === 1) {\n return \"\";\n }\n const innerDims = dims.slice(-2);\n const col = this.enableShapeUniforms ? `outShape[${this.rank} - 1]` : this.outputShape[this.rank - 1];\n const row = this.enableShapeUniforms ? `outShape[${this.rank} - 2]` : this.outputShape[this.rank - 2];\n return `\n int r = ${innerDims[0]};\n int c = ${innerDims[1]};\n int rp1 = r + 1;\n int cp1 = c + 1;\n\n bool cEdge = cp1 >= ${col};\n bool rEdge = rp1 >= ${row};\n `;\n }\n getOutput(dims) {\n const sourceCoords = this.getSourceCoordsArr(dims);\n if (this.rank === 1) {\n const outShape = this.enableShapeUniforms ? \"outShape\" : this.outputShape[0];\n return `getA(rc), (rc + 1 >= ${outShape} ? 0. : getA(rc + 1)), 0, 0`;\n }\n return `getA(${sourceCoords[0]}),\n cEdge ? 0. : getA(${sourceCoords[1]}),\n rEdge ? 0. : getA(${sourceCoords[2]}),\n rEdge || cEdge ? 0. : getA(${sourceCoords[3]})`;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/reshape_packed_gpu.js\nvar ReshapePackedProgram = class {\n constructor(outputShape, inputShape) {\n this.variableNames = [\"A\"];\n this.packedInputs = true;\n this.packedOutput = true;\n this.customUniforms = [{ name: \"inputShape\", type: \"ivec3\" }];\n this.outputShape = outputShape;\n this.enableShapeUniforms = useShapeUniforms(this.outputShape.length);\n let mainLoop = ``;\n for (let i = 0; i < 4; i++) {\n let thisRC = `thisRC = rc;`;\n if (i % 2 === 1) {\n thisRC += `thisRC.z += 1;`;\n }\n if (i > 1) {\n thisRC += `thisRC.y += 1;`;\n }\n mainLoop += `\n ${thisRC}\n ${i > 0 ? `if(thisRC.y < rows && thisRC.z < cols){` : \"\"}\n int flatIndex = getFlatIndex(thisRC);\n\n ivec3 inputRC = inputCoordsFromReshapedOutCoords(flatIndex);\n vec2 inputRCInnerDims = vec2(float(inputRC.y),float(inputRC.z));\n\n result[${i}] =\n getChannel(getA(inputRC.x, inputRC.y, inputRC.z), inputRCInnerDims);\n ${i > 0 ? \"}\" : \"\"}\n `;\n }\n this.userCode = `\n ${getReshapedInputCoords(inputShape, this.enableShapeUniforms)}\n ${this.enableShapeUniforms ? getFlatIndexFrom3DOutput() : getFlatIndexFrom3D(outputShape)}\n\n void main() {\n ivec3 rc = getOutputCoords();\n\n vec4 result = vec4(0.);\n\n ivec3 thisRC;\n int rows = ${this.enableShapeUniforms ? \"outShape[1]\" : outputShape[1]};\n int cols = ${this.enableShapeUniforms ? \"outShape[2]\" : outputShape[2]};\n\n ${mainLoop}\n\n setOutput(result);\n }\n `;\n }\n};\nfunction getReshapedInputCoords(shape, enableShapeUniforms) {\n const coordsFromIndexSnippet = enableShapeUniforms ? getLogicalCoordinatesFromFlatIndexByUniform([\"r\", \"c\", \"d\"], \"inputShape\") : getLogicalCoordinatesFromFlatIndex([\"r\", \"c\", \"d\"], shape);\n return `\n ivec3 inputCoordsFromReshapedOutCoords(int index) {\n ${coordsFromIndexSnippet}\n return ivec3(r, c, d);\n }\n `;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/texture_manager.js\nvar TextureManager = class {\n constructor(gpgpu) {\n this.gpgpu = gpgpu;\n this.numUsedTextures = 0;\n this.numFreeTextures = 0;\n this._numBytesAllocated = 0;\n this._numBytesFree = 0;\n this.freeTextures = {};\n this.logEnabled = false;\n this.usedTextures = {};\n }\n acquireTexture(shapeRC, usage, isPacked) {\n const physicalTexType = getPhysicalFromLogicalTextureType(usage, isPacked);\n const shapeKey = getKeyFromTextureShape(shapeRC, physicalTexType, isPacked);\n if (!(shapeKey in this.freeTextures)) {\n this.freeTextures[shapeKey] = [];\n }\n if (!(shapeKey in this.usedTextures)) {\n this.usedTextures[shapeKey] = [];\n }\n const texBytes = computeBytes(shapeRC, physicalTexType, this.gpgpu.gl, this.gpgpu.textureConfig, isPacked);\n if (this.freeTextures[shapeKey].length > 0) {\n this.numFreeTextures--;\n this.numUsedTextures++;\n this._numBytesFree -= texBytes;\n this.log();\n const newTexture2 = this.freeTextures[shapeKey].shift();\n this.usedTextures[shapeKey].push(newTexture2);\n return newTexture2;\n }\n let newTexture;\n if (physicalTexType === PhysicalTextureType.PACKED_2X2_FLOAT32) {\n newTexture = this.gpgpu.createPackedMatrixTexture(shapeRC[0], shapeRC[1]);\n } else if (physicalTexType === PhysicalTextureType.PACKED_2X2_FLOAT16) {\n newTexture = this.gpgpu.createFloat16PackedMatrixTexture(shapeRC[0], shapeRC[1]);\n } else if (physicalTexType === PhysicalTextureType.UNPACKED_FLOAT32) {\n newTexture = this.gpgpu.createFloat32MatrixTexture(shapeRC[0], shapeRC[1]);\n } else if (physicalTexType === PhysicalTextureType.UNPACKED_FLOAT16) {\n newTexture = this.gpgpu.createFloat16MatrixTexture(shapeRC[0], shapeRC[1]);\n } else if (physicalTexType === PhysicalTextureType.PACKED_4X1_UNSIGNED_BYTE) {\n newTexture = this.gpgpu.createUnsignedBytesMatrixTexture(shapeRC[0], shapeRC[1]);\n }\n this.usedTextures[shapeKey].push(newTexture);\n this.numUsedTextures++;\n this._numBytesAllocated += texBytes;\n this.log();\n return newTexture;\n }\n releaseTexture(texture, shape, logicalTexType, isPacked) {\n if (this.freeTextures == null) {\n return;\n }\n const physicalTexType = getPhysicalFromLogicalTextureType(logicalTexType, isPacked);\n const shapeKey = getKeyFromTextureShape(shape, physicalTexType, isPacked);\n if (!(shapeKey in this.freeTextures)) {\n this.freeTextures[shapeKey] = [];\n }\n const texBytes = computeBytes(shape, physicalTexType, this.gpgpu.gl, this.gpgpu.textureConfig, isPacked);\n const deleteTexThreshold = env().get(\"WEBGL_DELETE_TEXTURE_THRESHOLD\");\n if (deleteTexThreshold !== -1 && this._numBytesAllocated > deleteTexThreshold) {\n this.gpgpu.deleteMatrixTexture(texture.texture);\n this._numBytesAllocated -= texBytes;\n } else {\n this.freeTextures[shapeKey].push(texture);\n this.numFreeTextures++;\n this._numBytesFree += texBytes;\n }\n this.numUsedTextures--;\n const texList = this.usedTextures[shapeKey];\n const texIndex = texList.indexOf(texture);\n if (texIndex < 0) {\n throw new Error(\"Cannot release a texture that was never provided by this texture manager\");\n }\n texList.splice(texIndex, 1);\n this.log();\n }\n log() {\n if (!this.logEnabled) {\n return;\n }\n const total = this.numFreeTextures + this.numUsedTextures;\n console.log(\"Free/Used\", `${this.numFreeTextures} / ${this.numUsedTextures}`, `(${total})`);\n const freeRatio = this._numBytesFree / this._numBytesAllocated;\n console.log(`Bytes allocated: ${this._numBytesAllocated}`);\n console.log(`Bytes unused: ${this._numBytesFree} (${Math.round(100 * freeRatio)}%)`);\n }\n get numBytesAllocated() {\n return this._numBytesAllocated;\n }\n get numBytesFree() {\n return this._numBytesFree;\n }\n getNumUsedTextures() {\n return this.numUsedTextures;\n }\n getNumFreeTextures() {\n return this.numFreeTextures;\n }\n dispose() {\n if (this.freeTextures == null) {\n return;\n }\n for (const texShape in this.freeTextures) {\n this.freeTextures[texShape].forEach((tex) => {\n this.gpgpu.deleteMatrixTexture(tex.texture);\n });\n }\n for (const texShape in this.usedTextures) {\n this.usedTextures[texShape].forEach((tex) => {\n this.gpgpu.deleteMatrixTexture(tex.texture);\n });\n }\n this.freeTextures = null;\n this.usedTextures = null;\n this.numUsedTextures = 0;\n this.numFreeTextures = 0;\n this._numBytesAllocated = 0;\n this._numBytesFree = 0;\n }\n};\nfunction numBytesForInternalFormat(gl, internalFormat) {\n const glany = gl;\n if (internalFormat === glany.R32F) {\n return 4;\n } else if (internalFormat === glany.R16F) {\n return 2;\n } else if (internalFormat === glany.RGBA32F) {\n return 16;\n } else if (internalFormat === gl.RGBA) {\n return 16;\n } else if (internalFormat === glany.RGBA16F) {\n return 8;\n } else if (internalFormat === glany.RGBA8) {\n return 4;\n }\n throw new Error(`Unknown internal format ${internalFormat}`);\n}\nfunction computeBytes(shape, physicalTexType, gl, textureConfig, isPacked) {\n const internalFormat = internalFormatForPhysicalTexType(physicalTexType, textureConfig);\n let numElements;\n if (isPacked) {\n const [packedWidth, packedHeight] = getPackedMatrixTextureShapeWidthHeight(shape[0], shape[1]);\n numElements = packedWidth * packedHeight;\n } else {\n const [width, height] = getUnpackedMatrixTextureShapeWidthHeight(shape[0], shape[1]);\n numElements = width * height;\n }\n const bytesPerElement2 = numBytesForInternalFormat(gl, internalFormat);\n return numElements * bytesPerElement2;\n}\nfunction internalFormatForPhysicalTexType(physicalTexType, textureConfig) {\n switch (physicalTexType) {\n case PhysicalTextureType.PACKED_2X2_FLOAT32:\n return getInternalFormatForPackedMatrixTexture(textureConfig);\n case PhysicalTextureType.PACKED_2X2_FLOAT16:\n return getInternalFormatForFloat16PackedMatrixTexture(textureConfig);\n case PhysicalTextureType.UNPACKED_FLOAT32:\n return getInternalFormatForFloat32MatrixTexture(textureConfig);\n case PhysicalTextureType.UNPACKED_FLOAT16:\n return getInternalFormatForFloat16MatrixTexture(textureConfig);\n case PhysicalTextureType.PACKED_4X1_UNSIGNED_BYTE:\n return getInternalFormatForUnsignedBytesMatrixTexture(textureConfig);\n default:\n throw new Error(`Unknown physical texture type ${physicalTexType}`);\n }\n}\nfunction getPhysicalTextureForRendering(isPacked) {\n if (env().getBool(\"WEBGL_RENDER_FLOAT32_ENABLED\")) {\n if (isPacked) {\n return PhysicalTextureType.PACKED_2X2_FLOAT32;\n }\n return PhysicalTextureType.UNPACKED_FLOAT32;\n }\n if (isPacked) {\n return PhysicalTextureType.PACKED_2X2_FLOAT16;\n }\n return PhysicalTextureType.UNPACKED_FLOAT16;\n}\nfunction getPhysicalFromLogicalTextureType(logicalTexType, isPacked) {\n if (logicalTexType === TextureUsage.UPLOAD) {\n return PhysicalTextureType.PACKED_2X2_FLOAT32;\n } else if (logicalTexType === TextureUsage.RENDER || logicalTexType == null) {\n return getPhysicalTextureForRendering(isPacked);\n } else if (logicalTexType === TextureUsage.DOWNLOAD || logicalTexType === TextureUsage.PIXELS) {\n return PhysicalTextureType.PACKED_4X1_UNSIGNED_BYTE;\n }\n throw new Error(`Unknown logical texture type ${logicalTexType}`);\n}\nfunction getKeyFromTextureShape(shapeRowsCol, physicalTexType, isPacked) {\n return `${shapeRowsCol[0]}_${shapeRowsCol[1]}_${physicalTexType}_${isPacked}`;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/unaryop_gpu.js\nvar UnaryOpProgram = class {\n constructor(aShape, opSnippet) {\n this.variableNames = [\"A\"];\n this.outputShape = aShape;\n this.enableShapeUniforms = useShapeUniforms(this.outputShape.length);\n this.userCode = `\n float unaryOperation(float x) {\n ${opSnippet}\n }\n\n void main() {\n float x = getAAtOutCoords();\n float y = unaryOperation(x);\n\n setOutput(y);\n }\n `;\n }\n};\nvar CHECK_NAN_SNIPPET = `if (isnan(x)) return x;`;\nvar LINEAR = `return x;`;\nvar ABS = `return abs(x);`;\nvar ELU2 = `return (x >= 0.0) ? x : (exp(x) - 1.0);`;\nvar RELU = CHECK_NAN_SNIPPET + `\n return (x < 0.0) ? 0.0 : x;\n`;\nvar RELU6 = CHECK_NAN_SNIPPET + `\n return (x < 0.0) ? 0.0 : min(6.0, x);\n`;\nvar CLONE = \"return x;\";\nvar SIGMOID = `return 1.0 / (1.0 + exp(-1.0 * x));`;\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/unaryop_packed_gpu.js\nvar LINEAR2 = `return x;`;\nvar ELU3 = `\n vec4 result;\n\n result.r = (x.r >= 0.0) ? x.r : (exp(x.r) - 1.0);\n result.g = (x.g >= 0.0) ? x.g : (exp(x.g) - 1.0);\n result.b = (x.b >= 0.0) ? x.b : (exp(x.b) - 1.0);\n result.a = (x.a >= 0.0) ? x.a : (exp(x.a) - 1.0);\n\n return result;\n`;\nvar RELU2 = `\n vec4 result = x * vec4(greaterThanEqual(x, vec4(0.0)));\n bvec4 isNaN = isnan(x);\n\n result.r = isNaN.r ? x.r : result.r;\n result.g = isNaN.g ? x.g : result.g;\n result.b = isNaN.b ? x.b : result.b;\n result.a = isNaN.a ? x.a : result.a;\n\n return result;\n`;\nvar RELU62 = `\n vec4 result = min(x, vec4(6.)) * vec4(greaterThanEqual(x, vec4(0.0)));\n bvec4 isNaN = isnan(x);\n\n result.r = isNaN.r ? x.r : result.r;\n result.g = isNaN.g ? x.g : result.g;\n result.b = isNaN.b ? x.b : result.b;\n result.a = isNaN.a ? x.a : result.a;\n\n return result;\n`;\nvar SIGMOID2 = `return 1.0 / (1.0 + exp(-1.0 * x));`;\nvar UnaryOpPackedProgram = class {\n constructor(aShape, opSnippet) {\n this.variableNames = [\"A\"];\n this.packedInputs = true;\n this.packedOutput = true;\n this.outputShape = aShape;\n this.enableShapeUniforms = useShapeUniforms(this.outputShape.length);\n this.userCode = `\n vec4 unaryOperation(vec4 x) {\n ${opSnippet}\n }\n\n void main() {\n vec4 x = getAAtOutCoords();\n vec4 y = unaryOperation(x);\n\n setOutput(y);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/unpack_gpu.js\nvar UnpackProgram = class {\n constructor(outputShape) {\n this.variableNames = [\"A\"];\n this.packedInputs = true;\n this.packedOutput = false;\n this.outputShape = outputShape;\n this.enableShapeUniforms = useShapeUniforms(this.outputShape.length);\n const rank = outputShape.length;\n const channels = getChannels(\"rc\", rank);\n const dtype = getCoordsDataType(rank);\n const sourceCoords = getSourceCoords(rank, channels);\n const innerDims = channels.slice(-2);\n const coords3 = rank <= 1 ? \"rc\" : `vec2(${innerDims.join(\",\")})`;\n this.userCode = `\n void main() {\n ${dtype} rc = getOutputCoords();\n vec4 packedInput = getA(${sourceCoords});\n\n setOutput(getChannel(packedInput, ${coords3}));\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/backend_webgl.js\nvar whereImpl3 = kernel_impls_exports.whereImpl;\nvar EPSILON_FLOAT322 = 1e-7;\nvar EPSILON_FLOAT162 = 1e-4;\nvar binaryCaches = {};\nfunction getBinaryCache(webGLVersion) {\n if (webGLVersion in binaryCaches) {\n return binaryCaches[webGLVersion];\n }\n binaryCaches[webGLVersion] = {};\n return binaryCaches[webGLVersion];\n}\nvar CPU_HANDOFF_SIZE_THRESHOLD = env().getNumber(\"CPU_HANDOFF_SIZE_THRESHOLD\");\nvar BEFORE_PAGING_CONSTANT = 600;\nfunction numMBBeforeWarning() {\n if (env().global.screen == null) {\n return 1024;\n }\n return env().global.screen.height * env().global.screen.width * window.devicePixelRatio * BEFORE_PAGING_CONSTANT / 1024 / 1024;\n}\nvar MathBackendWebGL = class extends KernelBackend {\n constructor(gpuResource) {\n super();\n this.pendingRead = /* @__PURE__ */ new WeakMap();\n this.pendingDisposal = /* @__PURE__ */ new WeakSet();\n this.dataRefCount = /* @__PURE__ */ new WeakMap();\n this.numBytesInGPU = 0;\n this.uploadWaitMs = 0;\n this.downloadWaitMs = 0;\n this.lastGlFlushTime = 0;\n this.warnedAboutMemory = false;\n this.pendingDeletes = 0;\n this.disposed = false;\n if (!env().getBool(\"HAS_WEBGL\")) {\n throw new Error(\"WebGL is not supported on this device\");\n }\n let newGPGPU;\n if (gpuResource != null) {\n if (gpuResource instanceof GPGPUContext) {\n newGPGPU = gpuResource;\n } else {\n const gl = getWebGLContext(env().getNumber(\"WEBGL_VERSION\"), gpuResource);\n newGPGPU = new GPGPUContext(gl);\n }\n this.binaryCache = {};\n this.gpgpuCreatedLocally = false;\n } else {\n const gl = getWebGLContext(env().getNumber(\"WEBGL_VERSION\"));\n newGPGPU = new GPGPUContext(gl);\n this.binaryCache = getBinaryCache(env().getNumber(\"WEBGL_VERSION\"));\n this.gpgpuCreatedLocally = true;\n }\n this.gpgpu = newGPGPU;\n this.canvas = this.gpgpu.gl.canvas;\n this.textureManager = new TextureManager(this.gpgpu);\n this.numMBBeforeWarning = numMBBeforeWarning();\n this.texData = new DataStorage(this, engine());\n }\n nextDataId() {\n return MathBackendWebGL.nextDataId++;\n }\n numDataIds() {\n return this.texData.numDataIds() - this.pendingDeletes;\n }\n write(values, shape, dtype) {\n if (env().getBool(\"WEBGL_CHECK_NUMERICAL_PROBLEMS\") || env().getBool(\"DEBUG\")) {\n this.checkNumericalProblems(values);\n }\n if (dtype === \"complex64\" && values != null) {\n throw new Error(`Cannot write to a complex64 dtype. Please use tf.complex(real, imag).`);\n }\n const dataId = { id: this.nextDataId() };\n this.texData.set(dataId, { shape, dtype, values, usage: TextureUsage.UPLOAD, refCount: 1 });\n return dataId;\n }\n refCount(dataId) {\n if (this.texData.has(dataId)) {\n const tensorData = this.texData.get(dataId);\n return tensorData.refCount;\n }\n return 0;\n }\n incRef(dataId) {\n const texData = this.texData.get(dataId);\n texData.refCount++;\n }\n decRef(dataId) {\n if (this.texData.has(dataId)) {\n const texData = this.texData.get(dataId);\n texData.refCount--;\n }\n }\n move(dataId, values, shape, dtype, refCount) {\n if (env().getBool(\"DEBUG\")) {\n this.checkNumericalProblems(values);\n }\n if (dtype === \"complex64\") {\n throw new Error(`Cannot write to a complex64 dtype. Please use tf.complex(real, imag).`);\n }\n this.texData.set(dataId, { shape, dtype, values, usage: TextureUsage.UPLOAD, refCount });\n }\n disposeIntermediateTensorInfo(tensorInfo) {\n this.disposeData(tensorInfo.dataId);\n }\n readSync(dataId) {\n const texData = this.texData.get(dataId);\n const { values, dtype, complexTensorInfos, slice: slice6, shape, isPacked } = texData;\n if (slice6 != null) {\n let program;\n if (isPacked) {\n program = new UnaryOpPackedProgram(shape, CLONE);\n } else {\n program = new UnaryOpProgram(shape, CLONE);\n }\n const res = this.runWebGLProgram(program, [{ dataId, shape, dtype }], dtype);\n const data = this.readSync(res.dataId);\n this.disposeIntermediateTensorInfo(res);\n return data;\n }\n if (values != null) {\n return this.convertAndCacheOnCPU(dataId);\n }\n if (dtype === \"string\") {\n return values;\n }\n const shouldTimeProgram = this.activeTimers != null;\n let start;\n if (shouldTimeProgram) {\n start = util_exports.now();\n }\n let result;\n if (dtype === \"complex64\") {\n const realValues = this.readSync(complexTensorInfos.real.dataId);\n const imagValues = this.readSync(complexTensorInfos.imag.dataId);\n result = backend_util_exports.mergeRealAndImagArrays(realValues, imagValues);\n } else {\n result = this.getValuesFromTexture(dataId);\n }\n if (shouldTimeProgram) {\n this.downloadWaitMs += util_exports.now() - start;\n }\n return this.convertAndCacheOnCPU(dataId, result);\n }\n async read(dataId) {\n if (this.pendingRead.has(dataId)) {\n const subscribers2 = this.pendingRead.get(dataId);\n return new Promise((resolve) => subscribers2.push(resolve));\n }\n const texData = this.texData.get(dataId);\n const { values, shape, slice: slice6, dtype, complexTensorInfos, isPacked } = texData;\n if (slice6 != null) {\n let program;\n if (isPacked) {\n program = new UnaryOpPackedProgram(shape, CLONE);\n } else {\n program = new UnaryOpProgram(shape, CLONE);\n }\n const res = this.runWebGLProgram(program, [{ dataId, shape, dtype }], dtype);\n const data = this.read(res.dataId);\n this.disposeIntermediateTensorInfo(res);\n return data;\n }\n if (values != null) {\n return this.convertAndCacheOnCPU(dataId);\n }\n if (env().getBool(\"DEBUG\")) {\n if (!env().getBool(\"WEBGL_DOWNLOAD_FLOAT_ENABLED\") && env().getNumber(\"WEBGL_VERSION\") === 2) {\n throw new Error(`tensor.data() with WEBGL_DOWNLOAD_FLOAT_ENABLED=false and WEBGL_VERSION=2 not yet supported.`);\n }\n }\n let buffer2 = null;\n let tmpDownloadTarget;\n if (dtype !== \"complex64\" && env().get(\"WEBGL_BUFFER_SUPPORTED\")) {\n tmpDownloadTarget = this.decode(dataId);\n const tmpData = this.texData.get(tmpDownloadTarget.dataId);\n buffer2 = this.gpgpu.createBufferFromTexture(tmpData.texture.texture, ...getDenseTexShape(shape));\n }\n this.pendingRead.set(dataId, []);\n if (dtype !== \"complex64\") {\n await this.gpgpu.createAndWaitForFence();\n }\n let vals;\n if (dtype === \"complex64\") {\n const ps = await Promise.all([\n this.read(complexTensorInfos.real.dataId),\n this.read(complexTensorInfos.imag.dataId)\n ]);\n const realValues = ps[0];\n const imagValues = ps[1];\n vals = backend_util_exports.mergeRealAndImagArrays(realValues, imagValues);\n } else if (buffer2 == null) {\n vals = this.getValuesFromTexture(dataId);\n } else {\n const size = util_exports.sizeFromShape(shape);\n vals = this.gpgpu.downloadFloat32MatrixFromBuffer(buffer2, size);\n }\n if (tmpDownloadTarget != null) {\n this.disposeIntermediateTensorInfo(tmpDownloadTarget);\n }\n if (buffer2 != null) {\n const gl = this.gpgpu.gl;\n callAndCheck(gl, () => gl.deleteBuffer(buffer2));\n }\n const dTypeVals = this.convertAndCacheOnCPU(dataId, vals);\n const subscribers = this.pendingRead.get(dataId);\n this.pendingRead.delete(dataId);\n subscribers.forEach((resolve) => resolve(dTypeVals));\n if (this.pendingDisposal.has(dataId)) {\n this.pendingDisposal.delete(dataId);\n if (this.disposeData(dataId)) {\n engine().removeDataId(dataId, this);\n }\n this.pendingDeletes--;\n }\n return dTypeVals;\n }\n readToGPU(dataId, options = {}) {\n const texData = this.texData.get(dataId);\n const { values, shape, slice: slice6, dtype, isPacked, texture } = texData;\n if (dtype === \"complex64\") {\n throw new Error(\"Does not support reading texture for complex64 dtype.\");\n }\n if (slice6 != null) {\n let program;\n if (isPacked) {\n program = new UnaryOpPackedProgram(shape, CLONE);\n } else {\n program = new UnaryOpProgram(shape, CLONE);\n }\n const res = this.runWebGLProgram(program, [{ dataId, shape, dtype }], dtype);\n const gpuResouorce = this.readToGPU(res, options);\n this.disposeIntermediateTensorInfo(res);\n return gpuResouorce;\n }\n if (texture == null) {\n if (values != null) {\n throw new Error(\"Data is not on GPU but on CPU.\");\n } else {\n throw new Error(\"There is no data on GPU or CPU.\");\n }\n }\n const tmpTarget = this.decode(dataId, options.customTexShape);\n const tensorRef = engine().makeTensorFromTensorInfo(tmpTarget);\n const tmpData = this.texData.get(tmpTarget.dataId);\n return Object.assign({ tensorRef }, tmpData.texture);\n }\n bufferSync(t) {\n const data = this.readSync(t.dataId);\n if (t.dtype === \"string\") {\n try {\n const strings = data.map((d) => util_exports.decodeString(d));\n return buffer(t.shape, t.dtype, strings);\n } catch (_a) {\n throw new Error(\"Failed to decode encoded string bytes into utf-8\");\n }\n }\n return buffer(t.shape, t.dtype, data);\n }\n checkNumericalProblems(values) {\n if (values == null) {\n return;\n }\n for (let i = 0; i < values.length; i++) {\n const num = values[i];\n if (!canBeRepresented(num)) {\n if (env().getBool(\"WEBGL_RENDER_FLOAT32_CAPABLE\")) {\n throw Error(`The value ${num} cannot be represented with your current settings. Consider enabling float32 rendering: 'tf.env().set('WEBGL_RENDER_FLOAT32_ENABLED', true);'`);\n }\n throw Error(`The value ${num} cannot be represented on this device.`);\n }\n }\n }\n getValuesFromTexture(dataId) {\n const { shape, dtype, isPacked } = this.texData.get(dataId);\n const size = util_exports.sizeFromShape(shape);\n if (env().getBool(\"WEBGL_DOWNLOAD_FLOAT_ENABLED\")) {\n const tmpTarget = this.decode(dataId);\n const tmpData2 = this.texData.get(tmpTarget.dataId);\n const vals2 = this.gpgpu.downloadMatrixFromPackedTexture(tmpData2.texture.texture, ...getDenseTexShape(shape)).subarray(0, size);\n this.disposeIntermediateTensorInfo(tmpTarget);\n return vals2;\n }\n const shouldUsePackedProgram = env().getBool(\"WEBGL_PACK\") && isPacked === true;\n const outputShape = shouldUsePackedProgram ? getShapeAs3D(shape) : shape;\n const program = shouldUsePackedProgram ? new EncodeFloatPackedProgram(outputShape) : new EncodeFloatProgram(outputShape);\n const output = this.runWebGLProgram(program, [{ shape: outputShape, dtype, dataId }], \"float32\");\n const tmpData = this.texData.get(output.dataId);\n const vals = this.gpgpu.downloadByteEncodedFloatMatrixFromOutputTexture(tmpData.texture.texture, tmpData.texShape[0], tmpData.texShape[1]).subarray(0, size);\n this.disposeIntermediateTensorInfo(output);\n return vals;\n }\n timerAvailable() {\n return env().getNumber(\"WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE\") > 0;\n }\n time(f) {\n const oldActiveTimers = this.activeTimers;\n const newActiveTimers = [];\n let outerMostTime = false;\n if (this.programTimersStack == null) {\n this.programTimersStack = newActiveTimers;\n outerMostTime = true;\n } else {\n this.activeTimers.push(newActiveTimers);\n }\n this.activeTimers = newActiveTimers;\n f();\n const flattenedActiveTimerQueries = util_exports.flatten(this.activeTimers.map((d) => d.query)).filter((d) => d != null);\n const flattenedActiveTimerNames = util_exports.flatten(this.activeTimers.map((d) => d.name)).filter((d) => d != null);\n this.activeTimers = oldActiveTimers;\n if (outerMostTime) {\n this.programTimersStack = null;\n }\n const res = {\n uploadWaitMs: this.uploadWaitMs,\n downloadWaitMs: this.downloadWaitMs,\n kernelMs: null,\n wallMs: null\n };\n return (async () => {\n if (env().getNumber(\"WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE\") > 0) {\n const kernelMs = await Promise.all(flattenedActiveTimerQueries);\n res[\"kernelMs\"] = util_exports.sum(kernelMs);\n res[\"getExtraProfileInfo\"] = () => kernelMs.map((d, i) => ({ name: flattenedActiveTimerNames[i], ms: d })).map((d) => `${d.name}: ${d.ms}`).join(\", \");\n } else {\n res[\"kernelMs\"] = {\n error: \"WebGL query timers are not supported in this environment.\"\n };\n }\n this.uploadWaitMs = 0;\n this.downloadWaitMs = 0;\n return res;\n })();\n }\n memory() {\n return {\n unreliable: false,\n numBytesInGPU: this.numBytesInGPU,\n numBytesInGPUAllocated: this.textureManager.numBytesAllocated,\n numBytesInGPUFree: this.textureManager.numBytesFree\n };\n }\n startTimer() {\n if (env().getNumber(\"WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE\") > 0) {\n return this.gpgpu.beginQuery();\n }\n return { startMs: util_exports.now(), endMs: null };\n }\n endTimer(query) {\n if (env().getNumber(\"WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE\") > 0) {\n this.gpgpu.endQuery();\n return query;\n }\n query.endMs = util_exports.now();\n return query;\n }\n async getQueryTime(query) {\n if (env().getNumber(\"WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE\") > 0) {\n return this.gpgpu.waitForQueryAndGetTime(query);\n }\n const timerQuery = query;\n return timerQuery.endMs - timerQuery.startMs;\n }\n disposeData(dataId, force = false) {\n if (this.pendingDisposal.has(dataId)) {\n return false;\n }\n if (!this.texData.has(dataId)) {\n return true;\n }\n if (force) {\n this.texData.get(dataId).refCount = 0;\n } else {\n this.texData.get(dataId).refCount--;\n }\n if (!force && this.texData.get(dataId).refCount > 0) {\n return false;\n }\n if (this.pendingRead.has(dataId)) {\n this.pendingDisposal.add(dataId);\n this.pendingDeletes++;\n return false;\n }\n this.releaseGPUData(dataId);\n const { complexTensorInfos } = this.texData.get(dataId);\n if (complexTensorInfos != null) {\n this.disposeData(complexTensorInfos.real.dataId, force);\n this.disposeData(complexTensorInfos.imag.dataId, force);\n }\n this.texData.delete(dataId);\n return true;\n }\n releaseGPUData(dataId) {\n const { texture, dtype, texShape, usage, isPacked, slice: slice6 } = this.texData.get(dataId);\n const key = slice6 && slice6.origDataId || dataId;\n const refCount = this.dataRefCount.get(key);\n if (refCount > 1) {\n this.dataRefCount.set(key, refCount - 1);\n } else {\n this.dataRefCount.delete(key);\n if (texture != null) {\n this.numBytesInGPU -= this.computeBytes(texShape, dtype);\n this.textureManager.releaseTexture(texture, texShape, usage, isPacked);\n }\n }\n const texData = this.texData.get(dataId);\n texData.texture = null;\n texData.texShape = null;\n texData.isPacked = false;\n texData.slice = null;\n }\n getTexture(dataId) {\n this.uploadToGPU(dataId);\n return this.texData.get(dataId).texture.texture;\n }\n getDataInfo(dataId) {\n return this.texData.get(dataId);\n }\n shouldExecuteOnCPU(inputs, sizeThreshold = CPU_HANDOFF_SIZE_THRESHOLD) {\n return env().getBool(\"WEBGL_CPU_FORWARD\") && inputs.every((input2) => this.texData.get(input2.dataId).texture == null && util_exports.sizeFromShape(input2.shape) < sizeThreshold);\n }\n getGPGPUContext() {\n return this.gpgpu;\n }\n where(condition) {\n backend_util_exports.warn(\"tf.where() in webgl locks the UI thread. Call tf.whereAsync() instead\");\n const condVals = condition.dataSync();\n return whereImpl3(condition.shape, condVals);\n }\n packedUnaryOp(x, op2, dtype) {\n const program = new UnaryOpPackedProgram(x.shape, op2);\n const outInfo = this.compileAndRun(program, [x], dtype);\n return engine().makeTensorFromTensorInfo(outInfo);\n }\n abs(x) {\n if (this.shouldExecuteOnCPU([x]) && x.dtype !== \"complex64\") {\n const outValues = simpleAbsImplCPU(this.texData.get(x.dataId).values);\n return this.makeOutput(x.shape, x.dtype, outValues);\n }\n if (env().getBool(\"WEBGL_PACK_UNARY_OPERATIONS\")) {\n return this.packedUnaryOp(x, ABS, x.dtype);\n }\n const program = new UnaryOpProgram(x.shape, ABS);\n const outInfo = this.compileAndRun(program, [x]);\n return engine().makeTensorFromTensorInfo(outInfo);\n }\n makeTensorInfo(shape, dtype, values) {\n let dataId;\n if (dtype === \"string\" && values != null && values.length > 0 && util_exports.isString(values[0])) {\n const encodedValues = values.map((d) => util_exports.encodeString(d));\n dataId = this.write(encodedValues, shape, dtype);\n } else {\n dataId = this.write(values, shape, dtype);\n }\n this.texData.get(dataId).usage = null;\n return { dataId, shape, dtype };\n }\n makeOutput(shape, dtype, values) {\n return engine().makeTensorFromTensorInfo(this.makeTensorInfo(shape, dtype, values), this);\n }\n unpackTensor(input2) {\n const program = new UnpackProgram(input2.shape);\n return this.runWebGLProgram(program, [input2], input2.dtype);\n }\n packTensor(input2) {\n const program = new PackProgram(input2.shape);\n const preventEagerUnpackingOutput = true;\n return this.runWebGLProgram(program, [input2], input2.dtype, null, preventEagerUnpackingOutput);\n }\n packedReshape(input2, afterShape) {\n const input3DShape = [\n getBatchDim(input2.shape),\n ...getRowsCols(input2.shape)\n ];\n const input3D = {\n dtype: input2.dtype,\n shape: input3DShape,\n dataId: input2.dataId\n };\n const afterShapeAs3D = [\n getBatchDim(afterShape),\n ...getRowsCols(afterShape)\n ];\n const program = new ReshapePackedProgram(afterShapeAs3D, input3DShape);\n const preventEagerUnpackingOfOutput = true;\n const customValues = [input3DShape];\n const output = this.runWebGLProgram(program, [input3D], input2.dtype, customValues, preventEagerUnpackingOfOutput);\n return { dataId: output.dataId, shape: afterShape, dtype: output.dtype };\n }\n decode(dataId, customTexShape) {\n const texData = this.texData.get(dataId);\n const { isPacked, shape, dtype } = texData;\n if (customTexShape != null) {\n const size = util_exports.sizeFromShape(shape);\n const texSize = customTexShape[0] * customTexShape[1] * 4;\n util_exports.assert(size <= texSize, () => \"customTexShape is too small. Row * Column * 4 should be equal or larger than the size of the tensor data.\");\n }\n const shapeAs3D = getShapeAs3D(shape);\n let program;\n if (isPacked) {\n program = new DecodeMatrixPackedProgram(shapeAs3D);\n } else {\n program = new DecodeMatrixProgram(shapeAs3D);\n }\n const preventEagerUnpackingOfOutput = true;\n const customValues = [customTexShape != null ? customTexShape : getDenseTexShape(shapeAs3D)];\n const out = this.runWebGLProgram(program, [{ shape: shapeAs3D, dtype, dataId }], dtype, customValues, preventEagerUnpackingOfOutput, customTexShape);\n return { dtype, shape, dataId: out.dataId };\n }\n runWebGLProgram(program, inputs, outputDtype, customUniformValues, preventEagerUnpackingOfOutput = false, customTexShape) {\n const output = this.makeTensorInfo(program.outputShape, outputDtype);\n const outData = this.texData.get(output.dataId);\n if (program.packedOutput) {\n outData.isPacked = true;\n }\n if (program.outPackingScheme === PackingScheme.DENSE) {\n const texelShape = customTexShape != null ? customTexShape : getDenseTexShape(program.outputShape);\n outData.texShape = texelShape.map((d) => d * 2);\n }\n if (program.outTexUsage != null) {\n outData.usage = program.outTexUsage;\n }\n if (util_exports.sizeFromShape(output.shape) === 0) {\n outData.values = util_exports.getTypedArrayFromDType(output.dtype, 0);\n return output;\n }\n const dataToDispose = [];\n const inputsData = inputs.map((input2) => {\n if (input2.dtype === \"complex64\") {\n throw new Error(`GPGPUProgram does not support complex64 input. For complex64 dtypes, please separate the program into real and imaginary parts.`);\n }\n let texData = this.texData.get(input2.dataId);\n if (texData.texture == null) {\n if (!program.packedInputs && util_exports.sizeFromShape(input2.shape) <= env().getNumber(\"WEBGL_SIZE_UPLOAD_UNIFORM\")) {\n return {\n shape: input2.shape,\n texData: null,\n isUniform: true,\n uniformValues: texData.values\n };\n }\n if (program.packedInputs) {\n texData.isPacked = true;\n texData.shape = input2.shape;\n }\n }\n this.uploadToGPU(input2.dataId);\n if (!!texData.isPacked !== !!program.packedInputs) {\n input2 = texData.isPacked ? this.unpackTensor(input2) : this.packTensor(input2);\n dataToDispose.push(input2);\n texData = this.texData.get(input2.dataId);\n } else if (texData.isPacked && !isReshapeFree(texData.shape, input2.shape)) {\n const savedInput = input2;\n const targetShape = input2.shape;\n input2.shape = texData.shape;\n input2 = this.packedReshape(input2, targetShape);\n dataToDispose.push(input2);\n texData = this.texData.get(input2.dataId);\n savedInput.shape = targetShape;\n }\n return { shape: input2.shape, texData, isUniform: false };\n });\n this.uploadToGPU(output.dataId);\n const outputData = { shape: output.shape, texData: outData, isUniform: false };\n const key = makeShaderKey(program, inputsData, outputData);\n const binary = this.getAndSaveBinary(key, () => {\n return compileProgram(this.gpgpu, program, inputsData, outputData);\n });\n const shouldTimeProgram = this.activeTimers != null;\n let query;\n if (shouldTimeProgram) {\n query = this.startTimer();\n }\n if (!env().get(\"ENGINE_COMPILE_ONLY\")) {\n runProgram(this.gpgpu, binary, inputsData, outputData, customUniformValues);\n }\n dataToDispose.forEach((info) => this.disposeIntermediateTensorInfo(info));\n if (shouldTimeProgram) {\n query = this.endTimer(query);\n this.activeTimers.push({ name: program.constructor.name, query: this.getQueryTime(query) });\n }\n const glFlushThreshold = env().get(\"WEBGL_FLUSH_THRESHOLD\");\n if (glFlushThreshold > 0) {\n const time2 = util_exports.now();\n if (time2 - this.lastGlFlushTime > glFlushThreshold) {\n this.gpgpu.gl.flush();\n this.lastGlFlushTime = time2;\n }\n }\n if (!env().getBool(\"WEBGL_LAZILY_UNPACK\") && outData.isPacked && preventEagerUnpackingOfOutput === false) {\n const unpacked = this.unpackTensor(output);\n this.disposeIntermediateTensorInfo(output);\n return unpacked;\n }\n return output;\n }\n compileAndRun(program, inputs, outputDtype, customUniformValues, preventEagerUnpackingOfOutput = false) {\n outputDtype = outputDtype || inputs[0].dtype;\n const outInfo = this.runWebGLProgram(program, inputs, outputDtype, customUniformValues, preventEagerUnpackingOfOutput);\n return outInfo;\n }\n getAndSaveBinary(key, getBinary) {\n if (!(key in this.binaryCache)) {\n this.binaryCache[key] = getBinary();\n }\n return this.binaryCache[key];\n }\n getTextureManager() {\n return this.textureManager;\n }\n dispose() {\n if (this.disposed) {\n return;\n }\n if (!env().getBool(\"IS_TEST\")) {\n const allKeys = Object.keys(this.binaryCache);\n allKeys.forEach((key) => {\n this.gpgpu.deleteProgram(this.binaryCache[key].webGLProgram);\n delete this.binaryCache[key];\n });\n }\n this.textureManager.dispose();\n if (this.canvas != null && (typeof HTMLCanvasElement !== \"undefined\" && this.canvas instanceof HTMLCanvasElement)) {\n this.canvas.remove();\n } else {\n this.canvas = null;\n }\n if (this.gpgpuCreatedLocally) {\n this.gpgpu.program = null;\n this.gpgpu.dispose();\n }\n this.disposed = true;\n }\n floatPrecision() {\n if (this.floatPrecisionValue == null) {\n this.floatPrecisionValue = tidy(() => {\n if (!env().get(\"WEBGL_RENDER_FLOAT32_ENABLED\")) {\n const debugFlag = env().getBool(\"DEBUG\");\n env().set(\"DEBUG\", false);\n const underflowCheckValue = this.abs(scalar(1e-8)).dataSync()[0];\n env().set(\"DEBUG\", debugFlag);\n if (underflowCheckValue > 0) {\n return 32;\n }\n }\n return 16;\n });\n }\n return this.floatPrecisionValue;\n }\n epsilon() {\n return this.floatPrecision() === 32 ? EPSILON_FLOAT322 : EPSILON_FLOAT162;\n }\n uploadToGPU(dataId) {\n const texData = this.texData.get(dataId);\n const { shape, dtype, values, texture, usage, isPacked } = texData;\n if (texture != null) {\n return;\n }\n const shouldTimeProgram = this.activeTimers != null;\n let start;\n if (shouldTimeProgram) {\n start = util_exports.now();\n }\n let texShape = texData.texShape;\n if (texShape == null) {\n texShape = getTextureShapeFromLogicalShape(shape, isPacked);\n texData.texShape = texShape;\n }\n if (values != null) {\n const shapeAs3D = getShapeAs3D(shape);\n let program;\n let width = texShape[1], height = texShape[0];\n const isByteArray = values instanceof Uint8Array || values instanceof Uint8ClampedArray;\n if (isPacked || !isByteArray) {\n [width, height] = getPackedMatrixTextureShapeWidthHeight(texShape[0], texShape[1]);\n }\n if (isPacked) {\n program = new EncodeMatrixPackedProgram(shapeAs3D, isByteArray);\n } else {\n program = new EncodeMatrixProgram(shapeAs3D, isByteArray);\n }\n const tempDenseInputTexShape = isByteArray ? [height, width] : texShape;\n const tempDenseInputHandle = this.makeTensorInfo(tempDenseInputTexShape, dtype);\n const tempDenseInputTexData = this.texData.get(tempDenseInputHandle.dataId);\n if (isByteArray) {\n tempDenseInputTexData.usage = TextureUsage.PIXELS;\n } else {\n tempDenseInputTexData.usage = TextureUsage.UPLOAD;\n }\n tempDenseInputTexData.texShape = tempDenseInputTexShape;\n this.gpgpu.uploadDenseMatrixToTexture(this.getTexture(tempDenseInputHandle.dataId), width, height, values);\n const customValues = [[height, width]];\n const preventEagerUnpacking = true;\n const encodedOutputTarget = this.runWebGLProgram(program, [tempDenseInputHandle], dtype, customValues, preventEagerUnpacking);\n const outputTexData = this.texData.get(encodedOutputTarget.dataId);\n texData.texShape = outputTexData.texShape;\n texData.isPacked = outputTexData.isPacked;\n texData.usage = outputTexData.usage;\n if (!env().get(\"ENGINE_COMPILE_ONLY\")) {\n texData.texture = outputTexData.texture;\n texData.values = null;\n this.texData.delete(encodedOutputTarget.dataId);\n } else {\n this.disposeData(encodedOutputTarget.dataId);\n }\n this.disposeIntermediateTensorInfo(tempDenseInputHandle);\n if (shouldTimeProgram) {\n this.uploadWaitMs += util_exports.now() - start;\n }\n } else {\n const newTexture = this.acquireTexture(texShape, usage, dtype, isPacked);\n texData.texture = newTexture;\n }\n }\n convertAndCacheOnCPU(dataId, float32Values) {\n const texData = this.texData.get(dataId);\n const { dtype } = texData;\n this.releaseGPUData(dataId);\n if (float32Values != null) {\n texData.values = float32ToTypedArray(float32Values, dtype);\n }\n return texData.values;\n }\n acquireTexture(texShape, texType, dtype, isPacked) {\n this.numBytesInGPU += this.computeBytes(texShape, dtype);\n if (!this.warnedAboutMemory && this.numBytesInGPU > this.numMBBeforeWarning * 1024 * 1024) {\n const mb = (this.numBytesInGPU / 1024 / 1024).toFixed(2);\n this.warnedAboutMemory = true;\n console.warn(`High memory usage in GPU: ${mb} MB, most likely due to a memory leak`);\n }\n return this.textureManager.acquireTexture(texShape, texType, isPacked);\n }\n computeBytes(shape, dtype) {\n return shape[0] * shape[1] * util_exports.bytesPerElement(dtype);\n }\n checkCompileCompletion() {\n for (const [, binary] of Object.entries(this.binaryCache)) {\n this.checkCompletion_(binary);\n }\n }\n async checkCompileCompletionAsync() {\n const ps = [];\n if (this.gpgpu.parallelCompilationExtension) {\n for (const [, binary] of Object.entries(this.binaryCache)) {\n ps.push(this.checkCompletionAsync_(binary));\n }\n return Promise.all(ps);\n } else {\n for (const [, binary] of Object.entries(this.binaryCache)) {\n const p2 = new Promise((resolve) => {\n try {\n this.checkCompletion_(binary);\n resolve(true);\n } catch (error) {\n throw error;\n }\n });\n ps.push(p2);\n }\n return Promise.all(ps);\n }\n }\n async checkCompletionAsync_(binary) {\n if (this.gpgpu.gl.getProgramParameter(binary.webGLProgram, this.gpgpu.parallelCompilationExtension.COMPLETION_STATUS_KHR)) {\n return this.checkCompletion_(binary);\n } else {\n await nextFrame();\n return this.checkCompletionAsync_(binary);\n }\n }\n checkCompletion_(binary) {\n if (this.gpgpu.gl.getProgramParameter(binary.webGLProgram, this.gpgpu.gl.LINK_STATUS) === false) {\n console.log(this.gpgpu.gl.getProgramInfoLog(binary.webGLProgram));\n if (this.gpgpu.gl.getShaderParameter(binary.fragmentShader, this.gpgpu.gl.COMPILE_STATUS) === false) {\n logShaderSourceAndInfoLog(binary.source, this.gpgpu.gl.getShaderInfoLog(binary.fragmentShader));\n throw new Error(\"Failed to compile fragment shader.\");\n }\n throw new Error(\"Failed to link vertex and fragment shaders.\");\n }\n return true;\n }\n getUniformLocations() {\n for (const [, binary] of Object.entries(this.binaryCache)) {\n const { uniformLocations, customUniformLocations, infLoc, nanLoc, inShapesLocations, inTexShapesLocations, outShapeLocation, outShapeStridesLocation, outTexShapeLocation } = getUniformLocations(this.gpgpu, binary.program, binary.webGLProgram);\n binary.uniformLocations = uniformLocations;\n binary.customUniformLocations = customUniformLocations;\n binary.infLoc = infLoc;\n binary.nanLoc = nanLoc;\n binary.inShapesLocations = inShapesLocations;\n binary.inTexShapesLocations = inTexShapesLocations;\n binary.outShapeLocation = outShapeLocation;\n binary.outShapeStridesLocation = outShapeStridesLocation;\n binary.outTexShapeLocation = outTexShapeLocation;\n }\n }\n};\nMathBackendWebGL.nextDataId = 0;\nfunction float32ToTypedArray(a, dtype) {\n if (dtype === \"float32\" || dtype === \"complex64\") {\n return a;\n } else if (dtype === \"int32\" || dtype === \"bool\") {\n const result = dtype === \"int32\" ? new Int32Array(a.length) : new Uint8Array(a.length);\n for (let i = 0; i < result.length; ++i) {\n result[i] = Math.round(a[i]);\n }\n return result;\n } else {\n throw new Error(`Unknown dtype ${dtype}`);\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/version.js\nvar version6 = \"3.20.0\";\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/webgl.js\nfunction forceHalfFloat() {\n env().set(\"WEBGL_FORCE_F16_TEXTURES\", true);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/base.js\nif (device_util_exports.isBrowser()) {\n registerBackend(\"webgl\", () => new MathBackendWebGL(), 2);\n}\nvar webgl = { forceHalfFloat };\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/binaryop_gpu.js\nvar CHECK_NAN_SNIPPET2 = `\n if (isnan(a)) return a;\n if (isnan(b)) return b;\n`;\nvar BinaryOpProgram = class {\n constructor(op2, aShape, bShape) {\n this.variableNames = [\"A\", \"B\"];\n this.outputShape = backend_util_exports.assertAndGetBroadcastShape(aShape, bShape);\n this.enableShapeUniforms = useShapeUniforms(this.outputShape.length);\n this.userCode = `\n float binaryOperation(float a, float b) {\n ${op2}\n }\n\n void main() {\n float a = getAAtOutCoords();\n float b = getBAtOutCoords();\n setOutput(binaryOperation(a, b));\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/binaryop_packed_gpu.js\nvar CHECK_NAN_SNIPPET3 = `\n result.r = isNaN.r > 0. ? NAN : result.r;\n result.g = isNaN.g > 0. ? NAN : result.g;\n result.b = isNaN.b > 0. ? NAN : result.b;\n result.a = isNaN.a > 0. ? NAN : result.a;\n`;\nvar BinaryOpPackedProgram = class {\n constructor(op2, aShape, bShape, checkOutOfBounds = false) {\n this.variableNames = [\"A\", \"B\"];\n this.supportsBroadcasting = true;\n this.packedInputs = true;\n this.packedOutput = true;\n this.outputShape = backend_util_exports.assertAndGetBroadcastShape(aShape, bShape);\n const rank = this.outputShape.length;\n this.enableShapeUniforms = useShapeUniforms(rank);\n let checkOutOfBoundsString = \"\";\n if (checkOutOfBounds) {\n if (rank === 0 || util_exports.sizeFromShape(this.outputShape) === 1) {\n checkOutOfBoundsString = `\n result.y = 0.;\n result.z = 0.;\n result.w = 0.;\n `;\n } else {\n const dtype = getCoordsDataType(rank);\n checkOutOfBoundsString = `\n ${dtype} coords = getOutputCoords();\n `;\n if (rank === 1) {\n if (this.enableShapeUniforms) {\n checkOutOfBoundsString += `\n result.y = (coords + 1) >= outShape ? 0. : result.y;\n result.z = 0.;\n result.w = 0.;\n `;\n } else {\n checkOutOfBoundsString += `\n result.y = (coords + 1) >= ${this.outputShape[0]} ? 0. : result.y;\n result.z = 0.;\n result.w = 0.;\n `;\n }\n } else {\n const channels = getChannels(\"coords\", rank);\n if (this.enableShapeUniforms) {\n checkOutOfBoundsString += `\n bool nextRowOutOfBounds =\n (${channels[rank - 2]} + 1) >= outShape[${rank} - 2];\n bool nextColOutOfBounds =\n (${channels[rank - 1]} + 1) >= outShape[${rank} - 1];\n result.y = nextColOutOfBounds ? 0. : result.y;\n result.z = nextRowOutOfBounds ? 0. : result.z;\n result.w = nextColOutOfBounds || nextRowOutOfBounds ? 0. : result.w;\n `;\n } else {\n checkOutOfBoundsString += `\n bool nextRowOutOfBounds =\n (${channels[rank - 2]} + 1) >= ${this.outputShape[rank - 2]};\n bool nextColOutOfBounds =\n (${channels[rank - 1]} + 1) >= ${this.outputShape[rank - 1]};\n result.y = nextColOutOfBounds ? 0. : result.y;\n result.z = nextRowOutOfBounds ? 0. : result.z;\n result.w = nextColOutOfBounds || nextRowOutOfBounds ? 0. : result.w;\n `;\n }\n }\n }\n }\n this.userCode = `\n vec4 binaryOperation(vec4 a, vec4 b) {\n ${op2}\n }\n\n void main() {\n vec4 a = getAAtOutCoords();\n vec4 b = getBAtOutCoords();\n\n vec4 result = binaryOperation(a, b);\n ${checkOutOfBoundsString}\n\n setOutput(result);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Identity.js\nfunction identity3(args) {\n const { inputs, backend: backend2 } = args;\n const { x } = inputs;\n backend2.incRef(x.dataId);\n return { dataId: x.dataId, shape: x.shape, dtype: x.dtype };\n}\nvar identityConfig2 = {\n kernelName: Identity,\n backendName: \"webgl\",\n kernelFunc: identity3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Complex.js\nfunction complex3(args) {\n const { inputs, backend: backend2 } = args;\n const { real: real5, imag: imag5 } = inputs;\n const complexInfo = backend2.makeTensorInfo(real5.shape, \"complex64\");\n const complex5 = backend2.texData.get(complexInfo.dataId);\n const realTensorInfo = identity3({ inputs: { x: real5 }, backend: backend2 });\n const imagTensorInfo = identity3({ inputs: { x: imag5 }, backend: backend2 });\n complex5.complexTensorInfos = { real: realTensorInfo, imag: imagTensorInfo };\n return complexInfo;\n}\nvar complexConfig2 = {\n kernelName: Complex,\n backendName: \"webgl\",\n kernelFunc: complex3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/LeakyRelu.js\nvar LEAKYRELU = `return (a < 0.) ? b * a : a;`;\nvar LEAKYRELU_PACKED = `\n vec4 aLessThanZero = vec4(lessThan(a, vec4(0.)));\n return (aLessThanZero * (b * a)) + ((vec4(1.0) - aLessThanZero) * a);\n`;\nfunction leakyRelu3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { alpha } = attrs;\n const $alpha = backend2.makeTensorInfo([], \"float32\", util_exports.createScalarValue(alpha, \"float32\"));\n const program = env().getBool(\"WEBGL_PACK_BINARY_OPERATIONS\") ? new BinaryOpPackedProgram(LEAKYRELU_PACKED, x.shape, $alpha.shape) : new BinaryOpProgram(LEAKYRELU, x.shape, $alpha.shape);\n const result = backend2.runWebGLProgram(program, [x, $alpha], \"float32\");\n backend2.disposeIntermediateTensorInfo($alpha);\n return result;\n}\nvar leakyReluConfig2 = {\n kernelName: LeakyRelu,\n backendName: \"webgl\",\n kernelFunc: leakyRelu3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Prelu.js\nvar PRELU = `return (a < 0.) ? b * a : a;`;\nvar PRELU_PACKED = `\n vec4 aLessThanZero = vec4(lessThan(a, vec4(0.)));\n return (aLessThanZero * (b * a)) + ((vec4(1.0) - aLessThanZero) * a);\n`;\nfunction prelu4(args) {\n const { inputs, backend: backend2 } = args;\n const { x, alpha } = inputs;\n const program = env().getBool(\"WEBGL_PACK_BINARY_OPERATIONS\") ? new BinaryOpPackedProgram(PRELU_PACKED, x.shape, alpha.shape) : new BinaryOpProgram(PRELU, x.shape, alpha.shape);\n return backend2.runWebGLProgram(program, [x, alpha], \"float32\");\n}\nvar preluConfig2 = {\n kernelName: Prelu,\n backendName: \"webgl\",\n kernelFunc: prelu4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernel_utils/kernel_funcs_utils.js\nvar CHECK_NAN_SNIPPET_UNARY = `if (isnan(x)) return x;`;\nvar CHECK_NAN_SNIPPET_BINARY = `\n if (isnan(a)) return a;\n if (isnan(b)) return b;\n`;\nvar CHECK_NAN_SNIPPET_BINARY_PACKED = `\n result.r = isNaN.r > 0. ? NAN : result.r;\n result.g = isNaN.g > 0. ? NAN : result.g;\n result.b = isNaN.b > 0. ? NAN : result.b;\n result.a = isNaN.a > 0. ? NAN : result.a;\n`;\nfunction unaryKernelFunc2({ opSnippet, packedOpSnippet, cpuKernelImpl, dtype }) {\n return ({ inputs, backend: backend2 }) => {\n const { x } = inputs;\n const webglBackend = backend2;\n const $dtype = dtype || x.dtype;\n if (webglBackend.shouldExecuteOnCPU([x]) && cpuKernelImpl != null) {\n const xData = webglBackend.texData.get(x.dataId);\n const outValues = cpuKernelImpl(xData.values, $dtype);\n return webglBackend.makeTensorInfo(x.shape, $dtype, outValues);\n }\n const shouldUsePackedProgram = env().getBool(\"WEBGL_PACK_UNARY_OPERATIONS\") && packedOpSnippet != null;\n let program;\n if (shouldUsePackedProgram) {\n program = new UnaryOpPackedProgram(x.shape, packedOpSnippet);\n } else {\n program = new UnaryOpProgram(x.shape, opSnippet);\n }\n return webglBackend.runWebGLProgram(program, [x], $dtype);\n };\n}\nfunction binaryKernelFunc2({ opSnippet, packedOpSnippet, checkOutOfBounds = false, supportsComplex = false, cpuKernelImpl, dtype }) {\n return ({ inputs, backend: backend2 }) => {\n const { a, b } = inputs;\n const webglBackend = backend2;\n if (supportsComplex && a.dtype === \"complex64\") {\n const aData = webglBackend.texData.get(a.dataId);\n const bData = webglBackend.texData.get(b.dataId);\n const [real5, imag5] = [\n [aData.complexTensorInfos.real, bData.complexTensorInfos.real],\n [aData.complexTensorInfos.imag, bData.complexTensorInfos.imag]\n ].map((complexParts) => {\n const [aPart, bPart] = complexParts;\n const aHandle = {\n dataId: aPart.dataId,\n dtype: aPart.dtype,\n shape: a.shape\n };\n const bHandle = {\n dataId: bPart.dataId,\n dtype: bPart.dtype,\n shape: b.shape\n };\n const program2 = new BinaryOpProgram(opSnippet, a.shape, b.shape);\n return webglBackend.runWebGLProgram(program2, [aHandle, bHandle], upcastType(aPart.dtype, bPart.dtype));\n });\n const complexOutput = complex3({ inputs: { real: real5, imag: imag5 }, backend: webglBackend });\n webglBackend.disposeIntermediateTensorInfo(real5);\n webglBackend.disposeIntermediateTensorInfo(imag5);\n return complexOutput;\n }\n const $dtype = dtype || upcastType(a.dtype, b.dtype);\n if ((a.dtype === \"string\" || b.dtype === \"string\" || webglBackend.shouldExecuteOnCPU([a, b])) && cpuKernelImpl != null) {\n const aVals = webglBackend.texData.get(a.dataId).values;\n const bVals = webglBackend.texData.get(b.dataId).values;\n const decodedAVals = a.dtype === \"string\" ? backend_util_exports.fromUint8ToStringArray(aVals) : aVals;\n const decodedBVals = a.dtype === \"string\" ? backend_util_exports.fromUint8ToStringArray(bVals) : bVals;\n const [outValues, outShape] = cpuKernelImpl(a.shape, b.shape, decodedAVals, decodedBVals, $dtype);\n const out = webglBackend.makeTensorInfo(outShape, $dtype);\n const outData = webglBackend.texData.get(out.dataId);\n outData.values = outValues;\n return out;\n }\n const shouldUsePackedProgram = env().getBool(\"WEBGL_PACK_BINARY_OPERATIONS\") && packedOpSnippet != null;\n let program;\n if (shouldUsePackedProgram) {\n program = new BinaryOpPackedProgram(packedOpSnippet, a.shape, b.shape, checkOutOfBounds);\n } else {\n program = new BinaryOpProgram(opSnippet, a.shape, b.shape);\n }\n return webglBackend.runWebGLProgram(program, [a, b], $dtype);\n };\n}\nfunction mapActivationToShaderProgram(activation2, packed = false) {\n if (activation2 === \"linear\") {\n if (packed) {\n return LINEAR2;\n }\n return LINEAR;\n } else if (activation2 === \"relu\") {\n if (packed) {\n return RELU2;\n }\n return RELU;\n } else if (activation2 === \"elu\") {\n if (packed) {\n return ELU3;\n }\n return ELU2;\n } else if (activation2 === \"relu6\") {\n if (packed) {\n return RELU62;\n }\n return RELU6;\n } else if (activation2 === \"prelu\") {\n if (packed) {\n return PRELU_PACKED;\n }\n return PRELU;\n } else if (activation2 === \"leakyrelu\") {\n if (packed) {\n return LEAKYRELU_PACKED;\n }\n return LEAKYRELU;\n } else if (activation2 === \"sigmoid\") {\n if (packed) {\n return SIGMOID2;\n }\n return SIGMOID;\n }\n throw new Error(`Activation ${activation2} has not been implemented for the WebGL backend.`);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/mulmat_packed_gpu.js\nvar MatMulPackedProgram = class {\n constructor(aShape, bShape, outputShape, transposeA = false, transposeB = false, addBias = false, activation2 = null, hasPreluActivation = false, hasLeakyreluActivation = false) {\n this.variableNames = [\"matrixA\", \"matrixB\"];\n this.packedInputs = true;\n this.packedOutput = true;\n this.outputShape = outputShape;\n this.enableShapeUniforms = useShapeUniforms(this.outputShape.length);\n const sharedDim = transposeA ? aShape[1] : aShape[2];\n const sharedDimensionPacked = Math.ceil(sharedDim / 2);\n const aSample = transposeA ? \"i * 2, rc.y\" : \"rc.y, i * 2\";\n const bSample = transposeB ? \"rc.z, i * 2\" : \"i * 2, rc.z\";\n const aSwizzle = transposeA ? [\"a.xxyy\", \"a.zzww\"] : [\"a.xxzz\", \"a.yyww\"];\n const bSwizzle = transposeB ? [\"b.xzxz\", \"b.ywyw\"] : [\"b.xyxy\", \"b.zwzw\"];\n let activationSnippet = \"\", applyActivationSnippet = \"\";\n if (activation2) {\n if (hasPreluActivation) {\n activationSnippet = `vec4 activation(vec4 a) {\n vec4 b = getPreluActivationWeightsAtOutCoords();\n ${activation2}\n }`;\n } else if (hasLeakyreluActivation) {\n activationSnippet = `vec4 activation(vec4 a) {\n vec4 b = getLeakyreluAlphaAtOutCoords();\n ${activation2}\n }`;\n } else {\n activationSnippet = `vec4 activation(vec4 x) {\n ${activation2}\n }`;\n }\n applyActivationSnippet = `result = activation(result);`;\n }\n const addBiasSnippet = addBias ? \"result += getBiasAtOutCoords();\" : \"\";\n if (addBias) {\n this.variableNames.push(\"bias\");\n }\n if (hasPreluActivation) {\n this.variableNames.push(\"preluActivationWeights\");\n }\n if (hasLeakyreluActivation) {\n this.variableNames.push(\"leakyreluAlpha\");\n }\n let batchASnippet = \"rc.x\";\n let batchBSnippet = \"rc.x\";\n if (aShape[0] < bShape[0]) {\n batchASnippet = `int(min(float(rc.x), ${aShape[0] - 1}.))`;\n } else if (bShape[0] < aShape[0]) {\n batchBSnippet = `int(min(float(rc.x), ${bShape[0] - 1}.))`;\n }\n this.userCode = `\n ${activationSnippet}\n // Don't use uniform for sharedDimensionPacked for performance.\n const float sharedDimension = ${sharedDimensionPacked}.0;\n\n vec4 dot2x2ARowBCol(ivec3 rc) {\n vec4 result = vec4(0);\n for (int i = 0; i < ${sharedDimensionPacked}; i++) {\n int batchA = ${batchASnippet};\n int batchB = ${batchBSnippet};\n vec4 a = getMatrixA(batchA, ${aSample});\n vec4 b = getMatrixB(batchB, ${bSample});\n\n // These swizzled products need to be separately added.\n // See: https://github.com/tensorflow/tfjs/issues/1735\n result += (${aSwizzle[0]} * ${bSwizzle[0]});\n result += (${aSwizzle[1]} * ${bSwizzle[1]});\n }\n return result;\n }\n\n void main() {\n ivec3 rc = getOutputCoords();\n vec4 result = dot2x2ARowBCol(rc);\n\n ${addBiasSnippet}\n\n ${applyActivationSnippet}\n\n setOutput(result);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/binaryop_complex_gpu.js\nvar COMPLEX_MULTIPLY = {\n REAL: \"return areal * breal - aimag * bimag;\",\n IMAG: \"return areal * bimag + aimag * breal;\"\n};\nvar BinaryOpComplexProgram = class {\n constructor(op2, aShape, bShape) {\n this.variableNames = [\"AReal\", \"AImag\", \"BReal\", \"BImag\"];\n this.outputShape = backend_util_exports.assertAndGetBroadcastShape(aShape, bShape);\n this.userCode = `\n float binaryOpComplex(\n float areal, float aimag, float breal, float bimag) {\n ${op2}\n }\n\n void main() {\n float areal = getARealAtOutCoords();\n float aimag = getAImagAtOutCoords();\n float breal = getBRealAtOutCoords();\n float bimag = getBImagAtOutCoords();\n setOutput(binaryOpComplex(areal, aimag, breal, bimag));\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Multiply.js\nvar MUL = \"return a * b;\";\nfunction multiply3(args) {\n const { inputs, backend: backend2 } = args;\n const { a, b } = inputs;\n const dtype = backend_util_exports.upcastType(a.dtype, b.dtype);\n if (a.dtype === \"complex64\") {\n const aData = backend2.texData.get(a.dataId);\n const bData = backend2.texData.get(b.dataId);\n const realProgram = new BinaryOpComplexProgram(COMPLEX_MULTIPLY.REAL, a.shape, b.shape);\n const imagProgram = new BinaryOpComplexProgram(COMPLEX_MULTIPLY.IMAG, a.shape, b.shape);\n const inputs2 = [\n {\n dataId: aData.complexTensorInfos.real.dataId,\n dtype: aData.complexTensorInfos.real.dtype,\n shape: a.shape\n },\n {\n dataId: aData.complexTensorInfos.imag.dataId,\n dtype: aData.complexTensorInfos.imag.dtype,\n shape: a.shape\n },\n {\n dataId: bData.complexTensorInfos.real.dataId,\n dtype: bData.complexTensorInfos.real.dtype,\n shape: b.shape\n },\n {\n dataId: bData.complexTensorInfos.imag.dataId,\n dtype: bData.complexTensorInfos.imag.dtype,\n shape: b.shape\n }\n ];\n const realPart = backend2.runWebGLProgram(realProgram, inputs2, \"float32\");\n const imagPart = backend2.runWebGLProgram(imagProgram, inputs2, \"float32\");\n const complexOutput = complex3({ inputs: { real: realPart, imag: imagPart }, backend: backend2 });\n backend2.disposeIntermediateTensorInfo(realPart);\n backend2.disposeIntermediateTensorInfo(imagPart);\n return complexOutput;\n }\n if (backend2.shouldExecuteOnCPU([a, b])) {\n const aData = backend2.texData.get(a.dataId);\n const bData = backend2.texData.get(b.dataId);\n const [outValues, outShape] = multiplyImplCPU(a.shape, b.shape, aData.values, bData.values, dtype);\n const out = backend2.makeTensorInfo(outShape, dtype);\n const outData = backend2.texData.get(out.dataId);\n outData.values = outValues;\n return out;\n }\n let program;\n if (env().getBool(\"WEBGL_PACK_BINARY_OPERATIONS\")) {\n program = new BinaryOpPackedProgram(MUL, a.shape, b.shape);\n } else {\n program = new BinaryOpProgram(MUL, a.shape, b.shape);\n }\n return backend2.runWebGLProgram(program, [a, b], dtype);\n}\nvar multiplyConfig2 = {\n kernelName: Multiply,\n backendName: \"webgl\",\n kernelFunc: multiply3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernel_utils/reshape.js\nfunction packedReshape(input2, afterShape, backend2) {\n const input3DShape = [\n getBatchDim(input2.shape),\n ...getRowsCols(input2.shape)\n ];\n const input3D = {\n dtype: input2.dtype,\n shape: input3DShape,\n dataId: input2.dataId\n };\n const afterShapeAs3D = [\n getBatchDim(afterShape),\n ...getRowsCols(afterShape)\n ];\n const program = new ReshapePackedProgram(afterShapeAs3D, input3DShape);\n const preventEagerUnpackingOfOutput = true;\n const customValues = [input3DShape];\n const output = backend2.runWebGLProgram(program, [input3D], input2.dtype, customValues, preventEagerUnpackingOfOutput);\n return { dataId: output.dataId, shape: afterShape, dtype: output.dtype };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Reshape.js\nfunction reshape4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { shape } = attrs;\n const webglBackend = backend2;\n const xSize = util_exports.sizeFromShape(x.shape);\n const $shape = util_exports.inferFromImplicitShape(shape, xSize);\n const $xSize = util_exports.sizeFromShape($shape);\n util_exports.assert(xSize === $xSize, () => `The new shape (${$shape}) has ${$xSize} elements and the old shape (${x.shape}) has ${xSize} elements. The new shape and old shape must have the same number of elements.`);\n const xTexData = webglBackend.texData.get(x.dataId);\n if (xTexData.isPacked && !isReshapeFree(x.shape, $shape) && !(xTexData.texture !== null && isReshapeFree(xTexData.shape, $shape))) {\n return packedReshape(x, $shape, webglBackend);\n }\n webglBackend.incRef(x.dataId);\n return { dataId: x.dataId, shape: $shape, dtype: x.dtype };\n}\nvar reshapeConfig2 = {\n kernelName: Reshape,\n backendName: \"webgl\",\n kernelFunc: reshape4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/mean_gpu.js\nvar MeanProgram = class {\n constructor(reduceInfo, divisor) {\n this.variableNames = [\"x\"];\n const { windowSize, batchSize, inSize, outSize } = reduceInfo;\n this.outputShape = [batchSize, outSize];\n const windowSizeNearestVec4 = Math.floor(windowSize / 4) * 4;\n const windowSizeVec4Remainder = windowSize % 4;\n let updateSnippet = `sumValue += dot(values, ones);`;\n if (divisor != null) {\n const denominator = 1 / divisor;\n updateSnippet = `sumValue += dot(values * ${util_exports.isInt(denominator) ? denominator.toPrecision(2) : denominator}, ones);`;\n }\n let checkOutOfBounds = \"\";\n if (inSize % windowSize > 0) {\n checkOutOfBounds = `\n if (inIdx < 0 || inIdx >= ${inSize}) {\n return 0.0;\n }\n `;\n }\n this.userCode = `\n const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);\n\n float getValue(int batch, int inIdx) {\n ${checkOutOfBounds}\n return getX(batch, inIdx);\n }\n\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n int outIdx = coords[1];\n int inOffset = outIdx * ${windowSize};\n\n float sumValue = 0.0;\n\n for (int i = 0; i < ${windowSizeNearestVec4}; i += 4) {\n int inIdx = inOffset + i;\n vec4 values = vec4(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n getValue(batch, inIdx + 2),\n getValue(batch, inIdx + 3)\n );\n\n ${updateSnippet}\n }\n\n int inIdx = inOffset + ${windowSizeNearestVec4};\n if (${windowSizeVec4Remainder === 1}) {\n vec4 values = vec4(getValue(batch, inIdx), 0.0, 0.0, 0.0);\n\n ${updateSnippet}\n } else if (${windowSizeVec4Remainder === 2}) {\n vec4 values = vec4(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1), 0.0, 0.0);\n\n ${updateSnippet}\n } else if (${windowSizeVec4Remainder === 3}) {\n vec4 values = vec4(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n getValue(batch, inIdx + 2), 0.0);\n\n ${updateSnippet}\n }\n setOutput(sumValue);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/reduce_gpu.js\nvar ReduceProgram = class {\n constructor(reduceInfo, reduceType) {\n this.variableNames = [\"x\"];\n const { windowSize, batchSize, inSize, outSize } = reduceInfo;\n this.outputShape = [batchSize, outSize];\n let initializationValue = \"0.0\";\n let compareOp = ``;\n if (reduceType === \"prod\") {\n initializationValue = \"1.0\";\n } else if (reduceType === \"min\") {\n initializationValue = \"1.0 / 1e-20\";\n compareOp = `min`;\n } else if (reduceType === \"max\") {\n initializationValue = \"-1.0 / 1e-20\";\n compareOp = `max`;\n }\n let returnValue = `${reduceType}(${reduceType}(${reduceType}(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])`;\n if (reduceType === \"sum\") {\n returnValue = `sumValue`;\n } else if (reduceType === \"prod\") {\n returnValue = `prodValue`;\n } else if (reduceType === \"all\") {\n returnValue = `allValue`;\n } else if (reduceType === \"any\") {\n returnValue = `anyValue`;\n }\n const windowSizeNearestVec4 = Math.floor(windowSize / 4) * 4;\n const windowSizeVec4Remainder = windowSize % 4;\n let updateSnippet = `\n if (${reduceType === \"sum\"}) {\n sumValue += dot(values, ones);\n } else if (${reduceType === \"prod\"}) {\n vec2 tmp = vec2(values[0], values[1]) * vec2(values[2], values[3]);\n prodValue *= tmp[0] * tmp[1];\n } else {\n minMaxValue = ${compareOp}(values, minMaxValue);\n if (${reduceType === \"min\"} || ${reduceType === \"max\"}) {\n minMaxValue = ${compareOp}(values, minMaxValue);\n bvec4 isNaN = isnan(values);\n if (isNaN.r || isNaN.g || isNaN.b || isNaN.a) {\n minMaxValue = vec4(NAN);\n }\n }\n }\n `;\n let vecType = `vec4`;\n if (reduceType === \"all\") {\n initializationValue = \"1.0\";\n updateSnippet = `\n bool reducedAllValue = all(values);\n float floatedReducedAllValue = float(reducedAllValue);\n allValue = float(allValue >= 1.0 && floatedReducedAllValue >= 1.0);\n `;\n vecType = `bvec4`;\n } else if (reduceType === \"any\") {\n initializationValue = \"0.0\";\n updateSnippet = `\n bool reducedAnyValue = any(values);\n float floatedReducedAnyValue = float(reducedAnyValue);\n anyValue = float(anyValue >= 1.0 || floatedReducedAnyValue >= 1.0);\n `;\n vecType = `bvec4`;\n }\n let checkOutOfBounds = \"\";\n if (inSize % windowSize > 0) {\n checkOutOfBounds = `\n if (inIdx < 0 || inIdx >= ${inSize}) {\n return initializationValue;\n }\n `;\n }\n this.userCode = `\n const float initializationValue = ${initializationValue};\n const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);\n\n float getValue(int batch, int inIdx) {\n ${checkOutOfBounds}\n return getX(batch, inIdx);\n }\n\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n int outIdx = coords[1];\n int inOffset = outIdx * ${windowSize};\n\n vec4 minMaxValue = vec4(${initializationValue});\n float prodValue = 1.0;\n float sumValue = 0.0;\n float allValue = 1.0;\n float anyValue = 0.0;\n\n for (int i = 0; i < ${windowSizeNearestVec4}; i += 4) {\n int inIdx = inOffset + i;\n ${vecType} values = ${vecType}(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n getValue(batch, inIdx + 2),\n getValue(batch, inIdx + 3)\n );\n\n ${updateSnippet}\n }\n\n int inIdx = inOffset + ${windowSizeNearestVec4};\n if (${windowSizeVec4Remainder === 1}) {\n ${vecType} values = ${vecType}(\n getValue(batch, inIdx),\n initializationValue,\n initializationValue,\n initializationValue\n );\n\n ${updateSnippet}\n } else if (${windowSizeVec4Remainder === 2}) {\n ${vecType} values = ${vecType}(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n initializationValue,\n initializationValue\n );\n\n ${updateSnippet}\n } else if (${windowSizeVec4Remainder === 3}) {\n ${vecType} values = ${vecType}(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n getValue(batch, inIdx + 2),\n initializationValue\n );\n\n ${updateSnippet}\n }\n setOutput(${returnValue});\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernel_utils/reduce.js\nfunction getReductionStages(inShape) {\n const stages = [];\n while (stages.length === 0 || stages[stages.length - 1].outSize !== 1) {\n const outSize = stages.length ? stages[stages.length - 1].outSize : inShape[1];\n const windowSize = backend_util_exports.computeOptimalWindowSize(outSize);\n stages.push({\n inSize: outSize,\n windowSize,\n outSize: Math.ceil(outSize / windowSize)\n });\n }\n return stages;\n}\nfunction reduce(x, dtype, reductionType, backend2) {\n const reductionStages = getReductionStages(x.shape);\n let result = x;\n for (let i = 0; i < reductionStages.length; i++) {\n const { inSize, windowSize, outSize } = reductionStages[i];\n let program;\n let previousResult;\n if (reductionType === \"mean\") {\n program = i === 0 ? new MeanProgram({ windowSize, inSize, batchSize: x.shape[0], outSize }, inSize) : new MeanProgram({ windowSize, inSize, batchSize: x.shape[0], outSize });\n } else {\n program = new ReduceProgram({ windowSize, inSize, batchSize: x.shape[0], outSize }, reductionType);\n }\n previousResult = result;\n result = backend2.runWebGLProgram(program, [result], dtype);\n if (previousResult.dataId !== x.dataId) {\n backend2.disposeIntermediateTensorInfo(previousResult);\n }\n }\n return result;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/transpose_gpu.js\nvar TransposeProgram = class {\n constructor(aShape, newDim) {\n this.variableNames = [\"A\"];\n const outputShape = new Array(aShape.length);\n for (let i = 0; i < outputShape.length; i++) {\n outputShape[i] = aShape[newDim[i]];\n }\n this.outputShape = outputShape;\n this.rank = outputShape.length;\n const dtype = getCoordsDataType(this.rank);\n const switched = getSwitchedCoords(newDim);\n this.userCode = `\n void main() {\n ${dtype} resRC = getOutputCoords();\n setOutput(getA(${switched}));\n }\n `;\n }\n};\nfunction getSwitchedCoords(newDim) {\n const rank = newDim.length;\n if (rank > 6) {\n throw Error(`Transpose for rank ${rank} is not yet supported`);\n }\n const originalOrder = [\"resRC.x\", \"resRC.y\", \"resRC.z\", \"resRC.w\", \"resRC.u\", \"resRC.v\"];\n const switchedCoords = new Array(rank);\n for (let i = 0; i < newDim.length; i++) {\n switchedCoords[newDim[i]] = originalOrder[i];\n }\n return switchedCoords.join();\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/transpose_packed_gpu.js\nvar TransposePackedProgram = class {\n constructor(aShape, newDim) {\n this.variableNames = [\"A\"];\n this.packedInputs = true;\n this.packedOutput = true;\n const outputShape = new Array(aShape.length);\n for (let i = 0; i < outputShape.length; i++) {\n outputShape[i] = aShape[newDim[i]];\n }\n this.outputShape = outputShape;\n this.rank = outputShape.length;\n if (this.rank > 6) {\n throw Error(`Packed transpose for rank ${this.rank} is not yet supported.`);\n }\n const dtype = getCoordsDataType(this.rank);\n const outputOrder = getVecChannels(\"rc\", this.rank);\n const switchedOrder = new Array(this.rank);\n for (let i = 0; i < newDim.length; i++) {\n switchedOrder[newDim[i]] = outputOrder[i];\n }\n const innerDims = `vec2(${switchedOrder.slice(-2).join()})`;\n const nextColumn = `++${outputOrder[this.rank - 1]} < ${outputShape[this.rank - 1]}`;\n const getc = `getChannel(getA(${switchedOrder.join()}), ${innerDims})`;\n this.userCode = `\n void main() {\n ${dtype} rc = getOutputCoords();\n vec4 result = vec4(0.);\n result[0] = ${getc};\n if(${nextColumn}) {\n result[1] = ${getc};\n }\n --${outputOrder[this.rank - 1]};\n if(++${outputOrder[this.rank - 2]} < ${outputShape[this.rank - 2]}) {\n result[2] = ${getc};\n if(${nextColumn}) {\n result[3] = ${getc};\n }\n }\n setOutput(result);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Transpose_impl.js\nfunction transposeImpl2(x, perm, backend2) {\n const program = env().getBool(\"WEBGL_PACK_ARRAY_OPERATIONS\") ? new TransposePackedProgram(x.shape, perm) : new TransposeProgram(x.shape, perm);\n return backend2.runWebGLProgram(program, [x], x.dtype);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Sum_impl.js\nfunction sumImpl(x, axis, keepDims, backend2) {\n const reductionIndices = axis;\n const xRank = x.shape.length;\n const origAxes = util_exports.parseAxisParam(reductionIndices, x.shape);\n let axes = origAxes;\n const permutedAxes = backend_util_exports.getAxesPermutation(axes, xRank);\n const sumInputIsTransposed = permutedAxes != null;\n let sumInput = x;\n if (sumInputIsTransposed) {\n sumInput = transposeImpl2(x, permutedAxes, backend2);\n axes = backend_util_exports.getInnerMostAxes(axes.length, xRank);\n }\n backend_util_exports.assertAxesAreInnerMostDims(\"sum\", axes, xRank);\n const [sumOutShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes(sumInput.shape, axes);\n let outShape = sumOutShape;\n if (keepDims) {\n outShape = backend_util_exports.expandShapeToKeepDim(sumOutShape, origAxes);\n }\n const inSize = util_exports.sizeFromShape(reduceShape);\n const xSize = util_exports.sizeFromShape(x.shape);\n const batchSize = xSize / inSize;\n const reshapedInput = reshape4({ inputs: { x: sumInput }, attrs: { shape: [batchSize, inSize] }, backend: backend2 });\n const outType = sumOutType(x.dtype);\n const reduced = reduce(reshapedInput, outType, \"sum\", backend2);\n const out = reshape4({ inputs: { x: reduced }, attrs: { shape: outShape }, backend: backend2 });\n backend2.disposeIntermediateTensorInfo(reshapedInput);\n backend2.disposeIntermediateTensorInfo(reduced);\n if (sumInputIsTransposed) {\n backend2.disposeIntermediateTensorInfo(sumInput);\n }\n return out;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Sum.js\nfunction sum4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis, keepDims } = attrs;\n return sumImpl(x, axis, keepDims, backend2);\n}\nvar sumConfig2 = {\n kernelName: Sum,\n backendName: \"webgl\",\n kernelFunc: sum4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Transpose.js\nfunction transpose3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { perm } = attrs;\n const webglBackend = backend2;\n const xRank = x.shape.length;\n const newShape = new Array(xRank);\n for (let i = 0; i < newShape.length; i++) {\n newShape[i] = x.shape[perm[i]];\n }\n let out;\n if (webglBackend.shouldExecuteOnCPU([x])) {\n const xTexData = webglBackend.texData.get(x.dataId);\n const values = xTexData.values;\n const outValues = transposeImplCPU(values, x.shape, x.dtype, perm, newShape);\n out = webglBackend.makeTensorInfo(newShape, x.dtype);\n const outData = webglBackend.texData.get(out.dataId);\n outData.values = outValues;\n } else {\n out = transposeImpl2(x, perm, webglBackend);\n }\n return out;\n}\nvar transposeConfig2 = {\n kernelName: Transpose,\n backendName: \"webgl\",\n kernelFunc: transpose3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/BatchMatMul_impl.js\nvar MATMUL_SHARED_DIM_THRESHOLD = 1e3;\nfunction batchMatMulImpl({ a, b, transposeA, transposeB, backend: backend2, bias = null, preluActivationWeights = null, leakyreluAlpha = 0, activation: activation2 = null }) {\n const aRank = a.shape.length;\n const bRank = b.shape.length;\n const innerShapeA = transposeA ? a.shape[aRank - 2] : a.shape[aRank - 1];\n const innerShapeB = transposeB ? b.shape[bRank - 1] : b.shape[bRank - 2];\n const outerShapeA = transposeA ? a.shape[aRank - 1] : a.shape[aRank - 2];\n const outerShapeB = transposeB ? b.shape[bRank - 2] : b.shape[bRank - 1];\n const outerDimsA = a.shape.slice(0, -2);\n const outerDimsB = b.shape.slice(0, -2);\n const batchDimA = util_exports.sizeFromShape(outerDimsA);\n const batchDimB = util_exports.sizeFromShape(outerDimsB);\n const outShapeOuterDims = broadcast_util_exports.assertAndGetBroadcastShape(a.shape.slice(0, -2), b.shape.slice(0, -2));\n const outShape = outShapeOuterDims.concat([outerShapeA, outerShapeB]);\n util_exports.assert(innerShapeA === innerShapeB, () => `Error in matMul: inner shapes (${innerShapeA}) and (${innerShapeB}) of Tensors with shapes ${a.shape} and ${b.shape} and transposeA=${transposeA} and transposeB=${transposeB} must match.`);\n const a3dShape = transposeA ? [batchDimA, innerShapeA, outerShapeA] : [batchDimA, outerShapeA, innerShapeA];\n const b3dShape = transposeB ? [batchDimB, outerShapeB, innerShapeB] : [batchDimB, innerShapeB, outerShapeB];\n const a3d = reshape4({ inputs: { x: a }, backend: backend2, attrs: { shape: a3dShape } });\n const b3d = reshape4({ inputs: { x: b }, backend: backend2, attrs: { shape: b3dShape } });\n const intermediates = [a3d, b3d];\n const batchDim = Math.max(batchDimA, batchDimB);\n const sharedDim = transposeA ? a3d.shape[1] : a3d.shape[2];\n const hasBias = bias != null;\n const hasPreluActivationWeights = preluActivationWeights != null;\n const hasLeakyreluAlpha = activation2 === \"leakyrelu\";\n const fusedActivation = activation2 != null ? mapActivationToShaderProgram(activation2, true) : null;\n const containsFusedOps = hasBias || hasPreluActivationWeights || hasLeakyreluAlpha || fusedActivation != null;\n let out;\n if ((outerShapeA === 1 || outerShapeB === 1) && sharedDim > MATMUL_SHARED_DIM_THRESHOLD && containsFusedOps === false) {\n let aVec = a3d;\n let bVec = b3d;\n if (transposeA) {\n aVec = transpose3({ inputs: { x: a3d }, backend: backend2, attrs: { perm: [0, 2, 1] } });\n intermediates.push(aVec);\n }\n if (transposeB) {\n bVec = transpose3({ inputs: { x: b3d }, backend: backend2, attrs: { perm: [0, 2, 1] } });\n intermediates.push(bVec);\n }\n const shouldReshapeA = outerShapeB !== 1;\n const shouldReshapeB = outerShapeB === 1;\n let aVec3d = aVec;\n if (shouldReshapeA) {\n aVec3d = reshape4({\n inputs: { x: aVec },\n backend: backend2,\n attrs: { shape: [batchDim, sharedDim, 1] }\n });\n intermediates.push(aVec3d);\n }\n const axis = outerShapeB === 1 ? 2 : 1;\n let bVec3d = bVec;\n if (shouldReshapeB) {\n bVec3d = reshape4({\n inputs: { x: bVec },\n backend: backend2,\n attrs: { shape: [batchDim, 1, sharedDim] }\n });\n intermediates.push(bVec3d);\n }\n const product = multiply3({ inputs: { a: aVec3d, b: bVec3d }, backend: backend2 });\n out = sum4({ inputs: { x: product }, backend: backend2, attrs: { axis, keepDims: true } });\n intermediates.push(product);\n } else {\n const dtype = upcastType(a.dtype, b.dtype);\n const program = new MatMulPackedProgram(a3dShape, b3dShape, [batchDim, outerShapeA, outerShapeB], transposeA, transposeB, hasBias, fusedActivation, hasPreluActivationWeights, hasLeakyreluAlpha);\n const inputs = [a3d, b3d];\n if (bias != null) {\n inputs.push(bias);\n }\n if (hasPreluActivationWeights) {\n inputs.push(preluActivationWeights);\n }\n if (hasLeakyreluAlpha) {\n const $leakyreluAlpha = backend2.makeTensorInfo([], \"float32\", util_exports.createScalarValue(leakyreluAlpha, \"float32\"));\n inputs.push($leakyreluAlpha);\n intermediates.push($leakyreluAlpha);\n }\n out = backend2.runWebGLProgram(program, inputs, dtype);\n }\n const outReshaped = reshape4({ inputs: { x: out }, backend: backend2, attrs: { shape: outShape } });\n intermediates.push(out);\n for (const i of intermediates) {\n backend2.disposeIntermediateTensorInfo(i);\n }\n return outReshaped;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/_FusedMatMul.js\nfunction _fusedMatMul2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { a, b, bias, preluActivationWeights } = inputs;\n const { transposeA, transposeB, activation: activation2, leakyreluAlpha } = attrs;\n return batchMatMulImpl({\n a,\n b,\n transposeA,\n transposeB,\n backend: backend2,\n bias,\n preluActivationWeights,\n leakyreluAlpha,\n activation: activation2\n });\n}\nvar _fusedMatMulConfig2 = {\n kernelName: _FusedMatMul,\n backendName: \"webgl\",\n kernelFunc: _fusedMatMul2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Abs.js\nvar ABS2 = `return abs(x);`;\nfunction abs3(args) {\n const { inputs, backend: backend2 } = args;\n const { x } = inputs;\n if (backend2.shouldExecuteOnCPU([x]) && x.dtype !== \"complex64\") {\n const xData = backend2.texData.get(x.dataId);\n const outValues = simpleAbsImplCPU(xData.values);\n return backend2.makeTensorInfo(x.shape, x.dtype, outValues);\n }\n let program;\n if (env().getBool(\"WEBGL_PACK_UNARY_OPERATIONS\")) {\n program = new UnaryOpPackedProgram(x.shape, ABS2);\n } else {\n program = new UnaryOpProgram(x.shape, ABS2);\n }\n return backend2.runWebGLProgram(program, [x], x.dtype);\n}\nvar absConfig2 = {\n kernelName: Abs,\n backendName: \"webgl\",\n kernelFunc: abs3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Acos.js\nvar ACOS = CHECK_NAN_SNIPPET + `\n if (abs(x) > 1.) {\n return NAN;\n }\n return acos(x);\n`;\nvar acos3 = unaryKernelFunc2({ opSnippet: ACOS });\nvar acosConfig2 = {\n kernelName: Acos,\n backendName: \"webgl\",\n kernelFunc: acos3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Acosh.js\nvar ACOSH = CHECK_NAN_SNIPPET + `\n if (x < 1.0) return NAN;\nreturn log(x + sqrt(x * x - 1.0));`;\nvar acosh3 = unaryKernelFunc2({ opSnippet: ACOSH });\nvar acoshConfig2 = {\n kernelName: Acosh,\n backendName: \"webgl\",\n kernelFunc: acosh3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Add.js\nvar ADD = \"return a + b;\";\nvar addKernelFunc = binaryKernelFunc2({\n opSnippet: ADD,\n packedOpSnippet: ADD,\n supportsComplex: true,\n cpuKernelImpl: addImplCPU\n});\nvar addConfig2 = {\n kernelName: Add,\n backendName: \"webgl\",\n kernelFunc: addKernelFunc\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/addn_gpu.js\nvar AddNProgram = class {\n constructor(outputShape, shapes) {\n this.outputShape = [];\n this.outputShape = outputShape;\n this.variableNames = shapes.map((_, i) => `T${i}`);\n const snippets = [];\n this.variableNames.forEach((variable2) => {\n snippets.push(`float v${variable2} = get${variable2}AtOutCoords();`);\n });\n const operation = this.variableNames.map((variable2) => {\n return `v${variable2}`;\n }).join(\" + \");\n this.userCode = `\n void main() {\n ${snippets.join(\"\\n \")}\n\n float result = ${operation};\n setOutput(result);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/addn_packed_gpu.js\nvar AddNPackedProgram = class {\n constructor(outputShape, shapes) {\n this.outputShape = [];\n this.packedInputs = true;\n this.packedOutput = true;\n this.outputShape = outputShape;\n this.variableNames = shapes.map((_, i) => `T${i}`);\n const snippets = [];\n this.variableNames.forEach((variable2) => {\n snippets.push(`vec4 v${variable2} = get${variable2}AtOutCoords();`);\n });\n const operation = this.variableNames.map((variable2) => {\n return `v${variable2}`;\n }).join(\" + \");\n this.userCode = `\n void main() {\n ${snippets.join(\"\\n \")}\n\n vec4 result = ${operation};\n setOutput(result);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/AddN.js\nfunction addN3(args) {\n const { inputs, backend: backend2 } = args;\n const tensors = inputs;\n if (tensors.length === 1) {\n return identity3({ inputs: { x: tensors[0] }, backend: backend2 });\n }\n if (tensors.length > env().get(\"WEBGL_MAX_TEXTURES_IN_SHADER\")) {\n const midIndex = Math.floor(tensors.length / 2);\n const leftSide = addN3({ inputs: tensors.slice(0, midIndex), backend: backend2 });\n const rightSide = addN3({ inputs: tensors.slice(midIndex), backend: backend2 });\n return addN3({ inputs: [leftSide, rightSide], backend: backend2 });\n }\n const dtype = tensors.map((t) => t.dtype).reduce((d1, d2) => upcastType(d1, d2));\n const shapes = tensors.map((t) => t.shape);\n const usePackedOp = env().getBool(\"WEBGL_PACK\");\n const program = usePackedOp ? new AddNPackedProgram(tensors[0].shape, shapes) : new AddNProgram(tensors[0].shape, shapes);\n return backend2.runWebGLProgram(program, tensors, dtype);\n}\nvar addNConfig2 = {\n kernelName: AddN,\n backendName: \"webgl\",\n kernelFunc: addN3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/All.js\nfunction all3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis, keepDims } = attrs;\n const xRank = x.shape.length;\n const origAxes = util_exports.parseAxisParam(axis, x.shape);\n let axes = origAxes;\n const permutedAxes = backend_util_exports.getAxesPermutation(axes, xRank);\n let permutedX = x;\n if (permutedAxes != null) {\n permutedX = transpose3({ inputs: { x }, backend: backend2, attrs: { perm: permutedAxes } });\n axes = backend_util_exports.getInnerMostAxes(axes.length, xRank);\n }\n backend_util_exports.assertAxesAreInnerMostDims(\"all\", axes, xRank);\n const [outShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes(permutedX.shape, axes);\n const inSize = util_exports.sizeFromShape(reduceShape);\n const a2D = reshape4({ inputs: { x: permutedX }, backend: backend2, attrs: { shape: [-1, inSize] } });\n const reduced = reduce(a2D, a2D.dtype, \"all\", backend2);\n let res;\n if (keepDims) {\n const newShape = backend_util_exports.expandShapeToKeepDim(outShape, origAxes);\n res = reshape4({ inputs: { x: reduced }, backend: backend2, attrs: { shape: newShape } });\n } else {\n res = reshape4({ inputs: { x: reduced }, backend: backend2, attrs: { shape: outShape } });\n }\n backend2.disposeIntermediateTensorInfo(a2D);\n backend2.disposeIntermediateTensorInfo(reduced);\n if (permutedAxes != null) {\n backend2.disposeIntermediateTensorInfo(permutedX);\n }\n return res;\n}\nvar allConfig2 = {\n kernelName: All,\n backendName: \"webgl\",\n kernelFunc: all3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Any.js\nfunction any3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis, keepDims } = attrs;\n const xRank = x.shape.length;\n const origAxes = util_exports.parseAxisParam(axis, x.shape);\n let axes = origAxes;\n const permutedAxes = backend_util_exports.getAxesPermutation(axes, xRank);\n let permutedX = x;\n if (permutedAxes != null) {\n permutedX = transpose3({ inputs: { x }, backend: backend2, attrs: { perm: permutedAxes } });\n axes = backend_util_exports.getInnerMostAxes(axes.length, xRank);\n }\n backend_util_exports.assertAxesAreInnerMostDims(\"any\", axes, xRank);\n const [outShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes(permutedX.shape, axes);\n const inSize = util_exports.sizeFromShape(reduceShape);\n const a2D = reshape4({ inputs: { x: permutedX }, backend: backend2, attrs: { shape: [-1, inSize] } });\n const reduced = reduce(a2D, a2D.dtype, \"any\", backend2);\n let res;\n if (keepDims) {\n const newShape = backend_util_exports.expandShapeToKeepDim(outShape, origAxes);\n res = reshape4({ inputs: { x: reduced }, backend: backend2, attrs: { shape: newShape } });\n } else {\n res = reshape4({ inputs: { x: reduced }, backend: backend2, attrs: { shape: outShape } });\n }\n backend2.disposeIntermediateTensorInfo(a2D);\n backend2.disposeIntermediateTensorInfo(reduced);\n if (permutedAxes != null) {\n backend2.disposeIntermediateTensorInfo(permutedX);\n }\n return res;\n}\nvar anyConfig2 = {\n kernelName: Any,\n backendName: \"webgl\",\n kernelFunc: any3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/argminmax_gpu.js\nvar ArgMinMaxProgram = class {\n constructor(reduceInfo, op2, firstPass) {\n this.variableNames = [\"A\"];\n const { windowSize, batchSize, outSize } = reduceInfo;\n if (!firstPass) {\n this.variableNames.push(\"bestIndicesA\");\n }\n this.outputShape = [batchSize, outSize];\n const compOp = op2 === \"max\" ? \">\" : \"<\";\n const indexSnippet = firstPass ? \"inOffset + i;\" : \"round(getBestIndicesA(batch, inOffset + i));\";\n this.userCode = `\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n int outIdx = coords[1];\n int inOffset = outIdx * ${windowSize};\n\n int bestIndex = inOffset;\n float bestValue = getA(batch, bestIndex);\n\n for (int i = 0; i < ${windowSize}; i++) {\n int inIdx = ${indexSnippet};\n float candidate = getA(batch, inIdx);\n if (candidate ${compOp} bestValue) {\n bestValue = candidate;\n bestIndex = inIdx;\n }\n }\n setOutput(float(bestIndex));\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/argminmax_packed_gpu.js\nvar ArgMinMaxPackedProgram = class {\n constructor(shape, windowSize, op2, firstPass) {\n this.variableNames = [\"A\"];\n this.packedInputs = true;\n this.packedOutput = true;\n util_exports.assert(shape.length > 2, () => `Packed arg${op2.charAt(0).toUpperCase() + op2.slice(1)} supports only inputs with rank above 2.`);\n const inSize = shape[shape.length - 1];\n const outSize = Math.ceil(inSize / windowSize);\n this.outputShape = shape.slice(0, -1);\n if (outSize > 1) {\n this.outputShape.push(outSize);\n }\n if (!firstPass) {\n this.variableNames.push(\"bestIndicesA\");\n }\n const outShape = this.outputShape;\n const rank = outShape.length;\n const dtype = getCoordsDataType(rank);\n const coords3 = getChannels(\"coords\", rank);\n let sourceLocSetup;\n let sourceRank;\n if (outSize === 1) {\n sourceRank = rank + 1;\n const sourceLocDType = getCoordsDataType(sourceRank);\n sourceLocSetup = `\n ${sourceLocDType} sourceLocR = ${sourceLocDType}(${coords3.join()}, 0);\n ++${coords3[rank - 1]};\n ${sourceLocDType} sourceLocG = ${sourceLocDType}(${coords3.join()}, 0);\n ++${coords3[rank - 2]};\n ${sourceLocDType} sourceLocA = ${sourceLocDType}(${coords3.join()}, 0);\n --${coords3[rank - 1]};\n ${sourceLocDType} sourceLocB = ${sourceLocDType}(${coords3.join()}, 0);\n --${coords3[rank - 2]};`;\n } else {\n sourceRank = rank;\n sourceLocSetup = `\n ${dtype} sourceLocR = coords;\n ++${coords3[rank - 1]};\n ${dtype} sourceLocG = coords;\n ++${coords3[rank - 2]};\n ${dtype} sourceLocA = coords;\n --${coords3[rank - 1]};\n ${dtype} sourceLocB = coords;\n --${coords3[rank - 2]};`;\n }\n const channels = [\"x\", \"y\", \"z\", \"w\", \"u\", \"v\"].slice(0, sourceRank);\n const inChannel = \".\" + channels[sourceRank - 1];\n const intChannels = channels.map((x) => \"int \" + x);\n const srcRCoords = getChannels(\"sourceLocR\", sourceRank - 1).concat(\"inIdx.r\");\n const srcGCoords = getChannels(\"sourceLocG\", sourceRank - 1).concat(\"inIdx.g\");\n const srcBCoords = getChannels(\"sourceLocB\", sourceRank - 1).concat(\"inIdx.b\");\n const srcACoords = getChannels(\"sourceLocA\", sourceRank - 1).concat(\"inIdx.a\");\n const compOp = op2 === \"max\" ? \"greaterThan\" : \"lessThan\";\n const fetchCandidateIdx = firstPass ? \"\" : `\n inIdx = round(vec4(getBestIndicesAChannel(${srcRCoords.join()}),\n getBestIndicesAChannel(${srcGCoords.join()}),\n getBestIndicesAChannel(${srcBCoords.join()}),\n getBestIndicesAChannel(${srcACoords.join()})));`;\n const fetchValue = `vec4(\n getAChannel(${srcRCoords.join()}),\n hasNextCol ? getAChannel(${srcGCoords.join()}) : 0.,\n hasNextRow ? getAChannel(${srcBCoords.join()}) : 0.,\n hasNextRow && hasNextCol ? getAChannel(${srcACoords.join()}) : 0.)`;\n const getBestIndicesAChannelSnippet = firstPass ? \"\" : `\n float getBestIndicesAChannel(${intChannels.join()}) {\n return getChannel(getBestIndicesA(${channels.join()}),\n vec2(${channels.slice(-2).join()}));\n }`;\n this.userCode = `\n float getAChannel(${intChannels.join()}) {\n return getChannel(getA(${channels.join()}),\n vec2(${channels.slice(-2).join()}));\n }\n ${getBestIndicesAChannelSnippet}\n void main() {\n ${dtype} coords = getOutputCoords();\n bool hasNextCol = ${coords3[rank - 1]} < ${outShape[rank - 1] - 1};\n bool hasNextRow = ${coords3[rank - 2]} < ${outShape[rank - 2] - 1};\n ${sourceLocSetup}\n ivec4 srcIdx = ivec4(sourceLocR${inChannel}, sourceLocG${inChannel},\n sourceLocB${inChannel}, sourceLocA${inChannel}) * ${windowSize};\n ivec4 inIdx = srcIdx;\n vec4 bestIndex = vec4(inIdx);\n vec4 bestValue = ${fetchValue};\n\n for (int i = 0; i < ${windowSize}; i++) {\n inIdx = srcIdx;\n ${fetchCandidateIdx}\n vec4 candidate = ${fetchValue};\n bvec4 nan = isnan(candidate);\n bvec4 replace = bvec4(\n vec4(${compOp}(candidate, bestValue)) * (vec4(1.0) - vec4(nan)));\n\n bestValue = vec4(replace.x ? candidate.x : bestValue.x,\n replace.y ? candidate.y : bestValue.y,\n replace.z ? candidate.z : bestValue.z,\n replace.w ? candidate.w : bestValue.w);\n bestIndex = mix(bestIndex, vec4(inIdx), vec4(replace));\n srcIdx++;\n }\n setOutput(bestIndex);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernel_utils/arg_min_max.js\nfunction argReduce(backend2, x, reduceType, bestIndicesA = null) {\n let batchSize = x.shape[0];\n let inSize = x.shape[1];\n if (bestIndicesA != null) {\n batchSize = bestIndicesA.shape[0];\n inSize = bestIndicesA.shape[1];\n }\n const windowSize = backend_util_exports.computeOptimalWindowSize(inSize);\n const reduceInfo = { windowSize, inSize, batchSize, outSize: Math.ceil(inSize / windowSize) };\n const program = new ArgMinMaxProgram(reduceInfo, reduceType, bestIndicesA == null);\n const inputs = [x];\n if (bestIndicesA != null) {\n inputs.push(bestIndicesA);\n }\n const output = backend2.runWebGLProgram(program, inputs, \"int32\");\n if (output.shape[1] === 1) {\n return output;\n }\n const result = argReduce(backend2, x, reduceType, output);\n backend2.disposeIntermediateTensorInfo(output);\n return result;\n}\nfunction argReducePacked(backend2, x, reduceType, bestIndicesA = null) {\n const inShape = bestIndicesA != null ? bestIndicesA.shape : x.shape;\n const inSize = inShape[inShape.length - 1];\n const windowSize = backend_util_exports.computeOptimalWindowSize(inSize);\n const program = new ArgMinMaxPackedProgram(inShape, windowSize, reduceType, bestIndicesA == null);\n const inputs = bestIndicesA == null ? [x] : [x, bestIndicesA];\n const output = backend2.runWebGLProgram(program, inputs, \"int32\");\n if (output.shape.length === x.shape.length) {\n const result = argReducePacked(backend2, x, reduceType, output);\n backend2.disposeIntermediateTensorInfo(output);\n return result;\n }\n return output;\n}\nfunction argMinMaxReduce(backend2, x, axis, reduceType) {\n const axes = [axis];\n backend_util_exports.assertAxesAreInnerMostDims(\"arg\" + reduceType.charAt(0).toUpperCase() + reduceType.slice(1), axes, x.shape.length);\n if (!env().getBool(\"WEBGL_PACK_REDUCE\") || x.shape.length <= 2) {\n const intermediateTensorInfos = [];\n const xtexData = backend2.texData.get(x.dataId);\n const xIsPacked = xtexData !== null && xtexData.isPacked;\n let xUnPacked = x;\n if (xIsPacked) {\n xUnPacked = backend2.unpackTensor(x);\n intermediateTensorInfos.push(xUnPacked);\n }\n const [outShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes(xUnPacked.shape, axes);\n const inSize = util_exports.sizeFromShape(reduceShape);\n const a2D = reshape4({ inputs: { x: xUnPacked }, backend: backend2, attrs: { shape: [-1, inSize] } });\n intermediateTensorInfos.push(a2D);\n const reduced = argReduce(backend2, a2D, reduceType);\n intermediateTensorInfos.push(reduced);\n const reshaped = reshape4({ inputs: { x: reduced }, backend: backend2, attrs: { shape: outShape } });\n intermediateTensorInfos.forEach((t) => backend2.disposeIntermediateTensorInfo(t));\n return reshaped;\n }\n return argReducePacked(backend2, x, reduceType);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ArgMax.js\nfunction argMax3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis } = attrs;\n let axes = util_exports.parseAxisParam(axis, x.shape);\n const permutedAxes = backend_util_exports.getAxesPermutation(axes, x.shape.length);\n let $x = x;\n const intermediateTensorInfos = [];\n if (permutedAxes != null) {\n $x = transpose3({ inputs: { x }, backend: backend2, attrs: { perm: permutedAxes } });\n intermediateTensorInfos.push($x);\n axes = backend_util_exports.getInnerMostAxes(axes.length, $x.shape.length);\n }\n backend_util_exports.assertAxesAreInnerMostDims(\"argMax\", [axes[0]], $x.shape.length);\n const out = argMinMaxReduce(backend2, $x, axes[0], \"max\");\n intermediateTensorInfos.forEach((t) => backend2.disposeIntermediateTensorInfo(t));\n return out;\n}\nvar argMaxConfig2 = {\n kernelName: ArgMax,\n backendName: \"webgl\",\n kernelFunc: argMax3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ArgMin.js\nfunction argMin3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis } = attrs;\n let axes = util_exports.parseAxisParam(axis, x.shape);\n const permutedAxes = backend_util_exports.getAxesPermutation(axes, x.shape.length);\n let $x = x;\n const intermediateTensorInfos = [];\n if (permutedAxes != null) {\n $x = transpose3({ inputs: { x }, backend: backend2, attrs: { perm: permutedAxes } });\n intermediateTensorInfos.push($x);\n axes = backend_util_exports.getInnerMostAxes(axes.length, $x.shape.length);\n }\n backend_util_exports.assertAxesAreInnerMostDims(\"argMin\", [axes[0]], $x.shape.length);\n const out = argMinMaxReduce(backend2, $x, axes[0], \"min\");\n intermediateTensorInfos.forEach((t) => backend2.disposeIntermediateTensorInfo(t));\n return out;\n}\nvar argMinConfig2 = {\n kernelName: ArgMin,\n backendName: \"webgl\",\n kernelFunc: argMin3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Asin.js\nvar ASIN = CHECK_NAN_SNIPPET + `\n if (abs(x) > 1.) {\n return NAN;\n }\n return asin(x);\n`;\nvar asin3 = unaryKernelFunc2({ opSnippet: ASIN });\nvar asinConfig2 = {\n kernelName: Asin,\n backendName: \"webgl\",\n kernelFunc: asin3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Asinh.js\nvar ASINH = CHECK_NAN_SNIPPET + `return log(x + sqrt(x * x + 1.0));`;\nvar asinh3 = unaryKernelFunc2({ opSnippet: ASINH });\nvar asinhConfig2 = {\n kernelName: Asinh,\n backendName: \"webgl\",\n kernelFunc: asinh3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Atan.js\nvar ATAN = CHECK_NAN_SNIPPET + `\n return atan(x);\n`;\nvar atan4 = unaryKernelFunc2({ opSnippet: ATAN });\nvar atanConfig2 = {\n kernelName: Atan,\n backendName: \"webgl\",\n kernelFunc: atan4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Atan2.js\nvar ATAN2 = CHECK_NAN_SNIPPET_BINARY + `\n return atan(a, b);\n`;\nvar ATAN2_PACKED = `\n vec4 result = atan(a, b);\n vec4 isNaN = min(vec4(isnan(a)) + vec4(isnan(b)), vec4(1.0));\n ` + CHECK_NAN_SNIPPET_BINARY_PACKED + `\n return result;\n`;\nvar atan23 = binaryKernelFunc2({ opSnippet: ATAN2, packedOpSnippet: ATAN2_PACKED });\nvar atan2Config2 = {\n kernelName: Atan2,\n backendName: \"webgl\",\n kernelFunc: atan23\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Atanh.js\nvar ATANH = CHECK_NAN_SNIPPET + `\n if ((x < -1.0) || (x > 1.0)) return NAN;\nreturn (log(1.0 + x) - log(1.0 - x)) / 2.0;`;\nvar atanh3 = unaryKernelFunc2({ opSnippet: ATANH });\nvar atanhConfig2 = {\n kernelName: Atanh,\n backendName: \"webgl\",\n kernelFunc: atanh3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/pool_gpu.js\nvar Pool2DProgram = class {\n constructor(convInfo, poolType, computePositions, flattenPositions = false, includeBatchInIndex = false) {\n this.variableNames = [\"x\"];\n if (poolType === \"avg\" && computePositions) {\n throw new Error(\"Cannot compute positions for average pool.\");\n }\n const filterWidth = convInfo.filterWidth;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const dilationHeight = convInfo.dilationHeight;\n const dilationWidth = convInfo.dilationWidth;\n const effectiveFilterHeight = convInfo.effectiveFilterHeight;\n const effectiveFilterWidth = convInfo.effectiveFilterWidth;\n const padTop = convInfo.padInfo.top;\n const padLeft = convInfo.padInfo.left;\n this.outputShape = convInfo.outShape;\n const isAvgPool = poolType === \"avg\";\n const batchFlattenPositionStr = `((batch * ${convInfo.inHeight} + xR) * ${convInfo.inWidth} + xC) * ${convInfo.inChannels} + d`;\n const flattenPositionStr = `(xR * ${convInfo.inWidth} + xC) * ${convInfo.inChannels} + d`;\n let initializationValue = \"0.0\";\n if (!isAvgPool) {\n initializationValue = \"-1.0 / 1e-20\";\n }\n if (computePositions) {\n const compareOp2 = \">=\";\n this.userCode = `\n const ivec2 strides = ivec2(${strideHeight}, ${strideWidth});\n const ivec2 pads = ivec2(${padTop}, ${padLeft});\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d = coords[3];\n\n ivec2 xRCCorner = coords.yz * strides - pads;\n int xRCorner = xRCCorner.x;\n int xCCorner = xRCCorner.y;\n\n // max/min x(?, ?, d) to get y(yR, yC, d).\n // ? = to be determined\n float minMaxValue = 0.0;\n float minMaxValueFound = 0.0;\n int minMaxPosition = 0;\n float avgValue = 0.0;\n\n for (int wR = 0; wR < ${effectiveFilterHeight};\n wR += ${dilationHeight}) {\n int xR = xRCorner + wR;\n\n if (xR < 0 || xR >= ${convInfo.inHeight}) {\n continue;\n }\n\n for (int wC = 0; wC < ${effectiveFilterWidth};\n wC += ${dilationWidth}) {\n int xC = xCCorner + wC;\n\n if (xC < 0 || xC >= ${convInfo.inWidth}) {\n continue;\n }\n\n float value = getX(batch, xR, xC, d);\n\n // If a min / max value has already been found, use it. If not,\n // use the current value.\n float currMinMaxValue = mix(\n value, minMaxValue, minMaxValueFound);\n if (value ${compareOp2} currMinMaxValue) {\n minMaxValue = value;\n minMaxValueFound = 1.0;\n minMaxPosition = ${flattenPositions ? includeBatchInIndex ? batchFlattenPositionStr : flattenPositionStr : `wR * ${effectiveFilterWidth} + wC`};\n }\n }\n }\n setOutput(float(minMaxPosition));\n }\n `;\n return;\n }\n const compareOp = \"max\";\n let returnValue = `${poolType}(${poolType}(${poolType}(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])`;\n if (poolType === \"avg\") {\n returnValue = `avgValue / count`;\n }\n const filterWidthNearestVec4 = Math.floor(filterWidth / 4) * 4;\n const filterWidthVec4Remainder = filterWidth % 4;\n const updateSnippet = `\n if (${isAvgPool}) {\n avgValue += dot(values, ones);\n } else {\n minMaxValue = ${compareOp}(values, minMaxValue);\n }\n `;\n this.userCode = `\n const ivec2 strides = ivec2(${strideHeight}, ${strideWidth});\n const ivec2 pads = ivec2(${padTop}, ${padLeft});\n const float initializationValue = ${initializationValue};\n const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);\n\n float count = 0.0;\n\n float getValue(int batch, int xR, int xC, int d) {\n if (xC < 0 || xC >= ${convInfo.inWidth}) {\n return initializationValue;\n }\n count += 1.0;\n return getX(batch, xR, xC, d);\n }\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d = coords[3];\n\n ivec2 xRCCorner = coords.yz * strides - pads;\n int xRCorner = xRCCorner.x;\n int xCCorner = xRCCorner.y;\n\n // max/min x(?, ?, d) to get y(yR, yC, d).\n // ? = to be determined\n vec4 minMaxValue = vec4(${initializationValue});\n float avgValue = 0.0;\n count = 0.0;\n\n for (int wR = 0; wR < ${effectiveFilterHeight};\n wR += ${dilationHeight}) {\n int xR = xRCorner + wR;\n\n if (xR < 0 || xR >= ${convInfo.inHeight}) {\n continue;\n }\n\n for (int wC = 0; wC < ${filterWidthNearestVec4}; wC += 4) {\n int xC = xCCorner + wC * ${dilationWidth};\n\n vec4 values = vec4(\n getValue(batch, xR, xC, d),\n getValue(batch, xR, xC + ${dilationWidth}, d),\n getValue(batch, xR, xC + 2 * ${dilationWidth}, d),\n getValue(batch, xR, xC + 3 * ${dilationWidth}, d)\n );\n\n ${updateSnippet}\n }\n\n int xC = xCCorner + ${filterWidthNearestVec4};\n if (${filterWidthVec4Remainder === 1}) {\n vec4 values = vec4(\n getValue(batch, xR, xC, d),\n initializationValue,\n initializationValue,\n initializationValue\n );\n\n ${updateSnippet}\n } else if (${filterWidthVec4Remainder === 2}) {\n vec4 values = vec4(\n getValue(batch, xR, xC, d),\n getValue(batch, xR, xC + ${dilationWidth}, d),\n initializationValue,\n initializationValue\n );\n\n ${updateSnippet}\n } else if (${filterWidthVec4Remainder === 3}) {\n vec4 values = vec4(\n getValue(batch, xR, xC, d),\n getValue(batch, xR, xC + ${dilationWidth}, d),\n getValue(batch, xR, xC + 2 * ${dilationWidth}, d),\n initializationValue\n );\n\n ${updateSnippet}\n }\n }\n setOutput(${returnValue});\n }\n `;\n }\n};\nvar Pool3DProgram = class {\n constructor(convInfo, poolType, computePositions, flattenPositions = false, includeBatchInIndex = false) {\n this.variableNames = [\"x\"];\n if (poolType === \"avg\" && computePositions) {\n throw new Error(\"Cannot compute positions for average pool.\");\n }\n const filterWidth = convInfo.filterWidth;\n const strideDepth = convInfo.strideDepth;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const dilationDepth = convInfo.dilationDepth;\n const dilationHeight = convInfo.dilationHeight;\n const dilationWidth = convInfo.dilationWidth;\n const effectiveFilterDepth = convInfo.effectiveFilterDepth;\n const effectiveFilterHeight = convInfo.effectiveFilterHeight;\n const effectiveFilterWidth = convInfo.effectiveFilterWidth;\n const padFront = convInfo.padInfo.front;\n const padTop = convInfo.padInfo.top;\n const padLeft = convInfo.padInfo.left;\n this.outputShape = convInfo.outShape;\n const isAvgPool = poolType === \"avg\";\n let initializationValue = \"0.0\";\n if (!isAvgPool) {\n initializationValue = \"-1.0 / 1e-20\";\n }\n if (computePositions) {\n const compareOp2 = \">=\";\n this.userCode = `\n const ivec3 strides =\n ivec3(${strideDepth}, ${strideHeight}, ${strideWidth});\n const ivec3 pads = ivec3(${padFront}, ${padTop}, ${padLeft});\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int ch = coords.u;\n\n ivec3 xCorner = ivec3(coords.y, coords.z, coords.w) * strides - pads;\n int xDCorner = xCorner.x;\n int xRCorner = xCorner.y;\n int xCCorner = xCorner.z;\n\n // max/min x(?, ?, ?, ch) to get y(yD, yR, yC, ch).\n // ? = to be determined\n float minMaxValue = 0.0;\n float minMaxValueFound = 0.0;\n int minMaxPosition = 0;\n\n for (int wD = 0; wD < ${effectiveFilterDepth};\n wD += ${dilationDepth}) {\n int xD = xDCorner + wD;\n\n if (xD < 0 || xD >= ${convInfo.inDepth}) {\n continue;\n }\n\n for (int wR = 0; wR < ${effectiveFilterHeight};\n wR += ${dilationHeight}) {\n int xR = xRCorner + wR;\n\n if (xR < 0 || xR >= ${convInfo.inHeight}) {\n continue;\n }\n\n for (int wC = 0; wC < ${effectiveFilterWidth};\n wC += ${dilationWidth}) {\n int xC = xCCorner + wC;\n\n if (xC < 0 || xC >= ${convInfo.inWidth}) {\n continue;\n }\n\n float value = getX(batch, xD, xR, xC, ch);\n\n // If a min / max value has already been found, use it. If not,\n // use the current value.\n float currMinMaxValue = mix(\n value, minMaxValue, minMaxValueFound);\n if (value ${compareOp2} currMinMaxValue) {\n minMaxValue = value;\n minMaxValueFound = 1.0;\n minMaxPosition = ${flattenPositions ? includeBatchInIndex ? `(((batch * ${convInfo.inDepth} + xD) * ${convInfo.inHeight} + xR) * ${convInfo.inWidth} + xC) * ${convInfo.inChannels} + ch` : `((xD * ${convInfo.inHeight} + xR) * ${convInfo.inWidth} + xC) * ${convInfo.inChannels} + ch` : `wD * ${effectiveFilterHeight} * ${effectiveFilterWidth} +\n wR * ${effectiveFilterWidth} + wC`};\n }\n }\n }\n }\n setOutput(float(minMaxPosition));\n }\n `;\n return;\n }\n const compareOp = \"max\";\n let returnValue = `${poolType}(${poolType}(${poolType}(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])`;\n if (poolType === \"avg\") {\n returnValue = `avgValue / count`;\n }\n const filterWidthNearestVec4 = Math.floor(filterWidth / 4) * 4;\n const filterWidthVec4Remainder = filterWidth % 4;\n const updateSnippet = `\n if (${isAvgPool}) {\n avgValue += dot(values, ones);\n } else {\n minMaxValue = ${compareOp}(values, minMaxValue);\n }\n `;\n this.userCode = `\n const ivec3 strides =\n ivec3(${strideDepth}, ${strideHeight}, ${strideWidth});\n const ivec3 pads = ivec3(${padFront}, ${padTop}, ${padLeft});\n const float initializationValue = ${initializationValue};\n const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);\n\n float count = 0.0;\n\n float getValue(int batch, int xD, int xR, int xC, int ch) {\n if (xC < 0 || xC >= ${convInfo.inWidth}) {\n return initializationValue;\n }\n count += 1.0;\n return getX(batch, xD, xR, xC, ch);\n }\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int ch = coords.u;\n\n ivec3 xCorner = ivec3(coords.y, coords.z, coords.w) * strides - pads;\n int xDCorner = xCorner.x;\n int xRCorner = xCorner.y;\n int xCCorner = xCorner.z;\n\n // max/min x(?, ?, ?, d) to get y(yD, yR, yC, ch).\n // ? = to be determined\n vec4 minMaxValue = vec4(${initializationValue});\n float avgValue = 0.0;\n count = 0.0;\n\n for (int wD = 0; wD < ${effectiveFilterDepth};\n wD += ${dilationDepth}) {\n int xD = xDCorner + wD;\n\n if (xD < 0 || xD >= ${convInfo.inDepth}) {\n continue;\n }\n\n for (int wR = 0; wR < ${effectiveFilterHeight};\n wR += ${dilationHeight}) {\n int xR = xRCorner + wR;\n\n if (xR < 0 || xR >= ${convInfo.inHeight}) {\n continue;\n }\n\n for (int wC = 0; wC < ${filterWidthNearestVec4}; wC += 4) {\n int xC = xCCorner + wC * ${dilationWidth};\n\n vec4 values = vec4(\n getValue(batch, xD, xR, xC, ch),\n getValue(batch, xD, xR, xC + ${dilationWidth}, ch),\n getValue(batch, xD, xR, xC + 2 * ${dilationWidth}, ch),\n getValue(batch, xD, xR, xC + 3 * ${dilationWidth}, ch)\n );\n\n ${updateSnippet}\n }\n\n int xC = xCCorner + ${filterWidthNearestVec4};\n if (${filterWidthVec4Remainder === 1}) {\n vec4 values = vec4(\n getValue(batch, xD, xR, xC, ch),\n initializationValue,\n initializationValue,\n initializationValue\n );\n\n ${updateSnippet}\n } else if (${filterWidthVec4Remainder === 2}) {\n vec4 values = vec4(\n getValue(batch, xD, xR, xC, ch),\n getValue(batch, xD, xR, xC + ${dilationWidth}, ch),\n initializationValue,\n initializationValue\n );\n\n ${updateSnippet}\n } else if (${filterWidthVec4Remainder === 3}) {\n vec4 values = vec4(\n getValue(batch, xD, xR, xC, ch),\n getValue(batch, xD, xR, xC + ${dilationWidth}, ch),\n getValue(batch, xD, xR, xC + 2 * ${dilationWidth}, ch),\n initializationValue\n );\n\n ${updateSnippet}\n }\n }\n setOutput(${returnValue});\n }\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/AvgPool.js\nfunction avgPool3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n assertNotComplex2(x, \"avgPool\");\n const { filterSize, strides, pad: pad3, dimRoundingMode } = attrs;\n const dilations = 1;\n util_exports.assert(backend_util_exports.eitherStridesOrDilationsAreOne(strides, dilations), () => `Error in avgPool: Either strides or dilations must be 1. Got strides ${strides} and dilations '${dilations}'`);\n const convInfo = backend_util_exports.computePool2DInfo(x.shape, filterSize, strides, dilations, pad3, dimRoundingMode);\n if (convInfo.filterWidth === 1 && convInfo.filterHeight === 1 && util_exports.arraysEqual(convInfo.inShape, convInfo.outShape)) {\n return identity3({ inputs: { x }, backend: backend2 });\n }\n const avgPoolProgram = new Pool2DProgram(convInfo, \"avg\", false);\n return backend2.runWebGLProgram(avgPoolProgram, [x], \"float32\");\n}\nvar avgPoolConfig2 = {\n kernelName: AvgPool,\n backendName: \"webgl\",\n kernelFunc: avgPool3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/AvgPool3D.js\nfunction avgPool3D2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { filterSize, strides, pad: pad3, dimRoundingMode, dataFormat } = attrs;\n const dilations = [1, 1, 1];\n const convInfo = backend_util_exports.computePool3DInfo(x.shape, filterSize, strides, dilations, pad3, dimRoundingMode, dataFormat);\n const avgPoolProgram = new Pool3DProgram(convInfo, \"avg\", false);\n return backend2.runWebGLProgram(avgPoolProgram, [x], \"float32\");\n}\nvar avgPool3DConfig2 = {\n kernelName: AvgPool3D,\n backendName: \"webgl\",\n kernelFunc: avgPool3D2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/avg_pool_backprop_gpu.js\nvar AvgPool2DBackpropProgram = class {\n constructor(convInfo) {\n this.variableNames = [\"dy\"];\n this.outputShape = convInfo.inShape;\n const filterHeight = convInfo.filterHeight;\n const filterWidth = convInfo.filterWidth;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const dilationHeight = convInfo.dilationHeight;\n const dilationWidth = convInfo.dilationWidth;\n const effectiveFilterHeight = convInfo.effectiveFilterHeight;\n const effectiveFilterWidth = convInfo.effectiveFilterWidth;\n const padTop = effectiveFilterHeight - 1 - convInfo.padInfo.top;\n const padLeft = effectiveFilterWidth - 1 - convInfo.padInfo.left;\n const avgMultiplier = 1 / (filterHeight * filterWidth);\n this.userCode = `\n const ivec2 pads = ivec2(${padTop}, ${padLeft});\n const float avgMultiplier = float(${avgMultiplier});\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n\n ivec2 dyRCCorner = coords.yz - pads;\n int dyRCorner = dyRCCorner.x;\n int dyCCorner = dyRCCorner.y;\n\n // Convolve dy(?, ?, d) with pos mask(:, :, d) to get dx(xR, xC, d).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n for (int wR = 0; wR < ${effectiveFilterHeight};\n wR += ${dilationHeight}) {\n float dyR = float(dyRCorner + wR) / ${strideHeight}.0;\n\n if (dyR < 0.0 || dyR >= ${convInfo.outHeight}.0 || fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n for (int wC = 0; wC < ${effectiveFilterWidth};\n wC+= ${dilationWidth}) {\n float dyC = float(dyCCorner + wC) / ${strideWidth}.0;\n\n if (dyC < 0.0 || dyC >= ${convInfo.outWidth}.0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n float dyValue = getDy(b, idyR, idyC, d);\n\n dotProd += dyValue * avgMultiplier;\n }\n }\n setOutput(dotProd);\n }\n `;\n }\n};\nvar AvgPool3DBackpropProgram = class {\n constructor(convInfo) {\n this.variableNames = [\"dy\"];\n this.outputShape = convInfo.inShape;\n const filterDepth = convInfo.filterDepth;\n const filterHeight = convInfo.filterHeight;\n const filterWidth = convInfo.filterWidth;\n const strideDepth = convInfo.strideDepth;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const dilationDepth = convInfo.dilationDepth;\n const dilationHeight = convInfo.dilationHeight;\n const dilationWidth = convInfo.dilationWidth;\n const effectiveFilterDepth = convInfo.effectiveFilterDepth;\n const effectiveFilterHeight = convInfo.effectiveFilterHeight;\n const effectiveFilterWidth = convInfo.effectiveFilterWidth;\n const padFront = effectiveFilterDepth - 1 - convInfo.padInfo.front;\n const padTop = effectiveFilterHeight - 1 - convInfo.padInfo.top;\n const padLeft = effectiveFilterWidth - 1 - convInfo.padInfo.left;\n const avgMultiplier = 1 / (filterDepth * filterHeight * filterWidth);\n this.userCode = `\n const ivec3 pads = ivec3(${padFront}, ${padTop}, ${padLeft});\n const float avgMultiplier = float(${avgMultiplier});\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int ch = coords.u;\n\n ivec3 dyCorner = ivec3(coords.y, coords.z, coords.w) - pads;\n int dyDCorner = dyCorner.x;\n int dyRCorner = dyCorner.y;\n int dyCCorner = dyCorner.z;\n\n // Convolve dy(?, ?, ?, d) with pos mask(:, :, :, ch) to get\n // dx(xD, xR, xC, ch).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n\n for (int wD = 0; wD < ${effectiveFilterDepth};\n wD += ${dilationDepth}) {\n float dyD = float(dyDCorner + wD) / ${strideDepth}.0;\n\n if (dyD < 0.0 || dyD >= ${convInfo.outDepth}.0 || fract(dyD) > 0.0) {\n continue;\n }\n int idyD = int(dyD);\n\n for (int wR = 0; wR < ${effectiveFilterHeight};\n wR += ${dilationHeight}) {\n float dyR = float(dyRCorner + wR) / ${strideHeight}.0;\n\n if (dyR < 0.0 || dyR >= ${convInfo.outHeight}.0 ||\n fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n for (int wC = 0; wC < ${effectiveFilterWidth};\n wC += ${dilationWidth}) {\n float dyC = float(dyCCorner + wC) / ${strideWidth}.0;\n\n if (dyC < 0.0 || dyC >= ${convInfo.outWidth}.0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n float dyValue = getDy(batch, idyD, idyR, idyC, ch);\n\n dotProd += dyValue * avgMultiplier;\n }\n }\n }\n setOutput(dotProd);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/AvgPool3DGrad.js\nfunction avgPool3DGrad2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { dy, input: input2 } = inputs;\n const x = input2;\n const { filterSize, strides, pad: pad3, dimRoundingMode } = attrs;\n const dilations = [1, 1, 1];\n const convInfo = backend_util_exports.computePool3DInfo(x.shape, filterSize, strides, dilations, pad3, dimRoundingMode);\n const avgPoolBackpropProgram = new AvgPool3DBackpropProgram(convInfo);\n return backend2.runWebGLProgram(avgPoolBackpropProgram, [dy], x.dtype);\n}\nvar avgPool3DGradConfig3 = {\n kernelName: AvgPool3DGrad,\n backendName: \"webgl\",\n kernelFunc: avgPool3DGrad2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/AvgPoolGrad.js\nfunction avgPoolGrad3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { dy, input: input2 } = inputs;\n const x = input2;\n assertNotComplex2([dy, input2], \"avgPoolGrad\");\n const { filterSize, strides, pad: pad3 } = attrs;\n const convInfo = backend_util_exports.computePool2DInfo(x.shape, filterSize, strides, 1, pad3);\n const avgPoolBackpropProgram = new AvgPool2DBackpropProgram(convInfo);\n return backend2.runWebGLProgram(avgPoolBackpropProgram, [dy], x.dtype);\n}\nvar avgPoolGradConfig3 = {\n kernelName: AvgPoolGrad,\n backendName: \"webgl\",\n kernelFunc: avgPoolGrad3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/BatchMatMul.js\nfunction batchMatMul2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { a, b } = inputs;\n const { transposeA, transposeB } = attrs;\n return batchMatMulImpl({ a, b, transposeA, transposeB, backend: backend2 });\n}\nvar batchMatMulConfig2 = {\n kernelName: BatchMatMul,\n backendName: \"webgl\",\n kernelFunc: batchMatMul2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/batchnorm_gpu.js\nvar BatchNormProgram = class {\n constructor(xShape, meanShape, varianceShape, offsetShape, scaleShape, varianceEpsilon) {\n this.outputShape = [];\n this.variableNames = [\"x\", \"mean\", \"variance\"];\n backend_util_exports.assertAndGetBroadcastShape(xShape, meanShape);\n backend_util_exports.assertAndGetBroadcastShape(xShape, varianceShape);\n let offsetSnippet = \"0.0\";\n if (offsetShape != null) {\n backend_util_exports.assertAndGetBroadcastShape(xShape, offsetShape);\n this.variableNames.push(\"offset\");\n offsetSnippet = \"getOffsetAtOutCoords()\";\n }\n let scaleSnippet = \"1.0\";\n if (scaleShape != null) {\n backend_util_exports.assertAndGetBroadcastShape(xShape, scaleShape);\n this.variableNames.push(\"scale\");\n scaleSnippet = \"getScaleAtOutCoords()\";\n }\n this.outputShape = xShape;\n this.userCode = `\n void main() {\n float x = getXAtOutCoords();\n float mean = getMeanAtOutCoords();\n float variance = getVarianceAtOutCoords();\n float offset = ${offsetSnippet};\n float scale = ${scaleSnippet};\n float inv = scale * inversesqrt(variance + float(${varianceEpsilon}));\n setOutput(dot(vec3(x, -mean, offset), vec3(inv, inv, 1)));\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/batchnorm_packed_gpu.js\nvar BatchNormPackedProgram = class {\n constructor(xShape, meanShape, varianceShape, offsetShape, scaleShape, varianceEpsilon) {\n this.packedInputs = true;\n this.packedOutput = true;\n this.variableNames = [\"x\", \"mean\", \"variance\"];\n backend_util_exports.assertAndGetBroadcastShape(xShape, meanShape);\n backend_util_exports.assertAndGetBroadcastShape(xShape, varianceShape);\n let offsetSnippet = \"vec4(0.0)\";\n if (offsetShape != null) {\n backend_util_exports.assertAndGetBroadcastShape(xShape, offsetShape);\n this.variableNames.push(\"offset\");\n offsetSnippet = \"getOffsetAtOutCoords()\";\n }\n let scaleSnippet = \"vec4(1.0)\";\n if (scaleShape != null) {\n backend_util_exports.assertAndGetBroadcastShape(xShape, scaleShape);\n this.variableNames.push(\"scale\");\n scaleSnippet = \"getScaleAtOutCoords()\";\n }\n this.outputShape = xShape;\n this.userCode = `\n void main() {\n vec4 offset = ${offsetSnippet};\n vec4 scale = ${scaleSnippet};\n\n vec4 x = getXAtOutCoords();\n vec4 mean = getMeanAtOutCoords();\n vec4 variance = getVarianceAtOutCoords();\n\n vec4 inv = scale * inversesqrt(variance + vec4(${varianceEpsilon}));\n\n setOutput((x - mean) * inv + offset);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/BatchNorm.js\nvar batchNorm3 = ({ inputs, backend: backend2, attrs }) => {\n const { x, mean: mean5, variance, offset, scale: scale2 } = inputs;\n util_exports.assert(mean5.shape.length === variance.shape.length, () => \"Batch normalization gradient requires mean and variance to have equal ranks.\");\n util_exports.assert(offset == null || mean5.shape.length === offset.shape.length, () => \"Batch normalization gradient requires mean and offset to have equal ranks.\");\n util_exports.assert(scale2 == null || mean5.shape.length === scale2.shape.length, () => \"Batch normalization gradient requires mean and scale to have equal ranks.\");\n let { varianceEpsilon } = attrs;\n if (varianceEpsilon == null) {\n varianceEpsilon = 1e-3;\n }\n const finalInputs = [x, mean5, variance];\n let offsetShape = null;\n if (offset != null) {\n offsetShape = offset.shape;\n finalInputs.push(offset);\n }\n let scaleShape = null;\n if (scale2 != null) {\n scaleShape = scale2.shape;\n finalInputs.push(scale2);\n }\n const program = env().getBool(\"WEBGL_PACK_NORMALIZATION\") ? new BatchNormPackedProgram(x.shape, mean5.shape, variance.shape, offsetShape, scaleShape, varianceEpsilon) : new BatchNormProgram(x.shape, mean5.shape, variance.shape, offsetShape, scaleShape, varianceEpsilon);\n const output = backend2.runWebGLProgram(program, finalInputs, finalInputs[0].dtype);\n return output;\n};\nvar batchNormConfig2 = {\n kernelName: FusedBatchNorm,\n backendName: \"webgl\",\n kernelFunc: batchNorm3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/slice_gpu.js\nvar SliceProgram = class {\n constructor(destSize) {\n this.variableNames = [\"source\"];\n this.outputShape = destSize;\n this.rank = destSize.length;\n const dtype = getCoordsDataType(this.rank);\n this.customUniforms = [{ name: \"start\", arrayIndex: this.rank, type: \"int\" }];\n const sourceCoords = getCoords(this.rank);\n let body;\n const coordSum = destSize.map((_, i) => {\n return `sourceLoc.${coords[i]} = start[${i}] + coords.${coords[i]};`;\n });\n body = `\n ${dtype} sourceLoc;\n ${dtype} coords = getOutputCoords();\n ${coordSum.join(\"\\n\")}\n `;\n this.userCode = `\n void main() {\n ${body}\n setOutput(getSource(${sourceCoords}));\n }\n `;\n }\n};\nvar coords = [\"x\", \"y\", \"z\", \"w\", \"u\", \"v\"];\nfunction getCoords(rank) {\n if (rank === 1) {\n return \"sourceLoc\";\n } else if (rank <= 6) {\n return coords.slice(0, rank).map((x) => \"sourceLoc.\" + x).join(\",\");\n } else {\n throw Error(`Slicing for rank ${rank} is not yet supported`);\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/slice_packed_gpu.js\nvar SlicePackedProgram = class {\n constructor(destSize) {\n this.variableNames = [\"source\"];\n this.packedInputs = true;\n this.packedOutput = true;\n this.outputShape = destSize;\n this.rank = destSize.length;\n this.customUniforms = [{ name: \"start\", arrayIndex: this.rank, type: \"int\" }];\n const dtype = getCoordsDataType(this.rank);\n const coords3 = getChannels(\"coords\", this.rank);\n const sourceLoc = getChannels(\"sourceLoc\", this.rank);\n const innerDims = this.rank === 1 ? \"sourceLoc\" : `vec2(${sourceLoc.slice(-2).join()})`;\n const getChannel = `getChannel(getSource(${sourceLoc.join()}), ${innerDims})`;\n const upperRow = `\n result.x = ${getChannel};\n if (++${coords3[this.rank - 1]} < ${destSize[this.rank - 1]}) {\n ++${sourceLoc[this.rank - 1]};\n result.y = ${getChannel};\n --${sourceLoc[this.rank - 1]};\n }\n `;\n const lowerRow = this.rank === 1 ? \"\" : `\n --${coords3[this.rank - 1]};\n if (++${coords3[this.rank - 2]} < ${destSize[this.rank - 2]}) {\n ++${sourceLoc[this.rank - 2]};\n result.z = ${getChannel};\n if (++${coords3[this.rank - 1]} < ${destSize[this.rank - 1]}) {\n ++${sourceLoc[this.rank - 1]};\n result.w = ${getChannel};\n }\n }\n `;\n const sourceLocSetup = this.rank <= 4 ? `sourceLoc = coords +\n ${dtype}(${destSize.map((_, i) => `start[${i}]`).join()});` : destSize.map((_, i) => `${sourceLoc[i]} = ${coords3[i]} + start[${i}];`).join(\"\\n\");\n this.userCode = `\n void main() {\n ${dtype} coords = getOutputCoords();\n ${dtype} sourceLoc;\n ${sourceLocSetup}\n vec4 result = vec4(0.);\n ${upperRow}\n ${lowerRow}\n setOutput(result);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Slice.js\nfunction shallowSlice(x, begin, size, backend2) {\n const xTexData = backend2.texData.get(x.dataId);\n const t = backend2.makeTensorInfo(size, x.dtype);\n const newTexData = backend2.texData.get(t.dataId);\n Object.assign(newTexData, xTexData);\n newTexData.refCount = 1;\n newTexData.shape = size;\n newTexData.dtype = x.dtype;\n let flatOffset = slice_util_exports.computeFlatOffset(begin, util_exports.computeStrides(x.shape));\n if (xTexData.slice) {\n flatOffset += xTexData.slice.flatOffset;\n }\n newTexData.slice = {\n flatOffset,\n origDataId: xTexData.slice && xTexData.slice.origDataId || x.dataId\n };\n const refCount = backend2.dataRefCount.get(newTexData.slice.origDataId) || 1;\n backend2.dataRefCount.set(newTexData.slice.origDataId, refCount + 1);\n return t;\n}\nfunction slice3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { begin, size } = attrs;\n const [$begin, $size] = slice_util_exports.parseSliceParams(x, begin, size);\n slice_util_exports.assertParamsValid(x, $begin, $size);\n if (util_exports.sizeFromShape($size) === 0) {\n return backend2.makeTensorInfo($size, x.dtype, []);\n }\n if (backend2.shouldExecuteOnCPU([x]) || x.dtype === \"string\") {\n const xTexData = backend2.texData.get(x.dataId);\n const outValues = sliceImplCPU(xTexData.values, $begin, $size, x.shape, x.dtype);\n return backend2.makeTensorInfo($size, x.dtype, outValues);\n }\n const { isPacked } = backend2.texData.get(x.dataId);\n const isContinous = slice_util_exports.isSliceContinous(x.shape, $begin, $size);\n if (isPacked || !isContinous) {\n const program = env().getBool(\"WEBGL_PACK_ARRAY_OPERATIONS\") ? new SlicePackedProgram($size) : new SliceProgram($size);\n const customValues = [$begin];\n return backend2.runWebGLProgram(program, [x], x.dtype, customValues);\n }\n backend2.uploadToGPU(x.dataId);\n return shallowSlice(x, $begin, $size, backend2);\n}\nvar sliceConfig2 = {\n kernelName: Slice,\n backendName: \"webgl\",\n kernelFunc: slice3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/BatchToSpaceND.js\nvar batchToSpaceND3 = (args) => {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { blockShape, crops } = attrs;\n util_exports.assert(x.shape.length <= 4, () => \"batchToSpaceND for rank > 4 with a WebGL backend not implemented yet\");\n const prod6 = blockShape.reduce((a, b) => a * b);\n const reshaped = backend_util_exports.getReshaped(x.shape, blockShape, prod6);\n const permuted = backend_util_exports.getPermuted(reshaped.length, blockShape.length);\n const reshapedPermuted = backend_util_exports.getReshapedPermuted(x.shape, blockShape, prod6);\n const sliceBeginCoords = backend_util_exports.getSliceBeginCoords(crops, blockShape.length);\n const sliceSize = backend_util_exports.getSliceSize(reshapedPermuted, crops, blockShape.length);\n const toDispose = [];\n const reshapedIntermediate = reshape4({ inputs: { x }, backend: backend2, attrs: { shape: reshaped } });\n const transposedIntermediate = transpose3({ inputs: { x: reshapedIntermediate }, backend: backend2, attrs: { perm: permuted } });\n const reshapedIntermediate2 = reshape4({\n inputs: { x: transposedIntermediate },\n backend: backend2,\n attrs: { shape: reshapedPermuted }\n });\n const sliced = slice3({\n inputs: { x: reshapedIntermediate2 },\n backend: backend2,\n attrs: { begin: sliceBeginCoords, size: sliceSize }\n });\n toDispose.push(reshapedIntermediate);\n toDispose.push(transposedIntermediate);\n toDispose.push(reshapedIntermediate2);\n toDispose.forEach((t) => backend2.disposeIntermediateTensorInfo(t));\n return sliced;\n};\nvar batchToSpaceNDConfig2 = {\n kernelName: BatchToSpaceND,\n backendName: \"webgl\",\n kernelFunc: batchToSpaceND3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Bincount.js\nfunction bincount3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, weights } = inputs;\n const { size } = attrs;\n const xVals = backend2.readSync(x.dataId);\n const weightsVals = backend2.readSync(weights.dataId);\n const outVals = bincountImplCPU(xVals, weightsVals, weights.dtype, weights.shape, size);\n return backend2.makeTensorInfo([size], weights.dtype, outVals);\n}\nvar bincountConfig2 = {\n kernelName: Bincount,\n backendName: \"webgl\",\n kernelFunc: bincount3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/BroadcastArgs.js\nfunction broadcastArgs3(args) {\n const { inputs, backend: backend2 } = args;\n const { s0, s1 } = inputs;\n const s0Vals = backend2.readSync(s0.dataId);\n const s1Vals = backend2.readSync(s1.dataId);\n const broadcastShape = backend_util_exports.assertAndGetBroadcastShape(Array.from(s0Vals), Array.from(s1Vals));\n return backend2.makeTensorInfo([broadcastShape.length], \"int32\", Int32Array.from(broadcastShape));\n}\nvar broadcastArgsConfig2 = {\n kernelName: BroadcastArgs,\n backendName: \"webgl\",\n kernelFunc: broadcastArgs3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/NotEqual.js\nvar NOT_EQUAL = `return float(a != b);`;\nvar notEqual3 = binaryKernelFunc2({ opSnippet: NOT_EQUAL, cpuKernelImpl: notEqualImplCPU, dtype: \"bool\" });\nvar notEqualConfig2 = {\n kernelName: NotEqual,\n backendName: \"webgl\",\n kernelFunc: notEqual3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Real.js\nfunction real3(args) {\n const { inputs, backend: backend2 } = args;\n const { input: input2 } = inputs;\n const inputData = backend2.texData.get(input2.dataId);\n return identity3({ inputs: { x: inputData.complexTensorInfos.real }, backend: backend2 });\n}\nvar realConfig2 = {\n kernelName: Real,\n backendName: \"webgl\",\n kernelFunc: real3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernel_utils/int.js\nvar TO_INT = `return float(int(x));`;\nfunction int(input2, backend2) {\n const program = new UnaryOpProgram(input2.shape, TO_INT);\n const output = backend2.runWebGLProgram(program, [input2], \"int32\");\n return { dataId: output.dataId, shape: output.shape, dtype: output.dtype };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Cast.js\nfunction cast4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { dtype } = attrs;\n if (dtype === \"complex64\") {\n if (x.dtype === \"complex64\") {\n return identity3({ inputs: { x }, backend: backend2 });\n }\n const zerosTensor = zeros(x.shape);\n const floatX = cast4({ inputs: { x }, backend: backend2, attrs: { dtype: \"float32\" } });\n const result = complex3({ inputs: { real: floatX, imag: zerosTensor }, backend: backend2 });\n zerosTensor.dispose();\n backend2.disposeIntermediateTensorInfo(floatX);\n return result;\n }\n if (x.dtype === \"complex64\") {\n const realPart = real3({ inputs: { input: x }, backend: backend2 });\n const result = cast4({ inputs: { x: realPart }, backend: backend2, attrs: { dtype } });\n backend2.disposeIntermediateTensorInfo(realPart);\n return result;\n }\n if (!util_exports.hasEncodingLoss(x.dtype, dtype)) {\n const result = identity3({ inputs: { x }, backend: backend2 });\n return { dataId: result.dataId, shape: result.shape, dtype };\n }\n if (backend2.shouldExecuteOnCPU([x])) {\n const values = backend2.texData.get(x.dataId).values;\n const [resultShape, resultType, resultData] = castImplCPU(values, x.shape, x.dtype, dtype);\n return backend2.makeTensorInfo(resultShape, resultType, resultData);\n }\n if (dtype === \"int32\") {\n return int(x, backend2);\n }\n if (dtype === \"bool\") {\n const zerosTensorInfo = backend2.makeTensorInfo([], \"bool\", util_exports.getTypedArrayFromDType(\"bool\", 1));\n const binaryInputs = { a: x, b: zerosTensorInfo };\n const result = notEqual3({ inputs: binaryInputs, backend: backend2 });\n backend2.disposeIntermediateTensorInfo(zerosTensorInfo);\n return result;\n }\n throw new Error(`Error in Cast: failed to cast ${x.dtype} to ${dtype}`);\n}\nvar castConfig2 = {\n kernelName: Cast,\n backendName: \"webgl\",\n kernelFunc: cast4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Ceil.js\nvar CEIL = `return ceil(x);`;\nvar ceil3 = unaryKernelFunc2({ opSnippet: CEIL, packedOpSnippet: CEIL, cpuKernelImpl: ceilImplCPU });\nvar ceilConfig2 = {\n kernelName: Ceil,\n backendName: \"webgl\",\n kernelFunc: ceil3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/clip_gpu.js\nvar ClipProgram = class {\n constructor(aShape) {\n this.variableNames = [\"A\"];\n this.customUniforms = [\n { name: \"minVal\", type: \"float\" },\n { name: \"maxVal\", type: \"float\" }\n ];\n this.outputShape = aShape;\n this.userCode = `\n\n void main() {\n float value = getAAtOutCoords();\n if (isnan(value)) {\n setOutput(value);\n return;\n }\n\n setOutput(clamp(value, minVal, maxVal));\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/clip_packed_gpu.js\nvar ClipPackedProgram = class {\n constructor(aShape) {\n this.variableNames = [\"A\"];\n this.packedInputs = true;\n this.packedOutput = true;\n this.customUniforms = [\n { name: \"minVal\", type: \"float\" },\n { name: \"maxVal\", type: \"float\" }\n ];\n this.outputShape = aShape;\n this.userCode = `\n void main() {\n vec4 value = getAAtOutCoords();\n\n if (any(isnan(value))) {\n setOutput(value);\n return;\n }\n\n setOutput(clamp(value, vec4(minVal), vec4(maxVal)));\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ClipByValue.js\nfunction clipByValue3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { clipValueMin, clipValueMax } = attrs;\n let program;\n if (env().getBool(\"WEBGL_PACK_CLIP\")) {\n program = new ClipPackedProgram(x.shape);\n } else {\n program = new ClipProgram(x.shape);\n }\n const customValues = [[clipValueMin], [clipValueMax]];\n return backend2.runWebGLProgram(program, [x], x.dtype, customValues);\n}\nvar clipByValueConfig2 = {\n kernelName: ClipByValue,\n backendName: \"webgl\",\n kernelFunc: clipByValue3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/complex_abs_gpu.js\nvar ComplexAbsProgram = class {\n constructor(shape) {\n this.variableNames = [\"real\", \"imag\"];\n this.outputShape = shape;\n this.userCode = `\n void main() {\n float re = abs(getRealAtOutCoords());\n float im = abs(getImagAtOutCoords());\n float mx = max(re, im);\n\n // sadly the length function in glsl is not underflow-safe\n // (at least not on Intel GPUs). So the safe solution is\n // to ensure underflow-safety in all cases.\n setOutput(\n mx == 0.0 ? 0.0 : mx * length(vec2(1, min(re, im)/mx))\n );\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ComplexAbs.js\nfunction makeComplexComponentTensorInfo(complexTensor, complexPart) {\n return {\n dataId: complexPart.dataId,\n dtype: complexPart.dtype,\n shape: complexTensor.shape\n };\n}\nfunction complexAbs2(args) {\n const { inputs, backend: backend2 } = args;\n const { x } = inputs;\n const xData = backend2.texData.get(x.dataId);\n const program = new ComplexAbsProgram(x.shape);\n const programInputs = [\n makeComplexComponentTensorInfo(x, xData.complexTensorInfos.real),\n makeComplexComponentTensorInfo(x, xData.complexTensorInfos.imag)\n ];\n return backend2.runWebGLProgram(program, programInputs, programInputs[0].dtype);\n}\nvar complexAbsConfig2 = {\n kernelName: ComplexAbs,\n backendName: \"webgl\",\n kernelFunc: complexAbs2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/concat_gpu.js\nvar ConcatProgram = class {\n constructor(shapes) {\n this.outputShape = [];\n this.outputShape = backend_util_exports.computeOutShape(shapes, 1);\n this.variableNames = shapes.map((_, i) => `T${i}`);\n const offsets = new Array(shapes.length - 1);\n offsets[0] = shapes[0][1];\n for (let i = 1; i < offsets.length; i++) {\n offsets[i] = offsets[i - 1] + shapes[i][1];\n }\n const snippets = [`if (yC < ${offsets[0]}) setOutput(getT0(yR, yC));`];\n for (let i = 1; i < offsets.length; i++) {\n const shift = offsets[i - 1];\n snippets.push(`else if (yC < ${offsets[i]}) setOutput(getT${i}(yR, yC-${shift}));`);\n }\n const lastIndex = offsets.length;\n const lastShift = offsets[offsets.length - 1];\n snippets.push(`else setOutput(getT${lastIndex}(yR, yC-${lastShift}));`);\n this.userCode = `\n void main() {\n ivec2 coords = getOutputCoords();\n int yR = coords.x;\n int yC = coords.y;\n\n ${snippets.join(\"\\n \")}\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/concat_packed_gpu.js\nvar ConcatPackedProgram = class {\n constructor(shapes, axis) {\n this.packedInputs = true;\n this.packedOutput = true;\n this.outputShape = [];\n this.outputShape = backend_util_exports.computeOutShape(shapes, axis);\n const shape = this.outputShape;\n const rank = shape.length;\n const dtype = getCoordsDataType(rank);\n const coords3 = getChannels(\"coords\", rank);\n const channels = [\"x\", \"y\", \"z\", \"w\", \"u\", \"v\"].slice(0, rank);\n this.variableNames = shapes.map((_, i) => `T${i}`);\n const offsets = new Array(shapes.length - 1);\n offsets[0] = shapes[0][axis];\n for (let i = 1; i < offsets.length; i++) {\n offsets[i] = offsets[i - 1] + shapes[i][axis];\n }\n const channel = channels[axis];\n const lastChannels = channels.slice(-2);\n const allChannels = channels.join();\n let getValueSnippet = `if (${channel} < ${offsets[0]}) {\n return getChannel(\n getT0(${allChannels}), vec2(${lastChannels.join()}));\n }`;\n for (let i = 1; i < offsets.length; i++) {\n const shift2 = offsets[i - 1];\n getValueSnippet += `\n if (${channel} < ${offsets[i]} && ${channel} >= ${offsets[i - 1]}) {\n return getChannel(\n getT${i}(${shiftedChannels(channels, channel, shift2)}),\n vec2(${shiftedChannels(lastChannels, channel, shift2)}));\n }`;\n }\n const lastIndex = offsets.length;\n const shift = offsets[offsets.length - 1];\n getValueSnippet += `\n return getChannel(\n getT${lastIndex}(${shiftedChannels(channels, channel, shift)}),\n vec2(${shiftedChannels(lastChannels, channel, shift)}));`;\n this.userCode = `\n float getValue(${channels.map((x) => \"int \" + x)}) {\n ${getValueSnippet}\n }\n\n void main() {\n ${dtype} coords = getOutputCoords();\n vec4 result = vec4(getValue(${coords3}), 0., 0., 0.);\n\n ${coords3[rank - 1]} = ${coords3[rank - 1]} + 1;\n if (${coords3[rank - 1]} < ${shape[rank - 1]}) {\n result.g = getValue(${coords3});\n }\n\n ${coords3[rank - 2]} = ${coords3[rank - 2]} + 1;\n if (${coords3[rank - 2]} < ${shape[rank - 2]}) {\n result.a = getValue(${coords3});\n }\n\n ${coords3[rank - 1]} = ${coords3[rank - 1]} - 1;\n if (${coords3[rank - 2]} < ${shape[rank - 2]} &&\n ${coords3[rank - 1]} < ${shape[rank - 1]}) {\n result.b = getValue(${coords3});\n }\n setOutput(result);\n }\n `;\n }\n};\nfunction shiftedChannels(channels, channel, shift) {\n const channelIdx = channels.indexOf(channel);\n const res = channels.map((c, idx) => {\n if (idx === channelIdx) {\n return `${c} - ${shift}`;\n } else {\n return c;\n }\n });\n return res.join();\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Imag.js\nfunction imag3(args) {\n const { inputs, backend: backend2 } = args;\n const { input: input2 } = inputs;\n const inputData = backend2.texData.get(input2.dataId);\n return identity3({ inputs: { x: inputData.complexTensorInfos.imag }, backend: backend2 });\n}\nvar imagConfig2 = {\n kernelName: Imag,\n backendName: \"webgl\",\n kernelFunc: imag3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Concat_impl.js\nfunction concatImpl2(inputs, axis, backend2) {\n const dtype = inputs[0].dtype;\n if (dtype === \"complex64\") {\n const reals = inputs.map((t) => real3({ inputs: { input: t }, backend: backend2 }));\n const imags = inputs.map((t) => imag3({ inputs: { input: t }, backend: backend2 }));\n const realConcated = concatImpl2(reals, axis, backend2);\n const imagConcated = concatImpl2(imags, axis, backend2);\n const result2 = complex3({ inputs: { real: realConcated, imag: imagConcated }, backend: backend2 });\n reals.forEach((r) => backend2.disposeIntermediateTensorInfo(r));\n imags.forEach((i) => backend2.disposeIntermediateTensorInfo(i));\n backend2.disposeIntermediateTensorInfo(realConcated);\n backend2.disposeIntermediateTensorInfo(imagConcated);\n return result2;\n }\n let runOnCpu = backend2.shouldExecuteOnCPU(inputs);\n if (dtype === \"string\") {\n runOnCpu = true;\n }\n if (runOnCpu) {\n const tensors2D2 = inputs.map((t) => {\n const innerSize = util_exports.sizeFromShape(t.shape.slice(axis));\n const shape = [-1, innerSize];\n return reshape4({ inputs: { x: t }, backend: backend2, attrs: { shape } });\n });\n const inputsValShapes = tensors2D2.map((t) => {\n return { vals: backend2.readSync(t.dataId), shape: t.shape };\n });\n const outShape2 = backend_util_exports.computeOutShape(tensors2D2.map((t) => t.shape), 1);\n const simplyConcat = tensors2D2[0].shape[0] === 1;\n const outVals = concatImplCPU(inputsValShapes, outShape2, dtype, simplyConcat);\n const finalOutShape = backend_util_exports.computeOutShape(inputs.map((t) => t.shape), axis);\n const outInfo = backend2.makeTensorInfo(finalOutShape, dtype, outVals);\n tensors2D2.forEach((t) => backend2.disposeIntermediateTensorInfo(t));\n return outInfo;\n }\n const maxTexturesInShader = env().getNumber(\"WEBGL_MAX_TEXTURES_IN_SHADER\");\n if (inputs.length > maxTexturesInShader) {\n const reducedInputs = [];\n for (let i = 0; i < inputs.length; i += maxTexturesInShader) {\n const subArray = inputs.slice(i, i + maxTexturesInShader);\n reducedInputs.push(concatImpl2(subArray, axis, backend2));\n }\n const result2 = concatImpl2(reducedInputs, axis, backend2);\n for (const i of reducedInputs) {\n backend2.disposeIntermediateTensorInfo(i);\n }\n return result2;\n }\n if (env().getBool(\"WEBGL_PACK_ARRAY_OPERATIONS\") && inputs[0].shape.length > 1) {\n const program2 = new ConcatPackedProgram(inputs.map((t) => t.shape), axis);\n return backend2.runWebGLProgram(program2, inputs, dtype);\n }\n const { tensors2D, outShape } = computeTensors2D(inputs, axis, backend2);\n const program = new ConcatProgram(tensors2D.map((t) => t.shape));\n const result = backend2.runWebGLProgram(program, tensors2D, dtype);\n tensors2D.forEach((r) => backend2.disposeIntermediateTensorInfo(r));\n const reshapedResult = reshape4({ inputs: { x: result }, attrs: { shape: outShape }, backend: backend2 });\n backend2.disposeIntermediateTensorInfo(result);\n return reshapedResult;\n}\nfunction computeTensors2D(inputs, axis, backend2) {\n const outShape = backend_util_exports.computeOutShape(inputs.map((t) => t.shape), axis);\n const tensors2D = inputs.map((x) => reshape4({\n inputs: { x },\n attrs: { shape: [-1, util_exports.sizeFromShape(x.shape.slice(axis))] },\n backend: backend2\n }));\n return { tensors2D, outShape };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Concat.js\nfunction concat3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { axis } = attrs;\n const $axis = util_exports.parseAxisParam(axis, inputs[0].shape)[0];\n const outShape = backend_util_exports.computeOutShape(inputs.map((t) => t.shape), $axis);\n if (util_exports.sizeFromShape(outShape) === 0) {\n return backend2.makeTensorInfo(outShape, inputs[0].dtype, []);\n }\n const $inputs = inputs.filter((t) => util_exports.sizeFromShape(t.shape) > 0);\n if ($inputs.length === 1) {\n return identity3({ inputs: { x: $inputs[0] }, backend: backend2 });\n }\n const shapes = $inputs.map((t) => t.shape);\n backend_util_exports.assertParamsConsistent(shapes, $axis);\n return concatImpl2($inputs, $axis, backend2);\n}\nvar concatConfig2 = {\n kernelName: Concat,\n backendName: \"webgl\",\n kernelFunc: concat3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/conv_gpu.js\nvar Conv2DProgram = class {\n constructor(convInfo, addBias = false, activation2 = null, hasPreluActivationWeights = false, hasLeakyreluAlpha = false) {\n this.variableNames = [\"x\", \"W\"];\n this.outputShape = convInfo.outShape;\n const padTop = convInfo.padInfo.top;\n const padLeft = convInfo.padInfo.left;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const dilationHeight = convInfo.dilationHeight;\n const dilationWidth = convInfo.dilationWidth;\n const filterHeight = convInfo.filterHeight;\n const filterWidth = convInfo.filterWidth;\n const inputDepthNearestVec4 = Math.floor(convInfo.inChannels / 4) * 4;\n const inputDepthVec4Remainder = convInfo.inChannels % 4;\n const isChannelsLast = convInfo.dataFormat === \"channelsLast\";\n const rowDim = isChannelsLast ? 1 : 2;\n const colDim = isChannelsLast ? 2 : 3;\n const channelDim = isChannelsLast ? 3 : 1;\n let activationSnippet = \"\", applyActivationSnippet = \"\";\n if (activation2) {\n if (hasPreluActivationWeights) {\n activationSnippet = `float activation(float a) {\n float b = getPreluActivationWeightsAtOutCoords();\n ${activation2}\n }`;\n } else if (hasLeakyreluAlpha) {\n activationSnippet = `float activation(float a) {\n float b = getLeakyreluAlphaAtOutCoords();\n ${activation2}\n }`;\n } else {\n activationSnippet = `\n float activation(float x) {\n ${activation2}\n }\n `;\n }\n applyActivationSnippet = `result = activation(result);`;\n }\n const addBiasSnippet = addBias ? \"result += getBiasAtOutCoords();\" : \"\";\n if (addBias) {\n this.variableNames.push(\"bias\");\n }\n if (hasPreluActivationWeights) {\n this.variableNames.push(\"preluActivationWeights\");\n }\n if (hasLeakyreluAlpha) {\n this.variableNames.push(\"leakyreluAlpha\");\n }\n this.userCode = `\n ${activationSnippet}\n\n const ivec2 strides = ivec2(${strideHeight}, ${strideWidth});\n const ivec2 pads = ivec2(${padTop}, ${padLeft});\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d2 = coords[${channelDim}];\n\n ivec2 xRCCorner =\n ivec2(coords[${rowDim}], coords[${colDim}]) * strides - pads;\n int xRCorner = xRCCorner.x;\n int xCCorner = xRCCorner.y;\n\n // Convolve x(?, ?, d1) with w(:, :, d1, d2) to get y(yR, yC, d2).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n for (int wR = 0; wR < ${filterHeight}; wR++) {\n int xR = xRCorner + wR * ${dilationHeight};\n\n if (xR < 0 || xR >= ${convInfo.inHeight}) {\n continue;\n }\n\n for (int wC = 0; wC < ${filterWidth}; wC++) {\n int xC = xCCorner + wC * ${dilationWidth};\n\n if (xC < 0 || xC >= ${convInfo.inWidth}) {\n continue;\n }\n\n for (int d1 = 0; d1 < ${inputDepthNearestVec4}; d1 += 4) {\n vec4 wValues = vec4(\n getW(wR, wC, d1, d2),\n getW(wR, wC, d1 + 1, d2),\n getW(wR, wC, d1 + 2, d2),\n getW(wR, wC, d1 + 3, d2)\n );\n\n if (${isChannelsLast}) {\n vec4 xValues = vec4(\n getX(batch, xR, xC, d1),\n getX(batch, xR, xC, d1 + 1),\n getX(batch, xR, xC, d1 + 2),\n getX(batch, xR, xC, d1 + 3)\n );\n dotProd += dot(xValues, wValues);\n } else {\n vec4 xValues = vec4(\n getX(batch, d1, xR, xC),\n getX(batch, d1 + 1, xR, xC),\n getX(batch, d1 + 2, xR, xC),\n getX(batch, d1 + 3, xR, xC)\n );\n dotProd += dot(xValues, wValues);\n }\n }\n\n if (${inputDepthVec4Remainder === 1}) {\n\n if (${isChannelsLast}) {\n dotProd +=\n getX(batch, xR, xC, ${inputDepthNearestVec4}) *\n getW(wR, wC, ${inputDepthNearestVec4}, d2);\n } else {\n dotProd +=\n getX(batch, ${inputDepthNearestVec4}, xR, xC) *\n getW(wR, wC, ${inputDepthNearestVec4}, d2);\n }\n\n } else if (${inputDepthVec4Remainder === 2}) {\n vec2 wValues = vec2(\n getW(wR, wC, ${inputDepthNearestVec4}, d2),\n getW(wR, wC, ${inputDepthNearestVec4} + 1, d2)\n );\n\n if (${isChannelsLast}) {\n vec2 xValues = vec2(\n getX(batch, xR, xC, ${inputDepthNearestVec4}),\n getX(batch, xR, xC, ${inputDepthNearestVec4} + 1)\n );\n dotProd += dot(xValues, wValues);\n } else {\n vec2 xValues = vec2(\n getX(batch, ${inputDepthNearestVec4}, xR, xC),\n getX(batch, ${inputDepthNearestVec4} + 1, xR, xC)\n );\n dotProd += dot(xValues, wValues);\n }\n\n } else if (${inputDepthVec4Remainder === 3}) {\n vec3 wValues = vec3(\n getW(wR, wC, ${inputDepthNearestVec4}, d2),\n getW(wR, wC, ${inputDepthNearestVec4} + 1, d2),\n getW(wR, wC, ${inputDepthNearestVec4} + 2, d2)\n );\n\n if (${isChannelsLast}) {\n vec3 xValues = vec3(\n getX(batch, xR, xC, ${inputDepthNearestVec4}),\n getX(batch, xR, xC, ${inputDepthNearestVec4} + 1),\n getX(batch, xR, xC, ${inputDepthNearestVec4} + 2)\n );\n dotProd += dot(xValues, wValues);\n } else {\n vec3 xValues = vec3(\n getX(batch, ${inputDepthNearestVec4}, xR, xC),\n getX(batch, ${inputDepthNearestVec4} + 1, xR, xC),\n getX(batch, ${inputDepthNearestVec4} + 2, xR, xC)\n );\n dotProd += dot(xValues, wValues);\n }\n\n }\n }\n }\n\n float result = dotProd;\n ${addBiasSnippet}\n ${applyActivationSnippet}\n setOutput(result);\n }\n `;\n }\n};\nvar Conv3DProgram = class {\n constructor(convInfo) {\n this.variableNames = [\"x\", \"W\"];\n this.outputShape = convInfo.outShape;\n const padFront = convInfo.padInfo.front;\n const padTop = convInfo.padInfo.top;\n const padLeft = convInfo.padInfo.left;\n const strideDepth = convInfo.strideDepth;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const dilationDepth = convInfo.dilationDepth;\n const dilationHeight = convInfo.dilationHeight;\n const dilationWidth = convInfo.dilationWidth;\n const filterDepth = convInfo.filterDepth;\n const filterHeight = convInfo.filterHeight;\n const filterWidth = convInfo.filterWidth;\n const inputDepthNearestVec4 = Math.floor(convInfo.inChannels / 4) * 4;\n const inputDepthVec4Remainder = convInfo.inChannels % 4;\n this.userCode = `\n const ivec3 strides = ivec3(${strideDepth}, ${strideHeight}, ${strideWidth});\n const ivec3 pads = ivec3(${padFront}, ${padTop}, ${padLeft});\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int d2 = coords.u;\n\n ivec3 xFRCCorner = ivec3(coords.y, coords.z, coords.w) * strides - pads;\n int xFCorner = xFRCCorner.x;\n int xRCorner = xFRCCorner.y;\n int xCCorner = xFRCCorner.z;\n\n // Convolve x(?, ?, ?, d1) with w(:, :, :, d1, d2) to get\n // y(yF, yR, yC, d2). ? = to be determined. : = across all\n // values in that axis.\n float dotProd = 0.0;\n for (int wF = 0; wF < ${filterDepth}; wF++) {\n int xF = xFCorner + wF * ${dilationDepth};\n\n if (xF < 0 || xF >= ${convInfo.inDepth}) {\n continue;\n }\n\n for (int wR = 0; wR < ${filterHeight}; wR++) {\n int xR = xRCorner + wR * ${dilationHeight};\n\n if (xR < 0 || xR >= ${convInfo.inHeight}) {\n continue;\n }\n\n for (int wC = 0; wC < ${filterWidth}; wC++) {\n int xC = xCCorner + wC * ${dilationWidth};\n\n if (xC < 0 || xC >= ${convInfo.inWidth}) {\n continue;\n }\n\n for (int d1 = 0; d1 < ${inputDepthNearestVec4}; d1 += 4) {\n vec4 xValues = vec4(\n getX(batch, xF, xR, xC, d1),\n getX(batch, xF, xR, xC, d1 + 1),\n getX(batch, xF, xR, xC, d1 + 2),\n getX(batch, xF, xR, xC, d1 + 3)\n );\n vec4 wValues = vec4(\n getW(wF, wR, wC, d1, d2),\n getW(wF, wR, wC, d1 + 1, d2),\n getW(wF, wR, wC, d1 + 2, d2),\n getW(wF, wR, wC, d1 + 3, d2)\n );\n\n dotProd += dot(xValues, wValues);\n }\n\n if (${inputDepthVec4Remainder === 1}) {\n dotProd +=\n getX(batch, xF, xR, xC, ${inputDepthNearestVec4}) *\n getW(wF, wR, wC, ${inputDepthNearestVec4}, d2);\n } else if (${inputDepthVec4Remainder === 2}) {\n vec2 xValues = vec2(\n getX(batch, xF, xR, xC, ${inputDepthNearestVec4}),\n getX(batch, xF, xR, xC, ${inputDepthNearestVec4} + 1)\n );\n vec2 wValues = vec2(\n getW(wF, wR, wC, ${inputDepthNearestVec4}, d2),\n getW(wF, wR, wC, ${inputDepthNearestVec4} + 1, d2)\n );\n dotProd += dot(xValues, wValues);\n } else if (${inputDepthVec4Remainder === 3}) {\n vec3 xValues = vec3(\n getX(batch, xF, xR, xC, ${inputDepthNearestVec4}),\n getX(batch, xF, xR, xC, ${inputDepthNearestVec4} + 1),\n getX(batch, xF, xR, xC, ${inputDepthNearestVec4} + 2)\n );\n vec3 wValues = vec3(\n getW(wF, wR, wC, ${inputDepthNearestVec4}, d2),\n getW(wF, wR, wC, ${inputDepthNearestVec4} + 1, d2),\n getW(wF, wR, wC, ${inputDepthNearestVec4} + 2, d2)\n );\n dotProd += dot(xValues, wValues);\n }\n }\n }\n }\n setOutput(dotProd);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/conv_packed_gpu.js\nvar Conv2DPackedProgram = class {\n constructor(convInfo, addBias = false, activation2 = null, hasPreluActivation = false, hasLeakyReluAlpha = false) {\n this.variableNames = [\"x\", \"W\"];\n this.packedInputs = true;\n this.packedOutput = true;\n this.customUniforms = [\n { name: \"pads\", type: \"ivec2\" },\n { name: \"strides\", type: \"ivec2\" },\n { name: \"dilations\", type: \"ivec2\" },\n { name: \"inDims\", type: \"ivec2\" }\n ];\n this.outputShape = convInfo.outShape;\n this.enableShapeUniforms = useShapeUniforms(this.outputShape.length);\n const padLeft = convInfo.padInfo.left;\n const strideWidth = convInfo.strideWidth;\n const dilationWidth = convInfo.dilationWidth;\n const filterHeight = convInfo.filterHeight;\n const filterWidth = convInfo.filterWidth;\n const texelsAcross = filterWidth;\n let mainLoop = `\n int xR; int xC; int xCOffset;\n vec4 wTexel; vec4 previous; vec4 final;`;\n for (let c = 0; c < filterWidth; c++) {\n mainLoop += `\n vec4 xTexelC${c * 2};\n int xTexelC${c * 2}Ready;\n vec4 xTexelC${c * 2 + 1};\n int xTexelC${c * 2 + 1}Ready;\n vec4 xC${c};`;\n }\n mainLoop += `\n for (int r = 0; r < ${filterHeight}; r++) {\n for (int d1 = 0; d1 < ${convInfo.inChannels}; d1 += 2) {\n `;\n for (let c = 0; c < filterWidth; c++) {\n mainLoop += `\n xTexelC${c * 2} = vec4(0.0);\n xTexelC${c * 2}Ready = 0;\n xTexelC${c * 2 + 1} = vec4(0.0);\n xTexelC${c * 2 + 1}Ready = 0;\n xC${c} = vec4(0.0);`;\n }\n mainLoop += `\n xR = xRCorner + r * dilations[0];\n if (xR >=0 && xR < inDims[0]) {\n `;\n for (let texelC = 0; texelC < (texelsAcross + 1) / 2; texelC++) {\n const colIndex = texelC * 2;\n mainLoop += `\n xC = xCCorner + ${colIndex * dilationWidth};\n `;\n if (strideWidth === 1) {\n if (colIndex < filterWidth) {\n if (padLeft % 2 === 1) {\n mainLoop += `\n xCOffset = xC + 1;\n if (xCOffset >= 0 && xCOffset < inDims[1] && xTexelC${colIndex}Ready == 0) {\n xTexelC${colIndex} = getX(batch, xR, xCOffset, d1);\n\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if (xCOffset + 1 >= inDims[1]) {\n xTexelC${colIndex}.zw = vec2(0.0);\n }\n xTexelC${colIndex}Ready = 1;\n }\n `;\n if (dilationWidth === 1 && colIndex > 0) {\n mainLoop += `\n xC${colIndex} = vec4(xTexelC${colIndex - 2}.zw, xTexelC${colIndex}.xy);\n `;\n } else {\n mainLoop += `\n xCOffset = xC + 1 - 2;\n\n if (xCOffset >= 0 && xCOffset < inDims[1]) {\n previous = getX(batch, xR, xCOffset, d1);\n\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if (xCOffset + 1 >= inDims[1]) {\n previous.zw = vec2(0.0);\n }\n\n xC${colIndex} = vec4(previous.zw, xTexelC${colIndex}.xy);\n } else {\n xC${colIndex} = vec4(0.0, 0.0, xTexelC${colIndex}.xy);\n }\n `;\n }\n } else {\n mainLoop += `\n if (xC >= 0 && xC < inDims[1] && xTexelC${colIndex}Ready == 0) {\n xTexelC${colIndex} = getX(batch, xR, xC, d1);\n if (xC + 1 >= inDims[1]) {\n xTexelC${colIndex}.zw = vec2(0.0);\n }\n xTexelC${colIndex}Ready = 1;\n }\n\n xC${colIndex} = xTexelC${colIndex};\n `;\n }\n if (colIndex + 1 < filterWidth) {\n const nextTexelOffset = padLeft % 2 === 0 ? util_exports.nearestLargerEven(dilationWidth) : dilationWidth;\n if (dilationWidth % 2 === 0 && padLeft % 2 === 1 || dilationWidth % 2 !== 0 && padLeft % 2 !== 1) {\n mainLoop += `\n xCOffset = xC + imod(pads[1], 2) + ${nextTexelOffset};\n\n if (xCOffset >= 0 && xCOffset < inDims[1] && xTexelC${colIndex + 1}Ready == 0) {\n xTexelC${colIndex + 1} = getX(batch, xR, xCOffset, d1);\n\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if (xCOffset + 1 >= inDims[1]) {\n xTexelC${colIndex + 1}.zw = vec2(0.0);\n }\n xTexelC${colIndex + 1}Ready = 1;\n }\n `;\n if (dilationWidth > 1) {\n mainLoop += `\n xCOffset -= 2;\n if (xCOffset >= 0 && xCOffset < inDims[1]) {\n previous = getX(batch, xR, xCOffset, d1);\n xC${colIndex + 1} = vec4(previous.zw, xTexelC${colIndex + 1}.xy);\n } else {\n xC${colIndex + 1} = vec4(0.0, 0.0, xTexelC${colIndex + 1}.xy);\n }\n `;\n } else {\n mainLoop += `\n xC${colIndex + 1} = vec4(xTexelC${colIndex}.zw, xTexelC${colIndex + 1}.xy);\n `;\n }\n } else {\n if (nextTexelOffset === 1) {\n mainLoop += `\n xC${colIndex + 1} = xTexelC${colIndex};\n `;\n } else {\n mainLoop += `\n xCOffset = xC + ${nextTexelOffset};\n\n if (xCOffset >= 0 && xCOffset < inDims[1] && xTexelC${colIndex + 1}Ready == 0) {\n xTexelC${colIndex + 1} = getX(batch, xR, xCOffset, d1);\n if (xCOffset + 1 >= inDims[1]) {\n xTexelC${colIndex + 1}.zw = vec2(0.0);\n }\n xTexelC${colIndex + 1}Ready = 1;\n }\n\n xC${colIndex + 1} = xTexelC${colIndex + 1};\n `;\n }\n }\n }\n }\n } else {\n if (colIndex < filterWidth) {\n if (padLeft % 2 === 1) {\n mainLoop += `\n xCOffset = xC + 1 - strides[1];\n if(xCOffset >= 0 && xCOffset < inDims[1] && xTexelC${colIndex}Ready == 0) {\n xTexelC${colIndex} = getX(batch, xR, xCOffset, d1);\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if (xCOffset + 1 >= inDims[1]) {\n xTexelC${colIndex}.zw = vec2(0.0);\n }\n xTexelC${colIndex}Ready = 1;\n }\n\n if(xC + 1 >= 0 && xC + 1 < inDims[1] && xTexelC${colIndex + 1}Ready == 0) {\n xTexelC${colIndex + 1} = getX(batch, xR, xC + 1, d1);\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if (xC + 2 >= inDims[1]) {\n xTexelC${colIndex + 1}.zw = vec2(0.0);\n }\n xTexelC${colIndex + 1}Ready = 1;\n }\n\n xC${colIndex} = vec4(xTexelC${colIndex}.zw, xTexelC${colIndex + 1}.zw);\n `;\n if (colIndex + 1 < filterWidth) {\n mainLoop += `\n final = vec4(0.0);\n xCOffset = xC + 1 + strides[1];\n if(xCOffset >= 0 && xCOffset < inDims[1]) {\n final = getX(batch, xR, xCOffset, d1);\n }\n xC${colIndex + 1} = vec4(xTexelC${colIndex + 1}.xy, final.xy);\n `;\n }\n } else {\n mainLoop += `\n if(xC >= 0 && xC < inDims[1] && xTexelC${colIndex}Ready == 0) {\n xTexelC${colIndex} = getX(batch, xR, xC, d1);\n if (xC + 1 >= inDims[1]) {\n xTexelC${colIndex}.zw = vec2(0.0);\n }\n xTexelC${colIndex}Ready = 1;\n }\n\n xCOffset = xC + strides[1];\n if(xCOffset >= 0 && xCOffset < inDims[1] && xTexelC${colIndex + 1}Ready == 0) {\n xTexelC${colIndex + 1} = getX(batch, xR, xCOffset, d1);\n if (xCOffset + 1 >= inDims[1]) {\n xTexelC${colIndex + 1}.zw = vec2(0.);\n }\n xTexelC${colIndex + 1}Ready = 1;\n }\n\n xC${colIndex} = vec4(\n xTexelC${colIndex}.xy, xTexelC${colIndex + 1}.xy);\n `;\n if (colIndex + 1 < filterWidth) {\n mainLoop += `\n xC${colIndex + 1} = vec4(xTexelC${colIndex}.zw, xTexelC${colIndex + 1}.zw);\n `;\n }\n }\n }\n }\n if (colIndex < filterWidth) {\n mainLoop += `\n wTexel = getW(r, ${colIndex}, d1, d2);\n dotProd += xC${colIndex}.xxzz * vec4(wTexel.xy, wTexel.xy);\n if(d1 + 1 < ${convInfo.inChannels}) {\n dotProd += xC${colIndex}.yyww * vec4(wTexel.zw, wTexel.zw);\n }\n `;\n if (colIndex + 1 < filterWidth) {\n mainLoop += `\n wTexel = getW(r, ${colIndex + 1}, d1, d2);\n dotProd += xC${colIndex + 1}.xxzz * vec4(wTexel.xy, wTexel.xy);\n if(d1 + 1 < ${convInfo.inChannels}) {\n dotProd += xC${colIndex + 1}.yyww * vec4(wTexel.zw, wTexel.zw);\n }\n `;\n }\n }\n }\n mainLoop += `\n }\n `;\n mainLoop += `\n }\n `;\n mainLoop += `\n }\n `;\n let activationSnippet = \"\", applyActivationSnippet = \"\";\n if (activation2) {\n if (hasPreluActivation) {\n activationSnippet = `vec4 activation(vec4 a) {\n vec4 b = getPreluActivationWeightsAtOutCoords();\n ${activation2}\n }`;\n } else if (hasLeakyReluAlpha) {\n activationSnippet = `vec4 activation(vec4 a) {\n vec4 b = getLeakyreluAlphaAtOutCoords();\n ${activation2}\n }`;\n } else {\n activationSnippet = `vec4 activation(vec4 x) {\n ${activation2}\n }`;\n }\n applyActivationSnippet = `result = activation(result);`;\n }\n const addBiasSnippet = addBias ? \"result += getBiasAtOutCoords();\" : \"\";\n if (addBias) {\n this.variableNames.push(\"bias\");\n }\n if (hasPreluActivation) {\n this.variableNames.push(\"preluActivationWeights\");\n }\n if (hasLeakyReluAlpha) {\n this.variableNames.push(\"leakyreluAlpha\");\n }\n this.userCode = `\n ${activationSnippet}\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords.x;\n ivec2 xRCCorner = coords.yz * strides - pads;\n int d2 = coords.w;\n int xRCorner = xRCCorner.x;\n int xCCorner = xRCCorner.y;\n\n //intialize dotProd with a small epsilon seems to reduce GPU accuracy loss.\n vec4 dotProd = vec4(0.000000000000001);\n\n ${mainLoop}\n\n vec4 result = dotProd - vec4(0.000000000000001);\n ${addBiasSnippet}\n ${applyActivationSnippet}\n setOutput(result);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/im2col_packed_gpu.js\nvar Im2ColPackedProgram = class {\n constructor(outputShape, convInfo) {\n this.variableNames = [\"A\"];\n this.packedInputs = true;\n this.packedOutput = true;\n this.customUniforms = [\n { name: \"inputShape\", type: \"ivec4\" },\n { name: \"pad\", type: \"ivec2\" },\n { name: \"stride\", type: \"ivec2\" },\n { name: \"dilation\", type: \"ivec2\" },\n { name: \"inChannels\", type: \"int\" },\n { name: \"itemsPerBlockRow\", type: \"int\" },\n { name: \"outWidth\", type: \"int\" }\n ];\n this.outputShape = outputShape;\n this.enableShapeUniforms = useShapeUniforms(this.outputShape.length);\n const { dataFormat } = convInfo;\n const glsl = getGlslDifferences();\n const isChannelsLast = dataFormat === \"channelsLast\";\n const rowDim = isChannelsLast ? 1 : 2;\n const colDim = isChannelsLast ? 2 : 3;\n const boundsCheckingSnippet = this.enableShapeUniforms ? \"if(blockIndex < outShape[2] && pos < outShape[1]) {\" : `if(blockIndex < ${outputShape[2]} && pos < ${outputShape[1]}) {`;\n let unrolled = ``;\n for (let row = 0; row <= 1; row++) {\n for (let col = 0; col <= 1; col++) {\n unrolled += `\n blockIndex = rc.z + ${col};\n pos = rc.y + ${row};\n\n ${boundsCheckingSnippet}\n offsetY = int(blockIndex / outWidth) * stride[0] - pad[0];\n d0 = offsetY + dilation[0] * (pos / itemsPerBlockRow);\n\n if(d0 < inputShape[${rowDim}] && d0 >= 0) {\n // Use custom imod instead mod. On Intel GPU, mod may generate\n // unexpected value.\n // https://github.com/tensorflow/tfjs/issues/5447\n offsetX = imod(blockIndex, outWidth) * stride[1] - pad[1];\n d1 = offsetX + dilation[1] * (imod(pos, itemsPerBlockRow) /\n inChannels);\n\n if(d1 < inputShape[${colDim}] && d1 >= 0) {\n\n ch = imod(pos, inChannels);\n\n if (${isChannelsLast}) {\n innerDims = vec2(d1, ch);\n result[${row * 2 + col}] = getChannel(\n getA(rc.x, d0, int(innerDims.x),\n int(innerDims.y)), innerDims);\n } else {\n innerDims = vec2(d0, d1);\n result[${row * 2 + col}] = getChannel(\n getA(rc.x, ch, int(innerDims.x),\n int(innerDims.y)), innerDims);\n }\n }\n }\n }\n `;\n }\n }\n this.userCode = `\n void main() {\n ivec3 rc = getOutputCoords();\n\n vec4 result = vec4(0);\n\n int blockIndex, pos, offsetY, d0, offsetX, d1, ch;\n vec2 innerDims;\n\n ${unrolled}\n\n ${glsl.output} = result;\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Conv2D_impl.js\nfunction getShapeForBatchMatMul(shape, isChannelsLast) {\n const length = shape.length;\n if (length >= 3) {\n return isChannelsLast ? [\n ...shape.slice(0, -3),\n shape[length - 3] * shape[length - 2],\n shape[length - 1]\n ] : [\n ...shape.slice(0, -3),\n shape[length - 3],\n shape[length - 2] * shape[length - 1]\n ];\n } else if (!isChannelsLast && length === 1 && shape[0] > 1) {\n return [shape[0], 1];\n } else {\n return null;\n }\n}\nfunction conv2dByMatMul({ x, filter, convInfo, backend: backend2, bias = null, preluActivationWeights = null, leakyreluAlpha = 0, activation: activation2 = null }) {\n const xShape = x.shape;\n const xTexData = backend2.texData.get(x.dataId);\n const sharedMatMulDim = convInfo.inChannels;\n const outerShapeX = xShape[0] * xShape[1] * xShape[2];\n const outerShapeFilter = convInfo.outChannels;\n const isChannelsLast = convInfo.dataFormat === \"channelsLast\";\n const transposeA = false;\n const transposeB = false;\n let out;\n const intermediates = [];\n if (preluActivationWeights != null) {\n const targetShape = getShapeForBatchMatMul(preluActivationWeights.shape, isChannelsLast);\n if (targetShape != null) {\n preluActivationWeights = reshape4({\n inputs: { x: preluActivationWeights },\n backend: backend2,\n attrs: { shape: targetShape }\n });\n intermediates.push(preluActivationWeights);\n }\n }\n if (bias != null) {\n const targetShape = getShapeForBatchMatMul(bias.shape, isChannelsLast);\n if (targetShape != null) {\n bias = reshape4({ inputs: { x: bias }, backend: backend2, attrs: { shape: targetShape } });\n intermediates.push(bias);\n }\n }\n const batchMatMulWillBeUnpacked = (outerShapeX === 1 || outerShapeFilter === 1) && sharedMatMulDim > MATMUL_SHARED_DIM_THRESHOLD;\n const canOptimize = !batchMatMulWillBeUnpacked && xTexData.isPacked && isChannelsLast && xTexData.texture != null && xShape[2] % 2 !== 0 && util_exports.arraysEqual(xTexData.shape.slice(-3), xShape.slice(-3));\n if (canOptimize) {\n const targetShape = xShape[0] * xShape[1] * (xShape[2] + 1);\n const xReshaped = {\n dataId: x.dataId,\n shape: [1, targetShape, convInfo.inChannels],\n dtype: x.dtype\n };\n const originalXTexDataShape = xTexData.shape;\n xTexData.shape = xTexData.shape.slice();\n xTexData.shape[xTexData.shape.length - 2]++;\n util_exports.assert(isReshapeFree(xTexData.shape, xReshaped.shape), () => `packed reshape ${xTexData.shape} to ${xReshaped.shape} isn't free`);\n const filterReshaped = reshape4({\n inputs: { x: filter },\n backend: backend2,\n attrs: { shape: [1, convInfo.inChannels, convInfo.outChannels] }\n });\n intermediates.push(filterReshaped);\n const pointwiseConv = batchMatMulImpl({\n a: xReshaped,\n b: filterReshaped,\n backend: backend2,\n transposeA,\n transposeB,\n bias,\n activation: activation2,\n preluActivationWeights,\n leakyreluAlpha\n });\n const pointwiseConvTexData = backend2.texData.get(pointwiseConv.dataId);\n util_exports.assert(pointwiseConvTexData.isPacked, () => \"batchMatMul result is expected to be packed\");\n xTexData.shape = originalXTexDataShape;\n pointwiseConvTexData.shape = convInfo.outShape;\n out = identity3({ inputs: { x: pointwiseConv }, backend: backend2 });\n out.shape = convInfo.outShape;\n intermediates.push(pointwiseConv);\n } else {\n const numCols = convInfo.outHeight * convInfo.outWidth;\n const xReshaped = reshape4({\n inputs: { x },\n backend: backend2,\n attrs: {\n shape: isChannelsLast ? [convInfo.batchSize, numCols, convInfo.inChannels] : [convInfo.batchSize, convInfo.inChannels, numCols]\n }\n });\n const filterReshaped = reshape4({\n inputs: { x: filter },\n backend: backend2,\n attrs: { shape: [1, convInfo.inChannels, convInfo.outChannels] }\n });\n const result = batchMatMulImpl({\n a: isChannelsLast ? xReshaped : filterReshaped,\n b: isChannelsLast ? filterReshaped : xReshaped,\n transposeA: !isChannelsLast,\n transposeB,\n backend: backend2,\n bias,\n activation: activation2,\n preluActivationWeights,\n leakyreluAlpha\n });\n out = reshape4({ inputs: { x: result }, backend: backend2, attrs: { shape: convInfo.outShape } });\n intermediates.push(xReshaped);\n intermediates.push(filterReshaped);\n intermediates.push(result);\n }\n for (const i of intermediates) {\n backend2.disposeIntermediateTensorInfo(i);\n }\n return out;\n}\nfunction conv2dWithIm2Row({ x, filter, convInfo, backend: backend2, bias = null, preluActivationWeights = null, leakyreluAlpha = 0, activation: activation2 = null }) {\n const { filterWidth, filterHeight, inChannels, outWidth, outHeight, dataFormat } = convInfo;\n const isChannelsLast = dataFormat === \"channelsLast\";\n const sharedDim = filterWidth * filterHeight * inChannels;\n const numCols = outHeight * outWidth;\n const x2ColShape = [convInfo.batchSize, sharedDim, numCols];\n const transposeA = true;\n const transposeB = false;\n const intermediates = [];\n if (preluActivationWeights != null) {\n const targetShape = getShapeForBatchMatMul(preluActivationWeights.shape, isChannelsLast);\n if (targetShape != null) {\n preluActivationWeights = reshape4({\n inputs: { x: preluActivationWeights },\n backend: backend2,\n attrs: { shape: targetShape }\n });\n intermediates.push(preluActivationWeights);\n }\n }\n if (bias != null) {\n const targetShape = getShapeForBatchMatMul(bias.shape, isChannelsLast);\n if (targetShape != null) {\n bias = reshape4({ inputs: { x: bias }, backend: backend2, attrs: { shape: targetShape } });\n intermediates.push(bias);\n }\n }\n const w2Row = reshape4({\n inputs: { x: filter },\n backend: backend2,\n attrs: { shape: [1, sharedDim, util_exports.sizeFromShape(filter.shape) / sharedDim] }\n });\n intermediates.push(w2Row);\n const im2ColProgram = new Im2ColPackedProgram(x2ColShape, convInfo);\n const customValues = [\n x.shape,\n [convInfo.padInfo.top, convInfo.padInfo.left],\n [convInfo.strideHeight, convInfo.strideWidth],\n [convInfo.dilationHeight, convInfo.dilationWidth],\n [convInfo.inChannels],\n [convInfo.filterWidth * convInfo.inChannels],\n [convInfo.outWidth]\n ];\n const im2Col = backend2.runWebGLProgram(im2ColProgram, [x], \"float32\", customValues);\n const im2ColReshaped = reshape4({ inputs: { x: im2Col }, backend: backend2, attrs: { shape: x2ColShape } });\n intermediates.push(im2Col);\n intermediates.push(im2ColReshaped);\n const hasBias = bias != null;\n const hasPreluActivationWeights = preluActivationWeights != null;\n const hasLeakyreluAlpha = activation2 === \"leakyrelu\";\n const fusedActivation = activation2 ? mapActivationToShaderProgram(activation2, true) : null;\n const matmulProgram = new MatMulPackedProgram(isChannelsLast ? im2ColReshaped.shape : w2Row.shape, isChannelsLast ? w2Row.shape : im2ColReshaped.shape, isChannelsLast ? [convInfo.batchSize, numCols, convInfo.outChannels] : [convInfo.batchSize, convInfo.outChannels, numCols], transposeA, transposeB, hasBias, fusedActivation, hasPreluActivationWeights, hasLeakyreluAlpha);\n const inputs = isChannelsLast ? [im2ColReshaped, w2Row] : [w2Row, im2ColReshaped];\n if (bias) {\n inputs.push(bias);\n }\n if (hasPreluActivationWeights) {\n inputs.push(preluActivationWeights);\n }\n if (hasLeakyreluAlpha) {\n const $leakyreluAlpha = backend2.makeTensorInfo([], \"float32\", util_exports.createScalarValue(leakyreluAlpha, \"float32\"));\n inputs.push($leakyreluAlpha);\n intermediates.push($leakyreluAlpha);\n }\n const product = backend2.runWebGLProgram(matmulProgram, inputs, \"float32\");\n const out = reshape4({ inputs: { x: product }, backend: backend2, attrs: { shape: convInfo.outShape } });\n intermediates.push(product);\n for (const i of intermediates) {\n backend2.disposeIntermediateTensorInfo(i);\n }\n return out;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Conv2D.js\nfunction conv2d4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, filter } = inputs;\n const { strides, pad: pad3, dataFormat, dilations, dimRoundingMode } = attrs;\n const $dataFormat = backend_util_exports.convertConv2DDataFormat(dataFormat);\n const convInfo = backend_util_exports.computeConv2DInfo(x.shape, filter.shape, strides, dilations, pad3, dimRoundingMode, false, $dataFormat);\n let out;\n if (convInfo.filterHeight === 1 && convInfo.filterWidth === 1 && convInfo.dilationHeight === 1 && convInfo.dilationWidth === 1 && convInfo.strideHeight === 1 && convInfo.strideWidth === 1 && (convInfo.padInfo.type === \"SAME\" || convInfo.padInfo.type === \"VALID\")) {\n out = conv2dByMatMul({ x, filter, convInfo, backend: backend2 });\n } else if (convInfo.strideWidth <= 2 && $dataFormat === \"channelsLast\" && env().getBool(\"WEBGL_EXP_CONV\")) {\n const program = new Conv2DPackedProgram(convInfo);\n const customValues = [\n [convInfo.padInfo.top, convInfo.padInfo.left],\n [convInfo.strideHeight, convInfo.strideWidth],\n [convInfo.dilationHeight, convInfo.dilationWidth],\n [convInfo.inHeight, convInfo.inWidth]\n ];\n out = backend2.runWebGLProgram(program, [x, filter], \"float32\", customValues);\n } else if (env().getBool(\"WEBGL_CONV_IM2COL\")) {\n out = conv2dWithIm2Row({ x, filter, convInfo, backend: backend2 });\n } else {\n const program = new Conv2DProgram(convInfo);\n out = backend2.runWebGLProgram(program, [x, filter], \"float32\");\n }\n const outReshaped = reshape4({ inputs: { x: out }, backend: backend2, attrs: { shape: convInfo.outShape } });\n backend2.disposeIntermediateTensorInfo(out);\n return outReshaped;\n}\nvar conv2DConfig2 = {\n kernelName: Conv2D,\n backendName: \"webgl\",\n kernelFunc: conv2d4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/conv_backprop_gpu.js\nvar Conv2DDerFilterProgram = class {\n constructor(convInfo) {\n this.variableNames = [\"x\", \"dy\"];\n this.outputShape = convInfo.filterShape;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const padTop = convInfo.padInfo.top;\n const padLeft = convInfo.padInfo.left;\n const isChannelsLast = convInfo.dataFormat === \"channelsLast\";\n this.userCode = `\n void main() {\n ivec4 coords = getOutputCoords();\n int wR = coords.x;\n int wC = coords.y;\n int d1 = coords.z;\n int d2 = coords.w;\n\n // Convolve x(?, ?, d1) with dy(:, :, d2) to get dw(wR, wC, d1, d2).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n\n for (int b = 0; b < ${convInfo.batchSize}; b++) {\n for (int yR = 0; yR < ${convInfo.outHeight}; yR++) {\n int xR = wR + yR * ${strideHeight} - ${padTop};\n\n if (xR < 0 || xR >= ${convInfo.inHeight}) {\n continue;\n }\n\n for (int yC = 0; yC < ${convInfo.outWidth}; yC++) {\n int xC = wC + yC * ${strideWidth} - ${padLeft};\n\n if (xC < 0 || xC >= ${convInfo.inWidth}) {\n continue;\n }\n\n if (${isChannelsLast}) {\n float dyValue = getDy(b, yR, yC, d2);\n float xValue = getX(b, xR, xC, d1);\n dotProd += (xValue * dyValue);\n } else {\n float dyValue = getDy(b, d2, yR, yC);\n float xValue = getX(b, d1, xR, xC);\n dotProd += (xValue * dyValue);\n }\n\n }\n }\n }\n setOutput(dotProd);\n }\n `;\n }\n};\nvar Conv2DDerInputProgram = class {\n constructor(convInfo) {\n this.variableNames = [\"dy\", \"W\"];\n this.outputShape = convInfo.inShape;\n const filterHeight = convInfo.filterHeight;\n const filterWidth = convInfo.filterWidth;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const isChannelsLast = convInfo.dataFormat === \"channelsLast\";\n const padTop = filterHeight - 1 - convInfo.padInfo.top;\n const padLeft = filterWidth - 1 - convInfo.padInfo.left;\n const rowDim = isChannelsLast ? 1 : 2;\n const colDim = isChannelsLast ? 2 : 3;\n const channelDim = isChannelsLast ? 3 : 1;\n this.userCode = `\n const ivec2 pads = ivec2(${padTop}, ${padLeft});\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d1 = coords[${channelDim}];\n\n ivec2 dyCorner = ivec2(coords[${rowDim}], coords[${colDim}]) - pads;\n int dyRCorner = dyCorner.x;\n int dyCCorner = dyCorner.y;\n\n // Convolve dy(?, ?, d2) with w(:, :, d1, d2) to compute dx(xR, xC, d1).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n for (int wR = 0; wR < ${filterHeight}; wR++) {\n float dyR = float(dyRCorner + wR) / ${strideHeight}.0;\n\n if (dyR < 0.0 || dyR >= ${convInfo.outHeight}.0 || fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n int wRPerm = ${filterHeight} - 1 - wR;\n\n for (int wC = 0; wC < ${filterWidth}; wC++) {\n float dyC = float(dyCCorner + wC) / ${strideWidth}.0;\n\n if (dyC < 0.0 || dyC >= ${convInfo.outWidth}.0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n int wCPerm = ${filterWidth} - 1 - wC;\n\n for (int d2 = 0; d2 < ${convInfo.outChannels}; d2++) {\n\n if (${isChannelsLast}) {\n float xValue = getDy(batch, idyR, idyC, d2);\n float wValue = getW(wRPerm, wCPerm, d1, d2);\n dotProd += xValue * wValue;\n } else {\n float xValue = getDy(batch, d2, idyR, idyC);\n float wValue = getW(wRPerm, wCPerm, d1, d2);\n dotProd += xValue * wValue;\n }\n\n }\n }\n }\n setOutput(dotProd);\n }\n `;\n }\n};\nvar Conv3DDerFilterProgram = class {\n constructor(convInfo) {\n this.variableNames = [\"x\", \"dy\"];\n this.outputShape = convInfo.filterShape;\n const strideDepth = convInfo.strideDepth;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const padFront = convInfo.padInfo.front;\n const padTop = convInfo.padInfo.top;\n const padLeft = convInfo.padInfo.left;\n this.userCode = `\n void main() {\n ivec5 coords = getOutputCoords();\n int wF = coords.x;\n int wR = coords.y;\n int wC = coords.z;\n int d1 = coords.w;\n int d2 = coords.u;\n\n float dotProd = 0.0;\n\n for (int b = 0; b < ${convInfo.batchSize}; b++) {\n for (int yF = 0; yF < ${convInfo.outDepth}; yF++) {\n int xF = wF + yF * ${strideDepth} - ${padFront};\n\n if (xF < 0 || xF >= ${convInfo.inDepth}) {\n continue;\n }\n\n for (int yR = 0; yR < ${convInfo.outHeight}; yR++) {\n int xR = wR + yR * ${strideHeight} - ${padTop};\n\n if (xR < 0 || xR >= ${convInfo.inHeight}) {\n continue;\n }\n\n for (int yC = 0; yC < ${convInfo.outWidth}; yC++) {\n int xC = wC + yC * ${strideWidth} - ${padLeft};\n\n if (xC < 0 || xC >= ${convInfo.inWidth}) {\n continue;\n }\n\n float dyValue = getDy(b, yF, yR, yC, d2);\n float xValue = getX(b, xF, xR, xC, d1);\n dotProd += (xValue * dyValue);\n }\n }\n }\n }\n setOutput(dotProd);\n }\n `;\n }\n};\nvar Conv3DDerInputProgram = class {\n constructor(convInfo) {\n this.variableNames = [\"dy\", \"W\"];\n this.outputShape = convInfo.inShape;\n const filterDepth = convInfo.filterDepth;\n const filterHeight = convInfo.filterHeight;\n const filterWidth = convInfo.filterWidth;\n const strideDepth = convInfo.strideDepth;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const padFront = filterDepth - 1 - convInfo.padInfo.front;\n const padTop = filterHeight - 1 - convInfo.padInfo.top;\n const padLeft = filterWidth - 1 - convInfo.padInfo.left;\n this.userCode = `\n const ivec3 pads = ivec3(${padFront}, ${padTop}, ${padLeft});\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int d1 = coords.u;\n\n\n ivec3 dyCorner = ivec3(coords.y, coords.z, coords.w) - pads;\n int dyFCorner = dyCorner.x;\n int dyRCorner = dyCorner.y;\n int dyCCorner = dyCorner.z;\n\n float dotProd = 0.0;\n for (int wF = 0; wF < ${filterDepth}; wF++) {\n float dyF = float(dyFCorner + wF) / ${strideDepth}.0;\n\n if (dyF < 0.0 || dyF >= ${convInfo.outDepth}.0 || fract(dyF) > 0.0) {\n continue;\n }\n int idyF = int(dyF);\n\n int wFPerm = ${filterDepth} - 1 - wF;\n\n for (int wR = 0; wR < ${filterHeight}; wR++) {\n float dyR = float(dyRCorner + wR) / ${strideHeight}.0;\n\n if (dyR < 0.0 || dyR >= ${convInfo.outHeight}.0 ||\n fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n int wRPerm = ${filterHeight} - 1 - wR;\n\n for (int wC = 0; wC < ${filterWidth}; wC++) {\n float dyC = float(dyCCorner + wC) / ${strideWidth}.0;\n\n if (dyC < 0.0 || dyC >= ${convInfo.outWidth}.0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n int wCPerm = ${filterWidth} - 1 - wC;\n\n for (int d2 = 0; d2 < ${convInfo.outChannels}; d2++) {\n float xValue = getDy(batch, idyF, idyR, idyC, d2);\n float wValue = getW(wFPerm, wRPerm, wCPerm, d1, d2);\n dotProd += xValue * wValue;\n }\n }\n }\n }\n setOutput(dotProd);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Conv2DBackpropFilter.js\nfunction conv2DBackpropFilter3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, dy } = inputs;\n const { strides, pad: pad3, dataFormat, dimRoundingMode, filterShape } = attrs;\n const $dataFormat = backend_util_exports.convertConv2DDataFormat(dataFormat);\n const convInfo = backend_util_exports.computeConv2DInfo(x.shape, filterShape, strides, 1, pad3, dimRoundingMode, false, $dataFormat);\n const program = new Conv2DDerFilterProgram(convInfo);\n return backend2.runWebGLProgram(program, [x, dy], \"float32\");\n}\nvar conv2DBackpropFilterConfig2 = {\n kernelName: Conv2DBackpropFilter,\n backendName: \"webgl\",\n kernelFunc: conv2DBackpropFilter3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Conv2DBackpropInput.js\nfunction conv2DBackpropInput3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { dy, filter } = inputs;\n const { inputShape, strides, pad: pad3, dataFormat, dimRoundingMode } = attrs;\n const $dataFormat = backend_util_exports.convertConv2DDataFormat(dataFormat);\n const convInfo = backend_util_exports.computeConv2DInfo(inputShape, filter.shape, strides, 1, pad3, dimRoundingMode, false, $dataFormat);\n const program = new Conv2DDerInputProgram(convInfo);\n return backend2.runWebGLProgram(program, [dy, filter], \"float32\");\n}\nvar conv2DBackpropInputConfig2 = {\n kernelName: Conv2DBackpropInput,\n backendName: \"webgl\",\n kernelFunc: conv2DBackpropInput3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Conv3D.js\nfunction conv3D2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, filter } = inputs;\n const { strides, pad: pad3, dilations } = attrs;\n const convInfo = backend_util_exports.computeConv3DInfo(x.shape, filter.shape, strides, dilations, pad3);\n const program = new Conv3DProgram(convInfo);\n return backend2.runWebGLProgram(program, [x, filter], \"float32\");\n}\nvar conv3DConfig2 = {\n kernelName: Conv3D,\n backendName: \"webgl\",\n kernelFunc: conv3D2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Conv3DBackpropFilterV2.js\nfunction conv3DBackpropFilterV22(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, dy } = inputs;\n const { strides, pad: pad3, filterShape } = attrs;\n const convInfo = backend_util_exports.computeConv3DInfo(x.shape, filterShape, strides, 1, pad3);\n const program = new Conv3DDerFilterProgram(convInfo);\n return backend2.runWebGLProgram(program, [x, dy], \"float32\");\n}\nvar conv3DBackpropFilterV2Config2 = {\n kernelName: Conv3DBackpropFilterV2,\n backendName: \"webgl\",\n kernelFunc: conv3DBackpropFilterV22\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Conv3DBackpropInputV2.js\nfunction conv3DBackpropInput2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { dy, filter } = inputs;\n const { pad: pad3, strides, inputShape } = attrs;\n const convInfo = backend_util_exports.computeConv3DInfo(inputShape, filter.shape, strides, 1, pad3);\n const program = new Conv3DDerInputProgram(convInfo);\n return backend2.runWebGLProgram(program, [dy, filter], \"float32\");\n}\nvar conv3DBackpropInputConfig = {\n kernelName: Conv3DBackpropInputV2,\n backendName: \"webgl\",\n kernelFunc: conv3DBackpropInput2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Cos.js\nvar COS = CHECK_NAN_SNIPPET_UNARY + `\n return cos(x);\n`;\nvar cos3 = unaryKernelFunc2({ opSnippet: COS });\nvar cosConfig2 = {\n kernelName: Cos,\n backendName: \"webgl\",\n kernelFunc: cos3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Cosh.js\nvar COSH = `\n float e2x = exp(-x);\n return (e2x + 1.0 / e2x) / 2.0;\n`;\nvar cosh3 = unaryKernelFunc2({ opSnippet: COSH });\nvar coshConfig2 = {\n kernelName: Cosh,\n backendName: \"webgl\",\n kernelFunc: cosh3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/crop_and_resize_gpu.js\nvar CropAndResizeProgram = class {\n constructor(imageShape, boxShape, cropSize, method, extrapolationValue) {\n this.variableNames = [\"Image\", \"Boxes\", \"BoxInd\"];\n this.outputShape = [];\n const [batch, imageHeight, imageWidth, depth] = imageShape;\n const [numBoxes] = boxShape;\n const [cropHeight, cropWidth] = cropSize;\n this.outputShape = [numBoxes, cropHeight, cropWidth, depth];\n const methodId = method === \"bilinear\" ? 1 : 0;\n const [inputHeightFloat, inputWidthFloat] = [`${imageHeight - 1}.0`, `${imageWidth - 1}.0`];\n const [heightRatio, heightScale, inY] = cropHeight > 1 ? [\n `${(imageHeight - 1) / (cropHeight - 1)}`,\n \"(y2-y1) * height_ratio\",\n `y1*${inputHeightFloat} + float(y)*(height_scale)`\n ] : [\n \"0.0\",\n \"0.0\",\n `0.5 * (y1+y2) * ${inputHeightFloat}`\n ];\n const [widthRatio, widthScale, inX] = cropWidth > 1 ? [\n `${(imageWidth - 1) / (cropWidth - 1)}`,\n \"(x2-x1) * width_ratio\",\n `x1*${inputWidthFloat} + float(x)*(width_scale)`\n ] : [\n \"0.0\",\n \"0.0\",\n `0.5 * (x1+x2) * ${inputWidthFloat}`\n ];\n this.userCode = `\n const float height_ratio = float(${heightRatio});\n const float width_ratio = float(${widthRatio});\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int y = coords[1];\n int x = coords[2];\n int d = coords[3];\n\n // get box vals\n float y1 = getBoxes(b,0);\n float x1 = getBoxes(b,1);\n float y2 = getBoxes(b,2);\n float x2 = getBoxes(b,3);\n\n // get image in batch index\n int bInd = round(getBoxInd(b));\n if(bInd < 0 || bInd >= ${batch}) {\n return;\n }\n\n float height_scale = ${heightScale};\n float width_scale = ${widthScale};\n\n float in_y = ${inY};\n if( in_y < 0.0 || in_y > ${inputHeightFloat} ) {\n setOutput(float(${extrapolationValue}));\n return;\n }\n float in_x = ${inX};\n if( in_x < 0.0 || in_x > ${inputWidthFloat} ) {\n setOutput(float(${extrapolationValue}));\n return;\n }\n\n vec2 sourceFracIndexCR = vec2(in_x,in_y);\n if(${methodId} == 1) {\n // Compute the four integer indices.\n ivec2 sourceFloorCR = ivec2(sourceFracIndexCR);\n ivec2 sourceCeilCR = ivec2(ceil(sourceFracIndexCR));\n\n float topLeft = getImage(b, sourceFloorCR.y, sourceFloorCR.x, d);\n float bottomLeft = getImage(b, sourceCeilCR.y, sourceFloorCR.x, d);\n float topRight = getImage(b, sourceFloorCR.y, sourceCeilCR.x, d);\n float bottomRight = getImage(b, sourceCeilCR.y, sourceCeilCR.x, d);\n\n vec2 fracCR = sourceFracIndexCR - vec2(sourceFloorCR);\n\n float top = topLeft + (topRight - topLeft) * fracCR.x;\n float bottom = bottomLeft + (bottomRight - bottomLeft) * fracCR.x;\n float newValue = top + (bottom - top) * fracCR.y;\n setOutput(newValue);\n } else {\n // Compute the coordinators of nearest neighbor point.\n ivec2 sourceNearestCR = ivec2(floor(\n sourceFracIndexCR + vec2(0.5,0.5)));\n float newValue = getImage(b, sourceNearestCR.y, sourceNearestCR.x, d);\n setOutput(newValue);\n }\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/CropAndResize.js\nvar cropAndResize3 = (args) => {\n const { inputs, backend: backend2, attrs } = args;\n const { image: image2, boxes, boxInd } = inputs;\n const { cropSize, method, extrapolationValue } = attrs;\n const program = new CropAndResizeProgram(image2.shape, boxes.shape, cropSize, method, extrapolationValue);\n return backend2.runWebGLProgram(program, [image2, boxes, boxInd], \"float32\");\n};\nvar cropAndResizeConfig2 = {\n kernelName: CropAndResize,\n backendName: \"webgl\",\n kernelFunc: cropAndResize3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/cum_gpu.js\nvar CumOpType;\n(function(CumOpType3) {\n CumOpType3[\"Prod\"] = \"*\";\n CumOpType3[\"Sum\"] = \"+\";\n})(CumOpType || (CumOpType = {}));\nvar CumProgram = class {\n constructor(op2, outputShape, exclusive, reverse5) {\n this.op = op2;\n this.outputShape = outputShape;\n this.variableNames = [\"x\"];\n this.customUniforms = [{ name: \"index\", type: \"float\" }];\n const rank = this.outputShape.length;\n const initVal = this.op === CumOpType.Prod ? \"1.0\" : \"0.0\";\n const val = exclusive ? initVal : `getX(${getCoords2(rank, \"coords\", this.op)})`;\n const length = this.outputShape[this.outputShape.length - 1];\n let condition = \"\";\n let idxString = \"\";\n if (exclusive) {\n condition = reverse5 ? `end != ${length - 1}` : \"end != 0\";\n idxString = reverse5 ? \"end + 1\" : \"end - 1\";\n } else {\n condition = reverse5 ? `end + pow2 < ${length}` : \"end >= pow2\";\n idxString = reverse5 ? \"end + pow2\" : \"end - pow2\";\n }\n this.userCode = `\n void main() {\n ${getCoordsDataType(rank)} coords = getOutputCoords();\n int end = ${getFinalCoord(rank, \"coords\", this.op)};\n float val = ${val};\n int pow2 = int(pow(2.0, index));\n if (${condition}) {\n int idx = ${idxString};\n ${getFinalCoord(rank, \"coords\", this.op)} = idx;\n val ${this.op}= getX(${getCoords2(rank, \"coords\", this.op)});\n }\n setOutput(val);\n }\n `;\n }\n};\nfunction getCoords2(rank, name, op2) {\n if (rank === 1) {\n return `${name}`;\n } else if (rank === 2) {\n return `${name}.x, ${name}.y`;\n } else if (rank === 3) {\n return `${name}.x, ${name}.y, ${name}.z`;\n } else if (rank === 4) {\n return `${name}.x, ${name}.y, ${name}.z, ${name}.w`;\n } else {\n throw new Error(`Cumulative ${op2} for rank ${rank} is not yet supported`);\n }\n}\nfunction getFinalCoord(rank, name, op2) {\n if (rank === 1) {\n return `${name}`;\n } else if (rank === 2) {\n return `${name}.y`;\n } else if (rank === 3) {\n return `${name}.z`;\n } else if (rank === 4) {\n return `${name}.w`;\n } else {\n throw new Error(`Cumulative ${op2} for rank ${rank} is not yet supported`);\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Cum_impl.js\nfunction cumImpl(op2, x, backend2, axis, exclusive, reverse5) {\n const xRank = x.shape.length;\n const permutation = backend_util_exports.getAxesPermutation([axis], xRank);\n let permutedX = x;\n if (permutation != null) {\n permutedX = transpose3({ inputs: { x }, backend: backend2, attrs: { perm: permutation } });\n }\n const permutedAxis = backend_util_exports.getInnerMostAxes(1, xRank)[0];\n if (permutedAxis !== xRank - 1) {\n throw new Error(`WebGL cumprod shader expects an inner-most axis=${x.shape.length - 1} but got axis=${axis}`);\n }\n const size = permutedX.shape[permutedAxis];\n let result = identity3({ inputs: { x: permutedX }, backend: backend2 });\n for (let i = 0; i <= Math.ceil(Math.log2(size)) - 1; i++) {\n const program = new CumProgram(op2, permutedX.shape, false, reverse5);\n const customValues = [[i]];\n const prevResult = result;\n result = backend2.runWebGLProgram(program, [result], result.dtype, customValues);\n backend2.disposeIntermediateTensorInfo(prevResult);\n }\n if (exclusive) {\n const program = new CumProgram(op2, permutedX.shape, exclusive, reverse5);\n const prevResult = result;\n result = backend2.runWebGLProgram(program, [result], result.dtype);\n backend2.disposeIntermediateTensorInfo(prevResult);\n }\n if (permutation != null) {\n const reversePermutation = backend_util_exports.getUndoAxesPermutation(permutation);\n const reverseTransposedResult = transpose3({ inputs: { x: result }, backend: backend2, attrs: { perm: reversePermutation } });\n backend2.disposeIntermediateTensorInfo(result);\n backend2.disposeIntermediateTensorInfo(permutedX);\n return reverseTransposedResult;\n }\n return result;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Cumprod.js\nfunction cumprod3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis, exclusive, reverse: reverse5 } = attrs;\n return cumImpl(CumOpType.Prod, x, backend2, axis, exclusive, reverse5);\n}\nvar cumprodConfig2 = {\n kernelName: Cumprod,\n backendName: \"webgl\",\n kernelFunc: cumprod3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Cumsum.js\nfunction cumsum3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis, exclusive, reverse: reverse5 } = attrs;\n return cumImpl(CumOpType.Sum, x, backend2, axis, exclusive, reverse5);\n}\nvar cumsumConfig2 = {\n kernelName: Cumsum,\n backendName: \"webgl\",\n kernelFunc: cumsum3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/DenseBincount.js\nfunction denseBincount3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, weights } = inputs;\n const { size, binaryOutput } = attrs;\n if (x.shape.length === 1) {\n const xVals = backend2.readSync(x.dataId);\n const weightsVals = backend2.readSync(weights.dataId);\n const outVals = bincountImplCPU(xVals, weightsVals, weights.dtype, weights.shape, size);\n return backend2.makeTensorInfo([size], weights.dtype, outVals);\n } else if (x.shape.length === 2) {\n const xBuf = backend2.bufferSync(x);\n const weightsBuf = backend2.bufferSync(weights);\n const outBuf = bincountReduceImplCPU(xBuf, weightsBuf, size, binaryOutput);\n return backend2.makeTensorInfo(outBuf.shape, weights.dtype, outBuf.values);\n }\n throw new Error(`Error in denseBincount: input must be at most rank 2, but got rank${x.shape.length}.`);\n}\nvar denseBincountConfig2 = {\n kernelName: DenseBincount,\n backendName: \"webgl\",\n kernelFunc: denseBincount3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/depth_to_space_gpu.js\nvar DepthToSpaceProgram = class {\n constructor(outputShape, blockSize, dataFormat) {\n this.variableNames = [\"x\"];\n this.outputShape = [];\n this.outputShape = outputShape;\n this.blockSize = blockSize;\n this.dataFormat = dataFormat;\n this.userCode = `\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int h = ${this.getHeightCoordString()};\n int w = ${this.getWidthCoordString()};\n int d = ${this.getDepthCoordString()};\n\n int in_h = h / ${blockSize};\n int offset_h = imod(h, ${blockSize});\n int in_w = w / ${blockSize};\n int offset_w = imod(w, ${blockSize});\n int offset_d = (offset_h * ${blockSize} + offset_w) *\n ${this.getOutputDepthSize()};\n int in_d = d + offset_d;\n\n float result = ${this.getInputSamplingString()};\n setOutput(result);\n }\n `;\n }\n getHeightCoordString() {\n if (this.dataFormat === \"NHWC\") {\n return `coords[1]`;\n } else {\n return `coords[2]`;\n }\n }\n getWidthCoordString() {\n if (this.dataFormat === \"NHWC\") {\n return `coords[2]`;\n } else {\n return `coords[3]`;\n }\n }\n getDepthCoordString() {\n if (this.dataFormat === \"NHWC\") {\n return `coords[3]`;\n } else {\n return `coords[1]`;\n }\n }\n getOutputDepthSize() {\n if (this.dataFormat === \"NHWC\") {\n return this.outputShape[3];\n } else {\n return this.outputShape[1];\n }\n }\n getInputSamplingString() {\n if (this.dataFormat === \"NHWC\") {\n return `getX(b, in_h, in_w, in_d)`;\n } else {\n return `getX(b, in_d, in_h, in_w)`;\n }\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/DepthToSpace.js\nfunction depthToSpace3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { blockSize, dataFormat } = attrs;\n const batchSize = x.shape[0];\n const inputHeight = dataFormat === \"NHWC\" ? x.shape[1] : x.shape[2];\n const inputWidth = dataFormat === \"NHWC\" ? x.shape[2] : x.shape[3];\n const inputDepth = dataFormat === \"NHWC\" ? x.shape[3] : x.shape[1];\n const outputHeight = inputHeight * blockSize;\n const outputWidth = inputWidth * blockSize;\n const outputDepth = inputDepth / (blockSize * blockSize);\n const outputShape = dataFormat === \"NHWC\" ? [batchSize, outputHeight, outputWidth, outputDepth] : [batchSize, outputDepth, outputHeight, outputWidth];\n const program = new DepthToSpaceProgram(outputShape, blockSize, dataFormat);\n return backend2.runWebGLProgram(program, [x], x.dtype);\n}\nvar depthToSpaceConfig2 = {\n kernelName: DepthToSpace,\n backendName: \"webgl\",\n kernelFunc: depthToSpace3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/conv_gpu_depthwise.js\nvar DepthwiseConv2DProgram = class {\n constructor(convInfo, addBias = false, activation2 = null, hasPreluActivation = false, hasLeakyReluAlpha = false) {\n this.variableNames = [\"x\", \"W\"];\n this.customUniforms = [\n { name: \"pads\", type: \"ivec2\" },\n { name: \"strides\", type: \"ivec2\" },\n { name: \"dilations\", type: \"ivec2\" },\n { name: \"inDims\", type: \"ivec2\" }\n ];\n this.outputShape = convInfo.outShape;\n this.enableShapeUniforms = useShapeUniforms(this.outputShape.length);\n const filterHeight = convInfo.filterHeight;\n const filterWidth = convInfo.filterWidth;\n const channelMul = convInfo.outChannels / convInfo.inChannels;\n let activationSnippet = \"\", applyActivationSnippet = \"\";\n if (activation2) {\n if (hasPreluActivation) {\n activationSnippet = `float activation(float a) {\n float b = getPreluActivationWeightsAtOutCoords();\n ${activation2}\n }`;\n } else if (hasLeakyReluAlpha) {\n activationSnippet = `float activation(float a) {\n float b = getLeakyreluAlphaAtOutCoords();\n ${activation2}\n }`;\n } else {\n activationSnippet = `\n float activation(float x) {\n ${activation2}\n }\n `;\n }\n applyActivationSnippet = `result = activation(result);`;\n }\n const addBiasSnippet = addBias ? \"result += getBiasAtOutCoords();\" : \"\";\n if (addBias) {\n this.variableNames.push(\"bias\");\n }\n if (hasPreluActivation) {\n this.variableNames.push(\"preluActivationWeights\");\n }\n if (hasLeakyReluAlpha) {\n this.variableNames.push(\"leakyreluAlpha\");\n }\n this.userCode = `\n ${activationSnippet}\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords.x;\n ivec2 xRCCorner = coords.yz * strides - pads;\n int d2 = coords.w;\n int d1 = d2 / ${channelMul};\n int q = d2 - d1 * ${channelMul};\n\n int xRCorner = xRCCorner.x;\n int xCCorner = xRCCorner.y;\n\n // Convolve x(?, ?, d1) with w(:, :, d1, q) to get y(yR, yC, d2).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n // TO DO(dsmilkov): Flatten the two for loops and vec4 the operations.\n for (int wR = 0; wR < ${filterHeight}; wR++) {\n int xR = xRCorner + wR * dilations[0];\n\n if (xR < 0 || xR >= inDims[0]) {\n continue;\n }\n\n for (int wC = 0; wC < ${filterWidth}; wC++) {\n int xC = xCCorner + wC * dilations[1];\n\n if (xC < 0 || xC >= inDims[1]) {\n continue;\n }\n\n float xVal = getX(batch, xR, xC, d1);\n float wVal = getW(wR, wC, d1, q);\n dotProd += xVal * wVal;\n }\n }\n\n float result = dotProd;\n ${addBiasSnippet}\n ${applyActivationSnippet}\n setOutput(result);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/conv_packed_gpu_depthwise.js\nvar DepthwiseConvPacked2DProgram = class {\n constructor(convInfo, addBias = false, activation2 = null, hasPreluActivation = false, hasLeakyReluAlpha = false) {\n this.variableNames = [\"x\", \"W\"];\n this.packedInputs = true;\n this.packedOutput = true;\n this.customUniforms = [\n { name: \"pads\", type: \"ivec2\" },\n { name: \"strides\", type: \"ivec2\" },\n { name: \"dilations\", type: \"ivec2\" },\n { name: \"inDims\", type: \"ivec2\" }\n ];\n this.outputShape = convInfo.outShape;\n this.enableShapeUniforms = useShapeUniforms(this.outputShape.length);\n const channelMul = convInfo.outChannels / convInfo.inChannels;\n const padLeft = convInfo.padInfo.left;\n const strideWidth = convInfo.strideWidth;\n const dilationWidth = convInfo.dilationWidth;\n const filterHeight = convInfo.filterHeight;\n const filterWidth = convInfo.filterWidth;\n const texelsAcross = filterWidth;\n let mainLoop = `\n int xR; int xC; int xCOffset;\n vec4 wTexel; vec4 previous; vec4 final;`;\n for (let c = 0; c < filterWidth; c++) {\n mainLoop += `\n vec4 xTexelC${c * 2};\n int xTexelC${c * 2}Ready;\n vec4 xTexelC${c * 2 + 1};\n int xTexelC${c * 2 + 1}Ready;\n vec4 xC${c};`;\n }\n mainLoop += `\n for (int r = 0; r < ${filterHeight}; r++) {\n `;\n for (let c = 0; c < filterWidth; c++) {\n mainLoop += `\n xTexelC${c * 2} = vec4(0.0);\n xTexelC${c * 2}Ready = 0;\n xTexelC${c * 2 + 1} = vec4(0.0);\n xTexelC${c * 2 + 1}Ready = 0;\n xC${c} = vec4(0.0);`;\n }\n mainLoop += `\n xR = xRCorner + r * dilations[0];\n if (xR >=0 && xR < inDims[0]) {\n `;\n for (let texelC = 0; texelC < (texelsAcross + 1) / 2; texelC++) {\n const colIndex = texelC * 2;\n mainLoop += `\n xC = xCCorner + ${colIndex * dilationWidth};\n `;\n if (strideWidth === 1) {\n if (colIndex < filterWidth) {\n if (padLeft % 2 === 1) {\n mainLoop += `\n xCOffset = xC + 1;\n if (xCOffset >= 0 && xCOffset < inDims[1] && xTexelC${colIndex}Ready == 0) {\n xTexelC${colIndex} = getX(batch, xR, xCOffset, d1);\n\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if (xCOffset + 1 >= inDims[1]) {\n xTexelC${colIndex}.zw = vec2(0.0);\n }\n xTexelC${colIndex}Ready = 1;\n }\n `;\n if (dilationWidth === 1 && colIndex > 0) {\n mainLoop += `\n xC${colIndex} = vec4(xTexelC${colIndex - 2}.zw, xTexelC${colIndex}.xy);\n `;\n } else {\n mainLoop += `\n xCOffset = xC + 1 - 2;\n\n if (xCOffset >= 0 && xCOffset < inDims[1]) {\n previous = getX(batch, xR, xCOffset, d1);\n\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if (xCOffset + 1 >= inDims[1]) {\n previous.zw = vec2(0.0);\n }\n\n xC${colIndex} = vec4(previous.zw, xTexelC${colIndex}.xy);\n } else {\n xC${colIndex} = vec4(0.0, 0.0, xTexelC${colIndex}.xy);\n }\n `;\n }\n } else {\n mainLoop += `\n if (xC >= 0 && xC < inDims[1] && xTexelC${colIndex}Ready == 0) {\n xTexelC${colIndex} = getX(batch, xR, xC, d1);\n if (xC + 1 >= inDims[1]) {\n xTexelC${colIndex}.zw = vec2(0.0);\n }\n xTexelC${colIndex}Ready = 1;\n }\n\n xC${colIndex} = xTexelC${colIndex};\n `;\n }\n if (colIndex + 1 < filterWidth) {\n const nextTexelOffset = padLeft % 2 === 0 ? util_exports.nearestLargerEven(dilationWidth) : dilationWidth;\n if (dilationWidth % 2 === 0 && padLeft % 2 === 1 || dilationWidth % 2 !== 0 && padLeft % 2 !== 1) {\n mainLoop += `\n xCOffset = xC + imod(pads[1], 2) + ${nextTexelOffset};\n\n if (xCOffset >= 0 && xCOffset < inDims[1] && xTexelC${colIndex + 1}Ready == 0) {\n xTexelC${colIndex + 1} = getX(batch, xR, xCOffset, d1);\n\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if (xCOffset + 1 >= inDims[1]) {\n xTexelC${colIndex + 1}.zw = vec2(0.0);\n }\n xTexelC${colIndex + 1}Ready = 1;\n }\n `;\n if (dilationWidth > 1) {\n mainLoop += `\n xCOffset -= 2;\n if (xCOffset >= 0 && xCOffset < inDims[1]) {\n previous = getX(batch, xR, xCOffset, d1);\n xC${colIndex + 1} = vec4(previous.zw, xTexelC${colIndex + 1}.xy);\n } else {\n xC${colIndex + 1} = vec4(0.0, 0.0, xTexelC${colIndex + 1}.xy);\n }\n `;\n } else {\n mainLoop += `\n xC${colIndex + 1} = vec4(xTexelC${colIndex}.zw, xTexelC${colIndex + 1}.xy);\n `;\n }\n } else {\n if (nextTexelOffset === 1) {\n mainLoop += `\n xC${colIndex + 1} = xTexelC${colIndex};\n `;\n } else {\n mainLoop += `\n xCOffset = xC + ${nextTexelOffset};\n\n if (xCOffset >= 0 && xCOffset < inDims[1] && xTexelC${colIndex + 1}Ready == 0) {\n xTexelC${colIndex + 1} = getX(batch, xR, xCOffset, d1);\n if (xCOffset + 1 >= inDims[1]) {\n xTexelC${colIndex + 1}.zw = vec2(0.0);\n }\n xTexelC${colIndex + 1}Ready = 1;\n }\n\n xC${colIndex + 1} = xTexelC${colIndex + 1};\n `;\n }\n }\n }\n }\n } else {\n if (colIndex < filterWidth) {\n if (padLeft % 2 === 1) {\n mainLoop += `\n xCOffset = xC + 1 - strides[1];\n if(xCOffset >= 0 && xCOffset < inDims[1] && xTexelC${colIndex}Ready == 0) {\n xTexelC${colIndex} = getX(batch, xR, xCOffset, d1);\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if (xCOffset + 1 >= inDims[1]) {\n xTexelC${colIndex}.zw = vec2(0.0);\n }\n xTexelC${colIndex}Ready = 1;\n }\n\n if(xC + 1 >= 0 && xC + 1 < inDims[1] && xTexelC${colIndex + 1}Ready == 0) {\n xTexelC${colIndex + 1} = getX(batch, xR, xC + 1, d1);\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if (xC + 2 >= inDims[1]) {\n xTexelC${colIndex + 1}.zw = vec2(0.0);\n }\n xTexelC${colIndex + 1}Ready = 1;\n }\n\n xC${colIndex} = vec4(xTexelC${colIndex}.zw, xTexelC${colIndex + 1}.zw);\n `;\n if (colIndex + 1 < filterWidth) {\n mainLoop += `\n final = vec4(0.0);\n xCOffset = xC + 1 + strides[1];\n if(xCOffset >= 0 && xCOffset < inDims[1]) {\n final = getX(batch, xR, xCOffset, d1);\n }\n xC${colIndex + 1} = vec4(xTexelC${colIndex + 1}.xy, final.xy);\n `;\n }\n } else {\n mainLoop += `\n if(xC >= 0 && xC < inDims[1] && xTexelC${colIndex}Ready == 0) {\n xTexelC${colIndex} = getX(batch, xR, xC, d1);\n if (xC + 1 >= inDims[1]) {\n xTexelC${colIndex}.zw = vec2(0.0);\n }\n xTexelC${colIndex}Ready = 1;\n }\n\n xCOffset = xC + strides[1];\n if(xCOffset >= 0 && xCOffset < inDims[1] && xTexelC${colIndex + 1}Ready == 0) {\n xTexelC${colIndex + 1} = getX(batch, xR, xCOffset, d1);\n if (xCOffset + 1 >= inDims[1]) {\n xTexelC${colIndex + 1}.zw = vec2(0.);\n }\n xTexelC${colIndex + 1}Ready = 1;\n }\n\n xC${colIndex} = vec4(\n xTexelC${colIndex}.xy, xTexelC${colIndex + 1}.xy);\n `;\n if (colIndex + 1 < filterWidth) {\n mainLoop += `\n xC${colIndex + 1} = vec4(xTexelC${colIndex}.zw, xTexelC${colIndex + 1}.zw);\n `;\n }\n }\n }\n }\n if (colIndex < filterWidth) {\n mainLoop += `\n wTexel = getW(r, ${colIndex}, d1, q);\n dotProd += xC${colIndex} * vec4(wTexel.xz, wTexel.xz);\n `;\n if (colIndex + 1 < filterWidth) {\n mainLoop += `\n wTexel = getW(r, ${colIndex + 1}, d1, q);\n dotProd += xC${colIndex + 1} * vec4(wTexel.xz, wTexel.xz);\n `;\n }\n }\n }\n mainLoop += `\n }\n `;\n mainLoop += `\n }\n `;\n let activationSnippet = \"\", applyActivationSnippet = \"\";\n if (activation2) {\n if (hasPreluActivation) {\n activationSnippet = `vec4 activation(vec4 a) {\n vec4 b = getPreluActivationWeightsAtOutCoords();\n ${activation2}\n }`;\n } else if (hasLeakyReluAlpha) {\n activationSnippet = `vec4 activation(vec4 a) {\n vec4 b = getLeakyreluAlphaAtOutCoords();\n ${activation2}\n }`;\n } else {\n activationSnippet = `vec4 activation(vec4 x) {\n ${activation2}\n }`;\n }\n applyActivationSnippet = `result = activation(result);`;\n }\n const addBiasSnippet = addBias ? \"result += getBiasAtOutCoords();\" : \"\";\n if (addBias) {\n this.variableNames.push(\"bias\");\n }\n if (hasPreluActivation) {\n this.variableNames.push(\"preluActivationWeights\");\n }\n if (hasLeakyReluAlpha) {\n this.variableNames.push(\"leakyreluAlpha\");\n }\n this.userCode = `\n ${activationSnippet}\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords.x;\n ivec2 xRCCorner = coords.yz * strides - pads;\n int d2 = coords.w;\n int d1 = d2 / ${channelMul};\n int q = d2 - d1 * ${channelMul};\n int xRCorner = xRCCorner.x;\n int xCCorner = xRCCorner.y;\n\n //intialize dotProd with a small epsilon seems to reduce GPU accuracy loss.\n vec4 dotProd = vec4(0.000000000000001);\n\n ${mainLoop}\n\n vec4 result = dotProd - vec4(0.000000000000001);\n ${addBiasSnippet}\n ${applyActivationSnippet}\n setOutput(result);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/DepthwiseConv2dNative.js\nfunction depthwiseConv2dNative2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, filter } = inputs;\n const { strides, pad: pad3, dilations, dimRoundingMode } = attrs;\n let $dilations = dilations;\n if ($dilations == null) {\n $dilations = [1, 1];\n }\n util_exports.assert(backend_util_exports.eitherStridesOrDilationsAreOne(strides, $dilations), () => `Error in depthwiseConv2d: Either strides or dilations must be 1. Got strides ${strides} and dilations '${$dilations}'`);\n const convInfo = backend_util_exports.computeConv2DInfo(x.shape, filter.shape, strides, $dilations, pad3, dimRoundingMode, true);\n let program;\n if (env().getBool(\"WEBGL_PACK_DEPTHWISECONV\") && convInfo.strideWidth <= 2 && convInfo.outChannels / convInfo.inChannels === 1) {\n program = new DepthwiseConvPacked2DProgram(convInfo);\n } else {\n program = new DepthwiseConv2DProgram(convInfo);\n }\n const customValues = [\n [convInfo.padInfo.top, convInfo.padInfo.left],\n [convInfo.strideHeight, convInfo.strideWidth],\n [convInfo.dilationHeight, convInfo.dilationWidth],\n [convInfo.inHeight, convInfo.inWidth]\n ];\n return backend2.runWebGLProgram(program, [x, filter], \"float32\", customValues);\n}\nvar depthwiseConv2dNativeConfig2 = {\n kernelName: DepthwiseConv2dNative,\n backendName: \"webgl\",\n kernelFunc: depthwiseConv2dNative2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/conv_backprop_gpu_depthwise.js\nvar DepthwiseConv2DDerFilterProgram = class {\n constructor(convInfo) {\n this.variableNames = [\"x\", \"dy\"];\n this.outputShape = convInfo.filterShape;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const padTop = convInfo.padInfo.top;\n const padLeft = convInfo.padInfo.left;\n const channelMul = convInfo.outChannels / convInfo.inChannels;\n this.userCode = `\n void main() {\n ivec4 coords = getOutputCoords();\n int wR = coords.x;\n int wC = coords.y;\n int d1 = coords.z;\n int dm = coords.w;\n int d2 = d1 * ${channelMul} + dm;\n\n float dotProd = 0.0;\n\n // TO DO: Vec4 over the batch size\n for (int b = 0; b < ${convInfo.batchSize}; b++) {\n for (int yR = 0; yR < ${convInfo.outHeight}; yR++) {\n int xR = wR + yR * ${strideHeight} - ${padTop};\n\n if (xR < 0 || xR >= ${convInfo.inHeight}) {\n continue;\n }\n\n for (int yC = 0; yC < ${convInfo.outWidth}; yC++) {\n int xC = wC + yC * ${strideWidth} - ${padLeft};\n\n if (xC < 0 || xC >= ${convInfo.inWidth}) {\n continue;\n }\n\n float dyValue = getDy(b, yR, yC, d2);\n float xValue = getX(b, xR, xC, d1);\n dotProd += (xValue * dyValue);\n }\n }\n }\n setOutput(dotProd);\n }\n `;\n }\n};\nvar DepthwiseConv2DDerInputProgram = class {\n constructor(convInfo) {\n this.variableNames = [\"dy\", \"W\"];\n this.outputShape = convInfo.inShape;\n const filterHeight = convInfo.filterHeight;\n const filterWidth = convInfo.filterWidth;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const padTop = filterHeight - 1 - convInfo.padInfo.top;\n const padLeft = filterWidth - 1 - convInfo.padInfo.left;\n const channelMul = convInfo.outChannels / convInfo.inChannels;\n this.userCode = `\n const ivec2 pads = ivec2(${padTop}, ${padLeft});\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d1 = coords[3];\n ivec2 dyCorner = coords.yz - pads;\n int dyRCorner = dyCorner.x;\n int dyCCorner = dyCorner.y;\n\n float dotProd = 0.0;\n\n for (int wR = 0; wR < ${filterHeight}; wR++) {\n float dyR = float(dyRCorner + wR) / ${strideHeight}.0;\n\n if (dyR < 0.0 || dyR >= ${convInfo.outHeight}.0 || fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n int wRPerm = ${filterHeight} - 1 - wR;\n\n for (int wC = 0; wC < ${filterWidth}; wC++) {\n float dyC = float(dyCCorner + wC) / ${strideWidth}.0;\n\n if (dyC < 0.0 || dyC >= ${convInfo.outWidth}.0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n int wCPerm = ${filterWidth} - 1 - wC;\n\n // TO DO: Vec4 over the channelMul\n for (int dm = 0; dm < ${channelMul}; dm++) {\n int d2 = d1 * ${channelMul} + dm;\n float xValue = getDy(batch, idyR, idyC, d2);\n float wValue = getW(wRPerm, wCPerm, d1, dm);\n dotProd += xValue * wValue;\n }\n }\n }\n setOutput(dotProd);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/DepthwiseConv2dNativeBackpropFilter.js\nfunction depthwiseConv2dNativeBackpropFilter3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, dy } = inputs;\n const { strides, dilations, pad: pad3, dimRoundingMode, filterShape } = attrs;\n const convInfo = backend_util_exports.computeConv2DInfo(x.shape, filterShape, strides, dilations, pad3, dimRoundingMode, true);\n const program = new DepthwiseConv2DDerFilterProgram(convInfo);\n return backend2.runWebGLProgram(program, [x, dy], \"float32\");\n}\nvar depthwiseConv2dNativeBackpropFilterConfig2 = {\n kernelName: DepthwiseConv2dNativeBackpropFilter,\n backendName: \"webgl\",\n kernelFunc: depthwiseConv2dNativeBackpropFilter3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/DepthwiseConv2dNativeBackpropInput.js\nfunction depthwiseConv2dNativeBackpropInput3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { dy, filter } = inputs;\n const { strides, dilations, pad: pad3, dimRoundingMode, inputShape } = attrs;\n const convInfo = backend_util_exports.computeConv2DInfo(inputShape, filter.shape, strides, dilations, pad3, dimRoundingMode, true);\n const program = new DepthwiseConv2DDerInputProgram(convInfo);\n return backend2.runWebGLProgram(program, [dy, filter], \"float32\");\n}\nvar depthwiseConv2dNativeBackpropInputConfig2 = {\n kernelName: DepthwiseConv2dNativeBackpropInput,\n backendName: \"webgl\",\n kernelFunc: depthwiseConv2dNativeBackpropInput3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/diag_gpu.js\nvar DiagProgram = class {\n constructor(size) {\n this.variableNames = [\"X\"];\n this.outputShape = [size, size];\n this.userCode = `\n void main() {\n ivec2 coords = getOutputCoords();\n float val = coords[0] == coords[1] ? getX(coords[0]) : 0.0;\n setOutput(val);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Diag.js\nfunction diag3(args) {\n const { inputs, backend: backend2 } = args;\n const { x } = inputs;\n const outShape = [...x.shape, ...x.shape];\n const xSize = util_exports.sizeFromShape(x.shape);\n const flat = reshape4({ inputs: { x }, backend: backend2, attrs: { shape: [xSize] } });\n const program = new DiagProgram(xSize);\n const res = backend2.runWebGLProgram(program, [flat], flat.dtype);\n const out = reshape4({ inputs: { x: res }, backend: backend2, attrs: { shape: outShape } });\n backend2.disposeIntermediateTensorInfo(flat);\n backend2.disposeIntermediateTensorInfo(res);\n return out;\n}\nvar diagConfig2 = {\n kernelName: Diag,\n backendName: \"webgl\",\n kernelFunc: diag3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/dilation_gpu.js\nvar Dilation2DProgram = class {\n constructor(convInfo) {\n this.variableNames = [\"x\", \"W\"];\n this.outputShape = convInfo.outShape;\n const { inHeight, inWidth, padInfo, strideHeight, strideWidth, filterHeight, filterWidth, dilationHeight, dilationWidth } = convInfo;\n const { top: padTop, left: padLeft } = padInfo;\n this.userCode = `\n const ivec2 strides = ivec2(${strideHeight}, ${strideWidth});\n const ivec2 pads = ivec2(${padTop}, ${padLeft});\n const float neg_infinity = -3.4e38;\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords.x;\n int d1 = coords.w;\n ivec2 outTopLeftCorner =\n coords.yz * strides - pads;\n int hBeg = outTopLeftCorner.x;\n int wBeg = outTopLeftCorner.y;\n\n float curVal = neg_infinity;\n for (int h = 0; h < ${filterHeight}; h++) {\n int hIn = hBeg + h * ${dilationHeight};\n\n if (hIn >= 0 && hIn < ${inHeight}) {\n for (int w = 0; w < ${filterWidth}; w++) {\n int wIn = wBeg + w * ${dilationWidth};\n\n if (wIn >= 0 && wIn < ${inWidth}) {\n float xVal = getX(batch, hIn, wIn, d1);\n float wVal = getW(h, w, d1);\n\n float val = xVal + wVal;\n if (val > curVal) {\n curVal = val;\n }\n }\n }\n }\n }\n\n float result = curVal;\n setOutput(result);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Dilation2D.js\nfunction dilation2D(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, filter } = inputs;\n const { strides, pad: pad3, dilations } = attrs;\n const convInfo = backend_util_exports.computeDilation2DInfo(x.shape, filter.shape, strides, pad3, \"NHWC\", dilations);\n let out;\n const program = new Dilation2DProgram(convInfo);\n out = backend2.runWebGLProgram(program, [x, filter], \"float32\");\n const outReshaped = reshape4({ inputs: { x: out }, backend: backend2, attrs: { shape: convInfo.outShape } });\n backend2.disposeIntermediateTensorInfo(out);\n return outReshaped;\n}\nvar dilation2DConfig2 = {\n kernelName: Dilation2D,\n backendName: \"webgl\",\n kernelFunc: dilation2D\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Einsum.js\nfunction einsum3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { equation } = attrs;\n const tensors = inputs;\n const { allDims, summedDims, idDims } = backend_util_exports.decodeEinsumEquation(equation, tensors.length);\n backend_util_exports.checkEinsumDimSizes(allDims.length, idDims, tensors);\n const { path, steps } = backend_util_exports.getEinsumComputePath(summedDims, idDims);\n const nSteps = steps.length;\n let out = null;\n let numDimsRemaining = allDims.length;\n const tensorsToDispose = [];\n for (let i = 0; i < nSteps; ++i) {\n for (const idTerm of steps[i]) {\n const { permutationIndices: perm, expandDims: dimsToExpand } = backend_util_exports.getEinsumPermutation(numDimsRemaining, idDims[idTerm]);\n let x;\n if (backend_util_exports.isIdentityPermutation(perm)) {\n x = tensors[idTerm];\n } else {\n x = transpose3({ inputs: { x: tensors[idTerm] }, backend: backend2, attrs: { perm } });\n tensorsToDispose.push(x);\n }\n const targetShape = x.shape.slice();\n for (let k = 0; k < dimsToExpand.length; ++k) {\n targetShape.splice(dimsToExpand[k], 0, 1);\n }\n if (!util_exports.arraysEqual(x.shape, targetShape)) {\n x = reshape4({ inputs: { x }, backend: backend2, attrs: { shape: targetShape } });\n tensorsToDispose.push(x);\n }\n if (out === null) {\n out = x;\n } else {\n out = multiply3({ inputs: { a: x, b: out }, backend: backend2 });\n tensorsToDispose.push(out);\n }\n }\n if (i < nSteps - 1) {\n if (path[i] >= 0) {\n out = sum4({\n inputs: { x: out },\n backend: backend2,\n attrs: {\n axis: path[i] - (allDims.length - numDimsRemaining),\n keepDims: false\n }\n });\n tensorsToDispose.push(out);\n }\n numDimsRemaining--;\n }\n }\n for (const tensorInfo of tensorsToDispose) {\n if (tensorInfo === out) {\n continue;\n }\n backend2.disposeIntermediateTensorInfo(tensorInfo);\n }\n return out;\n}\nvar einsumConfig2 = {\n kernelName: Einsum,\n backendName: \"webgl\",\n kernelFunc: einsum3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Elu.js\nvar ELU4 = `return (x >= 0.0) ? x : (exp(x) - 1.0);`;\nvar ELU_PACKED = `\n vec4 result;\n\n result.r = (x.r >= 0.0) ? x.r : (exp(x.r) - 1.0);\n result.g = (x.g >= 0.0) ? x.g : (exp(x.g) - 1.0);\n result.b = (x.b >= 0.0) ? x.b : (exp(x.b) - 1.0);\n result.a = (x.a >= 0.0) ? x.a : (exp(x.a) - 1.0);\n\n return result;\n`;\nvar elu5 = unaryKernelFunc2({ opSnippet: ELU4, packedOpSnippet: ELU_PACKED });\nvar eluConfig2 = {\n kernelName: Elu,\n backendName: \"webgl\",\n kernelFunc: elu5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/EluGrad.js\nvar ELU_DER = `return (b >= 1.0) ? a : a * (b + 1.0);`;\nvar ELU_DER_PACKED = `\n vec4 bGTEZero = vec4(greaterThanEqual(b, vec4(0.)));\n return (bGTEZero * a) + ((vec4(1.0) - bGTEZero) * (a * (b + vec4(1.0))));\n`;\nvar eluGrad2 = (args) => {\n const { inputs, backend: backend2 } = args;\n const { dy, y } = inputs;\n const program = env().getBool(\"WEBGL_PACK_BINARY_OPERATIONS\") ? new BinaryOpPackedProgram(ELU_DER_PACKED, dy.shape, y.shape) : new BinaryOpProgram(ELU_DER, dy.shape, y.shape);\n return backend2.runWebGLProgram(program, [dy, y], dy.dtype);\n};\nvar eluGradConfig3 = {\n kernelName: EluGrad,\n backendName: \"webgl\",\n kernelFunc: eluGrad2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Equal.js\nvar PACKED_EQUAL = `\n return vec4(equal(a, b));\n`;\nvar EQUAL = `return float(a == b);`;\nvar equal3 = binaryKernelFunc2({\n opSnippet: EQUAL,\n packedOpSnippet: PACKED_EQUAL,\n dtype: \"bool\",\n cpuKernelImpl: equalImplCPU\n});\nvar equalConfig2 = {\n kernelName: Equal,\n backendName: \"webgl\",\n kernelFunc: equal3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Erf.js\nvar ERF = `\n // Error function is calculated approximately with elementary function.\n // See \"Handbook of Mathematical Functions with Formulas,\n // Graphs, and Mathematical Tables\", Abramowitz and Stegun.\n float p = ${backend_util_exports.ERF_P};\n float a1 = ${backend_util_exports.ERF_A1};\n float a2 = ${backend_util_exports.ERF_A2};\n float a3 = ${backend_util_exports.ERF_A3};\n float a4 = ${backend_util_exports.ERF_A4};\n float a5 = ${backend_util_exports.ERF_A5};\n\n float sign = sign(x);\n x = abs(x);\n float t = 1.0 / (1.0 + p * x);\n return sign * (1.0 - (((((a5*t + a4)*t) + a3)*t + a2)*t + a1)*t*exp(-x*x));\n`;\nvar erf3 = unaryKernelFunc2({ opSnippet: ERF });\nvar erfConfig2 = {\n kernelName: Erf,\n backendName: \"webgl\",\n kernelFunc: erf3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Exp.js\nvar EXP = CHECK_NAN_SNIPPET_UNARY + `\n return exp(x);\n`;\nvar EXP_PACKED = `\n vec4 result = exp(x);\n bvec4 isNaN = isnan(x);\n result.r = isNaN.r ? x.r : result.r;\n result.g = isNaN.g ? x.g : result.g;\n result.b = isNaN.b ? x.b : result.b;\n result.a = isNaN.a ? x.a : result.a;\n\n return result;\n`;\nvar exp3 = unaryKernelFunc2({\n opSnippet: EXP,\n packedOpSnippet: EXP_PACKED,\n cpuKernelImpl: expImplCPU,\n dtype: \"float32\"\n});\nvar expConfig2 = {\n kernelName: Exp,\n backendName: \"webgl\",\n kernelFunc: exp3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ExpandDims.js\nfunction expandDims4(args) {\n const { inputs, attrs, backend: backend2 } = args;\n const { dim } = attrs;\n const { input: input2 } = inputs;\n const inputRank = input2.shape.length;\n const newShape = input2.shape.slice();\n let $dim = dim;\n if (dim < 0) {\n util_exports.assert(-(inputRank + 1) <= dim, () => `Axis must be in the interval [${-(inputRank + 1)}, ${inputRank}]`);\n $dim = inputRank + dim + 1;\n }\n newShape.splice($dim, 0, 1);\n return reshape4({ inputs: { x: input2 }, backend: backend2, attrs: { shape: newShape } });\n}\nvar expandDimsConfig2 = {\n kernelName: ExpandDims,\n backendName: \"webgl\",\n kernelFunc: expandDims4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Expm1.js\nvar EXPM1 = `return exp(x) - 1.0;`;\nvar expm13 = unaryKernelFunc2({ opSnippet: EXPM1, packedOpSnippet: EXPM1, cpuKernelImpl: expm1ImplCPU });\nvar expm1Config2 = {\n kernelName: Expm1,\n backendName: \"webgl\",\n kernelFunc: expm13\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/fft_gpu.js\nvar FFTProgram = class {\n constructor(component, inputShape, inverse) {\n this.variableNames = [\"real\", \"imag\"];\n const innerDim = inputShape[1];\n this.outputShape = inputShape;\n const exponentMultiplierSnippet = inverse ? `2.0 * ${Math.PI}` : `-2.0 * ${Math.PI}`;\n const resultDenominator = inverse ? `${innerDim}.0` : \"1.0\";\n let opString;\n if (component === \"real\") {\n opString = \"return real * expR - imag * expI;\";\n } else if (component === \"imag\") {\n opString = \"return real * expI + imag * expR;\";\n } else {\n throw new Error(`FFT component must be either \"real\" or \"imag\", got ${component}.`);\n }\n this.userCode = `\n const float exponentMultiplier = ${exponentMultiplierSnippet};\n\n float unaryOpComplex(float real, float expR, float imag, float expI) {\n ${opString}\n }\n\n float mulMatDFT(int batch, int index) {\n float indexRatio = float(index) / float(${innerDim});\n float exponentMultiplierTimesIndexRatio =\n exponentMultiplier * indexRatio;\n\n float result = 0.0;\n\n for (int i = 0; i < ${innerDim}; i++) {\n // x = (-2|2 * PI / N) * index * i;\n float x = exponentMultiplierTimesIndexRatio * float(i);\n float expR = cos(x);\n float expI = sin(x);\n float real = getReal(batch, i);\n float imag = getImag(batch, i);\n\n result +=\n unaryOpComplex(real, expR, imag, expI) / ${resultDenominator};\n }\n\n return result;\n }\n\n void main() {\n ivec2 coords = getOutputCoords();\n setOutput(mulMatDFT(coords[0], coords[1]));\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/FFT_impl.js\nfunction fftImpl2(x, inverse, backend2) {\n const xData = backend2.texData.get(x.dataId);\n const inputSize = util_exports.sizeFromShape(x.shape);\n const innerDimensionSize = x.shape[x.shape.length - 1];\n const batch = inputSize / innerDimensionSize;\n const input2D = reshape4({ inputs: { x }, backend: backend2, attrs: { shape: [batch, innerDimensionSize] } });\n const xShape = input2D.shape;\n const realProgram = new FFTProgram(\"real\", xShape, inverse);\n const imagProgram = new FFTProgram(\"imag\", xShape, inverse);\n const inputs = [\n {\n dataId: xData.complexTensorInfos.real.dataId,\n dtype: xData.complexTensorInfos.real.dtype,\n shape: xShape\n },\n {\n dataId: xData.complexTensorInfos.imag.dataId,\n dtype: xData.complexTensorInfos.imag.dtype,\n shape: xShape\n }\n ];\n const realPart = backend2.runWebGLProgram(realProgram, inputs, \"float32\");\n const imagPart = backend2.runWebGLProgram(imagProgram, inputs, \"float32\");\n const complexOutput = complex3({ inputs: { real: realPart, imag: imagPart }, backend: backend2 });\n backend2.disposeIntermediateTensorInfo(realPart);\n backend2.disposeIntermediateTensorInfo(imagPart);\n const complexOutputReshaped = reshape4({ inputs: { x: complexOutput }, backend: backend2, attrs: { shape: x.shape } });\n backend2.disposeIntermediateTensorInfo(input2D);\n backend2.disposeIntermediateTensorInfo(complexOutput);\n return complexOutputReshaped;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/FFT.js\nfunction fft3(args) {\n const { inputs, backend: backend2 } = args;\n const { input: input2 } = inputs;\n return fftImpl2(input2, false, backend2);\n}\nvar fftConfig2 = {\n kernelName: FFT,\n backendName: \"webgl\",\n kernelFunc: fft3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/fill_gpu.js\nvar FillProgram = class {\n constructor(shape, value) {\n this.outputShape = [];\n this.customUniforms = [{ name: \"value\", type: \"float\" }];\n this.variableNames = [\"x\"];\n this.outputShape = shape;\n this.userCode = `\n void main() {\n // Input can be obtained from uniform value.\n setOutput(value);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Fill.js\nfunction fill3(args) {\n const { backend: backend2, attrs } = args;\n const { shape, value } = attrs;\n let { dtype } = attrs;\n dtype = dtype || util_exports.inferDtype(value);\n if (dtype === \"string\") {\n const values = util_exports.getArrayFromDType(dtype, util_exports.sizeFromShape(shape));\n values.fill(value);\n return backend2.makeTensorInfo(shape, dtype, values);\n } else {\n const program = new FillProgram(shape, value);\n const customValues = [[value]];\n return backend2.runWebGLProgram(program, [], dtype, customValues);\n }\n}\nvar fillConfig2 = {\n kernelName: Fill,\n backendName: \"webgl\",\n kernelFunc: fill3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/flip_left_right_gpu.js\nvar FlipLeftRightProgram = class {\n constructor(imageShape) {\n this.variableNames = [\"Image\"];\n this.outputShape = [];\n const imageWidth = imageShape[2];\n this.outputShape = imageShape;\n this.userCode = `\n void main() {\n ivec4 coords = getOutputCoords();\n int x = coords[2];\n\n int coordX = ${imageWidth} - x - 1;\n float outputValue;\n if(coordX >= 0 && coordX < ${imageWidth}) {\n outputValue = getImage(coords[0], coords[1], coordX, coords[3]);\n } else {\n outputValue = getImage(coords[0], coords[1], coords[2], coords[3]);\n }\n setOutput(outputValue);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/FlipLeftRight.js\nvar flipLeftRightConfig2 = {\n kernelName: FlipLeftRight,\n backendName: \"webgl\",\n kernelFunc: ({ inputs, backend: backend2 }) => {\n const { image: image2 } = inputs;\n const webglBackend = backend2;\n const program = new FlipLeftRightProgram(image2.shape);\n const output = webglBackend.runWebGLProgram(program, [image2], image2.dtype);\n return output;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Floor.js\nvar FLOOR = `return floor(x);`;\nvar floor3 = unaryKernelFunc2({ opSnippet: FLOOR, packedOpSnippet: FLOOR, cpuKernelImpl: floorImplCPU });\nvar floorConfig2 = {\n kernelName: Floor,\n backendName: \"webgl\",\n kernelFunc: floor3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/FloorDiv.js\nvar INT_DIV = `\n float s = sign(a) * sign(b);\n int ia = round(a);\n int ib = round(b);\n if (ib != 0) {\n // Windows (D3D) wants guaranteed non-zero int division at compile-time.\n return float(idiv(ia, ib, s));\n } else {\n return NAN;\n }\n`;\nvar INT_DIV_PACKED = `\n ivec4 ia = round(a);\n ivec4 ib = round(b);\n bvec4 cond = notEqual(ib, ivec4(0));\n ivec4 result = ivec4(0);\n vec4 s = sign(a) * sign(b);\n\n // Windows (D3D) wants guaranteed non-zero int division at compile-time.\n if (cond[0]) {\n result[0] = idiv(ia[0], ib[0], s[0]);\n }\n if (cond[1]) {\n result[1] = idiv(ia[1], ib[1], s[1]);\n }\n if (cond[2]) {\n result[2] = idiv(ia[2], ib[2], s[2]);\n }\n if (cond[3]) {\n result[3] = idiv(ia[3], ib[3], s[3]);\n }\n return vec4(result);\n`;\nvar floorDiv3 = binaryKernelFunc2({ opSnippet: INT_DIV, packedOpSnippet: INT_DIV_PACKED, dtype: \"int32\" });\nvar floorDivConfig2 = {\n kernelName: FloorDiv,\n backendName: \"webgl\",\n kernelFunc: floorDiv3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/FromPixels_utils/from_pixels_gpu.js\nvar FromPixelsProgram = class {\n constructor(outputShape) {\n this.variableNames = [\"A\"];\n const glsl = getGlslDifferences();\n const [height, width] = outputShape;\n this.outputShape = outputShape;\n this.userCode = `\n void main() {\n ivec3 coords = getOutputCoords();\n int texR = coords[0];\n int texC = coords[1];\n int depth = coords[2];\n vec2 uv = (vec2(texC, texR) + halfCR) / vec2(${width}.0, ${height}.0);\n\n vec4 values = ${glsl.texture2D}(A, uv);\n float value;\n if (depth == 0) {\n value = values.r;\n } else if (depth == 1) {\n value = values.g;\n } else if (depth == 2) {\n value = values.b;\n } else if (depth == 3) {\n value = values.a;\n }\n\n setOutput(floor(value * 255.0 + 0.5));\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/FromPixels_utils/from_pixels_packed_gpu.js\nvar FromPixelsPackedProgram = class {\n constructor(outputShape) {\n this.variableNames = [\"A\"];\n this.packedInputs = false;\n this.packedOutput = true;\n const glsl = getGlslDifferences();\n const [height, width] = outputShape;\n this.outputShape = outputShape;\n this.userCode = `\n void main() {\n ivec3 coords = getOutputCoords();\n int texR = coords[0];\n int texC = coords[1];\n int depth = coords[2];\n\n vec4 result = vec4(0.);\n\n for(int row=0; row<=1; row++) {\n for(int col=0; col<=1; col++) {\n texC = coords[1] + row;\n depth = coords[2] + col;\n\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2(${width}.0, ${height}.0);\n vec4 values = ${glsl.texture2D}(A, uv);\n float value;\n if (depth == 0) {\n value = values.r;\n } else if (depth == 1) {\n value = values.g;\n } else if (depth == 2) {\n value = values.b;\n } else if (depth == 3) {\n value = values.a;\n }\n\n result[row * 2 + col] = floor(value * 255.0 + 0.5);\n }\n }\n\n ${glsl.output} = result;\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/FromPixels.js\nvar fromPixelsConfig = {\n kernelName: FromPixels,\n backendName: \"webgl\",\n kernelFunc: fromPixels2\n};\nvar fromPixels2DContext2;\nvar willReadFrequently = env().getBool(\"CANVAS2D_WILL_READ_FREQUENTLY_FOR_GPU\");\nfunction fromPixels2(args) {\n const { inputs, backend: backend2, attrs } = args;\n let { pixels } = inputs;\n const { numChannels } = attrs;\n const isVideo = typeof HTMLVideoElement !== \"undefined\" && pixels instanceof HTMLVideoElement;\n const isImage = typeof HTMLImageElement !== \"undefined\" && pixels instanceof HTMLImageElement;\n const [width, height] = isVideo ? [\n pixels.videoWidth,\n pixels.videoHeight\n ] : [pixels.width, pixels.height];\n const texShape = [height, width];\n const outShape = [height, width, numChannels];\n if (isImage || isVideo) {\n const newWillReadFrequently = env().getBool(\"CANVAS2D_WILL_READ_FREQUENTLY_FOR_GPU\");\n if (fromPixels2DContext2 == null || newWillReadFrequently !== willReadFrequently) {\n willReadFrequently = newWillReadFrequently;\n fromPixels2DContext2 = document.createElement(\"canvas\").getContext(\"2d\", { willReadFrequently });\n }\n fromPixels2DContext2.canvas.width = width;\n fromPixels2DContext2.canvas.height = height;\n fromPixels2DContext2.drawImage(pixels, 0, 0, width, height);\n pixels = fromPixels2DContext2.canvas;\n }\n const tempPixelHandle = backend2.makeTensorInfo(texShape, \"int32\");\n backend2.texData.get(tempPixelHandle.dataId).usage = TextureUsage.PIXELS;\n backend2.gpgpu.uploadPixelDataToTexture(backend2.getTexture(tempPixelHandle.dataId), pixels);\n const program = env().getBool(\"WEBGL_PACK\") ? new FromPixelsPackedProgram(outShape) : new FromPixelsProgram(outShape);\n const res = backend2.runWebGLProgram(program, [tempPixelHandle], \"int32\");\n backend2.disposeData(tempPixelHandle.dataId);\n return res;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/FusedConv2D.js\nfunction fusedConv2d(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, filter, bias, preluActivationWeights } = inputs;\n const { strides, pad: pad3, dataFormat, dilations, dimRoundingMode, activation: activation2, leakyreluAlpha } = attrs;\n const $dataFormat = backend_util_exports.convertConv2DDataFormat(dataFormat);\n const convInfo = backend_util_exports.computeConv2DInfo(x.shape, filter.shape, strides, dilations, pad3, dimRoundingMode, false, $dataFormat);\n let out;\n const intermediates = [];\n const hasBias = bias != null;\n const hasPreluActivationWeights = preluActivationWeights != null;\n const hasLeakyreluAlpha = activation2 === \"leakyrelu\";\n const prepareInputs = () => {\n const inputs2 = [x, filter];\n const alignInputWithDataFormat = (input2, dataFormat2) => {\n if (dataFormat2 === \"NCHW\" && input2.shape.length === 1 && input2.shape[0] !== 1) {\n const alignedInput = reshape4({\n inputs: { x: input2 },\n backend: backend2,\n attrs: { shape: [input2.shape[0], 1, 1] }\n });\n intermediates.push(alignedInput);\n return alignedInput;\n }\n return input2;\n };\n if (hasBias) {\n inputs2.push(alignInputWithDataFormat(bias, dataFormat));\n }\n if (hasPreluActivationWeights) {\n inputs2.push(alignInputWithDataFormat(preluActivationWeights, dataFormat));\n }\n if (hasLeakyreluAlpha) {\n const $leakyreluAlpha = backend2.makeTensorInfo([], \"float32\", util_exports.createScalarValue(leakyreluAlpha, \"float32\"));\n inputs2.push($leakyreluAlpha);\n intermediates.push($leakyreluAlpha);\n }\n return inputs2;\n };\n if (convInfo.filterHeight === 1 && convInfo.filterWidth === 1 && convInfo.dilationHeight === 1 && convInfo.dilationWidth === 1 && convInfo.strideHeight === 1 && convInfo.strideWidth === 1 && (convInfo.padInfo.type === \"SAME\" || convInfo.padInfo.type === \"VALID\")) {\n out = conv2dByMatMul({\n x,\n filter,\n convInfo,\n backend: backend2,\n bias,\n activation: activation2,\n preluActivationWeights,\n leakyreluAlpha\n });\n } else if (convInfo.strideWidth <= 2 && $dataFormat === \"channelsLast\" && env().getBool(\"WEBGL_EXP_CONV\")) {\n const fusedActivation = activation2 ? mapActivationToShaderProgram(activation2, true) : null;\n const program = new Conv2DPackedProgram(convInfo, hasBias, fusedActivation, hasPreluActivationWeights, hasLeakyreluAlpha);\n const customValues = [\n [convInfo.padInfo.top, convInfo.padInfo.left],\n [convInfo.strideHeight, convInfo.strideWidth],\n [convInfo.dilationHeight, convInfo.dilationWidth],\n [convInfo.inHeight, convInfo.inWidth]\n ];\n const inputs2 = prepareInputs();\n out = backend2.runWebGLProgram(program, inputs2, \"float32\", customValues);\n } else if (env().getBool(\"WEBGL_CONV_IM2COL\")) {\n out = conv2dWithIm2Row({\n x,\n filter,\n convInfo,\n backend: backend2,\n bias,\n activation: activation2,\n preluActivationWeights,\n leakyreluAlpha\n });\n } else {\n const fusedActivation = activation2 ? mapActivationToShaderProgram(activation2, false) : null;\n const program = new Conv2DProgram(convInfo, hasBias, fusedActivation, hasPreluActivationWeights, hasLeakyreluAlpha);\n const inputs2 = prepareInputs();\n out = backend2.runWebGLProgram(program, inputs2, \"float32\");\n }\n const outReshaped = reshape4({ inputs: { x: out }, backend: backend2, attrs: { shape: convInfo.outShape } });\n intermediates.push(out);\n intermediates.forEach((t) => backend2.disposeIntermediateTensorInfo(t));\n return outReshaped;\n}\nvar fusedConv2DConfig2 = {\n kernelName: FusedConv2D,\n backendName: \"webgl\",\n kernelFunc: fusedConv2d\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/FusedDepthwiseConv2D.js\nfunction fusedDepthwiseConv2D2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, filter, bias, preluActivationWeights } = inputs;\n const { strides, pad: pad3, dilations, dimRoundingMode, activation: activation2, leakyreluAlpha } = attrs;\n const intermediates = [];\n let $dilations = dilations;\n if ($dilations == null) {\n $dilations = [1, 1];\n }\n util_exports.assert(backend_util_exports.eitherStridesOrDilationsAreOne(strides, $dilations), () => `Error in depthwiseConv2d: Either strides or dilations must be 1. Got strides ${strides} and dilations '${$dilations}'`);\n const convInfo = backend_util_exports.computeConv2DInfo(x.shape, filter.shape, strides, $dilations, pad3, dimRoundingMode, true);\n const shouldPackDepthwiseConv = env().getBool(\"WEBGL_PACK_DEPTHWISECONV\") && convInfo.strideWidth <= 2 && convInfo.outChannels / convInfo.inChannels === 1;\n const fusedActivation = activation2 ? mapActivationToShaderProgram(activation2, shouldPackDepthwiseConv) : null;\n const programInputs = [x, filter];\n const hasBias = bias != null;\n const hasPreluActivationWeights = preluActivationWeights != null;\n const hasLeakyreluAlpha = activation2 === \"leakyrelu\";\n if (hasBias) {\n programInputs.push(bias);\n }\n if (hasPreluActivationWeights) {\n programInputs.push(preluActivationWeights);\n }\n if (hasLeakyreluAlpha) {\n const $leakyreluAlpha = backend2.makeTensorInfo([], \"float32\", util_exports.createScalarValue(leakyreluAlpha, \"float32\"));\n programInputs.push($leakyreluAlpha);\n intermediates.push($leakyreluAlpha);\n }\n let program;\n if (shouldPackDepthwiseConv) {\n program = new DepthwiseConvPacked2DProgram(convInfo, hasBias, fusedActivation, hasPreluActivationWeights, hasLeakyreluAlpha);\n } else {\n program = new DepthwiseConv2DProgram(convInfo, hasBias, fusedActivation, hasPreluActivationWeights, hasLeakyreluAlpha);\n }\n const customValues = [\n [convInfo.padInfo.top, convInfo.padInfo.left],\n [convInfo.strideHeight, convInfo.strideWidth],\n [convInfo.dilationHeight, convInfo.dilationWidth],\n [convInfo.inHeight, convInfo.inWidth]\n ];\n const result = backend2.runWebGLProgram(program, programInputs, \"float32\", customValues);\n intermediates.forEach((t) => backend2.disposeIntermediateTensorInfo(t));\n return result;\n}\nvar fusedDepthwiseConv2DConfig2 = {\n kernelName: FusedDepthwiseConv2D,\n backendName: \"webgl\",\n kernelFunc: fusedDepthwiseConv2D2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/gather_nd_gpu.js\nvar GatherNDProgram = class {\n constructor(sliceDim, strides, shape, paramsShape) {\n this.sliceDim = sliceDim;\n this.strides = strides;\n this.paramsShape = paramsShape;\n this.variableNames = [\"x\", \"indices\"];\n this.outputShape = shape;\n const stridesType = getCoordsDataType(strides.length);\n const dtype = getCoordsDataType(shape.length);\n const strideString = this.sliceDim > 1 ? \"strides[j]\" : \"strides\";\n const paramsShapeType = getCoordsDataType(paramsShape.length);\n const paramsShapeString = paramsShape.length > 1 ? \"paramsShape[j]\" : \"paramsShape\";\n this.userCode = `\n ${stridesType} strides = ${stridesType}(${this.strides});\n ${paramsShapeType} paramsShape = ${paramsShapeType}(${this.paramsShape});\n void main() {\n ${dtype} coords = getOutputCoords();\n int flattenIndex = 0;\n bool out_of_bounds = false;\n for (int j = 0; j < ${this.sliceDim}; j++) {\n int index = round(getIndices(coords[0], j));\n out_of_bounds = out_of_bounds || index < 0;\n out_of_bounds = out_of_bounds || index >= ${paramsShapeString};\n flattenIndex += index * ${strideString};\n }\n setOutput(out_of_bounds ? 0.0 : getX(flattenIndex, coords[1]));\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/GatherNd.js\nfunction gatherNd2(args) {\n const { inputs, backend: backend2 } = args;\n const { params, indices } = inputs;\n const indicesShape = indices.shape;\n const sliceRank = indicesShape[indicesShape.length - 1];\n const paramsSize = util_exports.sizeFromShape(params.shape);\n const [resultShape, numSlices, sliceSize, strides] = backend_util_exports.prepareAndValidate(params, indices);\n const flattenIndices = reshape4({ inputs: { x: indices }, backend: backend2, attrs: { shape: [numSlices, sliceRank] } });\n const flattenX = reshape4({\n inputs: { x: params },\n backend: backend2,\n attrs: { shape: [util_exports.sizeFromShape(params.shape) / sliceSize, sliceSize] }\n });\n if (backend2.shouldExecuteOnCPU([params, indices]) || params.dtype === \"string\") {\n const indicesData = backend2.readSync(indices.dataId);\n const paramsBuf = backend2.bufferSync(params);\n const outValue = gatherNdImplCPU(indicesData, paramsBuf, params.dtype, numSlices, sliceRank, sliceSize, strides, params.shape, paramsSize);\n return backend2.makeTensorInfo(resultShape, params.dtype, outValue.values);\n }\n const program = new GatherNDProgram(sliceRank, strides, [numSlices, sliceSize], params.shape);\n const res = backend2.runWebGLProgram(program, [flattenX, flattenIndices], flattenX.dtype);\n const reshaped = reshape4({ inputs: { x: res }, backend: backend2, attrs: { shape: resultShape } });\n backend2.disposeIntermediateTensorInfo(flattenIndices);\n backend2.disposeIntermediateTensorInfo(flattenX);\n backend2.disposeIntermediateTensorInfo(res);\n return reshaped;\n}\nvar gatherNdConfig2 = {\n kernelName: GatherNd,\n backendName: \"webgl\",\n kernelFunc: gatherNd2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/gather_gpu.js\nvar GatherProgram = class {\n constructor(aShape, outputShape) {\n this.variableNames = [\"A\", \"indices\"];\n this.outputShape = outputShape;\n this.rank = outputShape.length;\n const dtype = getCoordsDataType(this.rank);\n const sourceCoords = getSourceCoords2(aShape, 2);\n this.userCode = `\n void main() {\n ${dtype} resRC = getOutputCoords();\n int index = int(getIndices(resRC.x, resRC.z));\n float inBounds = (index >= 0) && (index < ${aShape[2]}) ? 1.0 : 0.0;\n setOutput(inBounds * getA(${sourceCoords}));\n }\n `;\n }\n};\nfunction getSourceCoords2(aShape, axis) {\n const currentCoords = [\"resRC.x\", \"resRC.y\", \"resRC.z\", \"resRC.w\"];\n const sourceCoords = [];\n for (let i = 0; i < aShape.length; i++) {\n if (i === 2) {\n sourceCoords.push(\"index\");\n } else {\n sourceCoords.push(`${currentCoords[i]}`);\n }\n }\n return sourceCoords.join();\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/GatherV2.js\nfunction gatherV22(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, indices } = inputs;\n const { axis, batchDims } = attrs;\n const parsedAxis = util_exports.parseAxisParam(axis, x.shape)[0];\n if (env().get(\"DEBUG\")) {\n const indicesVals = backend2.readSync(indices.dataId);\n const axisDim = x.shape[parsedAxis];\n for (let i = 0; i < indicesVals.length; ++i) {\n const index = indicesVals[i];\n util_exports.assert(index <= axisDim - 1 && index >= 0, () => `GatherV2: the index value ${index} is not in [0, ${axisDim - 1}]`);\n }\n }\n const shapeInfo = backend_util_exports.segment_util.collectGatherOpShapeInfo(x, indices, parsedAxis, batchDims);\n const indicesSize = util_exports.sizeFromShape(indices.shape);\n const toDispose = [];\n const flattenX = reshape4({\n inputs: { x },\n backend: backend2,\n attrs: {\n shape: [\n shapeInfo.batchSize,\n shapeInfo.outerSize,\n shapeInfo.dimSize,\n shapeInfo.sliceSize\n ]\n }\n });\n const flattenIndex = reshape4({\n inputs: { x: indices },\n backend: backend2,\n attrs: { shape: [shapeInfo.batchSize, indicesSize / shapeInfo.batchSize] }\n });\n toDispose.push(flattenX);\n toDispose.push(flattenIndex);\n const flattenOutputShape = [\n shapeInfo.batchSize,\n shapeInfo.outerSize,\n indicesSize / shapeInfo.batchSize,\n shapeInfo.sliceSize\n ];\n if (backend2.shouldExecuteOnCPU([x, indices]) || x.dtype === \"string\") {\n const indicesBuf = backend2.bufferSync(flattenIndex);\n const xBuf = backend2.bufferSync(flattenX);\n const outBuf = gatherV2ImplCPU(xBuf, indicesBuf, flattenOutputShape);\n toDispose.forEach((t) => backend2.disposeIntermediateTensorInfo(t));\n return backend2.makeTensorInfo(shapeInfo.outputShape, outBuf.dtype, outBuf.values);\n }\n const program = new GatherProgram(flattenX.shape, flattenOutputShape);\n const res = backend2.runWebGLProgram(program, [flattenX, flattenIndex], flattenX.dtype);\n toDispose.push(res);\n const reshaped = reshape4({ inputs: { x: res }, backend: backend2, attrs: { shape: shapeInfo.outputShape } });\n toDispose.forEach((t) => backend2.disposeIntermediateTensorInfo(t));\n return reshaped;\n}\nvar gatherV2Config2 = {\n kernelName: GatherV2,\n backendName: \"webgl\",\n kernelFunc: gatherV22\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Greater.js\nvar GREATER = `return float(a > b);`;\nvar GREATER_PACKED = `\n return vec4(greaterThan(a, b));\n`;\nvar greater4 = binaryKernelFunc2({\n opSnippet: GREATER,\n packedOpSnippet: GREATER_PACKED,\n cpuKernelImpl: greaterImplCPU,\n dtype: \"bool\"\n});\nvar greaterConfig2 = {\n kernelName: Greater,\n backendName: \"webgl\",\n kernelFunc: greater4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/GreaterEqual.js\nvar GREATER_EQUAL = `return float(a >= b);`;\nvar GREATER_EQUAL_PACKED = `\n return vec4(greaterThanEqual(a, b));\n`;\nvar greaterEqual3 = binaryKernelFunc2({\n opSnippet: GREATER_EQUAL,\n packedOpSnippet: GREATER_EQUAL_PACKED,\n dtype: \"bool\",\n cpuKernelImpl: greaterEqualImplCPU\n});\nvar greaterEqualConfig2 = {\n kernelName: GreaterEqual,\n backendName: \"webgl\",\n kernelFunc: greaterEqual3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/IFFT.js\nfunction ifft3(args) {\n const { inputs, backend: backend2 } = args;\n const { input: input2 } = inputs;\n return fftImpl2(input2, true, backend2);\n}\nvar ifftConfig2 = {\n kernelName: IFFT,\n backendName: \"webgl\",\n kernelFunc: ifft3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/IsFinite.js\nvar IS_FINITE = `return float(!isnan(x) && !isinf(x));`;\nvar isFinite4 = unaryKernelFunc2({ opSnippet: IS_FINITE, dtype: \"bool\" });\nvar isFiniteConfig2 = {\n kernelName: IsFinite,\n backendName: \"webgl\",\n kernelFunc: isFinite4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/IsInf.js\nvar IS_INF = `return float(isinf(x));`;\nvar isInf3 = unaryKernelFunc2({ opSnippet: IS_INF, dtype: \"bool\" });\nvar isInfConfig2 = {\n kernelName: IsInf,\n backendName: \"webgl\",\n kernelFunc: isInf3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/IsNaN.js\nvar IS_NAN = `return float(isnan(x));`;\nvar isNaN4 = unaryKernelFunc2({ opSnippet: IS_NAN, dtype: \"bool\" });\nvar isNaNConfig2 = {\n kernelName: IsNan,\n backendName: \"webgl\",\n kernelFunc: isNaN4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Less.js\nvar LESS = `return float(a < b);`;\nvar LESS_PACKED = `\n return vec4(lessThan(a, b));\n`;\nvar less4 = binaryKernelFunc2({\n opSnippet: LESS,\n packedOpSnippet: LESS_PACKED,\n cpuKernelImpl: lessImplCPU,\n dtype: \"bool\"\n});\nvar lessConfig2 = {\n kernelName: Less,\n backendName: \"webgl\",\n kernelFunc: less4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/LessEqual.js\nvar LESS_EQUAL = `return float(a <= b);`;\nvar LESS_EQUAL_PACKED = `\n return vec4(lessThanEqual(a, b));\n`;\nvar lessEqual3 = binaryKernelFunc2({\n opSnippet: LESS_EQUAL,\n packedOpSnippet: LESS_EQUAL_PACKED,\n cpuKernelImpl: lessEqualImplCPU,\n dtype: \"bool\"\n});\nvar lessEqualConfig2 = {\n kernelName: LessEqual,\n backendName: \"webgl\",\n kernelFunc: lessEqual3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/LinSpace.js\nfunction linSpace2(args) {\n const { backend: backend2, attrs } = args;\n const { start, stop, num } = attrs;\n const outVals = linSpaceImplCPU(start, stop, num);\n return backend2.makeTensorInfo([outVals.length], \"float32\", outVals);\n}\nvar linSpaceConfig2 = {\n kernelName: LinSpace,\n backendName: \"webgl\",\n kernelFunc: linSpace2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Log.js\nvar LOG = CHECK_NAN_SNIPPET_UNARY + `\n return x < 0.0 ? 0./0. : log(x);\n`;\nvar LOG_PACKED = `\n vec4 result = log(x);\n bvec4 isNaN = isnan(x);\n result.r = isNaN.r ? x.r : (x.r < 0.0 ? 0./0. : result.r);\n result.g = isNaN.g ? x.g : (x.g < 0.0 ? 0./0. : result.g);\n result.b = isNaN.b ? x.b : (x.b < 0.0 ? 0./0. : result.b);\n result.a = isNaN.a ? x.a : (x.a < 0.0 ? 0./0. : result.a);\n return result;\n`;\nvar log4 = unaryKernelFunc2({ opSnippet: LOG, packedOpSnippet: LOG_PACKED, cpuKernelImpl: logImplCPU });\nvar logConfig2 = {\n kernelName: Log,\n backendName: \"webgl\",\n kernelFunc: log4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Log1p.js\nvar LOG1P = CHECK_NAN_SNIPPET_UNARY + `\n return log(1.0 + x);\n`;\nvar log1p3 = unaryKernelFunc2({ opSnippet: LOG1P });\nvar log1pConfig2 = {\n kernelName: Log1p,\n backendName: \"webgl\",\n kernelFunc: log1p3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/LogicalAnd.js\nvar LOGICAL_AND = `return float(a >= 1.0 && b >= 1.0);`;\nvar LOGICAL_AND_PACKED = `\n return vec4(\n vec4(greaterThanEqual(a, vec4(1.0))) *\n vec4(greaterThanEqual(b, vec4(1.0))));\n`;\nvar logicalAnd3 = binaryKernelFunc2({\n opSnippet: LOGICAL_AND,\n packedOpSnippet: LOGICAL_AND_PACKED,\n dtype: \"bool\"\n});\nvar logicalAndConfig2 = {\n kernelName: LogicalAnd,\n backendName: \"webgl\",\n kernelFunc: logicalAnd3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/LogicalNot.js\nvar LOGICAL_NOT = `return float(!(x >= 1.0));`;\nvar logicalNot3 = unaryKernelFunc2({ opSnippet: LOGICAL_NOT });\nvar logicalNotConfig2 = {\n kernelName: LogicalNot,\n backendName: \"webgl\",\n kernelFunc: logicalNot3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/LogicalOr.js\nvar LOGICAL_OR = `return float(a >= 1.0 || b >= 1.0);`;\nvar LOGICAL_OR_PACKED = `\n return min(\n vec4(greaterThanEqual(a, vec4(1.0))) +\n vec4(greaterThanEqual(b, vec4(1.0))),\n vec4(1.0));\n`;\nvar logicalOr3 = binaryKernelFunc2({ opSnippet: LOGICAL_OR, packedOpSnippet: LOGICAL_OR_PACKED, dtype: \"bool\" });\nvar logicalOrConfig2 = {\n kernelName: LogicalOr,\n backendName: \"webgl\",\n kernelFunc: logicalOr3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/lrn_gpu.js\nvar LRNProgram = class {\n constructor(xShape, radius, bias, alpha, beta) {\n this.variableNames = [\"x\"];\n this.outputShape = [];\n const rad = radius;\n const maxD = xShape[3] - 1;\n this.outputShape = xShape;\n let powOperator;\n const basis = `float(${bias}) + float(${alpha}) * sum`;\n if (beta === 0.5) {\n powOperator = `inversesqrt(${basis})`;\n } else if (beta === 1) {\n powOperator = `1.0/(${basis})`;\n } else {\n powOperator = `exp(log(${basis}) * float(-${beta}));`;\n }\n this.userCode = `\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int r = coords[1];\n int c = coords[2];\n int d = coords[3];\n float x = getX(b, r, c, d);\n float sum = 0.0;\n for (int j = -${rad}; j <= ${rad}; j++) {\n int idx = d + j;\n if (idx >= 0 && idx <= ${maxD}) {\n float z = getX(b, r, c, idx);\n sum += z * z;\n }\n }\n float val = x * ${powOperator};\n setOutput(val);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/lrn_packed_gpu.js\nvar LRNPackedProgram = class {\n constructor(xShape, radius, bias, alpha, beta) {\n this.variableNames = [\"x\"];\n this.outputShape = [];\n this.packedInputs = true;\n this.packedOutput = true;\n const rad = radius;\n const maxD = xShape[3] - 1;\n this.outputShape = xShape;\n let powOperator;\n const basis = `float(${bias}) + float(${alpha}) * sum`;\n if (beta === 0.5) {\n powOperator = `inversesqrt(${basis})`;\n } else if (beta === 1) {\n powOperator = `1.0/(${basis})`;\n } else {\n powOperator = `exp(log(${basis}) * float(-${beta}));`;\n }\n this.userCode = `\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords.x;\n int r = coords.y;\n int c = coords.z;\n int d = coords.w;\n\n bool hasNextCol = d < ${this.outputShape[3]};\n bool hasNextRow = c < ${this.outputShape[2]};\n\n vec4 sum = vec4(0.);\n vec4 xFragAtOutputCoords = getX(b, r, c, d);\n\n vec4 xAtOutputCoords = vec4(\n getChannel(xFragAtOutputCoords, vec2(c, d)),\n hasNextCol ?\n getChannel(xFragAtOutputCoords, vec2(c, d + 1)) : 0.0,\n hasNextRow ?\n getChannel(xFragAtOutputCoords , vec2(c + 1, d)) : 0.0,\n (hasNextRow && hasNextCol) ?\n getChannel(xFragAtOutputCoords, vec2(c + 1, d + 1)) : 0.0\n );\n\n int firstChannel = d - ${rad};\n vec2 cache = vec2(0.);\n if(firstChannel >= 0){\n vec4 firstChannelFrag = getX(b, r, c, firstChannel);\n cache.x = getChannel(firstChannelFrag, vec2(c, firstChannel));\n if(hasNextRow){\n cache.y = getChannel(firstChannelFrag, vec2(c + 1, firstChannel));\n }\n }\n\n ivec2 depth = ivec2(d, d + 1);\n for (int j = - ${rad}; j <= ${rad}; j++) {\n ivec2 idx = depth + j;\n bvec2 aboveLowerBound = greaterThanEqual(idx, ivec2(0));\n bvec2 belowUpperBound = lessThanEqual(idx, ivec2(${maxD}));\n\n bool depthInRange = aboveLowerBound.x && belowUpperBound.x;\n bool depthPlusOneInRange = aboveLowerBound.y && belowUpperBound.y;\n\n if(depthInRange || depthPlusOneInRange){\n vec4 z = vec4(0.);\n vec4 xFragAtCurrentDepth;\n z.xz = cache.xy;\n if(depthPlusOneInRange && hasNextCol){\n xFragAtCurrentDepth = idx.y != d ?\n getX(b, r, c, idx.y) : xFragAtOutputCoords;\n z.y = getChannel(xFragAtCurrentDepth, vec2(c, idx.y));\n if(hasNextRow){\n z.w = getChannel(xFragAtCurrentDepth, vec2(c + 1, idx.y));\n }\n }\n cache.xy = z.yw;\n sum += z * z;\n }\n }\n vec4 result = xAtOutputCoords * ${powOperator};\n setOutput(result);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/LRN.js\nvar lrn = (args) => {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { depthRadius, bias, alpha, beta } = attrs;\n const program = env().getBool(\"WEBGL_PACK_NORMALIZATION\") ? new LRNPackedProgram(x.shape, depthRadius, bias, alpha, beta) : new LRNProgram(x.shape, depthRadius, bias, alpha, beta);\n return backend2.runWebGLProgram(program, [x], x.dtype);\n};\nvar LRNConfig2 = {\n kernelName: LRN,\n backendName: \"webgl\",\n kernelFunc: lrn\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/lrn_grad_gpu.js\nvar LRNGradProgram = class {\n constructor(inputShape, depthRadius, bias, alpha, beta) {\n this.variableNames = [\"inputImage\", \"outputImage\", \"dy\"];\n this.outputShape = [];\n this.outputShape = inputShape;\n this.depth = inputShape[3];\n this.depthRadius = depthRadius;\n this.bias = bias;\n this.alpha = alpha;\n this.beta = beta;\n this.userCode = `\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int r = coords[1];\n int c = coords[2];\n\n float result = 0.0;\n for (int d = 0; d < ${this.depth}; ++d) {\n int depthBegin = int(max(0.0, float(d - ${depthRadius})));\n int depthEnd = int(min(float(${this.depth}),\n float(d + ${depthRadius} + 1)));\n\n const int MIN_DEPTH_BEGIN = 0;\n const int MAX_DEPTH_END = ${this.depth};\n\n float norm = 0.0;\n for (int k = MIN_DEPTH_BEGIN; k < MAX_DEPTH_END; ++k) {\n if (k < depthBegin){\n continue;\n }\n else if (k >= depthBegin && k < depthEnd) {\n norm += getInputImage(b, r, c, k) * getInputImage(b, r, c, k);\n }\n else {\n break;\n }\n }\n\n norm = float(${alpha}) * norm + float(${bias});\n\n for(int k = MIN_DEPTH_BEGIN; k < MAX_DEPTH_END; ++k){\n if (k < depthBegin){\n continue;\n }\n else if (k >= depthBegin && k < depthEnd){\n float dyi = -2.0 * float(${alpha})\n * float(${beta})\n * getInputImage(b ,r ,c, k) * getOutputImage(b, r, c, d)\n / norm;\n if (k == d) {\n dyi += pow(norm, -1.0 * ${beta});\n }\n if (k == coords[3]) {\n dyi *= getDy(b, r, c, d);\n result += dyi;\n }\n }\n else {\n break;\n }\n }\n }\n setOutput(result);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/LRNGrad.js\nvar lrnGrad = (args) => {\n const { inputs, backend: backend2, attrs } = args;\n const { x, y, dy } = inputs;\n const { depthRadius, bias, alpha, beta } = attrs;\n const program = new LRNGradProgram(x.shape, depthRadius, bias, alpha, beta);\n return backend2.runWebGLProgram(program, [x, y, dy], x.dtype);\n};\nvar LRNGradConfig2 = {\n kernelName: LRNGrad,\n backendName: \"webgl\",\n kernelFunc: lrnGrad\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Max_impl.js\nfunction maxImpl2(x, reduceShape, outShape, backend2) {\n const inSize = util_exports.sizeFromShape(reduceShape);\n const xSize = util_exports.sizeFromShape(x.shape);\n const batchSize = xSize / inSize;\n const reshapedInput = reshape4({ inputs: { x }, attrs: { shape: [batchSize, inSize] }, backend: backend2 });\n const reduced = reduce(reshapedInput, x.dtype, \"max\", backend2);\n const reshapedOutput = reshape4({ inputs: { x: reduced }, attrs: { shape: outShape }, backend: backend2 });\n backend2.disposeIntermediateTensorInfo(reshapedInput);\n backend2.disposeIntermediateTensorInfo(reduced);\n return reshapedOutput;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Max.js\nfunction max4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { reductionIndices, keepDims } = attrs;\n const xRank = x.shape.length;\n const origAxes = util_exports.parseAxisParam(reductionIndices, x.shape);\n let axes = origAxes;\n const permutedAxes = backend_util_exports.getAxesPermutation(axes, xRank);\n const maxInputIsTransposed = permutedAxes != null;\n const shouldExecuteOnCPU = backend2.shouldExecuteOnCPU([x]);\n let maxInput = x;\n if (maxInputIsTransposed) {\n if (shouldExecuteOnCPU) {\n const xTexData = backend2.texData.get(maxInput.dataId);\n const values = xTexData.values;\n const newShape = new Array(xRank);\n for (let i = 0; i < newShape.length; i++) {\n newShape[i] = x.shape[permutedAxes[i]];\n }\n const maxInputValues = transposeImplCPU(values, x.shape, x.dtype, permutedAxes, newShape);\n maxInput = backend2.makeTensorInfo(newShape, x.dtype);\n const maxInputData = backend2.texData.get(maxInput.dataId);\n maxInputData.values = maxInputValues;\n } else {\n maxInput = transposeImpl2(x, permutedAxes, backend2);\n }\n axes = backend_util_exports.getInnerMostAxes(axes.length, xRank);\n }\n backend_util_exports.assertAxesAreInnerMostDims(\"max\", axes, xRank);\n const [maxOutShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes(maxInput.shape, axes);\n let outShape = maxOutShape;\n if (keepDims) {\n outShape = backend_util_exports.expandShapeToKeepDim(maxOutShape, origAxes);\n }\n let out;\n if (shouldExecuteOnCPU) {\n const xTexData = backend2.texData.get(maxInput.dataId);\n const values = xTexData.values;\n const outValues = maxImplCPU(values, util_exports.sizeFromShape(reduceShape), outShape, x.dtype);\n out = backend2.makeTensorInfo(outShape, x.dtype);\n const outData = backend2.texData.get(out.dataId);\n outData.values = outValues;\n } else {\n out = maxImpl2(maxInput, reduceShape, outShape, backend2);\n }\n if (maxInputIsTransposed) {\n backend2.disposeIntermediateTensorInfo(maxInput);\n }\n return out;\n}\nvar maxConfig2 = {\n kernelName: Max,\n backendName: \"webgl\",\n kernelFunc: max4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Maximum.js\nvar MAXIMUM = CHECK_NAN_SNIPPET2 + `\n return max(a, b);\n`;\nvar MAXIMUM_PACKED = `\n vec4 result = vec4(max(a, b));\n vec4 isNaN = min(vec4(isnan(a)) + vec4(isnan(b)), vec4(1.0));\n ` + CHECK_NAN_SNIPPET3 + `\n return result;\n`;\nvar maximum4 = binaryKernelFunc2({\n opSnippet: MAXIMUM,\n packedOpSnippet: MAXIMUM_PACKED,\n cpuKernelImpl: maximumImplCPU\n});\nvar maximumConfig2 = {\n kernelName: Maximum,\n backendName: \"webgl\",\n kernelFunc: maximum4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/MaxPool.js\nfunction maxPool3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n assertNotComplex2(x, \"maxPool\");\n const { filterSize, strides, pad: pad3, dimRoundingMode } = attrs;\n const dilations = 1;\n util_exports.assert(backend_util_exports.eitherStridesOrDilationsAreOne(strides, dilations), () => `Error in maxPool: Either strides or dilations must be 1. Got strides ${strides} and dilations '${dilations}'`);\n const convInfo = backend_util_exports.computePool2DInfo(x.shape, filterSize, strides, dilations, pad3, dimRoundingMode);\n if (convInfo.filterWidth === 1 && convInfo.filterHeight === 1 && util_exports.arraysEqual(convInfo.inShape, convInfo.outShape)) {\n return identity3({ inputs: { x }, backend: backend2 });\n }\n const maxPoolProgram = new Pool2DProgram(convInfo, \"max\", false);\n return backend2.runWebGLProgram(maxPoolProgram, [x], x.dtype);\n}\nvar maxPoolConfig2 = {\n kernelName: MaxPool,\n backendName: \"webgl\",\n kernelFunc: maxPool3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/MaxPool3D.js\nfunction maxPool3d2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { filterSize, strides, pad: pad3, dataFormat, dimRoundingMode } = attrs;\n const dilations = [1, 1, 1];\n const convInfo = backend_util_exports.computePool3DInfo(x.shape, filterSize, strides, dilations, pad3, dimRoundingMode, dataFormat);\n const maxPoolProgram = new Pool3DProgram(convInfo, \"max\", false);\n return backend2.runWebGLProgram(maxPoolProgram, [x], x.dtype);\n}\nvar maxPool3DConfig2 = {\n kernelName: MaxPool3D,\n backendName: \"webgl\",\n kernelFunc: maxPool3d2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/max_pool_backprop_gpu.js\nvar MaxPool2DBackpropProgram = class {\n constructor(convInfo) {\n this.variableNames = [\"dy\", \"maxPos\"];\n this.outputShape = convInfo.inShape;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const dilationHeight = convInfo.dilationHeight;\n const effectiveFilterHeight = convInfo.effectiveFilterHeight;\n const effectiveFilterWidth = convInfo.effectiveFilterWidth;\n const padTop = effectiveFilterHeight - 1 - convInfo.padInfo.top;\n const padLeft = effectiveFilterWidth - 1 - convInfo.padInfo.left;\n const lastIndex = effectiveFilterHeight * effectiveFilterWidth - 1;\n this.userCode = `\n const ivec2 pads = ivec2(${padTop}, ${padLeft});\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n\n ivec2 dyRCCorner = coords.yz - pads;\n int dyRCorner = dyRCCorner.x;\n int dyCCorner = dyRCCorner.y;\n\n // Convolve dy(?, ?, d) with pos mask(:, :, d) to get dx(xR, xC, d).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n for (int wR = 0; wR < ${effectiveFilterHeight};\n wR += ${dilationHeight}) {\n float dyR = float(dyRCorner + wR) / ${strideHeight}.0;\n\n if (dyR < 0.0 || dyR >= ${convInfo.outHeight}.0 || fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n for (int wC = 0; wC < ${effectiveFilterWidth}; wC++) {\n float dyC = float(dyCCorner + wC) / ${strideWidth}.0;\n\n if (dyC < 0.0 || dyC >= ${convInfo.outWidth}.0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n float dyValue = getDy(b, idyR, idyC, d);\n int maxPosValue = ${lastIndex} - int(getMaxPos(b, idyR, idyC, d));\n\n // Get the current value, check it against the value from the\n // position matrix.\n int curPosValue = wR * ${effectiveFilterWidth} + wC;\n float mask = float(maxPosValue == curPosValue ? 1.0 : 0.0);\n\n dotProd += dyValue * mask;\n }\n }\n setOutput(dotProd);\n }\n `;\n }\n};\nvar MaxPool3DBackpropProgram = class {\n constructor(convInfo) {\n this.variableNames = [\"dy\", \"maxPos\"];\n this.outputShape = convInfo.inShape;\n const strideDepth = convInfo.strideDepth;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const dilationDepth = convInfo.dilationDepth;\n const dilationHeight = convInfo.dilationHeight;\n const dilationWidth = convInfo.dilationWidth;\n const effectiveFilterDepth = convInfo.effectiveFilterDepth;\n const effectiveFilterHeight = convInfo.effectiveFilterHeight;\n const effectiveFilterWidth = convInfo.effectiveFilterWidth;\n const padFront = effectiveFilterDepth - 1 - convInfo.padInfo.front;\n const padTop = effectiveFilterHeight - 1 - convInfo.padInfo.top;\n const padLeft = effectiveFilterWidth - 1 - convInfo.padInfo.left;\n const lastIndex = effectiveFilterDepth * effectiveFilterHeight * effectiveFilterWidth - 1;\n this.userCode = `\n const ivec3 pads = ivec3(${padFront}, ${padTop}, ${padLeft});\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int ch = coords.u;\n\n ivec3 dyCorner = ivec3(coords.y, coords.z, coords.w) - pads;\n int dyDCorner = dyCorner.x;\n int dyRCorner = dyCorner.y;\n int dyCCorner = dyCorner.z;\n\n // Convolve dy(?, ?, ?, ch) with pos mask(:, :, :, d) to get\n // dx(xD, xR, xC, ch).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n\n for (int wD = 0; wD < ${effectiveFilterDepth};\n wD += ${dilationDepth}) {\n float dyD = float(dyDCorner + wD) / ${strideDepth}.0;\n\n if (dyD < 0.0 || dyD >= ${convInfo.outDepth}.0 || fract(dyD) > 0.0) {\n continue;\n }\n int idyD = int(dyD);\n\n for (int wR = 0; wR < ${effectiveFilterHeight};\n wR += ${dilationHeight}) {\n float dyR = float(dyRCorner + wR) / ${strideHeight}.0;\n\n if (dyR < 0.0 || dyR >= ${convInfo.outHeight}.0 ||\n fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n for (int wC = 0; wC < ${effectiveFilterWidth};\n wC += ${dilationWidth}) {\n float dyC = float(dyCCorner + wC) / ${strideWidth}.0;\n\n if (dyC < 0.0 || dyC >= ${convInfo.outWidth}.0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n float dyValue = getDy(batch, idyD, idyR, idyC, ch);\n int maxPosValue = ${lastIndex} -\n int(getMaxPos(batch, idyD, idyR, idyC, ch));\n\n // Get the current value, check it against the value from the\n // position matrix.\n int curPosValue =\n wD * ${effectiveFilterHeight} * ${effectiveFilterWidth} +\n wR * ${effectiveFilterWidth} + wC;\n float mask = float(maxPosValue == curPosValue ? 1.0 : 0.0);\n\n dotProd += dyValue * mask;\n }\n }\n }\n setOutput(dotProd);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/MaxPool3DGrad.js\nfunction maxPool3DGrad2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { dy, input: input2 } = inputs;\n const x = input2;\n const { filterSize, strides, pad: pad3, dimRoundingMode } = attrs;\n const dilations = [1, 1, 1];\n const convInfo = backend_util_exports.computePool3DInfo(x.shape, filterSize, strides, dilations, pad3, dimRoundingMode);\n const maxPool3dPositionsProgram = new Pool3DProgram(convInfo, \"max\", true);\n const maxPool3dPositions2 = backend2.runWebGLProgram(maxPool3dPositionsProgram, [x], x.dtype);\n const maxPoolBackpropProgram = new MaxPool3DBackpropProgram(convInfo);\n const result = backend2.runWebGLProgram(maxPoolBackpropProgram, [dy, maxPool3dPositions2], x.dtype);\n backend2.disposeIntermediateTensorInfo(maxPool3dPositions2);\n return result;\n}\nvar maxPool3DGradConfig3 = {\n kernelName: MaxPool3DGrad,\n backendName: \"webgl\",\n kernelFunc: maxPool3DGrad2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/MaxPoolGrad.js\nfunction maxPoolGrad3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { dy, input: input2, output } = inputs;\n const x = input2;\n assertNotComplex2([input2, output], \"maxPoolGrad\");\n const { filterSize, strides, pad: pad3, dimRoundingMode } = attrs;\n const convInfo = backend_util_exports.computePool2DInfo(x.shape, filterSize, strides, 1, pad3, dimRoundingMode);\n const getPositions = true;\n const maxPoolPositionsProgram = new Pool2DProgram(convInfo, \"max\", getPositions);\n const maxPoolPositions2 = backend2.runWebGLProgram(maxPoolPositionsProgram, [x], x.dtype);\n const maxPoolBackPropProgram = new MaxPool2DBackpropProgram(convInfo);\n const result = backend2.runWebGLProgram(maxPoolBackPropProgram, [dy, maxPoolPositions2], x.dtype);\n backend2.disposeIntermediateTensorInfo(maxPoolPositions2);\n return result;\n}\nvar maxPoolGradConfig3 = {\n kernelName: MaxPoolGrad,\n backendName: \"webgl\",\n kernelFunc: maxPoolGrad3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/MaxPoolWithArgmax_impl.js\nfunction maxPoolWithArgmaxImpl2(x, includeBatchInIndex, convInfo, backend2) {\n let program = new Pool2DProgram(convInfo, \"max\", false);\n const poolOutput = backend2.runWebGLProgram(program, [x], \"float32\");\n program = new Pool2DProgram(convInfo, \"max\", true, true, includeBatchInIndex);\n const indexOutput = backend2.runWebGLProgram(program, [x], \"float32\");\n return [poolOutput, indexOutput];\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/MaxPoolWithArgmax.js\nvar maxPoolWithArgmaxConfig2 = {\n kernelName: MaxPoolWithArgmax,\n backendName: \"webgl\",\n kernelFunc: ({ inputs, attrs, backend: backend2 }) => {\n const { x } = inputs;\n const { filterSize, strides, pad: pad3, includeBatchInIndex } = attrs;\n const webglBackend = backend2;\n util_exports.assert(x.shape.length === 4, () => `Error in maxPool: input must be rank 4 but got rank ${x.shape.length}.`);\n const dilations = [1, 1];\n util_exports.assert(backend_util_exports.eitherStridesOrDilationsAreOne(strides, dilations), () => `Error in maxPool: Either strides or dilations must be 1. Got strides ${strides} and dilations '${dilations}'`);\n const convInfo = backend_util_exports.computePool2DInfo(x.shape, filterSize, strides, dilations, pad3);\n const [result, indexes] = maxPoolWithArgmaxImpl2(x, includeBatchInIndex, convInfo, webglBackend);\n return [result, indexes];\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Mean_impl.js\nfunction meanImpl(x, reduceShape, outShape, backend2) {\n const inSize = util_exports.sizeFromShape(reduceShape);\n const xSize = util_exports.sizeFromShape(x.shape);\n const batchSize = xSize / inSize;\n const reshapedInput = reshape4({ inputs: { x }, attrs: { shape: [batchSize, inSize] }, backend: backend2 });\n const reduced = reduce(reshapedInput, \"float32\", \"mean\", backend2);\n const reshapedOutput = reshape4({ inputs: { x: reduced }, attrs: { shape: outShape }, backend: backend2 });\n backend2.disposeIntermediateTensorInfo(reshapedInput);\n backend2.disposeIntermediateTensorInfo(reduced);\n return reshapedOutput;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Mean.js\nvar meanConfig2 = {\n kernelName: Mean,\n backendName: \"webgl\",\n kernelFunc: ({ inputs, attrs, backend: backend2 }) => {\n const { x } = inputs;\n const { keepDims, axis } = attrs;\n const webglBackend = backend2;\n const xRank = x.shape.length;\n const origAxes = util_exports.parseAxisParam(axis, x.shape);\n let axes = origAxes;\n const permutedAxes = backend_util_exports.getAxesPermutation(axes, xRank);\n const meanInputIsTransposed = permutedAxes != null;\n const shouldExecuteOnCPU = webglBackend.shouldExecuteOnCPU([x]);\n const intermediates = [];\n let meanInput = x;\n if (meanInputIsTransposed) {\n if (shouldExecuteOnCPU) {\n const xTexData = webglBackend.texData.get(meanInput.dataId);\n const values = xTexData.values;\n const newShape = new Array(xRank);\n for (let i = 0; i < newShape.length; i++) {\n newShape[i] = x.shape[permutedAxes[i]];\n }\n const meanInputValues = transposeImplCPU(values, x.shape, x.dtype, permutedAxes, newShape);\n meanInput = webglBackend.makeTensorInfo(newShape, x.dtype);\n const meanInputData = webglBackend.texData.get(meanInput.dataId);\n meanInputData.values = meanInputValues;\n } else {\n meanInput = transposeImpl2(x, permutedAxes, webglBackend);\n }\n intermediates.push(meanInput);\n axes = backend_util_exports.getInnerMostAxes(axes.length, xRank);\n }\n backend_util_exports.assertAxesAreInnerMostDims(\"sum\", axes, xRank);\n const [meanOutShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes(meanInput.shape, axes);\n let outShape = meanOutShape;\n if (keepDims) {\n outShape = backend_util_exports.expandShapeToKeepDim(meanOutShape, origAxes);\n }\n const out = meanImpl(meanInput, reduceShape, outShape, webglBackend);\n for (const i of intermediates) {\n webglBackend.disposeIntermediateTensorInfo(i);\n }\n return out;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Min.js\nfunction min4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis, keepDims } = attrs;\n const xRank = x.shape.length;\n const origAxes = util_exports.parseAxisParam(axis, x.shape);\n let axes = origAxes;\n const permutedAxes = backend_util_exports.getAxesPermutation(axes, xRank);\n let permutedX = x;\n if (permutedAxes != null) {\n permutedX = transpose3({ inputs: { x }, backend: backend2, attrs: { perm: permutedAxes } });\n axes = backend_util_exports.getInnerMostAxes(axes.length, x.shape.length);\n }\n backend_util_exports.assertAxesAreInnerMostDims(\"min\", axes, xRank);\n const [outShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes(permutedX.shape, axes);\n const inSize = util_exports.sizeFromShape(reduceShape);\n const a2D = reshape4({ inputs: { x: permutedX }, backend: backend2, attrs: { shape: [-1, inSize] } });\n const reduced = reduce(a2D, a2D.dtype, \"min\", backend2);\n let res;\n if (keepDims) {\n const newShape = backend_util_exports.expandShapeToKeepDim(outShape, origAxes);\n res = reshape4({ inputs: { x: reduced }, backend: backend2, attrs: { shape: newShape } });\n } else {\n res = reshape4({ inputs: { x: reduced }, backend: backend2, attrs: { shape: outShape } });\n }\n backend2.disposeIntermediateTensorInfo(a2D);\n backend2.disposeIntermediateTensorInfo(reduced);\n if (permutedAxes != null) {\n backend2.disposeIntermediateTensorInfo(permutedX);\n }\n return res;\n}\nvar minConfig2 = {\n kernelName: Min,\n backendName: \"webgl\",\n kernelFunc: min4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Minimum.js\nvar MINIMUM = CHECK_NAN_SNIPPET2 + `\n return min(a, b);\n`;\nvar MINIMUM_PACKED = `\n vec4 result = vec4(min(a, b));\n vec4 isNaN = min(vec4(isnan(a)) + vec4(isnan(b)), vec4(1.0));\n ` + CHECK_NAN_SNIPPET3 + `\n return result;\n`;\nvar minimum4 = binaryKernelFunc2({\n opSnippet: MINIMUM,\n packedOpSnippet: MINIMUM_PACKED,\n cpuKernelImpl: minimumImplCPU\n});\nvar minimumConfig2 = {\n kernelName: Minimum,\n backendName: \"webgl\",\n kernelFunc: minimum4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/mirror_pad_gpu.js\nvar MirrorPadProgram = class {\n constructor(xShape, paddings, mode) {\n this.variableNames = [\"x\"];\n this.outputShape = paddings.map((p2, i) => p2[0] + xShape[i] + p2[1]);\n const rank = xShape.length;\n const dtype = getCoordsDataType(rank);\n const start = paddings.map((p2) => p2[0]).join(\",\");\n const end = paddings.map((p2, i) => p2[0] + xShape[i]).join(\",\");\n const unpackedCoords = [\"coords[0]\", \"coords[1]\", \"coords[2]\", \"coords[3]\"].slice(0, rank);\n const offset = mode === \"reflect\" ? 0 : 1;\n if (rank === 1) {\n this.userCode = `\n int start = ${start};\n int end = ${end};\n\n void main() {\n int outC = getOutputCoords();\n if (outC < start) {\n outC = start * 2 - outC - ${offset};\n } else if(outC >= end) {\n outC = (end - 1) * 2 - outC + ${offset};\n }\n setOutput(getX(outC - start));\n }\n `;\n return;\n }\n this.userCode = `\n ${dtype} start = ${dtype}(${start});\n ${dtype} end = ${dtype}(${end});\n\n void main() {\n ${dtype} outC = getOutputCoords();\n for (int i = 0; i < ${rank}; i++) {\n if (outC[i] < start[i]) {\n outC[i] = start[i] * 2 - outC[i] - ${offset};\n } else if(outC[i] >= end[i]) {\n outC[i] = (end[i] - 1) * 2 - outC[i] + ${offset};\n }\n }\n ${dtype} coords = outC - start;\n setOutput(getX(${unpackedCoords}));\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/mirror_pad_packed_gpu.js\nvar MirrorPadPackedProgram = class {\n constructor(xShape, paddings, mode) {\n this.variableNames = [\"x\"];\n this.packedInputs = true;\n this.packedOutput = true;\n this.outputShape = paddings.map((p2, i) => p2[0] + xShape[i] + p2[1]);\n const rank = xShape.length;\n const dtype = getCoordsDataType(rank);\n const start = paddings.map((p2) => p2[0]).join(\",\");\n const end = paddings.map((p2, i) => p2[0] + xShape[i]).join(\",\");\n const coords3 = getChannels(\"rc\", rank);\n const source = getChannels(\"source\", rank);\n const cLimit = `${coords3[rank - 1]} < ${this.outputShape[rank - 1]}`;\n const innerDims = rank === 1 ? \"source\" : `vec2(${source.slice(-2).join()})`;\n const offset = mode === \"reflect\" ? 0 : 1;\n let mainLoop = \"\";\n if (rank === 1) {\n const padSetup = `\n ${dtype} source = rc;\n if (source < start) {\n source = start * 2 - source - ${offset};\n } else if (source >= end) {\n source = (end - 1) * 2 - source + ${offset};\n }\n source -= start;\n `;\n mainLoop = `\n ${dtype} rc = outputLoc;\n ${padSetup}\n result[0] = getChannel(getX(${source.join()}), ${innerDims});\n ${coords3[rank - 1]} += 1;\n if(${cLimit}) {\n ${padSetup}\n result[1] = getChannel(getX(${source.join()}), ${innerDims});\n }\n `;\n } else {\n const padSetup = `\n ${dtype} source = rc;\n ${dtype} lt = ${dtype}(lessThan(source, start));\n ${dtype} gte = ${dtype}(greaterThanEqual(source, end));\n ${dtype} orig = 1 - (lt + gte);\n source = orig * source +\n lt * (start * 2 - source - ${offset}) +\n gte * ((end - 1) * 2 - source + ${offset});\n source -= start;\n `;\n mainLoop = `\n ${dtype} rc = outputLoc;\n ${padSetup}\n result[0] = getChannel(getX(${source.join()}), ${innerDims});\n ${coords3[rank - 1]} += 1;\n if(${cLimit}) {\n ${padSetup}\n result[1] = getChannel(getX(${source.join()}), ${innerDims});\n }\n rc = outputLoc;\n ${coords3[rank - 2]} += 1;\n if(${coords3[rank - 2]} < ${this.outputShape[rank - 2]}) {\n ${padSetup}\n result[2] = getChannel(getX(${source.join()}), ${innerDims});\n ${coords3[rank - 1]} += 1;\n if(${cLimit}) {\n ${padSetup}\n result[3] = getChannel(getX(${source.join()}), ${innerDims});\n }\n }\n `;\n }\n this.userCode = `\n const ${dtype} start = ${dtype}(${start});\n const ${dtype} end = ${dtype}(${end});\n\n void main() {\n ${dtype} outputLoc = getOutputCoords();\n vec4 result = vec4(0.);\n ${mainLoop}\n setOutput(result);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/MirrorPad.js\nvar mirrorPadKernelFunc = ({ inputs, backend: backend2, attrs }) => {\n const { x } = inputs;\n const { paddings, mode } = attrs;\n const program = env().getBool(\"WEBGL_PACK_ARRAY_OPERATIONS\") ? new MirrorPadPackedProgram(x.shape, paddings, mode) : new MirrorPadProgram(x.shape, paddings, mode);\n const output = backend2.runWebGLProgram(program, [x], x.dtype);\n return output;\n};\nvar mirrorPadConfig2 = {\n kernelName: MirrorPad,\n backendName: \"webgl\",\n kernelFunc: mirrorPadKernelFunc\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Mod.js\nvar MOD = `if (b == 0.0) return NAN;\n return mod(a, b);`;\nvar MOD_PACKED = `\n vec4 result = mod(a, b);\n vec4 isNaN = vec4(equal(b, vec4(0.0)));\n ` + CHECK_NAN_SNIPPET3 + `\n return result;\n`;\nvar mod3 = binaryKernelFunc2({\n opSnippet: MOD,\n packedOpSnippet: MOD_PACKED\n});\nvar modConfig2 = {\n kernelName: Mod,\n backendName: \"webgl\",\n kernelFunc: mod3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/multinomial_gpu.js\nvar MultinomialProgram = class {\n constructor(batchSize, numOutcomes, numSamples) {\n this.variableNames = [\"probs\"];\n this.customUniforms = [{ name: \"seed\", type: \"float\" }];\n this.outputShape = [batchSize, numSamples];\n this.userCode = `\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n\n float r = random(seed);\n float cdf = 0.0;\n\n for (int i = 0; i < ${numOutcomes - 1}; i++) {\n cdf += getProbs(batch, i);\n\n if (r < cdf) {\n setOutput(float(i));\n return;\n }\n }\n\n // If no other event happened, last event happened.\n setOutput(float(${numOutcomes - 1}));\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/RealDiv.js\nvar DIV = `\nif (a == b) {\n return 1.0;\n};\nreturn a / b;`;\nvar DIV_PACKED = `\n // vec4 one = vec4(equal(a, b));\n // return one + (vec4(1.0) - one) * a / b;\n vec4 result = a / b;\n if(a.x == b.x) {\n result.x = 1.;\n }\n if(a.y == b.y) {\n result.y = 1.;\n }\n if(a.z == b.z) {\n result.z = 1.;\n }\n if(a.w == b.w) {\n result.w = 1.;\n }\n\n return result;\n`;\nvar realDiv = binaryKernelFunc2({ opSnippet: DIV, packedOpSnippet: DIV_PACKED, checkOutOfBounds: true });\nvar realDivConfig2 = {\n kernelName: RealDiv,\n backendName: \"webgl\",\n kernelFunc: realDiv\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Sub.js\nvar SUB = \"return a - b;\";\nvar sub3 = binaryKernelFunc2({\n opSnippet: SUB,\n packedOpSnippet: SUB,\n supportsComplex: true,\n cpuKernelImpl: subImplCPU\n});\nvar subConfig2 = {\n kernelName: Sub,\n backendName: \"webgl\",\n kernelFunc: sub3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Softmax.js\nfunction softmax4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { logits } = inputs;\n const { dim } = attrs;\n const axes = util_exports.parseAxisParam([dim], logits.shape);\n const maxLogit = max4({\n inputs: { x: logits },\n backend: backend2,\n attrs: { reductionIndices: axes, keepDims: false }\n });\n const expandedShape = backend_util_exports.expandShapeToKeepDim(maxLogit.shape, axes);\n const maxLogitsReshaped = reshape4({ inputs: { x: maxLogit }, backend: backend2, attrs: { shape: expandedShape } });\n const a = sub3({ inputs: { a: logits, b: maxLogitsReshaped }, backend: backend2 });\n const b = exp3({ inputs: { x: a }, backend: backend2 });\n const sumExp = sum4({ inputs: { x: b }, backend: backend2, attrs: { axis: axes, keepDims: false } });\n const sumExpReshaped = reshape4({ inputs: { x: sumExp }, backend: backend2, attrs: { shape: expandedShape } });\n const res = realDiv({ inputs: { a: b, b: sumExpReshaped }, backend: backend2 });\n backend2.disposeIntermediateTensorInfo(maxLogit);\n backend2.disposeIntermediateTensorInfo(maxLogitsReshaped);\n backend2.disposeIntermediateTensorInfo(a);\n backend2.disposeIntermediateTensorInfo(b);\n backend2.disposeIntermediateTensorInfo(sumExp);\n backend2.disposeIntermediateTensorInfo(sumExpReshaped);\n return res;\n}\nvar softmaxConfig2 = {\n kernelName: Softmax,\n backendName: \"webgl\",\n kernelFunc: softmax4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Multinomial.js\nfunction multinomial3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { logits } = inputs;\n const { numSamples, seed, normalized } = attrs;\n const probs = normalized ? logits : softmax4({ inputs: { logits }, backend: backend2, attrs: { dim: logits.shape.length - 1 } });\n const batchSize = probs.shape[0];\n const numOutcomes = probs.shape[1];\n const program = new MultinomialProgram(batchSize, numOutcomes, numSamples);\n const customValues = [[seed]];\n const res = backend2.runWebGLProgram(program, [probs], \"int32\", customValues);\n if (!normalized) {\n backend2.disposeIntermediateTensorInfo(probs);\n }\n return res;\n}\nvar multinomialConfig2 = {\n kernelName: Multinomial,\n backendName: \"webgl\",\n kernelFunc: multinomial3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Neg.js\nvar NEG = CHECK_NAN_SNIPPET + `\n return -x;\n`;\nvar NEG_PACKED = `\n vec4 result = -x;\n bvec4 isNaN = isnan(x);\n\n result.r = isNaN.r ? x.r : result.r;\n result.g = isNaN.g ? x.g : result.g;\n result.b = isNaN.b ? x.b : result.b;\n result.a = isNaN.a ? x.a : result.a;\n\n return result;\n`;\nfunction neg3(args) {\n const { inputs, backend: backend2 } = args;\n const { x } = inputs;\n if (backend2.shouldExecuteOnCPU([x])) {\n const xData = backend2.texData.get(x.dataId);\n const [outValues, newShape] = negImplCPU(xData.values, x.shape, x.dtype);\n return backend2.makeTensorInfo(newShape, x.dtype, outValues);\n }\n let program;\n if (env().getBool(\"WEBGL_PACK_UNARY_OPERATIONS\")) {\n program = new UnaryOpPackedProgram(x.shape, NEG_PACKED);\n } else {\n program = new UnaryOpProgram(x.shape, NEG);\n }\n return backend2.runWebGLProgram(program, [x], x.dtype);\n}\nvar negConfig2 = {\n kernelName: Neg,\n backendName: \"webgl\",\n kernelFunc: neg3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/NonMaxSuppressionV3.js\nvar nonMaxSuppressionV3Impl3 = kernel_impls_exports.nonMaxSuppressionV3Impl;\nfunction nonMaxSuppressionV32(args) {\n backend_util_exports.warn(\"tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead\");\n const { inputs, backend: backend2, attrs } = args;\n const { boxes, scores } = inputs;\n const { maxOutputSize, iouThreshold, scoreThreshold } = attrs;\n const boxesVals = backend2.readSync(boxes.dataId);\n const scoresVals = backend2.readSync(scores.dataId);\n const { selectedIndices } = nonMaxSuppressionV3Impl3(boxesVals, scoresVals, maxOutputSize, iouThreshold, scoreThreshold);\n return backend2.makeTensorInfo([selectedIndices.length], \"int32\", new Int32Array(selectedIndices));\n}\nvar nonMaxSuppressionV3Config2 = {\n kernelName: NonMaxSuppressionV3,\n backendName: \"webgl\",\n kernelFunc: nonMaxSuppressionV32\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/NonMaxSuppressionV4.js\nvar nonMaxSuppressionV4Impl3 = kernel_impls_exports.nonMaxSuppressionV4Impl;\nfunction nonMaxSuppressionV42(args) {\n backend_util_exports.warn(\"tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead\");\n const { inputs, backend: backend2, attrs } = args;\n const { boxes, scores } = inputs;\n const { maxOutputSize, iouThreshold, scoreThreshold, padToMaxOutputSize } = attrs;\n const boxesVals = backend2.readSync(boxes.dataId);\n const scoresVals = backend2.readSync(scores.dataId);\n const { selectedIndices, validOutputs } = nonMaxSuppressionV4Impl3(boxesVals, scoresVals, maxOutputSize, iouThreshold, scoreThreshold, padToMaxOutputSize);\n return [\n backend2.makeTensorInfo([selectedIndices.length], \"int32\", new Int32Array(selectedIndices)),\n backend2.makeTensorInfo([], \"int32\", new Int32Array([validOutputs]))\n ];\n}\nvar nonMaxSuppressionV4Config2 = {\n kernelName: NonMaxSuppressionV4,\n backendName: \"webgl\",\n kernelFunc: nonMaxSuppressionV42\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/NonMaxSuppressionV5.js\nvar nonMaxSuppressionV5Impl3 = kernel_impls_exports.nonMaxSuppressionV5Impl;\nfunction nonMaxSuppressionV52(args) {\n backend_util_exports.warn(\"tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead\");\n const { inputs, backend: backend2, attrs } = args;\n const { boxes, scores } = inputs;\n const { maxOutputSize, iouThreshold, scoreThreshold, softNmsSigma } = attrs;\n const boxesVals = backend2.readSync(boxes.dataId);\n const scoresVals = backend2.readSync(scores.dataId);\n const maxOutputSizeVal = maxOutputSize;\n const iouThresholdVal = iouThreshold;\n const scoreThresholdVal = scoreThreshold;\n const softNmsSigmaVal = softNmsSigma;\n const { selectedIndices, selectedScores } = nonMaxSuppressionV5Impl3(boxesVals, scoresVals, maxOutputSizeVal, iouThresholdVal, scoreThresholdVal, softNmsSigmaVal);\n return [\n backend2.makeTensorInfo([selectedIndices.length], \"int32\", new Int32Array(selectedIndices)),\n backend2.makeTensorInfo([selectedScores.length], \"float32\", new Float32Array(selectedScores))\n ];\n}\nvar nonMaxSuppressionV5Config2 = {\n kernelName: NonMaxSuppressionV5,\n backendName: \"webgl\",\n kernelFunc: nonMaxSuppressionV52\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/onehot_gpu.js\nvar OneHotProgram = class {\n constructor(numIndices, depth, onValue, offValue) {\n this.variableNames = [\"indices\"];\n this.outputShape = [numIndices, depth];\n this.userCode = `\n void main() {\n ivec2 coords = getOutputCoords();\n int index = round(getIndices(coords.x));\n setOutput(mix(float(${offValue}), float(${onValue}),\n float(index == coords.y)));\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/OneHot.js\nvar oneHot3 = (args) => {\n const { inputs, backend: backend2, attrs } = args;\n const { indices } = inputs;\n const { dtype, depth, onValue, offValue } = attrs;\n const indicesSize = util_exports.sizeFromShape(indices.shape);\n const program = new OneHotProgram(indicesSize, depth, onValue, offValue);\n const reshaped = reshape4({ inputs: { x: indices }, backend: backend2, attrs: { shape: [indicesSize] } });\n const result = backend2.runWebGLProgram(program, [reshaped], dtype);\n backend2.disposeIntermediateTensorInfo(reshaped);\n const outShape = [...indices.shape, depth];\n const out = reshape4({ inputs: { x: result }, backend: backend2, attrs: { shape: outShape } });\n backend2.disposeIntermediateTensorInfo(result);\n return out;\n};\nvar oneHotConfig2 = {\n kernelName: OneHot,\n backendName: \"webgl\",\n kernelFunc: oneHot3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ZerosLike.js\nfunction zerosLike3(args) {\n const { inputs, backend: backend2 } = args;\n const { x } = inputs;\n if (x.dtype === \"complex64\") {\n const realPart = real3({ inputs: { input: x }, backend: backend2 });\n const r = zerosLike3({ inputs: { x: realPart }, backend: backend2 });\n const imagPart = imag3({ inputs: { input: x }, backend: backend2 });\n const i = zerosLike3({ inputs: { x: imagPart }, backend: backend2 });\n const result = complex3({ inputs: { real: r, imag: i }, backend: backend2 });\n backend2.disposeIntermediateTensorInfo(realPart);\n backend2.disposeIntermediateTensorInfo(r);\n backend2.disposeIntermediateTensorInfo(imagPart);\n backend2.disposeIntermediateTensorInfo(i);\n return result;\n } else {\n return fill3({\n attrs: {\n shape: x.shape,\n dtype: x.dtype,\n value: x.dtype === \"string\" ? \"\" : 0\n },\n backend: backend2\n });\n }\n}\nvar zerosLikeConfig2 = {\n kernelName: ZerosLike,\n backendName: \"webgl\",\n kernelFunc: zerosLike3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/OnesLike.js\nfunction onesLike3(args) {\n const { inputs, backend: backend2 } = args;\n const { x } = inputs;\n if (x.dtype === \"string\") {\n throw new Error(\"onesLike is not supported under string dtype\");\n } else if (x.dtype === \"complex64\") {\n const realPart = real3({ inputs: { input: x }, backend: backend2 });\n const r = onesLike3({ inputs: { x: realPart }, backend: backend2 });\n const imagPart = imag3({ inputs: { input: x }, backend: backend2 });\n const i = zerosLike3({ inputs: { x: imagPart }, backend: backend2 });\n const result = complex3({ inputs: { real: r, imag: i }, backend: backend2 });\n backend2.disposeIntermediateTensorInfo(realPart);\n backend2.disposeIntermediateTensorInfo(r);\n backend2.disposeIntermediateTensorInfo(imagPart);\n backend2.disposeIntermediateTensorInfo(i);\n return result;\n } else {\n return fill3({ attrs: { shape: x.shape, dtype: x.dtype, value: 1 }, backend: backend2 });\n }\n}\nvar onesLikeConfig2 = {\n kernelName: OnesLike,\n backendName: \"webgl\",\n kernelFunc: onesLike3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Pack.js\nfunction pack2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { axis } = attrs;\n if (inputs.length === 1) {\n return expandDims4({ inputs: { input: inputs[0] }, backend: backend2, attrs: { dim: axis } });\n }\n const shape = inputs[0].shape;\n const dtype = inputs[0].dtype;\n inputs.forEach((t) => {\n util_exports.assertShapesMatch(shape, t.shape, \"All tensors passed to stack must have matching shapes\");\n util_exports.assert(dtype === t.dtype, () => \"All tensors passed to stack must have matching dtypes\");\n });\n const intermediateTensorInfos = [];\n const expandedTensors = inputs.map((t) => {\n const expandedT = expandDims4({ inputs: { input: t }, backend: backend2, attrs: { dim: axis } });\n intermediateTensorInfos.push(expandedT);\n return expandedT;\n });\n const result = concat3({ inputs: expandedTensors, backend: backend2, attrs: { axis } });\n intermediateTensorInfos.forEach((t) => backend2.disposeIntermediateTensorInfo(t));\n return result;\n}\nvar packConfig2 = {\n kernelName: Pack,\n backendName: \"webgl\",\n kernelFunc: pack2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/pad_gpu.js\nvar PadProgram = class {\n constructor(xShape, paddings, constantValue) {\n this.variableNames = [\"x\"];\n this.customUniforms = [{ name: \"value\", type: \"float\" }];\n this.outputShape = paddings.map((p2, i) => p2[0] + xShape[i] + p2[1]);\n const rank = xShape.length;\n const type = getCoordsDataType(rank);\n const start = paddings.map((p2) => p2[0]).join(\",\");\n const end = paddings.map((p2, i) => p2[0] + xShape[i]).join(\",\");\n const unpackedCoords = [\"coords[0]\", \"coords[1]\", \"coords[2]\", \"coords[3]\"].slice(0, rank);\n if (rank === 1) {\n this.userCode = `\n int start = ${start};\n int end = ${end};\n\n void main() {\n int outC = getOutputCoords();\n if (outC < start || outC >= end) {\n setOutput(value);\n } else {\n setOutput(getX(outC - start));\n }\n }\n `;\n return;\n }\n this.userCode = `\n ${type} start = ${type}(${start});\n ${type} end = ${type}(${end});\n\n void main() {\n ${type} outC = getOutputCoords();\n if (any(lessThan(outC, start)) || any(greaterThanEqual(outC, end))) {\n setOutput(value);\n } else {\n ${type} coords = outC - start;\n setOutput(getX(${unpackedCoords}));\n }\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/pad_packed_gpu.js\nvar PadPackedProgram = class {\n constructor(xShape, paddings, constantValue) {\n this.variableNames = [\"x\"];\n this.packedInputs = true;\n this.packedOutput = true;\n this.customUniforms = [{ name: \"value\", type: \"float\" }];\n this.outputShape = paddings.map((p2, i) => p2[0] + xShape[i] + p2[1]);\n const rank = xShape.length;\n const dtype = getCoordsDataType(rank);\n const start = paddings.map((p2) => p2[0]).join(\",\");\n const end = paddings.map((p2, i) => p2[0] + xShape[i]).join(\",\");\n const coords3 = getChannels(\"rc\", rank);\n const source = getChannels(\"source\", rank);\n const cLimit = `${coords3[rank - 1]} < ${this.outputShape[rank - 1]}`;\n const innerDims = rank === 1 ? \"source\" : `vec2(${source.slice(-2).join()})`;\n const componentSetup = [\n `${dtype} rc = outputLoc;`,\n `${coords3[rank - 1]} += 1;\n if(${cLimit}) {\n `,\n rank === 1 ? \"\" : `}\n rc = outputLoc;\n ${coords3[rank - 2]} += 1;\n if(${coords3[rank - 2]} < ${this.outputShape[rank - 2]}) {`,\n rank === 1 ? \"\" : ` ${coords3[rank - 1]} += 1;\n if(${cLimit}) {`\n ];\n const paddingArea = rank === 1 ? \"rc < start || rc >= end\" : \"any(lessThan(rc, start)) || any(greaterThanEqual(rc, end))\";\n let mainLoop = \"\";\n for (let i = 0, j = rank === 1 ? 2 : 4; i < j; i++) {\n mainLoop += `\n ${componentSetup[i]}\n if (${paddingArea}) {\n result[${i}] = float(value);\n } else {\n ${dtype} source = rc - start;\n result[${i}] = getChannel(getX(${source.join()}), ${innerDims});\n }\n `;\n }\n mainLoop += rank === 1 ? `} ` : `}}`;\n this.userCode = `\n const ${dtype} start = ${dtype}(${start});\n const ${dtype} end = ${dtype}(${end});\n\n void main() {\n ${dtype} outputLoc = getOutputCoords();\n vec4 result = vec4(0.);\n ${mainLoop}\n setOutput(result);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/PadV2.js\nvar padV22 = (args) => {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { paddings, constantValue } = attrs;\n if (util_exports.sizeFromShape(x.shape) === 0) {\n const outputShape = paddings.map((p2, i) => p2[0] + x.shape[i] + p2[1]);\n return fill3({\n backend: backend2,\n attrs: { shape: outputShape, value: constantValue, dtype: x.dtype }\n });\n }\n const program = env().getBool(\"WEBGL_PACK_ARRAY_OPERATIONS\") ? new PadPackedProgram(x.shape, paddings, constantValue) : new PadProgram(x.shape, paddings, constantValue);\n const customValues = [[constantValue]];\n return backend2.runWebGLProgram(program, [x], x.dtype, customValues);\n};\nvar padV2Config2 = {\n kernelName: PadV2,\n backendName: \"webgl\",\n kernelFunc: padV22\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Pow.js\nvar POW = `\n if(a < 0.0 && floor(b) < b){\n return NAN;\n }\n if (b == 0.0) {\n return 1.0;\n }\n return (round(mod(b, 2.0)) != 1) ?\n pow(abs(a), b) : sign(a) * pow(abs(a), b);\n`;\nvar POW_PACKED = `\n // isModRound1 has 1 for components with round(mod(b, 2.0)) == 1, 0 otherwise.\n vec4 isModRound1 = vec4(equal(round(mod(b, 2.0)), ivec4(1)));\n vec4 multiplier = sign(a) * isModRound1 + (vec4(1.0) - isModRound1);\n vec4 result = multiplier * pow(abs(a), b);\n\n // Ensure that a^0 = 1, including 0^0 = 1 as this correspond to TF and JS\n bvec4 isExpZero = equal(b, vec4(0.0));\n result.r = isExpZero.r ? 1.0 : result.r;\n result.g = isExpZero.g ? 1.0 : result.g;\n result.b = isExpZero.b ? 1.0 : result.b;\n result.a = isExpZero.a ? 1.0 : result.a;\n\n vec4 isNaN = vec4(lessThan(a, vec4(0.0))) * vec4(lessThan(floor(b), b));\n ` + CHECK_NAN_SNIPPET3 + `\n return result;\n`;\nvar pow3 = binaryKernelFunc2({ opSnippet: POW, packedOpSnippet: POW_PACKED });\nvar powConfig2 = {\n kernelName: Pow,\n backendName: \"webgl\",\n kernelFunc: pow3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Prod.js\nfunction prod3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis, keepDims } = attrs;\n const xRank = x.shape.length;\n const toDispose = [];\n const origAxes = util_exports.parseAxisParam(axis, x.shape);\n let axes = origAxes;\n const permutedAxes = backend_util_exports.getAxesPermutation(axes, xRank);\n let permutedX = x;\n if (permutedAxes != null) {\n permutedX = transpose3({ inputs: { x }, backend: backend2, attrs: { perm: permutedAxes } });\n axes = backend_util_exports.getInnerMostAxes(axes.length, xRank);\n toDispose.push(permutedX);\n }\n backend_util_exports.assertAxesAreInnerMostDims(\"prod\", axes, xRank);\n let res;\n if (backend2.shouldExecuteOnCPU([permutedX])) {\n const xVals = backend2.texData.get(permutedX.dataId).values;\n const { outVals, outShape, outDtype } = prodImplCPU(permutedX.shape, permutedX.dtype, xVals, axes);\n res = backend2.makeTensorInfo(outShape, outDtype, outVals);\n } else {\n const [outShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes(permutedX.shape, axes);\n const inSize = util_exports.sizeFromShape(reduceShape);\n const a2D = reshape4({ inputs: { x: permutedX }, backend: backend2, attrs: { shape: [-1, inSize] } });\n const outputDType = sumOutType(x.dtype);\n const reduced = reduce(a2D, outputDType, \"prod\", backend2);\n res = reshape4({ inputs: { x: reduced }, backend: backend2, attrs: { shape: outShape } });\n toDispose.push(a2D);\n toDispose.push(reduced);\n }\n if (keepDims) {\n toDispose.push(res);\n const newShape = backend_util_exports.expandShapeToKeepDim(res.shape, origAxes);\n res = reshape4({ inputs: { x: res }, backend: backend2, attrs: { shape: newShape } });\n }\n toDispose.forEach((t) => backend2.disposeIntermediateTensorInfo(t));\n return res;\n}\nvar prodConfig2 = {\n kernelName: Prod,\n backendName: \"webgl\",\n kernelFunc: prod3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/RaggedTensorToTensor.js\nfunction raggedTensorToTensor3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { shape, values, defaultValue, rowPartitionTensors } = inputs;\n const { rowPartitionTypes } = attrs;\n const $shape = backend2.readSync(shape.dataId);\n const $values = backend2.readSync(values.dataId);\n const $defaultValue = backend2.readSync(defaultValue.dataId);\n const $rowPartitionValues = rowPartitionTensors.map((t) => backend2.readSync(t.dataId));\n const rowPartitionValuesShapes = rowPartitionTensors.map((t) => t.shape);\n const [outputShape, output] = raggedTensorToTensorImplCPU($shape, shape.shape, $values, values.shape, values.dtype, $defaultValue, defaultValue.shape, $rowPartitionValues, rowPartitionValuesShapes, rowPartitionTypes);\n return backend2.makeTensorInfo(outputShape, values.dtype, output);\n}\nvar raggedTensorToTensorConfig2 = {\n kernelName: RaggedTensorToTensor,\n backendName: \"webgl\",\n kernelFunc: raggedTensorToTensor3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Range.js\nvar range4 = (args) => {\n const { backend: backend2, attrs } = args;\n const { start, stop, step: step5, dtype } = attrs;\n const values = rangeImplCPU(start, stop, step5, dtype);\n return backend2.makeTensorInfo([values.length], dtype, values);\n};\nvar rangeConfig2 = {\n kernelName: Range,\n backendName: \"webgl\",\n kernelFunc: range4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Reciprocal.js\nvar RECIPROCAL = `return 1.0 / x;`;\nvar reciprocal3 = unaryKernelFunc2({ opSnippet: RECIPROCAL });\nvar reciprocalConfig2 = {\n kernelName: Reciprocal,\n backendName: \"webgl\",\n kernelFunc: reciprocal3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Relu.js\nvar RELU3 = CHECK_NAN_SNIPPET + `\n return (x < 0.0) ? 0.0 : x;\n`;\nvar RELU_PACKED = `\n vec4 result = x * vec4(greaterThanEqual(x, vec4(0.0)));\n bvec4 isNaN = isnan(x);\n\n result.r = isNaN.r ? x.r : result.r;\n result.g = isNaN.g ? x.g : result.g;\n result.b = isNaN.b ? x.b : result.b;\n result.a = isNaN.a ? x.a : result.a;\n\n return result;\n`;\nvar relu3 = unaryKernelFunc2({ opSnippet: RELU3, packedOpSnippet: RELU_PACKED });\nvar reluConfig2 = {\n kernelName: Relu,\n backendName: \"webgl\",\n kernelFunc: relu3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Relu6.js\nvar RELU63 = CHECK_NAN_SNIPPET + `\n return (x < 0.0) ? 0.0 : min(6.0, x);\n`;\nvar RELU6_PACKED = `\n vec4 result = min(x, vec4(6.)) * vec4(greaterThanEqual(x, vec4(0.0)));\n bvec4 isNaN = isnan(x);\n\n result.r = isNaN.r ? x.r : result.r;\n result.g = isNaN.g ? x.g : result.g;\n result.b = isNaN.b ? x.b : result.b;\n result.a = isNaN.a ? x.a : result.a;\n\n return result;\n`;\nvar relu63 = unaryKernelFunc2({ opSnippet: RELU63, packedOpSnippet: RELU6_PACKED });\nvar relu6Config2 = {\n kernelName: Relu6,\n backendName: \"webgl\",\n kernelFunc: relu63\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/resize_bilinear_gpu.js\nvar ResizeBilinearProgram = class {\n constructor(inputShape, newHeight, newWidth, alignCorners, halfPixelCenters) {\n this.variableNames = [\"A\"];\n this.outputShape = [];\n const [batch, oldHeight, oldWidth, depth] = inputShape;\n this.outputShape = [batch, newHeight, newWidth, depth];\n const effectiveInSize = [\n alignCorners && newHeight > 1 ? oldHeight - 1 : oldHeight,\n alignCorners && newWidth > 1 ? oldWidth - 1 : oldWidth\n ];\n const effectiveOutSize = [\n alignCorners && newHeight > 1 ? newHeight - 1 : newHeight,\n alignCorners && newWidth > 1 ? newWidth - 1 : newWidth\n ];\n let sourceFracIndexRC;\n if (halfPixelCenters) {\n sourceFracIndexRC = `(vec2(yRC) + vec2(0.5)) * effectiveInputOverOutputRatioRC - vec2(0.5)`;\n } else {\n sourceFracIndexRC = `vec2(yRC) * effectiveInputOverOutputRatioRC`;\n }\n this.userCode = `\n const vec2 effectiveInputOverOutputRatioRC = vec2(\n ${effectiveInSize[0] / effectiveOutSize[0]},\n ${effectiveInSize[1] / effectiveOutSize[1]});\n const vec2 inputShapeRC = vec2(${oldHeight}.0, ${oldWidth}.0);\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n ivec2 yRC = coords.yz;\n\n // Fractional source index.\n vec2 sourceFracIndexRC = ${sourceFracIndexRC};\n\n // Compute the four integer indices.\n ivec2 sourceFloorRC = ivec2(max(sourceFracIndexRC, vec2(0.0)));\n ivec2 sourceCeilRC = ivec2(\n min(inputShapeRC - 1.0, ceil(sourceFracIndexRC)));\n\n float topLeft = getA(b, sourceFloorRC.x, sourceFloorRC.y, d);\n float bottomLeft = getA(b, sourceCeilRC.x, sourceFloorRC.y, d);\n float topRight = getA(b, sourceFloorRC.x, sourceCeilRC.y, d);\n float bottomRight = getA(b, sourceCeilRC.x, sourceCeilRC.y, d);\n\n vec2 fracRC = sourceFracIndexRC - vec2(sourceFloorRC);\n\n float top = topLeft + (topRight - topLeft) * fracRC.y;\n float bottom = bottomLeft + (bottomRight - bottomLeft) * fracRC.y;\n float newValue = top + (bottom - top) * fracRC.x;\n\n setOutput(newValue);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/resize_bilinear_packed_gpu.js\nvar ResizeBilinearPackedProgram = class {\n constructor(inputShape, newHeight, newWidth, alignCorners, halfPixelCenters) {\n this.variableNames = [\"A\"];\n this.packedInputs = true;\n this.packedOutput = true;\n this.outputShape = [];\n const [batch, oldHeight, oldWidth, depth] = inputShape;\n this.outputShape = [batch, newHeight, newWidth, depth];\n const effectiveInSize = [\n alignCorners && newHeight > 1 ? oldHeight - 1 : oldHeight,\n alignCorners && newWidth > 1 ? oldWidth - 1 : oldWidth\n ];\n const effectiveOutSize = [\n alignCorners && newHeight > 1 ? newHeight - 1 : newHeight,\n alignCorners && newWidth > 1 ? newWidth - 1 : newWidth\n ];\n let sourceFracIndexRC;\n if (halfPixelCenters) {\n sourceFracIndexRC = `(vec3(yRC) + vec3(0.5)) * effectiveInputOverOutputRatioRC - vec3(0.5)`;\n } else {\n sourceFracIndexRC = `vec3(yRC) * effectiveInputOverOutputRatioRC`;\n }\n this.userCode = `\n const vec3 effectiveInputOverOutputRatioRC = vec3(\n ${effectiveInSize[0] / effectiveOutSize[0]},\n ${effectiveInSize[1] / effectiveOutSize[1]},\n ${effectiveInSize[1] / effectiveOutSize[1]});\n const vec3 inputShapeRC = vec3(${oldHeight}.0, ${oldWidth}.0,\n ${oldWidth}.0);\n\n float getAValue(int b, int r, int c, int d) {\n return getChannel(getA(b, r, c, d), vec2(c, d));\n }\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n // Calculate values for next column in yRC.z.\n ivec3 yRC = coords.yzz + ivec3(0, 0, 1);\n\n // Fractional source index.\n vec3 sourceFracIndexRC = ${sourceFracIndexRC};\n\n // Compute the four integer indices.\n ivec3 sourceFloorRC = ivec3(max(sourceFracIndexRC, vec3(0.0)));\n ivec3 sourceCeilRC = ivec3(\n min(inputShapeRC - 1.0, ceil(sourceFracIndexRC)));\n\n // Should we calculate next column and row elements in 2x2 packed cell.\n bool hasNextCol = d < ${depth - 1};\n bool hasNextRow = coords.z < ${newWidth - 1};\n\n // In parallel, construct four corners for all four components in\n // packed 2x2 cell.\n vec4 topLeft = vec4(\n getAValue(b, sourceFloorRC.x, sourceFloorRC.y, d),\n hasNextCol ? getAValue(b, sourceFloorRC.x, sourceFloorRC.y, d + 1)\n : 0.0,\n hasNextRow ? getAValue(b, sourceFloorRC.x, sourceFloorRC.z, d)\n : 0.0,\n (hasNextRow && hasNextCol) ?\n getAValue(b, sourceFloorRC.x, sourceFloorRC.z, d + 1) : 0.0);\n\n vec4 bottomLeft = vec4(\n getAValue(b, sourceCeilRC.x, sourceFloorRC.y, d),\n hasNextCol ? getAValue(b, sourceCeilRC.x, sourceFloorRC.y, d + 1)\n : 0.0,\n hasNextRow ? getAValue(b, sourceCeilRC.x, sourceFloorRC.z, d)\n : 0.0,\n (hasNextRow && hasNextCol) ?\n getAValue(b, sourceCeilRC.x, sourceFloorRC.z, d + 1) : 0.0);\n\n vec4 topRight = vec4(\n getAValue(b, sourceFloorRC.x, sourceCeilRC.y, d),\n hasNextCol ? getAValue(b, sourceFloorRC.x, sourceCeilRC.y, d + 1)\n : 0.0,\n hasNextRow ? getAValue(b, sourceFloorRC.x, sourceCeilRC.z, d)\n : 0.0,\n (hasNextRow && hasNextCol) ?\n getAValue(b, sourceFloorRC.x, sourceCeilRC.z, d + 1) : 0.0);\n\n vec4 bottomRight = vec4(\n getAValue(b, sourceCeilRC.x, sourceCeilRC.y, d),\n hasNextCol ? getAValue(b, sourceCeilRC.x, sourceCeilRC.y, d + 1)\n : 0.0,\n hasNextRow ? getAValue(b, sourceCeilRC.x, sourceCeilRC.z, d)\n : 0.0,\n (hasNextRow && hasNextCol) ?\n getAValue(b, sourceCeilRC.x, sourceCeilRC.z, d + 1) : 0.0);\n\n vec3 fracRC = sourceFracIndexRC - vec3(sourceFloorRC);\n\n vec4 top = mix(topLeft, topRight, fracRC.yyzz);\n vec4 bottom = mix(bottomLeft, bottomRight, fracRC.yyzz);\n vec4 newValue = mix(top, bottom, fracRC.x);\n\n setOutput(newValue);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ResizeBilinear.js\nfunction resizeBilinear3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { images } = inputs;\n const { alignCorners, halfPixelCenters, size } = attrs;\n const [newHeight, newWidth] = size;\n const program = env().getBool(\"WEBGL_PACK_IMAGE_OPERATIONS\") ? new ResizeBilinearPackedProgram(images.shape, newHeight, newWidth, alignCorners, halfPixelCenters) : new ResizeBilinearProgram(images.shape, newHeight, newWidth, alignCorners, halfPixelCenters);\n return backend2.runWebGLProgram(program, [images], \"float32\");\n}\nvar resizeBilinearConfig2 = {\n kernelName: ResizeBilinear,\n backendName: \"webgl\",\n kernelFunc: resizeBilinear3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/resize_bilinear_backprop_gpu.js\nvar ResizeBilinearBackpropProgram = class {\n constructor(dyShape, inputShape, alignCorners) {\n this.variableNames = [\"dy\"];\n this.outputShape = [];\n this.outputShape = inputShape;\n const [, xHeight, xWidth] = inputShape;\n const [, yHeight, yWidth] = dyShape;\n const effectiveXSize = [\n alignCorners && yHeight > 1 ? xHeight - 1 : xHeight,\n alignCorners && yWidth > 1 ? xWidth - 1 : xWidth\n ];\n const effectiveYSize = [\n alignCorners && yHeight > 1 ? yHeight - 1 : yHeight,\n alignCorners && yWidth > 1 ? yWidth - 1 : yWidth\n ];\n const heightScale = effectiveXSize[0] / effectiveYSize[0];\n const widthScale = effectiveXSize[1] / effectiveYSize[1];\n const invHeightScale = 1 / heightScale;\n const invWidthScale = 1 / widthScale;\n const winHeight = Math.ceil(invHeightScale) * 2 + 2;\n const winWidth = Math.ceil(invWidthScale) * 2 + 2;\n this.userCode = `\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n int r = coords[1];\n int c = coords[2];\n\n float accumulator = 0.0;\n\n const float heightScale = float(${heightScale});\n const float widthScale = float(${widthScale});\n\n const float invHeightScale = float(${invHeightScale});\n const float invWidthScale = float(${invWidthScale});\n\n const int winHeight = int(${winHeight});\n const int winWidth = int(${winWidth});\n\n // Compute bounds for where in dy we will look\n float startRLerp = floor(float(r) * invHeightScale);\n int startDyR = int(startRLerp - float(winHeight / 2));\n\n float startCLerp = floor(float(c) * invWidthScale);\n int startDyC = int(startCLerp - float(winWidth / 2));\n\n // Loop over dy\n for (int dyROffset = 0; dyROffset < winHeight; dyROffset++) {\n int dyR = dyROffset + startDyR;\n\n // Guard against the window exceeding the bounds of dy\n if (dyR < 0 || dyR >= ${yHeight}) {\n continue;\n }\n\n for (int dyCOffset = 0; dyCOffset < winWidth; dyCOffset++) {\n int dyC = dyCOffset + startDyC;\n\n // Guard against the window exceeding the bounds of dy\n if (dyC < 0 || dyC >= ${yWidth}) {\n continue;\n }\n\n float dxR = float(dyR) * heightScale;\n int topDxRIndex = int(floor(dxR));\n int bottomDxRIndex = int(min(ceil(dxR), ${xHeight - 1}.0));\n float dxRLerp = dxR - float(topDxRIndex);\n float inverseDxRLerp = 1.0 - dxRLerp;\n\n float dxC = float(dyC) * widthScale;\n int leftDxCIndex = int(floor(dxC));\n int rightDxCIndex = int(min(ceil(dxC), ${xWidth - 1}.0));\n float dxCLerp = dxC - float(leftDxCIndex);\n float inverseDxCLerp = 1.0 - dxCLerp;\n\n if (r == topDxRIndex && c == leftDxCIndex) {\n // topLeft\n accumulator +=\n getDy(b, dyR, dyC, d) * inverseDxRLerp * inverseDxCLerp;\n }\n\n if (r == topDxRIndex && c == rightDxCIndex) {\n // topRight\n accumulator += getDy(b, dyR, dyC, d) * inverseDxRLerp * dxCLerp;\n }\n\n if (r == bottomDxRIndex && c == leftDxCIndex) {\n // bottomLeft\n accumulator += getDy(b, dyR, dyC, d) * dxRLerp * inverseDxCLerp;\n }\n\n if (r == bottomDxRIndex && c == rightDxCIndex) {\n // bottomRight\n accumulator += getDy(b, dyR, dyC, d) * dxRLerp * dxCLerp;\n }\n }\n }\n // End loop over dy\n\n setOutput(accumulator);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ResizeBilinearGrad.js\nfunction resizeBilinearGrad2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { images, dy } = inputs;\n const { alignCorners } = attrs;\n const program = new ResizeBilinearBackpropProgram(dy.shape, images.shape, alignCorners);\n return backend2.runWebGLProgram(program, [dy], dy.dtype);\n}\nvar resizeBilinearGradConfig3 = {\n kernelName: ResizeBilinearGrad,\n backendName: \"webgl\",\n kernelFunc: resizeBilinearGrad2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/resize_nearest_neighbor_gpu.js\nvar ResizeNearestNeighborProgram = class {\n constructor(inputShape, newHeight, newWidth, alignCorners, halfPixelCenters) {\n this.variableNames = [\"A\"];\n this.outputShape = [];\n const [batch, oldHeight, oldWidth, depth] = inputShape;\n this.outputShape = [batch, newHeight, newWidth, depth];\n const effectiveInSize = [\n alignCorners && newHeight > 1 ? oldHeight - 1 : oldHeight,\n alignCorners && newWidth > 1 ? oldWidth - 1 : oldWidth\n ];\n const effectiveOutSize = [\n alignCorners && newHeight > 1 ? newHeight - 1 : newHeight,\n alignCorners && newWidth > 1 ? newWidth - 1 : newWidth\n ];\n const roundBase = alignCorners ? \"0.5\" : \"0.0\";\n let sourceFracIndexRC;\n if (halfPixelCenters) {\n sourceFracIndexRC = `max((vec2(yRC) + vec2(0.5)) * effectiveInputOverOutputRatioRC, vec2(0.0))`;\n } else {\n sourceFracIndexRC = `vec2(yRC) * effectiveInputOverOutputRatioRC`;\n }\n this.userCode = `\n const vec2 effectiveInputOverOutputRatioRC = vec2(\n ${effectiveInSize[0] / effectiveOutSize[0]},\n ${effectiveInSize[1] / effectiveOutSize[1]});\n const vec2 inputShapeRC = vec2(${oldHeight}.0, ${oldWidth}.0);\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n ivec2 yRC = coords.yz;\n\n // Fractional source index.\n vec2 sourceFracIndexRC = ${sourceFracIndexRC};\n\n // Compute the coordinators of nearest neighbor point.\n ivec2 sourceNearestRC = ivec2(\n min(inputShapeRC - 1.0, floor(sourceFracIndexRC + ${roundBase})));\n float newValue = getA(b, sourceNearestRC.x, sourceNearestRC.y, d);\n\n setOutput(newValue);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/resize_nearest_neighbor_packed_gpu.js\nvar ResizeNearestNeighborPackedProgram = class {\n constructor(inputShape, newHeight, newWidth, alignCorners, halfPixelCenters) {\n this.variableNames = [\"A\"];\n this.packedInputs = true;\n this.packedOutput = true;\n this.outputShape = [];\n const [batch, oldHeight, oldWidth, depth] = inputShape;\n this.outputShape = [batch, newHeight, newWidth, depth];\n const effectiveInSize = [\n alignCorners && newHeight > 1 ? oldHeight - 1 : oldHeight,\n alignCorners && newWidth > 1 ? oldWidth - 1 : oldWidth\n ];\n const effectiveOutSize = [\n alignCorners && newHeight > 1 ? newHeight - 1 : newHeight,\n alignCorners && newWidth > 1 ? newWidth - 1 : newWidth\n ];\n const roundBase = alignCorners ? \"0.5\" : \"0.0\";\n let sourceFracIndexRC;\n if (halfPixelCenters) {\n sourceFracIndexRC = `max((vec3(yRC) + vec3(0.5)) * effectiveInputOverOutputRatioRC, vec3(0.0))`;\n } else {\n sourceFracIndexRC = `vec3(yRC) * effectiveInputOverOutputRatioRC`;\n }\n this.userCode = `\n const vec3 effectiveInputOverOutputRatioRC = vec3(\n ${effectiveInSize[0] / effectiveOutSize[0]},\n ${effectiveInSize[1] / effectiveOutSize[1]},\n ${effectiveInSize[1] / effectiveOutSize[1]});\n const vec3 inputShapeRC = vec3(${oldHeight}.0, ${oldWidth}.0,\n ${oldWidth}.0);\n\n float getAValue(int b, int r, int c, int d) {\n return getChannel(getA(b, r, c, d), vec2(c, d));\n }\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n // Calculate values for next column in yRC.z.\n ivec3 yRC = coords.yzz + ivec3(0, 0, 1);\n\n // Fractional source index.\n vec3 sourceFracIndexRC = ${sourceFracIndexRC};\n\n // Compute the coordinators of nearest neighbor point.\n ivec3 sourceNearestRC = ivec3(\n min(inputShapeRC - 1.0, floor(sourceFracIndexRC + ${roundBase})));\n\n // Should we calculate next column and row elements in 2x2 packed cell.\n bool hasNextCol = d < ${depth - 1};\n bool hasNextRow = coords.z < ${newWidth - 1};\n\n vec4 newValue = vec4(\n getAValue(b, sourceNearestRC.x, sourceNearestRC.y, d),\n hasNextCol ? getAValue(b, sourceNearestRC.x, sourceNearestRC.y, d + 1)\n : 0.0,\n hasNextRow ? getAValue(b, sourceNearestRC.x, sourceNearestRC.z, d)\n : 0.0,\n (hasNextRow && hasNextCol) ?\n getAValue(b, sourceNearestRC.x, sourceNearestRC.z, d + 1) : 0.0);\n\n setOutput(newValue);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ResizeNearestNeighbor.js\nfunction resizeNearestNeighbor3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { images } = inputs;\n const { alignCorners, halfPixelCenters, size } = attrs;\n const [newHeight, newWidth] = size;\n const program = env().getBool(\"WEBGL_PACK_IMAGE_OPERATIONS\") ? new ResizeNearestNeighborPackedProgram(images.shape, newHeight, newWidth, alignCorners, halfPixelCenters) : new ResizeNearestNeighborProgram(images.shape, newHeight, newWidth, alignCorners, halfPixelCenters);\n return backend2.runWebGLProgram(program, [images], images.dtype);\n}\nvar resizeNearestNeighborConfig2 = {\n kernelName: ResizeNearestNeighbor,\n backendName: \"webgl\",\n kernelFunc: resizeNearestNeighbor3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/resize_nearest_neighbor_backprop_gpu.js\nvar ResizeNearestNeigborBackpropProgram = class {\n constructor(dyShape, inputShape, alignCorners) {\n this.variableNames = [\"dy\"];\n this.outputShape = [];\n this.outputShape = inputShape;\n const [, xHeight, xWidth] = inputShape;\n const [, yHeight, yWidth] = dyShape;\n const effectiveXSize = [\n alignCorners && yHeight > 1 ? xHeight - 1 : xHeight,\n alignCorners && yWidth > 1 ? xWidth - 1 : xWidth\n ];\n const effectiveYSize = [\n alignCorners && yHeight > 1 ? yHeight - 1 : yHeight,\n alignCorners && yWidth > 1 ? yWidth - 1 : yWidth\n ];\n const heightScale = effectiveXSize[0] / effectiveYSize[0];\n const widthScale = effectiveXSize[1] / effectiveYSize[1];\n const invHeightScale = 1 / heightScale;\n const invWidthScale = 1 / widthScale;\n const winHeight = Math.ceil(invHeightScale) * 2 + 2;\n const winWidth = Math.ceil(invWidthScale) * 2 + 2;\n this.userCode = `\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n int r = coords[1];\n int c = coords[2];\n\n float accumulator = 0.0;\n\n const float heightScale = float(${heightScale});\n const float widthScale = float(${widthScale});\n\n const float invHeightScale = float(${invHeightScale});\n const float invWidthScale = float(${invWidthScale});\n\n const int winHeight = int(${winHeight});\n const int winWidth = int(${winWidth});\n\n // Compute bounds for where in dy we will look\n float startRLerp = floor(float(r) * invHeightScale);\n int startDyR = int(floor(startRLerp - float(winHeight / 2)));\n\n float startCLerp = floor(float(c) * invWidthScale);\n int startDyC = int(floor(startCLerp - float(winWidth / 2)));\n\n // Loop over dy\n for (int dyROffset = 0; dyROffset < winHeight; dyROffset++) {\n int dyR = dyROffset + startDyR;\n\n // Guard against the window exceeding the bounds of dy\n if (dyR < 0 || dyR >= ${yHeight}) {\n continue;\n }\n\n for (int dyCOffset = 0; dyCOffset < winWidth; dyCOffset++) {\n int dyC = dyCOffset + startDyC;\n\n // Guard against the window exceeding the bounds of dy\n if (dyC < 0 || dyC >= ${yWidth}) {\n continue;\n }\n\n float sourceFracRow =\n float(${effectiveXSize[0]}) *\n (float(dyR) / float(${effectiveYSize[0]}));\n\n float sourceFracCol =\n float(${effectiveXSize[1]}) *\n (float(dyC) / float(${effectiveYSize[1]}));\n\n int sourceNearestRow = int(min(\n float(int(${xHeight}) - 1),\n ${alignCorners} ? float(round(sourceFracRow)) :\n float(floor(sourceFracRow))));\n\n int sourceNearestCol = int(min(\n float(int(${xWidth}) - 1),\n ${alignCorners} ? float(round(sourceFracCol)) :\n float(floor(sourceFracCol))));\n\n if (r == sourceNearestRow && c == sourceNearestCol) {\n accumulator += getDy(b, dyR, dyC, d);\n }\n }\n }\n // End loop over dy\n\n setOutput(accumulator);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ResizeNearestNeighborGrad.js\nfunction resizeNearestNeighborGrad2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { images, dy } = inputs;\n const { alignCorners } = attrs;\n const program = new ResizeNearestNeigborBackpropProgram(dy.shape, images.shape, alignCorners);\n return backend2.runWebGLProgram(program, [dy], dy.dtype);\n}\nvar resizeNearestNeighborGradConfig3 = {\n kernelName: ResizeNearestNeighborGrad,\n backendName: \"webgl\",\n kernelFunc: resizeNearestNeighborGrad2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/reverse_gpu.js\nvar ReverseProgram = class {\n constructor(xShape, axis) {\n this.variableNames = [\"x\"];\n const rank = xShape.length;\n if (rank > 4) {\n throw new Error(`WebGL backend: Reverse of rank-${rank} tensor is not yet supported`);\n }\n this.outputShape = xShape;\n if (rank === 1) {\n this.userCode = `\n void main() {\n int coord = getOutputCoords();\n setOutput(getX(${xShape[0]} - coord - 1));\n }\n `;\n return;\n }\n const getInCoord = (i) => {\n if (axis.indexOf(i) !== -1 && xShape[i] !== 1) {\n return `${xShape[i]} - coords[${i}] - 1`;\n }\n return `coords[${i}]`;\n };\n const inCoords = xShape.map((_, i) => getInCoord(i)).join(\",\");\n const type = getCoordsDataType(rank);\n this.userCode = `\n void main() {\n ${type} coords = getOutputCoords();\n setOutput(getX(${inCoords}));\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/reverse_packed_gpu.js\nvar ReversePackedProgram = class {\n constructor(xShape, axis) {\n this.variableNames = [\"x\"];\n this.packedInputs = true;\n this.packedOutput = true;\n const rank = xShape.length;\n if (rank > 4) {\n throw new Error(`WebGL backend: Reverse of rank-${rank} tensor is not yet supported`);\n }\n this.outputShape = xShape;\n const channels = getChannels(\"rc\", rank);\n const nextColumn = `${channels[rank - 1]} + 1 < ${this.outputShape[rank - 1]}`;\n const nextRow = `${channels[rank - 2]} + 1 < ${this.outputShape[rank - 2]}`;\n const type = getCoordsDataType(rank);\n if (rank === 1) {\n this.userCode = `\n void main(){\n int rc = getOutputCoords();\n vec4 result = vec4(0.);\n result.r = getChannel(getX(${xShape[0]} - rc - 1),\n ${xShape[0]} - rc - 1);\n if(${nextColumn}){\n result.g = getChannel(getX(${xShape[0]} - (rc + 1) - 1),\n ${xShape[0]} - (rc + 1) - 1);\n }\n setOutput(result);\n }\n `;\n } else {\n this.userCode = `\n void main() {\n ${type} rc = getOutputCoords();\n vec4 result = vec4(0.);\n result.r = ${getR(channels.slice())};\n if(${nextColumn}){\n result.g = ${getG(channels.slice())};\n }\n if(${nextRow}) {\n result.b = ${getB(channels.slice())};\n if(${nextColumn}) {\n result.a = ${getA(channels.slice())};\n }\n }\n setOutput(result);\n }\n `;\n }\n function getR(channels2) {\n return getChannel(channels2);\n }\n function getG(channels2) {\n channels2[rank - 1] = \"(\" + channels2[rank - 1] + ` + 1)`;\n return getChannel(channels2);\n }\n function getB(channels2) {\n channels2[rank - 2] = \"(\" + channels2[rank - 2] + ` + 1)`;\n return getChannel(channels2);\n }\n function getA(channels2) {\n channels2[rank - 1] = \"(\" + channels2[rank - 1] + ` + 1)`;\n channels2[rank - 2] = \"(\" + channels2[rank - 2] + ` + 1)`;\n return getChannel(channels2);\n }\n function getChannel(channels2) {\n const inCoordsArray = xShape.map((_, i) => getInCoord(i, channels2));\n const inCoords = inCoordsArray.join(\",\");\n const innerDims = inCoordsArray.slice(-2).join(\",\");\n return `getChannel(getX(${inCoords}), vec2(${innerDims}))`;\n }\n function getInCoord(i, channels1) {\n if (axis.indexOf(i) !== -1 && xShape[i] !== 1) {\n return `${xShape[i]} - ${channels1[i]} - 1`;\n } else {\n return `${channels1[i]}`;\n }\n }\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Reverse.js\nfunction reverse3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { dims } = attrs;\n const xRank = x.shape.length;\n const $dims = util_exports.parseAxisParam(dims, x.shape);\n if (xRank === 0) {\n return identity3({ inputs: { x }, backend: backend2 });\n }\n const program = env().getBool(\"WEBGL_PACK_ARRAY_OPERATIONS\") ? new ReversePackedProgram(x.shape, $dims) : new ReverseProgram(x.shape, $dims);\n return backend2.runWebGLProgram(program, [x], x.dtype);\n}\nvar reverseConfig2 = {\n kernelName: Reverse,\n backendName: \"webgl\",\n kernelFunc: reverse3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/rotate_gpu.js\nvar RotateProgram = class {\n constructor(imageShape, fillValue) {\n this.variableNames = [\"Image\"];\n this.outputShape = [];\n this.customUniforms = [{ name: \"params\", type: \"vec4\" }];\n const imageHeight = imageShape[1];\n const imageWidth = imageShape[2];\n this.outputShape = imageShape;\n let fillSnippet = \"\";\n if (typeof fillValue === \"number\") {\n fillSnippet = `float outputValue = ${fillValue.toFixed(2)};`;\n } else {\n fillSnippet = `\n vec3 fill = vec3(${fillValue.join(\",\")});\n float outputValue = fill[coords[3]];`;\n }\n this.userCode = `\n void main() {\n ivec4 coords = getOutputCoords();\n int x = coords[2];\n int y = coords[1];\n float coordXFloat = (float(x) - params[0]) * params[3] -\n (float(y) - params[1]) * params[2];\n float coordYFloat = (float(x) - params[0]) * params[2] +\n (float(y) - params[1]) * params[3];\n int coordX = int(round(coordXFloat + params[0]));\n int coordY = int(round(coordYFloat + params[1]));\n ${fillSnippet}\n if(coordX >= 0 && coordX < ${imageWidth} && coordY >= 0 && coordY < ${imageHeight}) {\n outputValue = getImage(coords[0], coordY, coordX, coords[3]);\n }\n setOutput(outputValue);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/RotateWithOffset.js\nvar rotateWithOffsetConfig2 = {\n kernelName: RotateWithOffset,\n backendName: \"webgl\",\n kernelFunc: ({ inputs, attrs, backend: backend2 }) => {\n const { image: image2 } = inputs;\n const { radians, fillValue, center } = attrs;\n const webglBackend = backend2;\n const program = new RotateProgram(image2.shape, fillValue);\n const [centerX, centerY] = backend_util_exports.getImageCenter(center, image2.shape[1], image2.shape[2]);\n const customValues = [[centerX, centerY, Math.sin(radians), Math.cos(radians)]];\n const output = webglBackend.runWebGLProgram(program, [image2], image2.dtype, customValues);\n return output;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Round.js\nvar ROUND = `\n // OpenGL ES does not support round function.\n // The algorithm is based on banker's rounding.\n float base = floor(x);\n if ((x - base) < 0.5) {\n return floor(x);\n } else if ((x - base) > 0.5) {\n return ceil(x);\n } else {\n if (mod(base, 2.0) == 0.0) {\n return base;\n } else {\n return base + 1.0;\n }\n }\n`;\nvar round4 = unaryKernelFunc2({ opSnippet: ROUND });\nvar roundConfig2 = {\n kernelName: Round,\n backendName: \"webgl\",\n kernelFunc: round4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Rsqrt.js\nvar RSQRT = `return inversesqrt(x);`;\nvar rsqrt3 = unaryKernelFunc2({ opSnippet: RSQRT, cpuKernelImpl: rsqrtImplCPU });\nvar rsqrtConfig2 = {\n kernelName: Rsqrt,\n backendName: \"webgl\",\n kernelFunc: rsqrt3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/scatter_gpu.js\nvar ScatterProgram = class {\n constructor(updateSize, sliceDim, indicesRank, updatesRank, strides, shape, summingDupeIndex = true) {\n this.variableNames = [\"updates\", \"indices\", \"defaultValue\"];\n this.outputShape = shape;\n const stridesType = getCoordsDataType(strides.length);\n const dtype = getCoordsDataType(shape.length);\n let indicesString = \"\";\n if (indicesRank === 1) {\n indicesString = \"i\";\n } else if (indicesRank === 2) {\n indicesString = \"i, j\";\n }\n const indicesSnippet = `getIndices(${indicesString})`;\n let updatesString = \"\";\n if (updatesRank === 1) {\n updatesString = \"i\";\n } else if (updatesRank === 2) {\n updatesString = \"i, coords[1]\";\n }\n const updatesSnippet = `getUpdates(${updatesString})`;\n const strideString = sliceDim > 1 ? \"strides[j]\" : \"strides\";\n this.userCode = `\n ${stridesType} strides = ${stridesType}(${strides});\n\n void main() {\n ${dtype} coords = getOutputCoords();\n float sum = 0.0;\n bool found = false;\n for (int i = 0; i < ${updateSize}; i++) {\n int flattenedIndex = 0;\n for (int j = 0; j < ${sliceDim}; j++) {\n int index = round(${indicesSnippet});\n flattenedIndex += index * ${strideString};\n }\n if (flattenedIndex == coords[0]) {\n sum += ${updatesSnippet};\n found = true;\n }\n }\n setOutput(mix(getDefaultValue(), sum, float(found)));\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ScatterNd.js\nfunction scatterNd2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { indices, updates } = inputs;\n const { shape } = attrs;\n const { sliceRank, numUpdates, sliceSize, strides, outputSize } = backend_util_exports.calculateShapes(updates, indices, shape);\n const flattenShape = [outputSize / sliceSize, sliceSize];\n if (outputSize === 0) {\n return backend2.makeTensorInfo(shape, indices.dtype);\n }\n const flattenIndices = reshape4({ inputs: { x: indices }, backend: backend2, attrs: { shape: [numUpdates, sliceRank] } });\n const flattenX = reshape4({ inputs: { x: updates }, backend: backend2, attrs: { shape: [numUpdates, sliceSize] } });\n const defaultValue = backend2.makeTensorInfo([], \"float32\", new Float32Array([0]));\n const program = new ScatterProgram(numUpdates, sliceRank, flattenIndices.shape.length, flattenX.shape.length, strides, flattenShape);\n const res = backend2.runWebGLProgram(program, [flattenX, flattenIndices, defaultValue], flattenX.dtype);\n const reshaped = reshape4({ inputs: { x: res }, backend: backend2, attrs: { shape } });\n backend2.disposeIntermediateTensorInfo(flattenIndices);\n backend2.disposeIntermediateTensorInfo(flattenX);\n backend2.disposeIntermediateTensorInfo(res);\n backend2.disposeIntermediateTensorInfo(defaultValue);\n return reshaped;\n}\nvar scatterNdConfig2 = {\n kernelName: ScatterNd,\n backendName: \"webgl\",\n kernelFunc: scatterNd2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/search_sorted_gpu.js\nvar SearchSortedProgram = class {\n constructor(batchSize, numInputs, numValues, side) {\n this.variableNames = [\"sortedSequence\", \"values\"];\n this.customUniforms = [{ name: \"numInputs\", type: \"int\" }];\n this.outputShape = [batchSize, numValues];\n const webGL2LoopHead = \"while (left < right) {\";\n const webGL1LoopHead = `for (int i = 0; i < ${Math.ceil(Math.log2(numInputs + 1))}; ++i) { if (left >= right) break;`;\n const loopHead = env().getNumber(\"WEBGL_VERSION\") === 2 ? webGL2LoopHead : webGL1LoopHead;\n const boundComparator = side === \"left\" ? \"<\" : \"<=\";\n this.userCode = `\n int findBound(int batch, float value) {\n int left = 0;\n int right = numInputs;\n int mid;\n ${loopHead}\n mid = (left + right) / 2;\n if (getSortedSequence(batch, mid) ${boundComparator} value) {\n left = mid + 1;\n } else {\n right = mid;\n }\n }\n return right;\n }\n\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n int valueIndex = coords[1];\n\n float value = getValues(batch, valueIndex);\n\n setOutput(float(findBound(batch, value)));\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/SearchSorted.js\nfunction searchSorted3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { sortedSequence, values } = inputs;\n const { side } = attrs;\n const program = new SearchSortedProgram(sortedSequence.shape[0], sortedSequence.shape[1], values.shape[1], side);\n const customValues = [[sortedSequence.shape[1]]];\n return backend2.runWebGLProgram(program, [sortedSequence, values], \"int32\", customValues);\n}\nvar searchSortedConfig2 = {\n kernelName: SearchSorted,\n backendName: \"webgl\",\n kernelFunc: searchSorted3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/select_gpu.js\nvar SelectProgram = class {\n constructor(cRank, shape, rank) {\n this.variableNames = [\"c\", \"a\", \"b\"];\n this.outputShape = shape;\n let cCoords;\n let abCoords;\n if (rank > 4) {\n throw Error(`Where for rank ${rank} is not yet supported`);\n }\n if (rank === 1) {\n abCoords = `resRC`;\n cCoords = `resRC`;\n } else {\n const currentCoords = [\"resRC.x\", \"resRC.y\", \"resRC.z\", \"resRC.w\"];\n const cCoordVars = [];\n const abCoordVars = [];\n for (let i = 0; i < shape.length; i++) {\n abCoordVars.push(`${currentCoords[i]}`);\n if (i < cRank) {\n cCoordVars.push(`${currentCoords[i]}`);\n }\n }\n cCoords = cCoordVars.join();\n abCoords = abCoordVars.join();\n }\n const dtype = getCoordsDataType(rank);\n this.userCode = `\n void main() {\n ${dtype} resRC = getOutputCoords();\n float cVal = getC(${cCoords});\n if (cVal >= 1.0) {\n setOutput(getA(${abCoords}));\n } else {\n setOutput(getB(${abCoords}));\n }\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Select.js\nfunction select3(args) {\n const { inputs, backend: backend2 } = args;\n const { condition, t, e } = inputs;\n const program = new SelectProgram(condition.shape.length, t.shape, t.shape.length);\n return backend2.runWebGLProgram(program, [condition, t, e], upcastType(t.dtype, e.dtype));\n}\nvar selectConfig2 = {\n kernelName: Select,\n backendName: \"webgl\",\n kernelFunc: select3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Selu.js\nvar SELU = `\n // Stable and Attracting Fixed Point (0, 1) for Normalized Weights.\n // see: https://arxiv.org/abs/1706.02515\n float scaleAlpha = ${backend_util_exports.SELU_SCALEALPHA};\n float scale = ${backend_util_exports.SELU_SCALE};\n return (x >= 0.0) ? scale * x : scaleAlpha * (exp(x) - 1.0);\n`;\nvar selu3 = unaryKernelFunc2({ opSnippet: SELU });\nvar seluConfig2 = {\n kernelName: Selu,\n backendName: \"webgl\",\n kernelFunc: selu3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Sigmoid.js\nvar SIGMOID3 = CHECK_NAN_SNIPPET_UNARY + `\n return 1.0 / (1.0 + exp(-1.0 * x));\n`;\nvar SIGMOID_PACKED = `\n vec4 result = 1.0 / (1.0 + exp(-1.0 * x));\n bvec4 isNaN = isnan(x);\n\n result.r = isNaN.r ? x.r : result.r;\n result.g = isNaN.g ? x.g : result.g;\n result.b = isNaN.b ? x.b : result.b;\n result.a = isNaN.a ? x.a : result.a;\n\n return result;\n`;\nvar sigmoid3 = unaryKernelFunc2({\n opSnippet: SIGMOID3,\n packedOpSnippet: SIGMOID_PACKED,\n cpuKernelImpl: sigmoidImplCPU\n});\nvar sigmoidConfig2 = {\n kernelName: Sigmoid,\n backendName: \"webgl\",\n kernelFunc: sigmoid3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Sign.js\nvar SIGN = `\n if (isnan(x)) { return 0.0; }\n return sign(x);\n`;\nvar sign3 = unaryKernelFunc2({ opSnippet: SIGN });\nvar signConfig2 = {\n kernelName: Sign,\n backendName: \"webgl\",\n kernelFunc: sign3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Sin.js\nvar SIN = CHECK_NAN_SNIPPET_UNARY + `\n return sin(x);\n`;\nvar sin3 = unaryKernelFunc2({ opSnippet: SIN });\nvar sinConfig2 = {\n kernelName: Sin,\n backendName: \"webgl\",\n kernelFunc: sin3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Sinh.js\nvar SINH = `\n float e2x = exp(x);\n return (e2x - 1.0 / e2x) / 2.0;\n`;\nvar sinh3 = unaryKernelFunc2({ opSnippet: SINH });\nvar sinhConfig2 = {\n kernelName: Sinh,\n backendName: \"webgl\",\n kernelFunc: sinh3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Softplus.js\nvar SOFTPLUS = `\n float epsilon = 1.1920928955078125e-7;\n float threshold = log(epsilon) + 2.0;\n\n bool too_large = x > -threshold;\n bool too_small = x < threshold;\n\n float result;\n float exp_x = exp(x);\n\n if (too_large){\n result = x;\n }\n else if (too_small){\n result = exp_x;\n }\n else{\n result = log(exp_x + 1.0);\n }\n return result;\n`;\nvar softplus3 = unaryKernelFunc2({ opSnippet: SOFTPLUS });\nvar softplusConfig2 = {\n kernelName: Softplus,\n backendName: \"webgl\",\n kernelFunc: softplus3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/SpaceToBatchND.js\nvar spaceToBatchND3 = (args) => {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { blockShape, paddings } = attrs;\n util_exports.assert(x.shape.length <= 4, () => \"spaceToBatchND for rank > 4 with a WebGL backend not implemented yet\");\n const prod6 = blockShape.reduce((a, b) => a * b);\n const completePaddings = [[0, 0]];\n completePaddings.push(...paddings);\n for (let i = 1 + blockShape.length; i < x.shape.length; ++i) {\n completePaddings.push([0, 0]);\n }\n const toDispose = [];\n const paddedX = padV22({\n inputs: { x },\n backend: backend2,\n attrs: { paddings: completePaddings, constantValue: 0 }\n });\n const reshapedPaddedShape = backend_util_exports.getReshaped(paddedX.shape, blockShape, prod6, false);\n const permutedReshapedPaddedPermutation = backend_util_exports.getPermuted(reshapedPaddedShape.length, blockShape.length, false);\n const flattenShape = backend_util_exports.getReshapedPermuted(paddedX.shape, blockShape, prod6, false);\n const reshapedPaddedX = reshape4({ inputs: { x: paddedX }, backend: backend2, attrs: { shape: reshapedPaddedShape } });\n const paddedXT = transpose3({\n inputs: { x: reshapedPaddedX },\n backend: backend2,\n attrs: { perm: permutedReshapedPaddedPermutation }\n });\n const result = reshape4({ inputs: { x: paddedXT }, backend: backend2, attrs: { shape: flattenShape } });\n toDispose.push(paddedX);\n toDispose.push(reshapedPaddedX);\n toDispose.push(paddedXT);\n toDispose.forEach((t) => backend2.disposeIntermediateTensorInfo(t));\n return result;\n};\nvar spaceToBatchNDConfig2 = {\n kernelName: SpaceToBatchND,\n backendName: \"webgl\",\n kernelFunc: spaceToBatchND3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/SparseFillEmptyRows.js\nfunction sparseFillEmptyRows3(args) {\n const { inputs, backend: backend2 } = args;\n const { indices, values, denseShape, defaultValue } = inputs;\n if (denseShape.shape.length !== 1) {\n throw new Error(`Dense shape must be a vector, saw:\n ${denseShape.shape}`);\n }\n if (indices.shape.length !== 2) {\n throw new Error(`Indices must be a matrix, saw:\n ${indices.shape}`);\n }\n if (values.shape.length !== 1) {\n throw new Error(`Values must be a vector, saw:\n ${values.shape}`);\n }\n if (defaultValue.shape.length !== 0) {\n throw new Error(`Default value must be a scalar, saw:\n ${defaultValue.shape}`);\n }\n const $indices = backend2.readSync(indices.dataId);\n const $values = backend2.readSync(values.dataId);\n const $denseShape = backend2.readSync(denseShape.dataId);\n const $defaultValue = backend2.readSync(defaultValue.dataId)[0];\n const [outputIndices, outputIndicesShape, outputValues, emptyRowIndicator, reverseIndexMap] = sparseFillEmptyRowsImplCPU($indices, indices.shape, indices.dtype, $values, values.dtype, $denseShape, $defaultValue);\n return [\n backend2.makeTensorInfo(outputIndicesShape, indices.dtype, outputIndices),\n backend2.makeTensorInfo([outputIndicesShape[0]], values.dtype, outputValues),\n backend2.makeTensorInfo([emptyRowIndicator.length], \"bool\", new Uint8Array(emptyRowIndicator.map((value) => Number(value)))),\n backend2.makeTensorInfo([reverseIndexMap.length], indices.dtype, new Int32Array(reverseIndexMap))\n ];\n}\nvar sparseFillEmptyRowsConfig2 = {\n kernelName: SparseFillEmptyRows,\n backendName: \"webgl\",\n kernelFunc: sparseFillEmptyRows3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/SparseReshape.js\nfunction sparseReshape3(args) {\n const { inputs, backend: backend2 } = args;\n const { inputIndices, inputShape, newShape } = inputs;\n if (inputIndices.shape.length !== 2) {\n throw new Error(`Input indices should be a matrix but received shape ${inputIndices.shape}`);\n }\n if (inputShape.shape.length !== 1) {\n throw new Error(`Input shape should be a vector but received shape ${inputShape.shape}`);\n }\n if (newShape.shape.length !== 1) {\n throw new Error(`Target shape should be a vector but received shape ${newShape.shape}`);\n }\n const $inputShape = Array.from(backend2.readSync(inputShape.dataId));\n const $inputIndices = backend2.readSync(inputIndices.dataId);\n const targetShape = Array.from(backend2.readSync(newShape.dataId));\n const [newIndices, indicesShape, outputShape] = sparseReshapeImplCPU($inputIndices, inputIndices.shape, inputIndices.dtype, $inputShape, targetShape);\n return [\n backend2.makeTensorInfo(indicesShape, inputIndices.dtype, newIndices),\n backend2.makeTensorInfo([outputShape.length], newShape.dtype, new Int32Array(outputShape))\n ];\n}\nvar sparseReshapeConfig2 = {\n kernelName: SparseReshape,\n backendName: \"webgl\",\n kernelFunc: sparseReshape3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/SparseSegmentMean.js\nfunction sparseSegmentMean3(args) {\n const { inputs, backend: backend2 } = args;\n const { data, indices, segmentIds } = inputs;\n if (data.shape.length < 1) {\n throw new Error(`Data should be at least 1 dimensional but received scalar`);\n }\n if (indices.shape.length !== 1) {\n throw new Error(`Indices should be a vector but received shape\n ${indices.shape}`);\n }\n if (segmentIds.shape.length !== 1) {\n throw new Error(`Segment ids should be a vector but received shape\n ${segmentIds.shape}`);\n }\n const $data = backend2.readSync(data.dataId);\n const $indices = backend2.readSync(indices.dataId);\n const $segmentIds = backend2.readSync(segmentIds.dataId);\n const [outputData, outputDataShape] = sparseSegmentReductionImplCPU($data, data.shape, data.dtype, $indices, $segmentIds, true);\n return backend2.makeTensorInfo(outputDataShape, data.dtype, outputData);\n}\nvar sparseSegmentMeanConfig2 = {\n kernelName: SparseSegmentMean,\n backendName: \"webgl\",\n kernelFunc: sparseSegmentMean3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/SparseSegmentSum.js\nfunction sparseSegmentSum3(args) {\n const { inputs, backend: backend2 } = args;\n const { data, indices, segmentIds } = inputs;\n if (data.shape.length < 1) {\n throw new Error(`Data should be at least 1 dimensional but received scalar`);\n }\n if (indices.shape.length !== 1) {\n throw new Error(`Indices should be a vector but received shape\n ${indices.shape}`);\n }\n if (segmentIds.shape.length !== 1) {\n throw new Error(`Segment ids should be a vector but received shape\n ${segmentIds.shape}`);\n }\n const $data = backend2.readSync(data.dataId);\n const $indices = backend2.readSync(indices.dataId);\n const $segmentIds = backend2.readSync(segmentIds.dataId);\n const [outputData, outputDataShape] = sparseSegmentReductionImplCPU($data, data.shape, data.dtype, $indices, $segmentIds);\n return backend2.makeTensorInfo(outputDataShape, data.dtype, outputData);\n}\nvar sparseSegmentSumConfig2 = {\n kernelName: SparseSegmentSum,\n backendName: \"webgl\",\n kernelFunc: sparseSegmentSum3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/SparseToDense.js\nfunction sparseToDense3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { sparseIndices, sparseValues, defaultValue } = inputs;\n const { outputShape } = attrs;\n const { sliceRank, numUpdates, sliceSize, strides, outputSize } = backend_util_exports.calculateShapes(sparseValues, sparseIndices, outputShape);\n const sumDupeIndices = false;\n if (sparseValues.dtype === \"string\") {\n const indicesBuf = backend2.bufferSync(sparseIndices);\n const updatesBuf = backend2.bufferSync(sparseValues);\n const $defaultValue = util_exports.decodeString(backend2.readSync(defaultValue.dataId)[0]);\n const outBuf = scatterImplCPU(indicesBuf, updatesBuf, outputShape, outputSize, sliceSize, numUpdates, sliceRank, strides, $defaultValue, sumDupeIndices);\n return backend2.makeTensorInfo(outputShape, outBuf.dtype, outBuf.values);\n }\n const program = new ScatterProgram(numUpdates, sliceRank, sparseIndices.shape.length, sparseValues.shape.length, strides, [outputSize, 1], sumDupeIndices);\n const res = backend2.runWebGLProgram(program, [sparseValues, sparseIndices, defaultValue], sparseValues.dtype);\n const reshaped = reshape4({ inputs: { x: res }, backend: backend2, attrs: { shape: outputShape } });\n backend2.disposeIntermediateTensorInfo(res);\n return reshaped;\n}\nvar sparseToDenseConfig2 = {\n kernelName: SparseToDense,\n backendName: \"webgl\",\n kernelFunc: sparseToDense3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/SplitV.js\nfunction splitV2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { numOrSizeSplits, axis } = attrs;\n const $axis = util_exports.parseAxisParam(axis, x.shape)[0];\n const splitSizes = backend_util_exports.prepareSplitSize(x, numOrSizeSplits, $axis);\n const xRank = x.shape.length;\n const begin = new Array(xRank).fill(0);\n const size = x.shape.slice();\n return splitSizes.map((s) => {\n const sliceSize = [...size];\n sliceSize[$axis] = s;\n const sliceT = slice3({ inputs: { x }, backend: backend2, attrs: { begin, size: sliceSize } });\n begin[$axis] += s;\n return sliceT;\n });\n}\nvar splitVConfig2 = {\n kernelName: SplitV,\n backendName: \"webgl\",\n kernelFunc: splitV2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Sqrt.js\nvar SQRT = `return sqrt(x);`;\nvar sqrt3 = unaryKernelFunc2({ opSnippet: SQRT, packedOpSnippet: SQRT, cpuKernelImpl: sqrtImplCPU });\nvar sqrtConfig2 = {\n kernelName: Sqrt,\n backendName: \"webgl\",\n kernelFunc: sqrt3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Square.js\nvar SQUARE = `return x * x;`;\nvar square3 = unaryKernelFunc2({ opSnippet: SQUARE });\nvar squareConfig2 = {\n kernelName: Square,\n backendName: \"webgl\",\n kernelFunc: square3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/SquaredDifference.js\nvar SQUARED_DIFFERENCE = \"return (a - b) * (a - b);\";\nvar squaredDifference3 = binaryKernelFunc2({ opSnippet: SQUARED_DIFFERENCE, packedOpSnippet: SQUARED_DIFFERENCE });\nvar squaredDifferenceConfig2 = {\n kernelName: SquaredDifference,\n backendName: \"webgl\",\n kernelFunc: squaredDifference3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Step.js\nfunction step3({ inputs, attrs, backend: backend2 }) {\n const { x } = inputs;\n const opSnippet = CHECK_NAN_SNIPPET + `\n return x > 0.0 ? 1.0 : float(${attrs.alpha});\n `;\n const program = new UnaryOpProgram(x.shape, opSnippet);\n return backend2.runWebGLProgram(program, [x], x.dtype);\n}\nvar stepConfig2 = {\n kernelName: Step,\n backendName: \"webgl\",\n kernelFunc: step3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/strided_slice_gpu.js\nvar StridedSliceProgram = class {\n constructor(begin, strides, size) {\n this.variableNames = [\"x\"];\n this.outputShape = size;\n const rank = size.length;\n const inputDtype = getCoordsDataType(size.length);\n const dtype = getCoordsDataType(size.length);\n let newCoords = \"\";\n if (rank === 1) {\n newCoords = \"coords * strides + begin\";\n } else {\n let outputAxis = 0;\n newCoords = size.map((_, i) => {\n outputAxis++;\n return size.length === 1 ? `coords * strides[${i}] + begin[${i}]` : `coords[${outputAxis - 1}] * strides[${i}] + begin[${i}]`;\n }).join(\",\");\n }\n this.userCode = `\n ${inputDtype} begin = ${inputDtype}(${begin});\n ${inputDtype} strides = ${inputDtype}(${strides});\n\n void main() {\n ${dtype} coords = getOutputCoords();\n setOutput(getX(${newCoords}));\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/StridedSlice.js\nfunction stridedSlice3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { begin, end, strides, beginMask, endMask, ellipsisMask, newAxisMask, shrinkAxisMask } = attrs;\n const { finalShapeSparse, finalShape, isIdentity, sliceDim0, isSimpleSlice, begin: $begin, end: $end, strides: $strides } = slice_util_exports.sliceInfo(x.shape, begin, end, strides, beginMask, endMask, ellipsisMask, newAxisMask, shrinkAxisMask);\n let result;\n if (isIdentity) {\n result = reshape4({ inputs: { x }, backend: backend2, attrs: { shape: finalShape } });\n } else if (sliceDim0 || isSimpleSlice) {\n util_exports.assert(x.shape.length >= 1, () => `Input must have rank at least 1, got: ${x.shape.length}`);\n const size = slice_util_exports.computeOutShape($begin, $end, $strides);\n const sliced = slice3({ inputs: { x }, backend: backend2, attrs: { begin: $begin, size } });\n result = reshape4({ inputs: { x: sliced }, backend: backend2, attrs: { shape: finalShape } });\n backend2.disposeIntermediateTensorInfo(sliced);\n } else {\n const shouldExecuteOnCPU = backend2.shouldExecuteOnCPU([x]);\n if (shouldExecuteOnCPU) {\n const values = backend2.readSync(x.dataId);\n const xBuf = buffer(x.shape, x.dtype, values);\n const resultValues = stridedSliceImplCPU(finalShapeSparse, xBuf, $strides, $begin);\n result = backend2.makeTensorInfo(finalShape, x.dtype, resultValues.values);\n } else {\n const program = new StridedSliceProgram($begin, $strides, finalShapeSparse);\n result = backend2.runWebGLProgram(program, [x], x.dtype);\n }\n }\n const resultReshaped = reshape4({ inputs: { x: result }, backend: backend2, attrs: { shape: finalShape } });\n backend2.disposeIntermediateTensorInfo(result);\n return resultReshaped;\n}\nvar stridedSliceConfig2 = {\n kernelName: StridedSlice,\n backendName: \"webgl\",\n kernelFunc: stridedSlice3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/StringNGrams.js\nfunction stringNGrams3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { separator, nGramWidths, leftPad, rightPad: rightPad2, padWidth, preserveShortSequences } = attrs;\n const { data, dataSplits } = inputs;\n const $data = backend2.readSync(data.dataId);\n const $dataSplits = backend2.readSync(dataSplits.dataId);\n const [nGrams, nGramsSplits] = stringNGramsImplCPU($data, $dataSplits, separator, nGramWidths, leftPad, rightPad2, padWidth, preserveShortSequences);\n return [\n backend2.makeTensorInfo([nGrams.length], \"string\", nGrams),\n backend2.makeTensorInfo(dataSplits.shape, \"int32\", nGramsSplits)\n ];\n}\nvar stringNGramsConfig2 = {\n kernelName: StringNGrams,\n backendName: \"webgl\",\n kernelFunc: stringNGrams3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/StringSplit.js\nfunction stringSplit3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { skipEmpty } = attrs;\n const { input: input2, delimiter } = inputs;\n if (input2.dtype !== \"string\") {\n throw new Error(\"Input must be of datatype string\");\n }\n if (input2.shape.length !== 1) {\n throw new Error(`Input must be a vector, got shape: ${input2.shape}`);\n }\n if (delimiter.shape.length !== 0) {\n throw new Error(`Delimiter must be a scalar, got shape: ${delimiter.shape}`);\n }\n const $input = backend2.readSync(input2.dataId);\n const $delimiter = backend2.readSync(delimiter.dataId)[0];\n const [indices, values, shape] = stringSplitImplCPU($input, $delimiter, skipEmpty);\n const outputSize = values.length;\n return [\n backend2.makeTensorInfo([outputSize, 2], \"int32\", indices),\n backend2.makeTensorInfo([outputSize], \"string\", values),\n backend2.makeTensorInfo([2], \"int32\", new Int32Array(shape))\n ];\n}\nvar stringSplitConfig2 = {\n kernelName: StringSplit,\n backendName: \"webgl\",\n kernelFunc: stringSplit3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/StringToHashBucketFast.js\nfunction stringToHashBucketFast3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { numBuckets } = attrs;\n const { input: input2 } = inputs;\n if (input2.dtype !== \"string\") {\n throw new Error(\"Input must be of datatype string\");\n }\n if (numBuckets <= 0) {\n throw new Error(`Number of buckets must be at least 1`);\n }\n const $input = backend2.readSync(input2.dataId);\n const output = stringToHashBucketFastImplCPU($input, numBuckets);\n return backend2.makeTensorInfo(input2.shape, \"int32\", output);\n}\nvar stringToHashBucketFastConfig2 = {\n kernelName: StringToHashBucketFast,\n backendName: \"webgl\",\n kernelFunc: stringToHashBucketFast3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Tan.js\nvar TAN = `return tan(x);`;\nvar tan3 = unaryKernelFunc2({ opSnippet: TAN });\nvar tanConfig2 = {\n kernelName: Tan,\n backendName: \"webgl\",\n kernelFunc: tan3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Tanh.js\nvar TANH = `\n float e2x = exp(-2.0 * abs(x));\n return sign(x) * (1.0 - e2x) / (1.0 + e2x);\n`;\nvar tanh4 = unaryKernelFunc2({ opSnippet: TANH });\nvar tanhConfig2 = {\n kernelName: Tanh,\n backendName: \"webgl\",\n kernelFunc: tanh4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/tile_gpu.js\nvar TileProgram = class {\n constructor(aShape, reps) {\n this.variableNames = [\"A\"];\n const outputShape = new Array(aShape.length);\n for (let i = 0; i < outputShape.length; i++) {\n outputShape[i] = aShape[i] * reps[i];\n }\n this.outputShape = outputShape;\n this.rank = outputShape.length;\n const dtype = getCoordsDataType(this.rank);\n const sourceCoords = getSourceCoords3(aShape);\n this.userCode = `\n void main() {\n ${dtype} resRC = getOutputCoords();\n setOutput(getA(${sourceCoords}));\n }\n `;\n }\n};\nfunction getSourceCoords3(aShape) {\n const rank = aShape.length;\n if (rank > 5) {\n throw Error(`Tile for rank ${rank} is not yet supported`);\n }\n if (rank === 1) {\n return `imod(resRC, ${aShape[0]})`;\n }\n const currentCoords = [\"resRC.x\", \"resRC.y\", \"resRC.z\", \"resRC.w\", \"resRC.u\"];\n const sourceCoords = [];\n for (let i = 0; i < aShape.length; i++) {\n sourceCoords.push(`imod(${currentCoords[i]}, ${aShape[i]})`);\n }\n return sourceCoords.join();\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Tile.js\nfunction tile4(params) {\n const { inputs, backend: backend2, attrs } = params;\n const { x } = inputs;\n const { reps } = attrs;\n if (x.dtype === \"string\" || x.shape.length > 5) {\n const data = backend2.readSync(x.dataId);\n const value = x.dtype === \"string\" ? data.map((d) => util_exports.decodeString(d)) : data;\n const buf = buffer(x.shape, x.dtype, value);\n const outBuf = tileImplCPU(buf, reps);\n return backend2.makeTensorInfo(outBuf.shape, outBuf.dtype, outBuf.values);\n }\n const program = new TileProgram(x.shape, reps);\n const output = backend2.runWebGLProgram(program, [x], x.dtype);\n return output;\n}\nvar tileConfig2 = {\n kernelName: Tile,\n backendName: \"webgl\",\n kernelFunc: tile4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/top_k_gpu.js\nvar SwapProgram = class {\n constructor(shape) {\n this.variableNames = [\"x\", \"indices\"];\n this.customUniforms = [\n { name: \"n\", type: \"int\" },\n { name: \"firstPass\", type: \"int\" },\n { name: \"negativeInf\", type: \"float\" },\n { name: \"dir\", type: \"int\" },\n { name: \"inc\", type: \"int\" }\n ];\n this.outputShape = shape;\n this.userCode = `\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n int elemIdx = coords[1];\n\n // We compare elements pair-wise within a group of size 2 * inc.\n // The comparing rule for each group alternates between ascending\n // and descending. Within each group, we compare each pair at\n // positions i and i+inc. To decide whether an element at position i\n // is x0 or x1, we mod it by 2 * inc, if the result is smaller than\n // inc, it is in the first half of the group, we denote it as x0,\n // otherwise we denote it as x1.\n // For example, as shown in the Bitonic top K paper referenced above,\n // Figure5(a) shows that element[1] is in the\n // second half of the group when group size is 2, but it is in the\n // first half of the group when group size is 4.\n\n bool isFirstInPair = imod(elemIdx, 2 * inc) < inc;\n int i = isFirstInPair ? elemIdx : elemIdx - inc;\n\n int i0 = firstPass == 1 ? i : int(getIndices(batch, i));\n int i1 = firstPass == 1 ? i + inc : int(getIndices(batch, i + inc));\n float x0 = i0 < n ? getX(batch, i0) : negativeInf;\n float x1 = i1 < n ? getX(batch, i1) : negativeInf;\n\n // Denotes which direction indices are in (ascending or descending).\n bool reverse = imod(elemIdx, 2 * dir) >= dir;\n bool isGreater = x0 > x1 || (x0 == x1 && i1 > i0);\n if (reverse == isGreater) { // Elements in opposite order of direction\n int iTemp = i0;\n i0 = i1;\n i1 = iTemp;\n }\n if (isFirstInPair) {\n setOutput(float(i0));\n } else {\n setOutput(float(i1));\n }\n }\n `;\n }\n};\nvar MergeProgram = class {\n constructor(shape) {\n this.variableNames = [\"x\", \"indices\"];\n this.customUniforms = [\n { name: \"n\", type: \"int\" },\n { name: \"firstPass\", type: \"int\" },\n { name: \"k\", type: \"int\" }\n ];\n this.outputShape = shape;\n this.userCode = `\n void main() {\n // Takes max of indices (0, k), (1, k + 1), (2, k + 2) ...\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n int elemIdx = coords[1];\n\n // The output size is half of the previous size.\n // If the previous sequence is | | | | _ _ _ _ | | | | _ _ _ _ (k=4),\n // we only need to output the indices at positions |, the indices at\n // positions _ can be thrown away, see Figure5(b) After Phase 2\n // (Merge phase) in the Bitonic Top K paper referenced above.\n // For example, the paper shows we only need to output the orange bars.\n // The output sequence should look like this | | | | | | | |.\n // Because the sequence is halved, to map the output index back\n // to the previous sequence to find the corresponding value,\n // we need to double the index. When we double the index,\n // we basically interpolate a position, so 2i looks like\n // | _ | _ | _ | _ | _ | _ | _. We move the | to the first k position\n // of each 2k positions by - elemIdx % k. E.g. for output at\n // index 4,5,6,7, we want to get the corresponding element at\n // original index 8,9,10,11, for output at index 8,9,10,11,\n // we want to get the corresponding element at original index\n // 16,17,18,19, so on and so forth.\n\n int i = elemIdx < k ? elemIdx : (elemIdx * 2 - imod(elemIdx, k));\n int i0 = firstPass == 1 ? i : int(getIndices(batch, i));\n int i1 = firstPass == 1 ? i + k : int(getIndices(batch, i + k));\n\n float x0 = getX(batch, i0);\n float x1 = i1 < n ? getX(batch, i1) : x0;\n\n setOutput(x0 >= x1 ? float(i0) : float(i1));\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/TopK.js\nfunction disposeIntermediateTensorInfoOrNull(backend2, tensorInfo) {\n if (tensorInfo !== null) {\n backend2.disposeIntermediateTensorInfo(tensorInfo);\n }\n}\nfunction roundUpToPow2(num) {\n let pow22 = 1;\n while (pow22 < num) {\n pow22 *= 2;\n }\n return pow22;\n}\nfunction topK2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { k, sorted } = attrs;\n const TOPK_LAST_DIM_CPU_HANDOFF_SIZE_THRESHOLD = env().getNumber(\"TOPK_LAST_DIM_CPU_HANDOFF_SIZE_THRESHOLD\");\n const TOPK_K_CPU_HANDOFF_THRESHOLD = env().getNumber(\"TOPK_K_CPU_HANDOFF_THRESHOLD\");\n const xShape = x.shape;\n const lastDim = xShape[xShape.length - 1];\n if (backend2.shouldExecuteOnCPU([x]) || lastDim < TOPK_LAST_DIM_CPU_HANDOFF_SIZE_THRESHOLD || k > TOPK_K_CPU_HANDOFF_THRESHOLD) {\n const xVals = backend2.readSync(x.dataId);\n const [allTopKVals, allTopKIndices] = topKImplCPU(xVals, xShape, x.dtype, k, sorted);\n return [\n backend2.makeTensorInfo(allTopKVals.shape, allTopKVals.dtype, allTopKVals.values),\n backend2.makeTensorInfo(allTopKIndices.shape, allTopKIndices.dtype, allTopKIndices.values)\n ];\n }\n if (k === 0) {\n xShape[xShape.length - 1] = 0;\n return [\n backend2.makeTensorInfo(xShape, x.dtype, []),\n backend2.makeTensorInfo(xShape, \"int32\", [])\n ];\n }\n if (lastDim === 1) {\n return [\n x,\n fill3({ attrs: { shape: xShape, dtype: \"int32\", value: 0 }, backend: backend2 })\n ];\n }\n const xtexData = backend2.texData.get(x.dataId);\n const xIsPacked = xtexData !== null && xtexData.isPacked;\n const xUnPacked = xIsPacked ? backend2.unpackTensor(x) : x;\n const xSize = util_exports.sizeFromShape(xShape);\n const batch = xSize / lastDim;\n const x2D = reshape4({ inputs: { x: xUnPacked }, attrs: { shape: [batch, lastDim] }, backend: backend2 });\n if (xIsPacked) {\n disposeIntermediateTensorInfoOrNull(backend2, xUnPacked);\n }\n const kPow2 = roundUpToPow2(k);\n const lastDimPow2 = roundUpToPow2(lastDim);\n let indices = null;\n const getInputs = () => indices === null ? [x2D, x2D] : [x2D, indices];\n const runSwap = (dir, inc, shape) => {\n const inputs2 = getInputs();\n const program = new SwapProgram(shape);\n const fistPass = indices === null ? 1 : 0;\n const customValues = [[lastDim], [fistPass], [Number.NEGATIVE_INFINITY], [dir], [inc]];\n const prevIndices2 = indices;\n indices = backend2.runWebGLProgram(program, inputs2, \"int32\", customValues);\n disposeIntermediateTensorInfoOrNull(backend2, prevIndices2);\n };\n for (let len = 1; len < kPow2; len *= 2) {\n const dir = len * 2;\n for (let inc = len; inc >= 1; inc /= 2) {\n runSwap(dir, inc, [batch, lastDimPow2]);\n }\n }\n for (let indicesSize = lastDimPow2; indicesSize > kPow2; indicesSize /= 2) {\n const inputs2 = getInputs();\n const mergeProgram = new MergeProgram([batch, indicesSize / 2]);\n const firstPass = indices === null ? 1 : 0;\n const customValues = [[lastDim], [firstPass], [kPow2]];\n const prevIndices2 = indices;\n indices = backend2.runWebGLProgram(mergeProgram, inputs2, \"int32\", customValues);\n disposeIntermediateTensorInfoOrNull(backend2, prevIndices2);\n const len = kPow2 / 2;\n const dir = len * 2;\n for (let inc = len; inc >= 1; inc /= 2) {\n runSwap(dir, inc, indices.shape);\n }\n }\n let prevIndices = indices;\n indices = slice3({ inputs: { x: indices }, backend: backend2, attrs: { begin: 0, size: [batch, k] } });\n disposeIntermediateTensorInfoOrNull(backend2, prevIndices);\n let values = gatherV22({ inputs: { x: x2D, indices }, backend: backend2, attrs: { axis: 1, batchDims: 1 } });\n disposeIntermediateTensorInfoOrNull(backend2, x2D);\n const newShape = xShape.slice(0, -1);\n newShape.push(k);\n prevIndices = indices;\n indices = reshape4({ inputs: { x: indices }, attrs: { shape: newShape }, backend: backend2 });\n disposeIntermediateTensorInfoOrNull(backend2, prevIndices);\n const prevValues = values;\n values = reshape4({ inputs: { x: values }, attrs: { shape: newShape }, backend: backend2 });\n disposeIntermediateTensorInfoOrNull(backend2, prevValues);\n return [values, indices];\n}\nvar topKConfig2 = {\n kernelName: TopK,\n backendName: \"webgl\",\n kernelFunc: topK2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/transform_gpu.js\nvar TransformProgram = class {\n constructor(imageHeight, imageWidth, interpolation, fillMode, fillValue, outShape) {\n this.variableNames = [\"Image\", \"Transforms\"];\n this.outputShape = outShape;\n const interpolationModeId = interpolation === \"nearest\" ? 1 : 2;\n let fillModeId;\n switch (fillMode) {\n case \"constant\":\n fillModeId = 1;\n break;\n case \"reflect\":\n fillModeId = 2;\n break;\n case \"wrap\":\n fillModeId = 3;\n break;\n case \"nearest\":\n fillModeId = 4;\n break;\n default:\n fillModeId = 1;\n break;\n }\n this.userCode = `\n float mapCoord(float outCoord, float len) {\n float inCoord = outCoord;\n if(${fillModeId} == 2) {\n if (inCoord < 0.0) {\n if (len <= 1.0) {\n inCoord = 0.0;\n } else {\n float sz2 = 2.0 * len;\n if (inCoord < sz2) {\n inCoord = sz2 * float(int(float(-inCoord / sz2))) +\n inCoord;\n }\n inCoord = inCoord < -len ? inCoord + sz2 : -inCoord - 1.0;\n }\n } else if (inCoord > len - 1.0) {\n if (len <= 1.0) {\n inCoord = 0.0;\n } else {\n float sz2 = 2.0 * len;\n inCoord -= sz2 * float(int(float(inCoord / sz2)));\n if (inCoord >= len) {\n inCoord = sz2 - inCoord - 1.0;\n }\n }\n }\n return clamp(inCoord, 0.0, len - 1.0);\n } else if (${fillModeId} == 3) {\n if (inCoord < 0.0) {\n if (len <= 1.0) {\n inCoord = 0.0;\n } else {\n float sz = len - 1.0;\n inCoord += len * (float(int(float(-inCoord / sz))) + 1.0);\n }\n } else if (inCoord > len - 1.0) {\n if (len <= 1.0) {\n inCoord = 0.0;\n } else {\n float sz = len - 1.0;\n inCoord -= len * float(int(float(inCoord / sz)));\n }\n }\n return clamp(inCoord, 0.0, len - 1.0);\n } else if (${fillModeId} == 4) {\n return clamp(outCoord, 0.0, len - 1.0);\n } else {\n return outCoord;\n }\n }\n\n float readWithFillValue(int batch, int coordY, int coordX,\n int channel) {\n float outputValue;\n if (0 <= coordY && coordY < ${imageHeight} && 0 <= coordX && coordX < ${imageWidth}) {\n outputValue = getImage(batch, coordY, coordX, channel);\n } else {\n outputValue = float(${fillValue});\n }\n return outputValue;\n }\n\n void main() {\n ivec4 coords = getOutputCoords();\n float outputValue;\n int batch = coords[0];\n int x = coords[2];\n int y = coords[1];\n int channel = coords[3];\n float xf = float(x);\n float yf = float(y);\n float a1 = getTransforms(batch, 0);\n float a2 = getTransforms(batch, 1);\n float a3 = getTransforms(batch, 2);\n float b1 = getTransforms(batch, 3);\n float b2 = getTransforms(batch, 4);\n float b3 = getTransforms(batch, 5);\n float c1 = getTransforms(batch, 6);\n float c2 = getTransforms(batch, 7);\n float projection = c1 * xf + c2 * yf + 1.0;\n if (projection == 0.0) {\n outputValue = float(${fillValue});\n } else {\n float inX = (a1 * xf + a2 * yf + a3) / projection;\n float inY = (b1 * xf + b2 * yf + b3) / projection;\n float mapX = mapCoord(inX, float(${imageWidth}));\n float mapY = mapCoord(inY, float(${imageHeight}));\n\n if (${interpolationModeId} == 1) {\n int coordY = int(round(mapY));\n int coordX = int(round(mapX));\n outputValue = readWithFillValue(batch, coordY, coordX,\n channel);\n } else {\n float yFloor = floor(mapY);\n float xFloor = floor(mapX);\n float yCeil = yFloor + 1.0;\n float xCeil = xFloor + 1.0;\n float valueYFloor = (xCeil - mapX) *\n readWithFillValue(batch, int(yFloor), int(xFloor), channel) +\n (mapX - xFloor) *\n readWithFillValue(batch, int(yFloor), int(xCeil), channel);\n float valueYCeil = (xCeil - mapX) *\n readWithFillValue(batch, int(yCeil), int(xFloor), channel) +\n (mapX - xFloor) *\n readWithFillValue(batch, int(yCeil), int(xCeil), channel);\n outputValue = (yCeil - mapY) * valueYFloor +\n (mapY - yFloor) * valueYCeil;\n }\n }\n setOutput(outputValue);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Transform.js\nfunction transform3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { image: image2, transforms } = inputs;\n const { interpolation, fillMode, fillValue, outputShape } = attrs;\n const [batch, imageHeight, imageWidth, numChannels] = image2.shape;\n const [outHeight, outWidth] = outputShape != null ? outputShape : [imageHeight, imageWidth];\n const outShape = [\n batch,\n outHeight,\n outWidth,\n numChannels\n ];\n const program = new TransformProgram(imageHeight, imageWidth, interpolation, fillMode, fillValue, outShape);\n return backend2.runWebGLProgram(program, [image2, transforms], \"float32\");\n}\nvar transformConfig2 = {\n kernelName: Transform,\n backendName: \"webgl\",\n kernelFunc: transform3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Unique.js\nfunction unique4(args) {\n const { inputs, attrs, backend: backend2 } = args;\n const { axis } = attrs;\n const { x } = inputs;\n assertNotComplex2(x, \"unique\");\n console.warn(\"WARNING: \", \"UI might be locked temporarily as data is being downloaded\");\n const values = backend2.readSync(x.dataId);\n const { outputValues, outputShape, indices } = uniqueImplCPU(values, axis, x.shape, x.dtype);\n return [\n backend2.makeTensorInfo(outputShape, x.dtype, outputValues),\n backend2.makeTensorInfo([indices.length], \"int32\", indices)\n ];\n}\nvar uniqueConfig2 = {\n kernelName: Unique,\n backendName: \"webgl\",\n kernelFunc: unique4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Unpack.js\nfunction unpack2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { value } = inputs;\n let { axis } = attrs;\n if (axis < 0) {\n axis += value.shape.length;\n }\n const x = value;\n const xRank = x.shape.length;\n const num = value.shape[axis];\n const outShape = new Array(xRank - 1);\n let outIndex = 0;\n for (let i = 0; i < xRank; i++) {\n if (i !== axis) {\n outShape[outIndex++] = x.shape[i];\n }\n }\n const toDispose = [];\n const begin = new Array(xRank).fill(0);\n const size = x.shape.slice();\n size[axis] = 1;\n const res = new Array(num);\n for (let i = 0; i < res.length; i++) {\n begin[axis] = i;\n const sliced = slice3({ inputs: { x }, backend: backend2, attrs: { begin, size } });\n const reshaped = reshape4({ inputs: { x: sliced }, backend: backend2, attrs: { shape: outShape } });\n res[i] = reshaped;\n toDispose.push(sliced);\n }\n toDispose.forEach((t) => backend2.disposeIntermediateTensorInfo(t));\n return res;\n}\nvar unpackConfig2 = {\n kernelName: Unpack,\n backendName: \"webgl\",\n kernelFunc: unpack2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/segment_gpu.js\nvar SegmentOpProgram = class {\n constructor(segOpInfo, segOpType) {\n this.variableNames = [\"x\", \"segmentIds\"];\n const windowSize = segOpInfo.windowSize;\n const batchSize = segOpInfo.batchSize;\n const inSize = segOpInfo.inSize;\n const numSegments = segOpInfo.numSegments;\n const outSize = numSegments * Math.ceil(inSize / windowSize);\n this.outputShape = [batchSize, outSize];\n const initializationValue = \"0.0\";\n const returnValue = `sumValue`;\n const windowSizeNearestVec4 = Math.floor(windowSize / 4) * 4;\n const windowSizeVec4Remainder = windowSize % 4;\n const updateSnippet = `\n sumValue += dot(values, segFilter);\n `;\n let checkValueOutOfBounds = \"\";\n if (inSize % windowSize > 0) {\n checkValueOutOfBounds = `\n if (inIdx < 0 || inIdx >= ${inSize}) {\n return initializationValue;\n }\n `;\n }\n let checkSegmentIdOutOfBounds = \"\";\n if (inSize % windowSize > 0) {\n checkSegmentIdOutOfBounds = `\n if (inIdx < 0 || inIdx >= ${inSize}) {\n return -1.0;\n }\n `;\n }\n this.userCode = `\n const float initializationValue = ${initializationValue};\n\n float getValue(int batch, int inIdx) {\n ${checkValueOutOfBounds}\n return getX(batch, inIdx);\n }\n\n float getSegmentIdAtIndex(int inIdx) {\n ${checkSegmentIdOutOfBounds}\n return getSegmentIds(inIdx);\n }\n\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n int outIdx = coords[1];\n int inOffset = int(floor(float(outIdx) / float(\n ${numSegments})) * float(${windowSize}));\n int currentSeg = int(mod(float(outIdx), float(${numSegments})));\n\n float sumValue = 0.0;\n\n for (int i = 0; i < ${windowSizeNearestVec4}; i += 4) {\n int inIdx = inOffset + i;\n vec4 values = vec4(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n getValue(batch, inIdx + 2),\n getValue(batch, inIdx + 3)\n );\n\n vec4 segFilter = vec4(\n int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 2)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 3)) == currentSeg ? 1 : 0\n );\n\n ${updateSnippet}\n }\n\n int inIdx = inOffset + ${windowSizeNearestVec4};\n if (${windowSizeVec4Remainder === 1}) {\n vec4 values = vec4(\n getValue(batch, inIdx),\n initializationValue,\n initializationValue,\n initializationValue\n );\n\n int inIdxSeg = int(getSegmentIdAtIndex(inIdx));\n\n vec4 segFilter = vec4(\n int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,\n 0,\n 0,\n 0\n );\n\n ${updateSnippet}\n } else if (${windowSizeVec4Remainder === 2}) {\n vec4 values = vec4(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n initializationValue,\n initializationValue\n );\n\n vec4 segFilter = vec4(\n int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,\n 0,\n 0\n );\n\n ${updateSnippet}\n } else if (${windowSizeVec4Remainder === 3}) {\n vec4 values = vec4(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n getValue(batch, inIdx + 2),\n initializationValue\n );\n\n vec4 segFilter = vec4(\n int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 2)) == currentSeg ? 1 : 0,\n 0\n );\n\n ${updateSnippet}\n }\n setOutput(${returnValue});\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/UnsortedSegmentSum.js\nfunction unsortedSegmentSum3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, segmentIds } = inputs;\n const { numSegments } = attrs;\n const xRank = x.shape.length;\n const toDispose = [];\n let axis = 0;\n const permutation = backend_util_exports.getAxesPermutation([axis], xRank);\n let permutedX = x;\n if (permutation != null) {\n permutedX = transpose3({ inputs: { x }, backend: backend2, attrs: { perm: permutation } });\n toDispose.push(permutedX);\n axis = backend_util_exports.getInnerMostAxes(1, xRank)[0];\n }\n const outShape = backend_util_exports.segment_util.computeOutShape(permutedX.shape, axis, numSegments);\n const inSize = util_exports.sizeFromShape([permutedX.shape[axis]]);\n const a2D = reshape4({ inputs: { x: permutedX }, backend: backend2, attrs: { shape: [-1, inSize] } });\n toDispose.push(a2D);\n const outputDType = sumOutType(x.dtype);\n const segOpCompute = (x2, segOpType, segmentIds2, dtype, numSegments2) => {\n const batchSize = x2.shape[0];\n const inSize2 = x2.shape[1];\n const windowSize = backend_util_exports.segment_util.segOpComputeOptimalWindowSize(inSize2, numSegments2);\n const segOpInfo = { windowSize, inSize: inSize2, batchSize, numSegments: numSegments2 };\n const program = new SegmentOpProgram(segOpInfo, segOpType);\n const output = backend2.compileAndRun(program, [x2, segmentIds2], dtype);\n toDispose.push(output);\n if (output.shape[1] === numSegments2) {\n return output;\n }\n const rangeInfo = range4({\n backend: backend2,\n attrs: { start: 0, stop: numSegments2, step: 1, dtype: \"float32\" }\n });\n const tileInfo = tile4({\n inputs: { x: rangeInfo },\n backend: backend2,\n attrs: { reps: [inSize2 / windowSize] }\n });\n toDispose.push(rangeInfo);\n toDispose.push(tileInfo);\n const result2 = segOpCompute(output, segOpType, tileInfo, dtype, numSegments2);\n return result2;\n };\n const segOpResult = segOpCompute(a2D, \"unsortedSegmentSum\", segmentIds, outputDType, numSegments);\n const reshaped = reshape4({ inputs: { x: segOpResult }, backend: backend2, attrs: { shape: outShape } });\n let result = reshaped;\n if (permutation != null) {\n toDispose.push(reshaped);\n const perm = backend_util_exports.getUndoAxesPermutation(permutation);\n result = transpose3({ inputs: { x: result }, backend: backend2, attrs: { perm } });\n }\n toDispose.forEach((t) => backend2.disposeIntermediateTensorInfo(t));\n return result;\n}\nvar unsortedSegmentSumConfig2 = {\n kernelName: UnsortedSegmentSum,\n backendName: \"webgl\",\n kernelFunc: unsortedSegmentSum3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/register_all_kernels.js\nvar kernelConfigs2 = [\n _fusedMatMulConfig2,\n absConfig2,\n acosConfig2,\n acoshConfig2,\n addConfig2,\n addNConfig2,\n allConfig2,\n anyConfig2,\n argMaxConfig2,\n argMinConfig2,\n asinConfig2,\n asinhConfig2,\n atanConfig2,\n atan2Config2,\n atanhConfig2,\n avgPoolConfig2,\n avgPool3DConfig2,\n avgPool3DGradConfig3,\n avgPoolGradConfig3,\n batchMatMulConfig2,\n batchNormConfig2,\n batchToSpaceNDConfig2,\n bincountConfig2,\n broadcastArgsConfig2,\n castConfig2,\n ceilConfig2,\n clipByValueConfig2,\n complexConfig2,\n complexAbsConfig2,\n concatConfig2,\n conv2DConfig2,\n conv2DBackpropFilterConfig2,\n conv2DBackpropInputConfig2,\n conv3DConfig2,\n conv3DBackpropFilterV2Config2,\n conv3DBackpropInputConfig,\n cosConfig2,\n coshConfig2,\n cropAndResizeConfig2,\n cumprodConfig2,\n cumsumConfig2,\n denseBincountConfig2,\n depthToSpaceConfig2,\n depthwiseConv2dNativeConfig2,\n depthwiseConv2dNativeBackpropFilterConfig2,\n depthwiseConv2dNativeBackpropInputConfig2,\n diagConfig2,\n dilation2DConfig2,\n einsumConfig2,\n eluConfig2,\n eluGradConfig3,\n equalConfig2,\n erfConfig2,\n expConfig2,\n expandDimsConfig2,\n expm1Config2,\n fftConfig2,\n fillConfig2,\n flipLeftRightConfig2,\n floorConfig2,\n floorDivConfig2,\n fromPixelsConfig,\n fusedConv2DConfig2,\n fusedDepthwiseConv2DConfig2,\n gatherNdConfig2,\n gatherV2Config2,\n greaterConfig2,\n greaterEqualConfig2,\n identityConfig2,\n ifftConfig2,\n imagConfig2,\n isFiniteConfig2,\n isInfConfig2,\n isNaNConfig2,\n leakyReluConfig2,\n lessConfig2,\n lessEqualConfig2,\n linSpaceConfig2,\n logConfig2,\n log1pConfig2,\n logicalAndConfig2,\n logicalNotConfig2,\n logicalOrConfig2,\n LRNConfig2,\n LRNGradConfig2,\n maxConfig2,\n maximumConfig2,\n maxPoolConfig2,\n maxPool3DConfig2,\n maxPool3DGradConfig3,\n maxPoolGradConfig3,\n maxPoolWithArgmaxConfig2,\n meanConfig2,\n minConfig2,\n minimumConfig2,\n mirrorPadConfig2,\n modConfig2,\n multinomialConfig2,\n multiplyConfig2,\n negConfig2,\n nonMaxSuppressionV3Config2,\n nonMaxSuppressionV4Config2,\n nonMaxSuppressionV5Config2,\n notEqualConfig2,\n oneHotConfig2,\n onesLikeConfig2,\n packConfig2,\n padV2Config2,\n powConfig2,\n preluConfig2,\n prodConfig2,\n raggedTensorToTensorConfig2,\n rangeConfig2,\n realConfig2,\n realDivConfig2,\n reciprocalConfig2,\n reluConfig2,\n relu6Config2,\n reshapeConfig2,\n resizeBilinearConfig2,\n resizeBilinearGradConfig3,\n resizeNearestNeighborConfig2,\n resizeNearestNeighborGradConfig3,\n reverseConfig2,\n rotateWithOffsetConfig2,\n roundConfig2,\n rsqrtConfig2,\n scatterNdConfig2,\n searchSortedConfig2,\n selectConfig2,\n seluConfig2,\n sigmoidConfig2,\n signConfig2,\n sinConfig2,\n sinhConfig2,\n sliceConfig2,\n softmaxConfig2,\n softplusConfig2,\n spaceToBatchNDConfig2,\n sparseFillEmptyRowsConfig2,\n sparseReshapeConfig2,\n sparseSegmentMeanConfig2,\n sparseSegmentSumConfig2,\n sparseToDenseConfig2,\n splitVConfig2,\n sqrtConfig2,\n squareConfig2,\n squaredDifferenceConfig2,\n stepConfig2,\n stridedSliceConfig2,\n stringNGramsConfig2,\n stringSplitConfig2,\n stringToHashBucketFastConfig2,\n subConfig2,\n sumConfig2,\n tanConfig2,\n tanhConfig2,\n tileConfig2,\n topKConfig2,\n transformConfig2,\n transposeConfig2,\n uniqueConfig2,\n unpackConfig2,\n unsortedSegmentSumConfig2,\n zerosLikeConfig2\n];\nfor (const kernelConfig of kernelConfigs2) {\n registerKernel(kernelConfig);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/types.js\nvar CppDType;\n(function(CppDType2) {\n CppDType2[CppDType2[\"float32\"] = 0] = \"float32\";\n CppDType2[CppDType2[\"int32\"] = 1] = \"int32\";\n CppDType2[CppDType2[\"bool\"] = 2] = \"bool\";\n CppDType2[CppDType2[\"string\"] = 3] = \"string\";\n CppDType2[CppDType2[\"complex64\"] = 4] = \"complex64\";\n})(CppDType || (CppDType = {}));\nvar FusableActivation;\n(function(FusableActivation2) {\n FusableActivation2[FusableActivation2[\"linear\"] = 0] = \"linear\";\n FusableActivation2[FusableActivation2[\"relu\"] = 1] = \"relu\";\n FusableActivation2[FusableActivation2[\"relu6\"] = 2] = \"relu6\";\n FusableActivation2[FusableActivation2[\"prelu\"] = 3] = \"prelu\";\n FusableActivation2[FusableActivation2[\"leakyrelu\"] = 4] = \"leakyrelu\";\n FusableActivation2[FusableActivation2[\"sigmoid\"] = 5] = \"sigmoid\";\n FusableActivation2[FusableActivation2[\"elu\"] = 6] = \"elu\";\n})(FusableActivation || (FusableActivation = {}));\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/_FusedMatMul.js\nvar wasmFusedMatMul;\nfunction setup(backend2) {\n wasmFusedMatMul = backend2.wasm.cwrap(_FusedMatMul, null, [\n \"number\",\n \"array\",\n \"number\",\n \"number\",\n \"array\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction fusedBatchMatMul(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { a, b, bias, preluActivationWeights } = inputs;\n if (a.dtype !== \"float32\" || b.dtype !== \"float32\") {\n throw new Error(`_FusedMatMul for non non-float32 tensors not yet supported.`);\n }\n const { transposeA, transposeB, activation: activation2, leakyreluAlpha } = attrs;\n const aId = backend2.dataIdMap.get(a.dataId).id;\n const bId = backend2.dataIdMap.get(b.dataId).id;\n let biasId = 0;\n if (bias != null) {\n const biasData = backend2.dataIdMap.get(bias.dataId);\n if (biasData.shape.length !== 1) {\n throw new Error(`_FusedMatMul only supports rank-1 bias but got rank ${biasData.shape.length}.`);\n }\n biasId = biasData.id;\n }\n const preluActivationWeightsId = preluActivationWeights == null ? 0 : backend2.dataIdMap.get(preluActivationWeights.dataId).id;\n const fusedActivation = FusableActivation[activation2];\n if (fusedActivation == null) {\n throw new Error(`${activation2} activation not yet supported for FusedConv2D in the wasm backend.`);\n }\n const leftDim = transposeA ? a.shape[2] : a.shape[1];\n const rightDim = transposeB ? b.shape[1] : b.shape[2];\n const batchDims = broadcast_util_exports.assertAndGetBroadcastShape(a.shape.slice(0, -2), b.shape.slice(0, -2));\n const out = backend2.makeOutput([...batchDims, leftDim, rightDim], a.dtype);\n const outId = backend2.dataIdMap.get(out.dataId).id;\n const aShapeBytes = new Uint8Array(new Int32Array(a.shape).buffer);\n const bShapeBytes = new Uint8Array(new Int32Array(b.shape).buffer);\n wasmFusedMatMul(aId, aShapeBytes, a.shape.length, bId, bShapeBytes, b.shape.length, transposeA, transposeB, fusedActivation, biasId, preluActivationWeightsId, leakyreluAlpha || 0, outId);\n return out;\n}\nvar _fusedMatMulConfig3 = {\n kernelName: _FusedMatMul,\n backendName: \"wasm\",\n setupFunc: setup,\n kernelFunc: fusedBatchMatMul\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/unary_kernel.js\nfunction createUnaryKernelConfig(kernelName, outType) {\n let wasmFunc9;\n function setupFunc3(backend2) {\n wasmFunc9 = backend2.wasm.cwrap(kernelName, null, [\n \"number\",\n \"number\",\n \"number\"\n ]);\n }\n function kernelFunc3(args) {\n const { backend: backend2, inputs: { x } } = args;\n const xId = backend2.dataIdMap.get(x.dataId).id;\n const out = backend2.makeOutput(x.shape, outType || x.dtype);\n const outId = backend2.dataIdMap.get(out.dataId).id;\n if (util_exports.sizeFromShape(out.shape) === 0) {\n return out;\n }\n wasmFunc9(xId, CppDType[x.dtype], outId);\n return out;\n }\n return { kernelName, backendName: \"wasm\", setupFunc: setupFunc3, kernelFunc: kernelFunc3 };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Abs.js\nvar absConfig3 = createUnaryKernelConfig(Abs);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/binary_kernel.js\nfunction createBinaryKernelConfig(kernelName, supportsFullBroadcast19, dtype) {\n let wasmFunc9;\n function setupFunc3(backend2) {\n wasmFunc9 = backend2.wasm.cwrap(kernelName, null, [\n \"number\",\n \"array\",\n \"number\",\n \"number\",\n \"array\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n }\n function kernelFunc3(args) {\n const { backend: backend2, inputs } = args;\n const { a, b } = inputs;\n const aId = backend2.dataIdMap.get(a.dataId).id;\n const bId = backend2.dataIdMap.get(b.dataId).id;\n const outputType = dtype != null ? dtype : a.dtype;\n const newShape = backend_util_exports.assertAndGetBroadcastShape(a.shape, b.shape);\n const out = backend2.makeOutput(newShape, outputType);\n if (util_exports.sizeFromShape(newShape) === 0) {\n return out;\n }\n const aShapeBytes = new Uint8Array(new Int32Array(a.shape).buffer);\n const bShapeBytes = new Uint8Array(new Int32Array(b.shape).buffer);\n const outId = backend2.dataIdMap.get(out.dataId).id;\n const kernelFunc4 = () => wasmFunc9(aId, aShapeBytes, a.shape.length, bId, bShapeBytes, b.shape.length, CppDType[a.dtype], outId);\n kernelFunc4();\n return out;\n }\n return { kernelName, backendName: \"wasm\", setupFunc: setupFunc3, kernelFunc: kernelFunc3 };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Add.js\nvar supportsFullBroadcast = true;\nvar addConfig3 = createBinaryKernelConfig(Add, supportsFullBroadcast);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/AddN.js\nvar wasmFunc;\nfunction setupFunc(backend2) {\n wasmFunc = backend2.wasm.cwrap(AddN, null, [\n \"array\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction addn(args) {\n const { inputs, backend: backend2 } = args;\n const out = backend2.makeOutput(inputs[0].shape, inputs[0].dtype);\n if (util_exports.sizeFromShape(out.shape) === 0) {\n return out;\n }\n const inputIds = inputs.map((x) => backend2.dataIdMap.get(x.dataId).id);\n const inputIdsBytes = new Uint8Array(new Int32Array(inputIds).buffer);\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmFunc(inputIdsBytes, inputIds.length, CppDType[out.dtype], outId);\n return out;\n}\nvar addNConfig3 = {\n kernelName: AddN,\n backendName: \"wasm\",\n setupFunc,\n kernelFunc: addn\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Identity.js\nfunction identity4(args) {\n const { inputs: { x }, backend: backend2 } = args;\n const out = backend2.makeOutput(x.shape, x.dtype);\n const inVals = backend2.typedArrayFromHeap(x);\n const outVals = backend2.typedArrayFromHeap(out);\n outVals.set(inVals);\n return out;\n}\nvar identityConfig3 = {\n kernelName: Identity,\n backendName: \"wasm\",\n kernelFunc: identity4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Transpose.js\nvar wasmTranspose;\nfunction setup2(backend2) {\n wasmTranspose = backend2.wasm.cwrap(Transpose, null, [\n \"number\",\n \"array\",\n \"number\",\n \"number\",\n \"number\",\n \"array\",\n \"number\"\n ]);\n}\nfunction transpose4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const [reducedShape, perm] = removeOneSizeDims(inputs.x.shape, attrs.perm);\n let permIsNoOp = true;\n for (let i = 0; i < perm.length; i++) {\n if (perm[i] !== i) {\n permIsNoOp = false;\n }\n }\n const outShape = computeOutShape4(inputs.x.shape, attrs.perm);\n const x = {\n dataId: inputs.x.dataId,\n shape: reducedShape,\n dtype: inputs.x.dtype\n };\n if (permIsNoOp) {\n const cloned = identity4({ inputs, backend: backend2 });\n cloned.shape = outShape;\n return cloned;\n }\n const out = backend2.makeOutput(outShape, x.dtype);\n const xId = backend2.dataIdMap.get(x.dataId).id;\n const outId = backend2.dataIdMap.get(out.dataId).id;\n const permBytes = new Uint8Array(new Int32Array(perm).buffer);\n const xShapeBytes = new Uint8Array(new Int32Array(x.shape).buffer);\n wasmTranspose(xId, xShapeBytes, x.shape.length, CppDType[x.dtype], outId, permBytes, perm.length);\n return out;\n}\nfunction computeOutShape4(inShape, perm) {\n const outShape = new Array(inShape.length);\n for (let i = 0; i < outShape.length; i++) {\n outShape[i] = inShape[perm[i]];\n }\n return outShape;\n}\nfunction removeOneSizeDims(shape, perm) {\n const newShape = [];\n const newPerm = [];\n for (let i = 0; i < shape.length; ++i) {\n if (shape[i] !== 1) {\n newShape.push(shape[i]);\n }\n if (shape[perm[i]] !== 1) {\n newPerm.push(perm[i]);\n }\n }\n for (let i = 0; i < newPerm.length; ++i) {\n let minValIdx = -1;\n for (let j = 0; j < newPerm.length; ++j) {\n if (newPerm[j] >= i && (minValIdx === -1 || newPerm[minValIdx] > newPerm[j])) {\n minValIdx = j;\n }\n }\n newPerm[minValIdx] = i;\n }\n return [newShape, newPerm];\n}\nvar transposeConfig3 = {\n kernelName: Transpose,\n backendName: \"wasm\",\n kernelFunc: transpose4,\n setupFunc: setup2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/kernel_utils.js\nfunction permuteAxesAndTranspose(x, axis, backend2) {\n const xShape = x.shape;\n const xRank = x.shape.length;\n const originalAxes = util_exports.parseAxisParam(axis, xShape);\n let axes = originalAxes;\n const permutedAxes = backend_util_exports.getAxesPermutation(axes, xRank);\n let xTransposed = null;\n let inputWasTransposed = false;\n if (permutedAxes != null) {\n const newShape = new Array(xRank);\n for (let i = 0; i < newShape.length; i++) {\n newShape[i] = xShape[permutedAxes[i]];\n }\n axes = backend_util_exports.getInnerMostAxes(axes.length, xRank);\n xTransposed = transpose4({ inputs: { x }, attrs: { perm: permutedAxes }, backend: backend2 });\n const xId = backend2.dataIdMap.get(x.dataId).id;\n const transposedId = backend2.dataIdMap.get(xTransposed.dataId).id;\n if (transposedId !== xId) {\n inputWasTransposed = true;\n }\n }\n return { transposed: xTransposed, originalAxes, axes, inputWasTransposed };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/All.js\nvar wasmAll;\nfunction setup3(backend2) {\n wasmAll = backend2.wasm.cwrap(All, null, [\"number, number, number\"]);\n}\nfunction all4(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { axis, keepDims } = attrs;\n const { x } = inputs;\n const xId = backend2.dataIdMap.get(x.dataId).id;\n let inputId = xId;\n let input2 = x;\n const { transposed, axes, originalAxes, inputWasTransposed } = permuteAxesAndTranspose(x, axis, backend2);\n if (inputWasTransposed) {\n const transposedId = backend2.dataIdMap.get(transposed.dataId).id;\n input2 = transposed;\n inputId = transposedId;\n }\n const inputRank = input2.shape.length;\n backend_util_exports.assertAxesAreInnerMostDims(\"all\", axes, inputRank);\n const [outShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes(input2.shape, axes);\n const reduceSize = util_exports.sizeFromShape(reduceShape);\n const out = backend2.makeOutput(outShape, x.dtype);\n if (util_exports.sizeFromShape(input2.shape) !== 0) {\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmAll(inputId, reduceSize, outId);\n }\n if (inputWasTransposed) {\n backend2.disposeData(transposed.dataId);\n }\n if (keepDims) {\n const newShape = backend_util_exports.expandShapeToKeepDim(out.shape, originalAxes);\n out.shape = newShape;\n }\n return out;\n}\nvar allConfig3 = {\n kernelName: All,\n backendName: \"wasm\",\n setupFunc: setup3,\n kernelFunc: all4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Any.js\nvar wasmAny;\nfunction setup4(backend2) {\n wasmAny = backend2.wasm.cwrap(Any, null, [\"number, number, number\"]);\n}\nfunction any4(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { axis, keepDims } = attrs;\n const { x } = inputs;\n const xId = backend2.dataIdMap.get(x.dataId).id;\n let inputId = xId;\n let input2 = x;\n const { transposed, axes, originalAxes, inputWasTransposed } = permuteAxesAndTranspose(x, axis, backend2);\n if (inputWasTransposed) {\n const transposedId = backend2.dataIdMap.get(transposed.dataId).id;\n input2 = transposed;\n inputId = transposedId;\n }\n const inputRank = input2.shape.length;\n backend_util_exports.assertAxesAreInnerMostDims(\"any\", axes, inputRank);\n const [outShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes(input2.shape, axes);\n const reduceSize = util_exports.sizeFromShape(reduceShape);\n const out = backend2.makeOutput(outShape, x.dtype);\n if (util_exports.sizeFromShape(input2.shape) !== 0) {\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmAny(inputId, reduceSize, outId);\n }\n if (inputWasTransposed) {\n backend2.disposeData(transposed.dataId);\n }\n if (keepDims) {\n const newShape = backend_util_exports.expandShapeToKeepDim(out.shape, originalAxes);\n out.shape = newShape;\n }\n return out;\n}\nvar anyConfig3 = {\n kernelName: Any,\n backendName: \"wasm\",\n setupFunc: setup4,\n kernelFunc: any4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/ArgMax.js\nvar wasmFunc2;\nfunction setup5(backend2) {\n wasmFunc2 = backend2.wasm.cwrap(ArgMax, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction argmax(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { axis } = attrs;\n const { x } = inputs;\n const xId = backend2.dataIdMap.get(x.dataId).id;\n let inputId = xId;\n let input2 = x;\n const { transposed, axes, inputWasTransposed } = permuteAxesAndTranspose(x, axis, backend2);\n if (inputWasTransposed) {\n const transposedId = backend2.dataIdMap.get(transposed.dataId).id;\n if (transposedId !== xId) {\n input2 = transposed;\n inputId = transposedId;\n }\n }\n const outShape = input2.shape.slice(0, -1);\n const out = backend2.makeOutput(outShape, \"int32\");\n const outId = backend2.dataIdMap.get(out.dataId).id;\n const outerSize = util_exports.sizeFromShape(out.shape);\n const innerSize = input2.shape[axes[0]];\n wasmFunc2(inputId, CppDType[input2.dtype], outerSize, innerSize, outId);\n if (inputWasTransposed) {\n backend2.disposeData(transposed.dataId);\n }\n return out;\n}\nvar argMaxConfig3 = {\n kernelName: ArgMax,\n backendName: \"wasm\",\n kernelFunc: argmax,\n setupFunc: setup5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/AvgPool.js\nvar wasmAvgPool;\nfunction setup6(backend2) {\n wasmAvgPool = backend2.wasm.cwrap(AvgPool, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction avgPool4(args) {\n const { inputs, attrs, backend: backend2 } = args;\n const x = inputs.x;\n const xId = backend2.dataIdMap.get(x.dataId).id;\n const { filterSize, strides, pad: pad3, dimRoundingMode } = attrs;\n const convInfo = backend_util_exports.computePool2DInfo(x.shape, filterSize, strides, 1, pad3, dimRoundingMode);\n const filterHeight = convInfo.filterHeight;\n const filterWidth = convInfo.filterWidth;\n const padTop = convInfo.padInfo.top;\n const padRight = convInfo.padInfo.right;\n const padBottom = convInfo.padInfo.bottom;\n const padLeft = convInfo.padInfo.left;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const channels = convInfo.inChannels;\n if (convInfo.dataFormat !== \"channelsLast\") {\n throw new Error(`wasm backend does not support dataFormat:'${convInfo.dataFormat}'. Please use 'channelsLast'.`);\n }\n if (convInfo.dilationWidth !== 1 || convInfo.dilationHeight !== 1) {\n throw new Error(`was backend only supports average pooling with dilation = [1, 1], got [${convInfo.dilationHeight}, ${convInfo.dilationWidth}].`);\n }\n const out = backend2.makeOutput(convInfo.outShape, \"float32\");\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmAvgPool(xId, x.shape[0], x.shape[1], x.shape[2], filterHeight, filterWidth, padTop, padRight, padBottom, padLeft, strideHeight, strideWidth, channels, outId);\n return out;\n}\nvar avgPoolConfig3 = {\n kernelName: AvgPool,\n backendName: \"wasm\",\n setupFunc: setup6,\n kernelFunc: avgPool4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Reshape.js\nfunction reshape5(args) {\n const { inputs, attrs } = args;\n const { x } = inputs;\n const { shape } = attrs;\n const xSize = util_exports.sizeFromShape(x.shape);\n const $shape = util_exports.inferFromImplicitShape(shape, xSize);\n util_exports.assert(xSize === util_exports.sizeFromShape($shape), () => `new shape: ${$shape}, old shape: ${x.shape}. New shape and old shape must have the same number of elements.`);\n args.backend.incRef(x.dataId);\n return { dataId: x.dataId, shape: $shape, dtype: x.dtype };\n}\nvar reshapeConfig3 = {\n kernelName: Reshape,\n backendName: \"wasm\",\n kernelFunc: reshape5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/BatchMatMul.js\nvar wasmBatchMatMul;\nfunction setup7(backend2) {\n wasmBatchMatMul = backend2.wasm.cwrap(BatchMatMul, null, [\n \"number\",\n \"array\",\n \"number\",\n \"number\",\n \"array\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction batchMatMul3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { a, b } = inputs;\n const { transposeA, transposeB } = attrs;\n if (a.dtype !== \"float32\" || b.dtype !== \"float32\") {\n throw new Error(`BatchMatMul for non non-float32 tensors not yet supported.`);\n }\n const aRank = a.shape.length;\n const bRank = b.shape.length;\n const innerShapeA = transposeA ? a.shape[aRank - 2] : a.shape[aRank - 1];\n const innerShapeB = transposeB ? b.shape[bRank - 1] : b.shape[bRank - 2];\n const outerShapeA = transposeA ? a.shape[aRank - 1] : a.shape[aRank - 2];\n const outerShapeB = transposeB ? b.shape[bRank - 2] : b.shape[bRank - 1];\n const outerDimsA = a.shape.slice(0, -2);\n const outerDimsB = b.shape.slice(0, -2);\n const batchDimA = util_exports.sizeFromShape(outerDimsA);\n const batchDimB = util_exports.sizeFromShape(outerDimsB);\n const outShapeOuterDims = broadcast_util_exports.assertAndGetBroadcastShape(a.shape.slice(0, -2), b.shape.slice(0, -2));\n const outShape = outShapeOuterDims.concat([outerShapeA, outerShapeB]);\n util_exports.assert(innerShapeA === innerShapeB, () => `Error in matMul: inner shapes (${innerShapeA}) and (${innerShapeB}) of Tensors with shapes ${a.shape} and ${b.shape} and transposeA=${transposeA} and transposeB=${transposeB} must match.`);\n const a3dShape = transposeA ? [batchDimA, innerShapeA, outerShapeA] : [batchDimA, outerShapeA, innerShapeA];\n const b3dShape = transposeB ? [batchDimB, outerShapeB, innerShapeB] : [batchDimB, innerShapeB, outerShapeB];\n const a3d = reshape5({ inputs: { x: a }, backend: backend2, attrs: { shape: a3dShape } });\n const b3d = reshape5({ inputs: { x: b }, backend: backend2, attrs: { shape: b3dShape } });\n const a3dId = backend2.dataIdMap.get(a3d.dataId).id;\n const b3dId = backend2.dataIdMap.get(b3d.dataId).id;\n const leftDim = transposeA ? a3d.shape[2] : a3d.shape[1];\n const rightDim = transposeB ? b3d.shape[1] : b3d.shape[2];\n const batchDim = Math.max(batchDimA, batchDimB);\n const out = backend2.makeOutput([batchDim, leftDim, rightDim], a3d.dtype);\n const outId = backend2.dataIdMap.get(out.dataId).id;\n const aShapeBytes = new Uint8Array(new Int32Array(a3d.shape).buffer);\n const bShapeBytes = new Uint8Array(new Int32Array(b3d.shape).buffer);\n wasmBatchMatMul(a3dId, aShapeBytes, a3d.shape.length, b3dId, bShapeBytes, b3d.shape.length, transposeA, transposeB, outId);\n backend2.disposeData(a3d.dataId);\n backend2.disposeData(b3d.dataId);\n out.shape = outShape;\n return out;\n}\nvar batchMatMulConfig3 = {\n kernelName: BatchMatMul,\n backendName: \"wasm\",\n setupFunc: setup7,\n kernelFunc: batchMatMul3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Slice.js\nfunction slice4(args) {\n const { inputs: { x }, attrs: { begin, size }, backend: backend2 } = args;\n const [begin_, size_] = slice_util_exports.parseSliceParams(x, begin, size);\n const isContinous = slice_util_exports.isSliceContinous(x.shape, begin_, size_);\n const xVals = backend2.readSync(x.dataId);\n const out = backend2.makeOutput(size_, x.dtype);\n const xStrides = util_exports.computeStrides(x.shape);\n const outData = backend2.dataIdMap.get(out.dataId);\n if (isContinous) {\n const flatOffset = slice_util_exports.computeFlatOffset(begin_, xStrides);\n if (x.dtype === \"string\") {\n outData.stringBytes = xVals.slice(flatOffset, flatOffset + util_exports.sizeFromShape(size_));\n } else {\n const outVals2 = backend2.typedArrayFromHeap(out);\n outVals2.set(xVals.subarray(flatOffset, flatOffset + util_exports.sizeFromShape(size_)));\n }\n return out;\n }\n if (x.dtype === \"string\") {\n const res = sliceImpl(xVals, begin_, size_, x.shape, x.dtype);\n outData.stringBytes = res;\n return out;\n }\n const outVals = backend2.typedArrayFromHeap(out);\n const rank = x.shape.length;\n if (rank === 2) {\n slice2d2(xVals, xStrides[0], outVals, begin_, size_);\n } else if (rank === 3) {\n slice3d2(xVals, xStrides[0], xStrides[1], outVals, begin_, size_);\n } else if (rank === 4) {\n slice4d2(xVals, xStrides[0], xStrides[1], xStrides[2], outVals, begin_, size_);\n } else {\n const res = sliceImpl(xVals, begin_, size_, x.shape, x.dtype);\n outVals.set(res);\n }\n return out;\n}\nfunction slice2d2(xVals, xStride, outVals, begin, size) {\n let outOffset = 0;\n const beginI = begin[0];\n const beginJ = begin[1];\n const endI = beginI + size[0];\n for (let i = beginI; i < endI; i++) {\n const xOffset = i * xStride + beginJ;\n outVals.set(xVals.subarray(xOffset, xOffset + size[1]), outOffset);\n outOffset += size[1];\n }\n}\nfunction slice3d2(xVals, xStride1, xStride2, outVals, begin, size) {\n let outOffset = 0;\n const beginI = begin[0];\n const beginJ = begin[1];\n const beginK = begin[2];\n const endI = beginI + size[0];\n const endJ = beginJ + size[1];\n for (let i = beginI; i < endI; i++) {\n for (let j = beginJ; j < endJ; j++) {\n const xOffset = i * xStride1 + j * xStride2 + beginK;\n outVals.set(xVals.subarray(xOffset, xOffset + size[2]), outOffset);\n outOffset += size[2];\n }\n }\n}\nfunction slice4d2(xVals, xStride1, xStride2, xStride3, outVals, begin, size) {\n let outOffset = 0;\n const beginI = begin[0];\n const beginJ = begin[1];\n const beginK = begin[2];\n const endI = beginI + size[0];\n const endJ = beginJ + size[1];\n const endK = beginK + size[2];\n const beginL = begin[3];\n for (let i = beginI; i < endI; i++) {\n for (let j = beginJ; j < endJ; j++) {\n for (let k = beginK; k < endK; k++) {\n const xOffset = i * xStride1 + j * xStride2 + k * xStride3 + beginL;\n outVals.set(xVals.subarray(xOffset, xOffset + size[3]), outOffset);\n outOffset += size[3];\n }\n }\n }\n}\nvar sliceConfig3 = {\n kernelName: Slice,\n backendName: \"wasm\",\n kernelFunc: slice4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/BatchToSpaceND.js\nfunction batchToSpaceND4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { blockShape, crops } = attrs;\n const prod6 = blockShape.reduce((a, b) => a * b);\n const reshaped = backend_util_exports.getReshaped(x.shape, blockShape, prod6);\n const permuted = backend_util_exports.getPermuted(reshaped.length, blockShape.length);\n const reshapedPermuted = backend_util_exports.getReshapedPermuted(x.shape, blockShape, prod6);\n const sliceBeginCoords = backend_util_exports.getSliceBeginCoords(crops, blockShape.length);\n const sliceSize = backend_util_exports.getSliceSize(reshapedPermuted, crops, blockShape.length);\n const xReshaped = reshape5({ inputs: { x }, backend: backend2, attrs: { shape: reshaped } });\n const xTransposed = transpose4({ inputs: { x: xReshaped }, backend: backend2, attrs: { perm: permuted } });\n const xTransposedReshaped = reshape5({ inputs: { x: xTransposed }, backend: backend2, attrs: { shape: reshapedPermuted } });\n const result = slice4({\n inputs: { x: xTransposedReshaped },\n backend: backend2,\n attrs: { begin: sliceBeginCoords, size: sliceSize }\n });\n backend2.disposeData(xReshaped.dataId);\n backend2.disposeData(xTransposed.dataId);\n backend2.disposeData(xReshaped.dataId);\n return result;\n}\nvar batchToSpaceNDConfig3 = {\n kernelName: BatchToSpaceND,\n backendName: \"wasm\",\n kernelFunc: batchToSpaceND4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Cast.js\nfunction cast5(args) {\n const { inputs: { x }, attrs: { dtype }, backend: backend2 } = args;\n const out = backend2.makeOutput(x.shape, dtype);\n const inVals = backend2.typedArrayFromHeap(x);\n const outVals = backend2.typedArrayFromHeap(out);\n outVals.set(inVals);\n return out;\n}\nvar castConfig3 = {\n kernelName: Cast,\n backendName: \"wasm\",\n kernelFunc: cast5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Ceil.js\nvar ceilConfig3 = createUnaryKernelConfig(Ceil);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/ClipByValue.js\nvar wasmClip;\nfunction setup8(backend2) {\n wasmClip = backend2.wasm.cwrap(ClipByValue, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction clip(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { clipValueMin, clipValueMax } = attrs;\n const xId = backend2.dataIdMap.get(x.dataId).id;\n const out = backend2.makeOutput(x.shape, x.dtype);\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmClip(xId, clipValueMin, clipValueMax, outId);\n return out;\n}\nvar clipByValueConfig3 = {\n kernelName: ClipByValue,\n backendName: \"wasm\",\n setupFunc: setup8,\n kernelFunc: clip\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Concat.js\nfunction concat4(args) {\n const { inputs, backend: backend2 } = args;\n const axis = util_exports.parseAxisParam(args.attrs.axis, inputs[0].shape)[0];\n let outShape = backend_util_exports.computeOutShape(inputs.map((t) => t.shape), axis);\n const $inputs = inputs.filter((t) => util_exports.sizeFromShape(t.shape) > 0);\n if ($inputs.length === 1) {\n return identity4({ inputs: { x: $inputs[0] }, backend: backend2 });\n }\n const out = backend2.makeOutput(outShape, inputs[0].dtype);\n if (util_exports.sizeFromShape(outShape) === 0) {\n return out;\n }\n const shapes = $inputs.map((t) => t.shape);\n backend_util_exports.assertParamsConsistent(shapes, axis);\n if ($inputs[0].dtype === \"string\") {\n const inputs2D = $inputs.map((t) => {\n const innerSize = util_exports.sizeFromShape(t.shape.slice(axis));\n const shape = [-1, innerSize];\n return reshape5({ inputs: { x: t }, backend: backend2, attrs: { shape } });\n });\n const inputsValShapes = inputs2D.map((t) => {\n return { vals: backend2.readSync(t.dataId), shape: t.shape };\n });\n outShape = backend_util_exports.computeOutShape(inputs2D.map((t) => t.shape), 1);\n const simplyConcat = inputs2D[0].shape[0] === 1;\n const outVals2 = concatImpl(inputsValShapes, outShape, inputs[0].dtype, simplyConcat);\n const finalOutShape = backend_util_exports.computeOutShape($inputs.map((t) => t.shape), axis);\n out.shape = finalOutShape;\n const outData = backend2.dataIdMap.get(out.dataId);\n outData.stringBytes = backend_util_exports.fromStringArrayToUint8(outVals2);\n inputs2D.forEach((t) => backend2.disposeData(t.dataId));\n return out;\n }\n const batchDim = util_exports.sizeFromShape($inputs[0].shape.slice(0, axis));\n let sumInnerDims = 0;\n const innerDims = $inputs.map((input2) => {\n const innerDim = util_exports.sizeFromShape(input2.shape.slice(axis));\n sumInnerDims += innerDim;\n return innerDim;\n });\n const inVals = $inputs.map((input2) => backend2.typedArrayFromHeap(input2));\n const outVals = backend2.typedArrayFromHeap(out);\n for (let b = 0; b < batchDim; b++) {\n let outOffset = b * sumInnerDims;\n for (let i = 0; i < inVals.length; i++) {\n const innerDim = innerDims[i];\n const inOffset = b * innerDim;\n const vals = inVals[i].subarray(inOffset, inOffset + innerDim);\n outVals.set(vals, outOffset);\n outOffset += innerDim;\n }\n }\n return out;\n}\nvar concatConfig3 = {\n kernelName: Concat,\n backendName: \"wasm\",\n kernelFunc: concat4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Conv2D.js\nvar wasmConv2d;\nfunction setup9(backend2) {\n wasmConv2d = backend2.wasm.cwrap(Conv2D, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction conv2d5(args) {\n const { inputs, attrs, backend: backend2 } = args;\n const { x, filter } = inputs;\n const xId = backend2.dataIdMap.get(x.dataId).id;\n const filterId = backend2.dataIdMap.get(filter.dataId).id;\n const { strides, dilations, pad: pad3, dimRoundingMode, dataFormat } = attrs;\n const $dataFormat = backend_util_exports.convertConv2DDataFormat(dataFormat);\n const convInfo = backend_util_exports.computeConv2DInfo(x.shape, filter.shape, strides, dilations, pad3, dimRoundingMode, false, $dataFormat);\n const filterHeight = convInfo.filterHeight;\n const filterWidth = convInfo.filterWidth;\n const padTop = convInfo.padInfo.top;\n const padRight = convInfo.padInfo.right;\n const padBottom = convInfo.padInfo.bottom;\n const padLeft = convInfo.padInfo.left;\n const dilationHeight = convInfo.dilationHeight;\n const dilationWidth = convInfo.dilationWidth;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const inputChannels = convInfo.inChannels;\n const outputChannels = convInfo.outChannels;\n const isSamePad = convInfo.padInfo.type === \"SAME\" ? 1 : 0;\n if (convInfo.dataFormat !== \"channelsLast\") {\n throw new Error(`wasm backend Conv2D does not support dataFormat:'${convInfo.dataFormat}'. Please use 'channelsLast'.`);\n }\n const out = backend2.makeOutput(convInfo.outShape, \"float32\");\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmConv2d(xId, x.shape[0], x.shape[1], x.shape[2], filterId, filterHeight, filterWidth, padTop, padRight, padBottom, padLeft, isSamePad, dilationHeight, dilationWidth, strideHeight, strideWidth, inputChannels, outputChannels, outId);\n return out;\n}\nvar conv2DConfig3 = {\n kernelName: Conv2D,\n backendName: \"wasm\",\n setupFunc: setup9,\n kernelFunc: conv2d5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Conv2DBackpropInput.js\nvar wasmConv2DBackpropInput;\nfunction setup10(backend2) {\n wasmConv2DBackpropInput = backend2.wasm.cwrap(Conv2DBackpropInput, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction conv2DBackpropInput4(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { dy, filter } = inputs;\n const { strides, pad: pad3, dataFormat, dimRoundingMode, inputShape } = attrs;\n const dilations = 1;\n const $dataFormat = backend_util_exports.convertConv2DDataFormat(dataFormat);\n const convInfo = backend_util_exports.computeConv2DInfo(inputShape, filter.shape, strides, dilations, pad3, dimRoundingMode, false, $dataFormat);\n const { batchSize, filterHeight, filterWidth, inChannels, inHeight, inWidth, outChannels, outHeight, outWidth, strideHeight, strideWidth } = convInfo;\n const topPad = filterHeight - 1 - convInfo.padInfo.top;\n const leftPad = filterWidth - 1 - convInfo.padInfo.left;\n const isChannelsLast = convInfo.dataFormat === \"channelsLast\";\n const dxStrides = util_exports.computeStrides(convInfo.inShape);\n const dyStrides = util_exports.computeStrides(dy.shape);\n const [fltS0, fltS1, fltS2] = util_exports.computeStrides(filter.shape);\n const xBatchStride = dxStrides[0];\n const xRowStride = isChannelsLast ? dxStrides[1] : dxStrides[2];\n const xColStride = isChannelsLast ? dxStrides[2] : 1;\n const xChannelStride = isChannelsLast ? 1 : dxStrides[1];\n const yBatchStride = dyStrides[0];\n const yRowStride = isChannelsLast ? dyStrides[1] : dyStrides[2];\n const yColStride = isChannelsLast ? dyStrides[2] : 1;\n const yChannelStride = isChannelsLast ? 1 : dyStrides[1];\n const out = backend2.makeOutput(convInfo.inShape, \"float32\");\n const outId = backend2.dataIdMap.get(out.dataId).id;\n const dyId = backend2.dataIdMap.get(dy.dataId).id;\n const filterId = backend2.dataIdMap.get(filter.dataId).id;\n wasmConv2DBackpropInput(dyId, filterId, batchSize, filterHeight, filterWidth, inHeight, inWidth, inChannels, outHeight, outWidth, outChannels, strideHeight, strideWidth, topPad, leftPad, fltS0, fltS1, fltS2, xBatchStride, xRowStride, xColStride, xChannelStride, yBatchStride, yRowStride, yColStride, yChannelStride, outId);\n return out;\n}\nvar conv2DBackpropInputConfig3 = {\n kernelName: Conv2DBackpropInput,\n backendName: \"wasm\",\n setupFunc: setup10,\n kernelFunc: conv2DBackpropInput4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Cos.js\nvar cosConfig3 = createUnaryKernelConfig(Cos);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Cosh.js\nvar coshConfig3 = createUnaryKernelConfig(Cosh);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/CropAndResize.js\nvar InterpolationMethod;\n(function(InterpolationMethod2) {\n InterpolationMethod2[InterpolationMethod2[\"bilinear\"] = 0] = \"bilinear\";\n InterpolationMethod2[InterpolationMethod2[\"nearest\"] = 1] = \"nearest\";\n})(InterpolationMethod || (InterpolationMethod = {}));\nvar wasmCropAndResize;\nfunction setup11(backend2) {\n wasmCropAndResize = backend2.wasm.cwrap(CropAndResize, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"array\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction cropAndResize4(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { method, extrapolationValue, cropSize } = attrs;\n const { image: image2, boxes, boxInd } = inputs;\n const numBoxes = boxes.shape[0];\n const [cropHeight, cropWidth] = cropSize;\n const outShape = [numBoxes, cropHeight, cropWidth, image2.shape[3]];\n let imagesData = backend2.dataIdMap.get(image2.dataId);\n let castedData;\n if (image2.dtype !== \"float32\") {\n castedData = cast5({ backend: backend2, inputs: { x: image2 }, attrs: { dtype: \"float32\" } });\n imagesData = backend2.dataIdMap.get(castedData.dataId);\n }\n const imagesId = imagesData.id;\n const boxesId = backend2.dataIdMap.get(boxes.dataId).id;\n const boxIndId = backend2.dataIdMap.get(boxInd.dataId).id;\n const out = backend2.makeOutput(outShape, \"float32\");\n const outId = backend2.dataIdMap.get(out.dataId).id;\n const imagesShapeBytes = new Uint8Array(new Int32Array(image2.shape).buffer);\n wasmCropAndResize(imagesId, boxesId, boxIndId, numBoxes, imagesShapeBytes, cropHeight, cropWidth, InterpolationMethod[method], extrapolationValue, outId);\n if (castedData != null) {\n backend2.disposeData(castedData.dataId);\n }\n return out;\n}\nvar cropAndResizeConfig3 = {\n kernelName: CropAndResize,\n backendName: \"wasm\",\n setupFunc: setup11,\n kernelFunc: cropAndResize4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Cumprod.js\nvar wasmCumprod;\nfunction setup12(backend2) {\n wasmCumprod = backend2.wasm.cwrap(Cumprod, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction cumprod4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis, exclusive, reverse: reverse5 } = attrs;\n const xRank = x.shape.length;\n util_exports.assert(x.dtype === \"float32\" || x.dtype === \"int32\", () => `cumprod does not support ${x.dtype} tensors in the WASM backend`);\n const permutation = backend_util_exports.getAxesPermutation([axis], xRank);\n let permutedX = x;\n if (permutation !== null) {\n permutedX = transpose4({ inputs: { x }, attrs: { perm: permutation }, backend: backend2 });\n }\n const permutedAxis = backend_util_exports.getInnerMostAxes(1, xRank)[0];\n backend_util_exports.assertAxesAreInnerMostDims(\"cumprod\", [permutedAxis], xRank);\n const permutedOut = backend2.makeOutput(permutedX.shape, permutedX.dtype);\n const finalDim = permutedX.shape[permutedAxis];\n const permutedXId = backend2.dataIdMap.get(permutedX.dataId).id;\n const permutedOutId = backend2.dataIdMap.get(permutedOut.dataId).id;\n wasmCumprod(permutedXId, exclusive ? 1 : 0, reverse5 ? 1 : 0, finalDim, permutedOutId, CppDType[x.dtype]);\n let out = permutedOut;\n if (permutation !== null) {\n const undoPermutation = backend_util_exports.getUndoAxesPermutation(permutation);\n out = transpose4({ inputs: { x: permutedOut }, attrs: { perm: undoPermutation }, backend: backend2 });\n backend2.disposeData(permutedX.dataId);\n backend2.disposeData(permutedOut.dataId);\n }\n return out;\n}\nvar cumprodConfig3 = {\n kernelName: Cumprod,\n backendName: \"wasm\",\n setupFunc: setup12,\n kernelFunc: cumprod4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Cumsum.js\nvar wasmCumsum;\nfunction setup13(backend2) {\n wasmCumsum = backend2.wasm.cwrap(Cumsum, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction cumsum4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis, exclusive, reverse: reverse5 } = attrs;\n const xRank = x.shape.length;\n util_exports.assert(x.dtype === \"float32\" || x.dtype === \"int32\", () => `cumsum does not support ${x.dtype} tensors in the WASM backend`);\n const permutation = backend_util_exports.getAxesPermutation([axis], xRank);\n let permutedX = x;\n if (permutation !== null) {\n permutedX = transpose4({ inputs: { x }, attrs: { perm: permutation }, backend: backend2 });\n }\n const permutedAxis = backend_util_exports.getInnerMostAxes(1, xRank)[0];\n backend_util_exports.assertAxesAreInnerMostDims(\"cumsum\", [permutedAxis], xRank);\n const permutedOut = backend2.makeOutput(permutedX.shape, permutedX.dtype);\n const finalDim = permutedX.shape[permutedAxis];\n const permutedXId = backend2.dataIdMap.get(permutedX.dataId).id;\n const permutedOutId = backend2.dataIdMap.get(permutedOut.dataId).id;\n wasmCumsum(permutedXId, exclusive ? 1 : 0, reverse5 ? 1 : 0, finalDim, permutedOutId, CppDType[x.dtype]);\n let out = permutedOut;\n if (permutation !== null) {\n const undoPermutation = backend_util_exports.getUndoAxesPermutation(permutation);\n out = transpose4({ inputs: { x: permutedOut }, attrs: { perm: undoPermutation }, backend: backend2 });\n backend2.disposeData(permutedX.dataId);\n backend2.disposeData(permutedOut.dataId);\n }\n return out;\n}\nvar cumsumConfig3 = {\n kernelName: Cumsum,\n backendName: \"wasm\",\n setupFunc: setup13,\n kernelFunc: cumsum4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/DepthToSpace.js\nvar wasmDepthToSpace;\nfunction setup14(backend2) {\n wasmDepthToSpace = backend2.wasm.cwrap(DepthToSpace, null, [\n \"number\",\n \"number\",\n \"number\",\n \"array\",\n \"number\",\n \"array\",\n \"array\",\n \"number\",\n \"number\"\n ]);\n}\nfunction depthToSpace4(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { x } = inputs;\n const { blockSize, dataFormat } = attrs;\n const batchSize = x.shape[0];\n const inputHeight = dataFormat === \"NHWC\" ? x.shape[1] : x.shape[2];\n const inputWidth = dataFormat === \"NHWC\" ? x.shape[2] : x.shape[3];\n const inputDepth = dataFormat === \"NHWC\" ? x.shape[3] : x.shape[1];\n const outputHeight = inputHeight * blockSize;\n const outputWidth = inputWidth * blockSize;\n const outputDepth = inputDepth / (blockSize * blockSize);\n const outputShape = dataFormat === \"NHWC\" ? [batchSize, outputHeight, outputWidth, outputDepth] : [batchSize, outputDepth, outputHeight, outputWidth];\n const out = backend2.makeOutput(outputShape, \"float32\");\n const xData = backend2.dataIdMap.get(x.dataId);\n const xId = xData.id;\n const xStridesBytes = new Uint8Array(new Int32Array(util_exports.computeStrides(x.shape)).buffer);\n const outputShapeBytes = new Uint8Array(new Int32Array(outputShape).buffer);\n const outStridesBytes = new Uint8Array(new Int32Array(util_exports.computeStrides(outputShape)).buffer);\n const outId = backend2.dataIdMap.get(out.dataId).id;\n const channelsLast = dataFormat === \"NHWC\" ? 1 : 0;\n wasmDepthToSpace(xId, blockSize, channelsLast, xStridesBytes, x.shape.length - 1, outputShapeBytes, outStridesBytes, outputShape.length, outId);\n return out;\n}\nvar depthToSpaceConfig3 = {\n kernelName: DepthToSpace,\n backendName: \"wasm\",\n setupFunc: setup14,\n kernelFunc: depthToSpace4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/DepthwiseConv2dNative.js\nvar wasmDepthwiseConv2d;\nfunction setup15(backend2) {\n wasmDepthwiseConv2d = backend2.wasm.cwrap(DepthwiseConv2dNative, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction depthwiseConv2d5(args) {\n const { inputs, attrs, backend: backend2 } = args;\n const { x, filter } = inputs;\n const xId = backend2.dataIdMap.get(x.dataId).id;\n const filterId = backend2.dataIdMap.get(filter.dataId).id;\n const { strides, dilations, pad: pad3, dimRoundingMode } = attrs;\n const $dilations = dilations == null ? [1, 1] : dilations;\n const convInfo = backend_util_exports.computeConv2DInfo(x.shape, filter.shape, strides, $dilations, pad3, dimRoundingMode, true);\n const filterHeight = convInfo.filterHeight;\n const filterWidth = convInfo.filterWidth;\n const padTop = convInfo.padInfo.top;\n const padRight = convInfo.padInfo.right;\n const padBottom = convInfo.padInfo.bottom;\n const padLeft = convInfo.padInfo.left;\n const dilationHeight = convInfo.dilationHeight;\n const dilationWidth = convInfo.dilationWidth;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const inputChannels = convInfo.inChannels;\n const outputChannels = convInfo.outChannels;\n const isSamePad = convInfo.padInfo.type === \"SAME\" ? 1 : 0;\n if (convInfo.dataFormat !== \"channelsLast\") {\n throw new Error(`wasm backend DepthwiseConv2dNative does not support dataFormat:'${convInfo.dataFormat}'. Please use 'channelsLast'.`);\n }\n const out = backend2.makeOutput(convInfo.outShape, \"float32\");\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmDepthwiseConv2d(xId, x.shape[0], x.shape[1], x.shape[2], filterId, filterHeight, filterWidth, padTop, padRight, padBottom, padLeft, isSamePad, dilationHeight, dilationWidth, strideHeight, strideWidth, inputChannels, outputChannels, outId);\n return out;\n}\nvar depthwiseConv2dNativeConfig3 = {\n kernelName: DepthwiseConv2dNative,\n backendName: \"wasm\",\n setupFunc: setup15,\n kernelFunc: depthwiseConv2d5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Elu.js\nvar eluConfig3 = createUnaryKernelConfig(Elu);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Equal.js\nvar supportsFullBroadcast2 = false;\nvar equalConfig3 = createBinaryKernelConfig(Equal, supportsFullBroadcast2, \"bool\");\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Exp.js\nvar expConfig3 = createUnaryKernelConfig(Exp, \"float32\");\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/ExpandDims.js\nfunction expandDims5(args) {\n const { inputs, attrs, backend: backend2 } = args;\n const { input: input2 } = inputs;\n const { dim } = attrs;\n const inputRank = input2.shape.length;\n const newShape = input2.shape.slice();\n let $dim = dim;\n if (dim < 0) {\n util_exports.assert(-(inputRank + 1) <= dim, () => `Axis must be in the interval [${-(inputRank + 1)}, ${inputRank}]`);\n $dim = inputRank + dim + 1;\n }\n newShape.splice($dim, 0, 1);\n return reshape5({ inputs: { x: input2 }, backend: backend2, attrs: { shape: newShape } });\n}\nvar expandDimsConfig3 = {\n kernelName: ExpandDims,\n backendName: \"wasm\",\n kernelFunc: expandDims5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Fill.js\nfunction fill4(args) {\n const { attrs: { shape, value, dtype }, backend: backend2 } = args;\n const out = backend2.makeOutput(shape, dtype);\n const outVals = backend2.typedArrayFromHeap(out);\n outVals.fill(value);\n return out;\n}\nvar fillConfig3 = {\n kernelName: Fill,\n backendName: \"wasm\",\n kernelFunc: fill4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/FlipLeftRight.js\nvar wasmFlipLeftRight;\nfunction setup16(backend2) {\n wasmFlipLeftRight = backend2.wasm.cwrap(FlipLeftRight, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction flipLeftRight2(args) {\n const { inputs, backend: backend2 } = args;\n const { image: image2 } = inputs;\n const out = backend2.makeOutput(image2.shape, image2.dtype);\n const imageId = backend2.dataIdMap.get(image2.dataId).id;\n const outId = backend2.dataIdMap.get(out.dataId).id;\n const [batch, imageHeight, imageWidth, numChannels] = image2.shape;\n wasmFlipLeftRight(imageId, batch, imageHeight, imageWidth, numChannels, outId);\n return out;\n}\nvar flipLeftRightConfig3 = {\n kernelName: FlipLeftRight,\n backendName: \"wasm\",\n kernelFunc: flipLeftRight2,\n setupFunc: setup16\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Floor.js\nvar floorConfig3 = createUnaryKernelConfig(Floor);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/FloorDiv.js\nvar supportsFullBroadcast3 = false;\nvar floorDivConfig3 = createBinaryKernelConfig(FloorDiv, supportsFullBroadcast3);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/FusedBatchNorm.js\nvar wasmBatchNorm;\nfunction setup17(backend2) {\n wasmBatchNorm = backend2.wasm.cwrap(FusedBatchNorm, null, [\"number\", \"number\", \"number\", \"number\", \"number\", \"number\", \"number\"]);\n}\nfunction fusedBatchNorm(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { varianceEpsilon } = attrs;\n const { x, mean: mean5, variance, offset, scale: scale2 } = inputs;\n const xId = backend2.dataIdMap.get(x.dataId).id;\n const meanId = backend2.dataIdMap.get(mean5.dataId).id;\n const varianceId = backend2.dataIdMap.get(variance.dataId).id;\n const offsetId = offset != null ? backend2.dataIdMap.get(offset.dataId).id : 0;\n const scaleId = scale2 != null ? backend2.dataIdMap.get(scale2.dataId).id : 0;\n const out = backend2.makeOutput(x.shape, x.dtype);\n if (util_exports.sizeFromShape(x.shape) === 0) {\n return out;\n }\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmBatchNorm(xId, meanId, varianceId, offsetId, scaleId, varianceEpsilon, outId);\n return out;\n}\nvar fusedBatchNormConfig = {\n kernelName: FusedBatchNorm,\n backendName: \"wasm\",\n setupFunc: setup17,\n kernelFunc: fusedBatchNorm\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/FusedConv2D.js\nvar wasmFusedConv2d;\nfunction setup18(backend2) {\n wasmFusedConv2d = backend2.wasm.cwrap(FusedConv2D, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction fusedConv2d2(args) {\n const { inputs, attrs, backend: backend2 } = args;\n const { x, filter, bias, preluActivationWeights } = inputs;\n const { strides, pad: pad3, dilations, dataFormat, dimRoundingMode, activation: activation2, leakyreluAlpha } = attrs;\n const convInfo = backend_util_exports.computeConv2DInfo(x.shape, filter.shape, strides, dilations, pad3, dimRoundingMode);\n const fusedActivation = FusableActivation[activation2];\n if (fusedActivation == null) {\n throw new Error(`${activation2} activation not yet supported for FusedConv2D in the wasm backend.`);\n }\n const xId = backend2.dataIdMap.get(x.dataId).id;\n const filterId = backend2.dataIdMap.get(filter.dataId).id;\n const outputChannels = convInfo.outChannels;\n let biasId = 0;\n if (bias != null) {\n const biasData = backend2.dataIdMap.get(bias.dataId);\n if (biasData.shape.length !== 1) {\n throw new Error(`FusedConv2D only supports rank-1 bias but got rank ${biasData.shape.length}.`);\n }\n if (biasData.shape[0] !== outputChannels) {\n throw new Error(`FusedConv2D bias shape (${biasData.shape}) does not match the number of output channels (${outputChannels})`);\n }\n biasId = biasData.id;\n }\n const filterHeight = convInfo.filterHeight;\n const filterWidth = convInfo.filterWidth;\n const padTop = convInfo.padInfo.top;\n const padRight = convInfo.padInfo.right;\n const padBottom = convInfo.padInfo.bottom;\n const padLeft = convInfo.padInfo.left;\n const dilationHeight = convInfo.dilationHeight;\n const dilationWidth = convInfo.dilationWidth;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const inputChannels = convInfo.inChannels;\n const isSamePad = convInfo.padInfo.type === \"SAME\" ? 1 : 0;\n const batchSize = convInfo.batchSize;\n const inHeight = convInfo.inHeight;\n const inWidth = convInfo.inWidth;\n if (dataFormat !== \"NHWC\") {\n throw new Error(`wasm backend FusedConv2D does not support dataFormat:'${dataFormat}'. Please use 'NHWC'.`);\n }\n const out = backend2.makeOutput(convInfo.outShape, \"float32\");\n const outId = backend2.dataIdMap.get(out.dataId).id;\n const preluActivationWeightsId = preluActivationWeights == null ? 0 : backend2.dataIdMap.get(preluActivationWeights.dataId).id;\n wasmFusedConv2d(xId, batchSize, inHeight, inWidth, filterId, filterHeight, filterWidth, biasId, padTop, padRight, padBottom, padLeft, isSamePad, dilationHeight, dilationWidth, strideHeight, strideWidth, inputChannels, outputChannels, fusedActivation, preluActivationWeightsId, leakyreluAlpha || 0, outId);\n return out;\n}\nvar fusedConv2DConfig3 = {\n kernelName: FusedConv2D,\n backendName: \"wasm\",\n setupFunc: setup18,\n kernelFunc: fusedConv2d2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/FusedDepthwiseConv2D.js\nvar wasmFusedDepthwiseConv2d;\nfunction setup19(backend2) {\n wasmFusedDepthwiseConv2d = backend2.wasm.cwrap(FusedDepthwiseConv2D, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction fusedDepthwiseConv2d(args) {\n const { inputs, attrs, backend: backend2 } = args;\n const { x, filter, bias, preluActivationWeights } = inputs;\n const { strides, pad: pad3, dilations, dataFormat, dimRoundingMode, activation: activation2, leakyreluAlpha } = attrs;\n const convInfo = backend_util_exports.computeConv2DInfo(x.shape, filter.shape, strides, dilations, pad3, dimRoundingMode, true);\n const fusedActivation = FusableActivation[activation2];\n if (fusedActivation == null) {\n throw new Error(`${activation2} activation not yet supported for FusedDepthwiseConv2D in the wasm backend.`);\n }\n const xId = backend2.dataIdMap.get(x.dataId).id;\n const filterId = backend2.dataIdMap.get(filter.dataId).id;\n const outputChannels = convInfo.outChannels;\n let biasId = 0;\n if (bias != null) {\n const biasData = backend2.dataIdMap.get(bias.dataId);\n if (biasData.shape.length !== 1) {\n throw new Error(`FusedDepthwiseConv2D only supports rank-1 bias but got rank ${biasData.shape.length}.`);\n }\n if (biasData.shape[0] !== outputChannels) {\n throw new Error(`FusedDepthwiseConv2D bias shape (${biasData.shape}) does not match the number of output channels (${outputChannels})`);\n }\n biasId = biasData.id;\n }\n const filterHeight = convInfo.filterHeight;\n const filterWidth = convInfo.filterWidth;\n const padTop = convInfo.padInfo.top;\n const padRight = convInfo.padInfo.right;\n const padBottom = convInfo.padInfo.bottom;\n const padLeft = convInfo.padInfo.left;\n const dilationHeight = convInfo.dilationHeight;\n const dilationWidth = convInfo.dilationWidth;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const inputChannels = convInfo.inChannels;\n const isSamePad = convInfo.padInfo.type === \"SAME\" ? 1 : 0;\n const batchSize = convInfo.batchSize;\n const inHeight = convInfo.inHeight;\n const inWidth = convInfo.inWidth;\n if (dataFormat !== \"NHWC\") {\n throw new Error(`wasm backend FusedDepthwiseConv2D does not support dataFormat:'${dataFormat}'. Please use 'NHWC'.`);\n }\n const out = backend2.makeOutput(convInfo.outShape, \"float32\");\n const outId = backend2.dataIdMap.get(out.dataId).id;\n const preluActivationWeightsId = preluActivationWeights == null ? 0 : backend2.dataIdMap.get(preluActivationWeights.dataId).id;\n wasmFusedDepthwiseConv2d(xId, batchSize, inHeight, inWidth, filterId, filterHeight, filterWidth, biasId, padTop, padRight, padBottom, padLeft, isSamePad, dilationHeight, dilationWidth, strideHeight, strideWidth, inputChannels, outputChannels, fusedActivation, preluActivationWeightsId, leakyreluAlpha || 0, outId);\n return out;\n}\nvar fusedDepthwiseConv2DConfig3 = {\n kernelName: FusedDepthwiseConv2D,\n backendName: \"wasm\",\n setupFunc: setup19,\n kernelFunc: fusedDepthwiseConv2d\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/GatherNd.js\nvar wasmGatherNd;\nfunction setup20(backend2) {\n wasmGatherNd = backend2.wasm.cwrap(GatherNd, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"array\",\n \"number\"\n ]);\n}\nfunction gatherNd3(args) {\n const { backend: backend2, inputs } = args;\n const { params, indices } = inputs;\n const [resultShape, numSlices, sliceSize, strides] = gather_nd_util_exports.prepareAndValidate(params, indices);\n const out = backend2.makeOutput(resultShape, params.dtype);\n if (numSlices === 0) {\n return out;\n }\n const indicesShape = indices.shape;\n const sliceRank = indicesShape[indicesShape.length - 1];\n const xData = backend2.dataIdMap.get(params.dataId);\n const xId = xData.id;\n const indicesData = backend2.dataIdMap.get(indices.dataId);\n const indicesId = indicesData.id;\n const stridesBytes = new Uint8Array(new Int32Array(strides).buffer);\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmGatherNd(xId, CppDType[params.dtype], indicesId, numSlices, sliceRank, sliceSize, stridesBytes, outId);\n return out;\n}\nvar gatherNdConfig3 = {\n kernelName: GatherNd,\n backendName: \"wasm\",\n setupFunc: setup20,\n kernelFunc: gatherNd3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/GatherV2.js\nvar wasmGather;\nfunction setup21(backend2) {\n wasmGather = backend2.wasm.cwrap(\"Gather\", null, [\n \"number\",\n \"number\",\n \"array\",\n \"number\",\n \"number\",\n \"number\",\n \"array\",\n \"number\"\n ]);\n}\nfunction gatherV23(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { x, indices } = inputs;\n const { axis, batchDims } = attrs;\n const parsedAxis = util_exports.parseAxisParam(axis, x.shape)[0];\n const indicesVals = backend2.readSync(indices.dataId);\n const axisDim = x.shape[parsedAxis];\n for (let i = 0; i < indicesVals.length; ++i) {\n const index = indicesVals[i];\n util_exports.assert(index <= axisDim - 1 && index >= 0, () => `GatherV2: the index value ${index} is not in [0, ${axisDim - 1}]`);\n }\n const shapeInfo = backend_util_exports.segment_util.collectGatherOpShapeInfo(x, indices, parsedAxis, batchDims);\n const flattenX = reshape5({\n inputs: { x },\n attrs: {\n shape: [\n shapeInfo.batchSize,\n shapeInfo.outerSize,\n shapeInfo.dimSize,\n shapeInfo.sliceSize\n ]\n },\n backend: backend2\n });\n const indicesSize = util_exports.sizeFromShape(indices.shape);\n const flattenIndex = reshape5({\n inputs: { x: indices },\n attrs: { shape: [shapeInfo.batchSize, indicesSize / shapeInfo.batchSize] },\n backend: backend2\n });\n const flattenOutputShape = [\n shapeInfo.batchSize,\n shapeInfo.outerSize,\n indicesSize / shapeInfo.batchSize,\n shapeInfo.sliceSize\n ];\n const out = backend2.makeOutput(flattenOutputShape, x.dtype);\n if (util_exports.sizeFromShape(x.shape) === 0) {\n return out;\n }\n const stridesSize = flattenX.shape.length - 1;\n const xData = backend2.dataIdMap.get(flattenX.dataId);\n const xId = xData.id;\n const indicesData = backend2.dataIdMap.get(flattenIndex.dataId);\n const indicesId = indicesData.id;\n const outId = backend2.dataIdMap.get(out.dataId).id;\n const xStridesBytes = new Uint8Array(new Int32Array(util_exports.computeStrides(flattenX.shape)).buffer);\n const outStridesBytes = new Uint8Array(new Int32Array(util_exports.computeStrides(flattenOutputShape)).buffer);\n wasmGather(xId, CppDType[x.dtype], xStridesBytes, stridesSize, indicesId, shapeInfo.batchSize, outStridesBytes, outId);\n backend2.disposeData(flattenX.dataId);\n backend2.disposeData(flattenIndex.dataId);\n out.shape = shapeInfo.outputShape;\n return out;\n}\nvar gatherV2Config3 = {\n kernelName: GatherV2,\n backendName: \"wasm\",\n setupFunc: setup21,\n kernelFunc: gatherV23\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Greater.js\nvar supportsFullBroadcast4 = false;\nvar greaterConfig3 = createBinaryKernelConfig(Greater, supportsFullBroadcast4, \"bool\");\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/GreaterEqual.js\nvar supportsFullBroadcast5 = false;\nvar greaterEqualConfig3 = createBinaryKernelConfig(GreaterEqual, supportsFullBroadcast5, \"bool\");\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/LeakyRelu.js\nvar wasmFunc3;\nfunction setupFunc2(backend2) {\n wasmFunc3 = backend2.wasm.cwrap(LeakyRelu, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction leakyRelu4(args) {\n const { inputs: { x }, attrs: { alpha }, backend: backend2 } = args;\n const xId = backend2.dataIdMap.get(x.dataId).id;\n const out = backend2.makeOutput(x.shape, \"float32\");\n if (util_exports.sizeFromShape(x.shape) !== 0) {\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmFunc3(xId, CppDType[x.dtype], alpha, outId);\n }\n return out;\n}\nvar leakyReluConfig3 = {\n kernelName: LeakyRelu,\n backendName: \"wasm\",\n setupFunc: setupFunc2,\n kernelFunc: leakyRelu4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Less.js\nvar supportsFullBroadcast6 = false;\nvar lessConfig3 = createBinaryKernelConfig(Less, supportsFullBroadcast6, \"bool\");\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/LessEqual.js\nvar supportsFullBroadcast7 = false;\nvar lessEqualConfig3 = createBinaryKernelConfig(LessEqual, supportsFullBroadcast7, \"bool\");\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Log.js\nvar logConfig3 = createUnaryKernelConfig(Log);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/LogicalAnd.js\nvar supportsFullBroadcast8 = false;\nvar logicalAndConfig3 = createBinaryKernelConfig(LogicalAnd, supportsFullBroadcast8, \"bool\");\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/LogicalNot.js\nvar logicalNotConfig3 = createUnaryKernelConfig(LogicalNot);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/LogicalOr.js\nvar supportsFullBroadcast9 = false;\nvar logicalOrConfig3 = createBinaryKernelConfig(LogicalOr, supportsFullBroadcast9, \"bool\");\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/LogicalXor.js\nvar supportsFullBroadcast10 = false;\nvar logicalXorConfig = createBinaryKernelConfig(LogicalXor, supportsFullBroadcast10, \"bool\");\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Max.js\nvar wasmMax;\nfunction setup22(backend2) {\n wasmMax = backend2.wasm.cwrap(Max, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction max5(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { reductionIndices: axis, keepDims } = attrs;\n const { x } = inputs;\n const xId = backend2.dataIdMap.get(x.dataId).id;\n let inputId = xId;\n let input2 = x;\n const { transposed, axes, originalAxes, inputWasTransposed } = permuteAxesAndTranspose(x, axis, backend2);\n if (inputWasTransposed) {\n const transposedId = backend2.dataIdMap.get(transposed.dataId).id;\n input2 = transposed;\n inputId = transposedId;\n }\n const inputRank = input2.shape.length;\n backend_util_exports.assertAxesAreInnerMostDims(\"max\", axes, inputRank);\n const [outShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes(input2.shape, axes);\n const reduceSize = util_exports.sizeFromShape(reduceShape);\n const out = backend2.makeOutput(outShape, x.dtype);\n if (util_exports.sizeFromShape(input2.shape) !== 0) {\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmMax(inputId, CppDType[x.dtype], reduceSize, outId);\n }\n if (inputWasTransposed) {\n backend2.disposeData(transposed.dataId);\n }\n if (keepDims) {\n const newShape = backend_util_exports.expandShapeToKeepDim(out.shape, originalAxes);\n out.shape = newShape;\n }\n return out;\n}\nvar maxConfig3 = {\n kernelName: Max,\n backendName: \"wasm\",\n setupFunc: setup22,\n kernelFunc: max5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Maximum.js\nvar supportsFullBroadcast11 = false;\nvar maximumConfig3 = createBinaryKernelConfig(Maximum, supportsFullBroadcast11);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/MaxPool.js\nvar wasmMaxPool;\nfunction setup23(backend2) {\n wasmMaxPool = backend2.wasm.cwrap(MaxPool, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction maxPool4(args) {\n const { inputs, attrs, backend: backend2 } = args;\n const x = inputs.x;\n const xId = backend2.dataIdMap.get(x.dataId).id;\n util_exports.assert(x.dtype === \"float32\", () => `Error in MaxPool: only float32 input is supported. Got ${x.dtype}.`);\n const { filterSize, strides, pad: pad3, dimRoundingMode } = attrs;\n const convInfo = backend_util_exports.computePool2DInfo(x.shape, filterSize, strides, 1, pad3, dimRoundingMode);\n const filterHeight = convInfo.filterHeight;\n const filterWidth = convInfo.filterWidth;\n const padTop = convInfo.padInfo.top;\n const padRight = convInfo.padInfo.right;\n const padBottom = convInfo.padInfo.bottom;\n const padLeft = convInfo.padInfo.left;\n const dilationHeight = convInfo.dilationHeight;\n const dilationWidth = convInfo.dilationWidth;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const inputChannels = convInfo.inChannels;\n const outputChannels = convInfo.outChannels;\n if (convInfo.dataFormat !== \"channelsLast\") {\n throw new Error(`wasm backend does not support dataFormat:'${convInfo.dataFormat}'. Please use 'channelsLast'.`);\n }\n const out = backend2.makeOutput(convInfo.outShape, \"float32\");\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmMaxPool(xId, x.shape[0], x.shape[1], x.shape[2], filterHeight, filterWidth, padTop, padRight, padBottom, padLeft, dilationHeight, dilationWidth, strideHeight, strideWidth, inputChannels, outputChannels, outId);\n return out;\n}\nvar maxPoolConfig3 = {\n kernelName: MaxPool,\n backendName: \"wasm\",\n setupFunc: setup23,\n kernelFunc: maxPool4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Mean.js\nvar wasmMean;\nfunction setup24(backend2) {\n wasmMean = backend2.wasm.cwrap(Mean, null, [\"number, number, number\"]);\n}\nfunction mean3(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { axis, keepDims } = attrs;\n const { x } = inputs;\n const xId = backend2.dataIdMap.get(x.dataId).id;\n let inputId = xId;\n let input2 = x;\n const { transposed, axes, originalAxes, inputWasTransposed } = permuteAxesAndTranspose(x, axis, backend2);\n let reductionAxes = axes;\n if (inputWasTransposed) {\n const transposedId = backend2.dataIdMap.get(transposed.dataId).id;\n if (transposedId !== xId) {\n input2 = transposed;\n inputId = transposedId;\n reductionAxes = backend_util_exports.getInnerMostAxes(reductionAxes.length, input2.shape.length);\n }\n }\n backend_util_exports.assertAxesAreInnerMostDims(\"mean\", reductionAxes, input2.shape.length);\n const [outShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes(input2.shape, reductionAxes);\n const reduceSize = util_exports.sizeFromShape(reduceShape);\n let castedInput = input2;\n if (input2.dtype !== \"float32\") {\n castedInput = cast5({ backend: backend2, inputs: { x: input2 }, attrs: { dtype: \"float32\" } });\n inputId = backend2.dataIdMap.get(castedInput.dataId).id;\n }\n const out = backend2.makeOutput(outShape, \"float32\");\n if (util_exports.sizeFromShape(input2.shape) !== 0) {\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmMean(inputId, reduceSize, outId);\n }\n if (inputWasTransposed) {\n backend2.disposeData(transposed.dataId);\n }\n if (keepDims) {\n const newShape = backend_util_exports.expandShapeToKeepDim(out.shape, originalAxes);\n out.shape = newShape;\n }\n if (input2.dtype !== \"float32\") {\n backend2.disposeData(castedInput.dataId);\n }\n return out;\n}\nvar meanConfig3 = {\n kernelName: Mean,\n backendName: \"wasm\",\n setupFunc: setup24,\n kernelFunc: mean3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Min.js\nvar wasmMin;\nfunction setup25(backend2) {\n wasmMin = backend2.wasm.cwrap(Min, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction min5(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { axis, keepDims } = attrs;\n const { x } = inputs;\n const xId = backend2.dataIdMap.get(x.dataId).id;\n let inputId = xId;\n let input2 = x;\n const { transposed, axes, originalAxes, inputWasTransposed } = permuteAxesAndTranspose(x, axis, backend2);\n if (inputWasTransposed) {\n const transposedId = backend2.dataIdMap.get(transposed.dataId).id;\n if (transposedId !== xId) {\n input2 = transposed;\n inputId = transposedId;\n }\n }\n const inputRank = input2.shape.length;\n backend_util_exports.assertAxesAreInnerMostDims(\"min\", axes, inputRank);\n const [outShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes(input2.shape, axes);\n const reduceSize = util_exports.sizeFromShape(reduceShape);\n const out = backend2.makeOutput(outShape, input2.dtype);\n if (util_exports.sizeFromShape(input2.shape) !== 0) {\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmMin(inputId, CppDType[x.dtype], reduceSize, outId);\n }\n if (inputWasTransposed) {\n backend2.disposeData(transposed.dataId);\n }\n if (keepDims) {\n const newShape = backend_util_exports.expandShapeToKeepDim(out.shape, originalAxes);\n out.shape = newShape;\n }\n return out;\n}\nvar minConfig3 = {\n kernelName: Min,\n backendName: \"wasm\",\n setupFunc: setup25,\n kernelFunc: min5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Minimum.js\nvar supportsFullBroadcast12 = false;\nvar minimumConfig3 = createBinaryKernelConfig(Minimum, supportsFullBroadcast12);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/MirrorPad.js\nvar MirrorPaddingMode;\n(function(MirrorPaddingMode2) {\n MirrorPaddingMode2[MirrorPaddingMode2[\"reflect\"] = 0] = \"reflect\";\n MirrorPaddingMode2[MirrorPaddingMode2[\"symmetric\"] = 1] = \"symmetric\";\n})(MirrorPaddingMode || (MirrorPaddingMode = {}));\nvar wasmMirrorPad;\nfunction setup26(backend2) {\n wasmMirrorPad = backend2.wasm.cwrap(MirrorPad, null, [\n \"number\",\n \"array\",\n \"number\",\n \"number\",\n \"array\",\n \"array\",\n \"number\",\n \"number\"\n ]);\n}\nfunction mirrorPad3(args) {\n const { inputs: { x }, backend: backend2, attrs: { paddings, mode } } = args;\n const outShape = paddings.map((p2, i) => p2[0] + x.shape[i] + p2[1]);\n const xId = backend2.dataIdMap.get(x.dataId).id;\n const out = backend2.makeOutput(outShape, x.dtype);\n const outId = backend2.dataIdMap.get(out.dataId).id;\n const xShapeBytes = new Uint8Array(new Int32Array(x.shape).buffer);\n const prePaddingsFlat = paddings.map((padTuple) => padTuple[0]);\n const postPaddingsFlat = paddings.map((padTuple) => padTuple[1]);\n const prePaddingsBytes = new Uint8Array(new Int32Array(prePaddingsFlat).buffer);\n const postPaddingsBytes = new Uint8Array(new Int32Array(postPaddingsFlat).buffer);\n wasmMirrorPad(xId, xShapeBytes, x.shape.length, CppDType[x.dtype], prePaddingsBytes, postPaddingsBytes, MirrorPaddingMode[mode], outId);\n return out;\n}\nvar mirrorPadConfig3 = {\n kernelName: MirrorPad,\n backendName: \"wasm\",\n kernelFunc: mirrorPad3,\n setupFunc: setup26\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Multiply.js\nvar supportsFullBroadcast13 = true;\nvar multiplyConfig3 = createBinaryKernelConfig(Multiply, supportsFullBroadcast13);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Neg.js\nvar negConfig3 = createUnaryKernelConfig(Neg);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/NonMaxSuppression_util.js\nfunction parseResultStruct(backend2, resOffset) {\n const result = new Int32Array(backend2.wasm.HEAPU8.buffer, resOffset, 4);\n const pSelectedIndices = result[0];\n const selectedSize = result[1];\n const pSelectedScores = result[2];\n const pValidOutputs = result[3];\n backend2.wasm._free(resOffset);\n return { pSelectedIndices, selectedSize, pSelectedScores, pValidOutputs };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/NonMaxSuppressionV3.js\nvar wasmFunc4;\nfunction setup27(backend2) {\n wasmFunc4 = backend2.wasm.cwrap(\n NonMaxSuppressionV3,\n \"number\",\n [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]\n );\n}\nfunction kernelFunc(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { iouThreshold, maxOutputSize, scoreThreshold } = attrs;\n const { boxes, scores } = inputs;\n const boxesId = backend2.dataIdMap.get(boxes.dataId).id;\n const scoresId = backend2.dataIdMap.get(scores.dataId).id;\n const resOffset = wasmFunc4(boxesId, scoresId, maxOutputSize, iouThreshold, scoreThreshold);\n const { pSelectedIndices, selectedSize, pSelectedScores, pValidOutputs } = parseResultStruct(backend2, resOffset);\n backend2.wasm._free(pSelectedScores);\n backend2.wasm._free(pValidOutputs);\n const selectedIndicesTensor = backend2.makeOutput([selectedSize], \"int32\", pSelectedIndices);\n return selectedIndicesTensor;\n}\nvar nonMaxSuppressionV3Config3 = {\n kernelName: NonMaxSuppressionV3,\n backendName: \"wasm\",\n setupFunc: setup27,\n kernelFunc\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/NonMaxSuppressionV4.js\nvar wasmFunc5;\nfunction setup28(backend2) {\n wasmFunc5 = backend2.wasm.cwrap(\n NonMaxSuppressionV4,\n \"number\",\n [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"bool\"\n ]\n );\n}\nfunction nonMaxSuppressionV43(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { iouThreshold, maxOutputSize, scoreThreshold, padToMaxOutputSize } = attrs;\n const { boxes, scores } = inputs;\n const boxesId = backend2.dataIdMap.get(boxes.dataId).id;\n const scoresId = backend2.dataIdMap.get(scores.dataId).id;\n const resOffset = wasmFunc5(boxesId, scoresId, maxOutputSize, iouThreshold, scoreThreshold, padToMaxOutputSize);\n const { pSelectedIndices, selectedSize, pSelectedScores, pValidOutputs } = parseResultStruct(backend2, resOffset);\n backend2.wasm._free(pSelectedScores);\n const selectedIndicesTensor = backend2.makeOutput([selectedSize], \"int32\", pSelectedIndices);\n const validOutputsTensor = backend2.makeOutput([], \"int32\", pValidOutputs);\n return [selectedIndicesTensor, validOutputsTensor];\n}\nvar nonMaxSuppressionV4Config3 = {\n kernelName: NonMaxSuppressionV4,\n backendName: \"wasm\",\n setupFunc: setup28,\n kernelFunc: nonMaxSuppressionV43\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/NonMaxSuppressionV5.js\nvar wasmFunc6;\nfunction setup29(backend2) {\n wasmFunc6 = backend2.wasm.cwrap(\n NonMaxSuppressionV5,\n \"number\",\n [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]\n );\n}\nfunction kernelFunc2(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { iouThreshold, maxOutputSize, scoreThreshold, softNmsSigma } = attrs;\n const { boxes, scores } = inputs;\n const boxesId = backend2.dataIdMap.get(boxes.dataId).id;\n const scoresId = backend2.dataIdMap.get(scores.dataId).id;\n const resOffset = wasmFunc6(boxesId, scoresId, maxOutputSize, iouThreshold, scoreThreshold, softNmsSigma);\n const { pSelectedIndices, selectedSize, pSelectedScores, pValidOutputs } = parseResultStruct(backend2, resOffset);\n backend2.wasm._free(pValidOutputs);\n const selectedIndicesTensor = backend2.makeOutput([selectedSize], \"int32\", pSelectedIndices);\n const selectedScoresTensor = backend2.makeOutput([selectedSize], \"float32\", pSelectedScores);\n return [selectedIndicesTensor, selectedScoresTensor];\n}\nvar nonMaxSuppressionV5Config3 = {\n kernelName: NonMaxSuppressionV5,\n backendName: \"wasm\",\n setupFunc: setup29,\n kernelFunc: kernelFunc2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/NotEqual.js\nvar supportsFullBroadcast14 = false;\nvar notEqualConfig3 = createBinaryKernelConfig(NotEqual, supportsFullBroadcast14, \"bool\");\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/OneHot.js\nvar wasmOneHot;\nfunction setup30(backend2) {\n wasmOneHot = backend2.wasm.cwrap(OneHot, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction oneHot4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { indices } = inputs;\n const { dtype, depth, onValue, offValue } = attrs;\n const out = backend2.makeOutput([...indices.shape, depth], dtype);\n const outId = backend2.dataIdMap.get(out.dataId).id;\n const indicesData = backend2.dataIdMap.get(indices.dataId);\n const indicesId = indicesData.id;\n wasmOneHot(indicesId, depth, onValue, offValue, outId);\n return out;\n}\nvar oneHotConfig3 = {\n kernelName: OneHot,\n backendName: \"wasm\",\n setupFunc: setup30,\n kernelFunc: oneHot4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/OnesLike.js\nfunction onesLike4(args) {\n const { inputs: { x }, backend: backend2 } = args;\n const out = backend2.makeOutput(x.shape, x.dtype);\n const outVals = backend2.typedArrayFromHeap(out);\n outVals.fill(1);\n return out;\n}\nvar onesLikeConfig3 = {\n kernelName: OnesLike,\n backendName: \"wasm\",\n kernelFunc: onesLike4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Pack.js\nfunction pack3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { axis } = attrs;\n if (inputs.length === 1) {\n return expandDims5({ inputs: { input: inputs[0] }, backend: backend2, attrs: { dim: axis } });\n }\n const shape = inputs[0].shape;\n const dtype = inputs[0].dtype;\n inputs.forEach((t) => {\n util_exports.assertShapesMatch(shape, t.shape, \"All tensors passed to stack must have matching shapes\");\n util_exports.assert(dtype === t.dtype, () => \"All tensors passed to stack must have matching dtypes\");\n });\n const intermediateTensorInfos = [];\n const expandedTensors = inputs.map((t) => {\n const expandedT = expandDims5({ inputs: { input: t }, backend: backend2, attrs: { dim: axis } });\n intermediateTensorInfos.push(expandedT);\n return expandedT;\n });\n const result = concat4({ inputs: expandedTensors, backend: backend2, attrs: { axis } });\n intermediateTensorInfos.forEach((t) => backend2.disposeData(t.dataId));\n return result;\n}\nvar packConfig3 = {\n kernelName: Pack,\n backendName: \"wasm\",\n kernelFunc: pack3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/PadV2.js\nvar wasmPadV2;\nfunction setup31(backend2) {\n wasmPadV2 = backend2.wasm.cwrap(PadV2, null, [\n \"number\",\n \"array\",\n \"number\",\n \"number\",\n \"array\",\n \"array\",\n \"number\",\n \"number\"\n ]);\n}\nfunction pad2(args) {\n const { inputs: { x }, backend: backend2, attrs: { paddings, constantValue } } = args;\n const outShape = paddings.map((p2, i) => p2[0] + x.shape[i] + p2[1]);\n if (util_exports.sizeFromShape(x.shape) === 0) {\n return fill4({\n backend: backend2,\n attrs: { shape: outShape, value: constantValue, dtype: x.dtype }\n });\n }\n const xId = backend2.dataIdMap.get(x.dataId).id;\n const out = backend2.makeOutput(outShape, x.dtype);\n const outTensorData = backend2.dataIdMap.get(out.dataId);\n const outId = outTensorData.id;\n const xShapeBytes = new Uint8Array(new Int32Array(x.shape).buffer);\n const prePaddingsFlat = paddings.map((padTuple) => padTuple[0]);\n const postPaddingsFlat = paddings.map((padTuple) => padTuple[1]);\n const prePaddingsBytes = new Uint8Array(new Int32Array(prePaddingsFlat).buffer);\n const postPaddingsBytes = new Uint8Array(new Int32Array(postPaddingsFlat).buffer);\n wasmPadV2(xId, xShapeBytes, x.shape.length, CppDType[x.dtype], prePaddingsBytes, postPaddingsBytes, constantValue, outId);\n return out;\n}\nvar padV2Config3 = {\n kernelName: PadV2,\n backendName: \"wasm\",\n kernelFunc: pad2,\n setupFunc: setup31\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Pow.js\nvar supportsFullBroadcast15 = false;\nvar powConfig3 = createBinaryKernelConfig(Pow, supportsFullBroadcast15);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Prelu.js\nvar wasmPrelu;\nfunction setup32(backend2) {\n wasmPrelu = backend2.wasm.cwrap(Prelu, null, [\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction prelu5(args) {\n const { inputs, backend: backend2 } = args;\n const { x, alpha } = inputs;\n const xId = backend2.dataIdMap.get(x.dataId).id;\n const weightsId = backend2.dataIdMap.get(alpha.dataId).id;\n let inputId = xId;\n const input2 = x;\n let castedInput = input2;\n if (input2.dtype !== \"float32\") {\n castedInput = cast5({ backend: backend2, inputs: { x }, attrs: { dtype: \"float32\" } });\n inputId = backend2.dataIdMap.get(castedInput.dataId).id;\n }\n const out = backend2.makeOutput(x.shape, \"float32\");\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmPrelu(inputId, weightsId, outId);\n if (input2.dtype !== \"float32\") {\n backend2.disposeData(castedInput.dataId);\n }\n return out;\n}\nvar preluConfig3 = {\n kernelName: Prelu,\n backendName: \"wasm\",\n setupFunc: setup32,\n kernelFunc: prelu5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Prod.js\nvar wasmProd;\nfunction setup33(backend2) {\n wasmProd = backend2.wasm.cwrap(Prod, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction prod4(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { axis, keepDims } = attrs;\n const { x } = inputs;\n const xId = backend2.dataIdMap.get(x.dataId).id;\n let inputId = xId;\n let input2 = x;\n const { transposed, axes, originalAxes, inputWasTransposed } = permuteAxesAndTranspose(x, axis, backend2);\n let reductionAxes = axes;\n if (inputWasTransposed) {\n const transposedId = backend2.dataIdMap.get(transposed.dataId).id;\n if (transposedId !== xId) {\n input2 = transposed;\n inputId = transposedId;\n reductionAxes = backend_util_exports.getInnerMostAxes(reductionAxes.length, input2.shape.length);\n }\n }\n backend_util_exports.assertAxesAreInnerMostDims(\"prod\", reductionAxes, input2.shape.length);\n const [outShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes(input2.shape, reductionAxes);\n const reduceSize = util_exports.sizeFromShape(reduceShape);\n const out = backend2.makeOutput(outShape, input2.dtype);\n if (util_exports.sizeFromShape(input2.shape) !== 0) {\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmProd(inputId, reduceSize, CppDType[out.dtype], outId);\n }\n if (inputWasTransposed) {\n backend2.disposeData(transposed.dataId);\n }\n if (keepDims) {\n const newShape = backend_util_exports.expandShapeToKeepDim(out.shape, originalAxes);\n out.shape = newShape;\n }\n return out;\n}\nvar prodConfig3 = {\n kernelName: Prod,\n backendName: \"wasm\",\n setupFunc: setup33,\n kernelFunc: prod4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Range.js\nvar range5 = (args) => {\n const { backend: backend2, attrs } = args;\n const { start, stop, step: step5, dtype } = attrs;\n const values = rangeImpl(start, stop, step5, dtype);\n const out = backend2.makeOutput([values.length], dtype);\n const outVals = backend2.typedArrayFromHeap(out);\n outVals.set(values);\n return out;\n};\nvar rangeConfig3 = {\n kernelName: Range,\n backendName: \"wasm\",\n kernelFunc: range5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/RealDiv.js\nvar supportsFullBroadcast16 = true;\nvar realDivConfig3 = createBinaryKernelConfig(RealDiv, supportsFullBroadcast16);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Relu.js\nvar reluConfig3 = createUnaryKernelConfig(Relu);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Relu6.js\nvar relu6Config3 = createUnaryKernelConfig(Relu6);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/ResizeBilinear.js\nvar wasmResizeBilinear;\nfunction setup34(backend2) {\n wasmResizeBilinear = backend2.wasm.cwrap(ResizeBilinear, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction resizeBilinear4(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { images } = inputs;\n const { alignCorners, halfPixelCenters, size } = attrs;\n const [newHeight, newWidth] = size;\n const [batch, oldHeight, oldWidth, numChannels] = images.shape;\n const outShape = [batch, newHeight, newWidth, numChannels];\n let xData = backend2.dataIdMap.get(images.dataId);\n let castedData;\n if (xData.dtype !== \"float32\") {\n castedData = cast5({ backend: backend2, inputs: { x: images }, attrs: { dtype: \"float32\" } });\n xData = backend2.dataIdMap.get(castedData.dataId);\n }\n const xId = xData.id;\n const out = backend2.makeOutput(outShape, \"float32\");\n if (util_exports.sizeFromShape(images.shape) === 0) {\n return out;\n }\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmResizeBilinear(xId, batch, oldHeight, oldWidth, numChannels, newHeight, newWidth, alignCorners ? 1 : 0, halfPixelCenters ? 1 : 0, outId);\n if (castedData != null) {\n backend2.disposeData(castedData.dataId);\n }\n return out;\n}\nvar resizeBilinearConfig3 = {\n kernelName: ResizeBilinear,\n backendName: \"wasm\",\n setupFunc: setup34,\n kernelFunc: resizeBilinear4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/ResizeNearestNeighbor.js\nvar wasmResizeNearestNeighbor;\nfunction setup35(backend2) {\n wasmResizeNearestNeighbor = backend2.wasm.cwrap(ResizeNearestNeighbor, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction resizeNearestNeighbor4(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { images } = inputs;\n const { alignCorners, halfPixelCenters, size } = attrs;\n const [newHeight, newWidth] = size;\n const [batch, oldHeight, oldWidth, numChannels] = images.shape;\n const outShape = [batch, newHeight, newWidth, numChannels];\n const out = backend2.makeOutput(outShape, \"float32\");\n if (util_exports.sizeFromShape(images.shape) === 0) {\n return out;\n }\n let xData = backend2.dataIdMap.get(images.dataId);\n let castedData;\n if (xData.dtype !== \"float32\") {\n castedData = cast5({\n backend: backend2,\n inputs: { x: images },\n attrs: { dtype: \"float32\" }\n });\n xData = backend2.dataIdMap.get(castedData.dataId);\n }\n const xId = xData.id;\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmResizeNearestNeighbor(xId, batch, oldHeight, oldWidth, numChannels, newHeight, newWidth, alignCorners ? 1 : 0, halfPixelCenters ? 1 : 0, outId);\n if (castedData != null) {\n backend2.disposeData(castedData.dataId);\n }\n return out;\n}\nvar resizeNearestNeighborConfig3 = {\n kernelName: ResizeNearestNeighbor,\n backendName: \"wasm\",\n setupFunc: setup35,\n kernelFunc: resizeNearestNeighbor4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Reverse.js\nvar wasmReverse;\nfunction setup36(backend2) {\n wasmReverse = backend2.wasm.cwrap(Reverse, null, [\n \"number\",\n \"array\",\n \"number\",\n \"array\",\n \"number\",\n \"number\"\n ]);\n}\nfunction reverse4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { dims } = attrs;\n const axes = util_exports.parseAxisParam(dims, x.shape);\n if (x.shape.length === 0) {\n return identity4({ inputs: { x }, backend: backend2 });\n }\n const out = backend2.makeOutput(x.shape, x.dtype);\n const xId = backend2.dataIdMap.get(x.dataId).id;\n const outId = backend2.dataIdMap.get(out.dataId).id;\n const axesBytes = new Uint8Array(new Int32Array(axes).buffer);\n const outShapeBytes = new Uint8Array(new Int32Array(x.shape).buffer);\n wasmReverse(xId, axesBytes, axes.length, outShapeBytes, x.shape.length, outId);\n const reshaped = reshape5({ inputs: { x: out }, attrs: { shape: x.shape }, backend: backend2 });\n backend2.disposeData(out.dataId);\n return reshaped;\n}\nvar reverseConfig3 = {\n kernelName: Reverse,\n backendName: \"wasm\",\n kernelFunc: reverse4,\n setupFunc: setup36\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/RotateWithOffset.js\nvar wasmRotate;\nfunction setup37(backend2) {\n wasmRotate = backend2.wasm.cwrap(RotateWithOffset, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"array\",\n \"number\",\n \"number\"\n ]);\n}\nfunction rotateWithOffset2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { image: image2 } = inputs;\n const { radians, fillValue, center } = attrs;\n const out = backend2.makeOutput(image2.shape, image2.dtype);\n const imageId = backend2.dataIdMap.get(image2.dataId).id;\n const outId = backend2.dataIdMap.get(out.dataId).id;\n const [batch, imageHeight, imageWidth, numChannels] = image2.shape;\n const [centerX, centerY] = backend_util_exports.getImageCenter(center, imageHeight, imageWidth);\n const fillIsBlack = fillValue === 0;\n const fullOpacityValue = 255;\n const fillValues2 = typeof fillValue === \"number\" ? [fillValue, fillValue, fillValue, fillIsBlack ? 0 : fullOpacityValue] : [...fillValue, fullOpacityValue];\n const fillBytes = new Uint8Array(new Int32Array(fillValues2).buffer);\n wasmRotate(imageId, batch, imageHeight, imageWidth, numChannels, radians, centerX, centerY, fillBytes, fillValues2.length, outId);\n return out;\n}\nvar rotateWithOffsetConfig3 = {\n kernelName: RotateWithOffset,\n backendName: \"wasm\",\n kernelFunc: rotateWithOffset2,\n setupFunc: setup37\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Round.js\nvar roundConfig3 = createUnaryKernelConfig(Round);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Rsqrt.js\nvar rsqrtConfig3 = createUnaryKernelConfig(Rsqrt);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/ScatterNd.js\nvar wasmScatterNd;\nfunction setup38(backend2) {\n wasmScatterNd = backend2.wasm.cwrap(ScatterNd, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"array\",\n \"number\",\n \"number\"\n ]);\n}\nfunction scatterNd3(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { indices, updates } = inputs;\n const { shape } = attrs;\n const out = backend2.makeOutput(shape, updates.dtype);\n if (util_exports.sizeFromShape(shape) === 0) {\n return out;\n }\n const { sliceRank, numUpdates, sliceSize, strides, outputSize } = scatter_nd_util_exports.calculateShapes(updates, indices, shape);\n const indicesData = backend2.dataIdMap.get(indices.dataId);\n const indicesId = indicesData.id;\n const updatesData = backend2.dataIdMap.get(updates.dataId);\n const updatesId = updatesData.id;\n const stridesBytes = new Uint8Array(new Int32Array(strides).buffer);\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmScatterNd(indicesId, updatesId, CppDType[updates.dtype], sliceRank, numUpdates, sliceSize, stridesBytes, outputSize, outId);\n return out;\n}\nvar scatterNdConfig3 = {\n kernelName: ScatterNd,\n backendName: \"wasm\",\n setupFunc: setup38,\n kernelFunc: scatterNd3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Select.js\nvar wasmSelect;\nfunction setup39(backend2) {\n wasmSelect = backend2.wasm.cwrap(\"SelectV2\", null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction select4(args) {\n const { inputs, backend: backend2 } = args;\n const { condition, t, e } = inputs;\n const conditionId = backend2.dataIdMap.get(condition.dataId).id;\n const tId = backend2.dataIdMap.get(t.dataId).id;\n const eId = backend2.dataIdMap.get(e.dataId).id;\n const out = backend2.makeOutput(t.shape, t.dtype);\n const outId = backend2.dataIdMap.get(out.dataId).id;\n const cRank = condition.shape.length;\n const tRank = t.shape.length;\n const offset = cRank === 0 || cRank > 1 || tRank === 1 ? 1 : util_exports.sizeFromShape(t.shape.slice(1));\n wasmSelect(conditionId, tId, eId, offset, outId);\n return out;\n}\nvar selectConfig3 = {\n kernelName: Select,\n backendName: \"wasm\",\n kernelFunc: select4,\n setupFunc: setup39\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Sigmoid.js\nvar wasmFunc7;\nfunction setup40(backend2) {\n wasmFunc7 = backend2.wasm.cwrap(Sigmoid, null, [\"number\", \"number\"]);\n}\nfunction sigmoid4(args) {\n const { backend: backend2, inputs: { x } } = args;\n const xId = backend2.dataIdMap.get(x.dataId).id;\n const out = backend2.makeOutput(x.shape, x.dtype);\n const outId = backend2.dataIdMap.get(out.dataId).id;\n if (util_exports.sizeFromShape(out.shape) === 0) {\n return out;\n }\n wasmFunc7(xId, outId);\n return out;\n}\nvar sigmoidConfig3 = {\n kernelName: \"Sigmoid\",\n backendName: \"wasm\",\n setupFunc: setup40,\n kernelFunc: sigmoid4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Sin.js\nvar sinConfig3 = createUnaryKernelConfig(Sin);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Softmax.js\nvar wasmFunc8;\nfunction setup41(backend2) {\n wasmFunc8 = backend2.wasm.cwrap(Softmax, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction softmax5(args) {\n const { backend: backend2, inputs: { logits }, attrs: { dim } } = args;\n const xId = backend2.dataIdMap.get(logits.dataId).id;\n const out = backend2.makeOutput(logits.shape, logits.dtype);\n const outId = backend2.dataIdMap.get(out.dataId).id;\n const channels = logits.shape[dim];\n const batch = util_exports.sizeFromShape(logits.shape) / channels;\n if (util_exports.sizeFromShape(out.shape) === 0) {\n return out;\n }\n wasmFunc8(xId, outId, channels, batch);\n return out;\n}\nvar softmaxConfig3 = {\n kernelName: Softmax,\n backendName: \"wasm\",\n setupFunc: setup41,\n kernelFunc: softmax5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/SpaceToBatchND.js\nfunction spaceToBatchND4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { blockShape, paddings } = attrs;\n const prod6 = util_exports.sizeFromShape(blockShape);\n const completePaddings = [[0, 0]];\n completePaddings.push(...paddings);\n for (let i = 1 + blockShape.length; i < x.shape.length; ++i) {\n completePaddings.push([0, 0]);\n }\n const paddedX = padV2Config3.kernelFunc({\n inputs: { x },\n backend: backend2,\n attrs: { paddings: completePaddings, constantValue: 0 }\n });\n const reshapedPaddedShape = backend_util_exports.getReshaped(paddedX.shape, blockShape, prod6, false);\n const permutedReshapedPaddedPermutation = backend_util_exports.getPermuted(reshapedPaddedShape.length, blockShape.length, false);\n const flattenShape = backend_util_exports.getReshapedPermuted(paddedX.shape, blockShape, prod6, false);\n const reshapeInputs = { x: paddedX };\n const reshapeAttrs = { shape: reshapedPaddedShape };\n const paddedXReshaped = reshape5({ inputs: reshapeInputs, backend: backend2, attrs: reshapeAttrs });\n const transposeInputs = { x: paddedXReshaped };\n const transposeAttrs = { perm: permutedReshapedPaddedPermutation };\n const paddedXT = transpose4({ inputs: transposeInputs, backend: backend2, attrs: transposeAttrs });\n const resultReshapeInputs = { x: paddedXT };\n const resultReshapeAttrs = { shape: flattenShape };\n const result = reshape5({ inputs: resultReshapeInputs, backend: backend2, attrs: resultReshapeAttrs });\n backend2.disposeData(paddedX.dataId);\n backend2.disposeData(paddedXReshaped.dataId);\n backend2.disposeData(paddedXT.dataId);\n return result;\n}\nvar spaceToBatchNDConfig3 = {\n kernelName: SpaceToBatchND,\n backendName: \"wasm\",\n kernelFunc: spaceToBatchND4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/SparseFillEmptyRows.js\nvar wasmSparseFillEmptyRows;\nfunction setup42(backend2) {\n wasmSparseFillEmptyRows = backend2.wasm.cwrap(\"SparseFillEmptyRows\", \"number\", [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction sparseFillEmptyRows4(args) {\n const { backend: backend2, inputs } = args;\n const { indices, values, denseShape, defaultValue } = inputs;\n const indicesCount = indices.shape[0];\n const rank = indices.shape[1];\n const denseRows = backend2.readSync(denseShape.dataId)[0];\n const maxOutputIndicesShape = [indicesCount + denseRows, rank];\n const indicesId = backend2.dataIdMap.get(indices.dataId).id;\n const valuesId = backend2.dataIdMap.get(values.dataId).id;\n const defaultValueId = backend2.dataIdMap.get(defaultValue.dataId).id;\n const outputIndices = backend2.makeOutput(maxOutputIndicesShape, indices.dtype);\n const outputIndicesId = backend2.dataIdMap.get(outputIndices.dataId).id;\n const outputValues = backend2.makeOutput(maxOutputIndicesShape.slice(0, 1), values.dtype);\n const outputValuesId = backend2.dataIdMap.get(outputValues.dataId).id;\n const emptyRowIndicator = backend2.makeOutput([denseRows], \"bool\");\n const emptyRowIndicatorId = backend2.dataIdMap.get(emptyRowIndicator.dataId).id;\n const reverseIndexMap = backend2.makeOutput([indicesCount], indices.dtype);\n const reverseIndexMapId = backend2.dataIdMap.get(reverseIndexMap.dataId).id;\n const exceptionValues = backend2.makeOutput([4], \"int32\");\n const exceptionValuesId = backend2.dataIdMap.get(exceptionValues.dataId).id;\n const outputRows = wasmSparseFillEmptyRows(indicesId, valuesId, CppDType[values.dtype], indicesCount, denseRows, rank, defaultValueId, outputIndicesId, outputValuesId, emptyRowIndicatorId, reverseIndexMapId, exceptionValuesId);\n const exceptionValuesArray = backend2.readSync(exceptionValues.dataId);\n let exceptionMessage;\n switch (exceptionValuesArray[0]) {\n case 1: {\n exceptionMessage = backend_util_exports.getSparseFillEmptyRowsIndicesDenseShapeMismatch(exceptionValuesArray[1]);\n break;\n }\n case 2: {\n exceptionMessage = backend_util_exports.getSparseFillEmptyRowsNegativeIndexErrorMessage(exceptionValuesArray[1], exceptionValuesArray[2]);\n break;\n }\n case 3:\n exceptionMessage = backend_util_exports.getSparseFillEmptyRowsOutOfRangeIndexErrorMessage(exceptionValuesArray[1], exceptionValuesArray[2], exceptionValuesArray[3]);\n break;\n default:\n exceptionMessage = \"\";\n }\n backend2.disposeData(exceptionValues.dataId);\n if (exceptionMessage) {\n backend2.disposeData(outputIndices.dataId);\n backend2.disposeData(outputValues.dataId);\n backend2.disposeData(emptyRowIndicator.dataId);\n backend2.disposeData(reverseIndexMap.dataId);\n throw new Error(exceptionMessage);\n }\n let resizedIndices = outputIndices;\n let resizedValues = outputValues;\n if (outputRows !== maxOutputIndicesShape[0]) {\n resizedIndices = slice4({\n inputs: { x: outputIndices },\n attrs: { begin: 0, size: [outputRows, rank] },\n backend: backend2\n });\n resizedValues = slice4({\n inputs: { x: outputValues },\n attrs: { begin: 0, size: outputRows },\n backend: backend2\n });\n backend2.disposeData(outputIndices.dataId);\n backend2.disposeData(outputValues.dataId);\n }\n return [resizedIndices, resizedValues, emptyRowIndicator, reverseIndexMap];\n}\nvar sparseFillEmptyRowsConfig3 = {\n kernelName: SparseFillEmptyRows,\n backendName: \"wasm\",\n setupFunc: setup42,\n kernelFunc: sparseFillEmptyRows4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/SparseReshape.js\nvar wasmSparseReshape;\nfunction setup43(backend2) {\n wasmSparseReshape = backend2.wasm.cwrap(SparseReshape, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction sparseReshape4(args) {\n const { backend: backend2, inputs } = args;\n const { inputIndices, inputShape, newShape } = inputs;\n if (inputIndices.shape.length !== 2) {\n throw new Error(`Input indices should be a matrix but received shape\n ${inputIndices.shape}`);\n }\n if (inputShape.shape.length !== 1) {\n throw new Error(`Input shape should be a vector but received shape\n ${inputShape.shape}`);\n }\n if (newShape.shape.length !== 1) {\n throw new Error(`Target shape should be a vector but received shape ${newShape.shape}`);\n }\n const inputIndicesId = backend2.dataIdMap.get(inputIndices.dataId).id;\n const inputShapeId = backend2.dataIdMap.get(inputShape.dataId).id;\n const newShapeId = backend2.dataIdMap.get(newShape.dataId).id;\n const nnz = inputIndices.shape[0];\n const outputRank = util_exports.sizeFromShape(newShape.shape);\n const newIndices = backend2.makeOutput([nnz, outputRank], inputIndices.dtype);\n const newIndicesId = backend2.dataIdMap.get(newIndices.dataId).id;\n const outputShape = backend2.makeOutput([outputRank], newShape.dtype);\n const outputShapeId = backend2.dataIdMap.get(outputShape.dataId).id;\n const exceptionValues = backend2.makeOutput([3], \"int32\");\n const exceptionValuesId = backend2.dataIdMap.get(exceptionValues.dataId).id;\n wasmSparseReshape(inputIndicesId, inputShapeId, newShapeId, nnz, newIndicesId, outputShapeId, exceptionValuesId);\n const exceptionValuesArray = backend2.readSync(exceptionValues.dataId);\n let exceptionMessage;\n switch (exceptionValuesArray[0]) {\n case 0: {\n exceptionMessage = backend_util_exports.getSparseReshapeMultipleNegativeOneOutputDimErrorMessage(exceptionValuesArray[1], exceptionValuesArray[2]);\n break;\n }\n case 1: {\n exceptionMessage = backend_util_exports.getSparseReshapeNegativeOutputDimErrorMessage(exceptionValuesArray[1], exceptionValuesArray[2]);\n break;\n }\n case 2:\n exceptionMessage = backend_util_exports.getSparseReshapeEmptyTensorZeroOutputDimErrorMessage();\n break;\n case 3: {\n const inputShapeValues = Array.from(backend2.readSync(inputShape.dataId)), outputShapeValues = Array.from(backend2.readSync(outputShape.dataId));\n exceptionMessage = backend_util_exports.getSparseReshapeInputOutputMultipleErrorMessage(inputShapeValues, outputShapeValues);\n break;\n }\n case 4: {\n const inputShapeValues = Array.from(backend2.readSync(inputShape.dataId)), outputShapeValues = Array.from(backend2.readSync(outputShape.dataId));\n exceptionMessage = backend_util_exports.getSparseReshapeInputOutputMismatchErrorMessage(inputShapeValues, outputShapeValues);\n break;\n }\n default:\n exceptionMessage = \"\";\n }\n backend2.disposeData(exceptionValues.dataId);\n if (exceptionMessage) {\n backend2.disposeData(newIndices.dataId);\n backend2.disposeData(outputShape.dataId);\n throw new Error(exceptionMessage);\n }\n return [newIndices, outputShape];\n}\nvar sparseReshapeConfig3 = {\n kernelName: SparseReshape,\n backendName: \"wasm\",\n setupFunc: setup43,\n kernelFunc: sparseReshape4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/SparseSegmentReduction.js\nvar wasmSparseSegmentReduction;\nfunction setup44(backend2) {\n wasmSparseSegmentReduction = backend2.wasm.cwrap(\"SparseSegmentReduction\", null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction sparseSegmentReduction(args, isMean) {\n const { backend: backend2, inputs } = args;\n const { data, indices, segmentIds } = inputs;\n const numIndices = indices.shape[0];\n const segmentIdsBack = backend2.readSync(segmentIds.dataId, numIndices - 1, numIndices)[0];\n const lastSegmentIdPlusOne = numIndices > 0 ? segmentIdsBack + 1 : 0;\n const outputRows = lastSegmentIdPlusOne;\n if (outputRows < 0) {\n throw new Error(backend_util_exports.getSparseSegmentReductionNegativeSegmentIdsErrorMessage());\n }\n const outputShape = data.shape.slice();\n outputShape[0] = outputRows;\n const dataId = backend2.dataIdMap.get(data.dataId).id;\n const indicesId = backend2.dataIdMap.get(indices.dataId).id;\n const segmentIdsId = backend2.dataIdMap.get(segmentIds.dataId).id;\n const output = backend2.makeOutput(outputShape, data.dtype);\n const outputId = backend2.dataIdMap.get(output.dataId).id;\n const exceptionValues = backend2.makeOutput([4], \"int32\");\n const exceptionValuesId = backend2.dataIdMap.get(exceptionValues.dataId).id;\n wasmSparseSegmentReduction(dataId, CppDType[data.dtype], data.shape[0], indicesId, segmentIdsId, outputId, exceptionValuesId, isMean, 0);\n const exceptionValuesArray = backend2.readSync(exceptionValues.dataId);\n let exceptionMessage;\n switch (exceptionValuesArray[0]) {\n case 0: {\n exceptionMessage = backend_util_exports.getSparseSegmentReductionNegativeSegmentIdsErrorMessage();\n break;\n }\n case 1: {\n exceptionMessage = backend_util_exports.getSparseSegmentReductionNonIncreasingSegmentIdsErrorMessage();\n break;\n }\n case 2:\n exceptionMessage = backend_util_exports.getSparseSegmentReductionSegmentIdOutOfRangeErrorMessage(exceptionValuesArray[1], exceptionValuesArray[2]);\n break;\n case 3:\n exceptionMessage = backend_util_exports.getSparseSegmentReductionIndicesOutOfRangeErrorMessage(exceptionValuesArray[1], exceptionValuesArray[2], exceptionValuesArray[3]);\n break;\n default:\n exceptionMessage = \"\";\n }\n backend2.disposeData(exceptionValues.dataId);\n if (exceptionMessage) {\n backend2.disposeData(output.dataId);\n throw new Error(exceptionMessage);\n }\n return output;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/SparseSegmentMean.js\nfunction sparseSegmentMean4(args) {\n return sparseSegmentReduction(args, true);\n}\nvar sparseSegmentMeanConfig3 = {\n kernelName: SparseSegmentMean,\n backendName: \"wasm\",\n setupFunc: setup44,\n kernelFunc: sparseSegmentMean4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/SparseSegmentSum.js\nfunction sparseSegmentSum4(args) {\n return sparseSegmentReduction(args, false);\n}\nvar sparseSegmentSumConfig3 = {\n kernelName: SparseSegmentSum,\n backendName: \"wasm\",\n setupFunc: setup44,\n kernelFunc: sparseSegmentSum4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/SplitV.js\nfunction splitV3(args) {\n const { inputs, attrs, backend: backend2 } = args;\n const { x } = inputs;\n const { numOrSizeSplits, axis } = attrs;\n const $axis = util_exports.parseAxisParam(axis, x.shape)[0];\n const splitSizes = backend_util_exports.prepareSplitSize(x, numOrSizeSplits, $axis);\n const begin = new Array(x.shape.length).fill(0);\n const size = x.shape.slice();\n return splitSizes.map((s) => {\n const xSliceSize = [...size];\n xSliceSize[$axis] = s;\n const xSlice = slice4({ inputs: { x }, attrs: { begin, size: xSliceSize }, backend: backend2 });\n begin[$axis] += s;\n return xSlice;\n });\n}\nvar splitVConfig3 = {\n kernelName: SplitV,\n backendName: \"wasm\",\n kernelFunc: splitV3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Sqrt.js\nvar sqrtConfig3 = createUnaryKernelConfig(Sqrt);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Square.js\nvar squareConfig3 = createUnaryKernelConfig(Square);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/SquaredDifference.js\nvar supportsFullBroadcast17 = true;\nvar squaredDifferenceConfig3 = createBinaryKernelConfig(SquaredDifference, supportsFullBroadcast17);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Step.js\nvar wasmStep;\nfunction setup45(backend2) {\n wasmStep = backend2.wasm.cwrap(Step, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction step4(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { alpha } = attrs;\n const { x } = inputs;\n const xId = backend2.dataIdMap.get(x.dataId).id;\n const out = backend2.makeOutput(x.shape, x.dtype);\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmStep(xId, alpha, CppDType[x.dtype], outId);\n return out;\n}\nvar stepConfig3 = {\n kernelName: Step,\n backendName: \"wasm\",\n setupFunc: setup45,\n kernelFunc: step4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/StridedSlice.js\nvar wasmStridedSlice;\nfunction setup46(backend2) {\n wasmStridedSlice = backend2.wasm.cwrap(StridedSlice, null, [\n \"number\",\n \"array\",\n \"number\",\n \"array\",\n \"array\",\n \"array\",\n \"array\",\n \"array\",\n \"number\",\n \"number\"\n ]);\n}\nfunction stridedSlice4(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { x } = inputs;\n const { begin, end, strides, beginMask, endMask, ellipsisMask, newAxisMask, shrinkAxisMask } = attrs;\n const { finalShapeSparse, finalShape, isIdentity, sliceDim0, isSimpleSlice, begin: $begin, end: $end, strides: $strides } = slice_util_exports.sliceInfo(x.shape, begin, end, strides, beginMask, endMask, ellipsisMask, newAxisMask, shrinkAxisMask);\n let result;\n if (isIdentity) {\n result = reshape5({ inputs: { x }, backend: backend2, attrs: { shape: finalShape } });\n } else if (sliceDim0 || isSimpleSlice) {\n util_exports.assert(x.shape.length >= 1, () => `Input must have rank at least 1, got: ${x.shape.length}`);\n const size = slice_util_exports.computeOutShape($begin, $end, $strides);\n const sliced = slice4({ inputs: { x }, backend: backend2, attrs: { begin: $begin, size } });\n result = reshape5({ inputs: { x: sliced }, backend: backend2, attrs: { shape: finalShape } });\n backend2.disposeData(sliced.dataId);\n } else {\n const out = backend2.makeOutput(finalShapeSparse, \"float32\");\n const xId = backend2.dataIdMap.get(x.dataId).id;\n const xStridesBytes = new Uint8Array(new Int32Array(util_exports.computeStrides(x.shape)).buffer);\n const beginBytes = new Uint8Array(new Int32Array($begin).buffer);\n const endBytes = new Uint8Array(new Int32Array($end).buffer);\n const stridesBytes = new Uint8Array(new Int32Array($strides).buffer);\n const outputShapeBytes = new Uint8Array(new Int32Array(finalShapeSparse).buffer);\n const outStridesBytes = new Uint8Array(new Int32Array(util_exports.computeStrides(finalShapeSparse)).buffer);\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmStridedSlice(xId, xStridesBytes, x.shape.length, beginBytes, endBytes, stridesBytes, outputShapeBytes, outStridesBytes, finalShapeSparse.length, outId);\n result = reshape5({ inputs: { x: out }, backend: backend2, attrs: { shape: finalShape } });\n backend2.disposeData(out.dataId);\n }\n return result;\n}\nvar stridedSliceConfig3 = {\n kernelName: StridedSlice,\n backendName: \"wasm\",\n setupFunc: setup46,\n kernelFunc: stridedSlice4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/StringNGrams.js\nfunction stringNGrams4(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { data, dataSplits } = inputs;\n const { separator, nGramWidths, leftPad, rightPad: rightPad2, padWidth, preserveShortSequences } = attrs;\n const $data = backend2.readSync(data.dataId);\n const $dataSplits = backend2.readSync(dataSplits.dataId);\n const [nGrams, nGramsSplits] = stringNGramsImpl($data, $dataSplits, separator, nGramWidths, leftPad, rightPad2, padWidth, preserveShortSequences);\n const nGramsOut = backend2.makeOutput([nGrams.length], \"string\");\n const nGramsOutData = backend2.dataIdMap.get(nGramsOut.dataId);\n nGramsOutData.stringBytes = nGrams;\n const nGramsSplitsOut = backend2.makeOutput(dataSplits.shape, \"int32\");\n const nGramsSplitsOutVals = backend2.typedArrayFromHeap(nGramsSplitsOut);\n nGramsSplitsOutVals.set(nGramsSplits);\n return [nGramsOut, nGramsSplitsOut];\n}\nvar stringNGramsConfig3 = {\n kernelName: StringNGrams,\n backendName: \"wasm\",\n kernelFunc: stringNGrams4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/StringSplit.js\nfunction stringSplit4(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { input: input2, delimiter } = inputs;\n const { skipEmpty } = attrs;\n const inputVals = backend2.readSync(input2.dataId);\n const delimiterVals = backend2.readSync(delimiter.dataId);\n const [indices, values, shape] = stringSplitImpl(inputVals, delimiterVals[0], skipEmpty);\n const outputSize = values.length;\n const indicesOut = backend2.makeOutput([outputSize, 2], \"int32\");\n const indicesOutVals = backend2.typedArrayFromHeap(indicesOut);\n indicesOutVals.set(indices);\n const valuesOut = backend2.makeOutput([outputSize], \"string\");\n const valuesOutData = backend2.dataIdMap.get(valuesOut.dataId);\n valuesOutData.stringBytes = values;\n const shapeOut = backend2.makeOutput([2], \"int32\");\n const shapeOutVals = backend2.typedArrayFromHeap(shapeOut);\n shapeOutVals.set(shape);\n return [indicesOut, valuesOut, shapeOut];\n}\nvar stringSplitConfig3 = {\n kernelName: StringSplit,\n backendName: \"wasm\",\n kernelFunc: stringSplit4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/StringToHashBucketFast.js\nfunction stringToHashBucketFast4(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { input: input2 } = inputs;\n const { numBuckets } = attrs;\n const inputVals = backend2.readSync(input2.dataId);\n const values = stringToHashBucketFastImpl(inputVals, numBuckets);\n const out = backend2.makeOutput(input2.shape, \"int32\");\n const outVals = backend2.typedArrayFromHeap(out);\n outVals.set(values);\n return out;\n}\nvar stringToHashBucketFastConfig3 = {\n kernelName: StringToHashBucketFast,\n backendName: \"wasm\",\n kernelFunc: stringToHashBucketFast4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Sub.js\nvar supportsFullBroadcast18 = true;\nvar subConfig3 = createBinaryKernelConfig(Sub, supportsFullBroadcast18);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Sum.js\nvar wasmSum;\nfunction setup47(backend2) {\n wasmSum = backend2.wasm.cwrap(Sum, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction sum5(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { axis, keepDims } = attrs;\n const { x } = inputs;\n const xId = backend2.dataIdMap.get(x.dataId).id;\n let inputId = xId;\n let input2 = x;\n const { transposed, axes, originalAxes, inputWasTransposed } = permuteAxesAndTranspose(x, axis, backend2);\n let reductionAxes = axes;\n if (inputWasTransposed) {\n const transposedId = backend2.dataIdMap.get(transposed.dataId).id;\n if (transposedId !== xId) {\n input2 = transposed;\n inputId = transposedId;\n reductionAxes = backend_util_exports.getInnerMostAxes(reductionAxes.length, input2.shape.length);\n }\n }\n backend_util_exports.assertAxesAreInnerMostDims(\"sum\", reductionAxes, input2.shape.length);\n const [outShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes(input2.shape, reductionAxes);\n const reduceSize = util_exports.sizeFromShape(reduceShape);\n const out = backend2.makeOutput(outShape, input2.dtype);\n if (util_exports.sizeFromShape(input2.shape) !== 0) {\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmSum(inputId, reduceSize, CppDType[out.dtype], outId);\n }\n if (inputWasTransposed) {\n backend2.disposeData(transposed.dataId);\n }\n if (keepDims) {\n const newShape = backend_util_exports.expandShapeToKeepDim(out.shape, originalAxes);\n out.shape = newShape;\n }\n return out;\n}\nvar sumConfig3 = {\n kernelName: Sum,\n backendName: \"wasm\",\n setupFunc: setup47,\n kernelFunc: sum5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Tan.js\nvar tanConfig3 = createUnaryKernelConfig(Tan);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Tanh.js\nvar tanhConfig3 = createUnaryKernelConfig(Tanh);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Tile.js\nvar wasmTile;\nfunction setup48(backend2) {\n wasmTile = backend2.wasm.cwrap(Tile, null, [\n \"number\",\n \"array\",\n \"number\",\n \"array\",\n \"number\",\n \"number\"\n ]);\n}\nfunction tile5(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const xId = backend2.dataIdMap.get(x.dataId).id;\n const { reps } = attrs;\n const newShape = new Array(x.shape.length);\n for (let i = 0; i < newShape.length; i++) {\n newShape[i] = x.shape[i] * reps[i];\n }\n const xShapeBytes = new Uint8Array(new Int32Array(x.shape).buffer);\n const newShapeBytes = new Uint8Array(new Int32Array(newShape).buffer);\n const out = backend2.makeOutput(newShape, x.dtype);\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmTile(xId, xShapeBytes, x.shape.length, newShapeBytes, newShape.length, CppDType[out.dtype], outId);\n return out;\n}\nvar tileConfig3 = {\n kernelName: Tile,\n backendName: \"wasm\",\n setupFunc: setup48,\n kernelFunc: tile5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/TopK.js\nvar wasmTopK;\nfunction setup49(backend2) {\n wasmTopK = backend2.wasm.cwrap(TopK, null, [\n \"number\",\n \"array\",\n \"number\",\n \"number\",\n \"number\",\n \"bool\",\n \"number\",\n \"number\"\n ]);\n}\nvar topk2 = ({ inputs, backend: backend2, attrs }) => {\n const { x } = inputs;\n const { k, sorted } = attrs;\n const xId = backend2.dataIdMap.get(x.dataId).id;\n const xShapeBytes = new Uint8Array(new Int32Array(x.shape).buffer);\n const outputShape = x.shape.slice();\n outputShape[outputShape.length - 1] = k;\n const outValues = backend2.makeOutput(outputShape, x.dtype);\n const outValuesId = backend2.dataIdMap.get(outValues.dataId).id;\n const outIndices = backend2.makeOutput(outputShape, \"int32\");\n const outIndicesId = backend2.dataIdMap.get(outIndices.dataId).id;\n wasmTopK(xId, xShapeBytes, x.shape.length, CppDType[x.dtype], k, sorted, outValuesId, outIndicesId);\n return [outValues, outIndices];\n};\nvar topKConfig3 = {\n kernelName: TopK,\n backendName: \"wasm\",\n setupFunc: setup49,\n kernelFunc: topk2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Transform.js\nvar wasmTransform;\nfunction setup50(backend2) {\n wasmTransform = backend2.wasm.cwrap(Transform, null, [\n \"number\",\n \"number\",\n \"bool\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"array\",\n \"number\",\n \"array\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction transform4(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { image: image2, transforms } = inputs;\n const { interpolation, fillMode, fillValue, outputShape } = attrs;\n const [batch, imageHeight, imageWidth, numChannels] = image2.shape;\n const [outHeight, outWidth] = outputShape != null ? outputShape : [imageHeight, imageWidth];\n const outShape = [\n batch,\n outHeight,\n outWidth,\n numChannels\n ];\n const inputStrides = new Uint8Array(new Int32Array(util_exports.computeStrides(image2.shape)).buffer);\n const outputStrides = new Uint8Array(new Int32Array(util_exports.computeStrides(outShape)).buffer);\n const out = backend2.makeOutput(outShape, image2.dtype);\n const outId = backend2.dataIdMap.get(out.dataId).id;\n const imageData = backend2.dataIdMap.get(image2.dataId);\n const imageId = imageData.id;\n const transformsData = backend2.dataIdMap.get(transforms.dataId);\n const transformsId = transformsData.id;\n const interpolationModeId = interpolation === \"nearest\" ? 1 : 2;\n let fillModeId;\n switch (fillMode) {\n case \"constant\":\n fillModeId = 1;\n break;\n case \"reflect\":\n fillModeId = 2;\n break;\n case \"wrap\":\n fillModeId = 3;\n break;\n case \"nearest\":\n fillModeId = 4;\n break;\n default:\n fillModeId = 1;\n break;\n }\n wasmTransform(imageId, transformsId, transforms.shape[0] > 1, batch, outHeight, outWidth, numChannels, imageWidth, imageHeight, inputStrides, image2.shape.length - 1, outputStrides, outShape.length - 1, interpolationModeId, fillModeId, fillValue, outId);\n return out;\n}\nvar transformConfig3 = {\n kernelName: Transform,\n backendName: \"wasm\",\n setupFunc: setup50,\n kernelFunc: transform4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Unpack.js\nfunction unpack3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { value } = inputs;\n let { axis } = attrs;\n if (axis < 0) {\n axis += value.shape.length;\n }\n const numOutputs = value.shape[axis];\n const rank = value.shape.length;\n const outShape = new Array(rank - 1);\n let outIndex = 0;\n for (let i = 0; i < rank; i++) {\n if (i !== axis) {\n outShape[outIndex++] = value.shape[i];\n }\n }\n const outs = new Array(numOutputs);\n const begin = new Array(rank).fill(0);\n const size = value.shape.slice();\n size[axis] = 1;\n for (let i = 0; i < outs.length; i++) {\n begin[axis] = i;\n outs[i] = slice4({ inputs: { x: value }, attrs: { begin, size }, backend: backend2 });\n }\n return outs.map(({ dataId, dtype }) => ({ dataId, dtype, shape: outShape }));\n}\nvar unpackConfig3 = {\n kernelName: Unpack,\n backendName: \"wasm\",\n kernelFunc: unpack3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/ZerosLike.js\nfunction zerosLike4(args) {\n const { inputs: { x }, backend: backend2 } = args;\n const out = backend2.makeOutput(x.shape, x.dtype);\n const outVals = backend2.typedArrayFromHeap(out);\n outVals.fill(0);\n return out;\n}\nvar zerosLikeConfig3 = {\n kernelName: ZerosLike,\n backendName: \"wasm\",\n kernelFunc: zerosLike4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/register_all_kernels.js\nvar kernelConfigs3 = [\n _fusedMatMulConfig3,\n absConfig3,\n addConfig3,\n addNConfig3,\n allConfig3,\n anyConfig3,\n argMaxConfig3,\n avgPoolConfig3,\n batchMatMulConfig3,\n batchToSpaceNDConfig3,\n castConfig3,\n ceilConfig3,\n clipByValueConfig3,\n concatConfig3,\n conv2DConfig3,\n conv2DBackpropInputConfig3,\n cosConfig3,\n coshConfig3,\n cropAndResizeConfig3,\n cumprodConfig3,\n cumsumConfig3,\n depthToSpaceConfig3,\n depthwiseConv2dNativeConfig3,\n eluConfig3,\n equalConfig3,\n expConfig3,\n expandDimsConfig3,\n fillConfig3,\n flipLeftRightConfig3,\n floorConfig3,\n floorDivConfig3,\n fusedBatchNormConfig,\n fusedConv2DConfig3,\n fusedDepthwiseConv2DConfig3,\n gatherNdConfig3,\n gatherV2Config3,\n greaterConfig3,\n greaterEqualConfig3,\n identityConfig3,\n leakyReluConfig3,\n lessConfig3,\n lessEqualConfig3,\n logConfig3,\n logicalAndConfig3,\n logicalNotConfig3,\n logicalOrConfig3,\n logicalXorConfig,\n maxConfig3,\n maximumConfig3,\n maxPoolConfig3,\n meanConfig3,\n minConfig3,\n minimumConfig3,\n mirrorPadConfig3,\n multiplyConfig3,\n negConfig3,\n nonMaxSuppressionV3Config3,\n nonMaxSuppressionV4Config3,\n nonMaxSuppressionV5Config3,\n notEqualConfig3,\n oneHotConfig3,\n onesLikeConfig3,\n packConfig3,\n padV2Config3,\n powConfig3,\n preluConfig3,\n prodConfig3,\n rangeConfig3,\n realDivConfig3,\n reluConfig3,\n relu6Config3,\n reshapeConfig3,\n resizeBilinearConfig3,\n resizeNearestNeighborConfig3,\n reverseConfig3,\n rotateWithOffsetConfig3,\n roundConfig3,\n rsqrtConfig3,\n scatterNdConfig3,\n selectConfig3,\n sigmoidConfig3,\n sinConfig3,\n sliceConfig3,\n softmaxConfig3,\n spaceToBatchNDConfig3,\n sparseFillEmptyRowsConfig3,\n sparseReshapeConfig3,\n sparseSegmentMeanConfig3,\n sparseSegmentSumConfig3,\n splitVConfig3,\n sqrtConfig3,\n squareConfig3,\n squaredDifferenceConfig3,\n stepConfig3,\n stridedSliceConfig3,\n stringNGramsConfig3,\n stringSplitConfig3,\n stringToHashBucketFastConfig3,\n subConfig3,\n sumConfig3,\n tanConfig3,\n tanhConfig3,\n tileConfig3,\n topKConfig3,\n transformConfig3,\n transposeConfig3,\n unpackConfig3,\n zerosLikeConfig3\n];\nfor (const kernelConfig of kernelConfigs3) {\n registerKernel(kernelConfig);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/flags_wasm.js\nvar ENV6 = env();\nENV6.registerFlag(\n \"WASM_HAS_SIMD_SUPPORT\",\n async () => WebAssembly.validate(new Uint8Array([\n 0,\n 97,\n 115,\n 109,\n 1,\n 0,\n 0,\n 0,\n 1,\n 4,\n 1,\n 96,\n 0,\n 0,\n 3,\n 2,\n 1,\n 0,\n 10,\n 9,\n 1,\n 7,\n 0,\n 65,\n 0,\n 253,\n 15,\n 26,\n 11\n ]))\n);\nENV6.registerFlag(\"WASM_HAS_MULTITHREAD_SUPPORT\", async () => {\n if (ENV6.get(\"IS_NODE\")) {\n return false;\n }\n try {\n new MessageChannel().port1.postMessage(new SharedArrayBuffer(1));\n return WebAssembly.validate(new Uint8Array([\n 0,\n 97,\n 115,\n 109,\n 1,\n 0,\n 0,\n 0,\n 1,\n 4,\n 1,\n 96,\n 0,\n 0,\n 3,\n 2,\n 1,\n 0,\n 5,\n 4,\n 1,\n 3,\n 1,\n 1,\n 10,\n 11,\n 1,\n 9,\n 0,\n 65,\n 0,\n 254,\n 16,\n 2,\n 0,\n 26,\n 11\n ]));\n } catch (e) {\n return false;\n }\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/backend_wasm.js\nvar wasmFactoryThreadedSimd_import = __toESM(require_tfjs_backend_wasm_threaded_simd());\nvar import_tfjs_backend_wasm_threaded_simd_worker = __toESM(require_tfjs_backend_wasm_threaded_simd_worker());\nvar wasmFactory_import = __toESM(require_tfjs_backend_wasm());\nvar wasmFactoryThreadedSimd = wasmFactoryThreadedSimd_import.default || wasmFactoryThreadedSimd_import;\nvar wasmFactory = wasmFactory_import.default || wasmFactory_import;\nvar BackendWasm = class extends KernelBackend {\n constructor(wasm) {\n super();\n this.wasm = wasm;\n this.dataIdNextNumber = 1;\n this.wasm.tfjs.initWithThreadsCount(threadsCount);\n actualThreadsCount = this.wasm.tfjs.getThreadsCount();\n this.dataIdMap = new DataStorage(this, engine());\n }\n write(values, shape, dtype) {\n const dataId = { id: this.dataIdNextNumber++ };\n this.move(dataId, values, shape, dtype, 1);\n return dataId;\n }\n numDataIds() {\n return this.dataIdMap.numDataIds();\n }\n async time(f) {\n const start = util_exports.now();\n f();\n const kernelMs = util_exports.now() - start;\n return { kernelMs };\n }\n move(dataId, values, shape, dtype, refCount) {\n const id = this.dataIdNextNumber++;\n if (dtype === \"string\") {\n const stringBytes = values;\n this.dataIdMap.set(dataId, { id, stringBytes, shape, dtype, memoryOffset: null, refCount });\n return;\n }\n const size = util_exports.sizeFromShape(shape);\n const numBytes = size * util_exports.bytesPerElement(dtype);\n const memoryOffset = this.wasm._malloc(numBytes);\n this.dataIdMap.set(dataId, { id, memoryOffset, shape, dtype, refCount });\n this.wasm.tfjs.registerTensor(id, size, memoryOffset);\n if (values != null) {\n this.wasm.HEAPU8.set(new Uint8Array(values.buffer, values.byteOffset, numBytes), memoryOffset);\n }\n }\n async read(dataId) {\n return this.readSync(dataId);\n }\n readSync(dataId, start, end) {\n const { memoryOffset, dtype, shape, stringBytes } = this.dataIdMap.get(dataId);\n if (dtype === \"string\") {\n if ((start == null || start === 0) && (end == null || end >= stringBytes.length)) {\n return stringBytes;\n }\n return stringBytes.slice(start, end);\n }\n start = start || 0;\n end = end || util_exports.sizeFromShape(shape);\n const bytesPerElement2 = util_exports.bytesPerElement(dtype);\n const bytes = this.wasm.HEAPU8.slice(memoryOffset + start * bytesPerElement2, memoryOffset + end * bytesPerElement2);\n return typedArrayFromBuffer(bytes.buffer, dtype);\n }\n disposeData(dataId, force = false) {\n if (this.dataIdMap.has(dataId)) {\n const data = this.dataIdMap.get(dataId);\n data.refCount--;\n if (!force && data.refCount > 0) {\n return false;\n }\n this.wasm._free(data.memoryOffset);\n this.wasm.tfjs.disposeData(data.id);\n this.dataIdMap.delete(dataId);\n }\n return true;\n }\n refCount(dataId) {\n if (this.dataIdMap.has(dataId)) {\n const tensorData = this.dataIdMap.get(dataId);\n return tensorData.refCount;\n }\n return 0;\n }\n incRef(dataId) {\n const data = this.dataIdMap.get(dataId);\n if (data != null) {\n data.refCount++;\n }\n }\n floatPrecision() {\n return 32;\n }\n getMemoryOffset(dataId) {\n return this.dataIdMap.get(dataId).memoryOffset;\n }\n dispose() {\n this.wasm.tfjs.dispose();\n if (\"PThread\" in this.wasm) {\n this.wasm.PThread.terminateAllThreads();\n }\n this.wasm = null;\n }\n memory() {\n return { unreliable: false };\n }\n makeOutput(shape, dtype, memoryOffset) {\n let dataId;\n if (memoryOffset == null) {\n dataId = this.write(null, shape, dtype);\n } else {\n const id = this.dataIdNextNumber++;\n dataId = { id };\n this.dataIdMap.set(dataId, { id, memoryOffset, shape, dtype, refCount: 1 });\n const size = util_exports.sizeFromShape(shape);\n this.wasm.tfjs.registerTensor(id, size, memoryOffset);\n }\n return { dataId, shape, dtype };\n }\n typedArrayFromHeap({ shape, dtype, dataId }) {\n const buffer2 = this.wasm.HEAPU8.buffer;\n const { memoryOffset } = this.dataIdMap.get(dataId);\n const size = util_exports.sizeFromShape(shape);\n switch (dtype) {\n case \"float32\":\n return new Float32Array(buffer2, memoryOffset, size);\n case \"int32\":\n return new Int32Array(buffer2, memoryOffset, size);\n case \"bool\":\n return new Uint8Array(buffer2, memoryOffset, size);\n default:\n throw new Error(`Unknown dtype ${dtype}`);\n }\n }\n};\nfunction createInstantiateWasmFunc(path) {\n return (imports, callback) => {\n util_exports.fetch(path, { credentials: \"same-origin\" }).then((response) => {\n if (!response[\"ok\"]) {\n imports.env.a(`failed to load wasm binary file at '${path}'`);\n }\n response.arrayBuffer().then((binary) => {\n WebAssembly.instantiate(binary, imports).then((output) => {\n callback(output.instance, output.module);\n });\n });\n });\n return {};\n };\n}\nfunction getPathToWasmBinary(simdSupported, threadsSupported, wasmModuleFolder) {\n if (wasmPath != null) {\n return wasmPath;\n }\n let path = \"tfjs-backend-wasm.wasm\";\n if (simdSupported && threadsSupported) {\n path = \"tfjs-backend-wasm-threaded-simd.wasm\";\n } else if (simdSupported) {\n path = \"tfjs-backend-wasm-simd.wasm\";\n }\n if (wasmFileMap != null) {\n if (wasmFileMap[path] != null) {\n return wasmFileMap[path];\n }\n }\n return wasmModuleFolder + path;\n}\nasync function init() {\n const [simdSupported, threadsSupported] = await Promise.all([\n env().getAsync(\"WASM_HAS_SIMD_SUPPORT\"),\n env().getAsync(\"WASM_HAS_MULTITHREAD_SUPPORT\")\n ]);\n return new Promise((resolve, reject) => {\n const factoryConfig = {};\n factoryConfig.locateFile = (path, prefix) => {\n if (path.endsWith(\".worker.js\")) {\n const response = import_tfjs_backend_wasm_threaded_simd_worker.wasmWorkerContents.replace(/\\n/g, \"\\\\n\");\n const blob = new Blob([response], { type: \"application/javascript\" });\n return URL.createObjectURL(blob);\n }\n if (path.endsWith(\".wasm\")) {\n return getPathToWasmBinary(simdSupported, threadsSupported, wasmPathPrefix != null ? wasmPathPrefix : prefix);\n }\n return prefix + path;\n };\n if (customFetch) {\n factoryConfig.instantiateWasm = createInstantiateWasmFunc(getPathToWasmBinary(simdSupported, threadsSupported, wasmPathPrefix != null ? wasmPathPrefix : \"\"));\n }\n let initialized = false;\n factoryConfig.onAbort = () => {\n if (initialized) {\n return;\n }\n if (initAborted) {\n return;\n }\n initAborted = true;\n const rejectMsg = \"Make sure the server can serve the `.wasm` file relative to the bundled js file. For more details see https://github.com/tensorflow/tfjs/blob/master/tfjs-backend-wasm/README.md#using-bundlers\";\n reject({ message: rejectMsg });\n };\n let wasm;\n if (threadsSupported && simdSupported && wasmPath == null) {\n factoryConfig.mainScriptUrlOrBlob = new Blob([`var WasmBackendModuleThreadedSimd = ` + wasmFactoryThreadedSimd.toString()], { type: \"text/javascript\" });\n wasm = wasmFactoryThreadedSimd(factoryConfig);\n } else {\n wasm = wasmFactory(factoryConfig);\n }\n wasm.then((module) => {\n initialized = true;\n initAborted = false;\n const voidReturnType = null;\n module.tfjs = {\n init: module.cwrap(\"init\", null, []),\n initWithThreadsCount: module.cwrap(\"init_with_threads_count\", null, [\"number\"]),\n getThreadsCount: module.cwrap(\"get_threads_count\", \"number\", []),\n registerTensor: module.cwrap(\"register_tensor\", null, [\n \"number\",\n \"number\",\n \"number\"\n ]),\n disposeData: module.cwrap(\"dispose_data\", voidReturnType, [\"number\"]),\n dispose: module.cwrap(\"dispose\", voidReturnType, [])\n };\n resolve({ wasm: module });\n }).catch(reject);\n });\n}\nfunction typedArrayFromBuffer(buffer2, dtype) {\n switch (dtype) {\n case \"float32\":\n return new Float32Array(buffer2);\n case \"int32\":\n return new Int32Array(buffer2);\n case \"bool\":\n return new Uint8Array(buffer2);\n default:\n throw new Error(`Unknown dtype ${dtype}`);\n }\n}\nvar wasmBinaryNames = [\n \"tfjs-backend-wasm.wasm\",\n \"tfjs-backend-wasm-simd.wasm\",\n \"tfjs-backend-wasm-threaded-simd.wasm\"\n];\nvar wasmPath = null;\nvar wasmPathPrefix = null;\nvar wasmFileMap = {};\nvar initAborted = false;\nvar customFetch = false;\nfunction setWasmPath(path, usePlatformFetch = false) {\n deprecationWarn(\"setWasmPath has been deprecated in favor of setWasmPaths and will be removed in a future release.\");\n if (initAborted) {\n throw new Error(\"The WASM backend was already initialized. Make sure you call `setWasmPath()` before you call `tf.setBackend()` or `tf.ready()`\");\n }\n wasmPath = path;\n customFetch = usePlatformFetch;\n}\nfunction setWasmPaths(prefixOrFileMap, usePlatformFetch = false) {\n if (initAborted) {\n throw new Error(\"The WASM backend was already initialized. Make sure you call `setWasmPaths()` before you call `tf.setBackend()` or `tf.ready()`\");\n }\n if (typeof prefixOrFileMap === \"string\") {\n wasmPathPrefix = prefixOrFileMap;\n } else {\n wasmFileMap = prefixOrFileMap;\n const missingPaths = wasmBinaryNames.filter((name) => wasmFileMap[name] == null);\n if (missingPaths.length > 0) {\n throw new Error(`There were no entries found for the following binaries: ${missingPaths.join(\",\")}. Please either call setWasmPaths with a map providing a path for each binary, or with a string indicating the directory where all the binaries can be found.`);\n }\n }\n customFetch = usePlatformFetch;\n}\nvar threadsCount = -1;\nvar actualThreadsCount = -1;\nfunction setThreadsCount(numThreads) {\n threadsCount = numThreads;\n}\nfunction getThreadsCount() {\n if (actualThreadsCount === -1) {\n throw new Error(`WASM backend not initialized.`);\n }\n return actualThreadsCount;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/version.js\nvar version8 = \"3.20.0\";\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/base.js\nvar WASM_PRIORITY = 2;\nregisterBackend(\"wasm\", async () => {\n const { wasm } = await init();\n return new BackendWasm(wasm);\n}, WASM_PRIORITY);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/flags_webgpu.js\nvar ENV7 = env();\nENV7.registerFlag(\"WEBGPU_DEFERRED_SUBMIT_BATCH_SIZE\", () => 15);\nENV7.registerFlag(\"WEBGPU_CPU_FORWARD\", () => true);\nENV7.registerFlag(\"WEBGPU_MATMUL_PROGRAM_TYPE\", () => -1);\nENV7.registerFlag(\"WEBGPU_USE_NAIVE_CONV2D_TRANSPOSE\", () => false);\nENV7.registerFlag(\"WEBGPU_USE_LOW_POWER_GPU\", () => false);\nENV7.registerFlag(\"WEBGPU_CPU_HANDOFF_SIZE_THRESHOLD\", () => 1e3);\nENV7.registerFlag(\"WEBGPU_USE_PROFILE_TOOL\", () => false);\nENV7.registerFlag(\"WEBGPU_IMPORT_EXTERNAL_TEXTURE\", () => true);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/buffer_manager.js\nvar BufferManager = class {\n constructor(device) {\n this.device = device;\n this.numUsedBuffers = 0;\n this.numFreeBuffers = 0;\n this.freeBuffers = /* @__PURE__ */ new Map();\n this.usedBuffers = /* @__PURE__ */ new Map();\n this.numBytesUsed = 0;\n this.numBytesAllocated = 0;\n }\n acquireUploadBuffer(size, usage) {\n return this.acquireBuffer(size, usage, true);\n }\n acquireBuffer(size, usage, mappedAtCreation = false) {\n const key = getBufferKey(size, usage);\n if (!this.freeBuffers.has(key)) {\n this.freeBuffers.set(key, []);\n }\n if (!this.usedBuffers.has(key)) {\n this.usedBuffers.set(key, []);\n }\n this.numBytesUsed += size;\n this.numUsedBuffers++;\n if (this.freeBuffers.get(key).length > 0) {\n this.numFreeBuffers--;\n const newBuffer2 = this.freeBuffers.get(key).shift();\n this.usedBuffers.get(key).push(newBuffer2);\n return newBuffer2;\n }\n this.numBytesAllocated += size;\n const newBuffer = this.device.createBuffer({ size, usage, mappedAtCreation });\n this.usedBuffers.get(key).push(newBuffer);\n return newBuffer;\n }\n releaseBuffer(buffer2, size, usage) {\n if (this.freeBuffers.size === 0) {\n return;\n }\n const key = getBufferKey(size, usage);\n if (!this.freeBuffers.has(key)) {\n this.freeBuffers.set(key, []);\n }\n this.freeBuffers.get(key).push(buffer2);\n this.numFreeBuffers++;\n this.numUsedBuffers--;\n const bufferList = this.usedBuffers.get(key);\n const bufferIndex = bufferList.indexOf(buffer2);\n if (bufferIndex < 0) {\n throw new Error(\"Cannot release a buffer that was never provided by this buffer manager\");\n }\n bufferList.splice(bufferIndex, 1);\n this.numBytesUsed -= size;\n }\n releaseUploadBuffer(buffer2, size, usage) {\n buffer2.mapAsync(GPUMapMode.WRITE).then(() => {\n this.releaseBuffer(buffer2, size, usage);\n }, (err) => {\n });\n }\n getNumUsedBuffers() {\n return this.numUsedBuffers;\n }\n getNumFreeBuffers() {\n return this.numFreeBuffers;\n }\n dispose() {\n this.freeBuffers.forEach((buffers, key) => {\n buffers.forEach((buffer2) => {\n buffer2.destroy();\n });\n });\n this.usedBuffers.forEach((buffers, key) => {\n buffers.forEach((buffer2) => {\n buffer2.destroy();\n });\n });\n this.freeBuffers = /* @__PURE__ */ new Map();\n this.usedBuffers = /* @__PURE__ */ new Map();\n this.numUsedBuffers = 0;\n this.numFreeBuffers = 0;\n this.numBytesUsed = 0;\n this.numBytesAllocated = 0;\n }\n};\nfunction getBufferKey(size, usage) {\n return `${size}_${usage}`;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/texture_manager.js\nvar TextureManager2 = class {\n constructor(device) {\n this.device = device;\n this.numUsedTextures = 0;\n this.numFreeTextures = 0;\n this.freeTextures = /* @__PURE__ */ new Map();\n this.usedTextures = /* @__PURE__ */ new Map();\n this.numBytesUsed = 0;\n this.numBytesAllocated = 0;\n }\n acquireTexture(width, height, format, usage) {\n const bytesPerElement2 = getBytesPerElement(format);\n const byteSize = width * height * bytesPerElement2;\n const key = getTextureKey(width, height, format, usage);\n if (!this.freeTextures.has(key)) {\n this.freeTextures.set(key, []);\n }\n if (!this.usedTextures.has(key)) {\n this.usedTextures.set(key, []);\n }\n this.numBytesUsed += byteSize;\n this.numUsedTextures++;\n if (this.freeTextures.get(key).length > 0) {\n this.numFreeTextures--;\n const newTexture2 = this.freeTextures.get(key).shift();\n this.usedTextures.get(key).push(newTexture2);\n return newTexture2;\n }\n this.numBytesAllocated += byteSize;\n const newTexture = this.device.createTexture({\n size: [width, height],\n format,\n usage\n });\n this.usedTextures.get(key).push(newTexture);\n return newTexture;\n }\n releaseTexture(texture, width, height, format, usage) {\n if (this.freeTextures.size === 0) {\n return;\n }\n const key = getTextureKey(width, height, format, usage);\n if (!this.freeTextures.has(key)) {\n this.freeTextures.set(key, []);\n }\n this.freeTextures.get(key).push(texture);\n this.numFreeTextures++;\n this.numUsedTextures--;\n const textureList = this.usedTextures.get(key);\n const textureIndex = textureList.indexOf(texture);\n if (textureIndex < 0) {\n throw new Error(\"Cannot release a texture that was never provided by this texture manager\");\n }\n textureList.splice(textureIndex, 1);\n const bytesPerElement2 = getBytesPerElement(format);\n const byteSize = width * height * bytesPerElement2;\n this.numBytesUsed -= byteSize;\n }\n getNumUsedTextures() {\n return this.numUsedTextures;\n }\n getNumFreeTextures() {\n return this.numFreeTextures;\n }\n dispose() {\n this.freeTextures.forEach((textures, key) => {\n textures.forEach((texture) => {\n texture.destroy();\n });\n });\n this.usedTextures.forEach((textures, key) => {\n textures.forEach((texture) => {\n texture.destroy();\n });\n });\n this.freeTextures = /* @__PURE__ */ new Map();\n this.usedTextures = /* @__PURE__ */ new Map();\n this.numUsedTextures = 0;\n this.numFreeTextures = 0;\n this.numBytesUsed = 0;\n this.numBytesAllocated = 0;\n }\n};\nfunction getTextureKey(width, height, format, usage) {\n return `${width}_${height}_${format}_${usage}`;\n}\nfunction getBytesPerElement(format) {\n if (format === \"rgba8unorm\") {\n return 16;\n } else {\n throw new Error(`${format} is not supported!`);\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/shader_util.js\nfunction symbolicallyComputeStrides2(indicesArr, variableName) {\n if (Math.max(...indicesArr) > 3) {\n throw new Error(\"Cannot symbolically compute strides for rank > 4 tensor.\");\n }\n const numCoords = indicesArr.length;\n const shape = indicesArr.map((d) => `${variableName}[${d}]`);\n const strides = new Array(numCoords - 1);\n strides[numCoords - 2] = shape[numCoords - 1];\n for (let i = numCoords - 3; i >= 0; --i) {\n strides[i] = `(${strides[i + 1]} * ${shape[i + 1]})`;\n }\n return strides;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/webgpu_program.js\nvar compileProgram2 = (device, program, inputsData, output) => {\n const outputData = { dtype: output.dtype, shape: output.shape };\n const source = makeShader2(inputsData, outputData, program);\n const module = device.createShaderModule({ code: source, label: program.constructor.name });\n const pipeline = device.createComputePipeline({\n compute: { module, entryPoint: \"_start\" },\n label: program.constructor.name,\n layout: \"auto\"\n });\n return pipeline;\n};\nfunction getCoordsDataType2(rank) {\n if (rank <= 1) {\n return \"i32\";\n } else if (rank === 2) {\n return `vec2`;\n } else if (rank === 3) {\n return `vec3`;\n } else if (rank === 4) {\n return `vec4`;\n } else if (rank === 5) {\n return `vec5`;\n } else if (rank === 6) {\n return `vec6`;\n } else {\n throw Error(`GPU for rank ${rank} is not yet supported`);\n }\n}\nfunction getCoordsXYZ(index) {\n if (index === 0) {\n return \"x\";\n } else if (index === 1) {\n return \"y\";\n } else if (index === 2) {\n return \"z\";\n } else if (index === 3) {\n return \"w\";\n } else if (index === 4) {\n return \"u\";\n } else if (index === 5) {\n return \"v\";\n } else {\n throw Error(`Index ${index} is not yet supported`);\n }\n}\nfunction getMainHeaderString(...params) {\n let snippet;\n switch (params.length) {\n case 0:\n snippet = `\n ${getWorkGroupSizeString()}\n fn _start(@builtin(local_invocation_id) LocalId : vec3,\n @builtin(global_invocation_id) GlobalId : vec3,\n @builtin(num_workgroups) NumWorkgroups : vec3) {\n localId = LocalId;\n globalId = GlobalId;\n numWorkgroups = NumWorkgroups;\n main();\n }\n\n fn main()\n `;\n break;\n case 1:\n snippet = `\n ${getWorkGroupSizeString()}\n fn _start(@builtin(local_invocation_id) LocalId : vec3,\n @builtin(global_invocation_id) GlobalId : vec3,\n @builtin(num_workgroups) NumWorkgroups : vec3) {\n localId = LocalId;\n globalId = GlobalId;\n numWorkgroups = NumWorkgroups;\n main(getGlobalIndex());\n }\n\n fn main(${params[0]} : i32)\n `;\n break;\n default:\n throw Error(\"Unreachable\");\n }\n return snippet;\n}\nfunction getWorkGroupSizeString() {\n return `\n @compute @workgroup_size(workGroupSizeX, workGroupSizeY, workGroupSizeZ)\n`;\n}\nfunction makeShader2(inputInfo, outputData, program) {\n const prefixSnippets = [];\n prefixSnippets.push(`\n const workGroupSizeX = ${program.workGroupSize[0]}u;\n const workGroupSizeY = ${program.workGroupSize[1]}u;\n const workGroupSizeZ = ${program.workGroupSize[2]}u;\n\n var localId: vec3;\n var globalId: vec3;\n var numWorkgroups: vec3;\n\n // Only used when the y/z dimension of workgroup size is 1.\n fn getGlobalIndex() -> i32 {\n ${isFlatDispatch(program) ? ` return i32(globalId.x);` : ` let localInvocationIndex = localId.z * workGroupSizeX * workGroupSizeY +\n localId.y * workGroupSizeX + localId.x;\n let workGroupID = (globalId - localId)/vec3(\n workGroupSizeX, workGroupSizeY, workGroupSizeZ);\n\n return i32((workGroupID.z * numWorkgroups.x * numWorkgroups.y +\n workGroupID.y * numWorkgroups.x + workGroupID.x) *\n (workGroupSizeX * workGroupSizeY * workGroupSizeZ) +\n localInvocationIndex);\n `}\n }\n `);\n if (program.isFromPixels) {\n prefixSnippets.push(`\n struct Uniform {\n size : i32,\n numChannels : i32,\n outShapeStrides : vec2,\n };\n\n @group(0) @binding(0) var result: array<${mapToWgslTypes(outputData.dtype, program.isVec4)}>;\n @group(0) @binding(2) var uniforms: Uniform;\n `);\n return [\n commonSnippet,\n prefixSnippets.join(\"\\n\"),\n getCoordsFromIndexSnippet(outputData.shape),\n program.getUserCode()\n ].join(\"\\n\");\n }\n let uniformDeclaration = \"struct Uniforms { NAN : f32, \";\n program.variableNames.forEach((x, i) => {\n const perDataType = getCoordsDataType2(inputInfo[i].shape.length);\n uniformDeclaration += `${x.charAt(0).toLowerCase() + x.slice(1)}Shape : ${perDataType}, `;\n });\n const outputDataType = getCoordsDataType2(outputData.shape.length);\n uniformDeclaration += `outShape : ${outputDataType}, `;\n const stridesLength = outputData.shape.length - 1;\n const stridesDataType = getCoordsDataType2(stridesLength);\n uniformDeclaration += `\n outShapeStrides: ${stridesDataType}, `;\n if (program.size) {\n uniformDeclaration += \"size : i32, \";\n }\n if (program.uniforms) {\n uniformDeclaration += program.uniforms;\n }\n uniformDeclaration += \"};\";\n uniformDeclaration = insertAlignment(uniformDeclaration);\n prefixSnippets.push(uniformDeclaration);\n if (program.atomic) {\n prefixSnippets.push(`\n @group(0) @binding(0) var result: array>;\n `);\n } else {\n prefixSnippets.push(`\n @group(0) @binding(0) var result: array<${mapToWgslTypes(outputData.dtype, program.isVec4)}>;\n `);\n }\n program.variableNames.forEach((x, i) => {\n prefixSnippets.push(`\n @group(0) @binding(${1 + i}) var ${x}: array<${program.variableTypes ? program.variableTypes[i] : mapToWgslTypes(inputInfo[i].dtype, program.isVec4)}>;\n `);\n });\n if (uniformDeclaration !== \"\") {\n prefixSnippets.push(`\n @group(0) @binding(${1 + program.variableNames.length}) var uniforms: Uniforms;\n `);\n }\n const coordsSnippet = getOutputCoordsSnippet(outputData.shape, program.dispatchLayout);\n const sources = [\n commonSnippet,\n prefixSnippets.join(\"\\n\"),\n getCoordsFromIndexSnippet(outputData.shape),\n coordsSnippet,\n getOutputIndexFromCoordsSnippet(outputData.shape.length)\n ];\n if (!program.atomic) {\n sources.push(setOutputSnippet(outputData.shape, outputData.dtype, program.isVec4));\n }\n const inputSnippet = inputInfo.map((x, i) => getInputSnippet(x, outputData.shape, program.variableTypes ? program.variableTypes[i] === \"vec4\" : program.isVec4, program.dispatchLayout.x.length === outputData.shape.length)).join(\"\\n\");\n sources.push(inputSnippet);\n sources.push(program.getUserCode());\n const source = sources.join(\"\\n\");\n return source;\n}\nfunction makeShaderKey2(program, shapes, inputsData, output) {\n let key = program.shaderKey;\n if (program.isFromPixels) {\n return key;\n }\n const types = inputsData.map((d) => d.dtype).concat(output.dtype);\n const broadcastDims = inputsData.map((d) => backend_util_exports.getBroadcastDims(d.shape, output.shape));\n const inputShapesEqualsOutShape = inputsData.map((d) => util_exports.arraysEqual(d.shape, output.shape)).join(\"_\");\n const broadcastDimsKey = broadcastDims.map((d) => d.join(\"_\")).join(\";\");\n const flatDispatchString = isFlatDispatch(program) ? \"flatDispatch\" : \"\";\n key += \"_\" + (program.workGroupSize ? program.workGroupSize.join(\",\") : \"\") + shapes.map((shape) => shape.length).join(\",\") + types.join(\",\") + program.variableNames.join(\",\") + broadcastDimsKey + inputShapesEqualsOutShape + flatDispatchString;\n return key;\n}\nvar commonSnippet = `\n struct vec5 {x: i32, y: i32, z: i32, w: i32, u: i32};\n struct vec6 {x: i32, y: i32, z: i32, w: i32, u: i32, v: i32};\n\n // Checks whether coordinates lie within the bounds of the shape.\n fn coordsInBounds2D(coord : vec2, shape : vec2) -> bool {\n return all(coord >= vec2(0)) && all(coord < shape);\n }\n fn coordsInBounds3D(coord : vec3, shape : vec3) -> bool {\n return all(coord >= vec3(0)) && all(coord < shape);\n }\n fn coordsInBounds4D(coord : vec4, shape : vec4) -> bool {\n return all(coord >= vec4(0)) && all(coord < shape);\n }\n\n fn getIndexFromCoords1D(coord : i32, shape : i32) -> i32 {\n return coord;\n }\n fn getIndexFromCoords2D(coords : vec2, shape : vec2) -> i32 {\n return dot(coords, vec2(shape.y, 1));\n }\n fn getIndexFromCoords3D(coords : vec3, shape : vec3) -> i32 {\n return dot(coords, vec3(shape.y * shape.z, shape.z, 1));\n }\n fn getIndexFromCoords4D(coords : vec4, shape : vec4) -> i32 {\n return dot(coords, vec4(\n shape.y * shape.z * shape.w, shape.z * shape.w, shape.w, 1));\n }\n fn getIndexFromCoords5D(coords : vec5, shape : vec5) -> i32 {\n let shapeStrides: vec5 = vec5(shape.y * shape.z * shape.w * shape.u, shape.z * shape.w * shape.u, shape.w * shape.u, shape.u, 1);\n return coords.x*shapeStrides.x + coords.y*shapeStrides.y + coords.z*shapeStrides.z + coords.w*shapeStrides.w + coords.u*shapeStrides.u;\n }\n fn getIndexFromCoords6D(coords : vec6, shape : vec6) -> i32 {\n let shapeStrides: vec6 = vec6(shape.y * shape.z * shape.w * shape.u * shape.v, shape.z * shape.w * shape.u * shape.v, shape.w * shape.u * shape.v, shape.u * shape.v, shape.v, 1);\n return coords.x*shapeStrides.x + coords.y*shapeStrides.y + coords.z*shapeStrides.z + coords.w*shapeStrides.w + coords.u*shapeStrides.u + coords.v*shapeStrides.v;\n }\n\n fn idiv(a: i32, b: i32, sign: f32) -> i32 {\n var res: i32 = a / b;\n let modulo: i32 = a % b;\n if (sign < 0. && modulo != 0) {\n res = res - 1;\n }\n return res;\n }\n\n // NaN defination in IEEE 754-1985 is :\n // - sign = either 0 or 1.\n // - biased exponent = all 1 bits.\n // - fraction = anything except all 0 bits (since all 0 bits represents infinity).\n // https://en.wikipedia.org/wiki/IEEE_754-1985#Representation_of_non-numbers\n fn isnan(val: f32) -> bool {\n let floatToUint: u32 = bitcast(val);\n return (floatToUint & 0x7fffffffu) > 0x7f800000u;\n }\n fn isnanVec4(val : vec4) -> vec4 {\n return vec4(isnan(val[0]), isnan(val[1]), isnan(val[2]), isnan(val[3]));\n }\n`;\nfunction getCoordsFromIndexSnippet(shape) {\n const rank = shape.length;\n if (rank <= 1) {\n return `fn getCoordsFromIndex(index : i32) -> i32 { return index; }`;\n }\n const strides = util_exports.computeStrides(shape);\n const dtype = getCoordsDataType2(rank);\n const coords3 = [];\n for (let i = 0; i < rank; i++) {\n coords3.push(`d${i}`);\n }\n if (strides.length === 1) {\n return ` fn getCoordsFromIndex(index : i32) -> vec2 {\n let d0 = index / uniforms.outShapeStrides; let d1 = index - d0 * uniforms.outShapeStrides;\n return vec2(d0, d1);\n }`;\n }\n let snippet;\n snippet = \"var index2 = index;\" + strides.map((_, i) => {\n const line1 = `let ${coords3[i]} = index2 / uniforms.outShapeStrides.${getCoordsXYZ(i)}`;\n const line2 = i === strides.length - 1 ? `let ${coords3[i + 1]} = index2 - ${coords3[i]} * uniforms.outShapeStrides.${getCoordsXYZ(i)}` : `index2 = index2 - ${coords3[i]} * uniforms.outShapeStrides.${getCoordsXYZ(i)}`;\n return `${line1}; ${line2};`;\n }).join(\"\");\n return `\n fn getCoordsFromIndex(index : i32) -> ${dtype} {\n ${snippet}\n return ${dtype}(${coords3.join(\",\")});\n }\n `;\n}\nfunction getInputAtCoordsSnippet(inputInfo, isVec4) {\n const texName = inputInfo.name;\n const rank = inputInfo.shape.length;\n const type = getCoordsDataType2(rank);\n const funcName = \"get\" + texName.charAt(0).toUpperCase() + texName.slice(1);\n const dims = [\"d0\", \"d1\", \"d2\", \"d3\", \"d4\", \"d5\"].slice(0, rank);\n const inputs = dims.map((d) => `${d} : i32`).join(\", \");\n if (rank < 1) {\n if (isVec4) {\n return `\n fn ${funcName}() -> vec4 {\n return vec4(${texName}[0]);\n }\n `;\n }\n return `\n fn ${funcName}() ->f32 {\n return f32(${texName}[0]);\n }\n `;\n }\n const shapeStr = `uniforms.${texName.charAt(0).toLowerCase() + texName.slice(1)}Shape`;\n let rankStr = `${rank}D`;\n if (rank === 0) {\n rankStr = \"1D\";\n }\n if (isVec4) {\n return `\n fn ${funcName}(${inputs}) -> vec4 {\n return vec4(${texName}[getIndexFromCoords${rankStr}(${type}(${dims.join(\",\")}),\n ${shapeStr}) / 4]);\n }\n `;\n }\n return `\n fn ${funcName}(${inputs}) -> f32 {\n return f32(${texName}[getIndexFromCoords${rankStr}(${type}(${dims.join(\",\")}),\n ${shapeStr})]);\n }\n `;\n}\nfunction getInputByOutputSnippet(inputInfo, outShape, isVec4, isFlatDispatchLayout) {\n const texName = inputInfo.name;\n const texFuncSnippet = texName.charAt(0).toUpperCase() + texName.slice(1);\n const funcName = \"get\" + texFuncSnippet + \"ByOutput\";\n const inRank = inputInfo.shape.length;\n const outRank = outShape.length;\n const type = getCoordsDataType2(outRank);\n if (util_exports.arraysEqual(inputInfo.shape, outShape) && isFlatDispatchLayout) {\n if (isVec4) {\n return `\n fn ${funcName}Index(globalIndex : i32) -> vec4 {\n return vec4(${texName}[globalIndex]);\n }\n\n fn ${funcName}Coords(coords : ${type}) -> vec4 {\n return vec4(${texName}[${outRank > 1 ? \"getOutputIndexFromCoords(coords)\" : \"coords\"} / 4]);\n }\n `;\n } else {\n return `\n fn ${funcName}Index(globalIndex : i32) -> f32 {\n return f32(${texName}[globalIndex]);\n }\n\n fn ${funcName}Coords(coords : ${type}) -> f32 {\n return f32(${texName}[${outRank > 1 ? \"getOutputIndexFromCoords(coords)\" : \"coords\"}]);\n }\n `;\n }\n }\n const broadcastDims = backend_util_exports.getBroadcastDims(inputInfo.shape, outShape);\n const rankDiff = outRank - inRank;\n let coordsSnippet = \"\";\n if (inRank === 0) {\n if (isVec4) {\n return `\n fn ${funcName}Index(globalIndex : i32) -> vec4 {\n return get${texFuncSnippet}();\n }\n\n fn ${funcName}Coords(coords : ${type}) -> vec4 {\n return get${texFuncSnippet}();\n }\n `;\n }\n return `\n fn ${funcName}Index(globalIndex : i32) -> f32{\n return get${texFuncSnippet}();\n }\n\n fn ${funcName}Coords(coords : ${type}) -> f32{\n return get${texFuncSnippet}();\n }\n `;\n } else {\n if (outRank < 2 && broadcastDims.length >= 1) {\n coordsSnippet = \"coords = 0;\";\n } else {\n coordsSnippet = broadcastDims.map((d) => `coords.${getCoordsXYZ(d + rankDiff)} = 0;`).join(\"\\n\");\n }\n }\n let unpackedCoordsSnippet = \"\";\n if (outRank < 2 && inRank > 0) {\n unpackedCoordsSnippet = \"coords\";\n } else {\n if (outRank > 1) {\n const coordsType = getCoordsDataType2(inRank);\n const coordsValues = inputInfo.shape.map((s, i) => `coords.${getCoordsXYZ(i + rankDiff)}`).join(\", \");\n unpackedCoordsSnippet = `${coordsType}(${coordsValues})`;\n } else {\n unpackedCoordsSnippet = \"coords\";\n }\n }\n const shapeStr = `uniforms.${texName.charAt(0).toLowerCase() + texName.slice(1)}Shape`;\n const rankStr = `${inRank}D`;\n if (isVec4) {\n return `\n fn ${funcName}Index(globalIndex : i32) -> vec4 {\n var coords = getCoordsFromIndex(globalIndex);\n ${coordsSnippet}\n return ${texName}[getIndexFromCoords${rankStr}(${unpackedCoordsSnippet}, ${shapeStr}) / 4];\n }\n\n fn ${funcName}Coords(coordsIn : ${type}) -> vec4 {\n var coords = coordsIn;\n ${coordsSnippet}\n return ${texName}[getIndexFromCoords${rankStr}(${unpackedCoordsSnippet}, ${shapeStr}) / 4];\n }\n `;\n }\n return `\n fn ${funcName}Index(globalIndex : i32) -> f32 {\n var coords = getCoordsFromIndex(globalIndex);\n ${coordsSnippet}\n return f32(${texName}[getIndexFromCoords${rankStr}(${unpackedCoordsSnippet}, ${shapeStr})]);\n }\n\n fn ${funcName}Coords(coordsIn : ${type}) -> f32 {\n var coords = coordsIn;\n ${coordsSnippet}\n return f32(${texName}[getIndexFromCoords${rankStr}(${unpackedCoordsSnippet}, ${shapeStr})]);\n }\n`;\n}\nfunction getInputSnippet(inputInfo, outShape, isVec4, isFlatDispatchLayout) {\n let res = getInputAtCoordsSnippet(inputInfo, isVec4);\n const inShape = inputInfo.shape;\n if (inShape.length <= outShape.length) {\n res += getInputByOutputSnippet(inputInfo, outShape, isVec4, isFlatDispatchLayout);\n }\n return res;\n}\nfunction getOutputCoordsSnippet(outShape, dispatchLayout) {\n const { x, y = [], z = [] } = dispatchLayout;\n const outRank = outShape.length;\n if (x.length === outRank) {\n const dtype2 = getCoordsDataType2(outRank);\n const snippet2 = `fn getOutputCoords() -> ${dtype2}{\n let globalIndex = getGlobalIndex();\n return getCoordsFromIndex(globalIndex);\n }\n `;\n return snippet2;\n }\n let gatherDimensionsStr = \"\";\n const dims = [x, y, z];\n let rank = 0;\n for (let i = 0; i < dims.length; i++) {\n const arr = dims[i];\n if (arr.length === 0) {\n continue;\n }\n rank += arr.length;\n if (arr.length === 1) {\n gatherDimensionsStr += `let d${arr[0]} = i32(globalId[${i}]);`;\n } else {\n const strides = symbolicallyComputeStrides2(arr, \"uniforms.outShape\");\n gatherDimensionsStr += `var index${i} = i32(globalId[${i}]);`;\n for (let j = 0; j < strides.length; j++) {\n gatherDimensionsStr += `let d${arr[j]} = index${i} / ${strides[j]};`;\n if (j === strides.length - 1) {\n gatherDimensionsStr += `let d${arr[j + 1]} = index${i} - d${arr[j]} * ${strides[j]};`;\n } else {\n gatherDimensionsStr += `index${i} = index${i} - d${arr[j]} * ${strides[j]};`;\n }\n }\n }\n }\n const dimensions = [];\n for (let i = 0; i < rank; i++) {\n dimensions.push(`d${i}`);\n }\n const dtype = getCoordsDataType2(rank);\n let snippet = `fn getOutputCoords() -> ${dtype} {\n ${gatherDimensionsStr}\n`;\n if (dimensions.length === 0) {\n snippet += `return ${dtype}(0); }`;\n } else {\n snippet += `return ${dtype}(${dimensions.join(\",\")}); }`;\n }\n return snippet;\n}\nfunction getOutputIndexFromCoordsSnippet(outRank) {\n let snippet = \"\";\n switch (outRank) {\n case 0:\n case 1:\n snippet += `\n fn getOutputIndexFromCoords(coords : i32) -> i32 {\n return coords;\n }\n `;\n break;\n case 2:\n snippet += `\n fn getOutputIndexFromCoords(coords : vec2) -> i32 {\n return dot(coords, vec2(uniforms.outShapeStrides, 1));\n }\n `;\n break;\n case 3:\n snippet += `\n fn getOutputIndexFromCoords(coords : vec3) -> i32 {\n return dot(coords, vec3(uniforms.outShapeStrides.x, uniforms.outShapeStrides.y, 1));\n }\n `;\n break;\n case 4:\n snippet += `\n fn getOutputIndexFromCoords(coords : vec4) -> i32 {\n return dot(coords, vec4(\n uniforms.outShapeStrides.x, uniforms.outShapeStrides.y, uniforms.outShapeStrides.z, 1));\n }\n `;\n break;\n case 5:\n snippet += `\n fn getOutputIndexFromCoords(coords : vec5) -> i32 {\n return coords.x * uniforms.outShapeStrides.x +\n coords.y * uniforms.outShapeStrides.y +\n coords.z * uniforms.outShapeStrides.z +\n coords.w * uniforms.outShapeStrides.w +\n coords.u;\n }\n `;\n break;\n case 6:\n snippet += `\n fn getOutputIndexFromCoords(coords : vec6) -> i32 {\n return coords.x * uniforms.outShapeStrides.x +\n coords.y * uniforms.outShapeStrides.y +\n coords.z * uniforms.outShapeStrides.z +\n coords.w * uniforms.outShapeStrides.w +\n coords.u * uniforms.outShapeStrides.u +\n coords.v;\n }\n `;\n break;\n default:\n util_exports.assert(false, () => `Unsupported ${outRank}D shape`);\n break;\n }\n return snippet;\n}\nfunction isFlatDispatch(program) {\n return program.dispatch[1] === 1 && program.dispatch[2] === 1;\n}\nfunction mapToWgslTypes(type, isVec4) {\n if (type === \"float32\") {\n return isVec4 ? \"vec4\" : \"f32\";\n } else if (type === \"int32\") {\n return isVec4 ? \"vec4\" : \"i32\";\n } else if (type === \"bool\") {\n return isVec4 ? \"vec4\" : \"i32\";\n }\n return type;\n}\nfunction setOutputSnippet(outShape, outBufferType, isVec4) {\n const outRank = outShape.length;\n const wgslType = mapToWgslTypes(outBufferType, isVec4);\n let snippet;\n if (isVec4) {\n snippet = `fn setOutputAtIndex(flatIndex : i32, value : vec4) {\n result[flatIndex] = ${wgslType}(value);\n }\n fn setOutputAtIndexI32(flatIndex : i32, value : vec4) {\n result[flatIndex] = ${wgslType}(value);\n }`;\n } else {\n snippet = `fn setOutputAtIndex(flatIndex : i32, value : f32) {\n result[flatIndex] = ${wgslType}(value);\n }\n fn setOutputAtIndexI32(flatIndex : i32, value : i32) {\n result[flatIndex] = ${wgslType}(value);\n }`;\n }\n if (outRank >= 2) {\n const dims = [\"d0\", \"d1\", \"d2\", \"d3\", \"d4\", \"d5\"].slice(0, outRank);\n const type = getCoordsDataType2(outRank);\n if (isVec4) {\n snippet += `\n fn setOutputAtCoords(${dims.map((d) => `${d} : i32`).join(\", \")}, value : vec4) {\n let flatIndex = getOutputIndexFromCoords(${type}(${dims.join(\", \")}));\n setOutputAtIndex(flatIndex / 4, value);\n }\n fn setOutputAtCoordsI32(${dims.map((d) => `${d} : i32`).join(\", \")}, value : vec4) {\n let flatIndex = getOutputIndexFromCoords(${type}(${dims.join(\", \")}));\n setOutputAtIndexI32(flatIndex / 4, value);\n }\n `;\n } else {\n snippet += `\n fn setOutputAtCoords(${dims.map((d) => `${d} : i32`).join(\", \")}, value : f32) {\n let flatIndex = getOutputIndexFromCoords(${type}(${dims.join(\", \")}));\n setOutputAtIndex(flatIndex, value);\n }\n fn setOutputAtCoordsI32(${dims.map((d) => `${d} : i32`).join(\", \")}, value : i32) {\n let flatIndex = getOutputIndexFromCoords(${type}(${dims.join(\", \")}));\n setOutputAtIndexI32(flatIndex, value);\n }\n `;\n }\n }\n return snippet;\n}\nfunction insertAlignment(uniformShader) {\n const curInsertRe = /(\\w+)\\s*:\\s*vec(5|6)/g;\n uniformShader = uniformShader.replace(curInsertRe, (match) => {\n return \"@align(16) \" + match;\n });\n const preInsertRe = /vec(5|6)\\s*,\\s*(\\w+)/g;\n uniformShader = uniformShader.replace(preInsertRe, (_, p1, p2) => {\n return `vec${p1}, @align(16) ${p2}`;\n });\n return uniformShader;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/webgpu_util.js\nvar webgpu_util_exports = {};\n__export(webgpu_util_exports, {\n ArrayBufferToTypedArray: () => ArrayBufferToTypedArray,\n GPUBytesPerElement: () => GPUBytesPerElement,\n MatMulProgramType: () => MatMulProgramType,\n computeDispatch: () => computeDispatch,\n computeWorkGroupInfoForMatMul: () => computeWorkGroupInfoForMatMul,\n computeWorkGroupSizeForConv2d: () => computeWorkGroupSizeForConv2d,\n computeWorkPerThreadForConv2d: () => computeWorkPerThreadForConv2d,\n flatDispatchLayout: () => flatDispatchLayout,\n isWebGPUSupported: () => isWebGPUSupported,\n tilesFitEvenlyIntoShape: () => tilesFitEvenlyIntoShape\n});\nvar arrayProduct = (arr) => {\n let product = 1;\n for (let i = 0; i < arr.length; i++) {\n product *= arr[i];\n }\n return product;\n};\nfunction tilesFitEvenlyIntoShape(tileSize, shape) {\n if (tileSize.length !== shape.length) {\n throw new Error(`Cannot compute whether rank ${tileSize.length} tiles fit evenly into rank ${shape.length} shape - ranks must match.`);\n }\n return shape.every((dim, dimIdx) => dim % tileSize[dimIdx] === 0);\n}\nfunction computeDispatch(layout, outputShape, workGroupSize = [1, 1, 1], elementsPerThread = [1, 1, 1]) {\n const [dispatchX, dispatchY, dispatchZ] = [\n Math.ceil(arrayProduct(layout.x.map((d) => outputShape[d])) / (workGroupSize[0] * elementsPerThread[0])),\n layout.y ? Math.ceil(arrayProduct(layout.y.map((d) => outputShape[d])) / (workGroupSize[1] * elementsPerThread[1])) : 1,\n layout.z ? Math.ceil(arrayProduct(layout.z.map((d) => outputShape[d])) / (workGroupSize[2] * elementsPerThread[2])) : 1\n ];\n return [dispatchX, dispatchY, dispatchZ];\n}\nfunction computeWorkGroupInfoForMatMul(dimAOuter, dimInner, dimBOuter, transposeA = false) {\n const workGroupSize = [8, 8, 1];\n const elementsPerThread = [4, 4, 1];\n if (!transposeA) {\n if (dimAOuter <= 8) {\n elementsPerThread[1] = 1;\n }\n if (dimInner <= 16 && dimBOuter <= 16) {\n workGroupSize[0] = 4;\n }\n }\n return { workGroupSize, elementsPerThread };\n}\nfunction computeWorkGroupSizeForConv2d(layout, outputShape, isVec4 = false) {\n if (isVec4) {\n return [8, 8, 1];\n }\n const dim0 = arrayProduct(layout.x.map((d) => outputShape[d]));\n const dim1 = arrayProduct(layout.y.map((d) => outputShape[d]));\n if (dim0 <= 4) {\n return [4, 16, 1];\n }\n if (dim1 <= 4) {\n return [16, 4, 1];\n }\n return [16, 16, 1];\n}\nfunction computeWorkPerThreadForConv2d(layout, outputShape, isVec4 = false) {\n if (isVec4) {\n return [4, 4, 1];\n }\n const dim0 = arrayProduct(layout.x.map((d) => outputShape[d]));\n const dim1 = arrayProduct(layout.y.map((d) => outputShape[d]));\n if (dim0 <= 4) {\n return [1, 2, 1];\n }\n if (dim1 <= 4) {\n return [2, 1, 1];\n }\n return [2, 2, 1];\n}\nfunction flatDispatchLayout(shape) {\n return { x: shape.map((d, i) => i) };\n}\nfunction GPUBytesPerElement(dtype) {\n if (dtype === \"float32\" || dtype === \"int32\" || dtype === \"bool\" || dtype === \"string\") {\n return 4;\n } else if (dtype === \"complex64\") {\n return 8;\n } else {\n throw new Error(`Unknown dtype ${dtype}`);\n }\n}\nfunction ArrayBufferToTypedArray(data, dtype) {\n if (dtype === \"float32\") {\n return new Float32Array(data);\n } else if (dtype === \"int32\") {\n return new Int32Array(data);\n } else if (dtype === \"bool\" || dtype === \"string\") {\n return Uint8Array.from(new Int32Array(data));\n } else {\n throw new Error(`Unknown dtype ${dtype}`);\n }\n}\nfunction isWebGPUSupported() {\n return (typeof window !== \"undefined\" || typeof WorkerGlobalScope !== \"undefined\") && !!navigator.gpu;\n}\nvar MatMulProgramType;\n(function(MatMulProgramType2) {\n MatMulProgramType2[MatMulProgramType2[\"MatMulReduceProgram\"] = 0] = \"MatMulReduceProgram\";\n MatMulProgramType2[MatMulProgramType2[\"MatMulSplitKProgram\"] = 1] = \"MatMulSplitKProgram\";\n MatMulProgramType2[MatMulProgramType2[\"MatMulSmallOutputSizeProgram\"] = 2] = \"MatMulSmallOutputSizeProgram\";\n MatMulProgramType2[MatMulProgramType2[\"MatMulPackedProgram\"] = 3] = \"MatMulPackedProgram\";\n MatMulProgramType2[MatMulProgramType2[\"MatMulMax\"] = 4] = \"MatMulMax\";\n})(MatMulProgramType || (MatMulProgramType = {}));\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/backend_webgpu.js\nvar CPU_HANDOFF_SIZE_THRESHOLD2 = env().getNumber(\"WEBGPU_CPU_HANDOFF_SIZE_THRESHOLD\");\nvar reshapeDispatch = (device, program) => {\n const MAX_COMPUTE_PER_DIMENSION_DISPATCH_SIZE = device.limits.maxComputeWorkgroupsPerDimension;\n const layout = program[\"dispatchLayout\"];\n const dispatch = program[\"dispatch\"];\n if (dispatch.every((d) => d <= MAX_COMPUTE_PER_DIMENSION_DISPATCH_SIZE)) {\n return dispatch;\n }\n util_exports.assert(dispatch[0] > MAX_COMPUTE_PER_DIMENSION_DISPATCH_SIZE && layout.y === void 0 && layout.z === void 0, () => \"Dispatch size exceeds WebGPU limits in Y or Z dimension.\");\n let dispatchAverage = Math.ceil(Math.sqrt(dispatch[0]));\n if (dispatchAverage > MAX_COMPUTE_PER_DIMENSION_DISPATCH_SIZE) {\n dispatchAverage = Math.ceil(Math.cbrt(dispatch[0]));\n util_exports.assert(dispatchAverage <= MAX_COMPUTE_PER_DIMENSION_DISPATCH_SIZE, () => \"Total dispatch size exceeds WebGPU maximum.\");\n return [dispatchAverage, dispatchAverage, dispatchAverage];\n } else {\n return [dispatchAverage, dispatchAverage, 1];\n }\n};\nvar WebGPUBackend = class extends KernelBackend {\n constructor(device) {\n super();\n this.commandQueueOwnedIds = /* @__PURE__ */ new WeakSet();\n this.dispatchNumberInEncoder = 0;\n this.disposed = false;\n this.downloadWaitMs = 0;\n this.tensorDataPendingDisposal = [];\n this.stagingPendingDisposal = [];\n this.uniformPendingDisposal = [];\n this.uploadWaitMs = 0;\n if (!isWebGPUSupported()) {\n throw new Error(\"WebGPU is not supported on this device\");\n }\n this.pipelineCache = {};\n this.device = device;\n this.queue = device.queue;\n this.currentCommandEncoder = null;\n this.currentComputePass = null;\n this.supportTimeQuery = device.features.has(\"timestamp-query\");\n this.bufferManager = new BufferManager(this.device);\n this.textureManager = new TextureManager2(this.device);\n this.tensorMap = new DataStorage(this, engine());\n if (this.supportTimeQuery) {\n this.querySet = this.device.createQuerySet({\n type: \"timestamp\",\n count: 2\n });\n }\n if (env().getBool(\"WEBGPU_USE_PROFILE_TOOL\")) {\n this.dummyCanvas = document.createElement(\"canvas\");\n this.dummyCanvas.width = 1;\n this.dummyCanvas.height = 1;\n this.dummyContext = this.dummyCanvas.getContext(\"webgpu\");\n this.dummyContext.configure({\n device,\n format: \"bgra8unorm\"\n });\n document.body.appendChild(this.dummyCanvas);\n }\n }\n nextDataId() {\n return WebGPUBackend.nextDataId++;\n }\n floatPrecision() {\n return 32;\n }\n defaultGpuBufferUsage() {\n return GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_SRC | GPUBufferUsage.COPY_DST;\n }\n disposeData(dataId, force = false) {\n if (this.tensorDataPendingDisposal.indexOf(dataId) >= 0) {\n return false;\n }\n if (!this.tensorMap.has(dataId)) {\n return true;\n }\n const tensorData = this.tensorMap.get(dataId);\n this.decRef(dataId);\n if (!force && tensorData.refCount > 0) {\n return false;\n }\n if (this.commandQueueOwnedIds.has(dataId)) {\n this.tensorDataPendingDisposal.push(dataId);\n return false;\n }\n const { complexTensorInfos } = this.tensorMap.get(dataId);\n if (complexTensorInfos != null) {\n this.disposeData(complexTensorInfos.real.dataId, force);\n this.disposeData(complexTensorInfos.imag.dataId, force);\n }\n this.releaseResource(dataId);\n this.tensorMap.delete(dataId);\n return true;\n }\n memory() {\n return {\n numBytesInGPU: this.bufferManager.numBytesUsed,\n numBytesAllocatedInGPU: this.bufferManager.numBytesAllocated,\n unreliable: false\n };\n }\n releaseResource(dataId) {\n const tensorData = this.tensorMap.get(dataId);\n if (!tensorData || !tensorData.resourceInfo) {\n return;\n }\n if (\"texture\" in tensorData.resourceInfo) {\n const textureInfo = tensorData.resourceInfo;\n if (textureInfo.texture instanceof GPUTexture) {\n this.textureManager.releaseTexture(textureInfo.texture, textureInfo.width, textureInfo.height, textureInfo.format, textureInfo.usage);\n }\n textureInfo.texture = null;\n } else {\n const bufferInfo = tensorData.resourceInfo;\n this.bufferManager.releaseBuffer(bufferInfo.buffer, bufferInfo.size, bufferInfo.usage);\n bufferInfo.buffer = null;\n }\n tensorData.resourceInfo = null;\n }\n refCount(dataId) {\n if (this.tensorMap.has(dataId)) {\n const tensorData = this.tensorMap.get(dataId);\n return tensorData.refCount;\n }\n return 0;\n }\n incRef(dataId) {\n const tensorData = this.tensorMap.get(dataId);\n tensorData.refCount++;\n }\n decRef(dataId) {\n if (this.tensorMap.has(dataId)) {\n const tensorData = this.tensorMap.get(dataId);\n tensorData.refCount--;\n }\n }\n write(values, shape, dtype) {\n if (dtype === \"complex64\" && values != null) {\n throw new Error(`Cannot write to a complex64 dtype. Please use tf.complex(real, imag).`);\n }\n const dataId = { id: this.nextDataId() };\n this.tensorMap.set(dataId, { dtype, shape, values, refCount: 1 });\n return dataId;\n }\n move(dataId, values, shape, dtype, refCount) {\n if (dtype === \"complex64\") {\n throw new Error(`Cannot write to a complex64 dtype. Please use tf.complex(real, imag).`);\n }\n this.tensorMap.set(dataId, { dtype, shape, values, refCount });\n }\n submitQueue() {\n this.ensureComputePassEnded();\n this.queue.submit([this.currentCommandEncoder.finish()]);\n this.currentCommandEncoder = null;\n this.dispatchNumberInEncoder = 0;\n this.commandQueueOwnedIds = /* @__PURE__ */ new WeakSet();\n this.tensorDataPendingDisposal.forEach((d) => {\n this.releaseResource(d);\n this.tensorMap.delete(d);\n });\n this.uniformPendingDisposal.forEach((d) => this.bufferManager.releaseBuffer(d.buffer, d.size, d.usage));\n this.stagingPendingDisposal.forEach((d) => this.bufferManager.releaseUploadBuffer(d.buffer, d.size, d.usage));\n this.tensorDataPendingDisposal = [];\n this.uniformPendingDisposal = [];\n this.stagingPendingDisposal = [];\n }\n ensureCommandEncoderReady() {\n if (!this.currentCommandEncoder) {\n this.currentCommandEncoder = this.device.createCommandEncoder();\n }\n }\n ensureComputePassEnded() {\n if (this.currentComputePass) {\n this.currentComputePass.end();\n this.currentComputePass = null;\n }\n }\n getComputePass() {\n if (!this.currentComputePass) {\n this.currentComputePass = this.currentCommandEncoder.beginComputePass();\n }\n return this.currentComputePass;\n }\n async getBufferData(buffer2, size) {\n const staging = this.bufferManager.acquireBuffer(size, GPUBufferUsage.COPY_DST | GPUBufferUsage.MAP_READ);\n this.ensureCommandEncoderReady();\n this.ensureComputePassEnded();\n this.currentCommandEncoder.copyBufferToBuffer(buffer2, 0, staging, 0, size);\n this.submitQueue();\n await staging.mapAsync(GPUMapMode.READ);\n const values = staging.getMappedRange().slice(0);\n staging.unmap();\n if (staging != null) {\n this.bufferManager.releaseBuffer(staging, size, GPUBufferUsage.COPY_DST | GPUBufferUsage.MAP_READ);\n }\n if (env().getBool(\"WEBGPU_USE_PROFILE_TOOL\")) {\n util_exports.assert(this.dummyContext !== void 0, () => `Fail to get context for profiling tool`);\n this.dummyContext.getCurrentTexture();\n }\n return values;\n }\n convertAndCacheOnCPU(dataId, data) {\n const tensorData = this.tensorMap.get(dataId);\n this.releaseResource(dataId);\n tensorData.values = data;\n return tensorData.values;\n }\n readSync(dataId) {\n const tensorData = this.tensorMap.get(dataId);\n const { values } = tensorData;\n if (values == null) {\n throw new Error(\"WebGPU readSync is only available for CPU-resident tensors.\");\n }\n return values;\n }\n async read(dataId) {\n if (!this.tensorMap.has(dataId)) {\n throw new Error(`Tensor ${dataId} was not registered!`);\n }\n const tensorData = this.tensorMap.get(dataId);\n const { values } = tensorData;\n if (values != null) {\n return this.convertAndCacheOnCPU(dataId, values);\n }\n let vals;\n if (tensorData.dtype === \"complex64\") {\n const ps = await Promise.all([\n this.read(tensorData.complexTensorInfos.real.dataId),\n this.read(tensorData.complexTensorInfos.imag.dataId)\n ]);\n const realValues = ps[0];\n const imagValues = ps[1];\n vals = backend_util_exports.mergeRealAndImagArrays(realValues, imagValues);\n } else {\n const bufferInfo = tensorData.resourceInfo;\n const data = await this.getBufferData(bufferInfo.buffer, bufferInfo.size);\n vals = ArrayBufferToTypedArray(data, tensorData.dtype);\n }\n this.convertAndCacheOnCPU(dataId, vals);\n return vals;\n }\n readToGPU(dataId) {\n const srcTensorData = this.tensorMap.get(dataId);\n const { values, dtype, shape, resourceInfo } = srcTensorData;\n if (dtype === \"complex64\") {\n throw new Error(\"Does not support reading buffer for complex64 dtype.\");\n }\n if (resourceInfo == null) {\n if (values != null) {\n throw new Error(\"Data is not on GPU but on CPU.\");\n } else {\n throw new Error(\"There is no data on GPU or CPU.\");\n }\n }\n const size = resourceInfo.size;\n const buffer2 = this.bufferManager.acquireBuffer(size, resourceInfo.usage);\n this.ensureCommandEncoderReady();\n this.ensureComputePassEnded();\n this.currentCommandEncoder.copyBufferToBuffer(resourceInfo.buffer, 0, buffer2, 0, size);\n this.submitQueue();\n const tensorInfo = this.makeTensorInfo(shape, dtype);\n const tensorRef = engine().makeTensorFromTensorInfo(tensorInfo);\n const tensorData = this.tensorMap.get(tensorInfo.dataId);\n tensorData.resourceInfo = { size, usage: this.defaultGpuBufferUsage(), buffer: buffer2 };\n return { tensorRef, buffer: buffer2, bufSize: size };\n }\n bufferSync(t) {\n const data = this.readSync(t.dataId);\n if (t.dtype === \"string\") {\n try {\n const strings = data.map((d) => util_exports.decodeString(d));\n return buffer(t.shape, t.dtype, strings);\n } catch (_a) {\n throw new Error(\"Failed to decode encoded string bytes into utf-8\");\n }\n }\n return buffer(t.shape, t.dtype, data);\n }\n async time(f) {\n if (!this.supportTimeQuery) {\n console.warn(`This device doesn't support timestamp-query extension. Start Chrome browser with flag --disable-dawn-features=disallow_unsafe_apis then try again. Otherwise, zero will be shown for the kernel time when profiling mode is enabled. Using performance.now is not workable for webgpu since it doesn't support synchronous data read from GPU.`);\n }\n const oldActiveTimers = this.activeTimers;\n const newActiveTimers = [];\n let outerMostTime = false;\n if (this.programTimersStack == null) {\n this.programTimersStack = newActiveTimers;\n outerMostTime = true;\n } else {\n this.activeTimers.push(newActiveTimers);\n }\n this.activeTimers = newActiveTimers;\n f();\n const flattenedActiveTimerQueries = util_exports.flatten(this.activeTimers.map((d) => d.query)).filter((d) => d != null);\n const flattenedActiveTimerNames = util_exports.flatten(this.activeTimers.map((d) => d.name)).filter((d) => d != null);\n this.activeTimers = oldActiveTimers;\n if (outerMostTime) {\n this.programTimersStack = null;\n }\n const res = {\n uploadWaitMs: this.uploadWaitMs,\n downloadWaitMs: this.downloadWaitMs,\n kernelMs: null,\n wallMs: null\n };\n const kernelMs = await Promise.all(flattenedActiveTimerQueries);\n res[\"kernelMs\"] = util_exports.sum(kernelMs);\n res[\"getExtraProfileInfo\"] = () => kernelMs.map((d, i) => ({ name: flattenedActiveTimerNames[i], ms: d })).map((d) => `${d.name}: ${d.ms}`).join(\", \");\n this.uploadWaitMs = 0;\n this.downloadWaitMs = 0;\n return res;\n }\n makeTensorInfo(shape, dtype, values) {\n if (dtype === \"string\" && values != null && values.length > 0 && util_exports.isString(values[0])) {\n values = values.map((d) => util_exports.encodeString(d));\n }\n const dataId = this.write(values, shape, dtype);\n return { dataId, shape, dtype };\n }\n tensorToBinding(tensor2) {\n if (!tensor2) {\n return null;\n }\n const tensorData = this.tensorMap.get(tensor2.dataId);\n if (\"texture\" in tensorData.resourceInfo) {\n const info = tensorData.resourceInfo;\n if (info.texture instanceof GPUExternalTexture) {\n return info.texture;\n } else {\n return info.texture.createView();\n }\n }\n const bufferInfo = tensorData.resourceInfo;\n return { offset: 0, size: bufferInfo.size, buffer: bufferInfo.buffer };\n }\n async getQueryTime(query) {\n if (this.supportTimeQuery) {\n return this.getTimeFromQuerySet(query);\n } else {\n return 0;\n }\n }\n uploadToGPU(dataId) {\n const tensorData = this.tensorMap.get(dataId);\n if (tensorData.resourceInfo) {\n return;\n }\n const size = GPUBytesPerElement(tensorData.dtype) * util_exports.sizeFromShape(tensorData.shape);\n const buffer2 = this.bufferManager.acquireBuffer(size, this.defaultGpuBufferUsage());\n tensorData.resourceInfo = { size, usage: this.defaultGpuBufferUsage(), buffer: buffer2 };\n if (tensorData.values) {\n const stagingBuffer = this.bufferManager.acquireUploadBuffer(size, GPUBufferUsage.MAP_WRITE | GPUBufferUsage.COPY_SRC);\n const arrayBuffer = stagingBuffer.getMappedRange();\n if (tensorData.dtype === \"int32\" || tensorData.dtype === \"bool\") {\n new Int32Array(arrayBuffer).set(tensorData.values);\n } else {\n new Float32Array(arrayBuffer).set(tensorData.values);\n }\n stagingBuffer.unmap();\n this.ensureCommandEncoderReady();\n this.ensureComputePassEnded();\n this.currentCommandEncoder.copyBufferToBuffer(stagingBuffer, 0, buffer2, 0, size);\n const stagingInfo = {\n size,\n usage: GPUBufferUsage.MAP_WRITE | GPUBufferUsage.COPY_SRC,\n buffer: stagingBuffer\n };\n this.stagingPendingDisposal.push(stagingInfo);\n }\n }\n makeUniforms(programUniform) {\n let currentOffset = 0;\n let preLength = 0;\n const offsets = [];\n programUniform.forEach((d) => {\n if (d.data.length === 0) {\n d.data = [1];\n }\n let baseAlignment;\n switch (d.data.length) {\n case 1:\n baseAlignment = 4;\n break;\n case 2:\n baseAlignment = 8;\n break;\n case 3:\n baseAlignment = 16;\n break;\n case 4:\n baseAlignment = 16;\n break;\n case 5:\n baseAlignment = 16;\n break;\n case 6:\n baseAlignment = 16;\n break;\n default:\n util_exports.assert(false, () => `Unsupported ${d.data.length}D shape`);\n }\n if (preLength === 5 || preLength === 6) {\n baseAlignment = 16;\n }\n currentOffset = Math.ceil(currentOffset / baseAlignment) * baseAlignment;\n preLength = d.data.length;\n offsets.push(currentOffset);\n currentOffset += d.data.length * 4;\n });\n const arrayBuffer = new ArrayBuffer(currentOffset);\n programUniform.forEach((d, i) => {\n const offset = offsets[i];\n if (d.type === \"int32\") {\n new Int32Array(arrayBuffer, offset, d.data.length).set(d.data);\n } else if (d.type === \"uint32\") {\n new Uint32Array(arrayBuffer, offset, d.data.length).set(d.data);\n } else {\n new Float32Array(arrayBuffer, offset, d.data.length).set(d.data);\n }\n });\n const uniformBuffer = this.bufferManager.acquireBuffer(currentOffset, GPUBufferUsage.COPY_DST | GPUBufferUsage.UNIFORM);\n this.queue.writeBuffer(uniformBuffer, 0, arrayBuffer, 0, currentOffset);\n const uniformInfo = {\n size: currentOffset,\n usage: GPUBufferUsage.COPY_DST | GPUBufferUsage.UNIFORM,\n buffer: uniformBuffer\n };\n this.uniformPendingDisposal.push(uniformInfo);\n return { offset: 0, size: currentOffset, buffer: uniformBuffer };\n }\n runWebGPUProgram(program, inputs, outputDtype, programDefinedUniform, output) {\n if (!output) {\n output = this.makeTensorInfo(program.outputShape, outputDtype);\n }\n if (util_exports.sizeFromShape(output.shape) === 0) {\n this.tensorMap.get(output.dataId).values = util_exports.getTypedArrayFromDType(output.dtype, 0);\n return output;\n }\n this.uploadToGPU(output.dataId);\n program.dispatch = reshapeDispatch(this.device, program);\n let programUniform = [];\n let bufferShapes = [];\n if (!program.isFromPixels) {\n programUniform.push({ type: \"float32\", data: [NaN] });\n bufferShapes = inputs.concat(output).map((d) => d.shape);\n const uniformsType = \"int32\";\n bufferShapes.map((d) => {\n programUniform.push({ type: uniformsType, data: d });\n });\n const strides = util_exports.computeStrides(output.shape);\n programUniform.push({ type: uniformsType, data: strides });\n if (program.size) {\n const size = util_exports.sizeFromShape(program.outputShape);\n programUniform.push({ type: uniformsType, data: [program.isVec4 ? size / 4 : size] });\n }\n }\n const inputsData = inputs.map((input2, i) => {\n if (input2.dtype === \"complex64\") {\n throw new Error(`GPGPUProgram does not support complex64 input. For complex64 dtypes, please separate the program into real and imaginary parts.`);\n }\n this.uploadToGPU(input2.dataId);\n return {\n dtype: this.tensorMap.get(input2.dataId).dtype,\n shape: input2.shape,\n name: program.variableNames[i]\n };\n });\n const key = makeShaderKey2(program, bufferShapes, inputsData, output);\n let pipeline;\n if (key in this.pipelineCache) {\n pipeline = this.pipelineCache[key];\n } else {\n pipeline = compileProgram2(this.device, program, inputsData, output);\n this.pipelineCache[key] = pipeline;\n }\n if (programDefinedUniform) {\n programUniform = [...programUniform, ...programDefinedUniform];\n }\n const bindings = [\n this.tensorToBinding(output),\n ...inputs.map((t) => this.tensorToBinding(t)),\n this.makeUniforms(programUniform)\n ];\n const bindGroup = this.device.createBindGroup({\n layout: pipeline.getBindGroupLayout(0),\n entries: bindings.map((b, i) => ({ binding: i, resource: b }))\n });\n this.ensureCommandEncoderReady();\n const pass = this.getComputePass();\n const shouldTimeProgram = this.activeTimers != null;\n if (shouldTimeProgram) {\n if (this.supportTimeQuery) {\n pass.writeTimestamp(this.querySet, 0);\n }\n }\n pass.setPipeline(pipeline);\n pass.setBindGroup(0, bindGroup);\n pass.dispatchWorkgroups(program.dispatch[0], program.dispatch[1], program.dispatch[2]);\n if (shouldTimeProgram) {\n if (this.supportTimeQuery) {\n pass.writeTimestamp(this.querySet, 1);\n }\n }\n this.dispatchNumberInEncoder++;\n inputs.forEach((input2) => {\n this.commandQueueOwnedIds.add(input2.dataId);\n });\n this.commandQueueOwnedIds.add(output.dataId);\n if (env().get(\"WEBGPU_DEFERRED_SUBMIT_BATCH_SIZE\") <= this.dispatchNumberInEncoder) {\n this.submitQueue();\n }\n if (shouldTimeProgram) {\n this.activeTimers.push({\n name: program.constructor.name,\n query: this.getQueryTime(this.querySet)\n });\n }\n return output;\n }\n async getTimeFromQuerySet(querySet) {\n const queryBuffer = this.bufferManager.acquireBuffer(16, GPUBufferUsage.COPY_SRC | GPUBufferUsage.QUERY_RESOLVE);\n const dst = this.bufferManager.acquireBuffer(16, GPUBufferUsage.MAP_READ | GPUBufferUsage.COPY_DST);\n this.ensureCommandEncoderReady();\n this.ensureComputePassEnded();\n this.currentCommandEncoder.resolveQuerySet(querySet, 0, 2, queryBuffer, 0);\n this.currentCommandEncoder.copyBufferToBuffer(queryBuffer, 0, dst, 0, 16);\n this.submitQueue();\n await dst.mapAsync(GPUMapMode.READ);\n const arrayBuf = new BigUint64Array(dst.getMappedRange());\n const timeElapsedNanos = Number(arrayBuf[1] - arrayBuf[0]);\n dst.unmap();\n this.bufferManager.releaseBuffer(dst, 16, GPUBufferUsage.MAP_READ | GPUBufferUsage.COPY_DST);\n this.bufferManager.releaseBuffer(queryBuffer, 16, GPUBufferUsage.COPY_SRC | GPUBufferUsage.QUERY_RESOLVE);\n return timeElapsedNanos / 1e6;\n }\n shouldExecuteOnCPU(inputs, sizeThreshold = CPU_HANDOFF_SIZE_THRESHOLD2) {\n return env().getBool(\"WEBGPU_CPU_FORWARD\") && inputs.every((input2) => this.tensorMap.get(input2.dataId).resourceInfo == null && util_exports.sizeFromShape(input2.shape) < sizeThreshold);\n }\n numDataIds() {\n return this.tensorMap.numDataIds() - this.tensorDataPendingDisposal.length;\n }\n dispose() {\n if (this.disposed) {\n return;\n }\n this.bufferManager.dispose();\n this.textureManager.dispose();\n this.disposed = true;\n }\n};\nWebGPUBackend.nextDataId = 0;\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/base.js\nif (isWebGPUSupported()) {\n registerBackend(\"webgpu\", async () => {\n env().set(\"CHECK_COMPUTATION_FOR_ERRORS\", false);\n const gpuDescriptor = {\n powerPreference: env().get(\"WEBGPU_USE_LOW_POWER_GPU\") ? \"low-power\" : \"high-performance\"\n };\n const adapter = await navigator.gpu.requestAdapter(gpuDescriptor);\n const adapterLimits = adapter.limits;\n const deviceDescriptor = {};\n const supportTimeQuery = adapter.features.has(\"timestamp-query\");\n deviceDescriptor.requiredLimits = {\n \"maxComputeWorkgroupStorageSize\": adapterLimits.maxComputeWorkgroupStorageSize,\n \"maxComputeWorkgroupsPerDimension\": adapterLimits.maxComputeWorkgroupsPerDimension,\n \"maxStorageBufferBindingSize\": adapterLimits.maxStorageBufferBindingSize\n };\n if (supportTimeQuery) {\n deviceDescriptor.requiredFeatures = [\"timestamp-query\"];\n }\n const device = await adapter.requestDevice(deviceDescriptor);\n return new WebGPUBackend(device);\n }, 3);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/binary_op_util.js\nvar BinaryOpType;\n(function(BinaryOpType2) {\n BinaryOpType2[BinaryOpType2[\"MUL\"] = 0] = \"MUL\";\n BinaryOpType2[BinaryOpType2[\"ADD\"] = 1] = \"ADD\";\n BinaryOpType2[BinaryOpType2[\"ATAN2\"] = 2] = \"ATAN2\";\n BinaryOpType2[BinaryOpType2[\"SUB\"] = 3] = \"SUB\";\n BinaryOpType2[BinaryOpType2[\"DIV\"] = 4] = \"DIV\";\n BinaryOpType2[BinaryOpType2[\"EQUAL\"] = 5] = \"EQUAL\";\n BinaryOpType2[BinaryOpType2[\"GREATER\"] = 6] = \"GREATER\";\n BinaryOpType2[BinaryOpType2[\"GREATER_EQUAL\"] = 7] = \"GREATER_EQUAL\";\n BinaryOpType2[BinaryOpType2[\"LESS\"] = 8] = \"LESS\";\n BinaryOpType2[BinaryOpType2[\"LESS_EQUAL\"] = 9] = \"LESS_EQUAL\";\n BinaryOpType2[BinaryOpType2[\"LOGICAL_AND\"] = 10] = \"LOGICAL_AND\";\n BinaryOpType2[BinaryOpType2[\"NOT_EQUAL\"] = 11] = \"NOT_EQUAL\";\n BinaryOpType2[BinaryOpType2[\"SQUARED_DIFFERENCE\"] = 12] = \"SQUARED_DIFFERENCE\";\n BinaryOpType2[BinaryOpType2[\"INT_DIV\"] = 13] = \"INT_DIV\";\n BinaryOpType2[BinaryOpType2[\"POW\"] = 14] = \"POW\";\n BinaryOpType2[BinaryOpType2[\"PRELU\"] = 15] = \"PRELU\";\n BinaryOpType2[BinaryOpType2[\"MAX\"] = 16] = \"MAX\";\n BinaryOpType2[BinaryOpType2[\"MIN\"] = 17] = \"MIN\";\n BinaryOpType2[BinaryOpType2[\"COMPLEX_MULTIPLY_REAL\"] = 18] = \"COMPLEX_MULTIPLY_REAL\";\n BinaryOpType2[BinaryOpType2[\"COMPLEX_MULTIPLY_IMAG\"] = 19] = \"COMPLEX_MULTIPLY_IMAG\";\n})(BinaryOpType || (BinaryOpType = {}));\nvar CHECK_NAN_SNIPPET4 = `\n if (isnan(a)) { return a; }\n if (isnan(b)) { return b; }\n `;\nvar CHECK_NAN_SNIPPET_VEC4_INNER = `\n if (isNaN.r) {\n resultTemp.r = valueForNaN;\n }\n if (isNaN.g) {\n resultTemp.g = valueForNaN;\n }\n if (isNaN.b) {\n resultTemp.b = valueForNaN;\n }\n if (isNaN.a) {\n resultTemp.a = valueForNaN;\n }\n `;\nvar CHECK_NAN_SNIPPET_VEC4 = `\n let isNaN = isnanVec4(a) | isnanVec4(b);\n ${CHECK_NAN_SNIPPET_VEC4_INNER}\n `;\nvar ADD2 = \"return a + b;\";\nvar COMPLEX_MULTIPLY_REAL = \"return areal * breal - aimag * bimag;\";\nvar COMPLEX_MULTIPLY_IMAG = \"return areal * bimag + aimag * breal;\";\nvar DIV2 = \"return a / b;\";\nvar MUL2 = \"return a * b;\";\nvar SQUARED_DIFFERENCE2 = \"return (a - b) * (a - b);\";\nvar SUB2 = \"return a - b;\";\nvar EQUAL2 = \"return f32(a == b);\";\nvar EQUAL_VEC4 = \"return vec4(a == b);\";\nvar GREATER2 = \"return f32(a > b);\";\nvar GREATER_VEC4 = \"return vec4(a > b);\";\nvar GREATER_EQUAL2 = \"return f32(a >= b);\";\nvar GREATER_EQUAL_VEC4 = \"return vec4(a >= b);\";\nvar LESS2 = \"return f32(a < b);\";\nvar LESS_VEC4 = \"return vec4(a < b);\";\nvar LESS_EQUAL2 = \"return f32(a <= b);\";\nvar LESS_EQUAL_VEC4 = \"return vec4(a <= b);\";\nvar LOGICAL_AND2 = \"return f32(f32(a) >= 1.0 && f32(b) >= 1.0);\";\nvar LOGICAL_AND_VEC4 = `return (vec4(a >= vec4(1.0)) *\n vec4(b >= vec4(1.0)));`;\nvar INT_DIV2 = `\n let s = sign(a) * sign(b);\n let ia = i32(round(a));\n let ib = i32(round(b));\n return f32(idiv(ia, ib, s));\n `;\nvar INT_DIV_VEC4 = `\n let ia = vec4(round(a));\n let ib = vec4(round(b));\n let cond = ib != vec4(0);\n var resultTemp = vec4(0);\n let s = sign(a) * sign(b);\n\n // Windows (D3D) wants guaranteed non-zero int division at compile-time.\n if (cond[0]) {\n resultTemp[0] = idiv(ia[0], ib[0], s[0]);\n }\n if (cond[1]) {\n resultTemp[1] = idiv(ia[1], ib[1], s[1]);\n }\n if (cond[2]) {\n resultTemp[2] = idiv(ia[2], ib[2], s[2]);\n }\n if (cond[3]) {\n resultTemp[3] = idiv(ia[3], ib[3], s[3]);\n }\n return vec4(resultTemp);\n `;\nvar NOT_EQUAL2 = `\n if (isnan(a) || isnan(b)) {\n return 1.0;\n }\n return f32(a != b);\n`;\nvar NOT_EQUAL_VEC4 = `\n var resultTemp = vec4(a != b);\n let valueForNaN = 1.0;\n ${CHECK_NAN_SNIPPET_VEC4}\n\n return resultTemp;\n`;\nvar POW2 = `\n if(a < 0.0 && floor(b) < b) {\n return uniforms.NAN;\n }\n if (b == 0.0) {\n return 1.0;\n }\n if (round(abs(b) % 2.0) != 1.0) {\n return pow(abs(a), b);\n }\n return sign(a) * pow(abs(a), b);\n `;\nvar POW_VEC4 = `\n let isModRound1Bool = vec4(round(abs(b) % vec4(2.0))) == vec4(1);\n let isModRound1 = vec4(isModRound1Bool);\n let multiplier = sign(a) * isModRound1 + (vec4(1.0) - isModRound1);\n var resultTemp = multiplier * pow(abs(a), b);\n\n // Ensure that a^0 = 1, including 0^0 = 1 as this correspond to TF and JS\n let isExpZero = b == vec4(0.0);\n if (isExpZero.r) {\n resultTemp.r = 1.0;\n }\n if (isExpZero.g) {\n resultTemp.g = 1.0;\n }\n if (isExpZero.b) {\n resultTemp.b = 1.0;\n }\n if (isExpZero.a) {\n resultTemp.a = 1.0;\n }\n let isNaN = a < vec4(0.0) & floor(b) < b;\n let valueForNaN = uniforms.NAN;\n ${CHECK_NAN_SNIPPET_VEC4_INNER}\n return resultTemp;\n `;\nvar PRELU2 = `if (a < 0.0) { return b * a; } return a;`;\nvar PRELU_VEC4 = `\n let aLessThanZero = vec4(a < vec4(0.0));\n return (aLessThanZero * (b * a)) + ((vec4(1.0) - aLessThanZero) * a);\n `;\nfunction getBinaryWithNanString(op2, useVec4, valueForNaN = \"uniforms.NAN\") {\n const checkNanSnippet = useVec4 ? CHECK_NAN_SNIPPET_VEC4 : CHECK_NAN_SNIPPET4;\n return useVec4 ? `\n let valueForNaN = ${valueForNaN};\n var resultTemp = vec4(${op2}(a, b));\n ` + checkNanSnippet + `\n return resultTemp;\n ` : checkNanSnippet + `\n return ${op2}(a, b);\n `;\n}\nfunction getBinaryOpString(type, useVec4) {\n switch (type) {\n case BinaryOpType.MUL:\n return MUL2;\n case BinaryOpType.ADD:\n return ADD2;\n case BinaryOpType.ATAN2:\n return getBinaryWithNanString(\"atan2\", useVec4);\n case BinaryOpType.SUB:\n return SUB2;\n case BinaryOpType.DIV:\n return DIV2;\n case BinaryOpType.EQUAL:\n return useVec4 ? EQUAL_VEC4 : EQUAL2;\n case BinaryOpType.GREATER:\n return useVec4 ? GREATER_VEC4 : GREATER2;\n case BinaryOpType.GREATER_EQUAL:\n return useVec4 ? GREATER_EQUAL_VEC4 : GREATER_EQUAL2;\n case BinaryOpType.LESS:\n return useVec4 ? LESS_VEC4 : LESS2;\n case BinaryOpType.LESS_EQUAL:\n return useVec4 ? LESS_EQUAL_VEC4 : LESS_EQUAL2;\n case BinaryOpType.LOGICAL_AND:\n return useVec4 ? LOGICAL_AND_VEC4 : LOGICAL_AND2;\n case BinaryOpType.NOT_EQUAL:\n return useVec4 ? NOT_EQUAL_VEC4 : NOT_EQUAL2;\n case BinaryOpType.SQUARED_DIFFERENCE:\n return SQUARED_DIFFERENCE2;\n case BinaryOpType.INT_DIV:\n return useVec4 ? INT_DIV_VEC4 : INT_DIV2;\n case BinaryOpType.PRELU:\n return useVec4 ? PRELU_VEC4 : PRELU2;\n case BinaryOpType.MAX:\n return getBinaryWithNanString(\"max\", useVec4);\n case BinaryOpType.MIN:\n return getBinaryWithNanString(\"min\", useVec4);\n case BinaryOpType.POW:\n return useVec4 ? POW_VEC4 : POW2;\n case BinaryOpType.COMPLEX_MULTIPLY_REAL:\n return COMPLEX_MULTIPLY_REAL;\n case BinaryOpType.COMPLEX_MULTIPLY_IMAG:\n return COMPLEX_MULTIPLY_IMAG;\n default:\n throw new Error(`BinaryType ${type} is not implemented!`);\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/unary_op_util.js\nvar UnaryOpType;\n(function(UnaryOpType2) {\n UnaryOpType2[UnaryOpType2[\"ABS\"] = 0] = \"ABS\";\n UnaryOpType2[UnaryOpType2[\"CEIL\"] = 1] = \"CEIL\";\n UnaryOpType2[UnaryOpType2[\"COS\"] = 2] = \"COS\";\n UnaryOpType2[UnaryOpType2[\"COSH\"] = 3] = \"COSH\";\n UnaryOpType2[UnaryOpType2[\"ELU\"] = 4] = \"ELU\";\n UnaryOpType2[UnaryOpType2[\"EXP\"] = 5] = \"EXP\";\n UnaryOpType2[UnaryOpType2[\"EXPM1\"] = 6] = \"EXPM1\";\n UnaryOpType2[UnaryOpType2[\"FLOOR\"] = 7] = \"FLOOR\";\n UnaryOpType2[UnaryOpType2[\"IS_NAN\"] = 8] = \"IS_NAN\";\n UnaryOpType2[UnaryOpType2[\"LINEAR\"] = 9] = \"LINEAR\";\n UnaryOpType2[UnaryOpType2[\"LOG\"] = 10] = \"LOG\";\n UnaryOpType2[UnaryOpType2[\"LOGICAL_NOT\"] = 11] = \"LOGICAL_NOT\";\n UnaryOpType2[UnaryOpType2[\"NEG\"] = 12] = \"NEG\";\n UnaryOpType2[UnaryOpType2[\"RELU\"] = 13] = \"RELU\";\n UnaryOpType2[UnaryOpType2[\"RELU6\"] = 14] = \"RELU6\";\n UnaryOpType2[UnaryOpType2[\"LEAKYRELU\"] = 15] = \"LEAKYRELU\";\n UnaryOpType2[UnaryOpType2[\"RECIPROCAL\"] = 16] = \"RECIPROCAL\";\n UnaryOpType2[UnaryOpType2[\"RSQRT\"] = 17] = \"RSQRT\";\n UnaryOpType2[UnaryOpType2[\"SIN\"] = 18] = \"SIN\";\n UnaryOpType2[UnaryOpType2[\"SINH\"] = 19] = \"SINH\";\n UnaryOpType2[UnaryOpType2[\"SIGMOID\"] = 20] = \"SIGMOID\";\n UnaryOpType2[UnaryOpType2[\"SQRT\"] = 21] = \"SQRT\";\n UnaryOpType2[UnaryOpType2[\"SQUARE\"] = 22] = \"SQUARE\";\n UnaryOpType2[UnaryOpType2[\"TANH\"] = 23] = \"TANH\";\n UnaryOpType2[UnaryOpType2[\"TO_INT\"] = 24] = \"TO_INT\";\n})(UnaryOpType || (UnaryOpType = {}));\nvar ABS3 = `return abs(a);`;\nvar CEIL2 = `return ceil(a);`;\nvar COS2 = `return cos(a);`;\nvar COSH2 = `\n let e2x = exp(-a);\n return (e2x + 1.0 / e2x) / 2.0;\n`;\nvar EXPM12 = `return exp(a) - 1.0;`;\nvar ELU5 = `if (a >= 0.0) { return a; } return (exp(a) - 1.0);`;\nvar ELU_VEC4 = `\n var resFloat = exp(a) - vec4(1.0);\n if (a.r >= 0.0) {\n resFloat.r = a.r;\n }\n if (a.g >= 0.0) {\n resFloat.g = a.g;\n }\n if (a.b >= 0.0) {\n resFloat.b = a.b;\n }\n if (a.a >= 0.0) {\n resFloat.a = a.a;\n }\n return resFloat;\n`;\nvar EXP2 = `return exp(a);`;\nvar FLOOR2 = `return floor(a);`;\nvar IS_NAN2 = `return f32(isnan(a));`;\nvar LINEAR3 = `return a;`;\nvar LOG2 = `if (a < 0.0) { return 1.0/0.0; }\n return log(a);`;\nvar LOGICAL_NOT2 = `return f32(!(a >= 1.0));`;\nvar NEG2 = `return -a;`;\nvar LEAKYRELU2 = `if (a < 0.0) { return uniforms.alpha * a; } return a;`;\nvar LEAKYRELU_VEC4 = `\n let aLessThanZero = vec4(a < vec4(0.0));\n return (aLessThanZero * (uniforms.alpha * a)) + ((vec4(1.0) - aLessThanZero) * a);\n`;\nvar RECIPROCAL2 = `return 1.0 / a;`;\nvar RELU4 = `return select(a, 0.0, a < 0.0);`;\nvar RELU64 = \"return clamp(a, 0.0, 6.0);\";\nvar RELU6_VEC4 = \"return clamp(a, vec4(0.0, 0.0, 0.0, 0.0), vec4(6.0, 6.0, 6.0, 6.0));\";\nvar RELU_VEC4 = `\n return select(a, vec4(0.0), a < vec4(0.0));\n`;\nvar RSQRT2 = `return 1.0/sqrt(a);`;\nvar SIGMOID4 = `return 1.0 / (1.0 + exp(-1.0 * a));`;\nvar SIN2 = `return sin(a);`;\nvar SINH2 = `\n let e2x = exp(a);\n return (e2x - 1.0 / e2x) / 2.0;\n`;\nvar SQRT2 = `return sqrt(a);`;\nvar SQUARE2 = `return a * a;`;\nvar TANH2 = `\n let e2x = exp(-2.0 * abs(a));\n return sign(a) * (1.0 - e2x) / (1.0 + e2x);\n`;\nvar TO_INT2 = `return f32(i32((a)));`;\nfunction getUnaryOpString(type, useVec4) {\n switch (type) {\n case UnaryOpType.ABS:\n return ABS3;\n case UnaryOpType.COS:\n return COS2;\n case UnaryOpType.COSH:\n return COSH2;\n case UnaryOpType.CEIL:\n return CEIL2;\n case UnaryOpType.ELU:\n return useVec4 ? ELU_VEC4 : ELU5;\n case UnaryOpType.EXP:\n return EXP2;\n case UnaryOpType.EXPM1:\n return EXPM12;\n case UnaryOpType.FLOOR:\n return FLOOR2;\n case UnaryOpType.IS_NAN:\n return IS_NAN2;\n case UnaryOpType.LINEAR:\n return LINEAR3;\n case UnaryOpType.LOG:\n return LOG2;\n case UnaryOpType.LOGICAL_NOT:\n return LOGICAL_NOT2;\n case UnaryOpType.NEG:\n return NEG2;\n case UnaryOpType.LEAKYRELU:\n return useVec4 ? LEAKYRELU_VEC4 : LEAKYRELU2;\n case UnaryOpType.RECIPROCAL:\n return RECIPROCAL2;\n case UnaryOpType.RELU:\n return useVec4 ? RELU_VEC4 : RELU4;\n case UnaryOpType.RELU6:\n return useVec4 ? RELU6_VEC4 : RELU64;\n case UnaryOpType.RSQRT:\n return RSQRT2;\n case UnaryOpType.SIGMOID:\n return SIGMOID4;\n case UnaryOpType.SIN:\n return SIN2;\n case UnaryOpType.SINH:\n return SINH2;\n case UnaryOpType.SQRT:\n return SQRT2;\n case UnaryOpType.SQUARE:\n return SQUARE2;\n case UnaryOpType.TANH:\n return TANH2;\n case UnaryOpType.TO_INT:\n return TO_INT2;\n default:\n throw new Error(`BinaryType ${type} is not implemented!`);\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/activation_util.js\nvar typeSnippet = (component) => {\n switch (component) {\n case 1:\n return \"f32\";\n case 2:\n return \"vec2\";\n case 3:\n return \"vec3\";\n case 4:\n return \"vec4\";\n default:\n throw new Error(`${component}-component is not supported.`);\n }\n};\nfunction activationFnSnippet(activation2, hasPreluActivationWeights = false, packed = false, coordsLength = 3) {\n if (activation2 === null) {\n return \"\";\n }\n let activationOpSnippet = \"\";\n if (activation2 === \"linear\") {\n activationOpSnippet = getUnaryOpString(UnaryOpType.LINEAR);\n } else if (activation2 === \"relu\") {\n activationOpSnippet = getUnaryOpString(UnaryOpType.RELU, packed);\n } else if (activation2 === \"elu\") {\n activationOpSnippet = getUnaryOpString(UnaryOpType.ELU, packed);\n } else if (activation2 === \"relu6\") {\n activationOpSnippet = getUnaryOpString(UnaryOpType.RELU6, packed);\n } else if (activation2 === \"prelu\") {\n activationOpSnippet = getBinaryOpString(BinaryOpType.PRELU, packed);\n } else if (activation2 === \"sigmoid\") {\n activationOpSnippet = getUnaryOpString(UnaryOpType.SIGMOID, packed);\n } else if (activation2 === \"leakyrelu\") {\n activationOpSnippet = getUnaryOpString(UnaryOpType.LEAKYRELU, packed);\n } else {\n throw new Error(`Activation ${activation2} has not been implemented for the WebGPU backend.`);\n }\n const elementSize = packed ? 4 : 1;\n const dataType = typeSnippet(elementSize);\n let activationFnSnippet2 = \"\";\n if (hasPreluActivationWeights) {\n activationFnSnippet2 = `\n fn activation(a : ${dataType}, coords : vec${coordsLength}) -> ${dataType} {\n let b = getPreluActivationWeightsByOutputCoords(coords);\n ${activationOpSnippet}\n }`;\n } else {\n activationFnSnippet2 = `\n fn activation(a : ${dataType}, coords : vec${coordsLength}) -> ${dataType} {\n ${activationOpSnippet}\n }`;\n }\n return activationFnSnippet2;\n}\nfunction biasActivationSnippet(hasBias, activation2) {\n return `\n ${hasBias ? \"value = value + getBiasByOutputCoords(coords);\" : \"\"}\n ${activation2 ? \"value = activation(value, coords);\" : \"\"}\n `;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/matmul_packed_webgpu.js\nfunction matMulReadFnSource(batchAEqualOne, batchBEqualOne, transposeA, transposeB, fitAOuter = false, fitBOuter = false, fitInner = false, component = 1) {\n util_exports.assert(transposeA && component === 1 || !transposeA, () => `transposeA ${transposeA} is not compatible with component size ${component}`);\n const sampleA = `\n let batch = ${batchAEqualOne ? \"0\" : \"batchIn\"};\n let batchASize = uniforms.aShape[1] * uniforms.aShape[2];\n ${transposeA ? `value = A[(batch * batchASize + col * uniforms.aShape[2] + row) / ${component}];` : `value = A[(batch * batchASize + row * uniforms.aShape[2] + col) / ${component}];`}\n\n `;\n let sampleB;\n if (transposeB === false) {\n sampleB = `value = B[(batch * batchBSize + row * uniforms.bShape[2] + col) / ${component}];`;\n } else {\n sampleB = `value = B[(batch * batchBSize + col * uniforms.bShape[2] + row) / ${component}];`;\n }\n return `\n fn mm_readA(batchIn: i32, row: i32, colIn: i32) -> ${typeSnippet(component)} {\n var value = ${typeSnippet(component)}(0.0);\n let col = colIn * ${component};\n ${fitAOuter && fitInner ? sampleA : `\n ${transposeA ? `if(row < uniforms.dimAOuter && col < uniforms.dimInner)` : `if(row < uniforms.aShape[1] && col < uniforms.aShape[2])`}\n {\n ${sampleA}\n }\n `}\n return value;\n }\n\n fn mm_readB(batchIn: i32, row: i32, colIn: i32) -> ${typeSnippet(component)} {\n let col = colIn * ${component};\n let batch = ${batchBEqualOne ? \"0\" : \"batchIn\"};\n let batchBSize = uniforms.bShape[1] * uniforms.bShape[2];\n var value = ${typeSnippet(component)}(0.0);\n ${sampleB}\n return value;\n }\n `;\n}\nfunction matMulReadWriteFnSource(hasBias, activation2, batchAEqualOne, batchBEqualOne, transposeA, transposeB, fitAOuter = false, fitBOuter = false, fitInner = false, component = 1) {\n return `\n ${matMulReadFnSource(batchAEqualOne, batchBEqualOne, transposeA, transposeB, fitAOuter, fitBOuter, fitInner, component)}\n fn mm_write(batch: i32, row: i32, colIn: i32, valueIn: ${typeSnippet(component)}) {\n let col = colIn * ${component};\n ${fitAOuter && fitBOuter ? \"\" : \"if (row < uniforms.dimAOuter && col < uniforms.dimBOuter)\"}\n {\n var value = valueIn;\n let coords = vec3(batch, row, col);\n ${biasActivationSnippet(hasBias, activation2)}\n setOutputAtCoords(coords[0], coords[1], coords[2], value);\n }\n }\n `;\n}\nvar writeDataToSubAVec4Snippet = (transpose6) => {\n if (transpose6) {\n return `\n mm_Asub[inputRow][inputCol] = mm_readA(batch,\n kStart + inputRow,\n globalRowStart / InnerElementSize + inputCol);\n `;\n } else {\n return `\n mm_Asub[inputRow][inputCol] = mm_readA(batch,\n globalRow + innerRow,\n kStart / InnerElementSize + inputCol);\n `;\n }\n};\nvar calculateResultSnippet = (transposeA, innerElementSize) => {\n if (transposeA) {\n return `\n let ACached0 = mm_Asub[k * InnerElementSize][localRow];\n let ACached1 = mm_Asub[k * InnerElementSize + 1][localRow];\n let ACached2 = mm_Asub[k * InnerElementSize + 2][localRow];\n ${innerElementSize === 3 ? \"\" : \"let ACached3 = mm_Asub[k * InnerElementSize + 3][localRow];\"}\n for (var i = 0; i < RowPerThread; i = i + 1) {\n acc[i] = BCached0 * ACached0[i] + acc[i];\n acc[i] = BCached1 * ACached1[i] + acc[i];\n acc[i] = BCached2 * ACached2[i] + acc[i];\n ${innerElementSize === 3 ? \"\" : \"acc[i] = BCached3 * ACached3[i] + acc[i];\"}\n }`;\n } else {\n return `\n for (var i = 0; i < RowPerThread; i = i + 1) {\n let ACached = mm_Asub[tileRow + i][k];\n acc[i] = BCached0 * ACached.x + acc[i];\n acc[i] = BCached1 * ACached.y + acc[i];\n acc[i] = BCached2 * ACached.z + acc[i];\n ${innerElementSize === 3 ? \"\" : \"acc[i] = BCached3 * ACached.w + acc[i];\"}\n }`;\n }\n};\nfunction makeMatMulPackedVec4Source(workPerThread, workGroupSize, transposeA = false, tileInner = 32, splitK = false, splitedDimInner = 32, isVectorA = false) {\n const tileAOuter = workGroupSize[1] * workPerThread[1];\n const tileBOuter = workGroupSize[0] * workPerThread[0];\n const tileAWidth = transposeA ? tileAOuter : tileInner;\n const tileAHight = transposeA ? tileInner : tileAOuter;\n const innerElementSize = tileAWidth / workGroupSize[0];\n const rowPerThreadB = tileInner / workGroupSize[1];\n util_exports.assert((transposeA && innerElementSize === 4 && workPerThread[1] === 4 || !transposeA && (innerElementSize === 3 || innerElementSize === 4)) && tileAWidth % workGroupSize[0] === 0 && tileInner % workGroupSize[1] === 0 && workPerThread[0] === 4, () => `If transposeA ${transposeA} is true, innerElementSize ${innerElementSize} and workPerThread[1] ${workPerThread[1]} must be 4.\n Otherwise, innerElementSize ${innerElementSize} must be 3 or 4.\n tileAWidth ${tileAWidth} must be divisible by workGroupSize[0]${workGroupSize[0]}. tileInner ${tileInner} must be divisible by workGroupSize[1] ${workGroupSize[1]}. ColPerThread ${workPerThread[0]} must be 4.`);\n return `\n var mm_Asub : array, ${tileAWidth / innerElementSize}>, ${tileAHight}>;\n var mm_Bsub : array, ${tileBOuter / workPerThread[0]}>, ${tileInner}>;\n\n const RowPerThread = ${workPerThread[1]};\n const ColPerThread = ${workPerThread[0]};\n const InnerElementSize = ${innerElementSize};\n const TileInner = ${tileInner};\n\n @compute @workgroup_size(workGroupSizeX, workGroupSizeY, workGroupSizeZ)\n fn _start(@builtin(local_invocation_id) LocalId : vec3,\n @builtin(global_invocation_id) GlobalId : vec3,\n @builtin(num_workgroups) NumWorkgroups: vec3,\n @builtin(workgroup_id) workgroupId: vec3) {\n localId = LocalId;\n globalId = GlobalId;\n numWorkgroups = NumWorkgroups;\n\n let localRow = i32(localId.y);\n let tileRow = ${isVectorA ? \"0\" : \"localRow * RowPerThread\"};\n let tileCol = i32(localId.x);\n\n let globalRow = ${isVectorA ? \"0\" : \"i32(globalId.y) * RowPerThread\"};\n let globalCol = i32(globalId.x);\n let batch = ${splitK ? \"0\" : \"i32(globalId.z)\"};\n let globalRowStart = i32(workgroupId.y) * ${tileAOuter};\n\n let numTiles = ${splitK ? `${Math.ceil(splitedDimInner / tileInner)}` : \"(uniforms.dimInner - 1) / TileInner + 1\"};\n var kStart = ${splitK ? `i32(globalId.z) * ${splitedDimInner}` : \"0\"};\n\n var acc: array, RowPerThread>;\n\n // Loop over shared dimension.\n let tileRowB = localRow * ${rowPerThreadB};\n for (var t = 0; t < numTiles; t = t + 1) {\n // Load one tile of A into local memory.\n for (var innerRow = 0; innerRow < RowPerThread; innerRow = innerRow + 1) {\n let inputRow = tileRow + innerRow;\n let inputCol = tileCol;\n ${writeDataToSubAVec4Snippet(transposeA)}\n }\n\n // Load one tile of B into local memory.\n for (var innerRow = 0; innerRow < ${rowPerThreadB}; innerRow = innerRow + 1) {\n let inputRow = tileRowB + innerRow;\n let inputCol = tileCol;\n mm_Bsub[inputRow][inputCol] = mm_readB(batch, kStart + inputRow, globalCol);\n }\n kStart = kStart + TileInner;\n workgroupBarrier();\n\n // Compute acc values for a single thread.\n for (var k = 0; k < TileInner / InnerElementSize; k = k + 1) {\n let BCached0 = mm_Bsub[k * InnerElementSize][tileCol];\n let BCached1 = mm_Bsub[k * InnerElementSize + 1][tileCol];\n let BCached2 = mm_Bsub[k * InnerElementSize + 2][tileCol];\n ${innerElementSize === 3 ? \"\" : \"let BCached3 = mm_Bsub[k * InnerElementSize + 3][tileCol];\"}\n\n ${calculateResultSnippet(transposeA, innerElementSize)}\n }\n\n workgroupBarrier();\n }\n\n for (var innerRow = 0; innerRow < RowPerThread; innerRow = innerRow + 1) {\n mm_write(batch, globalRow + innerRow, globalCol, acc[innerRow]);\n }\n }`;\n}\nvar writeDataToSubASnippet = (transpose6) => {\n if (transpose6) {\n return `\n mm_Asub[inputRow][inputCol] = mm_readA(batch,\n kStart + inputRow,\n globalRowStart + inputCol);\n `;\n } else {\n return `\n mm_Asub[inputRow][inputCol] = mm_readA(batch,\n globalRowStart + inputRow,\n kStart + inputCol);\n `;\n }\n};\nvar readDataFromSubASnippet = (transposeA) => {\n return transposeA ? \"let ACached = mm_Asub[k][tileRow + innerRow];\" : \"let ACached = mm_Asub[tileRow + innerRow][k];\";\n};\nfunction makeMatMulPackedSource(workPerThread, workGroupSize, transposeA = false, tileInner = 32, splitK = false, splitedDimInner = 32) {\n const tileAOuter = workPerThread[1] * workGroupSize[1];\n const tileBOuter = workPerThread[0] * workGroupSize[0];\n const tileAWidth = transposeA ? tileAOuter : tileInner;\n const tileAHight = transposeA ? tileInner : tileAOuter;\n util_exports.assert(tileAHight % workGroupSize[1] === 0 && tileAWidth % workGroupSize[0] === 0 && tileInner % workGroupSize[1] === 0, () => `tileAHight ${tileAHight} must be divisible by workGroupSize[1]${workGroupSize[1]}, tileAWidth ${tileAWidth} must be divisible by workGroupSize[0]${workGroupSize[0]}, tileInner ${tileInner} must be divisible by workGroupSize[1]${workGroupSize[1]}`);\n const rowPerThreadA = tileAHight / workGroupSize[1];\n const colPerThreadA = tileAWidth / workGroupSize[0];\n const rowPerThreadB = tileInner / workGroupSize[1];\n return `\n var mm_Asub : array, ${tileAHight}>;\n var mm_Bsub : array, ${tileInner}>;\n const RowPerThread = ${workPerThread[1]};\n const ColPerThread = ${workPerThread[0]};\n const TileInner = ${tileInner};\n\n @compute @workgroup_size(workGroupSizeX, workGroupSizeY, workGroupSizeZ)\n fn _start(@builtin(local_invocation_id) LocalId : vec3,\n @builtin(global_invocation_id) GlobalId : vec3,\n @builtin(num_workgroups) NumWorkgroups: vec3,\n @builtin(workgroup_id) workgroupId: vec3) {\n localId = LocalId;\n globalId = GlobalId;\n numWorkgroups = NumWorkgroups;\n\n let tileRow = i32(localId.y) * RowPerThread;\n let tileCol = i32(localId.x) * ColPerThread;\n\n let globalRow = i32(globalId.y) * RowPerThread;\n let globalCol = i32(globalId.x) * ColPerThread;\n let batch = ${splitK ? \"0\" : \"i32(globalId.z)\"};\n let globalRowStart = i32(workgroupId.y) * ${tileAOuter};\n\n let numTiles = ${splitK ? `${Math.ceil(splitedDimInner / tileInner)}` : \"(uniforms.dimInner - 1) / TileInner + 1\"};\n var kStart = ${splitK ? `i32(globalId.z) * ${splitedDimInner}` : \"0\"};\n\n var acc : array, RowPerThread>;\n\n // Without this initialization strange values show up in acc.\n for (var innerRow = 0; innerRow < RowPerThread; innerRow = innerRow + 1) {\n for (var innerCol = 0; innerCol < ColPerThread; innerCol = innerCol + 1) {\n acc[innerRow][innerCol] = 0.0;\n }\n }\n\n let tileRowA = i32(localId.y) * ${rowPerThreadA};\n let tileColA = i32(localId.x) * ${colPerThreadA};\n let tileRowB = i32(localId.y) * ${rowPerThreadB};\n // Loop over shared dimension.\n for (var t = 0; t < numTiles; t = t + 1) {\n // Load one tile of A into local memory.\n for (var innerRow = 0; innerRow < ${rowPerThreadA}; innerRow = innerRow + 1) {\n for (var innerCol = 0; innerCol < ${colPerThreadA}; innerCol = innerCol + 1) {\n let inputRow = tileRowA + innerRow;\n let inputCol = tileColA + innerCol;\n ${writeDataToSubASnippet(transposeA)}\n }\n }\n\n // Load one tile of B into local memory.\n for (var innerRow = 0; innerRow < ${rowPerThreadB}; innerRow = innerRow + 1) {\n for (var innerCol = 0; innerCol < ColPerThread; innerCol = innerCol + 1) {\n let inputRow = tileRowB + innerRow;\n let inputCol = tileCol + innerCol;\n mm_Bsub[inputRow][inputCol] = mm_readB(batch,\n kStart + inputRow,\n globalCol + innerCol);\n }\n }\n kStart = kStart + TileInner;\n workgroupBarrier();\n\n // Compute acc values for a single thread.\n var BCached : array;\n for (var k = 0; k < TileInner; k = k + 1) {\n for (var inner = 0; inner < ColPerThread; inner = inner + 1) {\n BCached[inner] = mm_Bsub[k][tileCol + inner];\n }\n\n for (var innerRow = 0; innerRow < RowPerThread; innerRow = innerRow + 1) {\n ${readDataFromSubASnippet(transposeA)}\n for (var innerCol = 0; innerCol < ColPerThread; innerCol = innerCol + 1) {\n acc[innerRow][innerCol] = acc[innerRow][innerCol] + ACached * BCached[innerCol];\n }\n }\n }\n\n workgroupBarrier();\n }\n\n for (var innerRow = 0; innerRow < RowPerThread; innerRow = innerRow + 1) {\n for (var innerCol = 0; innerCol < ColPerThread; innerCol = innerCol + 1) {\n mm_write(batch, globalRow + innerRow, globalCol + innerCol,\n acc[innerRow][innerCol]);\n }\n }\n }\n `;\n}\nvar readVectorASnippet = (transpose6) => {\n return transpose6 ? `\n mm_readA(batch, colA, globalRow),\n mm_readA(batch, colA + 1, globalRow),\n mm_readA(batch, colA + 2, globalRow),\n mm_readA(batch, colA + 3, globalRow)\n ` : `\n mm_readA(batch, globalRow, colA),\n mm_readA(batch, globalRow, colA + 1),\n mm_readA(batch, globalRow, colA + 2),\n mm_readA(batch, globalRow, colA + 3)\n `;\n};\nfunction makeVectorMatrixProductSource(workGroupSize, transposeA = false) {\n util_exports.assert(workGroupSize[1] === 1 && workGroupSize[2] === 1, () => `A linear work group size is required. But got ${workGroupSize}.`);\n return `\n const TileSize = ${workGroupSize[0] * 4};\n var mm_Asub : array, ${workGroupSize[0]}>;\n\n ${getMainHeaderString()} {\n let tileCol = i32(localId.x);\n let globalCol = i32(globalId.x);\n let globalRow = i32(globalId.y);\n\n let numTiles = (uniforms.dimInner - 1) / TileSize + 1;\n let batch = i32(globalId.z);\n // Without this initialization strange values show up in acc.\n var acc = 0.0;\n\n // Loop over shared dimension.\n for (var t = 0; t < numTiles; t = t + 1) {\n // Load one tile of A into local memory.\n let colA = t * TileSize + tileCol * 4;\n mm_Asub[tileCol] = vec4(${readVectorASnippet(transposeA)});\n workgroupBarrier();\n\n // Compute acc values for a single thread.\n for (var k = 0; k < TileSize / 4; k = k + 1) {\n let rowB = t * TileSize + k * 4;\n let BCached = vec4(mm_readB(batch, rowB, globalCol),\n mm_readB(batch, rowB + 1, globalCol),\n mm_readB(batch, rowB + 2, globalCol),\n mm_readB(batch, rowB + 3, globalCol));\n\n let ACached = mm_Asub[k];\n acc = acc + dot(ACached, BCached);\n }\n\n workgroupBarrier();\n }\n\n mm_write(batch, globalRow, globalCol, acc);\n }\n `;\n}\nvar MatMulPackedProgram2 = class {\n constructor(aShape, outputShape, batchAEqualOne, batchBEqualOne, transposeA = false, transposeB = false, bias = null, activation2 = null, preluActivationWeights = null) {\n this.variableNames = [\"A\", \"B\"];\n this.uniforms = `dimAOuter : i32, dimBOuter : i32, dimInner : i32,`;\n this.outputShape = outputShape;\n this.dispatchLayout = { x: [2], y: [1], z: [0] };\n const dimInner = transposeA ? aShape[1] : aShape[2];\n this.isVec4 = (dimInner % 4 === 0 && !transposeA || outputShape[1] % 4 === 0 && transposeA) && outputShape[2] % 4 === 0 && !transposeB;\n this.isVectorA = outputShape[1] === 1 && !transposeA;\n if (!this.isVec4 && this.isVectorA) {\n this.elementsPerThread = [1, 1, 1];\n this.workGroupSize = [32, 1, 1];\n } else {\n const workGroupInfo = computeWorkGroupInfoForMatMul(outputShape[1], dimInner, outputShape[2], transposeA);\n this.workGroupSize = workGroupInfo.workGroupSize;\n this.elementsPerThread = workGroupInfo.elementsPerThread;\n }\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize, this.elementsPerThread);\n const addBias = bias != null;\n const hasPreluActivationWeights = preluActivationWeights != null;\n if (addBias) {\n this.variableNames.push(\"bias\");\n }\n if (hasPreluActivationWeights) {\n this.variableNames.push(\"preluActivationWeights\");\n }\n this.transposeA = transposeA;\n this.transposeB = transposeB;\n this.addBias = addBias;\n this.activation = activation2;\n this.hasPreluActivationWeights = hasPreluActivationWeights;\n this.batchAEqualOne = batchAEqualOne;\n this.batchBEqualOne = batchBEqualOne;\n [this.fitAOuter, this.fitBOuter, this.fitInner] = this.getShapeFit(outputShape[1], outputShape[2], dimInner);\n this.shaderKey = `matMulPacked_${this.elementsPerThread}_${transposeA}_${transposeB}_${this.activation}_${this.fitAOuter}_${this.fitBOuter}_${this.fitInner}_${this.isVec4}_${this.isVectorA}_${this.batchAEqualOne}_${this.batchBEqualOne}`;\n }\n getShapeFit(dimAOuter, dimBOuter, dimInner) {\n const tileAOuter = this.workGroupSize[1] * this.elementsPerThread[1];\n const tileBOuter = this.workGroupSize[0] * this.elementsPerThread[0];\n if (!this.isVec4 && this.isVectorA) {\n this.tileInner = this.workGroupSize[0] * 4;\n } else {\n this.tileInner = tileBOuter;\n }\n const fitAOuter = dimAOuter % tileAOuter === 0;\n const fitBOuter = dimBOuter % tileBOuter === 0;\n const fitInner = dimInner % this.tileInner === 0;\n return [fitAOuter, fitBOuter, fitInner];\n }\n getUserCode() {\n const userCode = `\n ${activationFnSnippet(this.activation, this.hasPreluActivationWeights, this.isVec4)}\n ${matMulReadWriteFnSource(this.addBias, this.activation, this.batchAEqualOne, this.batchBEqualOne, false, this.transposeB, this.fitAOuter, this.fitBOuter, this.fitInner, this.isVec4 ? 4 : 1)}\n ${this.isVec4 ? makeMatMulPackedVec4Source(this.elementsPerThread, this.workGroupSize, this.transposeA, this.tileInner, false, null, this.isVectorA) : this.isVectorA ? makeVectorMatrixProductSource(this.workGroupSize, this.transposeA) : makeMatMulPackedSource(this.elementsPerThread, this.workGroupSize, this.transposeA, this.tileInner)}\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/matmul_reduce_webgpu.js\nfunction makeMatMulReduceSource() {\n return `\n var sumValues : array;\n ${getMainHeaderString()} {\n let coords = getOutputCoords();\n let batch = coords[0];\n let row = coords[1];\n let col = coords[2];\n var sum = 0.0;\n let Length = uniforms.dimInner;\n for (var k = i32(localId.x); k < Length; k = k + i32(workGroupSizeX)) {\n let dataA = mm_readA(batch, row, k);\n let dataB = mm_readB(batch, k, col);\n sum = sum + dataA * dataB;\n }\n sumValues[localId.x] = sum;\n workgroupBarrier();\n\n for(var currentSize = workGroupSizeX / 2u; currentSize > 1u;\n currentSize = currentSize / 2u) {\n if (localId.x < currentSize)\n {\n sumValues[localId.x] = sumValues[localId.x] + sumValues[localId.x + currentSize];\n }\n workgroupBarrier();\n }\n\n if (localId.x == 0u) {\n sum = sumValues[0] + sumValues[1];\n mm_write(batch, row, col, sum);\n }\n }\n `;\n}\nvar MatMulReduceProgram = class {\n constructor(outputShape, batchAEqualOne, batchBEqualOne, transposeA = false, transposeB = false, bias = null, activation2 = null, preluActivationWeights = null) {\n this.variableNames = [\"A\", \"B\"];\n this.uniforms = `dimAOuter : i32, dimBOuter : i32, dimInner : i32,`;\n this.workGroupSize = [256, 1, 1];\n this.outputShape = outputShape;\n this.dispatchLayout = { x: [], y: [1, 2], z: [0] };\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n const addBias = bias != null;\n const hasPreluActivationWeights = preluActivationWeights != null;\n if (addBias) {\n this.variableNames.push(\"bias\");\n }\n if (hasPreluActivationWeights) {\n this.variableNames.push(\"preluActivationWeights\");\n }\n this.transposeA = transposeA;\n this.transposeB = transposeB;\n this.addBias = addBias;\n this.activation = activation2;\n this.hasPreluActivationWeights = hasPreluActivationWeights;\n this.batchAEqualOne = batchAEqualOne;\n this.batchBEqualOne = batchBEqualOne;\n this.shaderKey = `matMulReduce_${this.activation}_${transposeA}_${transposeB}_${this.batchAEqualOne}_${this.batchBEqualOne}`;\n }\n getUserCode() {\n const userCode = `\n ${activationFnSnippet(this.activation, this.hasPreluActivationWeights)}\n ${matMulReadWriteFnSource(this.addBias, this.activation, this.batchAEqualOne, this.batchBEqualOne, this.transposeA, this.transposeB)}\n ${makeMatMulReduceSource()}\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/matmul_small_output_size_webgpu.js\nfunction makeMatMulSmallOutputSizeSource(workGroupSize) {\n const tileAOuter = workGroupSize[1];\n const tileBOuter = workGroupSize[0];\n const tileInner = tileAOuter > tileBOuter ? tileAOuter : tileBOuter;\n return `\n var mm_Asub : array, ${tileAOuter}>;\n var mm_Bsub : array, ${tileInner}>;\n\n // If the output size is small for matrix multiplication, avoid to use vec4\n // and handle some elements per thread to optimally utilize the ALU.\n // Read data from global memory to registers firstly, then store them into\n // shared memory, so it is instruction-Level parallelism for arithmetic\n // operations and others handle IO operations between barrier api, makes ALU\n // and load/store units work simultaneously, could improves the performance.\n ${getMainHeaderString()} {\n let tileRow = i32(localId.y);\n let tileCol = i32(localId.x);\n let globalRow = i32(globalId.y);\n let globalCol = i32(globalId.x);\n let batch = i32(globalId.z);\n\n // uniforms.dimInner should be greater than 0.\n let numTiles = (uniforms.dimInner - 1) / ${tileInner} + 1;\n var acc = 0.0;\n\n var globalColA = tileCol;\n var globalRowB = 0;\n var regA = mm_readA(batch, globalRow, globalColA);\n var regB0 = mm_readB(batch, globalRowB + 2 * tileRow, globalCol);\n var regB1 = mm_readB(batch, globalRowB + 2 * tileRow + 1, globalCol);\n globalColA = globalColA + ${tileInner};\n globalRowB = globalRowB + ${tileInner};\n\n for (var t = 0; t < numTiles; t = t + 1) {\n mm_Asub[tileRow][tileCol] = regA;\n mm_Bsub[2 * tileRow][tileCol] = regB0;\n mm_Bsub[2 * tileRow + 1][tileCol] = regB1;\n\n workgroupBarrier();\n\n regA = mm_readA(batch, globalRow, globalColA);\n regB0 = mm_readB(batch, globalRowB + 2 * tileRow, globalCol);\n regB1 = mm_readB(batch, globalRowB + 2 * tileRow + 1, globalCol);\n globalColA = globalColA + ${tileInner};\n globalRowB = globalRowB + ${tileInner};\n\n for (var k = 0; k < ${tileInner}; k = k + 1) {\n acc = acc + mm_Asub[tileRow][k] * mm_Bsub[k][tileCol];\n }\n workgroupBarrier();\n }\n\n mm_write(batch, globalRow, globalCol, acc);\n }\n `;\n}\nvar MatMulSmallOutputSizeProgram = class {\n constructor(aShape, bShape, outputShape, transposeA = false, transposeB = false, bias = null, activation2 = null, preluActivationWeights = null) {\n this.variableNames = [\"A\", \"B\"];\n this.uniforms = `dimAOuter : i32, dimBOuter : i32, dimInner : i32,`;\n this.workGroupSize = [16, 8, 1];\n this.outputShape = outputShape;\n this.dispatchLayout = { x: [2], y: [1], z: [0] };\n this.dispatch = [\n Math.ceil(outputShape[2] / this.workGroupSize[0]),\n Math.ceil(outputShape[1] / this.workGroupSize[1]),\n outputShape[0]\n ];\n const addBias = bias != null;\n if (addBias) {\n this.variableNames.push(\"bias\");\n }\n const hasPreluActivationWeights = preluActivationWeights != null;\n if (hasPreluActivationWeights) {\n this.variableNames.push(\"preluActivationWeights\");\n }\n this.transposeA = transposeA;\n this.transposeB = transposeB;\n this.addBias = addBias;\n this.activation = activation2;\n this.hasPreluActivationWeights = hasPreluActivationWeights;\n this.batchAEqualOne = aShape[0] === 1;\n this.batchBEqualOne = bShape[0] === 1;\n this.shaderKey = `matMulSmallOutputSize_${this.activation}_${transposeA}_${transposeB}_${this.batchAEqualOne}_${this.batchBEqualOne}`;\n }\n getUserCode() {\n const userCode = `\n ${activationFnSnippet(this.activation, this.hasPreluActivationWeights)}\n ${matMulReadWriteFnSource(this.addBias, this.activation, this.batchAEqualOne, this.batchBEqualOne, this.transposeA, this.transposeB)}\n ${makeMatMulSmallOutputSizeSource(this.workGroupSize)}\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/matmul_splitK_webgpu.js\nvar MatMulSplitKProgram = class {\n constructor(outputShape, dimInner, batchAEqualOne, batchBEqualOne, transposeA = false, transposeB = false) {\n this.variableNames = [\"A\", \"B\"];\n this.uniforms = `dimAOuter : i32, dimBOuter : i32, dimInner : i32,`;\n this.workGroupSize = [8, 8, 1];\n this.atomic = true;\n this.isVec4 = false;\n this.splitedDimInner = 128;\n util_exports.assert(outputShape[0] === 1, () => \"MatMulSplitKProgram only supports batch = 1.\");\n this.outputShape = outputShape;\n this.dispatchLayout = { x: [2], y: [1], z: [0, 3] };\n this.isVec4 = (transposeA && this.outputShape[1] % 4 === 0 || !transposeA && dimInner % 4 === 0) && this.outputShape[2] % 4 === 0;\n this.elementsPerThread = [4, 4, this.splitedDimInner];\n if (!this.isVec4) {\n if (this.outputShape[1] < 16) {\n this.elementsPerThread[1] = 1;\n }\n if (this.outputShape[2] < 16) {\n this.elementsPerThread[0] = 1;\n }\n }\n this.dispatch = computeDispatch(this.dispatchLayout, [\n this.outputShape[0],\n this.outputShape[1],\n this.outputShape[2],\n dimInner\n ], this.workGroupSize, this.elementsPerThread);\n this.transposeA = transposeA;\n this.transposeB = transposeB;\n this.batchAEqualOne = batchAEqualOne;\n this.batchBEqualOne = batchBEqualOne;\n this.shaderKey = `matMulSplitK_${transposeA}_${transposeB}_${batchAEqualOne}_${batchBEqualOne}_${this.elementsPerThread}_${this.isVec4}`;\n }\n getUserCode() {\n const atomicAddSnippet = (component2) => {\n return `\n for (var i = 0; i < ${component2}; i = i + 1)\n {\n var oldValue = atomicLoad(&(result[flatIndex + i]));\n var exchanged = false;\n for (; !exchanged;) {\n let newValueF32 = bitcast(oldValue) + ${component2 > 1 ? \"value[i]\" : \"value\"};\n let newValue = bitcast(newValueF32);\n let res = atomicCompareExchangeWeak(&(result[flatIndex + i]), oldValue, newValue);\n oldValue = res.old_value;\n exchanged = res.exchanged;\n }\n }\n `;\n };\n const component = this.isVec4 ? 4 : 1;\n const userCode = `\n ${matMulReadFnSource(this.batchAEqualOne, this.batchBEqualOne, false, this.transposeB, false, false, false, component)}\n fn mm_write(batch: i32, row : i32, colIn : i32, value : ${typeSnippet(component)}) {\n let col = colIn * ${component};\n if (row < uniforms.dimAOuter && col < uniforms.dimBOuter) {\n let coords = vec3(batch, row, col);\n let flatIndex = getOutputIndexFromCoords(coords);\n // The problem is that we should initialize output to zero before using.\n // Otherwise, the original value will be added to the result.\n ${atomicAddSnippet(component)}\n }\n }\n ${this.isVec4 ? makeMatMulPackedVec4Source(this.elementsPerThread, this.workGroupSize, this.transposeA, 32, true, this.splitedDimInner) : makeMatMulPackedSource(this.elementsPerThread, this.workGroupSize, this.transposeA, 32, true, this.splitedDimInner)}\n `;\n return userCode;\n }\n};\nvar BiasActivationProgram = class {\n constructor(outputShape, bias = null, activation2 = null, preluActivationWeights = null) {\n this.uniforms = \"\";\n this.variableNames = [\"x\"];\n this.workGroupSize = [64, 1, 1];\n this.size = true;\n this.outputShape = outputShape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.addBias = bias != null;\n this.hasPreluActivationWeights = preluActivationWeights != null;\n this.activation = activation2;\n if (this.addBias) {\n this.variableNames.push(\"bias\");\n }\n if (this.hasPreluActivationWeights) {\n this.variableNames.push(\"preluActivationWeights\");\n }\n this.shaderKey = `biasActivation_${activation2}`;\n }\n getUserCode() {\n return `\n ${activationFnSnippet(this.activation, this.hasPreluActivationWeights)}\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let coords = getCoordsFromIndex(index);\n var value = getXByOutputIndex(index);\n ${biasActivationSnippet(this.addBias, this.activation)}\n setOutputAtIndex(index, value);\n }\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/fill_webgpu.js\nvar FillProgram2 = class {\n constructor(shape) {\n this.variableNames = [];\n this.outputShape = [];\n this.uniforms = \"value : f32,\";\n this.workGroupSize = [64, 1, 1];\n this.size = true;\n this.outputShape = shape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.shaderKey = \"fill\";\n }\n getUserCode() {\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n setOutputAtIndex(index, uniforms.value);\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Fill.js\nfunction fill5(args) {\n const { backend: backend2, attrs } = args;\n const { shape, value } = attrs;\n let { dtype } = attrs;\n dtype = dtype || util_exports.inferDtype(value);\n if (dtype === \"string\") {\n const values = util_exports.getArrayFromDType(dtype, util_exports.sizeFromShape(shape));\n values.fill(value);\n return backend2.makeTensorInfo(shape, dtype, values);\n } else {\n const program = new FillProgram2(shape);\n const uniformData = [{ type: \"float32\", data: [value] }];\n return backend2.runWebGPUProgram(program, [], dtype, uniformData);\n }\n}\nvar fillConfig4 = {\n kernelName: Fill,\n backendName: \"webgpu\",\n kernelFunc: fill5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Reshape.js\nfunction reshape6(args) {\n const { inputs, attrs } = args;\n const { x } = inputs;\n const { shape } = attrs;\n const xSize = util_exports.sizeFromShape(x.shape);\n const $shape = util_exports.inferFromImplicitShape(shape, xSize);\n const $xSize = util_exports.sizeFromShape($shape);\n util_exports.assert(xSize === $xSize, () => `The new shape (${$shape}) has ${$xSize} elements and the old shape (${x.shape}) has ${xSize} elements. The new shape and old shape must have the same number of elements.`);\n args.backend.incRef(x.dataId);\n return { dataId: x.dataId, shape: $shape, dtype: x.dtype };\n}\nvar reshapeConfig4 = {\n kernelName: Reshape,\n backendName: \"webgpu\",\n kernelFunc: reshape6\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/BatchMatMul_impl.js\nfunction batchMatMulImpl2({ a, b, transposeA, transposeB, backend: backend2, bias = null, preluActivationWeights = null, leakyreluAlpha = 0, activation: activation2 = null }) {\n const aRank = a.shape.length;\n const bRank = b.shape.length;\n const innerShapeA = transposeA ? a.shape[aRank - 2] : a.shape[aRank - 1];\n const innerShapeB = transposeB ? b.shape[bRank - 1] : b.shape[bRank - 2];\n const outerShapeA = transposeA ? a.shape[aRank - 1] : a.shape[aRank - 2];\n const outerShapeB = transposeB ? b.shape[bRank - 2] : b.shape[bRank - 1];\n const outerDimsA = a.shape.slice(0, -2);\n const outerDimsB = b.shape.slice(0, -2);\n const batchDimA = util_exports.sizeFromShape(outerDimsA);\n const batchDimB = util_exports.sizeFromShape(outerDimsB);\n const outShapeOuterDims = broadcast_util_exports.assertAndGetBroadcastShape(a.shape.slice(0, -2), b.shape.slice(0, -2));\n const outShape = outShapeOuterDims.concat([outerShapeA, outerShapeB]);\n util_exports.assert(innerShapeA === innerShapeB, () => `Error in matMul: inner shapes (${innerShapeA}) and (${innerShapeB}) of Tensors with shapes ${a.shape} and ${b.shape} and transposeA=${transposeA} and transposeB=${transposeB} must match.`);\n const a3dShape = transposeA ? [batchDimA, innerShapeA, outerShapeA] : [batchDimA, outerShapeA, innerShapeA];\n const b3dShape = transposeB ? [batchDimB, outerShapeB, innerShapeB] : [batchDimB, innerShapeB, outerShapeB];\n const a3d = reshape6({ inputs: { x: a }, backend: backend2, attrs: { shape: a3dShape } });\n const b3d = reshape6({ inputs: { x: b }, backend: backend2, attrs: { shape: b3dShape } });\n const intermediates = [a3d, b3d];\n const batchDim = Math.max(batchDimA, batchDimB);\n const batchAEqualOne = batchDimA === 1;\n const batchBEqualOne = batchDimB === 1;\n const inputs = [a3d, b3d];\n const dimensions = [\n { type: \"int32\", data: [outerShapeA] },\n { type: \"int32\", data: [outerShapeB] },\n { type: \"int32\", data: [innerShapeA] }\n ];\n let program;\n let out;\n const outputShape = [batchDim, outerShapeA, outerShapeB];\n let matmulProgramType = env().get(\"WEBGPU_MATMUL_PROGRAM_TYPE\");\n if (matmulProgramType < 0) {\n if (outerShapeA * outerShapeB <= 128) {\n matmulProgramType = MatMulProgramType.MatMulReduceProgram;\n } else if (batchDim === 1 && outerShapeA <= 128 && outerShapeB <= 48 && innerShapeB >= 2e3) {\n matmulProgramType = MatMulProgramType.MatMulSplitKProgram;\n } else if (outerShapeA <= 16 && (outerShapeB <= 512 || innerShapeB >= 2 * outerShapeB) || outerShapeB <= 16 && (outerShapeA <= 512 || innerShapeA >= 2 * outerShapeA)) {\n matmulProgramType = MatMulProgramType.MatMulSmallOutputSizeProgram;\n } else {\n matmulProgramType = MatMulProgramType.MatMulPackedProgram;\n }\n }\n switch (matmulProgramType) {\n case MatMulProgramType.MatMulReduceProgram:\n program = new MatMulReduceProgram(outputShape, batchAEqualOne, batchBEqualOne, transposeA, transposeB, bias, activation2, preluActivationWeights);\n break;\n case MatMulProgramType.MatMulSplitKProgram: {\n out = fill5({ backend: backend2, attrs: { shape: outputShape, value: 0, dtype: a.dtype } });\n program = new MatMulSplitKProgram(outputShape, innerShapeB, batchAEqualOne, batchBEqualOne, transposeA, transposeB);\n if (bias || activation2) {\n out = backend2.runWebGPUProgram(program, inputs, a.dtype, dimensions, out);\n const biasActivationProgram = new BiasActivationProgram(out.shape, bias, activation2, preluActivationWeights);\n let uniformData = null;\n const activationInputs = [out];\n if (bias) {\n activationInputs.push(bias);\n }\n if (preluActivationWeights) {\n activationInputs.push(preluActivationWeights);\n }\n if (activation2 === \"leakyrelu\") {\n uniformData = [{ type: \"float32\", data: [leakyreluAlpha] }];\n biasActivationProgram.uniforms += \" alpha : f32,\";\n }\n const outActivated = backend2.runWebGPUProgram(biasActivationProgram, activationInputs, out.dtype, uniformData);\n intermediates.push(out);\n const outReshaped2 = reshape6({ inputs: { x: outActivated }, backend: backend2, attrs: { shape: outShape } });\n intermediates.push(outActivated);\n for (const i of intermediates) {\n backend2.disposeData(i.dataId);\n }\n return outReshaped2;\n }\n break;\n }\n case MatMulProgramType.MatMulSmallOutputSizeProgram:\n program = new MatMulSmallOutputSizeProgram(a3dShape, b3dShape, outputShape, transposeA, transposeB, bias, activation2, preluActivationWeights);\n break;\n case MatMulProgramType.MatMulPackedProgram:\n program = new MatMulPackedProgram2(a3dShape, outputShape, batchAEqualOne, batchBEqualOne, transposeA, transposeB, bias, activation2, preluActivationWeights);\n break;\n default:\n throw new Error(`Unsupported MatMulProgramType ${matmulProgramType}.`);\n }\n if (bias) {\n inputs.push(bias);\n }\n if (preluActivationWeights) {\n inputs.push(preluActivationWeights);\n }\n if (activation2 === \"leakyrelu\") {\n dimensions.push({ type: \"float32\", data: [leakyreluAlpha] });\n program.uniforms += \" alpha : f32,\";\n }\n out = backend2.runWebGPUProgram(program, inputs, a.dtype, dimensions, out);\n const outReshaped = reshape6({ inputs: { x: out }, backend: backend2, attrs: { shape: outShape } });\n intermediates.push(out);\n for (const i of intermediates) {\n backend2.disposeData(i.dataId);\n }\n return outReshaped;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/_FusedMatMul.js\nfunction _fusedMatMul3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { a, b, bias, preluActivationWeights } = inputs;\n const { transposeA, transposeB, activation: activation2, leakyreluAlpha } = attrs;\n return batchMatMulImpl2({\n a,\n b,\n transposeA,\n transposeB,\n backend: backend2,\n bias,\n preluActivationWeights,\n leakyreluAlpha,\n activation: activation2\n });\n}\nvar _fusedMatMulConfig4 = {\n kernelName: _FusedMatMul,\n backendName: \"webgpu\",\n kernelFunc: _fusedMatMul3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/binary_op_complex_webgpu.js\nvar BinaryOpComplexProgram2 = class {\n constructor(op2, aShape, bShape) {\n this.variableNames = [\"AReal\", \"AImag\", \"BReal\", \"BImag\"];\n this.workGroupSize = [128, 1, 1];\n this.size = true;\n this.outputShape = backend_util_exports.assertAndGetBroadcastShape(aShape, bShape);\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.shaderKey = `binaryOpComplex_${op2}`;\n this.op = op2;\n }\n getUserCode() {\n const opStr = getBinaryOpString(this.op, false);\n const userCode = `\n fn binaryOpComplex(\n areal : f32, aimag : f32, breal : f32, bimag : f32) -> f32 {\n ${opStr}\n }\n\n ${getMainHeaderString(\"index\")} {\n if(index < uniforms.size) {\n let areal = getARealByOutputIndex(index);\n let aimag = getAImagByOutputIndex(index);\n let breal = getBRealByOutputIndex(index);\n let bimag = getBImagByOutputIndex(index);\n setOutputAtIndex(index, binaryOpComplex(areal, aimag, breal, bimag));\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/binary_op_webgpu.js\nvar BinaryOpProgram2 = class {\n constructor(op2, aShape, bShape) {\n this.size = true;\n this.variableNames = [\"A\", \"B\"];\n this.outputShape = backend_util_exports.assertAndGetBroadcastShape(aShape, bShape);\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.op = op2;\n this.useSharedMemoryWithA = aShape.length === 1 && bShape.length > 1 && aShape[0] < 1024;\n this.useSharedMemoryWithB = bShape.length === 1 && aShape.length > 1 && bShape[0] < 1024;\n if (this.useSharedMemoryWithA || this.useSharedMemoryWithB) {\n this.isVec4 = false;\n this.lastDimensionSize = this.useSharedMemoryWithB ? bShape[0] : aShape[0];\n this.shaderKey = `binary_${this.type}_${op2}_${this.lastDimensionSize}_${this.useSharedMemoryWithB}`;\n this.type = \"shared\";\n this.workGroupSize = [256, 1, 1];\n if (this.lastDimensionSize < 256) {\n this.workPerThread = 1;\n } else if (this.lastDimensionSize < 512) {\n this.workPerThread = 2;\n } else {\n this.workPerThread = 4;\n }\n } else {\n if (util_exports.arraysEqual(aShape, bShape) && util_exports.sizeFromShape(aShape) % 4 === 0) {\n this.isVec4 = true;\n this.type = \"vec4\";\n this.workPerThread = 4;\n } else {\n this.isVec4 = false;\n this.type = \"plain\";\n this.workPerThread = 1;\n }\n this.shaderKey = `binary_${this.type}_${op2}`;\n this.workGroupSize = [128, 1, 1];\n }\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize, [this.workPerThread, 1, 1]);\n }\n getUserCode() {\n let userCode;\n if (this.type === \"shared\") {\n const sharedIndexSnippet = this.lastDimensionSize > 1 ? `coords[${this.outputShape.length - 1}]` : \"0\";\n const accessDataSnippet = this.useSharedMemoryWithB ? `let a = getAByOutputCoords(coords);\n let b = sharedBuf[${sharedIndexSnippet}];` : `let a = sharedBuf[${sharedIndexSnippet}];\n let b = getBByOutputCoords(coords);`;\n const opStr = getBinaryOpString(this.op, this.isVec4);\n userCode = `\n fn binaryOperation(a : f32, b : f32) -> f32 {\n ${opStr}\n }\n var sharedBuf : array;\n ${getMainHeaderString(\"index\")} {\n // Fill in the shared memory buffer. Here we need a loop to make sure\n // that all data in A|B are uploaded when |sharedMemorySize| is larger\n // than work group size.\n for(var localIndex = i32(localId.x); localIndex < ${this.lastDimensionSize}; localIndex = localIndex + ${this.workGroupSize[0]}) {\n sharedBuf[localIndex] = f32(${this.useSharedMemoryWithB ? \"B\" : \"A\"}[localIndex]);\n }\n workgroupBarrier();\n\n for(var i = 0; i < ${this.workPerThread}; i = i + 1) {\n let flatIndex = index * ${this.workPerThread} + i;\n if(flatIndex < uniforms.size) {\n let coords = getCoordsFromIndex(flatIndex);\n\n ${accessDataSnippet}\n setOutputAtIndex(flatIndex, binaryOperation(a, b));\n }\n }\n }\n `;\n } else {\n const dType = this.type === \"vec4\" ? \"vec4\" : \"f32\";\n const opStr = getBinaryOpString(this.op, this.isVec4);\n userCode = `\n fn binaryOperation(a : ${dType}, b : ${dType}) -> ${dType} {\n ${opStr}\n }\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let a = getAByOutputIndex(index);\n let b = getBByOutputIndex(index);\n setOutputAtIndex(index, binaryOperation(a, b));\n }\n }\n `;\n }\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Identity.js\nfunction identity5(args) {\n const { inputs } = args;\n const { x } = inputs;\n args.backend.incRef(x.dataId);\n return { dataId: x.dataId, shape: x.shape, dtype: x.dtype };\n}\nvar identityConfig4 = {\n kernelName: Identity,\n backendName: \"webgpu\",\n kernelFunc: identity5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Complex.js\nfunction complex4(args) {\n const { inputs, backend: backend2 } = args;\n const { real: real5, imag: imag5 } = inputs;\n const complexInfo = backend2.makeTensorInfo(real5.shape, \"complex64\");\n const complex5 = backend2.tensorMap.get(complexInfo.dataId);\n const realTensorInfo = identity5({ inputs: { x: real5 }, backend: backend2 });\n const imagTensorInfo = identity5({ inputs: { x: imag5 }, backend: backend2 });\n complex5.complexTensorInfos = { real: realTensorInfo, imag: imagTensorInfo };\n return complexInfo;\n}\nvar complexConfig3 = {\n kernelName: Complex,\n backendName: \"webgpu\",\n kernelFunc: complex4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/unary_op_webgpu.js\nvar UnaryOpProgram2 = class {\n constructor(outputShape, op2) {\n this.variableNames = [\"A\"];\n this.size = true;\n const workGroupSizeX = 128;\n this.workGroupSize = [workGroupSizeX, 1, 1];\n this.outputShape = outputShape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.op = op2;\n this.shaderKey = `unary_${op2}`;\n }\n getUserCode() {\n return `\n fn unaryOperation(a : f32) -> f32 {\n ${getUnaryOpString(this.op, false)}\n }\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let a = getAByOutputIndex(index);\n setOutputAtIndex(index, unaryOperation(a));\n }\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernel_utils/kernel_funcs_utils.js\nfunction unaryKernelFunc3({ opType, cpuKernelImpl, dtype }) {\n return ({ inputs, backend: backend2 }) => {\n const { x } = inputs;\n const webgpuBackend = backend2;\n const $dtype = dtype || x.dtype;\n if (webgpuBackend.shouldExecuteOnCPU([x]) && cpuKernelImpl != null) {\n const xData = webgpuBackend.tensorMap.get(x.dataId);\n const outValues = cpuKernelImpl(xData.values, $dtype);\n return webgpuBackend.makeTensorInfo(x.shape, $dtype, outValues);\n }\n const program = new UnaryOpProgram2(x.shape, opType);\n return webgpuBackend.runWebGPUProgram(program, [x], $dtype);\n };\n}\nfunction binaryKernelFunc3({ opType, cpuKernelImpl, supportsComplex = false, dtype }) {\n return ({ inputs, backend: backend2 }) => {\n const { a, b } = inputs;\n const webgpuBackend = backend2;\n if (supportsComplex && a.dtype === \"complex64\") {\n const aData = webgpuBackend.tensorMap.get(a.dataId);\n const bData = webgpuBackend.tensorMap.get(b.dataId);\n let real5, imag5;\n if (opType !== BinaryOpType.MUL) {\n [real5, imag5] = [\n [aData.complexTensorInfos.real, bData.complexTensorInfos.real],\n [aData.complexTensorInfos.imag, bData.complexTensorInfos.imag]\n ].map((complexParts) => {\n const [aPart, bPart] = complexParts;\n const aHandle = {\n dataId: aPart.dataId,\n dtype: aPart.dtype,\n shape: a.shape\n };\n const bHandle = {\n dataId: bPart.dataId,\n dtype: bPart.dtype,\n shape: b.shape\n };\n const program2 = new BinaryOpProgram2(opType, a.shape, b.shape);\n return webgpuBackend.runWebGPUProgram(program2, [aHandle, bHandle], upcastType(aPart.dtype, bPart.dtype));\n });\n } else {\n const realProgram = new BinaryOpComplexProgram2(BinaryOpType.COMPLEX_MULTIPLY_REAL, a.shape, b.shape);\n const imagProgram = new BinaryOpComplexProgram2(BinaryOpType.COMPLEX_MULTIPLY_IMAG, a.shape, b.shape);\n const inputs2 = [\n {\n dataId: aData.complexTensorInfos.real.dataId,\n dtype: aData.complexTensorInfos.real.dtype,\n shape: a.shape\n },\n {\n dataId: aData.complexTensorInfos.imag.dataId,\n dtype: aData.complexTensorInfos.imag.dtype,\n shape: a.shape\n },\n {\n dataId: bData.complexTensorInfos.real.dataId,\n dtype: bData.complexTensorInfos.real.dtype,\n shape: b.shape\n },\n {\n dataId: bData.complexTensorInfos.imag.dataId,\n dtype: bData.complexTensorInfos.imag.dtype,\n shape: b.shape\n }\n ];\n real5 = webgpuBackend.runWebGPUProgram(realProgram, inputs2, \"float32\");\n imag5 = webgpuBackend.runWebGPUProgram(imagProgram, inputs2, \"float32\");\n }\n const complexOutput = complex4({ inputs: { real: real5, imag: imag5 }, backend: webgpuBackend });\n webgpuBackend.disposeData(real5.dataId);\n webgpuBackend.disposeData(imag5.dataId);\n return complexOutput;\n }\n const $dtype = dtype || upcastType(a.dtype, b.dtype);\n if ((a.dtype === \"string\" || b.dtype === \"string\" || webgpuBackend.shouldExecuteOnCPU([a, b])) && cpuKernelImpl != null) {\n const aData = webgpuBackend.tensorMap.get(a.dataId).values;\n const bData = webgpuBackend.tensorMap.get(b.dataId).values;\n const decodedAVals = a.dtype === \"string\" ? backend_util_exports.fromUint8ToStringArray(aData) : aData;\n const decodedBVals = a.dtype === \"string\" ? backend_util_exports.fromUint8ToStringArray(bData) : bData;\n const [outValues, outShape] = cpuKernelImpl(a.shape, b.shape, decodedAVals, decodedBVals, $dtype);\n return webgpuBackend.makeTensorInfo(outShape, $dtype, outValues);\n }\n const program = new BinaryOpProgram2(opType, a.shape, b.shape);\n return webgpuBackend.runWebGPUProgram(program, [a, b], $dtype);\n };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernel_utils/shared.js\nvar { addImpl: addImplCPU2, castImpl: castImplCPU2, ceilImpl: ceilImplCPU2, concatImpl: concatImplCPU2, equalImpl: equalImplCPU2, expImpl: expImplCPU2, expm1Impl: expm1ImplCPU2, floorImpl: floorImplCPU2, gatherNdImpl: gatherNdImplCPU2, gatherV2Impl: gatherV2ImplCPU2, greaterEqualImpl: greaterEqualImplCPU2, greaterImpl: greaterImplCPU2, lessEqualImpl: lessEqualImplCPU2, lessImpl: lessImplCPU2, logImpl: logImplCPU2, maxImpl: maxImplCPU2, maximumImpl: maximumImplCPU2, minimumImpl: minimumImplCPU2, multiplyImpl: multiplyImplCPU2, negImpl: negImplCPU2, notEqualImpl: notEqualImplCPU2, prodImpl: prodImplCPU2, rangeImpl: rangeImplCPU2, rsqrtImpl: rsqrtImplCPU2, scatterImpl: scatterImplCPU2, simpleAbsImpl: simpleAbsImplCPU2, sliceImpl: sliceImplCPU2, stridedSliceImpl: stridedSliceImplCPU2, stringNGramsImpl: stringNGramsImplCPU2, subImpl: subImplCPU2, tileImpl: tileImplCPU2, topKImpl: topKImplCPU2, transposeImpl: transposeImplCPU2, uniqueImpl: uniqueImplCPU2 } = shared_exports;\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Abs.js\nvar abs4 = unaryKernelFunc3({ opType: UnaryOpType.ABS, cpuKernelImpl: simpleAbsImplCPU2 });\nvar absConfig4 = {\n kernelName: Abs,\n backendName: \"webgpu\",\n kernelFunc: abs4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Add.js\nvar addKernelFunc2 = binaryKernelFunc3({ opType: BinaryOpType.ADD, cpuKernelImpl: addImplCPU2, supportsComplex: true });\nvar addConfig4 = {\n kernelName: Add,\n backendName: \"webgpu\",\n kernelFunc: addKernelFunc2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/addn_packed_webgpu.js\nvar AddNPackedProgram2 = class {\n constructor(shapes) {\n this.workPerThread = 4;\n this.workGroupSize = [64, 1, 1];\n this.size = true;\n this.outputShape = shapes[0];\n this.variableNames = shapes.map((_, i) => `T${i}`);\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize, [this.workPerThread, 1, 1]);\n this.shaderKey = \"addN\";\n }\n getUserCode() {\n const snippets = [];\n this.variableNames.forEach((variable2) => {\n snippets.push(`let v${variable2} = get${variable2}ByOutputCoords(coords);`);\n });\n const operation = this.variableNames.map((variable2) => {\n return `v${variable2}`;\n }).join(\" + \");\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n for (var i = 0; i < ${this.workPerThread}; i = i + 1) {\n let flatIndex = index * ${this.workPerThread} + i;\n if (flatIndex < uniforms.size) {\n let coords = getCoordsFromIndex(flatIndex);\n ${snippets.join(\"\\n \")}\n setOutputAtIndex(flatIndex, ${operation});\n }\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/AddN.js\nfunction addN4(args) {\n const { inputs, backend: backend2 } = args;\n const tensors = inputs;\n if (tensors.length === 1) {\n return identity5({ inputs: { x: tensors[0] }, backend: backend2 });\n }\n const dtype = tensors.map((t) => t.dtype).reduce((d1, d2) => upcastType(d1, d2));\n const shapes = tensors.map((t) => t.shape);\n const program = new AddNPackedProgram2(shapes);\n return backend2.runWebGPUProgram(program, tensors, dtype);\n}\nvar addNConfig4 = {\n kernelName: AddN,\n backendName: \"webgpu\",\n kernelFunc: addN4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/argminmax_webgpu.js\nvar ArgMinMaxProgram2 = class {\n constructor(inputShape, axis, reduceType) {\n this.workGroupSize = [64, 1, 1];\n this.variableNames = [\"x\"];\n this.uniforms = \"infinityValue : f32,\";\n this.size = true;\n const axes = [axis];\n this.op = reduceType === \"min\" ? \"<\" : \">\";\n const [outputShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes(inputShape, axes);\n this.outputShape = outputShape.length === 0 ? [1] : outputShape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n if (util_exports.sizeFromShape(reduceShape) < 32 || util_exports.sizeFromShape(outputShape) > 1e3) {\n this.type = \"plain\";\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n } else {\n this.type = \"shared\";\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, [1, 1, 1]);\n }\n this.inputShape = inputShape;\n this.shaderKey = `argMinMax_${this.op}_${this.type}`;\n }\n getUserCode() {\n const getInputShapeLastDim = () => {\n if (this.inputShape.length === 1) {\n return \"uniforms.xShape\";\n } else {\n return `uniforms.xShape.${getCoordsXYZ(this.inputShape.length - 1)}`;\n }\n };\n const splitOutputCoords = () => {\n let snippet = \"\";\n if (this.outputShape.length === 1) {\n if (this.inputShape.length !== 1) {\n snippet += \"outputCoords,\";\n }\n } else {\n for (let i = 0; i < this.outputShape.length; i++) {\n snippet += `outputCoords.${getCoordsXYZ(i)},`;\n }\n }\n return snippet;\n };\n if (this.type === \"shared\") {\n const sharedMemorySnippet = `\n var xBestIndices : array;\n var xBestValues : array;\n `;\n const userCode = `\n fn DIV_CEIL(a : u32, b : u32) -> u32 {\n return ((a - 1u) / b + 1u);\n }\n\n ${sharedMemorySnippet}\n\n ${getMainHeaderString(\"index\")} {\n let outputIndex = index / i32(workGroupSizeX);\n let reduceLength = ${getInputShapeLastDim()};\n\n var bestIndex = i32(localId.x);\n var bestValue = uniforms.infinityValue;\n let outputCoords = getCoordsFromIndex(outputIndex);\n for (var k = i32(localId.x); k < reduceLength && outputIndex < uniforms.size;\n k = k + i32(workGroupSizeX)) {\n let candidate = getX(${splitOutputCoords()} k);\n if (!isnan(candidate) && candidate ${this.op} bestValue) {\n bestValue = candidate;\n bestIndex = k;\n }\n }\n xBestValues[localId.x] = bestValue;\n xBestIndices[localId.x] = bestIndex;\n workgroupBarrier();\n\n var reduceSize = min(u32(reduceLength), workGroupSizeX);\n for (var currentSize = reduceSize / 2u; reduceSize > 1u;\n currentSize = reduceSize / 2u) {\n let interval = DIV_CEIL(reduceSize, 2u);\n if (localId.x < currentSize) {\n let candidate = xBestValues[localId.x + interval];\n if (candidate ${this.op} bestValue) {\n bestValue = candidate;\n xBestValues[localId.x] = bestValue;\n xBestIndices[localId.x] = xBestIndices[localId.x + interval];\n }\n }\n reduceSize = interval;\n workgroupBarrier();\n }\n\n if (localId.x == 0u && outputIndex < uniforms.size) {\n setOutputAtIndexI32(outputIndex, xBestIndices[localId.x]);\n }\n }\n `;\n return userCode;\n } else {\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let outputCoords = getCoordsFromIndex(index);\n var bestIndex = 0;\n var bestValue = getX(${splitOutputCoords()} 0);\n let reduceLength = ${getInputShapeLastDim()};\n for (var i = 1; i < reduceLength; i++) {\n let candidate = getX(${splitOutputCoords()} i);\n if (candidate ${this.op} bestValue) {\n bestValue = candidate;\n bestIndex = i;\n }\n }\n setOutputAtIndexI32(index, bestIndex);\n }\n }\n `;\n return userCode;\n }\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/transpose_shared_webgpu.js\nvar TransposeSharedProgram = class {\n constructor(aShape, newDim) {\n this.variableNames = [\"A\"];\n this.workGroupSize = [16, 16, 1];\n const outputShape = new Array(aShape.length);\n for (let i = 0; i < outputShape.length; i++) {\n outputShape[i] = aShape[newDim[i]];\n }\n this.outputShape = outputShape;\n this.dispatchLayout = { x: [0], y: [1] };\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize, [1, 1, 1]);\n this.shaderKey = \"transposeShared\";\n }\n getUserCode() {\n const userCode = `\n const TILE_DIM = ${this.workGroupSize[0]};\n var tile : array, ${this.workGroupSize[0]}>;\n ${getWorkGroupSizeString()}\n fn _start(@builtin(local_invocation_id) localId : vec3,\n @builtin(workgroup_id) workgroupId : vec3) {\n var x = i32(workgroupId.x) * TILE_DIM + i32(localId.x);\n var y = i32(workgroupId.y) * TILE_DIM + i32(localId.y);\n let width = uniforms.outShape[0];\n let height = uniforms.outShape[1];\n if (x < width && y < height) {\n tile[localId.y][localId.x] = A[y * width + x];\n }\n workgroupBarrier();\n\n x = i32(workgroupId.y) * TILE_DIM + i32(localId.x);\n y = i32(workgroupId.x) * TILE_DIM + i32(localId.y);\n if (x < height && y < width) {\n setOutputAtIndex((y * height + x), tile[localId.x]\n [localId.y]);\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/transpose_webgpu.js\nvar TransposeProgram2 = class {\n constructor(aShape, newDim) {\n this.variableNames = [\"A\"];\n this.workPerThread = 4;\n this.workGroupSize = [64, 1, 1];\n this.size = true;\n const outputShape = new Array(aShape.length);\n for (let i = 0; i < outputShape.length; i++) {\n outputShape[i] = aShape[newDim[i]];\n }\n this.outputShape = outputShape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize, [this.workPerThread, 1, 1]);\n this.newDim = newDim;\n this.shaderKey = `transpose_${newDim}`;\n }\n getUserCode() {\n const dtype = getCoordsDataType2(this.outputShape.length);\n const switched = getSwitchedCoords2(this.newDim);\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n for(var i = 0; i < ${this.workPerThread}; i = i + 1) {\n let flatIndex = index * ${this.workPerThread} + i;\n if(flatIndex < uniforms.size) {\n let resRC = getCoordsFromIndex(flatIndex);\n setOutputAtIndex(flatIndex, A[getIndexFromCoords${this.outputShape.length}D(\n ${dtype}(${switched}), uniforms.aShape)]);\n }\n }\n }\n `;\n return userCode;\n }\n};\nfunction getSwitchedCoords2(newDim) {\n const rank = newDim.length;\n if (rank > 6) {\n throw Error(`Transpose for rank ${rank} is not yet supported`);\n }\n const switchedCoords = new Array(rank);\n for (let i = 0; i < newDim.length; i++) {\n switchedCoords[newDim[i]] = `resRC.${getCoordsXYZ(i)}`;\n }\n return switchedCoords.join();\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Transpose.js\nfunction transpose5(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { perm } = attrs;\n const webgpuBackend = backend2;\n const xRank = x.shape.length;\n const newShape = new Array(xRank);\n for (let i = 0; i < newShape.length; i++) {\n newShape[i] = x.shape[perm[i]];\n }\n if (backend2.shouldExecuteOnCPU([x])) {\n const xData = webgpuBackend.tensorMap.get(x.dataId);\n const values = xData.values;\n const outValues = transposeImplCPU2(values, x.shape, x.dtype, perm, newShape);\n return backend2.makeTensorInfo(newShape, x.dtype, outValues);\n }\n if (x.shape.length === 2 && util_exports.arraysEqual(perm, [1, 0])) {\n const program2 = new TransposeSharedProgram(x.shape, perm);\n return webgpuBackend.runWebGPUProgram(program2, [x], x.dtype);\n }\n const program = new TransposeProgram2(x.shape, perm);\n return webgpuBackend.runWebGPUProgram(program, [x], x.dtype);\n}\nvar transposeConfig4 = {\n kernelName: Transpose,\n backendName: \"webgpu\",\n kernelFunc: transpose5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/ArgMax.js\nfunction argMax4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis } = attrs;\n let axes = util_exports.parseAxisParam(axis, x.shape);\n const permutedAxes = backend_util_exports.getAxesPermutation(axes, x.shape.length);\n let $x = x;\n const intermediateTensorInfos = [];\n if (permutedAxes != null) {\n $x = transpose5({ inputs: { x }, backend: backend2, attrs: { perm: permutedAxes } });\n intermediateTensorInfos.push($x);\n axes = backend_util_exports.getInnerMostAxes(axes.length, $x.shape.length);\n }\n backend_util_exports.assertAxesAreInnerMostDims(\"argMax\", [axes[0]], $x.shape.length);\n const program = new ArgMinMaxProgram2($x.shape, axes[0], \"max\");\n const uniformData = [{ type: \"float32\", data: [Number.NEGATIVE_INFINITY] }];\n const out = backend2.runWebGPUProgram(program, [$x], \"int32\", uniformData);\n intermediateTensorInfos.forEach((t) => backend2.disposeData(t.dataId));\n return out;\n}\nvar argMaxConfig4 = {\n kernelName: ArgMax,\n backendName: \"webgpu\",\n kernelFunc: argMax4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/ArgMin.js\nfunction argMin4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis } = attrs;\n let axes = util_exports.parseAxisParam(axis, x.shape);\n const permutedAxes = backend_util_exports.getAxesPermutation(axes, x.shape.length);\n let $x = x;\n const intermediateTensorInfos = [];\n if (permutedAxes != null) {\n $x = transpose5({ inputs: { x }, backend: backend2, attrs: { perm: permutedAxes } });\n intermediateTensorInfos.push($x);\n axes = backend_util_exports.getInnerMostAxes(axes.length, $x.shape.length);\n }\n backend_util_exports.assertAxesAreInnerMostDims(\"argMin\", [axes[0]], $x.shape.length);\n const program = new ArgMinMaxProgram2($x.shape, axes[0], \"min\");\n const uniformData = [{ type: \"float32\", data: [Number.POSITIVE_INFINITY] }];\n const out = backend2.runWebGPUProgram(program, [$x], \"int32\", uniformData);\n intermediateTensorInfos.forEach((t) => backend2.disposeData(t.dataId));\n return out;\n}\nvar argMinConfig3 = {\n kernelName: ArgMin,\n backendName: \"webgpu\",\n kernelFunc: argMin4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Atan2.js\nvar atan24 = binaryKernelFunc3({ opType: BinaryOpType.ATAN2 });\nvar atan2Config3 = {\n kernelName: Atan2,\n backendName: \"webgpu\",\n kernelFunc: atan24\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/pool2d_webgpu.js\nvar Pool2DProgram2 = class {\n constructor(convInfo, poolType) {\n this.variableNames = [\"x\"];\n this.uniforms = `stride : vec2, pad : vec2, dilation : vec2, convDims : vec2, filterDims : vec2,`;\n this.workGroupSize = [128, 1, 1];\n this.size = true;\n this.outputShape = convInfo.outShape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.shaderKey = `pool2D_${poolType}`;\n this.poolType = poolType;\n }\n getUserCode() {\n let updateSnippet = `resultValue = max(value, resultValue);`;\n if (this.poolType === \"avg\") {\n updateSnippet = `resultValue = resultValue + value; count = count + 1.0;`;\n }\n let returnValue = `resultValue`;\n if (this.poolType === \"avg\") {\n returnValue = `resultValue / count`;\n }\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let coords = getCoordsFromIndex(index);\n let batch = coords[0];\n let xRCCorner = vec2(coords.yz) * uniforms.stride - uniforms.pad;\n let xRCorner = xRCCorner.x;\n let xCCorner = xRCCorner.y;\n\n var resultValue = ${this.poolType === \"avg\" ? \"0.0\" : \"-1.0 / pow(10.0, -20.0)\"};\n var count = 0.0;\n\n for (var wR = 0; wR < uniforms.filterDims.x; wR = wR + uniforms.dilation.x) {\n let xR = xRCorner + wR;\n\n if (xR < 0 || xR >= uniforms.convDims.x) {\n continue;\n }\n\n for (var wC = 0; wC < uniforms.filterDims.y; wC = wC + uniforms.dilation.y) {\n let xC = xCCorner + wC;\n if (xC < 0 || xC >= uniforms.convDims.y) {\n continue;\n }\n\n let value = getX(batch, xR, xC, coords[3]);\n ${updateSnippet}\n }\n }\n\n setOutputAtIndex(index, ${returnValue});\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/pool_filtersizeone_webgpu.js\nvar PoolWithFilterSizeEqualsOneProgram = class {\n constructor(convInfo) {\n this.variableNames = [\"x\"];\n this.uniforms = `stride : vec2,`;\n this.workGroupSize = [256, 1, 1];\n this.size = true;\n this.outputShape = convInfo.outShape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.shaderKey = \"poolWithFilterSizeEqualsOne\";\n }\n getUserCode() {\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let coords = getCoordsFromIndex(index);\n let batch = coords[0];\n let d = coords[3];\n\n let xRCCorner = coords.yz * uniforms.stride;\n let xRCorner = xRCCorner.x;\n let xCCorner = xRCCorner.y;\n\n let value = getX(batch, xRCorner, xCCorner, d);\n setOutputAtIndex(index, value);\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/reduce_webgpu.js\nvar ReduceProgram2 = class {\n constructor(reduceInfo, reduceType) {\n this.workGroupSize = [64, 1, 1];\n this.variableNames = [\"x\"];\n this.uniforms = \"reduceSize : i32,\";\n this.size = true;\n this.inputShape = [reduceInfo.batchSize, reduceInfo.inSize];\n const [outputShape] = backend_util_exports.computeOutAndReduceShapes(this.inputShape, [1]);\n this.outputShape = outputShape.length === 0 ? [1] : outputShape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, [1, 1, 1]);\n this.reduceType = reduceType;\n this.shaderKey = `reduce_${reduceType}`;\n }\n getUserCode() {\n let reduceOp = ``;\n let initValue = \"0.0\";\n if (this.reduceType === \"min\" || this.reduceType === \"max\") {\n reduceOp = `\n if (isnan(candidate)) {\n bestValue = uniforms.NAN;\n } else if (!isnan(bestValue) && candidate ${this.reduceType === \"min\" ? \"<\" : \">\"} bestValue)\n { bestValue = candidate; }`;\n initValue = \"f32(x[offset])\";\n } else if (this.reduceType === \"sum\" || this.reduceType === \"mean\") {\n reduceOp = \" bestValue = bestValue + candidate; \";\n } else if (this.reduceType === \"prod\") {\n reduceOp = \" bestValue = bestValue * candidate; \";\n initValue = \"1.0\";\n }\n const outputSnippet = this.reduceType === \"mean\" ? `setOutputAtIndex(outputIndex, bestValue / f32(uniforms.reduceSize));` : `setOutputAtIndex(outputIndex, bestValue);`;\n const sharedMemorySnippet = `\n var xBestValues : array;\n `;\n const userCode = `\n fn DIV_CEIL(a : u32, b : u32) -> u32 {\n return ((a - 1u) / b + 1u);\n }\n\n ${sharedMemorySnippet}\n fn getOffset(outputIndex : i32) -> i32 {\n let outputCoords = getCoordsFromIndex(outputIndex);\n let offset = ${this.outputShape.length === 1 ? \"outputCoords\" : \"outputCoords[0]\"} * uniforms.reduceSize;\n return offset;\n }\n ${getMainHeaderString(\"index\")} {\n let outputIndex = index / i32(workGroupSizeX);\n let offset = getOffset(outputIndex);\n var bestValue = ${initValue};\n let Length = uniforms.reduceSize;\n let WorkPerThread = DIV_CEIL(u32(Length), workGroupSizeX);\n for (var k = i32(localId.x); k < Length && outputIndex < uniforms.size;\n k = k + i32(workGroupSizeX)) {\n let candidate = f32(x[offset + k]);\n ${reduceOp}\n }\n xBestValues[localId.x] = bestValue;\n workgroupBarrier();\n\n var reduceSize = min(u32(Length), workGroupSizeX);\n for (var currentSize = reduceSize / 2u; reduceSize > 1u;\n currentSize = reduceSize / 2u) {\n let interval = DIV_CEIL(reduceSize, 2u);\n if (localId.x < currentSize) {\n let candidate = xBestValues[localId.x + interval];\n ${reduceOp}\n xBestValues[localId.x] = bestValue;\n }\n reduceSize = interval;\n workgroupBarrier();\n }\n\n if (localId.x == 0u && outputIndex < uniforms.size) {\n ${outputSnippet}\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernel_utils/reduce.js\nfunction reduce2(x, axis, keepDims, reduceType, backend2) {\n const xRank = x.shape.length;\n const toDispose = [];\n const origAxes = util_exports.parseAxisParam(axis, x.shape);\n let axes = origAxes;\n const permutedAxes = backend_util_exports.getAxesPermutation(axes, xRank);\n let input2 = x;\n if (permutedAxes != null) {\n input2 = transpose5({ inputs: { x }, attrs: { perm: permutedAxes }, backend: backend2 });\n axes = backend_util_exports.getInnerMostAxes(axes.length, xRank);\n toDispose.push(input2);\n }\n backend_util_exports.assertAxesAreInnerMostDims(reduceType, axes, xRank);\n const [reduceOutShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes(input2.shape, axes);\n let resOutShape = reduceOutShape;\n if (keepDims) {\n resOutShape = backend_util_exports.expandShapeToKeepDim(reduceOutShape, origAxes);\n }\n let res;\n if ((reduceType === \"max\" || reduceType === \"prod\") && backend2.shouldExecuteOnCPU([input2])) {\n const xVals = backend2.tensorMap.get(input2.dataId).values;\n switch (reduceType) {\n case \"max\":\n const outValues = maxImplCPU2(xVals, util_exports.sizeFromShape(reduceShape), resOutShape, x.dtype);\n res = backend2.makeTensorInfo(resOutShape, x.dtype, outValues);\n break;\n case \"prod\":\n const { outVals, outShape, outDtype } = prodImplCPU2(input2.shape, input2.dtype, xVals, axes);\n res = backend2.makeTensorInfo(outShape, outDtype, outVals);\n break;\n default:\n throw new Error(`${reduceType} CPU implementation is not yet supported.`);\n }\n } else {\n const inSize = util_exports.sizeFromShape(reduceShape);\n const xSize = util_exports.sizeFromShape(input2.shape);\n const batchSize = xSize / inSize;\n const reduceInfo = { windowSize: inSize, inSize, batchSize, outSize: 1 };\n const dtype = reduceType === \"mean\" ? \"float32\" : sumOutType(x.dtype);\n const uniformData = [\n { type: \"int32\", data: [inSize] }\n ];\n const program = new ReduceProgram2(reduceInfo, reduceType);\n const reduced = backend2.runWebGPUProgram(program, [input2], dtype, uniformData);\n toDispose.push(reduced);\n res = reshape6({ inputs: { x: reduced }, attrs: { shape: resOutShape }, backend: backend2 });\n }\n toDispose.forEach((t) => backend2.disposeData(t.dataId));\n return res;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Max.js\nfunction max6(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { reductionIndices, keepDims } = attrs;\n return reduce2(x, reductionIndices, keepDims, \"max\", backend2);\n}\nvar maxConfig4 = {\n kernelName: Max,\n backendName: \"webgpu\",\n kernelFunc: max6\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Mean.js\nfunction mean4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { keepDims, axis } = attrs;\n return reduce2(x, axis, keepDims, \"mean\", backend2);\n}\nvar meanConfig4 = {\n kernelName: Mean,\n backendName: \"webgpu\",\n kernelFunc: mean4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Pool_impl.js\nfunction poolImpl(x, convInfo, poolType, backend2) {\n if (convInfo.filterWidth === 1 && convInfo.filterHeight === 1 && util_exports.arraysEqual(convInfo.inShape, convInfo.outShape)) {\n return identity5({ inputs: { x }, backend: backend2 });\n }\n if (convInfo.filterWidth === convInfo.inWidth && convInfo.filterHeight === convInfo.inHeight && convInfo.batchSize === 1 && convInfo.padInfo.type === \"VALID\") {\n const length = x.shape.length;\n const reshapeX = reshape6({\n inputs: { x },\n backend: backend2,\n attrs: {\n shape: [\n x.shape[length - 3] * x.shape[length - 2],\n x.shape[length - 1]\n ]\n }\n });\n let reduceX;\n if (poolType === \"avg\") {\n reduceX = mean4({ inputs: { x: reshapeX }, backend: backend2, attrs: { axis: 0, keepDims: false } });\n } else {\n util_exports.assert(poolType === \"max\", () => `Invalid pool type ${poolType}`);\n reduceX = max6({\n inputs: { x: reshapeX },\n backend: backend2,\n attrs: { reductionIndices: 0, keepDims: false }\n });\n }\n const result = reshape6({ inputs: { x: reduceX }, backend: backend2, attrs: { shape: convInfo.outShape } });\n backend2.disposeData(reshapeX.dataId);\n backend2.disposeData(reduceX.dataId);\n return result;\n }\n let program;\n const dimensions = [{ type: \"int32\", data: [convInfo.strideHeight, convInfo.strideWidth] }];\n if (convInfo.filterHeight === 1 && convInfo.filterWidth === 1) {\n program = new PoolWithFilterSizeEqualsOneProgram(convInfo);\n } else {\n if (poolType === \"avg\") {\n program = new Pool2DProgram2(convInfo, \"avg\");\n } else {\n util_exports.assert(poolType === \"max\", () => `Invalid pool type ${poolType}`);\n program = new Pool2DProgram2(convInfo, \"max\");\n }\n dimensions.push({ type: \"int32\", data: [convInfo.padInfo.top, convInfo.padInfo.left] }, {\n type: \"int32\",\n data: [convInfo.dilationHeight, convInfo.dilationWidth]\n }, { type: \"int32\", data: [convInfo.inHeight, convInfo.inWidth] }, {\n type: \"int32\",\n data: [convInfo.effectiveFilterHeight, convInfo.effectiveFilterWidth]\n });\n }\n return backend2.runWebGPUProgram(program, [x], x.dtype, dimensions);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/AvgPool.js\nfunction avgPool5(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { filterSize, strides, pad: pad3, dimRoundingMode } = attrs;\n const dilations = 1;\n const convInfo = backend_util_exports.computePool2DInfo(x.shape, filterSize, strides, dilations, pad3, dimRoundingMode);\n return poolImpl(x, convInfo, \"avg\", backend2);\n}\nvar avgPoolConfig4 = {\n kernelName: AvgPool,\n backendName: \"webgpu\",\n kernelFunc: avgPool5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/BatchMatMul.js\nfunction batchMatMul4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { a, b } = inputs;\n const { transposeA, transposeB } = attrs;\n return batchMatMulImpl2({ a, b, transposeA, transposeB, backend: backend2 });\n}\nvar batchMatMulConfig4 = {\n kernelName: BatchMatMul,\n backendName: \"webgpu\",\n kernelFunc: batchMatMul4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/slice_webgpu.js\nvar SliceProgram2 = class {\n constructor(start, destSize) {\n this.variableNames = [\"source\"];\n this.workPerThread = 1;\n this.workGroupSize = [64, 1, 1];\n this.size = true;\n this.outputShape = destSize;\n this.rank = destSize.length;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize, [this.workPerThread, 1, 1]);\n this.start = start;\n this.uniforms = `start : ${getCoordsDataType2(start.length)}, `;\n this.shaderKey = \"slice\";\n }\n getUserCode() {\n const dtype = getCoordsDataType2(this.rank);\n const sourceCoords = getCoords3(this.rank);\n let coordSum;\n if (this.start.length === 1) {\n coordSum = this.outputShape.map((_, i) => {\n return `sourceLoc = uniforms.start + coords;`;\n });\n } else {\n coordSum = this.outputShape.map((_, i) => {\n return `sourceLoc.${coords2[i]} = uniforms.start.${getCoordsXYZ(i)} + coords.${coords2[i]};`;\n });\n }\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n var sourceLoc : ${dtype};\n let coords = getCoordsFromIndex(index);\n ${coordSum.join(\"\\n\")}\n setOutputAtIndex(index, getSource(${sourceCoords}));\n }\n }\n `;\n return userCode;\n }\n};\nvar coords2 = [\"x\", \"y\", \"z\", \"w\", \"u\", \"v\"];\nfunction getCoords3(rank) {\n if (rank === 1) {\n return \"sourceLoc\";\n } else if (rank <= 6) {\n return coords2.slice(0, rank).map((coord) => `sourceLoc.${coord}`).join(\",\");\n } else {\n throw Error(`Slicing for rank ${rank} is not yet supported`);\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Slice.js\nfunction slice5(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { begin, size } = attrs;\n const [$begin, $size] = slice_util_exports.parseSliceParams(x, begin, size);\n slice_util_exports.assertParamsValid(x, $begin, $size);\n if (backend2.shouldExecuteOnCPU([x]) || x.dtype === \"string\") {\n const xBufferInfo = backend2.tensorMap.get(x.dataId);\n const outValues = sliceImplCPU2(xBufferInfo.values, $begin, $size, x.shape, x.dtype);\n return backend2.makeTensorInfo($size, x.dtype, outValues);\n }\n if (util_exports.sizeFromShape($size) === 0) {\n return backend2.makeTensorInfo($size, x.dtype, []);\n }\n const program = new SliceProgram2($begin, $size);\n const uniformData = [{ type: \"int32\", data: $begin }];\n return backend2.runWebGPUProgram(program, [x], x.dtype, uniformData);\n}\nvar sliceConfig4 = {\n kernelName: Slice,\n backendName: \"webgpu\",\n kernelFunc: slice5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/BatchToSpaceND.js\nvar batchToSpaceND5 = (args) => {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { blockShape, crops } = attrs;\n util_exports.assert(x.shape.length <= 4, () => \"batchToSpaceND for rank > 4 with a WebGPU backend not implemented yet\");\n const prod6 = blockShape.reduce((a, b) => a * b);\n const reshaped = backend_util_exports.getReshaped(x.shape, blockShape, prod6);\n const permuted = backend_util_exports.getPermuted(reshaped.length, blockShape.length);\n const reshapedPermuted = backend_util_exports.getReshapedPermuted(x.shape, blockShape, prod6);\n const sliceBeginCoords = backend_util_exports.getSliceBeginCoords(crops, blockShape.length);\n const sliceSize = backend_util_exports.getSliceSize(reshapedPermuted, crops, blockShape.length);\n const toDispose = [];\n const reshapedIntermediate = reshape6({ inputs: { x }, backend: backend2, attrs: { shape: reshaped } });\n const transposedIntermediate = transpose5({ inputs: { x: reshapedIntermediate }, backend: backend2, attrs: { perm: permuted } });\n const reshapedIntermediate2 = reshape6({\n inputs: { x: transposedIntermediate },\n backend: backend2,\n attrs: { shape: reshapedPermuted }\n });\n const sliced = slice5({\n inputs: { x: reshapedIntermediate2 },\n backend: backend2,\n attrs: { begin: sliceBeginCoords, size: sliceSize }\n });\n toDispose.push(reshapedIntermediate);\n toDispose.push(transposedIntermediate);\n toDispose.push(reshapedIntermediate2);\n toDispose.forEach((t) => backend2.disposeData(t.dataId));\n return sliced;\n};\nvar batchToSpaceNDConfig4 = {\n kernelName: BatchToSpaceND,\n backendName: \"webgpu\",\n kernelFunc: batchToSpaceND5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/NotEqual.js\nvar notEqual4 = binaryKernelFunc3({\n opType: BinaryOpType.NOT_EQUAL,\n dtype: \"bool\",\n cpuKernelImpl: notEqualImplCPU2\n});\nvar notEqualConfig4 = {\n kernelName: NotEqual,\n backendName: \"webgpu\",\n kernelFunc: notEqual4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Real.js\nfunction real4(args) {\n const { inputs, backend: backend2 } = args;\n const { input: input2 } = inputs;\n const inputData = backend2.tensorMap.get(input2.dataId);\n return identity5({ inputs: { x: inputData.complexTensorInfos.real }, backend: backend2 });\n}\nvar realConfig3 = {\n kernelName: Real,\n backendName: \"webgpu\",\n kernelFunc: real4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernel_utils/int.js\nfunction int2(input2, backend2) {\n const program = new UnaryOpProgram2(input2.shape, UnaryOpType.TO_INT);\n const output = backend2.runWebGPUProgram(program, [input2], \"int32\");\n return { dataId: output.dataId, shape: output.shape, dtype: output.dtype };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Cast.js\nfunction cast6(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { dtype } = attrs;\n if (dtype === \"complex64\") {\n if (x.dtype === \"complex64\") {\n return identity5({ inputs: { x }, backend: backend2 });\n }\n const zerosTensor = zeros(x.shape);\n const floatX = cast6({ inputs: { x }, backend: backend2, attrs: { dtype: \"float32\" } });\n const result = complex4({ inputs: { real: floatX, imag: zerosTensor }, backend: backend2 });\n zerosTensor.dispose();\n backend2.disposeData(floatX.dataId);\n return result;\n }\n if (x.dtype === \"complex64\") {\n const realPart = real4({ inputs: { input: x }, backend: backend2 });\n const result = cast6({ inputs: { x: realPart }, backend: backend2, attrs: { dtype } });\n backend2.disposeData(realPart.dataId);\n return result;\n }\n if (!util_exports.hasEncodingLoss(x.dtype, dtype)) {\n const result = identity5({ inputs: { x }, backend: backend2 });\n return { dataId: result.dataId, shape: result.shape, dtype };\n }\n if (backend2.shouldExecuteOnCPU([x])) {\n const values = backend2.tensorMap.get(x.dataId).values;\n const [resultShape, resultType, resultData] = castImplCPU2(values, x.shape, x.dtype, dtype);\n return backend2.makeTensorInfo(resultShape, resultType, resultData);\n }\n if (dtype === \"int32\") {\n return int2(x, backend2);\n }\n if (dtype === \"bool\") {\n const zerosTensorInfo = backend2.makeTensorInfo([], \"bool\", util_exports.getTypedArrayFromDType(\"bool\", 1));\n const binaryInputs = { a: x, b: zerosTensorInfo };\n const result = notEqual4({ inputs: binaryInputs, backend: backend2 });\n backend2.disposeData(zerosTensorInfo.dataId);\n return result;\n }\n throw new Error(`Error in Cast: failed to cast ${x.dtype} to ${dtype}`);\n}\nvar castConfig4 = {\n kernelName: Cast,\n backendName: \"webgpu\",\n kernelFunc: cast6\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Ceil.js\nvar ceil4 = unaryKernelFunc3({ opType: UnaryOpType.CEIL, cpuKernelImpl: ceilImplCPU2 });\nvar ceilConfig4 = {\n kernelName: Ceil,\n backendName: \"webgpu\",\n kernelFunc: ceil4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/clip_vec4_webgpu.js\nvar ClipVec4Program = class {\n constructor(outputShape) {\n this.variableNames = [\"A\"];\n this.uniforms = \"minVal : f32, maxVal : f32,\";\n this.workPerThread = 4;\n this.workGroupSize = [64, 1, 1];\n this.isVec4 = true;\n this.size = true;\n this.outputShape = outputShape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize, [this.workPerThread, 1, 1]);\n this.shaderKey = \"clipVec4\";\n }\n getUserCode() {\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n if(index < uniforms.size) {\n let value = getAByOutputIndex(index);\n var clampedValue : vec4;\n for (var i = 0; i < 4; i = i + 1) {\n if (isnan(value[i])) {\n clampedValue[i] = value[i];\n } else {\n clampedValue[i] = clamp(value[i], uniforms.minVal, uniforms.maxVal);\n }\n }\n\n setOutputAtIndex(index, clampedValue);\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/clip_webgpu.js\nvar ClipProgram2 = class {\n constructor(outputShape) {\n this.variableNames = [\"A\"];\n this.uniforms = \"minVal : f32, maxVal : f32,\";\n this.workGroupSize = [64, 1, 1];\n this.size = true;\n this.outputShape = outputShape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.shaderKey = \"clip\";\n }\n getUserCode() {\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n if(index < uniforms.size) {\n let value = getAByOutputIndex(index);\n if (isnan(value)) {\n setOutputAtIndex(index, value);\n return;\n }\n setOutputAtIndex(index, clamp(value, uniforms.minVal, uniforms.maxVal));\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/ClipByValue.js\nfunction clipByValue4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { clipValueMin, clipValueMax } = attrs;\n let program;\n const uniformData = [\n { type: \"float32\", data: [clipValueMin] },\n { type: \"float32\", data: [clipValueMax] }\n ];\n if (util_exports.sizeFromShape(x.shape) % 4 === 0) {\n program = new ClipVec4Program(x.shape);\n } else {\n program = new ClipProgram2(x.shape);\n }\n return backend2.runWebGPUProgram(program, [x], x.dtype, uniformData);\n}\nvar clipByValueConfig4 = {\n kernelName: ClipByValue,\n backendName: \"webgpu\",\n kernelFunc: clipByValue4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/concat_webgpu.js\nvar ConcatProgram2 = class {\n constructor(shapes) {\n this.uniforms = \"\";\n this.workPerThread = 4;\n this.workGroupSize = [64, 1, 1];\n this.size = true;\n this.outputShape = backend_util_exports.computeOutShape(shapes, 1);\n this.variableNames = shapes.map((_, i) => `T${i}`);\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize, [this.workPerThread, 1, 1]);\n this.offsetLength = shapes.length - 1;\n for (let i = 0; i < this.offsetLength; i++) {\n this.uniforms += `offset${i} : i32,`;\n }\n this.shaderKey = \"concat\";\n }\n getUserCode() {\n const snippets = [];\n if (this.offsetLength > 0) {\n snippets.push(`if (yC < uniforms.offset0){ setOutputAtCoords(coords.x, coords.y, getT0(yR, yC)); }`);\n for (let i = 1; i < this.offsetLength; i++) {\n snippets.push(`else if (yC < uniforms.offset${[i]}){ setOutputAtCoords(coords.x, coords.y, getT${i}(yR, yC - uniforms.offset${i - 1})); }`);\n }\n const lastIndex = this.offsetLength;\n const lastShiftIndex = this.offsetLength - 1;\n snippets.push(`else { setOutputAtCoords(coords.x, coords.y, getT${lastIndex}(yR, yC - uniforms.offset${lastShiftIndex})); }`);\n } else {\n snippets.push(`setOutputAtCoords(coords.x, coords.y, getT0(yR, yC));`);\n }\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n for(var i = 0; i < ${this.workPerThread}; i = i + 1) {\n let flatIndex = index * ${this.workPerThread} + i;\n if(flatIndex < uniforms.size) {\n let coords = getCoordsFromIndex(flatIndex);\n let yR = coords.x;\n let yC = coords.y;\n\n ${snippets.join(\"\\n \")}\n }\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Imag.js\nfunction imag4(args) {\n const { inputs, backend: backend2 } = args;\n const { input: input2 } = inputs;\n const inputData = backend2.tensorMap.get(input2.dataId);\n return identity5({ inputs: { x: inputData.complexTensorInfos.imag }, backend: backend2 });\n}\nvar imagConfig3 = {\n kernelName: Imag,\n backendName: \"webgpu\",\n kernelFunc: imag4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Concat_impl.js\nfunction concatImpl3(inputs, axis, backend2) {\n const dtype = inputs[0].dtype;\n if (dtype === \"complex64\") {\n const reals = inputs.map((t) => real4({ inputs: { input: t }, backend: backend2 }));\n const imags = inputs.map((t) => imag4({ inputs: { input: t }, backend: backend2 }));\n const realConcated = concatImpl3(reals, axis, backend2);\n const imagConcated = concatImpl3(imags, axis, backend2);\n const result = complex4({ inputs: { real: realConcated, imag: imagConcated }, backend: backend2 });\n reals.forEach((r) => backend2.disposeData(r.dataId));\n imags.forEach((i) => backend2.disposeData(i.dataId));\n backend2.disposeData(realConcated.dataId);\n backend2.disposeData(imagConcated.dataId);\n return result;\n }\n let runOnCpu = backend2.shouldExecuteOnCPU(inputs);\n if (dtype === \"string\") {\n runOnCpu = true;\n }\n if (runOnCpu) {\n const tensors2D2 = inputs.map((t) => {\n const innerSize = util_exports.sizeFromShape(t.shape.slice(axis));\n const shape = [-1, innerSize];\n return reshape6({ inputs: { x: t }, backend: backend2, attrs: { shape } });\n });\n const inputsValShapes = tensors2D2.map((t) => {\n return { vals: backend2.readSync(t.dataId), shape: t.shape };\n });\n const outShape2 = backend_util_exports.computeOutShape(tensors2D2.map((t) => t.shape), 1);\n const simplyConcat = tensors2D2[0].shape[0] === 1;\n const outVals = concatImplCPU2(inputsValShapes, outShape2, dtype, simplyConcat);\n const finalOutShape = backend_util_exports.computeOutShape(inputs.map((t) => t.shape), axis);\n const outInfo = backend2.makeTensorInfo(finalOutShape, dtype, outVals);\n tensors2D2.forEach((t) => backend2.disposeData(t.dataId));\n return outInfo;\n }\n const maxInputNum = backend2.device.limits.maxStorageBuffersPerShaderStage - 1;\n if (inputs.length > maxInputNum) {\n const reducedInputs = [];\n for (let i = 0; i < inputs.length; i += maxInputNum) {\n const subArray = inputs.slice(i, i + maxInputNum);\n reducedInputs.push(concatImpl3(subArray, axis, backend2));\n }\n const result = concatImpl3(reducedInputs, axis, backend2);\n for (const i of reducedInputs) {\n backend2.disposeData(i.dataId);\n }\n return result;\n }\n const { tensors2D, outShape } = computeTensors2D2(inputs, axis, backend2);\n const shapes = tensors2D.map((t) => t.shape);\n const program = new ConcatProgram2(shapes);\n const uniformData = [];\n const offsets = new Array(shapes.length - 1);\n if (offsets.length > 0) {\n offsets[0] = shapes[0][1];\n uniformData.push({ type: \"int32\", data: [offsets[0]] });\n for (let i = 1; i < offsets.length; i++) {\n offsets[i] = offsets[i - 1] + shapes[i][1];\n uniformData.push({ type: \"int32\", data: [offsets[i]] });\n }\n }\n const res = backend2.runWebGPUProgram(program, tensors2D, tensors2D[0].dtype, uniformData);\n tensors2D.forEach((r) => backend2.disposeData(r.dataId));\n const reshapedResult = reshape6({ inputs: { x: res }, backend: backend2, attrs: { shape: outShape } });\n backend2.disposeData(res.dataId);\n return reshapedResult;\n}\nfunction computeTensors2D2(inputs, axis, backend2) {\n const outShape = backend_util_exports.computeOutShape(inputs.map((t) => t.shape), axis);\n const tensors2D = inputs.map((t) => reshape6({\n inputs: { x: t },\n backend: backend2,\n attrs: {\n shape: [\n util_exports.sizeFromShape(t.shape.slice(0, axis)),\n util_exports.sizeFromShape(t.shape.slice(axis))\n ]\n }\n }));\n return { tensors2D, outShape };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Concat.js\nfunction concat5(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { axis } = attrs;\n const $axis = util_exports.parseAxisParam(axis, inputs[0].shape)[0];\n const outShape = backend_util_exports.computeOutShape(inputs.map((t) => t.shape), $axis);\n if (util_exports.sizeFromShape(outShape) === 0) {\n return backend2.makeTensorInfo(outShape, inputs[0].dtype, []);\n }\n const $inputs = inputs.filter((t) => util_exports.sizeFromShape(t.shape) > 0);\n if ($inputs.length === 1) {\n return identity5({ inputs: { x: $inputs[0] }, backend: backend2 });\n }\n const shapes = $inputs.map((t) => t.shape);\n backend_util_exports.assertParamsConsistent(shapes, $axis);\n return concatImpl3($inputs, $axis, backend2);\n}\nvar concatConfig4 = {\n kernelName: Concat,\n backendName: \"webgpu\",\n kernelFunc: concat5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/conv2d_mm_webgpu.js\nfunction conv2dCommonSnippet(isChannelsLast, fitAOuter, fitBOuter, fitInner, addBias = false, activation2 = null, hasPreluActivationWeights = false, innerElementSizeX = 4, innerElementSizeW = 4, innerElementSize = 4) {\n const getXSnippet = (innerElementSize2) => {\n switch (innerElementSize2) {\n case 1:\n return \"resData = x[xIndex];\";\n case 3:\n return \"resData = vec3(x[xIndex], x[xIndex + 1], x[xIndex + 2]);\";\n case 4:\n return \"resData = x[xIndex / 4];\";\n default:\n throw new Error(`innerElementSize ${innerElementSize2} is not supported.`);\n }\n };\n const getWSnippet = (innerElementSize2) => {\n switch (innerElementSize2) {\n case 1:\n return \"return W[row * uniforms.wShape[3] + colIn];\";\n case 4:\n return \"return W[row * uniforms.wShape[3] / 4 + colIn];\";\n default:\n throw new Error(`innerElementSize ${innerElementSize2} is not supported.`);\n }\n };\n const coordASnippet = isChannelsLast ? `\n let coord = vec4(batch, xRow, xCol, xCh);\n ` : `\n let coord = vec4(batch, xCh, xRow, xCol);\n `;\n const coordResSnippet = isChannelsLast ? `\n let coords = vec4(\n batch,\n row / outWidth,\n row % outWidth,\n col);\n ` : `\n let coords = vec4(\n batch,\n row,\n col / outWidth,\n col % outWidth);\n `;\n const xHight = isChannelsLast ? \"uniforms.xShape[1]\" : \"uniforms.xShape[2]\";\n const xWidth = isChannelsLast ? \"uniforms.xShape[2]\" : \"uniforms.xShape[3]\";\n const row = isChannelsLast ? \"row\" : \"col\";\n const col = isChannelsLast ? \"col\" : \"row\";\n const readXSnippet = `\n let inChannels = uniforms.wShape[2];\n let outWidth = ${isChannelsLast ? \"uniforms.outShape[2]\" : \"uniforms.outShape[3]\"};\n let outRow = ${row} / outWidth;\n let outCol = ${row} % outWidth;\n\n let WRow = ${col} / (uniforms.filterDims[1] * inChannels);\n let WCol = ${col} / inChannels % uniforms.filterDims[1];\n let xRow = outRow * uniforms.stride[0] + uniforms.dilation[0] * WRow - uniforms.pad[0];\n let xCol = outCol * uniforms.stride[1] + uniforms.dilation[1] * WCol - uniforms.pad[1];\n let xCh = ${col} % inChannels;\n var resData = ${typeSnippet(innerElementSizeX)}(0.0);\n // The bounds checking is always needed since we use it to pad zero for\n // the 'same' padding type.\n if (xRow >= 0 && xRow < ${xHight} && xCol >= 0 && xCol < ${xWidth}) {\n ${coordASnippet}\n let xIndex = getIndexFromCoords4D(coord, uniforms.xShape);\n ${getXSnippet(innerElementSizeX)}\n }\n return resData;`;\n const sampleX = isChannelsLast ? fitAOuter && fitInner ? `\n let col = colIn * ${innerElementSizeX};\n ${readXSnippet}` : `\n let col = colIn * ${innerElementSizeX};\n if (row < uniforms.dimAOuter && col < uniforms.dimInner) {\n ${readXSnippet}\n }\n return ${typeSnippet(innerElementSizeX)}(0.0);` : fitInner && fitBOuter ? `\n let col = colIn * ${innerElementSizeX};\n ${readXSnippet}` : `\n let col = colIn * ${innerElementSizeX};\n if (row < uniforms.dimInner && col < uniforms.dimBOuter) {\n ${readXSnippet}\n }\n return ${typeSnippet(innerElementSizeX)}(0.0);`;\n const sampleW = `${getWSnippet(innerElementSizeW)}`;\n const resType = typeSnippet(innerElementSize);\n const aType = isChannelsLast ? typeSnippet(innerElementSizeX) : typeSnippet(innerElementSizeW);\n const bType = isChannelsLast ? typeSnippet(innerElementSizeW) : typeSnippet(innerElementSizeX);\n const userCode = `\n ${activationFnSnippet(activation2, hasPreluActivationWeights, innerElementSize === 4, 4)}\n fn mm_readA(batch: i32, row : i32, colIn : i32) -> ${aType} {\n ${isChannelsLast ? sampleX : sampleW}\n }\n\n fn mm_readB(batch: i32, row : i32, colIn : i32) -> ${bType} {\n ${isChannelsLast ? sampleW : sampleX}\n }\n\n fn mm_write(batch: i32, row : i32, colIn : i32, valueIn : ${resType}) {\n let col = colIn * ${innerElementSize};\n if (row < uniforms.dimAOuter && col < uniforms.dimBOuter)\n {\n var value = valueIn;\n let outWidth = ${isChannelsLast ? \"uniforms.outShape[2]\" : \"uniforms.outShape[3]\"};\n ${coordResSnippet}\n ${biasActivationSnippet(addBias, activation2)}\n setOutputAtCoords(coords[0], coords[1], coords[2], coords[3], value);\n }\n }`;\n return userCode;\n}\nvar Conv2DMMProgram = class {\n constructor(convInfo, dimAOuter, dimBOuter, dimInner, addBias = false, activation2 = null, hasPreluActivationWeights = false) {\n this.variableNames = [\"x\", \"W\"];\n this.uniforms = `filterDims : vec2, pad : vec2, stride : vec2, dilation : vec2, dimAOuter : i32, dimBOuter : i32, dimInner : i32,`;\n this.outputShape = convInfo.outShape;\n this.isChannelsLast = convInfo.dataFormat === \"channelsLast\";\n this.isVec4 = ((convInfo.inChannels % 4 === 0 || convInfo.inChannels % 3 === 0) && this.isChannelsLast || convInfo.outWidth % 4 === 0 && !this.isChannelsLast) && convInfo.outChannels % 4 === 0;\n this.dispatchLayout = this.isChannelsLast ? { x: [3], y: [1, 2], z: [0] } : { x: [2, 3], y: [1], z: [0] };\n this.workGroupSize = computeWorkGroupSizeForConv2d(this.dispatchLayout, this.outputShape, this.isVec4);\n this.elementsPerThread = computeWorkPerThreadForConv2d(this.dispatchLayout, this.outputShape, this.isVec4);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize, this.elementsPerThread);\n if (this.isVec4) {\n if (this.isChannelsLast && convInfo.inChannels % 4 !== 0) {\n this.innerElementSize = 3;\n this.variableTypes = [\"f32\", \"vec4\"];\n } else {\n this.innerElementSize = 4;\n this.variableTypes = [\"vec4\", \"vec4\"];\n }\n if (addBias) {\n this.variableNames.push(\"bias\");\n this.variableTypes.push(\"vec4\");\n }\n if (hasPreluActivationWeights) {\n this.variableNames.push(\"preluActivationWeights\");\n this.variableTypes.push(\"vec4\");\n }\n } else {\n this.innerElementSize = this.elementsPerThread[0];\n if (addBias) {\n this.variableNames.push(\"bias\");\n }\n if (hasPreluActivationWeights) {\n this.variableNames.push(\"preluActivationWeights\");\n }\n }\n this.addBias = addBias;\n this.activation = activation2;\n this.hasPreluActivationWeights = hasPreluActivationWeights;\n this.tileAOuter = this.workGroupSize[1] * this.elementsPerThread[1];\n this.tileBOuter = this.workGroupSize[0] * this.elementsPerThread[0];\n this.tileInner = Math.max(this.workGroupSize[0] * this.innerElementSize, this.workGroupSize[1]);\n this.fitAOuter = dimAOuter % this.tileAOuter === 0;\n this.fitBOuter = dimBOuter % this.tileBOuter === 0;\n this.fitInner = dimInner % this.tileInner === 0;\n this.shaderKey = `conv2DMM_${this.elementsPerThread}_${this.activation}}_${this.fitAOuter}_${this.fitBOuter}_${this.fitInner}_${this.isVec4}_${this.innerElementSize}_${this.isChannelsLast}`;\n }\n getUserCode() {\n const matMulSource = this.isVec4 ? makeMatMulPackedVec4Source(this.elementsPerThread, this.workGroupSize, !this.isChannelsLast, this.tileInner) : makeMatMulPackedSource(this.elementsPerThread, this.workGroupSize, !this.isChannelsLast, this.tileInner);\n const elementsSize = this.isVec4 ? [this.innerElementSize, 4, 4] : [1, 1, 1];\n const userCode = `\n ${conv2dCommonSnippet(this.isChannelsLast, this.fitAOuter, this.fitBOuter, this.fitInner, this.addBias, this.activation, this.hasPreluActivationWeights, elementsSize[0], elementsSize[1], elementsSize[2])}\n ${matMulSource}\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Conv2D_impl.js\nfunction getShapeForBatchMatMul2(shape, isChannelsLast) {\n const length = shape.length;\n if (length >= 3) {\n return isChannelsLast ? [\n ...shape.slice(0, -3),\n shape[length - 3] * shape[length - 2],\n shape[length - 1]\n ] : [\n ...shape.slice(0, -3),\n shape[length - 3],\n shape[length - 2] * shape[length - 1]\n ];\n } else if (!isChannelsLast && length === 1 && shape[0] > 1) {\n return [shape[0], 1];\n } else {\n return null;\n }\n}\nfunction conv2dByMatMul2({ x, filter, convInfo, backend: backend2, bias = null, preluActivationWeights = null, leakyreluAlpha = 0, activation: activation2 = null }) {\n const isChannelsLast = convInfo.dataFormat === \"channelsLast\";\n const transposeA = isChannelsLast ? false : true;\n const transposeB = false;\n const sameSize = isChannelsLast && convInfo.filterHeight === convInfo.inHeight && convInfo.filterWidth === convInfo.inWidth && convInfo.padInfo.type === \"VALID\";\n const intermediates = [];\n let xReshaped;\n let filterReshaped;\n if (sameSize) {\n const sharedDim = convInfo.inHeight * convInfo.inWidth * convInfo.inChannels;\n xReshaped = reshape6({\n inputs: { x },\n backend: backend2,\n attrs: { shape: [1, convInfo.batchSize, sharedDim] }\n });\n filterReshaped = reshape6({\n inputs: { x: filter },\n backend: backend2,\n attrs: { shape: [1, sharedDim, convInfo.outChannels] }\n });\n } else {\n xReshaped = reshape6({\n inputs: { x },\n backend: backend2,\n attrs: {\n shape: isChannelsLast ? [\n convInfo.batchSize,\n convInfo.inHeight * convInfo.inWidth,\n convInfo.inChannels\n ] : [\n convInfo.batchSize,\n convInfo.inChannels,\n convInfo.inHeight * convInfo.inWidth\n ]\n }\n });\n filterReshaped = reshape6({\n inputs: { x: filter },\n backend: backend2,\n attrs: { shape: [1, convInfo.inChannels, convInfo.outChannels] }\n });\n }\n intermediates.push(xReshaped);\n intermediates.push(filterReshaped);\n if (preluActivationWeights != null) {\n const targetShape = getShapeForBatchMatMul2(preluActivationWeights.shape, isChannelsLast);\n if (targetShape != null) {\n preluActivationWeights = reshape6({\n inputs: { x: preluActivationWeights },\n backend: backend2,\n attrs: { shape: targetShape }\n });\n intermediates.push(preluActivationWeights);\n }\n }\n if (bias != null) {\n const targetShape = getShapeForBatchMatMul2(bias.shape, isChannelsLast);\n if (targetShape != null) {\n bias = reshape6({ inputs: { x: bias }, backend: backend2, attrs: { shape: targetShape } });\n intermediates.push(bias);\n }\n }\n const result = batchMatMulImpl2({\n a: isChannelsLast ? xReshaped : filterReshaped,\n b: isChannelsLast ? filterReshaped : xReshaped,\n transposeA,\n transposeB,\n backend: backend2,\n bias,\n activation: activation2,\n preluActivationWeights,\n leakyreluAlpha\n });\n const out = reshape6({ inputs: { x: result }, backend: backend2, attrs: { shape: convInfo.outShape } });\n intermediates.push(result);\n for (const i of intermediates) {\n backend2.disposeData(i.dataId);\n }\n return out;\n}\nfunction conv2DImpl({ x, filter, convInfo, backend: backend2, bias = null, preluActivationWeights = null, leakyreluAlpha = 0, activation: activation2 = null }) {\n const hasBias = bias != null;\n const hasPreluActivationWeights = preluActivationWeights != null;\n const isChannelsLast = convInfo.dataFormat === \"channelsLast\";\n const sameSize = isChannelsLast && convInfo.filterHeight === convInfo.inHeight && convInfo.filterWidth === convInfo.inWidth && convInfo.padInfo.type === \"VALID\";\n if (sameSize || convInfo.filterHeight === 1 && convInfo.filterWidth === 1 && convInfo.dilationHeight === 1 && convInfo.dilationWidth === 1 && convInfo.strideHeight === 1 && convInfo.strideWidth === 1 && (convInfo.padInfo.type === \"SAME\" || convInfo.padInfo.type === \"VALID\")) {\n return conv2dByMatMul2({\n x,\n filter,\n convInfo,\n backend: backend2,\n bias,\n activation: activation2,\n preluActivationWeights,\n leakyreluAlpha\n });\n }\n const dimAOuter = isChannelsLast ? convInfo.outHeight * convInfo.outWidth : convInfo.outChannels;\n const dimBOuter = isChannelsLast ? convInfo.outChannels : convInfo.outHeight * convInfo.outWidth;\n const dimInner = convInfo.filterHeight * convInfo.filterWidth * convInfo.inChannels;\n const padInfo = [convInfo.padInfo.top, convInfo.padInfo.left];\n const dimensions = [\n { type: \"int32\", data: [convInfo.filterHeight, convInfo.filterWidth] },\n { type: \"int32\", data: [...padInfo] },\n { type: \"int32\", data: [convInfo.strideHeight, convInfo.strideWidth] },\n { type: \"int32\", data: [convInfo.dilationHeight, convInfo.dilationWidth] },\n { type: \"int32\", data: [dimAOuter] },\n { type: \"int32\", data: [dimBOuter] },\n { type: \"int32\", data: [dimInner] }\n ];\n const program = new Conv2DMMProgram(convInfo, dimAOuter, dimBOuter, dimInner, hasBias, activation2, hasPreluActivationWeights);\n const intermediates = [];\n const inputVar = [x, filter];\n if (hasBias) {\n if (!isChannelsLast && bias.shape.length === 1) {\n bias = reshape6({ inputs: { x: bias }, backend: backend2, attrs: { shape: [bias.shape[0], 1, 1] } });\n intermediates.push(bias);\n }\n inputVar.push(bias);\n }\n if (hasPreluActivationWeights) {\n if (!isChannelsLast && preluActivationWeights.shape.length === 1) {\n preluActivationWeights = reshape6({\n inputs: { x: preluActivationWeights },\n backend: backend2,\n attrs: { shape: [preluActivationWeights.shape[0], 1, 1] }\n });\n intermediates.push(preluActivationWeights);\n }\n inputVar.push(preluActivationWeights);\n }\n if (activation2 === \"leakyrelu\") {\n dimensions.push({ type: \"float32\", data: [leakyreluAlpha] });\n program.uniforms += \" alpha : f32,\";\n }\n const out = backend2.runWebGPUProgram(program, inputVar, x.dtype, dimensions);\n for (const i of intermediates) {\n backend2.disposeData(i.dataId);\n }\n return out;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Conv2D.js\nfunction conv2d6(args) {\n const { inputs, attrs, backend: backend2 } = args;\n const { x, filter } = inputs;\n const { strides, pad: pad3, dataFormat, dilations, dimRoundingMode } = attrs;\n const $dataFormat = backend_util_exports.convertConv2DDataFormat(dataFormat);\n const convInfo = backend_util_exports.computeConv2DInfo(x.shape, filter.shape, strides, dilations, pad3, dimRoundingMode, false, $dataFormat);\n return conv2DImpl({ x, filter, convInfo, backend: backend2 });\n}\nvar conv2DConfig4 = {\n kernelName: Conv2D,\n backendName: \"webgpu\",\n kernelFunc: conv2d6\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/conv_backprop_mm_webgpu.js\nfunction conv2dTransposeCommonSnippet(innerElementSize = 4) {\n const getWSnippet = (innerElementSize2) => {\n switch (innerElementSize2) {\n case 1:\n return \"return W[getIndexFromCoords4D(coord, uniforms.wShape)];\";\n case 4:\n return `\n let coord1 = vec4(coordX, coordY, col + 1, rowInner);\n let coord2 = vec4(coordX, coordY, col + 2, rowInner);\n let coord3 = vec4(coordX, coordY, col + 3, rowInner);\n let v0 = W[getIndexFromCoords4D(coord, uniforms.wShape)];\n let v1 = W[getIndexFromCoords4D(coord1, uniforms.wShape)];\n let v2 = W[getIndexFromCoords4D(coord2, uniforms.wShape)];\n let v3 = W[getIndexFromCoords4D(coord3, uniforms.wShape)];\n return vec4(v0, v1, v2, v3);\n `;\n default:\n throw new Error(`innerElementSize ${innerElementSize2} is not supported.`);\n }\n };\n const readASnippet = `\n let outRow = row / uniforms.outShape[2];\n let outCol = row % uniforms.outShape[2];\n\n let WRow = col / (uniforms.filterDims[1] * uniforms.outBackprop[3]);\n let WCol = col / uniforms.outBackprop[3] % uniforms.filterDims[1];\n let xR = f32(outRow - uniforms.pads[0] + WRow) / f32(uniforms.stride[0]);\n let xC = f32(outCol - uniforms.pads[1] + WCol) / f32(uniforms.stride[1]);\n if (xR < 0.0 || xR >= f32(uniforms.outBackprop[1]) || fract(xR) > 0.0) {\n return ${typeSnippet(innerElementSize)}(0.0);\n }\n if (xC < 0.0 || xC >= f32(uniforms.outBackprop[2]) || fract(xC) > 0.0) {\n return ${typeSnippet(innerElementSize)}(0.0);\n }\n let coord = vec4(\n batch,\n i32(xR),\n i32(xC),\n col % uniforms.outBackprop[3]);\n return x[getIndexFromCoords4D(coord, uniforms.xShape)/${innerElementSize}];`;\n const sampleA = `if (row < uniforms.dimAOuter && col < uniforms.dimInner) {\n ${readASnippet}\n }\n return ${typeSnippet(innerElementSize)}(0.0);`;\n const userCode = `\n fn mm_readA(batch: i32, row : i32, colIn : i32) -> ${typeSnippet(innerElementSize)} {\n let col = colIn * ${innerElementSize};\n ${sampleA}\n }\n\n fn mm_readB(batch: i32, row : i32, colIn : i32) -> ${typeSnippet(innerElementSize)} {\n let col = colIn * ${innerElementSize};\n let coordX = uniforms.filterDims.x - 1 -\n row / (uniforms.filterDims[1] * uniforms.outBackprop[3]);\n let coordY = uniforms.filterDims.y - 1 -\n (row / uniforms.outBackprop[3]) % uniforms.filterDims[1];\n if (row < uniforms.dimInner && col < uniforms.dimBOuter &&\n coordX >= 0 && coordY >= 0) {\n let rowInner = row % uniforms.outBackprop[3];\n let coord = vec4(coordX, coordY, col, rowInner);\n ${getWSnippet(innerElementSize)}\n }\n return ${typeSnippet(innerElementSize)}(0.0);\n }\n\n fn mm_write(batch: i32, row : i32, colIn : i32, valueInput : ${typeSnippet(innerElementSize)}) {\n let col = colIn * ${innerElementSize};\n if (row < uniforms.dimAOuter && (col + ${innerElementSize - 1}) < uniforms.dimBOuter) {\n var value = valueInput;\n let outCoord = vec4(\n batch,\n row / uniforms.outShape[2],\n row % uniforms.outShape[2],\n col);\n result[getIndexFromCoords4D(outCoord, uniforms.outShape)/${innerElementSize}] = value;\n }\n }`;\n return userCode;\n}\nvar Conv2DDerInputMMProgram = class {\n constructor(convInfo) {\n this.variableNames = [\"x\", \"W\"];\n this.uniforms = \"filterDims : vec2, pads : vec2, stride : vec2, outBackprop : vec4, dimAOuter : i32, dimBOuter : i32, dimInner : i32,\";\n this.outputShape = convInfo.inShape;\n util_exports.assert(convInfo.dataFormat === \"channelsLast\", () => \"TODO: NCHW is unimplemented\");\n this.isVec4 = convInfo.inChannels % 4 === 0 && convInfo.outChannels % 4 === 0;\n this.dispatchLayout = { x: [3], y: [1, 2], z: [0] };\n this.workGroupSize = computeWorkGroupSizeForConv2d(this.dispatchLayout, this.outputShape, this.isVec4);\n this.elementsPerThread = computeWorkPerThreadForConv2d(this.dispatchLayout, this.outputShape, this.isVec4);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize, this.elementsPerThread);\n if (this.isVec4) {\n this.variableTypes = [\"vec4\", \"f32\"];\n }\n this.shaderKey = `conv2DDerInputMM_${this.isVec4}_${this.elementsPerThread}`;\n }\n getUserCode() {\n const matMulSource = this.isVec4 ? makeMatMulPackedVec4Source(this.elementsPerThread, this.workGroupSize) : makeMatMulPackedSource(this.elementsPerThread, this.workGroupSize);\n const userCode = `\n ${conv2dTransposeCommonSnippet(this.isVec4 ? 4 : 1)}\n ${matMulSource}\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/conv_backprop_webgpu.js\nvar Conv2DDerInputProgram2 = class {\n constructor(convInfo) {\n this.variableNames = [\"dy\", \"W\"];\n this.uniforms = \"filterDims : vec2, pads : vec2, stride : vec2, outBackprop : vec4,\";\n this.workGroupSize = [64, 1, 1];\n this.size = true;\n this.outputShape = convInfo.inShape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.isChannelsLast = convInfo.dataFormat === \"channelsLast\";\n this.shaderKey = `conv2DDerInput_${this.isChannelsLast}`;\n }\n getUserCode() {\n const rowDim = this.isChannelsLast ? 1 : 2;\n const colDim = this.isChannelsLast ? 2 : 3;\n const channelDim = this.isChannelsLast ? 3 : 1;\n return `\n ${getMainHeaderString(\"index\")} {\n if(index < uniforms.size) {\n let coords = getCoordsFromIndex(index);\n let batch = coords[0];\n let d1 = coords[${channelDim}];\n\n let dyCorner = vec2(coords[${rowDim}]), coords[${colDim}]) - uniforms.pads;\n let dyRCorner = dyCorner.x;\n let dyCCorner = dyCorner.y;\n\n // Convolve dy(?, ?, d2) with w(:, :, d1, d2) to compute dx(xR, xC, d1).\n // ? = to be determined. : = across all values in that axis.\n var dotProd = 0.0;\n for (var wR = 0; wR < uniforms.filterDims.x; wR = wR + 1) {\n let dyR = (f32(dyRCorner) + f32(wR)) / f32(uniforms.stride.x);\n let wRPerm = uniforms.filterDims.x - 1 - wR;\n if (dyR < 0.0 || dyR >= f32(uniforms.outBackprop[1]) || fract(dyR) > 0.0 ||\n wRPerm < 0) {\n continue;\n }\n let idyR = dyR;\n\n for (var wC = 0; wC < uniforms.filterDims.y; wC = wC + 1) {\n let dyC = (f32(dyCCorner) + f32(wC)) / f32(uniforms.stride.y);\n let wCPerm = uniforms.filterDims.y - 1 - wC;\n if (dyC < 0.0 || dyC >= f32(uniforms.outBackprop[2]) ||\n fract(dyC) > 0.0 || wCPerm < 0) {\n continue;\n }\n let idyC = dyC;\n\n for (var d2 = 0; d2 < uniforms.outBackprop[3]; d2 = d2 + 1) {\n if (${this.isChannelsLast}) {\n let xValue = getDy(batch, idyR, idyC, d2);\n let wValue = getW(wRPerm, wCPerm, d1, d2);\n dotProd = dotProd + xValue * wValue;\n } else {\n let xValue = getDy(batch, d2, idyR, idyC);\n let wValue = getW(wRPerm, wCPerm, d1, d2);\n dotProd = dotProd + xValue * wValue;\n }\n\n }\n }\n }\n setOutputAtIndex(index, dotProd);\n }\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Conv2DBackpropInput.js\nfunction conv2DBackpropInput5(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { dy, filter } = inputs;\n const { inputShape, strides, pad: pad3, dataFormat, dimRoundingMode } = attrs;\n const $dataFormat = backend_util_exports.convertConv2DDataFormat(dataFormat);\n const convInfo = backend_util_exports.computeConv2DInfo(inputShape, filter.shape, strides, 1, pad3, dimRoundingMode, false, $dataFormat);\n const dimensions = [\n { type: \"int32\", data: [convInfo.filterHeight, convInfo.filterWidth] },\n {\n type: \"int32\",\n data: [\n convInfo.filterHeight - 1 - convInfo.padInfo.top,\n convInfo.filterWidth - 1 - convInfo.padInfo.left\n ]\n },\n { type: \"int32\", data: [convInfo.strideHeight, convInfo.strideWidth] },\n {\n type: \"int32\",\n data: [\n convInfo.batchSize,\n convInfo.outHeight,\n convInfo.outWidth,\n convInfo.outChannels\n ]\n }\n ];\n let program;\n if (env().getBool(\"WEBGPU_USE_NAIVE_CONV2D_TRANSPOSE\")) {\n program = new Conv2DDerInputProgram2(convInfo);\n } else {\n program = new Conv2DDerInputMMProgram(convInfo);\n const dimAOuter = convInfo.inShape[1] * convInfo.inShape[2];\n const dimBOuter = convInfo.inShape[3];\n const dimInner = convInfo.filterHeight * convInfo.filterWidth * convInfo.outChannels;\n dimensions.push({ type: \"uint32\", data: [dimAOuter] }, { type: \"uint32\", data: [dimBOuter] }, { type: \"uint32\", data: [dimInner] });\n }\n return backend2.runWebGPUProgram(program, [dy, filter], \"float32\", dimensions);\n}\nvar conv2DBackpropInputConfig4 = {\n kernelName: Conv2DBackpropInput,\n backendName: \"webgpu\",\n kernelFunc: conv2DBackpropInput5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Cos.js\nvar cos4 = unaryKernelFunc3({ opType: UnaryOpType.COS });\nvar cosConfig4 = {\n kernelName: Cos,\n backendName: \"webgpu\",\n kernelFunc: cos4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Cosh.js\nvar cosh4 = unaryKernelFunc3({ opType: UnaryOpType.COSH });\nvar coshConfig4 = {\n kernelName: Cosh,\n backendName: \"webgpu\",\n kernelFunc: cosh4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/crop_and_resize_webgpu.js\nvar CropAndResizeProgram2 = class {\n constructor(channnel, boxShape, cropSize, method) {\n this.variableNames = [\"Image\", \"Boxes\", \"BoxInd\"];\n this.uniforms = \"extrapolationValue : f32,\";\n this.workGroupSize = [64, 1, 1];\n this.size = true;\n const [numBoxes] = boxShape;\n this.outputShape = [numBoxes, cropSize[0], cropSize[1], channnel];\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.methodId = method === \"bilinear\" ? 1 : 0;\n this.cropHeightBiggerThan1 = this.outputShape[1] > 1;\n this.cropWidthBiggerThan1 = this.outputShape[2] > 1;\n this.shaderKey = `cropAndResize_${this.methodId}_${this.cropHeightBiggerThan1}_${this.cropWidthBiggerThan1}`;\n }\n getUserCode() {\n const [inputHeightFloat, inputWidthFloat] = [`f32(uniforms.imageShape[1] - 1)`, `f32(uniforms.imageShape[2] - 1)`];\n const [heightRatio, heightScale, inY] = this.cropHeightBiggerThan1 ? [\n `(${inputHeightFloat} / f32(uniforms.outShape[1] - 1))`,\n \"(y2-y1) * height_ratio\",\n `y1*${inputHeightFloat} + f32(y)*(height_scale)`\n ] : [\n \"0.0\",\n \"0.0\",\n `0.5 * (y1+y2) * ${inputHeightFloat}`\n ];\n const [widthRatio, widthScale, inX] = this.cropWidthBiggerThan1 ? [\n `(${inputWidthFloat} / f32(uniforms.outShape[2] - 1))`,\n \"(x2-x1) * width_ratio\",\n `x1*${inputWidthFloat} + f32(x)*(width_scale)`\n ] : [\n \"0.0\",\n \"0.0\",\n `0.5 * (x1+x2) * ${inputWidthFloat}`\n ];\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let coords = getCoordsFromIndex(index);\n let height_ratio = f32(${heightRatio});\n let width_ratio = f32(${widthRatio});\n let b = coords[0];\n let y = coords[1];\n let x = coords[2];\n let d = coords[3];\n // get box vals\n let y1 = getBoxes(b, 0);\n let x1 = getBoxes(b, 1);\n let y2 = getBoxes(b, 2);\n let x2 = getBoxes(b, 3);\n // get image in batch index\n let bInd = i32(round(getBoxInd(b)));\n if(bInd < 0 || bInd >= uniforms.outShape[0]) {\n return;\n }\n let height_scale = ${heightScale};\n let width_scale = ${widthScale};\n let in_y = ${inY};\n if( in_y < 0.0 || in_y > ${inputHeightFloat} ) {\n setOutputAtIndex(index, uniforms.extrapolationValue);\n return;\n }\n let in_x = ${inX};\n if( in_x < 0.0 || in_x > ${inputWidthFloat} ) {\n setOutputAtIndex(index, uniforms.extrapolationValue);\n return;\n }\n let sourceFracIndexCR = vec2(in_x,in_y);\n if(${this.methodId} == 1) {\n // Compute the four integer indices.\n let sourceFloorCR = vec2(sourceFracIndexCR);\n let sourceCeilCR = vec2(ceil(sourceFracIndexCR));\n let topLeft = getImage(bInd, sourceFloorCR.y, sourceFloorCR.x, d);\n let bottomLeft = getImage(bInd, sourceCeilCR.y, sourceFloorCR.x, d);\n let topRight = getImage(bInd, sourceFloorCR.y, sourceCeilCR.x, d);\n let bottomRight = getImage(bInd, sourceCeilCR.y, sourceCeilCR.x, d);\n let fracCR = sourceFracIndexCR - vec2(sourceFloorCR);\n let top = topLeft + (topRight - topLeft) * fracCR.x;\n let bottom = bottomLeft + (bottomRight - bottomLeft) * fracCR.x;\n let newValue = top + (bottom - top) * fracCR.y;\n setOutputAtIndex(index, newValue);\n } else {\n // Compute the coordinators of nearest neighbor point.\n let sourceNearestCR = vec2(floor(\n sourceFracIndexCR + vec2(0.5,0.5)));\n let newValue = getImage(\n bInd, sourceNearestCR.y, sourceNearestCR.x, d);\n setOutputAtIndex(index, newValue);\n }\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/CropAndResize.js\nvar cropAndResize5 = (args) => {\n const { inputs, backend: backend2, attrs } = args;\n const { image: image2, boxes, boxInd } = inputs;\n const { cropSize, method, extrapolationValue } = attrs;\n const program = new CropAndResizeProgram2(image2.shape[3], boxes.shape, cropSize, method);\n const uniformData = [{ type: \"float32\", data: [extrapolationValue] }];\n return backend2.runWebGPUProgram(program, [image2, boxes, boxInd], \"float32\", uniformData);\n};\nvar cropAndResizeConfig4 = {\n kernelName: CropAndResize,\n backendName: \"webgpu\",\n kernelFunc: cropAndResize5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/cum_webgpu.js\nvar CumOpType2;\n(function(CumOpType3) {\n CumOpType3[\"Prod\"] = \"*\";\n CumOpType3[\"Sum\"] = \"+\";\n})(CumOpType2 || (CumOpType2 = {}));\nvar CumProgram2 = class {\n constructor(op2, shape, exclusive, reverse5) {\n this.variableNames = [\"x\"];\n this.uniforms = \"index : f32,\";\n this.size = true;\n const workGroupSizeX = 128;\n this.workGroupSize = [workGroupSizeX, 1, 1];\n this.outputShape = shape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.exclusive = exclusive;\n this.reverse = reverse5;\n this.op = op2;\n this.shaderKey = `cum_${this.op}_${this.exclusive}_${this.reverse}`;\n }\n getUserCode() {\n const rank = this.outputShape.length;\n const initVal = this.op === CumOpType2.Prod ? \"1.0\" : \"0.0\";\n const val = this.exclusive ? initVal : `getX(${getCoords4(rank, \"coords\", this.op)})`;\n const length = this.outputShape[this.outputShape.length - 1];\n let condition = \"\";\n let idxString = \"\";\n if (this.exclusive) {\n condition = this.reverse ? `end != ${length - 1}` : \"end != 0\";\n idxString = this.reverse ? \"end + 1\" : \"end - 1\";\n } else {\n condition = this.reverse ? `end + pow2 < ${length}` : \"end >= pow2\";\n idxString = this.reverse ? \"end + pow2\" : \"end - pow2\";\n }\n return `\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n var coords = getCoordsFromIndex(index);\n\n let end = ${getFinalCoord2(rank, \"coords\", this.op)};\n var val = ${val};\n let pow2 = i32(pow(2.0, uniforms.index));\n if (${condition}) {\n let idx = ${idxString};\n ${getFinalCoord2(rank, \"coords\", this.op)} = idx;\n val ${this.op}= getX(${getCoords4(rank, \"coords\", this.op)});\n }\n setOutputAtIndex(index, val);\n }\n }\n `;\n }\n};\nfunction getCoords4(rank, name, op2) {\n if (rank === 1) {\n return `${name}`;\n } else if (rank === 2) {\n return `${name}.x, ${name}.y`;\n } else if (rank === 3) {\n return `${name}.x, ${name}.y, ${name}.z`;\n } else if (rank === 4) {\n return `${name}.x, ${name}.y, ${name}.z, ${name}.w`;\n } else {\n throw Error(`Cumulative ${op2} for rank ${rank} is not yet supported`);\n }\n}\nfunction getFinalCoord2(rank, name, op2) {\n if (rank === 1) {\n return `${name}`;\n } else if (rank === 2) {\n return `${name}.y`;\n } else if (rank === 3) {\n return `${name}.z`;\n } else if (rank === 4) {\n return `${name}.w`;\n } else {\n throw Error(`Cumulative ${op2} for rank ${rank} is not yet supported`);\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Cum_impl.js\nfunction cumImpl2(op2, x, backend2, axis, exclusive, reverse5) {\n const xRank = x.shape.length;\n const permutation = backend_util_exports.getAxesPermutation([axis], xRank);\n let permutedX = x;\n if (permutation != null) {\n permutedX = transpose5({ inputs: { x }, backend: backend2, attrs: { perm: permutation } });\n }\n const permutedAxis = backend_util_exports.getInnerMostAxes(1, xRank)[0];\n if (permutedAxis !== xRank - 1) {\n throw new Error(`WebGPU cumprod shader expects an inner-most axis=${x.shape.length - 1} but got axis=${axis}`);\n }\n const size = permutedX.shape[permutedAxis];\n let result = identity5({ inputs: { x: permutedX }, backend: backend2 });\n for (let i = 0; i <= Math.ceil(Math.log2(size)) - 1; i++) {\n const program = new CumProgram2(op2, permutedX.shape, false, reverse5);\n const prevResult = result;\n const uniformData = [{ type: \"float32\", data: [i] }];\n result = backend2.runWebGPUProgram(program, [result], result.dtype, uniformData);\n backend2.disposeData(prevResult.dataId);\n }\n if (exclusive) {\n const program = new CumProgram2(op2, permutedX.shape, exclusive, reverse5);\n const prevResult = result;\n const uniformData = [{ type: \"float32\", data: [0] }];\n result = backend2.runWebGPUProgram(program, [result], result.dtype, uniformData);\n backend2.disposeData(prevResult.dataId);\n }\n if (permutation != null) {\n const reversePermutation = backend_util_exports.getUndoAxesPermutation(permutation);\n const reverseTransposedResult = transpose5({ inputs: { x: result }, backend: backend2, attrs: { perm: reversePermutation } });\n backend2.disposeData(result.dataId);\n backend2.disposeData(permutedX.dataId);\n return reverseTransposedResult;\n }\n return result;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Cumprod.js\nfunction cumprod5(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis, exclusive, reverse: reverse5 } = attrs;\n return cumImpl2(CumOpType2.Prod, x, backend2, axis, exclusive, reverse5);\n}\nvar cumprodConfig4 = {\n kernelName: Cumprod,\n backendName: \"webgpu\",\n kernelFunc: cumprod5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Cumsum.js\nfunction cumsum5(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis, exclusive, reverse: reverse5 } = attrs;\n return cumImpl2(CumOpType2.Sum, x, backend2, axis, exclusive, reverse5);\n}\nvar cumsumConfig4 = {\n kernelName: Cumsum,\n backendName: \"webgpu\",\n kernelFunc: cumsum5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/depth_to_space_webgpu.js\nvar DepthToSpaceProgram2 = class {\n constructor(outputShape, dataFormat) {\n this.variableNames = [\"x\"];\n this.workGroupSize = [64, 1, 1];\n this.size = true;\n this.uniforms = \"blockSize : i32,\";\n this.outputShape = outputShape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.shaderKey = `depthToSpace_${dataFormat}`;\n this.dataFormat = dataFormat;\n }\n getUserCode() {\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let coords = getCoordsFromIndex(index);\n let b = coords[0];\n let h = ${this.getHeightCoordString()};\n let w = ${this.getWidthCoordString()};\n let d = ${this.getDepthCoordString()};\n\n let in_h = h / uniforms.blockSize;\n let offset_h = h % uniforms.blockSize;\n let in_w = w / uniforms.blockSize;\n let offset_w = w % uniforms.blockSize;\n let offset_d = (offset_h * uniforms.blockSize + offset_w) *\n ${this.getOutputDepthSize()};\n let in_d = d + offset_d;\n\n let rlt = ${this.getInputSamplingString()};\n setOutputAtIndex(index, rlt);\n }\n }`;\n return userCode;\n }\n getHeightCoordString() {\n if (this.dataFormat === \"NHWC\") {\n return `coords[1]`;\n } else {\n return `coords[2]`;\n }\n }\n getWidthCoordString() {\n if (this.dataFormat === \"NHWC\") {\n return `coords[2]`;\n } else {\n return `coords[3]`;\n }\n }\n getDepthCoordString() {\n if (this.dataFormat === \"NHWC\") {\n return `coords[3]`;\n } else {\n return `coords[1]`;\n }\n }\n getOutputDepthSize() {\n if (this.dataFormat === \"NHWC\") {\n return `uniforms.outShape[3]`;\n } else {\n return `uniforms.outShape[1]`;\n }\n }\n getInputSamplingString() {\n if (this.dataFormat === \"NHWC\") {\n return `getX(b, in_h, in_w, in_d)`;\n } else {\n return `getX(b, in_d, in_h, in_w)`;\n }\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/DepthToSpace.js\nfunction depthToSpace5(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { blockSize, dataFormat } = attrs;\n const batchSize = x.shape[0];\n const inputHeight = dataFormat === \"NHWC\" ? x.shape[1] : x.shape[2];\n const inputWidth = dataFormat === \"NHWC\" ? x.shape[2] : x.shape[3];\n const inputDepth = dataFormat === \"NHWC\" ? x.shape[3] : x.shape[1];\n const outputHeight = inputHeight * blockSize;\n const outputWidth = inputWidth * blockSize;\n const outputDepth = inputDepth / (blockSize * blockSize);\n const outputShape = dataFormat === \"NHWC\" ? [batchSize, outputHeight, outputWidth, outputDepth] : [batchSize, outputDepth, outputHeight, outputWidth];\n const uniformData = [\n { type: \"int32\", data: [blockSize] }\n ];\n const program = new DepthToSpaceProgram2(outputShape, dataFormat);\n return backend2.runWebGPUProgram(program, [x], x.dtype, uniformData);\n}\nvar depthToSpaceConfig4 = {\n kernelName: DepthToSpace,\n backendName: \"webgpu\",\n kernelFunc: depthToSpace5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/depthwise_conv2d_nchw_shared_webgpu.js\nvar DepthwiseConv2DNCHWSharedProgram = class {\n constructor(outputShape, filterHeight, filterWidth, addBias = false, activation2 = null, hasPreluActivation = false) {\n this.variableNames = [\"x\", \"W\"];\n this.uniforms = `pad : vec2, inDims : vec2,`;\n this.workGroupSize = [16, 16, 1];\n this.outputShape = outputShape;\n this.dispatchLayout = { x: [3], y: [2], z: [0, 1] };\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n if (addBias) {\n this.variableNames.push(\"bias\");\n }\n if (hasPreluActivation) {\n this.variableNames.push(\"preluActivationWeights\");\n }\n this.addBias = addBias;\n this.activation = activation2;\n this.hasPreluActivation = hasPreluActivation;\n this.filterHeight = filterHeight;\n this.filterWidth = filterWidth;\n this.shaderKey = `depthwiseNCHW_${this.activation}_${this.filterHeight}_${this.filterWidth}`;\n }\n getUserCode() {\n const filterSize = this.filterWidth * this.filterHeight;\n const workGroupSize = this.workGroupSize[0] * this.workGroupSize[1] * this.workGroupSize[2];\n const tileAHeight = this.workGroupSize[1] + this.filterHeight - 1;\n const tileAWidth = this.workGroupSize[0] + this.filterWidth - 1;\n const userCode = `\n ${activationFnSnippet(this.activation, this.hasPreluActivation, false, 4)}\n\n var mm_Asub : array, ${tileAHeight}>;\n var mm_Bsub : array, ${this.filterHeight}>;\n fn readX(batch : i32, channel : i32, row : i32, col : i32) -> f32 {\n var value = 0.0;\n if (row >=0 && row < uniforms.inDims[0] && col >=0 && col < uniforms.inDims[1])\n {\n value = getX(batch, channel, row, col);\n }\n return value;\n }\n\n ${getWorkGroupSizeString()}\n fn _start(@builtin(local_invocation_id) LocalId : vec3,\n @builtin(global_invocation_id) GlobalId : vec3,\n @builtin(local_invocation_index) LocalIndex: u32,\n @builtin(num_workgroups) NumWorkgroups: vec3) {\n localId = LocalId;\n globalId = GlobalId;\n let localIndex = i32(LocalIndex);\n numWorkgroups = NumWorkgroups;\n let coords = getOutputCoords();\n let batch = coords[0];\n let xRCCorner = vec2(coords.zw) - uniforms.pad;\n let channelMul = uniforms.wShape[3];\n let d1 = coords[1] / channelMul;\n let q = coords[1] % channelMul;\n\n let inputRowStart = xRCCorner.x;\n let inputColStart = xRCCorner.y;\n\n let localRow = i32(localId.y);\n let localCol = i32(localId.x);\n\n // Load one tile of X into local memory.\n for (var inputRow = localRow; inputRow < ${tileAHeight}; inputRow = inputRow + ${this.workGroupSize[1]}) {\n for (var inputCol = localCol; inputCol < ${tileAWidth}; inputCol = inputCol + ${this.workGroupSize[0]}) {\n let rowOffset = inputRow - localRow;\n let colOffset = inputCol - localCol;\n mm_Asub[inputRow][inputCol] = readX(batch, d1, inputRowStart + rowOffset, inputColStart + colOffset);\n }\n }\n\n // Load one tile of W into local memory.\n var wIndex = localIndex;\n ${filterSize < workGroupSize ? `if (wIndex < ${filterSize})` : `for(; wIndex < ${filterSize}; wIndex = wIndex + ${workGroupSize})`}\n\n {\n let wRow = wIndex / ${this.filterWidth};\n let wCol = wIndex % ${this.filterWidth};\n mm_Bsub[wRow][wCol] = getW(wRow, wCol, d1, q);\n }\n\n workgroupBarrier();\n\n var value = 0.0;\n for (var wR = 0; wR < ${this.filterHeight}; wR = wR + 1) {\n for (var wC = 0; wC < ${this.filterWidth}; wC = wC + 1) {\n let xVal = mm_Asub[localRow + wR][localCol + wC];\n let wVal = mm_Bsub[wR][wC];\n value = fma(xVal, wVal, value);\n }\n }\n ${biasActivationSnippet(this.addBias, this.activation)}\n if (coordsInBounds4D(coords, uniforms.outShape)) {\n setOutputAtCoords(coords[0], coords[1], coords[2], coords[3], value);\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/depthwise_conv2d_vec4_webgpu.js\nvar DepthwiseConv2DVec4Program = class {\n constructor(convInfo, addBias = false, activation2 = null, hasPreluActivation = false) {\n this.variableNames = [\"x\", \"W\"];\n this.uniforms = \"pad : vec2, inDims : vec2,\";\n this.workGroupSize = [4, 4, 4];\n this.isVec4 = true;\n this.outputShape = convInfo.outShape;\n this.dispatchLayout = { x: [3], y: [2], z: [0, 1] };\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize, [4, 4, 1]);\n util_exports.assert(convInfo.dataFormat === \"channelsLast\", () => \"TODO: NCHW is unimplemented\");\n if (addBias) {\n this.variableNames.push(\"bias\");\n }\n if (hasPreluActivation) {\n this.variableNames.push(\"preluActivationWeights\");\n }\n this.convInfo = convInfo;\n this.addBias = addBias;\n this.activation = activation2;\n this.hasPreluActivation = hasPreluActivation;\n this.shaderKey = `depthwiseVec4_${activation2}_${this.convInfo.filterHeight}_${this.convInfo.filterWidth}`;\n }\n getUserCode() {\n const xNumber = 4 + this.convInfo.filterWidth - 1;\n const userCode = `\n ${activationFnSnippet(this.activation, this.hasPreluActivation, true, 4)}\n fn readX(batch : i32, row : i32, col : i32, channel : i32) -> vec4 {\n var value = vec4(0.0);\n if (row >=0 && row < uniforms.inDims[0] && col >=0 && col < uniforms.inDims[1])\n {\n value = getX(batch, row, col, channel);\n }\n return value;\n }\n ${getWorkGroupSizeString()}\n fn _start(@builtin(global_invocation_id) globalId: vec3) {\n let batch = i32(globalId.z) / uniforms.outShape[1];\n let r = i32(globalId.z) % uniforms.outShape[1];\n let c = i32(globalId.y) * 4;\n let d1 = i32(globalId.x) * 4;\n let xRCCorner = vec2(r, c) - uniforms.pad;\n\n let xRCorner = xRCCorner.x;\n let xCCorner = xRCCorner.y;\n var xVals : array, ${xNumber}>;\n var dotProd : array, 4>;\n dotProd[0] = vec4(0.0);\n dotProd[1] = vec4(0.0);\n dotProd[2] = vec4(0.0);\n dotProd[3] = vec4(0.0);\n\n // Use constant instead of uniform can give better performance.\n for (var wR = 0; wR < ${this.convInfo.filterHeight}; wR = wR + 1) {\n let xR = xRCorner + wR;\n for (var i = 0; i < ${xNumber}; i++)\n {\n xVals[i] = readX(batch, xR, xCCorner + i, d1);\n }\n for (var wC = 0; wC < ${this.convInfo.filterWidth}; wC = wC + 1) {\n let wValue = getW(wR, wC, d1, 0);\n dotProd[0] = dotProd[0] + xVals[0 + wC] * wValue;\n dotProd[1] = dotProd[1] + xVals[1 + wC] * wValue;\n dotProd[2] = dotProd[2] + xVals[2 + wC] * wValue;\n dotProd[3] = dotProd[3] + xVals[3 + wC] * wValue;\n }\n }\n\n for (var i = 0; i < 4; i = i + 1) {\n let coords = vec4(batch, r, c + i, d1);\n if (coordsInBounds4D(coords, uniforms.outShape)) {\n var value = dotProd[i];\n ${biasActivationSnippet(this.addBias, this.activation)}\n setOutputAtCoords(coords[0], coords[1], coords[2], coords[3], value);\n }\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/depthwise_conv2d_webgpu.js\nvar DepthwiseConv2DProgram2 = class {\n constructor(convInfo, addBias = false, activation2 = null, hasPreluActivation = false) {\n this.variableNames = [\"x\", \"W\"];\n this.uniforms = `pad : vec2, inDims : vec2, filterHeight : i32,\n filterWidth : i32, stride : vec2, dilation : vec2,`;\n this.workGroupSize = [256, 1, 1];\n this.outputShape = convInfo.outShape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.isChannelsLast = convInfo.dataFormat === \"channelsLast\";\n if (addBias) {\n this.variableNames.push(\"bias\");\n }\n if (hasPreluActivation) {\n this.variableNames.push(\"preluActivationWeights\");\n }\n this.convInfo = convInfo;\n this.addBias = addBias;\n this.activation = activation2;\n this.hasPreluActivation = hasPreluActivation;\n this.shaderKey = `depthwise_${this.activation}_${this.isChannelsLast}`;\n }\n getUserCode() {\n const getXSnippet = this.isChannelsLast ? \"getX(batch, xR, xC, d1);\" : \"getX(batch, d1, xR, xC);\";\n const userCode = `\n ${activationFnSnippet(this.activation, this.hasPreluActivation, false, 4)}\n\n ${getMainHeaderString()} {\n let coords = getOutputCoords();\n let batch = coords[0];\n let xRCCorner = vec2(coords.${this.isChannelsLast ? \"yz\" : \"zw\"}) * uniforms.stride - uniforms.pad;\n let d2 = coords[${this.isChannelsLast ? 3 : 1}];\n let channelMul = uniforms.wShape[3];\n let d1 = d2 / channelMul;\n let q = d2 % channelMul;\n\n let inputRowStart = xRCCorner.x;\n let inputColStart = xRCCorner.y;\n let inputRowEnd = inputRowStart + uniforms.filterHeight *\n uniforms.dilation[0];\n let inputColEnd = inputColStart + uniforms.filterWidth *\n uniforms.dilation[1];\n\n // Convolve x(?, ?, d1)|x(d1, ?, ?) with w(:, :, d1, q) to get\n // y(yR, yC, d2)|y(d2, yR, yC). ? = to be determined. : = across all\n // values in that axis. x(?, ?, d1) and y(yR, yC, d2) is for NHWC.\n // x(d1, ?, ?) and y(d2, yR, yC) is for NCHW.\n var value = 0.0;\n\n // Extract if checking out of for loop for performance.\n if (inputRowStart >= 0 && inputColStart >= 0 &&\n inputRowEnd < uniforms.inDims[0] &&\n inputColEnd < uniforms.inDims[1]) {\n for (var wR = 0; wR < uniforms.filterHeight; wR = wR + 1) {\n let xR = inputRowStart + wR * uniforms.dilation[0];\n\n for (var wC = 0; wC < uniforms.filterWidth; wC = wC + 1) {\n let xC = inputColStart + wC * uniforms.dilation[1];\n\n let xVal = ${getXSnippet};\n let wVal = getW(wR, wC, d1, q);\n value = value + xVal * wVal;\n }\n }\n } else {\n for (var wR = 0; wR < uniforms.filterHeight; wR = wR + 1) {\n let xR = inputRowStart + wR * uniforms.dilation[0];\n\n if (xR < 0 || xR >= uniforms.inDims[0]) {\n continue;\n }\n\n for (var wC = 0; wC < uniforms.filterWidth; wC = wC + 1) {\n let xC = inputColStart + wC * uniforms.dilation[1];\n\n if (xC < 0 || xC >= uniforms.inDims[1]) {\n continue;\n }\n\n let xVal = ${getXSnippet};\n let wVal = getW(wR, wC, d1, q);\n value = value + xVal * wVal;\n }\n }\n }\n ${biasActivationSnippet(this.addBias, this.activation)}\n if (coordsInBounds4D(coords, uniforms.outShape)) {\n setOutputAtCoords(coords[0], coords[1], coords[2], coords[3], value);\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/DepthwiseConv2dNative.js\nfunction depthwiseConv2dNative3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, filter } = inputs;\n const { strides, pad: pad3, dataFormat, dilations, dimRoundingMode } = attrs;\n const $dataFormat = backend_util_exports.convertConv2DDataFormat(dataFormat);\n let $dilations = dilations;\n if ($dilations == null) {\n $dilations = [1, 1];\n }\n const convInfo = backend_util_exports.computeConv2DInfo(x.shape, filter.shape, strides, $dilations, pad3, dimRoundingMode, true, $dataFormat);\n const dimensions = [\n { type: \"int32\", data: [convInfo.padInfo.top, convInfo.padInfo.left] },\n { type: \"int32\", data: [convInfo.inHeight, convInfo.inWidth] }\n ];\n const isChannelsLast = convInfo.dataFormat === \"channelsLast\";\n let program;\n if (!isChannelsLast && convInfo.inHeight > 16 && convInfo.inWidth > 16 && convInfo.strideHeight === 1 && convInfo.strideWidth === 1 && convInfo.dilationWidth === 1 && convInfo.dilationHeight === 1 && convInfo.inChannels === convInfo.outChannels) {\n program = new DepthwiseConv2DNCHWSharedProgram(convInfo.outShape, convInfo.filterHeight, convInfo.filterWidth);\n } else if (isChannelsLast && convInfo.inHeight > 4 && convInfo.inWidth > 4 && convInfo.strideHeight === 1 && convInfo.strideWidth === 1 && convInfo.inChannels === convInfo.outChannels && convInfo.dilationHeight === 1 && convInfo.dilationWidth === 1 && convInfo.inChannels % 4 === 0) {\n program = new DepthwiseConv2DVec4Program(convInfo);\n } else {\n program = new DepthwiseConv2DProgram2(convInfo);\n dimensions.push({ type: \"int32\", data: [convInfo.filterHeight] }, { type: \"int32\", data: [convInfo.filterWidth] }, { type: \"int32\", data: [convInfo.strideHeight, convInfo.strideWidth] }, {\n type: \"int32\",\n data: [convInfo.dilationHeight, convInfo.dilationWidth]\n });\n }\n return backend2.runWebGPUProgram(program, [x, filter], x.dtype, dimensions);\n}\nvar depthwiseConv2dNativeConfig4 = {\n kernelName: DepthwiseConv2dNative,\n backendName: \"webgpu\",\n kernelFunc: depthwiseConv2dNative3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Multiply.js\nvar multiplyKernelFunc = binaryKernelFunc3({\n opType: BinaryOpType.MUL,\n cpuKernelImpl: multiplyImplCPU2,\n supportsComplex: true\n});\nvar multiplyConfig4 = {\n kernelName: Multiply,\n backendName: \"webgpu\",\n kernelFunc: multiplyKernelFunc\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Sum.js\nfunction sum6(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis, keepDims } = attrs;\n return reduce2(x, axis, keepDims, \"sum\", backend2);\n}\nvar sumConfig4 = {\n kernelName: Sum,\n backendName: \"webgpu\",\n kernelFunc: sum6\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Einsum.js\nfunction einsum4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { equation } = attrs;\n const tensors = inputs;\n const { allDims, summedDims, idDims } = backend_util_exports.decodeEinsumEquation(equation, tensors.length);\n backend_util_exports.checkEinsumDimSizes(allDims.length, idDims, tensors);\n const { path, steps } = backend_util_exports.getEinsumComputePath(summedDims, idDims);\n const nSteps = steps.length;\n let out = null;\n let numDimsRemaining = allDims.length;\n const tensorsToDispose = [];\n for (let i = 0; i < nSteps; ++i) {\n for (const idTerm of steps[i]) {\n const { permutationIndices: perm, expandDims: dimsToExpand } = backend_util_exports.getEinsumPermutation(numDimsRemaining, idDims[idTerm]);\n let x;\n if (backend_util_exports.isIdentityPermutation(perm)) {\n x = tensors[idTerm];\n } else {\n x = transpose5({ inputs: { x: tensors[idTerm] }, backend: backend2, attrs: { perm } });\n tensorsToDispose.push(x);\n }\n const targetShape = x.shape.slice();\n for (let k = 0; k < dimsToExpand.length; ++k) {\n targetShape.splice(dimsToExpand[k], 0, 1);\n }\n if (!util_exports.arraysEqual(x.shape, targetShape)) {\n x = reshape6({ inputs: { x }, backend: backend2, attrs: { shape: targetShape } });\n tensorsToDispose.push(x);\n }\n if (out === null) {\n out = x;\n } else {\n out = multiplyKernelFunc({ inputs: { a: x, b: out }, backend: backend2 });\n tensorsToDispose.push(out);\n }\n }\n if (i < nSteps - 1) {\n if (path[i] >= 0) {\n out = sum6({\n inputs: { x: out },\n backend: backend2,\n attrs: {\n axis: path[i] - (allDims.length - numDimsRemaining),\n keepDims: false\n }\n });\n tensorsToDispose.push(out);\n }\n numDimsRemaining--;\n }\n }\n for (const tensorInfo of tensorsToDispose) {\n if (tensorInfo === out) {\n continue;\n }\n backend2.disposeData(tensorInfo.dataId);\n }\n return out;\n}\nvar einsumConfig3 = {\n kernelName: Einsum,\n backendName: \"webgpu\",\n kernelFunc: einsum4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Elu.js\nvar elu6 = unaryKernelFunc3({ opType: UnaryOpType.ELU });\nvar eluConfig4 = {\n kernelName: Elu,\n backendName: \"webgpu\",\n kernelFunc: elu6\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Equal.js\nvar equal4 = binaryKernelFunc3({ opType: BinaryOpType.EQUAL, dtype: \"bool\", cpuKernelImpl: equalImplCPU2 });\nvar equalConfig4 = {\n kernelName: Equal,\n backendName: \"webgpu\",\n kernelFunc: equal4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Exp.js\nvar exp4 = unaryKernelFunc3({\n opType: UnaryOpType.EXP,\n cpuKernelImpl: expImplCPU2,\n dtype: \"float32\"\n});\nvar expConfig4 = {\n kernelName: Exp,\n backendName: \"webgpu\",\n kernelFunc: exp4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/ExpandDims.js\nfunction expandDims6(args) {\n const { inputs, attrs, backend: backend2 } = args;\n const { dim } = attrs;\n const { input: input2 } = inputs;\n const inputRank = input2.shape.length;\n const newShape = input2.shape.slice();\n let $dim = dim;\n if (dim < 0) {\n util_exports.assert(-(inputRank + 1) <= dim, () => `Axis must be in the interval [${-(inputRank + 1)}, ${inputRank}]`);\n $dim = inputRank + dim + 1;\n }\n newShape.splice($dim, 0, 1);\n return reshape6({ inputs: { x: input2 }, backend: backend2, attrs: { shape: newShape } });\n}\nvar expandDimsConfig4 = {\n kernelName: ExpandDims,\n backendName: \"webgpu\",\n kernelFunc: expandDims6\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Expm1.js\nvar expm14 = unaryKernelFunc3({ opType: UnaryOpType.EXPM1, cpuKernelImpl: expm1ImplCPU2 });\nvar expm1Config3 = {\n kernelName: Expm1,\n backendName: \"webgpu\",\n kernelFunc: expm14\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/flip_left_right_webgpu.js\nvar FlipLeftRightProgram2 = class {\n constructor(imageShape) {\n this.outputShape = [];\n this.variableNames = [\"x\"];\n this.workGroupSize = [64, 1, 1];\n this.size = true;\n this.outputShape = imageShape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.shaderKey = \"flipLeftRight\";\n }\n getUserCode() {\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let coords = getCoordsFromIndex(index);\n let coordX = uniforms.xShape[2] - coords[2] - 1;\n let outputValue = getX(coords[0], coords[1], coordX, coords[3]);\n setOutputAtIndex(index, outputValue);\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/FlipLeftRight.js\nvar flipLeftRightConfig4 = {\n kernelName: FlipLeftRight,\n backendName: \"webgpu\",\n kernelFunc: ({ inputs, backend: backend2 }) => {\n const { image: image2 } = inputs;\n const webgpuBackend = backend2;\n const program = new FlipLeftRightProgram2(image2.shape);\n const output = webgpuBackend.runWebGPUProgram(program, [image2], image2.dtype);\n return output;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Floor.js\nvar floor4 = unaryKernelFunc3({ opType: UnaryOpType.FLOOR, cpuKernelImpl: floorImplCPU2 });\nvar floorConfig4 = {\n kernelName: Floor,\n backendName: \"webgpu\",\n kernelFunc: floor4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/FloorDiv.js\nvar floorDiv4 = binaryKernelFunc3({ opType: BinaryOpType.INT_DIV, dtype: \"int32\" });\nvar floorDivConfig4 = {\n kernelName: FloorDiv,\n backendName: \"webgpu\",\n kernelFunc: floorDiv4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/from_pixels_webgpu.js\nvar FromPixelsProgram2 = class {\n constructor(outputShape, numChannels, importVideo = false) {\n this.isFromPixels = true;\n this.outputShape = [0];\n this.variableNames = [];\n this.workGroupSize = [256, 1, 1];\n this.outputShape = outputShape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize, [numChannels, 1, 1]);\n this.importVideo = importVideo;\n this.shaderKey = `fromPixels_${this.importVideo}`;\n }\n getUserCode() {\n const textureLoad = this.importVideo ? \"textureLoad(src, vec2(coords.yx));\" : \"textureLoad(src, vec2(coords.yx), 0)\";\n const textureType = this.importVideo ? \"texture_external\" : \"texture_2d\";\n return `\n @binding(1) @group(0) var src: ${textureType};\n ${getMainHeaderString(\"index\")} {\n let flatIndex = index * uniforms.numChannels;\n if (flatIndex < uniforms.size) {\n let coords = getCoordsFromIndex(flatIndex);\n let values = ${textureLoad};\n for (var i = 0; i < uniforms.numChannels; i = i + 1) {\n result[flatIndex + i] = i32(floor(255.0 * values[i]));\n }\n }\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/FromPixels.js\nvar fromPixelsConfig2 = {\n kernelName: FromPixels,\n backendName: \"webgpu\",\n kernelFunc: fromPixels3\n};\nvar fromPixels2DContext3;\nvar willReadFrequently2 = env().getBool(\"CANVAS2D_WILL_READ_FREQUENTLY_FOR_GPU\");\nvar videoToTextureMap = /* @__PURE__ */ new Map();\nfunction fromPixels3(args) {\n const { inputs, backend: backend2, attrs } = args;\n let { pixels } = inputs;\n const { numChannels } = attrs;\n if (pixels == null) {\n throw new Error(\"pixels passed to tf.browser.fromPixels() can not be null\");\n }\n const isVideo = typeof HTMLVideoElement !== \"undefined\" && pixels instanceof HTMLVideoElement;\n const isImage = typeof HTMLImageElement !== \"undefined\" && pixels instanceof HTMLImageElement;\n const isCanvas = typeof HTMLCanvasElement !== \"undefined\" && pixels instanceof HTMLCanvasElement || typeof OffscreenCanvas !== \"undefined\" && pixels instanceof OffscreenCanvas;\n const isImageBitmap = typeof ImageBitmap !== \"undefined\" && pixels instanceof ImageBitmap;\n const [width, height] = isVideo ? [\n pixels.videoWidth,\n pixels.videoHeight\n ] : [pixels.width, pixels.height];\n const outputShape = [height, width, numChannels];\n const importVideo = env().getBool(\"WEBGPU_IMPORT_EXTERNAL_TEXTURE\") && isVideo;\n const isVideoOrImage = isVideo || isImage;\n if (isImageBitmap || isCanvas || isVideoOrImage) {\n let textureInfo;\n if (importVideo) {\n const videoElement = pixels;\n if (!videoToTextureMap.has(videoElement) || videoToTextureMap.get(videoElement).expired) {\n const externalTextureDescriptor = { source: videoElement };\n videoToTextureMap.set(videoElement, backend2.device.importExternalTexture(externalTextureDescriptor));\n }\n textureInfo = {\n width,\n height,\n format: null,\n usage: null,\n texture: videoToTextureMap.get(videoElement)\n };\n } else {\n if (isVideoOrImage) {\n const newWillReadFrequently = env().getBool(\"CANVAS2D_WILL_READ_FREQUENTLY_FOR_GPU\");\n if (fromPixels2DContext3 == null || newWillReadFrequently !== willReadFrequently2) {\n willReadFrequently2 = newWillReadFrequently;\n fromPixels2DContext3 = document.createElement(\"canvas\").getContext(\"2d\", { willReadFrequently: willReadFrequently2 });\n }\n fromPixels2DContext3.canvas.width = width;\n fromPixels2DContext3.canvas.height = height;\n fromPixels2DContext3.drawImage(pixels, 0, 0, width, height);\n pixels = fromPixels2DContext3.canvas;\n }\n const usage = GPUTextureUsage.COPY_DST | GPUTextureUsage.RENDER_ATTACHMENT | GPUTextureUsage.TEXTURE_BINDING;\n const format = \"rgba8unorm\";\n const texture = backend2.textureManager.acquireTexture(outputShape[1], outputShape[0], format, usage);\n backend2.queue.copyExternalImageToTexture({ source: pixels }, { texture }, [outputShape[1], outputShape[0]]);\n textureInfo = { width, height, format, usage, texture };\n }\n const size = util_exports.sizeFromShape(outputShape);\n const strides = util_exports.computeStrides(outputShape);\n const program = new FromPixelsProgram2(outputShape, numChannels, importVideo);\n const uniformData = [\n { type: \"uint32\", data: [size] },\n { type: \"uint32\", data: [numChannels] },\n { type: \"uint32\", data: [...strides] }\n ];\n const input2 = backend2.makeTensorInfo([height, width], \"int32\");\n const info = backend2.tensorMap.get(input2.dataId);\n info.resourceInfo = textureInfo;\n const result = backend2.runWebGPUProgram(program, [input2], \"int32\", uniformData);\n backend2.disposeData(input2.dataId);\n return result;\n }\n const imageData = pixels.data;\n let pixelArray = imageData;\n if (numChannels != null && numChannels !== 4) {\n pixelArray = new Uint8Array(pixels.width * pixels.height * numChannels);\n const dataLength = imageData.length;\n let j = 0;\n for (let i = 0; i < dataLength; i++) {\n if (i % 4 < numChannels) {\n pixelArray[j++] = imageData[i];\n }\n }\n }\n const output = backend2.makeTensorInfo(outputShape, \"int32\", new Int32Array(pixelArray));\n backend2.uploadToGPU(output.dataId);\n return output;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/batchnorm_webgpu.js\nvar BatchNormProgram2 = class {\n constructor(xShape, meanShape, varianceShape, offsetShape, scaleShape) {\n this.uniforms = \"varianceEpsilon : f32,\";\n this.workGroupSize = [128, 1, 1];\n this.size = true;\n this.variableNames = [\"x\", \"mean\", \"variance\"];\n backend_util_exports.assertAndGetBroadcastShape(xShape, meanShape);\n backend_util_exports.assertAndGetBroadcastShape(xShape, varianceShape);\n this.outputShape = xShape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n if (offsetShape != null) {\n backend_util_exports.assertAndGetBroadcastShape(xShape, offsetShape);\n this.variableNames.push(\"offset\");\n }\n if (scaleShape != null) {\n backend_util_exports.assertAndGetBroadcastShape(xShape, scaleShape);\n this.variableNames.push(\"scale\");\n }\n this.offsetShape = offsetShape;\n this.scaleShape = scaleShape;\n this.shaderKey = \"batchNorm\";\n }\n getUserCode() {\n let offsetSnippet = \"0.0\";\n if (this.offsetShape != null) {\n offsetSnippet = \"getOffsetByOutputIndex(index)\";\n }\n let scaleSnippet = \"1.0\";\n if (this.scaleShape != null) {\n scaleSnippet = \"getScaleByOutputIndex(index)\";\n }\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size)\n {\n let xValue = getXByOutputIndex(index);\n let meanValue = getMeanByOutputIndex(index);\n let varianValue = getVarianceByOutputIndex(index);\n let offsetValue = ${offsetSnippet};\n let scaleValue = ${scaleSnippet};\n let inv = scaleValue * inverseSqrt(varianValue + f32(uniforms.varianceEpsilon));\n setOutputAtIndex(index,dot(vec3(xValue, -meanValue, offsetValue), vec3(inv, inv, 1.0)));\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/FusedBatchNorm.js\nvar fusedBatchNormConfig2 = {\n kernelName: FusedBatchNorm,\n backendName: \"webgpu\",\n kernelFunc: ({ inputs, attrs, backend: backend2 }) => {\n const { x, scale: scale2, offset, mean: mean5, variance } = inputs;\n const { varianceEpsilon } = attrs;\n const webGPUBackend = backend2;\n const batchNormInputs = [x, mean5, variance];\n let offsetShape = null;\n if (offset != null) {\n offsetShape = offset.shape;\n batchNormInputs.push(offset);\n }\n let scaleShape = null;\n if (scale2 != null) {\n scaleShape = scale2.shape;\n batchNormInputs.push(scale2);\n }\n const program = new BatchNormProgram2(x.shape, mean5.shape, variance.shape, offsetShape, scaleShape);\n const uniformData = [{ type: \"float32\", data: [varianceEpsilon] }];\n return webGPUBackend.runWebGPUProgram(program, batchNormInputs, x.dtype, uniformData);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/FusedConv2D.js\nfunction fusedConv2d3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, filter, bias, preluActivationWeights } = inputs;\n const { strides, pad: pad3, dataFormat, dilations, dimRoundingMode, activation: activation2, leakyreluAlpha } = attrs;\n const $dataFormat = backend_util_exports.convertConv2DDataFormat(dataFormat);\n const convInfo = backend_util_exports.computeConv2DInfo(x.shape, filter.shape, strides, dilations, pad3, dimRoundingMode, false, $dataFormat);\n return conv2DImpl({\n x,\n filter,\n convInfo,\n backend: backend2,\n bias,\n preluActivationWeights,\n leakyreluAlpha,\n activation: activation2\n });\n}\nvar fusedConv2DConfig4 = {\n kernelName: FusedConv2D,\n backendName: \"webgpu\",\n kernelFunc: fusedConv2d3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/FusedDepthwiseConv2D.js\nfunction fusedDepthwiseConv2D3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, filter, bias, preluActivationWeights } = inputs;\n const { strides, pad: pad3, dilations, dimRoundingMode, activation: activation2, leakyreluAlpha } = attrs;\n let $dilations = dilations;\n if ($dilations == null) {\n $dilations = [1, 1];\n }\n util_exports.assert(backend_util_exports.eitherStridesOrDilationsAreOne(strides, $dilations), () => `Error in depthwiseConv2d: Either strides or dilations must be 1. Got strides ${strides} and dilations '${$dilations}'`);\n const convInfo = backend_util_exports.computeConv2DInfo(x.shape, filter.shape, strides, $dilations, pad3, dimRoundingMode, true);\n const programInputs = [x, filter];\n const hasBias = bias != null;\n const hasPreluActivationWeights = preluActivationWeights != null;\n if (hasBias) {\n programInputs.push(bias);\n }\n if (hasPreluActivationWeights) {\n programInputs.push(preluActivationWeights);\n }\n const dimensions = [\n { type: \"int32\", data: [convInfo.padInfo.top, convInfo.padInfo.left] },\n { type: \"int32\", data: [convInfo.inHeight, convInfo.inWidth] }\n ];\n let program;\n if (convInfo.inHeight > 4 && convInfo.inWidth > 4 && convInfo.strideHeight === 1 && convInfo.strideWidth === 1 && convInfo.inChannels === convInfo.outChannels && convInfo.dilationHeight === 1 && convInfo.dilationWidth === 1 && convInfo.inChannels % 4 === 0) {\n program = new DepthwiseConv2DVec4Program(convInfo, hasBias, activation2, hasPreluActivationWeights);\n } else {\n program = new DepthwiseConv2DProgram2(convInfo, hasBias, activation2, hasPreluActivationWeights);\n dimensions.push({ type: \"int32\", data: [convInfo.filterHeight] }, { type: \"int32\", data: [convInfo.filterWidth] }, { type: \"int32\", data: [convInfo.strideHeight, convInfo.strideWidth] }, {\n type: \"int32\",\n data: [convInfo.dilationHeight, convInfo.dilationWidth]\n });\n }\n if (activation2 === \"leakyrelu\") {\n dimensions.push({ type: \"float32\", data: [leakyreluAlpha] });\n program.uniforms += \" alpha : f32,\";\n }\n const result = backend2.runWebGPUProgram(program, programInputs, \"float32\", dimensions);\n return result;\n}\nvar fusedDepthwiseConv2DConfig4 = {\n kernelName: FusedDepthwiseConv2D,\n backendName: \"webgpu\",\n kernelFunc: fusedDepthwiseConv2D3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/gather_nd_webgpu.js\nvar GatherNDProgram2 = class {\n constructor(sliceDim, shape) {\n this.variableNames = [\"A\", \"indices\"];\n this.workGroupSize = [64, 1, 1];\n this.size = true;\n this.outputShape = shape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.shaderKey = `gathernd_${sliceDim}`;\n this.sliceDim = sliceDim;\n this.uniforms = `sliceDim : i32, strides : ${getCoordsDataType2(sliceDim)},`;\n }\n getUserCode() {\n let strideString;\n if (this.sliceDim > 1) {\n strideString = \"uniforms.strides[j]\";\n } else {\n strideString = \"uniforms.strides\";\n }\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let coords = getCoordsFromIndex(index);\n var flattenIndex = 0;\n for (var j = 0; j < uniforms.sliceDim; j = j + 1) {\n let indexTemp = i32(round(getIndices(coords[0], j)));\n let strideNum = ${strideString};\n flattenIndex = flattenIndex + indexTemp * strideNum;\n }\n\n setOutputAtIndex(index, getA(flattenIndex, coords[1]));\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/GatherNd.js\nfunction gatherNd4(args) {\n const { inputs, backend: backend2 } = args;\n const { params, indices } = inputs;\n const indicesShape = indices.shape;\n const sliceRank = indicesShape[indicesShape.length - 1];\n const paramsSize = util_exports.sizeFromShape(params.shape);\n const [resultShape, numSlices, sliceSize, strides] = backend_util_exports.prepareAndValidate(params, indices);\n const flattenIndices = reshape6({ inputs: { x: indices }, backend: backend2, attrs: { shape: [numSlices, sliceRank] } });\n const flattenX = reshape6({\n inputs: { x: params },\n backend: backend2,\n attrs: { shape: [util_exports.sizeFromShape(params.shape) / sliceSize, sliceSize] }\n });\n if (backend2.shouldExecuteOnCPU([params, indices]) || params.dtype === \"string\") {\n const indicesData = backend2.readSync(indices.dataId);\n const paramsBuf = backend2.bufferSync(params);\n const outValue = gatherNdImplCPU2(indicesData, paramsBuf, params.dtype, numSlices, sliceRank, sliceSize, strides, params.shape, paramsSize);\n return backend2.makeTensorInfo(resultShape, params.dtype, outValue.values);\n }\n const program = new GatherNDProgram2(sliceRank, [numSlices, sliceSize]);\n const uniformData = [{ type: \"int32\", data: [sliceRank] }, { type: \"int32\", data: strides }];\n const res = backend2.runWebGPUProgram(program, [flattenX, flattenIndices], flattenX.dtype, uniformData);\n const reshaped = reshape6({ inputs: { x: res }, backend: backend2, attrs: { shape: resultShape } });\n backend2.disposeData(flattenIndices.dataId);\n backend2.disposeData(flattenX.dataId);\n backend2.disposeData(res.dataId);\n return reshaped;\n}\nvar gatherNdConfig4 = {\n kernelName: GatherNd,\n backendName: \"webgpu\",\n kernelFunc: gatherNd4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/gather_webgpu.js\nvar GatherProgram2 = class {\n constructor(aShape, outputShape) {\n this.variableNames = [\"A\", \"indices\"];\n this.workGroupSize = [64, 1, 1];\n this.size = true;\n this.outputShape = aShape.slice();\n this.aShape = aShape;\n this.outputShape = outputShape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.shaderKey = `gather`;\n }\n getUserCode() {\n const sourceCoords = getSourceCoords4(this.aShape);\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let resRC = getCoordsFromIndex(index);\n let indexZ = i32(getIndices(resRC.x, resRC.z));\n let inBounds = select(0.0, 1.0, indexZ >= 0 && indexZ < uniforms.aShape[2]);\n setOutputAtIndex(index, inBounds * getA(${sourceCoords}));\n }\n }\n `;\n return userCode;\n }\n};\nfunction getSourceCoords4(aShape) {\n const currentCoords = [\"resRC.x\", \"resRC.y\", \"resRC.z\", \"resRC.w\"];\n const sourceCoords = [];\n for (let i = 0; i < aShape.length; i++) {\n if (i === 2) {\n sourceCoords.push(\"indexZ\");\n } else {\n sourceCoords.push(`${currentCoords[i]}`);\n }\n }\n return sourceCoords.join();\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/GatherV2.js\nfunction gatherV24(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, indices } = inputs;\n const { axis, batchDims } = attrs;\n const parsedAxis = util_exports.parseAxisParam(axis, x.shape)[0];\n const shapeInfo = backend_util_exports.segment_util.collectGatherOpShapeInfo(x, indices, parsedAxis, batchDims);\n const indicesSize = util_exports.sizeFromShape(indices.shape);\n const toDispose = [];\n const flattenX = reshape6({\n inputs: { x },\n backend: backend2,\n attrs: {\n shape: [\n shapeInfo.batchSize,\n shapeInfo.outerSize,\n shapeInfo.dimSize,\n shapeInfo.sliceSize\n ]\n }\n });\n const flattenIndex = reshape6({\n inputs: { x: indices },\n backend: backend2,\n attrs: { shape: [shapeInfo.batchSize, indicesSize / shapeInfo.batchSize] }\n });\n toDispose.push(flattenX);\n toDispose.push(flattenIndex);\n const flattenOutputShape = [\n shapeInfo.batchSize,\n shapeInfo.outerSize,\n indicesSize / shapeInfo.batchSize,\n shapeInfo.sliceSize\n ];\n if (backend2.shouldExecuteOnCPU([x, indices])) {\n const indicesBufferInfo = backend2.tensorMap.get(flattenIndex.dataId);\n const indicesValues = indicesBufferInfo.values;\n const indicesBuf = buffer(flattenIndex.shape, flattenIndex.dtype, indicesValues);\n const xBufferInfo = backend2.tensorMap.get(flattenX.dataId);\n const xValues = xBufferInfo.values;\n const xBuf = buffer(flattenX.shape, flattenX.dtype, xValues);\n const outBuf = gatherV2ImplCPU2(xBuf, indicesBuf, flattenOutputShape);\n toDispose.forEach((t) => backend2.disposeData(t.dataId));\n return backend2.makeTensorInfo(shapeInfo.outputShape, outBuf.dtype, outBuf.values);\n }\n const program = new GatherProgram2(flattenX.shape, flattenOutputShape);\n const res = backend2.runWebGPUProgram(program, [flattenX, flattenIndex], flattenX.dtype);\n toDispose.push(res);\n const reshaped = reshape6({ inputs: { x: res }, backend: backend2, attrs: { shape: shapeInfo.outputShape } });\n toDispose.forEach((t) => backend2.disposeData(t.dataId));\n return reshaped;\n}\nvar gatherV2Config4 = {\n kernelName: GatherV2,\n backendName: \"webgpu\",\n kernelFunc: gatherV24\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Greater.js\nvar greater5 = binaryKernelFunc3({\n opType: BinaryOpType.GREATER,\n cpuKernelImpl: greaterImplCPU2,\n dtype: \"bool\"\n});\nvar greaterConfig4 = {\n kernelName: Greater,\n backendName: \"webgpu\",\n kernelFunc: greater5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/GreaterEqual.js\nvar greaterEqual4 = binaryKernelFunc3({\n opType: BinaryOpType.GREATER_EQUAL,\n dtype: \"bool\",\n cpuKernelImpl: greaterEqualImplCPU2\n});\nvar greaterEqualConfig4 = {\n kernelName: GreaterEqual,\n backendName: \"webgpu\",\n kernelFunc: greaterEqual4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/IsNaN.js\nvar isNaN5 = unaryKernelFunc3({ opType: UnaryOpType.IS_NAN, dtype: \"bool\" });\nvar isNaNConfig3 = {\n kernelName: IsNan,\n backendName: \"webgpu\",\n kernelFunc: isNaN5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/LeakyRelu.js\nfunction leakyRelu5(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { alpha } = attrs;\n const uniformData = [{ type: \"float32\", data: [alpha] }];\n const program = new UnaryOpProgram2(x.shape, UnaryOpType.LEAKYRELU);\n program.uniforms = \"alpha : f32,\";\n return backend2.runWebGPUProgram(program, [x], \"float32\", uniformData);\n}\nvar leakyReluConfig4 = {\n kernelName: LeakyRelu,\n backendName: \"webgpu\",\n kernelFunc: leakyRelu5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Less.js\nvar less5 = binaryKernelFunc3({ opType: BinaryOpType.LESS, dtype: \"bool\", cpuKernelImpl: lessImplCPU2 });\nvar lessConfig4 = {\n kernelName: Less,\n backendName: \"webgpu\",\n kernelFunc: less5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/LessEqual.js\nvar lessEqual4 = binaryKernelFunc3({\n opType: BinaryOpType.LESS_EQUAL,\n dtype: \"bool\",\n cpuKernelImpl: lessEqualImplCPU2\n});\nvar lessEqualConfig4 = {\n kernelName: LessEqual,\n backendName: \"webgpu\",\n kernelFunc: lessEqual4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Log.js\nvar log5 = unaryKernelFunc3({ opType: UnaryOpType.LOG, cpuKernelImpl: logImplCPU2 });\nvar logConfig4 = {\n kernelName: Log,\n backendName: \"webgpu\",\n kernelFunc: log5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/LogicalAnd.js\nvar logicalAnd4 = binaryKernelFunc3({ opType: BinaryOpType.LOGICAL_AND, dtype: \"bool\" });\nvar logicalAndConfig4 = {\n kernelName: LogicalAnd,\n backendName: \"webgpu\",\n kernelFunc: logicalAnd4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/LogicalNot.js\nvar logicalNot4 = unaryKernelFunc3({ opType: UnaryOpType.LOGICAL_NOT });\nvar logicalNotConfig4 = {\n kernelName: LogicalNot,\n backendName: \"webgpu\",\n kernelFunc: logicalNot4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Maximum.js\nvar maximum5 = binaryKernelFunc3({\n opType: BinaryOpType.MAX,\n cpuKernelImpl: maximumImplCPU2\n});\nvar maximumConfig4 = {\n kernelName: Maximum,\n backendName: \"webgpu\",\n kernelFunc: maximum5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/MaxPool.js\nfunction maxPool5(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { filterSize, strides, pad: pad3, dimRoundingMode } = attrs;\n const dilations = 1;\n const convInfo = backend_util_exports.computePool2DInfo(x.shape, filterSize, strides, dilations, pad3, dimRoundingMode);\n return poolImpl(x, convInfo, \"max\", backend2);\n}\nvar maxPoolConfig4 = {\n kernelName: MaxPool,\n backendName: \"webgpu\",\n kernelFunc: maxPool5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Min.js\nfunction min6(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis, keepDims } = attrs;\n return reduce2(x, axis, keepDims, \"min\", backend2);\n}\nvar minConfig4 = {\n kernelName: Min,\n backendName: \"webgpu\",\n kernelFunc: min6\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Minimum.js\nvar minimum5 = binaryKernelFunc3({\n opType: BinaryOpType.MIN,\n cpuKernelImpl: minimumImplCPU2\n});\nvar minimumConfig4 = {\n kernelName: Minimum,\n backendName: \"webgpu\",\n kernelFunc: minimum5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/mirror_pad_webgpu.js\nvar MirrorPadProgram2 = class {\n constructor(xShape, paddings, mode) {\n this.uniforms = \"\";\n this.variableNames = [\"x\"];\n this.workGroupSize = [64, 1, 1];\n this.size = true;\n this.outputShape = paddings.map((p2, i) => p2[0] + xShape[i] + p2[1]);\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.xShape = xShape;\n paddings.map((_, i) => {\n this.uniforms += ` pad${i} : vec2,`;\n });\n this.offset = mode === \"reflect\" ? 0 : 1;\n this.shaderKey = `mirrorPad_${mode}`;\n }\n getUserCode() {\n const rank = this.xShape.length;\n const start = this.xShape.map((_, i) => `uniforms.pad${i}[0]`).join(\",\");\n const end = this.xShape.map((_, i) => `uniforms.pad${i}[0] + uniforms.xShape${rank > 1 ? `[${i}]` : \"\"}`).join(\",\");\n const shaderStart = rank === 1 ? \"start\" : \"start[i]\";\n const shaderEnd = rank === 1 ? \"end\" : \"end[i]\";\n const shaderOutC = rank === 1 ? \"outC\" : \"outC[i]\";\n const dtype = getCoordsDataType2(rank);\n const unpackedCoords = rank > 1 ? [\"coords[0]\", \"coords[1]\", \"coords[2]\", \"coords[3]\"].slice(0, rank) : \"coords\";\n return `\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let start = ${dtype}(${start});\n let end = ${dtype}(${end});\n var outC = getCoordsFromIndex(index);\n for (var i = 0; i < ${rank}; i = i + 1) {\n if (${shaderOutC} < ${shaderStart}) {\n ${shaderOutC} = ${shaderStart} * 2 - ${shaderOutC} - ${this.offset};\n } else if(${shaderOutC} >= ${shaderEnd}) {\n ${shaderOutC} = (${shaderEnd} - 1) * 2 - ${shaderOutC} + ${this.offset};\n }\n }\n let coords = outC - start;\n setOutputAtIndex(index, getX(${unpackedCoords}));\n }\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/MirrorPad.js\nvar mirrorPadConfig4 = {\n kernelName: MirrorPad,\n backendName: \"webgpu\",\n kernelFunc: ({ inputs, attrs, backend: backend2 }) => {\n const { x } = inputs;\n const { paddings, mode } = attrs;\n const webGPUBackend = backend2;\n const uniformData = paddings.map((p2) => {\n return { type: \"int32\", data: [p2[0], p2[1]] };\n });\n const program = new MirrorPadProgram2(x.shape, paddings, mode);\n const output = webGPUBackend.runWebGPUProgram(program, [x], x.dtype, uniformData);\n return output;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Neg.js\nfunction neg4(args) {\n const { inputs, backend: backend2 } = args;\n const { x } = inputs;\n if (backend2.shouldExecuteOnCPU([x])) {\n const xData = backend2.tensorMap.get(x.dataId);\n const [outValues, newShape] = negImplCPU2(xData.values, x.shape, x.dtype);\n return backend2.makeTensorInfo(newShape, x.dtype, outValues);\n }\n const program = new UnaryOpProgram2(x.shape, UnaryOpType.NEG);\n return backend2.runWebGPUProgram(program, [x], x.dtype);\n}\nvar negConfig4 = {\n kernelName: Neg,\n backendName: \"webgpu\",\n kernelFunc: neg4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/NonMaxSuppressionV3.js\nfunction nonMaxSuppressionV33(args) {\n console.warn(\"tf.nonMaxSuppression() in webgpu locks the UI thread. Call tf.nonMaxSuppressionAsync() instead\");\n const { inputs, backend: backend2, attrs } = args;\n const { boxes, scores } = inputs;\n const { maxOutputSize, iouThreshold, scoreThreshold } = attrs;\n const boxesVals = backend2.readSync(boxes.dataId);\n const scoresVals = backend2.readSync(scores.dataId);\n const { selectedIndices } = kernel_impls_exports.nonMaxSuppressionV3Impl(boxesVals, scoresVals, maxOutputSize, iouThreshold, scoreThreshold);\n return backend2.makeTensorInfo([selectedIndices.length], \"int32\", new Int32Array(selectedIndices));\n}\nvar nonMaxSuppressionV3Config4 = {\n kernelName: NonMaxSuppressionV3,\n backendName: \"webgpu\",\n kernelFunc: nonMaxSuppressionV33\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/NonMaxSuppressionV5.js\nfunction nonMaxSuppressionV53(args) {\n console.warn(\"tf.nonMaxSuppression() in webgpu locks the UI thread. Call tf.nonMaxSuppressionAsync() instead\");\n const { inputs, backend: backend2, attrs } = args;\n const { boxes, scores } = inputs;\n const { maxOutputSize, iouThreshold, scoreThreshold, softNmsSigma } = attrs;\n const boxesVals = backend2.readSync(boxes.dataId);\n const scoresVals = backend2.readSync(scores.dataId);\n const maxOutputSizeVal = maxOutputSize;\n const iouThresholdVal = iouThreshold;\n const scoreThresholdVal = scoreThreshold;\n const softNmsSigmaVal = softNmsSigma;\n const { selectedIndices, selectedScores } = kernel_impls_exports.nonMaxSuppressionV5Impl(boxesVals, scoresVals, maxOutputSizeVal, iouThresholdVal, scoreThresholdVal, softNmsSigmaVal);\n return [\n backend2.makeTensorInfo([selectedIndices.length], \"int32\", new Int32Array(selectedIndices)),\n backend2.makeTensorInfo([selectedScores.length], \"float32\", new Float32Array(selectedScores))\n ];\n}\nvar nonMaxSuppressionV5Config4 = {\n kernelName: NonMaxSuppressionV5,\n backendName: \"webgpu\",\n kernelFunc: nonMaxSuppressionV53\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/ZerosLike.js\nfunction zerosLike5(args) {\n const { inputs, backend: backend2 } = args;\n const { x } = inputs;\n if (x.dtype === \"complex64\") {\n const realPart = real4({ inputs: { input: x }, backend: backend2 });\n const r = zerosLike5({ inputs: { x: realPart }, backend: backend2 });\n const imagPart = imag4({ inputs: { input: x }, backend: backend2 });\n const i = zerosLike5({ inputs: { x: imagPart }, backend: backend2 });\n const result = complex4({ inputs: { real: r, imag: i }, backend: backend2 });\n backend2.disposeData(realPart.dataId);\n backend2.disposeData(r.dataId);\n backend2.disposeData(imagPart.dataId);\n backend2.disposeData(i.dataId);\n return result;\n } else {\n return fill5({\n attrs: {\n shape: x.shape,\n dtype: x.dtype,\n value: x.dtype === \"string\" ? \"\" : 0\n },\n backend: backend2\n });\n }\n}\nvar zerosLikeConfig4 = {\n kernelName: ZerosLike,\n backendName: \"webgpu\",\n kernelFunc: zerosLike5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/OnesLike.js\nfunction onesLike5(args) {\n const { inputs, backend: backend2 } = args;\n const { x } = inputs;\n if (x.dtype === \"string\") {\n throw new Error(\"onesLike is not supported under string dtype\");\n } else if (x.dtype === \"complex64\") {\n const realPart = real4({ inputs: { input: x }, backend: backend2 });\n const r = onesLike5({ inputs: { x: realPart }, backend: backend2 });\n const imagPart = imag4({ inputs: { input: x }, backend: backend2 });\n const i = zerosLike5({ inputs: { x: imagPart }, backend: backend2 });\n const result = complex4({ inputs: { real: r, imag: i }, backend: backend2 });\n backend2.disposeData(realPart.dataId);\n backend2.disposeData(r.dataId);\n backend2.disposeData(imagPart.dataId);\n backend2.disposeData(i.dataId);\n return result;\n } else {\n return fill5({ attrs: { shape: x.shape, dtype: x.dtype, value: 1 }, backend: backend2 });\n }\n}\nvar onesLikeConfig4 = {\n kernelName: OnesLike,\n backendName: \"webgpu\",\n kernelFunc: onesLike5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Pack.js\nfunction pack4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { axis } = attrs;\n if (inputs.length === 1) {\n return expandDims6({ inputs: { input: inputs[0] }, backend: backend2, attrs: { dim: axis } });\n }\n const shape = inputs[0].shape;\n const dtype = inputs[0].dtype;\n inputs.forEach((t) => {\n util_exports.assertShapesMatch(shape, t.shape, \"All tensors passed to stack must have matching shapes\");\n util_exports.assert(dtype === t.dtype, () => \"All tensors passed to stack must have matching dtypes\");\n });\n const intermediateTensorInfos = [];\n const expandedTensors = inputs.map((t) => {\n const expandedT = expandDims6({ inputs: { input: t }, backend: backend2, attrs: { dim: axis } });\n intermediateTensorInfos.push(expandedT);\n return expandedT;\n });\n const result = concat5({ inputs: expandedTensors, backend: backend2, attrs: { axis } });\n intermediateTensorInfos.forEach((t) => backend2.disposeData(t.dataId));\n return result;\n}\nvar packConfig4 = {\n kernelName: Pack,\n backendName: \"webgpu\",\n kernelFunc: pack4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/pad_webgpu.js\nvar PadProgram2 = class {\n constructor(xShape, paddings) {\n this.variableNames = [\"x\"];\n this.uniforms = \"constantValue : f32,\";\n this.workGroupSize = [64, 1, 1];\n this.size = true;\n this.outputShape = paddings.map((p2, i) => p2[0] + xShape[i] + p2[1]);\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n paddings.map((_, i) => {\n this.uniforms += ` pad${i} : vec2,`;\n });\n this.xShape = xShape;\n this.shaderKey = \"pad\";\n }\n getUserCode() {\n const rank = this.xShape.length;\n const type = getCoordsDataType2(rank);\n const start = this.xShape.map((_, i) => `uniforms.pad${i}[0]`).join(\",\");\n const end = this.xShape.map((_, i) => `uniforms.pad${i}[0] + uniforms.xShape${rank > 1 ? `[${i}]` : \"\"}`).join(\",\");\n const startValue = rank > 1 ? `${type}(${start})` : `${start}`;\n const endValue = rank > 1 ? `${type}(${end})` : `${end}`;\n const leftPadCondition = rank > 1 ? `any(outC < start)` : `outC < start`;\n const rightPadCondition = rank > 1 ? `any(outC >= end)` : `outC >= end`;\n const unpackedCoords = rank > 1 ? [\"coords[0]\", \"coords[1]\", \"coords[2]\", \"coords[3]\"].slice(0, rank) : \"coords\";\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let start = ${startValue};\n let end = ${endValue};\n let outC = getCoordsFromIndex(index);\n\n if (${leftPadCondition} || ${rightPadCondition}) {\n setOutputAtIndex(index, uniforms.constantValue);\n } else {\n let coords = outC - start;\n setOutputAtIndex(index, getX(${unpackedCoords}));\n }\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/PadV2.js\nvar padV23 = (args) => {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { paddings, constantValue } = attrs;\n if (paddings.every((p2) => util_exports.arraysEqual(p2, [0, 0]))) {\n return identity5({ inputs: { x }, backend: backend2 });\n }\n if (util_exports.sizeFromShape(x.shape) === 0) {\n const outputShape = paddings.map((p2, i) => p2[0] + x.shape[i] + p2[1]);\n return fill5({\n backend: backend2,\n attrs: { shape: outputShape, value: constantValue, dtype: x.dtype }\n });\n }\n const uniformData = [{ type: \"float32\", data: [constantValue] }];\n paddings.map((p2) => uniformData.push({ type: \"int32\", data: [p2[0], p2[1]] }));\n const program = new PadProgram2(x.shape, paddings);\n return backend2.runWebGPUProgram(program, [x], x.dtype, uniformData);\n};\nvar padV2Config4 = {\n kernelName: PadV2,\n backendName: \"webgpu\",\n kernelFunc: padV23\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Pow.js\nvar pow4 = binaryKernelFunc3({\n opType: BinaryOpType.POW\n});\nvar powConfig4 = {\n kernelName: Pow,\n backendName: \"webgpu\",\n kernelFunc: pow4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Prelu.js\nfunction prelu6(args) {\n const { inputs, backend: backend2 } = args;\n const { x, alpha } = inputs;\n const program = new BinaryOpProgram2(BinaryOpType.PRELU, x.shape, alpha.shape);\n return backend2.runWebGPUProgram(program, [x, alpha], \"float32\");\n}\nvar preluConfig4 = {\n kernelName: Prelu,\n backendName: \"webgpu\",\n kernelFunc: prelu6\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Prod.js\nfunction prod5(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis, keepDims } = attrs;\n return reduce2(x, axis, keepDims, \"prod\", backend2);\n}\nvar prodConfig4 = {\n kernelName: Prod,\n backendName: \"webgpu\",\n kernelFunc: prod5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Range.js\nvar range6 = (args) => {\n const { backend: backend2, attrs } = args;\n const { start, stop, step: step5, dtype } = attrs;\n const values = rangeImplCPU2(start, stop, step5, dtype);\n return backend2.makeTensorInfo([values.length], dtype, values);\n};\nvar rangeConfig4 = {\n kernelName: Range,\n backendName: \"webgpu\",\n kernelFunc: range6\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/RealDiv.js\nvar realDiv2 = binaryKernelFunc3({ opType: BinaryOpType.DIV });\nvar realDivConfig4 = {\n kernelName: RealDiv,\n backendName: \"webgpu\",\n kernelFunc: realDiv2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Reciprocal.js\nvar reciprocal4 = unaryKernelFunc3({ opType: UnaryOpType.RECIPROCAL });\nvar reciprocalConfig3 = {\n kernelName: Reciprocal,\n backendName: \"webgpu\",\n kernelFunc: reciprocal4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Relu.js\nvar relu4 = unaryKernelFunc3({ opType: UnaryOpType.RELU });\nvar reluConfig4 = {\n kernelName: Relu,\n backendName: \"webgpu\",\n kernelFunc: relu4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Relu6.js\nvar relu64 = unaryKernelFunc3({ opType: UnaryOpType.RELU6 });\nvar relu6Config4 = {\n kernelName: Relu6,\n backendName: \"webgpu\",\n kernelFunc: relu64\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/resize_bilinear_webgpu.js\nvar ResizeBilinearProgram2 = class {\n constructor(inputShape, newHeight, newWidth) {\n this.variableNames = [\"x\"];\n this.uniforms = \"adjustHeightWidth : vec2, halfPixelCenters : f32,\";\n this.workGroupSize = [64, 1, 1];\n this.size = true;\n this.outputShape = [inputShape[0], newHeight, newWidth, inputShape[3]];\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.shaderKey = `resizeBilinear`;\n }\n getUserCode() {\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let coords = getCoordsFromIndex(index);\n let b = coords[0];\n let d = coords[3];\n let rc = coords.yz;\n\n let effectiveInSize = vec2(\n f32(uniforms.xShape.y) - uniforms.adjustHeightWidth[0],\n f32(uniforms.xShape.z) - uniforms.adjustHeightWidth[1]);\n\n let effectiveOutSize = vec2(\n f32(uniforms.outShape.y) - uniforms.adjustHeightWidth[0],\n f32(uniforms.outShape.z) - uniforms.adjustHeightWidth[1]);\n\n let effectiveInputOverOutputRatioRC =\n effectiveInSize / effectiveOutSize;\n\n // Fractional source index\n let sourceFracIndexRC =\n (vec2(rc) + vec2(uniforms.halfPixelCenters)) *\n effectiveInputOverOutputRatioRC - vec2(uniforms.halfPixelCenters);\n\n // Compute the four integer indices.\n let sourceFloorRC = vec2(sourceFracIndexRC);\n let sourceCeilRC = vec2(\n min(vec2(uniforms.xShape.yz) - vec2(1.0), ceil(sourceFracIndexRC)));\n\n let topLeft = getX(b, sourceFloorRC.x, sourceFloorRC.y, d);\n let bottomLeft = getX(b, sourceCeilRC.x, sourceFloorRC.y, d);\n let topRight = getX(b, sourceFloorRC.x, sourceCeilRC.y, d);\n let bottomRight = getX(b, sourceCeilRC.x, sourceCeilRC.y, d);\n\n let fracRC = sourceFracIndexRC - vec2(sourceFloorRC);\n\n let top = topLeft + (topRight - topLeft) * fracRC.y;\n let bottom = bottomLeft + (bottomRight - bottomLeft) * fracRC.y;\n let newValue = top + (bottom - top) * fracRC.x;\n\n setOutputAtIndex(index, newValue);\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/ResizeBilinear.js\nfunction resizeBilinear5(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { images } = inputs;\n const { alignCorners, size, halfPixelCenters } = attrs;\n const [newHeight, newWidth] = size;\n const adjustHeight = alignCorners && newHeight > 1 ? 1 : 0;\n const adjustWidth = alignCorners && newWidth > 1 ? 1 : 0;\n const halfPixelCentersValue = halfPixelCenters ? 0.5 : 0;\n const uniformData = [\n { type: \"float32\", data: [adjustHeight, adjustWidth] },\n { type: \"float32\", data: [halfPixelCentersValue] }\n ];\n const program = new ResizeBilinearProgram2(images.shape, newHeight, newWidth);\n return backend2.runWebGPUProgram(program, [images], \"float32\", uniformData);\n}\nvar resizeBilinearConfig4 = {\n kernelName: ResizeBilinear,\n backendName: \"webgpu\",\n kernelFunc: resizeBilinear5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/resize_nearest_neighbor_webgpu.js\nvar ResizeNearestNeighborProgram2 = class {\n constructor(inputShape, newHeight, newWidth, halfPixelCenters) {\n this.variableNames = [\"x\"];\n this.uniforms = \"adjustHeightWidth : vec2, roundBase : f32,\";\n this.workGroupSize = [64, 1, 1];\n this.size = true;\n this.outputShape = [inputShape[0], newHeight, newWidth, inputShape[3]];\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.halfPixelCenters = halfPixelCenters;\n this.shaderKey = `resizeNearest_${halfPixelCenters}`;\n }\n getUserCode() {\n let sourceFracIndexRC;\n if (this.halfPixelCenters) {\n sourceFracIndexRC = `max((vec2(rc) + vec2(0.5)) * effectiveInputOverOutputRatioRC, vec2(0.0))`;\n } else {\n sourceFracIndexRC = `vec2(rc) * effectiveInputOverOutputRatioRC`;\n }\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let coords = getCoordsFromIndex(index);\n let b = coords[0];\n let d = coords[3];\n let rc = coords.yz;\n\n let effectiveInSize = vec2(\n f32(uniforms.xShape.y) - uniforms.adjustHeightWidth[0],\n f32(uniforms.xShape.z) - uniforms.adjustHeightWidth[1]);\n\n let effectiveOutSize = vec2(\n f32(uniforms.outShape.y) - uniforms.adjustHeightWidth[0],\n f32(uniforms.outShape.z) - uniforms.adjustHeightWidth[1]);\n\n let effectiveInputOverOutputRatioRC =\n effectiveInSize / effectiveOutSize;\n\n // Fractional source index\n let sourceFracIndexRC = ${sourceFracIndexRC};\n\n // Compute the coordinators of nearest neighbor point.\n let inputShapeRC = vec2(f32(uniforms.xShape.y), f32(uniforms.xShape.z));\n let sourceNearestRC = vec2(\n min(inputShapeRC - 1.0, floor(sourceFracIndexRC + uniforms.roundBase)));\n let newValue = getX(b, sourceNearestRC.x, sourceNearestRC.y, d);\n\n setOutputAtIndex(index, newValue);\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/ResizeNearestNeighbor.js\nfunction resizeNearestNeighbor5(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { images } = inputs;\n const { alignCorners, halfPixelCenters, size } = attrs;\n const [newHeight, newWidth] = size;\n const adjustHeight = alignCorners && newHeight > 1 ? 1 : 0;\n const adjustWidth = alignCorners && newWidth > 1 ? 1 : 0;\n const roundBase = alignCorners ? 0.5 : 0;\n const uniformData = [\n { type: \"float32\", data: [adjustHeight, adjustWidth] },\n { type: \"float32\", data: [roundBase] }\n ];\n const program = new ResizeNearestNeighborProgram2(images.shape, newHeight, newWidth, halfPixelCenters);\n return backend2.runWebGPUProgram(program, [images], images.dtype, uniformData);\n}\nvar resizeNearestNeighborConfig4 = {\n kernelName: ResizeNearestNeighbor,\n backendName: \"webgpu\",\n kernelFunc: resizeNearestNeighbor5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/rotate_webgpu.js\nvar RotateProgram2 = class {\n constructor(imageShape, fillValue) {\n this.outputShape = [];\n this.variableNames = [\"x\"];\n this.workGroupSize = [64, 1, 1];\n this.size = true;\n this.outputShape = imageShape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.uniforms = `centerX : f32, centerY : f32, sinRadians : f32,\n cosRadians : f32,`;\n this.shaderKey = \"rotate\";\n this.outputShape = imageShape;\n if (typeof fillValue === \"number\") {\n this.uniforms += ` fillValue : f32,`;\n this.fillSnippet = `var outputValue = uniforms.fillValue;`;\n this.shaderKey += \"_float\";\n } else {\n this.uniforms += ` fillValue : vec3,`;\n this.fillSnippet = `var outputValue = uniforms.fillValue[coords[3]];`;\n this.shaderKey += \"_vec3\";\n }\n }\n getUserCode() {\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let coords = getCoordsFromIndex(index);\n let coordXFloat = (f32(coords[2]) - uniforms.centerX) *\n uniforms.cosRadians - (f32(coords[1]) - uniforms.centerY) *\n uniforms.sinRadians;\n let coordYFloat = (f32(coords[2]) - uniforms.centerX) *\n uniforms.sinRadians + (f32(coords[1]) - uniforms.centerY) *\n uniforms.cosRadians;\n let coordX = i32(round(coordXFloat + uniforms.centerX));\n let coordY = i32(round(coordYFloat + uniforms.centerY));\n ${this.fillSnippet}\n if(coordX >= 0 && coordX < uniforms.xShape[2] && coordY >= 0 &&\n coordY < uniforms.xShape[1]) {\n outputValue = getX(coords[0], coordY, coordX, coords[3]);\n }\n setOutputAtIndex(index, outputValue);\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/RotateWithOffset.js\nvar rotateWithOffsetConfig4 = {\n kernelName: RotateWithOffset,\n backendName: \"webgpu\",\n kernelFunc: ({ inputs, attrs, backend: backend2 }) => {\n const { image: image2 } = inputs;\n const { radians, fillValue, center } = attrs;\n const webgpuBackend = backend2;\n const program = new RotateProgram2(image2.shape, fillValue);\n const [centerX, centerY] = backend_util_exports.getImageCenter(center, image2.shape[1], image2.shape[2]);\n const uniformData = [\n { type: \"float32\", data: [centerX] },\n { type: \"float32\", data: [centerY] },\n { type: \"float32\", data: [Math.sin(radians)] },\n { type: \"float32\", data: [Math.cos(radians)] }\n ];\n if (typeof fillValue === \"number\") {\n uniformData.push({ type: \"float32\", data: [Number.parseFloat(fillValue.toFixed(2))] });\n } else {\n uniformData.push({ type: \"float32\", data: fillValue });\n }\n const output = webgpuBackend.runWebGPUProgram(program, [image2], image2.dtype, uniformData);\n return output;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Rsqrt.js\nvar rsqrt4 = unaryKernelFunc3({ opType: UnaryOpType.RSQRT, cpuKernelImpl: rsqrtImplCPU2 });\nvar rsqrtConfig4 = {\n kernelName: Rsqrt,\n backendName: \"webgpu\",\n kernelFunc: rsqrt4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/scatter_webgpu.js\nvar ScatterProgram2 = class {\n constructor(flattenXShape, sliceDim, indicesRank, updatesRank, strides, shape, outputDtype, sumDupeIndices = true) {\n this.variableNames = [\"updates\", \"indices\"];\n this.workGroupSize = [64, 1, 1];\n this.atomic = true;\n this.outputShape = shape;\n this.type = outputDtype;\n this.sumDupeIndices = sumDupeIndices;\n this.dispatchLayout = flatDispatchLayout(flattenXShape);\n this.dispatch = computeDispatch(this.dispatchLayout, flattenXShape, this.workGroupSize);\n this.sliceDimGreaterThanOne = sliceDim > 1;\n this.shaderKey = `scatter_${indicesRank}_${updatesRank}_${this.sliceDimGreaterThanOne}_${outputDtype}_${sumDupeIndices}`;\n const stridesType = getCoordsDataType2(strides.length);\n this.uniforms = `sliceDim : i32, strides: ${stridesType}, size: i32,`;\n this.updatesRank = updatesRank;\n this.indicesRank = indicesRank;\n }\n getUserCode() {\n let indicesString = \"\";\n if (this.indicesRank === 1) {\n indicesString = \"coords[0]\";\n } else if (this.indicesRank === 2) {\n indicesString = \"coords[0], j\";\n }\n const indicesSnippet = `getIndices(${indicesString})`;\n const strideString = this.sliceDimGreaterThanOne ? \"uniforms.strides[j]\" : \"uniforms.strides\";\n let outCoordsString = \"\";\n let getUpdatesCoordsFromFlatIndex = \"\";\n if (this.dispatchLayout.x.length === 1) {\n outCoordsString = \"flattenedIndex\";\n getUpdatesCoordsFromFlatIndex = `\n fn getUpdatesCoordsFromFlatIndex(index : i32) -> i32 {\n return index;\n }\n `;\n } else if (this.dispatchLayout.x.length === 2) {\n outCoordsString = \"vec2(flattenedIndex, coords[1])\";\n getUpdatesCoordsFromFlatIndex = `\n fn getUpdatesCoordsFromFlatIndex(index : i32) -> vec2 {\n // N.B. |updates| could be a scalar tensor, conceptually representing a\n // 2D tensor with all values equal to that. By design, its size must be\n // the same as |outShape[1]| in one dimension, and |indicesShape[0]|\n // gives the other.\n let sliceSize = uniforms.outShape[1];\n let d0 = index / sliceSize;\n let d1 = index - d0 * sliceSize;\n return vec2(d0, d1);\n }\n `;\n }\n const updatesString = Array.from({ length: this.updatesRank }, (_, idx) => `coords[${idx}]`);\n const updatesSnippet = `getUpdates(${updatesString.join(\", \")})`;\n const atomicRMW = (ptr, val) => {\n let atomicAddSnippet = `atomicAdd(${ptr}, bitcast(${val}))`;\n if (this.type === \"float32\") {\n atomicAddSnippet = `\n {\n var oldBits = 0;\n var newBits = bitcast(${val});\n loop {\n let info = atomicCompareExchangeWeak(${ptr}, oldBits, newBits);\n if (info.exchanged) {\n break;\n }\n oldBits = info.old_value;\n let oldValue = bitcast(oldBits);\n let newValue = oldValue + (${val});\n newBits = bitcast(newValue);\n }\n }\n `;\n }\n const atomicStoreSnippet = `atomicStore(${ptr}, bitcast(${val}));`;\n return this.sumDupeIndices ? atomicAddSnippet : atomicStoreSnippet;\n };\n const userCode = `\n ${getUpdatesCoordsFromFlatIndex}\n\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let coords = getUpdatesCoordsFromFlatIndex(index);\n var flattenedIndex = 0;\n for (var j = 0; j < uniforms.sliceDim; j = j + 1) {\n let indexInside = i32(round(${indicesSnippet}));\n flattenedIndex = flattenedIndex + indexInside * ${strideString};\n }\n let updateValue =\n ${mapToWgslTypes(this.type, false)}(${updatesSnippet});\n let flatIndex = getOutputIndexFromCoords(${outCoordsString});\n\n ${atomicRMW(\"&result[flatIndex]\", \"updateValue\")};\n }\n }`;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/ScatterNd.js\nfunction scatterNd4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { indices, updates } = inputs;\n const { shape } = attrs;\n const { sliceRank, numUpdates, sliceSize, strides, outputSize } = backend_util_exports.calculateShapes(updates, indices, shape);\n const flattenShape = [outputSize / sliceSize, sliceSize];\n if (outputSize === 0) {\n return backend2.makeTensorInfo(shape, indices.dtype);\n }\n const flattenIndices = reshape6({ inputs: { x: indices }, backend: backend2, attrs: { shape: [numUpdates, sliceRank] } });\n const flattenX = reshape6({ inputs: { x: updates }, backend: backend2, attrs: { shape: [numUpdates, sliceSize] } });\n const type = flattenX.dtype;\n const output = fill5({ backend: backend2, attrs: { shape: flattenShape, value: 0, dtype: type } });\n const size = util_exports.sizeFromShape(flattenX.shape);\n const uniformData = [\n { type: \"int32\", data: [sliceRank] },\n { type: \"int32\", data: strides },\n { type: \"int32\", data: [size] }\n ];\n const program = new ScatterProgram2(flattenX.shape, sliceRank, flattenIndices.shape.length, flattenX.shape.length, strides, flattenShape, type);\n const res = backend2.runWebGPUProgram(program, [flattenX, flattenIndices], type, uniformData, output);\n const reshaped = reshape6({ inputs: { x: res }, backend: backend2, attrs: { shape } });\n backend2.disposeData(flattenIndices.dataId);\n backend2.disposeData(flattenX.dataId);\n backend2.disposeData(res.dataId);\n return reshaped;\n}\nvar scatterNdConfig4 = {\n kernelName: ScatterNd,\n backendName: \"webgpu\",\n kernelFunc: scatterNd4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/select_webgpu.js\nvar SelectProgram2 = class {\n constructor(cRank, shape, rank) {\n this.variableNames = [\"c\", \"a\", \"b\"];\n this.workGroupSize = [64, 1, 1];\n this.size = true;\n this.outputShape = shape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.cRank = cRank;\n this.rank = rank;\n this.shaderKey = \"select\";\n }\n getUserCode() {\n let cCoords;\n let abCoords;\n if (this.rank > 4) {\n throw Error(`Where for rank ${this.rank} is not yet supported`);\n }\n if (this.rank === 1) {\n abCoords = `resRC`;\n cCoords = `resRC`;\n } else {\n const currentCoords = [\"resRC.x\", \"resRC.y\", \"resRC.z\", \"resRC.w\"];\n const cCoordVars = [];\n const abCoordVars = [];\n for (let i = 0; i < this.outputShape.length; i++) {\n abCoordVars.push(`${currentCoords[i]}`);\n if (i < this.cRank) {\n cCoordVars.push(`${currentCoords[i]}`);\n }\n }\n cCoords = cCoordVars.join();\n abCoords = abCoordVars.join();\n }\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let resRC = getCoordsFromIndex(index);\n let cVal = getC(${cCoords});\n if (cVal >= 1.0) {\n setOutputAtIndex(index, getA(${abCoords}));\n } else {\n setOutputAtIndex(index, getB(${abCoords}));\n }\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Select.js\nfunction select5(args) {\n const { inputs, backend: backend2 } = args;\n const { condition, t, e } = inputs;\n const program = new SelectProgram2(condition.shape.length, t.shape, t.shape.length);\n return backend2.runWebGPUProgram(program, [condition, t, e], upcastType(t.dtype, e.dtype));\n}\nvar selectConfig4 = {\n kernelName: Select,\n backendName: \"webgpu\",\n kernelFunc: select5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Sigmoid.js\nvar sigmoid5 = unaryKernelFunc3({ opType: UnaryOpType.SIGMOID });\nvar sigmoidConfig4 = {\n kernelName: Sigmoid,\n backendName: \"webgpu\",\n kernelFunc: sigmoid5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Sin.js\nvar sin4 = unaryKernelFunc3({ opType: UnaryOpType.SIN });\nvar sinConfig4 = {\n kernelName: Sin,\n backendName: \"webgpu\",\n kernelFunc: sin4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Sinh.js\nvar sinh4 = unaryKernelFunc3({ opType: UnaryOpType.SINH });\nvar sinhConfig3 = {\n kernelName: Sinh,\n backendName: \"webgpu\",\n kernelFunc: sinh4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Sub.js\nvar sub4 = binaryKernelFunc3({ opType: BinaryOpType.SUB, cpuKernelImpl: subImplCPU2, supportsComplex: true });\nvar subConfig4 = {\n kernelName: Sub,\n backendName: \"webgpu\",\n kernelFunc: sub4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Softmax.js\nfunction softmax6(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { logits } = inputs;\n const { dim } = attrs;\n const axes = util_exports.parseAxisParam([dim], logits.shape);\n const maxLogit = max6({\n inputs: { x: logits },\n backend: backend2,\n attrs: { reductionIndices: axes, keepDims: false }\n });\n const expandedShape = backend_util_exports.expandShapeToKeepDim(maxLogit.shape, axes);\n const maxLogitsReshaped = reshape6({ inputs: { x: maxLogit }, backend: backend2, attrs: { shape: expandedShape } });\n const a = sub4({ inputs: { a: logits, b: maxLogitsReshaped }, backend: backend2 });\n const b = exp4({ inputs: { x: a }, backend: backend2 });\n const sumExp = sum6({ inputs: { x: b }, backend: backend2, attrs: { axis: axes, keepDims: false } });\n const sumExpReshaped = reshape6({ inputs: { x: sumExp }, backend: backend2, attrs: { shape: expandedShape } });\n const res = realDiv2({ inputs: { a: b, b: sumExpReshaped }, backend: backend2 });\n backend2.disposeData(maxLogit.dataId);\n backend2.disposeData(maxLogitsReshaped.dataId);\n backend2.disposeData(a.dataId);\n backend2.disposeData(b.dataId);\n backend2.disposeData(sumExp.dataId);\n backend2.disposeData(sumExpReshaped.dataId);\n return res;\n}\nvar softmaxConfig4 = {\n kernelName: Softmax,\n backendName: \"webgpu\",\n kernelFunc: softmax6\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/SpaceToBatchND.js\nvar spaceToBatchND5 = (args) => {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { blockShape, paddings } = attrs;\n util_exports.assert(x.shape.length <= 4, () => \"spaceToBatchND for rank > 4 with a WebGPU backend not implemented yet\");\n const prod6 = blockShape.reduce((a, b) => a * b);\n const completePaddings = [[0, 0]];\n completePaddings.push(...paddings);\n for (let i = 1 + blockShape.length; i < x.shape.length; ++i) {\n completePaddings.push([0, 0]);\n }\n const toDispose = [];\n const paddedX = padV23({\n inputs: { x },\n backend: backend2,\n attrs: { paddings: completePaddings, constantValue: 0 }\n });\n const reshapedPaddedShape = backend_util_exports.getReshaped(paddedX.shape, blockShape, prod6, false);\n const permutedReshapedPaddedPermutation = backend_util_exports.getPermuted(reshapedPaddedShape.length, blockShape.length, false);\n const flattenShape = backend_util_exports.getReshapedPermuted(paddedX.shape, blockShape, prod6, false);\n const reshapedPaddedX = reshape6({ inputs: { x: paddedX }, backend: backend2, attrs: { shape: reshapedPaddedShape } });\n const paddedXT = transpose5({\n inputs: { x: reshapedPaddedX },\n backend: backend2,\n attrs: { perm: permutedReshapedPaddedPermutation }\n });\n const result = reshape6({ inputs: { x: paddedXT }, backend: backend2, attrs: { shape: flattenShape } });\n toDispose.push(paddedX);\n toDispose.push(reshapedPaddedX);\n toDispose.push(paddedXT);\n toDispose.forEach((t) => backend2.disposeData(t.dataId));\n return result;\n};\nvar spaceToBatchNDConfig4 = {\n kernelName: SpaceToBatchND,\n backendName: \"webgpu\",\n kernelFunc: spaceToBatchND5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/tile_webgpu.js\nvar TileProgram2 = class {\n constructor(aShape, reps) {\n this.variableNames = [\"A\"];\n this.workGroupSize = [64, 1, 1];\n this.size = true;\n const outputShape = new Array(aShape.length);\n for (let i = 0; i < outputShape.length; i++) {\n outputShape[i] = aShape[i] * reps[i];\n }\n this.outputShape = outputShape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.rank = this.outputShape.length;\n this.shaderKey = \"tile\";\n }\n getUserCode() {\n const sourceCoords = getSourceCoords5(this.rank, \"uniforms.\");\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let resRC = getCoordsFromIndex(index);\n setOutputAtIndex(index, getA(${sourceCoords}));\n }\n }\n `;\n return userCode;\n }\n};\nfunction getSourceCoords5(rank, uniformPrefix = \"\") {\n if (rank >= 5) {\n throw Error(`Tile for rank ${rank} is not yet supported`);\n }\n if (rank === 1) {\n return `(resRC % ${uniformPrefix}aShape)`;\n }\n const currentCoords = [\"resRC.x\", \"resRC.y\", \"resRC.z\", \"resRC.w\"];\n const sourceCoords = [];\n for (let i = 0; i < rank; i++) {\n sourceCoords.push(`(${currentCoords[i]} % ${uniformPrefix}aShape[${i}])`);\n }\n return sourceCoords.join();\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Tile.js\nfunction tile6(params) {\n const { inputs, backend: backend2, attrs } = params;\n const { x } = inputs;\n const { reps } = attrs;\n if (backend2.shouldExecuteOnCPU([x]) || x.dtype === \"string\" || x.shape.length >= 5) {\n const data = backend2.readSync(x.dataId);\n const value = x.dtype === \"string\" ? data.map((d) => util_exports.decodeString(d)) : data;\n const buf = buffer(x.shape, x.dtype, value);\n const outBuf = tileImplCPU2(buf, reps);\n return backend2.makeTensorInfo(outBuf.shape, outBuf.dtype, outBuf.values);\n }\n const program = new TileProgram2(x.shape, reps);\n const output = backend2.runWebGPUProgram(program, [x], x.dtype);\n return output;\n}\nvar tileConfig4 = {\n kernelName: Tile,\n backendName: \"webgpu\",\n kernelFunc: tile6\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/SparseToDense.js\nfunction sparseToDense4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { sparseIndices, sparseValues, defaultValue } = inputs;\n const { outputShape } = attrs;\n const { sliceRank, numUpdates, sliceSize, strides, outputSize } = backend_util_exports.calculateShapes(sparseValues, sparseIndices, outputShape);\n const sumDupeIndices = false;\n if (sparseValues.dtype === \"string\") {\n const indicesBuf = backend2.bufferSync(sparseIndices);\n const updatesBuf = backend2.bufferSync(sparseValues);\n const $defaultValue2 = util_exports.decodeString(backend2.readSync(defaultValue.dataId)[0]);\n const outBuf = scatterImplCPU2(indicesBuf, updatesBuf, outputShape, outputSize, sliceSize, numUpdates, sliceRank, strides, $defaultValue2, sumDupeIndices);\n return backend2.makeTensorInfo(outputShape, outBuf.dtype, outBuf.values);\n }\n const flattenShape = [outputSize / sliceSize, sliceSize];\n const $sparseIndices = reshape6({\n inputs: { x: sparseIndices },\n backend: backend2,\n attrs: { shape: [numUpdates, sliceRank] }\n });\n const $sparseValues = sparseValues.shape.length ? reshape6({\n inputs: { x: sparseValues },\n backend: backend2,\n attrs: { shape: [numUpdates, sliceSize] }\n }) : identity5({ inputs: { x: sparseValues }, backend: backend2 });\n const type = $sparseValues.dtype;\n const zero = backend2.makeTensorInfo([], type, util_exports.makeZerosTypedArray(1, type));\n const $defaultValue = reshape6({\n inputs: { x: defaultValue },\n backend: backend2,\n attrs: { shape: Array(flattenShape.length).fill(1) }\n });\n const $denseValues = tile6({ inputs: { x: $defaultValue }, backend: backend2, attrs: { reps: flattenShape } });\n const size = util_exports.sizeFromShape([numUpdates, sliceSize]);\n const uniformData = [\n { type: \"int32\", data: [sliceRank] },\n { type: \"int32\", data: strides },\n { type: \"int32\", data: [size] }\n ];\n switch (numUpdates) {\n case 0:\n break;\n case 1:\n if (true) {\n const program = new ScatterProgram2([numUpdates, sliceSize], sliceRank, $sparseIndices.shape.length, $sparseValues.shape.length, strides, flattenShape, type, sumDupeIndices);\n backend2.runWebGPUProgram(program, [$sparseValues, $sparseIndices], type, uniformData, $denseValues);\n }\n break;\n default:\n if (true) {\n const program = new ScatterProgram2([numUpdates, sliceSize], sliceRank, $sparseIndices.shape.length, zero.shape.length, strides, flattenShape, type, sumDupeIndices);\n backend2.runWebGPUProgram(program, [zero, $sparseIndices], type, uniformData, $denseValues);\n }\n {\n const program = new ScatterProgram2([numUpdates, sliceSize], sliceRank, $sparseIndices.shape.length, $sparseValues.shape.length, strides, flattenShape, type);\n backend2.runWebGPUProgram(program, [$sparseValues, $sparseIndices], type, uniformData, $denseValues);\n }\n }\n const denseValues = reshape6({ inputs: { x: $denseValues }, backend: backend2, attrs: { shape: outputShape } });\n backend2.disposeData($sparseIndices.dataId);\n backend2.disposeData($sparseValues.dataId);\n backend2.disposeData($defaultValue.dataId);\n backend2.disposeData(zero.dataId);\n backend2.disposeData($denseValues.dataId);\n return denseValues;\n}\nvar sparseToDenseConfig3 = {\n kernelName: SparseToDense,\n backendName: \"webgpu\",\n kernelFunc: sparseToDense4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/SplitV.js\nfunction splitV4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { numOrSizeSplits, axis } = attrs;\n const $axis = util_exports.parseAxisParam(axis, x.shape)[0];\n const splitSizes = backend_util_exports.prepareSplitSize(x, numOrSizeSplits, $axis);\n const xRank = x.shape.length;\n const begin = new Array(xRank).fill(0);\n const size = x.shape.slice();\n return splitSizes.map((s) => {\n const sliceSize = [...size];\n sliceSize[$axis] = s;\n const sliceT = slice5({ inputs: { x }, backend: backend2, attrs: { begin, size: sliceSize } });\n begin[$axis] += s;\n return sliceT;\n });\n}\nvar splitVConfig4 = {\n kernelName: SplitV,\n backendName: \"webgpu\",\n kernelFunc: splitV4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Sqrt.js\nvar sqrt4 = unaryKernelFunc3({ opType: UnaryOpType.SQRT });\nvar sqrtConfig4 = {\n kernelName: Sqrt,\n backendName: \"webgpu\",\n kernelFunc: sqrt4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Square.js\nvar squareConfig4 = {\n kernelName: Square,\n backendName: \"webgpu\",\n kernelFunc: ({ inputs, backend: backend2 }) => {\n const { x } = inputs;\n const webGPUBackend = backend2;\n const program = new UnaryOpProgram2(x.shape, UnaryOpType.SQUARE);\n return webGPUBackend.runWebGPUProgram(program, [x], x.dtype);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/SquaredDifference.js\nvar squaredDifference4 = binaryKernelFunc3({\n opType: BinaryOpType.SQUARED_DIFFERENCE\n});\nvar squaredDifferenceConfig4 = {\n kernelName: SquaredDifference,\n backendName: \"webgpu\",\n kernelFunc: squaredDifference4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/strided_slice_webgpu.js\nvar StridedSliceProgram2 = class {\n constructor(destSize) {\n this.variableNames = [\"x\"];\n this.workPerThread = 1;\n this.workGroupSize = [64, 1, 1];\n this.size = true;\n this.outputShape = destSize;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize, [this.workPerThread, 1, 1]);\n const dtype = getCoordsDataType2(this.outputShape.length);\n this.uniforms = `begin : ${dtype}, strides : ${dtype}, `;\n this.shaderKey = \"stridedSlice\";\n }\n getUserCode() {\n const rank = this.outputShape.length;\n let newCoords = \"\";\n if (rank === 1) {\n newCoords = \"coords * uniforms.strides + uniforms.begin\";\n } else {\n let outputAxis = 0;\n newCoords = this.outputShape.map((_, i) => {\n outputAxis++;\n return this.outputShape.length === 1 ? `coords * uniforms.strides[${i}] + uniforms.begin[${i}]` : `coords[${outputAxis - 1}] * uniforms.strides[${i}] + uniforms.begin[${i}]`;\n }).join(\",\");\n }\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let coords = getCoordsFromIndex(index);\n setOutputAtIndex(index, getX(${newCoords}));\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/StridedSlice.js\nfunction stridedSlice5(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { begin, end, strides, beginMask, endMask, ellipsisMask, newAxisMask, shrinkAxisMask } = attrs;\n const { finalShapeSparse, finalShape, isIdentity, sliceDim0, isSimpleSlice, begin: $begin, end: $end, strides: $strides } = slice_util_exports.sliceInfo(x.shape, begin, end, strides, beginMask, endMask, ellipsisMask, newAxisMask, shrinkAxisMask);\n let result;\n if (isIdentity) {\n result = reshape6({ inputs: { x }, backend: backend2, attrs: { shape: finalShape } });\n } else if (sliceDim0 || isSimpleSlice) {\n util_exports.assert(x.shape.length >= 1, () => `Input must have rank at least 1, got: ${x.shape.length}`);\n const size = slice_util_exports.computeOutShape($begin, $end, $strides);\n const sliced = slice5({ inputs: { x }, backend: backend2, attrs: { begin: $begin, size } });\n result = reshape6({ inputs: { x: sliced }, backend: backend2, attrs: { shape: finalShape } });\n backend2.disposeData(sliced.dataId);\n } else {\n const shouldExecuteOnCPU = backend2.shouldExecuteOnCPU([x]);\n if (shouldExecuteOnCPU) {\n const values = backend2.readSync(x.dataId);\n const xBuf = buffer(x.shape, x.dtype, values);\n const resultValues = stridedSliceImplCPU2(finalShapeSparse, xBuf, $strides, $begin);\n result = backend2.makeTensorInfo(finalShape, x.dtype, resultValues.values);\n } else {\n const program = new StridedSliceProgram2(finalShapeSparse);\n const uniformData = [{ type: \"int32\", data: $begin }, { type: \"int32\", data: $strides }];\n const resultValues = backend2.runWebGPUProgram(program, [x], x.dtype, uniformData);\n result = reshape6({ inputs: { x: resultValues }, backend: backend2, attrs: { shape: finalShape } });\n backend2.disposeData(resultValues.dataId);\n }\n }\n return result;\n}\nvar stridedSliceConfig4 = {\n kernelName: StridedSlice,\n backendName: \"webgpu\",\n kernelFunc: stridedSlice5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/StringNGrams.js\nfunction stringNGrams5(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { separator, nGramWidths, leftPad, rightPad: rightPad2, padWidth, preserveShortSequences } = attrs;\n const { data, dataSplits } = inputs;\n const $data = backend2.readSync(data.dataId);\n const $dataSplits = backend2.readSync(dataSplits.dataId);\n const [nGrams, nGramsSplits] = stringNGramsImplCPU2($data, $dataSplits, separator, nGramWidths, leftPad, rightPad2, padWidth, preserveShortSequences);\n return [\n backend2.makeTensorInfo([nGrams.length], \"string\", nGrams),\n backend2.makeTensorInfo(dataSplits.shape, \"int32\", nGramsSplits)\n ];\n}\nvar stringNGramsConfig4 = {\n kernelName: StringNGrams,\n backendName: \"webgpu\",\n kernelFunc: stringNGrams5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Tanh.js\nvar tanh5 = unaryKernelFunc3({ opType: UnaryOpType.TANH });\nvar tanhConfig4 = {\n kernelName: Tanh,\n backendName: \"webgpu\",\n kernelFunc: tanh5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/top_k_webgpu.js\nvar SwapProgram2 = class {\n constructor(shape) {\n this.variableNames = [\"x\", \"indices\"];\n this.workGroupSize = [256, 1, 1];\n this.size = true;\n this.outputShape = shape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.uniforms = `inputSize : i32, firstPass : i32, negativeInf : f32,\n dir : i32, inc : i32,`;\n this.shaderKey = \"swap\";\n }\n getUserCode() {\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let outC = getCoordsFromIndex(index);\n let batch = outC[0];\n let elemIdx = outC[1];\n // We compare elements pair-wise within a group of size 2 * inc.\n // The comparing rule for each group alternates between ascending\n // and descending. Within each group, we compare each pair at\n // positions i and i+inc. To decide whether an element at position i\n // is x0 or x1, we mod it by 2 * inc, if the result is smaller than\n // inc, it is in the first half of the group, we denote it as x0,\n // otherwise we denote it as x1.\n // For example, as shown in the Bitonic top K paper referenced\n // above, Figure5(a) shows that element[1] is in the second half of\n // the group when group size is 2, but it is in the first half of\n // the group when group size is 4.\n let isFirstInPair = elemIdx % (2 * uniforms.inc) < uniforms.inc;\n var i = 0;\n if (isFirstInPair) {\n i = elemIdx;\n } else {\n i = elemIdx - uniforms.inc;\n }\n\n var i0 = 0;\n if (uniforms.firstPass == 1) {\n i0 = i;\n } else {\n i0 = i32(getIndices(batch, i));\n }\n\n var i1 = 0;\n if (uniforms.firstPass == 1) {\n i1 = i + uniforms.inc;\n } else {\n i1 = i32(getIndices(batch, i + uniforms.inc));\n }\n\n var x0 = f32(0.0);\n var x1 = f32(0.0);\n if (i0 < uniforms.inputSize) {\n x0 = getX(batch, i0);\n } else {\n x0 = uniforms.negativeInf;\n }\n if (i1 < uniforms.inputSize) {\n x1 = getX(batch, i1);\n } else {\n x1 = uniforms.negativeInf;\n }\n\n let reverse = elemIdx % (2 * uniforms.dir) >= uniforms.dir;\n let isGreater = x0 > x1 || (x0 == x1 && i1 > i0);\n if (reverse == isGreater) {\n // Elements in opposite order of direction\n let iTemp = i0;\n i0 = i1;\n i1 = iTemp;\n }\n if (isFirstInPair) {\n setOutputAtIndex(index, f32(i0));\n } else {\n setOutputAtIndex(index, f32(i1));\n }\n }\n }\n `;\n return userCode;\n }\n};\nvar MergeProgram2 = class {\n constructor(shape) {\n this.variableNames = [\"x\", \"indices\"];\n this.workGroupSize = [256, 1, 1];\n this.size = true;\n this.outputShape = shape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.uniforms = `inputSize : i32, firstPass : i32, k : i32,`;\n this.shaderKey = \"merge\";\n }\n getUserCode() {\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let outC = getCoordsFromIndex(index);\n let batch = outC[0];\n let elemIdx = outC[1];\n // The output size is half of the previous size.\n // If the previous sequence is | | | | _ _ _ _ | | | | _ _ _ _\n // (k=4), we only need to output the indices at positions |, the\n // indices at positions _ can be thrown away, see Figure5(b) After\n // Phase 2 (Merge phase) in the Bitonic Top K paper referenced\n // above.\n // For example, the paper shows we only need to output the orange\n // bars. The output sequence should look like this | | | | | | | |.\n // Because the sequence is halved, to map the output index back to\n // the previous sequence to find the corresponding value, we need\n // to double the index. When we double the index, we basically\n // interpolate a position, so 2i looks like\n // | _ | _ | _ | _ | _ | _ | _. We move the | to the first k\n // position of each 2k positions by - elemIdx % k. E.g. for output\n // at index 4,5,6,7, we want to get the corresponding element at\n // original index 8,9,10,11, for output at index 8,9,10,11,\n // we want to get the corresponding element at original index\n // 16,17,18,19, so on and so forth.\n\n var i = 0;\n if (elemIdx < uniforms.k) {\n i = elemIdx;\n } else {\n i = elemIdx * 2 - elemIdx % uniforms.k;\n }\n var i0 = 0;\n if (uniforms.firstPass == 1) {\n i0 = i;\n } else {\n i0 = i32(getIndices(batch, i));\n }\n var i1 = 0;\n if (uniforms.firstPass == 1) {\n i1 = i + uniforms.k;\n } else {\n i1 = i32(getIndices(batch, i + uniforms.k));\n }\n\n let x0 = getX(batch, i0);\n var x1 = f32(0.0);\n if (i1 < uniforms.inputSize) {\n x1 = getX(batch, i1);\n } else {\n x1 = x0;\n }\n\n if (x0 >= x1) {\n setOutputAtIndex(index, f32(i0));\n } else {\n setOutputAtIndex(index, f32(i1));\n }\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/TopK.js\nfunction disposeIntermediateTensorInfoOrNull2(backend2, tensorInfo) {\n if (tensorInfo !== null) {\n backend2.disposeData(tensorInfo.dataId);\n }\n}\nfunction roundUpToPow22(num) {\n let pow22 = 1;\n while (pow22 < num) {\n pow22 *= 2;\n }\n return pow22;\n}\nfunction topK3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { k, sorted } = attrs;\n const xShape = x.shape;\n const lastDim = xShape[xShape.length - 1];\n if (backend2.shouldExecuteOnCPU([x])) {\n const xVals = backend2.readSync(x.dataId);\n const [allTopKVals, allTopKIndices] = topKImplCPU2(xVals, xShape, x.dtype, k, sorted);\n return [\n backend2.makeTensorInfo(allTopKVals.shape, allTopKVals.dtype, allTopKVals.values),\n backend2.makeTensorInfo(allTopKIndices.shape, allTopKIndices.dtype, allTopKIndices.values)\n ];\n }\n if (k === 0) {\n xShape[xShape.length - 1] = 0;\n return [\n backend2.makeTensorInfo(xShape, x.dtype, []),\n backend2.makeTensorInfo(xShape, \"int32\", [])\n ];\n }\n if (lastDim === 1) {\n return [\n x,\n fill5({ attrs: { shape: xShape, dtype: \"int32\", value: 0 }, backend: backend2 })\n ];\n }\n const xSize = util_exports.sizeFromShape(xShape);\n const batch = xSize / lastDim;\n const x2D = reshape6({ inputs: { x }, attrs: { shape: [batch, lastDim] }, backend: backend2 });\n const kPow2 = roundUpToPow22(k);\n const lastDimPow2 = roundUpToPow22(lastDim);\n let indices = null;\n const getInputs = () => indices === null ? [x2D, x2D] : [x2D, indices];\n const runSwap = (dir, inc, shape) => {\n const inputs2 = getInputs();\n const program = new SwapProgram2(shape);\n const firstPass = indices === null ? 1 : 0;\n const uniformDataSwap = [\n { type: \"int32\", data: [lastDim] },\n { type: \"int32\", data: [firstPass] },\n { type: \"float32\", data: [Number.NEGATIVE_INFINITY] },\n { type: \"int32\", data: [dir] },\n { type: \"int32\", data: [inc] }\n ];\n const prevIndices2 = indices;\n indices = backend2.runWebGPUProgram(program, inputs2, \"int32\", uniformDataSwap);\n disposeIntermediateTensorInfoOrNull2(backend2, prevIndices2);\n };\n for (let len = 1; len < kPow2; len *= 2) {\n const dir = len * 2;\n for (let inc = len; inc >= 1; inc /= 2) {\n runSwap(dir, inc, [batch, lastDimPow2]);\n }\n }\n for (let indicesSize = lastDimPow2; indicesSize > kPow2; indicesSize /= 2) {\n const inputs2 = getInputs();\n const mergeProgram = new MergeProgram2([batch, indicesSize / 2]);\n const firstPass = indices === null ? 1 : 0;\n const uniformDataMerge = [\n { type: \"int32\", data: [lastDim] },\n { type: \"int32\", data: [firstPass] },\n { type: \"int32\", data: [kPow2] }\n ];\n const prevIndices2 = indices;\n indices = backend2.runWebGPUProgram(mergeProgram, inputs2, \"int32\", uniformDataMerge);\n disposeIntermediateTensorInfoOrNull2(backend2, prevIndices2);\n const len = kPow2 / 2;\n const dir = len * 2;\n for (let inc = len; inc >= 1; inc /= 2) {\n runSwap(dir, inc, indices.shape);\n }\n }\n let prevIndices = indices;\n indices = slice5({ inputs: { x: indices }, backend: backend2, attrs: { begin: 0, size: [batch, k] } });\n disposeIntermediateTensorInfoOrNull2(backend2, prevIndices);\n let values = gatherV24({ inputs: { x: x2D, indices }, backend: backend2, attrs: { axis: 1, batchDims: 1 } });\n disposeIntermediateTensorInfoOrNull2(backend2, x2D);\n const newShape = xShape.slice(0, -1);\n newShape.push(k);\n prevIndices = indices;\n indices = reshape6({ inputs: { x: indices }, attrs: { shape: newShape }, backend: backend2 });\n disposeIntermediateTensorInfoOrNull2(backend2, prevIndices);\n const prevValues = values;\n values = reshape6({ inputs: { x: values }, attrs: { shape: newShape }, backend: backend2 });\n disposeIntermediateTensorInfoOrNull2(backend2, prevValues);\n return [values, indices];\n}\nvar topKConfig4 = {\n kernelName: TopK,\n backendName: \"webgpu\",\n kernelFunc: topK3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/transform_webgpu.js\nvar TransformProgram2 = class {\n constructor(outShape) {\n this.variableNames = [\"Image\", \"Transforms\"];\n this.uniforms = \"interpolationModeId : i32, fillModeId : i32, fillValue : f32,\";\n this.workGroupSize = [64, 1, 1];\n this.size = true;\n this.outputShape = outShape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.shaderKey = \"transform\";\n }\n getUserCode() {\n const userCode = `\n fn mapCoord(outCoord : f32, len : f32) -> f32{\n var inCoord = outCoord;\n if(uniforms.fillModeId == 2) {\n if (inCoord < 0.0) {\n if (len <= 1.0) {\n inCoord = 0.0;\n } else {\n let sz2 = 2.0 * len;\n if (inCoord < sz2) {\n inCoord = sz2 * f32(i32(f32(-inCoord / sz2))) +\n inCoord;\n }\n if (inCoord < -len) {\n inCoord = inCoord + sz2;\n } else {\n inCoord = -inCoord - 1.0;\n }\n }\n } else if (inCoord > len - 1.0) {\n if (len <= 1.0) {\n inCoord = 0.0;\n } else {\n let sz2 = 2.0 * len;\n inCoord = inCoord - sz2 * f32(i32(f32(inCoord / sz2)));\n if (inCoord >= len) {\n inCoord = sz2 - inCoord - 1.0;\n }\n }\n }\n return clamp(inCoord, 0.0, len - 1.0);\n } else if (uniforms.fillModeId == 3) {\n if (inCoord < 0.0) {\n if (len <= 1.0) {\n inCoord = 0.0;\n } else {\n let sz = len - 1.0;\n inCoord = inCoord + len * (f32(i32(f32(-inCoord / sz))) + 1.0);\n }\n } else if (inCoord > len - 1.0) {\n if (len <= 1.0) {\n inCoord = 0.0;\n } else {\n let sz = len - 1.0;\n inCoord = inCoord - len * f32(i32(f32(inCoord / sz)));\n }\n }\n return clamp(inCoord, 0.0, len - 1.0);\n } else if (uniforms.fillModeId == 4) {\n return clamp(outCoord, 0.0, len - 1.0);\n }\n return outCoord;\n }\n fn readWithFillValue(batch : i32, coordY : i32, coordX : i32,\n channel : i32) -> f32 {\n var outputValue : f32;\n if (0 <= coordY && coordY < uniforms.imageShape[1] && 0 <= coordX && coordX < uniforms.imageShape[2]) {\n outputValue = getImage(batch, coordY, coordX, channel);\n } else {\n outputValue = uniforms.fillValue;\n }\n return outputValue;\n }\n\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let coords = getCoordsFromIndex(index);\n var outputValue : f32;\n let batch = coords[0];\n let x = coords[2];\n let y = coords[1];\n let channel = coords[3];\n let xf = f32(x);\n let yf = f32(y);\n let a1 = getTransforms(batch, 0);\n let a2 = getTransforms(batch, 1);\n let a3 = getTransforms(batch, 2);\n let b1 = getTransforms(batch, 3);\n let b2 = getTransforms(batch, 4);\n let b3 = getTransforms(batch, 5);\n let c1 = getTransforms(batch, 6);\n let c2 = getTransforms(batch, 7);\n let projection = c1 * xf + c2 * yf + 1.0;\n if (projection == 0.0) {\n outputValue = uniforms.fillValue;\n } else {\n let inX = (a1 * xf + a2 * yf + a3) / projection;\n let inY = (b1 * xf + b2 * yf + b3) / projection;\n let mapX = mapCoord(inX, f32(uniforms.imageShape[2]));\n let mapY = mapCoord(inY, f32(uniforms.imageShape[1]));\n\n if (uniforms.interpolationModeId == 1) {\n let coordY = i32(round(mapY));\n let coordX = i32(round(mapX));\n outputValue = readWithFillValue(batch, coordY, coordX,\n channel);\n } else {\n let yFloor = floor(mapY);\n let xFloor = floor(mapX);\n let yCeil = yFloor + 1.0;\n let xCeil = xFloor + 1.0;\n let valueYFloor = (xCeil - mapX) *\n readWithFillValue(batch, i32(yFloor), i32(xFloor), channel) +\n (mapX - xFloor) *\n readWithFillValue(batch, i32(yFloor), i32(xCeil), channel);\n let valueYCeil = (xCeil - mapX) *\n readWithFillValue(batch, i32(yCeil), i32(xFloor), channel) +\n (mapX - xFloor) *\n readWithFillValue(batch, i32(yCeil), i32(xCeil), channel);\n outputValue = (yCeil - mapY) * valueYFloor +\n (mapY - yFloor) * valueYCeil;\n }\n }\n setOutputAtIndex(index, outputValue);\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Transform.js\nfunction transform5(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { image: image2, transforms } = inputs;\n const { interpolation, fillMode, fillValue, outputShape } = attrs;\n const [batch, imageHeight, imageWidth, numChannels] = image2.shape;\n const [outHeight, outWidth] = outputShape != null ? outputShape : [imageHeight, imageWidth];\n const outShape = [\n batch,\n outHeight,\n outWidth,\n numChannels\n ];\n const program = new TransformProgram2(outShape);\n const interpolationModeId = interpolation === \"nearest\" ? 1 : 2;\n let fillModeId;\n switch (fillMode) {\n case \"constant\":\n fillModeId = 1;\n break;\n case \"reflect\":\n fillModeId = 2;\n break;\n case \"wrap\":\n fillModeId = 3;\n break;\n case \"nearest\":\n fillModeId = 4;\n break;\n default:\n fillModeId = 1;\n break;\n }\n const uniformData = [\n { type: \"int32\", data: [interpolationModeId] },\n { type: \"int32\", data: [fillModeId] },\n { type: \"float32\", data: [fillValue] }\n ];\n return backend2.runWebGPUProgram(program, [image2, transforms], \"float32\", uniformData);\n}\nvar transformConfig4 = {\n kernelName: Transform,\n backendName: \"webgpu\",\n kernelFunc: transform5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Unpack.js\nfunction unpack4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { value } = inputs;\n let { axis } = attrs;\n if (axis < 0) {\n axis += value.shape.length;\n }\n const x = value;\n const xRank = x.shape.length;\n const num = value.shape[axis];\n const outShape = new Array(xRank - 1);\n let outIndex = 0;\n for (let i = 0; i < xRank; i++) {\n if (i !== axis) {\n outShape[outIndex++] = x.shape[i];\n }\n }\n const toDispose = [];\n const begin = new Array(xRank).fill(0);\n const size = x.shape.slice();\n size[axis] = 1;\n const res = new Array(num);\n for (let i = 0; i < res.length; i++) {\n begin[axis] = i;\n const sliced = slice5({ inputs: { x }, backend: backend2, attrs: { begin, size } });\n const reshaped = reshape6({ inputs: { x: sliced }, backend: backend2, attrs: { shape: outShape } });\n res[i] = reshaped;\n toDispose.push(sliced);\n }\n toDispose.forEach((t) => backend2.disposeData(t.dataId));\n return res;\n}\nvar unpackConfig4 = {\n kernelName: Unpack,\n backendName: \"webgpu\",\n kernelFunc: unpack4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/register_all_kernels.js\nvar kernelConfigs4 = [\n _fusedMatMulConfig4,\n absConfig4,\n addConfig4,\n addNConfig4,\n argMaxConfig4,\n argMinConfig3,\n atan2Config3,\n avgPoolConfig4,\n batchMatMulConfig4,\n batchToSpaceNDConfig4,\n castConfig4,\n ceilConfig4,\n clipByValueConfig4,\n complexConfig3,\n concatConfig4,\n conv2DConfig4,\n conv2DBackpropInputConfig4,\n cosConfig4,\n coshConfig4,\n cropAndResizeConfig4,\n cumprodConfig4,\n cumsumConfig4,\n depthToSpaceConfig4,\n depthwiseConv2dNativeConfig4,\n einsumConfig3,\n eluConfig4,\n equalConfig4,\n expConfig4,\n expandDimsConfig4,\n expm1Config3,\n fillConfig4,\n flipLeftRightConfig4,\n fromPixelsConfig2,\n floorConfig4,\n floorDivConfig4,\n fusedBatchNormConfig2,\n fusedConv2DConfig4,\n fusedDepthwiseConv2DConfig4,\n gatherNdConfig4,\n gatherV2Config4,\n greaterConfig4,\n greaterEqualConfig4,\n identityConfig4,\n imagConfig3,\n isNaNConfig3,\n leakyReluConfig4,\n lessConfig4,\n lessEqualConfig4,\n logConfig4,\n logicalAndConfig4,\n logicalNotConfig4,\n maxConfig4,\n maximumConfig4,\n maxPoolConfig4,\n meanConfig4,\n minConfig4,\n minimumConfig4,\n mirrorPadConfig4,\n multiplyConfig4,\n negConfig4,\n nonMaxSuppressionV3Config4,\n nonMaxSuppressionV5Config4,\n notEqualConfig4,\n onesLikeConfig4,\n packConfig4,\n padV2Config4,\n powConfig4,\n preluConfig4,\n prodConfig4,\n rangeConfig4,\n realConfig3,\n realDivConfig4,\n reciprocalConfig3,\n reluConfig4,\n relu6Config4,\n reshapeConfig4,\n resizeBilinearConfig4,\n resizeNearestNeighborConfig4,\n rotateWithOffsetConfig4,\n rsqrtConfig4,\n scatterNdConfig4,\n selectConfig4,\n sigmoidConfig4,\n sinConfig4,\n sinhConfig3,\n sliceConfig4,\n stridedSliceConfig4,\n stringNGramsConfig4,\n softmaxConfig4,\n spaceToBatchNDConfig4,\n sparseToDenseConfig3,\n splitVConfig4,\n sqrtConfig4,\n squareConfig4,\n squaredDifferenceConfig4,\n subConfig4,\n sumConfig4,\n tanhConfig4,\n tileConfig4,\n topKConfig4,\n transformConfig4,\n transposeConfig4,\n unpackConfig4,\n zerosLikeConfig4\n];\nfor (const kernelConfig of kernelConfigs4) {\n registerKernel(kernelConfig);\n}\n\n// dist/tfjs.version.js\nvar version9 = \"3.20.0\";\nvar version22 = \"3.20.0\";\nvar version32 = \"3.20.0\";\nvar version42 = \"3.20.0\";\nvar version52 = \"3.20.0\";\nvar version62 = \"3.20.0\";\nvar version72 = \"3.20.0\";\nvar version82 = {\n tfjs: version9,\n \"tfjs-core\": version22,\n \"tfjs-data\": version32,\n \"tfjs-layers\": version42,\n \"tfjs-converter\": version52,\n \"tfjs-backend-webgl\": version62,\n \"tfjs-backend-wasm\": version72\n};\nexport {\n Abs,\n Acos,\n Acosh,\n AdadeltaOptimizer,\n AdagradOptimizer,\n AdamOptimizer,\n AdamaxOptimizer,\n Add,\n AddN,\n All,\n Any,\n ArgMax,\n ArgMin,\n Asin,\n Asinh,\n Atan,\n Atan2,\n Atanh,\n AvgPool,\n AvgPool3D,\n AvgPool3DGrad,\n AvgPoolGrad,\n BackendWasm,\n BatchMatMul,\n BatchToSpaceND,\n Bincount,\n BroadcastArgs,\n BroadcastTo,\n Callback,\n CallbackList,\n Cast,\n Ceil,\n ClipByValue,\n Complex,\n ComplexAbs,\n Concat,\n Conv2D,\n Conv2DBackpropFilter,\n Conv2DBackpropInput,\n Conv3D,\n Conv3DBackpropFilterV2,\n Conv3DBackpropInputV2,\n Cos,\n Cosh,\n CropAndResize,\n Cumprod,\n Cumsum,\n CustomCallback,\n DataStorage,\n DenseBincount,\n DepthToSpace,\n DepthwiseConv2dNative,\n DepthwiseConv2dNativeBackpropFilter,\n DepthwiseConv2dNativeBackpropInput,\n Diag,\n Dilation2D,\n Dilation2DBackpropFilter,\n Dilation2DBackpropInput,\n ENV,\n EarlyStopping,\n Einsum,\n Elu,\n EluGrad,\n Environment,\n Equal,\n Erf,\n Exp,\n ExpandDims,\n Expm1,\n FFT,\n Fill,\n FlipLeftRight,\n Floor,\n FloorDiv,\n FromPixels,\n FusedBatchNorm,\n FusedConv2D,\n FusedDepthwiseConv2D,\n GPGPUContext,\n GatherNd,\n GatherV2,\n GraphModel,\n Greater,\n GreaterEqual,\n History,\n IFFT,\n Identity,\n Imag,\n InputSpec,\n IsFinite,\n IsInf,\n IsNan,\n KernelBackend,\n LRN,\n LRNGrad,\n LayerVariable,\n LayersModel,\n LeakyRelu,\n Less,\n LessEqual,\n LinSpace,\n Log,\n Log1p,\n LogSoftmax,\n LogicalAnd,\n LogicalNot,\n LogicalOr,\n LogicalXor,\n LowerBound,\n MathBackendWebGL,\n Max,\n MaxPool,\n MaxPool3D,\n MaxPool3DGrad,\n MaxPoolGrad,\n MaxPoolWithArgmax,\n Maximum,\n Mean,\n Min,\n Minimum,\n MirrorPad,\n Mod,\n MomentumOptimizer,\n Multinomial,\n Multiply,\n Neg,\n NonMaxSuppressionV3,\n NonMaxSuppressionV4,\n NonMaxSuppressionV5,\n NotEqual,\n OP_SCOPE_SUFFIX,\n OneHot,\n OnesLike,\n Optimizer,\n OptimizerConstructors,\n Pack,\n PadV2,\n Pool,\n Pow,\n Prelu,\n Prod,\n RMSPropOptimizer,\n RNN,\n RaggedTensorToTensor,\n Range,\n Rank,\n Real,\n RealDiv,\n Reciprocal,\n Reduction,\n Relu,\n Relu6,\n Reshape,\n ResizeBilinear,\n ResizeBilinearGrad,\n ResizeNearestNeighbor,\n ResizeNearestNeighborGrad,\n Reverse,\n RotateWithOffset,\n Round,\n Rsqrt,\n SGDOptimizer,\n ScatterNd,\n SearchSorted,\n Select,\n Selu,\n Sequential,\n Sigmoid,\n Sign,\n Sin,\n Sinh,\n Slice,\n Softmax,\n Softplus,\n SpaceToBatchND,\n SparseFillEmptyRows,\n SparseReshape,\n SparseSegmentMean,\n SparseSegmentSum,\n SparseToDense,\n SplitV,\n Sqrt,\n Square,\n SquaredDifference,\n Step,\n StridedSlice,\n StringNGrams,\n StringSplit,\n StringToHashBucketFast,\n Sub,\n Sum,\n SymbolicTensor,\n Tan,\n Tanh,\n Tensor,\n TensorBuffer,\n Tile,\n TopK,\n Transform,\n Transpose,\n Unique,\n Unpack,\n UnsortedSegmentSum,\n UpperBound,\n Variable,\n WebGPUBackend,\n ZerosLike,\n _FusedMatMul,\n abs,\n acos,\n acosh,\n add2 as add,\n addN,\n all,\n any,\n argMax,\n argMin,\n asin,\n asinh,\n atan,\n atan2,\n atanh,\n avgPool,\n avgPool3d,\n backend,\n backend_util_exports as backend_util,\n basicLSTMCell,\n batchNorm,\n batchNorm2d,\n batchNorm3d,\n batchNorm4d,\n batchToSpaceND,\n bincount,\n booleanMaskAsync,\n broadcastArgs,\n broadcastTo,\n broadcast_util_exports as broadcast_util,\n browser_exports as browser,\n buffer,\n callbacks,\n cast,\n ceil,\n clipByValue,\n clone,\n complex,\n concat,\n concat1d,\n concat2d,\n concat3d,\n concat4d,\n exports_constraints_exports as constraints,\n conv1d,\n conv2d,\n conv2dTranspose,\n conv3d,\n conv3dTranspose,\n copyRegisteredKernels,\n cos,\n cosh,\n cosineWindow,\n cumprod,\n cumsum,\n customGrad,\n dist_exports2 as data,\n denseBincount,\n deprecationWarn,\n depthToSpace,\n depthwiseConv2d,\n deregisterOp,\n device_util_exports as device_util,\n diag,\n dilation2d,\n disableDeprecationWarnings,\n dispose,\n disposeVariables,\n div,\n divNoNan,\n dot,\n dropout,\n einsum,\n elu,\n enableDebugMode,\n enableProdMode,\n enclosingPowerOfTwo,\n engine,\n env,\n equal,\n erf,\n euclideanNorm,\n exp,\n expandDims,\n expm1,\n eye,\n fft,\n fill,\n findBackend,\n findBackendFactory,\n floor,\n floorDiv,\n forceHalfFloat,\n fused_ops_exports as fused,\n gather,\n gatherND,\n gather_nd_util_exports as gather_util,\n getBackend,\n getGradient,\n getKernel,\n getKernelsForBackend,\n getThreadsCount,\n gpgpu_util_exports as gpgpu_util,\n grad,\n grads,\n greater,\n greaterEqual,\n ifft,\n imag,\n image,\n inTopKAsync,\n exports_initializers_exports as initializers,\n input,\n io_exports as io,\n irfft,\n isFinite2 as isFinite,\n isInf,\n isNaN2 as isNaN,\n keep,\n kernel_impls_exports as kernel_impls,\n exports_layers_exports as layers,\n leakyRelu,\n less,\n lessEqual,\n linalg,\n linspace,\n loadGraphModel,\n loadGraphModelSync,\n loadLayersModel,\n localResponseNormalization,\n log2 as log,\n log1p,\n logSigmoid,\n logSoftmax,\n logSumExp,\n logicalAnd,\n logicalNot,\n logicalOr,\n logicalXor,\n losses,\n lowerBound,\n matMul,\n math_exports as math,\n max,\n maxPool,\n maxPool3d,\n maxPoolWithArgmax,\n maximum,\n mean,\n memory,\n meshgrid,\n exports_metrics_exports as metrics,\n min,\n minimum,\n mirrorPad,\n mod,\n model,\n exports_models_exports as models,\n moments,\n movingAverage,\n mul,\n multiRNNCell,\n multinomial,\n neg,\n nextFrame,\n norm,\n notEqual,\n oneHot,\n ones2 as ones,\n onesLike,\n op,\n outerProduct,\n pad,\n pad1d,\n pad2d,\n pad3d,\n pad4d,\n pool,\n pow,\n prelu,\n print,\n prod,\n profile,\n raggedTensorToTensor,\n rand,\n randomGamma,\n randomNormal,\n randomStandardNormal,\n randomUniform,\n range,\n ready,\n real,\n reciprocal,\n registerBackend,\n registerCallbackConstructor,\n registerGradient,\n registerKernel,\n registerOp,\n exports_regularizers_exports as regularizers,\n relu,\n relu6,\n removeBackend,\n reshape,\n reverse,\n reverse1d,\n reverse2d,\n reverse3d,\n reverse4d,\n rfft,\n round2 as round,\n rsqrt,\n scalar,\n scatterND,\n scatter_nd_util_exports as scatter_util,\n searchSorted,\n selu,\n separableConv2d,\n sequential,\n serialization_exports as serialization,\n setBackend,\n setPlatform,\n setThreadsCount,\n setWasmPath,\n setWasmPaths,\n setWebGLContext,\n setdiff1dAsync,\n sigmoid,\n sign,\n signal,\n sin,\n sinh,\n slice,\n slice1d,\n slice2d,\n slice3d,\n slice4d,\n slice_util_exports as slice_util,\n softmax,\n softplus,\n spaceToBatchND,\n sparse,\n sparseToDense,\n spectral,\n split,\n sqrt,\n square,\n squaredDifference,\n squeeze,\n stack,\n step,\n stridedSlice,\n string,\n sub,\n sum2 as sum,\n sumOutType,\n tan,\n tanh2 as tanh,\n tensor,\n tensor1d,\n tensor2d,\n tensor3d,\n tensor4d,\n tensor5d,\n tensor6d,\n tensor_util_exports as tensor_util,\n test_util_exports as test_util,\n tidy,\n tile,\n time,\n topk,\n train,\n transpose,\n truncatedNormal,\n unique,\n unregisterGradient,\n unregisterKernel,\n unsortedSegmentSum,\n unstack,\n upcastType,\n upperBound,\n util_exports as util,\n valueAndGrad,\n valueAndGrads,\n variable,\n variableGrads,\n version82 as version,\n version3 as version_converter,\n version as version_core,\n version2 as version_layers,\n version8 as version_wasm,\n version6 as version_webgl,\n webgl,\n webgl_util_exports as webgl_util,\n webgpu_util_exports as webgpu_util,\n where,\n whereAsync,\n zeros,\n zerosLike\n};\n", "export const vertexIdentity = `\n precision highp float;\n attribute vec2 pos;\n attribute vec2 uv;\n varying vec2 vUv;\n uniform float flipY;\n void main(void) {\n vUv = uv;\n gl_Position = vec4(pos.x, pos.y*flipY, 0.0, 1.);\n }\n`;\n\nexport const fragmentIdentity = `\n precision highp float;\n varying vec2 vUv;\n uniform sampler2D texture;\n void main(void) {\n gl_FragColor = texture2D(texture, vUv);\n }\n`;\n\nexport const colorMatrixWithAlpha = `\n precision highp float;\n varying vec2 vUv;\n uniform sampler2D texture;\n uniform float m[20];\n void main(void) {\n vec4 c = texture2D(texture, vUv);\n gl_FragColor.r = m[0] * c.r + m[1] * c.g + m[2] * c.b + m[3] * c.a + m[4];\n gl_FragColor.g = m[5] * c.r + m[6] * c.g + m[7] * c.b + m[8] * c.a + m[9];\n gl_FragColor.b = m[10] * c.r + m[11] * c.g + m[12] * c.b + m[13] * c.a + m[14];\n gl_FragColor.a = m[15] * c.r + m[16] * c.g + m[17] * c.b + m[18] * c.a + m[19];\n }\n`;\n\nexport const colorMatrixWithoutAlpha = `\n precision highp float;\n varying vec2 vUv;\n uniform sampler2D texture;\n uniform float m[20];\n void main(void) {\n vec4 c = texture2D(texture, vUv);\n gl_FragColor.r = m[0] * c.r + m[1] * c.g + m[2] * c.b + m[4];\n gl_FragColor.g = m[5] * c.r + m[6] * c.g + m[7] * c.b + m[9];\n gl_FragColor.b = m[10] * c.r + m[11] * c.g + m[12] * c.b + m[14];\n gl_FragColor.a = c.a;\n }\n`;\n\nexport const pixelate = `\n precision highp float;\n varying vec2 vUv;\n uniform vec2 size;\n uniform sampler2D texture;\n vec2 pixelate(vec2 coord, vec2 size) {\n return floor( coord / size ) * size;\n }\n void main(void) {\n gl_FragColor = vec4(0.0);\n vec2 coord = pixelate(vUv, size);\n gl_FragColor += texture2D(texture, coord);\n }\n`;\n\nexport const blur = `\n precision highp float;\n varying vec2 vUv;\n uniform sampler2D texture;\n uniform vec2 px;\n void main(void) {\n gl_FragColor = vec4(0.0);\n gl_FragColor += texture2D(texture, vUv + vec2(-7.0*px.x, -7.0*px.y))*0.0044299121055113265;\n gl_FragColor += texture2D(texture, vUv + vec2(-6.0*px.x, -6.0*px.y))*0.00895781211794;\n gl_FragColor += texture2D(texture, vUv + vec2(-5.0*px.x, -5.0*px.y))*0.0215963866053;\n gl_FragColor += texture2D(texture, vUv + vec2(-4.0*px.x, -4.0*px.y))*0.0443683338718;\n gl_FragColor += texture2D(texture, vUv + vec2(-3.0*px.x, -3.0*px.y))*0.0776744219933;\n gl_FragColor += texture2D(texture, vUv + vec2(-2.0*px.x, -2.0*px.y))*0.115876621105;\n gl_FragColor += texture2D(texture, vUv + vec2(-1.0*px.x, -1.0*px.y))*0.147308056121;\n gl_FragColor += texture2D(texture, vUv )*0.159576912161;\n gl_FragColor += texture2D(texture, vUv + vec2( 1.0*px.x, 1.0*px.y))*0.147308056121;\n gl_FragColor += texture2D(texture, vUv + vec2( 2.0*px.x, 2.0*px.y))*0.115876621105;\n gl_FragColor += texture2D(texture, vUv + vec2( 3.0*px.x, 3.0*px.y))*0.0776744219933;\n gl_FragColor += texture2D(texture, vUv + vec2( 4.0*px.x, 4.0*px.y))*0.0443683338718;\n gl_FragColor += texture2D(texture, vUv + vec2( 5.0*px.x, 5.0*px.y))*0.0215963866053;\n gl_FragColor += texture2D(texture, vUv + vec2( 6.0*px.x, 6.0*px.y))*0.00895781211794;\n gl_FragColor += texture2D(texture, vUv + vec2( 7.0*px.x, 7.0*px.y))*0.0044299121055113265;\n }\n`;\n\nexport const convolution = `\n precision highp float;\n varying vec2 vUv;\n uniform sampler2D texture;\n uniform vec2 px;\n uniform float m[9];\n void main(void) {\n vec4 c11 = texture2D(texture, vUv - px); // top left\n vec4 c12 = texture2D(texture, vec2(vUv.x, vUv.y - px.y)); // top center\n vec4 c13 = texture2D(texture, vec2(vUv.x + px.x, vUv.y - px.y)); // top right\n vec4 c21 = texture2D(texture, vec2(vUv.x - px.x, vUv.y) ); // mid left\n vec4 c22 = texture2D(texture, vUv); // mid center\n vec4 c23 = texture2D(texture, vec2(vUv.x + px.x, vUv.y) ); // mid right\n vec4 c31 = texture2D(texture, vec2(vUv.x - px.x, vUv.y + px.y) ); // bottom left\n vec4 c32 = texture2D(texture, vec2(vUv.x, vUv.y + px.y) ); // bottom center\n vec4 c33 = texture2D(texture, vUv + px ); // bottom right\n gl_FragColor = \n c11 * m[0] + c12 * m[1] + c22 * m[2] +\n c21 * m[3] + c22 * m[4] + c23 * m[5] +\n c31 * m[6] + c32 * m[7] + c33 * m[8];\n gl_FragColor.a = c22.a;\n }\n`;\n", "/**\n * Image Filters in WebGL algoritm implementation\n * Based on: [WebGLImageFilter](https://github.com/phoboslab/WebGLImageFilter)\n */\n\n/* eslint-disable func-names */\n\nimport * as shaders from './imagefxshaders';\nimport { canvas } from './image';\nimport { log } from '../util/util';\n\nconst collect = (source, prefix: string, collection) => {\n const r = new RegExp('\\\\b' + prefix + ' \\\\w+ (\\\\w+)', 'ig');\n source.replace(r, (match, name) => {\n collection[name] = 0;\n return match;\n });\n};\n\nclass GLProgram {\n uniform = {};\n attribute = {};\n gl: WebGLRenderingContext;\n id: WebGLProgram;\n\n constructor(gl, vertexSource, fragmentSource) {\n this.gl = gl;\n const vertexShader = this.compile(vertexSource, this.gl.VERTEX_SHADER);\n const fragmentShader = this.compile(fragmentSource, this.gl.FRAGMENT_SHADER);\n this.id = this.gl.createProgram() as WebGLProgram;\n if (!vertexShader || !fragmentShader) return;\n if (!this.id) {\n log('filter: could not create webgl program');\n return;\n }\n this.gl.attachShader(this.id, vertexShader);\n this.gl.attachShader(this.id, fragmentShader);\n this.gl.linkProgram(this.id);\n if (!this.gl.getProgramParameter(this.id, this.gl.LINK_STATUS)) {\n log(`filter: gl link failed: ${this.gl.getProgramInfoLog(this.id) || 'unknown'}`);\n return;\n }\n this.gl.useProgram(this.id);\n collect(vertexSource, 'attribute', this.attribute); // Collect attributes\n for (const a in this.attribute) this.attribute[a] = this.gl.getAttribLocation(this.id, a);\n collect(vertexSource, 'uniform', this.uniform); // Collect uniforms\n collect(fragmentSource, 'uniform', this.uniform);\n for (const u in this.uniform) this.uniform[u] = this.gl.getUniformLocation(this.id, u);\n }\n\n compile = (source, type): WebGLShader | null => {\n const shader = this.gl.createShader(type);\n if (!shader) {\n log('filter: could not create shader');\n return null;\n }\n this.gl.shaderSource(shader, source);\n this.gl.compileShader(shader);\n if (!this.gl.getShaderParameter(shader, this.gl.COMPILE_STATUS)) {\n log(`filter: gl compile failed: ${this.gl.getShaderInfoLog(shader) || 'unknown'}`);\n return null;\n }\n return shader;\n };\n}\n\n// function that is instantiated as class so it has private this members\n/**\n * @class GLImageFilter\n * @property {function} reset reset current filter chain\n * @property {function} add add specified filter to filter chain\n * @property {function} apply execute filter chain and draw result\n * @property {function} draw just draw input to result\n */\n\nexport function GLImageFilter() {\n let drawCount = 0;\n let sourceTexture: WebGLTexture | null = null;\n let lastInChain = false;\n let currentFramebufferIndex = -1;\n let tempFramebuffers: [null, null] | [{ fbo: WebGLFramebuffer | null, texture: WebGLTexture | null }] = [null, null];\n let filterChain: Record[] = [];\n let vertexBuffer: WebGLBuffer | null = null;\n let currentProgram: GLProgram | null = null;\n const fxcanvas = canvas(100, 100);\n const shaderProgramCache = { }; // key is the shader program source, value is the compiled program\n const DRAW = { INTERMEDIATE: 1 };\n const gl = fxcanvas.getContext('webgl') as WebGLRenderingContext;\n if (!gl) {\n log('filter: cannot get webgl context');\n return;\n }\n // @ts-ignore used for sanity checks outside of imagefx\n this.gl = gl;\n\n function resize(width, height) {\n if (width === fxcanvas.width && height === fxcanvas.height) return; // Same width/height? Nothing to do here\n fxcanvas.width = width;\n fxcanvas.height = height;\n if (!vertexBuffer) { // Create the context if we don't have it yet\n const vertices = new Float32Array([-1, -1, 0, 1, 1, -1, 1, 1, -1, 1, 0, 0, -1, 1, 0, 0, 1, -1, 1, 1, 1, 1, 1, 0]); // Create the vertex buffer for the two triangles [x, y, u, v] * 6\n vertexBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, vertices, gl.STATIC_DRAW);\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);\n }\n gl.viewport(0, 0, fxcanvas.width, fxcanvas.height);\n tempFramebuffers = [null, null]; // Delete old temp framebuffers\n }\n\n function createFramebufferTexture(width, height) {\n const fbo = gl.createFramebuffer();\n gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);\n const renderbuffer = gl.createRenderbuffer();\n gl.bindRenderbuffer(gl.RENDERBUFFER, renderbuffer);\n const texture = gl.createTexture();\n gl.bindTexture(gl.TEXTURE_2D, texture);\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);\n gl.bindTexture(gl.TEXTURE_2D, null);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n return { fbo, texture };\n }\n\n function getTempFramebuffer(index): { fbo: WebGLFramebuffer | null, texture: WebGLTexture | null } {\n tempFramebuffers[index] = tempFramebuffers[index] || createFramebufferTexture(fxcanvas.width, fxcanvas.height);\n return tempFramebuffers[index] as { fbo: WebGLFramebuffer, texture: WebGLTexture };\n }\n\n function draw(flags = 0) {\n if (!currentProgram) return;\n let source: WebGLTexture | null = null;\n let target: WebGLFramebuffer | null = null;\n let flipY = false;\n if (drawCount === 0) source = sourceTexture; // First draw call - use the source texture\n else source = getTempFramebuffer(currentFramebufferIndex).texture || null; // All following draw calls use the temp buffer last drawn to\n drawCount++;\n if (lastInChain && !(flags & DRAW.INTERMEDIATE)) { // Last filter in our chain - draw directly to the WebGL Canvas. We may also have to flip the image vertically now\n target = null;\n flipY = drawCount % 2 === 0;\n } else {\n currentFramebufferIndex = (currentFramebufferIndex + 1) % 2;\n target = getTempFramebuffer(currentFramebufferIndex).fbo || null; // Intermediate draw call - get a temp buffer to draw to\n }\n gl.bindTexture(gl.TEXTURE_2D, source); // Bind the source and target and draw the two triangles\n gl.bindFramebuffer(gl.FRAMEBUFFER, target);\n gl.uniform1f(currentProgram.uniform['flipY'], (flipY ? -1 : 1));\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n }\n\n function compileShader(fragmentSource): GLProgram | null {\n if (shaderProgramCache[fragmentSource]) {\n currentProgram = shaderProgramCache[fragmentSource];\n gl.useProgram((currentProgram ? currentProgram.id : null) || null);\n return currentProgram;\n }\n currentProgram = new GLProgram(gl, shaders.vertexIdentity, fragmentSource);\n if (!currentProgram) {\n log('filter: could not get webgl program');\n return null;\n }\n const floatSize = Float32Array.BYTES_PER_ELEMENT;\n const vertSize = 4 * floatSize;\n gl.enableVertexAttribArray(currentProgram.attribute['pos']);\n gl.vertexAttribPointer(currentProgram.attribute['pos'], 2, gl.FLOAT, false, vertSize, 0 * floatSize);\n gl.enableVertexAttribArray(currentProgram.attribute['uv']);\n gl.vertexAttribPointer(currentProgram.attribute['uv'], 2, gl.FLOAT, false, vertSize, 2 * floatSize);\n shaderProgramCache[fragmentSource] = currentProgram;\n return currentProgram;\n }\n\n const filter = {\n colorMatrix: (matrix: number[]) => { // general color matrix filter\n const m = new Float32Array(matrix);\n m[4] /= 255;\n m[9] /= 255;\n m[14] /= 255;\n m[19] /= 255;\n const shader = (m[18] === 1 && m[3] === 0 && m[8] === 0 && m[13] === 0 && m[15] === 0 && m[16] === 0 && m[17] === 0 && m[19] === 0) // Can we ignore the alpha value? Makes things a bit faster.\n ? shaders.colorMatrixWithoutAlpha\n : shaders.colorMatrixWithAlpha;\n const program = compileShader(shader);\n if (!program) return;\n gl.uniform1fv(program.uniform['m'], m);\n draw();\n },\n\n brightness: (brightness: number) => {\n const b = (brightness || 0) + 1;\n filter.colorMatrix([\n b, 0, 0, 0, 0,\n 0, b, 0, 0, 0,\n 0, 0, b, 0, 0,\n 0, 0, 0, 1, 0,\n ]);\n },\n\n saturation: (amount: number) => {\n const x = (amount || 0) * 2 / 3 + 1;\n const y = ((x - 1) * -0.5);\n filter.colorMatrix([\n x, y, y, 0, 0,\n y, x, y, 0, 0,\n y, y, x, 0, 0,\n 0, 0, 0, 1, 0,\n ]);\n },\n\n desaturate: () => {\n filter.saturation(-1);\n },\n\n contrast: (amount: number) => {\n const v = (amount || 0) + 1;\n const o = -128 * (v - 1);\n filter.colorMatrix([\n v, 0, 0, 0, o,\n 0, v, 0, 0, o,\n 0, 0, v, 0, o,\n 0, 0, 0, 1, 0,\n ]);\n },\n\n negative: () => {\n filter.contrast(-2);\n },\n\n hue: (rotation: number) => {\n rotation = (rotation || 0) / 180 * Math.PI;\n const cos = Math.cos(rotation);\n const sin = Math.sin(rotation);\n const lumR = 0.213;\n const lumG = 0.715;\n const lumB = 0.072;\n filter.colorMatrix([\n lumR + cos * (1 - lumR) + sin * (-lumR), lumG + cos * (-lumG) + sin * (-lumG), lumB + cos * (-lumB) + sin * (1 - lumB), 0, 0,\n lumR + cos * (-lumR) + sin * (0.143), lumG + cos * (1 - lumG) + sin * (0.140), lumB + cos * (-lumB) + sin * (-0.283), 0, 0,\n lumR + cos * (-lumR) + sin * (-(1 - lumR)), lumG + cos * (-lumG) + sin * (lumG), lumB + cos * (1 - lumB) + sin * (lumB), 0, 0,\n 0, 0, 0, 1, 0,\n ]);\n },\n\n desaturateLuminance: () => {\n filter.colorMatrix([\n 0.2764723, 0.9297080, 0.0938197, 0, -37.1,\n 0.2764723, 0.9297080, 0.0938197, 0, -37.1,\n 0.2764723, 0.9297080, 0.0938197, 0, -37.1,\n 0, 0, 0, 1, 0,\n ]);\n },\n\n sepia: () => {\n filter.colorMatrix([\n 0.393, 0.7689999, 0.18899999, 0, 0,\n 0.349, 0.6859999, 0.16799999, 0, 0,\n 0.272, 0.5339999, 0.13099999, 0, 0,\n 0, 0, 0, 1, 0,\n ]);\n },\n\n brownie: () => {\n filter.colorMatrix([\n 0.5997023498159715, 0.34553243048391263, -0.2708298674538042, 0, 47.43192855600873,\n -0.037703249837783157, 0.8609577587992641, 0.15059552388459913, 0, -36.96841498319127,\n 0.24113635128153335, -0.07441037908422492, 0.44972182064877153, 0, -7.562075277591283,\n 0, 0, 0, 1, 0,\n ]);\n },\n\n vintagePinhole: () => {\n filter.colorMatrix([\n 0.6279345635605994, 0.3202183420819367, -0.03965408211312453, 0, 9.651285835294123,\n 0.02578397704808868, 0.6441188644374771, 0.03259127616149294, 0, 7.462829176470591,\n 0.0466055556782719, -0.0851232987247891, 0.5241648018700465, 0, 5.159190588235296,\n 0, 0, 0, 1, 0,\n ]);\n },\n\n kodachrome: () => {\n filter.colorMatrix([\n 1.1285582396593525, -0.3967382283601348, -0.03992559172921793, 0, 63.72958762196502,\n -0.16404339962244616, 1.0835251566291304, -0.05498805115633132, 0, 24.732407896706203,\n -0.16786010706155763, -0.5603416277695248, 1.6014850761964943, 0, 35.62982807460946,\n 0, 0, 0, 1, 0,\n ]);\n },\n\n technicolor: () => {\n filter.colorMatrix([\n 1.9125277891456083, -0.8545344976951645, -0.09155508482755585, 0, 11.793603434377337,\n -0.3087833385928097, 1.7658908555458428, -0.10601743074722245, 0, -70.35205161461398,\n -0.231103377548616, -0.7501899197440212, 1.847597816108189, 0, 30.950940869491138,\n 0, 0, 0, 1, 0,\n ]);\n },\n\n polaroid: () => {\n filter.colorMatrix([\n 1.438, -0.062, -0.062, 0, 0,\n -0.122, 1.378, -0.122, 0, 0,\n -0.016, -0.016, 1.483, 0, 0,\n 0, 0, 0, 1, 0,\n ]);\n },\n\n shiftToBGR: () => {\n filter.colorMatrix([\n 0, 0, 1, 0, 0,\n 0, 1, 0, 0, 0,\n 1, 0, 0, 0, 0,\n 0, 0, 0, 1, 0,\n ]);\n },\n\n convolution: (matrix: number[]) => { // general convolution Filter\n const m = new Float32Array(matrix);\n const pixelSizeX = 1 / fxcanvas.width;\n const pixelSizeY = 1 / fxcanvas.height;\n const program = compileShader(shaders.convolution);\n if (!program) return;\n gl.uniform1fv(program.uniform['m'], m);\n gl.uniform2f(program.uniform['px'], pixelSizeX, pixelSizeY);\n draw();\n },\n\n detectEdges: () => {\n // @ts-ignore this\n filter.convolution.call(this, [\n 0, 1, 0,\n 1, -4, 1,\n 0, 1, 0,\n ]);\n },\n\n sobelX: () => {\n // @ts-ignore this\n filter.convolution.call(this, [\n -1, 0, 1,\n -2, 0, 2,\n -1, 0, 1,\n ]);\n },\n\n sobelY: () => {\n // @ts-ignore this\n filter.convolution.call(this, [\n -1, -2, -1,\n 0, 0, 0,\n 1, 2, 1,\n ]);\n },\n\n sharpen: (amount) => {\n const a = amount || 1;\n // @ts-ignore this\n filter.convolution.call(this, [\n 0, -1 * a, 0,\n -1 * a, 1 + 4 * a, -1 * a,\n 0, -1 * a, 0,\n ]);\n },\n\n emboss: (size: number) => {\n const s = size || 1;\n // @ts-ignore this\n filter.convolution.call(this, [\n -2 * s, -1 * s, 0,\n -1 * s, 1, 1 * s,\n 0, 1 * s, 2 * s,\n ]);\n },\n\n blur: (size: number) => {\n const blurSizeX = (size / 7) / fxcanvas.width;\n const blurSizeY = (size / 7) / fxcanvas.height;\n const program = compileShader(shaders.blur);\n if (!program) return;\n // Vertical\n gl.uniform2f(program.uniform['px'], 0, blurSizeY);\n draw(DRAW.INTERMEDIATE);\n // Horizontal\n gl.uniform2f(program.uniform['px'], blurSizeX, 0);\n draw();\n },\n\n pixelate: (size: number) => {\n const blurSizeX = (size) / fxcanvas.width;\n const blurSizeY = (size) / fxcanvas.height;\n const program = compileShader(shaders.pixelate);\n if (!program) return;\n gl.uniform2f(program.uniform['size'], blurSizeX, blurSizeY);\n draw();\n },\n };\n\n // @ts-ignore this\n this.add = function (name) {\n const args = Array.prototype.slice.call(arguments, 1); // eslint-disable-line prefer-rest-params\n const func = filter[name];\n filterChain.push({ func, args });\n };\n\n // @ts-ignore this\n this.reset = function () {\n filterChain = [];\n };\n\n // @ts-ignore this\n this.get = function () {\n return filterChain;\n };\n\n // @ts-ignore this\n this.apply = function (image) {\n resize(image.width, image.height);\n drawCount = 0;\n if (!sourceTexture) sourceTexture = gl.createTexture(); // Create the texture for the input image if we haven't yet\n gl.bindTexture(gl.TEXTURE_2D, sourceTexture);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image);\n for (let i = 0; i < filterChain.length; i++) {\n lastInChain = (i === filterChain.length - 1);\n const f = filterChain[i];\n // @ts-ignore function assigment\n f.func.apply(this, f.args || []);\n }\n return fxcanvas;\n };\n\n // @ts-ignore this\n this.draw = function (image) {\n this.add('brightness', 0);\n return this.apply(image);\n };\n}\n", "/**\n * Image enhancements\n */\n\nimport * as tf from '../../dist/tfjs.esm.js';\nimport type { Tensor } from '../exports';\n\nexport async function histogramEqualization(inputImage: Tensor): Promise {\n // const maxValue = 254; // using 255 results in values slightly larger than 1 due to math rounding errors\n const squeeze = inputImage.shape.length === 4 ? tf.squeeze(inputImage) : inputImage;\n const channels = tf.split(squeeze, 3, 2);\n const min: Tensor[] = [tf.min(channels[0]), tf.min(channels[1]), tf.min(channels[2])];\n const max: Tensor[] = [tf.max(channels[0]), tf.max(channels[1]), tf.max(channels[2])];\n const absMax = await Promise.all(max.map((channel) => channel.data()));\n const maxValue = 0.99 * Math.max(absMax[0][0], absMax[1][0], absMax[2][0]);\n const sub = [tf.sub(channels[0], min[0]), tf.sub(channels[1], min[1]), tf.sub(channels[2], min[2])];\n const range = [tf.sub(max[0], min[0]), tf.sub(max[1], min[1]), tf.sub(max[2], min[2])];\n const fact = [tf.div(maxValue, range[0]), tf.div(maxValue, range[1]), tf.div(maxValue, range[2])];\n const enh = [tf.mul(sub[0], fact[0]), tf.mul(sub[1], fact[1]), tf.mul(sub[2], fact[2])];\n const rgb = tf.stack([enh[0], enh[1], enh[2]], 2);\n const reshape = tf.reshape(rgb, [1, squeeze.shape[0], squeeze.shape[1], 3]);\n tf.dispose([...channels, ...min, ...max, ...sub, ...range, ...fact, ...enh, rgb, squeeze]);\n return reshape as Tensor; // output shape is [1, height, width, 3]\n}\n", "/**\n * Image Processing algorithm implementation\n */\n\nimport * as tf from '../../dist/tfjs.esm.js';\nimport * as fxImage from './imagefx';\nimport type { Input, AnyCanvas, Tensor, Config } from '../exports';\nimport { env } from '../util/env';\nimport { log } from '../util/util';\nimport * as enhance from './enhance';\n\nconst maxSize = 3840;\n// internal temp canvases\nlet inCanvas: AnyCanvas | null = null; // use global variable to avoid recreating canvas on each frame\nlet outCanvas: AnyCanvas | null = null; // use global variable to avoid recreating canvas on each frame\nlet tmpCanvas: AnyCanvas | null = null; // use global variable to avoid recreating canvas on each frame\n// @ts-ignore // imagefx is js module that should be converted to a class\nlet fx: fxImage.GLImageFilter | null; // instance of imagefx\n\nconst last: { inputSum: number, cacheDiff: number, sumMethod: number, inputTensor: undefined | Tensor } = {\n inputSum: 0,\n cacheDiff: 1,\n sumMethod: 0,\n inputTensor: undefined,\n};\n\nexport function reset() {\n last.inputSum = 0;\n last.cacheDiff = 1;\n last.sumMethod = 0;\n last.inputTensor = undefined;\n}\n\nexport function canvas(width: number, height: number): AnyCanvas {\n let c: AnyCanvas;\n if (env.browser) { // browser defines canvas object\n if (env.worker) { // if runing in web worker use OffscreenCanvas\n if (typeof OffscreenCanvas === 'undefined') throw new Error('canvas error: attempted to run in web worker but OffscreenCanvas is not supported');\n c = new OffscreenCanvas(width, height);\n } else { // otherwise use DOM canvas\n if (typeof document === 'undefined') throw new Error('canvas error: attempted to run in browser but DOM is not defined');\n c = document.createElement('canvas');\n c.width = width;\n c.height = height;\n }\n } else { // if not running in browser, there is no \"default\" canvas object, so we need monkey patch or fail\n // @ts-ignore // env.canvas is an external monkey-patch\n if (typeof env.Canvas !== 'undefined') c = new env.Canvas(width, height);\n else if (typeof globalThis.Canvas !== 'undefined') c = new globalThis.Canvas(width, height);\n // else throw new Error('canvas error: attempted to use canvas in nodejs without canvas support installed');\n }\n // @ts-ignore its either defined or we already threw an error\n return c;\n}\n\n// helper function to copy canvas from input to output\nexport function copy(input: AnyCanvas, output?: AnyCanvas) {\n const outputCanvas = output || canvas(input.width, input.height);\n const ctx = outputCanvas.getContext('2d') as CanvasRenderingContext2D;\n ctx.drawImage(input, 0, 0);\n return outputCanvas;\n}\n\n// process input image and return tensor\n// input can be tensor, imagedata, htmlimageelement, htmlvideoelement\n// input is resized and run through imagefx filter\nexport async function process(input: Input, config: Config, getTensor: boolean = true): Promise<{ tensor: Tensor | null, canvas: AnyCanvas | null }> {\n if (!input) {\n // throw new Error('input is missing');\n if (config.debug) log('input error: input is missing');\n return { tensor: null, canvas: null }; // video may become temporarily unavailable due to onresize\n }\n // sanity checks since different browsers do not implement all dom elements\n if (\n !(input instanceof tf.Tensor)\n && !(typeof Image !== 'undefined' && input instanceof Image)\n && !(typeof env.Canvas !== 'undefined' && input instanceof env.Canvas)\n && !(typeof globalThis.Canvas !== 'undefined' && input instanceof globalThis.Canvas)\n && !(typeof ImageData !== 'undefined' && input instanceof ImageData)\n && !(typeof ImageBitmap !== 'undefined' && input instanceof ImageBitmap)\n && !(typeof HTMLImageElement !== 'undefined' && input instanceof HTMLImageElement)\n && !(typeof HTMLMediaElement !== 'undefined' && input instanceof HTMLMediaElement)\n && !(typeof HTMLVideoElement !== 'undefined' && input instanceof HTMLVideoElement)\n && !(typeof HTMLCanvasElement !== 'undefined' && input instanceof HTMLCanvasElement)\n && !(typeof OffscreenCanvas !== 'undefined' && input instanceof OffscreenCanvas)\n ) {\n throw new Error('input error: type is not recognized');\n }\n if (input instanceof tf.Tensor) { // if input is tensor use as-is without filters but correct shape as needed\n let tensor: Tensor | null = null;\n if ((input as Tensor)['isDisposedInternal']) throw new Error('input error: attempted to use tensor but it is disposed');\n if (!(input as Tensor).shape) throw new Error('input error: attempted to use tensor without a shape');\n if ((input as Tensor).shape.length === 3) { // [height, width, 3 || 4]\n if ((input as Tensor).shape[2] === 3) { // [height, width, 3] so add batch\n tensor = tf.expandDims(input, 0);\n } else if ((input as Tensor).shape[2] === 4) { // [height, width, 4] so strip alpha and add batch\n const rgb = tf.slice3d(input, [0, 0, 0], [-1, -1, 3]);\n tensor = tf.expandDims(rgb, 0);\n tf.dispose(rgb);\n }\n } else if ((input as Tensor).shape.length === 4) { // [1, width, height, 3 || 4]\n if ((input as Tensor).shape[3] === 3) { // [1, width, height, 3] just clone\n tensor = tf.clone(input);\n } else if ((input as Tensor).shape[3] === 4) { // [1, width, height, 4] so strip alpha\n tensor = tf.slice4d(input, [0, 0, 0, 0], [-1, -1, -1, 3]);\n }\n }\n // at the end shape must be [1, height, width, 3]\n if (tensor == null || tensor.shape.length !== 4 || tensor.shape[0] !== 1 || tensor.shape[3] !== 3) throw new Error(`input error: attempted to use tensor with unrecognized shape: ${((input as Tensor).shape).toString()}`);\n if ((tensor).dtype === 'int32') {\n const cast = tf.cast(tensor, 'float32');\n tf.dispose(tensor);\n tensor = cast;\n }\n return { tensor, canvas: (config.filter.return ? outCanvas : null) };\n }\n // check if resizing will be needed\n if (typeof input['readyState'] !== 'undefined' && (input as HTMLMediaElement).readyState <= 2) {\n if (config.debug) log('input stream is not ready');\n return { tensor: null, canvas: inCanvas }; // video may become temporarily unavailable due to onresize\n }\n const originalWidth: number = input['naturalWidth'] || input['videoWidth'] || input['width'] || (input['shape'] && (input['shape'][1] > 0));\n const originalHeight: number = input['naturalHeight'] || input['videoHeight'] || input['height'] || (input['shape'] && (input['shape'][2] > 0));\n if (!originalWidth || !originalHeight) {\n if (config.debug) log('cannot determine input dimensions');\n return { tensor: null, canvas: inCanvas }; // video may become temporarily unavailable due to onresize\n }\n let targetWidth: number = originalWidth;\n let targetHeight: number = originalHeight;\n if (targetWidth > maxSize) {\n targetWidth = maxSize;\n targetHeight = Math.trunc(targetWidth * originalHeight / originalWidth);\n }\n if (targetHeight > maxSize) {\n targetHeight = maxSize;\n targetWidth = Math.trunc(targetHeight * originalWidth / originalHeight);\n }\n\n // create our canvas and resize it if needed\n if ((config.filter?.width || 0) > 0) targetWidth = config.filter.width as number;\n else if ((config.filter?.height || 0) > 0) targetWidth = originalWidth * ((config.filter.height || 0) / originalHeight);\n if ((config.filter.height || 0) > 0) targetHeight = config.filter.height as number;\n else if ((config.filter.width || 0) > 0) targetHeight = originalHeight * ((config.filter.width || 0) / originalWidth);\n if (!targetWidth || !targetHeight) throw new Error('input error: cannot determine dimension');\n if (!inCanvas || (inCanvas.width !== targetWidth) || (inCanvas.height !== targetHeight)) inCanvas = canvas(targetWidth, targetHeight);\n\n // draw input to our canvas\n const inCtx = inCanvas.getContext('2d') as CanvasRenderingContext2D;\n if ((typeof ImageData !== 'undefined') && (input instanceof ImageData)) {\n inCtx.putImageData(input, 0, 0);\n } else {\n if (config.filter.flip && typeof inCtx.translate !== 'undefined') {\n inCtx.translate(originalWidth, 0);\n inCtx.scale(-1, 1);\n inCtx.drawImage(input as AnyCanvas, 0, 0, originalWidth, originalHeight, 0, 0, inCanvas.width, inCanvas.height);\n inCtx.setTransform(1, 0, 0, 1, 0, 0); // resets transforms to defaults\n } else {\n inCtx.drawImage(input as AnyCanvas, 0, 0, originalWidth, originalHeight, 0, 0, inCanvas.width, inCanvas.height);\n }\n }\n\n if (!outCanvas || (inCanvas.width !== outCanvas.width) || (inCanvas.height !== outCanvas.height)) outCanvas = canvas(inCanvas.width, inCanvas.height); // init output canvas\n\n // imagefx transforms using gl from input canvas to output canvas\n if (config.filter.enabled && env.webgl.supported) {\n if (!fx) fx = env.browser ? new fxImage.GLImageFilter() : null; // && (typeof document !== 'undefined')\n env.filter = !!fx;\n if (!fx?.add) {\n if (config.debug) log('input process error: cannot initialize filters');\n env.webgl.supported = false;\n config.filter.enabled = false;\n copy(inCanvas, outCanvas); // filter failed to initialize\n // return { tensor: null, canvas: inCanvas };\n } else {\n fx.reset();\n if (config.filter.brightness !== 0) fx.add('brightness', config.filter.brightness);\n if (config.filter.contrast !== 0) fx.add('contrast', config.filter.contrast);\n if (config.filter.sharpness !== 0) fx.add('sharpen', config.filter.sharpness);\n if (config.filter.blur !== 0) fx.add('blur', config.filter.blur);\n if (config.filter.saturation !== 0) fx.add('saturation', config.filter.saturation);\n if (config.filter.hue !== 0) fx.add('hue', config.filter.hue);\n if (config.filter.negative) fx.add('negative');\n if (config.filter.sepia) fx.add('sepia');\n if (config.filter.vintage) fx.add('brownie');\n if (config.filter.sepia) fx.add('sepia');\n if (config.filter.kodachrome) fx.add('kodachrome');\n if (config.filter.technicolor) fx.add('technicolor');\n if (config.filter.polaroid) fx.add('polaroid');\n if (config.filter.pixelate !== 0) fx.add('pixelate', config.filter.pixelate);\n if (fx.get() > 0) outCanvas = fx.apply(inCanvas);\n else outCanvas = fx.draw(inCanvas);\n }\n } else {\n copy(inCanvas, outCanvas); // if no filters applied, output canvas is input canvas\n if (fx) fx = null;\n env.filter = !!fx;\n }\n\n if (!getTensor) return { tensor: null, canvas: outCanvas }; // just canvas was requested\n if (!outCanvas) throw new Error('canvas error: cannot create output');\n\n // create tensor from image unless input was a tensor already\n let pixels;\n let depth = 3;\n if ((typeof ImageData !== 'undefined' && input instanceof ImageData) || ((input as ImageData).data && (input as ImageData).width && (input as ImageData).height)) { // if input is imagedata, just use it\n if (env.browser && tf.browser) {\n pixels = tf.browser ? tf.browser.fromPixels(input) : null;\n } else {\n depth = (input as ImageData).data.length / (input as ImageData).height / (input as ImageData).width;\n // const arr = Uint8Array.from(input['data']);\n const arr = new Uint8Array((input as ImageData).data.buffer);\n pixels = tf.tensor(arr, [(input as ImageData).height, (input as ImageData).width, depth], 'int32');\n }\n } else {\n if (!tmpCanvas || (outCanvas.width !== tmpCanvas.width) || (outCanvas.height !== tmpCanvas.height)) tmpCanvas = canvas(outCanvas.width, outCanvas.height); // init output canvas\n if (tf.browser && env.browser) {\n if (config.backend === 'webgl' || config.backend === 'humangl' || config.backend === 'webgpu') {\n pixels = tf.browser.fromPixels(outCanvas); // safe to reuse since both backend and context are gl based\n } else {\n tmpCanvas = copy(outCanvas); // cannot use output canvas as it already has gl context so we do a silly one more canvas\n pixels = tf.browser.fromPixels(tmpCanvas);\n }\n } else {\n const tempCanvas = copy(outCanvas); // cannot use output canvas as it already has gl context so we do a silly one more canvas\n const tempCtx = tempCanvas.getContext('2d') as CanvasRenderingContext2D;\n const tempData = tempCtx.getImageData(0, 0, targetWidth, targetHeight);\n depth = tempData.data.length / targetWidth / targetHeight;\n const arr = new Uint8Array(tempData.data.buffer);\n pixels = tf.tensor(arr, [targetWidth, targetHeight, depth]);\n }\n }\n if (depth === 4) { // rgba to rgb\n const rgb = tf.slice3d(pixels, [0, 0, 0], [-1, -1, 3]); // strip alpha channel\n tf.dispose(pixels);\n pixels = rgb;\n }\n if (!pixels) throw new Error('input error: cannot create tensor');\n const casted: Tensor = tf.cast(pixels, 'float32');\n const tensor: Tensor = config.filter.equalization ? await enhance.histogramEqualization(casted) : tf.expandDims(casted, 0);\n tf.dispose([pixels, casted]);\n return { tensor, canvas: (config.filter.return ? outCanvas : null) };\n}\n\n/*\nconst checksum = async (input: Tensor): Promise => { // use tf sum or js based sum loop depending on which is faster\n const resizeFact = 48;\n const reduced: Tensor = tf.image.resizeBilinear(input, [Math.trunc((input.shape[1] || 1) / resizeFact), Math.trunc((input.shape[2] || 1) / resizeFact)]);\n const tfSum = async (): Promise => {\n const sumT = tf.sum(reduced);\n const sum0 = await sumT.data();\n tf.dispose(sumT);\n return sum0[0];\n };\n const jsSum = async (): Promise => {\n const reducedData = await reduced.data(); // raw image rgb array\n let sum0 = 0;\n for (let i = 0; i < reducedData.length / 3; i++) sum0 += reducedData[3 * i + 2]; // look only at green value of each pixel\n return sum0;\n };\n if (last.sumMethod === 0) {\n const t0 = now();\n await jsSum();\n const t1 = now();\n await tfSum();\n const t2 = now();\n last.sumMethod = t1 - t0 < t2 - t1 ? 1 : 2;\n }\n const res = last.sumMethod === 1 ? await jsSum() : await tfSum();\n tf.dispose(reduced);\n return res;\n};\n*/\n\nexport async function skip(config: Partial, input: Tensor) {\n let skipFrame = false;\n if (config.cacheSensitivity === 0 || !input.shape || input.shape.length !== 4 || input.shape[1] > 2048 || input.shape[2] > 2048) return skipFrame; // cache disabled or input is invalid or too large for cache analysis\n\n /*\n const checkSum = await checksum(input);\n const diff = 100 * (Math.max(checkSum, last.inputSum) / Math.min(checkSum, last.inputSum) - 1);\n last.inputSum = checkSum;\n // if previous frame was skipped, skip this frame if changed more than cacheSensitivity\n // if previous frame was not skipped, then look for cacheSensitivity or difference larger than one in previous frame to avoid resetting cache in subsequent frames unnecessarily\n let skipFrame = diff < Math.max(config.cacheSensitivity, last.cacheDiff);\n // if difference is above 10x threshold, don't use last value to force reset cache for significant change of scenes or images\n last.cacheDiff = diff > 10 * config.cacheSensitivity ? 0 : diff;\n skipFrame = skipFrame && (last.cacheDiff > 0); // if no cached diff value then force no skip\n */\n\n if (!last.inputTensor) {\n last.inputTensor = tf.clone(input);\n } else if (last.inputTensor.shape[1] !== input.shape[1] || last.inputTensor.shape[2] !== input.shape[2]) { // input resolution changed\n tf.dispose(last.inputTensor);\n last.inputTensor = tf.clone(input);\n } else {\n const t: Record = {};\n t.diff = tf.sub(input, last.inputTensor);\n t.squared = tf.mul(t.diff, t.diff);\n t.sum = tf.sum(t.squared);\n const diffSum = await t.sum.data();\n const diffRelative = diffSum[0] / (input.shape[1] || 1) / (input.shape[2] || 1) / 255 / 3; // squared difference relative to input resolution and averaged per channel\n tf.dispose([last.inputTensor, t.diff, t.squared, t.sum]);\n last.inputTensor = tf.clone(input);\n skipFrame = diffRelative <= (config.cacheSensitivity || 0);\n }\n return skipFrame;\n}\n\nexport async function compare(config: Partial, input1: Tensor, input2: Tensor): Promise {\n const t: Record = {};\n if (!input1 || !input2 || input1.shape.length !== 4 || input1.shape.length !== input2.shape.length) {\n if (!config.debug) log('invalid input tensor or tensor shapes do not match:', input1.shape, input2.shape);\n return 0;\n }\n if (input1.shape[0] !== 1 || input2.shape[0] !== 1 || input1.shape[3] !== 3 || input2.shape[3] !== 3) {\n if (!config.debug) log('input tensors must be of shape [1, height, width, 3]:', input1.shape, input2.shape);\n return 0;\n }\n t.input1 = tf.clone(input1);\n t.input2 = (input1.shape[1] !== input2.shape[1] || input1.shape[2] !== input2.shape[2]) ? tf.image.resizeBilinear(input2, [input1.shape[1], input1.shape[2]]) : tf.clone(input2);\n t.diff = tf.sub(t.input1, t.input2);\n t.squared = tf.mul(t.diff, t.diff);\n t.sum = tf.sum(t.squared);\n const diffSum = await t.sum.data();\n const diffRelative = diffSum[0] / (input1.shape[1] || 1) / (input1.shape[2] || 1) / 255 / 3;\n tf.dispose([t.input1, t.input2, t.diff, t.squared, t.sum]);\n return diffRelative;\n}\n", "import * as tf from '../../dist/tfjs.esm.js';\nimport * as image from '../image/image';\n\n/** Env class that holds detected capabilities */\nexport class Env {\n /** Running in Browser */\n browser: boolean;\n /** Running in NodeJS */\n node: boolean;\n /** Running in WebWorker thread */\n worker: boolean;\n /** Detected platform */\n platform: string = '';\n /** Detected agent */\n agent: string = '';\n /** List of supported backends */\n backends: string[] = [];\n /** Has any work been performed so far */\n initial: boolean;\n /** Are image filters supported? */\n filter: boolean | undefined;\n /** TFJS instance details */\n tfjs: {\n version: undefined | string,\n };\n /** Is offscreenCanvas supported? */\n offscreen: undefined | boolean;\n /** Are performance counter instant values or additive */\n perfadd: boolean = false;\n /** If using tfjs-node get version of underlying tensorflow shared library and if gpu acceleration is enabled */\n tensorflow: {\n version: undefined | string,\n gpu: undefined | boolean,\n } = {\n version: undefined,\n gpu: undefined,\n };\n /** WASM detected capabilities */\n wasm: {\n supported: undefined | boolean,\n backend: undefined | boolean,\n simd: undefined | boolean,\n multithread: undefined | boolean,\n } = {\n supported: undefined,\n backend: undefined,\n simd: undefined,\n multithread: undefined,\n };\n /** WebGL detected capabilities */\n webgl: {\n supported: undefined | boolean,\n backend: undefined | boolean,\n version: undefined | string,\n renderer: undefined | string,\n } = {\n supported: undefined,\n backend: undefined,\n version: undefined,\n renderer: undefined,\n };\n /** WebGPU detected capabilities */\n webgpu: {\n supported: undefined | boolean,\n backend: undefined | boolean,\n adapter: undefined | string,\n } = {\n supported: undefined,\n backend: undefined,\n adapter: undefined,\n };\n /** CPU info */\n cpu: {\n model: undefined | string,\n flags: string[],\n } = {\n model: undefined,\n flags: [],\n };\n /** List of supported kernels for current backend */\n kernels: string[] = [];\n /** MonkeyPatch for Canvas */\n Canvas: undefined;\n /** MonkeyPatch for Image */\n Image: undefined;\n /** MonkeyPatch for ImageData */\n ImageData: undefined;\n\n constructor() {\n this.browser = typeof navigator !== 'undefined';\n this.node = (typeof process !== 'undefined') && (typeof process.versions !== 'undefined') && (typeof process.versions.node !== 'undefined');\n this.tfjs = { version: tf.version['tfjs-core'] };\n this.offscreen = typeof OffscreenCanvas !== 'undefined';\n this.initial = true;\n\n // @ts-ignore WorkerGlobalScope evaluated in browser only\n this.worker = this.browser && this.offscreen ? (typeof WorkerGlobalScope !== 'undefined') : undefined;\n if (typeof navigator !== 'undefined') {\n const raw = navigator.userAgent.match(/\\(([^()]+)\\)/g);\n if (raw?.[0]) {\n const platformMatch = raw[0].match(/\\(([^()]+)\\)/g);\n this.platform = (platformMatch?.[0]) ? platformMatch[0].replace(/\\(|\\)/g, '') : '';\n this.agent = navigator.userAgent.replace(raw[0], '');\n if (this.platform[1]) this.agent = this.agent.replace(raw[1], '');\n this.agent = this.agent.replace(/ /g, ' ');\n // chrome offscreencanvas gpu memory leak\n /*\n const isChrome = env.agent.match(/Chrome\\/.[0-9]/g);\n const verChrome = isChrome && isChrome[0] ? isChrome[0].split('/')[1] : 0;\n if (verChrome > 92 && verChrome < 96) {\n log('disabling offscreenCanvas due to browser error:', isChrome ? isChrome[0] : 'unknown');\n this.offscreen = false;\n }\n */\n }\n } else if (typeof process !== 'undefined') {\n this.platform = `${process.platform} ${process.arch}`;\n this.agent = `NodeJS ${process.version}`;\n }\n }\n\n /** update backend information */\n async updateBackend() {\n // analyze backends\n this.backends = Object.keys(tf.engine().registryFactory);\n this.tensorflow = {\n version: (tf.backend().binding ? tf.backend().binding.TF_Version : undefined),\n gpu: (tf.backend().binding ? tf.backend().binding.isUsingGpuDevice() : undefined),\n };\n this.wasm.supported = typeof WebAssembly !== 'undefined';\n this.wasm.backend = this.backends.includes('wasm');\n if (this.wasm.supported && this.wasm.backend && tf.getBackend() === 'wasm') {\n this.wasm.simd = tf.env().get('WASM_HAS_SIMD_SUPPORT');\n this.wasm.multithread = tf.env().get('WASM_HAS_MULTITHREAD_SUPPORT');\n }\n const c = image.canvas(100, 100);\n const ctx = c ? c.getContext('webgl2') : undefined; // causes too many gl contexts\n // const ctx = typeof tf.backend().getGPGPUContext !== undefined ? tf.backend().getGPGPUContext : null;\n this.webgl.supported = typeof ctx !== 'undefined';\n this.webgl.backend = this.backends.includes('webgl');\n if (this.webgl.supported && this.webgl.backend && (tf.getBackend() === 'webgl' || tf.getBackend() === 'humangl')) {\n const gl = tf.backend().gpgpu !== 'undefined' ? await tf.backend().getGPGPUContext().gl : null;\n if (gl) {\n this.webgl.version = gl.getParameter(gl.VERSION);\n this.webgl.renderer = gl.getParameter(gl.RENDERER);\n }\n }\n this.webgpu.supported = this.browser && typeof navigator.gpu !== 'undefined';\n this.webgpu.backend = this.backends.includes('webgpu');\n try {\n if (this.webgpu.supported) {\n const adapter = await navigator.gpu.requestAdapter();\n this.webgpu.adapter = adapter ? adapter.name : undefined;\n }\n } catch {\n this.webgpu.supported = false;\n }\n try {\n this.kernels = tf.getKernelsForBackend(tf.getBackend()).map((kernel) => (kernel.kernelName as string).toLowerCase());\n } catch { /**/ }\n }\n\n /** update cpu information */\n updateCPU() {\n const cpu = { model: '', flags: [] };\n if (this.node && this.platform.startsWith('linux')) {\n /*\n const fs = require('fs');\n try {\n const data = fs.readFileSync('/proc/cpuinfo').toString();\n for (const line of data.split('\\n')) {\n if (line.startsWith('model name')) cpu.model = line.match(/:(.*)/g)[0].replace(':', '').trim();\n if (line.startsWith('flags')) cpu.flags = line.match(/:(.*)/g)[0].replace(':', '').trim().split(' ').sort();\n }\n } catch { }\n */\n }\n if (!this.cpu) Object.defineProperty(this, 'cpu', { value: cpu });\n else this.cpu = cpu;\n }\n}\n\nexport const env = new Env();\n", "import { log } from './util';\n\n// const log = (...msg) => console.log('webcam', ...msg); // eslint-disable-line no-console\n\n/** WebCam configuration */\nexport interface WebCamConfig {\n /**\n * element can be:\n * - string which indicates dom element id\n * - actual HTMLVideo dom element\n * - undefined in which case a new HTMLVideoElement will be created\n */\n element: string | HTMLVideoElement | undefined,\n /** print messages on console */\n debug: boolean,\n /** use front or back camera */\n mode: 'front' | 'back',\n /** camera crop mode */\n crop: boolean,\n /** desired webcam width */\n width: number,\n /** desired webcam height */\n height: number,\n}\n\nexport class WebCam { // eslint-disable-line @typescript-eslint/no-extraneous-class\n /** current webcam configuration */\n config: WebCamConfig;\n /** instance of dom element associated with webcam stream */\n element: HTMLVideoElement | undefined;\n /** active webcam stream */\n stream: MediaStream | undefined;\n\n constructor() {\n this.config = {\n element: undefined,\n debug: true,\n mode: 'front',\n crop: false,\n width: 0,\n height: 0,\n };\n }\n\n /** get active webcam stream track */\n public get track(): MediaStreamTrack | undefined {\n if (!this.stream) return undefined;\n return this.stream.getVideoTracks()[0];\n }\n\n /** get webcam capabilities */\n public get capabilities(): MediaTrackCapabilities | undefined {\n if (!this.track) return undefined;\n return this.track.getCapabilities ? this.track.getCapabilities() : undefined;\n }\n\n /** get webcam constraints */\n public get constraints(): MediaTrackConstraints | undefined {\n if (!this.track) return undefined;\n return this.track.getConstraints ? this.track.getConstraints() : undefined;\n }\n\n /** get webcam settings */\n public get settings(): MediaTrackSettings | undefined {\n if (!this.stream) return undefined;\n const track: MediaStreamTrack = this.stream.getVideoTracks()[0];\n return track.getSettings ? track.getSettings() : undefined;\n }\n\n /** get webcam label */\n public get label(): string {\n if (!this.track) return '';\n return this.track.label;\n }\n\n /** is webcam paused */\n public get paused(): boolean {\n return this.element?.paused || false;\n }\n\n /** webcam current width */\n public get width(): number {\n return this.element?.videoWidth || 0;\n }\n\n /** webcam current height */\n public get height(): number {\n return this.element?.videoHeight || 0;\n }\n\n /** start method initializizes webcam stream and associates it with a dom video element */\n public start = async (webcamConfig?: Partial): Promise => {\n // set config\n if (webcamConfig?.debug) this.config.debug = webcamConfig?.debug;\n if (webcamConfig?.crop) this.config.crop = webcamConfig?.crop;\n if (webcamConfig?.mode) this.config.mode = webcamConfig?.mode;\n if (webcamConfig?.width) this.config.width = webcamConfig?.width;\n if (webcamConfig?.height) this.config.height = webcamConfig?.height;\n\n // use or create dom element\n if (webcamConfig?.element) {\n if (typeof webcamConfig.element === 'string') {\n const el = document.getElementById(webcamConfig.element);\n if (el && el instanceof HTMLVideoElement) {\n this.element = el;\n } else {\n if (this.config.debug) log('webcam', 'cannot get dom element', webcamConfig.element);\n return;\n }\n } else if (webcamConfig.element instanceof HTMLVideoElement) {\n this.element = webcamConfig.element;\n } else {\n if (this.config.debug) log('webcam', 'unknown dom element', webcamConfig.element);\n return;\n }\n } else {\n this.element = document.createElement('video');\n }\n\n // set constraints to use\n const requestedConstraints: DisplayMediaStreamConstraints = {\n audio: false,\n video: {\n facingMode: this.config.mode === 'front' ? 'user' : 'environment',\n // @ts-ignore // resizeMode is still not defined in tslib\n resizeMode: this.config.crop ? 'crop-and-scale' : 'none',\n width: { ideal: this.config.width > 0 ? this.config.width : window.innerWidth },\n height: { ideal: this.config.height > 0 ? this.config.height : window.innerHeight },\n },\n };\n\n // set default event listeners\n this.element.addEventListener('play', () => { if (this.config.debug) log('webcam', 'play'); });\n this.element.addEventListener('pause', () => { if (this.config.debug) log('webcam', 'pause'); });\n this.element.addEventListener('click', async () => { // pause when clicked on screen and resume on next click\n if (!this.element || !this.stream) return;\n if (this.element.paused) await this.element.play();\n else this.element.pause();\n });\n\n // get webcam and set it to run in dom element\n if (!navigator?.mediaDevices) {\n if (this.config.debug) log('webcam', 'no devices');\n return;\n }\n try {\n this.stream = await navigator.mediaDevices.getUserMedia(requestedConstraints); // get stream that satisfies constraints\n } catch (err) {\n log('webcam', err);\n return;\n }\n if (!this.stream) {\n if (this.config.debug) log('webcam', 'no stream');\n return;\n }\n this.element.srcObject = this.stream; // assign it to dom element\n const ready = new Promise((resolve) => { // wait until stream is ready\n if (!this.element) resolve(false);\n else this.element.onloadeddata = () => resolve(true);\n });\n await ready;\n await this.element.play(); // start playing\n\n if (this.config.debug) {\n log('webcam', {\n width: this.width,\n height: this.height,\n label: this.label,\n stream: this.stream,\n track: this.track,\n settings: this.settings,\n constraints: this.constraints,\n capabilities: this.capabilities,\n });\n }\n };\n\n /** pause webcam video method */\n public pause = (): void => {\n if (this.element) this.element.pause();\n };\n\n /** play webcam video method */\n public play = async (): Promise => {\n if (this.element) await this.element.play();\n };\n\n /** stop method stops active webcam stream track and disconnects webcam */\n public stop = (): void => {\n if (this.config.debug) log('webcam', 'stop');\n if (this.track) this.track.stop();\n };\n}\n", "import { log, join } from '../util/util';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport type { GraphModel } from './types';\nimport type { Config } from '../config';\nimport * as modelsDefs from '../../models/models.json';\n// import { validateModel } from '../models';\n\nconst options = {\n cacheModels: true,\n cacheSupported: true,\n verbose: true,\n debug: false,\n modelBasePath: '',\n};\n\nexport interface ModelInfo {\n name: string,\n inCache: boolean,\n sizeDesired: number,\n sizeFromManifest: number,\n sizeLoadedWeights: number,\n}\n\nexport const modelStats: Record = {};\n\nasync function httpHandler(url: string, init?: RequestInit): Promise {\n if (options.debug) log('load model fetch:', url, init);\n return fetch(url, init);\n}\n\nexport function setModelLoadOptions(config: Config) {\n options.cacheModels = config.cacheModels;\n options.verbose = config.debug;\n options.modelBasePath = config.modelBasePath;\n}\n\nexport async function loadModel(modelPath: string | undefined): Promise {\n let modelUrl = join(options.modelBasePath, modelPath || '');\n if (!modelUrl.toLowerCase().endsWith('.json')) modelUrl += '.json';\n const modelPathSegments = modelUrl.includes('/') ? modelUrl.split('/') : modelUrl.split('\\\\');\n const shortModelName = modelPathSegments[modelPathSegments.length - 1].replace('.json', '');\n const cachedModelName = 'indexeddb://' + shortModelName; // generate short model name for cache\n modelStats[shortModelName] = {\n name: shortModelName,\n sizeFromManifest: 0,\n sizeLoadedWeights: 0,\n sizeDesired: modelsDefs[shortModelName],\n inCache: false,\n };\n options.cacheSupported = (typeof indexedDB !== 'undefined'); // check if localStorage and indexedb are available\n let cachedModels = {};\n try {\n cachedModels = (options.cacheSupported && options.cacheModels) ? await tf.io.listModels() : {}; // list all models already in cache // this fails for webview although localStorage is defined\n } catch {\n options.cacheSupported = false;\n }\n modelStats[shortModelName].inCache = (options.cacheSupported && options.cacheModels) && Object.keys(cachedModels).includes(cachedModelName); // is model found in cache\n const tfLoadOptions = typeof fetch === 'undefined' ? {} : { fetchFunc: (url: string, init?: RequestInit) => httpHandler(url, init) };\n let model: GraphModel = new tf.GraphModel(modelStats[shortModelName].inCache ? cachedModelName : modelUrl, tfLoadOptions) as unknown as GraphModel; // create model prototype and decide if load from cache or from original modelurl\n let loaded = false;\n try {\n // @ts-ignore private function\n model.findIOHandler(); // decide how to actually load a model\n if (options.debug) log('model load handler:', model['handler']);\n } catch (err) {\n log('error finding model i/o handler:', modelUrl, err);\n }\n try {\n // @ts-ignore private property\n const artifacts = await model.handler?.load() || null; // load manifest\n modelStats[shortModelName].sizeFromManifest = artifacts?.weightData?.byteLength || 0;\n if (artifacts) model.loadSync(artifacts); // load weights\n else model = await tf.loadGraphModel(modelStats[shortModelName].inCache ? cachedModelName : modelUrl, tfLoadOptions) as unknown as GraphModel;\n // @ts-ignore private property\n modelStats[shortModelName].sizeLoadedWeights = model.artifacts?.weightData?.byteLength || 0;\n if (options.verbose) log('load:', { model: shortModelName, url: model['modelUrl'], bytes: modelStats[shortModelName].sizeLoadedWeights });\n loaded = true;\n } catch (err) {\n log('error loading model:', modelUrl, err);\n }\n if (loaded && options.cacheModels && options.cacheSupported && !modelStats[shortModelName].inCache) { // save model to cache\n try {\n const saveResult = await model.save(cachedModelName);\n if (options.debug) log('model saved:', cachedModelName, saveResult);\n } catch (err) {\n log('error saving model:', modelUrl, err);\n }\n }\n // validateModel(null, model, `${modelPath || ''}`);\n return model;\n}\n", "/**\n * Loader and Validator for all models used by Human\n */\n\nimport { env } from './util/env';\nimport { log } from './util/util';\nimport * as antispoof from './face/antispoof';\nimport * as blazeface from './face/blazeface';\nimport * as blazepose from './body/blazepose';\nimport * as centernet from './object/centernet';\nimport * as efficientpose from './body/efficientpose';\nimport * as emotion from './gear/emotion';\nimport * as facemesh from './face/facemesh';\nimport * as faceres from './face/faceres';\nimport * as gear from './gear/gear';\nimport * as handpose from './hand/handpose';\nimport * as handtrack from './hand/handtrack';\nimport * as insightface from './face/insightface';\nimport * as iris from './face/iris';\nimport * as liveness from './face/liveness';\nimport * as meet from './segmentation/meet';\nimport * as mobilefacenet from './face/mobilefacenet';\nimport * as movenet from './body/movenet';\nimport * as nanodet from './object/nanodet';\nimport * as posenet from './body/posenet';\nimport * as rvm from './segmentation/rvm';\nimport * as selfie from './segmentation/selfie';\nimport * as ssrnetAge from './gear/ssrnet-age';\nimport * as ssrnetGender from './gear/ssrnet-gender';\nimport { modelStats, ModelInfo } from './tfjs/load';\nimport type { GraphModel } from './tfjs/types';\nimport type { Human } from './human';\n\n/** Instances of all possible TFJS Graph Models used by Human\n * - loaded as needed based on configuration\n * - initialized explictly with `human.load()` method\n * - initialized implicity on first call to `human.detect()`\n * - each model can be `null` if not loaded, instance of `GraphModel` if loaded or `Promise` if loading\n */\nexport class Models {\n ssrnetage: null | GraphModel | Promise = null;\n gear: null | GraphModel | Promise = null;\n blazeposedetect: null | GraphModel | Promise = null;\n blazepose: null | GraphModel | Promise = null;\n centernet: null | GraphModel | Promise = null;\n efficientpose: null | GraphModel | Promise = null;\n mobilefacenet: null | GraphModel | Promise = null;\n insightface: null | GraphModel | Promise = null;\n emotion: null | GraphModel | Promise = null;\n facedetect: null | GraphModel | Promise = null;\n faceiris: null | GraphModel | Promise = null;\n facemesh: null | GraphModel | Promise = null;\n faceres: null | GraphModel | Promise = null;\n ssrnetgender: null | GraphModel | Promise = null;\n handpose: null | GraphModel | Promise = null;\n handskeleton: null | GraphModel | Promise = null;\n handtrack: null | GraphModel | Promise = null;\n liveness: null | GraphModel | Promise = null;\n meet: null | GraphModel | Promise = null;\n movenet: null | GraphModel | Promise = null;\n nanodet: null | GraphModel | Promise = null;\n posenet: null | GraphModel | Promise = null;\n selfie: null | GraphModel | Promise = null;\n rvm: null | GraphModel | Promise = null;\n antispoof: null | GraphModel | Promise = null;\n}\n\n/** structure that holds global stats for currently loaded models */\nexport interface ModelStats {\n numLoadedModels: number,\n numDefinedModels: number,\n percentageLoaded: number,\n totalSizeFromManifest: number,\n totalSizeWeights: number,\n totalSizeLoading: number,\n totalSizeEnabled: undefined,\n modelStats: ModelInfo[],\n}\n\nlet instance: Human;\n\nexport const getModelStats = (currentInstance: Human): ModelStats => {\n if (currentInstance) instance = currentInstance;\n if (!instance) log('instance not registred');\n let totalSizeFromManifest = 0;\n let totalSizeWeights = 0;\n let totalSizeLoading = 0;\n for (const m of Object.values(modelStats)) {\n totalSizeFromManifest += m.sizeFromManifest;\n totalSizeWeights += m.sizeLoadedWeights;\n totalSizeLoading += m.sizeDesired;\n }\n const percentageLoaded = totalSizeLoading > 0 ? totalSizeWeights / totalSizeLoading : 0;\n return {\n numLoadedModels: Object.values(modelStats).length,\n numDefinedModels: Object.keys(instance.models).length,\n percentageLoaded,\n totalSizeFromManifest,\n totalSizeWeights,\n totalSizeLoading,\n totalSizeEnabled: undefined,\n modelStats: Object.values(modelStats),\n };\n};\n\nexport function reset(currentInstance: Human): void {\n if (currentInstance) instance = currentInstance;\n // if (instance.config.debug) log('resetting loaded models');\n for (const model of Object.keys(instance.models)) instance.models[model as keyof Models] = null;\n}\n\n/** Load method preloads all instance.configured models on-demand */\nexport async function load(currentInstance: Human): Promise {\n if (currentInstance) instance = currentInstance;\n if (!instance) log('instance not registred');\n if (env.initial) reset(instance);\n if (instance.config.hand.enabled) { // handpose model is a combo that must be loaded as a whole\n if (!instance.models.handpose && instance.config.hand.detector?.modelPath?.includes('handdetect')) {\n [instance.models.handpose, instance.models.handskeleton] = await handpose.load(instance.config);\n }\n if (!instance.models.handskeleton && instance.config.hand.landmarks && instance.config.hand.detector?.modelPath?.includes('handdetect')) {\n [instance.models.handpose, instance.models.handskeleton] = await handpose.load(instance.config);\n }\n }\n if (instance.config.body.enabled && !instance.models.blazepose && instance.config.body.modelPath?.includes('blazepose')) instance.models.blazepose = blazepose.loadPose(instance.config);\n if (instance.config.body.enabled && !instance.models.blazeposedetect && instance.config.body['detector'] && instance.config.body['detector'].modelPath) instance.models.blazeposedetect = blazepose.loadDetect(instance.config);\n if (instance.config.body.enabled && !instance.models.efficientpose && instance.config.body.modelPath?.includes('efficientpose')) instance.models.efficientpose = efficientpose.load(instance.config);\n if (instance.config.body.enabled && !instance.models.movenet && instance.config.body.modelPath?.includes('movenet')) instance.models.movenet = movenet.load(instance.config);\n if (instance.config.body.enabled && !instance.models.posenet && instance.config.body.modelPath?.includes('posenet')) instance.models.posenet = posenet.load(instance.config);\n if (instance.config.face.enabled && !instance.models.facedetect) instance.models.facedetect = blazeface.load(instance.config);\n if (instance.config.face.enabled && instance.config.face.antispoof?.enabled && !instance.models.antispoof) instance.models.antispoof = antispoof.load(instance.config);\n if (instance.config.face.enabled && instance.config.face.liveness?.enabled && !instance.models.liveness) instance.models.liveness = liveness.load(instance.config);\n if (instance.config.face.enabled && instance.config.face.description?.enabled && !instance.models.faceres) instance.models.faceres = faceres.load(instance.config);\n if (instance.config.face.enabled && instance.config.face.emotion?.enabled && !instance.models.emotion) instance.models.emotion = emotion.load(instance.config);\n if (instance.config.face.enabled && instance.config.face.iris?.enabled && !instance.config.face.attention?.enabled && !instance.models.faceiris) instance.models.faceiris = iris.load(instance.config);\n if (instance.config.face.enabled && instance.config.face.mesh?.enabled && (!instance.models.facemesh)) instance.models.facemesh = facemesh.load(instance.config);\n if (instance.config.face.enabled && instance.config.face['gear']?.enabled && !instance.models.gear) instance.models.gear = gear.load(instance.config);\n if (instance.config.face.enabled && instance.config.face['ssrnet']?.enabled && !instance.models.ssrnetage) instance.models.ssrnetage = ssrnetAge.load(instance.config);\n if (instance.config.face.enabled && instance.config.face['ssrnet']?.enabled && !instance.models.ssrnetgender) instance.models.ssrnetgender = ssrnetGender.load(instance.config);\n if (instance.config.face.enabled && instance.config.face['mobilefacenet']?.enabled && !instance.models.mobilefacenet) instance.models.mobilefacenet = mobilefacenet.load(instance.config);\n if (instance.config.face.enabled && instance.config.face['insightface']?.enabled && !instance.models.insightface) instance.models.insightface = insightface.load(instance.config);\n if (instance.config.hand.enabled && !instance.models.handtrack && instance.config.hand.detector?.modelPath?.includes('handtrack')) instance.models.handtrack = handtrack.loadDetect(instance.config);\n if (instance.config.hand.enabled && instance.config.hand.landmarks && !instance.models.handskeleton && instance.config.hand.detector?.modelPath?.includes('handtrack')) instance.models.handskeleton = handtrack.loadSkeleton(instance.config);\n if (instance.config.object.enabled && !instance.models.centernet && instance.config.object.modelPath?.includes('centernet')) instance.models.centernet = centernet.load(instance.config);\n if (instance.config.object.enabled && !instance.models.nanodet && instance.config.object.modelPath?.includes('nanodet')) instance.models.nanodet = nanodet.load(instance.config);\n if (instance.config.segmentation.enabled && !instance.models.selfie && instance.config.segmentation.modelPath?.includes('selfie')) instance.models.selfie = selfie.load(instance.config);\n if (instance.config.segmentation.enabled && !instance.models.meet && instance.config.segmentation.modelPath?.includes('meet')) instance.models.meet = meet.load(instance.config);\n if (instance.config.segmentation.enabled && !instance.models.rvm && instance.config.segmentation.modelPath?.includes('rvm')) instance.models.rvm = rvm.load(instance.config);\n\n // models are loaded in parallel asynchronously so lets wait until they are actually loaded\n for await (const model of Object.keys(instance.models)) {\n if (instance.models[model as keyof Models] && typeof instance.models[model as keyof Models] !== 'undefined') {\n instance.models[model as keyof Models] = await instance.models[model as keyof Models];\n }\n }\n}\n\nexport interface KernelOps { name: string, url: string, missing: string[], ops: string[] }\n\nexport function validateModel(currentInstance: Human | null, model: GraphModel | null, name: string): KernelOps | null {\n if (!model) return null;\n if (currentInstance) instance = currentInstance;\n if (!instance) log('instance not registred');\n if (!instance?.config?.validateModels) return null;\n const simpleOps = ['const', 'placeholder', 'noop', 'pad', 'squeeze', 'add', 'sub', 'mul', 'div'];\n const ignoreOps = ['biasadd', 'fusedbatchnormv3', 'matmul', 'switch', 'shape', 'merge', 'split', 'broadcastto'];\n const ops: string[] = [];\n const missing: string[] = [];\n interface Op { name: string, category: string, op: string }\n const url = model['modelUrl'] as string;\n const executor = model['executor'];\n if (executor?.graph?.nodes) {\n for (const kernel of Object.values(executor.graph.nodes)) {\n const op = (kernel as Op).op.toLowerCase();\n if (!ops.includes(op)) ops.push(op);\n }\n } else {\n if (!executor && instance.config.debug) {\n log('model not loaded', name);\n }\n }\n for (const op of ops) {\n if (!simpleOps.includes(op) // exclude simple ops\n && !ignoreOps.includes(op) // exclude specific ops\n && !instance.env.kernels.includes(op) // check actual kernel ops\n && !instance.env.kernels.includes(op.replace('_', '')) // check variation without _\n && !instance.env.kernels.includes(op.replace('native', '')) // check standard variation\n && !instance.env.kernels.includes(op.replace('v2', ''))) { // check non-versioned variation\n missing.push(op);\n }\n }\n if (instance.config.debug && missing.length > 0) log('model validation failed:', name, missing);\n return missing.length > 0 ? { name, missing, ops, url } : null;\n}\n\nexport function validate(currentInstance: Human): { name: string, missing: string[] }[] {\n if (currentInstance) instance = currentInstance;\n if (!instance) log('instance not registred');\n const missing: KernelOps[] = [];\n for (const defined of Object.keys(currentInstance.models)) {\n const model: GraphModel | null = currentInstance.models[defined as keyof Models] as GraphModel | null;\n if (!model) continue;\n const res = validateModel(currentInstance, model, defined);\n if (res) missing.push(res);\n }\n return missing;\n}\n", "/**\n * Anti-spoofing model implementation\n */\n\nimport { log, now } from '../util/util';\nimport type { Config } from '../config';\nimport type { GraphModel, Tensor } from '../tfjs/types';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport { loadModel } from '../tfjs/load';\nimport { env } from '../util/env';\n\nlet model: GraphModel | null;\nconst cached: number[] = [];\nlet skipped = Number.MAX_SAFE_INTEGER;\nlet lastCount = 0;\nlet lastTime = 0;\n\nexport async function load(config: Config): Promise {\n if (env.initial) model = null;\n if (!model) model = await loadModel(config.face.antispoof?.modelPath);\n else if (config.debug) log('cached model:', model['modelUrl']);\n return model;\n}\n\nexport async function predict(image: Tensor, config: Config, idx: number, count: number): Promise {\n if (!model || !model?.['executor']) return 0;\n const skipTime = (config.face.antispoof?.skipTime || 0) > (now() - lastTime);\n const skipFrame = skipped < (config.face.antispoof?.skipFrames || 0);\n if (config.skipAllowed && skipTime && skipFrame && (lastCount === count) && cached[idx]) {\n skipped++;\n return cached[idx];\n }\n skipped = 0;\n return new Promise(async (resolve) => {\n const resize = tf.image.resizeBilinear(image, [model?.inputs[0].shape ? model.inputs[0].shape[2] : 0, model?.inputs[0].shape ? model.inputs[0].shape[1] : 0], false);\n const res = model?.execute(resize) as Tensor;\n const num = (await res.data())[0];\n cached[idx] = Math.round(100 * num) / 100;\n lastCount = count;\n lastTime = now();\n tf.dispose([resize, res]);\n resolve(cached[idx]);\n });\n}\n", "/**\n * BlazeFace, FaceMesh & Iris model implementation\n * See `facemesh.ts` for entry point\n */\n\nexport const meshAnnotations: Record = {\n silhouette: [\n 10, 338, 297, 332, 284, 251, 389, 356, 454, 323, 361, 288,\n 397, 365, 379, 378, 400, 377, 152, 148, 176, 149, 150, 136,\n 172, 58, 132, 93, 234, 127, 162, 21, 54, 103, 67, 109,\n ],\n // lipsUpperOuter: [61, 185, 40, 39, 37, 0, 267, 269, 270, 409, 291], // 11\n // lipsLowerOuter: [146, 91, 181, 84, 17, 314, 405, 321, 375, 291], // 10\n // lipsUpperInner: [78, 191, 80, 81, 82, 13, 312, 311, 310, 415, 308], // 11\n // lipsLowerInner: [78, 95, 88, 178, 87, 14, 317, 402, 318, 324, 308], // 11\n lipsUpperOuter: [185, 40, 39, 37, 0, 267, 269, 270, 409],\n lipsLowerOuter: [61, 146, 91, 181, 84, 17, 314, 405, 321, 375, 291],\n lipsUpperInner: [191, 80, 81, 82, 13, 312, 311, 310, 415],\n lipsLowerInner: [78, 95, 88, 178, 87, 14, 317, 402, 318, 324, 308],\n lipsLowerSemiOuter: [76, 77, 90, 180, 85, 16, 315, 404, 320, 307, 306],\n lipsUpperSemiOuter: [184, 74, 73, 72, 11, 302, 303, 304, 408],\n lipsLowerSemiInner: [62, 96, 89, 179, 86, 15, 316, 403, 319, 325, 292],\n lipsUpperSemiInner: [183, 42, 41, 38, 12, 268, 271, 272, 407],\n rightEyeUpper0: [246, 161, 160, 159, 158, 157, 173], // 7\n rightEyeLower0: [33, 7, 163, 144, 145, 153, 154, 155, 133], // 9\n rightEyeUpper1: [247, 30, 29, 27, 28, 56, 190], // 7\n rightEyeLower1: [130, 25, 110, 24, 23, 22, 26, 112, 243], // 9\n rightEyeUpper2: [113, 225, 224, 223, 222, 221, 189], // 7\n rightEyeLower2: [226, 31, 228, 229, 230, 231, 232, 233, 244], // 9\n rightEyeLower3: [143, 111, 117, 118, 119, 120, 121, 128, 245], // 9\n rightEyebrowUpper: [156, 70, 63, 105, 66, 107, 55, 193], // 8\n rightEyebrowLower: [35, 124, 46, 53, 52, 65], // 6\n rightEyeIris: [473, 474, 475, 476, 477], // 5\n leftEyeUpper0: [466, 388, 387, 386, 385, 384, 398],\n leftEyeLower0: [263, 249, 390, 373, 374, 380, 381, 382, 362],\n leftEyeUpper1: [467, 260, 259, 257, 258, 286, 414],\n leftEyeLower1: [359, 255, 339, 254, 253, 252, 256, 341, 463],\n leftEyeUpper2: [342, 445, 444, 443, 442, 441, 413],\n leftEyeLower2: [446, 261, 448, 449, 450, 451, 452, 453, 464],\n leftEyeLower3: [372, 340, 346, 347, 348, 349, 350, 357, 465],\n leftEyebrowUpper: [383, 300, 293, 334, 296, 336, 285, 417],\n leftEyebrowLower: [265, 353, 276, 283, 282, 295],\n leftEyeIris: [468, 469, 470, 471, 472],\n midwayBetweenEyes: [168],\n noseTip: [1],\n noseBottom: [2],\n noseRightCorner: [98],\n noseLeftCorner: [327],\n rightCheek: [205],\n leftCheek: [425],\n};\n\nexport const meshLandmarks: Record = {\n count: 468,\n mouth: 13,\n symmetryLine: [13, meshAnnotations.midwayBetweenEyes[0]],\n};\n\nexport const blazeFaceLandmarks: Record = {\n leftEye: 0,\n rightEye: 1,\n nose: 2,\n mouth: 3,\n leftEar: 4,\n rightEar: 5,\n symmetryLine: [3, 2],\n};\n\nexport const irisIndices: { key: string, indices: number[] }[] = [ // A mapping from facemesh model keypoints to iris model keypoints.\n { key: 'EyeUpper0', indices: [9, 10, 11, 12, 13, 14, 15] }, // 7 x 3d\n { key: 'EyeUpper1', indices: [25, 26, 27, 28, 29, 30, 31] }, // 7 x 3d\n { key: 'EyeUpper2', indices: [41, 42, 43, 44, 45, 46, 47] }, // 7 x 3d\n { key: 'EyeLower0', indices: [0, 1, 2, 3, 4, 5, 6, 7, 8] }, // 7 x 3d\n { key: 'EyeLower1', indices: [16, 17, 18, 19, 20, 21, 22, 23, 24] }, // 9 x 3d\n { key: 'EyeLower2', indices: [32, 33, 34, 35, 36, 37, 38, 39, 40] }, // 9 x 3d\n { key: 'EyeLower3', indices: [54, 55, 56, 57, 58, 59, 60, 61, 62] }, // 9 x 3d\n { key: 'EyebrowUpper', indices: [63, 64, 65, 66, 67, 68, 69, 70] }, // 8 x 3d\n { key: 'EyebrowLower', indices: [48, 49, 50, 51, 52, 53] }, // 6 x 3d\n];\n\nexport const UV468: [number, number][] = [\n [0.499976992607117, 0.652534008026123],\n [0.500025987625122, 0.547487020492554],\n [0.499974012374878, 0.602371990680695],\n [0.482113003730774, 0.471979022026062],\n [0.500150978565216, 0.527155995368958],\n [0.499909996986389, 0.498252987861633],\n [0.499523013830185, 0.40106201171875],\n [0.289712011814117, 0.380764007568359],\n [0.499954998493195, 0.312398016452789],\n [0.499987006187439, 0.269918978214264],\n [0.500023007392883, 0.107050001621246],\n [0.500023007392883, 0.666234016418457],\n [0.5000159740448, 0.679224014282227],\n [0.500023007392883, 0.692348003387451],\n [0.499976992607117, 0.695277988910675],\n [0.499976992607117, 0.70593398809433],\n [0.499976992607117, 0.719385027885437],\n [0.499976992607117, 0.737019002437592],\n [0.499967992305756, 0.781370997428894],\n [0.499816000461578, 0.562981009483337],\n [0.473773002624512, 0.573909997940063],\n [0.104906998574734, 0.254140973091125],\n [0.365929991006851, 0.409575998783112],\n [0.338757991790771, 0.41302502155304],\n [0.311120003461838, 0.409460008144379],\n [0.274657994508743, 0.389131009578705],\n [0.393361985683441, 0.403706014156342],\n [0.345234006643295, 0.344011008739471],\n [0.370094001293182, 0.346076011657715],\n [0.319321990013123, 0.347265005111694],\n [0.297903001308441, 0.353591024875641],\n [0.24779200553894, 0.410809993743896],\n [0.396889001131058, 0.842755019664764],\n [0.280097991228104, 0.375599980354309],\n [0.106310002505779, 0.399955987930298],\n [0.2099249958992, 0.391353011131287],\n [0.355807989835739, 0.534406006336212],\n [0.471751004457474, 0.65040397644043],\n [0.474155008792877, 0.680191993713379],\n [0.439785003662109, 0.657229006290436],\n [0.414617002010345, 0.66654098033905],\n [0.450374007225037, 0.680860996246338],\n [0.428770989179611, 0.682690978050232],\n [0.374971002340317, 0.727805018424988],\n [0.486716985702515, 0.547628998756409],\n [0.485300987958908, 0.527395009994507],\n [0.257764995098114, 0.314490020275116],\n [0.401223003864288, 0.455172002315521],\n [0.429818987846375, 0.548614978790283],\n [0.421351999044418, 0.533740997314453],\n [0.276895999908447, 0.532056987285614],\n [0.483370006084442, 0.499586999416351],\n [0.33721199631691, 0.282882988452911],\n [0.296391993761063, 0.293242990970612],\n [0.169294998049736, 0.193813979625702],\n [0.447580009698868, 0.302609980106354],\n [0.392390012741089, 0.353887975215912],\n [0.354490011930466, 0.696784019470215],\n [0.067304998636246, 0.730105042457581],\n [0.442739009857178, 0.572826027870178],\n [0.457098007202148, 0.584792017936707],\n [0.381974011659622, 0.694710969924927],\n [0.392388999462128, 0.694203019142151],\n [0.277076005935669, 0.271932005882263],\n [0.422551989555359, 0.563233017921448],\n [0.385919004678726, 0.281364023685455],\n [0.383103013038635, 0.255840003490448],\n [0.331431001424789, 0.119714021682739],\n [0.229923993349075, 0.232002973556519],\n [0.364500999450684, 0.189113974571228],\n [0.229622006416321, 0.299540996551514],\n [0.173287004232407, 0.278747975826263],\n [0.472878992557526, 0.666198015213013],\n [0.446828007698059, 0.668527007102966],\n [0.422762006521225, 0.673889994621277],\n [0.445307999849319, 0.580065965652466],\n [0.388103008270264, 0.693961024284363],\n [0.403039008378983, 0.706539988517761],\n [0.403629004955292, 0.693953037261963],\n [0.460041999816895, 0.557139039039612],\n [0.431158006191254, 0.692366003990173],\n [0.452181994915009, 0.692366003990173],\n [0.475387006998062, 0.692366003990173],\n [0.465828001499176, 0.779190003871918],\n [0.472328990697861, 0.736225962638855],\n [0.473087012767792, 0.717857003211975],\n [0.473122000694275, 0.704625964164734],\n [0.473033010959625, 0.695277988910675],\n [0.427942007780075, 0.695277988910675],\n [0.426479011774063, 0.703539967536926],\n [0.423162013292313, 0.711845993995667],\n [0.4183090031147, 0.720062971115112],\n [0.390094995498657, 0.639572978019714],\n [0.013953999616206, 0.560034036636353],\n [0.499913990497589, 0.58014702796936],\n [0.413199990987778, 0.69539999961853],\n [0.409626007080078, 0.701822996139526],\n [0.468080013990402, 0.601534962654114],\n [0.422728985548019, 0.585985004901886],\n [0.463079988956451, 0.593783974647522],\n [0.37211999297142, 0.47341400384903],\n [0.334562003612518, 0.496073007583618],\n [0.411671012639999, 0.546965003013611],\n [0.242175996303558, 0.14767599105835],\n [0.290776997804642, 0.201445996761322],\n [0.327338010072708, 0.256527006626129],\n [0.399509996175766, 0.748921036720276],\n [0.441727995872498, 0.261676013469696],\n [0.429764986038208, 0.187834024429321],\n [0.412198007106781, 0.108901023864746],\n [0.288955003023148, 0.398952007293701],\n [0.218936994671822, 0.435410976409912],\n [0.41278201341629, 0.398970007896423],\n [0.257135003805161, 0.355440020561218],\n [0.427684992551804, 0.437960982322693],\n [0.448339998722076, 0.536936044692993],\n [0.178560003638268, 0.45755398273468],\n [0.247308000922203, 0.457193970680237],\n [0.286267012357712, 0.467674970626831],\n [0.332827985286713, 0.460712015628815],\n [0.368755996227264, 0.447206974029541],\n [0.398963987827301, 0.432654976844788],\n [0.476410001516342, 0.405806005001068],\n [0.189241006970406, 0.523923993110657],\n [0.228962004184723, 0.348950982093811],\n [0.490725994110107, 0.562400996685028],\n [0.404670000076294, 0.485132992267609],\n [0.019469000399113, 0.401564002037048],\n [0.426243007183075, 0.420431017875671],\n [0.396993011236191, 0.548797011375427],\n [0.266469985246658, 0.376977026462555],\n [0.439121007919312, 0.51895797252655],\n [0.032313998788595, 0.644356966018677],\n [0.419054001569748, 0.387154996395111],\n [0.462783008813858, 0.505746960639954],\n [0.238978996872902, 0.779744982719421],\n [0.198220998048782, 0.831938028335571],\n [0.107550002634525, 0.540755033493042],\n [0.183610007166862, 0.740257024765015],\n [0.134409993886948, 0.333683013916016],\n [0.385764002799988, 0.883153975009918],\n [0.490967005491257, 0.579378008842468],\n [0.382384985685349, 0.508572995662689],\n [0.174399003386497, 0.397670984268188],\n [0.318785011768341, 0.39623498916626],\n [0.343364000320435, 0.400596976280212],\n [0.396100014448166, 0.710216999053955],\n [0.187885001301765, 0.588537991046906],\n [0.430987000465393, 0.944064974784851],\n [0.318993002176285, 0.898285031318665],\n [0.266247987747192, 0.869701027870178],\n [0.500023007392883, 0.190576016902924],\n [0.499976992607117, 0.954452991485596],\n [0.366169989109039, 0.398822009563446],\n [0.393207013607025, 0.39553701877594],\n [0.410373002290726, 0.391080021858215],\n [0.194993004202843, 0.342101991176605],\n [0.388664990663528, 0.362284004688263],\n [0.365961998701096, 0.355970978736877],\n [0.343364000320435, 0.355356991291046],\n [0.318785011768341, 0.35834002494812],\n [0.301414996385574, 0.363156020641327],\n [0.058132998645306, 0.319076001644135],\n [0.301414996385574, 0.387449026107788],\n [0.499987989664078, 0.618434011936188],\n [0.415838003158569, 0.624195992946625],\n [0.445681989192963, 0.566076993942261],\n [0.465844005346298, 0.620640993118286],\n [0.49992299079895, 0.351523995399475],\n [0.288718998432159, 0.819945991039276],\n [0.335278987884521, 0.852819979190826],\n [0.440512001514435, 0.902418971061707],\n [0.128294005990028, 0.791940987110138],\n [0.408771991729736, 0.373893976211548],\n [0.455606997013092, 0.451801002025604],\n [0.499877005815506, 0.908990025520325],\n [0.375436991453171, 0.924192011356354],\n [0.11421000212431, 0.615022003650665],\n [0.448662012815475, 0.695277988910675],\n [0.4480200111866, 0.704632043838501],\n [0.447111994028091, 0.715808033943176],\n [0.444831997156143, 0.730794012546539],\n [0.430011987686157, 0.766808986663818],\n [0.406787008047104, 0.685672998428345],\n [0.400738000869751, 0.681069016456604],\n [0.392399996519089, 0.677703022956848],\n [0.367855995893478, 0.663918972015381],\n [0.247923001646996, 0.601333022117615],\n [0.452769994735718, 0.420849978923798],\n [0.43639200925827, 0.359887003898621],\n [0.416164010763168, 0.368713974952698],\n [0.413385987281799, 0.692366003990173],\n [0.228018000721931, 0.683571994304657],\n [0.468268007040024, 0.352671027183533],\n [0.411361992359161, 0.804327011108398],\n [0.499989002943039, 0.469825029373169],\n [0.479153990745544, 0.442654013633728],\n [0.499974012374878, 0.439637005329132],\n [0.432112008333206, 0.493588984012604],\n [0.499886006116867, 0.866917014122009],\n [0.49991300702095, 0.821729004383087],\n [0.456548988819122, 0.819200992584229],\n [0.344549000263214, 0.745438992977142],\n [0.37890899181366, 0.574010014533997],\n [0.374292999505997, 0.780184984207153],\n [0.319687992334366, 0.570737957954407],\n [0.357154995203018, 0.604269981384277],\n [0.295284003019333, 0.621580958366394],\n [0.447750002145767, 0.862477004528046],\n [0.410986006259918, 0.508723020553589],\n [0.31395098567009, 0.775308012962341],\n [0.354128003120422, 0.812552988529205],\n [0.324548006057739, 0.703992962837219],\n [0.189096003770828, 0.646299958229065],\n [0.279776990413666, 0.71465802192688],\n [0.1338230073452, 0.682700991630554],\n [0.336768001317978, 0.644733011722565],\n [0.429883986711502, 0.466521978378296],\n [0.455527991056442, 0.548622965812683],\n [0.437114000320435, 0.558896005153656],\n [0.467287987470627, 0.529924988746643],\n [0.414712011814117, 0.335219979286194],\n [0.37704598903656, 0.322777986526489],\n [0.344107985496521, 0.320150971412659],\n [0.312875986099243, 0.32233202457428],\n [0.283526003360748, 0.333190023899078],\n [0.241245999932289, 0.382785975933075],\n [0.102986000478268, 0.468762993812561],\n [0.267612010240555, 0.424560010433197],\n [0.297879010438919, 0.433175981044769],\n [0.333433985710144, 0.433878004550934],\n [0.366427004337311, 0.426115989685059],\n [0.396012008190155, 0.416696012020111],\n [0.420121014118195, 0.41022801399231],\n [0.007561000064015, 0.480777025222778],\n [0.432949006557465, 0.569517970085144],\n [0.458638995885849, 0.479089021682739],\n [0.473466008901596, 0.545744001865387],\n [0.476087987422943, 0.563830018043518],\n [0.468472003936768, 0.555056989192963],\n [0.433990985155106, 0.582361996173859],\n [0.483518004417419, 0.562983989715576],\n [0.482482999563217, 0.57784903049469],\n [0.42645001411438, 0.389798998832703],\n [0.438998997211456, 0.39649498462677],\n [0.450067013502121, 0.400434017181396],\n [0.289712011814117, 0.368252992630005],\n [0.276670008897781, 0.363372981548309],\n [0.517862021923065, 0.471948027610779],\n [0.710287988185883, 0.380764007568359],\n [0.526226997375488, 0.573909997940063],\n [0.895093023777008, 0.254140973091125],\n [0.634069979190826, 0.409575998783112],\n [0.661242008209229, 0.41302502155304],\n [0.688880026340485, 0.409460008144379],\n [0.725341975688934, 0.389131009578705],\n [0.606630027294159, 0.40370500087738],\n [0.654766023159027, 0.344011008739471],\n [0.629905998706818, 0.346076011657715],\n [0.680678009986877, 0.347265005111694],\n [0.702096998691559, 0.353591024875641],\n [0.75221198797226, 0.410804986953735],\n [0.602918028831482, 0.842862963676453],\n [0.719901978969574, 0.375599980354309],\n [0.893692970275879, 0.399959981441498],\n [0.790081977844238, 0.391354024410248],\n [0.643998026847839, 0.534487962722778],\n [0.528249025344849, 0.65040397644043],\n [0.525849997997284, 0.680191040039062],\n [0.560214996337891, 0.657229006290436],\n [0.585384011268616, 0.66654098033905],\n [0.549625992774963, 0.680860996246338],\n [0.57122802734375, 0.682691991329193],\n [0.624852001667023, 0.72809898853302],\n [0.513050019741058, 0.547281980514526],\n [0.51509702205658, 0.527251958847046],\n [0.742246985435486, 0.314507007598877],\n [0.598631024360657, 0.454979002475739],\n [0.570338010787964, 0.548575043678284],\n [0.578631997108459, 0.533622980117798],\n [0.723087012767792, 0.532054007053375],\n [0.516445994377136, 0.499638974666595],\n [0.662801027297974, 0.282917976379395],\n [0.70362401008606, 0.293271005153656],\n [0.830704987049103, 0.193813979625702],\n [0.552385985851288, 0.302568018436432],\n [0.607609987258911, 0.353887975215912],\n [0.645429015159607, 0.696707010269165],\n [0.932694971561432, 0.730105042457581],\n [0.557260990142822, 0.572826027870178],\n [0.542901992797852, 0.584792017936707],\n [0.6180260181427, 0.694710969924927],\n [0.607590973377228, 0.694203019142151],\n [0.722943007946014, 0.271963000297546],\n [0.577413976192474, 0.563166975975037],\n [0.614082992076874, 0.281386971473694],\n [0.616907000541687, 0.255886018276215],\n [0.668509006500244, 0.119913995265961],\n [0.770092010498047, 0.232020974159241],\n [0.635536015033722, 0.189248979091644],\n [0.77039098739624, 0.299556016921997],\n [0.826722025871277, 0.278755009174347],\n [0.527121007442474, 0.666198015213013],\n [0.553171992301941, 0.668527007102966],\n [0.577238023281097, 0.673889994621277],\n [0.554691970348358, 0.580065965652466],\n [0.611896991729736, 0.693961024284363],\n [0.59696102142334, 0.706539988517761],\n [0.596370995044708, 0.693953037261963],\n [0.539958000183105, 0.557139039039612],\n [0.568841993808746, 0.692366003990173],\n [0.547818005084991, 0.692366003990173],\n [0.52461302280426, 0.692366003990173],\n [0.534089982509613, 0.779141008853912],\n [0.527670979499817, 0.736225962638855],\n [0.526912987232208, 0.717857003211975],\n [0.526877999305725, 0.704625964164734],\n [0.526966989040375, 0.695277988910675],\n [0.572058022022247, 0.695277988910675],\n [0.573521018028259, 0.703539967536926],\n [0.57683801651001, 0.711845993995667],\n [0.581691026687622, 0.720062971115112],\n [0.609944999217987, 0.639909982681274],\n [0.986046016216278, 0.560034036636353],\n [0.5867999792099, 0.69539999961853],\n [0.590372025966644, 0.701822996139526],\n [0.531915009021759, 0.601536989212036],\n [0.577268004417419, 0.585934996604919],\n [0.536915004253387, 0.593786001205444],\n [0.627542972564697, 0.473352015018463],\n [0.665585994720459, 0.495950996875763],\n [0.588353991508484, 0.546862006187439],\n [0.757824003696442, 0.14767599105835],\n [0.709249973297119, 0.201507985591888],\n [0.672684013843536, 0.256581008434296],\n [0.600408971309662, 0.74900496006012],\n [0.55826598405838, 0.261672019958496],\n [0.570303976535797, 0.187870979309082],\n [0.588165998458862, 0.109044015407562],\n [0.711045026779175, 0.398952007293701],\n [0.781069993972778, 0.435405015945435],\n [0.587247014045715, 0.398931980133057],\n [0.742869973182678, 0.355445981025696],\n [0.572156012058258, 0.437651991844177],\n [0.55186802148819, 0.536570012569427],\n [0.821442008018494, 0.457556009292603],\n [0.752701997756958, 0.457181990146637],\n [0.71375697851181, 0.467626988887787],\n [0.66711300611496, 0.460672974586487],\n [0.631101012229919, 0.447153985500336],\n [0.6008620262146, 0.432473003864288],\n [0.523481011390686, 0.405627012252808],\n [0.810747981071472, 0.523926019668579],\n [0.771045982837677, 0.348959028720856],\n [0.509127020835876, 0.562718033790588],\n [0.595292985439301, 0.485023975372314],\n [0.980530977249146, 0.401564002037048],\n [0.573499977588654, 0.420000016689301],\n [0.602994978427887, 0.548687994480133],\n [0.733529984951019, 0.376977026462555],\n [0.560611009597778, 0.519016981124878],\n [0.967685997486115, 0.644356966018677],\n [0.580985009670258, 0.387160003185272],\n [0.537728011608124, 0.505385041236877],\n [0.760966002941132, 0.779752969741821],\n [0.801778972148895, 0.831938028335571],\n [0.892440974712372, 0.54076099395752],\n [0.816350996494293, 0.740260004997253],\n [0.865594983100891, 0.333687007427216],\n [0.614073991775513, 0.883246004581451],\n [0.508952975273132, 0.579437971115112],\n [0.617941975593567, 0.508316040039062],\n [0.825608015060425, 0.397674977779388],\n [0.681214988231659, 0.39623498916626],\n [0.656635999679565, 0.400596976280212],\n [0.603900015354156, 0.710216999053955],\n [0.81208598613739, 0.588539004325867],\n [0.56801301240921, 0.944564998149872],\n [0.681007981300354, 0.898285031318665],\n [0.733752012252808, 0.869701027870178],\n [0.633830010890961, 0.398822009563446],\n [0.606792986392975, 0.39553701877594],\n [0.589659988880157, 0.391062021255493],\n [0.805015981197357, 0.342108011245728],\n [0.611334979534149, 0.362284004688263],\n [0.634037971496582, 0.355970978736877],\n [0.656635999679565, 0.355356991291046],\n [0.681214988231659, 0.35834002494812],\n [0.698584973812103, 0.363156020641327],\n [0.941866993904114, 0.319076001644135],\n [0.698584973812103, 0.387449026107788],\n [0.584177017211914, 0.624107003211975],\n [0.554318010807037, 0.566076993942261],\n [0.534153997898102, 0.62064003944397],\n [0.711217999458313, 0.819975018501282],\n [0.664629995822906, 0.852871000766754],\n [0.559099972248077, 0.902631998062134],\n [0.871706008911133, 0.791940987110138],\n [0.591234028339386, 0.373893976211548],\n [0.544341027736664, 0.451583981513977],\n [0.624562978744507, 0.924192011356354],\n [0.88577002286911, 0.615028977394104],\n [0.551338016986847, 0.695277988910675],\n [0.551980018615723, 0.704632043838501],\n [0.552887976169586, 0.715808033943176],\n [0.555167973041534, 0.730794012546539],\n [0.569944024085999, 0.767035007476807],\n [0.593203008174896, 0.685675978660583],\n [0.599261999130249, 0.681069016456604],\n [0.607599973678589, 0.677703022956848],\n [0.631937980651855, 0.663500010967255],\n [0.752032995223999, 0.601315021514893],\n [0.547226011753082, 0.420395016670227],\n [0.563543975353241, 0.359827995300293],\n [0.583841025829315, 0.368713974952698],\n [0.586614012718201, 0.692366003990173],\n [0.771915018558502, 0.683578014373779],\n [0.531597018241882, 0.352482974529266],\n [0.588370978832245, 0.804440975189209],\n [0.52079701423645, 0.442565023899078],\n [0.567984998226166, 0.493479013442993],\n [0.543282985687256, 0.819254994392395],\n [0.655317008495331, 0.745514988899231],\n [0.621008992195129, 0.574018001556396],\n [0.625559985637665, 0.78031200170517],\n [0.680198013782501, 0.570719003677368],\n [0.64276397228241, 0.604337990283966],\n [0.704662978649139, 0.621529996395111],\n [0.552012026309967, 0.862591981887817],\n [0.589071989059448, 0.508637011051178],\n [0.685944974422455, 0.775357007980347],\n [0.645735025405884, 0.812640011310577],\n [0.675342977046967, 0.703978002071381],\n [0.810858011245728, 0.646304965019226],\n [0.72012197971344, 0.714666962623596],\n [0.866151988506317, 0.682704985141754],\n [0.663187026977539, 0.644596993923187],\n [0.570082008838654, 0.466325998306274],\n [0.544561982154846, 0.548375964164734],\n [0.562758982181549, 0.558784961700439],\n [0.531987011432648, 0.530140042304993],\n [0.585271000862122, 0.335177004337311],\n [0.622952997684479, 0.32277899980545],\n [0.655896008014679, 0.320163011550903],\n [0.687132000923157, 0.322345972061157],\n [0.716481983661652, 0.333200991153717],\n [0.758756995201111, 0.382786989212036],\n [0.897013008594513, 0.468769013881683],\n [0.732392013072968, 0.424547016620636],\n [0.70211398601532, 0.433162987232208],\n [0.66652500629425, 0.433866024017334],\n [0.633504986763, 0.426087975502014],\n [0.603875994682312, 0.416586995124817],\n [0.579657971858978, 0.409945011138916],\n [0.992439985275269, 0.480777025222778],\n [0.567192018032074, 0.569419980049133],\n [0.54136598110199, 0.478899002075195],\n [0.526564002037048, 0.546118021011353],\n [0.523913025856018, 0.563830018043518],\n [0.531529009342194, 0.555056989192963],\n [0.566035985946655, 0.582329034805298],\n [0.51631098985672, 0.563053965568542],\n [0.5174720287323, 0.577877044677734],\n [0.573594987392426, 0.389806985855103],\n [0.560697972774506, 0.395331978797913],\n [0.549755990505219, 0.399751007556915],\n [0.710287988185883, 0.368252992630005],\n [0.723330020904541, 0.363372981548309],\n];\n\nexport const TRI468: number[] = [\n 127, 34, 139, 11, 0, 37, 232, 231, 120, 72, 37, 39, 128, 121, 47, 232, 121, 128, 104, 69, 67, 175, 171, 148, 157, 154, 155, 118, 50, 101, 73, 39, 40, 9,\n 151, 108, 48, 115, 131, 194, 204, 211, 74, 40, 185, 80, 42, 183, 40, 92, 186, 230, 229, 118, 202, 212, 214, 83, 18, 17, 76, 61, 146, 160, 29, 30, 56,\n 157, 173, 106, 204, 194, 135, 214, 192, 203, 165, 98, 21, 71, 68, 51, 45, 4, 144, 24, 23, 77, 146, 91, 205, 50, 187, 201, 200, 18, 91, 106, 182, 90, 91,\n 181, 85, 84, 17, 206, 203, 36, 148, 171, 140, 92, 40, 39, 193, 189, 244, 159, 158, 28, 247, 246, 161, 236, 3, 196, 54, 68, 104, 193, 168, 8, 117,\n 228, 31, 189, 193, 55, 98, 97, 99, 126, 47, 100, 166, 79, 218, 155, 154, 26, 209, 49, 131, 135, 136, 150, 47, 126, 217, 223, 52, 53, 45, 51, 134, 211,\n 170, 140, 67, 69, 108, 43, 106, 91, 230, 119, 120, 226, 130, 247, 63, 53, 52, 238, 20, 242, 46, 70, 156, 78, 62, 96, 46, 53, 63, 143, 34, 227, 173,\n 155, 133, 123, 117, 111, 44, 125, 19, 236, 134, 51, 216, 206, 205, 154, 153, 22, 39, 37, 167, 200, 201, 208, 36, 142, 100, 57, 212, 202, 20, 60, 99, 28,\n 158, 157, 35, 226, 113, 160, 159, 27, 204, 202, 210, 113, 225, 46, 43, 202, 204, 62, 76, 77, 137, 123, 116, 41, 38, 72, 203, 129, 142, 64, 98, 240, 49,\n 102, 64, 41, 73, 74, 212, 216, 207, 42, 74, 184, 169, 170, 211, 170, 149, 176, 105, 66, 69, 122, 6, 168, 123, 147, 187, 96, 77, 90, 65, 55, 107, 89,\n 90, 180, 101, 100, 120, 63, 105, 104, 93, 137, 227, 15, 86, 85, 129, 102, 49, 14, 87, 86, 55, 8, 9, 100, 47, 121, 145, 23, 22, 88, 89, 179, 6, 122,\n 196, 88, 95, 96, 138, 172, 136, 215, 58, 172, 115, 48, 219, 42, 80, 81, 195, 3, 51, 43, 146, 61, 171, 175, 199, 81, 82, 38, 53, 46, 225, 144, 163, 110,\n 246, 33, 7, 52, 65, 66, 229, 228, 117, 34, 127, 234, 107, 108, 69, 109, 108, 151, 48, 64, 235, 62, 78, 191, 129, 209, 126, 111, 35, 143, 163, 161, 246,\n 117, 123, 50, 222, 65, 52, 19, 125, 141, 221, 55, 65, 3, 195, 197, 25, 7, 33, 220, 237, 44, 70, 71, 139, 122, 193, 245, 247, 130, 33, 71, 21, 162,\n 153, 158, 159, 170, 169, 150, 188, 174, 196, 216, 186, 92, 144, 160, 161, 2, 97, 167, 141, 125, 241, 164, 167, 37, 72, 38, 12, 145, 159, 160, 38, 82, 13,\n 63, 68, 71, 226, 35, 111, 158, 153, 154, 101, 50, 205, 206, 92, 165, 209, 198, 217, 165, 167, 97, 220, 115, 218, 133, 112, 243, 239, 238, 241, 214,\n 135, 169, 190, 173, 133, 171, 208, 32, 125, 44, 237, 86, 87, 178, 85, 86, 179, 84, 85, 180, 83, 84, 181, 201, 83, 182, 137, 93, 132, 76, 62, 183, 61,\n 76, 184, 57, 61, 185, 212, 57, 186, 214, 207, 187, 34, 143, 156, 79, 239, 237, 123, 137, 177, 44, 1, 4, 201, 194, 32, 64, 102, 129, 213, 215, 138, 59,\n 166, 219, 242, 99, 97, 2, 94, 141, 75, 59, 235, 24, 110, 228, 25, 130, 226, 23, 24, 229, 22, 23, 230, 26, 22, 231, 112, 26, 232, 189, 190, 243, 221, 56,\n 190, 28, 56, 221, 27, 28, 222, 29, 27, 223, 30, 29, 224, 247, 30, 225, 238, 79, 20, 166, 59, 75, 60, 75, 240, 147, 177, 215, 20, 79, 166, 187, 147, 213,\n 112, 233, 244, 233, 128, 245, 128, 114, 188, 114, 217, 174, 131, 115, 220, 217, 198, 236, 198, 131, 134, 177, 132, 58, 143, 35, 124, 110, 163, 7, 228,\n 110, 25, 356, 389, 368, 11, 302, 267, 452, 350, 349, 302, 303, 269, 357, 343, 277, 452, 453, 357, 333, 332, 297, 175, 152, 377, 384, 398, 382, 347,\n 348, 330, 303, 304, 270, 9, 336, 337, 278, 279, 360, 418, 262, 431, 304, 408, 409, 310, 415, 407, 270, 409, 410, 450, 348, 347, 422, 430, 434, 313,\n 314, 17, 306, 307, 375, 387, 388, 260, 286, 414, 398, 335, 406, 418, 364, 367, 416, 423, 358, 327, 251, 284, 298, 281, 5, 4, 373, 374, 253, 307, 320,\n 321, 425, 427, 411, 421, 313, 18, 321, 405, 406, 320, 404, 405, 315, 16, 17, 426, 425, 266, 377, 400, 369, 322, 391, 269, 417, 465, 464, 386, 257, 258,\n 466, 260, 388, 456, 399, 419, 284, 332, 333, 417, 285, 8, 346, 340, 261, 413, 441, 285, 327, 460, 328, 355, 371, 329, 392, 439, 438, 382, 341, 256,\n 429, 420, 360, 364, 394, 379, 277, 343, 437, 443, 444, 283, 275, 440, 363, 431, 262, 369, 297, 338, 337, 273, 375, 321, 450, 451, 349, 446, 342, 467,\n 293, 334, 282, 458, 461, 462, 276, 353, 383, 308, 324, 325, 276, 300, 293, 372, 345, 447, 382, 398, 362, 352, 345, 340, 274, 1, 19, 456, 248, 281, 436,\n 427, 425, 381, 256, 252, 269, 391, 393, 200, 199, 428, 266, 330, 329, 287, 273, 422, 250, 462, 328, 258, 286, 384, 265, 353, 342, 387, 259, 257, 424,\n 431, 430, 342, 353, 276, 273, 335, 424, 292, 325, 307, 366, 447, 345, 271, 303, 302, 423, 266, 371, 294, 455, 460, 279, 278, 294, 271, 272, 304, 432,\n 434, 427, 272, 407, 408, 394, 430, 431, 395, 369, 400, 334, 333, 299, 351, 417, 168, 352, 280, 411, 325, 319, 320, 295, 296, 336, 319, 403, 404, 330,\n 348, 349, 293, 298, 333, 323, 454, 447, 15, 16, 315, 358, 429, 279, 14, 15, 316, 285, 336, 9, 329, 349, 350, 374, 380, 252, 318, 402, 403, 6, 197, 419,\n 318, 319, 325, 367, 364, 365, 435, 367, 397, 344, 438, 439, 272, 271, 311, 195, 5, 281, 273, 287, 291, 396, 428, 199, 311, 271, 268, 283, 444, 445,\n 373, 254, 339, 263, 466, 249, 282, 334, 296, 449, 347, 346, 264, 447, 454, 336, 296, 299, 338, 10, 151, 278, 439, 455, 292, 407, 415, 358, 371, 355,\n 340, 345, 372, 390, 249, 466, 346, 347, 280, 442, 443, 282, 19, 94, 370, 441, 442, 295, 248, 419, 197, 263, 255, 359, 440, 275, 274, 300, 383, 368,\n 351, 412, 465, 263, 467, 466, 301, 368, 389, 380, 374, 386, 395, 378, 379, 412, 351, 419, 436, 426, 322, 373, 390, 388, 2, 164, 393, 370, 462, 461,\n 164, 0, 267, 302, 11, 12, 374, 373, 387, 268, 12, 13, 293, 300, 301, 446, 261, 340, 385, 384, 381, 330, 266, 425, 426, 423, 391, 429, 355, 437, 391,\n 327, 326, 440, 457, 438, 341, 382, 362, 459, 457, 461, 434, 430, 394, 414, 463, 362, 396, 369, 262, 354, 461, 457, 316, 403, 402, 315, 404, 403, 314,\n 405, 404, 313, 406, 405, 421, 418, 406, 366, 401, 361, 306, 408, 407, 291, 409, 408, 287, 410, 409, 432, 436, 410, 434, 416, 411, 264, 368, 383, 309,\n 438, 457, 352, 376, 401, 274, 275, 4, 421, 428, 262, 294, 327, 358, 433, 416, 367, 289, 455, 439, 462, 370, 326, 2, 326, 370, 305, 460, 455, 254,\n 449, 448, 255, 261, 446, 253, 450, 449, 252, 451, 450, 256, 452, 451, 341, 453, 452, 413, 464, 463, 441, 413, 414, 258, 442, 441, 257, 443, 442, 259,\n 444, 443, 260, 445, 444, 467, 342, 445, 459, 458, 250, 289, 392, 290, 290, 328, 460, 376, 433, 435, 250, 290, 392, 411, 416, 433, 341, 463, 464, 453,\n 464, 465, 357, 465, 412, 343, 412, 399, 360, 363, 440, 437, 399, 456, 420, 456, 363, 401, 435, 288, 372, 383, 353, 339, 255, 249, 448, 261, 255, 133,\n 243, 190, 133, 155, 112, 33, 246, 247, 33, 130, 25, 398, 384, 286, 362, 398, 414, 362, 463, 341, 263, 359, 467, 263, 249, 255, 466, 467, 260, 75, 60,\n 166, 238, 239, 79, 162, 127, 139, 72, 11, 37, 121, 232, 120, 73, 72, 39, 114, 128, 47, 233, 232, 128, 103, 104, 67, 152, 175, 148, 173, 157, 155,\n 119, 118, 101, 74, 73, 40, 107, 9, 108, 49, 48, 131, 32, 194, 211, 184, 74, 185, 191, 80, 183, 185, 40, 186, 119, 230, 118, 210, 202, 214, 84, 83, 17,\n 77, 76, 146, 161, 160, 30, 190, 56, 173, 182, 106, 194, 138, 135, 192, 129, 203, 98, 54, 21, 68, 5, 51, 4, 145, 144, 23, 90, 77, 91, 207, 205, 187, 83,\n 201, 18, 181, 91, 182, 180, 90, 181, 16, 85, 17, 205, 206, 36, 176, 148, 140, 165, 92, 39, 245, 193, 244, 27, 159, 28, 30, 247, 161, 174, 236, 196,\n 103, 54, 104, 55, 193, 8, 111, 117, 31, 221, 189, 55, 240, 98, 99, 142, 126, 100, 219, 166, 218, 112, 155, 26, 198, 209, 131, 169, 135, 150, 114, 47,\n 217, 224, 223, 53, 220, 45, 134, 32, 211, 140, 109, 67, 108, 146, 43, 91, 231, 230, 120, 113, 226, 247, 105, 63, 52, 241, 238, 242, 124, 46, 156, 95,\n 78, 96, 70, 46, 63, 116, 143, 227, 116, 123, 111, 1, 44, 19, 3, 236, 51, 207, 216, 205, 26, 154, 22, 165, 39, 167, 199, 200, 208, 101, 36, 100, 43,\n 57, 202, 242, 20, 99, 56, 28, 157, 124, 35, 113, 29, 160, 27, 211, 204, 210, 124, 113, 46, 106, 43, 204, 96, 62, 77, 227, 137, 116, 73, 41, 72, 36, 203,\n 142, 235, 64, 240, 48, 49, 64, 42, 41, 74, 214, 212, 207, 183, 42, 184, 210, 169, 211, 140, 170, 176, 104, 105, 69, 193, 122, 168, 50, 123, 187, 89, 96,\n 90, 66, 65, 107, 179, 89, 180, 119, 101, 120, 68, 63, 104, 234, 93, 227, 16, 15, 85, 209, 129, 49, 15, 14, 86, 107, 55, 9, 120, 100, 121, 153, 145, 22,\n 178, 88, 179, 197, 6, 196, 89, 88, 96, 135, 138, 136, 138, 215, 172, 218, 115, 219, 41, 42, 81, 5, 195, 51, 57, 43, 61, 208, 171, 199, 41, 81, 38,\n 224, 53, 225, 24, 144, 110, 105, 52, 66, 118, 229, 117, 227, 34, 234, 66, 107, 69, 10, 109, 151, 219, 48, 235, 183, 62, 191, 142, 129, 126, 116, 111,\n 143, 7, 163, 246, 118, 117, 50, 223, 222, 52, 94, 19, 141, 222, 221, 65, 196, 3, 197, 45, 220, 44, 156, 70, 139, 188, 122, 245, 139, 71, 162, 145,\n 153, 159, 149, 170, 150, 122, 188, 196, 206, 216, 92, 163, 144, 161, 164, 2, 167, 242, 141, 241, 0, 164, 37, 11, 72, 12, 144, 145, 160, 12, 38, 13, 70,\n 63, 71, 31, 226, 111, 157, 158, 154, 36, 101, 205, 203, 206, 165, 126, 209, 217, 98, 165, 97, 237, 220, 218, 237, 239, 241, 210, 214, 169, 140, 171, 32,\n 241, 125, 237, 179, 86, 178, 180, 85, 179, 181, 84, 180, 182, 83, 181, 194, 201, 182, 177, 137, 132, 184, 76, 183, 185, 61, 184, 186, 57, 185, 216, 212,\n 186, 192, 214, 187, 139, 34, 156, 218, 79, 237, 147, 123, 177, 45, 44, 4, 208, 201, 32, 98, 64, 129, 192, 213, 138, 235, 59, 219, 141, 242, 97, 97, 2,\n 141, 240, 75, 235, 229, 24, 228, 31, 25, 226, 230, 23, 229, 231, 22, 230, 232, 26, 231, 233, 112, 232, 244, 189, 243, 189, 221, 190, 222, 28, 221,\n 223, 27, 222, 224, 29, 223, 225, 30, 224, 113, 247, 225, 99, 60, 240, 213, 147, 215, 60, 20, 166, 192, 187, 213, 243, 112, 244, 244, 233, 245, 245,\n 128, 188, 188, 114, 174, 134, 131, 220, 174, 217, 236, 236, 198, 134, 215, 177, 58, 156, 143, 124, 25, 110, 7, 31, 228, 25, 264, 356, 368, 0, 11, 267,\n 451, 452, 349, 267, 302, 269, 350, 357, 277, 350, 452, 357, 299, 333, 297, 396, 175, 377, 381, 384, 382, 280, 347, 330, 269, 303, 270, 151, 9, 337,\n 344, 278, 360, 424, 418, 431, 270, 304, 409, 272, 310, 407, 322, 270, 410, 449, 450, 347, 432, 422, 434, 18, 313, 17, 291, 306, 375, 259, 387, 260,\n 424, 335, 418, 434, 364, 416, 391, 423, 327, 301, 251, 298, 275, 281, 4, 254, 373, 253, 375, 307, 321, 280, 425, 411, 200, 421, 18, 335, 321, 406,\n 321, 320, 405, 314, 315, 17, 423, 426, 266, 396, 377, 369, 270, 322, 269, 413, 417, 464, 385, 386, 258, 248, 456, 419, 298, 284, 333, 168, 417, 8,\n 448, 346, 261, 417, 413, 285, 326, 327, 328, 277, 355, 329, 309, 392, 438, 381, 382, 256, 279, 429, 360, 365, 364, 379, 355, 277, 437, 282, 443, 283,\n 281, 275, 363, 395, 431, 369, 299, 297, 337, 335, 273, 321, 348, 450, 349, 359, 446, 467, 283, 293, 282, 250, 458, 462, 300, 276, 383, 292, 308, 325,\n 283, 276, 293, 264, 372, 447, 346, 352, 340, 354, 274, 19, 363, 456, 281, 426, 436, 425, 380, 381, 252, 267, 269, 393, 421, 200, 428, 371, 266, 329,\n 432, 287, 422, 290, 250, 328, 385, 258, 384, 446, 265, 342, 386, 387, 257, 422, 424, 430, 445, 342, 276, 422, 273, 424, 306, 292, 307, 352, 366, 345,\n 268, 271, 302, 358, 423, 371, 327, 294, 460, 331, 279, 294, 303, 271, 304, 436, 432, 427, 304, 272, 408, 395, 394, 431, 378, 395, 400, 296, 334, 299,\n 6, 351, 168, 376, 352, 411, 307, 325, 320, 285, 295, 336, 320, 319, 404, 329, 330, 349, 334, 293, 333, 366, 323, 447, 316, 15, 315, 331, 358, 279,\n 317, 14, 316, 8, 285, 9, 277, 329, 350, 253, 374, 252, 319, 318, 403, 351, 6, 419, 324, 318, 325, 397, 367, 365, 288, 435, 397, 278, 344, 439, 310,\n 272, 311, 248, 195, 281, 375, 273, 291, 175, 396, 199, 312, 311, 268, 276, 283, 445, 390, 373, 339, 295, 282, 296, 448, 449, 346, 356, 264, 454, 337,\n 336, 299, 337, 338, 151, 294, 278, 455, 308, 292, 415, 429, 358, 355, 265, 340, 372, 388, 390, 466, 352, 346, 280, 295, 442, 282, 354, 19, 370, 285,\n 441, 295, 195, 248, 197, 457, 440, 274, 301, 300, 368, 417, 351, 465, 251, 301, 389, 385, 380, 386, 394, 395, 379, 399, 412, 419, 410, 436, 322, 387,\n 373, 388, 326, 2, 393, 354, 370, 461, 393, 164, 267, 268, 302, 12, 386, 374, 387, 312, 268, 13, 298, 293, 301, 265, 446, 340, 380, 385, 381, 280, 330,\n 425, 322, 426, 391, 420, 429, 437, 393, 391, 326, 344, 440, 438, 458, 459, 461, 364, 434, 394, 428, 396, 262, 274, 354, 457, 317, 316, 402, 316, 315,\n 403, 315, 314, 404, 314, 313, 405, 313, 421, 406, 323, 366, 361, 292, 306, 407, 306, 291, 408, 291, 287, 409, 287, 432, 410, 427, 434, 411, 372, 264,\n 383, 459, 309, 457, 366, 352, 401, 1, 274, 4, 418, 421, 262, 331, 294, 358, 435, 433, 367, 392, 289, 439, 328, 462, 326, 94, 2, 370, 289, 305, 455, 339,\n 254, 448, 359, 255, 446, 254, 253, 449, 253, 252, 450, 252, 256, 451, 256, 341, 452, 414, 413, 463, 286, 441, 414, 286, 258, 441, 258, 257, 442, 257,\n 259, 443, 259, 260, 444, 260, 467, 445, 309, 459, 250, 305, 289, 290, 305, 290, 460, 401, 376, 435, 309, 250, 392, 376, 411, 433, 453, 341, 464, 357,\n 453, 465, 343, 357, 412, 437, 343, 399, 344, 360, 440, 420, 437, 456, 360, 420, 363, 361, 401, 288, 265, 372, 353, 390, 339, 249, 339, 448, 255];\n\nexport const TRI68: number[] = [0, 1, 36, 0, 36, 17, 1, 2, 41, 1, 41, 36, 2, 3, 31, 2, 31, 41, 3, 4, 48, 3, 48, 31, 4, 5, 48, 5, 6, 48, 6, 7, 59, 6, 59, 48, 7, 8, 58, 7, 58, 59,\n 8, 9, 56, 8, 56, 57, 8, 57, 58, 9, 10, 55, 9, 55, 56, 10, 11, 54, 10, 54, 55, 11, 12, 54, 12, 13, 54, 13, 14, 35, 13, 35, 54, 14, 15, 46, 14, 46, 35, 15, 16,\n 45, 15, 45, 46, 16, 26, 45, 17, 36, 18, 18, 37, 19, 18, 36, 37, 19, 38, 20, 19, 37, 38, 20, 39, 21, 20, 38, 39, 21, 39, 27, 22, 42, 23, 22, 27, 42, 23, 43, 24,\n 23, 42, 43, 24, 44, 25, 24, 43, 44, 25, 45, 26, 25, 44, 45, 27, 39, 28, 27, 28, 42, 28, 39, 29, 28, 29, 42, 29, 31, 30, 29, 30, 35, 29, 40, 31, 29, 35, 47, 29,\n 39, 40, 29, 47, 42, 30, 31, 32, 30, 32, 33, 30, 33, 34, 30, 34, 35, 31, 50, 32, 31, 40, 41, 31, 48, 49, 31, 49, 50, 32, 51, 33, 32, 50, 51, 33, 51, 34, 34, 52,\n 35, 34, 51, 52, 35, 46, 47, 35, 52, 53, 35, 53, 54, 36, 41, 37, 37, 40, 38, 37, 41, 40, 38, 40, 39, 42, 47, 43, 43, 47, 44, 44, 46, 45, 44, 47, 46, 48, 60, 49,\n 48, 59, 60, 49, 61, 50, 49, 60, 61, 50, 62, 51, 50, 61, 62, 51, 62, 52, 52, 63, 53, 52, 62, 63, 53, 64, 54, 53, 63, 64, 54, 64, 55, 55, 65, 56, 55, 64, 65, 56,\n 66, 57, 56, 65, 66, 57, 66, 58, 58, 67, 59, 58, 66, 67, 59, 67, 60, 60, 67, 61, 61, 66, 62, 61, 67, 66, 62, 66, 63, 63, 65, 64, 63, 66, 65, 21, 27, 22];\n\nexport const TRI33: number[] = [\n /* eyes */ 0, 8, 7, 7, 8, 1, 2, 10, 9, 9, 10, 3,\n /* brows */ 17, 0, 18, 18, 0, 7, 18, 7, 19, 19, 7, 1, 19, 1, 11, 19, 11, 20, 21, 3, 22, 21, 9, 3, 20, 9, 21, 20, 2, 9, 20, 11, 2,\n /* 4head */ 23, 17, 18, 25, 21, 22, 24, 19, 20, 24, 18, 19, 24, 20, 21, 24, 23, 18, 24, 21, 25,\n /* nose */ 11, 12, 4, 11, 4, 13, 1, 12, 11, 11, 13, 2, 12, 14, 4, 4, 14, 13,\n /* up-lip */ 14, 5, 15, 14, 15, 6, 12, 5, 14, 14, 6, 13,\n /* cheeks */ 8, 12, 1, 2, 13, 10, 8, 26, 12, 10, 13, 27, 26, 5, 12, 13, 6, 27, 0, 26, 8, 10, 27, 3,\n /* chin */ 5, 32, 16, 16, 32, 6, 5, 30, 32, 6, 32, 31,\n /* cont */ 26, 30, 5, 27, 6, 31, 0, 28, 26, 3, 27, 29, 17, 28, 0, 3, 29, 22, 23, 28, 17, 22, 29, 25, 28, 30, 26, 27, 31, 29,\n];\n\nexport const TRI7: number[] = [0, 4, 1, 2, 4, 3, 4, 5, 6];\n\nexport const VTX68: number[] = [\n /* cont */ 127, 234, 132, 58, 172, 150, 149, 148, 152, 377, 378, 379, 397, 288, 361, 454, 356,\n /* brows */ 70, 63, 105, 66, 107, 336, 296, 334, 293, 300,\n /* nose */ 168, 6, 195, 4, 98, 97, 2, 326, 327,\n /* eyes */ 33, 160, 158, 133, 153, 144, 362, 385, 387, 263, 373, 380,\n /* lip */ 57, 40, 37, 0, 267, 270, 287, 321, 314, 17, 84, 91,\n /* mouth */ 78, 81, 13, 311, 308, 402, 14, 178,\n];\n\nexport const VTX33: number[] = [33, 133, 362, 263, 1, 62, 308, 159, 145, 386, 374, 6, 102, 331, 2, 13, 14, 70, 105, 107, 336, 334, 300, 54, 10, 284, 50, 280, 234, 454, 58, 288, 152];\n\nexport const VTX7: number[] = [33, 133, 362, 263, 1, 78, 308];\n\nexport const UV68 = VTX68.map((x) => UV468[x]);\n\nexport const UV33 = VTX33.map((x) => UV468[x]);\n\nexport const UV7 = VTX7.map((x) => UV468[x]);\n\n// https://github.com/tensorflow/tfjs-models/blob/master/face-landmarks-detection/src/constants.ts\n// https://github.com/google/mediapipe/mediapipe/python/solutions/face_mesh_connections.py\n\ntype PairArray = [number, number][];\n\nfunction connectionsToIndices(connections: PairArray) {\n const indices = connections.map((connection) => connection[0]);\n indices.push(connections[connections.length - 1][1]);\n return indices;\n}\n\nexport const pairsLips: PairArray = [\n [61, 146], [146, 91], [91, 181], [181, 84], [84, 17], [17, 314], [314, 405], [405, 321], [321, 375], [375, 291], [61, 185], [185, 40], [40, 39], [39, 37], [37, 0], [0, 267], [267, 269], [269, 270], [270, 409], [409, 291],\n [78, 95], [95, 88], [88, 178], [178, 87], [87, 14], [14, 317], [317, 402], [402, 318], [318, 324], [324, 308], [78, 191], [191, 80], [80, 81], [81, 82], [82, 13], [13, 312], [312, 311], [311, 310], [310, 415], [415, 308],\n];\n\nexport const pairsLeftEye: PairArray = [[263, 249], [249, 390], [390, 373], [373, 374], [374, 380], [380, 381], [381, 382], [382, 362], [263, 466], [466, 388], [388, 387], [387, 386], [386, 385], [385, 384], [384, 398], [398, 362]];\n\nexport const pairsLeftEyebrow: PairArray = [[276, 283], [283, 282], [282, 295], [295, 285], [300, 293], [293, 334], [334, 296], [296, 336]];\n\nexport const pairsLeftIris: PairArray = [[474, 475], [475, 476], [476, 477], [477, 474]];\n\nexport const pairsRightEye: PairArray = [[33, 7], [7, 163], [163, 144], [144, 145], [145, 153], [153, 154], [154, 155], [155, 133], [33, 246], [246, 161], [161, 160], [160, 159], [159, 158], [158, 157], [157, 173], [173, 133]];\n\nexport const pairsRightEyebrow: PairArray = [[46, 53], [53, 52], [52, 65], [65, 55], [70, 63], [63, 105], [105, 66], [66, 107]];\n\nexport const pairsRightIris: PairArray = [[469, 470], [470, 471], [471, 472], [472, 469]];\n\nexport const pairsFaceContour: PairArray = [\n [10, 338], [338, 297], [297, 332], [332, 284], [284, 251], [251, 389],\n [389, 356], [356, 454], [454, 323], [323, 361], [361, 288], [288, 397],\n [397, 365], [365, 379], [379, 378], [378, 400], [400, 377], [377, 152],\n [152, 148], [148, 176], [176, 149], [149, 150], [150, 136], [136, 172],\n [172, 58], [58, 132], [132, 93], [93, 234], [234, 127], [127, 162],\n [162, 21], [21, 54], [54, 103], [103, 67], [67, 109], [109, 10],\n];\n\nexport const contourKeypoints = {\n lips: connectionsToIndices(pairsLips),\n leftEye: connectionsToIndices(pairsLeftEye),\n leftEyebrow: connectionsToIndices(pairsLeftEyebrow),\n leftIris: connectionsToIndices(pairsLeftIris),\n rightEye: connectionsToIndices(pairsRightEye),\n rightEyebrow: connectionsToIndices(pairsRightEyebrow),\n rightIris: connectionsToIndices(pairsRightIris),\n faceOval: connectionsToIndices(pairsFaceContour),\n};\n\nexport const pairsFaceMesh: PairArray = [\n [127, 34], [34, 139], [139, 127], [11, 0], [0, 37], [37, 11],\n [232, 231], [231, 120], [120, 232], [72, 37], [37, 39], [39, 72],\n [128, 121], [121, 47], [47, 128], [232, 121], [121, 128], [128, 232],\n [104, 69], [69, 67], [67, 104], [175, 171], [171, 148], [148, 175],\n [118, 50], [50, 101], [101, 118], [73, 39], [39, 40], [40, 73],\n [9, 151], [151, 108], [108, 9], [48, 115], [115, 131], [131, 48],\n [194, 204], [204, 211], [211, 194], [74, 40], [40, 185], [185, 74],\n [80, 42], [42, 183], [183, 80], [40, 92], [92, 186], [186, 40],\n [230, 229], [229, 118], [118, 230], [202, 212], [212, 214], [214, 202],\n [83, 18], [18, 17], [17, 83], [76, 61], [61, 146], [146, 76],\n [160, 29], [29, 30], [30, 160], [56, 157], [157, 173], [173, 56],\n [106, 204], [204, 194], [194, 106], [135, 214], [214, 192], [192, 135],\n [203, 165], [165, 98], [98, 203], [21, 71], [71, 68], [68, 21],\n [51, 45], [45, 4], [4, 51], [144, 24], [24, 23], [23, 144],\n [77, 146], [146, 91], [91, 77], [205, 50], [50, 187], [187, 205],\n [201, 200], [200, 18], [18, 201], [91, 106], [106, 182], [182, 91],\n [90, 91], [91, 181], [181, 90], [85, 84], [84, 17], [17, 85],\n [206, 203], [203, 36], [36, 206], [148, 171], [171, 140], [140, 148],\n [92, 40], [40, 39], [39, 92], [193, 189], [189, 244], [244, 193],\n [159, 158], [158, 28], [28, 159], [247, 246], [246, 161], [161, 247],\n [236, 3], [3, 196], [196, 236], [54, 68], [68, 104], [104, 54],\n [193, 168], [168, 8], [8, 193], [117, 228], [228, 31], [31, 117],\n [189, 193], [193, 55], [55, 189], [98, 97], [97, 99], [99, 98],\n [126, 47], [47, 100], [100, 126], [166, 79], [79, 218], [218, 166],\n [155, 154], [154, 26], [26, 155], [209, 49], [49, 131], [131, 209],\n [135, 136], [136, 150], [150, 135], [47, 126], [126, 217], [217, 47],\n [223, 52], [52, 53], [53, 223], [45, 51], [51, 134], [134, 45],\n [211, 170], [170, 140], [140, 211], [67, 69], [69, 108], [108, 67],\n [43, 106], [106, 91], [91, 43], [230, 119], [119, 120], [120, 230],\n [226, 130], [130, 247], [247, 226], [63, 53], [53, 52], [52, 63],\n [238, 20], [20, 242], [242, 238], [46, 70], [70, 156], [156, 46],\n [78, 62], [62, 96], [96, 78], [46, 53], [53, 63], [63, 46],\n [143, 34], [34, 227], [227, 143], [123, 117], [117, 111], [111, 123],\n [44, 125], [125, 19], [19, 44], [236, 134], [134, 51], [51, 236],\n [216, 206], [206, 205], [205, 216], [154, 153], [153, 22], [22, 154],\n [39, 37], [37, 167], [167, 39], [200, 201], [201, 208], [208, 200],\n [36, 142], [142, 100], [100, 36], [57, 212], [212, 202], [202, 57],\n [20, 60], [60, 99], [99, 20], [28, 158], [158, 157], [157, 28],\n [35, 226], [226, 113], [113, 35], [160, 159], [159, 27], [27, 160],\n [204, 202], [202, 210], [210, 204], [113, 225], [225, 46], [46, 113],\n [43, 202], [202, 204], [204, 43], [62, 76], [76, 77], [77, 62],\n [137, 123], [123, 116], [116, 137], [41, 38], [38, 72], [72, 41],\n [203, 129], [129, 142], [142, 203], [64, 98], [98, 240], [240, 64],\n [49, 102], [102, 64], [64, 49], [41, 73], [73, 74], [74, 41],\n [212, 216], [216, 207], [207, 212], [42, 74], [74, 184], [184, 42],\n [169, 170], [170, 211], [211, 169], [170, 149], [149, 176], [176, 170],\n [105, 66], [66, 69], [69, 105], [122, 6], [6, 168], [168, 122],\n [123, 147], [147, 187], [187, 123], [96, 77], [77, 90], [90, 96],\n [65, 55], [55, 107], [107, 65], [89, 90], [90, 180], [180, 89],\n [101, 100], [100, 120], [120, 101], [63, 105], [105, 104], [104, 63],\n [93, 137], [137, 227], [227, 93], [15, 86], [86, 85], [85, 15],\n [129, 102], [102, 49], [49, 129], [14, 87], [87, 86], [86, 14],\n [55, 8], [8, 9], [9, 55], [100, 47], [47, 121], [121, 100],\n [145, 23], [23, 22], [22, 145], [88, 89], [89, 179], [179, 88],\n [6, 122], [122, 196], [196, 6], [88, 95], [95, 96], [96, 88],\n [138, 172], [172, 136], [136, 138], [215, 58], [58, 172], [172, 215],\n [115, 48], [48, 219], [219, 115], [42, 80], [80, 81], [81, 42],\n [195, 3], [3, 51], [51, 195], [43, 146], [146, 61], [61, 43],\n [171, 175], [175, 199], [199, 171], [81, 82], [82, 38], [38, 81],\n [53, 46], [46, 225], [225, 53], [144, 163], [163, 110], [110, 144],\n [52, 65], [65, 66], [66, 52], [229, 228], [228, 117], [117, 229],\n [34, 127], [127, 234], [234, 34], [107, 108], [108, 69], [69, 107],\n [109, 108], [108, 151], [151, 109], [48, 64], [64, 235], [235, 48],\n [62, 78], [78, 191], [191, 62], [129, 209], [209, 126], [126, 129],\n [111, 35], [35, 143], [143, 111], [117, 123], [123, 50], [50, 117],\n [222, 65], [65, 52], [52, 222], [19, 125], [125, 141], [141, 19],\n [221, 55], [55, 65], [65, 221], [3, 195], [195, 197], [197, 3],\n [25, 7], [7, 33], [33, 25], [220, 237], [237, 44], [44, 220],\n [70, 71], [71, 139], [139, 70], [122, 193], [193, 245], [245, 122],\n [247, 130], [130, 33], [33, 247], [71, 21], [21, 162], [162, 71],\n [170, 169], [169, 150], [150, 170], [188, 174], [174, 196], [196, 188],\n [216, 186], [186, 92], [92, 216], [2, 97], [97, 167], [167, 2],\n [141, 125], [125, 241], [241, 141], [164, 167], [167, 37], [37, 164],\n [72, 38], [38, 12], [12, 72], [38, 82], [82, 13], [13, 38],\n [63, 68], [68, 71], [71, 63], [226, 35], [35, 111], [111, 226],\n [101, 50], [50, 205], [205, 101], [206, 92], [92, 165], [165, 206],\n [209, 198], [198, 217], [217, 209], [165, 167], [167, 97], [97, 165],\n [220, 115], [115, 218], [218, 220], [133, 112], [112, 243], [243, 133],\n [239, 238], [238, 241], [241, 239], [214, 135], [135, 169], [169, 214],\n [190, 173], [173, 133], [133, 190], [171, 208], [208, 32], [32, 171],\n [125, 44], [44, 237], [237, 125], [86, 87], [87, 178], [178, 86],\n [85, 86], [86, 179], [179, 85], [84, 85], [85, 180], [180, 84],\n [83, 84], [84, 181], [181, 83], [201, 83], [83, 182], [182, 201],\n [137, 93], [93, 132], [132, 137], [76, 62], [62, 183], [183, 76],\n [61, 76], [76, 184], [184, 61], [57, 61], [61, 185], [185, 57],\n [212, 57], [57, 186], [186, 212], [214, 207], [207, 187], [187, 214],\n [34, 143], [143, 156], [156, 34], [79, 239], [239, 237], [237, 79],\n [123, 137], [137, 177], [177, 123], [44, 1], [1, 4], [4, 44],\n [201, 194], [194, 32], [32, 201], [64, 102], [102, 129], [129, 64],\n [213, 215], [215, 138], [138, 213], [59, 166], [166, 219], [219, 59],\n [242, 99], [99, 97], [97, 242], [2, 94], [94, 141], [141, 2],\n [75, 59], [59, 235], [235, 75], [24, 110], [110, 228], [228, 24],\n [25, 130], [130, 226], [226, 25], [23, 24], [24, 229], [229, 23],\n [22, 23], [23, 230], [230, 22], [26, 22], [22, 231], [231, 26],\n [112, 26], [26, 232], [232, 112], [189, 190], [190, 243], [243, 189],\n [221, 56], [56, 190], [190, 221], [28, 56], [56, 221], [221, 28],\n [27, 28], [28, 222], [222, 27], [29, 27], [27, 223], [223, 29],\n [30, 29], [29, 224], [224, 30], [247, 30], [30, 225], [225, 247],\n [238, 79], [79, 20], [20, 238], [166, 59], [59, 75], [75, 166],\n [60, 75], [75, 240], [240, 60], [147, 177], [177, 215], [215, 147],\n [20, 79], [79, 166], [166, 20], [187, 147], [147, 213], [213, 187],\n [112, 233], [233, 244], [244, 112], [233, 128], [128, 245], [245, 233],\n [128, 114], [114, 188], [188, 128], [114, 217], [217, 174], [174, 114],\n [131, 115], [115, 220], [220, 131], [217, 198], [198, 236], [236, 217],\n [198, 131], [131, 134], [134, 198], [177, 132], [132, 58], [58, 177],\n [143, 35], [35, 124], [124, 143], [110, 163], [163, 7], [7, 110],\n [228, 110], [110, 25], [25, 228], [356, 389], [389, 368], [368, 356],\n [11, 302], [302, 267], [267, 11], [452, 350], [350, 349], [349, 452],\n [302, 303], [303, 269], [269, 302], [357, 343], [343, 277], [277, 357],\n [452, 453], [453, 357], [357, 452], [333, 332], [332, 297], [297, 333],\n [175, 152], [152, 377], [377, 175], [347, 348], [348, 330], [330, 347],\n [303, 304], [304, 270], [270, 303], [9, 336], [336, 337], [337, 9],\n [278, 279], [279, 360], [360, 278], [418, 262], [262, 431], [431, 418],\n [304, 408], [408, 409], [409, 304], [310, 415], [415, 407], [407, 310],\n [270, 409], [409, 410], [410, 270], [450, 348], [348, 347], [347, 450],\n [422, 430], [430, 434], [434, 422], [313, 314], [314, 17], [17, 313],\n [306, 307], [307, 375], [375, 306], [387, 388], [388, 260], [260, 387],\n [286, 414], [414, 398], [398, 286], [335, 406], [406, 418], [418, 335],\n [364, 367], [367, 416], [416, 364], [423, 358], [358, 327], [327, 423],\n [251, 284], [284, 298], [298, 251], [281, 5], [5, 4], [4, 281],\n [373, 374], [374, 253], [253, 373], [307, 320], [320, 321], [321, 307],\n [425, 427], [427, 411], [411, 425], [421, 313], [313, 18], [18, 421],\n [321, 405], [405, 406], [406, 321], [320, 404], [404, 405], [405, 320],\n [315, 16], [16, 17], [17, 315], [426, 425], [425, 266], [266, 426],\n [377, 400], [400, 369], [369, 377], [322, 391], [391, 269], [269, 322],\n [417, 465], [465, 464], [464, 417], [386, 257], [257, 258], [258, 386],\n [466, 260], [260, 388], [388, 466], [456, 399], [399, 419], [419, 456],\n [284, 332], [332, 333], [333, 284], [417, 285], [285, 8], [8, 417],\n [346, 340], [340, 261], [261, 346], [413, 441], [441, 285], [285, 413],\n [327, 460], [460, 328], [328, 327], [355, 371], [371, 329], [329, 355],\n [392, 439], [439, 438], [438, 392], [382, 341], [341, 256], [256, 382],\n [429, 420], [420, 360], [360, 429], [364, 394], [394, 379], [379, 364],\n [277, 343], [343, 437], [437, 277], [443, 444], [444, 283], [283, 443],\n [275, 440], [440, 363], [363, 275], [431, 262], [262, 369], [369, 431],\n [297, 338], [338, 337], [337, 297], [273, 375], [375, 321], [321, 273],\n [450, 451], [451, 349], [349, 450], [446, 342], [342, 467], [467, 446],\n [293, 334], [334, 282], [282, 293], [458, 461], [461, 462], [462, 458],\n [276, 353], [353, 383], [383, 276], [308, 324], [324, 325], [325, 308],\n [276, 300], [300, 293], [293, 276], [372, 345], [345, 447], [447, 372],\n [352, 345], [345, 340], [340, 352], [274, 1], [1, 19], [19, 274],\n [456, 248], [248, 281], [281, 456], [436, 427], [427, 425], [425, 436],\n [381, 256], [256, 252], [252, 381], [269, 391], [391, 393], [393, 269],\n [200, 199], [199, 428], [428, 200], [266, 330], [330, 329], [329, 266],\n [287, 273], [273, 422], [422, 287], [250, 462], [462, 328], [328, 250],\n [258, 286], [286, 384], [384, 258], [265, 353], [353, 342], [342, 265],\n [387, 259], [259, 257], [257, 387], [424, 431], [431, 430], [430, 424],\n [342, 353], [353, 276], [276, 342], [273, 335], [335, 424], [424, 273],\n [292, 325], [325, 307], [307, 292], [366, 447], [447, 345], [345, 366],\n [271, 303], [303, 302], [302, 271], [423, 266], [266, 371], [371, 423],\n [294, 455], [455, 460], [460, 294], [279, 278], [278, 294], [294, 279],\n [271, 272], [272, 304], [304, 271], [432, 434], [434, 427], [427, 432],\n [272, 407], [407, 408], [408, 272], [394, 430], [430, 431], [431, 394],\n [395, 369], [369, 400], [400, 395], [334, 333], [333, 299], [299, 334],\n [351, 417], [417, 168], [168, 351], [352, 280], [280, 411], [411, 352],\n [325, 319], [319, 320], [320, 325], [295, 296], [296, 336], [336, 295],\n [319, 403], [403, 404], [404, 319], [330, 348], [348, 349], [349, 330],\n [293, 298], [298, 333], [333, 293], [323, 454], [454, 447], [447, 323],\n [15, 16], [16, 315], [315, 15], [358, 429], [429, 279], [279, 358],\n [14, 15], [15, 316], [316, 14], [285, 336], [336, 9], [9, 285],\n [329, 349], [349, 350], [350, 329], [374, 380], [380, 252], [252, 374],\n [318, 402], [402, 403], [403, 318], [6, 197], [197, 419], [419, 6],\n [318, 319], [319, 325], [325, 318], [367, 364], [364, 365], [365, 367],\n [435, 367], [367, 397], [397, 435], [344, 438], [438, 439], [439, 344],\n [272, 271], [271, 311], [311, 272], [195, 5], [5, 281], [281, 195],\n [273, 287], [287, 291], [291, 273], [396, 428], [428, 199], [199, 396],\n [311, 271], [271, 268], [268, 311], [283, 444], [444, 445], [445, 283],\n [373, 254], [254, 339], [339, 373], [282, 334], [334, 296], [296, 282],\n [449, 347], [347, 346], [346, 449], [264, 447], [447, 454], [454, 264],\n [336, 296], [296, 299], [299, 336], [338, 10], [10, 151], [151, 338],\n [278, 439], [439, 455], [455, 278], [292, 407], [407, 415], [415, 292],\n [358, 371], [371, 355], [355, 358], [340, 345], [345, 372], [372, 340],\n [346, 347], [347, 280], [280, 346], [442, 443], [443, 282], [282, 442],\n [19, 94], [94, 370], [370, 19], [441, 442], [442, 295], [295, 441],\n [248, 419], [419, 197], [197, 248], [263, 255], [255, 359], [359, 263],\n [440, 275], [275, 274], [274, 440], [300, 383], [383, 368], [368, 300],\n [351, 412], [412, 465], [465, 351], [263, 467], [467, 466], [466, 263],\n [301, 368], [368, 389], [389, 301], [395, 378], [378, 379], [379, 395],\n [412, 351], [351, 419], [419, 412], [436, 426], [426, 322], [322, 436],\n [2, 164], [164, 393], [393, 2], [370, 462], [462, 461], [461, 370],\n [164, 0], [0, 267], [267, 164], [302, 11], [11, 12], [12, 302],\n [268, 12], [12, 13], [13, 268], [293, 300], [300, 301], [301, 293],\n [446, 261], [261, 340], [340, 446], [330, 266], [266, 425], [425, 330],\n [426, 423], [423, 391], [391, 426], [429, 355], [355, 437], [437, 429],\n [391, 327], [327, 326], [326, 391], [440, 457], [457, 438], [438, 440],\n [341, 382], [382, 362], [362, 341], [459, 457], [457, 461], [461, 459],\n [434, 430], [430, 394], [394, 434], [414, 463], [463, 362], [362, 414],\n [396, 369], [369, 262], [262, 396], [354, 461], [461, 457], [457, 354],\n [316, 403], [403, 402], [402, 316], [315, 404], [404, 403], [403, 315],\n [314, 405], [405, 404], [404, 314], [313, 406], [406, 405], [405, 313],\n [421, 418], [418, 406], [406, 421], [366, 401], [401, 361], [361, 366],\n [306, 408], [408, 407], [407, 306], [291, 409], [409, 408], [408, 291],\n [287, 410], [410, 409], [409, 287], [432, 436], [436, 410], [410, 432],\n [434, 416], [416, 411], [411, 434], [264, 368], [368, 383], [383, 264],\n [309, 438], [438, 457], [457, 309], [352, 376], [376, 401], [401, 352],\n [274, 275], [275, 4], [4, 274], [421, 428], [428, 262], [262, 421],\n [294, 327], [327, 358], [358, 294], [433, 416], [416, 367], [367, 433],\n [289, 455], [455, 439], [439, 289], [462, 370], [370, 326], [326, 462],\n [2, 326], [326, 370], [370, 2], [305, 460], [460, 455], [455, 305],\n [254, 449], [449, 448], [448, 254], [255, 261], [261, 446], [446, 255],\n [253, 450], [450, 449], [449, 253], [252, 451], [451, 450], [450, 252],\n [256, 452], [452, 451], [451, 256], [341, 453], [453, 452], [452, 341],\n [413, 464], [464, 463], [463, 413], [441, 413], [413, 414], [414, 441],\n [258, 442], [442, 441], [441, 258], [257, 443], [443, 442], [442, 257],\n [259, 444], [444, 443], [443, 259], [260, 445], [445, 444], [444, 260],\n [467, 342], [342, 445], [445, 467], [459, 458], [458, 250], [250, 459],\n [289, 392], [392, 290], [290, 289], [290, 328], [328, 460], [460, 290],\n [376, 433], [433, 435], [435, 376], [250, 290], [290, 392], [392, 250],\n [411, 416], [416, 433], [433, 411], [341, 463], [463, 464], [464, 341],\n [453, 464], [464, 465], [465, 453], [357, 465], [465, 412], [412, 357],\n [343, 412], [412, 399], [399, 343], [360, 363], [363, 440], [440, 360],\n [437, 399], [399, 456], [456, 437], [420, 456], [456, 363], [363, 420],\n [401, 435], [435, 288], [288, 401], [372, 383], [383, 353], [353, 372],\n [339, 255], [255, 249], [249, 339], [448, 261], [261, 255], [255, 448],\n [133, 243], [243, 190], [190, 133], [133, 155], [155, 112], [112, 133],\n [33, 246], [246, 247], [247, 33], [33, 130], [130, 25], [25, 33],\n [398, 384], [384, 286], [286, 398], [362, 398], [398, 414], [414, 362],\n [362, 463], [463, 341], [341, 362], [263, 359], [359, 467], [467, 263],\n [263, 249], [249, 255], [255, 263], [466, 467], [467, 260], [260, 466],\n [75, 60], [60, 166], [166, 75], [238, 239], [239, 79], [79, 238],\n [162, 127], [127, 139], [139, 162], [72, 11], [11, 37], [37, 72],\n [121, 232], [232, 120], [120, 121], [73, 72], [72, 39], [39, 73],\n [114, 128], [128, 47], [47, 114], [233, 232], [232, 128], [128, 233],\n [103, 104], [104, 67], [67, 103], [152, 175], [175, 148], [148, 152],\n [119, 118], [118, 101], [101, 119], [74, 73], [73, 40], [40, 74],\n [107, 9], [9, 108], [108, 107], [49, 48], [48, 131], [131, 49],\n [32, 194], [194, 211], [211, 32], [184, 74], [74, 185], [185, 184],\n [191, 80], [80, 183], [183, 191], [185, 40], [40, 186], [186, 185],\n [119, 230], [230, 118], [118, 119], [210, 202], [202, 214], [214, 210],\n [84, 83], [83, 17], [17, 84], [77, 76], [76, 146], [146, 77],\n [161, 160], [160, 30], [30, 161], [190, 56], [56, 173], [173, 190],\n [182, 106], [106, 194], [194, 182], [138, 135], [135, 192], [192, 138],\n [129, 203], [203, 98], [98, 129], [54, 21], [21, 68], [68, 54],\n [5, 51], [51, 4], [4, 5], [145, 144], [144, 23], [23, 145],\n [90, 77], [77, 91], [91, 90], [207, 205], [205, 187], [187, 207],\n [83, 201], [201, 18], [18, 83], [181, 91], [91, 182], [182, 181],\n [180, 90], [90, 181], [181, 180], [16, 85], [85, 17], [17, 16],\n [205, 206], [206, 36], [36, 205], [176, 148], [148, 140], [140, 176],\n [165, 92], [92, 39], [39, 165], [245, 193], [193, 244], [244, 245],\n [27, 159], [159, 28], [28, 27], [30, 247], [247, 161], [161, 30],\n [174, 236], [236, 196], [196, 174], [103, 54], [54, 104], [104, 103],\n [55, 193], [193, 8], [8, 55], [111, 117], [117, 31], [31, 111],\n [221, 189], [189, 55], [55, 221], [240, 98], [98, 99], [99, 240],\n [142, 126], [126, 100], [100, 142], [219, 166], [166, 218], [218, 219],\n [112, 155], [155, 26], [26, 112], [198, 209], [209, 131], [131, 198],\n [169, 135], [135, 150], [150, 169], [114, 47], [47, 217], [217, 114],\n [224, 223], [223, 53], [53, 224], [220, 45], [45, 134], [134, 220],\n [32, 211], [211, 140], [140, 32], [109, 67], [67, 108], [108, 109],\n [146, 43], [43, 91], [91, 146], [231, 230], [230, 120], [120, 231],\n [113, 226], [226, 247], [247, 113], [105, 63], [63, 52], [52, 105],\n [241, 238], [238, 242], [242, 241], [124, 46], [46, 156], [156, 124],\n [95, 78], [78, 96], [96, 95], [70, 46], [46, 63], [63, 70],\n [116, 143], [143, 227], [227, 116], [116, 123], [123, 111], [111, 116],\n [1, 44], [44, 19], [19, 1], [3, 236], [236, 51], [51, 3],\n [207, 216], [216, 205], [205, 207], [26, 154], [154, 22], [22, 26],\n [165, 39], [39, 167], [167, 165], [199, 200], [200, 208], [208, 199],\n [101, 36], [36, 100], [100, 101], [43, 57], [57, 202], [202, 43],\n [242, 20], [20, 99], [99, 242], [56, 28], [28, 157], [157, 56],\n [124, 35], [35, 113], [113, 124], [29, 160], [160, 27], [27, 29],\n [211, 204], [204, 210], [210, 211], [124, 113], [113, 46], [46, 124],\n [106, 43], [43, 204], [204, 106], [96, 62], [62, 77], [77, 96],\n [227, 137], [137, 116], [116, 227], [73, 41], [41, 72], [72, 73],\n [36, 203], [203, 142], [142, 36], [235, 64], [64, 240], [240, 235],\n [48, 49], [49, 64], [64, 48], [42, 41], [41, 74], [74, 42],\n [214, 212], [212, 207], [207, 214], [183, 42], [42, 184], [184, 183],\n [210, 169], [169, 211], [211, 210], [140, 170], [170, 176], [176, 140],\n [104, 105], [105, 69], [69, 104], [193, 122], [122, 168], [168, 193],\n [50, 123], [123, 187], [187, 50], [89, 96], [96, 90], [90, 89],\n [66, 65], [65, 107], [107, 66], [179, 89], [89, 180], [180, 179],\n [119, 101], [101, 120], [120, 119], [68, 63], [63, 104], [104, 68],\n [234, 93], [93, 227], [227, 234], [16, 15], [15, 85], [85, 16],\n [209, 129], [129, 49], [49, 209], [15, 14], [14, 86], [86, 15],\n [107, 55], [55, 9], [9, 107], [120, 100], [100, 121], [121, 120],\n [153, 145], [145, 22], [22, 153], [178, 88], [88, 179], [179, 178],\n [197, 6], [6, 196], [196, 197], [89, 88], [88, 96], [96, 89],\n [135, 138], [138, 136], [136, 135], [138, 215], [215, 172], [172, 138],\n [218, 115], [115, 219], [219, 218], [41, 42], [42, 81], [81, 41],\n [5, 195], [195, 51], [51, 5], [57, 43], [43, 61], [61, 57],\n [208, 171], [171, 199], [199, 208], [41, 81], [81, 38], [38, 41],\n [224, 53], [53, 225], [225, 224], [24, 144], [144, 110], [110, 24],\n [105, 52], [52, 66], [66, 105], [118, 229], [229, 117], [117, 118],\n [227, 34], [34, 234], [234, 227], [66, 107], [107, 69], [69, 66],\n [10, 109], [109, 151], [151, 10], [219, 48], [48, 235], [235, 219],\n [183, 62], [62, 191], [191, 183], [142, 129], [129, 126], [126, 142],\n [116, 111], [111, 143], [143, 116], [118, 117], [117, 50], [50, 118],\n [223, 222], [222, 52], [52, 223], [94, 19], [19, 141], [141, 94],\n [222, 221], [221, 65], [65, 222], [196, 3], [3, 197], [197, 196],\n [45, 220], [220, 44], [44, 45], [156, 70], [70, 139], [139, 156],\n [188, 122], [122, 245], [245, 188], [139, 71], [71, 162], [162, 139],\n [149, 170], [170, 150], [150, 149], [122, 188], [188, 196], [196, 122],\n [206, 216], [216, 92], [92, 206], [164, 2], [2, 167], [167, 164],\n [242, 141], [141, 241], [241, 242], [0, 164], [164, 37], [37, 0],\n [11, 72], [72, 12], [12, 11], [12, 38], [38, 13], [13, 12],\n [70, 63], [63, 71], [71, 70], [31, 226], [226, 111], [111, 31],\n [36, 101], [101, 205], [205, 36], [203, 206], [206, 165], [165, 203],\n [126, 209], [209, 217], [217, 126], [98, 165], [165, 97], [97, 98],\n [237, 220], [220, 218], [218, 237], [237, 239], [239, 241], [241, 237],\n [210, 214], [214, 169], [169, 210], [140, 171], [171, 32], [32, 140],\n [241, 125], [125, 237], [237, 241], [179, 86], [86, 178], [178, 179],\n [180, 85], [85, 179], [179, 180], [181, 84], [84, 180], [180, 181],\n [182, 83], [83, 181], [181, 182], [194, 201], [201, 182], [182, 194],\n [177, 137], [137, 132], [132, 177], [184, 76], [76, 183], [183, 184],\n [185, 61], [61, 184], [184, 185], [186, 57], [57, 185], [185, 186],\n [216, 212], [212, 186], [186, 216], [192, 214], [214, 187], [187, 192],\n [139, 34], [34, 156], [156, 139], [218, 79], [79, 237], [237, 218],\n [147, 123], [123, 177], [177, 147], [45, 44], [44, 4], [4, 45],\n [208, 201], [201, 32], [32, 208], [98, 64], [64, 129], [129, 98],\n [192, 213], [213, 138], [138, 192], [235, 59], [59, 219], [219, 235],\n [141, 242], [242, 97], [97, 141], [97, 2], [2, 141], [141, 97],\n [240, 75], [75, 235], [235, 240], [229, 24], [24, 228], [228, 229],\n [31, 25], [25, 226], [226, 31], [230, 23], [23, 229], [229, 230],\n [231, 22], [22, 230], [230, 231], [232, 26], [26, 231], [231, 232],\n [233, 112], [112, 232], [232, 233], [244, 189], [189, 243], [243, 244],\n [189, 221], [221, 190], [190, 189], [222, 28], [28, 221], [221, 222],\n [223, 27], [27, 222], [222, 223], [224, 29], [29, 223], [223, 224],\n [225, 30], [30, 224], [224, 225], [113, 247], [247, 225], [225, 113],\n [99, 60], [60, 240], [240, 99], [213, 147], [147, 215], [215, 213],\n [60, 20], [20, 166], [166, 60], [192, 187], [187, 213], [213, 192],\n [243, 112], [112, 244], [244, 243], [244, 233], [233, 245], [245, 244],\n [245, 128], [128, 188], [188, 245], [188, 114], [114, 174], [174, 188],\n [134, 131], [131, 220], [220, 134], [174, 217], [217, 236], [236, 174],\n [236, 198], [198, 134], [134, 236], [215, 177], [177, 58], [58, 215],\n [156, 143], [143, 124], [124, 156], [25, 110], [110, 7], [7, 25],\n [31, 228], [228, 25], [25, 31], [264, 356], [356, 368], [368, 264],\n [0, 11], [11, 267], [267, 0], [451, 452], [452, 349], [349, 451],\n [267, 302], [302, 269], [269, 267], [350, 357], [357, 277], [277, 350],\n [350, 452], [452, 357], [357, 350], [299, 333], [333, 297], [297, 299],\n [396, 175], [175, 377], [377, 396], [280, 347], [347, 330], [330, 280],\n [269, 303], [303, 270], [270, 269], [151, 9], [9, 337], [337, 151],\n [344, 278], [278, 360], [360, 344], [424, 418], [418, 431], [431, 424],\n [270, 304], [304, 409], [409, 270], [272, 310], [310, 407], [407, 272],\n [322, 270], [270, 410], [410, 322], [449, 450], [450, 347], [347, 449],\n [432, 422], [422, 434], [434, 432], [18, 313], [313, 17], [17, 18],\n [291, 306], [306, 375], [375, 291], [259, 387], [387, 260], [260, 259],\n [424, 335], [335, 418], [418, 424], [434, 364], [364, 416], [416, 434],\n [391, 423], [423, 327], [327, 391], [301, 251], [251, 298], [298, 301],\n [275, 281], [281, 4], [4, 275], [254, 373], [373, 253], [253, 254],\n [375, 307], [307, 321], [321, 375], [280, 425], [425, 411], [411, 280],\n [200, 421], [421, 18], [18, 200], [335, 321], [321, 406], [406, 335],\n [321, 320], [320, 405], [405, 321], [314, 315], [315, 17], [17, 314],\n [423, 426], [426, 266], [266, 423], [396, 377], [377, 369], [369, 396],\n [270, 322], [322, 269], [269, 270], [413, 417], [417, 464], [464, 413],\n [385, 386], [386, 258], [258, 385], [248, 456], [456, 419], [419, 248],\n [298, 284], [284, 333], [333, 298], [168, 417], [417, 8], [8, 168],\n [448, 346], [346, 261], [261, 448], [417, 413], [413, 285], [285, 417],\n [326, 327], [327, 328], [328, 326], [277, 355], [355, 329], [329, 277],\n [309, 392], [392, 438], [438, 309], [381, 382], [382, 256], [256, 381],\n [279, 429], [429, 360], [360, 279], [365, 364], [364, 379], [379, 365],\n [355, 277], [277, 437], [437, 355], [282, 443], [443, 283], [283, 282],\n [281, 275], [275, 363], [363, 281], [395, 431], [431, 369], [369, 395],\n [299, 297], [297, 337], [337, 299], [335, 273], [273, 321], [321, 335],\n [348, 450], [450, 349], [349, 348], [359, 446], [446, 467], [467, 359],\n [283, 293], [293, 282], [282, 283], [250, 458], [458, 462], [462, 250],\n [300, 276], [276, 383], [383, 300], [292, 308], [308, 325], [325, 292],\n [283, 276], [276, 293], [293, 283], [264, 372], [372, 447], [447, 264],\n [346, 352], [352, 340], [340, 346], [354, 274], [274, 19], [19, 354],\n [363, 456], [456, 281], [281, 363], [426, 436], [436, 425], [425, 426],\n [380, 381], [381, 252], [252, 380], [267, 269], [269, 393], [393, 267],\n [421, 200], [200, 428], [428, 421], [371, 266], [266, 329], [329, 371],\n [432, 287], [287, 422], [422, 432], [290, 250], [250, 328], [328, 290],\n [385, 258], [258, 384], [384, 385], [446, 265], [265, 342], [342, 446],\n [386, 387], [387, 257], [257, 386], [422, 424], [424, 430], [430, 422],\n [445, 342], [342, 276], [276, 445], [422, 273], [273, 424], [424, 422],\n [306, 292], [292, 307], [307, 306], [352, 366], [366, 345], [345, 352],\n [268, 271], [271, 302], [302, 268], [358, 423], [423, 371], [371, 358],\n [327, 294], [294, 460], [460, 327], [331, 279], [279, 294], [294, 331],\n [303, 271], [271, 304], [304, 303], [436, 432], [432, 427], [427, 436],\n [304, 272], [272, 408], [408, 304], [395, 394], [394, 431], [431, 395],\n [378, 395], [395, 400], [400, 378], [296, 334], [334, 299], [299, 296],\n [6, 351], [351, 168], [168, 6], [376, 352], [352, 411], [411, 376],\n [307, 325], [325, 320], [320, 307], [285, 295], [295, 336], [336, 285],\n [320, 319], [319, 404], [404, 320], [329, 330], [330, 349], [349, 329],\n [334, 293], [293, 333], [333, 334], [366, 323], [323, 447], [447, 366],\n [316, 15], [15, 315], [315, 316], [331, 358], [358, 279], [279, 331],\n [317, 14], [14, 316], [316, 317], [8, 285], [285, 9], [9, 8],\n [277, 329], [329, 350], [350, 277], [253, 374], [374, 252], [252, 253],\n [319, 318], [318, 403], [403, 319], [351, 6], [6, 419], [419, 351],\n [324, 318], [318, 325], [325, 324], [397, 367], [367, 365], [365, 397],\n [288, 435], [435, 397], [397, 288], [278, 344], [344, 439], [439, 278],\n [310, 272], [272, 311], [311, 310], [248, 195], [195, 281], [281, 248],\n [375, 273], [273, 291], [291, 375], [175, 396], [396, 199], [199, 175],\n [312, 311], [311, 268], [268, 312], [276, 283], [283, 445], [445, 276],\n [390, 373], [373, 339], [339, 390], [295, 282], [282, 296], [296, 295],\n [448, 449], [449, 346], [346, 448], [356, 264], [264, 454], [454, 356],\n [337, 336], [336, 299], [299, 337], [337, 338], [338, 151], [151, 337],\n [294, 278], [278, 455], [455, 294], [308, 292], [292, 415], [415, 308],\n [429, 358], [358, 355], [355, 429], [265, 340], [340, 372], [372, 265],\n [352, 346], [346, 280], [280, 352], [295, 442], [442, 282], [282, 295],\n [354, 19], [19, 370], [370, 354], [285, 441], [441, 295], [295, 285],\n [195, 248], [248, 197], [197, 195], [457, 440], [440, 274], [274, 457],\n [301, 300], [300, 368], [368, 301], [417, 351], [351, 465], [465, 417],\n [251, 301], [301, 389], [389, 251], [394, 395], [395, 379], [379, 394],\n [399, 412], [412, 419], [419, 399], [410, 436], [436, 322], [322, 410],\n [326, 2], [2, 393], [393, 326], [354, 370], [370, 461], [461, 354],\n [393, 164], [164, 267], [267, 393], [268, 302], [302, 12], [12, 268],\n [312, 268], [268, 13], [13, 312], [298, 293], [293, 301], [301, 298],\n [265, 446], [446, 340], [340, 265], [280, 330], [330, 425], [425, 280],\n [322, 426], [426, 391], [391, 322], [420, 429], [429, 437], [437, 420],\n [393, 391], [391, 326], [326, 393], [344, 440], [440, 438], [438, 344],\n [458, 459], [459, 461], [461, 458], [364, 434], [434, 394], [394, 364],\n [428, 396], [396, 262], [262, 428], [274, 354], [354, 457], [457, 274],\n [317, 316], [316, 402], [402, 317], [316, 315], [315, 403], [403, 316],\n [315, 314], [314, 404], [404, 315], [314, 313], [313, 405], [405, 314],\n [313, 421], [421, 406], [406, 313], [323, 366], [366, 361], [361, 323],\n [292, 306], [306, 407], [407, 292], [306, 291], [291, 408], [408, 306],\n [291, 287], [287, 409], [409, 291], [287, 432], [432, 410], [410, 287],\n [427, 434], [434, 411], [411, 427], [372, 264], [264, 383], [383, 372],\n [459, 309], [309, 457], [457, 459], [366, 352], [352, 401], [401, 366],\n [1, 274], [274, 4], [4, 1], [418, 421], [421, 262], [262, 418],\n [331, 294], [294, 358], [358, 331], [435, 433], [433, 367], [367, 435],\n [392, 289], [289, 439], [439, 392], [328, 462], [462, 326], [326, 328],\n [94, 2], [2, 370], [370, 94], [289, 305], [305, 455], [455, 289],\n [339, 254], [254, 448], [448, 339], [359, 255], [255, 446], [446, 359],\n [254, 253], [253, 449], [449, 254], [253, 252], [252, 450], [450, 253],\n [252, 256], [256, 451], [451, 252], [256, 341], [341, 452], [452, 256],\n [414, 413], [413, 463], [463, 414], [286, 441], [441, 414], [414, 286],\n [286, 258], [258, 441], [441, 286], [258, 257], [257, 442], [442, 258],\n [257, 259], [259, 443], [443, 257], [259, 260], [260, 444], [444, 259],\n [260, 467], [467, 445], [445, 260], [309, 459], [459, 250], [250, 309],\n [305, 289], [289, 290], [290, 305], [305, 290], [290, 460], [460, 305],\n [401, 376], [376, 435], [435, 401], [309, 250], [250, 392], [392, 309],\n [376, 411], [411, 433], [433, 376], [453, 341], [341, 464], [464, 453],\n [357, 453], [453, 465], [465, 357], [343, 357], [357, 412], [412, 343],\n [437, 343], [343, 399], [399, 437], [344, 360], [360, 440], [440, 344],\n [420, 437], [437, 456], [456, 420], [360, 420], [420, 363], [363, 360],\n [361, 401], [401, 288], [288, 361], [265, 372], [372, 353], [353, 265],\n [390, 339], [339, 249], [249, 390], [339, 448], [448, 255], [255, 339],\n];\n", "import * as tf from '../../dist/tfjs.esm.js';\nimport type { Tensor } from './types';\n\nexport const constants: Record = {\n tf255: 255.0,\n tf1: 1.0,\n tf2: 2.0,\n tf05: 0.5,\n tf127: 127.5,\n rgb: [0.2989, 0.5870, 0.1140],\n};\n\nexport function init() {\n constants.tf255 = tf.scalar(255.0, 'float32');\n constants.tf1 = tf.scalar(1.0, 'float32');\n constants.tf2 = tf.scalar(2.0, 'float32');\n constants.tf05 = tf.scalar(0.5, 'float32');\n constants.tf127 = tf.scalar(127.5, 'float32');\n constants.rgb = tf.tensor1d([0.2989, 0.5870, 0.1140], 'float32'); // factors for red/green/blue colors when converting to grayscale\n}\n", "/**\n * BlazeFace, FaceMesh & Iris model implementation\n * See `facemesh.ts` for entry point\n */\n\nimport * as tf from '../../dist/tfjs.esm.js';\nimport * as coords from './facemeshcoords';\nimport { constants } from '../tfjs/constants';\nimport type { Box, Point } from '../result';\nimport { env } from '../util/env';\n\nexport const createBox = (startEndTensor) => ({ startPoint: tf.slice(startEndTensor, [0, 0], [-1, 2]), endPoint: tf.slice(startEndTensor, [0, 2], [-1, 2]) });\n\nexport const disposeBox = (t) => tf.dispose([t.startPoint, t.endPoint]);\n\nexport const getBoxSize = (box): [number, number] => [Math.abs(box.endPoint[0] - box.startPoint[0]), Math.abs(box.endPoint[1] - box.startPoint[1])];\n\nexport const getBoxCenter = (box): [number, number, number] => [box.startPoint[0] + (box.endPoint[0] - box.startPoint[0]) / 2, box.startPoint[1] + (box.endPoint[1] - box.startPoint[1]) / 2, 1];\n\nexport const clampBox = (box, input): Box => (box ? [\n Math.trunc(Math.max(0, box.startPoint[0])),\n Math.trunc(Math.max(0, box.startPoint[1])),\n Math.trunc(Math.min((input.shape[2] || 0), box.endPoint[0]) - Math.max(0, box.startPoint[0])),\n Math.trunc(Math.min((input.shape[1] || 0), box.endPoint[1]) - Math.max(0, box.startPoint[1])),\n] : [0, 0, 0, 0]);\n\nexport const getRawBox = (box, input): Box => (box ? [\n box.startPoint[0] / (input.shape[2] || 0),\n box.startPoint[1] / (input.shape[1] || 0),\n (box.endPoint[0] - box.startPoint[0]) / (input.shape[2] || 0),\n (box.endPoint[1] - box.startPoint[1]) / (input.shape[1] || 0),\n] : [0, 0, 0, 0]);\n\nexport const scaleBoxCoordinates = (box, factor) => {\n const startPoint: Point = [box.startPoint[0] * factor[0], box.startPoint[1] * factor[1]];\n const endPoint: Point = [box.endPoint[0] * factor[0], box.endPoint[1] * factor[1]];\n return { startPoint, endPoint, landmarks: box.landmarks, confidence: box.confidence };\n};\n\nexport const cutAndResize = (box, image, cropSize) => {\n const h = image.shape[1];\n const w = image.shape[2];\n const cutBox = [box.startPoint[1] / h, box.startPoint[0] / w, box.endPoint[1] / h, box.endPoint[0] / w];\n const crop = tf.image.cropAndResize(image, [cutBox], [0], cropSize);\n const norm = tf.div(crop, constants.tf255);\n tf.dispose(crop);\n return norm;\n};\n\nexport const enlargeBox = (box, factor) => {\n const center = getBoxCenter(box);\n const size = getBoxSize(box);\n const halfSize: [number, number] = [factor * size[0] / 2, factor * size[1] / 2];\n return { startPoint: [center[0] - halfSize[0], center[1] - halfSize[1]] as Point, endPoint: [center[0] + halfSize[0], center[1] + halfSize[1]] as Point, landmarks: box.landmarks, confidence: box.confidence };\n};\n\nexport const squarifyBox = (box) => {\n const centers = getBoxCenter(box);\n const size = getBoxSize(box);\n const halfSize = Math.max(...size) / 2;\n return { startPoint: [Math.round(centers[0] - halfSize), Math.round(centers[1] - halfSize)] as Point, endPoint: [Math.round(centers[0] + halfSize), Math.round(centers[1] + halfSize)] as Point, landmarks: box.landmarks, confidence: box.confidence };\n};\n\nexport const calculateLandmarksBoundingBox = (landmarks) => {\n const x = landmarks.map((d) => d[0]);\n const y = landmarks.map((d) => d[1]);\n return { startPoint: [Math.min(...x), Math.min(...y)] as Point, endPoint: [Math.max(...x), Math.max(...y)] as Point, landmarks };\n};\n\nexport const fixedRotationMatrix = [[1, 0, 0], [0, 1, 0], [0, 0, 1]];\n\nexport const normalizeRadians = (angle: number) => angle - 2 * Math.PI * Math.floor((angle + Math.PI) / (2 * Math.PI));\n\nexport const computeRotation = (point1, point2) => normalizeRadians(Math.PI / 2 - Math.atan2(-(point2[1] - point1[1]), point2[0] - point1[0]));\n\nexport const radToDegrees = (rad) => rad * 180 / Math.PI;\n\nexport const buildTranslationMatrix = (x, y) => [[1, 0, x], [0, 1, y], [0, 0, 1]];\n\nexport const dot = (v1: number[], v2: number[]) => {\n let product = 0;\n for (let i = 0; i < v1.length; i++) product += v1[i] * v2[i];\n return product;\n};\n\nexport const getColumnFrom2DArr = (arr, columnIndex) => {\n const column: number[] = [];\n for (let i = 0; i < arr.length; i++) column.push(arr[i][columnIndex]);\n return column;\n};\n\nexport const multiplyTransformMatrices = (mat1, mat2) => {\n const product: number[][] = [];\n const size = mat1.length;\n for (let row = 0; row < size; row++) {\n product.push([]);\n for (let col = 0; col < size; col++) product[row].push(dot(mat1[row], getColumnFrom2DArr(mat2, col)));\n }\n return product;\n};\n\nexport const buildRotationMatrix = (rotation, center) => {\n const cosA = Math.cos(rotation);\n const sinA = Math.sin(rotation);\n const rotationMatrix = [[cosA, -sinA, 0], [sinA, cosA, 0], [0, 0, 1]];\n const translationMatrix = buildTranslationMatrix(center[0], center[1]);\n const translationTimesRotation = multiplyTransformMatrices(translationMatrix, rotationMatrix);\n const negativeTranslationMatrix = buildTranslationMatrix(-center[0], -center[1]);\n return multiplyTransformMatrices(translationTimesRotation, negativeTranslationMatrix);\n};\n\nexport const invertTransformMatrix = (matrix) => {\n const rotationComponent = [[matrix[0][0], matrix[1][0]], [matrix[0][1], matrix[1][1]]];\n const translationComponent = [matrix[0][2], matrix[1][2]];\n const invertedTranslation = [-dot(rotationComponent[0], translationComponent), -dot(rotationComponent[1], translationComponent)];\n return [rotationComponent[0].concat(invertedTranslation[0]), rotationComponent[1].concat(invertedTranslation[1]), [0, 0, 1]];\n};\n\nexport const rotatePoint = (homogeneousCoordinate, rotationMatrix) => [dot(homogeneousCoordinate, rotationMatrix[0]), dot(homogeneousCoordinate, rotationMatrix[1])];\n\nexport const xyDistanceBetweenPoints = (a, b) => Math.sqrt(((a[0] - b[0]) ** 2) + ((a[1] - b[1]) ** 2));\n\nexport function generateAnchors(inputSize: number) {\n const spec = inputSize === 192\n ? { strides: [4], anchors: [1] } // facemesh-detector\n : { strides: [inputSize / 16, inputSize / 8], anchors: [2, 6] }; // blazeface\n const anchors: [number, number][] = [];\n for (let i = 0; i < spec.strides.length; i++) {\n const stride = spec.strides[i];\n const gridRows = Math.floor((inputSize + stride - 1) / stride);\n const gridCols = Math.floor((inputSize + stride - 1) / stride);\n const anchorsNum = spec.anchors[i];\n for (let gridY = 0; gridY < gridRows; gridY++) {\n const anchorY = stride * (gridY + 0.5);\n for (let gridX = 0; gridX < gridCols; gridX++) {\n const anchorX = stride * (gridX + 0.5);\n for (let n = 0; n < anchorsNum; n++) anchors.push([anchorX, anchorY]);\n }\n }\n }\n return anchors;\n}\n\nexport function transformRawCoords(coordsRaw, box, angle, rotationMatrix, inputSize) {\n const boxSize = getBoxSize(box);\n const coordsScaled = coordsRaw.map((coord) => ([ // scaled around zero-point\n (boxSize[0] / inputSize) * (coord[0] - (inputSize / 2)),\n (boxSize[1] / inputSize) * (coord[1] - (inputSize / 2)),\n (coord[2] || 0),\n ]));\n const largeAngle = angle && (angle !== 0) && (Math.abs(angle) > 0.2);\n const coordsRotationMatrix = largeAngle ? buildRotationMatrix(angle, [0, 0]) : fixedRotationMatrix;\n const coordsRotated = largeAngle ? coordsScaled.map((coord) => ([...rotatePoint(coord, coordsRotationMatrix), coord[2]])) : coordsScaled;\n const inverseRotationMatrix = largeAngle ? invertTransformMatrix(rotationMatrix) : fixedRotationMatrix;\n const boxCenter = getBoxCenter(box);\n const offsets = [dot(boxCenter, inverseRotationMatrix[0]), dot(boxCenter, inverseRotationMatrix[1])];\n return coordsRotated.map((coord) => ([\n Math.trunc(coord[0] + offsets[0]),\n Math.trunc(coord[1] + offsets[1]),\n Math.trunc(coord[2] || 0),\n ]));\n}\n\nexport function correctFaceRotation(rotate, box, input, inputSize) {\n const symmetryLine = (box.landmarks.length >= coords.meshLandmarks.count)\n ? coords.meshLandmarks.symmetryLine\n : coords.blazeFaceLandmarks.symmetryLine;\n let angle = 0; // default\n let rotationMatrix = fixedRotationMatrix; // default\n let face; // default\n\n if (rotate && env.kernels.includes('rotatewithoffset')) {\n angle = computeRotation(box.landmarks[symmetryLine[0]], box.landmarks[symmetryLine[1]]);\n const largeAngle = angle && (angle !== 0) && (Math.abs(angle) > 0.2);\n if (largeAngle) { // perform rotation only if angle is sufficiently high\n const center: Point = getBoxCenter(box);\n const centerRaw: Point = [center[0] / input.shape[2], center[1] / input.shape[1]];\n const rotated = tf.image.rotateWithOffset(input, angle, 0, centerRaw);\n rotationMatrix = buildRotationMatrix(-angle, center);\n face = cutAndResize(box, rotated, [inputSize, inputSize]);\n tf.dispose(rotated);\n } else {\n face = cutAndResize(box, input, [inputSize, inputSize]);\n }\n } else {\n face = cutAndResize(box, input, [inputSize, inputSize]);\n }\n return [angle, rotationMatrix, face];\n}\n\nexport const findFaceCenter = (mesh) => {\n const x = mesh.map((m) => m[0]);\n const y = mesh.map((m) => m[1]);\n // weighted center\n /*\n const sum = (arr: number[]) => arr.reduce((prev, curr) => prev + curr, 0);\n return [sum(x) / mesh.length, sum(y) / mesh.length];\n */\n // absolute center\n return [Math.min(...x) + (Math.max(...x) - Math.min(...x)) / 2, Math.min(...y) + (Math.max(...y) - Math.min(...y)) / 2];\n};\n\nexport const calculateFaceBox = (mesh, previousBox) => {\n const center = findFaceCenter(mesh);\n const boxSize = getBoxSize(previousBox);\n const calculatedBox = {\n startPoint: [center[0] - boxSize[0] / 2, center[1] - boxSize[1] / 2] as Point,\n endPoint: [center[0] + boxSize[0] / 2, center[1] + boxSize[1] / 2] as Point,\n };\n return calculatedBox;\n};\n", "/**\n * BlazeFace, FaceMesh & Iris model implementation\n * See `facemesh.ts` for entry point\n */\n\nimport { log } from '../util/util';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport * as util from './facemeshutil';\nimport { loadModel } from '../tfjs/load';\nimport { constants } from '../tfjs/constants';\nimport type { Config } from '../config';\nimport type { Tensor, GraphModel } from '../tfjs/types';\nimport { env } from '../util/env';\nimport type { Point } from '../result';\n\nconst keypointsCount = 6;\nconst faceBoxScaleFactor = 1.4;\nlet model: GraphModel | null;\nlet anchors: Tensor | null = null;\nlet inputSize = 0;\nlet inputSizeT: Tensor | null = null;\n\ninterface DetectBox { startPoint: Point, endPoint: Point, landmarks: Point[], confidence: number }\n\nexport const size = () => inputSize;\n\nexport async function load(config: Config): Promise {\n if (env.initial) model = null;\n if (!model) model = await loadModel(config.face.detector?.modelPath);\n else if (config.debug) log('cached model:', model['modelUrl']);\n inputSize = (model['executor'] && model.inputs[0].shape) ? model.inputs[0].shape[2] : 256;\n inputSizeT = tf.scalar(inputSize, 'int32') as Tensor;\n anchors = tf.tensor2d(util.generateAnchors(inputSize)) as Tensor;\n return model;\n}\n\nfunction decodeBoxes(boxOutputs: Tensor) {\n const t: Record = {};\n t.boxStarts = tf.slice(boxOutputs, [0, 1], [-1, 2]);\n t.centers = tf.add(t.boxStarts, anchors);\n t.boxSizes = tf.slice(boxOutputs, [0, 3], [-1, 2]);\n t.boxSizesNormalized = tf.div(t.boxSizes, inputSizeT);\n t.centersNormalized = tf.div(t.centers, inputSizeT);\n t.halfBoxSize = tf.div(t.boxSizesNormalized, constants.tf2);\n t.starts = tf.sub(t.centersNormalized, t.halfBoxSize);\n t.ends = tf.add(t.centersNormalized, t.halfBoxSize);\n t.startNormalized = tf.mul(t.starts, inputSizeT);\n t.endNormalized = tf.mul(t.ends, inputSizeT);\n const boxes = tf.concat2d([t.startNormalized, t.endNormalized], 1);\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n return boxes;\n}\n\nexport async function getBoxes(inputImage: Tensor, config: Config) {\n // sanity check on input\n if ((!inputImage) || (inputImage['isDisposedInternal']) || (inputImage.shape.length !== 4) || (inputImage.shape[1] < 1) || (inputImage.shape[2] < 1)) return [];\n const t: Record = {};\n t.resized = tf.image.resizeBilinear(inputImage, [inputSize, inputSize]);\n t.div = tf.div(t.resized, constants.tf127);\n t.normalized = tf.sub(t.div, constants.tf05);\n const res = model?.execute(t.normalized) as Tensor[];\n if (Array.isArray(res) && res.length > 2) { // pinto converted model?\n const sorted = res.sort((a, b) => a.size - b.size);\n t.concat384 = tf.concat([sorted[0], sorted[2]], 2); // dim: 384, 1 + 16\n t.concat512 = tf.concat([sorted[1], sorted[3]], 2); // dim: 512, 1 + 16\n t.concat = tf.concat([t.concat512, t.concat384], 1);\n t.batch = tf.squeeze(t.concat, 0);\n } else if (Array.isArray(res)) { // new facemesh-detection tfhub model\n t.batch = tf.squeeze(res[0]);\n } else { // original blazeface tfhub model\n t.batch = tf.squeeze(res);\n }\n tf.dispose(res);\n t.boxes = decodeBoxes(t.batch);\n t.logits = tf.slice(t.batch, [0, 0], [-1, 1]);\n t.sigmoid = tf.sigmoid(t.logits);\n t.scores = tf.squeeze(t.sigmoid);\n t.nms = await tf.image.nonMaxSuppressionAsync(t.boxes, t.scores, (config.face.detector?.maxDetected || 0), (config.face.detector?.iouThreshold || 0), (config.face.detector?.minConfidence || 0));\n const nms = await t.nms.array() as number[];\n const boxes: DetectBox[] = [];\n const scores = await t.scores.data();\n for (let i = 0; i < nms.length; i++) {\n const confidence = scores[nms[i]];\n if (confidence > (config.face.detector?.minConfidence || 0)) {\n const b: Record = {};\n b.bbox = tf.slice(t.boxes, [nms[i], 0], [1, -1]);\n b.slice = tf.slice(t.batch, [nms[i], keypointsCount - 1], [1, -1]);\n b.squeeze = tf.squeeze(b.slice);\n b.landmarks = tf.reshape(b.squeeze, [keypointsCount, -1]);\n const points = await b.bbox.data();\n const rawBox = {\n startPoint: [points[0], points[1]] as Point,\n endPoint: [points[2], points[3]] as Point,\n landmarks: (await b.landmarks.array()) as Point[],\n confidence,\n };\n const scaledBox = util.scaleBoxCoordinates(rawBox, [(inputImage.shape[2] || 0) / inputSize, (inputImage.shape[1] || 0) / inputSize]);\n const enlargedBox = util.enlargeBox(scaledBox, config.face['scale'] || faceBoxScaleFactor);\n const squaredBox = util.squarifyBox(enlargedBox);\n boxes.push(squaredBox);\n Object.keys(b).forEach((tensor) => tf.dispose(b[tensor]));\n }\n }\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n return boxes;\n}\n", "/* eslint-disable no-multi-spaces */\n\nexport const kpt: string[] = [\n 'nose', // 0\n 'leftEyeInside', // 1\n 'leftEye', // 2\n 'leftEyeOutside', // 3\n 'rightEyeInside', // 4\n 'rightEye', // 5\n 'rightEyeOutside', // 6\n 'leftEar', // 7\n 'rightEar', // 8\n 'leftMouth', // 9\n 'rightMouth', // 10\n 'leftShoulder', // 11\n 'rightShoulder', // 12\n 'leftElbow', // 13\n 'rightElbow', // 14\n 'leftWrist', // 15\n 'rightWrist', // 16\n 'leftPinky', // 17\n 'rightPinky', // 18\n 'leftIndex', // 19\n 'rightIndex', // 20\n 'leftThumb', // 21\n 'rightThumb', // 22\n 'leftHip', // 23\n 'rightHip', // 24\n 'leftKnee', // 25\n 'rightKnee', // 26\n 'leftAnkle', // 27\n 'rightAnkle', // 28\n 'leftHeel', // 29\n 'rightHeel', // 30\n 'leftFoot', // 31\n 'rightFoot', // 32\n 'bodyCenter', // 33\n 'bodyTop', // 34\n 'leftPalm', // 35 // z-coord not ok\n 'leftHand', // 36 // similar to wrist but z-coord not ok\n 'rightPalm', // 37 // z-coord not ok\n 'rightHand', // 38 // similar to wrist but z-coord not ok\n];\n\nexport const connected: Record = {\n shoulders: ['leftShoulder', 'rightShoulder'],\n hips: ['rightHip', 'leftHip'],\n mouth: ['leftMouth', 'rightMouth'],\n leftLegUpper: ['leftHip', 'leftKnee'],\n leftLegLower: ['leftKnee', 'leftAnkle'],\n leftFoot: ['leftAnkle', 'leftHeel', 'leftFoot'],\n leftTorso: ['leftShoulder', 'leftHip'],\n leftArmUpper: ['leftShoulder', 'leftElbow'],\n leftArmLower: ['leftElbow', 'leftWrist'],\n leftHand: ['leftWrist', 'leftPalm'],\n leftHandPinky: ['leftPalm', 'leftPinky'],\n leftHandIndex: ['leftPalm', 'leftIndex'],\n leftHandThumb: ['leftPalm', 'leftThumb'],\n leftEyeOutline: ['leftEyeInside', 'leftEyeOutside'],\n rightLegUpper: ['rightHip', 'rightKnee'],\n rightLegLower: ['rightKnee', 'rightAnkle'],\n rightFoot: ['rightAnkle', 'rightHeel', 'rightFoot'],\n rightTorso: ['rightShoulder', 'rightHip'],\n rightArmUpper: ['rightShoulder', 'rightElbow'],\n rightArmLower: ['rightElbow', 'rightWrist'],\n rightHand: ['rightWrist', 'rightPalm'],\n rightHandPinky: ['rightPalm', 'rightPinky'],\n rightHandIndex: ['rightPalm', 'rightIndex'],\n rightHandThumb: ['rightPalm', 'rightThumb'],\n rightEyeOutline: ['rightEyeInside', 'rightEyeOutside'],\n};\n", "import * as tf from '../../dist/tfjs.esm.js';\nimport type { Tensor } from '../tfjs/types';\nimport type { Box } from '../result';\nimport type { Config } from '../config';\n\ninterface DetectedBox { box: Box, boxRaw: Box, score: number }\n\nconst inputSize = 224;\nlet anchorTensor: { x, y };\nconst numLayers = 5;\nconst strides = [8, 16, 32, 32, 32];\n\nexport function createAnchors() {\n const anchors: { x: number, y: number }[] = [];\n let layerId = 0;\n while (layerId < numLayers) {\n let anchorCount = 0;\n let lastSameStrideLayer = layerId;\n while (lastSameStrideLayer < strides.length && strides[lastSameStrideLayer] === strides[layerId]) {\n anchorCount += 2;\n lastSameStrideLayer++;\n }\n const stride = strides[layerId];\n const featureMapHeight = Math.ceil(inputSize / stride);\n const featureMapWidth = Math.ceil(inputSize / stride);\n for (let y = 0; y < featureMapHeight; ++y) {\n for (let x = 0; x < featureMapWidth; ++x) {\n for (let anchorId = 0; anchorId < anchorCount; ++anchorId) {\n anchors.push({ x: (x + 0.5) / featureMapWidth, y: (y + 0.5) / featureMapHeight });\n }\n }\n }\n layerId = lastSameStrideLayer;\n }\n anchorTensor = { x: tf.tensor1d(anchors.map((a) => a.x)), y: tf.tensor1d(anchors.map((a) => a.y)) };\n}\n\nconst cropFactor = [5.0, 5.0];\nfunction decodeBoxes(boxesTensor, anchor): Tensor {\n return tf.tidy(() => {\n const split = tf.split(boxesTensor, 12, 1); // first 4 are box data [x,y,w,h] and 4 are keypoints data [x,y] for total of 12\n let xCenter = tf.squeeze(split[0]);\n let yCenter = tf.squeeze(split[1]);\n let width = tf.squeeze(split[2]);\n let height = tf.squeeze(split[3]);\n xCenter = tf.add(tf.div(xCenter, inputSize), anchor.x);\n yCenter = tf.add(tf.div(yCenter, inputSize), anchor.y);\n width = tf.mul(tf.div(width, inputSize), cropFactor[0]);\n height = tf.mul(tf.div(height, inputSize), cropFactor[1]);\n const xMin = tf.sub(xCenter, tf.div(width, 2));\n const yMin = tf.sub(yCenter, tf.div(height, 2));\n const boxes = tf.stack([xMin, yMin, width, height], 1);\n return boxes;\n });\n}\n\nexport async function decode(boxesTensor: Tensor, logitsTensor: Tensor, config: Config, outputSize: [number, number]): Promise {\n const t: Record = {};\n t.boxes = decodeBoxes(boxesTensor, anchorTensor);\n t.scores = tf.sigmoid(logitsTensor);\n t.argmax = tf.argMax(t.scores);\n const i = (await t.argmax.data())[0];\n const scores = await t.scores.data();\n const detected: { box: Box, boxRaw: Box, score: number }[] = [];\n const minScore = config.body?.['detector']?.minConfidence || 0;\n if (scores[i] >= minScore) {\n const boxes = await t.boxes.array();\n const boxRaw: Box = boxes[i];\n const box: Box = [boxRaw[0] * outputSize[0], boxRaw[1] * outputSize[1], boxRaw[2] * outputSize[0], boxRaw[3] * outputSize[1]];\n // console.log(box);\n detected.push({ box, boxRaw, score: scores[i] });\n }\n /*\n t.nms = await tf.image.nonMaxSuppressionAsync(t.boxes, t.scores, 1, config.body.detector?.minConfidence || 0.1, config.body.detector?.iouThreshold || 0.1);\n const boxes = t.boxes.arraySync();\n const scores = t.scores.dataSync();\n const nms = t.nms.dataSync();\n const detected: Array = [];\n for (const i of Array.from(nms)) {\n const boxRaw: Box = boxes[i];\n const box: Box = [boxRaw[0] * outputSize[0], boxRaw[0] * outputSize[1], boxRaw[3] * outputSize[0], boxRaw[2] * outputSize[1]];\n detected.push({ box, boxRaw, score: scores[i] });\n }\n */\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n return detected;\n}\n", "import type { Point, Box } from '../result';\n\nexport function calc(keypoints: Point[], outputSize: [number, number] = [1, 1]) {\n const coords = [keypoints.map((pt) => pt[0]), keypoints.map((pt) => pt[1])]; // all x/y coords\n const min = [Math.min(...coords[0]), Math.min(...coords[1])];\n const max = [Math.max(...coords[0]), Math.max(...coords[1])];\n const box: Box = [min[0], min[1], max[0] - min[0], max[1] - min[1]];\n const boxRaw: Box = [box[0] / outputSize[0], box[1] / outputSize[1], box[2] / outputSize[0], box[3] / outputSize[1]];\n return { box, boxRaw };\n}\n\nexport function square(keypoints: Point[], outputSize: [number, number] = [1, 1]) {\n const coords = [keypoints.map((pt) => pt[0]), keypoints.map((pt) => pt[1])]; // all x/y coords\n const min = [Math.min(...coords[0]), Math.min(...coords[1])];\n const max = [Math.max(...coords[0]), Math.max(...coords[1])];\n const center = [(min[0] + max[0]) / 2, (min[1] + max[1]) / 2]; // find center x and y coord of all fingers\n const dist = Math.max(center[0] - min[0], center[1] - min[1], -center[0] + max[0], -center[1] + max[1]); // largest distance from center in any direction\n const box: Box = [Math.trunc(center[0] - dist), Math.trunc(center[1] - dist), Math.trunc(2 * dist), Math.trunc(2 * dist)];\n const boxRaw: Box = [box[0] / outputSize[0], box[1] / outputSize[1], box[2] / outputSize[0], box[3] / outputSize[1]];\n return { box, boxRaw };\n}\n\nexport function scale(box: Box, scaleFact: number) {\n const dist = [box[2] * scaleFact, box[3] * scaleFact];\n const newBox: Box = [\n box[0] - (dist[0] - box[2]) / 2,\n box[1] - (dist[1] - box[3]) / 2,\n dist[0],\n dist[1],\n ];\n return newBox;\n}\n\nexport function crop(box: Box) { // [y1, x1, y2, x2] clamped to 0..1\n const yxBox: Box = [Math.max(0, box[1]), Math.max(0, box[0]), Math.min(1, box[3] + box[1]), Math.min(1, box[2] + box[0])];\n return yxBox;\n}\n", "/**\n * BlazePose model implementation\n */\n\nimport * as tf from '../../dist/tfjs.esm.js';\nimport { loadModel } from '../tfjs/load';\nimport { constants } from '../tfjs/constants';\nimport { log, now } from '../util/util';\nimport type { BodyKeypoint, BodyResult, BodyLandmark, Box, Point, BodyAnnotation } from '../result';\nimport type { GraphModel, Tensor } from '../tfjs/types';\nimport type { Config } from '../config';\nimport * as coords from './blazeposecoords';\nimport * as detect from './blazeposedetector';\nimport * as box from '../util/box';\n\nconst env = { initial: true };\n// const models: [GraphModel | null, GraphModel | null] = [null, null];\nconst models: { detector: GraphModel | null, landmarks: GraphModel | null } = { detector: null, landmarks: null };\nconst inputSize: { detector: [number, number], landmarks: [number, number] } = { detector: [224, 224], landmarks: [256, 256] };\nlet skipped = Number.MAX_SAFE_INTEGER;\nconst outputNodes: { detector: string[], landmarks: string[] } = {\n landmarks: ['ld_3d', 'activation_segmentation', 'activation_heatmap', 'world_3d', 'output_poseflag'],\n detector: [],\n};\n\nlet cache: BodyResult | null = null;\nlet cropBox: Box | undefined;\nlet padding: [number, number][] = [[0, 0], [0, 0], [0, 0], [0, 0]];\nlet lastTime = 0;\n\nconst sigmoid = (x) => (1 - (1 / (1 + Math.exp(x))));\n\nexport async function loadDetect(config: Config): Promise {\n if (env.initial) models.detector = null;\n if (!models.detector && config.body['detector'] && config.body['detector'].modelPath || '') {\n models.detector = await loadModel(config.body['detector'].modelPath);\n const inputs = models.detector?.['executor'] ? Object.values(models.detector.modelSignature['inputs']) : undefined;\n inputSize.detector[0] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[1].size) : 0;\n inputSize.detector[1] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : 0;\n } else if (config.debug && models.detector) log('cached model:', models.detector['modelUrl']);\n detect.createAnchors();\n return models.detector as GraphModel;\n}\n\nexport async function loadPose(config: Config): Promise {\n if (env.initial) models.landmarks = null;\n if (!models.landmarks) {\n models.landmarks = await loadModel(config.body.modelPath);\n const inputs = models.landmarks?.['executor'] ? Object.values(models.landmarks.modelSignature['inputs']) : undefined;\n inputSize.landmarks[0] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[1].size) : 0;\n inputSize.landmarks[1] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : 0;\n } else if (config.debug) log('cached model:', models.landmarks['modelUrl']);\n return models.landmarks;\n}\n\nexport async function load(config: Config): Promise<[GraphModel | null, GraphModel | null]> {\n if (!models.detector) await loadDetect(config);\n if (!models.landmarks) await loadPose(config);\n return [models.detector, models.landmarks];\n}\n\nfunction prepareImage(input: Tensor, size: number): Tensor {\n const t: Record = {};\n if (!input?.shape?.[1] || !input?.shape?.[2]) return input;\n let final: Tensor;\n if (cropBox) {\n t.cropped = tf.image.cropAndResize(input, [cropBox], [0], [input.shape[1], input.shape[2]]); // if we have cached box use it to crop input\n }\n if (input.shape[1] !== input.shape[2]) { // only pad if width different than height\n const height: [number, number] = [\n input.shape[2] > input.shape[1] ? Math.trunc((input.shape[2] - input.shape[1]) / 2) : 0,\n input.shape[2] > input.shape[1] ? Math.trunc((input.shape[2] - input.shape[1]) / 2) : 0,\n ];\n const width: [number, number] = [\n input.shape[1] > input.shape[2] ? Math.trunc((input.shape[1] - input.shape[2]) / 2) : 0,\n input.shape[1] > input.shape[2] ? Math.trunc((input.shape[1] - input.shape[2]) / 2) : 0,\n ];\n padding = [\n [0, 0], // dont touch batch\n height, // height before&after\n width, // width before&after\n [0, 0], // dont touch rbg\n ];\n t.pad = tf.pad(t.cropped || input, padding); // use cropped box if it exists\n t.resize = tf.image.resizeBilinear(t.pad, [size, size]);\n final = tf.div(t.resize, constants.tf255);\n } else if (input.shape[1] !== size) { // if input needs resizing\n t.resize = tf.image.resizeBilinear(t.cropped || input, [size, size]);\n final = tf.div(t.resize, constants.tf255);\n } else { // if input is already in a correct resolution just normalize it\n final = tf.div(t.cropped || input, constants.tf255);\n }\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n return final;\n}\n\nfunction rescaleKeypoints(keypoints: BodyKeypoint[], outputSize: [number, number]): BodyKeypoint[] {\n for (const kpt of keypoints) { // first rescale due to padding\n kpt.position = [\n Math.trunc(kpt.position[0] * (outputSize[0] + padding[2][0] + padding[2][1]) / outputSize[0] - padding[2][0]),\n Math.trunc(kpt.position[1] * (outputSize[1] + padding[1][0] + padding[1][1]) / outputSize[1] - padding[1][0]),\n kpt.position[2] as number,\n ];\n kpt.positionRaw = [kpt.position[0] / outputSize[0], kpt.position[1] / outputSize[1], 2 * (kpt.position[2] as number) / (outputSize[0] + outputSize[1])];\n }\n if (cropBox) { // second rescale due to cropping\n for (const kpt of keypoints) {\n kpt.positionRaw = [\n kpt.positionRaw[0] + cropBox[1], // correct offset due to crop\n kpt.positionRaw[1] + cropBox[0], // correct offset due to crop\n kpt.positionRaw[2] as number,\n ];\n kpt.position = [\n Math.trunc(kpt.positionRaw[0] * outputSize[0]),\n Math.trunc(kpt.positionRaw[1] * outputSize[1]),\n kpt.positionRaw[2] as number,\n ];\n }\n }\n return keypoints;\n}\n\nfunction fixKeypoints(keypoints: BodyKeypoint[]) {\n // palm z-coord is incorrect around near-zero so we approximate it\n const leftPalm = keypoints.find((k) => k.part === 'leftPalm') as BodyKeypoint;\n const leftWrist = keypoints.find((k) => k.part === 'leftWrist') as BodyKeypoint;\n const leftIndex = keypoints.find((k) => k.part === 'leftIndex') as BodyKeypoint;\n leftPalm.position[2] = ((leftWrist.position[2] || 0) + (leftIndex.position[2] || 0)) / 2;\n const rightPalm = keypoints.find((k) => k.part === 'rightPalm') as BodyKeypoint;\n const rightWrist = keypoints.find((k) => k.part === 'rightWrist') as BodyKeypoint;\n const rightIndex = keypoints.find((k) => k.part === 'rightIndex') as BodyKeypoint;\n rightPalm.position[2] = ((rightWrist.position[2] || 0) + (rightIndex.position[2] || 0)) / 2;\n}\n\nasync function detectLandmarks(input: Tensor, config: Config, outputSize: [number, number]): Promise {\n /**\n * t.ld: 39 keypoints [x,y,z,score,presence] normalized to input size\n * t.segmentation:\n * t.heatmap:\n * t.world: 39 keypoints [x,y,z] normalized to -1..1\n * t.poseflag: body score\n */\n if (!models.landmarks?.['executor']) return null;\n const t: Record = {};\n [t.ld/* 1,195(39*5) */, t.segmentation/* 1,256,256,1 */, t.heatmap/* 1,64,64,39 */, t.world/* 1,117(39*3) */, t.poseflag/* 1,1 */] = models.landmarks?.execute(input, outputNodes.landmarks) as Tensor[]; // run model\n const poseScore = (await t.poseflag.data())[0];\n const points = await t.ld.data();\n const distances = await t.world.data();\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor])); // dont need tensors after this\n const keypointsRelative: BodyKeypoint[] = [];\n const depth = 5; // each points has x,y,z,visibility,presence\n for (let i = 0; i < points.length / depth; i++) {\n const score = sigmoid(points[depth * i + 3]);\n const presence = sigmoid(points[depth * i + 4]);\n const adjScore = Math.trunc(100 * score * presence * poseScore) / 100;\n const positionRaw: Point = [points[depth * i + 0] / inputSize.landmarks[0], points[depth * i + 1] / inputSize.landmarks[1], points[depth * i + 2] + 0];\n const position: Point = [Math.trunc(outputSize[0] * positionRaw[0]), Math.trunc(outputSize[1] * positionRaw[1]), positionRaw[2] as number];\n const distance: Point = [distances[depth * i + 0], distances[depth * i + 1], distances[depth * i + 2] + 0];\n keypointsRelative.push({ part: coords.kpt[i] as BodyLandmark, positionRaw, position, distance, score: adjScore });\n }\n if (poseScore < (config.body.minConfidence || 0)) return null;\n fixKeypoints(keypointsRelative);\n const keypoints: BodyKeypoint[] = rescaleKeypoints(keypointsRelative, outputSize); // keypoints were relative to input image which is padded\n const kpts = keypoints.map((k) => k.position);\n const boxes = box.calc(kpts, [outputSize[0], outputSize[1]]); // now find boxes based on rescaled keypoints\n const annotations: Record = {} as Record;\n for (const [name, indexes] of Object.entries(coords.connected)) {\n const pt: Point[][] = [];\n for (let i = 0; i < indexes.length - 1; i++) {\n const pt0 = keypoints.find((kpt) => kpt.part === indexes[i]);\n const pt1 = keypoints.find((kpt) => kpt.part === indexes[i + 1]);\n if (pt0 && pt1) pt.push([pt0.position, pt1.position]);\n }\n annotations[name] = pt;\n }\n const body = { id: 0, score: Math.trunc(100 * poseScore) / 100, box: boxes.box, boxRaw: boxes.boxRaw, keypoints, annotations };\n return body;\n}\n\n/*\ninterface DetectedBox { box: Box, boxRaw: Box, score: number }\n\nfunction rescaleBoxes(boxes: Array, outputSize: [number, number]): Array {\n for (const b of boxes) {\n b.box = [\n Math.trunc(b.box[0] * (outputSize[0] + padding[2][0] + padding[2][1]) / outputSize[0]),\n Math.trunc(b.box[1] * (outputSize[1] + padding[1][0] + padding[1][1]) / outputSize[1]),\n Math.trunc(b.box[2] * (outputSize[0] + padding[2][0] + padding[2][1]) / outputSize[0]),\n Math.trunc(b.box[3] * (outputSize[1] + padding[1][0] + padding[1][1]) / outputSize[1]),\n ];\n b.boxRaw = [b.box[0] / outputSize[0], b.box[1] / outputSize[1], b.box[2] / outputSize[0], b.box[3] / outputSize[1]];\n }\n return boxes;\n}\n\nasync function detectBoxes(input: Tensor, config: Config, outputSize: [number, number]) {\n const t: Record = {};\n t.res = models.detector?.execute(input, ['Identity']) as Tensor; //\n t.logitsRaw = tf.slice(t.res, [0, 0, 0], [1, -1, 1]);\n t.boxesRaw = tf.slice(t.res, [0, 0, 1], [1, -1, -1]);\n t.logits = tf.squeeze(t.logitsRaw);\n t.boxes = tf.squeeze(t.boxesRaw);\n const boxes = await detect.decode(t.boxes, t.logits, config, outputSize);\n rescaleBoxes(boxes, outputSize);\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n return boxes;\n}\n*/\n\nexport async function predict(input: Tensor, config: Config): Promise {\n const outputSize: [number, number] = [input.shape[2] || 0, input.shape[1] || 0];\n const skipTime = (config.body.skipTime || 0) > (now() - lastTime);\n const skipFrame = skipped < (config.body.skipFrames || 0);\n if (config.skipAllowed && skipTime && skipFrame && cache !== null) {\n skipped++;\n } else {\n const t: Record = {};\n /*\n if (config.body['detector'] && config.body['detector']['enabled']) {\n t.detector = await prepareImage(input, 224);\n const boxes = await detectBoxes(t.detector, config, outputSize);\n }\n */\n t.landmarks = prepareImage(input, 256); // padded and resized\n cache = await detectLandmarks(t.landmarks, config, outputSize);\n /*\n cropBox = [0, 0, 1, 1]; // reset crop coordinates\n if (cache?.boxRaw && config.skipAllowed) {\n const cx = (2.0 * cache.boxRaw[0] + cache.boxRaw[2]) / 2;\n const cy = (2.0 * cache.boxRaw[1] + cache.boxRaw[3]) / 2;\n let size = cache.boxRaw[2] > cache.boxRaw[3] ? cache.boxRaw[2] : cache.boxRaw[3];\n size = (size * 1.0) / 2; // enlarge and half it\n if (cx > 0.1 && cx < 0.9 && cy > 0.1 && cy < 0.9 && size > 0.1) { // only update if box is sane\n const y = 0; // cy - size;\n const x = cx - size;\n cropBox = [y, x, y + 1, x + 1]; // [y0,x0,y1,x1] used for cropping but width/height are not yet implemented so we only reposition image to center of body\n }\n }\n */\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n lastTime = now();\n skipped = 0;\n }\n return cache ? [cache] : [];\n}\n", "/**\n * CoCo Labels used by object detection implementations\n */\nexport const labels = [\n { class: 1, label: 'person' },\n { class: 2, label: 'bicycle' },\n { class: 3, label: 'car' },\n { class: 4, label: 'motorcycle' },\n { class: 5, label: 'airplane' },\n { class: 6, label: 'bus' },\n { class: 7, label: 'train' },\n { class: 8, label: 'truck' },\n { class: 9, label: 'boat' },\n { class: 10, label: 'traffic light' },\n { class: 11, label: 'fire hydrant' },\n { class: 12, label: 'stop sign' },\n { class: 13, label: 'parking meter' },\n { class: 14, label: 'bench' },\n { class: 15, label: 'bird' },\n { class: 16, label: 'cat' },\n { class: 17, label: 'dog' },\n { class: 18, label: 'horse' },\n { class: 19, label: 'sheep' },\n { class: 20, label: 'cow' },\n { class: 21, label: 'elephant' },\n { class: 22, label: 'bear' },\n { class: 23, label: 'zebra' },\n { class: 24, label: 'giraffe' },\n { class: 25, label: 'backpack' },\n { class: 26, label: 'umbrella' },\n { class: 27, label: 'handbag' },\n { class: 28, label: 'tie' },\n { class: 29, label: 'suitcase' },\n { class: 30, label: 'frisbee' },\n { class: 31, label: 'skis' },\n { class: 32, label: 'snowboard' },\n { class: 33, label: 'sports ball' },\n { class: 34, label: 'kite' },\n { class: 35, label: 'baseball bat' },\n { class: 36, label: 'baseball glove' },\n { class: 37, label: 'skateboard' },\n { class: 38, label: 'surfboard' },\n { class: 39, label: 'tennis racket' },\n { class: 40, label: 'bottle' },\n { class: 41, label: 'wine glass' },\n { class: 42, label: 'cup' },\n { class: 43, label: 'fork' },\n { class: 44, label: 'knife' },\n { class: 45, label: 'spoon' },\n { class: 46, label: 'bowl' },\n { class: 47, label: 'banana' },\n { class: 48, label: 'apple' },\n { class: 49, label: 'sandwich' },\n { class: 50, label: 'orange' },\n { class: 51, label: 'broccoli' },\n { class: 52, label: 'carrot' },\n { class: 53, label: 'hot dog' },\n { class: 54, label: 'pizza' },\n { class: 55, label: 'donut' },\n { class: 56, label: 'cake' },\n { class: 57, label: 'chair' },\n { class: 58, label: 'couch' },\n { class: 59, label: 'potted plant' },\n { class: 60, label: 'bed' },\n { class: 61, label: 'dining table' },\n { class: 62, label: 'toilet' },\n { class: 63, label: 'tv' },\n { class: 64, label: 'laptop' },\n { class: 65, label: 'mouse' },\n { class: 66, label: 'remote' },\n { class: 67, label: 'keyboard' },\n { class: 68, label: 'cell phone' },\n { class: 69, label: 'microwave' },\n { class: 70, label: 'oven' },\n { class: 71, label: 'toaster' },\n { class: 72, label: 'sink' },\n { class: 73, label: 'refrigerator' },\n { class: 74, label: 'book' },\n { class: 75, label: 'clock' },\n { class: 76, label: 'vase' },\n { class: 77, label: 'scissors' },\n { class: 78, label: 'teddy bear' },\n { class: 79, label: 'hair drier' },\n { class: 80, label: 'toothbrush' },\n];\n", "/**\n * CenterNet object detection model implementation\n *\n * Based on: [**NanoDet**](https://github.com/RangiLyu/nanodet)\n */\n\nimport { log, now } from '../util/util';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport { loadModel } from '../tfjs/load';\nimport { labels } from './labels';\nimport type { ObjectResult, ObjectType, Box } from '../result';\nimport type { GraphModel, Tensor } from '../tfjs/types';\nimport type { Config } from '../config';\nimport { env } from '../util/env';\n\nlet model: GraphModel | null;\nlet inputSize = 0;\nlet last: ObjectResult[] = [];\nlet lastTime = 0;\nlet skipped = Number.MAX_SAFE_INTEGER;\n\nexport async function load(config: Config): Promise {\n if (env.initial) model = null;\n if (!model) {\n // fakeOps(['floormod'], config);\n model = await loadModel(config.object.modelPath);\n const inputs = model?.['executor'] ? Object.values(model.modelSignature['inputs']) : undefined;\n inputSize = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : 0;\n } else if (config.debug) log('cached model:', model['modelUrl']);\n return model;\n}\n\nasync function process(res: Tensor | null, outputShape: [number, number], config: Config) {\n if (!res) return [];\n const t: Record = {};\n const results: ObjectResult[] = [];\n const detections = await res.array() as number[][][];\n t.squeeze = tf.squeeze(res);\n const arr = tf.split(t.squeeze, 6, 1) as Tensor[]; // x1, y1, x2, y2, score, class\n t.stack = tf.stack([arr[1], arr[0], arr[3], arr[2]], 1); // reorder dims as tf.nms expects y, x\n t.boxes = tf.squeeze(t.stack);\n t.scores = tf.squeeze(arr[4]);\n t.classes = tf.squeeze(arr[5]);\n tf.dispose([res, ...arr]);\n t.nms = await tf.image.nonMaxSuppressionAsync(t.boxes, t.scores, config.object.maxDetected, config.object.iouThreshold, (config.object.minConfidence || 0));\n const nms = await t.nms.data();\n let i = 0;\n for (const id of Array.from(nms)) {\n const score = Math.trunc(100 * detections[0][id][4]) / 100;\n const classVal = detections[0][id][5];\n if (Number.isNaN(classVal)) continue;\n const label = labels[classVal].label as ObjectType;\n const [x, y] = [\n detections[0][id][0] / inputSize,\n detections[0][id][1] / inputSize,\n ];\n const boxRaw: Box = [\n x,\n y,\n detections[0][id][2] / inputSize - x,\n detections[0][id][3] / inputSize - y,\n ];\n const box: Box = [\n Math.trunc(boxRaw[0] * outputShape[0]),\n Math.trunc(boxRaw[1] * outputShape[1]),\n Math.trunc(boxRaw[2] * outputShape[0]),\n Math.trunc(boxRaw[3] * outputShape[1]),\n ];\n results.push({ id: i++, score, class: classVal, label, box, boxRaw });\n }\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n return results;\n}\n\nexport async function predict(input: Tensor, config: Config): Promise {\n if (!model?.['executor']) return [];\n const skipTime = (config.object.skipTime || 0) > (now() - lastTime);\n const skipFrame = skipped < (config.object.skipFrames || 0);\n if (config.skipAllowed && skipTime && skipFrame && (last.length > 0)) {\n skipped++;\n return last;\n }\n skipped = 0;\n return new Promise(async (resolve) => {\n const outputSize = [input.shape[2] || 0, input.shape[1] || 0] as [number, number];\n const resize = tf.image.resizeBilinear(input, [inputSize, inputSize]);\n const objectT = config.object.enabled ? model?.execute(resize, ['tower_0/detections']) as Tensor : null;\n lastTime = now();\n tf.dispose(resize);\n\n const obj = await process(objectT, outputSize, config);\n last = obj;\n\n resolve(obj);\n });\n}\n", "export const kpt: string[] = [\n 'head',\n 'neck',\n 'rightShoulder',\n 'rightElbow',\n 'rightWrist',\n 'chest',\n 'leftShoulder',\n 'leftElbow',\n 'leftWrist',\n 'bodyCenter',\n 'rightHip',\n 'rightKnee',\n 'rightAnkle',\n 'leftHip',\n 'leftKnee',\n 'leftAnkle',\n];\n\nexport const connected: Record = {\n leftLeg: ['leftHip', 'leftKnee', 'leftAnkle'],\n rightLeg: ['rightHip', 'rightKnee', 'rightAnkle'],\n torso: ['leftShoulder', 'rightShoulder', 'rightHip', 'leftHip', 'leftShoulder'],\n leftArm: ['leftShoulder', 'leftElbow', 'leftWrist'],\n rightArm: ['rightShoulder', 'rightElbow', 'rightWrist'],\n head: [],\n};\n", "/**\n * EfficientPose model implementation\n *\n * Based on: [**EfficientPose**](https://github.com/daniegr/EfficientPose)\n */\n\nimport { log, now } from '../util/util';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport { loadModel } from '../tfjs/load';\nimport * as coords from './efficientposecoords';\nimport { constants } from '../tfjs/constants';\nimport type { BodyResult, Point, BodyLandmark, BodyAnnotation } from '../result';\nimport type { GraphModel, Tensor } from '../tfjs/types';\nimport type { Config } from '../config';\nimport { env } from '../util/env';\n\nlet model: GraphModel | null;\nlet lastTime = 0;\nconst cache: BodyResult = { id: 0, keypoints: [], box: [0, 0, 0, 0], boxRaw: [0, 0, 0, 0], score: 0, annotations: {} as Record };\n\n// const keypoints: Array = [];\n// let box: Box = [0, 0, 0, 0];\n// let boxRaw: Box = [0, 0, 0, 0];\n// let score = 0;\nlet skipped = Number.MAX_SAFE_INTEGER;\n\nexport async function load(config: Config): Promise {\n if (env.initial) model = null;\n if (!model) model = await loadModel(config.body.modelPath);\n else if (config.debug) log('cached model:', model['modelUrl']);\n return model;\n}\n\n// performs argmax and max functions on a 2d tensor\nasync function max2d(inputs, minScore): Promise<[number, number, number]> {\n const [width, height] = inputs.shape;\n const reshaped = tf.reshape(inputs, [height * width]); // combine all data\n const max = tf.max(reshaped, 0);\n const newScore: number = (await max.data())[0]; // get highest score\n if (newScore > minScore) { // skip coordinate calculation is score is too low\n const coordinates = tf.argMax(reshaped, 0);\n const mod = tf.mod(coordinates, width);\n const x = (await mod.data())[0];\n const div = tf.div(coordinates, width);\n const y: number = (await div.data())[0];\n tf.dispose([reshaped, max, coordinates, mod, div]);\n return [x, y, newScore];\n }\n tf.dispose([reshaped, max]);\n return [0, 0, newScore];\n}\n\nexport async function predict(image: Tensor, config: Config): Promise {\n if (!model?.['executor']) return [];\n const skipTime = (config.body.skipTime || 0) > (now() - lastTime);\n const skipFrame = skipped < (config.body.skipFrames || 0);\n if (config.skipAllowed && skipTime && skipFrame && Object.keys(cache.keypoints).length > 0) {\n skipped++;\n return [cache];\n }\n skipped = 0;\n return new Promise(async (resolve) => {\n const tensor = tf.tidy(() => {\n if (!model?.inputs[0].shape) return null;\n const resize = tf.image.resizeBilinear(image, [model.inputs[0].shape[2], model.inputs[0].shape[1]], false);\n const enhance = tf.mul(resize, constants.tf2);\n const norm = tf.sub(enhance, constants.tf1);\n return norm;\n });\n let resT;\n if (config.body.enabled) resT = model?.execute(tensor);\n lastTime = now();\n tf.dispose(tensor);\n\n if (resT) {\n cache.keypoints.length = 0;\n const squeeze = tf.squeeze(resT);\n tf.dispose(resT);\n // body parts are basically just a stack of 2d tensors\n const stack = tf.unstack(squeeze, 2);\n tf.dispose(squeeze);\n\n // process each unstacked tensor as a separate body part\n for (let id = 0; id < stack.length; id++) {\n // actual processing to get coordinates and score\n const [x, y, partScore] = await max2d(stack[id], config.body.minConfidence);\n if (partScore > (config.body.minConfidence || 0)) {\n cache.keypoints.push({\n score: Math.round(100 * partScore) / 100,\n part: coords.kpt[id] as BodyLandmark,\n positionRaw: [ // normalized to 0..1\n // @ts-ignore model is not undefined here\n x / model.inputs[0].shape[2], y / model.inputs[0].shape[1],\n ],\n position: [ // normalized to input image size\n // @ts-ignore model is not undefined here\n Math.round(image.shape[2] * x / model.inputs[0].shape[2]), Math.round(image.shape[1] * y / model.inputs[0].shape[1]),\n ],\n });\n }\n }\n stack.forEach((s) => tf.dispose(s));\n }\n cache.score = cache.keypoints.reduce((prev, curr) => (curr.score > prev ? curr.score : prev), 0);\n const x = cache.keypoints.map((a) => a.position[0]);\n const y = cache.keypoints.map((a) => a.position[1]);\n cache.box = [\n Math.min(...x),\n Math.min(...y),\n Math.max(...x) - Math.min(...x),\n Math.max(...y) - Math.min(...y),\n ];\n const xRaw = cache.keypoints.map((a) => a.positionRaw[0]);\n const yRaw = cache.keypoints.map((a) => a.positionRaw[1]);\n cache.boxRaw = [\n Math.min(...xRaw),\n Math.min(...yRaw),\n Math.max(...xRaw) - Math.min(...xRaw),\n Math.max(...yRaw) - Math.min(...yRaw),\n ];\n for (const [name, indexes] of Object.entries(coords.connected)) {\n const pt: Point[][] = [];\n for (let i = 0; i < indexes.length - 1; i++) {\n const pt0 = cache.keypoints.find((kpt) => kpt.part === indexes[i]);\n const pt1 = cache.keypoints.find((kpt) => kpt.part === indexes[i + 1]);\n if (pt0 && pt1 && pt0.score > (config.body.minConfidence || 0) && pt1.score > (config.body.minConfidence || 0)) pt.push([pt0.position, pt1.position]);\n }\n cache.annotations[name] = pt;\n }\n resolve([cache]);\n });\n}\n", "/**\n * Emotion model implementation\n *\n * [**Oarriaga**](https://github.com/oarriaga/face_classification)\n */\n\nimport type { Emotion } from '../result';\nimport { log, now } from '../util/util';\nimport type { Config } from '../config';\nimport type { GraphModel, Tensor } from '../tfjs/types';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport { loadModel } from '../tfjs/load';\nimport { env } from '../util/env';\nimport { constants } from '../tfjs/constants';\n\nconst annotations = ['angry', 'disgust', 'fear', 'happy', 'sad', 'surprise', 'neutral'];\nlet model: GraphModel | null;\nconst last: { score: number, emotion: Emotion }[][] = [];\nlet lastCount = 0;\nlet lastTime = 0;\nlet skipped = Number.MAX_SAFE_INTEGER;\n\nexport async function load(config: Config): Promise {\n if (env.initial) model = null;\n if (!model) model = await loadModel(config.face.emotion?.modelPath);\n else if (config.debug) log('cached model:', model['modelUrl']);\n return model;\n}\n\nexport async function predict(image: Tensor, config: Config, idx: number, count: number): Promise<{ score: number, emotion: Emotion }[]> {\n if (!model) return [];\n const skipFrame = skipped < (config.face.emotion?.skipFrames || 0);\n const skipTime = (config.face.emotion?.skipTime || 0) > (now() - lastTime);\n if (config.skipAllowed && skipTime && skipFrame && (lastCount === count) && last[idx] && (last[idx].length > 0)) {\n skipped++;\n return last[idx];\n }\n skipped = 0;\n return new Promise(async (resolve) => {\n const obj: { score: number, emotion: Emotion }[] = [];\n if (config.face.emotion?.enabled) {\n const t: Record = {};\n const inputSize = model?.inputs[0].shape ? model.inputs[0].shape[2] : 0;\n t.resize = tf.image.resizeBilinear(image, [inputSize, inputSize], false);\n // const box = [[0.15, 0.15, 0.85, 0.85]]; // empyrical values for top, left, bottom, right\n // const resize = tf.image.cropAndResize(image, box, [0], [inputSize, inputSize]);\n // [t.red, t.green, t.blue] = tf.split(t.resize, 3, 3);\n // weighted rgb to grayscale: https://www.mathworks.com/help/matlab/ref/rgb2gray.html\n // t.redNorm = tf.mul(t.red, rgb[0]);\n // t.greenNorm = tf.mul(t.green, rgb[1]);\n // t.blueNorm = tf.mul(t.blue, rgb[2]);\n // t.grayscale = tf.addN([t.redNorm, t.greenNorm, t.blueNorm]);\n t.channels = tf.mul(t.resize, constants.rgb);\n t.grayscale = tf.sum(t.channels, 3, true);\n t.grayscaleSub = tf.sub(t.grayscale, constants.tf05);\n t.grayscaleMul = tf.mul(t.grayscaleSub, constants.tf2);\n t.emotion = model?.execute(t.grayscaleMul) as Tensor; // result is already in range 0..1, no need for additional activation\n lastTime = now();\n const data = await t.emotion.data();\n for (let i = 0; i < data.length; i++) {\n if (data[i] > (config.face.emotion.minConfidence || 0)) obj.push({ score: Math.min(0.99, Math.trunc(100 * data[i]) / 100), emotion: annotations[i] as Emotion });\n }\n obj.sort((a, b) => b.score - a.score);\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n }\n last[idx] = obj;\n lastCount = count;\n resolve(obj);\n });\n}\n", "import * as coords from './facemeshcoords';\nimport * as util from './facemeshutil';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport type { Tensor, GraphModel } from '../tfjs/types';\nimport { env } from '../util/env';\nimport { log } from '../util/util';\nimport { loadModel } from '../tfjs/load';\nimport type { Config } from '../config';\nimport type { Point } from '../result';\n\nlet model: GraphModel | null;\nlet inputSize = 0;\n\nconst irisEnlarge = 2.3;\n\nconst leftOutline = coords.meshAnnotations.leftEyeLower0;\nconst rightOutline = coords.meshAnnotations.rightEyeLower0;\n\nconst eyeLandmarks = {\n leftBounds: [leftOutline[0], leftOutline[leftOutline.length - 1]],\n rightBounds: [rightOutline[0], rightOutline[rightOutline.length - 1]],\n};\n\nconst irisLandmarks = {\n upperCenter: 3,\n lowerCenter: 4,\n index: 71,\n numCoordinates: 76,\n};\n\nexport async function load(config: Config): Promise {\n if (env.initial) model = null;\n if (!model) model = await loadModel(config.face.iris?.modelPath);\n else if (config.debug) log('cached model:', model['modelUrl']);\n inputSize = (model?.['executor'] && model.inputs?.[0].shape) ? model.inputs[0].shape[2] : 0;\n if (inputSize === -1) inputSize = 64;\n return model;\n}\n\n// Replace the raw coordinates returned by facemesh with refined iris model coordinates and update the z coordinate to be an average of the original and the new.\nexport function replaceIrisCoords(rawCoords, newCoords, prefix, keys) {\n for (let i = 0; i < coords.irisIndices.length; i++) {\n const { key, indices } = coords.irisIndices[i];\n const originalIndices = coords.meshAnnotations[`${prefix}${key}`];\n if (!keys || keys.includes(key)) {\n for (let j = 0; j < indices.length; j++) {\n const index = indices[j];\n rawCoords[originalIndices[j]] = [\n newCoords[index][0],\n newCoords[index][1],\n (newCoords[index][2] + rawCoords[originalIndices[j]][2]) / 2,\n ];\n }\n }\n }\n}\n\nexport const getLeftToRightEyeDepthDifference = (rawCoords) => {\n const leftEyeZ = rawCoords[eyeLandmarks.leftBounds[0]][2];\n const rightEyeZ = rawCoords[eyeLandmarks.rightBounds[0]][2];\n return leftEyeZ - rightEyeZ;\n};\n\n// Returns a box describing a cropped region around the eye fit for passing to the iris model.\nexport const getEyeBox = (rawCoords, face, eyeInnerCornerIndex, eyeOuterCornerIndex, meshSize, flip = false) => {\n const box = util.squarifyBox(util.enlargeBox(util.calculateLandmarksBoundingBox([rawCoords[eyeInnerCornerIndex], rawCoords[eyeOuterCornerIndex]]), irisEnlarge));\n const boxSize = util.getBoxSize(box);\n let crop = tf.image.cropAndResize(face, [[\n box.startPoint[1] / meshSize,\n box.startPoint[0] / meshSize, box.endPoint[1] / meshSize,\n box.endPoint[0] / meshSize,\n ]], [0], [inputSize, inputSize]);\n if (flip && env.kernels.includes('flipleftright')) {\n const flipped = tf.image.flipLeftRight(crop); // flipLeftRight is not defined for tfjs-node\n tf.dispose(crop);\n crop = flipped;\n }\n return { box, boxSize, crop };\n};\n\n// Given a cropped image of an eye, returns the coordinates of the contours surrounding the eye and the iris.\nexport const getEyeCoords = (eyeData, eyeBox, eyeBoxSize, flip = false) => {\n const eyeRawCoords: Point[] = [];\n for (let i = 0; i < irisLandmarks.numCoordinates; i++) {\n const x = eyeData[i * 3];\n const y = eyeData[i * 3 + 1];\n const z = eyeData[i * 3 + 2];\n eyeRawCoords.push([\n (flip ? (1 - (x / inputSize)) : (x / inputSize)) * eyeBoxSize[0] + eyeBox.startPoint[0],\n (y / inputSize) * eyeBoxSize[1] + eyeBox.startPoint[1], z,\n ]);\n }\n return { rawCoords: eyeRawCoords, iris: eyeRawCoords.slice(irisLandmarks.index) };\n};\n\n// The z-coordinates returned for the iris are unreliable, so we take the z values from the surrounding keypoints.\nexport const getAdjustedIrisCoords = (rawCoords, irisCoords, direction) => {\n const upperCenterZ = rawCoords[coords.meshAnnotations[`${direction}EyeUpper0`][irisLandmarks.upperCenter]][2];\n const lowerCenterZ = rawCoords[coords.meshAnnotations[`${direction}EyeLower0`][irisLandmarks.lowerCenter]][2];\n const averageZ = (upperCenterZ + lowerCenterZ) / 2;\n // Iris indices: 0: center | 1: right | 2: above | 3: left | 4: below\n return irisCoords.map((coord, i) => {\n let z = averageZ;\n if (i === 2) {\n z = upperCenterZ;\n } else if (i === 4) {\n z = lowerCenterZ;\n }\n return [coord[0], coord[1], z];\n });\n};\n\nexport async function augmentIris(rawCoords, face, meshSize) {\n if (!model?.['executor']) return rawCoords;\n const { box: leftEyeBox, boxSize: leftEyeBoxSize, crop: leftEyeCrop } = getEyeBox(rawCoords, face, eyeLandmarks.leftBounds[0], eyeLandmarks.leftBounds[1], meshSize, true);\n const { box: rightEyeBox, boxSize: rightEyeBoxSize, crop: rightEyeCrop } = getEyeBox(rawCoords, face, eyeLandmarks.rightBounds[0], eyeLandmarks.rightBounds[1], meshSize, true);\n const combined = tf.concat([leftEyeCrop, rightEyeCrop]);\n tf.dispose(leftEyeCrop);\n tf.dispose(rightEyeCrop);\n const eyePredictions = model.execute(combined) as Tensor;\n tf.dispose(combined);\n const eyePredictionsData = await eyePredictions.data();\n tf.dispose(eyePredictions);\n const leftEyeData = eyePredictionsData.slice(0, irisLandmarks.numCoordinates * 3);\n const { rawCoords: leftEyeRawCoords, iris: leftIrisRawCoords } = getEyeCoords(leftEyeData, leftEyeBox, leftEyeBoxSize, true);\n const rightEyeData = eyePredictionsData.slice(irisLandmarks.numCoordinates * 3);\n const { rawCoords: rightEyeRawCoords, iris: rightIrisRawCoords } = getEyeCoords(rightEyeData, rightEyeBox, rightEyeBoxSize, false);\n const leftToRightEyeDepthDifference = getLeftToRightEyeDepthDifference(rawCoords);\n if (Math.abs(leftToRightEyeDepthDifference) < 30) { // User is looking straight ahead.\n replaceIrisCoords(rawCoords, leftEyeRawCoords, 'left', null);\n replaceIrisCoords(rawCoords, rightEyeRawCoords, 'right', null);\n // If the user is looking to the left or to the right, the iris coordinates tend to diverge too much from the mesh coordinates for them to be merged so we only update a single contour line above and below the eye.\n } else if (leftToRightEyeDepthDifference < 1) { // User is looking towards the right.\n replaceIrisCoords(rawCoords, leftEyeRawCoords, 'left', ['EyeUpper0', 'EyeLower0']);\n } else { // User is looking towards the left.\n replaceIrisCoords(rawCoords, rightEyeRawCoords, 'right', ['EyeUpper0', 'EyeLower0']);\n }\n const adjustedLeftIrisCoords = getAdjustedIrisCoords(rawCoords, leftIrisRawCoords, 'left');\n const adjustedRightIrisCoords = getAdjustedIrisCoords(rawCoords, rightIrisRawCoords, 'right');\n const newCoords = rawCoords.concat(adjustedLeftIrisCoords).concat(adjustedRightIrisCoords);\n return newCoords;\n}\n", "// @tensorflow/tfjs-models/face-landmark-detection/src/constants.ts\n// https://github.com/google/mediapipe/mediapipe/python/solutions/face_mesh_connections.py\n\ntype PairArray = [number, number][];\n\nconst LIPS_CONNECTIONS: PairArray = [\n [61, 146], [146, 91], [91, 181], [181, 84], [84, 17], [17, 314], [314, 405], [405, 321], [321, 375], [375, 291], [61, 185], [185, 40], [40, 39], [39, 37], [37, 0], [0, 267], [267, 269], [269, 270], [270, 409], [409, 291],\n [78, 95], [95, 88], [88, 178], [178, 87], [87, 14], [14, 317], [317, 402], [402, 318], [318, 324], [324, 308], [78, 191], [191, 80], [80, 81], [81, 82], [82, 13], [13, 312], [312, 311], [311, 310], [310, 415], [415, 308],\n];\n\nconst LEFT_EYE_CONNECTIONS: PairArray = [[263, 249], [249, 390], [390, 373], [373, 374], [374, 380], [380, 381], [381, 382], [382, 362], [263, 466], [466, 388], [388, 387], [387, 386], [386, 385], [385, 384], [384, 398], [398, 362]];\n\nconst LEFT_EYEBROW_CONNECTIONS: PairArray = [[276, 283], [283, 282], [282, 295], [295, 285], [300, 293], [293, 334], [334, 296], [296, 336]];\n\nconst LEFT_IRIS_CONNECTIONS: PairArray = [[474, 475], [475, 476], [476, 477], [477, 474]];\n\nconst RIGHT_EYE_CONNECTIONS: PairArray = [[33, 7], [7, 163], [163, 144], [144, 145], [145, 153], [153, 154], [154, 155], [155, 133], [33, 246], [246, 161], [161, 160], [160, 159], [159, 158], [158, 157], [157, 173], [173, 133]];\n\nconst RIGHT_EYEBROW_CONNECTIONS: PairArray = [[46, 53], [53, 52], [52, 65], [65, 55], [70, 63], [63, 105], [105, 66], [66, 107]];\n\nconst RIGHT_IRIS_CONNECTIONS: PairArray = [[469, 470], [470, 471], [471, 472], [472, 469]];\n\nconst FACE_OVAL_CONNECTIONS: PairArray = [\n [10, 338], [338, 297], [297, 332], [332, 284], [284, 251], [251, 389], [389, 356], [356, 454], [454, 323], [323, 361], [361, 288], [288, 397], [397, 365], [365, 379], [379, 378], [378, 400], [400, 377], [377, 152],\n [152, 148], [148, 176], [176, 149], [149, 150], [150, 136], [136, 172], [172, 58], [58, 132], [132, 93], [93, 234], [234, 127], [127, 162], [162, 21], [21, 54], [54, 103], [103, 67], [67, 109], [109, 10],\n];\n\nexport const MEDIAPIPE_FACE_MESH_CONNECTED_KEYPOINTS_PAIRS: PairArray = [\n [127, 34], [34, 139], [139, 127], [11, 0], [0, 37], [37, 11], [232, 231], [231, 120], [120, 232], [72, 37], [37, 39], [39, 72], [128, 121], [121, 47], [47, 128], [232, 121], [121, 128], [128, 232],\n [104, 69], [69, 67], [67, 104], [175, 171], [171, 148], [148, 175], [118, 50], [50, 101], [101, 118], [73, 39], [39, 40], [40, 73], [9, 151], [151, 108], [108, 9], [48, 115], [115, 131], [131, 48],\n [194, 204], [204, 211], [211, 194], [74, 40], [40, 185], [185, 74], [80, 42], [42, 183], [183, 80], [40, 92], [92, 186], [186, 40], [230, 229], [229, 118], [118, 230], [202, 212], [212, 214], [214, 202],\n [83, 18], [18, 17], [17, 83], [76, 61], [61, 146], [146, 76], [160, 29], [29, 30], [30, 160], [56, 157], [157, 173], [173, 56], [106, 204], [204, 194], [194, 106], [135, 214], [214, 192], [192, 135],\n [203, 165], [165, 98], [98, 203], [21, 71], [71, 68], [68, 21], [51, 45], [45, 4], [4, 51], [144, 24], [24, 23], [23, 144], [77, 146], [146, 91], [91, 77], [205, 50], [50, 187], [187, 205],\n [201, 200], [200, 18], [18, 201], [91, 106], [106, 182], [182, 91], [90, 91], [91, 181], [181, 90], [85, 84], [84, 17], [17, 85], [206, 203], [203, 36], [36, 206], [148, 171], [171, 140], [140, 148],\n [92, 40], [40, 39], [39, 92], [193, 189], [189, 244], [244, 193], [159, 158], [158, 28], [28, 159], [247, 246], [246, 161], [161, 247], [236, 3], [3, 196], [196, 236], [54, 68], [68, 104], [104, 54],\n [193, 168], [168, 8], [8, 193], [117, 228], [228, 31], [31, 117], [189, 193], [193, 55], [55, 189], [98, 97], [97, 99], [99, 98], [126, 47], [47, 100], [100, 126], [166, 79], [79, 218], [218, 166],\n [155, 154], [154, 26], [26, 155], [209, 49], [49, 131], [131, 209], [135, 136], [136, 150], [150, 135], [47, 126], [126, 217], [217, 47], [223, 52], [52, 53], [53, 223], [45, 51], [51, 134], [134, 45],\n [211, 170], [170, 140], [140, 211], [67, 69], [69, 108], [108, 67], [43, 106], [106, 91], [91, 43], [230, 119], [119, 120], [120, 230], [226, 130], [130, 247], [247, 226], [63, 53], [53, 52], [52, 63],\n [238, 20], [20, 242], [242, 238], [46, 70], [70, 156], [156, 46], [78, 62], [62, 96], [96, 78], [46, 53], [53, 63], [63, 46], [143, 34], [34, 227], [227, 143], [123, 117], [117, 111], [111, 123],\n [44, 125], [125, 19], [19, 44], [236, 134], [134, 51], [51, 236], [216, 206], [206, 205], [205, 216], [154, 153], [153, 22], [22, 154], [39, 37], [37, 167], [167, 39], [200, 201], [201, 208], [208, 200],\n [36, 142], [142, 100], [100, 36], [57, 212], [212, 202], [202, 57], [20, 60], [60, 99], [99, 20], [28, 158], [158, 157], [157, 28], [35, 226], [226, 113], [113, 35], [160, 159], [159, 27], [27, 160],\n [204, 202], [202, 210], [210, 204], [113, 225], [225, 46], [46, 113], [43, 202], [202, 204], [204, 43], [62, 76], [76, 77], [77, 62], [137, 123], [123, 116], [116, 137], [41, 38], [38, 72], [72, 41],\n [203, 129], [129, 142], [142, 203], [64, 98], [98, 240], [240, 64], [49, 102], [102, 64], [64, 49], [41, 73], [73, 74], [74, 41], [212, 216], [216, 207], [207, 212], [42, 74], [74, 184], [184, 42],\n [169, 170], [170, 211], [211, 169], [170, 149], [149, 176], [176, 170], [105, 66], [66, 69], [69, 105], [122, 6], [6, 168], [168, 122], [123, 147], [147, 187], [187, 123], [96, 77], [77, 90], [90, 96],\n [65, 55], [55, 107], [107, 65], [89, 90], [90, 180], [180, 89], [101, 100], [100, 120], [120, 101], [63, 105], [105, 104], [104, 63], [93, 137], [137, 227], [227, 93], [15, 86], [86, 85], [85, 15],\n [129, 102], [102, 49], [49, 129], [14, 87], [87, 86], [86, 14], [55, 8], [8, 9], [9, 55], [100, 47], [47, 121], [121, 100], [145, 23], [23, 22], [22, 145], [88, 89], [89, 179], [179, 88],\n [6, 122], [122, 196], [196, 6], [88, 95], [95, 96], [96, 88], [138, 172], [172, 136], [136, 138], [215, 58], [58, 172], [172, 215], [115, 48], [48, 219], [219, 115], [42, 80], [80, 81], [81, 42],\n [195, 3], [3, 51], [51, 195], [43, 146], [146, 61], [61, 43], [171, 175], [175, 199], [199, 171], [81, 82], [82, 38], [38, 81], [53, 46], [46, 225], [225, 53], [144, 163], [163, 110], [110, 144],\n [52, 65], [65, 66], [66, 52], [229, 228], [228, 117], [117, 229], [34, 127], [127, 234], [234, 34], [107, 108], [108, 69], [69, 107], [109, 108], [108, 151], [151, 109], [48, 64], [64, 235], [235, 48],\n [62, 78], [78, 191], [191, 62], [129, 209], [209, 126], [126, 129], [111, 35], [35, 143], [143, 111], [117, 123], [123, 50], [50, 117], [222, 65], [65, 52], [52, 222], [19, 125], [125, 141], [141, 19],\n [221, 55], [55, 65], [65, 221], [3, 195], [195, 197], [197, 3], [25, 7], [7, 33], [33, 25], [220, 237], [237, 44], [44, 220], [70, 71], [71, 139], [139, 70], [122, 193], [193, 245], [245, 122],\n [247, 130], [130, 33], [33, 247], [71, 21], [21, 162], [162, 71], [170, 169], [169, 150], [150, 170], [188, 174], [174, 196], [196, 188], [216, 186], [186, 92], [92, 216], [2, 97], [97, 167], [167, 2],\n [141, 125], [125, 241], [241, 141], [164, 167], [167, 37], [37, 164], [72, 38], [38, 12], [12, 72], [38, 82], [82, 13], [13, 38], [63, 68], [68, 71], [71, 63], [226, 35], [35, 111], [111, 226],\n [101, 50], [50, 205], [205, 101], [206, 92], [92, 165], [165, 206], [209, 198], [198, 217], [217, 209], [165, 167], [167, 97], [97, 165], [220, 115], [115, 218], [218, 220], [133, 112], [112, 243], [243, 133],\n [239, 238], [238, 241], [241, 239], [214, 135], [135, 169], [169, 214], [190, 173], [173, 133], [133, 190], [171, 208], [208, 32], [32, 171], [125, 44], [44, 237], [237, 125], [86, 87], [87, 178], [178, 86],\n [85, 86], [86, 179], [179, 85], [84, 85], [85, 180], [180, 84], [83, 84], [84, 181], [181, 83], [201, 83], [83, 182], [182, 201], [137, 93], [93, 132], [132, 137], [76, 62], [62, 183], [183, 76],\n [61, 76], [76, 184], [184, 61], [57, 61], [61, 185], [185, 57], [212, 57], [57, 186], [186, 212], [214, 207], [207, 187], [187, 214], [34, 143], [143, 156], [156, 34], [79, 239], [239, 237], [237, 79],\n [123, 137], [137, 177], [177, 123], [44, 1], [1, 4], [4, 44], [201, 194], [194, 32], [32, 201], [64, 102], [102, 129], [129, 64], [213, 215], [215, 138], [138, 213], [59, 166], [166, 219], [219, 59],\n [242, 99], [99, 97], [97, 242], [2, 94], [94, 141], [141, 2], [75, 59], [59, 235], [235, 75], [24, 110], [110, 228], [228, 24], [25, 130], [130, 226], [226, 25], [23, 24], [24, 229], [229, 23],\n [22, 23], [23, 230], [230, 22], [26, 22], [22, 231], [231, 26], [112, 26], [26, 232], [232, 112], [189, 190], [190, 243], [243, 189], [221, 56], [56, 190], [190, 221], [28, 56], [56, 221], [221, 28],\n [27, 28], [28, 222], [222, 27], [29, 27], [27, 223], [223, 29], [30, 29], [29, 224], [224, 30], [247, 30], [30, 225], [225, 247], [238, 79], [79, 20], [20, 238], [166, 59], [59, 75], [75, 166],\n [60, 75], [75, 240], [240, 60], [147, 177], [177, 215], [215, 147], [20, 79], [79, 166], [166, 20], [187, 147], [147, 213], [213, 187], [112, 233], [233, 244], [244, 112], [233, 128], [128, 245], [245, 233],\n [128, 114], [114, 188], [188, 128], [114, 217], [217, 174], [174, 114], [131, 115], [115, 220], [220, 131], [217, 198], [198, 236], [236, 217], [198, 131], [131, 134], [134, 198], [177, 132], [132, 58], [58, 177],\n [143, 35], [35, 124], [124, 143], [110, 163], [163, 7], [7, 110], [228, 110], [110, 25], [25, 228], [356, 389], [389, 368], [368, 356], [11, 302], [302, 267], [267, 11], [452, 350], [350, 349], [349, 452],\n [302, 303], [303, 269], [269, 302], [357, 343], [343, 277], [277, 357], [452, 453], [453, 357], [357, 452], [333, 332], [332, 297], [297, 333], [175, 152], [152, 377], [377, 175], [347, 348], [348, 330], [330, 347],\n [303, 304], [304, 270], [270, 303], [9, 336], [336, 337], [337, 9], [278, 279], [279, 360], [360, 278], [418, 262], [262, 431], [431, 418], [304, 408], [408, 409], [409, 304], [310, 415], [415, 407], [407, 310],\n [270, 409], [409, 410], [410, 270], [450, 348], [348, 347], [347, 450], [422, 430], [430, 434], [434, 422], [313, 314], [314, 17], [17, 313], [306, 307], [307, 375], [375, 306], [387, 388], [388, 260], [260, 387],\n [286, 414], [414, 398], [398, 286], [335, 406], [406, 418], [418, 335], [364, 367], [367, 416], [416, 364], [423, 358], [358, 327], [327, 423], [251, 284], [284, 298], [298, 251], [281, 5], [5, 4], [4, 281],\n [373, 374], [374, 253], [253, 373], [307, 320], [320, 321], [321, 307], [425, 427], [427, 411], [411, 425], [421, 313], [313, 18], [18, 421], [321, 405], [405, 406], [406, 321], [320, 404], [404, 405], [405, 320],\n [315, 16], [16, 17], [17, 315], [426, 425], [425, 266], [266, 426], [377, 400], [400, 369], [369, 377], [322, 391], [391, 269], [269, 322], [417, 465], [465, 464], [464, 417], [386, 257], [257, 258], [258, 386],\n [466, 260], [260, 388], [388, 466], [456, 399], [399, 419], [419, 456], [284, 332], [332, 333], [333, 284], [417, 285], [285, 8], [8, 417], [346, 340], [340, 261], [261, 346], [413, 441], [441, 285], [285, 413],\n [327, 460], [460, 328], [328, 327], [355, 371], [371, 329], [329, 355], [392, 439], [439, 438], [438, 392], [382, 341], [341, 256], [256, 382], [429, 420], [420, 360], [360, 429], [364, 394], [394, 379], [379, 364],\n [277, 343], [343, 437], [437, 277], [443, 444], [444, 283], [283, 443], [275, 440], [440, 363], [363, 275], [431, 262], [262, 369], [369, 431], [297, 338], [338, 337], [337, 297], [273, 375], [375, 321], [321, 273],\n [450, 451], [451, 349], [349, 450], [446, 342], [342, 467], [467, 446], [293, 334], [334, 282], [282, 293], [458, 461], [461, 462], [462, 458], [276, 353], [353, 383], [383, 276], [308, 324], [324, 325], [325, 308],\n [276, 300], [300, 293], [293, 276], [372, 345], [345, 447], [447, 372], [352, 345], [345, 340], [340, 352], [274, 1], [1, 19], [19, 274], [456, 248], [248, 281], [281, 456], [436, 427], [427, 425], [425, 436],\n [381, 256], [256, 252], [252, 381], [269, 391], [391, 393], [393, 269], [200, 199], [199, 428], [428, 200], [266, 330], [330, 329], [329, 266], [287, 273], [273, 422], [422, 287], [250, 462], [462, 328], [328, 250],\n [258, 286], [286, 384], [384, 258], [265, 353], [353, 342], [342, 265], [387, 259], [259, 257], [257, 387], [424, 431], [431, 430], [430, 424], [342, 353], [353, 276], [276, 342], [273, 335], [335, 424], [424, 273],\n [292, 325], [325, 307], [307, 292], [366, 447], [447, 345], [345, 366], [271, 303], [303, 302], [302, 271], [423, 266], [266, 371], [371, 423], [294, 455], [455, 460], [460, 294], [279, 278], [278, 294], [294, 279],\n [271, 272], [272, 304], [304, 271], [432, 434], [434, 427], [427, 432], [272, 407], [407, 408], [408, 272], [394, 430], [430, 431], [431, 394], [395, 369], [369, 400], [400, 395], [334, 333], [333, 299], [299, 334],\n [351, 417], [417, 168], [168, 351], [352, 280], [280, 411], [411, 352], [325, 319], [319, 320], [320, 325], [295, 296], [296, 336], [336, 295], [319, 403], [403, 404], [404, 319], [330, 348], [348, 349], [349, 330],\n [293, 298], [298, 333], [333, 293], [323, 454], [454, 447], [447, 323], [15, 16], [16, 315], [315, 15], [358, 429], [429, 279], [279, 358], [14, 15], [15, 316], [316, 14], [285, 336], [336, 9], [9, 285],\n [329, 349], [349, 350], [350, 329], [374, 380], [380, 252], [252, 374], [318, 402], [402, 403], [403, 318], [6, 197], [197, 419], [419, 6], [318, 319], [319, 325], [325, 318], [367, 364], [364, 365], [365, 367],\n [435, 367], [367, 397], [397, 435], [344, 438], [438, 439], [439, 344], [272, 271], [271, 311], [311, 272], [195, 5], [5, 281], [281, 195], [273, 287], [287, 291], [291, 273], [396, 428], [428, 199], [199, 396],\n [311, 271], [271, 268], [268, 311], [283, 444], [444, 445], [445, 283], [373, 254], [254, 339], [339, 373], [282, 334], [334, 296], [296, 282], [449, 347], [347, 346], [346, 449], [264, 447], [447, 454], [454, 264],\n [336, 296], [296, 299], [299, 336], [338, 10], [10, 151], [151, 338], [278, 439], [439, 455], [455, 278], [292, 407], [407, 415], [415, 292], [358, 371], [371, 355], [355, 358], [340, 345], [345, 372], [372, 340],\n [346, 347], [347, 280], [280, 346], [442, 443], [443, 282], [282, 442], [19, 94], [94, 370], [370, 19], [441, 442], [442, 295], [295, 441], [248, 419], [419, 197], [197, 248], [263, 255], [255, 359], [359, 263],\n [440, 275], [275, 274], [274, 440], [300, 383], [383, 368], [368, 300], [351, 412], [412, 465], [465, 351], [263, 467], [467, 466], [466, 263], [301, 368], [368, 389], [389, 301], [395, 378], [378, 379], [379, 395],\n [412, 351], [351, 419], [419, 412], [436, 426], [426, 322], [322, 436], [2, 164], [164, 393], [393, 2], [370, 462], [462, 461], [461, 370], [164, 0], [0, 267], [267, 164], [302, 11], [11, 12], [12, 302],\n [268, 12], [12, 13], [13, 268], [293, 300], [300, 301], [301, 293], [446, 261], [261, 340], [340, 446], [330, 266], [266, 425], [425, 330], [426, 423], [423, 391], [391, 426], [429, 355], [355, 437], [437, 429],\n [391, 327], [327, 326], [326, 391], [440, 457], [457, 438], [438, 440], [341, 382], [382, 362], [362, 341], [459, 457], [457, 461], [461, 459], [434, 430], [430, 394], [394, 434], [414, 463], [463, 362], [362, 414],\n [396, 369], [369, 262], [262, 396], [354, 461], [461, 457], [457, 354], [316, 403], [403, 402], [402, 316], [315, 404], [404, 403], [403, 315], [314, 405], [405, 404], [404, 314], [313, 406], [406, 405], [405, 313],\n [421, 418], [418, 406], [406, 421], [366, 401], [401, 361], [361, 366], [306, 408], [408, 407], [407, 306], [291, 409], [409, 408], [408, 291], [287, 410], [410, 409], [409, 287], [432, 436], [436, 410], [410, 432],\n [434, 416], [416, 411], [411, 434], [264, 368], [368, 383], [383, 264], [309, 438], [438, 457], [457, 309], [352, 376], [376, 401], [401, 352], [274, 275], [275, 4], [4, 274], [421, 428], [428, 262], [262, 421],\n [294, 327], [327, 358], [358, 294], [433, 416], [416, 367], [367, 433], [289, 455], [455, 439], [439, 289], [462, 370], [370, 326], [326, 462], [2, 326], [326, 370], [370, 2], [305, 460], [460, 455], [455, 305],\n [254, 449], [449, 448], [448, 254], [255, 261], [261, 446], [446, 255], [253, 450], [450, 449], [449, 253], [252, 451], [451, 450], [450, 252], [256, 452], [452, 451], [451, 256], [341, 453], [453, 452], [452, 341],\n [413, 464], [464, 463], [463, 413], [441, 413], [413, 414], [414, 441], [258, 442], [442, 441], [441, 258], [257, 443], [443, 442], [442, 257], [259, 444], [444, 443], [443, 259], [260, 445], [445, 444], [444, 260],\n [467, 342], [342, 445], [445, 467], [459, 458], [458, 250], [250, 459], [289, 392], [392, 290], [290, 289], [290, 328], [328, 460], [460, 290], [376, 433], [433, 435], [435, 376], [250, 290], [290, 392], [392, 250],\n [411, 416], [416, 433], [433, 411], [341, 463], [463, 464], [464, 341], [453, 464], [464, 465], [465, 453], [357, 465], [465, 412], [412, 357], [343, 412], [412, 399], [399, 343], [360, 363], [363, 440], [440, 360],\n [437, 399], [399, 456], [456, 437], [420, 456], [456, 363], [363, 420], [401, 435], [435, 288], [288, 401], [372, 383], [383, 353], [353, 372], [339, 255], [255, 249], [249, 339], [448, 261], [261, 255], [255, 448],\n [133, 243], [243, 190], [190, 133], [133, 155], [155, 112], [112, 133], [33, 246], [246, 247], [247, 33], [33, 130], [130, 25], [25, 33], [398, 384], [384, 286], [286, 398], [362, 398], [398, 414], [414, 362],\n [362, 463], [463, 341], [341, 362], [263, 359], [359, 467], [467, 263], [263, 249], [249, 255], [255, 263], [466, 467], [467, 260], [260, 466], [75, 60], [60, 166], [166, 75], [238, 239], [239, 79], [79, 238],\n [162, 127], [127, 139], [139, 162], [72, 11], [11, 37], [37, 72], [121, 232], [232, 120], [120, 121], [73, 72], [72, 39], [39, 73], [114, 128], [128, 47], [47, 114], [233, 232], [232, 128], [128, 233],\n [103, 104], [104, 67], [67, 103], [152, 175], [175, 148], [148, 152], [119, 118], [118, 101], [101, 119], [74, 73], [73, 40], [40, 74], [107, 9], [9, 108], [108, 107], [49, 48], [48, 131], [131, 49],\n [32, 194], [194, 211], [211, 32], [184, 74], [74, 185], [185, 184], [191, 80], [80, 183], [183, 191], [185, 40], [40, 186], [186, 185], [119, 230], [230, 118], [118, 119], [210, 202], [202, 214], [214, 210],\n [84, 83], [83, 17], [17, 84], [77, 76], [76, 146], [146, 77], [161, 160], [160, 30], [30, 161], [190, 56], [56, 173], [173, 190], [182, 106], [106, 194], [194, 182], [138, 135], [135, 192], [192, 138],\n [129, 203], [203, 98], [98, 129], [54, 21], [21, 68], [68, 54], [5, 51], [51, 4], [4, 5], [145, 144], [144, 23], [23, 145], [90, 77], [77, 91], [91, 90], [207, 205], [205, 187], [187, 207],\n [83, 201], [201, 18], [18, 83], [181, 91], [91, 182], [182, 181], [180, 90], [90, 181], [181, 180], [16, 85], [85, 17], [17, 16], [205, 206], [206, 36], [36, 205], [176, 148], [148, 140], [140, 176],\n [165, 92], [92, 39], [39, 165], [245, 193], [193, 244], [244, 245], [27, 159], [159, 28], [28, 27], [30, 247], [247, 161], [161, 30], [174, 236], [236, 196], [196, 174], [103, 54], [54, 104], [104, 103],\n [55, 193], [193, 8], [8, 55], [111, 117], [117, 31], [31, 111], [221, 189], [189, 55], [55, 221], [240, 98], [98, 99], [99, 240], [142, 126], [126, 100], [100, 142], [219, 166], [166, 218], [218, 219],\n [112, 155], [155, 26], [26, 112], [198, 209], [209, 131], [131, 198], [169, 135], [135, 150], [150, 169], [114, 47], [47, 217], [217, 114], [224, 223], [223, 53], [53, 224], [220, 45], [45, 134], [134, 220],\n [32, 211], [211, 140], [140, 32], [109, 67], [67, 108], [108, 109], [146, 43], [43, 91], [91, 146], [231, 230], [230, 120], [120, 231], [113, 226], [226, 247], [247, 113], [105, 63], [63, 52], [52, 105],\n [241, 238], [238, 242], [242, 241], [124, 46], [46, 156], [156, 124], [95, 78], [78, 96], [96, 95], [70, 46], [46, 63], [63, 70], [116, 143], [143, 227], [227, 116], [116, 123], [123, 111], [111, 116],\n [1, 44], [44, 19], [19, 1], [3, 236], [236, 51], [51, 3], [207, 216], [216, 205], [205, 207], [26, 154], [154, 22], [22, 26], [165, 39], [39, 167], [167, 165], [199, 200], [200, 208], [208, 199],\n [101, 36], [36, 100], [100, 101], [43, 57], [57, 202], [202, 43], [242, 20], [20, 99], [99, 242], [56, 28], [28, 157], [157, 56], [124, 35], [35, 113], [113, 124], [29, 160], [160, 27], [27, 29],\n [211, 204], [204, 210], [210, 211], [124, 113], [113, 46], [46, 124], [106, 43], [43, 204], [204, 106], [96, 62], [62, 77], [77, 96], [227, 137], [137, 116], [116, 227], [73, 41], [41, 72], [72, 73],\n [36, 203], [203, 142], [142, 36], [235, 64], [64, 240], [240, 235], [48, 49], [49, 64], [64, 48], [42, 41], [41, 74], [74, 42], [214, 212], [212, 207], [207, 214], [183, 42], [42, 184], [184, 183],\n [210, 169], [169, 211], [211, 210], [140, 170], [170, 176], [176, 140], [104, 105], [105, 69], [69, 104], [193, 122], [122, 168], [168, 193], [50, 123], [123, 187], [187, 50], [89, 96], [96, 90], [90, 89],\n [66, 65], [65, 107], [107, 66], [179, 89], [89, 180], [180, 179], [119, 101], [101, 120], [120, 119], [68, 63], [63, 104], [104, 68], [234, 93], [93, 227], [227, 234], [16, 15], [15, 85], [85, 16],\n [209, 129], [129, 49], [49, 209], [15, 14], [14, 86], [86, 15], [107, 55], [55, 9], [9, 107], [120, 100], [100, 121], [121, 120], [153, 145], [145, 22], [22, 153], [178, 88], [88, 179], [179, 178],\n [197, 6], [6, 196], [196, 197], [89, 88], [88, 96], [96, 89], [135, 138], [138, 136], [136, 135], [138, 215], [215, 172], [172, 138], [218, 115], [115, 219], [219, 218], [41, 42], [42, 81], [81, 41],\n [5, 195], [195, 51], [51, 5], [57, 43], [43, 61], [61, 57], [208, 171], [171, 199], [199, 208], [41, 81], [81, 38], [38, 41], [224, 53], [53, 225], [225, 224], [24, 144], [144, 110], [110, 24],\n [105, 52], [52, 66], [66, 105], [118, 229], [229, 117], [117, 118], [227, 34], [34, 234], [234, 227], [66, 107], [107, 69], [69, 66], [10, 109], [109, 151], [151, 10], [219, 48], [48, 235], [235, 219],\n [183, 62], [62, 191], [191, 183], [142, 129], [129, 126], [126, 142], [116, 111], [111, 143], [143, 116], [118, 117], [117, 50], [50, 118], [223, 222], [222, 52], [52, 223], [94, 19], [19, 141], [141, 94],\n [222, 221], [221, 65], [65, 222], [196, 3], [3, 197], [197, 196], [45, 220], [220, 44], [44, 45], [156, 70], [70, 139], [139, 156], [188, 122], [122, 245], [245, 188], [139, 71], [71, 162], [162, 139],\n [149, 170], [170, 150], [150, 149], [122, 188], [188, 196], [196, 122], [206, 216], [216, 92], [92, 206], [164, 2], [2, 167], [167, 164], [242, 141], [141, 241], [241, 242], [0, 164], [164, 37], [37, 0],\n [11, 72], [72, 12], [12, 11], [12, 38], [38, 13], [13, 12], [70, 63], [63, 71], [71, 70], [31, 226], [226, 111], [111, 31], [36, 101], [101, 205], [205, 36], [203, 206], [206, 165], [165, 203],\n [126, 209], [209, 217], [217, 126], [98, 165], [165, 97], [97, 98], [237, 220], [220, 218], [218, 237], [237, 239], [239, 241], [241, 237], [210, 214], [214, 169], [169, 210], [140, 171], [171, 32], [32, 140],\n [241, 125], [125, 237], [237, 241], [179, 86], [86, 178], [178, 179], [180, 85], [85, 179], [179, 180], [181, 84], [84, 180], [180, 181], [182, 83], [83, 181], [181, 182], [194, 201], [201, 182], [182, 194],\n [177, 137], [137, 132], [132, 177], [184, 76], [76, 183], [183, 184], [185, 61], [61, 184], [184, 185], [186, 57], [57, 185], [185, 186], [216, 212], [212, 186], [186, 216], [192, 214], [214, 187], [187, 192],\n [139, 34], [34, 156], [156, 139], [218, 79], [79, 237], [237, 218], [147, 123], [123, 177], [177, 147], [45, 44], [44, 4], [4, 45], [208, 201], [201, 32], [32, 208], [98, 64], [64, 129], [129, 98],\n [192, 213], [213, 138], [138, 192], [235, 59], [59, 219], [219, 235], [141, 242], [242, 97], [97, 141], [97, 2], [2, 141], [141, 97], [240, 75], [75, 235], [235, 240], [229, 24], [24, 228], [228, 229],\n [31, 25], [25, 226], [226, 31], [230, 23], [23, 229], [229, 230], [231, 22], [22, 230], [230, 231], [232, 26], [26, 231], [231, 232], [233, 112], [112, 232], [232, 233], [244, 189], [189, 243], [243, 244],\n [189, 221], [221, 190], [190, 189], [222, 28], [28, 221], [221, 222], [223, 27], [27, 222], [222, 223], [224, 29], [29, 223], [223, 224], [225, 30], [30, 224], [224, 225], [113, 247], [247, 225], [225, 113],\n [99, 60], [60, 240], [240, 99], [213, 147], [147, 215], [215, 213], [60, 20], [20, 166], [166, 60], [192, 187], [187, 213], [213, 192], [243, 112], [112, 244], [244, 243], [244, 233], [233, 245], [245, 244],\n [245, 128], [128, 188], [188, 245], [188, 114], [114, 174], [174, 188], [134, 131], [131, 220], [220, 134], [174, 217], [217, 236], [236, 174], [236, 198], [198, 134], [134, 236], [215, 177], [177, 58], [58, 215],\n [156, 143], [143, 124], [124, 156], [25, 110], [110, 7], [7, 25], [31, 228], [228, 25], [25, 31], [264, 356], [356, 368], [368, 264], [0, 11], [11, 267], [267, 0], [451, 452], [452, 349], [349, 451],\n [267, 302], [302, 269], [269, 267], [350, 357], [357, 277], [277, 350], [350, 452], [452, 357], [357, 350], [299, 333], [333, 297], [297, 299], [396, 175], [175, 377], [377, 396], [280, 347], [347, 330], [330, 280],\n [269, 303], [303, 270], [270, 269], [151, 9], [9, 337], [337, 151], [344, 278], [278, 360], [360, 344], [424, 418], [418, 431], [431, 424], [270, 304], [304, 409], [409, 270], [272, 310], [310, 407], [407, 272],\n [322, 270], [270, 410], [410, 322], [449, 450], [450, 347], [347, 449], [432, 422], [422, 434], [434, 432], [18, 313], [313, 17], [17, 18], [291, 306], [306, 375], [375, 291], [259, 387], [387, 260], [260, 259],\n [424, 335], [335, 418], [418, 424], [434, 364], [364, 416], [416, 434], [391, 423], [423, 327], [327, 391], [301, 251], [251, 298], [298, 301], [275, 281], [281, 4], [4, 275], [254, 373], [373, 253], [253, 254],\n [375, 307], [307, 321], [321, 375], [280, 425], [425, 411], [411, 280], [200, 421], [421, 18], [18, 200], [335, 321], [321, 406], [406, 335], [321, 320], [320, 405], [405, 321], [314, 315], [315, 17], [17, 314],\n [423, 426], [426, 266], [266, 423], [396, 377], [377, 369], [369, 396], [270, 322], [322, 269], [269, 270], [413, 417], [417, 464], [464, 413], [385, 386], [386, 258], [258, 385], [248, 456], [456, 419], [419, 248],\n [298, 284], [284, 333], [333, 298], [168, 417], [417, 8], [8, 168], [448, 346], [346, 261], [261, 448], [417, 413], [413, 285], [285, 417], [326, 327], [327, 328], [328, 326], [277, 355], [355, 329], [329, 277],\n [309, 392], [392, 438], [438, 309], [381, 382], [382, 256], [256, 381], [279, 429], [429, 360], [360, 279], [365, 364], [364, 379], [379, 365], [355, 277], [277, 437], [437, 355], [282, 443], [443, 283], [283, 282],\n [281, 275], [275, 363], [363, 281], [395, 431], [431, 369], [369, 395], [299, 297], [297, 337], [337, 299], [335, 273], [273, 321], [321, 335], [348, 450], [450, 349], [349, 348], [359, 446], [446, 467], [467, 359],\n [283, 293], [293, 282], [282, 283], [250, 458], [458, 462], [462, 250], [300, 276], [276, 383], [383, 300], [292, 308], [308, 325], [325, 292], [283, 276], [276, 293], [293, 283], [264, 372], [372, 447], [447, 264],\n [346, 352], [352, 340], [340, 346], [354, 274], [274, 19], [19, 354], [363, 456], [456, 281], [281, 363], [426, 436], [436, 425], [425, 426], [380, 381], [381, 252], [252, 380], [267, 269], [269, 393], [393, 267],\n [421, 200], [200, 428], [428, 421], [371, 266], [266, 329], [329, 371], [432, 287], [287, 422], [422, 432], [290, 250], [250, 328], [328, 290], [385, 258], [258, 384], [384, 385], [446, 265], [265, 342], [342, 446],\n [386, 387], [387, 257], [257, 386], [422, 424], [424, 430], [430, 422], [445, 342], [342, 276], [276, 445], [422, 273], [273, 424], [424, 422], [306, 292], [292, 307], [307, 306], [352, 366], [366, 345], [345, 352],\n [268, 271], [271, 302], [302, 268], [358, 423], [423, 371], [371, 358], [327, 294], [294, 460], [460, 327], [331, 279], [279, 294], [294, 331], [303, 271], [271, 304], [304, 303], [436, 432], [432, 427], [427, 436],\n [304, 272], [272, 408], [408, 304], [395, 394], [394, 431], [431, 395], [378, 395], [395, 400], [400, 378], [296, 334], [334, 299], [299, 296], [6, 351], [351, 168], [168, 6], [376, 352], [352, 411], [411, 376],\n [307, 325], [325, 320], [320, 307], [285, 295], [295, 336], [336, 285], [320, 319], [319, 404], [404, 320], [329, 330], [330, 349], [349, 329], [334, 293], [293, 333], [333, 334], [366, 323], [323, 447], [447, 366],\n [316, 15], [15, 315], [315, 316], [331, 358], [358, 279], [279, 331], [317, 14], [14, 316], [316, 317], [8, 285], [285, 9], [9, 8], [277, 329], [329, 350], [350, 277], [253, 374], [374, 252], [252, 253],\n [319, 318], [318, 403], [403, 319], [351, 6], [6, 419], [419, 351], [324, 318], [318, 325], [325, 324], [397, 367], [367, 365], [365, 397], [288, 435], [435, 397], [397, 288], [278, 344], [344, 439], [439, 278],\n [310, 272], [272, 311], [311, 310], [248, 195], [195, 281], [281, 248], [375, 273], [273, 291], [291, 375], [175, 396], [396, 199], [199, 175], [312, 311], [311, 268], [268, 312], [276, 283], [283, 445], [445, 276],\n [390, 373], [373, 339], [339, 390], [295, 282], [282, 296], [296, 295], [448, 449], [449, 346], [346, 448], [356, 264], [264, 454], [454, 356], [337, 336], [336, 299], [299, 337], [337, 338], [338, 151], [151, 337],\n [294, 278], [278, 455], [455, 294], [308, 292], [292, 415], [415, 308], [429, 358], [358, 355], [355, 429], [265, 340], [340, 372], [372, 265], [352, 346], [346, 280], [280, 352], [295, 442], [442, 282], [282, 295],\n [354, 19], [19, 370], [370, 354], [285, 441], [441, 295], [295, 285], [195, 248], [248, 197], [197, 195], [457, 440], [440, 274], [274, 457], [301, 300], [300, 368], [368, 301], [417, 351], [351, 465], [465, 417],\n [251, 301], [301, 389], [389, 251], [394, 395], [395, 379], [379, 394], [399, 412], [412, 419], [419, 399], [410, 436], [436, 322], [322, 410], [326, 2], [2, 393], [393, 326], [354, 370], [370, 461], [461, 354],\n [393, 164], [164, 267], [267, 393], [268, 302], [302, 12], [12, 268], [312, 268], [268, 13], [13, 312], [298, 293], [293, 301], [301, 298], [265, 446], [446, 340], [340, 265], [280, 330], [330, 425], [425, 280],\n [322, 426], [426, 391], [391, 322], [420, 429], [429, 437], [437, 420], [393, 391], [391, 326], [326, 393], [344, 440], [440, 438], [438, 344], [458, 459], [459, 461], [461, 458], [364, 434], [434, 394], [394, 364],\n [428, 396], [396, 262], [262, 428], [274, 354], [354, 457], [457, 274], [317, 316], [316, 402], [402, 317], [316, 315], [315, 403], [403, 316], [315, 314], [314, 404], [404, 315], [314, 313], [313, 405], [405, 314],\n [313, 421], [421, 406], [406, 313], [323, 366], [366, 361], [361, 323], [292, 306], [306, 407], [407, 292], [306, 291], [291, 408], [408, 306], [291, 287], [287, 409], [409, 291], [287, 432], [432, 410], [410, 287],\n [427, 434], [434, 411], [411, 427], [372, 264], [264, 383], [383, 372], [459, 309], [309, 457], [457, 459], [366, 352], [352, 401], [401, 366], [1, 274], [274, 4], [4, 1], [418, 421], [421, 262], [262, 418],\n [331, 294], [294, 358], [358, 331], [435, 433], [433, 367], [367, 435], [392, 289], [289, 439], [439, 392], [328, 462], [462, 326], [326, 328], [94, 2], [2, 370], [370, 94], [289, 305], [305, 455], [455, 289],\n [339, 254], [254, 448], [448, 339], [359, 255], [255, 446], [446, 359], [254, 253], [253, 449], [449, 254], [253, 252], [252, 450], [450, 253], [252, 256], [256, 451], [451, 252], [256, 341], [341, 452], [452, 256],\n [414, 413], [413, 463], [463, 414], [286, 441], [441, 414], [414, 286], [286, 258], [258, 441], [441, 286], [258, 257], [257, 442], [442, 258], [257, 259], [259, 443], [443, 257], [259, 260], [260, 444], [444, 259],\n [260, 467], [467, 445], [445, 260], [309, 459], [459, 250], [250, 309], [305, 289], [289, 290], [290, 305], [305, 290], [290, 460], [460, 305], [401, 376], [376, 435], [435, 401], [309, 250], [250, 392], [392, 309],\n [376, 411], [411, 433], [433, 376], [453, 341], [341, 464], [464, 453], [357, 453], [453, 465], [465, 357], [343, 357], [357, 412], [412, 343], [437, 343], [343, 399], [399, 437], [344, 360], [360, 440], [440, 344],\n [420, 437], [437, 456], [456, 420], [360, 420], [420, 363], [363, 360], [361, 401], [401, 288], [288, 361], [265, 372], [372, 353], [353, 265], [390, 339], [339, 249], [249, 390], [339, 448], [448, 255], [255, 339],\n];\n\nfunction connectionsToIndices(connections: PairArray) {\n const indices = connections.map((connection) => connection[0]);\n indices.push(connections[connections.length - 1][1]);\n return indices;\n}\n\nexport const MEDIAPIPE_FACE_MESH_KEYPOINTS_BY_CONTOUR = {\n lips: connectionsToIndices(LIPS_CONNECTIONS),\n leftEye: connectionsToIndices(LEFT_EYE_CONNECTIONS),\n leftEyebrow: connectionsToIndices(LEFT_EYEBROW_CONNECTIONS),\n leftIris: connectionsToIndices(LEFT_IRIS_CONNECTIONS),\n rightEye: connectionsToIndices(RIGHT_EYE_CONNECTIONS),\n rightEyebrow: connectionsToIndices(RIGHT_EYEBROW_CONNECTIONS),\n rightIris: connectionsToIndices(RIGHT_IRIS_CONNECTIONS),\n faceOval: connectionsToIndices(FACE_OVAL_CONNECTIONS),\n};\n\nconst indexLabelPairs: [number, string][] = Object.entries(MEDIAPIPE_FACE_MESH_KEYPOINTS_BY_CONTOUR)\n .map(([label, indices]) => indices.map((index) => [index, label] as [number, string]))\n .flat();\n\nexport const MEDIAPIPE_FACE_MESH_KEYPOINTS = new Map(indexLabelPairs);\n\ntype AssignAverage = number[];\nexport interface LandmarksRefinementConfig {\n indexesMapping: number[]; // Maps indexes of the given set of landmarks to indexes of the resulting set of landmarks. Should be non empty and contain the same amount of indexes as landmarks in the corresponding input\n zRefinement: 'none'|'copy'|AssignAverage; // Z refinement instructions.\n}\n\nexport const LANDMARKS_REFINEMENT_LIPS_CONFIG = [\n 61, 146, 91, 181, 84, 17, 314, 405, 321, 375, 291, // Lower outer.\n 185, 40, 39, 37, 0, 267, 269, 270, 409, // Upper outer(excluding corners).\n 78, 95, 88, 178, 87, 14, 317, 402, 318, 324, 308, // Lower inner.\n 191, 80, 81, 82, 13, 312, 311, 310, 415, // Upper inner(excluding corners).\n 76, 77, 90, 180, 85, 16, 315, 404, 320, 307, 306, // Lower semi - outer.\n 184, 74, 73, 72, 11, 302, 303, 304, 408, // Upper semi - outer(excluding corners).\n 62, 96, 89, 179, 86, 15, 316, 403, 319, 325, 292, // Lower semi - inner.\n 183, 42, 41, 38, 12, 268, 271, 272, 407, // Upper semi - inner(excluding corners).\n];\n\nexport const LANDMARKS_REFINEMENT_LEFT_EYE_CONFIG = [\n 33, 7, 163, 144, 145, 153, 154, 155, 133, // Lower contour.\n 246, 161, 160, 159, 158, 157, 173, // upper contour (excluding corners).\n 130, 25, 110, 24, 23, 22, 26, 112, 243, // Halo x2 lower contour.\n 247, 30, 29, 27, 28, 56, 190, // Halo x2 upper contour (excluding corners).\n 226, 31, 228, 229, 230, 231, 232, 233, 244, // Halo x3 lower contour.\n 113, 225, 224, 223, 222, 221, 189, // Halo x3 upper contour (excluding corners).\n 35, 124, 46, 53, 52, 65, // Halo x4 upper contour (no lower because of mesh structure) or eyebrow inner contour.\n 143, 111, 117, 118, 119, 120, 121, 128, 245, // Halo x5 lower contour.\n 156, 70, 63, 105, 66, 107, 55, 193, // Halo x5 upper contour (excluding corners) or eyebrow outer contour.\n];\n\nexport const LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG = [\n 263, 249, 390, 373, 374, 380, 381, 382, 362, // Lower contour.\n 466, 388, 387, 386, 385, 384, 398, // Upper contour (excluding corners).\n 359, 255, 339, 254, 253, 252, 256, 341, 463, // Halo x2 lower contour.\n 467, 260, 259, 257, 258, 286, 414, // Halo x2 upper contour (excluding corners).\n 446, 261, 448, 449, 450, 451, 452, 453, 464, // Halo x3 lower contour.\n 342, 445, 444, 443, 442, 441, 413, // Halo x3 upper contour (excluding corners).\n 265, 353, 276, 283, 282, 295, // Halo x4 upper contour (no lower because of mesh structure) or/ eyebrow inner contour.\n 372, 340, 346, 347, 348, 349, 350, 357, 465, // Halo x5 lower contour.\n 383, 300, 293, 334, 296, 336, 285, 417, // Halo x5 upper contour (excluding corners) or eyebrow outer contour.\n];\n\nexport const LANDMARKS_REFINEMENT_LEFT_IRIS_CONFIG = [\n 468, // Center.\n 469, // Iris right edge.\n 470, // Iris top edge.\n 471, // Iris left edge.\n 472, // Iris bottom edge.\n];\n/*\nzRefinement: [\n 33, 7, 163, 144, 145, 153, 154, 155, 133, // Lower contour.\n 246, 161, 160, 159, 158, 157, 173, // Upper contour (excluding corners).\n];\n*/\n\nexport const LANDMARKS_REFINEMENT_RIGHT_IRIS_CONFIG = [\n 473, // Center.\n 474, // Iris right edge.\n 475, // Iris top edge.\n 476, // Iris left edge.\n 477, // Iris bottom edge.\n];\n/*\nzRefinement: [\n 263, 249, 390, 373, 374, 380, 381, 382, 362, // Lower contour.\n 466, 388, 387, 386, 385, 384, 398, // Upper contour (excluding corners).\n];\n*/\n", "import * as constants from './constants';\nimport type { Tensor } from '../tfjs/types';\n\nexport async function augment(rawCoords, results: Tensor[]) {\n const t: Record = { // all attention models produce 2d results so it needs to be later augmented with correct z-coords\n // mesh: results[0], // already have it in rawCoords // output_mesh_identity\n // flag: results[1], // already processed in parent // conv_faceflag\n lips: await results.filter((r) => r.size === 160)?.[0]?.data() as Float32Array, // 80 x 2d = 160 // output_lips\n irisL: await results.filter((r) => r.size === 10)?.[0]?.data() as Float32Array, // 5 x 2d = 10 // output_right_iris\n eyeL: await results.filter((r) => r.size === 142)?.[0]?.data() as Float32Array, // 71 x 2d = 142 // output_right_eye\n irisR: await results.filter((r) => r.size === 10)?.[1]?.data() as Float32Array, // 5 x 2d = 10 // output_left_iris\n eyeR: await results.filter((r) => r.size === 142)?.[1]?.data() as Float32Array, // 71 x 2d = 142// output_left_eye\n };\n for (const val of Object.values(t)) {\n if (!val) return rawCoords; // could not find tensor\n }\n\n // augment iris: adds additional 5 keypoints per eye\n const irisLDepth = constants.LANDMARKS_REFINEMENT_LEFT_EYE_CONFIG.reduce((prev, curr) => prev += rawCoords[curr][2], 0) / constants.LANDMARKS_REFINEMENT_LEFT_EYE_CONFIG.length; // get average z-coord for iris\n for (let i = 0; i < t.irisL.length / 2; i++) rawCoords.push([t.irisL[2 * i + 0], t.irisL[2 * i + 1], irisLDepth]);\n const irisRDepth = constants.LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG.reduce((prev, curr) => prev += rawCoords[curr][2], 0) / constants.LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG.length; // get average z-coord for iris\n for (let i = 0; i < t.irisR.length / 2; i++) rawCoords.push([t.irisR[2 * i + 0], t.irisR[2 * i + 1], irisRDepth]);\n\n // augment eyes: replaces eye keypoints based on heuristic mapping\n for (let i = 0; i < t.eyeL.length / 2; i++) rawCoords[constants.LANDMARKS_REFINEMENT_LEFT_EYE_CONFIG[i]] = [t.eyeL[2 * i + 0], t.eyeL[2 * i + 1], rawCoords[constants.LANDMARKS_REFINEMENT_LEFT_EYE_CONFIG[i]][2]];\n for (let i = 0; i < t.eyeR.length / 2; i++) rawCoords[constants.LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG[i]] = [t.eyeR[2 * i + 0], t.eyeR[2 * i + 1], rawCoords[constants.LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG[i]][2]];\n\n // augment lips: replaces eye keypoints based on heuristic mapping\n for (let i = 0; i < t.lips.length / 2; i++) rawCoords[constants.LANDMARKS_REFINEMENT_LIPS_CONFIG[i]] = [t.lips[2 * i + 0], t.lips[2 * i + 1], rawCoords[constants.LANDMARKS_REFINEMENT_LIPS_CONFIG[i]][2]];\n\n return rawCoords;\n}\n", "/**\n * BlazeFace, FaceMesh & Iris model implementation\n *\n * Based on:\n * - [**MediaPipe BlazeFace**](https://drive.google.com/file/d/1f39lSzU5Oq-j_OXgS67KfN5wNsoeAZ4V/view)\n * - Facial Spacial Geometry: [**MediaPipe FaceMesh**](https://drive.google.com/file/d/1VFC_wIpw4O7xBOiTgUldl79d9LA-LsnA/view)\n * - Eye Iris Details: [**MediaPipe Iris**](https://drive.google.com/file/d/1bsWbokp9AklH2ANjCfmjqEzzxO1CNbMu/view)\n */\n\nimport { log, now } from '../util/util';\nimport { loadModel } from '../tfjs/load';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport * as blazeface from './blazeface';\nimport * as util from './facemeshutil';\nimport * as coords from './facemeshcoords';\nimport * as iris from './iris';\nimport * as attention from './attention';\nimport { histogramEqualization } from '../image/enhance';\nimport { env } from '../util/env';\nimport type { GraphModel, Tensor } from '../tfjs/types';\nimport type { FaceResult, FaceLandmark, Point } from '../result';\nimport type { Config } from '../config';\n\ninterface DetectBox { startPoint: Point, endPoint: Point, landmarks: Point[], confidence: number }\n\nconst cache = {\n boxes: [] as DetectBox[],\n skipped: Number.MAX_SAFE_INTEGER,\n timestamp: 0,\n};\n\nlet model: GraphModel | null = null;\nlet inputSize = 0;\n\nexport async function predict(input: Tensor, config: Config): Promise {\n if (!model?.['executor']) return [];\n // reset cached boxes\n const skipTime = (config.face.detector?.skipTime || 0) > (now() - cache.timestamp);\n const skipFrame = cache.skipped < (config.face.detector?.skipFrames || 0);\n if (!config.skipAllowed || !skipTime || !skipFrame || cache.boxes.length === 0) {\n cache.boxes = await blazeface.getBoxes(input, config); // get results from blazeface detector\n cache.timestamp = now();\n cache.skipped = 0;\n } else {\n cache.skipped++;\n }\n const faces: FaceResult[] = [];\n const newCache: DetectBox[] = [];\n let id = 0;\n const size = inputSize;\n for (let i = 0; i < cache.boxes.length; i++) {\n const box = cache.boxes[i];\n let angle = 0;\n let rotationMatrix;\n const face: FaceResult = { // init face result\n id: id++,\n mesh: [],\n meshRaw: [],\n box: [0, 0, 0, 0],\n boxRaw: [0, 0, 0, 0],\n score: 0,\n boxScore: 0,\n faceScore: 0,\n // contoursRaw: [],\n // contours: [],\n annotations: {} as Record,\n };\n\n // optional rotation correction based on detector data only if mesh is disabled otherwise perform it later when we have more accurate mesh data. if no rotation correction this function performs crop\n [angle, rotationMatrix, face.tensor] = util.correctFaceRotation(config.face.detector?.rotation, box, input, config.face.mesh?.enabled ? inputSize : blazeface.size());\n if (config.filter.equalization) {\n const equilized = face.tensor ? await histogramEqualization(face.tensor) : undefined;\n tf.dispose(face.tensor);\n if (equilized) face.tensor = equilized;\n }\n face.boxScore = Math.round(100 * box.confidence) / 100;\n if (!config.face.mesh?.enabled) { // mesh not enabled, return resuts from detector only\n face.box = util.clampBox(box, input);\n face.boxRaw = util.getRawBox(box, input);\n face.score = face.boxScore;\n face.mesh = box.landmarks.map((pt) => [\n ((box.startPoint[0] + box.endPoint[0])) / 2 + ((box.endPoint[0] + box.startPoint[0]) * pt[0] / blazeface.size()),\n ((box.startPoint[1] + box.endPoint[1])) / 2 + ((box.endPoint[1] + box.startPoint[1]) * pt[1] / blazeface.size()),\n ]);\n face.meshRaw = face.mesh.map((pt) => [pt[0] / (input.shape[2] || 0), pt[1] / (input.shape[1] || 0), (pt[2] || 0) / size]);\n for (const key of Object.keys(coords.blazeFaceLandmarks)) {\n face.annotations[key] = [face.mesh[coords.blazeFaceLandmarks[key] as number]]; // add annotations\n }\n } else if (!model) { // mesh enabled, but not loaded\n if (config.debug) log('face mesh detection requested, but model is not loaded');\n } else { // mesh enabled\n if (config.face.attention?.enabled && !env.kernels.includes('atan2')) {\n config.face.attention.enabled = false;\n tf.dispose(face.tensor);\n return faces;\n }\n const results = model.execute(face.tensor as Tensor) as Tensor[];\n const confidenceT = results.find((t) => t.shape[t.shape.length - 1] === 1) as Tensor;\n const faceConfidence = await confidenceT.data();\n face.faceScore = Math.round(100 * faceConfidence[0]) / 100;\n if (face.faceScore < (config.face.detector?.minConfidence || 1)) { // low confidence in detected mesh\n box.confidence = face.faceScore; // reset confidence of cached box\n if (config.face.mesh.keepInvalid) {\n face.box = util.clampBox(box, input);\n face.boxRaw = util.getRawBox(box, input);\n face.score = face.boxScore;\n face.mesh = box.landmarks.map((pt) => [\n ((box.startPoint[0] + box.endPoint[0])) / 2 + ((box.endPoint[0] + box.startPoint[0]) * pt[0] / blazeface.size()),\n ((box.startPoint[1] + box.endPoint[1])) / 2 + ((box.endPoint[1] + box.startPoint[1]) * pt[1] / blazeface.size()),\n ]);\n face.meshRaw = face.mesh.map((pt) => [pt[0] / (input.shape[2] || 1), pt[1] / (input.shape[1] || 1), (pt[2] || 0) / size]);\n for (const key of Object.keys(coords.blazeFaceLandmarks)) {\n face.annotations[key] = [face.mesh[coords.blazeFaceLandmarks[key] as number]]; // add annotations\n }\n }\n } else {\n const meshT = results.find((t) => t.shape[t.shape.length - 1] === 1404) as Tensor;\n const coordsReshaped = tf.reshape(meshT, [-1, 3]);\n let rawCoords = await coordsReshaped.array();\n tf.dispose(coordsReshaped);\n if (config.face.attention?.enabled) {\n rawCoords = await attention.augment(rawCoords, results); // augment iris results using attention model results\n } else if (config.face.iris?.enabled) {\n rawCoords = await iris.augmentIris(rawCoords, face.tensor, inputSize); // run iris model and augment results\n }\n face.mesh = util.transformRawCoords(rawCoords, box, angle, rotationMatrix, inputSize); // get processed mesh\n face.meshRaw = face.mesh.map((pt) => [pt[0] / (input.shape[2] || 0), pt[1] / (input.shape[1] || 0), (pt[2] || 0) / size]);\n for (const key of Object.keys(coords.meshAnnotations)) face.annotations[key] = coords.meshAnnotations[key].map((index) => face.mesh[index]); // add annotations\n face.score = face.faceScore;\n const calculatedBox = { ...util.calculateFaceBox(face.mesh, box), confidence: box.confidence, landmarks: box.landmarks };\n face.box = util.clampBox(calculatedBox, input);\n face.boxRaw = util.getRawBox(calculatedBox, input);\n /*\n const contoursT = results.find((t) => t.shape[t.shape.length - 1] === 266) as Tensor;\n const contoursData = contoursT && await contoursT.data(); // 133 x 2d points\n face.contoursRaw = [];\n for (let j = 0; j < contoursData.length / 2; j++) face.contoursRaw.push([contoursData[2 * j + 0] / inputSize, contoursData[2 * j + 1] / inputSize]);\n face.contours = face.contoursRaw.map((c) => [Math.trunc((input.shape[2] || 1) * c[0]), Math.trunc((input.shape[1] || 1) * c[1])]);\n */\n newCache.push(calculatedBox);\n }\n tf.dispose(results);\n }\n if (face.score > (config.face.detector?.minConfidence || 1)) faces.push(face);\n else tf.dispose(face.tensor);\n }\n cache.boxes = newCache; // reset cache\n return faces;\n}\n\nexport async function load(config: Config): Promise {\n if (env.initial) model = null;\n if (config.face.attention?.enabled && model?.['signature']) {\n if (Object.keys(model?.['signature']?.outputs || {}).length < 6) model = null;\n }\n if (!model) {\n if (config.face.attention?.enabled) model = await loadModel(config.face.attention.modelPath);\n else model = await loadModel(config.face.mesh?.modelPath);\n } else if (config.debug) {\n log('cached model:', model['modelUrl']);\n }\n inputSize = (model['executor'] && model?.inputs?.[0].shape) ? model?.inputs?.[0].shape[2] : 256;\n return model;\n}\n\nexport const triangulation = coords.TRI468;\nexport const uvmap = coords.UV468;\n", "/**\n * FaceRes model implementation\n *\n * Returns Age, Gender, Descriptor\n * Implements Face simmilarity function\n *\n * Based on: [**HSE-FaceRes**](https://github.com/HSE-asavchenko/HSE_FaceRec_tf)\n */\n\nimport { log, now } from '../util/util';\nimport { env } from '../util/env';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport { loadModel } from '../tfjs/load';\nimport { constants } from '../tfjs/constants';\nimport type { Tensor, GraphModel } from '../tfjs/types';\nimport type { Config } from '../config';\nimport type { Gender, Race } from '../result';\n\nexport interface FaceRes { age: number, gender: Gender, genderScore: number, descriptor: number[], race?: { score: number, race: Race }[] }\n\nlet model: GraphModel | null;\nconst last: FaceRes[] = [];\n\nlet lastTime = 0;\nlet lastCount = 0;\nlet skipped = Number.MAX_SAFE_INTEGER;\n\nexport async function load(config: Config): Promise {\n if (env.initial) model = null;\n if (!model) model = await loadModel(config.face.description?.modelPath);\n else if (config.debug) log('cached model:', model['modelUrl']);\n return model;\n}\n\nexport function enhance(input): Tensor {\n const tensor = (input.image || input.tensor || input) as Tensor; // input received from detector is already normalized to 0..1, input is also assumed to be straightened\n if (!model?.inputs[0].shape) return tensor; // model has no shape so no point continuing\n const crop: Tensor = tf.image.resizeBilinear(tensor, [model.inputs[0].shape[2], model.inputs[0].shape[1]], false);\n const norm: Tensor = tf.mul(crop, constants.tf255);\n tf.dispose(crop);\n return norm;\n /*\n // do a tight crop of image and resize it to fit the model\n const box = [[0.05, 0.15, 0.85, 0.85]]; // empyrical values for top, left, bottom, right\n const crop = (tensor.shape.length === 3)\n ? tf.image.cropAndResize(tf.expandDims(tensor, 0), box, [0], [model.inputs[0].shape[2], model.inputs[0].shape[1]]) // add batch dimension if missing\n : tf.image.cropAndResize(tensor, box, [0], [model.inputs[0].shape[2], model.inputs[0].shape[1]]);\n */\n /*\n // convert to black&white to avoid colorization impact\n const rgb = [0.2989, 0.5870, 0.1140]; // factors for red/green/blue colors when converting to grayscale: https://www.mathworks.com/help/matlab/ref/rgb2gray.html\n const [red, green, blue] = tf.split(crop, 3, 3);\n const redNorm = tf.mul(red, rgb[0]);\n const greenNorm = tf.mul(green, rgb[1]);\n const blueNorm = tf.mul(blue, rgb[2]);\n const grayscale = tf.addN([redNorm, greenNorm, blueNorm]);\n const merge = tf.stack([grayscale, grayscale, grayscale], 3).squeeze(4);\n */\n}\n\nexport async function predict(image: Tensor, config: Config, idx: number, count: number): Promise {\n const obj: FaceRes = {\n age: 0 as number,\n gender: 'unknown' as Gender,\n genderScore: 0 as number,\n descriptor: [] as number[],\n };\n if (!model?.['executor']) return obj;\n const skipFrame = skipped < (config.face.description?.skipFrames || 0);\n const skipTime = (config.face.description?.skipTime || 0) > (now() - lastTime);\n if (config.skipAllowed && skipFrame && skipTime && (lastCount === count) && (last?.[idx]?.age > 0) && (last?.[idx]?.genderScore > 0)) {\n skipped++;\n return last[idx];\n }\n skipped = 0;\n return new Promise(async (resolve) => {\n if (config.face.description?.enabled) {\n const enhanced = enhance(image);\n const resT = model?.execute(enhanced) as Tensor[];\n lastTime = now();\n tf.dispose(enhanced);\n const genderT = resT.find((t) => t.shape[1] === 1) as Tensor;\n const gender = await genderT.data();\n const confidence = Math.trunc(200 * Math.abs((gender[0] - 0.5))) / 100;\n if (confidence > (config.face.description.minConfidence || 0)) {\n obj.gender = gender[0] <= 0.5 ? 'female' : 'male';\n obj.genderScore = Math.min(0.99, confidence);\n }\n const argmax = tf.argMax(resT.find((t) => t.shape[1] === 100), 1);\n const ageIdx: number = (await argmax.data())[0];\n tf.dispose(argmax);\n const ageT = resT.find((t) => t.shape[1] === 100) as Tensor;\n const all = await ageT.data();\n obj.age = Math.round(all[ageIdx - 1] > all[ageIdx + 1] ? 10 * ageIdx - 100 * all[ageIdx - 1] : 10 * ageIdx + 100 * all[ageIdx + 1]) / 10;\n\n if (Number.isNaN(gender[0]) || Number.isNaN(all[0])) log('faceres error:', { model, result: resT });\n\n const desc = resT.find((t) => t.shape[1] === 1024);\n // const reshape = desc.reshape([128, 8]); // reshape large 1024-element descriptor to 128 x 8\n // const reduce = reshape.logSumExp(1); // reduce 2nd dimension by calculating logSumExp on it which leaves us with 128-element descriptor\n const descriptor = desc ? await desc.data() : [] as number[];\n obj.descriptor = Array.from(descriptor);\n resT.forEach((t) => tf.dispose(t));\n }\n last[idx] = obj;\n lastCount = count;\n resolve(obj);\n });\n}\n", "/**\n * GEAR [gender/emotion/age/race] model implementation\n *\n * Based on: [**GEAR Predictor**](https://github.com/Udolf15/GEAR-Predictor)\n */\n\nimport { log, now } from '../util/util';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport { loadModel } from '../tfjs/load';\nimport type { Gender, Race } from '../result';\nimport type { Config } from '../config';\nimport type { GraphModel, Tensor } from '../tfjs/types';\nimport { env } from '../util/env';\n\nexport interface GearType { age: number, gender: Gender, genderScore: number, race: { score: number, race: Race }[] }\nlet model: GraphModel | null;\nconst last: GearType[] = [];\nconst raceNames = ['white', 'black', 'asian', 'indian', 'other'];\nconst ageWeights = [15, 23, 28, 35.5, 45.5, 55.5, 65];\nlet lastCount = 0;\nlet lastTime = 0;\nlet skipped = Number.MAX_SAFE_INTEGER;\n\nexport async function load(config: Config) {\n if (env.initial) model = null;\n if (!model) model = await loadModel(config.face.gear?.modelPath);\n else if (config.debug) log('cached model:', model['modelUrl']);\n return model;\n}\n\nexport async function predict(image: Tensor, config: Config, idx: number, count: number): Promise {\n if (!model) return { age: 0, gender: 'unknown', genderScore: 0, race: [] };\n const skipFrame = skipped < (config.face.gear?.skipFrames || 0);\n const skipTime = (config.face.gear?.skipTime || 0) > (now() - lastTime);\n if (config.skipAllowed && skipTime && skipFrame && (lastCount === count) && last[idx]) {\n skipped++;\n return last[idx];\n }\n skipped = 0;\n return new Promise(async (resolve) => {\n if (!model?.inputs[0].shape) return;\n const t: Record = {};\n // t.resize = tf.image.resizeBilinear(image, [model?.inputs[0].shape[2], model?.inputs[0].shape[1]], false);\n const box = [[0.0, 0.10, 0.90, 0.90]]; // empyrical values for top, left, bottom, right\n t.resize = tf.image.cropAndResize(image, box, [0], [model.inputs[0].shape[2], model.inputs[0].shape[1]]);\n const obj: GearType = { age: 0, gender: 'unknown', genderScore: 0, race: [] };\n if (config.face.gear?.enabled) [t.age, t.gender, t.race] = model.execute(t.resize, ['age_output', 'gender_output', 'race_output']) as Tensor[];\n const gender = await t.gender.data();\n obj.gender = gender[0] > gender[1] ? 'male' : 'female';\n obj.genderScore = Math.round(100 * (gender[0] > gender[1] ? gender[0] : gender[1])) / 100;\n const race = await t.race.data();\n for (let i = 0; i < race.length; i++) {\n if (race[i] > (config.face.gear?.minConfidence || 0.2)) obj.race.push({ score: Math.round(100 * race[i]) / 100, race: raceNames[i] as Race });\n }\n obj.race.sort((a, b) => b.score - a.score);\n // {0: 'Below20', 1: '21-25', 2: '26-30', 3: '31-40',4: '41-50', 5: '51-60', 6: 'Above60'}\n const ageDistribution = Array.from(await t.age.data());\n const ageSorted = ageDistribution.map((a, i) => [ageWeights[i], a]).sort((a, b) => b[1] - a[1]);\n let age = ageSorted[0][0]; // pick best starting point\n for (let i = 1; i < ageSorted.length; i++) age += ageSorted[i][1] * (ageSorted[i][0] - age); // adjust with each other choice by weight\n obj.age = Math.round(10 * age) / 10;\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n last[idx] = obj;\n lastCount = count;\n lastTime = now();\n resolve(obj);\n });\n}\n", "import * as tf from '../../dist/tfjs.esm.js';\nimport type { Point } from '../result';\n\nexport function getBoxSize(box) {\n return [\n Math.abs(box.endPoint[0] - box.startPoint[0]),\n Math.abs(box.endPoint[1] - box.startPoint[1]),\n ];\n}\n\nexport function getBoxCenter(box) {\n return [\n box.startPoint[0] + (box.endPoint[0] - box.startPoint[0]) / 2,\n box.startPoint[1] + (box.endPoint[1] - box.startPoint[1]) / 2,\n ];\n}\n\nexport function cutBoxFromImageAndResize(box, image, cropSize) {\n const h = image.shape[1];\n const w = image.shape[2];\n const boxes = [[\n box.startPoint[1] / h,\n box.startPoint[0] / w,\n box.endPoint[1] / h,\n box.endPoint[0] / w,\n ]];\n return tf.image.cropAndResize(image, boxes, [0], cropSize);\n}\n\nexport function scaleBoxCoordinates(box, factor) {\n const startPoint = [box.startPoint[0] * factor[0], box.startPoint[1] * factor[1]] as Point;\n const endPoint = [box.endPoint[0] * factor[0], box.endPoint[1] * factor[1]] as Point;\n const palmLandmarks = box.palmLandmarks.map((coord) => {\n const scaledCoord = [coord[0] * factor[0], coord[1] * factor[1]];\n return scaledCoord;\n });\n return { startPoint, endPoint, palmLandmarks, confidence: box.confidence };\n}\n\nexport function enlargeBox(box, factor = 1.5) {\n const center = getBoxCenter(box);\n const size = getBoxSize(box);\n const newHalfSize = [factor * size[0] / 2, factor * size[1] / 2];\n const startPoint = [center[0] - newHalfSize[0], center[1] - newHalfSize[1]] as Point;\n const endPoint = [center[0] + newHalfSize[0], center[1] + newHalfSize[1]] as Point;\n return { startPoint, endPoint, palmLandmarks: box.palmLandmarks };\n}\n\nexport function squarifyBox(box) {\n const centers = getBoxCenter(box);\n const size = getBoxSize(box);\n const maxEdge = Math.max(...size);\n const halfSize = maxEdge / 2;\n const startPoint = [centers[0] - halfSize, centers[1] - halfSize] as Point;\n const endPoint = [centers[0] + halfSize, centers[1] + halfSize] as Point;\n return { startPoint, endPoint, palmLandmarks: box.palmLandmarks };\n}\n\nexport function shiftBox(box, shiftFactor) {\n const boxSize = [\n box.endPoint[0] - box.startPoint[0],\n box.endPoint[1] - box.startPoint[1],\n ];\n const shiftVector = [boxSize[0] * shiftFactor[0], boxSize[1] * shiftFactor[1]];\n const startPoint = [box.startPoint[0] + shiftVector[0], box.startPoint[1] + shiftVector[1]] as Point;\n const endPoint = [box.endPoint[0] + shiftVector[0], box.endPoint[1] + shiftVector[1]] as Point;\n return { startPoint, endPoint, palmLandmarks: box.palmLandmarks };\n}\n\nexport function normalizeRadians(angle) {\n return angle - 2 * Math.PI * Math.floor((angle + Math.PI) / (2 * Math.PI));\n}\n\nexport function computeRotation(point1, point2) {\n const radians = Math.PI / 2 - Math.atan2(-(point2[1] - point1[1]), point2[0] - point1[0]);\n return normalizeRadians(radians);\n}\n\nexport const buildTranslationMatrix = (x, y) => [[1, 0, x], [0, 1, y], [0, 0, 1]];\n\nexport function dot(v1, v2) {\n let product = 0;\n for (let i = 0; i < v1.length; i++) {\n product += v1[i] * v2[i];\n }\n return product;\n}\n\nexport function getColumnFrom2DArr(arr, columnIndex) {\n const column: number[] = [];\n for (let i = 0; i < arr.length; i++) {\n column.push(arr[i][columnIndex]);\n }\n return column;\n}\n\nexport function multiplyTransformMatrices(mat1, mat2) {\n const product: number[][] = [];\n const size = mat1.length;\n for (let row = 0; row < size; row++) {\n product.push([]);\n for (let col = 0; col < size; col++) {\n product[row].push(dot(mat1[row], getColumnFrom2DArr(mat2, col)));\n }\n }\n return product;\n}\n\nexport function buildRotationMatrix(rotation, center) {\n const cosA = Math.cos(rotation);\n const sinA = Math.sin(rotation);\n const rotationMatrix = [[cosA, -sinA, 0], [sinA, cosA, 0], [0, 0, 1]];\n const translationMatrix = buildTranslationMatrix(center[0], center[1]);\n const translationTimesRotation = multiplyTransformMatrices(translationMatrix, rotationMatrix);\n const negativeTranslationMatrix = buildTranslationMatrix(-center[0], -center[1]);\n return multiplyTransformMatrices(translationTimesRotation, negativeTranslationMatrix);\n}\n\nexport function invertTransformMatrix(matrix) {\n const rotationComponent = [[matrix[0][0], matrix[1][0]], [matrix[0][1], matrix[1][1]]];\n const translationComponent = [matrix[0][2], matrix[1][2]];\n const invertedTranslation = [\n -dot(rotationComponent[0], translationComponent),\n -dot(rotationComponent[1], translationComponent),\n ];\n return [\n rotationComponent[0].concat(invertedTranslation[0]),\n rotationComponent[1].concat(invertedTranslation[1]),\n [0, 0, 1],\n ];\n}\n\nexport function rotatePoint(homogeneousCoordinate, rotationMatrix) {\n return [\n dot(homogeneousCoordinate, rotationMatrix[0]),\n dot(homogeneousCoordinate, rotationMatrix[1]),\n ];\n}\n", "/**\n * HandPose model implementation constants\n * See `handpose.ts` for entry point\n */\n\nexport const anchors = [\n { x: 0.015625, y: 0.015625 },\n { x: 0.015625, y: 0.015625 },\n { x: 0.046875, y: 0.015625 },\n { x: 0.046875, y: 0.015625 },\n { x: 0.078125, y: 0.015625 },\n { x: 0.078125, y: 0.015625 },\n { x: 0.109375, y: 0.015625 },\n { x: 0.109375, y: 0.015625 },\n { x: 0.140625, y: 0.015625 },\n { x: 0.140625, y: 0.015625 },\n { x: 0.171875, y: 0.015625 },\n { x: 0.171875, y: 0.015625 },\n { x: 0.203125, y: 0.015625 },\n { x: 0.203125, y: 0.015625 },\n { x: 0.234375, y: 0.015625 },\n { x: 0.234375, y: 0.015625 },\n { x: 0.265625, y: 0.015625 },\n { x: 0.265625, y: 0.015625 },\n { x: 0.296875, y: 0.015625 },\n { x: 0.296875, y: 0.015625 },\n { x: 0.328125, y: 0.015625 },\n { x: 0.328125, y: 0.015625 },\n { x: 0.359375, y: 0.015625 },\n { x: 0.359375, y: 0.015625 },\n { x: 0.390625, y: 0.015625 },\n { x: 0.390625, y: 0.015625 },\n { x: 0.421875, y: 0.015625 },\n { x: 0.421875, y: 0.015625 },\n { x: 0.453125, y: 0.015625 },\n { x: 0.453125, y: 0.015625 },\n { x: 0.484375, y: 0.015625 },\n { x: 0.484375, y: 0.015625 },\n { x: 0.515625, y: 0.015625 },\n { x: 0.515625, y: 0.015625 },\n { x: 0.546875, y: 0.015625 },\n { x: 0.546875, y: 0.015625 },\n { x: 0.578125, y: 0.015625 },\n { x: 0.578125, y: 0.015625 },\n { x: 0.609375, y: 0.015625 },\n { x: 0.609375, y: 0.015625 },\n { x: 0.640625, y: 0.015625 },\n { x: 0.640625, y: 0.015625 },\n { x: 0.671875, y: 0.015625 },\n { x: 0.671875, y: 0.015625 },\n { x: 0.703125, y: 0.015625 },\n { x: 0.703125, y: 0.015625 },\n { x: 0.734375, y: 0.015625 },\n { x: 0.734375, y: 0.015625 },\n { x: 0.765625, y: 0.015625 },\n { x: 0.765625, y: 0.015625 },\n { x: 0.796875, y: 0.015625 },\n { x: 0.796875, y: 0.015625 },\n { x: 0.828125, y: 0.015625 },\n { x: 0.828125, y: 0.015625 },\n { x: 0.859375, y: 0.015625 },\n { x: 0.859375, y: 0.015625 },\n { x: 0.890625, y: 0.015625 },\n { x: 0.890625, y: 0.015625 },\n { x: 0.921875, y: 0.015625 },\n { x: 0.921875, y: 0.015625 },\n { x: 0.953125, y: 0.015625 },\n { x: 0.953125, y: 0.015625 },\n { x: 0.984375, y: 0.015625 },\n { x: 0.984375, y: 0.015625 },\n { x: 0.015625, y: 0.046875 },\n { x: 0.015625, y: 0.046875 },\n { x: 0.046875, y: 0.046875 },\n { x: 0.046875, y: 0.046875 },\n { x: 0.078125, y: 0.046875 },\n { x: 0.078125, y: 0.046875 },\n { x: 0.109375, y: 0.046875 },\n { x: 0.109375, y: 0.046875 },\n { x: 0.140625, y: 0.046875 },\n { x: 0.140625, y: 0.046875 },\n { x: 0.171875, y: 0.046875 },\n { x: 0.171875, y: 0.046875 },\n { x: 0.203125, y: 0.046875 },\n { x: 0.203125, y: 0.046875 },\n { x: 0.234375, y: 0.046875 },\n { x: 0.234375, y: 0.046875 },\n { x: 0.265625, y: 0.046875 },\n { x: 0.265625, y: 0.046875 },\n { x: 0.296875, y: 0.046875 },\n { x: 0.296875, y: 0.046875 },\n { x: 0.328125, y: 0.046875 },\n { x: 0.328125, y: 0.046875 },\n { x: 0.359375, y: 0.046875 },\n { x: 0.359375, y: 0.046875 },\n { x: 0.390625, y: 0.046875 },\n { x: 0.390625, y: 0.046875 },\n { x: 0.421875, y: 0.046875 },\n { x: 0.421875, y: 0.046875 },\n { x: 0.453125, y: 0.046875 },\n { x: 0.453125, y: 0.046875 },\n { x: 0.484375, y: 0.046875 },\n { x: 0.484375, y: 0.046875 },\n { x: 0.515625, y: 0.046875 },\n { x: 0.515625, y: 0.046875 },\n { x: 0.546875, y: 0.046875 },\n { x: 0.546875, y: 0.046875 },\n { x: 0.578125, y: 0.046875 },\n { x: 0.578125, y: 0.046875 },\n { x: 0.609375, y: 0.046875 },\n { x: 0.609375, y: 0.046875 },\n { x: 0.640625, y: 0.046875 },\n { x: 0.640625, y: 0.046875 },\n { x: 0.671875, y: 0.046875 },\n { x: 0.671875, y: 0.046875 },\n { x: 0.703125, y: 0.046875 },\n { x: 0.703125, y: 0.046875 },\n { x: 0.734375, y: 0.046875 },\n { x: 0.734375, y: 0.046875 },\n { x: 0.765625, y: 0.046875 },\n { x: 0.765625, y: 0.046875 },\n { x: 0.796875, y: 0.046875 },\n { x: 0.796875, y: 0.046875 },\n { x: 0.828125, y: 0.046875 },\n { x: 0.828125, y: 0.046875 },\n { x: 0.859375, y: 0.046875 },\n { x: 0.859375, y: 0.046875 },\n { x: 0.890625, y: 0.046875 },\n { x: 0.890625, y: 0.046875 },\n { x: 0.921875, y: 0.046875 },\n { x: 0.921875, y: 0.046875 },\n { x: 0.953125, y: 0.046875 },\n { x: 0.953125, y: 0.046875 },\n { x: 0.984375, y: 0.046875 },\n { x: 0.984375, y: 0.046875 },\n { x: 0.015625, y: 0.078125 },\n { x: 0.015625, y: 0.078125 },\n { x: 0.046875, y: 0.078125 },\n { x: 0.046875, y: 0.078125 },\n { x: 0.078125, y: 0.078125 },\n { x: 0.078125, y: 0.078125 },\n { x: 0.109375, y: 0.078125 },\n { x: 0.109375, y: 0.078125 },\n { x: 0.140625, y: 0.078125 },\n { x: 0.140625, y: 0.078125 },\n { x: 0.171875, y: 0.078125 },\n { x: 0.171875, y: 0.078125 },\n { x: 0.203125, y: 0.078125 },\n { x: 0.203125, y: 0.078125 },\n { x: 0.234375, y: 0.078125 },\n { x: 0.234375, y: 0.078125 },\n { x: 0.265625, y: 0.078125 },\n { x: 0.265625, y: 0.078125 },\n { x: 0.296875, y: 0.078125 },\n { x: 0.296875, y: 0.078125 },\n { x: 0.328125, y: 0.078125 },\n { x: 0.328125, y: 0.078125 },\n { x: 0.359375, y: 0.078125 },\n { x: 0.359375, y: 0.078125 },\n { x: 0.390625, y: 0.078125 },\n { x: 0.390625, y: 0.078125 },\n { x: 0.421875, y: 0.078125 },\n { x: 0.421875, y: 0.078125 },\n { x: 0.453125, y: 0.078125 },\n { x: 0.453125, y: 0.078125 },\n { x: 0.484375, y: 0.078125 },\n { x: 0.484375, y: 0.078125 },\n { x: 0.515625, y: 0.078125 },\n { x: 0.515625, y: 0.078125 },\n { x: 0.546875, y: 0.078125 },\n { x: 0.546875, y: 0.078125 },\n { x: 0.578125, y: 0.078125 },\n { x: 0.578125, y: 0.078125 },\n { x: 0.609375, y: 0.078125 },\n { x: 0.609375, y: 0.078125 },\n { x: 0.640625, y: 0.078125 },\n { x: 0.640625, y: 0.078125 },\n { x: 0.671875, y: 0.078125 },\n { x: 0.671875, y: 0.078125 },\n { x: 0.703125, y: 0.078125 },\n { x: 0.703125, y: 0.078125 },\n { x: 0.734375, y: 0.078125 },\n { x: 0.734375, y: 0.078125 },\n { x: 0.765625, y: 0.078125 },\n { x: 0.765625, y: 0.078125 },\n { x: 0.796875, y: 0.078125 },\n { x: 0.796875, y: 0.078125 },\n { x: 0.828125, y: 0.078125 },\n { x: 0.828125, y: 0.078125 },\n { x: 0.859375, y: 0.078125 },\n { x: 0.859375, y: 0.078125 },\n { x: 0.890625, y: 0.078125 },\n { x: 0.890625, y: 0.078125 },\n { x: 0.921875, y: 0.078125 },\n { x: 0.921875, y: 0.078125 },\n { x: 0.953125, y: 0.078125 },\n { x: 0.953125, y: 0.078125 },\n { x: 0.984375, y: 0.078125 },\n { x: 0.984375, y: 0.078125 },\n { x: 0.015625, y: 0.109375 },\n { x: 0.015625, y: 0.109375 },\n { x: 0.046875, y: 0.109375 },\n { x: 0.046875, y: 0.109375 },\n { x: 0.078125, y: 0.109375 },\n { x: 0.078125, y: 0.109375 },\n { x: 0.109375, y: 0.109375 },\n { x: 0.109375, y: 0.109375 },\n { x: 0.140625, y: 0.109375 },\n { x: 0.140625, y: 0.109375 },\n { x: 0.171875, y: 0.109375 },\n { x: 0.171875, y: 0.109375 },\n { x: 0.203125, y: 0.109375 },\n { x: 0.203125, y: 0.109375 },\n { x: 0.234375, y: 0.109375 },\n { x: 0.234375, y: 0.109375 },\n { x: 0.265625, y: 0.109375 },\n { x: 0.265625, y: 0.109375 },\n { x: 0.296875, y: 0.109375 },\n { x: 0.296875, y: 0.109375 },\n { x: 0.328125, y: 0.109375 },\n { x: 0.328125, y: 0.109375 },\n { x: 0.359375, y: 0.109375 },\n { x: 0.359375, y: 0.109375 },\n { x: 0.390625, y: 0.109375 },\n { x: 0.390625, y: 0.109375 },\n { x: 0.421875, y: 0.109375 },\n { x: 0.421875, y: 0.109375 },\n { x: 0.453125, y: 0.109375 },\n { x: 0.453125, y: 0.109375 },\n { x: 0.484375, y: 0.109375 },\n { x: 0.484375, y: 0.109375 },\n { x: 0.515625, y: 0.109375 },\n { x: 0.515625, y: 0.109375 },\n { x: 0.546875, y: 0.109375 },\n { x: 0.546875, y: 0.109375 },\n { x: 0.578125, y: 0.109375 },\n { x: 0.578125, y: 0.109375 },\n { x: 0.609375, y: 0.109375 },\n { x: 0.609375, y: 0.109375 },\n { x: 0.640625, y: 0.109375 },\n { x: 0.640625, y: 0.109375 },\n { x: 0.671875, y: 0.109375 },\n { x: 0.671875, y: 0.109375 },\n { x: 0.703125, y: 0.109375 },\n { x: 0.703125, y: 0.109375 },\n { x: 0.734375, y: 0.109375 },\n { x: 0.734375, y: 0.109375 },\n { x: 0.765625, y: 0.109375 },\n { x: 0.765625, y: 0.109375 },\n { x: 0.796875, y: 0.109375 },\n { x: 0.796875, y: 0.109375 },\n { x: 0.828125, y: 0.109375 },\n { x: 0.828125, y: 0.109375 },\n { x: 0.859375, y: 0.109375 },\n { x: 0.859375, y: 0.109375 },\n { x: 0.890625, y: 0.109375 },\n { x: 0.890625, y: 0.109375 },\n { x: 0.921875, y: 0.109375 },\n { x: 0.921875, y: 0.109375 },\n { x: 0.953125, y: 0.109375 },\n { x: 0.953125, y: 0.109375 },\n { x: 0.984375, y: 0.109375 },\n { x: 0.984375, y: 0.109375 },\n { x: 0.015625, y: 0.140625 },\n { x: 0.015625, y: 0.140625 },\n { x: 0.046875, y: 0.140625 },\n { x: 0.046875, y: 0.140625 },\n { x: 0.078125, y: 0.140625 },\n { x: 0.078125, y: 0.140625 },\n { x: 0.109375, y: 0.140625 },\n { x: 0.109375, y: 0.140625 },\n { x: 0.140625, y: 0.140625 },\n { x: 0.140625, y: 0.140625 },\n { x: 0.171875, y: 0.140625 },\n { x: 0.171875, y: 0.140625 },\n { x: 0.203125, y: 0.140625 },\n { x: 0.203125, y: 0.140625 },\n { x: 0.234375, y: 0.140625 },\n { x: 0.234375, y: 0.140625 },\n { x: 0.265625, y: 0.140625 },\n { x: 0.265625, y: 0.140625 },\n { x: 0.296875, y: 0.140625 },\n { x: 0.296875, y: 0.140625 },\n { x: 0.328125, y: 0.140625 },\n { x: 0.328125, y: 0.140625 },\n { x: 0.359375, y: 0.140625 },\n { x: 0.359375, y: 0.140625 },\n { x: 0.390625, y: 0.140625 },\n { x: 0.390625, y: 0.140625 },\n { x: 0.421875, y: 0.140625 },\n { x: 0.421875, y: 0.140625 },\n { x: 0.453125, y: 0.140625 },\n { x: 0.453125, y: 0.140625 },\n { x: 0.484375, y: 0.140625 },\n { x: 0.484375, y: 0.140625 },\n { x: 0.515625, y: 0.140625 },\n { x: 0.515625, y: 0.140625 },\n { x: 0.546875, y: 0.140625 },\n { x: 0.546875, y: 0.140625 },\n { x: 0.578125, y: 0.140625 },\n { x: 0.578125, y: 0.140625 },\n { x: 0.609375, y: 0.140625 },\n { x: 0.609375, y: 0.140625 },\n { x: 0.640625, y: 0.140625 },\n { x: 0.640625, y: 0.140625 },\n { x: 0.671875, y: 0.140625 },\n { x: 0.671875, y: 0.140625 },\n { x: 0.703125, y: 0.140625 },\n { x: 0.703125, y: 0.140625 },\n { x: 0.734375, y: 0.140625 },\n { x: 0.734375, y: 0.140625 },\n { x: 0.765625, y: 0.140625 },\n { x: 0.765625, y: 0.140625 },\n { x: 0.796875, y: 0.140625 },\n { x: 0.796875, y: 0.140625 },\n { x: 0.828125, y: 0.140625 },\n { x: 0.828125, y: 0.140625 },\n { x: 0.859375, y: 0.140625 },\n { x: 0.859375, y: 0.140625 },\n { x: 0.890625, y: 0.140625 },\n { x: 0.890625, y: 0.140625 },\n { x: 0.921875, y: 0.140625 },\n { x: 0.921875, y: 0.140625 },\n { x: 0.953125, y: 0.140625 },\n { x: 0.953125, y: 0.140625 },\n { x: 0.984375, y: 0.140625 },\n { x: 0.984375, y: 0.140625 },\n { x: 0.015625, y: 0.171875 },\n { x: 0.015625, y: 0.171875 },\n { x: 0.046875, y: 0.171875 },\n { x: 0.046875, y: 0.171875 },\n { x: 0.078125, y: 0.171875 },\n { x: 0.078125, y: 0.171875 },\n { x: 0.109375, y: 0.171875 },\n { x: 0.109375, y: 0.171875 },\n { x: 0.140625, y: 0.171875 },\n { x: 0.140625, y: 0.171875 },\n { x: 0.171875, y: 0.171875 },\n { x: 0.171875, y: 0.171875 },\n { x: 0.203125, y: 0.171875 },\n { x: 0.203125, y: 0.171875 },\n { x: 0.234375, y: 0.171875 },\n { x: 0.234375, y: 0.171875 },\n { x: 0.265625, y: 0.171875 },\n { x: 0.265625, y: 0.171875 },\n { x: 0.296875, y: 0.171875 },\n { x: 0.296875, y: 0.171875 },\n { x: 0.328125, y: 0.171875 },\n { x: 0.328125, y: 0.171875 },\n { x: 0.359375, y: 0.171875 },\n { x: 0.359375, y: 0.171875 },\n { x: 0.390625, y: 0.171875 },\n { x: 0.390625, y: 0.171875 },\n { x: 0.421875, y: 0.171875 },\n { x: 0.421875, y: 0.171875 },\n { x: 0.453125, y: 0.171875 },\n { x: 0.453125, y: 0.171875 },\n { x: 0.484375, y: 0.171875 },\n { x: 0.484375, y: 0.171875 },\n { x: 0.515625, y: 0.171875 },\n { x: 0.515625, y: 0.171875 },\n { x: 0.546875, y: 0.171875 },\n { x: 0.546875, y: 0.171875 },\n { x: 0.578125, y: 0.171875 },\n { x: 0.578125, y: 0.171875 },\n { x: 0.609375, y: 0.171875 },\n { x: 0.609375, y: 0.171875 },\n { x: 0.640625, y: 0.171875 },\n { x: 0.640625, y: 0.171875 },\n { x: 0.671875, y: 0.171875 },\n { x: 0.671875, y: 0.171875 },\n { x: 0.703125, y: 0.171875 },\n { x: 0.703125, y: 0.171875 },\n { x: 0.734375, y: 0.171875 },\n { x: 0.734375, y: 0.171875 },\n { x: 0.765625, y: 0.171875 },\n { x: 0.765625, y: 0.171875 },\n { x: 0.796875, y: 0.171875 },\n { x: 0.796875, y: 0.171875 },\n { x: 0.828125, y: 0.171875 },\n { x: 0.828125, y: 0.171875 },\n { x: 0.859375, y: 0.171875 },\n { x: 0.859375, y: 0.171875 },\n { x: 0.890625, y: 0.171875 },\n { x: 0.890625, y: 0.171875 },\n { x: 0.921875, y: 0.171875 },\n { x: 0.921875, y: 0.171875 },\n { x: 0.953125, y: 0.171875 },\n { x: 0.953125, y: 0.171875 },\n { x: 0.984375, y: 0.171875 },\n { x: 0.984375, y: 0.171875 },\n { x: 0.015625, y: 0.203125 },\n { x: 0.015625, y: 0.203125 },\n { x: 0.046875, y: 0.203125 },\n { x: 0.046875, y: 0.203125 },\n { x: 0.078125, y: 0.203125 },\n { x: 0.078125, y: 0.203125 },\n { x: 0.109375, y: 0.203125 },\n { x: 0.109375, y: 0.203125 },\n { x: 0.140625, y: 0.203125 },\n { x: 0.140625, y: 0.203125 },\n { x: 0.171875, y: 0.203125 },\n { x: 0.171875, y: 0.203125 },\n { x: 0.203125, y: 0.203125 },\n { x: 0.203125, y: 0.203125 },\n { x: 0.234375, y: 0.203125 },\n { x: 0.234375, y: 0.203125 },\n { x: 0.265625, y: 0.203125 },\n { x: 0.265625, y: 0.203125 },\n { x: 0.296875, y: 0.203125 },\n { x: 0.296875, y: 0.203125 },\n { x: 0.328125, y: 0.203125 },\n { x: 0.328125, y: 0.203125 },\n { x: 0.359375, y: 0.203125 },\n { x: 0.359375, y: 0.203125 },\n { x: 0.390625, y: 0.203125 },\n { x: 0.390625, y: 0.203125 },\n { x: 0.421875, y: 0.203125 },\n { x: 0.421875, y: 0.203125 },\n { x: 0.453125, y: 0.203125 },\n { x: 0.453125, y: 0.203125 },\n { x: 0.484375, y: 0.203125 },\n { x: 0.484375, y: 0.203125 },\n { x: 0.515625, y: 0.203125 },\n { x: 0.515625, y: 0.203125 },\n { x: 0.546875, y: 0.203125 },\n { x: 0.546875, y: 0.203125 },\n { x: 0.578125, y: 0.203125 },\n { x: 0.578125, y: 0.203125 },\n { x: 0.609375, y: 0.203125 },\n { x: 0.609375, y: 0.203125 },\n { x: 0.640625, y: 0.203125 },\n { x: 0.640625, y: 0.203125 },\n { x: 0.671875, y: 0.203125 },\n { x: 0.671875, y: 0.203125 },\n { x: 0.703125, y: 0.203125 },\n { x: 0.703125, y: 0.203125 },\n { x: 0.734375, y: 0.203125 },\n { x: 0.734375, y: 0.203125 },\n { x: 0.765625, y: 0.203125 },\n { x: 0.765625, y: 0.203125 },\n { x: 0.796875, y: 0.203125 },\n { x: 0.796875, y: 0.203125 },\n { x: 0.828125, y: 0.203125 },\n { x: 0.828125, y: 0.203125 },\n { x: 0.859375, y: 0.203125 },\n { x: 0.859375, y: 0.203125 },\n { x: 0.890625, y: 0.203125 },\n { x: 0.890625, y: 0.203125 },\n { x: 0.921875, y: 0.203125 },\n { x: 0.921875, y: 0.203125 },\n { x: 0.953125, y: 0.203125 },\n { x: 0.953125, y: 0.203125 },\n { x: 0.984375, y: 0.203125 },\n { x: 0.984375, y: 0.203125 },\n { x: 0.015625, y: 0.234375 },\n { x: 0.015625, y: 0.234375 },\n { x: 0.046875, y: 0.234375 },\n { x: 0.046875, y: 0.234375 },\n { x: 0.078125, y: 0.234375 },\n { x: 0.078125, y: 0.234375 },\n { x: 0.109375, y: 0.234375 },\n { x: 0.109375, y: 0.234375 },\n { x: 0.140625, y: 0.234375 },\n { x: 0.140625, y: 0.234375 },\n { x: 0.171875, y: 0.234375 },\n { x: 0.171875, y: 0.234375 },\n { x: 0.203125, y: 0.234375 },\n { x: 0.203125, y: 0.234375 },\n { x: 0.234375, y: 0.234375 },\n { x: 0.234375, y: 0.234375 },\n { x: 0.265625, y: 0.234375 },\n { x: 0.265625, y: 0.234375 },\n { x: 0.296875, y: 0.234375 },\n { x: 0.296875, y: 0.234375 },\n { x: 0.328125, y: 0.234375 },\n { x: 0.328125, y: 0.234375 },\n { x: 0.359375, y: 0.234375 },\n { x: 0.359375, y: 0.234375 },\n { x: 0.390625, y: 0.234375 },\n { x: 0.390625, y: 0.234375 },\n { x: 0.421875, y: 0.234375 },\n { x: 0.421875, y: 0.234375 },\n { x: 0.453125, y: 0.234375 },\n { x: 0.453125, y: 0.234375 },\n { x: 0.484375, y: 0.234375 },\n { x: 0.484375, y: 0.234375 },\n { x: 0.515625, y: 0.234375 },\n { x: 0.515625, y: 0.234375 },\n { x: 0.546875, y: 0.234375 },\n { x: 0.546875, y: 0.234375 },\n { x: 0.578125, y: 0.234375 },\n { x: 0.578125, y: 0.234375 },\n { x: 0.609375, y: 0.234375 },\n { x: 0.609375, y: 0.234375 },\n { x: 0.640625, y: 0.234375 },\n { x: 0.640625, y: 0.234375 },\n { x: 0.671875, y: 0.234375 },\n { x: 0.671875, y: 0.234375 },\n { x: 0.703125, y: 0.234375 },\n { x: 0.703125, y: 0.234375 },\n { x: 0.734375, y: 0.234375 },\n { x: 0.734375, y: 0.234375 },\n { x: 0.765625, y: 0.234375 },\n { x: 0.765625, y: 0.234375 },\n { x: 0.796875, y: 0.234375 },\n { x: 0.796875, y: 0.234375 },\n { x: 0.828125, y: 0.234375 },\n { x: 0.828125, y: 0.234375 },\n { x: 0.859375, y: 0.234375 },\n { x: 0.859375, y: 0.234375 },\n { x: 0.890625, y: 0.234375 },\n { x: 0.890625, y: 0.234375 },\n { x: 0.921875, y: 0.234375 },\n { x: 0.921875, y: 0.234375 },\n { x: 0.953125, y: 0.234375 },\n { x: 0.953125, y: 0.234375 },\n { x: 0.984375, y: 0.234375 },\n { x: 0.984375, y: 0.234375 },\n { x: 0.015625, y: 0.265625 },\n { x: 0.015625, y: 0.265625 },\n { x: 0.046875, y: 0.265625 },\n { x: 0.046875, y: 0.265625 },\n { x: 0.078125, y: 0.265625 },\n { x: 0.078125, y: 0.265625 },\n { x: 0.109375, y: 0.265625 },\n { x: 0.109375, y: 0.265625 },\n { x: 0.140625, y: 0.265625 },\n { x: 0.140625, y: 0.265625 },\n { x: 0.171875, y: 0.265625 },\n { x: 0.171875, y: 0.265625 },\n { x: 0.203125, y: 0.265625 },\n { x: 0.203125, y: 0.265625 },\n { x: 0.234375, y: 0.265625 },\n { x: 0.234375, y: 0.265625 },\n { x: 0.265625, y: 0.265625 },\n { x: 0.265625, y: 0.265625 },\n { x: 0.296875, y: 0.265625 },\n { x: 0.296875, y: 0.265625 },\n { x: 0.328125, y: 0.265625 },\n { x: 0.328125, y: 0.265625 },\n { x: 0.359375, y: 0.265625 },\n { x: 0.359375, y: 0.265625 },\n { x: 0.390625, y: 0.265625 },\n { x: 0.390625, y: 0.265625 },\n { x: 0.421875, y: 0.265625 },\n { x: 0.421875, y: 0.265625 },\n { x: 0.453125, y: 0.265625 },\n { x: 0.453125, y: 0.265625 },\n { x: 0.484375, y: 0.265625 },\n { x: 0.484375, y: 0.265625 },\n { x: 0.515625, y: 0.265625 },\n { x: 0.515625, y: 0.265625 },\n { x: 0.546875, y: 0.265625 },\n { x: 0.546875, y: 0.265625 },\n { x: 0.578125, y: 0.265625 },\n { x: 0.578125, y: 0.265625 },\n { x: 0.609375, y: 0.265625 },\n { x: 0.609375, y: 0.265625 },\n { x: 0.640625, y: 0.265625 },\n { x: 0.640625, y: 0.265625 },\n { x: 0.671875, y: 0.265625 },\n { x: 0.671875, y: 0.265625 },\n { x: 0.703125, y: 0.265625 },\n { x: 0.703125, y: 0.265625 },\n { x: 0.734375, y: 0.265625 },\n { x: 0.734375, y: 0.265625 },\n { x: 0.765625, y: 0.265625 },\n { x: 0.765625, y: 0.265625 },\n { x: 0.796875, y: 0.265625 },\n { x: 0.796875, y: 0.265625 },\n { x: 0.828125, y: 0.265625 },\n { x: 0.828125, y: 0.265625 },\n { x: 0.859375, y: 0.265625 },\n { x: 0.859375, y: 0.265625 },\n { x: 0.890625, y: 0.265625 },\n { x: 0.890625, y: 0.265625 },\n { x: 0.921875, y: 0.265625 },\n { x: 0.921875, y: 0.265625 },\n { x: 0.953125, y: 0.265625 },\n { x: 0.953125, y: 0.265625 },\n { x: 0.984375, y: 0.265625 },\n { x: 0.984375, y: 0.265625 },\n { x: 0.015625, y: 0.296875 },\n { x: 0.015625, y: 0.296875 },\n { x: 0.046875, y: 0.296875 },\n { x: 0.046875, y: 0.296875 },\n { x: 0.078125, y: 0.296875 },\n { x: 0.078125, y: 0.296875 },\n { x: 0.109375, y: 0.296875 },\n { x: 0.109375, y: 0.296875 },\n { x: 0.140625, y: 0.296875 },\n { x: 0.140625, y: 0.296875 },\n { x: 0.171875, y: 0.296875 },\n { x: 0.171875, y: 0.296875 },\n { x: 0.203125, y: 0.296875 },\n { x: 0.203125, y: 0.296875 },\n { x: 0.234375, y: 0.296875 },\n { x: 0.234375, y: 0.296875 },\n { x: 0.265625, y: 0.296875 },\n { x: 0.265625, y: 0.296875 },\n { x: 0.296875, y: 0.296875 },\n { x: 0.296875, y: 0.296875 },\n { x: 0.328125, y: 0.296875 },\n { x: 0.328125, y: 0.296875 },\n { x: 0.359375, y: 0.296875 },\n { x: 0.359375, y: 0.296875 },\n { x: 0.390625, y: 0.296875 },\n { x: 0.390625, y: 0.296875 },\n { x: 0.421875, y: 0.296875 },\n { x: 0.421875, y: 0.296875 },\n { x: 0.453125, y: 0.296875 },\n { x: 0.453125, y: 0.296875 },\n { x: 0.484375, y: 0.296875 },\n { x: 0.484375, y: 0.296875 },\n { x: 0.515625, y: 0.296875 },\n { x: 0.515625, y: 0.296875 },\n { x: 0.546875, y: 0.296875 },\n { x: 0.546875, y: 0.296875 },\n { x: 0.578125, y: 0.296875 },\n { x: 0.578125, y: 0.296875 },\n { x: 0.609375, y: 0.296875 },\n { x: 0.609375, y: 0.296875 },\n { x: 0.640625, y: 0.296875 },\n { x: 0.640625, y: 0.296875 },\n { x: 0.671875, y: 0.296875 },\n { x: 0.671875, y: 0.296875 },\n { x: 0.703125, y: 0.296875 },\n { x: 0.703125, y: 0.296875 },\n { x: 0.734375, y: 0.296875 },\n { x: 0.734375, y: 0.296875 },\n { x: 0.765625, y: 0.296875 },\n { x: 0.765625, y: 0.296875 },\n { x: 0.796875, y: 0.296875 },\n { x: 0.796875, y: 0.296875 },\n { x: 0.828125, y: 0.296875 },\n { x: 0.828125, y: 0.296875 },\n { x: 0.859375, y: 0.296875 },\n { x: 0.859375, y: 0.296875 },\n { x: 0.890625, y: 0.296875 },\n { x: 0.890625, y: 0.296875 },\n { x: 0.921875, y: 0.296875 },\n { x: 0.921875, y: 0.296875 },\n { x: 0.953125, y: 0.296875 },\n { x: 0.953125, y: 0.296875 },\n { x: 0.984375, y: 0.296875 },\n { x: 0.984375, y: 0.296875 },\n { x: 0.015625, y: 0.328125 },\n { x: 0.015625, y: 0.328125 },\n { x: 0.046875, y: 0.328125 },\n { x: 0.046875, y: 0.328125 },\n { x: 0.078125, y: 0.328125 },\n { x: 0.078125, y: 0.328125 },\n { x: 0.109375, y: 0.328125 },\n { x: 0.109375, y: 0.328125 },\n { x: 0.140625, y: 0.328125 },\n { x: 0.140625, y: 0.328125 },\n { x: 0.171875, y: 0.328125 },\n { x: 0.171875, y: 0.328125 },\n { x: 0.203125, y: 0.328125 },\n { x: 0.203125, y: 0.328125 },\n { x: 0.234375, y: 0.328125 },\n { x: 0.234375, y: 0.328125 },\n { x: 0.265625, y: 0.328125 },\n { x: 0.265625, y: 0.328125 },\n { x: 0.296875, y: 0.328125 },\n { x: 0.296875, y: 0.328125 },\n { x: 0.328125, y: 0.328125 },\n { x: 0.328125, y: 0.328125 },\n { x: 0.359375, y: 0.328125 },\n { x: 0.359375, y: 0.328125 },\n { x: 0.390625, y: 0.328125 },\n { x: 0.390625, y: 0.328125 },\n { x: 0.421875, y: 0.328125 },\n { x: 0.421875, y: 0.328125 },\n { x: 0.453125, y: 0.328125 },\n { x: 0.453125, y: 0.328125 },\n { x: 0.484375, y: 0.328125 },\n { x: 0.484375, y: 0.328125 },\n { x: 0.515625, y: 0.328125 },\n { x: 0.515625, y: 0.328125 },\n { x: 0.546875, y: 0.328125 },\n { x: 0.546875, y: 0.328125 },\n { x: 0.578125, y: 0.328125 },\n { x: 0.578125, y: 0.328125 },\n { x: 0.609375, y: 0.328125 },\n { x: 0.609375, y: 0.328125 },\n { x: 0.640625, y: 0.328125 },\n { x: 0.640625, y: 0.328125 },\n { x: 0.671875, y: 0.328125 },\n { x: 0.671875, y: 0.328125 },\n { x: 0.703125, y: 0.328125 },\n { x: 0.703125, y: 0.328125 },\n { x: 0.734375, y: 0.328125 },\n { x: 0.734375, y: 0.328125 },\n { x: 0.765625, y: 0.328125 },\n { x: 0.765625, y: 0.328125 },\n { x: 0.796875, y: 0.328125 },\n { x: 0.796875, y: 0.328125 },\n { x: 0.828125, y: 0.328125 },\n { x: 0.828125, y: 0.328125 },\n { x: 0.859375, y: 0.328125 },\n { x: 0.859375, y: 0.328125 },\n { x: 0.890625, y: 0.328125 },\n { x: 0.890625, y: 0.328125 },\n { x: 0.921875, y: 0.328125 },\n { x: 0.921875, y: 0.328125 },\n { x: 0.953125, y: 0.328125 },\n { x: 0.953125, y: 0.328125 },\n { x: 0.984375, y: 0.328125 },\n { x: 0.984375, y: 0.328125 },\n { x: 0.015625, y: 0.359375 },\n { x: 0.015625, y: 0.359375 },\n { x: 0.046875, y: 0.359375 },\n { x: 0.046875, y: 0.359375 },\n { x: 0.078125, y: 0.359375 },\n { x: 0.078125, y: 0.359375 },\n { x: 0.109375, y: 0.359375 },\n { x: 0.109375, y: 0.359375 },\n { x: 0.140625, y: 0.359375 },\n { x: 0.140625, y: 0.359375 },\n { x: 0.171875, y: 0.359375 },\n { x: 0.171875, y: 0.359375 },\n { x: 0.203125, y: 0.359375 },\n { x: 0.203125, y: 0.359375 },\n { x: 0.234375, y: 0.359375 },\n { x: 0.234375, y: 0.359375 },\n { x: 0.265625, y: 0.359375 },\n { x: 0.265625, y: 0.359375 },\n { x: 0.296875, y: 0.359375 },\n { x: 0.296875, y: 0.359375 },\n { x: 0.328125, y: 0.359375 },\n { x: 0.328125, y: 0.359375 },\n { x: 0.359375, y: 0.359375 },\n { x: 0.359375, y: 0.359375 },\n { x: 0.390625, y: 0.359375 },\n { x: 0.390625, y: 0.359375 },\n { x: 0.421875, y: 0.359375 },\n { x: 0.421875, y: 0.359375 },\n { x: 0.453125, y: 0.359375 },\n { x: 0.453125, y: 0.359375 },\n { x: 0.484375, y: 0.359375 },\n { x: 0.484375, y: 0.359375 },\n { x: 0.515625, y: 0.359375 },\n { x: 0.515625, y: 0.359375 },\n { x: 0.546875, y: 0.359375 },\n { x: 0.546875, y: 0.359375 },\n { x: 0.578125, y: 0.359375 },\n { x: 0.578125, y: 0.359375 },\n { x: 0.609375, y: 0.359375 },\n { x: 0.609375, y: 0.359375 },\n { x: 0.640625, y: 0.359375 },\n { x: 0.640625, y: 0.359375 },\n { x: 0.671875, y: 0.359375 },\n { x: 0.671875, y: 0.359375 },\n { x: 0.703125, y: 0.359375 },\n { x: 0.703125, y: 0.359375 },\n { x: 0.734375, y: 0.359375 },\n { x: 0.734375, y: 0.359375 },\n { x: 0.765625, y: 0.359375 },\n { x: 0.765625, y: 0.359375 },\n { x: 0.796875, y: 0.359375 },\n { x: 0.796875, y: 0.359375 },\n { x: 0.828125, y: 0.359375 },\n { x: 0.828125, y: 0.359375 },\n { x: 0.859375, y: 0.359375 },\n { x: 0.859375, y: 0.359375 },\n { x: 0.890625, y: 0.359375 },\n { x: 0.890625, y: 0.359375 },\n { x: 0.921875, y: 0.359375 },\n { x: 0.921875, y: 0.359375 },\n { x: 0.953125, y: 0.359375 },\n { x: 0.953125, y: 0.359375 },\n { x: 0.984375, y: 0.359375 },\n { x: 0.984375, y: 0.359375 },\n { x: 0.015625, y: 0.390625 },\n { x: 0.015625, y: 0.390625 },\n { x: 0.046875, y: 0.390625 },\n { x: 0.046875, y: 0.390625 },\n { x: 0.078125, y: 0.390625 },\n { x: 0.078125, y: 0.390625 },\n { x: 0.109375, y: 0.390625 },\n { x: 0.109375, y: 0.390625 },\n { x: 0.140625, y: 0.390625 },\n { x: 0.140625, y: 0.390625 },\n { x: 0.171875, y: 0.390625 },\n { x: 0.171875, y: 0.390625 },\n { x: 0.203125, y: 0.390625 },\n { x: 0.203125, y: 0.390625 },\n { x: 0.234375, y: 0.390625 },\n { x: 0.234375, y: 0.390625 },\n { x: 0.265625, y: 0.390625 },\n { x: 0.265625, y: 0.390625 },\n { x: 0.296875, y: 0.390625 },\n { x: 0.296875, y: 0.390625 },\n { x: 0.328125, y: 0.390625 },\n { x: 0.328125, y: 0.390625 },\n { x: 0.359375, y: 0.390625 },\n { x: 0.359375, y: 0.390625 },\n { x: 0.390625, y: 0.390625 },\n { x: 0.390625, y: 0.390625 },\n { x: 0.421875, y: 0.390625 },\n { x: 0.421875, y: 0.390625 },\n { x: 0.453125, y: 0.390625 },\n { x: 0.453125, y: 0.390625 },\n { x: 0.484375, y: 0.390625 },\n { x: 0.484375, y: 0.390625 },\n { x: 0.515625, y: 0.390625 },\n { x: 0.515625, y: 0.390625 },\n { x: 0.546875, y: 0.390625 },\n { x: 0.546875, y: 0.390625 },\n { x: 0.578125, y: 0.390625 },\n { x: 0.578125, y: 0.390625 },\n { x: 0.609375, y: 0.390625 },\n { x: 0.609375, y: 0.390625 },\n { x: 0.640625, y: 0.390625 },\n { x: 0.640625, y: 0.390625 },\n { x: 0.671875, y: 0.390625 },\n { x: 0.671875, y: 0.390625 },\n { x: 0.703125, y: 0.390625 },\n { x: 0.703125, y: 0.390625 },\n { x: 0.734375, y: 0.390625 },\n { x: 0.734375, y: 0.390625 },\n { x: 0.765625, y: 0.390625 },\n { x: 0.765625, y: 0.390625 },\n { x: 0.796875, y: 0.390625 },\n { x: 0.796875, y: 0.390625 },\n { x: 0.828125, y: 0.390625 },\n { x: 0.828125, y: 0.390625 },\n { x: 0.859375, y: 0.390625 },\n { x: 0.859375, y: 0.390625 },\n { x: 0.890625, y: 0.390625 },\n { x: 0.890625, y: 0.390625 },\n { x: 0.921875, y: 0.390625 },\n { x: 0.921875, y: 0.390625 },\n { x: 0.953125, y: 0.390625 },\n { x: 0.953125, y: 0.390625 },\n { x: 0.984375, y: 0.390625 },\n { x: 0.984375, y: 0.390625 },\n { x: 0.015625, y: 0.421875 },\n { x: 0.015625, y: 0.421875 },\n { x: 0.046875, y: 0.421875 },\n { x: 0.046875, y: 0.421875 },\n { x: 0.078125, y: 0.421875 },\n { x: 0.078125, y: 0.421875 },\n { x: 0.109375, y: 0.421875 },\n { x: 0.109375, y: 0.421875 },\n { x: 0.140625, y: 0.421875 },\n { x: 0.140625, y: 0.421875 },\n { x: 0.171875, y: 0.421875 },\n { x: 0.171875, y: 0.421875 },\n { x: 0.203125, y: 0.421875 },\n { x: 0.203125, y: 0.421875 },\n { x: 0.234375, y: 0.421875 },\n { x: 0.234375, y: 0.421875 },\n { x: 0.265625, y: 0.421875 },\n { x: 0.265625, y: 0.421875 },\n { x: 0.296875, y: 0.421875 },\n { x: 0.296875, y: 0.421875 },\n { x: 0.328125, y: 0.421875 },\n { x: 0.328125, y: 0.421875 },\n { x: 0.359375, y: 0.421875 },\n { x: 0.359375, y: 0.421875 },\n { x: 0.390625, y: 0.421875 },\n { x: 0.390625, y: 0.421875 },\n { x: 0.421875, y: 0.421875 },\n { x: 0.421875, y: 0.421875 },\n { x: 0.453125, y: 0.421875 },\n { x: 0.453125, y: 0.421875 },\n { x: 0.484375, y: 0.421875 },\n { x: 0.484375, y: 0.421875 },\n { x: 0.515625, y: 0.421875 },\n { x: 0.515625, y: 0.421875 },\n { x: 0.546875, y: 0.421875 },\n { x: 0.546875, y: 0.421875 },\n { x: 0.578125, y: 0.421875 },\n { x: 0.578125, y: 0.421875 },\n { x: 0.609375, y: 0.421875 },\n { x: 0.609375, y: 0.421875 },\n { x: 0.640625, y: 0.421875 },\n { x: 0.640625, y: 0.421875 },\n { x: 0.671875, y: 0.421875 },\n { x: 0.671875, y: 0.421875 },\n { x: 0.703125, y: 0.421875 },\n { x: 0.703125, y: 0.421875 },\n { x: 0.734375, y: 0.421875 },\n { x: 0.734375, y: 0.421875 },\n { x: 0.765625, y: 0.421875 },\n { x: 0.765625, y: 0.421875 },\n { x: 0.796875, y: 0.421875 },\n { x: 0.796875, y: 0.421875 },\n { x: 0.828125, y: 0.421875 },\n { x: 0.828125, y: 0.421875 },\n { x: 0.859375, y: 0.421875 },\n { x: 0.859375, y: 0.421875 },\n { x: 0.890625, y: 0.421875 },\n { x: 0.890625, y: 0.421875 },\n { x: 0.921875, y: 0.421875 },\n { x: 0.921875, y: 0.421875 },\n { x: 0.953125, y: 0.421875 },\n { x: 0.953125, y: 0.421875 },\n { x: 0.984375, y: 0.421875 },\n { x: 0.984375, y: 0.421875 },\n { x: 0.015625, y: 0.453125 },\n { x: 0.015625, y: 0.453125 },\n { x: 0.046875, y: 0.453125 },\n { x: 0.046875, y: 0.453125 },\n { x: 0.078125, y: 0.453125 },\n { x: 0.078125, y: 0.453125 },\n { x: 0.109375, y: 0.453125 },\n { x: 0.109375, y: 0.453125 },\n { x: 0.140625, y: 0.453125 },\n { x: 0.140625, y: 0.453125 },\n { x: 0.171875, y: 0.453125 },\n { x: 0.171875, y: 0.453125 },\n { x: 0.203125, y: 0.453125 },\n { x: 0.203125, y: 0.453125 },\n { x: 0.234375, y: 0.453125 },\n { x: 0.234375, y: 0.453125 },\n { x: 0.265625, y: 0.453125 },\n { x: 0.265625, y: 0.453125 },\n { x: 0.296875, y: 0.453125 },\n { x: 0.296875, y: 0.453125 },\n { x: 0.328125, y: 0.453125 },\n { x: 0.328125, y: 0.453125 },\n { x: 0.359375, y: 0.453125 },\n { x: 0.359375, y: 0.453125 },\n { x: 0.390625, y: 0.453125 },\n { x: 0.390625, y: 0.453125 },\n { x: 0.421875, y: 0.453125 },\n { x: 0.421875, y: 0.453125 },\n { x: 0.453125, y: 0.453125 },\n { x: 0.453125, y: 0.453125 },\n { x: 0.484375, y: 0.453125 },\n { x: 0.484375, y: 0.453125 },\n { x: 0.515625, y: 0.453125 },\n { x: 0.515625, y: 0.453125 },\n { x: 0.546875, y: 0.453125 },\n { x: 0.546875, y: 0.453125 },\n { x: 0.578125, y: 0.453125 },\n { x: 0.578125, y: 0.453125 },\n { x: 0.609375, y: 0.453125 },\n { x: 0.609375, y: 0.453125 },\n { x: 0.640625, y: 0.453125 },\n { x: 0.640625, y: 0.453125 },\n { x: 0.671875, y: 0.453125 },\n { x: 0.671875, y: 0.453125 },\n { x: 0.703125, y: 0.453125 },\n { x: 0.703125, y: 0.453125 },\n { x: 0.734375, y: 0.453125 },\n { x: 0.734375, y: 0.453125 },\n { x: 0.765625, y: 0.453125 },\n { x: 0.765625, y: 0.453125 },\n { x: 0.796875, y: 0.453125 },\n { x: 0.796875, y: 0.453125 },\n { x: 0.828125, y: 0.453125 },\n { x: 0.828125, y: 0.453125 },\n { x: 0.859375, y: 0.453125 },\n { x: 0.859375, y: 0.453125 },\n { x: 0.890625, y: 0.453125 },\n { x: 0.890625, y: 0.453125 },\n { x: 0.921875, y: 0.453125 },\n { x: 0.921875, y: 0.453125 },\n { x: 0.953125, y: 0.453125 },\n { x: 0.953125, y: 0.453125 },\n { x: 0.984375, y: 0.453125 },\n { x: 0.984375, y: 0.453125 },\n { x: 0.015625, y: 0.484375 },\n { x: 0.015625, y: 0.484375 },\n { x: 0.046875, y: 0.484375 },\n { x: 0.046875, y: 0.484375 },\n { x: 0.078125, y: 0.484375 },\n { x: 0.078125, y: 0.484375 },\n { x: 0.109375, y: 0.484375 },\n { x: 0.109375, y: 0.484375 },\n { x: 0.140625, y: 0.484375 },\n { x: 0.140625, y: 0.484375 },\n { x: 0.171875, y: 0.484375 },\n { x: 0.171875, y: 0.484375 },\n { x: 0.203125, y: 0.484375 },\n { x: 0.203125, y: 0.484375 },\n { x: 0.234375, y: 0.484375 },\n { x: 0.234375, y: 0.484375 },\n { x: 0.265625, y: 0.484375 },\n { x: 0.265625, y: 0.484375 },\n { x: 0.296875, y: 0.484375 },\n { x: 0.296875, y: 0.484375 },\n { x: 0.328125, y: 0.484375 },\n { x: 0.328125, y: 0.484375 },\n { x: 0.359375, y: 0.484375 },\n { x: 0.359375, y: 0.484375 },\n { x: 0.390625, y: 0.484375 },\n { x: 0.390625, y: 0.484375 },\n { x: 0.421875, y: 0.484375 },\n { x: 0.421875, y: 0.484375 },\n { x: 0.453125, y: 0.484375 },\n { x: 0.453125, y: 0.484375 },\n { x: 0.484375, y: 0.484375 },\n { x: 0.484375, y: 0.484375 },\n { x: 0.515625, y: 0.484375 },\n { x: 0.515625, y: 0.484375 },\n { x: 0.546875, y: 0.484375 },\n { x: 0.546875, y: 0.484375 },\n { x: 0.578125, y: 0.484375 },\n { x: 0.578125, y: 0.484375 },\n { x: 0.609375, y: 0.484375 },\n { x: 0.609375, y: 0.484375 },\n { x: 0.640625, y: 0.484375 },\n { x: 0.640625, y: 0.484375 },\n { x: 0.671875, y: 0.484375 },\n { x: 0.671875, y: 0.484375 },\n { x: 0.703125, y: 0.484375 },\n { x: 0.703125, y: 0.484375 },\n { x: 0.734375, y: 0.484375 },\n { x: 0.734375, y: 0.484375 },\n { x: 0.765625, y: 0.484375 },\n { x: 0.765625, y: 0.484375 },\n { x: 0.796875, y: 0.484375 },\n { x: 0.796875, y: 0.484375 },\n { x: 0.828125, y: 0.484375 },\n { x: 0.828125, y: 0.484375 },\n { x: 0.859375, y: 0.484375 },\n { x: 0.859375, y: 0.484375 },\n { x: 0.890625, y: 0.484375 },\n { x: 0.890625, y: 0.484375 },\n { x: 0.921875, y: 0.484375 },\n { x: 0.921875, y: 0.484375 },\n { x: 0.953125, y: 0.484375 },\n { x: 0.953125, y: 0.484375 },\n { x: 0.984375, y: 0.484375 },\n { x: 0.984375, y: 0.484375 },\n { x: 0.015625, y: 0.515625 },\n { x: 0.015625, y: 0.515625 },\n { x: 0.046875, y: 0.515625 },\n { x: 0.046875, y: 0.515625 },\n { x: 0.078125, y: 0.515625 },\n { x: 0.078125, y: 0.515625 },\n { x: 0.109375, y: 0.515625 },\n { x: 0.109375, y: 0.515625 },\n { x: 0.140625, y: 0.515625 },\n { x: 0.140625, y: 0.515625 },\n { x: 0.171875, y: 0.515625 },\n { x: 0.171875, y: 0.515625 },\n { x: 0.203125, y: 0.515625 },\n { x: 0.203125, y: 0.515625 },\n { x: 0.234375, y: 0.515625 },\n { x: 0.234375, y: 0.515625 },\n { x: 0.265625, y: 0.515625 },\n { x: 0.265625, y: 0.515625 },\n { x: 0.296875, y: 0.515625 },\n { x: 0.296875, y: 0.515625 },\n { x: 0.328125, y: 0.515625 },\n { x: 0.328125, y: 0.515625 },\n { x: 0.359375, y: 0.515625 },\n { x: 0.359375, y: 0.515625 },\n { x: 0.390625, y: 0.515625 },\n { x: 0.390625, y: 0.515625 },\n { x: 0.421875, y: 0.515625 },\n { x: 0.421875, y: 0.515625 },\n { x: 0.453125, y: 0.515625 },\n { x: 0.453125, y: 0.515625 },\n { x: 0.484375, y: 0.515625 },\n { x: 0.484375, y: 0.515625 },\n { x: 0.515625, y: 0.515625 },\n { x: 0.515625, y: 0.515625 },\n { x: 0.546875, y: 0.515625 },\n { x: 0.546875, y: 0.515625 },\n { x: 0.578125, y: 0.515625 },\n { x: 0.578125, y: 0.515625 },\n { x: 0.609375, y: 0.515625 },\n { x: 0.609375, y: 0.515625 },\n { x: 0.640625, y: 0.515625 },\n { x: 0.640625, y: 0.515625 },\n { x: 0.671875, y: 0.515625 },\n { x: 0.671875, y: 0.515625 },\n { x: 0.703125, y: 0.515625 },\n { x: 0.703125, y: 0.515625 },\n { x: 0.734375, y: 0.515625 },\n { x: 0.734375, y: 0.515625 },\n { x: 0.765625, y: 0.515625 },\n { x: 0.765625, y: 0.515625 },\n { x: 0.796875, y: 0.515625 },\n { x: 0.796875, y: 0.515625 },\n { x: 0.828125, y: 0.515625 },\n { x: 0.828125, y: 0.515625 },\n { x: 0.859375, y: 0.515625 },\n { x: 0.859375, y: 0.515625 },\n { x: 0.890625, y: 0.515625 },\n { x: 0.890625, y: 0.515625 },\n { x: 0.921875, y: 0.515625 },\n { x: 0.921875, y: 0.515625 },\n { x: 0.953125, y: 0.515625 },\n { x: 0.953125, y: 0.515625 },\n { x: 0.984375, y: 0.515625 },\n { x: 0.984375, y: 0.515625 },\n { x: 0.015625, y: 0.546875 },\n { x: 0.015625, y: 0.546875 },\n { x: 0.046875, y: 0.546875 },\n { x: 0.046875, y: 0.546875 },\n { x: 0.078125, y: 0.546875 },\n { x: 0.078125, y: 0.546875 },\n { x: 0.109375, y: 0.546875 },\n { x: 0.109375, y: 0.546875 },\n { x: 0.140625, y: 0.546875 },\n { x: 0.140625, y: 0.546875 },\n { x: 0.171875, y: 0.546875 },\n { x: 0.171875, y: 0.546875 },\n { x: 0.203125, y: 0.546875 },\n { x: 0.203125, y: 0.546875 },\n { x: 0.234375, y: 0.546875 },\n { x: 0.234375, y: 0.546875 },\n { x: 0.265625, y: 0.546875 },\n { x: 0.265625, y: 0.546875 },\n { x: 0.296875, y: 0.546875 },\n { x: 0.296875, y: 0.546875 },\n { x: 0.328125, y: 0.546875 },\n { x: 0.328125, y: 0.546875 },\n { x: 0.359375, y: 0.546875 },\n { x: 0.359375, y: 0.546875 },\n { x: 0.390625, y: 0.546875 },\n { x: 0.390625, y: 0.546875 },\n { x: 0.421875, y: 0.546875 },\n { x: 0.421875, y: 0.546875 },\n { x: 0.453125, y: 0.546875 },\n { x: 0.453125, y: 0.546875 },\n { x: 0.484375, y: 0.546875 },\n { x: 0.484375, y: 0.546875 },\n { x: 0.515625, y: 0.546875 },\n { x: 0.515625, y: 0.546875 },\n { x: 0.546875, y: 0.546875 },\n { x: 0.546875, y: 0.546875 },\n { x: 0.578125, y: 0.546875 },\n { x: 0.578125, y: 0.546875 },\n { x: 0.609375, y: 0.546875 },\n { x: 0.609375, y: 0.546875 },\n { x: 0.640625, y: 0.546875 },\n { x: 0.640625, y: 0.546875 },\n { x: 0.671875, y: 0.546875 },\n { x: 0.671875, y: 0.546875 },\n { x: 0.703125, y: 0.546875 },\n { x: 0.703125, y: 0.546875 },\n { x: 0.734375, y: 0.546875 },\n { x: 0.734375, y: 0.546875 },\n { x: 0.765625, y: 0.546875 },\n { x: 0.765625, y: 0.546875 },\n { x: 0.796875, y: 0.546875 },\n { x: 0.796875, y: 0.546875 },\n { x: 0.828125, y: 0.546875 },\n { x: 0.828125, y: 0.546875 },\n { x: 0.859375, y: 0.546875 },\n { x: 0.859375, y: 0.546875 },\n { x: 0.890625, y: 0.546875 },\n { x: 0.890625, y: 0.546875 },\n { x: 0.921875, y: 0.546875 },\n { x: 0.921875, y: 0.546875 },\n { x: 0.953125, y: 0.546875 },\n { x: 0.953125, y: 0.546875 },\n { x: 0.984375, y: 0.546875 },\n { x: 0.984375, y: 0.546875 },\n { x: 0.015625, y: 0.578125 },\n { x: 0.015625, y: 0.578125 },\n { x: 0.046875, y: 0.578125 },\n { x: 0.046875, y: 0.578125 },\n { x: 0.078125, y: 0.578125 },\n { x: 0.078125, y: 0.578125 },\n { x: 0.109375, y: 0.578125 },\n { x: 0.109375, y: 0.578125 },\n { x: 0.140625, y: 0.578125 },\n { x: 0.140625, y: 0.578125 },\n { x: 0.171875, y: 0.578125 },\n { x: 0.171875, y: 0.578125 },\n { x: 0.203125, y: 0.578125 },\n { x: 0.203125, y: 0.578125 },\n { x: 0.234375, y: 0.578125 },\n { x: 0.234375, y: 0.578125 },\n { x: 0.265625, y: 0.578125 },\n { x: 0.265625, y: 0.578125 },\n { x: 0.296875, y: 0.578125 },\n { x: 0.296875, y: 0.578125 },\n { x: 0.328125, y: 0.578125 },\n { x: 0.328125, y: 0.578125 },\n { x: 0.359375, y: 0.578125 },\n { x: 0.359375, y: 0.578125 },\n { x: 0.390625, y: 0.578125 },\n { x: 0.390625, y: 0.578125 },\n { x: 0.421875, y: 0.578125 },\n { x: 0.421875, y: 0.578125 },\n { x: 0.453125, y: 0.578125 },\n { x: 0.453125, y: 0.578125 },\n { x: 0.484375, y: 0.578125 },\n { x: 0.484375, y: 0.578125 },\n { x: 0.515625, y: 0.578125 },\n { x: 0.515625, y: 0.578125 },\n { x: 0.546875, y: 0.578125 },\n { x: 0.546875, y: 0.578125 },\n { x: 0.578125, y: 0.578125 },\n { x: 0.578125, y: 0.578125 },\n { x: 0.609375, y: 0.578125 },\n { x: 0.609375, y: 0.578125 },\n { x: 0.640625, y: 0.578125 },\n { x: 0.640625, y: 0.578125 },\n { x: 0.671875, y: 0.578125 },\n { x: 0.671875, y: 0.578125 },\n { x: 0.703125, y: 0.578125 },\n { x: 0.703125, y: 0.578125 },\n { x: 0.734375, y: 0.578125 },\n { x: 0.734375, y: 0.578125 },\n { x: 0.765625, y: 0.578125 },\n { x: 0.765625, y: 0.578125 },\n { x: 0.796875, y: 0.578125 },\n { x: 0.796875, y: 0.578125 },\n { x: 0.828125, y: 0.578125 },\n { x: 0.828125, y: 0.578125 },\n { x: 0.859375, y: 0.578125 },\n { x: 0.859375, y: 0.578125 },\n { x: 0.890625, y: 0.578125 },\n { x: 0.890625, y: 0.578125 },\n { x: 0.921875, y: 0.578125 },\n { x: 0.921875, y: 0.578125 },\n { x: 0.953125, y: 0.578125 },\n { x: 0.953125, y: 0.578125 },\n { x: 0.984375, y: 0.578125 },\n { x: 0.984375, y: 0.578125 },\n { x: 0.015625, y: 0.609375 },\n { x: 0.015625, y: 0.609375 },\n { x: 0.046875, y: 0.609375 },\n { x: 0.046875, y: 0.609375 },\n { x: 0.078125, y: 0.609375 },\n { x: 0.078125, y: 0.609375 },\n { x: 0.109375, y: 0.609375 },\n { x: 0.109375, y: 0.609375 },\n { x: 0.140625, y: 0.609375 },\n { x: 0.140625, y: 0.609375 },\n { x: 0.171875, y: 0.609375 },\n { x: 0.171875, y: 0.609375 },\n { x: 0.203125, y: 0.609375 },\n { x: 0.203125, y: 0.609375 },\n { x: 0.234375, y: 0.609375 },\n { x: 0.234375, y: 0.609375 },\n { x: 0.265625, y: 0.609375 },\n { x: 0.265625, y: 0.609375 },\n { x: 0.296875, y: 0.609375 },\n { x: 0.296875, y: 0.609375 },\n { x: 0.328125, y: 0.609375 },\n { x: 0.328125, y: 0.609375 },\n { x: 0.359375, y: 0.609375 },\n { x: 0.359375, y: 0.609375 },\n { x: 0.390625, y: 0.609375 },\n { x: 0.390625, y: 0.609375 },\n { x: 0.421875, y: 0.609375 },\n { x: 0.421875, y: 0.609375 },\n { x: 0.453125, y: 0.609375 },\n { x: 0.453125, y: 0.609375 },\n { x: 0.484375, y: 0.609375 },\n { x: 0.484375, y: 0.609375 },\n { x: 0.515625, y: 0.609375 },\n { x: 0.515625, y: 0.609375 },\n { x: 0.546875, y: 0.609375 },\n { x: 0.546875, y: 0.609375 },\n { x: 0.578125, y: 0.609375 },\n { x: 0.578125, y: 0.609375 },\n { x: 0.609375, y: 0.609375 },\n { x: 0.609375, y: 0.609375 },\n { x: 0.640625, y: 0.609375 },\n { x: 0.640625, y: 0.609375 },\n { x: 0.671875, y: 0.609375 },\n { x: 0.671875, y: 0.609375 },\n { x: 0.703125, y: 0.609375 },\n { x: 0.703125, y: 0.609375 },\n { x: 0.734375, y: 0.609375 },\n { x: 0.734375, y: 0.609375 },\n { x: 0.765625, y: 0.609375 },\n { x: 0.765625, y: 0.609375 },\n { x: 0.796875, y: 0.609375 },\n { x: 0.796875, y: 0.609375 },\n { x: 0.828125, y: 0.609375 },\n { x: 0.828125, y: 0.609375 },\n { x: 0.859375, y: 0.609375 },\n { x: 0.859375, y: 0.609375 },\n { x: 0.890625, y: 0.609375 },\n { x: 0.890625, y: 0.609375 },\n { x: 0.921875, y: 0.609375 },\n { x: 0.921875, y: 0.609375 },\n { x: 0.953125, y: 0.609375 },\n { x: 0.953125, y: 0.609375 },\n { x: 0.984375, y: 0.609375 },\n { x: 0.984375, y: 0.609375 },\n { x: 0.015625, y: 0.640625 },\n { x: 0.015625, y: 0.640625 },\n { x: 0.046875, y: 0.640625 },\n { x: 0.046875, y: 0.640625 },\n { x: 0.078125, y: 0.640625 },\n { x: 0.078125, y: 0.640625 },\n { x: 0.109375, y: 0.640625 },\n { x: 0.109375, y: 0.640625 },\n { x: 0.140625, y: 0.640625 },\n { x: 0.140625, y: 0.640625 },\n { x: 0.171875, y: 0.640625 },\n { x: 0.171875, y: 0.640625 },\n { x: 0.203125, y: 0.640625 },\n { x: 0.203125, y: 0.640625 },\n { x: 0.234375, y: 0.640625 },\n { x: 0.234375, y: 0.640625 },\n { x: 0.265625, y: 0.640625 },\n { x: 0.265625, y: 0.640625 },\n { x: 0.296875, y: 0.640625 },\n { x: 0.296875, y: 0.640625 },\n { x: 0.328125, y: 0.640625 },\n { x: 0.328125, y: 0.640625 },\n { x: 0.359375, y: 0.640625 },\n { x: 0.359375, y: 0.640625 },\n { x: 0.390625, y: 0.640625 },\n { x: 0.390625, y: 0.640625 },\n { x: 0.421875, y: 0.640625 },\n { x: 0.421875, y: 0.640625 },\n { x: 0.453125, y: 0.640625 },\n { x: 0.453125, y: 0.640625 },\n { x: 0.484375, y: 0.640625 },\n { x: 0.484375, y: 0.640625 },\n { x: 0.515625, y: 0.640625 },\n { x: 0.515625, y: 0.640625 },\n { x: 0.546875, y: 0.640625 },\n { x: 0.546875, y: 0.640625 },\n { x: 0.578125, y: 0.640625 },\n { x: 0.578125, y: 0.640625 },\n { x: 0.609375, y: 0.640625 },\n { x: 0.609375, y: 0.640625 },\n { x: 0.640625, y: 0.640625 },\n { x: 0.640625, y: 0.640625 },\n { x: 0.671875, y: 0.640625 },\n { x: 0.671875, y: 0.640625 },\n { x: 0.703125, y: 0.640625 },\n { x: 0.703125, y: 0.640625 },\n { x: 0.734375, y: 0.640625 },\n { x: 0.734375, y: 0.640625 },\n { x: 0.765625, y: 0.640625 },\n { x: 0.765625, y: 0.640625 },\n { x: 0.796875, y: 0.640625 },\n { x: 0.796875, y: 0.640625 },\n { x: 0.828125, y: 0.640625 },\n { x: 0.828125, y: 0.640625 },\n { x: 0.859375, y: 0.640625 },\n { x: 0.859375, y: 0.640625 },\n { x: 0.890625, y: 0.640625 },\n { x: 0.890625, y: 0.640625 },\n { x: 0.921875, y: 0.640625 },\n { x: 0.921875, y: 0.640625 },\n { x: 0.953125, y: 0.640625 },\n { x: 0.953125, y: 0.640625 },\n { x: 0.984375, y: 0.640625 },\n { x: 0.984375, y: 0.640625 },\n { x: 0.015625, y: 0.671875 },\n { x: 0.015625, y: 0.671875 },\n { x: 0.046875, y: 0.671875 },\n { x: 0.046875, y: 0.671875 },\n { x: 0.078125, y: 0.671875 },\n { x: 0.078125, y: 0.671875 },\n { x: 0.109375, y: 0.671875 },\n { x: 0.109375, y: 0.671875 },\n { x: 0.140625, y: 0.671875 },\n { x: 0.140625, y: 0.671875 },\n { x: 0.171875, y: 0.671875 },\n { x: 0.171875, y: 0.671875 },\n { x: 0.203125, y: 0.671875 },\n { x: 0.203125, y: 0.671875 },\n { x: 0.234375, y: 0.671875 },\n { x: 0.234375, y: 0.671875 },\n { x: 0.265625, y: 0.671875 },\n { x: 0.265625, y: 0.671875 },\n { x: 0.296875, y: 0.671875 },\n { x: 0.296875, y: 0.671875 },\n { x: 0.328125, y: 0.671875 },\n { x: 0.328125, y: 0.671875 },\n { x: 0.359375, y: 0.671875 },\n { x: 0.359375, y: 0.671875 },\n { x: 0.390625, y: 0.671875 },\n { x: 0.390625, y: 0.671875 },\n { x: 0.421875, y: 0.671875 },\n { x: 0.421875, y: 0.671875 },\n { x: 0.453125, y: 0.671875 },\n { x: 0.453125, y: 0.671875 },\n { x: 0.484375, y: 0.671875 },\n { x: 0.484375, y: 0.671875 },\n { x: 0.515625, y: 0.671875 },\n { x: 0.515625, y: 0.671875 },\n { x: 0.546875, y: 0.671875 },\n { x: 0.546875, y: 0.671875 },\n { x: 0.578125, y: 0.671875 },\n { x: 0.578125, y: 0.671875 },\n { x: 0.609375, y: 0.671875 },\n { x: 0.609375, y: 0.671875 },\n { x: 0.640625, y: 0.671875 },\n { x: 0.640625, y: 0.671875 },\n { x: 0.671875, y: 0.671875 },\n { x: 0.671875, y: 0.671875 },\n { x: 0.703125, y: 0.671875 },\n { x: 0.703125, y: 0.671875 },\n { x: 0.734375, y: 0.671875 },\n { x: 0.734375, y: 0.671875 },\n { x: 0.765625, y: 0.671875 },\n { x: 0.765625, y: 0.671875 },\n { x: 0.796875, y: 0.671875 },\n { x: 0.796875, y: 0.671875 },\n { x: 0.828125, y: 0.671875 },\n { x: 0.828125, y: 0.671875 },\n { x: 0.859375, y: 0.671875 },\n { x: 0.859375, y: 0.671875 },\n { x: 0.890625, y: 0.671875 },\n { x: 0.890625, y: 0.671875 },\n { x: 0.921875, y: 0.671875 },\n { x: 0.921875, y: 0.671875 },\n { x: 0.953125, y: 0.671875 },\n { x: 0.953125, y: 0.671875 },\n { x: 0.984375, y: 0.671875 },\n { x: 0.984375, y: 0.671875 },\n { x: 0.015625, y: 0.703125 },\n { x: 0.015625, y: 0.703125 },\n { x: 0.046875, y: 0.703125 },\n { x: 0.046875, y: 0.703125 },\n { x: 0.078125, y: 0.703125 },\n { x: 0.078125, y: 0.703125 },\n { x: 0.109375, y: 0.703125 },\n { x: 0.109375, y: 0.703125 },\n { x: 0.140625, y: 0.703125 },\n { x: 0.140625, y: 0.703125 },\n { x: 0.171875, y: 0.703125 },\n { x: 0.171875, y: 0.703125 },\n { x: 0.203125, y: 0.703125 },\n { x: 0.203125, y: 0.703125 },\n { x: 0.234375, y: 0.703125 },\n { x: 0.234375, y: 0.703125 },\n { x: 0.265625, y: 0.703125 },\n { x: 0.265625, y: 0.703125 },\n { x: 0.296875, y: 0.703125 },\n { x: 0.296875, y: 0.703125 },\n { x: 0.328125, y: 0.703125 },\n { x: 0.328125, y: 0.703125 },\n { x: 0.359375, y: 0.703125 },\n { x: 0.359375, y: 0.703125 },\n { x: 0.390625, y: 0.703125 },\n { x: 0.390625, y: 0.703125 },\n { x: 0.421875, y: 0.703125 },\n { x: 0.421875, y: 0.703125 },\n { x: 0.453125, y: 0.703125 },\n { x: 0.453125, y: 0.703125 },\n { x: 0.484375, y: 0.703125 },\n { x: 0.484375, y: 0.703125 },\n { x: 0.515625, y: 0.703125 },\n { x: 0.515625, y: 0.703125 },\n { x: 0.546875, y: 0.703125 },\n { x: 0.546875, y: 0.703125 },\n { x: 0.578125, y: 0.703125 },\n { x: 0.578125, y: 0.703125 },\n { x: 0.609375, y: 0.703125 },\n { x: 0.609375, y: 0.703125 },\n { x: 0.640625, y: 0.703125 },\n { x: 0.640625, y: 0.703125 },\n { x: 0.671875, y: 0.703125 },\n { x: 0.671875, y: 0.703125 },\n { x: 0.703125, y: 0.703125 },\n { x: 0.703125, y: 0.703125 },\n { x: 0.734375, y: 0.703125 },\n { x: 0.734375, y: 0.703125 },\n { x: 0.765625, y: 0.703125 },\n { x: 0.765625, y: 0.703125 },\n { x: 0.796875, y: 0.703125 },\n { x: 0.796875, y: 0.703125 },\n { x: 0.828125, y: 0.703125 },\n { x: 0.828125, y: 0.703125 },\n { x: 0.859375, y: 0.703125 },\n { x: 0.859375, y: 0.703125 },\n { x: 0.890625, y: 0.703125 },\n { x: 0.890625, y: 0.703125 },\n { x: 0.921875, y: 0.703125 },\n { x: 0.921875, y: 0.703125 },\n { x: 0.953125, y: 0.703125 },\n { x: 0.953125, y: 0.703125 },\n { x: 0.984375, y: 0.703125 },\n { x: 0.984375, y: 0.703125 },\n { x: 0.015625, y: 0.734375 },\n { x: 0.015625, y: 0.734375 },\n { x: 0.046875, y: 0.734375 },\n { x: 0.046875, y: 0.734375 },\n { x: 0.078125, y: 0.734375 },\n { x: 0.078125, y: 0.734375 },\n { x: 0.109375, y: 0.734375 },\n { x: 0.109375, y: 0.734375 },\n { x: 0.140625, y: 0.734375 },\n { x: 0.140625, y: 0.734375 },\n { x: 0.171875, y: 0.734375 },\n { x: 0.171875, y: 0.734375 },\n { x: 0.203125, y: 0.734375 },\n { x: 0.203125, y: 0.734375 },\n { x: 0.234375, y: 0.734375 },\n { x: 0.234375, y: 0.734375 },\n { x: 0.265625, y: 0.734375 },\n { x: 0.265625, y: 0.734375 },\n { x: 0.296875, y: 0.734375 },\n { x: 0.296875, y: 0.734375 },\n { x: 0.328125, y: 0.734375 },\n { x: 0.328125, y: 0.734375 },\n { x: 0.359375, y: 0.734375 },\n { x: 0.359375, y: 0.734375 },\n { x: 0.390625, y: 0.734375 },\n { x: 0.390625, y: 0.734375 },\n { x: 0.421875, y: 0.734375 },\n { x: 0.421875, y: 0.734375 },\n { x: 0.453125, y: 0.734375 },\n { x: 0.453125, y: 0.734375 },\n { x: 0.484375, y: 0.734375 },\n { x: 0.484375, y: 0.734375 },\n { x: 0.515625, y: 0.734375 },\n { x: 0.515625, y: 0.734375 },\n { x: 0.546875, y: 0.734375 },\n { x: 0.546875, y: 0.734375 },\n { x: 0.578125, y: 0.734375 },\n { x: 0.578125, y: 0.734375 },\n { x: 0.609375, y: 0.734375 },\n { x: 0.609375, y: 0.734375 },\n { x: 0.640625, y: 0.734375 },\n { x: 0.640625, y: 0.734375 },\n { x: 0.671875, y: 0.734375 },\n { x: 0.671875, y: 0.734375 },\n { x: 0.703125, y: 0.734375 },\n { x: 0.703125, y: 0.734375 },\n { x: 0.734375, y: 0.734375 },\n { x: 0.734375, y: 0.734375 },\n { x: 0.765625, y: 0.734375 },\n { x: 0.765625, y: 0.734375 },\n { x: 0.796875, y: 0.734375 },\n { x: 0.796875, y: 0.734375 },\n { x: 0.828125, y: 0.734375 },\n { x: 0.828125, y: 0.734375 },\n { x: 0.859375, y: 0.734375 },\n { x: 0.859375, y: 0.734375 },\n { x: 0.890625, y: 0.734375 },\n { x: 0.890625, y: 0.734375 },\n { x: 0.921875, y: 0.734375 },\n { x: 0.921875, y: 0.734375 },\n { x: 0.953125, y: 0.734375 },\n { x: 0.953125, y: 0.734375 },\n { x: 0.984375, y: 0.734375 },\n { x: 0.984375, y: 0.734375 },\n { x: 0.015625, y: 0.765625 },\n { x: 0.015625, y: 0.765625 },\n { x: 0.046875, y: 0.765625 },\n { x: 0.046875, y: 0.765625 },\n { x: 0.078125, y: 0.765625 },\n { x: 0.078125, y: 0.765625 },\n { x: 0.109375, y: 0.765625 },\n { x: 0.109375, y: 0.765625 },\n { x: 0.140625, y: 0.765625 },\n { x: 0.140625, y: 0.765625 },\n { x: 0.171875, y: 0.765625 },\n { x: 0.171875, y: 0.765625 },\n { x: 0.203125, y: 0.765625 },\n { x: 0.203125, y: 0.765625 },\n { x: 0.234375, y: 0.765625 },\n { x: 0.234375, y: 0.765625 },\n { x: 0.265625, y: 0.765625 },\n { x: 0.265625, y: 0.765625 },\n { x: 0.296875, y: 0.765625 },\n { x: 0.296875, y: 0.765625 },\n { x: 0.328125, y: 0.765625 },\n { x: 0.328125, y: 0.765625 },\n { x: 0.359375, y: 0.765625 },\n { x: 0.359375, y: 0.765625 },\n { x: 0.390625, y: 0.765625 },\n { x: 0.390625, y: 0.765625 },\n { x: 0.421875, y: 0.765625 },\n { x: 0.421875, y: 0.765625 },\n { x: 0.453125, y: 0.765625 },\n { x: 0.453125, y: 0.765625 },\n { x: 0.484375, y: 0.765625 },\n { x: 0.484375, y: 0.765625 },\n { x: 0.515625, y: 0.765625 },\n { x: 0.515625, y: 0.765625 },\n { x: 0.546875, y: 0.765625 },\n { x: 0.546875, y: 0.765625 },\n { x: 0.578125, y: 0.765625 },\n { x: 0.578125, y: 0.765625 },\n { x: 0.609375, y: 0.765625 },\n { x: 0.609375, y: 0.765625 },\n { x: 0.640625, y: 0.765625 },\n { x: 0.640625, y: 0.765625 },\n { x: 0.671875, y: 0.765625 },\n { x: 0.671875, y: 0.765625 },\n { x: 0.703125, y: 0.765625 },\n { x: 0.703125, y: 0.765625 },\n { x: 0.734375, y: 0.765625 },\n { x: 0.734375, y: 0.765625 },\n { x: 0.765625, y: 0.765625 },\n { x: 0.765625, y: 0.765625 },\n { x: 0.796875, y: 0.765625 },\n { x: 0.796875, y: 0.765625 },\n { x: 0.828125, y: 0.765625 },\n { x: 0.828125, y: 0.765625 },\n { x: 0.859375, y: 0.765625 },\n { x: 0.859375, y: 0.765625 },\n { x: 0.890625, y: 0.765625 },\n { x: 0.890625, y: 0.765625 },\n { x: 0.921875, y: 0.765625 },\n { x: 0.921875, y: 0.765625 },\n { x: 0.953125, y: 0.765625 },\n { x: 0.953125, y: 0.765625 },\n { x: 0.984375, y: 0.765625 },\n { x: 0.984375, y: 0.765625 },\n { x: 0.015625, y: 0.796875 },\n { x: 0.015625, y: 0.796875 },\n { x: 0.046875, y: 0.796875 },\n { x: 0.046875, y: 0.796875 },\n { x: 0.078125, y: 0.796875 },\n { x: 0.078125, y: 0.796875 },\n { x: 0.109375, y: 0.796875 },\n { x: 0.109375, y: 0.796875 },\n { x: 0.140625, y: 0.796875 },\n { x: 0.140625, y: 0.796875 },\n { x: 0.171875, y: 0.796875 },\n { x: 0.171875, y: 0.796875 },\n { x: 0.203125, y: 0.796875 },\n { x: 0.203125, y: 0.796875 },\n { x: 0.234375, y: 0.796875 },\n { x: 0.234375, y: 0.796875 },\n { x: 0.265625, y: 0.796875 },\n { x: 0.265625, y: 0.796875 },\n { x: 0.296875, y: 0.796875 },\n { x: 0.296875, y: 0.796875 },\n { x: 0.328125, y: 0.796875 },\n { x: 0.328125, y: 0.796875 },\n { x: 0.359375, y: 0.796875 },\n { x: 0.359375, y: 0.796875 },\n { x: 0.390625, y: 0.796875 },\n { x: 0.390625, y: 0.796875 },\n { x: 0.421875, y: 0.796875 },\n { x: 0.421875, y: 0.796875 },\n { x: 0.453125, y: 0.796875 },\n { x: 0.453125, y: 0.796875 },\n { x: 0.484375, y: 0.796875 },\n { x: 0.484375, y: 0.796875 },\n { x: 0.515625, y: 0.796875 },\n { x: 0.515625, y: 0.796875 },\n { x: 0.546875, y: 0.796875 },\n { x: 0.546875, y: 0.796875 },\n { x: 0.578125, y: 0.796875 },\n { x: 0.578125, y: 0.796875 },\n { x: 0.609375, y: 0.796875 },\n { x: 0.609375, y: 0.796875 },\n { x: 0.640625, y: 0.796875 },\n { x: 0.640625, y: 0.796875 },\n { x: 0.671875, y: 0.796875 },\n { x: 0.671875, y: 0.796875 },\n { x: 0.703125, y: 0.796875 },\n { x: 0.703125, y: 0.796875 },\n { x: 0.734375, y: 0.796875 },\n { x: 0.734375, y: 0.796875 },\n { x: 0.765625, y: 0.796875 },\n { x: 0.765625, y: 0.796875 },\n { x: 0.796875, y: 0.796875 },\n { x: 0.796875, y: 0.796875 },\n { x: 0.828125, y: 0.796875 },\n { x: 0.828125, y: 0.796875 },\n { x: 0.859375, y: 0.796875 },\n { x: 0.859375, y: 0.796875 },\n { x: 0.890625, y: 0.796875 },\n { x: 0.890625, y: 0.796875 },\n { x: 0.921875, y: 0.796875 },\n { x: 0.921875, y: 0.796875 },\n { x: 0.953125, y: 0.796875 },\n { x: 0.953125, y: 0.796875 },\n { x: 0.984375, y: 0.796875 },\n { x: 0.984375, y: 0.796875 },\n { x: 0.015625, y: 0.828125 },\n { x: 0.015625, y: 0.828125 },\n { x: 0.046875, y: 0.828125 },\n { x: 0.046875, y: 0.828125 },\n { x: 0.078125, y: 0.828125 },\n { x: 0.078125, y: 0.828125 },\n { x: 0.109375, y: 0.828125 },\n { x: 0.109375, y: 0.828125 },\n { x: 0.140625, y: 0.828125 },\n { x: 0.140625, y: 0.828125 },\n { x: 0.171875, y: 0.828125 },\n { x: 0.171875, y: 0.828125 },\n { x: 0.203125, y: 0.828125 },\n { x: 0.203125, y: 0.828125 },\n { x: 0.234375, y: 0.828125 },\n { x: 0.234375, y: 0.828125 },\n { x: 0.265625, y: 0.828125 },\n { x: 0.265625, y: 0.828125 },\n { x: 0.296875, y: 0.828125 },\n { x: 0.296875, y: 0.828125 },\n { x: 0.328125, y: 0.828125 },\n { x: 0.328125, y: 0.828125 },\n { x: 0.359375, y: 0.828125 },\n { x: 0.359375, y: 0.828125 },\n { x: 0.390625, y: 0.828125 },\n { x: 0.390625, y: 0.828125 },\n { x: 0.421875, y: 0.828125 },\n { x: 0.421875, y: 0.828125 },\n { x: 0.453125, y: 0.828125 },\n { x: 0.453125, y: 0.828125 },\n { x: 0.484375, y: 0.828125 },\n { x: 0.484375, y: 0.828125 },\n { x: 0.515625, y: 0.828125 },\n { x: 0.515625, y: 0.828125 },\n { x: 0.546875, y: 0.828125 },\n { x: 0.546875, y: 0.828125 },\n { x: 0.578125, y: 0.828125 },\n { x: 0.578125, y: 0.828125 },\n { x: 0.609375, y: 0.828125 },\n { x: 0.609375, y: 0.828125 },\n { x: 0.640625, y: 0.828125 },\n { x: 0.640625, y: 0.828125 },\n { x: 0.671875, y: 0.828125 },\n { x: 0.671875, y: 0.828125 },\n { x: 0.703125, y: 0.828125 },\n { x: 0.703125, y: 0.828125 },\n { x: 0.734375, y: 0.828125 },\n { x: 0.734375, y: 0.828125 },\n { x: 0.765625, y: 0.828125 },\n { x: 0.765625, y: 0.828125 },\n { x: 0.796875, y: 0.828125 },\n { x: 0.796875, y: 0.828125 },\n { x: 0.828125, y: 0.828125 },\n { x: 0.828125, y: 0.828125 },\n { x: 0.859375, y: 0.828125 },\n { x: 0.859375, y: 0.828125 },\n { x: 0.890625, y: 0.828125 },\n { x: 0.890625, y: 0.828125 },\n { x: 0.921875, y: 0.828125 },\n { x: 0.921875, y: 0.828125 },\n { x: 0.953125, y: 0.828125 },\n { x: 0.953125, y: 0.828125 },\n { x: 0.984375, y: 0.828125 },\n { x: 0.984375, y: 0.828125 },\n { x: 0.015625, y: 0.859375 },\n { x: 0.015625, y: 0.859375 },\n { x: 0.046875, y: 0.859375 },\n { x: 0.046875, y: 0.859375 },\n { x: 0.078125, y: 0.859375 },\n { x: 0.078125, y: 0.859375 },\n { x: 0.109375, y: 0.859375 },\n { x: 0.109375, y: 0.859375 },\n { x: 0.140625, y: 0.859375 },\n { x: 0.140625, y: 0.859375 },\n { x: 0.171875, y: 0.859375 },\n { x: 0.171875, y: 0.859375 },\n { x: 0.203125, y: 0.859375 },\n { x: 0.203125, y: 0.859375 },\n { x: 0.234375, y: 0.859375 },\n { x: 0.234375, y: 0.859375 },\n { x: 0.265625, y: 0.859375 },\n { x: 0.265625, y: 0.859375 },\n { x: 0.296875, y: 0.859375 },\n { x: 0.296875, y: 0.859375 },\n { x: 0.328125, y: 0.859375 },\n { x: 0.328125, y: 0.859375 },\n { x: 0.359375, y: 0.859375 },\n { x: 0.359375, y: 0.859375 },\n { x: 0.390625, y: 0.859375 },\n { x: 0.390625, y: 0.859375 },\n { x: 0.421875, y: 0.859375 },\n { x: 0.421875, y: 0.859375 },\n { x: 0.453125, y: 0.859375 },\n { x: 0.453125, y: 0.859375 },\n { x: 0.484375, y: 0.859375 },\n { x: 0.484375, y: 0.859375 },\n { x: 0.515625, y: 0.859375 },\n { x: 0.515625, y: 0.859375 },\n { x: 0.546875, y: 0.859375 },\n { x: 0.546875, y: 0.859375 },\n { x: 0.578125, y: 0.859375 },\n { x: 0.578125, y: 0.859375 },\n { x: 0.609375, y: 0.859375 },\n { x: 0.609375, y: 0.859375 },\n { x: 0.640625, y: 0.859375 },\n { x: 0.640625, y: 0.859375 },\n { x: 0.671875, y: 0.859375 },\n { x: 0.671875, y: 0.859375 },\n { x: 0.703125, y: 0.859375 },\n { x: 0.703125, y: 0.859375 },\n { x: 0.734375, y: 0.859375 },\n { x: 0.734375, y: 0.859375 },\n { x: 0.765625, y: 0.859375 },\n { x: 0.765625, y: 0.859375 },\n { x: 0.796875, y: 0.859375 },\n { x: 0.796875, y: 0.859375 },\n { x: 0.828125, y: 0.859375 },\n { x: 0.828125, y: 0.859375 },\n { x: 0.859375, y: 0.859375 },\n { x: 0.859375, y: 0.859375 },\n { x: 0.890625, y: 0.859375 },\n { x: 0.890625, y: 0.859375 },\n { x: 0.921875, y: 0.859375 },\n { x: 0.921875, y: 0.859375 },\n { x: 0.953125, y: 0.859375 },\n { x: 0.953125, y: 0.859375 },\n { x: 0.984375, y: 0.859375 },\n { x: 0.984375, y: 0.859375 },\n { x: 0.015625, y: 0.890625 },\n { x: 0.015625, y: 0.890625 },\n { x: 0.046875, y: 0.890625 },\n { x: 0.046875, y: 0.890625 },\n { x: 0.078125, y: 0.890625 },\n { x: 0.078125, y: 0.890625 },\n { x: 0.109375, y: 0.890625 },\n { x: 0.109375, y: 0.890625 },\n { x: 0.140625, y: 0.890625 },\n { x: 0.140625, y: 0.890625 },\n { x: 0.171875, y: 0.890625 },\n { x: 0.171875, y: 0.890625 },\n { x: 0.203125, y: 0.890625 },\n { x: 0.203125, y: 0.890625 },\n { x: 0.234375, y: 0.890625 },\n { x: 0.234375, y: 0.890625 },\n { x: 0.265625, y: 0.890625 },\n { x: 0.265625, y: 0.890625 },\n { x: 0.296875, y: 0.890625 },\n { x: 0.296875, y: 0.890625 },\n { x: 0.328125, y: 0.890625 },\n { x: 0.328125, y: 0.890625 },\n { x: 0.359375, y: 0.890625 },\n { x: 0.359375, y: 0.890625 },\n { x: 0.390625, y: 0.890625 },\n { x: 0.390625, y: 0.890625 },\n { x: 0.421875, y: 0.890625 },\n { x: 0.421875, y: 0.890625 },\n { x: 0.453125, y: 0.890625 },\n { x: 0.453125, y: 0.890625 },\n { x: 0.484375, y: 0.890625 },\n { x: 0.484375, y: 0.890625 },\n { x: 0.515625, y: 0.890625 },\n { x: 0.515625, y: 0.890625 },\n { x: 0.546875, y: 0.890625 },\n { x: 0.546875, y: 0.890625 },\n { x: 0.578125, y: 0.890625 },\n { x: 0.578125, y: 0.890625 },\n { x: 0.609375, y: 0.890625 },\n { x: 0.609375, y: 0.890625 },\n { x: 0.640625, y: 0.890625 },\n { x: 0.640625, y: 0.890625 },\n { x: 0.671875, y: 0.890625 },\n { x: 0.671875, y: 0.890625 },\n { x: 0.703125, y: 0.890625 },\n { x: 0.703125, y: 0.890625 },\n { x: 0.734375, y: 0.890625 },\n { x: 0.734375, y: 0.890625 },\n { x: 0.765625, y: 0.890625 },\n { x: 0.765625, y: 0.890625 },\n { x: 0.796875, y: 0.890625 },\n { x: 0.796875, y: 0.890625 },\n { x: 0.828125, y: 0.890625 },\n { x: 0.828125, y: 0.890625 },\n { x: 0.859375, y: 0.890625 },\n { x: 0.859375, y: 0.890625 },\n { x: 0.890625, y: 0.890625 },\n { x: 0.890625, y: 0.890625 },\n { x: 0.921875, y: 0.890625 },\n { x: 0.921875, y: 0.890625 },\n { x: 0.953125, y: 0.890625 },\n { x: 0.953125, y: 0.890625 },\n { x: 0.984375, y: 0.890625 },\n { x: 0.984375, y: 0.890625 },\n { x: 0.015625, y: 0.921875 },\n { x: 0.015625, y: 0.921875 },\n { x: 0.046875, y: 0.921875 },\n { x: 0.046875, y: 0.921875 },\n { x: 0.078125, y: 0.921875 },\n { x: 0.078125, y: 0.921875 },\n { x: 0.109375, y: 0.921875 },\n { x: 0.109375, y: 0.921875 },\n { x: 0.140625, y: 0.921875 },\n { x: 0.140625, y: 0.921875 },\n { x: 0.171875, y: 0.921875 },\n { x: 0.171875, y: 0.921875 },\n { x: 0.203125, y: 0.921875 },\n { x: 0.203125, y: 0.921875 },\n { x: 0.234375, y: 0.921875 },\n { x: 0.234375, y: 0.921875 },\n { x: 0.265625, y: 0.921875 },\n { x: 0.265625, y: 0.921875 },\n { x: 0.296875, y: 0.921875 },\n { x: 0.296875, y: 0.921875 },\n { x: 0.328125, y: 0.921875 },\n { x: 0.328125, y: 0.921875 },\n { x: 0.359375, y: 0.921875 },\n { x: 0.359375, y: 0.921875 },\n { x: 0.390625, y: 0.921875 },\n { x: 0.390625, y: 0.921875 },\n { x: 0.421875, y: 0.921875 },\n { x: 0.421875, y: 0.921875 },\n { x: 0.453125, y: 0.921875 },\n { x: 0.453125, y: 0.921875 },\n { x: 0.484375, y: 0.921875 },\n { x: 0.484375, y: 0.921875 },\n { x: 0.515625, y: 0.921875 },\n { x: 0.515625, y: 0.921875 },\n { x: 0.546875, y: 0.921875 },\n { x: 0.546875, y: 0.921875 },\n { x: 0.578125, y: 0.921875 },\n { x: 0.578125, y: 0.921875 },\n { x: 0.609375, y: 0.921875 },\n { x: 0.609375, y: 0.921875 },\n { x: 0.640625, y: 0.921875 },\n { x: 0.640625, y: 0.921875 },\n { x: 0.671875, y: 0.921875 },\n { x: 0.671875, y: 0.921875 },\n { x: 0.703125, y: 0.921875 },\n { x: 0.703125, y: 0.921875 },\n { x: 0.734375, y: 0.921875 },\n { x: 0.734375, y: 0.921875 },\n { x: 0.765625, y: 0.921875 },\n { x: 0.765625, y: 0.921875 },\n { x: 0.796875, y: 0.921875 },\n { x: 0.796875, y: 0.921875 },\n { x: 0.828125, y: 0.921875 },\n { x: 0.828125, y: 0.921875 },\n { x: 0.859375, y: 0.921875 },\n { x: 0.859375, y: 0.921875 },\n { x: 0.890625, y: 0.921875 },\n { x: 0.890625, y: 0.921875 },\n { x: 0.921875, y: 0.921875 },\n { x: 0.921875, y: 0.921875 },\n { x: 0.953125, y: 0.921875 },\n { x: 0.953125, y: 0.921875 },\n { x: 0.984375, y: 0.921875 },\n { x: 0.984375, y: 0.921875 },\n { x: 0.015625, y: 0.953125 },\n { x: 0.015625, y: 0.953125 },\n { x: 0.046875, y: 0.953125 },\n { x: 0.046875, y: 0.953125 },\n { x: 0.078125, y: 0.953125 },\n { x: 0.078125, y: 0.953125 },\n { x: 0.109375, y: 0.953125 },\n { x: 0.109375, y: 0.953125 },\n { x: 0.140625, y: 0.953125 },\n { x: 0.140625, y: 0.953125 },\n { x: 0.171875, y: 0.953125 },\n { x: 0.171875, y: 0.953125 },\n { x: 0.203125, y: 0.953125 },\n { x: 0.203125, y: 0.953125 },\n { x: 0.234375, y: 0.953125 },\n { x: 0.234375, y: 0.953125 },\n { x: 0.265625, y: 0.953125 },\n { x: 0.265625, y: 0.953125 },\n { x: 0.296875, y: 0.953125 },\n { x: 0.296875, y: 0.953125 },\n { x: 0.328125, y: 0.953125 },\n { x: 0.328125, y: 0.953125 },\n { x: 0.359375, y: 0.953125 },\n { x: 0.359375, y: 0.953125 },\n { x: 0.390625, y: 0.953125 },\n { x: 0.390625, y: 0.953125 },\n { x: 0.421875, y: 0.953125 },\n { x: 0.421875, y: 0.953125 },\n { x: 0.453125, y: 0.953125 },\n { x: 0.453125, y: 0.953125 },\n { x: 0.484375, y: 0.953125 },\n { x: 0.484375, y: 0.953125 },\n { x: 0.515625, y: 0.953125 },\n { x: 0.515625, y: 0.953125 },\n { x: 0.546875, y: 0.953125 },\n { x: 0.546875, y: 0.953125 },\n { x: 0.578125, y: 0.953125 },\n { x: 0.578125, y: 0.953125 },\n { x: 0.609375, y: 0.953125 },\n { x: 0.609375, y: 0.953125 },\n { x: 0.640625, y: 0.953125 },\n { x: 0.640625, y: 0.953125 },\n { x: 0.671875, y: 0.953125 },\n { x: 0.671875, y: 0.953125 },\n { x: 0.703125, y: 0.953125 },\n { x: 0.703125, y: 0.953125 },\n { x: 0.734375, y: 0.953125 },\n { x: 0.734375, y: 0.953125 },\n { x: 0.765625, y: 0.953125 },\n { x: 0.765625, y: 0.953125 },\n { x: 0.796875, y: 0.953125 },\n { x: 0.796875, y: 0.953125 },\n { x: 0.828125, y: 0.953125 },\n { x: 0.828125, y: 0.953125 },\n { x: 0.859375, y: 0.953125 },\n { x: 0.859375, y: 0.953125 },\n { x: 0.890625, y: 0.953125 },\n { x: 0.890625, y: 0.953125 },\n { x: 0.921875, y: 0.953125 },\n { x: 0.921875, y: 0.953125 },\n { x: 0.953125, y: 0.953125 },\n { x: 0.953125, y: 0.953125 },\n { x: 0.984375, y: 0.953125 },\n { x: 0.984375, y: 0.953125 },\n { x: 0.015625, y: 0.984375 },\n { x: 0.015625, y: 0.984375 },\n { x: 0.046875, y: 0.984375 },\n { x: 0.046875, y: 0.984375 },\n { x: 0.078125, y: 0.984375 },\n { x: 0.078125, y: 0.984375 },\n { x: 0.109375, y: 0.984375 },\n { x: 0.109375, y: 0.984375 },\n { x: 0.140625, y: 0.984375 },\n { x: 0.140625, y: 0.984375 },\n { x: 0.171875, y: 0.984375 },\n { x: 0.171875, y: 0.984375 },\n { x: 0.203125, y: 0.984375 },\n { x: 0.203125, y: 0.984375 },\n { x: 0.234375, y: 0.984375 },\n { x: 0.234375, y: 0.984375 },\n { x: 0.265625, y: 0.984375 },\n { x: 0.265625, y: 0.984375 },\n { x: 0.296875, y: 0.984375 },\n { x: 0.296875, y: 0.984375 },\n { x: 0.328125, y: 0.984375 },\n { x: 0.328125, y: 0.984375 },\n { x: 0.359375, y: 0.984375 },\n { x: 0.359375, y: 0.984375 },\n { x: 0.390625, y: 0.984375 },\n { x: 0.390625, y: 0.984375 },\n { x: 0.421875, y: 0.984375 },\n { x: 0.421875, y: 0.984375 },\n { x: 0.453125, y: 0.984375 },\n { x: 0.453125, y: 0.984375 },\n { x: 0.484375, y: 0.984375 },\n { x: 0.484375, y: 0.984375 },\n { x: 0.515625, y: 0.984375 },\n { x: 0.515625, y: 0.984375 },\n { x: 0.546875, y: 0.984375 },\n { x: 0.546875, y: 0.984375 },\n { x: 0.578125, y: 0.984375 },\n { x: 0.578125, y: 0.984375 },\n { x: 0.609375, y: 0.984375 },\n { x: 0.609375, y: 0.984375 },\n { x: 0.640625, y: 0.984375 },\n { x: 0.640625, y: 0.984375 },\n { x: 0.671875, y: 0.984375 },\n { x: 0.671875, y: 0.984375 },\n { x: 0.703125, y: 0.984375 },\n { x: 0.703125, y: 0.984375 },\n { x: 0.734375, y: 0.984375 },\n { x: 0.734375, y: 0.984375 },\n { x: 0.765625, y: 0.984375 },\n { x: 0.765625, y: 0.984375 },\n { x: 0.796875, y: 0.984375 },\n { x: 0.796875, y: 0.984375 },\n { x: 0.828125, y: 0.984375 },\n { x: 0.828125, y: 0.984375 },\n { x: 0.859375, y: 0.984375 },\n { x: 0.859375, y: 0.984375 },\n { x: 0.890625, y: 0.984375 },\n { x: 0.890625, y: 0.984375 },\n { x: 0.921875, y: 0.984375 },\n { x: 0.921875, y: 0.984375 },\n { x: 0.953125, y: 0.984375 },\n { x: 0.953125, y: 0.984375 },\n { x: 0.984375, y: 0.984375 },\n { x: 0.984375, y: 0.984375 },\n { x: 0.03125, y: 0.03125 },\n { x: 0.03125, y: 0.03125 },\n { x: 0.09375, y: 0.03125 },\n { x: 0.09375, y: 0.03125 },\n { x: 0.15625, y: 0.03125 },\n { x: 0.15625, y: 0.03125 },\n { x: 0.21875, y: 0.03125 },\n { x: 0.21875, y: 0.03125 },\n { x: 0.28125, y: 0.03125 },\n { x: 0.28125, y: 0.03125 },\n { x: 0.34375, y: 0.03125 },\n { x: 0.34375, y: 0.03125 },\n { x: 0.40625, y: 0.03125 },\n { x: 0.40625, y: 0.03125 },\n { x: 0.46875, y: 0.03125 },\n { x: 0.46875, y: 0.03125 },\n { x: 0.53125, y: 0.03125 },\n { x: 0.53125, y: 0.03125 },\n { x: 0.59375, y: 0.03125 },\n { x: 0.59375, y: 0.03125 },\n { x: 0.65625, y: 0.03125 },\n { x: 0.65625, y: 0.03125 },\n { x: 0.71875, y: 0.03125 },\n { x: 0.71875, y: 0.03125 },\n { x: 0.78125, y: 0.03125 },\n { x: 0.78125, y: 0.03125 },\n { x: 0.84375, y: 0.03125 },\n { x: 0.84375, y: 0.03125 },\n { x: 0.90625, y: 0.03125 },\n { x: 0.90625, y: 0.03125 },\n { x: 0.96875, y: 0.03125 },\n { x: 0.96875, y: 0.03125 },\n { x: 0.03125, y: 0.09375 },\n { x: 0.03125, y: 0.09375 },\n { x: 0.09375, y: 0.09375 },\n { x: 0.09375, y: 0.09375 },\n { x: 0.15625, y: 0.09375 },\n { x: 0.15625, y: 0.09375 },\n { x: 0.21875, y: 0.09375 },\n { x: 0.21875, y: 0.09375 },\n { x: 0.28125, y: 0.09375 },\n { x: 0.28125, y: 0.09375 },\n { x: 0.34375, y: 0.09375 },\n { x: 0.34375, y: 0.09375 },\n { x: 0.40625, y: 0.09375 },\n { x: 0.40625, y: 0.09375 },\n { x: 0.46875, y: 0.09375 },\n { x: 0.46875, y: 0.09375 },\n { x: 0.53125, y: 0.09375 },\n { x: 0.53125, y: 0.09375 },\n { x: 0.59375, y: 0.09375 },\n { x: 0.59375, y: 0.09375 },\n { x: 0.65625, y: 0.09375 },\n { x: 0.65625, y: 0.09375 },\n { x: 0.71875, y: 0.09375 },\n { x: 0.71875, y: 0.09375 },\n { x: 0.78125, y: 0.09375 },\n { x: 0.78125, y: 0.09375 },\n { x: 0.84375, y: 0.09375 },\n { x: 0.84375, y: 0.09375 },\n { x: 0.90625, y: 0.09375 },\n { x: 0.90625, y: 0.09375 },\n { x: 0.96875, y: 0.09375 },\n { x: 0.96875, y: 0.09375 },\n { x: 0.03125, y: 0.15625 },\n { x: 0.03125, y: 0.15625 },\n { x: 0.09375, y: 0.15625 },\n { x: 0.09375, y: 0.15625 },\n { x: 0.15625, y: 0.15625 },\n { x: 0.15625, y: 0.15625 },\n { x: 0.21875, y: 0.15625 },\n { x: 0.21875, y: 0.15625 },\n { x: 0.28125, y: 0.15625 },\n { x: 0.28125, y: 0.15625 },\n { x: 0.34375, y: 0.15625 },\n { x: 0.34375, y: 0.15625 },\n { x: 0.40625, y: 0.15625 },\n { x: 0.40625, y: 0.15625 },\n { x: 0.46875, y: 0.15625 },\n { x: 0.46875, y: 0.15625 },\n { x: 0.53125, y: 0.15625 },\n { x: 0.53125, y: 0.15625 },\n { x: 0.59375, y: 0.15625 },\n { x: 0.59375, y: 0.15625 },\n { x: 0.65625, y: 0.15625 },\n { x: 0.65625, y: 0.15625 },\n { x: 0.71875, y: 0.15625 },\n { x: 0.71875, y: 0.15625 },\n { x: 0.78125, y: 0.15625 },\n { x: 0.78125, y: 0.15625 },\n { x: 0.84375, y: 0.15625 },\n { x: 0.84375, y: 0.15625 },\n { x: 0.90625, y: 0.15625 },\n { x: 0.90625, y: 0.15625 },\n { x: 0.96875, y: 0.15625 },\n { x: 0.96875, y: 0.15625 },\n { x: 0.03125, y: 0.21875 },\n { x: 0.03125, y: 0.21875 },\n { x: 0.09375, y: 0.21875 },\n { x: 0.09375, y: 0.21875 },\n { x: 0.15625, y: 0.21875 },\n { x: 0.15625, y: 0.21875 },\n { x: 0.21875, y: 0.21875 },\n { x: 0.21875, y: 0.21875 },\n { x: 0.28125, y: 0.21875 },\n { x: 0.28125, y: 0.21875 },\n { x: 0.34375, y: 0.21875 },\n { x: 0.34375, y: 0.21875 },\n { x: 0.40625, y: 0.21875 },\n { x: 0.40625, y: 0.21875 },\n { x: 0.46875, y: 0.21875 },\n { x: 0.46875, y: 0.21875 },\n { x: 0.53125, y: 0.21875 },\n { x: 0.53125, y: 0.21875 },\n { x: 0.59375, y: 0.21875 },\n { x: 0.59375, y: 0.21875 },\n { x: 0.65625, y: 0.21875 },\n { x: 0.65625, y: 0.21875 },\n { x: 0.71875, y: 0.21875 },\n { x: 0.71875, y: 0.21875 },\n { x: 0.78125, y: 0.21875 },\n { x: 0.78125, y: 0.21875 },\n { x: 0.84375, y: 0.21875 },\n { x: 0.84375, y: 0.21875 },\n { x: 0.90625, y: 0.21875 },\n { x: 0.90625, y: 0.21875 },\n { x: 0.96875, y: 0.21875 },\n { x: 0.96875, y: 0.21875 },\n { x: 0.03125, y: 0.28125 },\n { x: 0.03125, y: 0.28125 },\n { x: 0.09375, y: 0.28125 },\n { x: 0.09375, y: 0.28125 },\n { x: 0.15625, y: 0.28125 },\n { x: 0.15625, y: 0.28125 },\n { x: 0.21875, y: 0.28125 },\n { x: 0.21875, y: 0.28125 },\n { x: 0.28125, y: 0.28125 },\n { x: 0.28125, y: 0.28125 },\n { x: 0.34375, y: 0.28125 },\n { x: 0.34375, y: 0.28125 },\n { x: 0.40625, y: 0.28125 },\n { x: 0.40625, y: 0.28125 },\n { x: 0.46875, y: 0.28125 },\n { x: 0.46875, y: 0.28125 },\n { x: 0.53125, y: 0.28125 },\n { x: 0.53125, y: 0.28125 },\n { x: 0.59375, y: 0.28125 },\n { x: 0.59375, y: 0.28125 },\n { x: 0.65625, y: 0.28125 },\n { x: 0.65625, y: 0.28125 },\n { x: 0.71875, y: 0.28125 },\n { x: 0.71875, y: 0.28125 },\n { x: 0.78125, y: 0.28125 },\n { x: 0.78125, y: 0.28125 },\n { x: 0.84375, y: 0.28125 },\n { x: 0.84375, y: 0.28125 },\n { x: 0.90625, y: 0.28125 },\n { x: 0.90625, y: 0.28125 },\n { x: 0.96875, y: 0.28125 },\n { x: 0.96875, y: 0.28125 },\n { x: 0.03125, y: 0.34375 },\n { x: 0.03125, y: 0.34375 },\n { x: 0.09375, y: 0.34375 },\n { x: 0.09375, y: 0.34375 },\n { x: 0.15625, y: 0.34375 },\n { x: 0.15625, y: 0.34375 },\n { x: 0.21875, y: 0.34375 },\n { x: 0.21875, y: 0.34375 },\n { x: 0.28125, y: 0.34375 },\n { x: 0.28125, y: 0.34375 },\n { x: 0.34375, y: 0.34375 },\n { x: 0.34375, y: 0.34375 },\n { x: 0.40625, y: 0.34375 },\n { x: 0.40625, y: 0.34375 },\n { x: 0.46875, y: 0.34375 },\n { x: 0.46875, y: 0.34375 },\n { x: 0.53125, y: 0.34375 },\n { x: 0.53125, y: 0.34375 },\n { x: 0.59375, y: 0.34375 },\n { x: 0.59375, y: 0.34375 },\n { x: 0.65625, y: 0.34375 },\n { x: 0.65625, y: 0.34375 },\n { x: 0.71875, y: 0.34375 },\n { x: 0.71875, y: 0.34375 },\n { x: 0.78125, y: 0.34375 },\n { x: 0.78125, y: 0.34375 },\n { x: 0.84375, y: 0.34375 },\n { x: 0.84375, y: 0.34375 },\n { x: 0.90625, y: 0.34375 },\n { x: 0.90625, y: 0.34375 },\n { x: 0.96875, y: 0.34375 },\n { x: 0.96875, y: 0.34375 },\n { x: 0.03125, y: 0.40625 },\n { x: 0.03125, y: 0.40625 },\n { x: 0.09375, y: 0.40625 },\n { x: 0.09375, y: 0.40625 },\n { x: 0.15625, y: 0.40625 },\n { x: 0.15625, y: 0.40625 },\n { x: 0.21875, y: 0.40625 },\n { x: 0.21875, y: 0.40625 },\n { x: 0.28125, y: 0.40625 },\n { x: 0.28125, y: 0.40625 },\n { x: 0.34375, y: 0.40625 },\n { x: 0.34375, y: 0.40625 },\n { x: 0.40625, y: 0.40625 },\n { x: 0.40625, y: 0.40625 },\n { x: 0.46875, y: 0.40625 },\n { x: 0.46875, y: 0.40625 },\n { x: 0.53125, y: 0.40625 },\n { x: 0.53125, y: 0.40625 },\n { x: 0.59375, y: 0.40625 },\n { x: 0.59375, y: 0.40625 },\n { x: 0.65625, y: 0.40625 },\n { x: 0.65625, y: 0.40625 },\n { x: 0.71875, y: 0.40625 },\n { x: 0.71875, y: 0.40625 },\n { x: 0.78125, y: 0.40625 },\n { x: 0.78125, y: 0.40625 },\n { x: 0.84375, y: 0.40625 },\n { x: 0.84375, y: 0.40625 },\n { x: 0.90625, y: 0.40625 },\n { x: 0.90625, y: 0.40625 },\n { x: 0.96875, y: 0.40625 },\n { x: 0.96875, y: 0.40625 },\n { x: 0.03125, y: 0.46875 },\n { x: 0.03125, y: 0.46875 },\n { x: 0.09375, y: 0.46875 },\n { x: 0.09375, y: 0.46875 },\n { x: 0.15625, y: 0.46875 },\n { x: 0.15625, y: 0.46875 },\n { x: 0.21875, y: 0.46875 },\n { x: 0.21875, y: 0.46875 },\n { x: 0.28125, y: 0.46875 },\n { x: 0.28125, y: 0.46875 },\n { x: 0.34375, y: 0.46875 },\n { x: 0.34375, y: 0.46875 },\n { x: 0.40625, y: 0.46875 },\n { x: 0.40625, y: 0.46875 },\n { x: 0.46875, y: 0.46875 },\n { x: 0.46875, y: 0.46875 },\n { x: 0.53125, y: 0.46875 },\n { x: 0.53125, y: 0.46875 },\n { x: 0.59375, y: 0.46875 },\n { x: 0.59375, y: 0.46875 },\n { x: 0.65625, y: 0.46875 },\n { x: 0.65625, y: 0.46875 },\n { x: 0.71875, y: 0.46875 },\n { x: 0.71875, y: 0.46875 },\n { x: 0.78125, y: 0.46875 },\n { x: 0.78125, y: 0.46875 },\n { x: 0.84375, y: 0.46875 },\n { x: 0.84375, y: 0.46875 },\n { x: 0.90625, y: 0.46875 },\n { x: 0.90625, y: 0.46875 },\n { x: 0.96875, y: 0.46875 },\n { x: 0.96875, y: 0.46875 },\n { x: 0.03125, y: 0.53125 },\n { x: 0.03125, y: 0.53125 },\n { x: 0.09375, y: 0.53125 },\n { x: 0.09375, y: 0.53125 },\n { x: 0.15625, y: 0.53125 },\n { x: 0.15625, y: 0.53125 },\n { x: 0.21875, y: 0.53125 },\n { x: 0.21875, y: 0.53125 },\n { x: 0.28125, y: 0.53125 },\n { x: 0.28125, y: 0.53125 },\n { x: 0.34375, y: 0.53125 },\n { x: 0.34375, y: 0.53125 },\n { x: 0.40625, y: 0.53125 },\n { x: 0.40625, y: 0.53125 },\n { x: 0.46875, y: 0.53125 },\n { x: 0.46875, y: 0.53125 },\n { x: 0.53125, y: 0.53125 },\n { x: 0.53125, y: 0.53125 },\n { x: 0.59375, y: 0.53125 },\n { x: 0.59375, y: 0.53125 },\n { x: 0.65625, y: 0.53125 },\n { x: 0.65625, y: 0.53125 },\n { x: 0.71875, y: 0.53125 },\n { x: 0.71875, y: 0.53125 },\n { x: 0.78125, y: 0.53125 },\n { x: 0.78125, y: 0.53125 },\n { x: 0.84375, y: 0.53125 },\n { x: 0.84375, y: 0.53125 },\n { x: 0.90625, y: 0.53125 },\n { x: 0.90625, y: 0.53125 },\n { x: 0.96875, y: 0.53125 },\n { x: 0.96875, y: 0.53125 },\n { x: 0.03125, y: 0.59375 },\n { x: 0.03125, y: 0.59375 },\n { x: 0.09375, y: 0.59375 },\n { x: 0.09375, y: 0.59375 },\n { x: 0.15625, y: 0.59375 },\n { x: 0.15625, y: 0.59375 },\n { x: 0.21875, y: 0.59375 },\n { x: 0.21875, y: 0.59375 },\n { x: 0.28125, y: 0.59375 },\n { x: 0.28125, y: 0.59375 },\n { x: 0.34375, y: 0.59375 },\n { x: 0.34375, y: 0.59375 },\n { x: 0.40625, y: 0.59375 },\n { x: 0.40625, y: 0.59375 },\n { x: 0.46875, y: 0.59375 },\n { x: 0.46875, y: 0.59375 },\n { x: 0.53125, y: 0.59375 },\n { x: 0.53125, y: 0.59375 },\n { x: 0.59375, y: 0.59375 },\n { x: 0.59375, y: 0.59375 },\n { x: 0.65625, y: 0.59375 },\n { x: 0.65625, y: 0.59375 },\n { x: 0.71875, y: 0.59375 },\n { x: 0.71875, y: 0.59375 },\n { x: 0.78125, y: 0.59375 },\n { x: 0.78125, y: 0.59375 },\n { x: 0.84375, y: 0.59375 },\n { x: 0.84375, y: 0.59375 },\n { x: 0.90625, y: 0.59375 },\n { x: 0.90625, y: 0.59375 },\n { x: 0.96875, y: 0.59375 },\n { x: 0.96875, y: 0.59375 },\n { x: 0.03125, y: 0.65625 },\n { x: 0.03125, y: 0.65625 },\n { x: 0.09375, y: 0.65625 },\n { x: 0.09375, y: 0.65625 },\n { x: 0.15625, y: 0.65625 },\n { x: 0.15625, y: 0.65625 },\n { x: 0.21875, y: 0.65625 },\n { x: 0.21875, y: 0.65625 },\n { x: 0.28125, y: 0.65625 },\n { x: 0.28125, y: 0.65625 },\n { x: 0.34375, y: 0.65625 },\n { x: 0.34375, y: 0.65625 },\n { x: 0.40625, y: 0.65625 },\n { x: 0.40625, y: 0.65625 },\n { x: 0.46875, y: 0.65625 },\n { x: 0.46875, y: 0.65625 },\n { x: 0.53125, y: 0.65625 },\n { x: 0.53125, y: 0.65625 },\n { x: 0.59375, y: 0.65625 },\n { x: 0.59375, y: 0.65625 },\n { x: 0.65625, y: 0.65625 },\n { x: 0.65625, y: 0.65625 },\n { x: 0.71875, y: 0.65625 },\n { x: 0.71875, y: 0.65625 },\n { x: 0.78125, y: 0.65625 },\n { x: 0.78125, y: 0.65625 },\n { x: 0.84375, y: 0.65625 },\n { x: 0.84375, y: 0.65625 },\n { x: 0.90625, y: 0.65625 },\n { x: 0.90625, y: 0.65625 },\n { x: 0.96875, y: 0.65625 },\n { x: 0.96875, y: 0.65625 },\n { x: 0.03125, y: 0.71875 },\n { x: 0.03125, y: 0.71875 },\n { x: 0.09375, y: 0.71875 },\n { x: 0.09375, y: 0.71875 },\n { x: 0.15625, y: 0.71875 },\n { x: 0.15625, y: 0.71875 },\n { x: 0.21875, y: 0.71875 },\n { x: 0.21875, y: 0.71875 },\n { x: 0.28125, y: 0.71875 },\n { x: 0.28125, y: 0.71875 },\n { x: 0.34375, y: 0.71875 },\n { x: 0.34375, y: 0.71875 },\n { x: 0.40625, y: 0.71875 },\n { x: 0.40625, y: 0.71875 },\n { x: 0.46875, y: 0.71875 },\n { x: 0.46875, y: 0.71875 },\n { x: 0.53125, y: 0.71875 },\n { x: 0.53125, y: 0.71875 },\n { x: 0.59375, y: 0.71875 },\n { x: 0.59375, y: 0.71875 },\n { x: 0.65625, y: 0.71875 },\n { x: 0.65625, y: 0.71875 },\n { x: 0.71875, y: 0.71875 },\n { x: 0.71875, y: 0.71875 },\n { x: 0.78125, y: 0.71875 },\n { x: 0.78125, y: 0.71875 },\n { x: 0.84375, y: 0.71875 },\n { x: 0.84375, y: 0.71875 },\n { x: 0.90625, y: 0.71875 },\n { x: 0.90625, y: 0.71875 },\n { x: 0.96875, y: 0.71875 },\n { x: 0.96875, y: 0.71875 },\n { x: 0.03125, y: 0.78125 },\n { x: 0.03125, y: 0.78125 },\n { x: 0.09375, y: 0.78125 },\n { x: 0.09375, y: 0.78125 },\n { x: 0.15625, y: 0.78125 },\n { x: 0.15625, y: 0.78125 },\n { x: 0.21875, y: 0.78125 },\n { x: 0.21875, y: 0.78125 },\n { x: 0.28125, y: 0.78125 },\n { x: 0.28125, y: 0.78125 },\n { x: 0.34375, y: 0.78125 },\n { x: 0.34375, y: 0.78125 },\n { x: 0.40625, y: 0.78125 },\n { x: 0.40625, y: 0.78125 },\n { x: 0.46875, y: 0.78125 },\n { x: 0.46875, y: 0.78125 },\n { x: 0.53125, y: 0.78125 },\n { x: 0.53125, y: 0.78125 },\n { x: 0.59375, y: 0.78125 },\n { x: 0.59375, y: 0.78125 },\n { x: 0.65625, y: 0.78125 },\n { x: 0.65625, y: 0.78125 },\n { x: 0.71875, y: 0.78125 },\n { x: 0.71875, y: 0.78125 },\n { x: 0.78125, y: 0.78125 },\n { x: 0.78125, y: 0.78125 },\n { x: 0.84375, y: 0.78125 },\n { x: 0.84375, y: 0.78125 },\n { x: 0.90625, y: 0.78125 },\n { x: 0.90625, y: 0.78125 },\n { x: 0.96875, y: 0.78125 },\n { x: 0.96875, y: 0.78125 },\n { x: 0.03125, y: 0.84375 },\n { x: 0.03125, y: 0.84375 },\n { x: 0.09375, y: 0.84375 },\n { x: 0.09375, y: 0.84375 },\n { x: 0.15625, y: 0.84375 },\n { x: 0.15625, y: 0.84375 },\n { x: 0.21875, y: 0.84375 },\n { x: 0.21875, y: 0.84375 },\n { x: 0.28125, y: 0.84375 },\n { x: 0.28125, y: 0.84375 },\n { x: 0.34375, y: 0.84375 },\n { x: 0.34375, y: 0.84375 },\n { x: 0.40625, y: 0.84375 },\n { x: 0.40625, y: 0.84375 },\n { x: 0.46875, y: 0.84375 },\n { x: 0.46875, y: 0.84375 },\n { x: 0.53125, y: 0.84375 },\n { x: 0.53125, y: 0.84375 },\n { x: 0.59375, y: 0.84375 },\n { x: 0.59375, y: 0.84375 },\n { x: 0.65625, y: 0.84375 },\n { x: 0.65625, y: 0.84375 },\n { x: 0.71875, y: 0.84375 },\n { x: 0.71875, y: 0.84375 },\n { x: 0.78125, y: 0.84375 },\n { x: 0.78125, y: 0.84375 },\n { x: 0.84375, y: 0.84375 },\n { x: 0.84375, y: 0.84375 },\n { x: 0.90625, y: 0.84375 },\n { x: 0.90625, y: 0.84375 },\n { x: 0.96875, y: 0.84375 },\n { x: 0.96875, y: 0.84375 },\n { x: 0.03125, y: 0.90625 },\n { x: 0.03125, y: 0.90625 },\n { x: 0.09375, y: 0.90625 },\n { x: 0.09375, y: 0.90625 },\n { x: 0.15625, y: 0.90625 },\n { x: 0.15625, y: 0.90625 },\n { x: 0.21875, y: 0.90625 },\n { x: 0.21875, y: 0.90625 },\n { x: 0.28125, y: 0.90625 },\n { x: 0.28125, y: 0.90625 },\n { x: 0.34375, y: 0.90625 },\n { x: 0.34375, y: 0.90625 },\n { x: 0.40625, y: 0.90625 },\n { x: 0.40625, y: 0.90625 },\n { x: 0.46875, y: 0.90625 },\n { x: 0.46875, y: 0.90625 },\n { x: 0.53125, y: 0.90625 },\n { x: 0.53125, y: 0.90625 },\n { x: 0.59375, y: 0.90625 },\n { x: 0.59375, y: 0.90625 },\n { x: 0.65625, y: 0.90625 },\n { x: 0.65625, y: 0.90625 },\n { x: 0.71875, y: 0.90625 },\n { x: 0.71875, y: 0.90625 },\n { x: 0.78125, y: 0.90625 },\n { x: 0.78125, y: 0.90625 },\n { x: 0.84375, y: 0.90625 },\n { x: 0.84375, y: 0.90625 },\n { x: 0.90625, y: 0.90625 },\n { x: 0.90625, y: 0.90625 },\n { x: 0.96875, y: 0.90625 },\n { x: 0.96875, y: 0.90625 },\n { x: 0.03125, y: 0.96875 },\n { x: 0.03125, y: 0.96875 },\n { x: 0.09375, y: 0.96875 },\n { x: 0.09375, y: 0.96875 },\n { x: 0.15625, y: 0.96875 },\n { x: 0.15625, y: 0.96875 },\n { x: 0.21875, y: 0.96875 },\n { x: 0.21875, y: 0.96875 },\n { x: 0.28125, y: 0.96875 },\n { x: 0.28125, y: 0.96875 },\n { x: 0.34375, y: 0.96875 },\n { x: 0.34375, y: 0.96875 },\n { x: 0.40625, y: 0.96875 },\n { x: 0.40625, y: 0.96875 },\n { x: 0.46875, y: 0.96875 },\n { x: 0.46875, y: 0.96875 },\n { x: 0.53125, y: 0.96875 },\n { x: 0.53125, y: 0.96875 },\n { x: 0.59375, y: 0.96875 },\n { x: 0.59375, y: 0.96875 },\n { x: 0.65625, y: 0.96875 },\n { x: 0.65625, y: 0.96875 },\n { x: 0.71875, y: 0.96875 },\n { x: 0.71875, y: 0.96875 },\n { x: 0.78125, y: 0.96875 },\n { x: 0.78125, y: 0.96875 },\n { x: 0.84375, y: 0.96875 },\n { x: 0.84375, y: 0.96875 },\n { x: 0.90625, y: 0.96875 },\n { x: 0.90625, y: 0.96875 },\n { x: 0.96875, y: 0.96875 },\n { x: 0.96875, y: 0.96875 },\n { x: 0.0625, y: 0.0625 },\n { x: 0.0625, y: 0.0625 },\n { x: 0.0625, y: 0.0625 },\n { x: 0.0625, y: 0.0625 },\n { x: 0.0625, y: 0.0625 },\n { x: 0.0625, y: 0.0625 },\n { x: 0.1875, y: 0.0625 },\n { x: 0.1875, y: 0.0625 },\n { x: 0.1875, y: 0.0625 },\n { x: 0.1875, y: 0.0625 },\n { x: 0.1875, y: 0.0625 },\n { x: 0.1875, y: 0.0625 },\n { x: 0.3125, y: 0.0625 },\n { x: 0.3125, y: 0.0625 },\n { x: 0.3125, y: 0.0625 },\n { x: 0.3125, y: 0.0625 },\n { x: 0.3125, y: 0.0625 },\n { x: 0.3125, y: 0.0625 },\n { x: 0.4375, y: 0.0625 },\n { x: 0.4375, y: 0.0625 },\n { x: 0.4375, y: 0.0625 },\n { x: 0.4375, y: 0.0625 },\n { x: 0.4375, y: 0.0625 },\n { x: 0.4375, y: 0.0625 },\n { x: 0.5625, y: 0.0625 },\n { x: 0.5625, y: 0.0625 },\n { x: 0.5625, y: 0.0625 },\n { x: 0.5625, y: 0.0625 },\n { x: 0.5625, y: 0.0625 },\n { x: 0.5625, y: 0.0625 },\n { x: 0.6875, y: 0.0625 },\n { x: 0.6875, y: 0.0625 },\n { x: 0.6875, y: 0.0625 },\n { x: 0.6875, y: 0.0625 },\n { x: 0.6875, y: 0.0625 },\n { x: 0.6875, y: 0.0625 },\n { x: 0.8125, y: 0.0625 },\n { x: 0.8125, y: 0.0625 },\n { x: 0.8125, y: 0.0625 },\n { x: 0.8125, y: 0.0625 },\n { x: 0.8125, y: 0.0625 },\n { x: 0.8125, y: 0.0625 },\n { x: 0.9375, y: 0.0625 },\n { x: 0.9375, y: 0.0625 },\n { x: 0.9375, y: 0.0625 },\n { x: 0.9375, y: 0.0625 },\n { x: 0.9375, y: 0.0625 },\n { x: 0.9375, y: 0.0625 },\n { x: 0.0625, y: 0.1875 },\n { x: 0.0625, y: 0.1875 },\n { x: 0.0625, y: 0.1875 },\n { x: 0.0625, y: 0.1875 },\n { x: 0.0625, y: 0.1875 },\n { x: 0.0625, y: 0.1875 },\n { x: 0.1875, y: 0.1875 },\n { x: 0.1875, y: 0.1875 },\n { x: 0.1875, y: 0.1875 },\n { x: 0.1875, y: 0.1875 },\n { x: 0.1875, y: 0.1875 },\n { x: 0.1875, y: 0.1875 },\n { x: 0.3125, y: 0.1875 },\n { x: 0.3125, y: 0.1875 },\n { x: 0.3125, y: 0.1875 },\n { x: 0.3125, y: 0.1875 },\n { x: 0.3125, y: 0.1875 },\n { x: 0.3125, y: 0.1875 },\n { x: 0.4375, y: 0.1875 },\n { x: 0.4375, y: 0.1875 },\n { x: 0.4375, y: 0.1875 },\n { x: 0.4375, y: 0.1875 },\n { x: 0.4375, y: 0.1875 },\n { x: 0.4375, y: 0.1875 },\n { x: 0.5625, y: 0.1875 },\n { x: 0.5625, y: 0.1875 },\n { x: 0.5625, y: 0.1875 },\n { x: 0.5625, y: 0.1875 },\n { x: 0.5625, y: 0.1875 },\n { x: 0.5625, y: 0.1875 },\n { x: 0.6875, y: 0.1875 },\n { x: 0.6875, y: 0.1875 },\n { x: 0.6875, y: 0.1875 },\n { x: 0.6875, y: 0.1875 },\n { x: 0.6875, y: 0.1875 },\n { x: 0.6875, y: 0.1875 },\n { x: 0.8125, y: 0.1875 },\n { x: 0.8125, y: 0.1875 },\n { x: 0.8125, y: 0.1875 },\n { x: 0.8125, y: 0.1875 },\n { x: 0.8125, y: 0.1875 },\n { x: 0.8125, y: 0.1875 },\n { x: 0.9375, y: 0.1875 },\n { x: 0.9375, y: 0.1875 },\n { x: 0.9375, y: 0.1875 },\n { x: 0.9375, y: 0.1875 },\n { x: 0.9375, y: 0.1875 },\n { x: 0.9375, y: 0.1875 },\n { x: 0.0625, y: 0.3125 },\n { x: 0.0625, y: 0.3125 },\n { x: 0.0625, y: 0.3125 },\n { x: 0.0625, y: 0.3125 },\n { x: 0.0625, y: 0.3125 },\n { x: 0.0625, y: 0.3125 },\n { x: 0.1875, y: 0.3125 },\n { x: 0.1875, y: 0.3125 },\n { x: 0.1875, y: 0.3125 },\n { x: 0.1875, y: 0.3125 },\n { x: 0.1875, y: 0.3125 },\n { x: 0.1875, y: 0.3125 },\n { x: 0.3125, y: 0.3125 },\n { x: 0.3125, y: 0.3125 },\n { x: 0.3125, y: 0.3125 },\n { x: 0.3125, y: 0.3125 },\n { x: 0.3125, y: 0.3125 },\n { x: 0.3125, y: 0.3125 },\n { x: 0.4375, y: 0.3125 },\n { x: 0.4375, y: 0.3125 },\n { x: 0.4375, y: 0.3125 },\n { x: 0.4375, y: 0.3125 },\n { x: 0.4375, y: 0.3125 },\n { x: 0.4375, y: 0.3125 },\n { x: 0.5625, y: 0.3125 },\n { x: 0.5625, y: 0.3125 },\n { x: 0.5625, y: 0.3125 },\n { x: 0.5625, y: 0.3125 },\n { x: 0.5625, y: 0.3125 },\n { x: 0.5625, y: 0.3125 },\n { x: 0.6875, y: 0.3125 },\n { x: 0.6875, y: 0.3125 },\n { x: 0.6875, y: 0.3125 },\n { x: 0.6875, y: 0.3125 },\n { x: 0.6875, y: 0.3125 },\n { x: 0.6875, y: 0.3125 },\n { x: 0.8125, y: 0.3125 },\n { x: 0.8125, y: 0.3125 },\n { x: 0.8125, y: 0.3125 },\n { x: 0.8125, y: 0.3125 },\n { x: 0.8125, y: 0.3125 },\n { x: 0.8125, y: 0.3125 },\n { x: 0.9375, y: 0.3125 },\n { x: 0.9375, y: 0.3125 },\n { x: 0.9375, y: 0.3125 },\n { x: 0.9375, y: 0.3125 },\n { x: 0.9375, y: 0.3125 },\n { x: 0.9375, y: 0.3125 },\n { x: 0.0625, y: 0.4375 },\n { x: 0.0625, y: 0.4375 },\n { x: 0.0625, y: 0.4375 },\n { x: 0.0625, y: 0.4375 },\n { x: 0.0625, y: 0.4375 },\n { x: 0.0625, y: 0.4375 },\n { x: 0.1875, y: 0.4375 },\n { x: 0.1875, y: 0.4375 },\n { x: 0.1875, y: 0.4375 },\n { x: 0.1875, y: 0.4375 },\n { x: 0.1875, y: 0.4375 },\n { x: 0.1875, y: 0.4375 },\n { x: 0.3125, y: 0.4375 },\n { x: 0.3125, y: 0.4375 },\n { x: 0.3125, y: 0.4375 },\n { x: 0.3125, y: 0.4375 },\n { x: 0.3125, y: 0.4375 },\n { x: 0.3125, y: 0.4375 },\n { x: 0.4375, y: 0.4375 },\n { x: 0.4375, y: 0.4375 },\n { x: 0.4375, y: 0.4375 },\n { x: 0.4375, y: 0.4375 },\n { x: 0.4375, y: 0.4375 },\n { x: 0.4375, y: 0.4375 },\n { x: 0.5625, y: 0.4375 },\n { x: 0.5625, y: 0.4375 },\n { x: 0.5625, y: 0.4375 },\n { x: 0.5625, y: 0.4375 },\n { x: 0.5625, y: 0.4375 },\n { x: 0.5625, y: 0.4375 },\n { x: 0.6875, y: 0.4375 },\n { x: 0.6875, y: 0.4375 },\n { x: 0.6875, y: 0.4375 },\n { x: 0.6875, y: 0.4375 },\n { x: 0.6875, y: 0.4375 },\n { x: 0.6875, y: 0.4375 },\n { x: 0.8125, y: 0.4375 },\n { x: 0.8125, y: 0.4375 },\n { x: 0.8125, y: 0.4375 },\n { x: 0.8125, y: 0.4375 },\n { x: 0.8125, y: 0.4375 },\n { x: 0.8125, y: 0.4375 },\n { x: 0.9375, y: 0.4375 },\n { x: 0.9375, y: 0.4375 },\n { x: 0.9375, y: 0.4375 },\n { x: 0.9375, y: 0.4375 },\n { x: 0.9375, y: 0.4375 },\n { x: 0.9375, y: 0.4375 },\n { x: 0.0625, y: 0.5625 },\n { x: 0.0625, y: 0.5625 },\n { x: 0.0625, y: 0.5625 },\n { x: 0.0625, y: 0.5625 },\n { x: 0.0625, y: 0.5625 },\n { x: 0.0625, y: 0.5625 },\n { x: 0.1875, y: 0.5625 },\n { x: 0.1875, y: 0.5625 },\n { x: 0.1875, y: 0.5625 },\n { x: 0.1875, y: 0.5625 },\n { x: 0.1875, y: 0.5625 },\n { x: 0.1875, y: 0.5625 },\n { x: 0.3125, y: 0.5625 },\n { x: 0.3125, y: 0.5625 },\n { x: 0.3125, y: 0.5625 },\n { x: 0.3125, y: 0.5625 },\n { x: 0.3125, y: 0.5625 },\n { x: 0.3125, y: 0.5625 },\n { x: 0.4375, y: 0.5625 },\n { x: 0.4375, y: 0.5625 },\n { x: 0.4375, y: 0.5625 },\n { x: 0.4375, y: 0.5625 },\n { x: 0.4375, y: 0.5625 },\n { x: 0.4375, y: 0.5625 },\n { x: 0.5625, y: 0.5625 },\n { x: 0.5625, y: 0.5625 },\n { x: 0.5625, y: 0.5625 },\n { x: 0.5625, y: 0.5625 },\n { x: 0.5625, y: 0.5625 },\n { x: 0.5625, y: 0.5625 },\n { x: 0.6875, y: 0.5625 },\n { x: 0.6875, y: 0.5625 },\n { x: 0.6875, y: 0.5625 },\n { x: 0.6875, y: 0.5625 },\n { x: 0.6875, y: 0.5625 },\n { x: 0.6875, y: 0.5625 },\n { x: 0.8125, y: 0.5625 },\n { x: 0.8125, y: 0.5625 },\n { x: 0.8125, y: 0.5625 },\n { x: 0.8125, y: 0.5625 },\n { x: 0.8125, y: 0.5625 },\n { x: 0.8125, y: 0.5625 },\n { x: 0.9375, y: 0.5625 },\n { x: 0.9375, y: 0.5625 },\n { x: 0.9375, y: 0.5625 },\n { x: 0.9375, y: 0.5625 },\n { x: 0.9375, y: 0.5625 },\n { x: 0.9375, y: 0.5625 },\n { x: 0.0625, y: 0.6875 },\n { x: 0.0625, y: 0.6875 },\n { x: 0.0625, y: 0.6875 },\n { x: 0.0625, y: 0.6875 },\n { x: 0.0625, y: 0.6875 },\n { x: 0.0625, y: 0.6875 },\n { x: 0.1875, y: 0.6875 },\n { x: 0.1875, y: 0.6875 },\n { x: 0.1875, y: 0.6875 },\n { x: 0.1875, y: 0.6875 },\n { x: 0.1875, y: 0.6875 },\n { x: 0.1875, y: 0.6875 },\n { x: 0.3125, y: 0.6875 },\n { x: 0.3125, y: 0.6875 },\n { x: 0.3125, y: 0.6875 },\n { x: 0.3125, y: 0.6875 },\n { x: 0.3125, y: 0.6875 },\n { x: 0.3125, y: 0.6875 },\n { x: 0.4375, y: 0.6875 },\n { x: 0.4375, y: 0.6875 },\n { x: 0.4375, y: 0.6875 },\n { x: 0.4375, y: 0.6875 },\n { x: 0.4375, y: 0.6875 },\n { x: 0.4375, y: 0.6875 },\n { x: 0.5625, y: 0.6875 },\n { x: 0.5625, y: 0.6875 },\n { x: 0.5625, y: 0.6875 },\n { x: 0.5625, y: 0.6875 },\n { x: 0.5625, y: 0.6875 },\n { x: 0.5625, y: 0.6875 },\n { x: 0.6875, y: 0.6875 },\n { x: 0.6875, y: 0.6875 },\n { x: 0.6875, y: 0.6875 },\n { x: 0.6875, y: 0.6875 },\n { x: 0.6875, y: 0.6875 },\n { x: 0.6875, y: 0.6875 },\n { x: 0.8125, y: 0.6875 },\n { x: 0.8125, y: 0.6875 },\n { x: 0.8125, y: 0.6875 },\n { x: 0.8125, y: 0.6875 },\n { x: 0.8125, y: 0.6875 },\n { x: 0.8125, y: 0.6875 },\n { x: 0.9375, y: 0.6875 },\n { x: 0.9375, y: 0.6875 },\n { x: 0.9375, y: 0.6875 },\n { x: 0.9375, y: 0.6875 },\n { x: 0.9375, y: 0.6875 },\n { x: 0.9375, y: 0.6875 },\n { x: 0.0625, y: 0.8125 },\n { x: 0.0625, y: 0.8125 },\n { x: 0.0625, y: 0.8125 },\n { x: 0.0625, y: 0.8125 },\n { x: 0.0625, y: 0.8125 },\n { x: 0.0625, y: 0.8125 },\n { x: 0.1875, y: 0.8125 },\n { x: 0.1875, y: 0.8125 },\n { x: 0.1875, y: 0.8125 },\n { x: 0.1875, y: 0.8125 },\n { x: 0.1875, y: 0.8125 },\n { x: 0.1875, y: 0.8125 },\n { x: 0.3125, y: 0.8125 },\n { x: 0.3125, y: 0.8125 },\n { x: 0.3125, y: 0.8125 },\n { x: 0.3125, y: 0.8125 },\n { x: 0.3125, y: 0.8125 },\n { x: 0.3125, y: 0.8125 },\n { x: 0.4375, y: 0.8125 },\n { x: 0.4375, y: 0.8125 },\n { x: 0.4375, y: 0.8125 },\n { x: 0.4375, y: 0.8125 },\n { x: 0.4375, y: 0.8125 },\n { x: 0.4375, y: 0.8125 },\n { x: 0.5625, y: 0.8125 },\n { x: 0.5625, y: 0.8125 },\n { x: 0.5625, y: 0.8125 },\n { x: 0.5625, y: 0.8125 },\n { x: 0.5625, y: 0.8125 },\n { x: 0.5625, y: 0.8125 },\n { x: 0.6875, y: 0.8125 },\n { x: 0.6875, y: 0.8125 },\n { x: 0.6875, y: 0.8125 },\n { x: 0.6875, y: 0.8125 },\n { x: 0.6875, y: 0.8125 },\n { x: 0.6875, y: 0.8125 },\n { x: 0.8125, y: 0.8125 },\n { x: 0.8125, y: 0.8125 },\n { x: 0.8125, y: 0.8125 },\n { x: 0.8125, y: 0.8125 },\n { x: 0.8125, y: 0.8125 },\n { x: 0.8125, y: 0.8125 },\n { x: 0.9375, y: 0.8125 },\n { x: 0.9375, y: 0.8125 },\n { x: 0.9375, y: 0.8125 },\n { x: 0.9375, y: 0.8125 },\n { x: 0.9375, y: 0.8125 },\n { x: 0.9375, y: 0.8125 },\n { x: 0.0625, y: 0.9375 },\n { x: 0.0625, y: 0.9375 },\n { x: 0.0625, y: 0.9375 },\n { x: 0.0625, y: 0.9375 },\n { x: 0.0625, y: 0.9375 },\n { x: 0.0625, y: 0.9375 },\n { x: 0.1875, y: 0.9375 },\n { x: 0.1875, y: 0.9375 },\n { x: 0.1875, y: 0.9375 },\n { x: 0.1875, y: 0.9375 },\n { x: 0.1875, y: 0.9375 },\n { x: 0.1875, y: 0.9375 },\n { x: 0.3125, y: 0.9375 },\n { x: 0.3125, y: 0.9375 },\n { x: 0.3125, y: 0.9375 },\n { x: 0.3125, y: 0.9375 },\n { x: 0.3125, y: 0.9375 },\n { x: 0.3125, y: 0.9375 },\n { x: 0.4375, y: 0.9375 },\n { x: 0.4375, y: 0.9375 },\n { x: 0.4375, y: 0.9375 },\n { x: 0.4375, y: 0.9375 },\n { x: 0.4375, y: 0.9375 },\n { x: 0.4375, y: 0.9375 },\n { x: 0.5625, y: 0.9375 },\n { x: 0.5625, y: 0.9375 },\n { x: 0.5625, y: 0.9375 },\n { x: 0.5625, y: 0.9375 },\n { x: 0.5625, y: 0.9375 },\n { x: 0.5625, y: 0.9375 },\n { x: 0.6875, y: 0.9375 },\n { x: 0.6875, y: 0.9375 },\n { x: 0.6875, y: 0.9375 },\n { x: 0.6875, y: 0.9375 },\n { x: 0.6875, y: 0.9375 },\n { x: 0.6875, y: 0.9375 },\n { x: 0.8125, y: 0.9375 },\n { x: 0.8125, y: 0.9375 },\n { x: 0.8125, y: 0.9375 },\n { x: 0.8125, y: 0.9375 },\n { x: 0.8125, y: 0.9375 },\n { x: 0.8125, y: 0.9375 },\n { x: 0.9375, y: 0.9375 },\n { x: 0.9375, y: 0.9375 },\n { x: 0.9375, y: 0.9375 },\n { x: 0.9375, y: 0.9375 },\n { x: 0.9375, y: 0.9375 },\n { x: 0.9375, y: 0.9375 },\n];\n", "/**\n * HandPose model implementation\n * See `handpose.ts` for entry point\n */\n\nimport * as tf from '../../dist/tfjs.esm.js';\nimport * as util from './handposeutil';\nimport * as anchors from './handposeanchors';\nimport { constants } from '../tfjs/constants';\nimport type { Tensor, GraphModel } from '../tfjs/types';\nimport type { Point } from '../result';\nimport type { Config } from '../config';\n\nexport class HandDetector {\n model: GraphModel;\n anchors: number[][];\n anchorsTensor: Tensor;\n inputSize: number;\n inputSizeTensor: Tensor;\n doubleInputSizeTensor: Tensor;\n\n constructor(model: GraphModel) {\n this.model = model;\n this.anchors = anchors.anchors.map((anchor) => [anchor.x, anchor.y]);\n this.anchorsTensor = tf.tensor2d(this.anchors);\n this.inputSize = this?.model?.inputs?.[0]?.shape?.[2] || 0;\n this.inputSizeTensor = tf.tensor1d([this.inputSize, this.inputSize]);\n this.doubleInputSizeTensor = tf.tensor1d([this.inputSize * 2, this.inputSize * 2]);\n }\n\n normalizeBoxes(boxes) {\n const t: Record = {};\n t.boxOffsets = tf.slice(boxes, [0, 0], [-1, 2]);\n t.boxSizes = tf.slice(boxes, [0, 2], [-1, 2]);\n t.div = tf.div(t.boxOffsets, this.inputSizeTensor);\n t.boxCenterPoints = tf.add(t.div, this.anchorsTensor);\n t.halfBoxSizes = tf.div(t.boxSizes, this.doubleInputSizeTensor);\n t.sub = tf.sub(t.boxCenterPoints, t.halfBoxSizes);\n t.startPoints = tf.mul(t.sub, this.inputSizeTensor);\n t.add = tf.add(t.boxCenterPoints, t.halfBoxSizes);\n t.endPoints = tf.mul(t.add, this.inputSizeTensor);\n const res = tf.concat2d([t.startPoints, t.endPoints], 1);\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n return res as Tensor;\n }\n\n normalizeLandmarks(rawPalmLandmarks, index: number) {\n const t: Record = {};\n t.reshape = tf.reshape(rawPalmLandmarks, [-1, 7, 2]);\n t.div = tf.div(t.reshape, this.inputSizeTensor);\n t.landmarks = tf.add(t.div, this.anchors[index] ? this.anchors[index] : 0);\n const res = tf.mul(t.landmarks, this.inputSizeTensor);\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n return res as Tensor;\n }\n\n async predict(input: Tensor, config: Config): Promise<{ startPoint: Point; endPoint: Point, palmLandmarks: Point[]; confidence: number }[]> {\n const t: Record = {};\n t.resize = tf.image.resizeBilinear(input, [this.inputSize, this.inputSize]);\n t.div = tf.div(t.resize, constants.tf127);\n t.image = tf.sub(t.div, constants.tf1);\n t.batched = this.model.execute(t.image) as Tensor;\n t.predictions = tf.squeeze(t.batched);\n t.slice = tf.slice(t.predictions, [0, 0], [-1, 1]);\n t.sigmoid = tf.sigmoid(t.slice);\n t.scores = tf.squeeze(t.sigmoid);\n const scores = await t.scores.data();\n t.boxes = tf.slice(t.predictions, [0, 1], [-1, 4]);\n t.norm = this.normalizeBoxes(t.boxes);\n // box detection is flaky so we look for 3x boxes than we need results\n t.nms = await tf.image.nonMaxSuppressionAsync(t.norm, t.scores, 3 * (config.hand?.maxDetected || 1), config.hand.iouThreshold, config.hand.minConfidence);\n const nms = await t.nms.array() as number[];\n const hands: { startPoint: Point; endPoint: Point; palmLandmarks: Point[]; confidence: number }[] = [];\n for (const index of nms) {\n const p: Record = {};\n p.box = tf.slice(t.norm, [index, 0], [1, -1]);\n p.slice = tf.slice(t.predictions, [index, 5], [1, 14]);\n p.norm = this.normalizeLandmarks(p.slice, index);\n p.palmLandmarks = tf.reshape(p.norm, [-1, 2]);\n const box = await p.box.data();\n const startPoint = box.slice(0, 2) as unknown as Point;\n const endPoint = box.slice(2, 4) as unknown as Point;\n const palmLandmarks = await p.palmLandmarks.array();\n const hand = { startPoint, endPoint, palmLandmarks, confidence: scores[index] };\n const scaled = util.scaleBoxCoordinates(hand, [(input.shape[2] || 1) / this.inputSize, (input.shape[1] || 0) / this.inputSize]);\n hands.push(scaled);\n Object.keys(p).forEach((tensor) => tf.dispose(p[tensor]));\n }\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n return hands;\n }\n}\n", "/**\n * HandPose model implementation\n * See `handpose.ts` for entry point\n */\n\nimport * as tf from '../../dist/tfjs.esm.js';\nimport * as util from './handposeutil';\nimport type * as detector from './handposedetector';\nimport { constants } from '../tfjs/constants';\nimport type { Tensor, GraphModel } from '../tfjs/types';\nimport { env } from '../util/env';\nimport { now } from '../util/util';\nimport type { Point } from '../result';\n\nconst palmBoxEnlargeFactor = 5; // default 3\nconst handBoxEnlargeFactor = 1.65; // default 1.65\nconst palmLandmarkIds = [0, 5, 9, 13, 17, 1, 2];\nconst palmLandmarksPalmBase = 0;\nconst palmLandmarksMiddleFingerBase = 2;\nlet lastTime = 0;\n\nexport class HandPipeline {\n handDetector: detector.HandDetector;\n handPoseModel: GraphModel;\n inputSize: number;\n storedBoxes: ({ startPoint: Point; endPoint: Point; palmLandmarks: Point[]; confidence: number } | null)[];\n skipped: number;\n detectedHands: number;\n\n constructor(handDetector, handPoseModel) {\n this.handDetector = handDetector;\n this.handPoseModel = handPoseModel;\n this.inputSize = this.handPoseModel?.inputs?.[0].shape?.[2] || 0;\n this.storedBoxes = [];\n this.skipped = Number.MAX_SAFE_INTEGER;\n this.detectedHands = 0;\n }\n\n calculateLandmarksBoundingBox(landmarks) { // eslint-disable-line class-methods-use-this\n const xs = landmarks.map((d) => d[0]);\n const ys = landmarks.map((d) => d[1]);\n const startPoint = [Math.min(...xs), Math.min(...ys)];\n const endPoint = [Math.max(...xs), Math.max(...ys)];\n return { startPoint, endPoint };\n }\n\n getBoxForPalmLandmarks(palmLandmarks, rotationMatrix) {\n const rotatedPalmLandmarks = palmLandmarks.map((coord) => util.rotatePoint([...coord, 1], rotationMatrix));\n const boxAroundPalm = this.calculateLandmarksBoundingBox(rotatedPalmLandmarks);\n return util.enlargeBox(util.squarifyBox(boxAroundPalm), palmBoxEnlargeFactor);\n }\n\n getBoxForHandLandmarks(landmarks) {\n const boundingBox = this.calculateLandmarksBoundingBox(landmarks);\n const boxAroundHand = util.enlargeBox(util.squarifyBox(boundingBox), handBoxEnlargeFactor);\n boxAroundHand.palmLandmarks = [];\n for (let i = 0; i < palmLandmarkIds.length; i++) {\n boxAroundHand.palmLandmarks.push(landmarks[palmLandmarkIds[i]].slice(0, 2));\n }\n return boxAroundHand;\n }\n\n transformRawCoords(rawCoords, box2, angle, rotationMatrix) {\n const boxSize = util.getBoxSize(box2);\n const scaleFactor = [boxSize[0] / this.inputSize, boxSize[1] / this.inputSize, (boxSize[0] + boxSize[1]) / this.inputSize / 2];\n const coordsScaled = rawCoords.map((coord) => [\n scaleFactor[0] * (coord[0] - this.inputSize / 2),\n scaleFactor[1] * (coord[1] - this.inputSize / 2),\n scaleFactor[2] * coord[2],\n ]);\n const coordsRotationMatrix = util.buildRotationMatrix(angle, [0, 0]);\n const coordsRotated = coordsScaled.map((coord) => {\n const rotated = util.rotatePoint(coord, coordsRotationMatrix);\n return [...rotated, coord[2]];\n });\n const inverseRotationMatrix = util.invertTransformMatrix(rotationMatrix);\n const boxCenter = [...util.getBoxCenter(box2), 1];\n const originalBoxCenter = [\n util.dot(boxCenter, inverseRotationMatrix[0]),\n util.dot(boxCenter, inverseRotationMatrix[1]),\n ];\n return coordsRotated.map((coord) => [\n Math.trunc(coord[0] + originalBoxCenter[0]),\n Math.trunc(coord[1] + originalBoxCenter[1]),\n Math.trunc(coord[2]),\n ]);\n }\n\n async estimateHands(image, config) {\n let useFreshBox = false;\n\n // run new detector every skipFrames\n let boxes;\n const skipTime = (config.hand.skipTime || 0) > (now() - lastTime);\n const skipFrame = this.skipped < (config.hand.skipFrames || 0);\n if (config.skipAllowed && skipTime && skipFrame) {\n boxes = await this.handDetector.predict(image, config);\n this.skipped = 0;\n }\n if (config.skipAllowed) this.skipped++;\n\n // if detector result count doesn't match current working set, use it to reset current working set\n if (boxes && (boxes.length > 0) && ((boxes.length !== this.detectedHands) && (this.detectedHands !== config.hand.maxDetected) || !config.hand.landmarks)) {\n this.detectedHands = 0;\n this.storedBoxes = [...boxes];\n // for (const possible of boxes) this.storedBoxes.push(possible);\n if (this.storedBoxes.length > 0) useFreshBox = true;\n }\n const hands: { landmarks: Point[], confidence: number, boxConfidence: number, fingerConfidence: number, box: { topLeft: Point, bottomRight: Point } }[] = [];\n\n // go through working set of boxes\n for (let i = 0; i < this.storedBoxes.length; i++) {\n const currentBox = this.storedBoxes[i];\n if (!currentBox) continue;\n if (config.hand.landmarks) {\n const angle = config.hand.rotation ? util.computeRotation(currentBox.palmLandmarks[palmLandmarksPalmBase], currentBox.palmLandmarks[palmLandmarksMiddleFingerBase]) : 0;\n const palmCenter = util.getBoxCenter(currentBox);\n const palmCenterNormalized = [palmCenter[0] / image.shape[2], palmCenter[1] / image.shape[1]];\n const rotatedImage = config.hand.rotation && env.kernels.includes('rotatewithoffset') ? tf.image.rotateWithOffset(image, angle, 0, palmCenterNormalized) : image.clone();\n const rotationMatrix = util.buildRotationMatrix(-angle, palmCenter);\n const newBox = useFreshBox ? this.getBoxForPalmLandmarks(currentBox.palmLandmarks, rotationMatrix) : currentBox;\n const croppedInput = util.cutBoxFromImageAndResize(newBox, rotatedImage, [this.inputSize, this.inputSize]);\n const handImage = tf.div(croppedInput, constants.tf255);\n tf.dispose(croppedInput);\n tf.dispose(rotatedImage);\n const [confidenceT, keypoints] = this.handPoseModel.execute(handImage) as Tensor[];\n lastTime = now();\n tf.dispose(handImage);\n const confidence = (await confidenceT.data())[0];\n tf.dispose(confidenceT);\n if (confidence >= config.hand.minConfidence / 4) {\n const keypointsReshaped = tf.reshape(keypoints, [-1, 3]);\n const rawCoords = await keypointsReshaped.array();\n tf.dispose(keypoints);\n tf.dispose(keypointsReshaped);\n const coords = this.transformRawCoords(rawCoords, newBox, angle, rotationMatrix);\n const nextBoundingBox = this.getBoxForHandLandmarks(coords);\n this.storedBoxes[i] = { ...nextBoundingBox, confidence };\n const result = {\n landmarks: coords,\n confidence,\n boxConfidence: currentBox.confidence,\n fingerConfidence: confidence,\n box: { topLeft: nextBoundingBox.startPoint, bottomRight: nextBoundingBox.endPoint },\n };\n hands.push(result);\n } else {\n this.storedBoxes[i] = null;\n }\n tf.dispose(keypoints);\n } else {\n // const enlarged = box.enlargeBox(box.squarifyBox(box.shiftBox(currentBox, HAND_BOX_SHIFT_VECTOR)), handBoxEnlargeFactor);\n const enlarged = util.enlargeBox(util.squarifyBox(currentBox), handBoxEnlargeFactor);\n const result = {\n confidence: currentBox.confidence,\n boxConfidence: currentBox.confidence,\n fingerConfidence: 0,\n box: { topLeft: enlarged.startPoint, bottomRight: enlarged.endPoint },\n landmarks: [],\n };\n hands.push(result);\n }\n }\n this.storedBoxes = this.storedBoxes.filter((a) => a !== null);\n this.detectedHands = hands.length;\n if (hands.length > config.hand.maxDetected) hands.length = config.hand.maxDetected;\n return hands;\n }\n}\n", "/**\n * FingerPose algorithm implementation\n * See `fingerpose.ts` for entry point\n */\n\nexport const Finger = {\n thumb: 0,\n index: 1,\n middle: 2,\n ring: 3,\n pinky: 4,\n all: [0, 1, 2, 3, 4], // just for convenience\n nameMapping: { 0: 'thumb', 1: 'index', 2: 'middle', 3: 'ring', 4: 'pinky' },\n // Describes mapping of joints based on the 21 points returned by handpose.\n // [0] Palm\n // [1-4] Thumb\n // [5-8] Index\n // [9-12] Middle\n // [13-16] Ring\n // [17-20] Pinky\n pointsMapping: {\n 0: [[0, 1], [1, 2], [2, 3], [3, 4]],\n 1: [[0, 5], [5, 6], [6, 7], [7, 8]],\n 2: [[0, 9], [9, 10], [10, 11], [11, 12]],\n 3: [[0, 13], [13, 14], [14, 15], [15, 16]],\n 4: [[0, 17], [17, 18], [18, 19], [19, 20]],\n },\n getName: (value) => Finger.nameMapping[value],\n getPoints: (value) => Finger.pointsMapping[value],\n};\n\nexport const FingerCurl = {\n none: 0,\n half: 1,\n full: 2,\n nameMapping: { 0: 'none', 1: 'half', 2: 'full' },\n getName: (value) => FingerCurl.nameMapping[value],\n};\n\nexport const FingerDirection = {\n verticalUp: 0,\n verticalDown: 1,\n horizontalLeft: 2,\n horizontalRight: 3,\n diagonalUpRight: 4,\n diagonalUpLeft: 5,\n diagonalDownRight: 6,\n diagonalDownLeft: 7,\n nameMapping: { 0: 'verticalUp', 1: 'verticalDown', 2: 'horizontalLeft', 3: 'horizontalRight', 4: 'diagonalUpRight', 5: 'diagonalUpLeft', 6: 'diagonalDownRight', 7: 'diagonalDownLeft' },\n getName: (value) => FingerDirection.nameMapping[value],\n};\n\nexport class FingerGesture {\n name;\n curls;\n directions;\n weights;\n weightsRelative;\n\n constructor(name) {\n // name (should be unique)\n this.name = name;\n this.curls = {};\n this.directions = {};\n this.weights = [1.0, 1.0, 1.0, 1.0, 1.0];\n this.weightsRelative = [1.0, 1.0, 1.0, 1.0, 1.0];\n }\n\n curl(finger, curl, confidence) {\n if (typeof this.curls[finger] === 'undefined') this.curls[finger] = [];\n this.curls[finger].push([curl, confidence]);\n }\n\n direction(finger, position, confidence) {\n if (!this.directions[finger]) this.directions[finger] = [];\n this.directions[finger].push([position, confidence]);\n }\n\n weight(finger, weight) {\n this.weights[finger] = weight;\n // recalculate relative weights\n const total = this.weights.reduce((a, b) => a + b, 0);\n this.weightsRelative = this.weights.map((el) => el * 5 / total);\n }\n\n matchAgainst(detectedCurls, detectedDirections) {\n let confidence = 0.0;\n // look at the detected curl of each finger and compare with\n // the expected curl of this finger inside current gesture\n for (const fingerIdx in detectedCurls) {\n const detectedCurl = detectedCurls[fingerIdx];\n const expectedCurls = this.curls[fingerIdx];\n if (typeof expectedCurls === 'undefined') {\n // no curl description available for this finger\n // add default confidence of \"1\"\n confidence += this.weightsRelative[fingerIdx];\n continue;\n }\n // compare to each possible curl of this specific finger\n for (const [expectedCurl, score] of expectedCurls) {\n if (detectedCurl === expectedCurl) {\n confidence += score * this.weightsRelative[fingerIdx];\n break;\n }\n }\n }\n // same for detected direction of each finger\n for (const fingerIdx in detectedDirections) {\n const detectedDirection = detectedDirections[fingerIdx];\n const expectedDirections = this.directions[fingerIdx];\n if (typeof expectedDirections === 'undefined') {\n // no direction description available for this finger\n // add default confidence of \"1\"\n confidence += this.weightsRelative[fingerIdx];\n continue;\n }\n // compare to each possible direction of this specific finger\n for (const [expectedDirection, score] of expectedDirections) {\n if (detectedDirection === expectedDirection) {\n confidence += score * this.weightsRelative[fingerIdx];\n break;\n }\n }\n }\n return confidence / 10;\n }\n}\n", "/**\n * FingerPose algorithm implementation\n * See `fingerpose.ts` for entry point\n */\n\nimport { Finger, FingerCurl, FingerDirection, FingerGesture } from './fingerdef';\n\nexport const { thumb, index, middle, ring, pinky } = Finger;\nexport const { none, half, full } = FingerCurl;\nexport const { verticalUp, verticalDown, horizontalLeft, horizontalRight, diagonalUpRight, diagonalUpLeft, diagonalDownRight, diagonalDownLeft } = FingerDirection;\n\n// describe thumbs up gesture \uD83D\uDC4D\nconst ThumbsUp = new FingerGesture('thumbs up');\nThumbsUp.curl(thumb, none, 1.0);\nThumbsUp.direction(thumb, verticalUp, 1.0);\nThumbsUp.direction(thumb, diagonalUpLeft, 0.25);\nThumbsUp.direction(thumb, diagonalUpRight, 0.25);\nfor (const finger of [Finger.index, Finger.middle, Finger.ring, Finger.pinky]) {\n ThumbsUp.curl(finger, full, 1.0);\n ThumbsUp.direction(finger, horizontalLeft, 1.0);\n ThumbsUp.direction(finger, horizontalRight, 1.0);\n}\n\n// describe Victory gesture \u270C\uFE0F\nconst Victory = new FingerGesture('victory');\nVictory.curl(thumb, half, 0.5);\nVictory.curl(thumb, none, 0.5);\nVictory.direction(thumb, verticalUp, 1.0);\nVictory.direction(thumb, diagonalUpLeft, 1.0);\nVictory.curl(index, none, 1.0);\nVictory.direction(index, verticalUp, 0.75);\nVictory.direction(index, diagonalUpLeft, 1.0);\nVictory.curl(middle, none, 1.0);\nVictory.direction(middle, verticalUp, 1.0);\nVictory.direction(middle, diagonalUpLeft, 0.75);\nVictory.curl(ring, full, 1.0);\nVictory.direction(ring, verticalUp, 0.2);\nVictory.direction(ring, diagonalUpLeft, 1.0);\nVictory.direction(ring, horizontalLeft, 0.2);\nVictory.curl(pinky, full, 1.0);\nVictory.direction(pinky, verticalUp, 0.2);\nVictory.direction(pinky, diagonalUpLeft, 1.0);\nVictory.direction(pinky, horizontalLeft, 0.2);\nVictory.weight(index, 2);\nVictory.weight(middle, 2);\n\n// describe Point gesture \u270C\uFE0F\nconst Point = new FingerGesture('point');\nPoint.curl(thumb, full, 1.0);\nPoint.curl(index, none, 0.5);\nPoint.curl(middle, full, 0.5);\nPoint.curl(ring, full, 0.5);\nPoint.curl(pinky, full, 0.5);\nPoint.weight(index, 2);\nPoint.weight(middle, 2);\n\n// describe Point gesture \u270C\uFE0F\nconst MiddleFinger = new FingerGesture('middle finger');\nMiddleFinger.curl(thumb, none, 1.0);\nMiddleFinger.curl(index, full, 0.5);\nMiddleFinger.curl(middle, full, 0.5);\nMiddleFinger.curl(ring, full, 0.5);\nMiddleFinger.curl(pinky, full, 0.5);\nMiddleFinger.weight(index, 2);\nMiddleFinger.weight(middle, 2);\n\n// describe Open Palm gesture \u270C\uFE0F\nconst OpenPalm = new FingerGesture('open palm');\nOpenPalm.curl(thumb, none, 0.75);\nOpenPalm.curl(index, none, 0.75);\nOpenPalm.curl(middle, none, 0.75);\nOpenPalm.curl(ring, none, 0.75);\nOpenPalm.curl(pinky, none, 0.75);\n\nexport default [ThumbsUp, Victory, Point, MiddleFinger, OpenPalm];\n", "/**\n * FingerPose algorithm implementation constants\n *\n * Based on: [**FingerPose***](https://github.com/andypotato/fingerpose)\n */\n\n/* eslint-disable camelcase */\n\nimport { Finger, FingerCurl, FingerDirection } from './fingerdef';\nimport Gestures from '../hand/fingergesture';\n\nconst minConfidence = 0.7;\nconst options = {\n // curl estimation\n HALF_CURL_START_LIMIT: 60.0,\n NO_CURL_START_LIMIT: 130.0,\n // direction estimation\n DISTANCE_VOTE_POWER: 1.1,\n SINGLE_ANGLE_VOTE_POWER: 0.9,\n TOTAL_ANGLE_VOTE_POWER: 1.6,\n};\n\nfunction calculateSlope(point1x, point1y, point2x, point2y) {\n const value = (point1y - point2y) / (point1x - point2x);\n let slope = Math.atan(value) * 180 / Math.PI;\n if (slope <= 0) slope = -slope;\n else if (slope > 0) slope = 180 - slope;\n return slope;\n}\n\n// point1, point2 are 2d or 3d point arrays (xy[z])\n// returns either a single scalar (2d) or array of two slopes (3d)\nfunction getSlopes(point1, point2) {\n if (!point1 || !point2) return [0, 0];\n const slopeXY = calculateSlope(point1[0], point1[1], point2[0], point2[1]);\n if (point1.length === 2) return slopeXY;\n const slopeYZ = calculateSlope(point1[1], point1[2], point2[1], point2[2]);\n return [slopeXY, slopeYZ];\n}\n\nfunction angleOrientationAt(angle, weightageAt = 1.0) {\n let isVertical = 0;\n let isDiagonal = 0;\n let isHorizontal = 0;\n if (angle >= 75.0 && angle <= 105.0) isVertical = 1 * weightageAt;\n else if (angle >= 25.0 && angle <= 155.0) isDiagonal = 1 * weightageAt;\n else isHorizontal = 1 * weightageAt;\n return [isVertical, isDiagonal, isHorizontal];\n}\n\nfunction estimateFingerCurl(startPoint, midPoint, endPoint) {\n const start_mid_x_dist = startPoint[0] - midPoint[0];\n const start_end_x_dist = startPoint[0] - endPoint[0];\n const mid_end_x_dist = midPoint[0] - endPoint[0];\n const start_mid_y_dist = startPoint[1] - midPoint[1];\n const start_end_y_dist = startPoint[1] - endPoint[1];\n const mid_end_y_dist = midPoint[1] - endPoint[1];\n const start_mid_z_dist = startPoint[2] - midPoint[2];\n const start_end_z_dist = startPoint[2] - endPoint[2];\n const mid_end_z_dist = midPoint[2] - endPoint[2];\n const start_mid_dist = Math.sqrt(start_mid_x_dist * start_mid_x_dist + start_mid_y_dist * start_mid_y_dist + start_mid_z_dist * start_mid_z_dist);\n const start_end_dist = Math.sqrt(start_end_x_dist * start_end_x_dist + start_end_y_dist * start_end_y_dist + start_end_z_dist * start_end_z_dist);\n const mid_end_dist = Math.sqrt(mid_end_x_dist * mid_end_x_dist + mid_end_y_dist * mid_end_y_dist + mid_end_z_dist * mid_end_z_dist);\n let cos_in = (mid_end_dist * mid_end_dist + start_mid_dist * start_mid_dist - start_end_dist * start_end_dist) / (2 * mid_end_dist * start_mid_dist);\n if (cos_in > 1.0) cos_in = 1.0;\n else if (cos_in < -1.0) cos_in = -1.0;\n let angleOfCurve = Math.acos(cos_in);\n angleOfCurve = (57.2958 * angleOfCurve) % 180;\n let fingerCurl;\n if (angleOfCurve > options.NO_CURL_START_LIMIT) fingerCurl = FingerCurl.none;\n else if (angleOfCurve > options.HALF_CURL_START_LIMIT) fingerCurl = FingerCurl.half;\n else fingerCurl = FingerCurl.full;\n return fingerCurl;\n}\n\nfunction estimateHorizontalDirection(start_end_x_dist, start_mid_x_dist, mid_end_x_dist, max_dist_x) {\n let estimatedDirection;\n if (max_dist_x === Math.abs(start_end_x_dist)) {\n if (start_end_x_dist > 0) estimatedDirection = FingerDirection.horizontalLeft;\n else estimatedDirection = FingerDirection.horizontalRight;\n } else if (max_dist_x === Math.abs(start_mid_x_dist)) {\n if (start_mid_x_dist > 0) estimatedDirection = FingerDirection.horizontalLeft;\n else estimatedDirection = FingerDirection.horizontalRight;\n } else {\n if (mid_end_x_dist > 0) estimatedDirection = FingerDirection.horizontalLeft;\n else estimatedDirection = FingerDirection.horizontalRight;\n }\n return estimatedDirection;\n}\n\nfunction estimateVerticalDirection(start_end_y_dist, start_mid_y_dist, mid_end_y_dist, max_dist_y) {\n let estimatedDirection;\n if (max_dist_y === Math.abs(start_end_y_dist)) {\n if (start_end_y_dist < 0) estimatedDirection = FingerDirection.verticalDown;\n else estimatedDirection = FingerDirection.verticalUp;\n } else if (max_dist_y === Math.abs(start_mid_y_dist)) {\n if (start_mid_y_dist < 0) estimatedDirection = FingerDirection.verticalDown;\n else estimatedDirection = FingerDirection.verticalUp;\n } else {\n if (mid_end_y_dist < 0) estimatedDirection = FingerDirection.verticalDown;\n else estimatedDirection = FingerDirection.verticalUp;\n }\n return estimatedDirection;\n}\n\nfunction estimateDiagonalDirection(start_end_y_dist, start_mid_y_dist, mid_end_y_dist, max_dist_y, start_end_x_dist, start_mid_x_dist, mid_end_x_dist, max_dist_x) {\n let estimatedDirection;\n const reqd_vertical_direction = estimateVerticalDirection(start_end_y_dist, start_mid_y_dist, mid_end_y_dist, max_dist_y);\n const reqd_horizontal_direction = estimateHorizontalDirection(start_end_x_dist, start_mid_x_dist, mid_end_x_dist, max_dist_x);\n if (reqd_vertical_direction === FingerDirection.verticalUp) {\n if (reqd_horizontal_direction === FingerDirection.horizontalLeft) estimatedDirection = FingerDirection.diagonalUpLeft;\n else estimatedDirection = FingerDirection.diagonalUpRight;\n } else {\n if (reqd_horizontal_direction === FingerDirection.horizontalLeft) estimatedDirection = FingerDirection.diagonalDownLeft;\n else estimatedDirection = FingerDirection.diagonalDownRight;\n }\n return estimatedDirection;\n}\n\nfunction calculateFingerDirection(startPoint, midPoint, endPoint, fingerSlopes) {\n const start_mid_x_dist = startPoint[0] - midPoint[0];\n const start_end_x_dist = startPoint[0] - endPoint[0];\n const mid_end_x_dist = midPoint[0] - endPoint[0];\n const start_mid_y_dist = startPoint[1] - midPoint[1];\n const start_end_y_dist = startPoint[1] - endPoint[1];\n const mid_end_y_dist = midPoint[1] - endPoint[1];\n const max_dist_x = Math.max(Math.abs(start_mid_x_dist), Math.abs(start_end_x_dist), Math.abs(mid_end_x_dist));\n const max_dist_y = Math.max(Math.abs(start_mid_y_dist), Math.abs(start_end_y_dist), Math.abs(mid_end_y_dist));\n let voteVertical = 0.0;\n let voteDiagonal = 0.0;\n let voteHorizontal = 0.0;\n const start_end_x_y_dist_ratio = max_dist_y / (max_dist_x + 0.00001);\n if (start_end_x_y_dist_ratio > 1.5) voteVertical += options.DISTANCE_VOTE_POWER;\n else if (start_end_x_y_dist_ratio > 0.66) voteDiagonal += options.DISTANCE_VOTE_POWER;\n else voteHorizontal += options.DISTANCE_VOTE_POWER;\n const start_mid_dist = Math.sqrt(start_mid_x_dist * start_mid_x_dist + start_mid_y_dist * start_mid_y_dist);\n const start_end_dist = Math.sqrt(start_end_x_dist * start_end_x_dist + start_end_y_dist * start_end_y_dist);\n const mid_end_dist = Math.sqrt(mid_end_x_dist * mid_end_x_dist + mid_end_y_dist * mid_end_y_dist);\n const max_dist = Math.max(start_mid_dist, start_end_dist, mid_end_dist);\n let calc_start_point_x = startPoint[0];\n let calc_start_point_y = startPoint[1];\n let calc_end_point_x = endPoint[0];\n let calc_end_point_y = endPoint[1];\n if (max_dist === start_mid_dist) {\n calc_end_point_x = endPoint[0];\n calc_end_point_y = endPoint[1];\n } else if (max_dist === mid_end_dist) {\n calc_start_point_x = midPoint[0];\n calc_start_point_y = midPoint[1];\n }\n const calcStartPoint = [calc_start_point_x, calc_start_point_y];\n const calcEndPoint = [calc_end_point_x, calc_end_point_y];\n const totalAngle = getSlopes(calcStartPoint, calcEndPoint);\n const votes = angleOrientationAt(totalAngle, options.TOTAL_ANGLE_VOTE_POWER);\n voteVertical += votes[0];\n voteDiagonal += votes[1];\n voteHorizontal += votes[2];\n for (const fingerSlope of fingerSlopes) {\n const fingerVotes = angleOrientationAt(fingerSlope, options.SINGLE_ANGLE_VOTE_POWER);\n voteVertical += fingerVotes[0];\n voteDiagonal += fingerVotes[1];\n voteHorizontal += fingerVotes[2];\n }\n // in case of tie, highest preference goes to Vertical,\n // followed by horizontal and then diagonal\n let estimatedDirection;\n if (voteVertical === Math.max(voteVertical, voteDiagonal, voteHorizontal)) {\n estimatedDirection = estimateVerticalDirection(start_end_y_dist, start_mid_y_dist, mid_end_y_dist, max_dist_y);\n } else if (voteHorizontal === Math.max(voteDiagonal, voteHorizontal)) {\n estimatedDirection = estimateHorizontalDirection(start_end_x_dist, start_mid_x_dist, mid_end_x_dist, max_dist_x);\n } else {\n estimatedDirection = estimateDiagonalDirection(start_end_y_dist, start_mid_y_dist, mid_end_y_dist, max_dist_y, start_end_x_dist, start_mid_x_dist, mid_end_x_dist, max_dist_x);\n }\n return estimatedDirection;\n}\n\nfunction estimate(landmarks) {\n // step 1: calculate slopes\n const slopesXY: number[][] = [];\n const slopesYZ: number[][] = [];\n const fingerCurls: number[] = [];\n const fingerDirections: number[] = [];\n if (!landmarks) return { curls: fingerCurls, directions: fingerDirections };\n\n // step 1: calculate slopes\n for (const finger of Finger.all) {\n const points = Finger.getPoints(finger);\n const slopeAtXY: number[] = [];\n const slopeAtYZ: number[] = [];\n for (const point of points) {\n const point1 = landmarks[point[0]];\n const point2 = landmarks[point[1]];\n // calculate single slope\n const slopes = getSlopes(point1, point2);\n const slopeXY = slopes[0];\n const slopeYZ = slopes[1];\n slopeAtXY.push(slopeXY);\n slopeAtYZ.push(slopeYZ);\n }\n slopesXY.push(slopeAtXY);\n slopesYZ.push(slopeAtYZ);\n }\n\n // step 2: calculate orientations\n for (const finger of Finger.all) {\n // start finger predictions from palm - except for thumb\n const pointIndexAt = (finger === Finger.thumb) ? 1 : 0;\n const fingerPointsAt = Finger.getPoints(finger);\n const startPoint = landmarks[fingerPointsAt[pointIndexAt][0]];\n const midPoint = landmarks[fingerPointsAt[pointIndexAt + 1][1]];\n const endPoint = landmarks[fingerPointsAt[3][1]];\n // check if finger is curled\n const fingerCurled = estimateFingerCurl(startPoint, midPoint, endPoint);\n const fingerPosition = calculateFingerDirection(startPoint, midPoint, endPoint, slopesXY[finger].slice(pointIndexAt));\n fingerCurls[finger] = fingerCurled;\n fingerDirections[finger] = fingerPosition;\n }\n return { curls: fingerCurls, directions: fingerDirections };\n}\n\nexport function analyze(keypoints) { // get estimations of curl / direction for each finger\n if (!keypoints || keypoints.length === 0) return null;\n const estimatorRes = estimate(keypoints);\n const landmarks = {};\n for (const fingerIdx of Finger.all) {\n landmarks[Finger.getName(fingerIdx)] = {\n curl: FingerCurl.getName(estimatorRes.curls[fingerIdx]),\n direction: FingerDirection.getName(estimatorRes.directions[fingerIdx]),\n };\n }\n return landmarks;\n}\n\nexport function match(keypoints) { // compare gesture description to each known gesture\n const poses: { name: string, confidence: number }[] = [];\n if (!keypoints || keypoints.length === 0) return poses;\n const estimatorRes = estimate(keypoints);\n for (const gesture of Gestures) {\n const confidence = gesture.matchAgainst(estimatorRes.curls, estimatorRes.directions);\n if (confidence >= minConfidence) poses.push({ name: gesture.name, confidence });\n }\n return poses;\n}\n", "/**\n * HandPose model implementation\n *\n * Based on: [**MediaPipe HandPose**](https://drive.google.com/file/d/1sv4sSb9BSNVZhLzxXJ0jBv9DqD-4jnAz/view)\n */\n\nimport { log } from '../util/util';\nimport * as handdetector from './handposedetector';\nimport * as handpipeline from './handposepipeline';\nimport * as fingerPose from './fingerpose';\nimport { loadModel } from '../tfjs/load';\nimport type { HandResult, Box, Point } from '../result';\nimport type { Tensor, GraphModel } from '../tfjs/types';\nimport type { Config } from '../config';\nimport { env } from '../util/env';\n\nconst meshAnnotations = {\n thumb: [1, 2, 3, 4],\n index: [5, 6, 7, 8],\n middle: [9, 10, 11, 12],\n ring: [13, 14, 15, 16],\n pinky: [17, 18, 19, 20],\n palm: [0],\n};\n\nlet handDetectorModel: GraphModel | null;\nlet handPoseModel: GraphModel | null;\nlet handPipeline: handpipeline.HandPipeline;\n\nexport async function predict(input: Tensor, config: Config): Promise {\n const predictions = await handPipeline.estimateHands(input, config);\n if (!predictions) return [];\n const hands: HandResult[] = [];\n for (let i = 0; i < predictions.length; i++) {\n const annotations = {};\n if (predictions[i].landmarks) {\n for (const key of Object.keys(meshAnnotations)) {\n annotations[key] = meshAnnotations[key].map((index) => predictions[i].landmarks[index]);\n }\n }\n const keypoints = predictions[i].landmarks as unknown as Point[];\n let box: Box = [Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER, 0, 0]; // maximums so conditionals work\n let boxRaw: Box = [0, 0, 0, 0];\n if (keypoints && keypoints.length > 0) { // if we have landmarks, calculate box based on landmarks\n for (const pt of keypoints) {\n if (pt[0] < box[0]) box[0] = pt[0];\n if (pt[1] < box[1]) box[1] = pt[1];\n if (pt[0] > box[2]) box[2] = pt[0];\n if (pt[1] > box[3]) box[3] = pt[1];\n }\n box[2] -= box[0];\n box[3] -= box[1];\n boxRaw = [box[0] / (input.shape[2] || 0), box[1] / (input.shape[1] || 0), box[2] / (input.shape[2] || 0), box[3] / (input.shape[1] || 0)];\n } else { // otherwise use box from prediction\n box = predictions[i].box ? [\n Math.trunc(Math.max(0, predictions[i].box.topLeft[0])),\n Math.trunc(Math.max(0, predictions[i].box.topLeft[1])),\n Math.trunc(Math.min((input.shape[2] || 0), predictions[i].box.bottomRight[0]) - Math.max(0, predictions[i].box.topLeft[0])),\n Math.trunc(Math.min((input.shape[1] || 0), predictions[i].box.bottomRight[1]) - Math.max(0, predictions[i].box.topLeft[1])),\n ] : [0, 0, 0, 0];\n boxRaw = [\n (predictions[i].box.topLeft[0]) / (input.shape[2] || 0),\n (predictions[i].box.topLeft[1]) / (input.shape[1] || 0),\n (predictions[i].box.bottomRight[0] - predictions[i].box.topLeft[0]) / (input.shape[2] || 0),\n (predictions[i].box.bottomRight[1] - predictions[i].box.topLeft[1]) / (input.shape[1] || 0),\n ];\n }\n const landmarks = fingerPose.analyze(keypoints);\n hands.push({\n id: i,\n score: Math.round(100 * predictions[i].confidence) / 100,\n boxScore: Math.round(100 * predictions[i].boxConfidence) / 100,\n fingerScore: Math.round(100 * predictions[i].fingerConfidence) / 100,\n label: 'hand',\n box,\n boxRaw,\n keypoints,\n annotations: annotations as HandResult['annotations'],\n landmarks: landmarks as HandResult['landmarks'],\n });\n }\n return hands;\n}\n\nexport async function load(config: Config): Promise<[GraphModel | null, GraphModel | null]> {\n if (env.initial) {\n handDetectorModel = null;\n handPoseModel = null;\n }\n if (!handDetectorModel || !handPoseModel) {\n [handDetectorModel, handPoseModel] = await Promise.all([\n config.hand.enabled ? loadModel(config.hand.detector?.modelPath) : null,\n config.hand.landmarks ? loadModel(config.hand.skeleton?.modelPath) : null,\n ]);\n } else {\n if (config.debug) log('cached model:', handDetectorModel['modelUrl']);\n if (config.debug) log('cached model:', handPoseModel['modelUrl']);\n }\n const handDetector = handDetectorModel ? new handdetector.HandDetector(handDetectorModel) : undefined;\n if (handDetector && handPoseModel) handPipeline = new handpipeline.HandPipeline(handDetector, handPoseModel);\n return [handDetectorModel, handPoseModel];\n}\n", "/**\n * HandTrack model implementation\n *\n * Based on:\n * - Hand Detection & Skeleton: [**MediaPipe HandPose**](https://drive.google.com/file/d/1sv4sSb9BSNVZhLzxXJ0jBv9DqD-4jnAz/view)\n * - Hand Tracking: [**HandTracking**](https://github.com/victordibia/handtracking)\n */\n\nimport { log, now } from '../util/util';\nimport * as box from '../util/box';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport { loadModel } from '../tfjs/load';\nimport type { HandResult, HandType, Box, Point } from '../result';\nimport type { GraphModel, Tensor } from '../tfjs/types';\nimport type { Config } from '../config';\nimport { env } from '../util/env';\nimport * as fingerPose from './fingerpose';\nimport { fakeOps } from '../tfjs/backend';\nimport { constants } from '../tfjs/constants';\n\nconst models: [GraphModel | null, GraphModel | null] = [null, null];\nconst modelOutputNodes = ['StatefulPartitionedCall/Postprocessor/Slice', 'StatefulPartitionedCall/Postprocessor/ExpandDims_1'];\n\nconst inputSize = [[0, 0], [0, 0]];\n\nconst classes = ['hand', 'fist', 'pinch', 'point', 'face', 'tip', 'pinchtip'];\nconst faceIndex = 4;\n\nconst boxExpandFact = 1.6;\nconst maxDetectorResolution = 512;\nconst detectorExpandFact = 1.4;\n\nlet skipped = Number.MAX_SAFE_INTEGER;\nlet lastTime = 0;\nlet outputSize: [number, number] = [0, 0];\n\ninterface HandDetectResult {\n id: number,\n score: number,\n box: Box,\n boxRaw: Box,\n label: HandType,\n}\n\nconst cache: {\n boxes: HandDetectResult[],\n hands: HandResult[];\n} = {\n boxes: [],\n hands: [],\n};\n\nconst fingerMap = {\n /*\n thumb: [0, 1, 2, 3, 4],\n index: [0, 5, 6, 7, 8],\n middle: [0, 9, 10, 11, 12],\n ring: [0, 13, 14, 15, 16],\n pinky: [0, 17, 18, 19, 20],\n palm: [0],\n */\n thumb: [1, 2, 3, 4],\n index: [5, 6, 7, 8],\n middle: [9, 10, 11, 12],\n ring: [13, 14, 15, 16],\n pinky: [17, 18, 19, 20],\n base: [0],\n palm: [0, 17, 13, 9, 5, 1, 0],\n};\n\nexport async function loadDetect(config: Config): Promise {\n // HandTrack Model: Original: TFJS Port: \n if (env.initial) models[0] = null;\n if (!models[0]) {\n // handtrack model has some kernel ops defined in model but those are never referenced and non-existent in tfjs\n // ideally need to prune the model itself\n fakeOps(['tensorlistreserve', 'enter', 'tensorlistfromtensor', 'merge', 'loopcond', 'switch', 'exit', 'tensorliststack', 'nextiteration', 'tensorlistsetitem', 'tensorlistgetitem', 'reciprocal', 'shape', 'split', 'where'], config);\n models[0] = await loadModel(config.hand.detector?.modelPath);\n const inputs = models[0]['executor'] ? Object.values(models[0].modelSignature['inputs']) : undefined;\n inputSize[0][0] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[1].size) : 0;\n inputSize[0][1] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : 0;\n } else if (config.debug) log('cached model:', models[0]['modelUrl']);\n return models[0];\n}\n\nexport async function loadSkeleton(config: Config): Promise {\n if (env.initial) models[1] = null;\n if (!models[1]) {\n models[1] = await loadModel(config.hand.skeleton?.modelPath);\n const inputs = models[1]['executor'] ? Object.values(models[1].modelSignature['inputs']) : undefined;\n inputSize[1][0] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[1].size) : 0;\n inputSize[1][1] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : 0;\n } else if (config.debug) log('cached model:', models[1]['modelUrl']);\n return models[1];\n}\n\nexport async function load(config: Config): Promise<[GraphModel | null, GraphModel | null]> {\n if (!models[0]) await loadDetect(config);\n if (!models[1]) await loadSkeleton(config);\n return models;\n}\n\nasync function detectHands(input: Tensor, config: Config): Promise {\n const hands: HandDetectResult[] = [];\n if (!input || !models[0]) return hands;\n const t: Record = {};\n const ratio = (input.shape[2] || 1) / (input.shape[1] || 1);\n const height = Math.min(Math.round((input.shape[1] || 0) / 8) * 8, maxDetectorResolution); // use dynamic input size but cap at 512\n const width = Math.round(height * ratio / 8) * 8;\n t.resize = tf.image.resizeBilinear(input, [height, width]); // todo: resize with padding\n t.cast = tf.cast(t.resize, 'int32');\n [t.rawScores, t.rawBoxes] = await models[0].executeAsync(t.cast, modelOutputNodes) as Tensor[];\n t.boxes = tf.squeeze(t.rawBoxes, [0, 2]);\n t.scores = tf.squeeze(t.rawScores, [0]);\n const classScores: Tensor[] = tf.unstack(t.scores, 1); // unstack scores based on classes\n tf.dispose(classScores[faceIndex]);\n classScores.splice(faceIndex, 1); // remove faces\n t.filtered = tf.stack(classScores, 1); // restack\n tf.dispose(classScores);\n // t.filtered = t.scores;\n t.max = tf.max(t.filtered, 1); // max overall score\n t.argmax = tf.argMax(t.filtered, 1); // class index of max overall score\n let id = 0;\n t.nms = await tf.image.nonMaxSuppressionAsync(t.boxes, t.max, (config.hand.maxDetected || 0) + 1, config.hand.iouThreshold || 0, config.hand.minConfidence || 1);\n const nms = await t.nms.data();\n const scores = await t.max.data();\n const classNum = await t.argmax.data();\n for (const nmsIndex of Array.from(nms)) { // generates results for each class\n const boxSlice = tf.slice(t.boxes, nmsIndex, 1);\n const boxYX = await boxSlice.data();\n tf.dispose(boxSlice);\n const boxData: Box = [boxYX[1], boxYX[0], boxYX[3] - boxYX[1], boxYX[2] - boxYX[0]]; // yx box reshaped to standard box\n const boxRaw: Box = box.scale(boxData, detectorExpandFact);\n const boxFull: Box = [Math.trunc(boxData[0] * outputSize[0]), Math.trunc(boxData[1] * outputSize[1]), Math.trunc(boxData[2] * outputSize[0]), Math.trunc(boxData[3] * outputSize[1])];\n const score = scores[nmsIndex];\n const label = classes[classNum[nmsIndex]] as HandType;\n const hand: HandDetectResult = { id: id++, score, box: boxFull, boxRaw, label };\n hands.push(hand);\n }\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n hands.sort((a, b) => b.score - a.score);\n if (hands.length > (config.hand.maxDetected || 1)) hands.length = (config.hand.maxDetected || 1);\n return hands;\n}\n\nasync function detectFingers(input: Tensor, h: HandDetectResult, config: Config): Promise {\n const hand: HandResult = { // initial values inherited from hand detect\n id: h.id,\n score: Math.round(100 * h.score) / 100,\n boxScore: Math.round(100 * h.score) / 100,\n fingerScore: 0,\n box: h.box,\n boxRaw: h.boxRaw,\n label: h.label,\n keypoints: [],\n landmarks: {} as HandResult['landmarks'],\n annotations: {} as HandResult['annotations'],\n };\n if (input && models[1] && config.hand.landmarks && h.score > (config.hand.minConfidence || 0)) {\n const t: Record = {};\n const boxCrop = [h.boxRaw[1], h.boxRaw[0], h.boxRaw[3] + h.boxRaw[1], h.boxRaw[2] + h.boxRaw[0]] as Box;\n t.crop = tf.image.cropAndResize(input, [boxCrop], [0], [inputSize[1][0], inputSize[1][1]], 'bilinear');\n t.div = tf.div(t.crop, constants.tf255);\n [t.score, t.keypoints] = models[1].execute(t.div, ['Identity_1', 'Identity']) as Tensor[];\n const rawScore = (await t.score.data())[0];\n const score = (100 - Math.trunc(100 / (1 + Math.exp(rawScore)))) / 100; // reverse sigmoid value\n if (score >= (config.hand.minConfidence || 0)) {\n hand.fingerScore = score;\n t.reshaped = tf.reshape(t.keypoints, [-1, 3]);\n const coordsData: Point[] = await t.reshaped.array() as Point[];\n const coordsRaw: Point[] = coordsData.map((kpt) => [kpt[0] / inputSize[1][1], kpt[1] / inputSize[1][0], (kpt[2] || 0)]);\n const coordsNorm: Point[] = coordsRaw.map((kpt) => [kpt[0] * h.boxRaw[2], kpt[1] * h.boxRaw[3], (kpt[2] || 0)]);\n hand.keypoints = (coordsNorm).map((kpt) => [outputSize[0] * (kpt[0] + h.boxRaw[0]), outputSize[1] * (kpt[1] + h.boxRaw[1]), (kpt[2] || 0)]);\n hand.landmarks = fingerPose.analyze(hand.keypoints) as HandResult['landmarks']; // calculate finger gestures\n for (const key of Object.keys(fingerMap)) { // map keypoints to per-finger annotations\n hand.annotations[key] = fingerMap[key].map((index: number) => (hand.landmarks && hand.keypoints[index] ? hand.keypoints[index] : null));\n }\n }\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n }\n return hand;\n}\n\nexport async function predict(input: Tensor, config: Config): Promise {\n if (!models[0]?.['executor'] || !models[1]?.['executor'] || !models[0].inputs[0].shape || !models[1].inputs[0].shape) return []; // something is wrong with the model\n outputSize = [input.shape[2] || 0, input.shape[1] || 0];\n skipped++; // increment skip frames\n const skipTime = (config.hand.skipTime || 0) > (now() - lastTime);\n const skipFrame = skipped < (config.hand.skipFrames || 0);\n if (config.skipAllowed && skipTime && skipFrame) {\n return cache.hands; // return cached results without running anything\n }\n return new Promise(async (resolve) => {\n const skipTimeExtended = 3 * (config.hand.skipTime || 0) > (now() - lastTime);\n const skipFrameExtended = skipped < 3 * (config.hand.skipFrames || 0);\n if (config.skipAllowed && cache.hands.length === config.hand.maxDetected) { // we have all detected hands so we're definitely skipping\n cache.hands = await Promise.all(cache.boxes.map((handBox) => detectFingers(input, handBox, config)));\n } else if (config.skipAllowed && skipTimeExtended && skipFrameExtended && cache.hands.length > 0) { // we have some cached results: maybe not enough but anyhow continue for bit longer\n cache.hands = await Promise.all(cache.boxes.map((handBox) => detectFingers(input, handBox, config)));\n } else { // finally rerun detector\n cache.boxes = await detectHands(input, config);\n lastTime = now();\n cache.hands = await Promise.all(cache.boxes.map((handBox) => detectFingers(input, handBox, config)));\n skipped = 0;\n }\n\n const oldCache = [...cache.boxes];\n cache.boxes.length = 0; // reset cache\n if (config.cacheSensitivity > 0) {\n for (let i = 0; i < cache.hands.length; i++) {\n const boxKpt = box.square(cache.hands[i].keypoints, outputSize);\n if (boxKpt.box[2] / (input.shape[2] || 1) > 0.05 && boxKpt.box[3] / (input.shape[1] || 1) > 0.05 && cache.hands[i].fingerScore && cache.hands[i].fingerScore > (config.hand.minConfidence || 0)) {\n const boxScale = box.scale(boxKpt.box, boxExpandFact);\n const boxScaleRaw = box.scale(boxKpt.boxRaw, boxExpandFact);\n // const boxCrop = box.crop(boxScaleRaw);\n cache.boxes.push({ ...oldCache[i], box: boxScale, boxRaw: boxScaleRaw });\n }\n }\n }\n for (let i = 0; i < cache.hands.length; i++) { // replace detected boxes with calculated boxes in final output\n const bbox = box.calc(cache.hands[i].keypoints, outputSize);\n cache.hands[i].box = bbox.box;\n cache.hands[i].boxRaw = bbox.boxRaw;\n }\n resolve(cache.hands);\n });\n}\n", "/**\n * InsightFace model implementation\n *\n * Based on: [**DeepInsight InsightFace**](https://github.com/deepinsight/insightface)\n *\n * Alternative face embedding detection\n */\n\nimport { log, now } from '../util/util';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport { loadModel } from '../tfjs/load';\nimport type { Tensor, GraphModel } from '../tfjs/types';\nimport type { Config } from '../config';\nimport { env } from '../util/env';\n\nlet model: GraphModel | null;\nconst last: number[][] = [];\nlet lastCount = 0;\nlet lastTime = 0;\nlet skipped = Number.MAX_SAFE_INTEGER;\n\nexport async function load(config: Config): Promise {\n if (env.initial) model = null;\n if (!model) model = await loadModel(config.face['insightface'].modelPath);\n else if (config.debug) log('cached model:', model['modelUrl']);\n return model;\n}\n\nexport async function predict(input: Tensor, config: Config, idx, count): Promise {\n if (!model?.['executor']) return [];\n const skipFrame = skipped < (config.face['insightface']?.skipFrames || 0);\n const skipTime = (config.face['insightface']?.skipTime || 0) > (now() - lastTime);\n if (config.skipAllowed && skipTime && skipFrame && (lastCount === count) && last[idx]) {\n skipped++;\n return last[idx];\n }\n return new Promise(async (resolve) => {\n let data: number[] = [];\n if (config.face['insightface']?.enabled && model?.inputs[0].shape) {\n const t: Record = {};\n t.crop = tf.image.resizeBilinear(input, [model.inputs[0].shape[2], model.inputs[0].shape[1]], false); // just resize to fit the embedding model\n // do a tight crop of image and resize it to fit the model\n // const box = [[0.05, 0.15, 0.85, 0.85]]; // empyrical values for top, left, bottom, right\n // t.crop = tf.image.cropAndResize(input, box, [0], [model.inputs[0].shape[2], model.inputs[0].shape[1]]);\n t.data = model.execute(t.crop) as Tensor;\n const output = await t.data.data();\n data = Array.from(output); // convert typed array to simple array\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n }\n last[idx] = data;\n lastCount = count;\n lastTime = now();\n resolve(data);\n });\n}\n", "/**\n * Anti-spoofing model implementation\n */\n\nimport { log, now } from '../util/util';\nimport { loadModel } from '../tfjs/load';\nimport type { Config } from '../config';\nimport type { GraphModel, Tensor } from '../tfjs/types';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport { env } from '../util/env';\n\nlet model: GraphModel | null;\nconst cached: number[] = [];\nlet skipped = Number.MAX_SAFE_INTEGER;\nlet lastCount = 0;\nlet lastTime = 0;\n\nexport async function load(config: Config): Promise {\n if (env.initial) model = null;\n if (!model) model = await loadModel(config.face.liveness?.modelPath);\n else if (config.debug) log('cached model:', model['modelUrl']);\n return model;\n}\n\nexport async function predict(image: Tensor, config: Config, idx: number, count: number): Promise {\n if (!model?.['executor']) return 0;\n const skipTime = (config.face.liveness?.skipTime || 0) > (now() - lastTime);\n const skipFrame = skipped < (config.face.liveness?.skipFrames || 0);\n if (config.skipAllowed && skipTime && skipFrame && (lastCount === count) && cached[idx]) {\n skipped++;\n return cached[idx];\n }\n skipped = 0;\n return new Promise(async (resolve) => {\n const resize = tf.image.resizeBilinear(image, [model?.inputs[0].shape ? model.inputs[0].shape[2] : 0, model?.inputs[0].shape ? model.inputs[0].shape[1] : 0], false);\n const res = model?.execute(resize) as Tensor;\n const num = (await res.data())[0];\n cached[idx] = Math.round(100 * num) / 100;\n lastCount = count;\n lastTime = now();\n tf.dispose([resize, res]);\n resolve(cached[idx]);\n });\n}\n", "/**\n * Image segmentation for body detection model\n *\n * Based on:\n * - [**MediaPipe Meet**](https://drive.google.com/file/d/1lnP1bRi9CSqQQXUHa13159vLELYDgDu0/preview)\n */\n\nimport { log } from '../util/util';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport { loadModel } from '../tfjs/load';\nimport { constants } from '../tfjs/constants';\nimport type { GraphModel, Tensor } from '../tfjs/types';\nimport type { Config } from '../config';\nimport { env } from '../util/env';\n\nlet model: GraphModel;\n\nexport async function load(config: Config): Promise {\n if (!model || env.initial) model = await loadModel(config.segmentation.modelPath);\n else if (config.debug) log('cached model:', model['modelUrl']);\n return model;\n}\n\nexport async function predict(input: Tensor, config: Config): Promise {\n if (!model) model = await load(config);\n if (!model?.['executor'] || !model?.inputs?.[0].shape) return null; // something is wrong with the model\n const t: Record = {};\n t.resize = tf.image.resizeBilinear(input, [model.inputs[0].shape ? model.inputs[0].shape[1] : 0, model.inputs[0].shape ? model.inputs[0].shape[2] : 0], false);\n t.norm = tf.div(t.resize, constants.tf255);\n t.res = model.execute(t.norm) as Tensor;\n t.squeeze = tf.squeeze(t.res, 0);\n // t.softmax = tf.softmax(t.squeeze); // model meet has two channels for fg and bg\n [t.bgRaw, t.fgRaw] = tf.unstack(t.squeeze, 2);\n // t.bg = tf.softmax(t.bgRaw); // we can ignore bg channel\n t.fg = tf.softmax(t.fgRaw);\n t.mul = tf.mul(t.fg, constants.tf255);\n t.expand = tf.expandDims(t.mul, 2);\n t.output = tf.image.resizeBilinear(t.expand, [input.shape[1], input.shape[2]]);\n let rgba: Tensor;\n switch (config.segmentation.mode || 'default') {\n case 'default':\n t.input = tf.squeeze(input);\n t.concat = tf.concat([t.input, t.output], -1);\n rgba = tf.cast(t.concat, 'int32'); // combined original with alpha\n break;\n case 'alpha':\n rgba = tf.cast(t.output, 'int32'); // just get alpha value from model\n break;\n default:\n rgba = tf.tensor(0);\n }\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n return rgba;\n}\n", "/**\n * MobileFaceNet model implementation\n *\n * Based on: [**BecauseofAI MobileFace**](https://github.com/becauseofAI/MobileFace)\n *\n * Obsolete and replaced by `faceres` that performs age/gender/descriptor analysis\n */\n\nimport { log, now } from '../util/util';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport { loadModel } from '../tfjs/load';\nimport type { Tensor, GraphModel } from '../tfjs/types';\nimport type { Config } from '../config';\nimport { env } from '../util/env';\n\nlet model: GraphModel | null;\nconst last: number[][] = [];\nlet lastCount = 0;\nlet lastTime = 0;\nlet skipped = Number.MAX_SAFE_INTEGER;\n\nexport async function load(config: Config): Promise {\n if (env.initial) model = null;\n if (!model) model = await loadModel(config.face['mobilefacenet']?.modelPath);\n else if (config.debug) log('cached model:', model['modelUrl']);\n return model;\n}\n\n/*\n// convert to black&white to avoid colorization impact\nconst rgb = [0.2989, 0.5870, 0.1140]; // factors for red/green/blue colors when converting to grayscale: https://www.mathworks.com/help/matlab/ref/rgb2gray.html\nconst [red, green, blue] = tf.split(crop, 3, 3);\nconst redNorm = tf.mul(red, rgb[0]);\nconst greenNorm = tf.mul(green, rgb[1]);\nconst blueNorm = tf.mul(blue, rgb[2]);\nconst grayscale = tf.addN([redNorm, greenNorm, blueNorm]);\nconst merge = tf.stack([grayscale, grayscale, grayscale], 3).squeeze(4);\n\n// optional increase image contrast\n// or do it per-channel so mean is done on each channel\n// or do it based on histogram\nconst mean = merge.mean();\nconst factor = 5;\nconst contrast = merge.sub(mean).mul(factor).add(mean);\n*/\n\nexport async function predict(input: Tensor, config: Config, idx, count): Promise {\n if (!model?.['executor']) return [];\n const skipFrame = skipped < (config.face['mobilefacenet']?.skipFrames || 0);\n const skipTime = (config.face['mobilefacenet']?.skipTime || 0) > (now() - lastTime);\n if (config.skipAllowed && skipTime && skipFrame && (lastCount === count) && last[idx]) {\n skipped++;\n return last[idx];\n }\n return new Promise(async (resolve) => {\n let data: number[] = [];\n if (config.face['mobilefacenet']?.enabled && model?.inputs[0].shape) {\n const t: Record = {};\n t.crop = tf.image.resizeBilinear(input, [model.inputs[0].shape[2], model.inputs[0].shape[1]], false); // just resize to fit the embedding model\n // do a tight crop of image and resize it to fit the model\n // const box = [[0.05, 0.15, 0.85, 0.85]]; // empyrical values for top, left, bottom, right\n // t.crop = tf.image.cropAndResize(input, box, [0], [model.inputs[0].shape[2], model.inputs[0].shape[1]]);\n t.data = model.execute(t.crop) as Tensor;\n /*\n // optional normalize outputs with l2 normalization\n const scaled = tf.tidy(() => {\n const l2 = res.norm('euclidean');\n const scale = res.div(l2);\n return scale;\n });\n\n // optional reduce feature vector complexity\n const reshape = tf.reshape(res, [128, 2]); // split 256 vectors into 128 x 2\n const reduce = reshape.logSumExp(1); // reduce 2nd dimension by calculating logSumExp on it\n */\n const output = await t.data.data();\n data = Array.from(output); // convert typed array to simple array\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n }\n last[idx] = data;\n lastCount = count;\n lastTime = now();\n resolve(data);\n });\n}\n", "export const kpt: string[] = [ // used to create part labels\n 'nose',\n 'leftEye',\n 'rightEye',\n 'leftEar',\n 'rightEar',\n 'leftShoulder',\n 'rightShoulder',\n 'leftElbow',\n 'rightElbow',\n 'leftWrist',\n 'rightWrist',\n 'leftHip',\n 'rightHip',\n 'leftKnee',\n 'rightKnee',\n 'leftAnkle',\n 'rightAnkle',\n];\n\nexport const horizontal: string[][] = [ // used to fix left vs right\n ['leftEye', 'rightEye'],\n ['leftEar', 'rightEar'],\n ['leftShoulder', 'rightShoulder'],\n ['leftElbow', 'rightElbow'],\n ['leftWrist', 'rightWrist'],\n ['leftHip', 'rightHip'],\n ['leftKnee', 'rightKnee'],\n ['leftAnkle', 'rightAnkle'],\n];\n\nexport const vertical: string[][] = [ // used to remove unlikely keypoint positions\n ['leftKnee', 'leftShoulder'],\n ['rightKnee', 'rightShoulder'],\n ['leftAnkle', 'leftKnee'],\n ['rightAnkle', 'rightKnee'],\n];\n\nexport const relative: string[][][] = [ // used to match relative body parts\n [['leftHip', 'rightHip'], ['leftShoulder', 'rightShoulder']],\n [['leftElbow', 'rightElbow'], ['leftShoulder', 'rightShoulder']],\n];\n\nexport const connected: Record = { // used to create body outline in annotations\n leftLeg: ['leftHip', 'leftKnee', 'leftAnkle'],\n rightLeg: ['rightHip', 'rightKnee', 'rightAnkle'],\n torso: ['leftShoulder', 'rightShoulder', 'rightHip', 'leftHip', 'leftShoulder'],\n leftArm: ['leftShoulder', 'leftElbow', 'leftWrist'],\n rightArm: ['rightShoulder', 'rightElbow', 'rightWrist'],\n head: [],\n};\n", "import type { BodyKeypoint, BodyResult } from '../result';\nimport * as box from '../util/box';\nimport * as coords from './movenetcoords';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport type { Tensor } from '../tfjs/types';\n\nconst maxJitter = 0.005; // default allowed jitter is within 0.5%\n\nconst cache: {\n keypoints: BodyKeypoint[],\n padding: [number, number][];\n} = {\n keypoints: [],\n padding: [[0, 0], [0, 0], [0, 0], [0, 0]],\n};\n\nexport function bodyParts(body: BodyResult) { // model sometimes mixes up left vs right keypoints so we fix them\n for (const pair of coords.horizontal) { // fix body parts left vs right\n const left = body.keypoints.findIndex((kp) => kp.part === pair[0]);\n const right = body.keypoints.findIndex((kp) => kp.part === pair[1]);\n if (body.keypoints[left] && body.keypoints[right]) {\n if (body.keypoints[left].position[0] < body.keypoints[right].position[0]) {\n const tmp = body.keypoints[left];\n body.keypoints[left] = body.keypoints[right];\n body.keypoints[right] = tmp;\n }\n }\n }\n for (const pair of coords.vertical) { // remove body parts with improbable vertical position\n const lower = body.keypoints.findIndex((kp) => (kp && kp.part === pair[0]));\n const higher = body.keypoints.findIndex((kp) => (kp && kp.part === pair[1]));\n if (body.keypoints[lower] && body.keypoints[higher]) {\n if (body.keypoints[lower].position[1] < body.keypoints[higher].position[1]) {\n body.keypoints.splice(lower, 1);\n }\n }\n }\n for (const [pair, compare] of coords.relative) { // rearrange body parts according to their relative position\n const left = body.keypoints.findIndex((kp) => (kp && kp.part === pair[0]));\n const right = body.keypoints.findIndex((kp) => (kp && kp.part === pair[1]));\n const leftTo = body.keypoints.findIndex((kp) => (kp && kp.part === compare[0]));\n const rightTo = body.keypoints.findIndex((kp) => (kp && kp.part === compare[1]));\n if (!body.keypoints[leftTo] || !body.keypoints[rightTo]) continue; // only if we have both compare points\n const distanceLeft = body.keypoints[left] ? [\n Math.abs(body.keypoints[leftTo].position[0] - body.keypoints[left].position[0]),\n Math.abs(body.keypoints[rightTo].position[0] - body.keypoints[left].position[0]),\n ] : [0, 0];\n const distanceRight = body.keypoints[right] ? [\n Math.abs(body.keypoints[rightTo].position[0] - body.keypoints[right].position[0]),\n Math.abs(body.keypoints[leftTo].position[0] - body.keypoints[right].position[0]),\n ] : [0, 0];\n if (distanceLeft[0] > distanceLeft[1] || distanceRight[0] > distanceRight[1]) { // should flip keypoints\n const tmp = body.keypoints[left];\n body.keypoints[left] = body.keypoints[right];\n body.keypoints[right] = tmp;\n }\n }\n}\n\nexport function jitter(keypoints: BodyKeypoint[]): BodyKeypoint[] {\n for (let i = 0; i < keypoints.length; i++) {\n if (keypoints[i] && cache.keypoints[i]) {\n const diff = [Math.abs(keypoints[i].positionRaw[0] - cache.keypoints[i].positionRaw[0]), Math.abs(keypoints[i].positionRaw[1] - cache.keypoints[i].positionRaw[1])];\n if (diff[0] < maxJitter && diff[1] < maxJitter) {\n keypoints[i] = cache.keypoints[i]; // below jitter so replace keypoint\n } else {\n cache.keypoints[i] = keypoints[i]; // above jitter so update cache\n }\n } else {\n cache.keypoints[i] = keypoints[i]; // cache for keypoint doesnt exist so create it here\n }\n }\n return keypoints;\n}\n\nexport function padInput(input: Tensor, inputSize: number): Tensor {\n const t: Record = {};\n if (!input?.shape?.[1] || !input?.shape?.[2]) return input;\n cache.padding = [\n [0, 0], // dont touch batch\n [input.shape[2] > input.shape[1] ? Math.trunc((input.shape[2] - input.shape[1]) / 2) : 0, input.shape[2] > input.shape[1] ? Math.trunc((input.shape[2] - input.shape[1]) / 2) : 0], // height before&after\n [input.shape[1] > input.shape[2] ? Math.trunc((input.shape[1] - input.shape[2]) / 2) : 0, input.shape[1] > input.shape[2] ? Math.trunc((input.shape[1] - input.shape[2]) / 2) : 0], // width before&after\n [0, 0], // dont touch rbg\n ];\n t.pad = tf.pad(input, cache.padding);\n t.resize = tf.image.resizeBilinear(t.pad, [inputSize, inputSize]);\n const final = tf.cast(t.resize, 'int32');\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n return final;\n}\n\nexport function rescaleBody(body: BodyResult, outputSize: [number, number]): BodyResult {\n body.keypoints = body.keypoints.filter((kpt) => kpt?.position); // filter invalid keypoints\n for (const kpt of body.keypoints) {\n kpt.position = [\n kpt.position[0] * (outputSize[0] + cache.padding[2][0] + cache.padding[2][1]) / outputSize[0] - cache.padding[2][0],\n kpt.position[1] * (outputSize[1] + cache.padding[1][0] + cache.padding[1][1]) / outputSize[1] - cache.padding[1][0],\n ];\n kpt.positionRaw = [\n kpt.position[0] / outputSize[0], kpt.position[1] / outputSize[1],\n ];\n }\n const rescaledBoxes = box.calc(body.keypoints.map((pt) => pt.position), outputSize);\n body.box = rescaledBoxes.box;\n body.boxRaw = rescaledBoxes.boxRaw;\n return body;\n}\n", "/**\n * MoveNet model implementation\n *\n * Based on: [**MoveNet**](https://blog.tensorflow.org/2021/05/next-generation-pose-detection-with-movenet-and-tensorflowjs.html)\n */\n\nimport { log, now } from '../util/util';\nimport * as box from '../util/box';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport * as coords from './movenetcoords';\nimport * as fix from './movenetfix';\nimport { loadModel } from '../tfjs/load';\nimport type { BodyKeypoint, BodyResult, BodyLandmark, BodyAnnotation, Box, Point } from '../result';\nimport type { GraphModel, Tensor } from '../tfjs/types';\nimport type { Config } from '../config';\nimport { fakeOps } from '../tfjs/backend';\nimport { env } from '../util/env';\n\nlet model: GraphModel | null;\nlet inputSize = 0;\nlet skipped = Number.MAX_SAFE_INTEGER;\n// const boxExpandFact = 1.5; // increase to 150%\n\nconst cache: {\n boxes: Box[], // unused\n bodies: BodyResult[];\n last: number,\n} = {\n boxes: [],\n bodies: [],\n last: 0,\n};\n\nexport async function load(config: Config): Promise {\n if (env.initial) model = null;\n if (!model) {\n fakeOps(['size'], config);\n model = await loadModel(config.body.modelPath);\n } else if (config.debug) log('cached model:', model['modelUrl']);\n inputSize = (model?.['executor'] && model?.inputs?.[0].shape) ? model.inputs[0].shape[2] : 0;\n if (inputSize < 64) inputSize = 256;\n return model;\n}\n\nfunction parseSinglePose(res, config, image) {\n const kpt = res[0][0];\n const keypoints: BodyKeypoint[] = [];\n let score = 0;\n for (let id = 0; id < kpt.length; id++) {\n score = kpt[id][2];\n if (score > config.body.minConfidence) {\n const positionRaw: Point = [kpt[id][1], kpt[id][0]];\n keypoints.push({\n score: Math.round(100 * score) / 100,\n part: coords.kpt[id] as BodyLandmark,\n positionRaw,\n position: [ // normalized to input image size\n Math.round((image.shape[2] || 0) * positionRaw[0]),\n Math.round((image.shape[1] || 0) * positionRaw[1]),\n ],\n });\n }\n }\n score = keypoints.reduce((prev, curr) => (curr.score > prev ? curr.score : prev), 0);\n const bodies: BodyResult[] = [];\n const newBox = box.calc(keypoints.map((pt) => pt.position), [image.shape[2], image.shape[1]]);\n const annotations: Record = {};\n for (const [name, indexes] of Object.entries(coords.connected)) {\n const pt: Point[][] = [];\n for (let i = 0; i < indexes.length - 1; i++) {\n const pt0 = keypoints.find((kp) => kp.part === indexes[i]);\n const pt1 = keypoints.find((kp) => kp.part === indexes[i + 1]);\n if (pt0 && pt1 && pt0.score > (config.body.minConfidence || 0) && pt1.score > (config.body.minConfidence || 0)) pt.push([pt0.position, pt1.position]);\n }\n annotations[name] = pt;\n }\n const body: BodyResult = { id: 0, score, box: newBox.box, boxRaw: newBox.boxRaw, keypoints, annotations };\n fix.bodyParts(body);\n bodies.push(body);\n return bodies;\n}\n\nfunction parseMultiPose(res, config, image) {\n const bodies: BodyResult[] = [];\n for (let id = 0; id < res[0].length; id++) {\n const kpt = res[0][id];\n const totalScore = Math.round(100 * kpt[51 + 4]) / 100;\n if (totalScore > config.body.minConfidence) {\n const keypoints: BodyKeypoint[] = [];\n for (let i = 0; i < 17; i++) {\n const score = kpt[3 * i + 2];\n if (score > config.body.minConfidence) {\n const positionRaw: Point = [kpt[3 * i + 1], kpt[3 * i + 0]];\n keypoints.push({\n part: coords.kpt[i] as BodyLandmark,\n score: Math.round(100 * score) / 100,\n positionRaw,\n position: [Math.round((image.shape[2] || 0) * positionRaw[0]), Math.round((image.shape[1] || 0) * positionRaw[1])],\n });\n }\n }\n const newBox = box.calc(keypoints.map((pt) => pt.position), [image.shape[2], image.shape[1]]);\n // movenet-multipose has built-in box details\n // const boxRaw: Box = [kpt[51 + 1], kpt[51 + 0], kpt[51 + 3] - kpt[51 + 1], kpt[51 + 2] - kpt[51 + 0]];\n // const box: Box = [Math.trunc(boxRaw[0] * (image.shape[2] || 0)), Math.trunc(boxRaw[1] * (image.shape[1] || 0)), Math.trunc(boxRaw[2] * (image.shape[2] || 0)), Math.trunc(boxRaw[3] * (image.shape[1] || 0))];\n const annotations: Record = {} as Record;\n for (const [name, indexes] of Object.entries(coords.connected)) {\n const pt: Point[][] = [];\n for (let i = 0; i < indexes.length - 1; i++) {\n const pt0 = keypoints.find((kp) => kp.part === indexes[i]);\n const pt1 = keypoints.find((kp) => kp.part === indexes[i + 1]);\n if (pt0 && pt1 && pt0.score > (config.body.minConfidence || 0) && pt1.score > (config.body.minConfidence || 0)) pt.push([pt0.position, pt1.position]);\n }\n annotations[name] = pt;\n }\n const body: BodyResult = { id, score: totalScore, box: newBox.box, boxRaw: newBox.boxRaw, keypoints: [...keypoints], annotations };\n fix.bodyParts(body);\n bodies.push(body);\n }\n }\n bodies.sort((a, b) => b.score - a.score);\n if (bodies.length > config.body.maxDetected) bodies.length = config.body.maxDetected;\n return bodies;\n}\n\nexport async function predict(input: Tensor, config: Config): Promise {\n if (!model?.['executor'] || !model?.inputs?.[0].shape) return []; // something is wrong with the model\n if (!config.skipAllowed) cache.boxes.length = 0; // allowed to use cache or not\n skipped++; // increment skip frames\n const skipTime = (config.body.skipTime || 0) > (now() - cache.last);\n const skipFrame = skipped < (config.body.skipFrames || 0);\n if (config.skipAllowed && skipTime && skipFrame) {\n return cache.bodies; // return cached results without running anything\n }\n return new Promise(async (resolve) => {\n const t: Record = {};\n skipped = 0;\n // run detection on squared input and cached boxes\n /*\n cache.bodies = []; // reset bodies result\n if (cache.boxes.length >= (config.body.maxDetected || 0)) { // if we have enough cached boxes run detection using cache\n for (let i = 0; i < cache.boxes.length; i++) { // run detection based on cached boxes\n t.crop = tf.image.cropAndResize(input, [cache.boxes[i]], [0], [inputSize, inputSize], 'bilinear');\n t.cast = tf.cast(t.crop, 'int32');\n // t.input = prepareImage(input);\n t.res = model?.execute(t.cast) as Tensor;\n const res = await t.res.array();\n const newBodies = (t.res.shape[2] === 17) ? await parseSinglePose(res, config, input, cache.boxes[i]) : await parseMultiPose(res, config, input, cache.boxes[i]);\n cache.bodies = cache.bodies.concat(newBodies);\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n }\n }\n if (cache.bodies.length !== config.body.maxDetected) { // did not find enough bodies based on cached boxes so run detection on full frame\n t.input = prepareImage(input);\n t.res = model?.execute(t.input) as Tensor;\n const res = await t.res.array();\n cache.bodies = (t.res.shape[2] === 17) ? await parseSinglePose(res, config, input, [0, 0, 1, 1]) : await parseMultiPose(res, config, input, [0, 0, 1, 1]);\n for (const body of cache.bodies) rescaleBody(body, [input.shape[2] || 1, input.shape[1] || 1]);\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n }\n cache.boxes.length = 0; // reset cache\n for (let i = 0; i < cache.bodies.length; i++) {\n if (cache.bodies[i].keypoints.length > (coords.kpt.length / 2)) { // only update cache if we detected at least half keypoints\n const scaledBox = box.scale(cache.bodies[i].boxRaw, boxExpandFact);\n const cropBox = box.crop(scaledBox);\n cache.boxes.push(cropBox);\n }\n }\n */\n\n // run detection on squared input and no cached boxes\n t.input = fix.padInput(input, inputSize);\n t.res = model?.execute(t.input) as Tensor;\n cache.last = now();\n const res = await t.res.array();\n cache.bodies = (t.res.shape[2] === 17)\n ? parseSinglePose(res, config, input)\n : parseMultiPose(res, config, input);\n for (const body of cache.bodies) {\n fix.rescaleBody(body, [input.shape[2] || 1, input.shape[1] || 1]);\n fix.jitter(body.keypoints);\n }\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n\n resolve(cache.bodies);\n });\n}\n", "/**\n * NanoDet object detection model implementation\n *\n * Based on: [**MB3-CenterNet**](https://github.com/610265158/mobilenetv3_centernet)\n */\n\nimport { log, now } from '../util/util';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport { loadModel } from '../tfjs/load';\nimport { constants } from '../tfjs/constants';\nimport { labels } from './labels';\nimport type { ObjectResult, ObjectType, Box } from '../result';\nimport type { GraphModel, Tensor } from '../tfjs/types';\nimport type { Config } from '../config';\nimport { env } from '../util/env';\n\nlet model: GraphModel;\nlet last: ObjectResult[] = [];\nlet lastTime = 0;\nlet skipped = Number.MAX_SAFE_INTEGER;\nlet inputSize = 0;\n\nconst scaleBox = 2.5; // increase box size\n\nexport async function load(config: Config): Promise {\n if (!model || env.initial) {\n model = await loadModel(config.object.modelPath);\n const inputs = model?.['executor'] ? Object.values(model.modelSignature['inputs']) : undefined;\n inputSize = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : 416;\n } else if (config.debug) log('cached model:', model['modelUrl']);\n return model;\n}\n\nasync function process(res: Tensor[], outputShape: [number, number], config: Config) {\n let id = 0;\n let results: ObjectResult[] = [];\n const size = inputSize;\n for (const strideSize of [1, 2, 4]) { // try each stride size as it detects large/medium/small objects\n // find scores, boxes, classes\n const baseSize = strideSize * 13; // 13x13=169, 26x26=676, 52x52=2704\n // find boxes and scores output depending on stride\n const scoresT = tf.squeeze(res.find((a: Tensor) => (a.shape[1] === (baseSize ** 2) && (a.shape[2] || 0) === labels.length)));\n const scores = await scoresT.array(); // optionally use exponential scores or just as-is\n const featuresT = tf.squeeze(res.find((a: Tensor) => (a.shape[1] === (baseSize ** 2) && (a.shape[2] || 0) < labels.length)));\n const boxesMaxT = featuresT.reshape([-1, 4, featuresT.shape[1] / 4]); // reshape [output] to [4, output / 4] where number is number of different features inside each stride\n const boxIdxT = boxesMaxT.argMax(2); // what we need is indexes of features with highest scores, not values itself\n const boxIdx = await boxIdxT.array(); // what we need is indexes of features with highest scores, not values itself\n for (let i = 0; i < scoresT.shape[0]; i++) { // total strides (x * y matrix)\n for (let j = 0; j < scoresT.shape[1]; j++) { // one score for each class\n const score = scores[i][j]; // get score for current position\n if (score > (config.object.minConfidence || 0) && j !== 61) {\n const cx = (0.5 + Math.trunc(i % baseSize)) / baseSize; // center.x normalized to range 0..1\n const cy = (0.5 + Math.trunc(i / baseSize)) / baseSize; // center.y normalized to range 0..1\n const boxOffset = boxIdx[i].map((a: number) => a * (baseSize / strideSize / (size))); // just grab indexes of features with highest scores\n const [x, y] = [\n cx - (scaleBox / strideSize * boxOffset[0]),\n cy - (scaleBox / strideSize * boxOffset[1]),\n ];\n const [w, h] = [\n cx + (scaleBox / strideSize * boxOffset[2]) - x,\n cy + (scaleBox / strideSize * boxOffset[3]) - y,\n ];\n let boxRaw: Box = [x, y, w, h]; // results normalized to range 0..1\n boxRaw = boxRaw.map((a) => Math.max(0, Math.min(a, 1))) as Box; // fix out-of-bounds coords\n const box = [ // results normalized to input image pixels\n boxRaw[0] * outputShape[0],\n boxRaw[1] * outputShape[1],\n boxRaw[2] * outputShape[0],\n boxRaw[3] * outputShape[1],\n ];\n const result = {\n id: id++,\n // strideSize,\n score: Math.round(100 * score) / 100,\n class: j + 1,\n label: labels[j].label as ObjectType,\n // center: [Math.trunc(outputShape[0] * cx), Math.trunc(outputShape[1] * cy)],\n // centerRaw: [cx, cy],\n box: box.map((a) => Math.trunc(a)) as Box,\n boxRaw,\n };\n results.push(result);\n }\n }\n }\n tf.dispose([scoresT, featuresT, boxesMaxT, boxIdxT]);\n }\n\n // normally nms is run on raw results, but since boxes need to be calculated this way we skip calulcation of\n // unnecessary boxes and run nms only on good candidates (basically it just does IOU analysis as scores are already filtered)\n const nmsBoxes = results.map((a) => [a.boxRaw[1], a.boxRaw[0], a.boxRaw[3], a.boxRaw[2]]); // switches coordinates from x,y to y,x as expected by tf.nms\n const nmsScores = results.map((a) => a.score);\n let nmsIdx: number[] = [];\n if (nmsBoxes && nmsBoxes.length > 0) {\n const nms = await tf.image.nonMaxSuppressionAsync(nmsBoxes, nmsScores, config.object.maxDetected, config.object.iouThreshold, config.object.minConfidence);\n nmsIdx = await nms.data();\n tf.dispose(nms);\n }\n\n // filter & sort results\n results = results\n .filter((_val, idx) => nmsIdx.includes(idx))\n .sort((a, b) => (b.score - a.score));\n\n return results;\n}\n\nexport async function predict(image: Tensor, config: Config): Promise {\n if (!model?.['executor']) return [];\n const skipTime = (config.object.skipTime || 0) > (now() - lastTime);\n const skipFrame = skipped < (config.object.skipFrames || 0);\n if (config.skipAllowed && skipTime && skipFrame && (last.length > 0)) {\n skipped++;\n return last;\n }\n skipped = 0;\n if (!env.kernels.includes('mod') || !env.kernels.includes('sparsetodense')) return last;\n return new Promise(async (resolve) => {\n const outputSize = [image.shape[2] || 0, image.shape[1] || 0];\n const resizeT = tf.image.resizeBilinear(image, [inputSize, inputSize], false);\n const normT = tf.div(resizeT, constants.tf255);\n const transposeT = tf.transpose(normT, [0, 3, 1, 2]);\n\n let objectT;\n if (config.object.enabled) objectT = model.execute(transposeT);\n lastTime = now();\n\n const obj = await process(objectT as Tensor[], outputSize as [number, number], config);\n last = obj;\n tf.dispose([resizeT, normT, transposeT, ...objectT]);\n resolve(obj);\n });\n}\n", "/**\n * PoseNet body detection model implementation constants\n * See `posenet.ts` for entry point\n */\n\nimport type { Point, BodyResult, BodyAnnotation, BodyLandmark } from '../result';\n\nexport const partNames = [\n 'nose', 'leftEye', 'rightEye', 'leftEar', 'rightEar', 'leftShoulder',\n 'rightShoulder', 'leftElbow', 'rightElbow', 'leftWrist', 'rightWrist',\n 'leftHip', 'rightHip', 'leftKnee', 'rightKnee', 'leftAnkle', 'rightAnkle',\n];\n\nexport const count = partNames.length; // 17 keypoints\n\nexport const partIds = partNames.reduce((result, jointName, i) => {\n result[jointName] = i;\n return result;\n}, {});\n\nconst connectedPartNames = [\n ['leftHip', 'leftShoulder'], ['leftElbow', 'leftShoulder'],\n ['leftElbow', 'leftWrist'], ['leftHip', 'leftKnee'],\n ['leftKnee', 'leftAnkle'], ['rightHip', 'rightShoulder'],\n ['rightElbow', 'rightShoulder'], ['rightElbow', 'rightWrist'],\n ['rightHip', 'rightKnee'], ['rightKnee', 'rightAnkle'],\n ['leftShoulder', 'rightShoulder'], ['leftHip', 'rightHip'],\n];\nexport const connectedPartIndices = connectedPartNames.map(([jointNameA, jointNameB]) => ([partIds[jointNameA], partIds[jointNameB]]));\n\nexport const poseChain = [\n ['nose', 'leftEye'], ['leftEye', 'leftEar'], ['nose', 'rightEye'],\n ['rightEye', 'rightEar'], ['nose', 'leftShoulder'],\n ['leftShoulder', 'leftElbow'], ['leftElbow', 'leftWrist'],\n ['leftShoulder', 'leftHip'], ['leftHip', 'leftKnee'],\n ['leftKnee', 'leftAnkle'], ['nose', 'rightShoulder'],\n ['rightShoulder', 'rightElbow'], ['rightElbow', 'rightWrist'],\n ['rightShoulder', 'rightHip'], ['rightHip', 'rightKnee'],\n ['rightKnee', 'rightAnkle'],\n];\n\nexport function eitherPointDoesntMeetConfidence(a: number, b: number, minConfidence: number) {\n return (a < minConfidence || b < minConfidence);\n}\n\nexport function getAdjacentKeyPoints(keypoints, minConfidence: number) {\n return connectedPartIndices.reduce((result, [leftJoint, rightJoint]) => {\n if (eitherPointDoesntMeetConfidence(keypoints[leftJoint].score, keypoints[rightJoint].score, minConfidence)) {\n return result;\n }\n result.push([keypoints[leftJoint], keypoints[rightJoint]]);\n return result;\n }, []);\n}\n\nexport function getBoundingBox(keypoints): [number, number, number, number] {\n const coord = keypoints.reduce(({ maxX, maxY, minX, minY }, { position: { x, y } }) => ({\n maxX: Math.max(maxX, x),\n maxY: Math.max(maxY, y),\n minX: Math.min(minX, x),\n minY: Math.min(minY, y),\n }), {\n maxX: Number.NEGATIVE_INFINITY,\n maxY: Number.NEGATIVE_INFINITY,\n minX: Number.POSITIVE_INFINITY,\n minY: Number.POSITIVE_INFINITY,\n });\n return [coord.minX, coord.minY, coord.maxX - coord.minX, coord.maxY - coord.minY];\n}\n\nexport function scalePoses(poses, [height, width], [inputResolutionHeight, inputResolutionWidth]): BodyResult[] {\n const scaleY = height / inputResolutionHeight;\n const scaleX = width / inputResolutionWidth;\n const scalePose = (pose, i): BodyResult => ({\n id: i,\n score: pose.score,\n boxRaw: [pose.box[0] / inputResolutionWidth, pose.box[1] / inputResolutionHeight, pose.box[2] / inputResolutionWidth, pose.box[3] / inputResolutionHeight],\n box: [Math.trunc(pose.box[0] * scaleX), Math.trunc(pose.box[1] * scaleY), Math.trunc(pose.box[2] * scaleX), Math.trunc(pose.box[3] * scaleY)],\n keypoints: pose.keypoints.map(({ score, part, position }) => ({\n score: score as number,\n part: part as BodyLandmark,\n position: [Math.trunc(position.x * scaleX), Math.trunc(position.y * scaleY)] as Point,\n positionRaw: [position.x / inputResolutionHeight, position.y / inputResolutionHeight] as Point,\n })),\n annotations: {} as Record,\n });\n const scaledPoses = poses.map((pose, i) => scalePose(pose, i));\n return scaledPoses;\n}\n\n// algorithm based on Coursera Lecture from Algorithms, Part 1: https://www.coursera.org/learn/algorithms-part1/lecture/ZjoSM/heapsort\nexport class MaxHeap {\n priorityQueue: unknown[]; // don't touch\n numberOfElements: number;\n getElementValue: unknown; // function call\n\n constructor(maxSize, getElementValue) {\n this.priorityQueue = new Array(maxSize);\n this.numberOfElements = -1;\n this.getElementValue = getElementValue;\n }\n\n enqueue(x) {\n this.priorityQueue[++this.numberOfElements] = x;\n this.swim(this.numberOfElements);\n }\n\n dequeue() {\n const max = this.priorityQueue[0];\n this.exchange(0, this.numberOfElements--);\n this.sink(0);\n this.priorityQueue[this.numberOfElements + 1] = null;\n return max;\n }\n\n empty() { return this.numberOfElements === -1; }\n\n size() { return this.numberOfElements + 1; }\n\n all() { return this.priorityQueue.slice(0, this.numberOfElements + 1); }\n\n max() { return this.priorityQueue[0]; }\n\n swim(k) {\n while (k > 0 && this.less(Math.floor(k / 2), k)) {\n this.exchange(k, Math.floor(k / 2));\n k = Math.floor(k / 2);\n }\n }\n\n sink(k) {\n while (2 * k <= this.numberOfElements) {\n let j = 2 * k;\n if (j < this.numberOfElements && this.less(j, j + 1)) j++;\n if (!this.less(k, j)) break;\n this.exchange(k, j);\n k = j;\n }\n }\n\n getValueAt(i) {\n // @ts-ignore getter is of unknown type\n return this.getElementValue(this.priorityQueue[i]);\n }\n\n less(i, j) {\n return this.getValueAt(i) < this.getValueAt(j);\n }\n\n exchange(i, j) {\n const t = this.priorityQueue[i];\n this.priorityQueue[i] = this.priorityQueue[j];\n this.priorityQueue[j] = t;\n }\n}\n\nexport function getOffsetPoint(y, x, keypoint: number, offsets) {\n return {\n y: offsets.get(y, x, keypoint),\n x: offsets.get(y, x, keypoint + count),\n };\n}\n\nexport function getImageCoords(part, outputStride: number, offsets) {\n const { heatmapY, heatmapX, id: keypoint } = part;\n const { y, x } = getOffsetPoint(heatmapY, heatmapX, keypoint, offsets);\n return {\n x: part.heatmapX * outputStride + x,\n y: part.heatmapY * outputStride + y,\n };\n}\n\nexport function fillArray(element, size) {\n const result = new Array(size);\n for (let i = 0; i < size; i++) {\n result[i] = element;\n }\n return result;\n}\n\nexport function clamp(a, min, max) {\n if (a < min) return min;\n if (a > max) return max;\n return a;\n}\n\nexport function squaredDistance(y1, x1, y2, x2) {\n const dy = y2 - y1;\n const dx = x2 - x1;\n return dy * dy + dx * dx;\n}\n\nexport function addVectors(a: { x: number, y: number }, b: { x: number, y: number }) {\n return { x: a.x + b.x, y: a.y + b.y };\n}\n\nexport function clampVector(a, min, max) {\n return { y: clamp(a.y, min, max), x: clamp(a.x, min, max) };\n}\n", "/**\n * PoseNet body detection model implementation\n *\n * Based on: [**PoseNet**](https://medium.com/tensorflow/real-time-human-pose-estimation-in-the-browser-with-tensorflow-js-7dd0bc881cd5)\n */\n\nimport { log } from '../util/util';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport { loadModel } from '../tfjs/load';\nimport type { BodyResult, BodyLandmark, Box } from '../result';\nimport type { Tensor, GraphModel } from '../tfjs/types';\nimport type { Config } from '../config';\nimport { env } from '../util/env';\nimport * as utils from './posenetutils';\n\nlet model: GraphModel;\nconst poseNetOutputs = ['MobilenetV1/offset_2/BiasAdd'/* offsets */, 'MobilenetV1/heatmap_2/BiasAdd'/* heatmapScores */, 'MobilenetV1/displacement_fwd_2/BiasAdd'/* displacementFwd */, 'MobilenetV1/displacement_bwd_2/BiasAdd'/* displacementBwd */];\nconst localMaximumRadius = 1;\nconst outputStride = 16;\nconst squaredNmsRadius = 50 ** 2;\n\nfunction traverse(edgeId: number, sourceKeypoint, targetId, scores, offsets, displacements, offsetRefineStep = 2) {\n const getDisplacement = (point) => ({\n y: displacements.get(point.y, point.x, edgeId),\n x: displacements.get(point.y, point.x, (displacements.shape[2] / 2) + edgeId),\n });\n const getStridedIndexNearPoint = (point, height, width) => ({\n y: utils.clamp(Math.round(point.y / outputStride), 0, height - 1),\n x: utils.clamp(Math.round(point.x / outputStride), 0, width - 1),\n });\n\n const [height, width] = scores.shape;\n // Nearest neighbor interpolation for the source->target displacements.\n const sourceKeypointIndices = getStridedIndexNearPoint(sourceKeypoint.position, height, width);\n const displacement = getDisplacement(sourceKeypointIndices);\n const displacedPoint = utils.addVectors(sourceKeypoint.position, displacement);\n let targetKeypoint = displacedPoint;\n for (let i = 0; i < offsetRefineStep; i++) {\n const targetKeypointIndices = getStridedIndexNearPoint(targetKeypoint, height, width);\n const offsetPoint = utils.getOffsetPoint(targetKeypointIndices.y, targetKeypointIndices.x, targetId, offsets);\n targetKeypoint = utils.addVectors(\n { x: targetKeypointIndices.x * outputStride, y: targetKeypointIndices.y * outputStride },\n { x: offsetPoint.x, y: offsetPoint.y },\n );\n }\n const targetKeyPointIndices = getStridedIndexNearPoint(targetKeypoint, height, width);\n const score = scores.get(targetKeyPointIndices.y, targetKeyPointIndices.x, targetId);\n return { position: targetKeypoint, part: utils.partNames[targetId], score };\n}\n\nexport function decodePose(root, scores, offsets, displacementsFwd, displacementsBwd) {\n const tuples = utils.poseChain.map(([parentJoinName, childJoinName]) => ([utils.partIds[parentJoinName], utils.partIds[childJoinName]]));\n const edgesFwd = tuples.map(([, childJointId]) => childJointId);\n const edgesBwd = tuples.map(([parentJointId]) => parentJointId);\n const numParts = scores.shape[2]; // [21,21,17]\n const numEdges = edgesFwd.length;\n const keypoints = new Array(numParts);\n // Start a new detection instance at the position of the root.\n const rootPoint = utils.getImageCoords(root.part, outputStride, offsets);\n keypoints[root.part.id] = {\n score: root.score,\n part: utils.partNames[root.part.id] as BodyLandmark,\n position: rootPoint,\n };\n // Decode the part positions upwards in the tree, following the backward displacements.\n for (let edge = numEdges - 1; edge >= 0; --edge) {\n const sourceId = edgesFwd[edge];\n const targetId = edgesBwd[edge];\n if (keypoints[sourceId] && !keypoints[targetId]) {\n keypoints[targetId] = traverse(edge, keypoints[sourceId], targetId, scores, offsets, displacementsBwd);\n }\n }\n // Decode the part positions downwards in the tree, following the forward displacements.\n for (let edge = 0; edge < numEdges; ++edge) {\n const sourceId = edgesBwd[edge];\n const targetId = edgesFwd[edge];\n if (keypoints[sourceId] && !keypoints[targetId]) {\n keypoints[targetId] = traverse(edge, keypoints[sourceId], targetId, scores, offsets, displacementsFwd);\n }\n }\n return keypoints;\n}\n\nfunction scoreIsMaximumInLocalWindow(keypointId, score: number, heatmapY: number, heatmapX: number, scores) {\n const [height, width]: [number, number] = scores.shape;\n let localMaximum = true;\n const yStart = Math.max(heatmapY - localMaximumRadius, 0);\n const yEnd = Math.min(heatmapY + localMaximumRadius + 1, height);\n for (let yCurrent = yStart; yCurrent < yEnd; ++yCurrent) {\n const xStart = Math.max(heatmapX - localMaximumRadius, 0);\n const xEnd = Math.min(heatmapX + localMaximumRadius + 1, width);\n for (let xCurrent = xStart; xCurrent < xEnd; ++xCurrent) {\n if (scores.get(yCurrent, xCurrent, keypointId) > score) {\n localMaximum = false;\n break;\n }\n }\n if (!localMaximum) break;\n }\n return localMaximum;\n}\n\nexport function buildPartWithScoreQueue(minConfidence, scores) {\n const [height, width, numKeypoints] = scores.shape;\n const queue = new utils.MaxHeap(height * width * numKeypoints, ({ score }) => score);\n for (let heatmapY = 0; heatmapY < height; ++heatmapY) {\n for (let heatmapX = 0; heatmapX < width; ++heatmapX) {\n for (let keypointId = 0; keypointId < numKeypoints; ++keypointId) {\n const score = scores.get(heatmapY, heatmapX, keypointId);\n // Only consider parts with score greater or equal to threshold as root candidates.\n if (score < minConfidence) continue;\n // Only consider keypoints whose score is maximum in a local window.\n if (scoreIsMaximumInLocalWindow(keypointId, score, heatmapY, heatmapX, scores)) queue.enqueue({ score, part: { heatmapY, heatmapX, id: keypointId } });\n }\n }\n }\n return queue;\n}\n\nfunction withinRadius(poses, { x, y }, keypointId) {\n return poses.some(({ keypoints }) => {\n const correspondingKeypoint = keypoints[keypointId]?.position;\n if (!correspondingKeypoint) return false;\n return utils.squaredDistance(y, x, correspondingKeypoint.y, correspondingKeypoint.x) <= squaredNmsRadius;\n });\n}\n\nfunction getInstanceScore(existingPoses, keypoints) {\n const notOverlappedKeypointScores = keypoints.reduce((result, { position, score }, keypointId) => {\n if (!withinRadius(existingPoses, position, keypointId)) result += score;\n return result;\n }, 0.0);\n return notOverlappedKeypointScores / keypoints.length;\n}\n\nexport function decode(offsets, scores, displacementsFwd, displacementsBwd, maxDetected, minConfidence) {\n const poses: { keypoints, box: Box, score: number }[] = [];\n const queue = buildPartWithScoreQueue(minConfidence, scores);\n // Generate at most maxDetected object instances per image in decreasing root part score order.\n while (poses.length < maxDetected && !queue.empty()) {\n // The top element in the queue is the next root candidate.\n const root = queue.dequeue();\n // Part-based non-maximum suppression: We reject a root candidate if it is within a disk of `nmsRadius` pixels from the corresponding part of a previously detected instance.\n // @ts-ignore this one is tree walk\n const rootImageCoords = utils.getImageCoords(root.part, outputStride, offsets);\n // @ts-ignore this one is tree walk\n if (withinRadius(poses, rootImageCoords, root.part.id)) continue;\n // Else start a new detection instance at the position of the root.\n let keypoints = decodePose(root, scores, offsets, displacementsFwd, displacementsBwd);\n keypoints = keypoints.filter((a) => a.score > minConfidence);\n const score = getInstanceScore(poses, keypoints);\n const box = utils.getBoundingBox(keypoints);\n if (score > minConfidence) poses.push({ keypoints, box, score: Math.round(100 * score) / 100 });\n }\n return poses;\n}\n\nexport async function predict(input: Tensor, config: Config): Promise {\n /** posenet is mostly obsolete\n * caching is not implemented\n */\n if (!model?.['executor']) return [];\n const res = tf.tidy(() => {\n if (!model.inputs[0].shape) return [];\n const resized = tf.image.resizeBilinear(input, [model.inputs[0].shape[2], model.inputs[0].shape[1]]);\n const normalized = tf.sub(tf.div(tf.cast(resized, 'float32'), 127.5), 1.0);\n const results: Tensor[] = model.execute(normalized, poseNetOutputs) as Tensor[];\n const results3d = results.map((y) => tf.squeeze(y, [0]));\n results3d[1] = tf.sigmoid(results3d[1]); // apply sigmoid on scores\n return results3d;\n });\n\n const buffers = await Promise.all(res.map((tensor: Tensor) => tensor.buffer()));\n for (const t of res) tf.dispose(t);\n\n const decoded = decode(buffers[0], buffers[1], buffers[2], buffers[3], config.body.maxDetected, config.body.minConfidence);\n if (!model.inputs[0].shape) return [];\n const scaled = utils.scalePoses(decoded, [input.shape[1], input.shape[2]], [model.inputs[0].shape[2], model.inputs[0].shape[1]]);\n return scaled;\n}\n\nexport async function load(config: Config): Promise {\n if (!model || env.initial) model = await loadModel(config.body.modelPath);\n else if (config.debug) log('cached model:', model['modelUrl']);\n return model;\n}\n", "/**\n * Image segmentation for body detection model\n *\n * Based on:\n * - [**Robust Video Matting**](https://github.com/PeterL1n/RobustVideoMatting)\n */\n\nimport { log } from '../util/util';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport { loadModel } from '../tfjs/load';\nimport { constants } from '../tfjs/constants';\nimport type { GraphModel, Tensor } from '../tfjs/types';\nimport type { Config } from '../config';\nimport { env } from '../util/env';\n\nlet model: GraphModel;\n\n// internal state varaibles\nconst outputNodes = ['fgr', 'pha', 'r1o', 'r2o', 'r3o', 'r4o'];\nconst t: Record = {}; // contains input tensor and recurrent states\nlet ratio = 0;\n\nfunction init(config: Config) {\n tf.dispose([t.r1i, t.r2i, t.r3i, t.r4i, t.downsample_ratio]);\n t.r1i = tf.tensor(0.0);\n t.r2i = tf.tensor(0.0);\n t.r3i = tf.tensor(0.0);\n t.r4i = tf.tensor(0.0);\n ratio = config.segmentation.ratio || 0.5;\n t.downsample_ratio = tf.tensor(ratio); // initialize downsample ratio\n}\n\nexport async function load(config: Config): Promise {\n if (!model || env.initial) model = await loadModel(config.segmentation.modelPath);\n else if (config.debug) log('cached model:', model['modelUrl']);\n init(config);\n return model;\n}\n\nconst normalize = (r: Tensor) => tf.tidy(() => {\n const squeeze = tf.squeeze(r, ([0]));\n const mul = tf.mul(squeeze, constants.tf255);\n const cast = tf.cast(mul, 'int32');\n return cast as Tensor;\n});\n\nfunction getRGBA(fgr: Tensor | null, pha: Tensor | null): Tensor { // gets rgba // either fgr or pha must be present\n const rgb = fgr\n ? normalize(fgr) // normalize and use value\n : tf.fill([pha!.shape[1] || 0, pha!.shape[2] || 0, 3], 255, 'int32'); // eslint-disable-line @typescript-eslint/no-non-null-assertion\n const a = pha\n ? normalize(pha) // normalize and use value\n : tf.fill([fgr!.shape[1] || 0, fgr!.shape[2] || 0, 1], 255, 'int32'); // eslint-disable-line @typescript-eslint/no-non-null-assertion\n const rgba = tf.concat([rgb, a], -1);\n tf.dispose([rgb, a]);\n return rgba;\n}\n\nfunction getState(state: Tensor): Tensor { // gets internal recurrent states\n return tf.tidy(() => {\n const r: Record = {};\n r.unstack = tf.unstack(state, -1);\n r.concat = tf.concat(r.unstack, 1);\n r.split = tf.split(r.concat, 4, 1);\n r.stack = tf.concat(r.split, 2);\n r.squeeze = tf.squeeze(r.stack, [0]);\n r.expand = tf.expandDims(r.squeeze, -1);\n r.add = tf.add(r.expand, 1);\n r.mul = tf.mul(r.add, 127.5);\n r.cast = tf.cast(r.mul, 'int32');\n r.tile = tf.tile(r.cast, [1, 1, 3]) as Tensor;\n r.alpha = tf.fill([r.tile.shape[0] || 0, r.tile.shape[1] || 0, 1], 255, 'int32');\n return tf.concat([r.tile, r.alpha], -1) as Tensor;\n });\n}\n\nexport async function predict(input: Tensor, config: Config): Promise {\n if (!model) model = await load(config);\n if (!model?.['executor']) return null;\n // const expand = tf.expandDims(input, 0);\n t.src = tf.div(input, 255);\n if (ratio !== config.segmentation.ratio) init(config); // reinitialize recurrent states if requested downsample ratio changed\n const [fgr, pha, r1o, r2o, r3o, r4o] = await model.executeAsync(t, outputNodes) as Tensor[]; // execute model\n let rgba: Tensor;\n switch (config.segmentation.mode || 'default') {\n case 'default':\n rgba = getRGBA(fgr, pha);\n break;\n case 'alpha':\n rgba = getRGBA(null, pha);\n break;\n case 'foreground':\n rgba = getRGBA(fgr, null);\n break;\n case 'state':\n rgba = getState(r1o); // can view any internal recurrent state r10, r20, r3o, r4o\n break;\n default:\n rgba = tf.tensor(0);\n }\n tf.dispose([t.src, fgr, pha, t.r1i, t.r2i, t.r3i, t.r4i]);\n [t.r1i, t.r2i, t.r3i, t.r4i] = [r1o, r2o, r3o, r4o]; // update recurrent states\n return rgba;\n}\n", "/**\n * Image segmentation for body detection model\n *\n * Based on:\n * - [**MediaPipe Selfie**](https://drive.google.com/file/d/1dCfozqknMa068vVsO2j_1FgZkW_e3VWv/preview)\n */\n\nimport { log } from '../util/util';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport { loadModel } from '../tfjs/load';\nimport { constants } from '../tfjs/constants';\nimport type { GraphModel, Tensor } from '../tfjs/types';\nimport type { Config } from '../config';\nimport { env } from '../util/env';\n\nlet model: GraphModel;\n\nexport async function load(config: Config): Promise {\n if (!model || env.initial) model = await loadModel(config.segmentation.modelPath);\n else if (config.debug) log('cached model:', model['modelUrl']);\n return model;\n}\n\nexport async function predict(input: Tensor, config: Config): Promise {\n if (!model) model = await load(config);\n if (!model?.['executor'] || !model?.inputs?.[0].shape) return null; // something is wrong with the model\n const t: Record = {};\n t.resize = tf.image.resizeBilinear(input, [model.inputs[0].shape ? model.inputs[0].shape[1] : 0, model.inputs[0].shape ? model.inputs[0].shape[2] : 0], false);\n t.norm = tf.div(t.resize, constants.tf255);\n t.res = model.execute(t.norm) as Tensor;\n t.squeeze = tf.squeeze(t.res, 0); // meet.shape:[1,256,256,1], selfie.shape:[1,144,256,2]\n t.alpha = tf.image.resizeBilinear(t.squeeze, [input.shape[1], input.shape[2]]); // model selfie has a single channel that we can use directly\n t.mul = tf.mul(t.alpha, constants.tf255);\n let rgba: Tensor;\n switch (config.segmentation.mode || 'default') {\n case 'default':\n t.input = tf.squeeze(input);\n t.concat = tf.concat([t.input, t.mul], -1);\n rgba = tf.cast(t.concat, 'int32'); // combined original with alpha\n break;\n case 'alpha':\n rgba = tf.cast(t.mul, 'int32'); // just get alpha value from model\n break;\n default:\n rgba = tf.tensor(0);\n }\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n return rgba;\n}\n", "/**\n * Age model implementation\n *\n * Based on: [**SSR-Net**](https://github.com/shamangary/SSR-Net)\n */\n\nimport { log, now } from '../util/util';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport { loadModel } from '../tfjs/load';\nimport { env } from '../util/env';\nimport { constants } from '../tfjs/constants';\nimport type { Config } from '../config';\nimport type { GraphModel, Tensor } from '../tfjs/types';\n\nlet model: GraphModel | null;\nconst last: { age: number }[] = [];\nlet lastCount = 0;\nlet lastTime = 0;\nlet skipped = Number.MAX_SAFE_INTEGER;\n\nexport async function load(config: Config) {\n if (env.initial) model = null;\n if (!model) model = await loadModel(config.face['ssrnet'].modelPathAge);\n else if (config.debug) log('cached model:', model['modelUrl']);\n return model;\n}\n\nexport async function predict(image: Tensor, config: Config, idx: number, count: number): Promise<{ age: number }> {\n if (!model) return { age: 0 };\n const skipFrame = skipped < (config.face['ssrnet']?.skipFrames || 0);\n const skipTime = (config.face['ssrnet']?.skipTime || 0) > (now() - lastTime);\n if (config.skipAllowed && skipFrame && skipTime && (lastCount === count) && last[idx]?.age && (last[idx]?.age > 0)) {\n skipped++;\n return last[idx];\n }\n skipped = 0;\n return new Promise(async (resolve) => {\n if (!model?.inputs || !model.inputs[0] || !model.inputs[0].shape) return;\n const t: Record = {};\n t.resize = tf.image.resizeBilinear(image, [model.inputs[0].shape[2], model.inputs[0].shape[1]], false);\n t.enhance = tf.mul(t.resize, constants.tf255);\n const obj = { age: 0 };\n if (config.face['ssrnet']?.enabled) t.age = model.execute(t.enhance) as Tensor;\n if (t.age) {\n const data = await t.age.data();\n obj.age = Math.trunc(10 * data[0]) / 10;\n }\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n last[idx] = obj;\n lastCount = count;\n lastTime = now();\n resolve(obj);\n });\n}\n", "/**\n * Gender model implementation\n *\n * Based on: [**SSR-Net**](https://github.com/shamangary/SSR-Net)\n */\n\nimport { log, now } from '../util/util';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport { loadModel } from '../tfjs/load';\nimport { constants } from '../tfjs/constants';\nimport type { Gender } from '../result';\nimport type { Config } from '../config';\nimport type { GraphModel, Tensor } from '../tfjs/types';\nimport { env } from '../util/env';\n\nlet model: GraphModel | null;\nconst last: { gender: Gender, genderScore: number }[] = [];\nlet lastCount = 0;\nlet lastTime = 0;\nlet skipped = Number.MAX_SAFE_INTEGER;\n\n// tuning values\nconst rgb = [0.2989, 0.5870, 0.1140]; // factors for red/green/blue colors when converting to grayscale\n\nexport async function load(config: Config) {\n if (env.initial) model = null;\n if (!model) model = await loadModel(config.face['ssrnet']?.modelPathGender);\n else if (config.debug) log('cached model:', model['modelUrl']);\n return model;\n}\n\nexport async function predict(image: Tensor, config: Config, idx, count): Promise<{ gender: Gender, genderScore: number }> {\n if (!model) return { gender: 'unknown', genderScore: 0 };\n const skipFrame = skipped < (config.face['ssrnet']?.skipFrames || 0);\n const skipTime = (config.face['ssrnet']?.skipTime || 0) > (now() - lastTime);\n if (config.skipAllowed && skipFrame && skipTime && (lastCount === count) && last[idx]?.gender && (last[idx]?.genderScore > 0)) {\n skipped++;\n return last[idx];\n }\n skipped = 0;\n return new Promise(async (resolve) => {\n if (!model?.inputs[0].shape) return;\n const t: Record = {};\n t.resize = tf.image.resizeBilinear(image, [model.inputs[0].shape[2], model.inputs[0].shape[1]], false);\n t.enhance = tf.tidy(() => {\n const [red, green, blue] = tf.split(t.resize, 3, 3);\n const redNorm = tf.mul(red, rgb[0]);\n const greenNorm = tf.mul(green, rgb[1]);\n const blueNorm = tf.mul(blue, rgb[2]);\n const grayscale = tf.addN([redNorm, greenNorm, blueNorm]);\n const normalize = tf.mul(tf.sub(grayscale, constants.tf05), 2); // range grayscale:-1..1\n return normalize;\n });\n const obj: { gender: Gender, genderScore: number } = { gender: 'unknown', genderScore: 0 };\n if (config.face['ssrnet']?.enabled) t.gender = model.execute(t.enhance) as Tensor;\n const data = await t.gender.data();\n obj.gender = data[0] > data[1] ? 'female' : 'male'; // returns two values 0..1, bigger one is prediction\n obj.genderScore = data[0] > data[1] ? (Math.trunc(100 * data[0]) / 100) : (Math.trunc(100 * data[1]) / 100);\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n last[idx] = obj;\n lastCount = count;\n lastTime = now();\n resolve(obj);\n });\n}\n", "/** TFJS custom backend registration */\n\nimport type { Human } from '../human';\nimport { log } from '../util/util';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport * as image from '../image/image';\nimport * as models from '../models';\nimport type { AnyCanvas } from '../exports';\n// import { env } from '../env';\n\nexport const config = {\n name: 'humangl',\n priority: 999,\n canvas: null as null | AnyCanvas,\n gl: null as null | WebGL2RenderingContext,\n extensions: [] as string[] | null,\n webGLattr: { // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.2\n alpha: false,\n antialias: false,\n premultipliedAlpha: false,\n preserveDrawingBuffer: false,\n depth: false,\n stencil: false,\n failIfMajorPerformanceCaveat: false, // default=true\n desynchronized: true, // default=undefined\n },\n};\n\nfunction extensions(): void {\n /*\n https://www.khronos.org/registry/webgl/extensions/\n https://webglreport.com/?v=2\n */\n const gl = config.gl;\n if (!gl) return;\n config.extensions = gl.getSupportedExtensions();\n // gl.getExtension('KHR_parallel_shader_compile');\n}\n\n/**\n * Registers custom WebGL2 backend to be used by Human library\n *\n * @returns void\n */\nexport function register(instance: Human): void {\n // force backend reload if gl context is not valid\n if (instance.config.backend !== 'humangl') return;\n if ((config.name in tf.engine().registry) && !config?.gl?.getParameter(config.gl.VERSION)) {\n log('humangl error: backend invalid context');\n models.reset(instance);\n /*\n log('resetting humangl backend');\n await tf.removeBackend(config.name);\n await register(instance); // re-register\n */\n }\n if (!tf.findBackend(config.name)) {\n try {\n config.canvas = image.canvas(100, 100);\n } catch (err) {\n log('humangl error: cannot create canvas:', err);\n return;\n }\n try {\n config.gl = config.canvas.getContext('webgl2', config.webGLattr);\n if (!config.gl) {\n log('humangl error: cannot get webgl context');\n return;\n }\n const glv2 = config.gl.getParameter(config.gl.VERSION).includes('2.0');\n if (!glv2) {\n log('backend override: using fallback webgl backend as webgl 2.0 is not detected');\n instance.config.backend = 'webgl';\n return;\n }\n if (config.canvas) {\n config.canvas.addEventListener('webglcontextlost', (e) => {\n log('humangl error:', e.type);\n log('possible browser memory leak using webgl or conflict with multiple backend registrations');\n instance.emit('error');\n throw new Error('backend error: webgl context lost');\n // log('resetting humangl backend');\n // env.initial = true;\n // models.reset(instance);\n // await tf.removeBackend(config.name);\n // await register(instance); // re-register\n });\n config.canvas.addEventListener('webglcontextrestored', (e) => {\n log('humangl error: context restored:', e);\n });\n config.canvas.addEventListener('webglcontextcreationerror', (e) => {\n log('humangl error: context create:', e);\n });\n }\n } catch (err) {\n log('humangl error: cannot get webgl context:', err);\n return;\n }\n try {\n tf.setWebGLContext(2, config.gl);\n } catch (err) {\n log('humangl error: cannot set webgl context:', err);\n return;\n }\n try {\n const ctx = new tf.GPGPUContext(config.gl);\n tf.registerBackend(config.name, () => new tf.MathBackendWebGL(ctx), config.priority);\n } catch (err) {\n log('humangl error: cannot register webgl backend:', err);\n return;\n }\n try {\n const kernels = tf.getKernelsForBackend('webgl');\n kernels.forEach((kernelConfig) => {\n const newKernelConfig = { ...kernelConfig, backendName: config.name };\n tf.registerKernel(newKernelConfig);\n });\n } catch (err) {\n log('humangl error: cannot update webgl backend registration:', err);\n return;\n }\n try {\n if (tf.env().flagRegistry.WEBGL_VERSION) tf.env().set('WEBGL_VERSION', 2);\n } catch (err) {\n log('humangl error: cannot set WebGL backend flags:', err);\n return;\n }\n extensions();\n const current = tf.backend().getGPGPUContext ? tf.backend().getGPGPUContext().gl : null;\n if (current) {\n if (instance.config.debug) log('humangl backend registered:', { webgl: current.getParameter(current.VERSION) as string, renderer: current.getParameter(current.RENDERER) as string });\n } else {\n log('humangl error: no current gl context:', current, config.gl);\n }\n }\n}\n", "/** TFJS backend initialization and customization */\n\nimport type { Human, Config } from '../human';\nimport { log, now } from '../util/util';\nimport { env } from '../util/env';\nimport * as humangl from './humangl';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport * as constants from './constants';\n\nfunction registerCustomOps(config: Config) {\n const newKernels: string[] = [];\n if (!env.kernels.includes('mod')) {\n const kernelMod = {\n kernelName: 'Mod',\n backendName: tf.getBackend(),\n kernelFunc: (op) => tf.tidy(() => tf.sub(op.inputs.a, tf.mul(tf.div(op.inputs.a, op.inputs.b), op.inputs.b))),\n };\n tf.registerKernel(kernelMod);\n env.kernels.push('mod');\n newKernels.push('mod');\n }\n if (!env.kernels.includes('floormod')) {\n const kernelFloorMod = {\n kernelName: 'FloorMod',\n backendName: tf.getBackend(),\n kernelFunc: (op) => tf.tidy(() => tf.add(tf.mul(tf.floorDiv(op.inputs.a / op.inputs.b), op.inputs.b), tf.mod(op.inputs.a, op.inputs.b))),\n };\n tf.registerKernel(kernelFloorMod);\n env.kernels.push('floormod');\n newKernels.push('floormod');\n }\n /*\n if (!env.kernels.includes('atan2') && config.softwareKernels) {\n const kernelAtan2 = {\n kernelName: 'Atan2',\n backendName: tf.getBackend(),\n kernelFunc: (op) => tf.tidy(() => {\n const backend = tf.getBackend();\n tf.setBackend('cpu');\n const t = tf.atan2(op.inputs.a, op.inputs.b);\n tf.setBackend(backend);\n return t;\n }),\n };\n if (config.debug) log('registered kernel:', 'atan2');\n log('registered kernel:', 'atan2');\n tf.registerKernel(kernelAtan2);\n env.kernels.push('atan2');\n newKernels.push('atan2');\n }\n */\n if (!env.kernels.includes('rotatewithoffset') && config.softwareKernels) {\n const kernelRotateWithOffset = {\n kernelName: 'RotateWithOffset',\n backendName: tf.getBackend(),\n kernelFunc: (op) => tf.tidy(() => {\n const backend = tf.getBackend();\n tf.setBackend('cpu');\n const t = tf.image.rotateWithOffset(op.inputs.image, op.attrs.radians, op.attrs.fillValue, op.attrs.center);\n tf.setBackend(backend);\n return t;\n }),\n };\n tf.registerKernel(kernelRotateWithOffset);\n env.kernels.push('rotatewithoffset');\n newKernels.push('rotatewithoffset');\n }\n if ((newKernels.length > 0) && config.debug) log('registered kernels:', newKernels);\n}\n\nlet defaultFlags: Record = {};\n\nexport async function check(instance: Human, force = false) {\n instance.state = 'backend';\n if (force || env.initial || (instance.config.backend && (instance.config.backend.length > 0) && (tf.getBackend() !== instance.config.backend))) {\n const timeStamp = now();\n\n if (instance.config.backend && instance.config.backend.length > 0) {\n // detect web worker\n // @ts-ignore ignore missing type for WorkerGlobalScope as that is the point\n if (typeof window === 'undefined' && typeof WorkerGlobalScope !== 'undefined' && instance.config.debug) {\n if (instance.config.debug) log('running inside web worker');\n }\n\n // force browser vs node backend\n if (env.browser && instance.config.backend === 'tensorflow') {\n if (instance.config.debug) log('override: backend set to tensorflow while running in browser');\n instance.config.backend = 'webgl';\n }\n if (env.node && (instance.config.backend === 'webgl' || instance.config.backend === 'humangl')) {\n if (instance.config.debug) log(`override: backend set to ${instance.config.backend} while running in nodejs`);\n instance.config.backend = 'tensorflow';\n }\n\n // handle webgpu\n if (env.browser && instance.config.backend === 'webgpu') {\n if (typeof navigator === 'undefined' || typeof navigator.gpu === 'undefined') {\n log('override: backend set to webgpu but browser does not support webgpu');\n instance.config.backend = 'webgl';\n } else {\n const adapter = await navigator.gpu.requestAdapter();\n if (instance.config.debug) log('enumerated webgpu adapter:', adapter);\n if (!adapter) {\n log('override: backend set to webgpu but browser reports no available gpu');\n instance.config.backend = 'webgl';\n } else {\n // @ts-ignore requestAdapterInfo is not in tslib\n const adapterInfo = 'requestAdapterInfo' in adapter ? await (adapter as GPUAdapter).requestAdapterInfo() : undefined;\n // if (adapter.features) adapter.features.forEach((feature) => log('webgpu features:', feature));\n log('webgpu adapter info:', adapterInfo);\n }\n }\n }\n\n // check available backends\n let available = Object.keys(tf.engine().registryFactory as Record);\n if (instance.config.backend === 'humangl' && !available.includes('humangl')) {\n humangl.register(instance);\n available = Object.keys(tf.engine().registryFactory as Record);\n }\n if (instance.config.debug) log('available backends:', available);\n\n if (!available.includes(instance.config.backend)) {\n log(`error: backend ${instance.config.backend} not found in registry`);\n instance.config.backend = env.node ? 'tensorflow' : 'webgl';\n if (instance.config.debug) log(`override: setting backend ${instance.config.backend}`);\n }\n\n if (instance.config.debug) log('setting backend:', [instance.config.backend]);\n\n // customize wasm\n if (instance.config.backend === 'wasm') {\n if (tf.env().flagRegistry.CANVAS2D_WILL_READ_FREQUENTLY) tf.env().set('CANVAS2D_WILL_READ_FREQUENTLY', true);\n if (instance.config.debug) log('wasm path:', instance.config.wasmPath);\n if (typeof tf.setWasmPaths !== 'undefined') tf.setWasmPaths(instance.config.wasmPath, instance.config.wasmPlatformFetch);\n else throw new Error('backend error: attempting to use wasm backend but wasm path is not set');\n let mt = false;\n let simd = false;\n try {\n mt = await tf.env().getAsync('WASM_HAS_MULTITHREAD_SUPPORT');\n simd = await tf.env().getAsync('WASM_HAS_SIMD_SUPPORT');\n if (instance.config.debug) log(`wasm execution: ${simd ? 'simd' : 'no simd'} ${mt ? 'multithreaded' : 'singlethreaded'}`);\n if (instance.config.debug && !simd) log('warning: wasm simd support is not enabled');\n } catch {\n log('wasm detection failed');\n }\n }\n\n try {\n await tf.setBackend(instance.config.backend);\n await tf.ready();\n } catch (err) {\n log('error: cannot set backend:', instance.config.backend, err);\n return false;\n }\n if (instance.config.debug) defaultFlags = JSON.parse(JSON.stringify(tf.env().flags));\n }\n\n // customize humangl\n if (tf.getBackend() === 'humangl' || tf.getBackend() === 'webgl') {\n if (tf.env().flagRegistry.WEBGL_USE_SHAPES_UNIFORMS) tf.env().set('WEBGL_USE_SHAPES_UNIFORMS', true); // default=false \n if (tf.env().flagRegistry.WEBGL_EXP_CONV) tf.env().set('WEBGL_EXP_CONV', true); // default=false \n // if (tf.env().flagRegistry['WEBGL_PACK_DEPTHWISECONV']) tf.env().set('WEBGL_PACK_DEPTHWISECONV', false); // default=true \n // if (tf.env().flagRegistry.USE_SETTIMEOUTCUSTOM) tf.env().set('USE_SETTIMEOUTCUSTOM', true); // default=false \n // if (tf.env().flagRegistry.CPU_HANDOFF_SIZE_THRESHOLD) tf.env().set('CPU_HANDOFF_SIZE_THRESHOLD', 1024); // default=1000\n // if (tf.env().flagRegistry['WEBGL_FORCE_F16_TEXTURES'] && !instance.config.object.enabled) tf.env().set('WEBGL_FORCE_F16_TEXTURES', true); // safe to use 16bit precision\n if (instance.config.debug && typeof instance.config.deallocate !== 'undefined' && instance.config.deallocate) { // hidden param\n log('changing webgl: WEBGL_DELETE_TEXTURE_THRESHOLD:', true);\n tf.env().set('WEBGL_DELETE_TEXTURE_THRESHOLD', 0);\n }\n }\n\n // customize webgpu\n if (tf.getBackend() === 'webgpu') {\n // if (tf.env().flagRegistry['WEBGPU_CPU_HANDOFF_SIZE_THRESHOLD']) tf.env().set('WEBGPU_CPU_HANDOFF_SIZE_THRESHOLD', 512);\n // if (tf.env().flagRegistry['WEBGPU_DEFERRED_SUBMIT_BATCH_SIZE']) tf.env().set('WEBGPU_DEFERRED_SUBMIT_BATCH_SIZE', 0);\n // if (tf.env().flagRegistry['WEBGPU_CPU_FORWARD']) tf.env().set('WEBGPU_CPU_FORWARD', true);\n }\n\n if (instance.config.debug) {\n const newFlags = tf.env().flags;\n const updatedFlags = {};\n for (const key of Object.keys(newFlags)) {\n if (defaultFlags[key] === newFlags[key]) continue;\n updatedFlags[key] = newFlags[key];\n }\n if (instance.config.debug && Object.keys(updatedFlags).length > 0) log('backend:', tf.getBackend(), 'flags:', updatedFlags);\n }\n\n if (instance.config.flags && Object.keys(instance.config.flags).length > 0) {\n if (instance.config.debug) log('flags:', instance.config['flags']);\n for (const [key, val] of Object.entries(instance.config.flags)) {\n tf.env().set(key, val);\n }\n }\n\n tf.enableProdMode();\n constants.init();\n instance.performance.initBackend = Math.trunc(now() - timeStamp);\n instance.config.backend = tf.getBackend();\n await env.updateBackend(); // update env on backend init\n registerCustomOps(instance.config);\n // await env.updateBackend(); // update env on backend init\n env.initial = false;\n }\n return true;\n}\n\n// register fake missing tfjs ops\nexport function fakeOps(kernelNames: string[], config) {\n // if (config.debug) log('registerKernel:', kernelNames);\n for (const kernelName of kernelNames) {\n const kernelConfig = {\n kernelName,\n backendName: config.backend,\n kernelFunc: () => { if (config.debug) log('kernelFunc', kernelName, config.backend); },\n // setupFunc: () => { if (config.debug) log('kernelFunc', kernelName, config.backend); },\n // disposeFunc: () => { if (config.debug) log('kernelFunc', kernelName, config.backend); },\n };\n tf.registerKernel(kernelConfig);\n }\n env.kernels = tf.getKernelsForBackend(tf.getBackend()).map((kernel) => (kernel.kernelName as string).toLowerCase()); // re-scan registered ops\n}\n", "/**\n * Module that implements helper draw functions, exposed as human.draw\n */\n\nimport { mergeDeep, now } from '../util/util';\nimport { env } from '../util/env';\nimport { getCanvasContext, rect } from './primitives';\nimport { options } from './options';\nimport { face } from './face';\nimport { body } from './body';\nimport { hand } from './hand';\nimport { object } from './object';\nimport { gesture } from './gesture';\nimport type { Result, PersonResult } from '../result';\nimport type { AnyCanvas, DrawOptions } from '../exports';\n\nlet drawTime = 0;\n\nexport { options } from './options';\nexport { face } from './face';\nexport { body } from './body';\nexport { hand } from './hand';\nexport { object } from './object';\nexport { gesture } from './gesture';\n\n/** draw combined person results instead of individual detection result objects */\nexport function person(inCanvas: AnyCanvas, result: PersonResult[], drawOptions?: Partial) {\n const localOptions: DrawOptions = mergeDeep(options, drawOptions);\n if (!result || !inCanvas) return;\n const ctx = getCanvasContext(inCanvas);\n if (!ctx) return;\n ctx.lineJoin = 'round';\n ctx.font = localOptions.font;\n\n for (let i = 0; i < result.length; i++) {\n if (localOptions.drawBoxes) {\n ctx.strokeStyle = localOptions.color;\n ctx.fillStyle = localOptions.color;\n rect(ctx, result[i].box[0], result[i].box[1], result[i].box[2], result[i].box[3], localOptions);\n if (localOptions.drawLabels) {\n const label = `person #${i}`;\n if (localOptions.shadowColor && localOptions.shadowColor !== '') {\n ctx.fillStyle = localOptions.shadowColor;\n ctx.fillText(label, result[i].box[0] + 3, 1 + result[i].box[1] + localOptions.lineHeight, result[i].box[2]);\n }\n ctx.fillStyle = localOptions.labelColor;\n ctx.fillText(label, result[i].box[0] + 2, 0 + result[i].box[1] + localOptions.lineHeight, result[i].box[2]);\n }\n ctx.stroke();\n }\n }\n}\n\n/** draw processed canvas */\nexport function canvas(input: AnyCanvas | HTMLImageElement | HTMLVideoElement, output: AnyCanvas) {\n if (!input || !output) return;\n const ctx = getCanvasContext(output);\n if (!ctx) return;\n ctx.drawImage(input, 0, 0);\n}\n\n/** meta-function that performs draw for: canvas, face, body, hand */\nexport async function all(inCanvas: AnyCanvas, result: Result, drawOptions?: Partial) {\n if (!result?.performance || !inCanvas) return null;\n const timeStamp = now();\n const localOptions = mergeDeep(options, drawOptions);\n const promise = Promise.all([\n face(inCanvas, result.face, localOptions),\n body(inCanvas, result.body, localOptions),\n hand(inCanvas, result.hand, localOptions),\n object(inCanvas, result.object, localOptions),\n gesture(inCanvas, result.gesture, localOptions), // gestures do not have buffering\n // person(inCanvas, result.persons, localOptions); // already included above\n ]);\n drawTime = env.perfadd ? drawTime + Math.round(now() - timeStamp) : Math.round(now() - timeStamp);\n result.performance.draw = drawTime;\n return promise;\n}\n", "import { log } from '../util/util';\nimport type { AnyCanvas } from '../exports';\nimport type { Point } from '../result';\nimport type { DrawOptions } from './options';\n\nexport const getCanvasContext = (input: AnyCanvas) => {\n if (!input) log('draw error: invalid canvas');\n else if (!input.getContext) log('draw error: canvas context not defined');\n else {\n const ctx = input.getContext('2d');\n if (!ctx) log('draw error: cannot get canvas context');\n else return ctx;\n }\n return null;\n};\n\nexport const rad2deg = (theta: number) => Math.round((theta * 180) / Math.PI);\n\nexport const colorDepth = (z: number | undefined, opt: DrawOptions): string => { // performance optimization needed\n if (!opt.useDepth || typeof z === 'undefined') return opt.color;\n const rgb = Uint8ClampedArray.from([127 + (2 * z), 127 - (2 * z), 255]);\n return `rgba(${rgb[0]}, ${rgb[1]}, ${rgb[2]}, ${opt.alpha})`;\n};\n\nexport function point(ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D, x: number, y: number, z: number | undefined, localOptions: DrawOptions) {\n ctx.fillStyle = colorDepth(z, localOptions);\n ctx.beginPath();\n ctx.arc(x, y, localOptions.pointSize, 0, 2 * Math.PI);\n ctx.fill();\n}\n\nexport function rect(ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D, x: number, y: number, width: number, height: number, localOptions: DrawOptions) {\n ctx.beginPath();\n ctx.lineWidth = localOptions.lineWidth;\n if (localOptions.useCurves) {\n const cx = (x + x + width) / 2;\n const cy = (y + y + height) / 2;\n ctx.ellipse(cx, cy, width / 2, height / 2, 0, 0, 2 * Math.PI);\n } else {\n ctx.moveTo(x + localOptions.roundRect, y);\n ctx.lineTo(x + width - localOptions.roundRect, y);\n ctx.quadraticCurveTo(x + width, y, x + width, y + localOptions.roundRect);\n ctx.lineTo(x + width, y + height - localOptions.roundRect);\n ctx.quadraticCurveTo(x + width, y + height, x + width - localOptions.roundRect, y + height);\n ctx.lineTo(x + localOptions.roundRect, y + height);\n ctx.quadraticCurveTo(x, y + height, x, y + height - localOptions.roundRect);\n ctx.lineTo(x, y + localOptions.roundRect);\n ctx.quadraticCurveTo(x, y, x + localOptions.roundRect, y);\n ctx.closePath();\n }\n ctx.stroke();\n}\n\nexport function lines(ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D, points: Point[], localOptions: DrawOptions) {\n if (points.length < 2) return;\n ctx.beginPath();\n ctx.moveTo(points[0][0], points[0][1]);\n for (const pt of points) {\n ctx.strokeStyle = colorDepth(pt[2] || 0, localOptions);\n ctx.lineTo(Math.trunc(pt[0]), Math.trunc(pt[1]));\n }\n ctx.stroke();\n if (localOptions.fillPolygons) {\n ctx.closePath();\n ctx.fill();\n }\n}\n\nexport function curves(ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D, points: Point[], localOptions: DrawOptions) {\n if (points.length < 2) return;\n ctx.lineWidth = localOptions.lineWidth;\n if (!localOptions.useCurves || points.length <= 2) {\n lines(ctx, points, localOptions);\n return;\n }\n ctx.moveTo(points[0][0], points[0][1]);\n for (let i = 0; i < points.length - 2; i++) {\n const xc = (points[i][0] + points[i + 1][0]) / 2;\n const yc = (points[i][1] + points[i + 1][1]) / 2;\n ctx.quadraticCurveTo(points[i][0], points[i][1], xc, yc);\n }\n ctx.quadraticCurveTo(points[points.length - 2][0], points[points.length - 2][1], points[points.length - 1][0], points[points.length - 1][1]);\n ctx.stroke();\n if (localOptions.fillPolygons) {\n ctx.closePath();\n ctx.fill();\n }\n}\n\nexport function arrow(ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D, from: Point, to: Point, radius = 5) {\n let angle;\n let x;\n let y;\n ctx.beginPath();\n ctx.moveTo(from[0], from[1]);\n ctx.lineTo(to[0], to[1]);\n angle = Math.atan2(to[1] - from[1], to[0] - from[0]);\n x = radius * Math.cos(angle) + to[0];\n y = radius * Math.sin(angle) + to[1];\n ctx.moveTo(x, y);\n angle += (1.0 / 3.0) * (2 * Math.PI);\n x = radius * Math.cos(angle) + to[0];\n y = radius * Math.sin(angle) + to[1];\n ctx.lineTo(x, y);\n angle += (1.0 / 3.0) * (2 * Math.PI);\n x = radius * Math.cos(angle) + to[0];\n y = radius * Math.sin(angle) + to[1];\n ctx.lineTo(x, y);\n ctx.closePath();\n ctx.stroke();\n ctx.fill();\n}\n", "/** Draw Options\n * - Accessed via `human.draw.options` or provided per each draw method as the drawOptions optional parameter\n */\nexport interface DrawOptions {\n /** draw line color */\n color: string,\n /** alpha value used for lines */\n alpha: number,\n /** label color */\n labelColor: string,\n /** label shadow color */\n shadowColor: string,\n /** label font */\n font: string,\n /** line spacing between labels */\n lineHeight: number,\n /** line width for drawn lines */\n lineWidth: number,\n /** size of drawn points */\n pointSize: number,\n /** draw rounded boxes by n pixels */\n roundRect: number,\n /** should points be drawn? */\n drawPoints: boolean,\n /** should labels be drawn? */\n drawLabels: boolean,\n /** should face attention keypoints be highlighted */\n drawAttention: boolean;\n /** should detected gestures be drawn? */\n drawGestures: boolean,\n /** should draw boxes around detection results? */\n drawBoxes: boolean,\n /** should draw polygons from detection points? */\n drawPolygons: boolean,\n /** should draw gaze arrows? */\n drawGaze: boolean,\n /** should fill polygons? */\n fillPolygons: boolean,\n /** use z-coordinate when available */\n useDepth: boolean,\n /** should lines be curved? */\n useCurves: boolean,\n}\n\n/** currently set draw options {@link DrawOptions} */\nexport const options: DrawOptions = {\n color: 'rgba(173, 216, 230, 0.6)' as string, // 'lightblue' with light alpha channel\n labelColor: 'rgba(173, 216, 230, 1)' as string, // 'lightblue' with dark alpha channel\n shadowColor: 'black' as string,\n alpha: 0.5 as number,\n font: 'small-caps 16px \"Segoe UI\"' as string,\n lineHeight: 18 as number,\n lineWidth: 4 as number,\n pointSize: 2 as number,\n roundRect: 8 as number,\n drawPoints: false as boolean,\n drawLabels: true as boolean,\n drawBoxes: true as boolean,\n drawAttention: true as boolean,\n drawGestures: true as boolean,\n drawPolygons: true as boolean,\n drawGaze: true as boolean,\n fillPolygons: false as boolean,\n useDepth: true as boolean,\n useCurves: false as boolean,\n};\n", "import { TRI468 as triangulation } from '../face/facemeshcoords';\nimport { mergeDeep } from '../util/util';\nimport { getCanvasContext, rad2deg, rect, point, lines, arrow } from './primitives';\nimport { options } from './options';\nimport * as facemeshConstants from '../face/constants';\nimport type { FaceResult } from '../result';\nimport type { AnyCanvas, DrawOptions } from '../exports';\n\nlet opt: DrawOptions;\n\nfunction drawLabels(f: FaceResult, ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D) {\n if (opt.drawLabels) {\n // silly hack since fillText does not suport new line\n const labels:string[] = [];\n labels.push(`face: ${Math.trunc(100 * f.score)}%`);\n if (f.genderScore) labels.push(`${f.gender || ''} ${Math.trunc(100 * f.genderScore)}%`);\n if (f.age) labels.push(`age: ${f.age || ''}`);\n if (f.iris) labels.push(`distance: ${f.iris}`);\n if (f.real) labels.push(`real: ${Math.trunc(100 * f.real)}%`);\n if (f.live) labels.push(`live: ${Math.trunc(100 * f.live)}%`);\n if (f.emotion && f.emotion.length > 0) {\n const emotion = f.emotion.map((a) => `${Math.trunc(100 * a.score)}% ${a.emotion}`);\n if (emotion.length > 3) emotion.length = 3;\n labels.push(emotion.join(' '));\n }\n if (f.rotation?.angle && f.rotation?.gaze) {\n if (f.rotation.angle.roll) labels.push(`roll: ${rad2deg(f.rotation.angle.roll)}\u00B0 yaw:${rad2deg(f.rotation.angle.yaw)}\u00B0 pitch:${rad2deg(f.rotation.angle.pitch)}\u00B0`);\n if (f.rotation.gaze.bearing) labels.push(`gaze: ${rad2deg(f.rotation.gaze.bearing)}\u00B0`);\n }\n if (labels.length === 0) labels.push('face');\n ctx.fillStyle = opt.color;\n for (let i = labels.length - 1; i >= 0; i--) {\n const x = Math.max(f.box[0], 0);\n const y = i * opt.lineHeight + f.box[1];\n if (opt.shadowColor && opt.shadowColor !== '') {\n ctx.fillStyle = opt.shadowColor;\n ctx.fillText(labels[i], x + 5, y + 16);\n }\n ctx.fillStyle = opt.labelColor;\n ctx.fillText(labels[i], x + 4, y + 15);\n }\n }\n}\n\nfunction drawIrisElipse(f: FaceResult, ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D) {\n // iris: array[center, left, top, right, bottom]\n if (f.annotations?.leftEyeIris && f.annotations?.leftEyeIris[0]) {\n ctx.strokeStyle = opt.useDepth ? 'rgba(255, 200, 255, 0.3)' : opt.color;\n ctx.beginPath();\n const sizeX = Math.abs(f.annotations.leftEyeIris[3][0] - f.annotations.leftEyeIris[1][0]) / 2;\n const sizeY = Math.abs(f.annotations.leftEyeIris[4][1] - f.annotations.leftEyeIris[2][1]) / 2;\n ctx.ellipse(f.annotations.leftEyeIris[0][0], f.annotations.leftEyeIris[0][1], sizeX, sizeY, 0, 0, 2 * Math.PI);\n ctx.stroke();\n if (opt.fillPolygons) {\n ctx.fillStyle = opt.useDepth ? 'rgba(255, 255, 200, 0.3)' : opt.color;\n ctx.fill();\n }\n }\n if (f.annotations?.rightEyeIris && f.annotations?.rightEyeIris[0]) {\n ctx.strokeStyle = opt.useDepth ? 'rgba(255, 200, 255, 0.3)' : opt.color;\n ctx.beginPath();\n const sizeX = Math.abs(f.annotations.rightEyeIris[3][0] - f.annotations.rightEyeIris[1][0]) / 2;\n const sizeY = Math.abs(f.annotations.rightEyeIris[4][1] - f.annotations.rightEyeIris[2][1]) / 2;\n ctx.ellipse(f.annotations.rightEyeIris[0][0], f.annotations.rightEyeIris[0][1], sizeX, sizeY, 0, 0, 2 * Math.PI);\n ctx.stroke();\n if (opt.fillPolygons) {\n ctx.fillStyle = opt.useDepth ? 'rgba(255, 255, 200, 0.3)' : opt.color;\n ctx.fill();\n }\n }\n}\n\nfunction drawGazeSpheres(f: FaceResult, ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D) {\n if (opt.drawGaze && f.rotation?.angle && typeof Path2D !== 'undefined') {\n ctx.strokeStyle = 'pink';\n const valX = (f.box[0] + f.box[2] / 2) - (f.box[3] * rad2deg(f.rotation.angle.yaw) / 90);\n const valY = (f.box[1] + f.box[3] / 2) + (f.box[2] * rad2deg(f.rotation.angle.pitch) / 90);\n const pathV = new Path2D(`\n M ${f.box[0] + f.box[2] / 2} ${f.box[1]}\n C\n ${valX} ${f.box[1]},\n ${valX} ${f.box[1] + f.box[3]},\n ${f.box[0] + f.box[2] / 2} ${f.box[1] + f.box[3]}\n `);\n const pathH = new Path2D(`\n M ${f.box[0]} ${f.box[1] + f.box[3] / 2}\n C \n ${f.box[0]} ${valY},\n ${f.box[0] + f.box[2]} ${valY},\n ${f.box[0] + f.box[2]} ${f.box[1] + f.box[3] / 2}\n `);\n ctx.stroke(pathH);\n ctx.stroke(pathV);\n }\n}\n\nfunction drawGazeArrows(f: FaceResult, ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D) {\n if (opt.drawGaze && f.rotation?.gaze.strength && f.rotation.gaze.bearing && f.annotations.leftEyeIris && f.annotations.rightEyeIris && f.annotations.leftEyeIris[0] && f.annotations.rightEyeIris[0]) {\n ctx.strokeStyle = 'pink';\n ctx.fillStyle = 'pink';\n const leftGaze = [\n f.annotations.leftEyeIris[0][0] + (Math.sin(f.rotation.gaze.bearing) * f.rotation.gaze.strength * f.box[3]),\n f.annotations.leftEyeIris[0][1] + (Math.cos(f.rotation.gaze.bearing) * f.rotation.gaze.strength * f.box[2]),\n ];\n arrow(ctx, [f.annotations.leftEyeIris[0][0], f.annotations.leftEyeIris[0][1]], [leftGaze[0], leftGaze[1]], 4);\n const rightGaze = [\n f.annotations.rightEyeIris[0][0] + (Math.sin(f.rotation.gaze.bearing) * f.rotation.gaze.strength * f.box[3]),\n f.annotations.rightEyeIris[0][1] + (Math.cos(f.rotation.gaze.bearing) * f.rotation.gaze.strength * f.box[2]),\n ];\n arrow(ctx, [f.annotations.rightEyeIris[0][0], f.annotations.rightEyeIris[0][1]], [rightGaze[0], rightGaze[1]], 4);\n }\n}\n\nfunction drawFacePolygons(f: FaceResult, ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D) {\n if (opt.drawPolygons && f.mesh.length >= 468) {\n ctx.lineWidth = 1;\n for (let i = 0; i < triangulation.length / 3; i++) {\n const points = [triangulation[i * 3 + 0], triangulation[i * 3 + 1], triangulation[i * 3 + 2]].map((index) => f.mesh[index]);\n lines(ctx, points, opt);\n }\n drawIrisElipse(f, ctx);\n }\n /*\n if (opt.drawPolygons && f.contours.length > 1) {\n ctx.lineWidth = 5;\n lines(ctx, f.contours, opt);\n }\n ctx.lineWidth = 1;\n */\n}\n\nfunction drawFacePoints(f: FaceResult, ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D) {\n if (opt.drawPoints && f.mesh.length >= 468) {\n for (let i = 0; i < f.mesh.length; i++) {\n point(ctx, f.mesh[i][0], f.mesh[i][1], f.mesh[i][2], opt);\n if (opt.drawAttention) {\n if (facemeshConstants.LANDMARKS_REFINEMENT_LIPS_CONFIG.includes(i)) point(ctx, f.mesh[i][0], f.mesh[i][1], (f.mesh[i][2] as number) + 127, opt);\n if (facemeshConstants.LANDMARKS_REFINEMENT_LEFT_EYE_CONFIG.includes(i)) point(ctx, f.mesh[i][0], f.mesh[i][1], (f.mesh[i][2] as number) - 127, opt);\n if (facemeshConstants.LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG.includes(i)) point(ctx, f.mesh[i][0], f.mesh[i][1], (f.mesh[i][2] as number) - 127, opt);\n }\n }\n }\n}\n\nfunction drawFaceBoxes(f: FaceResult, ctx) {\n if (opt.drawBoxes) {\n rect(ctx, f.box[0], f.box[1], f.box[2], f.box[3], opt);\n }\n}\n\n/** draw detected faces */\nexport function face(inCanvas: AnyCanvas, result: FaceResult[], drawOptions?: Partial) {\n opt = mergeDeep(options, drawOptions);\n if (!result || !inCanvas) return;\n const ctx = getCanvasContext(inCanvas);\n if (!ctx) return;\n ctx.font = opt.font;\n ctx.strokeStyle = opt.color;\n ctx.fillStyle = opt.color;\n for (const f of result) {\n drawFaceBoxes(f, ctx);\n drawLabels(f, ctx);\n if (f.mesh && f.mesh.length > 0) {\n drawFacePoints(f, ctx);\n drawFacePolygons(f, ctx);\n drawGazeSpheres(f, ctx);\n drawGazeArrows(f, ctx);\n }\n }\n}\n", "import { mergeDeep } from '../util/util';\nimport { getCanvasContext, rect, point, curves, colorDepth } from './primitives';\nimport { options } from './options';\nimport type { BodyResult } from '../result';\nimport type { AnyCanvas, DrawOptions } from '../exports';\n\n/** draw detected bodies */\nexport function body(inCanvas: AnyCanvas, result: BodyResult[], drawOptions?: Partial) {\n const localOptions: DrawOptions = mergeDeep(options, drawOptions);\n if (!result || !inCanvas) return;\n const ctx = getCanvasContext(inCanvas);\n if (!ctx) return;\n ctx.lineJoin = 'round';\n for (let i = 0; i < result.length; i++) {\n ctx.strokeStyle = localOptions.color;\n ctx.fillStyle = localOptions.color;\n ctx.lineWidth = localOptions.lineWidth;\n ctx.font = localOptions.font;\n if (localOptions.drawBoxes && result[i].box && result[i].box.length === 4) {\n rect(ctx, result[i].box[0], result[i].box[1], result[i].box[2], result[i].box[3], localOptions);\n if (localOptions.drawLabels) {\n if (localOptions.shadowColor && localOptions.shadowColor !== '') {\n ctx.fillStyle = localOptions.shadowColor;\n ctx.fillText(`body ${100 * result[i].score}%`, result[i].box[0] + 3, 1 + result[i].box[1] + localOptions.lineHeight, result[i].box[2]);\n }\n ctx.fillStyle = localOptions.labelColor;\n ctx.fillText(`body ${100 * result[i].score}%`, result[i].box[0] + 2, 0 + result[i].box[1] + localOptions.lineHeight, result[i].box[2]);\n }\n }\n if (localOptions.drawPoints && result[i].keypoints) {\n for (let pt = 0; pt < result[i].keypoints.length; pt++) {\n if (!result[i].keypoints[pt].score || (result[i].keypoints[pt].score === 0)) continue;\n ctx.fillStyle = colorDepth(result[i].keypoints[pt].position[2], localOptions);\n point(ctx, result[i].keypoints[pt].position[0], result[i].keypoints[pt].position[1], 0, localOptions);\n }\n }\n if (localOptions.drawLabels && result[i].keypoints) {\n ctx.font = localOptions.font;\n for (const pt of result[i].keypoints) {\n if (!pt.score || (pt.score === 0)) continue;\n ctx.fillStyle = colorDepth(pt.position[2], localOptions);\n ctx.fillText(`${pt.part} ${Math.trunc(100 * pt.score)}%`, pt.position[0] + 4, pt.position[1] + 4);\n }\n }\n if (localOptions.drawPolygons && result[i].keypoints && result[i].annotations) {\n for (const part of Object.values(result[i].annotations)) {\n for (const connected of part) curves(ctx, connected, localOptions);\n }\n }\n }\n}\n", "import { mergeDeep } from '../util/util';\nimport { getCanvasContext, rect, point, colorDepth } from './primitives';\nimport { options } from './options';\nimport type { HandResult } from '../result';\nimport type { AnyCanvas, DrawOptions, Point } from '../exports';\n\n/** draw detected hands */\nexport function hand(inCanvas: AnyCanvas, result: HandResult[], drawOptions?: Partial) {\n const localOptions: DrawOptions = mergeDeep(options, drawOptions);\n if (!result || !inCanvas) return;\n const ctx = getCanvasContext(inCanvas);\n if (!ctx) return;\n ctx.lineJoin = 'round';\n ctx.font = localOptions.font;\n for (const h of result) {\n if (localOptions.drawBoxes) {\n ctx.strokeStyle = localOptions.color;\n ctx.fillStyle = localOptions.color;\n rect(ctx, h.box[0], h.box[1], h.box[2], h.box[3], localOptions);\n if (localOptions.drawLabels) {\n if (localOptions.shadowColor && localOptions.shadowColor !== '') {\n ctx.fillStyle = localOptions.shadowColor;\n ctx.fillText(`hand:${Math.trunc(100 * h.score)}%`, h.box[0] + 3, 1 + h.box[1] + localOptions.lineHeight, h.box[2]); // can use h.label\n }\n ctx.fillStyle = localOptions.labelColor;\n ctx.fillText(`hand:${Math.trunc(100 * h.score)}%`, h.box[0] + 2, 0 + h.box[1] + localOptions.lineHeight, h.box[2]); // can use h.label\n }\n ctx.stroke();\n }\n if (localOptions.drawPoints) {\n if (h.keypoints && h.keypoints.length > 0) {\n for (const pt of h.keypoints) {\n ctx.fillStyle = colorDepth(pt[2], localOptions);\n point(ctx, pt[0], pt[1], 0, localOptions);\n }\n }\n }\n if (localOptions.drawLabels && h.annotations) {\n const addHandLabel = (part: Point[], title: string) => {\n if (!part || part.length === 0 || !part[0]) return;\n const z = part[part.length - 1][2] || -256;\n ctx.fillStyle = colorDepth(z, localOptions);\n ctx.fillText(title, part[part.length - 1][0] + 4, part[part.length - 1][1] + 4);\n };\n ctx.font = localOptions.font;\n addHandLabel(h.annotations.index, 'index');\n addHandLabel(h.annotations.middle, 'middle');\n addHandLabel(h.annotations.ring, 'ring');\n addHandLabel(h.annotations.pinky, 'pinky');\n addHandLabel(h.annotations.thumb, 'thumb');\n addHandLabel(h.annotations.palm, 'palm');\n }\n if (localOptions.drawPolygons && h.annotations) {\n const addHandLine = (part: Point[]) => {\n if (!part || part.length === 0 || !part[0]) return;\n for (let i = 0; i < part.length; i++) {\n ctx.beginPath();\n const z = part[i][2] || 0;\n ctx.strokeStyle = colorDepth(i * z, localOptions);\n ctx.moveTo(part[i > 0 ? i - 1 : 0][0], part[i > 0 ? i - 1 : 0][1]);\n ctx.lineTo(part[i][0], part[i][1]);\n ctx.stroke();\n }\n };\n ctx.lineWidth = localOptions.lineWidth;\n addHandLine(h.annotations.index);\n addHandLine(h.annotations.middle);\n addHandLine(h.annotations.ring);\n addHandLine(h.annotations.pinky);\n addHandLine(h.annotations.thumb);\n // addPart(h.annotations.palm);\n }\n }\n}\n", "import { mergeDeep } from '../util/util';\nimport { getCanvasContext, rect } from './primitives';\nimport { options } from './options';\nimport type { ObjectResult } from '../result';\nimport type { AnyCanvas, DrawOptions } from '../exports';\n\n/** draw detected objects */\nexport function object(inCanvas: AnyCanvas, result: ObjectResult[], drawOptions?: Partial) {\n const localOptions: DrawOptions = mergeDeep(options, drawOptions);\n if (!result || !inCanvas) return;\n const ctx = getCanvasContext(inCanvas);\n if (!ctx) return;\n ctx.lineJoin = 'round';\n ctx.font = localOptions.font;\n for (const h of result) {\n if (localOptions.drawBoxes) {\n ctx.strokeStyle = localOptions.color;\n ctx.fillStyle = localOptions.color;\n rect(ctx, h.box[0], h.box[1], h.box[2], h.box[3], localOptions);\n if (localOptions.drawLabels) {\n const label = `${h.label} ${Math.round(100 * h.score)}%`;\n if (localOptions.shadowColor && localOptions.shadowColor !== '') {\n ctx.fillStyle = localOptions.shadowColor;\n ctx.fillText(label, h.box[0] + 3, 1 + h.box[1] + localOptions.lineHeight, h.box[2]);\n }\n ctx.fillStyle = localOptions.labelColor;\n ctx.fillText(label, h.box[0] + 2, 0 + h.box[1] + localOptions.lineHeight, h.box[2]);\n }\n ctx.stroke();\n }\n }\n}\n", "import { mergeDeep } from '../util/util';\nimport { getCanvasContext } from './primitives';\nimport { options } from './options';\nimport type { GestureResult } from '../result';\nimport type { AnyCanvas, DrawOptions } from '../exports';\n\n/** draw detected gestures */\nexport function gesture(inCanvas: AnyCanvas, result: GestureResult[], drawOptions?: Partial) {\n const localOptions: DrawOptions = mergeDeep(options, drawOptions);\n if (!result || !inCanvas) return;\n if (localOptions.drawGestures) {\n const ctx = getCanvasContext(inCanvas);\n if (!ctx) return;\n ctx.font = localOptions.font;\n ctx.fillStyle = localOptions.color;\n let i = 1;\n for (let j = 0; j < result.length; j++) {\n let where: unknown[] = []; // what&where is a record\n let what: unknown[] = []; // what&where is a record\n [where, what] = Object.entries(result[j]);\n if ((what.length > 1) && ((what[1] as string).length > 0)) {\n const who = where[1] as number > 0 ? `#${where[1]}` : '';\n const label = `${where[0]} ${who}: ${what[1]}`;\n if (localOptions.shadowColor && localOptions.shadowColor !== '') {\n ctx.fillStyle = localOptions.shadowColor;\n ctx.fillText(label, 8, 2 + (i * localOptions.lineHeight));\n }\n ctx.fillStyle = localOptions.labelColor;\n ctx.fillText(label, 6, 0 + (i * localOptions.lineHeight));\n i += 1;\n }\n }\n }\n}\n", "import type { Tensor } from '../tfjs/types';\nimport type { FaceResult } from '../result';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport { meshAnnotations } from './facemeshcoords';\n\nconst expandFact = 0.1;\nconst alpha = 0.5;\n\n// point inclusion in polygon based on https://wrf.ecse.rpi.edu/Research/Short_Notes/pnpoly.html\nfunction insidePoly(x: number, y: number, polygon: { x: number, y: number }[]): boolean {\n let inside = false;\n let j = polygon.length - 1;\n for (let i = 0; i < polygon.length; j = i++) {\n if (((polygon[i].y > y) !== (polygon[j].y > y)) && (x < (polygon[j].x - polygon[i].x) * (y - polygon[i].y) / (polygon[j].y - polygon[i].y) + polygon[i].x)) inside = !inside;\n }\n return inside;\n}\n\nexport async function mask(face: FaceResult): Promise {\n if (!face.tensor) return face.tensor;\n if (!face.mesh || face.mesh.length < 100) return face.tensor;\n const width = face.tensor.shape[2] || 0;\n const height = face.tensor.shape[1] || 0;\n const buffer = await face.tensor.buffer();\n let silhouette: { x: number, y: number }[] = [];\n for (const pt of meshAnnotations.silhouette) silhouette.push({ x: (face.mesh[pt][0] - face.box[0]) / face.box[2], y: (face.mesh[pt][1] - face.box[1]) / face.box[3] }); // add all silhouette points scaled to local box\n if (expandFact && expandFact > 0) silhouette = silhouette.map((pt) => ({ x: pt.x > 0.5 ? pt.x + expandFact : pt.x - expandFact, y: pt.y > 0.5 ? pt.y + expandFact : pt.y - expandFact })); // expand silhouette\n for (let x = 0; x < width; x++) {\n for (let y = 0; y < height; y++) {\n const inside = insidePoly(x / width, y / width, silhouette);\n if (!inside) {\n buffer.set(alpha * buffer.get(0, y, x, 0), 0, y, x, 0);\n buffer.set(alpha * buffer.get(0, y, x, 1), 0, y, x, 1);\n buffer.set(alpha * buffer.get(0, y, x, 2), 0, y, x, 2);\n }\n }\n }\n const output = buffer.toTensor();\n tf.dispose(buffer);\n return output;\n}\n", "import type { Point, FaceResult } from '../result';\n\ntype Vector = [number, number, number];\n\nconst calculateGaze = (face: FaceResult): { bearing: number, strength: number } => {\n const radians = (pt1: Point, pt2: Point) => Math.atan2(pt1[1] - pt2[1], pt1[0] - pt2[0]); // function to calculate angle between any two points\n if (!face.annotations.rightEyeIris || !face.annotations.leftEyeIris) return { bearing: 0, strength: 0 };\n\n const offsetIris = [0, -0.1]; // iris center may not align with average of eye extremes\n const eyeRatio = 1; // factor to normalize changes x vs y\n\n const left = (face.mesh[33][2] || 0) > (face.mesh[263][2] || 0); // pick left or right eye depending which one is closer bazed on outsize point z axis\n const irisCenter = left ? face.mesh[473] : face.mesh[468];\n const eyeCenter = left // eye center is average of extreme points on x axis for both x and y, ignoring y extreme points as eyelids naturally open/close more when gazing up/down so relative point is less precise\n ? [(face.mesh[133][0] + face.mesh[33][0]) / 2, (face.mesh[133][1] + face.mesh[33][1]) / 2]\n : [(face.mesh[263][0] + face.mesh[362][0]) / 2, (face.mesh[263][1] + face.mesh[362][1]) / 2];\n const eyeSize = left // eye size is difference between extreme points for both x and y, used to normalize & squarify eye dimensions\n ? [face.mesh[133][0] - face.mesh[33][0], face.mesh[23][1] - face.mesh[27][1]]\n : [face.mesh[263][0] - face.mesh[362][0], face.mesh[253][1] - face.mesh[257][1]];\n const eyeDiff: Point = [ // x distance between extreme point and center point normalized with eye size\n (eyeCenter[0] - irisCenter[0]) / eyeSize[0] - offsetIris[0],\n eyeRatio * (irisCenter[1] - eyeCenter[1]) / eyeSize[1] - offsetIris[1],\n ];\n let strength = Math.sqrt((eyeDiff[0] * eyeDiff[0]) + (eyeDiff[1] * eyeDiff[1])); // vector length is a diagonal between two differences\n strength = Math.min(strength, face.boxRaw[2] / 2, face.boxRaw[3] / 2); // limit strength to half of box size to avoid clipping due to low precision\n const bearing = (radians([0, 0], eyeDiff) + (Math.PI / 2)) % Math.PI; // using eyeDiff instead eyeCenter/irisCenter combo due to manual adjustments and rotate clockwise 90degrees\n return { bearing, strength };\n};\n\nexport const calculateFaceAngle = (face: FaceResult, imageSize: [number, number]): {\n angle: { pitch: number, yaw: number, roll: number },\n matrix: [number, number, number, number, number, number, number, number, number],\n gaze: { bearing: number, strength: number },\n} => {\n // const degrees = (theta) => Math.abs(((theta * 180) / Math.PI) % 360);\n const normalize = (v: Vector): Vector => { // normalize vector\n const length = Math.sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]);\n v[0] /= length;\n v[1] /= length;\n v[2] /= length;\n return v;\n };\n const subVectors = (a: Vector, b: Vector): Vector => { // vector subtraction (a - b)\n const x = a[0] - b[0];\n const y = a[1] - b[1];\n const z = a[2] - b[2];\n return [x, y, z];\n };\n const crossVectors = (a: Vector, b: Vector): Vector => { // vector cross product (a x b)\n const x = a[1] * b[2] - a[2] * b[1];\n const y = a[2] * b[0] - a[0] * b[2];\n const z = a[0] * b[1] - a[1] * b[0];\n return [x, y, z];\n };\n // 3x3 rotation matrix to Euler angles based on https://www.geometrictools.com/Documentation/EulerAngles.pdf\n const rotationMatrixToEulerAngle = (r: number[]): { pitch: number, yaw: number, roll: number } => {\n const [r00, _r01, _r02, r10, r11, r12, r20, r21, r22] = r; // eslint-disable-line @typescript-eslint/no-unused-vars\n let thetaX: number;\n let thetaY: number;\n let thetaZ: number;\n if (r10 < 1) { // YZX calculation\n if (r10 > -1) {\n thetaZ = Math.asin(r10);\n thetaY = Math.atan2(-r20, r00);\n thetaX = Math.atan2(-r12, r11);\n } else {\n thetaZ = -Math.PI / 2;\n thetaY = -Math.atan2(r21, r22);\n thetaX = 0;\n }\n } else {\n thetaZ = Math.PI / 2;\n thetaY = Math.atan2(r21, r22);\n thetaX = 0;\n }\n if (Number.isNaN(thetaX)) thetaX = 0;\n if (Number.isNaN(thetaY)) thetaY = 0;\n if (Number.isNaN(thetaZ)) thetaZ = 0;\n return { pitch: 2 * -thetaX, yaw: 2 * -thetaY, roll: 2 * -thetaZ };\n };\n\n /*\n const meshToEulerAngle = (mesh) => { // simple Euler angle calculation based existing 3D mesh\n const radians = (a1, a2, b1, b2) => Math.atan2(b2 - a2, b1 - a1);\n return { // values are in radians in range of -pi/2 to pi/2 which is -90 to +90 degrees, value of 0 means center\n pitch: radians(mesh[10][1], mesh[10][2], mesh[152][1], mesh[152][2]), // looking at y,z of top and bottom points of the face // pitch is face move up/down\n yaw: radians(mesh[33][0], mesh[33][2], mesh[263][0], mesh[263][2]), // looking at x,z of outside corners of leftEye and rightEye // yaw is face turn left/right\n roll: radians(mesh[33][0], mesh[33][1], mesh[263][0], mesh[263][1]), // looking at x,y of outside corners of leftEye and rightEye // roll is face lean left/right\n };\n };\n */\n\n // initialize gaze and mesh\n const mesh = face.meshRaw;\n if (!mesh || mesh.length < 300) return { angle: { pitch: 0, yaw: 0, roll: 0 }, matrix: [1, 0, 0, 0, 1, 0, 0, 0, 1], gaze: { bearing: 0, strength: 0 } };\n\n const size = Math.max(face.boxRaw[2] * imageSize[0], face.boxRaw[3] * imageSize[1]) / 1.5;\n // top, bottom, left, right\n const pts: Point[] = [mesh[10], mesh[152], mesh[234], mesh[454]].map((pt) => [pt[0] * imageSize[0] / size, pt[1] * imageSize[1] / size, pt[2]] as Point); // make the xyz coordinates proportional, independent of the image/box size\n\n const yAxis = normalize(subVectors(pts[1] as Vector, pts[0] as Vector));\n let xAxis = normalize(subVectors(pts[3] as Vector, pts[2] as Vector));\n const zAxis = normalize(crossVectors(xAxis, yAxis));\n // adjust xAxis to make sure that all axes are perpendicular to each other\n xAxis = crossVectors(yAxis, zAxis);\n\n // Rotation Matrix from Axis Vectors - http://renderdan.blogspot.com/2006/05/rotation-matrix-from-axis-vectors.html\n // 3x3 rotation matrix is flatten to array in row-major order. Note that the rotation represented by this matrix is inverted.\n const matrix: [number, number, number, number, number, number, number, number, number] = [\n xAxis[0], xAxis[1], xAxis[2],\n yAxis[0], yAxis[1], yAxis[2],\n zAxis[0], zAxis[1], zAxis[2],\n ];\n const angle = rotationMatrixToEulerAngle(matrix);\n // const angle = meshToEulerAngle(mesh);\n\n // we have iris keypoints so we can calculate gaze direction\n const gaze = mesh.length === 478 ? calculateGaze(face) : { bearing: 0, strength: 0 };\n\n return { angle, matrix, gaze };\n};\n", "/**\n * Face algorithm implementation\n * Uses FaceMesh, Emotion and FaceRes models to create a unified pipeline\n */\n\nimport { log, now } from '../util/util';\nimport { env } from '../util/env';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport * as facemesh from './facemesh';\nimport * as emotion from '../gear/emotion';\nimport * as faceres from './faceres';\nimport * as mask from './mask';\nimport * as antispoof from './antispoof';\nimport * as liveness from './liveness';\nimport * as gear from '../gear/gear';\nimport * as ssrnetAge from '../gear/ssrnet-age';\nimport * as ssrnetGender from '../gear/ssrnet-gender';\nimport * as mobilefacenet from './mobilefacenet';\nimport * as insightface from './insightface';\nimport type { FaceResult, Emotion, Gender, Race } from '../result';\nimport type { Tensor } from '../tfjs/types';\nimport type { Human } from '../human';\nimport { calculateFaceAngle } from './angles';\n\ninterface DescRes { age: number, gender: Gender, genderScore: number, descriptor: number[], race?: { score: number, race: Race }[] }\n\nexport const detectFace = async (instance: Human /* instance of human */, input: Tensor): Promise => {\n // run facemesh, includes blazeface and iris\n let timeStamp: number = now();\n let ageRes: { age: number } | Promise<{ age: number }> | null;\n let gearRes: gear.GearType | Promise | null;\n let genderRes: { gender: string, genderScore: number } | Promise<{ gender: string, genderScore: number }> | null;\n let emotionRes: { score: number, emotion: Emotion }[] | Promise<{ score: number, emotion: Emotion }[]>;\n let mobilefacenetRes: number[] | Promise | null;\n let insightfaceRes: number[] | Promise | null;\n let antispoofRes: number | Promise | null;\n let livenessRes: number | Promise | null;\n let descRes: DescRes | Promise | null;\n\n const faceRes: FaceResult[] = [];\n instance.state = 'run:face';\n\n const faces = await facemesh.predict(input, instance.config);\n instance.performance.face = env.perfadd ? (instance.performance.face || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);\n if (!input.shape || input.shape.length !== 4) return [];\n if (!faces) return [];\n // for (const face of faces) {\n for (let i = 0; i < faces.length; i++) {\n instance.analyze('Get Face');\n\n // is something went wrong, skip the face\n // @ts-ignore possibly undefied\n if (!faces[i].tensor || faces[i].tensor.isDisposedInternal) {\n log('Face object is disposed:', faces[i].tensor);\n continue;\n }\n\n // optional face mask\n if (instance.config.face.detector?.mask) {\n const masked = await mask.mask(faces[i]);\n tf.dispose(faces[i].tensor);\n if (masked) faces[i].tensor = masked;\n }\n\n // calculate face angles\n const rotation = faces[i].mesh && (faces[i].mesh.length > 200) ? calculateFaceAngle(faces[i], [input.shape[2], input.shape[1]]) : null;\n\n // run emotion, inherits face from blazeface\n instance.analyze('Start Emotion:');\n if (instance.config.async) {\n emotionRes = instance.config.face.emotion?.enabled ? emotion.predict(faces[i].tensor || tf.tensor([]), instance.config, i, faces.length) : [];\n } else {\n instance.state = 'run:emotion';\n timeStamp = now();\n emotionRes = instance.config.face.emotion?.enabled ? await emotion.predict(faces[i].tensor || tf.tensor([]), instance.config, i, faces.length) : [];\n instance.performance.emotion = env.perfadd ? (instance.performance.emotion || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);\n }\n instance.analyze('End Emotion:');\n\n // run antispoof, inherits face from blazeface\n instance.analyze('Start AntiSpoof:');\n if (instance.config.async) {\n antispoofRes = instance.config.face.antispoof?.enabled ? antispoof.predict(faces[i].tensor || tf.tensor([]), instance.config, i, faces.length) : 0;\n } else {\n instance.state = 'run:antispoof';\n timeStamp = now();\n antispoofRes = instance.config.face.antispoof?.enabled ? await antispoof.predict(faces[i].tensor || tf.tensor([]), instance.config, i, faces.length) : 0;\n instance.performance.antispoof = env.perfadd ? (instance.performance.antispoof || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);\n }\n instance.analyze('End AntiSpoof:');\n\n // run liveness, inherits face from blazeface\n instance.analyze('Start Liveness:');\n if (instance.config.async) {\n livenessRes = instance.config.face.liveness?.enabled ? liveness.predict(faces[i].tensor || tf.tensor([]), instance.config, i, faces.length) : 0;\n } else {\n instance.state = 'run:liveness';\n timeStamp = now();\n livenessRes = instance.config.face.liveness?.enabled ? await liveness.predict(faces[i].tensor || tf.tensor([]), instance.config, i, faces.length) : 0;\n instance.performance.liveness = env.perfadd ? (instance.performance.antispoof || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);\n }\n instance.analyze('End Liveness:');\n\n // run gear, inherits face from blazeface\n instance.analyze('Start GEAR:');\n if (instance.config.async) {\n gearRes = instance.config.face.gear?.enabled ? gear.predict(faces[i].tensor || tf.tensor([]), instance.config, i, faces.length) : null;\n } else {\n instance.state = 'run:gear';\n timeStamp = now();\n gearRes = instance.config.face.gear?.enabled ? await gear.predict(faces[i].tensor || tf.tensor([]), instance.config, i, faces.length) : null;\n instance.performance.gear = Math.trunc(now() - timeStamp);\n }\n instance.analyze('End GEAR:');\n\n // run gear, inherits face from blazeface\n instance.analyze('Start SSRNet:');\n if (instance.config.async) {\n ageRes = instance.config.face['ssrnet']?.enabled ? ssrnetAge.predict(faces[i].tensor || tf.tensor([]), instance.config, i, faces.length) : null;\n genderRes = instance.config.face['ssrnet']?.enabled ? ssrnetGender.predict(faces[i].tensor || tf.tensor([]), instance.config, i, faces.length) : null;\n } else {\n instance.state = 'run:ssrnet';\n timeStamp = now();\n ageRes = instance.config.face['ssrnet']?.enabled ? await ssrnetAge.predict(faces[i].tensor || tf.tensor([]), instance.config, i, faces.length) : null;\n genderRes = instance.config.face['ssrnet']?.enabled ? await ssrnetGender.predict(faces[i].tensor || tf.tensor([]), instance.config, i, faces.length) : null;\n instance.performance.ssrnet = Math.trunc(now() - timeStamp);\n }\n instance.analyze('End SSRNet:');\n\n // run mobilefacenet alternative, inherits face from blazeface\n instance.analyze('Start MobileFaceNet:');\n if (instance.config.async) {\n mobilefacenetRes = instance.config.face['mobilefacenet']?.enabled ? mobilefacenet.predict(faces[i].tensor || tf.tensor([]), instance.config, i, faces.length) : null;\n } else {\n instance.state = 'run:mobilefacenet';\n timeStamp = now();\n mobilefacenetRes = instance.config.face['mobilefacenet']?.enabled ? await mobilefacenet.predict(faces[i].tensor || tf.tensor([]), instance.config, i, faces.length) : null;\n instance.performance.mobilefacenet = Math.trunc(now() - timeStamp);\n }\n instance.analyze('End MobileFaceNet:');\n\n // run insightface alternative, inherits face from blazeface\n instance.analyze('Start InsightFace:');\n if (instance.config.async) {\n insightfaceRes = instance.config.face['insightface']?.enabled ? insightface.predict(faces[i].tensor || tf.tensor([]), instance.config, i, faces.length) : null;\n } else {\n instance.state = 'run:mobilefacenet';\n timeStamp = now();\n insightfaceRes = instance.config.face['insightface']?.enabled ? await insightface.predict(faces[i].tensor || tf.tensor([]), instance.config, i, faces.length) : null;\n instance.performance.mobilefacenet = Math.trunc(now() - timeStamp);\n }\n instance.analyze('End InsightFace:');\n\n // run faceres, inherits face from blazeface\n instance.analyze('Start Description:');\n if (instance.config.async) {\n descRes = faceres.predict(faces[i].tensor || tf.tensor([]), instance.config, i, faces.length);\n } else {\n instance.state = 'run:description';\n timeStamp = now();\n descRes = await faceres.predict(faces[i].tensor || tf.tensor([]), instance.config, i, faces.length);\n instance.performance.description = env.perfadd ? (instance.performance.description || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);\n }\n instance.analyze('End Description:');\n\n // if async wait for results\n if (instance.config.async) {\n [ageRes, genderRes, emotionRes, mobilefacenetRes, insightfaceRes, descRes, gearRes, antispoofRes, livenessRes] = await Promise.all([ageRes, genderRes, emotionRes, mobilefacenetRes, insightfaceRes, descRes, gearRes, antispoofRes, livenessRes]);\n }\n instance.analyze('Finish Face:');\n\n if (instance.config.face['ssrnet']?.enabled && ageRes && genderRes) { // override age/gender if ssrnet model is used\n descRes = {\n ...(descRes as DescRes),\n age: (ageRes as { age: number}).age,\n gender: (genderRes as { gender: Gender, genderScore: number }).gender,\n genderScore: (genderRes as { gender: Gender, genderScore: number }).genderScore,\n };\n }\n if (instance.config.face.gear?.enabled && gearRes) { // override age/gender/race if gear model is used\n descRes = {\n ...(descRes as DescRes),\n age: (gearRes as gear.GearType).age,\n gender: (gearRes as gear.GearType).gender,\n genderScore: (gearRes as gear.GearType).genderScore,\n race: (gearRes as gear.GearType).race,\n };\n }\n if (instance.config.face['mobilefacenet']?.enabled && mobilefacenetRes) { // override descriptor if mobilefacenet model is used\n (descRes as DescRes).descriptor = mobilefacenetRes as number[];\n }\n\n if (instance.config.face['insightface']?.enabled && insightfaceRes) { // override descriptor if insightface model is used\n (descRes as DescRes).descriptor = insightfaceRes as number[];\n }\n\n // calculate iris distance\n // iris: array[ center, left, top, right, bottom]\n if (!instance.config.face.iris?.enabled) {\n // if (faces[i]?.annotations?.leftEyeIris) delete faces[i].annotations.leftEyeIris;\n // if (faces[i]?.annotations?.rightEyeIris) delete faces[i].annotations.rightEyeIris;\n }\n const irisSize = (faces[i]?.annotations?.leftEyeIris?.[0] && faces[i]?.annotations?.rightEyeIris?.[0]\n && (faces[i].annotations.leftEyeIris.length > 0) && (faces[i].annotations.rightEyeIris.length > 0)\n && (faces[i].annotations.leftEyeIris[0] !== null) && (faces[i].annotations.rightEyeIris[0] !== null))\n ? Math.max(Math.abs(faces[i].annotations.leftEyeIris[3][0] - faces[i].annotations.leftEyeIris[1][0]), Math.abs(faces[i].annotations.rightEyeIris[4][1] - faces[i].annotations.rightEyeIris[2][1])) / input.shape[2]\n : 0; // note: average human iris size is 11.7mm\n\n // optionally return tensor\n const tensor = instance.config.face.detector?.return ? tf.squeeze(faces[i].tensor) : null;\n // dispose original face tensor\n tf.dispose(faces[i].tensor);\n // delete temp face image\n if (faces[i].tensor) delete faces[i].tensor;\n // combine results\n const res: FaceResult = {\n ...faces[i],\n id: i,\n };\n if ((descRes as DescRes).age) res.age = (descRes as DescRes).age;\n if ((descRes as DescRes).gender) res.gender = (descRes as DescRes).gender;\n if ((descRes as DescRes).genderScore) res.genderScore = (descRes as DescRes).genderScore;\n if ((descRes as DescRes).descriptor) res.embedding = (descRes as DescRes).descriptor;\n if ((descRes as DescRes).race) res.race = (descRes as DescRes).race as { score: number, race: Race }[];\n if (emotionRes) res.emotion = emotionRes as { score: number, emotion: Emotion }[];\n if (antispoofRes) res.real = antispoofRes as number;\n if (livenessRes) res.live = livenessRes as number;\n if (irisSize && irisSize !== 0) res.iris = Math.trunc(500 / irisSize / 11.7) / 100;\n if (rotation) res.rotation = rotation;\n if (tensor) res.tensor = tensor;\n faceRes.push(res);\n instance.analyze('End Face');\n }\n instance.analyze('End FaceMesh:');\n if (instance.config.async) {\n if (instance.performance.face) delete instance.performance.face;\n if (instance.performance.age) delete instance.performance.age;\n if (instance.performance.gender) delete instance.performance.gender;\n if (instance.performance.emotion) delete instance.performance.emotion;\n }\n return faceRes;\n};\n", "/**\n * Gesture detection algorithm\n */\n\nimport type { GestureResult, BodyResult, FaceResult, HandResult, Point } from '../result';\nimport * as fingerPose from '../hand/fingerpose';\n\n/** face gesture type */\nexport type FaceGesture =\n `facing ${'left' | 'center' | 'right'}`\n | `blink ${'left' | 'right'} eye`\n | `mouth ${number}% open`\n | `head ${'up' | 'down'}`;\n\n/** iris gesture type */\nexport type IrisGesture =\n 'facing center'\n | `looking ${'left' | 'right' | 'up' | 'down'}`\n | 'looking center';\n\n/** body gesture type */\nexport type BodyGesture =\n `leaning ${'left' | 'right'}`\n | `raise ${'left' | 'right'} hand`\n | 'i give up';\n\n/** hand gesture type */\nexport type HandGesture =\n `${'thumb' | 'index' | 'middle' | 'ring' | 'pinky'} forward`\n | `${'thumb' | 'index' | 'middle' | 'ring' | 'pinky'} up`\n | 'victory'\n | 'thumbs up';\n\nexport const body = (res: BodyResult[]): GestureResult[] => {\n if (!res) return [];\n const gestures: { body: number, gesture: BodyGesture }[] = [];\n for (let i = 0; i < res.length; i++) {\n // raising hands\n const leftWrist = res[i].keypoints.find((a) => (a.part === 'leftWrist'));\n const rightWrist = res[i].keypoints.find((a) => (a.part === 'rightWrist'));\n const nose = res[i].keypoints.find((a) => (a.part === 'nose'));\n if (nose && leftWrist && rightWrist && (leftWrist.position[1] < nose.position[1]) && (rightWrist.position[1] < nose.position[1])) gestures.push({ body: i, gesture: 'i give up' });\n else if (nose && leftWrist && (leftWrist.position[1] < nose.position[1])) gestures.push({ body: i, gesture: 'raise left hand' });\n else if (nose && rightWrist && (rightWrist.position[1] < nose.position[1])) gestures.push({ body: i, gesture: 'raise right hand' });\n\n // leaning\n const leftShoulder = res[i].keypoints.find((a) => (a.part === 'leftShoulder'));\n const rightShoulder = res[i].keypoints.find((a) => (a.part === 'rightShoulder'));\n if (leftShoulder && rightShoulder && Math.abs(leftShoulder.positionRaw[1] - rightShoulder.positionRaw[1]) > 0.1) {\n gestures.push({ body: i, gesture: `leaning ${(leftShoulder.position[1] > rightShoulder.position[1]) ? 'left' : 'right'}` });\n }\n }\n return gestures;\n};\n\nexport const face = (res: FaceResult[]): GestureResult[] => {\n if (!res) return [];\n const gestures: { face: number, gesture: FaceGesture }[] = [];\n for (let i = 0; i < res.length; i++) {\n if (res[i].mesh && res[i].mesh.length > 450) {\n const zDiff = (res[i].mesh[33][2] || 0) - (res[i].mesh[263][2] || 0);\n const xDiff = res[i].mesh[33][0] - res[i].mesh[263][0];\n if (Math.abs(zDiff / xDiff) <= 0.15) gestures.push({ face: i, gesture: 'facing center' });\n else gestures.push({ face: i, gesture: `facing ${zDiff < 0 ? 'left' : 'right'}` });\n const openLeft = Math.abs(res[i].mesh[374][1] - res[i].mesh[386][1]) / Math.abs(res[i].mesh[443][1] - res[i].mesh[450][1]); // center of eye inner lid y coord div center of wider eye border y coord\n if (openLeft < 0.2) gestures.push({ face: i, gesture: 'blink left eye' });\n const openRight = Math.abs(res[i].mesh[145][1] - res[i].mesh[159][1]) / Math.abs(res[i].mesh[223][1] - res[i].mesh[230][1]); // center of eye inner lid y coord div center of wider eye border y coord\n if (openRight < 0.2) gestures.push({ face: i, gesture: 'blink right eye' });\n const mouthOpen = Math.min(100, 500 * Math.abs(res[i].mesh[13][1] - res[i].mesh[14][1]) / Math.abs(res[i].mesh[10][1] - res[i].mesh[152][1]));\n if (mouthOpen > 10) gestures.push({ face: i, gesture: `mouth ${Math.trunc(mouthOpen)}% open` });\n const chinDepth = res[i].mesh[152][2] || 0;\n if (Math.abs(chinDepth) > 10) gestures.push({ face: i, gesture: `head ${chinDepth < 0 ? 'up' : 'down'}` });\n }\n }\n return gestures;\n};\n\nexport const iris = (res: FaceResult[]): GestureResult[] => {\n if (!res) return [];\n const gestures: { iris: number, gesture: IrisGesture }[] = [];\n for (let i = 0; i < res.length; i++) {\n if (!res[i].annotations?.leftEyeIris?.[0] || !res[i].annotations?.rightEyeIris?.[0]) continue;\n const sizeXLeft = res[i].annotations.leftEyeIris[3][0] - res[i].annotations.leftEyeIris[1][0];\n const sizeYLeft = res[i].annotations.leftEyeIris[4][1] - res[i].annotations.leftEyeIris[2][1];\n const areaLeft = Math.abs(sizeXLeft * sizeYLeft);\n\n const sizeXRight = res[i].annotations.rightEyeIris[3][0] - res[i].annotations.rightEyeIris[1][0];\n const sizeYRight = res[i].annotations.rightEyeIris[4][1] - res[i].annotations.rightEyeIris[2][1];\n const areaRight = Math.abs(sizeXRight * sizeYRight);\n\n let center = false;\n const difference = Math.abs(areaLeft - areaRight) / Math.max(areaLeft, areaRight);\n if (difference < 0.25) {\n center = true;\n gestures.push({ iris: i, gesture: 'facing center' });\n }\n\n const leftIrisCenterX = Math.abs(res[i].mesh[263][0] - res[i].annotations.leftEyeIris[0][0]) / res[i].box[2];\n const rightIrisCenterX = Math.abs(res[i].mesh[33][0] - res[i].annotations.rightEyeIris[0][0]) / res[i].box[2];\n if (leftIrisCenterX > 0.06 || rightIrisCenterX > 0.06) center = false;\n if (leftIrisCenterX > rightIrisCenterX) { // check eye with bigger offset\n if (leftIrisCenterX > 0.05) gestures.push({ iris: i, gesture: 'looking right' });\n } else {\n if (rightIrisCenterX > 0.05) gestures.push({ iris: i, gesture: 'looking left' });\n }\n\n const rightIrisCenterY = Math.abs(res[i].mesh[145][1] - res[i].annotations.rightEyeIris[0][1]) / res[i].box[3];\n const leftIrisCenterY = Math.abs(res[i].mesh[374][1] - res[i].annotations.leftEyeIris[0][1]) / res[i].box[3];\n if (leftIrisCenterY < 0.01 || rightIrisCenterY < 0.01 || leftIrisCenterY > 0.022 || rightIrisCenterY > 0.022) center = false;\n if (leftIrisCenterY < 0.01 || rightIrisCenterY < 0.01) gestures.push({ iris: i, gesture: 'looking down' });\n if (leftIrisCenterY > 0.022 || rightIrisCenterY > 0.022) gestures.push({ iris: i, gesture: 'looking up' });\n\n // still center;\n if (center) gestures.push({ iris: i, gesture: 'looking center' });\n }\n return gestures;\n};\n\nexport const hand = (res: HandResult[]): GestureResult[] => {\n if (!res) return [];\n const gestures: { hand: number, gesture: HandGesture }[] = [];\n for (let i = 0; i < res.length; i++) {\n const fingers: { name: string, position: Point }[] = [];\n if (res[i].annotations) {\n for (const [finger, pos] of Object.entries(res[i].annotations)) {\n if (finger !== 'palmBase' && Array.isArray(pos) && pos[0]) fingers.push({ name: finger.toLowerCase(), position: pos[0] }); // get tip of each finger\n }\n }\n if (fingers && fingers.length > 0) {\n const closest = fingers.reduce((best, a) => ((best.position[2] || 0) < (a.position[2] || 0) ? best : a));\n gestures.push({ hand: i, gesture: `${closest.name} forward` as HandGesture });\n const highest = fingers.reduce((best, a) => (best.position[1] < a.position[1] ? best : a));\n gestures.push({ hand: i, gesture: `${highest.name} up` as HandGesture });\n }\n if (res[i].keypoints) {\n const poses = fingerPose.match(res[i].keypoints);\n for (const pose of poses) gestures.push({ hand: i, gesture: pose.name as HandGesture });\n }\n }\n return gestures;\n};\n", "/**\n * Results interpolation for smoothening of video detection results inbetween detected frames\n */\n\nimport type { Result, FaceResult, BodyResult, HandResult, ObjectResult, PersonResult, Box, Point, BodyLandmark, BodyAnnotation } from '../result';\nimport type { Config } from '../config';\n\nimport * as moveNetCoords from '../body/movenetcoords';\nimport * as blazePoseCoords from '../body/blazeposecoords';\nimport * as efficientPoseCoords from '../body/efficientposecoords';\nimport { now } from './util';\nimport { env } from './env';\n\nconst bufferedResult: Result = { face: [], body: [], hand: [], gesture: [], object: [], persons: [], performance: {}, timestamp: 0, error: null };\nlet interpolateTime = 0;\n\nexport function calc(newResult: Result, config: Config): Result {\n const t0 = now();\n if (!newResult) return { face: [], body: [], hand: [], gesture: [], object: [], persons: [], performance: {}, timestamp: 0, error: null };\n // each record is only updated using deep clone when number of detected record changes, otherwise it will converge by itself\n // otherwise bufferedResult is a shallow clone of result plus updated local calculated values\n // thus mixing by-reference and by-value assignments to minimize memory operations\n\n const elapsed = Date.now() - newResult.timestamp;\n\n /* curve fitted: buffer = 8 - ln(delay)\n interpolation formula: current = ((buffer - 1) * previous + live) / buffer\n - at 50ms delay buffer = ~4.1 => 28% towards live data\n - at 250ms delay buffer = ~2.5 => 40% towards live data\n - at 500ms delay buffer = ~1.8 => 55% towards live data\n - at 750ms delay buffer = ~1.4 => 71% towards live data\n - at 1sec delay buffer = 1 which means live data is used\n */\n const bufferedFactor = elapsed < 1000 ? 8 - Math.log(elapsed + 1) : 1;\n\n if (newResult.canvas) bufferedResult.canvas = newResult.canvas;\n if (newResult.error) bufferedResult.error = newResult.error;\n\n // interpolate body results\n if (!bufferedResult.body || (newResult.body.length !== bufferedResult.body.length)) {\n bufferedResult.body = JSON.parse(JSON.stringify(newResult.body)) as BodyResult[]; // deep clone once\n } else {\n for (let i = 0; i < newResult.body.length; i++) {\n const box = newResult.body[i].box // update box\n .map((newBoxCoord, j) => ((bufferedFactor - 1) * bufferedResult.body[i].box[j] + newBoxCoord) / bufferedFactor) as Box;\n const boxRaw = newResult.body[i].boxRaw // update boxRaw\n .map((newBoxCoord, j) => ((bufferedFactor - 1) * bufferedResult.body[i].boxRaw[j] + newBoxCoord) / bufferedFactor) as Box;\n const keypoints = (newResult.body[i].keypoints // update keypoints\n .map((newKpt, j) => ({\n score: newKpt.score,\n part: newKpt.part,\n position: [\n bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].position[0] || 0) + (newKpt.position[0] || 0)) / bufferedFactor : newKpt.position[0],\n bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].position[1] || 0) + (newKpt.position[1] || 0)) / bufferedFactor : newKpt.position[1],\n bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].position[2] || 0) + (newKpt.position[2] || 0)) / bufferedFactor : newKpt.position[2],\n ],\n positionRaw: [\n bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].positionRaw[0] || 0) + (newKpt.positionRaw[0] || 0)) / bufferedFactor : newKpt.positionRaw[0],\n bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].positionRaw[1] || 0) + (newKpt.positionRaw[1] || 0)) / bufferedFactor : newKpt.positionRaw[1],\n bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].positionRaw[2] || 0) + (newKpt.positionRaw[2] || 0)) / bufferedFactor : newKpt.positionRaw[2],\n ],\n distance: [\n bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].distance?.[0] || 0) + (newKpt.distance?.[0] || 0)) / bufferedFactor : newKpt.distance?.[0],\n bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].distance?.[1] || 0) + (newKpt.distance?.[1] || 0)) / bufferedFactor : newKpt.distance?.[1],\n bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].distance?.[2] || 0) + (newKpt.distance?.[2] || 0)) / bufferedFactor : newKpt.distance?.[2],\n ],\n }))) as { score: number, part: BodyLandmark, position: [number, number, number?], positionRaw: [number, number, number?] }[];\n\n const annotations: Record = {} as Record; // recreate annotations\n let coords = { connected: {} };\n if (config.body.modelPath?.includes('efficientpose')) coords = efficientPoseCoords;\n else if (config.body.modelPath?.includes('blazepose')) coords = blazePoseCoords;\n else if (config.body.modelPath?.includes('movenet')) coords = moveNetCoords;\n for (const [name, indexes] of Object.entries(coords.connected as Record)) {\n const pt: Point[][] = [];\n for (let j = 0; j < indexes.length - 1; j++) {\n const pt0 = keypoints.find((kp) => kp.part === indexes[j]);\n const pt1 = keypoints.find((kp) => kp.part === indexes[j + 1]);\n // if (pt0 && pt1 && pt0.score > (config.body.minConfidence || 0) && pt1.score > (config.body.minConfidence || 0)) pt.push([pt0.position, pt1.position]);\n if (pt0 && pt1) pt.push([pt0.position, pt1.position]);\n }\n annotations[name] = pt;\n }\n bufferedResult.body[i] = { ...newResult.body[i], box, boxRaw, keypoints, annotations }; // shallow clone plus updated values\n }\n }\n\n // interpolate hand results\n if (!bufferedResult.hand || (newResult.hand.length !== bufferedResult.hand.length)) {\n bufferedResult.hand = JSON.parse(JSON.stringify(newResult.hand)); // deep clone once\n } else {\n for (let i = 0; i < newResult.hand.length; i++) {\n const box = (newResult.hand[i].box// update box\n .map((b, j) => ((bufferedFactor - 1) * bufferedResult.hand[i].box[j] + b) / bufferedFactor)) as Box;\n const boxRaw = (newResult.hand[i].boxRaw // update boxRaw\n .map((b, j) => ((bufferedFactor - 1) * bufferedResult.hand[i].boxRaw[j] + b) / bufferedFactor)) as Box;\n if (bufferedResult.hand[i].keypoints.length !== newResult.hand[i].keypoints.length) bufferedResult.hand[i].keypoints = newResult.hand[i].keypoints; // reset keypoints as previous frame did not have them\n const keypoints = newResult.hand[i].keypoints && newResult.hand[i].keypoints.length > 0 ? newResult.hand[i].keypoints // update landmarks\n .map((landmark, j) => landmark\n .map((coord, k) => (((bufferedFactor - 1) * (bufferedResult.hand[i].keypoints[j][k] || 1) + (coord || 0)) / bufferedFactor)) as Point)\n : [];\n let annotations = {};\n if (Object.keys(bufferedResult.hand[i].annotations).length !== Object.keys(newResult.hand[i].annotations).length) {\n bufferedResult.hand[i].annotations = newResult.hand[i].annotations; // reset annotations as previous frame did not have them\n annotations = bufferedResult.hand[i].annotations;\n } else if (newResult.hand[i].annotations) {\n for (const key of Object.keys(newResult.hand[i].annotations)) { // update annotations\n annotations[key] = newResult.hand[i]?.annotations?.[key]?.[0]\n ? newResult.hand[i].annotations[key]\n .map((val, j: number) => val\n .map((coord: number, k: number) => ((bufferedFactor - 1) * bufferedResult.hand[i].annotations[key][j][k] + coord) / bufferedFactor))\n : null;\n }\n }\n bufferedResult.hand[i] = { ...newResult.hand[i], box, boxRaw, keypoints, annotations: annotations as HandResult['annotations'] }; // shallow clone plus updated values\n }\n }\n\n // interpolate face results\n if (!bufferedResult.face || (newResult.face.length !== bufferedResult.face.length)) {\n bufferedResult.face = JSON.parse(JSON.stringify(newResult.face)) as FaceResult[]; // deep clone once\n } else {\n for (let i = 0; i < newResult.face.length; i++) {\n const box = (newResult.face[i].box // update box\n .map((b, j) => ((bufferedFactor - 1) * bufferedResult.face[i].box[j] + b) / bufferedFactor)) as Box;\n const boxRaw = (newResult.face[i].boxRaw // update boxRaw\n .map((b, j) => ((bufferedFactor - 1) * bufferedResult.face[i].boxRaw[j] + b) / bufferedFactor)) as Box;\n if (newResult.face[i].rotation) {\n const rotation: {\n matrix: [number, number, number, number, number, number, number, number, number],\n angle: { roll: number, yaw: number, pitch: number },\n gaze: { bearing: number, strength: number }\n } = { matrix: [0, 0, 0, 0, 0, 0, 0, 0, 0], angle: { roll: 0, yaw: 0, pitch: 0 }, gaze: { bearing: 0, strength: 0 } };\n rotation.matrix = newResult.face[i].rotation?.matrix as [number, number, number, number, number, number, number, number, number];\n rotation.angle = {\n roll: ((bufferedFactor - 1) * (bufferedResult.face[i].rotation?.angle?.roll || 0) + (newResult.face[i].rotation?.angle?.roll || 0)) / bufferedFactor,\n yaw: ((bufferedFactor - 1) * (bufferedResult.face[i].rotation?.angle?.yaw || 0) + (newResult.face[i].rotation?.angle?.yaw || 0)) / bufferedFactor,\n pitch: ((bufferedFactor - 1) * (bufferedResult.face[i].rotation?.angle?.pitch || 0) + (newResult.face[i].rotation?.angle?.pitch || 0)) / bufferedFactor,\n };\n rotation.gaze = {\n // not fully correct due projection on circle, also causes wrap-around draw on jump from negative to positive\n bearing: ((bufferedFactor - 1) * (bufferedResult.face[i].rotation?.gaze.bearing || 0) + (newResult.face[i].rotation?.gaze.bearing || 0)) / bufferedFactor,\n strength: ((bufferedFactor - 1) * (bufferedResult.face[i].rotation?.gaze.strength || 0) + (newResult.face[i].rotation?.gaze.strength || 0)) / bufferedFactor,\n };\n bufferedResult.face[i] = { ...newResult.face[i], rotation, box, boxRaw }; // shallow clone plus updated values\n } else {\n bufferedResult.face[i] = { ...newResult.face[i], box, boxRaw }; // shallow clone plus updated values\n }\n }\n }\n\n // interpolate object detection results\n if (!bufferedResult.object || (newResult.object.length !== bufferedResult.object.length)) {\n bufferedResult.object = JSON.parse(JSON.stringify(newResult.object)) as ObjectResult[]; // deep clone once\n } else {\n for (let i = 0; i < newResult.object.length; i++) {\n const box = (newResult.object[i].box // update box\n .map((b, j) => ((bufferedFactor - 1) * bufferedResult.object[i].box[j] + b) / bufferedFactor)) as Box;\n const boxRaw = (newResult.object[i].boxRaw // update boxRaw\n .map((b, j) => ((bufferedFactor - 1) * bufferedResult.object[i].boxRaw[j] + b) / bufferedFactor)) as Box;\n bufferedResult.object[i] = { ...newResult.object[i], box, boxRaw }; // shallow clone plus updated values\n }\n }\n\n // interpolate person results\n if (newResult.persons) {\n const newPersons = newResult.persons; // trigger getter function\n if (!bufferedResult.persons || (newPersons.length !== bufferedResult.persons.length)) {\n bufferedResult.persons = JSON.parse(JSON.stringify(newPersons)) as PersonResult[];\n } else {\n for (let i = 0; i < newPersons.length; i++) { // update person box, we don't update the rest as it's updated as reference anyhow\n bufferedResult.persons[i].box = (newPersons[i].box\n .map((box, j) => ((bufferedFactor - 1) * bufferedResult.persons[i].box[j] + box) / bufferedFactor)) as Box;\n }\n }\n }\n\n // just copy latest gestures without interpolation\n if (newResult.gesture) bufferedResult.gesture = newResult.gesture;\n\n // append interpolation performance data\n const t1 = now();\n interpolateTime = env.perfadd ? interpolateTime + Math.round(t1 - t0) : Math.round(t1 - t0);\n if (newResult.performance) bufferedResult.performance = { ...newResult.performance, interpolate: interpolateTime };\n\n return bufferedResult;\n}\n", "/** Face descriptor type as number array */\nexport type Descriptor = number[]\nexport type MatchOptions = { order?: number, threshold?: number, multiplier?: number, min?: number, max?: number } | undefined;\n\n/** Calculates distance between two descriptors\n * @param options - calculation options\n * - order - algorithm to use\n * Euclidean distance if `order` is 2 (default), Minkowski distance algorithm of nth order if `order` is higher than 2\n * - multiplier - by how much to enhance difference analysis in range of 1..100\n * default is 20 which normalizes results to similarity above 0.5 can be considered a match\n */\nexport function distance(descriptor1: Descriptor, descriptor2: Descriptor, options: MatchOptions = { order: 2, multiplier: 25 }) {\n // general minkowski distance, euclidean distance is limited case where order is 2\n if (!descriptor1 || !descriptor1) return Number.MAX_SAFE_INTEGER;\n let sum = 0;\n for (let i = 0; i < descriptor1.length; i++) {\n const diff = (!options.order || options.order === 2) ? (descriptor1[i] - descriptor2[i]) : (Math.abs(descriptor1[i] - descriptor2[i]));\n sum += (!options.order || options.order === 2) ? (diff * diff) : (diff ** options.order);\n }\n return (options.multiplier || 20) * sum;\n}\n\n// invert distance to similarity, normalize to given range and clamp\nconst normalizeDistance = (dist, order, min, max) => {\n if (dist === 0) return 1; // short circuit for identical inputs\n const root = order === 2 ? Math.sqrt(dist) : dist ** (1 / order); // take root of distance\n const norm = (1 - (root / 100) - min) / (max - min); // normalize to range\n const clamp = Math.max(Math.min(norm, 1), 0); // clamp to 0..1\n return clamp;\n};\n\n/** Calculates normalized similarity between two face descriptors based on their `distance`\n * @param options - calculation options\n * - order - algorithm to use\n * Euclidean distance if `order` is 2 (default), Minkowski distance algorithm of nth order if `order` is higher than 2\n * - multiplier - by how much to enhance difference analysis in range of 1..100\n * default is 20 which normalizes results to similarity above 0.5 can be considered a match\n * - min - normalize similarity result to a given range\n * - max - normalzie similarity resutl to a given range\n * default is 0.2...0.8\n * Returns similarity between two face descriptors normalized to 0..1 range where 0 is no similarity and 1 is perfect similarity\n */\nexport function similarity(descriptor1: Descriptor, descriptor2: Descriptor, options: MatchOptions = { order: 2, multiplier: 25, min: 0.2, max: 0.8 }) {\n const dist = distance(descriptor1, descriptor2, options);\n return normalizeDistance(dist, options.order || 2, options.min || 0, options.max || 1);\n}\n\n/** Matches given descriptor to a closest entry in array of descriptors\n * @param descriptor - face descriptor\n * @param descriptors - array of face descriptors to commpare given descriptor to\n * @param options - see `similarity` method for options description\n * Returns\n * - `index` index array index where best match was found or -1 if no matches\n * - `distance` calculated `distance` of given descriptor to the best match\n * - `similarity` calculated normalized `similarity` of given descriptor to the best match\n*/\nexport function match(descriptor: Descriptor, descriptors: Descriptor[], options: MatchOptions = { order: 2, multiplier: 25, threshold: 0, min: 0.2, max: 0.8 }) {\n if (!Array.isArray(descriptor) || !Array.isArray(descriptors) || descriptor.length < 64 || descriptors.length === 0) { // validate input\n return { index: -1, distance: Number.POSITIVE_INFINITY, similarity: 0 };\n }\n let lowestDistance = Number.MAX_SAFE_INTEGER;\n let index = -1;\n for (let i = 0; i < descriptors.length; i++) {\n const res = descriptors[i].length === descriptor.length ? distance(descriptor, descriptors[i], options) : Number.MAX_SAFE_INTEGER;\n if (res < lowestDistance) {\n lowestDistance = res;\n index = i;\n }\n if (lowestDistance < (options.threshold || 0)) break;\n }\n const normalizedSimilarity = normalizeDistance(lowestDistance, options.order || 2, options.min || 0, options.max || 1);\n return { index, distance: lowestDistance, similarity: normalizedSimilarity };\n}\n", "/**\n * Analyze detection Results and sort&combine them into per-person view\n */\n\nimport type { FaceResult, BodyResult, HandResult, GestureResult, PersonResult, Box } from '../result';\n\nexport function join(faces: FaceResult[], bodies: BodyResult[], hands: HandResult[], gestures: GestureResult[], shape: number[] | undefined): PersonResult[] {\n let id = 0;\n const persons: PersonResult[] = [];\n for (const face of faces) { // person is defined primarily by face and then we append other objects as found\n const person: PersonResult = { id: id++, face, body: null, hands: { left: null, right: null }, gestures: [], box: [0, 0, 0, 0] };\n for (const body of bodies) {\n if (face.box[0] > body.box[0] // x within body\n && face.box[0] < body.box[0] + body.box[2]\n && face.box[1] + face.box[3] > body.box[1] // y within body\n && face.box[1] + face.box[3] < body.box[1] + body.box[3]) {\n person.body = body;\n }\n }\n if (person.body) { // only try to join hands if body is found\n for (const hand of hands) {\n if (hand.box[0] + hand.box[2] > person.body.box[0] // x within body for left hand\n && hand.box[0] + hand.box[2] < person.body.box[0] + person.body.box[2]\n && hand.box[1] + hand.box[3] > person.body.box[1] // x within body for left hand\n && hand.box[1] + hand.box[3] < person.body.box[1] + person.body.box[3]) {\n if (person.hands) person.hands.left = hand;\n }\n if (hand.box[0] < person.body.box[0] + person.body.box[2] // x within body for right hand\n && hand.box[0] > person.body.box[0]\n && hand.box[1] + hand.box[3] > person.body.box[1] // x within body for right hand\n && hand.box[1] + hand.box[3] < person.body.box[1] + person.body.box[3]) {\n if (person.hands) person.hands.right = hand;\n }\n }\n }\n for (const gesture of gestures) { // append all gestures according to ids\n if (gesture['face'] !== undefined && gesture['face'] === face.id) person.gestures.push(gesture);\n else if (gesture['iris'] !== undefined && gesture['iris'] === face.id) person.gestures.push(gesture);\n else if (gesture['body'] !== undefined && gesture['body'] === person.body?.id) person.gestures.push(gesture);\n else if (gesture['hand'] !== undefined && gesture['hand'] === person.hands.left?.id) person.gestures.push(gesture);\n else if (gesture['hand'] !== undefined && gesture['hand'] === person.hands.right?.id) person.gestures.push(gesture);\n }\n\n // create new overarching box from all boxes belonging to person\n const x: number[] = [];\n const y: number[] = [];\n const extractXY = (box: Box | undefined) => { // extract all [x, y] coordinates from boxes [x, y, width, height]\n if (box && box.length === 4) {\n x.push(box[0], box[0] + box[2]);\n y.push(box[1], box[1] + box[3]);\n }\n };\n extractXY(person.face.box);\n extractXY(person.body?.box);\n extractXY(person.hands.left?.box);\n extractXY(person.hands.right?.box);\n const minX = Math.min(...x);\n const minY = Math.min(...y);\n person.box = [minX, minY, Math.max(...x) - minX, Math.max(...y) - minY]; // create new overarching box\n\n // shape is known so we calculate boxRaw as well\n if (shape?.[1] && shape?.[2]) person.boxRaw = [person.box[0] / shape[2], person.box[1] / shape[1], person.box[2] / shape[2], person.box[3] / shape[1]];\n\n persons.push(person);\n }\n return persons;\n}\n", "/**\n * Embedded sample images used during warmup in dataURL format\n */\n\n// data:image/jpeg;base64,\nexport const face = `\n/9j/4AAQSkZJRgABAQEAYABgAAD/4QBoRXhpZgAATU0AKgAAAAgABAEaAAUAAAABAAAAPgEbAAUA\nAAABAAAARgEoAAMAAAABAAIAAAExAAIAAAARAAAATgAAAAAAAABgAAAAAQAAAGAAAAABcGFpbnQu\nbmV0IDQuMi4xMwAA/9sAQwAGBAUGBQQGBgUGBwcGCAoQCgoJCQoUDg8MEBcUGBgXFBYWGh0lHx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8Hy2yaTfl37TXetoCPfRxfp1qi3F48ofKMvtvxak8s6LDv61\nrZji9rPaLUf5PC+bfttS0q8q3p9W/wBrRMdpUZuKdN99nzvFqPbTVz7nD8OKs+do2/mW3h4D7Xaq\nZnPrtNpqz35aRaYOHY9Zk4pNt9rR+rl6zi+OnS+WN57Rv1lXp/YrNaYtruL6zNPnGO3hxP6O5w/2\nf0HDuun09Yv55Le9afznqcOvO4tBreMTHu30unnva0bWt8on+70nDuE4OHYYx4Kbesz3tPrMuhGO\nIjpDOKrK9YVpsyiGUQnYGOyUgI2SlAIEmwMWMs9kTAMJYzDOYRMArmGErZhhMArlHmzmGMwDE3Ts\nbAbs4swj5pgFkSziVcM4BZEsolXDKAZwyhjCYBkACQhIAAAAAAAJAAAAAAAAAAAAAAAAAAAShIAA\nAAAAAAJAAAAAAAAAAAAAABAJEAAAAAAAAAAAAAAAIEoBKAAAAAAAAAAAAAAABAlAAAAAAAIAAAAA\nBAkBAkBAkBAlACEgMZjdjbFW8bWrEx8YWANb6Fp+bfwab+vLDKMFK9qxH5L0bAr8OPRPKz2AY7J2\nSbAjYZAI2E7AIEgIEgIEgMdkSy2NgY7MdlmyNoBXsxmFuyNgVTVjNV3KjlBRNTlXTVHKCrlIqt5T\nlBhEMohlFerLlBjEMohMVTEARDKCITsAk2AEgAAAkAAAAAAAAAAAAAAAAAAAAAAAASAAAAAAAAD/\n2Q==`;\n", "/**\n * Warmup algorithm that uses embedded images to exercise loaded models for faster future inference\n */\n\nimport { log, now, mergeDeep } from './util/util';\nimport * as sample from './sample';\nimport * as tf from '../dist/tfjs.esm.js';\nimport * as image from './image/image';\nimport * as backend from './tfjs/backend';\nimport { env } from './util/env';\nimport type { Config } from './config';\nimport type { Result } from './result';\nimport { Human, models } from './human';\nimport type { Tensor } from './exports';\n\nasync function warmupBitmap(instance: Human): Promise {\n const b64toBlob = (base64: string, type = 'application/octet-stream') => fetch(`data:${type};base64,${base64}`).then((res) => res.blob());\n let blob: Blob | null;\n let res: Result | undefined;\n switch (instance.config.warmup) {\n case 'face': blob = await b64toBlob(sample.face); break;\n case 'body':\n case 'full': blob = await b64toBlob(sample.body); break;\n default: blob = null;\n }\n if (blob) {\n const bitmap = await createImageBitmap(blob);\n res = await instance.detect(bitmap, instance.config);\n bitmap.close();\n }\n return res;\n}\n\nasync function warmupCanvas(instance: Human): Promise {\n return new Promise((resolve) => {\n let src: string;\n // let size = 0;\n switch (instance.config.warmup) {\n case 'face':\n // size = 256;\n src = 'data:image/jpeg;base64,' + sample.face;\n break;\n case 'full':\n case 'body':\n // size = 1200;\n src = 'data:image/jpeg;base64,' + sample.body;\n break;\n default:\n src = '';\n }\n // src = encodeURI('../assets/human-sample-upper.jpg');\n let img: HTMLImageElement;\n if (typeof Image !== 'undefined') img = new Image();\n // @ts-ignore env.image is an external monkey-patch\n else if (env.Image) img = new env.Image();\n else return;\n img.onload = async () => {\n const canvas = image.canvas(img.naturalWidth, img.naturalHeight);\n if (!canvas) {\n log('Warmup: Canvas not found');\n resolve(undefined);\n } else {\n const ctx = canvas.getContext('2d');\n if (ctx) ctx.drawImage(img, 0, 0);\n // const data = ctx?.getImageData(0, 0, canvas.height, canvas.width);\n const tensor = await instance.image(canvas);\n const res = tensor.tensor ? await instance.detect(tensor.tensor, instance.config) : undefined;\n resolve(res);\n }\n };\n if (src) img.src = src;\n else resolve(undefined);\n });\n}\n\nasync function warmupNode(instance: Human): Promise {\n const atob = (str: string) => Buffer.from(str, 'base64');\n let img;\n if (instance.config.warmup === 'face') img = atob(sample.face);\n else img = atob(sample.body);\n let res: Result;\n if (('node' in tf) && (tf.getBackend() === 'tensorflow')) {\n const data: Tensor = tf['node'].decodeJpeg(img); // eslint-disable-line import/namespace\n const expanded: Tensor = tf.expandDims(data, 0);\n instance.tf.dispose(data);\n // log('Input:', expanded);\n res = await instance.detect(expanded, instance.config);\n instance.tf.dispose(expanded);\n } else {\n if (instance.config.debug) log('Warmup tfjs-node not loaded');\n /*\n const input = await canvasJS.loadImage(img);\n const canvas = canvasJS.createCanvas(input.width, input.height);\n const ctx = canvas.getContext('2d');\n ctx.drawImage(img, 0, 0, input.width, input.height);\n res = await instance.detect(input, instance.config);\n */\n }\n // @ts-ignore\n return res;\n}\n\nasync function runInference(instance: Human) {\n let res: Result | undefined;\n if (typeof createImageBitmap === 'function') res = await warmupBitmap(instance);\n else if (typeof Image !== 'undefined' || env.Canvas !== undefined) res = await warmupCanvas(instance);\n else res = await warmupNode(instance);\n return res;\n}\n\n/** Runs pre-compile on all loaded models */\nexport async function runCompile(instance: Human) {\n if (!tf.env().flagRegistry.ENGINE_COMPILE_ONLY) return; // tfjs does not support compile-only inference\n const backendType = tf.getBackend();\n const webGLBackend = tf.backend();\n if ((backendType !== 'webgl' && backendType !== 'humangl') || !webGLBackend?.checkCompileCompletion) {\n // log('compile pass: skip');\n return;\n }\n tf.env().set('ENGINE_COMPILE_ONLY', true);\n const numTensorsStart = tf.engine().state.numTensors;\n const compiledModels: string[] = [];\n for (const [modelName, model] of Object.entries(instance.models).filter(([key, val]) => (key !== null && val !== null))) {\n const shape = (model.inputs?.[0]?.shape) ? [...model.inputs[0].shape] : [1, 64, 64, 3];\n const dtype: string = (model.inputs?.[0]?.dtype) ? model.inputs[0].dtype : 'float32';\n for (let dim = 0; dim < shape.length; dim++) {\n if (shape[dim] === -1) shape[dim] = dim === 0 ? 1 : 64; // override batch number and any dynamic dimensions\n }\n const tensor = tf.zeros(shape, dtype);\n try {\n const res = model.execute(tensor);\n compiledModels.push(modelName);\n if (Array.isArray(res)) res.forEach((t) => tf.dispose(t));\n else tf.dispose(res);\n } catch {\n if (instance.config.debug) log('compile fail model:', modelName);\n }\n tf.dispose(tensor);\n }\n const kernels = await webGLBackend.checkCompileCompletionAsync();\n webGLBackend.getUniformLocations();\n if (instance.config.debug) log('compile pass:', { models: compiledModels, kernels: kernels.length });\n tf.env().set('ENGINE_COMPILE_ONLY', false);\n const numTensorsEnd = tf.engine().state.numTensors;\n if ((numTensorsEnd - numTensorsStart) > 0) log('tensor leak:', numTensorsEnd - numTensorsStart);\n}\n\n/** Warmup method pre-initializes all configured models for faster inference\n * - can take significant time on startup\n * - only used in browser environments for `webgl` and `humangl` backends\n * @param userConfig?: Config\n*/\nexport async function warmup(instance: Human, userConfig?: Partial): Promise {\n await backend.check(instance, false);\n const t0 = now();\n instance.state = 'warmup';\n if (userConfig) instance.config = mergeDeep(instance.config, userConfig) as Config;\n if (!instance.config.warmup || instance.config.warmup.length === 0 || instance.config.warmup === 'none') {\n return { face: [], body: [], hand: [], gesture: [], object: [], performance: instance.performance, timestamp: now(), persons: [], error: null };\n }\n return new Promise(async (resolve) => {\n await models.load(instance);\n await runCompile(instance);\n const res = await runInference(instance);\n const t1 = now();\n if (instance.config.debug) log('warmup', instance.config.warmup, Math.round(t1 - t0), 'ms');\n instance.emit('warmup');\n resolve(res);\n });\n}\n", "/**\n * Human main module\n * @default Human Library\n * @summary \n * @author \n * @copyright \n * @license MIT\n */\n\n// module imports\nimport { log, now, mergeDeep, validate } from './util/util';\nimport { defaults } from './config';\nimport { env, Env } from './util/env';\nimport { WebCam } from './util/webcam';\nimport { setModelLoadOptions } from './tfjs/load';\nimport * as tf from '../dist/tfjs.esm.js';\nimport * as app from '../package.json';\nimport * as backend from './tfjs/backend';\nimport * as draw from './draw/draw';\nimport * as blazepose from './body/blazepose';\nimport * as centernet from './object/centernet';\nimport * as efficientpose from './body/efficientpose';\nimport * as face from './face/face';\nimport * as facemesh from './face/facemesh';\nimport * as faceres from './face/faceres';\nimport * as gesture from './gesture/gesture';\nimport * as handpose from './hand/handpose';\nimport * as handtrack from './hand/handtrack';\nimport * as humangl from './tfjs/humangl';\nimport * as image from './image/image';\nimport * as interpolate from './util/interpolate';\nimport * as meet from './segmentation/meet';\nimport * as match from './face/match';\nimport * as models from './models';\nimport * as movenet from './body/movenet';\nimport * as nanodet from './object/nanodet';\nimport * as persons from './util/persons';\nimport * as posenet from './body/posenet';\nimport * as rvm from './segmentation/rvm';\nimport * as selfie from './segmentation/selfie';\nimport * as warmups from './warmup';\n\n// type definitions\nimport type { Input, Tensor, DrawOptions, Config, Result, FaceResult, HandResult, BodyResult, ObjectResult, GestureResult, PersonResult, AnyCanvas } from './exports';\n// type exports\nexport * from './exports';\n\n/** **Human** library main class\n *\n * All methods and properties are available only as members of Human class\n *\n * - Configuration object definition: {@link Config}\n * - Results object definition: {@link Result}\n * - Possible inputs: {@link Input}\n *\n * @param userConfig - {@link Config}\n * @returns instance of {@link Human}\n */\nexport class Human {\n /** Current version of Human library in *semver* format */\n version: string;\n\n /** Current configuration\n * - Defaults: [config](https://github.com/vladmandic/human/blob/main/src/config.ts#L262)\n */\n config: Config;\n\n /** Last known result of detect run\n * - Can be accessed anytime after initial detection\n */\n result: Result;\n\n /** Current state of Human library\n * - Can be polled to determine operations that are currently executed\n * - Progresses through: 'config', 'check', 'backend', 'load', 'run:', 'idle'\n */\n state: string;\n\n /** currenty processed image tensor and canvas */\n process: { tensor: Tensor | null, canvas: AnyCanvas | null };\n\n /** Instance of TensorFlow/JS used by Human\n * - Can be embedded or externally provided\n * [TFJS API](https://js.tensorflow.org/api/latest/)\n */\n tf;\n\n /** Object containing environment information used for diagnostics */\n env: Env;\n\n /** Draw helper classes that can draw detected objects on canvas using specified draw\n * - canvas: draws input to canvas\n * - options: are global settings for all draw operations, can be overriden for each draw method {@link DrawOptions}\n * - face, body, hand, gesture, object, person: draws detected results as overlays on canvas\n */\n draw: { canvas: typeof draw.canvas, face: typeof draw.face, body: typeof draw.body, hand: typeof draw.hand, gesture: typeof draw.gesture, object: typeof draw.object, person: typeof draw.person, all: typeof draw.all, options: DrawOptions };\n\n /** Currently loaded models\n * @internal\n * {@link models#Models}\n */\n models: models.Models;\n\n /** Container for events dispatched by Human\n * Possible events:\n * - `create`: triggered when Human object is instantiated\n * - `load`: triggered when models are loaded (explicitly or on-demand)\n * - `image`: triggered when input image is processed\n * - `result`: triggered when detection is complete\n * - `warmup`: triggered when warmup is complete\n * - `error`: triggered on some errors\n */\n events: EventTarget | undefined;\n /** Reference face triangualtion array of 468 points, used for triangle references between points */\n faceTriangulation: number[];\n /** Refernce UV map of 468 values, used for 3D mapping of the face mesh */\n faceUVMap: [number, number][];\n /** Performance object that contains values for all recently performed operations */\n performance: Record; // perf members are dynamically defined as needed\n #numTensors: number;\n #analyzeMemoryLeaks: boolean;\n #checkSanity: boolean;\n /** WebGL debug info */\n gl: Record;\n // definition end\n\n /** Constructor for **Human** library that is futher used for all operations\n * @param userConfig - user configuration object {@link Config}\n */\n constructor(userConfig?: Partial) {\n this.env = env;\n /*\n defaults.wasmPath = tf.version['tfjs-core'].includes('-') // custom build or official build\n ? 'https://vladmandic.github.io/tfjs/dist/'\n : `https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm@${tf.version_core}/dist/`;\n */\n const tfVersion = (tf.version.tfjs || tf.version_core).replace(/-(.*)/, '');\n defaults.wasmPath = `https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm@${tfVersion}/dist/`;\n defaults.modelBasePath = env.browser ? '../models/' : 'file://models/';\n defaults.backend = env.browser ? 'webgl' : 'tensorflow';\n this.version = app.version; // expose version property on instance of class\n Object.defineProperty(this, 'version', { value: app.version }); // expose version property directly on class itself\n this.config = JSON.parse(JSON.stringify(defaults));\n Object.seal(this.config);\n this.config.cacheModels = typeof indexedDB !== 'undefined';\n if (userConfig) this.config = mergeDeep(this.config, userConfig);\n setModelLoadOptions(this.config);\n this.tf = tf;\n this.state = 'idle';\n this.#numTensors = 0;\n this.#analyzeMemoryLeaks = false;\n this.#checkSanity = false;\n this.performance = {};\n this.events = (typeof EventTarget !== 'undefined') ? new EventTarget() : undefined;\n // object that contains all initialized models\n this.models = new models.Models();\n // reexport draw methods\n this.draw = {\n options: draw.options,\n canvas: (input: AnyCanvas | HTMLImageElement | HTMLVideoElement, output: AnyCanvas) => draw.canvas(input, output),\n face: (output: AnyCanvas, result: FaceResult[], options?: Partial) => draw.face(output, result, options),\n body: (output: AnyCanvas, result: BodyResult[], options?: Partial) => draw.body(output, result, options),\n hand: (output: AnyCanvas, result: HandResult[], options?: Partial) => draw.hand(output, result, options),\n gesture: (output: AnyCanvas, result: GestureResult[], options?: Partial) => draw.gesture(output, result, options),\n object: (output: AnyCanvas, result: ObjectResult[], options?: Partial) => draw.object(output, result, options),\n person: (output: AnyCanvas, result: PersonResult[], options?: Partial) => draw.person(output, result, options),\n all: (output: AnyCanvas, result: Result, options?: Partial) => draw.all(output, result, options),\n };\n this.result = { face: [], body: [], hand: [], gesture: [], object: [], performance: {}, timestamp: 0, persons: [], error: null };\n // export access to image processing\n this.process = { tensor: null, canvas: null };\n // export raw access to underlying models\n this.faceTriangulation = facemesh.triangulation;\n this.faceUVMap = facemesh.uvmap;\n // set gl info\n this.gl = humangl.config;\n // init model validation\n models.validateModel(this, null, '');\n // include platform info\n this.emit('create');\n if (this.config.debug || this.env.browser) log(`version: ${this.version}`);\n if (this.config.debug) log(`tfjs version: ${this.tf.version['tfjs-core']}`);\n const envTemp = JSON.parse(JSON.stringify(this.env));\n delete envTemp.kernels;\n delete envTemp.initial;\n delete envTemp.perfadd;\n if (this.config.debug) log('environment:', envTemp);\n }\n\n /** internal function to measure tensor leaks */\n analyze = (...msg: string[]) => {\n if (!this.#analyzeMemoryLeaks) return;\n const currentTensors = this.tf.engine().state.numTensors;\n const previousTensors = this.#numTensors;\n this.#numTensors = currentTensors;\n const leaked = currentTensors - previousTensors;\n if (leaked !== 0) log(...msg, leaked);\n };\n\n /** internal function for quick sanity check on inputs @hidden */\n #sanity = (input: Input): null | string => {\n if (!this.#checkSanity) return null;\n if (!input) return 'input is not defined';\n if (this.env.node && !(input instanceof tf.Tensor)) return 'input must be a tensor';\n try {\n this.tf.getBackend();\n } catch {\n return 'backend not loaded';\n }\n return null;\n };\n\n /** Reset configuration to default values */\n reset(): void {\n const currentBackend = this.config.backend; // save backend;\n this.config = JSON.parse(JSON.stringify(defaults));\n this.config.backend = currentBackend;\n image.reset();\n env.initial = true;\n }\n\n /** Validate current configuration schema */\n validate(userConfig?: Partial) {\n const msgs = validate(defaults, userConfig || this.config);\n if (msgs.length === 0) this.config = mergeDeep(this.config, userConfig) as Config;\n return msgs;\n }\n\n /** Check model for invalid kernel ops for current backend */\n check() {\n return models.validate(this);\n }\n\n /** Exports face matching methods {@link match#similarity} */\n public similarity = match.similarity;\n /** Exports face matching methods {@link match#distance} */\n public distance = match.distance;\n /** Exports face matching methods {@link match#match} */\n public match = match.match;\n\n /** Utility wrapper for performance.now() */\n now(): number { // eslint-disable-line class-methods-use-this\n return now();\n }\n\n /** Process input as return canvas and tensor\n *\n * @param input - any input {@link Input}\n * @param getTensor - should image processing also return tensor or just canvas\n * Returns object with `tensor` and `canvas`\n */\n image(input: Input, getTensor: boolean = true) {\n return image.process(input, this.config, getTensor);\n }\n\n /** Segmentation method takes any input and returns RGBA tensor\n * Note: Segmentation is not triggered as part of detect process\n *\n * @param input - {@link Input}\n * Returns tensor which contains image data in RGBA format\n */\n async segmentation(input: Input, userConfig?: Partial): Promise {\n if (userConfig) this.config = mergeDeep(this.config, userConfig) as Config;\n if (!this.config.segmentation.enabled) return null;\n const processed = await image.process(input, this.config);\n if (!processed.tensor) return null;\n let tensor: Tensor | null = null;\n if (this.config.segmentation.modelPath?.includes('rvm')) tensor = await rvm.predict(processed.tensor, this.config);\n if (this.config.segmentation.modelPath?.includes('meet')) tensor = await meet.predict(processed.tensor, this.config);\n if (this.config.segmentation.modelPath?.includes('selfie')) tensor = await selfie.predict(processed.tensor, this.config);\n tf.dispose(processed.tensor);\n return tensor;\n }\n\n /** Enhance method performs additional enhacements to face image previously detected for futher processing\n *\n * @param input - Tensor as provided in human.result.face[n].tensor\n * @returns Tensor\n */\n enhance(input: Tensor): Tensor | null { // eslint-disable-line class-methods-use-this\n return faceres.enhance(input);\n }\n\n /** Compare two input tensors for pixel simmilarity\n * - use `human.image` to process any valid input and get a tensor that can be used for compare\n * - when passing manually generated tensors:\n * - both input tensors must be in format [1, height, width, 3]\n * - if resolution of tensors does not match, second tensor will be resized to match resolution of the first tensor\n * - return value is pixel similarity score normalized by input resolution and rgb channels\n */\n compare(firstImageTensor: Tensor, secondImageTensor: Tensor): Promise {\n return image.compare(this.config, firstImageTensor, secondImageTensor);\n }\n\n /** Explicit backend initialization\n * - Normally done implicitly during initial load phase\n * - Call to explictly register and initialize TFJS backend without any other operations\n * - Use when changing backend during runtime\n */\n async init(): Promise {\n await backend.check(this, true);\n await this.tf.ready();\n image.reset();\n }\n\n /** WebCam helper methods\n *\n */\n public webcam = new WebCam();\n\n /** Load method preloads all configured models on-demand\n * - Not explicitly required as any required model is load implicitly on it's first run\n *\n * @param userConfig - {@link Config}\n */\n async load(userConfig?: Partial): Promise {\n this.state = 'load';\n const timeStamp = now();\n const count = Object.values(this.models).filter((model) => model).length;\n if (userConfig) this.config = mergeDeep(this.config, userConfig) as Config;\n\n if (this.env.initial) { // print version info on first run and check for correct backend setup\n if (!await backend.check(this, false)) log('error: backend check failed');\n await tf.ready();\n if (this.env.browser) {\n if (this.config.debug) log('configuration:', this.config);\n if (this.config.debug) log('tf flags:', this.tf.ENV.flags);\n }\n }\n\n await models.load(this); // actually loads models\n if (this.env.initial && this.config.debug) log('tf engine state:', this.tf.engine().state.numBytes, 'bytes', this.tf.engine().state.numTensors, 'tensors'); // print memory stats on first run\n this.env.initial = false;\n\n const loaded = Object.values(this.models).filter((model) => model).length;\n if (loaded !== count) { // number of loaded models changed\n models.validate(this); // validate kernel ops used by model against current backend\n this.emit('load');\n }\n\n const current = Math.trunc(now() - timeStamp);\n if (current > (this.performance.loadModels || 0)) this.performance.loadModels = this.env.perfadd ? (this.performance.loadModels || 0) + current : current;\n }\n\n /** emit event */\n emit = (event: string) => {\n if (this.events?.dispatchEvent) this.events.dispatchEvent(new Event(event));\n };\n\n /** Runs interpolation using last known result and returns smoothened result\n * Interpolation is based on time since last known result so can be called independently\n *\n * @param result - {@link Result} optional use specific result set to run interpolation on\n * @returns result - {@link Result}\n */\n next(result: Result = this.result): Result {\n return interpolate.calc(result, this.config);\n }\n\n /** get model loading/loaded stats */\n getModelStats(): models.ModelStats { return models.getModelStats(this); }\n\n /** Warmup method pre-initializes all configured models for faster inference\n * - can take significant time on startup\n * - only used for `webgl` and `humangl` backends\n * @param userConfig - {@link Config}\n * @returns result - {@link Result}\n */\n async warmup(userConfig?: Partial) {\n const t0 = now();\n const res = await warmups.warmup(this, userConfig);\n const t1 = now();\n this.performance.warmup = Math.trunc(t1 - t0);\n return res;\n }\n\n /** Run detect with tensorflow profiling\n * - result object will contain total exeuction time information for top-20 kernels\n * - actual detection object can be accessed via `human.result`\n */\n async profile(input: Input, userConfig?: Partial): Promise<{ kernel: string, time: number, perc: number }[]> {\n const profile = await this.tf.profile(() => this.detect(input, userConfig));\n const kernels: Record = {};\n let total = 0;\n for (const kernel of profile.kernels) { // sum kernel time values per kernel\n if (kernels[kernel.name]) kernels[kernel.name] += kernel.kernelTimeMs;\n else kernels[kernel.name] = kernel.kernelTimeMs;\n total += kernel.kernelTimeMs;\n }\n const kernelArr: { kernel: string, time: number, perc: number }[] = [];\n Object.entries(kernels).forEach((key) => kernelArr.push({ kernel: key[0], time: key[1] as unknown as number, perc: 0 })); // convert to array\n for (const kernel of kernelArr) {\n kernel.perc = Math.round(1000 * kernel.time / total) / 1000;\n kernel.time = Math.round(1000 * kernel.time) / 1000;\n }\n kernelArr.sort((a, b) => b.time - a.time); // sort\n kernelArr.length = 20; // crop\n return kernelArr;\n }\n\n /** Main detection method\n * - Analyze configuration: {@link Config}\n * - Pre-process input: {@link Input}\n * - Run inference for all configured models\n * - Process and return result: {@link Result}\n *\n * @param input - {@link Input}\n * @param userConfig - {@link Config}\n * @returns result - {@link Result}\n */\n async detect(input: Input, userConfig?: Partial): Promise {\n // detection happens inside a promise\n this.state = 'detect';\n return new Promise(async (resolve) => {\n this.state = 'config';\n let timeStamp;\n\n // update configuration\n this.config = mergeDeep(this.config, userConfig) as Config;\n\n // sanity checks\n this.state = 'check';\n const error = this.#sanity(input);\n if (error) {\n log(error, input);\n this.emit('error');\n resolve({ face: [], body: [], hand: [], gesture: [], object: [], performance: this.performance, timestamp: now(), persons: [], error });\n }\n\n const timeStart = now();\n\n // load models if enabled\n await this.load();\n\n timeStamp = now();\n this.state = 'image';\n const img = await image.process(input, this.config) as { canvas: AnyCanvas, tensor: Tensor };\n this.process = img;\n this.performance.inputProcess = this.env.perfadd ? (this.performance.inputProcess || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);\n this.analyze('Get Image:');\n\n if (!img.tensor) {\n if (this.config.debug) log('could not convert input to tensor');\n this.emit('error');\n resolve({ face: [], body: [], hand: [], gesture: [], object: [], performance: this.performance, timestamp: now(), persons: [], error: 'could not convert input to tensor' });\n return;\n }\n this.emit('image');\n\n timeStamp = now();\n this.config.skipAllowed = await image.skip(this.config, img.tensor);\n if (!this.performance.totalFrames) this.performance.totalFrames = 0;\n if (!this.performance.cachedFrames) this.performance.cachedFrames = 0;\n (this.performance.totalFrames)++;\n if (this.config.skipAllowed) this.performance.cachedFrames++;\n this.performance.cacheCheck = this.env.perfadd ? (this.performance.cacheCheck || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);\n this.analyze('Check Changed:');\n\n // prepare where to store model results\n // keep them with weak typing as it can be promise or not\n let faceRes: FaceResult[] | Promise | never[] = [];\n let bodyRes: BodyResult[] | Promise | never[] = [];\n let handRes: HandResult[] | Promise | never[] = [];\n let objectRes: ObjectResult[] | Promise | never[] = [];\n\n // run face detection followed by all models that rely on face bounding box: face mesh, age, gender, emotion\n this.state = 'detect:face';\n if (this.config.async) {\n faceRes = this.config.face.enabled ? face.detectFace(this, img.tensor) : [];\n if (this.performance.face) delete this.performance.face;\n } else {\n timeStamp = now();\n faceRes = this.config.face.enabled ? await face.detectFace(this, img.tensor) : [];\n this.performance.face = this.env.perfadd ? (this.performance.face || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);\n }\n\n if (this.config.async && (this.config.body.maxDetected === -1 || this.config.hand.maxDetected === -1)) faceRes = await faceRes; // need face result for auto-detect number of hands or bodies\n\n // run body: can be posenet, blazepose, efficientpose, movenet\n this.analyze('Start Body:');\n this.state = 'detect:body';\n const bodyConfig = this.config.body.maxDetected === -1 ? mergeDeep(this.config, { body: { maxDetected: this.config.face.enabled ? 1 * (faceRes as FaceResult[]).length : 1 } }) : this.config; // autodetect number of bodies\n if (this.config.async) {\n if (this.config.body.modelPath?.includes('posenet')) bodyRes = this.config.body.enabled ? posenet.predict(img.tensor, bodyConfig) : [];\n else if (this.config.body.modelPath?.includes('blazepose')) bodyRes = this.config.body.enabled ? blazepose.predict(img.tensor, bodyConfig) : [];\n else if (this.config.body.modelPath?.includes('efficientpose')) bodyRes = this.config.body.enabled ? efficientpose.predict(img.tensor, bodyConfig) : [];\n else if (this.config.body.modelPath?.includes('movenet')) bodyRes = this.config.body.enabled ? movenet.predict(img.tensor, bodyConfig) : [];\n if (this.performance.body) delete this.performance.body;\n } else {\n timeStamp = now();\n if (this.config.body.modelPath?.includes('posenet')) bodyRes = this.config.body.enabled ? await posenet.predict(img.tensor, bodyConfig) : [];\n else if (this.config.body.modelPath?.includes('blazepose')) bodyRes = this.config.body.enabled ? await blazepose.predict(img.tensor, bodyConfig) : [];\n else if (this.config.body.modelPath?.includes('efficientpose')) bodyRes = this.config.body.enabled ? await efficientpose.predict(img.tensor, bodyConfig) : [];\n else if (this.config.body.modelPath?.includes('movenet')) bodyRes = this.config.body.enabled ? await movenet.predict(img.tensor, bodyConfig) : [];\n this.performance.body = this.env.perfadd ? (this.performance.body || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);\n }\n this.analyze('End Body:');\n\n // run handpose\n this.analyze('Start Hand:');\n this.state = 'detect:hand';\n const handConfig = this.config.hand.maxDetected === -1 ? mergeDeep(this.config, { hand: { maxDetected: this.config.face.enabled ? 2 * (faceRes as FaceResult[]).length : 1 } }) : this.config; // autodetect number of hands\n if (this.config.async) {\n if (this.config.hand.detector?.modelPath?.includes('handdetect')) handRes = this.config.hand.enabled ? handpose.predict(img.tensor, handConfig) : [];\n else if (this.config.hand.detector?.modelPath?.includes('handtrack')) handRes = this.config.hand.enabled ? handtrack.predict(img.tensor, handConfig) : [];\n if (this.performance.hand) delete this.performance.hand;\n } else {\n timeStamp = now();\n if (this.config.hand.detector?.modelPath?.includes('handdetect')) handRes = this.config.hand.enabled ? await handpose.predict(img.tensor, handConfig) : [];\n else if (this.config.hand.detector?.modelPath?.includes('handtrack')) handRes = this.config.hand.enabled ? await handtrack.predict(img.tensor, handConfig) : [];\n this.performance.hand = this.env.perfadd ? (this.performance.hand || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);\n }\n this.analyze('End Hand:');\n\n // run object detection\n this.analyze('Start Object:');\n this.state = 'detect:object';\n if (this.config.async) {\n if (this.config.object.modelPath?.includes('nanodet')) objectRes = this.config.object.enabled ? nanodet.predict(img.tensor, this.config) : [];\n else if (this.config.object.modelPath?.includes('centernet')) objectRes = this.config.object.enabled ? centernet.predict(img.tensor, this.config) : [];\n if (this.performance.object) delete this.performance.object;\n } else {\n timeStamp = now();\n if (this.config.object.modelPath?.includes('nanodet')) objectRes = this.config.object.enabled ? await nanodet.predict(img.tensor, this.config) : [];\n else if (this.config.object.modelPath?.includes('centernet')) objectRes = this.config.object.enabled ? await centernet.predict(img.tensor, this.config) : [];\n this.performance.object = this.env.perfadd ? (this.performance.object || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);\n }\n this.analyze('End Object:');\n\n // if async wait for results\n this.state = 'detect:await';\n if (this.config.async) [faceRes, bodyRes, handRes, objectRes] = await Promise.all([faceRes, bodyRes, handRes, objectRes]);\n\n // run gesture analysis last\n this.state = 'detect:gesture';\n let gestureRes: GestureResult[] = [];\n if (this.config.gesture.enabled) {\n timeStamp = now();\n gestureRes = [...gesture.face(faceRes as FaceResult[]), ...gesture.body(bodyRes as BodyResult[]), ...gesture.hand(handRes as HandResult[]), ...gesture.iris(faceRes as FaceResult[])];\n if (!this.config.async) this.performance.gesture = this.env.perfadd ? (this.performance.gesture || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);\n else if (this.performance.gesture) delete this.performance.gesture;\n }\n\n this.performance.total = this.env.perfadd ? (this.performance.total || 0) + Math.trunc(now() - timeStart) : Math.trunc(now() - timeStart);\n const shape = this.process.tensor?.shape || [];\n this.result = {\n face: faceRes as FaceResult[],\n body: bodyRes as BodyResult[],\n hand: handRes as HandResult[],\n gesture: gestureRes,\n object: objectRes as ObjectResult[],\n performance: this.performance,\n canvas: this.process.canvas,\n timestamp: Date.now(),\n error: null,\n get persons() { return persons.join(faceRes as FaceResult[], bodyRes as BodyResult[], handRes as HandResult[], gestureRes, shape); },\n };\n\n // finally dispose input tensor\n tf.dispose(img.tensor);\n\n // log('Result:', result);\n this.emit('detect');\n this.state = 'idle';\n resolve(this.result);\n });\n }\n\n /** Helper function\n * @param ms - sleep time in miliseconds\n */\n async sleep(ms: number): Promise { // eslint-disable-line class-methods-use-this\n return new Promise((resolve) => { setTimeout(resolve, ms); });\n }\n\n /** internal structure that keeps track of processed videos @hidden */\n #loops: Record = {};\n /** Continously detect video frames\n * @param element - HTMLVideoElement input\n * @param run - boolean run continously or stop if already running, default true\n * @param delay - number delay detection between frames for number of miliseconds, default 0\n */\n async video(element: HTMLVideoElement, run: boolean = true, delay: number = 0) {\n if (run) {\n if (!this.#loops[element.id]) {\n if (this.config.debug) log('video start', element.id);\n this.#loops[element.id] = true;\n }\n if (!element.paused && this.#loops[element.id] && (element.readyState >= 2)) await this.detect(element);\n if (delay > 0) await this.sleep(delay);\n if (this.#loops[element.id]) requestAnimationFrame(() => this.video(element, run, delay));\n } else {\n if (this.config.debug) log('video stop', element.id);\n this.#loops[element.id] = false;\n }\n }\n}\n\n/** Class Human as default export */\n/* eslint no-restricted-exports: [\"off\", { \"restrictedNamedExports\": [\"default\"] }] */\nexport { Human as default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AA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QAC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EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAA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A,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;A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EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AACA,WAAW,gBAAgB,gBAAgB;AACzC,iBAAe,YAAY;AAC7B;AAGA,IAAI,OAAO,IAAI;AACf,KAAK;AAAA,EACH;AAAA,EACA,YAAY,YAAY,SAAS,IAAI,WAAW;AAAA,IAC9C;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,I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,cAAM,KAAK,OAAO,OAAO;AACtG,UAAI,QAAQ;AAAG,cAAM,KAAK,MAAM,KAAK;AACrC,UAAI,mBAAK,QAAO,QAAQ;AAAK,8BAAsB,MAAM,KAAK,MAAM,SAAS,KAAK,KAAK,CAAC;AAAA,IAC1F,OAAO;AACL,UAAI,KAAK,OAAO;AAAO,YAAI,cAAc,QAAQ,EAAE;AACnD,yBAAK,QAAO,QAAQ,MAAM;AAAA,IAC5B;AAAA,EACF;AACF;AA7dE;AACA;AACA;AA+EA;AAwXA;", - "names": ["config", "log2", "__defProp", "__export", "all5", "cache", "size", "compare", "log22", "t", "copy", "init2", "mask", "options", "count2", "t2", "instance", "now2", "index", "canvas", "object", "strides", "log", "config", "now", "node", "lines", "size2", "labels", "outputSize", "scale2", "alpha", "half", "middle", "labels2", "inputSize", "padding", "lastTime", "model2", "constants", "maxSize", "node2", "outputNodes", "match", "skipped", "strides2", "body", "match", "index", "cos", "sin", "size", "func", "image", "squeeze", "min", "max", "sub", "range", "rgb", "reshape", "env", "input", "process", "config", "getTensor", "tensor", "rgb", "cast", "t", "env", "ready", "init", "config", "model", "models_exports", "load", "reset", "validate", "model", "config", "env", "image", "count", "init", "input", "image", "norm", "size", "dot", "size", "inputSize", "anchors", "dot", "input", "face", "env", "model", "load", "config", "env", "t", "tensor", "inputSize", "anchors", "outputSize", "coords", "min", "max", "square", "scale", "env", "models", "inputSize", "skipped", "lastTime", "sigmoid", "config", "input", "size", "t", "tensor", "outputSize", "kpt", "config", "models", "sigmoid", "inputSize", "distance", "annotations", "body", "predict", "lastTime", "skipped", "model", "inputSize", "last", "lastTime", "skipped", "load", "config", "env", "process", "t", "tensor", "predict", "input", "outputSize", "connected", "kpt", "model", "lastTime", "cache", "skipped", "load", "config", "env", "max", "mod", "div", "predict", "image", "tensor", "enhance", "norm", "squeeze", "stack", "x", "y", "kpt", "connected", "model", "last", "lastCount", "lastTime", "skipped", "load", "config", "env", "predict", "image", "count", "_a", "t", "inputSize", "tensor", "model", "inputSize", "load", "config", "env", "index", "face", "connectionsToIndices", "index", "t", "cache", "model", "inputSize", "predict", "input", "config", "size", "face", "env", "t", "index", "load", "model", "last", "lastTime", "lastCount", "skipped", "load", "config", "env", "input", "tensor", "norm", "predict", "image", "count", "_a", "t", "gender", "argmax", "all", "model", "last", "lastCount", "lastTime", "skipped", "load", "config", "env", "predict", "image", "count", "_a", "_b", "t", "gender", "age", "tensor", "getBoxSize", "getBoxCenter", "image", "scaleBoxCoordinates", "enlargeBox", "size", "squarifyBox", "normalizeRadians", "computeRotation", "buildTranslationMatrix", "dot", "getColumnFrom2DArr", "multiplyTransformMatrices", "size", "buildRotationMatrix", "invertTransformMatrix", "rotatePoint", "anchors", "model", "anchors", "t", "tensor", "index", "input", "config", "p", "hand", "scaleBoxCoordinates", "lastTime", "handPoseModel", "rotatePoint", "enlargeBox", "squarifyBox", "getBoxSize", "buildRotationMatrix", "invertTransformMatrix", "getBoxCenter", "dot", "image", "config", "computeRotation", "env", "coords", "options", "point", "point2", "gesture", "meshAnnotations", "predict", "input", "config", "annotations", "index", "load", "env", "models", "inputSize", "skipped", "lastTime", "cache", "loadDetect", "config", "env", "input", "config", "models", "t", "ratio", "scale", "hand", "tensor", "inputSize", "kpt", "index", "predict", "skipped", "lastTime", "cache", "square", "model", "last", "lastCount", "lastTime", "skipped", "load", "config", "env", "predict", "input", "count", "_a", "t", "tensor", "model", "cached", "skipped", "lastCount", "lastTime", "load", "config", "env", "predict", "image", "count", "model", "load", "config", "env", "predict", "input", "t", "tensor", "model", "last", "lastCount", "lastTime", "skipped", "load", "config", "env", "predict", "input", "count", "_a", "t", "tensor", "connected", "kpt", "cache", "body", "compare", "input", "inputSize", "t", "tensor", "outputSize", "kpt", "model", "inputSize", "skipped", "cache", "load", "config", "env", "image", "kpt", "annotations", "connected", "body", "predict", "input", "t", "tensor", "model", "last", "lastTime", "skipped", "inputSize", "load", "config", "env", "process", "size", "predict", "image", "outputSize", "count", "maxSize", "max", "t", "count", "outputStride", "clamp", "min", "max", "model", "point", "height", "width", "clamp", "minConfidence", "predict", "input", "config", "tensor", "t", "load", "env", "model", "outputNodes", "init", "config", "load", "env", "squeeze", "mul", "cast", "rgb", "predict", "input", "model", "load", "config", "env", "predict", "input", "t", "tensor", "model", "last", "lastCount", "lastTime", "skipped", "load", "config", "env", "predict", "image", "count", "_a", "t", "tensor", "model", "last", "lastCount", "lastTime", "skipped", "load", "config", "env", "predict", "image", "count", "_a", "t", "normalize", "tensor", "reset", "model", "load", "env", "loadDetect", "op", "validate", "config", "instance", "reset", "config", "env", "op", "backend", "t", "instance", "init", "all", "canvas", "options", "input", "opt", "rgb", "options", "labels", "emotion", "index", "inCanvas", "options", "inCanvas", "options", "connected", "inCanvas", "options", "inCanvas", "options", "inCanvas", "options", "where", "inCanvas", "options", "canvas", "input", "all", "env", "face", "buffer", "face", "normalize", "size", "instance", "input", "predict", "env", "tensor", "body", "face", "iris", "hand", "calc", "config", "_a", "_b", "_c", "_d", "_e", "_f", "_g", "_h", "_i", "annotations", "coords", "env", "match", "options", "sum", "min", "max", "norm", "clamp", "index", "join", "face", "person", "body", "hand", "gesture", "face", "body", "instance", "res", "face", "body", "env", "canvas", "tensor", "atob", "model", "t", "models_exports", "Human", "input", "match", "env", "version", "options", "canvas", "all", "config", "validate", "getTensor", "process", "tensor", "predict", "count", "model", "load", "calc", "profile", "face", "body", "hand", "iris", "join"] + "sourcesContent": ["import type { Config } from '../exports';\n\n/**\n * Simple helper functions used accross codebase\n */\n\n// helper function: wrapper around console output\nexport function log(...msg): void {\n const dt = new Date();\n const ts = `${dt.getHours().toString().padStart(2, '0')}:${dt.getMinutes().toString().padStart(2, '0')}:${dt.getSeconds().toString().padStart(2, '0')}.${dt.getMilliseconds().toString().padStart(3, '0')}`;\n if (msg) console.log(ts, 'Human:', ...msg); // eslint-disable-line no-console\n}\n\n// helper function: join two paths\nexport function join(folder: string, file: string): string {\n const separator = folder.endsWith('/') ? '' : '/';\n const skipJoin = file.startsWith('.') || file.startsWith('/') || file.startsWith('http:') || file.startsWith('https:') || file.startsWith('file:');\n const path = skipJoin ? `${file}` : `${folder}${separator}${file}`;\n if (!path.toLocaleLowerCase().includes('.json')) throw new Error(`modelpath error: expecting json file: ${path}`);\n return path;\n}\n\n// helper function: gets elapsed time on both browser and nodejs\nexport const now = () => {\n if (typeof performance !== 'undefined') return performance.now();\n return parseInt((Number(process.hrtime.bigint()) / 1000 / 1000).toString());\n};\n\n// helper function: checks current config validity\nexport function validate(defaults: Partial, config: Partial, parent = 'config', msgs: { reason: string, where: string, expected?: string }[] = []) {\n for (const key of Object.keys(config)) {\n if (typeof config[key] === 'object') {\n validate(defaults[key], config[key], key, msgs);\n } else {\n const defined = defaults && (typeof defaults[key] !== 'undefined');\n if (!defined) msgs.push({ reason: 'unknown property', where: `${parent}.${key} = ${config[key]}` });\n const same = defaults && typeof defaults[key] === typeof config[key];\n if (defined && !same) msgs.push({ reason: 'property type mismatch', where: `${parent}.${key} = ${config[key]}`, expected: typeof defaults[key] });\n }\n // ok = ok && defined && same;\n }\n if (config.debug && parent === 'config' && msgs.length > 0) log('invalid configuration', msgs);\n return msgs;\n}\n\n// helper function: perform deep merge of multiple objects so it allows full inheritance with overrides\nexport function mergeDeep(...objects) {\n const isObject = (obj) => obj && typeof obj === 'object';\n return objects.reduce((prev, obj) => {\n Object.keys(obj || {}).forEach((key) => {\n const pVal = prev[key];\n const oVal = obj[key];\n if (Array.isArray(pVal) && Array.isArray(oVal)) prev[key] = pVal.concat(...oVal);\n else if (isObject(pVal) && isObject(oVal)) prev[key] = mergeDeep(pVal, oVal);\n else prev[key] = oVal;\n });\n return prev;\n }, {});\n}\n\n// helper function: return min and max from input array\nexport const minmax = (data: number[]) => data.reduce((acc: number[], val) => {\n acc[0] = (acc[0] === undefined || val < acc[0]) ? val : acc[0];\n acc[1] = (acc[1] === undefined || val > acc[1]) ? val : acc[1];\n return acc;\n}, []);\n\n// helper function: async wait\nexport async function wait(time: number) {\n const waiting = new Promise((resolve) => { setTimeout(() => resolve(true), time); });\n await waiting;\n}\n", "/* eslint-disable no-multi-spaces */\n\n/** Possible TensorFlow backends */\nexport type BackendEnum = '' | 'cpu' | 'wasm' | 'webgl' | 'humangl' | 'tensorflow' | 'webgpu';\n\n/** Possible values for `human.warmup` */\nexport type WarmupEnum = '' | 'none' | 'face' | 'full' | 'body';\n\n/** Possible segmentation model behavior */\nexport type SegmentationEnum = 'default' | 'alpha' | 'foreground' | 'state'\n\n/** Generic config type inherited by all module types */\nexport interface GenericConfig {\n /** is module enabled? */\n enabled: boolean,\n /** path to model json file (relative to `modelBasePath` */\n modelPath: string,\n /** how many max frames to go without re-running model if cached results are acceptable\n * for two-phase models such as face and hand caching applies to bounding boxes detection only */\n skipFrames: number,\n /** how many max milliseconds to go without re-running model if cached results are acceptable\n * for two-phase models such as face and hand caching applies to bounding boxes detection only */\n skipTime: number,\n}\n\n/** Detector part of face configuration */\nexport interface FaceDetectorConfig extends GenericConfig {\n /** is face rotation correction performed after detecting face?\n * used to correctly analyze faces under high angles\n */\n rotation: boolean,\n /** maximum number of detected faces */\n maxDetected: number,\n /** minimum confidence for a detected face before results are discarded */\n minConfidence: number,\n /** minimum overlap between two detected faces before one is discarded */\n iouThreshold: number,\n /** should child models perform on masked image of a face */\n mask: boolean,\n /** should face detection return processed and cropped face tensor that can with an external model for addtional processing?\n * if enabled it must be manually deallocated to avoid memory leak */\n return: boolean,\n}\n\n/** Mesh part of face configuration */\nexport interface FaceMeshConfig extends GenericConfig {\n /** Keep detected faces that cannot be verified using facemesh */\n keepInvalid: boolean\n}\n\n/** Iris part of face configuration */\nexport interface FaceIrisConfig extends GenericConfig {}\n\n/** Attention part of face configuration */\nexport interface FaceAttentionConfig extends GenericConfig {}\n\n/** Description or face embedding part of face configuration\n * - also used by age and gender detection\n */\nexport interface FaceDescriptionConfig extends GenericConfig {\n /** minimum confidence for a detected face before results are discarded */\n minConfidence: number,\n}\n\n/** Emotion part of face configuration */\nexport interface FaceEmotionConfig extends GenericConfig {\n /** minimum confidence for a detected face before results are discarded */\n minConfidence: number,\n}\n\n/** Anti-spoofing part of face configuration */\nexport interface FaceAntiSpoofConfig extends GenericConfig {}\n\n/** Liveness part of face configuration */\nexport interface FaceLivenessConfig extends GenericConfig {}\n\n/** Gear part of face configuration */\nexport interface FaceGearConfig extends GenericConfig {\n /** minimum confidence for a detected race before results are discarded */\n minConfidence: number,\n}\n\n/** Configures all face-specific options: face detection, mesh analysis, age, gender, emotion detection and face description */\nexport interface FaceConfig extends GenericConfig {\n detector: Partial,\n mesh: Partial,\n attention: Partial,\n iris: Partial,\n description: Partial,\n emotion: Partial,\n antispoof: Partial,\n liveness: Partial,\n gear: Partial,\n}\n\n/** Configures all body detection specific options */\nexport interface BodyConfig extends GenericConfig {\n /** maximum number of detected bodies */\n maxDetected: number,\n /** minimum confidence for a detected body before results are discarded */\n minConfidence: number,\n /* experimental\n /** experimental: detector used for body model before actual analysis\n detector?: {\n /** experimental: enable body detector before body landmarks\n enabled: boolean,\n /** experimental: path to optional body detector model json file\n modelPath: string,\n /** experimental: minimum confidence for a detected body before results are discarded\n minConfidence: number,\n /** experimental: minimum overlap between two detected bodies before one is discarded\n iouThreshold: number\n },\n */\n}\n\n/** Configures all hand detection specific options */\nexport interface HandConfig extends GenericConfig {\n /** should hand rotation correction be performed after hand detection? */\n rotation: boolean,\n /** minimum confidence for a detected hand before results are discarded */\n minConfidence: number,\n /** minimum overlap between two detected hands before one is discarded */\n iouThreshold: number,\n /** maximum number of detected hands */\n maxDetected: number,\n /** should hand landmarks be detected or just return detected hand box */\n landmarks: boolean,\n detector: {\n /** path to hand detector model json */\n modelPath?: string,\n },\n skeleton: {\n /** path to hand skeleton model json */\n modelPath?: string,\n },\n}\n\n/** Configures all object detection specific options */\nexport interface ObjectConfig extends GenericConfig {\n /** minimum confidence for a detected objects before results are discarded */\n minConfidence: number,\n /** minimum overlap between two detected objects before one is discarded */\n iouThreshold: number,\n /** maximum number of detected objects */\n maxDetected: number,\n}\n\n/** Configures all body segmentation module\n * removes background from input containing person\n * if segmentation is enabled it will run as preprocessing task before any other model\n * alternatively leave it disabled and use it on-demand using human.segmentation method which can\n * remove background or replace it with user-provided background\n*/\nexport interface SegmentationConfig extends GenericConfig {\n /** downsample ratio, adjust to reflect approximately how much of input is taken by body */\n ratio: number,\n /** possible rvm segmentation mode */\n mode: SegmentationEnum,\n}\n\n/** Run input through image filters before inference\n * - available only in Browser environments\n * - image filters run with near-zero latency as they are executed on the GPU using WebGL\n*/\nexport interface FilterConfig {\n /** are image filters enabled? */\n enabled: boolean,\n /** perform image histogram equalization\n * - equalization is performed on input as a whole and detected face before its passed for further analysis\n */\n equalization: boolean,\n /** resize input width\n * - if both width and height are set to 0, there is no resizing\n * - if just one is set, second one is scaled automatically\n * - if both are set, values are used as-is\n */\n width: number,\n /** resize input height\n * - if both width and height are set to 0, there is no resizing\n * - if just one is set, second one is scaled automatically\n * - if both are set, values are used as-is\n */\n height: number,\n /** return processed canvas imagedata in result */\n return: boolean,\n /** flip input as mirror image */\n flip: boolean,\n /** range: -1 (darken) to 1 (lighten) */\n brightness: number,\n /** range: -1 (reduce contrast) to 1 (increase contrast) */\n contrast: number,\n /** range: 0 (no sharpening) to 1 (maximum sharpening) */\n sharpness: number,\n /** range: 0 (no blur) to N (blur radius in pixels) */\n blur: number\n /** range: -1 (reduce saturation) to 1 (increase saturation) */\n saturation: number,\n /** range: 0 (no change) to 360 (hue rotation in degrees) */\n hue: number,\n /** image negative */\n negative: boolean,\n /** image sepia colors */\n sepia: boolean,\n /** image vintage colors */\n vintage: boolean,\n /** image kodachrome colors */\n kodachrome: boolean,\n /** image technicolor colors */\n technicolor: boolean,\n /** image polaroid camera effect */\n polaroid: boolean,\n /** range: 0 (no pixelate) to N (number of pixels to pixelate) */\n pixelate: number,\n}\n\n/** Controlls gesture detection */\nexport interface GestureConfig {\n /** is gesture detection enabled? */\n enabled: boolean,\n}\n/**\n * Configuration interface definition for **Human** library\n * Contains all configurable parameters\n * Defaults: [config](https://github.com/vladmandic/human/blob/main/src/config.ts#L262)\n */\nexport interface Config {\n /** Backend used for TFJS operations\n * valid build-in backends are:\n * - Browser: `cpu`, `wasm`, `webgl`, `humangl`, `webgpu`\n * - NodeJS: `cpu`, `wasm`, `tensorflow`\n * default: `webgl` for browser and `tensorflow` for nodejs\n */\n backend: BackendEnum,\n\n /** Path to *.wasm files if backend is set to `wasm`\n *\n * default: auto-detects to link to CDN `jsdelivr` when running in browser\n */\n wasmPath: string,\n\n /** Force WASM loader to use platform fetch\n *\n * default: false\n */\n wasmPlatformFetch: boolean,\n\n /** Print debug statements to console\n *\n * default: `true`\n */\n debug: boolean,\n\n /** Perform model loading and inference concurrently or sequentially\n *\n * default: `true`\n */\n async: boolean,\n\n /** What to use for `human.warmup()`\n * - warmup pre-initializes all models for faster inference but can take significant time on startup\n * - used by `webgl`, `humangl` and `webgpu` backends\n *\n * default: `full`\n */\n warmup: WarmupEnum,\n\n /** Base model path (typically starting with file://, http:// or https://) for all models\n * - individual modelPath values are relative to this path\n *\n * default: `../models/` for browsers and `file://models/` for nodejs\n */\n modelBasePath: string,\n\n /** Cache models in IndexDB on first sucessfull load\n * default: true if indexdb is available (browsers), false if its not (nodejs)\n */\n cacheModels: boolean,\n\n /** Validate kernel ops used in model during model load\n * default: true\n * any errors will be printed on console but will be treated as non-fatal\n */\n validateModels: boolean,\n\n /** Cache sensitivity\n * - values 0..1 where 0.01 means reset cache if input changed more than 1%\n * - set to 0 to disable caching\n *\n * default: 0.7\n */\n cacheSensitivity: number;\n\n /** Explicit flags passed to initialize TFJS */\n flags: Record,\n\n /** Software Kernels\n * Registers software kernel ops running on CPU when accelerated version of kernel is not found in the current backend\n */\n softwareKernels: boolean,\n\n /** Perform immediate garbage collection on deallocated tensors instead of caching them */\n deallocate: boolean;\n\n /** Internal Variable */\n skipAllowed: boolean;\n\n /** Filter config {@link FilterConfig} */\n filter: Partial,\n\n /** Gesture config {@link GestureConfig} */\n gesture: Partial;\n\n /** Face config {@link FaceConfig} */\n face: Partial,\n\n /** Body config {@link BodyConfig} */\n body: Partial,\n\n /** Hand config {@link HandConfig} */\n hand: Partial,\n\n /** Object config {@link ObjectConfig} */\n object: Partial,\n\n /** Segmentation config {@link SegmentationConfig} */\n segmentation: Partial,\n}\n\n/** - [See all default Config values...](https://github.com/vladmandic/human/blob/main/src/config.ts#L262) */\nconst config: Config = {\n backend: '',\n modelBasePath: '',\n cacheModels: true,\n validateModels: true,\n wasmPath: '',\n wasmPlatformFetch: false,\n debug: false,\n async: true,\n warmup: 'full',\n cacheSensitivity: 0.70,\n skipAllowed: false,\n deallocate: false,\n flags: {},\n softwareKernels: false,\n filter: {\n enabled: true,\n equalization: false,\n width: 0,\n height: 0,\n flip: false,\n return: true,\n brightness: 0,\n contrast: 0,\n sharpness: 0,\n blur: 0,\n saturation: 0,\n hue: 0,\n negative: false,\n sepia: false,\n vintage: false,\n kodachrome: false,\n technicolor: false,\n polaroid: false,\n pixelate: 0,\n },\n gesture: {\n enabled: true,\n },\n face: {\n enabled: true,\n detector: {\n modelPath: 'blazeface.json',\n rotation: true,\n maxDetected: 1,\n skipFrames: 99,\n skipTime: 2500,\n minConfidence: 0.2,\n iouThreshold: 0.1,\n mask: false,\n return: false,\n },\n mesh: {\n enabled: true,\n modelPath: 'facemesh.json',\n keepInvalid: false,\n },\n attention: {\n enabled: false,\n modelPath: 'facemesh-attention.json',\n },\n iris: {\n enabled: true,\n modelPath: 'iris.json',\n },\n emotion: {\n enabled: true,\n minConfidence: 0.1,\n skipFrames: 99,\n skipTime: 1500,\n modelPath: 'emotion.json',\n },\n description: {\n enabled: true,\n modelPath: 'faceres.json',\n skipFrames: 99,\n skipTime: 3000,\n minConfidence: 0.1,\n },\n antispoof: {\n enabled: false,\n skipFrames: 99,\n skipTime: 4000,\n modelPath: 'antispoof.json',\n },\n liveness: {\n enabled: false,\n skipFrames: 99,\n skipTime: 4000,\n modelPath: 'liveness.json',\n },\n },\n body: {\n enabled: true,\n modelPath: 'movenet-lightning.json',\n maxDetected: -1,\n minConfidence: 0.3,\n skipFrames: 1,\n skipTime: 200,\n },\n hand: {\n enabled: true,\n rotation: true,\n skipFrames: 99,\n skipTime: 1000,\n minConfidence: 0.50,\n iouThreshold: 0.2,\n maxDetected: -1,\n landmarks: true,\n detector: {\n modelPath: 'handtrack.json',\n },\n skeleton: {\n modelPath: 'handlandmark-full.json',\n },\n },\n object: {\n enabled: false,\n modelPath: 'mb3-centernet.json',\n minConfidence: 0.2,\n iouThreshold: 0.4,\n maxDetected: 10,\n skipFrames: 99,\n skipTime: 2000,\n },\n segmentation: {\n enabled: false,\n modelPath: 'rvm.json',\n ratio: 0.5,\n mode: 'default',\n },\n};\n\nexport { config as defaults };\n", "/*\n Human\n homepage: \n author: '\n*/\n\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __require = /* @__PURE__ */ ((x) => typeof require !== \"undefined\" ? require : typeof Proxy !== \"undefined\" ? new Proxy(x, {\n get: (a, b) => (typeof require !== \"undefined\" ? require : a)[b]\n}) : x)(function(x) {\n if (typeof require !== \"undefined\")\n return require.apply(this, arguments);\n throw new Error('Dynamic require of \"' + x + '\" is not supported');\n});\nvar __commonJS = (cb, mod4) => function __require2() {\n return mod4 || (0, cb[__getOwnPropNames(cb)[0]])((mod4 = { exports: {} }).exports, mod4), mod4.exports;\n};\nvar __export = (target, all5) => {\n for (var name in all5)\n __defProp(target, name, { get: all5[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod4, isNodeMode, target) => (target = mod4 != null ? __create(__getProtoOf(mod4)) : {}, __copyProps(\n isNodeMode || !mod4 || !mod4.__esModule ? __defProp(target, \"default\", { value: mod4, enumerable: true }) : target,\n mod4\n));\n\n// node_modules/.pnpm/long@4.0.0/node_modules/long/src/long.js\nvar require_long = __commonJS({\n \"node_modules/.pnpm/long@4.0.0/node_modules/long/src/long.js\"(exports, module) {\n module.exports = Long2;\n var wasm = null;\n try {\n wasm = new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([\n 0,\n 97,\n 115,\n 109,\n 1,\n 0,\n 0,\n 0,\n 1,\n 13,\n 2,\n 96,\n 0,\n 1,\n 127,\n 96,\n 4,\n 127,\n 127,\n 127,\n 127,\n 1,\n 127,\n 3,\n 7,\n 6,\n 0,\n 1,\n 1,\n 1,\n 1,\n 1,\n 6,\n 6,\n 1,\n 127,\n 1,\n 65,\n 0,\n 11,\n 7,\n 50,\n 6,\n 3,\n 109,\n 117,\n 108,\n 0,\n 1,\n 5,\n 100,\n 105,\n 118,\n 95,\n 115,\n 0,\n 2,\n 5,\n 100,\n 105,\n 118,\n 95,\n 117,\n 0,\n 3,\n 5,\n 114,\n 101,\n 109,\n 95,\n 115,\n 0,\n 4,\n 5,\n 114,\n 101,\n 109,\n 95,\n 117,\n 0,\n 5,\n 8,\n 103,\n 101,\n 116,\n 95,\n 104,\n 105,\n 103,\n 104,\n 0,\n 0,\n 10,\n 191,\n 1,\n 6,\n 4,\n 0,\n 35,\n 0,\n 11,\n 36,\n 1,\n 1,\n 126,\n 32,\n 0,\n 173,\n 32,\n 1,\n 173,\n 66,\n 32,\n 134,\n 132,\n 32,\n 2,\n 173,\n 32,\n 3,\n 173,\n 66,\n 32,\n 134,\n 132,\n 126,\n 34,\n 4,\n 66,\n 32,\n 135,\n 167,\n 36,\n 0,\n 32,\n 4,\n 167,\n 11,\n 36,\n 1,\n 1,\n 126,\n 32,\n 0,\n 173,\n 32,\n 1,\n 173,\n 66,\n 32,\n 134,\n 132,\n 32,\n 2,\n 173,\n 32,\n 3,\n 173,\n 66,\n 32,\n 134,\n 132,\n 127,\n 34,\n 4,\n 66,\n 32,\n 135,\n 167,\n 36,\n 0,\n 32,\n 4,\n 167,\n 11,\n 36,\n 1,\n 1,\n 126,\n 32,\n 0,\n 173,\n 32,\n 1,\n 173,\n 66,\n 32,\n 134,\n 132,\n 32,\n 2,\n 173,\n 32,\n 3,\n 173,\n 66,\n 32,\n 134,\n 132,\n 128,\n 34,\n 4,\n 66,\n 32,\n 135,\n 167,\n 36,\n 0,\n 32,\n 4,\n 167,\n 11,\n 36,\n 1,\n 1,\n 126,\n 32,\n 0,\n 173,\n 32,\n 1,\n 173,\n 66,\n 32,\n 134,\n 132,\n 32,\n 2,\n 173,\n 32,\n 3,\n 173,\n 66,\n 32,\n 134,\n 132,\n 129,\n 34,\n 4,\n 66,\n 32,\n 135,\n 167,\n 36,\n 0,\n 32,\n 4,\n 167,\n 11,\n 36,\n 1,\n 1,\n 126,\n 32,\n 0,\n 173,\n 32,\n 1,\n 173,\n 66,\n 32,\n 134,\n 132,\n 32,\n 2,\n 173,\n 32,\n 3,\n 173,\n 66,\n 32,\n 134,\n 132,\n 130,\n 34,\n 4,\n 66,\n 32,\n 135,\n 167,\n 36,\n 0,\n 32,\n 4,\n 167,\n 11\n ])), {}).exports;\n } catch (e2) {\n }\n function Long2(low, high, unsigned) {\n this.low = low | 0;\n this.high = high | 0;\n this.unsigned = !!unsigned;\n }\n Long2.prototype.__isLong__;\n Object.defineProperty(Long2.prototype, \"__isLong__\", { value: true });\n function isLong(obj) {\n return (obj && obj[\"__isLong__\"]) === true;\n }\n Long2.isLong = isLong;\n var INT_CACHE = {};\n var UINT_CACHE = {};\n function fromInt(value, unsigned) {\n var obj, cachedObj, cache;\n if (unsigned) {\n value >>>= 0;\n if (cache = 0 <= value && value < 256) {\n cachedObj = UINT_CACHE[value];\n if (cachedObj)\n return cachedObj;\n }\n obj = fromBits(value, (value | 0) < 0 ? -1 : 0, true);\n if (cache)\n UINT_CACHE[value] = obj;\n return obj;\n } else {\n value |= 0;\n if (cache = -128 <= value && value < 128) {\n cachedObj = INT_CACHE[value];\n if (cachedObj)\n return cachedObj;\n }\n obj = fromBits(value, value < 0 ? -1 : 0, false);\n if (cache)\n INT_CACHE[value] = obj;\n return obj;\n }\n }\n Long2.fromInt = fromInt;\n function fromNumber(value, unsigned) {\n if (isNaN(value))\n return unsigned ? UZERO : ZERO;\n if (unsigned) {\n if (value < 0)\n return UZERO;\n if (value >= TWO_PWR_64_DBL)\n return MAX_UNSIGNED_VALUE;\n } else {\n if (value <= -TWO_PWR_63_DBL)\n return MIN_VALUE;\n if (value + 1 >= TWO_PWR_63_DBL)\n return MAX_VALUE;\n }\n if (value < 0)\n return fromNumber(-value, unsigned).neg();\n return fromBits(value % TWO_PWR_32_DBL | 0, value / TWO_PWR_32_DBL | 0, unsigned);\n }\n Long2.fromNumber = fromNumber;\n function fromBits(lowBits, highBits, unsigned) {\n return new Long2(lowBits, highBits, unsigned);\n }\n Long2.fromBits = fromBits;\n var pow_dbl = Math.pow;\n function fromString(str, unsigned, radix) {\n if (str.length === 0)\n throw Error(\"empty string\");\n if (str === \"NaN\" || str === \"Infinity\" || str === \"+Infinity\" || str === \"-Infinity\")\n return ZERO;\n if (typeof unsigned === \"number\") {\n radix = unsigned, unsigned = false;\n } else {\n unsigned = !!unsigned;\n }\n radix = radix || 10;\n if (radix < 2 || 36 < radix)\n throw RangeError(\"radix\");\n var p2;\n if ((p2 = str.indexOf(\"-\")) > 0)\n throw Error(\"interior hyphen\");\n else if (p2 === 0) {\n return fromString(str.substring(1), unsigned, radix).neg();\n }\n var radixToPower = fromNumber(pow_dbl(radix, 8));\n var result = ZERO;\n for (var i2 = 0; i2 < str.length; i2 += 8) {\n var size = Math.min(8, str.length - i2), value = parseInt(str.substring(i2, i2 + size), radix);\n if (size < 8) {\n var power = fromNumber(pow_dbl(radix, size));\n result = result.mul(power).add(fromNumber(value));\n } else {\n result = result.mul(radixToPower);\n result = result.add(fromNumber(value));\n }\n }\n result.unsigned = unsigned;\n return result;\n }\n Long2.fromString = fromString;\n function fromValue(val, unsigned) {\n if (typeof val === \"number\")\n return fromNumber(val, unsigned);\n if (typeof val === \"string\")\n return fromString(val, unsigned);\n return fromBits(val.low, val.high, typeof unsigned === \"boolean\" ? unsigned : val.unsigned);\n }\n Long2.fromValue = fromValue;\n var TWO_PWR_16_DBL = 1 << 16;\n var TWO_PWR_24_DBL = 1 << 24;\n var TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL;\n var TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL;\n var TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2;\n var TWO_PWR_24 = fromInt(TWO_PWR_24_DBL);\n var ZERO = fromInt(0);\n Long2.ZERO = ZERO;\n var UZERO = fromInt(0, true);\n Long2.UZERO = UZERO;\n var ONE = fromInt(1);\n Long2.ONE = ONE;\n var UONE = fromInt(1, true);\n Long2.UONE = UONE;\n var NEG_ONE = fromInt(-1);\n Long2.NEG_ONE = NEG_ONE;\n var MAX_VALUE = fromBits(4294967295 | 0, 2147483647 | 0, false);\n Long2.MAX_VALUE = MAX_VALUE;\n var MAX_UNSIGNED_VALUE = fromBits(4294967295 | 0, 4294967295 | 0, true);\n Long2.MAX_UNSIGNED_VALUE = MAX_UNSIGNED_VALUE;\n var MIN_VALUE = fromBits(0, 2147483648 | 0, false);\n Long2.MIN_VALUE = MIN_VALUE;\n var LongPrototype = Long2.prototype;\n LongPrototype.toInt = function toInt() {\n return this.unsigned ? this.low >>> 0 : this.low;\n };\n LongPrototype.toNumber = function toNumber() {\n if (this.unsigned)\n return (this.high >>> 0) * TWO_PWR_32_DBL + (this.low >>> 0);\n return this.high * TWO_PWR_32_DBL + (this.low >>> 0);\n };\n LongPrototype.toString = function toString(radix) {\n radix = radix || 10;\n if (radix < 2 || 36 < radix)\n throw RangeError(\"radix\");\n if (this.isZero())\n return \"0\";\n if (this.isNegative()) {\n if (this.eq(MIN_VALUE)) {\n var radixLong = fromNumber(radix), div3 = this.div(radixLong), rem1 = div3.mul(radixLong).sub(this);\n return div3.toString(radix) + rem1.toInt().toString(radix);\n } else\n return \"-\" + this.neg().toString(radix);\n }\n var radixToPower = fromNumber(pow_dbl(radix, 6), this.unsigned), rem = this;\n var result = \"\";\n while (true) {\n var remDiv = rem.div(radixToPower), intval = rem.sub(remDiv.mul(radixToPower)).toInt() >>> 0, digits = intval.toString(radix);\n rem = remDiv;\n if (rem.isZero())\n return digits + result;\n else {\n while (digits.length < 6)\n digits = \"0\" + digits;\n result = \"\" + digits + result;\n }\n }\n };\n LongPrototype.getHighBits = function getHighBits() {\n return this.high;\n };\n LongPrototype.getHighBitsUnsigned = function getHighBitsUnsigned() {\n return this.high >>> 0;\n };\n LongPrototype.getLowBits = function getLowBits() {\n return this.low;\n };\n LongPrototype.getLowBitsUnsigned = function getLowBitsUnsigned() {\n return this.low >>> 0;\n };\n LongPrototype.getNumBitsAbs = function getNumBitsAbs() {\n if (this.isNegative())\n return this.eq(MIN_VALUE) ? 64 : this.neg().getNumBitsAbs();\n var val = this.high != 0 ? this.high : this.low;\n for (var bit = 31; bit > 0; bit--)\n if ((val & 1 << bit) != 0)\n break;\n return this.high != 0 ? bit + 33 : bit + 1;\n };\n LongPrototype.isZero = function isZero() {\n return this.high === 0 && this.low === 0;\n };\n LongPrototype.eqz = LongPrototype.isZero;\n LongPrototype.isNegative = function isNegative() {\n return !this.unsigned && this.high < 0;\n };\n LongPrototype.isPositive = function isPositive() {\n return this.unsigned || this.high >= 0;\n };\n LongPrototype.isOdd = function isOdd() {\n return (this.low & 1) === 1;\n };\n LongPrototype.isEven = function isEven2() {\n return (this.low & 1) === 0;\n };\n LongPrototype.equals = function equals(other) {\n if (!isLong(other))\n other = fromValue(other);\n if (this.unsigned !== other.unsigned && this.high >>> 31 === 1 && other.high >>> 31 === 1)\n return false;\n return this.high === other.high && this.low === other.low;\n };\n LongPrototype.eq = LongPrototype.equals;\n LongPrototype.notEquals = function notEquals(other) {\n return !this.eq(other);\n };\n LongPrototype.neq = LongPrototype.notEquals;\n LongPrototype.ne = LongPrototype.notEquals;\n LongPrototype.lessThan = function lessThan(other) {\n return this.comp(other) < 0;\n };\n LongPrototype.lt = LongPrototype.lessThan;\n LongPrototype.lessThanOrEqual = function lessThanOrEqual(other) {\n return this.comp(other) <= 0;\n };\n LongPrototype.lte = LongPrototype.lessThanOrEqual;\n LongPrototype.le = LongPrototype.lessThanOrEqual;\n LongPrototype.greaterThan = function greaterThan(other) {\n return this.comp(other) > 0;\n };\n LongPrototype.gt = LongPrototype.greaterThan;\n LongPrototype.greaterThanOrEqual = function greaterThanOrEqual(other) {\n return this.comp(other) >= 0;\n };\n LongPrototype.gte = LongPrototype.greaterThanOrEqual;\n LongPrototype.ge = LongPrototype.greaterThanOrEqual;\n LongPrototype.compare = function compare(other) {\n if (!isLong(other))\n other = fromValue(other);\n if (this.eq(other))\n return 0;\n var thisNeg = this.isNegative(), otherNeg = other.isNegative();\n if (thisNeg && !otherNeg)\n return -1;\n if (!thisNeg && otherNeg)\n return 1;\n if (!this.unsigned)\n return this.sub(other).isNegative() ? -1 : 1;\n return other.high >>> 0 > this.high >>> 0 || other.high === this.high && other.low >>> 0 > this.low >>> 0 ? -1 : 1;\n };\n LongPrototype.comp = LongPrototype.compare;\n LongPrototype.negate = function negate() {\n if (!this.unsigned && this.eq(MIN_VALUE))\n return MIN_VALUE;\n return this.not().add(ONE);\n };\n LongPrototype.neg = LongPrototype.negate;\n LongPrototype.add = function add5(addend) {\n if (!isLong(addend))\n addend = fromValue(addend);\n var a48 = this.high >>> 16;\n var a32 = this.high & 65535;\n var a16 = this.low >>> 16;\n var a00 = this.low & 65535;\n var b48 = addend.high >>> 16;\n var b32 = addend.high & 65535;\n var b16 = addend.low >>> 16;\n var b00 = addend.low & 65535;\n var c48 = 0, c32 = 0, c16 = 0, c00 = 0;\n c00 += a00 + b00;\n c16 += c00 >>> 16;\n c00 &= 65535;\n c16 += a16 + b16;\n c32 += c16 >>> 16;\n c16 &= 65535;\n c32 += a32 + b32;\n c48 += c32 >>> 16;\n c32 &= 65535;\n c48 += a48 + b48;\n c48 &= 65535;\n return fromBits(c16 << 16 | c00, c48 << 16 | c32, this.unsigned);\n };\n LongPrototype.subtract = function subtract(subtrahend) {\n if (!isLong(subtrahend))\n subtrahend = fromValue(subtrahend);\n return this.add(subtrahend.neg());\n };\n LongPrototype.sub = LongPrototype.subtract;\n LongPrototype.multiply = function multiply4(multiplier) {\n if (this.isZero())\n return ZERO;\n if (!isLong(multiplier))\n multiplier = fromValue(multiplier);\n if (wasm) {\n var low = wasm.mul(\n this.low,\n this.high,\n multiplier.low,\n multiplier.high\n );\n return fromBits(low, wasm.get_high(), this.unsigned);\n }\n if (multiplier.isZero())\n return ZERO;\n if (this.eq(MIN_VALUE))\n return multiplier.isOdd() ? MIN_VALUE : ZERO;\n if (multiplier.eq(MIN_VALUE))\n return this.isOdd() ? MIN_VALUE : ZERO;\n if (this.isNegative()) {\n if (multiplier.isNegative())\n return this.neg().mul(multiplier.neg());\n else\n return this.neg().mul(multiplier).neg();\n } else if (multiplier.isNegative())\n return this.mul(multiplier.neg()).neg();\n if (this.lt(TWO_PWR_24) && multiplier.lt(TWO_PWR_24))\n return fromNumber(this.toNumber() * multiplier.toNumber(), this.unsigned);\n var a48 = this.high >>> 16;\n var a32 = this.high & 65535;\n var a16 = this.low >>> 16;\n var a00 = this.low & 65535;\n var b48 = multiplier.high >>> 16;\n var b32 = multiplier.high & 65535;\n var b16 = multiplier.low >>> 16;\n var b00 = multiplier.low & 65535;\n var c48 = 0, c32 = 0, c16 = 0, c00 = 0;\n c00 += a00 * b00;\n c16 += c00 >>> 16;\n c00 &= 65535;\n c16 += a16 * b00;\n c32 += c16 >>> 16;\n c16 &= 65535;\n c16 += a00 * b16;\n c32 += c16 >>> 16;\n c16 &= 65535;\n c32 += a32 * b00;\n c48 += c32 >>> 16;\n c32 &= 65535;\n c32 += a16 * b16;\n c48 += c32 >>> 16;\n c32 &= 65535;\n c32 += a00 * b32;\n c48 += c32 >>> 16;\n c32 &= 65535;\n c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;\n c48 &= 65535;\n return fromBits(c16 << 16 | c00, c48 << 16 | c32, this.unsigned);\n };\n LongPrototype.mul = LongPrototype.multiply;\n LongPrototype.divide = function divide(divisor) {\n if (!isLong(divisor))\n divisor = fromValue(divisor);\n if (divisor.isZero())\n throw Error(\"division by zero\");\n if (wasm) {\n if (!this.unsigned && this.high === -2147483648 && divisor.low === -1 && divisor.high === -1) {\n return this;\n }\n var low = (this.unsigned ? wasm.div_u : wasm.div_s)(\n this.low,\n this.high,\n divisor.low,\n divisor.high\n );\n return fromBits(low, wasm.get_high(), this.unsigned);\n }\n if (this.isZero())\n return this.unsigned ? UZERO : ZERO;\n var approx, rem, res;\n if (!this.unsigned) {\n if (this.eq(MIN_VALUE)) {\n if (divisor.eq(ONE) || divisor.eq(NEG_ONE))\n return MIN_VALUE;\n else if (divisor.eq(MIN_VALUE))\n return ONE;\n else {\n var halfThis = this.shr(1);\n approx = halfThis.div(divisor).shl(1);\n if (approx.eq(ZERO)) {\n return divisor.isNegative() ? ONE : NEG_ONE;\n } else {\n rem = this.sub(divisor.mul(approx));\n res = approx.add(rem.div(divisor));\n return res;\n }\n }\n } else if (divisor.eq(MIN_VALUE))\n return this.unsigned ? UZERO : ZERO;\n if (this.isNegative()) {\n if (divisor.isNegative())\n return this.neg().div(divisor.neg());\n return this.neg().div(divisor).neg();\n } else if (divisor.isNegative())\n return this.div(divisor.neg()).neg();\n res = ZERO;\n } else {\n if (!divisor.unsigned)\n divisor = divisor.toUnsigned();\n if (divisor.gt(this))\n return UZERO;\n if (divisor.gt(this.shru(1)))\n return UONE;\n res = UZERO;\n }\n rem = this;\n while (rem.gte(divisor)) {\n approx = Math.max(1, Math.floor(rem.toNumber() / divisor.toNumber()));\n var log22 = Math.ceil(Math.log(approx) / Math.LN2), delta = log22 <= 48 ? 1 : pow_dbl(2, log22 - 48), approxRes = fromNumber(approx), approxRem = approxRes.mul(divisor);\n while (approxRem.isNegative() || approxRem.gt(rem)) {\n approx -= delta;\n approxRes = fromNumber(approx, this.unsigned);\n approxRem = approxRes.mul(divisor);\n }\n if (approxRes.isZero())\n approxRes = ONE;\n res = res.add(approxRes);\n rem = rem.sub(approxRem);\n }\n return res;\n };\n LongPrototype.div = LongPrototype.divide;\n LongPrototype.modulo = function modulo(divisor) {\n if (!isLong(divisor))\n divisor = fromValue(divisor);\n if (wasm) {\n var low = (this.unsigned ? wasm.rem_u : wasm.rem_s)(\n this.low,\n this.high,\n divisor.low,\n divisor.high\n );\n return fromBits(low, wasm.get_high(), this.unsigned);\n }\n return this.sub(this.div(divisor).mul(divisor));\n };\n LongPrototype.mod = LongPrototype.modulo;\n LongPrototype.rem = LongPrototype.modulo;\n LongPrototype.not = function not() {\n return fromBits(~this.low, ~this.high, this.unsigned);\n };\n LongPrototype.and = function and(other) {\n if (!isLong(other))\n other = fromValue(other);\n return fromBits(this.low & other.low, this.high & other.high, this.unsigned);\n };\n LongPrototype.or = function or(other) {\n if (!isLong(other))\n other = fromValue(other);\n return fromBits(this.low | other.low, this.high | other.high, this.unsigned);\n };\n LongPrototype.xor = function xor(other) {\n if (!isLong(other))\n other = fromValue(other);\n return fromBits(this.low ^ other.low, this.high ^ other.high, this.unsigned);\n };\n LongPrototype.shiftLeft = function shiftLeft(numBits) {\n if (isLong(numBits))\n numBits = numBits.toInt();\n if ((numBits &= 63) === 0)\n return this;\n else if (numBits < 32)\n return fromBits(this.low << numBits, this.high << numBits | this.low >>> 32 - numBits, this.unsigned);\n else\n return fromBits(0, this.low << numBits - 32, this.unsigned);\n };\n LongPrototype.shl = LongPrototype.shiftLeft;\n LongPrototype.shiftRight = function shiftRight(numBits) {\n if (isLong(numBits))\n numBits = numBits.toInt();\n if ((numBits &= 63) === 0)\n return this;\n else if (numBits < 32)\n return fromBits(this.low >>> numBits | this.high << 32 - numBits, this.high >> numBits, this.unsigned);\n else\n return fromBits(this.high >> numBits - 32, this.high >= 0 ? 0 : -1, this.unsigned);\n };\n LongPrototype.shr = LongPrototype.shiftRight;\n LongPrototype.shiftRightUnsigned = function shiftRightUnsigned(numBits) {\n if (isLong(numBits))\n numBits = numBits.toInt();\n numBits &= 63;\n if (numBits === 0)\n return this;\n else {\n var high = this.high;\n if (numBits < 32) {\n var low = this.low;\n return fromBits(low >>> numBits | high << 32 - numBits, high >>> numBits, this.unsigned);\n } else if (numBits === 32)\n return fromBits(high, 0, this.unsigned);\n else\n return fromBits(high >>> numBits - 32, 0, this.unsigned);\n }\n };\n LongPrototype.shru = LongPrototype.shiftRightUnsigned;\n LongPrototype.shr_u = LongPrototype.shiftRightUnsigned;\n LongPrototype.toSigned = function toSigned() {\n if (!this.unsigned)\n return this;\n return fromBits(this.low, this.high, false);\n };\n LongPrototype.toUnsigned = function toUnsigned() {\n if (this.unsigned)\n return this;\n return fromBits(this.low, this.high, true);\n };\n LongPrototype.toBytes = function toBytes(le) {\n return le ? this.toBytesLE() : this.toBytesBE();\n };\n LongPrototype.toBytesLE = function toBytesLE() {\n var hi = this.high, lo = this.low;\n return [\n lo & 255,\n lo >>> 8 & 255,\n lo >>> 16 & 255,\n lo >>> 24,\n hi & 255,\n hi >>> 8 & 255,\n hi >>> 16 & 255,\n hi >>> 24\n ];\n };\n LongPrototype.toBytesBE = function toBytesBE() {\n var hi = this.high, lo = this.low;\n return [\n hi >>> 24,\n hi >>> 16 & 255,\n hi >>> 8 & 255,\n hi & 255,\n lo >>> 24,\n lo >>> 16 & 255,\n lo >>> 8 & 255,\n lo & 255\n ];\n };\n Long2.fromBytes = function fromBytes(bytes, unsigned, le) {\n return le ? Long2.fromBytesLE(bytes, unsigned) : Long2.fromBytesBE(bytes, unsigned);\n };\n Long2.fromBytesLE = function fromBytesLE(bytes, unsigned) {\n return new Long2(\n bytes[0] | bytes[1] << 8 | bytes[2] << 16 | bytes[3] << 24,\n bytes[4] | bytes[5] << 8 | bytes[6] << 16 | bytes[7] << 24,\n unsigned\n );\n };\n Long2.fromBytesBE = function fromBytesBE(bytes, unsigned) {\n return new Long2(\n bytes[4] << 24 | bytes[5] << 16 | bytes[6] << 8 | bytes[7],\n bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3],\n unsigned\n );\n };\n }\n});\n\n// (disabled):node_modules/.pnpm/node-fetch@2.6.7/node_modules/node-fetch/browser.js\nvar require_browser = __commonJS({\n \"(disabled):node_modules/.pnpm/node-fetch@2.6.7/node_modules/node-fetch/browser.js\"() {\n }\n});\n\n// (disabled):util\nvar require_util = __commonJS({\n \"(disabled):util\"() {\n }\n});\n\n// node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/alea.js\nvar require_alea = __commonJS({\n \"node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/alea.js\"(exports, module) {\n (function(global2, module2, define2) {\n function Alea(seed) {\n var me = this, mash = Mash();\n me.next = function() {\n var t2 = 2091639 * me.s0 + me.c * 23283064365386963e-26;\n me.s0 = me.s1;\n me.s1 = me.s2;\n return me.s2 = t2 - (me.c = t2 | 0);\n };\n me.c = 1;\n me.s0 = mash(\" \");\n me.s1 = mash(\" \");\n me.s2 = mash(\" \");\n me.s0 -= mash(seed);\n if (me.s0 < 0) {\n me.s0 += 1;\n }\n me.s1 -= mash(seed);\n if (me.s1 < 0) {\n me.s1 += 1;\n }\n me.s2 -= mash(seed);\n if (me.s2 < 0) {\n me.s2 += 1;\n }\n mash = null;\n }\n function copy(f, t2) {\n t2.c = f.c;\n t2.s0 = f.s0;\n t2.s1 = f.s1;\n t2.s2 = f.s2;\n return t2;\n }\n function impl(seed, opts) {\n var xg = new Alea(seed), state = opts && opts.state, prng = xg.next;\n prng.int32 = function() {\n return xg.next() * 4294967296 | 0;\n };\n prng.double = function() {\n return prng() + (prng() * 2097152 | 0) * 11102230246251565e-32;\n };\n prng.quick = prng;\n if (state) {\n if (typeof state == \"object\")\n copy(state, xg);\n prng.state = function() {\n return copy(xg, {});\n };\n }\n return prng;\n }\n function Mash() {\n var n2 = 4022871197;\n var mash = function(data) {\n data = String(data);\n for (var i2 = 0; i2 < data.length; i2++) {\n n2 += data.charCodeAt(i2);\n var h = 0.02519603282416938 * n2;\n n2 = h >>> 0;\n h -= n2;\n h *= n2;\n n2 = h >>> 0;\n h -= n2;\n n2 += h * 4294967296;\n }\n return (n2 >>> 0) * 23283064365386963e-26;\n };\n return mash;\n }\n if (module2 && module2.exports) {\n module2.exports = impl;\n } else if (define2 && define2.amd) {\n define2(function() {\n return impl;\n });\n } else {\n this.alea = impl;\n }\n })(\n exports,\n typeof module == \"object\" && module,\n typeof define == \"function\" && define\n );\n }\n});\n\n// node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/xor128.js\nvar require_xor128 = __commonJS({\n \"node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/xor128.js\"(exports, module) {\n (function(global2, module2, define2) {\n function XorGen(seed) {\n var me = this, strseed = \"\";\n me.x = 0;\n me.y = 0;\n me.z = 0;\n me.w = 0;\n me.next = function() {\n var t2 = me.x ^ me.x << 11;\n me.x = me.y;\n me.y = me.z;\n me.z = me.w;\n return me.w ^= me.w >>> 19 ^ t2 ^ t2 >>> 8;\n };\n if (seed === (seed | 0)) {\n me.x = seed;\n } else {\n strseed += seed;\n }\n for (var k = 0; k < strseed.length + 64; k++) {\n me.x ^= strseed.charCodeAt(k) | 0;\n me.next();\n }\n }\n function copy(f, t2) {\n t2.x = f.x;\n t2.y = f.y;\n t2.z = f.z;\n t2.w = f.w;\n return t2;\n }\n function impl(seed, opts) {\n var xg = new XorGen(seed), state = opts && opts.state, prng = function() {\n return (xg.next() >>> 0) / 4294967296;\n };\n prng.double = function() {\n do {\n var top = xg.next() >>> 11, bot = (xg.next() >>> 0) / 4294967296, result = (top + bot) / (1 << 21);\n } while (result === 0);\n return result;\n };\n prng.int32 = xg.next;\n prng.quick = prng;\n if (state) {\n if (typeof state == \"object\")\n copy(state, xg);\n prng.state = function() {\n return copy(xg, {});\n };\n }\n return prng;\n }\n if (module2 && module2.exports) {\n module2.exports = impl;\n } else if (define2 && define2.amd) {\n define2(function() {\n return impl;\n });\n } else {\n this.xor128 = impl;\n }\n })(\n exports,\n typeof module == \"object\" && module,\n typeof define == \"function\" && define\n );\n }\n});\n\n// node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/xorwow.js\nvar require_xorwow = __commonJS({\n \"node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/xorwow.js\"(exports, module) {\n (function(global2, module2, define2) {\n function XorGen(seed) {\n var me = this, strseed = \"\";\n me.next = function() {\n var t2 = me.x ^ me.x >>> 2;\n me.x = me.y;\n me.y = me.z;\n me.z = me.w;\n me.w = me.v;\n return (me.d = me.d + 362437 | 0) + (me.v = me.v ^ me.v << 4 ^ (t2 ^ t2 << 1)) | 0;\n };\n me.x = 0;\n me.y = 0;\n me.z = 0;\n me.w = 0;\n me.v = 0;\n if (seed === (seed | 0)) {\n me.x = seed;\n } else {\n strseed += seed;\n }\n for (var k = 0; k < strseed.length + 64; k++) {\n me.x ^= strseed.charCodeAt(k) | 0;\n if (k == strseed.length) {\n me.d = me.x << 10 ^ me.x >>> 4;\n }\n me.next();\n }\n }\n function copy(f, t2) {\n t2.x = f.x;\n t2.y = f.y;\n t2.z = f.z;\n t2.w = f.w;\n t2.v = f.v;\n t2.d = f.d;\n return t2;\n }\n function impl(seed, opts) {\n var xg = new XorGen(seed), state = opts && opts.state, prng = function() {\n return (xg.next() >>> 0) / 4294967296;\n };\n prng.double = function() {\n do {\n var top = xg.next() >>> 11, bot = (xg.next() >>> 0) / 4294967296, result = (top + bot) / (1 << 21);\n } while (result === 0);\n return result;\n };\n prng.int32 = xg.next;\n prng.quick = prng;\n if (state) {\n if (typeof state == \"object\")\n copy(state, xg);\n prng.state = function() {\n return copy(xg, {});\n };\n }\n return prng;\n }\n if (module2 && module2.exports) {\n module2.exports = impl;\n } else if (define2 && define2.amd) {\n define2(function() {\n return impl;\n });\n } else {\n this.xorwow = impl;\n }\n })(\n exports,\n typeof module == \"object\" && module,\n typeof define == \"function\" && define\n );\n }\n});\n\n// node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/xorshift7.js\nvar require_xorshift7 = __commonJS({\n \"node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/xorshift7.js\"(exports, module) {\n (function(global2, module2, define2) {\n function XorGen(seed) {\n var me = this;\n me.next = function() {\n var X = me.x, i2 = me.i, t2, v, w;\n t2 = X[i2];\n t2 ^= t2 >>> 7;\n v = t2 ^ t2 << 24;\n t2 = X[i2 + 1 & 7];\n v ^= t2 ^ t2 >>> 10;\n t2 = X[i2 + 3 & 7];\n v ^= t2 ^ t2 >>> 3;\n t2 = X[i2 + 4 & 7];\n v ^= t2 ^ t2 << 7;\n t2 = X[i2 + 7 & 7];\n t2 = t2 ^ t2 << 13;\n v ^= t2 ^ t2 << 9;\n X[i2] = v;\n me.i = i2 + 1 & 7;\n return v;\n };\n function init2(me2, seed2) {\n var j, w, X = [];\n if (seed2 === (seed2 | 0)) {\n w = X[0] = seed2;\n } else {\n seed2 = \"\" + seed2;\n for (j = 0; j < seed2.length; ++j) {\n X[j & 7] = X[j & 7] << 15 ^ seed2.charCodeAt(j) + X[j + 1 & 7] << 13;\n }\n }\n while (X.length < 8)\n X.push(0);\n for (j = 0; j < 8 && X[j] === 0; ++j)\n ;\n if (j == 8)\n w = X[7] = -1;\n else\n w = X[j];\n me2.x = X;\n me2.i = 0;\n for (j = 256; j > 0; --j) {\n me2.next();\n }\n }\n init2(me, seed);\n }\n function copy(f, t2) {\n t2.x = f.x.slice();\n t2.i = f.i;\n return t2;\n }\n function impl(seed, opts) {\n if (seed == null)\n seed = +new Date();\n var xg = new XorGen(seed), state = opts && opts.state, prng = function() {\n return (xg.next() >>> 0) / 4294967296;\n };\n prng.double = function() {\n do {\n var top = xg.next() >>> 11, bot = (xg.next() >>> 0) / 4294967296, result = (top + bot) / (1 << 21);\n } while (result === 0);\n return result;\n };\n prng.int32 = xg.next;\n prng.quick = prng;\n if (state) {\n if (state.x)\n copy(state, xg);\n prng.state = function() {\n return copy(xg, {});\n };\n }\n return prng;\n }\n if (module2 && module2.exports) {\n module2.exports = impl;\n } else if (define2 && define2.amd) {\n define2(function() {\n return impl;\n });\n } else {\n this.xorshift7 = impl;\n }\n })(\n exports,\n typeof module == \"object\" && module,\n typeof define == \"function\" && define\n );\n }\n});\n\n// node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/xor4096.js\nvar require_xor4096 = __commonJS({\n \"node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/xor4096.js\"(exports, module) {\n (function(global2, module2, define2) {\n function XorGen(seed) {\n var me = this;\n me.next = function() {\n var w = me.w, X = me.X, i2 = me.i, t2, v;\n me.w = w = w + 1640531527 | 0;\n v = X[i2 + 34 & 127];\n t2 = X[i2 = i2 + 1 & 127];\n v ^= v << 13;\n t2 ^= t2 << 17;\n v ^= v >>> 15;\n t2 ^= t2 >>> 12;\n v = X[i2] = v ^ t2;\n me.i = i2;\n return v + (w ^ w >>> 16) | 0;\n };\n function init2(me2, seed2) {\n var t2, v, i2, j, w, X = [], limit = 128;\n if (seed2 === (seed2 | 0)) {\n v = seed2;\n seed2 = null;\n } else {\n seed2 = seed2 + \"\\0\";\n v = 0;\n limit = Math.max(limit, seed2.length);\n }\n for (i2 = 0, j = -32; j < limit; ++j) {\n if (seed2)\n v ^= seed2.charCodeAt((j + 32) % seed2.length);\n if (j === 0)\n w = v;\n v ^= v << 10;\n v ^= v >>> 15;\n v ^= v << 4;\n v ^= v >>> 13;\n if (j >= 0) {\n w = w + 1640531527 | 0;\n t2 = X[j & 127] ^= v + w;\n i2 = 0 == t2 ? i2 + 1 : 0;\n }\n }\n if (i2 >= 128) {\n X[(seed2 && seed2.length || 0) & 127] = -1;\n }\n i2 = 127;\n for (j = 4 * 128; j > 0; --j) {\n v = X[i2 + 34 & 127];\n t2 = X[i2 = i2 + 1 & 127];\n v ^= v << 13;\n t2 ^= t2 << 17;\n v ^= v >>> 15;\n t2 ^= t2 >>> 12;\n X[i2] = v ^ t2;\n }\n me2.w = w;\n me2.X = X;\n me2.i = i2;\n }\n init2(me, seed);\n }\n function copy(f, t2) {\n t2.i = f.i;\n t2.w = f.w;\n t2.X = f.X.slice();\n return t2;\n }\n ;\n function impl(seed, opts) {\n if (seed == null)\n seed = +new Date();\n var xg = new XorGen(seed), state = opts && opts.state, prng = function() {\n return (xg.next() >>> 0) / 4294967296;\n };\n prng.double = function() {\n do {\n var top = xg.next() >>> 11, bot = (xg.next() >>> 0) / 4294967296, result = (top + bot) / (1 << 21);\n } while (result === 0);\n return result;\n };\n prng.int32 = xg.next;\n prng.quick = prng;\n if (state) {\n if (state.X)\n copy(state, xg);\n prng.state = function() {\n return copy(xg, {});\n };\n }\n return prng;\n }\n if (module2 && module2.exports) {\n module2.exports = impl;\n } else if (define2 && define2.amd) {\n define2(function() {\n return impl;\n });\n } else {\n this.xor4096 = impl;\n }\n })(\n exports,\n typeof module == \"object\" && module,\n typeof define == \"function\" && define\n );\n }\n});\n\n// node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/tychei.js\nvar require_tychei = __commonJS({\n \"node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/tychei.js\"(exports, module) {\n (function(global2, module2, define2) {\n function XorGen(seed) {\n var me = this, strseed = \"\";\n me.next = function() {\n var b = me.b, c = me.c, d = me.d, a = me.a;\n b = b << 25 ^ b >>> 7 ^ c;\n c = c - d | 0;\n d = d << 24 ^ d >>> 8 ^ a;\n a = a - b | 0;\n me.b = b = b << 20 ^ b >>> 12 ^ c;\n me.c = c = c - d | 0;\n me.d = d << 16 ^ c >>> 16 ^ a;\n return me.a = a - b | 0;\n };\n me.a = 0;\n me.b = 0;\n me.c = 2654435769 | 0;\n me.d = 1367130551;\n if (seed === Math.floor(seed)) {\n me.a = seed / 4294967296 | 0;\n me.b = seed | 0;\n } else {\n strseed += seed;\n }\n for (var k = 0; k < strseed.length + 20; k++) {\n me.b ^= strseed.charCodeAt(k) | 0;\n me.next();\n }\n }\n function copy(f, t2) {\n t2.a = f.a;\n t2.b = f.b;\n t2.c = f.c;\n t2.d = f.d;\n return t2;\n }\n ;\n function impl(seed, opts) {\n var xg = new XorGen(seed), state = opts && opts.state, prng = function() {\n return (xg.next() >>> 0) / 4294967296;\n };\n prng.double = function() {\n do {\n var top = xg.next() >>> 11, bot = (xg.next() >>> 0) / 4294967296, result = (top + bot) / (1 << 21);\n } while (result === 0);\n return result;\n };\n prng.int32 = xg.next;\n prng.quick = prng;\n if (state) {\n if (typeof state == \"object\")\n copy(state, xg);\n prng.state = function() {\n return copy(xg, {});\n };\n }\n return prng;\n }\n if (module2 && module2.exports) {\n module2.exports = impl;\n } else if (define2 && define2.amd) {\n define2(function() {\n return impl;\n });\n } else {\n this.tychei = impl;\n }\n })(\n exports,\n typeof module == \"object\" && module,\n typeof define == \"function\" && define\n );\n }\n});\n\n// (disabled):crypto\nvar require_crypto = __commonJS({\n \"(disabled):crypto\"() {\n }\n});\n\n// node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/seedrandom.js\nvar require_seedrandom = __commonJS({\n \"node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/seedrandom.js\"(exports, module) {\n (function(global2, pool3, math) {\n var width = 256, chunks = 6, digits = 52, rngname = \"random\", startdenom = math.pow(width, chunks), significance = math.pow(2, digits), overflow = significance * 2, mask = width - 1, nodecrypto;\n function seedrandom5(seed, options, callback) {\n var key = [];\n options = options == true ? { entropy: true } : options || {};\n var shortseed = mixkey(flatten4(\n options.entropy ? [seed, tostring(pool3)] : seed == null ? autoseed() : seed,\n 3\n ), key);\n var arc4 = new ARC4(key);\n var prng = function() {\n var n2 = arc4.g(chunks), d = startdenom, x = 0;\n while (n2 < significance) {\n n2 = (n2 + x) * width;\n d *= width;\n x = arc4.g(1);\n }\n while (n2 >= overflow) {\n n2 /= 2;\n d /= 2;\n x >>>= 1;\n }\n return (n2 + x) / d;\n };\n prng.int32 = function() {\n return arc4.g(4) | 0;\n };\n prng.quick = function() {\n return arc4.g(4) / 4294967296;\n };\n prng.double = prng;\n mixkey(tostring(arc4.S), pool3);\n return (options.pass || callback || function(prng2, seed2, is_math_call, state) {\n if (state) {\n if (state.S) {\n copy(state, arc4);\n }\n prng2.state = function() {\n return copy(arc4, {});\n };\n }\n if (is_math_call) {\n math[rngname] = prng2;\n return seed2;\n } else\n return prng2;\n })(\n prng,\n shortseed,\n \"global\" in options ? options.global : this == math,\n options.state\n );\n }\n function ARC4(key) {\n var t2, keylen = key.length, me = this, i2 = 0, j = me.i = me.j = 0, s2 = me.S = [];\n if (!keylen) {\n key = [keylen++];\n }\n while (i2 < width) {\n s2[i2] = i2++;\n }\n for (i2 = 0; i2 < width; i2++) {\n s2[i2] = s2[j = mask & j + key[i2 % keylen] + (t2 = s2[i2])];\n s2[j] = t2;\n }\n (me.g = function(count2) {\n var t3, r2 = 0, i3 = me.i, j2 = me.j, s3 = me.S;\n while (count2--) {\n t3 = s3[i3 = mask & i3 + 1];\n r2 = r2 * width + s3[mask & (s3[i3] = s3[j2 = mask & j2 + t3]) + (s3[j2] = t3)];\n }\n me.i = i3;\n me.j = j2;\n return r2;\n })(width);\n }\n function copy(f, t2) {\n t2.i = f.i;\n t2.j = f.j;\n t2.S = f.S.slice();\n return t2;\n }\n ;\n function flatten4(obj, depth) {\n var result = [], typ = typeof obj, prop;\n if (depth && typ == \"object\") {\n for (prop in obj) {\n try {\n result.push(flatten4(obj[prop], depth - 1));\n } catch (e2) {\n }\n }\n }\n return result.length ? result : typ == \"string\" ? obj : obj + \"\\0\";\n }\n function mixkey(seed, key) {\n var stringseed = seed + \"\", smear, j = 0;\n while (j < stringseed.length) {\n key[mask & j] = mask & (smear ^= key[mask & j] * 19) + stringseed.charCodeAt(j++);\n }\n return tostring(key);\n }\n function autoseed() {\n try {\n var out;\n if (nodecrypto && (out = nodecrypto.randomBytes)) {\n out = out(width);\n } else {\n out = new Uint8Array(width);\n (global2.crypto || global2.msCrypto).getRandomValues(out);\n }\n return tostring(out);\n } catch (e2) {\n var browser = global2.navigator, plugins = browser && browser.plugins;\n return [+new Date(), global2, plugins, global2.screen, tostring(pool3)];\n }\n }\n function tostring(a) {\n return String.fromCharCode.apply(0, a);\n }\n mixkey(math.random(), pool3);\n if (typeof module == \"object\" && module.exports) {\n module.exports = seedrandom5;\n try {\n nodecrypto = require_crypto();\n } catch (ex) {\n }\n } else if (typeof define == \"function\" && define.amd) {\n define(function() {\n return seedrandom5;\n });\n } else {\n math[\"seed\" + rngname] = seedrandom5;\n }\n })(\n typeof self !== \"undefined\" ? self : exports,\n [],\n Math\n );\n }\n});\n\n// node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/index.js\nvar require_seedrandom2 = __commonJS({\n \"node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/index.js\"(exports, module) {\n var alea5 = require_alea();\n var xor128 = require_xor128();\n var xorwow = require_xorwow();\n var xorshift7 = require_xorshift7();\n var xor4096 = require_xor4096();\n var tychei = require_tychei();\n var sr = require_seedrandom();\n sr.alea = alea5;\n sr.xor128 = xor128;\n sr.xorwow = xorwow;\n sr.xorshift7 = xorshift7;\n sr.xor4096 = xor4096;\n sr.tychei = tychei;\n module.exports = sr;\n }\n});\n\n// (disabled):node_modules/.pnpm/string_decoder@1.3.0/node_modules/string_decoder/lib/string_decoder.js\nvar require_string_decoder = __commonJS({\n \"(disabled):node_modules/.pnpm/string_decoder@1.3.0/node_modules/string_decoder/lib/string_decoder.js\"() {\n }\n});\n\n// (disabled):fs\nvar require_fs = __commonJS({\n \"(disabled):fs\"() {\n }\n});\n\n// (disabled):path\nvar require_path = __commonJS({\n \"(disabled):path\"() {\n }\n});\n\n// (disabled):worker_threads\nvar require_worker_threads = __commonJS({\n \"(disabled):worker_threads\"() {\n }\n});\n\n// (disabled):perf_hooks\nvar require_perf_hooks = __commonJS({\n \"(disabled):perf_hooks\"() {\n }\n});\n\n// (disabled):os\nvar require_os = __commonJS({\n \"(disabled):os\"() {\n }\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm-threaded-simd.js\nvar require_tfjs_backend_wasm_threaded_simd = __commonJS({\n \"node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm-threaded-simd.js\"(exports, module) {\n var WasmBackendModuleThreadedSimd2 = (() => {\n var _scriptDir = typeof document !== \"undefined\" && document.currentScript ? document.currentScript.src : void 0;\n if (typeof __filename !== \"undefined\")\n _scriptDir = _scriptDir || __filename;\n return function(WasmBackendModuleThreadedSimd3) {\n WasmBackendModuleThreadedSimd3 = WasmBackendModuleThreadedSimd3 || {};\n function GROWABLE_HEAP_I8() {\n if (wasmMemory.buffer != buffer2) {\n updateGlobalBufferAndViews(wasmMemory.buffer);\n }\n return HEAP8;\n }\n function GROWABLE_HEAP_U8() {\n if (wasmMemory.buffer != buffer2) {\n updateGlobalBufferAndViews(wasmMemory.buffer);\n }\n return HEAPU8;\n }\n function GROWABLE_HEAP_I16() {\n if (wasmMemory.buffer != buffer2) {\n updateGlobalBufferAndViews(wasmMemory.buffer);\n }\n return HEAP16;\n }\n function GROWABLE_HEAP_I32() {\n if (wasmMemory.buffer != buffer2) {\n updateGlobalBufferAndViews(wasmMemory.buffer);\n }\n return HEAP32;\n }\n function GROWABLE_HEAP_U32() {\n if (wasmMemory.buffer != buffer2) {\n updateGlobalBufferAndViews(wasmMemory.buffer);\n }\n return HEAPU32;\n }\n function GROWABLE_HEAP_F32() {\n if (wasmMemory.buffer != buffer2) {\n updateGlobalBufferAndViews(wasmMemory.buffer);\n }\n return HEAPF32;\n }\n function GROWABLE_HEAP_F64() {\n if (wasmMemory.buffer != buffer2) {\n updateGlobalBufferAndViews(wasmMemory.buffer);\n }\n return HEAPF64;\n }\n var Module = typeof WasmBackendModuleThreadedSimd3 != \"undefined\" ? WasmBackendModuleThreadedSimd3 : {};\n var readyPromiseResolve, readyPromiseReject;\n Module[\"ready\"] = new Promise(function(resolve, reject) {\n readyPromiseResolve = resolve;\n readyPromiseReject = reject;\n });\n var beforeListeners;\n if (typeof process !== \"undefined\" && process.listeners) {\n beforeListeners = { uncaughtException: process.listeners(\"uncaughtException\"), unhandledRejection: process.listeners(\"unhandledRejection\") };\n }\n var moduleOverrides = Object.assign({}, Module);\n var arguments_ = [];\n var thisProgram = \"./this.program\";\n var quit_ = (status, toThrow) => {\n throw toThrow;\n };\n var ENVIRONMENT_IS_WEB = typeof window == \"object\";\n var ENVIRONMENT_IS_WORKER = typeof importScripts == \"function\";\n var ENVIRONMENT_IS_NODE = typeof process == \"object\" && typeof process.versions == \"object\" && typeof process.versions.node == \"string\";\n var ENVIRONMENT_IS_PTHREAD = Module[\"ENVIRONMENT_IS_PTHREAD\"] || false;\n var scriptDirectory = \"\";\n function locateFile(path) {\n if (Module[\"locateFile\"]) {\n return Module[\"locateFile\"](path, scriptDirectory);\n }\n return scriptDirectory + path;\n }\n var read_, readAsync, readBinary, setWindowTitle;\n function logExceptionOnExit(e2) {\n if (e2 instanceof ExitStatus)\n return;\n let toLog = e2;\n err(\"exiting due to exception: \" + toLog);\n }\n if (ENVIRONMENT_IS_NODE) {\n if (ENVIRONMENT_IS_WORKER) {\n scriptDirectory = require_path().dirname(scriptDirectory) + \"/\";\n } else {\n scriptDirectory = __dirname + \"/\";\n }\n var fs, nodePath;\n if (typeof __require === \"function\") {\n fs = require_fs();\n nodePath = require_path();\n }\n read_ = (filename, binary) => {\n filename = nodePath[\"normalize\"](filename);\n return fs.readFileSync(filename, binary ? void 0 : \"utf8\");\n };\n readBinary = (filename) => {\n var ret = read_(filename, true);\n if (!ret.buffer) {\n ret = new Uint8Array(ret);\n }\n return ret;\n };\n readAsync = (filename, onload, onerror) => {\n filename = nodePath[\"normalize\"](filename);\n fs.readFile(filename, function(err2, data) {\n if (err2)\n onerror(err2);\n else\n onload(data.buffer);\n });\n };\n if (process[\"argv\"].length > 1) {\n thisProgram = process[\"argv\"][1].replace(/\\\\/g, \"/\");\n }\n arguments_ = process[\"argv\"].slice(2);\n process[\"on\"](\"uncaughtException\", function(ex) {\n if (!(ex instanceof ExitStatus)) {\n throw ex;\n }\n });\n process[\"on\"](\"unhandledRejection\", function(reason) {\n throw reason;\n });\n quit_ = (status, toThrow) => {\n if (keepRuntimeAlive()) {\n process[\"exitCode\"] = status;\n throw toThrow;\n }\n logExceptionOnExit(toThrow);\n process[\"exit\"](status);\n };\n Module[\"inspect\"] = function() {\n return \"[Emscripten Module object]\";\n };\n let nodeWorkerThreads;\n try {\n nodeWorkerThreads = require_worker_threads();\n } catch (e2) {\n console.error('The \"worker_threads\" module is not supported in this node.js build - perhaps a newer version is needed?');\n throw e2;\n }\n global.Worker = nodeWorkerThreads.Worker;\n } else if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) {\n if (ENVIRONMENT_IS_WORKER) {\n scriptDirectory = self.location.href;\n } else if (typeof document != \"undefined\" && document.currentScript) {\n scriptDirectory = document.currentScript.src;\n }\n if (typeof _scriptDir !== \"undefined\" && _scriptDir) {\n scriptDirectory = _scriptDir;\n }\n if (scriptDirectory.indexOf(\"blob:\") !== 0) {\n scriptDirectory = scriptDirectory.substr(0, scriptDirectory.replace(/[?#].*/, \"\").lastIndexOf(\"/\") + 1);\n } else {\n scriptDirectory = \"\";\n }\n if (!ENVIRONMENT_IS_NODE) {\n read_ = (url) => {\n var xhr = new XMLHttpRequest();\n xhr.open(\"GET\", url, false);\n xhr.send(null);\n return xhr.responseText;\n };\n if (ENVIRONMENT_IS_WORKER) {\n readBinary = (url) => {\n var xhr = new XMLHttpRequest();\n xhr.open(\"GET\", url, false);\n xhr.responseType = \"arraybuffer\";\n xhr.send(null);\n return new Uint8Array(xhr.response);\n };\n }\n readAsync = (url, onload, onerror) => {\n var xhr = new XMLHttpRequest();\n xhr.open(\"GET\", url, true);\n xhr.responseType = \"arraybuffer\";\n xhr.onload = () => {\n if (xhr.status == 200 || xhr.status == 0 && xhr.response) {\n onload(xhr.response);\n return;\n }\n onerror();\n };\n xhr.onerror = onerror;\n xhr.send(null);\n };\n }\n setWindowTitle = (title) => document.title = title;\n } else {\n }\n if (ENVIRONMENT_IS_NODE) {\n if (typeof performance == \"undefined\") {\n global.performance = require_perf_hooks().performance;\n }\n }\n var defaultPrint = console.log.bind(console);\n var defaultPrintErr = console.warn.bind(console);\n if (ENVIRONMENT_IS_NODE) {\n defaultPrint = (str) => fs.writeSync(1, str + \"\\n\");\n defaultPrintErr = (str) => fs.writeSync(2, str + \"\\n\");\n }\n var out = Module[\"print\"] || defaultPrint;\n var err = Module[\"printErr\"] || defaultPrintErr;\n Object.assign(Module, moduleOverrides);\n moduleOverrides = null;\n if (Module[\"arguments\"])\n arguments_ = Module[\"arguments\"];\n if (Module[\"thisProgram\"])\n thisProgram = Module[\"thisProgram\"];\n if (Module[\"quit\"])\n quit_ = Module[\"quit\"];\n var POINTER_SIZE = 4;\n var Atomics_load = Atomics.load;\n var Atomics_store = Atomics.store;\n var Atomics_compareExchange = Atomics.compareExchange;\n var wasmBinary;\n if (Module[\"wasmBinary\"])\n wasmBinary = Module[\"wasmBinary\"];\n var noExitRuntime = Module[\"noExitRuntime\"] || true;\n if (typeof WebAssembly != \"object\") {\n abort(\"no native wasm support detected\");\n }\n var wasmMemory;\n var wasmModule;\n var ABORT = false;\n var EXITSTATUS;\n function assert3(condition, text) {\n if (!condition) {\n abort(text);\n }\n }\n var UTF8Decoder = typeof TextDecoder != \"undefined\" ? new TextDecoder(\"utf8\") : void 0;\n function UTF8ArrayToString(heapOrArray, idx, maxBytesToRead) {\n var endIdx = idx + maxBytesToRead;\n var endPtr = idx;\n while (heapOrArray[endPtr] && !(endPtr >= endIdx))\n ++endPtr;\n if (endPtr - idx > 16 && heapOrArray.buffer && UTF8Decoder) {\n return UTF8Decoder.decode(heapOrArray.buffer instanceof SharedArrayBuffer ? heapOrArray.slice(idx, endPtr) : heapOrArray.subarray(idx, endPtr));\n }\n var str = \"\";\n while (idx < endPtr) {\n var u0 = heapOrArray[idx++];\n if (!(u0 & 128)) {\n str += String.fromCharCode(u0);\n continue;\n }\n var u1 = heapOrArray[idx++] & 63;\n if ((u0 & 224) == 192) {\n str += String.fromCharCode((u0 & 31) << 6 | u1);\n continue;\n }\n var u2 = heapOrArray[idx++] & 63;\n if ((u0 & 240) == 224) {\n u0 = (u0 & 15) << 12 | u1 << 6 | u2;\n } else {\n u0 = (u0 & 7) << 18 | u1 << 12 | u2 << 6 | heapOrArray[idx++] & 63;\n }\n if (u0 < 65536) {\n str += String.fromCharCode(u0);\n } else {\n var ch = u0 - 65536;\n str += String.fromCharCode(55296 | ch >> 10, 56320 | ch & 1023);\n }\n }\n return str;\n }\n function UTF8ToString(ptr, maxBytesToRead) {\n return ptr ? UTF8ArrayToString(GROWABLE_HEAP_U8(), ptr, maxBytesToRead) : \"\";\n }\n function stringToUTF8Array(str, heap, outIdx, maxBytesToWrite) {\n if (!(maxBytesToWrite > 0))\n return 0;\n var startIdx = outIdx;\n var endIdx = outIdx + maxBytesToWrite - 1;\n for (var i2 = 0; i2 < str.length; ++i2) {\n var u = str.charCodeAt(i2);\n if (u >= 55296 && u <= 57343) {\n var u1 = str.charCodeAt(++i2);\n u = 65536 + ((u & 1023) << 10) | u1 & 1023;\n }\n if (u <= 127) {\n if (outIdx >= endIdx)\n break;\n heap[outIdx++] = u;\n } else if (u <= 2047) {\n if (outIdx + 1 >= endIdx)\n break;\n heap[outIdx++] = 192 | u >> 6;\n heap[outIdx++] = 128 | u & 63;\n } else if (u <= 65535) {\n if (outIdx + 2 >= endIdx)\n break;\n heap[outIdx++] = 224 | u >> 12;\n heap[outIdx++] = 128 | u >> 6 & 63;\n heap[outIdx++] = 128 | u & 63;\n } else {\n if (outIdx + 3 >= endIdx)\n break;\n heap[outIdx++] = 240 | u >> 18;\n heap[outIdx++] = 128 | u >> 12 & 63;\n heap[outIdx++] = 128 | u >> 6 & 63;\n heap[outIdx++] = 128 | u & 63;\n }\n }\n heap[outIdx] = 0;\n return outIdx - startIdx;\n }\n function stringToUTF8(str, outPtr, maxBytesToWrite) {\n return stringToUTF8Array(str, GROWABLE_HEAP_U8(), outPtr, maxBytesToWrite);\n }\n var buffer2, HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32, HEAPF32, HEAPF64;\n if (ENVIRONMENT_IS_PTHREAD) {\n buffer2 = Module[\"buffer\"];\n }\n function updateGlobalBufferAndViews(buf) {\n buffer2 = buf;\n Module[\"HEAP8\"] = HEAP8 = new Int8Array(buf);\n Module[\"HEAP16\"] = HEAP16 = new Int16Array(buf);\n Module[\"HEAP32\"] = HEAP32 = new Int32Array(buf);\n Module[\"HEAPU8\"] = HEAPU8 = new Uint8Array(buf);\n Module[\"HEAPU16\"] = HEAPU16 = new Uint16Array(buf);\n Module[\"HEAPU32\"] = HEAPU32 = new Uint32Array(buf);\n Module[\"HEAPF32\"] = HEAPF32 = new Float32Array(buf);\n Module[\"HEAPF64\"] = HEAPF64 = new Float64Array(buf);\n }\n var INITIAL_MEMORY = Module[\"INITIAL_MEMORY\"] || 16777216;\n if (ENVIRONMENT_IS_PTHREAD) {\n wasmMemory = Module[\"wasmMemory\"];\n buffer2 = Module[\"buffer\"];\n } else {\n if (Module[\"wasmMemory\"]) {\n wasmMemory = Module[\"wasmMemory\"];\n } else {\n wasmMemory = new WebAssembly.Memory({ \"initial\": INITIAL_MEMORY / 65536, \"maximum\": 2147483648 / 65536, \"shared\": true });\n if (!(wasmMemory.buffer instanceof SharedArrayBuffer)) {\n err(\"requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag\");\n if (ENVIRONMENT_IS_NODE) {\n console.log(\"(on node you may need: --experimental-wasm-threads --experimental-wasm-bulk-memory and also use a recent version)\");\n }\n throw Error(\"bad memory\");\n }\n }\n }\n if (wasmMemory) {\n buffer2 = wasmMemory.buffer;\n }\n INITIAL_MEMORY = buffer2.byteLength;\n updateGlobalBufferAndViews(buffer2);\n var wasmTable;\n var __ATPRERUN__ = [];\n var __ATINIT__ = [];\n var __ATPOSTRUN__ = [];\n var runtimeInitialized = false;\n function keepRuntimeAlive() {\n return noExitRuntime;\n }\n function preRun() {\n if (Module[\"preRun\"]) {\n if (typeof Module[\"preRun\"] == \"function\")\n Module[\"preRun\"] = [Module[\"preRun\"]];\n while (Module[\"preRun\"].length) {\n addOnPreRun(Module[\"preRun\"].shift());\n }\n }\n callRuntimeCallbacks(__ATPRERUN__);\n }\n function initRuntime() {\n runtimeInitialized = true;\n if (ENVIRONMENT_IS_PTHREAD)\n return;\n callRuntimeCallbacks(__ATINIT__);\n }\n function postRun() {\n if (ENVIRONMENT_IS_PTHREAD)\n return;\n if (Module[\"postRun\"]) {\n if (typeof Module[\"postRun\"] == \"function\")\n Module[\"postRun\"] = [Module[\"postRun\"]];\n while (Module[\"postRun\"].length) {\n addOnPostRun(Module[\"postRun\"].shift());\n }\n }\n callRuntimeCallbacks(__ATPOSTRUN__);\n }\n function addOnPreRun(cb) {\n __ATPRERUN__.unshift(cb);\n }\n function addOnInit(cb) {\n __ATINIT__.unshift(cb);\n }\n function addOnPostRun(cb) {\n __ATPOSTRUN__.unshift(cb);\n }\n var runDependencies = 0;\n var runDependencyWatcher = null;\n var dependenciesFulfilled = null;\n function addRunDependency(id) {\n runDependencies++;\n if (Module[\"monitorRunDependencies\"]) {\n Module[\"monitorRunDependencies\"](runDependencies);\n }\n }\n function removeRunDependency(id) {\n runDependencies--;\n if (Module[\"monitorRunDependencies\"]) {\n Module[\"monitorRunDependencies\"](runDependencies);\n }\n if (runDependencies == 0) {\n if (runDependencyWatcher !== null) {\n clearInterval(runDependencyWatcher);\n runDependencyWatcher = null;\n }\n if (dependenciesFulfilled) {\n var callback = dependenciesFulfilled;\n dependenciesFulfilled = null;\n callback();\n }\n }\n }\n function abort(what) {\n if (ENVIRONMENT_IS_PTHREAD) {\n postMessage({ \"cmd\": \"onAbort\", \"arg\": what });\n } else {\n if (Module[\"onAbort\"]) {\n Module[\"onAbort\"](what);\n }\n }\n what = \"Aborted(\" + what + \")\";\n err(what);\n ABORT = true;\n EXITSTATUS = 1;\n what += \". Build with -sASSERTIONS for more info.\";\n var e2 = new WebAssembly.RuntimeError(what);\n readyPromiseReject(e2);\n throw e2;\n }\n var dataURIPrefix = \"data:application/octet-stream;base64,\";\n function isDataURI(filename) {\n return filename.startsWith(dataURIPrefix);\n }\n function isFileURI(filename) {\n return filename.startsWith(\"file://\");\n }\n var wasmBinaryFile;\n wasmBinaryFile = \"tfjs-backend-wasm-threaded-simd.wasm\";\n if (!isDataURI(wasmBinaryFile)) {\n wasmBinaryFile = locateFile(wasmBinaryFile);\n }\n function getBinary(file) {\n try {\n if (file == wasmBinaryFile && wasmBinary) {\n return new Uint8Array(wasmBinary);\n }\n if (readBinary) {\n return readBinary(file);\n }\n throw \"both async and sync fetching of the wasm failed\";\n } catch (err2) {\n abort(err2);\n }\n }\n function getBinaryPromise() {\n if (!wasmBinary && (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER)) {\n if (typeof fetch == \"function\" && !isFileURI(wasmBinaryFile)) {\n return fetch(wasmBinaryFile, { credentials: \"same-origin\" }).then(function(response) {\n if (!response[\"ok\"]) {\n throw \"failed to load wasm binary file at '\" + wasmBinaryFile + \"'\";\n }\n return response[\"arrayBuffer\"]();\n }).catch(function() {\n return getBinary(wasmBinaryFile);\n });\n } else {\n if (readAsync) {\n return new Promise(function(resolve, reject) {\n readAsync(wasmBinaryFile, function(response) {\n resolve(new Uint8Array(response));\n }, reject);\n });\n }\n }\n }\n return Promise.resolve().then(function() {\n return getBinary(wasmBinaryFile);\n });\n }\n function createWasm() {\n var info = { \"env\": asmLibraryArg, \"wasi_snapshot_preview1\": asmLibraryArg };\n function receiveInstance(instance, module2) {\n var exports3 = instance.exports;\n Module[\"asm\"] = exports3;\n registerTLSInit(Module[\"asm\"][\"_emscripten_tls_init\"]);\n wasmTable = Module[\"asm\"][\"__indirect_function_table\"];\n addOnInit(Module[\"asm\"][\"__wasm_call_ctors\"]);\n wasmModule = module2;\n if (!ENVIRONMENT_IS_PTHREAD) {\n var numWorkersToLoad = PThread.unusedWorkers.length;\n PThread.unusedWorkers.forEach(function(w) {\n PThread.loadWasmModuleToWorker(w, function() {\n if (!--numWorkersToLoad)\n removeRunDependency(\"wasm-instantiate\");\n });\n });\n }\n }\n if (!ENVIRONMENT_IS_PTHREAD) {\n addRunDependency(\"wasm-instantiate\");\n }\n function receiveInstantiationResult(result) {\n receiveInstance(result[\"instance\"], result[\"module\"]);\n }\n function instantiateArrayBuffer(receiver) {\n return getBinaryPromise().then(function(binary) {\n return WebAssembly.instantiate(binary, info);\n }).then(function(instance) {\n return instance;\n }).then(receiver, function(reason) {\n err(\"failed to asynchronously prepare wasm: \" + reason);\n abort(reason);\n });\n }\n function instantiateAsync() {\n if (!wasmBinary && typeof WebAssembly.instantiateStreaming == \"function\" && !isDataURI(wasmBinaryFile) && !isFileURI(wasmBinaryFile) && !ENVIRONMENT_IS_NODE && typeof fetch == \"function\") {\n return fetch(wasmBinaryFile, { credentials: \"same-origin\" }).then(function(response) {\n var result = WebAssembly.instantiateStreaming(response, info);\n return result.then(receiveInstantiationResult, function(reason) {\n err(\"wasm streaming compile failed: \" + reason);\n err(\"falling back to ArrayBuffer instantiation\");\n return instantiateArrayBuffer(receiveInstantiationResult);\n });\n });\n } else {\n return instantiateArrayBuffer(receiveInstantiationResult);\n }\n }\n if (Module[\"instantiateWasm\"]) {\n try {\n var exports2 = Module[\"instantiateWasm\"](info, receiveInstance);\n return exports2;\n } catch (e2) {\n err(\"Module.instantiateWasm callback failed with error: \" + e2);\n readyPromiseReject(e2);\n }\n }\n instantiateAsync().catch(readyPromiseReject);\n return {};\n }\n var tempDouble;\n var tempI64;\n var ASM_CONSTS = {};\n function ExitStatus(status) {\n this.name = \"ExitStatus\";\n this.message = \"Program terminated with exit(\" + status + \")\";\n this.status = status;\n }\n function killThread(pthread_ptr) {\n var worker = PThread.pthreads[pthread_ptr];\n delete PThread.pthreads[pthread_ptr];\n worker.terminate();\n __emscripten_thread_free_data(pthread_ptr);\n PThread.runningWorkers.splice(PThread.runningWorkers.indexOf(worker), 1);\n worker.pthread_ptr = 0;\n }\n function cancelThread(pthread_ptr) {\n var worker = PThread.pthreads[pthread_ptr];\n worker.postMessage({ \"cmd\": \"cancel\" });\n }\n function cleanupThread(pthread_ptr) {\n var worker = PThread.pthreads[pthread_ptr];\n assert3(worker);\n PThread.returnWorkerToPool(worker);\n }\n function spawnThread(threadParams) {\n var worker = PThread.getNewWorker();\n if (!worker) {\n return 6;\n }\n PThread.runningWorkers.push(worker);\n PThread.pthreads[threadParams.pthread_ptr] = worker;\n worker.pthread_ptr = threadParams.pthread_ptr;\n var msg = { \"cmd\": \"run\", \"start_routine\": threadParams.startRoutine, \"arg\": threadParams.arg, \"pthread_ptr\": threadParams.pthread_ptr };\n worker.runPthread = () => {\n msg.time = performance.now();\n worker.postMessage(msg, threadParams.transferList);\n };\n if (worker.loaded) {\n worker.runPthread();\n delete worker.runPthread;\n }\n return 0;\n }\n var SYSCALLS = { varargs: void 0, get: function() {\n SYSCALLS.varargs += 4;\n var ret = GROWABLE_HEAP_I32()[SYSCALLS.varargs - 4 >> 2];\n return ret;\n }, getStr: function(ptr) {\n var ret = UTF8ToString(ptr);\n return ret;\n } };\n function _proc_exit(code) {\n if (ENVIRONMENT_IS_PTHREAD)\n return _emscripten_proxy_to_main_thread_js(1, 1, code);\n EXITSTATUS = code;\n if (!keepRuntimeAlive()) {\n PThread.terminateAllThreads();\n if (Module[\"onExit\"])\n Module[\"onExit\"](code);\n ABORT = true;\n }\n quit_(code, new ExitStatus(code));\n }\n function exitJS(status, implicit) {\n EXITSTATUS = status;\n if (!implicit) {\n if (ENVIRONMENT_IS_PTHREAD) {\n exitOnMainThread(status);\n throw \"unwind\";\n } else {\n }\n }\n _proc_exit(status);\n }\n var _exit = exitJS;\n function handleException(e2) {\n if (e2 instanceof ExitStatus || e2 == \"unwind\") {\n return EXITSTATUS;\n }\n quit_(1, e2);\n }\n var PThread = { unusedWorkers: [], runningWorkers: [], tlsInitFunctions: [], pthreads: {}, init: function() {\n if (ENVIRONMENT_IS_PTHREAD) {\n PThread.initWorker();\n } else {\n PThread.initMainThread();\n }\n }, initMainThread: function() {\n var pthreadPoolSize = 8;\n while (pthreadPoolSize--) {\n PThread.allocateUnusedWorker();\n }\n }, initWorker: function() {\n noExitRuntime = false;\n }, setExitStatus: function(status) {\n EXITSTATUS = status;\n }, terminateAllThreads: function() {\n for (var worker of Object.values(PThread.pthreads)) {\n PThread.returnWorkerToPool(worker);\n }\n for (var worker of PThread.unusedWorkers) {\n worker.terminate();\n }\n PThread.unusedWorkers = [];\n }, returnWorkerToPool: function(worker) {\n var pthread_ptr = worker.pthread_ptr;\n delete PThread.pthreads[pthread_ptr];\n PThread.unusedWorkers.push(worker);\n PThread.runningWorkers.splice(PThread.runningWorkers.indexOf(worker), 1);\n worker.pthread_ptr = 0;\n __emscripten_thread_free_data(pthread_ptr);\n }, receiveObjectTransfer: function(data) {\n }, threadInitTLS: function() {\n PThread.tlsInitFunctions.forEach((f) => f());\n }, loadWasmModuleToWorker: function(worker, onFinishedLoading) {\n worker.onmessage = (e2) => {\n var d = e2[\"data\"];\n var cmd = d[\"cmd\"];\n if (worker.pthread_ptr)\n PThread.currentProxiedOperationCallerThread = worker.pthread_ptr;\n if (d[\"targetThread\"] && d[\"targetThread\"] != _pthread_self()) {\n var targetWorker = PThread.pthreads[d.targetThread];\n if (targetWorker) {\n targetWorker.postMessage(d, d[\"transferList\"]);\n } else {\n err('Internal error! Worker sent a message \"' + cmd + '\" to target pthread ' + d[\"targetThread\"] + \", but that thread no longer exists!\");\n }\n PThread.currentProxiedOperationCallerThread = void 0;\n return;\n }\n if (cmd === \"processProxyingQueue\") {\n executeNotifiedProxyingQueue(d[\"queue\"]);\n } else if (cmd === \"spawnThread\") {\n spawnThread(d);\n } else if (cmd === \"cleanupThread\") {\n cleanupThread(d[\"thread\"]);\n } else if (cmd === \"killThread\") {\n killThread(d[\"thread\"]);\n } else if (cmd === \"cancelThread\") {\n cancelThread(d[\"thread\"]);\n } else if (cmd === \"loaded\") {\n worker.loaded = true;\n if (onFinishedLoading)\n onFinishedLoading(worker);\n if (worker.runPthread) {\n worker.runPthread();\n delete worker.runPthread;\n }\n } else if (cmd === \"print\") {\n out(\"Thread \" + d[\"threadId\"] + \": \" + d[\"text\"]);\n } else if (cmd === \"printErr\") {\n err(\"Thread \" + d[\"threadId\"] + \": \" + d[\"text\"]);\n } else if (cmd === \"alert\") {\n alert(\"Thread \" + d[\"threadId\"] + \": \" + d[\"text\"]);\n } else if (d.target === \"setimmediate\") {\n worker.postMessage(d);\n } else if (cmd === \"onAbort\") {\n if (Module[\"onAbort\"]) {\n Module[\"onAbort\"](d[\"arg\"]);\n }\n } else if (cmd) {\n err(\"worker sent an unknown command \" + cmd);\n }\n PThread.currentProxiedOperationCallerThread = void 0;\n };\n worker.onerror = (e2) => {\n var message = \"worker sent an error!\";\n err(message + \" \" + e2.filename + \":\" + e2.lineno + \": \" + e2.message);\n throw e2;\n };\n if (ENVIRONMENT_IS_NODE) {\n worker.on(\"message\", function(data) {\n worker.onmessage({ data });\n });\n worker.on(\"error\", function(e2) {\n worker.onerror(e2);\n });\n worker.on(\"detachedExit\", function() {\n });\n }\n worker.postMessage({ \"cmd\": \"load\", \"urlOrBlob\": Module[\"mainScriptUrlOrBlob\"] || _scriptDir, \"wasmMemory\": wasmMemory, \"wasmModule\": wasmModule });\n }, allocateUnusedWorker: function() {\n var pthreadMainJs = locateFile(\"tfjs-backend-wasm-threaded-simd.worker.js\");\n PThread.unusedWorkers.push(new Worker(pthreadMainJs));\n }, getNewWorker: function() {\n if (PThread.unusedWorkers.length == 0) {\n PThread.allocateUnusedWorker();\n PThread.loadWasmModuleToWorker(PThread.unusedWorkers[0]);\n }\n return PThread.unusedWorkers.pop();\n } };\n Module[\"PThread\"] = PThread;\n function callRuntimeCallbacks(callbacks2) {\n while (callbacks2.length > 0) {\n callbacks2.shift()(Module);\n }\n }\n function withStackSave(f) {\n var stack2 = stackSave();\n var ret = f();\n stackRestore(stack2);\n return ret;\n }\n function demangle(func2) {\n return func2;\n }\n function demangleAll(text) {\n var regex = /\\b_Z[\\w\\d_]+/g;\n return text.replace(regex, function(x) {\n var y = demangle(x);\n return x === y ? x : y + \" [\" + x + \"]\";\n });\n }\n function establishStackSpace() {\n var pthread_ptr = _pthread_self();\n var stackTop = GROWABLE_HEAP_I32()[pthread_ptr + 44 >> 2];\n var stackSize = GROWABLE_HEAP_I32()[pthread_ptr + 48 >> 2];\n var stackMax = stackTop - stackSize;\n _emscripten_stack_set_limits(stackTop, stackMax);\n stackRestore(stackTop);\n }\n Module[\"establishStackSpace\"] = establishStackSpace;\n function exitOnMainThread(returnCode) {\n if (ENVIRONMENT_IS_PTHREAD)\n return _emscripten_proxy_to_main_thread_js(2, 0, returnCode);\n try {\n _exit(returnCode);\n } catch (e2) {\n handleException(e2);\n }\n }\n var wasmTableMirror = [];\n function getWasmTableEntry(funcPtr) {\n var func2 = wasmTableMirror[funcPtr];\n if (!func2) {\n if (funcPtr >= wasmTableMirror.length)\n wasmTableMirror.length = funcPtr + 1;\n wasmTableMirror[funcPtr] = func2 = wasmTable.get(funcPtr);\n }\n return func2;\n }\n function invokeEntryPoint(ptr, arg) {\n var result = getWasmTableEntry(ptr)(arg);\n if (keepRuntimeAlive()) {\n PThread.setExitStatus(result);\n } else {\n __emscripten_thread_exit(result);\n }\n }\n Module[\"invokeEntryPoint\"] = invokeEntryPoint;\n function jsStackTrace() {\n var error = new Error();\n if (!error.stack) {\n try {\n throw new Error();\n } catch (e2) {\n error = e2;\n }\n if (!error.stack) {\n return \"(no stack trace available)\";\n }\n }\n return error.stack.toString();\n }\n function registerTLSInit(tlsInitFunc) {\n PThread.tlsInitFunctions.push(tlsInitFunc);\n }\n function writeArrayToMemory(array2, buffer3) {\n GROWABLE_HEAP_I8().set(array2, buffer3);\n }\n function ___emscripten_init_main_thread_js(tb) {\n __emscripten_thread_init(tb, !ENVIRONMENT_IS_WORKER, 1, !ENVIRONMENT_IS_WEB);\n PThread.threadInitTLS();\n }\n function ___emscripten_thread_cleanup(thread) {\n if (!ENVIRONMENT_IS_PTHREAD)\n cleanupThread(thread);\n else\n postMessage({ \"cmd\": \"cleanupThread\", \"thread\": thread });\n }\n function pthreadCreateProxied(pthread_ptr, attr, startRoutine, arg) {\n if (ENVIRONMENT_IS_PTHREAD)\n return _emscripten_proxy_to_main_thread_js(3, 1, pthread_ptr, attr, startRoutine, arg);\n return ___pthread_create_js(pthread_ptr, attr, startRoutine, arg);\n }\n function ___pthread_create_js(pthread_ptr, attr, startRoutine, arg) {\n if (typeof SharedArrayBuffer == \"undefined\") {\n err(\"Current environment does not support SharedArrayBuffer, pthreads are not available!\");\n return 6;\n }\n var transferList = [];\n var error = 0;\n if (ENVIRONMENT_IS_PTHREAD && (transferList.length === 0 || error)) {\n return pthreadCreateProxied(pthread_ptr, attr, startRoutine, arg);\n }\n if (error)\n return error;\n var threadParams = { startRoutine, pthread_ptr, arg, transferList };\n if (ENVIRONMENT_IS_PTHREAD) {\n threadParams.cmd = \"spawnThread\";\n postMessage(threadParams, transferList);\n return 0;\n }\n return spawnThread(threadParams);\n }\n function __emscripten_default_pthread_stack_size() {\n return 2097152;\n }\n var nowIsMonotonic = true;\n function __emscripten_get_now_is_monotonic() {\n return nowIsMonotonic;\n }\n function executeNotifiedProxyingQueue(queue) {\n Atomics.store(GROWABLE_HEAP_I32(), queue >> 2, 1);\n if (_pthread_self()) {\n __emscripten_proxy_execute_task_queue(queue);\n }\n Atomics.compareExchange(GROWABLE_HEAP_I32(), queue >> 2, 1, 0);\n }\n Module[\"executeNotifiedProxyingQueue\"] = executeNotifiedProxyingQueue;\n function __emscripten_notify_task_queue(targetThreadId, currThreadId, mainThreadId, queue) {\n if (targetThreadId == currThreadId) {\n setTimeout(() => executeNotifiedProxyingQueue(queue));\n } else if (ENVIRONMENT_IS_PTHREAD) {\n postMessage({ \"targetThread\": targetThreadId, \"cmd\": \"processProxyingQueue\", \"queue\": queue });\n } else {\n var worker = PThread.pthreads[targetThreadId];\n if (!worker) {\n return;\n }\n worker.postMessage({ \"cmd\": \"processProxyingQueue\", \"queue\": queue });\n }\n return 1;\n }\n function __emscripten_set_offscreencanvas_size(target, width, height) {\n return -1;\n }\n function _abort() {\n abort(\"\");\n }\n function warnOnce(text) {\n if (!warnOnce.shown)\n warnOnce.shown = {};\n if (!warnOnce.shown[text]) {\n warnOnce.shown[text] = 1;\n if (ENVIRONMENT_IS_NODE)\n text = \"warning: \" + text;\n err(text);\n }\n }\n function _emscripten_check_blocking_allowed() {\n if (ENVIRONMENT_IS_NODE)\n return;\n if (ENVIRONMENT_IS_WORKER)\n return;\n warnOnce(\"Blocking on the main thread is very dangerous, see https://emscripten.org/docs/porting/pthreads.html#blocking-on-the-main-browser-thread\");\n }\n function _emscripten_date_now() {\n return Date.now();\n }\n function getHeapMax() {\n return 2147483648;\n }\n function _emscripten_get_heap_max() {\n return getHeapMax();\n }\n var _emscripten_get_now;\n if (ENVIRONMENT_IS_NODE) {\n _emscripten_get_now = () => {\n var t2 = process[\"hrtime\"]();\n return t2[0] * 1e3 + t2[1] / 1e6;\n };\n } else if (ENVIRONMENT_IS_PTHREAD) {\n _emscripten_get_now = () => performance.now() - Module[\"__performance_now_clock_drift\"];\n } else\n _emscripten_get_now = () => performance.now();\n function _emscripten_memcpy_big(dest, src, num) {\n GROWABLE_HEAP_U8().copyWithin(dest, src, src + num);\n }\n function _emscripten_num_logical_cores() {\n if (ENVIRONMENT_IS_NODE)\n return require_os().cpus().length;\n return navigator[\"hardwareConcurrency\"];\n }\n function _emscripten_proxy_to_main_thread_js(index, sync) {\n var numCallArgs = arguments.length - 2;\n var outerArgs = arguments;\n return withStackSave(() => {\n var serializedNumCallArgs = numCallArgs;\n var args = stackAlloc(serializedNumCallArgs * 8);\n var b = args >> 3;\n for (var i2 = 0; i2 < numCallArgs; i2++) {\n var arg = outerArgs[2 + i2];\n GROWABLE_HEAP_F64()[b + i2] = arg;\n }\n return _emscripten_run_in_main_runtime_thread_js(index, serializedNumCallArgs, args, sync);\n });\n }\n var _emscripten_receive_on_main_thread_js_callArgs = [];\n function _emscripten_receive_on_main_thread_js(index, numCallArgs, args) {\n _emscripten_receive_on_main_thread_js_callArgs.length = numCallArgs;\n var b = args >> 3;\n for (var i2 = 0; i2 < numCallArgs; i2++) {\n _emscripten_receive_on_main_thread_js_callArgs[i2] = GROWABLE_HEAP_F64()[b + i2];\n }\n var isEmAsmConst = index < 0;\n var func2 = !isEmAsmConst ? proxiedFunctionTable[index] : ASM_CONSTS[-index - 1];\n return func2.apply(null, _emscripten_receive_on_main_thread_js_callArgs);\n }\n function emscripten_realloc_buffer(size) {\n try {\n wasmMemory.grow(size - buffer2.byteLength + 65535 >>> 16);\n updateGlobalBufferAndViews(wasmMemory.buffer);\n return 1;\n } catch (e2) {\n }\n }\n function _emscripten_resize_heap(requestedSize) {\n var oldSize = GROWABLE_HEAP_U8().length;\n requestedSize = requestedSize >>> 0;\n if (requestedSize <= oldSize) {\n return false;\n }\n var maxHeapSize = getHeapMax();\n if (requestedSize > maxHeapSize) {\n return false;\n }\n let alignUp = (x, multiple) => x + (multiple - x % multiple) % multiple;\n for (var cutDown = 1; cutDown <= 4; cutDown *= 2) {\n var overGrownHeapSize = oldSize * (1 + 0.2 / cutDown);\n overGrownHeapSize = Math.min(overGrownHeapSize, requestedSize + 100663296);\n var newSize = Math.min(maxHeapSize, alignUp(Math.max(requestedSize, overGrownHeapSize), 65536));\n var replacement = emscripten_realloc_buffer(newSize);\n if (replacement) {\n return true;\n }\n }\n return false;\n }\n function _emscripten_unwind_to_js_event_loop() {\n throw \"unwind\";\n }\n function _fd_close(fd) {\n if (ENVIRONMENT_IS_PTHREAD)\n return _emscripten_proxy_to_main_thread_js(4, 1, fd);\n return 52;\n }\n function _fd_seek(fd, offset_low, offset_high, whence, newOffset) {\n if (ENVIRONMENT_IS_PTHREAD)\n return _emscripten_proxy_to_main_thread_js(5, 1, fd, offset_low, offset_high, whence, newOffset);\n return 70;\n }\n var printCharBuffers = [null, [], []];\n function printChar(stream, curr) {\n var buffer3 = printCharBuffers[stream];\n if (curr === 0 || curr === 10) {\n (stream === 1 ? out : err)(UTF8ArrayToString(buffer3, 0));\n buffer3.length = 0;\n } else {\n buffer3.push(curr);\n }\n }\n function _fd_write(fd, iov, iovcnt, pnum) {\n if (ENVIRONMENT_IS_PTHREAD)\n return _emscripten_proxy_to_main_thread_js(6, 1, fd, iov, iovcnt, pnum);\n var num = 0;\n for (var i2 = 0; i2 < iovcnt; i2++) {\n var ptr = GROWABLE_HEAP_U32()[iov >> 2];\n var len = GROWABLE_HEAP_U32()[iov + 4 >> 2];\n iov += 8;\n for (var j = 0; j < len; j++) {\n printChar(fd, GROWABLE_HEAP_U8()[ptr + j]);\n }\n num += len;\n }\n GROWABLE_HEAP_U32()[pnum >> 2] = num;\n return 0;\n }\n function getCFunc(ident) {\n var func2 = Module[\"_\" + ident];\n return func2;\n }\n function ccall(ident, returnType, argTypes, args, opts) {\n var toC = { \"string\": (str) => {\n var ret2 = 0;\n if (str !== null && str !== void 0 && str !== 0) {\n var len = (str.length << 2) + 1;\n ret2 = stackAlloc(len);\n stringToUTF8(str, ret2, len);\n }\n return ret2;\n }, \"array\": (arr) => {\n var ret2 = stackAlloc(arr.length);\n writeArrayToMemory(arr, ret2);\n return ret2;\n } };\n function convertReturnValue(ret2) {\n if (returnType === \"string\") {\n return UTF8ToString(ret2);\n }\n if (returnType === \"boolean\")\n return Boolean(ret2);\n return ret2;\n }\n var func2 = getCFunc(ident);\n var cArgs = [];\n var stack2 = 0;\n if (args) {\n for (var i2 = 0; i2 < args.length; i2++) {\n var converter = toC[argTypes[i2]];\n if (converter) {\n if (stack2 === 0)\n stack2 = stackSave();\n cArgs[i2] = converter(args[i2]);\n } else {\n cArgs[i2] = args[i2];\n }\n }\n }\n var ret = func2.apply(null, cArgs);\n function onDone(ret2) {\n if (stack2 !== 0)\n stackRestore(stack2);\n return convertReturnValue(ret2);\n }\n ret = onDone(ret);\n return ret;\n }\n function cwrap(ident, returnType, argTypes, opts) {\n argTypes = argTypes || [];\n var numericArgs = argTypes.every((type) => type === \"number\" || type === \"boolean\");\n var numericRet = returnType !== \"string\";\n if (numericRet && numericArgs && !opts) {\n return getCFunc(ident);\n }\n return function() {\n return ccall(ident, returnType, argTypes, arguments, opts);\n };\n }\n PThread.init();\n var proxiedFunctionTable = [null, _proc_exit, exitOnMainThread, pthreadCreateProxied, _fd_close, _fd_seek, _fd_write];\n var asmLibraryArg = { \"__emscripten_init_main_thread_js\": ___emscripten_init_main_thread_js, \"__emscripten_thread_cleanup\": ___emscripten_thread_cleanup, \"__pthread_create_js\": ___pthread_create_js, \"_emscripten_default_pthread_stack_size\": __emscripten_default_pthread_stack_size, \"_emscripten_get_now_is_monotonic\": __emscripten_get_now_is_monotonic, \"_emscripten_notify_task_queue\": __emscripten_notify_task_queue, \"_emscripten_set_offscreencanvas_size\": __emscripten_set_offscreencanvas_size, \"abort\": _abort, \"emscripten_check_blocking_allowed\": _emscripten_check_blocking_allowed, \"emscripten_date_now\": _emscripten_date_now, \"emscripten_get_heap_max\": _emscripten_get_heap_max, \"emscripten_get_now\": _emscripten_get_now, \"emscripten_memcpy_big\": _emscripten_memcpy_big, \"emscripten_num_logical_cores\": _emscripten_num_logical_cores, \"emscripten_receive_on_main_thread_js\": _emscripten_receive_on_main_thread_js, \"emscripten_resize_heap\": _emscripten_resize_heap, \"emscripten_unwind_to_js_event_loop\": _emscripten_unwind_to_js_event_loop, \"exit\": _exit, \"fd_close\": _fd_close, \"fd_seek\": _fd_seek, \"fd_write\": _fd_write, \"memory\": wasmMemory || Module[\"wasmMemory\"] };\n var asm = createWasm();\n var ___wasm_call_ctors = Module[\"___wasm_call_ctors\"] = function() {\n return (___wasm_call_ctors = Module[\"___wasm_call_ctors\"] = Module[\"asm\"][\"__wasm_call_ctors\"]).apply(null, arguments);\n };\n var _init = Module[\"_init\"] = function() {\n return (_init = Module[\"_init\"] = Module[\"asm\"][\"init\"]).apply(null, arguments);\n };\n var _init_with_threads_count = Module[\"_init_with_threads_count\"] = function() {\n return (_init_with_threads_count = Module[\"_init_with_threads_count\"] = Module[\"asm\"][\"init_with_threads_count\"]).apply(null, arguments);\n };\n var _get_threads_count = Module[\"_get_threads_count\"] = function() {\n return (_get_threads_count = Module[\"_get_threads_count\"] = Module[\"asm\"][\"get_threads_count\"]).apply(null, arguments);\n };\n var _register_tensor = Module[\"_register_tensor\"] = function() {\n return (_register_tensor = Module[\"_register_tensor\"] = Module[\"asm\"][\"register_tensor\"]).apply(null, arguments);\n };\n var _dispose_data = Module[\"_dispose_data\"] = function() {\n return (_dispose_data = Module[\"_dispose_data\"] = Module[\"asm\"][\"dispose_data\"]).apply(null, arguments);\n };\n var _dispose = Module[\"_dispose\"] = function() {\n return (_dispose = Module[\"_dispose\"] = Module[\"asm\"][\"dispose\"]).apply(null, arguments);\n };\n var _Abs = Module[\"_Abs\"] = function() {\n return (_Abs = Module[\"_Abs\"] = Module[\"asm\"][\"Abs\"]).apply(null, arguments);\n };\n var _Add = Module[\"_Add\"] = function() {\n return (_Add = Module[\"_Add\"] = Module[\"asm\"][\"Add\"]).apply(null, arguments);\n };\n var _AddN = Module[\"_AddN\"] = function() {\n return (_AddN = Module[\"_AddN\"] = Module[\"asm\"][\"AddN\"]).apply(null, arguments);\n };\n var _All = Module[\"_All\"] = function() {\n return (_All = Module[\"_All\"] = Module[\"asm\"][\"All\"]).apply(null, arguments);\n };\n var _Any = Module[\"_Any\"] = function() {\n return (_Any = Module[\"_Any\"] = Module[\"asm\"][\"Any\"]).apply(null, arguments);\n };\n var _ArgMax = Module[\"_ArgMax\"] = function() {\n return (_ArgMax = Module[\"_ArgMax\"] = Module[\"asm\"][\"ArgMax\"]).apply(null, arguments);\n };\n var _AvgPool = Module[\"_AvgPool\"] = function() {\n return (_AvgPool = Module[\"_AvgPool\"] = Module[\"asm\"][\"AvgPool\"]).apply(null, arguments);\n };\n var _BatchMatMul = Module[\"_BatchMatMul\"] = function() {\n return (_BatchMatMul = Module[\"_BatchMatMul\"] = Module[\"asm\"][\"BatchMatMul\"]).apply(null, arguments);\n };\n var _Ceil = Module[\"_Ceil\"] = function() {\n return (_Ceil = Module[\"_Ceil\"] = Module[\"asm\"][\"Ceil\"]).apply(null, arguments);\n };\n var _ClipByValue = Module[\"_ClipByValue\"] = function() {\n return (_ClipByValue = Module[\"_ClipByValue\"] = Module[\"asm\"][\"ClipByValue\"]).apply(null, arguments);\n };\n var _Conv2D = Module[\"_Conv2D\"] = function() {\n return (_Conv2D = Module[\"_Conv2D\"] = Module[\"asm\"][\"Conv2D\"]).apply(null, arguments);\n };\n var _Conv2DBackpropInput = Module[\"_Conv2DBackpropInput\"] = function() {\n return (_Conv2DBackpropInput = Module[\"_Conv2DBackpropInput\"] = Module[\"asm\"][\"Conv2DBackpropInput\"]).apply(null, arguments);\n };\n var _Cos = Module[\"_Cos\"] = function() {\n return (_Cos = Module[\"_Cos\"] = Module[\"asm\"][\"Cos\"]).apply(null, arguments);\n };\n var _Cosh = Module[\"_Cosh\"] = function() {\n return (_Cosh = Module[\"_Cosh\"] = Module[\"asm\"][\"Cosh\"]).apply(null, arguments);\n };\n var _CropAndResize = Module[\"_CropAndResize\"] = function() {\n return (_CropAndResize = Module[\"_CropAndResize\"] = Module[\"asm\"][\"CropAndResize\"]).apply(null, arguments);\n };\n var _Cumprod = Module[\"_Cumprod\"] = function() {\n return (_Cumprod = Module[\"_Cumprod\"] = Module[\"asm\"][\"Cumprod\"]).apply(null, arguments);\n };\n var _Cumsum = Module[\"_Cumsum\"] = function() {\n return (_Cumsum = Module[\"_Cumsum\"] = Module[\"asm\"][\"Cumsum\"]).apply(null, arguments);\n };\n var _DepthToSpace = Module[\"_DepthToSpace\"] = function() {\n return (_DepthToSpace = Module[\"_DepthToSpace\"] = Module[\"asm\"][\"DepthToSpace\"]).apply(null, arguments);\n };\n var _DepthwiseConv2dNative = Module[\"_DepthwiseConv2dNative\"] = function() {\n return (_DepthwiseConv2dNative = Module[\"_DepthwiseConv2dNative\"] = Module[\"asm\"][\"DepthwiseConv2dNative\"]).apply(null, arguments);\n };\n var _Elu = Module[\"_Elu\"] = function() {\n return (_Elu = Module[\"_Elu\"] = Module[\"asm\"][\"Elu\"]).apply(null, arguments);\n };\n var _Equal = Module[\"_Equal\"] = function() {\n return (_Equal = Module[\"_Equal\"] = Module[\"asm\"][\"Equal\"]).apply(null, arguments);\n };\n var _Exp = Module[\"_Exp\"] = function() {\n return (_Exp = Module[\"_Exp\"] = Module[\"asm\"][\"Exp\"]).apply(null, arguments);\n };\n var _FlipLeftRight = Module[\"_FlipLeftRight\"] = function() {\n return (_FlipLeftRight = Module[\"_FlipLeftRight\"] = Module[\"asm\"][\"FlipLeftRight\"]).apply(null, arguments);\n };\n var _Floor = Module[\"_Floor\"] = function() {\n return (_Floor = Module[\"_Floor\"] = Module[\"asm\"][\"Floor\"]).apply(null, arguments);\n };\n var _FloorDiv = Module[\"_FloorDiv\"] = function() {\n return (_FloorDiv = Module[\"_FloorDiv\"] = Module[\"asm\"][\"FloorDiv\"]).apply(null, arguments);\n };\n var _FusedBatchNorm = Module[\"_FusedBatchNorm\"] = function() {\n return (_FusedBatchNorm = Module[\"_FusedBatchNorm\"] = Module[\"asm\"][\"FusedBatchNorm\"]).apply(null, arguments);\n };\n var _FusedConv2D = Module[\"_FusedConv2D\"] = function() {\n return (_FusedConv2D = Module[\"_FusedConv2D\"] = Module[\"asm\"][\"FusedConv2D\"]).apply(null, arguments);\n };\n var _FusedDepthwiseConv2D = Module[\"_FusedDepthwiseConv2D\"] = function() {\n return (_FusedDepthwiseConv2D = Module[\"_FusedDepthwiseConv2D\"] = Module[\"asm\"][\"FusedDepthwiseConv2D\"]).apply(null, arguments);\n };\n var _Gather = Module[\"_Gather\"] = function() {\n return (_Gather = Module[\"_Gather\"] = Module[\"asm\"][\"Gather\"]).apply(null, arguments);\n };\n var _GatherNd = Module[\"_GatherNd\"] = function() {\n return (_GatherNd = Module[\"_GatherNd\"] = Module[\"asm\"][\"GatherNd\"]).apply(null, arguments);\n };\n var _Greater = Module[\"_Greater\"] = function() {\n return (_Greater = Module[\"_Greater\"] = Module[\"asm\"][\"Greater\"]).apply(null, arguments);\n };\n var _GreaterEqual = Module[\"_GreaterEqual\"] = function() {\n return (_GreaterEqual = Module[\"_GreaterEqual\"] = Module[\"asm\"][\"GreaterEqual\"]).apply(null, arguments);\n };\n var _LeakyRelu = Module[\"_LeakyRelu\"] = function() {\n return (_LeakyRelu = Module[\"_LeakyRelu\"] = Module[\"asm\"][\"LeakyRelu\"]).apply(null, arguments);\n };\n var _Less = Module[\"_Less\"] = function() {\n return (_Less = Module[\"_Less\"] = Module[\"asm\"][\"Less\"]).apply(null, arguments);\n };\n var _LessEqual = Module[\"_LessEqual\"] = function() {\n return (_LessEqual = Module[\"_LessEqual\"] = Module[\"asm\"][\"LessEqual\"]).apply(null, arguments);\n };\n var _Log = Module[\"_Log\"] = function() {\n return (_Log = Module[\"_Log\"] = Module[\"asm\"][\"Log\"]).apply(null, arguments);\n };\n var _LogicalAnd = Module[\"_LogicalAnd\"] = function() {\n return (_LogicalAnd = Module[\"_LogicalAnd\"] = Module[\"asm\"][\"LogicalAnd\"]).apply(null, arguments);\n };\n var _LogicalNot = Module[\"_LogicalNot\"] = function() {\n return (_LogicalNot = Module[\"_LogicalNot\"] = Module[\"asm\"][\"LogicalNot\"]).apply(null, arguments);\n };\n var _LogicalOr = Module[\"_LogicalOr\"] = function() {\n return (_LogicalOr = Module[\"_LogicalOr\"] = Module[\"asm\"][\"LogicalOr\"]).apply(null, arguments);\n };\n var _LogicalXor = Module[\"_LogicalXor\"] = function() {\n return (_LogicalXor = Module[\"_LogicalXor\"] = Module[\"asm\"][\"LogicalXor\"]).apply(null, arguments);\n };\n var _Max = Module[\"_Max\"] = function() {\n return (_Max = Module[\"_Max\"] = Module[\"asm\"][\"Max\"]).apply(null, arguments);\n };\n var _MaxPool = Module[\"_MaxPool\"] = function() {\n return (_MaxPool = Module[\"_MaxPool\"] = Module[\"asm\"][\"MaxPool\"]).apply(null, arguments);\n };\n var _Maximum = Module[\"_Maximum\"] = function() {\n return (_Maximum = Module[\"_Maximum\"] = Module[\"asm\"][\"Maximum\"]).apply(null, arguments);\n };\n var _Mean = Module[\"_Mean\"] = function() {\n return (_Mean = Module[\"_Mean\"] = Module[\"asm\"][\"Mean\"]).apply(null, arguments);\n };\n var _Min = Module[\"_Min\"] = function() {\n return (_Min = Module[\"_Min\"] = Module[\"asm\"][\"Min\"]).apply(null, arguments);\n };\n var _Minimum = Module[\"_Minimum\"] = function() {\n return (_Minimum = Module[\"_Minimum\"] = Module[\"asm\"][\"Minimum\"]).apply(null, arguments);\n };\n var _MirrorPad = Module[\"_MirrorPad\"] = function() {\n return (_MirrorPad = Module[\"_MirrorPad\"] = Module[\"asm\"][\"MirrorPad\"]).apply(null, arguments);\n };\n var _Multiply = Module[\"_Multiply\"] = function() {\n return (_Multiply = Module[\"_Multiply\"] = Module[\"asm\"][\"Multiply\"]).apply(null, arguments);\n };\n var _Neg = Module[\"_Neg\"] = function() {\n return (_Neg = Module[\"_Neg\"] = Module[\"asm\"][\"Neg\"]).apply(null, arguments);\n };\n var _NonMaxSuppressionV3 = Module[\"_NonMaxSuppressionV3\"] = function() {\n return (_NonMaxSuppressionV3 = Module[\"_NonMaxSuppressionV3\"] = Module[\"asm\"][\"NonMaxSuppressionV3\"]).apply(null, arguments);\n };\n var _NonMaxSuppressionV4 = Module[\"_NonMaxSuppressionV4\"] = function() {\n return (_NonMaxSuppressionV4 = Module[\"_NonMaxSuppressionV4\"] = Module[\"asm\"][\"NonMaxSuppressionV4\"]).apply(null, arguments);\n };\n var _NonMaxSuppressionV5 = Module[\"_NonMaxSuppressionV5\"] = function() {\n return (_NonMaxSuppressionV5 = Module[\"_NonMaxSuppressionV5\"] = Module[\"asm\"][\"NonMaxSuppressionV5\"]).apply(null, arguments);\n };\n var _NotEqual = Module[\"_NotEqual\"] = function() {\n return (_NotEqual = Module[\"_NotEqual\"] = Module[\"asm\"][\"NotEqual\"]).apply(null, arguments);\n };\n var _OneHot = Module[\"_OneHot\"] = function() {\n return (_OneHot = Module[\"_OneHot\"] = Module[\"asm\"][\"OneHot\"]).apply(null, arguments);\n };\n var _PadV2 = Module[\"_PadV2\"] = function() {\n return (_PadV2 = Module[\"_PadV2\"] = Module[\"asm\"][\"PadV2\"]).apply(null, arguments);\n };\n var _Pow = Module[\"_Pow\"] = function() {\n return (_Pow = Module[\"_Pow\"] = Module[\"asm\"][\"Pow\"]).apply(null, arguments);\n };\n var _Prelu = Module[\"_Prelu\"] = function() {\n return (_Prelu = Module[\"_Prelu\"] = Module[\"asm\"][\"Prelu\"]).apply(null, arguments);\n };\n var _Prod = Module[\"_Prod\"] = function() {\n return (_Prod = Module[\"_Prod\"] = Module[\"asm\"][\"Prod\"]).apply(null, arguments);\n };\n var _RealDiv = Module[\"_RealDiv\"] = function() {\n return (_RealDiv = Module[\"_RealDiv\"] = Module[\"asm\"][\"RealDiv\"]).apply(null, arguments);\n };\n var _Relu = Module[\"_Relu\"] = function() {\n return (_Relu = Module[\"_Relu\"] = Module[\"asm\"][\"Relu\"]).apply(null, arguments);\n };\n var _Relu6 = Module[\"_Relu6\"] = function() {\n return (_Relu6 = Module[\"_Relu6\"] = Module[\"asm\"][\"Relu6\"]).apply(null, arguments);\n };\n var _ResizeBilinear = Module[\"_ResizeBilinear\"] = function() {\n return (_ResizeBilinear = Module[\"_ResizeBilinear\"] = Module[\"asm\"][\"ResizeBilinear\"]).apply(null, arguments);\n };\n var _ResizeNearestNeighbor = Module[\"_ResizeNearestNeighbor\"] = function() {\n return (_ResizeNearestNeighbor = Module[\"_ResizeNearestNeighbor\"] = Module[\"asm\"][\"ResizeNearestNeighbor\"]).apply(null, arguments);\n };\n var _Reverse = Module[\"_Reverse\"] = function() {\n return (_Reverse = Module[\"_Reverse\"] = Module[\"asm\"][\"Reverse\"]).apply(null, arguments);\n };\n var _RotateWithOffset = Module[\"_RotateWithOffset\"] = function() {\n return (_RotateWithOffset = Module[\"_RotateWithOffset\"] = Module[\"asm\"][\"RotateWithOffset\"]).apply(null, arguments);\n };\n var _Round = Module[\"_Round\"] = function() {\n return (_Round = Module[\"_Round\"] = Module[\"asm\"][\"Round\"]).apply(null, arguments);\n };\n var _Rsqrt = Module[\"_Rsqrt\"] = function() {\n return (_Rsqrt = Module[\"_Rsqrt\"] = Module[\"asm\"][\"Rsqrt\"]).apply(null, arguments);\n };\n var _ScatterNd = Module[\"_ScatterNd\"] = function() {\n return (_ScatterNd = Module[\"_ScatterNd\"] = Module[\"asm\"][\"ScatterNd\"]).apply(null, arguments);\n };\n var _SelectV2 = Module[\"_SelectV2\"] = function() {\n return (_SelectV2 = Module[\"_SelectV2\"] = Module[\"asm\"][\"SelectV2\"]).apply(null, arguments);\n };\n var _Sigmoid = Module[\"_Sigmoid\"] = function() {\n return (_Sigmoid = Module[\"_Sigmoid\"] = Module[\"asm\"][\"Sigmoid\"]).apply(null, arguments);\n };\n var _Sin = Module[\"_Sin\"] = function() {\n return (_Sin = Module[\"_Sin\"] = Module[\"asm\"][\"Sin\"]).apply(null, arguments);\n };\n var _Softmax = Module[\"_Softmax\"] = function() {\n return (_Softmax = Module[\"_Softmax\"] = Module[\"asm\"][\"Softmax\"]).apply(null, arguments);\n };\n var _SparseFillEmptyRows = Module[\"_SparseFillEmptyRows\"] = function() {\n return (_SparseFillEmptyRows = Module[\"_SparseFillEmptyRows\"] = Module[\"asm\"][\"SparseFillEmptyRows\"]).apply(null, arguments);\n };\n var _SparseReshape = Module[\"_SparseReshape\"] = function() {\n return (_SparseReshape = Module[\"_SparseReshape\"] = Module[\"asm\"][\"SparseReshape\"]).apply(null, arguments);\n };\n var _SparseSegmentReduction = Module[\"_SparseSegmentReduction\"] = function() {\n return (_SparseSegmentReduction = Module[\"_SparseSegmentReduction\"] = Module[\"asm\"][\"SparseSegmentReduction\"]).apply(null, arguments);\n };\n var _Sqrt = Module[\"_Sqrt\"] = function() {\n return (_Sqrt = Module[\"_Sqrt\"] = Module[\"asm\"][\"Sqrt\"]).apply(null, arguments);\n };\n var _Square = Module[\"_Square\"] = function() {\n return (_Square = Module[\"_Square\"] = Module[\"asm\"][\"Square\"]).apply(null, arguments);\n };\n var _SquaredDifference = Module[\"_SquaredDifference\"] = function() {\n return (_SquaredDifference = Module[\"_SquaredDifference\"] = Module[\"asm\"][\"SquaredDifference\"]).apply(null, arguments);\n };\n var _Step = Module[\"_Step\"] = function() {\n return (_Step = Module[\"_Step\"] = Module[\"asm\"][\"Step\"]).apply(null, arguments);\n };\n var _StridedSlice = Module[\"_StridedSlice\"] = function() {\n return (_StridedSlice = Module[\"_StridedSlice\"] = Module[\"asm\"][\"StridedSlice\"]).apply(null, arguments);\n };\n var _Sub = Module[\"_Sub\"] = function() {\n return (_Sub = Module[\"_Sub\"] = Module[\"asm\"][\"Sub\"]).apply(null, arguments);\n };\n var _Sum = Module[\"_Sum\"] = function() {\n return (_Sum = Module[\"_Sum\"] = Module[\"asm\"][\"Sum\"]).apply(null, arguments);\n };\n var _Tan = Module[\"_Tan\"] = function() {\n return (_Tan = Module[\"_Tan\"] = Module[\"asm\"][\"Tan\"]).apply(null, arguments);\n };\n var _Tanh = Module[\"_Tanh\"] = function() {\n return (_Tanh = Module[\"_Tanh\"] = Module[\"asm\"][\"Tanh\"]).apply(null, arguments);\n };\n var _Tile = Module[\"_Tile\"] = function() {\n return (_Tile = Module[\"_Tile\"] = Module[\"asm\"][\"Tile\"]).apply(null, arguments);\n };\n var _TopK = Module[\"_TopK\"] = function() {\n return (_TopK = Module[\"_TopK\"] = Module[\"asm\"][\"TopK\"]).apply(null, arguments);\n };\n var _Transform = Module[\"_Transform\"] = function() {\n return (_Transform = Module[\"_Transform\"] = Module[\"asm\"][\"Transform\"]).apply(null, arguments);\n };\n var _Transpose = Module[\"_Transpose\"] = function() {\n return (_Transpose = Module[\"_Transpose\"] = Module[\"asm\"][\"Transpose\"]).apply(null, arguments);\n };\n var __FusedMatMul = Module[\"__FusedMatMul\"] = function() {\n return (__FusedMatMul = Module[\"__FusedMatMul\"] = Module[\"asm\"][\"_FusedMatMul\"]).apply(null, arguments);\n };\n var _malloc = Module[\"_malloc\"] = function() {\n return (_malloc = Module[\"_malloc\"] = Module[\"asm\"][\"malloc\"]).apply(null, arguments);\n };\n var _free = Module[\"_free\"] = function() {\n return (_free = Module[\"_free\"] = Module[\"asm\"][\"free\"]).apply(null, arguments);\n };\n var __emscripten_tls_init = Module[\"__emscripten_tls_init\"] = function() {\n return (__emscripten_tls_init = Module[\"__emscripten_tls_init\"] = Module[\"asm\"][\"_emscripten_tls_init\"]).apply(null, arguments);\n };\n var _pthread_self = Module[\"_pthread_self\"] = function() {\n return (_pthread_self = Module[\"_pthread_self\"] = Module[\"asm\"][\"pthread_self\"]).apply(null, arguments);\n };\n var ___errno_location = Module[\"___errno_location\"] = function() {\n return (___errno_location = Module[\"___errno_location\"] = Module[\"asm\"][\"__errno_location\"]).apply(null, arguments);\n };\n var __emscripten_thread_init = Module[\"__emscripten_thread_init\"] = function() {\n return (__emscripten_thread_init = Module[\"__emscripten_thread_init\"] = Module[\"asm\"][\"_emscripten_thread_init\"]).apply(null, arguments);\n };\n var __emscripten_thread_crashed = Module[\"__emscripten_thread_crashed\"] = function() {\n return (__emscripten_thread_crashed = Module[\"__emscripten_thread_crashed\"] = Module[\"asm\"][\"_emscripten_thread_crashed\"]).apply(null, arguments);\n };\n var _emscripten_main_thread_process_queued_calls = Module[\"_emscripten_main_thread_process_queued_calls\"] = function() {\n return (_emscripten_main_thread_process_queued_calls = Module[\"_emscripten_main_thread_process_queued_calls\"] = Module[\"asm\"][\"emscripten_main_thread_process_queued_calls\"]).apply(null, arguments);\n };\n var _emscripten_main_browser_thread_id = Module[\"_emscripten_main_browser_thread_id\"] = function() {\n return (_emscripten_main_browser_thread_id = Module[\"_emscripten_main_browser_thread_id\"] = Module[\"asm\"][\"emscripten_main_browser_thread_id\"]).apply(null, arguments);\n };\n var _emscripten_run_in_main_runtime_thread_js = Module[\"_emscripten_run_in_main_runtime_thread_js\"] = function() {\n return (_emscripten_run_in_main_runtime_thread_js = Module[\"_emscripten_run_in_main_runtime_thread_js\"] = Module[\"asm\"][\"emscripten_run_in_main_runtime_thread_js\"]).apply(null, arguments);\n };\n var _emscripten_dispatch_to_thread_ = Module[\"_emscripten_dispatch_to_thread_\"] = function() {\n return (_emscripten_dispatch_to_thread_ = Module[\"_emscripten_dispatch_to_thread_\"] = Module[\"asm\"][\"emscripten_dispatch_to_thread_\"]).apply(null, arguments);\n };\n var __emscripten_proxy_execute_task_queue = Module[\"__emscripten_proxy_execute_task_queue\"] = function() {\n return (__emscripten_proxy_execute_task_queue = Module[\"__emscripten_proxy_execute_task_queue\"] = Module[\"asm\"][\"_emscripten_proxy_execute_task_queue\"]).apply(null, arguments);\n };\n var __emscripten_thread_free_data = Module[\"__emscripten_thread_free_data\"] = function() {\n return (__emscripten_thread_free_data = Module[\"__emscripten_thread_free_data\"] = Module[\"asm\"][\"_emscripten_thread_free_data\"]).apply(null, arguments);\n };\n var __emscripten_thread_exit = Module[\"__emscripten_thread_exit\"] = function() {\n return (__emscripten_thread_exit = Module[\"__emscripten_thread_exit\"] = Module[\"asm\"][\"_emscripten_thread_exit\"]).apply(null, arguments);\n };\n var _emscripten_stack_set_limits = Module[\"_emscripten_stack_set_limits\"] = function() {\n return (_emscripten_stack_set_limits = Module[\"_emscripten_stack_set_limits\"] = Module[\"asm\"][\"emscripten_stack_set_limits\"]).apply(null, arguments);\n };\n var stackSave = Module[\"stackSave\"] = function() {\n return (stackSave = Module[\"stackSave\"] = Module[\"asm\"][\"stackSave\"]).apply(null, arguments);\n };\n var stackRestore = Module[\"stackRestore\"] = function() {\n return (stackRestore = Module[\"stackRestore\"] = Module[\"asm\"][\"stackRestore\"]).apply(null, arguments);\n };\n var stackAlloc = Module[\"stackAlloc\"] = function() {\n return (stackAlloc = Module[\"stackAlloc\"] = Module[\"asm\"][\"stackAlloc\"]).apply(null, arguments);\n };\n var dynCall_iijjiiii = Module[\"dynCall_iijjiiii\"] = function() {\n return (dynCall_iijjiiii = Module[\"dynCall_iijjiiii\"] = Module[\"asm\"][\"dynCall_iijjiiii\"]).apply(null, arguments);\n };\n var dynCall_jiji = Module[\"dynCall_jiji\"] = function() {\n return (dynCall_jiji = Module[\"dynCall_jiji\"] = Module[\"asm\"][\"dynCall_jiji\"]).apply(null, arguments);\n };\n Module[\"keepRuntimeAlive\"] = keepRuntimeAlive;\n Module[\"wasmMemory\"] = wasmMemory;\n Module[\"cwrap\"] = cwrap;\n Module[\"ExitStatus\"] = ExitStatus;\n Module[\"PThread\"] = PThread;\n var calledRun;\n dependenciesFulfilled = function runCaller() {\n if (!calledRun)\n run();\n if (!calledRun)\n dependenciesFulfilled = runCaller;\n };\n function run(args) {\n args = args || arguments_;\n if (runDependencies > 0) {\n return;\n }\n if (ENVIRONMENT_IS_PTHREAD) {\n readyPromiseResolve(Module);\n initRuntime();\n postMessage({ \"cmd\": \"loaded\" });\n return;\n }\n preRun();\n if (runDependencies > 0) {\n return;\n }\n function doRun() {\n if (calledRun)\n return;\n calledRun = true;\n Module[\"calledRun\"] = true;\n if (ABORT)\n return;\n initRuntime();\n readyPromiseResolve(Module);\n if (Module[\"onRuntimeInitialized\"])\n Module[\"onRuntimeInitialized\"]();\n postRun();\n }\n if (Module[\"setStatus\"]) {\n Module[\"setStatus\"](\"Running...\");\n setTimeout(function() {\n setTimeout(function() {\n Module[\"setStatus\"](\"\");\n }, 1);\n doRun();\n }, 1);\n } else {\n doRun();\n }\n }\n if (Module[\"preInit\"]) {\n if (typeof Module[\"preInit\"] == \"function\")\n Module[\"preInit\"] = [Module[\"preInit\"]];\n while (Module[\"preInit\"].length > 0) {\n Module[\"preInit\"].pop()();\n }\n }\n run();\n var listenersAdded;\n if (beforeListeners) {\n listenersAdded = { uncaughtException: process.listeners(\"uncaughtException\").filter(function(listener) {\n return !beforeListeners.uncaughtException.indexOf(listener) > -1;\n }), unhandledRejection: process.listeners(\"unhandledRejection\").filter(function(listener) {\n return !beforeListeners.unhandledRejection.indexOf(listener) > -1;\n }) };\n }\n var actualModule;\n if (typeof WasmBackendModule !== \"undefined\") {\n actualModule = WasmBackendModule;\n } else if (typeof WasmBackendModuleThreadedSimd3 !== \"undefined\") {\n actualModule = WasmBackendModuleThreadedSimd3;\n } else {\n throw new Error(\"Could not find wasm module in post.js\");\n }\n if (listenersAdded) {\n var tmpDispose = actualModule[\"_dispose\"];\n actualModule[\"_dispose\"] = function() {\n tmpDispose();\n listenersAdded.uncaughtException.forEach(function(listener) {\n process.removeListener(\"uncaughtException\", listener);\n });\n listenersAdded.unhandledRejection.forEach(function(listener) {\n process.removeListener(\"unhandledRejection\", listener);\n });\n };\n }\n return WasmBackendModuleThreadedSimd3.ready;\n };\n })();\n if (typeof exports === \"object\" && typeof module === \"object\")\n module.exports = WasmBackendModuleThreadedSimd2;\n else if (typeof define === \"function\" && define[\"amd\"])\n define([], function() {\n return WasmBackendModuleThreadedSimd2;\n });\n else if (typeof exports === \"object\")\n exports[\"WasmBackendModuleThreadedSimd\"] = WasmBackendModuleThreadedSimd2;\n }\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm-threaded-simd.worker.js\nvar require_tfjs_backend_wasm_threaded_simd_worker = __commonJS({\n \"node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm-threaded-simd.worker.js\"(exports, module) {\n module.exports.wasmWorkerContents = `\"use strict\";var Module={};var ENVIRONMENT_IS_NODE=typeof process==\"object\"&&typeof process.versions==\"object\"&&typeof process.versions.node==\"string\";if(ENVIRONMENT_IS_NODE){var nodeWorkerThreads=require(\"worker_threads\");var parentPort=nodeWorkerThreads.parentPort;parentPort.on(\"message\",data=>onmessage({data:data}));var fs=require(\"fs\");Object.assign(global,{self:global,require:require,Module:Module,location:{href:__filename},Worker:nodeWorkerThreads.Worker,importScripts:function(f){(0,eval)(fs.readFileSync(f,\"utf8\"))},postMessage:function(msg){parentPort.postMessage(msg)},performance:global.performance||{now:function(){return Date.now()}}})}var initializedJS=false;var pendingNotifiedProxyingQueues=[];function threadPrintErr(){var text=Array.prototype.slice.call(arguments).join(\" \");if(ENVIRONMENT_IS_NODE){fs.writeSync(2,text+\"\n\");return}console.error(text)}function threadAlert(){var text=Array.prototype.slice.call(arguments).join(\" \");postMessage({cmd:\"alert\",text:text,threadId:Module[\"_pthread_self\"]()})}var err=threadPrintErr;self.alert=threadAlert;Module[\"instantiateWasm\"]=(info,receiveInstance)=>{var instance=new WebAssembly.Instance(Module[\"wasmModule\"],info);receiveInstance(instance);Module[\"wasmModule\"]=null;return instance.exports};self.onunhandledrejection=e=>{throw e.reason??e};self.onmessage=e=>{try{if(e.data.cmd===\"load\"){Module[\"wasmModule\"]=e.data.wasmModule;Module[\"wasmMemory\"]=e.data.wasmMemory;Module[\"buffer\"]=Module[\"wasmMemory\"].buffer;Module[\"ENVIRONMENT_IS_PTHREAD\"]=true;if(typeof e.data.urlOrBlob==\"string\"){importScripts(e.data.urlOrBlob)}else{var objectUrl=URL.createObjectURL(e.data.urlOrBlob);importScripts(objectUrl);URL.revokeObjectURL(objectUrl)}WasmBackendModuleThreadedSimd(Module).then(function(instance){Module=instance})}else if(e.data.cmd===\"run\"){Module[\"__performance_now_clock_drift\"]=performance.now()-e.data.time;Module[\"__emscripten_thread_init\"](e.data.pthread_ptr,0,0,1);Module[\"establishStackSpace\"]();Module[\"PThread\"].receiveObjectTransfer(e.data);Module[\"PThread\"].threadInitTLS();if(!initializedJS){pendingNotifiedProxyingQueues.forEach(queue=>{Module[\"executeNotifiedProxyingQueue\"](queue)});pendingNotifiedProxyingQueues=[];initializedJS=true}try{Module[\"invokeEntryPoint\"](e.data.start_routine,e.data.arg)}catch(ex){if(ex!=\"unwind\"){if(ex instanceof Module[\"ExitStatus\"]){if(Module[\"keepRuntimeAlive\"]()){}else{Module[\"__emscripten_thread_exit\"](ex.status)}}else{throw ex}}}}else if(e.data.cmd===\"cancel\"){if(Module[\"_pthread_self\"]()){Module[\"__emscripten_thread_exit\"](-1)}}else if(e.data.target===\"setimmediate\"){}else if(e.data.cmd===\"processProxyingQueue\"){if(initializedJS){Module[\"executeNotifiedProxyingQueue\"](e.data.queue)}else{pendingNotifiedProxyingQueues.push(e.data.queue)}}else if(e.data.cmd){err(\"worker.js received unknown command \"+e.data.cmd);err(e.data)}}catch(ex){if(Module[\"__emscripten_thread_crashed\"]){Module[\"__emscripten_thread_crashed\"]()}throw ex}};`;\n }\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm.js\nvar require_tfjs_backend_wasm = __commonJS({\n \"node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm.js\"(exports, module) {\n var WasmBackendModule2 = (() => {\n var _scriptDir = typeof document !== \"undefined\" && document.currentScript ? document.currentScript.src : void 0;\n if (typeof __filename !== \"undefined\")\n _scriptDir = _scriptDir || __filename;\n return function(WasmBackendModule3) {\n WasmBackendModule3 = WasmBackendModule3 || {};\n var Module = typeof WasmBackendModule3 != \"undefined\" ? WasmBackendModule3 : {};\n var readyPromiseResolve, readyPromiseReject;\n Module[\"ready\"] = new Promise(function(resolve, reject) {\n readyPromiseResolve = resolve;\n readyPromiseReject = reject;\n });\n var beforeListeners;\n if (typeof process !== \"undefined\" && process.listeners) {\n beforeListeners = { uncaughtException: process.listeners(\"uncaughtException\"), unhandledRejection: process.listeners(\"unhandledRejection\") };\n }\n var moduleOverrides = Object.assign({}, Module);\n var arguments_ = [];\n var thisProgram = \"./this.program\";\n var quit_ = (status, toThrow) => {\n throw toThrow;\n };\n var ENVIRONMENT_IS_WEB = typeof window == \"object\";\n var ENVIRONMENT_IS_WORKER = typeof importScripts == \"function\";\n var ENVIRONMENT_IS_NODE = typeof process == \"object\" && typeof process.versions == \"object\" && typeof process.versions.node == \"string\";\n var scriptDirectory = \"\";\n function locateFile(path) {\n if (Module[\"locateFile\"]) {\n return Module[\"locateFile\"](path, scriptDirectory);\n }\n return scriptDirectory + path;\n }\n var read_, readAsync, readBinary, setWindowTitle;\n function logExceptionOnExit(e2) {\n if (e2 instanceof ExitStatus)\n return;\n let toLog = e2;\n err(\"exiting due to exception: \" + toLog);\n }\n if (ENVIRONMENT_IS_NODE) {\n if (ENVIRONMENT_IS_WORKER) {\n scriptDirectory = require_path().dirname(scriptDirectory) + \"/\";\n } else {\n scriptDirectory = __dirname + \"/\";\n }\n var fs, nodePath;\n if (typeof __require === \"function\") {\n fs = require_fs();\n nodePath = require_path();\n }\n read_ = (filename, binary) => {\n filename = nodePath[\"normalize\"](filename);\n return fs.readFileSync(filename, binary ? void 0 : \"utf8\");\n };\n readBinary = (filename) => {\n var ret = read_(filename, true);\n if (!ret.buffer) {\n ret = new Uint8Array(ret);\n }\n return ret;\n };\n readAsync = (filename, onload, onerror) => {\n filename = nodePath[\"normalize\"](filename);\n fs.readFile(filename, function(err2, data) {\n if (err2)\n onerror(err2);\n else\n onload(data.buffer);\n });\n };\n if (process[\"argv\"].length > 1) {\n thisProgram = process[\"argv\"][1].replace(/\\\\/g, \"/\");\n }\n arguments_ = process[\"argv\"].slice(2);\n process[\"on\"](\"uncaughtException\", function(ex) {\n if (!(ex instanceof ExitStatus)) {\n throw ex;\n }\n });\n process[\"on\"](\"unhandledRejection\", function(reason) {\n throw reason;\n });\n quit_ = (status, toThrow) => {\n if (keepRuntimeAlive()) {\n process[\"exitCode\"] = status;\n throw toThrow;\n }\n logExceptionOnExit(toThrow);\n process[\"exit\"](status);\n };\n Module[\"inspect\"] = function() {\n return \"[Emscripten Module object]\";\n };\n } else if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) {\n if (ENVIRONMENT_IS_WORKER) {\n scriptDirectory = self.location.href;\n } else if (typeof document != \"undefined\" && document.currentScript) {\n scriptDirectory = document.currentScript.src;\n }\n if (_scriptDir) {\n scriptDirectory = _scriptDir;\n }\n if (scriptDirectory.indexOf(\"blob:\") !== 0) {\n scriptDirectory = scriptDirectory.substr(0, scriptDirectory.replace(/[?#].*/, \"\").lastIndexOf(\"/\") + 1);\n } else {\n scriptDirectory = \"\";\n }\n {\n read_ = (url) => {\n var xhr = new XMLHttpRequest();\n xhr.open(\"GET\", url, false);\n xhr.send(null);\n return xhr.responseText;\n };\n if (ENVIRONMENT_IS_WORKER) {\n readBinary = (url) => {\n var xhr = new XMLHttpRequest();\n xhr.open(\"GET\", url, false);\n xhr.responseType = \"arraybuffer\";\n xhr.send(null);\n return new Uint8Array(xhr.response);\n };\n }\n readAsync = (url, onload, onerror) => {\n var xhr = new XMLHttpRequest();\n xhr.open(\"GET\", url, true);\n xhr.responseType = \"arraybuffer\";\n xhr.onload = () => {\n if (xhr.status == 200 || xhr.status == 0 && xhr.response) {\n onload(xhr.response);\n return;\n }\n onerror();\n };\n xhr.onerror = onerror;\n xhr.send(null);\n };\n }\n setWindowTitle = (title) => document.title = title;\n } else {\n }\n var out = Module[\"print\"] || console.log.bind(console);\n var err = Module[\"printErr\"] || console.warn.bind(console);\n Object.assign(Module, moduleOverrides);\n moduleOverrides = null;\n if (Module[\"arguments\"])\n arguments_ = Module[\"arguments\"];\n if (Module[\"thisProgram\"])\n thisProgram = Module[\"thisProgram\"];\n if (Module[\"quit\"])\n quit_ = Module[\"quit\"];\n var POINTER_SIZE = 4;\n var wasmBinary;\n if (Module[\"wasmBinary\"])\n wasmBinary = Module[\"wasmBinary\"];\n var noExitRuntime = Module[\"noExitRuntime\"] || true;\n if (typeof WebAssembly != \"object\") {\n abort(\"no native wasm support detected\");\n }\n var wasmMemory;\n var ABORT = false;\n var EXITSTATUS;\n function assert3(condition, text) {\n if (!condition) {\n abort(text);\n }\n }\n var UTF8Decoder = typeof TextDecoder != \"undefined\" ? new TextDecoder(\"utf8\") : void 0;\n function UTF8ArrayToString(heapOrArray, idx, maxBytesToRead) {\n var endIdx = idx + maxBytesToRead;\n var endPtr = idx;\n while (heapOrArray[endPtr] && !(endPtr >= endIdx))\n ++endPtr;\n if (endPtr - idx > 16 && heapOrArray.buffer && UTF8Decoder) {\n return UTF8Decoder.decode(heapOrArray.subarray(idx, endPtr));\n }\n var str = \"\";\n while (idx < endPtr) {\n var u0 = heapOrArray[idx++];\n if (!(u0 & 128)) {\n str += String.fromCharCode(u0);\n continue;\n }\n var u1 = heapOrArray[idx++] & 63;\n if ((u0 & 224) == 192) {\n str += String.fromCharCode((u0 & 31) << 6 | u1);\n continue;\n }\n var u2 = heapOrArray[idx++] & 63;\n if ((u0 & 240) == 224) {\n u0 = (u0 & 15) << 12 | u1 << 6 | u2;\n } else {\n u0 = (u0 & 7) << 18 | u1 << 12 | u2 << 6 | heapOrArray[idx++] & 63;\n }\n if (u0 < 65536) {\n str += String.fromCharCode(u0);\n } else {\n var ch = u0 - 65536;\n str += String.fromCharCode(55296 | ch >> 10, 56320 | ch & 1023);\n }\n }\n return str;\n }\n function UTF8ToString(ptr, maxBytesToRead) {\n return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead) : \"\";\n }\n function stringToUTF8Array(str, heap, outIdx, maxBytesToWrite) {\n if (!(maxBytesToWrite > 0))\n return 0;\n var startIdx = outIdx;\n var endIdx = outIdx + maxBytesToWrite - 1;\n for (var i2 = 0; i2 < str.length; ++i2) {\n var u = str.charCodeAt(i2);\n if (u >= 55296 && u <= 57343) {\n var u1 = str.charCodeAt(++i2);\n u = 65536 + ((u & 1023) << 10) | u1 & 1023;\n }\n if (u <= 127) {\n if (outIdx >= endIdx)\n break;\n heap[outIdx++] = u;\n } else if (u <= 2047) {\n if (outIdx + 1 >= endIdx)\n break;\n heap[outIdx++] = 192 | u >> 6;\n heap[outIdx++] = 128 | u & 63;\n } else if (u <= 65535) {\n if (outIdx + 2 >= endIdx)\n break;\n heap[outIdx++] = 224 | u >> 12;\n heap[outIdx++] = 128 | u >> 6 & 63;\n heap[outIdx++] = 128 | u & 63;\n } else {\n if (outIdx + 3 >= endIdx)\n break;\n heap[outIdx++] = 240 | u >> 18;\n heap[outIdx++] = 128 | u >> 12 & 63;\n heap[outIdx++] = 128 | u >> 6 & 63;\n heap[outIdx++] = 128 | u & 63;\n }\n }\n heap[outIdx] = 0;\n return outIdx - startIdx;\n }\n function stringToUTF8(str, outPtr, maxBytesToWrite) {\n return stringToUTF8Array(str, HEAPU8, outPtr, maxBytesToWrite);\n }\n var buffer2, HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32, HEAPF32, HEAPF64;\n function updateGlobalBufferAndViews(buf) {\n buffer2 = buf;\n Module[\"HEAP8\"] = HEAP8 = new Int8Array(buf);\n Module[\"HEAP16\"] = HEAP16 = new Int16Array(buf);\n Module[\"HEAP32\"] = HEAP32 = new Int32Array(buf);\n Module[\"HEAPU8\"] = HEAPU8 = new Uint8Array(buf);\n Module[\"HEAPU16\"] = HEAPU16 = new Uint16Array(buf);\n Module[\"HEAPU32\"] = HEAPU32 = new Uint32Array(buf);\n Module[\"HEAPF32\"] = HEAPF32 = new Float32Array(buf);\n Module[\"HEAPF64\"] = HEAPF64 = new Float64Array(buf);\n }\n var INITIAL_MEMORY = Module[\"INITIAL_MEMORY\"] || 16777216;\n var wasmTable;\n var __ATPRERUN__ = [];\n var __ATINIT__ = [];\n var __ATPOSTRUN__ = [];\n var runtimeInitialized = false;\n function keepRuntimeAlive() {\n return noExitRuntime;\n }\n function preRun() {\n if (Module[\"preRun\"]) {\n if (typeof Module[\"preRun\"] == \"function\")\n Module[\"preRun\"] = [Module[\"preRun\"]];\n while (Module[\"preRun\"].length) {\n addOnPreRun(Module[\"preRun\"].shift());\n }\n }\n callRuntimeCallbacks(__ATPRERUN__);\n }\n function initRuntime() {\n runtimeInitialized = true;\n callRuntimeCallbacks(__ATINIT__);\n }\n function postRun() {\n if (Module[\"postRun\"]) {\n if (typeof Module[\"postRun\"] == \"function\")\n Module[\"postRun\"] = [Module[\"postRun\"]];\n while (Module[\"postRun\"].length) {\n addOnPostRun(Module[\"postRun\"].shift());\n }\n }\n callRuntimeCallbacks(__ATPOSTRUN__);\n }\n function addOnPreRun(cb) {\n __ATPRERUN__.unshift(cb);\n }\n function addOnInit(cb) {\n __ATINIT__.unshift(cb);\n }\n function addOnPostRun(cb) {\n __ATPOSTRUN__.unshift(cb);\n }\n var runDependencies = 0;\n var runDependencyWatcher = null;\n var dependenciesFulfilled = null;\n function addRunDependency(id) {\n runDependencies++;\n if (Module[\"monitorRunDependencies\"]) {\n Module[\"monitorRunDependencies\"](runDependencies);\n }\n }\n function removeRunDependency(id) {\n runDependencies--;\n if (Module[\"monitorRunDependencies\"]) {\n Module[\"monitorRunDependencies\"](runDependencies);\n }\n if (runDependencies == 0) {\n if (runDependencyWatcher !== null) {\n clearInterval(runDependencyWatcher);\n runDependencyWatcher = null;\n }\n if (dependenciesFulfilled) {\n var callback = dependenciesFulfilled;\n dependenciesFulfilled = null;\n callback();\n }\n }\n }\n function abort(what) {\n {\n if (Module[\"onAbort\"]) {\n Module[\"onAbort\"](what);\n }\n }\n what = \"Aborted(\" + what + \")\";\n err(what);\n ABORT = true;\n EXITSTATUS = 1;\n what += \". Build with -sASSERTIONS for more info.\";\n var e2 = new WebAssembly.RuntimeError(what);\n readyPromiseReject(e2);\n throw e2;\n }\n var dataURIPrefix = \"data:application/octet-stream;base64,\";\n function isDataURI(filename) {\n return filename.startsWith(dataURIPrefix);\n }\n function isFileURI(filename) {\n return filename.startsWith(\"file://\");\n }\n var wasmBinaryFile;\n wasmBinaryFile = \"tfjs-backend-wasm.wasm\";\n if (!isDataURI(wasmBinaryFile)) {\n wasmBinaryFile = locateFile(wasmBinaryFile);\n }\n function getBinary(file) {\n try {\n if (file == wasmBinaryFile && wasmBinary) {\n return new Uint8Array(wasmBinary);\n }\n if (readBinary) {\n return readBinary(file);\n }\n throw \"both async and sync fetching of the wasm failed\";\n } catch (err2) {\n abort(err2);\n }\n }\n function getBinaryPromise() {\n if (!wasmBinary && (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER)) {\n if (typeof fetch == \"function\" && !isFileURI(wasmBinaryFile)) {\n return fetch(wasmBinaryFile, { credentials: \"same-origin\" }).then(function(response) {\n if (!response[\"ok\"]) {\n throw \"failed to load wasm binary file at '\" + wasmBinaryFile + \"'\";\n }\n return response[\"arrayBuffer\"]();\n }).catch(function() {\n return getBinary(wasmBinaryFile);\n });\n } else {\n if (readAsync) {\n return new Promise(function(resolve, reject) {\n readAsync(wasmBinaryFile, function(response) {\n resolve(new Uint8Array(response));\n }, reject);\n });\n }\n }\n }\n return Promise.resolve().then(function() {\n return getBinary(wasmBinaryFile);\n });\n }\n function createWasm() {\n var info = { \"env\": asmLibraryArg, \"wasi_snapshot_preview1\": asmLibraryArg };\n function receiveInstance(instance, module2) {\n var exports3 = instance.exports;\n Module[\"asm\"] = exports3;\n wasmMemory = Module[\"asm\"][\"memory\"];\n updateGlobalBufferAndViews(wasmMemory.buffer);\n wasmTable = Module[\"asm\"][\"__indirect_function_table\"];\n addOnInit(Module[\"asm\"][\"__wasm_call_ctors\"]);\n removeRunDependency(\"wasm-instantiate\");\n }\n addRunDependency(\"wasm-instantiate\");\n function receiveInstantiationResult(result) {\n receiveInstance(result[\"instance\"]);\n }\n function instantiateArrayBuffer(receiver) {\n return getBinaryPromise().then(function(binary) {\n return WebAssembly.instantiate(binary, info);\n }).then(function(instance) {\n return instance;\n }).then(receiver, function(reason) {\n err(\"failed to asynchronously prepare wasm: \" + reason);\n abort(reason);\n });\n }\n function instantiateAsync() {\n if (!wasmBinary && typeof WebAssembly.instantiateStreaming == \"function\" && !isDataURI(wasmBinaryFile) && !isFileURI(wasmBinaryFile) && !ENVIRONMENT_IS_NODE && typeof fetch == \"function\") {\n return fetch(wasmBinaryFile, { credentials: \"same-origin\" }).then(function(response) {\n var result = WebAssembly.instantiateStreaming(response, info);\n return result.then(receiveInstantiationResult, function(reason) {\n err(\"wasm streaming compile failed: \" + reason);\n err(\"falling back to ArrayBuffer instantiation\");\n return instantiateArrayBuffer(receiveInstantiationResult);\n });\n });\n } else {\n return instantiateArrayBuffer(receiveInstantiationResult);\n }\n }\n if (Module[\"instantiateWasm\"]) {\n try {\n var exports2 = Module[\"instantiateWasm\"](info, receiveInstance);\n return exports2;\n } catch (e2) {\n err(\"Module.instantiateWasm callback failed with error: \" + e2);\n readyPromiseReject(e2);\n }\n }\n instantiateAsync().catch(readyPromiseReject);\n return {};\n }\n var tempDouble;\n var tempI64;\n function ExitStatus(status) {\n this.name = \"ExitStatus\";\n this.message = \"Program terminated with exit(\" + status + \")\";\n this.status = status;\n }\n function callRuntimeCallbacks(callbacks2) {\n while (callbacks2.length > 0) {\n callbacks2.shift()(Module);\n }\n }\n function demangle(func2) {\n return func2;\n }\n function demangleAll(text) {\n var regex = /\\b_Z[\\w\\d_]+/g;\n return text.replace(regex, function(x) {\n var y = demangle(x);\n return x === y ? x : y + \" [\" + x + \"]\";\n });\n }\n function jsStackTrace() {\n var error = new Error();\n if (!error.stack) {\n try {\n throw new Error();\n } catch (e2) {\n error = e2;\n }\n if (!error.stack) {\n return \"(no stack trace available)\";\n }\n }\n return error.stack.toString();\n }\n function writeArrayToMemory(array2, buffer3) {\n HEAP8.set(array2, buffer3);\n }\n function _abort() {\n abort(\"\");\n }\n function getHeapMax() {\n return 2147483648;\n }\n function _emscripten_get_heap_max() {\n return getHeapMax();\n }\n function _emscripten_memcpy_big(dest, src, num) {\n HEAPU8.copyWithin(dest, src, src + num);\n }\n function emscripten_realloc_buffer(size) {\n try {\n wasmMemory.grow(size - buffer2.byteLength + 65535 >>> 16);\n updateGlobalBufferAndViews(wasmMemory.buffer);\n return 1;\n } catch (e2) {\n }\n }\n function _emscripten_resize_heap(requestedSize) {\n var oldSize = HEAPU8.length;\n requestedSize = requestedSize >>> 0;\n var maxHeapSize = getHeapMax();\n if (requestedSize > maxHeapSize) {\n return false;\n }\n let alignUp = (x, multiple) => x + (multiple - x % multiple) % multiple;\n for (var cutDown = 1; cutDown <= 4; cutDown *= 2) {\n var overGrownHeapSize = oldSize * (1 + 0.2 / cutDown);\n overGrownHeapSize = Math.min(overGrownHeapSize, requestedSize + 100663296);\n var newSize = Math.min(maxHeapSize, alignUp(Math.max(requestedSize, overGrownHeapSize), 65536));\n var replacement = emscripten_realloc_buffer(newSize);\n if (replacement) {\n return true;\n }\n }\n return false;\n }\n var SYSCALLS = { varargs: void 0, get: function() {\n SYSCALLS.varargs += 4;\n var ret = HEAP32[SYSCALLS.varargs - 4 >> 2];\n return ret;\n }, getStr: function(ptr) {\n var ret = UTF8ToString(ptr);\n return ret;\n } };\n function _fd_close(fd) {\n return 52;\n }\n function _fd_seek(fd, offset_low, offset_high, whence, newOffset) {\n return 70;\n }\n var printCharBuffers = [null, [], []];\n function printChar(stream, curr) {\n var buffer3 = printCharBuffers[stream];\n if (curr === 0 || curr === 10) {\n (stream === 1 ? out : err)(UTF8ArrayToString(buffer3, 0));\n buffer3.length = 0;\n } else {\n buffer3.push(curr);\n }\n }\n function _fd_write(fd, iov, iovcnt, pnum) {\n var num = 0;\n for (var i2 = 0; i2 < iovcnt; i2++) {\n var ptr = HEAPU32[iov >> 2];\n var len = HEAPU32[iov + 4 >> 2];\n iov += 8;\n for (var j = 0; j < len; j++) {\n printChar(fd, HEAPU8[ptr + j]);\n }\n num += len;\n }\n HEAPU32[pnum >> 2] = num;\n return 0;\n }\n function getCFunc(ident) {\n var func2 = Module[\"_\" + ident];\n return func2;\n }\n function ccall(ident, returnType, argTypes, args, opts) {\n var toC = { \"string\": (str) => {\n var ret2 = 0;\n if (str !== null && str !== void 0 && str !== 0) {\n var len = (str.length << 2) + 1;\n ret2 = stackAlloc(len);\n stringToUTF8(str, ret2, len);\n }\n return ret2;\n }, \"array\": (arr) => {\n var ret2 = stackAlloc(arr.length);\n writeArrayToMemory(arr, ret2);\n return ret2;\n } };\n function convertReturnValue(ret2) {\n if (returnType === \"string\") {\n return UTF8ToString(ret2);\n }\n if (returnType === \"boolean\")\n return Boolean(ret2);\n return ret2;\n }\n var func2 = getCFunc(ident);\n var cArgs = [];\n var stack2 = 0;\n if (args) {\n for (var i2 = 0; i2 < args.length; i2++) {\n var converter = toC[argTypes[i2]];\n if (converter) {\n if (stack2 === 0)\n stack2 = stackSave();\n cArgs[i2] = converter(args[i2]);\n } else {\n cArgs[i2] = args[i2];\n }\n }\n }\n var ret = func2.apply(null, cArgs);\n function onDone(ret2) {\n if (stack2 !== 0)\n stackRestore(stack2);\n return convertReturnValue(ret2);\n }\n ret = onDone(ret);\n return ret;\n }\n function cwrap(ident, returnType, argTypes, opts) {\n argTypes = argTypes || [];\n var numericArgs = argTypes.every((type) => type === \"number\" || type === \"boolean\");\n var numericRet = returnType !== \"string\";\n if (numericRet && numericArgs && !opts) {\n return getCFunc(ident);\n }\n return function() {\n return ccall(ident, returnType, argTypes, arguments, opts);\n };\n }\n var asmLibraryArg = { \"abort\": _abort, \"emscripten_get_heap_max\": _emscripten_get_heap_max, \"emscripten_memcpy_big\": _emscripten_memcpy_big, \"emscripten_resize_heap\": _emscripten_resize_heap, \"fd_close\": _fd_close, \"fd_seek\": _fd_seek, \"fd_write\": _fd_write };\n var asm = createWasm();\n var ___wasm_call_ctors = Module[\"___wasm_call_ctors\"] = function() {\n return (___wasm_call_ctors = Module[\"___wasm_call_ctors\"] = Module[\"asm\"][\"__wasm_call_ctors\"]).apply(null, arguments);\n };\n var _init = Module[\"_init\"] = function() {\n return (_init = Module[\"_init\"] = Module[\"asm\"][\"init\"]).apply(null, arguments);\n };\n var _init_with_threads_count = Module[\"_init_with_threads_count\"] = function() {\n return (_init_with_threads_count = Module[\"_init_with_threads_count\"] = Module[\"asm\"][\"init_with_threads_count\"]).apply(null, arguments);\n };\n var _get_threads_count = Module[\"_get_threads_count\"] = function() {\n return (_get_threads_count = Module[\"_get_threads_count\"] = Module[\"asm\"][\"get_threads_count\"]).apply(null, arguments);\n };\n var _register_tensor = Module[\"_register_tensor\"] = function() {\n return (_register_tensor = Module[\"_register_tensor\"] = Module[\"asm\"][\"register_tensor\"]).apply(null, arguments);\n };\n var _dispose_data = Module[\"_dispose_data\"] = function() {\n return (_dispose_data = Module[\"_dispose_data\"] = Module[\"asm\"][\"dispose_data\"]).apply(null, arguments);\n };\n var _dispose = Module[\"_dispose\"] = function() {\n return (_dispose = Module[\"_dispose\"] = Module[\"asm\"][\"dispose\"]).apply(null, arguments);\n };\n var _Abs = Module[\"_Abs\"] = function() {\n return (_Abs = Module[\"_Abs\"] = Module[\"asm\"][\"Abs\"]).apply(null, arguments);\n };\n var _Add = Module[\"_Add\"] = function() {\n return (_Add = Module[\"_Add\"] = Module[\"asm\"][\"Add\"]).apply(null, arguments);\n };\n var _AddN = Module[\"_AddN\"] = function() {\n return (_AddN = Module[\"_AddN\"] = Module[\"asm\"][\"AddN\"]).apply(null, arguments);\n };\n var _All = Module[\"_All\"] = function() {\n return (_All = Module[\"_All\"] = Module[\"asm\"][\"All\"]).apply(null, arguments);\n };\n var _Any = Module[\"_Any\"] = function() {\n return (_Any = Module[\"_Any\"] = Module[\"asm\"][\"Any\"]).apply(null, arguments);\n };\n var _ArgMax = Module[\"_ArgMax\"] = function() {\n return (_ArgMax = Module[\"_ArgMax\"] = Module[\"asm\"][\"ArgMax\"]).apply(null, arguments);\n };\n var _AvgPool = Module[\"_AvgPool\"] = function() {\n return (_AvgPool = Module[\"_AvgPool\"] = Module[\"asm\"][\"AvgPool\"]).apply(null, arguments);\n };\n var _BatchMatMul = Module[\"_BatchMatMul\"] = function() {\n return (_BatchMatMul = Module[\"_BatchMatMul\"] = Module[\"asm\"][\"BatchMatMul\"]).apply(null, arguments);\n };\n var _Ceil = Module[\"_Ceil\"] = function() {\n return (_Ceil = Module[\"_Ceil\"] = Module[\"asm\"][\"Ceil\"]).apply(null, arguments);\n };\n var _ClipByValue = Module[\"_ClipByValue\"] = function() {\n return (_ClipByValue = Module[\"_ClipByValue\"] = Module[\"asm\"][\"ClipByValue\"]).apply(null, arguments);\n };\n var _Conv2D = Module[\"_Conv2D\"] = function() {\n return (_Conv2D = Module[\"_Conv2D\"] = Module[\"asm\"][\"Conv2D\"]).apply(null, arguments);\n };\n var _Conv2DBackpropInput = Module[\"_Conv2DBackpropInput\"] = function() {\n return (_Conv2DBackpropInput = Module[\"_Conv2DBackpropInput\"] = Module[\"asm\"][\"Conv2DBackpropInput\"]).apply(null, arguments);\n };\n var _Cos = Module[\"_Cos\"] = function() {\n return (_Cos = Module[\"_Cos\"] = Module[\"asm\"][\"Cos\"]).apply(null, arguments);\n };\n var _Cosh = Module[\"_Cosh\"] = function() {\n return (_Cosh = Module[\"_Cosh\"] = Module[\"asm\"][\"Cosh\"]).apply(null, arguments);\n };\n var _CropAndResize = Module[\"_CropAndResize\"] = function() {\n return (_CropAndResize = Module[\"_CropAndResize\"] = Module[\"asm\"][\"CropAndResize\"]).apply(null, arguments);\n };\n var _Cumprod = Module[\"_Cumprod\"] = function() {\n return (_Cumprod = Module[\"_Cumprod\"] = Module[\"asm\"][\"Cumprod\"]).apply(null, arguments);\n };\n var _Cumsum = Module[\"_Cumsum\"] = function() {\n return (_Cumsum = Module[\"_Cumsum\"] = Module[\"asm\"][\"Cumsum\"]).apply(null, arguments);\n };\n var _DepthToSpace = Module[\"_DepthToSpace\"] = function() {\n return (_DepthToSpace = Module[\"_DepthToSpace\"] = Module[\"asm\"][\"DepthToSpace\"]).apply(null, arguments);\n };\n var _DepthwiseConv2dNative = Module[\"_DepthwiseConv2dNative\"] = function() {\n return (_DepthwiseConv2dNative = Module[\"_DepthwiseConv2dNative\"] = Module[\"asm\"][\"DepthwiseConv2dNative\"]).apply(null, arguments);\n };\n var _Elu = Module[\"_Elu\"] = function() {\n return (_Elu = Module[\"_Elu\"] = Module[\"asm\"][\"Elu\"]).apply(null, arguments);\n };\n var _Equal = Module[\"_Equal\"] = function() {\n return (_Equal = Module[\"_Equal\"] = Module[\"asm\"][\"Equal\"]).apply(null, arguments);\n };\n var _Exp = Module[\"_Exp\"] = function() {\n return (_Exp = Module[\"_Exp\"] = Module[\"asm\"][\"Exp\"]).apply(null, arguments);\n };\n var _FlipLeftRight = Module[\"_FlipLeftRight\"] = function() {\n return (_FlipLeftRight = Module[\"_FlipLeftRight\"] = Module[\"asm\"][\"FlipLeftRight\"]).apply(null, arguments);\n };\n var _Floor = Module[\"_Floor\"] = function() {\n return (_Floor = Module[\"_Floor\"] = Module[\"asm\"][\"Floor\"]).apply(null, arguments);\n };\n var _FloorDiv = Module[\"_FloorDiv\"] = function() {\n return (_FloorDiv = Module[\"_FloorDiv\"] = Module[\"asm\"][\"FloorDiv\"]).apply(null, arguments);\n };\n var _FusedBatchNorm = Module[\"_FusedBatchNorm\"] = function() {\n return (_FusedBatchNorm = Module[\"_FusedBatchNorm\"] = Module[\"asm\"][\"FusedBatchNorm\"]).apply(null, arguments);\n };\n var _FusedConv2D = Module[\"_FusedConv2D\"] = function() {\n return (_FusedConv2D = Module[\"_FusedConv2D\"] = Module[\"asm\"][\"FusedConv2D\"]).apply(null, arguments);\n };\n var _FusedDepthwiseConv2D = Module[\"_FusedDepthwiseConv2D\"] = function() {\n return (_FusedDepthwiseConv2D = Module[\"_FusedDepthwiseConv2D\"] = Module[\"asm\"][\"FusedDepthwiseConv2D\"]).apply(null, arguments);\n };\n var _Gather = Module[\"_Gather\"] = function() {\n return (_Gather = Module[\"_Gather\"] = Module[\"asm\"][\"Gather\"]).apply(null, arguments);\n };\n var _GatherNd = Module[\"_GatherNd\"] = function() {\n return (_GatherNd = Module[\"_GatherNd\"] = Module[\"asm\"][\"GatherNd\"]).apply(null, arguments);\n };\n var _Greater = Module[\"_Greater\"] = function() {\n return (_Greater = Module[\"_Greater\"] = Module[\"asm\"][\"Greater\"]).apply(null, arguments);\n };\n var _GreaterEqual = Module[\"_GreaterEqual\"] = function() {\n return (_GreaterEqual = Module[\"_GreaterEqual\"] = Module[\"asm\"][\"GreaterEqual\"]).apply(null, arguments);\n };\n var _LeakyRelu = Module[\"_LeakyRelu\"] = function() {\n return (_LeakyRelu = Module[\"_LeakyRelu\"] = Module[\"asm\"][\"LeakyRelu\"]).apply(null, arguments);\n };\n var _Less = Module[\"_Less\"] = function() {\n return (_Less = Module[\"_Less\"] = Module[\"asm\"][\"Less\"]).apply(null, arguments);\n };\n var _LessEqual = Module[\"_LessEqual\"] = function() {\n return (_LessEqual = Module[\"_LessEqual\"] = Module[\"asm\"][\"LessEqual\"]).apply(null, arguments);\n };\n var _Log = Module[\"_Log\"] = function() {\n return (_Log = Module[\"_Log\"] = Module[\"asm\"][\"Log\"]).apply(null, arguments);\n };\n var _LogicalAnd = Module[\"_LogicalAnd\"] = function() {\n return (_LogicalAnd = Module[\"_LogicalAnd\"] = Module[\"asm\"][\"LogicalAnd\"]).apply(null, arguments);\n };\n var _LogicalNot = Module[\"_LogicalNot\"] = function() {\n return (_LogicalNot = Module[\"_LogicalNot\"] = Module[\"asm\"][\"LogicalNot\"]).apply(null, arguments);\n };\n var _LogicalOr = Module[\"_LogicalOr\"] = function() {\n return (_LogicalOr = Module[\"_LogicalOr\"] = Module[\"asm\"][\"LogicalOr\"]).apply(null, arguments);\n };\n var _LogicalXor = Module[\"_LogicalXor\"] = function() {\n return (_LogicalXor = Module[\"_LogicalXor\"] = Module[\"asm\"][\"LogicalXor\"]).apply(null, arguments);\n };\n var _Max = Module[\"_Max\"] = function() {\n return (_Max = Module[\"_Max\"] = Module[\"asm\"][\"Max\"]).apply(null, arguments);\n };\n var _MaxPool = Module[\"_MaxPool\"] = function() {\n return (_MaxPool = Module[\"_MaxPool\"] = Module[\"asm\"][\"MaxPool\"]).apply(null, arguments);\n };\n var _Maximum = Module[\"_Maximum\"] = function() {\n return (_Maximum = Module[\"_Maximum\"] = Module[\"asm\"][\"Maximum\"]).apply(null, arguments);\n };\n var _Mean = Module[\"_Mean\"] = function() {\n return (_Mean = Module[\"_Mean\"] = Module[\"asm\"][\"Mean\"]).apply(null, arguments);\n };\n var _Min = Module[\"_Min\"] = function() {\n return (_Min = Module[\"_Min\"] = Module[\"asm\"][\"Min\"]).apply(null, arguments);\n };\n var _Minimum = Module[\"_Minimum\"] = function() {\n return (_Minimum = Module[\"_Minimum\"] = Module[\"asm\"][\"Minimum\"]).apply(null, arguments);\n };\n var _MirrorPad = Module[\"_MirrorPad\"] = function() {\n return (_MirrorPad = Module[\"_MirrorPad\"] = Module[\"asm\"][\"MirrorPad\"]).apply(null, arguments);\n };\n var _Multiply = Module[\"_Multiply\"] = function() {\n return (_Multiply = Module[\"_Multiply\"] = Module[\"asm\"][\"Multiply\"]).apply(null, arguments);\n };\n var _Neg = Module[\"_Neg\"] = function() {\n return (_Neg = Module[\"_Neg\"] = Module[\"asm\"][\"Neg\"]).apply(null, arguments);\n };\n var _NonMaxSuppressionV3 = Module[\"_NonMaxSuppressionV3\"] = function() {\n return (_NonMaxSuppressionV3 = Module[\"_NonMaxSuppressionV3\"] = Module[\"asm\"][\"NonMaxSuppressionV3\"]).apply(null, arguments);\n };\n var _NonMaxSuppressionV4 = Module[\"_NonMaxSuppressionV4\"] = function() {\n return (_NonMaxSuppressionV4 = Module[\"_NonMaxSuppressionV4\"] = Module[\"asm\"][\"NonMaxSuppressionV4\"]).apply(null, arguments);\n };\n var _NonMaxSuppressionV5 = Module[\"_NonMaxSuppressionV5\"] = function() {\n return (_NonMaxSuppressionV5 = Module[\"_NonMaxSuppressionV5\"] = Module[\"asm\"][\"NonMaxSuppressionV5\"]).apply(null, arguments);\n };\n var _NotEqual = Module[\"_NotEqual\"] = function() {\n return (_NotEqual = Module[\"_NotEqual\"] = Module[\"asm\"][\"NotEqual\"]).apply(null, arguments);\n };\n var _OneHot = Module[\"_OneHot\"] = function() {\n return (_OneHot = Module[\"_OneHot\"] = Module[\"asm\"][\"OneHot\"]).apply(null, arguments);\n };\n var _PadV2 = Module[\"_PadV2\"] = function() {\n return (_PadV2 = Module[\"_PadV2\"] = Module[\"asm\"][\"PadV2\"]).apply(null, arguments);\n };\n var _Pow = Module[\"_Pow\"] = function() {\n return (_Pow = Module[\"_Pow\"] = Module[\"asm\"][\"Pow\"]).apply(null, arguments);\n };\n var _Prelu = Module[\"_Prelu\"] = function() {\n return (_Prelu = Module[\"_Prelu\"] = Module[\"asm\"][\"Prelu\"]).apply(null, arguments);\n };\n var _Prod = Module[\"_Prod\"] = function() {\n return (_Prod = Module[\"_Prod\"] = Module[\"asm\"][\"Prod\"]).apply(null, arguments);\n };\n var _RealDiv = Module[\"_RealDiv\"] = function() {\n return (_RealDiv = Module[\"_RealDiv\"] = Module[\"asm\"][\"RealDiv\"]).apply(null, arguments);\n };\n var _Relu = Module[\"_Relu\"] = function() {\n return (_Relu = Module[\"_Relu\"] = Module[\"asm\"][\"Relu\"]).apply(null, arguments);\n };\n var _Relu6 = Module[\"_Relu6\"] = function() {\n return (_Relu6 = Module[\"_Relu6\"] = Module[\"asm\"][\"Relu6\"]).apply(null, arguments);\n };\n var _ResizeBilinear = Module[\"_ResizeBilinear\"] = function() {\n return (_ResizeBilinear = Module[\"_ResizeBilinear\"] = Module[\"asm\"][\"ResizeBilinear\"]).apply(null, arguments);\n };\n var _ResizeNearestNeighbor = Module[\"_ResizeNearestNeighbor\"] = function() {\n return (_ResizeNearestNeighbor = Module[\"_ResizeNearestNeighbor\"] = Module[\"asm\"][\"ResizeNearestNeighbor\"]).apply(null, arguments);\n };\n var _Reverse = Module[\"_Reverse\"] = function() {\n return (_Reverse = Module[\"_Reverse\"] = Module[\"asm\"][\"Reverse\"]).apply(null, arguments);\n };\n var _RotateWithOffset = Module[\"_RotateWithOffset\"] = function() {\n return (_RotateWithOffset = Module[\"_RotateWithOffset\"] = Module[\"asm\"][\"RotateWithOffset\"]).apply(null, arguments);\n };\n var _Round = Module[\"_Round\"] = function() {\n return (_Round = Module[\"_Round\"] = Module[\"asm\"][\"Round\"]).apply(null, arguments);\n };\n var _Rsqrt = Module[\"_Rsqrt\"] = function() {\n return (_Rsqrt = Module[\"_Rsqrt\"] = Module[\"asm\"][\"Rsqrt\"]).apply(null, arguments);\n };\n var _ScatterNd = Module[\"_ScatterNd\"] = function() {\n return (_ScatterNd = Module[\"_ScatterNd\"] = Module[\"asm\"][\"ScatterNd\"]).apply(null, arguments);\n };\n var _SelectV2 = Module[\"_SelectV2\"] = function() {\n return (_SelectV2 = Module[\"_SelectV2\"] = Module[\"asm\"][\"SelectV2\"]).apply(null, arguments);\n };\n var _Sigmoid = Module[\"_Sigmoid\"] = function() {\n return (_Sigmoid = Module[\"_Sigmoid\"] = Module[\"asm\"][\"Sigmoid\"]).apply(null, arguments);\n };\n var _Sin = Module[\"_Sin\"] = function() {\n return (_Sin = Module[\"_Sin\"] = Module[\"asm\"][\"Sin\"]).apply(null, arguments);\n };\n var _Softmax = Module[\"_Softmax\"] = function() {\n return (_Softmax = Module[\"_Softmax\"] = Module[\"asm\"][\"Softmax\"]).apply(null, arguments);\n };\n var _SparseFillEmptyRows = Module[\"_SparseFillEmptyRows\"] = function() {\n return (_SparseFillEmptyRows = Module[\"_SparseFillEmptyRows\"] = Module[\"asm\"][\"SparseFillEmptyRows\"]).apply(null, arguments);\n };\n var _SparseReshape = Module[\"_SparseReshape\"] = function() {\n return (_SparseReshape = Module[\"_SparseReshape\"] = Module[\"asm\"][\"SparseReshape\"]).apply(null, arguments);\n };\n var _SparseSegmentReduction = Module[\"_SparseSegmentReduction\"] = function() {\n return (_SparseSegmentReduction = Module[\"_SparseSegmentReduction\"] = Module[\"asm\"][\"SparseSegmentReduction\"]).apply(null, arguments);\n };\n var _Sqrt = Module[\"_Sqrt\"] = function() {\n return (_Sqrt = Module[\"_Sqrt\"] = Module[\"asm\"][\"Sqrt\"]).apply(null, arguments);\n };\n var _Square = Module[\"_Square\"] = function() {\n return (_Square = Module[\"_Square\"] = Module[\"asm\"][\"Square\"]).apply(null, arguments);\n };\n var _SquaredDifference = Module[\"_SquaredDifference\"] = function() {\n return (_SquaredDifference = Module[\"_SquaredDifference\"] = Module[\"asm\"][\"SquaredDifference\"]).apply(null, arguments);\n };\n var _Step = Module[\"_Step\"] = function() {\n return (_Step = Module[\"_Step\"] = Module[\"asm\"][\"Step\"]).apply(null, arguments);\n };\n var _StridedSlice = Module[\"_StridedSlice\"] = function() {\n return (_StridedSlice = Module[\"_StridedSlice\"] = Module[\"asm\"][\"StridedSlice\"]).apply(null, arguments);\n };\n var _Sub = Module[\"_Sub\"] = function() {\n return (_Sub = Module[\"_Sub\"] = Module[\"asm\"][\"Sub\"]).apply(null, arguments);\n };\n var _Sum = Module[\"_Sum\"] = function() {\n return (_Sum = Module[\"_Sum\"] = Module[\"asm\"][\"Sum\"]).apply(null, arguments);\n };\n var _Tan = Module[\"_Tan\"] = function() {\n return (_Tan = Module[\"_Tan\"] = Module[\"asm\"][\"Tan\"]).apply(null, arguments);\n };\n var _Tanh = Module[\"_Tanh\"] = function() {\n return (_Tanh = Module[\"_Tanh\"] = Module[\"asm\"][\"Tanh\"]).apply(null, arguments);\n };\n var _Tile = Module[\"_Tile\"] = function() {\n return (_Tile = Module[\"_Tile\"] = Module[\"asm\"][\"Tile\"]).apply(null, arguments);\n };\n var _TopK = Module[\"_TopK\"] = function() {\n return (_TopK = Module[\"_TopK\"] = Module[\"asm\"][\"TopK\"]).apply(null, arguments);\n };\n var _Transform = Module[\"_Transform\"] = function() {\n return (_Transform = Module[\"_Transform\"] = Module[\"asm\"][\"Transform\"]).apply(null, arguments);\n };\n var _Transpose = Module[\"_Transpose\"] = function() {\n return (_Transpose = Module[\"_Transpose\"] = Module[\"asm\"][\"Transpose\"]).apply(null, arguments);\n };\n var __FusedMatMul = Module[\"__FusedMatMul\"] = function() {\n return (__FusedMatMul = Module[\"__FusedMatMul\"] = Module[\"asm\"][\"_FusedMatMul\"]).apply(null, arguments);\n };\n var _malloc = Module[\"_malloc\"] = function() {\n return (_malloc = Module[\"_malloc\"] = Module[\"asm\"][\"malloc\"]).apply(null, arguments);\n };\n var _free = Module[\"_free\"] = function() {\n return (_free = Module[\"_free\"] = Module[\"asm\"][\"free\"]).apply(null, arguments);\n };\n var ___errno_location = Module[\"___errno_location\"] = function() {\n return (___errno_location = Module[\"___errno_location\"] = Module[\"asm\"][\"__errno_location\"]).apply(null, arguments);\n };\n var stackSave = Module[\"stackSave\"] = function() {\n return (stackSave = Module[\"stackSave\"] = Module[\"asm\"][\"stackSave\"]).apply(null, arguments);\n };\n var stackRestore = Module[\"stackRestore\"] = function() {\n return (stackRestore = Module[\"stackRestore\"] = Module[\"asm\"][\"stackRestore\"]).apply(null, arguments);\n };\n var stackAlloc = Module[\"stackAlloc\"] = function() {\n return (stackAlloc = Module[\"stackAlloc\"] = Module[\"asm\"][\"stackAlloc\"]).apply(null, arguments);\n };\n var dynCall_iijjiiii = Module[\"dynCall_iijjiiii\"] = function() {\n return (dynCall_iijjiiii = Module[\"dynCall_iijjiiii\"] = Module[\"asm\"][\"dynCall_iijjiiii\"]).apply(null, arguments);\n };\n var dynCall_jiji = Module[\"dynCall_jiji\"] = function() {\n return (dynCall_jiji = Module[\"dynCall_jiji\"] = Module[\"asm\"][\"dynCall_jiji\"]).apply(null, arguments);\n };\n Module[\"cwrap\"] = cwrap;\n var calledRun;\n dependenciesFulfilled = function runCaller() {\n if (!calledRun)\n run();\n if (!calledRun)\n dependenciesFulfilled = runCaller;\n };\n function run(args) {\n args = args || arguments_;\n if (runDependencies > 0) {\n return;\n }\n preRun();\n if (runDependencies > 0) {\n return;\n }\n function doRun() {\n if (calledRun)\n return;\n calledRun = true;\n Module[\"calledRun\"] = true;\n if (ABORT)\n return;\n initRuntime();\n readyPromiseResolve(Module);\n if (Module[\"onRuntimeInitialized\"])\n Module[\"onRuntimeInitialized\"]();\n postRun();\n }\n if (Module[\"setStatus\"]) {\n Module[\"setStatus\"](\"Running...\");\n setTimeout(function() {\n setTimeout(function() {\n Module[\"setStatus\"](\"\");\n }, 1);\n doRun();\n }, 1);\n } else {\n doRun();\n }\n }\n if (Module[\"preInit\"]) {\n if (typeof Module[\"preInit\"] == \"function\")\n Module[\"preInit\"] = [Module[\"preInit\"]];\n while (Module[\"preInit\"].length > 0) {\n Module[\"preInit\"].pop()();\n }\n }\n run();\n var listenersAdded;\n if (beforeListeners) {\n listenersAdded = { uncaughtException: process.listeners(\"uncaughtException\").filter(function(listener) {\n return !beforeListeners.uncaughtException.indexOf(listener) > -1;\n }), unhandledRejection: process.listeners(\"unhandledRejection\").filter(function(listener) {\n return !beforeListeners.unhandledRejection.indexOf(listener) > -1;\n }) };\n }\n var actualModule;\n if (typeof WasmBackendModule3 !== \"undefined\") {\n actualModule = WasmBackendModule3;\n } else if (typeof WasmBackendModuleThreadedSimd !== \"undefined\") {\n actualModule = WasmBackendModuleThreadedSimd;\n } else {\n throw new Error(\"Could not find wasm module in post.js\");\n }\n if (listenersAdded) {\n var tmpDispose = actualModule[\"_dispose\"];\n actualModule[\"_dispose\"] = function() {\n tmpDispose();\n listenersAdded.uncaughtException.forEach(function(listener) {\n process.removeListener(\"uncaughtException\", listener);\n });\n listenersAdded.unhandledRejection.forEach(function(listener) {\n process.removeListener(\"unhandledRejection\", listener);\n });\n };\n }\n return WasmBackendModule3.ready;\n };\n })();\n if (typeof exports === \"object\" && typeof module === \"object\")\n module.exports = WasmBackendModule2;\n else if (typeof define === \"function\" && define[\"amd\"])\n define([], function() {\n return WasmBackendModule2;\n });\n else if (typeof exports === \"object\")\n exports[\"WasmBackendModule\"] = WasmBackendModule2;\n }\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/backends/backend.js\nvar EPSILON_FLOAT32 = 1e-7;\nvar EPSILON_FLOAT16 = 1e-4;\nvar DataStorage = class {\n constructor(backend2, dataMover) {\n this.backend = backend2;\n this.dataMover = dataMover;\n this.data = /* @__PURE__ */ new WeakMap();\n this.dataIdsCount = 0;\n }\n get(dataId) {\n if (!this.data.has(dataId)) {\n this.dataMover.moveData(this.backend, dataId);\n }\n return this.data.get(dataId);\n }\n set(dataId, value) {\n this.dataIdsCount++;\n this.data.set(dataId, value);\n }\n has(dataId) {\n return this.data.has(dataId);\n }\n delete(dataId) {\n this.dataIdsCount--;\n return this.data.delete(dataId);\n }\n numDataIds() {\n return this.dataIdsCount;\n }\n};\nvar KernelBackend = class {\n refCount(dataId) {\n return notYetImplemented(\"refCount\");\n }\n incRef(dataId) {\n return notYetImplemented(\"incRef\");\n }\n timerAvailable() {\n return true;\n }\n time(f) {\n return notYetImplemented(\"time\");\n }\n read(dataId) {\n return notYetImplemented(\"read\");\n }\n readSync(dataId) {\n return notYetImplemented(\"readSync\");\n }\n readToGPU(dataId, options) {\n return notYetImplemented(\"readToGPU\");\n }\n numDataIds() {\n return notYetImplemented(\"numDataIds\");\n }\n disposeData(dataId, force) {\n return notYetImplemented(\"disposeData\");\n }\n write(values, shape, dtype) {\n return notYetImplemented(\"write\");\n }\n move(dataId, values, shape, dtype, refCount) {\n return notYetImplemented(\"move\");\n }\n memory() {\n return notYetImplemented(\"memory\");\n }\n floatPrecision() {\n return notYetImplemented(\"floatPrecision\");\n }\n epsilon() {\n return this.floatPrecision() === 32 ? EPSILON_FLOAT32 : EPSILON_FLOAT16;\n }\n dispose() {\n return notYetImplemented(\"dispose\");\n }\n};\nfunction notYetImplemented(kernelName) {\n throw new Error(`'${kernelName}' not yet implemented or not found in the registry. This kernel may not be supported by the tfjs backend you have chosen`);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/util_base.js\nfunction shuffle(array2) {\n let counter = array2.length;\n let index = 0;\n while (counter > 0) {\n index = Math.random() * counter | 0;\n counter--;\n swap(array2, counter, index);\n }\n}\nfunction shuffleCombo(array2, array22) {\n if (array2.length !== array22.length) {\n throw new Error(`Array sizes must match to be shuffled together First array length was ${array2.length}Second array length was ${array22.length}`);\n }\n let counter = array2.length;\n let index = 0;\n while (counter > 0) {\n index = Math.random() * counter | 0;\n counter--;\n swap(array2, counter, index);\n swap(array22, counter, index);\n }\n}\nfunction clamp(min7, x, max7) {\n return Math.max(min7, Math.min(x, max7));\n}\nfunction nearestLargerEven(val) {\n return val % 2 === 0 ? val : val + 1;\n}\nfunction swap(object, left, right) {\n const temp = object[left];\n object[left] = object[right];\n object[right] = temp;\n}\nfunction sum(arr) {\n let sum7 = 0;\n for (let i2 = 0; i2 < arr.length; i2++) {\n sum7 += arr[i2];\n }\n return sum7;\n}\nfunction randUniform(a, b) {\n const r2 = Math.random();\n return b * r2 + (1 - r2) * a;\n}\nfunction distSquared(a, b) {\n let result = 0;\n for (let i2 = 0; i2 < a.length; i2++) {\n const diff = Number(a[i2]) - Number(b[i2]);\n result += diff * diff;\n }\n return result;\n}\nfunction assert(expr, msg) {\n if (!expr) {\n throw new Error(typeof msg === \"string\" ? msg : msg());\n }\n}\nfunction assertShapesMatch(shapeA, shapeB, errorMessagePrefix = \"\") {\n assert(arraysEqual(shapeA, shapeB), () => errorMessagePrefix + ` Shapes ${shapeA} and ${shapeB} must match`);\n}\nfunction assertNonNull(a) {\n assert(a != null, () => `The input to the tensor constructor must be a non-null value.`);\n}\nfunction flatten(arr, result = [], skipTypedArray = false) {\n if (result == null) {\n result = [];\n }\n if (Array.isArray(arr) || isTypedArray(arr) && !skipTypedArray) {\n for (let i2 = 0; i2 < arr.length; ++i2) {\n flatten(arr[i2], result, skipTypedArray);\n }\n } else {\n result.push(arr);\n }\n return result;\n}\nfunction sizeFromShape(shape) {\n if (shape.length === 0) {\n return 1;\n }\n let size = shape[0];\n for (let i2 = 1; i2 < shape.length; i2++) {\n size *= shape[i2];\n }\n return size;\n}\nfunction isScalarShape(shape) {\n return shape.length === 0;\n}\nfunction arraysEqual(n1, n2) {\n if (n1 === n2) {\n return true;\n }\n if (n1 == null || n2 == null) {\n return false;\n }\n if (n1.length !== n2.length) {\n return false;\n }\n for (let i2 = 0; i2 < n1.length; i2++) {\n if (n1[i2] !== n2[i2]) {\n return false;\n }\n }\n return true;\n}\nfunction isInt(a) {\n return a % 1 === 0;\n}\nfunction tanh(x) {\n if (Math.tanh != null) {\n return Math.tanh(x);\n }\n if (x === Infinity) {\n return 1;\n } else if (x === -Infinity) {\n return -1;\n } else {\n const e2x = Math.exp(2 * x);\n return (e2x - 1) / (e2x + 1);\n }\n}\nfunction sizeToSquarishShape(size) {\n const width = Math.ceil(Math.sqrt(size));\n return [width, Math.ceil(size / width)];\n}\nfunction createShuffledIndices(n2) {\n const shuffledIndices = new Uint32Array(n2);\n for (let i2 = 0; i2 < n2; ++i2) {\n shuffledIndices[i2] = i2;\n }\n shuffle(shuffledIndices);\n return shuffledIndices;\n}\nfunction rightPad(a, size) {\n if (size <= a.length) {\n return a;\n }\n return a + \" \".repeat(size - a.length);\n}\nfunction repeatedTry(checkFn, delayFn = (counter) => 0, maxCounter, scheduleFn = setTimeout) {\n return new Promise((resolve, reject) => {\n let tryCount = 0;\n const tryFn = () => {\n if (checkFn()) {\n resolve();\n return;\n }\n tryCount++;\n const nextBackoff = delayFn(tryCount);\n if (maxCounter != null && tryCount >= maxCounter) {\n reject();\n return;\n }\n scheduleFn(tryFn, nextBackoff);\n };\n tryFn();\n });\n}\nfunction inferFromImplicitShape(shape, size) {\n let shapeProd = 1;\n let implicitIdx = -1;\n for (let i2 = 0; i2 < shape.length; ++i2) {\n if (shape[i2] >= 0) {\n shapeProd *= shape[i2];\n } else if (shape[i2] === -1) {\n if (implicitIdx !== -1) {\n throw Error(`Shapes can only have 1 implicit size. Found -1 at dim ${implicitIdx} and dim ${i2}`);\n }\n implicitIdx = i2;\n } else if (shape[i2] < 0) {\n throw Error(`Shapes can not be < 0. Found ${shape[i2]} at dim ${i2}`);\n }\n }\n if (implicitIdx === -1) {\n if (size > 0 && size !== shapeProd) {\n throw Error(`Size(${size}) must match the product of shape ${shape}`);\n }\n return shape;\n }\n if (shapeProd === 0) {\n throw Error(`Cannot infer the missing size in [${shape}] when there are 0 elements`);\n }\n if (size % shapeProd !== 0) {\n throw Error(`The implicit shape can't be a fractional number. Got ${size} / ${shapeProd}`);\n }\n const newShape = shape.slice();\n newShape[implicitIdx] = size / shapeProd;\n return newShape;\n}\nfunction parseAxisParam(axis, shape) {\n const rank = shape.length;\n axis = axis == null ? shape.map((s2, i2) => i2) : [].concat(axis);\n assert(axis.every((ax) => ax >= -rank && ax < rank), () => `All values in axis param must be in range [-${rank}, ${rank}) but got axis ${axis}`);\n assert(axis.every((ax) => isInt(ax)), () => `All values in axis param must be integers but got axis ${axis}`);\n return axis.map((a) => a < 0 ? rank + a : a);\n}\nfunction squeezeShape(shape, axis) {\n const newShape = [];\n const keptDims = [];\n const isEmptyArray = axis != null && Array.isArray(axis) && axis.length === 0;\n const axes = axis == null || isEmptyArray ? null : parseAxisParam(axis, shape).sort();\n let j = 0;\n for (let i2 = 0; i2 < shape.length; ++i2) {\n if (axes != null) {\n if (axes[j] === i2 && shape[i2] !== 1) {\n throw new Error(`Can't squeeze axis ${i2} since its dim '${shape[i2]}' is not 1`);\n }\n if ((axes[j] == null || axes[j] > i2) && shape[i2] === 1) {\n newShape.push(shape[i2]);\n keptDims.push(i2);\n }\n if (axes[j] <= i2) {\n j++;\n }\n }\n if (shape[i2] !== 1) {\n newShape.push(shape[i2]);\n keptDims.push(i2);\n }\n }\n return { newShape, keptDims };\n}\nfunction getTypedArrayFromDType(dtype, size) {\n let values = null;\n if (dtype == null || dtype === \"float32\") {\n values = new Float32Array(size);\n } else if (dtype === \"int32\") {\n values = new Int32Array(size);\n } else if (dtype === \"bool\") {\n values = new Uint8Array(size);\n } else {\n throw new Error(`Unknown data type ${dtype}`);\n }\n return values;\n}\nfunction getArrayFromDType(dtype, size) {\n let values = null;\n if (dtype == null || dtype === \"float32\") {\n values = new Float32Array(size);\n } else if (dtype === \"int32\") {\n values = new Int32Array(size);\n } else if (dtype === \"bool\") {\n values = new Uint8Array(size);\n } else if (dtype === \"string\") {\n values = new Array(size);\n } else {\n throw new Error(`Unknown data type ${dtype}`);\n }\n return values;\n}\nfunction checkConversionForErrors(vals, dtype) {\n for (let i2 = 0; i2 < vals.length; i2++) {\n const num = vals[i2];\n if (isNaN(num) || !isFinite(num)) {\n throw Error(`A tensor of type ${dtype} being uploaded contains ${num}.`);\n }\n }\n}\nfunction isValidDtype(dtype) {\n return dtype === \"bool\" || dtype === \"complex64\" || dtype === \"float32\" || dtype === \"int32\" || dtype === \"string\";\n}\nfunction hasEncodingLoss(oldType, newType) {\n if (newType === \"complex64\") {\n return false;\n }\n if (newType === \"float32\" && oldType !== \"complex64\") {\n return false;\n }\n if (newType === \"int32\" && oldType !== \"float32\" && oldType !== \"complex64\") {\n return false;\n }\n if (newType === \"bool\" && oldType === \"bool\") {\n return false;\n }\n return true;\n}\nfunction isTypedArray(a) {\n return a instanceof Float32Array || a instanceof Int32Array || a instanceof Uint8Array || a instanceof Uint8ClampedArray;\n}\nfunction bytesPerElement(dtype) {\n if (dtype === \"float32\" || dtype === \"int32\") {\n return 4;\n } else if (dtype === \"complex64\") {\n return 8;\n } else if (dtype === \"bool\") {\n return 1;\n } else {\n throw new Error(`Unknown dtype ${dtype}`);\n }\n}\nfunction bytesFromStringArray(arr) {\n if (arr == null) {\n return 0;\n }\n let bytes = 0;\n arr.forEach((x) => bytes += x.length);\n return bytes;\n}\nfunction isString(value) {\n return typeof value === \"string\" || value instanceof String;\n}\nfunction isBoolean(value) {\n return typeof value === \"boolean\";\n}\nfunction isNumber(value) {\n return typeof value === \"number\";\n}\nfunction inferDtype(values) {\n if (Array.isArray(values)) {\n return inferDtype(values[0]);\n }\n if (values instanceof Float32Array) {\n return \"float32\";\n } else if (values instanceof Int32Array || values instanceof Uint8Array || values instanceof Uint8ClampedArray) {\n return \"int32\";\n } else if (isNumber(values)) {\n return \"float32\";\n } else if (isString(values)) {\n return \"string\";\n } else if (isBoolean(values)) {\n return \"bool\";\n }\n return \"float32\";\n}\nfunction isFunction(f) {\n return !!(f && f.constructor && f.call && f.apply);\n}\nfunction nearestDivisor(size, start) {\n for (let i2 = start; i2 < size; ++i2) {\n if (size % i2 === 0) {\n return i2;\n }\n }\n return size;\n}\nfunction computeStrides(shape) {\n const rank = shape.length;\n if (rank < 2) {\n return [];\n }\n const strides = new Array(rank - 1);\n strides[rank - 2] = shape[rank - 1];\n for (let i2 = rank - 3; i2 >= 0; --i2) {\n strides[i2] = strides[i2 + 1] * shape[i2 + 1];\n }\n return strides;\n}\nfunction createNestedArray(offset, shape, a, isComplex = false) {\n const ret = new Array();\n if (shape.length === 1) {\n const d = shape[0] * (isComplex ? 2 : 1);\n for (let i2 = 0; i2 < d; i2++) {\n ret[i2] = a[offset + i2];\n }\n } else {\n const d = shape[0];\n const rest = shape.slice(1);\n const len = rest.reduce((acc, c) => acc * c) * (isComplex ? 2 : 1);\n for (let i2 = 0; i2 < d; i2++) {\n ret[i2] = createNestedArray(offset + i2 * len, rest, a, isComplex);\n }\n }\n return ret;\n}\nfunction toNestedArray(shape, a, isComplex = false) {\n if (shape.length === 0) {\n return a[0];\n }\n const size = shape.reduce((acc, c) => acc * c) * (isComplex ? 2 : 1);\n if (size === 0) {\n return [];\n }\n if (size !== a.length) {\n throw new Error(`[${shape}] does not match the input size ${a.length}${isComplex ? \" for a complex tensor\" : \"\"}.`);\n }\n return createNestedArray(0, shape, a, isComplex);\n}\nfunction makeOnesTypedArray(size, dtype) {\n const array2 = makeZerosTypedArray(size, dtype);\n for (let i2 = 0; i2 < array2.length; i2++) {\n array2[i2] = 1;\n }\n return array2;\n}\nfunction makeZerosTypedArray(size, dtype) {\n if (dtype == null || dtype === \"float32\" || dtype === \"complex64\") {\n return new Float32Array(size);\n } else if (dtype === \"int32\") {\n return new Int32Array(size);\n } else if (dtype === \"bool\") {\n return new Uint8Array(size);\n } else {\n throw new Error(`Unknown data type ${dtype}`);\n }\n}\nfunction makeZerosNestedTypedArray(shape, dtype) {\n const size = shape.reduce((prev, curr) => prev * curr, 1);\n if (dtype == null || dtype === \"float32\") {\n return toNestedArray(shape, new Float32Array(size));\n } else if (dtype === \"int32\") {\n return toNestedArray(shape, new Int32Array(size));\n } else if (dtype === \"bool\") {\n return toNestedArray(shape, new Uint8Array(size));\n } else {\n throw new Error(`Unknown data type ${dtype}`);\n }\n}\nfunction assertNonNegativeIntegerDimensions(shape) {\n shape.forEach((dimSize) => {\n assert(Number.isInteger(dimSize) && dimSize >= 0, () => `Tensor must have a shape comprised of positive integers but got shape [${shape}].`);\n });\n}\nfunction locToIndex(locs, rank, strides) {\n if (rank === 0) {\n return 0;\n } else if (rank === 1) {\n return locs[0];\n }\n let index = locs[locs.length - 1];\n for (let i2 = 0; i2 < locs.length - 1; ++i2) {\n index += strides[i2] * locs[i2];\n }\n return index;\n}\nfunction indexToLoc(index, rank, strides) {\n if (rank === 0) {\n return [];\n } else if (rank === 1) {\n return [index];\n }\n const locs = new Array(rank);\n for (let i2 = 0; i2 < locs.length - 1; ++i2) {\n locs[i2] = Math.floor(index / strides[i2]);\n index -= locs[i2] * strides[i2];\n }\n locs[locs.length - 1] = index;\n return locs;\n}\nfunction isPromise(object) {\n return object && object.then && typeof object.then === \"function\";\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/environment.js\nvar TENSORFLOWJS_FLAGS_PREFIX = \"tfjsflags\";\nvar Environment = class {\n constructor(global2) {\n this.global = global2;\n this.flags = {};\n this.flagRegistry = {};\n this.urlFlags = {};\n this.getQueryParams = getQueryParams;\n this.populateURLFlags();\n }\n setPlatform(platformName, platform) {\n if (this.platform != null) {\n if (!(env().getBool(\"IS_TEST\") || env().getBool(\"PROD\"))) {\n console.warn(`Platform ${this.platformName} has already been set. Overwriting the platform with ${platformName}.`);\n }\n }\n this.platformName = platformName;\n this.platform = platform;\n }\n registerFlag(flagName, evaluationFn, setHook) {\n this.flagRegistry[flagName] = { evaluationFn, setHook };\n if (this.urlFlags[flagName] != null) {\n const flagValue = this.urlFlags[flagName];\n if (!(env().getBool(\"IS_TEST\") || env().getBool(\"PROD\"))) {\n console.warn(`Setting feature override from URL ${flagName}: ${flagValue}.`);\n }\n this.set(flagName, flagValue);\n }\n }\n async getAsync(flagName) {\n if (flagName in this.flags) {\n return this.flags[flagName];\n }\n this.flags[flagName] = await this.evaluateFlag(flagName);\n return this.flags[flagName];\n }\n get(flagName) {\n if (flagName in this.flags) {\n return this.flags[flagName];\n }\n const flagValue = this.evaluateFlag(flagName);\n if (isPromise(flagValue)) {\n throw new Error(`Flag ${flagName} cannot be synchronously evaluated. Please use getAsync() instead.`);\n }\n this.flags[flagName] = flagValue;\n return this.flags[flagName];\n }\n getNumber(flagName) {\n return this.get(flagName);\n }\n getBool(flagName) {\n return this.get(flagName);\n }\n getFlags() {\n return this.flags;\n }\n get features() {\n return this.flags;\n }\n set(flagName, value) {\n if (this.flagRegistry[flagName] == null) {\n throw new Error(`Cannot set flag ${flagName} as it has not been registered.`);\n }\n this.flags[flagName] = value;\n if (this.flagRegistry[flagName].setHook != null) {\n this.flagRegistry[flagName].setHook(value);\n }\n }\n evaluateFlag(flagName) {\n if (this.flagRegistry[flagName] == null) {\n throw new Error(`Cannot evaluate flag '${flagName}': no evaluation function found.`);\n }\n return this.flagRegistry[flagName].evaluationFn();\n }\n setFlags(flags) {\n this.flags = Object.assign({}, flags);\n }\n reset() {\n this.flags = {};\n this.urlFlags = {};\n this.populateURLFlags();\n }\n populateURLFlags() {\n if (typeof this.global === \"undefined\" || typeof this.global.location === \"undefined\" || typeof this.global.location.search === \"undefined\") {\n return;\n }\n const urlParams = this.getQueryParams(this.global.location.search);\n if (TENSORFLOWJS_FLAGS_PREFIX in urlParams) {\n const keyValues = urlParams[TENSORFLOWJS_FLAGS_PREFIX].split(\",\");\n keyValues.forEach((keyValue) => {\n const [key, value] = keyValue.split(\":\");\n this.urlFlags[key] = parseValue(key, value);\n });\n }\n }\n};\nfunction getQueryParams(queryString) {\n const params = {};\n queryString.replace(/[?&]([^=?&]+)(?:=([^&]*))?/g, (s2, ...t2) => {\n decodeParam(params, t2[0], t2[1]);\n return t2.join(\"=\");\n });\n return params;\n}\nfunction decodeParam(params, name, value) {\n params[decodeURIComponent(name)] = decodeURIComponent(value || \"\");\n}\nfunction parseValue(flagName, value) {\n value = value.toLowerCase();\n if (value === \"true\" || value === \"false\") {\n return value === \"true\";\n } else if (`${+value}` === value) {\n return +value;\n }\n throw new Error(`Could not parse value flag value ${value} for flag ${flagName}.`);\n}\nfunction env() {\n return ENV;\n}\nvar ENV = null;\nfunction setEnvironmentGlobal(environment) {\n ENV = environment;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/global_util.js\nvar globalNameSpace;\nfunction getGlobalNamespace() {\n if (globalNameSpace == null) {\n let ns;\n if (typeof window !== \"undefined\") {\n ns = window;\n } else if (typeof global !== \"undefined\") {\n ns = global;\n } else if (typeof process !== \"undefined\") {\n ns = process;\n } else if (typeof self !== \"undefined\") {\n ns = self;\n } else {\n throw new Error(\"Could not find a global object\");\n }\n globalNameSpace = ns;\n }\n return globalNameSpace;\n}\nfunction getGlobalMap() {\n const ns = getGlobalNamespace();\n if (ns._tfGlobals == null) {\n ns._tfGlobals = /* @__PURE__ */ new Map();\n }\n return ns._tfGlobals;\n}\nfunction getGlobal(key, init2) {\n const globalMap = getGlobalMap();\n if (globalMap.has(key)) {\n return globalMap.get(key);\n } else {\n const singleton = init2();\n globalMap.set(key, singleton);\n return globalMap.get(key);\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/kernel_names.js\nvar Abs = \"Abs\";\nvar Acos = \"Acos\";\nvar Acosh = \"Acosh\";\nvar Add = \"Add\";\nvar AddN = \"AddN\";\nvar All = \"All\";\nvar Any = \"Any\";\nvar ArgMax = \"ArgMax\";\nvar ArgMin = \"ArgMin\";\nvar Asin = \"Asin\";\nvar Asinh = \"Asinh\";\nvar Atan = \"Atan\";\nvar Atanh = \"Atanh\";\nvar Atan2 = \"Atan2\";\nvar AvgPool = \"AvgPool\";\nvar AvgPoolGrad = \"AvgPoolGrad\";\nvar AvgPool3D = \"AvgPool3D\";\nvar AvgPool3DGrad = \"AvgPool3DGrad\";\nvar BatchMatMul = \"BatchMatMul\";\nvar BatchToSpaceND = \"BatchToSpaceND\";\nvar Bincount = \"Bincount\";\nvar BroadcastTo = \"BroadcastTo\";\nvar BroadcastArgs = \"BroadcastArgs\";\nvar Cast = \"Cast\";\nvar Ceil = \"Ceil\";\nvar ClipByValue = \"ClipByValue\";\nvar Complex = \"Complex\";\nvar ComplexAbs = \"ComplexAbs\";\nvar Concat = \"Concat\";\nvar Conv2D = \"Conv2D\";\nvar Conv2DBackpropFilter = \"Conv2DBackpropFilter\";\nvar Conv2DBackpropInput = \"Conv2DBackpropInput\";\nvar Conv3D = \"Conv3D\";\nvar Conv3DBackpropFilterV2 = \"Conv3DBackpropFilterV2\";\nvar Conv3DBackpropInputV2 = \"Conv3DBackpropInputV2\";\nvar Cos = \"Cos\";\nvar Cosh = \"Cosh\";\nvar Cumprod = \"Cumprod\";\nvar Cumsum = \"Cumsum\";\nvar CropAndResize = \"CropAndResize\";\nvar DenseBincount = \"DenseBincount\";\nvar DepthToSpace = \"DepthToSpace\";\nvar DepthwiseConv2dNative = \"DepthwiseConv2dNative\";\nvar DepthwiseConv2dNativeBackpropFilter = \"DepthwiseConv2dNativeBackpropFilter\";\nvar DepthwiseConv2dNativeBackpropInput = \"DepthwiseConv2dNativeBackpropInput\";\nvar Diag = \"Diag\";\nvar Dilation2D = \"Dilation2D\";\nvar Dilation2DBackpropInput = \"Dilation2DBackpropInput\";\nvar Dilation2DBackpropFilter = \"Dilation2DBackpropFilter\";\nvar RealDiv = \"RealDiv\";\nvar Einsum = \"Einsum\";\nvar Elu = \"Elu\";\nvar EluGrad = \"EluGrad\";\nvar Erf = \"Erf\";\nvar Equal = \"Equal\";\nvar Exp = \"Exp\";\nvar ExpandDims = \"ExpandDims\";\nvar Expm1 = \"Expm1\";\nvar FFT = \"FFT\";\nvar Fill = \"Fill\";\nvar FlipLeftRight = \"FlipLeftRight\";\nvar Floor = \"Floor\";\nvar FloorDiv = \"FloorDiv\";\nvar FusedBatchNorm = \"FusedBatchNorm\";\nvar GatherV2 = \"GatherV2\";\nvar GatherNd = \"GatherNd\";\nvar Greater = \"Greater\";\nvar GreaterEqual = \"GreaterEqual\";\nvar Identity = \"Identity\";\nvar IFFT = \"IFFT\";\nvar Imag = \"Imag\";\nvar IsFinite = \"IsFinite\";\nvar IsInf = \"IsInf\";\nvar IsNan = \"IsNan\";\nvar LeakyRelu = \"LeakyRelu\";\nvar Less = \"Less\";\nvar LessEqual = \"LessEqual\";\nvar LinSpace = \"LinSpace\";\nvar Log = \"Log\";\nvar Log1p = \"Log1p\";\nvar LogicalAnd = \"LogicalAnd\";\nvar LogicalNot = \"LogicalNot\";\nvar LogicalOr = \"LogicalOr\";\nvar LogicalXor = \"LogicalXor\";\nvar LogSoftmax = \"LogSoftmax\";\nvar LowerBound = \"LowerBound\";\nvar LRN = \"LRN\";\nvar LRNGrad = \"LRNGrad\";\nvar Max = \"Max\";\nvar Maximum = \"Maximum\";\nvar MaxPool = \"MaxPool\";\nvar MaxPoolGrad = \"MaxPoolGrad\";\nvar MaxPool3D = \"MaxPool3D\";\nvar MaxPool3DGrad = \"MaxPool3DGrad\";\nvar MaxPoolWithArgmax = \"MaxPoolWithArgmax\";\nvar Mean = \"Mean\";\nvar Min = \"Min\";\nvar Minimum = \"Minimum\";\nvar MirrorPad = \"MirrorPad\";\nvar Mod = \"Mod\";\nvar Multinomial = \"Multinomial\";\nvar Multiply = \"Multiply\";\nvar Neg = \"Neg\";\nvar NotEqual = \"NotEqual\";\nvar NonMaxSuppressionV3 = \"NonMaxSuppressionV3\";\nvar NonMaxSuppressionV4 = \"NonMaxSuppressionV4\";\nvar NonMaxSuppressionV5 = \"NonMaxSuppressionV5\";\nvar OnesLike = \"OnesLike\";\nvar OneHot = \"OneHot\";\nvar Pack = \"Pack\";\nvar PadV2 = \"PadV2\";\nvar Pool = \"Pool\";\nvar Pow = \"Pow\";\nvar Prelu = \"Prelu\";\nvar Prod = \"Prod\";\nvar RaggedGather = \"RaggedGather\";\nvar RaggedTensorToTensor = \"RaggedTensorToTensor\";\nvar Range = \"Range\";\nvar Real = \"Real\";\nvar Reciprocal = \"Reciprocal\";\nvar Relu = \"Relu\";\nvar Reshape = \"Reshape\";\nvar ResizeNearestNeighbor = \"ResizeNearestNeighbor\";\nvar ResizeNearestNeighborGrad = \"ResizeNearestNeighborGrad\";\nvar ResizeBilinear = \"ResizeBilinear\";\nvar ResizeBilinearGrad = \"ResizeBilinearGrad\";\nvar Relu6 = \"Relu6\";\nvar Reverse = \"Reverse\";\nvar Round = \"Round\";\nvar Rsqrt = \"Rsqrt\";\nvar ScatterNd = \"ScatterNd\";\nvar SearchSorted = \"SearchSorted\";\nvar Select = \"Select\";\nvar Selu = \"Selu\";\nvar Slice = \"Slice\";\nvar Sin = \"Sin\";\nvar Sinh = \"Sinh\";\nvar Sign = \"Sign\";\nvar Sigmoid = \"Sigmoid\";\nvar Softplus = \"Softplus\";\nvar Sqrt = \"Sqrt\";\nvar Sum = \"Sum\";\nvar SpaceToBatchND = \"SpaceToBatchND\";\nvar SplitV = \"SplitV\";\nvar Softmax = \"Softmax\";\nvar SparseFillEmptyRows = \"SparseFillEmptyRows\";\nvar SparseReshape = \"SparseReshape\";\nvar SparseSegmentMean = \"SparseSegmentMean\";\nvar SparseSegmentSum = \"SparseSegmentSum\";\nvar SparseToDense = \"SparseToDense\";\nvar SquaredDifference = \"SquaredDifference\";\nvar Square = \"Square\";\nvar StridedSlice = \"StridedSlice\";\nvar StringNGrams = \"StringNGrams\";\nvar StringSplit = \"StringSplit\";\nvar StringToHashBucketFast = \"StringToHashBucketFast\";\nvar Sub = \"Sub\";\nvar Tan = \"Tan\";\nvar Tanh = \"Tanh\";\nvar Tile = \"Tile\";\nvar TopK = \"TopK\";\nvar Transform = \"Transform\";\nvar Transpose = \"Transpose\";\nvar Unique = \"Unique\";\nvar Unpack = \"Unpack\";\nvar UnsortedSegmentSum = \"UnsortedSegmentSum\";\nvar UpperBound = \"UpperBound\";\nvar ZerosLike = \"ZerosLike\";\nvar Step = \"Step\";\nvar FromPixels = \"FromPixels\";\nvar RotateWithOffset = \"RotateWithOffset\";\nvar _FusedMatMul = \"_FusedMatMul\";\nvar FusedConv2D = \"FusedConv2D\";\nvar FusedDepthwiseConv2D = \"FusedDepthwiseConv2D\";\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/log.js\nfunction warn(...msg) {\n if (!(env().getBool(\"IS_TEST\") || env().getBool(\"PROD\"))) {\n console.warn(...msg);\n }\n}\nfunction log(...msg) {\n if (!(env().getBool(\"IS_TEST\") || env().getBool(\"PROD\"))) {\n console.log(...msg);\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/kernel_registry.js\nvar kernelRegistry = getGlobal(\"kernelRegistry\", () => /* @__PURE__ */ new Map());\nvar gradRegistry = getGlobal(\"gradRegistry\", () => /* @__PURE__ */ new Map());\nfunction getKernel(kernelName, backendName) {\n const key = makeKey(kernelName, backendName);\n return kernelRegistry.get(key);\n}\nfunction getGradient(kernelName) {\n return gradRegistry.get(kernelName);\n}\nfunction getKernelsForBackend(backendName) {\n const it = kernelRegistry.entries();\n const result = [];\n while (true) {\n const { done, value } = it.next();\n if (done) {\n break;\n }\n const [key, config] = value;\n const [backend2] = key.split(\"_\");\n if (backend2 === backendName) {\n result.push(config);\n }\n }\n return result;\n}\nfunction registerKernel(config) {\n const { kernelName, backendName } = config;\n const key = makeKey(kernelName, backendName);\n if (kernelRegistry.has(key)) {\n warn(`The kernel '${kernelName}' for backend '${backendName}' is already registered`);\n }\n kernelRegistry.set(key, config);\n}\nfunction registerGradient(config) {\n const { kernelName } = config;\n if (gradRegistry.has(kernelName)) {\n if (env().getBool(\"DEBUG\")) {\n warn(`Overriding the gradient for '${kernelName}'`);\n }\n }\n gradRegistry.set(kernelName, config);\n}\nfunction unregisterKernel(kernelName, backendName) {\n const key = makeKey(kernelName, backendName);\n if (!kernelRegistry.has(key)) {\n throw new Error(`The kernel '${kernelName}' for backend '${backendName}' is not registered`);\n }\n kernelRegistry.delete(key);\n}\nfunction unregisterGradient(kernelName) {\n if (!gradRegistry.has(kernelName)) {\n throw new Error(`The gradient '${kernelName}' for backend is not registered`);\n }\n gradRegistry.delete(kernelName);\n}\nfunction copyRegisteredKernels(registeredBackendName, newBackendName) {\n const kernels = getKernelsForBackend(registeredBackendName);\n kernels.forEach((kernelConfig) => {\n const newKernelConfig = Object.assign({}, kernelConfig, { backendName: newBackendName });\n registerKernel(newKernelConfig);\n });\n}\nfunction makeKey(kernelName, backendName) {\n return `${backendName}_${kernelName}`;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/util.js\nvar util_exports = {};\n__export(util_exports, {\n arraysEqual: () => arraysEqual,\n assert: () => assert,\n assertNonNegativeIntegerDimensions: () => assertNonNegativeIntegerDimensions,\n assertNonNull: () => assertNonNull,\n assertShapesMatch: () => assertShapesMatch,\n bytesFromStringArray: () => bytesFromStringArray,\n bytesPerElement: () => bytesPerElement,\n checkConversionForErrors: () => checkConversionForErrors,\n clamp: () => clamp,\n computeStrides: () => computeStrides,\n createScalarValue: () => createScalarValue,\n createShuffledIndices: () => createShuffledIndices,\n decodeString: () => decodeString,\n distSquared: () => distSquared,\n encodeString: () => encodeString,\n fetch: () => fetch3,\n fingerPrint64: () => fingerPrint64,\n flatten: () => flatten,\n getArrayFromDType: () => getArrayFromDType,\n getTypedArrayFromDType: () => getTypedArrayFromDType,\n hasEncodingLoss: () => hasEncodingLoss,\n hexToLong: () => hexToLong,\n indexToLoc: () => indexToLoc,\n inferDtype: () => inferDtype,\n inferFromImplicitShape: () => inferFromImplicitShape,\n isBoolean: () => isBoolean,\n isFunction: () => isFunction,\n isInt: () => isInt,\n isNumber: () => isNumber,\n isPromise: () => isPromise,\n isScalarShape: () => isScalarShape,\n isString: () => isString,\n isTypedArray: () => isTypedArray,\n isValidDtype: () => isValidDtype,\n locToIndex: () => locToIndex,\n makeOnesTypedArray: () => makeOnesTypedArray,\n makeZerosNestedTypedArray: () => makeZerosNestedTypedArray,\n makeZerosTypedArray: () => makeZerosTypedArray,\n nearestDivisor: () => nearestDivisor,\n nearestLargerEven: () => nearestLargerEven,\n now: () => now,\n parseAxisParam: () => parseAxisParam,\n randUniform: () => randUniform,\n repeatedTry: () => repeatedTry,\n rightPad: () => rightPad,\n shuffle: () => shuffle,\n shuffleCombo: () => shuffleCombo,\n sizeFromShape: () => sizeFromShape,\n sizeToSquarishShape: () => sizeToSquarishShape,\n squeezeShape: () => squeezeShape,\n sum: () => sum,\n swap: () => swap,\n tanh: () => tanh,\n toNestedArray: () => toNestedArray,\n toTypedArray: () => toTypedArray\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/hash_util.js\nvar LongExports = __toESM(require_long());\nvar Long = LongExports.default || LongExports;\nfunction hexToLong(hex) {\n return Long.fromString(hex, true, 16);\n}\nvar k0 = hexToLong(\"c3a5c85c97cb3127\");\nvar k1 = hexToLong(\"b492b66fbe98f273\");\nvar k2 = hexToLong(\"9ae16a3b2f90404f\");\nfunction shiftMix(val) {\n return val.xor(val.shru(47));\n}\nfunction fetch2(s2, offset, numBytes) {\n const bytes = s2.slice(offset, offset + numBytes);\n return Long.fromBytes(Array.from(bytes), true, true);\n}\nfunction fetch64(s2, offset) {\n return fetch2(s2, offset, 8);\n}\nfunction fetch32(s2, offset) {\n return fetch2(s2, offset, 4);\n}\nfunction rotate64(val, shift) {\n return shift === 0 ? val : val.shru(shift).or(val.shl(64 - shift));\n}\nfunction hashLen16(u, v, mul2 = hexToLong(\"9ddfea08eb382d69\")) {\n let a = u.xor(v).mul(mul2);\n a = a.xor(a.shru(47));\n let b = v.xor(a).mul(mul2);\n b = b.xor(b.shru(47));\n b = b.mul(mul2);\n return b;\n}\nfunction weakHashLen32WithSeeds(w, x, y, z, a, b) {\n a = a.add(w);\n b = rotate64(b.add(a).add(z), 21);\n const c = a;\n a = a.add(x);\n a = a.add(y);\n b = b.add(rotate64(a, 44));\n return [a.add(z), b.add(c)];\n}\nfunction weakHashLen32WithSeedsStr(s2, offset, a, b) {\n return weakHashLen32WithSeeds(fetch64(s2, offset), fetch64(s2, offset + 8), fetch64(s2, offset + 16), fetch64(s2, offset + 24), a, b);\n}\nfunction hashLen0to16(s2, len = s2.length) {\n if (len >= 8) {\n const mul2 = k2.add(len * 2);\n const a = fetch64(s2, 0).add(k2);\n const b = fetch64(s2, len - 8);\n const c = rotate64(b, 37).mul(mul2).add(a);\n const d = rotate64(a, 25).add(b).mul(mul2);\n return hashLen16(c, d, mul2);\n }\n if (len >= 4) {\n const mul2 = k2.add(len * 2);\n const a = fetch32(s2, 0);\n return hashLen16(a.shl(3).add(len), fetch32(s2, len - 4), mul2);\n }\n if (len > 0) {\n const a = s2[0];\n const b = s2[len >> 1];\n const c = s2[len - 1];\n const y = a + (b << 8);\n const z = len + (c << 2);\n return shiftMix(k2.mul(y).xor(k0.mul(z))).mul(k2);\n }\n return k2;\n}\nfunction hashLen17to32(s2, len = s2.length) {\n const mul2 = k2.add(len * 2);\n const a = fetch64(s2, 0).mul(k1);\n const b = fetch64(s2, 8);\n const c = fetch64(s2, len - 8).mul(mul2);\n const d = fetch64(s2, len - 16).mul(k2);\n return hashLen16(rotate64(a.add(b), 43).add(rotate64(c, 30)).add(d), a.add(rotate64(b.add(k2), 18)).add(c), mul2);\n}\nfunction hashLen33to64(s2, len = s2.length) {\n const mul2 = k2.add(len * 2);\n const a = fetch64(s2, 0).mul(k2);\n const b = fetch64(s2, 8);\n const c = fetch64(s2, len - 8).mul(mul2);\n const d = fetch64(s2, len - 16).mul(k2);\n const y = rotate64(a.add(b), 43).add(rotate64(c, 30)).add(d);\n const z = hashLen16(y, a.add(rotate64(b.add(k2), 18)).add(c), mul2);\n const e2 = fetch64(s2, 16).mul(mul2);\n const f = fetch64(s2, 24);\n const g = y.add(fetch64(s2, len - 32)).mul(mul2);\n const h = z.add(fetch64(s2, len - 24)).mul(mul2);\n return hashLen16(rotate64(e2.add(f), 43).add(rotate64(g, 30)).add(h), e2.add(rotate64(f.add(a), 18)).add(g), mul2);\n}\nfunction fingerPrint64(s2, len = s2.length) {\n const seed = Long.fromNumber(81, true);\n if (len <= 32) {\n if (len <= 16) {\n return hashLen0to16(s2, len);\n } else {\n return hashLen17to32(s2, len);\n }\n } else if (len <= 64) {\n return hashLen33to64(s2, len);\n }\n let x = seed;\n let y = seed.mul(k1).add(113);\n let z = shiftMix(y.mul(k2).add(113)).mul(k2);\n let v = [Long.UZERO, Long.UZERO];\n let w = [Long.UZERO, Long.UZERO];\n x = x.mul(k2).add(fetch64(s2, 0));\n let offset = 0;\n const end = (len - 1 >> 6) * 64;\n const last64 = end + (len - 1 & 63) - 63;\n do {\n x = rotate64(x.add(y).add(v[0]).add(fetch64(s2, offset + 8)), 37).mul(k1);\n y = rotate64(y.add(v[1]).add(fetch64(s2, offset + 48)), 42).mul(k1);\n x = x.xor(w[1]);\n y = y.add(v[0]).add(fetch64(s2, offset + 40));\n z = rotate64(z.add(w[0]), 33).mul(k1);\n v = weakHashLen32WithSeedsStr(s2, offset, v[1].mul(k1), x.add(w[0]));\n w = weakHashLen32WithSeedsStr(s2, offset + 32, z.add(w[1]), y.add(fetch64(s2, offset + 16)));\n [z, x] = [x, z];\n offset += 64;\n } while (offset !== end);\n const mul2 = k1.add(z.and(255).shl(1));\n offset = last64;\n w[0] = w[0].add(len - 1 & 63);\n v[0] = v[0].add(w[0]);\n w[0] = w[0].add(v[0]);\n x = rotate64(x.add(y).add(v[0]).add(fetch64(s2, offset + 8)), 37).mul(mul2);\n y = rotate64(y.add(v[1]).add(fetch64(s2, offset + 48)), 42).mul(mul2);\n x = x.xor(w[1].mul(9));\n y = y.add(v[0].mul(9).add(fetch64(s2, offset + 40)));\n z = rotate64(z.add(w[0]), 33).mul(mul2);\n v = weakHashLen32WithSeedsStr(s2, offset, v[1].mul(mul2), x.add(w[0]));\n w = weakHashLen32WithSeedsStr(s2, offset + 32, z.add(w[1]), y.add(fetch64(s2, offset + 16)));\n [z, x] = [x, z];\n return hashLen16(hashLen16(v[0], w[0], mul2).add(shiftMix(y).mul(k0)).add(z), hashLen16(v[1], w[1], mul2).add(x), mul2);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/util.js\nfunction createScalarValue(value, dtype) {\n if (dtype === \"string\") {\n return encodeString(value);\n }\n return toTypedArray([value], dtype);\n}\nfunction noConversionNeeded(a, dtype) {\n return a instanceof Float32Array && dtype === \"float32\" || a instanceof Int32Array && dtype === \"int32\" || a instanceof Uint8Array && dtype === \"bool\";\n}\nfunction toTypedArray(a, dtype) {\n if (dtype === \"string\") {\n throw new Error(\"Cannot convert a string[] to a TypedArray\");\n }\n if (Array.isArray(a)) {\n a = flatten(a);\n }\n if (env().getBool(\"DEBUG\")) {\n checkConversionForErrors(a, dtype);\n }\n if (noConversionNeeded(a, dtype)) {\n return a;\n }\n if (dtype == null || dtype === \"float32\" || dtype === \"complex64\") {\n return new Float32Array(a);\n } else if (dtype === \"int32\") {\n return new Int32Array(a);\n } else if (dtype === \"bool\") {\n const bool = new Uint8Array(a.length);\n for (let i2 = 0; i2 < bool.length; ++i2) {\n if (Math.round(a[i2]) !== 0) {\n bool[i2] = 1;\n }\n }\n return bool;\n } else {\n throw new Error(`Unknown data type ${dtype}`);\n }\n}\nfunction now() {\n return env().platform.now();\n}\nfunction fetch3(path, requestInits) {\n return env().platform.fetch(path, requestInits);\n}\nfunction encodeString(s2, encoding = \"utf-8\") {\n encoding = encoding || \"utf-8\";\n return env().platform.encode(s2, encoding);\n}\nfunction decodeString(bytes, encoding = \"utf-8\") {\n encoding = encoding || \"utf-8\";\n return env().platform.decode(bytes, encoding);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/profiler.js\nvar Profiler = class {\n constructor(backendTimer, logger) {\n this.backendTimer = backendTimer;\n this.logger = logger;\n if (logger == null) {\n this.logger = new Logger();\n }\n }\n profileKernel(kernelName, inputs, f) {\n let outputs;\n const holdResultWrapperFn = () => {\n outputs = f();\n };\n let timer;\n const start = now();\n if (this.backendTimer.timerAvailable()) {\n timer = this.backendTimer.time(holdResultWrapperFn);\n } else {\n holdResultWrapperFn();\n for (const output of outputs) {\n output.dataSync();\n }\n timer = Promise.resolve({ kernelMs: now() - start });\n }\n if (env().getBool(\"CHECK_COMPUTATION_FOR_ERRORS\")) {\n for (let i2 = 0; i2 < outputs.length; i2++) {\n const output = outputs[i2];\n output.data().then((tensorVals) => {\n checkComputationForErrors(tensorVals, output.dtype, kernelName);\n });\n }\n }\n const kernelProfile = {\n kernelName,\n outputs,\n inputs,\n timeMs: timer.then((timing) => timing.kernelMs),\n extraInfo: timer.then((timing) => timing.getExtraProfileInfo != null ? timing.getExtraProfileInfo() : \"\")\n };\n return kernelProfile;\n }\n logKernelProfile(kernelProfile) {\n const { kernelName, outputs, timeMs, inputs, extraInfo } = kernelProfile;\n outputs.forEach((result) => {\n Promise.all([result.data(), timeMs, extraInfo]).then((valueContainer) => {\n this.logger.logKernelProfile(kernelName, result, valueContainer[0], valueContainer[1], inputs, valueContainer[2]);\n });\n });\n }\n};\nfunction checkComputationForErrors(vals, dtype, kernelName) {\n if (dtype !== \"float32\") {\n return false;\n }\n for (let i2 = 0; i2 < vals.length; i2++) {\n const num = vals[i2];\n if (isNaN(num) || !isFinite(num)) {\n console.warn(`Found ${num} in the result of '${kernelName}'`);\n return true;\n }\n }\n return false;\n}\nvar Logger = class {\n logKernelProfile(name, result, vals, timeMs, inputs, extraInfo) {\n const time2 = typeof timeMs === \"number\" ? rightPad(`${timeMs}ms`, 9) : timeMs[\"error\"];\n const paddedName = rightPad(name, 25);\n const rank = result.rank;\n const size = result.size;\n const shape = rightPad(result.shape.toString(), 14);\n let inputShapesDescription = \"\";\n for (const name2 in inputs) {\n const input2 = inputs[name2];\n if (input2 != null) {\n const inputShape = input2.shape || result.shape;\n const inputRank = inputShape.length;\n inputShapesDescription += `${name2}: ${inputRank}D ${inputRank > 0 ? inputShape : \"\"} `;\n }\n }\n console.log(`%c${paddedName}\t%c${time2}\t%c${rank}D ${shape}\t%c${size}\t%c${inputShapesDescription}\t%c${extraInfo}`, \"font-weight:bold\", \"color:red\", \"color:blue\", \"color: orange\", \"color: green\", \"color: steelblue\");\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/tape.js\nfunction getFilteredNodesXToY(tape, xs, y) {\n const tensorsFromX = {};\n const nodesFromX = {};\n for (let i2 = 0; i2 < xs.length; i2++) {\n tensorsFromX[xs[i2].id] = true;\n }\n for (let i2 = 0; i2 < tape.length; i2++) {\n const node = tape[i2];\n const nodeInputs = node.inputs;\n for (const inputName in nodeInputs) {\n const input2 = nodeInputs[inputName];\n let anyInputFromX = false;\n for (let j = 0; j < xs.length; j++) {\n if (tensorsFromX[input2.id]) {\n node.outputs.forEach((output) => tensorsFromX[output.id] = true);\n anyInputFromX = true;\n nodesFromX[node.id] = true;\n break;\n }\n }\n if (anyInputFromX) {\n break;\n }\n }\n }\n const tensorsLeadToY = {};\n tensorsLeadToY[y.id] = true;\n const nodesToY = {};\n for (let i2 = tape.length - 1; i2 >= 0; i2--) {\n const node = tape[i2];\n const nodeInputs = node.inputs;\n for (let j = 0; j < node.outputs.length; j++) {\n if (tensorsLeadToY[node.outputs[j].id]) {\n for (const inputName in nodeInputs) {\n tensorsLeadToY[nodeInputs[inputName].id] = true;\n nodesToY[node.id] = true;\n }\n break;\n }\n }\n }\n const filteredTape = [];\n for (let i2 = 0; i2 < tape.length; i2++) {\n const node = tape[i2];\n if (nodesFromX[node.id] && nodesToY[node.id]) {\n const prunedInputs = {};\n for (const inputName in node.inputs) {\n const nodeInput = node.inputs[inputName];\n if (tensorsFromX[nodeInput.id]) {\n prunedInputs[inputName] = nodeInput;\n }\n }\n const prunedNode = Object.assign({}, node);\n prunedNode.inputs = prunedInputs;\n prunedNode.outputs = node.outputs;\n filteredTape.push(prunedNode);\n }\n }\n return filteredTape;\n}\nfunction backpropagateGradients(tensorAccumulatedGradientMap, filteredTape, tidy2, add5) {\n for (let i2 = filteredTape.length - 1; i2 >= 0; i2--) {\n const node = filteredTape[i2];\n const dys = [];\n node.outputs.forEach((o) => {\n const gradTensor = tensorAccumulatedGradientMap[o.id];\n if (gradTensor != null) {\n dys.push(gradTensor);\n } else {\n dys.push(null);\n }\n });\n if (node.gradient == null) {\n throw new Error(`Cannot compute gradient: gradient function not found for ${node.kernelName}.`);\n }\n const inputGradients = node.gradient(dys);\n for (const inputName in node.inputs) {\n if (!(inputName in inputGradients)) {\n throw new Error(`Cannot backprop through input ${inputName}. Available gradients found: ${Object.keys(inputGradients)}.`);\n }\n const dx = tidy2(() => inputGradients[inputName]());\n if (dx.dtype !== \"float32\") {\n throw new Error(`Error in gradient for op ${node.kernelName}. The gradient of input ${inputName} must have 'float32' dtype, but has '${dx.dtype}'`);\n }\n const x = node.inputs[inputName];\n if (!arraysEqual(dx.shape, x.shape)) {\n throw new Error(`Error in gradient for op ${node.kernelName}. The gradient of input '${inputName}' has shape '${dx.shape}', which does not match the shape of the input '${x.shape}'`);\n }\n if (tensorAccumulatedGradientMap[x.id] == null) {\n tensorAccumulatedGradientMap[x.id] = dx;\n } else {\n const curGradient = tensorAccumulatedGradientMap[x.id];\n tensorAccumulatedGradientMap[x.id] = add5(curGradient, dx);\n curGradient.dispose();\n }\n }\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/tensor_format.js\nvar FORMAT_LIMIT_NUM_VALS = 20;\nvar FORMAT_NUM_FIRST_LAST_VALS = 3;\nvar FORMAT_NUM_SIG_DIGITS = 7;\nfunction tensorToString(vals, shape, dtype, verbose) {\n const strides = computeStrides(shape);\n const padPerCol = computeMaxSizePerColumn(vals, shape, dtype, strides);\n const rank = shape.length;\n const valsLines = subTensorToString(vals, shape, dtype, strides, padPerCol);\n const lines = [\"Tensor\"];\n if (verbose) {\n lines.push(` dtype: ${dtype}`);\n lines.push(` rank: ${rank}`);\n lines.push(` shape: [${shape}]`);\n lines.push(` values:`);\n }\n lines.push(valsLines.map((l3) => \" \" + l3).join(\"\\n\"));\n return lines.join(\"\\n\");\n}\nfunction computeMaxSizePerColumn(vals, shape, dtype, strides) {\n const n2 = sizeFromShape(shape);\n const numCols = strides[strides.length - 1];\n const padPerCol = new Array(numCols).fill(0);\n const rank = shape.length;\n const valuesOrTuples = dtype === \"complex64\" ? createComplexTuples(vals) : vals;\n if (rank > 1) {\n for (let row = 0; row < n2 / numCols; row++) {\n const offset = row * numCols;\n for (let j = 0; j < numCols; j++) {\n padPerCol[j] = Math.max(padPerCol[j], valToString(valuesOrTuples[offset + j], 0, dtype).length);\n }\n }\n }\n return padPerCol;\n}\nfunction valToString(val, pad3, dtype) {\n let valStr;\n if (Array.isArray(val)) {\n valStr = `${parseFloat(val[0].toFixed(FORMAT_NUM_SIG_DIGITS))} + ${parseFloat(val[1].toFixed(FORMAT_NUM_SIG_DIGITS))}j`;\n } else if (isString(val)) {\n valStr = `'${val}'`;\n } else if (dtype === \"bool\") {\n valStr = boolNumToString(val);\n } else {\n valStr = parseFloat(val.toFixed(FORMAT_NUM_SIG_DIGITS)).toString();\n }\n return rightPad(valStr, pad3);\n}\nfunction boolNumToString(v) {\n return v === 0 ? \"false\" : \"true\";\n}\nfunction subTensorToString(vals, shape, dtype, strides, padPerCol, isLast = true) {\n const storagePerElement = dtype === \"complex64\" ? 2 : 1;\n const size = shape[0];\n const rank = shape.length;\n if (rank === 0) {\n if (dtype === \"complex64\") {\n const complexTuple = createComplexTuples(vals);\n return [valToString(complexTuple[0], 0, dtype)];\n }\n if (dtype === \"bool\") {\n return [boolNumToString(vals[0])];\n }\n return [vals[0].toString()];\n }\n if (rank === 1) {\n if (size > FORMAT_LIMIT_NUM_VALS) {\n const firstValsSize = FORMAT_NUM_FIRST_LAST_VALS * storagePerElement;\n let firstVals = Array.from(vals.slice(0, firstValsSize));\n let lastVals = Array.from(vals.slice((size - FORMAT_NUM_FIRST_LAST_VALS) * storagePerElement, size * storagePerElement));\n if (dtype === \"complex64\") {\n firstVals = createComplexTuples(firstVals);\n lastVals = createComplexTuples(lastVals);\n }\n return [\n \"[\" + firstVals.map((x, i2) => valToString(x, padPerCol[i2], dtype)).join(\", \") + \", ..., \" + lastVals.map((x, i2) => valToString(x, padPerCol[size - FORMAT_NUM_FIRST_LAST_VALS + i2], dtype)).join(\", \") + \"]\"\n ];\n }\n const displayVals = dtype === \"complex64\" ? createComplexTuples(vals) : Array.from(vals);\n return [\n \"[\" + displayVals.map((x, i2) => valToString(x, padPerCol[i2], dtype)).join(\", \") + \"]\"\n ];\n }\n const subshape = shape.slice(1);\n const substrides = strides.slice(1);\n const stride = strides[0] * storagePerElement;\n const lines = [];\n if (size > FORMAT_LIMIT_NUM_VALS) {\n for (let i2 = 0; i2 < FORMAT_NUM_FIRST_LAST_VALS; i2++) {\n const start = i2 * stride;\n const end = start + stride;\n lines.push(...subTensorToString(vals.slice(start, end), subshape, dtype, substrides, padPerCol, false));\n }\n lines.push(\"...\");\n for (let i2 = size - FORMAT_NUM_FIRST_LAST_VALS; i2 < size; i2++) {\n const start = i2 * stride;\n const end = start + stride;\n lines.push(...subTensorToString(vals.slice(start, end), subshape, dtype, substrides, padPerCol, i2 === size - 1));\n }\n } else {\n for (let i2 = 0; i2 < size; i2++) {\n const start = i2 * stride;\n const end = start + stride;\n lines.push(...subTensorToString(vals.slice(start, end), subshape, dtype, substrides, padPerCol, i2 === size - 1));\n }\n }\n const sep = rank === 2 ? \",\" : \"\";\n lines[0] = \"[\" + lines[0] + sep;\n for (let i2 = 1; i2 < lines.length - 1; i2++) {\n lines[i2] = \" \" + lines[i2] + sep;\n }\n let newLineSep = \",\\n\";\n for (let i2 = 2; i2 < rank; i2++) {\n newLineSep += \"\\n\";\n }\n lines[lines.length - 1] = \" \" + lines[lines.length - 1] + \"]\" + (isLast ? \"\" : newLineSep);\n return lines;\n}\nfunction createComplexTuples(vals) {\n const complexTuples = [];\n for (let i2 = 0; i2 < vals.length; i2 += 2) {\n complexTuples.push([vals[i2], vals[i2 + 1]]);\n }\n return complexTuples;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/tensor.js\nvar TensorBuffer = class {\n constructor(shape, dtype, values) {\n this.dtype = dtype;\n this.shape = shape.slice();\n this.size = sizeFromShape(shape);\n if (values != null) {\n const n2 = values.length;\n assert(n2 === this.size, () => `Length of values '${n2}' does not match the size inferred by the shape '${this.size}'.`);\n }\n if (dtype === \"complex64\") {\n throw new Error(`complex64 dtype TensorBuffers are not supported. Please create a TensorBuffer for the real and imaginary parts separately and call tf.complex(real, imag).`);\n }\n this.values = values || getArrayFromDType(dtype, this.size);\n this.strides = computeStrides(shape);\n }\n set(value, ...locs) {\n if (locs.length === 0) {\n locs = [0];\n }\n assert(locs.length === this.rank, () => `The number of provided coordinates (${locs.length}) must match the rank (${this.rank})`);\n const index = this.locToIndex(locs);\n this.values[index] = value;\n }\n get(...locs) {\n if (locs.length === 0) {\n locs = [0];\n }\n let i2 = 0;\n for (const loc of locs) {\n if (loc < 0 || loc >= this.shape[i2]) {\n const msg = `Requested out of range element at ${locs}. Buffer shape=${this.shape}`;\n throw new Error(msg);\n }\n i2++;\n }\n let index = locs[locs.length - 1];\n for (let i3 = 0; i3 < locs.length - 1; ++i3) {\n index += this.strides[i3] * locs[i3];\n }\n return this.values[index];\n }\n locToIndex(locs) {\n if (this.rank === 0) {\n return 0;\n } else if (this.rank === 1) {\n return locs[0];\n }\n let index = locs[locs.length - 1];\n for (let i2 = 0; i2 < locs.length - 1; ++i2) {\n index += this.strides[i2] * locs[i2];\n }\n return index;\n }\n indexToLoc(index) {\n if (this.rank === 0) {\n return [];\n } else if (this.rank === 1) {\n return [index];\n }\n const locs = new Array(this.shape.length);\n for (let i2 = 0; i2 < locs.length - 1; ++i2) {\n locs[i2] = Math.floor(index / this.strides[i2]);\n index -= locs[i2] * this.strides[i2];\n }\n locs[locs.length - 1] = index;\n return locs;\n }\n get rank() {\n return this.shape.length;\n }\n toTensor() {\n return trackerFn().makeTensor(this.values, this.shape, this.dtype);\n }\n};\nvar trackerFn = null;\nvar opHandler = null;\nvar deprecationWarningFn = null;\nfunction setTensorTracker(fn) {\n trackerFn = fn;\n}\nfunction setOpHandler(handler) {\n opHandler = handler;\n}\nfunction setDeprecationWarningFn(fn) {\n deprecationWarningFn = fn;\n}\nvar Tensor = class {\n constructor(shape, dtype, dataId, id) {\n this.kept = false;\n this.isDisposedInternal = false;\n this.shape = shape.slice();\n this.dtype = dtype || \"float32\";\n this.size = sizeFromShape(shape);\n this.strides = computeStrides(shape);\n this.dataId = dataId;\n this.id = id;\n this.rankType = this.rank < 5 ? this.rank.toString() : \"higher\";\n }\n get rank() {\n return this.shape.length;\n }\n async buffer() {\n const vals = await this.data();\n return opHandler.buffer(this.shape, this.dtype, vals);\n }\n bufferSync() {\n return opHandler.buffer(this.shape, this.dtype, this.dataSync());\n }\n async array() {\n const vals = await this.data();\n return toNestedArray(this.shape, vals, this.dtype === \"complex64\");\n }\n arraySync() {\n return toNestedArray(this.shape, this.dataSync(), this.dtype === \"complex64\");\n }\n async data() {\n this.throwIfDisposed();\n const data = trackerFn().read(this.dataId);\n if (this.dtype === \"string\") {\n const bytes = await data;\n try {\n return bytes.map((b) => decodeString(b));\n } catch (_a) {\n throw new Error(\"Failed to decode the string bytes into utf-8. To get the original bytes, call tensor.bytes().\");\n }\n }\n return data;\n }\n dataToGPU(options) {\n this.throwIfDisposed();\n return trackerFn().readToGPU(this.dataId, options);\n }\n dataSync() {\n this.throwIfDisposed();\n const data = trackerFn().readSync(this.dataId);\n if (this.dtype === \"string\") {\n try {\n return data.map((b) => decodeString(b));\n } catch (_a) {\n throw new Error(\"Failed to decode the string bytes into utf-8. To get the original bytes, call tensor.bytes().\");\n }\n }\n return data;\n }\n async bytes() {\n this.throwIfDisposed();\n const data = await trackerFn().read(this.dataId);\n if (this.dtype === \"string\") {\n return data;\n } else {\n return new Uint8Array(data.buffer);\n }\n }\n dispose() {\n if (this.isDisposed) {\n return;\n }\n trackerFn().disposeTensor(this);\n this.isDisposedInternal = true;\n }\n get isDisposed() {\n return this.isDisposedInternal;\n }\n throwIfDisposed() {\n if (this.isDisposed) {\n throw new Error(`Tensor is disposed.`);\n }\n }\n print(verbose = false) {\n return opHandler.print(this, verbose);\n }\n clone() {\n this.throwIfDisposed();\n return opHandler.clone(this);\n }\n toString(verbose = false) {\n const vals = this.dataSync();\n return tensorToString(vals, this.shape, this.dtype, verbose);\n }\n cast(dtype) {\n this.throwIfDisposed();\n return opHandler.cast(this, dtype);\n }\n variable(trainable = true, name, dtype) {\n this.throwIfDisposed();\n return trackerFn().makeVariable(this, trainable, name, dtype);\n }\n};\nObject.defineProperty(Tensor, Symbol.hasInstance, {\n value: (instance) => {\n return !!instance && instance.data != null && instance.dataSync != null && instance.throwIfDisposed != null;\n }\n});\nfunction getGlobalTensorClass() {\n return getGlobal(\"Tensor\", () => {\n return Tensor;\n });\n}\ngetGlobalTensorClass();\nvar Variable = class extends Tensor {\n constructor(initialValue, trainable, name, tensorId) {\n super(initialValue.shape, initialValue.dtype, initialValue.dataId, tensorId);\n this.trainable = trainable;\n this.name = name;\n }\n assign(newValue) {\n if (newValue.dtype !== this.dtype) {\n throw new Error(`dtype of the new value (${newValue.dtype}) and previous value (${this.dtype}) must match`);\n }\n if (!arraysEqual(newValue.shape, this.shape)) {\n throw new Error(`shape of the new value (${newValue.shape}) and previous value (${this.shape}) must match`);\n }\n trackerFn().disposeTensor(this);\n this.dataId = newValue.dataId;\n trackerFn().incRef(this, null);\n }\n dispose() {\n trackerFn().disposeVariable(this);\n this.isDisposedInternal = true;\n }\n};\nObject.defineProperty(Variable, Symbol.hasInstance, {\n value: (instance) => {\n return instance instanceof Tensor && instance.assign != null && instance.assign instanceof Function;\n }\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/tensor_util.js\nvar tensor_util_exports = {};\n__export(tensor_util_exports, {\n assertTypesMatch: () => assertTypesMatch,\n getTensorsInContainer: () => getTensorsInContainer,\n isTensorInList: () => isTensorInList,\n makeTypesMatch: () => makeTypesMatch\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/types.js\nvar Rank;\n(function(Rank2) {\n Rank2[\"R0\"] = \"R0\";\n Rank2[\"R1\"] = \"R1\";\n Rank2[\"R2\"] = \"R2\";\n Rank2[\"R3\"] = \"R3\";\n Rank2[\"R4\"] = \"R4\";\n Rank2[\"R5\"] = \"R5\";\n Rank2[\"R6\"] = \"R6\";\n})(Rank || (Rank = {}));\nvar UpcastInt32AndMap;\n(function(UpcastInt32AndMap2) {\n UpcastInt32AndMap2[\"float32\"] = \"float32\";\n UpcastInt32AndMap2[\"int32\"] = \"int32\";\n UpcastInt32AndMap2[\"bool\"] = \"int32\";\n UpcastInt32AndMap2[\"complex64\"] = \"complex64\";\n})(UpcastInt32AndMap || (UpcastInt32AndMap = {}));\nvar UpcastBoolAndMap;\n(function(UpcastBoolAndMap2) {\n UpcastBoolAndMap2[\"float32\"] = \"float32\";\n UpcastBoolAndMap2[\"int32\"] = \"int32\";\n UpcastBoolAndMap2[\"bool\"] = \"bool\";\n UpcastBoolAndMap2[\"complex64\"] = \"complex64\";\n})(UpcastBoolAndMap || (UpcastBoolAndMap = {}));\nvar UpcastFloat32AndMap;\n(function(UpcastFloat32AndMap2) {\n UpcastFloat32AndMap2[\"float32\"] = \"float32\";\n UpcastFloat32AndMap2[\"int32\"] = \"float32\";\n UpcastFloat32AndMap2[\"bool\"] = \"float32\";\n UpcastFloat32AndMap2[\"complex64\"] = \"complex64\";\n})(UpcastFloat32AndMap || (UpcastFloat32AndMap = {}));\nvar UpcastComplex64AndMap;\n(function(UpcastComplex64AndMap2) {\n UpcastComplex64AndMap2[\"float32\"] = \"complex64\";\n UpcastComplex64AndMap2[\"int32\"] = \"complex64\";\n UpcastComplex64AndMap2[\"bool\"] = \"complex64\";\n UpcastComplex64AndMap2[\"complex64\"] = \"complex64\";\n})(UpcastComplex64AndMap || (UpcastComplex64AndMap = {}));\nvar upcastTypeMap = {\n \"float32\": UpcastFloat32AndMap,\n \"int32\": UpcastInt32AndMap,\n \"bool\": UpcastBoolAndMap,\n \"complex64\": UpcastComplex64AndMap\n};\nfunction upcastType(typeA, typeB) {\n if (typeA === \"string\" || typeB === \"string\") {\n if (typeA === \"string\" && typeB === \"string\") {\n return \"string\";\n }\n throw new Error(`Can not upcast ${typeA} with ${typeB}`);\n }\n return upcastTypeMap[typeA][typeB];\n}\nfunction sumOutType(type) {\n return upcastType(type, \"int32\");\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/tensor_util.js\nfunction makeTypesMatch(a, b) {\n if (a.dtype === b.dtype) {\n return [a, b];\n }\n const dtype = upcastType(a.dtype, b.dtype);\n return [a.cast(dtype), b.cast(dtype)];\n}\nfunction assertTypesMatch(a, b) {\n assert(a.dtype === b.dtype, () => `The dtypes of the first(${a.dtype}) and second(${b.dtype}) input must match`);\n}\nfunction isTensorInList(tensor2, tensorList) {\n return tensorList.some((x) => x.id === tensor2.id);\n}\nfunction getTensorsInContainer(result) {\n const list = [];\n const seen = /* @__PURE__ */ new Set();\n walkTensorContainer(result, list, seen);\n return list;\n}\nfunction walkTensorContainer(container, list, seen) {\n if (container == null) {\n return;\n }\n if (container instanceof Tensor) {\n list.push(container);\n return;\n }\n if (!isIterable(container)) {\n return;\n }\n const iterable = container;\n for (const k in iterable) {\n const val = iterable[k];\n if (!seen.has(val)) {\n seen.add(val);\n walkTensorContainer(val, list, seen);\n }\n }\n}\nfunction isIterable(obj) {\n return Array.isArray(obj) || typeof obj === \"object\";\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/engine.js\nfunction isRegisteredKernelInvocation(kernelInvocation) {\n return kernelInvocation.kernelName != null;\n}\nvar EngineState = class {\n constructor() {\n this.registeredVariables = {};\n this.nextTapeNodeId = 0;\n this.numBytes = 0;\n this.numTensors = 0;\n this.numStringTensors = 0;\n this.numDataBuffers = 0;\n this.gradientDepth = 0;\n this.kernelDepth = 0;\n this.scopeStack = [];\n this.numDataMovesStack = [];\n this.nextScopeId = 0;\n this.tensorInfo = /* @__PURE__ */ new WeakMap();\n this.profiling = false;\n this.activeProfile = {\n newBytes: 0,\n newTensors: 0,\n peakBytes: 0,\n kernels: [],\n result: null,\n get kernelNames() {\n return Array.from(new Set(this.kernels.map((k) => k.name)));\n }\n };\n }\n dispose() {\n for (const variableName in this.registeredVariables) {\n this.registeredVariables[variableName].dispose();\n }\n }\n};\nvar Engine = class {\n constructor(ENV8) {\n this.ENV = ENV8;\n this.registry = {};\n this.registryFactory = {};\n this.pendingBackendInitId = 0;\n this.state = new EngineState();\n }\n async ready() {\n if (this.pendingBackendInit != null) {\n return this.pendingBackendInit.then(() => {\n });\n }\n if (this.backendInstance != null) {\n return;\n }\n const sortedBackends = this.getSortedBackends();\n for (let i2 = 0; i2 < sortedBackends.length; i2++) {\n const backendName = sortedBackends[i2];\n const success = await this.initializeBackend(backendName).success;\n if (success) {\n await this.setBackend(backendName);\n return;\n }\n }\n throw new Error(`Could not initialize any backends, all backend initializations failed.`);\n }\n get backend() {\n if (this.pendingBackendInit != null) {\n throw new Error(`Backend '${this.backendName}' has not yet been initialized. Make sure to await tf.ready() or await tf.setBackend() before calling other methods`);\n }\n if (this.backendInstance == null) {\n const { name, asyncInit } = this.initializeBackendsAndReturnBest();\n if (asyncInit) {\n throw new Error(`The highest priority backend '${name}' has not yet been initialized. Make sure to await tf.ready() or await tf.setBackend() before calling other methods`);\n }\n this.setBackend(name);\n }\n return this.backendInstance;\n }\n backendNames() {\n return Object.keys(this.registryFactory);\n }\n findBackend(backendName) {\n if (!(backendName in this.registry)) {\n if (backendName in this.registryFactory) {\n const { asyncInit } = this.initializeBackend(backendName);\n if (asyncInit) {\n return null;\n }\n } else {\n return null;\n }\n }\n return this.registry[backendName];\n }\n findBackendFactory(backendName) {\n if (!(backendName in this.registryFactory)) {\n return null;\n }\n return this.registryFactory[backendName].factory;\n }\n registerBackend(backendName, factory, priority = 1) {\n if (backendName in this.registryFactory) {\n warn(`${backendName} backend was already registered. Reusing existing backend factory.`);\n return false;\n }\n this.registryFactory[backendName] = { factory, priority };\n return true;\n }\n async setBackend(backendName) {\n if (this.registryFactory[backendName] == null) {\n throw new Error(`Backend name '${backendName}' not found in registry`);\n }\n this.backendName = backendName;\n if (this.registry[backendName] == null) {\n this.backendInstance = null;\n const { success, asyncInit } = this.initializeBackend(backendName);\n const result = asyncInit ? await success : success;\n if (!result) {\n return false;\n }\n }\n this.backendInstance = this.registry[backendName];\n this.setupRegisteredKernels();\n this.profiler = new Profiler(this.backendInstance);\n return true;\n }\n setupRegisteredKernels() {\n const kernels = getKernelsForBackend(this.backendName);\n kernels.forEach((kernel) => {\n if (kernel.setupFunc != null) {\n kernel.setupFunc(this.backendInstance);\n }\n });\n }\n disposeRegisteredKernels(backendName) {\n const kernels = getKernelsForBackend(backendName);\n kernels.forEach((kernel) => {\n if (kernel.disposeFunc != null) {\n kernel.disposeFunc(this.registry[backendName]);\n }\n });\n }\n initializeBackend(backendName) {\n const registryFactoryEntry = this.registryFactory[backendName];\n if (registryFactoryEntry == null) {\n throw new Error(`Cannot initialize backend ${backendName}, no registration found.`);\n }\n try {\n const backend2 = registryFactoryEntry.factory();\n if (backend2 && !(backend2 instanceof KernelBackend) && typeof backend2.then === \"function\") {\n const promiseId = ++this.pendingBackendInitId;\n const success = backend2.then((backendInstance) => {\n if (promiseId < this.pendingBackendInitId) {\n return false;\n }\n this.registry[backendName] = backendInstance;\n this.pendingBackendInit = null;\n return true;\n }).catch((err) => {\n if (promiseId < this.pendingBackendInitId) {\n return false;\n }\n this.pendingBackendInit = null;\n warn(`Initialization of backend ${backendName} failed`);\n warn(err.stack || err.message);\n return false;\n });\n this.pendingBackendInit = success;\n return { success, asyncInit: true };\n } else {\n this.registry[backendName] = backend2;\n return { success: true, asyncInit: false };\n }\n } catch (err) {\n warn(`Initialization of backend ${backendName} failed`);\n warn(err.stack || err.message);\n return { success: false, asyncInit: false };\n }\n }\n removeBackend(backendName) {\n if (!(backendName in this.registryFactory)) {\n throw new Error(`${backendName} backend not found in registry`);\n }\n if (this.backendName === backendName && this.pendingBackendInit != null) {\n this.pendingBackendInitId++;\n }\n if (backendName in this.registry) {\n this.disposeRegisteredKernels(backendName);\n this.registry[backendName].dispose();\n delete this.registry[backendName];\n }\n delete this.registryFactory[backendName];\n if (this.backendName === backendName) {\n this.pendingBackendInit = null;\n this.backendName = null;\n this.backendInstance = null;\n }\n }\n getSortedBackends() {\n if (Object.keys(this.registryFactory).length === 0) {\n throw new Error(\"No backend found in registry.\");\n }\n return Object.keys(this.registryFactory).sort((a, b) => {\n return this.registryFactory[b].priority - this.registryFactory[a].priority;\n });\n }\n initializeBackendsAndReturnBest() {\n const sortedBackends = this.getSortedBackends();\n for (let i2 = 0; i2 < sortedBackends.length; i2++) {\n const backendName = sortedBackends[i2];\n const { success, asyncInit } = this.initializeBackend(backendName);\n if (asyncInit || success) {\n return { name: backendName, asyncInit };\n }\n }\n throw new Error(`Could not initialize any backends, all backend initializations failed.`);\n }\n moveData(backend2, dataId) {\n const info = this.state.tensorInfo.get(dataId);\n const srcBackend = info.backend;\n const values = this.readSync(dataId);\n const refCount = srcBackend.refCount(dataId);\n srcBackend.disposeData(dataId, true);\n info.backend = backend2;\n backend2.move(dataId, values, info.shape, info.dtype, refCount);\n if (this.shouldCheckForMemLeaks()) {\n this.state.numDataMovesStack[this.state.numDataMovesStack.length - 1]++;\n }\n }\n tidy(nameOrFn, fn) {\n let name = null;\n if (fn == null) {\n if (typeof nameOrFn !== \"function\") {\n throw new Error(\"Please provide a function to tidy()\");\n }\n fn = nameOrFn;\n } else {\n if (typeof nameOrFn !== \"string\" && !(nameOrFn instanceof String)) {\n throw new Error(\"When calling with two arguments, the first argument to tidy() must be a string\");\n }\n if (typeof fn !== \"function\") {\n throw new Error(\"When calling with two arguments, the 2nd argument to tidy() must be a function\");\n }\n name = nameOrFn;\n }\n let result;\n return this.scopedRun(() => this.startScope(name), () => this.endScope(result), () => {\n result = fn();\n if (result instanceof Promise) {\n console.error(\"Cannot return a Promise inside of tidy.\");\n }\n return result;\n });\n }\n scopedRun(start, end, f) {\n start();\n try {\n const res = f();\n end();\n return res;\n } catch (ex) {\n end();\n throw ex;\n }\n }\n nextTensorId() {\n return Engine.nextTensorId++;\n }\n nextVariableId() {\n return Engine.nextVariableId++;\n }\n clone(x) {\n const y = ENGINE.runKernel(Identity, { x });\n const inputs = { x };\n const grad2 = (dy) => ({\n x: () => {\n const dtype = \"float32\";\n const gradInputs = { x: dy };\n const attrs = { dtype };\n return ENGINE.runKernel(\n Cast,\n gradInputs,\n attrs\n );\n }\n });\n const saved = [];\n this.addTapeNode(this.state.activeScope.name, inputs, [y], grad2, saved, {});\n return y;\n }\n runKernel(kernelName, inputs, attrs) {\n if (this.backendName == null) {\n this.backend;\n }\n const hasKernel = getKernel(kernelName, this.backendName) != null;\n if (!hasKernel) {\n throw new Error(`Kernel '${kernelName}' not registered for backend '${this.backendName}'`);\n }\n return this.runKernelFunc({ kernelName, inputs, attrs });\n }\n shouldCheckForMemLeaks() {\n return this.ENV.getBool(\"IS_TEST\");\n }\n checkKernelForMemLeak(kernelName, numDataIdsBefore, outInfos) {\n const numDataIdsAfter = this.backend.numDataIds();\n let numOutputDataIds = 0;\n outInfos.forEach((info) => {\n numOutputDataIds += info.dtype === \"complex64\" ? 3 : 1;\n });\n const numMoves = this.state.numDataMovesStack[this.state.numDataMovesStack.length - 1];\n const dataIdsLeaked = numDataIdsAfter - numDataIdsBefore - numOutputDataIds - numMoves;\n if (dataIdsLeaked > 0) {\n throw new Error(`Backend '${this.backendName}' has an internal memory leak (${dataIdsLeaked} data ids) after running '${kernelName}'`);\n }\n }\n runKernelFunc(kernelParams) {\n let outputs;\n let saved = [];\n const isTapeOn = this.isTapeOn();\n const startingBytecount = this.state.numBytes;\n const startingNumTensors = this.state.numTensors;\n if (this.shouldCheckForMemLeaks()) {\n this.state.numDataMovesStack.push(0);\n }\n let kernelFunc3;\n if (this.backendName == null) {\n this.backend;\n }\n let out;\n const kernelOrScopeName = isRegisteredKernelInvocation(kernelParams) ? kernelParams.kernelName : this.state.activeScope != null ? this.state.activeScope.name : \"\";\n if (isRegisteredKernelInvocation(kernelParams)) {\n const { kernelName, inputs: inputs2, attrs: attrs2 } = kernelParams;\n if (this.backendName == null) {\n this.backend;\n }\n const kernel = getKernel(kernelName, this.backendName);\n assert(kernel != null, () => `Cannot find registered kernel '${kernelName}' for backend '${this.backendName}'`);\n kernelFunc3 = () => {\n const numDataIdsBefore = this.backend.numDataIds();\n out = kernel.kernelFunc({ inputs: inputs2, attrs: attrs2, backend: this.backend });\n const outInfos = Array.isArray(out) ? out : [out];\n if (this.shouldCheckForMemLeaks()) {\n this.checkKernelForMemLeak(kernelName, numDataIdsBefore, outInfos);\n }\n const outTensors = outInfos.map((outInfo) => {\n if (outInfo.rank != null) {\n return outInfo;\n }\n return this.makeTensorFromTensorInfo(outInfo);\n });\n if (isTapeOn) {\n const tensorsToSave = this.getTensorsForGradient(kernelName, inputs2, outTensors);\n saved = this.saveTensorsForBackwardMode(tensorsToSave);\n }\n return outTensors;\n };\n } else {\n const { forwardFunc } = kernelParams;\n const saveFunc = (tensors) => {\n if (!isTapeOn) {\n return;\n }\n saved = tensors.map((tensor2) => this.keep(this.clone(tensor2)));\n };\n kernelFunc3 = () => {\n const numDataIdsBefore = this.backend.numDataIds();\n out = this.tidy(() => forwardFunc(this.backend, saveFunc));\n const outs = Array.isArray(out) ? out : [out];\n if (this.shouldCheckForMemLeaks()) {\n this.checkKernelForMemLeak(kernelOrScopeName, numDataIdsBefore, outs);\n }\n return outs;\n };\n }\n const { inputs, attrs } = kernelParams;\n const backwardsFunc = isRegisteredKernelInvocation(kernelParams) ? null : kernelParams.backwardsFunc;\n let kernelProfile;\n this.scopedRun(\n () => this.state.kernelDepth++,\n () => this.state.kernelDepth--,\n () => {\n if (!this.ENV.getBool(\"DEBUG\") && !this.state.profiling) {\n outputs = kernelFunc3();\n } else {\n kernelProfile = this.profiler.profileKernel(kernelOrScopeName, inputs, () => kernelFunc3());\n if (this.ENV.getBool(\"DEBUG\")) {\n this.profiler.logKernelProfile(kernelProfile);\n }\n outputs = kernelProfile.outputs;\n }\n }\n );\n if (isTapeOn) {\n this.addTapeNode(kernelOrScopeName, inputs, outputs, backwardsFunc, saved, attrs);\n }\n if (this.state.profiling) {\n this.state.activeProfile.kernels.push({\n name: kernelOrScopeName,\n bytesAdded: this.state.numBytes - startingBytecount,\n totalBytesSnapshot: this.state.numBytes,\n tensorsAdded: this.state.numTensors - startingNumTensors,\n totalTensorsSnapshot: this.state.numTensors,\n inputShapes: Object.keys(inputs).map((key) => inputs[key] != null ? inputs[key].shape : null),\n outputShapes: outputs.map((item) => item.shape),\n kernelTimeMs: kernelProfile.timeMs,\n extraInfo: kernelProfile.extraInfo\n });\n }\n return Array.isArray(out) ? outputs : outputs[0];\n }\n saveTensorsForBackwardMode(tensors) {\n const saved = tensors.map((tensor2) => this.keep(this.clone(tensor2)));\n return saved;\n }\n getTensorsForGradient(kernelName, inputs, outputs) {\n const gradConfig = getGradient(kernelName);\n if (gradConfig != null) {\n const inputsToSave = gradConfig.inputsToSave || [];\n const outputsToSave = gradConfig.outputsToSave || [];\n let inputTensorsToSave;\n if (gradConfig.saveAllInputs) {\n assert(Array.isArray(inputs), () => \"saveAllInputs is true, expected inputs to be an array.\");\n inputTensorsToSave = Object.keys(inputs).map((key) => inputs[key]);\n } else {\n inputTensorsToSave = inputsToSave.map((inputName) => inputs[inputName]);\n }\n const outputTensorsToSave = outputs.filter((_, i2) => outputsToSave[i2]);\n return inputTensorsToSave.concat(outputTensorsToSave);\n }\n return [];\n }\n makeTensor(values, shape, dtype, backend2) {\n if (values == null) {\n throw new Error(\"Values passed to engine.makeTensor() are null\");\n }\n dtype = dtype || \"float32\";\n backend2 = backend2 || this.backend;\n let backendVals = values;\n if (dtype === \"string\" && isString(values[0])) {\n backendVals = values.map((d) => encodeString(d));\n }\n const dataId = backend2.write(backendVals, shape, dtype);\n const t2 = new Tensor(shape, dtype, dataId, this.nextTensorId());\n this.trackTensor(t2, backend2);\n if (dtype === \"string\") {\n const info = this.state.tensorInfo.get(dataId);\n const newBytes = bytesFromStringArray(backendVals);\n this.state.numBytes += newBytes - info.bytes;\n info.bytes = newBytes;\n }\n return t2;\n }\n makeTensorFromDataId(dataId, shape, dtype, backend2) {\n dtype = dtype || \"float32\";\n const tensorInfo = { dataId, shape, dtype };\n return this.makeTensorFromTensorInfo(tensorInfo, backend2);\n }\n makeTensorFromTensorInfo(tensorInfo, backend2) {\n const { dataId, shape, dtype } = tensorInfo;\n const t2 = new Tensor(shape, dtype, dataId, this.nextTensorId());\n this.trackTensor(t2, backend2);\n return t2;\n }\n makeVariable(initialValue, trainable = true, name, dtype) {\n name = name || this.nextVariableId().toString();\n if (dtype != null && dtype !== initialValue.dtype) {\n initialValue = initialValue.cast(dtype);\n }\n const v = new Variable(initialValue, trainable, name, this.nextTensorId());\n if (this.state.registeredVariables[v.name] != null) {\n throw new Error(`Variable with name ${v.name} was already registered`);\n }\n this.state.registeredVariables[v.name] = v;\n this.incRef(v, this.backend);\n return v;\n }\n trackTensor(a, backend2) {\n this.state.numTensors++;\n if (a.dtype === \"string\") {\n this.state.numStringTensors++;\n }\n let bytes = 0;\n if (a.dtype !== \"complex64\" && a.dtype !== \"string\") {\n bytes = a.size * bytesPerElement(a.dtype);\n }\n this.state.numBytes += bytes;\n if (!this.state.tensorInfo.has(a.dataId)) {\n this.state.numDataBuffers++;\n this.state.tensorInfo.set(a.dataId, {\n backend: backend2 || this.backend,\n dtype: a.dtype,\n shape: a.shape,\n bytes\n });\n }\n if (!(a instanceof Variable)) {\n this.track(a);\n }\n }\n incRef(a, backend2) {\n this.trackTensor(a, backend2);\n this.backend.incRef(a.dataId);\n }\n removeDataId(dataId, backend2) {\n if (this.state.tensorInfo.has(dataId) && this.state.tensorInfo.get(dataId).backend === backend2) {\n this.state.tensorInfo.delete(dataId);\n this.state.numDataBuffers--;\n }\n }\n disposeTensor(a) {\n if (!this.state.tensorInfo.has(a.dataId)) {\n return;\n }\n const info = this.state.tensorInfo.get(a.dataId);\n this.state.numTensors--;\n if (a.dtype === \"string\") {\n this.state.numStringTensors--;\n this.state.numBytes -= info.bytes;\n }\n if (a.dtype !== \"complex64\" && a.dtype !== \"string\") {\n const bytes = a.size * bytesPerElement(a.dtype);\n this.state.numBytes -= bytes;\n }\n if (info.backend.disposeData(a.dataId)) {\n this.removeDataId(a.dataId, info.backend);\n }\n }\n disposeVariables() {\n for (const varName in this.state.registeredVariables) {\n const v = this.state.registeredVariables[varName];\n this.disposeVariable(v);\n }\n }\n disposeVariable(v) {\n this.disposeTensor(v);\n if (this.state.registeredVariables[v.name] != null) {\n delete this.state.registeredVariables[v.name];\n }\n }\n memory() {\n const info = this.backend.memory();\n info.numTensors = this.state.numTensors;\n info.numDataBuffers = this.state.numDataBuffers;\n info.numBytes = this.state.numBytes;\n if (this.state.numStringTensors > 0) {\n info.unreliable = true;\n if (info.reasons == null) {\n info.reasons = [];\n }\n info.reasons.push(\"Memory usage by string tensors is approximate (2 bytes per character)\");\n }\n return info;\n }\n async profile(query) {\n this.state.profiling = true;\n const startBytes = this.state.numBytes;\n const startNumTensors = this.state.numTensors;\n this.state.activeProfile.kernels = [];\n this.state.activeProfile.result = await query();\n this.state.profiling = false;\n this.state.activeProfile.peakBytes = Math.max(...this.state.activeProfile.kernels.map((d) => d.totalBytesSnapshot));\n this.state.activeProfile.newBytes = this.state.numBytes - startBytes;\n this.state.activeProfile.newTensors = this.state.numTensors - startNumTensors;\n for (const kernel of this.state.activeProfile.kernels) {\n kernel.kernelTimeMs = await kernel.kernelTimeMs;\n kernel.extraInfo = await kernel.extraInfo;\n }\n return this.state.activeProfile;\n }\n isTapeOn() {\n return this.state.gradientDepth > 0 && this.state.kernelDepth === 0;\n }\n addTapeNode(kernelName, inputs, outputs, gradientsFunc, saved, attrs) {\n const tapeNode = { id: this.state.nextTapeNodeId++, kernelName, inputs, outputs, saved };\n const gradConfig = getGradient(kernelName);\n if (gradConfig != null) {\n gradientsFunc = gradConfig.gradFunc;\n }\n if (gradientsFunc != null) {\n tapeNode.gradient = (dys) => {\n dys = dys.map((dy, i2) => {\n if (dy == null) {\n const output = outputs[i2];\n const vals = makeZerosTypedArray(output.size, output.dtype);\n return this.makeTensor(vals, output.shape, output.dtype);\n }\n return dy;\n });\n return gradientsFunc(dys.length > 1 ? dys : dys[0], saved, attrs);\n };\n }\n this.state.activeTape.push(tapeNode);\n }\n keep(result) {\n result.kept = true;\n return result;\n }\n startTape() {\n if (this.state.gradientDepth === 0) {\n this.state.activeTape = [];\n }\n this.state.gradientDepth++;\n }\n endTape() {\n this.state.gradientDepth--;\n }\n startScope(name) {\n const scopeInfo = {\n track: [],\n name: \"unnamed scope\",\n id: this.state.nextScopeId++\n };\n if (name) {\n scopeInfo.name = name;\n }\n this.state.scopeStack.push(scopeInfo);\n this.state.activeScope = scopeInfo;\n }\n endScope(result) {\n const tensorsToTrackInParent = getTensorsInContainer(result);\n const tensorsToTrackInParentSet = new Set(tensorsToTrackInParent.map((t2) => t2.id));\n for (let i2 = 0; i2 < this.state.activeScope.track.length; i2++) {\n const tensor2 = this.state.activeScope.track[i2];\n if (!tensor2.kept && !tensorsToTrackInParentSet.has(tensor2.id)) {\n tensor2.dispose();\n }\n }\n const oldScope = this.state.scopeStack.pop();\n this.state.activeScope = this.state.scopeStack.length === 0 ? null : this.state.scopeStack[this.state.scopeStack.length - 1];\n tensorsToTrackInParent.forEach((tensor2) => {\n if (!tensor2.kept && tensor2.scopeId === oldScope.id) {\n this.track(tensor2);\n }\n });\n }\n gradients(f, xs, dy, allowNoGradients = false) {\n assert(xs.length > 0, () => \"gradients() received an empty list of xs.\");\n if (dy != null && dy.dtype !== \"float32\") {\n throw new Error(`dy must have 'float32' dtype, but has '${dy.dtype}'`);\n }\n const y = this.scopedRun(() => this.startTape(), () => this.endTape(), () => this.tidy(\"forward\", f));\n assert(y instanceof Tensor, () => \"The result y returned by f() must be a tensor.\");\n const filteredTape = getFilteredNodesXToY(this.state.activeTape, xs, y);\n if (!allowNoGradients && filteredTape.length === 0 && xs.length > 0) {\n throw new Error(\"Cannot compute gradient of y=f(x) with respect to x. Make sure that the f you passed encloses all operations that lead from x to y.\");\n }\n return this.tidy(\"backward\", () => {\n const accumulatedGradientMap = {};\n accumulatedGradientMap[y.id] = dy == null ? ones(y.shape) : dy;\n backpropagateGradients(\n accumulatedGradientMap,\n filteredTape,\n (f2) => this.tidy(f2),\n add\n );\n const grads2 = xs.map((x) => accumulatedGradientMap[x.id]);\n if (this.state.gradientDepth === 0) {\n this.state.activeTape.forEach((node) => {\n for (const tensor2 of node.saved) {\n tensor2.dispose();\n }\n });\n this.state.activeTape = null;\n }\n return { value: y, grads: grads2 };\n });\n }\n customGrad(f) {\n assert(isFunction(f), () => \"The f passed in customGrad(f) must be a function.\");\n return (...inputs) => {\n assert(inputs.every((t2) => t2 instanceof Tensor), () => \"The args passed in customGrad(f)(x1, x2,...) must all be tensors\");\n let res;\n const inputMap = {};\n inputs.forEach((input2, i2) => {\n inputMap[i2] = input2;\n });\n const forwardFunc = (_, save) => {\n res = f(...[...inputs, save]);\n assert(res.value instanceof Tensor, () => \"The function f passed in customGrad(f) must return an object where `obj.value` is a tensor\");\n assert(isFunction(res.gradFunc), () => \"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function.\");\n return res.value;\n };\n const backwardsFunc = (dy, saved) => {\n const gradRes = res.gradFunc(dy, saved);\n const grads2 = Array.isArray(gradRes) ? gradRes : [gradRes];\n assert(grads2.length === inputs.length, () => \"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function that returns the same number of tensors as inputs passed to f(...).\");\n assert(grads2.every((t2) => t2 instanceof Tensor), () => \"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function that returns a list of only tensors.\");\n const gradMap = {};\n grads2.forEach((grad2, i2) => {\n gradMap[i2] = () => grad2;\n });\n return gradMap;\n };\n return this.runKernelFunc({\n forwardFunc,\n backwardsFunc,\n inputs: inputMap\n });\n };\n }\n readSync(dataId) {\n const info = this.state.tensorInfo.get(dataId);\n return info.backend.readSync(dataId);\n }\n read(dataId) {\n const info = this.state.tensorInfo.get(dataId);\n return info.backend.read(dataId);\n }\n readToGPU(dataId, options) {\n const info = this.state.tensorInfo.get(dataId);\n return info.backend.readToGPU(dataId, options);\n }\n async time(query) {\n const start = now();\n const timingInfo = await this.backend.time(query);\n timingInfo.wallMs = now() - start;\n return timingInfo;\n }\n track(result) {\n if (this.state.activeScope != null) {\n result.scopeId = this.state.activeScope.id;\n this.state.activeScope.track.push(result);\n }\n return result;\n }\n get registeredVariables() {\n return this.state.registeredVariables;\n }\n reset() {\n this.pendingBackendInitId++;\n this.state.dispose();\n this.ENV.reset();\n this.state = new EngineState();\n for (const backendName in this.registry) {\n this.disposeRegisteredKernels(backendName);\n this.registry[backendName].dispose();\n delete this.registry[backendName];\n }\n this.backendName = null;\n this.backendInstance = null;\n this.pendingBackendInit = null;\n }\n};\nEngine.nextTensorId = 0;\nEngine.nextVariableId = 0;\nfunction ones(shape) {\n const values = makeOnesTypedArray(sizeFromShape(shape), \"float32\");\n return ENGINE.makeTensor(values, shape, \"float32\");\n}\nfunction getOrMakeEngine() {\n const ns = getGlobalNamespace();\n if (ns._tfengine == null) {\n const environment = new Environment(ns);\n ns._tfengine = new Engine(environment);\n }\n setEnvironmentGlobal(ns._tfengine.ENV);\n setTensorTracker(() => ns._tfengine);\n return ns._tfengine;\n}\nvar ENGINE = getOrMakeEngine();\nfunction add(a, b) {\n const inputs = { a, b };\n return ENGINE.runKernel(Add, inputs);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/device_util.js\nvar device_util_exports = {};\n__export(device_util_exports, {\n isBrowser: () => isBrowser,\n isMobile: () => isMobile,\n mockIsMobile: () => mockIsMobile\n});\nfunction _isNavigatorDefined() {\n return typeof navigator !== \"undefined\" && navigator != null;\n}\nvar isMobileMockValue;\nfunction mockIsMobile(value) {\n isMobileMockValue = value;\n}\nfunction isMobile(nav) {\n if (isMobileMockValue !== void 0) {\n return isMobileMockValue;\n }\n if (nav || _isNavigatorDefined()) {\n if (!nav) {\n nav = navigator;\n }\n if (nav.product === \"ReactNative\") {\n return true;\n }\n const a = nav.userAgent || nav.vendor || (typeof window !== \"undefined\" ? window.opera : \"\");\n if (!a) {\n const navAny = nav;\n return navAny.userAgentData && navAny.userAgentData.mobile;\n }\n return /(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(a.substr(0, 4));\n }\n return false;\n}\nfunction isBrowser() {\n return typeof window !== \"undefined\" && window.document != null || typeof WorkerGlobalScope !== \"undefined\";\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/flags.js\nvar ENV2 = env();\nENV2.registerFlag(\"DEBUG\", () => false, (debugValue) => {\n if (debugValue) {\n console.warn(\"Debugging mode is ON. The output of every math call will be downloaded to CPU and checked for NaNs. This significantly impacts performance.\");\n }\n});\nENV2.registerFlag(\"IS_BROWSER\", () => isBrowser());\nENV2.registerFlag(\"IS_NODE\", () => typeof process !== \"undefined\" && typeof process.versions !== \"undefined\" && typeof process.versions.node !== \"undefined\");\nENV2.registerFlag(\"IS_CHROME\", () => typeof navigator !== \"undefined\" && navigator != null && navigator.userAgent != null && /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor));\nENV2.registerFlag(\"PROD\", () => false);\nENV2.registerFlag(\"TENSORLIKE_CHECK_SHAPE_CONSISTENCY\", () => ENV2.getBool(\"DEBUG\"));\nENV2.registerFlag(\"DEPRECATION_WARNINGS_ENABLED\", () => true);\nENV2.registerFlag(\"IS_TEST\", () => false);\nENV2.registerFlag(\"CHECK_COMPUTATION_FOR_ERRORS\", () => true);\nENV2.registerFlag(\"WRAP_TO_IMAGEBITMAP\", () => false);\nENV2.registerFlag(\"ENGINE_COMPILE_ONLY\", () => false);\nENV2.registerFlag(\"CANVAS2D_WILL_READ_FREQUENTLY_FOR_GPU\", () => false);\nENV2.registerFlag(\"USE_SETTIMEOUTCUSTOM\", () => false);\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/tensor_util_env.js\nfunction inferShape(val, dtype) {\n let firstElem = val;\n if (isTypedArray(val)) {\n return dtype === \"string\" ? [] : [val.length];\n }\n if (!Array.isArray(val)) {\n return [];\n }\n const shape = [];\n while (Array.isArray(firstElem) || isTypedArray(firstElem) && dtype !== \"string\") {\n shape.push(firstElem.length);\n firstElem = firstElem[0];\n }\n if (Array.isArray(val) && env().getBool(\"TENSORLIKE_CHECK_SHAPE_CONSISTENCY\")) {\n deepAssertShapeConsistency(val, shape, []);\n }\n return shape;\n}\nfunction deepAssertShapeConsistency(val, shape, indices) {\n indices = indices || [];\n if (!Array.isArray(val) && !isTypedArray(val)) {\n assert(shape.length === 0, () => `Element arr[${indices.join(\"][\")}] is a primitive, but should be an array/TypedArray of ${shape[0]} elements`);\n return;\n }\n assert(shape.length > 0, () => `Element arr[${indices.join(\"][\")}] should be a primitive, but is an array of ${val.length} elements`);\n assert(val.length === shape[0], () => `Element arr[${indices.join(\"][\")}] should have ${shape[0]} elements, but has ${val.length} elements`);\n const subShape = shape.slice(1);\n for (let i2 = 0; i2 < val.length; ++i2) {\n deepAssertShapeConsistency(val[i2], subShape, indices.concat(i2));\n }\n}\nfunction assertDtype(expectedDtype, actualDType, argName, functionName) {\n if (expectedDtype === \"string_or_numeric\") {\n return;\n }\n if (expectedDtype == null) {\n throw new Error(`Expected dtype cannot be null.`);\n }\n if (expectedDtype !== \"numeric\" && expectedDtype !== actualDType || expectedDtype === \"numeric\" && actualDType === \"string\") {\n throw new Error(`Argument '${argName}' passed to '${functionName}' must be ${expectedDtype} tensor, but got ${actualDType} tensor`);\n }\n}\nfunction convertToTensor(x, argName, functionName, parseAsDtype = \"numeric\") {\n if (x instanceof Tensor) {\n assertDtype(parseAsDtype, x.dtype, argName, functionName);\n return x;\n }\n let inferredDtype = inferDtype(x);\n if (inferredDtype !== \"string\" && [\"bool\", \"int32\", \"float32\"].indexOf(parseAsDtype) >= 0) {\n inferredDtype = parseAsDtype;\n }\n assertDtype(parseAsDtype, inferredDtype, argName, functionName);\n if (x == null || !isTypedArray(x) && !Array.isArray(x) && typeof x !== \"number\" && typeof x !== \"boolean\" && typeof x !== \"string\") {\n const type = x == null ? \"null\" : x.constructor.name;\n throw new Error(`Argument '${argName}' passed to '${functionName}' must be a Tensor or TensorLike, but got '${type}'`);\n }\n const inferredShape = inferShape(x, inferredDtype);\n if (!isTypedArray(x) && !Array.isArray(x)) {\n x = [x];\n }\n const skipTypedArray = true;\n const values = inferredDtype !== \"string\" ? toTypedArray(x, inferredDtype) : flatten(x, [], skipTypedArray);\n return ENGINE.makeTensor(values, inferredShape, inferredDtype);\n}\nfunction convertToTensorArray(arg, argName, functionName, parseAsDtype = \"numeric\") {\n if (!Array.isArray(arg)) {\n throw new Error(`Argument ${argName} passed to ${functionName} must be a \\`Tensor[]\\` or \\`TensorLike[]\\``);\n }\n const tensors = arg;\n return tensors.map((t2, i2) => convertToTensor(t2, `${argName}[${i2}]`, functionName, parseAsDtype));\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/operation.js\nvar OP_SCOPE_SUFFIX = \"__op\";\nfunction op(f) {\n const keys = Object.keys(f);\n if (keys.length !== 1) {\n throw new Error(`Please provide an object with a single key (operation name) mapping to a function. Got an object with ${keys.length} keys.`);\n }\n let opName = keys[0];\n const fn = f[opName];\n if (opName.endsWith(\"_\")) {\n opName = opName.substring(0, opName.length - 1);\n }\n opName = opName + OP_SCOPE_SUFFIX;\n const f2 = (...args) => {\n ENGINE.startScope(opName);\n try {\n const result = fn(...args);\n if (isPromise(result)) {\n console.error(\"Cannot return a Promise inside of tidy.\");\n }\n ENGINE.endScope(result);\n return result;\n } catch (ex) {\n ENGINE.endScope(null);\n throw ex;\n }\n };\n Object.defineProperty(f2, \"name\", { value: opName, configurable: true });\n return f2;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/complex.js\nfunction complex_(real5, imag5) {\n const $real = convertToTensor(real5, \"real\", \"complex\");\n const $imag = convertToTensor(imag5, \"imag\", \"complex\");\n assertShapesMatch($real.shape, $imag.shape, `real and imag shapes, ${$real.shape} and ${$imag.shape}, must match in call to tf.complex().`);\n const inputs = { real: $real, imag: $imag };\n return ENGINE.runKernel(Complex, inputs);\n}\nvar complex = op({ complex_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/tensor_ops_util.js\nfunction makeTensor(values, shape, inferredShape, dtype) {\n if (dtype == null) {\n dtype = inferDtype(values);\n }\n if (dtype === \"complex64\") {\n throw new Error(`Cannot construct a complex64 tensor directly. Please use tf.complex(real, imag).`);\n }\n if (!isTypedArray(values) && !Array.isArray(values) && typeof values !== \"number\" && typeof values !== \"boolean\" && typeof values !== \"string\") {\n throw new Error(\"values passed to tensor(values) must be a number/boolean/string or an array of numbers/booleans/strings, or a TypedArray\");\n }\n if (shape != null) {\n assertNonNegativeIntegerDimensions(shape);\n const providedSize = sizeFromShape(shape);\n const inferredSize = sizeFromShape(inferredShape);\n assert(providedSize === inferredSize, () => `Based on the provided shape, [${shape}], the tensor should have ${providedSize} values but has ${inferredSize}`);\n for (let i2 = 0; i2 < inferredShape.length; ++i2) {\n const inferred = inferredShape[i2];\n const flatDimsDontMatch = i2 === inferredShape.length - 1 ? inferred !== sizeFromShape(shape.slice(i2)) : true;\n assert(inferredShape[i2] === shape[i2] || !flatDimsDontMatch, () => `Error creating a new Tensor. Inferred shape (${inferredShape}) does not match the provided shape (${shape}). `);\n }\n }\n if (!isTypedArray(values) && !Array.isArray(values)) {\n values = [values];\n }\n shape = shape || inferredShape;\n values = dtype !== \"string\" ? toTypedArray(values, dtype) : flatten(values, [], true);\n return ENGINE.makeTensor(values, shape, dtype);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/tensor.js\nfunction tensor(values, shape, dtype) {\n const inferredShape = inferShape(values, dtype);\n return makeTensor(values, shape, inferredShape, dtype);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/io/types.js\nvar DTYPE_VALUE_SIZE_MAP = {\n \"float32\": 4,\n \"float16\": 2,\n \"int32\": 4,\n \"uint16\": 2,\n \"uint8\": 1,\n \"bool\": 1,\n \"complex64\": 8\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/io/io_utils.js\nvar NUM_BYTES_STRING_LENGTH = 4;\nasync function encodeWeights(tensors, group) {\n const specs = [];\n const dataPromises = [];\n const names = Array.isArray(tensors) ? tensors.map((tensor2) => tensor2.name) : Object.keys(tensors);\n for (let i2 = 0; i2 < names.length; ++i2) {\n const name = names[i2];\n const t2 = Array.isArray(tensors) ? tensors[i2].tensor : tensors[name];\n if (t2.dtype !== \"float32\" && t2.dtype !== \"int32\" && t2.dtype !== \"bool\" && t2.dtype !== \"string\" && t2.dtype !== \"complex64\") {\n throw new Error(`Unsupported dtype in weight '${name}': ${t2.dtype}`);\n }\n const spec = { name, shape: t2.shape, dtype: t2.dtype };\n if (t2.dtype === \"string\") {\n const utf8bytes = new Promise(async (resolve) => {\n const vals = await t2.bytes();\n const totalNumBytes = vals.reduce((p2, c) => p2 + c.length, 0) + NUM_BYTES_STRING_LENGTH * vals.length;\n const bytes = new Uint8Array(totalNumBytes);\n let offset = 0;\n for (let i3 = 0; i3 < vals.length; i3++) {\n const val = vals[i3];\n const bytesOfLength = new Uint8Array(new Uint32Array([val.length]).buffer);\n bytes.set(bytesOfLength, offset);\n offset += NUM_BYTES_STRING_LENGTH;\n bytes.set(val, offset);\n offset += val.length;\n }\n resolve(bytes);\n });\n dataPromises.push(utf8bytes);\n } else {\n dataPromises.push(t2.data());\n }\n if (group != null) {\n spec.group = group;\n }\n specs.push(spec);\n }\n const tensorValues = await Promise.all(dataPromises);\n return { data: concatenateTypedArrays(tensorValues), specs };\n}\nfunction decodeWeights(buffer2, specs) {\n const out = {};\n let float16Decode;\n let offset = 0;\n for (const spec of specs) {\n const name = spec.name;\n const dtype = spec.dtype;\n const shape = spec.shape;\n const size = sizeFromShape(shape);\n let values;\n if (\"quantization\" in spec) {\n const quantization = spec.quantization;\n if (quantization.dtype === \"uint8\" || quantization.dtype === \"uint16\") {\n if (!(\"min\" in quantization && \"scale\" in quantization)) {\n throw new Error(`Weight ${spec.name} with quantization ${quantization.dtype} doesn't have corresponding metadata min and scale.`);\n }\n } else if (quantization.dtype === \"float16\") {\n if (dtype !== \"float32\") {\n throw new Error(`Weight ${spec.name} is quantized with ${quantization.dtype} which only supports weights of type float32 not ${dtype}.`);\n }\n } else {\n throw new Error(`Weight ${spec.name} has unknown quantization dtype ${quantization.dtype}. Supported quantization dtypes are: 'uint8', 'uint16', and 'float16'.`);\n }\n const quantizationSizeFactor = DTYPE_VALUE_SIZE_MAP[quantization.dtype];\n const byteBuffer = buffer2.slice(offset, offset + size * quantizationSizeFactor);\n const quantizedArray = quantization.dtype === \"uint8\" ? new Uint8Array(byteBuffer) : new Uint16Array(byteBuffer);\n if (dtype === \"float32\") {\n if (quantization.dtype === \"uint8\" || quantization.dtype === \"uint16\") {\n values = new Float32Array(quantizedArray.length);\n for (let i2 = 0; i2 < quantizedArray.length; i2++) {\n const v = quantizedArray[i2];\n values[i2] = v * quantization.scale + quantization.min;\n }\n } else if (quantization.dtype === \"float16\") {\n if (float16Decode === void 0) {\n float16Decode = getFloat16Decoder();\n }\n values = float16Decode(quantizedArray);\n } else {\n throw new Error(`Unsupported quantization type ${quantization.dtype} for weight type float32.`);\n }\n } else if (dtype === \"int32\") {\n if (quantization.dtype !== \"uint8\" && quantization.dtype !== \"uint16\") {\n throw new Error(`Unsupported quantization type ${quantization.dtype} for weight type int32.`);\n }\n values = new Int32Array(quantizedArray.length);\n for (let i2 = 0; i2 < quantizedArray.length; i2++) {\n const v = quantizedArray[i2];\n values[i2] = Math.round(v * quantization.scale + quantization.min);\n }\n } else {\n throw new Error(`Unsupported dtype in weight '${name}': ${dtype}`);\n }\n offset += size * quantizationSizeFactor;\n } else if (dtype === \"string\") {\n const size2 = sizeFromShape(spec.shape);\n values = [];\n for (let i2 = 0; i2 < size2; i2++) {\n const byteLength = new Uint32Array(buffer2.slice(offset, offset + NUM_BYTES_STRING_LENGTH))[0];\n offset += NUM_BYTES_STRING_LENGTH;\n const bytes = new Uint8Array(buffer2.slice(offset, offset + byteLength));\n values.push(bytes);\n offset += byteLength;\n }\n } else {\n const dtypeFactor = DTYPE_VALUE_SIZE_MAP[dtype];\n const byteBuffer = buffer2.slice(offset, offset + size * dtypeFactor);\n if (dtype === \"float32\") {\n values = new Float32Array(byteBuffer);\n } else if (dtype === \"int32\") {\n values = new Int32Array(byteBuffer);\n } else if (dtype === \"bool\") {\n values = new Uint8Array(byteBuffer);\n } else if (dtype === \"complex64\") {\n values = new Float32Array(byteBuffer);\n const real5 = new Float32Array(values.length / 2);\n const image2 = new Float32Array(values.length / 2);\n for (let i2 = 0; i2 < real5.length; i2++) {\n real5[i2] = values[i2 * 2];\n image2[i2] = values[i2 * 2 + 1];\n }\n const realTensor = tensor(real5, shape, \"float32\");\n const imageTensor = tensor(image2, shape, \"float32\");\n out[name] = complex(realTensor, imageTensor);\n realTensor.dispose();\n imageTensor.dispose();\n } else {\n throw new Error(`Unsupported dtype in weight '${name}': ${dtype}`);\n }\n offset += size * dtypeFactor;\n }\n if (dtype !== \"complex64\") {\n out[name] = tensor(values, shape, dtype);\n }\n }\n return out;\n}\nfunction concatenateTypedArrays(xs) {\n if (xs === null) {\n throw new Error(`Invalid input value: ${JSON.stringify(xs)}`);\n }\n let totalByteLength = 0;\n const normalizedXs = [];\n xs.forEach((x) => {\n totalByteLength += x.byteLength;\n normalizedXs.push(x.byteLength === x.buffer.byteLength ? x : new x.constructor(x));\n if (!(x instanceof Float32Array || x instanceof Int32Array || x instanceof Uint8Array)) {\n throw new Error(`Unsupported TypedArray subtype: ${x.constructor.name}`);\n }\n });\n const y = new Uint8Array(totalByteLength);\n let offset = 0;\n normalizedXs.forEach((x) => {\n y.set(new Uint8Array(x.buffer), offset);\n offset += x.byteLength;\n });\n return y.buffer;\n}\nvar useNodeBuffer = typeof Buffer !== \"undefined\" && (typeof Blob === \"undefined\" || typeof atob === \"undefined\" || typeof btoa === \"undefined\");\nfunction stringByteLength(str) {\n if (useNodeBuffer) {\n return Buffer.byteLength(str);\n }\n return new Blob([str]).size;\n}\nfunction arrayBufferToBase64String(buffer2) {\n if (useNodeBuffer) {\n return Buffer.from(buffer2).toString(\"base64\");\n }\n const buf = new Uint8Array(buffer2);\n let s2 = \"\";\n for (let i2 = 0, l3 = buf.length; i2 < l3; i2++) {\n s2 += String.fromCharCode(buf[i2]);\n }\n return btoa(s2);\n}\nfunction base64StringToArrayBuffer(str) {\n if (useNodeBuffer) {\n const buf = Buffer.from(str, \"base64\");\n return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);\n }\n const s2 = atob(str);\n const buffer2 = new Uint8Array(s2.length);\n for (let i2 = 0; i2 < s2.length; ++i2) {\n buffer2.set([s2.charCodeAt(i2)], i2);\n }\n return buffer2.buffer;\n}\nfunction concatenateArrayBuffers(buffers) {\n if (buffers.length === 1) {\n return buffers[0];\n }\n let totalByteLength = 0;\n buffers.forEach((buffer2) => {\n totalByteLength += buffer2.byteLength;\n });\n const temp = new Uint8Array(totalByteLength);\n let offset = 0;\n buffers.forEach((buffer2) => {\n temp.set(new Uint8Array(buffer2), offset);\n offset += buffer2.byteLength;\n });\n return temp.buffer;\n}\nfunction basename(path) {\n const SEPARATOR = \"/\";\n path = path.trim();\n while (path.endsWith(SEPARATOR)) {\n path = path.slice(0, path.length - 1);\n }\n const items = path.split(SEPARATOR);\n return items[items.length - 1];\n}\nfunction getModelJSONForModelArtifacts(artifacts, manifest) {\n const result = {\n modelTopology: artifacts.modelTopology,\n format: artifacts.format,\n generatedBy: artifacts.generatedBy,\n convertedBy: artifacts.convertedBy,\n weightsManifest: manifest\n };\n if (artifacts.signature != null) {\n result.signature = artifacts.signature;\n }\n if (artifacts.userDefinedMetadata != null) {\n result.userDefinedMetadata = artifacts.userDefinedMetadata;\n }\n if (artifacts.modelInitializer != null) {\n result.modelInitializer = artifacts.modelInitializer;\n }\n if (artifacts.trainingConfig != null) {\n result.trainingConfig = artifacts.trainingConfig;\n }\n return result;\n}\nfunction getModelArtifactsForJSONSync(modelJSON, weightSpecs, weightData) {\n const modelArtifacts = {\n modelTopology: modelJSON.modelTopology,\n format: modelJSON.format,\n generatedBy: modelJSON.generatedBy,\n convertedBy: modelJSON.convertedBy\n };\n if (modelJSON.trainingConfig != null) {\n modelArtifacts.trainingConfig = modelJSON.trainingConfig;\n }\n if (modelJSON.weightsManifest != null) {\n if (!weightSpecs) {\n throw new Error(\"modelJSON has weightsManifest but weightSpecs is null\");\n }\n if (!weightData) {\n throw new Error(\"modelJSON has weightsManifest but weightData is null\");\n }\n modelArtifacts.weightSpecs = weightSpecs;\n modelArtifacts.weightData = weightData;\n }\n if (modelJSON.signature != null) {\n modelArtifacts.signature = modelJSON.signature;\n }\n if (modelJSON.userDefinedMetadata != null) {\n modelArtifacts.userDefinedMetadata = modelJSON.userDefinedMetadata;\n }\n if (modelJSON.modelInitializer != null) {\n modelArtifacts.modelInitializer = modelJSON.modelInitializer;\n }\n return modelArtifacts;\n}\nasync function getModelArtifactsForJSON(modelJSON, loadWeights2) {\n let weightSpecs;\n let weightData;\n if (modelJSON.weightsManifest != null) {\n [weightSpecs, weightData] = await loadWeights2(modelJSON.weightsManifest);\n }\n return getModelArtifactsForJSONSync(modelJSON, weightSpecs, weightData);\n}\nfunction getModelArtifactsInfoForJSON(modelArtifacts) {\n if (modelArtifacts.modelTopology instanceof ArrayBuffer) {\n throw new Error(\"Expected JSON model topology, received ArrayBuffer.\");\n }\n return {\n dateSaved: new Date(),\n modelTopologyType: \"JSON\",\n modelTopologyBytes: modelArtifacts.modelTopology == null ? 0 : stringByteLength(JSON.stringify(modelArtifacts.modelTopology)),\n weightSpecsBytes: modelArtifacts.weightSpecs == null ? 0 : stringByteLength(JSON.stringify(modelArtifacts.weightSpecs)),\n weightDataBytes: modelArtifacts.weightData == null ? 0 : modelArtifacts.weightData.byteLength\n };\n}\nfunction getWeightSpecs(weightsManifest) {\n const weightSpecs = [];\n for (const entry of weightsManifest) {\n weightSpecs.push(...entry.weights);\n }\n return weightSpecs;\n}\nfunction computeFloat16MantisaTable() {\n const convertMantissa = (i2) => {\n let m = i2 << 13;\n let e2 = 0;\n while ((m & 8388608) === 0) {\n e2 -= 8388608;\n m <<= 1;\n }\n m &= ~8388608;\n e2 += 947912704;\n return m | e2;\n };\n const mantisaTable = new Uint32Array(2048);\n mantisaTable[0] = 0;\n for (let i2 = 1; i2 < 1024; i2++) {\n mantisaTable[i2] = convertMantissa(i2);\n }\n for (let i2 = 1024; i2 < 2048; i2++) {\n mantisaTable[i2] = 939524096 + (i2 - 1024 << 13);\n }\n return mantisaTable;\n}\nfunction computeFloat16ExponentTable() {\n const exponentTable = new Uint32Array(64);\n exponentTable[0] = 0;\n exponentTable[31] = 1199570944;\n exponentTable[32] = 2147483648;\n exponentTable[63] = 3347054592;\n for (let i2 = 1; i2 < 31; i2++) {\n exponentTable[i2] = i2 << 23;\n }\n for (let i2 = 33; i2 < 63; i2++) {\n exponentTable[i2] = 2147483648 + (i2 - 32 << 23);\n }\n return exponentTable;\n}\nfunction computeFloat16OffsetTable() {\n const offsetTable = new Uint32Array(64);\n for (let i2 = 0; i2 < 64; i2++) {\n offsetTable[i2] = 1024;\n }\n offsetTable[0] = offsetTable[32] = 0;\n return offsetTable;\n}\nfunction getFloat16Decoder() {\n const mantisaTable = computeFloat16MantisaTable();\n const exponentTable = computeFloat16ExponentTable();\n const offsetTable = computeFloat16OffsetTable();\n return (quantizedArray) => {\n const buffer2 = new ArrayBuffer(4 * quantizedArray.length);\n const bufferUint32View = new Uint32Array(buffer2);\n for (let index = 0; index < quantizedArray.length; index++) {\n const float16Bits = quantizedArray[index];\n const float32Bits = mantisaTable[offsetTable[float16Bits >> 10] + (float16Bits & 1023)] + exponentTable[float16Bits >> 10];\n bufferUint32View[index] = float32Bits;\n }\n return new Float32Array(buffer2);\n };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/io/router_registry.js\nvar IORouterRegistry = class {\n constructor() {\n this.saveRouters = [];\n this.loadRouters = [];\n }\n static getInstance() {\n if (IORouterRegistry.instance == null) {\n IORouterRegistry.instance = new IORouterRegistry();\n }\n return IORouterRegistry.instance;\n }\n static registerSaveRouter(saveRouter) {\n IORouterRegistry.getInstance().saveRouters.push(saveRouter);\n }\n static registerLoadRouter(loadRouter) {\n IORouterRegistry.getInstance().loadRouters.push(loadRouter);\n }\n static getSaveHandlers(url) {\n return IORouterRegistry.getHandlers(url, \"save\");\n }\n static getLoadHandlers(url, loadOptions) {\n return IORouterRegistry.getHandlers(url, \"load\", loadOptions);\n }\n static getHandlers(url, handlerType, loadOptions) {\n const validHandlers = [];\n const routers = handlerType === \"load\" ? IORouterRegistry.getInstance().loadRouters : IORouterRegistry.getInstance().saveRouters;\n routers.forEach((router) => {\n const handler = router(url, loadOptions);\n if (handler !== null) {\n validHandlers.push(handler);\n }\n });\n return validHandlers;\n }\n};\nvar registerSaveRouter = (loudRouter) => IORouterRegistry.registerSaveRouter(loudRouter);\nvar registerLoadRouter = (loudRouter) => IORouterRegistry.registerLoadRouter(loudRouter);\nvar getSaveHandlers = (url) => IORouterRegistry.getSaveHandlers(url);\nvar getLoadHandlers = (url, loadOptions) => IORouterRegistry.getLoadHandlers(url, loadOptions);\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/io/indexed_db.js\nvar DATABASE_NAME = \"tensorflowjs\";\nvar DATABASE_VERSION = 1;\nvar MODEL_STORE_NAME = \"models_store\";\nvar INFO_STORE_NAME = \"model_info_store\";\nfunction getIndexedDBFactory() {\n if (!env().getBool(\"IS_BROWSER\")) {\n throw new Error(\"Failed to obtain IndexedDB factory because the current environmentis not a web browser.\");\n }\n const theWindow = typeof window === \"undefined\" ? self : window;\n const factory = theWindow.indexedDB || theWindow.mozIndexedDB || theWindow.webkitIndexedDB || theWindow.msIndexedDB || theWindow.shimIndexedDB;\n if (factory == null) {\n throw new Error(\"The current browser does not appear to support IndexedDB.\");\n }\n return factory;\n}\nfunction setUpDatabase(openRequest) {\n const db = openRequest.result;\n db.createObjectStore(MODEL_STORE_NAME, { keyPath: \"modelPath\" });\n db.createObjectStore(INFO_STORE_NAME, { keyPath: \"modelPath\" });\n}\nvar BrowserIndexedDB = class {\n constructor(modelPath) {\n this.indexedDB = getIndexedDBFactory();\n if (modelPath == null || !modelPath) {\n throw new Error(\"For IndexedDB, modelPath must not be null, undefined or empty.\");\n }\n this.modelPath = modelPath;\n }\n async save(modelArtifacts) {\n if (modelArtifacts.modelTopology instanceof ArrayBuffer) {\n throw new Error(\"BrowserLocalStorage.save() does not support saving model topology in binary formats yet.\");\n }\n return this.databaseAction(this.modelPath, modelArtifacts);\n }\n async load() {\n return this.databaseAction(this.modelPath);\n }\n databaseAction(modelPath, modelArtifacts) {\n return new Promise((resolve, reject) => {\n const openRequest = this.indexedDB.open(DATABASE_NAME, DATABASE_VERSION);\n openRequest.onupgradeneeded = () => setUpDatabase(openRequest);\n openRequest.onsuccess = () => {\n const db = openRequest.result;\n if (modelArtifacts == null) {\n const modelTx = db.transaction(MODEL_STORE_NAME, \"readonly\");\n const modelStore = modelTx.objectStore(MODEL_STORE_NAME);\n const getRequest = modelStore.get(this.modelPath);\n getRequest.onsuccess = () => {\n if (getRequest.result == null) {\n db.close();\n return reject(new Error(`Cannot find model with path '${this.modelPath}' in IndexedDB.`));\n } else {\n resolve(getRequest.result.modelArtifacts);\n }\n };\n getRequest.onerror = (error) => {\n db.close();\n return reject(getRequest.error);\n };\n modelTx.oncomplete = () => db.close();\n } else {\n const modelArtifactsInfo = getModelArtifactsInfoForJSON(modelArtifacts);\n const infoTx = db.transaction(INFO_STORE_NAME, \"readwrite\");\n let infoStore = infoTx.objectStore(INFO_STORE_NAME);\n const putInfoRequest = infoStore.put({ modelPath: this.modelPath, modelArtifactsInfo });\n let modelTx;\n putInfoRequest.onsuccess = () => {\n modelTx = db.transaction(MODEL_STORE_NAME, \"readwrite\");\n const modelStore = modelTx.objectStore(MODEL_STORE_NAME);\n const putModelRequest = modelStore.put({\n modelPath: this.modelPath,\n modelArtifacts,\n modelArtifactsInfo\n });\n putModelRequest.onsuccess = () => resolve({ modelArtifactsInfo });\n putModelRequest.onerror = (error) => {\n infoStore = infoTx.objectStore(INFO_STORE_NAME);\n const deleteInfoRequest = infoStore.delete(this.modelPath);\n deleteInfoRequest.onsuccess = () => {\n db.close();\n return reject(putModelRequest.error);\n };\n deleteInfoRequest.onerror = (error2) => {\n db.close();\n return reject(putModelRequest.error);\n };\n };\n };\n putInfoRequest.onerror = (error) => {\n db.close();\n return reject(putInfoRequest.error);\n };\n infoTx.oncomplete = () => {\n if (modelTx == null) {\n db.close();\n } else {\n modelTx.oncomplete = () => db.close();\n }\n };\n }\n };\n openRequest.onerror = (error) => reject(openRequest.error);\n });\n }\n};\nBrowserIndexedDB.URL_SCHEME = \"indexeddb://\";\nvar indexedDBRouter = (url) => {\n if (!env().getBool(\"IS_BROWSER\")) {\n return null;\n } else {\n if (!Array.isArray(url) && url.startsWith(BrowserIndexedDB.URL_SCHEME)) {\n return browserIndexedDB(url.slice(BrowserIndexedDB.URL_SCHEME.length));\n } else {\n return null;\n }\n }\n};\nIORouterRegistry.registerSaveRouter(indexedDBRouter);\nIORouterRegistry.registerLoadRouter(indexedDBRouter);\nfunction browserIndexedDB(modelPath) {\n return new BrowserIndexedDB(modelPath);\n}\nfunction maybeStripScheme(key) {\n return key.startsWith(BrowserIndexedDB.URL_SCHEME) ? key.slice(BrowserIndexedDB.URL_SCHEME.length) : key;\n}\nvar BrowserIndexedDBManager = class {\n constructor() {\n this.indexedDB = getIndexedDBFactory();\n }\n async listModels() {\n return new Promise((resolve, reject) => {\n const openRequest = this.indexedDB.open(DATABASE_NAME, DATABASE_VERSION);\n openRequest.onupgradeneeded = () => setUpDatabase(openRequest);\n openRequest.onsuccess = () => {\n const db = openRequest.result;\n const tx = db.transaction(INFO_STORE_NAME, \"readonly\");\n const store = tx.objectStore(INFO_STORE_NAME);\n const getAllInfoRequest = store.getAll();\n getAllInfoRequest.onsuccess = () => {\n const out = {};\n for (const item of getAllInfoRequest.result) {\n out[item.modelPath] = item.modelArtifactsInfo;\n }\n resolve(out);\n };\n getAllInfoRequest.onerror = (error) => {\n db.close();\n return reject(getAllInfoRequest.error);\n };\n tx.oncomplete = () => db.close();\n };\n openRequest.onerror = (error) => reject(openRequest.error);\n });\n }\n async removeModel(path) {\n path = maybeStripScheme(path);\n return new Promise((resolve, reject) => {\n const openRequest = this.indexedDB.open(DATABASE_NAME, DATABASE_VERSION);\n openRequest.onupgradeneeded = () => setUpDatabase(openRequest);\n openRequest.onsuccess = () => {\n const db = openRequest.result;\n const infoTx = db.transaction(INFO_STORE_NAME, \"readwrite\");\n const infoStore = infoTx.objectStore(INFO_STORE_NAME);\n const getInfoRequest = infoStore.get(path);\n let modelTx;\n getInfoRequest.onsuccess = () => {\n if (getInfoRequest.result == null) {\n db.close();\n return reject(new Error(`Cannot find model with path '${path}' in IndexedDB.`));\n } else {\n const deleteInfoRequest = infoStore.delete(path);\n const deleteModelData = () => {\n modelTx = db.transaction(MODEL_STORE_NAME, \"readwrite\");\n const modelStore = modelTx.objectStore(MODEL_STORE_NAME);\n const deleteModelRequest = modelStore.delete(path);\n deleteModelRequest.onsuccess = () => resolve(getInfoRequest.result.modelArtifactsInfo);\n deleteModelRequest.onerror = (error) => reject(getInfoRequest.error);\n };\n deleteInfoRequest.onsuccess = deleteModelData;\n deleteInfoRequest.onerror = (error) => {\n deleteModelData();\n db.close();\n return reject(getInfoRequest.error);\n };\n }\n };\n getInfoRequest.onerror = (error) => {\n db.close();\n return reject(getInfoRequest.error);\n };\n infoTx.oncomplete = () => {\n if (modelTx == null) {\n db.close();\n } else {\n modelTx.oncomplete = () => db.close();\n }\n };\n };\n openRequest.onerror = (error) => reject(openRequest.error);\n });\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/io/local_storage.js\nvar PATH_SEPARATOR = \"/\";\nvar PATH_PREFIX = \"tensorflowjs_models\";\nvar INFO_SUFFIX = \"info\";\nvar MODEL_TOPOLOGY_SUFFIX = \"model_topology\";\nvar WEIGHT_SPECS_SUFFIX = \"weight_specs\";\nvar WEIGHT_DATA_SUFFIX = \"weight_data\";\nvar MODEL_METADATA_SUFFIX = \"model_metadata\";\nfunction getModelKeys(path) {\n return {\n info: [PATH_PREFIX, path, INFO_SUFFIX].join(PATH_SEPARATOR),\n topology: [PATH_PREFIX, path, MODEL_TOPOLOGY_SUFFIX].join(PATH_SEPARATOR),\n weightSpecs: [PATH_PREFIX, path, WEIGHT_SPECS_SUFFIX].join(PATH_SEPARATOR),\n weightData: [PATH_PREFIX, path, WEIGHT_DATA_SUFFIX].join(PATH_SEPARATOR),\n modelMetadata: [PATH_PREFIX, path, MODEL_METADATA_SUFFIX].join(PATH_SEPARATOR)\n };\n}\nfunction removeItems(keys) {\n for (const key of Object.values(keys)) {\n window.localStorage.removeItem(key);\n }\n}\nfunction getModelPathFromKey(key) {\n const items = key.split(PATH_SEPARATOR);\n if (items.length < 3) {\n throw new Error(`Invalid key format: ${key}`);\n }\n return items.slice(1, items.length - 1).join(PATH_SEPARATOR);\n}\nfunction maybeStripScheme2(key) {\n return key.startsWith(BrowserLocalStorage.URL_SCHEME) ? key.slice(BrowserLocalStorage.URL_SCHEME.length) : key;\n}\nvar BrowserLocalStorage = class {\n constructor(modelPath) {\n if (!env().getBool(\"IS_BROWSER\") || typeof window === \"undefined\" || typeof window.localStorage === \"undefined\") {\n throw new Error(\"The current environment does not support local storage.\");\n }\n this.LS = window.localStorage;\n if (modelPath == null || !modelPath) {\n throw new Error(\"For local storage, modelPath must not be null, undefined or empty.\");\n }\n this.modelPath = modelPath;\n this.keys = getModelKeys(this.modelPath);\n }\n async save(modelArtifacts) {\n if (modelArtifacts.modelTopology instanceof ArrayBuffer) {\n throw new Error(\"BrowserLocalStorage.save() does not support saving model topology in binary formats yet.\");\n } else {\n const topology = JSON.stringify(modelArtifacts.modelTopology);\n const weightSpecs = JSON.stringify(modelArtifacts.weightSpecs);\n const modelArtifactsInfo = getModelArtifactsInfoForJSON(modelArtifacts);\n try {\n this.LS.setItem(this.keys.info, JSON.stringify(modelArtifactsInfo));\n this.LS.setItem(this.keys.topology, topology);\n this.LS.setItem(this.keys.weightSpecs, weightSpecs);\n this.LS.setItem(this.keys.weightData, arrayBufferToBase64String(modelArtifacts.weightData));\n const metadata = {\n format: modelArtifacts.format,\n generatedBy: modelArtifacts.generatedBy,\n convertedBy: modelArtifacts.convertedBy,\n signature: modelArtifacts.signature != null ? modelArtifacts.signature : void 0,\n userDefinedMetadata: modelArtifacts.userDefinedMetadata != null ? modelArtifacts.userDefinedMetadata : void 0,\n modelInitializer: modelArtifacts.modelInitializer != null ? modelArtifacts.modelInitializer : void 0,\n trainingConfig: modelArtifacts.trainingConfig != null ? modelArtifacts.trainingConfig : void 0\n };\n this.LS.setItem(this.keys.modelMetadata, JSON.stringify(metadata));\n return { modelArtifactsInfo };\n } catch (err) {\n removeItems(this.keys);\n throw new Error(`Failed to save model '${this.modelPath}' to local storage: size quota being exceeded is a possible cause of this failure: modelTopologyBytes=${modelArtifactsInfo.modelTopologyBytes}, weightSpecsBytes=${modelArtifactsInfo.weightSpecsBytes}, weightDataBytes=${modelArtifactsInfo.weightDataBytes}.`);\n }\n }\n }\n async load() {\n const info = JSON.parse(this.LS.getItem(this.keys.info));\n if (info == null) {\n throw new Error(`In local storage, there is no model with name '${this.modelPath}'`);\n }\n if (info.modelTopologyType !== \"JSON\") {\n throw new Error(\"BrowserLocalStorage does not support loading non-JSON model topology yet.\");\n }\n const out = {};\n const topology = JSON.parse(this.LS.getItem(this.keys.topology));\n if (topology == null) {\n throw new Error(`In local storage, the topology of model '${this.modelPath}' is missing.`);\n }\n out.modelTopology = topology;\n const weightSpecs = JSON.parse(this.LS.getItem(this.keys.weightSpecs));\n if (weightSpecs == null) {\n throw new Error(`In local storage, the weight specs of model '${this.modelPath}' are missing.`);\n }\n out.weightSpecs = weightSpecs;\n const metadataString = this.LS.getItem(this.keys.modelMetadata);\n if (metadataString != null) {\n const metadata = JSON.parse(metadataString);\n out.format = metadata.format;\n out.generatedBy = metadata.generatedBy;\n out.convertedBy = metadata.convertedBy;\n if (metadata.signature != null) {\n out.signature = metadata.signature;\n }\n if (metadata.userDefinedMetadata != null) {\n out.userDefinedMetadata = metadata.userDefinedMetadata;\n }\n if (metadata.modelInitializer != null) {\n out.modelInitializer = metadata.modelInitializer;\n }\n if (metadata.trainingConfig != null) {\n out.trainingConfig = metadata.trainingConfig;\n }\n }\n const weightDataBase64 = this.LS.getItem(this.keys.weightData);\n if (weightDataBase64 == null) {\n throw new Error(`In local storage, the binary weight values of model '${this.modelPath}' are missing.`);\n }\n out.weightData = base64StringToArrayBuffer(weightDataBase64);\n return out;\n }\n};\nBrowserLocalStorage.URL_SCHEME = \"localstorage://\";\nvar localStorageRouter = (url) => {\n if (!env().getBool(\"IS_BROWSER\")) {\n return null;\n } else {\n if (!Array.isArray(url) && url.startsWith(BrowserLocalStorage.URL_SCHEME)) {\n return browserLocalStorage(url.slice(BrowserLocalStorage.URL_SCHEME.length));\n } else {\n return null;\n }\n }\n};\nIORouterRegistry.registerSaveRouter(localStorageRouter);\nIORouterRegistry.registerLoadRouter(localStorageRouter);\nfunction browserLocalStorage(modelPath) {\n return new BrowserLocalStorage(modelPath);\n}\nvar BrowserLocalStorageManager = class {\n constructor() {\n assert(env().getBool(\"IS_BROWSER\"), () => \"Current environment is not a web browser\");\n assert(typeof window === \"undefined\" || typeof window.localStorage !== \"undefined\", () => \"Current browser does not appear to support localStorage\");\n this.LS = window.localStorage;\n }\n async listModels() {\n const out = {};\n const prefix = PATH_PREFIX + PATH_SEPARATOR;\n const suffix = PATH_SEPARATOR + INFO_SUFFIX;\n for (let i2 = 0; i2 < this.LS.length; ++i2) {\n const key = this.LS.key(i2);\n if (key.startsWith(prefix) && key.endsWith(suffix)) {\n const modelPath = getModelPathFromKey(key);\n out[modelPath] = JSON.parse(this.LS.getItem(key));\n }\n }\n return out;\n }\n async removeModel(path) {\n path = maybeStripScheme2(path);\n const keys = getModelKeys(path);\n if (this.LS.getItem(keys.info) == null) {\n throw new Error(`Cannot find model at path '${path}'`);\n }\n const info = JSON.parse(this.LS.getItem(keys.info));\n removeItems(keys);\n return info;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/io/model_management.js\nvar URL_SCHEME_SUFFIX = \"://\";\nvar ModelStoreManagerRegistry = class {\n constructor() {\n this.managers = {};\n }\n static getInstance() {\n if (ModelStoreManagerRegistry.instance == null) {\n ModelStoreManagerRegistry.instance = new ModelStoreManagerRegistry();\n }\n return ModelStoreManagerRegistry.instance;\n }\n static registerManager(scheme, manager) {\n assert(scheme != null, () => \"scheme must not be undefined or null.\");\n if (scheme.endsWith(URL_SCHEME_SUFFIX)) {\n scheme = scheme.slice(0, scheme.indexOf(URL_SCHEME_SUFFIX));\n }\n assert(scheme.length > 0, () => \"scheme must not be an empty string.\");\n const registry = ModelStoreManagerRegistry.getInstance();\n assert(registry.managers[scheme] == null, () => `A model store manager is already registered for scheme '${scheme}'.`);\n registry.managers[scheme] = manager;\n }\n static getManager(scheme) {\n const manager = ModelStoreManagerRegistry.getInstance().managers[scheme];\n if (manager == null) {\n throw new Error(`Cannot find model manager for scheme '${scheme}'`);\n }\n return manager;\n }\n static getSchemes() {\n return Object.keys(ModelStoreManagerRegistry.getInstance().managers);\n }\n};\nfunction parseURL(url) {\n if (url.indexOf(URL_SCHEME_SUFFIX) === -1) {\n throw new Error(`The url string provided does not contain a scheme. Supported schemes are: ${ModelStoreManagerRegistry.getSchemes().join(\",\")}`);\n }\n return {\n scheme: url.split(URL_SCHEME_SUFFIX)[0],\n path: url.split(URL_SCHEME_SUFFIX)[1]\n };\n}\nasync function cloneModelInternal(sourceURL, destURL, deleteSource = false) {\n assert(sourceURL !== destURL, () => `Old path and new path are the same: '${sourceURL}'`);\n const loadHandlers = IORouterRegistry.getLoadHandlers(sourceURL);\n assert(loadHandlers.length > 0, () => `Copying failed because no load handler is found for source URL ${sourceURL}.`);\n assert(loadHandlers.length < 2, () => `Copying failed because more than one (${loadHandlers.length}) load handlers for source URL ${sourceURL}.`);\n const loadHandler = loadHandlers[0];\n const saveHandlers = IORouterRegistry.getSaveHandlers(destURL);\n assert(saveHandlers.length > 0, () => `Copying failed because no save handler is found for destination URL ${destURL}.`);\n assert(saveHandlers.length < 2, () => `Copying failed because more than one (${loadHandlers.length}) save handlers for destination URL ${destURL}.`);\n const saveHandler = saveHandlers[0];\n const sourceScheme = parseURL(sourceURL).scheme;\n const sourcePath = parseURL(sourceURL).path;\n const sameMedium = sourceScheme === parseURL(sourceURL).scheme;\n const modelArtifacts = await loadHandler.load();\n if (deleteSource && sameMedium) {\n await ModelStoreManagerRegistry.getManager(sourceScheme).removeModel(sourcePath);\n }\n const saveResult = await saveHandler.save(modelArtifacts);\n if (deleteSource && !sameMedium) {\n await ModelStoreManagerRegistry.getManager(sourceScheme).removeModel(sourcePath);\n }\n return saveResult.modelArtifactsInfo;\n}\nasync function listModels() {\n const schemes = ModelStoreManagerRegistry.getSchemes();\n const out = {};\n for (const scheme of schemes) {\n const schemeOut = await ModelStoreManagerRegistry.getManager(scheme).listModels();\n for (const path in schemeOut) {\n const url = scheme + URL_SCHEME_SUFFIX + path;\n out[url] = schemeOut[path];\n }\n }\n return out;\n}\nasync function removeModel(url) {\n const schemeAndPath = parseURL(url);\n const manager = ModelStoreManagerRegistry.getManager(schemeAndPath.scheme);\n return manager.removeModel(schemeAndPath.path);\n}\nasync function copyModel(sourceURL, destURL) {\n const deleteSource = false;\n return cloneModelInternal(sourceURL, destURL, deleteSource);\n}\nasync function moveModel(sourceURL, destURL) {\n const deleteSource = true;\n return cloneModelInternal(sourceURL, destURL, deleteSource);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/platforms/platform_browser.js\nvar PlatformBrowser = class {\n constructor() {\n this.messageName = \"setTimeoutCustom\";\n this.functionRefs = [];\n this.handledMessageCount = 0;\n this.hasEventListener = false;\n }\n fetch(path, init2) {\n return fetch(path, init2);\n }\n now() {\n return performance.now();\n }\n encode(text, encoding) {\n if (encoding !== \"utf-8\" && encoding !== \"utf8\") {\n throw new Error(`Browser's encoder only supports utf-8, but got ${encoding}`);\n }\n if (this.textEncoder == null) {\n this.textEncoder = new TextEncoder();\n }\n return this.textEncoder.encode(text);\n }\n decode(bytes, encoding) {\n return new TextDecoder(encoding).decode(bytes);\n }\n setTimeoutCustom(functionRef, delay) {\n if (!window || !env().getBool(\"USE_SETTIMEOUTCUSTOM\")) {\n setTimeout(functionRef, delay);\n return;\n }\n this.functionRefs.push(functionRef);\n setTimeout(() => {\n window.postMessage({ name: this.messageName, index: this.functionRefs.length - 1 }, \"*\");\n }, delay);\n if (!this.hasEventListener) {\n this.hasEventListener = true;\n window.addEventListener(\"message\", (event) => {\n if (event.source === window && event.data.name === this.messageName) {\n event.stopPropagation();\n const functionRef2 = this.functionRefs[event.data.index];\n functionRef2();\n this.handledMessageCount++;\n if (this.handledMessageCount === this.functionRefs.length) {\n this.functionRefs = [];\n this.handledMessageCount = 0;\n }\n }\n }, true);\n }\n }\n};\nif (env().get(\"IS_BROWSER\")) {\n env().setPlatform(\"browser\", new PlatformBrowser());\n try {\n ModelStoreManagerRegistry.registerManager(BrowserLocalStorage.URL_SCHEME, new BrowserLocalStorageManager());\n } catch (err) {\n }\n try {\n ModelStoreManagerRegistry.registerManager(BrowserIndexedDB.URL_SCHEME, new BrowserIndexedDBManager());\n } catch (err) {\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/platforms/platform_node.js\nvar getNodeFetch = {\n importFetch: () => require_browser()\n};\nvar systemFetch;\nvar PlatformNode = class {\n constructor() {\n this.util = require_util();\n this.textEncoder = new this.util.TextEncoder();\n }\n fetch(path, requestInits) {\n if (env().global.fetch != null) {\n return env().global.fetch(path, requestInits);\n }\n if (systemFetch == null) {\n systemFetch = getNodeFetch.importFetch();\n }\n return systemFetch(path, requestInits);\n }\n now() {\n const time2 = process.hrtime();\n return time2[0] * 1e3 + time2[1] / 1e6;\n }\n encode(text, encoding) {\n if (encoding !== \"utf-8\" && encoding !== \"utf8\") {\n throw new Error(`Node built-in encoder only supports utf-8, but got ${encoding}`);\n }\n return this.textEncoder.encode(text);\n }\n decode(bytes, encoding) {\n if (bytes.length === 0) {\n return \"\";\n }\n return new this.util.TextDecoder(encoding).decode(bytes);\n }\n};\nif (env().get(\"IS_NODE\") && !env().get(\"IS_BROWSER\")) {\n env().setPlatform(\"node\", new PlatformNode());\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/buffer.js\nfunction buffer(shape, dtype = \"float32\", values) {\n dtype = dtype || \"float32\";\n assertNonNegativeIntegerDimensions(shape);\n return new TensorBuffer(shape, dtype, values);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/cast.js\nfunction cast_(x, dtype) {\n const $x = convertToTensor(x, \"x\", \"cast\");\n if (!isValidDtype(dtype)) {\n throw new Error(`Failed to cast to unknown dtype ${dtype}`);\n }\n if (dtype === \"string\" && $x.dtype !== \"string\" || dtype !== \"string\" && $x.dtype === \"string\") {\n throw new Error(\"Only strings can be casted to strings\");\n }\n const inputs = { x: $x };\n const attrs = { dtype };\n return ENGINE.runKernel(Cast, inputs, attrs);\n}\nvar cast = op({ cast_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/clone.js\nfunction clone_(x) {\n const $x = convertToTensor(x, \"x\", \"clone\", \"string_or_numeric\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Identity, inputs);\n}\nvar clone = op({ clone_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/print.js\nfunction print(x, verbose = false) {\n console.log(x.toString(verbose));\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/base_side_effects.js\ngetOrMakeEngine();\nvar opHandler2 = {\n buffer,\n cast,\n clone,\n print\n};\nsetOpHandler(opHandler2);\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/io/io.js\nvar io_exports = {};\n__export(io_exports, {\n browserFiles: () => browserFiles,\n browserHTTPRequest: () => browserHTTPRequest,\n concatenateArrayBuffers: () => concatenateArrayBuffers,\n copyModel: () => copyModel,\n decodeWeights: () => decodeWeights,\n encodeWeights: () => encodeWeights,\n fromMemory: () => fromMemory,\n fromMemorySync: () => fromMemorySync,\n getLoadHandlers: () => getLoadHandlers,\n getModelArtifactsForJSON: () => getModelArtifactsForJSON,\n getModelArtifactsForJSONSync: () => getModelArtifactsForJSONSync,\n getModelArtifactsInfoForJSON: () => getModelArtifactsInfoForJSON,\n getSaveHandlers: () => getSaveHandlers,\n getWeightSpecs: () => getWeightSpecs,\n http: () => http,\n isHTTPScheme: () => isHTTPScheme,\n listModels: () => listModels,\n loadWeights: () => loadWeights,\n moveModel: () => moveModel,\n registerLoadRouter: () => registerLoadRouter,\n registerSaveRouter: () => registerSaveRouter,\n removeModel: () => removeModel,\n weightsLoaderFactory: () => weightsLoaderFactory,\n withSaveHandler: () => withSaveHandler,\n withSaveHandlerSync: () => withSaveHandlerSync\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/io/browser_files.js\nvar DEFAULT_FILE_NAME_PREFIX = \"model\";\nvar DEFAULT_JSON_EXTENSION_NAME = \".json\";\nvar DEFAULT_WEIGHT_DATA_EXTENSION_NAME = \".weights.bin\";\nfunction defer(f) {\n return new Promise((resolve) => setTimeout(resolve)).then(f);\n}\nvar BrowserDownloads = class {\n constructor(fileNamePrefix) {\n if (!env().getBool(\"IS_BROWSER\")) {\n throw new Error(\"browserDownloads() cannot proceed because the current environment is not a browser.\");\n }\n if (fileNamePrefix.startsWith(BrowserDownloads.URL_SCHEME)) {\n fileNamePrefix = fileNamePrefix.slice(BrowserDownloads.URL_SCHEME.length);\n }\n if (fileNamePrefix == null || fileNamePrefix.length === 0) {\n fileNamePrefix = DEFAULT_FILE_NAME_PREFIX;\n }\n this.modelJsonFileName = fileNamePrefix + DEFAULT_JSON_EXTENSION_NAME;\n this.weightDataFileName = fileNamePrefix + DEFAULT_WEIGHT_DATA_EXTENSION_NAME;\n }\n async save(modelArtifacts) {\n if (typeof document === \"undefined\") {\n throw new Error(\"Browser downloads are not supported in this environment since `document` is not present\");\n }\n const weightsURL = window.URL.createObjectURL(new Blob([modelArtifacts.weightData], { type: \"application/octet-stream\" }));\n if (modelArtifacts.modelTopology instanceof ArrayBuffer) {\n throw new Error(\"BrowserDownloads.save() does not support saving model topology in binary formats yet.\");\n } else {\n const weightsManifest = [{\n paths: [\"./\" + this.weightDataFileName],\n weights: modelArtifacts.weightSpecs\n }];\n const modelJSON = getModelJSONForModelArtifacts(modelArtifacts, weightsManifest);\n const modelJsonURL = window.URL.createObjectURL(new Blob([JSON.stringify(modelJSON)], { type: \"application/json\" }));\n const jsonAnchor = this.modelJsonAnchor == null ? document.createElement(\"a\") : this.modelJsonAnchor;\n jsonAnchor.download = this.modelJsonFileName;\n jsonAnchor.href = modelJsonURL;\n await defer(() => jsonAnchor.dispatchEvent(new MouseEvent(\"click\")));\n if (modelArtifacts.weightData != null) {\n const weightDataAnchor = this.weightDataAnchor == null ? document.createElement(\"a\") : this.weightDataAnchor;\n weightDataAnchor.download = this.weightDataFileName;\n weightDataAnchor.href = weightsURL;\n await defer(() => weightDataAnchor.dispatchEvent(new MouseEvent(\"click\")));\n }\n return { modelArtifactsInfo: getModelArtifactsInfoForJSON(modelArtifacts) };\n }\n }\n};\nBrowserDownloads.URL_SCHEME = \"downloads://\";\nvar BrowserFiles = class {\n constructor(files) {\n if (files == null || files.length < 1) {\n throw new Error(`When calling browserFiles, at least 1 file is required, but received ${files}`);\n }\n this.jsonFile = files[0];\n this.weightsFiles = files.slice(1);\n }\n async load() {\n return new Promise((resolve, reject) => {\n const jsonReader = new FileReader();\n jsonReader.onload = (event) => {\n const modelJSON = JSON.parse(event.target.result);\n const modelTopology = modelJSON.modelTopology;\n if (modelTopology == null) {\n reject(new Error(`modelTopology field is missing from file ${this.jsonFile.name}`));\n return;\n }\n const weightsManifest = modelJSON.weightsManifest;\n if (weightsManifest == null) {\n reject(new Error(`weightManifest field is missing from file ${this.jsonFile.name}`));\n return;\n }\n if (this.weightsFiles.length === 0) {\n resolve({ modelTopology });\n return;\n }\n const modelArtifactsPromise = getModelArtifactsForJSON(modelJSON, (weightsManifest2) => this.loadWeights(weightsManifest2));\n resolve(modelArtifactsPromise);\n };\n jsonReader.onerror = (error) => reject(`Failed to read model topology and weights manifest JSON from file '${this.jsonFile.name}'. BrowserFiles supports loading Keras-style tf.Model artifacts only.`);\n jsonReader.readAsText(this.jsonFile);\n });\n }\n loadWeights(weightsManifest) {\n const weightSpecs = [];\n const paths = [];\n for (const entry of weightsManifest) {\n weightSpecs.push(...entry.weights);\n paths.push(...entry.paths);\n }\n const pathToFile = this.checkManifestAndWeightFiles(weightsManifest);\n const promises = paths.map((path) => this.loadWeightsFile(path, pathToFile[path]));\n return Promise.all(promises).then((buffers) => [weightSpecs, concatenateArrayBuffers(buffers)]);\n }\n loadWeightsFile(path, file) {\n return new Promise((resolve, reject) => {\n const weightFileReader = new FileReader();\n weightFileReader.onload = (event) => {\n const weightData = event.target.result;\n resolve(weightData);\n };\n weightFileReader.onerror = (error) => reject(`Failed to weights data from file of path '${path}'.`);\n weightFileReader.readAsArrayBuffer(file);\n });\n }\n checkManifestAndWeightFiles(manifest) {\n const basenames = [];\n const fileNames = this.weightsFiles.map((file) => basename(file.name));\n const pathToFile = {};\n for (const group of manifest) {\n group.paths.forEach((path) => {\n const pathBasename = basename(path);\n if (basenames.indexOf(pathBasename) !== -1) {\n throw new Error(`Duplicate file basename found in weights manifest: '${pathBasename}'`);\n }\n basenames.push(pathBasename);\n if (fileNames.indexOf(pathBasename) === -1) {\n throw new Error(`Weight file with basename '${pathBasename}' is not provided.`);\n } else {\n pathToFile[path] = this.weightsFiles[fileNames.indexOf(pathBasename)];\n }\n });\n }\n if (basenames.length !== this.weightsFiles.length) {\n throw new Error(`Mismatch in the number of files in weights manifest (${basenames.length}) and the number of weight files provided (${this.weightsFiles.length}).`);\n }\n return pathToFile;\n }\n};\nvar browserDownloadsRouter = (url) => {\n if (!env().getBool(\"IS_BROWSER\")) {\n return null;\n } else {\n if (!Array.isArray(url) && url.startsWith(BrowserDownloads.URL_SCHEME)) {\n return browserDownloads(url.slice(BrowserDownloads.URL_SCHEME.length));\n } else {\n return null;\n }\n }\n};\nIORouterRegistry.registerSaveRouter(browserDownloadsRouter);\nfunction browserDownloads(fileNamePrefix = \"model\") {\n return new BrowserDownloads(fileNamePrefix);\n}\nfunction browserFiles(files) {\n return new BrowserFiles(files);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/io/progress.js\nfunction monitorPromisesProgress(promises, onProgress, startFraction, endFraction) {\n checkPromises(promises);\n startFraction = startFraction == null ? 0 : startFraction;\n endFraction = endFraction == null ? 1 : endFraction;\n checkFraction(startFraction, endFraction);\n let resolvedPromise = 0;\n const registerMonitor = (promise) => {\n promise.then((value) => {\n const fraction = startFraction + ++resolvedPromise / promises.length * (endFraction - startFraction);\n onProgress(fraction);\n return value;\n });\n return promise;\n };\n function checkPromises(promises2) {\n assert(promises2 != null && Array.isArray(promises2) && promises2.length > 0, () => \"promises must be a none empty array\");\n }\n function checkFraction(startFraction2, endFraction2) {\n assert(startFraction2 >= 0 && startFraction2 <= 1, () => `Progress fraction must be in range [0, 1], but got startFraction ${startFraction2}`);\n assert(endFraction2 >= 0 && endFraction2 <= 1, () => `Progress fraction must be in range [0, 1], but got endFraction ${endFraction2}`);\n assert(endFraction2 >= startFraction2, () => `startFraction must be no more than endFraction, but got startFraction ${startFraction2} and endFraction ${endFraction2}`);\n }\n return Promise.all(promises.map(registerMonitor));\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/io/weights_loader.js\nasync function loadWeightsAsArrayBuffer(fetchURLs, loadOptions) {\n if (loadOptions == null) {\n loadOptions = {};\n }\n const fetchFunc = loadOptions.fetchFunc == null ? env().platform.fetch : loadOptions.fetchFunc;\n const requests = fetchURLs.map((fetchURL) => fetchFunc(fetchURL, loadOptions.requestInit, { isBinary: true }));\n const fetchStartFraction = 0;\n const fetchEndFraction = 0.5;\n const responses = loadOptions.onProgress == null ? await Promise.all(requests) : await monitorPromisesProgress(requests, loadOptions.onProgress, fetchStartFraction, fetchEndFraction);\n const bufferPromises = responses.map((response) => response.arrayBuffer());\n const bufferStartFraction = 0.5;\n const bufferEndFraction = 1;\n const buffers = loadOptions.onProgress == null ? await Promise.all(bufferPromises) : await monitorPromisesProgress(bufferPromises, loadOptions.onProgress, bufferStartFraction, bufferEndFraction);\n return buffers;\n}\nasync function loadWeights(manifest, filePathPrefix = \"\", weightNames, requestInit) {\n const fetchWeights = (fetchUrls) => loadWeightsAsArrayBuffer(fetchUrls, { requestInit });\n const loadWeights2 = weightsLoaderFactory(fetchWeights);\n return loadWeights2(manifest, filePathPrefix, weightNames);\n}\nfunction weightsLoaderFactory(fetchWeightsFunction) {\n return async (manifest, filePathPrefix = \"\", weightNames) => {\n const groupIndicesToFetchMap = manifest.map(() => false);\n const groupWeightsToFetch = {};\n const weightsFound = weightNames != null ? weightNames.map(() => false) : [];\n const allManifestWeightNames = [];\n manifest.forEach((manifestGroupConfig, groupIndex) => {\n let groupOffset = 0;\n manifestGroupConfig.weights.forEach((weightsEntry) => {\n const rawDtype = \"quantization\" in weightsEntry ? weightsEntry.quantization.dtype : weightsEntry.dtype;\n const weightsBytes = DTYPE_VALUE_SIZE_MAP[rawDtype] * sizeFromShape(weightsEntry.shape);\n const enqueueWeightsForFetchingFn = () => {\n groupIndicesToFetchMap[groupIndex] = true;\n if (groupWeightsToFetch[groupIndex] == null) {\n groupWeightsToFetch[groupIndex] = [];\n }\n groupWeightsToFetch[groupIndex].push({\n manifestEntry: weightsEntry,\n groupOffset,\n sizeBytes: weightsBytes\n });\n };\n if (weightNames != null) {\n weightNames.forEach((weightName, weightIndex) => {\n if (weightName === weightsEntry.name) {\n enqueueWeightsForFetchingFn();\n weightsFound[weightIndex] = true;\n }\n });\n } else {\n enqueueWeightsForFetchingFn();\n }\n allManifestWeightNames.push(weightsEntry.name);\n groupOffset += weightsBytes;\n });\n });\n if (!weightsFound.every((found) => found)) {\n const weightsNotFound = weightNames.filter((_, i2) => !weightsFound[i2]);\n throw new Error(`Could not find weights in manifest with names: ${weightsNotFound.join(\", \")}. \nManifest JSON has weights with names: ${allManifestWeightNames.join(\", \")}.`);\n }\n const groupIndicesToFetch = groupIndicesToFetchMap.reduce((accumulator, shouldFetch, i2) => {\n if (shouldFetch) {\n accumulator.push(i2);\n }\n return accumulator;\n }, []);\n const fetchUrls = [];\n groupIndicesToFetch.forEach((i2) => {\n manifest[i2].paths.forEach((filepath) => {\n const fetchUrl = filePathPrefix + (!filePathPrefix.endsWith(\"/\") ? \"/\" : \"\") + filepath;\n fetchUrls.push(fetchUrl);\n });\n });\n const buffers = await fetchWeightsFunction(fetchUrls);\n const weightsTensorMap = {};\n let bufferIndexOffset = 0;\n groupIndicesToFetch.forEach((i2) => {\n const numBuffers = manifest[i2].paths.length;\n let groupBytes = 0;\n for (let i3 = 0; i3 < numBuffers; i3++) {\n groupBytes += buffers[bufferIndexOffset + i3].byteLength;\n }\n const groupBuffer = new ArrayBuffer(groupBytes);\n const groupByteBuffer = new Uint8Array(groupBuffer);\n let groupBufferOffset = 0;\n for (let i3 = 0; i3 < numBuffers; i3++) {\n const buffer2 = new Uint8Array(buffers[bufferIndexOffset + i3]);\n groupByteBuffer.set(buffer2, groupBufferOffset);\n groupBufferOffset += buffer2.byteLength;\n }\n const weightsEntries = groupWeightsToFetch[i2];\n weightsEntries.forEach((weightsEntry) => {\n const byteBuffer = groupBuffer.slice(weightsEntry.groupOffset, weightsEntry.groupOffset + weightsEntry.sizeBytes);\n const nameToTensorMap = decodeWeights(byteBuffer, [weightsEntry.manifestEntry]);\n for (const name in nameToTensorMap) {\n weightsTensorMap[name] = nameToTensorMap[name];\n }\n });\n bufferIndexOffset += numBuffers;\n });\n return weightsTensorMap;\n };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/io/http.js\nvar OCTET_STREAM_MIME_TYPE = \"application/octet-stream\";\nvar JSON_TYPE = \"application/json\";\nvar HTTPRequest = class {\n constructor(path, loadOptions) {\n this.DEFAULT_METHOD = \"POST\";\n if (loadOptions == null) {\n loadOptions = {};\n }\n this.weightPathPrefix = loadOptions.weightPathPrefix;\n this.onProgress = loadOptions.onProgress;\n this.weightUrlConverter = loadOptions.weightUrlConverter;\n if (loadOptions.fetchFunc != null) {\n assert(typeof loadOptions.fetchFunc === \"function\", () => \"Must pass a function that matches the signature of `fetch` (see https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)\");\n this.fetch = loadOptions.fetchFunc;\n } else {\n this.fetch = env().platform.fetch;\n }\n assert(path != null && path.length > 0, () => \"URL path for http must not be null, undefined or empty.\");\n if (Array.isArray(path)) {\n assert(path.length === 2, () => `URL paths for http must have a length of 2, (actual length is ${path.length}).`);\n }\n this.path = path;\n if (loadOptions.requestInit != null && loadOptions.requestInit.body != null) {\n throw new Error(\"requestInit is expected to have no pre-existing body, but has one.\");\n }\n this.requestInit = loadOptions.requestInit || {};\n }\n async save(modelArtifacts) {\n if (modelArtifacts.modelTopology instanceof ArrayBuffer) {\n throw new Error(\"BrowserHTTPRequest.save() does not support saving model topology in binary formats yet.\");\n }\n const init2 = Object.assign({ method: this.DEFAULT_METHOD }, this.requestInit);\n init2.body = new FormData();\n const weightsManifest = [{\n paths: [\"./model.weights.bin\"],\n weights: modelArtifacts.weightSpecs\n }];\n const modelTopologyAndWeightManifest = getModelJSONForModelArtifacts(modelArtifacts, weightsManifest);\n init2.body.append(\"model.json\", new Blob([JSON.stringify(modelTopologyAndWeightManifest)], { type: JSON_TYPE }), \"model.json\");\n if (modelArtifacts.weightData != null) {\n init2.body.append(\"model.weights.bin\", new Blob([modelArtifacts.weightData], { type: OCTET_STREAM_MIME_TYPE }), \"model.weights.bin\");\n }\n const response = await this.fetch(this.path, init2);\n if (response.ok) {\n return {\n modelArtifactsInfo: getModelArtifactsInfoForJSON(modelArtifacts),\n responses: [response]\n };\n } else {\n throw new Error(`BrowserHTTPRequest.save() failed due to HTTP response status ${response.status}.`);\n }\n }\n async load() {\n const modelConfigRequest = await this.fetch(this.path, this.requestInit);\n if (!modelConfigRequest.ok) {\n throw new Error(`Request to ${this.path} failed with status code ${modelConfigRequest.status}. Please verify this URL points to the model JSON of the model to load.`);\n }\n let modelJSON;\n try {\n modelJSON = await modelConfigRequest.json();\n } catch (e2) {\n let message = `Failed to parse model JSON of response from ${this.path}.`;\n if (this.path.endsWith(\".pb\")) {\n message += \" Your path contains a .pb file extension. Support for .pb models have been removed in TensorFlow.js 1.0 in favor of .json models. You can re-convert your Python TensorFlow model using the TensorFlow.js 1.0 conversion scripts or you can convert your.pb models with the 'pb2json'NPM script in the tensorflow/tfjs-converter repository.\";\n } else {\n message += \" Please make sure the server is serving valid JSON for this request.\";\n }\n throw new Error(message);\n }\n const modelTopology = modelJSON.modelTopology;\n const weightsManifest = modelJSON.weightsManifest;\n if (modelTopology == null && weightsManifest == null) {\n throw new Error(`The JSON from HTTP path ${this.path} contains neither model topology or manifest for weights.`);\n }\n return getModelArtifactsForJSON(modelJSON, (weightsManifest2) => this.loadWeights(weightsManifest2));\n }\n async loadWeights(weightsManifest) {\n const weightPath = Array.isArray(this.path) ? this.path[1] : this.path;\n const [prefix, suffix] = parseUrl(weightPath);\n const pathPrefix = this.weightPathPrefix || prefix;\n const weightSpecs = getWeightSpecs(weightsManifest);\n const fetchURLs = [];\n const urlPromises = [];\n for (const weightsGroup of weightsManifest) {\n for (const path of weightsGroup.paths) {\n if (this.weightUrlConverter != null) {\n urlPromises.push(this.weightUrlConverter(path));\n } else {\n fetchURLs.push(pathPrefix + path + suffix);\n }\n }\n }\n if (this.weightUrlConverter) {\n fetchURLs.push(...await Promise.all(urlPromises));\n }\n const buffers = await loadWeightsAsArrayBuffer(fetchURLs, {\n requestInit: this.requestInit,\n fetchFunc: this.fetch,\n onProgress: this.onProgress\n });\n return [weightSpecs, concatenateArrayBuffers(buffers)];\n }\n};\nHTTPRequest.URL_SCHEME_REGEX = /^https?:\\/\\//;\nfunction parseUrl(url) {\n const lastSlash = url.lastIndexOf(\"/\");\n const lastSearchParam = url.lastIndexOf(\"?\");\n const prefix = url.substring(0, lastSlash);\n const suffix = lastSearchParam > lastSlash ? url.substring(lastSearchParam) : \"\";\n return [prefix + \"/\", suffix];\n}\nfunction isHTTPScheme(url) {\n return url.match(HTTPRequest.URL_SCHEME_REGEX) != null;\n}\nvar httpRouter = (url, loadOptions) => {\n if (typeof fetch === \"undefined\" && (loadOptions == null || loadOptions.fetchFunc == null)) {\n return null;\n } else {\n let isHTTP = true;\n if (Array.isArray(url)) {\n isHTTP = url.every((urlItem) => isHTTPScheme(urlItem));\n } else {\n isHTTP = isHTTPScheme(url);\n }\n if (isHTTP) {\n return http(url, loadOptions);\n }\n }\n return null;\n};\nIORouterRegistry.registerSaveRouter(httpRouter);\nIORouterRegistry.registerLoadRouter(httpRouter);\nfunction http(path, loadOptions) {\n return new HTTPRequest(path, loadOptions);\n}\nfunction browserHTTPRequest(path, loadOptions) {\n return http(path, loadOptions);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/io/passthrough.js\nvar PassthroughLoader = class {\n constructor(modelArtifacts) {\n this.modelArtifacts = modelArtifacts;\n }\n load() {\n return this.modelArtifacts;\n }\n};\nvar PassthroughSaver = class {\n constructor(saveHandler) {\n this.saveHandler = saveHandler;\n }\n save(modelArtifacts) {\n return this.saveHandler(modelArtifacts);\n }\n};\nvar PassthroughAsync = class {\n constructor(handler) {\n if (handler.load) {\n this.load = () => Promise.resolve(handler.load());\n }\n if (handler.save) {\n this.save = (modelArtifacts) => Promise.resolve(handler.save(modelArtifacts));\n }\n }\n};\nfunction fromMemory(modelArtifacts, weightSpecs, weightData, trainingConfig) {\n const args = arguments;\n return new PassthroughAsync(fromMemorySync(...args));\n}\nfunction fromMemorySync(modelArtifacts, weightSpecs, weightData, trainingConfig) {\n if (arguments.length === 1) {\n const isModelArtifacts = modelArtifacts.modelTopology != null || modelArtifacts.weightSpecs != null;\n if (isModelArtifacts) {\n return new PassthroughLoader(modelArtifacts);\n } else {\n console.warn(\"Please call tf.io.fromMemory() with only one argument. The argument should be of type ModelArtifacts. The multi-argument signature of tf.io.fromMemory() has been deprecated and will be removed in a future release.\");\n return new PassthroughLoader({ modelTopology: modelArtifacts });\n }\n } else {\n console.warn(\"Please call tf.io.fromMemory() with only one argument. The argument should be of type ModelArtifacts. The multi-argument signature of tf.io.fromMemory() has been deprecated and will be removed in a future release.\");\n return new PassthroughLoader({\n modelTopology: modelArtifacts,\n weightSpecs,\n weightData,\n trainingConfig\n });\n }\n}\nfunction withSaveHandler(saveHandler) {\n return new PassthroughSaver(saveHandler);\n}\nfunction withSaveHandlerSync(saveHandler) {\n return new PassthroughSaver(saveHandler);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/math.js\nvar math_exports = {};\n__export(math_exports, {\n confusionMatrix: () => confusionMatrix\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/mat_mul.js\nfunction matMul_(a, b, transposeA = false, transposeB = false) {\n let $a = convertToTensor(a, \"a\", \"matMul\");\n let $b = convertToTensor(b, \"b\", \"matMul\");\n [$a, $b] = makeTypesMatch($a, $b);\n const inputs = { a: $a, b: $b };\n const attrs = { transposeA, transposeB };\n return ENGINE.runKernel(BatchMatMul, inputs, attrs);\n}\nvar matMul = op({ matMul_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/one_hot.js\nfunction oneHot_(indices, depth, onValue = 1, offValue = 0, dtype = \"int32\") {\n if (depth < 2) {\n throw new Error(`Error in oneHot: depth must be >=2, but it is ${depth}`);\n }\n const $indices = convertToTensor(indices, \"indices\", \"oneHot\", \"int32\");\n const inputs = { indices: $indices };\n const attrs = { dtype, depth, onValue, offValue };\n return ENGINE.runKernel(OneHot, inputs, attrs);\n}\nvar oneHot = op({ oneHot_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/globals.js\nfunction enableProdMode() {\n env().set(\"PROD\", true);\n}\nfunction enableDebugMode() {\n env().set(\"DEBUG\", true);\n}\nfunction disableDeprecationWarnings() {\n env().set(\"DEPRECATION_WARNINGS_ENABLED\", false);\n console.warn(`TensorFlow.js deprecation warnings have been disabled.`);\n}\nfunction deprecationWarn(msg) {\n if (env().getBool(\"DEPRECATION_WARNINGS_ENABLED\")) {\n console.warn(msg + \" You can disable deprecation warnings with tf.disableDeprecationWarnings().\");\n }\n}\nsetDeprecationWarningFn(deprecationWarn);\nfunction disposeVariables() {\n ENGINE.disposeVariables();\n}\nfunction engine() {\n return ENGINE;\n}\nfunction memory() {\n return ENGINE.memory();\n}\nfunction profile(f) {\n return ENGINE.profile(f);\n}\nfunction tidy(nameOrFn, fn) {\n return ENGINE.tidy(nameOrFn, fn);\n}\nfunction dispose(container) {\n const tensors = getTensorsInContainer(container);\n tensors.forEach((tensor2) => tensor2.dispose());\n}\nfunction keep(result) {\n return ENGINE.keep(result);\n}\nfunction time(f) {\n return ENGINE.time(f);\n}\nfunction setBackend(backendName) {\n return ENGINE.setBackend(backendName);\n}\nfunction ready() {\n return ENGINE.ready();\n}\nfunction getBackend() {\n return ENGINE.backendName;\n}\nfunction removeBackend(name) {\n ENGINE.removeBackend(name);\n}\nfunction findBackend(name) {\n return ENGINE.findBackend(name);\n}\nfunction findBackendFactory(name) {\n return ENGINE.findBackendFactory(name);\n}\nfunction registerBackend(name, factory, priority = 1) {\n return ENGINE.registerBackend(name, factory, priority);\n}\nfunction backend() {\n return ENGINE.backend;\n}\nfunction setPlatform(platformName, platform) {\n env().setPlatform(platformName, platform);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/imag.js\nfunction imag_(input2) {\n const $input = convertToTensor(input2, \"input\", \"imag\");\n const inputs = { input: $input };\n return ENGINE.runKernel(Imag, inputs);\n}\nvar imag = op({ imag_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/neg.js\nfunction neg_(x) {\n const $x = convertToTensor(x, \"x\", \"neg\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Neg, inputs);\n}\nvar neg = op({ neg_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/real.js\nfunction real_(input2) {\n const $input = convertToTensor(input2, \"input\", \"real\");\n const inputs = { input: $input };\n return ENGINE.runKernel(Real, inputs);\n}\nvar real = op({ real_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/transpose.js\nfunction transpose_(x, perm, conjugate) {\n const $x = convertToTensor(x, \"x\", \"transpose\");\n if (perm == null) {\n perm = $x.shape.map((s2, i2) => i2).reverse();\n }\n assert($x.rank === perm.length, () => `Error in transpose: rank of input ${$x.rank} must match length of perm ${perm}.`);\n perm.forEach((axis) => {\n assert(axis >= 0 && axis < $x.rank, () => `All entries in 'perm' must be between 0 and ${$x.rank - 1} but got ${perm}`);\n });\n if ($x.rank <= 1) {\n return $x.clone();\n }\n const inputs = { x: $x };\n const attrs = { perm };\n if ($x.dtype === \"complex64\") {\n return tidy(() => {\n let $real = real($x);\n let $imag = imag($x);\n $real = ENGINE.runKernel(Transpose, { x: $real }, attrs);\n $imag = ENGINE.runKernel(Transpose, { x: $imag }, attrs);\n if (conjugate) {\n $imag = neg($imag);\n }\n return complex($real, $imag);\n });\n }\n return ENGINE.runKernel(Transpose, inputs, attrs);\n}\nvar transpose = op({ transpose_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/confusion_matrix.js\nfunction confusionMatrix_(labels, predictions, numClasses) {\n const $labels = convertToTensor(labels, \"labels\", \"confusionMatrix\");\n const $predictions = convertToTensor(predictions, \"predictions\", \"confusionMatrix\");\n assert(numClasses == null || numClasses > 0 && Number.isInteger(numClasses), () => `If provided, numClasses must be a positive integer, but got ${numClasses}`);\n assert($labels.rank === 1, () => `Expected the rank of labels to be 1, but got ${$labels.rank}`);\n assert($predictions.rank === 1, () => `Expected the rank of predictions to be 1, but got ${$predictions.rank}`);\n assert($labels.shape[0] === $predictions.shape[0], () => `Mismatch in the number of examples: ${$labels.shape[0]} vs. ${$predictions.shape[0]}. Labels and predictions should have the same number of elements.`);\n assert(numClasses > 0 && Number.isInteger(numClasses), () => `numClasses is required to be a positive integer, but got ${numClasses}`);\n const oneHotLabels = oneHot(cast($labels, \"int32\"), numClasses);\n const oneHotPredictions = oneHot(cast($predictions, \"int32\"), numClasses);\n const oneHotLabelsT = transpose(oneHotLabels);\n const product = matMul(oneHotLabelsT, oneHotPredictions);\n return cast(product, \"int32\");\n}\nvar confusionMatrix = op({ confusionMatrix_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/broadcast_util.js\nvar broadcast_util_exports = {};\n__export(broadcast_util_exports, {\n assertAndGetBroadcastShape: () => assertAndGetBroadcastShape,\n getBroadcastDims: () => getBroadcastDims,\n getReductionAxes: () => getReductionAxes\n});\nfunction getBroadcastDims(inShape, outShape) {\n const inRank = inShape.length;\n const dims = [];\n for (let i2 = 0; i2 < inRank; i2++) {\n const dim = inRank - 1 - i2;\n const a = inShape[dim] || 1;\n const b = outShape[outShape.length - 1 - i2] || 1;\n if (b > 1 && a === 1) {\n dims.unshift(dim);\n }\n }\n return dims;\n}\nfunction getReductionAxes(inShape, outShape) {\n const result = [];\n for (let i2 = 0; i2 < outShape.length; i2++) {\n const inDim = inShape[inShape.length - i2 - 1];\n const outAxis = outShape.length - i2 - 1;\n const outDim = outShape[outAxis];\n if (inDim == null || inDim === 1 && outDim > 1) {\n result.unshift(outAxis);\n }\n }\n return result;\n}\nfunction assertAndGetBroadcastShape(shapeA, shapeB) {\n const result = [];\n const l3 = Math.max(shapeA.length, shapeB.length);\n for (let i2 = 0; i2 < l3; i2++) {\n let a = shapeA[shapeA.length - i2 - 1];\n if (a == null) {\n a = 1;\n }\n let b = shapeB[shapeB.length - i2 - 1];\n if (b == null) {\n b = 1;\n }\n if (a === 1) {\n result.unshift(b);\n } else if (b === 1) {\n result.unshift(a);\n } else if (a !== b) {\n const errMsg = `Operands could not be broadcast together with shapes ${shapeA} and ${shapeB}.`;\n throw Error(errMsg);\n } else {\n result.unshift(a);\n }\n }\n return result;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/browser.js\nvar browser_exports = {};\n__export(browser_exports, {\n fromPixels: () => fromPixels,\n fromPixelsAsync: () => fromPixelsAsync,\n toPixels: () => toPixels\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/tensor3d.js\nfunction tensor3d(values, shape, dtype) {\n assertNonNull(values);\n if (shape != null && shape.length !== 3) {\n throw new Error(\"tensor3d() requires shape to have three numbers\");\n }\n const inferredShape = inferShape(values, dtype);\n if (inferredShape.length !== 3 && inferredShape.length !== 1) {\n throw new Error(\"tensor3d() requires values to be number[][][] or flat/TypedArray\");\n }\n if (inferredShape.length === 1 && shape == null) {\n throw new Error(\"tensor3d() requires shape to be provided when `values` are a flat array\");\n }\n return makeTensor(values, shape, inferredShape, dtype);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/browser.js\nvar fromPixels2DContext;\nfunction fromPixels_(pixels, numChannels = 3) {\n if (numChannels > 4) {\n throw new Error(\"Cannot construct Tensor with more than 4 channels from pixels.\");\n }\n if (pixels == null) {\n throw new Error(\"pixels passed to tf.browser.fromPixels() can not be null\");\n }\n let isPixelData2 = false;\n let isImageData = false;\n let isVideo = false;\n let isImage = false;\n let isCanvasLike = false;\n let isImageBitmap = false;\n if (pixels.data instanceof Uint8Array) {\n isPixelData2 = true;\n } else if (typeof ImageData !== \"undefined\" && pixels instanceof ImageData) {\n isImageData = true;\n } else if (typeof HTMLVideoElement !== \"undefined\" && pixels instanceof HTMLVideoElement) {\n isVideo = true;\n } else if (typeof HTMLImageElement !== \"undefined\" && pixels instanceof HTMLImageElement) {\n isImage = true;\n } else if (pixels.getContext != null) {\n isCanvasLike = true;\n } else if (typeof ImageBitmap !== \"undefined\" && pixels instanceof ImageBitmap) {\n isImageBitmap = true;\n } else {\n throw new Error(`pixels passed to tf.browser.fromPixels() must be either an HTMLVideoElement, HTMLImageElement, HTMLCanvasElement, ImageData in browser, or OffscreenCanvas, ImageData in webworker or {data: Uint32Array, width: number, height: number}, but was ${pixels.constructor.name}`);\n }\n const kernel = getKernel(FromPixels, ENGINE.backendName);\n if (kernel != null) {\n const inputs = { pixels };\n const attrs = { numChannels };\n return ENGINE.runKernel(FromPixels, inputs, attrs);\n }\n const [width, height] = isVideo ? [\n pixels.videoWidth,\n pixels.videoHeight\n ] : [pixels.width, pixels.height];\n let vals;\n if (isCanvasLike) {\n vals = pixels.getContext(\"2d\").getImageData(0, 0, width, height).data;\n } else if (isImageData || isPixelData2) {\n vals = pixels.data;\n } else if (isImage || isVideo || isImageBitmap) {\n if (fromPixels2DContext == null) {\n if (typeof document === \"undefined\") {\n if (typeof OffscreenCanvas !== \"undefined\" && typeof OffscreenCanvasRenderingContext2D !== \"undefined\") {\n fromPixels2DContext = new OffscreenCanvas(1, 1).getContext(\"2d\");\n } else {\n throw new Error(\"Cannot parse input in current context. Reason: OffscreenCanvas Context2D rendering is not supported.\");\n }\n } else {\n fromPixels2DContext = document.createElement(\"canvas\").getContext(\"2d\", { willReadFrequently: true });\n }\n }\n fromPixels2DContext.canvas.width = width;\n fromPixels2DContext.canvas.height = height;\n fromPixels2DContext.drawImage(pixels, 0, 0, width, height);\n vals = fromPixels2DContext.getImageData(0, 0, width, height).data;\n }\n let values;\n if (numChannels === 4) {\n values = new Int32Array(vals);\n } else {\n const numPixels = width * height;\n values = new Int32Array(numPixels * numChannels);\n for (let i2 = 0; i2 < numPixels; i2++) {\n for (let channel = 0; channel < numChannels; ++channel) {\n values[i2 * numChannels + channel] = vals[i2 * 4 + channel];\n }\n }\n }\n const outShape = [height, width, numChannels];\n return tensor3d(values, outShape, \"int32\");\n}\nfunction isPixelData(pixels) {\n return pixels != null && pixels.data instanceof Uint8Array;\n}\nfunction isImageBitmapFullySupported() {\n return typeof window !== \"undefined\" && typeof ImageBitmap !== \"undefined\" && window.hasOwnProperty(\"createImageBitmap\");\n}\nfunction isNonEmptyPixels(pixels) {\n return pixels != null && pixels.width !== 0 && pixels.height !== 0;\n}\nfunction canWrapPixelsToImageBitmap(pixels) {\n return isImageBitmapFullySupported() && !(pixels instanceof ImageBitmap) && isNonEmptyPixels(pixels) && !isPixelData(pixels);\n}\nasync function fromPixelsAsync(pixels, numChannels = 3) {\n let inputs = null;\n if (env().getBool(\"WRAP_TO_IMAGEBITMAP\") && canWrapPixelsToImageBitmap(pixels)) {\n let imageBitmap;\n try {\n imageBitmap = await createImageBitmap(pixels, { premultiplyAlpha: \"none\" });\n } catch (e2) {\n imageBitmap = null;\n }\n if (imageBitmap != null && imageBitmap.width === pixels.width && imageBitmap.height === pixels.height) {\n inputs = imageBitmap;\n } else {\n inputs = pixels;\n }\n } else {\n inputs = pixels;\n }\n return fromPixels_(inputs, numChannels);\n}\nasync function toPixels(img, canvas) {\n let $img = convertToTensor(img, \"img\", \"toPixels\");\n if (!(img instanceof Tensor)) {\n const originalImgTensor = $img;\n $img = cast(originalImgTensor, \"int32\");\n originalImgTensor.dispose();\n }\n if ($img.rank !== 2 && $img.rank !== 3) {\n throw new Error(`toPixels only supports rank 2 or 3 tensors, got rank ${$img.rank}.`);\n }\n const [height, width] = $img.shape.slice(0, 2);\n const depth = $img.rank === 2 ? 1 : $img.shape[2];\n if (depth > 4 || depth === 2) {\n throw new Error(`toPixels only supports depth of size 1, 3 or 4 but got ${depth}`);\n }\n if ($img.dtype !== \"float32\" && $img.dtype !== \"int32\") {\n throw new Error(`Unsupported type for toPixels: ${$img.dtype}. Please use float32 or int32 tensors.`);\n }\n const data = await $img.data();\n const multiplier = $img.dtype === \"float32\" ? 255 : 1;\n const bytes = new Uint8ClampedArray(width * height * 4);\n for (let i2 = 0; i2 < height * width; ++i2) {\n const rgba = [0, 0, 0, 255];\n for (let d = 0; d < depth; d++) {\n const value = data[i2 * depth + d];\n if ($img.dtype === \"float32\") {\n if (value < 0 || value > 1) {\n throw new Error(`Tensor values for a float32 Tensor must be in the range [0 - 1] but encountered ${value}.`);\n }\n } else if ($img.dtype === \"int32\") {\n if (value < 0 || value > 255) {\n throw new Error(`Tensor values for a int32 Tensor must be in the range [0 - 255] but encountered ${value}.`);\n }\n }\n if (depth === 1) {\n rgba[0] = value * multiplier;\n rgba[1] = value * multiplier;\n rgba[2] = value * multiplier;\n } else {\n rgba[d] = value * multiplier;\n }\n }\n const j = i2 * 4;\n bytes[j + 0] = Math.round(rgba[0]);\n bytes[j + 1] = Math.round(rgba[1]);\n bytes[j + 2] = Math.round(rgba[2]);\n bytes[j + 3] = Math.round(rgba[3]);\n }\n if (canvas != null) {\n canvas.width = width;\n canvas.height = height;\n const ctx = canvas.getContext(\"2d\");\n const imageData = new ImageData(bytes, width, height);\n ctx.putImageData(imageData, 0, 0);\n }\n if ($img !== img) {\n $img.dispose();\n }\n return bytes;\n}\nvar fromPixels = op({ fromPixels_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/gather_nd_util.js\nvar gather_nd_util_exports = {};\n__export(gather_nd_util_exports, {\n prepareAndValidate: () => prepareAndValidate\n});\nfunction prepareAndValidate(tensor2, indices) {\n const tensorRank = tensor2.shape.length;\n const indicesRank = indices.shape.length;\n if (tensorRank < 1) {\n throw new Error(`tf.gatherND() expects the input to be rank 1 or higher, but the rank was ${tensorRank}.`);\n }\n if (indicesRank < 1) {\n throw new Error(`tf.gatherND() expects the indices to be rank 1 or higher, but the rank was ${indicesRank}.`);\n }\n if (indices.dtype !== \"int32\") {\n throw new Error(`tf.gatherND() expects the indices to be int32 type, but the dtype was ${indices.dtype}.`);\n }\n if (indices.shape[indicesRank - 1] > tensorRank) {\n throw new Error(`index innermost dimension length must be <= tensor rank; saw: ${indices.shape[indicesRank - 1]} vs. ${tensorRank}`);\n }\n if (sizeFromShape(tensor2.shape) === 0) {\n throw new Error(`Requested more than 0 entries, but input is empty. Input shape: ${tensor2.shape}.`);\n }\n const indicesShape = indices.shape;\n const sliceRank = indicesShape[indicesShape.length - 1];\n let nResult = 1;\n for (let i2 = 0; i2 < indicesShape.length - 1; ++i2) {\n nResult *= indicesShape[i2];\n }\n const inputShape = tensor2.shape;\n const resultShape = indicesShape.slice();\n resultShape.pop();\n let sliceSize = 1;\n for (let i2 = sliceRank; i2 < tensorRank; ++i2) {\n sliceSize *= inputShape[i2];\n resultShape.push(inputShape[i2]);\n }\n const strides = [\n ...computeStrides(tensor2.shape).map((stride) => stride / sliceSize),\n 1\n ].slice(0, sliceRank);\n return [resultShape, nResult, sliceSize, strides];\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/scatter_nd_util.js\nvar scatter_nd_util_exports = {};\n__export(scatter_nd_util_exports, {\n calculateShapes: () => calculateShapes,\n validateInput: () => validateInput,\n validateUpdateShape: () => validateUpdateShape\n});\nfunction validateUpdateShape(shape, indices, updates) {\n const sliceDim = indices.rank > 1 ? indices.shape[indices.rank - 1] : 1;\n const batchDim = indices.rank > 1 ? indices.rank - 1 : 1;\n const shapeError = `Must have updates.shape = indices.shape[:batchDim] + shape[sliceDim:], got updates.shape: ${updates.shape}, indices.shape: ${indices.shape}, shape: ${shape}, sliceDim: ${sliceDim}, and batchDim: ${batchDim}.`;\n if (updates.rank < batchDim) {\n throw new Error(shapeError + ` update.rank < ${batchDim}. `);\n }\n if (shape.length < sliceDim + (updates.rank - batchDim)) {\n throw new Error(shapeError + ` Output shape length < ${sliceDim + (updates.rank - batchDim)}`);\n }\n if (updates.rank !== batchDim + shape.length - sliceDim) {\n throw new Error(shapeError + ` update.rank != ${batchDim + shape.length - sliceDim}`);\n }\n for (let d = 0; d < batchDim; ++d) {\n if (updates.shape[d] !== indices.shape[d]) {\n throw new Error(shapeError + ` updates.shape[${d}] (${updates.shape[d]}) != indices.shape[${d}] (${indices.shape[d]}).`);\n }\n }\n for (let d = 0; d < updates.rank - batchDim; ++d) {\n if (updates.shape[d + batchDim] !== shape[d + sliceDim]) {\n throw new Error(shapeError + ` updates.shape[${d + batchDim}] (${updates.shape[d + batchDim]}) != shape[${d + batchDim}] (${shape[d + batchDim]})`);\n }\n }\n}\nfunction validateInput(updates, indices, shape) {\n if (indices.rank < 1) {\n throw new Error(`tf.scatterND() expects the indices to be rank 1 or higher, but the rank was ${indices.rank}.`);\n }\n if (updates.rank < 1) {\n throw new Error(`tf.scatterND() expects the updates to be rank 1 or higher, but the rank was ${updates.rank}.`);\n }\n if (indices.dtype !== \"int32\") {\n throw new Error(`The dtype of 'indices' should be int32, but got dtype: ${indices.dtype}`);\n }\n if (shape.length < 1) {\n throw new Error(`Output rank must be greater or equal to 1, but got shape: ${shape}`);\n }\n if (shape.length === 0) {\n if (indices.size === 0) {\n throw new Error(`Indices specified for empty output. indices shape: ${indices.shape}`);\n }\n if (updates.size === 0) {\n throw new Error(`Updates specified for empty output. updates shape: ${updates.shape}`);\n }\n }\n validateUpdateShape(shape, indices, updates);\n}\nfunction calculateShapes(updates, indices, shape) {\n const indicesRank = indices.shape.length;\n const sliceRank = indicesRank > 1 ? indices.shape[indicesRank - 1] : 1;\n const totalNd = shape.length;\n let sliceSize = 1;\n for (let i2 = sliceRank; i2 < totalNd; ++i2) {\n sliceSize *= shape[i2];\n }\n const safeSliceDim = sliceRank < 1 ? 1 : sliceRank;\n const numUpdates = sizeFromShape(indices.shape) / safeSliceDim;\n const strides = [...computeStrides(shape.slice(0, sliceRank)), 1];\n const outputSize = sizeFromShape(shape);\n return { sliceRank, numUpdates, sliceSize, strides, outputSize };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/slice_util.js\nvar slice_util_exports = {};\n__export(slice_util_exports, {\n assertParamsValid: () => assertParamsValid,\n computeFlatOffset: () => computeFlatOffset,\n computeOutShape: () => computeOutShape,\n getNormalizedAxes: () => getNormalizedAxes,\n isSliceContinous: () => isSliceContinous,\n maskToAxes: () => maskToAxes,\n parseSliceParams: () => parseSliceParams,\n sliceInfo: () => sliceInfo,\n startForAxis: () => startForAxis,\n startIndicesWithElidedDims: () => startIndicesWithElidedDims,\n stopForAxis: () => stopForAxis,\n stopIndicesWithElidedDims: () => stopIndicesWithElidedDims,\n stridesForAxis: () => stridesForAxis,\n stridesWithElidedDims: () => stridesWithElidedDims\n});\nvar NEW_AXIS = -2;\nvar SHRINK_AXIS = -1;\nfunction assertParamsValid(input2, begin, size) {\n const inputRank = input2.shape.length;\n assert(inputRank === begin.length, () => `Error in slice${inputRank}D: Length of begin ${begin} must match the rank of the array (${inputRank}).`);\n assert(inputRank === size.length, () => `Error in slice${inputRank}D: Length of size ${size} must match the rank of the array (${inputRank}).`);\n for (let i2 = 0; i2 < inputRank; ++i2) {\n assert(begin[i2] + size[i2] <= input2.shape[i2], () => `Error in slice${inputRank}D: begin[${i2}] + size[${i2}] (${begin[i2] + size[i2]}) would overflow input.shape[${i2}] (${input2.shape[i2]})`);\n }\n}\nfunction maskToAxes(mask) {\n const axes = [];\n let axis = 0;\n while (mask > 0) {\n if (mask & 1) {\n axes.push(axis);\n }\n mask /= 2;\n axis++;\n }\n return axes;\n}\nfunction computeOutShape(begin, end, strides) {\n const size = [];\n for (let axis = 0; axis < begin.length; axis++) {\n size[axis] = Math.ceil((end[axis] - begin[axis]) / strides[axis]);\n }\n return size;\n}\nfunction stridesWithElidedDims(strides, ellipsisInsertionIndex, numElidedAxes, inputShape) {\n const newStrides = [...strides];\n for (let i2 = newStrides.length; i2 < inputShape.length; i2++) {\n newStrides.push(1);\n }\n for (let i2 = 0; i2 < numElidedAxes; i2++) {\n if (i2 === 0) {\n newStrides[ellipsisInsertionIndex] = 1;\n } else {\n newStrides.splice(ellipsisInsertionIndex, 0, 1);\n newStrides.pop();\n }\n }\n return newStrides;\n}\nfunction unnormalizeAxis(ellipsisInsertionIndex, numElidedAxes, normalizedAxis) {\n if (normalizedAxis <= ellipsisInsertionIndex) {\n return normalizedAxis;\n }\n return normalizedAxis - (numElidedAxes - 1);\n}\nfunction getElidedAxes(numElidedAxes, ellipsisInsertionIndex) {\n const elidedAxes = [];\n for (let i2 = 0; i2 < numElidedAxes; i2++) {\n elidedAxes.push(ellipsisInsertionIndex + i2);\n }\n return elidedAxes;\n}\nfunction getNormalizedAxes(inputShape, ellipsisAxes, numInterpolatedAxes, begin, end, strides, beginMask, endMask, ellipsisMask) {\n const inputRank = inputShape.length;\n let normalizedBegin = new Array(inputRank), normalizedEnd = new Array(inputRank), normalizedStrides = new Array(inputRank);\n if (ellipsisAxes.length && numInterpolatedAxes > 0) {\n const fullIndex = ellipsisAxes[0];\n const numElidedAxes = numInterpolatedAxes + 1;\n normalizedBegin = startIndicesWithElidedDims(beginMask, fullIndex, numElidedAxes, begin, inputShape);\n normalizedEnd = stopIndicesWithElidedDims(endMask, fullIndex, numElidedAxes, end, inputShape);\n normalizedStrides = stridesWithElidedDims(strides, fullIndex, numElidedAxes, inputShape);\n } else {\n for (let axis = 0; axis < inputRank; axis++) {\n normalizedBegin[axis] = startForAxis(beginMask, begin, strides, inputShape, axis, ellipsisMask);\n normalizedEnd[axis] = stopForAxis(endMask, end, strides, inputShape, axis, ellipsisMask);\n normalizedStrides[axis] = stridesForAxis(strides, axis, ellipsisMask);\n }\n }\n return {\n begin: normalizedBegin,\n end: normalizedEnd,\n strides: normalizedStrides\n };\n}\nfunction startIndicesWithElidedDims(beginMask, ellipsisInsertionIndex, numElidedAxes, originalBegin, inputShape) {\n const newIndices = [...inputShape];\n const elidedAxes = getElidedAxes(numElidedAxes, ellipsisInsertionIndex);\n for (let axis = 0; axis < newIndices.length; axis++) {\n if (elidedAxes.indexOf(axis) > -1) {\n newIndices[axis] = 0;\n } else {\n const originalAxis = unnormalizeAxis(ellipsisInsertionIndex, numElidedAxes, axis);\n let originalValue = originalBegin[originalAxis];\n if (beginMask & 1 << originalAxis) {\n originalValue = 0;\n }\n newIndices[axis] = originalValue;\n }\n }\n return newIndices;\n}\nfunction stopIndicesWithElidedDims(endMask, ellipsisInsertionIndex, numElidedAxes, originalEnd, inputShape) {\n const newIndices = [...inputShape];\n const elidedAxes = getElidedAxes(numElidedAxes, ellipsisInsertionIndex);\n for (let axis = 0; axis < newIndices.length; axis++) {\n if (elidedAxes.indexOf(axis) > -1) {\n newIndices[axis] = Number.MAX_SAFE_INTEGER;\n } else {\n const originalAxis = unnormalizeAxis(ellipsisInsertionIndex, numElidedAxes, axis);\n let originalValue = originalEnd[originalAxis];\n if (endMask & 1 << originalAxis) {\n originalValue = Number.MAX_SAFE_INTEGER;\n }\n newIndices[axis] = originalValue;\n }\n }\n for (let i2 = 0; i2 < newIndices.length; i2++) {\n const axisSize = inputShape[i2];\n if (newIndices[i2] < 0) {\n newIndices[i2] += axisSize;\n }\n newIndices[i2] = clamp(0, newIndices[i2], inputShape[i2]);\n }\n return newIndices;\n}\nfunction stridesForAxis(strides, axis, ellipsisMask) {\n let stride = strides[axis];\n if (ellipsisMask & 1 << axis || stride == null) {\n stride = 1;\n }\n return stride;\n}\nfunction startForAxis(beginMask, startIndices, strides, inputShape, axis, ellipsisMask) {\n let start = startIndices[axis];\n const stride = strides[axis] || 1;\n if (beginMask & 1 << axis || ellipsisMask & 1 << axis || start == null) {\n if (stride > 0) {\n start = Number.MIN_SAFE_INTEGER;\n } else {\n start = Number.MAX_SAFE_INTEGER;\n }\n }\n const axisSize = inputShape[axis];\n if (start < 0) {\n start += axisSize;\n }\n start = clamp(0, start, axisSize - 1);\n return start;\n}\nfunction stopForAxis(endMask, stopIndices, strides, inputShape, axis, ellipsisMask) {\n let stop = stopIndices[axis];\n const stride = strides[axis] || 1;\n if (endMask & 1 << axis || ellipsisMask & 1 << axis || stop == null) {\n if (stride > 0) {\n stop = Number.MAX_SAFE_INTEGER;\n } else {\n stop = Number.MIN_SAFE_INTEGER;\n }\n }\n const axisSize = inputShape[axis];\n if (stop < 0) {\n stop += axisSize;\n }\n if (stride > 0) {\n stop = clamp(0, stop, axisSize);\n } else {\n stop = clamp(-1, stop, axisSize - 1);\n }\n return stop;\n}\nfunction isSliceContinous(shape, begin, size) {\n let firstNonOneAxis = size.length;\n for (let i2 = 0; i2 < size.length; i2++) {\n if (size[i2] > 1) {\n firstNonOneAxis = i2;\n break;\n }\n }\n for (let i2 = firstNonOneAxis + 1; i2 < size.length; i2++) {\n if (begin[i2] > 0 || size[i2] !== shape[i2]) {\n return false;\n }\n }\n return true;\n}\nfunction computeFlatOffset(begin, strides) {\n let flatOffset = begin.length > 0 ? begin[begin.length - 1] : 1;\n for (let i2 = 0; i2 < begin.length - 1; i2++) {\n flatOffset += begin[i2] * strides[i2];\n }\n return flatOffset;\n}\nfunction parseSliceParams(x, begin, size) {\n let begin_;\n const xRank = x.shape.length;\n if (typeof begin === \"number\") {\n begin_ = [begin, ...new Array(xRank - 1).fill(0)];\n } else if (begin.length < xRank) {\n begin_ = begin.concat(new Array(xRank - begin.length).fill(0));\n } else {\n begin_ = begin.slice();\n }\n begin_.forEach((d) => {\n assert(d !== -1, () => \"slice() does not support negative begin indexing.\");\n });\n let size_;\n if (size == null) {\n size_ = new Array(xRank).fill(-1);\n } else if (typeof size === \"number\") {\n size_ = [size, ...new Array(xRank - 1).fill(-1)];\n } else if (size.length < xRank) {\n size_ = size.concat(new Array(xRank - size.length).fill(-1));\n } else {\n size_ = size;\n }\n size_ = size_.map((d, i2) => {\n if (d >= 0) {\n return d;\n } else {\n assert(d === -1, () => `Negative size values should be exactly -1 but got ${d} for the slice() size at index ${i2}.`);\n return x.shape[i2] - begin_[i2];\n }\n });\n return [begin_, size_];\n}\nfunction sliceInfo(xShape, begin, end, strides, beginMask, endMask, ellipsisMask, newAxisMask, shrinkAxisMask) {\n let stridesNonNull;\n if (strides == null) {\n stridesNonNull = new Array(begin.length);\n stridesNonNull.fill(1);\n } else {\n stridesNonNull = strides;\n }\n if (ellipsisMask != null && (ellipsisMask & ellipsisMask - 1) !== 0) {\n throw new Error(\"Multiple ellipses in slice is not allowed.\");\n }\n let ellipsisSeen = false;\n const sparseSpec = {\n dims: stridesNonNull.length,\n numAddAxisAfterEllipsis: 0,\n begin: begin.slice(),\n end: end.slice(),\n strides: stridesNonNull.slice(),\n beginMask,\n endMask,\n ellipsisMask,\n newAxisMask,\n shrinkAxisMask\n };\n for (let i2 = 0; i2 < sparseSpec.dims; i2++) {\n if (ellipsisSeen && (1 << i2 & newAxisMask) !== 0) {\n sparseSpec.numAddAxisAfterEllipsis++;\n }\n if (1 << i2 & ellipsisMask) {\n ellipsisSeen = true;\n }\n }\n if (!ellipsisSeen) {\n sparseSpec.ellipsisMask |= 1 << sparseSpec.dims;\n sparseSpec.dims++;\n }\n const denseSpec = {\n dims: xShape.length,\n beginMask: 0,\n endMask: 0,\n beginValid: false,\n endValid: false\n };\n buildDenseSpec(sparseSpec, denseSpec);\n let isIdentity = true;\n let sliceDim0 = true;\n let isSimpleSlice = true;\n const processingShape = [];\n const finalShape = [];\n for (let i2 = 0; i2 < xShape.length; ++i2) {\n if (denseSpec.strides[i2] === 0) {\n throw Error(`strides[${i2}] must be non-zero`);\n }\n const shrinkI = !!(denseSpec.shrinkAxisMask & 1 << i2);\n const dimI = xShape[i2];\n if (dimI === -1) {\n processingShape.push(shrinkI ? 1 : -1);\n continue;\n }\n const masks = [denseSpec.beginMask & 1 << i2, denseSpec.endMask & 1 << i2];\n const validRange = [\n denseSpec.strides[i2] > 0 ? 0 : -1,\n denseSpec.strides[i2] > 0 ? dimI : dimI - 1\n ];\n if (shrinkI && denseSpec.strides[i2] <= 0) {\n throw Error(\"only stride 1 allowed on non-range indexing.\");\n }\n isSimpleSlice = isSimpleSlice && denseSpec.strides[i2] === 1;\n const beginAndEndMasked = !!(denseSpec.beginMask & 1 << i2 && denseSpec.endMask & 1 << i2);\n if (denseSpec.beginValid && denseSpec.endValid) {\n if (shrinkI) {\n const xFwd = denseSpec.begin[i2] < 0 ? dimI + denseSpec.begin[i2] : denseSpec.begin[i2];\n denseSpec.begin[i2] = xFwd;\n denseSpec.end[i2] = denseSpec.begin[i2] + 1;\n if (xFwd < 0 || xFwd >= dimI) {\n throw Error(`slice index ${denseSpec.begin[i2]} of dimension ${i2} out of bounds.`);\n }\n } else {\n denseSpec.begin[i2] = canonical(denseSpec.begin[i2], 0, denseSpec.strides[i2], dimI, masks, validRange);\n denseSpec.end[i2] = canonical(denseSpec.end[i2], 1, denseSpec.strides[i2], dimI, masks, validRange);\n }\n const takeAllInDimension = denseSpec.strides[i2] === 1 && denseSpec.begin[i2] === 0 && denseSpec.end[i2] === dimI;\n isIdentity = isIdentity && takeAllInDimension;\n sliceDim0 = sliceDim0 && (i2 === 0 && denseSpec.strides[i2] === 1 || takeAllInDimension);\n } else {\n isIdentity = isIdentity && (denseSpec.strides[i2] === 1 && beginAndEndMasked);\n sliceDim0 = sliceDim0 && (i2 === 0 && denseSpec.strides[i2] === 1 || beginAndEndMasked);\n }\n let intervalLength;\n let knownInterval = false;\n if (denseSpec.beginValid && denseSpec.endValid) {\n intervalLength = denseSpec.end[i2] - denseSpec.begin[i2];\n knownInterval = true;\n } else if (shrinkI) {\n intervalLength = 1;\n knownInterval = true;\n } else if (beginAndEndMasked) {\n if (dimI >= 0) {\n if (denseSpec.strides[i2] < 0) {\n intervalLength = -dimI;\n } else {\n intervalLength = dimI;\n }\n knownInterval = true;\n }\n }\n if (knownInterval) {\n let sizeI;\n if (intervalLength === 0 || intervalLength < 0 !== denseSpec.strides[i2] < 0) {\n sizeI = 0;\n } else {\n sizeI = Math.trunc(intervalLength / denseSpec.strides[i2]) + (intervalLength % denseSpec.strides[i2] !== 0 ? 1 : 0);\n }\n processingShape.push(sizeI);\n } else {\n processingShape.push(-1);\n }\n }\n for (let denseDim = 0; denseDim < denseSpec.finalShapeGatherIndices.length; ++denseDim) {\n const gatherIndex = denseSpec.finalShapeGatherIndices[denseDim];\n if (gatherIndex >= 0) {\n finalShape.push(processingShape[gatherIndex]);\n } else if (gatherIndex === NEW_AXIS) {\n finalShape.push(1);\n }\n }\n const finalShapeSparse = finalShape.filter((dim, i2) => denseSpec.finalShapeGatherIndices[i2] !== NEW_AXIS);\n return {\n finalShapeSparse,\n finalShape,\n isIdentity,\n sliceDim0,\n isSimpleSlice,\n begin: denseSpec.begin,\n end: denseSpec.end,\n strides: denseSpec.strides\n };\n}\nfunction buildDenseSpec(sparse2, dense2) {\n dense2.beginMask = 0;\n dense2.endMask = 0;\n dense2.shrinkAxisMask = 0;\n let fullIndex = 0;\n dense2.beginValid = sparse2.begin != null;\n dense2.endValid = sparse2.end != null;\n dense2.begin = new Array(dense2.dims);\n dense2.end = new Array(dense2.dims);\n dense2.strides = new Array(dense2.dims);\n dense2.finalShapeGatherIndices = [];\n dense2.finalShapeGatherIndicesSparse = [];\n dense2.inputShapeGatherIndicesSparse = new Array(dense2.dims);\n for (let i2 = 0; i2 < sparse2.dims; i2++) {\n if (1 << i2 & sparse2.ellipsisMask) {\n const nextIndex = Math.min(dense2.dims - (sparse2.dims - i2) + 1 + sparse2.numAddAxisAfterEllipsis, dense2.dims);\n for (; fullIndex < nextIndex; fullIndex++) {\n dense2.begin[fullIndex] = 0;\n dense2.end[fullIndex] = 0;\n dense2.strides[fullIndex] = 1;\n dense2.beginMask |= 1 << fullIndex;\n dense2.endMask |= 1 << fullIndex;\n dense2.finalShapeGatherIndices.push(fullIndex);\n dense2.finalShapeGatherIndicesSparse.push(-1);\n dense2.inputShapeGatherIndicesSparse[fullIndex] = i2;\n }\n } else if (1 << i2 & sparse2.newAxisMask) {\n dense2.finalShapeGatherIndices.push(NEW_AXIS);\n dense2.finalShapeGatherIndicesSparse.push(-1);\n } else {\n if (fullIndex === dense2.begin.length) {\n throw Error(`Index out of range using input dim ${fullIndex}; input has only ${dense2.dims} dims, ${dense2.begin.length}.`);\n }\n if (sparse2.begin != null) {\n dense2.begin[fullIndex] = sparse2.begin[i2];\n }\n if (sparse2.end != null) {\n dense2.end[fullIndex] = sparse2.end[i2];\n }\n dense2.strides[fullIndex] = sparse2.strides[i2];\n if (sparse2.beginMask & 1 << i2) {\n dense2.beginMask |= 1 << fullIndex;\n }\n if (sparse2.endMask & 1 << i2) {\n dense2.endMask |= 1 << fullIndex;\n }\n if (sparse2.shrinkAxisMask & 1 << i2) {\n dense2.finalShapeGatherIndices.push(SHRINK_AXIS);\n dense2.finalShapeGatherIndicesSparse.push(-1);\n dense2.shrinkAxisMask |= 1 << fullIndex;\n } else {\n dense2.finalShapeGatherIndices.push(fullIndex);\n dense2.finalShapeGatherIndicesSparse.push(i2);\n }\n dense2.inputShapeGatherIndicesSparse[fullIndex] = i2;\n fullIndex++;\n }\n }\n}\nfunction canonical(x, c, strideI, dimI, masks, validRange) {\n if (masks[c]) {\n return strideI > 0 ? validRange[c] : validRange[c + 1 & 1];\n } else {\n const xFwd = x < 0 ? dimI + x : x;\n return xFwd < validRange[0] ? validRange[0] : xFwd > validRange[1] ? validRange[1] : xFwd;\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/serialization.js\nvar serialization_exports = {};\n__export(serialization_exports, {\n Serializable: () => Serializable,\n SerializationMap: () => SerializationMap,\n registerClass: () => registerClass\n});\nvar Serializable = class {\n getClassName() {\n return this.constructor.className;\n }\n static fromConfig(cls, config) {\n return new cls(config);\n }\n};\nvar SerializationMap = class {\n constructor() {\n this.classNameMap = {};\n }\n static getMap() {\n if (SerializationMap.instance == null) {\n SerializationMap.instance = new SerializationMap();\n }\n return SerializationMap.instance;\n }\n static register(cls) {\n SerializationMap.getMap().classNameMap[cls.className] = [cls, cls.fromConfig];\n }\n};\nfunction registerClass(cls) {\n assert(cls.className != null, () => `Class being registered does not have the static className property defined.`);\n assert(typeof cls.className === \"string\", () => `className is required to be a string, but got type ` + typeof cls.className);\n assert(cls.className.length > 0, () => `Class being registered has an empty-string as its className, which is disallowed.`);\n SerializationMap.register(cls);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/test_util.js\nvar test_util_exports = {};\n__export(test_util_exports, {\n TEST_EPSILON_FLOAT16: () => TEST_EPSILON_FLOAT16,\n createVideoElement: () => createVideoElement,\n encodeStrings: () => encodeStrings,\n expectArrayBuffersEqual: () => expectArrayBuffersEqual,\n expectArraysClose: () => expectArraysClose,\n expectArraysEqual: () => expectArraysEqual,\n expectNumbersClose: () => expectNumbersClose,\n expectPromiseToFail: () => expectPromiseToFail,\n expectValuesInRange: () => expectValuesInRange,\n play: () => play,\n testEpsilon: () => testEpsilon\n});\nvar TEST_EPSILON_FLOAT32 = 1e-3;\nvar TEST_EPSILON_FLOAT16 = 0.1;\nfunction expectArraysClose(actual, expected, epsilon3) {\n if (epsilon3 == null) {\n epsilon3 = testEpsilon();\n }\n return expectArraysPredicate(actual, expected, (a, b) => areClose(a, b, epsilon3));\n}\nfunction testEpsilon() {\n return ENGINE.backend.floatPrecision() === 32 ? TEST_EPSILON_FLOAT32 : TEST_EPSILON_FLOAT16;\n}\nfunction expectArraysPredicate(actual, expected, predicate) {\n let checkClassType = true;\n if (isTypedArray(actual) || isTypedArray(expected)) {\n checkClassType = false;\n }\n if (isTypedArray(actual) && isTypedArray(expected)) {\n checkClassType = true;\n }\n if (checkClassType) {\n const aType = actual.constructor.name;\n const bType = expected.constructor.name;\n if (aType !== bType) {\n throw new Error(`Arrays are of different type. Actual: ${aType}. Expected: ${bType}`);\n }\n }\n if (Array.isArray(actual) && Array.isArray(expected)) {\n const actualShape = inferShape(actual);\n const expectedShape = inferShape(expected);\n if (!arraysEqual(actualShape, expectedShape)) {\n throw new Error(`Arrays have different shapes. Actual: [${actualShape}]. Expected: [${expectedShape}]`);\n }\n }\n const actualFlat = isTypedArray(actual) ? actual : flatten(actual);\n const expectedFlat = isTypedArray(expected) ? expected : flatten(expected);\n if (actualFlat.length !== expectedFlat.length) {\n throw new Error(`Arrays have different lengths actual: ${actualFlat.length} vs expected: ${expectedFlat.length}.\nActual: ${actualFlat}.\nExpected: ${expectedFlat}.`);\n }\n for (let i2 = 0; i2 < expectedFlat.length; ++i2) {\n const a = actualFlat[i2];\n const e2 = expectedFlat[i2];\n if (!predicate(a, e2)) {\n throw new Error(`Arrays differ: actual[${i2}] = ${a}, expected[${i2}] = ${e2}.\nActual: ${actualFlat}.\nExpected: ${expectedFlat}.`);\n }\n }\n if (typeof expect !== \"undefined\") {\n expect().nothing();\n }\n}\nfunction expectPromiseToFail(fn, done) {\n fn().then(() => done.fail(), () => done());\n if (typeof expect !== \"undefined\") {\n expect().nothing();\n }\n}\nfunction expectArraysEqual(actual, expected) {\n const exp5 = typeof expected === \"string\" || typeof expected === \"number\" || typeof expected === \"boolean\" ? [expected] : expected;\n if (isString(actual) || isString(actual[0]) || isString(expected) || isString(expected[0])) {\n return expectArraysPredicate(actual, exp5, (a, b) => a == b);\n }\n return expectArraysPredicate(actual, expected, (a, b) => areClose(a, b, 0));\n}\nfunction expectNumbersClose(a, e2, epsilon3) {\n if (epsilon3 == null) {\n epsilon3 = testEpsilon();\n }\n if (!areClose(a, e2, epsilon3)) {\n throw new Error(`Numbers differ: actual === ${a}, expected === ${e2}`);\n }\n if (typeof expect !== \"undefined\") {\n expect().nothing();\n }\n}\nfunction areClose(a, e2, epsilon3) {\n if (!isFinite(a) && !isFinite(e2)) {\n return true;\n }\n if (isNaN(a) || isNaN(e2) || Math.abs(a - e2) > epsilon3) {\n return false;\n }\n return true;\n}\nfunction expectValuesInRange(actual, low, high) {\n for (let i2 = 0; i2 < actual.length; i2++) {\n if (actual[i2] < low || actual[i2] > high) {\n throw new Error(`Value out of range:${actual[i2]} low: ${low}, high: ${high}`);\n }\n }\n}\nfunction expectArrayBuffersEqual(actual, expected) {\n const actualArray = new Float32Array(actual);\n const expectedArray = new Float32Array(expected);\n if (actualArray.length !== expectedArray.length) {\n throw new Error(`Expected ArrayBuffer to be of length ${expectedArray.length}, but it was ${actualArray.length}`);\n }\n for (let i2 = 0; i2 < expectedArray.length; i2++) {\n if (actualArray[i2] !== expectedArray[i2]) {\n throw new Error(`Expected ArrayBuffer value at ${i2} to be ${expectedArray[i2]} but got ${actualArray[i2]} instead`);\n }\n }\n}\nfunction encodeStrings(a) {\n for (let i2 = 0; i2 < a.length; i2++) {\n const val = a[i2];\n if (Array.isArray(val)) {\n encodeStrings(val);\n } else {\n a[i2] = encodeString(val);\n }\n }\n return a;\n}\nfunction createVideoElement(source) {\n const video = document.createElement(\"video\");\n if (\"playsInline\" in video) {\n video.playsInline = true;\n }\n video.muted = true;\n video.loop = true;\n video.style.position = \"fixed\";\n video.style.left = \"0px\";\n video.style.top = \"0px\";\n video.preload = \"auto\";\n video.appendChild(source);\n return new Promise((resolve) => {\n video.addEventListener(\"loadeddata\", (_) => resolve(video));\n video.load();\n });\n}\nasync function play(video) {\n await video.play();\n if (\"requestVideoFrameCallback\" in video) {\n await new Promise((resolve) => {\n video.requestVideoFrameCallback(resolve);\n });\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/version.js\nvar version = \"3.21.0\";\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/add.js\nfunction add_(a, b) {\n let $a = convertToTensor(a, \"a\", \"add\");\n let $b = convertToTensor(b, \"b\", \"add\");\n [$a, $b] = makeTypesMatch($a, $b);\n const inputs = { a: $a, b: $b };\n return ENGINE.runKernel(Add, inputs);\n}\nvar add2 = op({ add_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/floorDiv.js\nfunction floorDiv_(a, b) {\n let $a = convertToTensor(a, \"a\", \"floorDiv\");\n let $b = convertToTensor(b, \"b\", \"floorDiv\");\n [$a, $b] = makeTypesMatch($a, $b);\n const inputs = { a: $a, b: $b };\n return ENGINE.runKernel(FloorDiv, inputs);\n}\nvar floorDiv = op({ floorDiv_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/div.js\nfunction div_(a, b) {\n let $a = convertToTensor(a, \"a\", \"div\");\n let $b = convertToTensor(b, \"b\", \"div\");\n [$a, $b] = makeTypesMatch($a, $b);\n if ($a.dtype === \"int32\" && $b.dtype === \"int32\") {\n return floorDiv($a, $b);\n }\n const inputs = { a: $a, b: $b };\n const attrs = {};\n return ENGINE.runKernel(RealDiv, inputs, attrs);\n}\nvar div = op({ div_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/mul.js\nfunction mul_(a, b) {\n let $a = convertToTensor(a, \"a\", \"mul\");\n let $b = convertToTensor(b, \"b\", \"mul\");\n [$a, $b] = makeTypesMatch($a, $b);\n const inputs = { a: $a, b: $b };\n return ENGINE.runKernel(Multiply, inputs);\n}\nvar mul = op({ mul_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/abs.js\nfunction abs_(x) {\n const $x = convertToTensor(x, \"x\", \"abs\");\n if ($x.dtype === \"complex64\") {\n const inputs = { x: $x };\n return ENGINE.runKernel(ComplexAbs, inputs);\n } else {\n const inputs = { x: $x };\n return ENGINE.runKernel(Abs, inputs);\n }\n}\nvar abs = op({ abs_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/acos.js\nfunction acos_(x) {\n const $x = convertToTensor(x, \"x\", \"acos\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Acos, inputs);\n}\nvar acos = op({ acos_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/acosh.js\nfunction acosh_(x) {\n const $x = convertToTensor(x, \"x\", \"acosh\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Acosh, inputs);\n}\nvar acosh = op({ acosh_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/add_n.js\nfunction addN_(tensors) {\n assert(Array.isArray(tensors), () => \"The argument passed to tf.addN() must be a list of tensors\");\n assert(tensors.length >= 1, () => `Must pass at least one tensor to tf.addN(), but got ${tensors.length}`);\n const $tensors = tensors.map((t2, i2) => convertToTensor(t2, `tensors${i2}`, \"addN\"));\n const firstTensor = $tensors[0];\n $tensors.forEach((t2) => {\n if (t2.dtype !== firstTensor.dtype) {\n throw new Error(\"All tensors passed to tf.addN() must have the same dtype\");\n }\n });\n $tensors.forEach((t2) => {\n if (!arraysEqual(t2.shape, firstTensor.shape)) {\n throw new Error(\"All tensors passed to tf.addN() must have the same shape\");\n }\n });\n const inputs = $tensors;\n return ENGINE.runKernel(AddN, inputs);\n}\nvar addN = op({ addN_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/all.js\nfunction all_(x, axis = null, keepDims = false) {\n const $x = convertToTensor(x, \"x\", \"all\", \"bool\");\n const inputs = { x: $x };\n const attrs = { axis, keepDims };\n return ENGINE.runKernel(All, inputs, attrs);\n}\nvar all = op({ all_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/any.js\nfunction any_(x, axis = null, keepDims = false) {\n const $x = convertToTensor(x, \"x\", \"any\", \"bool\");\n const inputs = { x: $x };\n const attrs = { axis, keepDims };\n return ENGINE.runKernel(Any, inputs, attrs);\n}\nvar any = op({ any_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/arg_max.js\nfunction argMax_(x, axis = 0) {\n const $x = convertToTensor(x, \"x\", \"argMax\");\n const inputs = { x: $x };\n const attrs = { axis };\n return ENGINE.runKernel(ArgMax, inputs, attrs);\n}\nvar argMax = op({ argMax_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/arg_min.js\nfunction argMin_(x, axis = 0) {\n const $x = convertToTensor(x, \"x\", \"argMin\");\n const inputs = { x: $x };\n const attrs = { axis };\n return ENGINE.runKernel(ArgMin, inputs, attrs);\n}\nvar argMin = op({ argMin_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/asin.js\nfunction asin_(x) {\n const $x = convertToTensor(x, \"x\", \"asin\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Asin, inputs);\n}\nvar asin = op({ asin_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/asinh.js\nfunction asinh_(x) {\n const $x = convertToTensor(x, \"x\", \"asinh\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Asinh, inputs);\n}\nvar asinh = op({ asinh_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/atan.js\nfunction atan_(x) {\n const $x = convertToTensor(x, \"x\", \"atan\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Atan, inputs);\n}\nvar atan = op({ atan_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/atan2.js\nfunction atan2_(a, b) {\n let $a = convertToTensor(a, \"a\", \"atan2\");\n let $b = convertToTensor(b, \"b\", \"atan2\");\n [$a, $b] = makeTypesMatch($a, $b);\n const inputs = { a: $a, b: $b };\n return ENGINE.runKernel(Atan2, inputs);\n}\nvar atan2 = op({ atan2_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/atanh.js\nfunction atanh_(x) {\n const $x = convertToTensor(x, \"x\", \"atanh\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Atanh, inputs);\n}\nvar atanh = op({ atanh_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/conv_util.js\nfunction computeDilation2DInfo(inputShape, filterShape, strides, pad3, dataFormat = \"NHWC\", dilations) {\n const inputChannels = inputShape[3];\n const $filterShape = [...filterShape, inputChannels];\n const $dataFormat = convertConv2DDataFormat(dataFormat);\n return computeConv2DInfo(inputShape, $filterShape, strides, dilations, pad3, null, null, $dataFormat);\n}\nfunction computePool2DInfo(inShape, filterSize, strides, dilations, pad3, roundingMode, dataFormat = \"channelsLast\") {\n const [filterHeight, filterWidth] = parseTupleParam(filterSize);\n let filterShape;\n if (dataFormat === \"channelsLast\") {\n filterShape = [filterHeight, filterWidth, inShape[3], inShape[3]];\n } else if (dataFormat === \"channelsFirst\") {\n filterShape = [filterHeight, filterWidth, inShape[1], inShape[1]];\n } else {\n throw new Error(`Unknown dataFormat ${dataFormat}`);\n }\n return computeConv2DInfo(inShape, filterShape, strides, dilations, pad3, roundingMode, false, dataFormat);\n}\nfunction computePool3DInfo(inShape, filterSize, strides, dilations, pad3, roundingMode, dataFormat = \"NDHWC\") {\n const [filterDepth, filterHeight, filterWidth] = parse3TupleParam(filterSize);\n let filterShape;\n let $dataFormat;\n if (dataFormat === \"NDHWC\") {\n $dataFormat = \"channelsLast\";\n filterShape = [filterDepth, filterHeight, filterWidth, inShape[4], inShape[4]];\n } else if (dataFormat === \"NCDHW\") {\n $dataFormat = \"channelsFirst\";\n filterShape = [filterDepth, filterHeight, filterWidth, inShape[1], inShape[1]];\n } else {\n throw new Error(`Unknown dataFormat ${dataFormat}`);\n }\n return computeConv3DInfo(inShape, filterShape, strides, dilations, pad3, false, $dataFormat, roundingMode);\n}\nfunction computeConv2DInfo(inShape, filterShape, strides, dilations, pad3, roundingMode, depthwise = false, dataFormat = \"channelsLast\") {\n let [batchSize, inHeight, inWidth, inChannels] = [-1, -1, -1, -1];\n if (dataFormat === \"channelsLast\") {\n [batchSize, inHeight, inWidth, inChannels] = inShape;\n } else if (dataFormat === \"channelsFirst\") {\n [batchSize, inChannels, inHeight, inWidth] = inShape;\n } else {\n throw new Error(`Unknown dataFormat ${dataFormat}`);\n }\n const [filterHeight, filterWidth, , filterChannels] = filterShape;\n const [strideHeight, strideWidth] = parseTupleParam(strides);\n const [dilationHeight, dilationWidth] = parseTupleParam(dilations);\n const effectiveFilterHeight = getEffectiveFilterSize(filterHeight, dilationHeight);\n const effectiveFilterWidth = getEffectiveFilterSize(filterWidth, dilationWidth);\n const { padInfo, outHeight, outWidth } = getPadAndOutInfo(pad3, inHeight, inWidth, strideHeight, strideWidth, effectiveFilterHeight, effectiveFilterWidth, roundingMode, dataFormat);\n const outChannels = depthwise ? filterChannels * inChannels : filterChannels;\n let outShape;\n if (dataFormat === \"channelsFirst\") {\n outShape = [batchSize, outChannels, outHeight, outWidth];\n } else if (dataFormat === \"channelsLast\") {\n outShape = [batchSize, outHeight, outWidth, outChannels];\n }\n return {\n batchSize,\n dataFormat,\n inHeight,\n inWidth,\n inChannels,\n outHeight,\n outWidth,\n outChannels,\n padInfo,\n strideHeight,\n strideWidth,\n filterHeight,\n filterWidth,\n effectiveFilterHeight,\n effectiveFilterWidth,\n dilationHeight,\n dilationWidth,\n inShape,\n outShape,\n filterShape\n };\n}\nfunction computeConv3DInfo(inShape, filterShape, strides, dilations, pad3, depthwise = false, dataFormat = \"channelsLast\", roundingMode) {\n let [batchSize, inDepth, inHeight, inWidth, inChannels] = [-1, -1, -1, -1, -1];\n if (dataFormat === \"channelsLast\") {\n [batchSize, inDepth, inHeight, inWidth, inChannels] = inShape;\n } else if (dataFormat === \"channelsFirst\") {\n [batchSize, inChannels, inDepth, inHeight, inWidth] = inShape;\n } else {\n throw new Error(`Unknown dataFormat ${dataFormat}`);\n }\n const [filterDepth, filterHeight, filterWidth, , filterChannels] = filterShape;\n const [strideDepth, strideHeight, strideWidth] = parse3TupleParam(strides);\n const [dilationDepth, dilationHeight, dilationWidth] = parse3TupleParam(dilations);\n const effectiveFilterDepth = getEffectiveFilterSize(filterDepth, dilationDepth);\n const effectiveFilterHeight = getEffectiveFilterSize(filterHeight, dilationHeight);\n const effectiveFilterWidth = getEffectiveFilterSize(filterWidth, dilationWidth);\n const { padInfo, outDepth, outHeight, outWidth } = get3DPadAndOutInfo(pad3, inDepth, inHeight, inWidth, strideDepth, strideHeight, strideWidth, effectiveFilterDepth, effectiveFilterHeight, effectiveFilterWidth, roundingMode);\n const outChannels = depthwise ? filterChannels * inChannels : filterChannels;\n let outShape;\n if (dataFormat === \"channelsFirst\") {\n outShape = [batchSize, outChannels, outDepth, outHeight, outWidth];\n } else if (dataFormat === \"channelsLast\") {\n outShape = [batchSize, outDepth, outHeight, outWidth, outChannels];\n }\n return {\n batchSize,\n dataFormat,\n inDepth,\n inHeight,\n inWidth,\n inChannels,\n outDepth,\n outHeight,\n outWidth,\n outChannels,\n padInfo,\n strideDepth,\n strideHeight,\n strideWidth,\n filterDepth,\n filterHeight,\n filterWidth,\n effectiveFilterDepth,\n effectiveFilterHeight,\n effectiveFilterWidth,\n dilationDepth,\n dilationHeight,\n dilationWidth,\n inShape,\n outShape,\n filterShape\n };\n}\nfunction computeOutputShape2D(inShape, fieldSize, stride, zeroPad, roundingMode) {\n if (zeroPad == null) {\n zeroPad = computeDefaultPad(inShape, fieldSize, stride);\n }\n const inputRows = inShape[0];\n const inputCols = inShape[1];\n const outputRows = round((inputRows - fieldSize + 2 * zeroPad) / stride + 1, roundingMode);\n const outputCols = round((inputCols - fieldSize + 2 * zeroPad) / stride + 1, roundingMode);\n return [outputRows, outputCols];\n}\nfunction computeOutputShape4D(inShape, fieldSize, outChannels, stride, zeroPad, roundingMode) {\n if (zeroPad == null) {\n zeroPad = computeDefaultPad(inShape, fieldSize, stride);\n }\n const inputDepth = inShape[0];\n const inputRows = inShape[1];\n const inputCols = inShape[2];\n const outputDepths = round((inputDepth - fieldSize + 2 * zeroPad) / stride + 1, roundingMode);\n const outputRows = round((inputRows - fieldSize + 2 * zeroPad) / stride + 1, roundingMode);\n const outputCols = round((inputCols - fieldSize + 2 * zeroPad) / stride + 1, roundingMode);\n return [outputDepths, outputRows, outputCols, outChannels];\n}\nfunction computeDefaultPad(inputShape, fieldSize, stride, dilation = 1) {\n const effectiveFieldSize = getEffectiveFilterSize(fieldSize, dilation);\n return Math.floor((inputShape[0] * (stride - 1) - stride + effectiveFieldSize) / 2);\n}\nfunction parseTupleParam(param) {\n if (typeof param === \"number\") {\n return [param, param, param];\n }\n if (param.length === 2) {\n return [param[0], param[1], 1];\n }\n return param;\n}\nfunction parse3TupleParam(param) {\n return typeof param === \"number\" ? [param, param, param] : param;\n}\nfunction getEffectiveFilterSize(filterSize, dilation) {\n if (dilation <= 1) {\n return filterSize;\n }\n return filterSize + (filterSize - 1) * (dilation - 1);\n}\nfunction getPadAndOutInfo(pad3, inHeight, inWidth, strideHeight, strideWidth, filterHeight, filterWidth, roundingMode, dataFormat) {\n let padInfo;\n let outHeight;\n let outWidth;\n if (typeof pad3 === \"number\") {\n const padType = pad3 === 0 ? \"VALID\" : \"NUMBER\";\n padInfo = { top: pad3, bottom: pad3, left: pad3, right: pad3, type: padType };\n const outShape = computeOutputShape2D([inHeight, inWidth], filterHeight, strideHeight, pad3, roundingMode);\n outHeight = outShape[0];\n outWidth = outShape[1];\n } else if (pad3 === \"same\") {\n outHeight = Math.ceil(inHeight / strideHeight);\n outWidth = Math.ceil(inWidth / strideWidth);\n const padAlongHeight = Math.max(0, (outHeight - 1) * strideHeight + filterHeight - inHeight);\n const padAlongWidth = Math.max(0, (outWidth - 1) * strideWidth + filterWidth - inWidth);\n const top = Math.floor(padAlongHeight / 2);\n const bottom = padAlongHeight - top;\n const left = Math.floor(padAlongWidth / 2);\n const right = padAlongWidth - left;\n padInfo = { top, bottom, left, right, type: \"SAME\" };\n } else if (pad3 === \"valid\") {\n padInfo = { top: 0, bottom: 0, left: 0, right: 0, type: \"VALID\" };\n outHeight = Math.ceil((inHeight - filterHeight + 1) / strideHeight);\n outWidth = Math.ceil((inWidth - filterWidth + 1) / strideWidth);\n } else if (typeof pad3 === \"object\") {\n const top = dataFormat === \"channelsLast\" ? pad3[1][0] : pad3[2][0];\n const bottom = dataFormat === \"channelsLast\" ? pad3[1][1] : pad3[2][1];\n const left = dataFormat === \"channelsLast\" ? pad3[2][0] : pad3[3][0];\n const right = dataFormat === \"channelsLast\" ? pad3[2][1] : pad3[3][1];\n const padType = top === 0 && bottom === 0 && left === 0 && right === 0 ? \"VALID\" : \"EXPLICIT\";\n padInfo = { top, bottom, left, right, type: padType };\n outHeight = round((inHeight - filterHeight + top + bottom) / strideHeight + 1, roundingMode);\n outWidth = round((inWidth - filterWidth + left + right) / strideWidth + 1, roundingMode);\n } else {\n throw Error(`Unknown padding parameter: ${pad3}`);\n }\n return { padInfo, outHeight, outWidth };\n}\nfunction get3DPadAndOutInfo(pad3, inDepth, inHeight, inWidth, strideDepth, strideHeight, strideWidth, filterDepth, filterHeight, filterWidth, roundingMode) {\n let padInfo;\n let outDepth;\n let outHeight;\n let outWidth;\n if (typeof pad3 === \"number\") {\n const padType = pad3 === 0 ? \"VALID\" : \"NUMBER\";\n padInfo = {\n top: pad3,\n bottom: pad3,\n left: pad3,\n right: pad3,\n front: pad3,\n back: pad3,\n type: padType\n };\n const outShape = computeOutputShape4D([inDepth, inHeight, inWidth, 1], filterDepth, 1, strideDepth, pad3, roundingMode);\n outDepth = outShape[0];\n outHeight = outShape[1];\n outWidth = outShape[2];\n } else if (pad3 === \"same\") {\n outDepth = Math.ceil(inDepth / strideDepth);\n outHeight = Math.ceil(inHeight / strideHeight);\n outWidth = Math.ceil(inWidth / strideWidth);\n const padAlongDepth = (outDepth - 1) * strideDepth + filterDepth - inDepth;\n const padAlongHeight = (outHeight - 1) * strideHeight + filterHeight - inHeight;\n const padAlongWidth = (outWidth - 1) * strideWidth + filterWidth - inWidth;\n const front = Math.floor(padAlongDepth / 2);\n const back = padAlongDepth - front;\n const top = Math.floor(padAlongHeight / 2);\n const bottom = padAlongHeight - top;\n const left = Math.floor(padAlongWidth / 2);\n const right = padAlongWidth - left;\n padInfo = { top, bottom, left, right, front, back, type: \"SAME\" };\n } else if (pad3 === \"valid\") {\n padInfo = {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n front: 0,\n back: 0,\n type: \"VALID\"\n };\n outDepth = Math.ceil((inDepth - filterDepth + 1) / strideDepth);\n outHeight = Math.ceil((inHeight - filterHeight + 1) / strideHeight);\n outWidth = Math.ceil((inWidth - filterWidth + 1) / strideWidth);\n } else {\n throw Error(`Unknown padding parameter: ${pad3}`);\n }\n return { padInfo, outDepth, outHeight, outWidth };\n}\nfunction round(value, roundingMode) {\n if (!roundingMode) {\n return Math.trunc(value);\n }\n switch (roundingMode) {\n case \"round\":\n return Math.round(value);\n case \"ceil\":\n return Math.ceil(value);\n case \"floor\":\n return Math.floor(value);\n default:\n throw new Error(`Unknown roundingMode ${roundingMode}`);\n }\n}\nfunction tupleValuesAreOne(param) {\n const [dimA, dimB, dimC] = parseTupleParam(param);\n return dimA === 1 && dimB === 1 && dimC === 1;\n}\nfunction eitherStridesOrDilationsAreOne(strides, dilations) {\n return tupleValuesAreOne(strides) || tupleValuesAreOne(dilations);\n}\nfunction convertConv2DDataFormat(dataFormat) {\n if (dataFormat === \"NHWC\") {\n return \"channelsLast\";\n } else if (dataFormat === \"NCHW\") {\n return \"channelsFirst\";\n } else {\n throw new Error(`Unknown dataFormat ${dataFormat}`);\n }\n}\nfunction checkPadOnDimRoundingMode(opDesc, pad3, dimRoundingMode) {\n if (dimRoundingMode != null) {\n if (typeof pad3 === \"string\") {\n throw Error(`Error in ${opDesc}: pad must be an integer when using dimRoundingMode ${dimRoundingMode} but got pad ${pad3}.`);\n } else if (typeof pad3 === \"number\") {\n assert(isInt(pad3), () => `Error in ${opDesc}: pad must be an integer when using dimRoundingMode ${dimRoundingMode} but got pad ${pad3}.`);\n } else if (typeof pad3 === \"object\") {\n pad3.forEach((p2) => {\n p2.forEach((v) => {\n assert(isInt(v), () => `Error in ${opDesc}: pad must be an integer when using dimRoundingMode ${dimRoundingMode} but got pad ${v}.`);\n });\n });\n } else {\n throw Error(`Error in ${opDesc}: Unknown padding parameter: ${pad3}`);\n }\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/reshape.js\nfunction reshape_(x, shape) {\n const $x = convertToTensor(x, \"x\", \"reshape\", \"string_or_numeric\");\n const inputs = { x: $x };\n const attrs = { shape };\n return ENGINE.runKernel(Reshape, inputs, attrs);\n}\nvar reshape = op({ reshape_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/avg_pool.js\nfunction avgPool_(x, filterSize, strides, pad3, dimRoundingMode) {\n const $x = convertToTensor(x, \"x\", \"avgPool\", \"float32\");\n const dilations = 1;\n assert(eitherStridesOrDilationsAreOne(strides, dilations), () => `Error in avgPool: Either strides or dilations must be 1. Got strides ${strides} and dilations '${dilations}'`);\n let x4D = $x;\n let reshapedTo4D = false;\n if ($x.rank === 3) {\n reshapedTo4D = true;\n x4D = reshape($x, [1, $x.shape[0], $x.shape[1], $x.shape[2]]);\n }\n assert(x4D.rank === 4, () => `Error in avgPool: x must be rank 4 but got rank ${x4D.rank}.`);\n checkPadOnDimRoundingMode(\"avgPool\", pad3, dimRoundingMode);\n const inputs = { x: x4D };\n const attrs = { filterSize, strides, pad: pad3, dimRoundingMode };\n let res = ENGINE.runKernel(AvgPool, inputs, attrs);\n res = cast(res, $x.dtype);\n if (reshapedTo4D) {\n return reshape(res, [res.shape[1], res.shape[2], res.shape[3]]);\n }\n return res;\n}\nvar avgPool = op({ avgPool_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/avg_pool_3d.js\nfunction avgPool3d_(x, filterSize, strides, pad3, dimRoundingMode, dataFormat = \"NDHWC\") {\n const $x = convertToTensor(x, \"x\", \"avgPool3d\", \"float32\");\n let x5D = $x;\n let reshapedTo5D = false;\n if ($x.rank === 4) {\n reshapedTo5D = true;\n x5D = reshape($x, [1, $x.shape[0], $x.shape[1], $x.shape[2], $x.shape[3]]);\n }\n assert(x5D.rank === 5, () => `Error in avgPool3d: x must be rank 5 but got rank ${x5D.rank}.`);\n assert(dataFormat === \"NDHWC\", () => `Error in avgPool3d: Only NDHWC is currently supported, but got dataFormat of ${dataFormat}`);\n checkPadOnDimRoundingMode(\"avgPool3d\", pad3, dimRoundingMode);\n const inputs = { x: x5D };\n const attrs = { filterSize, strides, pad: pad3, dimRoundingMode, dataFormat };\n let res = ENGINE.runKernel(AvgPool3D, inputs, attrs);\n res = cast(res, x5D.dtype);\n if (reshapedTo5D) {\n return reshape(res, [res.shape[1], res.shape[2], res.shape[3], res.shape[4]]);\n }\n return res;\n}\nvar avgPool3d = op({ avgPool3d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/concat.js\nfunction concat_(tensors, axis = 0) {\n assert(tensors.length >= 1, () => \"Pass at least one tensor to concat\");\n const $tensors = convertToTensorArray(tensors, \"tensors\", \"concat\", \"string_or_numeric\");\n if ($tensors[0].dtype === \"complex64\") {\n $tensors.forEach((tensor2) => {\n if (tensor2.dtype !== \"complex64\") {\n throw new Error(`Cannot concatenate complex64 tensors with a tensor\n with dtype ${tensor2.dtype}. `);\n }\n });\n }\n if ($tensors.length === 1) {\n return clone($tensors[0]);\n }\n const inputs = $tensors;\n const attr = { axis };\n return ENGINE.runKernel(Concat, inputs, attr);\n}\nvar concat = op({ concat_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/sigmoid.js\nfunction sigmoid_(x) {\n const $x = convertToTensor(x, \"x\", \"sigmoid\", \"float32\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Sigmoid, inputs);\n}\nvar sigmoid = op({ sigmoid_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/slice.js\nfunction slice_(x, begin, size) {\n const $x = convertToTensor(x, \"x\", \"slice\", \"string_or_numeric\");\n if ($x.rank === 0) {\n throw new Error(\"Slicing scalar is not possible\");\n }\n const inputs = { x: $x };\n const attrs = { begin, size };\n return ENGINE.runKernel(Slice, inputs, attrs);\n}\nvar slice = op({ slice_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/tanh.js\nfunction tanh_(x) {\n const $x = convertToTensor(x, \"x\", \"tanh\", \"float32\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Tanh, inputs);\n}\nvar tanh2 = op({ tanh_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/basic_lstm_cell.js\nfunction basicLSTMCell_(forgetBias, lstmKernel, lstmBias, data, c, h) {\n const $forgetBias = convertToTensor(forgetBias, \"forgetBias\", \"basicLSTMCell\");\n const $lstmKernel = convertToTensor(lstmKernel, \"lstmKernel\", \"basicLSTMCell\");\n const $lstmBias = convertToTensor(lstmBias, \"lstmBias\", \"basicLSTMCell\");\n const $data = convertToTensor(data, \"data\", \"basicLSTMCell\");\n const $c = convertToTensor(c, \"c\", \"basicLSTMCell\");\n const $h = convertToTensor(h, \"h\", \"basicLSTMCell\");\n const combined = concat([$data, $h], 1);\n const weighted = matMul(combined, $lstmKernel);\n const res = add2(weighted, $lstmBias);\n const batchSize = res.shape[0];\n const sliceCols = res.shape[1] / 4;\n const sliceSize = [batchSize, sliceCols];\n const i2 = slice(res, [0, 0], sliceSize);\n const j = slice(res, [0, sliceCols], sliceSize);\n const f = slice(res, [0, sliceCols * 2], sliceSize);\n const o = slice(res, [0, sliceCols * 3], sliceSize);\n const newC = add2(mul(sigmoid(i2), tanh2(j)), mul($c, sigmoid(add2($forgetBias, f))));\n const newH = mul(tanh2(newC), sigmoid(o));\n return [newC, newH];\n}\nvar basicLSTMCell = op({ basicLSTMCell_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/batch_to_space_nd.js\nfunction batchToSpaceND_(x, blockShape, crops) {\n const $x = convertToTensor(x, \"x\", \"batchToSpaceND\");\n const prod6 = blockShape.reduce((a, b) => a * b);\n assert($x.rank >= 1 + blockShape.length, () => `input rank is ${$x.rank} but should be > than blockShape.length ${blockShape.length}`);\n assert(crops.length === blockShape.length, () => `crops.length is ${crops.length} but should be equal to blockShape.length ${blockShape.length}`);\n assert($x.shape[0] % prod6 === 0, () => `input tensor batch is ${$x.shape[0]} but is not divisible by the product of the elements of blockShape ${blockShape.join(\" * \")} === ${prod6}`);\n const inputs = { x: $x };\n const attrs = { blockShape, crops };\n return ENGINE.runKernel(BatchToSpaceND, inputs, attrs);\n}\nvar batchToSpaceND = op({ batchToSpaceND_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/batchnorm_util.js\nfunction xAs4D(x) {\n let x4D;\n if (x.rank === 0 || x.rank === 1) {\n x4D = reshape(x, [1, 1, 1, x.size]);\n } else if (x.rank === 2) {\n x4D = reshape(x, [1, 1, x.shape[0], x.shape[1]]);\n } else if (x.rank === 3) {\n x4D = reshape(x, [1, x.shape[0], x.shape[1], x.shape[2]]);\n } else {\n x4D = x;\n }\n return x4D;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/batchnorm.js\nfunction batchNorm_(x, mean5, variance, offset, scale2, varianceEpsilon) {\n if (varianceEpsilon == null) {\n varianceEpsilon = 1e-3;\n }\n const $x = convertToTensor(x, \"x\", \"batchNorm\");\n const $mean = convertToTensor(mean5, \"mean\", \"batchNorm\");\n const $variance = convertToTensor(variance, \"variance\", \"batchNorm\");\n let $scale;\n if (scale2 != null) {\n $scale = convertToTensor(scale2, \"scale\", \"batchNorm\");\n }\n let $offset;\n if (offset != null) {\n $offset = convertToTensor(offset, \"offset\", \"batchNorm\");\n }\n assert($mean.rank === $variance.rank, () => \"Batch normalization gradient requires mean and variance to have equal ranks.\");\n assert($offset == null || $mean.rank === $offset.rank, () => \"Batch normalization gradient requires mean and offset to have equal ranks.\");\n assert($scale == null || $mean.rank === $scale.rank, () => \"Batch normalization gradient requires mean and scale to have equal ranks.\");\n const x4D = xAs4D($x);\n const inputs = {\n x: x4D,\n scale: $scale,\n offset: $offset,\n mean: $mean,\n variance: $variance\n };\n const attrs = { varianceEpsilon };\n const res = ENGINE.runKernel(FusedBatchNorm, inputs, attrs);\n return reshape(res, $x.shape);\n}\nvar batchNorm = op({ batchNorm_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/batchnorm2d.js\nfunction batchNorm2d_(x, mean5, variance, offset, scale2, varianceEpsilon) {\n const $x = convertToTensor(x, \"x\", \"batchNorm\");\n const $mean = convertToTensor(mean5, \"mean\", \"batchNorm\");\n const $variance = convertToTensor(variance, \"variance\", \"batchNorm\");\n let $scale;\n if (scale2 != null) {\n $scale = convertToTensor(scale2, \"scale\", \"batchNorm\");\n }\n let $offset;\n if (offset != null) {\n $offset = convertToTensor(offset, \"offset\", \"batchNorm\");\n }\n assert($x.rank === 2, () => `Error in batchNorm2D: x must be rank 2 but got rank ${$x.rank}.`);\n assert($mean.rank === 2 || $mean.rank === 1, () => `Error in batchNorm2D: mean must be rank 2 or rank 1 but got rank ${$mean.rank}.`);\n assert($variance.rank === 2 || $variance.rank === 1, () => `Error in batchNorm2D: variance must be rank 2 or rank 1 but got rank ${$variance.rank}.`);\n if ($scale != null) {\n assert($scale.rank === 2 || $scale.rank === 1, () => `Error in batchNorm2D: scale must be rank 2 or rank 1 but got rank ${$scale.rank}.`);\n }\n if ($offset != null) {\n assert($offset.rank === 2 || $offset.rank === 1, () => `Error in batchNorm2D: offset must be rank 2 or rank 1 but got rank ${$offset.rank}.`);\n }\n return batchNorm($x, $mean, $variance, $offset, $scale, varianceEpsilon);\n}\nvar batchNorm2d = op({ batchNorm2d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/batchnorm3d.js\nfunction batchNorm3d_(x, mean5, variance, offset, scale2, varianceEpsilon) {\n const $x = convertToTensor(x, \"x\", \"batchNorm\");\n const $mean = convertToTensor(mean5, \"mean\", \"batchNorm\");\n const $variance = convertToTensor(variance, \"variance\", \"batchNorm\");\n let $scale;\n if (scale2 != null) {\n $scale = convertToTensor(scale2, \"scale\", \"batchNorm\");\n }\n let $offset;\n if (offset != null) {\n $offset = convertToTensor(offset, \"offset\", \"batchNorm\");\n }\n assert($x.rank === 3, () => `Error in batchNorm3D: x must be rank 3 but got rank ${$x.rank}.`);\n assert($mean.rank === 3 || $mean.rank === 1, () => `Error in batchNorm3D: mean must be rank 3 or rank 1 but got rank ${$mean.rank}.`);\n assert($variance.rank === 3 || $variance.rank === 1, () => `Error in batchNorm3D: variance must be rank 3 or rank 1 but got rank ${$variance.rank}.`);\n if ($scale != null) {\n assert($scale.rank === 3 || $scale.rank === 1, () => `Error in batchNorm3D: scale must be rank 3 or rank 1 but got rank ${$scale.rank}.`);\n }\n if ($offset != null) {\n assert($offset.rank === 3 || $offset.rank === 1, () => `Error in batchNorm3D: offset must be rank 3 or rank 1 but got rank ${$offset.rank}.`);\n }\n return batchNorm($x, $mean, $variance, $offset, $scale, varianceEpsilon);\n}\nvar batchNorm3d = op({ batchNorm3d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/batchnorm4d.js\nfunction batchNorm4d_(x, mean5, variance, offset, scale2, varianceEpsilon) {\n const $x = convertToTensor(x, \"x\", \"batchNorm\");\n const $mean = convertToTensor(mean5, \"mean\", \"batchNorm\");\n const $variance = convertToTensor(variance, \"variance\", \"batchNorm\");\n let $scale;\n if (scale2 != null) {\n $scale = convertToTensor(scale2, \"scale\", \"batchNorm\");\n }\n let $offset;\n if (offset != null) {\n $offset = convertToTensor(offset, \"offset\", \"batchNorm\");\n }\n assert($x.rank === 4, () => `Error in batchNorm4D: x must be rank 4 but got rank ${$x.rank}.`);\n assert($mean.rank === 4 || $mean.rank === 1, () => `Error in batchNorm4D: mean must be rank 4 or rank 1 but got rank ${$mean.rank}.`);\n assert($variance.rank === 4 || $variance.rank === 1, () => `Error in batchNorm4D: variance must be rank 4 or rank 1 but got rank ${$variance.rank}.`);\n if ($scale != null) {\n assert($scale.rank === 4 || $scale.rank === 1, () => `Error in batchNorm4D: scale must be rank 4 or rank 1 but got rank ${$scale.rank}.`);\n }\n if ($offset != null) {\n assert($offset.rank === 4 || $offset.rank === 1, () => `Error in batchNorm4D: offset must be rank 4 or rank 1 but got rank ${$offset.rank}.`);\n }\n return batchNorm($x, $mean, $variance, $offset, $scale, varianceEpsilon);\n}\nvar batchNorm4d = op({ batchNorm4d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/bincount.js\nfunction bincount_(x, weights, size) {\n const $x = convertToTensor(x, \"x\", \"bincount\");\n const $weights = convertToTensor(weights, \"weights\", \"bincount\");\n assert($x.dtype === \"int32\", () => `Error in bincount: input dtype must be int32, but got ${$x.dtype}`);\n assert(size >= 0, () => `size must be non-negative, but got ${size}.`);\n assert($weights.size === $x.size || $weights.size === 0, () => `Error in bincount: weights must have the same size as input or0-length, but got input shape: ${$x.shape}, weights shape: ${$weights.shape}.`);\n const inputs = { x: $x, weights: $weights };\n const attrs = { size };\n return ENGINE.runKernel(Bincount, inputs, attrs);\n}\nvar bincount = op({ bincount_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/broadcast_args.js\nfunction broadcastArgs_(s0, s1) {\n const shape1Input = convertToTensor(s0, \"s0\", \"broadcastArgs\", \"int32\");\n const shape2Input = convertToTensor(s1, \"s1\", \"broadcastArgs\", \"int32\");\n if (shape1Input.rank !== 1) {\n throw new Error(`broadcastArgs(): first input must be a vector (rank=1). Has rank ${shape1Input.rank}`);\n }\n if (shape2Input.rank !== 1) {\n throw new Error(`broadcastArgs(): second input must be a vector (rank=1). Has rank ${shape2Input.rank}`);\n }\n const inputs = { s0: shape1Input, s1: shape2Input };\n return ENGINE.runKernel(BroadcastArgs, inputs);\n}\nvar broadcastArgs = op({ broadcastArgs_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/broadcast_to.js\nfunction broadcastTo_(x, shape) {\n let input2 = convertToTensor(x, \"broadcastTo\", \"x\");\n const xShape = input2.shape;\n if (shape.some((d) => !(d > 0) || d % 1 !== 0)) {\n throw new Error(`broadcastTo(): Invalid broadcast shape [${shape}].`);\n }\n if (shape.length < input2.rank) {\n throw new Error(`broadcastTo(): shape.length=${shape.length} < input.rank=${input2.rank}.`);\n }\n if (shape.length > input2.rank) {\n const newShape = input2.shape.slice();\n while (newShape.length < shape.length) {\n newShape.unshift(1);\n }\n input2 = reshape(input2, newShape);\n }\n const inputShape = input2.shape;\n const reps = Array.from(shape);\n for (let i2 = shape.length - 1; i2 >= 0; i2--) {\n if (inputShape[i2] === shape[i2]) {\n reps[i2] = 1;\n } else if (input2.shape[i2] !== 1) {\n throw new Error(`broadcastTo(): [${xShape}] cannot be broadcast to [${shape}].`);\n }\n }\n const axes = reps.map((n2, i2) => n2 > 1 ? i2 : -1).filter((i2) => i2 >= 0);\n if (axes.length === 0) {\n return clone(input2);\n }\n const inputs = { x: input2 };\n const attrs = { reps };\n return ENGINE.runKernel(Tile, inputs, attrs);\n}\nvar broadcastTo = op({ broadcastTo_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/ceil.js\nfunction ceil_(x) {\n const $x = convertToTensor(x, \"x\", \"ceil\", \"float32\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Ceil, inputs);\n}\nvar ceil = op({ ceil_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/fill.js\nfunction fill(shape, value, dtype) {\n const attrs = { shape, value, dtype };\n return ENGINE.runKernel(Fill, {}, attrs);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/clip_by_value.js\nfunction clipByValue_(x, clipValueMin, clipValueMax) {\n const $x = convertToTensor(x, \"x\", \"clipByValue\");\n assert(clipValueMin <= clipValueMax, () => `Error in clip: min (${clipValueMin}) must be less than or equal to max (${clipValueMax}).`);\n if (clipValueMin === clipValueMax) {\n return fill($x.shape, clipValueMin, $x.dtype);\n }\n const inputs = { x: $x };\n const attrs = { clipValueMin, clipValueMax };\n return ENGINE.runKernel(ClipByValue, inputs, attrs);\n}\nvar clipByValue = op({ clipByValue_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/concat_1d.js\nfunction concat1d_(tensors) {\n return concat(tensors, 0);\n}\nvar concat1d = op({ concat1d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/concat_2d.js\nfunction concat2d_(tensors, axis) {\n return concat(tensors, axis);\n}\nvar concat2d = op({ concat2d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/concat_3d.js\nfunction concat3d_(tensors, axis) {\n return concat(tensors, axis);\n}\nvar concat3d = op({ concat3d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/concat_4d.js\nfunction concat4d_(tensors, axis) {\n return concat(tensors, axis);\n}\nvar concat4d = op({ concat4d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/conv2d.js\nfunction conv2d_(x, filter, strides, pad3, dataFormat = \"NHWC\", dilations = [1, 1], dimRoundingMode) {\n const $x = convertToTensor(x, \"x\", \"conv2d\", \"float32\");\n const $filter = convertToTensor(filter, \"filter\", \"conv2d\", \"float32\");\n let x4D = $x;\n let reshapedTo4D = false;\n if ($x.rank === 3) {\n reshapedTo4D = true;\n x4D = reshape($x, [1, $x.shape[0], $x.shape[1], $x.shape[2]]);\n }\n assert(x4D.rank === 4, () => `Error in conv2d: input must be rank 4, but got rank ${x4D.rank}.`);\n assert($filter.rank === 4, () => `Error in conv2d: filter must be rank 4, but got rank ${$filter.rank}.`);\n checkPadOnDimRoundingMode(\"conv2d\", pad3, dimRoundingMode);\n const inDepth = dataFormat === \"NHWC\" ? x4D.shape[3] : x4D.shape[1];\n assert(inDepth === $filter.shape[2], () => `Error in conv2d: depth of input (${inDepth}) must match input depth for filter ${$filter.shape[2]}.`);\n assert(eitherStridesOrDilationsAreOne(strides, dilations), () => `Error in conv2D: Either strides or dilations must be 1. Got strides ${strides} and dilations '${dilations}'`);\n const inputs = { x: x4D, filter: $filter };\n const attrs = { strides, pad: pad3, dataFormat, dilations, dimRoundingMode };\n const res = ENGINE.runKernel(Conv2D, inputs, attrs);\n if (reshapedTo4D) {\n return reshape(res, [res.shape[1], res.shape[2], res.shape[3]]);\n }\n return res;\n}\nvar conv2d = op({ conv2d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/conv1d.js\nfunction conv1d_(x, filter, stride, pad3, dataFormat = \"NWC\", dilation = 1, dimRoundingMode) {\n const $x = convertToTensor(x, \"x\", \"conv1d\");\n const $filter = convertToTensor(filter, \"filter\", \"conv1d\");\n let x3D = $x;\n let reshapedTo3D = false;\n if ($x.rank === 2) {\n reshapedTo3D = true;\n x3D = reshape($x, [1, $x.shape[0], $x.shape[1]]);\n }\n assert(x3D.rank === 3, () => `Error in conv1d: input must be rank 3, but got rank ${x3D.rank}.`);\n assert($filter.rank === 3, () => `Error in conv1d: filter must be rank 3, but got rank ${$filter.rank}.`);\n checkPadOnDimRoundingMode(\"conv1d\", pad3, dimRoundingMode);\n assert(x3D.shape[2] === $filter.shape[1], () => `Error in conv1d: depth of input (${x3D.shape[2]}) must match input depth for filter ${$filter.shape[1]}.`);\n assert(eitherStridesOrDilationsAreOne(stride, dilation), () => `Error in conv1D: Either stride or dilation must be 1. Got stride ${stride} and dilation '${dilation}'`);\n assert(dataFormat === \"NWC\", () => `Error in conv1d: got dataFormat of ${dataFormat} but only NWC is currently supported.`);\n const filter4D = reshape($filter, [1, $filter.shape[0], $filter.shape[1], $filter.shape[2]]);\n const input4D = reshape(x3D, [x3D.shape[0], 1, x3D.shape[1], x3D.shape[2]]);\n const strides = [1, stride];\n const dilations = [1, dilation];\n const conv2dDataFormat = \"NHWC\";\n const res = conv2d(input4D, filter4D, strides, pad3, conv2dDataFormat, dilations, dimRoundingMode);\n if (reshapedTo3D) {\n return reshape(res, [res.shape[2], res.shape[3]]);\n }\n return reshape(res, [res.shape[0], res.shape[2], res.shape[3]]);\n}\nvar conv1d = op({ conv1d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/conv2d_backprop_input.js\nfunction conv2DBackpropInput_(xShape, dy, filter, strides, pad3, dataFormat = \"NHWC\", dimRoundingMode) {\n assert(xShape.length === dy.rank, () => `Length of inShape (${xShape.length}) and rank of dy (${dy.rank}) must match`);\n let xShape4D = xShape;\n let dy4D = dy;\n let reshapedTo4D = false;\n if (dy.rank === 3) {\n reshapedTo4D = true;\n dy4D = reshape(dy, [1, dy.shape[0], dy.shape[1], dy.shape[2]]);\n xShape4D = [1, xShape[0], xShape[1], xShape[2]];\n }\n assert(xShape4D.length === 4, () => `Error in conv2dDerInput: inShape must be length 4, but got length ${xShape4D.length}.`);\n assert(dy4D.rank === 4, () => `Error in conv2dDerInput: dy must be rank 4, but got rank ${dy4D.rank}`);\n assert(filter.rank === 4, () => `Error in conv2dDerInput: filter must be rank 4, but got rank ${filter.rank}`);\n const inDepth = dataFormat === \"NHWC\" ? xShape4D[3] : xShape4D[1];\n const outDepth = dataFormat === \"NHWC\" ? dy4D.shape[3] : dy4D.shape[1];\n assert(inDepth === filter.shape[2], () => `Error in conv2dDerInput: depth of input (${inDepth}) must match input depth for filter ${filter.shape[2]}.`);\n assert(outDepth === filter.shape[3], () => `Error in conv2dDerInput: depth of output (${outDepth}) must match output depth for filter ${filter.shape[3]}.`);\n checkPadOnDimRoundingMode(\"conv2dDerInput\", pad3, dimRoundingMode);\n const inputs = { dy: dy4D, filter };\n const attrs = { strides, pad: pad3, dataFormat, dimRoundingMode, inputShape: xShape4D };\n const res = ENGINE.runKernel(Conv2DBackpropInput, inputs, attrs);\n if (reshapedTo4D) {\n return reshape(res, [res.shape[1], res.shape[2], res.shape[3]]);\n }\n return res;\n}\nvar conv2DBackpropInput = op({ conv2DBackpropInput_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/conv2d_transpose.js\nfunction conv2dTranspose_(x, filter, outputShape, strides, pad3, dimRoundingMode) {\n const $x = convertToTensor(x, \"x\", \"conv2dTranspose\");\n const $filter = convertToTensor(filter, \"filter\", \"conv2dTranspose\");\n return conv2DBackpropInput(outputShape, $x, $filter, strides, pad3, \"NHWC\", dimRoundingMode);\n}\nvar conv2dTranspose = op({ conv2dTranspose_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/conv3d.js\nfunction conv3d_(x, filter, strides, pad3, dataFormat = \"NDHWC\", dilations = [1, 1, 1]) {\n const $x = convertToTensor(x, \"x\", \"conv3d\");\n const $filter = convertToTensor(filter, \"filter\", \"conv3d\");\n let x5D = $x;\n let reshapedTo5D = false;\n if ($x.rank === 4) {\n reshapedTo5D = true;\n x5D = reshape($x, [1, $x.shape[0], $x.shape[1], $x.shape[2], $x.shape[3]]);\n }\n assert(x5D.rank === 5, () => `Error in conv3d: input must be rank 5, but got rank ${x5D.rank}.`);\n assert($filter.rank === 5, () => `Error in conv3d: filter must be rank 5, but got rank ${$filter.rank}.`);\n assert(x5D.shape[4] === $filter.shape[3], () => `Error in conv3d: depth of input (${x5D.shape[4]}) must match input depth for filter ${$filter.shape[3]}.`);\n assert(eitherStridesOrDilationsAreOne(strides, dilations), () => `Error in conv3D: Either strides or dilations must be 1. Got strides ${strides} and dilations '${dilations}'`);\n assert(dataFormat === \"NDHWC\", () => `Error in conv3d: got dataFormat of ${dataFormat} but only NDHWC is currently supported.`);\n const inputs = { x: x5D, filter: $filter };\n const attrs = { strides, pad: pad3, dataFormat, dilations };\n const res = ENGINE.runKernel(Conv3D, inputs, attrs);\n if (reshapedTo5D) {\n return reshape(res, [res.shape[1], res.shape[2], res.shape[3], res.shape[4]]);\n }\n return res;\n}\nvar conv3d = op({ conv3d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/conv3d_backprop_input.js\nfunction conv3DBackpropInput_(xShape, dy, filter, strides, pad3) {\n assert(xShape.length === dy.rank, () => `Length of inShape (${xShape.length}) and rank of dy (${dy.rank}) must match`);\n let xShape5D = xShape;\n let dy5D = dy;\n let reshapedTo5D = false;\n if (dy.rank === 4) {\n reshapedTo5D = true;\n dy5D = reshape(dy, [1, dy.shape[0], dy.shape[1], dy.shape[2], dy.shape[3]]);\n xShape5D = [1, xShape[0], xShape[1], xShape[2], xShape[3]];\n }\n const inDepth = xShape5D[4];\n const outDepth = dy5D.shape[4];\n assert(xShape5D.length === 5, () => `Error in conv3dDerInput: inShape must be length 5, but got length ${xShape5D.length}.`);\n assert(dy5D.rank === 5, () => `Error in conv3dDerInput: dy must be rank 5, but got rank ${dy5D.rank}`);\n assert(filter.rank === 5, () => `Error in conv3dDerInput: filter must be rank 5, but got rank ${filter.rank}`);\n assert(inDepth === filter.shape[3], () => `Error in conv3dDerInput: depth of input (${inDepth}) must match input depth for filter ${filter.shape[3]}.`);\n assert(outDepth === filter.shape[4], () => `Error in conv3dDerInput: depth of output (${outDepth}) must match output depth for filter ${filter.shape[4]}.`);\n const inputs = { dy: dy5D, filter };\n const attrs = { pad: pad3, strides, inputShape: xShape5D };\n const res = ENGINE.runKernel(Conv3DBackpropInputV2, inputs, attrs);\n if (reshapedTo5D) {\n return reshape(res, [res.shape[1], res.shape[2], res.shape[3], res.shape[4]]);\n }\n return res;\n}\nvar conv3DBackpropInput = op({ conv3DBackpropInput_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/conv3d_transpose.js\nfunction conv3dTranspose_(x, filter, outputShape, strides, pad3) {\n const $x = convertToTensor(x, \"x\", \"conv3dTranspose\");\n const $filter = convertToTensor(filter, \"filter\", \"conv3dTranspose\");\n return conv3DBackpropInput(outputShape, $x, $filter, strides, pad3);\n}\nvar conv3dTranspose = op({ conv3dTranspose_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/cos.js\nfunction cos_(x) {\n const $x = convertToTensor(x, \"x\", \"cos\", \"float32\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Cos, inputs);\n}\nvar cos = op({ cos_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/cosh.js\nfunction cosh_(x) {\n const $x = convertToTensor(x, \"x\", \"cosh\", \"float32\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Cosh, inputs);\n}\nvar cosh = op({ cosh_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/cumprod.js\nfunction cumprod_(x, axis = 0, exclusive = false, reverse5 = false) {\n const $x = convertToTensor(x, \"x\", \"cumprod\");\n const inputs = { x: $x };\n const attrs = { axis, exclusive, reverse: reverse5 };\n return ENGINE.runKernel(Cumprod, inputs, attrs);\n}\nvar cumprod = op({ cumprod_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/cumsum.js\nfunction cumsum_(x, axis = 0, exclusive = false, reverse5 = false) {\n const $x = convertToTensor(x, \"x\", \"cumsum\");\n const inputs = { x: $x };\n const attrs = { axis, exclusive, reverse: reverse5 };\n return ENGINE.runKernel(Cumsum, inputs, attrs);\n}\nvar cumsum = op({ cumsum_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/dense_bincount.js\nfunction denseBincount_(x, weights, size, binaryOutput = false) {\n const $x = convertToTensor(x, \"x\", \"denseBincount\");\n const $weights = convertToTensor(weights, \"weights\", \"denseBincount\");\n assert($x.dtype === \"int32\", () => `Error in denseBincount: input dtype must be int32, but got ${$x.dtype}`);\n assert($x.rank <= 2, () => `Error in denseBincount: input must be at most rank 2, but got rank ${$x.rank}.`);\n assert(size >= 0, () => `size must be non-negative, but got ${size}.`);\n assert($weights.size === $x.size || $weights.size === 0, () => `Error in denseBincount: weights must have the same shape as x or 0-length, but got x shape: ${$x.shape}, weights shape: ${$weights.shape}.`);\n const inputs = { x: $x, weights: $weights };\n const attrs = { size, binaryOutput };\n return ENGINE.runKernel(DenseBincount, inputs, attrs);\n}\nvar denseBincount = op({ denseBincount_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/depth_to_space.js\nfunction depthToSpace_(x, blockSize, dataFormat = \"NHWC\") {\n const $x = convertToTensor(x, \"x\", \"depthToSpace\", \"float32\");\n const inputHeight = dataFormat === \"NHWC\" ? $x.shape[1] : $x.shape[2];\n const inputWidth = dataFormat === \"NHWC\" ? $x.shape[2] : $x.shape[3];\n const inputDepth = dataFormat === \"NHWC\" ? $x.shape[3] : $x.shape[1];\n assert(blockSize > 1, () => `blockSize should be > 1 for depthToSpace, but was: ${blockSize}`);\n assert(inputHeight * blockSize >= 0, () => `Negative dimension size caused by overflow when multiplying\n ${inputHeight} and ${blockSize} for depthToSpace with input shape\n ${$x.shape}`);\n assert(inputWidth * blockSize >= 0, () => `Negative dimension size caused by overflow when multiplying\n ${inputWidth} and ${blockSize} for depthToSpace with input shape\n ${$x.shape}`);\n assert(inputDepth % (blockSize * blockSize) === 0, () => `Dimension size must be evenly divisible by ${blockSize * blockSize} but is ${inputDepth} for depthToSpace with input shape ${$x.shape}`);\n const inputs = { x: $x };\n const attrs = { blockSize, dataFormat };\n return ENGINE.runKernel(DepthToSpace, inputs, attrs);\n}\nvar depthToSpace = op({ depthToSpace_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/depthwise_conv2d.js\nfunction depthwiseConv2d_(x, filter, strides, pad3, dataFormat = \"NHWC\", dilations = [1, 1], dimRoundingMode) {\n const $x = convertToTensor(x, \"x\", \"depthwiseConv2d\", \"float32\");\n const $filter = convertToTensor(filter, \"filter\", \"depthwiseConv2d\", \"float32\");\n let x4D = $x;\n let reshapedTo4D = false;\n if ($x.rank === 3) {\n reshapedTo4D = true;\n x4D = reshape($x, [1, $x.shape[0], $x.shape[1], $x.shape[2]]);\n }\n assert(x4D.rank === 4, () => `Error in depthwiseConv2d: input must be rank 4, but got rank ${x4D.rank}.`);\n assert($filter.rank === 4, () => `Error in depthwiseConv2d: filter must be rank 4, but got rank ${$filter.rank}.`);\n const inChannels = dataFormat === \"NHWC\" ? x4D.shape[3] : x4D.shape[1];\n assert(inChannels === $filter.shape[2], () => `Error in depthwiseConv2d: number of input channels (${inChannels}) must match the inChannels dimension in filter ${$filter.shape[2]}.`);\n checkPadOnDimRoundingMode(\"depthwiseConv2d\", pad3, dimRoundingMode);\n const inputs = { x: x4D, filter: $filter };\n const attrs = { strides, pad: pad3, dataFormat, dilations, dimRoundingMode };\n const res = ENGINE.runKernel(DepthwiseConv2dNative, inputs, attrs);\n if (reshapedTo4D) {\n return reshape(res, [res.shape[1], res.shape[2], res.shape[3]]);\n }\n return res;\n}\nvar depthwiseConv2d = op({ depthwiseConv2d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/diag.js\nfunction diag_(x) {\n const $x = convertToTensor(x, \"x\", \"diag\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Diag, inputs);\n}\nvar diag = op({ diag_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/dilation2d.js\nfunction dilation2d_(x, filter, strides, pad3, dilations = [1, 1], dataFormat = \"NHWC\") {\n const $x = convertToTensor(x, \"x\", \"dilation2d\");\n const $filter = convertToTensor(filter, \"filter\", \"dilation2d\");\n assert($x.rank === 3 || $x.rank === 4, () => `Error in dilation2d: input must be rank 3 or 4, but got rank ${$x.rank}.`);\n assert($filter.rank === 3, () => `Error in dilation2d: filter must be rank 3, but got rank ${$filter.rank}.`);\n assert(dataFormat === \"NHWC\", () => `Error in dilation2d: Only NHWC is currently supported, but got dataFormat of ${dataFormat}`);\n let x4D = $x;\n let reshapedTo4D = false;\n if ($x.rank === 3) {\n x4D = reshape($x, [1, $x.shape[0], $x.shape[1], $x.shape[2]]);\n reshapedTo4D = true;\n }\n const inputs = { x: x4D, filter: $filter };\n const attrs = { strides, pad: pad3, dilations };\n const res = ENGINE.runKernel(Dilation2D, inputs, attrs);\n if (reshapedTo4D) {\n return reshape(res, [res.shape[1], res.shape[2], res.shape[3]]);\n }\n return res;\n}\nvar dilation2d = op({ dilation2d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/equal.js\nfunction equal_(a, b) {\n let $a = convertToTensor(a, \"a\", \"equal\", \"string_or_numeric\");\n let $b = convertToTensor(b, \"b\", \"equal\", \"string_or_numeric\");\n [$a, $b] = makeTypesMatch($a, $b);\n assertAndGetBroadcastShape($a.shape, $b.shape);\n const inputs = { a: $a, b: $b };\n return ENGINE.runKernel(Equal, inputs);\n}\nvar equal = op({ equal_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/where.js\nfunction where_(condition, a, b) {\n const $a = convertToTensor(a, \"a\", \"where\");\n const $b = convertToTensor(b, \"b\", \"where\");\n const $condition = convertToTensor(condition, \"condition\", \"where\", \"bool\");\n const broadcastShape = assertAndGetBroadcastShape(assertAndGetBroadcastShape($condition.shape, $a.shape), $b.shape);\n const $broadcastedCondition = broadcastTo($condition, broadcastShape);\n const $broadcastedA = broadcastTo($a, broadcastShape);\n const $broadcastedB = broadcastTo($b, broadcastShape);\n const inputs = {\n condition: $broadcastedCondition,\n t: $broadcastedA,\n e: $broadcastedB\n };\n return ENGINE.runKernel(Select, inputs);\n}\nvar where = op({ where_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/zeros_like.js\nfunction zerosLike_(x) {\n const $x = convertToTensor(x, \"x\", \"zerosLike\");\n const inputs = { x: $x };\n return ENGINE.runKernel(ZerosLike, inputs);\n}\nvar zerosLike = op({ zerosLike_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/div_no_nan.js\nfunction divNoNan_(a, b) {\n let $a = convertToTensor(a, \"a\", \"div\");\n let $b = convertToTensor(b, \"b\", \"div\");\n [$a, $b] = makeTypesMatch($a, $b);\n const divResult = div($a, $b);\n const zeros4 = zerosLike(divResult);\n const bEqualsZero = equal($b, zeros4);\n return where(bEqualsZero, zeros4, divResult);\n}\nvar divNoNan = op({ divNoNan_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/dot.js\nfunction dot_(t1, t2) {\n const $t1 = convertToTensor(t1, \"t1\", \"dot\");\n const $t2 = convertToTensor(t2, \"t2\", \"dot\");\n assert(($t1.rank === 1 || $t1.rank === 2) && ($t2.rank === 1 || $t2.rank === 2), () => `Error in dot: inputs must all be rank 1 or 2, but got ranks ${$t1.rank} and ${$t2.rank}.`);\n const t1Inner = $t1.rank === 1 ? $t1.size : $t1.shape[1];\n const t2Inner = $t2.rank === 1 ? $t2.size : $t2.shape[0];\n assert(t1Inner === t2Inner, () => `Error in dot: inner dimensions of inputs must match, but got ${t1Inner} and ${t2Inner}.`);\n if ($t1.rank === 1 && $t2.rank === 1) {\n const t12D = reshape($t1, [1, -1]);\n const t22D = reshape($t2, [-1, 1]);\n const t1t2 = matMul(t12D, t22D);\n return reshape(t1t2, []);\n } else if ($t1.rank === 1 && $t2.rank === 2) {\n const t12D = reshape($t1, [1, -1]);\n const t22D = reshape($t2, [$t2.shape[0], $t2.shape[1]]);\n const t1t2 = matMul(t12D, t22D);\n return reshape(t1t2, [t1t2.size]);\n } else if ($t1.rank === 2 && $t2.rank === 1) {\n const t22D = reshape($t2, [-1, 1]);\n const t1t2 = matMul($t1, t22D);\n return reshape(t1t2, [t1t2.size]);\n } else {\n const t22D = reshape($t2, [$t2.shape[0], $t2.shape[1]]);\n const t1t2 = matMul($t1, t22D);\n return t1t2;\n }\n}\nvar dot = op({ dot_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/einsum.js\nfunction einsum_(equation, ...tensors) {\n const $tensors = tensors.map((t2, i2) => convertToTensor(t2, `tensors${i2}`, \"einsum\"));\n const attrs = { equation };\n return ENGINE.runKernel(Einsum, $tensors, attrs);\n}\nvar einsum = op({ einsum_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/elu.js\nfunction elu_(x) {\n const $x = convertToTensor(x, \"x\", \"elu\", \"float32\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Elu, inputs);\n}\nvar elu = op({ elu_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/erf.js\nfunction erf_(x) {\n let $x = convertToTensor(x, \"x\", \"erf\");\n assert($x.dtype === \"int32\" || $x.dtype === \"float32\", () => \"Input dtype must be `int32` or `float32`.\");\n if ($x.dtype === \"int32\") {\n $x = cast($x, \"float32\");\n }\n const inputs = { x: $x };\n return ENGINE.runKernel(Erf, inputs);\n}\nvar erf = op({ erf_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/axis_util.js\nfunction axesAreInnerMostDims(axes, rank) {\n for (let i2 = 0; i2 < axes.length; ++i2) {\n if (axes[axes.length - i2 - 1] !== rank - 1 - i2) {\n return false;\n }\n }\n return true;\n}\nfunction combineLocations(outputLoc, reduceLoc, axes) {\n const rank = outputLoc.length + reduceLoc.length;\n const loc = [];\n let outIdx = 0;\n let reduceIdx = 0;\n for (let dim = 0; dim < rank; dim++) {\n if (axes.indexOf(dim) === -1) {\n loc.push(outputLoc[outIdx++]);\n } else {\n loc.push(reduceLoc[reduceIdx++]);\n }\n }\n return loc;\n}\nfunction computeOutAndReduceShapes(aShape, axes) {\n const outShape = [];\n const rank = aShape.length;\n for (let dim = 0; dim < rank; dim++) {\n if (axes.indexOf(dim) === -1) {\n outShape.push(aShape[dim]);\n }\n }\n const reduceShape = axes.map((dim) => aShape[dim]);\n return [outShape, reduceShape];\n}\nfunction expandShapeToKeepDim(shape, axes) {\n const reduceSubShape = axes.map((x) => 1);\n return combineLocations(shape, reduceSubShape, axes);\n}\nfunction assertAxesAreInnerMostDims(msg, axes, rank) {\n assert(axesAreInnerMostDims(axes, rank), () => `${msg} supports only inner-most axes for now. Got axes ${axes} and rank-${rank} input.`);\n}\nfunction getAxesPermutation(axes, rank) {\n if (axesAreInnerMostDims(axes, rank)) {\n return null;\n }\n const result = [];\n for (let i2 = 0; i2 < rank; ++i2) {\n if (axes.indexOf(i2) === -1) {\n result.push(i2);\n }\n }\n axes.forEach((axis) => result.push(axis));\n return result;\n}\nfunction getUndoAxesPermutation(axes) {\n return axes.map((axis, i2) => [i2, axis]).sort((a, b) => a[1] - b[1]).map((x) => x[0]);\n}\nfunction getInnerMostAxes(numAxes, rank) {\n const res = [];\n for (let i2 = rank - numAxes; i2 < rank; ++i2) {\n res.push(i2);\n }\n return res;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/max.js\nfunction max_(x, axis = null, keepDims = false) {\n const $x = convertToTensor(x, \"x\", \"max\");\n const inputs = { x: $x };\n const attrs = { reductionIndices: axis, keepDims };\n return ENGINE.runKernel(Max, inputs, attrs);\n}\nvar max = op({ max_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/min.js\nfunction min_(x, axis = null, keepDims = false) {\n const $x = convertToTensor(x, \"x\", \"min\");\n const inputs = { x: $x };\n const attrs = { axis, keepDims };\n return ENGINE.runKernel(Min, inputs, attrs);\n}\nvar min = op({ min_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/pow.js\nfunction pow_(base, exp5) {\n let $base = convertToTensor(base, \"base\", \"pow\");\n let $exp = convertToTensor(exp5, \"exp\", \"pow\");\n [$base, $exp] = makeTypesMatch($base, $exp);\n const inputs = { a: $base, b: $exp };\n return ENGINE.runKernel(Pow, inputs);\n}\nvar pow = op({ pow_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/scalar.js\nfunction scalar(value, dtype) {\n if ((isTypedArray(value) && dtype !== \"string\" || Array.isArray(value)) && dtype !== \"complex64\") {\n throw new Error(\"Error creating a new Scalar: value must be a primitive (number|boolean|string)\");\n }\n if (dtype === \"string\" && isTypedArray(value) && !(value instanceof Uint8Array)) {\n throw new Error(\"When making a scalar from encoded string, the value must be `Uint8Array`.\");\n }\n const shape = [];\n const inferredShape = [];\n return makeTensor(value, shape, inferredShape, dtype);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/sqrt.js\nfunction sqrt_(x) {\n const $x = convertToTensor(x, \"x\", \"sqrt\", \"float32\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Sqrt, inputs);\n}\nvar sqrt = op({ sqrt_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/square.js\nfunction square_(x) {\n const $x = convertToTensor(x, \"x\", \"square\");\n const attrs = {};\n return ENGINE.runKernel(\"Square\", { x: $x }, attrs);\n}\nvar square = op({ square_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/sum.js\nfunction sum_(x, axis = null, keepDims = false) {\n let $x = convertToTensor(x, \"x\", \"sum\");\n if ($x.dtype === \"bool\") {\n $x = cast($x, \"int32\");\n }\n const inputs = { x: $x };\n const attrs = { axis, keepDims };\n return ENGINE.runKernel(Sum, inputs, attrs);\n}\nvar sum2 = op({ sum_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/norm.js\nfunction norm_(x, ord = \"euclidean\", axis = null, keepDims = false) {\n x = convertToTensor(x, \"x\", \"norm\");\n const norm2 = normImpl(x, ord, axis);\n let keepDimsShape = norm2.shape;\n if (keepDims) {\n const axes = parseAxisParam(axis, x.shape);\n keepDimsShape = expandShapeToKeepDim(norm2.shape, axes);\n }\n return reshape(norm2, keepDimsShape);\n}\nfunction normImpl(x, p2, axis = null) {\n if (x.rank === 0) {\n return abs(x);\n }\n if (x.rank !== 1 && axis === null) {\n return normImpl(reshape(x, [-1]), p2, axis);\n }\n if (x.rank === 1 || typeof axis === \"number\" || Array.isArray(axis) && axis.length === 1) {\n if (p2 === 1) {\n return sum2(abs(x), axis);\n }\n if (p2 === Infinity) {\n return max(abs(x), axis);\n }\n if (p2 === -Infinity) {\n return min(abs(x), axis);\n }\n if (p2 === \"euclidean\" || p2 === 2) {\n return sqrt(sum2(pow(abs(x), scalar(2, \"int32\")), axis));\n }\n throw new Error(`Error in norm: invalid ord value: ${p2}`);\n }\n if (Array.isArray(axis) && axis.length === 2) {\n if (p2 === 1) {\n return max(sum2(abs(x), axis[0]), axis[1] - 1);\n }\n if (p2 === Infinity) {\n return max(sum2(abs(x), axis[1]), axis[0]);\n }\n if (p2 === -Infinity) {\n return min(sum2(abs(x), axis[1]), axis[0]);\n }\n if (p2 === \"fro\" || p2 === \"euclidean\") {\n return sqrt(sum2(square(x), axis));\n }\n throw new Error(`Error in norm: invalid ord value: ${p2}`);\n }\n throw new Error(`Error in norm: invalid axis: ${axis}`);\n}\nvar norm = op({ norm_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/euclidean_norm.js\nfunction euclideanNorm_(x, axis = null, keepDims = false) {\n return norm(x, \"euclidean\", axis, keepDims);\n}\nvar euclideanNorm = op({ euclideanNorm_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/exp.js\nfunction exp_(x) {\n const $x = convertToTensor(x, \"x\", \"exp\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Exp, inputs);\n}\nvar exp = op({ exp_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/expand_dims.js\nfunction expandDims_(x, axis = 0) {\n const $x = convertToTensor(x, \"x\", \"expandDims\", \"string_or_numeric\");\n assert(axis <= $x.rank, () => \"Axis must be <= rank of the tensor\");\n const inputs = { input: $x };\n const attrs = { dim: axis };\n return ENGINE.runKernel(ExpandDims, inputs, attrs);\n}\nvar expandDims = op({ expandDims_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/expm1.js\nfunction expm1_(x) {\n const $x = convertToTensor(x, \"x\", \"expm1\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Expm1, inputs);\n}\nvar expm1 = op({ expm1_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/tile.js\nfunction tile_(x, reps) {\n const $x = convertToTensor(x, \"x\", \"tile\", \"string_or_numeric\");\n assert($x.rank === reps.length, () => `Error in transpose: rank of input ${$x.rank} must match length of reps ${reps}.`);\n const inputs = { x: $x };\n const attrs = { reps };\n return ENGINE.runKernel(Tile, inputs, attrs);\n}\nvar tile = op({ tile_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/eye.js\nfunction eye_(numRows, numColumns, batchShape, dtype = \"float32\") {\n if (numColumns == null) {\n numColumns = numRows;\n }\n const buff = buffer([numRows, numColumns], dtype);\n const n2 = numRows <= numColumns ? numRows : numColumns;\n for (let i2 = 0; i2 < n2; ++i2) {\n buff.set(1, i2, i2);\n }\n const out = reshape(buff.toTensor(), [numRows, numColumns]);\n if (batchShape == null) {\n return out;\n } else {\n if (batchShape.length === 1) {\n return tile(expandDims(out, 0), [batchShape[0], 1, 1]);\n } else if (batchShape.length === 2) {\n return tile(expandDims(expandDims(out, 0), 0), [batchShape[0], batchShape[1], 1, 1]);\n } else if (batchShape.length === 3) {\n return tile(expandDims(expandDims(expandDims(out, 0), 0), 0), [\n batchShape[0],\n batchShape[1],\n batchShape[2],\n 1,\n 1\n ]);\n } else {\n throw new Error(`eye() currently supports only 1D and 2D batchShapes, but received ${batchShape.length}D.`);\n }\n }\n}\nvar eye = op({ eye_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/floor.js\nfunction floor_(x) {\n const $x = convertToTensor(x, \"x\", \"floor\", \"float32\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Floor, inputs);\n}\nvar floor = op({ floor_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/gather.js\nfunction gather_(x, indices, axis = 0, batchDims = 0) {\n const $x = convertToTensor(x, \"x\", \"gather\");\n const $indices = convertToTensor(indices, \"indices\", \"gather\", \"int32\");\n const inputs = { x: $x, indices: $indices };\n const attrs = { axis, batchDims };\n return ENGINE.runKernel(GatherV2, inputs, attrs);\n}\nvar gather = op({ gather_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/greater.js\nfunction greater_(a, b) {\n let $a = convertToTensor(a, \"a\", \"greater\", \"string_or_numeric\");\n let $b = convertToTensor(b, \"b\", \"greater\", \"string_or_numeric\");\n [$a, $b] = makeTypesMatch($a, $b);\n assertAndGetBroadcastShape($a.shape, $b.shape);\n const inputs = { a: $a, b: $b };\n return ENGINE.runKernel(Greater, inputs);\n}\nvar greater = op({ greater_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/greater_equal.js\nfunction greaterEqual_(a, b) {\n let $a = convertToTensor(a, \"a\", \"greaterEqual\", \"string_or_numeric\");\n let $b = convertToTensor(b, \"b\", \"greaterEqual\", \"string_or_numeric\");\n [$a, $b] = makeTypesMatch($a, $b);\n assertAndGetBroadcastShape($a.shape, $b.shape);\n const inputs = { a: $a, b: $b };\n return ENGINE.runKernel(GreaterEqual, inputs);\n}\nvar greaterEqual = op({ greaterEqual_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/is_finite.js\nfunction isFinite_(x) {\n const $x = convertToTensor(x, \"x\", \"isFinite\");\n const inputs = { x: $x };\n return ENGINE.runKernel(IsFinite, inputs);\n}\nvar isFinite2 = op({ isFinite_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/is_inf.js\nfunction isInf_(x) {\n const $x = convertToTensor(x, \"x\", \"isInf\");\n const inputs = { x: $x };\n return ENGINE.runKernel(IsInf, inputs);\n}\nvar isInf = op({ isInf_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/is_nan.js\nfunction isNaN_(x) {\n const $x = convertToTensor(x, \"x\", \"isNaN\");\n const inputs = { x: $x };\n return ENGINE.runKernel(IsNan, inputs);\n}\nvar isNaN2 = op({ isNaN_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/leaky_relu.js\nfunction leakyRelu_(x, alpha = 0.2) {\n const $x = convertToTensor(x, \"x\", \"leakyRelu\");\n const inputs = { x: $x };\n const attrs = { alpha };\n return ENGINE.runKernel(LeakyRelu, inputs, attrs);\n}\nvar leakyRelu = op({ leakyRelu_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/less.js\nfunction less_(a, b) {\n let $a = convertToTensor(a, \"a\", \"less\", \"string_or_numeric\");\n let $b = convertToTensor(b, \"b\", \"less\", \"string_or_numeric\");\n [$a, $b] = makeTypesMatch($a, $b);\n assertAndGetBroadcastShape($a.shape, $b.shape);\n const inputs = { a: $a, b: $b };\n return ENGINE.runKernel(Less, inputs);\n}\nvar less = op({ less_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/less_equal.js\nfunction lessEqual_(a, b) {\n let $a = convertToTensor(a, \"a\", \"lessEqual\", \"string_or_numeric\");\n let $b = convertToTensor(b, \"b\", \"lessEqual\", \"string_or_numeric\");\n [$a, $b] = makeTypesMatch($a, $b);\n assertAndGetBroadcastShape($a.shape, $b.shape);\n const inputs = { a: $a, b: $b };\n return ENGINE.runKernel(LessEqual, inputs);\n}\nvar lessEqual = op({ lessEqual_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/linspace.js\nfunction linspace(start, stop, num) {\n if (num <= 0) {\n throw new Error(\"The number of values should be positive.\");\n }\n const attrs = { start, stop, num };\n return ENGINE.runKernel(LinSpace, {}, attrs);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/local_response_normalization.js\nfunction localResponseNormalization_(x, depthRadius = 5, bias = 1, alpha = 1, beta = 0.5) {\n const $x = convertToTensor(x, \"x\", \"localResponseNormalization\");\n assert($x.rank === 4 || $x.rank === 3, () => `Error in localResponseNormalization: x must be rank 3 or 4 but got\n rank ${$x.rank}.`);\n assert(isInt(depthRadius), () => `Error in localResponseNormalization: depthRadius must be an integer but got depthRadius ${depthRadius}.`);\n let x4D = $x;\n let reshapedTo4D = false;\n if ($x.rank === 3) {\n reshapedTo4D = true;\n x4D = reshape($x, [1, $x.shape[0], $x.shape[1], $x.shape[2]]);\n }\n const inputs = { x: x4D };\n const attrs = { depthRadius, bias, alpha, beta };\n const res = ENGINE.runKernel(LRN, inputs, attrs);\n if (reshapedTo4D) {\n return reshape(res, [res.shape[1], res.shape[2], res.shape[3]]);\n } else {\n return res;\n }\n}\nvar localResponseNormalization = op({ localResponseNormalization_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/log.js\nfunction log_(x) {\n const $x = convertToTensor(x, \"x\", \"log\", \"float32\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Log, inputs);\n}\nvar log2 = op({ log_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/log1p.js\nfunction log1p_(x) {\n const $x = convertToTensor(x, \"x\", \"log1p\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Log1p, inputs);\n}\nvar log1p = op({ log1p_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients.js\nfunction grad(f) {\n assert(isFunction(f), () => \"The f passed in grad(f) must be a function\");\n return (x, dy) => {\n const $x = convertToTensor(x, \"x\", \"tf.grad\", \"string_or_numeric\");\n const $dy = dy != null ? convertToTensor(dy, \"dy\", \"tf.grad\") : null;\n return ENGINE.tidy(() => {\n const { value, grads: grads2 } = ENGINE.gradients(() => f($x), [$x], $dy);\n if ($dy != null) {\n assertShapesMatch(value.shape, $dy.shape, \"The shape of dy passed in grad(f)(x, dy) must match the shape returned by f(x)\");\n }\n checkGrads(grads2);\n return grads2[0];\n });\n };\n}\nfunction grads(f) {\n assert(isFunction(f), () => \"The f passed in grads(f) must be a function\");\n return (args, dy) => {\n assert(Array.isArray(args), () => \"The args passed in grads(f)(args) must be an array of `Tensor`s or `TensorLike`s\");\n const $args = convertToTensorArray(args, \"args\", \"tf.grads\", \"string_or_numeric\");\n const $dy = dy != null ? convertToTensor(dy, \"dy\", \"tf.grads\") : null;\n return ENGINE.tidy(() => {\n const { value, grads: grads2 } = ENGINE.gradients(() => f(...$args), $args, $dy);\n if ($dy != null) {\n assertShapesMatch(value.shape, $dy.shape, \"The shape of dy passed in grads(f)([x1,...], dy) must match the shape returned by f([x1,...])\");\n }\n checkGrads(grads2);\n return grads2;\n });\n };\n}\nfunction valueAndGrad(f) {\n assert(isFunction(f), () => \"The f passed in valueAndGrad(f) must be a function\");\n return (x, dy) => {\n assert(x instanceof Tensor, () => \"The x passed in valueAndGrad(f)(x) must be a tensor\");\n assert(dy == null || dy instanceof Tensor, () => \"The dy passed in valueAndGrad(f)(x, dy) must be a tensor\");\n const { grads: grads2, value } = ENGINE.gradients(() => f(x), [x], dy);\n checkGrads(grads2);\n return { grad: grads2[0], value };\n };\n}\nfunction valueAndGrads(f) {\n assert(isFunction(f), () => \"The f passed in valueAndGrads(f) must be a function\");\n return (args, dy) => {\n assert(Array.isArray(args) && args.every((arg) => arg instanceof Tensor), () => \"The args passed in valueAndGrads(f)(args) must be array of tensors\");\n assert(dy == null || dy instanceof Tensor, () => \"The dy passed in valueAndGrads(f)(args, dy) must be a tensor\");\n const res = ENGINE.gradients(() => f(...args), args, dy);\n if (dy != null) {\n assertShapesMatch(res.value.shape, dy.shape, \"The shape of dy passed in valueAndGrads(f)([x1,...], dy) must match the shape returned by f([x1,...])\");\n }\n checkGrads(res.grads);\n return res;\n };\n}\nfunction variableGrads(f, varList) {\n assert(isFunction(f), () => \"The f passed in variableGrads(f) must be a function\");\n assert(varList == null || Array.isArray(varList) && varList.every((v) => v instanceof Variable), () => \"The varList passed in variableGrads(f, varList) must be an array of variables\");\n const specifiedVarList = varList != null;\n if (!specifiedVarList) {\n varList = [];\n for (const varName in ENGINE.registeredVariables) {\n varList.push(ENGINE.registeredVariables[varName]);\n }\n }\n const specifiedNonTrainable = specifiedVarList ? varList.filter((variable2) => !variable2.trainable) : null;\n const originalVarCount = varList.length;\n varList = varList.filter((variable2) => variable2.trainable);\n assert(varList.length > 0, () => `variableGrads() expects at least one of the input variables to be trainable, but none of the ${originalVarCount} variables is trainable.`);\n const allowNoGradients = true;\n const { value, grads: grads2 } = ENGINE.gradients(f, varList, null, allowNoGradients);\n assert(grads2.some((g) => g != null), () => \"Cannot find a connection between any variable and the result of the loss function y=f(x). Please make sure the operations that use variables are inside the function f passed to minimize().\");\n assert(value.rank === 0, () => `The f passed in variableGrads(f) must return a scalar, but it returned a rank-${value.rank} tensor`);\n const namedGrads = {};\n varList.forEach((v, i2) => {\n if (grads2[i2] != null) {\n namedGrads[v.name] = grads2[i2];\n }\n });\n if (specifiedNonTrainable != null) {\n specifiedNonTrainable.forEach((v) => namedGrads[v.name] = null);\n }\n return { value, grads: namedGrads };\n}\nfunction customGrad(f) {\n return ENGINE.customGrad(f);\n}\nfunction checkGrads(grads2) {\n const numNullGradients = grads2.filter((g) => g == null).length;\n if (numNullGradients > 0) {\n throw new Error(`Cannot compute gradient of y=f(x) with respect to x. Make sure that\n the f you passed encloses all operations that lead from x to y.`);\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/softplus.js\nfunction softplus_(x) {\n const $x = convertToTensor(x, \"x\", \"softplus\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Softplus, inputs);\n}\nvar softplus = op({ softplus_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/log_sigmoid.js\nfunction logSigmoid_(x) {\n const $x = convertToTensor(x, \"x\", \"logSigmoid\");\n const customOp = customGrad((x2) => {\n const value = neg(softplus(neg(x2)));\n const gradFunc = (dy) => {\n const derX = mul(dy, sigmoid(neg(x2)));\n return derX;\n };\n return { value, gradFunc };\n });\n return customOp($x);\n}\nvar logSigmoid = op({ logSigmoid_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/sub.js\nfunction sub_(a, b) {\n let $a = convertToTensor(a, \"a\", \"sub\");\n let $b = convertToTensor(b, \"b\", \"sub\");\n [$a, $b] = makeTypesMatch($a, $b);\n const inputs = { a: $a, b: $b };\n return ENGINE.runKernel(Sub, inputs);\n}\nvar sub = op({ sub_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/log_softmax.js\nfunction logSoftmax_(logits, axis = -1) {\n const $logits = convertToTensor(logits, \"logits\", \"logSoftmax\");\n if (axis === -1) {\n axis = $logits.rank - 1;\n }\n if (axis !== $logits.rank - 1) {\n throw Error(`Log Softmax along a non-last dimension is not yet supported. Logits was rank ${$logits.rank} and axis was ${axis}`);\n }\n const customOp = customGrad((logits2, save) => {\n const keepDims = true;\n const xMax = max(logits2, axis, true);\n const shifted = sub(logits2, xMax);\n const value = sub(cast(shifted, \"float32\"), log2(sum2(exp(shifted), axis, keepDims)));\n save([value]);\n const gradFunc = (dy, saved) => {\n const [value2] = saved;\n const keepDims2 = true;\n const softmax7 = exp(value2);\n return sub(dy, mul(sum2(dy, axis, keepDims2), softmax7));\n };\n return { value, gradFunc };\n });\n return customOp($logits);\n}\nvar logSoftmax = op({ logSoftmax_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/log_sum_exp.js\nfunction logSumExp_(x, axis = null, keepDims = false) {\n const $x = convertToTensor(x, \"x\", \"logSumExp\");\n const axes = parseAxisParam(axis, $x.shape);\n const xMax = max($x, axes, true);\n const a = sub($x, xMax);\n const b = exp(a);\n const c = sum2(b, axes);\n const d = log2(c);\n const res = add2(reshape(xMax, d.shape), d);\n if (keepDims) {\n const newShape = expandShapeToKeepDim(res.shape, axes);\n return reshape(res, newShape);\n }\n return res;\n}\nvar logSumExp = op({ logSumExp_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/logical_and.js\nfunction logicalAnd_(a, b) {\n const $a = convertToTensor(a, \"a\", \"logicalAnd\", \"bool\");\n const $b = convertToTensor(b, \"b\", \"logicalAnd\", \"bool\");\n assertAndGetBroadcastShape($a.shape, $b.shape);\n const inputs = { a: $a, b: $b };\n return ENGINE.runKernel(LogicalAnd, inputs);\n}\nvar logicalAnd = op({ logicalAnd_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/logical_not.js\nfunction logicalNot_(x) {\n const $x = convertToTensor(x, \"x\", \"logicalNot\", \"bool\");\n const inputs = { x: $x };\n return ENGINE.runKernel(LogicalNot, inputs);\n}\nvar logicalNot = op({ logicalNot_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/logical_or.js\nfunction logicalOr_(a, b) {\n const $a = convertToTensor(a, \"a\", \"logicalOr\", \"bool\");\n const $b = convertToTensor(b, \"b\", \"logicalOr\", \"bool\");\n assertAndGetBroadcastShape($a.shape, $b.shape);\n const inputs = { a: $a, b: $b };\n return ENGINE.runKernel(LogicalOr, inputs);\n}\nvar logicalOr = op({ logicalOr_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/logical_xor.js\nfunction logicalXor_(a, b) {\n const $a = convertToTensor(a, \"a\", \"logicalXor\", \"bool\");\n const $b = convertToTensor(b, \"b\", \"logicalXor\", \"bool\");\n assertAndGetBroadcastShape($a.shape, $b.shape);\n return logicalAnd(logicalOr(a, b), logicalNot(logicalAnd(a, b)));\n}\nvar logicalXor = op({ logicalXor_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/search_sorted.js\nvar INT32_MAX = 2147483648;\nfunction searchSorted_(sortedSequence, values, side = \"left\") {\n const $sortedSequence = convertToTensor(sortedSequence, \"sortedSequence\", \"searchSorted\");\n const $values = convertToTensor(values, \"values\", \"searchSorted\");\n const sequenceSize = $sortedSequence.shape[$sortedSequence.shape.length - 1];\n const valuesSize = $values.shape[$values.shape.length - 1];\n const $sortedSequence2D = reshape($sortedSequence, [-1, sequenceSize]);\n const $values2D = reshape($values, [-1, valuesSize]);\n if ($sortedSequence2D.rank < 2) {\n throw new Error(`Sorted input argument must be at least 2-dimensional`);\n }\n if ($sortedSequence2D.shape[0] !== $values2D.shape[0]) {\n throw new Error(`Leading dimension of 'sortedSequence' and 'values' must match.`);\n }\n if (sizeFromShape($values2D.shape) >= INT32_MAX) {\n throw new Error(`values tensor size must less than ${INT32_MAX}`);\n }\n if ($sortedSequence2D.shape[1] >= INT32_MAX) {\n throw new Error(`trailing dim_size must less than ${INT32_MAX} for int32 output type, was ${$sortedSequence2D.shape[1]}`);\n }\n const inputs = {\n sortedSequence: $sortedSequence2D,\n values: $values2D\n };\n const attrs = { side };\n return ENGINE.runKernel(SearchSorted, inputs, attrs);\n}\nvar searchSorted = op({ searchSorted_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/lower_bound.js\nfunction lowerBound(sortedSequence, values) {\n return searchSorted(sortedSequence, values, \"left\");\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/max_pool.js\nfunction maxPool_(x, filterSize, strides, pad3, dimRoundingMode) {\n const $x = convertToTensor(x, \"x\", \"maxPool\");\n const dilations = 1;\n let x4D = $x;\n let reshapedTo4D = false;\n if ($x.rank === 3) {\n reshapedTo4D = true;\n x4D = reshape($x, [1, $x.shape[0], $x.shape[1], $x.shape[2]]);\n }\n assert(x4D.rank === 4, () => `Error in maxPool: input must be rank 4 but got rank ${x4D.rank}.`);\n assert(eitherStridesOrDilationsAreOne(strides, dilations), () => `Error in maxPool: Either strides or dilations must be 1. Got strides ${strides} and dilations '${dilations}'`);\n checkPadOnDimRoundingMode(\"maxPool\", pad3, dimRoundingMode);\n const inputs = { x: x4D };\n const attrs = { filterSize, strides, pad: pad3, dimRoundingMode };\n const res = ENGINE.runKernel(MaxPool, inputs, attrs);\n if (reshapedTo4D) {\n return reshape(res, [res.shape[1], res.shape[2], res.shape[3]]);\n }\n return res;\n}\nvar maxPool = op({ maxPool_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/max_pool_3d.js\nfunction maxPool3d_(x, filterSize = [1, 1, 1], strides, pad3, dimRoundingMode, dataFormat = \"NDHWC\") {\n const $x = convertToTensor(x, \"x\", \"maxPool3d\");\n let x5D = $x;\n let reshapedTo5D = false;\n if ($x.rank === 4) {\n reshapedTo5D = true;\n x5D = reshape($x, [1, $x.shape[0], $x.shape[1], $x.shape[2], $x.shape[3]]);\n }\n assert(x5D.rank === 5, () => `Error in maxPool3d: x must be rank 5 but got rank ${x5D.rank}.`);\n assert(dataFormat === \"NDHWC\", () => `Error in maxPool3d: Only NDHWC is currently supported, but got dataFormat of ${dataFormat}`);\n checkPadOnDimRoundingMode(\"maxPool3d\", pad3, dimRoundingMode);\n const inputs = { x: x5D };\n const attrs = { filterSize, strides, pad: pad3, dimRoundingMode, dataFormat };\n const res = ENGINE.runKernel(MaxPool3D, inputs, attrs);\n if (reshapedTo5D) {\n return reshape(res, [res.shape[1], res.shape[2], res.shape[3], res.shape[4]]);\n }\n return res;\n}\nvar maxPool3d = op({ maxPool3d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/max_pool_with_argmax.js\nfunction maxPoolWithArgmax_(x, filterSize, strides, pad3, includeBatchInIndex = false) {\n const $x = convertToTensor(x, \"x\", \"maxPoolWithArgmax\");\n const inputs = { x: $x };\n const attrs = { filterSize, strides, pad: pad3, includeBatchInIndex };\n const result = ENGINE.runKernel(MaxPoolWithArgmax, inputs, attrs);\n return { result: result[0], indexes: result[1] };\n}\nvar maxPoolWithArgmax = op({ maxPoolWithArgmax_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/maximum.js\nfunction maximum_(a, b) {\n let $a = convertToTensor(a, \"a\", \"maximum\");\n let $b = convertToTensor(b, \"b\", \"maximum\");\n [$a, $b] = makeTypesMatch($a, $b);\n if ($a.dtype === \"bool\") {\n $a = cast($a, \"int32\");\n $b = cast($b, \"int32\");\n }\n assertAndGetBroadcastShape($a.shape, $b.shape);\n const inputs = { a: $a, b: $b };\n return ENGINE.runKernel(Maximum, inputs);\n}\nvar maximum = op({ maximum_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/mean.js\nfunction mean_(x, axis = null, keepDims = false) {\n const $x = convertToTensor(x, \"x\", \"mean\");\n const inputs = { x: $x };\n const attrs = { axis, keepDims };\n return ENGINE.runKernel(Mean, inputs, attrs);\n}\nvar mean = op({ mean_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/zeros.js\nfunction zeros(shape, dtype = \"float32\") {\n if (dtype === \"complex64\") {\n const real5 = zeros(shape, \"float32\");\n const imag5 = zeros(shape, \"float32\");\n return complex(real5, imag5);\n }\n const values = makeZerosTypedArray(sizeFromShape(shape), dtype);\n return ENGINE.makeTensor(values, shape, dtype);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/ones.js\nfunction ones2(shape, dtype = \"float32\") {\n if (dtype === \"complex64\") {\n const real5 = ones2(shape, \"float32\");\n const imag5 = zeros(shape, \"float32\");\n return complex(real5, imag5);\n }\n const values = makeOnesTypedArray(sizeFromShape(shape), dtype);\n return ENGINE.makeTensor(values, shape, dtype);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/meshgrid.js\nfunction meshgrid(x, y, { indexing = \"xy\" } = {}) {\n if (indexing !== \"xy\" && indexing !== \"ij\") {\n throw new TypeError(`${indexing} is not a valid third argument to meshgrid`);\n }\n if (x === void 0) {\n return [];\n }\n let $x = convertToTensor(x, \"x\", \"meshgrid\", x instanceof Tensor ? x.dtype : \"float32\");\n if (y === void 0) {\n return [$x];\n }\n let $y = convertToTensor(y, \"y\", \"meshgrid\", y instanceof Tensor ? y.dtype : \"float32\");\n const w = sizeFromShape($x.shape);\n const h = sizeFromShape($y.shape);\n if (indexing === \"xy\") {\n $x = reshape($x, [1, -1]);\n $y = reshape($y, [-1, 1]);\n return [\n matMul(ones2([h, 1], $x.dtype), $x),\n matMul($y, ones2([1, w], $y.dtype))\n ];\n }\n $x = reshape($x, [-1, 1]);\n $y = reshape($y, [1, -1]);\n return [\n matMul($x, ones2([1, h], $x.dtype)),\n matMul(ones2([w, 1], $y.dtype), $y)\n ];\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/minimum.js\nfunction minimum_(a, b) {\n let $a = convertToTensor(a, \"a\", \"minimum\");\n let $b = convertToTensor(b, \"b\", \"minimum\");\n [$a, $b] = makeTypesMatch($a, $b);\n if ($a.dtype === \"bool\") {\n $a = cast($a, \"int32\");\n $b = cast($b, \"int32\");\n }\n assertAndGetBroadcastShape($a.shape, $b.shape);\n const inputs = { a: $a, b: $b };\n return ENGINE.runKernel(Minimum, inputs);\n}\nvar minimum = op({ minimum_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/mirror_pad.js\nfunction mirrorPad_(x, paddings, mode) {\n assert(mode === \"reflect\" || mode === \"symmetric\", () => `Invalid mode. Mode must be either reflect or symmetric. Got ${mode}.`);\n const $x = convertToTensor(x, \"x\", \"mirrorPad\");\n if ($x.rank === 0) {\n throw new Error(\"mirrorPad(scalar) is not defined. Pass non-scalar to mirrorPad\");\n }\n assert(paddings.length === $x.rank, () => `Padding doesn't match input. Must be ${$x.rank}. Got ${paddings.length}.`);\n const shapeOffset = mode === \"reflect\" ? 1 : 0;\n for (let i2 = 0; i2 < $x.rank; i2++) {\n assert(paddings[i2].length === 2, () => `Invalid number of paddings. Must be length of 2 each.`);\n assert(paddings[i2][0] >= 0 && paddings[i2][0] <= $x.shape[i2] - shapeOffset && paddings[i2][1] >= 0 && paddings[i2][1] <= $x.shape[i2] - shapeOffset, () => `Padding in dimension ${i2} cannot be greater than or equal to ${$x.shape[i2] - shapeOffset} or less than 0 for input of shape ${$x.shape}`);\n }\n const attrs = { paddings, mode };\n const inputs = { x: $x };\n return ENGINE.runKernel(MirrorPad, inputs, attrs);\n}\nvar mirrorPad = op({ mirrorPad_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/mod.js\nfunction mod_(a, b) {\n let $a = convertToTensor(a, \"a\", \"mod\");\n let $b = convertToTensor(b, \"b\", \"mod\");\n [$a, $b] = makeTypesMatch($a, $b);\n const inputs = { a: $a, b: $b };\n return ENGINE.runKernel(Mod, inputs);\n}\nvar mod = op({ mod_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/moments.js\nfunction moments_(x, axis = null, keepDims = false) {\n x = convertToTensor(x, \"x\", \"moments\");\n const axes = parseAxisParam(axis, x.shape);\n const xMean = mean(x, axes, keepDims);\n let keepDimsShape = xMean.shape;\n if (!keepDims) {\n keepDimsShape = expandShapeToKeepDim(xMean.shape, axes);\n }\n const devSquared = square(sub(cast(x, \"float32\"), reshape(xMean, keepDimsShape)));\n const variance = mean(devSquared, axes, keepDims);\n return { mean: xMean, variance };\n}\nvar moments = op({ moments_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/multi_rnn_cell.js\nfunction multiRNNCell_(lstmCells, data, c, h) {\n const $data = convertToTensor(data, \"data\", \"multiRNNCell\");\n const $c = convertToTensorArray(c, \"c\", \"multiRNNCell\");\n const $h = convertToTensorArray(h, \"h\", \"multiRNNCell\");\n let input2 = $data;\n const newStates = [];\n for (let i2 = 0; i2 < lstmCells.length; i2++) {\n const output = lstmCells[i2](input2, $c[i2], $h[i2]);\n newStates.push(output[0]);\n newStates.push(output[1]);\n input2 = output[1];\n }\n const newC = [];\n const newH = [];\n for (let i2 = 0; i2 < newStates.length; i2 += 2) {\n newC.push(newStates[i2]);\n newH.push(newStates[i2 + 1]);\n }\n return [newC, newH];\n}\nvar multiRNNCell = op({ multiRNNCell_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/multinomial.js\nfunction multinomial_(logits, numSamples, seed, normalized = false) {\n const $logits = convertToTensor(logits, \"logits\", \"multinomial\");\n const numOutcomes = $logits.size;\n const origRank = $logits.rank;\n if (numOutcomes < 2) {\n throw new Error(`Error in multinomial: you need at least 2 outcomes, but got ${numOutcomes}.`);\n }\n if (origRank > 2) {\n throw new Error(`Rank of probabilities must be 1 or 2, but is ${origRank}`);\n }\n seed = seed || Math.random();\n const logits2D = origRank === 1 ? reshape($logits, [1, -1]) : $logits;\n const inputs = { logits: logits2D };\n const attrs = { numSamples, seed, normalized };\n const res = ENGINE.runKernel(Multinomial, inputs, attrs);\n return origRank === 1 ? reshape(res, [res.size]) : res;\n}\nvar multinomial = op({ multinomial_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/not_equal.js\nfunction notEqual_(a, b) {\n let $a = convertToTensor(a, \"a\", \"notEqual\", \"string_or_numeric\");\n let $b = convertToTensor(b, \"b\", \"notEqual\", \"string_or_numeric\");\n [$a, $b] = makeTypesMatch($a, $b);\n assertAndGetBroadcastShape($a.shape, $b.shape);\n const inputs = { a: $a, b: $b };\n return ENGINE.runKernel(NotEqual, inputs);\n}\nvar notEqual = op({ notEqual_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/ones_like.js\nfunction onesLike_(x) {\n const $x = convertToTensor(x, \"x\", \"onesLike\");\n const inputs = { x: $x };\n return ENGINE.runKernel(OnesLike, inputs);\n}\nvar onesLike = op({ onesLike_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/outer_product.js\nfunction outerProduct_(v1, v2) {\n const $v1 = convertToTensor(v1, \"v1\", \"outerProduct\");\n const $v2 = convertToTensor(v2, \"v2\", \"outerProduct\");\n assert($v1.rank === 1 && $v2.rank === 1, () => `Error in outerProduct: inputs must be rank 1, but got ranks ${$v1.rank} and ${$v2.rank}.`);\n const v12D = reshape($v1, [-1, 1]);\n const v22D = reshape($v2, [1, -1]);\n return matMul(v12D, v22D);\n}\nvar outerProduct = op({ outerProduct_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/pad.js\nfunction pad_(x, paddings, constantValue = 0) {\n const $x = convertToTensor(x, \"x\", \"pad\");\n if ($x.rank === 0) {\n throw new Error(\"pad(scalar) is not defined. Pass non-scalar to pad\");\n }\n const attrs = { paddings, constantValue };\n const inputs = { x: $x };\n return ENGINE.runKernel(PadV2, inputs, attrs);\n}\nvar pad = op({ pad_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/pad1d.js\nfunction pad1d_(x, paddings, constantValue = 0) {\n assert(paddings.length === 2, () => \"Invalid number of paddings. Must be length of 2.\");\n return pad(x, [paddings], constantValue);\n}\nvar pad1d = op({ pad1d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/pad2d.js\nfunction pad2d_(x, paddings, constantValue = 0) {\n assert(paddings.length === 2 && paddings[0].length === 2 && paddings[1].length === 2, () => \"Invalid number of paddings. Must be length of 2 each.\");\n return pad(x, paddings, constantValue);\n}\nvar pad2d = op({ pad2d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/pad3d.js\nfunction pad3d_(x, paddings, constantValue = 0) {\n assert(paddings.length === 3 && paddings[0].length === 2 && paddings[1].length === 2 && paddings[2].length === 2, () => \"Invalid number of paddings. Must be length of 2 each.\");\n return pad(x, paddings, constantValue);\n}\nvar pad3d = op({ pad3d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/pad4d.js\nfunction pad4d_(x, paddings, constantValue = 0) {\n assert(paddings.length === 4 && paddings[0].length === 2 && paddings[1].length === 2 && paddings[2].length === 2 && paddings[3].length === 2, () => \"Invalid number of paddings. Must be length of 2 each.\");\n return pad(x, paddings, constantValue);\n}\nvar pad4d = op({ pad4d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/space_to_batch_nd.js\nfunction spaceToBatchND_(x, blockShape, paddings) {\n const $x = convertToTensor(x, \"x\", \"spaceToBatchND\");\n assert($x.rank >= 1 + blockShape.length, () => `input rank ${$x.rank} should be > than [blockShape] ${blockShape.length}`);\n assert(paddings.length === blockShape.length, () => `paddings.shape[0] ${paddings.length} must be equal to [blockShape] ${blockShape.length}`);\n assert($x.shape.reduce((a, b, i2) => {\n if (i2 > 0 && i2 <= blockShape.length) {\n return a && (b + paddings[i2 - 1][0] + paddings[i2 - 1][1]) % blockShape[i2 - 1] === 0;\n }\n return a;\n }, true), () => `input spatial dimensions ${$x.shape.slice(1)} with paddings ${paddings.toString()} must be divisible by blockShapes ${blockShape.toString()}`);\n const inputs = { x: $x };\n const attrs = { blockShape, paddings };\n return ENGINE.runKernel(SpaceToBatchND, inputs, attrs);\n}\nvar spaceToBatchND = op({ spaceToBatchND_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/pool.js\nfunction pool_(input2, windowShape, poolingType, pad3, dilations, strides, dimRoundingMode) {\n if (dilations == null) {\n dilations = [1, 1];\n }\n if (strides == null) {\n strides = 1;\n }\n if (pad3 === 0) {\n pad3 = \"valid\";\n }\n const $x = convertToTensor(input2, \"x\", \"maxPool\");\n let x4D = $x;\n let reshapedTo4D = false;\n if ($x.rank === 3) {\n reshapedTo4D = true;\n x4D = reshape($x, [1, $x.shape[0], $x.shape[1], $x.shape[2]]);\n }\n assert(eitherStridesOrDilationsAreOne(strides, dilations), () => `Error in pool: Either strides or dilations must be 1. Got strides ${strides} and dilations '${dilations}'`);\n const convInfo = computePool2DInfo(x4D.shape, windowShape, strides, dilations, pad3);\n const dilation = [convInfo.dilationHeight, convInfo.dilationWidth];\n let basePadding;\n if (pad3 === \"same\") {\n basePadding = withSpaceToBatchBasePaddings([convInfo.filterHeight, convInfo.filterWidth], dilation);\n } else {\n basePadding = [[0, 0], [0, 0]];\n }\n const isDilationOne = dilation[0] === 1 && dilation[1] === 1;\n const [adjustedPadding, adjustedCrops] = requiredSpaceToBatchPaddings([convInfo.inHeight, convInfo.inWidth], dilation, basePadding);\n const convertedPad = isDilationOne ? pad3 : \"valid\";\n const convertedX = isDilationOne ? x4D : spaceToBatchND(x4D, dilation, adjustedPadding);\n const forwardOp = poolingType === \"avg\" ? () => avgPool(convertedX, windowShape, strides, convertedPad, dimRoundingMode) : () => maxPool(convertedX, windowShape, strides, convertedPad, dimRoundingMode);\n const y = forwardOp();\n const res = isDilationOne ? y : batchToSpaceND(y, dilation, adjustedCrops);\n if (reshapedTo4D) {\n return reshape(res, [res.shape[1], res.shape[2], res.shape[3]]);\n }\n return res;\n}\nfunction requiredSpaceToBatchPaddings(inputShape, blockShape, basePadding) {\n const padStart = basePadding.map((b) => b[0]);\n const origPadEnd = basePadding.map((b) => b[1]);\n const fullInputShape = inputShape.concat(padStart, origPadEnd);\n const padEndExtra = blockShape.map((b, i2) => (b - fullInputShape[i2] % b) % b);\n const padEnd = origPadEnd.map((s2, i2) => s2 + padEndExtra[i2]);\n const paddings = blockShape.map((_, i2) => [padStart[i2], padEnd[i2]]);\n const crops = blockShape.map((_, i2) => [0, padEndExtra[i2]]);\n return [paddings, crops];\n}\nfunction withSpaceToBatchBasePaddings(filterShape, dilation) {\n const dilatedFilterShape = filterShape.map((s2, i2) => {\n return s2 + (s2 - 1) * (dilation[i2] - 1);\n });\n const padExtraShape = dilatedFilterShape.map((s2) => s2 - 1);\n const padExtraStart = padExtraShape.map((s2) => Math.floor(s2 / 2));\n const padExtraEnd = padExtraShape.map((s2, i2) => s2 - padExtraStart[i2]);\n return padExtraShape.map((_, i2) => {\n return [padExtraStart[i2], padExtraEnd[i2]];\n });\n}\nvar pool = op({ pool_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/prelu.js\nfunction prelu_(x, alpha) {\n const $x = convertToTensor(x, \"x\", \"prelu\");\n const $alpha = convertToTensor(alpha, \"alpha\", \"prelu\");\n const inputs = { x: $x, alpha: $alpha };\n return ENGINE.runKernel(Prelu, inputs);\n}\nvar prelu = op({ prelu_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/prod.js\nfunction prod_(x, axis = null, keepDims = false) {\n let $x = convertToTensor(x, \"x\", \"prod\");\n if ($x.dtype === \"bool\") {\n $x = cast($x, \"int32\");\n }\n const inputs = { x: $x };\n const attrs = { axis, keepDims };\n return ENGINE.runKernel(Prod, inputs, attrs);\n}\nvar prod = op({ prod_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/ragged_gather.js\nfunction raggedGather_(paramsNestedSplits, paramsDenseValues, indices, outputRaggedRank) {\n const $paramsNestedSplits = paramsNestedSplits.map((t2, i2) => convertToTensor(t2, `tensors${i2}`, \"raggedGather\", \"int32\"));\n const $paramsDenseValues = convertToTensor(paramsDenseValues, \"paramsDenseValues\", \"raggedGather\");\n const $indices = convertToTensor(indices, \"indices\", \"raggedGather\", \"int32\");\n const inputs = {\n paramsNestedSplits: $paramsNestedSplits,\n paramsDenseValues: $paramsDenseValues,\n indices: $indices\n };\n const attrs = { outputRaggedRank };\n const result = ENGINE.runKernel(RaggedGather, inputs, attrs);\n return {\n outputNestedSplits: result.slice(0, result.length - 1),\n outputDenseValues: result[result.length - 1]\n };\n}\nvar raggedGather = op({ raggedGather_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/ragged_tensor_to_tensor.js\nfunction raggedTensorToTensor_(shape, values, defaultValue, rowPartitionTensors, rowPartitionTypes) {\n const $shape = convertToTensor(shape, \"shape\", \"raggedTensorToTensor\", \"int32\");\n const $values = convertToTensor(values, \"values\", \"raggedTensorToTensor\");\n const $defaultValue = convertToTensor(defaultValue, \"defaultValue\", \"raggedTensorToTensor\", $values.dtype);\n const $rowPartitionTensors = rowPartitionTensors.map((t2, i2) => convertToTensor(t2, `tensors${i2}`, \"raggedTensorToTensor\", \"int32\"));\n const inputs = {\n shape: $shape,\n values: $values,\n defaultValue: $defaultValue,\n rowPartitionTensors: $rowPartitionTensors\n };\n const attrs = { rowPartitionTypes };\n return ENGINE.runKernel(RaggedTensorToTensor, inputs, attrs);\n}\nvar raggedTensorToTensor = op({ raggedTensorToTensor_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/rand.js\nfunction rand_(shape, randFunction, dtype) {\n const size = sizeFromShape(shape);\n let values = null;\n if (dtype == null || dtype === \"float32\") {\n values = new Float32Array(size);\n } else if (dtype === \"int32\") {\n values = new Int32Array(size);\n } else if (dtype === \"bool\") {\n values = new Uint8Array(size);\n } else {\n throw new Error(`Unknown data type ${dtype}`);\n }\n for (let i2 = 0; i2 < size; i2++) {\n values[i2] = randFunction();\n }\n return ENGINE.makeTensor(values, shape, dtype);\n}\nvar rand = op({ rand_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/rand_util.js\nvar seedrandom = __toESM(require_seedrandom2());\nvar MPRandGauss = class {\n constructor(mean5, stdDeviation, dtype, truncated, seed) {\n this.mean = mean5;\n this.stdDev = stdDeviation;\n this.dtype = dtype;\n this.nextVal = NaN;\n this.truncated = truncated;\n if (this.truncated) {\n this.upper = this.mean + this.stdDev * 2;\n this.lower = this.mean - this.stdDev * 2;\n }\n const seedValue = seed ? seed : Math.random();\n this.random = seedrandom.alea(seedValue.toString());\n }\n nextValue() {\n if (!isNaN(this.nextVal)) {\n const value = this.nextVal;\n this.nextVal = NaN;\n return value;\n }\n let resultX, resultY;\n let isValid = false;\n while (!isValid) {\n let v1, v2, s2;\n do {\n v1 = 2 * this.random() - 1;\n v2 = 2 * this.random() - 1;\n s2 = v1 * v1 + v2 * v2;\n } while (s2 >= 1 || s2 === 0);\n const mul2 = Math.sqrt(-2 * Math.log(s2) / s2);\n resultX = this.mean + this.stdDev * v1 * mul2;\n resultY = this.mean + this.stdDev * v2 * mul2;\n if (!this.truncated || this.isValidTruncated(resultX)) {\n isValid = true;\n }\n }\n if (!this.truncated || this.isValidTruncated(resultY)) {\n this.nextVal = this.convertValue(resultY);\n }\n return this.convertValue(resultX);\n }\n convertValue(value) {\n if (this.dtype == null || this.dtype === \"float32\") {\n return value;\n }\n return Math.round(value);\n }\n isValidTruncated(value) {\n return value <= this.upper && value >= this.lower;\n }\n};\nvar RandGamma = class {\n constructor(alpha, beta, dtype, seed) {\n this.alpha = alpha;\n this.beta = 1 / beta;\n this.dtype = dtype;\n const seedValue = seed ? seed : Math.random();\n this.randu = seedrandom.alea(seedValue.toString());\n this.randn = new MPRandGauss(0, 1, dtype, false, this.randu());\n if (alpha < 1) {\n this.d = alpha + 2 / 3;\n } else {\n this.d = alpha - 1 / 3;\n }\n this.c = 1 / Math.sqrt(9 * this.d);\n }\n nextValue() {\n let x2, v0, v1, x, u, v;\n while (true) {\n do {\n x = this.randn.nextValue();\n v = 1 + this.c * x;\n } while (v <= 0);\n v *= v * v;\n x2 = x * x;\n v0 = 1 - 0.331 * x2 * x2;\n v1 = 0.5 * x2 + this.d * (1 - v + Math.log(v));\n u = this.randu();\n if (u < v0 || Math.log(u) < v1) {\n break;\n }\n }\n v = 1 / this.beta * this.d * v;\n if (this.alpha < 1) {\n v *= Math.pow(this.randu(), 1 / this.alpha);\n }\n return this.convertValue(v);\n }\n convertValue(value) {\n if (this.dtype === \"float32\") {\n return value;\n }\n return Math.round(value);\n }\n};\nvar UniformRandom = class {\n constructor(min7 = 0, max7 = 1, dtype, seed) {\n this.canReturnFloat = () => this.dtype == null || this.dtype === \"float32\";\n this.min = min7;\n this.range = max7 - min7;\n this.dtype = dtype;\n if (seed == null) {\n seed = Math.random();\n }\n if (typeof seed === \"number\") {\n seed = seed.toString();\n }\n if (!this.canReturnFloat() && this.range <= 1) {\n throw new Error(`The difference between ${min7} - ${max7} <= 1 and dtype is not float`);\n }\n this.random = seedrandom.alea(seed);\n }\n convertValue(value) {\n if (this.canReturnFloat()) {\n return value;\n }\n return Math.round(value);\n }\n nextValue() {\n return this.convertValue(this.min + this.range * this.random());\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/random_gamma.js\nfunction randomGamma_(shape, alpha, beta = 1, dtype = \"float32\", seed) {\n if (beta == null) {\n beta = 1;\n }\n if (dtype == null) {\n dtype = \"float32\";\n }\n if (dtype !== \"float32\" && dtype !== \"int32\") {\n throw new Error(`Unsupported data type ${dtype}`);\n }\n const rgamma = new RandGamma(alpha, beta, dtype, seed);\n const res = buffer(shape, dtype);\n for (let i2 = 0; i2 < res.values.length; i2++) {\n res.values[i2] = rgamma.nextValue();\n }\n return res.toTensor();\n}\nvar randomGamma = op({ randomGamma_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/random_normal.js\nfunction randomNormal_(shape, mean5 = 0, stdDev = 1, dtype, seed) {\n if (dtype != null && dtype === \"bool\") {\n throw new Error(`Unsupported data type ${dtype}`);\n }\n const randGauss = new MPRandGauss(mean5, stdDev, dtype, false, seed);\n const res = buffer(shape, dtype);\n for (let i2 = 0; i2 < res.values.length; i2++) {\n res.values[i2] = randGauss.nextValue();\n }\n return res.toTensor();\n}\nvar randomNormal = op({ randomNormal_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/random_standard_normal.js\nfunction randomStandardNormal_(shape, dtype, seed) {\n if (dtype != null && dtype === \"bool\") {\n throw new Error(`Unsupported data type ${dtype}`);\n }\n return randomNormal(shape, 0, 1, dtype, seed);\n}\nvar randomStandardNormal = op({ randomStandardNormal_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/random_uniform.js\nfunction randomUniform_(shape, minval = 0, maxval = 1, dtype = \"float32\", seed) {\n const res = buffer(shape, dtype);\n const random = new UniformRandom(minval, maxval, null, seed);\n for (let i2 = 0; i2 < res.values.length; i2++) {\n res.values[i2] = random.nextValue();\n }\n return res.toTensor();\n}\nvar randomUniform = op({ randomUniform_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/range.js\nfunction range(start, stop, step5 = 1, dtype = \"float32\") {\n if (step5 === 0) {\n throw new Error(\"Cannot have a step of zero\");\n }\n const attrs = { start, stop, step: step5, dtype };\n return ENGINE.runKernel(Range, {}, attrs);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/reciprocal.js\nfunction reciprocal_(x) {\n const $x = convertToTensor(x, \"x\", \"reciprocal\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Reciprocal, inputs);\n}\nvar reciprocal = op({ reciprocal_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/relu.js\nfunction relu_(x) {\n const $x = convertToTensor(x, \"x\", \"relu\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Relu, inputs);\n}\nvar relu = op({ relu_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/relu6.js\nfunction relu6_(x) {\n const $x = convertToTensor(x, \"x\", \"relu6\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Relu6, inputs);\n}\nvar relu6 = op({ relu6_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/reverse.js\nfunction reverse_(x, axis) {\n const $x = convertToTensor(x, \"x\", \"reverse\");\n const inputs = { x: $x };\n const attrs = { dims: axis };\n return ENGINE.runKernel(Reverse, inputs, attrs);\n}\nvar reverse = op({ reverse_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/reverse_1d.js\nfunction reverse1d_(x) {\n const $x = convertToTensor(x, \"x\", \"reverse\");\n assert($x.rank === 1, () => `Error in reverse1D: x must be rank 1 but got rank ${$x.rank}.`);\n return reverse($x, 0);\n}\nvar reverse1d = op({ reverse1d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/reverse_2d.js\nfunction reverse2d_(x, axis) {\n const $x = convertToTensor(x, \"x\", \"reverse\");\n assert($x.rank === 2, () => `Error in reverse2D: x must be rank 2 but got rank ${$x.rank}.`);\n return reverse($x, axis);\n}\nvar reverse2d = op({ reverse2d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/reverse_3d.js\nfunction reverse3d_(x, axis) {\n const $x = convertToTensor(x, \"x\", \"reverse\");\n assert($x.rank === 3, () => `Error in reverse3D: x must be rank 3 but got rank ${$x.rank}.`);\n return reverse($x, axis);\n}\nvar reverse3d = op({ reverse3d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/reverse_4d.js\nfunction reverse4d_(x, axis) {\n const $x = convertToTensor(x, \"x\", \"reverse\");\n assert($x.rank === 4, () => `Error in reverse4D: x must be rank 4 but got rank ${$x.rank}.`);\n return reverse($x, axis);\n}\nvar reverse4d = op({ reverse4d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/round.js\nfunction round_(x) {\n const $x = convertToTensor(x, \"x\", \"round\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Round, inputs);\n}\nvar round2 = op({ round_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/rsqrt.js\nfunction rsqrt_(x) {\n const $x = convertToTensor(x, \"x\", \"rsqrt\", \"float32\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Rsqrt, inputs);\n}\nvar rsqrt = op({ rsqrt_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/selu.js\nfunction selu_(x) {\n const $x = convertToTensor(x, \"x\", \"selu\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Selu, inputs);\n}\nvar selu = op({ selu_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/separable_conv2d.js\nfunction separableConv2d_(x, depthwiseFilter, pointwiseFilter, strides, pad3, dilation = [1, 1], dataFormat = \"NHWC\") {\n const $x = convertToTensor(x, \"x\", \"separableConv2d\");\n const $depthwiseFilter = convertToTensor(depthwiseFilter, \"depthwiseFilter\", \"separableConv2d\");\n const $pointwiseFilter = convertToTensor(pointwiseFilter, \"pointwiseFilter\", \"separableConv2d\");\n let x4D = $x;\n let reshapedTo4D = false;\n if ($x.rank === 3) {\n reshapedTo4D = true;\n x4D = reshape($x, [1, $x.shape[0], $x.shape[1], $x.shape[2]]);\n }\n if (dataFormat === \"NCHW\") {\n throw new Error(\"separableConv2d currently does not support dataFormat NCHW; only NHWC is supported\");\n }\n assert(x4D.rank === 4, () => `Error in separableConv2d: input must be rank 4, but got rank ${x4D.rank}.`);\n assert($depthwiseFilter.rank === 4, () => `Error in separableConv2d: depthwise filter must be rank 4, but got rank ${$depthwiseFilter.rank}.`);\n assert($pointwiseFilter.rank === 4, () => `Error in separableConv2d: pointwise filter must be rank 4, but got rank ${$depthwiseFilter.rank}.`);\n assert($pointwiseFilter.shape[0] === 1, () => `Error in separableConv2d: the first dimension of pointwise filter must be 1, but got ${$pointwiseFilter.shape[0]}.`);\n assert($pointwiseFilter.shape[1] === 1, () => `Error in separableConv2d: the second dimension of pointwise filter must be 1, but got ${$pointwiseFilter.shape[1]}.`);\n const inChannels = $depthwiseFilter.shape[2];\n const channelMultiplier = $depthwiseFilter.shape[3];\n assert($pointwiseFilter.shape[2] === inChannels * channelMultiplier, () => `Error in separableConv2d: the third dimension of pointwise filter must be ${inChannels * channelMultiplier}, but got ${$pointwiseFilter.shape[2]}.`);\n const depthwise = depthwiseConv2d(x4D, $depthwiseFilter, strides, pad3, dataFormat, dilation);\n const pointwiseStride = 1;\n const res = conv2d(depthwise, $pointwiseFilter, pointwiseStride, \"valid\", dataFormat);\n if (reshapedTo4D) {\n return reshape(res, [res.shape[1], res.shape[2], res.shape[3]]);\n }\n return res;\n}\nvar separableConv2d = op({ separableConv2d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/setdiff1d_async.js\nasync function setdiff1dAsync_(x, y) {\n const $x = convertToTensor(x, \"x\", \"setdiff1d\");\n const $y = convertToTensor(y, \"y\", \"setdiff1d\");\n assert($x.dtype === $y.dtype, () => `x and y should have the same dtype, but got x (${$x.dtype}) and y (${$y.dtype}).`);\n assert($x.rank === 1, () => `x should be 1D tensor, but got x (${$x.shape}).`);\n assert($y.rank === 1, () => `y should be 1D tensor, but got y (${$y.shape}).`);\n const xVals = await $x.data();\n const yVals = await $y.data();\n const ySet = new Set(yVals);\n let outputSize = 0;\n for (let i2 = 0; i2 < xVals.length; i2++) {\n if (!ySet.has(xVals[i2])) {\n outputSize++;\n }\n }\n const buffer2 = new TensorBuffer([outputSize], $x.dtype);\n const indices = new TensorBuffer([outputSize], \"int32\");\n for (let i2 = 0, p2 = 0; i2 < xVals.length; i2++) {\n if (!ySet.has(xVals[i2])) {\n buffer2.values[p2] = xVals[i2];\n indices.values[p2] = i2;\n p2++;\n }\n }\n return [buffer2.toTensor(), indices.toTensor()];\n}\nvar setdiff1dAsync = setdiff1dAsync_;\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/sign.js\nfunction sign_(x) {\n const $x = convertToTensor(x, \"x\", \"sign\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Sign, inputs);\n}\nvar sign = op({ sign_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/sin.js\nfunction sin_(x) {\n const $x = convertToTensor(x, \"x\", \"sin\", \"float32\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Sin, inputs);\n}\nvar sin = op({ sin_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/sinh.js\nfunction sinh_(x) {\n const $x = convertToTensor(x, \"x\", \"sinh\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Sinh, inputs);\n}\nvar sinh = op({ sinh_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/slice1d.js\nfunction slice1d_(x, begin, size) {\n const $x = convertToTensor(x, \"x\", \"slice1d\");\n assert($x.rank === 1, () => `slice1d expects a rank-1 tensor, but got a rank-${$x.rank} tensor`);\n return slice($x, [begin], [size]);\n}\nvar slice1d = op({ slice1d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/slice2d.js\nfunction slice2d_(x, begin, size) {\n const $x = convertToTensor(x, \"x\", \"slice2d\");\n assert($x.rank === 2, () => `slice2d expects a rank-2 tensor, but got a rank-${$x.rank} tensor`);\n return slice($x, begin, size);\n}\nvar slice2d = op({ slice2d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/slice3d.js\nfunction slice3d_(x, begin, size) {\n const $x = convertToTensor(x, \"x\", \"slice3d\");\n assert($x.rank === 3, () => `slice3d expects a rank-3 tensor, but got a rank-${$x.rank} tensor`);\n return slice($x, begin, size);\n}\nvar slice3d = op({ slice3d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/slice4d.js\nfunction slice4d_(x, begin, size) {\n const $x = convertToTensor(x, \"x\", \"slice4d\");\n assert($x.rank === 4, () => `slice4d expects a rank-4 tensor, but got a rank-${$x.rank} tensor`);\n return slice($x, begin, size);\n}\nvar slice4d = op({ slice4d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/softmax.js\nfunction softmax_(logits, dim = -1) {\n const $logits = convertToTensor(logits, \"logits\", \"softmax\", \"float32\");\n if (dim === -1) {\n dim = $logits.rank - 1;\n }\n if (dim !== $logits.rank - 1) {\n throw Error(`Softmax along a non-last dimension is not yet supported. Logits was rank ${$logits.rank} and dim was ${dim}`);\n }\n const inputs = { logits: $logits };\n const attrs = { dim };\n return ENGINE.runKernel(Softmax, inputs, attrs);\n}\nvar softmax = op({ softmax_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/spectral/fft.js\nfunction fft_(input2) {\n assert(input2.dtype === \"complex64\", () => `The dtype for tf.spectral.fft() must be complex64 but got ${input2.dtype}.`);\n const inputs = { input: input2 };\n return ENGINE.runKernel(FFT, inputs);\n}\nvar fft = op({ fft_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/spectral/ifft.js\nfunction ifft_(input2) {\n assert(input2.dtype === \"complex64\", () => `The dtype for tf.spectral.ifft() must be complex64 but got ${input2.dtype}.`);\n const inputs = { input: input2 };\n return ENGINE.runKernel(IFFT, inputs);\n}\nvar ifft = op({ ifft_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/spectral/irfft.js\nfunction irfft_(input2) {\n const innerDimensionSize = input2.shape[input2.shape.length - 1];\n const batch = input2.size / innerDimensionSize;\n let ret;\n if (innerDimensionSize <= 2) {\n const complexInput = reshape(input2, [batch, innerDimensionSize]);\n ret = ifft(complexInput);\n } else {\n const outputShape = [batch, 2 * (innerDimensionSize - 1)];\n const realInput = reshape(real(input2), [batch, innerDimensionSize]);\n const imagInput = reshape(imag(input2), [batch, innerDimensionSize]);\n const realConjugate = reverse(slice(realInput, [0, 1], [batch, innerDimensionSize - 2]), 1);\n const imagConjugate = mul(reverse(slice(imagInput, [0, 1], [batch, innerDimensionSize - 2]), 1), scalar(-1));\n const r2 = concat([realInput, realConjugate], 1);\n const i2 = concat([imagInput, imagConjugate], 1);\n const complexInput = reshape(complex(r2, i2), [outputShape[0], outputShape[1]]);\n ret = ifft(complexInput);\n }\n ret = real(ret);\n if (input2.rank === 3 && input2.shape[0] !== 0) {\n const temp = ret;\n const batch2 = input2.shape[0];\n ret = reshape(ret, [batch2, ret.shape[0] / batch2, ret.shape[1]]);\n temp.dispose();\n }\n return ret;\n}\nvar irfft = op({ irfft_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/split.js\nfunction split_(x, numOrSizeSplits, axis = 0) {\n const $x = convertToTensor(x, \"x\", \"split\");\n const inputs = { x: $x };\n const attr = { numOrSizeSplits, axis };\n return ENGINE.runKernel(SplitV, inputs, attr);\n}\nvar split = op({ split_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/spectral/rfft.js\nfunction rfft_(input2, fftLength) {\n assert(input2.dtype === \"float32\", () => `The dtype for rfft() must be real value but got ${input2.dtype}`);\n let innerDimensionSize = input2.shape[input2.shape.length - 1];\n const batch = input2.size / innerDimensionSize;\n let adjustedInput;\n if (fftLength != null && fftLength < innerDimensionSize) {\n const begin = input2.shape.map((v) => 0);\n const size = input2.shape.map((v) => v);\n size[input2.shape.length - 1] = fftLength;\n adjustedInput = slice(input2, begin, size);\n innerDimensionSize = fftLength;\n } else if (fftLength != null && fftLength > innerDimensionSize) {\n const zerosShape = input2.shape.map((v) => v);\n zerosShape[input2.shape.length - 1] = fftLength - innerDimensionSize;\n adjustedInput = concat([input2, zeros(zerosShape)], input2.shape.length - 1);\n innerDimensionSize = fftLength;\n } else {\n adjustedInput = input2;\n }\n const zerosInput = zerosLike(adjustedInput);\n const complexInput = reshape(complex(adjustedInput, zerosInput), [batch, innerDimensionSize]);\n const ret = fft(complexInput);\n const half = Math.floor(innerDimensionSize / 2) + 1;\n const realValues = real(ret);\n const imagValues = imag(ret);\n const realComplexConjugate = split(realValues, [half, innerDimensionSize - half], realValues.shape.length - 1);\n const imagComplexConjugate = split(imagValues, [half, innerDimensionSize - half], imagValues.shape.length - 1);\n const outputShape = adjustedInput.shape.slice();\n outputShape[adjustedInput.shape.length - 1] = half;\n return reshape(complex(realComplexConjugate[0], imagComplexConjugate[0]), outputShape);\n}\nvar rfft = op({ rfft_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/squared_difference.js\nfunction squaredDifference_(a, b) {\n let $a = convertToTensor(a, \"a\", \"squaredDifference\");\n let $b = convertToTensor(b, \"b\", \"squaredDifference\");\n [$a, $b] = makeTypesMatch($a, $b);\n assertAndGetBroadcastShape($a.shape, $b.shape);\n const inputs = { a: $a, b: $b };\n const attrs = {};\n return ENGINE.runKernel(SquaredDifference, inputs, attrs);\n}\nvar squaredDifference = op({ squaredDifference_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/squeeze.js\nfunction squeeze_(x, axis) {\n const $x = convertToTensor(x, \"x\", \"squeeze\", \"string_or_numeric\");\n return reshape($x, squeezeShape($x.shape, axis).newShape);\n}\nvar squeeze = op({ squeeze_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/stack.js\nfunction stack_(tensors, axis = 0) {\n const $tensors = convertToTensorArray(tensors, \"tensors\", \"stack\", \"string_or_numeric\");\n assert($tensors.length >= 1, () => \"Pass at least one tensor to tf.stack\");\n if ($tensors.length > 0) {\n assert(axis <= $tensors[0].rank, () => \"Axis must be <= rank of the tensor\");\n }\n const inputs = $tensors;\n const attrs = { axis };\n return ENGINE.runKernel(Pack, inputs, attrs);\n}\nvar stack = op({ stack_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/step.js\nfunction step_(x, alpha = 0) {\n const $x = convertToTensor(x, \"x\", \"step\");\n const inputs = { x: $x };\n const attrs = { alpha };\n return ENGINE.runKernel(Step, inputs, attrs);\n}\nvar step = op({ step_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/strided_slice.js\nfunction stridedSlice_(x, begin, end, strides, beginMask = 0, endMask = 0, ellipsisMask = 0, newAxisMask = 0, shrinkAxisMask = 0) {\n const $x = convertToTensor(x, \"x\", \"stridedSlice\", \"string_or_numeric\");\n const inputs = { x: $x };\n const attrs = {\n begin,\n end,\n strides,\n beginMask,\n endMask,\n ellipsisMask,\n newAxisMask,\n shrinkAxisMask\n };\n return ENGINE.runKernel(StridedSlice, inputs, attrs);\n}\nvar stridedSlice = op({ stridedSlice_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/tan.js\nfunction tan_(x) {\n const $x = convertToTensor(x, \"x\", \"tan\", \"float32\");\n const inputs = { x: $x };\n return ENGINE.runKernel(Tan, inputs);\n}\nvar tan = op({ tan_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/tensor1d.js\nfunction tensor1d(values, dtype) {\n assertNonNull(values);\n const inferredShape = inferShape(values, dtype);\n if (inferredShape.length !== 1) {\n throw new Error(\"tensor1d() requires values to be a flat/TypedArray\");\n }\n const shape = null;\n return makeTensor(values, shape, inferredShape, dtype);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/tensor2d.js\nfunction tensor2d(values, shape, dtype) {\n assertNonNull(values);\n if (shape != null && shape.length !== 2) {\n throw new Error(\"tensor2d() requires shape to have two numbers\");\n }\n const inferredShape = inferShape(values, dtype);\n if (inferredShape.length !== 2 && inferredShape.length !== 1) {\n throw new Error(\"tensor2d() requires values to be number[][] or flat/TypedArray\");\n }\n if (inferredShape.length === 1 && shape == null) {\n throw new Error(\"tensor2d() requires shape to be provided when `values` are a flat/TypedArray\");\n }\n return makeTensor(values, shape, inferredShape, dtype);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/tensor4d.js\nfunction tensor4d(values, shape, dtype) {\n assertNonNull(values);\n if (shape != null && shape.length !== 4) {\n throw new Error(\"tensor4d() requires shape to have four numbers\");\n }\n const inferredShape = inferShape(values, dtype);\n if (inferredShape.length !== 4 && inferredShape.length !== 1) {\n throw new Error(\"tensor4d() requires values to be number[][][][] or flat/TypedArray\");\n }\n if (inferredShape.length === 1 && shape == null) {\n throw new Error(\"tensor4d() requires shape to be provided when `values` are a flat array\");\n }\n return makeTensor(values, shape, inferredShape, dtype);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/tensor5d.js\nfunction tensor5d(values, shape, dtype) {\n assertNonNull(values);\n if (shape != null && shape.length !== 5) {\n throw new Error(\"tensor5d() requires shape to have five numbers\");\n }\n const inferredShape = inferShape(values, dtype);\n if (inferredShape.length !== 5 && inferredShape.length !== 1) {\n throw new Error(\"tensor5d() requires values to be number[][][][][] or flat/TypedArray\");\n }\n if (inferredShape.length === 1 && shape == null) {\n throw new Error(\"tensor5d() requires shape to be provided when `values` are a flat array\");\n }\n return makeTensor(values, shape, inferredShape, dtype);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/tensor6d.js\nfunction tensor6d(values, shape, dtype) {\n assertNonNull(values);\n if (shape != null && shape.length !== 6) {\n throw new Error(\"tensor6d() requires shape to have six numbers\");\n }\n const inferredShape = inferShape(values, dtype);\n if (inferredShape.length !== 6 && inferredShape.length !== 1) {\n throw new Error(\"tensor6d() requires values to be number[][][][][][] or flat/TypedArray\");\n }\n if (inferredShape.length === 1 && shape == null) {\n throw new Error(\"tensor6d() requires shape to be provided when `values` are a flat array\");\n }\n shape = shape || inferredShape;\n return makeTensor(values, shape, inferredShape, dtype);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/topk.js\nfunction topk_(x, k = 1, sorted = true) {\n const $x = convertToTensor(x, \"x\", \"topk\");\n if ($x.rank === 0) {\n throw new Error(\"topk() expects the input to be of rank 1 or higher\");\n }\n const lastDim = $x.shape[$x.shape.length - 1];\n if (k < 0) {\n throw new Error(`'k' passed to topk() must be >= 0 but got ${k}`);\n }\n if (k > lastDim) {\n throw new Error(`'k' passed to topk() must be <= the last dimension (${lastDim}) but got ${k}`);\n }\n const inputs = { x: $x };\n const attrs = { k, sorted };\n const [values, indices] = ENGINE.runKernel(TopK, inputs, attrs);\n return { values, indices };\n}\nvar topk = op({ topk_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/truncated_normal.js\nfunction truncatedNormal_(shape, mean5 = 0, stdDev = 1, dtype, seed) {\n if (dtype != null && dtype === \"bool\") {\n throw new Error(`Unsupported data type $ { dtype }`);\n }\n const randGauss = new MPRandGauss(mean5, stdDev, dtype, true, seed);\n const res = buffer(shape, dtype);\n for (let i2 = 0; i2 < res.values.length; i2++) {\n res.values[i2] = randGauss.nextValue();\n }\n return res.toTensor();\n}\nvar truncatedNormal = op({ truncatedNormal_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/unique.js\nfunction unique_(x, axis = 0) {\n const $x = convertToTensor(x, \"x\", \"unique\", \"string_or_numeric\");\n assert($x.rank > 0, () => \"The input tensor must be at least 1D\");\n const inputs = { x: $x };\n const attrs = { axis };\n const [values, indices] = ENGINE.runKernel(Unique, inputs, attrs);\n return { values, indices };\n}\nvar unique = op({ unique_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/unsorted_segment_sum.js\nfunction unsortedSegmentSum_(x, segmentIds, numSegments) {\n const $x = convertToTensor(x, \"x\", \"unsortedSegmentSum\");\n const $segmentIds = convertToTensor(segmentIds, \"segmentIds\", \"unsortedSegmentSum\", \"int32\");\n assert(isInt(numSegments), () => \"numSegments must be of dtype int\");\n const inputs = { x: $x, segmentIds: $segmentIds };\n const attrs = { numSegments };\n return ENGINE.runKernel(UnsortedSegmentSum, inputs, attrs);\n}\nvar unsortedSegmentSum = op({ unsortedSegmentSum_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/unstack.js\nfunction unstack_(x, axis = 0) {\n const $x = convertToTensor(x, \"x\", \"unstack\", \"string_or_numeric\");\n assert(axis >= -$x.shape.length && axis < $x.shape.length, () => `Axis = ${axis} is not in [-${$x.shape.length}, ${$x.shape.length})`);\n const inputs = { value: $x };\n const attrs = { axis };\n return ENGINE.runKernel(Unpack, inputs, attrs);\n}\nvar unstack = op({ unstack_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/upper_bound.js\nfunction upperBound(sortedSequence, values) {\n return searchSorted(sortedSequence, values, \"right\");\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/variable.js\nfunction variable(initialValue, trainable = true, name, dtype) {\n return ENGINE.makeVariable(initialValue, trainable, name, dtype);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/backends/where_impl.js\nfunction whereImpl(condShape, condVals) {\n const indices = [];\n for (let i2 = 0; i2 < condVals.length; i2++) {\n if (condVals[i2]) {\n indices.push(i2);\n }\n }\n const inBuffer = buffer(condShape, \"int32\");\n const out = buffer([indices.length, condShape.length], \"int32\");\n for (let i2 = 0; i2 < indices.length; i2++) {\n const loc = inBuffer.indexToLoc(indices[i2]);\n const offset = i2 * condShape.length;\n out.values.set(loc, offset);\n }\n return out.toTensor();\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/where_async.js\nasync function whereAsync_(condition) {\n const $condition = convertToTensor(condition, \"condition\", \"whereAsync\", \"bool\");\n const vals = await $condition.data();\n const res = whereImpl($condition.shape, vals);\n if (condition !== $condition) {\n $condition.dispose();\n }\n return res;\n}\nvar whereAsync = whereAsync_;\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/boolean_mask.js\nasync function booleanMaskAsync_(tensor2, mask, axis) {\n const $tensor = convertToTensor(tensor2, \"tensor\", \"boolMask\");\n const $mask = convertToTensor(mask, \"mask\", \"boolMask\", \"bool\");\n const axisFrom = axis == null ? 0 : axis;\n const maskDim = $mask.rank;\n const tensorShape = $tensor.shape;\n assert(maskDim > 0, () => \"mask cannot be scalar\");\n assertShapesMatch(tensorShape.slice(axisFrom, axisFrom + maskDim), $mask.shape, `mask's shape must match the first K dimensions of tensor's shape,`);\n let leadingSize = 1;\n for (let i2 = axisFrom; i2 < axisFrom + maskDim; i2++) {\n leadingSize *= tensorShape[i2];\n }\n const targetTensorShape = tensorShape.slice(0, axisFrom).concat([leadingSize], tensorShape.slice(axisFrom + maskDim));\n const reshapedTensor = reshape($tensor, targetTensorShape);\n const reshapedMask = reshape($mask, [-1]);\n const positivePositions = await whereAsync(reshapedMask);\n const indices = squeeze(positivePositions, [1]);\n const res = gather(reshapedTensor, indices, axisFrom);\n if (tensor2 !== $tensor) {\n $tensor.dispose();\n }\n if (mask !== $mask) {\n $mask.dispose();\n }\n indices.dispose();\n reshapedTensor.dispose();\n reshapedMask.dispose();\n positivePositions.dispose();\n return res;\n}\nvar booleanMaskAsync = booleanMaskAsync_;\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/moving_average.js\nfunction movingAverage_(v, x, decay, step5, zeroDebias = true) {\n const $v = convertToTensor(v, \"v\", \"movingAverage\");\n const $x = convertToTensor(x, \"x\", \"movingAverage\");\n const $decay = convertToTensor(decay, \"decay\", \"movingAverage\");\n assertTypesMatch($v, $x);\n assert(arraysEqual($v.shape, $x.shape), () => \"Shape mismatch in v and x\");\n const one = scalar(1);\n const oneMinusDecay = sub(one, $decay);\n let update = mul(sub($x, $v), oneMinusDecay);\n if (zeroDebias) {\n assert(step5 != null, () => \"When using zeroDebias: true, step is required.\");\n const $step = convertToTensor(step5, \"step\", \"movingAverage\");\n update = div(update, sub(one, pow($decay, $step)));\n }\n return add2($v, update);\n}\nvar movingAverage = op({ movingAverage_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/scatter_nd.js\nfunction scatterND_(indices, updates, shape) {\n const $indices = convertToTensor(indices, \"indices\", \"scatterND\", \"int32\");\n const $updates = convertToTensor(updates, \"updates\", \"scatterND\");\n validateInput($updates, $indices, shape);\n const inputs = { indices: $indices, updates: $updates };\n const attrs = { shape };\n return ENGINE.runKernel(ScatterNd, inputs, attrs);\n}\nvar scatterND = op({ scatterND_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/sparse_to_dense_util.js\nfunction validateInput2(sparseIndices, sparseValues, outputShape, defaultValues) {\n if (sparseIndices.dtype !== \"int32\") {\n throw new Error(`tf.sparseToDense() expects the indices to be int32 type, but the dtype was ${sparseIndices.dtype}.`);\n }\n if (sparseIndices.rank > 2) {\n throw new Error(`sparseIndices should be a scalar, vector, or matrix, but got shape ${sparseIndices.shape}.`);\n }\n const numElems = sparseIndices.rank > 0 ? sparseIndices.shape[0] : 1;\n const numDims = sparseIndices.rank > 1 ? sparseIndices.shape[1] : 1;\n if (outputShape.length !== numDims) {\n throw new Error(`outputShape has incorrect number of elements:, ${outputShape.length}, should be: ${numDims}.`);\n }\n const numValues = sparseValues.size;\n if (!(sparseValues.rank === 0 || sparseValues.rank === 1 && numValues === numElems)) {\n throw new Error(`sparseValues has incorrect shape ${sparseValues.shape}, should be [] or [${numElems}]`);\n }\n if (sparseValues.dtype !== defaultValues.dtype) {\n throw new Error(\"sparseValues.dtype must match defaultValues.dtype\");\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/sparse_to_dense.js\nfunction sparseToDense_(sparseIndices, sparseValues, outputShape, defaultValue = 0) {\n const $sparseIndices = convertToTensor(sparseIndices, \"sparseIndices\", \"sparseToDense\", \"int32\");\n const $sparseValues = convertToTensor(sparseValues, \"sparseValues\", \"sparseToDense\", \"string_or_numeric\");\n const $defaultValue = convertToTensor(defaultValue, \"defaultValue\", \"sparseToDense\", $sparseValues.dtype);\n validateInput2($sparseIndices, $sparseValues, outputShape, $defaultValue);\n const inputs = {\n sparseIndices: $sparseIndices,\n sparseValues: $sparseValues,\n defaultValue: $defaultValue\n };\n const attrs = { outputShape };\n return ENGINE.runKernel(SparseToDense, inputs, attrs);\n}\nvar sparseToDense = op({ sparseToDense_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/gather_nd.js\nfunction gatherND_(x, indices) {\n const $indices = convertToTensor(indices, \"indices\", \"gatherND\", \"int32\");\n const $x = convertToTensor(x, \"x\", \"gatherND\", \"string_or_numeric\");\n const inputs = { params: $x, indices: $indices };\n return ENGINE.runKernel(GatherNd, inputs);\n}\nvar gatherND = op({ gatherND_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/dropout_util.js\nfunction getNoiseShape(x, noiseShape) {\n if (noiseShape == null) {\n return x.shape.slice();\n }\n if (arraysEqual(x.shape, noiseShape)) {\n return noiseShape;\n }\n if (x.shape.length === noiseShape.length) {\n const newDimension = [];\n for (let i2 = 0; i2 < x.shape.length; i2++) {\n if (noiseShape[i2] == null && x.shape[i2] != null) {\n newDimension.push(x.shape[i2]);\n } else {\n newDimension.push(noiseShape[i2]);\n }\n }\n return newDimension;\n }\n return noiseShape;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/dropout.js\nfunction dropout_(x, rate, noiseShape, seed) {\n const $x = convertToTensor(x, \"x\", \"dropout\");\n assert($x.dtype === \"float32\", () => `x has to be a floating point tensor since it's going to be scaled, but got a ${$x.dtype} tensor instead.`);\n assert(rate >= 0 && rate < 1, () => `rate must be a float in the range [0, 1), but got ${rate}.`);\n if (rate === 0) {\n return x instanceof Tensor ? $x.clone() : $x;\n }\n const $noiseShape = getNoiseShape($x, noiseShape);\n const keepProb = 1 - rate;\n const multiplier = div(floor(add2(randomUniform($noiseShape, 0, 1, \"float32\", seed), keepProb)), keepProb);\n return mul($x, multiplier);\n}\nvar dropout = op({ dropout_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/signal_ops_util.js\nfunction enclosingPowerOfTwo(value) {\n return Math.floor(Math.pow(2, Math.ceil(Math.log(value) / Math.log(2))));\n}\nfunction cosineWindow(windowLength, a, b) {\n const even = 1 - windowLength % 2;\n const newValues = new Float32Array(windowLength);\n for (let i2 = 0; i2 < windowLength; ++i2) {\n const cosArg = 2 * Math.PI * i2 / (windowLength + even - 1);\n newValues[i2] = a - b * Math.cos(cosArg);\n }\n return tensor1d(newValues, \"float32\");\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/in_top_k.js\nasync function inTopKAsync_(predictions, targets, k = 1) {\n const $predictions = convertToTensor(predictions, \"predictions\", \"inTopK\");\n const $targets = convertToTensor(targets, \"targets\", \"inTopK\");\n assert($predictions.rank > 1, () => `inTopK() expects the predictions to be of rank 2 or higher, but got ${$predictions.rank}`);\n assert($predictions.rank - 1 === $targets.rank, () => `predictions rank should be 1 larger than targets rank, but got predictions rank ${$predictions.rank} and targets rank ${$targets.rank}`);\n assertShapesMatch($predictions.shape.slice(0, $predictions.shape.length - 1), $targets.shape, `predictions's shape should be align with the targets' shape, except the last dimension.`);\n const lastDim = $predictions.shape[$predictions.shape.length - 1];\n assert(k > 0 && k <= lastDim, () => `'k' passed to inTopK() must be > 0 && <= the predictions last dimension (${lastDim}), but got ${k}`);\n const predictionsVals = await $predictions.data();\n const targetsVals = await $targets.data();\n const [batch, size] = [predictionsVals.length / lastDim, lastDim];\n const precision3 = getTypedArrayFromDType(\"bool\", batch);\n for (let b = 0; b < batch; b++) {\n const offset = b * size;\n const vals = predictionsVals.subarray(offset, offset + size);\n const valAndInd = [];\n for (let i2 = 0; i2 < vals.length; i2++) {\n valAndInd.push({ value: vals[i2], index: i2 });\n }\n valAndInd.sort((a, b2) => b2.value - a.value);\n precision3[b] = 0;\n for (let i2 = 0; i2 < k; i2++) {\n if (valAndInd[i2].index === targetsVals[b]) {\n precision3[b] = 1;\n break;\n }\n }\n }\n if (predictions !== $predictions) {\n $predictions.dispose();\n }\n if (targets !== $targets) {\n $targets.dispose();\n }\n return tensor(precision3, $targets.shape, \"bool\");\n}\nvar inTopKAsync = inTopKAsync_;\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/fused_ops.js\nvar fused_ops_exports = {};\n__export(fused_ops_exports, {\n conv2d: () => conv2d2,\n depthwiseConv2d: () => depthwiseConv2d2,\n matMul: () => matMul2\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/conv2d_backprop_filter.js\nfunction conv2DBackpropFilter_(x, dy, filterShape, strides, pad3, dataFormat = \"NHWC\", dimRoundingMode) {\n let x4D = x;\n if (x.rank === 3) {\n x4D = reshape(x, [1, x.shape[0], x.shape[1], x.shape[2]]);\n }\n let dy4D = dy;\n if (dy4D.rank === 3) {\n dy4D = reshape(dy, [1, dy.shape[0], dy.shape[1], dy.shape[2]]);\n }\n assert(x4D.rank === 4, () => `Error in conv2dDerFilter: input must be rank 4, but got shape ${x4D.shape}.`);\n assert(dy4D.rank === 4, () => `Error in conv2dDerFilter: dy must be rank 4, but got shape ${dy4D.shape}.`);\n assert(filterShape.length === 4, () => `Error in conv2dDerFilter: filterShape must be length 4, but got ${filterShape}.`);\n const inDepth = dataFormat === \"NHWC\" ? x4D.shape[3] : x4D.shape[1];\n const outDepth = dataFormat === \"NHWC\" ? dy4D.shape[3] : dy4D.shape[1];\n assert(inDepth === filterShape[2], () => `Error in conv2dDerFilter: depth of input ${inDepth}) must match input depth in filter (${filterShape[2]}.`);\n assert(outDepth === filterShape[3], () => `Error in conv2dDerFilter: depth of dy (${outDepth}) must match output depth for filter (${filterShape[3]}).`);\n checkPadOnDimRoundingMode(\"conv2dDerFilter\", pad3, dimRoundingMode);\n const inputs = { x: x4D, dy: dy4D };\n const attrs = { strides, pad: pad3, dataFormat, dimRoundingMode, filterShape };\n return ENGINE.runKernel(Conv2DBackpropFilter, inputs, attrs);\n}\nvar conv2DBackpropFilter = op({ conv2DBackpropFilter_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/fused_util.js\nfunction getFusedDyActivation(dy, y, activation2) {\n if (activation2 == null || activation2 === \"linear\") {\n return dy;\n }\n if (activation2 === \"relu\") {\n return mul(dy, step(y));\n }\n throw new Error(`Cannot compute gradient for fused activation ${activation2}.`);\n}\nfunction getFusedBiasGradient(bias, dyActivation) {\n let res = dyActivation;\n const reduceAxes = getReductionAxes(bias.shape, dyActivation.shape);\n if (reduceAxes.length > 0) {\n res = sum2(res, reduceAxes);\n }\n return reshape(res, bias.shape);\n}\nfunction applyActivation(x, activation2, preluActivationWeights, leakyreluAlpha) {\n if (activation2 === \"linear\") {\n return x;\n } else if (activation2 === \"relu\") {\n return relu(x);\n } else if (activation2 === \"elu\") {\n return elu(x);\n } else if (activation2 === \"relu6\") {\n return relu6(x);\n } else if (activation2 === \"prelu\") {\n return prelu(x, preluActivationWeights);\n } else if (activation2 === \"leakyrelu\") {\n return leakyRelu(x, leakyreluAlpha);\n } else if (activation2 === \"sigmoid\") {\n return sigmoid(x);\n }\n throw new Error(`Unknown fused activation ${activation2}.`);\n}\nvar shouldFuse = (gradientDepth, activation2) => {\n const gradientMode = gradientDepth > 0;\n return !gradientMode || activation2 === \"linear\";\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/fused/conv2d.js\nfunction fusedConv2d_({ x, filter, strides, pad: pad3, dataFormat = \"NHWC\", dilations = [1, 1], dimRoundingMode, bias, activation: activation2 = \"linear\", preluActivationWeights, leakyreluAlpha }) {\n activation2 = activation2 || \"linear\";\n if (shouldFuse(ENGINE.state.gradientDepth, activation2) === false) {\n assert(dataFormat === \"NHWC\", () => `Error in fused conv2d: got dataFormat of ${dataFormat} but only NHWC is currently supported for the case of gradient depth is 0 and the activation is not linear.`);\n let result = conv2d(x, filter, strides, pad3, dataFormat, dilations, dimRoundingMode);\n if (bias != null) {\n result = add2(result, bias);\n }\n return applyActivation(result, activation2, preluActivationWeights, leakyreluAlpha);\n }\n const $x = convertToTensor(x, \"x\", \"conv2d\", \"float32\");\n const $filter = convertToTensor(filter, \"filter\", \"conv2d\", \"float32\");\n let x4D = $x;\n let reshapedTo4D = false;\n if ($x.rank === 3) {\n reshapedTo4D = true;\n x4D = reshape($x, [1, $x.shape[0], $x.shape[1], $x.shape[2]]);\n }\n assert(x4D.rank === 4, () => `Error in fused conv2d: input must be rank 4, but got rank ${x4D.rank}.`);\n assert($filter.rank === 4, () => `Error in fused conv2d: filter must be rank 4, but got rank ${$filter.rank}.`);\n checkPadOnDimRoundingMode(\"fused conv2d\", pad3, dimRoundingMode);\n const inputChannels = dataFormat === \"NHWC\" ? x4D.shape[3] : x4D.shape[1];\n assert($filter.shape[2] === inputChannels, () => `Error in conv2d: depth of input (${inputChannels}) must match input depth for filter ${$filter.shape[2]}.`);\n assert(eitherStridesOrDilationsAreOne(strides, dilations), () => `Error in conv2D: Either strides or dilations must be 1. Got strides ${strides} and dilations '${dilations}'`);\n const convInfo = computeConv2DInfo(x4D.shape, $filter.shape, strides, dilations, pad3, dimRoundingMode);\n let $bias;\n if (bias != null) {\n $bias = convertToTensor(bias, \"bias\", \"fused conv2d\");\n [$bias] = makeTypesMatch($bias, $x);\n if (dataFormat === \"NHWC\") {\n assertAndGetBroadcastShape(convInfo.outShape, $bias.shape);\n } else {\n assert($bias.shape.length <= 1, () => `Error in fused conv2d: only supports scalar or 1-D Tensor bias for NCHW format but got the bias of rank-${$bias.shape.length}.`);\n assert($bias.shape.length === 0 || $bias.shape[0] === convInfo.outChannels || $bias.shape[0] === 1, () => `Error in fused conv2d: bias shape (${$bias.shape}) is not compatible with the number of output channels (${convInfo.outChannels})`);\n }\n }\n let $preluActivationWeights;\n if (preluActivationWeights != null) {\n const alphaShape = preluActivationWeights.shape;\n assert(alphaShape.length <= 1 || alphaShape.length === 3, () => `Error in fused conv2d: only supports scalar, 1-D Tensor or 3-D Tensor PReLU activation weights but got a tensor of rank-${alphaShape.length}.`);\n if (alphaShape.length === 1) {\n assert(alphaShape[0] === 1 || alphaShape[0] === convInfo.outChannels, () => `Error in fused conv2d: PReLU activation weights (${alphaShape}) is not compatible with the number of output channels (${convInfo.outChannels}).`);\n } else if (alphaShape.length === 3) {\n try {\n assertAndGetBroadcastShape(alphaShape, convInfo.outShape);\n } catch (e2) {\n const errMsg = `Error in fused conv2d: PReLU activation weights (${alphaShape}) is not compatible with the output shape of the conv2d (${convInfo.outShape}).`;\n throw Error(errMsg);\n }\n }\n $preluActivationWeights = convertToTensor(preluActivationWeights, \"prelu weights\", \"fused conv2d\");\n }\n const grad2 = (dy, saved) => {\n assert(dataFormat === \"NHWC\", () => `Error in gradient of fused conv2D: got dataFormat of ${dataFormat} but only NHWC is currently supported.`);\n const [$filter2, x4D2, y, $bias2] = saved;\n const dyActivation = getFusedDyActivation(dy, y, activation2);\n assert(tupleValuesAreOne(dilations), () => `Error in gradient of fused conv2D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '${dilations}'`);\n const xDer = conv2DBackpropInput(x4D2.shape, dyActivation, $filter2, strides, pad3);\n const filterDer = conv2DBackpropFilter(x4D2, dyActivation, $filter2.shape, strides, pad3);\n const der = [xDer, filterDer];\n if ($bias2 != null) {\n const biasDer = getFusedBiasGradient($bias2, dyActivation);\n der.push(biasDer);\n }\n return der;\n };\n const inputs = {\n x: x4D,\n filter: $filter,\n bias: $bias,\n preluActivationWeights: $preluActivationWeights\n };\n const attrs = {\n strides,\n pad: pad3,\n dataFormat,\n dilations,\n dimRoundingMode,\n activation: activation2,\n leakyreluAlpha\n };\n if (bias == null) {\n const customOp = customGrad((x4D2, filter2, save) => {\n let res = ENGINE.runKernel(FusedConv2D, inputs, attrs);\n save([filter2, x4D2, res]);\n if (reshapedTo4D) {\n res = reshape(res, [res.shape[1], res.shape[2], res.shape[3]]);\n }\n return { value: res, gradFunc: grad2 };\n });\n return customOp(x4D, $filter);\n } else {\n const customOpWithBias = customGrad((x4D2, filter2, bias2, save) => {\n let res = ENGINE.runKernel(FusedConv2D, inputs, attrs);\n save([filter2, x4D2, res, bias2]);\n if (reshapedTo4D) {\n res = reshape(res, [res.shape[1], res.shape[2], res.shape[3]]);\n }\n return { value: res, gradFunc: grad2 };\n });\n return customOpWithBias(x4D, $filter, $bias);\n }\n}\nvar conv2d2 = op({ fusedConv2d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/depthwise_conv2d_native_backprop_filter.js\nfunction depthwiseConv2dNativeBackpropFilter_(x, dy, filterShape, strides, pad3, dilations = [1, 1], dimRoundingMode) {\n let x4D = x;\n if (x.rank === 3) {\n x4D = reshape(x, [1, x.shape[0], x.shape[1], x.shape[2]]);\n }\n let dy4D = dy;\n if (dy4D.rank === 3) {\n dy4D = reshape(dy, [1, dy.shape[0], dy.shape[1], dy.shape[2]]);\n }\n const inputs = { x: x4D, dy: dy4D };\n const attrs = { strides, pad: pad3, dimRoundingMode, dilations, filterShape };\n return ENGINE.runKernel(DepthwiseConv2dNativeBackpropFilter, inputs, attrs);\n}\nvar depthwiseConv2dNativeBackpropFilter = op({ depthwiseConv2dNativeBackpropFilter_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/depthwise_conv2d_native_backprop_input.js\nfunction depthwiseConv2dNativeBackpropInput_(xShape, dy, filter, strides, pad3, dilations = [1, 1], dimRoundingMode) {\n let dy4D = dy;\n let reshapedTo4D = false;\n if (dy.rank === 3) {\n reshapedTo4D = true;\n dy4D = reshape(dy, [1, dy.shape[0], dy.shape[1], dy.shape[2]]);\n }\n const inputs = { dy: dy4D, filter };\n const attrs = { strides, pad: pad3, dimRoundingMode, dilations, inputShape: xShape };\n const res = ENGINE.runKernel(DepthwiseConv2dNativeBackpropInput, inputs, attrs);\n if (reshapedTo4D) {\n return reshape(res, [res.shape[1], res.shape[2], res.shape[3]]);\n }\n return res;\n}\nvar depthwiseConv2dNativeBackpropInput = op({ depthwiseConv2dNativeBackpropInput_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/fused/depthwise_conv2d.js\nfunction fusedDepthwiseConv2d_({ x, filter, strides, pad: pad3, dataFormat = \"NHWC\", dilations = [1, 1], dimRoundingMode, bias, activation: activation2 = \"linear\", preluActivationWeights, leakyreluAlpha }) {\n if (shouldFuse(ENGINE.state.gradientDepth, activation2) === false) {\n let result = depthwiseConv2d(x, filter, strides, pad3, dataFormat, dilations, dimRoundingMode);\n if (bias != null) {\n result = add2(result, bias);\n }\n return applyActivation(result, activation2, preluActivationWeights, leakyreluAlpha);\n }\n const $x = convertToTensor(x, \"x\", \"depthwiseConv2d\", \"float32\");\n const $filter = convertToTensor(filter, \"filter\", \"depthwiseConv2d\", \"float32\");\n let x4D = $x;\n let reshapedTo4D = false;\n if ($x.rank === 3) {\n reshapedTo4D = true;\n x4D = reshape($x, [1, $x.shape[0], $x.shape[1], $x.shape[2]]);\n }\n assert(x4D.rank === 4, () => `Error in fused depthwiseConv2d: input must be rank 4, but got rank ${x4D.rank}.`);\n assert($filter.rank === 4, () => `Error in fused depthwiseConv2d: filter must be rank 4, but got rank ${$filter.rank}.`);\n assert(x4D.shape[3] === $filter.shape[2], () => `Error in fused depthwiseConv2d: number of input channels (${x4D.shape[3]}) must match the inChannels dimension in filter ${$filter.shape[2]}.`);\n if (dilations == null) {\n dilations = [1, 1];\n }\n assert(eitherStridesOrDilationsAreOne(strides, dilations), () => `Error in fused depthwiseConv2d: Either strides or dilations must be 1. Got strides ${strides} and dilations '${dilations}'`);\n checkPadOnDimRoundingMode(\"fused depthwiseConv2d\", pad3, dimRoundingMode);\n const convInfo = computeConv2DInfo(x4D.shape, $filter.shape, strides, dilations, pad3, dimRoundingMode, true);\n let $bias;\n if (bias != null) {\n $bias = convertToTensor(bias, \"bias\", \"fused conv2d\");\n [$bias] = makeTypesMatch($bias, $x);\n assertAndGetBroadcastShape(convInfo.outShape, $bias.shape);\n }\n let $preluActivationWeights;\n if (preluActivationWeights != null) {\n $preluActivationWeights = convertToTensor(preluActivationWeights, \"prelu weights\", \"fused depthwiseConv2d\");\n }\n const grad2 = (dy, saved) => {\n assert(tupleValuesAreOne(dilations), () => `Error in gradient of fused depthwiseConv2d: dilation rates greater than 1 are not yet supported. Got dilations '${dilations}'`);\n const [$filter2, x4D2, y, bias2] = saved;\n const dyActivation = getFusedDyActivation(dy, y, activation2);\n const xDer = depthwiseConv2dNativeBackpropInput(x4D2.shape, dyActivation, $filter2, strides, pad3, dilations, dimRoundingMode);\n const filterDer = depthwiseConv2dNativeBackpropFilter(x4D2, dyActivation, $filter2.shape, strides, pad3, dilations, dimRoundingMode);\n if (bias2 != null) {\n const biasDer = getFusedBiasGradient($bias, dyActivation);\n return [xDer, filterDer, biasDer];\n }\n return [xDer, filterDer];\n };\n const inputs = {\n x: x4D,\n filter: $filter,\n bias: $bias,\n preluActivationWeights: $preluActivationWeights\n };\n const attrs = {\n strides,\n pad: pad3,\n dataFormat,\n dilations,\n dimRoundingMode,\n activation: activation2,\n leakyreluAlpha\n };\n if (bias == null) {\n const customOp = customGrad((x4D2, filter2, save) => {\n let res = ENGINE.runKernel(FusedDepthwiseConv2D, inputs, attrs);\n save([filter2, x4D2, res]);\n if (reshapedTo4D) {\n res = reshape(res, [res.shape[1], res.shape[2], res.shape[3]]);\n }\n return { value: res, gradFunc: grad2 };\n });\n return customOp(x4D, $filter);\n } else {\n const customOpWithBias = customGrad((x4D2, filter2, bias2, save) => {\n let res = ENGINE.runKernel(FusedDepthwiseConv2D, inputs, attrs);\n save([filter2, x4D2, res, bias2]);\n if (reshapedTo4D) {\n res = reshape(res, [res.shape[1], res.shape[2], res.shape[3]]);\n }\n return { value: res, gradFunc: grad2 };\n });\n return customOpWithBias(x4D, $filter, $bias);\n }\n}\nvar depthwiseConv2d2 = op({ fusedDepthwiseConv2d_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/fused/mat_mul.js\nfunction fusedMatMul_({ a, b, transposeA = false, transposeB = false, bias, activation: activation2 = \"linear\", preluActivationWeights, leakyreluAlpha = 0.2 }) {\n if (shouldFuse(ENGINE.state.gradientDepth, activation2) === false) {\n let result = matMul(a, b, transposeA, transposeB);\n if (bias != null) {\n result = add2(result, bias);\n }\n return applyActivation(result, activation2, preluActivationWeights, leakyreluAlpha);\n }\n let $a = convertToTensor(a, \"a\", \"fused matMul\");\n let $b = convertToTensor(b, \"b\", \"fused matMul\");\n [$a, $b] = makeTypesMatch($a, $b);\n const innerShapeA = transposeA ? $a.shape[$a.rank - 2] : $a.shape[$a.rank - 1];\n const innerShapeB = transposeB ? $b.shape[$b.rank - 1] : $b.shape[$b.rank - 2];\n const outerShapeA = transposeA ? $a.shape[$a.rank - 1] : $a.shape[$a.rank - 2];\n const outerShapeB = transposeB ? $b.shape[$b.rank - 2] : $b.shape[$b.rank - 1];\n const outerDimsA = $a.shape.slice(0, -2);\n const outerDimsB = $b.shape.slice(0, -2);\n const batchDimA = sizeFromShape(outerDimsA);\n const batchDimB = sizeFromShape(outerDimsB);\n assert(innerShapeA === innerShapeB, () => `Error in fused matMul: inner shapes (${innerShapeA}) and (${innerShapeB}) of Tensors with shapes ${$a.shape} and ${$b.shape} and transposeA=${transposeA} and transposeB=${transposeB} must match.`);\n const outShapeOuterDims = assertAndGetBroadcastShape($a.shape.slice(0, -2), $b.shape.slice(0, -2));\n const outShape = outShapeOuterDims.concat([outerShapeA, outerShapeB]);\n const a3D = transposeA ? reshape($a, [batchDimA, innerShapeA, outerShapeA]) : reshape($a, [batchDimA, outerShapeA, innerShapeA]);\n const b3D = transposeB ? reshape($b, [batchDimB, outerShapeB, innerShapeB]) : reshape($b, [batchDimB, innerShapeB, outerShapeB]);\n let $bias;\n if (bias != null) {\n $bias = convertToTensor(bias, \"bias\", \"fused matMul\");\n [$bias] = makeTypesMatch($bias, $a);\n assertAndGetBroadcastShape(outShape, $bias.shape);\n }\n let $preluActivationWeights;\n if (preluActivationWeights != null) {\n $preluActivationWeights = convertToTensor(preluActivationWeights, \"prelu weights\", \"fused matMul\");\n }\n const grad2 = (dy, saved) => {\n const [a3D2, b3D2, y, $bias2] = saved;\n const dyActivation = getFusedDyActivation(reshape(dy, y.shape), y, activation2);\n let aDer;\n let bDer;\n if (!transposeA && !transposeB) {\n aDer = matMul(dyActivation, b3D2, false, true);\n bDer = matMul(a3D2, dyActivation, true, false);\n } else if (!transposeA && transposeB) {\n aDer = matMul(dyActivation, b3D2, false, false);\n bDer = matMul(dyActivation, a3D2, true, false);\n } else if (transposeA && !transposeB) {\n aDer = matMul(b3D2, dyActivation, false, true);\n bDer = matMul(a3D2, dyActivation, false, false);\n } else {\n aDer = matMul(b3D2, dyActivation, true, true);\n bDer = matMul(dyActivation, a3D2, true, true);\n }\n if (bias != null) {\n const biasDer = getFusedBiasGradient($bias2, dyActivation);\n return [aDer, bDer, biasDer];\n } else {\n return [aDer, bDer];\n }\n };\n const inputs = {\n a: a3D,\n b: b3D,\n bias: $bias,\n preluActivationWeights: $preluActivationWeights\n };\n const attrs = { transposeA, transposeB, activation: activation2, leakyreluAlpha };\n if (bias == null) {\n const customOp = customGrad((a3D2, b3D2, save) => {\n const res = ENGINE.runKernel(_FusedMatMul, inputs, attrs);\n save([a3D2, b3D2, res]);\n return { value: reshape(res, outShape), gradFunc: grad2 };\n });\n return customOp(a3D, b3D);\n } else {\n const customOpWithBias = customGrad((a3D2, b3D2, $bias2, save) => {\n const res = ENGINE.runKernel(_FusedMatMul, inputs, attrs);\n save([a3D2, b3D2, res, $bias2]);\n return { value: reshape(res, outShape), gradFunc: grad2 };\n });\n return customOpWithBias(a3D, b3D, $bias);\n }\n}\nvar matMul2 = op({ fusedMatMul_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/signal/hamming_window.js\nfunction hammingWindow_(windowLength) {\n return cosineWindow(windowLength, 0.54, 0.46);\n}\nvar hammingWindow = op({ hammingWindow_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/signal/hann_window.js\nfunction hannWindow_(windowLength) {\n return cosineWindow(windowLength, 0.5, 0.5);\n}\nvar hannWindow = op({ hannWindow_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/signal/frame.js\nfunction frame_(signal2, frameLength, frameStep, padEnd = false, padValue = 0) {\n let start = 0;\n const output = [];\n while (start + frameLength <= signal2.size) {\n output.push(slice(signal2, start, frameLength));\n start += frameStep;\n }\n if (padEnd) {\n while (start < signal2.size) {\n const padLen = start + frameLength - signal2.size;\n const pad3 = concat([\n slice(signal2, start, frameLength - padLen),\n fill([padLen], padValue)\n ]);\n output.push(pad3);\n start += frameStep;\n }\n }\n if (output.length === 0) {\n return tensor2d([], [0, frameLength]);\n }\n return reshape(concat(output), [output.length, frameLength]);\n}\nvar frame = op({ frame_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/signal/stft.js\nfunction stft_(signal2, frameLength, frameStep, fftLength, windowFn = hannWindow) {\n if (fftLength == null) {\n fftLength = enclosingPowerOfTwo(frameLength);\n }\n const framedSignal = frame(signal2, frameLength, frameStep);\n const windowedSignal = mul(framedSignal, windowFn(frameLength));\n return rfft(windowedSignal, fftLength);\n}\nvar stft = op({ stft_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/crop_and_resize.js\nfunction cropAndResize_(image2, boxes, boxInd, cropSize, method = \"bilinear\", extrapolationValue = 0) {\n const $image = convertToTensor(image2, \"image\", \"cropAndResize\");\n const $boxes = convertToTensor(boxes, \"boxes\", \"cropAndResize\", \"float32\");\n const $boxInd = convertToTensor(boxInd, \"boxInd\", \"cropAndResize\", \"int32\");\n const numBoxes = $boxes.shape[0];\n assert($image.rank === 4, () => `Error in cropAndResize: image must be rank 4,but got rank ${$image.rank}.`);\n assert($boxes.rank === 2 && $boxes.shape[1] === 4, () => `Error in cropAndResize: boxes must be have size [${numBoxes},4] but had shape ${$boxes.shape}.`);\n assert($boxInd.rank === 1 && $boxInd.shape[0] === numBoxes, () => `Error in cropAndResize: boxInd must be have size [${numBoxes}] but had shape ${$boxes.shape}.`);\n assert(cropSize.length === 2, () => `Error in cropAndResize: cropSize must be of length 2, but got length ${cropSize.length}.`);\n assert(cropSize[0] >= 1 && cropSize[1] >= 1, () => `cropSize must be atleast [1,1], but was ${cropSize}`);\n assert(method === \"bilinear\" || method === \"nearest\", () => `method must be bilinear or nearest, but was ${method}`);\n const inputs = { image: $image, boxes: $boxes, boxInd: $boxInd };\n const attrs = { method, extrapolationValue, cropSize };\n const res = ENGINE.runKernel(CropAndResize, inputs, attrs);\n return res;\n}\nvar cropAndResize = op({ cropAndResize_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/flip_left_right.js\nfunction flipLeftRight_(image2) {\n const $image = convertToTensor(image2, \"image\", \"flipLeftRight\", \"float32\");\n assert($image.rank === 4, () => `Error in flipLeftRight: image must be rank 4,but got rank ${$image.rank}.`);\n const inputs = { image: $image };\n const res = ENGINE.runKernel(FlipLeftRight, inputs, {});\n return res;\n}\nvar flipLeftRight = op({ flipLeftRight_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/grayscale_to_rgb.js\nfunction grayscaleToRGB_(image2) {\n const $image = convertToTensor(image2, \"image\", \"grayscaleToRGB\");\n const lastDimsIdx = $image.rank - 1;\n const lastDims = $image.shape[lastDimsIdx];\n assert($image.rank >= 2, () => `Error in grayscaleToRGB: images must be at least rank 2, but got rank ${$image.rank}.`);\n assert(lastDims === 1, () => `Error in grayscaleToRGB: last dimension of a grayscale image should be size 1, but got size ${lastDims}.`);\n const reps = new Array($image.rank);\n reps.fill(1, 0, lastDimsIdx);\n reps[lastDimsIdx] = 3;\n return tile($image, reps);\n}\nvar grayscaleToRGB = op({ grayscaleToRGB_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/rotate_with_offset.js\nfunction rotateWithOffset_(image2, radians, fillValue = 0, center = 0.5) {\n const $image = convertToTensor(image2, \"image\", \"rotateWithOffset\", \"float32\");\n assert($image.rank === 4, () => `Error in rotateWithOffset: image must be rank 4,but got rank ${$image.rank}.`);\n const inputs = { image: $image };\n const attrs = { radians, fillValue, center };\n const res = ENGINE.runKernel(RotateWithOffset, inputs, attrs);\n return res;\n}\nvar rotateWithOffset = op({ rotateWithOffset_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/nonmax_util.js\nfunction nonMaxSuppSanityCheck(boxes, scores, maxOutputSize, iouThreshold, scoreThreshold, softNmsSigma) {\n if (iouThreshold == null) {\n iouThreshold = 0.5;\n }\n if (scoreThreshold == null) {\n scoreThreshold = Number.NEGATIVE_INFINITY;\n }\n if (softNmsSigma == null) {\n softNmsSigma = 0;\n }\n const numBoxes = boxes.shape[0];\n maxOutputSize = Math.min(maxOutputSize, numBoxes);\n assert(0 <= iouThreshold && iouThreshold <= 1, () => `iouThreshold must be in [0, 1], but was '${iouThreshold}'`);\n assert(boxes.rank === 2, () => `boxes must be a 2D tensor, but was of rank '${boxes.rank}'`);\n assert(boxes.shape[1] === 4, () => `boxes must have 4 columns, but 2nd dimension was ${boxes.shape[1]}`);\n assert(scores.rank === 1, () => \"scores must be a 1D tensor\");\n assert(scores.shape[0] === numBoxes, () => `scores has incompatible shape with boxes. Expected ${numBoxes}, but was ${scores.shape[0]}`);\n assert(0 <= softNmsSigma && softNmsSigma <= 1, () => `softNmsSigma must be in [0, 1], but was '${softNmsSigma}'`);\n return { maxOutputSize, iouThreshold, scoreThreshold, softNmsSigma };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/non_max_suppression.js\nfunction nonMaxSuppression_(boxes, scores, maxOutputSize, iouThreshold = 0.5, scoreThreshold = Number.NEGATIVE_INFINITY) {\n const $boxes = convertToTensor(boxes, \"boxes\", \"nonMaxSuppression\", \"float32\");\n const $scores = convertToTensor(scores, \"scores\", \"nonMaxSuppression\", \"float32\");\n const inputs = nonMaxSuppSanityCheck($boxes, $scores, maxOutputSize, iouThreshold, scoreThreshold);\n maxOutputSize = inputs.maxOutputSize;\n iouThreshold = inputs.iouThreshold;\n scoreThreshold = inputs.scoreThreshold;\n const attrs = { maxOutputSize, iouThreshold, scoreThreshold };\n return ENGINE.runKernel(NonMaxSuppressionV3, { boxes: $boxes, scores: $scores }, attrs);\n}\nvar nonMaxSuppression = op({ nonMaxSuppression_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/backends/non_max_suppression_util.js\nfunction binaryInsert(arr, element, comparator) {\n const index = binarySearch(arr, element, comparator);\n const insertionPoint = index < 0 ? -(index + 1) : index;\n arr.splice(insertionPoint, 0, element);\n}\nfunction binarySearch(arr, target, comparator) {\n return binarySearch_(arr, target, comparator || defaultComparator);\n}\nfunction defaultComparator(a, b) {\n return a > b ? 1 : a < b ? -1 : 0;\n}\nfunction binarySearch_(arr, target, comparator) {\n let left = 0;\n let right = arr.length;\n let middle = 0;\n let found = false;\n while (left < right) {\n middle = left + (right - left >>> 1);\n const compareResult = comparator(target, arr[middle]);\n if (compareResult > 0) {\n left = middle + 1;\n } else {\n right = middle;\n found = !compareResult;\n }\n }\n return found ? left : -left - 1;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/backends/non_max_suppression_impl.js\nfunction nonMaxSuppressionV3Impl(boxes, scores, maxOutputSize, iouThreshold, scoreThreshold) {\n return nonMaxSuppressionImpl_(boxes, scores, maxOutputSize, iouThreshold, scoreThreshold, 0);\n}\nfunction nonMaxSuppressionV4Impl(boxes, scores, maxOutputSize, iouThreshold, scoreThreshold, padToMaxOutputSize) {\n return nonMaxSuppressionImpl_(\n boxes,\n scores,\n maxOutputSize,\n iouThreshold,\n scoreThreshold,\n 0,\n false,\n padToMaxOutputSize,\n true\n );\n}\nfunction nonMaxSuppressionV5Impl(boxes, scores, maxOutputSize, iouThreshold, scoreThreshold, softNmsSigma) {\n return nonMaxSuppressionImpl_(boxes, scores, maxOutputSize, iouThreshold, scoreThreshold, softNmsSigma, true);\n}\nfunction nonMaxSuppressionImpl_(boxes, scores, maxOutputSize, iouThreshold, scoreThreshold, softNmsSigma, returnScoresTensor = false, padToMaxOutputSize = false, returnValidOutputs = false) {\n const candidates = [];\n for (let i2 = 0; i2 < scores.length; i2++) {\n if (scores[i2] > scoreThreshold) {\n candidates.push({ score: scores[i2], boxIndex: i2, suppressBeginIndex: 0 });\n }\n }\n candidates.sort(ascendingComparator);\n const scale2 = softNmsSigma > 0 ? -0.5 / softNmsSigma : 0;\n const selectedIndices = [];\n const selectedScores = [];\n while (selectedIndices.length < maxOutputSize && candidates.length > 0) {\n const candidate = candidates.pop();\n const { score: originalScore, boxIndex, suppressBeginIndex } = candidate;\n if (originalScore < scoreThreshold) {\n break;\n }\n let ignoreCandidate = false;\n for (let j = selectedIndices.length - 1; j >= suppressBeginIndex; --j) {\n const iou = intersectionOverUnion(boxes, boxIndex, selectedIndices[j]);\n if (iou >= iouThreshold) {\n ignoreCandidate = true;\n break;\n }\n candidate.score = candidate.score * suppressWeight(iouThreshold, scale2, iou);\n if (candidate.score <= scoreThreshold) {\n break;\n }\n }\n candidate.suppressBeginIndex = selectedIndices.length;\n if (!ignoreCandidate) {\n if (candidate.score === originalScore) {\n selectedIndices.push(boxIndex);\n selectedScores.push(candidate.score);\n } else if (candidate.score > scoreThreshold) {\n binaryInsert(candidates, candidate, ascendingComparator);\n }\n }\n }\n const validOutputs = selectedIndices.length;\n const elemsToPad = maxOutputSize - validOutputs;\n if (padToMaxOutputSize && elemsToPad > 0) {\n selectedIndices.push(...new Array(elemsToPad).fill(0));\n selectedScores.push(...new Array(elemsToPad).fill(0));\n }\n const result = { selectedIndices };\n if (returnScoresTensor) {\n result[\"selectedScores\"] = selectedScores;\n }\n if (returnValidOutputs) {\n result[\"validOutputs\"] = validOutputs;\n }\n return result;\n}\nfunction intersectionOverUnion(boxes, i2, j) {\n const iCoord = boxes.subarray(i2 * 4, i2 * 4 + 4);\n const jCoord = boxes.subarray(j * 4, j * 4 + 4);\n const yminI = Math.min(iCoord[0], iCoord[2]);\n const xminI = Math.min(iCoord[1], iCoord[3]);\n const ymaxI = Math.max(iCoord[0], iCoord[2]);\n const xmaxI = Math.max(iCoord[1], iCoord[3]);\n const yminJ = Math.min(jCoord[0], jCoord[2]);\n const xminJ = Math.min(jCoord[1], jCoord[3]);\n const ymaxJ = Math.max(jCoord[0], jCoord[2]);\n const xmaxJ = Math.max(jCoord[1], jCoord[3]);\n const areaI = (ymaxI - yminI) * (xmaxI - xminI);\n const areaJ = (ymaxJ - yminJ) * (xmaxJ - xminJ);\n if (areaI <= 0 || areaJ <= 0) {\n return 0;\n }\n const intersectionYmin = Math.max(yminI, yminJ);\n const intersectionXmin = Math.max(xminI, xminJ);\n const intersectionYmax = Math.min(ymaxI, ymaxJ);\n const intersectionXmax = Math.min(xmaxI, xmaxJ);\n const intersectionArea = Math.max(intersectionYmax - intersectionYmin, 0) * Math.max(intersectionXmax - intersectionXmin, 0);\n return intersectionArea / (areaI + areaJ - intersectionArea);\n}\nfunction suppressWeight(iouThreshold, scale2, iou) {\n const weight = Math.exp(scale2 * iou * iou);\n return iou <= iouThreshold ? weight : 0;\n}\nfunction ascendingComparator(c1, c2) {\n return c1.score - c2.score || c1.score === c2.score && c2.boxIndex - c1.boxIndex;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/non_max_suppression_async.js\nasync function nonMaxSuppressionAsync_(boxes, scores, maxOutputSize, iouThreshold = 0.5, scoreThreshold = Number.NEGATIVE_INFINITY) {\n const $boxes = convertToTensor(boxes, \"boxes\", \"nonMaxSuppressionAsync\");\n const $scores = convertToTensor(scores, \"scores\", \"nonMaxSuppressionAsync\");\n const inputs = nonMaxSuppSanityCheck($boxes, $scores, maxOutputSize, iouThreshold, scoreThreshold);\n maxOutputSize = inputs.maxOutputSize;\n iouThreshold = inputs.iouThreshold;\n scoreThreshold = inputs.scoreThreshold;\n const boxesAndScores = await Promise.all([$boxes.data(), $scores.data()]);\n const boxesVals = boxesAndScores[0];\n const scoresVals = boxesAndScores[1];\n const { selectedIndices } = nonMaxSuppressionV3Impl(boxesVals, scoresVals, maxOutputSize, iouThreshold, scoreThreshold);\n if ($boxes !== boxes) {\n $boxes.dispose();\n }\n if ($scores !== scores) {\n $scores.dispose();\n }\n return tensor1d(selectedIndices, \"int32\");\n}\nvar nonMaxSuppressionAsync = nonMaxSuppressionAsync_;\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/non_max_suppression_with_score.js\nfunction nonMaxSuppressionWithScore_(boxes, scores, maxOutputSize, iouThreshold = 0.5, scoreThreshold = Number.NEGATIVE_INFINITY, softNmsSigma = 0) {\n const $boxes = convertToTensor(boxes, \"boxes\", \"nonMaxSuppression\");\n const $scores = convertToTensor(scores, \"scores\", \"nonMaxSuppression\");\n const params = nonMaxSuppSanityCheck($boxes, $scores, maxOutputSize, iouThreshold, scoreThreshold, softNmsSigma);\n maxOutputSize = params.maxOutputSize;\n iouThreshold = params.iouThreshold;\n scoreThreshold = params.scoreThreshold;\n softNmsSigma = params.softNmsSigma;\n const inputs = { boxes: $boxes, scores: $scores };\n const attrs = { maxOutputSize, iouThreshold, scoreThreshold, softNmsSigma };\n const result = ENGINE.runKernel(NonMaxSuppressionV5, inputs, attrs);\n return { selectedIndices: result[0], selectedScores: result[1] };\n}\nvar nonMaxSuppressionWithScore = op({ nonMaxSuppressionWithScore_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/non_max_suppression_with_score_async.js\nasync function nonMaxSuppressionWithScoreAsync_(boxes, scores, maxOutputSize, iouThreshold = 0.5, scoreThreshold = Number.NEGATIVE_INFINITY, softNmsSigma = 0) {\n const $boxes = convertToTensor(boxes, \"boxes\", \"nonMaxSuppressionAsync\");\n const $scores = convertToTensor(scores, \"scores\", \"nonMaxSuppressionAsync\");\n const params = nonMaxSuppSanityCheck($boxes, $scores, maxOutputSize, iouThreshold, scoreThreshold, softNmsSigma);\n maxOutputSize = params.maxOutputSize;\n iouThreshold = params.iouThreshold;\n scoreThreshold = params.scoreThreshold;\n softNmsSigma = params.softNmsSigma;\n const boxesAndScores = await Promise.all([$boxes.data(), $scores.data()]);\n const boxesVals = boxesAndScores[0];\n const scoresVals = boxesAndScores[1];\n const { selectedIndices, selectedScores } = nonMaxSuppressionV5Impl(boxesVals, scoresVals, maxOutputSize, iouThreshold, scoreThreshold, softNmsSigma);\n if ($boxes !== boxes) {\n $boxes.dispose();\n }\n if ($scores !== scores) {\n $scores.dispose();\n }\n return {\n selectedIndices: tensor1d(selectedIndices, \"int32\"),\n selectedScores: tensor1d(selectedScores)\n };\n}\nvar nonMaxSuppressionWithScoreAsync = nonMaxSuppressionWithScoreAsync_;\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/non_max_suppression_padded.js\nfunction nonMaxSuppressionPadded_(boxes, scores, maxOutputSize, iouThreshold = 0.5, scoreThreshold = Number.NEGATIVE_INFINITY, padToMaxOutputSize = false) {\n const $boxes = convertToTensor(boxes, \"boxes\", \"nonMaxSuppression\");\n const $scores = convertToTensor(scores, \"scores\", \"nonMaxSuppression\");\n const params = nonMaxSuppSanityCheck($boxes, $scores, maxOutputSize, iouThreshold, scoreThreshold, null);\n const $maxOutputSize = params.maxOutputSize;\n const $iouThreshold = params.iouThreshold;\n const $scoreThreshold = params.scoreThreshold;\n const inputs = { boxes: $boxes, scores: $scores };\n const attrs = {\n maxOutputSize: $maxOutputSize,\n iouThreshold: $iouThreshold,\n scoreThreshold: $scoreThreshold,\n padToMaxOutputSize\n };\n const result = ENGINE.runKernel(NonMaxSuppressionV4, inputs, attrs);\n return { selectedIndices: result[0], validOutputs: result[1] };\n}\nvar nonMaxSuppressionPadded = op({ nonMaxSuppressionPadded_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/non_max_suppression_padded_async.js\nasync function nonMaxSuppressionPaddedAsync_(boxes, scores, maxOutputSize, iouThreshold = 0.5, scoreThreshold = Number.NEGATIVE_INFINITY, padToMaxOutputSize = false) {\n const $boxes = convertToTensor(boxes, \"boxes\", \"nonMaxSuppressionAsync\");\n const $scores = convertToTensor(scores, \"scores\", \"nonMaxSuppressionAsync\");\n const params = nonMaxSuppSanityCheck($boxes, $scores, maxOutputSize, iouThreshold, scoreThreshold, null);\n const $maxOutputSize = params.maxOutputSize;\n const $iouThreshold = params.iouThreshold;\n const $scoreThreshold = params.scoreThreshold;\n const [boxesVals, scoresVals] = await Promise.all([$boxes.data(), $scores.data()]);\n const { selectedIndices, validOutputs } = nonMaxSuppressionV4Impl(boxesVals, scoresVals, $maxOutputSize, $iouThreshold, $scoreThreshold, padToMaxOutputSize);\n if ($boxes !== boxes) {\n $boxes.dispose();\n }\n if ($scores !== scores) {\n $scores.dispose();\n }\n return {\n selectedIndices: tensor1d(selectedIndices, \"int32\"),\n validOutputs: scalar(validOutputs, \"int32\")\n };\n}\nvar nonMaxSuppressionPaddedAsync = nonMaxSuppressionPaddedAsync_;\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/resize_bilinear.js\nfunction resizeBilinear_(images, size, alignCorners = false, halfPixelCenters = false) {\n const $images = convertToTensor(images, \"images\", \"resizeBilinear\");\n assert($images.rank === 3 || $images.rank === 4, () => `Error in resizeBilinear: x must be rank 3 or 4, but got rank ${$images.rank}.`);\n assert(size.length === 2, () => `Error in resizeBilinear: new shape must 2D, but got shape ${size}.`);\n assert(halfPixelCenters === false || alignCorners === false, () => `Error in resizeBilinear: If halfPixelCenters is true, alignCorners must be false.`);\n let batchImages = $images;\n let reshapedTo4D = false;\n if ($images.rank === 3) {\n reshapedTo4D = true;\n batchImages = reshape($images, [1, $images.shape[0], $images.shape[1], $images.shape[2]]);\n }\n const [] = size;\n const inputs = { images: batchImages };\n const attrs = { alignCorners, halfPixelCenters, size };\n const res = ENGINE.runKernel(ResizeBilinear, inputs, attrs);\n if (reshapedTo4D) {\n return reshape(res, [res.shape[1], res.shape[2], res.shape[3]]);\n }\n return res;\n}\nvar resizeBilinear = op({ resizeBilinear_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/resize_nearest_neighbor.js\nfunction resizeNearestNeighbor_(images, size, alignCorners = false, halfPixelCenters = false) {\n const $images = convertToTensor(images, \"images\", \"resizeNearestNeighbor\");\n assert($images.rank === 3 || $images.rank === 4, () => `Error in resizeNearestNeighbor: x must be rank 3 or 4, but got rank ${$images.rank}.`);\n assert(size.length === 2, () => `Error in resizeNearestNeighbor: new shape must 2D, but got shape ${size}.`);\n assert($images.dtype === \"float32\" || $images.dtype === \"int32\", () => \"`images` must have `int32` or `float32` as dtype\");\n assert(halfPixelCenters === false || alignCorners === false, () => `Error in resizeNearestNeighbor: If halfPixelCenters is true, alignCorners must be false.`);\n let batchImages = $images;\n let reshapedTo4D = false;\n if ($images.rank === 3) {\n reshapedTo4D = true;\n batchImages = reshape($images, [1, $images.shape[0], $images.shape[1], $images.shape[2]]);\n }\n const [] = size;\n const inputs = { images: batchImages };\n const attrs = { alignCorners, halfPixelCenters, size };\n const res = ENGINE.runKernel(ResizeNearestNeighbor, inputs, attrs);\n if (reshapedTo4D) {\n return reshape(res, [res.shape[1], res.shape[2], res.shape[3]]);\n }\n return res;\n}\nvar resizeNearestNeighbor = op({ resizeNearestNeighbor_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/threshold.js\nfunction threshold_(image2, method = \"binary\", inverted = false, threshValue = 0.5) {\n const $image = convertToTensor(image2, \"image\", \"threshold\");\n const RED_INTENCITY_COEF = 0.2989;\n const GREEN_INTENCITY_COEF = 0.587;\n const BLUE_INTENCITY_COEF = 0.114;\n const totalPixelsInImage = $image.shape[0] * $image.shape[1];\n let $threshold = mul(tensor1d([threshValue]), 255);\n let r2, g, b, grayscale;\n assert($image.rank === 3, () => `Error in threshold: image must be rank 3,but got rank ${$image.rank}.`);\n assert($image.shape[2] === 3 || $image.shape[2] === 1, () => `Error in threshold: image color channel must be equal to 3 or 1but got ${$image.shape[2]}.`);\n assert($image.dtype === \"int32\" || $image.dtype === \"float32\", () => `Error in dtype: image dtype must be int32 or float32,but got dtype ${$image.dtype}.`);\n assert(method === \"otsu\" || method === \"binary\", () => `Method must be binary or otsu, but was ${method}`);\n if ($image.shape[2] === 3) {\n [r2, g, b] = split($image, [1, 1, 1], -1);\n const $r = mul(r2, RED_INTENCITY_COEF);\n const $g = mul(g, GREEN_INTENCITY_COEF);\n const $b = mul(b, BLUE_INTENCITY_COEF);\n grayscale = add2(add2($r, $g), $b);\n } else {\n grayscale = image2;\n }\n if (method === \"otsu\") {\n const $histogram = bincount(cast(round2(grayscale), \"int32\"), tensor([]), 256);\n $threshold = otsu($histogram, totalPixelsInImage);\n }\n const invCondition = inverted ? lessEqual(grayscale, $threshold) : greater(grayscale, $threshold);\n const result = cast(mul(invCondition, 255), \"int32\");\n return result;\n}\nfunction otsu(histogram, total) {\n let bestThresh = tensor1d([-1]);\n let bestInBetVar = tensor1d([0]);\n let cInBetVar = tensor1d([0]);\n let classFirst, classSecond, meanFirst, meanSec, weightForeground, weightBack;\n for (let index = 0; index < histogram.size - 1; index++) {\n classFirst = slice(histogram, 0, index + 1);\n classSecond = slice(histogram, index + 1);\n weightForeground = div(sum2(classFirst), total);\n weightBack = div(sum2(classSecond), total);\n const meanFirstDivA = sum2(mul(classFirst, range(0, classFirst.size)));\n meanFirst = div(meanFirstDivA, sum2(classFirst));\n const meanSecFill = fill(classSecond.shape, classFirst.size);\n const meanSecAdd = add2(range(0, classSecond.size), meanSecFill);\n const meanSecMul = mul(classSecond, meanSecAdd);\n meanSec = div(sum2(meanSecMul), sum2(classSecond));\n const cInBetVarSubA = sub(meanFirst, meanSec);\n const cInBetVarSubB = sub(meanFirst, meanSec);\n const cInBetVarMul = mul(weightForeground, weightBack);\n cInBetVar = mul(mul(cInBetVarMul, cInBetVarSubA), cInBetVarSubB);\n const condition = greater(cInBetVar, bestInBetVar);\n bestInBetVar = where(condition, cInBetVar, bestInBetVar);\n bestThresh = where(condition, tensor1d([index]), bestThresh);\n }\n return bestThresh;\n}\nvar threshold = op({ threshold_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/transform.js\nfunction transform_(image2, transforms, interpolation = \"nearest\", fillMode = \"constant\", fillValue = 0, outputShape) {\n const $image = convertToTensor(image2, \"image\", \"transform\", \"float32\");\n const $transforms = convertToTensor(transforms, \"transforms\", \"transform\", \"float32\");\n assert($image.rank === 4, () => `Error in transform: image must be rank 4,but got rank ${$image.rank}.`);\n assert($transforms.rank === 2 && ($transforms.shape[0] === $image.shape[0] || $transforms.shape[0] === 1) && $transforms.shape[1] === 8, () => `Error in transform: Input transform should be batch x 8 or 1 x 8`);\n assert(outputShape == null || outputShape.length === 2, () => `Error in transform: outputShape must be [height, width] or null, but got ${outputShape}.`);\n const inputs = { image: $image, transforms: $transforms };\n const attrs = { interpolation, fillMode, fillValue, outputShape };\n return ENGINE.runKernel(Transform, inputs, attrs);\n}\nvar transform = op({ transform_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/linalg/band_part.js\nfunction bandPart_(a, numLower, numUpper) {\n assert(numLower % 1 === 0, () => `bandPart(): numLower must be an integer, got ${numLower}.`);\n assert(numUpper % 1 === 0, () => `bandPart(): numUpper must be an integer, got ${numUpper}.`);\n const $a = convertToTensor(a, \"a\", \"bandPart\");\n assert($a.rank >= 2, () => `bandPart(): Rank must be at least 2, got ${$a.rank}.`);\n const shape = $a.shape;\n const [M, N] = $a.shape.slice(-2);\n if (!(numLower <= M)) {\n throw new Error(`bandPart(): numLower (${numLower}) must not be greater than the number of rows (${M}).`);\n }\n if (!(numUpper <= N)) {\n throw new Error(`bandPart(): numUpper (${numUpper}) must not be greater than the number of columns (${N}).`);\n }\n if (numLower < 0) {\n numLower = M;\n }\n if (numUpper < 0) {\n numUpper = N;\n }\n const i2 = reshape(range(0, M, 1, \"int32\"), [-1, 1]);\n const j = range(0, N, 1, \"int32\");\n const ij = sub(i2, j);\n const inBand = logicalAnd(lessEqual(ij, scalar(+numLower, \"int32\")), greaterEqual(ij, scalar(-numUpper, \"int32\")));\n const zero = zeros([M, N], $a.dtype);\n return reshape(stack(unstack(reshape($a, [-1, M, N])).map((mat) => where(inBand, mat, zero))), shape);\n}\nvar bandPart = op({ bandPart_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/linalg/gram_schmidt.js\nfunction gramSchmidt_(xs) {\n let inputIsTensor2D;\n if (Array.isArray(xs)) {\n inputIsTensor2D = false;\n assert(xs != null && xs.length > 0, () => \"Gram-Schmidt process: input must not be null, undefined, or empty\");\n const dim = xs[0].shape[0];\n for (let i2 = 1; i2 < xs.length; ++i2) {\n assert(xs[i2].shape[0] === dim, () => `Gram-Schmidt: Non-unique lengths found in the input vectors: (${xs[i2].shape[0]} vs. ${dim})`);\n }\n } else {\n inputIsTensor2D = true;\n xs = split(xs, xs.shape[0], 0).map((x) => squeeze(x, [0]));\n }\n assert(xs.length <= xs[0].shape[0], () => `Gram-Schmidt: Number of vectors (${xs.length}) exceeds number of dimensions (${xs[0].shape[0]}).`);\n const ys = [];\n const xs1d = xs;\n for (let i2 = 0; i2 < xs.length; ++i2) {\n ys.push(ENGINE.tidy(() => {\n let x = xs1d[i2];\n if (i2 > 0) {\n for (let j = 0; j < i2; ++j) {\n const proj = mul(sum2(mul(ys[j], x)), ys[j]);\n x = sub(x, proj);\n }\n }\n return div(x, norm(x, \"euclidean\"));\n }));\n }\n if (inputIsTensor2D) {\n return stack(ys, 0);\n } else {\n return ys;\n }\n}\nvar gramSchmidt = op({ gramSchmidt_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/linalg/qr.js\nfunction qr_(x, fullMatrices = false) {\n assert(x.rank >= 2, () => `qr() requires input tensor to have a rank >= 2, but got rank ${x.rank}`);\n if (x.rank === 2) {\n return qr2d(x, fullMatrices);\n } else {\n const outerDimsProd = x.shape.slice(0, x.shape.length - 2).reduce((value, prev) => value * prev);\n const x2ds = unstack(reshape(x, [\n outerDimsProd,\n x.shape[x.shape.length - 2],\n x.shape[x.shape.length - 1]\n ]), 0);\n const q2ds = [];\n const r2ds = [];\n x2ds.forEach((x2d) => {\n const [q2d, r2d] = qr2d(x2d, fullMatrices);\n q2ds.push(q2d);\n r2ds.push(r2d);\n });\n const q = reshape(stack(q2ds, 0), x.shape);\n const r2 = reshape(stack(r2ds, 0), x.shape);\n return [q, r2];\n }\n}\nfunction qr2d(x, fullMatrices = false) {\n return ENGINE.tidy(() => {\n assert(x.shape.length === 2, () => `qr2d() requires a 2D Tensor, but got a ${x.shape.length}D Tensor.`);\n const m = x.shape[0];\n const n2 = x.shape[1];\n let q = eye(m);\n let r2 = clone(x);\n const one2D = tensor2d([[1]], [1, 1]);\n let w = clone(one2D);\n const iters = m >= n2 ? n2 : m;\n for (let j = 0; j < iters; ++j) {\n const rTemp = r2;\n const wTemp = w;\n const qTemp = q;\n [w, r2, q] = ENGINE.tidy(() => {\n const rjEnd1 = slice(r2, [j, j], [m - j, 1]);\n const normX = norm(rjEnd1);\n const rjj = slice(r2, [j, j], [1, 1]);\n const s2 = where(greater(rjj, 0), tensor2d([[-1]]), tensor2d([[1]]));\n const u1 = sub(rjj, mul(s2, normX));\n const wPre = div(rjEnd1, u1);\n if (wPre.shape[0] === 1) {\n w = clone(one2D);\n } else {\n w = concat([\n one2D,\n slice(wPre, [1, 0], [wPre.shape[0] - 1, wPre.shape[1]])\n ], 0);\n }\n const tau = neg(div(matMul(s2, u1), normX));\n const rjEndAll = slice(r2, [j, 0], [m - j, n2]);\n const tauTimesW = mul(tau, w);\n const wT = transpose(w);\n if (j === 0) {\n r2 = sub(rjEndAll, matMul(tauTimesW, matMul(wT, rjEndAll)));\n } else {\n const rTimesTau = sub(rjEndAll, matMul(tauTimesW, matMul(wT, rjEndAll)));\n r2 = concat([slice(r2, [0, 0], [j, n2]), rTimesTau], 0);\n }\n const tawTimesWT = transpose(tauTimesW);\n const qAllJEnd = slice(q, [0, j], [m, q.shape[1] - j]);\n if (j === 0) {\n q = sub(qAllJEnd, matMul(matMul(qAllJEnd, w), tawTimesWT));\n } else {\n const qTimesTau = sub(qAllJEnd, matMul(matMul(qAllJEnd, w), tawTimesWT));\n q = concat([slice(q, [0, 0], [m, j]), qTimesTau], 1);\n }\n return [w, r2, q];\n });\n dispose([rTemp, wTemp, qTemp]);\n }\n if (!fullMatrices && m > n2) {\n q = slice(q, [0, 0], [m, n2]);\n r2 = slice(r2, [0, 0], [n2, n2]);\n }\n return [q, r2];\n });\n}\nvar qr = op({ qr_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/loss_ops_utils.js\nvar Reduction;\n(function(Reduction2) {\n Reduction2[Reduction2[\"NONE\"] = 0] = \"NONE\";\n Reduction2[Reduction2[\"MEAN\"] = 1] = \"MEAN\";\n Reduction2[Reduction2[\"SUM\"] = 2] = \"SUM\";\n Reduction2[Reduction2[\"SUM_BY_NONZERO_WEIGHTS\"] = 3] = \"SUM_BY_NONZERO_WEIGHTS\";\n})(Reduction || (Reduction = {}));\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/losses/compute_weighted_loss.js\nfunction computeWeightedLoss_(losses2, weights, reduction = Reduction.SUM_BY_NONZERO_WEIGHTS) {\n const $losses = convertToTensor(losses2, \"losses\", \"computeWeightedLoss\");\n let $weights = null;\n if (weights != null) {\n $weights = convertToTensor(weights, \"weights\", \"computeWeightedLoss\");\n }\n const weightedLoss = $weights == null ? $losses : mul($losses, $weights);\n if (reduction === Reduction.NONE) {\n return weightedLoss;\n }\n if (reduction === Reduction.SUM) {\n return sum2(weightedLoss);\n }\n if (reduction === Reduction.MEAN) {\n if ($weights == null) {\n return mean(weightedLoss);\n } else {\n const broadcastFactor = $losses.size / $weights.size;\n const result = div(sum2(weightedLoss), sum2($weights));\n return broadcastFactor > 1 ? div(result, scalar(broadcastFactor)) : result;\n }\n }\n if (reduction === Reduction.SUM_BY_NONZERO_WEIGHTS) {\n if ($weights == null) {\n return div(sum2(weightedLoss), scalar($losses.size));\n } else {\n const broadcastedWeights = mul($weights, ones2($losses.shape));\n const numNonZeros = cast(sum2(notEqual(broadcastedWeights, scalar(0))), \"float32\");\n return div(sum2(weightedLoss), numNonZeros);\n }\n }\n throw Error(`Unknown reduction: ${reduction}`);\n}\nvar computeWeightedLoss = op({ computeWeightedLoss_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/losses/absolute_difference.js\nfunction absoluteDifference_(labels, predictions, weights, reduction = Reduction.SUM_BY_NONZERO_WEIGHTS) {\n const $labels = convertToTensor(labels, \"labels\", \"absoluteDifference\");\n const $predictions = convertToTensor(predictions, \"predictions\", \"absoluteDifference\");\n let $weights = null;\n if (weights != null) {\n $weights = convertToTensor(weights, \"weights\", \"absoluteDifference\");\n }\n assertShapesMatch($labels.shape, $predictions.shape, \"Error in absoluteDifference: \");\n const losses2 = abs(sub($labels, $predictions));\n return computeWeightedLoss(losses2, $weights, reduction);\n}\nvar absoluteDifference = op({ absoluteDifference_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/losses/cosine_distance.js\nfunction cosineDistance_(labels, predictions, axis, weights, reduction = Reduction.SUM_BY_NONZERO_WEIGHTS) {\n const $labels = convertToTensor(labels, \"labels\", \"cosineDistance\");\n const $predictions = convertToTensor(predictions, \"predictions\", \"cosineDistance\");\n let $weights = null;\n if (weights != null) {\n $weights = convertToTensor(weights, \"weights\", \"cosineDistance\");\n }\n assertShapesMatch($labels.shape, $predictions.shape, \"Error in cosineDistance: \");\n const one = scalar(1);\n const losses2 = sub(one, sum2(mul($labels, $predictions), axis, true));\n return computeWeightedLoss(losses2, $weights, reduction);\n}\nvar cosineDistance = op({ cosineDistance_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/losses/hinge_loss.js\nfunction hingeLoss_(labels, predictions, weights, reduction = Reduction.SUM_BY_NONZERO_WEIGHTS) {\n let $labels = convertToTensor(labels, \"labels\", \"hingeLoss\");\n const $predictions = convertToTensor(predictions, \"predictions\", \"hingeLoss\");\n let $weights = null;\n if (weights != null) {\n $weights = convertToTensor(weights, \"weights\", \"hingeLoss\");\n }\n assertShapesMatch($labels.shape, $predictions.shape, \"Error in hingeLoss: \");\n const one = scalar(1);\n $labels = sub(mul(scalar(2), $labels), one);\n const losses2 = relu(sub(one, mul($labels, $predictions)));\n return computeWeightedLoss(losses2, $weights, reduction);\n}\nvar hingeLoss = op({ hingeLoss_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/losses/huber_loss.js\nfunction huberLoss_(labels, predictions, weights, delta = 1, reduction = Reduction.SUM_BY_NONZERO_WEIGHTS) {\n const $labels = convertToTensor(labels, \"labels\", \"huberLoss\");\n const $predictions = convertToTensor(predictions, \"predictions\", \"huberLoss\");\n let $weights = null;\n if (weights != null) {\n $weights = convertToTensor(weights, \"weights\", \"huberLoss\");\n }\n assertShapesMatch($labels.shape, $predictions.shape, \"Error in huberLoss: \");\n const deltaScalar = scalar(delta);\n const error = abs(sub($predictions, $labels));\n const quadratic = minimum(error, deltaScalar);\n const linear = sub(error, quadratic);\n const losses2 = add2(mul(scalar(0.5), square(quadratic)), mul(deltaScalar, linear));\n return computeWeightedLoss(losses2, $weights, reduction);\n}\nvar huberLoss = op({ huberLoss_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/losses/log_loss.js\nfunction logLoss_(labels, predictions, weights, epsilon3 = 1e-7, reduction = Reduction.SUM_BY_NONZERO_WEIGHTS) {\n const $labels = convertToTensor(labels, \"labels\", \"logLoss\");\n const $predictions = convertToTensor(predictions, \"predictions\", \"logLoss\");\n let $weights = null;\n if (weights != null) {\n $weights = convertToTensor(weights, \"weights\", \"logLoss\");\n }\n assertShapesMatch($labels.shape, $predictions.shape, \"Error in logLoss: \");\n const one = scalar(1);\n const epsilonScalar = scalar(epsilon3);\n const l13 = neg(mul($labels, log2(add2($predictions, epsilonScalar))));\n const l23 = mul(sub(one, $labels), log2(add2(sub(one, $predictions), epsilonScalar)));\n const losses2 = sub(l13, l23);\n return computeWeightedLoss(losses2, $weights, reduction);\n}\nvar logLoss = op({ logLoss_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/losses/mean_squared_error.js\nfunction meanSquaredError_(labels, predictions, weights, reduction = Reduction.SUM_BY_NONZERO_WEIGHTS) {\n const $labels = convertToTensor(labels, \"labels\", \"meanSquaredError\");\n const $predictions = convertToTensor(predictions, \"predictions\", \"meanSquaredError\");\n let $weights = null;\n if (weights != null) {\n $weights = convertToTensor(weights, \"weights\", \"meanSquaredError\");\n }\n assertShapesMatch($labels.shape, $predictions.shape, \"Error in meanSquaredError: \");\n const losses2 = squaredDifference($labels, $predictions);\n return computeWeightedLoss(losses2, $weights, reduction);\n}\nvar meanSquaredError = op({ meanSquaredError_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/losses/sigmoid_cross_entropy.js\nfunction sigmoidCrossEntropyWithLogits_(labels, logits) {\n const $labels = convertToTensor(labels, \"labels\", \"sigmoidCrossEntropyWithLogits\");\n const $logits = convertToTensor(logits, \"logits\", \"sigmoidCrossEntropyWithLogits\");\n assertShapesMatch($labels.shape, $logits.shape, \"Error in sigmoidCrossEntropyWithLogits: \");\n const maxOutput = relu($logits);\n const outputXTarget = mul($logits, $labels);\n const sigmoidOutput = log1p(exp(neg(abs($logits))));\n return add2(sub(maxOutput, outputXTarget), sigmoidOutput);\n}\nfunction sigmoidCrossEntropy_(multiClassLabels, logits, weights, labelSmoothing = 0, reduction = Reduction.SUM_BY_NONZERO_WEIGHTS) {\n let $multiClassLabels = convertToTensor(multiClassLabels, \"multiClassLabels\", \"sigmoidCrossEntropy\");\n const $logits = convertToTensor(logits, \"logits\", \"sigmoidCrossEntropy\");\n let $weights = null;\n if (weights != null) {\n $weights = convertToTensor(weights, \"weights\", \"sigmoidCrossEntropy\");\n }\n assertShapesMatch($multiClassLabels.shape, $logits.shape, \"Error in sigmoidCrossEntropy: \");\n if (labelSmoothing > 0) {\n const labelSmoothingScalar = scalar(labelSmoothing);\n const one = scalar(1);\n const half = scalar(0.5);\n $multiClassLabels = add2(mul($multiClassLabels, sub(one, labelSmoothingScalar)), mul(half, labelSmoothingScalar));\n }\n const losses2 = sigmoidCrossEntropyWithLogits_($multiClassLabels, $logits);\n return computeWeightedLoss(losses2, $weights, reduction);\n}\nvar sigmoidCrossEntropy = op({ sigmoidCrossEntropy_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/losses/softmax_cross_entropy.js\nfunction softmaxCrossEntropyWithLogits_(labels, logits, dim = -1) {\n if (dim === -1) {\n dim = logits.rank - 1;\n }\n if (dim !== logits.rank - 1) {\n throw Error(`Softmax cross entropy along a non-last dimension is not yet supported. Labels / logits was rank ${logits.rank} and dim was ${dim}`);\n }\n const customOp = customGrad((labels2, logits2, save) => {\n const keepDims = true;\n const lse = logSumExp(logits2, [dim], keepDims);\n const logResult = sub(cast(logits2, \"float32\"), lse);\n save([labels2, logResult]);\n const costVector = neg(mul(logResult, labels2));\n const value = sum2(costVector, [dim]);\n const gradFunc = (dy, saved) => {\n const [labels3, logResult2] = saved;\n const dyShape = expandShapeToKeepDim(dy.shape, [dim]);\n return [\n mul(reshape(dy, dyShape), sub(cast(labels3, \"float32\"), exp(logResult2))),\n mul(reshape(dy, dyShape), sub(exp(logResult2), cast(labels3, \"float32\")))\n ];\n };\n return { value, gradFunc };\n });\n return customOp(labels, logits);\n}\nfunction softmaxCrossEntropy_(onehotLabels, logits, weights, labelSmoothing = 0, reduction = Reduction.SUM_BY_NONZERO_WEIGHTS) {\n let $onehotLabels = convertToTensor(onehotLabels, \"onehotLabels\", \"softmaxCrossEntropy\");\n const $logits = convertToTensor(logits, \"logits\", \"softmaxCrossEntropy\");\n let $weights = null;\n if (weights != null) {\n $weights = convertToTensor(weights, \"weights\", \"softmaxCrossEntropy\");\n }\n assertShapesMatch($onehotLabels.shape, $logits.shape, \"Error in softmaxCrossEntropy: \");\n if (labelSmoothing > 0) {\n const labelSmoothingScalar = scalar(labelSmoothing);\n const one = scalar(1);\n const numClasses = scalar($onehotLabels.shape[1]);\n $onehotLabels = add2(mul($onehotLabels, sub(one, labelSmoothingScalar)), div(labelSmoothingScalar, numClasses));\n }\n const losses2 = softmaxCrossEntropyWithLogits_($onehotLabels, $logits);\n return computeWeightedLoss(losses2, $weights, reduction);\n}\nvar softmaxCrossEntropy = op({ softmaxCrossEntropy_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/sparse/sparse_fill_empty_rows.js\nfunction sparseFillEmptyRows_(indices, values, denseShape, defaultValue) {\n const $indices = convertToTensor(indices, \"indices\", \"sparseFillEmptyRows\", \"int32\");\n const $values = convertToTensor(values, \"values\", \"sparseFillEmptyRows\");\n const $denseShape = convertToTensor(denseShape, \"denseShape\", \"sparseFillEmptyRows\", \"int32\");\n const $defaultValue = convertToTensor(defaultValue, \"defaultValue\", \"sparseFillEmptyRows\", $values.dtype);\n if ($indices.rank !== 2) {\n throw new Error(`Indices should be Tensor2D but received shape\n ${$indices.shape}`);\n }\n if ($values.rank !== 1) {\n throw new Error(`Values should be Tensor1D but received shape ${$values.shape}`);\n }\n if ($denseShape.rank !== 1) {\n throw new Error(`Dense shape should be Tensor1D but received shape ${$denseShape.shape}`);\n }\n if ($defaultValue.rank !== 0) {\n throw new Error(`Default value should be a scalar but received shape ${$defaultValue.shape}`);\n }\n const inputs = {\n indices: $indices,\n values: $values,\n denseShape: $denseShape,\n defaultValue: $defaultValue\n };\n const result = ENGINE.runKernel(SparseFillEmptyRows, inputs);\n return {\n outputIndices: result[0],\n outputValues: result[1],\n emptyRowIndicator: result[2],\n reverseIndexMap: result[3]\n };\n}\nvar sparseFillEmptyRows = op({ sparseFillEmptyRows_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/sparse/sparse_reshape.js\nfunction sparseReshape_(inputIndices, inputShape, newShape) {\n const $inputIndices = convertToTensor(inputIndices, \"inputIndices\", \"sparseReshape\", \"int32\");\n const $inputShape = convertToTensor(inputShape, \"inputShape\", \"sparseReshape\", \"int32\");\n const $newShape = convertToTensor(newShape, \"newShape\", \"sparseReshape\", \"int32\");\n if ($inputIndices.rank !== 2) {\n throw new Error(`Input indices should be Tensor2D but received shape\n ${$inputIndices.shape}`);\n }\n if ($inputShape.rank !== 1) {\n throw new Error(`Input shape should be Tensor1D but received shape ${$inputShape.shape}`);\n }\n if ($newShape.rank !== 1) {\n throw new Error(`New shape should be Tensor1D but received shape ${$newShape.shape}`);\n }\n const inputs = {\n inputIndices: $inputIndices,\n inputShape: $inputShape,\n newShape: $newShape\n };\n const result = ENGINE.runKernel(SparseReshape, inputs);\n return { outputIndices: result[0], outputShape: result[1] };\n}\nvar sparseReshape = op({ sparseReshape_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/sparse/sparse_segment_mean.js\nfunction sparseSegmentMean_(data, indices, segmentIds) {\n const $data = convertToTensor(data, \"data\", \"sparseSegmentMean\");\n const $indices = convertToTensor(indices, \"indices\", \"sparseSegmentMean\", \"int32\");\n const $segmentIds = convertToTensor(segmentIds, \"segmentIds\", \"sparseSegmentMean\", \"int32\");\n if ($data.rank < 1) {\n throw new Error(`Data should be at least 1 dimensional but received scalar`);\n }\n if ($indices.rank !== 1) {\n throw new Error(`Indices should be Tensor1D but received shape\n ${$indices.shape}`);\n }\n if ($segmentIds.rank !== 1) {\n throw new Error(`Segment ids should be Tensor1D but received shape\n ${$segmentIds.shape}`);\n }\n const inputs = {\n data: $data,\n indices: $indices,\n segmentIds: $segmentIds\n };\n return ENGINE.runKernel(SparseSegmentMean, inputs);\n}\nvar sparseSegmentMean = op({ sparseSegmentMean_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/sparse/sparse_segment_sum.js\nfunction sparseSegmentSum_(data, indices, segmentIds) {\n const $data = convertToTensor(data, \"data\", \"sparseSegmentSum\");\n const $indices = convertToTensor(indices, \"indices\", \"sparseSegmentSum\", \"int32\");\n const $segmentIds = convertToTensor(segmentIds, \"segmentIds\", \"sparseSegmentSum\", \"int32\");\n if ($data.rank < 1) {\n throw new Error(`Data should be at least 1 dimensional but received scalar`);\n }\n if ($indices.rank !== 1) {\n throw new Error(`Indices should be Tensor1D but received shape\n ${$indices.shape}`);\n }\n if ($segmentIds.rank !== 1) {\n throw new Error(`Segment ids should be Tensor1D but received shape\n ${$segmentIds.shape}`);\n }\n const inputs = {\n data: $data,\n indices: $indices,\n segmentIds: $segmentIds\n };\n return ENGINE.runKernel(SparseSegmentSum, inputs);\n}\nvar sparseSegmentSum = op({ sparseSegmentSum_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/string/string_n_grams.js\nfunction stringNGrams_(data, dataSplits, separator, nGramWidths, leftPad, rightPad2, padWidth, preserveShortSequences) {\n const $data = convertToTensor(data, \"data\", \"stringNGrams\", \"string\");\n if ($data.dtype !== \"string\") {\n throw new Error(\"Data must be of datatype string\");\n }\n if ($data.shape.length !== 1) {\n throw new Error(`Data must be a vector, saw: ${$data.shape}`);\n }\n const $dataSplits = convertToTensor(dataSplits, \"dataSplits\", \"stringNGrams\");\n if ($dataSplits.dtype !== \"int32\") {\n throw new Error(\"Data splits must be of datatype int32\");\n }\n const attrs = {\n separator,\n nGramWidths,\n leftPad,\n rightPad: rightPad2,\n padWidth,\n preserveShortSequences\n };\n const inputs = { data: $data, dataSplits: $dataSplits };\n const result = ENGINE.runKernel(StringNGrams, inputs, attrs);\n return { nGrams: result[0], nGramsSplits: result[1] };\n}\nvar stringNGrams = op({ stringNGrams_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/string/string_split.js\nfunction stringSplit_(input2, delimiter, skipEmpty = true) {\n const $input = convertToTensor(input2, \"input\", \"stringSplit\", \"string\");\n const $delimiter = convertToTensor(delimiter, \"delimiter\", \"stringSplit\", \"string\");\n if ($input.rank !== 1) {\n throw new Error(`Input should be Tensor1D but received shape ${$input.shape}`);\n }\n if ($delimiter.rank !== 0) {\n throw new Error(`Delimiter should be a scalar but received shape ${$delimiter.shape}`);\n }\n const attrs = { skipEmpty };\n const inputs = { input: $input, delimiter: $delimiter };\n const result = ENGINE.runKernel(StringSplit, inputs, attrs);\n return { indices: result[0], values: result[1], shape: result[2] };\n}\nvar stringSplit = op({ stringSplit_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/string/string_to_hash_bucket_fast.js\nfunction stringToHashBucketFast_(input2, numBuckets) {\n const $input = convertToTensor(input2, \"input\", \"stringToHashBucketFast\", \"string\");\n const attrs = { numBuckets };\n if (numBuckets <= 0) {\n throw new Error(`Number of buckets must be at least 1`);\n }\n const inputs = { input: $input };\n return ENGINE.runKernel(StringToHashBucketFast, inputs, attrs);\n}\nvar stringToHashBucketFast = op({ stringToHashBucketFast_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/ops.js\nvar spectral = {\n fft,\n ifft,\n rfft,\n irfft\n};\nvar signal = {\n hammingWindow,\n hannWindow,\n frame,\n stft\n};\nvar image = {\n flipLeftRight,\n grayscaleToRGB,\n resizeNearestNeighbor,\n resizeBilinear,\n rotateWithOffset,\n cropAndResize,\n nonMaxSuppression,\n nonMaxSuppressionAsync,\n nonMaxSuppressionWithScore,\n nonMaxSuppressionWithScoreAsync,\n nonMaxSuppressionPadded,\n nonMaxSuppressionPaddedAsync,\n threshold,\n transform\n};\nvar linalg = {\n bandPart,\n gramSchmidt,\n qr\n};\nvar losses = {\n absoluteDifference,\n computeWeightedLoss,\n cosineDistance,\n hingeLoss,\n huberLoss,\n logLoss,\n meanSquaredError,\n sigmoidCrossEntropy,\n softmaxCrossEntropy\n};\nvar sparse = {\n sparseFillEmptyRows,\n sparseReshape,\n sparseSegmentMean,\n sparseSegmentSum\n};\nvar string = {\n stringNGrams,\n stringSplit,\n stringToHashBucketFast\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/optimizers/optimizer.js\nvar Optimizer = class extends Serializable {\n minimize(f, returnCost = false, varList) {\n const { value, grads: grads2 } = this.computeGradients(f, varList);\n if (varList != null) {\n const gradArray = varList.map((v) => ({ name: v.name, tensor: grads2[v.name] }));\n this.applyGradients(gradArray);\n } else {\n this.applyGradients(grads2);\n }\n dispose(grads2);\n if (returnCost) {\n return value;\n } else {\n value.dispose();\n return null;\n }\n }\n get iterations() {\n if (this.iterations_ == null) {\n this.iterations_ = 0;\n }\n return this.iterations_;\n }\n incrementIterations() {\n this.iterations_ = this.iterations + 1;\n }\n computeGradients(f, varList) {\n return variableGrads(f, varList);\n }\n dispose() {\n if (this.iterations_ != null) {\n dispose(this.iterations_);\n }\n }\n async saveIterations() {\n if (this.iterations_ == null) {\n this.iterations_ = 0;\n }\n return {\n name: \"iter\",\n tensor: scalar(this.iterations_, \"int32\")\n };\n }\n async getWeights() {\n throw new Error(\"getWeights() is not implemented for this optimizer yet.\");\n }\n async setWeights(weightValues) {\n throw new Error(`setWeights() is not implemented for this optimizer class ${this.getClassName()}`);\n }\n async extractIterations(weightValues) {\n this.iterations_ = (await weightValues[0].tensor.data())[0];\n return weightValues.slice(1);\n }\n};\nObject.defineProperty(Optimizer, Symbol.hasInstance, {\n value: (instance) => {\n return instance.minimize != null && instance.computeGradients != null && instance.applyGradients != null;\n }\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/optimizers/adadelta_optimizer.js\nvar AdadeltaOptimizer = class extends Optimizer {\n constructor(learningRate, rho, epsilon3 = null) {\n super();\n this.learningRate = learningRate;\n this.rho = rho;\n this.epsilon = epsilon3;\n this.accumulatedGrads = [];\n this.accumulatedUpdates = [];\n if (epsilon3 == null) {\n this.epsilon = ENGINE.backend.epsilon();\n }\n }\n applyGradients(variableGradients) {\n const variableNames = Array.isArray(variableGradients) ? variableGradients.map((item) => item.name) : Object.keys(variableGradients);\n variableNames.forEach((name, i2) => {\n const value = ENGINE.registeredVariables[name];\n const trainable = false;\n if (this.accumulatedGrads[i2] == null) {\n this.accumulatedGrads[i2] = {\n originalName: `${name}/accum_grad`,\n variable: tidy(() => zerosLike(value).variable(trainable))\n };\n }\n if (this.accumulatedUpdates[i2] == null) {\n this.accumulatedUpdates[i2] = {\n originalName: `${name}/accum_var`,\n variable: tidy(() => zerosLike(value).variable(trainable))\n };\n }\n const gradient = Array.isArray(variableGradients) ? variableGradients[i2].tensor : variableGradients[name];\n if (gradient == null) {\n return;\n }\n const accumulatedGrad = this.accumulatedGrads[i2].variable;\n const accumulatedUpdate = this.accumulatedUpdates[i2].variable;\n tidy(() => {\n const newAccumulatedGrad = add2(mul(accumulatedGrad, this.rho), mul(square(gradient), 1 - this.rho));\n const updates = mul(div(sqrt(add2(accumulatedUpdate, this.epsilon)), sqrt(add2(accumulatedGrad, this.epsilon))), gradient);\n const newAccumulatedUpdate = add2(mul(accumulatedUpdate, this.rho), mul(square(updates), 1 - this.rho));\n accumulatedGrad.assign(newAccumulatedGrad);\n accumulatedUpdate.assign(newAccumulatedUpdate);\n const newValue = add2(mul(updates, -this.learningRate), value);\n value.assign(newValue);\n });\n });\n this.incrementIterations();\n }\n dispose() {\n if (this.accumulatedUpdates != null) {\n dispose(this.accumulatedGrads.map((v) => v.variable));\n dispose(this.accumulatedUpdates.map((v) => v.variable));\n }\n }\n async getWeights() {\n const variables = [...this.accumulatedGrads, ...this.accumulatedUpdates];\n return [await this.saveIterations()].concat(variables.map((v) => ({ name: v.originalName, tensor: v.variable })));\n }\n async setWeights(weightValues) {\n weightValues = await this.extractIterations(weightValues);\n const variableCount = weightValues.length / 2;\n const trainable = false;\n this.accumulatedGrads = weightValues.slice(0, variableCount).map((v) => ({\n originalName: v.name,\n variable: v.tensor.variable(trainable)\n }));\n this.accumulatedUpdates = weightValues.slice(variableCount, variableCount * 2).map((v) => ({\n originalName: v.name,\n variable: v.tensor.variable(trainable)\n }));\n }\n getConfig() {\n return {\n \"learningRate\": this.learningRate,\n \"rho\": this.rho,\n \"epsilon\": this.epsilon\n };\n }\n static fromConfig(cls, config) {\n return new cls(config[\"learningRate\"], config[\"rho\"], config[\"epsilon\"]);\n }\n};\nAdadeltaOptimizer.className = \"Adadelta\";\nregisterClass(AdadeltaOptimizer);\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/optimizers/adagrad_optimizer.js\nvar AdagradOptimizer = class extends Optimizer {\n constructor(learningRate, initialAccumulatorValue = 0.1) {\n super();\n this.learningRate = learningRate;\n this.initialAccumulatorValue = initialAccumulatorValue;\n this.accumulatedGrads = [];\n }\n applyGradients(variableGradients) {\n const variableNames = Array.isArray(variableGradients) ? variableGradients.map((item) => item.name) : Object.keys(variableGradients);\n variableNames.forEach((name, i2) => {\n const value = ENGINE.registeredVariables[name];\n if (this.accumulatedGrads[i2] == null) {\n const trainable = false;\n this.accumulatedGrads[i2] = {\n originalName: `${name}/accumulator`,\n variable: tidy(() => fill(value.shape, this.initialAccumulatorValue).variable(trainable))\n };\n }\n const gradient = Array.isArray(variableGradients) ? variableGradients[i2].tensor : variableGradients[name];\n if (gradient == null) {\n return;\n }\n const accumulatedGrad = this.accumulatedGrads[i2].variable;\n tidy(() => {\n const newAccumulatedGrad = add2(accumulatedGrad, square(gradient));\n accumulatedGrad.assign(newAccumulatedGrad);\n const newValue = add2(mul(div(gradient, sqrt(add2(newAccumulatedGrad, ENGINE.backend.epsilon()))), -this.learningRate), value);\n value.assign(newValue);\n });\n });\n this.incrementIterations();\n }\n dispose() {\n if (this.accumulatedGrads != null) {\n dispose(this.accumulatedGrads.map((v) => v.variable));\n }\n }\n async getWeights() {\n return [await this.saveIterations()].concat(this.accumulatedGrads.map((v) => ({ name: v.originalName, tensor: v.variable })));\n }\n async setWeights(weightValues) {\n weightValues = await this.extractIterations(weightValues);\n const trainable = false;\n this.accumulatedGrads = weightValues.map((v) => ({ originalName: v.name, variable: v.tensor.variable(trainable) }));\n }\n getConfig() {\n return {\n \"learningRate\": this.learningRate,\n \"initialAccumulatorValue\": this.initialAccumulatorValue\n };\n }\n static fromConfig(cls, config) {\n return new cls(config[\"learningRate\"], config[\"initialAccumulatorValue\"]);\n }\n};\nAdagradOptimizer.className = \"Adagrad\";\nregisterClass(AdagradOptimizer);\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/optimizers/adam_optimizer.js\nvar AdamOptimizer = class extends Optimizer {\n constructor(learningRate, beta1, beta2, epsilon3 = null) {\n super();\n this.learningRate = learningRate;\n this.beta1 = beta1;\n this.beta2 = beta2;\n this.epsilon = epsilon3;\n this.accumulatedFirstMoment = [];\n this.accumulatedSecondMoment = [];\n tidy(() => {\n this.accBeta1 = scalar(beta1).variable();\n this.accBeta2 = scalar(beta2).variable();\n });\n if (epsilon3 == null) {\n this.epsilon = ENGINE.backend.epsilon();\n }\n }\n applyGradients(variableGradients) {\n const varNames = Array.isArray(variableGradients) ? variableGradients.map((v) => v.name) : Object.keys(variableGradients);\n tidy(() => {\n const oneMinusAccBeta1 = sub(1, this.accBeta1);\n const oneMinusAccBeta2 = sub(1, this.accBeta2);\n varNames.forEach((name, i2) => {\n const value = ENGINE.registeredVariables[name];\n const trainable = false;\n if (this.accumulatedFirstMoment[i2] == null) {\n this.accumulatedFirstMoment[i2] = {\n originalName: `${name}/m`,\n variable: tidy(() => zerosLike(value).variable(trainable))\n };\n }\n if (this.accumulatedSecondMoment[i2] == null) {\n this.accumulatedSecondMoment[i2] = {\n originalName: `${name}/v`,\n variable: tidy(() => zerosLike(value).variable(trainable))\n };\n }\n const gradient = Array.isArray(variableGradients) ? variableGradients[i2].tensor : variableGradients[name];\n if (gradient == null) {\n return;\n }\n const firstMoment = this.accumulatedFirstMoment[i2].variable;\n const secondMoment = this.accumulatedSecondMoment[i2].variable;\n const newFirstMoment = add2(mul(firstMoment, this.beta1), mul(gradient, 1 - this.beta1));\n const newSecondMoment = add2(mul(secondMoment, this.beta2), mul(square(gradient), 1 - this.beta2));\n const biasCorrectedFirstMoment = div(newFirstMoment, oneMinusAccBeta1);\n const biasCorrectedSecondMoment = div(newSecondMoment, oneMinusAccBeta2);\n firstMoment.assign(newFirstMoment);\n secondMoment.assign(newSecondMoment);\n const newValue = add2(mul(div(biasCorrectedFirstMoment, add2(sqrt(biasCorrectedSecondMoment), this.epsilon)), -this.learningRate), value);\n value.assign(newValue);\n });\n this.accBeta1.assign(mul(this.accBeta1, this.beta1));\n this.accBeta2.assign(mul(this.accBeta2, this.beta2));\n });\n this.incrementIterations();\n }\n dispose() {\n this.accBeta1.dispose();\n this.accBeta2.dispose();\n if (this.accumulatedFirstMoment != null) {\n dispose(this.accumulatedFirstMoment.map((v) => v.variable));\n }\n if (this.accumulatedSecondMoment != null) {\n dispose(this.accumulatedSecondMoment.map((v) => v.variable));\n }\n }\n async getWeights() {\n const variables = [...this.accumulatedFirstMoment, ...this.accumulatedSecondMoment];\n return [await this.saveIterations()].concat(variables.map((v) => ({ name: v.originalName, tensor: v.variable })));\n }\n async setWeights(weightValues) {\n weightValues = await this.extractIterations(weightValues);\n tidy(() => {\n this.accBeta1.assign(pow(this.beta1, this.iterations_ + 1));\n this.accBeta2.assign(pow(this.beta2, this.iterations_ + 1));\n });\n const variableCount = weightValues.length / 2;\n const trainable = false;\n this.accumulatedFirstMoment = weightValues.slice(0, variableCount).map((v) => ({\n originalName: v.name,\n variable: v.tensor.variable(trainable)\n }));\n this.accumulatedSecondMoment = weightValues.slice(variableCount, variableCount * 2).map((v) => ({\n originalName: v.name,\n variable: v.tensor.variable(trainable)\n }));\n }\n getConfig() {\n return {\n \"learningRate\": this.learningRate,\n \"beta1\": this.beta1,\n \"beta2\": this.beta2,\n \"epsilon\": this.epsilon\n };\n }\n static fromConfig(cls, config) {\n return new cls(config[\"learningRate\"], config[\"beta1\"], config[\"beta2\"], config[\"epsilon\"]);\n }\n};\nAdamOptimizer.className = \"Adam\";\nregisterClass(AdamOptimizer);\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/optimizers/adamax_optimizer.js\nvar AdamaxOptimizer = class extends Optimizer {\n constructor(learningRate, beta1, beta2, epsilon3 = null, decay = 0) {\n super();\n this.learningRate = learningRate;\n this.beta1 = beta1;\n this.beta2 = beta2;\n this.epsilon = epsilon3;\n this.decay = decay;\n this.accumulatedFirstMoment = [];\n this.accumulatedWeightedInfNorm = [];\n tidy(() => {\n this.iteration = scalar(0).variable();\n this.accBeta1 = scalar(beta1).variable();\n });\n if (epsilon3 == null) {\n this.epsilon = ENGINE.backend.epsilon();\n }\n }\n applyGradients(variableGradients) {\n const variableNames = Array.isArray(variableGradients) ? variableGradients.map((item) => item.name) : Object.keys(variableGradients);\n tidy(() => {\n const oneMinusAccBeta1 = sub(1, this.accBeta1);\n const lr = div(-this.learningRate, add2(mul(this.iteration, this.decay), 1));\n variableNames.forEach((name, i2) => {\n const value = ENGINE.registeredVariables[name];\n const trainable = false;\n if (this.accumulatedFirstMoment[i2] == null) {\n this.accumulatedFirstMoment[i2] = {\n originalName: `${name}/m`,\n variable: zerosLike(value).variable(trainable)\n };\n }\n if (this.accumulatedWeightedInfNorm[i2] == null) {\n this.accumulatedWeightedInfNorm[i2] = {\n originalName: `${name}/v`,\n variable: zerosLike(value).variable(trainable)\n };\n }\n const gradient = Array.isArray(variableGradients) ? variableGradients[i2].tensor : variableGradients[name];\n if (gradient == null) {\n return;\n }\n const firstMoment = this.accumulatedFirstMoment[i2].variable;\n const weightedInfNorm = this.accumulatedWeightedInfNorm[i2].variable;\n const newFirstMoment = add2(mul(firstMoment, this.beta1), mul(gradient, 1 - this.beta1));\n const ut0 = mul(weightedInfNorm, this.beta2);\n const ut1 = abs(gradient);\n const newWeightedInfNorm = maximum(ut0, ut1);\n firstMoment.assign(newFirstMoment);\n weightedInfNorm.assign(newWeightedInfNorm);\n const newValue = add2(mul(div(lr, oneMinusAccBeta1), div(newFirstMoment, add2(newWeightedInfNorm, this.epsilon))), value);\n value.assign(newValue);\n });\n this.iteration.assign(add2(this.iteration, 1));\n this.accBeta1.assign(mul(this.accBeta1, this.beta1));\n });\n this.incrementIterations();\n }\n dispose() {\n this.accBeta1.dispose();\n this.iteration.dispose();\n if (this.accumulatedFirstMoment != null) {\n dispose(this.accumulatedFirstMoment.map((v) => v.variable));\n }\n if (this.accumulatedWeightedInfNorm != null) {\n dispose(this.accumulatedWeightedInfNorm.map((v) => v.variable));\n }\n }\n async getWeights() {\n throw new Error(\"getWeights() is not implemented for Adamax yet.\");\n }\n async setWeights(weightValues) {\n throw new Error(\"setWeights() is not implemented for Adamax yet.\");\n }\n getConfig() {\n return {\n \"learningRate\": this.learningRate,\n \"beta1\": this.beta1,\n \"beta2\": this.beta2,\n \"epsilon\": this.epsilon,\n \"decay\": this.decay\n };\n }\n static fromConfig(cls, config) {\n return new cls(config[\"learningRate\"], config[\"beta1\"], config[\"beta2\"], config[\"epsilon\"], config[\"decay\"]);\n }\n};\nAdamaxOptimizer.className = \"Adamax\";\nregisterClass(AdamaxOptimizer);\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/optimizers/sgd_optimizer.js\nvar SGDOptimizer = class extends Optimizer {\n constructor(learningRate) {\n super();\n this.learningRate = learningRate;\n this.setLearningRate(learningRate);\n }\n applyGradients(variableGradients) {\n const varNames = Array.isArray(variableGradients) ? variableGradients.map((v) => v.name) : Object.keys(variableGradients);\n varNames.forEach((name, i2) => {\n const gradient = Array.isArray(variableGradients) ? variableGradients[i2].tensor : variableGradients[name];\n if (gradient == null) {\n return;\n }\n const value = ENGINE.registeredVariables[name];\n tidy(() => {\n const newValue = add2(mul(this.c, gradient), value);\n value.assign(newValue);\n });\n });\n this.incrementIterations();\n }\n setLearningRate(learningRate) {\n this.learningRate = learningRate;\n if (this.c != null) {\n this.c.dispose();\n }\n this.c = keep(scalar(-learningRate));\n }\n dispose() {\n this.c.dispose();\n }\n async getWeights() {\n return [await this.saveIterations()];\n }\n async setWeights(weightValues) {\n weightValues = await this.extractIterations(weightValues);\n if (weightValues.length !== 0) {\n throw new Error(\"SGD optimizer does not have settable weights.\");\n }\n }\n getConfig() {\n return { \"learningRate\": this.learningRate };\n }\n static fromConfig(cls, config) {\n return new cls(config[\"learningRate\"]);\n }\n};\nSGDOptimizer.className = \"SGD\";\nregisterClass(SGDOptimizer);\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/optimizers/momentum_optimizer.js\nvar MomentumOptimizer = class extends SGDOptimizer {\n constructor(learningRate, momentum, useNesterov = false) {\n super(learningRate);\n this.learningRate = learningRate;\n this.momentum = momentum;\n this.useNesterov = useNesterov;\n this.accumulations = [];\n this.m = scalar(this.momentum);\n }\n applyGradients(variableGradients) {\n const variableNames = Array.isArray(variableGradients) ? variableGradients.map((item) => item.name) : Object.keys(variableGradients);\n variableNames.forEach((name, i2) => {\n const value = ENGINE.registeredVariables[name];\n if (this.accumulations[i2] == null) {\n const trainable = false;\n this.accumulations[i2] = {\n originalName: `${name}/momentum`,\n variable: tidy(() => zerosLike(value).variable(trainable))\n };\n }\n const accumulation = this.accumulations[i2].variable;\n const gradient = Array.isArray(variableGradients) ? variableGradients[i2].tensor : variableGradients[name];\n if (gradient == null) {\n return;\n }\n tidy(() => {\n let newValue;\n const newAccumulation = add2(mul(this.m, accumulation), gradient);\n if (this.useNesterov) {\n newValue = add2(mul(this.c, add2(gradient, mul(newAccumulation, this.m))), value);\n } else {\n newValue = add2(mul(this.c, newAccumulation), value);\n }\n accumulation.assign(newAccumulation);\n value.assign(newValue);\n });\n });\n this.incrementIterations();\n }\n dispose() {\n this.m.dispose();\n if (this.accumulations != null) {\n dispose(this.accumulations.map((v) => v.variable));\n }\n }\n setMomentum(momentum) {\n this.momentum = momentum;\n }\n async getWeights() {\n return [await this.saveIterations()].concat(this.accumulations.map((v) => ({ name: v.originalName, tensor: v.variable })));\n }\n async setWeights(weightValues) {\n weightValues = await this.extractIterations(weightValues);\n const trainable = false;\n this.accumulations = weightValues.map((v) => ({ originalName: v.name, variable: v.tensor.variable(trainable) }));\n }\n getConfig() {\n return {\n \"learningRate\": this.learningRate,\n \"momentum\": this.momentum,\n \"useNesterov\": this.useNesterov\n };\n }\n static fromConfig(cls, config) {\n return new cls(config[\"learningRate\"], config[\"momentum\"], config[\"useNesterov\"]);\n }\n};\nMomentumOptimizer.className = \"Momentum\";\nregisterClass(MomentumOptimizer);\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/optimizers/rmsprop_optimizer.js\nvar RMSPropOptimizer = class extends Optimizer {\n constructor(learningRate, decay = 0.9, momentum = 0, epsilon3 = null, centered = false) {\n super();\n this.learningRate = learningRate;\n this.decay = decay;\n this.momentum = momentum;\n this.epsilon = epsilon3;\n this.accumulatedMeanSquares = [];\n this.accumulatedMoments = [];\n this.accumulatedMeanGrads = [];\n this.centered = centered;\n if (epsilon3 == null) {\n this.epsilon = ENGINE.backend.epsilon();\n }\n if (learningRate == null) {\n throw new Error(`learningRate for RMSPropOptimizer must be defined.`);\n }\n }\n applyGradients(variableGradients) {\n const variableNames = Array.isArray(variableGradients) ? variableGradients.map((item) => item.name) : Object.keys(variableGradients);\n variableNames.forEach((name, i2) => {\n const value = ENGINE.registeredVariables[name];\n const trainable = false;\n if (this.accumulatedMeanSquares[i2] == null) {\n this.accumulatedMeanSquares[i2] = {\n originalName: `${name}/rms`,\n variable: tidy(() => zerosLike(value).variable(trainable))\n };\n }\n if (this.accumulatedMoments[i2] == null) {\n this.accumulatedMoments[i2] = {\n originalName: `${name}/momentum`,\n variable: tidy(() => zerosLike(value).variable(trainable))\n };\n }\n if (this.accumulatedMeanGrads[i2] == null && this.centered) {\n this.accumulatedMeanGrads[i2] = {\n originalName: `${name}/mg`,\n variable: tidy(() => zerosLike(value).variable(trainable))\n };\n }\n const gradient = Array.isArray(variableGradients) ? variableGradients[i2].tensor : variableGradients[name];\n if (gradient == null) {\n return;\n }\n const accumulatedMeanSquare = this.accumulatedMeanSquares[i2].variable;\n const accumulatedMoments = this.accumulatedMoments[i2].variable;\n tidy(() => {\n const newAccumulatedMeanSquare = add2(mul(accumulatedMeanSquare, this.decay), mul(square(gradient), 1 - this.decay));\n if (this.centered) {\n const accumulatedMeanGrad = this.accumulatedMeanGrads[i2].variable;\n const newAccumulatedMeanGrad = add2(mul(accumulatedMeanGrad, this.decay), mul(gradient, 1 - this.decay));\n const gradContribution = div(mul(gradient, this.learningRate), sqrt(sub(newAccumulatedMeanSquare, add2(square(newAccumulatedMeanGrad), this.epsilon))));\n const newAccumulatedMoments = add2(mul(accumulatedMoments, this.momentum), gradContribution);\n accumulatedMeanSquare.assign(newAccumulatedMeanSquare);\n accumulatedMeanGrad.assign(newAccumulatedMeanGrad);\n accumulatedMoments.assign(newAccumulatedMoments);\n const newValue = sub(value, newAccumulatedMoments);\n value.assign(newValue);\n } else {\n const newAccumulatedMeanSquare2 = add2(mul(accumulatedMeanSquare, this.decay), mul(square(gradient), 1 - this.decay));\n const newAccumulatedMoments = add2(mul(accumulatedMoments, this.momentum), div(mul(gradient, this.learningRate), sqrt(add2(newAccumulatedMeanSquare2, this.epsilon))));\n accumulatedMeanSquare.assign(newAccumulatedMeanSquare2);\n accumulatedMoments.assign(newAccumulatedMoments);\n const newValue = sub(value, newAccumulatedMoments);\n value.assign(newValue);\n }\n });\n });\n this.incrementIterations();\n }\n dispose() {\n if (this.accumulatedMeanSquares != null) {\n dispose(this.accumulatedMeanSquares.map((v) => v.variable));\n }\n if (this.accumulatedMeanGrads != null && this.centered) {\n dispose(this.accumulatedMeanGrads.map((v) => v.variable));\n }\n if (this.accumulatedMoments != null) {\n dispose(this.accumulatedMoments.map((v) => v.variable));\n }\n }\n async getWeights() {\n const variables = [...this.accumulatedMeanSquares, ...this.accumulatedMoments];\n if (this.centered) {\n variables.push(...this.accumulatedMeanGrads);\n }\n return [await this.saveIterations()].concat(variables.map((v) => ({ name: v.originalName, tensor: v.variable })));\n }\n async setWeights(weightValues) {\n weightValues = await this.extractIterations(weightValues);\n const variableCount = this.centered ? weightValues.length / 3 : weightValues.length / 2;\n const trainable = false;\n this.accumulatedMeanSquares = weightValues.slice(0, variableCount).map((v) => ({\n originalName: v.name,\n variable: v.tensor.variable(trainable)\n }));\n this.accumulatedMoments = weightValues.slice(variableCount, variableCount * 2).map((v) => ({\n originalName: v.name,\n variable: v.tensor.variable(trainable)\n }));\n if (this.centered) {\n this.accumulatedMeanGrads = weightValues.slice(variableCount * 2, variableCount * 3).map((v) => ({\n originalName: v.name,\n variable: v.tensor.variable(trainable)\n }));\n }\n }\n getConfig() {\n return {\n \"learningRate\": this.learningRate,\n \"decay\": this.decay,\n \"momentum\": this.momentum,\n \"epsilon\": this.epsilon,\n \"centered\": this.centered\n };\n }\n static fromConfig(cls, config) {\n return new cls(config[\"learningRate\"], config[\"decay\"], config[\"momentum\"], config[\"epsilon\"], config[\"centered\"]);\n }\n};\nRMSPropOptimizer.className = \"RMSProp\";\nregisterClass(RMSPropOptimizer);\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/optimizers/optimizer_constructors.js\nvar OptimizerConstructors = class {\n static sgd(learningRate) {\n return new SGDOptimizer(learningRate);\n }\n static momentum(learningRate, momentum, useNesterov = false) {\n return new MomentumOptimizer(learningRate, momentum, useNesterov);\n }\n static rmsprop(learningRate, decay = 0.9, momentum = 0, epsilon3 = null, centered = false) {\n return new RMSPropOptimizer(learningRate, decay, momentum, epsilon3, centered);\n }\n static adam(learningRate = 1e-3, beta1 = 0.9, beta2 = 0.999, epsilon3 = null) {\n return new AdamOptimizer(learningRate, beta1, beta2, epsilon3);\n }\n static adadelta(learningRate = 1e-3, rho = 0.95, epsilon3 = null) {\n return new AdadeltaOptimizer(learningRate, rho, epsilon3);\n }\n static adamax(learningRate = 2e-3, beta1 = 0.9, beta2 = 0.999, epsilon3 = null, decay = 0) {\n return new AdamaxOptimizer(learningRate, beta1, beta2, epsilon3, decay);\n }\n static adagrad(learningRate, initialAccumulatorValue = 0.1) {\n return new AdagradOptimizer(learningRate, initialAccumulatorValue);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/train.js\nvar train = {\n sgd: OptimizerConstructors.sgd,\n momentum: OptimizerConstructors.momentum,\n adadelta: OptimizerConstructors.adadelta,\n adagrad: OptimizerConstructors.adagrad,\n rmsprop: OptimizerConstructors.rmsprop,\n adamax: OptimizerConstructors.adamax,\n adam: OptimizerConstructors.adam\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/browser_util.js\nvar delayCallback = (() => {\n if (typeof requestAnimationFrame !== \"undefined\") {\n return requestAnimationFrame;\n } else if (typeof setImmediate !== \"undefined\") {\n return setImmediate;\n }\n return (f) => f();\n})();\nfunction nextFrame() {\n return new Promise((resolve) => delayCallback(() => resolve()));\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/backends/backend_util.js\nvar backend_util_exports = {};\n__export(backend_util_exports, {\n ERF_A1: () => ERF_A1,\n ERF_A2: () => ERF_A2,\n ERF_A3: () => ERF_A3,\n ERF_A4: () => ERF_A4,\n ERF_A5: () => ERF_A5,\n ERF_P: () => ERF_P,\n PARALLELIZE_THRESHOLD: () => PARALLELIZE_THRESHOLD,\n RowPartitionType: () => RowPartitionType,\n SELU_SCALE: () => SELU_SCALE,\n SELU_SCALEALPHA: () => SELU_SCALEALPHA,\n applyActivation: () => applyActivation,\n assertAndGetBroadcastShape: () => assertAndGetBroadcastShape,\n assertAxesAreInnerMostDims: () => assertAxesAreInnerMostDims,\n assertParamsConsistent: () => assertParamsConsistent,\n assignToTypedArray: () => assignToTypedArray,\n axesAreInnerMostDims: () => axesAreInnerMostDims,\n calculateShapes: () => calculateShapes,\n checkEinsumDimSizes: () => checkEinsumDimSizes,\n checkPadOnDimRoundingMode: () => checkPadOnDimRoundingMode,\n combineLocations: () => combineLocations,\n combineRaggedTensorToTensorShapes: () => combineRaggedTensorToTensorShapes,\n complexWithEvenIndex: () => complexWithEvenIndex,\n complexWithOddIndex: () => complexWithOddIndex,\n computeConv2DInfo: () => computeConv2DInfo,\n computeConv3DInfo: () => computeConv3DInfo,\n computeDefaultPad: () => computeDefaultPad,\n computeDilation2DInfo: () => computeDilation2DInfo,\n computeOptimalWindowSize: () => computeOptimalWindowSize,\n computeOutAndReduceShapes: () => computeOutAndReduceShapes,\n computeOutShape: () => computeOutShape2,\n computePool2DInfo: () => computePool2DInfo,\n computePool3DInfo: () => computePool3DInfo,\n convertConv2DDataFormat: () => convertConv2DDataFormat,\n decodeEinsumEquation: () => decodeEinsumEquation,\n eitherStridesOrDilationsAreOne: () => eitherStridesOrDilationsAreOne,\n expandShapeToKeepDim: () => expandShapeToKeepDim,\n exponent: () => exponent,\n exponents: () => exponents,\n fromStringArrayToUint8: () => fromStringArrayToUint8,\n fromUint8ToStringArray: () => fromUint8ToStringArray,\n getAxesPermutation: () => getAxesPermutation,\n getBroadcastDims: () => getBroadcastDims,\n getComplexWithIndex: () => getComplexWithIndex,\n getEinsumComputePath: () => getEinsumComputePath,\n getEinsumPermutation: () => getEinsumPermutation,\n getFusedBiasGradient: () => getFusedBiasGradient,\n getFusedDyActivation: () => getFusedDyActivation,\n getImageCenter: () => getImageCenter,\n getInnerMostAxes: () => getInnerMostAxes,\n getPermuted: () => getPermuted,\n getRaggedRank: () => getRaggedRank,\n getReductionAxes: () => getReductionAxes,\n getReshaped: () => getReshaped,\n getReshapedPermuted: () => getReshapedPermuted,\n getRowPartitionTypesHelper: () => getRowPartitionTypesHelper,\n getSliceBeginCoords: () => getSliceBeginCoords,\n getSliceSize: () => getSliceSize,\n getSparseFillEmptyRowsIndicesDenseShapeMismatch: () => getSparseFillEmptyRowsIndicesDenseShapeMismatch,\n getSparseFillEmptyRowsNegativeIndexErrorMessage: () => getSparseFillEmptyRowsNegativeIndexErrorMessage,\n getSparseFillEmptyRowsOutOfRangeIndexErrorMessage: () => getSparseFillEmptyRowsOutOfRangeIndexErrorMessage,\n getSparseReshapeEmptyTensorZeroOutputDimErrorMessage: () => getSparseReshapeEmptyTensorZeroOutputDimErrorMessage,\n getSparseReshapeInputOutputMismatchErrorMessage: () => getSparseReshapeInputOutputMismatchErrorMessage,\n getSparseReshapeInputOutputMultipleErrorMessage: () => getSparseReshapeInputOutputMultipleErrorMessage,\n getSparseReshapeMultipleNegativeOneOutputDimErrorMessage: () => getSparseReshapeMultipleNegativeOneOutputDimErrorMessage,\n getSparseReshapeNegativeOutputDimErrorMessage: () => getSparseReshapeNegativeOutputDimErrorMessage,\n getSparseSegmentReductionIndicesOutOfRangeErrorMessage: () => getSparseSegmentReductionIndicesOutOfRangeErrorMessage,\n getSparseSegmentReductionNegativeSegmentIdsErrorMessage: () => getSparseSegmentReductionNegativeSegmentIdsErrorMessage,\n getSparseSegmentReductionNonIncreasingSegmentIdsErrorMessage: () => getSparseSegmentReductionNonIncreasingSegmentIdsErrorMessage,\n getSparseSegmentReductionSegmentIdOutOfRangeErrorMessage: () => getSparseSegmentReductionSegmentIdOutOfRangeErrorMessage,\n getUndoAxesPermutation: () => getUndoAxesPermutation,\n isIdentityPermutation: () => isIdentityPermutation,\n log: () => log,\n mergeRealAndImagArrays: () => mergeRealAndImagArrays,\n prepareAndValidate: () => prepareAndValidate,\n prepareSplitSize: () => prepareSplitSize,\n segment_util: () => segment_util_exports,\n shouldFuse: () => shouldFuse,\n slice_util: () => slice_util_exports,\n splitRealAndImagArrays: () => splitRealAndImagArrays,\n tupleValuesAreOne: () => tupleValuesAreOne,\n upcastType: () => upcastType,\n validateDefaultValueShape: () => validateDefaultValueShape,\n validateInput: () => validateInput,\n validateUpdateShape: () => validateUpdateShape,\n warn: () => warn\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/concat_util.js\nfunction assertParamsConsistent(shapes, axis) {\n const rank = shapes[0].length;\n shapes.forEach((shape, i2) => {\n assert(shape.length === rank, () => `Error in concat${rank}D: rank of tensors[${i2}] must be the same as the rank of the rest (${rank})`);\n });\n assert(axis >= 0 && axis < rank, () => `Error in concat${rank}D: axis must be between 0 and ${rank - 1}.`);\n const firstShape = shapes[0];\n shapes.forEach((shape, i2) => {\n for (let r2 = 0; r2 < rank; r2++) {\n assert(r2 === axis || shape[r2] === firstShape[r2], () => `Error in concat${rank}D: Shape of tensors[${i2}] (${shape}) does not match the shape of the rest (${firstShape}) along the non-concatenated axis ${i2}.`);\n }\n });\n}\nfunction computeOutShape2(shapes, axis) {\n const outputShape = shapes[0].slice();\n for (let i2 = 1; i2 < shapes.length; i2++) {\n outputShape[axis] += shapes[i2][axis];\n }\n return outputShape;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/ragged_to_dense_util.js\nvar RowPartitionType;\n(function(RowPartitionType3) {\n RowPartitionType3[RowPartitionType3[\"FIRST_DIM_SIZE\"] = 0] = \"FIRST_DIM_SIZE\";\n RowPartitionType3[RowPartitionType3[\"VALUE_ROWIDS\"] = 1] = \"VALUE_ROWIDS\";\n RowPartitionType3[RowPartitionType3[\"ROW_LENGTHS\"] = 2] = \"ROW_LENGTHS\";\n RowPartitionType3[RowPartitionType3[\"ROW_SPLITS\"] = 3] = \"ROW_SPLITS\";\n RowPartitionType3[RowPartitionType3[\"ROW_LIMITS\"] = 4] = \"ROW_LIMITS\";\n RowPartitionType3[RowPartitionType3[\"ROW_STARTS\"] = 5] = \"ROW_STARTS\";\n})(RowPartitionType || (RowPartitionType = {}));\nfunction combineRaggedTensorToTensorShapes(raggedRank, shape, valueShape) {\n let outputShape = new Array();\n if (valueShape == null && shape == null) {\n return outputShape;\n }\n if (shape == null) {\n while (outputShape.length < raggedRank + valueShape.length) {\n outputShape.push(-1);\n }\n } else {\n outputShape = shape.slice();\n }\n if (valueShape == null) {\n return outputShape;\n }\n if (raggedRank + valueShape.length !== outputShape.length) {\n throw new Error(`rt input.shape and shape=${shape} are incompatible: rt input.rank = ${raggedRank + valueShape.length}, but shape.rank = ${outputShape.length}`);\n }\n for (let i2 = 1; i2 < valueShape.length; ++i2) {\n const valueDim = valueShape[i2];\n const outputShapeDimIndex = outputShape[outputShape.length - valueShape.length + i2];\n const outputShapeDim = outputShape[outputShapeDimIndex];\n if (valueDim >= 0) {\n if (outputShapeDim >= 0) {\n if (outputShapeDim !== valueDim) {\n throw new Error(`rt input.shape and shape=${shape} are incompatible: rt input.shape[${i2 + raggedRank}] = ${valueDim} but shape[${i2 + raggedRank}] = ${outputShapeDim}`);\n }\n } else {\n outputShape[outputShapeDimIndex] = valueDim;\n }\n }\n }\n return outputShape;\n}\nfunction getRowPartitionTypesHelper(rowPartitionTypeStrings) {\n const stringToType = {\n \"FIRST_DIM_SIZE\": RowPartitionType.FIRST_DIM_SIZE,\n \"VALUE_ROWIDS\": RowPartitionType.VALUE_ROWIDS,\n \"ROW_LENGTHS\": RowPartitionType.ROW_LENGTHS,\n \"ROW_SPLITS\": RowPartitionType.ROW_SPLITS,\n \"ROW_LIMITS\": RowPartitionType.ROW_LIMITS,\n \"ROW_STARTS\": RowPartitionType.ROW_STARTS\n };\n const result = [];\n for (const typeStr of rowPartitionTypeStrings) {\n if (typeStr in stringToType) {\n result.push(stringToType[typeStr]);\n } else {\n break;\n }\n }\n return result;\n}\nfunction getRaggedRank(rowPartitionTypes) {\n if (rowPartitionTypes.length === 0) {\n return 0;\n }\n if (rowPartitionTypes[0] === RowPartitionType.FIRST_DIM_SIZE) {\n return rowPartitionTypes.length - 1;\n }\n return rowPartitionTypes.length;\n}\nfunction validateDefaultValueShape(defaultValueShape, valueShape) {\n if (defaultValueShape == null || valueShape == null) {\n return;\n }\n const defaultNDims = defaultValueShape.length;\n const valuesNDims = valueShape.length;\n if (defaultNDims >= valuesNDims) {\n throw new Error(`defaultValue.shape=${defaultValueShape} and ragged tensor flatValues.shape=${valueShape}, are incompatible: defaultValue.rank = ${defaultNDims} must be less than ragged tensor input flatValues.rank = ${valuesNDims})`);\n }\n for (let i2 = 0; i2 < Math.min(defaultNDims, valuesNDims - 1); ++i2) {\n const defaultDim = defaultValueShape[i2];\n const valueDim = valueShape[i2 + 1];\n if (defaultDim >= 0 && valueDim >= 0 && defaultDim !== 1 && defaultDim !== valueDim) {\n throw new Error(`defaultValue.shape=${defaultValueShape}, and ragged tensor input flatValues.shape=${valueShape} are incompatible: defaultValue.shape[${i2 - defaultValueShape.length}] = ${defaultDim} but ragged tensor input.flatValues.shape[${i2 - defaultValueShape.length}] = ${valueDim}`);\n }\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/reduce_util.js\nvar PARALLELIZE_THRESHOLD = 30;\nfunction computeOptimalWindowSize(inSize) {\n if (inSize <= PARALLELIZE_THRESHOLD) {\n return inSize;\n }\n return nearestDivisor(inSize, Math.floor(Math.sqrt(inSize)));\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/rotate_util.js\nfunction getImageCenter(center, imageHeight, imageWidth) {\n const centerX = imageWidth * (typeof center === \"number\" ? center : center[0]);\n const centerY = imageHeight * (typeof center === \"number\" ? center : center[1]);\n return [centerX, centerY];\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/array_ops_util.js\nfunction getReshaped(inputShape, blockShape, prod6, batchToSpace = true) {\n let reshaped = [];\n if (batchToSpace) {\n reshaped = reshaped.concat(blockShape.slice(0));\n reshaped.push(inputShape[0] / prod6);\n reshaped = reshaped.concat(inputShape.slice(1));\n } else {\n reshaped = reshaped.concat(inputShape[0]);\n const spatialLength = blockShape.length;\n for (let i2 = 0; i2 < spatialLength; ++i2) {\n reshaped = reshaped.concat([inputShape[i2 + 1] / blockShape[i2], blockShape[i2]]);\n }\n reshaped = reshaped.concat(inputShape.slice(spatialLength + 1));\n }\n return reshaped;\n}\nfunction getPermuted(reshapedRank, blockShapeRank, batchToSpace = true) {\n const permuted = [];\n if (batchToSpace) {\n permuted.push(blockShapeRank);\n for (let i2 = blockShapeRank + 1; i2 < reshapedRank; ++i2) {\n if (i2 <= 2 * blockShapeRank) {\n permuted.push(i2);\n permuted.push(i2 - (blockShapeRank + 1));\n } else {\n permuted.push(i2);\n }\n }\n } else {\n const permutedBeforeBatch = [];\n const permutedAfterBatch = [];\n for (let i2 = 1; i2 < reshapedRank; ++i2) {\n if (i2 >= blockShapeRank * 2 + 1 || i2 % 2 === 1) {\n permutedAfterBatch.push(i2);\n } else {\n permutedBeforeBatch.push(i2);\n }\n }\n permuted.push(...permutedBeforeBatch);\n permuted.push(0);\n permuted.push(...permutedAfterBatch);\n }\n return permuted;\n}\nfunction getReshapedPermuted(inputShape, blockShape, prod6, batchToSpace = true) {\n const reshapedPermuted = [];\n if (batchToSpace) {\n reshapedPermuted.push(inputShape[0] / prod6);\n } else {\n reshapedPermuted.push(inputShape[0] * prod6);\n }\n for (let i2 = 1; i2 < inputShape.length; ++i2) {\n if (i2 <= blockShape.length) {\n if (batchToSpace) {\n reshapedPermuted.push(blockShape[i2 - 1] * inputShape[i2]);\n } else {\n reshapedPermuted.push(inputShape[i2] / blockShape[i2 - 1]);\n }\n } else {\n reshapedPermuted.push(inputShape[i2]);\n }\n }\n return reshapedPermuted;\n}\nfunction getSliceBeginCoords(crops, blockShape) {\n const sliceBeginCoords = [0];\n for (let i2 = 0; i2 < blockShape; ++i2) {\n sliceBeginCoords.push(crops[i2][0]);\n }\n return sliceBeginCoords;\n}\nfunction getSliceSize(uncroppedShape, crops, blockShape) {\n const sliceSize = uncroppedShape.slice(0, 1);\n for (let i2 = 0; i2 < blockShape; ++i2) {\n sliceSize.push(uncroppedShape[i2 + 1] - crops[i2][0] - crops[i2][1]);\n }\n return sliceSize;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/selu_util.js\nvar SELU_SCALEALPHA = 1.7580993408473768;\nvar SELU_SCALE = 1.0507009873554805;\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/erf_util.js\nvar ERF_P = 0.3275911;\nvar ERF_A1 = 0.254829592;\nvar ERF_A2 = -0.284496736;\nvar ERF_A3 = 1.421413741;\nvar ERF_A4 = -1.453152027;\nvar ERF_A5 = 1.061405429;\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/backends/complex_util.js\nfunction mergeRealAndImagArrays(real5, imag5) {\n if (real5.length !== imag5.length) {\n throw new Error(`Cannot merge real and imag arrays of different lengths. real:${real5.length}, imag: ${imag5.length}.`);\n }\n const result = new Float32Array(real5.length * 2);\n for (let i2 = 0; i2 < result.length; i2 += 2) {\n result[i2] = real5[i2 / 2];\n result[i2 + 1] = imag5[i2 / 2];\n }\n return result;\n}\nfunction splitRealAndImagArrays(complex5) {\n const real5 = new Float32Array(complex5.length / 2);\n const imag5 = new Float32Array(complex5.length / 2);\n for (let i2 = 0; i2 < complex5.length; i2 += 2) {\n real5[i2 / 2] = complex5[i2];\n imag5[i2 / 2] = complex5[i2 + 1];\n }\n return { real: real5, imag: imag5 };\n}\nfunction complexWithEvenIndex(complex5) {\n const len = Math.ceil(complex5.length / 4);\n const real5 = new Float32Array(len);\n const imag5 = new Float32Array(len);\n for (let i2 = 0; i2 < complex5.length; i2 += 4) {\n real5[Math.floor(i2 / 4)] = complex5[i2];\n imag5[Math.floor(i2 / 4)] = complex5[i2 + 1];\n }\n return { real: real5, imag: imag5 };\n}\nfunction complexWithOddIndex(complex5) {\n const len = Math.floor(complex5.length / 4);\n const real5 = new Float32Array(len);\n const imag5 = new Float32Array(len);\n for (let i2 = 2; i2 < complex5.length; i2 += 4) {\n real5[Math.floor(i2 / 4)] = complex5[i2];\n imag5[Math.floor(i2 / 4)] = complex5[i2 + 1];\n }\n return { real: real5, imag: imag5 };\n}\nfunction getComplexWithIndex(complex5, index) {\n const real5 = complex5[index * 2];\n const imag5 = complex5[index * 2 + 1];\n return { real: real5, imag: imag5 };\n}\nfunction assignToTypedArray(data, real5, imag5, index) {\n data[index * 2] = real5;\n data[index * 2 + 1] = imag5;\n}\nfunction exponents(n2, inverse) {\n const real5 = new Float32Array(n2 / 2);\n const imag5 = new Float32Array(n2 / 2);\n for (let i2 = 0; i2 < Math.ceil(n2 / 2); i2++) {\n const x = (inverse ? 2 : -2) * Math.PI * (i2 / n2);\n real5[i2] = Math.cos(x);\n imag5[i2] = Math.sin(x);\n }\n return { real: real5, imag: imag5 };\n}\nfunction exponent(k, n2, inverse) {\n const x = (inverse ? 2 : -2) * Math.PI * (k / n2);\n const real5 = Math.cos(x);\n const imag5 = Math.sin(x);\n return { real: real5, imag: imag5 };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/backends/einsum_util.js\nvar ARROW = \"->\";\nvar ARROW_REGEX = /->/g;\nvar COMMA = \",\";\nvar ELLIPSIS = \"...\";\nfunction decodeEinsumEquation(equation, numTensors) {\n equation = equation.replace(/\\s/g, \"\");\n const numArrows = (equation.length - equation.replace(ARROW_REGEX, \"\").length) / ARROW.length;\n if (numArrows < 1) {\n throw new Error(\"Equations without an arrow are not supported.\");\n } else if (numArrows > 1) {\n throw new Error(`Equation must contain exactly one arrow (\"${ARROW}\").`);\n }\n const [inputString, outputString] = equation.split(ARROW);\n assert(inputString.indexOf(ELLIPSIS) === -1, () => `The ellipsis notation (\"${ELLIPSIS}\") is not supported yet.`);\n const inputTerms = inputString.split(COMMA);\n const numInputs = inputTerms.length;\n if (numTensors !== numInputs) {\n throw new Error(`Expected ${numInputs} input tensors, received ${numTensors}`);\n }\n if (numInputs > 2) {\n throw new Error(\"Support for more than 2 input tensors is not implemented yet.\");\n }\n const allDims = [];\n for (let i2 = 0; i2 < outputString.length; ++i2) {\n const dimName = outputString[i2];\n if (!inputTerms.some((inputTerm) => inputTerm.indexOf(dimName) !== -1)) {\n throw new Error(`Output subscripts contain the label ${dimName} not present in the input subscripts.`);\n }\n if (allDims.indexOf(dimName) === -1) {\n allDims.push(dimName);\n }\n }\n for (let i2 = 0; i2 < inputString.length; ++i2) {\n const dimName = inputString[i2];\n if (allDims.indexOf(dimName) === -1 && dimName !== COMMA) {\n allDims.push(dimName);\n }\n }\n const idDims = new Array(inputTerms.length);\n for (let i2 = 0; i2 < numInputs; ++i2) {\n if (new Set(inputTerms[i2].split(\"\")).size !== inputTerms[i2].length) {\n throw new Error(`Found duplicate axes in input component ${inputTerms[i2]}. Support for duplicate axes in input is not implemented yet.`);\n }\n idDims[i2] = [];\n for (let j = 0; j < inputTerms[i2].length; ++j) {\n idDims[i2].push(allDims.indexOf(inputTerms[i2][j]));\n }\n }\n const numDims = allDims.length;\n const numOutDims = outputString.length;\n const summedDims = [];\n for (let i2 = numOutDims; i2 < numDims; ++i2) {\n summedDims.push(i2);\n }\n return { allDims, summedDims, idDims };\n}\nfunction getEinsumPermutation(nDims, idDims) {\n let permutationIndices = new Array(nDims);\n permutationIndices.fill(-1);\n for (let i2 = 0; i2 < idDims.length; ++i2) {\n permutationIndices[idDims[i2]] = i2;\n }\n const expandDims7 = [];\n for (let i2 = 0; i2 < nDims; ++i2) {\n if (permutationIndices[i2] === -1) {\n expandDims7.push(i2);\n }\n }\n permutationIndices = permutationIndices.filter((d) => d !== -1);\n return { permutationIndices, expandDims: expandDims7 };\n}\nfunction checkEinsumDimSizes(nDims, idDims, tensors) {\n const dimSizes = new Array(nDims);\n for (let i2 = 0; i2 < tensors.length; ++i2) {\n const shape = tensors[i2].shape;\n for (let j = 0; j < idDims[i2].length; ++j) {\n if (dimSizes[idDims[i2][j]] === void 0) {\n dimSizes[idDims[i2][j]] = shape[j];\n } else {\n assert(dimSizes[idDims[i2][j]] === shape[j], () => `Expected dimension ${dimSizes[idDims[i2][j]]} at axis ${j} of input shaped ${JSON.stringify(shape)}, but got dimension ${shape[j]}`);\n }\n }\n }\n}\nfunction getEinsumComputePath(summedDims, idDims) {\n const path = summedDims;\n const steps = [];\n let nSteps = 0;\n if (summedDims.length === 0) {\n path.push(-1);\n }\n nSteps = summedDims.length + 1;\n for (let i2 = 0; i2 < nSteps; ++i2) {\n steps.push([]);\n }\n const computedTermIndices = [];\n for (let i2 = 0; i2 < path.length; ++i2) {\n const summedDim = path[i2];\n const termIndices = findTermsWithDim(idDims, summedDim);\n for (const termIndex of termIndices) {\n if (computedTermIndices.indexOf(termIndex) === -1) {\n steps[i2].push(termIndex);\n computedTermIndices.push(termIndex);\n }\n }\n }\n return { path, steps };\n}\nfunction isIdentityPermutation(perm) {\n return perm.every((dim, index) => dim === index);\n}\nfunction findTermsWithDim(idDims, dim) {\n const termIndices = [];\n for (let i2 = 0; i2 < idDims.length; ++i2) {\n if (idDims[i2].length === 0 || idDims[i2].indexOf(dim) !== -1 || dim === -1) {\n termIndices.push(i2);\n }\n }\n return termIndices;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/split_util.js\nfunction prepareSplitSize(x, numOrSizeSplits, axis = 0) {\n let splitSizes = [];\n if (typeof numOrSizeSplits === \"number\") {\n assert(x.shape[axis] % numOrSizeSplits === 0, () => \"Number of splits must evenly divide the axis.\");\n splitSizes = new Array(numOrSizeSplits).fill(x.shape[axis] / numOrSizeSplits);\n } else {\n const numOfNegs = numOrSizeSplits.reduce((count2, value) => {\n if (value === -1) {\n count2 += 1;\n }\n return count2;\n }, 0);\n assert(numOfNegs <= 1, () => \"There should be only one negative value in split array.\");\n const negIndex = numOrSizeSplits.indexOf(-1);\n if (negIndex !== -1) {\n const total = numOrSizeSplits.reduce((a, b) => b > 0 ? a + b : a);\n numOrSizeSplits[negIndex] = x.shape[axis] - total;\n }\n assert(x.shape[axis] === numOrSizeSplits.reduce((a, b) => a + b), () => \"The sum of sizes must match the size of the axis dimension.\");\n splitSizes = numOrSizeSplits;\n }\n return splitSizes;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/sparse/sparse_fill_empty_rows_util.js\nfunction getSparseFillEmptyRowsIndicesDenseShapeMismatch(indicesLength) {\n return `Received SparseTensor with denseShape[0] = 0 but\n indices.shape[0] = ${indicesLength}`;\n}\nfunction getSparseFillEmptyRowsNegativeIndexErrorMessage(index, value) {\n return `indices(${index}, 0) is invalid: ${value} < 0`;\n}\nfunction getSparseFillEmptyRowsOutOfRangeIndexErrorMessage(index, value, limit) {\n return `indices(${index}, 0) is invalid: ${value} >= ${limit}`;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/sparse/sparse_reshape_util.js\nfunction getSparseReshapeMultipleNegativeOneOutputDimErrorMessage(dim1, dim2) {\n return `only one output dimension may be -1, not both ${dim1} and ${dim2}`;\n}\nfunction getSparseReshapeNegativeOutputDimErrorMessage(dim, value) {\n return `size ${dim} must be non-negative, not ${value}`;\n}\nfunction getSparseReshapeEmptyTensorZeroOutputDimErrorMessage() {\n return \"reshape cannot infer the missing input size for an empty tensor unless all specified input sizes are non-zero\";\n}\nfunction getSparseReshapeInputOutputMultipleErrorMessage(inputShape, outputShape) {\n const inputSize = sizeFromShape(inputShape);\n const outputSize = sizeFromShape(outputShape);\n return `Input to reshape is a SparseTensor with ${inputSize}\n dense values, but the requested shape requires a multiple of ${outputSize}. inputShape=${inputShape} outputShape= ${outputShape}`;\n}\nfunction getSparseReshapeInputOutputMismatchErrorMessage(inputShape, outputShape) {\n const inputSize = sizeFromShape(inputShape);\n const outputSize = sizeFromShape(outputShape);\n return `Input to reshape is a tensor with ${inputSize} dense values, but the requested shape has ${outputSize}. inputShape=${inputShape} outputShape=${outputShape}`;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/sparse/sparse_segment_reduction_util.js\nfunction getSparseSegmentReductionNegativeSegmentIdsErrorMessage() {\n return `segment ids must be >= 0`;\n}\nfunction getSparseSegmentReductionNonIncreasingSegmentIdsErrorMessage() {\n return `segment ids are not increasing`;\n}\nfunction getSparseSegmentReductionSegmentIdOutOfRangeErrorMessage(segmentId, outputRows) {\n return `Segment id ${segmentId} out of range [0, ${outputRows}), possibly because segmentIds input is not sorted.`;\n}\nfunction getSparseSegmentReductionIndicesOutOfRangeErrorMessage(index, indexValue, inputRows) {\n return `Bad: indices[${index}] == ${indexValue} out of range [0, ${inputRows})`;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/segment_util.js\nvar segment_util_exports = {};\n__export(segment_util_exports, {\n collectGatherOpShapeInfo: () => collectGatherOpShapeInfo,\n computeOutShape: () => computeOutShape3,\n segOpComputeOptimalWindowSize: () => segOpComputeOptimalWindowSize\n});\nfunction segOpComputeOptimalWindowSize(inSize, numSegments) {\n let done = false;\n let res;\n if (inSize <= PARALLELIZE_THRESHOLD) {\n res = inSize;\n done = true;\n } else {\n res = nearestDivisor(inSize, Math.floor(Math.sqrt(inSize)));\n }\n while (!done) {\n if (res > numSegments || res === inSize) {\n done = true;\n } else {\n res = nearestDivisor(inSize, res + 1);\n }\n }\n return res;\n}\nfunction computeOutShape3(aShape, axis, numSegments) {\n const outShape = [];\n const rank = aShape.length;\n for (let dim = 0; dim < rank; dim++) {\n if (dim !== axis) {\n outShape.push(aShape[dim]);\n } else {\n outShape.push(numSegments);\n }\n }\n return outShape;\n}\nfunction collectGatherOpShapeInfo(x, indices, axis, batchDims) {\n const indicesRank = indices.shape.length;\n const xRank = x.shape.length;\n if (batchDims !== 0) {\n if (batchDims < -indicesRank || batchDims > indicesRank) {\n throw new Error(`Expect batchDims in the range of [-${indicesRank}, ${indicesRank}], but got ${batchDims}`);\n }\n }\n if (batchDims < 0) {\n batchDims += indicesRank;\n }\n if (batchDims > xRank) {\n throw new Error(`batchDims (${batchDims}) must be less than rank(x) (\n ${xRank}).`);\n }\n if (axis < batchDims) {\n throw new Error(`batchDims (${batchDims}) must be less than or equal to axis (${axis}).`);\n }\n for (let i2 = 0; i2 < batchDims; ++i2) {\n if (x.shape[i2] !== indices.shape[i2]) {\n throw new Error(`x.shape[${i2}]: ${x.shape[i2]} should be equal to indices.shape[${i2}]: ${indices.shape[i2]}.`);\n }\n }\n const dimSize = x.shape[axis];\n const outputShape = [];\n let batchSize = 1;\n let outerSize = 1;\n let sliceSize = 1;\n for (let i2 = 0; i2 < batchDims; ++i2) {\n outputShape.push(x.shape[i2]);\n batchSize *= x.shape[i2];\n }\n for (let i2 = batchDims; i2 < axis; i2++) {\n outputShape.push(x.shape[i2]);\n outerSize *= x.shape[i2];\n }\n for (let i2 = batchDims; i2 < indicesRank; i2++) {\n outputShape.push(indices.shape[i2]);\n }\n for (let i2 = axis + 1; i2 < xRank; i2++) {\n outputShape.push(x.shape[i2]);\n sliceSize *= x.shape[i2];\n }\n return { batchSize, sliceSize, outerSize, dimSize, outputShape };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/backends/backend_util.js\nfunction fromUint8ToStringArray(vals) {\n try {\n return vals.map((val) => decodeString(val));\n } catch (err) {\n throw new Error(`Failed to decode encoded string bytes into utf-8, error: ${err}`);\n }\n}\nfunction fromStringArrayToUint8(strings) {\n return strings.map((s2) => encodeString(s2));\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/backends/kernel_impls.js\nvar kernel_impls_exports = {};\n__export(kernel_impls_exports, {\n nonMaxSuppressionV3Impl: () => nonMaxSuppressionV3Impl,\n nonMaxSuppressionV4Impl: () => nonMaxSuppressionV4Impl,\n nonMaxSuppressionV5Impl: () => nonMaxSuppressionV5Impl,\n whereImpl: () => whereImpl\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Abs_grad.js\nvar absGradConfig = {\n kernelName: Abs,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return { x: () => mul(dy, step(cast(x, \"float32\"), -1)) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Acos_grad.js\nvar acosGradConfig = {\n kernelName: Acos,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return {\n x: () => {\n const a = square(cast(x, \"float32\"));\n const b = sqrt(sub(scalar(1), a));\n return neg(div(dy, b));\n }\n };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Acosh_grad.js\nvar acoshGradConfig = {\n kernelName: Acosh,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return {\n x: () => {\n const a = sqrt(sub(square(cast(x, \"float32\")), 1));\n return div(dy, a);\n }\n };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Add_grad.js\nvar addGradConfig = {\n kernelName: Add,\n inputsToSave: [\"a\", \"b\"],\n gradFunc: (dy, saved) => {\n const [a, b] = saved;\n const outShape = assertAndGetBroadcastShape(a.shape, b.shape);\n const derA = () => {\n let res = dy;\n const reduceAxes = getReductionAxes(a.shape, outShape);\n if (reduceAxes.length > 0) {\n res = sum2(res, reduceAxes);\n }\n return reshape(res, a.shape);\n };\n const derB = () => {\n let res = dy;\n const reduceAxes = getReductionAxes(b.shape, outShape);\n if (reduceAxes.length > 0) {\n res = sum2(res, reduceAxes);\n }\n return reshape(res, b.shape);\n };\n return { a: derA, b: derB };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/AddN_grad.js\nvar addNGradConfig = {\n kernelName: AddN,\n saveAllInputs: true,\n gradFunc: (dy, saved) => {\n const ders = {};\n saved.forEach((_, i2) => {\n ders[i2] = () => dy.clone();\n });\n return ders;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/ArgMax_grad.js\nvar argMaxGradConfig = {\n kernelName: ArgMax,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return { x: () => zerosLike(x) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/ArgMin_grad.js\nvar argMinGradConfig = {\n kernelName: ArgMin,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return { x: () => zerosLike(x) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Asin_grad.js\nvar asinGradConfig = {\n kernelName: Asin,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return { x: () => div(dy, sqrt(sub(scalar(1), square(cast(x, \"float32\"))))) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Asinh_grad.js\nvar asinhGradConfig = {\n kernelName: Asinh,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return {\n x: () => {\n const a = sqrt(add2(scalar(1), square(cast(x, \"float32\"))));\n return div(dy, a);\n }\n };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Atan2_grad.js\nvar atan2GradConfig = {\n kernelName: Atan2,\n inputsToSave: [\"a\", \"b\"],\n gradFunc: (dy, saved) => {\n const [a, b] = saved;\n const outShape = assertAndGetBroadcastShape(a.shape, b.shape);\n const derA = () => {\n const d = add2(square(a), square(b));\n let res = mul(dy, div(b, d));\n const reduceAxes = getReductionAxes(a.shape, outShape);\n if (reduceAxes.length > 0) {\n res = sum2(res, reduceAxes);\n }\n return reshape(res, a.shape);\n };\n const derB = () => {\n const d = add2(square(a), square(b));\n let res = neg(mul(dy, div(a, d)));\n const reduceAxes = getReductionAxes(b.shape, outShape);\n if (reduceAxes.length > 0) {\n res = sum2(res, reduceAxes);\n }\n return reshape(res, b.shape);\n };\n return { a: derA, b: derB };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Atan_grad.js\nvar atanGradConfig = {\n kernelName: Atan,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return { x: () => div(dy, add2(square(cast(x, \"float32\")), 1)) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Atanh_grad.js\nvar atanhGradConfig = {\n kernelName: Atanh,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return { x: () => div(dy, sub(scalar(1), square(cast(x, \"float32\")))) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/avg_pool_3d_grad.js\nfunction avgPool3dGrad_(dy, input2, filterSize, strides, pad3, dimRoundingMode) {\n const $dy = convertToTensor(dy, \"dy\", \"avgPool3dGrad\");\n const $input = convertToTensor(input2, \"input\", \"avgPool3dGrad\");\n let dy5D = $dy;\n let input5D = $input;\n let reshapedTo5D = false;\n if ($input.rank === 4) {\n reshapedTo5D = true;\n dy5D = reshape($dy, [1, $dy.shape[0], $dy.shape[1], $dy.shape[2], $dy.shape[3]]);\n input5D = reshape($input, [\n 1,\n $input.shape[0],\n $input.shape[1],\n $input.shape[2],\n $input.shape[3]\n ]);\n }\n assert(dy5D.rank === 5, () => `Error in avgPool3dGrad: dy must be rank 5 but got rank ${dy5D.rank}.`);\n assert(input5D.rank === 5, () => `Error in avgPool3dGrad: input must be rank 5 but got rank ${input5D.rank}.`);\n checkPadOnDimRoundingMode(\"avgPool3dGrad\", pad3, dimRoundingMode);\n const inputs = { dy: dy5D, input: input5D };\n const attrs = { filterSize, strides, pad: pad3, dimRoundingMode };\n const res = ENGINE.runKernel(AvgPool3DGrad, inputs, attrs);\n if (reshapedTo5D) {\n return reshape(res, [res.shape[1], res.shape[2], res.shape[3], res.shape[4]]);\n }\n return res;\n}\nvar avgPool3dGrad = op({ avgPool3dGrad_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/AvgPool3D_grad.js\nvar avgPool3DGradConfig = {\n kernelName: AvgPool3D,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved, attrs) => {\n const [x] = saved;\n const { filterSize, strides, pad: pad3, dimRoundingMode } = attrs;\n return {\n x: () => avgPool3dGrad(dy, x, filterSize, strides, pad3, dimRoundingMode)\n };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/avg_pool_grad.js\nfunction avgPoolGrad_(dy, input2, filterSize, strides, pad3) {\n const $dy = convertToTensor(dy, \"dy\", \"avgPoolGrad\");\n const $input = convertToTensor(input2, \"input\", \"avgPoolGrad\");\n assert($input.rank === $dy.rank, () => `Rank of input (${$input.rank}) does not match rank of dy (${$dy.rank})`);\n let input4D = $input;\n let dy4D = $dy;\n let reshapedTo4D = false;\n if ($input.rank === 3) {\n reshapedTo4D = true;\n input4D = reshape($input, [1, $input.shape[0], $input.shape[1], $input.shape[2]]);\n dy4D = reshape($dy, [1, $dy.shape[0], $dy.shape[1], $dy.shape[2]]);\n }\n assert(dy4D.rank === 4, () => `Error in avgPoolGrad: dy must be rank 4 but got rank ${dy4D.rank}.`);\n assert(input4D.rank === 4, () => `Error in avgPoolGrad: input must be rank 4 but got rank ${input4D.rank}.`);\n const inputs = { dy: dy4D, input: input4D };\n const attrs = { filterSize, strides, pad: pad3 };\n const res = ENGINE.runKernel(AvgPoolGrad, inputs, attrs);\n if (reshapedTo4D) {\n return reshape(res, [res.shape[1], res.shape[2], res.shape[3]]);\n }\n return res;\n}\nvar avgPoolGrad = op({ avgPoolGrad_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/AvgPool_grad.js\nvar avgPoolGradConfig = {\n kernelName: AvgPool,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved, attrs) => {\n const [x] = saved;\n const { filterSize, strides, pad: pad3 } = attrs;\n return { x: () => avgPoolGrad(dy, x, filterSize, strides, pad3) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/BatchMatMul_grad.js\nvar batchMatMulGradConfig = {\n kernelName: BatchMatMul,\n inputsToSave: [\"a\", \"b\"],\n gradFunc: (dy, saved, attrs) => {\n const [a, b] = saved;\n const { transposeA, transposeB } = attrs;\n if (!transposeA && !transposeB) {\n return {\n a: () => matMul(dy, b, false, true),\n b: () => matMul(a, dy, true, false)\n };\n } else if (!transposeA && transposeB) {\n return {\n a: () => matMul(dy, b, false, false),\n b: () => matMul(dy, a, true, false)\n };\n } else if (transposeA && !transposeB) {\n return {\n a: () => matMul(b, dy, false, true),\n b: () => matMul(a, dy, false, false)\n };\n } else {\n return {\n a: () => matMul(b, dy, true, true),\n b: () => matMul(dy, a, true, true)\n };\n }\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/BatchToSpaceND_grad.js\nvar batchToSpaceNDGradConfig = {\n kernelName: BatchToSpaceND,\n gradFunc: (dy, saved, attrs) => {\n const { blockShape, crops } = attrs;\n return { x: () => spaceToBatchND(dy, blockShape, crops) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/BroadcastTo_grad.js\nvar broadcastToGradConfig = {\n kernelName: BroadcastTo,\n gradFunc: (dy, saved, attrs) => {\n const broadCastToAttrs = attrs;\n const inputShape = broadCastToAttrs.inputShape;\n const outputShape = broadCastToAttrs.shape;\n const reps = Array.from(outputShape);\n for (let i2 = inputShape.length - 1; i2 >= 0; i2--) {\n if (inputShape[i2] === outputShape[i2]) {\n reps[i2] = 1;\n } else if (inputShape[i2] !== 1) {\n throw new Error(`broadcastTo(): [${inputShape}] cannot be broadcast to [${outputShape}].`);\n }\n }\n const axes = [];\n for (let i2 = 0; i2 < reps.length; i2++) {\n if (reps[i2] > 1) {\n axes.push(i2);\n }\n }\n return { x: () => sum2(dy, axes, true) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Cast_grad.js\nvar castGradConfig = {\n kernelName: Cast,\n gradFunc: (dy) => {\n return { x: () => dy.clone() };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Ceil_grad.js\nvar ceilGradConfig = {\n kernelName: Ceil,\n gradFunc: (dy) => {\n return { x: () => zerosLike(dy) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/ClipByValue_grad.js\nvar clipByValueGradConfig = {\n kernelName: ClipByValue,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved, attrs) => {\n const [x] = saved;\n const { clipValueMin, clipValueMax } = attrs;\n return {\n x: () => where(logicalAnd(greaterEqual(x, clipValueMin), lessEqual(x, clipValueMax)), dy, zerosLike(dy))\n };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/ComplexAbs_grad.js\nvar complexAbsGradConfig = {\n kernelName: ComplexAbs,\n inputsToSave: [\"x\"],\n gradFunc: absGradConfig.gradFunc\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Concat_grad.js\nvar concatGradConfig = {\n kernelName: Concat,\n saveAllInputs: true,\n gradFunc: (dy, saved, attrs) => {\n const shapes = saved.map((t2) => t2.shape);\n const { axis } = attrs;\n const $axis = parseAxisParam(axis, saved[0].shape)[0];\n const sizeSplits = shapes.map((s2) => s2[$axis]);\n const derTensors = split(dy, sizeSplits, $axis);\n return derTensors.map((t2) => () => t2);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Conv2D_grad.js\nvar conv2DGradConfig = {\n kernelName: Conv2D,\n inputsToSave: [\"x\", \"filter\"],\n gradFunc: (dy, saved, attrs) => {\n const [x4D, $filter] = saved;\n const { dilations, strides, pad: pad3, dataFormat } = attrs;\n assert(tupleValuesAreOne(dilations), () => `Error in gradient of conv2D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '${dilations}'`);\n return {\n x: () => conv2DBackpropInput(x4D.shape, dy, $filter, strides, pad3, dataFormat),\n filter: () => conv2DBackpropFilter(x4D, dy, $filter.shape, strides, pad3, dataFormat)\n };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Conv2DBackpropInput_grad.js\nvar conv2DBackpropInputGradConfig = {\n kernelName: Conv2DBackpropInput,\n inputsToSave: [\"dy\", \"filter\"],\n gradFunc: (ddx, saved, attrs) => {\n const [dy, filter] = saved;\n const { strides, pad: pad3, dataFormat, dimRoundingMode } = attrs;\n return {\n dy: () => conv2d(ddx, filter, strides, pad3, dataFormat, 1, dimRoundingMode),\n filter: () => conv2DBackpropFilter(ddx, dy, filter.shape, strides, pad3, dataFormat, dimRoundingMode)\n };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/conv3d_backprop_filter.js\nfunction conv3DBackpropFilter_(x, dy, filterShape, strides, pad3) {\n let x5D = x;\n if (x.rank === 4) {\n x5D = reshape(x, [1, x.shape[0], x.shape[1], x.shape[2], x.shape[3]]);\n }\n let dy5D = dy;\n if (dy5D.rank === 4) {\n dy5D = reshape(dy, [1, dy.shape[0], dy.shape[1], dy.shape[2], dy.shape[3]]);\n }\n assert(x5D.rank === 5, () => `Error in conv3dDerFilter: input must be rank 5, but got shape ${x5D.shape}.`);\n assert(dy5D.rank === 5, () => `Error in conv3dDerFilter: dy must be rank 5, but got shape ${dy5D.shape}.`);\n assert(filterShape.length === 5, () => `Error in conv3dDerFilter: filterShape must be length 5, but got ${filterShape}.`);\n assert(x5D.shape[4] === filterShape[3], () => `Error in conv3dDerFilter: depth of input ${x5D.shape[4]}) must match input depth in filter (${filterShape[3]}.`);\n assert(dy5D.shape[4] === filterShape[4], () => `Error in conv3dDerFilter: depth of dy (${dy5D.shape[4]}) must match output depth for filter (${filterShape[4]}).`);\n const inputs = { x: x5D, dy: dy5D };\n const attrs = { strides, pad: pad3, filterShape };\n return ENGINE.runKernel(Conv3DBackpropFilterV2, inputs, attrs);\n}\nvar conv3DBackpropFilter = op({ conv3DBackpropFilter_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Conv3D_grad.js\nvar conv3DGradConfig = {\n kernelName: Conv3D,\n inputsToSave: [\"x\", \"filter\"],\n gradFunc: (dy, saved, attrs) => {\n const { dilations, strides, pad: pad3 } = attrs;\n assert(tupleValuesAreOne(dilations), () => `Error in gradient of conv3D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '${dilations}'`);\n const [x5D, $filter] = saved;\n return {\n x: () => conv3DBackpropInput(x5D.shape, dy, $filter, strides, pad3),\n filter: () => conv3DBackpropFilter(x5D, dy, $filter.shape, strides, pad3)\n };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Cos_grad.js\nvar cosGradConfig = {\n kernelName: Cos,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return { x: () => mul(neg(sin(cast(x, \"float32\"))), dy) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Cosh_grad.js\nvar coshGradConfig = {\n kernelName: Cosh,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return { x: () => mul(sinh(cast(x, \"float32\")), dy) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Cumsum_grad.js\nvar cumsumGradConfig = {\n kernelName: Cumsum,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved, attrs) => {\n const [x] = saved;\n const { axis, exclusive, reverse: reverse5 } = attrs;\n return {\n x: () => {\n const permutation = getAxesPermutation([axis], x.rank);\n let out = cumsum(dy, axis, exclusive, !reverse5);\n if (permutation != null) {\n out = transpose(out, permutation);\n }\n return out;\n }\n };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/DepthwiseConv2dNative_grad.js\nvar depthwiseConv2dNativeGradConfig = {\n kernelName: DepthwiseConv2dNative,\n inputsToSave: [\"x\", \"filter\"],\n gradFunc: (dy, saved, attrs) => {\n const { dilations, strides, pad: pad3, dimRoundingMode } = attrs;\n const $dilations = dilations == null ? [1, 1] : dilations;\n assert(tupleValuesAreOne($dilations), () => `Error in gradient of depthwiseConv2dNative: dilation rates greater than 1 are not yet supported. Got dilations '${$dilations}'`);\n const [x, filter] = saved;\n assert(x.rank === 4, () => `Error in gradient of depthwiseConv2dNative: input must be rank 4, but got rank ${x.rank}.`);\n assert(filter.rank === 4, () => `Error in gradient of depthwiseConv2dNative: filter must be rank 4, but got rank ${filter.rank}.`);\n assert(x.shape[3] === filter.shape[2], () => `Error in gradient of depthwiseConv2d: number of input channels (${x.shape[3]}) must match the inChannels dimension in filter ${filter.shape[2]}.`);\n assert(eitherStridesOrDilationsAreOne(strides, $dilations), () => `Error in gradient of depthwiseConv2d: Either strides or dilations must be 1. Got strides ${strides} and dilations '${$dilations}'.`);\n checkPadOnDimRoundingMode(\"depthwiseConv2d\", pad3, dimRoundingMode);\n return {\n x: () => depthwiseConv2dNativeBackpropInput(x.shape, dy, filter, strides, pad3, $dilations, dimRoundingMode),\n filter: () => depthwiseConv2dNativeBackpropFilter(x, dy, filter.shape, strides, pad3, $dilations, dimRoundingMode)\n };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Dilation2D_grad.js\nvar dilation2dGradConfig = {\n kernelName: Dilation2D,\n inputsToSave: [\"x\", \"filter\"],\n gradFunc: (dy, saved, attrs) => {\n const [x, filter] = saved;\n const inputInputs = { x, filter, dy };\n const filterInputs = { x, filter, dy };\n return {\n x: () => ENGINE.runKernel(Dilation2DBackpropInput, inputInputs, attrs),\n filter: () => ENGINE.runKernel(Dilation2DBackpropFilter, filterInputs, attrs)\n };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Elu_grad.js\nvar eluGradConfig = {\n kernelName: Elu,\n outputsToSave: [true],\n gradFunc: (dy, saved) => {\n const [y] = saved;\n const inputs = { dy, y };\n return { x: () => ENGINE.runKernel(EluGrad, inputs) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Erf_grad.js\nvar erfGradConfig = {\n kernelName: Erf,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n const a = mul(exp(neg(square(x))), 2 / Math.sqrt(Math.PI));\n return { x: () => mul(dy, a) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Exp_grad.js\nvar expGradConfig = {\n kernelName: Exp,\n outputsToSave: [true],\n gradFunc: (dy, saved) => {\n const [y] = saved;\n return { x: () => mul(dy, y) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/ExpandDims_grad.js\nvar expandDimsGradConfig = {\n kernelName: ExpandDims,\n inputsToSave: [\"input\"],\n gradFunc: (dy, saved) => {\n const [input2] = saved;\n return { input: () => reshape(dy, input2.shape) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Expm1_grad.js\nvar expm1GradConfig = {\n kernelName: Expm1,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return { x: () => mul(dy, exp(x)) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Floor_grad.js\nvar floorGradConfig = {\n kernelName: Floor,\n gradFunc: (dy) => {\n return { x: () => zerosLike(dy) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/FloorDiv_grad.js\nvar floorDivGradConfig = {\n kernelName: FloorDiv,\n inputsToSave: [\"a\", \"b\"],\n gradFunc: (dy, saved) => {\n const [a, b] = saved;\n const outShape = assertAndGetBroadcastShape(a.shape, b.shape);\n const derA = () => {\n const res = div(dy, cast(b, \"float32\"));\n const reduceAxes = getReductionAxes(a.shape, outShape);\n if (reduceAxes.length > 0) {\n return reshape(sum2(res, reduceAxes), a.shape);\n }\n return res;\n };\n const derB = () => {\n let res = mul(dy, cast(a, \"float32\"));\n const reduceAxes = getReductionAxes(b.shape, outShape);\n if (reduceAxes.length > 0) {\n res = reshape(sum2(res, reduceAxes), b.shape);\n }\n const tmp = square(b);\n return neg(div(res, cast(tmp, \"float32\")));\n };\n return { a: derA, b: derB };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/FusedBatchNorm_grad.js\nvar fusedBatchNormGradConfig = {\n kernelName: FusedBatchNorm,\n inputsToSave: [\"x\", \"mean\", \"variance\", \"scale\"],\n gradFunc: (dy, saved, attrs) => {\n const { varianceEpsilon } = attrs;\n const [x, mean5, variance, scale2] = saved;\n const scaleValue = scale2 == null ? scalar(1) : scale2;\n const reductionAxes = getReductionAxes(mean5.shape, x.shape);\n const tileShape = [];\n if (mean5.rank === 1) {\n for (let i2 = 0; i2 < x.shape.length - 1; ++i2) {\n tileShape.push(x.shape[i2]);\n }\n tileShape.push(1);\n }\n const xMinusMean = sub(x, mean5);\n const dyTimesScaleValue = mul(dy, scaleValue);\n const oneOverSqrtVariance = rsqrt(add2(variance, scalar(varianceEpsilon)));\n const minusHalfRCube = mul(mul(mul(oneOverSqrtVariance, oneOverSqrtVariance), oneOverSqrtVariance), scalar(-0.5));\n const derX = () => {\n if (mean5.rank === 1) {\n return reshape(mul(mul(dy, tile(reshape(oneOverSqrtVariance, [1, 1, 1, mean5.shape[0]]), tileShape)), scaleValue), x.shape);\n } else {\n return reshape(mul(mul(dy, oneOverSqrtVariance), scaleValue), x.shape);\n }\n };\n const derMean = () => {\n let meanDer = mul(mul(oneOverSqrtVariance, scalar(-1)), dyTimesScaleValue);\n if (mean5.rank === 1) {\n meanDer = sum2(meanDer, reductionAxes);\n }\n return reshape(meanDer, mean5.shape);\n };\n const derVariance = () => {\n let varianceDer = mul(mul(minusHalfRCube, xMinusMean), dyTimesScaleValue);\n if (mean5.rank === 1) {\n varianceDer = sum2(varianceDer, reductionAxes);\n }\n return reshape(varianceDer, mean5.shape);\n };\n const derScale = () => {\n const xMinusMean2TimesRsqrt = mul(xMinusMean, oneOverSqrtVariance);\n let scaleDer = mul(dy, xMinusMean2TimesRsqrt);\n if (mean5.rank === 1) {\n scaleDer = sum2(scaleDer, reductionAxes);\n }\n return reshape(scaleDer, mean5.shape);\n };\n const derOffset = () => {\n let offsetDer = dy;\n if (mean5.rank === 1) {\n offsetDer = sum2(offsetDer, reductionAxes);\n }\n return reshape(offsetDer, mean5.shape);\n };\n return {\n x: derX,\n mean: derMean,\n variance: derVariance,\n scale: derScale,\n offset: derOffset\n };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/GatherV2_grad.js\nvar gatherGradConfig = {\n kernelName: GatherV2,\n inputsToSave: [\"x\", \"indices\"],\n gradFunc: (dy, saved, attrs) => {\n const [x, indices] = saved;\n const { axis } = attrs;\n const parsedAxis = parseAxisParam(axis, x.shape)[0];\n const derX = () => {\n const paramsShape = x.shape;\n const indicesSize = indices.size;\n const outerShape = paramsShape.slice(0, parsedAxis);\n const outerDims = outerShape.length;\n const innerShape = paramsShape.slice(axis, paramsShape.length).slice(1);\n const innerDims = innerShape.length;\n const outerAxesIndices = arrayRange(0, outerDims);\n const innerAxesIndices = arrayRange(outerDims + 1, outerDims + 1 + innerDims);\n const valuesShape = arrayConcat([outerShape, [indicesSize], innerShape]);\n const values = reshape(dy, valuesShape);\n const reshapedIndices = reshape(indices, [indicesSize]);\n const transposeDims = arrayConcat([[outerDims], outerAxesIndices, innerAxesIndices]);\n const valuesTranspose = transpose(values, transposeDims);\n let paramsGrad = unsortedSegmentSum(valuesTranspose, reshapedIndices, x.shape[parsedAxis]);\n const invertTransposeDims = getUndoAxesPermutation(transposeDims);\n paramsGrad = transpose(paramsGrad, invertTransposeDims);\n return paramsGrad;\n };\n return { x: derX, indices: () => indices };\n }\n};\nfunction arrayRange(start, stop) {\n const result = [];\n for (let i2 = start; i2 < stop; ++i2) {\n result.push(i2);\n }\n return result;\n}\nfunction arrayConcat(arrays) {\n const result = [];\n for (let i2 = 0; i2 < arrays.length; ++i2) {\n for (let j = 0; j < arrays[i2].length; ++j) {\n result.push(arrays[i2][j]);\n }\n }\n return result;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/GreaterEqual_grad.js\nvar greaterEqualGradConfig = {\n kernelName: GreaterEqual,\n inputsToSave: [\"a\", \"b\"],\n gradFunc: (dy, saved) => {\n const [a, b] = saved;\n return { a: () => zerosLike(a), b: () => zerosLike(b) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Identity_grad.js\nvar identityGradConfig = {\n kernelName: Identity,\n gradFunc: (dy) => {\n return { x: () => cast(dy, \"float32\") };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/IsFinite_grad.js\nvar isFiniteGradConfig = {\n kernelName: IsFinite,\n gradFunc: (dy) => {\n return { x: () => zerosLike(dy) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/IsInf_grad.js\nvar isInfGradConfig = {\n kernelName: IsInf,\n gradFunc: (dy) => {\n return { x: () => zerosLike(dy) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/IsNan_grad.js\nvar isNanGradConfig = {\n kernelName: IsNan,\n gradFunc: (dy) => {\n return { x: () => zerosLike(dy) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/LeakyRelu_grad.js\nvar leakyReluGradConfig = {\n kernelName: LeakyRelu,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved, attrs) => {\n const [x] = saved;\n const { alpha } = attrs;\n const mask = greater(x, 0);\n return { x: () => where(mask, dy, mul(dy, alpha)) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Log1p_grad.js\nvar log1pGradConfig = {\n kernelName: Log1p,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return { x: () => div(dy, add2(x, 1)) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Log_grad.js\nvar logGradConfig = {\n kernelName: Log,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return { x: () => div(dy, cast(x, \"float32\")) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/LogSoftmax_grad.js\nvar logSoftmaxGradConfig = {\n kernelName: LogSoftmax,\n inputsToSave: [],\n outputsToSave: [true],\n gradFunc: (dy, saved, attrs) => {\n const [value] = saved;\n const { axis } = attrs;\n return {\n logits: () => {\n const keepDims = true;\n const softmax7 = exp(value);\n return sub(dy, mul(sum2(dy, axis, keepDims), softmax7));\n }\n };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/local_response_normalization_backprop.js\nfunction localResponseNormalizationBackprop_(x, y, dy, depthRadius = 5, bias = 1, alpha = 1, beta = 0.5) {\n const inputs = { x, y, dy };\n const attrs = { depthRadius, bias, alpha, beta };\n return ENGINE.runKernel(LRNGrad, inputs, attrs);\n}\nvar localResponseNormalizationBackprop = op({ localResponseNormalizationBackprop_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/LRN_grad.js\nvar lrnGradConfig = {\n kernelName: LRN,\n inputsToSave: [\"x\"],\n outputsToSave: [true],\n gradFunc: (dy, saved, attrs) => {\n const [x, y] = saved;\n const { depthRadius, bias, alpha, beta } = attrs;\n return {\n x: () => localResponseNormalizationBackprop(x, y, dy, depthRadius, bias, alpha, beta)\n };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/min_max_grad_util.js\nfunction gradForMinAndMax(dy, y, xOrig, origAxes) {\n if (y.rank < xOrig.rank) {\n y = reshape(y, expandShapeToKeepDim(y.shape, origAxes));\n }\n if (dy.rank < xOrig.rank) {\n dy = reshape(dy, expandShapeToKeepDim(dy.shape, origAxes));\n }\n return {\n x: () => {\n const dx = mul(dy, cast(equal(xOrig, y), dy.dtype));\n return dx;\n }\n };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Max_grad.js\nvar maxGradConfig = {\n kernelName: Max,\n inputsToSave: [\"x\"],\n outputsToSave: [true],\n gradFunc: (dy, saved, attrs) => {\n const maxAttrs = attrs;\n const { reductionIndices } = maxAttrs;\n const x = saved[0];\n const y = saved[1];\n const origAxes = parseAxisParam(reductionIndices, x.shape);\n const maxGrad = gradForMinAndMax(dy, y, x, origAxes);\n return {\n x: () => {\n return maxGrad[\"x\"]();\n }\n };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Maximum_grad.js\nvar maximumGradConfig = {\n kernelName: Maximum,\n inputsToSave: [\"a\", \"b\"],\n gradFunc: (dy, saved) => {\n const [a, b] = saved;\n const derA = () => mul(dy, cast(greaterEqual(a, b), \"float32\"));\n const derB = () => mul(dy, cast(less(a, b), \"float32\"));\n return { a: derA, b: derB };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/max_pool_3d_grad.js\nfunction maxPool3dGrad_(dy, input2, output, filterSize, strides, pad3, dimRoundingMode) {\n const $dy = convertToTensor(dy, \"dy\", \"maxPool3dGrad\");\n const $input = convertToTensor(input2, \"input\", \"maxPool3dGrad\");\n const $output = convertToTensor(output, \"output\", \"maxPool3dGrad\");\n let dy5D = $dy;\n let input5D = $input;\n let output5D = $output;\n let reshapedTo5D = false;\n if ($input.rank === 4) {\n reshapedTo5D = true;\n dy5D = reshape($dy, [1, $dy.shape[0], $dy.shape[1], $dy.shape[2], $dy.shape[3]]);\n input5D = reshape($input, [\n 1,\n $input.shape[0],\n $input.shape[1],\n $input.shape[2],\n $input.shape[3]\n ]);\n output5D = reshape($output, [\n 1,\n $output.shape[0],\n $output.shape[1],\n $output.shape[2],\n $output.shape[3]\n ]);\n }\n assert(dy5D.rank === 5, () => `Error in maxPool3dGrad: dy must be rank 5 but got rank ${dy5D.rank}.`);\n assert(input5D.rank === 5, () => `Error in maxPool3dGrad: input must be rank 5 but got rank ${input5D.rank}.`);\n assert(output5D.rank === 5, () => `Error in maxPool3dGrad: output must be rank 5 but got rank ${output5D.rank}.`);\n checkPadOnDimRoundingMode(\"maxPool3dGrad\", pad3, dimRoundingMode);\n const inputs = { dy: dy5D, input: input5D, output: output5D };\n const attrs = { filterSize, strides, pad: pad3, dimRoundingMode };\n const res = ENGINE.runKernel(MaxPool3DGrad, inputs, attrs);\n if (reshapedTo5D) {\n return reshape(res, [res.shape[1], res.shape[2], res.shape[3], res.shape[4]]);\n }\n return res;\n}\nvar maxPool3dGrad = op({ maxPool3dGrad_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/MaxPool3D_grad.js\nvar maxPool3DGradConfig = {\n kernelName: MaxPool3D,\n inputsToSave: [\"x\"],\n outputsToSave: [true],\n gradFunc: (dy, saved, attrs) => {\n const [x, y] = saved;\n const { filterSize, strides, pad: pad3, dimRoundingMode } = attrs;\n return {\n x: () => maxPool3dGrad(dy, x, y, filterSize, strides, pad3, dimRoundingMode)\n };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/max_pool_grad.js\nfunction maxPoolGrad_(dy, input2, output, filterSize, strides, pad3, dimRoundingMode) {\n const $dy = convertToTensor(dy, \"dy\", \"maxPoolGrad\");\n const $input = convertToTensor(input2, \"input\", \"maxPoolGrad\");\n const $output = convertToTensor(output, \"output\", \"maxPoolGrad\");\n assert($input.rank === $dy.rank, () => `Rank of input (${$input.rank}) does not match rank of dy (${$dy.rank})`);\n assert($dy.rank === 4, () => `Error in maxPoolGrad: dy must be rank 4 but got rank ${$dy.rank}.`);\n assert($input.rank === 4, () => `Error in maxPoolGrad: input must be rank 4 but got rank ${$input.rank}.`);\n checkPadOnDimRoundingMode(\"maxPoolGrad\", pad3, dimRoundingMode);\n const inputs = { dy: $dy, input: $input, output: $output };\n const attrs = { filterSize, strides, pad: pad3, dimRoundingMode };\n return ENGINE.runKernel(MaxPoolGrad, inputs, attrs);\n}\nvar maxPoolGrad = op({ maxPoolGrad_ });\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/MaxPool_grad.js\nvar maxPoolGradConfig = {\n kernelName: MaxPool,\n inputsToSave: [\"x\"],\n outputsToSave: [true],\n gradFunc: (dy, saved, attrs) => {\n const [x, y] = saved;\n const { filterSize, strides, pad: pad3 } = attrs;\n return {\n x: () => maxPoolGrad(dy, x, y, filterSize, strides, pad3)\n };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Mean_grad.js\nvar meanGradConfig = {\n kernelName: Mean,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved, attrs) => {\n const [x] = saved;\n const { axis } = attrs;\n const axes = parseAxisParam(axis, x.shape);\n const shapes = computeOutAndReduceShapes(x.shape, axes);\n const reduceShape = shapes[1];\n const reduceSize = sizeFromShape(reduceShape);\n const derX = () => {\n const expandedDyShape = x.shape.slice();\n axes.forEach((axis2) => {\n expandedDyShape[axis2] = 1;\n });\n const expandedDy = reshape(dy, expandedDyShape);\n const res = div(mul(expandedDy, ones2(x.shape, \"float32\")), reduceSize);\n return res;\n };\n return { x: derX };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Min_grad.js\nvar minGradConfig = {\n kernelName: Min,\n inputsToSave: [\"x\"],\n outputsToSave: [true],\n gradFunc: (dy, saved, attrs) => {\n const minAttrs = attrs;\n const { axis } = minAttrs;\n const [x, y] = saved;\n const origAxes = parseAxisParam(axis, x.shape);\n const minGrad = gradForMinAndMax(dy, y, x, origAxes);\n return {\n x: () => {\n return minGrad[\"x\"]();\n }\n };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Minimum_grad.js\nvar minimumGradConfig = {\n kernelName: Minimum,\n inputsToSave: [\"a\", \"b\"],\n gradFunc: (dy, saved) => {\n const [a, b] = saved;\n const derA = () => mul(dy, cast(lessEqual(a, b), \"float32\"));\n const derB = () => mul(dy, cast(greater(a, b), \"float32\"));\n return { a: derA, b: derB };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/MirrorPad_grad.js\nvar mirrorPadGradConfig = {\n kernelName: MirrorPad,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved, attrs) => {\n const x = saved[0];\n const { paddings } = attrs;\n const begin = paddings.map((p2) => p2[0]);\n return { x: () => slice(dy, begin, x.shape) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Mod_grad.js\nvar modGradConfig = {\n kernelName: Mod,\n inputsToSave: [\"a\", \"b\"],\n gradFunc: (dy, saved) => {\n const [a, b] = saved;\n const outShape = assertAndGetBroadcastShape(a.shape, b.shape);\n const derA = () => {\n const reduceAxes = getReductionAxes(a.shape, outShape);\n if (reduceAxes.length > 0) {\n return reshape(sum2(dy, reduceAxes), a.shape);\n }\n return dy;\n };\n const derB = () => {\n const res = mul(dy, neg(floor(div(a, b))));\n const reduceAxes = getReductionAxes(b.shape, outShape);\n if (reduceAxes.length > 0) {\n return reshape(sum2(res, reduceAxes), b.shape);\n }\n return res;\n };\n return { a: derA, b: derB };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Multiply_grad.js\nvar multiplyGradConfig = {\n kernelName: Multiply,\n inputsToSave: [\"a\", \"b\"],\n gradFunc: (dy, saved) => {\n const [a, b] = saved;\n const outShape = assertAndGetBroadcastShape(a.shape, b.shape);\n const derA = () => {\n const res = mul(dy, cast(b, \"float32\"));\n const reduceAxes = getReductionAxes(a.shape, outShape);\n if (reduceAxes.length > 0) {\n return reshape(sum2(res, reduceAxes), a.shape);\n }\n return res;\n };\n const derB = () => {\n const res = mul(dy, cast(a, \"float32\"));\n const reduceAxes = getReductionAxes(b.shape, outShape);\n if (reduceAxes.length > 0) {\n return reshape(sum2(res, reduceAxes), b.shape);\n }\n return res;\n };\n return { a: derA, b: derB };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Neg_grad.js\nvar negGradConfig = {\n kernelName: Neg,\n gradFunc: (dy) => {\n return { x: () => neg(dy) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/OneHot_grad.js\nvar oneHotGradConfig = {\n kernelName: OneHot,\n inputsToSave: [\"indices\"],\n gradFunc: (dy, saved) => {\n const indices = saved[0];\n return { indices: () => zeros(indices.shape, \"float32\") };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/OnesLike_grad.js\nvar onesLikeGradConfig = {\n kernelName: OnesLike,\n gradFunc: (dy) => {\n return { x: () => zerosLike(dy) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Pack_grad.js\nvar packGradConfig = {\n kernelName: Pack,\n saveAllInputs: true,\n gradFunc: (dy, saved, attrs) => {\n const { axis } = attrs;\n const derTensors = unstack(dy, axis);\n return derTensors.map((t2) => () => t2);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/PadV2_grad.js\nvar padV2GradConfig = {\n kernelName: PadV2,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved, attrs) => {\n const x = saved[0];\n const { paddings } = attrs;\n const begin = paddings.map((p2) => p2[0]);\n return { x: () => slice(dy, begin, x.shape) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Pow_grad.js\nvar powGradConfig = {\n kernelName: Pow,\n inputsToSave: [\"a\", \"b\"],\n outputsToSave: [true],\n gradFunc: (dy, saved) => {\n const [a, b, y] = saved;\n const base = a;\n const exp5 = b;\n const outShape = assertAndGetBroadcastShape(base.shape, exp5.shape);\n const derBase = () => {\n const expFloat = cast(exp5, \"float32\");\n let res = mul(dy, mul(expFloat, pow(base, sub(expFloat, scalar(1)))));\n const reduceAxes = getReductionAxes(base.shape, outShape);\n if (reduceAxes.length > 0) {\n res = sum2(res, reduceAxes);\n }\n return reshape(res, base.shape);\n };\n const derExp = () => {\n const condition = greater(base, 0);\n const logBase = where(condition, log2(base), zerosLike(base));\n let res = mul(dy, mul(y, logBase));\n const reduceAxes = getReductionAxes(exp5.shape, outShape);\n if (reduceAxes.length > 0) {\n res = sum2(res, reduceAxes);\n }\n return reshape(res, exp5.shape);\n };\n return { a: derBase, b: derExp };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Prelu_grad.js\nvar preluGradConfig = {\n kernelName: Prelu,\n inputsToSave: [\"x\", \"alpha\"],\n gradFunc: (dy, saved) => {\n const [x, alpha] = saved;\n const mask = greater(x, 0);\n return {\n x: () => where(mask, dy, mul(dy, alpha)),\n alpha: () => {\n let res = where(mask, zerosLike(dy), mul(dy, x));\n const reduceAxes = getReductionAxes(alpha.shape, dy.shape);\n if (reduceAxes.length > 0) {\n res = sum2(res, reduceAxes);\n }\n return reshape(res, alpha.shape);\n }\n };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Prod_grad.js\nfunction prodGradFn_(x, dy, axis) {\n const expandedYShape = x.shape.slice();\n expandedYShape[axis] = 1;\n const expandedDy = reshape(dy, expandedYShape);\n const xCumProd = cumprod(x, axis, true, false);\n const xCumRevProd = cumprod(x, axis, true, true);\n const dx = mul(xCumProd, xCumRevProd);\n return mul(expandedDy, dx);\n}\nfunction prodsGradFn_(x, dy, axis) {\n const xRank = x.shape.length;\n const finalProdAxis = xRank - axis.length;\n const xPermutation = backend_util_exports.getAxesPermutation(axis, xRank);\n let permutedX = x;\n if (xPermutation != null) {\n permutedX = transpose(x, xPermutation);\n }\n const newShape = permutedX.shape.slice();\n const removedShape = newShape.splice(xRank - axis.length, axis.length);\n const endPartShape = removedShape.reduce((p2, c) => p2 * c, 1);\n newShape.push(endPartShape);\n const reshapedPermutedX = permutedX.reshape(newShape);\n let prodGrad = prodGradFn_(reshapedPermutedX, dy, finalProdAxis);\n prodGrad = prodGrad.reshape(permutedX.shape);\n if (xPermutation != null) {\n const undoPermutation = backend_util_exports.getUndoAxesPermutation(xPermutation);\n prodGrad = transpose(prodGrad, undoPermutation);\n }\n return prodGrad;\n}\nvar prodGradConfig = {\n kernelName: Prod,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved, attrs) => {\n const [x] = saved;\n const { axis } = attrs;\n let axisArr = [];\n if (axis === void 0 || axis === null) {\n axisArr = x.shape.map((_, i2) => i2);\n } else if (typeof axis === \"number\") {\n axisArr = [axis];\n } else {\n axisArr = axis;\n }\n return { x: () => prodsGradFn_(x, dy, axisArr) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/RealDiv_grad.js\nvar divGradConfig = {\n kernelName: RealDiv,\n inputsToSave: [\"a\", \"b\"],\n gradFunc: (dy, saved) => {\n const [a, b] = saved;\n const outShape = assertAndGetBroadcastShape(a.shape, b.shape);\n const derA = () => {\n const res = div(dy, cast(b, \"float32\"));\n const reduceAxes = getReductionAxes(a.shape, outShape);\n if (reduceAxes.length > 0) {\n return reshape(sum2(res, reduceAxes), a.shape);\n }\n return res;\n };\n const derB = () => {\n let res = mul(dy, cast(a, \"float32\"));\n const reduceAxes = getReductionAxes(b.shape, outShape);\n if (reduceAxes.length > 0) {\n res = reshape(sum2(res, reduceAxes), b.shape);\n }\n const tmp = square(b);\n return neg(div(res, cast(tmp, \"float32\")));\n };\n return { a: derA, b: derB };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Reciprocal_grad.js\nvar reciprocalGradConfig = {\n kernelName: Reciprocal,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return { x: () => div(dy, neg(square(x))) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Relu6_grad.js\nvar relu6GradConfig = {\n kernelName: Relu6,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n const mask = mul(lessEqual(x, 6), step(x));\n return { x: () => mul(dy, cast(mask, \"float32\")) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Relu_grad.js\nvar reluGradConfig = {\n kernelName: Relu,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return { x: () => mul(dy, cast(step(x), \"float32\")) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Reshape_grad.js\nvar reshapeGradConfig = {\n kernelName: Reshape,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return { x: () => reshape(dy, x.shape) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/ResizeBilinear_grad.js\nvar resizeBilinearGradConfig = {\n kernelName: ResizeBilinear,\n inputsToSave: [\"images\"],\n gradFunc: (dy, saved, attrs) => {\n const [images] = saved;\n const inputs = { dy, images };\n const imagesDer = () => ENGINE.runKernel(ResizeBilinearGrad, inputs, attrs);\n return { images: imagesDer };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/ResizeNearestNeighbor_grad.js\nvar resizeNearestNeighborGradConfig = {\n kernelName: ResizeNearestNeighbor,\n inputsToSave: [\"images\"],\n gradFunc: (dy, saved, attrs) => {\n const [images] = saved;\n const inputs = { dy, images };\n const imagesDer = () => ENGINE.runKernel(ResizeNearestNeighborGrad, inputs, attrs);\n return { images: imagesDer };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Reverse_grad.js\nvar reverseGradConfig = {\n kernelName: Reverse,\n gradFunc: (dy, saved, attrs) => {\n const { dims } = attrs;\n const axes = parseAxisParam(dims, dy.shape);\n return { x: () => reverse(dy, axes) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Round_grad.js\nvar roundGradConfig = {\n kernelName: Round,\n gradFunc: (dy) => {\n return { x: () => zerosLike(dy) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Rsqrt_grad.js\nvar rsqrtGradConfig = {\n kernelName: Rsqrt,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return { x: () => neg(div(dy, mul(pow(x, 1.5), 2))) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Select_grad.js\nvar selectGradConfig = {\n kernelName: Select,\n inputsToSave: [\"condition\"],\n gradFunc: (dy, saved) => {\n const [condition] = saved;\n return {\n condition: () => cast(zerosLike(condition), \"float32\"),\n t: () => mul(dy, cast(condition, dy.dtype)),\n e: () => mul(dy, cast(logicalNot(condition), dy.dtype))\n };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Selu_grad.js\nvar seluGradConfig = {\n kernelName: Selu,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return {\n x: () => {\n const mask = greater(x, scalar(0));\n const scaleAlpha2 = scalar(SELU_SCALEALPHA);\n const scale2 = scalar(SELU_SCALE);\n const greaterThanZeroDer = mul(dy, scale2);\n const lessEqualZeroDer = mul(mul(dy, scaleAlpha2), exp(cast(x, \"float32\")));\n return where(mask, greaterThanZeroDer, lessEqualZeroDer);\n }\n };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Sigmoid_grad.js\nvar sigmoidGradConfig = {\n kernelName: Sigmoid,\n outputsToSave: [true],\n gradFunc: (dy, saved) => {\n const [y] = saved;\n return { x: () => mul(dy, mul(y, sub(scalar(1), y))) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Sign_grad.js\nvar signGradConfig = {\n kernelName: Sign,\n gradFunc: (dy) => {\n return { x: () => zerosLike(dy) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Sin_grad.js\nvar sinGradConfig = {\n kernelName: Sin,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return { x: () => mul(cos(cast(x, \"float32\")), dy) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Sinh_grad.js\nvar sinhGradConfig = {\n kernelName: Sinh,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return { x: () => mul(cosh(cast(x, \"float32\")), dy) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Slice_grad.js\nvar sliceGradConfig = {\n kernelName: Slice,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved, attrs) => {\n const [x] = saved;\n const { begin, size } = attrs;\n const inputShape = x.shape;\n const [begin_, size_] = parseSliceParams(x, begin, size);\n const paddings = [];\n for (let i2 = 0; i2 < dy.rank; i2++) {\n paddings.push([begin_[i2], inputShape[i2] - begin_[i2] - size_[i2]]);\n }\n return { x: () => pad(dy, paddings) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Softmax_grad.js\nvar softmaxGradConfig = {\n kernelName: Softmax,\n outputsToSave: [true],\n gradFunc: (dy, saved, attrs) => {\n const [y] = saved;\n const { dim } = attrs;\n const keepDims = true;\n const dyTimesY = mul(dy, y);\n return {\n logits: () => sub(dyTimesY, mul(sum2(dyTimesY, [dim], keepDims), y))\n };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Softplus_grad.js\nvar softplusGradConfig = {\n kernelName: Softplus,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return { x: () => mul(dy, sigmoid(x)) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/SpaceToBatchND_grad.js\nvar spaceToBatchNDGradConfig = {\n kernelName: SpaceToBatchND,\n gradFunc: (dy, saved, attrs) => {\n const { blockShape, paddings } = attrs;\n return { x: () => batchToSpaceND(dy, blockShape, paddings) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/SplitV_grad.js\nvar splitVGradConfig = {\n kernelName: SplitV,\n gradFunc: (dy, saved, attrs) => {\n const { axis } = attrs;\n return { x: () => concat(dy, axis) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Sqrt_grad.js\nvar sqrtGradConfig = {\n kernelName: Sqrt,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return { x: () => div(dy, mul(sqrt(cast(x, \"float32\")), 2)) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Square_grad.js\nvar squareGradConfig = {\n kernelName: Square,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return { x: () => mul(dy, mul(cast(x, \"float32\"), 2)) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/SquaredDifference_grad.js\nvar squaredDifferenceGradConfig = {\n kernelName: SquaredDifference,\n inputsToSave: [\"a\", \"b\"],\n gradFunc: (dy, saved) => {\n const [a, b] = saved;\n const two = scalar(2);\n const derA = () => mul(dy, mul(two, sub(a, b)));\n const derB = () => mul(dy, mul(two, sub(b, a)));\n return { a: derA, b: derB };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Step_grad.js\nvar stepGradConfig = {\n kernelName: Step,\n gradFunc: (dy) => {\n return { x: () => zerosLike(dy) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Sub_grad.js\nvar subGradConfig = {\n kernelName: Sub,\n inputsToSave: [\"a\", \"b\"],\n gradFunc: (dy, saved) => {\n const [a, b] = saved;\n const outShape = assertAndGetBroadcastShape(a.shape, b.shape);\n const derA = () => {\n let res = dy;\n const reduceAxes = getReductionAxes(a.shape, outShape);\n if (reduceAxes.length > 0) {\n res = sum2(res, reduceAxes);\n }\n return reshape(res, a.shape);\n };\n const derB = () => {\n let res = dy;\n const reduceAxes = getReductionAxes(b.shape, outShape);\n if (reduceAxes.length > 0) {\n res = sum2(res, reduceAxes);\n }\n return reshape(neg(res), b.shape);\n };\n return { a: derA, b: derB };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Sum_grad.js\nvar sumGradConfig = {\n kernelName: Sum,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved, attrs) => {\n const [x] = saved;\n const expandedDyShape = x.shape.slice();\n const { axis } = attrs;\n const axes = parseAxisParam(axis, x.shape);\n axes.forEach((axis2) => {\n expandedDyShape[axis2] = 1;\n });\n const expandedDy = reshape(dy, expandedDyShape);\n const derX = mul(expandedDy, ones2(x.shape, \"float32\"));\n return { x: () => derX };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Tan_grad.js\nvar tanGradConfig = {\n kernelName: Tan,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved) => {\n const [x] = saved;\n return { x: () => div(dy, square(cos(x))) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Tanh_grad.js\nvar tanhGradConfig = {\n kernelName: Tanh,\n outputsToSave: [true],\n gradFunc: (dy, saved) => {\n const [y] = saved;\n return { x: () => mul(sub(scalar(1), square(y)), dy) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Tile_grad.js\nvar tileGradConfig = {\n kernelName: Tile,\n inputsToSave: [\"x\"],\n gradFunc: (dy, saved, attrs) => {\n const [x] = saved;\n const { reps } = attrs;\n const derX = () => {\n let xGrad = zerosLike(x);\n if (x.rank === 1) {\n for (let i2 = 0; i2 < reps[0]; ++i2) {\n xGrad = add2(xGrad, slice(dy, [i2 * x.shape[0]], [x.shape[0]]));\n }\n } else if (x.rank === 2) {\n for (let i2 = 0; i2 < reps[0]; ++i2) {\n for (let j = 0; j < reps[1]; ++j) {\n xGrad = add2(xGrad, slice(dy, [i2 * x.shape[0], j * x.shape[1]], [\n x.shape[0],\n x.shape[1]\n ]));\n }\n }\n } else if (x.rank === 3) {\n for (let i2 = 0; i2 < reps[0]; ++i2) {\n for (let j = 0; j < reps[1]; ++j) {\n for (let k = 0; k < reps[2]; ++k) {\n xGrad = add2(xGrad, slice(dy, [i2 * x.shape[0], j * x.shape[1], k * x.shape[2]], [x.shape[0], x.shape[1], x.shape[2]]));\n }\n }\n }\n } else if (x.rank === 4) {\n for (let i2 = 0; i2 < reps[0]; ++i2) {\n for (let j = 0; j < reps[1]; ++j) {\n for (let k = 0; k < reps[2]; ++k) {\n for (let l3 = 0; l3 < reps[3]; ++l3) {\n xGrad = add2(xGrad, slice(dy, [\n i2 * x.shape[0],\n j * x.shape[1],\n k * x.shape[2],\n l3 * x.shape[3]\n ], [x.shape[0], x.shape[1], x.shape[2], x.shape[3]]));\n }\n }\n }\n }\n } else {\n throw new Error(`Gradient for tile operation is not implemented for rank-${x.rank} tensors yet.`);\n }\n return xGrad;\n };\n return { x: derX };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Transpose_grad.js\nvar transposeGradConfig = {\n kernelName: Transpose,\n gradFunc: (dy, saved, attrs) => {\n const transposeAttrs = attrs;\n const { perm } = transposeAttrs;\n const undoPerm = getUndoAxesPermutation(perm);\n return { x: () => transpose(dy, undoPerm) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Unpack_grad.js\nvar unpackGradConfig = {\n kernelName: Unpack,\n gradFunc: (dy, saved, attrs) => {\n const unpackAttrs = attrs;\n const { axis } = unpackAttrs;\n return { value: () => stack(dy, axis) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/UnsortedSegmentSum_grad.js\nvar unsortedSegmentSumGradConfig = {\n kernelName: UnsortedSegmentSum,\n inputsToSave: [\"segmentIds\"],\n gradFunc: (dy, saved) => {\n const [segmentIds] = saved;\n const derX = () => {\n return gatherDropNegatives(dy, segmentIds);\n };\n return { x: derX };\n }\n};\nfunction gatherDropNegatives(x, indices) {\n const zeroClippedIndices = maximum(indices, zerosLike(indices));\n const gathered = gather(x, zeroClippedIndices);\n let isPositive = greaterEqual(indices, scalar(0, \"int32\"));\n const numIters = gathered.rank - isPositive.rank;\n for (let i2 = 0; i2 < numIters; ++i2) {\n isPositive = expandDims(isPositive, i2 + 1);\n }\n isPositive = logicalAnd(isPositive, ones2(gathered.shape, \"bool\"));\n const zeroSlice = zerosLike(gathered);\n return where(isPositive, gathered, zeroSlice);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/ZerosLike_grad.js\nvar zerosLikeGradConfig = {\n kernelName: ZerosLike,\n gradFunc: (dy) => {\n return { x: () => zerosLike(dy) };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/register_all_gradients.js\nvar gradConfigs = [\n absGradConfig,\n acosGradConfig,\n acoshGradConfig,\n addGradConfig,\n addNGradConfig,\n argMaxGradConfig,\n argMinGradConfig,\n asinGradConfig,\n asinhGradConfig,\n atan2GradConfig,\n atanGradConfig,\n atanhGradConfig,\n avgPool3DGradConfig,\n avgPoolGradConfig,\n batchMatMulGradConfig,\n batchToSpaceNDGradConfig,\n broadcastToGradConfig,\n castGradConfig,\n ceilGradConfig,\n clipByValueGradConfig,\n complexAbsGradConfig,\n concatGradConfig,\n conv2DBackpropInputGradConfig,\n conv2DGradConfig,\n conv3DGradConfig,\n cosGradConfig,\n coshGradConfig,\n cumsumGradConfig,\n depthwiseConv2dNativeGradConfig,\n dilation2dGradConfig,\n divGradConfig,\n eluGradConfig,\n erfGradConfig,\n expGradConfig,\n expandDimsGradConfig,\n expm1GradConfig,\n floorDivGradConfig,\n floorGradConfig,\n fusedBatchNormGradConfig,\n gatherGradConfig,\n greaterEqualGradConfig,\n identityGradConfig,\n isFiniteGradConfig,\n isInfGradConfig,\n isNanGradConfig,\n leakyReluGradConfig,\n log1pGradConfig,\n logGradConfig,\n logSoftmaxGradConfig,\n lrnGradConfig,\n maxGradConfig,\n maxGradConfig,\n maximumGradConfig,\n maxPool3DGradConfig,\n maxPoolGradConfig,\n meanGradConfig,\n minGradConfig,\n minimumGradConfig,\n mirrorPadGradConfig,\n modGradConfig,\n multiplyGradConfig,\n negGradConfig,\n oneHotGradConfig,\n onesLikeGradConfig,\n packGradConfig,\n padV2GradConfig,\n padV2GradConfig,\n powGradConfig,\n preluGradConfig,\n prodGradConfig,\n reciprocalGradConfig,\n relu6GradConfig,\n reluGradConfig,\n reshapeGradConfig,\n resizeBilinearGradConfig,\n resizeNearestNeighborGradConfig,\n reverseGradConfig,\n roundGradConfig,\n rsqrtGradConfig,\n selectGradConfig,\n seluGradConfig,\n sigmoidGradConfig,\n signGradConfig,\n sinGradConfig,\n sinhGradConfig,\n sliceGradConfig,\n softmaxGradConfig,\n softplusGradConfig,\n spaceToBatchNDGradConfig,\n spaceToBatchNDGradConfig,\n splitVGradConfig,\n splitVGradConfig,\n sqrtGradConfig,\n squaredDifferenceGradConfig,\n squareGradConfig,\n stepGradConfig,\n subGradConfig,\n sumGradConfig,\n tanGradConfig,\n tanhGradConfig,\n tileGradConfig,\n transposeGradConfig,\n unpackGradConfig,\n unsortedSegmentSumGradConfig,\n zerosLikeGradConfig\n];\nfor (const gradientConfig of gradConfigs) {\n registerGradient(gradientConfig);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/abs.js\ngetGlobalTensorClass().prototype.abs = function() {\n this.throwIfDisposed();\n return abs(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/acos.js\ngetGlobalTensorClass().prototype.acos = function() {\n this.throwIfDisposed();\n return acos(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/acosh.js\ngetGlobalTensorClass().prototype.acosh = function() {\n this.throwIfDisposed();\n return acosh(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/add.js\ngetGlobalTensorClass().prototype.add = function(b) {\n this.throwIfDisposed();\n return add2(this, b);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/all.js\ngetGlobalTensorClass().prototype.all = function(axis, keepDims) {\n this.throwIfDisposed();\n return all(this, axis, keepDims);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/any.js\ngetGlobalTensorClass().prototype.any = function(axis, keepDims) {\n this.throwIfDisposed();\n return any(this, axis, keepDims);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/arg_max.js\ngetGlobalTensorClass().prototype.argMax = function(axis) {\n this.throwIfDisposed();\n return argMax(this, axis);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/arg_min.js\ngetGlobalTensorClass().prototype.argMin = function(axis) {\n this.throwIfDisposed();\n return argMin(this, axis);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as_scalar.js\ngetGlobalTensorClass().prototype.asScalar = function() {\n this.throwIfDisposed();\n assert(this.size === 1, () => \"The array must have only 1 element.\");\n return reshape(this, []);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as_type.js\ngetGlobalTensorClass().prototype.asType = function(dtype) {\n this.throwIfDisposed();\n return cast(this, dtype);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as1d.js\ngetGlobalTensorClass().prototype.as1D = function() {\n this.throwIfDisposed();\n return reshape(this, [this.size]);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as2d.js\ngetGlobalTensorClass().prototype.as2D = function(rows, columns) {\n this.throwIfDisposed();\n return reshape(this, [rows, columns]);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as3d.js\ngetGlobalTensorClass().prototype.as3D = function(rows, columns, depth) {\n this.throwIfDisposed();\n return reshape(this, [rows, columns, depth]);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as4d.js\ngetGlobalTensorClass().prototype.as4D = function(rows, columns, depth, depth2) {\n this.throwIfDisposed();\n return reshape(this, [rows, columns, depth, depth2]);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as5d.js\ngetGlobalTensorClass().prototype.as5D = function(rows, columns, depth, depth2, depth3) {\n this.throwIfDisposed();\n return reshape(this, [rows, columns, depth, depth2, depth3]);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/asin.js\ngetGlobalTensorClass().prototype.asin = function() {\n this.throwIfDisposed();\n return asin(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/asinh.js\ngetGlobalTensorClass().prototype.asinh = function() {\n this.throwIfDisposed();\n return asinh(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/atan.js\ngetGlobalTensorClass().prototype.atan = function() {\n this.throwIfDisposed();\n return atan(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/atan2.js\ngetGlobalTensorClass().prototype.atan2 = function(b) {\n this.throwIfDisposed();\n return atan2(this, b);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/atanh.js\ngetGlobalTensorClass().prototype.atanh = function() {\n this.throwIfDisposed();\n return atanh(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/avg_pool.js\ngetGlobalTensorClass().prototype.avgPool = function(filterSize, strides, pad3, dimRoundingMode) {\n this.throwIfDisposed();\n return avgPool(this, filterSize, strides, pad3, dimRoundingMode);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/batch_to_space_nd.js\ngetGlobalTensorClass().prototype.batchToSpaceND = function(blockShape, crops) {\n this.throwIfDisposed();\n return batchToSpaceND(this, blockShape, crops);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/batchnorm.js\ngetGlobalTensorClass().prototype.batchNorm = function(mean5, variance, offset, scale2, varianceEpsilon) {\n this.throwIfDisposed();\n return batchNorm(this, mean5, variance, offset, scale2, varianceEpsilon);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/broadcast_to.js\ngetGlobalTensorClass().prototype.broadcastTo = function(shape) {\n this.throwIfDisposed();\n return broadcastTo(this, shape);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/cast.js\ngetGlobalTensorClass().prototype.cast = function(dtype) {\n this.throwIfDisposed();\n return cast(this, dtype);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/ceil.js\ngetGlobalTensorClass().prototype.ceil = function() {\n this.throwIfDisposed();\n return ceil(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/clip_by_value.js\ngetGlobalTensorClass().prototype.clipByValue = function(min7, max7) {\n this.throwIfDisposed();\n return clipByValue(this, min7, max7);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/concat.js\ngetGlobalTensorClass().prototype.concat = function(x, axis) {\n this.throwIfDisposed();\n if (x instanceof Tensor) {\n x = [x];\n }\n return concat([this, ...x], axis);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/conv1d.js\ngetGlobalTensorClass().prototype.conv1d = function(filter, stride, pad3, dataFormat, dilation, dimRoundingMode) {\n this.throwIfDisposed();\n return conv1d(this, filter, stride, pad3, dataFormat, dilation, dimRoundingMode);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/conv2d_transpose.js\ngetGlobalTensorClass().prototype.conv2dTranspose = function(filter, outputShape, strides, pad3, dimRoundingMode) {\n this.throwIfDisposed();\n return conv2dTranspose(this, filter, outputShape, strides, pad3, dimRoundingMode);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/conv2d.js\ngetGlobalTensorClass().prototype.conv2d = function(filter, strides, pad3, dataFormat, dilations, dimRoundingMode) {\n this.throwIfDisposed();\n return conv2d(this, filter, strides, pad3, dataFormat, dilations, dimRoundingMode);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/cos.js\ngetGlobalTensorClass().prototype.cos = function() {\n this.throwIfDisposed();\n return cos(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/cosh.js\ngetGlobalTensorClass().prototype.cosh = function() {\n this.throwIfDisposed();\n return cosh(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/cumprod.js\ngetGlobalTensorClass().prototype.cumprod = function(axis, exclusive, reverse5) {\n this.throwIfDisposed();\n return cumprod(this, axis, exclusive, reverse5);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/cumsum.js\ngetGlobalTensorClass().prototype.cumsum = function(axis, exclusive, reverse5) {\n this.throwIfDisposed();\n return cumsum(this, axis, exclusive, reverse5);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/depth_to_space.js\ngetGlobalTensorClass().prototype.depthToSpace = function(blockSize, dataFormat) {\n this.throwIfDisposed();\n return depthToSpace(this, blockSize, dataFormat);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/depthwise_conv2d.js\ngetGlobalTensorClass().prototype.depthwiseConv2d = function(filter, strides, pad3, dataFormat, dilations, dimRoundingMode) {\n this.throwIfDisposed();\n return depthwiseConv2d(this, filter, strides, pad3, dataFormat, dilations, dimRoundingMode);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/dilation2d.js\ngetGlobalTensorClass().prototype.dilation2d = function(filter, strides, pad3, dilations, dataFormat) {\n this.throwIfDisposed();\n return dilation2d(this, filter, strides, pad3, dilations, dataFormat);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/div_no_nan.js\ngetGlobalTensorClass().prototype.divNoNan = function(b) {\n this.throwIfDisposed();\n return divNoNan(this, b);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/div.js\ngetGlobalTensorClass().prototype.div = function(b) {\n this.throwIfDisposed();\n return div(this, b);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/dot.js\ngetGlobalTensorClass().prototype.dot = function(b) {\n this.throwIfDisposed();\n return dot(this, b);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/elu.js\ngetGlobalTensorClass().prototype.elu = function() {\n this.throwIfDisposed();\n return elu(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/equal.js\ngetGlobalTensorClass().prototype.equal = function(b) {\n this.throwIfDisposed();\n return equal(this, b);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/erf.js\ngetGlobalTensorClass().prototype.erf = function() {\n this.throwIfDisposed();\n return erf(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/euclidean_norm.js\ngetGlobalTensorClass().prototype.euclideanNorm = function(axis, keepDims) {\n this.throwIfDisposed();\n return euclideanNorm(this, axis, keepDims);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/exp.js\ngetGlobalTensorClass().prototype.exp = function() {\n this.throwIfDisposed();\n return exp(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/expand_dims.js\ngetGlobalTensorClass().prototype.expandDims = function(axis) {\n this.throwIfDisposed();\n return expandDims(this, axis);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/expm1.js\ngetGlobalTensorClass().prototype.expm1 = function() {\n this.throwIfDisposed();\n return expm1(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/fft.js\ngetGlobalTensorClass().prototype.fft = function() {\n this.throwIfDisposed();\n return fft(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/flatten.js\ngetGlobalTensorClass().prototype.flatten = function() {\n this.throwIfDisposed();\n return reshape(this, [this.size]);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/floor.js\ngetGlobalTensorClass().prototype.floor = function() {\n this.throwIfDisposed();\n return floor(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/floorDiv.js\ngetGlobalTensorClass().prototype.floorDiv = function(b) {\n this.throwIfDisposed();\n return floorDiv(this, b);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/gather.js\ngetGlobalTensorClass().prototype.gather = function(indices, axis) {\n this.throwIfDisposed();\n return gather(this, indices, axis);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/greater_equal.js\ngetGlobalTensorClass().prototype.greaterEqual = function(b) {\n this.throwIfDisposed();\n return greaterEqual(this, b);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/greater.js\ngetGlobalTensorClass().prototype.greater = function(b) {\n this.throwIfDisposed();\n return greater(this, b);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/ifft.js\ngetGlobalTensorClass().prototype.ifft = function() {\n this.throwIfDisposed();\n return ifft(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/irfft.js\ngetGlobalTensorClass().prototype.irfft = function() {\n this.throwIfDisposed();\n return irfft(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/is_finite.js\ngetGlobalTensorClass().prototype.isFinite = function() {\n this.throwIfDisposed();\n return isFinite2(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/is_inf.js\ngetGlobalTensorClass().prototype.isInf = function() {\n this.throwIfDisposed();\n return isInf(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/is_nan.js\ngetGlobalTensorClass().prototype.isNaN = function() {\n this.throwIfDisposed();\n return isNaN2(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/leaky_relu.js\ngetGlobalTensorClass().prototype.leakyRelu = function(alpha) {\n this.throwIfDisposed();\n return leakyRelu(this, alpha);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/less_equal.js\ngetGlobalTensorClass().prototype.lessEqual = function(b) {\n this.throwIfDisposed();\n return lessEqual(this, b);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/less.js\ngetGlobalTensorClass().prototype.less = function(b) {\n this.throwIfDisposed();\n return less(this, b);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/local_response_normalization.js\ngetGlobalTensorClass().prototype.localResponseNormalization = function(depthRadius, bias, alpha, beta) {\n this.throwIfDisposed();\n return localResponseNormalization(this, depthRadius, bias, alpha, beta);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/log_sigmoid.js\ngetGlobalTensorClass().prototype.logSigmoid = function() {\n this.throwIfDisposed();\n return logSigmoid(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/log_softmax.js\ngetGlobalTensorClass().prototype.logSoftmax = function(axis) {\n this.throwIfDisposed();\n return logSoftmax(this, axis);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/log_sum_exp.js\ngetGlobalTensorClass().prototype.logSumExp = function(axis, keepDims) {\n this.throwIfDisposed();\n return logSumExp(this, axis, keepDims);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/log.js\ngetGlobalTensorClass().prototype.log = function() {\n this.throwIfDisposed();\n return log2(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/log1p.js\ngetGlobalTensorClass().prototype.log1p = function() {\n this.throwIfDisposed();\n return log1p(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/logical_and.js\ngetGlobalTensorClass().prototype.logicalAnd = function(b) {\n this.throwIfDisposed();\n return logicalAnd(this, b);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/logical_not.js\ngetGlobalTensorClass().prototype.logicalNot = function() {\n this.throwIfDisposed();\n return logicalNot(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/logical_or.js\ngetGlobalTensorClass().prototype.logicalOr = function(b) {\n this.throwIfDisposed();\n return logicalOr(this, b);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/logical_xor.js\ngetGlobalTensorClass().prototype.logicalXor = function(b) {\n this.throwIfDisposed();\n return logicalXor(this, b);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/mat_mul.js\ngetGlobalTensorClass().prototype.matMul = function(b, transposeA, transposeB) {\n this.throwIfDisposed();\n return matMul(this, b, transposeA, transposeB);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/max_pool.js\ngetGlobalTensorClass().prototype.maxPool = function(filterSize, strides, pad3, dimRoundingMode) {\n this.throwIfDisposed();\n return maxPool(this, filterSize, strides, pad3, dimRoundingMode);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/max.js\ngetGlobalTensorClass().prototype.max = function(axis, keepDims) {\n this.throwIfDisposed();\n return max(this, axis, keepDims);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/maximum.js\ngetGlobalTensorClass().prototype.maximum = function(b) {\n this.throwIfDisposed();\n return maximum(this, b);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/mean.js\ngetGlobalTensorClass().prototype.mean = function(axis, keepDims) {\n this.throwIfDisposed();\n return mean(this, axis, keepDims);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/min.js\ngetGlobalTensorClass().prototype.min = function(axis, keepDims) {\n this.throwIfDisposed();\n return min(this, axis, keepDims);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/minimum.js\ngetGlobalTensorClass().prototype.minimum = function(b) {\n this.throwIfDisposed();\n return minimum(this, b);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/mirror_pad.js\ngetGlobalTensorClass().prototype.mirrorPad = function(paddings, mode) {\n this.throwIfDisposed();\n return mirrorPad(this, paddings, mode);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/mod.js\ngetGlobalTensorClass().prototype.mod = function(b) {\n this.throwIfDisposed();\n return mod(this, b);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/mul.js\ngetGlobalTensorClass().prototype.mul = function(b) {\n this.throwIfDisposed();\n return mul(this, b);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/neg.js\ngetGlobalTensorClass().prototype.neg = function() {\n this.throwIfDisposed();\n return neg(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/norm.js\ngetGlobalTensorClass().prototype.norm = function(ord, axis, keepDims) {\n this.throwIfDisposed();\n return norm(this, ord, axis, keepDims);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/not_equal.js\ngetGlobalTensorClass().prototype.notEqual = function(b) {\n this.throwIfDisposed();\n return notEqual(this, b);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/one_hot.js\ngetGlobalTensorClass().prototype.oneHot = function(depth, onValue = 1, offValue = 0) {\n this.throwIfDisposed();\n return oneHot(this, depth, onValue, offValue);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/ones_like.js\ngetGlobalTensorClass().prototype.onesLike = function() {\n this.throwIfDisposed();\n return onesLike(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/pad.js\ngetGlobalTensorClass().prototype.pad = function(paddings, constantValue) {\n this.throwIfDisposed();\n return pad(this, paddings, constantValue);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/pool.js\ngetGlobalTensorClass().prototype.pool = function(windowShape, poolingType, padding, dilationRate, strides, dimRoundingMode) {\n this.throwIfDisposed();\n return pool(this, windowShape, poolingType, padding, dilationRate, strides, dimRoundingMode);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/pow.js\ngetGlobalTensorClass().prototype.pow = function(exp5) {\n this.throwIfDisposed();\n return pow(this, exp5);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/prelu.js\ngetGlobalTensorClass().prototype.prelu = function(alpha) {\n this.throwIfDisposed();\n return prelu(this, alpha);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/prod.js\ngetGlobalTensorClass().prototype.prod = function(axis, keepDims) {\n this.throwIfDisposed();\n return prod(this, axis, keepDims);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/reciprocal.js\ngetGlobalTensorClass().prototype.reciprocal = function() {\n this.throwIfDisposed();\n return reciprocal(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/relu.js\ngetGlobalTensorClass().prototype.relu = function() {\n this.throwIfDisposed();\n return relu(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/relu6.js\ngetGlobalTensorClass().prototype.relu6 = function() {\n this.throwIfDisposed();\n return relu6(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/reshape_as.js\ngetGlobalTensorClass().prototype.reshapeAs = function(x) {\n this.throwIfDisposed();\n return reshape(this, x.shape);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/reshape.js\ngetGlobalTensorClass().prototype.reshape = function(shape) {\n this.throwIfDisposed();\n return reshape(this, shape);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/resize_bilinear.js\ngetGlobalTensorClass().prototype.resizeBilinear = function(newShape2D, alignCorners, halfPixelCenters) {\n this.throwIfDisposed();\n return resizeBilinear(this, newShape2D, alignCorners, halfPixelCenters);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/resize_nearest_neighbor.js\ngetGlobalTensorClass().prototype.resizeNearestNeighbor = function(newShape2D, alignCorners, halfFloatCenters) {\n this.throwIfDisposed();\n return resizeNearestNeighbor(this, newShape2D, alignCorners, halfFloatCenters);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/reverse.js\ngetGlobalTensorClass().prototype.reverse = function(axis) {\n this.throwIfDisposed();\n return reverse(this, axis);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/rfft.js\ngetGlobalTensorClass().prototype.rfft = function() {\n this.throwIfDisposed();\n return rfft(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/round.js\ngetGlobalTensorClass().prototype.round = function() {\n this.throwIfDisposed();\n return round2(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/rsqrt.js\ngetGlobalTensorClass().prototype.rsqrt = function() {\n this.throwIfDisposed();\n return rsqrt(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/selu.js\ngetGlobalTensorClass().prototype.selu = function() {\n this.throwIfDisposed();\n return selu(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/separable_conv2d.js\ngetGlobalTensorClass().prototype.separableConv2d = function(depthwiseFilter, pointwiseFilter, strides, pad3, dilation, dataFormat) {\n this.throwIfDisposed();\n return separableConv2d(this, depthwiseFilter, pointwiseFilter, strides, pad3, dilation, dataFormat);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sigmoid.js\ngetGlobalTensorClass().prototype.sigmoid = function() {\n this.throwIfDisposed();\n return sigmoid(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sign.js\ngetGlobalTensorClass().prototype.sign = function() {\n this.throwIfDisposed();\n return sign(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sin.js\ngetGlobalTensorClass().prototype.sin = function() {\n this.throwIfDisposed();\n return sin(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sinh.js\ngetGlobalTensorClass().prototype.sinh = function() {\n this.throwIfDisposed();\n return sinh(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/slice.js\ngetGlobalTensorClass().prototype.slice = function(begin, size) {\n this.throwIfDisposed();\n return slice(this, begin, size);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/softmax.js\ngetGlobalTensorClass().prototype.softmax = function(dim) {\n this.throwIfDisposed();\n return softmax(this, dim);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/softplus.js\ngetGlobalTensorClass().prototype.softplus = function() {\n this.throwIfDisposed();\n return softplus(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/space_to_batch_nd.js\ngetGlobalTensorClass().prototype.spaceToBatchND = function(blockShape, paddings) {\n this.throwIfDisposed();\n return spaceToBatchND(this, blockShape, paddings);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/split.js\ngetGlobalTensorClass().prototype.split = function(numOrSizeSplits, axis) {\n this.throwIfDisposed();\n return split(this, numOrSizeSplits, axis);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sqrt.js\ngetGlobalTensorClass().prototype.sqrt = function() {\n this.throwIfDisposed();\n return sqrt(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/square.js\ngetGlobalTensorClass().prototype.square = function() {\n this.throwIfDisposed();\n return square(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/squared_difference.js\ngetGlobalTensorClass().prototype.squaredDifference = function(b) {\n this.throwIfDisposed();\n return squaredDifference(this, b);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/squeeze.js\ngetGlobalTensorClass().prototype.squeeze = function(axis) {\n this.throwIfDisposed();\n return squeeze(this, axis);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/stack.js\ngetGlobalTensorClass().prototype.stack = function(x, axis) {\n this.throwIfDisposed();\n const tensorsToBeStacked = x instanceof Tensor ? [this, x] : [this, ...x];\n return stack(tensorsToBeStacked, axis);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/step.js\ngetGlobalTensorClass().prototype.step = function(alpha) {\n this.throwIfDisposed();\n return step(this, alpha);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/strided_slice.js\ngetGlobalTensorClass().prototype.stridedSlice = function(begin, end, strides, beginMask, endMask, ellipsisMask, newAxisMask, shrinkAxisMask) {\n this.throwIfDisposed();\n return stridedSlice(this, begin, end, strides, beginMask, endMask, ellipsisMask, newAxisMask, shrinkAxisMask);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sub.js\ngetGlobalTensorClass().prototype.sub = function(b) {\n this.throwIfDisposed();\n return sub(this, b);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sum.js\ngetGlobalTensorClass().prototype.sum = function(axis, keepDims) {\n this.throwIfDisposed();\n return sum2(this, axis, keepDims);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/tan.js\ngetGlobalTensorClass().prototype.tan = function() {\n this.throwIfDisposed();\n return tan(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/tanh.js\ngetGlobalTensorClass().prototype.tanh = function() {\n this.throwIfDisposed();\n return tanh2(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/tile.js\ngetGlobalTensorClass().prototype.tile = function(reps) {\n this.throwIfDisposed();\n return tile(this, reps);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/to_bool.js\ngetGlobalTensorClass().prototype.toBool = function() {\n this.throwIfDisposed();\n return cast(this, \"bool\");\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/to_float.js\ngetGlobalTensorClass().prototype.toFloat = function() {\n this.throwIfDisposed();\n return cast(this, \"float32\");\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/to_int.js\ngetGlobalTensorClass().prototype.toInt = function() {\n this.throwIfDisposed();\n return cast(this, \"int32\");\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/topk.js\ngetGlobalTensorClass().prototype.topk = function(k, sorted) {\n this.throwIfDisposed();\n return topk(this, k, sorted);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/transpose.js\ngetGlobalTensorClass().prototype.transpose = function(perm) {\n this.throwIfDisposed();\n return transpose(this, perm);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/unique.js\ngetGlobalTensorClass().prototype.unique = function(axis) {\n this.throwIfDisposed();\n return unique(this, axis);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/unsorted_segment_sum.js\ngetGlobalTensorClass().prototype.unsortedSegmentSum = function(segmentIds, numSegments) {\n this.throwIfDisposed();\n return unsortedSegmentSum(this, segmentIds, numSegments);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/unstack.js\ngetGlobalTensorClass().prototype.unstack = function(axis) {\n this.throwIfDisposed();\n return unstack(this, axis);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/where.js\ngetGlobalTensorClass().prototype.where = function(condition, x) {\n this.throwIfDisposed();\n return where(condition, this, x);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/zeros_like.js\ngetGlobalTensorClass().prototype.zerosLike = function() {\n this.throwIfDisposed();\n return zerosLike(this);\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/errors.js\nvar AttributeError = class extends Error {\n constructor(message) {\n super(message);\n Object.setPrototypeOf(this, AttributeError.prototype);\n }\n};\nvar RuntimeError = class extends Error {\n constructor(message) {\n super(message);\n Object.setPrototypeOf(this, RuntimeError.prototype);\n }\n};\nvar ValueError = class extends Error {\n constructor(message) {\n super(message);\n Object.setPrototypeOf(this, ValueError.prototype);\n }\n};\nvar NotImplementedError = class extends Error {\n constructor(message) {\n super(message);\n Object.setPrototypeOf(this, NotImplementedError.prototype);\n }\n};\nvar AssertionError = class extends Error {\n constructor(message) {\n super(message);\n Object.setPrototypeOf(this, AssertionError.prototype);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/utils/executor_utils.js\nvar LruCache = class {\n constructor(maxEntries) {\n this.maxEntries = maxEntries || 100;\n this.cache = /* @__PURE__ */ new Map();\n }\n get(key) {\n let entry;\n if (this.cache.has(key)) {\n entry = this.cache.get(key);\n this.cache.delete(key);\n this.cache.set(key, entry);\n }\n return entry;\n }\n put(key, value) {\n if (this.cache.has(key)) {\n this.cache.delete(key);\n } else if (this.cache.size >= this.maxEntries) {\n const keyToDelete = this.cache.keys().next().value;\n this.cache.delete(keyToDelete);\n }\n this.cache.set(key, value);\n }\n getMaxEntries() {\n return this.maxEntries;\n }\n setMaxEntries(maxEntries) {\n if (maxEntries < 0) {\n throw new Error(`The maxEntries of LRU caches must be at least 0, but got ${maxEntries}.`);\n }\n if (this.maxEntries > maxEntries) {\n for (let i2 = 0; i2 < this.maxEntries - maxEntries; i2++) {\n const keyToDelete = this.cache.keys().next().value;\n this.cache.delete(keyToDelete);\n }\n }\n this.maxEntries = maxEntries;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/utils/generic_utils.js\nfunction pyListRepeat(value, numValues) {\n if (Array.isArray(value)) {\n let newArray = [];\n for (let i2 = 0; i2 < numValues; i2++) {\n newArray = newArray.concat(value);\n }\n return newArray;\n } else {\n const newArray = new Array(numValues);\n newArray.fill(value);\n return newArray;\n }\n}\nfunction assert2(val, message) {\n if (!val) {\n throw new AssertionError(message);\n }\n}\nfunction count(array2, refernce) {\n let counter = 0;\n for (const item of array2) {\n if (item === refernce) {\n counter++;\n }\n }\n return counter;\n}\nfunction singletonOrArray(xs) {\n if (xs.length === 1) {\n return xs[0];\n }\n return xs;\n}\nfunction toList(x) {\n if (Array.isArray(x)) {\n return x;\n }\n return [x];\n}\nfunction toSnakeCase(name) {\n const intermediate = name.replace(/(.)([A-Z][a-z0-9]+)/g, \"$1_$2\");\n const insecure = intermediate.replace(/([a-z])([A-Z])/g, \"$1_$2\").toLowerCase();\n if (insecure[0] !== \"_\") {\n return insecure;\n }\n return \"private\" + insecure;\n}\nfunction toCamelCase(identifier) {\n if (identifier.length <= 1) {\n return identifier;\n }\n if (identifier.indexOf(\"_\") === -1) {\n return identifier;\n }\n return identifier.replace(/[_]+(\\w|$)/g, (m, p1) => p1.toUpperCase());\n}\nvar _GLOBAL_CUSTOM_OBJECTS = {};\nfunction serializeKerasObject(instance) {\n if (instance === null || instance === void 0) {\n return null;\n }\n const dict = {};\n dict[\"className\"] = instance.getClassName();\n dict[\"config\"] = instance.getConfig();\n return dict;\n}\nfunction convertNDArrayScalarsInConfig(config) {\n if (config == null || typeof config !== \"object\") {\n return;\n } else if (Array.isArray(config)) {\n config.forEach((configItem) => convertNDArrayScalarsInConfig(configItem));\n } else {\n const fields = Object.keys(config);\n for (const field of fields) {\n const value = config[field];\n if (value != null && typeof value === \"object\") {\n if (!Array.isArray(value) && value[\"type\"] === \"ndarray\" && typeof value[\"value\"] === \"number\") {\n config[field] = value[\"value\"];\n } else {\n convertNDArrayScalarsInConfig(value);\n }\n }\n }\n }\n}\nfunction deserializeKerasObject(identifier, moduleObjects = {}, customObjects = {}, printableModuleName = \"object\", fastWeightInit = false) {\n if (typeof identifier === \"string\") {\n const functionName = identifier;\n let fn;\n if (functionName in customObjects) {\n fn = customObjects[functionName];\n } else if (functionName in _GLOBAL_CUSTOM_OBJECTS) {\n fn = _GLOBAL_CUSTOM_OBJECTS[functionName];\n } else {\n fn = moduleObjects[functionName];\n if (fn == null) {\n throw new ValueError(`Unknown ${printableModuleName}: ${identifier}. This may be due to one of the following reasons:\n1. The ${printableModuleName} is defined in Python, in which case it needs to be ported to TensorFlow.js or your JavaScript code.\n2. The custom ${printableModuleName} is defined in JavaScript, but is not registered properly with tf.serialization.registerClass().`);\n }\n }\n return fn;\n } else {\n const config = identifier;\n if (config[\"className\"] == null || config[\"config\"] == null) {\n throw new ValueError(`${printableModuleName}: Improper config format: ${JSON.stringify(config)}.\n'className' and 'config' must set.`);\n }\n const className = config[\"className\"];\n let cls, fromConfig;\n if (className in customObjects) {\n [cls, fromConfig] = customObjects[className];\n } else if (className in _GLOBAL_CUSTOM_OBJECTS) {\n [cls, fromConfig] = _GLOBAL_CUSTOM_OBJECTS[\"className\"];\n } else if (className in moduleObjects) {\n [cls, fromConfig] = moduleObjects[className];\n }\n if (cls == null) {\n throw new ValueError(`Unknown ${printableModuleName}: ${className}. This may be due to one of the following reasons:\n1. The ${printableModuleName} is defined in Python, in which case it needs to be ported to TensorFlow.js or your JavaScript code.\n2. The custom ${printableModuleName} is defined in JavaScript, but is not registered properly with tf.serialization.registerClass().`);\n }\n if (fromConfig != null) {\n const customObjectsCombined = {};\n for (const key of Object.keys(_GLOBAL_CUSTOM_OBJECTS)) {\n customObjectsCombined[key] = _GLOBAL_CUSTOM_OBJECTS[key];\n }\n for (const key of Object.keys(customObjects)) {\n customObjectsCombined[key] = customObjects[key];\n }\n const nestedConfig = config[\"config\"];\n nestedConfig[\"customObjects\"] = customObjectsCombined;\n const backupCustomObjects = Object.assign({}, _GLOBAL_CUSTOM_OBJECTS);\n for (const key of Object.keys(customObjects)) {\n _GLOBAL_CUSTOM_OBJECTS[key] = customObjects[key];\n }\n convertNDArrayScalarsInConfig(config[\"config\"]);\n const returnObj = fromConfig(cls, config[\"config\"], customObjects, fastWeightInit);\n _GLOBAL_CUSTOM_OBJECTS = Object.assign({}, backupCustomObjects);\n return returnObj;\n } else {\n const backupCustomObjects = Object.assign({}, _GLOBAL_CUSTOM_OBJECTS);\n for (const key of Object.keys(customObjects)) {\n _GLOBAL_CUSTOM_OBJECTS[key] = customObjects[key];\n }\n const returnObj = new cls(config[\"config\"]);\n _GLOBAL_CUSTOM_OBJECTS = Object.assign({}, backupCustomObjects);\n return returnObj;\n }\n }\n}\nfunction numberCompare(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}\nfunction reverseNumberCompare(a, b) {\n return -1 * numberCompare(a, b);\n}\nfunction unique2(xs) {\n if (xs == null) {\n return xs;\n }\n const out = [];\n for (const x of xs) {\n if (out.indexOf(x) === -1) {\n out.push(x);\n }\n }\n return out;\n}\nfunction isObjectEmpty(obj) {\n if (obj == null) {\n throw new ValueError(`Invalid value in obj: ${JSON.stringify(obj)}`);\n }\n for (const key in obj) {\n if (obj.hasOwnProperty(key)) {\n return false;\n }\n }\n return true;\n}\nfunction checkStringTypeUnionValue(values, label, value) {\n if (value == null) {\n return;\n }\n if (values.indexOf(value) < 0) {\n throw new ValueError(`${value} is not a valid ${label}. Valid values are ${values} or null/undefined.`);\n }\n}\nfunction checkArrayTypeAndLength(x, expectedType, minLength = 0, maxLength = Infinity) {\n assert2(minLength >= 0);\n assert2(maxLength >= minLength);\n return Array.isArray(x) && x.length >= minLength && x.length <= maxLength && x.every((e2) => typeof e2 === expectedType);\n}\nfunction assertPositiveInteger(value, name) {\n if (Array.isArray(value)) {\n util_exports.assert(value.length > 0, () => `${name} is unexpectedly an empty array.`);\n value.forEach((v, i2) => assertPositiveInteger(v, `element ${i2 + 1} of ${name}`));\n } else {\n util_exports.assert(Number.isInteger(value) && value > 0, () => `Expected ${name} to be a positive integer, but got ${formatAsFriendlyString(value)}.`);\n }\n}\nfunction formatAsFriendlyString(value) {\n if (value === null) {\n return \"null\";\n } else if (Array.isArray(value)) {\n return \"[\" + value.map((v) => formatAsFriendlyString(v)).join(\",\") + \"]\";\n } else if (typeof value === \"string\") {\n return `\"${value}\"`;\n } else {\n return `${value}`;\n }\n}\nfunction debounce(f, waitMs, nowFunc) {\n let lastTime = nowFunc != null ? nowFunc() : util_exports.now();\n let lastResult;\n const f2 = (...args) => {\n const now2 = nowFunc != null ? nowFunc() : util_exports.now();\n if (now2 - lastTime < waitMs) {\n return lastResult;\n }\n lastTime = now2;\n lastResult = f(...args);\n return lastResult;\n };\n return f2;\n}\nfunction mapActivationToFusedKernel(activationName) {\n if (activationName === \"relu\") {\n return \"relu\";\n }\n if (activationName === \"linear\") {\n return \"linear\";\n }\n if (activationName === \"elu\") {\n return \"elu\";\n }\n return null;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/backend/state.js\nvar _nextUniqueTensorId = 0;\nfunction getNextUniqueTensorId() {\n return _nextUniqueTensorId++;\n}\nvar _uidPrefixes = {};\nfunction getUid(prefix = \"\") {\n if (!(prefix in _uidPrefixes)) {\n _uidPrefixes[prefix] = 0;\n }\n _uidPrefixes[prefix] += 1;\n return prefix + _uidPrefixes[prefix].toString();\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/keras_format/common.js\nvar VALID_DATA_FORMAT_VALUES = [\"channelsFirst\", \"channelsLast\"];\nvar VALID_INTERPOLATION_FORMAT_VALUES = [\"nearest\", \"bilinear\"];\nvar VALID_PADDING_MODE_VALUES = [\"valid\", \"same\", \"causal\"];\nvar VALID_POOL_MODE_VALUES = [\"max\", \"avg\"];\nvar VALID_BIDIRECTIONAL_MERGE_MODES = [\"sum\", \"mul\", \"concat\", \"ave\"];\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/common.js\nvar nameMap = /* @__PURE__ */ new Map();\nfunction checkDataFormat(value) {\n checkStringTypeUnionValue(VALID_DATA_FORMAT_VALUES, \"DataFormat\", value);\n}\nfunction checkInterpolationFormat(value) {\n checkStringTypeUnionValue(VALID_INTERPOLATION_FORMAT_VALUES, \"InterpolationFormat\", value);\n}\nfunction checkPaddingMode(value) {\n checkStringTypeUnionValue(VALID_PADDING_MODE_VALUES, \"PaddingMode\", value);\n}\nfunction checkPoolMode(value) {\n checkStringTypeUnionValue(VALID_POOL_MODE_VALUES, \"PoolMode\", value);\n}\nvar _nameScopeStack = [];\nvar _nameScopeDivider = \"/\";\nfunction nameScope(name, fn) {\n _nameScopeStack.push(name);\n try {\n const val = fn();\n _nameScopeStack.pop();\n return val;\n } catch (e2) {\n _nameScopeStack.pop();\n throw e2;\n }\n}\nfunction currentNameScopePrefix() {\n if (_nameScopeStack.length === 0) {\n return \"\";\n } else {\n return _nameScopeStack.join(_nameScopeDivider) + _nameScopeDivider;\n }\n}\nfunction getScopedTensorName(tensorName) {\n if (!isValidTensorName(tensorName)) {\n throw new Error(\"Not a valid tensor name: '\" + tensorName + \"'\");\n }\n return currentNameScopePrefix() + tensorName;\n}\nfunction getUniqueTensorName(scopedName) {\n if (!isValidTensorName(scopedName)) {\n throw new Error(\"Not a valid tensor name: '\" + scopedName + \"'\");\n }\n if (!nameMap.has(scopedName)) {\n nameMap.set(scopedName, 0);\n }\n const index = nameMap.get(scopedName);\n nameMap.set(scopedName, nameMap.get(scopedName) + 1);\n if (index > 0) {\n const result = `${scopedName}_${index}`;\n nameMap.set(result, 1);\n return result;\n } else {\n return scopedName;\n }\n}\nvar tensorNameRegex = new RegExp(/^[A-Za-z0-9][-A-Za-z0-9\\._\\/]*$/);\nfunction isValidTensorName(name) {\n return !!name.match(tensorNameRegex);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/utils/math_utils.js\nfunction isInteger(x) {\n return x === parseInt(x.toString(), 10);\n}\nfunction arrayProd(array2, begin, end) {\n if (begin == null) {\n begin = 0;\n }\n if (end == null) {\n end = array2.length;\n }\n let prod6 = 1;\n for (let i2 = begin; i2 < end; ++i2) {\n prod6 *= array2[i2];\n }\n return prod6;\n}\nfunction min2(array2) {\n if (array2.length === 0) {\n return Number.NaN;\n }\n let min7 = Number.POSITIVE_INFINITY;\n for (let i2 = 0; i2 < array2.length; i2++) {\n const value = array2[i2];\n if (value < min7) {\n min7 = value;\n }\n }\n return min7;\n}\nfunction max2(array2) {\n if (array2.length === 0) {\n return Number.NaN;\n }\n let max7 = Number.NEGATIVE_INFINITY;\n for (let i2 = 0; i2 < array2.length; i2++) {\n const value = array2[i2];\n if (value > max7) {\n max7 = value;\n }\n }\n return max7;\n}\nfunction range2(begin, end) {\n if (end < begin) {\n throw new ValueError(`end (${end}) < begin (${begin}) is forbidden.`);\n }\n const out = [];\n for (let i2 = begin; i2 < end; ++i2) {\n out.push(i2);\n }\n return out;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/backend/common.js\nvar _epsilon;\nfunction epsilon() {\n if (_epsilon == null) {\n _epsilon = backend().epsilon();\n }\n return _epsilon;\n}\nfunction imageDataFormat() {\n return \"channelsLast\";\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/backend/tfjs_backend.js\nfunction cast2(x, dtype) {\n return cast(x, dtype);\n}\nfunction expandDims2(x, axis = -1) {\n const outShape = x.shape.slice();\n if (axis < 0) {\n axis = outShape.length + axis + 1;\n }\n outShape.splice(axis, 0, 1);\n return reshape(x, outShape);\n}\nfunction repeat(x, n2) {\n return tidy(() => {\n if (x.shape.length !== 2) {\n throw new ValueError(`repeat() expects a rank-2 tensor, but received a rank-${x.shape.length} tensor.`);\n }\n const y = expandDims2(x, 1);\n return tile2(y, [1, n2, 1]);\n });\n}\nfunction flatten2(x) {\n const newShape = [arrayProd(x.shape)];\n return reshape(x, newShape);\n}\nfunction batchFlatten(x) {\n if (x.rank <= 1) {\n throw new ValueError(`batchFlatten requires a minimum rank of 2. Got rank: ${x.rank}.`);\n }\n const newShape = [x.shape[0], arrayProd(x.shape, 1)];\n return reshape(x, newShape);\n}\nfunction sliceAlongFirstAxis(array2, start, size) {\n return tidy(() => {\n switch (array2.rank) {\n case 1:\n return slice1d(array2, start, size);\n case 2:\n return slice2d(array2, [start, 0], [size, array2.shape[1]]);\n case 3:\n return slice3d(array2, [start, 0, 0], [size, array2.shape[1], array2.shape[2]]);\n case 4:\n return slice4d(array2, [start, 0, 0, 0], [size, array2.shape[1], array2.shape[2], array2.shape[3]]);\n case 5:\n return slice(array2, [start, 0, 0, 0, 0], [\n size,\n array2.shape[1],\n array2.shape[2],\n array2.shape[3],\n array2.shape[4]\n ]);\n case 6:\n return slice(array2, [start, 0, 0, 0, 0, 0], [\n size,\n array2.shape[1],\n array2.shape[2],\n array2.shape[3],\n array2.shape[4],\n array2.shape[5]\n ]);\n default:\n throw new ValueError(`sliceAlongFirstAxis() received an unsupported tensor rank: ${array2.rank}`);\n }\n });\n}\nfunction sliceAlongLastAxis(array2, start, size) {\n return tidy(() => {\n switch (array2.rank) {\n case 1:\n return slice1d(array2, start, size);\n case 2:\n return slice2d(array2, [0, start], [array2.shape[0], size]);\n case 3:\n return slice3d(array2, [0, 0, start], [array2.shape[0], array2.shape[1], size]);\n case 4:\n return slice4d(array2, [0, 0, 0, start], [array2.shape[0], array2.shape[1], array2.shape[2], size]);\n default:\n throw new ValueError(`sliceAlongLastAxis() received an unsupported tensor rank: ${array2.rank}`);\n }\n });\n}\nfunction sliceAlongAxis(array2, start, size, axis) {\n return tidy(() => {\n switch (array2.rank) {\n case 1:\n return slice1d(array2, start, size);\n case 2:\n switch (axis) {\n case 1:\n return sliceAlongFirstAxis(array2, start, size);\n case 2:\n return sliceAlongLastAxis(array2, start, size);\n default:\n throw new ValueError(`The axis is not within the rank of the tensor ${axis}`);\n }\n case 3:\n switch (axis) {\n case 1:\n return sliceAlongFirstAxis(array2, start, size);\n case 2:\n return slice3d(array2, [0, start, 0], [array2.shape[0], size, array2.shape[2]]);\n case 3:\n return sliceAlongLastAxis(array2, start, size);\n default:\n throw new ValueError(`The axis is not within the rank of the tensor ${axis}`);\n }\n case 4:\n switch (axis) {\n case 1:\n return sliceAlongFirstAxis(array2, start, size);\n case 2:\n return slice4d(array2, [0, start, 0, 0], [array2.shape[0], size, array2.shape[2], array2.shape[3]]);\n case 3:\n return slice4d(array2, [0, 0, start, 0], [array2.shape[0], array2.shape[1], size, array2.shape[3]]);\n case 4:\n return sliceAlongLastAxis(array2, start, size);\n default:\n throw new ValueError(`The axis is not within the rank of the tensor ${axis}`);\n }\n default:\n throw new ValueError(`sliceAlongLastAxis() received an unsupported tensor rank: ${array2.rank}`);\n }\n });\n}\nfunction concatenate(tensors, axis = -1) {\n let rank;\n if (axis < 0) {\n rank = tensors[0].rank;\n if (rank !== 0) {\n axis = rank;\n } else {\n axis = 0;\n }\n }\n if (axis === tensors[0].rank) {\n axis = -1;\n }\n return concat(tensors, axis);\n}\nfunction concatAlongFirstAxis(a, b) {\n switch (a.rank) {\n case 1:\n return concat1d([a, b]);\n case 2:\n return concat2d([a, b], 0);\n case 3:\n return concat3d([a, b], 0);\n case 4:\n return concat4d([a, b], 0);\n default:\n throw new ValueError(`concatAlongFirstAxis() received an unsupported tensor rank: ${a.rank}`);\n }\n}\nfunction tile2(x, n2) {\n if (!Array.isArray(n2)) {\n n2 = [n2];\n }\n if (x.rank !== n2.length) {\n throw new ValueError(`The length of input n (${n2.length}) does not match the number of dimensions in input x (${x.rank})`);\n }\n return tile(x, n2);\n}\nfunction randomNormal2(shape, mean5 = 0, stddev = 1, dtype, seed) {\n return randomNormal(shape, mean5, stddev, dtype, seed);\n}\nfunction dot2(a, b, activation2, bias) {\n if (a.rank < 2 || b.rank < 2) {\n throw new NotImplementedError(`dot requires both inputs to be rank >= 2 but got x shape = ${a.shape} and y shape = ${b.shape}`);\n }\n if (b.rank >= 3) {\n const xLastDim = a.shape.slice(-1)[0];\n const ySecondLastDim = b.shape.slice(-2)[0];\n if (xLastDim !== ySecondLastDim) {\n throw new NotImplementedError(`If rank y >= 3, then the second last dim of y must equal the last dim of x but got x shape = ${a.shape} and y shape = ${b.shape}`);\n }\n }\n if (a.rank === 2 && b.rank === 2) {\n const transposeA = false;\n const transposeB = false;\n return fused_ops_exports.matMul({\n a,\n b,\n transposeA,\n transposeB,\n bias: bias ? reshapeBias(a.rank, bias, imageDataFormat()) : null,\n activation: activation2\n });\n } else {\n const aFirstDims = a.shape.slice();\n const aLastDim = aFirstDims.pop();\n a = reshape(a, [-1, aLastDim]);\n const bShape = b.shape.slice();\n const bLastDim = bShape.pop();\n const ySecondLastDim = bShape.pop();\n const yOtherDims = [...bShape, bLastDim];\n const perm = Array.from({ length: b.rank }, (_, i2) => {\n if (i2 === 0) {\n return b.rank - 2;\n } else if (i2 <= b.rank - 2) {\n return i2 - 1;\n }\n return i2;\n });\n b = reshape(transpose(b, perm), [ySecondLastDim, -1]);\n const outputShape = [...aFirstDims, ...yOtherDims];\n const transposeA = false;\n const transposeB = false;\n return reshape(fused_ops_exports.matMul({\n a,\n b,\n transposeA,\n transposeB,\n bias: bias ? reshapeBias(a.rank, bias, imageDataFormat()) : null,\n activation: activation2\n }), outputShape);\n }\n}\nfunction gather2(reference, indices, axis) {\n return tidy(() => {\n if (Array.isArray(indices)) {\n indices = tensor1d(indices, \"int32\");\n } else {\n indices = cast(indices, \"int32\");\n }\n return gather(reference, indices, axis);\n });\n}\nfunction square2(x) {\n return mul(x, x);\n}\nfunction reshapeBias(xRank, bias, dataFormat) {\n const biasShape = bias.shape;\n if (bias.rank !== 1 && bias.rank !== xRank) {\n throw new ValueError(`Unexpected bias dimensions: ${bias.rank}; expected it to be 1 or ${xRank}`);\n }\n if (xRank === 5) {\n if (dataFormat === \"channelsFirst\") {\n if (biasShape.length === 1) {\n return reshape(bias, [1, biasShape[0], 1, 1, 1]);\n } else {\n return reshape(bias, [1, biasShape[3], biasShape[0], biasShape[1], biasShape[2]]);\n }\n } else if (dataFormat === \"channelsLast\") {\n if (biasShape.length === 1) {\n return reshape(bias, [1, 1, 1, 1, biasShape[0]]);\n } else {\n return reshape(bias, [1].concat(biasShape));\n }\n }\n } else if (xRank === 4) {\n if (dataFormat === \"channelsFirst\") {\n if (biasShape.length === 1) {\n return reshape(bias, [1, biasShape[0], 1, 1]);\n } else {\n return reshape(bias, [1, biasShape[2], biasShape[0], biasShape[1]]);\n }\n } else if (dataFormat === \"channelsLast\") {\n if (biasShape.length === 1) {\n return reshape(bias, [1, 1, 1, biasShape[0]]);\n } else {\n return reshape(bias, [1].concat(biasShape));\n }\n }\n } else if (xRank === 3) {\n if (dataFormat === \"channelsFirst\") {\n if (biasShape.length === 1) {\n return reshape(bias, [1, biasShape[0], 1]);\n } else {\n return reshape(bias, [1, biasShape[1], biasShape[0]]);\n }\n } else if (dataFormat === \"channelsLast\") {\n if (biasShape.length === 1) {\n return reshape(bias, [1, 1, biasShape[0]]);\n } else {\n return reshape(bias, [1].concat(biasShape));\n }\n }\n } else if (xRank < 3) {\n return bias;\n }\n throw new ValueError(`Unsupported input rank by biasAdd: ${bias.rank}`);\n}\nfunction biasAdd(x, bias, dataFormat) {\n return tidy(() => {\n if (dataFormat == null) {\n dataFormat = imageDataFormat();\n }\n checkDataFormat(dataFormat);\n return add2(x, reshapeBias(x.rank, bias, dataFormat));\n });\n}\nfunction elu2(x, alpha = 1) {\n if (alpha !== 1) {\n throw new NotImplementedError(`Support for alpha values other than 1 (${alpha}) is not implemented yet.`);\n }\n return elu(x);\n}\nfunction softsign(x) {\n return tidy(() => div(x, add2(abs(x), 1)));\n}\nfunction dropout2(x, level, noiseShape, seed) {\n return tidy(() => dropout(x, level, noiseShape, seed));\n}\nfunction hardSigmoid(x) {\n return tidy(() => {\n const y = add2(0.5, mul(0.2, x));\n return clipByValue(y, 0, 1);\n });\n}\nfunction inTrainPhase(x, alt, training = false) {\n return training ? x() : alt();\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/keras_format/initializer_config.js\nvar VALID_FAN_MODE_VALUES = [\"fanIn\", \"fanOut\", \"fanAvg\"];\nvar VALID_DISTRIBUTION_VALUES = [\"normal\", \"uniform\", \"truncatedNormal\"];\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/initializers.js\nfunction checkFanMode(value) {\n checkStringTypeUnionValue(VALID_FAN_MODE_VALUES, \"FanMode\", value);\n}\nfunction checkDistribution(value) {\n checkStringTypeUnionValue(VALID_DISTRIBUTION_VALUES, \"Distribution\", value);\n}\nvar Initializer = class extends serialization_exports.Serializable {\n fromConfigUsesCustomObjects() {\n return false;\n }\n getConfig() {\n return {};\n }\n};\nvar Zeros = class extends Initializer {\n apply(shape, dtype) {\n return zeros(shape, dtype);\n }\n};\nZeros.className = \"Zeros\";\nserialization_exports.registerClass(Zeros);\nvar Ones = class extends Initializer {\n apply(shape, dtype) {\n return ones2(shape, dtype);\n }\n};\nOnes.className = \"Ones\";\nserialization_exports.registerClass(Ones);\nvar Constant = class extends Initializer {\n constructor(args) {\n super();\n if (typeof args !== \"object\") {\n throw new ValueError(`Expected argument of type ConstantConfig but got ${args}`);\n }\n if (args.value === void 0) {\n throw new ValueError(`config must have value set but got ${args}`);\n }\n this.value = args.value;\n }\n apply(shape, dtype) {\n return tidy(() => mul(scalar(this.value), ones2(shape, dtype)));\n }\n getConfig() {\n return {\n value: this.value\n };\n }\n};\nConstant.className = \"Constant\";\nserialization_exports.registerClass(Constant);\nvar RandomUniform = class extends Initializer {\n constructor(args) {\n super();\n this.DEFAULT_MINVAL = -0.05;\n this.DEFAULT_MAXVAL = 0.05;\n this.minval = args.minval || this.DEFAULT_MINVAL;\n this.maxval = args.maxval || this.DEFAULT_MAXVAL;\n this.seed = args.seed;\n }\n apply(shape, dtype) {\n return randomUniform(shape, this.minval, this.maxval, dtype);\n }\n getConfig() {\n return { minval: this.minval, maxval: this.maxval, seed: this.seed };\n }\n};\nRandomUniform.className = \"RandomUniform\";\nserialization_exports.registerClass(RandomUniform);\nvar RandomNormal = class extends Initializer {\n constructor(args) {\n super();\n this.DEFAULT_MEAN = 0;\n this.DEFAULT_STDDEV = 0.05;\n this.mean = args.mean || this.DEFAULT_MEAN;\n this.stddev = args.stddev || this.DEFAULT_STDDEV;\n this.seed = args.seed;\n }\n apply(shape, dtype) {\n dtype = dtype || \"float32\";\n if (dtype !== \"float32\" && dtype !== \"int32\") {\n throw new NotImplementedError(`randomNormal does not support dType ${dtype}.`);\n }\n return randomNormal2(shape, this.mean, this.stddev, dtype, this.seed);\n }\n getConfig() {\n return { mean: this.mean, stddev: this.stddev, seed: this.seed };\n }\n};\nRandomNormal.className = \"RandomNormal\";\nserialization_exports.registerClass(RandomNormal);\nvar TruncatedNormal = class extends Initializer {\n constructor(args) {\n super();\n this.DEFAULT_MEAN = 0;\n this.DEFAULT_STDDEV = 0.05;\n this.mean = args.mean || this.DEFAULT_MEAN;\n this.stddev = args.stddev || this.DEFAULT_STDDEV;\n this.seed = args.seed;\n }\n apply(shape, dtype) {\n dtype = dtype || \"float32\";\n if (dtype !== \"float32\" && dtype !== \"int32\") {\n throw new NotImplementedError(`truncatedNormal does not support dType ${dtype}.`);\n }\n return truncatedNormal(shape, this.mean, this.stddev, dtype, this.seed);\n }\n getConfig() {\n return { mean: this.mean, stddev: this.stddev, seed: this.seed };\n }\n};\nTruncatedNormal.className = \"TruncatedNormal\";\nserialization_exports.registerClass(TruncatedNormal);\nvar Identity2 = class extends Initializer {\n constructor(args) {\n super();\n this.gain = args.gain != null ? args.gain : 1;\n }\n apply(shape, dtype) {\n return tidy(() => {\n if (shape.length !== 2 || shape[0] !== shape[1]) {\n throw new ValueError(\"Identity matrix initializer can only be used for 2D square matrices.\");\n } else {\n return mul(this.gain, eye(shape[0]));\n }\n });\n }\n getConfig() {\n return { gain: this.gain };\n }\n};\nIdentity2.className = \"Identity\";\nserialization_exports.registerClass(Identity2);\nfunction computeFans(shape, dataFormat = \"channelsLast\") {\n let fanIn;\n let fanOut;\n checkDataFormat(dataFormat);\n if (shape.length === 2) {\n fanIn = shape[0];\n fanOut = shape[1];\n } else if ([3, 4, 5].indexOf(shape.length) !== -1) {\n if (dataFormat === \"channelsFirst\") {\n const receptiveFieldSize = arrayProd(shape, 2);\n fanIn = shape[1] * receptiveFieldSize;\n fanOut = shape[0] * receptiveFieldSize;\n } else if (dataFormat === \"channelsLast\") {\n const receptiveFieldSize = arrayProd(shape, 0, shape.length - 2);\n fanIn = shape[shape.length - 2] * receptiveFieldSize;\n fanOut = shape[shape.length - 1] * receptiveFieldSize;\n }\n } else {\n const shapeProd = arrayProd(shape);\n fanIn = Math.sqrt(shapeProd);\n fanOut = Math.sqrt(shapeProd);\n }\n return [fanIn, fanOut];\n}\nvar VarianceScaling = class extends Initializer {\n constructor(args) {\n super();\n if (args.scale < 0) {\n throw new ValueError(`scale must be a positive float. Got: ${args.scale}`);\n }\n this.scale = args.scale == null ? 1 : args.scale;\n this.mode = args.mode == null ? \"fanIn\" : args.mode;\n checkFanMode(this.mode);\n this.distribution = args.distribution == null ? \"normal\" : args.distribution;\n checkDistribution(this.distribution);\n this.seed = args.seed;\n }\n apply(shape, dtype) {\n const fans = computeFans(shape);\n const fanIn = fans[0];\n const fanOut = fans[1];\n let scale2 = this.scale;\n if (this.mode === \"fanIn\") {\n scale2 /= Math.max(1, fanIn);\n } else if (this.mode === \"fanOut\") {\n scale2 /= Math.max(1, fanOut);\n } else {\n scale2 /= Math.max(1, (fanIn + fanOut) / 2);\n }\n if (this.distribution === \"normal\") {\n const stddev = Math.sqrt(scale2);\n dtype = dtype || \"float32\";\n if (dtype !== \"float32\" && dtype !== \"int32\") {\n throw new NotImplementedError(`${this.getClassName()} does not support dType ${dtype}.`);\n }\n return truncatedNormal(shape, 0, stddev, dtype, this.seed);\n } else {\n const limit = Math.sqrt(3 * scale2);\n return randomUniform(shape, -limit, limit, dtype);\n }\n }\n getConfig() {\n return {\n scale: this.scale,\n mode: this.mode,\n distribution: this.distribution,\n seed: this.seed\n };\n }\n};\nVarianceScaling.className = \"VarianceScaling\";\nserialization_exports.registerClass(VarianceScaling);\nvar GlorotUniform = class extends VarianceScaling {\n constructor(args) {\n super({\n scale: 1,\n mode: \"fanAvg\",\n distribution: \"uniform\",\n seed: args == null ? null : args.seed\n });\n }\n getClassName() {\n return VarianceScaling.className;\n }\n};\nGlorotUniform.className = \"GlorotUniform\";\nserialization_exports.registerClass(GlorotUniform);\nvar GlorotNormal = class extends VarianceScaling {\n constructor(args) {\n super({\n scale: 1,\n mode: \"fanAvg\",\n distribution: \"normal\",\n seed: args == null ? null : args.seed\n });\n }\n getClassName() {\n return VarianceScaling.className;\n }\n};\nGlorotNormal.className = \"GlorotNormal\";\nserialization_exports.registerClass(GlorotNormal);\nvar HeNormal = class extends VarianceScaling {\n constructor(args) {\n super({\n scale: 2,\n mode: \"fanIn\",\n distribution: \"normal\",\n seed: args == null ? null : args.seed\n });\n }\n getClassName() {\n return VarianceScaling.className;\n }\n};\nHeNormal.className = \"HeNormal\";\nserialization_exports.registerClass(HeNormal);\nvar HeUniform = class extends VarianceScaling {\n constructor(args) {\n super({\n scale: 2,\n mode: \"fanIn\",\n distribution: \"uniform\",\n seed: args == null ? null : args.seed\n });\n }\n getClassName() {\n return VarianceScaling.className;\n }\n};\nHeUniform.className = \"HeUniform\";\nserialization_exports.registerClass(HeUniform);\nvar LeCunNormal = class extends VarianceScaling {\n constructor(args) {\n super({\n scale: 1,\n mode: \"fanIn\",\n distribution: \"normal\",\n seed: args == null ? null : args.seed\n });\n }\n getClassName() {\n return VarianceScaling.className;\n }\n};\nLeCunNormal.className = \"LeCunNormal\";\nserialization_exports.registerClass(LeCunNormal);\nvar LeCunUniform = class extends VarianceScaling {\n constructor(args) {\n super({\n scale: 1,\n mode: \"fanIn\",\n distribution: \"uniform\",\n seed: args == null ? null : args.seed\n });\n }\n getClassName() {\n return VarianceScaling.className;\n }\n};\nLeCunUniform.className = \"LeCunNormal\";\nserialization_exports.registerClass(LeCunUniform);\nvar Orthogonal = class extends Initializer {\n constructor(args) {\n super();\n this.DEFAULT_GAIN = 1;\n this.gain = args.gain == null ? this.DEFAULT_GAIN : args.gain;\n this.seed = args.seed;\n if (this.seed != null) {\n throw new NotImplementedError(\"Random seed is not implemented for Orthogonal Initializer yet.\");\n }\n }\n apply(shape, dtype) {\n return tidy(() => {\n if (shape.length < 2) {\n throw new NotImplementedError(\"Shape must be at least 2D.\");\n }\n if (shape[0] * shape[1] > 2e3) {\n console.warn(`Orthogonal initializer is being called on a matrix with more than 2000 (${shape[0] * shape[1]}) elements: Slowness may result.`);\n }\n const normalizedShape = shape[0] > shape[1] ? [shape[1], shape[0]] : shape;\n const a = randomNormal2(normalizedShape, 0, 1, \"float32\");\n let q = linalg.gramSchmidt(a);\n if (shape[0] > shape[1]) {\n q = transpose(q);\n }\n return mul(this.gain, q);\n });\n }\n getConfig() {\n return {\n gain: this.gain,\n seed: this.seed\n };\n }\n};\nOrthogonal.className = \"Orthogonal\";\nserialization_exports.registerClass(Orthogonal);\nvar INITIALIZER_IDENTIFIER_REGISTRY_SYMBOL_MAP = {\n \"constant\": \"Constant\",\n \"glorotNormal\": \"GlorotNormal\",\n \"glorotUniform\": \"GlorotUniform\",\n \"heNormal\": \"HeNormal\",\n \"heUniform\": \"HeUniform\",\n \"identity\": \"Identity\",\n \"leCunNormal\": \"LeCunNormal\",\n \"leCunUniform\": \"LeCunUniform\",\n \"ones\": \"Ones\",\n \"orthogonal\": \"Orthogonal\",\n \"randomNormal\": \"RandomNormal\",\n \"randomUniform\": \"RandomUniform\",\n \"truncatedNormal\": \"TruncatedNormal\",\n \"varianceScaling\": \"VarianceScaling\",\n \"zeros\": \"Zeros\"\n};\nfunction deserializeInitializer(config, customObjects = {}) {\n return deserializeKerasObject(config, serialization_exports.SerializationMap.getMap().classNameMap, customObjects, \"initializer\");\n}\nfunction serializeInitializer(initializer) {\n return serializeKerasObject(initializer);\n}\nfunction getInitializer(identifier) {\n if (typeof identifier === \"string\") {\n const className = identifier in INITIALIZER_IDENTIFIER_REGISTRY_SYMBOL_MAP ? INITIALIZER_IDENTIFIER_REGISTRY_SYMBOL_MAP[identifier] : identifier;\n if (className === \"GlorotNormal\") {\n return new GlorotNormal();\n } else if (className === \"GlorotUniform\") {\n return new GlorotUniform();\n } else if (className === \"HeNormal\") {\n return new HeNormal();\n } else if (className === \"HeUniform\") {\n return new HeUniform();\n } else if (className === \"LeCunNormal\") {\n return new LeCunNormal();\n } else if (className === \"LeCunUniform\") {\n return new LeCunUniform();\n } else {\n const config = {};\n config[\"className\"] = className;\n config[\"config\"] = {};\n return deserializeInitializer(config);\n }\n } else if (identifier instanceof Initializer) {\n return identifier;\n } else {\n return deserializeInitializer(identifier);\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/utils/types_utils.js\nfunction isArrayOfShapes(x) {\n return Array.isArray(x) && Array.isArray(x[0]);\n}\nfunction normalizeShapeList(x) {\n if (x.length === 0) {\n return [];\n }\n if (!Array.isArray(x[0])) {\n return [x];\n }\n return x;\n}\nfunction getExactlyOneTensor(xs) {\n let x;\n if (Array.isArray(xs)) {\n if (xs.length !== 1) {\n throw new ValueError(`Expected Tensor length to be 1; got ${xs.length}`);\n }\n x = xs[0];\n } else {\n x = xs;\n }\n return x;\n}\nfunction getExactlyOneShape(shapes) {\n if (Array.isArray(shapes) && Array.isArray(shapes[0])) {\n if (shapes.length === 1) {\n shapes = shapes;\n return shapes[0];\n } else {\n throw new ValueError(`Expected exactly 1 Shape; got ${shapes.length}`);\n }\n } else {\n return shapes;\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/utils/variable_utils.js\nfunction countParamsInWeights(weights) {\n let count2 = 0;\n for (const weight of weights) {\n if (weight.shape.length === 0) {\n count2 += 1;\n } else {\n count2 += weight.shape.reduce((a, b) => a * b);\n }\n }\n return count2;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/variables.js\nvar DEFAULT_VARIABLE_NAME_PREFIX = \"Variable\";\nvar LayerVariable = class {\n constructor(val, dtype = \"float32\", name = DEFAULT_VARIABLE_NAME_PREFIX, trainable = true, constraint = null) {\n this.dtype = dtype == null ? \"float32\" : dtype;\n this.shape = val.shape;\n this.id = getNextUniqueTensorId();\n name = name == null ? DEFAULT_VARIABLE_NAME_PREFIX : name;\n this.originalName = getScopedTensorName(name);\n this.name = getUniqueTensorName(this.originalName);\n this.trainable_ = trainable;\n this.constraint = constraint;\n this.val = variable(val, this.trainable_, this.name, this.dtype);\n }\n read() {\n this.assertNotDisposed();\n return this.val;\n }\n write(newVal) {\n this.assertNotDisposed();\n checkShapesMatch(this.val, newVal);\n if (this.val.id !== newVal.id) {\n this.val.assign(newVal);\n if (this.constraint != null) {\n this.val.assign(this.constraint.apply(this.val));\n }\n }\n return this;\n }\n dispose() {\n this.assertNotDisposed();\n this.val.dispose();\n }\n assertNotDisposed() {\n if (this.val.isDisposed) {\n throw new Error(`LayersVariable ${this.name} is already disposed.`);\n }\n }\n get trainable() {\n return this.trainable_;\n }\n set trainable(trainable) {\n this.trainable_ = trainable;\n this.val.trainable = trainable;\n }\n};\nfunction checkShapesMatch(x, y) {\n if (x.shape.toString() !== y.shape.toString()) {\n throw new Error(\"Shape mismatch: \" + JSON.stringify(x.shape) + \" vs. \" + JSON.stringify(y.shape));\n }\n}\nfunction batchGetValue(xs) {\n return xs.map((x) => x.read());\n}\nfunction batchSetValue(variablesAndValues) {\n variablesAndValues.forEach((variableAndValue) => {\n const variable2 = variableAndValue[0];\n variable2.write(variableAndValue[1]);\n });\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/engine/topology.js\nvar InputSpec = class {\n constructor(args) {\n this.dtype = args.dtype;\n this.shape = args.shape;\n if (args.shape != null) {\n this.ndim = args.shape.length;\n } else {\n this.ndim = args.ndim;\n }\n this.maxNDim = args.maxNDim;\n this.minNDim = args.minNDim;\n this.axes = args.axes || {};\n }\n};\nvar SymbolicTensor = class {\n constructor(dtype, shape, sourceLayer, inputs, callArgs, name, outputTensorIndex) {\n this.dtype = dtype;\n this.shape = shape;\n this.sourceLayer = sourceLayer;\n this.inputs = inputs;\n this.callArgs = callArgs;\n this.outputTensorIndex = outputTensorIndex;\n this.id = getNextUniqueTensorId();\n if (name != null) {\n this.originalName = getScopedTensorName(name);\n this.name = getUniqueTensorName(this.originalName);\n }\n this.rank = shape.length;\n }\n};\nvar _nextNodeID = 0;\nvar Node = class {\n constructor(args, callArgs) {\n this.callArgs = callArgs;\n this.id = _nextNodeID++;\n this.outboundLayer = args.outboundLayer;\n this.inboundLayers = args.inboundLayers;\n this.nodeIndices = args.nodeIndices;\n this.tensorIndices = args.tensorIndices;\n this.inputTensors = args.inputTensors;\n this.outputTensors = args.outputTensors;\n this.inputMasks = args.inputMasks;\n this.outputMasks = args.outputMasks;\n this.inputShapes = args.inputShapes;\n this.outputShapes = args.outputShapes;\n for (const layer of args.inboundLayers) {\n if (layer != null) {\n layer.outboundNodes.push(this);\n }\n }\n args.outboundLayer.inboundNodes.push(this);\n }\n getConfig() {\n const inboundNames = [];\n for (const layer of this.inboundLayers) {\n if (layer != null) {\n inboundNames.push(layer.name);\n } else {\n inboundNames.push(null);\n }\n }\n return {\n outboundLayer: this.outboundLayer ? this.outboundLayer.name : null,\n inboundLayers: inboundNames,\n nodeIndices: this.nodeIndices,\n tensorIndices: this.tensorIndices\n };\n }\n};\nvar _nextLayerID = 0;\nvar Layer = class extends serialization_exports.Serializable {\n constructor(args = {}) {\n super();\n this._callHook = null;\n this._addedWeightNames = [];\n this._stateful = false;\n this.id = _nextLayerID++;\n this.activityRegularizer = null;\n this.inputSpec = null;\n this.supportsMasking = false;\n this._trainableWeights = [];\n this._nonTrainableWeights = [];\n this._losses = [];\n this._updates = [];\n this._built = false;\n this.inboundNodes = [];\n this.outboundNodes = [];\n let name = args.name;\n if (!name) {\n const prefix = this.getClassName();\n name = toSnakeCase(prefix) + \"_\" + getUid(prefix);\n }\n this.name = name;\n this.trainable_ = args.trainable == null ? true : args.trainable;\n if (args.inputShape != null || args.batchInputShape != null) {\n let batchInputShape;\n if (args.batchInputShape != null) {\n batchInputShape = args.batchInputShape;\n } else if (args.inputShape != null) {\n let batchSize = null;\n if (args.batchSize != null) {\n batchSize = args.batchSize;\n }\n batchInputShape = [batchSize].concat(args.inputShape);\n }\n this.batchInputShape = batchInputShape;\n let dtype = args.dtype;\n if (dtype == null) {\n dtype = args.inputDType;\n }\n if (dtype == null) {\n dtype = \"float32\";\n }\n this.dtype = dtype;\n }\n if (args.weights != null) {\n this.initialWeights = args.weights;\n } else {\n this.initialWeights = null;\n }\n this._refCount = null;\n this.fastWeightInitDuringBuild = false;\n }\n static nodeKey(layer, nodeIndex) {\n return layer.name + \"_ib-\" + nodeIndex.toString();\n }\n getNodeAtIndex(nodeIndex, attrName) {\n if (this.inboundNodes.length === 0) {\n throw new RuntimeError(`The layer has never been called and thus has no defined ${attrName}.`);\n }\n if (this.inboundNodes.length <= nodeIndex) {\n throw new ValueError(`Asked to get ${attrName} at node ${nodeIndex}, but the layer has only ${this.inboundNodes.length} inbound nodes.`);\n }\n return this.inboundNodes[nodeIndex];\n }\n getInputAt(nodeIndex) {\n return singletonOrArray(this.getNodeAtIndex(nodeIndex, \"input\").inputTensors);\n }\n getOutputAt(nodeIndex) {\n return singletonOrArray(this.getNodeAtIndex(nodeIndex, \"output\").outputTensors);\n }\n get input() {\n if (this.inboundNodes.length > 1) {\n throw new AttributeError(`Layer ${this.name} has multiple inbound nodes, hence the notion of \"layer input\" is ill-defined. Use \\`getInputAt(nodeIndex)\\` instead.`);\n } else if (this.inboundNodes.length === 0) {\n throw new AttributeError(`Layer ${this.name} is not connected, no input to return.`);\n }\n return singletonOrArray(this.getNodeAtIndex(0, \"input\").inputTensors);\n }\n get output() {\n if (this.inboundNodes.length === 0) {\n throw new AttributeError(`Layer ${this.name} has no inbound nodes.`);\n }\n if (this.inboundNodes.length > 1) {\n throw new AttributeError(`Layer ${this.name} has multiple inbound nodes, hence the notion of \"layer output\" is ill-defined. Use \\`getOutputAt(nodeIndex)\\` instead.`);\n }\n return singletonOrArray(this.getNodeAtIndex(0, \"output\").outputTensors);\n }\n get losses() {\n return this._losses;\n }\n calculateLosses() {\n return this.losses.map((lossFn) => lossFn());\n }\n get updates() {\n return this._updates;\n }\n get built() {\n return this._built;\n }\n set built(built) {\n this._built = built;\n }\n get trainable() {\n return this.trainable_;\n }\n set trainable(trainable) {\n this._trainableWeights.forEach((w) => w.trainable = trainable);\n this.trainable_ = trainable;\n }\n get trainableWeights() {\n if (this.trainable_) {\n return this._trainableWeights.filter((w) => w.trainable);\n } else {\n return [];\n }\n }\n set trainableWeights(weights) {\n this._trainableWeights = weights;\n }\n get nonTrainableWeights() {\n if (this.trainable) {\n return this._trainableWeights.filter((w) => !w.trainable).concat(this._nonTrainableWeights);\n } else {\n return this._trainableWeights.concat(this._nonTrainableWeights);\n }\n }\n set nonTrainableWeights(weights) {\n this._nonTrainableWeights = weights;\n }\n get weights() {\n return this.trainableWeights.concat(this.nonTrainableWeights);\n }\n get stateful() {\n return this._stateful;\n }\n resetStates() {\n if (!this.stateful) {\n throw new Error(\"Cannot call the resetStates() method of a non-stateful Layer object.\");\n }\n }\n assertInputCompatibility(inputs) {\n inputs = toList(inputs);\n if (this.inputSpec == null || this.inputSpec.length === 0) {\n return;\n }\n const inputSpec = toList(this.inputSpec);\n if (inputs.length !== inputSpec.length) {\n throw new ValueError(`Layer ${this.name} expects ${inputSpec.length} inputs, but it received ${inputs.length} input tensors. Input received: ${inputs}`);\n }\n for (let inputIndex = 0; inputIndex < inputs.length; inputIndex++) {\n const x = inputs[inputIndex];\n const spec = inputSpec[inputIndex];\n if (spec == null) {\n continue;\n }\n const ndim = x.rank;\n if (spec.ndim != null) {\n if (ndim !== spec.ndim) {\n throw new ValueError(`Input ${inputIndex} is incompatible with layer ${this.name}: expected ndim=${spec.ndim}, found ndim=${ndim}`);\n }\n }\n if (spec.maxNDim != null) {\n if (ndim > spec.maxNDim) {\n throw new ValueError(`Input ${inputIndex} is incompatible with layer ${this.name}: expected max_ndim=${spec.maxNDim}, found ndim=${ndim}`);\n }\n }\n if (spec.minNDim != null) {\n if (ndim < spec.minNDim) {\n throw new ValueError(`Input ${inputIndex} is incompatible with layer ${this.name}: expected min_ndim=${spec.minNDim}, found ndim=${ndim}.`);\n }\n }\n if (spec.dtype != null) {\n if (x.dtype !== spec.dtype) {\n throw new ValueError(`Input ${inputIndex} is incompatible with layer ${this.name} : expected dtype=${spec.dtype}, found dtype=${x.dtype}.`);\n }\n }\n if (spec.axes) {\n const xShape = x.shape;\n for (const key in spec.axes) {\n const axis = Number(key);\n const value = spec.axes[key];\n const xShapeAtAxis = axis >= 0 ? xShape[axis] : xShape[xShape.length + axis];\n if (value != null && [value, null].indexOf(xShapeAtAxis) === -1) {\n throw new ValueError(`Input ${inputIndex} is incompatible with layer ${this.name}: expected axis ${axis} of input shape to have value ${value} but got shape ${xShape}.`);\n }\n }\n }\n if (spec.shape != null) {\n for (let i2 = 0; i2 < spec.shape.length; ++i2) {\n const specDim = spec.shape[i2];\n const dim = x.shape[i2];\n if (specDim != null && dim != null) {\n if (specDim !== dim) {\n throw new ValueError(`Input ${inputIndex} is incompatible with layer ${this.name}: expected shape=${spec.shape}, found shape=${x.shape}.`);\n }\n }\n }\n }\n }\n }\n call(inputs, kwargs) {\n return inputs;\n }\n invokeCallHook(inputs, kwargs) {\n if (this._callHook != null) {\n this._callHook(inputs, kwargs);\n }\n }\n setCallHook(callHook) {\n this._callHook = callHook;\n }\n clearCallHook() {\n this._callHook = null;\n }\n apply(inputs, kwargs) {\n kwargs = kwargs || {};\n this.assertNotDisposed();\n const inputsList = toList(inputs);\n let allAreSymbolic = true;\n for (const input2 of inputsList) {\n if (!(input2 instanceof SymbolicTensor)) {\n allAreSymbolic = false;\n break;\n }\n }\n let noneAreSymbolic = true;\n for (const input2 of inputsList) {\n if (input2 instanceof SymbolicTensor) {\n noneAreSymbolic = false;\n break;\n }\n }\n if (allAreSymbolic === noneAreSymbolic) {\n throw new ValueError(\"Arguments to apply() must be all SymbolicTensors or all Tensors\");\n }\n return nameScope(this.name, () => {\n if (!this.built) {\n this.assertInputCompatibility(inputs);\n const inputShapes = [];\n for (const xElem of toList(inputs)) {\n inputShapes.push(xElem.shape);\n }\n this.build(singletonOrArray(inputShapes));\n this.built = true;\n if (this.initialWeights) {\n this.setWeights(this.initialWeights);\n }\n if (this._refCount === null && noneAreSymbolic) {\n this._refCount = 1;\n }\n }\n this.assertInputCompatibility(inputs);\n if (noneAreSymbolic) {\n let output = this.call(inputs, kwargs);\n const outputList = toList(output);\n const outputListCopy = [];\n for (let x of outputList) {\n if (inputsList.indexOf(x) !== -1) {\n x = x.clone();\n }\n outputListCopy.push(x);\n }\n output = singletonOrArray(outputListCopy);\n if (this.activityRegularizer != null) {\n throw new NotImplementedError(\"Layer invocation in the presence of activity regularizer(s) is not supported yet.\");\n }\n return output;\n } else {\n const inputShape = collectInputShape(inputs);\n const outputShape = this.computeOutputShape(inputShape);\n let output;\n const outputDType = guessOutputDType(inputs);\n this.warnOnIncompatibleInputShape(Array.isArray(inputs) ? inputShape[0] : inputShape);\n if (outputShape != null && outputShape.length > 0 && Array.isArray(outputShape[0])) {\n output = outputShape.map((shape, index) => new SymbolicTensor(outputDType, shape, this, toList(inputs), kwargs, this.name, index));\n } else {\n output = new SymbolicTensor(outputDType, outputShape, this, toList(inputs), kwargs, this.name);\n }\n this.addInboundNode(inputs, output, null, null, inputShape, outputShape, kwargs);\n this._refCount++;\n if (this.activityRegularizer != null) {\n throw new NotImplementedError(\"Layer invocation in the presence of activity regularizer(s) is not supported yet.\");\n }\n return output;\n }\n });\n }\n warnOnIncompatibleInputShape(inputShape) {\n if (this.batchInputShape == null) {\n return;\n } else if (inputShape.length !== this.batchInputShape.length) {\n console.warn(`The rank of the input tensor provided (shape: ${JSON.stringify(inputShape)}) does not match that of the batchInputShape (${JSON.stringify(this.batchInputShape)}) of the layer ${this.name}`);\n } else {\n let dimMismatch = false;\n this.batchInputShape.forEach((dimension, i2) => {\n if (dimension != null && inputShape[i2] != null && inputShape[i2] !== dimension) {\n dimMismatch = true;\n }\n });\n if (dimMismatch) {\n console.warn(`The shape of the input tensor (${JSON.stringify(inputShape)}) does not match the expectation of layer ${this.name}: ${JSON.stringify(this.batchInputShape)}`);\n }\n }\n }\n get outputShape() {\n if (this.inboundNodes == null || this.inboundNodes.length === 0) {\n throw new AttributeError(`The layer ${this.name} has never been called and thus has no defined output shape.`);\n }\n const allOutputShapes = [];\n for (const node of this.inboundNodes) {\n const shapeString = JSON.stringify(node.outputShapes);\n if (allOutputShapes.indexOf(shapeString) === -1) {\n allOutputShapes.push(shapeString);\n }\n }\n if (allOutputShapes.length === 1) {\n const outputShapes = this.inboundNodes[0].outputShapes;\n if (Array.isArray(outputShapes) && Array.isArray(outputShapes[0]) && outputShapes.length === 1) {\n return outputShapes[0];\n } else {\n return outputShapes;\n }\n } else {\n throw new AttributeError(`The layer ${this.name} has multiple inbound nodes with different output shapes. Hence the notion of \"output shape\" is ill-defined for the layer.`);\n }\n }\n countParams() {\n if (!this.built) {\n throw new RuntimeError(`You tried to call countParams() on ${this.name}, but the layer is not built yet. Build it first by calling build(batchInputShape).`);\n }\n return countParamsInWeights(this.weights);\n }\n build(inputShape) {\n this.built = true;\n }\n getWeights(trainableOnly = false) {\n return batchGetValue(trainableOnly ? this.trainableWeights : this.weights);\n }\n setWeights(weights) {\n tidy(() => {\n const params = this.weights;\n if (params.length !== weights.length) {\n throw new ValueError(`You called setWeights(weights) on layer \"${this.name}\" with a weight list of length ${weights.length}, but the layer was expecting ${params.length} weights. Provided weights: ${weights}...`);\n }\n if (params.length === 0) {\n return;\n }\n const weightValueTuples = [];\n const paramValues = batchGetValue(params);\n for (let i2 = 0; i2 < paramValues.length; ++i2) {\n const pv = paramValues[i2];\n const p2 = params[i2];\n const w = weights[i2];\n if (!util_exports.arraysEqual(pv.shape, w.shape)) {\n throw new ValueError(`Layer weight shape ${pv.shape} not compatible with provided weight shape ${w.shape}`);\n }\n weightValueTuples.push([p2, w]);\n }\n batchSetValue(weightValueTuples);\n });\n }\n addWeight(name, shape, dtype, initializer, regularizer, trainable, constraint, getInitializerFunc) {\n if (this._addedWeightNames.indexOf(name) !== -1) {\n throw new ValueError(`Duplicate weight name ${name} for layer ${this.name}`);\n }\n this._addedWeightNames.push(name);\n if (dtype == null) {\n dtype = \"float32\";\n }\n if (this.fastWeightInitDuringBuild) {\n initializer = getInitializerFunc != null ? getInitializerFunc() : getInitializer(\"zeros\");\n }\n const initValue = initializer.apply(shape, dtype);\n const weight = new LayerVariable(initValue, dtype, name, trainable, constraint);\n initValue.dispose();\n if (regularizer != null) {\n this.addLoss(() => regularizer.apply(weight.read()));\n }\n if (trainable == null) {\n trainable = true;\n }\n if (trainable) {\n this._trainableWeights.push(weight);\n } else {\n this._nonTrainableWeights.push(weight);\n }\n return weight;\n }\n setFastWeightInitDuringBuild(value) {\n this.fastWeightInitDuringBuild = value;\n }\n addLoss(losses2) {\n if (losses2 == null || Array.isArray(losses2) && losses2.length === 0) {\n return;\n }\n losses2 = toList(losses2);\n if (this._losses !== void 0 && this._losses !== null) {\n this.losses.push(...losses2);\n }\n }\n computeOutputShape(inputShape) {\n return inputShape;\n }\n computeMask(inputs, mask) {\n if (!this.supportsMasking) {\n if (mask != null) {\n if (Array.isArray(mask)) {\n mask.forEach((maskElement) => {\n if (maskElement != null) {\n throw new TypeError(`Layer ${this.name} does not support masking, but was passed an inputMask.`);\n }\n });\n } else {\n throw new TypeError(`Layer ${this.name} does not support masking, but was passed an inputMask.`);\n }\n }\n return null;\n }\n return mask;\n }\n addInboundNode(inputTensors, outputTensors, inputMasks, outputMasks, inputShapes, outputShapes, kwargs = null) {\n const inputTensorList = toList(inputTensors);\n outputTensors = toList(outputTensors);\n inputMasks = toList(inputMasks);\n outputMasks = toList(outputMasks);\n inputShapes = normalizeShapeList(inputShapes);\n outputShapes = normalizeShapeList(outputShapes);\n const inboundLayers = [];\n const nodeIndices = [];\n const tensorIndices = [];\n for (const x of inputTensorList) {\n inboundLayers.push(x.sourceLayer);\n nodeIndices.push(x.nodeIndex);\n tensorIndices.push(x.tensorIndex);\n }\n new Node({\n outboundLayer: this,\n inboundLayers,\n nodeIndices,\n tensorIndices,\n inputTensors: inputTensorList,\n outputTensors,\n inputMasks,\n outputMasks,\n inputShapes,\n outputShapes\n }, kwargs);\n for (let i2 = 0; i2 < outputTensors.length; i2++) {\n outputTensors[i2].sourceLayer = this;\n outputTensors[i2].nodeIndex = this.inboundNodes.length - 1;\n outputTensors[i2].tensorIndex = i2;\n }\n }\n getConfig() {\n const config = { name: this.name, trainable: this.trainable };\n if (this.batchInputShape != null) {\n config[\"batchInputShape\"] = this.batchInputShape;\n }\n if (this.dtype != null) {\n config[\"dtype\"] = this.dtype;\n }\n return config;\n }\n disposeWeights() {\n this.weights.forEach((weight) => weight.dispose());\n return this.weights.length;\n }\n assertNotDisposed() {\n if (this._refCount === 0) {\n throw new Error(`Layer '${this.name}' is already disposed.`);\n }\n }\n dispose() {\n if (!this.built) {\n throw new Error(`Cannot dispose Layer ${this.name} because it has not been built yet.`);\n }\n if (this._refCount === null) {\n throw new Error(`Cannot dispose Layer ${this.name} because it has not been used yet.`);\n }\n this.assertNotDisposed();\n let numDisposedVariables = 0;\n if (--this._refCount === 0) {\n numDisposedVariables = this.disposeWeights();\n }\n return { refCountAfterDispose: this._refCount, numDisposedVariables };\n }\n};\nfunction collectInputShape(inputTensors) {\n inputTensors = toList(inputTensors);\n const shapes = [];\n for (const x of inputTensors) {\n shapes.push(x.shape);\n }\n return singletonOrArray(shapes);\n}\nfunction guessOutputDType(inputTensors) {\n return \"float32\";\n}\nfunction getSourceInputs(tensor2, layer, nodeIndex) {\n if (layer == null || nodeIndex != null && nodeIndex > 0) {\n layer = tensor2.sourceLayer;\n nodeIndex = tensor2.nodeIndex;\n }\n if (layer.inboundNodes.length === 0) {\n return [tensor2];\n } else {\n const node = layer.inboundNodes[nodeIndex];\n if (node.inboundLayers.length === 0) {\n return node.inputTensors;\n } else {\n const sourceTensors = [];\n for (let i2 = 0; i2 < node.inboundLayers.length; i2++) {\n const x = node.inputTensors[i2];\n const layer2 = node.inboundLayers[i2];\n const nodeIndex2 = node.nodeIndices[i2];\n const previousSources = getSourceInputs(x, layer2, nodeIndex2);\n for (const x2 of previousSources) {\n if (sourceTensors.indexOf(x2) === -1) {\n sourceTensors.push(x2);\n }\n }\n }\n return sourceTensors;\n }\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/engine/input_layer.js\nvar InputLayer = class extends Layer {\n constructor(args) {\n super({\n dtype: args.dtype,\n name: args.name != null ? args.name : getUid(\"input\").toString()\n });\n if (args.batchSize == null) {\n args.batchSize = null;\n }\n if (args.sparse == null) {\n args.sparse = false;\n }\n this.trainable = false;\n this.built = true;\n this.sparse = args.sparse;\n if (args.inputShape != null && args.batchInputShape != null) {\n throw new ValueError(\"Only provide the inputShape OR batchInputShape argument to inputLayer, not both at the same time.\");\n }\n let batchInputShape = args.batchInputShape;\n if (batchInputShape == null) {\n if (args.inputShape == null) {\n throw new ValueError(\"An InputLayer should be passed either a `batchInputShape` or an `inputShape`.\");\n } else {\n batchInputShape = [args.batchSize].concat(args.inputShape);\n }\n } else {\n if (args.batchSize != null) {\n throw new ValueError(\"Cannot specify batchSize if batchInputShape is specified when creating an InputLayer.\");\n }\n }\n const dtype = args.dtype || \"float32\";\n this.batchInputShape = batchInputShape;\n this.dtype = dtype;\n this.inputSpec = [{ shape: batchInputShape }];\n const inputTensor = new SymbolicTensor(this.dtype, this.batchInputShape, this, [], {}, this.name);\n inputTensor.nodeIndex = 0;\n inputTensor.tensorIndex = 0;\n new Node({\n outboundLayer: this,\n inboundLayers: [],\n nodeIndices: [],\n tensorIndices: [],\n inputTensors: [inputTensor],\n outputTensors: [inputTensor],\n inputMasks: [null],\n outputMasks: [null],\n inputShapes: [batchInputShape],\n outputShapes: [batchInputShape]\n });\n }\n apply(inputs, kwargs) {\n throw new ValueError(`Cannot pass any input to an InputLayer's apply() method. InputLayer name: ${this.name}`);\n }\n dispose() {\n return { refCountAfterDispose: this._refCount, numDisposedVariables: 0 };\n }\n getConfig() {\n return {\n batchInputShape: this.batchInputShape,\n dtype: this.dtype,\n sparse: this.sparse,\n name: this.name\n };\n }\n};\nInputLayer.className = \"InputLayer\";\nserialization_exports.registerClass(InputLayer);\nfunction Input(config) {\n if (config.batchShape == null && config.shape == null) {\n throw new Error(\"Please provide to Input either a `shape` or a `batchShape` argument. Note that `shape` does not include the batch dimension.\");\n }\n if (config.batchShape != null && config.shape != null) {\n throw new ValueError(\"Please provide either a `shape` or `batchShape` argument to Input, but not both.\");\n }\n let batchShape = config.batchShape;\n if (config.shape != null && batchShape == null) {\n batchShape = [null].concat(config.shape);\n }\n let dtype = config.dtype;\n if (dtype == null) {\n dtype = \"float32\";\n }\n const inputLayer2 = new InputLayer({\n batchInputShape: batchShape,\n name: config.name,\n dtype,\n sparse: config.sparse\n });\n const outputs = inputLayer2.inboundNodes[0].outputTensors;\n return outputs[0];\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/engine/executor.js\nfunction assertFeedCompatibility(key, val) {\n if (key.dtype == null || key.dtype === val.dtype) {\n return val;\n }\n try {\n return cast(val, key.dtype);\n } catch (err) {\n throw new ValueError(`The dtype of the feed (${val.dtype}) can not be cast to the dtype of the key '${key.name}' (${key.dtype}).`);\n }\n}\nvar FeedDict = class {\n constructor(feeds) {\n this.id2Value = {};\n this.id2Mask = {};\n this.name2Id = {};\n if (feeds instanceof FeedDict) {\n for (const id in feeds.id2Value) {\n this.id2Value[id] = feeds.id2Value[id];\n if (id in feeds.id2Mask) {\n this.id2Mask[id] = feeds.id2Mask[id];\n }\n }\n } else {\n if (feeds == null) {\n return;\n }\n for (const feed of feeds) {\n this.add(feed.key, feed.value);\n }\n }\n }\n add(key, value, mask) {\n if (this.id2Value[key.id] == null) {\n this.id2Value[key.id] = assertFeedCompatibility(key, value);\n this.name2Id[key.name] = key.id;\n if (mask != null) {\n this.id2Mask[key.id] = mask;\n }\n } else {\n throw new ValueError(`Duplicate key: name=${key.name}, id=${key.id}`);\n }\n return this;\n }\n addFeed(feed) {\n this.add(feed.key, feed.value);\n }\n hasKey(key) {\n return this.id2Value[key.id] != null;\n }\n names() {\n return Object.keys(this.name2Id);\n }\n getValue(key) {\n if (key instanceof SymbolicTensor) {\n if (this.id2Value[key.id] == null) {\n throw new ValueError(`Nonexistent key: ${key.name}`);\n } else {\n return this.id2Value[key.id];\n }\n } else {\n const id = this.name2Id[key];\n if (id == null) {\n throw new ValueError(`Feed dict has no SymbolicTensor name: ${key}`);\n }\n return this.id2Value[id];\n }\n }\n getMask(key) {\n if (key instanceof SymbolicTensor) {\n if (this.id2Value[key.id] == null) {\n throw new ValueError(`Nonexistent key: ${key.name}`);\n } else {\n return this.id2Mask[key.id];\n }\n } else {\n const id = this.name2Id[key];\n if (id == null) {\n throw new ValueError(`Feed dict has no SymbolicTensor name: ${key}`);\n }\n return this.id2Mask[id];\n }\n }\n disposeMasks() {\n if (this.id2Mask != null) {\n dispose(this.id2Mask);\n }\n }\n};\nvar cachedSorted = new LruCache();\nvar cachedRecipientCounts = new LruCache();\nfunction updateCacheMaxEntries(maxEntries) {\n if (cachedSorted != null) {\n cachedSorted.setMaxEntries(maxEntries);\n }\n if (cachedRecipientCounts != null) {\n cachedRecipientCounts.setMaxEntries(maxEntries);\n }\n}\nfunction execute(fetches, feedDict, kwargs, probe) {\n const training = kwargs == null ? false : kwargs[\"training\"];\n const arrayFetches = Array.isArray(fetches);\n const fetchArray = arrayFetches ? fetches : [fetches];\n const outputNames = fetchArray.map((t2) => t2.name);\n const finalOutputs = [];\n const feedNames = feedDict.names();\n for (const outputName of outputNames) {\n if (feedNames.indexOf(outputName) !== -1) {\n finalOutputs.push(feedDict.getValue(outputName));\n } else {\n finalOutputs.push(null);\n }\n }\n if (probe != null) {\n probe.maxNumTensors = -Infinity;\n probe.minNumTensors = Infinity;\n }\n const fetchAndFeedKey = outputNames.join(\",\") + \"|\" + feedDict.names().sort().join(\",\");\n let sorted = cachedSorted.get(fetchAndFeedKey);\n let recipientCounts;\n if (sorted == null) {\n const out = getTopologicalSortAndRecipientCounts(fetchArray, feedDict);\n sorted = out.sorted;\n recipientCounts = out.recipientCounts;\n cachedSorted.put(fetchAndFeedKey, sorted);\n cachedRecipientCounts.put(fetchAndFeedKey, recipientCounts);\n }\n recipientCounts = {};\n if (!training) {\n Object.assign(recipientCounts, cachedRecipientCounts.get(fetchAndFeedKey));\n }\n const internalFeedDict = new FeedDict(feedDict);\n for (let i2 = 0; i2 < sorted.length; ++i2) {\n if (probe != null) {\n const numTensors = memory().numTensors;\n if (numTensors > probe.maxNumTensors) {\n probe.maxNumTensors = numTensors;\n }\n if (numTensors < probe.minNumTensors) {\n probe.minNumTensors = numTensors;\n }\n }\n const symbolic = sorted[i2];\n const srcLayer = symbolic.sourceLayer;\n if (srcLayer instanceof InputLayer) {\n continue;\n }\n const inputValues = [];\n const inputMasks = [];\n const tensorsToDispose = [];\n let maskExists = false;\n for (const input2 of symbolic.inputs) {\n const value = internalFeedDict.getValue(input2);\n const mask = internalFeedDict.getMask(input2);\n inputValues.push(value);\n inputMasks.push(mask);\n if (mask != null) {\n maskExists = true;\n }\n if (!training) {\n recipientCounts[input2.name]--;\n if (recipientCounts[input2.name] === 0 && !feedDict.hasKey(input2) && outputNames.indexOf(input2.name) === -1 && !value.isDisposed && input2.sourceLayer.stateful !== true) {\n tensorsToDispose.push(value);\n }\n }\n }\n if (maskExists) {\n kwargs = kwargs || {};\n kwargs[\"mask\"] = inputMasks[0];\n }\n const outputTensors = toList(srcLayer.apply(inputValues, kwargs));\n let outputMask = null;\n if (srcLayer.supportsMasking) {\n outputMask = srcLayer.computeMask(inputValues, inputMasks);\n }\n const layerOutputs = getNodeOutputs(symbolic);\n const outputSymbolicTensors = Array.isArray(layerOutputs) ? layerOutputs : [layerOutputs];\n for (let i3 = 0; i3 < outputSymbolicTensors.length; ++i3) {\n if (!internalFeedDict.hasKey(outputSymbolicTensors[i3])) {\n internalFeedDict.add(outputSymbolicTensors[i3], outputTensors[i3], Array.isArray(outputMask) ? outputMask[0] : outputMask);\n }\n const index = outputNames.indexOf(outputSymbolicTensors[i3].name);\n if (index !== -1) {\n finalOutputs[index] = outputTensors[i3];\n }\n }\n if (!training) {\n dispose(tensorsToDispose);\n }\n }\n internalFeedDict.disposeMasks();\n return arrayFetches ? finalOutputs : finalOutputs[0];\n}\nfunction getTopologicalSortAndRecipientCounts(fetches, feedDict) {\n util_exports.assert(fetches != null && fetches.length > 0, () => `Expected at least one fetch, got none`);\n let finalSorted = [];\n let finalRecipientMap = {};\n if (fetches.length === 1) {\n const out = getTopologicalSortAndRecipientCountsForOneFetch(fetches[0], feedDict);\n finalSorted = out.sorted;\n finalRecipientMap = out.recipientMap;\n } else {\n const visited = /* @__PURE__ */ new Set();\n for (const fetch4 of fetches) {\n const { sorted, recipientMap } = getTopologicalSortAndRecipientCountsForOneFetch(fetch4, feedDict);\n for (const symbolicTensor of sorted) {\n if (!visited.has(symbolicTensor.name)) {\n finalSorted.push(symbolicTensor);\n visited.add(symbolicTensor.name);\n }\n }\n for (const name in recipientMap) {\n if (finalRecipientMap[name] == null) {\n finalRecipientMap[name] = /* @__PURE__ */ new Set();\n }\n recipientMap[name].forEach((recipient) => finalRecipientMap[name].add(recipient));\n }\n }\n }\n return {\n sorted: finalSorted,\n recipientCounts: recipientMap2Counts(finalRecipientMap)\n };\n}\nfunction recipientMap2Counts(recipientMap) {\n const recipientCounts = {};\n for (const name in recipientMap) {\n recipientCounts[name] = recipientMap[name].size;\n }\n return recipientCounts;\n}\nfunction getTopologicalSortAndRecipientCountsForOneFetch(fetch4, feedDict) {\n const visited = /* @__PURE__ */ new Set();\n const sorted = [];\n const recipientMap = {};\n for (const key of feedDict.names()) {\n visited.add(key);\n }\n const stack2 = [];\n const marks = [];\n stack2.push(fetch4);\n while (stack2.length > 0) {\n const top = stack2[stack2.length - 1];\n if (visited.has(top.name)) {\n stack2.pop();\n continue;\n }\n const topIsMarked = marks[marks.length - 1] === stack2.length - 1;\n if (top.inputs.length === 0 || topIsMarked) {\n stack2.pop();\n sorted.push(top);\n visited.add(top.name);\n if (topIsMarked) {\n marks.pop();\n }\n } else {\n marks.push(stack2.length - 1);\n for (const input2 of top.inputs) {\n if (recipientMap[input2.name] == null) {\n recipientMap[input2.name] = /* @__PURE__ */ new Set();\n }\n recipientMap[input2.name].add(top.name);\n if (visited.has(input2.name)) {\n continue;\n }\n stack2.push(input2);\n }\n }\n }\n return { sorted, recipientMap };\n}\nfunction getNodeOutputs(fetch4) {\n let layerOutputs;\n if (fetch4.sourceLayer.inboundNodes.length === 1) {\n layerOutputs = fetch4.sourceLayer.output;\n } else {\n let nodeIndex = null;\n for (let i2 = 0; i2 < fetch4.sourceLayer.inboundNodes.length; ++i2) {\n for (const outputTensor of fetch4.sourceLayer.inboundNodes[i2].outputTensors) {\n if (outputTensor.id === fetch4.id) {\n nodeIndex = i2;\n break;\n }\n }\n }\n layerOutputs = fetch4.sourceLayer.getOutputAt(nodeIndex);\n }\n return layerOutputs;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/flags_layers.js\nvar ENV3 = env();\nENV3.registerFlag(\"TOPOLOGICAL_SORT_CACHE_MAX_ENTRIES\", () => 100, updateCacheMaxEntries);\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/exports_constraints.js\nvar exports_constraints_exports = {};\n__export(exports_constraints_exports, {\n maxNorm: () => maxNorm,\n minMaxNorm: () => minMaxNorm,\n nonNeg: () => nonNeg,\n unitNorm: () => unitNorm\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/constraints.js\nfunction calcL2Norms(w, axis) {\n return tidy(() => sqrt(sum2(mul(w, w), axis, true)));\n}\nvar Constraint = class extends serialization_exports.Serializable {\n getConfig() {\n return {};\n }\n};\nvar MaxNorm = class extends Constraint {\n constructor(args) {\n super();\n this.defaultMaxValue = 2;\n this.defaultAxis = 0;\n this.maxValue = args.maxValue != null ? args.maxValue : this.defaultMaxValue;\n this.axis = args.axis != null ? args.axis : this.defaultAxis;\n }\n apply(w) {\n return tidy(() => {\n const norms = calcL2Norms(w, this.axis);\n const desired = clipByValue(norms, 0, this.maxValue);\n return mul(w, div(desired, add2(epsilon(), norms)));\n });\n }\n getConfig() {\n return { maxValue: this.maxValue, axis: this.axis };\n }\n};\nMaxNorm.className = \"MaxNorm\";\nserialization_exports.registerClass(MaxNorm);\nvar UnitNorm = class extends Constraint {\n constructor(args) {\n super();\n this.defaultAxis = 0;\n this.axis = args.axis != null ? args.axis : this.defaultAxis;\n }\n apply(w) {\n return tidy(() => div(w, add2(epsilon(), calcL2Norms(w, this.axis))));\n }\n getConfig() {\n return { axis: this.axis };\n }\n};\nUnitNorm.className = \"UnitNorm\";\nserialization_exports.registerClass(UnitNorm);\nvar NonNeg = class extends Constraint {\n apply(w) {\n return relu(w);\n }\n};\nNonNeg.className = \"NonNeg\";\nserialization_exports.registerClass(NonNeg);\nvar MinMaxNorm = class extends Constraint {\n constructor(args) {\n super();\n this.defaultMinValue = 0;\n this.defaultMaxValue = 1;\n this.defaultRate = 1;\n this.defaultAxis = 0;\n this.minValue = args.minValue != null ? args.minValue : this.defaultMinValue;\n this.maxValue = args.maxValue != null ? args.maxValue : this.defaultMaxValue;\n this.rate = args.rate != null ? args.rate : this.defaultRate;\n this.axis = args.axis != null ? args.axis : this.defaultAxis;\n }\n apply(w) {\n return tidy(() => {\n const norms = calcL2Norms(w, this.axis);\n const desired = add2(mul(this.rate, clipByValue(norms, this.minValue, this.maxValue)), mul(1 - this.rate, norms));\n return mul(w, div(desired, add2(epsilon(), norms)));\n });\n }\n getConfig() {\n return {\n minValue: this.minValue,\n maxValue: this.maxValue,\n rate: this.rate,\n axis: this.axis\n };\n }\n};\nMinMaxNorm.className = \"MinMaxNorm\";\nserialization_exports.registerClass(MinMaxNorm);\nvar CONSTRAINT_IDENTIFIER_REGISTRY_SYMBOL_MAP = {\n \"maxNorm\": \"MaxNorm\",\n \"minMaxNorm\": \"MinMaxNorm\",\n \"nonNeg\": \"NonNeg\",\n \"unitNorm\": \"UnitNorm\"\n};\nfunction serializeConstraint(constraint) {\n return serializeKerasObject(constraint);\n}\nfunction deserializeConstraint(config, customObjects = {}) {\n return deserializeKerasObject(config, serialization_exports.SerializationMap.getMap().classNameMap, customObjects, \"constraint\");\n}\nfunction getConstraint(identifier) {\n if (identifier == null) {\n return null;\n }\n if (typeof identifier === \"string\") {\n const className = identifier in CONSTRAINT_IDENTIFIER_REGISTRY_SYMBOL_MAP ? CONSTRAINT_IDENTIFIER_REGISTRY_SYMBOL_MAP[identifier] : identifier;\n const config = { className, config: {} };\n return deserializeConstraint(config);\n } else if (identifier instanceof Constraint) {\n return identifier;\n } else {\n return deserializeConstraint(identifier);\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/exports_constraints.js\nfunction maxNorm(args) {\n return new MaxNorm(args);\n}\nfunction unitNorm(args) {\n return new UnitNorm(args);\n}\nfunction nonNeg() {\n return new NonNeg();\n}\nfunction minMaxNorm(config) {\n return new MinMaxNorm(config);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/exports_initializers.js\nvar exports_initializers_exports = {};\n__export(exports_initializers_exports, {\n constant: () => constant,\n glorotNormal: () => glorotNormal,\n glorotUniform: () => glorotUniform,\n heNormal: () => heNormal,\n heUniform: () => heUniform,\n identity: () => identity,\n leCunNormal: () => leCunNormal,\n leCunUniform: () => leCunUniform,\n ones: () => ones3,\n orthogonal: () => orthogonal,\n randomNormal: () => randomNormal3,\n randomUniform: () => randomUniform2,\n truncatedNormal: () => truncatedNormal2,\n varianceScaling: () => varianceScaling,\n zeros: () => zeros2\n});\nfunction zeros2() {\n return new Zeros();\n}\nfunction ones3() {\n return new Ones();\n}\nfunction constant(args) {\n return new Constant(args);\n}\nfunction randomUniform2(args) {\n return new RandomUniform(args);\n}\nfunction randomNormal3(args) {\n return new RandomNormal(args);\n}\nfunction truncatedNormal2(args) {\n return new TruncatedNormal(args);\n}\nfunction identity(args) {\n return new Identity2(args);\n}\nfunction varianceScaling(config) {\n return new VarianceScaling(config);\n}\nfunction glorotUniform(args) {\n return new GlorotUniform(args);\n}\nfunction glorotNormal(args) {\n return new GlorotNormal(args);\n}\nfunction heNormal(args) {\n return new HeNormal(args);\n}\nfunction heUniform(args) {\n return new HeUniform(args);\n}\nfunction leCunNormal(args) {\n return new LeCunNormal(args);\n}\nfunction leCunUniform(args) {\n return new LeCunUniform(args);\n}\nfunction orthogonal(args) {\n return new Orthogonal(args);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/exports_layers.js\nvar exports_layers_exports = {};\n__export(exports_layers_exports, {\n Layer: () => Layer,\n RNN: () => RNN,\n RNNCell: () => RNNCell,\n activation: () => activation,\n add: () => add3,\n alphaDropout: () => alphaDropout,\n average: () => average,\n averagePooling1d: () => averagePooling1d,\n averagePooling2d: () => averagePooling2d,\n averagePooling3d: () => averagePooling3d,\n avgPool1d: () => avgPool1d,\n avgPool2d: () => avgPool2d,\n avgPool3d: () => avgPool3d2,\n avgPooling1d: () => avgPooling1d,\n avgPooling2d: () => avgPooling2d,\n avgPooling3d: () => avgPooling3d,\n batchNormalization: () => batchNormalization2,\n bidirectional: () => bidirectional,\n concatenate: () => concatenate2,\n conv1d: () => conv1d2,\n conv2d: () => conv2d3,\n conv2dTranspose: () => conv2dTranspose2,\n conv3d: () => conv3d2,\n conv3dTranspose: () => conv3dTranspose2,\n convLstm2d: () => convLstm2d,\n convLstm2dCell: () => convLstm2dCell,\n cropping2D: () => cropping2D,\n dense: () => dense,\n depthwiseConv2d: () => depthwiseConv2d4,\n dot: () => dot3,\n dropout: () => dropout3,\n elu: () => elu3,\n embedding: () => embedding,\n flatten: () => flatten3,\n gaussianDropout: () => gaussianDropout,\n gaussianNoise: () => gaussianNoise,\n globalAveragePooling1d: () => globalAveragePooling1d,\n globalAveragePooling2d: () => globalAveragePooling2d,\n globalMaxPool1d: () => globalMaxPool1d,\n globalMaxPool2d: () => globalMaxPool2d,\n globalMaxPooling1d: () => globalMaxPooling1d,\n globalMaxPooling2d: () => globalMaxPooling2d,\n gru: () => gru,\n gruCell: () => gruCell,\n input: () => input,\n inputLayer: () => inputLayer,\n layerNormalization: () => layerNormalization,\n leakyReLU: () => leakyReLU,\n lstm: () => lstm,\n lstmCell: () => lstmCell,\n masking: () => masking,\n maxPool1d: () => maxPool1d,\n maxPool2d: () => maxPool2d,\n maxPooling1d: () => maxPooling1d,\n maxPooling2d: () => maxPooling2d,\n maxPooling3d: () => maxPooling3d,\n maximum: () => maximum2,\n minimum: () => minimum2,\n multiply: () => multiply,\n permute: () => permute,\n prelu: () => prelu2,\n reLU: () => reLU,\n repeatVector: () => repeatVector,\n rescaling: () => rescaling,\n reshape: () => reshape2,\n rnn: () => rnn2,\n separableConv2d: () => separableConv2d2,\n simpleRNN: () => simpleRNN,\n simpleRNNCell: () => simpleRNNCell,\n softmax: () => softmax2,\n spatialDropout1d: () => spatialDropout1d,\n stackedRNNCells: () => stackedRNNCells,\n thresholdedReLU: () => thresholdedReLU,\n timeDistributed: () => timeDistributed,\n upSampling2d: () => upSampling2d,\n zeroPadding2d: () => zeroPadding2d\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/logs.js\nasync function resolveScalarsInLogs(logs) {\n if (logs == null) {\n return;\n }\n const promises = [];\n const keys = [];\n const scalarsToDispose = [];\n for (const key in logs) {\n const value = logs[key];\n if (typeof value !== \"number\") {\n const valueScalar = value;\n promises.push(valueScalar.data());\n keys.push(key);\n scalarsToDispose.push(valueScalar);\n }\n }\n if (promises.length > 0) {\n const values = await Promise.all(promises);\n for (let i2 = 0; i2 < values.length; ++i2) {\n logs[keys[i2]] = values[i2][0];\n }\n dispose(scalarsToDispose);\n }\n}\nfunction disposeTensorsInLogs(logs) {\n if (logs == null) {\n return;\n }\n for (const key in logs) {\n const value = logs[key];\n if (typeof value !== \"number\") {\n value.dispose();\n }\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/base_callbacks.js\nvar ModelLoggingVerbosity;\n(function(ModelLoggingVerbosity2) {\n ModelLoggingVerbosity2[ModelLoggingVerbosity2[\"SILENT\"] = 0] = \"SILENT\";\n ModelLoggingVerbosity2[ModelLoggingVerbosity2[\"VERBOSE\"] = 1] = \"VERBOSE\";\n})(ModelLoggingVerbosity || (ModelLoggingVerbosity = {}));\nvar DEFAULT_YIELD_EVERY_MS = 125;\nvar BaseCallback = class {\n constructor() {\n this.validationData = null;\n }\n setParams(params) {\n this.params = params;\n }\n async onEpochBegin(epoch, logs) {\n }\n async onEpochEnd(epoch, logs) {\n }\n async onBatchBegin(batch, logs) {\n }\n async onBatchEnd(batch, logs) {\n }\n async onTrainBegin(logs) {\n }\n async onTrainEnd(logs) {\n }\n setModel(model2) {\n }\n};\nvar CallbackList = class {\n constructor(callbacks2, queueLength = 10) {\n if (callbacks2 == null) {\n callbacks2 = [];\n }\n this.callbacks = callbacks2;\n this.queueLength = queueLength;\n }\n append(callback) {\n this.callbacks.push(callback);\n }\n setParams(params) {\n for (const callback of this.callbacks) {\n callback.setParams(params);\n }\n }\n setModel(model2) {\n for (const callback of this.callbacks) {\n callback.setModel(model2);\n }\n }\n async onEpochBegin(epoch, logs) {\n if (logs == null) {\n logs = {};\n }\n for (const callback of this.callbacks) {\n await callback.onEpochBegin(epoch, logs);\n }\n }\n async onEpochEnd(epoch, logs) {\n if (logs == null) {\n logs = {};\n }\n for (const callback of this.callbacks) {\n await callback.onEpochEnd(epoch, logs);\n }\n }\n async onBatchBegin(batch, logs) {\n if (logs == null) {\n logs = {};\n }\n for (const callback of this.callbacks) {\n await callback.onBatchBegin(batch, logs);\n }\n }\n async onBatchEnd(batch, logs) {\n if (logs == null) {\n logs = {};\n }\n for (const callback of this.callbacks) {\n await callback.onBatchEnd(batch, logs);\n }\n }\n async onTrainBegin(logs) {\n if (logs == null) {\n logs = {};\n }\n for (const callback of this.callbacks) {\n await callback.onTrainBegin(logs);\n }\n }\n async onTrainEnd(logs) {\n if (logs == null) {\n logs = {};\n }\n for (const callback of this.callbacks) {\n await callback.onTrainEnd(logs);\n }\n }\n};\nvar BaseLogger = class extends BaseCallback {\n constructor() {\n super();\n }\n async onEpochBegin(epoch) {\n this.seen = 0;\n this.totals = {};\n }\n async onBatchEnd(batch, logs) {\n if (logs == null) {\n logs = {};\n }\n const batchSize = logs[\"size\"] == null ? 0 : logs[\"size\"];\n this.seen += batchSize;\n for (const key in logs) {\n const value = logs[key];\n if (typeof value === \"number\") {\n if (!this.totals.hasOwnProperty(key)) {\n this.totals[key] = 0;\n }\n this.totals[key] = this.totals[key] + value * batchSize;\n } else {\n let oldTotalsToDispose;\n if (key in this.totals) {\n oldTotalsToDispose = this.totals[key];\n } else {\n this.totals[key] = 0;\n }\n const total = tidy(() => add2(this.totals[key], mul(value, batchSize)));\n this.totals[key] = total;\n if (oldTotalsToDispose != null) {\n oldTotalsToDispose.dispose();\n }\n }\n }\n }\n async onEpochEnd(epoch, logs) {\n if (logs != null) {\n for (const key of this.params[\"metrics\"]) {\n if (this.totals[key] == null) {\n continue;\n }\n if (typeof this.totals[key] === \"number\") {\n logs[key] = this.totals[key] / this.seen;\n } else {\n tidy(() => {\n const log6 = mul(div(1, this.seen), this.totals[key]);\n logs[key] = log6;\n this.totals[key].dispose();\n keep(logs[key]);\n });\n }\n }\n }\n }\n};\nvar History = class extends BaseCallback {\n async onTrainBegin(logs) {\n this.epoch = [];\n this.history = {};\n }\n async onEpochEnd(epoch, logs) {\n if (logs == null) {\n logs = {};\n }\n this.epoch.push(epoch);\n for (const key in logs) {\n if (this.history[key] == null) {\n this.history[key] = [];\n }\n this.history[key].push(logs[key]);\n }\n }\n async syncData() {\n const promises = [];\n const keys = [];\n const indices = [];\n for (const key in this.history) {\n const valueArray = this.history[key];\n for (let i2 = 0; i2 < valueArray.length; ++i2) {\n if (typeof valueArray[i2] !== \"number\") {\n const valueScalar = valueArray[i2];\n promises.push(valueScalar.data());\n keys.push(key);\n indices.push(i2);\n }\n }\n }\n const values = await Promise.all(promises);\n for (let n2 = 0; n2 < values.length; ++n2) {\n const tensorToDispose = this.history[keys[n2]][indices[n2]];\n tensorToDispose.dispose();\n this.history[keys[n2]][indices[n2]] = values[n2][0];\n }\n }\n};\nvar CustomCallback = class extends BaseCallback {\n constructor(args, yieldEvery) {\n super();\n this.currentEpoch = 0;\n this.nowFunc = args.nowFunc;\n this.nextFrameFunc = args.nextFrameFunc || nextFrame;\n this.yieldEvery = yieldEvery || \"auto\";\n if (this.yieldEvery === \"auto\") {\n this.yieldEvery = DEFAULT_YIELD_EVERY_MS;\n }\n if (this.yieldEvery === \"never\" && args.onYield != null) {\n throw new Error(\"yieldEvery is `never` but you provided an `onYield` callback. Either change `yieldEvery` or remove the callback\");\n }\n if (util_exports.isNumber(this.yieldEvery)) {\n this.maybeWait = debounce(this.maybeWait.bind(this), this.yieldEvery, this.nowFunc);\n }\n this.trainBegin = args.onTrainBegin;\n this.trainEnd = args.onTrainEnd;\n this.epochBegin = args.onEpochBegin;\n this.epochEnd = args.onEpochEnd;\n this.batchBegin = args.onBatchBegin;\n this.batchEnd = args.onBatchEnd;\n this.yield = args.onYield;\n }\n async maybeWait(epoch, batch, logs) {\n const ps = [];\n if (this.yield != null) {\n await resolveScalarsInLogs(logs);\n ps.push(this.yield(epoch, batch, logs));\n }\n ps.push(this.nextFrameFunc());\n await Promise.all(ps);\n }\n async onEpochBegin(epoch, logs) {\n this.currentEpoch = epoch;\n if (this.epochBegin != null) {\n await resolveScalarsInLogs(logs);\n await this.epochBegin(epoch, logs);\n }\n }\n async onEpochEnd(epoch, logs) {\n const ps = [];\n if (this.epochEnd != null) {\n await resolveScalarsInLogs(logs);\n ps.push(this.epochEnd(epoch, logs));\n }\n if (this.yieldEvery === \"epoch\") {\n ps.push(this.nextFrameFunc());\n }\n await Promise.all(ps);\n }\n async onBatchBegin(batch, logs) {\n if (this.batchBegin != null) {\n await resolveScalarsInLogs(logs);\n await this.batchBegin(batch, logs);\n }\n }\n async onBatchEnd(batch, logs) {\n const ps = [];\n if (this.batchEnd != null) {\n await resolveScalarsInLogs(logs);\n ps.push(this.batchEnd(batch, logs));\n }\n if (this.yieldEvery === \"batch\") {\n ps.push(this.nextFrameFunc());\n } else if (util_exports.isNumber(this.yieldEvery)) {\n ps.push(this.maybeWait(this.currentEpoch, batch, logs));\n }\n await Promise.all(ps);\n }\n async onTrainBegin(logs) {\n if (this.trainBegin != null) {\n await resolveScalarsInLogs(logs);\n await this.trainBegin(logs);\n }\n }\n async onTrainEnd(logs) {\n if (this.trainEnd != null) {\n await resolveScalarsInLogs(logs);\n await this.trainEnd(logs);\n }\n }\n};\nfunction standardizeCallbacks(callbacks2, yieldEvery) {\n if (callbacks2 == null) {\n callbacks2 = {};\n }\n if (callbacks2 instanceof BaseCallback) {\n return [callbacks2];\n }\n if (Array.isArray(callbacks2) && callbacks2[0] instanceof BaseCallback) {\n return callbacks2;\n }\n const callbackConfigs = toList(callbacks2);\n return callbackConfigs.map((callbackConfig) => new CustomCallback(callbackConfig, yieldEvery));\n}\nvar CallbackConstructorRegistry = class {\n constructor() {\n }\n static registerCallbackConstructor(verbosityLevel, callbackConstructor) {\n util_exports.assert(verbosityLevel >= 0 && Number.isInteger(verbosityLevel), () => `Verbosity level is expected to be an integer >= 0, but got ${verbosityLevel}`);\n CallbackConstructorRegistry.checkForDuplicate(callbackConstructor);\n if (CallbackConstructorRegistry.constructors[verbosityLevel] == null) {\n CallbackConstructorRegistry.constructors[verbosityLevel] = [];\n }\n CallbackConstructorRegistry.constructors[verbosityLevel].push(callbackConstructor);\n }\n static checkForDuplicate(callbackConstructor) {\n for (const levelName in CallbackConstructorRegistry.constructors) {\n const constructors = CallbackConstructorRegistry.constructors[+levelName];\n constructors.forEach((ctor) => {\n if (ctor === callbackConstructor) {\n throw new ValueError(\"Duplicate callback constructor.\");\n }\n });\n }\n }\n static clear() {\n CallbackConstructorRegistry.constructors = {};\n }\n static createCallbacks(verbosityLevel) {\n const constructors = [];\n for (const levelName in CallbackConstructorRegistry.constructors) {\n const level = +levelName;\n if (verbosityLevel >= level) {\n constructors.push(...CallbackConstructorRegistry.constructors[level]);\n }\n }\n return constructors.map((ctor) => new ctor());\n }\n};\nCallbackConstructorRegistry.constructors = {};\nfunction configureCallbacks(callbacks2, verbose, epochs, initialEpoch, numTrainSamples, stepsPerEpoch, batchSize, doValidation, callbackMetrics) {\n const history = new History();\n const actualCallbacks = [\n new BaseLogger(),\n ...CallbackConstructorRegistry.createCallbacks(verbose)\n ];\n if (callbacks2 != null) {\n actualCallbacks.push(...callbacks2);\n }\n actualCallbacks.push(history);\n const callbackList = new CallbackList(actualCallbacks);\n callbackList.setParams({\n epochs,\n initialEpoch,\n samples: numTrainSamples,\n steps: stepsPerEpoch,\n batchSize,\n verbose,\n doValidation,\n metrics: callbackMetrics\n });\n return { callbackList, history };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/layers/serialization.js\nfunction deserialize(config, customObjects = {}, fastWeightInit = false) {\n return deserializeKerasObject(config, serialization_exports.SerializationMap.getMap().classNameMap, customObjects, \"layer\", fastWeightInit);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/losses.js\nfunction l2Normalize(x, axis) {\n return tidy(() => {\n if (x.dtype !== \"float32\") {\n x = cast(x, \"float32\");\n }\n const squareSum = sum2(square2(x), axis, true);\n const epsilonTensor = fill(squareSum.shape, epsilon());\n const norm2 = sqrt(maximum(squareSum, epsilonTensor));\n return div(x, norm2);\n });\n}\nfunction meanSquaredError2(yTrue, yPred) {\n return tidy(() => mean(square2(sub(yPred, yTrue)), -1));\n}\nfunction meanAbsoluteError(yTrue, yPred) {\n return tidy(() => mean(abs(sub(yPred, yTrue)), -1));\n}\nfunction meanAbsolutePercentageError(yTrue, yPred) {\n return tidy(() => {\n const diff = sub(yTrue, yPred);\n const clippedTrue = clipByValue(abs(yTrue), epsilon(), Number.MAX_VALUE);\n const absResult = abs(div(diff, clippedTrue));\n return mul(100, mean(absResult, -1));\n });\n}\nfunction meanSquaredLogarithmicError(yTrue, yPred) {\n return tidy(() => {\n const clippedPred = clipByValue(yPred, epsilon(), Number.MAX_VALUE);\n const firstLog = log2(add2(1, clippedPred));\n const clippedTrue = clipByValue(yTrue, epsilon(), Number.MAX_VALUE);\n const secondLog = log2(add2(1, clippedTrue));\n return mean(square2(sub(firstLog, secondLog)), -1);\n });\n}\nfunction squaredHinge(yTrue, yPred) {\n return tidy(() => {\n const maxResult = maximum(0, sub(1, mul(yTrue, yPred)));\n return mean(square2(maxResult), -1);\n });\n}\nfunction hinge(yTrue, yPred) {\n return tidy(() => {\n const maxResult = maximum(0, sub(1, mul(yTrue, yPred)));\n return mean(maxResult, -1);\n });\n}\nfunction categoricalHinge(yTrue, yPred) {\n return tidy(() => {\n const pos = sum2(mul(yTrue, yPred), -1);\n const neg5 = max(mul(sub(1, yTrue), yPred), -1);\n return maximum(0, add2(1, sub(neg5, pos)));\n });\n}\nfunction logcosh(yTrue, yPred) {\n return tidy(() => {\n const log22 = Math.log(2);\n const predictionDiff = sub(yPred, yTrue);\n const logcoshResult = sub(add2(predictionDiff, softplus(mul(-2, predictionDiff))), log22);\n return mean(logcoshResult, -1);\n });\n}\nfunction categoricalCrossentropy(target, output, fromLogits = false) {\n return tidy(() => {\n if (fromLogits) {\n output = softmax(output);\n } else {\n const outputSum = sum2(output, output.shape.length - 1, true);\n output = div(output, outputSum);\n }\n output = clipByValue(output, epsilon(), 1 - epsilon());\n return neg(sum2(mul(cast(target, \"float32\"), log2(output)), output.shape.length - 1));\n });\n}\nfunction sparseCategoricalCrossentropy(target, output, fromLogits = false) {\n return tidy(() => {\n const flatTarget = cast(floor(flatten2(target)), \"int32\");\n output = clipByValue(output, epsilon(), 1 - epsilon());\n const outputShape = output.shape;\n const oneHotTarget = reshape(oneHot(flatTarget, outputShape[outputShape.length - 1]), outputShape);\n return categoricalCrossentropy(oneHotTarget, output, fromLogits);\n });\n}\nfunction sigmoidCrossEntropyWithLogits(labels, logits) {\n if (!util_exports.arraysEqual(labels.shape, logits.shape)) {\n throw new ValueError(`logits and labels must have the same shape, but got shapes ${JSON.stringify(labels.shape)} and ${JSON.stringify(logits.shape)}`);\n }\n return tidy(() => {\n const reluLogits = relu(logits);\n const negAbsLogits = neg(abs(logits));\n return add2(sub(reluLogits, mul(logits, labels)), log1p(exp(negAbsLogits)));\n });\n}\nfunction binaryCrossentropy(yTrue, yPred) {\n return tidy(() => {\n let y;\n y = clipByValue(yPred, epsilon(), 1 - epsilon());\n y = log2(div(y, sub(1, y)));\n return mean(sigmoidCrossEntropyWithLogits(yTrue, y), -1);\n });\n}\nfunction kullbackLeiblerDivergence(yTrue, yPred) {\n return tidy(() => {\n const clippedTrue = clipByValue(yTrue, epsilon(), 1);\n const clippedPred = clipByValue(yPred, epsilon(), 1);\n return sum2(mul(yTrue, log2(div(clippedTrue, clippedPred))), -1);\n });\n}\nfunction poisson(yTrue, yPred) {\n return tidy(() => {\n const logPred = log2(add2(epsilon(), yPred));\n return mean(sub(yPred, mul(yTrue, logPred)), -1);\n });\n}\nfunction cosineProximity(yTrue, yPred) {\n return tidy(() => {\n const trueNormalized = l2Normalize(yTrue, -1);\n const predNormalized = l2Normalize(yPred, -1);\n const trueXPred = mul(trueNormalized, predNormalized);\n return neg(sum2(trueXPred, -1));\n });\n}\nvar lossesMap = {\n meanSquaredError: meanSquaredError2,\n meanAbsoluteError,\n meanAbsolutePercentageError,\n meanSquaredLogarithmicError,\n squaredHinge,\n hinge,\n categoricalHinge,\n logcosh,\n categoricalCrossentropy,\n sparseCategoricalCrossentropy,\n binaryCrossentropy,\n kullbackLeiblerDivergence,\n poisson,\n cosineProximity\n};\nfunction get(identifierOrFn) {\n if (typeof identifierOrFn === \"string\") {\n if (identifierOrFn in lossesMap) {\n return lossesMap[identifierOrFn];\n }\n let errMsg = `Unknown loss ${identifierOrFn}`;\n if (identifierOrFn.toLowerCase().includes(\"softmaxcrossentropy\")) {\n errMsg = `Unknown loss ${identifierOrFn}. Use \"categoricalCrossentropy\" as the string name for tf.losses.softmaxCrossEntropy`;\n }\n throw new ValueError(errMsg);\n } else {\n return identifierOrFn;\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/metrics.js\nfunction binaryAccuracy(yTrue, yPred) {\n return tidy(() => {\n const threshold3 = mul(0.5, onesLike(yPred));\n const yPredThresholded = cast2(greater(yPred, threshold3), yTrue.dtype);\n return mean(equal(yTrue, yPredThresholded), -1);\n });\n}\nfunction categoricalAccuracy(yTrue, yPred) {\n return tidy(() => cast2(equal(argMax(yTrue, -1), argMax(yPred, -1)), \"float32\"));\n}\nfunction truePositives(yTrue, yPred) {\n return tidy(() => {\n return cast(sum2(logicalAnd(equal(yTrue, 1), equal(yPred, 1))), \"float32\");\n });\n}\nfunction falseNegatives(yTrue, yPred) {\n return tidy(() => {\n return cast(sum2(logicalAnd(equal(yTrue, 1), equal(yPred, 0))), \"float32\");\n });\n}\nfunction falsePositives(yTrue, yPred) {\n return tidy(() => {\n return cast(sum2(logicalAnd(equal(yTrue, 0), equal(yPred, 1))), \"float32\");\n });\n}\nfunction precision(yTrue, yPred) {\n return tidy(() => {\n const tp = truePositives(yTrue, yPred);\n const fp = falsePositives(yTrue, yPred);\n const denominator = add2(tp, fp);\n return cast(where(greater(denominator, 0), div(tp, denominator), 0), \"float32\");\n });\n}\nfunction recall(yTrue, yPred) {\n return tidy(() => {\n const tp = truePositives(yTrue, yPred);\n const fn = falseNegatives(yTrue, yPred);\n const denominator = add2(tp, fn);\n return cast(where(greater(denominator, 0), div(tp, denominator), 0), \"float32\");\n });\n}\nfunction binaryCrossentropy2(yTrue, yPred) {\n return binaryCrossentropy(yTrue, yPred);\n}\nfunction sparseCategoricalAccuracy(yTrue, yPred) {\n if (yTrue.rank === yPred.rank) {\n yTrue = squeeze(yTrue, [yTrue.rank - 1]);\n }\n yPred = argMax(yPred, -1);\n if (yPred.dtype !== yTrue.dtype) {\n yPred = cast(yPred, yTrue.dtype);\n }\n return cast(equal(yTrue, yPred), \"float32\");\n}\nvar mse = meanSquaredError2;\nvar MSE = meanSquaredError2;\nvar mae = meanAbsoluteError;\nvar MAE = meanAbsoluteError;\nvar mape = meanAbsolutePercentageError;\nvar MAPE = meanAbsolutePercentageError;\nvar categoricalCrossentropy2 = categoricalCrossentropy;\nvar cosine = cosineProximity;\nvar sparseCategoricalCrossentropy2 = sparseCategoricalCrossentropy;\nvar metricsMap = {\n binaryAccuracy,\n categoricalAccuracy,\n precision,\n categoricalCrossentropy: categoricalCrossentropy2,\n sparseCategoricalCrossentropy: sparseCategoricalCrossentropy2,\n mse,\n MSE,\n mae,\n MAE,\n mape,\n MAPE,\n cosine\n};\nfunction get2(identifier) {\n if (typeof identifier === \"string\" && identifier in metricsMap) {\n return metricsMap[identifier];\n } else if (typeof identifier !== \"string\" && identifier != null) {\n return identifier;\n } else {\n throw new ValueError(`Unknown metric ${identifier}`);\n }\n}\nfunction getLossOrMetricName(fn) {\n assert2(fn !== null, `Unknown LossOrMetricFn ${fn}`);\n if (typeof fn === \"string\") {\n return fn;\n } else {\n let fnName;\n for (const key of Object.keys(lossesMap)) {\n if (lossesMap[key] === fn) {\n fnName = key;\n break;\n }\n }\n if (fnName !== void 0) {\n return fnName;\n }\n for (const key of Object.keys(metricsMap)) {\n if (metricsMap[key] === fn) {\n fnName = key;\n break;\n }\n }\n if (fnName !== void 0) {\n return fnName;\n }\n return fn.name;\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/optimizers.js\nfunction getOptimizer(identifier) {\n const optimizerMap = {\n \"Adagrad\": () => train.adagrad(0.01),\n \"Adadelta\": () => train.adadelta(1, 0.95, epsilon()),\n \"Adam\": () => train.adam(1e-3, 0.9, 0.999, epsilon()),\n \"Adamax\": () => train.adamax(2e-3, 0.9, 0.999, epsilon(), 0),\n \"RMSProp\": () => train.rmsprop(1e-3, 0.9, 0, epsilon()),\n \"SGD\": () => train.sgd(0.01)\n };\n optimizerMap[\"adagrad\"] = optimizerMap[\"Adagrad\"];\n optimizerMap[\"adadelta\"] = optimizerMap[\"Adadelta\"];\n optimizerMap[\"adam\"] = optimizerMap[\"Adam\"];\n optimizerMap[\"adamax\"] = optimizerMap[\"Adamax\"];\n optimizerMap[\"rmsprop\"] = optimizerMap[\"RMSProp\"];\n optimizerMap[\"sgd\"] = optimizerMap[\"SGD\"];\n if (identifier in optimizerMap) {\n return optimizerMap[identifier]();\n }\n throw new ValueError(`Unknown Optimizer ${identifier}`);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/user_defined_metadata.js\nvar MAX_USER_DEFINED_METADATA_SERIALIZED_LENGTH = 1 * 1024 * 1024;\nfunction checkUserDefinedMetadata(userDefinedMetadata, modelName, checkSize = false) {\n if (userDefinedMetadata == null || typeof userDefinedMetadata !== \"object\" || Object.getPrototypeOf(userDefinedMetadata) !== Object.prototype || !plainObjectCheck(userDefinedMetadata)) {\n throw new Error(\"User-defined metadata is expected to be a JSON object, but is not.\");\n }\n if (checkSize) {\n const out = JSON.stringify(userDefinedMetadata);\n if (out.length > MAX_USER_DEFINED_METADATA_SERIALIZED_LENGTH) {\n console.warn(`User-defined metadata of model \"${modelName}\" is too large in size (length=${out.length} when serialized). It is not recommended to store such large objects in user-defined metadata. Please make sure its serialized length is <= ${MAX_USER_DEFINED_METADATA_SERIALIZED_LENGTH}.`);\n }\n }\n}\nfunction plainObjectCheck(x) {\n if (x === null) {\n return true;\n } else if (typeof x === \"object\") {\n if (Object.getPrototypeOf(x) === Object.prototype) {\n const keys = Object.keys(x);\n for (const key of keys) {\n if (typeof key !== \"string\") {\n return false;\n }\n if (!plainObjectCheck(x[key])) {\n return false;\n }\n }\n return true;\n } else {\n if (Array.isArray(x)) {\n for (const item of x) {\n if (!plainObjectCheck(item)) {\n return false;\n }\n }\n return true;\n } else {\n return false;\n }\n }\n } else {\n const xType = typeof x;\n return xType === \"string\" || xType === \"number\" || xType === \"boolean\";\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/utils/layer_utils.js\nfunction printSummary(model2, lineLength, positions, printFn = console.log) {\n const sequentialLike = isModelSequentialLike(model2);\n const toDisplay = [\"Layer (type)\", \"Input Shape\", \"Output shape\", \"Param #\"];\n if (sequentialLike) {\n lineLength = lineLength || 90;\n positions = positions || [0.32, 0.61, 0.89, 1];\n } else {\n lineLength = lineLength || 115;\n positions = positions || [0.24, 0.48, 0.7, 0.8, 1];\n }\n if (positions[positions.length - 1] <= 1) {\n positions = positions.map((p2) => Math.floor(lineLength * p2));\n }\n let relevantNodes;\n if (!sequentialLike) {\n toDisplay.push(\"Receives inputs\");\n relevantNodes = [];\n for (const depth in model2.nodesByDepth) {\n relevantNodes.push(...model2.nodesByDepth[depth]);\n }\n }\n printFn(\"_\".repeat(lineLength));\n printRow(toDisplay, positions, printFn);\n printFn(\"=\".repeat(lineLength));\n const layers = model2.layers;\n for (let i2 = 0; i2 < layers.length; ++i2) {\n if (sequentialLike) {\n printLayerSummary(layers[i2], positions, printFn);\n } else {\n printLayerSummaryWithConnections(layers[i2], positions, relevantNodes, printFn);\n }\n printFn((i2 === layers.length - 1 ? \"=\" : \"_\").repeat(lineLength));\n }\n model2.checkTrainableWeightsConsistency();\n const trainableCount = countTrainableParams(model2);\n const nonTrainableCount = countParamsInWeights(model2.nonTrainableWeights);\n printFn(`Total params: ${trainableCount + nonTrainableCount}`);\n printFn(`Trainable params: ${trainableCount}`);\n printFn(`Non-trainable params: ${nonTrainableCount}`);\n printFn(\"_\".repeat(lineLength));\n}\nfunction countTrainableParams(model2) {\n let trainableCount;\n if (model2.collectedTrainableWeights != null) {\n trainableCount = countParamsInWeights(model2.collectedTrainableWeights);\n } else {\n trainableCount = countParamsInWeights(model2.trainableWeights);\n }\n return trainableCount;\n}\nfunction isModelSequentialLike(model2) {\n let sequentialLike = true;\n const nodesByDepth = [];\n const nodes = [];\n for (const depth in model2.nodesByDepth) {\n nodesByDepth.push(model2.nodesByDepth[depth]);\n }\n for (const depthNodes of nodesByDepth) {\n if (depthNodes.length > 1 || depthNodes.length === 1 && depthNodes[0].inboundLayers.length > 1) {\n sequentialLike = false;\n break;\n }\n nodes.push(...depthNodes);\n }\n if (sequentialLike) {\n for (const layer of model2.layers) {\n let flag = false;\n for (const node of layer.inboundNodes) {\n if (nodes.indexOf(node) !== -1) {\n if (flag) {\n sequentialLike = false;\n break;\n } else {\n flag = true;\n }\n }\n }\n if (!sequentialLike) {\n break;\n }\n }\n }\n return sequentialLike;\n}\nfunction printRow(fields, positions, printFn = console.log) {\n let line = \"\";\n for (let i2 = 0; i2 < fields.length; ++i2) {\n if (i2 > 0) {\n line = line.slice(0, line.length - 1) + \" \";\n }\n line += fields[i2];\n line = line.slice(0, positions[i2]);\n line += \" \".repeat(positions[i2] - line.length);\n }\n printFn(line);\n}\nfunction printLayerSummary(layer, positions, printFn) {\n let outputShape;\n let inputShape;\n try {\n inputShape = layer.inboundNodes.map((x) => JSON.stringify(x.inputShapes)).join(\",\");\n } catch (err) {\n inputShape = \"multiple\";\n }\n try {\n outputShape = JSON.stringify(layer.outputShape);\n } catch (err) {\n outputShape = \"multiple\";\n }\n const name = layer.name;\n const className = layer.getClassName();\n const fields = [\n `${name} (${className})`,\n inputShape,\n outputShape,\n layer.countParams().toString()\n ];\n printRow(fields, positions, printFn);\n}\nfunction printLayerSummaryWithConnections(layer, positions, relevantNodes, printFn) {\n let outputShape;\n let inputShape;\n try {\n inputShape = layer.inboundNodes.map((x) => JSON.stringify(x.inputShapes)).join(\",\");\n } catch (err) {\n inputShape = \"multiple\";\n }\n try {\n outputShape = JSON.stringify(layer.outputShape);\n } catch (err) {\n outputShape = \"multiple\";\n }\n const connections = [];\n for (const node of layer.inboundNodes) {\n if (relevantNodes != null && relevantNodes.length > 0 && relevantNodes.indexOf(node) === -1) {\n continue;\n }\n for (let i2 = 0; i2 < node.inboundLayers.length; ++i2) {\n const inboundLayer = node.inboundLayers[i2].name;\n const inboundLayerIndex = node.nodeIndices[i2];\n const inboundTensorIndex = node.tensorIndices[i2];\n connections.push(`${inboundLayer}[${inboundLayerIndex}][${inboundTensorIndex}]`);\n }\n }\n const name = layer.name;\n const className = layer.getClassName();\n const firstConnection = connections.length === 0 ? \"\" : connections[0];\n const fields = [\n `${name} (${className})`,\n inputShape,\n outputShape,\n layer.countParams().toString(),\n firstConnection\n ];\n printRow(fields, positions, printFn);\n for (let i2 = 1; i2 < connections.length; ++i2) {\n printRow([\"\", \"\", \"\", \"\", connections[i2]], positions, printFn);\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/utils/serialization_utils.js\nfunction isArrayItemInputOrOutputName(key, index, value) {\n return (key === \"inboundNodes\" || key === \"outputLayers\" || key === \"inputLayers\") && index === 0 && typeof value === \"string\";\n}\nfunction convertPythonicToTs(pythonicConfig, key) {\n if (pythonicConfig === null) {\n return null;\n } else if (typeof pythonicConfig === \"string\") {\n return toCamelCase(pythonicConfig);\n } else if (typeof pythonicConfig === \"number\" || typeof pythonicConfig === \"boolean\") {\n return pythonicConfig;\n } else if (pythonicConfig instanceof Array) {\n const tsArray = [];\n const arrayLength = pythonicConfig.length;\n for (let i2 = 0; i2 < arrayLength; ++i2) {\n const item = pythonicConfig[i2];\n if (isArrayItemInputOrOutputName(key, i2, item)) {\n tsArray.push(item);\n } else {\n tsArray.push(convertPythonicToTs(item, key));\n }\n }\n return tsArray;\n } else {\n const tsDict = {};\n for (const pythonicKey of Object.keys(pythonicConfig)) {\n const pythonicValue = pythonicConfig[pythonicKey];\n if (pythonicKey === \"name\" && typeof pythonicValue === \"string\") {\n tsDict[pythonicKey] = pythonicValue;\n } else {\n const tsKey = toCamelCase(pythonicKey);\n tsDict[tsKey] = convertPythonicToTs(pythonicValue, tsKey);\n }\n }\n return tsDict;\n }\n}\nfunction convertTsToPythonic(tsConfig, key) {\n if (tsConfig === null || tsConfig === void 0) {\n return null;\n } else if (typeof tsConfig === \"string\") {\n return toSnakeCase(tsConfig);\n } else if (typeof tsConfig === \"number\" || typeof tsConfig === \"boolean\") {\n return tsConfig;\n } else if (tsConfig instanceof Array) {\n const pyArray = [];\n const arrayLength = tsConfig.length;\n for (let i2 = 0; i2 < arrayLength; ++i2) {\n const item = tsConfig[i2];\n if (isArrayItemInputOrOutputName(key, i2, item)) {\n pyArray.push(item);\n } else {\n pyArray.push(convertTsToPythonic(item, key));\n }\n }\n return pyArray;\n } else {\n const pyDict = {};\n for (const tsKey of Object.keys(tsConfig)) {\n const tsValue = tsConfig[tsKey];\n const pyKey = toSnakeCase(tsKey);\n if ((tsKey === \"name\" || tsKey === \"className\") && typeof tsValue === \"string\") {\n pyDict[pyKey] = tsValue;\n } else {\n pyDict[pyKey] = convertTsToPythonic(tsValue, tsKey);\n }\n }\n return pyDict;\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/version.js\nvar version2 = \"3.21.0\";\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/engine/container.js\nvar Container = class extends Layer {\n constructor(args) {\n super({});\n this.containerNodes = /* @__PURE__ */ new Set();\n this.name = args.name;\n if (this.name == null) {\n const prefix = this.getClassName().toLowerCase();\n this.name = getUid(prefix);\n }\n this.supportsMasking = false;\n this.trainable_ = true;\n if (Array.isArray(args.inputs)) {\n this.inputs = args.inputs.slice();\n } else {\n this.inputs = [args.inputs];\n }\n if (Array.isArray(args.outputs)) {\n this.outputs = args.outputs.slice();\n } else {\n this.outputs = [args.outputs];\n }\n if (unique2(this.inputs).length !== this.inputs.length) {\n throw new ValueError(`The list of inputs passed to the model is redundant. All inputs should only appear once. Found: ${this.inputs.map((x) => x.name)}`);\n }\n if (unique2(this.outputs).length !== this.outputs.length) {\n console.warn(`The list of outputs passed to the model is redundant. All outputs should only appear once. Found: ${this.outputs.map((x) => x.name)}`);\n }\n this.inputLayers = [];\n this.inputLayersNodeIndices = [];\n this.inputLayersTensorIndices = [];\n this.outputLayers = [];\n this.outputLayersNodeIndices = [];\n this.outputLayersTensorIndices = [];\n this.layers = [];\n this.internalContainerRefs = [];\n for (const x of this.outputs) {\n const layer = x.sourceLayer;\n const nodeIndex = x.nodeIndex;\n const tensorIndex = x.tensorIndex;\n this.outputLayers.push(layer);\n this.outputLayersNodeIndices.push(nodeIndex);\n this.outputLayersTensorIndices.push(tensorIndex);\n }\n for (const x of this.inputs) {\n const layer = x.sourceLayer;\n const nodeIndex = x.nodeIndex;\n const tensorIndex = x.tensorIndex;\n assert2(nodeIndex === 0, \"input layer has >1 nodes\");\n assert2(tensorIndex === 0, \"input layer has >1 tensors\");\n this.inputLayers.push(layer);\n this.inputLayersNodeIndices.push(nodeIndex);\n this.inputLayersTensorIndices.push(tensorIndex);\n }\n this.inputNames = [];\n this.outputNames = [];\n this.feedInputShapes = [];\n this.feedInputNames = [];\n this.feedOutputNames = [];\n for (let i2 = 0; i2 < this.inputLayers.length; i2++) {\n const layer = this.inputLayers[i2];\n if (!(layer instanceof InputLayer)) {\n throw new TypeError(`Input layers to a LayersModel must be InputLayer objects. Received inputs: ${args.inputs}. Input ${i2} (0-based) originates from layer type ${layer.getClassName()}.`);\n }\n this.inputNames.push(layer.name);\n this.feedInputShapes.push(layer.batchInputShape);\n this.feedInputNames.push(layer.name);\n }\n for (const layer of this.outputLayers) {\n this.outputNames.push(layer.name);\n }\n this.internalInputShapes = this.inputs.map((x) => x.shape);\n this.internalOutputShapes = this.outputs.map((x) => x.shape);\n const nodesDepths = {};\n const nodeIDToNode = {};\n const layersDepths = {};\n const layerIDToLayer = {};\n const layerIndices = {};\n const nodesInDecreasingDepth = [];\n const buildMapOfGraph = (tensor2, finishedNodes2, nodesInProgress2, layer, nodeIndex, tensorIndex) => {\n if (layer == null || nodeIndex == null || tensorIndex == null) {\n layer = tensor2.sourceLayer;\n nodeIndex = tensor2.nodeIndex;\n tensorIndex = tensor2.tensorIndex;\n }\n const node = layer.inboundNodes[nodeIndex];\n if (nodesInProgress2.indexOf(node) !== -1) {\n throw new RuntimeError(`The tensor ${tensor2.name} at layer \"${layer.name}\" is part of a cycle.`);\n }\n if (finishedNodes2.indexOf(node) !== -1) {\n return;\n }\n this.containerNodes.add(Container.nodeKey(layer, nodeIndex));\n if (!(layer.id in layerIndices)) {\n layerIndices[layer.id] = Object.keys(layerIndices).length;\n }\n if (nodesInProgress2.indexOf(node) === -1) {\n nodesInProgress2.push(node);\n }\n const numInboundLayers = node.inboundLayers.length;\n for (let i2 = 0; i2 < numInboundLayers; i2++) {\n const x = node.inputTensors[i2];\n const layer2 = node.inboundLayers[i2];\n const nodeIndex2 = node.nodeIndices[i2];\n const tensorIndex2 = node.tensorIndices[i2];\n buildMapOfGraph(x, finishedNodes2, nodesInProgress2, layer2, nodeIndex2, tensorIndex2);\n }\n finishedNodes2.push(node);\n while (nodesInProgress2.indexOf(node) >= 0) {\n nodesInProgress2.splice(nodesInProgress2.indexOf(node), 1);\n }\n nodesInDecreasingDepth.push(node);\n };\n const finishedNodes = [];\n const nodesInProgress = [];\n for (const x of this.outputs) {\n buildMapOfGraph(x, finishedNodes, nodesInProgress);\n }\n const reversedNodesInDecreasingDepth = nodesInDecreasingDepth.slice().reverse();\n for (const node of reversedNodesInDecreasingDepth) {\n nodeIDToNode[node.id] = node;\n if (!(node.id in nodesDepths)) {\n nodesDepths[node.id] = 0;\n }\n let depth = nodesDepths[node.id];\n const previousDepth = layersDepths[node.outboundLayer.id] == null ? 0 : layersDepths[node.outboundLayer.id];\n depth = Math.max(depth, previousDepth);\n layersDepths[node.outboundLayer.id] = depth;\n layerIDToLayer[node.outboundLayer.id] = node.outboundLayer;\n nodesDepths[node.id] = depth;\n for (let i2 = 0; i2 < node.inboundLayers.length; i2++) {\n const inboundLayer = node.inboundLayers[i2];\n const nodeIndex = node.nodeIndices[i2];\n const inboundNode = inboundLayer.inboundNodes[nodeIndex];\n const previousDepth2 = nodesDepths[inboundNode.id] == null ? 0 : nodesDepths[inboundNode.id];\n nodesDepths[inboundNode.id] = Math.max(depth + 1, previousDepth2);\n nodeIDToNode[inboundNode.id] = inboundNode;\n }\n }\n const nodesByDepth = {};\n for (const nodeID in nodesDepths) {\n const depth = nodesDepths[nodeID];\n if (!(depth in nodesByDepth)) {\n nodesByDepth[depth] = [];\n }\n nodesByDepth[depth].push(nodeIDToNode[nodeID]);\n }\n const layersByDepth = {};\n for (const layerID in layersDepths) {\n const depth = layersDepths[layerID];\n if (!(depth in layersByDepth)) {\n layersByDepth[depth] = [];\n }\n layersByDepth[depth].push(layerIDToLayer[layerID]);\n }\n let depthKeys = Object.keys(layersByDepth).map((x) => parseInt(x, 10)).sort(reverseNumberCompare);\n this.layers = [];\n for (const depth of depthKeys) {\n const layersForDepth = layersByDepth[depth];\n layersForDepth.sort((a, b) => {\n const aIndex = layerIndices[a.id];\n const bIndex = layerIndices[b.id];\n if (aIndex < bIndex) {\n return -1;\n }\n if (aIndex > bIndex) {\n return 1;\n }\n return 0;\n });\n for (const layer of layersForDepth) {\n if (layer instanceof Container) {\n this.internalContainerRefs.push(layer);\n }\n this.layers.push(layer);\n }\n }\n this.layersByDepth = layersByDepth;\n depthKeys = Object.keys(nodesByDepth).map((x) => parseInt(x, 10)).sort(reverseNumberCompare);\n const computableTensors = this.inputs.slice();\n const layersWithCompleteInput = [];\n for (const depth of depthKeys) {\n for (const node of nodesByDepth[depth]) {\n const layer = node.outboundLayer;\n if (layer != null) {\n for (const x of node.inputTensors) {\n if (computableTensors.indexOf(x) === -1) {\n throw new RuntimeError(`Graph disconnected: cannot obtain value for tensor ${x} at layer \"${layer.name}\". The following previous layers were accessed without issue: ${layersWithCompleteInput}`);\n }\n }\n for (const x of node.outputTensors) {\n computableTensors.push(x);\n }\n layersWithCompleteInput.push(layer.name);\n }\n }\n }\n this.nodesByDepth = nodesByDepth;\n const allNames = this.layers.map((x) => x.name);\n for (const name of allNames) {\n const numOccurrences = allNames.filter((x) => x === name).length;\n if (numOccurrences !== 1) {\n throw new RuntimeError(`The name \"${name}\" is used ${numOccurrences} times in the model. All layer names should be unique. Layer names: ` + JSON.stringify(allNames));\n }\n }\n this.outboundNodes = [];\n this.inboundNodes = [];\n new Node({\n outboundLayer: this,\n inboundLayers: [],\n nodeIndices: [],\n tensorIndices: [],\n inputTensors: this.inputs,\n outputTensors: this.outputs,\n inputMasks: this.inputs.map((x) => null),\n outputMasks: this.outputs.map((x) => null),\n inputShapes: this.inputs.map((x) => x.shape),\n outputShapes: this.outputs.map((x) => x.shape)\n });\n this.built = true;\n this._refCount = 1;\n }\n assertNotDisposed() {\n if (this._refCount === 0) {\n throw new Error(`Container '${this.name}' is already disposed.`);\n }\n }\n dispose() {\n this.assertNotDisposed();\n const result = { refCountAfterDispose: null, numDisposedVariables: 0 };\n if (--this._refCount === 0) {\n for (const layer of this.layers) {\n result.numDisposedVariables += layer.dispose().numDisposedVariables;\n }\n for (const container of this.internalContainerRefs) {\n result.numDisposedVariables += container.dispose().numDisposedVariables;\n }\n }\n result.refCountAfterDispose = this._refCount;\n return result;\n }\n get trainable() {\n return this.trainable_;\n }\n set trainable(trainable) {\n this.layers.forEach((layer) => {\n layer._trainableWeights.forEach((w) => w.trainable = trainable);\n });\n this.trainable_ = trainable;\n }\n get trainableWeights() {\n if (this._trainableWeights.length > 0) {\n throw new ValueError(\"Container instance unexpectedly contains _trainableWeights.The trainable weights of a Container are a union of the trainable weights of its consituent Layers. Its own _trainableWeights must remain an empty Array.\");\n }\n if (!this.trainable) {\n return [];\n }\n let weights = [];\n for (const layer of this.layers) {\n weights = weights.concat(layer.trainableWeights);\n }\n return weights;\n }\n get nonTrainableWeights() {\n const weights = [];\n for (const layer of this.layers) {\n weights.push(...layer.nonTrainableWeights);\n }\n if (!this.trainable) {\n const trainableWeights = [];\n for (const layer of this.layers) {\n trainableWeights.push(...layer.trainableWeights);\n }\n return trainableWeights.concat(weights);\n }\n return weights;\n }\n get weights() {\n return this.trainableWeights.concat(this.nonTrainableWeights);\n }\n loadWeights(weights, strict = true) {\n const nameToWeight = {};\n let totalWeightsCount = 0;\n for (const layer of this.layers) {\n for (const weight of layer.weights) {\n if (nameToWeight[weight.originalName] != null) {\n throw new ValueError(`Duplicate weight name: ${weight.originalName}`);\n }\n nameToWeight[weight.originalName] = weight;\n totalWeightsCount++;\n }\n }\n const weightValueTuples = [];\n for (const name in weights) {\n let validatedName = name;\n if (nameToWeight[name] == null) {\n const tokens = name.split(\"/\");\n const shortenNameArray = tokens.slice(0, -2).concat([tokens[tokens.length - 1]]);\n validatedName = shortenNameArray.join(\"/\");\n }\n if (nameToWeight[validatedName] != null) {\n weightValueTuples.push([nameToWeight[validatedName], weights[name]]);\n } else if (strict) {\n throw new ValueError(`Provided weight data has no target variable: ${name}`);\n }\n delete nameToWeight[validatedName];\n }\n if (strict) {\n const unsetNames = [];\n for (const name in nameToWeight) {\n unsetNames.push(name);\n }\n if (unsetNames.length > 0) {\n throw new ValueError(`${unsetNames.length} of ${totalWeightsCount} weights are not set: ${unsetNames}`);\n }\n }\n batchSetValue(weightValueTuples);\n }\n updatedConfig() {\n const theConfig = this.getConfig();\n const modelConfig = {};\n modelConfig[\"className\"] = this.getClassName();\n modelConfig[\"config\"] = theConfig;\n modelConfig[\"kerasVersion\"] = `tfjs-layers ${version2}`;\n modelConfig[\"backend\"] = \"TensorFlow.js\";\n return modelConfig;\n }\n toJSON(unused, returnString = true) {\n const modelConfig = convertTsToPythonic(this.updatedConfig());\n return returnString ? JSON.stringify(modelConfig) : modelConfig;\n }\n call(inputs, kwargs) {\n return tidy(() => {\n inputs = toList(inputs);\n const feedDict = new FeedDict();\n for (let i2 = 0; i2 < this.inputs.length; ++i2) {\n feedDict.add(this.inputs[i2], inputs[i2]);\n }\n return execute(this.outputs, feedDict, kwargs);\n });\n }\n computeMask(inputs, mask) {\n return tidy(() => {\n inputs = toList(inputs);\n let masks;\n if (mask == null) {\n masks = pyListRepeat(null, inputs.length);\n } else {\n masks = toList(mask);\n }\n return this.runInternalGraph(inputs, masks)[1];\n });\n }\n computeOutputShape(inputShape) {\n const inputShapes = normalizeShapeList(inputShape);\n if (inputShapes.length !== this.inputLayers.length) {\n throw new ValueError(`Invalid inputShape argument ${inputShape}: model has ${this.inputLayers.length} tensor inputs.`);\n }\n const layersToOutputShapes = {};\n for (let i2 = 0; i2 < inputShapes.length; i2++) {\n const layer = this.inputLayers[i2];\n const inputShape2 = inputShapes[i2];\n const shapeKey = layer.name + \"_0_0\";\n layersToOutputShapes[shapeKey] = inputShape2;\n }\n const depthKeys = Object.keys(this.nodesByDepth).map((x) => parseInt(x, 10)).sort(reverseNumberCompare);\n if (depthKeys.length > 1) {\n for (const depth of depthKeys) {\n const nodes = this.nodesByDepth[depth];\n for (const node of nodes) {\n const layer = node.outboundLayer;\n if (this.inputLayers.map((x) => x.id).indexOf(layer.id) !== -1) {\n continue;\n }\n const inputShapes2 = [];\n for (let j = 0; j < node.inboundLayers.length; j++) {\n const inboundLayer = node.inboundLayers[j];\n const nodeIndex2 = node.nodeIndices[j];\n const tensorIndex = node.tensorIndices[j];\n const shapeKey = `${inboundLayer.name}_${nodeIndex2}_${tensorIndex}`;\n const inputShape2 = layersToOutputShapes[shapeKey];\n inputShapes2.push(inputShape2);\n }\n const outputShape = layer.computeOutputShape(singletonOrArray(inputShapes2));\n const outputShapes2 = normalizeShapeList(outputShape);\n const nodeIndex = layer.inboundNodes.indexOf(node);\n for (let j = 0; j < outputShapes2.length; j++) {\n const shapeKey = `${layer.name}_${nodeIndex}_${j}`;\n layersToOutputShapes[shapeKey] = outputShapes2[j];\n }\n }\n }\n }\n const outputShapes = [];\n const outputShapeKeys = [];\n for (let i2 = 0; i2 < this.outputLayers.length; i2++) {\n const layer = this.outputLayers[i2];\n const nodeIndex = this.outputLayersNodeIndices[i2];\n const tensorIndex = this.outputLayersTensorIndices[i2];\n const shapeKey = `${layer.name}_${nodeIndex}_${tensorIndex}`;\n outputShapeKeys.push(shapeKey);\n }\n for (let i2 = 0; i2 < outputShapeKeys.length; i2++) {\n const key = outputShapeKeys[i2];\n assert2(key in layersToOutputShapes);\n outputShapes.push(layersToOutputShapes[key]);\n }\n return singletonOrArray(outputShapes);\n }\n runInternalGraph(inputs, masks) {\n if (masks == null) {\n masks = pyListRepeat(null, inputs.length);\n }\n const tensorMap = {};\n for (let i2 = 0; i2 < this.inputs.length; ++i2) {\n const x = this.inputs[i2];\n const y = inputs[i2];\n const mask = masks[i2];\n tensorMap[x.id] = [y, mask];\n }\n const depthKeys = Object.keys(this.nodesByDepth).map((x) => parseInt(x, 10)).sort(reverseNumberCompare);\n for (const depth of depthKeys) {\n const nodes = this.nodesByDepth[depth];\n for (const node of nodes) {\n const layer = node.outboundLayer;\n const referenceInputTensors = node.inputTensors;\n const referenceOutputTensors = node.outputTensors;\n const computedData = new Array();\n for (const x of referenceInputTensors) {\n if (x.id in tensorMap) {\n computedData.push(tensorMap[x.id]);\n }\n }\n if (computedData.length === referenceInputTensors.length) {\n let kwargs = {};\n let computedTensors;\n let computedMasks;\n let outputTensors2;\n let outputMasks2;\n if (node.callArgs != null) {\n kwargs = node.callArgs;\n }\n if (computedData.length === 1) {\n const [computedTensor, computedMask] = computedData[0];\n if (kwargs[\"mask\"] == null) {\n kwargs[\"mask\"] = computedMask;\n }\n outputTensors2 = toList(layer.call(computedTensor, kwargs));\n outputMasks2 = toList(layer.computeMask(computedTensor, computedMask));\n computedTensors = [computedTensor];\n computedMasks = [computedMask];\n } else {\n computedTensors = computedData.map((x) => x[0]);\n computedMasks = computedData.map((x) => x[1]);\n if (kwargs[\"mask\"] == null) {\n kwargs[\"mask\"] = computedMasks;\n }\n outputTensors2 = toList(layer.call(computedTensors, kwargs));\n outputMasks2 = toList(layer.computeMask(computedTensors, computedMasks));\n }\n if (layer.activityRegularizer) {\n throw new NotImplementedError(\"LayersModel invocation with concrete Tensor value(s) in the presence of activity regularizer(s) is not supported yet.\");\n }\n for (let i2 = 0; i2 < referenceOutputTensors.length; ++i2) {\n const x = referenceOutputTensors[i2];\n const y = outputTensors2[i2];\n const mask = outputMasks2[i2];\n tensorMap[x.id] = [y, mask];\n }\n }\n }\n }\n const outputTensors = [];\n const outputMasks = [];\n const outputShapes = [];\n for (const x of this.outputs) {\n assert2(x.id in tensorMap, `Could not compute output ${x.name} : ${x.id}`);\n const [tensor2, mask] = tensorMap[x.id];\n outputShapes.push(tensor2.shape);\n outputTensors.push(tensor2);\n outputMasks.push(mask);\n }\n return [outputTensors, outputMasks, outputShapes];\n }\n buildNodeConversionMap(layers) {\n const nodeConversionMap = {};\n let keptNodes;\n for (const layer of this.layers) {\n keptNodes = layer instanceof Container ? 1 : 0;\n for (let originalNodeIndex = 0; originalNodeIndex < layer.inboundNodes.length; originalNodeIndex++) {\n const nodeKey = Container.nodeKey(layer, originalNodeIndex);\n if (this.containerNodes.has(nodeKey)) {\n nodeConversionMap[nodeKey] = keptNodes;\n keptNodes += 1;\n }\n }\n }\n return nodeConversionMap;\n }\n getLayer(name, index) {\n if (index != null) {\n if (this.layers.length <= index) {\n throw new ValueError(`Was asked to retrieve layer at index ${index}, but model only has ${this.layers.length} layer(s).`);\n } else {\n return this.layers[index];\n }\n } else {\n if (name == null) {\n throw new ValueError(\"Provide either a layer name or layer index\");\n }\n }\n for (const layer of this.layers) {\n if (layer.name === name) {\n return layer;\n }\n }\n throw new ValueError(`No such layer: ${name}`);\n }\n calculateLosses() {\n return tidy(() => {\n const losses2 = [];\n for (const layer of this.layers) {\n for (let nodeIndex = 0; nodeIndex < layer.inboundNodes.length; ++nodeIndex) {\n const nodeKey = Container.nodeKey(layer, nodeIndex);\n if (this.containerNodes.has(nodeKey)) {\n losses2.push(...layer.calculateLosses());\n }\n }\n }\n return losses2;\n });\n }\n getConfig() {\n const config = { name: this.name };\n const nodeConversionMap = this.buildNodeConversionMap(this.layers);\n const layerConfigs = [];\n for (const layer of this.layers) {\n const layerClassName = layer.getClassName();\n const layerConfig = layer.getConfig();\n const filteredInboundNodes = [];\n for (let originalNodeIndex = 0; originalNodeIndex < layer.inboundNodes.length; originalNodeIndex++) {\n const node = layer.inboundNodes[originalNodeIndex];\n const nodeKey = Container.nodeKey(layer, originalNodeIndex);\n let kwargs = {};\n if (this.containerNodes.has(nodeKey)) {\n if (node.callArgs) {\n try {\n JSON.stringify(node.callArgs);\n kwargs = node.callArgs;\n } catch (err) {\n console.warn(`Layer ${layer.name} was passed non-serializable keyword arguments: ${node.callArgs}. They will not be included in the serialized model (and thus will be missing at deserialization time).`);\n kwargs = {};\n }\n }\n if (node.inboundLayers.length > 0) {\n const nodeData = [];\n for (let i2 = 0; i2 < node.inboundLayers.length; i2++) {\n const inboundLayer = node.inboundLayers[i2];\n const nodeIndex = node.nodeIndices[i2];\n const tensorIndex = node.tensorIndices[i2];\n const nodeKey2 = Container.nodeKey(inboundLayer, nodeIndex);\n let newNodeIndex = nodeConversionMap[nodeKey2];\n if (newNodeIndex == null) {\n newNodeIndex = 0;\n }\n nodeData.push([inboundLayer.name, newNodeIndex, tensorIndex, kwargs]);\n }\n filteredInboundNodes.push(nodeData);\n }\n }\n }\n const dict = {};\n dict[\"name\"] = layer.name;\n dict[\"className\"] = layerClassName;\n dict[\"config\"] = layerConfig;\n dict[\"inboundNodes\"] = filteredInboundNodes;\n layerConfigs.push(dict);\n }\n config[\"layers\"] = layerConfigs;\n const modelInputs = [];\n for (let i2 = 0; i2 < this.inputLayers.length; i2++) {\n const layer = this.inputLayers[i2];\n const nodeIndex = this.inputLayersNodeIndices[i2];\n const nodeKey = Container.nodeKey(layer, nodeIndex);\n if (!this.containerNodes.has(nodeKey)) {\n continue;\n }\n let newNodeIndex = nodeConversionMap[nodeKey];\n if (newNodeIndex === null || newNodeIndex === void 0) {\n newNodeIndex = 0;\n }\n const tensorIndex = this.inputLayersTensorIndices[i2];\n modelInputs.push([layer.name, newNodeIndex, tensorIndex]);\n }\n config[\"inputLayers\"] = modelInputs;\n const modelOutputs = [];\n for (let i2 = 0; i2 < this.outputLayers.length; i2++) {\n const layer = this.outputLayers[i2];\n const nodeIndex = this.outputLayersNodeIndices[i2];\n const nodeKey = Container.nodeKey(layer, nodeIndex);\n if (!this.containerNodes.has(nodeKey)) {\n continue;\n }\n let newNodeIndex = nodeConversionMap[nodeKey];\n if (newNodeIndex === null || newNodeIndex === void 0) {\n newNodeIndex = 0;\n }\n const tensorIndex = this.outputLayersTensorIndices[i2];\n modelOutputs.push([layer.name, newNodeIndex, tensorIndex]);\n }\n config[\"outputLayers\"] = modelOutputs;\n return config;\n }\n static fromConfig(cls, config, customObjects = {}, fastWeightInit = false) {\n const createdLayers = {};\n const unprocessedNodes = {};\n function addUnprocessedNode(layer, nodeData) {\n if (!(layer.name in unprocessedNodes)) {\n unprocessedNodes[layer.name] = [nodeData];\n } else {\n unprocessedNodes[layer.name].push(nodeData);\n }\n }\n function processNode(layer, nodeData) {\n const inputTensors2 = [];\n let kwargs;\n for (const inputData of nodeData) {\n const inboundLayerName = inputData[0];\n const inboundNodeIndex = inputData[1];\n const inboundTensorIndex = inputData[2];\n kwargs = inputData[3] == null ? {} : inputData[3];\n if (!(inboundLayerName in createdLayers)) {\n addUnprocessedNode(layer, nodeData);\n return;\n }\n const inboundLayer = createdLayers[inboundLayerName];\n if (inboundLayer.inboundNodes.length <= inboundNodeIndex) {\n addUnprocessedNode(layer, nodeData);\n return;\n }\n const inboundNode = inboundLayer.inboundNodes[inboundNodeIndex];\n inputTensors2.push(inboundNode.outputTensors[inboundTensorIndex]);\n }\n if (inputTensors2.length > 0) {\n layer.apply(singletonOrArray(inputTensors2), kwargs);\n }\n }\n function processLayer(layerData) {\n const layerName = layerData[\"name\"];\n const layer = deserialize(layerData, config[\"customObjects\"] != null ? config[\"customObjects\"] : {});\n layer.setFastWeightInitDuringBuild(fastWeightInit);\n createdLayers[layerName] = layer;\n const inboundNodesData = layerData[\"inboundNodes\"];\n inboundNodesData.forEach((nodeData) => {\n if (!(nodeData instanceof Array)) {\n throw new ValueError(`Corrupted configuration, expected array for nodeData: ${nodeData}`);\n }\n addUnprocessedNode(layer, nodeData);\n });\n }\n const name = config[\"name\"];\n const layersFromConfig = config[\"layers\"];\n for (const layerData of layersFromConfig) {\n processLayer(layerData);\n }\n while (!isObjectEmpty(unprocessedNodes)) {\n for (const layerData of layersFromConfig) {\n const layer = createdLayers[layerData[\"name\"]];\n if (layer.name in unprocessedNodes) {\n const currentUnprocessedNodesForLayer = unprocessedNodes[layer.name];\n delete unprocessedNodes[layer.name];\n for (const nodeData of currentUnprocessedNodesForLayer) {\n processNode(layer, nodeData);\n }\n }\n }\n }\n const inputTensors = [];\n const outputTensors = [];\n const inputLayersFromConfig = config[\"inputLayers\"];\n for (const layerData of inputLayersFromConfig) {\n const layerName = layerData[0];\n const nodeIndex = layerData[1];\n const tensorIndex = layerData[2];\n assert2(layerName in createdLayers);\n const layer = createdLayers[layerName];\n const layerOutputTensors = layer.inboundNodes[nodeIndex].outputTensors;\n inputTensors.push(layerOutputTensors[tensorIndex]);\n }\n const outputLayersFromConfig = config[\"outputLayers\"];\n for (const layerData of outputLayersFromConfig) {\n const layerName = layerData[0];\n const nodeIndex = layerData[1];\n const tensorIndex = layerData[2];\n assert2(layerName in createdLayers);\n const layer = createdLayers[layerName];\n const layerOutputTensors = layer.inboundNodes[nodeIndex].outputTensors;\n outputTensors.push(layerOutputTensors[tensorIndex]);\n }\n return new cls({ inputs: inputTensors, outputs: outputTensors, name });\n }\n get stateful() {\n if (this._stateful) {\n throw new ValueError(\"Container instance unexpectedly has _stateful = true. The statefulness of a Container is determined by the Layers it contains. Its _stateful property must remain the default false.\");\n }\n for (const layer of this.layers) {\n if (layer.stateful) {\n return true;\n }\n }\n return false;\n }\n resetStates() {\n tidy(() => {\n this.layers.forEach((layer) => {\n if (layer.stateful) {\n layer.resetStates();\n }\n });\n });\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/engine/training_utils.js\nfunction standardizeSampleOrClassWeights(xWeight, outputNames, weightType) {\n const numOutputs = outputNames.length;\n if (xWeight == null || Array.isArray(xWeight) && xWeight.length === 0) {\n return outputNames.map((name) => null);\n }\n if (numOutputs === 1) {\n if (Array.isArray(xWeight) && xWeight.length === 1) {\n return xWeight;\n } else if (typeof xWeight === \"object\" && outputNames[0] in xWeight) {\n return [xWeight[outputNames[0]]];\n } else {\n return [xWeight];\n }\n }\n if (Array.isArray(xWeight)) {\n if (xWeight.length !== numOutputs) {\n throw new Error(`Provided ${weightType} is an array of ${xWeight.length} element(s), but the model has ${numOutputs} outputs. Make sure a set of weights is provided for each model output.`);\n }\n return xWeight;\n } else if (typeof xWeight === \"object\" && Object.keys(xWeight).length > 0 && typeof xWeight[Object.keys(xWeight)[0]] === \"object\") {\n const output = [];\n outputNames.forEach((outputName) => {\n if (outputName in xWeight) {\n output.push(xWeight[outputName]);\n } else {\n output.push(null);\n }\n });\n return output;\n } else {\n throw new Error(`The model has multiple (${numOutputs}) outputs, so ${weightType} must be either an array with ${numOutputs} elements or an object with ${outputNames} keys. Provided ${weightType} not understood: ${JSON.stringify(xWeight)}`);\n }\n}\nfunction standardizeClassWeights(classWeight, outputNames) {\n return standardizeSampleOrClassWeights(classWeight, outputNames, \"classWeight\");\n}\nasync function standardizeWeights(y, sampleWeight, classWeight, sampleWeightMode) {\n if (sampleWeight != null || sampleWeightMode != null) {\n throw new Error(\"Support sampleWeight is not implemented yet\");\n }\n if (classWeight != null) {\n const yClasses = tidy(() => {\n if (y.shape.length === 1) {\n return clone(y);\n } else if (y.shape.length === 2) {\n if (y.shape[1] > 1) {\n const axis = 1;\n return argMax(y, axis);\n } else if (y.shape[1] === 1) {\n return reshape(y, [y.shape[0]]);\n } else {\n throw new Error(`Encountered unexpected last-dimension size (${y.shape[1]}) during handling of class weights. The size is expected to be >= 1.`);\n }\n } else {\n throw new Error(`Unexpected rank of target (y) tensor (${y.rank}) during handling of class weights. The rank is expected to be 1 or 2.`);\n }\n });\n const yClassIndices = Array.from(await yClasses.data());\n dispose(yClasses);\n const classSampleWeight = [];\n yClassIndices.forEach((classIndex) => {\n if (classWeight[classIndex] == null) {\n throw new Error(`classWeight must contain all classes in the training data. The class ${classIndex} exists in the data but not in classWeight`);\n } else {\n classSampleWeight.push(classWeight[classIndex]);\n }\n });\n return tensor1d(classSampleWeight, \"float32\");\n } else {\n return null;\n }\n}\nfunction computeWeightedLoss2(losses2, sampleWeights) {\n return mul(losses2, sampleWeights);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/engine/training_dataset.js\nvar DEFAULT_VALIDATION_BATCH_SIZE = 32;\nfunction standardizeDataIteratorOutput(model2, iteratorOut) {\n let xs;\n let ys;\n const iteratorOutObj = iteratorOut;\n xs = iteratorOutObj[\"xs\"];\n ys = iteratorOutObj[\"ys\"];\n util_exports.assert(xs != null && ys != null, () => `A Dataset iterator for fitDataset() is expected to generate objects of the form \\`{xs: xVal, ys: yVal}\\`, where the two values may be \\`tf.Tensor\\`, an array of Tensors, or a map of string to Tensor. The provided Dataset instead generates ${iteratorOut}`);\n const flattenedXs = flattenTensorOrArrayOrMap(\"input\", model2.inputNames, xs);\n const flattenedYs = flattenTensorOrArrayOrMap(\"output\", model2.outputNames, ys);\n const batchSize = flattenedXs[0].shape[0];\n util_exports.assert(flattenedXs.length === model2.inputs.length, () => `LayersModel has ${model2.inputs.length} inputs, but the dataset provides ${flattenedXs.length} inputs. (Expected input keys: ${JSON.stringify(model2.inputNames)})`);\n util_exports.assert(flattenedYs.length === model2.outputs.length, () => `LayersModel has ${model2.outputs.length} outputs, but the dataset provides ${flattenedYs.length} outputs. (Expected output keys: ${JSON.stringify(model2.outputNames)})`);\n for (let xIndex = 0; xIndex < flattenedXs.length; xIndex++) {\n util_exports.assert(flattenedXs[xIndex].shape[0] === batchSize, () => `Batch size mismatch: input ${model2.inputNames[xIndex]} has ${flattenedXs[xIndex].shape[0]}; expected ${batchSize} based on input ${model2.inputNames[0]}.`);\n }\n for (let yIndex = 0; yIndex < flattenedYs.length; yIndex++) {\n util_exports.assert(flattenedYs[yIndex].shape[0] === batchSize, () => `Batch size mismatch: output ${model2.outputNames[yIndex]} has ${flattenedYs[yIndex].shape[0]}; expected ${batchSize} based on input ${model2.inputNames[0]}.`);\n }\n return { xs: flattenedXs, ys: flattenedYs };\n}\nfunction flattenTensorOrArrayOrMap(inputOrOutput, names, values) {\n if (values instanceof Tensor) {\n return [values];\n } else if (Array.isArray(values)) {\n util_exports.assert(values.length === names.length, () => `Received an array of ${values.length} Tensors, but expected ${names.length} to match the ${inputOrOutput} keys ${names}.`);\n return values;\n } else {\n const result = [];\n for (const name of names) {\n if (values[name] == null) {\n throw new ValueError(`The feature data generated by the dataset lacks the required ${inputOrOutput} key '${name}'.`);\n }\n result.push(values[name]);\n }\n return result;\n }\n}\nfunction standardizeTensorValidationData(data) {\n if (data.length === 3) {\n throw new NotImplementedError(\"Validation with sample weights is not implemented yet.\");\n }\n return { xs: data[0], ys: data[1] };\n}\nasync function fitDataset(model2, dataset, args) {\n const hasBatchesPerEpoch = args.batchesPerEpoch != null;\n util_exports.assert(model2.optimizer != null, () => \"You must compile a model before training/testing. Use LayersModel.compile(modelCompileConfig).\");\n util_exports.assert(args != null, () => `For fitDataset(), the 2nd argument (config) is required, but it is not provided in this call.`);\n util_exports.assert(args.epochs != null && args.epochs > 0 && Number.isInteger(args.epochs), () => `For fitDataset(), config.epochs is expected to be a positive integer, but got ${args.epochs}`);\n util_exports.assert(!hasBatchesPerEpoch || args.batchesPerEpoch > 0 && Number.isInteger(args.batchesPerEpoch), () => `For fitDataset(), config.batchesPerEpoch is expected to be a positive integer if specified, but got ${args.batchesPerEpoch}`);\n util_exports.assert(\n args[\"validationSplit\"] == null,\n () => \"`validationSplit` is not supported by `fitDataset()`. Use validationData instead.\"\n );\n if (model2.isTraining) {\n throw new Error(\"Cannot start training because another fit() call is ongoing.\");\n }\n model2.isTraining = true;\n try {\n const doValidation = args.validationData != null;\n let valXs;\n let valYs;\n if (doValidation) {\n if (isDatasetObject(args.validationData)) {\n util_exports.assert(args.validationBatches == null || args.validationBatches > 0 && Number.isInteger(args.validationBatches), () => `For fitDataset() with dataset-based validation, config.validationBatches is expected not to be provided, or to be a positive integer, but got ${args.validationBatches}`);\n } else {\n const validationData = standardizeTensorValidationData(args.validationData);\n valXs = validationData.xs;\n valYs = validationData.ys;\n }\n }\n const trainFunction = model2.makeTrainFunction();\n const outLabels = model2.getDedupedMetricsNames();\n let callbackMetrics;\n if (doValidation) {\n callbackMetrics = outLabels.slice().concat(outLabels.map((n2) => \"val_\" + n2));\n } else {\n callbackMetrics = outLabels.slice();\n }\n const callbacks2 = standardizeCallbacks(args.callbacks, args.yieldEvery);\n const verbose = args.verbose == null ? 1 : args.verbose;\n const { callbackList, history } = configureCallbacks(\n callbacks2,\n verbose,\n args.epochs,\n null,\n null,\n getStepsPerEpoch(dataset, args),\n null,\n doValidation,\n callbackMetrics\n );\n callbackList.setModel(model2);\n model2.history = history;\n await callbackList.onTrainBegin();\n model2.stopTraining_ = false;\n let epoch = args.initialEpoch == null ? 0 : args.initialEpoch;\n let dataIterator = await dataset.iterator();\n while (epoch < args.epochs) {\n const epochLogs = {};\n await callbackList.onEpochBegin(epoch);\n let stepsDone = 0;\n let batchIndex = 0;\n if (!hasBatchesPerEpoch) {\n dataIterator = await dataset.iterator();\n }\n while (hasBatchesPerEpoch ? stepsDone < args.batchesPerEpoch : true) {\n const iteratorOut = await dataIterator.next();\n if (hasBatchesPerEpoch && iteratorOut.done) {\n console.warn(`You provided \\`batchesPerEpoch\\` as ${args.batchesPerEpoch}, but your dataset iterator ran out of data after ${stepsDone} batches; interrupting training. Make sure that your dataset can generate at least \\`batchesPerEpoch * epochs\\` batches (in this case, ${args.batchesPerEpoch * args.epochs} batches). You may need to use the repeat() function when building your dataset.`);\n break;\n }\n if (iteratorOut.value != null) {\n const { xs, ys } = standardizeDataIteratorOutput(model2, iteratorOut.value);\n const batchLogs = {};\n batchLogs[\"batch\"] = batchIndex;\n batchLogs[\"size\"] = xs[0].shape[0];\n await callbackList.onBatchBegin(batchIndex, batchLogs);\n const sampleWeights = [];\n if (args.classWeight != null) {\n const standardClassWeights = standardizeClassWeights(args.classWeight, model2.outputNames);\n for (let i2 = 0; i2 < standardClassWeights.length; ++i2) {\n sampleWeights.push(await standardizeWeights(ys[i2], null, standardClassWeights[i2]));\n }\n }\n const ins = xs.concat(ys).concat(sampleWeights);\n const outs = trainFunction(ins);\n dispose(ins);\n for (let i2 = 0; i2 < outLabels.length; ++i2) {\n const label = outLabels[i2];\n const out = outs[i2];\n batchLogs[label] = out;\n keep(out);\n }\n await callbackList.onBatchEnd(batchIndex, batchLogs);\n disposeTensorsInLogs(batchLogs);\n batchIndex++;\n stepsDone++;\n }\n if (hasBatchesPerEpoch ? stepsDone >= args.batchesPerEpoch : iteratorOut.done) {\n if (doValidation) {\n let valOuts;\n if (isDatasetObject(args.validationData)) {\n valOuts = toList(await model2.evaluateDataset(args.validationData, { batches: args.validationBatches }));\n } else {\n valOuts = toList(model2.evaluate(valXs, valYs, {\n batchSize: args.validationBatchSize == null ? DEFAULT_VALIDATION_BATCH_SIZE : args.validationBatchSize,\n verbose: 0\n }));\n }\n for (let i2 = 0; i2 < model2.metricsNames.length; ++i2) {\n epochLogs[`val_${model2.metricsNames[i2]}`] = valOuts[i2];\n }\n }\n break;\n }\n if (model2.stopTraining_) {\n break;\n }\n }\n await callbackList.onEpochEnd(epoch, epochLogs);\n epoch++;\n if (model2.stopTraining_) {\n break;\n }\n }\n await callbackList.onTrainEnd();\n await model2.history.syncData();\n return model2.history;\n } finally {\n model2.isTraining = false;\n }\n}\nfunction getStepsPerEpoch(dataset, args) {\n let stepsPerEpoch = null;\n if (args.batchesPerEpoch != null) {\n stepsPerEpoch = args.batchesPerEpoch;\n } else if (Number.isFinite(dataset.size)) {\n stepsPerEpoch = dataset.size;\n }\n return stepsPerEpoch;\n}\nfunction isDatasetObject(dataset) {\n return typeof dataset.iterator === \"function\";\n}\nfunction isLazyIteratorObject(iterator) {\n return typeof iterator.next === \"function\";\n}\nasync function evaluateDataset(model2, dataset, args) {\n args = args || {};\n const hasBatches = args.batches != null;\n const f = model2.testFunction;\n let outs = [];\n if (args.verbose > 0) {\n throw new NotImplementedError(\"Verbose mode is not implemented yet.\");\n }\n util_exports.assert(!hasBatches || args.batches > 0 && Number.isInteger(args.batches), () => `Test loop expects \\`batches\\` to be a positive integer, but received ${JSON.stringify(args.batches)}`);\n const dataIterator = isLazyIteratorObject(dataset) ? dataset : await dataset.iterator();\n let numExamples = 0;\n let batch = 0;\n while (hasBatches ? batch < args.batches : true) {\n const iteratorOut = await dataIterator.next();\n outs = tidy(() => {\n if (iteratorOut.value) {\n const { xs, ys } = standardizeDataIteratorOutput(model2, iteratorOut.value);\n const xsAndYs = xs.concat(ys);\n const batchOuts = tidy(() => f(xsAndYs));\n dispose(xsAndYs);\n if (batch === 0) {\n for (let i2 = 0; i2 < batchOuts.length; ++i2) {\n outs.push(scalar(0));\n }\n }\n const batchSize = xsAndYs[0].shape[0];\n for (let i2 = 0; i2 < batchOuts.length; ++i2) {\n const batchOut = batchOuts[i2];\n const oldScalar = outs[i2];\n outs[i2] = tidy(() => add2(outs[i2], mul(batchSize, batchOut)));\n if (batch > 0) {\n dispose(oldScalar);\n }\n }\n dispose(batchOuts);\n numExamples += batchSize;\n ++batch;\n }\n return outs;\n });\n if (iteratorOut.done) {\n if (hasBatches) {\n console.warn(`Your dataset iterator ran out of data during evaluateDataset(). Interrupting evalution. Make sure that your dataset can generate at least \\`batches\\` batches (in this case, ${args.batches} batches). You may need to use the repeat() function when building your dataset.`);\n }\n break;\n }\n }\n for (let i2 = 0; i2 < outs.length; ++i2) {\n const oldScalar = outs[i2];\n outs[i2] = div(outs[i2], numExamples);\n dispose(oldScalar);\n }\n return singletonOrArray(outs);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/engine/training_tensors.js\nfunction checkBatchSize(batchSize) {\n util_exports.assert(batchSize > 0 && Number.isInteger(batchSize), () => `batchSize is required to be a positive integer, but got ${batchSize}`);\n}\nfunction sliceArrays(arrays, start, stop) {\n if (arrays == null) {\n return [null];\n } else if (Array.isArray(arrays)) {\n return arrays.map((array2) => sliceAlongFirstAxis(array2, start, stop - start));\n } else {\n return sliceAlongFirstAxis(arrays, start, stop - start);\n }\n}\nfunction sliceArraysByIndices(arrays, indices) {\n return tidy(() => {\n if (arrays == null) {\n return null;\n } else if (Array.isArray(arrays)) {\n return arrays.map((array2) => sliceArraysByIndices(array2, indices));\n } else {\n return gather2(arrays, indices.dtype === \"int32\" ? indices : cast(indices, \"int32\"));\n }\n });\n}\nfunction makeBatches(size, batchSize) {\n const output = [];\n let batchStart = 0;\n let batchEnd = null;\n while (batchStart < size) {\n batchEnd = batchStart + batchSize;\n if (batchEnd >= size) {\n batchEnd = size;\n }\n output.push([batchStart, batchEnd]);\n batchStart = batchEnd;\n }\n return output;\n}\nasync function fitLoop(model2, f, ins, outLabels, batchSize, epochs, verbose, callbacks2, valF, valIns, shuffle2, callbackMetrics, initialEpoch, stepsPerEpoch, validationSteps) {\n if (batchSize == null) {\n batchSize = 32;\n }\n if (epochs == null) {\n epochs = 1;\n }\n if (shuffle2 == null) {\n shuffle2 = true;\n }\n if (initialEpoch == null) {\n initialEpoch = 0;\n }\n let doValidation = false;\n if (valF != null && valIns != null) {\n doValidation = true;\n }\n if (validationSteps != null) {\n doValidation = true;\n if (stepsPerEpoch == null) {\n throw new ValueError(\"Can only use `validationSteps` when doing step-wise training, i.e., `stepsPerEpoch` must be set.\");\n }\n }\n const numTrainSamples = model2.checkNumSamples(ins, batchSize, stepsPerEpoch, \"steps_per_epoch\");\n let indexArray;\n if (numTrainSamples != null) {\n indexArray = range2(0, numTrainSamples);\n }\n if (verbose == null) {\n verbose = 1;\n }\n const { callbackList, history } = configureCallbacks(callbacks2, verbose, epochs, initialEpoch, numTrainSamples, stepsPerEpoch, batchSize, doValidation, callbackMetrics);\n callbackList.setModel(model2);\n model2.history = history;\n await callbackList.onTrainBegin();\n model2.stopTraining_ = false;\n for (let epoch = initialEpoch; epoch < epochs; ++epoch) {\n await callbackList.onEpochBegin(epoch);\n const epochLogs = {};\n if (stepsPerEpoch != null) {\n throw new NotImplementedError(\"stepsPerEpoch mode is not implemented yet.\");\n } else {\n if (shuffle2 === \"batch\") {\n throw new NotImplementedError(\"batch shuffling is not implemneted yet\");\n } else if (shuffle2) {\n util_exports.shuffle(indexArray);\n }\n const epochIndexArray1D = tensor1d(indexArray);\n const batches = makeBatches(numTrainSamples, batchSize);\n for (let batchIndex = 0; batchIndex < batches.length; ++batchIndex) {\n const batchLogs = {};\n await callbackList.onBatchBegin(batchIndex, batchLogs);\n tidy(() => {\n const batchStart = batches[batchIndex][0];\n const batchEnd = batches[batchIndex][1];\n const batchIds = sliceAlongFirstAxis(epochIndexArray1D, batchStart, batchEnd - batchStart);\n batchLogs[\"batch\"] = batchIndex;\n batchLogs[\"size\"] = batchEnd - batchStart;\n const insBatch = sliceArraysByIndices(ins, batchIds);\n const outs = f(insBatch);\n for (let i2 = 0; i2 < outLabels.length; ++i2) {\n const label = outLabels[i2];\n const out = outs[i2];\n batchLogs[label] = out;\n keep(out);\n }\n if (batchIndex === batches.length - 1) {\n if (doValidation) {\n const valOuts = model2.testLoop(valF, valIns, batchSize);\n for (let i2 = 0; i2 < outLabels.length; ++i2) {\n const label = outLabels[i2];\n const out = valOuts[i2];\n keep(out);\n epochLogs[\"val_\" + label] = out;\n }\n }\n }\n });\n await callbackList.onBatchEnd(batchIndex, batchLogs);\n disposeTensorsInLogs(batchLogs);\n if (model2.stopTraining_) {\n break;\n }\n }\n epochIndexArray1D.dispose();\n }\n await callbackList.onEpochEnd(epoch, epochLogs);\n if (model2.stopTraining_) {\n break;\n }\n }\n await callbackList.onTrainEnd();\n await model2.history.syncData();\n return model2.history;\n}\nasync function fitTensors(model2, x, y, args = {}) {\n if (model2.isTraining) {\n throw new Error(\"Cannot start training because another fit() call is ongoing.\");\n }\n model2.isTraining = true;\n let inputs;\n let targets;\n let originalInputs;\n let originalTargets;\n let inputValX;\n let inputValY;\n let valX;\n let valY;\n let sampleWeights;\n try {\n const batchSize = args.batchSize == null ? 32 : args.batchSize;\n checkBatchSize(batchSize);\n const checkBatchAxis = false;\n const standardizedOuts = await model2.standardizeUserData(x, y, args.sampleWeight, args.classWeight, checkBatchAxis, batchSize);\n inputs = standardizedOuts[0];\n targets = standardizedOuts[1];\n sampleWeights = standardizedOuts[2];\n let doValidation = false;\n let valIns;\n if (args.validationData != null && args.validationData.length > 0) {\n doValidation = true;\n if (args.validationData.length === 2) {\n inputValX = args.validationData[0];\n inputValY = args.validationData[1];\n } else if (args.validationData.length === 3) {\n throw new NotImplementedError(\"validationData including sample weights is not supported yet.\");\n } else {\n throw new ValueError(`When passing validation data, it must contain 2 (valX, valY) or 3 (valX, valY, valSampleWeight) items; ${args.validationData} is invalid.`);\n }\n const checkBatchAxis2 = true;\n const valStandardized = await model2.standardizeUserData(inputValX, inputValY, null, null, checkBatchAxis2, batchSize);\n valX = valStandardized[0];\n valY = valStandardized[1];\n valIns = valX.concat(valY);\n } else if (args.validationSplit != null && args.validationSplit > 0 && args.validationSplit < 1) {\n doValidation = true;\n const splitAt = Math.floor(inputs[0].shape[0] * (1 - args.validationSplit));\n const originalBatchSize = inputs[0].shape[0];\n valX = sliceArrays(inputs, splitAt, originalBatchSize);\n originalInputs = inputs;\n inputs = sliceArrays(inputs, 0, splitAt);\n valY = sliceArrays(targets, splitAt, originalBatchSize);\n originalTargets = targets;\n targets = sliceArrays(targets, 0, splitAt);\n valIns = valX.concat(valY);\n } else if (args.validationSteps != null) {\n doValidation = true;\n }\n const ins = inputs.concat(targets).concat(sampleWeights);\n model2.checkTrainableWeightsConsistency();\n const trainFunction = model2.makeTrainFunction();\n const outLabels = model2.getDedupedMetricsNames();\n let valFunction;\n let callbackMetrics;\n if (doValidation) {\n model2.makeTestFunction();\n valFunction = model2.testFunction;\n callbackMetrics = outLabels.slice().concat(outLabels.map((n2) => \"val_\" + n2));\n } else {\n valFunction = null;\n valIns = [];\n callbackMetrics = outLabels.slice();\n }\n const callbacks2 = standardizeCallbacks(args.callbacks, args.yieldEvery);\n const out = await fitLoop(model2, trainFunction, ins, outLabels, batchSize, args.epochs, args.verbose, callbacks2, valFunction, valIns, args.shuffle, callbackMetrics, args.initialEpoch, null, null);\n return out;\n } finally {\n model2.isTraining = false;\n disposeNewTensors(inputs, x);\n disposeNewTensors(targets, y);\n disposeNewTensors(originalInputs, x);\n disposeNewTensors(originalTargets, y);\n disposeNewTensors(valX, inputValX);\n disposeNewTensors(valY, inputValY);\n if (sampleWeights != null) {\n dispose(sampleWeights);\n }\n }\n}\nfunction ensureTensorsRank2OrHigher(tensors) {\n const outs = [];\n if (tensors instanceof Tensor) {\n tensors = [tensors];\n }\n for (let i2 = 0; i2 < tensors.length; ++i2) {\n const tensor2 = tensors[i2];\n if (tensor2.rank === 1) {\n outs.push(expandDims2(tensor2, 1));\n } else if (tensor2.rank === 0) {\n throw new Error(\"Expected tensor to be at least 1D, but received a 0D tensor (scalar).\");\n } else {\n outs.push(tensor2);\n }\n }\n return outs;\n}\nfunction disposeNewTensors(tensors, refTensors) {\n if (tensors == null) {\n return;\n }\n const oldTensorIds = [];\n if (refTensors instanceof Tensor) {\n oldTensorIds.push(refTensors.id);\n } else if (Array.isArray(refTensors)) {\n refTensors.forEach((t2) => oldTensorIds.push(t2.id));\n } else if (refTensors != null) {\n for (const name in refTensors) {\n const oldTensor = refTensors[name];\n oldTensorIds.push(oldTensor.id);\n }\n }\n const tensorsToDispose = [];\n if (tensors instanceof Tensor) {\n if (oldTensorIds.indexOf(tensors.id) === -1) {\n tensorsToDispose.push(tensors);\n }\n } else if (Array.isArray(tensors)) {\n tensors.forEach((t2) => {\n if (oldTensorIds.indexOf(t2.id) === -1) {\n tensorsToDispose.push(t2);\n }\n });\n } else if (tensors != null) {\n for (const name in tensors) {\n const tensor2 = tensors[name];\n if (oldTensorIds.indexOf(tensor2.id) === -1) {\n tensorsToDispose.push(tensor2);\n }\n }\n }\n tensorsToDispose.forEach((t2) => {\n if (!t2.isDisposed) {\n t2.dispose();\n }\n });\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/engine/training.js\nfunction isDataTensor(x) {\n return x instanceof Tensor;\n}\nfunction isDataArray(x) {\n return Array.isArray(x);\n}\nfunction isDataDict(x) {\n return !isDataTensor(x) && !isDataArray(x);\n}\nfunction standardizeInputData(data, names, shapes, checkBatchAxis = true, exceptionPrefix = \"\") {\n if (names == null || names.length === 0) {\n if (data != null) {\n let gotUnexpectedData = false;\n if (isDataArray(data) && data.length > 0) {\n gotUnexpectedData = true;\n } else if (isDataDict(data)) {\n for (const key in data) {\n if (data.hasOwnProperty(key)) {\n gotUnexpectedData = true;\n break;\n }\n }\n } else {\n gotUnexpectedData = true;\n }\n if (gotUnexpectedData) {\n throw new ValueError(`Error when checking model ${exceptionPrefix} expected no data, but got ${data}`);\n }\n }\n return [];\n }\n if (data == null) {\n return names.map((name) => null);\n }\n let arrays;\n if (isDataDict(data)) {\n data = data;\n arrays = [];\n for (const name of names) {\n if (data[name] == null) {\n throw new ValueError(`No data provided for \"${name}\". Need data for each key in: ${names}`);\n }\n arrays.push(data[name]);\n }\n } else if (isDataArray(data)) {\n data = data;\n if (data.length !== names.length) {\n throw new ValueError(`Error when checking model ${exceptionPrefix}: the Array of Tensors that you are passing to your model is not the size the model expected. Expected to see ${names.length} Tensor(s), but instead got the following list of Tensor(s): ${data}`);\n }\n arrays = data;\n } else {\n data = data;\n if (names.length > 1) {\n throw new ValueError(`The model ${exceptionPrefix} expects ${names.length} Tensor(s), but only received one Tensor. Found: Tensor with shape ${data.shape}`);\n }\n arrays = [data];\n }\n arrays = ensureTensorsRank2OrHigher(arrays);\n if (shapes != null) {\n for (let i2 = 0; i2 < names.length; ++i2) {\n if (shapes[i2] == null) {\n continue;\n }\n const array2 = arrays[i2];\n if (array2.shape.length !== shapes[i2].length) {\n throw new ValueError(`Error when checking ${exceptionPrefix}: expected ${names[i2]} to have ${shapes[i2].length} dimension(s). but got array with shape ${array2.shape}`);\n }\n for (let j = 0; j < shapes[i2].length; ++j) {\n if (j === 0 && !checkBatchAxis) {\n continue;\n }\n const dim = array2.shape[j];\n const refDim = shapes[i2][j];\n if (refDim != null && refDim >= 0 && dim !== refDim) {\n throw new ValueError(`${exceptionPrefix} expected a batch of elements where each example has shape [${shapes[i2].slice(1, shapes[i2].length)}] (i.e.,tensor shape [*,${shapes[i2].slice(1, shapes[i2].length)}]) but the ${exceptionPrefix} received an input with ${array2.shape[0]} examples, each with shape [${array2.shape.slice(1, array2.shape.length)}] (tensor shape [${array2.shape}])`);\n }\n }\n }\n }\n return arrays;\n}\nfunction checkArrayLengths(inputs, targets, weights) {\n const setX = unique2(inputs.map((input2) => input2.shape[0]));\n setX.sort();\n const setY = unique2(targets.map((target) => target.shape[0]));\n setY.sort();\n if (setX.length > 1) {\n throw new ValueError(`All input Tensors (x) should have the same number of samples. Got array shapes: ${JSON.stringify(inputs.map((input2) => input2.shape))}`);\n }\n if (setY.length > 1) {\n throw new ValueError(`All target Tensors (y) should have the same number of samples. Got array shapes: ${JSON.stringify(targets.map((target) => target.shape))}`);\n }\n if (setX.length > 0 && setY.length > 0 && !util_exports.arraysEqual(setX, setY)) {\n throw new ValueError(`Input Tensors should have the same number of samples as target Tensors. Found ${setX[0]} input sample(s) and ${setY[0]} target sample(s).`);\n }\n}\nfunction checkLossAndTargetCompatibility(targets, lossFns, outputShapes) {\n const keyLosses = [\n meanSquaredError2,\n binaryCrossentropy,\n categoricalCrossentropy\n ];\n for (let i2 = 0; i2 < targets.length; ++i2) {\n const y = targets[i2];\n const loss = lossFns[i2];\n const shape = outputShapes[i2];\n if (loss == null) {\n continue;\n }\n if (loss === categoricalCrossentropy) {\n if (y.shape[y.shape.length - 1] === 1) {\n throw new ValueError(`You are passing a target array of shape ${y.shape} while using a loss 'categorical_crossentropy'. 'categorical_crossentropy'expects targets to be binary matrices (1s and 0s) of shape [samples, classes].`);\n }\n }\n if (keyLosses.indexOf(loss) !== -1) {\n const slicedYShape = y.shape.slice(1);\n const slicedShape = shape.slice(1);\n for (let j = 0; j < slicedYShape.length; ++j) {\n const targetDim = slicedYShape[j];\n const outDim = slicedShape[j];\n if (outDim != null && targetDim !== outDim) {\n throw new ValueError(`A target Tensor with shape ${y.shape} was passed for an output of shape ${shape}, while using a loss function that expects targets to have the same shape as the output.`);\n }\n }\n }\n }\n}\nfunction checkInputData(data, names, shapes, checkBatchAxis = true, exceptionPrefix = \"\") {\n let arrays;\n if (Array.isArray(data)) {\n if (data.length !== names.length) {\n throw new ValueError(`Error when checking model ${exceptionPrefix}: the Array of Tensors that you are passing to your model is not the size the the model expected. Expected to see ${names.length} Tensor(s), but instead got ${data.length} Tensors(s).`);\n }\n arrays = data;\n } else {\n if (names.length > 1) {\n throw new ValueError(`The model expects ${names.length} ${exceptionPrefix} Tensors, but only received one Tensor. Found: array with shape ${JSON.stringify(data.shape)}.`);\n }\n arrays = [data];\n }\n if (shapes != null) {\n for (let i2 = 0; i2 < names.length; ++i2) {\n if (shapes[i2] == null) {\n continue;\n }\n const array2 = arrays[i2];\n if (array2.shape.length !== shapes[i2].length) {\n throw new ValueError(`Error when checking ${exceptionPrefix}: expected ${names[i2]} to have ${shapes[i2].length} dimension(s), but got array with shape ${JSON.stringify(array2.shape)}`);\n }\n for (let j = 0; j < shapes[i2].length; ++j) {\n if (j === 0 && !checkBatchAxis) {\n continue;\n }\n const dim = array2.shape[j];\n const refDim = shapes[i2][j];\n if (refDim != null) {\n if (refDim !== dim) {\n throw new ValueError(`Error when checking ${exceptionPrefix}: expected ${names[i2]} to have shape ${JSON.stringify(shapes[i2])} but got array with shape ${JSON.stringify(array2.shape)}.`);\n }\n }\n }\n }\n }\n}\nfunction collectMetrics(metrics, outputNames) {\n if (metrics == null || Array.isArray(metrics) && metrics.length === 0) {\n return outputNames.map((name) => []);\n }\n let wrappedMetrics;\n if (typeof metrics === \"string\" || typeof metrics === \"function\") {\n wrappedMetrics = [metrics];\n } else if (Array.isArray(metrics) || typeof metrics === \"object\") {\n wrappedMetrics = metrics;\n } else {\n throw new TypeError(`Type of metrics argument not understood. Expected an string,function, Array, or Object, found: ${metrics}`);\n }\n if (Array.isArray(wrappedMetrics)) {\n return outputNames.map((name) => wrappedMetrics);\n } else {\n const nestedMetrics = [];\n for (const name of outputNames) {\n let outputMetrics = wrappedMetrics.hasOwnProperty(name) ? wrappedMetrics[name] : [];\n if (!Array.isArray(outputMetrics)) {\n outputMetrics = [outputMetrics];\n }\n nestedMetrics.push(outputMetrics);\n }\n return nestedMetrics;\n }\n}\nvar LAYERS_MODEL_FORMAT_NAME = \"layers-model\";\nvar LayersModel = class extends Container {\n constructor(args) {\n super(args);\n this.isTraining = false;\n }\n summary(lineLength, positions, printFn = console.log) {\n if (!this.built) {\n throw new ValueError(`This model has never been called, thus its weights have not been created yet. So no summary can be displayed. Build the model first (e.g., by calling it on some test data).`);\n }\n printSummary(this, lineLength, positions, printFn);\n }\n compile(args) {\n if (args.loss == null) {\n args.loss = [];\n }\n this.loss = args.loss;\n if (typeof args.optimizer === \"string\") {\n this.optimizer_ = getOptimizer(args.optimizer);\n this.isOptimizerOwned = true;\n } else {\n if (!(args.optimizer instanceof Optimizer)) {\n throw new ValueError(`User-defined optimizer must be an instance of tf.Optimizer.`);\n }\n this.optimizer_ = args.optimizer;\n this.isOptimizerOwned = false;\n }\n let lossFunctions = [];\n if (!Array.isArray(args.loss) && typeof args.loss !== \"string\" && typeof args.loss !== \"function\") {\n args.loss = args.loss;\n for (const name in args.loss) {\n if (this.outputNames.indexOf(name) === -1) {\n throw new ValueError(`Unknown entry in loss dictionary: \"${name}\". Only expected the following keys: ${this.outputNames}`);\n }\n }\n for (const name of this.outputNames) {\n if (args.loss[name] == null) {\n console.warn(`Output \"${name}\" is missing from loss dictionary. We assume this was done on purpose, and we will not be expecting data to be passed to ${name} during training`);\n }\n lossFunctions.push(get(args.loss[name]));\n }\n } else if (Array.isArray(args.loss)) {\n if (args.loss.length !== this.outputs.length) {\n throw new ValueError(`When passing an Array as loss, it should have one entry per model output. The model has ${this.outputs.length} output(s), but you passed loss=${args.loss}.`);\n }\n const theLosses = args.loss;\n lossFunctions = theLosses.map((l3) => get(l3));\n } else {\n const lossFunction = get(args.loss);\n this.outputs.forEach((_) => {\n lossFunctions.push(lossFunction);\n });\n }\n this.lossFunctions = lossFunctions;\n this.feedOutputNames = [];\n this.feedOutputShapes = [];\n this.feedLossFns = [];\n for (let i2 = 0; i2 < this.outputs.length; ++i2) {\n const shape = this.internalOutputShapes[i2];\n const name = this.outputNames[i2];\n this.feedOutputNames.push(name);\n this.feedOutputShapes.push(shape);\n this.feedLossFns.push(this.lossFunctions[i2]);\n }\n const skipTargetIndices = [];\n this.metrics = args.metrics;\n this.metricsNames = [\"loss\"];\n this.metricsTensors = [];\n nameScope(\"loss\", () => {\n for (let i2 = 0; i2 < this.outputs.length; ++i2) {\n if (skipTargetIndices.indexOf(i2) !== -1) {\n continue;\n }\n const weightedLoss = this.lossFunctions[i2];\n if (this.outputs.length > 1) {\n this.metricsTensors.push([weightedLoss, i2]);\n this.metricsNames.push(this.outputNames[i2] + \"_loss\");\n }\n }\n });\n const nestedMetrics = collectMetrics(args.metrics, this.outputNames);\n const appendMetric = (outputIndex, metricName, metricTensor) => {\n if (this.outputNames.length > 1) {\n metricName = this.outputNames[outputIndex] + \"_\" + metricName;\n }\n this.metricsNames.push(metricName);\n this.metricsTensors.push([metricTensor, outputIndex]);\n };\n nameScope(\"metric\", () => {\n for (let i2 = 0; i2 < this.outputs.length; ++i2) {\n if (skipTargetIndices.indexOf(i2) !== -1) {\n continue;\n }\n const outputMetrics = nestedMetrics[i2];\n const handleMetrics = (metrics) => {\n const metricNamePrefix = \"\";\n let metricName;\n let accFn;\n let weightedMetricFn;\n for (const metric of metrics) {\n if (typeof metric === \"string\" && [\"accuracy\", \"acc\", \"crossentropy\", \"ce\"].indexOf(metric) !== -1) {\n const outputShape = this.internalOutputShapes[i2];\n if (outputShape[outputShape.length - 1] === 1 || this.lossFunctions[i2] === binaryCrossentropy) {\n if ([\"accuracy\", \"acc\"].indexOf(metric) !== -1) {\n accFn = binaryAccuracy;\n } else if ([\"crossentropy\", \"ce\"].indexOf(metric) !== -1) {\n accFn = binaryCrossentropy2;\n }\n } else if (this.lossFunctions[i2] === sparseCategoricalCrossentropy) {\n if ([\"accuracy\", \"acc\"].indexOf(metric) !== -1) {\n accFn = sparseCategoricalAccuracy;\n } else if ([\"crossentropy\", \"ce\"].indexOf(metric) !== -1) {\n accFn = sparseCategoricalCrossentropy2;\n }\n } else {\n if ([\"accuracy\", \"acc\"].indexOf(metric) !== -1) {\n accFn = categoricalAccuracy;\n } else if ([\"crossentropy\", \"ce\"].indexOf(metric) !== -1) {\n accFn = categoricalCrossentropy2;\n }\n }\n let suffix;\n if ([\"accuracy\", \"acc\"].indexOf(metric) !== -1) {\n suffix = \"acc\";\n } else if ([\"crossentropy\", \"ce\"].indexOf(metric) !== -1) {\n suffix = \"ce\";\n }\n weightedMetricFn = accFn;\n metricName = metricNamePrefix + suffix;\n } else {\n const metricFn = get2(metric);\n weightedMetricFn = metricFn;\n metricName = metricNamePrefix + getLossOrMetricName(metric);\n }\n let metricResult;\n nameScope(metricName, () => {\n metricResult = weightedMetricFn;\n });\n appendMetric(i2, metricName, metricResult);\n }\n };\n handleMetrics(outputMetrics);\n }\n });\n this.collectedTrainableWeights = this.trainableWeights;\n }\n checkTrainableWeightsConsistency() {\n if (this.collectedTrainableWeights == null) {\n return;\n }\n if (this.trainableWeights.length !== this.collectedTrainableWeights.length) {\n console.warn(\"Discrepancy between trainableweights and collected trainable weights. Did you set `model.trainable` without calling `model.compile()` afterwards?\");\n }\n }\n evaluate(x, y, args = {}) {\n const batchSize = args.batchSize == null ? 32 : args.batchSize;\n checkBatchSize(batchSize);\n const checkBatchAxis = true;\n const standardizedOuts = this.standardizeUserDataXY(x, y, checkBatchAxis, batchSize);\n try {\n const ins = standardizedOuts[0].concat(standardizedOuts[1]);\n this.makeTestFunction();\n const f = this.testFunction;\n const testOuts = this.testLoop(f, ins, batchSize, args.verbose, args.steps);\n return singletonOrArray(testOuts);\n } finally {\n disposeNewTensors(standardizedOuts[0], x);\n disposeNewTensors(standardizedOuts[1], y);\n }\n }\n async evaluateDataset(dataset, args) {\n this.makeTestFunction();\n return evaluateDataset(this, dataset, args);\n }\n checkNumSamples(ins, batchSize, steps, stepsName = \"steps\") {\n let numSamples;\n if (steps != null) {\n numSamples = null;\n if (batchSize != null) {\n throw new ValueError(`If ${stepsName} is set, batchSize must be null or undefined.Got batchSize = ${batchSize}`);\n }\n } else if (ins != null) {\n if (Array.isArray(ins)) {\n numSamples = ins[0].shape[0];\n } else {\n numSamples = ins.shape[0];\n }\n } else {\n throw new ValueError(`Either the input data should have a defined shape, or ${stepsName} shoud be specified.`);\n }\n return numSamples;\n }\n execute(inputs, outputs) {\n if (Array.isArray(outputs) && outputs.length === 0) {\n throw new ValueError(\"`outputs` is an empty Array, which is not allowed.\");\n }\n const outputsIsArray = Array.isArray(outputs);\n const outputNames = outputsIsArray ? outputs : [outputs];\n const outputSymbolicTensors = this.retrieveSymbolicTensors(outputNames);\n const feedDict = new FeedDict();\n if (inputs instanceof Tensor) {\n inputs = [inputs];\n }\n if (Array.isArray(inputs)) {\n if (inputs.length !== this.inputs.length) {\n throw new ValueError(`The number of inputs provided (${inputs.length}) does not match the number of inputs of this model (${this.inputs.length}).`);\n }\n for (let i2 = 0; i2 < this.inputs.length; ++i2) {\n feedDict.add(this.inputs[i2], inputs[i2]);\n }\n } else {\n for (const input2 of this.inputs) {\n const tensorValue = inputs[input2.name];\n if (tensorValue == null) {\n throw new ValueError(`No value is provided for the model's input ${input2.name}`);\n }\n feedDict.add(input2, tensorValue);\n }\n }\n const executeOutputs = execute(outputSymbolicTensors, feedDict);\n return outputsIsArray ? executeOutputs : executeOutputs[0];\n }\n retrieveSymbolicTensors(symbolicTensorNames) {\n const outputSymbolicTensors = pyListRepeat(null, symbolicTensorNames.length);\n let outputsRemaining = symbolicTensorNames.length;\n for (const layer of this.layers) {\n const layerOutputs = Array.isArray(layer.output) ? layer.output : [layer.output];\n const layerOutputNames = layerOutputs.map((output) => output.name);\n for (let i2 = 0; i2 < symbolicTensorNames.length; ++i2) {\n const index = layerOutputNames.indexOf(symbolicTensorNames[i2]);\n if (index !== -1) {\n outputSymbolicTensors[i2] = layerOutputs[index];\n outputsRemaining--;\n }\n if (outputsRemaining === 0) {\n break;\n }\n }\n if (outputsRemaining === 0) {\n break;\n }\n }\n if (outputsRemaining > 0) {\n const remainingNames = [];\n outputSymbolicTensors.forEach((tensor2, i2) => {\n if (tensor2 == null) {\n remainingNames.push(symbolicTensorNames[i2]);\n }\n });\n throw new ValueError(`Cannot find SymbolicTensors for output name(s): ${JSON.stringify(remainingNames)}`);\n }\n return outputSymbolicTensors;\n }\n predictLoop(ins, batchSize = 32, verbose = false) {\n return tidy(() => {\n const numSamples = this.checkNumSamples(ins);\n if (verbose) {\n throw new NotImplementedError(\"Verbose predictLoop() is not implemented yet.\");\n }\n const batches = makeBatches(numSamples, batchSize);\n const outsBatches = this.outputs.map((output) => []);\n for (let batchIndex = 0; batchIndex < batches.length; ++batchIndex) {\n const batchOuts = tidy(() => {\n const batchStart = batches[batchIndex][0];\n const batchEnd = batches[batchIndex][1];\n const insBatch = sliceArrays(ins, batchStart, batchEnd);\n const feeds = [];\n if (Array.isArray(insBatch)) {\n for (let i2 = 0; i2 < insBatch.length; ++i2) {\n feeds.push({ key: this.inputs[i2], value: insBatch[i2] });\n }\n } else {\n feeds.push({ key: this.inputs[0], value: insBatch });\n }\n const feedDict = new FeedDict(feeds);\n return execute(this.outputs, feedDict);\n });\n batchOuts.forEach((batchOut, i2) => outsBatches[i2].push(batchOut));\n }\n return singletonOrArray(outsBatches.map((batches2) => concat(batches2, 0)));\n });\n }\n predict(x, args = {}) {\n const xsRank2OrHigher = ensureTensorsRank2OrHigher(x);\n checkInputData(xsRank2OrHigher, this.inputNames, this.feedInputShapes, false);\n try {\n const batchSize = args.batchSize == null ? 32 : args.batchSize;\n checkBatchSize(batchSize);\n return this.predictLoop(xsRank2OrHigher, batchSize);\n } finally {\n disposeNewTensors(xsRank2OrHigher, x);\n }\n }\n predictOnBatch(x) {\n checkInputData(x, this.inputNames, this.feedInputShapes, true);\n const batchSize = (Array.isArray(x) ? x[0] : x).shape[0];\n return this.predictLoop(x, batchSize);\n }\n standardizeUserDataXY(x, y, checkBatchAxis = true, batchSize) {\n if (this.optimizer_ == null) {\n throw new RuntimeError(\"You must compile a model before training/testing. Use LayersModel.compile(modelCompileArgs).\");\n }\n const outputShapes = [];\n for (let i2 = 0; i2 < this.feedOutputShapes.length; ++i2) {\n const outputShape = this.feedOutputShapes[i2];\n const lossFn = this.feedLossFns[i2];\n if (lossFn === sparseCategoricalCrossentropy) {\n outputShapes.push(outputShape.slice(0, outputShape.length - 1).concat([1]));\n } else {\n outputShapes.push(outputShape);\n }\n }\n x = standardizeInputData(x, this.feedInputNames, this.feedInputShapes, false, \"input\");\n y = standardizeInputData(y, this.feedOutputNames, outputShapes, false, \"target\");\n checkArrayLengths(x, y, null);\n checkLossAndTargetCompatibility(y, this.feedLossFns, this.feedOutputShapes);\n if (this.stateful && batchSize != null && batchSize > 0) {\n if (x[0].shape[0] % batchSize !== 0) {\n throw new ValueError(`In a stateful network, you should only pass inputs with a number of samples that is divisible by the batch size ${batchSize}. Found: ${x[0].shape[0]} sample(s).`);\n }\n }\n return [x, y];\n }\n async standardizeUserData(x, y, sampleWeight, classWeight, checkBatchAxis = true, batchSize) {\n const [standardXs, standardYs] = this.standardizeUserDataXY(x, y, checkBatchAxis, batchSize);\n if (sampleWeight != null) {\n throw new Error(\"sample weight is not supported yet.\");\n }\n let standardSampleWeights = null;\n if (classWeight != null) {\n const classWeights = standardizeClassWeights(classWeight, this.outputNames);\n standardSampleWeights = [];\n for (let i2 = 0; i2 < classWeights.length; ++i2) {\n standardSampleWeights.push(await standardizeWeights(standardYs[i2], null, classWeights[i2]));\n }\n }\n return [standardXs, standardYs, standardSampleWeights];\n }\n testLoop(f, ins, batchSize, verbose = 0, steps) {\n return tidy(() => {\n const numSamples = this.checkNumSamples(ins, batchSize, steps, \"steps\");\n const outs = [];\n if (verbose > 0) {\n throw new NotImplementedError(\"Verbose mode is not implemented yet.\");\n }\n if (steps != null) {\n throw new NotImplementedError(\"steps mode in testLoop() is not implemented yet\");\n } else {\n const batches = makeBatches(numSamples, batchSize);\n const indexArray = tensor1d(range2(0, numSamples));\n for (let batchIndex = 0; batchIndex < batches.length; ++batchIndex) {\n const batchStart = batches[batchIndex][0];\n const batchEnd = batches[batchIndex][1];\n const batchIds = sliceAlongFirstAxis(indexArray, batchStart, batchEnd - batchStart);\n const insBatch = sliceArraysByIndices(ins, batchIds);\n const batchOuts = f(insBatch);\n if (batchIndex === 0) {\n for (let i2 = 0; i2 < batchOuts.length; ++i2) {\n outs.push(scalar(0));\n }\n }\n for (let i2 = 0; i2 < batchOuts.length; ++i2) {\n const batchOut = batchOuts[i2];\n outs[i2] = add2(outs[i2], mul(batchEnd - batchStart, batchOut));\n }\n }\n for (let i2 = 0; i2 < outs.length; ++i2) {\n outs[i2] = div(outs[i2], numSamples);\n }\n }\n return outs;\n });\n }\n getDedupedMetricsNames() {\n const outLabels = this.metricsNames;\n const dedupedOutLabels = [];\n for (let i2 = 0; i2 < outLabels.length; ++i2) {\n const label = outLabels[i2];\n let newLabel = label;\n if (count(outLabels, label) > 1) {\n const dupIndex = count(outLabels.slice(0, i2), label);\n newLabel += `_${dupIndex}`;\n }\n dedupedOutLabels.push(newLabel);\n }\n return dedupedOutLabels;\n }\n makeTrainFunction() {\n return (data) => {\n const lossValues = [];\n const inputs = data.slice(0, this.inputs.length);\n const targets = data.slice(this.inputs.length, this.inputs.length + this.outputs.length);\n const sampleWeights = data.slice(this.inputs.length + this.outputs.length, this.inputs.length + this.outputs.length * 2);\n const metricsValues = [];\n const totalLossFunction = () => {\n const feeds = [];\n for (let i2 = 0; i2 < this.inputs.length; ++i2) {\n feeds.push({ key: this.inputs[i2], value: inputs[i2] });\n }\n const feedDict = new FeedDict(feeds);\n const outputs = execute(this.outputs, feedDict, { \"training\": true });\n let totalLoss;\n for (let i2 = 0; i2 < this.lossFunctions.length; ++i2) {\n const lossFunction = this.lossFunctions[i2];\n let loss = lossFunction(targets[i2], outputs[i2]);\n if (sampleWeights[i2] != null) {\n loss = computeWeightedLoss2(loss, sampleWeights[i2]);\n }\n const meanLoss = mean(loss);\n lossValues.push(meanLoss);\n if (i2 === 0) {\n totalLoss = loss;\n } else {\n totalLoss = add2(totalLoss, loss);\n }\n }\n for (let i2 = 0; i2 < this.metricsTensors.length; ++i2) {\n let weightedMetric;\n if (this.outputs.length > 1 && i2 < this.outputs.length) {\n weightedMetric = lossValues[i2];\n } else {\n const metric = this.metricsTensors[i2][0];\n const outputIndex = this.metricsTensors[i2][1];\n weightedMetric = mean(metric(targets[outputIndex], outputs[outputIndex]));\n }\n keep(weightedMetric);\n metricsValues.push(weightedMetric);\n }\n totalLoss = mean(totalLoss);\n this.calculateLosses().forEach((regularizerLoss) => {\n totalLoss = add2(totalLoss, regularizerLoss);\n });\n return totalLoss;\n };\n const variables = this.collectedTrainableWeights.map((param) => param.read());\n const returnCost = true;\n const totalLossValue = this.optimizer_.minimize(totalLossFunction, returnCost, variables);\n return [totalLossValue].concat(metricsValues);\n };\n }\n makeTestFunction() {\n this.testFunction = (data) => {\n return tidy(() => {\n const valOutputs = [];\n let totalLoss;\n const inputs = data.slice(0, this.inputs.length);\n const targets = data.slice(this.inputs.length, this.inputs.length + this.outputs.length);\n const feeds = [];\n for (let i2 = 0; i2 < this.inputs.length; ++i2) {\n feeds.push({ key: this.inputs[i2], value: inputs[i2] });\n }\n const feedDict = new FeedDict(feeds);\n const outputs = execute(this.outputs, feedDict);\n for (let i2 = 0; i2 < this.lossFunctions.length; ++i2) {\n const lossFunction = this.lossFunctions[i2];\n const loss = mean(lossFunction(targets[i2], outputs[i2]));\n if (i2 === 0) {\n totalLoss = loss;\n } else {\n totalLoss = add2(totalLoss, loss);\n }\n valOutputs.push(totalLoss);\n }\n for (let i2 = 0; i2 < this.metricsTensors.length; ++i2) {\n const metric = this.metricsTensors[i2][0];\n const outputIndex = this.metricsTensors[i2][1];\n const meanMetric = mean(metric(targets[outputIndex], outputs[outputIndex]));\n valOutputs.push(meanMetric);\n }\n return valOutputs;\n });\n };\n }\n async fit(x, y, args = {}) {\n return fitTensors(this, x, y, args);\n }\n async fitDataset(dataset, args) {\n return fitDataset(this, dataset, args);\n }\n async trainOnBatch(x, y) {\n const standardizeOut = await this.standardizeUserData(x, y);\n const inputs = standardizeOut[0];\n const targets = standardizeOut[1];\n const trainFunction = this.makeTrainFunction();\n const losses2 = trainFunction(inputs.concat(targets));\n const lossValues = [];\n for (const loss of losses2) {\n const v = await loss.data();\n lossValues.push(v[0]);\n }\n dispose(losses2);\n disposeNewTensors(standardizeOut[0], x);\n disposeNewTensors(standardizeOut[1], y);\n return singletonOrArray(lossValues);\n }\n getNamedWeights(config) {\n const namedWeights = [];\n const trainableOnly = config != null && config.trainableOnly;\n const weights = trainableOnly ? this.trainableWeights : this.weights;\n const weightValues = this.getWeights(trainableOnly);\n for (let i2 = 0; i2 < weights.length; ++i2) {\n if (trainableOnly && !weights[i2].trainable) {\n continue;\n }\n namedWeights.push({ name: weights[i2].originalName, tensor: weightValues[i2] });\n }\n return namedWeights;\n }\n set stopTraining(stop) {\n this.stopTraining_ = stop;\n }\n get stopTraining() {\n return this.stopTraining_;\n }\n get optimizer() {\n return this.optimizer_;\n }\n set optimizer(optimizer) {\n if (this.optimizer_ !== optimizer) {\n this.optimizer_ = optimizer;\n this.isOptimizerOwned = false;\n }\n }\n dispose() {\n const result = super.dispose();\n if (result.refCountAfterDispose === 0 && this.optimizer != null && this.isOptimizerOwned) {\n const numTensorsBeforeOptmizerDisposal = memory().numTensors;\n this.optimizer_.dispose();\n result.numDisposedVariables += numTensorsBeforeOptmizerDisposal - memory().numTensors;\n }\n return result;\n }\n getLossIdentifiers() {\n let lossNames;\n if (typeof this.loss === \"string\") {\n lossNames = toSnakeCase(this.loss);\n } else if (Array.isArray(this.loss)) {\n for (const loss of this.loss) {\n if (typeof loss !== \"string\") {\n throw new Error(\"Serialization of non-string loss is not supported.\");\n }\n }\n lossNames = this.loss.map((name) => toSnakeCase(name));\n } else {\n const outputNames = Object.keys(this.loss);\n lossNames = {};\n const losses2 = this.loss;\n for (const outputName of outputNames) {\n if (typeof losses2[outputName] === \"string\") {\n lossNames[outputName] = toSnakeCase(losses2[outputName]);\n } else {\n throw new Error(\"Serialization of non-string loss is not supported.\");\n }\n }\n }\n return lossNames;\n }\n getMetricIdentifiers() {\n if (typeof this.metrics === \"string\" || typeof this.metrics === \"function\") {\n return [toSnakeCase(getLossOrMetricName(this.metrics))];\n } else if (Array.isArray(this.metrics)) {\n return this.metrics.map((metric) => toSnakeCase(getLossOrMetricName(metric)));\n } else {\n const metricsIdentifiers = {};\n for (const key in this.metrics) {\n metricsIdentifiers[key] = toSnakeCase(getLossOrMetricName(this.metrics[key]));\n }\n return metricsIdentifiers;\n }\n }\n getTrainingConfig() {\n return {\n loss: this.getLossIdentifiers(),\n metrics: this.getMetricIdentifiers(),\n optimizer_config: {\n class_name: this.optimizer.getClassName(),\n config: this.optimizer.getConfig()\n }\n };\n }\n loadTrainingConfig(trainingConfig) {\n if (trainingConfig.weighted_metrics != null) {\n throw new Error(\"Loading weight_metrics is not supported yet.\");\n }\n if (trainingConfig.loss_weights != null) {\n throw new Error(\"Loading loss_weights is not supported yet.\");\n }\n if (trainingConfig.sample_weight_mode != null) {\n throw new Error(\"Loading sample_weight_mode is not supported yet.\");\n }\n const tsConfig = convertPythonicToTs(trainingConfig.optimizer_config);\n const optimizer = deserialize(tsConfig);\n let loss;\n if (typeof trainingConfig.loss === \"string\") {\n loss = toCamelCase(trainingConfig.loss);\n } else if (Array.isArray(trainingConfig.loss)) {\n loss = trainingConfig.loss.map((lossEntry) => toCamelCase(lossEntry));\n } else if (trainingConfig.loss != null) {\n loss = {};\n for (const key in trainingConfig.loss) {\n loss[key] = toCamelCase(trainingConfig.loss[key]);\n }\n }\n let metrics;\n if (Array.isArray(trainingConfig.metrics)) {\n metrics = trainingConfig.metrics.map((metric) => toCamelCase(metric));\n } else if (trainingConfig.metrics != null) {\n metrics = {};\n for (const key in trainingConfig.metrics) {\n metrics[key] = toCamelCase(trainingConfig.metrics[key]);\n }\n }\n this.compile({ loss, metrics, optimizer });\n }\n async save(handlerOrURL, config) {\n if (typeof handlerOrURL === \"string\") {\n const handlers = io_exports.getSaveHandlers(handlerOrURL);\n if (handlers.length === 0) {\n throw new ValueError(`Cannot find any save handlers for URL '${handlerOrURL}'`);\n } else if (handlers.length > 1) {\n throw new ValueError(`Found more than one (${handlers.length}) save handlers for URL '${handlerOrURL}'`);\n }\n handlerOrURL = handlers[0];\n }\n if (handlerOrURL.save == null) {\n throw new ValueError(\"LayersModel.save() cannot proceed because the IOHandler provided does not have the `save` attribute defined.\");\n }\n const weightDataAndSpecs = await io_exports.encodeWeights(this.getNamedWeights(config));\n const returnString = false;\n const unusedArg = null;\n const modelConfig = this.toJSON(unusedArg, returnString);\n const modelArtifacts = {\n modelTopology: modelConfig,\n format: LAYERS_MODEL_FORMAT_NAME,\n generatedBy: `TensorFlow.js tfjs-layers v${version2}`,\n convertedBy: null\n };\n const includeOptimizer = config == null ? false : config.includeOptimizer;\n if (includeOptimizer && this.optimizer != null) {\n modelArtifacts.trainingConfig = this.getTrainingConfig();\n const weightType = \"optimizer\";\n const { data: optimizerWeightData, specs: optimizerWeightSpecs } = await io_exports.encodeWeights(await this.optimizer.getWeights(), weightType);\n weightDataAndSpecs.specs.push(...optimizerWeightSpecs);\n weightDataAndSpecs.data = io_exports.concatenateArrayBuffers([weightDataAndSpecs.data, optimizerWeightData]);\n }\n if (this.userDefinedMetadata != null) {\n const checkSize = true;\n checkUserDefinedMetadata(this.userDefinedMetadata, this.name, checkSize);\n modelArtifacts.userDefinedMetadata = this.userDefinedMetadata;\n }\n modelArtifacts.weightData = weightDataAndSpecs.data;\n modelArtifacts.weightSpecs = weightDataAndSpecs.specs;\n return handlerOrURL.save(modelArtifacts);\n }\n setUserDefinedMetadata(userDefinedMetadata) {\n checkUserDefinedMetadata(userDefinedMetadata, this.name);\n this.userDefinedMetadata = userDefinedMetadata;\n }\n getUserDefinedMetadata() {\n return this.userDefinedMetadata;\n }\n};\nLayersModel.className = \"Model\";\nserialization_exports.registerClass(LayersModel);\nvar Functional = class extends LayersModel {\n};\nFunctional.className = \"Functional\";\nserialization_exports.registerClass(Functional);\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/models.js\nasync function modelFromJSON(modelAndWeightsConfig, customObjects) {\n if (!(\"modelTopology\" in modelAndWeightsConfig)) {\n modelAndWeightsConfig = { modelTopology: modelAndWeightsConfig };\n }\n modelAndWeightsConfig = modelAndWeightsConfig;\n let modelTopology = modelAndWeightsConfig.modelTopology;\n if (modelTopology[\"model_config\"] != null) {\n modelTopology = modelTopology[\"model_config\"];\n }\n const tsConfig = convertPythonicToTs(modelTopology);\n const model2 = deserialize(tsConfig, customObjects);\n if (modelAndWeightsConfig.weightsManifest != null) {\n const weightValues = await io_exports.loadWeights(modelAndWeightsConfig.weightsManifest, modelAndWeightsConfig.pathPrefix, model2.weights.map((weight) => weight.originalName));\n const uniqueWeightValues = {};\n for (const weight of model2.weights) {\n uniqueWeightValues[weight.originalName] = weightValues[weight.originalName];\n }\n model2.loadWeights(uniqueWeightValues);\n dispose(weightValues);\n }\n return model2;\n}\nasync function loadLayersModelInternal(pathOrIOHandler, options) {\n if (options == null) {\n options = {};\n }\n if (typeof pathOrIOHandler === \"string\") {\n const handlers = io_exports.getLoadHandlers(pathOrIOHandler, options);\n if (handlers.length === 0) {\n handlers.push(io_exports.browserHTTPRequest(pathOrIOHandler, options));\n } else if (handlers.length > 1) {\n throw new ValueError(`Found more than one (${handlers.length}) load handlers for URL '${pathOrIOHandler}'`);\n }\n pathOrIOHandler = handlers[0];\n }\n return loadLayersModelFromIOHandler(pathOrIOHandler, void 0, options);\n}\nasync function loadLayersModelFromIOHandler(handler, customObjects, options) {\n if (options == null) {\n options = {};\n }\n if (handler.load == null) {\n throw new ValueError(\"Cannot proceed with model loading because the IOHandler provided does not have the `load` method implemented.\");\n }\n const artifacts = await handler.load();\n let modelTopology = artifacts.modelTopology;\n if (modelTopology[\"model_config\"] != null) {\n modelTopology = modelTopology[\"model_config\"];\n }\n const strict = options.strict == null ? true : options.strict;\n const fastWeightInit = artifacts.weightData != null && artifacts.weightSpecs != null && strict;\n const model2 = deserialize(convertPythonicToTs(modelTopology), customObjects, fastWeightInit);\n const trainingConfig = artifacts.trainingConfig;\n if (trainingConfig != null) {\n model2.loadTrainingConfig(trainingConfig);\n }\n if (artifacts.userDefinedMetadata != null) {\n model2.setUserDefinedMetadata(artifacts.userDefinedMetadata);\n }\n if (artifacts.weightData != null) {\n if (artifacts.weightSpecs == null) {\n throw new ValueError(\"LayersModel artifacts contains weight data, but not weight specs. Therefore loading of weights cannot proceed.\");\n }\n const { modelWeights, optimizerWeights } = decodeModelAndOptimizerWeights(artifacts.weightData, artifacts.weightSpecs);\n model2.loadWeights(modelWeights, strict);\n if (model2.optimizer != null && optimizerWeights.length > 0) {\n await model2.optimizer.setWeights(optimizerWeights);\n }\n dispose(modelWeights);\n dispose(optimizerWeights.map((w) => w.tensor));\n }\n return model2;\n}\nfunction decodeModelAndOptimizerWeights(buffer2, specs) {\n const name2Tensor = io_exports.decodeWeights(buffer2, specs);\n const modelWeights = {};\n const optimizerWeights = [];\n specs.forEach((spec) => {\n if (spec.group === \"optimizer\") {\n optimizerWeights.push({ name: spec.name, tensor: name2Tensor[spec.name] });\n } else {\n modelWeights[spec.name] = name2Tensor[spec.name];\n }\n });\n return { modelWeights, optimizerWeights };\n}\nvar Sequential = class extends LayersModel {\n constructor(args) {\n super({ inputs: [], outputs: [] });\n args = args || {};\n this.trainable = true;\n this.built = false;\n this.name = args.name != null ? args.name : getUid(\"sequential_\");\n if (args.layers != null) {\n for (const layer of args.layers) {\n this.add(layer);\n }\n }\n }\n checkShape(layer) {\n const shape = layer.inboundNodes[0].outputTensors[0].shape;\n if (shape.some((x) => x < 0)) {\n throw new ValueError(`Negative dimension size caused by adding layer ${layer.name} with input shape [${layer.inboundNodes[0].inputTensors[0].shape}]`);\n }\n }\n add(layer) {\n const isLayerModelInstance = layer instanceof Sequential || layer instanceof LayersModel;\n let modelLayer;\n if (isLayerModelInstance) {\n modelLayer = layer;\n if (modelLayer.outputs.length !== 1) {\n throw new ValueError(\"All layers in a Sequential model should have a single output tensor. For multi-output layers, use the functional API.\");\n }\n if (modelLayer.inputs.length !== 1) {\n throw new ValueError(\"All layers in a Sequential model should have a single input tensor. For multi-input layers, use the functional API.\");\n }\n }\n if (this.outputs.length === 0) {\n if (layer.inboundNodes.length === 0) {\n if (layer.batchInputShape == null) {\n throw new ValueError(\"The first layer in a Sequential model must get an `inputShape` or `batchInputShape` argument.\");\n }\n const x = Input({\n batchShape: layer.batchInputShape,\n dtype: layer.dtype,\n name: layer.name + \"_input\"\n });\n layer.apply(x);\n }\n if (isLayerModelInstance) {\n this.outputs = modelLayer.outputs;\n this.inputs = modelLayer.inputs;\n } else {\n if (layer.inboundNodes.length !== 1) {\n throw new ValueError(`A layer added to a Sequential model must not already be connected somewhere else. LayersModel received layer ${layer.name} which has ${layer.inboundNodes.length} pre-existing inbound connections.`);\n }\n if (layer.inboundNodes[0].outputTensors.length !== 1) {\n throw new ValueError(\"All layers in a Sequential model should have a single output tensor. For multi-output layers, use the functional API.\");\n }\n this.checkShape(layer);\n this.outputs = [layer.inboundNodes[0].outputTensors[0]];\n this.inputs = getSourceInputs(this.outputs[0]);\n }\n this.inboundNodes = [];\n new Node({\n outboundLayer: this,\n inboundLayers: [],\n nodeIndices: [],\n tensorIndices: [],\n inputTensors: this.inputs,\n outputTensors: this.outputs,\n inputMasks: pyListRepeat(null, this.inputs.length),\n outputMasks: [null],\n inputShapes: this.inputs.map((x) => x.shape),\n outputShapes: this.outputs[0].shape\n });\n } else {\n const outputTensor = layer.apply(this.outputs[0]);\n if (Array.isArray(outputTensor)) {\n throw new TypeError(\"All layers in a Sequential model should have a single output tensor. For multi-output layers, use the functional API.\");\n }\n this.checkShape(layer);\n this.outputs = [outputTensor];\n this.inboundNodes[0].outputTensors = this.outputs;\n this.inboundNodes[0].outputShapes = [this.outputs[0].shape];\n }\n this.layers.push(layer);\n this.built = false;\n }\n pop() {\n if (this.layers.length === 0) {\n throw new TypeError(\"There are no layers in the model.\");\n }\n this.layers.pop();\n if (this.layers.length === 0) {\n this.outputs = [];\n this.inboundNodes = [];\n this.outboundNodes = [];\n } else {\n const lastLayerIndex = this.layers.length - 1;\n this.layers[lastLayerIndex].outboundNodes = [];\n this.outputs = [this.layers[lastLayerIndex].output];\n this.inboundNodes[0].outputTensors = this.outputs;\n this.inboundNodes[0].outputShapes = [this.outputs[0].shape];\n }\n }\n call(inputs, kwargs) {\n if (this.model == null) {\n this.build();\n }\n return this.model.call(inputs, kwargs);\n }\n build(inputShape) {\n getExactlyOneShape(inputShape);\n if (this.inputs.length === 0 || this.outputs.length === 0) {\n throw new TypeError(\"Sequential model cannot be built: model is empty. Add some layers first.\");\n }\n this.model = new LayersModel({\n inputs: this.inputs,\n outputs: this.outputs[0],\n name: this.name + \"_model\"\n });\n this.model.trainable = this.trainable;\n this.supportsMasking = this.model.supportsMasking;\n this.inputLayers = this.model.inputLayers;\n this.inputLayersNodeIndices = this.model.inputLayersNodeIndices;\n this.inputLayersTensorIndices = this.model.inputLayersTensorIndices;\n this.outputLayers = this.model.outputLayers;\n this.outputLayersNodeIndices = this.model.outputLayersNodeIndices;\n this.outputLayersTensorIndices = this.model.outputLayersTensorIndices;\n this.nodesByDepth = this.model.nodesByDepth;\n this.containerNodes = this.model.containerNodes;\n this.outputNames = this.model.outputNames;\n this.inputNames = this.model.inputNames;\n this.built = true;\n }\n countParams() {\n if (!this.built) {\n this.build();\n }\n return super.countParams();\n }\n summary(lineLength, positions, printFn = console.log) {\n if (!this.built) {\n this.build();\n }\n super.summary(lineLength, positions, printFn);\n }\n setWeights(weights) {\n if (this.model == null) {\n this.build();\n }\n this.model.setWeights(weights);\n }\n evaluate(x, y, args = {}) {\n if (!this.built) {\n throw new RuntimeError(\"The model needs to be compiled before being used.\");\n }\n return this.model.evaluate(x, y, args);\n }\n async evaluateDataset(dataset, args) {\n if (!this.built) {\n throw new RuntimeError(\"The model needs to be compiled before being used.\");\n }\n return this.model.evaluateDataset(dataset, args);\n }\n predict(x, args = {}) {\n if (this.model == null) {\n this.build();\n }\n return this.model.predict(x, args);\n }\n predictOnBatch(x) {\n if (this.model == null) {\n this.build();\n }\n return this.model.predictOnBatch(x);\n }\n compile(args) {\n this.build();\n this.model.compile(args);\n this.optimizer_ = this.model.optimizer;\n this.isOptimizerOwned = this.model.isOptimizerOwned;\n this.loss = this.model.loss;\n this.metrics = this.model.metrics;\n this.metricsTensors = this.model.metricsTensors;\n this.metricsNames = this.model.metricsNames;\n }\n get optimizer() {\n return this.model == null ? void 0 : this.model.optimizer;\n }\n set optimizer(optimizer) {\n this.model.optimizer = optimizer;\n }\n async fit(x, y, args = {}) {\n if (!this.built) {\n throw new RuntimeError(\"The model needs to be compiled before being used.\");\n }\n return this.model.fit(x, y, args);\n }\n async fitDataset(dataset, args) {\n if (!this.built) {\n throw new RuntimeError(\"The model needs to be compiled before being used.\");\n }\n return this.model.fitDataset(dataset, args);\n }\n async trainOnBatch(x, y) {\n return this.model.trainOnBatch(x, y);\n }\n static fromConfig(cls, config, customObjects = {}, fastWeightInit = false) {\n let configArray;\n let extraModelConfig = {};\n if (config instanceof Array) {\n if (!(config[0].className != null) || config[0][\"className\"] === \"Merge\") {\n throw new ValueError(\"Legacy serialization format not supported yet.\");\n }\n configArray = config;\n } else {\n util_exports.assert(config[\"layers\"] != null, () => `When the config data for a Sequential model is not an Array, it must be an Object that contains the 'layers' field.`);\n configArray = config[\"layers\"];\n delete config[\"layers\"];\n extraModelConfig = config;\n }\n const model2 = new cls(extraModelConfig);\n if (!(model2 instanceof Sequential)) {\n throw new NotImplementedError(`Sequential.fromConfig called on non-Sequential input: ${model2}`);\n }\n for (const conf of configArray) {\n const customObjects2 = void 0;\n const layer = deserialize(conf, customObjects2, fastWeightInit);\n if (fastWeightInit) {\n layer.setFastWeightInitDuringBuild(true);\n }\n model2.add(layer);\n }\n return model2;\n }\n set stopTraining(stop) {\n if (this.model == null) {\n throw new ValueError(\"Cannot set the stopTraining property of a sequential model before it is compiled.\");\n }\n this.model.stopTraining = stop;\n }\n get stopTraining() {\n if (this.model == null) {\n throw new ValueError(\"Cannot get the stopTraining property of a sequential model before it is compiled.\");\n }\n return this.model.stopTraining;\n }\n getConfig() {\n const layers = [];\n for (const layer of this.layers) {\n const dict = {};\n dict[\"className\"] = layer.getClassName();\n dict[\"config\"] = layer.getConfig();\n layers.push(dict);\n }\n return { name: this.name, layers };\n }\n};\nSequential.className = \"Sequential\";\nserialization_exports.registerClass(Sequential);\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/exports.js\nfunction model(args) {\n return new LayersModel(args);\n}\nfunction sequential(config) {\n return new Sequential(config);\n}\nfunction loadLayersModel(pathOrIOHandler, options) {\n if (options == null) {\n options = {};\n }\n return loadLayersModelInternal(pathOrIOHandler, options);\n}\nfunction input(config) {\n return Input(config);\n}\nfunction registerCallbackConstructor(verbosityLevel, callbackConstructor) {\n CallbackConstructorRegistry.registerCallbackConstructor(verbosityLevel, callbackConstructor);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/activations.js\nvar Activation = class extends serialization_exports.Serializable {\n getConfig() {\n return {};\n }\n};\nvar Elu2 = class extends Activation {\n apply(x, alpha = 1) {\n return elu2(x, alpha);\n }\n};\nElu2.className = \"elu\";\nserialization_exports.registerClass(Elu2);\nvar Selu2 = class extends Activation {\n apply(x) {\n return selu(x);\n }\n};\nSelu2.className = \"selu\";\nserialization_exports.registerClass(Selu2);\nvar Relu2 = class extends Activation {\n apply(x) {\n return relu(x);\n }\n};\nRelu2.className = \"relu\";\nserialization_exports.registerClass(Relu2);\nvar Relu62 = class extends Activation {\n apply(x) {\n return tidy(() => minimum(6, relu(x)));\n }\n};\nRelu62.className = \"relu6\";\nserialization_exports.registerClass(Relu62);\nvar Linear = class extends Activation {\n apply(x) {\n return x;\n }\n};\nLinear.className = \"linear\";\nserialization_exports.registerClass(Linear);\nvar Sigmoid2 = class extends Activation {\n apply(x) {\n return sigmoid(x);\n }\n};\nSigmoid2.className = \"sigmoid\";\nserialization_exports.registerClass(Sigmoid2);\nvar HardSigmoid = class extends Activation {\n apply(x) {\n return hardSigmoid(x);\n }\n};\nHardSigmoid.className = \"hardSigmoid\";\nserialization_exports.registerClass(HardSigmoid);\nvar Softplus2 = class extends Activation {\n apply(x) {\n return softplus(x);\n }\n};\nSoftplus2.className = \"softplus\";\nserialization_exports.registerClass(Softplus2);\nvar Softsign = class extends Activation {\n apply(x) {\n return softsign(x);\n }\n};\nSoftsign.className = \"softsign\";\nserialization_exports.registerClass(Softsign);\nvar Tanh2 = class extends Activation {\n apply(x) {\n return tanh2(x);\n }\n};\nTanh2.className = \"tanh\";\nserialization_exports.registerClass(Tanh2);\nvar Softmax2 = class extends Activation {\n apply(x, axis = -1) {\n return softmax(x, axis);\n }\n};\nSoftmax2.className = \"softmax\";\nserialization_exports.registerClass(Softmax2);\nvar LogSoftmax2 = class extends Activation {\n apply(x, axis = -1) {\n return logSoftmax(x, axis);\n }\n};\nLogSoftmax2.className = \"logSoftmax\";\nserialization_exports.registerClass(LogSoftmax2);\nvar Swish = class extends Activation {\n apply(x, alpha = 1) {\n return tidy(() => mul(sigmoid(mul(x, alpha)), x));\n }\n};\nSwish.className = \"swish\";\nserialization_exports.registerClass(Swish);\nvar Mish = class extends Activation {\n apply(x) {\n return tidy(() => mul(x, tanh2(softplus(x))));\n }\n};\nMish.className = \"mish\";\nserialization_exports.registerClass(Mish);\nfunction serializeActivation(activation2) {\n return activation2.getClassName();\n}\nfunction deserializeActivation(config, customObjects = {}) {\n return deserializeKerasObject(config, serialization_exports.SerializationMap.getMap().classNameMap, customObjects, \"activation\");\n}\nfunction getActivation(identifier) {\n if (identifier == null) {\n const config = {};\n config[\"className\"] = \"linear\";\n config[\"config\"] = {};\n return deserializeActivation(config);\n }\n if (typeof identifier === \"string\") {\n const config = {};\n config[\"className\"] = identifier;\n config[\"config\"] = {};\n return deserializeActivation(config);\n } else if (identifier instanceof Activation) {\n return identifier;\n } else {\n return deserializeActivation(identifier);\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/regularizers.js\nfunction assertObjectArgs(args) {\n if (args != null && typeof args !== \"object\") {\n throw new Error(`Argument to L1L2 regularizer's constructor is expected to be an object, but received: ${args}`);\n }\n}\nvar Regularizer = class extends serialization_exports.Serializable {\n};\nvar L1L2 = class extends Regularizer {\n constructor(args) {\n super();\n assertObjectArgs(args);\n this.l1 = args == null || args.l1 == null ? 0.01 : args.l1;\n this.l2 = args == null || args.l2 == null ? 0.01 : args.l2;\n this.hasL1 = this.l1 !== 0;\n this.hasL2 = this.l2 !== 0;\n }\n apply(x) {\n return tidy(() => {\n let regularization = zeros([1]);\n if (this.hasL1) {\n regularization = add2(regularization, sum2(mul(this.l1, abs(x))));\n }\n if (this.hasL2) {\n regularization = add2(regularization, sum2(mul(this.l2, square2(x))));\n }\n return reshape(regularization, []);\n });\n }\n getConfig() {\n return { \"l1\": this.l1, \"l2\": this.l2 };\n }\n static fromConfig(cls, config) {\n return new cls({ l1: config[\"l1\"], l2: config[\"l2\"] });\n }\n};\nL1L2.className = \"L1L2\";\nserialization_exports.registerClass(L1L2);\nfunction l1(args) {\n assertObjectArgs(args);\n return new L1L2({ l1: args != null ? args.l1 : null, l2: 0 });\n}\nfunction l2(args) {\n assertObjectArgs(args);\n return new L1L2({ l2: args != null ? args.l2 : null, l1: 0 });\n}\nvar REGULARIZER_IDENTIFIER_REGISTRY_SYMBOL_MAP = {\n \"l1l2\": \"L1L2\"\n};\nfunction serializeRegularizer(constraint) {\n return serializeKerasObject(constraint);\n}\nfunction deserializeRegularizer(config, customObjects = {}) {\n return deserializeKerasObject(config, serialization_exports.SerializationMap.getMap().classNameMap, customObjects, \"regularizer\");\n}\nfunction getRegularizer(identifier) {\n if (identifier == null) {\n return null;\n }\n if (typeof identifier === \"string\") {\n const className = identifier in REGULARIZER_IDENTIFIER_REGISTRY_SYMBOL_MAP ? REGULARIZER_IDENTIFIER_REGISTRY_SYMBOL_MAP[identifier] : identifier;\n const config = { className, config: {} };\n return deserializeRegularizer(config);\n } else if (identifier instanceof Regularizer) {\n return identifier;\n } else {\n return deserializeRegularizer(identifier);\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/layers/advanced_activations.js\nvar ReLU = class extends Layer {\n constructor(args) {\n super(args == null ? {} : args);\n this.supportsMasking = true;\n if (args != null) {\n this.maxValue = args.maxValue;\n }\n }\n call(inputs, kwargs) {\n inputs = getExactlyOneTensor(inputs);\n let output = relu(inputs);\n if (this.maxValue != null) {\n output = clipByValue(output, 0, this.maxValue);\n }\n return output;\n }\n computeOutputShape(inputShape) {\n return inputShape;\n }\n getConfig() {\n const config = { maxValue: this.maxValue };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nReLU.className = \"ReLU\";\nserialization_exports.registerClass(ReLU);\nvar LeakyReLU = class extends Layer {\n constructor(args) {\n super(args == null ? {} : args);\n this.DEFAULT_ALPHA = 0.3;\n if (args == null) {\n args = {};\n }\n this.alpha = args.alpha == null ? this.DEFAULT_ALPHA : args.alpha;\n }\n call(inputs, kwargs) {\n const x = getExactlyOneTensor(inputs);\n return leakyRelu(x, this.alpha);\n }\n computeOutputShape(inputShape) {\n return inputShape;\n }\n getConfig() {\n const config = { alpha: this.alpha };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nLeakyReLU.className = \"LeakyReLU\";\nserialization_exports.registerClass(LeakyReLU);\nvar PReLU = class extends Layer {\n constructor(args) {\n super(args == null ? {} : args);\n this.DEFAULT_ALPHA_INITIALIZER = \"zeros\";\n if (args == null) {\n args = {};\n }\n this.supportsMasking = true;\n this.alphaInitializer = getInitializer(args.alphaInitializer || this.DEFAULT_ALPHA_INITIALIZER);\n this.alphaRegularizer = getRegularizer(args.alphaRegularizer);\n this.alphaConstraint = getConstraint(args.alphaConstraint);\n if (args.sharedAxes == null) {\n this.sharedAxes = null;\n } else if (Array.isArray(args.sharedAxes)) {\n this.sharedAxes = args.sharedAxes;\n } else if (typeof args.sharedAxes === \"number\") {\n this.sharedAxes = [args.sharedAxes];\n } else {\n throw new ValueError(`Expected sharedAxes to be a number or an array of numbers, but got ${args.sharedAxes}`);\n }\n }\n build(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n const paramShape = inputShape.slice(1);\n if (this.sharedAxes != null) {\n for (const i2 of this.sharedAxes) {\n paramShape[i2 - 1] = 1;\n }\n }\n this.alpha = this.addWeight(\"alpha\", paramShape, \"float32\", this.alphaInitializer, this.alphaRegularizer, true, this.alphaConstraint);\n const axes = {};\n if (this.sharedAxes != null) {\n for (let i2 = 1; i2 < inputShape.length; ++i2) {\n axes[i2] = inputShape[i2];\n }\n }\n this.inputSpec = [new InputSpec({\n ndim: inputShape.length,\n axes\n })];\n this.built = true;\n }\n call(inputs, kwargs) {\n inputs = getExactlyOneTensor(inputs);\n return prelu(inputs, this.alpha.read());\n }\n getConfig() {\n const config = {\n alphaInitializer: serializeInitializer(this.alphaInitializer),\n alphaRegularizer: serializeRegularizer(this.alphaRegularizer),\n alphaConstraint: serializeConstraint(this.alphaConstraint),\n sharedAxes: this.sharedAxes\n };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nPReLU.className = \"PReLU\";\nserialization_exports.registerClass(PReLU);\nvar ELU = class extends Layer {\n constructor(args) {\n super(args == null ? {} : args);\n this.DEFAULT_ALPHA = 1;\n if (args == null) {\n args = {};\n }\n if (args.alpha != null && args.alpha !== this.DEFAULT_ALPHA) {\n throw new NotImplementedError(`Non-default alpha value (${args.alpha}) is not supported by the ELU layer yet.`);\n }\n this.alpha = args.alpha == null ? this.DEFAULT_ALPHA : args.alpha;\n }\n call(inputs, kwargs) {\n const x = getExactlyOneTensor(inputs);\n return elu(x);\n }\n computeOutputShape(inputShape) {\n return inputShape;\n }\n getConfig() {\n const config = { alpha: this.alpha };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nELU.className = \"ELU\";\nserialization_exports.registerClass(ELU);\nvar ThresholdedReLU = class extends Layer {\n constructor(args) {\n super(args == null ? {} : args);\n this.DEFAULT_THETA = 1;\n if (args == null) {\n args = {};\n }\n this.theta = args.theta == null ? this.DEFAULT_THETA : args.theta;\n }\n call(inputs, kwargs) {\n const x = getExactlyOneTensor(inputs);\n return mul(x, cast(greater(x, this.theta), \"float32\"));\n }\n computeOutputShape(inputShape) {\n return inputShape;\n }\n getConfig() {\n const config = { theta: this.theta };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nThresholdedReLU.className = \"ThresholdedReLU\";\nserialization_exports.registerClass(ThresholdedReLU);\nvar Softmax3 = class extends Layer {\n constructor(args) {\n super(args == null ? {} : args);\n this.DEFAULT_AXIS = 1;\n if (args == null) {\n args = {};\n }\n this.softmax = new Softmax2().apply;\n this.axis = args.axis == null ? this.DEFAULT_AXIS : args.axis;\n }\n call(inputs, kwargs) {\n const x = getExactlyOneTensor(inputs);\n return this.softmax(x, this.axis);\n }\n computeOutputShape(inputShape) {\n return inputShape;\n }\n getConfig() {\n const config = { axis: this.axis };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nSoftmax3.className = \"Softmax\";\nserialization_exports.registerClass(Softmax3);\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/utils/conv_utils.js\nfunction normalizeArray(value, n2, name) {\n if (typeof value === \"number\") {\n return pyListRepeat(value, n2);\n } else {\n if (value.length !== n2) {\n throw new ValueError(`The ${name} argument must be an integer or tuple of ${n2} integers. Received: ${value.length} elements.`);\n }\n for (let i2 = 0; i2 < n2; ++i2) {\n const singleValue = value[i2];\n if (!isInteger(singleValue)) {\n throw new ValueError(`The ${name} argument must be an integer or tuple of ${n2} integers. Received: ${JSON.stringify(value)} including a non-integer number ${singleValue}`);\n }\n }\n return value;\n }\n}\nfunction convOutputLength(inputLength, filterSize, padding, stride, dilation = 1) {\n if (inputLength == null) {\n return inputLength;\n }\n const dilatedFilterSize = filterSize + (filterSize - 1) * (dilation - 1);\n let outputLength;\n if (padding === \"same\") {\n outputLength = inputLength;\n } else {\n outputLength = inputLength - dilatedFilterSize + 1;\n }\n return Math.floor((outputLength + stride - 1) / stride);\n}\nfunction deconvLength(dimSize, strideSize, kernelSize, padding) {\n if (dimSize == null) {\n return null;\n }\n if (padding === \"valid\") {\n dimSize = dimSize * strideSize + max2([kernelSize - strideSize, 0]);\n } else if (padding === \"same\") {\n dimSize = dimSize * strideSize;\n } else {\n throw new ValueError(`Unsupport padding mode: ${padding}.`);\n }\n return dimSize;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/layers/convolutional.js\nfunction preprocessConv2DInput(x, dataFormat) {\n return tidy(() => {\n checkDataFormat(dataFormat);\n if (dataFormat === \"channelsFirst\") {\n return transpose(x, [0, 2, 3, 1]);\n } else {\n return x;\n }\n });\n}\nfunction preprocessConv3DInput(x, dataFormat) {\n return tidy(() => {\n checkDataFormat(dataFormat);\n if (dataFormat === \"channelsFirst\") {\n return transpose(x, [0, 2, 3, 4, 1]);\n } else {\n return x;\n }\n });\n}\nfunction conv1dWithBias(x, kernel, bias, strides = 1, padding = \"valid\", dataFormat, dilationRate = 1) {\n return tidy(() => {\n if (dataFormat == null) {\n dataFormat = imageDataFormat();\n }\n checkDataFormat(dataFormat);\n if (x.shape.length !== 3) {\n throw new ValueError(`The input of a conv1dWithBias operation should be 3, but is ${x.shape.length} instead.`);\n }\n if (kernel.shape.length !== 3) {\n throw new ValueError(`The kernel for a conv1dWithBias operation should be 3, but is ${kernel.shape.length} instead`);\n }\n if (bias != null && bias.shape.length !== 1) {\n throw new ValueError(`The bias for a conv1dWithBias operation should be 1, but is ${kernel.shape.length} instead`);\n }\n if (dataFormat === \"channelsFirst\") {\n x = transpose(x, [0, 2, 1]);\n }\n if (padding === \"causal\") {\n throw new NotImplementedError(\"The support for CAUSAL padding mode in conv1dWithBias is not implemented yet.\");\n }\n let y = conv1d(x, kernel, strides, padding === \"same\" ? \"same\" : \"valid\", \"NWC\", dilationRate);\n if (bias != null) {\n y = biasAdd(y, bias);\n }\n return y;\n });\n}\nfunction conv2dWithBiasActivation(x, kernel, bias, strides = [1, 1], padding = \"valid\", dataFormat, dilationRate, activation2 = null) {\n return tidy(() => {\n if (dataFormat == null) {\n dataFormat = imageDataFormat();\n }\n checkDataFormat(dataFormat);\n if (x.rank !== 3 && x.rank !== 4) {\n throw new ValueError(`conv2dWithBiasActivation expects input to be of rank 3 or 4, but received ${x.rank}.`);\n }\n if (kernel.rank !== 3 && kernel.rank !== 4) {\n throw new ValueError(`conv2dWithBiasActivation expects kernel to be of rank 3 or 4, but received ${x.rank}.`);\n }\n let y = preprocessConv2DInput(x, dataFormat);\n if (padding === \"causal\") {\n throw new NotImplementedError(\"The support for CAUSAL padding mode in conv1dWithBias is not implemented yet.\");\n }\n y = fused_ops_exports.conv2d({\n x: y,\n filter: kernel,\n strides,\n pad: padding === \"same\" ? \"same\" : \"valid\",\n dilations: dilationRate,\n dataFormat: \"NHWC\",\n bias,\n activation: activation2\n });\n if (dataFormat === \"channelsFirst\") {\n y = transpose(y, [0, 3, 1, 2]);\n }\n return y;\n });\n}\nfunction conv3dWithBias(x, kernel, bias, strides = [1, 1, 1], padding = \"valid\", dataFormat, dilationRate) {\n return tidy(() => {\n if (dataFormat == null) {\n dataFormat = imageDataFormat();\n }\n checkDataFormat(dataFormat);\n if (x.rank !== 4 && x.rank !== 5) {\n throw new ValueError(`conv3dWithBias expects input to be of rank 4 or 5, but received ${x.rank}.`);\n }\n if (kernel.rank !== 4 && kernel.rank !== 5) {\n throw new ValueError(`conv3dWithBias expects kernel to be of rank 4 or 5, but received ${x.rank}.`);\n }\n let y = preprocessConv3DInput(x, dataFormat);\n if (padding === \"causal\") {\n throw new NotImplementedError(\"The support for CAUSAL padding mode in conv3dWithBias is not implemented yet.\");\n }\n y = conv3d(y, kernel, strides, padding === \"same\" ? \"same\" : \"valid\", \"NDHWC\", dilationRate);\n if (bias != null) {\n y = biasAdd(y, bias);\n }\n if (dataFormat === \"channelsFirst\") {\n y = transpose(y, [0, 4, 1, 2, 3]);\n }\n return y;\n });\n}\nvar BaseConv = class extends Layer {\n constructor(rank, args) {\n super(args);\n this.bias = null;\n this.DEFAULT_KERNEL_INITIALIZER = \"glorotNormal\";\n this.DEFAULT_BIAS_INITIALIZER = \"zeros\";\n BaseConv.verifyArgs(args);\n this.rank = rank;\n assertPositiveInteger(this.rank, \"rank\");\n if (this.rank !== 1 && this.rank !== 2 && this.rank !== 3) {\n throw new NotImplementedError(`Convolution layer for rank other than 1, 2, or 3 (${this.rank}) is not implemented yet.`);\n }\n this.kernelSize = normalizeArray(args.kernelSize, rank, \"kernelSize\");\n this.strides = normalizeArray(args.strides == null ? 1 : args.strides, rank, \"strides\");\n this.padding = args.padding == null ? \"valid\" : args.padding;\n checkPaddingMode(this.padding);\n this.dataFormat = args.dataFormat == null ? \"channelsLast\" : args.dataFormat;\n checkDataFormat(this.dataFormat);\n this.activation = getActivation(args.activation);\n this.useBias = args.useBias == null ? true : args.useBias;\n this.biasInitializer = getInitializer(args.biasInitializer || this.DEFAULT_BIAS_INITIALIZER);\n this.biasConstraint = getConstraint(args.biasConstraint);\n this.biasRegularizer = getRegularizer(args.biasRegularizer);\n this.activityRegularizer = getRegularizer(args.activityRegularizer);\n this.dilationRate = normalizeArray(args.dilationRate == null ? 1 : args.dilationRate, rank, \"dilationRate\");\n if (this.rank === 1 && (Array.isArray(this.dilationRate) && this.dilationRate.length !== 1)) {\n throw new ValueError(`dilationRate must be a number or an array of a single number for 1D convolution, but received ${JSON.stringify(this.dilationRate)}`);\n } else if (this.rank === 2) {\n if (typeof this.dilationRate === \"number\") {\n this.dilationRate = [this.dilationRate, this.dilationRate];\n } else if (this.dilationRate.length !== 2) {\n throw new ValueError(`dilationRate must be a number or array of two numbers for 2D convolution, but received ${JSON.stringify(this.dilationRate)}`);\n }\n } else if (this.rank === 3) {\n if (typeof this.dilationRate === \"number\") {\n this.dilationRate = [this.dilationRate, this.dilationRate, this.dilationRate];\n } else if (this.dilationRate.length !== 3) {\n throw new ValueError(`dilationRate must be a number or array of three numbers for 3D convolution, but received ${JSON.stringify(this.dilationRate)}`);\n }\n }\n }\n static verifyArgs(args) {\n assert2(\"kernelSize\" in args, `required key 'kernelSize' not in config`);\n if (typeof args.kernelSize !== \"number\" && !checkArrayTypeAndLength(args.kernelSize, \"number\", 1, 3)) {\n throw new ValueError(`BaseConv expects config.kernelSize to be number or number[] with length 1, 2, or 3, but received ${JSON.stringify(args.kernelSize)}.`);\n }\n }\n getConfig() {\n const config = {\n kernelSize: this.kernelSize,\n strides: this.strides,\n padding: this.padding,\n dataFormat: this.dataFormat,\n dilationRate: this.dilationRate,\n activation: serializeActivation(this.activation),\n useBias: this.useBias,\n biasInitializer: serializeInitializer(this.biasInitializer),\n biasRegularizer: serializeRegularizer(this.biasRegularizer),\n activityRegularizer: serializeRegularizer(this.activityRegularizer),\n biasConstraint: serializeConstraint(this.biasConstraint)\n };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nvar Conv = class extends BaseConv {\n constructor(rank, args) {\n super(rank, args);\n this.kernel = null;\n Conv.verifyArgs(args);\n this.filters = args.filters;\n assertPositiveInteger(this.filters, \"filters\");\n this.kernelInitializer = getInitializer(args.kernelInitializer || this.DEFAULT_KERNEL_INITIALIZER);\n this.kernelConstraint = getConstraint(args.kernelConstraint);\n this.kernelRegularizer = getRegularizer(args.kernelRegularizer);\n }\n build(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n const channelAxis = this.dataFormat === \"channelsFirst\" ? 1 : inputShape.length - 1;\n if (inputShape[channelAxis] == null) {\n throw new ValueError(`The channel dimension of the input should be defined. Found ${inputShape[channelAxis]}`);\n }\n const inputDim = inputShape[channelAxis];\n const kernelShape = this.kernelSize.concat([inputDim, this.filters]);\n this.kernel = this.addWeight(\"kernel\", kernelShape, null, this.kernelInitializer, this.kernelRegularizer, true, this.kernelConstraint);\n if (this.useBias) {\n this.bias = this.addWeight(\"bias\", [this.filters], null, this.biasInitializer, this.biasRegularizer, true, this.biasConstraint);\n }\n this.inputSpec = [{ ndim: this.rank + 2, axes: { [channelAxis]: inputDim } }];\n this.built = true;\n }\n call(inputs, kwargs) {\n return tidy(() => {\n inputs = getExactlyOneTensor(inputs);\n let outputs;\n const biasValue = this.bias == null ? null : this.bias.read();\n const fusedActivationName = mapActivationToFusedKernel(this.activation.getClassName());\n if (fusedActivationName != null && this.rank === 2) {\n outputs = conv2dWithBiasActivation(inputs, this.kernel.read(), biasValue, this.strides, this.padding, this.dataFormat, this.dilationRate, fusedActivationName);\n } else {\n if (this.rank === 1) {\n outputs = conv1dWithBias(inputs, this.kernel.read(), biasValue, this.strides[0], this.padding, this.dataFormat, this.dilationRate[0]);\n } else if (this.rank === 2) {\n outputs = conv2dWithBiasActivation(inputs, this.kernel.read(), biasValue, this.strides, this.padding, this.dataFormat, this.dilationRate);\n } else if (this.rank === 3) {\n outputs = conv3dWithBias(inputs, this.kernel.read(), biasValue, this.strides, this.padding, this.dataFormat, this.dilationRate);\n } else {\n throw new NotImplementedError(\"convolutions greater than 3D are not implemented yet.\");\n }\n if (this.activation != null) {\n outputs = this.activation.apply(outputs);\n }\n }\n return outputs;\n });\n }\n computeOutputShape(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n const newSpace = [];\n const space = this.dataFormat === \"channelsLast\" ? inputShape.slice(1, inputShape.length - 1) : inputShape.slice(2);\n for (let i2 = 0; i2 < space.length; ++i2) {\n const newDim = convOutputLength(space[i2], this.kernelSize[i2], this.padding, this.strides[i2], typeof this.dilationRate === \"number\" ? this.dilationRate : this.dilationRate[i2]);\n newSpace.push(newDim);\n }\n let outputShape = [inputShape[0]];\n if (this.dataFormat === \"channelsLast\") {\n outputShape = outputShape.concat(newSpace);\n outputShape.push(this.filters);\n } else {\n outputShape.push(this.filters);\n outputShape = outputShape.concat(newSpace);\n }\n return outputShape;\n }\n getConfig() {\n const config = {\n filters: this.filters,\n kernelInitializer: serializeInitializer(this.kernelInitializer),\n kernelRegularizer: serializeRegularizer(this.kernelRegularizer),\n kernelConstraint: serializeConstraint(this.kernelConstraint)\n };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n static verifyArgs(args) {\n if (!(\"filters\" in args) || typeof args.filters !== \"number\" || args.filters < 1) {\n throw new ValueError(`Convolution layer expected config.filters to be a 'number' > 0 but got ${JSON.stringify(args.filters)}`);\n }\n }\n};\nvar Conv2D2 = class extends Conv {\n constructor(args) {\n super(2, args);\n Conv2D2.verifyArgs(args);\n }\n getConfig() {\n const config = super.getConfig();\n delete config[\"rank\"];\n return config;\n }\n static verifyArgs(args) {\n if (typeof args.kernelSize !== \"number\" && !checkArrayTypeAndLength(args.kernelSize, \"number\", 1, 2)) {\n throw new ValueError(`Conv2D expects config.kernelSize to be number or number[] with length 1 or 2, but received ${JSON.stringify(args.kernelSize)}.`);\n }\n }\n};\nConv2D2.className = \"Conv2D\";\nserialization_exports.registerClass(Conv2D2);\nvar Conv3D2 = class extends Conv {\n constructor(args) {\n super(3, args);\n Conv3D2.verifyArgs(args);\n }\n getConfig() {\n const config = super.getConfig();\n delete config[\"rank\"];\n return config;\n }\n static verifyArgs(args) {\n if (typeof args.kernelSize !== \"number\") {\n if (!(Array.isArray(args.kernelSize) && (args.kernelSize.length === 1 || args.kernelSize.length === 3))) {\n throw new ValueError(`Conv3D expects config.kernelSize to be number or [number, number, number], but received ${JSON.stringify(args.kernelSize)}.`);\n }\n }\n }\n};\nConv3D2.className = \"Conv3D\";\nserialization_exports.registerClass(Conv3D2);\nvar Conv2DTranspose = class extends Conv2D2 {\n constructor(args) {\n super(args);\n this.inputSpec = [new InputSpec({ ndim: 4 })];\n if (this.padding !== \"same\" && this.padding !== \"valid\") {\n throw new ValueError(`Conv2DTranspose currently supports only padding modes 'same' and 'valid', but received padding mode ${this.padding}`);\n }\n }\n build(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n if (inputShape.length !== 4) {\n throw new ValueError(\"Input should have rank 4; Received input shape: \" + JSON.stringify(inputShape));\n }\n const channelAxis = this.dataFormat === \"channelsFirst\" ? 1 : inputShape.length - 1;\n if (inputShape[channelAxis] == null) {\n throw new ValueError(\"The channel dimension of the inputs should be defined. Found `None`.\");\n }\n const inputDim = inputShape[channelAxis];\n const kernelShape = this.kernelSize.concat([this.filters, inputDim]);\n this.kernel = this.addWeight(\"kernel\", kernelShape, \"float32\", this.kernelInitializer, this.kernelRegularizer, true, this.kernelConstraint);\n if (this.useBias) {\n this.bias = this.addWeight(\"bias\", [this.filters], \"float32\", this.biasInitializer, this.biasRegularizer, true, this.biasConstraint);\n }\n this.inputSpec = [new InputSpec({ ndim: 4, axes: { [channelAxis]: inputDim } })];\n this.built = true;\n }\n call(inputs, kwargs) {\n return tidy(() => {\n let input2 = getExactlyOneTensor(inputs);\n if (input2.shape.length !== 4) {\n throw new ValueError(`Conv2DTranspose.call() expects input tensor to be rank-4, but received a tensor of rank-${input2.shape.length}`);\n }\n const inputShape = input2.shape;\n const batchSize = inputShape[0];\n let hAxis;\n let wAxis;\n if (this.dataFormat === \"channelsFirst\") {\n hAxis = 2;\n wAxis = 3;\n } else {\n hAxis = 1;\n wAxis = 2;\n }\n const height = inputShape[hAxis];\n const width = inputShape[wAxis];\n const kernelH = this.kernelSize[0];\n const kernelW = this.kernelSize[1];\n const strideH = this.strides[0];\n const strideW = this.strides[1];\n const outHeight = deconvLength(height, strideH, kernelH, this.padding);\n const outWidth = deconvLength(width, strideW, kernelW, this.padding);\n const outputShape = [batchSize, outHeight, outWidth, this.filters];\n if (this.dataFormat !== \"channelsLast\") {\n input2 = transpose(input2, [0, 2, 3, 1]);\n }\n let outputs = conv2dTranspose(input2, this.kernel.read(), outputShape, this.strides, this.padding);\n if (this.dataFormat !== \"channelsLast\") {\n outputs = transpose(outputs, [0, 3, 1, 2]);\n }\n if (this.bias != null) {\n outputs = biasAdd(outputs, this.bias.read(), this.dataFormat);\n }\n if (this.activation != null) {\n outputs = this.activation.apply(outputs);\n }\n return outputs;\n });\n }\n computeOutputShape(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n const outputShape = inputShape.slice();\n let channelAxis;\n let heightAxis;\n let widthAxis;\n if (this.dataFormat === \"channelsFirst\") {\n channelAxis = 1;\n heightAxis = 2;\n widthAxis = 3;\n } else {\n channelAxis = 3;\n heightAxis = 1;\n widthAxis = 2;\n }\n const kernelH = this.kernelSize[0];\n const kernelW = this.kernelSize[1];\n const strideH = this.strides[0];\n const strideW = this.strides[1];\n outputShape[channelAxis] = this.filters;\n outputShape[heightAxis] = deconvLength(outputShape[heightAxis], strideH, kernelH, this.padding);\n outputShape[widthAxis] = deconvLength(outputShape[widthAxis], strideW, kernelW, this.padding);\n return outputShape;\n }\n getConfig() {\n const config = super.getConfig();\n delete config[\"dilationRate\"];\n return config;\n }\n};\nConv2DTranspose.className = \"Conv2DTranspose\";\nserialization_exports.registerClass(Conv2DTranspose);\nvar Conv3DTranspose = class extends Conv3D2 {\n constructor(args) {\n super(args);\n this.inputSpec = [new InputSpec({ ndim: 5 })];\n if (this.padding !== \"same\" && this.padding !== \"valid\") {\n throw new ValueError(`Conv3DTranspose currently supports only padding modes 'same' and 'valid', but received padding mode ${this.padding}`);\n }\n }\n build(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n if (inputShape.length !== 5) {\n throw new ValueError(\"Input should have rank 5; Received input shape: \" + JSON.stringify(inputShape));\n }\n const channelAxis = this.dataFormat === \"channelsFirst\" ? 1 : inputShape.length - 1;\n if (inputShape[channelAxis] == null) {\n throw new ValueError(\"The channel dimension of the inputs should be defined. Found `None`.\");\n }\n const inputDim = inputShape[channelAxis];\n const kernelShape = this.kernelSize.concat([this.filters, inputDim]);\n this.kernel = this.addWeight(\"kernel\", kernelShape, \"float32\", this.kernelInitializer, this.kernelRegularizer, true, this.kernelConstraint);\n if (this.useBias) {\n this.bias = this.addWeight(\"bias\", [this.filters], \"float32\", this.biasInitializer, this.biasRegularizer, true, this.biasConstraint);\n }\n this.inputSpec = [new InputSpec({ ndim: 5, axes: { [channelAxis]: inputDim } })];\n this.built = true;\n }\n call(inputs, kwargs) {\n return tidy(() => {\n let input2 = getExactlyOneTensor(inputs);\n if (input2.shape.length !== 5) {\n throw new ValueError(`Conv3DTranspose.call() expects input tensor to be rank-4, but received a tensor of rank-${input2.shape.length}`);\n }\n const inputShape = input2.shape;\n const batchSize = inputShape[0];\n let hAxis;\n let wAxis;\n let dAxis;\n if (this.dataFormat === \"channelsFirst\") {\n dAxis = 2;\n hAxis = 3;\n wAxis = 4;\n } else {\n dAxis = 1;\n hAxis = 2;\n wAxis = 3;\n }\n const depth = inputShape[dAxis];\n const height = inputShape[hAxis];\n const width = inputShape[wAxis];\n const kernelD = this.kernelSize[0];\n const kernelH = this.kernelSize[1];\n const kernelW = this.kernelSize[2];\n const strideD = this.strides[0];\n const strideH = this.strides[1];\n const strideW = this.strides[2];\n const outDepth = deconvLength(depth, strideD, kernelD, this.padding);\n const outHeight = deconvLength(height, strideH, kernelH, this.padding);\n const outWidth = deconvLength(width, strideW, kernelW, this.padding);\n const outputShape = [batchSize, outDepth, outHeight, outWidth, this.filters];\n if (this.dataFormat !== \"channelsLast\") {\n input2 = transpose(input2, [0, 2, 3, 4, 1]);\n }\n let outputs = conv3dTranspose(input2, this.kernel.read(), outputShape, this.strides, this.padding);\n if (this.dataFormat !== \"channelsLast\") {\n outputs = transpose(outputs, [0, 4, 1, 2, 3]);\n }\n if (this.bias !== null) {\n outputs = biasAdd(outputs, this.bias.read(), this.dataFormat);\n }\n if (this.activation !== null) {\n outputs = this.activation.apply(outputs);\n }\n return outputs;\n });\n }\n computeOutputShape(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n const outputShape = inputShape.slice();\n let channelAxis;\n let depthAxis;\n let heightAxis;\n let widthAxis;\n if (this.dataFormat === \"channelsFirst\") {\n channelAxis = 1;\n depthAxis = 2;\n heightAxis = 3;\n widthAxis = 4;\n } else {\n channelAxis = 4;\n depthAxis = 1;\n heightAxis = 2;\n widthAxis = 3;\n }\n const kernelD = this.kernelSize[0];\n const kernelH = this.kernelSize[1];\n const kernelW = this.kernelSize[2];\n const strideD = this.strides[0];\n const strideH = this.strides[1];\n const strideW = this.strides[2];\n outputShape[channelAxis] = this.filters;\n outputShape[depthAxis] = deconvLength(outputShape[depthAxis], strideD, kernelD, this.padding);\n outputShape[heightAxis] = deconvLength(outputShape[heightAxis], strideH, kernelH, this.padding);\n outputShape[widthAxis] = deconvLength(outputShape[widthAxis], strideW, kernelW, this.padding);\n return outputShape;\n }\n getConfig() {\n const config = super.getConfig();\n delete config[\"dilationRate\"];\n return config;\n }\n};\nConv3DTranspose.className = \"Conv3DTranspose\";\nserialization_exports.registerClass(Conv3DTranspose);\nvar SeparableConv = class extends Conv {\n constructor(rank, config) {\n super(rank, config);\n this.DEFAULT_DEPTHWISE_INITIALIZER = \"glorotUniform\";\n this.DEFAULT_POINTWISE_INITIALIZER = \"glorotUniform\";\n this.depthwiseKernel = null;\n this.pointwiseKernel = null;\n if (config.filters == null) {\n throw new ValueError(\"The `filters` configuration field is required by SeparableConv, but is unspecified.\");\n }\n if (config.kernelInitializer != null || config.kernelRegularizer != null || config.kernelConstraint != null) {\n throw new ValueError(\"Fields kernelInitializer, kernelRegularizer and kernelConstraint are invalid for SeparableConv2D. Use depthwiseInitializer, depthwiseRegularizer, depthwiseConstraint, pointwiseInitializer, pointwiseRegularizer and pointwiseConstraint instead.\");\n }\n if (config.padding != null && config.padding !== \"same\" && config.padding !== \"valid\") {\n throw new ValueError(`SeparableConv${this.rank}D supports only padding modes: 'same' and 'valid', but received ${JSON.stringify(config.padding)}`);\n }\n this.depthMultiplier = config.depthMultiplier == null ? 1 : config.depthMultiplier;\n this.depthwiseInitializer = getInitializer(config.depthwiseInitializer || this.DEFAULT_DEPTHWISE_INITIALIZER);\n this.depthwiseRegularizer = getRegularizer(config.depthwiseRegularizer);\n this.depthwiseConstraint = getConstraint(config.depthwiseConstraint);\n this.pointwiseInitializer = getInitializer(config.depthwiseInitializer || this.DEFAULT_POINTWISE_INITIALIZER);\n this.pointwiseRegularizer = getRegularizer(config.pointwiseRegularizer);\n this.pointwiseConstraint = getConstraint(config.pointwiseConstraint);\n }\n build(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n if (inputShape.length < this.rank + 2) {\n throw new ValueError(`Inputs to SeparableConv${this.rank}D should have rank ${this.rank + 2}, but received input shape: ${JSON.stringify(inputShape)}`);\n }\n const channelAxis = this.dataFormat === \"channelsFirst\" ? 1 : inputShape.length - 1;\n if (inputShape[channelAxis] == null || inputShape[channelAxis] < 0) {\n throw new ValueError(`The channel dimension of the inputs should be defined, but found ${JSON.stringify(inputShape[channelAxis])}`);\n }\n const inputDim = inputShape[channelAxis];\n const depthwiseKernelShape = this.kernelSize.concat([inputDim, this.depthMultiplier]);\n const pointwiseKernelShape = [];\n for (let i2 = 0; i2 < this.rank; ++i2) {\n pointwiseKernelShape.push(1);\n }\n pointwiseKernelShape.push(inputDim * this.depthMultiplier, this.filters);\n const trainable = true;\n this.depthwiseKernel = this.addWeight(\"depthwise_kernel\", depthwiseKernelShape, \"float32\", this.depthwiseInitializer, this.depthwiseRegularizer, trainable, this.depthwiseConstraint);\n this.pointwiseKernel = this.addWeight(\"pointwise_kernel\", pointwiseKernelShape, \"float32\", this.pointwiseInitializer, this.pointwiseRegularizer, trainable, this.pointwiseConstraint);\n if (this.useBias) {\n this.bias = this.addWeight(\"bias\", [this.filters], \"float32\", this.biasInitializer, this.biasRegularizer, trainable, this.biasConstraint);\n } else {\n this.bias = null;\n }\n this.inputSpec = [new InputSpec({ ndim: this.rank + 2, axes: { [channelAxis]: inputDim } })];\n this.built = true;\n }\n call(inputs, kwargs) {\n return tidy(() => {\n inputs = getExactlyOneTensor(inputs);\n let output;\n if (this.rank === 1) {\n throw new NotImplementedError(\"1D separable convolution is not implemented yet.\");\n } else if (this.rank === 2) {\n if (this.dataFormat === \"channelsFirst\") {\n inputs = transpose(inputs, [0, 2, 3, 1]);\n }\n output = separableConv2d(inputs, this.depthwiseKernel.read(), this.pointwiseKernel.read(), this.strides, this.padding, this.dilationRate, \"NHWC\");\n }\n if (this.useBias) {\n output = biasAdd(output, this.bias.read(), this.dataFormat);\n }\n if (this.activation != null) {\n output = this.activation.apply(output);\n }\n if (this.dataFormat === \"channelsFirst\") {\n output = transpose(output, [0, 3, 1, 2]);\n }\n return output;\n });\n }\n getConfig() {\n const config = super.getConfig();\n delete config[\"rank\"];\n delete config[\"kernelInitializer\"];\n delete config[\"kernelRegularizer\"];\n delete config[\"kernelConstraint\"];\n config[\"depthwiseInitializer\"] = serializeInitializer(this.depthwiseInitializer);\n config[\"pointwiseInitializer\"] = serializeInitializer(this.pointwiseInitializer);\n config[\"depthwiseRegularizer\"] = serializeRegularizer(this.depthwiseRegularizer);\n config[\"pointwiseRegularizer\"] = serializeRegularizer(this.pointwiseRegularizer);\n config[\"depthwiseConstraint\"] = serializeConstraint(this.depthwiseConstraint);\n config[\"pointwiseConstraint\"] = serializeConstraint(this.pointwiseConstraint);\n return config;\n }\n};\nSeparableConv.className = \"SeparableConv\";\nvar SeparableConv2D = class extends SeparableConv {\n constructor(args) {\n super(2, args);\n }\n};\nSeparableConv2D.className = \"SeparableConv2D\";\nserialization_exports.registerClass(SeparableConv2D);\nvar Conv1D = class extends Conv {\n constructor(args) {\n super(1, args);\n Conv1D.verifyArgs(args);\n this.inputSpec = [{ ndim: 3 }];\n }\n getConfig() {\n const config = super.getConfig();\n delete config[\"rank\"];\n delete config[\"dataFormat\"];\n return config;\n }\n static verifyArgs(args) {\n if (typeof args.kernelSize !== \"number\" && !checkArrayTypeAndLength(args.kernelSize, \"number\", 1, 1)) {\n throw new ValueError(`Conv1D expects config.kernelSize to be number or number[] with length 1, but received ${JSON.stringify(args.kernelSize)}.`);\n }\n }\n};\nConv1D.className = \"Conv1D\";\nserialization_exports.registerClass(Conv1D);\nvar Cropping2D = class extends Layer {\n constructor(args) {\n super(args);\n if (typeof args.cropping === \"number\") {\n this.cropping = [[args.cropping, args.cropping], [args.cropping, args.cropping]];\n } else if (typeof args.cropping[0] === \"number\") {\n this.cropping = [\n [args.cropping[0], args.cropping[0]],\n [args.cropping[1], args.cropping[1]]\n ];\n } else {\n this.cropping = args.cropping;\n }\n this.dataFormat = args.dataFormat === void 0 ? \"channelsLast\" : args.dataFormat;\n this.inputSpec = [{ ndim: 4 }];\n }\n computeOutputShape(inputShape) {\n if (this.dataFormat === \"channelsFirst\") {\n return [\n inputShape[0],\n inputShape[1],\n inputShape[2] - this.cropping[0][0] - this.cropping[0][1],\n inputShape[3] - this.cropping[1][0] - this.cropping[1][1]\n ];\n } else {\n return [\n inputShape[0],\n inputShape[1] - this.cropping[0][0] - this.cropping[0][1],\n inputShape[2] - this.cropping[1][0] - this.cropping[1][1],\n inputShape[3]\n ];\n }\n }\n call(inputs, kwargs) {\n return tidy(() => {\n inputs = getExactlyOneTensor(inputs);\n if (this.dataFormat === \"channelsLast\") {\n const hSliced = sliceAlongAxis(inputs, this.cropping[0][0], inputs.shape[1] - this.cropping[0][0] - this.cropping[0][1], 2);\n return sliceAlongAxis(hSliced, this.cropping[1][0], inputs.shape[2] - this.cropping[1][1] - this.cropping[1][0], 3);\n } else {\n const hSliced = sliceAlongAxis(inputs, this.cropping[0][0], inputs.shape[2] - this.cropping[0][0] - this.cropping[0][1], 3);\n return sliceAlongAxis(hSliced, this.cropping[1][0], inputs.shape[3] - this.cropping[1][1] - this.cropping[1][0], 4);\n }\n });\n }\n getConfig() {\n const config = { cropping: this.cropping, dataFormat: this.dataFormat };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nCropping2D.className = \"Cropping2D\";\nserialization_exports.registerClass(Cropping2D);\nvar UpSampling2D = class extends Layer {\n constructor(args) {\n super(args);\n this.DEFAULT_SIZE = [2, 2];\n this.inputSpec = [{ ndim: 4 }];\n this.size = args.size == null ? this.DEFAULT_SIZE : args.size;\n this.dataFormat = args.dataFormat == null ? \"channelsLast\" : args.dataFormat;\n checkDataFormat(this.dataFormat);\n this.interpolation = args.interpolation == null ? \"nearest\" : args.interpolation;\n checkInterpolationFormat(this.interpolation);\n }\n computeOutputShape(inputShape) {\n if (this.dataFormat === \"channelsFirst\") {\n const height = inputShape[2] == null ? null : this.size[0] * inputShape[2];\n const width = inputShape[3] == null ? null : this.size[1] * inputShape[3];\n return [inputShape[0], inputShape[1], height, width];\n } else {\n const height = inputShape[1] == null ? null : this.size[0] * inputShape[1];\n const width = inputShape[2] == null ? null : this.size[1] * inputShape[2];\n return [inputShape[0], height, width, inputShape[3]];\n }\n }\n call(inputs, kwargs) {\n return tidy(() => {\n let input2 = getExactlyOneTensor(inputs);\n const inputShape = input2.shape;\n if (this.dataFormat === \"channelsFirst\") {\n input2 = transpose(input2, [0, 2, 3, 1]);\n const height = this.size[0] * inputShape[2];\n const width = this.size[1] * inputShape[3];\n const resized = this.interpolation === \"nearest\" ? image.resizeNearestNeighbor(input2, [height, width]) : image.resizeBilinear(input2, [height, width]);\n return transpose(resized, [0, 3, 1, 2]);\n } else {\n const height = this.size[0] * inputShape[1];\n const width = this.size[1] * inputShape[2];\n return this.interpolation === \"nearest\" ? image.resizeNearestNeighbor(input2, [height, width]) : image.resizeBilinear(input2, [height, width]);\n }\n });\n }\n getConfig() {\n const config = {\n size: this.size,\n dataFormat: this.dataFormat,\n interpolation: this.interpolation\n };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nUpSampling2D.className = \"UpSampling2D\";\nserialization_exports.registerClass(UpSampling2D);\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/layers/convolutional_depthwise.js\nfunction depthwiseConv2d3(x, depthwiseKernel, strides = [1, 1], padding = \"valid\", dataFormat, dilationRate) {\n return tidy(() => {\n if (dataFormat == null) {\n dataFormat = imageDataFormat();\n }\n checkDataFormat(dataFormat);\n let y = preprocessConv2DInput(x, dataFormat);\n if (x.rank !== 4) {\n throw new ValueError(`Input for depthwiseConv2d is required to be 4-D, but is instead ${x.rank}-D`);\n }\n if (depthwiseKernel.rank !== 4) {\n throw new ValueError(`depthwiseKernel is required to be 4-D, but is instead ${depthwiseKernel.rank}-D`);\n }\n y = depthwiseConv2d(y, depthwiseKernel, strides, padding === \"same\" ? \"same\" : \"valid\", \"NHWC\", dilationRate);\n if (dataFormat === \"channelsFirst\") {\n y = transpose(y, [0, 3, 1, 2]);\n }\n return y;\n });\n}\nvar DepthwiseConv2D = class extends BaseConv {\n constructor(args) {\n super(2, args);\n this.depthwiseKernel = null;\n this.depthMultiplier = args.depthMultiplier == null ? 1 : args.depthMultiplier;\n this.depthwiseInitializer = getInitializer(args.depthwiseInitializer || this.DEFAULT_KERNEL_INITIALIZER);\n this.depthwiseConstraint = getConstraint(args.depthwiseConstraint);\n this.depthwiseRegularizer = getRegularizer(args.depthwiseRegularizer);\n }\n build(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n if (inputShape.length < 4) {\n throw new ValueError(`Inputs to DepthwiseConv2D should have rank 4. Received input shape: ${JSON.stringify(inputShape)}.`);\n }\n const channelAxis = this.dataFormat === \"channelsFirst\" ? 1 : 3;\n if (inputShape[channelAxis] == null || inputShape[channelAxis] < 0) {\n throw new ValueError(`The channel dimension of the inputs to DepthwiseConv2D should be defined, but is not (${inputShape[channelAxis]}).`);\n }\n const inputDim = inputShape[channelAxis];\n const depthwiseKernelShape = [\n this.kernelSize[0],\n this.kernelSize[1],\n inputDim,\n this.depthMultiplier\n ];\n this.depthwiseKernel = this.addWeight(\"depthwise_kernel\", depthwiseKernelShape, null, this.depthwiseInitializer, this.depthwiseRegularizer, true, this.depthwiseConstraint);\n if (this.useBias) {\n this.bias = this.addWeight(\"bias\", [inputDim * this.depthMultiplier], null, this.biasInitializer, this.biasRegularizer, true, this.biasConstraint);\n } else {\n this.bias = null;\n }\n this.built = true;\n }\n call(inputs, kwargs) {\n return tidy(() => {\n inputs = getExactlyOneTensor(inputs);\n let outputs = depthwiseConv2d3(inputs, this.depthwiseKernel.read(), this.strides, this.padding, this.dataFormat, null);\n if (this.useBias) {\n outputs = biasAdd(outputs, this.bias.read(), this.dataFormat);\n }\n if (this.activation != null) {\n outputs = this.activation.apply(outputs);\n }\n return outputs;\n });\n }\n computeOutputShape(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n const rows = this.dataFormat === \"channelsFirst\" ? inputShape[2] : inputShape[1];\n const cols = this.dataFormat === \"channelsFirst\" ? inputShape[3] : inputShape[2];\n const outFilters = this.dataFormat === \"channelsFirst\" ? inputShape[1] * this.depthMultiplier : inputShape[3] * this.depthMultiplier;\n const outRows = convOutputLength(rows, this.kernelSize[0], this.padding, this.strides[0]);\n const outCols = convOutputLength(cols, this.kernelSize[1], this.padding, this.strides[1]);\n if (this.dataFormat === \"channelsFirst\") {\n return [inputShape[0], outFilters, outRows, outCols];\n } else {\n return [inputShape[0], outRows, outCols, outFilters];\n }\n }\n getConfig() {\n const config = super.getConfig();\n config[\"depthMultiplier\"] = this.depthMultiplier;\n config[\"depthwiseInitializer\"] = serializeInitializer(this.depthwiseInitializer);\n config[\"depthwiseRegularizer\"] = serializeRegularizer(this.depthwiseRegularizer);\n config[\"depthwiseConstraint\"] = serializeConstraint(this.depthwiseRegularizer);\n return config;\n }\n};\nDepthwiseConv2D.className = \"DepthwiseConv2D\";\nserialization_exports.registerClass(DepthwiseConv2D);\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/layers/recurrent.js\nfunction standardizeArgs(inputs, initialState, constants, numConstants) {\n if (Array.isArray(inputs)) {\n if (initialState != null || constants != null) {\n throw new ValueError(\"When inputs is an array, neither initialState or constants should be provided\");\n }\n if (numConstants != null) {\n constants = inputs.slice(inputs.length - numConstants, inputs.length);\n inputs = inputs.slice(0, inputs.length - numConstants);\n }\n if (inputs.length > 1) {\n initialState = inputs.slice(1, inputs.length);\n }\n inputs = inputs[0];\n }\n function toListOrNull(x) {\n if (x == null || Array.isArray(x)) {\n return x;\n } else {\n return [x];\n }\n }\n initialState = toListOrNull(initialState);\n constants = toListOrNull(constants);\n return { inputs, initialState, constants };\n}\nfunction rnn(stepFunction, inputs, initialStates, goBackwards = false, mask, constants, unroll = false, needPerStepOutputs = false) {\n return tidy(() => {\n const ndim = inputs.shape.length;\n if (ndim < 3) {\n throw new ValueError(`Input should be at least 3D, but is ${ndim}D.`);\n }\n const axes = [1, 0].concat(range2(2, ndim));\n inputs = transpose(inputs, axes);\n if (constants != null) {\n throw new NotImplementedError(\"The rnn() functoin of the deeplearn.js backend does not support constants yet.\");\n }\n if (unroll) {\n console.warn(\"Backend rnn(): the unroll = true option is not applicable to the imperative deeplearn.js backend.\");\n }\n if (mask != null) {\n mask = cast(cast(mask, \"bool\"), \"float32\");\n if (mask.rank === ndim - 1) {\n mask = expandDims(mask, -1);\n }\n mask = transpose(mask, axes);\n }\n if (goBackwards) {\n inputs = reverse(inputs, 0);\n if (mask != null) {\n mask = reverse(mask, 0);\n }\n }\n const perStepOutputs = [];\n let lastOutput;\n let states = initialStates;\n const timeSteps = inputs.shape[0];\n const perStepInputs = unstack(inputs);\n let perStepMasks;\n if (mask != null) {\n perStepMasks = unstack(mask);\n }\n for (let t2 = 0; t2 < timeSteps; ++t2) {\n const currentInput = perStepInputs[t2];\n const stepOutputs = tidy(() => stepFunction(currentInput, states));\n if (mask == null) {\n lastOutput = stepOutputs[0];\n states = stepOutputs[1];\n } else {\n const maskedOutputs = tidy(() => {\n const stepMask = perStepMasks[t2];\n const negStepMask = sub(onesLike(stepMask), stepMask);\n const output = add2(mul(stepOutputs[0], stepMask), mul(states[0], negStepMask));\n const newStates = states.map((state, i2) => {\n return add2(mul(stepOutputs[1][i2], stepMask), mul(state, negStepMask));\n });\n return { output, newStates };\n });\n lastOutput = maskedOutputs.output;\n states = maskedOutputs.newStates;\n }\n if (needPerStepOutputs) {\n perStepOutputs.push(lastOutput);\n }\n }\n let outputs;\n if (needPerStepOutputs) {\n const axis = 1;\n outputs = stack(perStepOutputs, axis);\n }\n return [lastOutput, outputs, states];\n });\n}\nvar RNN = class extends Layer {\n constructor(args) {\n super(args);\n let cell;\n if (args.cell == null) {\n throw new ValueError(\"cell property is missing for the constructor of RNN.\");\n } else if (Array.isArray(args.cell)) {\n cell = new StackedRNNCells({ cells: args.cell });\n } else {\n cell = args.cell;\n }\n if (cell.stateSize == null) {\n throw new ValueError(\"The RNN cell should have an attribute `stateSize` (tuple of integers, one integer per RNN state).\");\n }\n this.cell = cell;\n this.returnSequences = args.returnSequences == null ? false : args.returnSequences;\n this.returnState = args.returnState == null ? false : args.returnState;\n this.goBackwards = args.goBackwards == null ? false : args.goBackwards;\n this._stateful = args.stateful == null ? false : args.stateful;\n this.unroll = args.unroll == null ? false : args.unroll;\n this.supportsMasking = true;\n this.inputSpec = [new InputSpec({ ndim: 3 })];\n this.stateSpec = null;\n this.states_ = null;\n this.numConstants = null;\n this.keptStates = [];\n }\n getStates() {\n if (this.states_ == null) {\n const numStates = Array.isArray(this.cell.stateSize) ? this.cell.stateSize.length : 1;\n return range2(0, numStates).map((x) => null);\n } else {\n return this.states_;\n }\n }\n setStates(states) {\n this.states_ = states;\n }\n computeOutputShape(inputShape) {\n if (isArrayOfShapes(inputShape)) {\n inputShape = inputShape[0];\n }\n inputShape = inputShape;\n let stateSize = this.cell.stateSize;\n if (!Array.isArray(stateSize)) {\n stateSize = [stateSize];\n }\n const outputDim = stateSize[0];\n let outputShape;\n if (this.returnSequences) {\n outputShape = [inputShape[0], inputShape[1], outputDim];\n } else {\n outputShape = [inputShape[0], outputDim];\n }\n if (this.returnState) {\n const stateShape = [];\n for (const dim of stateSize) {\n stateShape.push([inputShape[0], dim]);\n }\n return [outputShape].concat(stateShape);\n } else {\n return outputShape;\n }\n }\n computeMask(inputs, mask) {\n return tidy(() => {\n if (Array.isArray(mask)) {\n mask = mask[0];\n }\n const outputMask = this.returnSequences ? mask : null;\n if (this.returnState) {\n const stateMask = this.states.map((s2) => null);\n return [outputMask].concat(stateMask);\n } else {\n return outputMask;\n }\n });\n }\n get states() {\n if (this.states_ == null) {\n const numStates = Array.isArray(this.cell.stateSize) ? this.cell.stateSize.length : 1;\n const output = [];\n for (let i2 = 0; i2 < numStates; ++i2) {\n output.push(null);\n }\n return output;\n } else {\n return this.states_;\n }\n }\n set states(s2) {\n this.states_ = s2;\n }\n build(inputShape) {\n const constantShape = null;\n if (this.numConstants != null) {\n throw new NotImplementedError(\"Constants support is not implemented in RNN yet.\");\n }\n if (isArrayOfShapes(inputShape)) {\n inputShape = inputShape[0];\n }\n inputShape = inputShape;\n const batchSize = this.stateful ? inputShape[0] : null;\n const inputDim = inputShape.slice(2);\n this.inputSpec[0] = new InputSpec({ shape: [batchSize, null, ...inputDim] });\n const stepInputShape = [inputShape[0]].concat(inputShape.slice(2));\n if (constantShape != null) {\n throw new NotImplementedError(\"Constants support is not implemented in RNN yet.\");\n } else {\n this.cell.build(stepInputShape);\n }\n let stateSize;\n if (Array.isArray(this.cell.stateSize)) {\n stateSize = this.cell.stateSize;\n } else {\n stateSize = [this.cell.stateSize];\n }\n if (this.stateSpec != null) {\n if (!util_exports.arraysEqual(this.stateSpec.map((spec) => spec.shape[spec.shape.length - 1]), stateSize)) {\n throw new ValueError(`An initialState was passed that is not compatible with cell.stateSize. Received stateSpec=${this.stateSpec}; However cell.stateSize is ${this.cell.stateSize}`);\n }\n } else {\n this.stateSpec = stateSize.map((dim) => new InputSpec({ shape: [null, dim] }));\n }\n if (this.stateful) {\n this.resetStates();\n }\n }\n resetStates(states, training = false) {\n tidy(() => {\n if (!this.stateful) {\n throw new AttributeError(\"Cannot call resetStates() on an RNN Layer that is not stateful.\");\n }\n const batchSize = this.inputSpec[0].shape[0];\n if (batchSize == null) {\n throw new ValueError(\"If an RNN is stateful, it needs to know its batch size. Specify the batch size of your input tensors: \\n- If using a Sequential model, specify the batch size by passing a `batchInputShape` option to your first layer.\\n- If using the functional API, specify the batch size by passing a `batchShape` option to your Input layer.\");\n }\n if (this.states_ == null) {\n if (Array.isArray(this.cell.stateSize)) {\n this.states_ = this.cell.stateSize.map((dim) => zeros([batchSize, dim]));\n } else {\n this.states_ = [zeros([batchSize, this.cell.stateSize])];\n }\n } else if (states == null) {\n dispose(this.states_);\n if (this.keptStates != null) {\n dispose(this.keptStates);\n this.keptStates = [];\n }\n if (Array.isArray(this.cell.stateSize)) {\n this.states_ = this.cell.stateSize.map((dim) => zeros([batchSize, dim]));\n } else {\n this.states_[0] = zeros([batchSize, this.cell.stateSize]);\n }\n } else {\n if (!Array.isArray(states)) {\n states = [states];\n }\n if (states.length !== this.states_.length) {\n throw new ValueError(`Layer ${this.name} expects ${this.states_.length} state(s), but it received ${states.length} state value(s). Input received: ${states}`);\n }\n if (training === true) {\n this.keptStates.push(this.states_.slice());\n } else {\n dispose(this.states_);\n }\n for (let index = 0; index < this.states_.length; ++index) {\n const value = states[index];\n const dim = Array.isArray(this.cell.stateSize) ? this.cell.stateSize[index] : this.cell.stateSize;\n const expectedShape = [batchSize, dim];\n if (!util_exports.arraysEqual(value.shape, expectedShape)) {\n throw new ValueError(`State ${index} is incompatible with layer ${this.name}: expected shape=${expectedShape}, received shape=${value.shape}`);\n }\n this.states_[index] = value;\n }\n }\n this.states_ = this.states_.map((state) => keep(state.clone()));\n });\n }\n apply(inputs, kwargs) {\n let initialState = kwargs == null ? null : kwargs[\"initialState\"];\n let constants = kwargs == null ? null : kwargs[\"constants\"];\n if (kwargs == null) {\n kwargs = {};\n }\n const standardized = standardizeArgs(inputs, initialState, constants, this.numConstants);\n inputs = standardized.inputs;\n initialState = standardized.initialState;\n constants = standardized.constants;\n let additionalInputs = [];\n let additionalSpecs = [];\n if (initialState != null) {\n kwargs[\"initialState\"] = initialState;\n additionalInputs = additionalInputs.concat(initialState);\n this.stateSpec = [];\n for (const state of initialState) {\n this.stateSpec.push(new InputSpec({ shape: state.shape }));\n }\n additionalSpecs = additionalSpecs.concat(this.stateSpec);\n }\n if (constants != null) {\n kwargs[\"constants\"] = constants;\n additionalInputs = additionalInputs.concat(constants);\n this.numConstants = constants.length;\n }\n const isTensor = additionalInputs[0] instanceof SymbolicTensor;\n if (isTensor) {\n const fullInput = [inputs].concat(additionalInputs);\n const fullInputSpec = this.inputSpec.concat(additionalSpecs);\n const originalInputSpec = this.inputSpec;\n this.inputSpec = fullInputSpec;\n const output = super.apply(fullInput, kwargs);\n this.inputSpec = originalInputSpec;\n return output;\n } else {\n return super.apply(inputs, kwargs);\n }\n }\n call(inputs, kwargs) {\n return tidy(() => {\n const mask = kwargs == null ? null : kwargs[\"mask\"];\n const training = kwargs == null ? null : kwargs[\"training\"];\n let initialState = kwargs == null ? null : kwargs[\"initialState\"];\n inputs = getExactlyOneTensor(inputs);\n if (initialState == null) {\n if (this.stateful) {\n initialState = this.states_;\n } else {\n initialState = this.getInitialState(inputs);\n }\n }\n const numStates = Array.isArray(this.cell.stateSize) ? this.cell.stateSize.length : 1;\n if (initialState.length !== numStates) {\n throw new ValueError(`RNN Layer has ${numStates} state(s) but was passed ${initialState.length} initial state(s).`);\n }\n if (this.unroll) {\n console.warn(\"Ignoring unroll = true for RNN layer, due to imperative backend.\");\n }\n const cellCallKwargs = { training };\n const step5 = (inputs2, states2) => {\n const outputs2 = this.cell.call([inputs2].concat(states2), cellCallKwargs);\n return [outputs2[0], outputs2.slice(1)];\n };\n const rnnOutputs = rnn(step5, inputs, initialState, this.goBackwards, mask, null, this.unroll, this.returnSequences);\n const lastOutput = rnnOutputs[0];\n const outputs = rnnOutputs[1];\n const states = rnnOutputs[2];\n if (this.stateful) {\n this.resetStates(states, training);\n }\n const output = this.returnSequences ? outputs : lastOutput;\n if (this.returnState) {\n return [output].concat(states);\n } else {\n return output;\n }\n });\n }\n getInitialState(inputs) {\n return tidy(() => {\n let initialState = zeros(inputs.shape);\n initialState = sum2(initialState, [1, 2]);\n initialState = expandDims2(initialState);\n if (Array.isArray(this.cell.stateSize)) {\n return this.cell.stateSize.map((dim) => dim > 1 ? tile2(initialState, [1, dim]) : initialState);\n } else {\n return this.cell.stateSize > 1 ? [tile2(initialState, [1, this.cell.stateSize])] : [initialState];\n }\n });\n }\n get trainableWeights() {\n if (!this.trainable) {\n return [];\n }\n return this.cell.trainableWeights;\n }\n get nonTrainableWeights() {\n if (!this.trainable) {\n return this.cell.weights;\n }\n return this.cell.nonTrainableWeights;\n }\n setFastWeightInitDuringBuild(value) {\n super.setFastWeightInitDuringBuild(value);\n if (this.cell != null) {\n this.cell.setFastWeightInitDuringBuild(value);\n }\n }\n getConfig() {\n const baseConfig = super.getConfig();\n const config = {\n returnSequences: this.returnSequences,\n returnState: this.returnState,\n goBackwards: this.goBackwards,\n stateful: this.stateful,\n unroll: this.unroll\n };\n if (this.numConstants != null) {\n config[\"numConstants\"] = this.numConstants;\n }\n const cellConfig = this.cell.getConfig();\n if (this.getClassName() === RNN.className) {\n config[\"cell\"] = {\n \"className\": this.cell.getClassName(),\n \"config\": cellConfig\n };\n }\n return Object.assign({}, cellConfig, baseConfig, config);\n }\n static fromConfig(cls, config, customObjects = {}) {\n const cellConfig = config[\"cell\"];\n const cell = deserialize(cellConfig, customObjects);\n return new cls(Object.assign(config, { cell }));\n }\n};\nRNN.className = \"RNN\";\nserialization_exports.registerClass(RNN);\nvar RNNCell = class extends Layer {\n};\nvar SimpleRNNCell = class extends RNNCell {\n constructor(args) {\n super(args);\n this.DEFAULT_ACTIVATION = \"tanh\";\n this.DEFAULT_KERNEL_INITIALIZER = \"glorotNormal\";\n this.DEFAULT_RECURRENT_INITIALIZER = \"orthogonal\";\n this.DEFAULT_BIAS_INITIALIZER = \"zeros\";\n this.units = args.units;\n assertPositiveInteger(this.units, `units`);\n this.activation = getActivation(args.activation == null ? this.DEFAULT_ACTIVATION : args.activation);\n this.useBias = args.useBias == null ? true : args.useBias;\n this.kernelInitializer = getInitializer(args.kernelInitializer || this.DEFAULT_KERNEL_INITIALIZER);\n this.recurrentInitializer = getInitializer(args.recurrentInitializer || this.DEFAULT_RECURRENT_INITIALIZER);\n this.biasInitializer = getInitializer(args.biasInitializer || this.DEFAULT_BIAS_INITIALIZER);\n this.kernelRegularizer = getRegularizer(args.kernelRegularizer);\n this.recurrentRegularizer = getRegularizer(args.recurrentRegularizer);\n this.biasRegularizer = getRegularizer(args.biasRegularizer);\n this.kernelConstraint = getConstraint(args.kernelConstraint);\n this.recurrentConstraint = getConstraint(args.recurrentConstraint);\n this.biasConstraint = getConstraint(args.biasConstraint);\n this.dropout = min2([1, max2([0, args.dropout == null ? 0 : args.dropout])]);\n this.recurrentDropout = min2([\n 1,\n max2([0, args.recurrentDropout == null ? 0 : args.recurrentDropout])\n ]);\n this.dropoutFunc = args.dropoutFunc;\n this.stateSize = this.units;\n this.dropoutMask = null;\n this.recurrentDropoutMask = null;\n }\n build(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n this.kernel = this.addWeight(\"kernel\", [inputShape[inputShape.length - 1], this.units], null, this.kernelInitializer, this.kernelRegularizer, true, this.kernelConstraint);\n this.recurrentKernel = this.addWeight(\"recurrent_kernel\", [this.units, this.units], null, this.recurrentInitializer, this.recurrentRegularizer, true, this.recurrentConstraint);\n if (this.useBias) {\n this.bias = this.addWeight(\"bias\", [this.units], null, this.biasInitializer, this.biasRegularizer, true, this.biasConstraint);\n } else {\n this.bias = null;\n }\n this.built = true;\n }\n call(inputs, kwargs) {\n return tidy(() => {\n inputs = inputs;\n if (inputs.length !== 2) {\n throw new ValueError(`SimpleRNNCell expects 2 input Tensors, got ${inputs.length}.`);\n }\n let prevOutput = inputs[1];\n inputs = inputs[0];\n const training = kwargs[\"training\"] == null ? false : kwargs[\"training\"];\n if (0 < this.dropout && this.dropout < 1 && this.dropoutMask == null) {\n this.dropoutMask = generateDropoutMask({\n ones: () => onesLike(inputs),\n rate: this.dropout,\n training,\n dropoutFunc: this.dropoutFunc\n });\n }\n if (0 < this.recurrentDropout && this.recurrentDropout < 1 && this.recurrentDropoutMask == null) {\n this.recurrentDropoutMask = generateDropoutMask({\n ones: () => onesLike(prevOutput),\n rate: this.recurrentDropout,\n training,\n dropoutFunc: this.dropoutFunc\n });\n }\n let h;\n const dpMask = this.dropoutMask;\n const recDpMask = this.recurrentDropoutMask;\n if (dpMask != null) {\n h = dot2(mul(inputs, dpMask), this.kernel.read());\n } else {\n h = dot2(inputs, this.kernel.read());\n }\n if (this.bias != null) {\n h = biasAdd(h, this.bias.read());\n }\n if (recDpMask != null) {\n prevOutput = mul(prevOutput, recDpMask);\n }\n let output = add2(h, dot2(prevOutput, this.recurrentKernel.read()));\n if (this.activation != null) {\n output = this.activation.apply(output);\n }\n return [output, output];\n });\n }\n getConfig() {\n const baseConfig = super.getConfig();\n const config = {\n units: this.units,\n activation: serializeActivation(this.activation),\n useBias: this.useBias,\n kernelInitializer: serializeInitializer(this.kernelInitializer),\n recurrentInitializer: serializeInitializer(this.recurrentInitializer),\n biasInitializer: serializeInitializer(this.biasInitializer),\n kernelRegularizer: serializeRegularizer(this.kernelRegularizer),\n recurrentRegularizer: serializeRegularizer(this.recurrentRegularizer),\n biasRegularizer: serializeRegularizer(this.biasRegularizer),\n activityRegularizer: serializeRegularizer(this.activityRegularizer),\n kernelConstraint: serializeConstraint(this.kernelConstraint),\n recurrentConstraint: serializeConstraint(this.recurrentConstraint),\n biasConstraint: serializeConstraint(this.biasConstraint),\n dropout: this.dropout,\n recurrentDropout: this.recurrentDropout\n };\n return Object.assign({}, baseConfig, config);\n }\n};\nSimpleRNNCell.className = \"SimpleRNNCell\";\nserialization_exports.registerClass(SimpleRNNCell);\nvar SimpleRNN = class extends RNN {\n constructor(args) {\n args.cell = new SimpleRNNCell(args);\n super(args);\n }\n call(inputs, kwargs) {\n return tidy(() => {\n if (this.cell.dropoutMask != null) {\n dispose(this.cell.dropoutMask);\n this.cell.dropoutMask = null;\n }\n if (this.cell.recurrentDropoutMask != null) {\n dispose(this.cell.recurrentDropoutMask);\n this.cell.recurrentDropoutMask = null;\n }\n const mask = kwargs == null ? null : kwargs[\"mask\"];\n const training = kwargs == null ? null : kwargs[\"training\"];\n const initialState = kwargs == null ? null : kwargs[\"initialState\"];\n return super.call(inputs, { mask, training, initialState });\n });\n }\n static fromConfig(cls, config) {\n return new cls(config);\n }\n};\nSimpleRNN.className = \"SimpleRNN\";\nserialization_exports.registerClass(SimpleRNN);\nvar GRUCell = class extends RNNCell {\n constructor(args) {\n super(args);\n this.DEFAULT_ACTIVATION = \"tanh\";\n this.DEFAULT_RECURRENT_ACTIVATION = \"hardSigmoid\";\n this.DEFAULT_KERNEL_INITIALIZER = \"glorotNormal\";\n this.DEFAULT_RECURRENT_INITIALIZER = \"orthogonal\";\n this.DEFAULT_BIAS_INITIALIZER = \"zeros\";\n if (args.resetAfter) {\n throw new ValueError(`GRUCell does not support reset_after parameter set to true.`);\n }\n this.units = args.units;\n assertPositiveInteger(this.units, \"units\");\n this.activation = getActivation(args.activation === void 0 ? this.DEFAULT_ACTIVATION : args.activation);\n this.recurrentActivation = getActivation(args.recurrentActivation === void 0 ? this.DEFAULT_RECURRENT_ACTIVATION : args.recurrentActivation);\n this.useBias = args.useBias == null ? true : args.useBias;\n this.kernelInitializer = getInitializer(args.kernelInitializer || this.DEFAULT_KERNEL_INITIALIZER);\n this.recurrentInitializer = getInitializer(args.recurrentInitializer || this.DEFAULT_RECURRENT_INITIALIZER);\n this.biasInitializer = getInitializer(args.biasInitializer || this.DEFAULT_BIAS_INITIALIZER);\n this.kernelRegularizer = getRegularizer(args.kernelRegularizer);\n this.recurrentRegularizer = getRegularizer(args.recurrentRegularizer);\n this.biasRegularizer = getRegularizer(args.biasRegularizer);\n this.kernelConstraint = getConstraint(args.kernelConstraint);\n this.recurrentConstraint = getConstraint(args.recurrentConstraint);\n this.biasConstraint = getConstraint(args.biasConstraint);\n this.dropout = min2([1, max2([0, args.dropout == null ? 0 : args.dropout])]);\n this.recurrentDropout = min2([\n 1,\n max2([0, args.recurrentDropout == null ? 0 : args.recurrentDropout])\n ]);\n this.dropoutFunc = args.dropoutFunc;\n this.implementation = args.implementation;\n this.stateSize = this.units;\n this.dropoutMask = null;\n this.recurrentDropoutMask = null;\n }\n build(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n const inputDim = inputShape[inputShape.length - 1];\n this.kernel = this.addWeight(\"kernel\", [inputDim, this.units * 3], null, this.kernelInitializer, this.kernelRegularizer, true, this.kernelConstraint);\n this.recurrentKernel = this.addWeight(\"recurrent_kernel\", [this.units, this.units * 3], null, this.recurrentInitializer, this.recurrentRegularizer, true, this.recurrentConstraint);\n if (this.useBias) {\n this.bias = this.addWeight(\"bias\", [this.units * 3], null, this.biasInitializer, this.biasRegularizer, true, this.biasConstraint);\n } else {\n this.bias = null;\n }\n this.built = true;\n }\n call(inputs, kwargs) {\n return tidy(() => {\n inputs = inputs;\n if (inputs.length !== 2) {\n throw new ValueError(`GRUCell expects 2 input Tensors (inputs, h, c), got ${inputs.length}.`);\n }\n const training = kwargs[\"training\"] == null ? false : kwargs[\"training\"];\n let hTMinus1 = inputs[1];\n inputs = inputs[0];\n if (0 < this.dropout && this.dropout < 1 && this.dropoutMask == null) {\n this.dropoutMask = generateDropoutMask({\n ones: () => onesLike(inputs),\n rate: this.dropout,\n training,\n count: 3,\n dropoutFunc: this.dropoutFunc\n });\n }\n if (0 < this.recurrentDropout && this.recurrentDropout < 1 && this.recurrentDropoutMask == null) {\n this.recurrentDropoutMask = generateDropoutMask({\n ones: () => onesLike(hTMinus1),\n rate: this.recurrentDropout,\n training,\n count: 3,\n dropoutFunc: this.dropoutFunc\n });\n }\n const dpMask = this.dropoutMask;\n const recDpMask = this.recurrentDropoutMask;\n let z;\n let r2;\n let hh;\n if (0 < this.dropout && this.dropout < 1) {\n inputs = mul(inputs, dpMask[0]);\n }\n let matrixX = dot2(inputs, this.kernel.read());\n if (this.useBias) {\n matrixX = biasAdd(matrixX, this.bias.read());\n }\n if (0 < this.recurrentDropout && this.recurrentDropout < 1) {\n hTMinus1 = mul(hTMinus1, recDpMask[0]);\n }\n const recurrentKernelValue = this.recurrentKernel.read();\n const [rk1, rk2] = split(recurrentKernelValue, [2 * this.units, this.units], recurrentKernelValue.rank - 1);\n const matrixInner = dot2(hTMinus1, rk1);\n const [xZ, xR, xH] = split(matrixX, 3, matrixX.rank - 1);\n const [recurrentZ, recurrentR] = split(matrixInner, 2, matrixInner.rank - 1);\n z = this.recurrentActivation.apply(add2(xZ, recurrentZ));\n r2 = this.recurrentActivation.apply(add2(xR, recurrentR));\n const recurrentH = dot2(mul(r2, hTMinus1), rk2);\n hh = this.activation.apply(add2(xH, recurrentH));\n const h = add2(mul(z, hTMinus1), mul(add2(1, neg(z)), hh));\n return [h, h];\n });\n }\n getConfig() {\n const baseConfig = super.getConfig();\n const config = {\n units: this.units,\n activation: serializeActivation(this.activation),\n recurrentActivation: serializeActivation(this.recurrentActivation),\n useBias: this.useBias,\n kernelInitializer: serializeInitializer(this.kernelInitializer),\n recurrentInitializer: serializeInitializer(this.recurrentInitializer),\n biasInitializer: serializeInitializer(this.biasInitializer),\n kernelRegularizer: serializeRegularizer(this.kernelRegularizer),\n recurrentRegularizer: serializeRegularizer(this.recurrentRegularizer),\n biasRegularizer: serializeRegularizer(this.biasRegularizer),\n activityRegularizer: serializeRegularizer(this.activityRegularizer),\n kernelConstraint: serializeConstraint(this.kernelConstraint),\n recurrentConstraint: serializeConstraint(this.recurrentConstraint),\n biasConstraint: serializeConstraint(this.biasConstraint),\n dropout: this.dropout,\n recurrentDropout: this.recurrentDropout,\n implementation: this.implementation,\n resetAfter: false\n };\n return Object.assign({}, baseConfig, config);\n }\n};\nGRUCell.className = \"GRUCell\";\nserialization_exports.registerClass(GRUCell);\nvar GRU = class extends RNN {\n constructor(args) {\n if (args.implementation === 0) {\n console.warn(\"`implementation=0` has been deprecated, and now defaults to `implementation=1`. Please update your layer call.\");\n }\n args.cell = new GRUCell(args);\n super(args);\n }\n call(inputs, kwargs) {\n return tidy(() => {\n if (this.cell.dropoutMask != null) {\n dispose(this.cell.dropoutMask);\n this.cell.dropoutMask = null;\n }\n if (this.cell.recurrentDropoutMask != null) {\n dispose(this.cell.recurrentDropoutMask);\n this.cell.recurrentDropoutMask = null;\n }\n const mask = kwargs == null ? null : kwargs[\"mask\"];\n const training = kwargs == null ? null : kwargs[\"training\"];\n const initialState = kwargs == null ? null : kwargs[\"initialState\"];\n return super.call(inputs, { mask, training, initialState });\n });\n }\n static fromConfig(cls, config) {\n if (config[\"implmentation\"] === 0) {\n config[\"implementation\"] = 1;\n }\n return new cls(config);\n }\n};\nGRU.className = \"GRU\";\nserialization_exports.registerClass(GRU);\nvar LSTMCell = class extends RNNCell {\n constructor(args) {\n super(args);\n this.DEFAULT_ACTIVATION = \"tanh\";\n this.DEFAULT_RECURRENT_ACTIVATION = \"hardSigmoid\";\n this.DEFAULT_KERNEL_INITIALIZER = \"glorotNormal\";\n this.DEFAULT_RECURRENT_INITIALIZER = \"orthogonal\";\n this.DEFAULT_BIAS_INITIALIZER = \"zeros\";\n this.units = args.units;\n assertPositiveInteger(this.units, \"units\");\n this.activation = getActivation(args.activation === void 0 ? this.DEFAULT_ACTIVATION : args.activation);\n this.recurrentActivation = getActivation(args.recurrentActivation === void 0 ? this.DEFAULT_RECURRENT_ACTIVATION : args.recurrentActivation);\n this.useBias = args.useBias == null ? true : args.useBias;\n this.kernelInitializer = getInitializer(args.kernelInitializer || this.DEFAULT_KERNEL_INITIALIZER);\n this.recurrentInitializer = getInitializer(args.recurrentInitializer || this.DEFAULT_RECURRENT_INITIALIZER);\n this.biasInitializer = getInitializer(args.biasInitializer || this.DEFAULT_BIAS_INITIALIZER);\n this.unitForgetBias = args.unitForgetBias;\n this.kernelRegularizer = getRegularizer(args.kernelRegularizer);\n this.recurrentRegularizer = getRegularizer(args.recurrentRegularizer);\n this.biasRegularizer = getRegularizer(args.biasRegularizer);\n this.kernelConstraint = getConstraint(args.kernelConstraint);\n this.recurrentConstraint = getConstraint(args.recurrentConstraint);\n this.biasConstraint = getConstraint(args.biasConstraint);\n this.dropout = min2([1, max2([0, args.dropout == null ? 0 : args.dropout])]);\n this.recurrentDropout = min2([\n 1,\n max2([0, args.recurrentDropout == null ? 0 : args.recurrentDropout])\n ]);\n this.dropoutFunc = args.dropoutFunc;\n this.implementation = args.implementation;\n this.stateSize = [this.units, this.units];\n this.dropoutMask = null;\n this.recurrentDropoutMask = null;\n }\n build(inputShape) {\n var _a;\n inputShape = getExactlyOneShape(inputShape);\n const inputDim = inputShape[inputShape.length - 1];\n this.kernel = this.addWeight(\"kernel\", [inputDim, this.units * 4], null, this.kernelInitializer, this.kernelRegularizer, true, this.kernelConstraint);\n this.recurrentKernel = this.addWeight(\"recurrent_kernel\", [this.units, this.units * 4], null, this.recurrentInitializer, this.recurrentRegularizer, true, this.recurrentConstraint);\n let biasInitializer;\n if (this.useBias) {\n if (this.unitForgetBias) {\n const capturedBiasInit = this.biasInitializer;\n const capturedUnits = this.units;\n biasInitializer = new (_a = class CustomInit extends Initializer {\n apply(shape, dtype) {\n const bI = capturedBiasInit.apply([capturedUnits]);\n const bF = new Ones().apply([capturedUnits]);\n const bCAndH = capturedBiasInit.apply([capturedUnits * 2]);\n return concatAlongFirstAxis(concatAlongFirstAxis(bI, bF), bCAndH);\n }\n }, _a.className = \"CustomInit\", _a)();\n } else {\n biasInitializer = this.biasInitializer;\n }\n this.bias = this.addWeight(\"bias\", [this.units * 4], null, biasInitializer, this.biasRegularizer, true, this.biasConstraint);\n } else {\n this.bias = null;\n }\n this.built = true;\n }\n call(inputs, kwargs) {\n return tidy(() => {\n const training = kwargs[\"training\"] == null ? false : kwargs[\"training\"];\n inputs = inputs;\n if (inputs.length !== 3) {\n throw new ValueError(`LSTMCell expects 3 input Tensors (inputs, h, c), got ${inputs.length}.`);\n }\n let hTMinus1 = inputs[1];\n const cTMinus1 = inputs[2];\n inputs = inputs[0];\n if (0 < this.dropout && this.dropout < 1 && this.dropoutMask == null) {\n this.dropoutMask = generateDropoutMask({\n ones: () => onesLike(inputs),\n rate: this.dropout,\n training,\n count: 4,\n dropoutFunc: this.dropoutFunc\n });\n }\n if (0 < this.recurrentDropout && this.recurrentDropout < 1 && this.recurrentDropoutMask == null) {\n this.recurrentDropoutMask = generateDropoutMask({\n ones: () => onesLike(hTMinus1),\n rate: this.recurrentDropout,\n training,\n count: 4,\n dropoutFunc: this.dropoutFunc\n });\n }\n const dpMask = this.dropoutMask;\n const recDpMask = this.recurrentDropoutMask;\n let i2;\n let f;\n let c;\n let o;\n if (0 < this.dropout && this.dropout < 1) {\n inputs = mul(inputs, dpMask[0]);\n }\n let z = dot2(inputs, this.kernel.read());\n if (0 < this.recurrentDropout && this.recurrentDropout < 1) {\n hTMinus1 = mul(hTMinus1, recDpMask[0]);\n }\n z = add2(z, dot2(hTMinus1, this.recurrentKernel.read()));\n if (this.useBias) {\n z = biasAdd(z, this.bias.read());\n }\n const [z0, z1, z2, z3] = split(z, 4, z.rank - 1);\n i2 = this.recurrentActivation.apply(z0);\n f = this.recurrentActivation.apply(z1);\n c = add2(mul(f, cTMinus1), mul(i2, this.activation.apply(z2)));\n o = this.recurrentActivation.apply(z3);\n const h = mul(o, this.activation.apply(c));\n return [h, h, c];\n });\n }\n getConfig() {\n const baseConfig = super.getConfig();\n const config = {\n units: this.units,\n activation: serializeActivation(this.activation),\n recurrentActivation: serializeActivation(this.recurrentActivation),\n useBias: this.useBias,\n kernelInitializer: serializeInitializer(this.kernelInitializer),\n recurrentInitializer: serializeInitializer(this.recurrentInitializer),\n biasInitializer: serializeInitializer(this.biasInitializer),\n unitForgetBias: this.unitForgetBias,\n kernelRegularizer: serializeRegularizer(this.kernelRegularizer),\n recurrentRegularizer: serializeRegularizer(this.recurrentRegularizer),\n biasRegularizer: serializeRegularizer(this.biasRegularizer),\n activityRegularizer: serializeRegularizer(this.activityRegularizer),\n kernelConstraint: serializeConstraint(this.kernelConstraint),\n recurrentConstraint: serializeConstraint(this.recurrentConstraint),\n biasConstraint: serializeConstraint(this.biasConstraint),\n dropout: this.dropout,\n recurrentDropout: this.recurrentDropout,\n implementation: this.implementation\n };\n return Object.assign({}, baseConfig, config);\n }\n};\nLSTMCell.className = \"LSTMCell\";\nserialization_exports.registerClass(LSTMCell);\nvar LSTM = class extends RNN {\n constructor(args) {\n if (args.implementation === 0) {\n console.warn(\"`implementation=0` has been deprecated, and now defaults to `implementation=1`. Please update your layer call.\");\n }\n args.cell = new LSTMCell(args);\n super(args);\n }\n call(inputs, kwargs) {\n return tidy(() => {\n if (this.cell.dropoutMask != null) {\n dispose(this.cell.dropoutMask);\n this.cell.dropoutMask = null;\n }\n if (this.cell.recurrentDropoutMask != null) {\n dispose(this.cell.recurrentDropoutMask);\n this.cell.recurrentDropoutMask = null;\n }\n const mask = kwargs == null ? null : kwargs[\"mask\"];\n const training = kwargs == null ? null : kwargs[\"training\"];\n const initialState = kwargs == null ? null : kwargs[\"initialState\"];\n return super.call(inputs, { mask, training, initialState });\n });\n }\n static fromConfig(cls, config) {\n if (config[\"implmentation\"] === 0) {\n config[\"implementation\"] = 1;\n }\n return new cls(config);\n }\n};\nLSTM.className = \"LSTM\";\nserialization_exports.registerClass(LSTM);\nvar StackedRNNCells = class extends RNNCell {\n constructor(args) {\n super(args);\n this.cells = args.cells;\n }\n get stateSize() {\n const stateSize = [];\n for (const cell of this.cells.slice().reverse()) {\n if (Array.isArray(cell.stateSize)) {\n stateSize.push(...cell.stateSize);\n } else {\n stateSize.push(cell.stateSize);\n }\n }\n return stateSize;\n }\n call(inputs, kwargs) {\n return tidy(() => {\n inputs = inputs;\n let states = inputs.slice(1);\n const nestedStates = [];\n for (const cell of this.cells.slice().reverse()) {\n if (Array.isArray(cell.stateSize)) {\n nestedStates.push(states.splice(0, cell.stateSize.length));\n } else {\n nestedStates.push(states.splice(0, 1));\n }\n }\n nestedStates.reverse();\n const newNestedStates = [];\n let callInputs;\n for (let i2 = 0; i2 < this.cells.length; ++i2) {\n const cell = this.cells[i2];\n states = nestedStates[i2];\n if (i2 === 0) {\n callInputs = [inputs[0]].concat(states);\n } else {\n callInputs = [callInputs[0]].concat(states);\n }\n callInputs = cell.call(callInputs, kwargs);\n newNestedStates.push(callInputs.slice(1));\n }\n states = [];\n for (const cellStates of newNestedStates.slice().reverse()) {\n states.push(...cellStates);\n }\n return [callInputs[0]].concat(states);\n });\n }\n build(inputShape) {\n if (isArrayOfShapes(inputShape)) {\n inputShape = inputShape[0];\n }\n inputShape = inputShape;\n let outputDim;\n this.cells.forEach((cell, i2) => {\n nameScope(`RNNCell_${i2}`, () => {\n cell.build(inputShape);\n if (Array.isArray(cell.stateSize)) {\n outputDim = cell.stateSize[0];\n } else {\n outputDim = cell.stateSize;\n }\n inputShape = [inputShape[0], outputDim];\n });\n });\n this.built = true;\n }\n getConfig() {\n const baseConfig = super.getConfig();\n const getCellConfig = (cell) => {\n return {\n \"className\": cell.getClassName(),\n \"config\": cell.getConfig()\n };\n };\n const cellConfigs = this.cells.map(getCellConfig);\n const config = { \"cells\": cellConfigs };\n return Object.assign({}, baseConfig, config);\n }\n static fromConfig(cls, config, customObjects = {}) {\n const cells = [];\n for (const cellConfig of config[\"cells\"]) {\n cells.push(deserialize(cellConfig, customObjects));\n }\n return new cls({ cells });\n }\n get trainableWeights() {\n if (!this.trainable) {\n return [];\n }\n const weights = [];\n for (const cell of this.cells) {\n weights.push(...cell.trainableWeights);\n }\n return weights;\n }\n get nonTrainableWeights() {\n const weights = [];\n for (const cell of this.cells) {\n weights.push(...cell.nonTrainableWeights);\n }\n if (!this.trainable) {\n const trainableWeights = [];\n for (const cell of this.cells) {\n trainableWeights.push(...cell.trainableWeights);\n }\n return trainableWeights.concat(weights);\n }\n return weights;\n }\n getWeights() {\n const weights = [];\n for (const cell of this.cells) {\n weights.push(...cell.weights);\n }\n return batchGetValue(weights);\n }\n setWeights(weights) {\n const tuples = [];\n for (const cell of this.cells) {\n const numParams = cell.weights.length;\n const inputWeights = weights.splice(numParams);\n for (let i2 = 0; i2 < cell.weights.length; ++i2) {\n tuples.push([cell.weights[i2], inputWeights[i2]]);\n }\n }\n batchSetValue(tuples);\n }\n};\nStackedRNNCells.className = \"StackedRNNCells\";\nserialization_exports.registerClass(StackedRNNCells);\nfunction generateDropoutMask(args) {\n const { ones: ones4, rate, training = false, count: count2 = 1, dropoutFunc } = args;\n const droppedInputs = () => dropoutFunc != null ? dropoutFunc(ones4(), rate) : dropout2(ones4(), rate);\n const createMask = () => inTrainPhase(droppedInputs, ones4, training);\n if (!count2 || count2 <= 1) {\n return keep(createMask().clone());\n }\n const masks = Array(count2).fill(void 0).map(createMask);\n return masks.map((m) => keep(m.clone()));\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/layers/convolutional_recurrent.js\nvar __rest = function(s2, e2) {\n var t2 = {};\n for (var p2 in s2)\n if (Object.prototype.hasOwnProperty.call(s2, p2) && e2.indexOf(p2) < 0)\n t2[p2] = s2[p2];\n if (s2 != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i2 = 0, p2 = Object.getOwnPropertySymbols(s2); i2 < p2.length; i2++) {\n if (e2.indexOf(p2[i2]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p2[i2]))\n t2[p2[i2]] = s2[p2[i2]];\n }\n return t2;\n};\nvar ConvRNN2D = class extends RNN {\n constructor(args) {\n if (args.unroll) {\n throw new NotImplementedError(\"Unrolling is not possible with convolutional RNNs.\");\n }\n if (Array.isArray(args.cell)) {\n throw new NotImplementedError(\"It is not possible at the moment to stack convolutional cells.\");\n }\n super(args);\n this.inputSpec = [new InputSpec({ ndim: 5 })];\n }\n call(inputs, kwargs) {\n return tidy(() => {\n if (this.cell.dropoutMask != null) {\n dispose(this.cell.dropoutMask);\n this.cell.dropoutMask = null;\n }\n if (this.cell.recurrentDropoutMask != null) {\n dispose(this.cell.recurrentDropoutMask);\n this.cell.recurrentDropoutMask = null;\n }\n if (kwargs && kwargs[\"constants\"]) {\n throw new ValueError(\"ConvRNN2D cell does not support constants\");\n }\n const mask = kwargs == null ? null : kwargs[\"mask\"];\n const training = kwargs == null ? null : kwargs[\"training\"];\n const initialState = kwargs == null ? null : kwargs[\"initialState\"];\n return super.call(inputs, { mask, training, initialState });\n });\n }\n computeOutputShape(inputShape) {\n let outShape = this.computeSingleOutputShape(inputShape);\n if (!this.returnSequences) {\n outShape = [outShape[0], ...outShape.slice(2)];\n }\n if (this.returnState) {\n outShape = [outShape, ...Array(2).fill([inputShape[0], ...outShape.slice(-3)])];\n }\n return outShape;\n }\n getInitialState(inputs) {\n return tidy(() => {\n const { stateSize } = this.cell;\n const inputShape = inputs.shape;\n const outputShape = this.computeSingleOutputShape(inputShape);\n const stateShape = [outputShape[0], ...outputShape.slice(2)];\n const initialState = zeros(stateShape);\n if (Array.isArray(stateSize)) {\n return Array(stateSize.length).fill(initialState);\n }\n return [initialState];\n });\n }\n resetStates(states, training = false) {\n tidy(() => {\n if (!this.stateful) {\n throw new AttributeError(\"Cannot call resetStates() on an RNN Layer that is not stateful.\");\n }\n const inputShape = this.inputSpec[0].shape;\n const outputShape = this.computeSingleOutputShape(inputShape);\n const stateShape = [outputShape[0], ...outputShape.slice(2)];\n const batchSize = inputShape[0];\n if (batchSize == null) {\n throw new ValueError(\"If an RNN is stateful, it needs to know its batch size. Specify the batch size of your input tensors: \\n- If using a Sequential model, specify the batch size by passing a `batchInputShape` option to your first layer.\\n- If using the functional API, specify the batch size by passing a `batchShape` option to your Input layer.\");\n }\n if (this.getStates() == null) {\n if (Array.isArray(this.cell.stateSize)) {\n this.states_ = this.cell.stateSize.map(() => zeros(stateShape));\n } else {\n this.states_ = [zeros(stateShape)];\n }\n } else if (states == null) {\n dispose(this.states_);\n if (this.keptStates != null) {\n dispose(this.keptStates);\n this.keptStates = [];\n }\n if (Array.isArray(this.cell.stateSize)) {\n this.states_ = this.cell.stateSize.map(() => zeros(stateShape));\n } else {\n this.states_[0] = zeros(stateShape);\n }\n } else {\n if (!Array.isArray(states)) {\n states = [states];\n }\n if (states.length !== this.states_.length) {\n throw new ValueError(`Layer ${this.name} expects ${this.states_.length} state(s), but it received ${states.length} state value(s). Input received: ${states}`);\n }\n if (training) {\n this.keptStates.push(this.states_.slice());\n } else {\n dispose(this.states_);\n }\n for (let index = 0; index < this.states_.length; ++index) {\n const value = states[index];\n const expectedShape = stateShape;\n if (!util_exports.arraysEqual(value.shape, expectedShape)) {\n throw new ValueError(`State ${index} is incompatible with layer ${this.name}: expected shape=${expectedShape}, received shape=${value.shape}`);\n }\n this.states_[index] = value;\n }\n }\n this.states_ = this.states_.map((state) => keep(state.clone()));\n });\n }\n computeSingleOutputShape(inputShape) {\n const { dataFormat, filters, kernelSize, padding, strides, dilationRate } = this.cell;\n const isChannelsFirst = dataFormat === \"channelsFirst\";\n const h = inputShape[isChannelsFirst ? 3 : 2];\n const w = inputShape[isChannelsFirst ? 4 : 3];\n const hOut = convOutputLength(h, kernelSize[0], padding, strides[0], dilationRate[0]);\n const wOut = convOutputLength(w, kernelSize[1], padding, strides[1], dilationRate[1]);\n const outShape = [\n ...inputShape.slice(0, 2),\n ...isChannelsFirst ? [filters, hOut, wOut] : [hOut, wOut, filters]\n ];\n return outShape;\n }\n};\nConvRNN2D.className = \"ConvRNN2D\";\nvar ConvLSTM2DCell = class extends LSTMCell {\n constructor(args) {\n const { filters, kernelSize, strides, padding, dataFormat, dilationRate } = args;\n super(Object.assign({}, args, { units: filters }));\n this.filters = filters;\n assertPositiveInteger(this.filters, \"filters\");\n this.kernelSize = normalizeArray(kernelSize, 2, \"kernelSize\");\n this.kernelSize.forEach((size) => assertPositiveInteger(size, \"kernelSize\"));\n this.strides = normalizeArray(strides || 1, 2, \"strides\");\n this.strides.forEach((stride) => assertPositiveInteger(stride, \"strides\"));\n this.padding = padding || \"valid\";\n checkPaddingMode(this.padding);\n this.dataFormat = dataFormat || \"channelsLast\";\n checkDataFormat(this.dataFormat);\n this.dilationRate = normalizeArray(dilationRate || 1, 2, \"dilationRate\");\n this.dilationRate.forEach((rate) => assertPositiveInteger(rate, \"dilationRate\"));\n }\n build(inputShape) {\n var _a;\n inputShape = getExactlyOneShape(inputShape);\n const channelAxis = this.dataFormat === \"channelsFirst\" ? 1 : inputShape.length - 1;\n if (inputShape[channelAxis] == null) {\n throw new ValueError(`The channel dimension of the input should be defined. Found ${inputShape[channelAxis]}`);\n }\n const inputDim = inputShape[channelAxis];\n const numOfKernels = 4;\n const kernelShape = this.kernelSize.concat([inputDim, this.filters * numOfKernels]);\n this.kernel = this.addWeight(\"kernel\", kernelShape, null, this.kernelInitializer, this.kernelRegularizer, true, this.kernelConstraint);\n const recurrentKernelShape = this.kernelSize.concat([this.filters, this.filters * numOfKernels]);\n this.recurrentKernel = this.addWeight(\"recurrent_kernel\", recurrentKernelShape, null, this.recurrentInitializer, this.recurrentRegularizer, true, this.recurrentConstraint);\n if (this.useBias) {\n let biasInitializer;\n if (this.unitForgetBias) {\n const init2 = this.biasInitializer;\n const filters = this.filters;\n biasInitializer = new (_a = class CustomInit extends Initializer {\n apply(shape, dtype) {\n const biasI = init2.apply([filters]);\n const biasF = ones2([filters]);\n const biasCAndO = init2.apply([filters * 2]);\n return concatenate([biasI, biasF, biasCAndO]);\n }\n }, _a.className = \"CustomInit\", _a)();\n } else {\n biasInitializer = this.biasInitializer;\n }\n this.bias = this.addWeight(\"bias\", [this.filters * numOfKernels], null, biasInitializer, this.biasRegularizer, true, this.biasConstraint);\n }\n this.built = true;\n }\n call(inputs, kwargs) {\n return tidy(() => {\n if (inputs.length !== 3) {\n throw new ValueError(`ConvLSTM2DCell expects 3 input Tensors (inputs, h, c), got ${inputs.length}.`);\n }\n const training = kwargs[\"training\"] || false;\n const x = inputs[0];\n const hTMinus1 = inputs[1];\n const cTMinus1 = inputs[2];\n const numOfKernels = 4;\n if (0 < this.dropout && this.dropout < 1 && this.dropoutMask == null) {\n this.dropoutMask = generateDropoutMask({\n ones: () => onesLike(x),\n rate: this.dropout,\n training,\n count: numOfKernels,\n dropoutFunc: this.dropoutFunc\n });\n }\n const dropoutMask = this.dropoutMask;\n const applyDropout = (x2, mask, index) => {\n if (!mask || !mask[index]) {\n return x2;\n }\n return mul(mask[index], x2);\n };\n let xI = applyDropout(x, dropoutMask, 0);\n let xF = applyDropout(x, dropoutMask, 1);\n let xC = applyDropout(x, dropoutMask, 2);\n let xO = applyDropout(x, dropoutMask, 3);\n if (0 < this.recurrentDropout && this.recurrentDropout < 1 && this.recurrentDropoutMask == null) {\n this.recurrentDropoutMask = generateDropoutMask({\n ones: () => onesLike(hTMinus1),\n rate: this.recurrentDropout,\n training,\n count: numOfKernels,\n dropoutFunc: this.dropoutFunc\n });\n }\n const recDropoutMask = this.recurrentDropoutMask;\n let hI = applyDropout(hTMinus1, recDropoutMask, 0);\n let hF = applyDropout(hTMinus1, recDropoutMask, 1);\n let hC = applyDropout(hTMinus1, recDropoutMask, 2);\n let hO = applyDropout(hTMinus1, recDropoutMask, 3);\n const kernelChannelAxis = 3;\n const [kernelI, kernelF, kernelC, kernelO] = split(this.kernel.read(), numOfKernels, kernelChannelAxis);\n const [biasI, biasF, biasC, biasO] = this.useBias ? split(this.bias.read(), numOfKernels) : [null, null, null, null];\n xI = this.inputConv(xI, kernelI, biasI, this.padding);\n xF = this.inputConv(xF, kernelF, biasF, this.padding);\n xC = this.inputConv(xC, kernelC, biasC, this.padding);\n xO = this.inputConv(xO, kernelO, biasO, this.padding);\n const [recKernelI, recKernelF, recKernelC, recKernelO] = split(this.recurrentKernel.read(), numOfKernels, kernelChannelAxis);\n hI = this.recurrentConv(hI, recKernelI);\n hF = this.recurrentConv(hF, recKernelF);\n hC = this.recurrentConv(hC, recKernelC);\n hO = this.recurrentConv(hO, recKernelO);\n const i2 = this.recurrentActivation.apply(add2(xI, hI));\n const f = this.recurrentActivation.apply(add2(xF, hF));\n const c = add2(mul(f, cTMinus1), mul(i2, this.activation.apply(add2(xC, hC))));\n const h = mul(this.recurrentActivation.apply(add2(xO, hO)), this.activation.apply(c));\n return [h, h, c];\n });\n }\n getConfig() {\n const _a = super.getConfig(), { \"units\": _ } = _a, baseConfig = __rest(_a, [\"units\"]);\n const config = {\n filters: this.filters,\n kernelSize: this.kernelSize,\n padding: this.padding,\n dataFormat: this.dataFormat,\n dilationRate: this.dilationRate,\n strides: this.strides\n };\n return Object.assign({}, baseConfig, config);\n }\n inputConv(x, w, b, padding) {\n const out = conv2d(x, w, this.strides, padding || \"valid\", this.dataFormat === \"channelsFirst\" ? \"NCHW\" : \"NHWC\", this.dilationRate);\n if (b) {\n return biasAdd(out, b, this.dataFormat);\n }\n return out;\n }\n recurrentConv(x, w) {\n const strides = 1;\n return conv2d(x, w, strides, \"same\", this.dataFormat === \"channelsFirst\" ? \"NCHW\" : \"NHWC\");\n }\n};\nConvLSTM2DCell.className = \"ConvLSTM2DCell\";\nserialization_exports.registerClass(ConvLSTM2DCell);\nvar ConvLSTM2D = class extends ConvRNN2D {\n constructor(args) {\n const cell = new ConvLSTM2DCell(args);\n super(Object.assign({}, args, { cell }));\n }\n static fromConfig(cls, config) {\n return new cls(config);\n }\n};\nConvLSTM2D.className = \"ConvLSTM2D\";\nserialization_exports.registerClass(ConvLSTM2D);\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/layers/core.js\nvar Dropout = class extends Layer {\n constructor(args) {\n super(args);\n this.rate = Math.max(Math.min(args.rate, 1), 0);\n this.noiseShape = args.noiseShape;\n this.seed = args.seed;\n this.supportsMasking = true;\n }\n getNoiseShape(input2) {\n if (this.noiseShape == null) {\n return this.noiseShape;\n }\n const inputShape = input2.shape;\n const noiseShape = [];\n for (let i2 = 0; i2 < this.noiseShape.length; ++i2) {\n noiseShape.push(this.noiseShape[i2] == null ? inputShape[i2] : this.noiseShape[i2]);\n }\n return noiseShape;\n }\n call(inputs, kwargs) {\n return tidy(() => {\n this.invokeCallHook(inputs, kwargs);\n const input2 = getExactlyOneTensor(inputs);\n if (0 < this.rate && this.rate < 1) {\n const training = kwargs[\"training\"] == null ? false : kwargs[\"training\"];\n const noiseShape = this.getNoiseShape(input2);\n const output = inTrainPhase(() => dropout2(input2, this.rate, noiseShape, this.seed), () => input2, training);\n return output;\n }\n return inputs;\n });\n }\n getConfig() {\n const config = {\n rate: this.rate,\n noiseShape: this.noiseShape,\n seed: this.seed\n };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n dispose() {\n return super.dispose();\n }\n};\nDropout.className = \"Dropout\";\nserialization_exports.registerClass(Dropout);\nvar SpatialDropout1D = class extends Dropout {\n constructor(args) {\n super(args);\n this.inputSpec = [{ ndim: 3 }];\n }\n getNoiseShape(input2) {\n const inputShape = input2.shape;\n return [inputShape[0], 1, inputShape[2]];\n }\n};\nSpatialDropout1D.className = \"SpatialDropout1D\";\nserialization_exports.registerClass(SpatialDropout1D);\nvar Dense = class extends Layer {\n constructor(args) {\n super(args);\n this.activation = null;\n this.useBias = true;\n this.kernel = null;\n this.bias = null;\n this.DEFAULT_KERNEL_INITIALIZER = \"glorotNormal\";\n this.DEFAULT_BIAS_INITIALIZER = \"zeros\";\n if (args.batchInputShape == null && args.inputShape == null && args.inputDim != null) {\n let batchSize = null;\n if (args.batchSize != null) {\n batchSize = args.batchSize;\n }\n this.batchInputShape = [batchSize, args.inputDim];\n }\n this.units = args.units;\n assertPositiveInteger(this.units, \"units\");\n this.activation = getActivation(args.activation);\n if (args.useBias != null) {\n this.useBias = args.useBias;\n }\n this.kernelInitializer = getInitializer(args.kernelInitializer || this.DEFAULT_KERNEL_INITIALIZER);\n this.biasInitializer = getInitializer(args.biasInitializer || this.DEFAULT_BIAS_INITIALIZER);\n this.kernelConstraint = getConstraint(args.kernelConstraint);\n this.biasConstraint = getConstraint(args.biasConstraint);\n this.kernelRegularizer = getRegularizer(args.kernelRegularizer);\n this.biasRegularizer = getRegularizer(args.biasRegularizer);\n this.activityRegularizer = getRegularizer(args.activityRegularizer);\n this.supportsMasking = true;\n this.inputSpec = [{ minNDim: 2 }];\n }\n build(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n const inputLastDim = inputShape[inputShape.length - 1];\n if (this.kernel == null) {\n this.kernel = this.addWeight(\"kernel\", [inputLastDim, this.units], null, this.kernelInitializer, this.kernelRegularizer, true, this.kernelConstraint);\n if (this.useBias) {\n this.bias = this.addWeight(\"bias\", [this.units], null, this.biasInitializer, this.biasRegularizer, true, this.biasConstraint);\n }\n }\n this.inputSpec = [{ minNDim: 2, axes: { [-1]: inputLastDim } }];\n this.built = true;\n }\n computeOutputShape(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n const outputShape = inputShape.slice();\n outputShape[outputShape.length - 1] = this.units;\n return outputShape;\n }\n call(inputs, kwargs) {\n return tidy(() => {\n this.invokeCallHook(inputs, kwargs);\n const input2 = getExactlyOneTensor(inputs);\n const fusedActivationName = mapActivationToFusedKernel(this.activation.getClassName());\n let output;\n if (fusedActivationName != null) {\n output = dot2(input2, this.kernel.read(), fusedActivationName, this.bias ? this.bias.read() : null);\n } else {\n output = dot2(input2, this.kernel.read());\n if (this.bias != null) {\n output = biasAdd(output, this.bias.read());\n }\n if (this.activation != null) {\n output = this.activation.apply(output);\n }\n }\n return output;\n });\n }\n getConfig() {\n const config = {\n units: this.units,\n activation: serializeActivation(this.activation),\n useBias: this.useBias,\n kernelInitializer: serializeInitializer(this.kernelInitializer),\n biasInitializer: serializeInitializer(this.biasInitializer),\n kernelRegularizer: serializeRegularizer(this.kernelRegularizer),\n biasRegularizer: serializeRegularizer(this.biasRegularizer),\n activityRegularizer: serializeRegularizer(this.activityRegularizer),\n kernelConstraint: serializeConstraint(this.kernelConstraint),\n biasConstraint: serializeConstraint(this.biasConstraint)\n };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nDense.className = \"Dense\";\nserialization_exports.registerClass(Dense);\nvar Flatten = class extends Layer {\n constructor(args) {\n args = args || {};\n super(args);\n this.inputSpec = [{ minNDim: 3 }];\n this.dataFormat = args.dataFormat;\n }\n computeOutputShape(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n for (const dim of inputShape.slice(1)) {\n if (dim == null) {\n throw new ValueError(`The shape of the input to \"Flatten\" is not fully defined (got ${inputShape.slice(1)}). Make sure to pass a complete \"input_shape\" or \"batch_input_shape\" argument to the first layer in your model.`);\n }\n }\n return [inputShape[0], arrayProd(inputShape, 1)];\n }\n call(inputs, kwargs) {\n return tidy(() => {\n this.invokeCallHook(inputs, kwargs);\n let input2 = getExactlyOneTensor(inputs);\n if (this.dataFormat === \"channelsFirst\" && input2.rank > 1) {\n const permutation = [0];\n for (let i2 = 2; i2 < input2.rank; ++i2) {\n permutation.push(i2);\n }\n permutation.push(1);\n input2 = transpose(input2, permutation);\n }\n return batchFlatten(input2);\n });\n }\n getConfig() {\n const config = {};\n if (this.dataFormat != null) {\n config[\"dataFormat\"] = this.dataFormat;\n }\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nFlatten.className = \"Flatten\";\nserialization_exports.registerClass(Flatten);\nvar Activation2 = class extends Layer {\n constructor(args) {\n super(args);\n this.supportsMasking = true;\n this.activation = getActivation(args.activation);\n }\n call(inputs, kwargs) {\n return tidy(() => {\n this.invokeCallHook(inputs, kwargs);\n const input2 = getExactlyOneTensor(inputs);\n return this.activation.apply(input2);\n });\n }\n getConfig() {\n const config = { activation: serializeActivation(this.activation) };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nActivation2.className = \"Activation\";\nserialization_exports.registerClass(Activation2);\nvar RepeatVector = class extends Layer {\n constructor(args) {\n super(args);\n this.n = args.n;\n this.inputSpec = [{ ndim: 2 }];\n }\n computeOutputShape(inputShape) {\n return [inputShape[0], this.n, inputShape[1]];\n }\n call(inputs, kwargs) {\n return tidy(() => {\n inputs = getExactlyOneTensor(inputs);\n return repeat(inputs, this.n);\n });\n }\n getConfig() {\n const config = {\n n: this.n\n };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nRepeatVector.className = \"RepeatVector\";\nserialization_exports.registerClass(RepeatVector);\nvar Reshape2 = class extends Layer {\n constructor(args) {\n super(args);\n this.targetShape = args.targetShape;\n for (let i2 = 0; i2 < this.targetShape.length; ++i2) {\n if (this.isUnknown(this.targetShape[i2])) {\n this.targetShape[i2] = null;\n }\n }\n }\n isUnknown(dim) {\n return dim < 0 || dim == null;\n }\n fixUnknownDimension(inputShape, outputShape) {\n const errorMsg = \"Total size of new array must be unchanged.\";\n const finalShape = outputShape.slice();\n let known = 1;\n let unknown = null;\n for (let i2 = 0; i2 < finalShape.length; ++i2) {\n const dim = finalShape[i2];\n if (this.isUnknown(dim)) {\n if (unknown === null) {\n unknown = i2;\n } else {\n throw new ValueError(\"Can only specifiy one unknown dimension.\");\n }\n } else {\n known *= dim;\n }\n }\n const originalSize = arrayProd(inputShape);\n if (unknown !== null) {\n if (known === 0 || originalSize % known !== 0) {\n throw new ValueError(errorMsg);\n }\n finalShape[unknown] = originalSize / known;\n } else if (originalSize !== known) {\n throw new ValueError(errorMsg);\n }\n return finalShape;\n }\n computeOutputShape(inputShape) {\n let anyUnknownDims = false;\n for (let i2 = 0; i2 < inputShape.length; ++i2) {\n if (this.isUnknown(inputShape[i2])) {\n anyUnknownDims = true;\n break;\n }\n }\n if (anyUnknownDims) {\n return inputShape.slice(0, 1).concat(this.targetShape);\n } else {\n return inputShape.slice(0, 1).concat(this.fixUnknownDimension(inputShape.slice(1), this.targetShape));\n }\n }\n call(inputs, kwargs) {\n return tidy(() => {\n this.invokeCallHook(inputs, kwargs);\n const input2 = getExactlyOneTensor(inputs);\n const inputShape = input2.shape;\n const outputShape = inputShape.slice(0, 1).concat(this.fixUnknownDimension(inputShape.slice(1), this.targetShape));\n return reshape(input2, outputShape);\n });\n }\n getConfig() {\n const config = {\n targetShape: this.targetShape\n };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nReshape2.className = \"Reshape\";\nserialization_exports.registerClass(Reshape2);\nvar Permute = class extends Layer {\n constructor(args) {\n super(args);\n if (args.dims == null) {\n throw new Error(\"Required configuration field `dims` is missing during Permute constructor call.\");\n }\n if (!Array.isArray(args.dims)) {\n throw new Error(`Permute constructor requires \\`dims\\` to be an Array, but received ${args.dims} instead.`);\n }\n const expectedSortedIndices = range2(1, args.dims.length + 1);\n if (!util_exports.arraysEqual(args.dims.slice().sort(), expectedSortedIndices)) {\n throw new Error(\"Invalid permutation `dims`: \" + JSON.stringify(args.dims) + \" `dims` must contain consecutive integers starting from 1.\");\n }\n this.dims = args.dims;\n this.dimsIncludingBatch = [0].concat(this.dims);\n this.inputSpec = [new InputSpec({ ndim: this.dims.length + 1 })];\n }\n computeOutputShape(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n const outputShape = inputShape.slice();\n this.dims.forEach((dim, i2) => {\n outputShape[i2 + 1] = inputShape[dim];\n });\n return outputShape;\n }\n call(inputs, kwargs) {\n return transpose(getExactlyOneTensor(inputs), this.dimsIncludingBatch);\n }\n getConfig() {\n const config = {\n dims: this.dims\n };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nPermute.className = \"Permute\";\nserialization_exports.registerClass(Permute);\nvar Masking = class extends Layer {\n constructor(args) {\n super(args == null ? {} : args);\n this.supportsMasking = true;\n if (args != null) {\n this.maskValue = args.maskValue == null ? 0 : args.maskValue;\n } else {\n this.maskValue = 0;\n }\n }\n computeOutputShape(inputShape) {\n return inputShape;\n }\n getConfig() {\n const baseConfig = super.getConfig();\n const config = { maskValue: this.maskValue };\n Object.assign(config, baseConfig);\n return config;\n }\n computeMask(inputs, mask) {\n const input2 = getExactlyOneTensor(inputs);\n const axis = -1;\n return any(notEqual(input2, this.maskValue), axis);\n }\n call(inputs, kwargs) {\n return tidy(() => {\n this.invokeCallHook(inputs, kwargs);\n const input2 = getExactlyOneTensor(inputs);\n const axis = -1;\n const keepDims = true;\n const booleanMask = any(notEqual(input2, this.maskValue), axis, keepDims);\n const output = mul(input2, cast(booleanMask, input2.dtype));\n return output;\n });\n }\n};\nMasking.className = \"Masking\";\nserialization_exports.registerClass(Masking);\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/layers/embeddings.js\nvar Embedding = class extends Layer {\n constructor(args) {\n super(args);\n this.embeddings = null;\n this.DEFAULT_EMBEDDINGS_INITIALIZER = \"randomUniform\";\n if (args.batchInputShape == null && args.inputShape == null) {\n let batchSize = null;\n if (args.batchSize != null) {\n batchSize = args.batchSize;\n }\n if (args.inputLength == null) {\n this.batchInputShape = [batchSize, null];\n } else {\n this.batchInputShape = [batchSize].concat(toList(args.inputLength));\n }\n }\n this.inputDim = args.inputDim;\n assertPositiveInteger(this.inputDim, \"inputDim\");\n this.outputDim = args.outputDim;\n assertPositiveInteger(this.outputDim, \"outputDim\");\n this.embeddingsInitializer = getInitializer(args.embeddingsInitializer || this.DEFAULT_EMBEDDINGS_INITIALIZER);\n this.embeddingsRegularizer = getRegularizer(args.embeddingsRegularizer);\n this.activityRegularizer = getRegularizer(args.activityRegularizer);\n this.embeddingsConstraint = getConstraint(args.embeddingsConstraint);\n this.maskZero = args.maskZero;\n this.supportsMasking = args.maskZero;\n this.inputLength = args.inputLength;\n }\n build(inputShape) {\n this.embeddings = this.addWeight(\"embeddings\", [this.inputDim, this.outputDim], this.dtype, this.embeddingsInitializer, this.embeddingsRegularizer, true, this.embeddingsConstraint);\n this.built = true;\n }\n warnOnIncompatibleInputShape(inputShape) {\n }\n computeMask(inputs, mask) {\n return tidy(() => {\n if (!this.maskZero) {\n return null;\n } else {\n inputs = getExactlyOneTensor(inputs);\n return notEqual(inputs, zerosLike(inputs));\n }\n });\n }\n computeOutputShape(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n if (this.inputLength == null) {\n return [...inputShape, this.outputDim];\n }\n const inLens = toList(this.inputLength);\n if (inLens.length !== inputShape.length - 1) {\n throw new ValueError(`\"inputLength\" is ${this.inputLength}, but received input shape has shape ${inputShape}`);\n } else {\n let i2 = 0;\n for (let k = 0; k < inLens.length; ++k) {\n const s1 = inLens[k];\n const s2 = inputShape[k + 1];\n if (s1 != null && s2 != null && s1 !== s2) {\n throw new ValueError(`\"inputLength\" is ${this.inputLength}, but received input shape has shape ${inputShape}`);\n } else if (s1 == null) {\n inLens[i2] = s2;\n }\n i2++;\n }\n }\n return [inputShape[0], ...inLens, this.outputDim];\n }\n call(inputs, kwargs) {\n return tidy(() => {\n this.invokeCallHook(inputs, kwargs);\n let input2 = getExactlyOneTensor(inputs);\n if (input2.dtype !== \"int32\") {\n input2 = cast2(input2, \"int32\");\n }\n const output = gather2(this.embeddings.read(), reshape(input2, [input2.size]));\n return reshape(output, getExactlyOneShape(this.computeOutputShape(input2.shape)));\n });\n }\n getConfig() {\n const config = {\n inputDim: this.inputDim,\n outputDim: this.outputDim,\n embeddingsInitializer: serializeInitializer(this.embeddingsInitializer),\n embeddingsRegularizer: serializeRegularizer(this.embeddingsRegularizer),\n activityRegularizer: serializeRegularizer(this.activityRegularizer),\n embeddingsConstraint: serializeConstraint(this.embeddingsConstraint),\n maskZero: this.maskZero,\n inputLength: this.inputLength\n };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nEmbedding.className = \"Embedding\";\nserialization_exports.registerClass(Embedding);\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/layers/merge.js\nvar Merge = class extends Layer {\n constructor(args) {\n super(args || {});\n this.supportsMasking = true;\n }\n mergeFunction(inputs) {\n throw new NotImplementedError();\n }\n computeElementwiseOpOutputShape(shape1, shape2) {\n if (shape1 == null || shape2 == null) {\n return null;\n } else if (shape1.length < shape2.length) {\n return this.computeElementwiseOpOutputShape(shape2, shape1);\n } else if (shape2.length === 0) {\n return shape1;\n }\n const outputShape = shape1.slice(0, shape1.length - shape2.length);\n for (let k = 0; k < shape2.length; ++k) {\n const i2 = shape1[shape1.length - shape2.length + k];\n const j = shape2[k];\n if (i2 == null || j == null || i2 < 0 || j < 0) {\n outputShape.push(null);\n } else if (i2 === 1) {\n outputShape.push(j);\n } else if (j === 1) {\n outputShape.push(i2);\n } else {\n if (i2 !== j) {\n throw new ValueError(\"Operands could not be broadcast together with shapes \" + JSON.stringify(shape1) + \" \" + JSON.stringify(shape2));\n }\n outputShape.push(i2);\n }\n }\n return outputShape;\n }\n build(inputShape) {\n if (Array.isArray(inputShape) && !Array.isArray(inputShape[0])) {\n inputShape = [getExactlyOneShape(inputShape)];\n }\n inputShape = inputShape;\n if (inputShape.length < 2) {\n throw new ValueError(`A merge layer should be called on an Array of at least 2 inputs. Got ${inputShape.length} input(s).`);\n }\n let batchSizes = [];\n for (const shape of inputShape) {\n if (shape != null && shape[0] !== null) {\n batchSizes.push(shape[0]);\n }\n }\n batchSizes = unique2(batchSizes);\n if (batchSizes.length > 1) {\n throw new ValueError(`Can not merge tensors with different batch sizes. Got tensors with shapes: ${JSON.stringify(inputShape)}.`);\n }\n let outputShape = inputShape[0] == null ? null : inputShape[0].slice(1);\n for (let i2 = 1; i2 < inputShape.length; ++i2) {\n const shape = inputShape[i2] == null ? null : inputShape[i2].slice(1);\n outputShape = this.computeElementwiseOpOutputShape(outputShape, shape);\n }\n const allRanks = inputShape.map((shape) => shape.length);\n if (inputShape.indexOf(null) === -1 && unique2(allRanks).length === 1) {\n this.reshapeRequired = false;\n } else {\n this.reshapeRequired = true;\n }\n }\n call(inputs, kwargs) {\n return tidy(() => {\n inputs = inputs;\n if (this.reshapeRequired) {\n const reshapedInputs = [];\n const inputDims = inputs.map((input2) => input2.rank);\n if (inputDims.indexOf(null) === -1) {\n const maxNDim = max2(inputDims);\n for (let x of inputs) {\n const xNDim = x.rank;\n for (let k = 0; k < maxNDim - xNDim; ++k) {\n x = expandDims2(x, 1);\n }\n reshapedInputs.push(x);\n }\n return this.mergeFunction(reshapedInputs);\n } else {\n let transposed = false;\n for (const x of inputs) {\n const xNDim = x.rank;\n if (xNDim == null) {\n const xShape = x.shape;\n const batchSize = xShape[0];\n const newShape = xShape.slice(1).concat([batchSize]);\n let xTransposed = reshape(x, [batchSize].concat(arrayProd(xShape.slice(1))));\n xTransposed = transpose(xTransposed, [1, 0]);\n xTransposed = reshape(xTransposed, newShape);\n reshapedInputs.push(xTransposed);\n transposed = true;\n } else if (xNDim > 1) {\n const dims = range2(1, xNDim).concat([0]);\n reshapedInputs.push(transpose(x, dims));\n transposed = true;\n } else {\n reshapedInputs.push(x);\n }\n }\n let y = this.mergeFunction(reshapedInputs);\n const yNDim = y.rank;\n if (transposed) {\n if (yNDim == null) {\n const yShape = y.shape;\n const yNDim2 = yShape.length;\n const batchSize = yShape[yNDim2 - 1];\n const newShape = [batchSize].concat(yShape.slice(0, yShape.length - 1));\n y = reshape(transpose(reshape(y, [-1, batchSize]), [1, 0]), newShape);\n } else if (yNDim > 1) {\n const dims = [yNDim - 1].concat(range2(0, yNDim - 1));\n y = transpose(y, dims);\n }\n }\n return y;\n }\n } else {\n return this.mergeFunction(inputs);\n }\n });\n }\n computeOutputShape(inputShape) {\n inputShape = inputShape;\n let outputShape;\n if (inputShape[0] == null) {\n outputShape = null;\n } else {\n outputShape = inputShape[0].slice(1);\n }\n for (let i2 = 1; i2 < inputShape.length; ++i2) {\n const shape = inputShape[i2] == null ? null : inputShape[i2].slice(1);\n outputShape = this.computeElementwiseOpOutputShape(outputShape, shape);\n }\n let batchSizes = [];\n for (const shape of inputShape) {\n if (shape != null && shape[0] !== null) {\n batchSizes.push(shape[0]);\n }\n }\n batchSizes = unique2(batchSizes);\n if (batchSizes.length === 1) {\n outputShape = batchSizes.concat(outputShape);\n } else {\n outputShape = [null].concat(outputShape);\n }\n return outputShape;\n }\n computeMask(inputs, mask) {\n return tidy(() => {\n if (mask == null) {\n return null;\n }\n if (!Array.isArray(mask)) {\n throw new ValueError(\"`mask` should be an Array\");\n }\n if (!Array.isArray(inputs)) {\n throw new ValueError(\"`inputs` should be an Array\");\n }\n if (mask.length !== inputs.length) {\n throw new ValueError(`The Array 'inputs' and 'mask' are expected to have the same length, but have different lengths (${inputs.length} vs ${mask.length})`);\n }\n if (mask.every((m) => m == null)) {\n return null;\n }\n mask = mask.map((m) => m == null ? m : expandDims(m, 0));\n let output = mask[0];\n for (let i2 = 1; i2 < mask.length - 1; ++i2) {\n output = logicalAnd(output, mask[i2]);\n }\n return output;\n });\n }\n};\nvar Add2 = class extends Merge {\n constructor(args) {\n super(args);\n }\n mergeFunction(inputs) {\n return tidy(() => {\n let output = inputs[0].clone();\n for (let i2 = 1; i2 < inputs.length; ++i2) {\n output = add2(output, inputs[i2]);\n }\n return output;\n });\n }\n};\nAdd2.className = \"Add\";\nserialization_exports.registerClass(Add2);\nvar Multiply2 = class extends Merge {\n constructor(args) {\n super(args);\n }\n mergeFunction(inputs) {\n return tidy(() => {\n let output = inputs[0].clone();\n for (let i2 = 1; i2 < inputs.length; ++i2) {\n output = mul(output, inputs[i2]);\n }\n return output;\n });\n }\n};\nMultiply2.className = \"Multiply\";\nserialization_exports.registerClass(Multiply2);\nvar Average = class extends Merge {\n constructor(args) {\n super(args);\n }\n mergeFunction(inputs) {\n return tidy(() => {\n let output = inputs[0].clone();\n for (let i2 = 1; i2 < inputs.length; ++i2) {\n output = add2(output, inputs[i2]);\n }\n return mul(1 / inputs.length, output);\n });\n }\n};\nAverage.className = \"Average\";\nserialization_exports.registerClass(Average);\nvar Maximum2 = class extends Merge {\n constructor(args) {\n super(args);\n }\n mergeFunction(inputs) {\n return tidy(() => {\n let output = inputs[0];\n for (let i2 = 1; i2 < inputs.length; ++i2) {\n output = maximum(output, inputs[i2]);\n }\n return output;\n });\n }\n};\nMaximum2.className = \"Maximum\";\nserialization_exports.registerClass(Maximum2);\nvar Minimum2 = class extends Merge {\n constructor(args) {\n super(args);\n }\n mergeFunction(inputs) {\n return tidy(() => {\n let output = inputs[0];\n for (let i2 = 1; i2 < inputs.length; ++i2) {\n output = minimum(output, inputs[i2]);\n }\n return output;\n });\n }\n};\nMinimum2.className = \"Minimum\";\nserialization_exports.registerClass(Minimum2);\nvar Concatenate = class extends Merge {\n constructor(args) {\n super(args);\n this.DEFAULT_AXIS = -1;\n if (args == null) {\n args = {};\n }\n this.axis = args.axis == null ? this.DEFAULT_AXIS : args.axis;\n this.supportsMasking = true;\n this.reshapeRequired = false;\n }\n build(inputShape) {\n if (!(Array.isArray(inputShape) && Array.isArray(inputShape[0])) || inputShape.length === 1) {\n throw new ValueError(\"A `Concatenate` layer should be called on a list of at least 2 inputs\");\n }\n inputShape = inputShape;\n let allNoneShape = true;\n for (const shape of inputShape) {\n if (shape != null) {\n allNoneShape = false;\n break;\n }\n }\n if (allNoneShape) {\n return;\n }\n const shapeSet = [];\n for (let i2 = 0; i2 < inputShape.length; ++i2) {\n const shapeWithoutConcatAxis = inputShape[i2].slice();\n shapeWithoutConcatAxis.splice(this.axis, 1);\n let exists = false;\n for (const shape of shapeSet) {\n if (util_exports.arraysEqual(shape, shapeWithoutConcatAxis)) {\n exists = true;\n break;\n }\n }\n if (!exists) {\n shapeSet.push(shapeWithoutConcatAxis);\n }\n }\n if (shapeSet.length > 1) {\n throw new ValueError(\"A `Concatenate` layer requires inputs with matching shapes except for the concat axis. Got input shapes: \" + JSON.stringify(inputShape));\n }\n }\n mergeFunction(inputs) {\n return tidy(() => {\n return concatenate(inputs, this.axis);\n });\n }\n computeOutputShape(inputShape) {\n if (!(Array.isArray(inputShape) && Array.isArray(inputShape[0]))) {\n throw new ValueError(\"A `Concatenate` layer should be called on a list of inputs.\");\n }\n const inputShapes = inputShape;\n const outputShape = inputShapes[0].slice();\n const axis = this.axis < 0 ? outputShape.length + this.axis : this.axis;\n for (const shape of inputShapes.slice(1)) {\n if (outputShape[axis] == null || shape[axis] == null) {\n outputShape[axis] = null;\n break;\n }\n outputShape[axis] += shape[axis];\n }\n return outputShape;\n }\n computeMask(inputs, mask) {\n if (mask == null) {\n return null;\n }\n if (!Array.isArray(mask)) {\n throw new ValueError(\"`mask` should be an array for Concatenate\");\n }\n if (!Array.isArray(inputs)) {\n throw new ValueError(\"`inputs` should be an array for Concatenate\");\n }\n if (mask.length !== inputs.length) {\n throw new ValueError(`Mismatch in the length of mask (${mask.length}) and the legnth of inputs (${inputs.length})`);\n }\n return tidy(() => {\n let allNullMasks = true;\n mask.forEach((m) => {\n if (m != null) {\n allNullMasks = false;\n return;\n }\n });\n if (allNullMasks) {\n return null;\n }\n const outputMasks = [];\n for (let i2 = 0; i2 < inputs.length; ++i2) {\n if (mask[i2] == null) {\n outputMasks.push(cast(onesLike(inputs[i2]), \"bool\"));\n } else if (mask[i2].rank < inputs[i2].rank) {\n outputMasks.push(expandDims(mask[i2], -1));\n } else {\n outputMasks.push(mask[i2]);\n }\n }\n const concatenatedMasks = concat(outputMasks, this.axis);\n return all(concatenatedMasks, -1, false);\n });\n }\n getConfig() {\n const config = {\n \"axis\": this.axis\n };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nConcatenate.className = \"Concatenate\";\nserialization_exports.registerClass(Concatenate);\nfunction interpretAxis(axis, dim) {\n while (axis < 0) {\n axis += dim;\n }\n return axis;\n}\nfunction batchDot(x, y, axes) {\n if (x.shape.length > 3 || y.shape.length > 3) {\n throw new NotImplementedError(\"batchDot is not implemented for tensors of 4D or higher rank yet\");\n }\n util_exports.assert(x.shape.length >= 2, () => `batchDot requires the rank of x to be >= 2, but got ${x.shape.length}`);\n util_exports.assert(x.shape.length >= 2, () => `batchDot requires the rank of y to be >= 2, but got ${y.shape.length}`);\n if (typeof axes === \"number\") {\n axes = [axes, axes];\n }\n if (x.dtype === \"complex64\" || y.dtype === \"complex64\") {\n throw new NotImplementedError(\"batchDot is not implemented for complex64-type Tensors yet.\");\n }\n const xNDim = x.shape.length;\n const yNDim = y.shape.length;\n if (axes == null) {\n axes = [xNDim - 1, yNDim - 2];\n }\n const axesArray = axes;\n return tidy(() => {\n let diff;\n if (xNDim > yNDim) {\n diff = xNDim - yNDim;\n const diffShape = [];\n for (let i2 = 0; i2 < diff; ++i2) {\n diffShape.push(1);\n }\n y = reshape(y, y.shape.concat(diffShape));\n } else if (yNDim > xNDim) {\n diff = yNDim - xNDim;\n const diffShape = [];\n for (let i2 = 0; i2 < diff; ++i2) {\n diffShape.push(1);\n }\n x = reshape(x, x.shape.concat(diffShape));\n } else {\n diff = 0;\n }\n let out;\n if (x.shape.length === 2 && y.shape.length === 2) {\n if (axesArray[0] === axesArray[1]) {\n out = sum2(mul(x, y), axesArray[0]);\n } else {\n out = sum2(mul(transpose(x, [1, 0]), y), axesArray[1]);\n }\n } else {\n const adjX = axesArray[0] !== x.shape.length - 1;\n const adjY = axesArray[1] === y.shape.length - 1;\n out = matMul(x, y, adjX, adjY);\n }\n if (diff > 0) {\n let idx;\n if (xNDim > yNDim) {\n idx = xNDim + yNDim - 3;\n } else {\n idx = xNDim - 1;\n }\n const squeezeAxes = [];\n for (let i2 = idx; i2 < idx + diff; ++i2) {\n squeezeAxes.push(i2);\n }\n out = squeeze(out, squeezeAxes);\n }\n if (out.shape.length === 1) {\n out = expandDims(out, 1);\n }\n return out;\n });\n}\nvar Dot = class extends Merge {\n constructor(args) {\n super(args);\n this.axes = args.axes;\n this.normalize = args.normalize == null ? false : args.normalize;\n this.supportsMasking = true;\n this.reshapeRequired = false;\n }\n build(inputShape) {\n util_exports.assert(Array.isArray(inputShape) && inputShape.length === 2 && Array.isArray(inputShape[0]) && Array.isArray(inputShape[1]), () => \"A `Dot` layer should be called on a list of exactly 2 inputs.\");\n const shape1 = inputShape[0];\n const shape2 = inputShape[1];\n if (shape1.length > 3 || shape2.length > 3) {\n throw new NotImplementedError(\"Dot layer does not support tensors of 4D or higher rank yet.\");\n }\n const axes = this.interpretAxes(shape1, shape2);\n if (shape1[axes[0]] !== shape2[axes[1]]) {\n throw new ValueError(`Dimension incompatibility: ${shape1[axes[0]]} !== ${shape2[axes[1]]}`);\n }\n }\n mergeFunction(inputs) {\n if (inputs.length !== 2) {\n throw new ValueError(`A \\`Dot\\` layer must be called on exactly 2 inputs, but received ${inputs.length} input(s).`);\n }\n let x1 = inputs[0];\n let x2 = inputs[1];\n let axes;\n if (!Array.isArray(this.axes)) {\n axes = [\n interpretAxis(this.axes, x1.shape.length),\n interpretAxis(this.axes, x2.shape.length)\n ];\n } else {\n axes = this.axes.map((axis, i2) => interpretAxis(axis, inputs[i2].shape.length));\n }\n if (this.normalize) {\n x1 = l2Normalize(x1, axes[0]);\n x2 = l2Normalize(x2, axes[1]);\n }\n return batchDot(x1, x2, axes);\n }\n interpretAxes(shape1, shape2) {\n let axes;\n if (!Array.isArray(this.axes)) {\n axes = [\n interpretAxis(this.axes, shape1.length),\n interpretAxis(this.axes, shape2.length)\n ];\n } else {\n axes = this.axes;\n }\n return axes;\n }\n computeOutputShape(inputShape) {\n util_exports.assert(Array.isArray(inputShape) && inputShape.length === 2 && Array.isArray(inputShape[0]) && Array.isArray(inputShape[1]), () => \"A `Dot` layer should be called on a list of exactly 2 inputs.\");\n const shape1 = inputShape[0].slice();\n const shape2 = inputShape[1].slice();\n if (shape1.length > 3 || shape2.length > 3) {\n throw new NotImplementedError(\"Dot layer does not support tensors of 4D or higher rank yet.\");\n }\n const axes = this.interpretAxes(shape1, shape2);\n shape1.splice(axes[0], 1);\n shape2.splice(axes[1], 1);\n shape2.splice(0, 1);\n const outputShape = shape1.concat(shape2);\n if (outputShape.length === 1) {\n outputShape.push(1);\n }\n return outputShape;\n }\n computeMask(inputs, mask) {\n return null;\n }\n getConfig() {\n const config = {\n \"axes\": this.axes,\n \"normalize\": this.normalize\n };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nDot.className = \"Dot\";\nserialization_exports.registerClass(Dot);\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/layers/noise.js\nvar GaussianNoise = class extends Layer {\n constructor(args) {\n super(args);\n this.supportsMasking = true;\n this.stddev = args.stddev;\n }\n computeOutputShape(inputShape) {\n return inputShape;\n }\n getConfig() {\n const baseConfig = super.getConfig();\n const config = { stddev: this.stddev };\n Object.assign(config, baseConfig);\n return config;\n }\n call(inputs, kwargs) {\n return tidy(() => {\n this.invokeCallHook(inputs, kwargs);\n const input2 = getExactlyOneTensor(inputs);\n const noised = () => add2(randomNormal2(input2.shape, 0, this.stddev), input2);\n const output = inTrainPhase(noised, () => input2, kwargs[\"training\"] || false);\n return output;\n });\n }\n};\nGaussianNoise.className = \"GaussianNoise\";\nserialization_exports.registerClass(GaussianNoise);\nvar GaussianDropout = class extends Layer {\n constructor(args) {\n super(args);\n this.supportsMasking = true;\n this.rate = args.rate;\n }\n computeOutputShape(inputShape) {\n return inputShape;\n }\n getConfig() {\n const baseConfig = super.getConfig();\n const config = { rate: this.rate };\n Object.assign(config, baseConfig);\n return config;\n }\n call(inputs, kwargs) {\n return tidy(() => {\n this.invokeCallHook(inputs, kwargs);\n const input2 = getExactlyOneTensor(inputs);\n if (this.rate > 0 && this.rate < 1) {\n const noised = () => {\n const stddev = Math.sqrt(this.rate / (1 - this.rate));\n return mul(input2, randomNormal2(input2.shape, 1, stddev));\n };\n return inTrainPhase(noised, () => input2, kwargs[\"training\"] || false);\n }\n return input2;\n });\n }\n};\nGaussianDropout.className = \"GaussianDropout\";\nserialization_exports.registerClass(GaussianDropout);\nvar AlphaDropout = class extends Layer {\n constructor(args) {\n super(args);\n this.supportsMasking = true;\n this.rate = args.rate;\n this.noiseShape = args.noiseShape;\n }\n _getNoiseShape(inputs) {\n return this.noiseShape || getExactlyOneTensor(inputs).shape;\n }\n computeOutputShape(inputShape) {\n return inputShape;\n }\n getConfig() {\n const baseConfig = super.getConfig();\n const config = { rate: this.rate };\n Object.assign(config, baseConfig);\n return config;\n }\n call(inputs, kwargs) {\n return tidy(() => {\n if (this.rate < 1 && this.rate > 0) {\n const noiseShape = this._getNoiseShape(inputs);\n const droppedInputs = () => {\n const input2 = getExactlyOneTensor(inputs);\n const alpha = 1.6732632423543772;\n const scale2 = 1.0507009873554805;\n const alphaP = -alpha * scale2;\n let keptIdx = greaterEqual(randomUniform(noiseShape), this.rate);\n keptIdx = cast2(keptIdx, \"float32\");\n const a = ((1 - this.rate) * (1 + this.rate * alphaP ** 2)) ** -0.5;\n const b = -a * alphaP * this.rate;\n const x = add2(mul(input2, keptIdx), mul(add2(keptIdx, -1), alphaP));\n return add2(mul(x, a), b);\n };\n return inTrainPhase(droppedInputs, () => getExactlyOneTensor(inputs), kwargs[\"training\"] || false);\n }\n return inputs;\n });\n }\n};\nAlphaDropout.className = \"AlphaDropout\";\nserialization_exports.registerClass(AlphaDropout);\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/layers/normalization.js\nfunction batchNormalization(x, mean5, variance, beta, gamma, epsilon3 = 1e-3) {\n let out;\n if (x.rank === 2) {\n out = batchNorm2d(x, mean5, variance, beta, gamma, epsilon3);\n } else if (x.rank === 3) {\n out = batchNorm3d(x, mean5, variance, beta, gamma, epsilon3);\n } else if (x.rank === 4) {\n out = batchNorm4d(x, mean5, variance, beta, gamma, epsilon3);\n } else {\n throw new NotImplementedError(`batchNormalization is not implemented for array of rank ${x.rank} yet`);\n }\n return out;\n}\nfunction regularNormalizeBatchInTraining(x, gamma, beta, reductionAxes, epsilon3 = 1e-3) {\n return tidy(() => {\n const meanAndVariance = moments(x, reductionAxes);\n const mean5 = meanAndVariance.mean;\n const variance = meanAndVariance.variance;\n const normed = batchNormalization(x, mean5, variance, beta, gamma, epsilon3);\n return [normed, mean5, variance];\n });\n}\nfunction broadcastNormalizeBatchInTraining(x, gamma, beta, reductionAxes, epsilon3 = 1e-3) {\n return tidy(() => {\n const meanAndVariance = moments(x, reductionAxes);\n const mean5 = meanAndVariance.mean;\n const variance = meanAndVariance.variance;\n const targetShape = [];\n for (const axis of range2(0, x.rank)) {\n if (reductionAxes.indexOf(axis) !== -1) {\n targetShape.push(1);\n } else {\n targetShape.push(x.shape[axis]);\n }\n }\n const broadcastMean = reshape(mean5, targetShape);\n const broadcastVariance = reshape(variance, targetShape);\n const broadcastGamma = gamma == null ? null : reshape(gamma, targetShape);\n const broadcastBeta = beta == null ? null : reshape(beta, targetShape);\n const normed = batchNormalization(x, broadcastMean, broadcastVariance, broadcastBeta, broadcastGamma, epsilon3);\n return [normed, mean5, variance];\n });\n}\nfunction normalizeBatchInTraining(x, gamma, beta, reductionAxes, epsilon3 = 1e-3) {\n if (util_exports.arraysEqual(reductionAxes.slice().sort(), range2(0, x.rank - 1))) {\n return regularNormalizeBatchInTraining(x, gamma, beta, reductionAxes, epsilon3);\n } else {\n return broadcastNormalizeBatchInTraining(x, gamma, beta, reductionAxes, epsilon3);\n }\n}\nvar BatchNormalization = class extends Layer {\n constructor(args) {\n if (args == null) {\n args = {};\n }\n super(args);\n this.supportsMasking = true;\n this.axis = args.axis == null ? -1 : args.axis;\n this.momentum = args.momentum == null ? 0.99 : args.momentum;\n this.epsilon = args.epsilon == null ? 1e-3 : args.epsilon;\n this.center = args.center == null ? true : args.center;\n this.scale = args.scale == null ? true : args.scale;\n this.betaInitializer = getInitializer(args.betaInitializer || \"zeros\");\n this.gammaInitializer = getInitializer(args.gammaInitializer || \"ones\");\n this.movingMeanInitializer = getInitializer(args.movingMeanInitializer || \"zeros\");\n this.movingVarianceInitializer = getInitializer(args.movingVarianceInitializer || \"ones\");\n this.betaConstraint = getConstraint(args.betaConstraint);\n this.gammaConstraint = getConstraint(args.gammaConstraint);\n this.betaRegularizer = getRegularizer(args.betaRegularizer);\n this.gammaRegularizer = getRegularizer(args.gammaRegularizer);\n }\n build(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n const axis = this.axis >= 0 ? this.axis : this.axis + inputShape.length;\n const dim = inputShape[axis];\n if (dim == null) {\n throw new ValueError(`Axis ${axis} of input tensor should have a defined dimension but the layer received an input with shape ${JSON.stringify(inputShape)}.`);\n }\n this.inputSpec = [new InputSpec({ ndim: inputShape.length, axes: { [axis]: dim } })];\n const shape = [dim];\n if (this.scale) {\n this.gamma = this.addWeight(\"gamma\", shape, null, this.gammaInitializer, this.gammaRegularizer, true, this.gammaConstraint);\n }\n if (this.center) {\n this.beta = this.addWeight(\"beta\", shape, null, this.betaInitializer, this.betaRegularizer, true, this.betaConstraint);\n }\n this.movingMean = this.addWeight(\"moving_mean\", shape, null, this.movingMeanInitializer, null, false);\n this.movingVariance = this.addWeight(\"moving_variance\", shape, null, this.movingVarianceInitializer, null, false);\n this.built = true;\n }\n call(inputs, kwargs) {\n return tidy(() => {\n const training = kwargs[\"training\"] == null ? false : kwargs[\"training\"];\n const input2 = getExactlyOneTensor(inputs);\n const inputShape = input2.shape;\n const ndim = inputShape.length;\n const reductionAxes = range2(0, ndim);\n const axis = this.axis >= 0 ? this.axis : this.axis + ndim;\n reductionAxes.splice(axis, 1);\n const broadcastShape = pyListRepeat(1, ndim);\n broadcastShape[axis] = inputShape[axis];\n const sortedReductionAxes = reductionAxes.slice();\n sortedReductionAxes.sort();\n const needsBroadcasting = !util_exports.arraysEqual(sortedReductionAxes, range2(0, ndim).slice(0, ndim - 1));\n const normalizeInference = () => {\n if (needsBroadcasting) {\n const broadcastMovingMean = reshape(this.movingMean.read(), broadcastShape);\n const broadcastMovingVariance = reshape(this.movingVariance.read(), broadcastShape);\n const broadcastBeta = this.center ? reshape(this.beta.read(), broadcastShape) : null;\n const broadcastGamma = this.scale ? reshape(this.gamma.read(), broadcastShape) : null;\n return batchNormalization(input2, broadcastMovingMean, broadcastMovingVariance, broadcastBeta, broadcastGamma, this.epsilon);\n } else {\n return batchNormalization(input2, this.movingMean.read(), this.movingVariance.read(), this.beta == null ? null : this.beta.read(), this.gamma == null ? null : this.gamma.read(), this.epsilon);\n }\n };\n if (!training) {\n return normalizeInference();\n }\n const [normedTraining, mean5, variance] = normalizeBatchInTraining(input2, this.gamma.read(), this.beta.read(), reductionAxes, this.epsilon);\n const doMovingAverage = (variable2, value, momentum) => {\n tidy(() => {\n const decay = 1 - momentum;\n const origValue = variable2.read();\n const updateDelta = mul(sub(origValue, value), decay);\n variable2.write(sub(origValue, updateDelta));\n });\n };\n const updateMovingMeanAndVariance = () => {\n doMovingAverage(this.movingMean, mean5, this.momentum);\n doMovingAverage(this.movingVariance, variance, this.momentum);\n };\n updateMovingMeanAndVariance();\n return normedTraining;\n });\n }\n getConfig() {\n const config = {\n axis: this.axis,\n momentum: this.momentum,\n epsilon: this.epsilon,\n center: this.center,\n scale: this.scale,\n betaInitializer: serializeInitializer(this.betaInitializer),\n gammaInitializer: serializeInitializer(this.gammaInitializer),\n movingMeanInitializer: serializeInitializer(this.movingMeanInitializer),\n movingVarianceInitializer: serializeInitializer(this.movingVarianceInitializer),\n betaRegularizer: serializeRegularizer(this.betaRegularizer),\n gammaRegularizer: serializeRegularizer(this.gammaRegularizer),\n betaConstraint: serializeConstraint(this.betaConstraint),\n gammaConstraint: serializeConstraint(this.gammaConstraint)\n };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nBatchNormalization.className = \"BatchNormalization\";\nserialization_exports.registerClass(BatchNormalization);\nvar LayerNormalization = class extends Layer {\n constructor(args) {\n if (args == null) {\n args = {};\n }\n super(args);\n this.axis = args.axis == null ? -1 : args.axis;\n if (typeof this.axis === \"number\") {\n if (!Number.isInteger(this.axis)) {\n throw new Error(`Expected axis to be an integer, but received ${this.axis}`);\n }\n } else if (Array.isArray(this.axis)) {\n for (const axis of this.axis) {\n if (!Number.isInteger(axis)) {\n throw new Error(`Expected axis to be an array of integers, but received ${JSON.stringify(this.axis)}`);\n }\n }\n } else {\n throw new Error(`Expected axis to be an integer or an array of integers, but received ${JSON.stringify(this.axis)}`);\n }\n this.epsilon = args.epsilon == null ? 1e-3 : args.epsilon;\n this.center = args.center == null ? true : args.center;\n this.scale = args.scale == null ? true : args.scale;\n this.betaInitializer = getInitializer(args.betaInitializer || \"zeros\");\n this.gammaInitializer = getInitializer(args.gammaInitializer || \"ones\");\n this.betaRegularizer = getRegularizer(args.betaRegularizer);\n this.gammaRegularizer = getRegularizer(args.gammaRegularizer);\n this.supportsMasking = true;\n }\n build(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n const nDims = inputShape.length;\n if (typeof this.axis === \"number\") {\n this.axis = [this.axis];\n }\n for (let i2 = 0; i2 < this.axis.length; ++i2) {\n if (this.axis[i2] < 0) {\n this.axis[i2] += nDims;\n }\n }\n for (const axis of this.axis) {\n if (axis < 0 || axis >= nDims) {\n throw new Error(`Invalid axis: ${axis}`);\n }\n }\n if (this.axis.length !== unique2(this.axis).length) {\n throw new Error(`Found duplicate axes in: ${this.axis}`);\n }\n const paramShape = this.axis.map((axis) => inputShape[axis]);\n const trainable = true;\n if (this.scale) {\n this.gamma = this.addWeight(\"gamma\", paramShape, \"float32\", this.gammaInitializer, this.gammaRegularizer, trainable);\n } else {\n this.gamma = null;\n }\n if (this.center) {\n this.beta = this.addWeight(\"beta\", paramShape, \"float32\", this.betaInitializer, this.betaRegularizer, trainable);\n } else {\n this.beta = null;\n }\n this.built = true;\n }\n call(inputs, kwargs) {\n const input2 = getExactlyOneTensor(inputs);\n const inputShape = input2.shape;\n const nDims = inputShape.length;\n return tidy(() => {\n const keepDims = true;\n let { mean: mean5, variance } = moments(input2, this.axis, keepDims);\n const broadcastShape = pyListRepeat(1, nDims);\n for (const dim of this.axis) {\n broadcastShape[dim] = inputShape[dim];\n }\n const broadcast = (v) => {\n if (v != null && v.shape.length !== nDims) {\n return reshape(v, broadcastShape);\n } else {\n return v;\n }\n };\n let scale2 = this.scale ? broadcast(this.gamma.read()) : null;\n let offset = this.center ? broadcast(this.beta.read()) : null;\n const momentsTiling = [];\n const scaleOffsetTiling = [];\n for (let i2 = 0; i2 < nDims; ++i2) {\n if (this.axis.indexOf(i2) !== -1) {\n momentsTiling.push(inputShape[i2]);\n scaleOffsetTiling.push(1);\n } else {\n momentsTiling.push(1);\n scaleOffsetTiling.push(inputShape[i2]);\n }\n }\n mean5 = tile(mean5, momentsTiling);\n variance = tile(variance, momentsTiling);\n if (scale2 != null) {\n scale2 = tile(scale2, scaleOffsetTiling);\n }\n if (offset != null) {\n offset = tile(offset, scaleOffsetTiling);\n }\n return batchNormalization(input2, mean5, variance, offset, scale2, this.epsilon);\n });\n }\n getConfig() {\n const config = {\n axis: this.axis,\n epsilon: this.epsilon,\n center: this.center,\n scale: this.scale,\n betaInitializer: serializeInitializer(this.betaInitializer),\n gammaInitializer: serializeInitializer(this.gammaInitializer),\n betaRegularizer: serializeRegularizer(this.betaRegularizer),\n gammaRegularizer: serializeRegularizer(this.gammaRegularizer)\n };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nLayerNormalization.className = \"LayerNormalization\";\nserialization_exports.registerClass(LayerNormalization);\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/layers/padding.js\nfunction spatial2dPadding(x, padding, dataFormat) {\n return tidy(() => {\n if (x.rank !== 4) {\n throw new ValueError(`temporalPadding expects input tensor to be 4-D, but received a ${x.rank}-D tensor.`);\n }\n if (padding == null) {\n padding = [[1, 1], [1, 1]];\n }\n if (padding.length !== 2 || padding[0].length !== 2 || padding[1].length !== 2) {\n throw new ValueError(\"spatial2dPadding expects `padding` to be an Array of two Arrays, each of which is an Array of two integers.\");\n }\n if (dataFormat == null) {\n dataFormat = imageDataFormat();\n }\n if (dataFormat !== \"channelsLast\" && dataFormat !== \"channelsFirst\") {\n throw new ValueError(`Unknown data format: ${dataFormat}. Supported data formats are 'channelsLast' and 'channelsFirst.`);\n }\n let pattern;\n if (dataFormat === \"channelsFirst\") {\n pattern = [[0, 0], [0, 0], padding[0], padding[1]];\n } else {\n pattern = [[0, 0], padding[0], padding[1], [0, 0]];\n }\n return pad(x, pattern);\n });\n}\nvar ZeroPadding2D = class extends Layer {\n constructor(args) {\n if (args == null) {\n args = {};\n }\n super(args);\n this.dataFormat = args.dataFormat == null ? imageDataFormat() : args.dataFormat;\n if (args.padding == null) {\n this.padding = [[1, 1], [1, 1]];\n } else if (typeof args.padding === \"number\") {\n this.padding = [[args.padding, args.padding], [args.padding, args.padding]];\n } else {\n args.padding = args.padding;\n if (args.padding.length !== 2) {\n throw new ValueError(`ZeroPadding2D expects padding to be a length-2 array, but received a length-${args.padding.length} array.`);\n }\n let heightPadding;\n let widthPadding;\n if (typeof args.padding[0] === \"number\") {\n heightPadding = [args.padding[0], args.padding[0]];\n widthPadding = [args.padding[1], args.padding[1]];\n } else {\n args.padding = args.padding;\n if (args.padding[0].length !== 2) {\n throw new ValueError(`ZeroPadding2D expects height padding to be a length-2 array, but received a length-${args.padding[0].length} array.`);\n }\n heightPadding = args.padding[0];\n if (args.padding[1].length !== 2) {\n throw new ValueError(`ZeroPadding2D expects width padding to be a length-2 array, but received a length-${args.padding[1].length} array.`);\n }\n widthPadding = args.padding[1];\n }\n this.padding = [heightPadding, widthPadding];\n }\n this.inputSpec = [new InputSpec({ ndim: 4 })];\n }\n computeOutputShape(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n let rows;\n let cols;\n if (this.dataFormat === \"channelsFirst\") {\n if (inputShape[2] != null && inputShape[2] >= 0) {\n rows = inputShape[2] + this.padding[0][0] + this.padding[0][1];\n } else {\n rows = null;\n }\n if (inputShape[3] != null && inputShape[3] >= 0) {\n cols = inputShape[3] + this.padding[1][0] + this.padding[1][1];\n } else {\n cols = null;\n }\n return [inputShape[0], inputShape[1], rows, cols];\n } else {\n if (inputShape[1] != null && inputShape[1] >= 0) {\n rows = inputShape[1] + this.padding[0][0] + this.padding[0][1];\n } else {\n rows = null;\n }\n if (inputShape[2] != null && inputShape[2] >= 0) {\n cols = inputShape[2] + this.padding[1][0] + this.padding[1][1];\n } else {\n cols = null;\n }\n return [inputShape[0], rows, cols, inputShape[3]];\n }\n }\n call(inputs, kwargs) {\n return tidy(() => spatial2dPadding(getExactlyOneTensor(inputs), this.padding, this.dataFormat));\n }\n getConfig() {\n const config = {\n padding: this.padding,\n dataFormat: this.dataFormat\n };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nZeroPadding2D.className = \"ZeroPadding2D\";\nserialization_exports.registerClass(ZeroPadding2D);\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/layers/pooling.js\nfunction pool2d(x, poolSize, strides, padding, dataFormat, poolMode) {\n return tidy(() => {\n checkDataFormat(dataFormat);\n checkPoolMode(poolMode);\n checkPaddingMode(padding);\n if (strides == null) {\n strides = [1, 1];\n }\n if (padding == null) {\n padding = \"valid\";\n }\n if (dataFormat == null) {\n dataFormat = imageDataFormat();\n }\n if (poolMode == null) {\n poolMode = \"max\";\n }\n x = preprocessConv2DInput(x, dataFormat);\n let y;\n const paddingString = padding === \"same\" ? \"same\" : \"valid\";\n if (poolMode === \"max\") {\n y = maxPool(x, poolSize, strides, paddingString);\n } else {\n y = avgPool(\n x,\n poolSize,\n strides,\n paddingString\n );\n }\n if (dataFormat === \"channelsFirst\") {\n y = transpose(y, [0, 3, 1, 2]);\n }\n return y;\n });\n}\nfunction pool3d(x, poolSize, strides, padding, dataFormat, poolMode) {\n return tidy(() => {\n checkDataFormat(dataFormat);\n checkPoolMode(poolMode);\n checkPaddingMode(padding);\n if (strides == null) {\n strides = [1, 1, 1];\n }\n if (padding == null) {\n padding = \"valid\";\n }\n if (dataFormat == null) {\n dataFormat = imageDataFormat();\n }\n if (poolMode == null) {\n poolMode = \"max\";\n }\n x = preprocessConv3DInput(x, dataFormat);\n let y;\n const paddingString = padding === \"same\" ? \"same\" : \"valid\";\n if (poolMode === \"max\") {\n y = maxPool3d(x, poolSize, strides, paddingString);\n } else {\n y = avgPool3d(x, poolSize, strides, paddingString);\n }\n if (dataFormat === \"channelsFirst\") {\n y = transpose(y, [0, 4, 1, 2, 3]);\n }\n return y;\n });\n}\nvar Pooling1D = class extends Layer {\n constructor(args) {\n if (args.poolSize == null) {\n args.poolSize = 2;\n }\n super(args);\n if (typeof args.poolSize === \"number\") {\n this.poolSize = [args.poolSize];\n } else if (Array.isArray(args.poolSize) && args.poolSize.length === 1 && typeof args.poolSize[0] === \"number\") {\n this.poolSize = args.poolSize;\n } else {\n throw new ValueError(`poolSize for 1D convolutional layer must be a number or an Array of a single number, but received ${JSON.stringify(args.poolSize)}`);\n }\n assertPositiveInteger(this.poolSize, \"poolSize\");\n if (args.strides == null) {\n this.strides = this.poolSize;\n } else {\n if (typeof args.strides === \"number\") {\n this.strides = [args.strides];\n } else if (Array.isArray(args.strides) && args.strides.length === 1 && typeof args.strides[0] === \"number\") {\n this.strides = args.strides;\n } else {\n throw new ValueError(`strides for 1D convolutional layer must be a number or an Array of a single number, but received ${JSON.stringify(args.strides)}`);\n }\n }\n assertPositiveInteger(this.strides, \"strides\");\n this.padding = args.padding == null ? \"valid\" : args.padding;\n checkPaddingMode(this.padding);\n this.inputSpec = [new InputSpec({ ndim: 3 })];\n }\n computeOutputShape(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n const length = convOutputLength(inputShape[1], this.poolSize[0], this.padding, this.strides[0]);\n return [inputShape[0], length, inputShape[2]];\n }\n call(inputs, kwargs) {\n return tidy(() => {\n this.invokeCallHook(inputs, kwargs);\n inputs = expandDims2(getExactlyOneTensor(inputs), 2);\n const output = this.poolingFunction(getExactlyOneTensor(inputs), [this.poolSize[0], 1], [this.strides[0], 1], this.padding, \"channelsLast\");\n return squeeze(output, [2]);\n });\n }\n getConfig() {\n const config = {\n poolSize: this.poolSize,\n padding: this.padding,\n strides: this.strides\n };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nvar MaxPooling1D = class extends Pooling1D {\n constructor(args) {\n super(args);\n }\n poolingFunction(inputs, poolSize, strides, padding, dataFormat) {\n checkDataFormat(dataFormat);\n checkPaddingMode(padding);\n return pool2d(inputs, poolSize, strides, padding, dataFormat, \"max\");\n }\n};\nMaxPooling1D.className = \"MaxPooling1D\";\nserialization_exports.registerClass(MaxPooling1D);\nvar AveragePooling1D = class extends Pooling1D {\n constructor(args) {\n super(args);\n }\n poolingFunction(inputs, poolSize, strides, padding, dataFormat) {\n checkDataFormat(dataFormat);\n checkPaddingMode(padding);\n return pool2d(inputs, poolSize, strides, padding, dataFormat, \"avg\");\n }\n};\nAveragePooling1D.className = \"AveragePooling1D\";\nserialization_exports.registerClass(AveragePooling1D);\nvar Pooling2D = class extends Layer {\n constructor(args) {\n if (args.poolSize == null) {\n args.poolSize = [2, 2];\n }\n super(args);\n this.poolSize = Array.isArray(args.poolSize) ? args.poolSize : [args.poolSize, args.poolSize];\n if (args.strides == null) {\n this.strides = this.poolSize;\n } else if (Array.isArray(args.strides)) {\n if (args.strides.length !== 2) {\n throw new ValueError(`If the strides property of a 2D pooling layer is an Array, it is expected to have a length of 2, but received length ${args.strides.length}.`);\n }\n this.strides = args.strides;\n } else {\n this.strides = [args.strides, args.strides];\n }\n assertPositiveInteger(this.poolSize, \"poolSize\");\n assertPositiveInteger(this.strides, \"strides\");\n this.padding = args.padding == null ? \"valid\" : args.padding;\n this.dataFormat = args.dataFormat == null ? \"channelsLast\" : args.dataFormat;\n checkDataFormat(this.dataFormat);\n checkPaddingMode(this.padding);\n this.inputSpec = [new InputSpec({ ndim: 4 })];\n }\n computeOutputShape(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n let rows = this.dataFormat === \"channelsFirst\" ? inputShape[2] : inputShape[1];\n let cols = this.dataFormat === \"channelsFirst\" ? inputShape[3] : inputShape[2];\n rows = convOutputLength(rows, this.poolSize[0], this.padding, this.strides[0]);\n cols = convOutputLength(cols, this.poolSize[1], this.padding, this.strides[1]);\n if (this.dataFormat === \"channelsFirst\") {\n return [inputShape[0], inputShape[1], rows, cols];\n } else {\n return [inputShape[0], rows, cols, inputShape[3]];\n }\n }\n call(inputs, kwargs) {\n return tidy(() => {\n this.invokeCallHook(inputs, kwargs);\n return this.poolingFunction(getExactlyOneTensor(inputs), this.poolSize, this.strides, this.padding, this.dataFormat);\n });\n }\n getConfig() {\n const config = {\n poolSize: this.poolSize,\n padding: this.padding,\n strides: this.strides,\n dataFormat: this.dataFormat\n };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nvar MaxPooling2D = class extends Pooling2D {\n constructor(args) {\n super(args);\n }\n poolingFunction(inputs, poolSize, strides, padding, dataFormat) {\n checkDataFormat(dataFormat);\n checkPaddingMode(padding);\n return pool2d(inputs, poolSize, strides, padding, dataFormat, \"max\");\n }\n};\nMaxPooling2D.className = \"MaxPooling2D\";\nserialization_exports.registerClass(MaxPooling2D);\nvar AveragePooling2D = class extends Pooling2D {\n constructor(args) {\n super(args);\n }\n poolingFunction(inputs, poolSize, strides, padding, dataFormat) {\n checkDataFormat(dataFormat);\n checkPaddingMode(padding);\n return pool2d(inputs, poolSize, strides, padding, dataFormat, \"avg\");\n }\n};\nAveragePooling2D.className = \"AveragePooling2D\";\nserialization_exports.registerClass(AveragePooling2D);\nvar Pooling3D = class extends Layer {\n constructor(args) {\n if (args.poolSize == null) {\n args.poolSize = [2, 2, 2];\n }\n super(args);\n this.poolSize = Array.isArray(args.poolSize) ? args.poolSize : [args.poolSize, args.poolSize, args.poolSize];\n if (args.strides == null) {\n this.strides = this.poolSize;\n } else if (Array.isArray(args.strides)) {\n if (args.strides.length !== 3) {\n throw new ValueError(`If the strides property of a 3D pooling layer is an Array, it is expected to have a length of 3, but received length ${args.strides.length}.`);\n }\n this.strides = args.strides;\n } else {\n this.strides = [args.strides, args.strides, args.strides];\n }\n assertPositiveInteger(this.poolSize, \"poolSize\");\n assertPositiveInteger(this.strides, \"strides\");\n this.padding = args.padding == null ? \"valid\" : args.padding;\n this.dataFormat = args.dataFormat == null ? \"channelsLast\" : args.dataFormat;\n checkDataFormat(this.dataFormat);\n checkPaddingMode(this.padding);\n this.inputSpec = [new InputSpec({ ndim: 5 })];\n }\n computeOutputShape(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n let depths = this.dataFormat === \"channelsFirst\" ? inputShape[2] : inputShape[1];\n let rows = this.dataFormat === \"channelsFirst\" ? inputShape[3] : inputShape[2];\n let cols = this.dataFormat === \"channelsFirst\" ? inputShape[4] : inputShape[3];\n depths = convOutputLength(depths, this.poolSize[0], this.padding, this.strides[0]);\n rows = convOutputLength(rows, this.poolSize[1], this.padding, this.strides[1]);\n cols = convOutputLength(cols, this.poolSize[2], this.padding, this.strides[2]);\n if (this.dataFormat === \"channelsFirst\") {\n return [inputShape[0], inputShape[1], depths, rows, cols];\n } else {\n return [inputShape[0], depths, rows, cols, inputShape[4]];\n }\n }\n call(inputs, kwargs) {\n return tidy(() => {\n this.invokeCallHook(inputs, kwargs);\n return this.poolingFunction(getExactlyOneTensor(inputs), this.poolSize, this.strides, this.padding, this.dataFormat);\n });\n }\n getConfig() {\n const config = {\n poolSize: this.poolSize,\n padding: this.padding,\n strides: this.strides,\n dataFormat: this.dataFormat\n };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nvar MaxPooling3D = class extends Pooling3D {\n constructor(args) {\n super(args);\n }\n poolingFunction(inputs, poolSize, strides, padding, dataFormat) {\n checkDataFormat(dataFormat);\n checkPaddingMode(padding);\n return pool3d(inputs, poolSize, strides, padding, dataFormat, \"max\");\n }\n};\nMaxPooling3D.className = \"MaxPooling3D\";\nserialization_exports.registerClass(MaxPooling3D);\nvar AveragePooling3D = class extends Pooling3D {\n constructor(args) {\n super(args);\n }\n poolingFunction(inputs, poolSize, strides, padding, dataFormat) {\n checkDataFormat(dataFormat);\n checkPaddingMode(padding);\n return pool3d(inputs, poolSize, strides, padding, dataFormat, \"avg\");\n }\n};\nAveragePooling3D.className = \"AveragePooling3D\";\nserialization_exports.registerClass(AveragePooling3D);\nvar GlobalPooling1D = class extends Layer {\n constructor(args) {\n super(args);\n this.inputSpec = [new InputSpec({ ndim: 3 })];\n }\n computeOutputShape(inputShape) {\n return [inputShape[0], inputShape[2]];\n }\n call(inputs, kwargs) {\n throw new NotImplementedError();\n }\n};\nvar GlobalAveragePooling1D = class extends GlobalPooling1D {\n constructor(args) {\n super(args || {});\n }\n call(inputs, kwargs) {\n return tidy(() => {\n const input2 = getExactlyOneTensor(inputs);\n return mean(input2, 1);\n });\n }\n};\nGlobalAveragePooling1D.className = \"GlobalAveragePooling1D\";\nserialization_exports.registerClass(GlobalAveragePooling1D);\nvar GlobalMaxPooling1D = class extends GlobalPooling1D {\n constructor(args) {\n super(args || {});\n }\n call(inputs, kwargs) {\n return tidy(() => {\n const input2 = getExactlyOneTensor(inputs);\n return max(input2, 1);\n });\n }\n};\nGlobalMaxPooling1D.className = \"GlobalMaxPooling1D\";\nserialization_exports.registerClass(GlobalMaxPooling1D);\nvar GlobalPooling2D = class extends Layer {\n constructor(args) {\n super(args);\n this.dataFormat = args.dataFormat == null ? \"channelsLast\" : args.dataFormat;\n checkDataFormat(this.dataFormat);\n this.inputSpec = [new InputSpec({ ndim: 4 })];\n }\n computeOutputShape(inputShape) {\n inputShape = inputShape;\n if (this.dataFormat === \"channelsLast\") {\n return [inputShape[0], inputShape[3]];\n } else {\n return [inputShape[0], inputShape[1]];\n }\n }\n call(inputs, kwargs) {\n throw new NotImplementedError();\n }\n getConfig() {\n const config = { dataFormat: this.dataFormat };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n};\nvar GlobalAveragePooling2D = class extends GlobalPooling2D {\n call(inputs, kwargs) {\n return tidy(() => {\n const input2 = getExactlyOneTensor(inputs);\n if (this.dataFormat === \"channelsLast\") {\n return mean(input2, [1, 2]);\n } else {\n return mean(input2, [2, 3]);\n }\n });\n }\n};\nGlobalAveragePooling2D.className = \"GlobalAveragePooling2D\";\nserialization_exports.registerClass(GlobalAveragePooling2D);\nvar GlobalMaxPooling2D = class extends GlobalPooling2D {\n call(inputs, kwargs) {\n return tidy(() => {\n const input2 = getExactlyOneTensor(inputs);\n if (this.dataFormat === \"channelsLast\") {\n return max(input2, [1, 2]);\n } else {\n return max(input2, [2, 3]);\n }\n });\n }\n};\nGlobalMaxPooling2D.className = \"GlobalMaxPooling2D\";\nserialization_exports.registerClass(GlobalMaxPooling2D);\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/layers/wrappers.js\nvar Wrapper = class extends Layer {\n constructor(args) {\n super(args);\n this.layer = args.layer;\n }\n build(inputShape) {\n this.built = true;\n }\n get trainable() {\n if (this.layer != null) {\n return this.layer.trainable;\n } else {\n return false;\n }\n }\n set trainable(value) {\n if (this.layer != null) {\n this.layer.trainable = value;\n }\n }\n get trainableWeights() {\n return this.layer.trainableWeights;\n }\n get nonTrainableWeights() {\n return this.layer.nonTrainableWeights;\n }\n get updates() {\n return this.layer._updates;\n }\n get losses() {\n return this.layer.losses;\n }\n getWeights() {\n return this.layer.getWeights();\n }\n setWeights(weights) {\n this.layer.setWeights(weights);\n }\n getConfig() {\n const config = {\n \"layer\": {\n \"className\": this.layer.getClassName(),\n \"config\": this.layer.getConfig()\n }\n };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n setFastWeightInitDuringBuild(value) {\n super.setFastWeightInitDuringBuild(value);\n if (this.layer != null) {\n this.layer.setFastWeightInitDuringBuild(value);\n }\n }\n static fromConfig(cls, config, customObjects = {}) {\n const layerConfig = config[\"layer\"];\n const layer = deserialize(layerConfig, customObjects);\n delete config[\"layer\"];\n const newConfig = { layer };\n Object.assign(newConfig, config);\n return new cls(newConfig);\n }\n};\nvar TimeDistributed = class extends Wrapper {\n constructor(args) {\n super(args);\n this.supportsMasking = true;\n }\n build(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n if (inputShape.length < 3) {\n throw new ValueError(`TimeDistributed layer expects an input shape >= 3D, but received input shape ${JSON.stringify(inputShape)}`);\n }\n this.inputSpec = [{ shape: inputShape }];\n const childInputShape = [inputShape[0]].concat(inputShape.slice(2));\n if (!this.layer.built) {\n this.layer.build(childInputShape);\n this.layer.built = true;\n }\n super.build(inputShape);\n }\n computeOutputShape(inputShape) {\n inputShape = getExactlyOneShape(inputShape);\n const childInputShape = [inputShape[0]].concat(inputShape.slice(2));\n const childOutputShape = this.layer.computeOutputShape(childInputShape);\n const timesteps = inputShape[1];\n return [childOutputShape[0], timesteps].concat(childOutputShape.slice(1));\n }\n call(inputs, kwargs) {\n return tidy(() => {\n inputs = getExactlyOneTensor(inputs);\n const step5 = (inputs2, states) => {\n const output = getExactlyOneTensor(this.layer.call(inputs2, kwargs));\n return [output, []];\n };\n const rnnOutputs = rnn(step5, inputs, [], false, null, null, false, true);\n const y = rnnOutputs[1];\n return y;\n });\n }\n};\nTimeDistributed.className = \"TimeDistributed\";\nserialization_exports.registerClass(TimeDistributed);\nfunction checkBidirectionalMergeMode(value) {\n checkStringTypeUnionValue(VALID_BIDIRECTIONAL_MERGE_MODES, \"BidirectionalMergeMode\", value);\n}\nvar DEFAULT_BIDIRECTIONAL_MERGE_MODE = \"concat\";\nvar Bidirectional = class extends Wrapper {\n constructor(args) {\n super(args);\n const layerConfig = args.layer.getConfig();\n const forwDict = {};\n forwDict[\"className\"] = args.layer.getClassName();\n forwDict[\"config\"] = layerConfig;\n this.forwardLayer = deserialize(forwDict);\n layerConfig[\"goBackwards\"] = layerConfig[\"goBackwards\"] === true ? false : true;\n const backDict = {};\n backDict[\"className\"] = args.layer.getClassName();\n backDict[\"config\"] = layerConfig;\n this.backwardLayer = deserialize(backDict);\n this.forwardLayer.name = \"forward_\" + this.forwardLayer.name;\n this.backwardLayer.name = \"backward_\" + this.backwardLayer.name;\n this.mergeMode = args.mergeMode === void 0 ? DEFAULT_BIDIRECTIONAL_MERGE_MODE : args.mergeMode;\n checkBidirectionalMergeMode(this.mergeMode);\n if (args.weights) {\n throw new NotImplementedError(\"weights support is not implemented for Bidirectional layer yet.\");\n }\n this._stateful = args.layer.stateful;\n this.returnSequences = args.layer.returnSequences;\n this.returnState = args.layer.returnState;\n this.supportsMasking = true;\n this._trainable = true;\n this.inputSpec = args.layer.inputSpec;\n this.numConstants = null;\n }\n get trainable() {\n return this._trainable;\n }\n set trainable(value) {\n this._trainable = value;\n if (this.forwardLayer != null) {\n this.forwardLayer.trainable = value;\n }\n if (this.backwardLayer != null) {\n this.backwardLayer.trainable = value;\n }\n }\n getWeights() {\n return this.forwardLayer.getWeights().concat(this.backwardLayer.getWeights());\n }\n setWeights(weights) {\n const numWeights = weights.length;\n const numeightsOver2 = Math.floor(numWeights / 2);\n this.forwardLayer.setWeights(weights.slice(0, numeightsOver2));\n this.backwardLayer.setWeights(weights.slice(numeightsOver2));\n }\n computeOutputShape(inputShape) {\n let layerShapes = this.forwardLayer.computeOutputShape(inputShape);\n if (!(Array.isArray(layerShapes) && Array.isArray(layerShapes[0]))) {\n layerShapes = [layerShapes];\n }\n layerShapes = layerShapes;\n let outputShape;\n let outputShapes;\n let stateShape;\n if (this.returnState) {\n stateShape = layerShapes.slice(1);\n outputShape = layerShapes[0];\n } else {\n outputShape = layerShapes[0];\n }\n outputShape = outputShape;\n if (this.mergeMode === \"concat\") {\n outputShape[outputShape.length - 1] *= 2;\n outputShapes = [outputShape];\n } else if (this.mergeMode == null) {\n outputShapes = [outputShape, outputShape.slice()];\n } else {\n outputShapes = [outputShape];\n }\n if (this.returnState) {\n if (this.mergeMode == null) {\n return outputShapes.concat(stateShape).concat(stateShape.slice());\n }\n return [outputShape].concat(stateShape).concat(stateShape.slice());\n }\n return singletonOrArray(outputShapes);\n }\n apply(inputs, kwargs) {\n let initialState = kwargs == null ? null : kwargs[\"initialState\"];\n let constants = kwargs == null ? null : kwargs[\"constants\"];\n if (kwargs == null) {\n kwargs = {};\n }\n const standardized = standardizeArgs(inputs, initialState, constants, this.numConstants);\n inputs = standardized.inputs;\n initialState = standardized.initialState;\n constants = standardized.constants;\n if (Array.isArray(inputs)) {\n initialState = inputs.slice(1);\n inputs = inputs[0];\n }\n if ((initialState == null || initialState.length === 0) && constants == null) {\n return super.apply(inputs, kwargs);\n }\n const additionalInputs = [];\n const additionalSpecs = [];\n if (initialState != null) {\n const numStates = initialState.length;\n if (numStates % 2 > 0) {\n throw new ValueError(\"When passing `initialState` to a Bidrectional RNN, the state should be an Array containing the states of the underlying RNNs.\");\n }\n kwargs[\"initialState\"] = initialState;\n additionalInputs.push(...initialState);\n const stateSpecs = initialState.map((state) => new InputSpec({ shape: state.shape }));\n this.forwardLayer.stateSpec = stateSpecs.slice(0, numStates / 2);\n this.backwardLayer.stateSpec = stateSpecs.slice(numStates / 2);\n additionalSpecs.push(...stateSpecs);\n }\n if (constants != null) {\n throw new NotImplementedError(\"Support for constants in Bidirectional layers is not implemented yet.\");\n }\n const isSymbolicTensor = additionalInputs[0] instanceof SymbolicTensor;\n for (const tensor2 of additionalInputs) {\n if (tensor2 instanceof SymbolicTensor !== isSymbolicTensor) {\n throw new ValueError(\"The initial state of a Bidirectional layer cannot be specified as a mix of symbolic and non-symbolic tensors\");\n }\n }\n if (isSymbolicTensor) {\n const fullInput = [inputs].concat(additionalInputs);\n const fullInputSpec = this.inputSpec.concat(additionalSpecs);\n const originalInputSpec = this.inputSpec;\n this.inputSpec = fullInputSpec;\n const output = super.apply(fullInput, kwargs);\n this.inputSpec = originalInputSpec;\n return output;\n } else {\n return super.apply(inputs, kwargs);\n }\n }\n call(inputs, kwargs) {\n return tidy(() => {\n const initialState = kwargs[\"initialState\"];\n let y;\n let yRev;\n if (initialState == null) {\n y = this.forwardLayer.call(inputs, kwargs);\n yRev = this.backwardLayer.call(inputs, kwargs);\n } else {\n const forwardState = initialState.slice(0, initialState.length / 2);\n const backwardState = initialState.slice(initialState.length / 2);\n y = this.forwardLayer.call(inputs, Object.assign(kwargs, { initialState: forwardState }));\n yRev = this.backwardLayer.call(inputs, Object.assign(kwargs, { initialState: backwardState }));\n }\n let states;\n if (this.returnState) {\n if (Array.isArray(y)) {\n states = y.slice(1).concat(yRev.slice(1));\n } else {\n }\n y = y[0];\n yRev = yRev[0];\n }\n if (this.returnSequences) {\n yRev = reverse(yRev, 1);\n }\n let output;\n if (this.mergeMode === \"concat\") {\n output = concatenate([y, yRev]);\n } else if (this.mergeMode === \"sum\") {\n output = add2(y, yRev);\n } else if (this.mergeMode === \"ave\") {\n output = mul(0.5, add2(y, yRev));\n } else if (this.mergeMode === \"mul\") {\n output = mul(y, yRev);\n } else if (this.mergeMode == null) {\n output = [y, yRev];\n }\n if (this.returnState) {\n if (this.mergeMode == null) {\n return output.concat(states);\n }\n return [output].concat(states);\n }\n return output;\n });\n }\n resetStates(states) {\n this.forwardLayer.resetStates();\n this.backwardLayer.resetStates();\n }\n build(inputShape) {\n nameScope(this.forwardLayer.name, () => {\n this.forwardLayer.build(inputShape);\n });\n nameScope(this.backwardLayer.name, () => {\n this.backwardLayer.build(inputShape);\n });\n this.built = true;\n }\n computeMask(inputs, mask) {\n if (Array.isArray(mask)) {\n mask = mask[0];\n }\n let outputMask;\n if (this.returnSequences) {\n if (this.mergeMode == null) {\n outputMask = [mask, mask];\n } else {\n outputMask = mask;\n }\n } else {\n if (this.mergeMode == null) {\n outputMask = [null, null];\n } else {\n outputMask = null;\n }\n }\n if (this.returnState) {\n const states = this.forwardLayer.states;\n const stateMask = states.map((state) => null);\n if (Array.isArray(outputMask)) {\n return outputMask.concat(stateMask).concat(stateMask);\n } else {\n return [outputMask].concat(stateMask).concat(stateMask);\n }\n } else {\n return outputMask;\n }\n }\n get trainableWeights() {\n return this.forwardLayer.trainableWeights.concat(this.backwardLayer.trainableWeights);\n }\n get nonTrainableWeights() {\n return this.forwardLayer.nonTrainableWeights.concat(this.backwardLayer.nonTrainableWeights);\n }\n setFastWeightInitDuringBuild(value) {\n super.setFastWeightInitDuringBuild(value);\n if (this.forwardLayer != null) {\n this.forwardLayer.setFastWeightInitDuringBuild(value);\n }\n if (this.backwardLayer != null) {\n this.backwardLayer.setFastWeightInitDuringBuild(value);\n }\n }\n getConfig() {\n const config = {\n \"mergeMode\": this.mergeMode\n };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n static fromConfig(cls, config) {\n const rnnLayer = deserialize(config[\"layer\"]);\n delete config[\"layer\"];\n if (config[\"numConstants\"] != null) {\n throw new NotImplementedError(`Deserialization of a Bidirectional layer with numConstants present is not supported yet.`);\n }\n const newConfig = config;\n newConfig[\"layer\"] = rnnLayer;\n return new cls(newConfig);\n }\n};\nBidirectional.className = \"Bidirectional\";\nserialization_exports.registerClass(Bidirectional);\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/layers/preprocessing/image_preprocessing.js\nvar Rescaling = class extends Layer {\n constructor(args) {\n super(args);\n this.scale = args.scale;\n if (args.offset) {\n this.offset = args.offset;\n } else {\n this.offset = 0;\n }\n }\n getConfig() {\n const config = {\n \"scale\": this.scale,\n \"offset\": this.offset\n };\n const baseConfig = super.getConfig();\n Object.assign(config, baseConfig);\n return config;\n }\n call(inputs, kwargs) {\n return tidy(() => {\n inputs = getExactlyOneTensor(inputs);\n if (inputs.dtype !== \"float32\") {\n inputs = cast2(inputs, \"float32\");\n }\n return add2(mul(inputs, this.scale), this.offset);\n });\n }\n};\nRescaling.className = \"Rescaling\";\nserialization_exports.registerClass(Rescaling);\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/exports_layers.js\nfunction inputLayer(args) {\n return new InputLayer(args);\n}\nfunction elu3(args) {\n return new ELU(args);\n}\nfunction reLU(args) {\n return new ReLU(args);\n}\nfunction leakyReLU(args) {\n return new LeakyReLU(args);\n}\nfunction prelu2(args) {\n return new PReLU(args);\n}\nfunction softmax2(args) {\n return new Softmax3(args);\n}\nfunction thresholdedReLU(args) {\n return new ThresholdedReLU(args);\n}\nfunction conv1d2(args) {\n return new Conv1D(args);\n}\nfunction conv2d3(args) {\n return new Conv2D2(args);\n}\nfunction conv2dTranspose2(args) {\n return new Conv2DTranspose(args);\n}\nfunction conv3d2(args) {\n return new Conv3D2(args);\n}\nfunction conv3dTranspose2(args) {\n return new Conv3DTranspose(args);\n}\nfunction separableConv2d2(args) {\n return new SeparableConv2D(args);\n}\nfunction cropping2D(args) {\n return new Cropping2D(args);\n}\nfunction upSampling2d(args) {\n return new UpSampling2D(args);\n}\nfunction depthwiseConv2d4(args) {\n return new DepthwiseConv2D(args);\n}\nfunction activation(args) {\n return new Activation2(args);\n}\nfunction dense(args) {\n return new Dense(args);\n}\nfunction dropout3(args) {\n return new Dropout(args);\n}\nfunction spatialDropout1d(args) {\n return new SpatialDropout1D(args);\n}\nfunction flatten3(args) {\n return new Flatten(args);\n}\nfunction repeatVector(args) {\n return new RepeatVector(args);\n}\nfunction reshape2(args) {\n return new Reshape2(args);\n}\nfunction permute(args) {\n return new Permute(args);\n}\nfunction embedding(args) {\n return new Embedding(args);\n}\nfunction add3(args) {\n return new Add2(args);\n}\nfunction average(args) {\n return new Average(args);\n}\nfunction concatenate2(args) {\n return new Concatenate(args);\n}\nfunction maximum2(args) {\n return new Maximum2(args);\n}\nfunction minimum2(args) {\n return new Minimum2(args);\n}\nfunction multiply(args) {\n return new Multiply2(args);\n}\nfunction dot3(args) {\n return new Dot(args);\n}\nfunction batchNormalization2(args) {\n return new BatchNormalization(args);\n}\nfunction layerNormalization(args) {\n return new LayerNormalization(args);\n}\nfunction zeroPadding2d(args) {\n return new ZeroPadding2D(args);\n}\nfunction averagePooling1d(args) {\n return new AveragePooling1D(args);\n}\nfunction avgPool1d(args) {\n return averagePooling1d(args);\n}\nfunction avgPooling1d(args) {\n return averagePooling1d(args);\n}\nfunction averagePooling2d(args) {\n return new AveragePooling2D(args);\n}\nfunction avgPool2d(args) {\n return averagePooling2d(args);\n}\nfunction avgPooling2d(args) {\n return averagePooling2d(args);\n}\nfunction averagePooling3d(args) {\n return new AveragePooling3D(args);\n}\nfunction avgPool3d2(args) {\n return averagePooling3d(args);\n}\nfunction avgPooling3d(args) {\n return averagePooling3d(args);\n}\nfunction globalAveragePooling1d(args) {\n return new GlobalAveragePooling1D(args);\n}\nfunction globalAveragePooling2d(args) {\n return new GlobalAveragePooling2D(args);\n}\nfunction globalMaxPooling1d(args) {\n return new GlobalMaxPooling1D(args);\n}\nfunction globalMaxPooling2d(args) {\n return new GlobalMaxPooling2D(args);\n}\nfunction maxPooling1d(args) {\n return new MaxPooling1D(args);\n}\nfunction maxPooling2d(args) {\n return new MaxPooling2D(args);\n}\nfunction maxPooling3d(args) {\n return new MaxPooling3D(args);\n}\nfunction gru(args) {\n return new GRU(args);\n}\nfunction gruCell(args) {\n return new GRUCell(args);\n}\nfunction lstm(args) {\n return new LSTM(args);\n}\nfunction lstmCell(args) {\n return new LSTMCell(args);\n}\nfunction simpleRNN(args) {\n return new SimpleRNN(args);\n}\nfunction simpleRNNCell(args) {\n return new SimpleRNNCell(args);\n}\nfunction convLstm2d(args) {\n return new ConvLSTM2D(args);\n}\nfunction convLstm2dCell(args) {\n return new ConvLSTM2DCell(args);\n}\nfunction rnn2(args) {\n return new RNN(args);\n}\nfunction stackedRNNCells(args) {\n return new StackedRNNCells(args);\n}\nfunction bidirectional(args) {\n return new Bidirectional(args);\n}\nfunction timeDistributed(args) {\n return new TimeDistributed(args);\n}\nvar globalMaxPool1d = globalMaxPooling1d;\nvar globalMaxPool2d = globalMaxPooling2d;\nvar maxPool1d = maxPooling1d;\nvar maxPool2d = maxPooling2d;\nfunction gaussianNoise(args) {\n return new GaussianNoise(args);\n}\nfunction gaussianDropout(args) {\n return new GaussianDropout(args);\n}\nfunction alphaDropout(args) {\n return new AlphaDropout(args);\n}\nfunction masking(args) {\n return new Masking(args);\n}\nfunction rescaling(args) {\n return new Rescaling(args);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/exports_metrics.js\nvar exports_metrics_exports = {};\n__export(exports_metrics_exports, {\n MAPE: () => MAPE2,\n MSE: () => MSE2,\n binaryAccuracy: () => binaryAccuracy2,\n binaryCrossentropy: () => binaryCrossentropy3,\n categoricalAccuracy: () => categoricalAccuracy2,\n categoricalCrossentropy: () => categoricalCrossentropy3,\n cosineProximity: () => cosineProximity2,\n mape: () => mape2,\n meanAbsoluteError: () => meanAbsoluteError2,\n meanAbsolutePercentageError: () => meanAbsolutePercentageError2,\n meanSquaredError: () => meanSquaredError3,\n mse: () => mse2,\n precision: () => precision2,\n recall: () => recall2,\n sparseCategoricalAccuracy: () => sparseCategoricalAccuracy2\n});\nfunction binaryAccuracy2(yTrue, yPred) {\n return binaryAccuracy(yTrue, yPred);\n}\nfunction binaryCrossentropy3(yTrue, yPred) {\n return binaryCrossentropy2(yTrue, yPred);\n}\nfunction sparseCategoricalAccuracy2(yTrue, yPred) {\n return sparseCategoricalAccuracy(yTrue, yPred);\n}\nfunction categoricalAccuracy2(yTrue, yPred) {\n return categoricalAccuracy(yTrue, yPred);\n}\nfunction categoricalCrossentropy3(yTrue, yPred) {\n return categoricalCrossentropy2(yTrue, yPred);\n}\nfunction precision2(yTrue, yPred) {\n return precision(yTrue, yPred);\n}\nfunction recall2(yTrue, yPred) {\n return recall(yTrue, yPred);\n}\nfunction cosineProximity2(yTrue, yPred) {\n return cosineProximity(yTrue, yPred);\n}\nfunction meanAbsoluteError2(yTrue, yPred) {\n return meanAbsoluteError(yTrue, yPred);\n}\nfunction meanAbsolutePercentageError2(yTrue, yPred) {\n return meanAbsolutePercentageError(yTrue, yPred);\n}\nfunction MAPE2(yTrue, yPred) {\n return meanAbsolutePercentageError(yTrue, yPred);\n}\nfunction mape2(yTrue, yPred) {\n return meanAbsolutePercentageError(yTrue, yPred);\n}\nfunction meanSquaredError3(yTrue, yPred) {\n return meanSquaredError2(yTrue, yPred);\n}\nfunction MSE2(yTrue, yPred) {\n return meanSquaredError2(yTrue, yPred);\n}\nfunction mse2(yTrue, yPred) {\n return meanSquaredError2(yTrue, yPred);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/exports_models.js\nvar exports_models_exports = {};\n__export(exports_models_exports, {\n modelFromJSON: () => modelFromJSON\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/exports_regularizers.js\nvar exports_regularizers_exports = {};\n__export(exports_regularizers_exports, {\n l1: () => l12,\n l1l2: () => l1l2,\n l2: () => l22\n});\nfunction l1l2(config) {\n return new L1L2(config);\n}\nfunction l12(config) {\n return l1(config);\n}\nfunction l22(config) {\n return l2(config);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/callbacks.js\nvar Callback = class extends BaseCallback {\n constructor() {\n super(...arguments);\n this.model = null;\n }\n setModel(model2) {\n if (!(model2 instanceof LayersModel)) {\n throw new Error(\"model must be a LayersModel, not some other Container\");\n }\n this.model = model2;\n }\n};\nfunction less2(currVal, prevVal) {\n return currVal < prevVal;\n}\nfunction greater2(currVal, prevVal) {\n return currVal > prevVal;\n}\nvar EarlyStopping = class extends Callback {\n constructor(args) {\n super();\n if (args == null) {\n args = {};\n }\n if (args.restoreBestWeights) {\n throw new NotImplementedError(\"restoreBestWeights = True is not implemented in EarlyStopping yet.\");\n }\n this.monitor = args.monitor || \"val_loss\";\n this.minDelta = Math.abs(args.minDelta || 0);\n this.patience = args.patience || 0;\n this.verbose = args.verbose || 0;\n this.mode = args.mode || \"auto\";\n this.baseline = args.baseline;\n if ([\"auto\", \"min\", \"max\"].indexOf(this.mode) === -1) {\n console.warn(`EarlyStopping mode '${this.mode}' is invalid. Falling back to mode 'auto'.`);\n this.mode = \"auto\";\n }\n if (this.mode === \"min\") {\n this.monitorFunc = less2;\n } else if (this.mode === \"max\") {\n this.monitorFunc = greater2;\n } else {\n if (this.monitor.indexOf(\"acc\") !== -1) {\n this.monitorFunc = greater2;\n } else {\n this.monitorFunc = less2;\n }\n }\n if (this.monitorFunc === less2) {\n this.minDelta *= -1;\n }\n }\n async onTrainBegin(logs) {\n this.wait = 0;\n this.stoppedEpoch = 0;\n if (this.baseline != null) {\n this.best = this.baseline;\n } else {\n this.best = this.monitorFunc === less2 ? Infinity : -Infinity;\n }\n }\n async onEpochEnd(epoch, logs) {\n await resolveScalarsInLogs(logs);\n const current = this.getMonitorValue(logs);\n if (current == null) {\n return;\n }\n if (this.monitorFunc(current - this.minDelta, this.best)) {\n this.best = current;\n this.wait = 0;\n } else {\n this.wait++;\n if (this.wait >= this.patience) {\n this.stoppedEpoch = epoch;\n this.model.stopTraining = true;\n }\n }\n }\n async onTrainEnd(logs) {\n if (this.stoppedEpoch > 0 && this.verbose) {\n console.log(`Epoch ${this.stoppedEpoch}: early stopping.`);\n }\n }\n getMonitorValue(logs) {\n if (logs == null) {\n logs = {};\n }\n const monitorValue = logs[this.monitor];\n if (monitorValue == null) {\n console.warn(`Metric for EarlyStopping ${this.monitor} is not available. Available metrics are: ${Object.keys(logs)}`);\n }\n return monitorValue;\n }\n};\nfunction earlyStopping(args) {\n return new EarlyStopping(args);\n}\nvar callbacks = { earlyStopping };\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/flags.js\nvar ENV4 = env();\nENV4.registerFlag(\"KEEP_INTERMEDIATE_TENSORS\", () => false, (debugValue) => {\n if (debugValue) {\n console.warn(\"Keep intermediate tensors is ON. This will print the values of all intermediate tensors during model inference. Not all models support this mode. For details, check e2e/benchmarks/ model_config.js. This significantly impacts performance.\");\n }\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/data/compiled_api.js\nvar DataType;\n(function(DataType2) {\n DataType2[DataType2[\"DT_INVALID\"] = 0] = \"DT_INVALID\";\n DataType2[DataType2[\"DT_FLOAT\"] = 1] = \"DT_FLOAT\";\n DataType2[DataType2[\"DT_DOUBLE\"] = 2] = \"DT_DOUBLE\";\n DataType2[DataType2[\"DT_INT32\"] = 3] = \"DT_INT32\";\n DataType2[DataType2[\"DT_UINT8\"] = 4] = \"DT_UINT8\";\n DataType2[DataType2[\"DT_INT16\"] = 5] = \"DT_INT16\";\n DataType2[DataType2[\"DT_INT8\"] = 6] = \"DT_INT8\";\n DataType2[DataType2[\"DT_STRING\"] = 7] = \"DT_STRING\";\n DataType2[DataType2[\"DT_COMPLEX64\"] = 8] = \"DT_COMPLEX64\";\n DataType2[DataType2[\"DT_INT64\"] = 9] = \"DT_INT64\";\n DataType2[DataType2[\"DT_BOOL\"] = 10] = \"DT_BOOL\";\n DataType2[DataType2[\"DT_QINT8\"] = 11] = \"DT_QINT8\";\n DataType2[DataType2[\"DT_QUINT8\"] = 12] = \"DT_QUINT8\";\n DataType2[DataType2[\"DT_QINT32\"] = 13] = \"DT_QINT32\";\n DataType2[DataType2[\"DT_BFLOAT16\"] = 14] = \"DT_BFLOAT16\";\n DataType2[DataType2[\"DT_QINT16\"] = 15] = \"DT_QINT16\";\n DataType2[DataType2[\"DT_QUINT16\"] = 16] = \"DT_QUINT16\";\n DataType2[DataType2[\"DT_UINT16\"] = 17] = \"DT_UINT16\";\n DataType2[DataType2[\"DT_COMPLEX128\"] = 18] = \"DT_COMPLEX128\";\n DataType2[DataType2[\"DT_HALF\"] = 19] = \"DT_HALF\";\n DataType2[DataType2[\"DT_RESOURCE\"] = 20] = \"DT_RESOURCE\";\n DataType2[DataType2[\"DT_VARIANT\"] = 21] = \"DT_VARIANT\";\n DataType2[DataType2[\"DT_UINT32\"] = 22] = \"DT_UINT32\";\n DataType2[DataType2[\"DT_UINT64\"] = 23] = \"DT_UINT64\";\n DataType2[DataType2[\"DT_FLOAT_REF\"] = 101] = \"DT_FLOAT_REF\";\n DataType2[DataType2[\"DT_DOUBLE_REF\"] = 102] = \"DT_DOUBLE_REF\";\n DataType2[DataType2[\"DT_INT32_REF\"] = 103] = \"DT_INT32_REF\";\n DataType2[DataType2[\"DT_UINT8_REF\"] = 104] = \"DT_UINT8_REF\";\n DataType2[DataType2[\"DT_INT16_REF\"] = 105] = \"DT_INT16_REF\";\n DataType2[DataType2[\"DT_INT8_REF\"] = 106] = \"DT_INT8_REF\";\n DataType2[DataType2[\"DT_STRING_REF\"] = 107] = \"DT_STRING_REF\";\n DataType2[DataType2[\"DT_COMPLEX64_REF\"] = 108] = \"DT_COMPLEX64_REF\";\n DataType2[DataType2[\"DT_INT64_REF\"] = 109] = \"DT_INT64_REF\";\n DataType2[DataType2[\"DT_BOOL_REF\"] = 110] = \"DT_BOOL_REF\";\n DataType2[DataType2[\"DT_QINT8_REF\"] = 111] = \"DT_QINT8_REF\";\n DataType2[DataType2[\"DT_QUINT8_REF\"] = 112] = \"DT_QUINT8_REF\";\n DataType2[DataType2[\"DT_QINT32_REF\"] = 113] = \"DT_QINT32_REF\";\n DataType2[DataType2[\"DT_BFLOAT16_REF\"] = 114] = \"DT_BFLOAT16_REF\";\n DataType2[DataType2[\"DT_QINT16_REF\"] = 115] = \"DT_QINT16_REF\";\n DataType2[DataType2[\"DT_QUINT16_REF\"] = 116] = \"DT_QUINT16_REF\";\n DataType2[DataType2[\"DT_UINT16_REF\"] = 117] = \"DT_UINT16_REF\";\n DataType2[DataType2[\"DT_COMPLEX128_REF\"] = 118] = \"DT_COMPLEX128_REF\";\n DataType2[DataType2[\"DT_HALF_REF\"] = 119] = \"DT_HALF_REF\";\n DataType2[DataType2[\"DT_RESOURCE_REF\"] = 120] = \"DT_RESOURCE_REF\";\n DataType2[DataType2[\"DT_VARIANT_REF\"] = 121] = \"DT_VARIANT_REF\";\n DataType2[DataType2[\"DT_UINT32_REF\"] = 122] = \"DT_UINT32_REF\";\n DataType2[DataType2[\"DT_UINT64_REF\"] = 123] = \"DT_UINT64_REF\";\n})(DataType || (DataType = {}));\nvar SaverDef;\n(function(SaverDef2) {\n let CheckpointFormatVersion;\n (function(CheckpointFormatVersion2) {\n CheckpointFormatVersion2[CheckpointFormatVersion2[\"LEGACY\"] = 0] = \"LEGACY\";\n CheckpointFormatVersion2[CheckpointFormatVersion2[\"V1\"] = 1] = \"V1\";\n CheckpointFormatVersion2[CheckpointFormatVersion2[\"V2\"] = 2] = \"V2\";\n })(CheckpointFormatVersion = SaverDef2.CheckpointFormatVersion || (SaverDef2.CheckpointFormatVersion = {}));\n})(SaverDef || (SaverDef = {}));\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/custom_op/register.js\nvar CUSTOM_OPS = {};\nfunction registerOp(name, opFunc) {\n const opMapper = {\n tfOpName: name,\n category: \"custom\",\n inputs: [],\n attrs: [],\n customExecutor: opFunc\n };\n CUSTOM_OPS[name] = opMapper;\n}\nfunction getRegisteredOp(name) {\n return CUSTOM_OPS[name];\n}\nfunction deregisterOp(name) {\n delete CUSTOM_OPS[name];\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/utils.js\nfunction getParamValue(paramName, node, tensorMap, context, resourceManager) {\n const inputParam = node.inputParams[paramName];\n if (inputParam && inputParam.inputIndexStart !== void 0) {\n const start = inputParam.inputIndexStart;\n const end = inputParam.inputIndexEnd === 0 ? void 0 : inputParam.inputIndexEnd === void 0 ? start + 1 : inputParam.inputIndexEnd;\n if (inputParam.type === \"tensor\") {\n return getTensor(node.inputNames[inputParam.inputIndexStart], tensorMap, context, resourceManager);\n }\n if (inputParam.type === \"tensors\") {\n const inputs = node.inputNames.slice(start, end);\n return inputs.map((name) => getTensor(name, tensorMap, context, resourceManager));\n }\n const tensor2 = getTensor(node.inputNames.slice(start)[0], tensorMap, context, resourceManager);\n const data = tensor2.dataSync();\n return inputParam.type === \"number\" ? data[0] : util_exports.toNestedArray(tensor2.shape, data);\n }\n const attrParam = node.attrParams[paramName];\n return attrParam && attrParam.value;\n}\nfunction getTensor(name, tensorsMap, context, resourceManager) {\n const [nodeName, index] = parseNodeName(name);\n if (resourceManager != null) {\n const tensor2 = resourceManager.getHashTableHandleByName(nodeName);\n if (tensor2 != null) {\n return tensor2;\n }\n }\n const contextId = context.currentContextIds.find((contextId2) => {\n return !!tensorsMap[getNodeNameWithContextId(nodeName, contextId2)];\n });\n return contextId !== void 0 ? tensorsMap[getNodeNameWithContextId(nodeName, contextId)][index] : void 0;\n}\nfunction getTensorsForCurrentContenxt(name, tensorsMap, context) {\n return tensorsMap[getNodeNameWithContextId(name, context.currentContextId)];\n}\nfunction getNodeNameAndIndex(inputName, context) {\n const [nodeName, index, outputName] = parseNodeName(inputName);\n return [\n getNodeNameWithContextId(nodeName, context && context.currentContextId),\n index,\n outputName\n ];\n}\nfunction getNodeNameWithContextId(name, contextId) {\n return !!contextId ? `${name}-${contextId}` : name;\n}\nfunction parseNodeName(name) {\n const parts = name.split(\":\");\n if (parts.length === 1) {\n return [name, 0, void 0];\n }\n const nodeName = parts[0];\n const outputName = parts.length === 3 ? parts[1] : void 0;\n const index = Number(parts[parts.length - 1]);\n return [nodeName, index, outputName];\n}\nfunction getPadding(node, tensorMap, context) {\n let pad3 = getParamValue(\"pad\", node, tensorMap, context);\n if (pad3 === \"explicit\") {\n pad3 = getParamValue(\"explicitPaddings\", node, tensorMap, context);\n const explicitPadding = [[0, 0], [0, 0], [0, 0], [0, 0]];\n for (let i2 = 0; i2 < 4; i2++) {\n explicitPadding[i2][0] = pad3[i2 * 2];\n explicitPadding[i2][1] = pad3[i2 * 2 + 1];\n }\n return explicitPadding;\n }\n return pad3;\n}\nfunction cloneTensor(tensor2) {\n return tensor2.kept ? tensor2 : clone(tensor2);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/arithmetic.js\nvar arithmetic_exports = {};\n__export(arithmetic_exports, {\n json: () => json\n});\nvar json = [\n {\n \"tfOpName\": \"Add\",\n \"category\": \"arithmetic\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"AddV2\",\n \"category\": \"arithmetic\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"AddN\",\n \"category\": \"arithmetic\",\n \"inputs\": [\n {\n \"start\": 0,\n \"end\": 0,\n \"name\": \"tensors\",\n \"type\": \"tensors\"\n }\n ]\n },\n {\n \"tfOpName\": \"BiasAdd\",\n \"category\": \"arithmetic\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"data_format\",\n \"name\": \"dataFormat\",\n \"type\": \"string\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Sub\",\n \"category\": \"arithmetic\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"RealDiv\",\n \"category\": \"arithmetic\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Div\",\n \"category\": \"arithmetic\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"DivNoNan\",\n \"category\": \"arithmetic\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"FloorDiv\",\n \"category\": \"arithmetic\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Mul\",\n \"category\": \"arithmetic\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Maximum\",\n \"category\": \"arithmetic\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Minimum\",\n \"category\": \"arithmetic\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Pow\",\n \"category\": \"arithmetic\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"SquaredDifference\",\n \"category\": \"arithmetic\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Mod\",\n \"category\": \"arithmetic\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"FloorMod\",\n \"category\": \"arithmetic\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n }\n];\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/basic_math.js\nvar basic_math_exports = {};\n__export(basic_math_exports, {\n json: () => json2\n});\nvar json2 = [\n {\n \"tfOpName\": \"Abs\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Acos\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Asin\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Atan\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Atan2\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"y\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Ceil\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"ClipByValue\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"clipValueMin\",\n \"type\": \"number\"\n },\n {\n \"start\": 2,\n \"name\": \"clipValueMax\",\n \"type\": \"number\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Complex\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"real\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"imag\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"ComplexAbs\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Cos\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Cosh\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Elu\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Exp\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Floor\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Log\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Imag\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"Tout\",\n \"name\": \"outputType\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Neg\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Real\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"Tout\",\n \"name\": \"outputType\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Prelu\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"alpha\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Relu\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Relu6\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Selu\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Sigmoid\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Sin\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Sinh\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Sqrt\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Rsqrt\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Square\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Tan\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Tanh\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Sign\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Round\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Expm1\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Log1p\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Reciprocal\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Softplus\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Asinh\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Acosh\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Atanh\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Erf\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Prod\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"axes\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"keep_dims\",\n \"name\": \"keepDims\",\n \"type\": \"bool\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"LeakyRelu\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"alpha\",\n \"name\": \"alpha\",\n \"type\": \"number\",\n \"defaultValue\": 0.2\n },\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"IsNan\",\n \"category\": \"basic_math\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n }\n];\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/control.js\nvar control_exports = {};\n__export(control_exports, {\n json: () => json3\n});\nvar json3 = [\n {\n \"tfOpName\": \"EmptyTensorList\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"elementShape\",\n \"type\": \"shape\"\n },\n {\n \"start\": 1,\n \"name\": \"maxNumElements\",\n \"type\": \"number\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"element_dtype\",\n \"name\": \"elementDType\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"LoopCond\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"pred\",\n \"type\": \"tensor\"\n }\n ]\n },\n {\n \"tfOpName\": \"Switch\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"data\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"pred\",\n \"type\": \"tensor\"\n }\n ]\n },\n {\n \"tfOpName\": \"Merge\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"end\": 0,\n \"name\": \"tensors\",\n \"type\": \"tensors\"\n }\n ]\n },\n {\n \"tfOpName\": \"Enter\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensor\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"frame_name\",\n \"name\": \"frameName\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"is_constant\",\n \"name\": \"isConstant\",\n \"type\": \"bool\"\n }\n ]\n },\n {\n \"tfOpName\": \"Exit\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensor\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"NextIteration\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensor\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"TensorArrayV3\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"size\",\n \"type\": \"number\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"dtype\",\n \"name\": \"dtype\",\n \"type\": \"dtype\"\n },\n {\n \"tfName\": \"element_shape\",\n \"name\": \"elementShape\",\n \"type\": \"shape\"\n },\n {\n \"tfName\": \"dynamic_size\",\n \"name\": \"dynamicSize\",\n \"type\": \"bool\"\n },\n {\n \"tfName\": \"clear_after_read\",\n \"name\": \"clearAfterRead\",\n \"type\": \"bool\"\n },\n {\n \"tfName\": \"identical_element_shapes\",\n \"name\": \"identicalElementShapes\",\n \"type\": \"bool\"\n },\n {\n \"tfName\": \"tensor_array_name\",\n \"name\": \"name\",\n \"type\": \"string\"\n }\n ]\n },\n {\n \"tfOpName\": \"TensorArrayWriteV3\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensorArrayId\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"index\",\n \"type\": \"number\"\n },\n {\n \"start\": 2,\n \"name\": \"tensor\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 3,\n \"name\": \"flowIn\",\n \"type\": \"number\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"TensorArrayReadV3\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensorArrayId\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"index\",\n \"type\": \"number\"\n },\n {\n \"start\": 2,\n \"name\": \"flowIn\",\n \"type\": \"number\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"dtype\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"TensorArrayGatherV3\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensorArrayId\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"indices\",\n \"type\": \"number[]\"\n },\n {\n \"start\": 2,\n \"name\": \"flowIn\",\n \"type\": \"number\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"dtype\",\n \"name\": \"dtype\",\n \"type\": \"dtype\"\n },\n {\n \"tfName\": \"element_shape\",\n \"name\": \"elementShape\",\n \"type\": \"shape\"\n }\n ]\n },\n {\n \"tfOpName\": \"TensorArrayScatterV3\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensorArrayId\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"indices\",\n \"type\": \"number[]\"\n },\n {\n \"start\": 2,\n \"name\": \"tensor\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 3,\n \"name\": \"flowIn\",\n \"type\": \"number\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"TensorArrayConcatV3\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensorArrayId\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"flowIn\",\n \"type\": \"number\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"dtype\",\n \"name\": \"dtype\",\n \"type\": \"dtype\"\n },\n {\n \"tfName\": \"element_shape_except0\",\n \"name\": \"elementShapeExcept0\",\n \"type\": \"shape\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"TensorArraySplitV3\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensorArrayId\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"tensor\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"name\": \"lengths\",\n \"type\": \"number[]\"\n },\n {\n \"start\": 3,\n \"name\": \"flowIn\",\n \"type\": \"number\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"TensorArraySizeV3\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensorArrayId\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"flowIn\",\n \"type\": \"number\"\n }\n ]\n },\n {\n \"tfOpName\": \"TensorArrayCloseV3\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensorArrayId\",\n \"type\": \"tensor\"\n }\n ]\n },\n {\n \"tfOpName\": \"StatelessIf\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"cond\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"end\": 0,\n \"name\": \"args\",\n \"type\": \"tensors\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"then_branch\",\n \"name\": \"thenBranch\",\n \"type\": \"func\"\n },\n {\n \"tfName\": \"else_branch\",\n \"name\": \"elseBranch\",\n \"type\": \"func\"\n }\n ]\n },\n {\n \"tfOpName\": \"If\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"cond\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"end\": 0,\n \"name\": \"args\",\n \"type\": \"tensors\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"then_branch\",\n \"name\": \"thenBranch\",\n \"type\": \"func\"\n },\n {\n \"tfName\": \"else_branch\",\n \"name\": \"elseBranch\",\n \"type\": \"func\"\n }\n ]\n },\n {\n \"tfOpName\": \"StatelessWhile\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"end\": 0,\n \"name\": \"args\",\n \"type\": \"tensors\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"cond\",\n \"name\": \"cond\",\n \"type\": \"func\"\n },\n {\n \"tfName\": \"body\",\n \"name\": \"body\",\n \"type\": \"func\"\n }\n ]\n },\n {\n \"tfOpName\": \"While\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"end\": 0,\n \"name\": \"args\",\n \"type\": \"tensors\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"cond\",\n \"name\": \"cond\",\n \"type\": \"func\"\n },\n {\n \"tfName\": \"body\",\n \"name\": \"body\",\n \"type\": \"func\"\n }\n ]\n },\n {\n \"tfOpName\": \"TensorListScatter\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensor\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"indices\",\n \"type\": \"number[]\"\n },\n {\n \"start\": 2,\n \"name\": \"elementShape\",\n \"type\": \"shape\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"element_dtype\",\n \"name\": \"elementDType\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"TensorListScatterV2\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensor\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"indices\",\n \"type\": \"number[]\"\n },\n {\n \"start\": 2,\n \"name\": \"elementShape\",\n \"type\": \"shape\"\n },\n {\n \"start\": 3,\n \"name\": \"numElements\",\n \"type\": \"number\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"element_dtype\",\n \"name\": \"elementDType\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"TensorListGather\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensorListId\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"indices\",\n \"type\": \"number[]\"\n },\n {\n \"start\": 2,\n \"name\": \"elementShape\",\n \"type\": \"shape\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"element_dtype\",\n \"name\": \"elementDType\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"TensorListGetItem\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensorListId\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"index\",\n \"type\": \"number\"\n },\n {\n \"start\": 2,\n \"name\": \"elementShape\",\n \"type\": \"shape\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"element_dtype\",\n \"name\": \"elementDType\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"TensorListSetItem\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensorListId\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"index\",\n \"type\": \"number\"\n },\n {\n \"start\": 2,\n \"name\": \"tensor\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"element_dtype\",\n \"name\": \"elementDType\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"TensorListReserve\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"elementShape\",\n \"type\": \"shape\"\n },\n {\n \"start\": 1,\n \"name\": \"numElements\",\n \"type\": \"number\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"element_dtype\",\n \"name\": \"elementDType\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"TensorListFromTensor\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensor\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"elementShape\",\n \"type\": \"shape\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"element_dtype\",\n \"name\": \"elementDType\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"TensorListStack\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensorListId\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"elementShape\",\n \"type\": \"shape\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"element_dtype\",\n \"name\": \"elementDType\",\n \"type\": \"dtype\"\n },\n {\n \"tfName\": \"num_elements\",\n \"name\": \"numElements\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"TensorListSplit\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensor\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"elementShape\",\n \"type\": \"shape\"\n },\n {\n \"start\": 2,\n \"name\": \"lengths\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"element_dtype\",\n \"name\": \"elementDType\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"TensorListConcat\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensorListId\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"element_shape\",\n \"name\": \"elementShape\",\n \"type\": \"shape\"\n },\n {\n \"tfName\": \"element_dtype\",\n \"name\": \"elementDType\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"TensorListConcatV2\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensorListId\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"element_shape\",\n \"name\": \"elementShape\",\n \"type\": \"shape\"\n },\n {\n \"tfName\": \"element_dtype\",\n \"name\": \"elementDType\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"TensorListPopBack\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensorListId\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"elementShape\",\n \"type\": \"shape\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"element_dtype\",\n \"name\": \"elementDType\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"TensorListPushBack\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensorListId\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"tensor\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"element_dtype\",\n \"name\": \"elementDType\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"TensorListLength\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensorListId\",\n \"type\": \"tensor\"\n }\n ]\n },\n {\n \"tfOpName\": \"TensorListResize\",\n \"category\": \"control\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensorListId\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"size\",\n \"type\": \"number\"\n }\n ]\n }\n];\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/convolution.js\nvar convolution_exports = {};\n__export(convolution_exports, {\n json: () => json4\n});\nvar json4 = [\n {\n \"tfOpName\": \"AvgPool\",\n \"category\": \"convolution\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"strides\",\n \"name\": \"strides\",\n \"type\": \"number[]\"\n },\n {\n \"tfName\": \"padding\",\n \"name\": \"pad\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"data_format\",\n \"name\": \"dataFormat\",\n \"type\": \"string\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"ksize\",\n \"name\": \"kernelSize\",\n \"type\": \"number[]\"\n },\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"MaxPool\",\n \"category\": \"convolution\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"strides\",\n \"name\": \"strides\",\n \"type\": \"number[]\"\n },\n {\n \"tfName\": \"padding\",\n \"name\": \"pad\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"data_format\",\n \"name\": \"dataFormat\",\n \"type\": \"string\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"ksize\",\n \"name\": \"kernelSize\",\n \"type\": \"number[]\"\n },\n {\n \"tfName\": \"explicit_paddings\",\n \"name\": \"explicitPaddings\",\n \"type\": \"number[]\",\n \"defaultValue\": [],\n \"notSupported\": true\n },\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"MaxPoolWithArgmax\",\n \"category\": \"convolution\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"strides\",\n \"name\": \"strides\",\n \"type\": \"number[]\"\n },\n {\n \"tfName\": \"padding\",\n \"name\": \"pad\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"ksize\",\n \"name\": \"kernelSize\",\n \"type\": \"number[]\"\n },\n {\n \"tfName\": \"include_batch_in_index\",\n \"name\": \"includeBatchInIndex\",\n \"type\": \"bool\"\n },\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"AvgPool3D\",\n \"category\": \"convolution\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"strides\",\n \"name\": \"strides\",\n \"type\": \"number[]\"\n },\n {\n \"tfName\": \"padding\",\n \"name\": \"pad\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"data_format\",\n \"name\": \"dataFormat\",\n \"type\": \"string\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"ksize\",\n \"name\": \"kernelSize\",\n \"type\": \"number[]\"\n },\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"MaxPool3D\",\n \"category\": \"convolution\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"strides\",\n \"name\": \"strides\",\n \"type\": \"number[]\"\n },\n {\n \"tfName\": \"padding\",\n \"name\": \"pad\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"data_format\",\n \"name\": \"dataFormat\",\n \"type\": \"string\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"ksize\",\n \"name\": \"kernelSize\",\n \"type\": \"number[]\"\n },\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Conv1D\",\n \"category\": \"convolution\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"filter\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"stride\",\n \"name\": \"stride\",\n \"type\": \"number\"\n },\n {\n \"tfName\": \"padding\",\n \"name\": \"pad\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"data_format\",\n \"name\": \"dataFormat\",\n \"type\": \"string\",\n \"defaultValue\": \"NWC\"\n },\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"dilation\",\n \"name\": \"dilation\",\n \"type\": \"number\",\n \"defaultValue\": 1\n }\n ]\n },\n {\n \"tfOpName\": \"Conv2D\",\n \"category\": \"convolution\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"filter\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"strides\",\n \"name\": \"strides\",\n \"type\": \"number[]\"\n },\n {\n \"tfName\": \"padding\",\n \"name\": \"pad\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"useCudnnOnGpu\",\n \"name\": \"useCudnnOnGpu\",\n \"type\": \"bool\"\n },\n {\n \"tfName\": \"data_format\",\n \"name\": \"dataFormat\",\n \"type\": \"string\",\n \"defaultValue\": \"NHWC\"\n },\n {\n \"tfName\": \"explicit_paddings\",\n \"name\": \"explicitPaddings\",\n \"type\": \"number[]\",\n \"defaultValue\": []\n },\n {\n \"tfName\": \"dilations\",\n \"name\": \"dilations\",\n \"type\": \"number[]\"\n }\n ]\n },\n {\n \"tfOpName\": \"_FusedConv2D\",\n \"category\": \"convolution\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"filter\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"end\": 0,\n \"name\": \"args\",\n \"type\": \"tensors\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"num_args\",\n \"name\": \"numArgs\",\n \"type\": \"number\"\n },\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"strides\",\n \"name\": \"strides\",\n \"type\": \"number[]\"\n },\n {\n \"tfName\": \"padding\",\n \"name\": \"pad\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"explicit_paddings\",\n \"name\": \"explicitPaddings\",\n \"type\": \"number[]\",\n \"defaultValue\": []\n },\n {\n \"tfName\": \"use_cudnn_on_gpu\",\n \"name\": \"useCudnnOnGpu\",\n \"type\": \"bool\",\n \"defaultValue\": true\n },\n {\n \"tfName\": \"data_format\",\n \"name\": \"dataFormat\",\n \"type\": \"string\",\n \"defaultValue\": \"NHWC\"\n },\n {\n \"tfName\": \"dilations\",\n \"name\": \"dilations\",\n \"type\": \"number[]\",\n \"defaultValue\": [\n 1,\n 1,\n 1,\n 1\n ]\n },\n {\n \"tfName\": \"fused_ops\",\n \"name\": \"fusedOps\",\n \"type\": \"string[]\",\n \"defaultValue\": []\n },\n {\n \"tfName\": \"epsilon\",\n \"name\": \"epsilon\",\n \"type\": \"number\",\n \"defaultValue\": 1e-4\n },\n {\n \"tfName\": \"leakyrelu_alpha\",\n \"name\": \"leakyreluAlpha\",\n \"type\": \"number\",\n \"defaultValue\": 0.2\n }\n ]\n },\n {\n \"tfOpName\": \"Conv2DBackpropInput\",\n \"category\": \"convolution\",\n \"inputs\": [\n {\n \"start\": 2,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"filter\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 0,\n \"name\": \"outputShape\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"strides\",\n \"name\": \"strides\",\n \"type\": \"number[]\"\n },\n {\n \"tfName\": \"padding\",\n \"name\": \"pad\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"data_format\",\n \"name\": \"dataFormat\",\n \"type\": \"string\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"explicit_paddings\",\n \"name\": \"explicitPaddings\",\n \"type\": \"number[]\",\n \"defaultValue\": []\n },\n {\n \"tfName\": \"dilations\",\n \"name\": \"dilations\",\n \"type\": \"number[]\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"DepthwiseConv2d\",\n \"category\": \"convolution\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"input\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"filter\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"strides\",\n \"name\": \"strides\",\n \"type\": \"number[]\"\n },\n {\n \"tfName\": \"padding\",\n \"name\": \"pad\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"data_format\",\n \"name\": \"dataFormat\",\n \"type\": \"string\",\n \"defaultValue\": \"NHWC\"\n },\n {\n \"tfName\": \"explicit_paddings\",\n \"name\": \"explicitPaddings\",\n \"type\": \"number[]\",\n \"defaultValue\": []\n },\n {\n \"tfName\": \"dilations\",\n \"name\": \"dilations\",\n \"type\": \"number[]\"\n }\n ]\n },\n {\n \"tfOpName\": \"DepthwiseConv2dNative\",\n \"category\": \"convolution\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"input\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"filter\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"strides\",\n \"name\": \"strides\",\n \"type\": \"number[]\"\n },\n {\n \"tfName\": \"padding\",\n \"name\": \"pad\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"data_format\",\n \"name\": \"dataFormat\",\n \"type\": \"string\",\n \"defaultValue\": \"NHWC\"\n },\n {\n \"tfName\": \"explicit_paddings\",\n \"name\": \"explicitPaddings\",\n \"type\": \"number[]\",\n \"defaultValue\": []\n },\n {\n \"tfName\": \"dilations\",\n \"name\": \"dilations\",\n \"type\": \"number[]\"\n }\n ]\n },\n {\n \"tfOpName\": \"FusedDepthwiseConv2dNative\",\n \"category\": \"convolution\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"filter\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"end\": 0,\n \"name\": \"args\",\n \"type\": \"tensors\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"num_args\",\n \"name\": \"numArgs\",\n \"type\": \"number\"\n },\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"strides\",\n \"name\": \"strides\",\n \"type\": \"number[]\"\n },\n {\n \"tfName\": \"padding\",\n \"name\": \"pad\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"data_format\",\n \"name\": \"dataFormat\",\n \"type\": \"string\",\n \"defaultValue\": \"NHWC\"\n },\n {\n \"tfName\": \"dilations\",\n \"name\": \"dilations\",\n \"type\": \"number[]\",\n \"defaultValue\": [\n 1,\n 1,\n 1,\n 1\n ]\n },\n {\n \"tfName\": \"fused_ops\",\n \"name\": \"fusedOps\",\n \"type\": \"string[]\",\n \"defaultValue\": []\n },\n {\n \"tfName\": \"explicit_paddings\",\n \"name\": \"explicitPaddings\",\n \"type\": \"number[]\",\n \"defaultValue\": []\n }\n ]\n },\n {\n \"tfOpName\": \"Conv3D\",\n \"category\": \"convolution\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"filter\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"strides\",\n \"name\": \"strides\",\n \"type\": \"number[]\"\n },\n {\n \"tfName\": \"padding\",\n \"name\": \"pad\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"data_format\",\n \"name\": \"dataFormat\",\n \"type\": \"string\",\n \"defaultValue\": \"NHWC\"\n },\n {\n \"tfName\": \"dilations\",\n \"name\": \"dilations\",\n \"type\": \"number[]\"\n }\n ]\n },\n {\n \"tfOpName\": \"Dilation2D\",\n \"category\": \"convolution\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"filter\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"strides\",\n \"name\": \"strides\",\n \"type\": \"number[]\"\n },\n {\n \"tfName\": \"rates\",\n \"name\": \"dilations\",\n \"type\": \"number[]\"\n },\n {\n \"tfName\": \"padding\",\n \"name\": \"pad\",\n \"type\": \"string\"\n }\n ]\n }\n];\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/creation.js\nvar creation_exports = {};\n__export(creation_exports, {\n json: () => json5\n});\nvar json5 = [\n {\n \"tfOpName\": \"Fill\",\n \"category\": \"creation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"shape\",\n \"type\": \"number[]\"\n },\n {\n \"start\": 1,\n \"name\": \"value\",\n \"type\": \"number\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"LinSpace\",\n \"category\": \"creation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"start\",\n \"type\": \"number\"\n },\n {\n \"start\": 1,\n \"name\": \"stop\",\n \"type\": \"number\"\n },\n {\n \"start\": 2,\n \"name\": \"num\",\n \"type\": \"number\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"OneHot\",\n \"category\": \"creation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"indices\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"depth\",\n \"type\": \"number\"\n },\n {\n \"start\": 2,\n \"name\": \"onValue\",\n \"type\": \"number\",\n \"defaultValue\": 1\n },\n {\n \"start\": 3,\n \"name\": \"offValue\",\n \"type\": \"number\",\n \"defaultValue\": 0\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"axis\",\n \"name\": \"axis\",\n \"type\": \"number\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"Ones\",\n \"category\": \"creation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"shape\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"OnesLike\",\n \"category\": \"creation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"dtype\",\n \"name\": \"dtype\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"RandomStandardNormal\",\n \"category\": \"creation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"shape\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"seed\",\n \"name\": \"seed\",\n \"type\": \"number\",\n \"defaultValue\": 0\n },\n {\n \"tfName\": \"seed2\",\n \"name\": \"seed2\",\n \"type\": \"number\",\n \"defaultValue\": 0,\n \"notSupported\": true\n },\n {\n \"tfName\": \"dtype\",\n \"name\": \"dtype\",\n \"type\": \"dtype\"\n },\n {\n \"tfName\": \"T\",\n \"name\": \"T\",\n \"type\": \"number\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"RandomUniform\",\n \"category\": \"creation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"shape\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"minval\",\n \"name\": \"minval\",\n \"type\": \"number\",\n \"defaultValue\": 0\n },\n {\n \"tfName\": \"maxval\",\n \"name\": \"maxval\",\n \"type\": \"number\",\n \"defaultValue\": 1\n },\n {\n \"tfName\": \"dtype\",\n \"name\": \"dtype\",\n \"type\": \"dtype\"\n },\n {\n \"tfName\": \"seed\",\n \"name\": \"seed\",\n \"type\": \"number\",\n \"defaultValue\": 0\n },\n {\n \"tfName\": \"seed2\",\n \"name\": \"seed2\",\n \"type\": \"number\",\n \"defaultValue\": 0,\n \"notSupported\": true\n },\n {\n \"tfName\": \"T\",\n \"name\": \"T\",\n \"type\": \"number\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Range\",\n \"category\": \"creation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"start\",\n \"type\": \"number\"\n },\n {\n \"start\": 1,\n \"name\": \"stop\",\n \"type\": \"number\"\n },\n {\n \"start\": 2,\n \"name\": \"step\",\n \"type\": \"number\",\n \"defaultValue\": 0\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"Tidx\",\n \"name\": \"dtype\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"TruncatedNormal\",\n \"category\": \"creation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"shape\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"means\",\n \"name\": \"mean\",\n \"type\": \"number\",\n \"defaultValue\": 0\n },\n {\n \"tfName\": \"stddev\",\n \"name\": \"stdDev\",\n \"type\": \"number\",\n \"defaultValue\": 1\n },\n {\n \"tfName\": \"seed\",\n \"name\": \"seed\",\n \"type\": \"number\"\n },\n {\n \"tfName\": \"seed2\",\n \"name\": \"seed2\",\n \"type\": \"number\",\n \"defaultValue\": 0,\n \"notSupported\": true\n },\n {\n \"tfName\": \"dtype\",\n \"name\": \"dtype\",\n \"type\": \"dtype\"\n },\n {\n \"tfName\": \"T\",\n \"name\": \"T\",\n \"type\": \"number\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Zeros\",\n \"category\": \"creation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"shape\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"ZerosLike\",\n \"category\": \"creation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"Multinomial\",\n \"category\": \"creation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"logits\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"numSamples\",\n \"type\": \"number\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"seed\",\n \"name\": \"seed\",\n \"type\": \"number\"\n },\n {\n \"tfName\": \"seed2\",\n \"name\": \"seed2\",\n \"type\": \"number\"\n },\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\"\n },\n {\n \"tfName\": \"output_dtype\",\n \"name\": \"output_dtype\",\n \"type\": \"dtype\"\n }\n ]\n }\n];\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/dynamic.js\nvar dynamic_exports = {};\n__export(dynamic_exports, {\n json: () => json6\n});\nvar json6 = [\n {\n \"tfOpName\": \"NonMaxSuppressionV2\",\n \"category\": \"dynamic\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"boxes\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"scores\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"name\": \"maxOutputSize\",\n \"type\": \"number\"\n },\n {\n \"start\": 3,\n \"name\": \"iouThreshold\",\n \"type\": \"number\"\n }\n ]\n },\n {\n \"tfOpName\": \"NonMaxSuppressionV3\",\n \"category\": \"dynamic\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"boxes\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"scores\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"name\": \"maxOutputSize\",\n \"type\": \"number\"\n },\n {\n \"start\": 3,\n \"name\": \"iouThreshold\",\n \"type\": \"number\"\n },\n {\n \"start\": 4,\n \"name\": \"scoreThreshold\",\n \"type\": \"number\"\n }\n ]\n },\n {\n \"tfOpName\": \"NonMaxSuppressionV4\",\n \"category\": \"dynamic\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"boxes\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"scores\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"name\": \"maxOutputSize\",\n \"type\": \"number\"\n },\n {\n \"start\": 3,\n \"name\": \"iouThreshold\",\n \"type\": \"number\"\n },\n {\n \"start\": 4,\n \"name\": \"scoreThreshold\",\n \"type\": \"number\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"T_threshold\",\n \"name\": \"threshold\",\n \"type\": \"dtype\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"pad_to_max_output_size\",\n \"name\": \"padToMaxOutputSize\",\n \"type\": \"bool\"\n }\n ]\n },\n {\n \"tfOpName\": \"NonMaxSuppressionV5\",\n \"category\": \"dynamic\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"boxes\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"scores\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"name\": \"maxOutputSize\",\n \"type\": \"number\"\n },\n {\n \"start\": 3,\n \"name\": \"iouThreshold\",\n \"type\": \"number\"\n },\n {\n \"start\": 4,\n \"name\": \"scoreThreshold\",\n \"type\": \"number\"\n },\n {\n \"start\": 5,\n \"name\": \"softNmsSigma\",\n \"type\": \"number\"\n }\n ]\n },\n {\n \"tfOpName\": \"Where\",\n \"category\": \"dynamic\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"condition\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"ListDiff\",\n \"category\": \"dynamic\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"y\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n }\n];\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/evaluation.js\nvar evaluation_exports = {};\n__export(evaluation_exports, {\n json: () => json7\n});\nvar json7 = [\n {\n \"tfOpName\": \"LowerBound\",\n \"category\": \"evaluation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"sortedSequence\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"values\",\n \"type\": \"tensor\"\n }\n ]\n },\n {\n \"tfOpName\": \"TopKV2\",\n \"category\": \"evaluation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"k\",\n \"type\": \"number\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"sorted\",\n \"name\": \"sorted\",\n \"type\": \"bool\"\n }\n ]\n },\n {\n \"tfOpName\": \"UpperBound\",\n \"category\": \"evaluation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"sortedSequence\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"values\",\n \"type\": \"tensor\"\n }\n ]\n },\n {\n \"tfOpName\": \"Unique\",\n \"category\": \"evaluation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ]\n },\n {\n \"tfOpName\": \"UniqueV2\",\n \"category\": \"evaluation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"axis\",\n \"type\": \"number\"\n }\n ]\n }\n];\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/graph.js\nvar graph_exports = {};\n__export(graph_exports, {\n json: () => json8\n});\nvar json8 = [\n {\n \"tfOpName\": \"PlaceholderWithDefault\",\n \"category\": \"graph\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"default\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"shape\",\n \"name\": \"shape\",\n \"type\": \"shape\"\n },\n {\n \"tfName\": \"dtype\",\n \"name\": \"dtype\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"Placeholder\",\n \"category\": \"graph\",\n \"attrs\": [\n {\n \"tfName\": \"shape\",\n \"name\": \"shape\",\n \"type\": \"shape\"\n },\n {\n \"tfName\": \"dtype\",\n \"name\": \"dtype\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"Const\",\n \"category\": \"graph\"\n },\n {\n \"tfOpName\": \"Identity\",\n \"category\": \"graph\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ]\n },\n {\n \"tfOpName\": \"IdentityN\",\n \"category\": \"graph\",\n \"inputs\": [\n {\n \"start\": 0,\n \"end\": 0,\n \"name\": \"x\",\n \"type\": \"tensors\"\n }\n ]\n },\n {\n \"tfOpName\": \"Snapshot\",\n \"category\": \"graph\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ]\n },\n {\n \"tfOpName\": \"Rank\",\n \"category\": \"graph\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ]\n },\n {\n \"tfOpName\": \"Size\",\n \"category\": \"graph\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ]\n },\n {\n \"tfOpName\": \"Shape\",\n \"category\": \"graph\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ]\n },\n {\n \"tfOpName\": \"ShapeN\",\n \"category\": \"graph\",\n \"inputs\": [\n {\n \"start\": 0,\n \"end\": 0,\n \"name\": \"x\",\n \"type\": \"tensors\"\n }\n ]\n },\n {\n \"tfOpName\": \"Print\",\n \"category\": \"graph\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"data\",\n \"type\": \"tensors\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"message\",\n \"name\": \"message\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"first_n\",\n \"name\": \"firstN\",\n \"type\": \"number\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"summarize\",\n \"name\": \"summarize\",\n \"type\": \"number\",\n \"defaultValue\": 3\n }\n ]\n },\n {\n \"tfOpName\": \"NoOp\",\n \"category\": \"graph\",\n \"inputs\": []\n },\n {\n \"tfOpName\": \"StopGradient\",\n \"category\": \"graph\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ]\n },\n {\n \"tfOpName\": \"FakeQuantWithMinMaxVars\",\n \"category\": \"graph\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"min\",\n \"name\": \"min\",\n \"type\": \"number\"\n },\n {\n \"tfName\": \"max\",\n \"name\": \"max\",\n \"type\": \"number\"\n }\n ]\n }\n];\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/hash_table.js\nvar hash_table_exports = {};\n__export(hash_table_exports, {\n json: () => json9\n});\nvar json9 = [\n {\n \"tfOpName\": \"HashTable\",\n \"category\": \"hash_table\",\n \"inputs\": [],\n \"attrs\": [\n {\n \"tfName\": \"shared_name\",\n \"name\": \"sharedName\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"use_node_name_sharing\",\n \"name\": \"useNodeNameSharing\",\n \"type\": \"bool\"\n },\n {\n \"tfName\": \"key_dtype\",\n \"name\": \"keyDType\",\n \"type\": \"dtype\"\n },\n {\n \"tfName\": \"value_dtype\",\n \"name\": \"valueDType\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"HashTableV2\",\n \"category\": \"hash_table\",\n \"inputs\": [],\n \"attrs\": [\n {\n \"tfName\": \"shared_name\",\n \"name\": \"sharedName\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"use_node_name_sharing\",\n \"name\": \"useNodeNameSharing\",\n \"type\": \"bool\"\n },\n {\n \"tfName\": \"key_dtype\",\n \"name\": \"keyDType\",\n \"type\": \"dtype\"\n },\n {\n \"tfName\": \"value_dtype\",\n \"name\": \"valueDType\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"LookupTableImport\",\n \"category\": \"hash_table\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tableHandle\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"keys\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"name\": \"values\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"Tin\",\n \"name\": \"tIn\",\n \"type\": \"dtype\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"Tout\",\n \"name\": \"tOut\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"LookupTableImportV2\",\n \"category\": \"hash_table\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tableHandle\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"keys\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"name\": \"values\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"Tin\",\n \"name\": \"tIn\",\n \"type\": \"dtype\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"Tout\",\n \"name\": \"tOut\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"LookupTableFind\",\n \"category\": \"hash_table\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tableHandle\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"keys\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"name\": \"defaultValue\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"Tin\",\n \"name\": \"tIn\",\n \"type\": \"dtype\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"Tout\",\n \"name\": \"tOut\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"LookupTableFindV2\",\n \"category\": \"hash_table\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tableHandle\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"keys\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"name\": \"defaultValue\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"Tin\",\n \"name\": \"tIn\",\n \"type\": \"dtype\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"Tout\",\n \"name\": \"tOut\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"LookupTableSize\",\n \"category\": \"hash_table\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tableHandle\",\n \"type\": \"tensor\"\n }\n ]\n },\n {\n \"tfOpName\": \"LookupTableSizeV2\",\n \"category\": \"hash_table\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tableHandle\",\n \"type\": \"tensor\"\n }\n ]\n }\n];\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/image.js\nvar image_exports = {};\n__export(image_exports, {\n json: () => json10\n});\nvar json10 = [\n {\n \"tfOpName\": \"ResizeBilinear\",\n \"category\": \"image\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"images\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"size\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"align_corners\",\n \"name\": \"alignCorners\",\n \"type\": \"bool\"\n },\n {\n \"tfName\": \"half_pixel_centers\",\n \"name\": \"halfPixelCenters\",\n \"type\": \"bool\"\n },\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"ResizeNearestNeighbor\",\n \"category\": \"image\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"images\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"size\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"align_corners\",\n \"name\": \"alignCorners\",\n \"type\": \"bool\"\n },\n {\n \"tfName\": \"half_pixel_centers\",\n \"name\": \"halfPixelCenters\",\n \"type\": \"bool\"\n },\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"CropAndResize\",\n \"category\": \"image\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"image\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"boxes\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"name\": \"boxInd\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 3,\n \"name\": \"cropSize\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"method\",\n \"name\": \"method\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"extrapolation_value\",\n \"name\": \"extrapolationValue\",\n \"type\": \"number\"\n }\n ]\n },\n {\n \"tfOpName\": \"ImageProjectiveTransformV3\",\n \"category\": \"image\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"images\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"transforms\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"name\": \"outputShape\",\n \"type\": \"number[]\"\n },\n {\n \"start\": 3,\n \"name\": \"fillValue\",\n \"type\": \"number\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"interpolation\",\n \"name\": \"interpolation\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"fill_mode\",\n \"name\": \"fillMode\",\n \"type\": \"string\"\n }\n ]\n }\n];\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/logical.js\nvar logical_exports = {};\n__export(logical_exports, {\n json: () => json11\n});\nvar json11 = [\n {\n \"tfOpName\": \"Equal\",\n \"category\": \"logical\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"NotEqual\",\n \"category\": \"logical\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Greater\",\n \"category\": \"logical\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"GreaterEqual\",\n \"category\": \"logical\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Less\",\n \"category\": \"logical\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"LessEqual\",\n \"category\": \"logical\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"LogicalAnd\",\n \"category\": \"logical\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"LogicalNot\",\n \"category\": \"logical\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"LogicalOr\",\n \"category\": \"logical\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Select\",\n \"category\": \"logical\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"condition\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"SelectV2\",\n \"category\": \"logical\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"condition\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n }\n];\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/matrices.js\nvar matrices_exports = {};\n__export(matrices_exports, {\n json: () => json12\n});\nvar json12 = [\n {\n \"tfOpName\": \"_FusedMatMul\",\n \"category\": \"matrices\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"end\": 0,\n \"name\": \"args\",\n \"type\": \"tensors\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"num_args\",\n \"name\": \"numArgs\",\n \"type\": \"number\"\n },\n {\n \"tfName\": \"fused_ops\",\n \"name\": \"fusedOps\",\n \"type\": \"string[]\",\n \"defaultValue\": []\n },\n {\n \"tfName\": \"epsilon\",\n \"name\": \"epsilon\",\n \"type\": \"number\",\n \"defaultValue\": 1e-4\n },\n {\n \"tfName\": \"transpose_a\",\n \"name\": \"transposeA\",\n \"type\": \"bool\",\n \"defaultValue\": false\n },\n {\n \"tfName\": \"transpose_b\",\n \"name\": \"transposeB\",\n \"type\": \"bool\",\n \"defaultValue\": false\n },\n {\n \"tfName\": \"leakyrelu_alpha\",\n \"name\": \"leakyreluAlpha\",\n \"type\": \"number\",\n \"defaultValue\": 0.2\n },\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"MatMul\",\n \"category\": \"matrices\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"transpose_a\",\n \"name\": \"transposeA\",\n \"type\": \"bool\",\n \"defaultValue\": false\n },\n {\n \"tfName\": \"transpose_b\",\n \"name\": \"transposeB\",\n \"type\": \"bool\",\n \"defaultValue\": false\n },\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"BatchMatMul\",\n \"category\": \"matrices\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"adj_x\",\n \"name\": \"transposeA\",\n \"type\": \"bool\",\n \"defaultValue\": false\n },\n {\n \"tfName\": \"adj_y\",\n \"name\": \"transposeB\",\n \"type\": \"bool\",\n \"defaultValue\": false\n },\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"BatchMatMulV2\",\n \"category\": \"matrices\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"a\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"b\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"adj_x\",\n \"name\": \"transposeA\",\n \"type\": \"bool\",\n \"defaultValue\": false\n },\n {\n \"tfName\": \"adj_y\",\n \"name\": \"transposeB\",\n \"type\": \"bool\",\n \"defaultValue\": false\n },\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Transpose\",\n \"category\": \"matrices\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"perm\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Einsum\",\n \"category\": \"matrices\",\n \"inputs\": [\n {\n \"start\": 0,\n \"end\": 0,\n \"name\": \"tensors\",\n \"type\": \"tensors\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"equation\",\n \"name\": \"equation\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"N\",\n \"name\": \"n\",\n \"type\": \"number\",\n \"defaultValue\": 2\n },\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\"\n }\n ]\n }\n];\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/normalization.js\nvar normalization_exports = {};\n__export(normalization_exports, {\n json: () => json13\n});\nvar json13 = [\n {\n \"tfOpName\": \"EuclideanNorm\",\n \"category\": \"normalization\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"axis\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"keep_dims\",\n \"name\": \"keepDims\",\n \"type\": \"bool\",\n \"defaultValue\": false\n }\n ]\n },\n {\n \"tfOpName\": \"FusedBatchNorm\",\n \"category\": \"normalization\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"scale\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"name\": \"offset\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 3,\n \"name\": \"mean\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 4,\n \"name\": \"variance\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"epsilon\",\n \"name\": \"epsilon\",\n \"type\": \"number\",\n \"defaultValue\": 1e-3\n },\n {\n \"tfName\": \"data_format\",\n \"name\": \"dataFormat\",\n \"type\": \"string\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"FusedBatchNormV2\",\n \"category\": \"normalization\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"scale\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"name\": \"offset\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 3,\n \"name\": \"mean\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 4,\n \"name\": \"variance\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"epsilon\",\n \"name\": \"epsilon\",\n \"type\": \"number\",\n \"defaultValue\": 1e-3\n },\n {\n \"tfName\": \"data_format\",\n \"name\": \"dataFormat\",\n \"type\": \"string\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"FusedBatchNormV3\",\n \"category\": \"normalization\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"scale\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"name\": \"offset\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 3,\n \"name\": \"mean\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 4,\n \"name\": \"variance\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"epsilon\",\n \"name\": \"epsilon\",\n \"type\": \"number\",\n \"defaultValue\": 1e-3\n },\n {\n \"tfName\": \"data_format\",\n \"name\": \"dataFormat\",\n \"type\": \"string\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"LRN\",\n \"category\": \"normalization\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"depth_radius\",\n \"name\": \"radius\",\n \"type\": \"number\",\n \"defaultValue\": 5\n },\n {\n \"tfName\": \"bias\",\n \"name\": \"bias\",\n \"type\": \"number\",\n \"defaultValue\": 1\n },\n {\n \"tfName\": \"alpha\",\n \"name\": \"alpha\",\n \"type\": \"number\",\n \"defaultValue\": 1\n },\n {\n \"tfName\": \"beta\",\n \"name\": \"beta\",\n \"type\": \"number\",\n \"defaultValue\": 0.5\n }\n ]\n },\n {\n \"tfOpName\": \"Softmax\",\n \"category\": \"normalization\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ]\n },\n {\n \"tfOpName\": \"LogSoftmax\",\n \"category\": \"normalization\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ]\n },\n {\n \"tfOpName\": \"SparseToDense\",\n \"category\": \"normalization\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"sparseIndices\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"outputShape\",\n \"type\": \"number[]\"\n },\n {\n \"start\": 2,\n \"name\": \"sparseValues\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 3,\n \"name\": \"defaultValue\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"validate_indices\",\n \"name\": \"validateIndices\",\n \"type\": \"bool\",\n \"defaultValue\": true,\n \"notSupported\": true\n }\n ]\n }\n];\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/reduction.js\nvar reduction_exports = {};\n__export(reduction_exports, {\n json: () => json14\n});\nvar json14 = [\n {\n \"tfOpName\": \"Bincount\",\n \"category\": \"reduction\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"size\",\n \"type\": \"number\"\n },\n {\n \"start\": 2,\n \"name\": \"weights\",\n \"type\": \"tensor\"\n }\n ]\n },\n {\n \"tfOpName\": \"DenseBincount\",\n \"category\": \"reduction\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"size\",\n \"type\": \"number\"\n },\n {\n \"start\": 2,\n \"name\": \"weights\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"binary_output\",\n \"name\": \"binaryOutput\",\n \"type\": \"bool\"\n }\n ]\n },\n {\n \"tfOpName\": \"Max\",\n \"category\": \"reduction\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"axis\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"keep_dims\",\n \"name\": \"keepDims\",\n \"type\": \"bool\"\n }\n ]\n },\n {\n \"tfOpName\": \"Mean\",\n \"category\": \"reduction\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"axis\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"keep_dims\",\n \"name\": \"keepDims\",\n \"type\": \"bool\"\n }\n ]\n },\n {\n \"tfOpName\": \"Min\",\n \"category\": \"reduction\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"axis\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"keep_dims\",\n \"name\": \"keepDims\",\n \"type\": \"bool\"\n }\n ]\n },\n {\n \"tfOpName\": \"Sum\",\n \"category\": \"reduction\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"axis\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"keep_dims\",\n \"name\": \"keepDims\",\n \"type\": \"bool\"\n }\n ]\n },\n {\n \"tfOpName\": \"All\",\n \"category\": \"reduction\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"axis\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"keep_dims\",\n \"name\": \"keepDims\",\n \"type\": \"bool\"\n }\n ]\n },\n {\n \"tfOpName\": \"Any\",\n \"category\": \"reduction\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"axis\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"keep_dims\",\n \"name\": \"keepDims\",\n \"type\": \"bool\"\n }\n ]\n },\n {\n \"tfOpName\": \"ArgMax\",\n \"category\": \"reduction\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"axis\",\n \"type\": \"number\"\n }\n ]\n },\n {\n \"tfOpName\": \"ArgMin\",\n \"category\": \"reduction\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"axis\",\n \"type\": \"number\"\n }\n ]\n },\n {\n \"tfOpName\": \"Prod\",\n \"category\": \"reduction\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"axis\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"keep_dims\",\n \"name\": \"keepDims\",\n \"type\": \"bool\"\n }\n ]\n },\n {\n \"tfOpName\": \"Cumprod\",\n \"category\": \"reduction\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"axis\",\n \"type\": \"number\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"exclusive\",\n \"name\": \"exclusive\",\n \"type\": \"bool\"\n },\n {\n \"tfName\": \"reverse\",\n \"name\": \"reverse\",\n \"type\": \"bool\"\n }\n ]\n },\n {\n \"tfOpName\": \"Cumsum\",\n \"category\": \"reduction\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"axis\",\n \"type\": \"number\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"exclusive\",\n \"name\": \"exclusive\",\n \"type\": \"bool\"\n },\n {\n \"tfName\": \"reverse\",\n \"name\": \"reverse\",\n \"type\": \"bool\"\n }\n ]\n }\n];\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/slice_join.js\nvar slice_join_exports = {};\n__export(slice_join_exports, {\n json: () => json15\n});\nvar json15 = [\n {\n \"tfOpName\": \"ConcatV2\",\n \"category\": \"slice_join\",\n \"inputs\": [\n {\n \"start\": 0,\n \"end\": -1,\n \"name\": \"tensors\",\n \"type\": \"tensors\"\n },\n {\n \"start\": -1,\n \"name\": \"axis\",\n \"type\": \"number\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"N\",\n \"name\": \"n\",\n \"type\": \"number\",\n \"defaultValue\": 2\n }\n ]\n },\n {\n \"tfOpName\": \"Concat\",\n \"category\": \"slice_join\",\n \"inputs\": [\n {\n \"start\": 1,\n \"end\": 0,\n \"name\": \"tensors\",\n \"type\": \"tensors\"\n },\n {\n \"start\": 0,\n \"name\": \"axis\",\n \"type\": \"number\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"N\",\n \"name\": \"n\",\n \"type\": \"number\",\n \"defaultValue\": 2\n }\n ]\n },\n {\n \"tfOpName\": \"GatherV2\",\n \"category\": \"slice_join\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"indices\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"name\": \"axis\",\n \"type\": \"number\",\n \"defaultValue\": 0\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"batch_dims\",\n \"name\": \"batchDims\",\n \"type\": \"number\",\n \"defaultValue\": 0\n }\n ]\n },\n {\n \"tfOpName\": \"Gather\",\n \"category\": \"slice_join\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"indices\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"validate_indices\",\n \"name\": \"validateIndices\",\n \"type\": \"bool\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Reverse\",\n \"category\": \"slice_join\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"dims\",\n \"type\": \"bool[]\"\n }\n ]\n },\n {\n \"tfOpName\": \"ReverseV2\",\n \"category\": \"slice_join\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"axis\",\n \"type\": \"number[]\"\n }\n ]\n },\n {\n \"tfOpName\": \"Slice\",\n \"category\": \"slice_join\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"begin\",\n \"type\": \"number[]\"\n },\n {\n \"start\": 2,\n \"name\": \"size\",\n \"type\": \"number[]\"\n }\n ]\n },\n {\n \"tfOpName\": \"StridedSlice\",\n \"category\": \"slice_join\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"begin\",\n \"type\": \"number[]\"\n },\n {\n \"start\": 2,\n \"name\": \"end\",\n \"type\": \"number[]\"\n },\n {\n \"start\": 3,\n \"name\": \"strides\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"begin_mask\",\n \"name\": \"beginMask\",\n \"type\": \"number\",\n \"defaultValue\": 0\n },\n {\n \"tfName\": \"end_mask\",\n \"name\": \"endMask\",\n \"type\": \"number\",\n \"defaultValue\": 0\n },\n {\n \"tfName\": \"new_axis_mask\",\n \"name\": \"newAxisMask\",\n \"type\": \"number\",\n \"defaultValue\": 0\n },\n {\n \"tfName\": \"ellipsis_mask\",\n \"name\": \"ellipsisMask\",\n \"type\": \"number\",\n \"defaultValue\": 0\n },\n {\n \"tfName\": \"shrink_axis_mask\",\n \"name\": \"shrinkAxisMask\",\n \"type\": \"number\",\n \"defaultValue\": 0\n }\n ]\n },\n {\n \"tfOpName\": \"Pack\",\n \"category\": \"slice_join\",\n \"inputs\": [\n {\n \"start\": 0,\n \"end\": 0,\n \"name\": \"tensors\",\n \"type\": \"tensors\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"axis\",\n \"name\": \"axis\",\n \"type\": \"number\",\n \"defaultValue\": 0\n }\n ]\n },\n {\n \"tfOpName\": \"Unpack\",\n \"category\": \"slice_join\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"tensor\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"axis\",\n \"name\": \"axis\",\n \"type\": \"number\",\n \"defaultValue\": 0\n },\n {\n \"tfName\": \"num\",\n \"name\": \"num\",\n \"type\": \"number\",\n \"defaultValue\": 0,\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"Tile\",\n \"category\": \"slice_join\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"reps\",\n \"type\": \"number[]\"\n }\n ]\n },\n {\n \"tfOpName\": \"Split\",\n \"category\": \"slice_join\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"axis\",\n \"type\": \"number\",\n \"defaultValue\": 0\n },\n {\n \"start\": 1,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"num_split\",\n \"name\": \"numOrSizeSplits\",\n \"type\": \"number\",\n \"defaultValue\": 1\n }\n ]\n },\n {\n \"tfOpName\": \"SplitV\",\n \"category\": \"slice_join\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"numOrSizeSplits\",\n \"type\": \"number[]\"\n },\n {\n \"start\": 2,\n \"name\": \"axis\",\n \"type\": \"number\",\n \"defaultValue\": 0\n }\n ]\n },\n {\n \"tfOpName\": \"ScatterNd\",\n \"category\": \"slice_join\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"indices\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"values\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"name\": \"shape\",\n \"type\": \"number[]\"\n }\n ]\n },\n {\n \"tfOpName\": \"GatherNd\",\n \"category\": \"slice_join\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"indices\",\n \"type\": \"tensor\"\n }\n ]\n },\n {\n \"tfOpName\": \"SparseToDense\",\n \"category\": \"slice_join\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"sparseIndices\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"outputShape\",\n \"type\": \"number[]\"\n },\n {\n \"start\": 2,\n \"name\": \"sparseValues\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 3,\n \"name\": \"defaultValue\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"validate_indices\",\n \"name\": \"validateIndices\",\n \"type\": \"bool\",\n \"defaultValue\": false,\n \"notSupported\": true\n }\n ]\n }\n];\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/sparse.js\nvar sparse_exports = {};\n__export(sparse_exports, {\n json: () => json16\n});\nvar json16 = [\n {\n \"tfOpName\": \"SparseFillEmptyRows\",\n \"category\": \"sparse\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"indices\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"values\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"name\": \"denseShape\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 3,\n \"name\": \"defaultValue\",\n \"type\": \"tensor\"\n }\n ]\n },\n {\n \"tfOpName\": \"SparseReshape\",\n \"category\": \"sparse\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"inputIndices\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"inputShape\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"name\": \"newShape\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"T\",\n \"name\": \"dtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"SparseSegmentMean\",\n \"category\": \"sparse\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"data\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"indices\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"name\": \"segmentIds\",\n \"type\": \"tensor\"\n }\n ]\n },\n {\n \"tfOpName\": \"SparseSegmentSum\",\n \"category\": \"sparse\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"data\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"indices\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 2,\n \"name\": \"segmentIds\",\n \"type\": \"tensor\"\n }\n ]\n }\n];\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/spectral.js\nvar spectral_exports = {};\n__export(spectral_exports, {\n json: () => json17\n});\nvar json17 = [\n {\n \"tfOpName\": \"FFT\",\n \"category\": \"spectral\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ]\n },\n {\n \"tfOpName\": \"IFFT\",\n \"category\": \"spectral\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ]\n },\n {\n \"tfOpName\": \"RFFT\",\n \"category\": \"spectral\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"fft_length\",\n \"type\": \"number\",\n \"notSupported\": true\n }\n ]\n },\n {\n \"tfOpName\": \"IRFFT\",\n \"category\": \"spectral\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"fft_length\",\n \"type\": \"number\",\n \"notSupported\": true\n }\n ]\n }\n];\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/string.js\nvar string_exports = {};\n__export(string_exports, {\n json: () => json18\n});\nvar json18 = [\n {\n \"tfOpName\": \"StringNGrams\",\n \"category\": \"string\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"data\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"dataSplits\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"separator\",\n \"name\": \"separator\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"ngram_widths\",\n \"name\": \"nGramWidths\",\n \"type\": \"number[]\"\n },\n {\n \"tfName\": \"left_pad\",\n \"name\": \"leftPad\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"right_pad\",\n \"name\": \"rightPad\",\n \"type\": \"string\"\n },\n {\n \"tfName\": \"pad_width\",\n \"name\": \"padWidth\",\n \"type\": \"number\"\n },\n {\n \"tfName\": \"preserve_short_sequences\",\n \"name\": \"preserveShortSequences\",\n \"type\": \"bool\"\n }\n ],\n \"outputs\": [\n \"ngrams\",\n \"ngrams_splits\"\n ]\n },\n {\n \"tfOpName\": \"StringSplit\",\n \"category\": \"string\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"input\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"delimiter\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"skip_empty\",\n \"name\": \"skipEmpty\",\n \"type\": \"bool\"\n }\n ],\n \"outputs\": [\n \"indices\",\n \"values\",\n \"shape\"\n ]\n },\n {\n \"tfOpName\": \"StringToHashBucketFast\",\n \"category\": \"string\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"input\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"num_buckets\",\n \"name\": \"numBuckets\",\n \"type\": \"number\"\n }\n ]\n }\n];\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/transformation.js\nvar transformation_exports = {};\n__export(transformation_exports, {\n json: () => json19\n});\nvar json19 = [\n {\n \"tfOpName\": \"Cast\",\n \"category\": \"transformation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"SrcT\",\n \"name\": \"sdtype\",\n \"type\": \"dtype\",\n \"notSupported\": true\n },\n {\n \"tfName\": \"DstT\",\n \"name\": \"dtype\",\n \"type\": \"dtype\"\n }\n ]\n },\n {\n \"tfOpName\": \"ExpandDims\",\n \"category\": \"transformation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"axis\",\n \"type\": \"number\"\n }\n ]\n },\n {\n \"tfOpName\": \"MirrorPad\",\n \"category\": \"transformation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"padding\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"mode\",\n \"name\": \"mode\",\n \"type\": \"string\"\n }\n ]\n },\n {\n \"tfOpName\": \"Pad\",\n \"category\": \"transformation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"padding\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"constant_value\",\n \"name\": \"constantValue\",\n \"type\": \"number\",\n \"defaultValue\": 0\n }\n ]\n },\n {\n \"tfOpName\": \"PadV2\",\n \"category\": \"transformation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"padding\",\n \"type\": \"number[]\"\n },\n {\n \"start\": 2,\n \"name\": \"constantValue\",\n \"type\": \"number\",\n \"defaultValue\": 0\n }\n ]\n },\n {\n \"tfOpName\": \"Reshape\",\n \"category\": \"transformation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"shape\",\n \"type\": \"number[]\"\n }\n ]\n },\n {\n \"tfOpName\": \"Squeeze\",\n \"category\": \"transformation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"axis\",\n \"tfDeprecatedName\": \"squeeze_dims\",\n \"name\": \"axis\",\n \"type\": \"number[]\"\n }\n ]\n },\n {\n \"tfOpName\": \"SpaceToBatchND\",\n \"category\": \"transformation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"blockShape\",\n \"type\": \"number[]\"\n },\n {\n \"start\": 2,\n \"name\": \"paddings\",\n \"type\": \"number[]\"\n }\n ]\n },\n {\n \"tfOpName\": \"BatchToSpaceND\",\n \"category\": \"transformation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"blockShape\",\n \"type\": \"number[]\"\n },\n {\n \"start\": 2,\n \"name\": \"crops\",\n \"type\": \"number[]\"\n }\n ]\n },\n {\n \"tfOpName\": \"DepthToSpace\",\n \"category\": \"transformation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": [\n {\n \"tfName\": \"block_size\",\n \"name\": \"blockSize\",\n \"type\": \"number\"\n },\n {\n \"tfName\": \"data_format\",\n \"name\": \"dataFormat\",\n \"type\": \"string\"\n }\n ]\n },\n {\n \"tfOpName\": \"BroadcastTo\",\n \"category\": \"transformation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"x\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"shape\",\n \"type\": \"number[]\"\n }\n ],\n \"attrs\": []\n },\n {\n \"tfOpName\": \"BroadcastArgs\",\n \"category\": \"transformation\",\n \"inputs\": [\n {\n \"start\": 0,\n \"name\": \"s0\",\n \"type\": \"tensor\"\n },\n {\n \"start\": 1,\n \"name\": \"s1\",\n \"type\": \"tensor\"\n }\n ],\n \"attrs\": []\n }\n];\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/operation_mapper.js\nvar OperationMapper = class {\n static get Instance() {\n return this._instance || (this._instance = new this());\n }\n constructor() {\n const ops = [\n arithmetic_exports,\n basic_math_exports,\n control_exports,\n convolution_exports,\n creation_exports,\n dynamic_exports,\n evaluation_exports,\n graph_exports,\n hash_table_exports,\n image_exports,\n logical_exports,\n matrices_exports,\n normalization_exports,\n reduction_exports,\n slice_join_exports,\n sparse_exports,\n spectral_exports,\n string_exports,\n transformation_exports\n ];\n const mappersJson = [].concat(...ops.map((op2) => op2.json));\n this.opMappers = mappersJson.reduce((map, mapper) => {\n map[mapper.tfOpName] = mapper;\n return map;\n }, {});\n }\n transformGraph(graph, signature = {}) {\n const tfNodes = graph.node;\n const placeholders = [];\n const weights = [];\n const initNodes = [];\n const nodes = tfNodes.reduce((map, node) => {\n map[node.name] = this.mapNode(node);\n if (node.op.startsWith(\"Placeholder\")) {\n placeholders.push(map[node.name]);\n } else if (node.op === \"Const\") {\n weights.push(map[node.name]);\n } else if (node.input == null || node.input.length === 0) {\n initNodes.push(map[node.name]);\n }\n return map;\n }, {});\n let inputs = [];\n const outputs = [];\n let inputNodeNameToKey = {};\n let outputNodeNameToKey = {};\n if (signature != null) {\n inputNodeNameToKey = this.mapSignatureEntries(signature.inputs);\n outputNodeNameToKey = this.mapSignatureEntries(signature.outputs);\n }\n const allNodes = Object.keys(nodes);\n allNodes.forEach((key) => {\n const node = nodes[key];\n node.inputNames.forEach((name, index) => {\n const [nodeName, , outputName] = getNodeNameAndIndex(name);\n const inputNode = nodes[nodeName];\n if (inputNode.outputs != null) {\n const outputIndex = inputNode.outputs.indexOf(outputName);\n if (outputIndex !== -1) {\n const inputName = `${nodeName}:${outputIndex}`;\n node.inputNames[index] = inputName;\n }\n }\n node.inputs.push(inputNode);\n inputNode.children.push(node);\n });\n });\n if (Object.keys(outputNodeNameToKey).length === 0) {\n allNodes.forEach((key) => {\n const node = nodes[key];\n if (node.children.length === 0) {\n outputs.push(node);\n }\n });\n } else {\n Object.keys(outputNodeNameToKey).forEach((name) => {\n const [nodeName] = getNodeNameAndIndex(name);\n const node = nodes[nodeName];\n if (node != null) {\n node.signatureKey = outputNodeNameToKey[name];\n outputs.push(node);\n }\n });\n }\n if (Object.keys(inputNodeNameToKey).length > 0) {\n Object.keys(inputNodeNameToKey).forEach((name) => {\n const [nodeName] = getNodeNameAndIndex(name);\n const node = nodes[nodeName];\n if (node) {\n node.signatureKey = inputNodeNameToKey[name];\n inputs.push(node);\n }\n });\n } else {\n inputs = placeholders;\n }\n let functions = {};\n if (graph.library != null && graph.library.function != null) {\n functions = graph.library.function.reduce((functions2, func2) => {\n functions2[func2.signature.name] = this.mapFunction(func2);\n return functions2;\n }, {});\n }\n const result = { nodes, inputs, outputs, weights, placeholders, signature, functions };\n if (initNodes.length > 0) {\n result.initNodes = initNodes;\n }\n return result;\n }\n mapSignatureEntries(entries) {\n return Object.keys(entries || {}).reduce((prev, curr) => {\n prev[entries[curr].name] = curr;\n return prev;\n }, {});\n }\n mapNode(node) {\n const mapper = getRegisteredOp(node.op) || this.opMappers[node.op] || {};\n if (node.attr == null) {\n node.attr = {};\n }\n const newNode = {\n name: node.name,\n op: node.op,\n category: mapper.category,\n inputNames: (node.input || []).map((input2) => input2.startsWith(\"^\") ? input2.slice(1) : input2),\n inputs: [],\n children: [],\n inputParams: {},\n attrParams: {},\n rawAttrs: node.attr,\n outputs: mapper.outputs\n };\n if (mapper.inputs != null) {\n newNode.inputParams = mapper.inputs.reduce((map, param) => {\n map[param.name] = {\n type: param.type,\n inputIndexStart: param.start,\n inputIndexEnd: param.end\n };\n return map;\n }, {});\n }\n if (mapper.attrs != null) {\n newNode.attrParams = mapper.attrs.reduce((map, param) => {\n const type = param.type;\n let value = void 0;\n switch (param.type) {\n case \"string\":\n value = getStringParam(node.attr, param.tfName, param.defaultValue);\n if (value === void 0 && !!param.tfDeprecatedName) {\n value = getStringParam(node.attr, param.tfDeprecatedName, param.defaultValue);\n }\n break;\n case \"string[]\":\n value = getStringArrayParam(node.attr, param.tfName, param.defaultValue);\n if (value === void 0 && !!param.tfDeprecatedName) {\n value = getStringArrayParam(node.attr, param.tfDeprecatedName, param.defaultValue);\n }\n break;\n case \"number\":\n value = getNumberParam(node.attr, param.tfName, param.defaultValue || 0);\n if (value === void 0 && !!param.tfDeprecatedName) {\n value = getNumberParam(node.attr, param.tfDeprecatedName, param.defaultValue);\n }\n break;\n case \"number[]\":\n value = getNumericArrayParam(node.attr, param.tfName, param.defaultValue);\n if (value === void 0 && !!param.tfDeprecatedName) {\n value = getNumericArrayParam(node.attr, param.tfDeprecatedName, param.defaultValue);\n }\n break;\n case \"bool\":\n value = getBoolParam(node.attr, param.tfName, param.defaultValue);\n if (value === void 0 && !!param.tfDeprecatedName) {\n value = getBoolParam(node.attr, param.tfDeprecatedName, param.defaultValue);\n }\n break;\n case \"bool[]\":\n value = getBoolArrayParam(node.attr, param.tfName, param.defaultValue);\n if (value === void 0 && !!param.tfDeprecatedName) {\n value = getBoolArrayParam(node.attr, param.tfDeprecatedName, param.defaultValue);\n }\n break;\n case \"shape\":\n value = getTensorShapeParam(node.attr, param.tfName, param.defaultValue);\n if (value === void 0 && !!param.tfDeprecatedName) {\n value = getTensorShapeParam(node.attr, param.tfDeprecatedName, param.defaultValue);\n }\n break;\n case \"shape[]\":\n value = getTensorShapeArrayParam(node.attr, param.tfName, param.defaultValue);\n if (value === void 0 && !!param.tfDeprecatedName) {\n value = getTensorShapeArrayParam(node.attr, param.tfDeprecatedName, param.defaultValue);\n }\n break;\n case \"dtype\":\n value = getDtypeParam(node.attr, param.tfName, param.defaultValue);\n if (value === void 0 && !!param.tfDeprecatedName) {\n value = getDtypeParam(node.attr, param.tfDeprecatedName, param.defaultValue);\n }\n break;\n case \"dtype[]\":\n value = getDtypeArrayParam(node.attr, param.tfName, param.defaultValue);\n if (value === void 0 && !!param.tfDeprecatedName) {\n value = getDtypeArrayParam(node.attr, param.tfDeprecatedName, param.defaultValue);\n }\n break;\n case \"func\":\n value = getFuncParam(node.attr, param.tfName, param.defaultValue);\n if (value === void 0 && !!param.tfDeprecatedName) {\n value = getFuncParam(node.attr, param.tfDeprecatedName, param.defaultValue);\n }\n break;\n case \"tensor\":\n case \"tensors\":\n break;\n default:\n throw new Error(`Unsupported param type: ${param.type} for op: ${node.op}`);\n }\n map[param.name] = { value, type };\n return map;\n }, {});\n }\n return newNode;\n }\n mapFunction(functionDef) {\n const tfNodes = functionDef.nodeDef;\n const placeholders = [];\n const weights = [];\n let nodes = {};\n if (tfNodes != null) {\n nodes = tfNodes.reduce((map, node) => {\n map[node.name] = this.mapNode(node);\n if (node.op === \"Const\") {\n weights.push(map[node.name]);\n }\n return map;\n }, {});\n }\n const inputs = [];\n const outputs = [];\n functionDef.signature.inputArg.forEach((arg) => {\n const [nodeName] = getNodeNameAndIndex(arg.name);\n const node = {\n name: nodeName,\n op: \"Placeholder\",\n inputs: [],\n inputNames: [],\n category: \"graph\",\n inputParams: {},\n attrParams: { dtype: { value: parseDtypeParam(arg.type), type: \"dtype\" } },\n children: []\n };\n node.signatureKey = arg.name;\n inputs.push(node);\n nodes[nodeName] = node;\n });\n const allNodes = Object.keys(nodes);\n allNodes.forEach((key) => {\n const node = nodes[key];\n node.inputNames.forEach((name, index) => {\n const [nodeName, , outputName] = getNodeNameAndIndex(name);\n const inputNode = nodes[nodeName];\n if (inputNode.outputs != null) {\n const outputIndex = inputNode.outputs.indexOf(outputName);\n if (outputIndex !== -1) {\n const inputName = `${nodeName}:${outputIndex}`;\n node.inputNames[index] = inputName;\n }\n }\n node.inputs.push(inputNode);\n inputNode.children.push(node);\n });\n });\n const returnNodeMap = functionDef.ret;\n functionDef.signature.outputArg.forEach((output) => {\n const [nodeName, index] = getNodeNameAndIndex(returnNodeMap[output.name]);\n const node = nodes[nodeName];\n if (node != null) {\n node.defaultOutput = index;\n outputs.push(node);\n }\n });\n const signature = this.mapArgsToSignature(functionDef);\n return { nodes, inputs, outputs, weights, placeholders, signature };\n }\n mapArgsToSignature(functionDef) {\n return {\n methodName: functionDef.signature.name,\n inputs: functionDef.signature.inputArg.reduce((map, arg) => {\n map[arg.name] = this.mapArgToTensorInfo(arg);\n return map;\n }, {}),\n outputs: functionDef.signature.outputArg.reduce((map, arg) => {\n map[arg.name] = this.mapArgToTensorInfo(arg, functionDef.ret);\n return map;\n }, {})\n };\n }\n mapArgToTensorInfo(arg, nameMap2) {\n let name = arg.name;\n if (nameMap2 != null) {\n name = nameMap2[name];\n }\n return { name, dtype: arg.type };\n }\n};\nfunction decodeBase64(text) {\n const global2 = env().global;\n if (typeof global2.atob !== \"undefined\") {\n return global2.atob(text);\n } else if (typeof Buffer !== \"undefined\") {\n return new Buffer(text, \"base64\").toString();\n } else {\n throw new Error(\"Unable to decode base64 in this environment. Missing built-in atob() or Buffer()\");\n }\n}\nfunction parseStringParam(s2, keepCase) {\n const value = Array.isArray(s2) ? String.fromCharCode.apply(null, s2) : decodeBase64(s2);\n return keepCase ? value : value.toLowerCase();\n}\nfunction getStringParam(attrs, name, def, keepCase = false) {\n const param = attrs[name];\n if (param != null) {\n return parseStringParam(param.s, keepCase);\n }\n return def;\n}\nfunction getBoolParam(attrs, name, def) {\n const param = attrs[name];\n return param ? param.b : def;\n}\nfunction getNumberParam(attrs, name, def) {\n const param = attrs[name] || {};\n const value = param[\"i\"] != null ? param[\"i\"] : param[\"f\"] != null ? param[\"f\"] : def;\n return typeof value === \"number\" ? value : parseInt(value, 10);\n}\nfunction parseDtypeParam(value) {\n if (typeof value === \"string\") {\n value = DataType[value];\n }\n switch (value) {\n case DataType.DT_FLOAT:\n case DataType.DT_HALF:\n return \"float32\";\n case DataType.DT_INT32:\n case DataType.DT_INT64:\n case DataType.DT_INT8:\n case DataType.DT_UINT8:\n return \"int32\";\n case DataType.DT_BOOL:\n return \"bool\";\n case DataType.DT_DOUBLE:\n return \"float32\";\n case DataType.DT_STRING:\n return \"string\";\n default:\n return null;\n }\n}\nfunction getFuncParam(attrs, name, def) {\n const param = attrs[name];\n if (param && param.func) {\n return param.func.name;\n }\n return def;\n}\nfunction getDtypeParam(attrs, name, def) {\n const param = attrs[name];\n if (param && param.type) {\n return parseDtypeParam(param.type);\n }\n return def;\n}\nfunction getDtypeArrayParam(attrs, name, def) {\n const param = attrs[name];\n if (param && param.list && param.list.type) {\n return param.list.type.map((v) => parseDtypeParam(v));\n }\n return def;\n}\nfunction parseTensorShapeParam(shape) {\n if (shape.unknownRank) {\n return void 0;\n }\n if (shape.dim != null) {\n return shape.dim.map((dim) => typeof dim.size === \"number\" ? dim.size : parseInt(dim.size, 10));\n }\n return [];\n}\nfunction getTensorShapeParam(attrs, name, def) {\n const param = attrs[name];\n if (param && param.shape) {\n return parseTensorShapeParam(param.shape);\n }\n return def;\n}\nfunction getNumericArrayParam(attrs, name, def) {\n const param = attrs[name];\n if (param) {\n return ((param.list.f && param.list.f.length ? param.list.f : param.list.i) || []).map((v) => typeof v === \"number\" ? v : parseInt(v, 10));\n }\n return def;\n}\nfunction getStringArrayParam(attrs, name, def, keepCase = false) {\n const param = attrs[name];\n if (param && param.list && param.list.s) {\n return param.list.s.map((v) => {\n return parseStringParam(v, keepCase);\n });\n }\n return def;\n}\nfunction getTensorShapeArrayParam(attrs, name, def) {\n const param = attrs[name];\n if (param && param.list && param.list.shape) {\n return param.list.shape.map((v) => {\n return parseTensorShapeParam(v);\n });\n }\n return def;\n}\nfunction getBoolArrayParam(attrs, name, def) {\n const param = attrs[name];\n if (param && param.list && param.list.b) {\n return param.list.b;\n }\n return def;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/custom_op/node_value_impl.js\nvar NodeValueImpl = class {\n constructor(node, tensorMap, context) {\n this.node = node;\n this.tensorMap = tensorMap;\n this.context = context;\n this.inputs = [];\n this.attrs = {};\n this.inputs = node.inputNames.map((name) => this.getInput(name));\n if (node.rawAttrs != null) {\n this.attrs = Object.keys(node.rawAttrs).reduce((attrs, key) => {\n attrs[key] = this.getAttr(key);\n return attrs;\n }, {});\n }\n }\n getInput(name) {\n return getTensor(name, this.tensorMap, this.context);\n }\n getAttr(name, defaultValue) {\n const value = this.node.rawAttrs[name];\n if (value.tensor != null) {\n return getTensor(name, this.tensorMap, this.context);\n }\n if (value.i != null || value.f != null) {\n return getNumberParam(this.node.rawAttrs, name, defaultValue);\n }\n if (value.s != null) {\n return getStringParam(this.node.rawAttrs, name, defaultValue);\n }\n if (value.b != null) {\n return getBoolParam(this.node.rawAttrs, name, defaultValue);\n }\n if (value.shape != null) {\n return getTensorShapeParam(this.node.rawAttrs, name, defaultValue);\n }\n if (value.type != null) {\n return getDtypeParam(this.node.rawAttrs, name, defaultValue);\n }\n if (value.list != null) {\n if (value.list.i != null || value.list.f != null) {\n return getNumericArrayParam(this.node.rawAttrs, name, defaultValue);\n }\n if (value.list.s != null) {\n return getStringArrayParam(this.node.rawAttrs, name, defaultValue);\n }\n if (value.list.shape != null) {\n return getTensorShapeArrayParam(this.node.rawAttrs, name, defaultValue);\n }\n if (value.list.b != null) {\n return getBoolArrayParam(this.node.rawAttrs, name, defaultValue);\n }\n if (value.list.type != null) {\n return getDtypeArrayParam(this.node.rawAttrs, name, defaultValue);\n }\n }\n return defaultValue;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/ops_for_converter.js\nvar ops_for_converter_exports = {};\n__export(ops_for_converter_exports, {\n OP_SCOPE_SUFFIX: () => OP_SCOPE_SUFFIX,\n abs: () => abs,\n acos: () => acos,\n acosh: () => acosh,\n add: () => add2,\n addN: () => addN,\n all: () => all,\n any: () => any,\n argMax: () => argMax,\n argMin: () => argMin,\n asin: () => asin,\n asinh: () => asinh,\n atan: () => atan,\n atan2: () => atan2,\n atanh: () => atanh,\n avgPool: () => avgPool,\n avgPool3d: () => avgPool3d,\n basicLSTMCell: () => basicLSTMCell,\n batchNorm: () => batchNorm,\n batchNorm2d: () => batchNorm2d,\n batchNorm3d: () => batchNorm3d,\n batchNorm4d: () => batchNorm4d,\n batchToSpaceND: () => batchToSpaceND,\n bincount: () => bincount,\n booleanMaskAsync: () => booleanMaskAsync,\n broadcastArgs: () => broadcastArgs,\n broadcastTo: () => broadcastTo,\n buffer: () => buffer,\n cast: () => cast,\n ceil: () => ceil,\n clipByValue: () => clipByValue,\n clone: () => clone,\n complex: () => complex,\n concat: () => concat,\n concat1d: () => concat1d,\n concat2d: () => concat2d,\n concat3d: () => concat3d,\n concat4d: () => concat4d,\n conv1d: () => conv1d,\n conv2d: () => conv2d,\n conv2dTranspose: () => conv2dTranspose,\n conv3d: () => conv3d,\n conv3dTranspose: () => conv3dTranspose,\n cos: () => cos,\n cosh: () => cosh,\n cosineWindow: () => cosineWindow,\n cumprod: () => cumprod,\n cumsum: () => cumsum,\n denseBincount: () => denseBincount,\n depthToSpace: () => depthToSpace,\n depthwiseConv2d: () => depthwiseConv2d,\n diag: () => diag,\n dilation2d: () => dilation2d,\n div: () => div,\n divNoNan: () => divNoNan,\n dot: () => dot,\n dropout: () => dropout,\n einsum: () => einsum,\n elu: () => elu,\n enclosingPowerOfTwo: () => enclosingPowerOfTwo,\n equal: () => equal,\n erf: () => erf,\n euclideanNorm: () => euclideanNorm,\n exp: () => exp,\n expandDims: () => expandDims,\n expm1: () => expm1,\n eye: () => eye,\n fft: () => fft,\n fill: () => fill,\n floor: () => floor,\n floorDiv: () => floorDiv,\n fused: () => fused_ops_exports,\n gather: () => gather,\n gatherND: () => gatherND,\n greater: () => greater,\n greaterEqual: () => greaterEqual,\n ifft: () => ifft,\n imag: () => imag,\n image: () => image,\n inTopKAsync: () => inTopKAsync,\n irfft: () => irfft,\n isFinite: () => isFinite2,\n isInf: () => isInf,\n isNaN: () => isNaN2,\n leakyRelu: () => leakyRelu,\n less: () => less,\n lessEqual: () => lessEqual,\n linalg: () => linalg,\n linspace: () => linspace,\n localResponseNormalization: () => localResponseNormalization,\n log: () => log2,\n log1p: () => log1p,\n logSigmoid: () => logSigmoid,\n logSoftmax: () => logSoftmax,\n logSumExp: () => logSumExp,\n logicalAnd: () => logicalAnd,\n logicalNot: () => logicalNot,\n logicalOr: () => logicalOr,\n logicalXor: () => logicalXor,\n losses: () => losses,\n lowerBound: () => lowerBound,\n matMul: () => matMul,\n max: () => max,\n maxPool: () => maxPool,\n maxPool3d: () => maxPool3d,\n maxPoolWithArgmax: () => maxPoolWithArgmax,\n maximum: () => maximum,\n mean: () => mean,\n meshgrid: () => meshgrid,\n min: () => min,\n minimum: () => minimum,\n mirrorPad: () => mirrorPad,\n mod: () => mod,\n moments: () => moments,\n movingAverage: () => movingAverage,\n mul: () => mul,\n multiRNNCell: () => multiRNNCell,\n multinomial: () => multinomial,\n neg: () => neg,\n norm: () => norm,\n notEqual: () => notEqual,\n oneHot: () => oneHot,\n ones: () => ones2,\n onesLike: () => onesLike,\n op: () => op,\n outerProduct: () => outerProduct,\n pad: () => pad,\n pad1d: () => pad1d,\n pad2d: () => pad2d,\n pad3d: () => pad3d,\n pad4d: () => pad4d,\n pool: () => pool,\n pow: () => pow,\n prelu: () => prelu,\n print: () => print,\n prod: () => prod,\n raggedGather: () => raggedGather,\n raggedTensorToTensor: () => raggedTensorToTensor,\n rand: () => rand,\n randomGamma: () => randomGamma,\n randomNormal: () => randomNormal,\n randomStandardNormal: () => randomStandardNormal,\n randomUniform: () => randomUniform,\n range: () => range,\n real: () => real,\n reciprocal: () => reciprocal,\n relu: () => relu,\n relu6: () => relu6,\n reshape: () => reshape,\n reverse: () => reverse,\n reverse1d: () => reverse1d,\n reverse2d: () => reverse2d,\n reverse3d: () => reverse3d,\n reverse4d: () => reverse4d,\n rfft: () => rfft,\n round: () => round2,\n rsqrt: () => rsqrt,\n scalar: () => scalar,\n scatterND: () => scatterND,\n searchSorted: () => searchSorted,\n selu: () => selu,\n separableConv2d: () => separableConv2d,\n setdiff1dAsync: () => setdiff1dAsync,\n sigmoid: () => sigmoid,\n sign: () => sign,\n signal: () => signal,\n sin: () => sin,\n sinh: () => sinh,\n slice: () => slice,\n slice1d: () => slice1d,\n slice2d: () => slice2d,\n slice3d: () => slice3d,\n slice4d: () => slice4d,\n softmax: () => softmax,\n softplus: () => softplus,\n spaceToBatchND: () => spaceToBatchND,\n sparse: () => sparse,\n sparseToDense: () => sparseToDense,\n spectral: () => spectral,\n split: () => split,\n sqrt: () => sqrt,\n square: () => square,\n squaredDifference: () => squaredDifference,\n squeeze: () => squeeze,\n stack: () => stack,\n step: () => step,\n stridedSlice: () => stridedSlice,\n string: () => string,\n sub: () => sub,\n sum: () => sum2,\n tan: () => tan,\n tanh: () => tanh2,\n tensor: () => tensor,\n tensor1d: () => tensor1d,\n tensor2d: () => tensor2d,\n tensor3d: () => tensor3d,\n tensor4d: () => tensor4d,\n tensor5d: () => tensor5d,\n tensor6d: () => tensor6d,\n tile: () => tile,\n topk: () => topk,\n transpose: () => transpose,\n truncatedNormal: () => truncatedNormal,\n unique: () => unique,\n unsortedSegmentSum: () => unsortedSegmentSum,\n unstack: () => unstack,\n upperBound: () => upperBound,\n variable: () => variable,\n where: () => where,\n whereAsync: () => whereAsync,\n zeros: () => zeros,\n zerosLike: () => zerosLike\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/arithmetic_executor.js\nvar executeOp = (node, tensorMap, context, ops = ops_for_converter_exports) => {\n switch (node.op) {\n case \"BiasAdd\":\n case \"AddV2\":\n case \"Add\": {\n return [ops.add(getParamValue(\"a\", node, tensorMap, context), getParamValue(\"b\", node, tensorMap, context))];\n }\n case \"AddN\": {\n return [ops.addN(getParamValue(\"tensors\", node, tensorMap, context))];\n }\n case \"FloorMod\":\n case \"Mod\":\n return [ops.mod(getParamValue(\"a\", node, tensorMap, context), getParamValue(\"b\", node, tensorMap, context))];\n case \"Mul\":\n return [ops.mul(getParamValue(\"a\", node, tensorMap, context), getParamValue(\"b\", node, tensorMap, context))];\n case \"RealDiv\":\n case \"Div\": {\n return [ops.div(getParamValue(\"a\", node, tensorMap, context), getParamValue(\"b\", node, tensorMap, context))];\n }\n case \"DivNoNan\": {\n return [ops.divNoNan(getParamValue(\"a\", node, tensorMap, context), getParamValue(\"b\", node, tensorMap, context))];\n }\n case \"FloorDiv\": {\n return [ops.floorDiv(getParamValue(\"a\", node, tensorMap, context), getParamValue(\"b\", node, tensorMap, context))];\n }\n case \"Sub\": {\n return [ops.sub(getParamValue(\"a\", node, tensorMap, context), getParamValue(\"b\", node, tensorMap, context))];\n }\n case \"Minimum\": {\n return [ops.minimum(getParamValue(\"a\", node, tensorMap, context), getParamValue(\"b\", node, tensorMap, context))];\n }\n case \"Maximum\": {\n return [ops.maximum(getParamValue(\"a\", node, tensorMap, context), getParamValue(\"b\", node, tensorMap, context))];\n }\n case \"Pow\": {\n return [ops.pow(getParamValue(\"a\", node, tensorMap, context), getParamValue(\"b\", node, tensorMap, context))];\n }\n case \"SquaredDifference\": {\n return [ops.squaredDifference(getParamValue(\"a\", node, tensorMap, context), getParamValue(\"b\", node, tensorMap, context))];\n }\n default:\n throw TypeError(`Node type ${node.op} is not implemented`);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/basic_math_executor.js\nvar executeOp2 = (node, tensorMap, context, ops = ops_for_converter_exports) => {\n switch (node.op) {\n case \"Abs\":\n case \"ComplexAbs\":\n return [ops.abs(getParamValue(\"x\", node, tensorMap, context))];\n case \"Acos\":\n return [ops.acos(getParamValue(\"x\", node, tensorMap, context))];\n case \"Acosh\":\n return [ops.acosh(getParamValue(\"x\", node, tensorMap, context))];\n case \"Asin\":\n return [ops.asin(getParamValue(\"x\", node, tensorMap, context))];\n case \"Asinh\":\n return [ops.asinh(getParamValue(\"x\", node, tensorMap, context))];\n case \"Atan\":\n return [ops.atan(getParamValue(\"x\", node, tensorMap, context))];\n case \"Atan2\":\n return [ops.atan2(getParamValue(\"x\", node, tensorMap, context), getParamValue(\"y\", node, tensorMap, context))];\n case \"Atanh\":\n return [ops.atanh(getParamValue(\"x\", node, tensorMap, context))];\n case \"Ceil\":\n return [ops.ceil(getParamValue(\"x\", node, tensorMap, context))];\n case \"Complex\":\n return [ops.complex(getParamValue(\"real\", node, tensorMap, context), getParamValue(\"imag\", node, tensorMap, context))];\n case \"Cos\":\n return [ops.cos(getParamValue(\"x\", node, tensorMap, context))];\n case \"Cosh\":\n return [ops.cosh(getParamValue(\"x\", node, tensorMap, context))];\n case \"Elu\":\n return [ops.elu(getParamValue(\"x\", node, tensorMap, context))];\n case \"Erf\":\n return [ops.erf(getParamValue(\"x\", node, tensorMap, context))];\n case \"Exp\":\n return [ops.exp(getParamValue(\"x\", node, tensorMap, context))];\n case \"Expm1\": {\n return [ops.expm1(getParamValue(\"x\", node, tensorMap, context))];\n }\n case \"Floor\":\n return [ops.floor(getParamValue(\"x\", node, tensorMap, context))];\n case \"Log\":\n return [ops.log(getParamValue(\"x\", node, tensorMap, context))];\n case \"Log1p\": {\n return [ops.log1p(getParamValue(\"x\", node, tensorMap, context))];\n }\n case \"Imag\":\n return [ops.imag(getParamValue(\"x\", node, tensorMap, context))];\n case \"Neg\":\n return [ops.neg(getParamValue(\"x\", node, tensorMap, context))];\n case \"Reciprocal\": {\n return [ops.reciprocal(getParamValue(\"x\", node, tensorMap, context))];\n }\n case \"Real\":\n return [ops.real(getParamValue(\"x\", node, tensorMap, context))];\n case \"Relu\":\n return [ops.relu(getParamValue(\"x\", node, tensorMap, context))];\n case \"Round\": {\n return [ops.round(getParamValue(\"x\", node, tensorMap, context))];\n }\n case \"Selu\":\n return [ops.selu(getParamValue(\"x\", node, tensorMap, context))];\n case \"Sigmoid\":\n return [ops.sigmoid(getParamValue(\"x\", node, tensorMap, context))];\n case \"Sin\":\n return [ops.sin(getParamValue(\"x\", node, tensorMap, context))];\n case \"Sign\": {\n return [ops.sign(getParamValue(\"x\", node, tensorMap, context))];\n }\n case \"Sinh\": {\n return [ops.sinh(getParamValue(\"x\", node, tensorMap, context))];\n }\n case \"Softplus\": {\n return [ops.softplus(getParamValue(\"x\", node, tensorMap, context))];\n }\n case \"Sqrt\": {\n return [ops.sqrt(getParamValue(\"x\", node, tensorMap, context))];\n }\n case \"Square\": {\n return [ops.square(getParamValue(\"x\", node, tensorMap, context))];\n }\n case \"Tanh\": {\n return [ops.tanh(getParamValue(\"x\", node, tensorMap, context))];\n }\n case \"Tan\":\n return [ops.tan(getParamValue(\"x\", node, tensorMap, context))];\n case \"ClipByValue\":\n return [ops.clipByValue(getParamValue(\"x\", node, tensorMap, context), getParamValue(\"clipValueMin\", node, tensorMap, context), getParamValue(\"clipValueMax\", node, tensorMap, context))];\n case \"Relu6\":\n return [ops.relu6(getParamValue(\"x\", node, tensorMap, context))];\n case \"Rsqrt\":\n return [ops.rsqrt(getTensor(node.inputNames[0], tensorMap, context))];\n case \"Prod\":\n return [ops.prod(getParamValue(\"x\", node, tensorMap, context), getParamValue(\"axes\", node, tensorMap, context))];\n case \"LeakyRelu\":\n return [ops.leakyRelu(getParamValue(\"x\", node, tensorMap, context), getParamValue(\"alpha\", node, tensorMap, context))];\n case \"Prelu\":\n return [ops.prelu(getParamValue(\"x\", node, tensorMap, context), getParamValue(\"alpha\", node, tensorMap, context))];\n case \"IsNan\":\n return [ops.isNaN(getTensor(node.inputNames[0], tensorMap, context))];\n default:\n throw TypeError(`Node type ${node.op} is not implemented`);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/executor/tensor_utils.js\nfunction assertShapesMatchAllowUndefinedSize(shapeA, shapeB, errorMessagePrefix = \"\") {\n if (typeof shapeA === \"number\" || typeof shapeB === \"number\") {\n return;\n }\n util_exports.assert(shapeA.length === shapeB.length, () => errorMessagePrefix + ` Shapes ${shapeA} and ${shapeB} must match`);\n for (let i2 = 0; i2 < shapeA.length; i2++) {\n const dim0 = shapeA[i2];\n const dim1 = shapeB[i2];\n util_exports.assert(dim0 < 0 || dim1 < 0 || dim0 === dim1, () => errorMessagePrefix + ` Shapes ${shapeA} and ${shapeB} must match`);\n }\n}\nfunction fullDefinedShape(elementShape) {\n if (typeof elementShape === \"number\" || elementShape.some((dim) => dim < 0)) {\n return false;\n }\n return true;\n}\nfunction inferElementShape(listElementShape, tensors, elementShape) {\n let partialShape = mergeElementShape(listElementShape, elementShape);\n const notfullDefinedShape = !fullDefinedShape(partialShape);\n if (notfullDefinedShape && tensors.length === 0) {\n throw new Error(`Tried to calculate elements of an empty list with non-fully-defined elementShape: ${partialShape}`);\n }\n if (notfullDefinedShape) {\n tensors.forEach((tensor2) => {\n partialShape = mergeElementShape(tensor2.shape, partialShape);\n });\n }\n if (!fullDefinedShape(partialShape)) {\n throw new Error(`Non-fully-defined elementShape: ${partialShape}`);\n }\n return partialShape;\n}\nfunction mergeElementShape(elementShapeA, elementShapeB) {\n if (typeof elementShapeA === \"number\") {\n return elementShapeB;\n }\n if (typeof elementShapeB === \"number\") {\n return elementShapeA;\n }\n if (elementShapeA.length !== elementShapeB.length) {\n throw new Error(`Incompatible ranks during merge: ${elementShapeA} vs. ${elementShapeB}`);\n }\n const result = [];\n for (let i2 = 0; i2 < elementShapeA.length; ++i2) {\n const dim0 = elementShapeA[i2];\n const dim1 = elementShapeB[i2];\n if (dim0 >= 0 && dim1 >= 0 && dim0 !== dim1) {\n throw new Error(`Incompatible shape during merge: ${elementShapeA} vs. ${elementShapeB}`);\n }\n result[i2] = dim0 >= 0 ? dim0 : dim1;\n }\n return result;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/executor/tensor_array.js\nvar TensorArray = class {\n constructor(name, dtype, maxSize, elementShape, identicalElementShapes, dynamicSize, clearAfterRead) {\n this.name = name;\n this.dtype = dtype;\n this.maxSize = maxSize;\n this.elementShape = elementShape;\n this.identicalElementShapes = identicalElementShapes;\n this.dynamicSize = dynamicSize;\n this.clearAfterRead = clearAfterRead;\n this.tensors = [];\n this.closed_ = false;\n this.idTensor = scalar(0);\n keep(this.idTensor);\n }\n get id() {\n return this.idTensor.id;\n }\n get closed() {\n return this.closed_;\n }\n clearAndClose(keepIds) {\n this.tensors.forEach((tensor2) => {\n if (keepIds == null || !keepIds.has(tensor2.tensor.id)) {\n tensor2.tensor.dispose();\n }\n });\n this.tensors = [];\n this.closed_ = true;\n this.idTensor.dispose();\n }\n size() {\n return this.tensors.length;\n }\n read(index) {\n if (this.closed_) {\n throw new Error(`TensorArray ${this.name} has already been closed.`);\n }\n if (index < 0 || index >= this.size()) {\n throw new Error(`Tried to read from index ${index}, but array size is: ${this.size()}`);\n }\n const tensorWithState = this.tensors[index];\n if (tensorWithState.cleared) {\n throw new Error(`TensorArray ${this.name}: Could not read index ${index} twice because it was cleared after a previous read (perhaps try setting clear_after_read = false?).`);\n }\n if (this.clearAfterRead) {\n tensorWithState.cleared = true;\n }\n tensorWithState.read = true;\n return tensorWithState.tensor;\n }\n readMany(indices) {\n return indices.map((index) => this.read(index));\n }\n write(index, tensor2) {\n if (this.closed_) {\n throw new Error(`TensorArray ${this.name} has already been closed.`);\n }\n if (index < 0 || !this.dynamicSize && index >= this.maxSize) {\n throw new Error(`Tried to write to index ${index}, but array is not resizeable and size is: ${this.maxSize}`);\n }\n const t2 = this.tensors[index] || {};\n if (tensor2.dtype !== this.dtype) {\n throw new Error(`TensorArray ${this.name}: Could not write to TensorArray index ${index},\n because the value dtype is ${tensor2.dtype}, but TensorArray dtype is ${this.dtype}.`);\n }\n if (this.size() === 0 && (this.elementShape == null || this.elementShape.length === 0)) {\n this.elementShape = tensor2.shape;\n }\n assertShapesMatchAllowUndefinedSize(this.elementShape, tensor2.shape, `TensorArray ${this.name}: Could not write to TensorArray index ${index}.`);\n if (t2.read) {\n throw new Error(`TensorArray ${this.name}: Could not write to TensorArray index ${index}, because it has already been read.`);\n }\n if (t2.written) {\n throw new Error(`TensorArray ${this.name}: Could not write to TensorArray index ${index}, because it has already been written.`);\n }\n t2.tensor = tensor2;\n keep(tensor2);\n t2.written = true;\n this.tensors[index] = t2;\n }\n writeMany(indices, tensors) {\n if (indices.length !== tensors.length) {\n throw new Error(`TensorArray ${this.name}: could not write multiple tensors,because the index size: ${indices.length} is not the same as tensors size: ${tensors.length}.`);\n }\n indices.forEach((i2, index) => this.write(i2, tensors[index]));\n }\n gather(indices, dtype) {\n if (!!dtype && dtype !== this.dtype) {\n throw new Error(`TensorArray dtype is ${this.dtype} but gather requested dtype ${dtype}`);\n }\n if (!indices) {\n indices = [];\n for (let i2 = 0; i2 < this.size(); i2++) {\n indices.push(i2);\n }\n } else {\n indices = indices.slice(0, this.size());\n }\n if (indices.length === 0) {\n return tensor([], [0].concat(this.elementShape));\n }\n const tensors = this.readMany(indices);\n assertShapesMatchAllowUndefinedSize(this.elementShape, tensors[0].shape, \"TensorArray shape mismatch: \");\n return stack(tensors, 0);\n }\n concat(dtype) {\n if (!!dtype && dtype !== this.dtype) {\n throw new Error(`TensorArray dtype is ${this.dtype} but concat requested dtype ${dtype}`);\n }\n if (this.size() === 0) {\n return tensor([], [0].concat(this.elementShape));\n }\n const indices = [];\n for (let i2 = 0; i2 < this.size(); i2++) {\n indices.push(i2);\n }\n const tensors = this.readMany(indices);\n assertShapesMatchAllowUndefinedSize(this.elementShape, tensors[0].shape, `TensorArray shape mismatch: tensor array shape (${this.elementShape}) vs first tensor shape (${tensors[0].shape})`);\n return concat(tensors, 0);\n }\n scatter(indices, tensor2) {\n if (tensor2.dtype !== this.dtype) {\n throw new Error(`TensorArray dtype is ${this.dtype} but tensor has dtype ${tensor2.dtype}`);\n }\n if (indices.length !== tensor2.shape[0]) {\n throw new Error(`Expected len(indices) == tensor.shape[0], but saw: ${indices.length} vs. ${tensor2.shape[0]}`);\n }\n const maxIndex = Math.max(...indices);\n if (!this.dynamicSize && maxIndex >= this.maxSize) {\n throw new Error(`Max index must be < array size (${maxIndex} vs. ${this.maxSize})`);\n }\n this.writeMany(indices, unstack(tensor2, 0));\n }\n split(length, tensor2) {\n if (tensor2.dtype !== this.dtype) {\n throw new Error(`TensorArray dtype is ${this.dtype} but tensor has dtype ${tensor2.dtype}`);\n }\n let totalLength = 0;\n const cumulativeLengths = length.map((len) => {\n totalLength += len;\n return totalLength;\n });\n if (totalLength !== tensor2.shape[0]) {\n throw new Error(`Expected sum of lengths to be equal to\n tensor.shape[0], but sum of lengths is\n ${totalLength}, and tensor's shape is: ${tensor2.shape}`);\n }\n if (!this.dynamicSize && length.length !== this.maxSize) {\n throw new Error(`TensorArray's size is not equal to the size of lengths (${this.maxSize} vs. ${length.length}), and the TensorArray is not marked as dynamically resizeable`);\n }\n const elementPerRow = totalLength === 0 ? 0 : tensor2.size / totalLength;\n const tensors = [];\n tidy(() => {\n tensor2 = reshape(tensor2, [1, totalLength, elementPerRow]);\n for (let i2 = 0; i2 < length.length; ++i2) {\n const previousLength = i2 === 0 ? 0 : cumulativeLengths[i2 - 1];\n const indices2 = [0, previousLength, 0];\n const sizes = [1, length[i2], elementPerRow];\n tensors[i2] = reshape(slice(tensor2, indices2, sizes), this.elementShape);\n }\n return tensors;\n });\n const indices = [];\n for (let i2 = 0; i2 < length.length; i2++) {\n indices[i2] = i2;\n }\n this.writeMany(indices, tensors);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/executor/tensor_list.js\nvar TensorList = class {\n constructor(tensors, elementShape, elementDtype, maxNumElements = -1) {\n this.tensors = tensors;\n this.elementShape = elementShape;\n this.elementDtype = elementDtype;\n if (tensors != null) {\n tensors.forEach((tensor2) => {\n if (elementDtype !== tensor2.dtype) {\n throw new Error(`Invalid data types; op elements ${elementDtype}, but list elements ${tensor2.dtype}`);\n }\n assertShapesMatchAllowUndefinedSize(elementShape, tensor2.shape, \"TensorList shape mismatch: \");\n keep(tensor2);\n });\n }\n this.idTensor = scalar(0);\n this.maxNumElements = maxNumElements;\n keep(this.idTensor);\n }\n get id() {\n return this.idTensor.id;\n }\n copy() {\n return new TensorList([...this.tensors], this.elementShape, this.elementDtype);\n }\n clearAndClose(keepIds) {\n this.tensors.forEach((tensor2) => {\n if (keepIds == null || !keepIds.has(tensor2.id)) {\n tensor2.dispose();\n }\n });\n this.tensors.length = 0;\n this.idTensor.dispose();\n }\n size() {\n return this.tensors.length;\n }\n stack(elementShape, elementDtype, numElements = -1) {\n if (elementDtype !== this.elementDtype) {\n throw new Error(`Invalid data types; op elements ${elementDtype}, but list elements ${this.elementDtype}`);\n }\n if (numElements !== -1 && this.tensors.length !== numElements) {\n throw new Error(`Operation expected a list with ${numElements} elements but got a list with ${this.tensors.length} elements.`);\n }\n assertShapesMatchAllowUndefinedSize(elementShape, this.elementShape, \"TensorList shape mismatch: \");\n const outputElementShape = inferElementShape(this.elementShape, this.tensors, elementShape);\n return tidy(() => {\n const reshapedTensors = this.tensors.map((tensor2) => reshape(tensor2, outputElementShape));\n return stack(reshapedTensors, 0);\n });\n }\n popBack(elementShape, elementDtype) {\n if (elementDtype !== this.elementDtype) {\n throw new Error(`Invalid data types; op elements ${elementDtype}, but list elements ${this.elementDtype}`);\n }\n if (this.size() === 0) {\n throw new Error(\"Trying to pop from an empty list.\");\n }\n const outputElementShape = inferElementShape(this.elementShape, this.tensors, elementShape);\n const tensor2 = this.tensors.pop();\n tensor2.kept = false;\n assertShapesMatchAllowUndefinedSize(tensor2.shape, elementShape, \"TensorList shape mismatch: \");\n return reshape(tensor2, outputElementShape);\n }\n pushBack(tensor2) {\n if (tensor2.dtype !== this.elementDtype) {\n throw new Error(`Invalid data types; op elements ${tensor2.dtype}, but list elements ${this.elementDtype}`);\n }\n assertShapesMatchAllowUndefinedSize(tensor2.shape, this.elementShape, \"TensorList shape mismatch: \");\n if (this.maxNumElements === this.size()) {\n throw new Error(`Trying to push element into a full list.`);\n }\n keep(tensor2);\n this.tensors.push(tensor2);\n }\n resize(size) {\n if (size < 0) {\n throw new Error(`TensorListResize expects size to be non-negative. Got: ${size}`);\n }\n if (this.maxNumElements !== -1 && size > this.maxNumElements) {\n throw new Error(`TensorListResize input size ${size} is greater maxNumElement ${this.maxNumElements}.`);\n }\n const destTensorList = new TensorList([], this.elementShape, this.elementDtype, this.maxNumElements);\n destTensorList.tensors.length = size;\n for (let i2 = 0; i2 < Math.min(this.tensors.length, size); ++i2) {\n destTensorList.tensors[i2] = this.tensors[i2];\n }\n return destTensorList;\n }\n getItem(elementIndex, elementShape, elementDtype) {\n if (elementDtype !== this.elementDtype) {\n throw new Error(`Invalid data types; op elements ${elementDtype}, but list elements ${this.elementDtype}`);\n }\n if (elementIndex < 0 || elementIndex > this.tensors.length) {\n throw new Error(`Trying to access element ${elementIndex} in a list with ${this.tensors.length} elements.`);\n }\n if (this.tensors[elementIndex] == null) {\n throw new Error(`element at index ${elementIndex} is null.`);\n }\n assertShapesMatchAllowUndefinedSize(this.tensors[elementIndex].shape, elementShape, \"TensorList shape mismatch: \");\n const outputElementShape = inferElementShape(this.elementShape, this.tensors, elementShape);\n return reshape(this.tensors[elementIndex], outputElementShape);\n }\n setItem(elementIndex, tensor2) {\n if (tensor2.dtype !== this.elementDtype) {\n throw new Error(`Invalid data types; op elements ${tensor2.dtype}, but list elements ${this.elementDtype}`);\n }\n if (elementIndex < 0 || this.maxNumElements !== -1 && elementIndex >= this.maxNumElements) {\n throw new Error(`Trying to set element ${elementIndex} in a list with max ${this.maxNumElements} elements.`);\n }\n assertShapesMatchAllowUndefinedSize(this.elementShape, tensor2.shape, \"TensorList shape mismatch: \");\n keep(tensor2);\n if (this.tensors[elementIndex] != null) {\n this.tensors[elementIndex].kept = false;\n }\n this.tensors[elementIndex] = tensor2;\n }\n gather(indices, elementDtype, elementShape) {\n if (elementDtype !== this.elementDtype) {\n throw new Error(`Invalid data types; op elements ${elementDtype}, but list elements ${this.elementDtype}`);\n }\n assertShapesMatchAllowUndefinedSize(this.elementShape, elementShape, \"TensorList shape mismatch: \");\n indices = indices.slice(0, this.size());\n const outputElementShape = inferElementShape(this.elementShape, this.tensors, elementShape);\n if (indices.length === 0) {\n return tensor([], [0].concat(outputElementShape));\n }\n return tidy(() => {\n const tensors = indices.map((i2) => reshape(this.tensors[i2], outputElementShape));\n return stack(tensors, 0);\n });\n }\n concat(elementDtype, elementShape) {\n if (!!elementDtype && elementDtype !== this.elementDtype) {\n throw new Error(`TensorList dtype is ${this.elementDtype} but concat requested dtype ${elementDtype}`);\n }\n assertShapesMatchAllowUndefinedSize(this.elementShape, elementShape, \"TensorList shape mismatch: \");\n const outputElementShape = inferElementShape(this.elementShape, this.tensors, elementShape);\n if (this.size() === 0) {\n return tensor([], [0].concat(outputElementShape));\n }\n return tidy(() => {\n const tensors = this.tensors.map((t2) => reshape(t2, outputElementShape));\n return concat(tensors, 0);\n });\n }\n};\nfunction fromTensor(tensor2, elementShape, elementDtype) {\n const dtype = tensor2.dtype;\n if (tensor2.shape.length < 1) {\n throw new Error(`Tensor must be at least a vector, but saw shape: ${tensor2.shape}`);\n }\n if (tensor2.dtype !== elementDtype) {\n throw new Error(`Invalid data types; op elements ${tensor2.dtype}, but list elements ${elementDtype}`);\n }\n const tensorElementShape = tensor2.shape.slice(1);\n assertShapesMatchAllowUndefinedSize(tensorElementShape, elementShape, \"TensorList shape mismatch: \");\n const tensorList = unstack(tensor2);\n return new TensorList(tensorList, elementShape, dtype);\n}\nfunction reserve(elementShape, elementDtype, numElements, maxNumElements) {\n return new TensorList([], elementShape, elementDtype, maxNumElements);\n}\nfunction scatter(tensor2, indices, elementShape, numElements) {\n if (indices.length !== tensor2.shape[0]) {\n throw new Error(`Expected len(indices) == tensor.shape[0], but saw: ${indices.length} vs. ${tensor2.shape[0]}`);\n }\n const maxIndex = Math.max(...indices);\n if (numElements != null && numElements !== -1 && maxIndex >= numElements) {\n throw new Error(`Max index must be < array size (${maxIndex} vs. ${numElements})`);\n }\n const list = new TensorList([], elementShape, tensor2.dtype, numElements);\n const tensors = unstack(tensor2, 0);\n indices.forEach((value, index) => {\n list.setItem(value, tensors[index]);\n });\n return list;\n}\nfunction split2(tensor2, length, elementShape) {\n let totalLength = 0;\n const cumulativeLengths = length.map((len) => {\n totalLength += len;\n return totalLength;\n });\n if (totalLength !== tensor2.shape[0]) {\n throw new Error(`Expected sum of lengths to be equal to\n tensor.shape[0], but sum of lengths is\n ${totalLength}, and tensor's shape is: ${tensor2.shape}`);\n }\n const shapeWithoutFirstDim = tensor2.shape.slice(1);\n const outputElementShape = mergeElementShape(shapeWithoutFirstDim, elementShape);\n const elementPerRow = totalLength === 0 ? 0 : tensor2.size / totalLength;\n const tensors = tidy(() => {\n const tensors2 = [];\n tensor2 = reshape(tensor2, [1, totalLength, elementPerRow]);\n for (let i2 = 0; i2 < length.length; ++i2) {\n const previousLength = i2 === 0 ? 0 : cumulativeLengths[i2 - 1];\n const indices = [0, previousLength, 0];\n const sizes = [1, length[i2], elementPerRow];\n tensors2[i2] = reshape(slice(tensor2, indices, sizes), outputElementShape);\n }\n tensor2.dispose();\n return tensors2;\n });\n const list = new TensorList([], elementShape, tensor2.dtype, length.length);\n for (let i2 = 0; i2 < tensors.length; i2++) {\n list.setItem(i2, tensors[i2]);\n }\n return list;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/control_executor.js\nvar executeOp3 = async (node, tensorMap, context) => {\n switch (node.op) {\n case \"If\":\n case \"StatelessIf\": {\n const thenFunc = getParamValue(\"thenBranch\", node, tensorMap, context);\n const elseFunc = getParamValue(\"elseBranch\", node, tensorMap, context);\n const cond = getParamValue(\"cond\", node, tensorMap, context);\n const args = getParamValue(\"args\", node, tensorMap, context);\n const condValue = await cond.data();\n if (condValue[0]) {\n return context.functionMap[thenFunc].executeFunctionAsync(args, context.tensorArrayMap, context.tensorListMap);\n } else {\n return context.functionMap[elseFunc].executeFunctionAsync(args, context.tensorArrayMap, context.tensorListMap);\n }\n }\n case \"While\":\n case \"StatelessWhile\": {\n const bodyFunc = getParamValue(\"body\", node, tensorMap, context);\n const condFunc = getParamValue(\"cond\", node, tensorMap, context);\n const args = getParamValue(\"args\", node, tensorMap, context);\n const condResult = await context.functionMap[condFunc].executeFunctionAsync(args, context.tensorArrayMap, context.tensorListMap);\n const argIds = args.map((tensor2) => tensor2.id);\n let condValue = await condResult[0].data();\n condResult.forEach((tensor2) => {\n if (!tensor2.kept && argIds.indexOf(tensor2.id) === -1) {\n tensor2.dispose();\n }\n });\n let result = args;\n while (condValue[0]) {\n const origResult = result;\n result = await context.functionMap[bodyFunc].executeFunctionAsync(result, context.tensorArrayMap, context.tensorListMap);\n const resultIds = result.map((tensor2) => tensor2.id);\n origResult.forEach((tensor2) => {\n if (!tensor2.kept && argIds.indexOf(tensor2.id) === -1 && resultIds.indexOf(tensor2.id) === -1) {\n tensor2.dispose();\n }\n });\n const condResult2 = await context.functionMap[condFunc].executeFunctionAsync(result, context.tensorArrayMap, context.tensorListMap);\n condValue = await condResult2[0].data();\n condResult2.forEach((tensor2) => {\n if (!tensor2.kept && argIds.indexOf(tensor2.id) === -1 && resultIds.indexOf(tensor2.id) === -1) {\n tensor2.dispose();\n }\n });\n }\n return result;\n }\n case \"LoopCond\": {\n const pred = getParamValue(\"pred\", node, tensorMap, context);\n return [cloneTensor(pred)];\n }\n case \"Switch\": {\n const pred = getParamValue(\"pred\", node, tensorMap, context);\n let data = getParamValue(\"data\", node, tensorMap, context);\n if (!data.kept) {\n data = cloneTensor(data);\n }\n return (await pred.data())[0] ? [void 0, data] : [data, void 0];\n }\n case \"Merge\": {\n const inputName = node.inputNames.find((name) => getTensor(name, tensorMap, context) !== void 0);\n if (inputName) {\n const data = getTensor(inputName, tensorMap, context);\n return [cloneTensor(data)];\n }\n return void 0;\n }\n case \"Enter\": {\n const frameId = getParamValue(\"frameName\", node, tensorMap, context);\n const data = getParamValue(\"tensor\", node, tensorMap, context);\n context.enterFrame(frameId);\n return [cloneTensor(data)];\n }\n case \"Exit\": {\n const data = getParamValue(\"tensor\", node, tensorMap, context);\n context.exitFrame();\n return [cloneTensor(data)];\n }\n case \"NextIteration\": {\n const data = getParamValue(\"tensor\", node, tensorMap, context);\n context.nextIteration();\n return [cloneTensor(data)];\n }\n case \"TensorArrayV3\": {\n const size = getParamValue(\"size\", node, tensorMap, context);\n const dtype = getParamValue(\"dtype\", node, tensorMap, context);\n const elementShape = getParamValue(\"elementShape\", node, tensorMap, context);\n const dynamicSize = getParamValue(\"dynamicSize\", node, tensorMap, context);\n const clearAfterRead = getParamValue(\"clearAfterRead\", node, tensorMap, context);\n const identicalElementShapes = getParamValue(\"identicalElementShapes\", node, tensorMap, context);\n const name = getParamValue(\"name\", node, tensorMap, context);\n const tensorArray = new TensorArray(name, dtype, size, elementShape, identicalElementShapes, dynamicSize, clearAfterRead);\n context.addTensorArray(tensorArray);\n return [tensorArray.idTensor, scalar(1)];\n }\n case \"TensorArrayWriteV3\": {\n const id = getParamValue(\"tensorArrayId\", node, tensorMap, context);\n const index = getParamValue(\"index\", node, tensorMap, context);\n const writeTensor = getParamValue(\"tensor\", node, tensorMap, context);\n const writeTensorArray = context.getTensorArray(id.id);\n writeTensorArray.write(index, writeTensor);\n return [writeTensorArray.idTensor];\n }\n case \"TensorArrayReadV3\": {\n const readId = getParamValue(\"tensorArrayId\", node, tensorMap, context);\n const readIndex = getParamValue(\"index\", node, tensorMap, context);\n const readTensorArray = context.getTensorArray(readId.id);\n return [readTensorArray.read(readIndex)];\n }\n case \"TensorArrayGatherV3\": {\n const gatherId = getParamValue(\"tensorArrayId\", node, tensorMap, context);\n const gatherIndices = getParamValue(\"indices\", node, tensorMap, context);\n const gatherDtype = getParamValue(\"dtype\", node, tensorMap, context);\n const gatherTensorArray = context.getTensorArray(gatherId.id);\n return [gatherTensorArray.gather(gatherIndices, gatherDtype)];\n }\n case \"TensorArrayScatterV3\": {\n const scatterId = getParamValue(\"tensorArrayId\", node, tensorMap, context);\n const scatterIndices = getParamValue(\"indices\", node, tensorMap, context);\n const scatterTensor = getParamValue(\"tensor\", node, tensorMap, context);\n const scatterTensorArray = context.getTensorArray(scatterId.id);\n scatterTensorArray.scatter(scatterIndices, scatterTensor);\n return [scatterTensorArray.idTensor];\n }\n case \"TensorArrayConcatV3\": {\n const concatId = getParamValue(\"tensorArrayId\", node, tensorMap, context);\n const concatTensorArray = context.getTensorArray(concatId.id);\n const concatDtype = getParamValue(\"dtype\", node, tensorMap, context);\n return [concatTensorArray.concat(concatDtype)];\n }\n case \"TensorArraySplitV3\": {\n const splitId = getParamValue(\"tensorArrayId\", node, tensorMap, context);\n const splitTensor = getParamValue(\"tensor\", node, tensorMap, context);\n const lengths = getParamValue(\"lengths\", node, tensorMap, context);\n const splitTensorArray = context.getTensorArray(splitId.id);\n splitTensorArray.split(lengths, splitTensor);\n return [splitTensorArray.idTensor];\n }\n case \"TensorArraySizeV3\": {\n const sizeId = getParamValue(\"tensorArrayId\", node, tensorMap, context);\n const sizeTensorArray = context.getTensorArray(sizeId.id);\n return [scalar(sizeTensorArray.size(), \"int32\")];\n }\n case \"TensorArrayCloseV3\": {\n const closeId = getParamValue(\"tensorArrayId\", node, tensorMap, context);\n const closeTensorArray = context.getTensorArray(closeId.id);\n closeTensorArray.clearAndClose();\n return [closeTensorArray.idTensor];\n }\n case \"TensorListSetItem\": {\n const idTensor = getParamValue(\"tensorListId\", node, tensorMap, context);\n const index = getParamValue(\"index\", node, tensorMap, context);\n const writeTensor = getParamValue(\"tensor\", node, tensorMap, context);\n const tensorList = context.getTensorList(idTensor.id);\n tensorList.setItem(index, writeTensor);\n return [tensorList.idTensor];\n }\n case \"TensorListGetItem\": {\n const idTensor = getParamValue(\"tensorListId\", node, tensorMap, context);\n const readIndex = getParamValue(\"index\", node, tensorMap, context);\n const elementShape = getParamValue(\"elementShape\", node, tensorMap, context);\n const elementDType = getParamValue(\"elementDType\", node, tensorMap, context);\n const tensorList = context.getTensorList(idTensor.id);\n return [tensorList.getItem(readIndex, elementShape, elementDType)];\n }\n case \"TensorListScatterV2\":\n case \"TensorListScatter\": {\n const scatterIndices = getParamValue(\"indices\", node, tensorMap, context);\n const scatterTensor = getParamValue(\"tensor\", node, tensorMap, context);\n const elementShape = getParamValue(\"elementShape\", node, tensorMap, context);\n const numElements = getParamValue(\"numElements\", node, tensorMap, context);\n const tensorList = scatter(scatterTensor, scatterIndices, elementShape, numElements);\n context.addTensorList(tensorList);\n return [tensorList.idTensor];\n }\n case \"TensorListReserve\":\n case \"EmptyTensorList\": {\n const elementShape = getParamValue(\"elementShape\", node, tensorMap, context);\n const elementDtype = getParamValue(\"elementDType\", node, tensorMap, context);\n let numElementsParam;\n if (node.op === \"TensorListReserve\") {\n numElementsParam = \"numElements\";\n } else {\n numElementsParam = \"maxNumElements\";\n }\n const numElements = getParamValue(numElementsParam, node, tensorMap, context);\n const maxNumElements = node.op === \"TensorListReserve\" ? -1 : numElements;\n const tensorList = reserve(elementShape, elementDtype, numElements, maxNumElements);\n context.addTensorList(tensorList);\n return [tensorList.idTensor];\n }\n case \"TensorListGather\": {\n const gatherId = getParamValue(\"tensorListId\", node, tensorMap, context);\n const gatherIndices = getParamValue(\"indices\", node, tensorMap, context);\n const elementShape = getParamValue(\"elementShape\", node, tensorMap, context);\n const elementDtype = getParamValue(\"elementDType\", node, tensorMap, context);\n const tensorList = context.getTensorList(gatherId.id);\n return [tensorList.gather(gatherIndices, elementDtype, elementShape)];\n }\n case \"TensorListStack\": {\n const idTensor = getParamValue(\"tensorListId\", node, tensorMap, context);\n const elementShape = getParamValue(\"elementShape\", node, tensorMap, context);\n const elementDtype = getParamValue(\"elementDType\", node, tensorMap, context);\n const numElements = getParamValue(\"numElements\", node, tensorMap, context);\n const tensorList = context.getTensorList(idTensor.id);\n return [tensorList.stack(elementShape, elementDtype, numElements)];\n }\n case \"TensorListFromTensor\": {\n const tensor2 = getParamValue(\"tensor\", node, tensorMap, context);\n const elementShape = getParamValue(\"elementShape\", node, tensorMap, context);\n const elementDtype = getParamValue(\"elementDType\", node, tensorMap, context);\n const tensorList = fromTensor(tensor2, elementShape, elementDtype);\n context.addTensorList(tensorList);\n return [tensorList.idTensor];\n }\n case \"TensorListConcat\":\n case \"TensorListConcatV2\": {\n const concatId = getParamValue(\"tensorListId\", node, tensorMap, context);\n const tensorList = context.getTensorList(concatId.id);\n const concatDtype = getParamValue(\"dtype\", node, tensorMap, context);\n const elementShape = getParamValue(\"elementShape\", node, tensorMap, context);\n return [tensorList.concat(concatDtype, elementShape)];\n }\n case \"TensorListPushBack\": {\n const idTensor = getParamValue(\"tensorListId\", node, tensorMap, context);\n const writeTensor = getParamValue(\"tensor\", node, tensorMap, context);\n const tensorList = context.getTensorList(idTensor.id);\n tensorList.pushBack(writeTensor);\n return [tensorList.idTensor];\n }\n case \"TensorListPopBack\": {\n const idTensor = getParamValue(\"tensorListId\", node, tensorMap, context);\n const elementShape = getParamValue(\"elementShape\", node, tensorMap, context);\n const elementDType = getParamValue(\"elementDType\", node, tensorMap, context);\n const tensorList = context.getTensorList(idTensor.id);\n return [tensorList.popBack(elementShape, elementDType)];\n }\n case \"TensorListSplit\": {\n const splitTensor = getParamValue(\"tensor\", node, tensorMap, context);\n const elementShape = getParamValue(\"elementShape\", node, tensorMap, context);\n const lengths = getParamValue(\"lengths\", node, tensorMap, context);\n const tensorList = split2(splitTensor, lengths, elementShape);\n context.addTensorList(tensorList);\n return [tensorList.idTensor];\n }\n case \"TensorListLength\": {\n const idTensor = getParamValue(\"tensorListId\", node, tensorMap, context);\n const tensorList = context.getTensorList(idTensor.id);\n return [scalar(tensorList.size(), \"int32\")];\n }\n case \"TensorListResize\": {\n const idTensor = getParamValue(\"tensorListId\", node, tensorMap, context);\n const size = getParamValue(\"size\", node, tensorMap, context);\n const srcTensorList = context.getTensorList(idTensor.id);\n const destTensorList = srcTensorList.resize(size);\n context.addTensorList(destTensorList);\n return [destTensorList.idTensor];\n }\n default:\n throw TypeError(`Node type ${node.op} is not implemented`);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/convolution_executor.js\nfunction fusedConvAndDepthWiseParams(node, tensorMap, context) {\n const [extraOp, activationFunc] = getParamValue(\"fusedOps\", node, tensorMap, context);\n const isBiasAdd = extraOp === \"biasadd\";\n const noBiasAdd = !isBiasAdd;\n const isPrelu = activationFunc === \"prelu\";\n const isBatchNorm = extraOp === \"fusedbatchnorm\";\n const numArgs = getParamValue(\"numArgs\", node, tensorMap, context);\n if (isBiasAdd) {\n if (isPrelu && numArgs !== 2) {\n throw new Error(\"FusedConv2d and DepthwiseConv2d with BiasAdd and Prelu must have two extra arguments: bias and alpha.\");\n }\n if (!isPrelu && isBiasAdd && numArgs !== 1) {\n throw new Error(\"FusedConv2d and DepthwiseConv2d with BiasAdd must have one extra argument: bias.\");\n }\n }\n if (isBatchNorm) {\n throw new Error(\"FusedConv2d and DepthwiseConv2d with FusedBatchNorm is not supported\");\n }\n const stride = getParamValue(\"strides\", node, tensorMap, context);\n const pad3 = getPadding(node, tensorMap, context);\n const dataFormat = getParamValue(\"dataFormat\", node, tensorMap, context).toUpperCase();\n const dilations = getParamValue(\"dilations\", node, tensorMap, context);\n let [biasArg, preluArg] = getParamValue(\"args\", node, tensorMap, context);\n if (noBiasAdd) {\n preluArg = biasArg;\n biasArg = void 0;\n }\n const leakyreluAlpha = getParamValue(\"leakyreluAlpha\", node, tensorMap, context);\n return {\n stride,\n pad: pad3,\n dataFormat,\n dilations,\n biasArg,\n preluArg,\n activationFunc,\n leakyreluAlpha\n };\n}\nvar executeOp4 = (node, tensorMap, context, ops = ops_for_converter_exports) => {\n switch (node.op) {\n case \"Conv1D\": {\n const stride = getParamValue(\"stride\", node, tensorMap, context);\n const pad3 = getParamValue(\"pad\", node, tensorMap, context);\n const dataFormat = getParamValue(\"dataFormat\", node, tensorMap, context).toUpperCase();\n const dilation = getParamValue(\"dilation\", node, tensorMap, context);\n return [ops.conv1d(getParamValue(\"x\", node, tensorMap, context), getParamValue(\"filter\", node, tensorMap, context), stride, pad3, dataFormat, dilation)];\n }\n case \"Conv2D\": {\n const stride = getParamValue(\"strides\", node, tensorMap, context);\n const pad3 = getPadding(node, tensorMap, context);\n const dataFormat = getParamValue(\"dataFormat\", node, tensorMap, context).toUpperCase();\n const dilations = getParamValue(\"dilations\", node, tensorMap, context);\n return [ops.conv2d(getParamValue(\"x\", node, tensorMap, context), getParamValue(\"filter\", node, tensorMap, context), [stride[1], stride[2]], pad3, dataFormat, [dilations[1], dilations[2]])];\n }\n case \"_FusedConv2D\": {\n const { stride, pad: pad3, dataFormat, dilations, biasArg, preluArg, activationFunc, leakyreluAlpha } = fusedConvAndDepthWiseParams(node, tensorMap, context);\n return [ops.fused.conv2d({\n x: getParamValue(\"x\", node, tensorMap, context),\n filter: getParamValue(\"filter\", node, tensorMap, context),\n strides: [stride[1], stride[2]],\n pad: pad3,\n dataFormat,\n dilations: [dilations[1], dilations[2]],\n bias: biasArg,\n activation: activationFunc,\n preluActivationWeights: preluArg,\n leakyreluAlpha\n })];\n }\n case \"FusedDepthwiseConv2dNative\": {\n const { stride, pad: pad3, dataFormat, dilations, biasArg, preluArg, activationFunc, leakyreluAlpha } = fusedConvAndDepthWiseParams(node, tensorMap, context);\n return [ops.fused.depthwiseConv2d({\n x: getParamValue(\"x\", node, tensorMap, context),\n filter: getParamValue(\"filter\", node, tensorMap, context),\n strides: [stride[1], stride[2]],\n pad: pad3,\n dataFormat,\n dilations: [dilations[1], dilations[2]],\n bias: biasArg,\n activation: activationFunc,\n preluActivationWeights: preluArg,\n leakyreluAlpha\n })];\n }\n case \"Conv2DBackpropInput\":\n case \"Conv2dTranspose\": {\n const shape = getParamValue(\"outputShape\", node, tensorMap, context);\n const stride = getParamValue(\"strides\", node, tensorMap, context);\n const pad3 = getPadding(node, tensorMap, context);\n return [ops.conv2dTranspose(getParamValue(\"x\", node, tensorMap, context), getParamValue(\"filter\", node, tensorMap, context), shape, [stride[1], stride[2]], pad3)];\n }\n case \"DepthwiseConv2dNative\":\n case \"DepthwiseConv2d\": {\n const stride = getParamValue(\"strides\", node, tensorMap, context);\n const pad3 = getPadding(node, tensorMap, context);\n const dilations = getParamValue(\"dilations\", node, tensorMap, context);\n const dataFormat = getParamValue(\"dataFormat\", node, tensorMap, context).toUpperCase();\n return [ops.depthwiseConv2d(getParamValue(\"input\", node, tensorMap, context), getParamValue(\"filter\", node, tensorMap, context), [stride[1], stride[2]], pad3, dataFormat, [dilations[1], dilations[2]])];\n }\n case \"Conv3D\": {\n const stride = getParamValue(\"strides\", node, tensorMap, context);\n const pad3 = getParamValue(\"pad\", node, tensorMap, context);\n const dataFormat = getParamValue(\"dataFormat\", node, tensorMap, context).toUpperCase();\n const dilations = getParamValue(\"dilations\", node, tensorMap, context);\n return [ops.conv3d(getParamValue(\"x\", node, tensorMap, context), getParamValue(\"filter\", node, tensorMap, context), [stride[1], stride[2], stride[3]], pad3, dataFormat, [dilations[1], dilations[2], dilations[3]])];\n }\n case \"AvgPool\": {\n const stride = getParamValue(\"strides\", node, tensorMap, context);\n const pad3 = getParamValue(\"pad\", node, tensorMap, context);\n const kernelSize = getParamValue(\"kernelSize\", node, tensorMap, context);\n return [ops.avgPool(getParamValue(\"x\", node, tensorMap, context), [kernelSize[1], kernelSize[2]], [stride[1], stride[2]], pad3)];\n }\n case \"MaxPool\": {\n const stride = getParamValue(\"strides\", node, tensorMap, context);\n const pad3 = getParamValue(\"pad\", node, tensorMap, context);\n const kernelSize = getParamValue(\"kernelSize\", node, tensorMap, context);\n return [ops.maxPool(getParamValue(\"x\", node, tensorMap, context), [kernelSize[1], kernelSize[2]], [stride[1], stride[2]], pad3)];\n }\n case \"MaxPoolWithArgmax\": {\n const stride = getParamValue(\"strides\", node, tensorMap, context);\n const pad3 = getParamValue(\"pad\", node, tensorMap, context);\n const kernelSize = getParamValue(\"kernelSize\", node, tensorMap, context);\n const includeBatchInIndex = getParamValue(\"includeBatchInIndex\", node, tensorMap, context);\n const { result, indexes } = ops.maxPoolWithArgmax(getParamValue(\"x\", node, tensorMap, context), [kernelSize[1], kernelSize[2]], [stride[1], stride[2]], pad3, includeBatchInIndex);\n return [result, indexes];\n }\n case \"AvgPool3D\": {\n const stride = getParamValue(\"strides\", node, tensorMap, context);\n const pad3 = getParamValue(\"pad\", node, tensorMap, context);\n const kernelSize = getParamValue(\"kernelSize\", node, tensorMap, context);\n return [ops.avgPool3d(getParamValue(\"x\", node, tensorMap, context), [kernelSize[1], kernelSize[2], kernelSize[3]], [stride[1], stride[2], stride[3]], pad3)];\n }\n case \"MaxPool3D\": {\n const stride = getParamValue(\"strides\", node, tensorMap, context);\n const pad3 = getParamValue(\"pad\", node, tensorMap, context);\n const kernelSize = getParamValue(\"kernelSize\", node, tensorMap, context);\n return [ops.maxPool3d(getParamValue(\"x\", node, tensorMap, context), [kernelSize[1], kernelSize[2], kernelSize[3]], [stride[1], stride[2], stride[3]], pad3)];\n }\n case \"Dilation2D\": {\n const strides = getParamValue(\"strides\", node, tensorMap, context);\n const pad3 = getParamValue(\"pad\", node, tensorMap, context);\n const dilations = getParamValue(\"dilations\", node, tensorMap, context);\n const strideHeight = strides[1];\n const strideWidth = strides[2];\n const dilationHeight = dilations[1];\n const dilationWidth = dilations[2];\n return [ops.dilation2d(getParamValue(\"x\", node, tensorMap, context), getParamValue(\"filter\", node, tensorMap, context), [strideHeight, strideWidth], pad3, [dilationHeight, dilationWidth], \"NHWC\")];\n }\n default:\n throw TypeError(`Node type ${node.op} is not implemented`);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/creation_executor.js\nvar executeOp5 = (node, tensorMap, context, ops = ops_for_converter_exports) => {\n switch (node.op) {\n case \"Fill\": {\n const shape = getParamValue(\"shape\", node, tensorMap, context);\n const dtype = getParamValue(\"dtype\", node, tensorMap, context);\n const value = getParamValue(\"value\", node, tensorMap, context);\n return [ops.fill(shape, value, dtype)];\n }\n case \"LinSpace\": {\n const start = getParamValue(\"start\", node, tensorMap, context);\n const stop = getParamValue(\"stop\", node, tensorMap, context);\n const num = getParamValue(\"num\", node, tensorMap, context);\n return [ops.linspace(start, stop, num)];\n }\n case \"Multinomial\": {\n const logits = getParamValue(\"logits\", node, tensorMap, context);\n const numSamples = getParamValue(\"numSamples\", node, tensorMap, context);\n const seed = getParamValue(\"seed\", node, tensorMap, context);\n return [ops.multinomial(logits, numSamples, seed)];\n }\n case \"OneHot\": {\n const indices = getParamValue(\"indices\", node, tensorMap, context);\n const depth = getParamValue(\"depth\", node, tensorMap, context);\n const onValue = getParamValue(\"onValue\", node, tensorMap, context);\n const offValue = getParamValue(\"offValue\", node, tensorMap, context);\n const dtype = getParamValue(\"dtype\", node, tensorMap, context);\n return [ops.oneHot(indices, depth, onValue, offValue, dtype)];\n }\n case \"Ones\": {\n return [ops.ones(getParamValue(\"shape\", node, tensorMap, context), getParamValue(\"dtype\", node, tensorMap, context))];\n }\n case \"OnesLike\": {\n return [ops.onesLike(getParamValue(\"x\", node, tensorMap, context))];\n }\n case \"RandomStandardNormal\": {\n return [ops.randomStandardNormal(getParamValue(\"shape\", node, tensorMap, context), getParamValue(\"dtype\", node, tensorMap, context), getParamValue(\"seed\", node, tensorMap, context))];\n }\n case \"RandomUniform\": {\n return [ops.randomUniform(\n getParamValue(\"shape\", node, tensorMap, context),\n getParamValue(\"minval\", node, tensorMap, context),\n getParamValue(\"maxval\", node, tensorMap, context),\n getParamValue(\"dtype\", node, tensorMap, context)\n )];\n }\n case \"Range\": {\n const start = getParamValue(\"start\", node, tensorMap, context);\n const stop = getParamValue(\"stop\", node, tensorMap, context);\n const step5 = getParamValue(\"step\", node, tensorMap, context);\n return [ops.range(start, stop, step5, getParamValue(\"dtype\", node, tensorMap, context))];\n }\n case \"TruncatedNormal\": {\n const shape = getParamValue(\"shape\", node, tensorMap, context);\n const mean5 = getParamValue(\"mean\", node, tensorMap, context);\n const stdDev = getParamValue(\"stdDev\", node, tensorMap, context);\n const seed = getParamValue(\"seed\", node, tensorMap, context);\n return [ops.truncatedNormal(shape, mean5, stdDev, getParamValue(\"dtype\", node, tensorMap, context), seed)];\n }\n case \"Zeros\": {\n return [ops.zeros(getParamValue(\"shape\", node, tensorMap, context), getParamValue(\"dtype\", node, tensorMap, context))];\n }\n case \"ZerosLike\": {\n return [ops.zerosLike(getParamValue(\"x\", node, tensorMap, context))];\n }\n default:\n throw TypeError(`Node type ${node.op} is not implemented`);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/dynamic_executor.js\nfunction nmsParams(node, tensorMap, context) {\n const boxes = getParamValue(\"boxes\", node, tensorMap, context);\n const scores = getParamValue(\"scores\", node, tensorMap, context);\n const maxOutputSize = getParamValue(\"maxOutputSize\", node, tensorMap, context);\n const iouThreshold = getParamValue(\"iouThreshold\", node, tensorMap, context);\n const scoreThreshold = getParamValue(\"scoreThreshold\", node, tensorMap, context);\n const softNmsSigma = getParamValue(\"softNmsSigma\", node, tensorMap, context);\n return {\n boxes,\n scores,\n maxOutputSize,\n iouThreshold,\n scoreThreshold,\n softNmsSigma\n };\n}\nvar executeOp6 = async (node, tensorMap, context, resourceManager, ops = ops_for_converter_exports) => {\n switch (node.op) {\n case \"NonMaxSuppressionV5\": {\n const { boxes, scores, maxOutputSize, iouThreshold, scoreThreshold, softNmsSigma } = nmsParams(node, tensorMap, context);\n const result = await ops.image.nonMaxSuppressionWithScoreAsync(boxes, scores, maxOutputSize, iouThreshold, scoreThreshold, softNmsSigma);\n return [result.selectedIndices, result.selectedScores];\n }\n case \"NonMaxSuppressionV4\": {\n const { boxes, scores, maxOutputSize, iouThreshold, scoreThreshold } = nmsParams(node, tensorMap, context);\n const padToMaxOutputSize = getParamValue(\"padToMaxOutputSize\", node, tensorMap, context);\n const result = await ops.image.nonMaxSuppressionPaddedAsync(boxes, scores, maxOutputSize, iouThreshold, scoreThreshold, padToMaxOutputSize);\n return [result.selectedIndices, result.validOutputs];\n }\n case \"NonMaxSuppressionV3\":\n case \"NonMaxSuppressionV2\": {\n const { boxes, scores, maxOutputSize, iouThreshold, scoreThreshold } = nmsParams(node, tensorMap, context);\n return [await ops.image.nonMaxSuppressionAsync(boxes, scores, maxOutputSize, iouThreshold, scoreThreshold)];\n }\n case \"Where\": {\n const condition = ops.cast(getParamValue(\"condition\", node, tensorMap, context), \"bool\");\n const result = [await ops.whereAsync(condition)];\n condition.dispose();\n return result;\n }\n case \"ListDiff\": {\n return ops.setdiff1dAsync(getParamValue(\"x\", node, tensorMap, context), getParamValue(\"y\", node, tensorMap, context));\n }\n default:\n throw TypeError(`Node type ${node.op} is not implemented`);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/evaluation_executor.js\nvar executeOp7 = (node, tensorMap, context, ops = ops_for_converter_exports) => {\n switch (node.op) {\n case \"LowerBound\": {\n const sortedSequence = getParamValue(\"sortedSequence\", node, tensorMap, context);\n const values = getParamValue(\"values\", node, tensorMap, context);\n return [ops.lowerBound(sortedSequence, values)];\n }\n case \"TopKV2\": {\n const x = getParamValue(\"x\", node, tensorMap, context);\n const k = getParamValue(\"k\", node, tensorMap, context);\n const sorted = getParamValue(\"sorted\", node, tensorMap, context);\n const result = ops.topk(x, k, sorted);\n return [result.values, result.indices];\n }\n case \"UpperBound\": {\n const sortedSequence = getParamValue(\"sortedSequence\", node, tensorMap, context);\n const values = getParamValue(\"values\", node, tensorMap, context);\n return [ops.upperBound(sortedSequence, values)];\n }\n case \"Unique\": {\n const x = getParamValue(\"x\", node, tensorMap, context);\n const result = ops.unique(x);\n return [result.values, result.indices];\n }\n case \"UniqueV2\": {\n const x = getParamValue(\"x\", node, tensorMap, context);\n const axis = getParamValue(\"axis\", node, tensorMap, context);\n const result = ops.unique(x, axis);\n return [result.values, result.indices];\n }\n default:\n throw TypeError(`Node type ${node.op} is not implemented`);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/graph_executor.js\nvar executeOp8 = (node, tensorMap, context, ops = ops_for_converter_exports) => {\n switch (node.op) {\n case \"Const\": {\n return tensorMap[node.name];\n }\n case \"PlaceholderWithDefault\":\n const def = getParamValue(\"default\", node, tensorMap, context);\n return [getTensor(node.name, tensorMap, context) || def];\n case \"Placeholder\":\n return [getTensor(node.name, tensorMap, context)];\n case \"Identity\":\n case \"StopGradient\":\n case \"FakeQuantWithMinMaxVars\": {\n const data2 = getParamValue(\"x\", node, tensorMap, context);\n return [cloneTensor(data2)];\n }\n case \"IdentityN\":\n return getParamValue(\"x\", node, tensorMap, context).map((t2) => cloneTensor(t2));\n case \"Snapshot\":\n const snapshot = getParamValue(\"x\", node, tensorMap, context);\n return [cloneTensor(snapshot)];\n case \"Shape\":\n return [ops.tensor1d(getParamValue(\"x\", node, tensorMap, context).shape, \"int32\")];\n case \"ShapeN\":\n return getParamValue(\"x\", node, tensorMap, context).map((t2) => ops.tensor1d(t2.shape));\n case \"Size\":\n return [ops.scalar(getParamValue(\"x\", node, tensorMap, context).size, \"int32\")];\n case \"Rank\":\n return [ops.scalar(getParamValue(\"x\", node, tensorMap, context).rank, \"int32\")];\n case \"NoOp\":\n return [ops.scalar(1)];\n case \"Print\":\n const input2 = getParamValue(\"x\", node, tensorMap, context);\n const data = getParamValue(\"data\", node, tensorMap, context);\n const message = getParamValue(\"message\", node, tensorMap, context);\n const summarize = getParamValue(\"summarize\", node, tensorMap, context);\n console.warn(\"The graph has a tf.print() operation,usually used for debugging, which slows down performance.\");\n console.log(message);\n for (let i2 = 0; i2 < data.length; i2++) {\n console.log(Array.prototype.slice.call(data[i2].dataSync()).slice(0, summarize));\n }\n return [input2];\n default:\n throw TypeError(`Node type ${node.op} is not implemented`);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/executor/hash_table.js\nvar HashTable = class {\n constructor(keyDType, valueDType) {\n this.keyDType = keyDType;\n this.valueDType = valueDType;\n this.handle = scalar(0);\n this.tensorMap = /* @__PURE__ */ new Map();\n keep(this.handle);\n }\n get id() {\n return this.handle.id;\n }\n clearAndClose() {\n this.tensorMap.forEach((value) => value.dispose());\n this.tensorMap.clear();\n this.handle.dispose();\n }\n size() {\n return this.tensorMap.size;\n }\n tensorSize() {\n return scalar(this.size(), \"int32\");\n }\n async import(keys, values) {\n this.checkKeyAndValueTensor(keys, values);\n const $keys = await keys.data();\n this.tensorMap.forEach((value) => value.dispose());\n this.tensorMap.clear();\n return tidy(() => {\n const $values = unstack(values);\n const keysLength = $keys.length;\n const valuesLength = $values.length;\n util_exports.assert(keysLength === valuesLength, () => `The number of elements doesn't match, keys has ${keysLength} elements, the values has ${valuesLength} elements.`);\n for (let i2 = 0; i2 < keysLength; i2++) {\n const key = $keys[i2];\n const value = $values[i2];\n keep(value);\n this.tensorMap.set(key, value);\n }\n return this.handle;\n });\n }\n async find(keys, defaultValue) {\n this.checkKeyAndValueTensor(keys, defaultValue);\n const $keys = await keys.data();\n return tidy(() => {\n const result = [];\n for (let i2 = 0; i2 < $keys.length; i2++) {\n const key = $keys[i2];\n const value = this.findWithDefault(key, defaultValue);\n result.push(value);\n }\n return stack(result);\n });\n }\n findWithDefault(key, defaultValue) {\n const result = this.tensorMap.get(key);\n return result != null ? result : defaultValue;\n }\n checkKeyAndValueTensor(key, value) {\n if (key.dtype !== this.keyDType) {\n throw new Error(`Expect key dtype ${this.keyDType}, but got ${key.dtype}`);\n }\n if (value.dtype !== this.valueDType) {\n throw new Error(`Expect value dtype ${this.valueDType}, but got ${value.dtype}`);\n }\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/hash_table_executor.js\nvar executeOp9 = async (node, tensorMap, context, resourceManager) => {\n switch (node.op) {\n case \"HashTable\":\n case \"HashTableV2\": {\n const keyDType = getParamValue(\"keyDType\", node, tensorMap, context);\n const valueDType = getParamValue(\"valueDType\", node, tensorMap, context);\n const hashTable = new HashTable(keyDType, valueDType);\n resourceManager.addHashTable(node.name, hashTable);\n return [hashTable.handle];\n }\n case \"LookupTableImport\":\n case \"LookupTableImportV2\": {\n const handle = getParamValue(\"tableHandle\", node, tensorMap, context, resourceManager);\n const keys = getParamValue(\"keys\", node, tensorMap, context);\n const values = getParamValue(\"values\", node, tensorMap, context);\n const hashTable = resourceManager.getHashTableById(handle.id);\n return [await hashTable.import(keys, values)];\n }\n case \"LookupTableFind\":\n case \"LookupTableFindV2\": {\n const handle = getParamValue(\"tableHandle\", node, tensorMap, context, resourceManager);\n const keys = getParamValue(\"keys\", node, tensorMap, context);\n const defaultValue = getParamValue(\"defaultValue\", node, tensorMap, context);\n const hashTable = resourceManager.getHashTableById(handle.id);\n return [await hashTable.find(keys, defaultValue)];\n }\n case \"LookupTableSize\":\n case \"LookupTableSizeV2\": {\n const handle = getParamValue(\"tableHandle\", node, tensorMap, context, resourceManager);\n const hashTable = resourceManager.getHashTableById(handle.id);\n return [hashTable.tensorSize()];\n }\n default:\n throw TypeError(`Node type ${node.op} is not implemented`);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/image_executor.js\nvar executeOp10 = (node, tensorMap, context, ops = ops_for_converter_exports) => {\n switch (node.op) {\n case \"ResizeBilinear\": {\n const images = getParamValue(\"images\", node, tensorMap, context);\n const size = getParamValue(\"size\", node, tensorMap, context);\n const alignCorners = getParamValue(\"alignCorners\", node, tensorMap, context);\n const halfPixelCenters = getParamValue(\"halfPixelCenters\", node, tensorMap, context);\n return [ops.image.resizeBilinear(images, [size[0], size[1]], alignCorners, halfPixelCenters)];\n }\n case \"ResizeNearestNeighbor\": {\n const images = getParamValue(\"images\", node, tensorMap, context);\n const size = getParamValue(\"size\", node, tensorMap, context);\n const alignCorners = getParamValue(\"alignCorners\", node, tensorMap, context);\n const halfPixelCenters = getParamValue(\"halfPixelCenters\", node, tensorMap, context);\n return [ops.image.resizeNearestNeighbor(images, [size[0], size[1]], alignCorners, halfPixelCenters)];\n }\n case \"CropAndResize\": {\n const image2 = getParamValue(\"image\", node, tensorMap, context);\n const boxes = getParamValue(\"boxes\", node, tensorMap, context);\n const boxInd = getParamValue(\"boxInd\", node, tensorMap, context);\n const cropSize = getParamValue(\"cropSize\", node, tensorMap, context);\n const method = getParamValue(\"method\", node, tensorMap, context);\n const extrapolationValue = getParamValue(\"extrapolationValue\", node, tensorMap, context);\n return [ops.image.cropAndResize(image2, boxes, boxInd, cropSize, method, extrapolationValue)];\n }\n case \"ImageProjectiveTransformV3\": {\n const images = getParamValue(\"images\", node, tensorMap, context);\n const transforms = getParamValue(\"transforms\", node, tensorMap, context);\n const outputShape = getParamValue(\"outputShape\", node, tensorMap, context);\n const fillValue = getParamValue(\"fillValue\", node, tensorMap, context);\n const interpolation = getParamValue(\"interpolation\", node, tensorMap, context);\n const fillMode = getParamValue(\"fillMode\", node, tensorMap, context);\n return [ops.image.transform(images, transforms, interpolation.toLowerCase(), fillMode.toLowerCase(), fillValue, outputShape)];\n }\n default:\n throw TypeError(`Node type ${node.op} is not implemented`);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/logical_executor.js\nvar executeOp11 = (node, tensorMap, context, ops = ops_for_converter_exports) => {\n switch (node.op) {\n case \"Equal\": {\n return [ops.equal(getParamValue(\"a\", node, tensorMap, context), getParamValue(\"b\", node, tensorMap, context))];\n }\n case \"NotEqual\": {\n return [ops.notEqual(getParamValue(\"a\", node, tensorMap, context), getParamValue(\"b\", node, tensorMap, context))];\n }\n case \"Greater\": {\n return [ops.greater(getParamValue(\"a\", node, tensorMap, context), getParamValue(\"b\", node, tensorMap, context))];\n }\n case \"GreaterEqual\": {\n return [ops.greaterEqual(getParamValue(\"a\", node, tensorMap, context), getParamValue(\"b\", node, tensorMap, context))];\n }\n case \"Less\": {\n return [ops.less(getParamValue(\"a\", node, tensorMap, context), getParamValue(\"b\", node, tensorMap, context))];\n }\n case \"LessEqual\": {\n return [ops.lessEqual(getParamValue(\"a\", node, tensorMap, context), getParamValue(\"b\", node, tensorMap, context))];\n }\n case \"LogicalAnd\": {\n return [ops.logicalAnd(getParamValue(\"a\", node, tensorMap, context), getParamValue(\"b\", node, tensorMap, context))];\n }\n case \"LogicalNot\": {\n return [ops.logicalNot(getParamValue(\"a\", node, tensorMap, context))];\n }\n case \"LogicalOr\": {\n return [ops.logicalOr(getParamValue(\"a\", node, tensorMap, context), getParamValue(\"b\", node, tensorMap, context))];\n }\n case \"Select\":\n case \"SelectV2\": {\n return [ops.where(getParamValue(\"condition\", node, tensorMap, context), getParamValue(\"a\", node, tensorMap, context), getParamValue(\"b\", node, tensorMap, context))];\n }\n default:\n throw TypeError(`Node type ${node.op} is not implemented`);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/matrices_executor.js\nvar executeOp12 = (node, tensorMap, context, ops = ops_for_converter_exports) => {\n switch (node.op) {\n case \"BatchMatMul\":\n case \"BatchMatMulV2\":\n case \"MatMul\":\n return [ops.matMul(getParamValue(\"a\", node, tensorMap, context), getParamValue(\"b\", node, tensorMap, context), getParamValue(\"transposeA\", node, tensorMap, context), getParamValue(\"transposeB\", node, tensorMap, context))];\n case \"Einsum\":\n return [ops.einsum(getParamValue(\"equation\", node, tensorMap, context), ...getParamValue(\"tensors\", node, tensorMap, context))];\n case \"Transpose\":\n return [ops.transpose(getParamValue(\"x\", node, tensorMap, context), getParamValue(\"perm\", node, tensorMap, context))];\n case \"_FusedMatMul\":\n const [extraOp, activationFunc] = getParamValue(\"fusedOps\", node, tensorMap, context);\n const isBiasAdd = extraOp === \"biasadd\";\n const isPrelu = activationFunc === \"prelu\";\n const numArgs = getParamValue(\"numArgs\", node, tensorMap, context);\n const leakyreluAlpha = getParamValue(\"leakyreluAlpha\", node, tensorMap, context);\n if (isBiasAdd) {\n if (isPrelu && numArgs !== 2) {\n throw new Error(\"Fused MatMul with BiasAdd and Prelu must have two extra arguments: bias and alpha.\");\n }\n if (!isPrelu && numArgs !== 1) {\n throw new Error(\"Fused MatMul with BiasAdd must have one extra argument: bias.\");\n }\n }\n const [biasArg, preluArg] = getParamValue(\"args\", node, tensorMap, context);\n return [ops.fused.matMul({\n a: getParamValue(\"a\", node, tensorMap, context),\n b: getParamValue(\"b\", node, tensorMap, context),\n transposeA: getParamValue(\"transposeA\", node, tensorMap, context),\n transposeB: getParamValue(\"transposeB\", node, tensorMap, context),\n bias: biasArg,\n activation: activationFunc,\n preluActivationWeights: preluArg,\n leakyreluAlpha\n })];\n default:\n throw TypeError(`Node type ${node.op} is not implemented`);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/normalization_executor.js\nvar executeOp13 = (node, tensorMap, context, ops = ops_for_converter_exports) => {\n switch (node.op) {\n case \"EuclideanNorm\":\n return [ops.euclideanNorm(getParamValue(\"x\", node, tensorMap, context), getParamValue(\"axis\", node, tensorMap, context), getParamValue(\"keepDims\", node, tensorMap, context))];\n case \"FusedBatchNorm\":\n case \"FusedBatchNormV2\": {\n return [ops.batchNorm(getParamValue(\"x\", node, tensorMap, context), getParamValue(\"mean\", node, tensorMap, context), getParamValue(\"variance\", node, tensorMap, context), getParamValue(\"offset\", node, tensorMap, context), getParamValue(\"scale\", node, tensorMap, context), getParamValue(\"epsilon\", node, tensorMap, context))];\n }\n case \"FusedBatchNormV3\": {\n return [ops.batchNorm(getParamValue(\"x\", node, tensorMap, context), getParamValue(\"mean\", node, tensorMap, context), getParamValue(\"variance\", node, tensorMap, context), getParamValue(\"offset\", node, tensorMap, context), getParamValue(\"scale\", node, tensorMap, context), getParamValue(\"epsilon\", node, tensorMap, context))];\n }\n case \"LRN\": {\n return [ops.localResponseNormalization(getParamValue(\"x\", node, tensorMap, context), getParamValue(\"radius\", node, tensorMap, context), getParamValue(\"bias\", node, tensorMap, context), getParamValue(\"alpha\", node, tensorMap, context), getParamValue(\"beta\", node, tensorMap, context))];\n }\n case \"Softmax\": {\n return [ops.softmax(getParamValue(\"x\", node, tensorMap, context))];\n }\n case \"LogSoftmax\": {\n return [ops.logSoftmax(getParamValue(\"x\", node, tensorMap, context))];\n }\n case \"SparseToDense\": {\n return [ops.sparseToDense(getParamValue(\"sparseIndices\", node, tensorMap, context), getParamValue(\"outputShape\", node, tensorMap, context), getParamValue(\"sparseValues\", node, tensorMap, context), getParamValue(\"defaultValue\", node, tensorMap, context))];\n }\n default:\n throw TypeError(`Node type ${node.op} is not implemented`);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/reduction_executor.js\nvar executeOp14 = (node, tensorMap, context, ops = ops_for_converter_exports) => {\n switch (node.op) {\n case \"Max\": {\n const axis = getParamValue(\"axis\", node, tensorMap, context);\n const keepDims = getParamValue(\"keepDims\", node, tensorMap, context);\n return [ops.max(getParamValue(\"x\", node, tensorMap, context), axis, keepDims)];\n }\n case \"Mean\": {\n const axis = getParamValue(\"axis\", node, tensorMap, context);\n const keepDims = getParamValue(\"keepDims\", node, tensorMap, context);\n return [ops.mean(getParamValue(\"x\", node, tensorMap, context), axis, keepDims)];\n }\n case \"Min\": {\n const axis = getParamValue(\"axis\", node, tensorMap, context);\n const keepDims = getParamValue(\"keepDims\", node, tensorMap, context);\n return [ops.min(getParamValue(\"x\", node, tensorMap, context), axis, keepDims)];\n }\n case \"Sum\": {\n const axis = getParamValue(\"axis\", node, tensorMap, context);\n const keepDims = getParamValue(\"keepDims\", node, tensorMap, context);\n return [ops.sum(getParamValue(\"x\", node, tensorMap, context), axis, keepDims)];\n }\n case \"All\": {\n const axis = getParamValue(\"axis\", node, tensorMap, context);\n const keepDims = getParamValue(\"keepDims\", node, tensorMap, context);\n return [ops.all(getParamValue(\"x\", node, tensorMap, context), axis, keepDims)];\n }\n case \"Any\": {\n const axis = getParamValue(\"axis\", node, tensorMap, context);\n const keepDims = getParamValue(\"keepDims\", node, tensorMap, context);\n return [ops.any(getParamValue(\"x\", node, tensorMap, context), axis, keepDims)];\n }\n case \"ArgMax\": {\n const axis = getParamValue(\"axis\", node, tensorMap, context);\n return [ops.argMax(getParamValue(\"x\", node, tensorMap, context), axis)];\n }\n case \"ArgMin\": {\n const axis = getParamValue(\"axis\", node, tensorMap, context);\n return [ops.argMin(getParamValue(\"x\", node, tensorMap, context), axis)];\n }\n case \"Prod\": {\n const axis = getParamValue(\"axis\", node, tensorMap, context);\n const keepDims = getParamValue(\"keepDims\", node, tensorMap, context);\n return [ops.prod(getParamValue(\"x\", node, tensorMap, context), axis, keepDims)];\n }\n case \"Cumprod\": {\n const axis = getParamValue(\"axis\", node, tensorMap, context);\n const exclusive = getParamValue(\"exclusive\", node, tensorMap, context);\n const reverse5 = getParamValue(\"reverse\", node, tensorMap, context);\n return [ops.cumprod(getParamValue(\"x\", node, tensorMap, context), axis, exclusive, reverse5)];\n }\n case \"Cumsum\": {\n const axis = getParamValue(\"axis\", node, tensorMap, context);\n const exclusive = getParamValue(\"exclusive\", node, tensorMap, context);\n const reverse5 = getParamValue(\"reverse\", node, tensorMap, context);\n return [ops.cumsum(getParamValue(\"x\", node, tensorMap, context), axis, exclusive, reverse5)];\n }\n case \"Bincount\":\n const x = getParamValue(\"x\", node, tensorMap, context);\n const weights = getParamValue(\"weights\", node, tensorMap, context);\n const size = getParamValue(\"size\", node, tensorMap, context);\n return [ops.bincount(x, weights, size)];\n case \"DenseBincount\": {\n const x2 = getParamValue(\"x\", node, tensorMap, context);\n const weights2 = getParamValue(\"weights\", node, tensorMap, context);\n const size2 = getParamValue(\"size\", node, tensorMap, context);\n const binaryOutput = getParamValue(\"binaryOutput\", node, tensorMap, context);\n return [ops.denseBincount(x2, weights2, size2, binaryOutput)];\n }\n default:\n throw TypeError(`Node type ${node.op} is not implemented`);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/slice_join_executor.js\nvar executeOp15 = (node, tensorMap, context, ops = ops_for_converter_exports) => {\n switch (node.op) {\n case \"ConcatV2\":\n case \"Concat\": {\n const n2 = getParamValue(\"n\", node, tensorMap, context);\n const axis = getParamValue(\"axis\", node, tensorMap, context);\n let inputs = getParamValue(\"tensors\", node, tensorMap, context);\n inputs = inputs.slice(0, n2);\n return [ops.concat(inputs, axis)];\n }\n case \"Gather\": {\n const input2 = getParamValue(\"x\", node, tensorMap, context);\n const indices = getParamValue(\"indices\", node, tensorMap, context);\n return [ops.gather(input2, ops.cast(indices, \"int32\"), 0)];\n }\n case \"GatherV2\": {\n const axis = getParamValue(\"axis\", node, tensorMap, context);\n const batchDims = getParamValue(\"batchDims\", node, tensorMap, context);\n const input2 = getParamValue(\"x\", node, tensorMap, context);\n const indices = getParamValue(\"indices\", node, tensorMap, context);\n return [ops.gather(input2, ops.cast(indices, \"int32\"), axis, batchDims)];\n }\n case \"Reverse\": {\n const dims = getParamValue(\"dims\", node, tensorMap, context);\n const axis = [];\n for (let i2 = 0; i2 < dims.length; i2++) {\n if (dims[i2]) {\n axis.push(i2);\n }\n }\n const input2 = getParamValue(\"x\", node, tensorMap, context);\n return [ops.reverse(input2, axis)];\n }\n case \"ReverseV2\": {\n const axis = getParamValue(\"axis\", node, tensorMap, context);\n const input2 = getParamValue(\"x\", node, tensorMap, context);\n return [ops.reverse(input2, axis)];\n }\n case \"Slice\": {\n const begin = getParamValue(\"begin\", node, tensorMap, context);\n const size = getParamValue(\"size\", node, tensorMap, context);\n return [ops.slice(getParamValue(\"x\", node, tensorMap, context), begin, size)];\n }\n case \"StridedSlice\": {\n const begin = getParamValue(\"begin\", node, tensorMap, context);\n const end = getParamValue(\"end\", node, tensorMap, context);\n const strides = getParamValue(\"strides\", node, tensorMap, context);\n const beginMask = getParamValue(\"beginMask\", node, tensorMap, context);\n const endMask = getParamValue(\"endMask\", node, tensorMap, context);\n const ellipsisMask = getParamValue(\"ellipsisMask\", node, tensorMap, context);\n const newAxisMask = getParamValue(\"newAxisMask\", node, tensorMap, context);\n const shrinkAxisMask = getParamValue(\"shrinkAxisMask\", node, tensorMap, context);\n const tensor2 = getParamValue(\"x\", node, tensorMap, context);\n return [ops.stridedSlice(tensor2, begin, end, strides, beginMask, endMask, ellipsisMask, newAxisMask, shrinkAxisMask)];\n }\n case \"Pack\": {\n return tidy(() => {\n const axis = getParamValue(\"axis\", node, tensorMap, context);\n const tensors = getParamValue(\"tensors\", node, tensorMap, context);\n const shape = tensors[0].shape;\n const squeezedShape = ops.squeeze(tensors[0]).shape;\n const mapped = tensors.map((tensor2) => {\n const sameShape = util_exports.arraysEqual(tensor2.shape, shape);\n if (!sameShape && !util_exports.arraysEqual(ops.squeeze(tensor2).shape, squeezedShape)) {\n throw new Error(\"the input tensors shape does not match\");\n }\n return sameShape ? tensor2 : ops.reshape(tensor2, shape);\n });\n return [ops.stack(mapped, axis)];\n });\n }\n case \"Unpack\": {\n const axis = getParamValue(\"axis\", node, tensorMap, context);\n const tensor2 = getParamValue(\"tensor\", node, tensorMap, context);\n return ops.unstack(tensor2, axis);\n }\n case \"Tile\": {\n const reps = getParamValue(\"reps\", node, tensorMap, context);\n return [ops.tile(getParamValue(\"x\", node, tensorMap, context), reps)];\n }\n case \"Split\":\n case \"SplitV\": {\n const axis = getParamValue(\"axis\", node, tensorMap, context);\n const numOrSizeSplits = getParamValue(\"numOrSizeSplits\", node, tensorMap, context);\n const tensor2 = getParamValue(\"x\", node, tensorMap, context);\n return ops.split(tensor2, numOrSizeSplits, axis);\n }\n case \"ScatterNd\": {\n const indices = getParamValue(\"indices\", node, tensorMap, context);\n const values = getParamValue(\"values\", node, tensorMap, context);\n const shape = getParamValue(\"shape\", node, tensorMap, context);\n return [ops.scatterND(indices, values, shape)];\n }\n case \"GatherNd\": {\n const x = getParamValue(\"x\", node, tensorMap, context);\n const indices = getParamValue(\"indices\", node, tensorMap, context);\n return [ops.gatherND(x, indices)];\n }\n case \"SparseToDense\": {\n const indices = getParamValue(\"sparseIndices\", node, tensorMap, context);\n const shape = getParamValue(\"outputShape\", node, tensorMap, context);\n const sparseValues = getParamValue(\"sparseValues\", node, tensorMap, context);\n const defaultValue = getParamValue(\"defaultValue\", node, tensorMap, context);\n return [ops.sparseToDense(indices, sparseValues, shape, sparseValues.dtype === defaultValue.dtype ? defaultValue : ops.cast(defaultValue, sparseValues.dtype))];\n }\n default:\n throw TypeError(`Node type ${node.op} is not implemented`);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/sparse_executor.js\nvar executeOp16 = (node, tensorMap, context, ops = ops_for_converter_exports) => {\n switch (node.op) {\n case \"SparseFillEmptyRows\": {\n const { outputIndices, outputValues, emptyRowIndicator, reverseIndexMap } = ops.sparse.sparseFillEmptyRows(getParamValue(\"indices\", node, tensorMap, context), getParamValue(\"values\", node, tensorMap, context), getParamValue(\"denseShape\", node, tensorMap, context), getParamValue(\"defaultValue\", node, tensorMap, context));\n return [\n outputIndices,\n outputValues,\n emptyRowIndicator,\n reverseIndexMap\n ];\n }\n case \"SparseReshape\": {\n const { outputIndices, outputShape } = ops.sparse.sparseReshape(getParamValue(\"inputIndices\", node, tensorMap, context), getParamValue(\"inputShape\", node, tensorMap, context), getParamValue(\"newShape\", node, tensorMap, context));\n return [outputIndices, outputShape];\n }\n case \"SparseSegmentMean\": {\n const outputData = ops.sparse.sparseSegmentMean(getParamValue(\"data\", node, tensorMap, context), getParamValue(\"indices\", node, tensorMap, context), getParamValue(\"segmentIds\", node, tensorMap, context));\n return [outputData];\n }\n case \"SparseSegmentSum\": {\n const outputData = ops.sparse.sparseSegmentSum(getParamValue(\"data\", node, tensorMap, context), getParamValue(\"indices\", node, tensorMap, context), getParamValue(\"segmentIds\", node, tensorMap, context));\n return [outputData];\n }\n default:\n throw TypeError(`Node type ${node.op} is not implemented`);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/spectral_executor.js\nvar executeOp17 = (node, tensorMap, context, ops = ops_for_converter_exports) => {\n switch (node.op) {\n case \"FFT\": {\n return [ops.fft(getParamValue(\"x\", node, tensorMap, context))];\n }\n case \"IFFT\": {\n return [ops.ifft(getParamValue(\"x\", node, tensorMap, context))];\n }\n case \"RFFT\": {\n return [ops.rfft(getParamValue(\"x\", node, tensorMap, context))];\n }\n case \"IRFFT\": {\n return [ops.irfft(getParamValue(\"x\", node, tensorMap, context))];\n }\n default:\n throw TypeError(`Node type ${node.op} is not implemented`);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/string_executor.js\nvar executeOp18 = (node, tensorMap, context, ops = ops_for_converter_exports) => {\n switch (node.op) {\n case \"StringNGrams\": {\n const { nGrams, nGramsSplits } = ops.string.stringNGrams(getParamValue(\"data\", node, tensorMap, context), getParamValue(\"dataSplits\", node, tensorMap, context), getParamValue(\"separator\", node, tensorMap, context), getParamValue(\"nGramWidths\", node, tensorMap, context), getParamValue(\"leftPad\", node, tensorMap, context), getParamValue(\"rightPad\", node, tensorMap, context), getParamValue(\"padWidth\", node, tensorMap, context), getParamValue(\"preserveShortSequences\", node, tensorMap, context));\n return [nGrams, nGramsSplits];\n }\n case \"StringSplit\": {\n const { indices, values, shape } = ops.string.stringSplit(getParamValue(\"input\", node, tensorMap, context), getParamValue(\"delimiter\", node, tensorMap, context), getParamValue(\"skipEmpty\", node, tensorMap, context));\n return [indices, values, shape];\n }\n case \"StringToHashBucketFast\": {\n const output = ops.string.stringToHashBucketFast(getParamValue(\"input\", node, tensorMap, context), getParamValue(\"numBuckets\", node, tensorMap, context));\n return [output];\n }\n default:\n throw TypeError(`Node type ${node.op} is not implemented`);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/transformation_executor.js\nvar executeOp19 = (node, tensorMap, context, ops = ops_for_converter_exports) => {\n switch (node.op) {\n case \"Cast\": {\n return [ops.cast(getParamValue(\"x\", node, tensorMap, context), getParamValue(\"dtype\", node, tensorMap, context))];\n }\n case \"ExpandDims\": {\n const axis = getParamValue(\"axis\", node, tensorMap, context);\n return [ops.expandDims(getParamValue(\"x\", node, tensorMap, context), axis)];\n }\n case \"Squeeze\": {\n const axis = getParamValue(\"axis\", node, tensorMap, context);\n return [ops.squeeze(getParamValue(\"x\", node, tensorMap, context), axis)];\n }\n case \"Reshape\": {\n return [ops.reshape(getParamValue(\"x\", node, tensorMap, context), getParamValue(\"shape\", node, tensorMap, context))];\n }\n case \"MirrorPad\": {\n return [ops.mirrorPad(getParamValue(\"x\", node, tensorMap, context), getParamValue(\"padding\", node, tensorMap, context), getParamValue(\"mode\", node, tensorMap, context))];\n }\n case \"PadV2\":\n case \"Pad\": {\n return [ops.pad(getParamValue(\"x\", node, tensorMap, context), getParamValue(\"padding\", node, tensorMap, context), getParamValue(\"constantValue\", node, tensorMap, context))];\n }\n case \"SpaceToBatchND\": {\n const blockShape = getParamValue(\"blockShape\", node, tensorMap, context);\n const paddings = getParamValue(\"paddings\", node, tensorMap, context);\n return [ops.spaceToBatchND(getParamValue(\"x\", node, tensorMap, context), blockShape, paddings)];\n }\n case \"BatchToSpaceND\": {\n const blockShape = getParamValue(\"blockShape\", node, tensorMap, context);\n const crops = getParamValue(\"crops\", node, tensorMap, context);\n return [ops.batchToSpaceND(getParamValue(\"x\", node, tensorMap, context), blockShape, crops)];\n }\n case \"DepthToSpace\": {\n const blockSize = getParamValue(\"blockSize\", node, tensorMap, context);\n const dataFormat = getParamValue(\"dataFormat\", node, tensorMap, context).toUpperCase();\n return [ops.depthToSpace(getParamValue(\"x\", node, tensorMap, context), blockSize, dataFormat)];\n }\n case \"BroadcastTo\": {\n return [ops.broadcastTo(getParamValue(\"x\", node, tensorMap, context), getParamValue(\"shape\", node, tensorMap, context))];\n }\n case \"BroadcastArgs\": {\n return [ops.broadcastArgs(getParamValue(\"s0\", node, tensorMap, context), getParamValue(\"s1\", node, tensorMap, context))];\n }\n default:\n throw TypeError(`Node type ${node.op} is not implemented`);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/operation_executor.js\nfunction executeOp20(node, tensorMap, context, resourceManager, tidy2 = tidy) {\n const value = ((node2, tensorMap2, context2) => {\n switch (node2.category) {\n case \"arithmetic\":\n return tidy2(() => executeOp(node2, tensorMap2, context2));\n case \"basic_math\":\n return tidy2(() => executeOp2(node2, tensorMap2, context2));\n case \"control\":\n return executeOp3(node2, tensorMap2, context2);\n case \"convolution\":\n return tidy2(() => executeOp4(node2, tensorMap2, context2));\n case \"creation\":\n return tidy2(() => executeOp5(node2, tensorMap2, context2));\n case \"dynamic\":\n return executeOp6(node2, tensorMap2, context2);\n case \"evaluation\":\n return tidy2(() => executeOp7(node2, tensorMap2, context2));\n case \"image\":\n return tidy2(() => executeOp10(node2, tensorMap2, context2));\n case \"graph\":\n return tidy2(() => executeOp8(node2, tensorMap2, context2));\n case \"logical\":\n return tidy2(() => executeOp11(node2, tensorMap2, context2));\n case \"matrices\":\n return tidy2(() => executeOp12(node2, tensorMap2, context2));\n case \"normalization\":\n return tidy2(() => executeOp13(node2, tensorMap2, context2));\n case \"reduction\":\n return tidy2(() => executeOp14(node2, tensorMap2, context2));\n case \"slice_join\":\n return tidy2(() => executeOp15(node2, tensorMap2, context2));\n case \"sparse\":\n return tidy2(() => executeOp16(node2, tensorMap2, context2));\n case \"spectral\":\n return tidy2(() => executeOp17(node2, tensorMap2, context2));\n case \"string\":\n return tidy2(() => executeOp18(node2, tensorMap2, context2));\n case \"transformation\":\n return tidy2(() => executeOp19(node2, tensorMap2, context2));\n case \"hash_table\":\n return executeOp9(node2, tensorMap2, context2, resourceManager);\n case \"custom\":\n const opMapper = getRegisteredOp(node2.op);\n if (opMapper && opMapper.customExecutor) {\n return opMapper.customExecutor(new NodeValueImpl(node2, tensorMap2, context2));\n } else {\n throw TypeError(`Custom op ${node2.op} is not registered.`);\n }\n default:\n throw TypeError(`Unknown op '${node2.op}'. File an issue at https://github.com/tensorflow/tfjs/issues so we can add it, or register a custom execution with tf.registerOp()`);\n }\n })(node, tensorMap, context);\n if (util_exports.isPromise(value)) {\n return value.then((data) => [].concat(data));\n }\n return [].concat(value);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/executor/execution_context.js\nvar ExecutionContext = class {\n constructor(weightMap = {}, tensorArrayMap = {}, tensorListMap = {}, functionMap = {}) {\n this.weightMap = weightMap;\n this.tensorArrayMap = tensorArrayMap;\n this.tensorListMap = tensorListMap;\n this.functionMap = functionMap;\n this.rootContext = { id: 0, frameName: \"\", iterationId: 0 };\n this.contexts = [this.rootContext];\n this.lastId = 0;\n this.generateCurrentContextIds();\n }\n newFrame(id, frameName) {\n return { id, frameName, iterationId: 0 };\n }\n set currentContext(contexts2) {\n if (this.contexts !== contexts2) {\n this.contexts = contexts2;\n this.generateCurrentContextIds();\n }\n }\n get currentContext() {\n return this.contexts;\n }\n get currentContextId() {\n return this._currentContextIds[0];\n }\n get currentContextIds() {\n return this._currentContextIds;\n }\n generateCurrentContextIds() {\n const names = [];\n for (let i2 = 0; i2 < this.contexts.length - 1; i2++) {\n const contexts2 = this.contexts.slice(0, this.contexts.length - i2);\n names.push(this.contextIdforContexts(contexts2));\n }\n names.push(\"\");\n this._currentContextIds = names;\n }\n contextIdforContexts(contexts2) {\n return contexts2 ? contexts2.map((context) => context.id === 0 && context.iterationId === 0 ? \"\" : `${context.frameName}-${context.iterationId}`).join(\"/\") : \"\";\n }\n enterFrame(frameId) {\n if (this.contexts) {\n this.lastId++;\n this.contexts = this.contexts.slice();\n this.contexts.push(this.newFrame(this.lastId, frameId));\n this._currentContextIds.unshift(this.contextIdforContexts(this.contexts));\n }\n }\n exitFrame() {\n if (this.contexts && this.contexts.length > 1) {\n this.contexts = this.contexts.slice();\n this.contexts.splice(-1);\n this.currentContextIds.shift();\n } else {\n throw new Error(\"Cannot exit frame, the context is empty\");\n }\n }\n nextIteration() {\n if (this.contexts && this.contexts.length > 0) {\n this.contexts = this.contexts.slice();\n this.lastId++;\n const context = Object.assign({}, this.contexts[this.contexts.length - 1]);\n context.iterationId += 1;\n context.id = this.lastId;\n this.contexts.splice(-1, 1, context);\n this._currentContextIds.splice(0, 1, this.contextIdforContexts(this.contexts));\n } else {\n throw new Error(\"Cannot increase frame iteration, the context is empty\");\n }\n }\n getWeight(name) {\n return this.weightMap[name];\n }\n addTensorArray(tensorArray) {\n this.tensorArrayMap[tensorArray.id] = tensorArray;\n }\n getTensorArray(id) {\n return this.tensorArrayMap[id];\n }\n addTensorList(tensorList) {\n this.tensorListMap[tensorList.id] = tensorList;\n }\n getTensorList(id) {\n return this.tensorListMap[id];\n }\n dispose(keepIds) {\n for (const key in this.tensorArrayMap) {\n this.tensorArrayMap[key].clearAndClose(keepIds);\n }\n for (const key in this.tensorListMap) {\n this.tensorListMap[key].clearAndClose(keepIds);\n }\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/executor/model_analysis.js\nfunction getExecutionSubgraph(inputs, outputs, weightMap, initNodes) {\n const usedNodes = /* @__PURE__ */ new Set();\n const missingInputs = [];\n let dynamicNode = null;\n let syncInputs = null;\n const seen = /* @__PURE__ */ new Set();\n const inputNodeNames = Object.keys(inputs).map((name) => parseNodeName(name)[0]);\n let initNodeNames = [];\n if (initNodes != null) {\n initNodeNames = initNodes.map((node) => parseNodeName(node.name)[0]);\n }\n const frontier = [...outputs];\n while (frontier.length > 0) {\n const node = frontier.pop();\n if (isControlFlow(node) || isDynamicShape(node) || isHashTable(node)) {\n if (dynamicNode == null) {\n dynamicNode = node;\n syncInputs = dynamicNode.children.map((child) => child.name).filter((name) => usedNodes.has(name));\n }\n }\n usedNodes.add(node.name);\n if (weightMap[node.name] != null) {\n continue;\n }\n if (inputNodeNames.indexOf(node.name) !== -1) {\n continue;\n }\n if (initNodeNames.indexOf(node.name) !== -1) {\n continue;\n }\n if (node.inputs.length === 0) {\n missingInputs.push(node.name);\n continue;\n }\n node.inputs.forEach((input2) => {\n if (seen.has(input2.name)) {\n return;\n }\n seen.add(input2.name);\n frontier.push(input2);\n });\n }\n return { inputs, outputs, usedNodes, missingInputs, dynamicNode, syncInputs };\n}\nfunction getNodesInTopologicalOrder(graph, weightMap, executionInfo) {\n const { usedNodes, inputs } = executionInfo;\n const frontier = [];\n const inputNodes = Object.keys(inputs).map((name) => parseNodeName(name)[0]).map((name) => graph.nodes[name]);\n const initNodes = graph.initNodes;\n inputNodes.forEach((input2) => {\n if (usedNodes.has(input2.name)) {\n frontier.push(input2);\n }\n });\n graph.weights.forEach((weight) => {\n if (usedNodes.has(weight.name)) {\n frontier.push(weight);\n }\n });\n if (initNodes != null) {\n initNodes.forEach((node) => {\n if (usedNodes.has(node.name)) {\n frontier.push(node);\n }\n });\n }\n const seen = /* @__PURE__ */ new Set();\n const orderedNodes = [];\n while (frontier.length > 0) {\n const node = frontier.pop();\n seen.add(node.name);\n if (!weightMap[node.name]) {\n orderedNodes.push(node);\n }\n node.children.forEach((child) => {\n if (!seen.has(child.name) && usedNodes.has(child.name) && child.inputs.every((input2) => seen.has(input2.name))) {\n frontier.push(child);\n }\n });\n }\n return orderedNodes;\n}\nvar CONTROL_FLOW_OPS = [\n \"Switch\",\n \"Merge\",\n \"Enter\",\n \"Exit\",\n \"NextIteration\",\n \"StatelessIf\",\n \"StatelessWhile\",\n \"if\",\n \"While\"\n];\nvar DYNAMIC_SHAPE_OPS = [\n \"NonMaxSuppressionV2\",\n \"NonMaxSuppressionV3\",\n \"NonMaxSuppressionV5\",\n \"Where\"\n];\nvar HASH_TABLE_OPS = [\n \"HashTable\",\n \"HashTableV2\",\n \"LookupTableImport\",\n \"LookupTableImportV2\",\n \"LookupTableFind\",\n \"LookupTableFindV2\",\n \"LookupTableSize\",\n \"LookupTableSizeV2\"\n];\nfunction isControlFlow(node) {\n return CONTROL_FLOW_OPS.indexOf(node.op) >= 0;\n}\nfunction isDynamicShape(node) {\n return DYNAMIC_SHAPE_OPS.indexOf(node.op) >= 0;\n}\nfunction isHashTable(node) {\n return HASH_TABLE_OPS.indexOf(node.op) >= 0;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/executor/graph_executor.js\nvar GraphExecutor = class {\n constructor(graph, parent) {\n this.graph = graph;\n this.parent = parent;\n this.compiledMap = /* @__PURE__ */ new Map();\n this._weightMap = {};\n this.SEPERATOR = \",\";\n this._functions = {};\n this._functionExecutorMap = {};\n this.intermediateTensors = {};\n this.keepTensorForDebug = false;\n this._outputs = graph.outputs;\n this._inputs = graph.inputs;\n this._initNodes = graph.initNodes;\n this._signature = graph.signature;\n this._functions = graph.functions;\n if (graph.functions != null) {\n Object.keys(graph.functions).forEach((name) => {\n this._functionExecutorMap[name] = new GraphExecutor(graph.functions[name], this);\n });\n }\n }\n get weightIds() {\n return this.parent ? this.parent.weightIds : this._weightIds;\n }\n get functionExecutorMap() {\n return this.parent ? this.parent.functionExecutorMap : this._functionExecutorMap;\n }\n get weightMap() {\n return this.parent ? this.parent.weightMap : this._weightMap;\n }\n set weightMap(weightMap) {\n const weightIds = Object.keys(weightMap).map((key) => weightMap[key].map((tensor2) => tensor2.id));\n this._weightIds = [].concat(...weightIds);\n this._weightMap = weightMap;\n }\n set resourceManager(resourceManager) {\n this._resourceManager = resourceManager;\n }\n get inputs() {\n return this._inputs.map((node) => {\n return {\n name: node.name,\n shape: node.attrParams[\"shape\"] ? node.attrParams[\"shape\"].value : void 0,\n dtype: node.attrParams[\"dtype\"] ? node.attrParams[\"dtype\"].value : void 0\n };\n });\n }\n get outputs() {\n return this._outputs.map((node) => {\n return {\n name: node.name,\n shape: node.attrParams[\"shape\"] ? node.attrParams[\"shape\"].value : void 0,\n dtype: node.attrParams[\"dtype\"] ? node.attrParams[\"dtype\"].value : void 0\n };\n });\n }\n get inputNodes() {\n return this._inputs.map((node) => node.signatureKey || node.name);\n }\n get outputNodes() {\n return this._outputs.map((node) => {\n const name = node.signatureKey || node.name;\n return node.defaultOutput ? `${name}:${node.defaultOutput}` : name;\n });\n }\n get functions() {\n return Object.keys(this._functions).reduce((map, key) => {\n map[key] = this._functions[key].signature;\n return map;\n }, {});\n }\n getCompilationKey(inputs, outputs) {\n const sortedInputs = inputs.map((node) => node.name).sort();\n const sortedOutputs = outputs.map((node) => node.name).sort();\n return sortedInputs.join(this.SEPERATOR) + \"--\" + sortedOutputs.join(this.SEPERATOR);\n }\n compile(inputs, outputs) {\n const executionInfo = getExecutionSubgraph(inputs, outputs, this.weightMap, this._initNodes);\n const { missingInputs, dynamicNode, syncInputs } = executionInfo;\n if (dynamicNode != null) {\n throw new Error(`This execution contains the node '${dynamicNode.name}', which has the dynamic op '${dynamicNode.op}'. Please use model.executeAsync() instead. Alternatively, to avoid the dynamic ops, specify the inputs [${syncInputs}]`);\n }\n if (missingInputs.length > 0) {\n const outNames = outputs.map((n2) => n2.name);\n const inNames = Object.keys(inputs);\n throw new Error(`Cannot compute the outputs [${outNames}] from the provided inputs [${inNames}]. Missing the following inputs: [${missingInputs}]`);\n }\n return getNodesInTopologicalOrder(this.graph, this.weightMap, executionInfo);\n }\n execute(inputs, outputs) {\n inputs = this.mapInputs(inputs);\n const names = Object.keys(inputs).sort();\n this.checkInputs(inputs);\n this.checkInputShapeAndType(inputs);\n outputs = this.mapOutputs(outputs);\n this.checkOutputs(outputs);\n const inputNodes = names.map((name) => this.graph.nodes[parseNodeName(name)[0]]);\n const outputNodeNames = outputs.map((name) => parseNodeName(name)[0]);\n let outputNodes = outputNodeNames.map((name) => this.graph.nodes[name]);\n this.resetIntermediateTensors();\n if (outputNodes.length === 0) {\n outputNodes = this._outputs;\n }\n const compilationKey = this.getCompilationKey(inputNodes, outputNodes);\n let orderedNodes = this.compiledMap.get(compilationKey);\n if (orderedNodes == null) {\n orderedNodes = this.compile(inputs, outputNodes);\n this.compiledMap.set(compilationKey, orderedNodes);\n }\n const tensorArrayMap = {};\n const tensorListMap = {};\n return tidy(() => {\n const context = new ExecutionContext(this.weightMap, tensorArrayMap, tensorListMap, this.functionExecutorMap);\n const tensorsMap = Object.assign({}, this.weightMap);\n Object.keys(inputs).forEach((name) => {\n const [nodeName, index] = parseNodeName(name);\n const tensors = [];\n tensors[index] = inputs[name];\n tensorsMap[nodeName] = tensors;\n });\n const tensorsToKeep = this.getFrozenTensorIds(tensorsMap);\n const intermediateTensorConsumerCount = {};\n for (let i2 = 0; i2 < orderedNodes.length; i2++) {\n const node = orderedNodes[i2];\n if (!tensorsMap[node.name]) {\n const tensors = executeOp20(node, tensorsMap, context, this._resourceManager);\n if (util_exports.isPromise(tensors)) {\n throw new Error(`The execution of the op '${node.op}' returned a promise. Please use model.executeAsync() instead.`);\n }\n tensorsMap[node.name] = tensors;\n this.checkTensorForDisposal(node.name, node, tensorsMap, context, tensorsToKeep, outputNodeNames, intermediateTensorConsumerCount);\n }\n }\n if (this.parent == null) {\n context.dispose(tensorsToKeep);\n }\n return outputs.map((name) => getTensor(name, tensorsMap, context));\n });\n }\n getFrozenTensorIds(tensorMap) {\n const ids = [].concat.apply([], Object.keys(tensorMap).map((key) => tensorMap[key]).map((tensors) => tensors.map((tensor2) => tensor2.id)));\n return new Set(ids);\n }\n checkTensorForDisposal(nodeName, node, tensorMap, context, tensorsToKeep, outputNames, intermediateTensorConsumerCount) {\n if (node.category === \"control\" || outputNames.indexOf(nodeName) !== -1) {\n return;\n }\n tensorMap[nodeName].forEach((tensor2) => {\n if (tensor2 != null) {\n intermediateTensorConsumerCount[tensor2.id] = (intermediateTensorConsumerCount[tensor2.id] || 0) + node.children.length;\n }\n });\n node.inputs.forEach((input2) => {\n if (input2.category !== \"control\") {\n const tensors = getTensorsForCurrentContenxt(input2.name, tensorMap, context);\n if (tensors != null) {\n tensors.forEach((tensor2) => {\n if (tensor2 && !tensor2.kept && !tensorsToKeep.has(tensor2.id)) {\n const count2 = intermediateTensorConsumerCount[tensor2.id];\n if (count2 === 1) {\n if (!this.keepTensorForDebug) {\n tensor2.dispose();\n } else {\n const [nodeName2, index] = getNodeNameAndIndex(node.name, context);\n if (this.intermediateTensors[nodeName2]) {\n this.intermediateTensors[nodeName2][index] = tensor2;\n } else {\n this.intermediateTensors[nodeName2] = [];\n this.intermediateTensors[nodeName2][index] = tensor2;\n }\n }\n delete intermediateTensorConsumerCount[tensor2.id];\n } else if (count2 != null) {\n intermediateTensorConsumerCount[tensor2.id]--;\n }\n }\n });\n }\n }\n });\n }\n async executeAsync(inputs, outputs) {\n return this._executeAsync(inputs, outputs);\n }\n disposeIntermediateTensors() {\n if (!this.intermediateTensors) {\n return;\n }\n Object.keys(this.intermediateTensors).forEach((key) => this.intermediateTensors[key].forEach((tensor2) => tensor2.dispose()));\n this.disposeTensorsMap();\n }\n disposeTensorsMap() {\n if (!this.tensorsMap) {\n return;\n }\n Object.keys(this.tensorsMap).forEach((key) => {\n const tensorArray = this.tensorsMap[key];\n tensorArray.forEach((tensor2) => {\n if (tensor2 && !tensor2.kept && !tensor2.isDisposed && !this.keepIds.has(tensor2.id)) {\n tensor2.dispose();\n }\n });\n });\n }\n getIntermediateTensors() {\n return this.tensorsMap;\n }\n resetIntermediateTensors() {\n for (const key in this.intermediateTensors) {\n this.intermediateTensors[key].forEach((tensor2) => tensor2.dispose());\n delete this.intermediateTensors[key];\n }\n }\n async _executeAsync(inputs, outputs, isFunctionExecution = false, tensorArrayMap = {}, tensorListMap = {}) {\n if (!isFunctionExecution) {\n inputs = this.mapInputs(inputs);\n this.checkInputs(inputs);\n this.checkInputShapeAndType(inputs);\n outputs = this.mapOutputs(outputs);\n this.checkOutputs(outputs);\n }\n try {\n this.keepTensorForDebug = env().getBool(\"KEEP_INTERMEDIATE_TENSORS\");\n } catch (e2) {\n console.warn(e2.message);\n }\n this.resetIntermediateTensors();\n const context = new ExecutionContext(this.weightMap, tensorArrayMap, tensorListMap, this.functionExecutorMap);\n this.tensorsMap = await this.executeWithControlFlow(inputs, context, outputs, isFunctionExecution);\n const results = outputs.map((name) => getTensor(name, this.tensorsMap, context));\n const outputIds = results.map((t2) => t2.id);\n const inputIds = Object.keys(inputs).map((name) => inputs[name].id);\n this.keepIds = /* @__PURE__ */ new Set([...outputIds, ...inputIds, ...this.weightIds]);\n if (!this.keepTensorForDebug) {\n this.disposeTensorsMap();\n }\n if (this.parent == null) {\n context.dispose(this.keepIds);\n }\n return results;\n }\n async executeFunctionAsync(inputs, tensorArrayMap, tensorListMap) {\n const mappedInputs = inputs.reduce((map, tensor2, index) => {\n map[this.inputs[index].name] = tensor2;\n return map;\n }, {});\n return this._executeAsync(mappedInputs, this.outputNodes, true, tensorArrayMap, tensorListMap);\n }\n async executeWithControlFlow(inputs, context, outputNames, isFunctionExecution) {\n const names = Object.keys(inputs);\n const inputNodes = names.map((name) => this.graph.nodes[parseNodeName(name)[0]]);\n const outputNodeNames = outputNames.map((name) => parseNodeName(name)[0]);\n let outputNodes = outputNodeNames.map((name) => this.graph.nodes[name]);\n if (outputNodes.length === 0) {\n outputNodes = this._outputs;\n }\n const { usedNodes, missingInputs, dynamicNode, syncInputs } = getExecutionSubgraph(inputs, outputNodes, this.weightMap, this._initNodes);\n const stack2 = [\n ...inputNodes,\n ...this.graph.weights,\n ...this._initNodes || []\n ].map((node) => {\n return { node, contexts: context.currentContext };\n });\n const tensorsMap = Object.assign({}, this.weightMap);\n Object.keys(inputs).forEach((name) => {\n const [nodeName, index] = parseNodeName(name);\n const tensors = [];\n tensors[index] = inputs[name];\n tensorsMap[nodeName] = tensors;\n });\n const intermediateTensorConsumerCount = {};\n const tensorsToKeep = this.getFrozenTensorIds(tensorsMap);\n const added = {};\n while (stack2.length > 0) {\n const promises = this.processStack(inputNodes, stack2, context, tensorsMap, added, tensorsToKeep, outputNodeNames, intermediateTensorConsumerCount, usedNodes);\n await Promise.all(promises);\n }\n if (dynamicNode == null && !isFunctionExecution) {\n console.warn(`This model execution did not contain any nodes with control flow or dynamic output shapes. You can use model.execute() instead.`);\n }\n const missingOutputs = outputNodes.filter((node) => !isControlFlow(node) && !getTensor(node.name, tensorsMap, context)).map((node) => node.name);\n if (missingOutputs.length > 0) {\n let alternativeMsg = \"\";\n if (dynamicNode != null) {\n alternativeMsg = `Alternatively, to avoid the dynamic ops, use model.execute() and specify the inputs [${syncInputs}]`;\n }\n throw new Error(`Cannot compute the outputs [${missingOutputs}] from the provided inputs [${names}]. Consider providing the following inputs: [${missingInputs}]. ${alternativeMsg}`);\n }\n return tensorsMap;\n }\n processStack(inputNodes, stack2, context, tensorMap, added, tensorsToKeep, outputNames, intermediateTensorConsumerCount, usedNodes) {\n const promises = [];\n while (stack2.length > 0) {\n const item = stack2.pop();\n context.currentContext = item.contexts;\n let nodeName = \"\";\n if (item.node.op === \"Enter\" && getParamValue(\"isConstant\", item.node, tensorMap, context)) {\n [nodeName] = getNodeNameAndIndex(item.node.name, context);\n }\n if (tensorMap[item.node.name] == null) {\n const tensors = executeOp20(item.node, tensorMap, context, this._resourceManager);\n if (!nodeName) {\n [nodeName] = getNodeNameAndIndex(item.node.name, context);\n }\n const currentContext = context.currentContext;\n if (util_exports.isPromise(tensors)) {\n promises.push(tensors.then((t2) => {\n tensorMap[nodeName] = t2;\n context.currentContext = currentContext;\n this.checkTensorForDisposal(nodeName, item.node, tensorMap, context, tensorsToKeep, outputNames, intermediateTensorConsumerCount);\n this.processChildNodes(item.node, stack2, context, tensorMap, added, usedNodes);\n return t2;\n }));\n } else {\n tensorMap[nodeName] = tensors;\n this.checkTensorForDisposal(nodeName, item.node, tensorMap, context, tensorsToKeep, outputNames, intermediateTensorConsumerCount);\n this.processChildNodes(item.node, stack2, context, tensorMap, added, usedNodes);\n }\n } else {\n this.processChildNodes(item.node, stack2, context, tensorMap, added, usedNodes);\n }\n }\n return promises;\n }\n processChildNodes(node, stack2, context, tensorMap, added, usedNodes) {\n node.children.forEach((childNode) => {\n const [nodeName] = getNodeNameAndIndex(childNode.name, context);\n if (added[nodeName] || !usedNodes.has(childNode.name)) {\n return;\n }\n if (childNode.op === \"Merge\") {\n if (childNode.inputNames.some((name) => {\n return !!getTensor(name, tensorMap, context);\n })) {\n added[nodeName] = true;\n stack2.push({ contexts: context.currentContext, node: childNode });\n }\n } else if (childNode.inputNames.every((name) => {\n return !!getTensor(name, tensorMap, context);\n })) {\n added[nodeName] = true;\n stack2.push({ contexts: context.currentContext, node: childNode });\n }\n });\n }\n dispose() {\n Object.keys(this.weightMap).forEach((key) => this.weightMap[key].forEach((tensor2) => tensor2.dispose()));\n }\n checkInputShapeAndType(inputs) {\n Object.keys(inputs).forEach((name) => {\n const input2 = inputs[name];\n const [nodeName] = parseNodeName(name);\n const node = this.graph.nodes[nodeName];\n if (node.attrParams[\"shape\"] && node.attrParams[\"shape\"].value) {\n const shape = node.attrParams[\"shape\"].value;\n const match = shape.length === input2.shape.length && input2.shape.every((dim, index) => shape[index] === -1 || shape[index] === dim);\n util_exports.assert(match, () => `The shape of dict['${node.name}'] provided in model.execute(dict) must be [${shape}], but was [${input2.shape}]`);\n }\n if (node.attrParams[\"dtype\"] && node.attrParams[\"dtype\"].value) {\n util_exports.assert(input2.dtype === node.attrParams[\"dtype\"].value, () => `The dtype of dict['${node.name}'] provided in model.execute(dict) must be ${node.attrParams[\"dtype\"].value}, but was ${input2.dtype}`);\n }\n });\n }\n mapInputs(inputs) {\n const result = {};\n for (const inputName in inputs) {\n if (this._signature != null && this._signature.inputs != null && this._signature.inputs[inputName] != null) {\n const tensor2 = this._signature.inputs[inputName];\n result[tensor2.name] = inputs[inputName];\n } else {\n result[inputName] = inputs[inputName];\n }\n }\n return result;\n }\n checkInputs(inputs) {\n const notInGraph = Object.keys(inputs).filter((name) => {\n const [nodeName] = parseNodeName(name);\n return this.graph.nodes[nodeName] == null;\n });\n if (notInGraph.length > 0) {\n throw new Error(`The dict provided in model.execute(dict) has keys: [${notInGraph}] that are not part of graph`);\n }\n }\n mapOutputs(outputs) {\n return outputs.map((name) => {\n if (this._signature != null && this._signature.outputs != null && this._signature.outputs[name] != null) {\n const tensor2 = this._signature.outputs[name];\n return tensor2.name;\n }\n return name;\n }, {});\n }\n checkOutputs(outputs) {\n outputs.forEach((name) => {\n const [normalizedName] = parseNodeName(name);\n if (!this.graph.nodes[normalizedName]) {\n throw new Error(`The output '${name}' is not found in the graph`);\n }\n });\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/executor/resource_manager.js\nvar ResourceManager = class {\n constructor(hashTableNameToHandle = {}, hashTableMap = {}) {\n this.hashTableNameToHandle = hashTableNameToHandle;\n this.hashTableMap = hashTableMap;\n }\n addHashTable(name, hashTable) {\n this.hashTableNameToHandle[name] = hashTable.handle;\n this.hashTableMap[hashTable.id] = hashTable;\n }\n getHashTableHandleByName(name) {\n return this.hashTableNameToHandle[name];\n }\n getHashTableById(id) {\n return this.hashTableMap[id];\n }\n dispose() {\n for (const key in this.hashTableMap) {\n this.hashTableMap[key].clearAndClose();\n delete this.hashTableMap[key];\n }\n for (const name in this.hashTableNameToHandle) {\n this.hashTableNameToHandle[name].dispose();\n delete this.hashTableNameToHandle[name];\n }\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/executor/graph_model.js\nvar TFHUB_SEARCH_PARAM = \"?tfjs-format=file\";\nvar DEFAULT_MODEL_NAME = \"model.json\";\nvar GraphModel = class {\n constructor(modelUrl, loadOptions = {}, tfio = io_exports) {\n this.modelUrl = modelUrl;\n this.loadOptions = loadOptions;\n this.version = \"n/a\";\n this.io = tfio;\n if (loadOptions == null) {\n this.loadOptions = {};\n }\n this.resourceManager = new ResourceManager();\n }\n get modelVersion() {\n return this.version;\n }\n get inputNodes() {\n return this.executor.inputNodes;\n }\n get outputNodes() {\n return this.executor.outputNodes;\n }\n get inputs() {\n return this.executor.inputs;\n }\n get outputs() {\n return this.executor.outputs;\n }\n get weights() {\n return this.executor.weightMap;\n }\n get metadata() {\n return this.artifacts.userDefinedMetadata;\n }\n get modelSignature() {\n return this.signature;\n }\n get modelStructuredOutputKeys() {\n return this.structuredOutputKeys;\n }\n findIOHandler() {\n const path = this.modelUrl;\n if (path.load != null) {\n this.handler = path;\n } else if (this.loadOptions.requestInit != null) {\n this.handler = this.io.browserHTTPRequest(path, this.loadOptions);\n } else {\n const handlers = this.io.getLoadHandlers(path, this.loadOptions);\n if (handlers.length === 0) {\n handlers.push(this.io.browserHTTPRequest(path, this.loadOptions));\n } else if (handlers.length > 1) {\n throw new Error(`Found more than one (${handlers.length}) load handlers for URL '${[path]}'`);\n }\n this.handler = handlers[0];\n }\n }\n load() {\n this.findIOHandler();\n if (this.handler.load == null) {\n throw new Error(\"Cannot proceed with model loading because the IOHandler provided does not have the `load` method implemented.\");\n }\n const loadResult = this.handler.load();\n if (util_exports.isPromise(loadResult)) {\n return loadResult.then((artifacts) => this.loadSync(artifacts));\n }\n return this.loadSync(loadResult);\n }\n loadSync(artifacts) {\n this.artifacts = artifacts;\n const graph = this.artifacts.modelTopology;\n let signature = this.artifacts.signature;\n if (this.artifacts.userDefinedMetadata != null) {\n const metadata = this.artifacts.userDefinedMetadata;\n if (metadata.signature != null) {\n signature = metadata.signature;\n }\n if (metadata.structuredOutputKeys != null) {\n this.structuredOutputKeys = metadata.structuredOutputKeys;\n }\n }\n this.signature = signature;\n this.version = `${graph.versions.producer}.${graph.versions.minConsumer}`;\n const weightMap = this.io.decodeWeights(this.artifacts.weightData, this.artifacts.weightSpecs);\n this.executor = new GraphExecutor(OperationMapper.Instance.transformGraph(graph, this.signature));\n this.executor.weightMap = this.convertTensorMapToTensorsMap(weightMap);\n this.executor.resourceManager = this.resourceManager;\n if (artifacts.modelInitializer != null && artifacts.modelInitializer.node != null) {\n const initializer = OperationMapper.Instance.transformGraph(artifacts.modelInitializer);\n this.initializer = new GraphExecutor(initializer);\n this.initializer.weightMap = this.executor.weightMap;\n this.initializer.resourceManager = this.resourceManager;\n this.initializer.executeAsync({}, []);\n }\n return true;\n }\n async save(handlerOrURL, config) {\n if (typeof handlerOrURL === \"string\") {\n const handlers = this.io.getSaveHandlers(handlerOrURL);\n if (handlers.length === 0) {\n throw new Error(`Cannot find any save handlers for URL '${handlerOrURL}'`);\n } else if (handlers.length > 1) {\n throw new Error(`Found more than one (${handlers.length}) save handlers for URL '${handlerOrURL}'`);\n }\n handlerOrURL = handlers[0];\n }\n if (handlerOrURL.save == null) {\n throw new Error(\"GraphModel.save() cannot proceed because the IOHandler provided does not have the `save` attribute defined.\");\n }\n return handlerOrURL.save(this.artifacts);\n }\n predict(inputs, config) {\n const outputTensors = this.execute(inputs, this.outputNodes);\n if (this.structuredOutputKeys) {\n const outputTensorsArray = outputTensors instanceof Tensor ? [outputTensors] : outputTensors;\n const outputTensorMap = {};\n outputTensorsArray.forEach((outputTensor, i2) => outputTensorMap[this.structuredOutputKeys[i2]] = outputTensor);\n return outputTensorMap;\n }\n return outputTensors;\n }\n normalizeInputs(inputs) {\n if (!(inputs instanceof Tensor) && !Array.isArray(inputs)) {\n return inputs;\n }\n inputs = Array.isArray(inputs) ? inputs : [inputs];\n if (inputs.length !== this.inputNodes.length) {\n throw new Error(`Input tensor count mismatch,the graph model has ${this.inputNodes.length} placeholders, while there are ${inputs.length} input tensors.`);\n }\n return this.inputNodes.reduce((map, inputName, i2) => {\n map[inputName] = inputs[i2];\n return map;\n }, {});\n }\n normalizeOutputs(outputs) {\n outputs = outputs || this.outputNodes;\n return !Array.isArray(outputs) ? [outputs] : outputs;\n }\n execute(inputs, outputs) {\n inputs = this.normalizeInputs(inputs);\n outputs = this.normalizeOutputs(outputs);\n const result = this.executor.execute(inputs, outputs);\n return result.length > 1 ? result : result[0];\n }\n async executeAsync(inputs, outputs) {\n inputs = this.normalizeInputs(inputs);\n outputs = this.normalizeOutputs(outputs);\n const result = await this.executor.executeAsync(inputs, outputs);\n return result.length > 1 ? result : result[0];\n }\n getIntermediateTensors() {\n return this.executor.getIntermediateTensors();\n }\n disposeIntermediateTensors() {\n this.executor.disposeIntermediateTensors();\n }\n convertTensorMapToTensorsMap(map) {\n return Object.keys(map).reduce((newMap, key) => {\n newMap[key] = [map[key]];\n return newMap;\n }, {});\n }\n dispose() {\n this.executor.dispose();\n if (this.initializer) {\n this.initializer.dispose();\n }\n this.resourceManager.dispose();\n }\n};\nasync function loadGraphModel(modelUrl, options = {}, tfio = io_exports) {\n if (modelUrl == null) {\n throw new Error(\"modelUrl in loadGraphModel() cannot be null. Please provide a url or an IOHandler that loads the model\");\n }\n if (options == null) {\n options = {};\n }\n if (options.fromTFHub && typeof modelUrl === \"string\") {\n modelUrl = getTFHubUrl(modelUrl);\n }\n const model2 = new GraphModel(modelUrl, options, tfio);\n await model2.load();\n return model2;\n}\nfunction loadGraphModelSync(modelSource) {\n if (modelSource == null) {\n throw new Error(\"modelUrl in loadGraphModelSync() cannot be null. Please provide model artifacts or an IOHandler that loads the model\");\n }\n let ioHandler;\n if (modelSource instanceof Array) {\n const [modelJSON, weights] = modelSource;\n if (!modelJSON) {\n throw new Error(\"modelJSON must be the first element of the array\");\n }\n if (!weights || !(weights instanceof ArrayBuffer)) {\n throw new Error(\"An ArrayBuffer of weights must be the second element of the array\");\n }\n if (!(\"modelTopology\" in modelJSON)) {\n throw new Error(\"Model JSON is missing 'modelTopology'\");\n }\n if (!(\"weightsManifest\" in modelJSON)) {\n throw new Error(\"Model JSON is missing 'weightsManifest'\");\n }\n const weightSpecs = io_exports.getWeightSpecs(modelJSON.weightsManifest);\n const modelArtifacts = io_exports.getModelArtifactsForJSONSync(modelJSON, weightSpecs, weights);\n ioHandler = io_exports.fromMemorySync(modelArtifacts);\n } else if (\"load\" in modelSource) {\n ioHandler = modelSource;\n } else if (\"modelTopology\" in modelSource && \"weightSpecs\" in modelSource && \"weightData\" in modelSource) {\n ioHandler = io_exports.fromMemorySync(modelSource);\n } else {\n throw new Error(\"Unknown model format\");\n }\n const model2 = new GraphModel(ioHandler);\n model2.load();\n return model2;\n}\nfunction getTFHubUrl(modelUrl) {\n if (!modelUrl.endsWith(\"/\")) {\n modelUrl = modelUrl + \"/\";\n }\n return `${modelUrl}${DEFAULT_MODEL_NAME}${TFHUB_SEARCH_PARAM}`;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/version.js\nvar version3 = \"3.21.0\";\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/index.js\nvar dist_exports2 = {};\n__export(dist_exports2, {\n CSVDataset: () => CSVDataset,\n Dataset: () => Dataset,\n FileDataSource: () => FileDataSource,\n TextLineDataset: () => TextLineDataset,\n URLDataSource: () => URLDataSource,\n array: () => array,\n csv: () => csv,\n func: () => func,\n generator: () => generator,\n microphone: () => microphone,\n version_data: () => version4,\n webcam: () => webcam,\n zip: () => zip\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/dataset.js\nvar seedrandom3 = __toESM(require_seedrandom2());\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/iterators/lazy_iterator.js\nvar seedrandom2 = __toESM(require_seedrandom2());\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/util/deep_map.js\nfunction deepMap(input2, mapFn) {\n return deepMapInternal(input2, mapFn);\n}\nfunction deepMapInternal(input2, mapFn, seen = /* @__PURE__ */ new Map(), containedIn = /* @__PURE__ */ new Set()) {\n if (input2 == null) {\n return null;\n }\n if (typeof Blob === \"function\" && input2 instanceof Blob) {\n return input2.slice();\n }\n if (containedIn.has(input2)) {\n throw new Error(\"Circular references are not supported.\");\n }\n if (seen.has(input2)) {\n return seen.get(input2);\n }\n const result = mapFn(input2);\n if (result.recurse && result.value !== null) {\n throw new Error(\"A deep map function may not return both a value and recurse=true.\");\n }\n if (!result.recurse) {\n seen.set(input2, result.value);\n return result.value;\n } else if (isIterable2(input2)) {\n const mappedIterable = Array.isArray(input2) ? [] : {};\n containedIn.add(input2);\n for (const k in input2) {\n const child = input2[k];\n const childResult = deepMapInternal(child, mapFn, seen, containedIn);\n mappedIterable[k] = childResult;\n }\n containedIn.delete(input2);\n if (input2.__proto__) {\n mappedIterable.__proto__ = input2.__proto__;\n }\n return mappedIterable;\n } else {\n throw new Error(`Can't recurse into non-iterable type: ${input2}`);\n }\n}\nfunction deepZip(inputs, zipFn = zipToList) {\n return deepZipInternal(inputs, zipFn);\n}\nfunction deepZipInternal(inputs, zipFn, containedIn = /* @__PURE__ */ new Set()) {\n const input2 = inputs[0];\n if (containedIn.has(input2)) {\n throw new Error(\"Circular references are not supported.\");\n }\n const result = zipFn(inputs);\n if (result.recurse && result.value !== null) {\n throw new Error(\"A deep zip function may not return both a value and recurse=true.\");\n }\n if (!result.recurse) {\n return result.value;\n } else if (isIterable2(input2)) {\n const mappedIterable = Array.isArray(input2) ? [] : {};\n containedIn.add(input2);\n for (const k in input2) {\n const children = inputs.map((x) => x[k]);\n const childResult = deepZipInternal(children, zipFn, containedIn);\n mappedIterable[k] = childResult;\n }\n containedIn.delete(input2);\n return mappedIterable;\n } else {\n throw new Error(`Can't recurse into non-iterable type: ${input2}`);\n }\n}\nfunction zipToList(x) {\n if (x === null) {\n return null;\n }\n if (isIterable2(x[0])) {\n return { value: null, recurse: true };\n } else {\n return { value: x, recurse: false };\n }\n}\nasync function deepMapAndAwaitAll(input2, mapFn) {\n const seen = /* @__PURE__ */ new Map();\n deepMapInternal(input2, mapFn, seen);\n for (const key of Array.from(seen.keys())) {\n const value = seen.get(key);\n if (util_exports.isPromise(value)) {\n const mappedValue = await value;\n seen.set(key, mappedValue);\n }\n }\n const result = deepMapInternal(input2, mapFn, seen);\n return result;\n}\nfunction isIterable2(obj) {\n let isTextDecoder = false;\n if (env().get(\"IS_BROWSER\")) {\n isTextDecoder = obj instanceof TextDecoder;\n } else {\n const { StringDecoder } = require_string_decoder();\n isTextDecoder = obj instanceof StringDecoder;\n }\n return obj != null && !ArrayBuffer.isView(obj) && (Array.isArray(obj) || typeof obj === \"object\" && !(obj instanceof Tensor) && !(obj instanceof Promise) && !isTextDecoder);\n}\nfunction canTensorify(obj) {\n return obj == null || isPrimitive(obj) || Array.isArray(obj) || typeof obj === \"object\" && obj instanceof Tensor || util_exports.isTypedArray(obj);\n}\nfunction isPrimitive(value) {\n return value === null || typeof value !== \"object\" && typeof value !== \"function\";\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/util/deep_clone.js\nfunction deepClone(container) {\n return deepMap(container, cloneIfTensor);\n}\nfunction cloneIfTensor(item) {\n if (item instanceof Tensor) {\n return { value: item.clone(), recurse: false };\n } else if (isIterable2(item)) {\n return { value: null, recurse: true };\n } else {\n return { value: item, recurse: false };\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/util/ring_buffer.js\nvar RingBuffer = class {\n constructor(capacity) {\n this.capacity = capacity;\n this.begin = 0;\n this.end = 0;\n if (capacity == null) {\n throw new RangeError(\"Can't create a ring buffer of unknown capacity.\");\n }\n if (capacity < 1) {\n throw new RangeError(\"Can't create ring buffer of capacity < 1.\");\n }\n this.data = new Array(capacity);\n this.doubledCapacity = 2 * capacity;\n }\n wrap(index) {\n while (index < 0) {\n index += this.doubledCapacity;\n }\n return index % this.doubledCapacity;\n }\n get(index) {\n if (index < 0) {\n throw new RangeError(\"Can't get item at a negative index.\");\n }\n return this.data[index % this.capacity];\n }\n set(index, value) {\n if (index < 0) {\n throw new RangeError(\"Can't set item at a negative index.\");\n }\n this.data[index % this.capacity] = value;\n }\n length() {\n let length = this.end - this.begin;\n if (length < 0) {\n length = this.doubledCapacity + length;\n }\n return length;\n }\n isFull() {\n return this.length() === this.capacity;\n }\n isEmpty() {\n return this.length() === 0;\n }\n push(value) {\n if (this.isFull()) {\n throw new RangeError(\"Ring buffer is full.\");\n }\n this.set(this.end, value);\n this.end = this.wrap(this.end + 1);\n }\n pushAll(values) {\n for (const value of values) {\n this.push(value);\n }\n }\n pop() {\n if (this.isEmpty()) {\n throw new RangeError(\"Ring buffer is empty.\");\n }\n this.end = this.wrap(this.end - 1);\n const result = this.get(this.end);\n this.set(this.end, void 0);\n return result;\n }\n unshift(value) {\n if (this.isFull()) {\n throw new RangeError(\"Ring buffer is full.\");\n }\n this.begin = this.wrap(this.begin - 1);\n this.set(this.begin, value);\n }\n shift() {\n if (this.isEmpty()) {\n throw new RangeError(\"Ring buffer is empty.\");\n }\n const result = this.get(this.begin);\n this.set(this.begin, void 0);\n this.begin = this.wrap(this.begin + 1);\n return result;\n }\n shuffleExcise(relativeIndex) {\n if (this.isEmpty()) {\n throw new RangeError(\"Ring buffer is empty.\");\n }\n const index = this.wrap(this.begin + relativeIndex);\n const result = this.get(index);\n this.set(index, this.pop());\n return result;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/util/growing_ring_buffer.js\nvar GrowingRingBuffer = class extends RingBuffer {\n constructor() {\n super(GrowingRingBuffer.INITIAL_CAPACITY);\n }\n isFull() {\n return false;\n }\n push(value) {\n if (super.isFull()) {\n this.expand();\n }\n super.push(value);\n }\n unshift(value) {\n if (super.isFull()) {\n this.expand();\n }\n super.unshift(value);\n }\n expand() {\n const newCapacity = this.capacity * 2;\n const newData = new Array(newCapacity);\n const len = this.length();\n for (let i2 = 0; i2 < len; i2++) {\n newData[i2] = this.get(this.wrap(this.begin + i2));\n }\n this.data = newData;\n this.capacity = newCapacity;\n this.doubledCapacity = 2 * this.capacity;\n this.begin = 0;\n this.end = len;\n }\n};\nGrowingRingBuffer.INITIAL_CAPACITY = 32;\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/iterators/lazy_iterator.js\nfunction iteratorFromItems(items) {\n return new ArrayIterator(items);\n}\nfunction iteratorFromFunction(func2) {\n return new FunctionCallIterator(func2);\n}\nfunction iteratorFromConcatenated(baseIterators, baseErrorHandler) {\n return new ChainedIterator(baseIterators, baseErrorHandler);\n}\nfunction iteratorFromZipped(iterators, mismatchMode = ZipMismatchMode.FAIL) {\n return new ZipIterator(iterators, mismatchMode);\n}\nvar LazyIterator = class {\n async toArray() {\n const result = [];\n let x = await this.next();\n while (!x.done) {\n result.push(x.value);\n x = await this.next();\n }\n return result;\n }\n async toArrayForTest() {\n const stream = this.prefetch(100);\n const result = [];\n let x = await stream.next();\n while (!x.done) {\n result.push(x.value);\n x = await stream.next();\n }\n return result;\n }\n async resolveFully() {\n let x = await this.next();\n while (!x.done) {\n x = await this.next();\n }\n }\n async resolveWhile(predicate) {\n let x = await this.next();\n let shouldContinue = predicate(x.value);\n while (!x.done && shouldContinue) {\n x = await this.next();\n shouldContinue = predicate(x.value);\n }\n }\n handleErrors(handler) {\n return new ErrorHandlingLazyIterator(this, handler);\n }\n filter(predicate) {\n return new FilterIterator(this, predicate);\n }\n map(transform6) {\n return new MapIterator(this, transform6);\n }\n mapAsync(transform6) {\n return new AsyncMapIterator(this, transform6);\n }\n serialMapAsync(transform6) {\n return new AsyncMapIterator(this, transform6).serial();\n }\n flatmap(transform6) {\n return new FlatmapIterator(this, transform6);\n }\n async forEachAsync(f) {\n return this.map(f).resolveFully();\n }\n async serialForEach(f) {\n return this.serialMapAsync(f).resolveWhile((x) => x === true);\n }\n rowMajorBatch(batchSize, smallLastBatch = true) {\n return new RowMajorBatchIterator(this, batchSize, smallLastBatch);\n }\n columnMajorBatch(batchSize, smallLastBatch = true, zipFn = zipToList) {\n const rowBatches = this.rowMajorBatch(batchSize, smallLastBatch);\n return rowBatches.map((x) => deepZip(x, zipFn));\n }\n concatenate(iterator, baseErrorHandler) {\n return new ChainedIterator(iteratorFromItems([this, iterator]), baseErrorHandler);\n }\n take(count2) {\n if (count2 < 0 || count2 == null) {\n return this;\n }\n return new TakeIterator(this, count2);\n }\n skip(count2) {\n if (count2 < 0 || count2 == null) {\n return this;\n }\n return new SkipIterator(this, count2);\n }\n prefetch(bufferSize) {\n return new PrefetchIterator(this, bufferSize);\n }\n shuffle(windowSize, seed) {\n return new ShuffleIterator(this, windowSize, seed);\n }\n serial() {\n return new SerialIterator(this);\n }\n};\nvar ArrayIterator = class extends LazyIterator {\n constructor(items) {\n super();\n this.items = items;\n this.trav = 0;\n }\n summary() {\n return `Array of ${this.items.length} items`;\n }\n async next() {\n if (this.trav >= this.items.length) {\n return { value: null, done: true };\n }\n const item = this.items[this.trav];\n this.trav++;\n return { value: deepClone(item), done: false };\n }\n};\nvar FunctionCallIterator = class extends LazyIterator {\n constructor(nextFn) {\n super();\n this.nextFn = nextFn;\n }\n summary() {\n return `Function call`;\n }\n async next() {\n try {\n return this.nextFn();\n } catch (e2) {\n e2.message = `Error thrown while iterating through a dataset: ${e2.message}`;\n throw e2;\n }\n }\n};\nvar SerialIterator = class extends LazyIterator {\n constructor(upstream) {\n super();\n this.upstream = upstream;\n this.lastRead = Promise.resolve({ value: null, done: false });\n }\n summary() {\n return `${this.upstream.summary()} -> Serial`;\n }\n async next() {\n this.lastRead = this.lastRead.then(() => this.serialNext());\n return this.lastRead;\n }\n async serialNext() {\n return this.upstream.next();\n }\n};\nvar SkipIterator = class extends LazyIterator {\n constructor(upstream, maxCount) {\n super();\n this.upstream = upstream;\n this.maxCount = maxCount;\n this.count = 0;\n this.lastRead = Promise.resolve({ value: null, done: false });\n }\n summary() {\n return `${this.upstream.summary()} -> Skip`;\n }\n async next() {\n this.lastRead = this.lastRead.then(() => this.serialNext());\n return this.lastRead;\n }\n async serialNext() {\n while (this.count++ < this.maxCount) {\n const skipped = await this.upstream.next();\n if (skipped.done) {\n return skipped;\n }\n dispose(skipped.value);\n }\n return this.upstream.next();\n }\n};\nvar TakeIterator = class extends LazyIterator {\n constructor(upstream, maxCount) {\n super();\n this.upstream = upstream;\n this.maxCount = maxCount;\n this.count = 0;\n }\n summary() {\n return `${this.upstream.summary()} -> Take`;\n }\n async next() {\n if (this.count++ >= this.maxCount) {\n return { value: null, done: true };\n }\n return this.upstream.next();\n }\n};\nvar RowMajorBatchIterator = class extends LazyIterator {\n constructor(upstream, batchSize, enableSmallLastBatch = true) {\n super();\n this.upstream = upstream;\n this.batchSize = batchSize;\n this.enableSmallLastBatch = enableSmallLastBatch;\n this.lastRead = Promise.resolve({ value: null, done: false });\n }\n summary() {\n return `${this.upstream.summary()} -> RowMajorBatch`;\n }\n async next() {\n this.lastRead = this.lastRead.then(() => this.serialNext());\n return this.lastRead;\n }\n async serialNext() {\n const batch = [];\n while (batch.length < this.batchSize) {\n const item = await this.upstream.next();\n if (item.done) {\n if (this.enableSmallLastBatch && batch.length > 0) {\n return { value: batch, done: false };\n }\n return { value: null, done: true };\n }\n batch.push(item.value);\n }\n return { value: batch, done: false };\n }\n};\nvar FilterIterator = class extends LazyIterator {\n constructor(upstream, predicate) {\n super();\n this.upstream = upstream;\n this.predicate = predicate;\n this.lastRead = Promise.resolve({ value: null, done: false });\n }\n summary() {\n return `${this.upstream.summary()} -> Filter`;\n }\n async next() {\n this.lastRead = this.lastRead.then(() => this.serialNext());\n return this.lastRead;\n }\n async serialNext() {\n while (true) {\n const item = await this.upstream.next();\n if (item.done || this.predicate(item.value)) {\n return item;\n }\n dispose(item.value);\n }\n }\n};\nvar MapIterator = class extends LazyIterator {\n constructor(upstream, transform6) {\n super();\n this.upstream = upstream;\n this.transform = transform6;\n }\n summary() {\n return `${this.upstream.summary()} -> Map`;\n }\n async next() {\n const item = await this.upstream.next();\n if (item.done) {\n return { value: null, done: true };\n }\n const inputTensors = tensor_util_exports.getTensorsInContainer(item.value);\n const mapped = this.transform(item.value);\n const outputTensors = tensor_util_exports.getTensorsInContainer(mapped);\n for (const t2 of inputTensors) {\n if (!tensor_util_exports.isTensorInList(t2, outputTensors)) {\n t2.dispose();\n }\n }\n return { value: mapped, done: false };\n }\n};\nvar ErrorHandlingLazyIterator = class extends LazyIterator {\n constructor(upstream, handler) {\n super();\n this.upstream = upstream;\n this.handler = handler;\n this.count = 0;\n this.lastRead = Promise.resolve({ value: null, done: false });\n }\n summary() {\n return `${this.upstream.summary()} -> handleErrors`;\n }\n async next() {\n this.lastRead = this.lastRead.then(() => this.serialNext());\n return this.lastRead;\n }\n async serialNext() {\n while (true) {\n try {\n return await this.upstream.next();\n } catch (e2) {\n if (!this.handler(e2)) {\n return { value: null, done: true };\n }\n }\n }\n }\n};\nvar AsyncMapIterator = class extends LazyIterator {\n constructor(upstream, transform6) {\n super();\n this.upstream = upstream;\n this.transform = transform6;\n }\n summary() {\n return `${this.upstream.summary()} -> AsyncMap`;\n }\n async next() {\n const item = await this.upstream.next();\n if (item.done) {\n return { value: null, done: true };\n }\n const inputTensors = tensor_util_exports.getTensorsInContainer(item.value);\n const mapped = await this.transform(item.value);\n const outputTensors = tensor_util_exports.getTensorsInContainer(mapped);\n for (const t2 of inputTensors) {\n if (!tensor_util_exports.isTensorInList(t2, outputTensors)) {\n t2.dispose();\n }\n }\n return { value: mapped, done: false };\n }\n};\nvar OneToManyIterator = class extends LazyIterator {\n constructor() {\n super();\n this.outputQueue = new GrowingRingBuffer();\n this.lastRead = Promise.resolve({ value: null, done: false });\n }\n async next() {\n this.lastRead = this.lastRead.then(() => this.serialNext());\n return this.lastRead;\n }\n async serialNext() {\n while (this.outputQueue.length() === 0) {\n if (!await this.pump()) {\n return { value: null, done: true };\n }\n }\n return { value: this.outputQueue.shift(), done: false };\n }\n};\nvar FlatmapIterator = class extends OneToManyIterator {\n constructor(upstream, transform6) {\n super();\n this.upstream = upstream;\n this.transform = transform6;\n }\n summary() {\n return `${this.upstream.summary()} -> Flatmap`;\n }\n async pump() {\n const item = await this.upstream.next();\n if (item.done) {\n return false;\n }\n const inputTensors = tensor_util_exports.getTensorsInContainer(item.value);\n const mappedArray = this.transform(item.value);\n const outputTensors = tensor_util_exports.getTensorsInContainer(mappedArray);\n this.outputQueue.pushAll(mappedArray);\n for (const t2 of inputTensors) {\n if (!tensor_util_exports.isTensorInList(t2, outputTensors)) {\n t2.dispose();\n }\n }\n return true;\n }\n};\nvar ChainedIterator = class extends LazyIterator {\n constructor(iterators, baseErrorHandler) {\n super();\n this.baseErrorHandler = baseErrorHandler;\n this.lastRead = null;\n this.iterator = null;\n this.moreIterators = iterators;\n }\n summary() {\n const upstreamSummaries = \"TODO: fill in upstream of chained summaries\";\n return `${upstreamSummaries} -> Chained`;\n }\n async next() {\n this.lastRead = this.readFromChain(this.lastRead);\n return this.lastRead;\n }\n async readFromChain(lastRead) {\n await lastRead;\n if (this.iterator == null) {\n const iteratorResult = await this.moreIterators.next();\n if (iteratorResult.done) {\n return { value: null, done: true };\n }\n this.iterator = iteratorResult.value;\n if (this.baseErrorHandler != null) {\n this.iterator = this.iterator.handleErrors(this.baseErrorHandler);\n }\n }\n const itemResult = await this.iterator.next();\n if (itemResult.done) {\n this.iterator = null;\n return this.readFromChain(lastRead);\n }\n return itemResult;\n }\n};\nvar ZipMismatchMode;\n(function(ZipMismatchMode2) {\n ZipMismatchMode2[ZipMismatchMode2[\"FAIL\"] = 0] = \"FAIL\";\n ZipMismatchMode2[ZipMismatchMode2[\"SHORTEST\"] = 1] = \"SHORTEST\";\n ZipMismatchMode2[ZipMismatchMode2[\"LONGEST\"] = 2] = \"LONGEST\";\n})(ZipMismatchMode || (ZipMismatchMode = {}));\nvar ZipIterator = class extends LazyIterator {\n constructor(iterators, mismatchMode = ZipMismatchMode.FAIL) {\n super();\n this.iterators = iterators;\n this.mismatchMode = mismatchMode;\n this.count = 0;\n this.currentPromise = null;\n }\n summary() {\n const upstreamSummaries = \"TODO: fill in upstream of zip summaries\";\n return `{${upstreamSummaries}} -> Zip`;\n }\n async nextState(afterState) {\n await afterState;\n let numIterators = 0;\n let iteratorsDone = 0;\n function getNext(container) {\n if (container instanceof LazyIterator) {\n const result = container.next();\n return {\n value: result.then((x) => {\n numIterators++;\n if (x.done) {\n iteratorsDone++;\n }\n return x.value;\n }),\n recurse: false\n };\n } else {\n return { value: null, recurse: true };\n }\n }\n const mapped = await deepMapAndAwaitAll(this.iterators, getNext);\n if (numIterators === iteratorsDone) {\n return { value: null, done: true };\n }\n if (iteratorsDone > 0) {\n switch (this.mismatchMode) {\n case ZipMismatchMode.FAIL:\n throw new Error(`Zipped streams should have the same length. Mismatched at element ${this.count}.`);\n case ZipMismatchMode.SHORTEST:\n return { value: null, done: true };\n case ZipMismatchMode.LONGEST:\n default:\n }\n }\n this.count++;\n return { value: mapped, done: false };\n }\n async next() {\n this.currentPromise = this.nextState(this.currentPromise);\n return this.currentPromise;\n }\n};\nvar PrefetchIterator = class extends LazyIterator {\n constructor(upstream, bufferSize) {\n super();\n this.upstream = upstream;\n this.bufferSize = bufferSize;\n this.buffer = new RingBuffer(bufferSize);\n }\n summary() {\n return `${this.upstream.summary()} -> Prefetch`;\n }\n refill() {\n while (!this.buffer.isFull()) {\n const v = this.upstream.next();\n this.buffer.push(v);\n }\n }\n next() {\n this.refill();\n return this.buffer.shift();\n }\n};\nvar ShuffleIterator = class extends PrefetchIterator {\n constructor(upstream, windowSize, seed) {\n super(upstream, windowSize);\n this.upstream = upstream;\n this.windowSize = windowSize;\n this.upstreamExhausted = false;\n this.random = seedrandom2.alea(seed || util_exports.now().toString());\n this.lastRead = Promise.resolve({ value: null, done: false });\n }\n async next() {\n this.lastRead = this.lastRead.then(() => this.serialNext());\n return this.lastRead;\n }\n randomInt(max7) {\n return Math.floor(this.random() * max7);\n }\n chooseIndex() {\n return this.randomInt(this.buffer.length());\n }\n async serialNext() {\n if (!this.upstreamExhausted) {\n this.refill();\n }\n while (!this.buffer.isEmpty()) {\n const chosenIndex = this.chooseIndex();\n const result = await this.buffer.shuffleExcise(chosenIndex);\n if (result.done) {\n this.upstreamExhausted = true;\n } else {\n this.refill();\n return result;\n }\n }\n return { value: null, done: true };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/dataset.js\nvar Dataset = class {\n constructor() {\n this.size = null;\n }\n batch(batchSize, smallLastBatch = true) {\n const base = this;\n util_exports.assert(batchSize > 0, () => `batchSize needs to be positive, but it is\n ${batchSize}`);\n let size;\n if (this.size === Infinity || this.size == null) {\n size = this.size;\n } else if (smallLastBatch) {\n size = Math.ceil(this.size / batchSize);\n } else {\n size = Math.floor(this.size / batchSize);\n }\n return datasetFromIteratorFn(async () => {\n return (await base.iterator()).columnMajorBatch(batchSize, smallLastBatch, deepBatchConcat);\n }, size);\n }\n concatenate(dataset) {\n const base = this;\n let size;\n if (this.size === Infinity || dataset.size === Infinity) {\n size = Infinity;\n } else if (this.size != null && dataset.size != null) {\n size = this.size + dataset.size;\n } else {\n size = null;\n }\n return datasetFromIteratorFn(async () => (await base.iterator()).concatenate(await dataset.iterator()), size);\n }\n filter(predicate) {\n const base = this;\n let size;\n if (this.size === Infinity) {\n size = Infinity;\n } else {\n size = null;\n }\n return datasetFromIteratorFn(async () => {\n return (await base.iterator()).filter((x) => tidy(() => predicate(x)));\n }, size);\n }\n async forEachAsync(f) {\n return (await this.iterator()).forEachAsync(f);\n }\n map(transform6) {\n const base = this;\n return datasetFromIteratorFn(async () => {\n return (await base.iterator()).map((x) => tidy(() => transform6(x)));\n }, this.size);\n }\n mapAsync(transform6) {\n const base = this;\n return datasetFromIteratorFn(async () => {\n return (await base.iterator()).mapAsync(transform6);\n }, this.size);\n }\n prefetch(bufferSize) {\n if (bufferSize == null) {\n throw new RangeError(\"`Dataset.prefetch()` requires bufferSize to be specified.\");\n }\n const base = this;\n return datasetFromIteratorFn(async () => (await base.iterator()).prefetch(bufferSize), this.size);\n }\n repeat(count2) {\n const base = this;\n let size;\n if (this.size != null && count2 > 0) {\n size = this.size * count2;\n } else if (count2 === 0) {\n size = 0;\n } else if (this.size != null && (count2 === void 0 || count2 < 0)) {\n size = Infinity;\n } else {\n size = null;\n }\n return datasetFromIteratorFn(async () => {\n const iteratorIterator = iteratorFromFunction(async () => ({ value: await base.iterator(), done: false }));\n return iteratorFromConcatenated(iteratorIterator.take(count2));\n }, size);\n }\n skip(count2) {\n const base = this;\n let size;\n if (this.size != null && count2 >= 0 && this.size >= count2) {\n size = this.size - count2;\n } else if (this.size != null && (this.size < count2 || count2 === void 0 || count2 < 0)) {\n size = 0;\n } else {\n size = null;\n }\n return datasetFromIteratorFn(async () => (await base.iterator()).skip(count2), size);\n }\n shuffle(bufferSize, seed, reshuffleEachIteration = true) {\n if (bufferSize == null || bufferSize < 0) {\n if (this.size == null) {\n throw new RangeError(\"`Dataset.shuffle()` requires bufferSize to be specified.\");\n } else {\n throw new RangeError(`\\`Dataset.shuffle()\\` requires bufferSize to be specified. If your data fits in main memory (for regular JS objects), and/or GPU memory (for \\`tf.Tensor\\`s), consider setting bufferSize to the dataset size (${this.size} elements)`);\n }\n }\n const base = this;\n const random = seedrandom3.alea(seed || util_exports.now().toString());\n return datasetFromIteratorFn(async () => {\n let seed2 = random.int32();\n if (reshuffleEachIteration) {\n seed2 += random.int32();\n }\n return (await base.iterator()).shuffle(bufferSize, seed2.toString());\n }, this.size);\n }\n take(count2) {\n const base = this;\n let size;\n if (this.size != null && this.size > count2) {\n size = count2;\n } else if (this.size != null && this.size <= count2) {\n size = this.size;\n } else {\n size = null;\n }\n return datasetFromIteratorFn(async () => (await base.iterator()).take(count2), size);\n }\n async toArray() {\n if (this.size === Infinity) {\n throw new Error(\"Can not convert infinite data stream to array.\");\n }\n return (await this.iterator()).toArray();\n }\n async toArrayForTest() {\n if (this.size === Infinity) {\n throw new Error(\"Can not convert infinite data stream to array.\");\n }\n return (await this.iterator()).toArrayForTest();\n }\n};\nDataset.MAX_BUFFER_SIZE = 1e4;\nfunction datasetFromIteratorFn(iteratorFn, size = null) {\n return new class extends Dataset {\n constructor() {\n super(...arguments);\n this.size = size;\n }\n async iterator() {\n return iteratorFn();\n }\n }();\n}\nfunction array(items) {\n return datasetFromIteratorFn(async () => iteratorFromItems(items), items.length);\n}\nfunction zip(datasets) {\n if (!isIterable2(datasets)) {\n throw new Error(\"The argument to zip() must be an object or array.\");\n }\n let size;\n if (Array.isArray(datasets)) {\n for (let i2 = 0; i2 < datasets.length; i2++) {\n size = size == null ? datasets[i2].size : Math.min(size, datasets[i2].size);\n }\n } else if (datasets instanceof Object) {\n for (const ds in datasets) {\n size = size == null ? datasets[ds].size : Math.min(size, datasets[ds].size);\n }\n }\n return datasetFromIteratorFn(async () => {\n const streams = await deepMapAndAwaitAll(datasets, (d) => {\n if (d instanceof Dataset) {\n return { value: d.iterator(), recurse: false };\n } else if (isIterable2(d)) {\n return { value: null, recurse: true };\n } else {\n throw new Error(\"Leaves of the structure passed to zip() must be Datasets, not primitives.\");\n }\n });\n return iteratorFromZipped(streams, ZipMismatchMode.SHORTEST);\n }, size);\n}\nfunction deepBatchConcat(rows) {\n if (rows === null) {\n return null;\n }\n const exampleRow = rows[0];\n if (canTensorify(exampleRow)) {\n const value = batchConcat(rows);\n return { value, recurse: false };\n }\n return { value: null, recurse: true };\n}\nfunction batchConcat(arrays) {\n if (arrays.length === 0) {\n throw new Error(\"Can't make a batch of zero elements.\");\n }\n if (arrays[0] instanceof Tensor) {\n return stack(arrays);\n } else {\n return tensor(arrays);\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/datasets/text_line_dataset.js\nvar TextLineDataset = class extends Dataset {\n constructor(input2) {\n super();\n this.input = input2;\n }\n async iterator() {\n const inputIterator = await this.input.iterator();\n const utf8Iterator = inputIterator.decodeUTF8();\n const lineIterator = utf8Iterator.split(\"\\n\").map((line) => {\n if (line.endsWith(\"\\r\")) {\n line = line.slice(0, -1);\n }\n return line;\n });\n return lineIterator;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/datasets/csv_dataset.js\nvar CODE_QUOTE = '\"';\nvar STATE_OUT = Symbol(\"out\");\nvar STATE_FIELD = Symbol(\"field\");\nvar STATE_QUOTE = Symbol(\"quote\");\nvar STATE_QUOTE_AFTER_QUOTE = Symbol(\"quoteafterquote\");\nvar STATE_WITHIN_QUOTE_IN_QUOTE = Symbol(\"quoteinquote\");\nvar CSVDataset = class extends Dataset {\n constructor(input2, csvConfig) {\n super();\n this.input = input2;\n this.hasHeader = true;\n this.fullColumnNames = null;\n this.columnNamesValidated = false;\n this.columnConfigs = null;\n this.configuredColumnsOnly = false;\n this.delimiter = \",\";\n this.delimWhitespace = false;\n this.base = new TextLineDataset(input2);\n if (!csvConfig) {\n csvConfig = {};\n }\n this.hasHeader = csvConfig.hasHeader === false ? false : true;\n this.fullColumnNames = csvConfig.columnNames;\n this.columnConfigs = csvConfig.columnConfigs;\n this.configuredColumnsOnly = csvConfig.configuredColumnsOnly;\n if (csvConfig.delimWhitespace) {\n util_exports.assert(csvConfig.delimiter == null, () => \"Delimiter should not be provided when delimWhitespace is true.\");\n this.delimWhitespace = true;\n this.delimiter = \" \";\n } else {\n this.delimiter = csvConfig.delimiter ? csvConfig.delimiter : \",\";\n }\n }\n async columnNames() {\n if (!this.columnNamesValidated) {\n await this.setColumnNames();\n }\n return this.configuredColumnsOnly ? Object.keys(this.columnConfigs) : this.fullColumnNames;\n }\n async setColumnNames() {\n const columnNamesFromFile = await this.maybeReadHeaderLine();\n if (!this.fullColumnNames && !columnNamesFromFile) {\n throw new Error(\"Column names must be provided if there is no header line.\");\n } else if (this.fullColumnNames && columnNamesFromFile) {\n util_exports.assert(columnNamesFromFile.length === this.fullColumnNames.length, () => \"The length of provided columnNames (\" + this.fullColumnNames.length.toString() + \") does not match the length of the header line read from file (\" + columnNamesFromFile.length.toString() + \").\");\n }\n if (!this.fullColumnNames) {\n this.fullColumnNames = columnNamesFromFile;\n }\n const counts = this.fullColumnNames.reduce((countAcc, name) => {\n countAcc[name] = countAcc[name] + 1 || 1;\n return countAcc;\n }, {});\n const duplicateNames = Object.keys(counts).filter((name) => counts[name] > 1);\n util_exports.assert(duplicateNames.length === 0, () => \"Duplicate column names found: \" + duplicateNames.toString());\n if (this.columnConfigs) {\n for (const key of Object.keys(this.columnConfigs)) {\n const index = this.fullColumnNames.indexOf(key);\n if (index === -1) {\n throw new Error('The key \"' + key + '\" provided in columnConfigs does not match any of the column names (' + this.fullColumnNames.toString() + \").\");\n }\n }\n }\n this.columnNamesValidated = true;\n }\n async maybeReadHeaderLine() {\n if (this.hasHeader) {\n const iter = await this.base.iterator();\n const firstElement = await iter.next();\n if (firstElement.done) {\n throw new Error(\"No data was found for CSV parsing.\");\n }\n const firstLine = firstElement.value;\n const headers = this.parseRow(firstLine, false);\n return headers;\n } else {\n return null;\n }\n }\n async iterator() {\n if (!this.columnNamesValidated) {\n await this.setColumnNames();\n }\n let lines = await this.base.iterator();\n if (this.hasHeader) {\n lines = lines.skip(1);\n }\n return lines.map((x) => this.makeDataElement(x));\n }\n makeDataElement(line) {\n const values = this.parseRow(line);\n const features = {};\n const labels = {};\n for (let i2 = 0; i2 < this.fullColumnNames.length; i2++) {\n const key = this.fullColumnNames[i2];\n const config = this.columnConfigs ? this.columnConfigs[key] : null;\n if (this.configuredColumnsOnly && !config) {\n continue;\n } else {\n const value = values[i2];\n let parsedValue = null;\n if (value === \"\") {\n if (config && config.default !== void 0) {\n parsedValue = config.default;\n } else if (config && (config.required || config.isLabel)) {\n throw new Error(`Required column ${key} is empty in this line: ${line}`);\n } else {\n parsedValue = void 0;\n }\n } else {\n const valueAsNum = Number(value);\n if (isNaN(valueAsNum)) {\n if (config && config.dtype === \"bool\") {\n parsedValue = this.getBoolean(value);\n } else {\n parsedValue = value;\n }\n } else if (!config || !config.dtype) {\n parsedValue = valueAsNum;\n } else {\n switch (config.dtype) {\n case \"float32\":\n parsedValue = valueAsNum;\n break;\n case \"int32\":\n parsedValue = Math.floor(valueAsNum);\n break;\n case \"bool\":\n parsedValue = this.getBoolean(value);\n break;\n default:\n parsedValue = valueAsNum;\n }\n }\n }\n config && config.isLabel ? labels[key] = parsedValue : features[key] = parsedValue;\n }\n }\n if (Object.keys(labels).length === 0) {\n return features;\n } else {\n return { xs: features, ys: labels };\n }\n }\n getBoolean(value) {\n if (value === \"1\" || value.toLowerCase() === \"true\") {\n return 1;\n } else {\n return 0;\n }\n }\n parseRow(line, validateElementCount = true) {\n const result = [];\n let readOffset = 0;\n const readLength = line.length;\n let currentState = STATE_OUT;\n for (let i2 = 0; i2 < readLength; i2++) {\n switch (currentState) {\n case STATE_OUT:\n switch (line.charAt(i2)) {\n case CODE_QUOTE:\n readOffset = i2 + 1;\n currentState = STATE_QUOTE;\n break;\n case this.delimiter:\n readOffset = i2 + 1;\n if (this.delimiter === \" \" && this.delimWhitespace) {\n break;\n }\n result.push(\"\");\n currentState = STATE_OUT;\n break;\n default:\n currentState = STATE_FIELD;\n readOffset = i2;\n break;\n }\n break;\n case STATE_FIELD:\n switch (line.charAt(i2)) {\n case this.delimiter:\n result.push(line.substring(readOffset, i2));\n currentState = STATE_OUT;\n readOffset = i2 + 1;\n break;\n default:\n }\n break;\n case STATE_QUOTE:\n switch (line.charAt(i2)) {\n case CODE_QUOTE:\n currentState = STATE_QUOTE_AFTER_QUOTE;\n break;\n default:\n }\n break;\n case STATE_QUOTE_AFTER_QUOTE:\n switch (line.charAt(i2)) {\n case this.delimiter:\n result.push(line.substring(readOffset, i2 - 1));\n currentState = STATE_OUT;\n readOffset = i2 + 1;\n break;\n case CODE_QUOTE:\n currentState = STATE_QUOTE;\n break;\n default:\n currentState = STATE_WITHIN_QUOTE_IN_QUOTE;\n break;\n }\n break;\n case STATE_WITHIN_QUOTE_IN_QUOTE:\n switch (line.charAt(i2)) {\n case CODE_QUOTE:\n currentState = STATE_QUOTE;\n break;\n default:\n }\n break;\n default:\n }\n }\n if (currentState === STATE_QUOTE_AFTER_QUOTE) {\n result.push(line.substring(readOffset, readLength - 1));\n } else {\n result.push(line.substring(readOffset));\n }\n if (validateElementCount && result.length !== this.fullColumnNames.length) {\n throw new Error(`Invalid row in csv file. Should have ${this.fullColumnNames.length} elements in a row, but got ${result}`);\n }\n return result;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/iterators/microphone_iterator.js\nvar MicrophoneIterator = class extends LazyIterator {\n constructor(microphoneConfig) {\n super();\n this.microphoneConfig = microphoneConfig;\n this.isClosed = false;\n this.fftSize = microphoneConfig.fftSize || 1024;\n const fftSizeLog2 = Math.log2(this.fftSize);\n if (this.fftSize < 0 || fftSizeLog2 < 4 || fftSizeLog2 > 14 || !Number.isInteger(fftSizeLog2)) {\n throw new Error(`Invalid fftSize: it must be a power of 2 between 2 to 4 and 2 to 14, but got ${this.fftSize}`);\n }\n this.numFrames = microphoneConfig.numFramesPerSpectrogram || 43;\n this.sampleRateHz = microphoneConfig.sampleRateHz;\n this.columnTruncateLength = microphoneConfig.columnTruncateLength || this.fftSize;\n this.audioTrackConstraints = microphoneConfig.audioTrackConstraints;\n this.smoothingTimeConstant = microphoneConfig.smoothingTimeConstant || 0;\n this.includeSpectrogram = microphoneConfig.includeSpectrogram === false ? false : true;\n this.includeWaveform = microphoneConfig.includeWaveform === true ? true : false;\n if (!this.includeSpectrogram && !this.includeWaveform) {\n throw new Error(\"Both includeSpectrogram and includeWaveform are false. At least one type of data should be returned.\");\n }\n }\n summary() {\n return `microphone`;\n }\n static async create(microphoneConfig = {}) {\n if (!env().get(\"IS_BROWSER\")) {\n throw new Error(\"microphone API is only supported in browser environment.\");\n }\n const microphoneIterator = new MicrophoneIterator(microphoneConfig);\n await microphoneIterator.start();\n return microphoneIterator;\n }\n async start() {\n try {\n this.stream = await navigator.mediaDevices.getUserMedia({\n audio: this.audioTrackConstraints == null ? true : this.audioTrackConstraints,\n video: false\n });\n } catch (e2) {\n throw new Error(`Error thrown while initializing video stream: ${e2.message}`);\n }\n if (!this.stream) {\n throw new Error(\"Could not obtain audio from microphone.\");\n }\n const ctxConstructor = window.AudioContext || window.webkitAudioContext;\n this.audioContext = new ctxConstructor();\n if (!this.sampleRateHz) {\n this.sampleRateHz = this.audioContext.sampleRate;\n } else if (this.audioContext.sampleRate !== this.sampleRateHz) {\n throw new Error(`Mismatch in sampling rate: Expected: ${this.sampleRateHz}; Actual: ${this.audioContext.sampleRate}`);\n }\n const streamSource = this.audioContext.createMediaStreamSource(this.stream);\n this.analyser = this.audioContext.createAnalyser();\n this.analyser.fftSize = this.fftSize * 2;\n this.analyser.smoothingTimeConstant = this.smoothingTimeConstant;\n streamSource.connect(this.analyser);\n this.freqData = new Float32Array(this.fftSize);\n this.timeData = new Float32Array(this.fftSize);\n return;\n }\n async next() {\n if (this.isClosed) {\n return { value: null, done: true };\n }\n let spectrogramTensor;\n let waveformTensor;\n const audioDataQueue = await this.getAudioData();\n if (this.includeSpectrogram) {\n const freqData = this.flattenQueue(audioDataQueue.freqDataQueue);\n spectrogramTensor = this.getTensorFromAudioDataArray(freqData, [this.numFrames, this.columnTruncateLength, 1]);\n }\n if (this.includeWaveform) {\n const timeData = this.flattenQueue(audioDataQueue.timeDataQueue);\n waveformTensor = this.getTensorFromAudioDataArray(timeData, [this.numFrames * this.fftSize, 1]);\n }\n return {\n value: { \"spectrogram\": spectrogramTensor, \"waveform\": waveformTensor },\n done: false\n };\n }\n async capture() {\n return (await this.next()).value;\n }\n async getAudioData() {\n const freqDataQueue = [];\n const timeDataQueue = [];\n let currentFrames = 0;\n return new Promise((resolve) => {\n const intervalID = setInterval(() => {\n if (this.includeSpectrogram) {\n this.analyser.getFloatFrequencyData(this.freqData);\n if (this.freqData[0] === -Infinity) {\n resolve({ freqDataQueue, timeDataQueue });\n }\n freqDataQueue.push(this.freqData.slice(0, this.columnTruncateLength));\n }\n if (this.includeWaveform) {\n this.analyser.getFloatTimeDomainData(this.timeData);\n timeDataQueue.push(this.timeData.slice());\n }\n if (++currentFrames === this.numFrames) {\n clearInterval(intervalID);\n resolve({ freqDataQueue, timeDataQueue });\n }\n }, this.fftSize / this.sampleRateHz * 1e3);\n });\n }\n stop() {\n if (!this.isClosed) {\n this.isClosed = true;\n this.analyser.disconnect();\n this.audioContext.close();\n if (this.stream != null && this.stream.getTracks().length > 0) {\n this.stream.getTracks()[0].stop();\n }\n }\n }\n toArray() {\n throw new Error(\"Can not convert infinite audio stream to array.\");\n }\n getSampleRate() {\n return this.sampleRateHz;\n }\n flattenQueue(queue) {\n const frameSize = queue[0].length;\n const freqData = new Float32Array(queue.length * frameSize);\n queue.forEach((data, i2) => freqData.set(data, i2 * frameSize));\n return freqData;\n }\n getTensorFromAudioDataArray(freqData, shape) {\n const vals = new Float32Array(util_exports.sizeFromShape(shape));\n vals.set(freqData, vals.length - freqData.length);\n return tensor(vals, shape);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/iterators/webcam_iterator.js\nvar WebcamIterator = class extends LazyIterator {\n constructor(webcamVideoElement, webcamConfig) {\n super();\n this.webcamVideoElement = webcamVideoElement;\n this.webcamConfig = webcamConfig;\n this.isClosed = true;\n this.resize = false;\n if (this.needToResize()) {\n this.resize = true;\n this.cropSize = [this.webcamConfig.resizeHeight, this.webcamConfig.resizeWidth];\n this.cropBoxInd = tensor1d([0], \"int32\");\n if (this.webcamConfig.centerCrop) {\n const widthCroppingRatio = this.webcamConfig.resizeWidth * 1 / this.webcamVideoElement.width;\n const heightCroppingRatio = this.webcamConfig.resizeHeight * 1 / this.webcamVideoElement.height;\n const widthCropStart = (1 - widthCroppingRatio) / 2;\n const heightCropStart = (1 - heightCroppingRatio) / 2;\n const widthCropEnd = widthCropStart + widthCroppingRatio;\n const heightCropEnd = heightCroppingRatio + heightCropStart;\n this.cropBox = tensor2d([heightCropStart, widthCropStart, heightCropEnd, widthCropEnd], [1, 4]);\n } else {\n this.cropBox = tensor2d([0, 0, 1, 1], [1, 4]);\n }\n }\n }\n summary() {\n return `webcam`;\n }\n static async create(webcamVideoElement, webcamConfig = {}) {\n if (!env().get(\"IS_BROWSER\")) {\n throw new Error(\"tf.data.webcam is only supported in browser environment.\");\n }\n if (!webcamVideoElement) {\n webcamVideoElement = document.createElement(\"video\");\n if (!webcamConfig.resizeWidth || !webcamConfig.resizeHeight) {\n throw new Error(\"Please provide webcam video element, or resizeWidth and resizeHeight to create a hidden video element.\");\n }\n webcamVideoElement.width = webcamConfig.resizeWidth;\n webcamVideoElement.height = webcamConfig.resizeHeight;\n }\n const webcamIterator = new WebcamIterator(webcamVideoElement, webcamConfig);\n await webcamIterator.start();\n return webcamIterator;\n }\n async start() {\n if (this.webcamConfig.facingMode) {\n util_exports.assert(this.webcamConfig.facingMode === \"user\" || this.webcamConfig.facingMode === \"environment\", () => `Invalid webcam facing mode: ${this.webcamConfig.facingMode}. Please provide 'user' or 'environment'`);\n }\n try {\n this.stream = await navigator.mediaDevices.getUserMedia({\n video: {\n deviceId: this.webcamConfig.deviceId,\n facingMode: this.webcamConfig.facingMode ? this.webcamConfig.facingMode : \"user\",\n width: this.webcamVideoElement.width,\n height: this.webcamVideoElement.height\n }\n });\n } catch (e2) {\n e2.message = `Error thrown while initializing video stream: ${e2.message}`;\n throw e2;\n }\n if (!this.stream) {\n throw new Error(\"Could not obtain video from webcam.\");\n }\n try {\n this.webcamVideoElement.srcObject = this.stream;\n } catch (error) {\n console.log(error);\n this.webcamVideoElement.src = window.URL.createObjectURL(this.stream);\n }\n this.webcamVideoElement.play();\n this.isClosed = false;\n return new Promise((resolve) => {\n this.webcamVideoElement.onloadedmetadata = () => {\n resolve();\n };\n });\n }\n async next() {\n if (this.isClosed) {\n return { value: null, done: true };\n }\n let img;\n try {\n img = browser_exports.fromPixels(this.webcamVideoElement);\n } catch (e2) {\n throw new Error(`Error thrown converting video to pixels: ${JSON.stringify(e2)}`);\n }\n if (this.resize) {\n try {\n return { value: this.cropAndResizeFrame(img), done: false };\n } catch (e2) {\n throw new Error(`Error thrown cropping the video: ${e2.message}`);\n } finally {\n img.dispose();\n }\n } else {\n return { value: img, done: false };\n }\n }\n needToResize() {\n if (this.webcamConfig.resizeWidth && this.webcamConfig.resizeHeight && (this.webcamVideoElement.width !== this.webcamConfig.resizeWidth || this.webcamVideoElement.height !== this.webcamConfig.resizeHeight)) {\n return true;\n }\n return false;\n }\n cropAndResizeFrame(img) {\n return tidy(() => {\n const expandedImage = expandDims(cast(img, \"float32\"), 0);\n let resizedImage;\n resizedImage = image.cropAndResize(expandedImage, this.cropBox, this.cropBoxInd, this.cropSize, \"bilinear\");\n const shape = resizedImage.shape;\n return reshape(resizedImage, shape.slice(1));\n });\n }\n async capture() {\n return (await this.next()).value;\n }\n stop() {\n const tracks = this.stream.getTracks();\n tracks.forEach((track) => track.stop());\n try {\n this.webcamVideoElement.srcObject = null;\n } catch (error) {\n console.log(error);\n this.webcamVideoElement.src = null;\n }\n this.isClosed = true;\n }\n toArray() {\n throw new Error(\"Can not convert infinite video stream to array.\");\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/datasource.js\nvar DataSource = class {\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/iterators/string_iterator.js\nvar StringIterator = class extends LazyIterator {\n split(separator) {\n return new SplitIterator(this, separator);\n }\n};\nvar SplitIterator = class extends StringIterator {\n constructor(upstream, separator) {\n super();\n this.upstream = upstream;\n this.impl = new SplitIteratorImpl(upstream, separator);\n }\n summary() {\n return this.impl.summary();\n }\n async next() {\n return this.impl.next();\n }\n};\nvar SplitIteratorImpl = class extends OneToManyIterator {\n constructor(upstream, separator) {\n super();\n this.upstream = upstream;\n this.separator = separator;\n this.carryover = \"\";\n }\n summary() {\n return `${this.upstream.summary()} -> Split('${this.separator}')`;\n }\n async pump() {\n const chunkResult = await this.upstream.next();\n if (chunkResult.done) {\n if (this.carryover === \"\") {\n return false;\n }\n this.outputQueue.push(this.carryover);\n this.carryover = \"\";\n return true;\n }\n const lines = chunkResult.value.split(this.separator);\n lines[0] = this.carryover + lines[0];\n for (const line of lines.slice(0, -1)) {\n this.outputQueue.push(line);\n }\n this.carryover = lines[lines.length - 1];\n return true;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/iterators/byte_chunk_iterator.js\nvar ByteChunkIterator = class extends LazyIterator {\n decodeUTF8() {\n return new Utf8Iterator(this);\n }\n};\nvar Utf8Iterator = class extends StringIterator {\n constructor(upstream) {\n super();\n this.upstream = upstream;\n this.impl = new Utf8IteratorImpl(upstream);\n }\n summary() {\n return this.impl.summary();\n }\n async next() {\n return this.impl.next();\n }\n};\nvar Utf8IteratorImpl = class extends OneToManyIterator {\n constructor(upstream) {\n super();\n this.upstream = upstream;\n if (env().get(\"IS_BROWSER\")) {\n this.decoder = new TextDecoder(\"utf-8\");\n } else {\n const { StringDecoder } = require_string_decoder();\n this.decoder = new StringDecoder(\"utf8\");\n }\n }\n summary() {\n return `${this.upstream.summary()} -> Utf8`;\n }\n async pump() {\n const chunkResult = await this.upstream.next();\n let chunk;\n if (chunkResult.done) {\n return false;\n } else {\n chunk = chunkResult.value;\n }\n let text;\n if (env().get(\"IS_BROWSER\")) {\n text = this.decoder.decode(chunk, { stream: true });\n } else {\n text = this.decoder.write(Buffer.from(chunk.buffer));\n }\n this.outputQueue.push(text);\n return true;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/iterators/file_chunk_iterator.js\nvar FileChunkIterator = class extends ByteChunkIterator {\n constructor(file, options = {}) {\n super();\n this.file = file;\n this.options = options;\n util_exports.assert(file instanceof Uint8Array || (env().get(\"IS_BROWSER\") ? file instanceof File || file instanceof Blob : false), () => \"FileChunkIterator only supports File, Blob and Uint8Array right now.\");\n this.offset = options.offset || 0;\n this.chunkSize = options.chunkSize || 1024 * 1024;\n }\n summary() {\n return `FileChunks ${this.file}`;\n }\n async next() {\n if (this.offset >= (this.file instanceof Uint8Array ? this.file.byteLength : this.file.size)) {\n return { value: null, done: true };\n }\n const chunk = new Promise((resolve, reject) => {\n const end = this.offset + this.chunkSize;\n if (this.file instanceof Uint8Array) {\n resolve(new Uint8Array(this.file.slice(this.offset, end)));\n } else {\n const fileReader = new FileReader();\n fileReader.onload = (event) => {\n let data = fileReader.result;\n if (data instanceof ArrayBuffer) {\n data = new Uint8Array(data);\n }\n if (!(data instanceof Uint8Array)) {\n return reject(new TypeError(\"FileReader returned unknown type.\"));\n }\n resolve(data);\n };\n fileReader.onabort = (event) => {\n return reject(new Error(\"Aborted\"));\n };\n fileReader.onerror = (event) => {\n return reject(new Error(event.type));\n };\n const slice6 = this.file.slice(this.offset, end);\n fileReader.readAsArrayBuffer(slice6);\n }\n this.offset = end;\n });\n return { value: await chunk, done: false };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/iterators/url_chunk_iterator.js\nasync function urlChunkIterator(url, options = {}, fetchFunc) {\n let urlString;\n let requestInit;\n if (typeof url === \"string\") {\n urlString = url;\n } else {\n urlString = url.url;\n requestInit = getRequestInitFromRequest(url);\n }\n const response = await (fetchFunc || util_exports.fetch)(urlString, requestInit);\n if (response.ok) {\n const uint8Array = new Uint8Array(await response.arrayBuffer());\n return new FileChunkIterator(uint8Array, options);\n } else {\n throw new Error(response.statusText);\n }\n}\nvar getRequestInitFromRequest = (request) => {\n const init2 = {\n method: request.method,\n headers: request.headers,\n body: request.body,\n mode: request.mode,\n credentials: request.credentials,\n cache: request.cache,\n redirect: request.redirect,\n referrer: request.referrer,\n integrity: request.integrity\n };\n return init2;\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/util/source_util.js\nfunction isLocalPath(source) {\n return typeof source === \"string\" && source.slice(0, 7) === \"file://\";\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/sources/file_data_source.js\nvar FileDataSource = class extends DataSource {\n constructor(input2, options = {}) {\n super();\n this.input = input2;\n this.options = options;\n }\n async iterator() {\n if (isLocalPath(this.input) && env().get(\"IS_NODE\")) {\n const fs = require_fs();\n this.input = fs.readFileSync(this.input.slice(7));\n }\n return new FileChunkIterator(this.input, this.options);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/sources/url_data_source.js\nvar URLDataSource = class extends DataSource {\n constructor(url, fileOptions = {}) {\n super();\n this.url = url;\n this.fileOptions = fileOptions;\n }\n async iterator() {\n if (isLocalPath(this.url)) {\n return new FileDataSource(this.url, this.fileOptions).iterator();\n } else {\n return urlChunkIterator(this.url, this.fileOptions);\n }\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/readers.js\nfunction csv(source, csvConfig = {}) {\n return new CSVDataset(new URLDataSource(source), csvConfig);\n}\nfunction func(f) {\n const iter = iteratorFromFunction(f);\n return datasetFromIteratorFn(async () => iter);\n}\nfunction generator(generator2) {\n return datasetFromIteratorFn(async () => {\n const gen = await generator2();\n return iteratorFromFunction(() => gen.next());\n });\n}\nasync function webcam(webcamVideoElement, webcamConfig) {\n return WebcamIterator.create(webcamVideoElement, webcamConfig);\n}\nasync function microphone(microphoneConfig) {\n return MicrophoneIterator.create(microphoneConfig);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/version.js\nvar version4 = \"3.21.0\";\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/cpu_util.js\nfunction assertNotComplex(tensor2, opName) {\n if (!Array.isArray(tensor2)) {\n tensor2 = [tensor2];\n }\n tensor2.forEach((t2) => {\n if (t2 != null) {\n util_exports.assert(t2.dtype !== \"complex64\", () => `${opName} does not support complex64 tensors in the CPU backend.`);\n }\n });\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/backend_cpu.js\nvar whereImpl2 = kernel_impls_exports.whereImpl;\nvar MathBackendCPU = class extends KernelBackend {\n constructor() {\n super();\n this.blockSize = 48;\n this.firstUse = true;\n this.data = new DataStorage(this, engine());\n }\n nextDataId() {\n return MathBackendCPU.nextDataId++;\n }\n write(values, shape, dtype) {\n if (this.firstUse) {\n this.firstUse = false;\n if (env().get(\"IS_NODE\")) {\n backend_util_exports.warn(\"\\n============================\\nHi, looks like you are running TensorFlow.js in Node.js. To speed things up dramatically, install our node backend, visit https://github.com/tensorflow/tfjs-node for more details. \\n============================\");\n }\n }\n const dataId = { id: this.nextDataId() };\n this.data.set(dataId, { values, dtype, refCount: 1 });\n return dataId;\n }\n makeTensorInfo(shape, dtype, values) {\n let outId;\n if (dtype === \"string\" && values != null && values.length > 0 && util_exports.isString(values[0])) {\n const encodedValues = values.map((d) => util_exports.encodeString(d));\n outId = this.write(encodedValues, shape, dtype);\n } else {\n outId = this.write(values, shape, dtype);\n }\n return { dataId: outId, shape, dtype };\n }\n refCount(dataId) {\n if (this.data.has(dataId)) {\n const tensorData = this.data.get(dataId);\n return tensorData.refCount;\n }\n return 0;\n }\n incRef(dataId) {\n const tensorData = this.data.get(dataId);\n tensorData.refCount++;\n }\n decRef(dataId) {\n if (this.data.has(dataId)) {\n const tensorData = this.data.get(dataId);\n tensorData.refCount--;\n }\n }\n move(dataId, values, shape, dtype, refCount) {\n this.data.set(dataId, { values, dtype, refCount });\n }\n numDataIds() {\n return this.data.numDataIds();\n }\n async read(dataId) {\n return this.readSync(dataId);\n }\n readSync(dataId) {\n const { dtype, complexTensorInfos } = this.data.get(dataId);\n if (dtype === \"complex64\") {\n const realValues = this.readSync(complexTensorInfos.real.dataId);\n const imagValues = this.readSync(complexTensorInfos.imag.dataId);\n return backend_util_exports.mergeRealAndImagArrays(realValues, imagValues);\n }\n return this.data.get(dataId).values;\n }\n bufferSync(t2) {\n const data = this.readSync(t2.dataId);\n if (t2.dtype === \"string\") {\n try {\n const strings = data.map((d) => util_exports.decodeString(d));\n return buffer(t2.shape, t2.dtype, strings);\n } catch (_a) {\n throw new Error(\"Failed to decode encoded string bytes into utf-8\");\n }\n }\n return buffer(t2.shape, t2.dtype, data);\n }\n makeOutput(values, shape, dtype) {\n return engine().makeTensorFromTensorInfo(this.makeTensorInfo(shape, dtype, values), this);\n }\n disposeData(dataId, force = false) {\n if (this.data.has(dataId)) {\n this.data.get(dataId).refCount--;\n if (!force && this.data.get(dataId).refCount > 0) {\n return false;\n }\n const { complexTensorInfos } = this.data.get(dataId);\n if (complexTensorInfos != null) {\n this.disposeData(complexTensorInfos.real.dataId, true);\n this.disposeData(complexTensorInfos.imag.dataId, true);\n }\n this.data.delete(dataId);\n }\n return true;\n }\n disposeIntermediateTensorInfo(tensorInfo) {\n this.disposeData(tensorInfo.dataId);\n }\n async time(f) {\n const start = util_exports.now();\n f();\n const kernelMs = util_exports.now() - start;\n return { kernelMs };\n }\n memory() {\n return {\n unreliable: true,\n reasons: [\"The reported memory is an upper bound. Due to automatic garbage collection, the true allocated memory may be less.\"]\n };\n }\n where(condition) {\n assertNotComplex([condition], \"where\");\n const condVals = this.readSync(condition.dataId);\n return whereImpl2(condition.shape, condVals);\n }\n dispose() {\n }\n floatPrecision() {\n return 32;\n }\n epsilon() {\n return super.epsilon();\n }\n};\nMathBackendCPU.nextDataId = 0;\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/shared.js\nvar shared_exports = {};\n__export(shared_exports, {\n addImpl: () => addImpl,\n bincountImpl: () => bincountImpl,\n bincountReduceImpl: () => bincountReduceImpl,\n castImpl: () => castImpl,\n ceilImpl: () => ceilImpl,\n concatImpl: () => concatImpl,\n equalImpl: () => equalImpl,\n expImpl: () => expImpl,\n expm1Impl: () => expm1Impl,\n floorImpl: () => floorImpl,\n gatherNdImpl: () => gatherNdImpl,\n gatherV2Impl: () => gatherV2Impl,\n greaterEqualImpl: () => greaterEqualImpl,\n greaterImpl: () => greaterImpl,\n lessEqualImpl: () => lessEqualImpl,\n lessImpl: () => lessImpl,\n linSpaceImpl: () => linSpaceImpl,\n logImpl: () => logImpl,\n maxImpl: () => maxImpl,\n maximumImpl: () => maximumImpl,\n minimumImpl: () => minimumImpl,\n multiplyImpl: () => multiplyImpl,\n negImpl: () => negImpl,\n notEqualImpl: () => notEqualImpl,\n prodImpl: () => prodImpl,\n raggedGatherImpl: () => raggedGatherImpl,\n raggedTensorToTensorImpl: () => raggedTensorToTensorImpl,\n rangeImpl: () => rangeImpl,\n rsqrtImpl: () => rsqrtImpl,\n scatterImpl: () => scatterImpl,\n sigmoidImpl: () => sigmoidImpl,\n simpleAbsImpl: () => simpleAbsImpl,\n sliceImpl: () => sliceImpl,\n sparseFillEmptyRowsImpl: () => sparseFillEmptyRowsImpl,\n sparseReshapeImpl: () => sparseReshapeImpl,\n sparseSegmentReductionImpl: () => sparseSegmentReductionImpl,\n sqrtImpl: () => sqrtImpl,\n squaredDifferenceImpl: () => squaredDifferenceImpl,\n stridedSliceImpl: () => stridedSliceImpl,\n stringNGramsImpl: () => stringNGramsImpl,\n stringSplitImpl: () => stringSplitImpl,\n stringToHashBucketFastImpl: () => stringToHashBucketFastImpl,\n subImpl: () => subImpl,\n tileImpl: () => tileImpl,\n topKImpl: () => topKImpl,\n transposeImpl: () => transposeImpl,\n uniqueImpl: () => uniqueImpl\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Abs.js\nfunction simpleAbsImpl(vals) {\n const resultValues = new Float32Array(vals.length);\n for (let i2 = 0; i2 < vals.length; ++i2) {\n resultValues[i2] = Math.abs(vals[i2]);\n }\n return resultValues;\n}\nvar abs2 = (args) => {\n const { x } = args.inputs;\n const cpuBackend = args.backend;\n assertNotComplex(x, \"abs\");\n let resultValues = new Float32Array(util_exports.sizeFromShape(x.shape));\n const values = cpuBackend.data.get(x.dataId).values;\n resultValues = simpleAbsImpl(values);\n return cpuBackend.makeOutput(resultValues, x.shape, x.dtype);\n};\nvar absConfig = {\n kernelName: Abs,\n backendName: \"cpu\",\n kernelFunc: abs2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/utils/binary_impl.js\nfunction createSimpleBinaryKernelImpl(op2) {\n return (aShape, bShape, aVals, bVals, dtype) => {\n const newShape = backend_util_exports.assertAndGetBroadcastShape(aShape, bShape);\n const resultRank = newShape.length;\n const resultStrides = util_exports.computeStrides(newShape);\n const resultSize = util_exports.sizeFromShape(newShape);\n const result = util_exports.getTypedArrayFromDType(dtype, resultSize);\n const aRank = aShape.length;\n const bRank = bShape.length;\n const aStrides = util_exports.computeStrides(aShape);\n const bStrides = util_exports.computeStrides(bShape);\n const aBroadcastDims = backend_util_exports.getBroadcastDims(aShape, newShape);\n const bBroadcastDims = backend_util_exports.getBroadcastDims(bShape, newShape);\n if (aBroadcastDims.length + bBroadcastDims.length === 0) {\n for (let i2 = 0; i2 < result.length; ++i2) {\n result[i2] = op2(aVals[i2 % aVals.length], bVals[i2 % bVals.length]);\n }\n } else {\n for (let i2 = 0; i2 < result.length; ++i2) {\n const loc = util_exports.indexToLoc(i2, resultRank, resultStrides);\n const aLoc = loc.slice(-aRank);\n aBroadcastDims.forEach((d) => aLoc[d] = 0);\n const aIndex = util_exports.locToIndex(aLoc, aRank, aStrides);\n const bLoc = loc.slice(-bRank);\n bBroadcastDims.forEach((d) => bLoc[d] = 0);\n const bIndex = util_exports.locToIndex(bLoc, bRank, bStrides);\n result[i2] = op2(aVals[aIndex], bVals[bIndex]);\n }\n }\n return [result, newShape];\n };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Complex.js\nfunction complex2(args) {\n const { inputs, backend: backend2 } = args;\n const { real: real5, imag: imag5 } = inputs;\n const realVals = backend2.data.get(real5.dataId).values;\n const imagVals = backend2.data.get(imag5.dataId).values;\n const complexInfo = backend2.makeTensorInfo(real5.shape, \"complex64\");\n const complex5 = backend2.data.get(complexInfo.dataId);\n complex5.complexTensorInfos = {\n real: backend2.makeTensorInfo(real5.shape, \"float32\", realVals),\n imag: backend2.makeTensorInfo(imag5.shape, \"float32\", imagVals)\n };\n return complexInfo;\n}\nvar complexConfig = {\n kernelName: Complex,\n backendName: \"cpu\",\n kernelFunc: complex2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/utils/zeros_impl.js\nfunction zeros3(backend2, shape, dtype = \"float32\") {\n if (dtype === \"complex64\") {\n const real5 = zeros3(backend2, shape, \"float32\");\n const imag5 = zeros3(backend2, shape, \"float32\");\n return complex2({ inputs: { real: real5, imag: imag5 }, backend: backend2 });\n }\n const values = util_exports.makeZerosTypedArray(util_exports.sizeFromShape(shape), dtype);\n return backend2.makeTensorInfo(shape, dtype, values);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Identity.js\nfunction identity2(args) {\n const { inputs, backend: backend2 } = args;\n const { x } = inputs;\n backend2.incRef(x.dataId);\n return { dataId: x.dataId, shape: x.shape, dtype: x.dtype };\n}\nvar identityConfig = {\n kernelName: Identity,\n backendName: \"cpu\",\n kernelFunc: identity2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Real.js\nfunction real2(args) {\n const { inputs, backend: backend2 } = args;\n const { input: input2 } = inputs;\n const real5 = backend2.data.get(input2.dataId).complexTensorInfos.real;\n const realVal = backend2.data.get(real5.dataId).values;\n return backend2.makeTensorInfo(real5.shape, real5.dtype, realVal);\n}\nvar realConfig = {\n kernelName: Real,\n backendName: \"cpu\",\n kernelFunc: real2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Cast.js\nfunction castImpl(values, shape, inputType, dtype) {\n if (dtype === \"int32\") {\n const resultValues = Int32Array.from(values);\n return [shape, \"int32\", resultValues];\n }\n if (dtype === \"bool\") {\n const zero = util_exports.toTypedArray([0], inputType);\n const [resultData, resultShape] = createSimpleBinaryKernelImpl((a, b) => a !== b ? 1 : 0)(shape, [], values, zero, \"bool\");\n return [resultShape, \"bool\", resultData];\n }\n throw new Error(`Error in Cast: failed to cast ${inputType} to ${dtype}`);\n}\nfunction cast3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { dtype } = attrs;\n if (dtype === \"complex64\") {\n if (x.dtype === \"complex64\") {\n return identity2({ inputs: { x }, backend: backend2 });\n }\n const zerosTensorInfo = zeros3(backend2, x.shape, x.dtype);\n const floatX = cast3({ inputs: { x }, backend: backend2, attrs: { dtype: \"float32\" } });\n const result = complex2({ inputs: { real: floatX, imag: zerosTensorInfo }, backend: backend2 });\n backend2.disposeIntermediateTensorInfo(zerosTensorInfo);\n backend2.disposeIntermediateTensorInfo(floatX);\n return result;\n }\n if (x.dtype === \"complex64\") {\n const realPart = real2({ inputs: { input: x }, backend: backend2 });\n const result = cast3({ inputs: { x: realPart }, backend: backend2, attrs: { dtype } });\n backend2.disposeIntermediateTensorInfo(realPart);\n return result;\n }\n if (!util_exports.hasEncodingLoss(x.dtype, dtype)) {\n const result = identity2({ inputs: { x }, backend: backend2 });\n return { dataId: result.dataId, shape: result.shape, dtype };\n }\n const values = backend2.data.get(x.dataId).values;\n const [resultShape, resultType, resultData] = castImpl(values, x.shape, x.dtype, dtype);\n return backend2.makeTensorInfo(resultShape, resultType, resultData);\n}\nvar castConfig = {\n kernelName: Cast,\n backendName: \"cpu\",\n kernelFunc: cast3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/utils/binary_utils.js\nfunction binaryKernelFunc(name, simpleImpl, complexImpl, dtype) {\n if (complexImpl == null) {\n return ({ inputs, backend: backend2 }) => {\n const { a, b } = inputs;\n const cpuBackend = backend2;\n assertNotComplex([a, b], name);\n const aVals = cpuBackend.data.get(a.dataId).values;\n const bVals = cpuBackend.data.get(b.dataId).values;\n const decodedAVals = a.dtype === \"string\" ? backend_util_exports.fromUint8ToStringArray(aVals) : aVals;\n const decodedBVals = a.dtype === \"string\" ? backend_util_exports.fromUint8ToStringArray(bVals) : bVals;\n const $dtype = dtype || a.dtype;\n const [resultData, resultShape] = simpleImpl(a.shape, b.shape, decodedAVals, decodedBVals, $dtype);\n return cpuBackend.makeTensorInfo(resultShape, $dtype, resultData);\n };\n }\n return ({ inputs, backend: backend2 }) => {\n const { a, b } = inputs;\n const cpuBackend = backend2;\n if (a.dtype === \"complex64\" || b.dtype === \"complex64\") {\n const $aComplex = cast3({ inputs: { x: a }, backend: cpuBackend, attrs: { dtype: \"complex64\" } });\n const $aComplexVals = cpuBackend.data.get($aComplex.dataId);\n const aReal = $aComplexVals.complexTensorInfos.real;\n const aImag = $aComplexVals.complexTensorInfos.imag;\n const aRealVals = cpuBackend.data.get(aReal.dataId).values;\n const aImagVals = cpuBackend.data.get(aImag.dataId).values;\n const $bComplex = cast3({ inputs: { x: b }, backend: cpuBackend, attrs: { dtype: \"complex64\" } });\n const $bComplexVals = cpuBackend.data.get($bComplex.dataId);\n const bReal = $bComplexVals.complexTensorInfos.real;\n const bImag = $bComplexVals.complexTensorInfos.imag;\n const bRealVals = cpuBackend.data.get(bReal.dataId).values;\n const bImagVals = cpuBackend.data.get(bImag.dataId).values;\n const [resultRealData, resultImagData, resultShape] = complexImpl(a.shape, b.shape, aRealVals, aImagVals, bRealVals, bImagVals);\n const resultReal = cpuBackend.makeTensorInfo(resultShape, \"float32\", resultRealData);\n const resultImag = cpuBackend.makeTensorInfo(resultShape, \"float32\", resultImagData);\n const result = complex2({ inputs: { real: resultReal, imag: resultImag }, backend: cpuBackend });\n cpuBackend.disposeIntermediateTensorInfo($aComplex);\n cpuBackend.disposeIntermediateTensorInfo($bComplex);\n cpuBackend.disposeIntermediateTensorInfo(resultReal);\n cpuBackend.disposeIntermediateTensorInfo(resultImag);\n return result;\n } else {\n const aVals = cpuBackend.data.get(a.dataId).values;\n const bVals = cpuBackend.data.get(b.dataId).values;\n const $dtype = dtype || a.dtype;\n const [resultData, resultShape] = simpleImpl(a.shape, b.shape, aVals, bVals, $dtype);\n return cpuBackend.makeTensorInfo(resultShape, $dtype, resultData);\n }\n };\n}\nfunction createComplexBinaryKernelImpl(op2) {\n return (aShape, bShape, aRealVals, aImagVals, bRealVals, bImagVals) => {\n const resultShape = backend_util_exports.assertAndGetBroadcastShape(aShape, bShape);\n const resultSize = util_exports.sizeFromShape(resultShape);\n const resultRank = resultShape.length;\n const resultStrides = util_exports.computeStrides(resultShape);\n const resultRealVals = util_exports.getTypedArrayFromDType(\"float32\", resultSize);\n const resultImagVals = util_exports.getTypedArrayFromDType(\"float32\", resultSize);\n const aBroadcastDims = backend_util_exports.getBroadcastDims(aShape, resultShape);\n const bBroadcastDims = backend_util_exports.getBroadcastDims(bShape, resultShape);\n const aVals = backend_util_exports.mergeRealAndImagArrays(aRealVals, aImagVals);\n const bVals = backend_util_exports.mergeRealAndImagArrays(bRealVals, bImagVals);\n const aRank = aShape.length;\n const aStrides = util_exports.computeStrides(aShape);\n const bRank = bShape.length;\n const bStrides = util_exports.computeStrides(bShape);\n if (aBroadcastDims.length + bBroadcastDims.length === 0) {\n for (let i2 = 0; i2 < resultRealVals.length; i2++) {\n const aIdx = i2 % aVals.length;\n const bIdx = i2 % bVals.length;\n const result = op2(aVals[aIdx * 2], aVals[aIdx * 2 + 1], bVals[bIdx * 2], bVals[bIdx * 2 + 1]);\n resultRealVals[i2] = result.real;\n resultImagVals[i2] = result.imag;\n }\n } else {\n for (let i2 = 0; i2 < resultRealVals.length; i2++) {\n const loc = util_exports.indexToLoc(i2, resultRank, resultStrides);\n const aLoc = loc.slice(-aRank);\n aBroadcastDims.forEach((d) => aLoc[d] = 0);\n const aIndex = util_exports.locToIndex(aLoc, aRank, aStrides);\n const bLoc = loc.slice(-bRank);\n bBroadcastDims.forEach((d) => bLoc[d] = 0);\n const bIndex = util_exports.locToIndex(bLoc, bRank, bStrides);\n const opResult = op2(aVals[aIndex * 2], aVals[aIndex * 2 + 1], bVals[bIndex * 2], bVals[bIndex * 2 + 1]);\n resultRealVals[i2] = opResult.real;\n resultImagVals[i2] = opResult.imag;\n }\n }\n return [resultRealVals, resultImagVals, resultShape];\n };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Add.js\nvar addImpl = createSimpleBinaryKernelImpl((a, b) => a + b);\nvar addComplexImpl = createComplexBinaryKernelImpl((aReal, aImag, bReal, bImag) => {\n return { real: aReal + bReal, imag: aImag + bImag };\n});\nvar add4 = binaryKernelFunc(Add, addImpl, addComplexImpl);\nvar addConfig = {\n kernelName: Add,\n backendName: \"cpu\",\n kernelFunc: add4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Bincount_impl.js\nfunction bincountImpl(xVals, weightsVals, weightsDtype, weightsShape, size) {\n const weightsSize = util_exports.sizeFromShape(weightsShape);\n const outVals = util_exports.makeZerosTypedArray(size, weightsDtype);\n for (let i2 = 0; i2 < xVals.length; i2++) {\n const value = xVals[i2];\n if (value < 0) {\n throw new Error(\"Input x must be non-negative!\");\n }\n if (value >= size) {\n continue;\n }\n if (weightsSize > 0) {\n outVals[value] += weightsVals[i2];\n } else {\n outVals[value] += 1;\n }\n }\n return outVals;\n}\nfunction bincountReduceImpl(xBuf, weightsBuf, size, binaryOutput = false) {\n const numRows = xBuf.shape[0];\n const numCols = xBuf.shape[1];\n const outBuf = buffer([numRows, size], weightsBuf.dtype);\n for (let i2 = 0; i2 < numRows; i2++) {\n for (let j = 0; j < numCols; j++) {\n const value = xBuf.get(i2, j);\n if (value < 0) {\n throw new Error(\"Input x must be non-negative!\");\n }\n if (value >= size) {\n continue;\n }\n if (binaryOutput) {\n outBuf.set(1, i2, value);\n } else {\n if (weightsBuf.size > 0) {\n outBuf.set(outBuf.get(i2, value) + weightsBuf.get(i2, j), i2, value);\n } else {\n outBuf.set(outBuf.get(i2, value) + 1, i2, value);\n }\n }\n }\n }\n return outBuf;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/utils/unary_impl.js\nfunction createSimpleUnaryImpl(op2) {\n return (values, dtype, attrs) => {\n const newValues = util_exports.getTypedArrayFromDType(dtype, values.length);\n for (let i2 = 0; i2 < values.length; ++i2) {\n newValues[i2] = op2(values[i2], attrs);\n }\n return newValues;\n };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/utils/unary_utils.js\nfunction unaryKernelFunc(name, op2, dtype) {\n return ({ inputs, attrs, backend: backend2 }) => {\n const { x } = inputs;\n assertNotComplex(x, name);\n if (x.dtype === \"string\" || dtype === \"string\") {\n throw new Error(\"unaryKernelFunc does not support string input/output\");\n }\n const cpuBackend = backend2;\n const values = cpuBackend.data.get(x.dataId).values;\n const xSize = util_exports.sizeFromShape(x.shape);\n const $dtype = dtype || x.dtype;\n const newValues = util_exports.getArrayFromDType($dtype, xSize);\n for (let i2 = 0; i2 < xSize; ++i2) {\n newValues[i2] = op2(values[i2], attrs);\n }\n return cpuBackend.makeTensorInfo(x.shape, $dtype, newValues);\n };\n}\nfunction unaryKernelFuncFromImpl(name, unaryImpl, dtype) {\n return ({ inputs, attrs, backend: backend2 }) => {\n const { x } = inputs;\n assertNotComplex(x, name);\n if (x.dtype === \"string\" || dtype === \"string\") {\n throw new Error(\"unaryKernelFunc does not support string input/output\");\n }\n const cpuBackend = backend2;\n const values = cpuBackend.data.get(x.dataId).values;\n const $dtype = dtype || x.dtype;\n const newValues = unaryImpl(values, $dtype, attrs);\n return cpuBackend.makeTensorInfo(x.shape, $dtype, newValues);\n };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Ceil.js\nvar ceilImpl = createSimpleUnaryImpl((xi) => Math.ceil(xi));\nvar ceil2 = unaryKernelFuncFromImpl(Ceil, ceilImpl);\nvar ceilConfig = {\n kernelName: Ceil,\n backendName: \"cpu\",\n kernelFunc: ceil2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Concat_impl.js\nfunction concatImpl(inputs, outShape, dtype, simplyConcat) {\n const outVals = util_exports.getArrayFromDType(dtype, util_exports.sizeFromShape(outShape));\n if (simplyConcat && dtype !== \"string\") {\n let offset = 0;\n inputs.forEach((input2) => {\n const size = util_exports.sizeFromShape(input2.shape);\n outVals.set(input2.vals, offset);\n offset += size;\n });\n } else {\n let colOffset = 0;\n inputs.forEach((input2) => {\n const decodedData = dtype === \"string\" ? backend_util_exports.fromUint8ToStringArray(input2.vals) : input2.vals;\n let tIdx = 0;\n for (let row = 0; row < input2.shape[0]; ++row) {\n const resIdx = row * outShape[1] + colOffset;\n for (let col = 0; col < input2.shape[1]; ++col) {\n outVals[resIdx + col] = decodedData[tIdx++];\n }\n }\n colOffset += input2.shape[1];\n });\n }\n return outVals;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Equal.js\nvar equalImpl = createSimpleBinaryKernelImpl((a, b) => a === b ? 1 : 0);\nvar equal2 = binaryKernelFunc(Equal, equalImpl, null, \"bool\");\nvar equalConfig = {\n kernelName: Equal,\n backendName: \"cpu\",\n kernelFunc: equal2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Exp.js\nvar expImpl = createSimpleUnaryImpl((xi) => Math.exp(xi));\nvar exp2 = unaryKernelFuncFromImpl(Exp, expImpl, \"float32\");\nvar expConfig = {\n kernelName: Exp,\n backendName: \"cpu\",\n kernelFunc: exp2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Expm1.js\nvar expm1Impl = createSimpleUnaryImpl((xi) => Math.expm1(xi));\nvar expm12 = unaryKernelFuncFromImpl(Expm1, expm1Impl);\nvar expm1Config = {\n kernelName: Expm1,\n backendName: \"cpu\",\n kernelFunc: expm12\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Floor.js\nvar floorImpl = createSimpleUnaryImpl((xi) => Math.floor(xi));\nvar floor2 = unaryKernelFuncFromImpl(Floor, floorImpl);\nvar floorConfig = {\n kernelName: Floor,\n backendName: \"cpu\",\n kernelFunc: floor2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/GatherNd_Impl.js\nfunction gatherNdImpl(indicesData, paramsBuf, dtype, numSlices, sliceRank, sliceSize, strides, paramsShape, paramsSize) {\n const outBuf = buffer([numSlices, sliceSize], dtype);\n for (let i2 = 0; i2 < numSlices; i2++) {\n const index = [];\n let flattenIndex = 0;\n for (let j = 0; j < sliceRank; j++) {\n const dim = indicesData[i2 * sliceRank + j];\n flattenIndex += dim * strides[j];\n index.push(dim);\n }\n if (flattenIndex < 0 || flattenIndex >= paramsSize / sliceSize) {\n throw new Error(`Invalid indices: ${index} does not index into ${paramsShape}`);\n }\n for (let k = 0; k < sliceSize; k++) {\n outBuf.values[i2 * sliceSize + k] = paramsBuf.get(...paramsBuf.indexToLoc(flattenIndex * sliceSize + k));\n }\n }\n return outBuf;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/GatherV2_impl.js\nfunction gatherV2Impl(xBuf, indicesBuf, flattenOutputShape) {\n const outBuf = buffer(flattenOutputShape, xBuf.dtype);\n for (let i2 = 0; i2 < outBuf.size; ++i2) {\n const newLoc = outBuf.indexToLoc(i2);\n const originalLoc = newLoc.slice();\n const batchIdx = originalLoc[0];\n const indicesIdx = originalLoc[2];\n const indicesIndex = indicesBuf.locToIndex([batchIdx, indicesIdx]);\n originalLoc[2] = indicesBuf.values[indicesIndex];\n const originalIndex = xBuf.locToIndex(originalLoc);\n if (0 <= originalIndex && originalIndex < xBuf.values.length) {\n outBuf.values[i2] = xBuf.values[originalIndex];\n }\n }\n return outBuf;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Greater.js\nvar greaterImpl = createSimpleBinaryKernelImpl((a, b) => a > b ? 1 : 0);\nvar greater3 = binaryKernelFunc(Greater, greaterImpl, null, \"bool\");\nvar greaterConfig = {\n kernelName: Greater,\n backendName: \"cpu\",\n kernelFunc: greater3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/GreaterEqual.js\nvar greaterEqualImpl = createSimpleBinaryKernelImpl((a, b) => a >= b ? 1 : 0);\nvar greaterEqual2 = binaryKernelFunc(GreaterEqual, greaterEqualImpl, null, \"bool\");\nvar greaterEqualConfig = {\n kernelName: GreaterEqual,\n backendName: \"cpu\",\n kernelFunc: greaterEqual2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Less.js\nvar lessImpl = createSimpleBinaryKernelImpl((a, b) => a < b ? 1 : 0);\nvar less3 = binaryKernelFunc(Less, lessImpl, null, \"bool\");\nvar lessConfig = {\n kernelName: Less,\n backendName: \"cpu\",\n kernelFunc: less3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/LessEqual.js\nvar lessEqualImpl = createSimpleBinaryKernelImpl((a, b) => a <= b ? 1 : 0);\nvar lessEqual2 = binaryKernelFunc(LessEqual, lessEqualImpl, null, \"bool\");\nvar lessEqualConfig = {\n kernelName: LessEqual,\n backendName: \"cpu\",\n kernelFunc: lessEqual2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/LinSpace_impl.js\nfunction linSpaceImpl(start, stop, num) {\n const step5 = (stop - start) / (num - 1);\n const values = util_exports.makeZerosTypedArray(num, \"float32\");\n values[0] = start;\n for (let i2 = 1; i2 < values.length; i2++) {\n values[i2] = values[i2 - 1] + step5;\n }\n return values;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Log.js\nvar logImpl = createSimpleUnaryImpl((xi) => Math.log(xi));\nvar log3 = unaryKernelFuncFromImpl(Log, logImpl);\nvar logConfig = {\n kernelName: Log,\n backendName: \"cpu\",\n kernelFunc: log3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Max_impl.js\nfunction maxImpl(aVals, reduceSize, outShape, dtype) {\n const vals = util_exports.getTypedArrayFromDType(dtype, util_exports.sizeFromShape(outShape));\n for (let i2 = 0; i2 < vals.length; ++i2) {\n const offset = i2 * reduceSize;\n let max7 = aVals[offset];\n for (let j = 0; j < reduceSize; ++j) {\n const value = aVals[offset + j];\n if (Number.isNaN(value) || value > max7) {\n max7 = value;\n }\n }\n vals[i2] = max7;\n }\n return vals;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Maximum.js\nvar maximumImpl = createSimpleBinaryKernelImpl((aValue, bValue) => Math.max(aValue, bValue));\nvar maximum3 = binaryKernelFunc(Maximum, maximumImpl);\nvar maximumConfig = {\n kernelName: Maximum,\n backendName: \"cpu\",\n kernelFunc: maximum3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Minimum.js\nvar minimumImpl = createSimpleBinaryKernelImpl((aValue, bValue) => Math.min(aValue, bValue));\nvar minimum3 = binaryKernelFunc(Minimum, minimumImpl);\nvar minimumConfig = {\n kernelName: Minimum,\n backendName: \"cpu\",\n kernelFunc: minimum3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Multiply.js\nvar multiplyImpl = createSimpleBinaryKernelImpl((aValue, bValue) => aValue * bValue);\nvar multiplyComplexImpl = createComplexBinaryKernelImpl((aReal, aImag, bReal, bImag) => {\n return {\n real: aReal * bReal - aImag * bImag,\n imag: aReal * bImag + aImag * bReal\n };\n});\nvar multiply2 = binaryKernelFunc(Multiply, multiplyImpl, multiplyComplexImpl);\nvar multiplyConfig = {\n kernelName: Multiply,\n backendName: \"cpu\",\n kernelFunc: multiply2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Neg.js\nfunction negImpl(xVals, xShape, xDtype) {\n const minusOne = util_exports.createScalarValue(-1, xDtype);\n return multiplyImpl([], xShape, minusOne, xVals, xDtype);\n}\nfunction neg2(args) {\n const { inputs, backend: backend2 } = args;\n const { x } = inputs;\n assertNotComplex(x, \"neg\");\n const xVals = backend2.data.get(x.dataId).values;\n const [res, newShape] = negImpl(xVals, x.shape, x.dtype);\n return backend2.makeTensorInfo(newShape, x.dtype, res);\n}\nvar negConfig = {\n kernelName: Neg,\n backendName: \"cpu\",\n kernelFunc: neg2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/NotEqual.js\nvar notEqualImpl = createSimpleBinaryKernelImpl((a, b) => a !== b ? 1 : 0);\nvar notEqual2 = binaryKernelFunc(NotEqual, notEqualImpl, null, \"bool\");\nvar notEqualConfig = {\n kernelName: NotEqual,\n backendName: \"cpu\",\n kernelFunc: notEqual2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Transpose_impl.js\nfunction transposeImpl(xVals, xShape, dtype, perm, newShape) {\n const xRank = xShape.length;\n const xSize = util_exports.sizeFromShape(xShape);\n const xStrides = util_exports.computeStrides(xShape);\n const newStrides = util_exports.computeStrides(newShape);\n const result = util_exports.getTypedArrayFromDType(dtype, util_exports.sizeFromShape(newShape));\n for (let i2 = 0; i2 < xSize; ++i2) {\n const loc = util_exports.indexToLoc(i2, xRank, xStrides);\n const newLoc = new Array(loc.length);\n for (let i3 = 0; i3 < newLoc.length; i3++) {\n newLoc[i3] = loc[perm[i3]];\n }\n const newIndex = util_exports.locToIndex(newLoc, xRank, newStrides);\n result[newIndex] = xVals[i2];\n }\n return result;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Transpose.js\nfunction transpose2(args) {\n const { inputs, attrs, backend: backend2 } = args;\n const { x } = inputs;\n const { perm } = attrs;\n assertNotComplex(x, \"transpose\");\n const xRank = x.shape.length;\n const newShape = new Array(xRank);\n for (let i2 = 0; i2 < newShape.length; i2++) {\n newShape[i2] = x.shape[perm[i2]];\n }\n const values = backend2.data.get(x.dataId).values;\n const result = transposeImpl(values, x.shape, x.dtype, perm, newShape);\n const dataId = backend2.write(result, newShape, x.dtype);\n return { dataId, shape: newShape, dtype: x.dtype };\n}\nvar transposeConfig = {\n kernelName: Transpose,\n backendName: \"cpu\",\n kernelFunc: transpose2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Prod.js\nfunction prodImpl(xShape, xDtype, xVals, reductionAxes) {\n const [outShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes(xShape, reductionAxes);\n const outDtype = upcastType(xDtype, \"int32\");\n const outVals = util_exports.makeZerosTypedArray(util_exports.sizeFromShape(outShape), outDtype);\n const reduceSize = util_exports.sizeFromShape(reduceShape);\n for (let i2 = 0; i2 < outVals.length; ++i2) {\n const offset = i2 * reduceSize;\n let prod6 = 1;\n for (let j = 0; j < reduceSize; ++j) {\n prod6 *= xVals[offset + j];\n }\n outVals[i2] = prod6;\n }\n return { outVals, outShape, outDtype };\n}\nfunction prod2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis, keepDims } = attrs;\n assertNotComplex(x, \"prod\");\n const xRank = x.shape.length;\n const axes = util_exports.parseAxisParam(axis, x.shape);\n const permutation = backend_util_exports.getAxesPermutation(axes, xRank);\n let reductionAxes = axes;\n let permutedX = x;\n const intermediateTensorInfos = [];\n if (permutation != null) {\n permutedX = transpose2({ inputs: { x }, backend: backend2, attrs: { perm: permutation } });\n intermediateTensorInfos.push(permutedX);\n reductionAxes = backend_util_exports.getInnerMostAxes(reductionAxes.length, xRank);\n }\n const xVals = backend2.data.get(permutedX.dataId).values;\n const { outVals, outShape, outDtype } = prodImpl(permutedX.shape, permutedX.dtype, xVals, reductionAxes);\n let resultShape = outShape;\n if (keepDims) {\n resultShape = backend_util_exports.expandShapeToKeepDim(outShape, axes);\n }\n intermediateTensorInfos.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2));\n return backend2.makeTensorInfo(resultShape, outDtype, outVals);\n}\nvar prodConfig = {\n kernelName: Prod,\n backendName: \"cpu\",\n kernelFunc: prod2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/RaggedGather_impl.js\nfunction validateIndices(indices, indicesShape, numParams) {\n indices.forEach((index, i2) => {\n if (index < 0 || index >= numParams) {\n const locString = util_exports.indexToLoc(i2, indicesShape.length, util_exports.computeStrides(indicesShape)).join(\",\");\n throw new Error(`indices[${locString}] = ${index} is not in [0, ${numParams})`);\n }\n });\n}\nfunction validateSplits(paramsNestedSplits, numParamsDenseValues) {\n for (let dim = 0; dim < paramsNestedSplits.length; ++dim) {\n const splits = paramsNestedSplits[dim];\n const lastSplit = dim === paramsNestedSplits.length - 1 ? numParamsDenseValues : paramsNestedSplits[dim + 1].length;\n if (splits.length === 0) {\n throw new Error(\"Ragged splits may not be empty\");\n }\n if (splits[0] < 0) {\n throw new Error(\"Ragged splits must be non-negative\");\n }\n if (splits[splits.length - 1] > lastSplit) {\n throw new Error(\"Ragged splits must not point past values\");\n }\n for (let i2 = 1; i2 < splits.length; ++i2) {\n if (splits[i2 - 1] > splits[i2]) {\n throw new Error(\"Ragged splits must be sorted in ascending order\");\n }\n }\n }\n}\nfunction makeSplits(indices, indicesShape, paramsNestedSplits, numParamsDenseValues) {\n const valueSlices = [];\n let numValues = 0;\n const numSplits = indicesShape.length - 1 + paramsNestedSplits.length;\n const outSplits = new Array(numSplits).fill(null).map(() => [0]);\n validateSplits(paramsNestedSplits, numParamsDenseValues);\n let nrows = 1;\n for (let dim = 0; dim < indicesShape.length - 1; ++dim) {\n nrows *= indicesShape[dim];\n const rowLength = indicesShape[dim + 1];\n for (let i2 = 1; i2 < nrows + 1; ++i2) {\n outSplits[dim].push(i2 * rowLength);\n }\n }\n for (let i2 = 0; i2 < indices.length; ++i2) {\n let start = indices[i2];\n let limit = indices[i2] + 1;\n for (let dim = 0; dim < paramsNestedSplits.length; ++dim) {\n const splits = paramsNestedSplits[dim];\n const outDim = dim + indicesShape.length - 1;\n if (outDim >= 0) {\n const outSplitsOutDim = outSplits[outDim];\n const delta = outSplitsOutDim[outSplitsOutDim.length - 1] - splits[start];\n for (let j = start; j < limit; ++j) {\n outSplits[outDim].push(splits[j + 1] + delta);\n }\n }\n start = splits[start];\n limit = splits[limit];\n }\n if (limit !== start) {\n valueSlices.push([start, limit]);\n numValues += limit - start;\n }\n }\n return { outSplits, valueSlices, numValues };\n}\nfunction getSplits(outSplits) {\n const splitsOut = [];\n for (let i2 = 0; i2 < outSplits.length; ++i2) {\n const numSplits = outSplits[i2].length;\n const splits = util_exports.getArrayFromDType(\"int32\", numSplits);\n splitsOut.push(splits);\n outSplits[i2].forEach((value, j) => splits[j] = value);\n }\n return splitsOut;\n}\nfunction computeFlatOuterDims(orig, numOutDims) {\n const outDims = orig.slice(0, numOutDims);\n while (outDims.length < numOutDims) {\n outDims.push(1);\n }\n for (let inDim = numOutDims; inDim < orig.length; inDim++) {\n outDims[numOutDims - 1] *= orig[inDim];\n }\n return outDims;\n}\nfunction writeValueSlices(paramsDenseValues, paramsDenseValuesShape, valueSlices, valueSize, values, valuesShape) {\n const denseM = computeFlatOuterDims(paramsDenseValuesShape, 2)[1];\n const valuesM = computeFlatOuterDims(valuesShape, 2)[1];\n let outPos = 0;\n for (const slice6 of valueSlices) {\n for (let i2 = slice6[0]; i2 < slice6[1]; ++i2) {\n for (let j = 0; j < valueSize; ++j) {\n values[outPos * valuesM + j] = paramsDenseValues[i2 * denseM + j];\n }\n ++outPos;\n }\n }\n}\nfunction getValues(paramsDenseValues, paramsDenseValuesShape, paramsDenseValuesDType, valueSlices, numValues) {\n const valuesShape = paramsDenseValuesShape.slice();\n valuesShape[0] = numValues;\n const valuesOut = util_exports.getArrayFromDType(paramsDenseValuesDType, util_exports.sizeFromShape(valuesShape));\n const numElements = paramsDenseValues.length;\n const valueSize = numElements === 0 ? 0 : numElements / paramsDenseValuesShape[0];\n writeValueSlices(paramsDenseValues, paramsDenseValuesShape, valueSlices, valueSize, valuesOut, valuesShape);\n return [valuesOut, valuesShape];\n}\nfunction raggedGatherImpl(paramsNestedSplits, paramsNestedSplitsShapes, paramsDenseValues, paramsDenseValuesShape, paramsDenseValuesDType, indices, indicesShape, outputRaggedRank) {\n if (paramsNestedSplits.length === 0) {\n throw new Error(\"paramsNestedSplits must be non empty\");\n }\n if (paramsNestedSplitsShapes[0].length === 0) {\n throw new Error(\"Split tensors must not be scalars\");\n }\n const numParams = paramsNestedSplitsShapes[0][0] - 1;\n validateIndices(indices, indicesShape, numParams);\n if (paramsDenseValuesShape.length === 0) {\n throw new Error(\"params.rank must be nonzero\");\n }\n const numParamsDenseValues = paramsDenseValuesShape[0];\n const { outSplits, valueSlices, numValues } = makeSplits(indices, indicesShape, paramsNestedSplits, numParamsDenseValues);\n const outputNestedSplits = getSplits(outSplits);\n const outputDenseValues = getValues(paramsDenseValues, paramsDenseValuesShape, paramsDenseValuesDType, valueSlices, numValues);\n return [outputNestedSplits, outputDenseValues[0], outputDenseValues[1]];\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/RaggedTensorToTensor_impl.js\nvar RowPartitionType2 = backend_util_exports.RowPartitionType;\nvar RaggedTensorToTensorOp = class {\n constructor(shape, shapeShape, values, valuesShape, valuesDType, defaultValue, defaultValueShape, rowPartitionValues, rowPartitionValuesShapes, rowPartitionTypeStrings) {\n this.shape = shape;\n this.shapeShape = shapeShape;\n this.values = values;\n this.valuesShape = valuesShape;\n this.valuesDType = valuesDType;\n this.defaultValue = defaultValue;\n this.defaultValueShape = defaultValueShape;\n this.rowPartitionValues = rowPartitionValues;\n this.rowPartitionValuesShapes = rowPartitionValuesShapes;\n this.rowPartitionTypes = backend_util_exports.getRowPartitionTypesHelper(rowPartitionTypeStrings);\n this.raggedRank = backend_util_exports.getRaggedRank(this.rowPartitionTypes);\n }\n getRowPartitionTypeByDimension(dimension) {\n if (this.rowPartitionTypes[0] === RowPartitionType2.FIRST_DIM_SIZE) {\n return this.rowPartitionTypes[dimension + 1];\n } else {\n return this.rowPartitionTypes[dimension];\n }\n }\n getRowPartitionTensor(dimension) {\n if (this.rowPartitionTypes[0] === RowPartitionType2.FIRST_DIM_SIZE) {\n return this.rowPartitionValues[dimension + 1];\n } else {\n return this.rowPartitionValues[dimension];\n }\n }\n getMaxWidth(dimension) {\n const rowPartitionTensor = this.getRowPartitionTensor(dimension - 1);\n switch (this.getRowPartitionTypeByDimension(dimension - 1)) {\n case RowPartitionType2.VALUE_ROWIDS:\n return RaggedTensorToTensorOp.getMaxWidthValueRowID(rowPartitionTensor);\n case RowPartitionType2.ROW_SPLITS:\n return RaggedTensorToTensorOp.getMaxWidthRowSplit(rowPartitionTensor);\n default:\n throw new Error(`Cannot handle partition type ${RowPartitionType2[this.getRowPartitionTypeByDimension(dimension - 1)]}`);\n }\n }\n static getMaxWidthRowSplit(rowSplit) {\n const tensorLength = rowSplit.length;\n if (tensorLength === 0 || tensorLength === 1) {\n return 0;\n }\n let maxWidth = 0;\n for (let i2 = 0; i2 < tensorLength - 1; ++i2) {\n const currentWidth = rowSplit[i2 + 1] - rowSplit[i2];\n if (currentWidth > maxWidth) {\n maxWidth = currentWidth;\n }\n }\n return maxWidth;\n }\n static getMaxWidthValueRowID(valueRowIds) {\n const indexLength = valueRowIds.length;\n if (indexLength === 0) {\n return 0;\n }\n let firstEqualIndex = 0;\n let firstEqualIndexValue = valueRowIds[0];\n let maxWidth = 0;\n for (let i2 = 1; i2 < indexLength; ++i2) {\n const value = valueRowIds[i2];\n if (value !== firstEqualIndexValue) {\n firstEqualIndexValue = value;\n maxWidth = Math.max(i2 - firstEqualIndex, maxWidth);\n firstEqualIndex = i2;\n }\n }\n return Math.max(indexLength - firstEqualIndex, maxWidth);\n }\n tensorShapeFromTensor(t2, tShape, isPartial = true) {\n if (tShape.length === 0) {\n if (t2[0] === -1) {\n return [];\n }\n throw new Error(`The only valid scalar shape tensor is the fully unknown shape specified as -1.`);\n }\n return makeShape(t2, isPartial);\n }\n calculateOutputSize(firstDim) {\n const valueShape = this.valuesShape;\n const defaultValueShape = this.defaultValueShape;\n backend_util_exports.validateDefaultValueShape(defaultValueShape, valueShape);\n const shape = this.tensorShapeFromTensor(this.shape, this.shapeShape);\n const outputShape = backend_util_exports.combineRaggedTensorToTensorShapes(this.raggedRank, shape, valueShape);\n const result = outputShape;\n if (result[0] < 0) {\n result[0] = firstDim;\n }\n for (let i2 = 1; i2 <= this.raggedRank; ++i2) {\n if (result[i2] < 0) {\n result[i2] = this.getMaxWidth(i2);\n }\n }\n return result;\n }\n calculateFirstParentOutputIndex(firstDimension, outputIndexMultiplier, firstDimensionOutput) {\n const minDimension = Math.min(firstDimension, firstDimensionOutput);\n const result = [];\n let currentOutputIndex = 0;\n for (let i2 = 0; i2 < minDimension; ++i2, currentOutputIndex += outputIndexMultiplier) {\n result.push(currentOutputIndex);\n }\n for (let i2 = minDimension; i2 < firstDimension; ++i2) {\n result.push(-1);\n }\n util_exports.assert(result.length === firstDimension, () => \"Final length of result must be equal to firstDimension.\");\n return result;\n }\n calculateOutputIndexRowSplit(rowSplit, parentOutputIndex, outputIndexMultiplier, outputSize) {\n const rowSplitSize = rowSplit.length;\n const result = [];\n for (let i2 = 0; i2 < rowSplitSize - 1; ++i2) {\n const rowLength = rowSplit[i2 + 1] - rowSplit[i2];\n let realLength = Math.min(outputSize, rowLength);\n let parentOutputIndexCurrent = parentOutputIndex[i2];\n if (parentOutputIndexCurrent === -1) {\n realLength = 0;\n }\n for (let j = 0; j < realLength; ++j) {\n result.push(parentOutputIndexCurrent);\n parentOutputIndexCurrent += outputIndexMultiplier;\n }\n for (let j = 0; j < rowLength - realLength; ++j) {\n result.push(-1);\n }\n }\n if (rowSplitSize > 0 && result.length !== rowSplit[rowSplitSize - 1]) {\n throw new Error(\"Invalid row split size.\");\n }\n return result;\n }\n calculateOutputIndexValueRowID(valueRowIds, parentOutputIndex, outputIndexMultiplier, outputSize) {\n const indexSize = valueRowIds.length;\n const result = [];\n if (indexSize === 0) {\n return [];\n }\n let currentOutputColumn = 0;\n let currentValueRowId = valueRowIds[0];\n if (currentValueRowId >= parentOutputIndex.length) {\n throw new Error(`Got currentValueRowId=${currentValueRowId}, which is not less than ${parentOutputIndex.length}`);\n }\n let currentOutputIndex = parentOutputIndex[currentValueRowId];\n result.push(currentOutputIndex);\n for (let i2 = 1; i2 < indexSize; ++i2) {\n const nextValueRowId = valueRowIds[i2];\n if (nextValueRowId === currentValueRowId) {\n if (currentOutputIndex >= 0) {\n ++currentOutputColumn;\n if (currentOutputColumn < outputSize) {\n currentOutputIndex += outputIndexMultiplier;\n } else {\n currentOutputIndex = -1;\n }\n }\n } else {\n currentOutputColumn = 0;\n currentValueRowId = nextValueRowId;\n if (nextValueRowId >= parentOutputIndex.length) {\n throw new Error(`Got nextValueRowId=${nextValueRowId} which is not less than ${parentOutputIndex.length}`);\n }\n currentOutputIndex = parentOutputIndex[nextValueRowId];\n }\n result.push(currentOutputIndex);\n }\n if (result.length !== valueRowIds.length) {\n throw new Error(\"Invalid row ids.\");\n }\n return result;\n }\n calculateOutputIndex(dimension, parentOutputIndex, outputIndexMultiplier, outputSize) {\n const rowPartitionTensor = this.getRowPartitionTensor(dimension);\n const partitionType = this.getRowPartitionTypeByDimension(dimension);\n switch (partitionType) {\n case RowPartitionType2.VALUE_ROWIDS:\n return this.calculateOutputIndexValueRowID(rowPartitionTensor, parentOutputIndex, outputIndexMultiplier, outputSize);\n case RowPartitionType2.ROW_SPLITS:\n if (rowPartitionTensor.length - 1 > parentOutputIndex.length) {\n throw new Error(`Row partition size is greater than output size: ${rowPartitionTensor.length - 1} > ${parentOutputIndex.length}`);\n }\n return this.calculateOutputIndexRowSplit(rowPartitionTensor, parentOutputIndex, outputIndexMultiplier, outputSize);\n default:\n throw new Error(`Unsupported partition type: ${RowPartitionType2[partitionType]}`);\n }\n }\n getFirstDimensionSize() {\n const firstPartitionTensor = this.rowPartitionValues[0];\n if (this.rowPartitionTypes.length === 0) {\n throw new Error(\"No row_partition_types given.\");\n }\n const firstPartitionType = this.rowPartitionTypes[0];\n switch (firstPartitionType) {\n case RowPartitionType2.FIRST_DIM_SIZE:\n return firstPartitionTensor[0];\n case RowPartitionType2.VALUE_ROWIDS:\n throw new Error(\"Cannot handle VALUE_ROWIDS in first dimension.\");\n case RowPartitionType2.ROW_SPLITS:\n return this.rowPartitionValuesShapes[0][0] - 1;\n default:\n throw new Error(`Cannot handle type ${RowPartitionType2[firstPartitionType]}`);\n }\n }\n compute() {\n const firstPartitionTensor = this.rowPartitionValues[0];\n if (firstPartitionTensor.length <= 0) {\n throw new Error(\"Invalid first partition input. Tensor requires at least one element.\");\n }\n const firstDimension = this.getFirstDimensionSize();\n const outputSize = this.calculateOutputSize(firstDimension);\n const multiplier = new Array(this.raggedRank + 1);\n multiplier[multiplier.length - 1] = 1;\n for (let i2 = multiplier.length - 2; i2 >= 0; --i2) {\n multiplier[i2] = multiplier[i2 + 1] * outputSize[i2 + 1];\n }\n const outputShape = makeShape(outputSize, false);\n const outputTensor = util_exports.getArrayFromDType(this.valuesDType, util_exports.sizeFromShape(outputShape));\n const fullSize = multiplier[0] * outputSize[0];\n if (fullSize > 0) {\n let outputIndex = this.calculateFirstParentOutputIndex(firstDimension, multiplier[0], outputSize[0]);\n for (let i2 = 1; i2 <= this.raggedRank; ++i2) {\n const newOutputIndex = this.calculateOutputIndex(i2 - 1, outputIndex, multiplier[i2], outputSize[i2]);\n outputIndex = newOutputIndex;\n }\n this.setOutput(this.raggedRank, outputIndex, outputTensor, outputShape);\n }\n return [outputShape, outputTensor];\n }\n setOutput(raggedRank, outputIndex, outputTensor, outputShape) {\n if (outputTensor.length === 0) {\n return;\n }\n const valuesBase = this.values;\n const outputBase = outputTensor;\n let elementShape = outputShape.slice();\n elementShape = elementShape.slice(raggedRank + 1);\n const valueElementSize = util_exports.sizeFromShape(elementShape);\n const outputIndexSize = outputIndex.length;\n let defaultValue = this.defaultValue;\n if (defaultValue.length !== valueElementSize && defaultValue.length !== 1) {\n const srcShape = this.defaultValueShape;\n tidy(() => {\n const defaultValueTensor = reshape(defaultValue, srcShape);\n const bCastDefault = broadcastTo(defaultValueTensor, elementShape);\n defaultValue = bCastDefault.dataSync();\n });\n }\n let srcStart = 0;\n let dstStart = 0;\n let dstEnd = 0;\n for (let srcI = 0; srcI <= outputIndexSize; ++srcI) {\n let dstI = srcI < outputIndexSize ? outputIndex[srcI] : -1;\n if (dstI === dstEnd) {\n ++dstEnd;\n continue;\n }\n if (dstStart < dstEnd) {\n const src = valuesBase.subarray(srcStart * valueElementSize);\n const dst = outputBase.subarray(dstStart * valueElementSize);\n const nVals = (dstEnd - dstStart) * valueElementSize;\n copyArray(dst, src, nVals);\n }\n if (srcI >= outputIndexSize) {\n const outputSize = outputTensor.length;\n dstI = Math.floor(outputSize / valueElementSize);\n }\n if (dstI > dstEnd) {\n if (this.defaultValue.length === 1) {\n outputBase.subarray(dstEnd * valueElementSize, dstI * valueElementSize).fill(this.defaultValue[0]);\n dstEnd = dstI;\n } else {\n while (dstI > dstEnd) {\n const dst = outputBase.slice(dstEnd * valueElementSize);\n copyArray(dst, defaultValue, valueElementSize);\n ++dstEnd;\n }\n }\n }\n if (dstI < 0) {\n srcStart = srcI + 1;\n dstStart = dstEnd;\n } else {\n srcStart = srcI;\n dstStart = dstEnd;\n dstEnd = dstStart + 1;\n }\n }\n }\n};\nfunction copyArray(dst, src, size) {\n for (let i2 = 0; i2 < size; i2++) {\n dst[i2] = src[i2];\n }\n}\nfunction makeShape(shape, isPartial) {\n const out = [];\n for (let dim of shape) {\n if (dim < 0) {\n if (!isPartial) {\n throw new Error(`Dimension ${dim} must be >= 0`);\n }\n if (dim < -1) {\n throw new Error(`Dimension ${dim} must be >= -1`);\n }\n dim = -1;\n }\n out.push(dim);\n }\n return out;\n}\nfunction raggedTensorToTensorImpl(shape, shapesShape, values, valuesShape, valuesDType, defaultValue, defaultValueShape, rowPartitionValues, rowPartitionValuesShapes, rowPartitionTypes) {\n return new RaggedTensorToTensorOp(shape, shapesShape, values, valuesShape, valuesDType, defaultValue, defaultValueShape, rowPartitionValues, rowPartitionValuesShapes, rowPartitionTypes).compute();\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Range_impl.js\nfunction rangeImpl(start, stop, step5, dtype) {\n const sameStartStop = start === stop;\n const increasingRangeNegativeStep = start < stop && step5 < 0;\n const decreasingRangePositiveStep = stop < start && step5 > 1;\n if (sameStartStop || increasingRangeNegativeStep || decreasingRangePositiveStep) {\n return util_exports.makeZerosTypedArray(0, dtype);\n }\n const numElements = Math.abs(Math.ceil((stop - start) / step5));\n const values = util_exports.makeZerosTypedArray(numElements, dtype);\n if (stop < start && step5 === 1) {\n step5 = -1;\n }\n values[0] = start;\n for (let i2 = 1; i2 < values.length; i2++) {\n values[i2] = values[i2 - 1] + step5;\n }\n return values;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Rsqrt.js\nvar rsqrtImpl = createSimpleUnaryImpl((xi) => 1 / Math.sqrt(xi));\nvar rsqrt2 = unaryKernelFuncFromImpl(Rsqrt, rsqrtImpl);\nvar rsqrtConfig = {\n kernelName: Rsqrt,\n backendName: \"cpu\",\n kernelFunc: rsqrt2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Scatter_impl.js\nfunction scatterImpl(indices, updates, shape, outputSize, sliceSize, numUpdates, sliceRank, strides, defaultValue, sumDupeIndices) {\n const flattenShape = [outputSize / sliceSize, sliceSize];\n const indicesData = indices.values;\n const updatesData = updates.values;\n if (outputSize === 0) {\n return buffer(shape, updates.dtype);\n }\n const outBuf = buffer(flattenShape, updates.dtype);\n if (typeof defaultValue === \"string\") {\n outBuf.values.fill(defaultValue);\n } else if (typeof defaultValue === \"number\") {\n outBuf.values.fill(defaultValue);\n } else if (typeof defaultValue === \"boolean\") {\n outBuf.values.fill(+defaultValue);\n }\n for (let i2 = 0; i2 < numUpdates; i2++) {\n const index = [];\n let flattenIndex = 0;\n for (let j = 0; j < sliceRank; j++) {\n const dim = indicesData[i2 * sliceRank + j];\n index.push(dim);\n flattenIndex += dim * strides[j];\n }\n if (flattenIndex < 0 || flattenIndex >= outputSize / sliceSize) {\n throw new Error(`Invalid indices: ${index} does not index into ${shape}`);\n }\n for (let k = 0; k < sliceSize; k++) {\n if (sumDupeIndices) {\n outBuf.values[flattenIndex * sliceSize + k] += updatesData[i2 * sliceSize + k];\n } else {\n outBuf.values[flattenIndex * sliceSize + k] = updates.rank === 0 ? updatesData[0] : updatesData[i2 * sliceSize + k];\n }\n }\n }\n return outBuf;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Sigmoid.js\nvar sigmoidImpl = createSimpleUnaryImpl((xi) => 1 / (1 + Math.exp(-xi)));\nvar sigmoid2 = unaryKernelFunc(Sigmoid, (xi) => 1 / (1 + Math.exp(-xi)));\nvar sigmoidConfig = {\n kernelName: Sigmoid,\n backendName: \"cpu\",\n kernelFunc: sigmoid2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Slice.js\nfunction sliceImpl(vals, begin, size, shape, dtype) {\n const isContinous = slice_util_exports.isSliceContinous(shape, begin, size);\n const length = util_exports.sizeFromShape(size);\n const xStrides = util_exports.computeStrides(shape);\n if (isContinous) {\n const flatOffset = slice_util_exports.computeFlatOffset(begin, xStrides);\n if (dtype === \"string\") {\n return vals.slice(flatOffset, flatOffset + length);\n }\n return vals.subarray(flatOffset, flatOffset + length);\n }\n const decodedData = dtype === \"string\" ? backend_util_exports.fromUint8ToStringArray(vals) : vals;\n const inBuf = buffer(shape, dtype, decodedData);\n const outBuf = buffer(size, dtype);\n for (let i2 = 0; i2 < outBuf.size; ++i2) {\n const outLoc = outBuf.indexToLoc(i2);\n const inLoc = outLoc.map((idx, j) => idx + begin[j]);\n outBuf.set(inBuf.get(...inLoc), ...outLoc);\n }\n if (dtype === \"string\") {\n return backend_util_exports.fromStringArrayToUint8(outBuf.values);\n }\n return outBuf.values;\n}\nfunction slice2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { begin, size } = attrs;\n assertNotComplex(x, \"slice\");\n const [$begin, $size] = slice_util_exports.parseSliceParams(x, begin, size);\n slice_util_exports.assertParamsValid(x, $begin, $size);\n const vals = backend2.data.get(x.dataId).values;\n const outVals = sliceImpl(vals, $begin, $size, x.shape, x.dtype);\n return backend2.makeTensorInfo($size, x.dtype, outVals);\n}\nvar sliceConfig = {\n kernelName: Slice,\n backendName: \"cpu\",\n kernelFunc: slice2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SparseFillEmptyRows_impl.js\nfunction sparseFillEmptyRowsImpl(indices, indicesShape, indicesDType, values, valuesDType, denseShape, defaultValue) {\n const indicesCount = indicesShape[0];\n const denseRows = denseShape[0];\n const emptyRowIndicator = new Array(denseRows);\n const reverseIndexMap = new Array(indicesCount);\n const rank = indicesShape[1];\n if (denseRows === 0) {\n if (indicesCount !== 0) {\n throw new Error(backend_util_exports.getSparseFillEmptyRowsIndicesDenseShapeMismatch(indicesCount));\n }\n const outputIndices = util_exports.getArrayFromDType(indicesDType, 0);\n const outputValues = util_exports.getArrayFromDType(valuesDType, 0);\n return [\n outputIndices,\n [0, rank],\n outputValues,\n emptyRowIndicator,\n reverseIndexMap\n ];\n }\n let rowsAreOrdered = true;\n let lastIndicesRow = 0;\n const csrOffset = new Array(denseRows).fill(0);\n for (let i2 = 0; i2 < indicesCount; ++i2) {\n const row = indices[i2 * rank];\n if (row < 0) {\n throw new Error(backend_util_exports.getSparseFillEmptyRowsNegativeIndexErrorMessage(i2, row));\n }\n if (row >= denseRows) {\n throw new Error(backend_util_exports.getSparseFillEmptyRowsOutOfRangeIndexErrorMessage(i2, row, denseRows));\n }\n ++csrOffset[row];\n rowsAreOrdered = rowsAreOrdered && row >= lastIndicesRow;\n lastIndicesRow = row;\n }\n let allRowsFull = true;\n for (let row = 0; row < denseRows; ++row) {\n const rowEmpty = csrOffset[row] === 0;\n emptyRowIndicator[row] = rowEmpty;\n allRowsFull = allRowsFull && !rowEmpty;\n csrOffset[row] = Math.max(csrOffset[row], 1);\n if (row > 0) {\n csrOffset[row] += csrOffset[row - 1];\n }\n }\n if (allRowsFull && rowsAreOrdered) {\n const outputIndices = indices;\n const outputValues = values;\n for (let i2 = 0; i2 < indicesCount; ++i2) {\n reverseIndexMap[i2] = i2;\n }\n return [\n outputIndices,\n [indicesCount, rank],\n outputValues,\n emptyRowIndicator,\n reverseIndexMap\n ];\n } else {\n const fullIndicesCount = csrOffset[denseRows - 1];\n const outputIndices = util_exports.getArrayFromDType(indicesDType, fullIndicesCount * rank);\n const outputValues = util_exports.getArrayFromDType(valuesDType, fullIndicesCount);\n const filledCount = new Array(denseRows).fill(0);\n for (let i2 = 0; i2 < indicesCount; ++i2) {\n const row = indices[i2 * rank];\n const offset = filledCount[row];\n const outputI = (row === 0 ? 0 : csrOffset[row - 1]) + offset;\n filledCount[row]++;\n for (let j = 0; j < rank; ++j) {\n outputIndices[outputI * rank + j] = indices[i2 * rank + j];\n }\n outputValues[outputI] = values[i2];\n reverseIndexMap[i2] = outputI;\n }\n for (let row = 0; row < denseRows; ++row) {\n const rowCount = filledCount[row];\n if (rowCount === 0) {\n const startingIndex = row === 0 ? 0 : csrOffset[row - 1];\n outputIndices[startingIndex * rank + 0] = row;\n for (let col = 1; col < rank; ++col) {\n outputIndices[startingIndex * rank + col] = 0;\n }\n outputValues[startingIndex] = defaultValue;\n }\n }\n return [\n outputIndices,\n [fullIndicesCount, rank],\n outputValues,\n emptyRowIndicator,\n reverseIndexMap\n ];\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SparseReshape_impl.js\nfunction sparseReshapeImpl(inputIndices, inputIndicesShape, inputDType, inputShape, targetShape) {\n const denseSize = util_exports.sizeFromShape(inputShape);\n const nnz = inputIndicesShape[0];\n const outputRank = targetShape.length;\n const outputShape = [];\n let product = 1;\n let unknownIndex = -1;\n for (let d = 0; d < outputRank; ++d) {\n const size = targetShape[d];\n if (size === -1) {\n if (unknownIndex !== -1) {\n throw new Error(backend_util_exports.getSparseReshapeMultipleNegativeOneOutputDimErrorMessage(unknownIndex, d));\n }\n unknownIndex = d;\n outputShape.push(1);\n } else {\n if (size < 0) {\n throw new Error(backend_util_exports.getSparseReshapeNegativeOutputDimErrorMessage(d, size));\n }\n product *= size;\n outputShape.push(size);\n }\n }\n if (unknownIndex !== -1) {\n if (product <= 0) {\n throw new Error(backend_util_exports.getSparseReshapeEmptyTensorZeroOutputDimErrorMessage());\n }\n const missing = Math.trunc(denseSize / product);\n if (product * missing !== denseSize) {\n throw new Error(backend_util_exports.getSparseReshapeInputOutputMultipleErrorMessage(inputShape, outputShape));\n }\n outputShape[unknownIndex] = missing;\n }\n const outputSize = util_exports.sizeFromShape(outputShape);\n if (outputSize !== denseSize) {\n throw new Error(backend_util_exports.getSparseReshapeInputOutputMismatchErrorMessage(inputShape, outputShape));\n }\n const inputRank = inputShape.length;\n const inputStrides = [];\n if (inputRank > 0) {\n inputStrides[inputRank - 1] = 1;\n for (let d = inputRank - 2; d >= 0; --d) {\n inputStrides[d] = inputStrides[d + 1] * inputShape[d + 1];\n }\n }\n const outputStrides = [];\n if (outputRank > 0) {\n outputStrides[outputRank - 1] = 1;\n for (let d = outputRank - 2; d >= 0; --d) {\n outputStrides[d] = outputStrides[d + 1] * outputShape[d + 1];\n }\n }\n const newIndices = util_exports.getArrayFromDType(inputDType, nnz * outputRank);\n for (let i2 = 0; i2 < nnz; ++i2) {\n let id = 0;\n for (let j = 0; j < inputRank; ++j) {\n id += inputIndices[i2 * inputRank + j] * inputStrides[j];\n }\n for (let j = 0; j < outputRank; ++j) {\n newIndices[i2 * outputRank + j] = Math.trunc(id / outputStrides[j]);\n id %= outputStrides[j];\n }\n }\n return [newIndices, [nnz, outputRank], outputShape];\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SparseSegmentReduction_impl.js\nfunction sparseSegmentReductionImpl(input2, inputShape, inputDType, indices, segmentIds, isMean = false, defaultValue = 0) {\n const numIndices = indices.length;\n const inputFlat = [inputShape[0], input2.length / inputShape[0]];\n const numCol = inputFlat[1];\n const lastSegmentIdPlusOne = numIndices > 0 ? segmentIds[numIndices - 1] + 1 : 0;\n const outputRows = lastSegmentIdPlusOne;\n if (outputRows < 0) {\n throw new Error(backend_util_exports.getSparseSegmentReductionNegativeSegmentIdsErrorMessage());\n }\n const outputShape = inputShape.slice();\n outputShape[0] = outputRows;\n const outputLength = outputShape.reduce((product, value) => product * value, 1);\n const output = util_exports.getArrayFromDType(inputDType, outputLength);\n if (numIndices === 0) {\n if (outputRows > 0) {\n output.fill(defaultValue);\n }\n return [output, outputShape];\n }\n if (outputRows <= 0) {\n throw new Error(backend_util_exports.getSparseSegmentReductionNegativeSegmentIdsErrorMessage());\n }\n let start = 0, end = 1;\n let uninitializedIndex = 0;\n let outIndex = segmentIds[start];\n while (true) {\n let nextIndex = 0;\n if (end < numIndices) {\n nextIndex = segmentIds[end];\n if (outIndex === nextIndex) {\n ++end;\n continue;\n }\n if (outIndex >= nextIndex) {\n throw new Error(backend_util_exports.getSparseSegmentReductionNonIncreasingSegmentIdsErrorMessage());\n }\n }\n if (outIndex < 0 || outIndex >= outputRows) {\n throw new Error(backend_util_exports.getSparseSegmentReductionSegmentIdOutOfRangeErrorMessage(outIndex, outputRows));\n }\n if (outIndex > uninitializedIndex) {\n output.fill(defaultValue, uninitializedIndex * numCol, outIndex * numCol);\n }\n for (let i2 = start; i2 < end; ++i2) {\n const index = indices[i2];\n if (index < 0 || index >= inputFlat[0]) {\n throw new Error(backend_util_exports.getSparseSegmentReductionIndicesOutOfRangeErrorMessage(i2, indices[i2], inputFlat[0]));\n }\n for (let j = 0; j < numCol; j++) {\n output[outIndex * numCol + j] += input2[index * numCol + j];\n }\n }\n if (isMean) {\n for (let j = 0; j < numCol; j++) {\n output[outIndex * numCol + j] /= end - start;\n }\n }\n start = end;\n ++end;\n uninitializedIndex = outIndex + 1;\n outIndex = nextIndex;\n if (end > numIndices) {\n break;\n }\n }\n if (uninitializedIndex < outputRows) {\n output.fill(defaultValue, uninitializedIndex * numCol, outputRows * numCol);\n }\n return [output, outputShape];\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Sqrt.js\nvar sqrtImpl = createSimpleUnaryImpl((xi) => Math.sqrt(xi));\nvar sqrt2 = unaryKernelFunc(Sqrt, (xi) => Math.sqrt(xi));\nvar sqrtConfig = {\n kernelName: Sqrt,\n backendName: \"cpu\",\n kernelFunc: sqrt2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SquaredDifference.js\nvar squaredDifferenceImpl = createSimpleBinaryKernelImpl((a, b) => {\n const diff = a - b;\n return diff * diff;\n});\nvar squaredDifference2 = binaryKernelFunc(SquaredDifference, squaredDifferenceImpl);\nvar squaredDifferenceConfig = {\n kernelName: SquaredDifference,\n backendName: \"cpu\",\n kernelFunc: squaredDifference2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/StridedSlice_impl.js\nfunction stridedSliceImpl(outShape, xBuf, strides, begin) {\n const outBuf = buffer(outShape, xBuf.dtype);\n for (let i2 = 0; i2 < outBuf.size; i2++) {\n const loc = outBuf.indexToLoc(i2);\n const newLoc = new Array(loc.length);\n for (let j = 0; j < newLoc.length; j++) {\n newLoc[j] = loc[j] * strides[j] + begin[j];\n }\n outBuf.set(xBuf.get(...newLoc), ...loc);\n }\n return outBuf;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/StringNGrams_impl.js\nvar StringNGramsOp = class {\n constructor(separator, nGramWidths, leftPad, rightPad2, padWidth, preserveShortSequences) {\n this.separator = util_exports.encodeString(separator);\n this.nGramWidths = nGramWidths;\n this.leftPad = util_exports.encodeString(leftPad);\n this.rightPad = util_exports.encodeString(rightPad2);\n this.padWidth = padWidth;\n this.preserveShort = preserveShortSequences;\n }\n getPadWidth(nGramWidth) {\n return Math.min(this.padWidth < 0 ? nGramWidth - 1 : this.padWidth, nGramWidth - 1);\n }\n getNumNGrams(length, nGramWidth) {\n const padWidth = this.getPadWidth(nGramWidth);\n return Math.max(0, length + 2 * padWidth - nGramWidth + 1);\n }\n createNGrams(data, splitIndex, output, outputStartIndex, numNGrams, nGramWidth) {\n for (let nGramIndex = 0; nGramIndex < numNGrams; ++nGramIndex) {\n const padWidth = this.getPadWidth(nGramWidth);\n const leftPadding = Math.max(0, padWidth - nGramIndex);\n const rightPadding = Math.max(0, padWidth - (numNGrams - (nGramIndex + 1)));\n const numTokens = nGramWidth - (leftPadding + rightPadding);\n const dataStartIndex = splitIndex + (leftPadding > 0 ? 0 : nGramIndex - padWidth);\n let nGramSize = 0;\n nGramSize += leftPadding * this.leftPad.length;\n for (let n2 = 0; n2 < numTokens; ++n2) {\n nGramSize += data[dataStartIndex + n2].length;\n }\n nGramSize += rightPadding * this.rightPad.length;\n const numSeparators = leftPadding + rightPadding + numTokens - 1;\n nGramSize += numSeparators * this.separator.length;\n output[outputStartIndex + nGramIndex] = new Uint8Array(nGramSize);\n const nGram = output[outputStartIndex + nGramIndex];\n let nextNGramIndex = 0;\n const appendToNGram = (str) => str.forEach((value) => nGram[nextNGramIndex++] = value);\n for (let n2 = 0; n2 < leftPadding; ++n2) {\n appendToNGram(this.leftPad);\n appendToNGram(this.separator);\n }\n for (let n2 = 0; n2 < numTokens - 1; ++n2) {\n appendToNGram(data[dataStartIndex + n2]);\n appendToNGram(this.separator);\n }\n if (numTokens > 0) {\n appendToNGram(data[dataStartIndex + numTokens - 1]);\n for (let n2 = 0; n2 < rightPadding; ++n2) {\n appendToNGram(this.separator);\n appendToNGram(this.rightPad);\n }\n } else {\n for (let n2 = 0; n2 < rightPadding - 1; ++n2) {\n appendToNGram(this.rightPad);\n appendToNGram(this.separator);\n }\n appendToNGram(this.rightPad);\n }\n }\n }\n compute(data, splits) {\n const inputDataSize = data.length;\n const splitsSize = splits.length;\n if (splitsSize > 0) {\n let prevSplit = splits[0];\n if (prevSplit !== 0) {\n throw new Error(`First split value must be 0, got ${prevSplit}`);\n }\n for (let i2 = 1; i2 < splitsSize; ++i2) {\n let validSplits = splits[i2] >= prevSplit;\n validSplits = validSplits && splits[i2] <= inputDataSize;\n if (!validSplits) {\n throw new Error(`Invalid split value ${splits[i2]}, must be in [${prevSplit}, ${inputDataSize}]`);\n }\n prevSplit = splits[i2];\n }\n if (prevSplit !== inputDataSize) {\n throw new Error(`Last split value must be data size. Expected ${inputDataSize}, got ${prevSplit}`);\n }\n }\n const numBatchItems = splitsSize - 1;\n const nGramsSplits = util_exports.getArrayFromDType(\"int32\", splitsSize);\n if (inputDataSize === 0 || splitsSize === 0) {\n const empty = new Array(inputDataSize);\n for (let i2 = 0; i2 <= numBatchItems; ++i2) {\n nGramsSplits[i2] = 0;\n }\n return [empty, nGramsSplits];\n }\n nGramsSplits[0] = 0;\n for (let i2 = 1; i2 <= numBatchItems; ++i2) {\n const length = splits[i2] - splits[i2 - 1];\n let numNGrams = 0;\n this.nGramWidths.forEach((nGramWidth) => {\n numNGrams += this.getNumNGrams(length, nGramWidth);\n });\n if (this.preserveShort && length > 0 && numNGrams === 0) {\n numNGrams = 1;\n }\n nGramsSplits[i2] = nGramsSplits[i2 - 1] + numNGrams;\n }\n const nGrams = new Array(nGramsSplits[numBatchItems]);\n for (let i2 = 0; i2 < numBatchItems; ++i2) {\n const splitIndex = splits[i2];\n let outputStartIdx = nGramsSplits[i2];\n this.nGramWidths.forEach((nGramWidth) => {\n const length = splits[i2 + 1] - splits[i2];\n const numNGrams = this.getNumNGrams(length, nGramWidth);\n this.createNGrams(data, splitIndex, nGrams, outputStartIdx, numNGrams, nGramWidth);\n outputStartIdx += numNGrams;\n });\n if (this.preserveShort && outputStartIdx === nGramsSplits[i2]) {\n const dataLength = splits[i2 + 1] - splits[i2];\n if (dataLength === 0) {\n continue;\n }\n const nGramWidth = dataLength + 2 * this.padWidth;\n const numNGrams = 1;\n this.createNGrams(data, splitIndex, nGrams, outputStartIdx, numNGrams, nGramWidth);\n }\n }\n return [nGrams, nGramsSplits];\n }\n};\nfunction stringNGramsImpl(data, dataSplits, separator, nGramWidths, leftPad, rightPad2, padWidth, preserveShortSequences) {\n return new StringNGramsOp(separator, nGramWidths, leftPad, rightPad2, padWidth, preserveShortSequences).compute(data, dataSplits);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/StringSplit_impl.js\nfunction split3(str, delimiters, skipEmpty, result) {\n if (!str.length) {\n return;\n }\n if (delimiters.length === 0) {\n for (let i2 = 0; i2 < str.length; ++i2) {\n result.push(str.subarray(i2, i2 + 1));\n }\n return;\n }\n if (delimiters.length === 1) {\n const delimiter = delimiters[0];\n let f = str.indexOf(delimiter);\n while (f !== -1) {\n const token = str.subarray(0, f);\n if (!skipEmpty || token.length !== 0) {\n result.push(token);\n }\n str = str.subarray(f + 1);\n f = str.indexOf(delimiter);\n }\n if (!skipEmpty || str.length !== 0) {\n result.push(str);\n }\n return;\n }\n let tokenStart = 0;\n for (let i2 = 0; i2 < str.length + 1; i2++) {\n if (i2 === str.length || delimiters.indexOf(str[i2]) !== -1) {\n const token = str.subarray(tokenStart, i2);\n if (!skipEmpty || token.length !== 0) {\n result.push(token);\n }\n tokenStart = i2 + 1;\n }\n }\n}\nfunction stringSplitImpl(input2, delimiter, skipEmpty) {\n const batchSize = input2.length;\n const tokens = [];\n let outputSize = 0;\n let maxNumEntries = 0;\n const numIndices = new Array(batchSize);\n for (let i2 = 0; i2 < batchSize; ++i2) {\n const prevTokensLength = tokens.length;\n split3(input2[i2], delimiter, skipEmpty, tokens);\n const nEntries = tokens.length - prevTokensLength;\n numIndices[i2] = nEntries;\n outputSize += nEntries;\n maxNumEntries = Math.max(maxNumEntries, nEntries);\n }\n const indices = util_exports.getArrayFromDType(\"int32\", outputSize * 2);\n const values = new Array(outputSize);\n const shape = [batchSize, maxNumEntries];\n let c = 0;\n for (let i2 = 0; i2 < batchSize; ++i2) {\n for (let j = 0; j < numIndices[i2]; ++j) {\n indices[c * 2] = i2;\n indices[c * 2 + 1] = j;\n values[c] = tokens[c];\n ++c;\n }\n }\n return [indices, values, shape];\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/StringToHashBucketFast_impl.js\nfunction stringToHashBucketFastImpl(input2, numBuckets) {\n const output = util_exports.getArrayFromDType(\"int32\", input2.length);\n for (let i2 = 0; i2 < input2.length; ++i2) {\n output[i2] = util_exports.fingerPrint64(input2[i2]).modulo(numBuckets).getLowBitsUnsigned();\n }\n return output;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Sub.js\nvar subImpl = createSimpleBinaryKernelImpl((aValue, bValue) => aValue - bValue);\nvar subComplexImpl = createComplexBinaryKernelImpl((aReal, aImag, bReal, bImag) => {\n return { real: aReal - bReal, imag: aImag - bImag };\n});\nvar sub2 = binaryKernelFunc(Sub, subImpl, subComplexImpl);\nvar subConfig = {\n kernelName: Sub,\n backendName: \"cpu\",\n kernelFunc: sub2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Tile_impl.js\nfunction tileImpl(xBuf, reps) {\n const newShape = new Array(xBuf.rank);\n for (let i2 = 0; i2 < newShape.length; i2++) {\n newShape[i2] = xBuf.shape[i2] * reps[i2];\n }\n const result = buffer(newShape, xBuf.dtype);\n for (let i2 = 0; i2 < result.values.length; ++i2) {\n const newLoc = result.indexToLoc(i2);\n const originalLoc = new Array(xBuf.rank);\n for (let j = 0; j < originalLoc.length; j++) {\n originalLoc[j] = newLoc[j] % xBuf.shape[j];\n }\n const originalIndex = xBuf.locToIndex(originalLoc);\n result.values[i2] = xBuf.values[originalIndex];\n }\n return result;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/TopK_impl.js\nvar comparePair = (a, b) => {\n const valueDiff = b.value - a.value;\n return valueDiff === 0 ? a.index - b.index : valueDiff;\n};\nfunction select(array2, k, left = 0, right = array2.length - 1) {\n while (right > left) {\n if (right - left > 600) {\n const n2 = right - left + 1;\n const i3 = k - left + 1;\n const z = Math.log(n2);\n const s2 = 0.5 * Math.exp(2 * z / 3);\n const sd = 0.5 * Math.sqrt(z * s2 * (n2 - s2) / n2) * Math.sign(i3 - n2 / 2);\n const newLeft = Math.max(left, Math.floor(k - i3 * s2 / n2 + sd));\n const newRight = Math.min(right, Math.floor(k + (n2 - i3) * s2 / n2 + sd));\n select(array2, k, newLeft, newRight);\n }\n const t2 = array2[k];\n let i2 = left;\n let j = right;\n util_exports.swap(array2, left, k);\n if (comparePair(array2[right], t2) > 0) {\n util_exports.swap(array2, left, right);\n }\n while (i2 < j) {\n util_exports.swap(array2, i2, j);\n i2++;\n j--;\n while (comparePair(array2[i2], t2) < 0) {\n i2 = i2 + 1;\n }\n while (comparePair(array2[j], t2) > 0) {\n j = j - 1;\n }\n }\n if (comparePair(array2[left], t2) === 0) {\n util_exports.swap(array2, left, j);\n } else {\n j = j + 1;\n util_exports.swap(array2, j, right);\n }\n if (j <= k) {\n left = j + 1;\n }\n if (k <= j) {\n right = j - 1;\n }\n }\n}\nfunction topKImpl(x, xShape, xDtype, k, sorted) {\n const lastDim = xShape[xShape.length - 1];\n const [batch, size] = [x.length / lastDim, lastDim];\n const allTopKVals = util_exports.getTypedArrayFromDType(xDtype, batch * k);\n const allTopKIndices = util_exports.getTypedArrayFromDType(\"int32\", batch * k);\n for (let b = 0; b < batch; b++) {\n const offset = b * size;\n const vals = x.subarray(offset, offset + size);\n let valAndInd = new Array(vals.length);\n vals.forEach((value, index) => valAndInd[index] = { value, index });\n if (k < valAndInd.length) {\n select(valAndInd, k);\n valAndInd = valAndInd.slice(0, k);\n }\n if (sorted) {\n valAndInd.sort(comparePair);\n }\n const outOffset = b * k;\n const topKVals = allTopKVals.subarray(outOffset, outOffset + k);\n const topKIndices = allTopKIndices.subarray(outOffset, outOffset + k);\n for (let i2 = 0; i2 < k; i2++) {\n topKVals[i2] = valAndInd[i2].value;\n topKIndices[i2] = valAndInd[i2].index;\n }\n }\n const outputShape = xShape.slice();\n outputShape[outputShape.length - 1] = k;\n return [\n buffer(outputShape, xDtype, allTopKVals),\n buffer(outputShape, \"int32\", allTopKIndices)\n ];\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Unique_impl.js\nfunction uniqueImpl(values, axis, shape, dtype) {\n const $axis = util_exports.parseAxisParam(axis, shape)[0];\n const newShape = [1, shape[0], 1];\n for (let i2 = 0; i2 < $axis; i2++) {\n newShape[0] *= shape[i2];\n }\n newShape[1] = shape[$axis];\n for (let i2 = $axis + 1; i2 < shape.length; i2++) {\n newShape[2] *= shape[i2];\n }\n const uniqueElements = {};\n const indices = new Int32Array(shape[$axis]);\n const inputBuffer = new TensorBuffer(newShape, dtype, values);\n const uniqueIndices = [];\n const is1DTensor = newShape[0] === 1 && newShape[2] === 1;\n for (let i2 = 0; i2 < shape[$axis]; i2++) {\n let element;\n if (is1DTensor) {\n element = values[i2].toString();\n } else {\n const axisValues = [];\n for (let m = 0; m < newShape[0]; m++) {\n for (let n2 = 0; n2 < newShape[2]; n2++) {\n axisValues.push(inputBuffer.get(m, i2, n2));\n }\n }\n element = axisValues.join(\",\");\n }\n if (uniqueElements[element] !== void 0) {\n indices[i2] = uniqueElements[element];\n } else {\n const uniqueIndex = Object.keys(uniqueElements).length;\n uniqueElements[element] = uniqueIndex;\n indices[i2] = uniqueIndex;\n uniqueIndices.push(i2);\n }\n }\n const outputTmpShape = newShape.slice();\n outputTmpShape[1] = Object.keys(uniqueElements).length;\n const outputBuffer = new TensorBuffer(outputTmpShape, dtype);\n uniqueIndices.forEach((uniqueElementIndex, i2) => {\n for (let m = 0; m < newShape[0]; m++) {\n for (let n2 = 0; n2 < newShape[2]; n2++) {\n outputBuffer.set(inputBuffer.get(m, uniqueElementIndex, n2), m, i2, n2);\n }\n }\n });\n const outputShape = shape.slice();\n outputShape[$axis] = outputTmpShape[1];\n return {\n outputValues: outputBuffer.values,\n outputShape,\n indices\n };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/base.js\nregisterBackend(\"cpu\", () => new MathBackendCPU(), 1);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Elu.js\nvar elu4 = unaryKernelFunc(Elu, (xi) => xi >= 0 ? xi : Math.exp(xi) - 1);\nvar eluConfig = {\n kernelName: Elu,\n backendName: \"cpu\",\n kernelFunc: elu4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/LeakyRelu.js\nfunction leakyRelu2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { alpha } = attrs;\n assertNotComplex([x], \"leakyRelu\");\n const xSize = util_exports.sizeFromShape(x.shape);\n const xVals = backend2.data.get(x.dataId).values;\n const outVals = util_exports.getTypedArrayFromDType(\"float32\", xSize);\n for (let i2 = 0; i2 < xVals.length; i2++) {\n outVals[i2] = xVals[i2] < 0 ? alpha * xVals[i2] : xVals[i2];\n }\n return backend2.makeTensorInfo(x.shape, \"float32\", outVals);\n}\nvar leakyReluConfig = {\n kernelName: LeakyRelu,\n backendName: \"cpu\",\n kernelFunc: leakyRelu2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Prelu.js\nvar preluImpl = createSimpleBinaryKernelImpl((xValue, aValue) => xValue < 0 ? aValue * xValue : xValue);\nfunction prelu3(args) {\n const { inputs, backend: backend2 } = args;\n const { x, alpha } = inputs;\n assertNotComplex([x, alpha], \"prelu\");\n const aVals = backend2.data.get(x.dataId).values;\n const bVals = backend2.data.get(alpha.dataId).values;\n const [resultData, resultShape] = preluImpl(x.shape, alpha.shape, aVals, bVals, \"float32\");\n return backend2.makeTensorInfo(resultShape, \"float32\", resultData);\n}\nvar preluConfig = {\n kernelName: Prelu,\n backendName: \"cpu\",\n kernelFunc: prelu3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Relu.js\nvar relu2 = unaryKernelFunc(Relu, (xi) => Math.max(0, xi));\nvar reluConfig = {\n kernelName: Relu,\n backendName: \"cpu\",\n kernelFunc: relu2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Relu6.js\nvar relu62 = unaryKernelFunc(Relu6, (xi) => Math.min(Math.max(0, xi), 6));\nvar relu6Config = {\n kernelName: Relu6,\n backendName: \"cpu\",\n kernelFunc: relu62\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/utils/fused_utils.js\nfunction applyActivation2(backend2, x, activation2, preluActivationWeights, leakyreluAlpha) {\n if (activation2 === \"linear\") {\n return identity2({ inputs: { x }, backend: backend2 });\n } else if (activation2 === \"relu\") {\n return relu2({ inputs: { x }, backend: backend2 });\n } else if (activation2 === \"elu\") {\n return elu4({ inputs: { x }, backend: backend2 });\n } else if (activation2 === \"relu6\") {\n return relu62({ inputs: { x }, backend: backend2 });\n } else if (activation2 === \"prelu\") {\n return prelu3({ inputs: { x, alpha: preluActivationWeights }, backend: backend2 });\n } else if (activation2 === \"leakyrelu\") {\n return leakyRelu2({ inputs: { x }, backend: backend2, attrs: { alpha: leakyreluAlpha } });\n } else if (activation2 === \"sigmoid\") {\n return sigmoid2({ inputs: { x }, backend: backend2 });\n }\n throw new Error(`Activation ${activation2} has not been implemented for the CPU backend.`);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Reshape.js\nfunction reshape3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { shape } = attrs;\n const xSize = util_exports.sizeFromShape(x.shape);\n const $shape = util_exports.inferFromImplicitShape(shape, xSize);\n const $xSize = util_exports.sizeFromShape($shape);\n util_exports.assert(xSize === $xSize, () => `The new shape (${$shape}) has ${$xSize} elements and the old shape (${x.shape}) has ${xSize} elements. The new shape and old shape must have the same number of elements.`);\n backend2.incRef(x.dataId);\n const xData = backend2.data.get(x.dataId);\n if (xData.complexTensorInfos != null) {\n const real5 = xData.complexTensorInfos.real;\n const imag5 = xData.complexTensorInfos.imag;\n real5.shape = $shape;\n imag5.shape = $shape;\n }\n return { dataId: x.dataId, shape: $shape, dtype: x.dtype };\n}\nvar reshapeConfig = {\n kernelName: Reshape,\n backendName: \"cpu\",\n kernelFunc: reshape3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/BatchMatMul.js\nfunction batchMatMul(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { a, b } = inputs;\n const { transposeA, transposeB } = attrs;\n assertNotComplex([a, b], \"matMul\");\n const aRank = a.shape.length;\n const bRank = b.shape.length;\n const innerShapeA = transposeA ? a.shape[aRank - 2] : a.shape[aRank - 1];\n const innerShapeB = transposeB ? b.shape[bRank - 1] : b.shape[bRank - 2];\n const outerShapeA = transposeA ? a.shape[aRank - 1] : a.shape[aRank - 2];\n const outerShapeB = transposeB ? b.shape[bRank - 2] : b.shape[bRank - 1];\n const outerDimsA = a.shape.slice(0, -2);\n const outerDimsB = b.shape.slice(0, -2);\n const batchDimA = util_exports.sizeFromShape(outerDimsA);\n const batchDimB = util_exports.sizeFromShape(outerDimsB);\n const outShapeOuterDims = broadcast_util_exports.assertAndGetBroadcastShape(a.shape.slice(0, -2), b.shape.slice(0, -2));\n const outShape = outShapeOuterDims.concat([outerShapeA, outerShapeB]);\n util_exports.assert(innerShapeA === innerShapeB, () => `Error in matMul: inner shapes (${innerShapeA}) and (${innerShapeB}) of Tensors with shapes ${a.shape} and ${b.shape} and transposeA=${transposeA} and transposeB=${transposeB} must match.`);\n const a3dShape = transposeA ? [batchDimA, innerShapeA, outerShapeA] : [batchDimA, outerShapeA, innerShapeA];\n const b3dShape = transposeB ? [batchDimB, outerShapeB, innerShapeB] : [batchDimB, innerShapeB, outerShapeB];\n const a3d = reshape3({ inputs: { x: a }, backend: backend2, attrs: { shape: a3dShape } });\n const b3d = reshape3({ inputs: { x: b }, backend: backend2, attrs: { shape: b3dShape } });\n const sharedDim = transposeA ? a3d.shape[1] : a3d.shape[2];\n const leftDim = transposeA ? a3d.shape[2] : a3d.shape[1];\n const rightDim = transposeB ? b3d.shape[1] : b3d.shape[2];\n const batchDim = Math.max(batchDimA, batchDimB);\n const a3dValues = backend2.data.get(a3d.dataId).values;\n const b3dValues = backend2.data.get(b3d.dataId).values;\n const a3dStrides = util_exports.computeStrides(a3d.shape);\n const b3dStrides = util_exports.computeStrides(b3d.shape);\n const [aBatch, aOuterStep, aInnerStep] = transposeA ? [a3dStrides[0], 1, a3dStrides[1]] : [a3dStrides[0], a3dStrides[1], 1];\n const [bInnerStep, bOuterStep, bBatch] = transposeB ? [1, b3dStrides[1], b3dStrides[0]] : [b3dStrides[1], 1, b3dStrides[0]];\n const size = leftDim * rightDim;\n const result = buffer([batchDim, leftDim, rightDim], a3d.dtype);\n const resVals = result.values;\n const blockSize = backend2.blockSize;\n for (let bi = 0; bi < batchDim; bi++) {\n for (let i0 = 0; i0 < leftDim; i0 += blockSize) {\n for (let j0 = 0; j0 < rightDim; j0 += blockSize) {\n for (let k02 = 0; k02 < sharedDim; k02 += blockSize) {\n const iBlock = Math.min(i0 + blockSize, leftDim);\n const jBlock = Math.min(j0 + blockSize, rightDim);\n const kBlock = Math.min(k02 + blockSize, sharedDim);\n for (let i2 = i0; i2 < iBlock; i2++) {\n for (let j = j0; j < jBlock; j++) {\n let sum7 = 0;\n for (let k = k02; k < kBlock; k++) {\n const batchOffsetA = Math.min(bi, batchDimA - 1) * aBatch;\n const batchOffsetB = Math.min(bi, batchDimB - 1) * bBatch;\n const aVal = a3dValues[batchOffsetA + i2 * aOuterStep + k * aInnerStep];\n const bVal = b3dValues[k * bInnerStep + j * bOuterStep + batchOffsetB];\n sum7 += aVal * bVal;\n }\n resVals[bi * size + (i2 * rightDim + j)] += sum7;\n }\n }\n }\n }\n }\n }\n backend2.disposeIntermediateTensorInfo(a3d);\n backend2.disposeIntermediateTensorInfo(b3d);\n return backend2.makeTensorInfo(outShape, result.dtype, result.values);\n}\nvar batchMatMulConfig = {\n kernelName: BatchMatMul,\n backendName: \"cpu\",\n kernelFunc: batchMatMul\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/_FusedMatMul.js\nfunction _fusedMatMul(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { a, b, bias, preluActivationWeights } = inputs;\n const { transposeA, transposeB, activation: activation2, leakyreluAlpha } = attrs;\n let current;\n let addRes;\n let activationRes;\n const intermediates = [];\n const matMulRes = batchMatMul({ inputs: { a, b }, attrs: { transposeA, transposeB }, backend: backend2 });\n current = matMulRes;\n if (bias) {\n addRes = add4({ inputs: { a: current, b: bias }, backend: backend2 });\n intermediates.push(current);\n current = addRes;\n }\n if (activation2) {\n activationRes = applyActivation2(backend2, current, activation2, preluActivationWeights, leakyreluAlpha);\n intermediates.push(current);\n current = activationRes;\n }\n for (const i2 of intermediates) {\n backend2.disposeIntermediateTensorInfo(i2);\n }\n return current;\n}\nvar _fusedMatMulConfig = {\n kernelName: _FusedMatMul,\n backendName: \"cpu\",\n kernelFunc: _fusedMatMul\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Acos.js\nvar acos2 = unaryKernelFunc(Acos, (xi) => Math.acos(xi));\nvar acosConfig = {\n kernelName: Acos,\n backendName: \"cpu\",\n kernelFunc: acos2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Acosh.js\nvar acosh2 = unaryKernelFunc(Acosh, (xi) => Math.acosh(xi));\nvar acoshConfig = {\n kernelName: Acosh,\n backendName: \"cpu\",\n kernelFunc: acosh2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/AddN.js\nfunction addN2(args) {\n const { inputs, backend: backend2 } = args;\n const tensors = inputs;\n assertNotComplex(inputs, \"addN\");\n const vals = tensors.map((t2) => backend2.data.get(t2.dataId).values);\n const outBuf = buffer(tensors[0].shape, tensors[0].dtype);\n const outVals = outBuf.values;\n for (let i2 = 0; i2 < tensors.length; i2++) {\n const currVals = vals[i2];\n for (let j = 0; j < outVals.length; j++) {\n outVals[j] += currVals[j];\n }\n }\n return backend2.makeTensorInfo(outBuf.shape, outBuf.dtype, outBuf.values);\n}\nvar addNConfig = {\n kernelName: AddN,\n backendName: \"cpu\",\n kernelFunc: addN2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/All.js\nfunction all2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis, keepDims } = attrs;\n assertNotComplex(x, \"all\");\n const origAxes = util_exports.parseAxisParam(axis, x.shape);\n let axes = origAxes;\n const permutedAxes = backend_util_exports.getAxesPermutation(axes, x.shape.length);\n let $x = x;\n if (permutedAxes != null) {\n $x = transpose2({ inputs: { x }, backend: backend2, attrs: { perm: permutedAxes } });\n axes = backend_util_exports.getInnerMostAxes(axes.length, x.shape.length);\n }\n backend_util_exports.assertAxesAreInnerMostDims(\"all\", axes, $x.shape.length);\n const [outShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes($x.shape, axes);\n const reduceSize = util_exports.sizeFromShape(reduceShape);\n const vals = util_exports.makeZerosTypedArray(util_exports.sizeFromShape(outShape), $x.dtype);\n const aVals = backend2.data.get($x.dataId).values;\n for (let i2 = 0; i2 < vals.length; ++i2) {\n const offset = i2 * reduceSize;\n let all5 = aVals[offset];\n for (let j = 0; j < reduceSize; ++j) {\n const value = aVals[offset + j];\n all5 = all5 && value;\n }\n vals[i2] = all5;\n }\n if (permutedAxes != null) {\n backend2.disposeIntermediateTensorInfo($x);\n }\n const result = backend2.makeTensorInfo(outShape, $x.dtype, vals);\n if (keepDims) {\n const expandedShape = backend_util_exports.expandShapeToKeepDim(outShape, origAxes);\n const reshapedResult = reshape3({ inputs: { x: result }, backend: backend2, attrs: { shape: expandedShape } });\n backend2.disposeIntermediateTensorInfo(result);\n return reshapedResult;\n }\n return result;\n}\nvar allConfig = {\n kernelName: All,\n backendName: \"cpu\",\n kernelFunc: all2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Any.js\nfunction any2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis, keepDims } = attrs;\n assertNotComplex(x, \"any\");\n const origAxes = util_exports.parseAxisParam(axis, x.shape);\n let axes = origAxes;\n const permutedAxes = backend_util_exports.getAxesPermutation(axes, x.shape.length);\n let $x = x;\n if (permutedAxes != null) {\n $x = transpose2({ inputs: { x }, backend: backend2, attrs: { perm: permutedAxes } });\n axes = backend_util_exports.getInnerMostAxes(axes.length, x.shape.length);\n }\n backend_util_exports.assertAxesAreInnerMostDims(\"any\", axes, $x.shape.length);\n const [outShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes($x.shape, axes);\n const reduceSize = util_exports.sizeFromShape(reduceShape);\n const vals = util_exports.makeZerosTypedArray(util_exports.sizeFromShape(outShape), $x.dtype);\n const aVals = backend2.data.get($x.dataId).values;\n for (let i2 = 0; i2 < vals.length; ++i2) {\n const offset = i2 * reduceSize;\n let anyVal = aVals[offset];\n for (let j = 0; j < reduceSize; ++j) {\n const value = aVals[offset + j];\n anyVal = anyVal || value;\n }\n vals[i2] = anyVal;\n }\n if (permutedAxes != null) {\n backend2.disposeIntermediateTensorInfo($x);\n }\n const result = backend2.makeTensorInfo(outShape, $x.dtype, vals);\n if (keepDims) {\n const expandedShape = backend_util_exports.expandShapeToKeepDim(outShape, origAxes);\n const reshapedResult = reshape3({ inputs: { x: result }, backend: backend2, attrs: { shape: expandedShape } });\n backend2.disposeIntermediateTensorInfo(result);\n return reshapedResult;\n }\n return result;\n}\nvar anyConfig = {\n kernelName: Any,\n backendName: \"cpu\",\n kernelFunc: any2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ArgMax.js\nfunction argMax2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis } = attrs;\n assertNotComplex(x, \"argMax\");\n let axes = util_exports.parseAxisParam(axis, x.shape);\n const permutedAxes = backend_util_exports.getAxesPermutation(axes, x.shape.length);\n let $x = x;\n const intermediateTensorInfos = [];\n if (permutedAxes != null) {\n $x = transpose2({ inputs: { x }, backend: backend2, attrs: { perm: permutedAxes } });\n intermediateTensorInfos.push($x);\n axes = backend_util_exports.getInnerMostAxes(axes.length, $x.shape.length);\n }\n axes = [axes[0]];\n backend_util_exports.assertAxesAreInnerMostDims(\"argMax\", axes, $x.shape.length);\n const [outShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes($x.shape, axes);\n const outSize = util_exports.sizeFromShape(outShape);\n const vals = util_exports.makeZerosTypedArray(outSize, \"int32\");\n const reduceSize = util_exports.sizeFromShape(reduceShape);\n const aVals = backend2.data.get($x.dataId).values;\n for (let i2 = 0; i2 < vals.length; ++i2) {\n const offset = i2 * reduceSize;\n let max7 = aVals[offset];\n let maxIndex = 0;\n for (let j = 0; j < reduceSize; ++j) {\n const value = aVals[offset + j];\n if (value > max7) {\n max7 = value;\n maxIndex = j;\n }\n }\n vals[i2] = maxIndex;\n }\n intermediateTensorInfos.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2));\n return backend2.makeTensorInfo(outShape, \"int32\", vals);\n}\nvar argMaxConfig = {\n kernelName: ArgMax,\n backendName: \"cpu\",\n kernelFunc: argMax2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ArgMin.js\nfunction argMin2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis } = attrs;\n assertNotComplex(x, \"argMin\");\n let axes = util_exports.parseAxisParam(axis, x.shape);\n const permutedAxes = backend_util_exports.getAxesPermutation(axes, x.shape.length);\n let $x = x;\n const intermediateTensorInfos = [];\n if (permutedAxes != null) {\n $x = transpose2({ inputs: { x }, backend: backend2, attrs: { perm: permutedAxes } });\n intermediateTensorInfos.push($x);\n axes = backend_util_exports.getInnerMostAxes(axes.length, $x.shape.length);\n }\n axes = [axes[0]];\n backend_util_exports.assertAxesAreInnerMostDims(\"argMin\", axes, $x.shape.length);\n const [outShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes($x.shape, axes);\n const outSize = util_exports.sizeFromShape(outShape);\n const vals = util_exports.makeZerosTypedArray(outSize, \"int32\");\n const reduceSize = util_exports.sizeFromShape(reduceShape);\n const aVals = backend2.data.get($x.dataId).values;\n for (let i2 = 0; i2 < vals.length; ++i2) {\n const offset = i2 * reduceSize;\n let min7 = aVals[offset];\n let minIndex = 0;\n for (let j = 0; j < reduceSize; ++j) {\n const value = aVals[offset + j];\n if (value < min7) {\n min7 = value;\n minIndex = j;\n }\n }\n vals[i2] = minIndex;\n }\n intermediateTensorInfos.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2));\n return backend2.makeTensorInfo(outShape, \"int32\", vals);\n}\nvar argMinConfig = {\n kernelName: ArgMin,\n backendName: \"cpu\",\n kernelFunc: argMin2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Asin.js\nvar asin2 = unaryKernelFunc(Asin, (xi) => Math.asin(xi));\nvar asinConfig = {\n kernelName: Asin,\n backendName: \"cpu\",\n kernelFunc: asin2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Asinh.js\nvar asinh2 = unaryKernelFunc(Asinh, (xi) => Math.asinh(xi));\nvar asinhConfig = {\n kernelName: Asinh,\n backendName: \"cpu\",\n kernelFunc: asinh2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Atan.js\nvar atan3 = unaryKernelFunc(Atan, (xi) => Math.atan(xi));\nvar atanConfig = {\n kernelName: Atan,\n backendName: \"cpu\",\n kernelFunc: atan3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Atan2.js\nvar atan2Impl = createSimpleBinaryKernelImpl((aValue, bValue) => Math.atan2(aValue, bValue));\nvar atan22 = binaryKernelFunc(Atan2, atan2Impl);\nvar atan2Config = {\n kernelName: Atan2,\n backendName: \"cpu\",\n kernelFunc: atan22\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Atanh.js\nvar atanh2 = unaryKernelFunc(Atanh, (xi) => Math.atanh(xi));\nvar atanhConfig = {\n kernelName: Atanh,\n backendName: \"cpu\",\n kernelFunc: atanh2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/utils/pool_utils.js\nfunction pool2(xValues, xShape, dtype, strides, convInfo, poolType) {\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const dilationHeight = convInfo.dilationHeight;\n const dilationWidth = convInfo.dilationWidth;\n const effectiveFilterHeight = convInfo.effectiveFilterHeight;\n const effectiveFilterWidth = convInfo.effectiveFilterWidth;\n const padTop = convInfo.padInfo.top;\n const padLeft = convInfo.padInfo.left;\n const initialValue = poolType === \"max\" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY;\n const output = buffer(convInfo.outShape, dtype);\n const outputVals = output.values;\n const outputBatchStrides = convInfo.outShape[1] * convInfo.outShape[2] * convInfo.outShape[3];\n const outputRowStrides = convInfo.outShape[2] * convInfo.outShape[3];\n const outputColStrides = convInfo.outShape[3];\n for (let b = 0; b < convInfo.batchSize; ++b) {\n const outputBatchOffset = b * outputBatchStrides;\n const inputBatchOffset = b * strides[0];\n for (let d = 0; d < convInfo.inChannels; ++d) {\n for (let yR = 0; yR < convInfo.outHeight; ++yR) {\n const xRCorner = yR * strideHeight - padTop;\n const xRMin = Math.max(0, xRCorner);\n const xRMax = Math.min(convInfo.inHeight, effectiveFilterHeight + xRCorner);\n const outputRowOffset = outputBatchOffset + yR * outputRowStrides;\n for (let yC = 0; yC < convInfo.outWidth; ++yC) {\n const xCCorner = yC * strideWidth - padLeft;\n const xCMin = Math.max(0, xCCorner);\n const xCMax = Math.min(convInfo.inWidth, effectiveFilterWidth + xCCorner);\n let minMaxValue = initialValue;\n let avgValue = 0;\n let count2 = 0;\n for (let xR = xRMin; xR < xRMax; xR += dilationHeight) {\n const xROffset = inputBatchOffset + xR * strides[1];\n for (let xC = xCMin; xC < xCMax; xC += dilationWidth) {\n const xCOffset = xROffset + xC * strides[2];\n const pixel = xValues[xCOffset + d];\n if (poolType === \"max\" && pixel > minMaxValue) {\n minMaxValue = pixel;\n } else if (poolType === \"avg\") {\n avgValue += pixel;\n count2++;\n }\n }\n if (isNaN(minMaxValue)) {\n break;\n }\n }\n const outputOffset = outputRowOffset + yC * outputColStrides + d;\n outputVals[outputOffset] = poolType === \"avg\" ? avgValue / count2 : minMaxValue;\n }\n }\n }\n }\n return output;\n}\nfunction maxPoolPositions(xValues, xShape, dtype, convInfo, flattenPositions = false, includeBatchInIndex = false) {\n const maxPositions = buffer(convInfo.outShape, \"int32\");\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const dilationHeight = convInfo.dilationHeight;\n const dilationWidth = convInfo.dilationWidth;\n const effectiveFilterHeight = convInfo.effectiveFilterHeight;\n const effectiveFilterWidth = convInfo.effectiveFilterWidth;\n const padTop = convInfo.padInfo.top;\n const padLeft = convInfo.padInfo.left;\n const xBuf = buffer(xShape, dtype, xValues);\n for (let b = 0; b < convInfo.batchSize; ++b) {\n for (let d = 0; d < convInfo.inChannels; ++d) {\n for (let yR = 0; yR < convInfo.outHeight; ++yR) {\n const xRCorner = yR * strideHeight - padTop;\n let xRMin = xRCorner;\n while (xRMin < 0) {\n xRMin += dilationHeight;\n }\n const xRMax = Math.min(convInfo.inHeight, effectiveFilterHeight + xRCorner);\n for (let yC = 0; yC < convInfo.outWidth; ++yC) {\n const xCCorner = yC * strideWidth - padLeft;\n let xCMin = xCCorner;\n while (xCMin < 0) {\n xCMin += dilationWidth;\n }\n const xCMax = Math.min(convInfo.inWidth, effectiveFilterWidth + xCCorner);\n let maxValue = Number.NEGATIVE_INFINITY;\n let maxPosition = -1;\n for (let xR = xRMin; xR < xRMax; xR += dilationHeight) {\n const wR = xR - xRCorner;\n for (let xC = xCMin; xC < xCMax; xC += dilationWidth) {\n const wC = xC - xCCorner;\n const pixel = xBuf.get(b, xR, xC, d);\n if (pixel > maxValue) {\n maxValue = pixel;\n if (flattenPositions) {\n maxPosition = includeBatchInIndex ? ((b * convInfo.inHeight + xR) * convInfo.inWidth + xC) * convInfo.inChannels + d : (xR * convInfo.inWidth + xC) * convInfo.inChannels + d;\n } else {\n maxPosition = wR * effectiveFilterWidth + wC;\n }\n }\n }\n }\n maxPositions.set(maxPosition, b, yR, yC, d);\n }\n }\n }\n }\n return maxPositions;\n}\nfunction pool3d2(xValues, xShape, dtype, strides, convInfo, poolType) {\n const strideDepth = convInfo.strideDepth;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const dilationDepth = convInfo.dilationDepth;\n const dilationHeight = convInfo.dilationHeight;\n const dilationWidth = convInfo.dilationWidth;\n const effectiveFilterDepth = convInfo.effectiveFilterDepth;\n const effectiveFilterHeight = convInfo.effectiveFilterHeight;\n const effectiveFilterWidth = convInfo.effectiveFilterWidth;\n const padFront = convInfo.padInfo.front;\n const padTop = convInfo.padInfo.top;\n const padLeft = convInfo.padInfo.left;\n const initialValue = poolType === \"max\" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY;\n const output = buffer(convInfo.outShape, dtype);\n const outputVals = output.values;\n const outputBatchStrides = convInfo.outShape[1] * convInfo.outShape[2] * convInfo.outShape[3] * convInfo.outShape[4];\n const outputDepthStrides = convInfo.outShape[2] * convInfo.outShape[3] * convInfo.outShape[4];\n const outputRowStrides = convInfo.outShape[3] * convInfo.outShape[4];\n const outputColStrides = convInfo.outShape[4];\n for (let batch = 0; batch < convInfo.batchSize; ++batch) {\n const outputBatchOffset = batch * outputBatchStrides;\n const inputBatchOffset = batch * strides[0];\n for (let channel = 0; channel < convInfo.inChannels; ++channel) {\n for (let yDepth = 0; yDepth < convInfo.outDepth; ++yDepth) {\n const xDepthCorner = yDepth * strideDepth - padFront;\n let xDepthMin = xDepthCorner;\n while (xDepthMin < 0) {\n xDepthMin += dilationDepth;\n }\n const xDepthMax = Math.min(convInfo.inDepth, effectiveFilterDepth + xDepthCorner);\n const outputDepthOffset = outputBatchOffset + yDepth * outputDepthStrides;\n for (let yRow = 0; yRow < convInfo.outHeight; ++yRow) {\n const xRowCorner = yRow * strideHeight - padTop;\n let xRowMin = xRowCorner;\n while (xRowMin < 0) {\n xRowMin += dilationHeight;\n }\n const xRowMax = Math.min(convInfo.inHeight, effectiveFilterHeight + xRowCorner);\n const outputRowOffset = outputDepthOffset + yRow * outputRowStrides;\n for (let yCol = 0; yCol < convInfo.outWidth; ++yCol) {\n const xColCorner = yCol * strideWidth - padLeft;\n let xColMin = xColCorner;\n while (xColMin < 0) {\n xColMin += dilationWidth;\n }\n const xColMax = Math.min(convInfo.inWidth, effectiveFilterWidth + xColCorner);\n const outputColOffset = outputRowOffset + yCol * outputColStrides;\n let minMaxValue = initialValue;\n let avgValue = 0;\n let count2 = 0;\n for (let xDepth = xDepthMin; xDepth < xDepthMax; xDepth += dilationDepth) {\n const xDepthOffset = inputBatchOffset + xDepth * strides[1];\n for (let xRow = xRowMin; xRow < xRowMax; xRow += dilationHeight) {\n const xRowOffset = xDepthOffset + xRow * strides[2];\n for (let xCol = xColMin; xCol < xColMax; xCol += dilationWidth) {\n const xColOffset = xRowOffset + xCol * strides[3];\n const pixel = xValues[xColOffset + channel];\n if (poolType === \"max\" && pixel > minMaxValue) {\n minMaxValue = pixel;\n } else if (poolType === \"avg\") {\n avgValue += pixel;\n count2++;\n }\n if (isNaN(minMaxValue)) {\n break;\n }\n }\n if (isNaN(minMaxValue)) {\n break;\n }\n }\n if (isNaN(minMaxValue)) {\n break;\n }\n }\n const outputOffset = outputColOffset + channel;\n outputVals[outputOffset] = poolType === \"avg\" ? avgValue / count2 : minMaxValue;\n }\n }\n }\n }\n }\n return output;\n}\nfunction maxPool3dPositions(xBuf, convInfo) {\n const maxPositions = buffer(convInfo.outShape, \"int32\");\n const strideDepth = convInfo.strideDepth;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const dilationDepth = convInfo.dilationDepth;\n const dilationHeight = convInfo.dilationHeight;\n const dilationWidth = convInfo.dilationWidth;\n const effectiveFilterDepth = convInfo.effectiveFilterDepth;\n const effectiveFilterHeight = convInfo.effectiveFilterHeight;\n const effectiveFilterWidth = convInfo.effectiveFilterWidth;\n const padFront = convInfo.padInfo.front;\n const padTop = convInfo.padInfo.top;\n const padLeft = convInfo.padInfo.left;\n for (let batch = 0; batch < convInfo.batchSize; ++batch) {\n for (let channel = 0; channel < convInfo.inChannels; ++channel) {\n for (let yDepth = 0; yDepth < convInfo.outDepth; ++yDepth) {\n const xDepthCorner = yDepth * strideDepth - padFront;\n let xDepthMin = xDepthCorner;\n while (xDepthMin < 0) {\n xDepthMin += dilationDepth;\n }\n const xDepthMax = Math.min(convInfo.inDepth, effectiveFilterDepth + xDepthCorner);\n for (let yRow = 0; yRow < convInfo.outHeight; ++yRow) {\n const xRowCorner = yRow * strideHeight - padTop;\n let xRowMin = xRowCorner;\n while (xRowMin < 0) {\n xRowMin += dilationHeight;\n }\n const xRowMax = Math.min(convInfo.inHeight, effectiveFilterHeight + xRowCorner);\n for (let yCol = 0; yCol < convInfo.outWidth; ++yCol) {\n const xColCorner = yCol * strideWidth - padLeft;\n let xColMin = xColCorner;\n while (xColMin < 0) {\n xColMin += dilationWidth;\n }\n const xColMax = Math.min(convInfo.inWidth, effectiveFilterWidth + xColCorner);\n let maxValue = Number.NEGATIVE_INFINITY;\n let maxPosition = -1;\n for (let xDepth = xDepthMin; xDepth < xDepthMax; xDepth += dilationDepth) {\n const wDepth = xDepth - xDepthCorner;\n for (let xRow = xRowMin; xRow < xRowMax; xRow += dilationHeight) {\n const wRow = xRow - xRowCorner;\n for (let xCol = xColMin; xCol < xColMax; xCol += dilationWidth) {\n const wCol = xCol - xColCorner;\n const pixel = xBuf.get(batch, xDepth, xRow, xCol, channel);\n if (pixel >= maxValue) {\n maxValue = pixel;\n maxPosition = wDepth * effectiveFilterHeight * effectiveFilterWidth + wRow * effectiveFilterHeight + wCol;\n }\n }\n }\n }\n maxPositions.set(maxPosition, batch, yDepth, yRow, yCol, channel);\n }\n }\n }\n }\n }\n return maxPositions;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/AvgPool.js\nfunction avgPool2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n assertNotComplex(x, \"avgPool\");\n const { filterSize, strides, pad: pad3, dimRoundingMode } = attrs;\n const dilations = 1;\n util_exports.assert(backend_util_exports.eitherStridesOrDilationsAreOne(strides, dilations), () => `Error in avgPool: Either strides or dilations must be 1. Got strides ${strides} and dilations '${dilations}'`);\n const convInfo = backend_util_exports.computePool2DInfo(x.shape, filterSize, strides, dilations, pad3, dimRoundingMode);\n let res;\n if (convInfo.filterWidth === 1 && convInfo.filterHeight === 1 && util_exports.arraysEqual(convInfo.inShape, convInfo.outShape)) {\n res = identity2({ inputs: { x }, backend: backend2 });\n } else {\n const xValues = backend2.data.get(x.dataId).values;\n const strides2 = util_exports.computeStrides(x.shape);\n const buffer2 = pool2(xValues, x.shape, x.dtype, strides2, convInfo, \"avg\");\n res = backend2.makeTensorInfo(convInfo.outShape, x.dtype, buffer2.values);\n }\n return res;\n}\nvar avgPoolConfig = {\n kernelName: AvgPool,\n backendName: \"cpu\",\n kernelFunc: avgPool2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/AvgPool3D.js\nfunction avgPool3D(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { filterSize, strides, pad: pad3, dimRoundingMode, dataFormat } = attrs;\n assertNotComplex(x, \"avgPool3d\");\n const convInfo = backend_util_exports.computePool3DInfo(x.shape, filterSize, strides, 1, pad3, dimRoundingMode, dataFormat);\n const xValues = backend2.data.get(x.dataId).values;\n const outBuf = pool3d2(xValues, x.shape, x.dtype, util_exports.computeStrides(x.shape), convInfo, \"avg\");\n return backend2.makeTensorInfo(outBuf.shape, \"float32\", outBuf.values);\n}\nvar avgPool3DConfig = {\n kernelName: AvgPool3D,\n backendName: \"cpu\",\n kernelFunc: avgPool3D\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/AvgPool3DGrad.js\nfunction avgPool3DGrad(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { dy, input: input2 } = inputs;\n const { filterSize, strides, pad: pad3, dimRoundingMode } = attrs;\n assertNotComplex([dy, input2], \"avgPool3DGrad\");\n const convInfo = backend_util_exports.computePool3DInfo(input2.shape, filterSize, strides, 1, pad3, dimRoundingMode);\n const strideDepth = convInfo.strideDepth;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const filterDepth = convInfo.filterDepth;\n const filterHeight = convInfo.filterHeight;\n const filterWidth = convInfo.filterWidth;\n const dilationDepth = convInfo.dilationDepth;\n const dilationHeight = convInfo.dilationHeight;\n const dilationWidth = convInfo.dilationWidth;\n const effectiveFilterDepth = convInfo.effectiveFilterDepth;\n const effectiveFilterHeight = convInfo.effectiveFilterHeight;\n const effectiveFilterWidth = convInfo.effectiveFilterWidth;\n const padFront = effectiveFilterDepth - 1 - convInfo.padInfo.front;\n const padLeft = effectiveFilterWidth - 1 - convInfo.padInfo.left;\n const padTop = effectiveFilterHeight - 1 - convInfo.padInfo.top;\n const dx = buffer(input2.shape, \"float32\");\n const avgMultiplier = 1 / (filterDepth * filterHeight * filterWidth);\n const dyBuf = backend2.bufferSync(dy);\n for (let batch = 0; batch < convInfo.batchSize; ++batch) {\n for (let channel = 0; channel < convInfo.inChannels; ++channel) {\n for (let dxDepth = 0; dxDepth < convInfo.inDepth; ++dxDepth) {\n for (let dxRow = 0; dxRow < convInfo.inHeight; ++dxRow) {\n for (let dxCol = 0; dxCol < convInfo.inWidth; ++dxCol) {\n const dyDepthCorner = dxDepth - padFront;\n const dyRowCorner = dxRow - padTop;\n const dyColCorner = dxCol - padLeft;\n let dotProd = 0;\n for (let wDepth = 0; wDepth < effectiveFilterDepth; wDepth += dilationDepth) {\n const dyDepth = (dyDepthCorner + wDepth) / strideDepth;\n if (dyDepth < 0 || dyDepth >= convInfo.outDepth || Math.floor(dyDepth) !== dyDepth) {\n continue;\n }\n for (let wRow = 0; wRow < effectiveFilterHeight; wRow += dilationHeight) {\n const dyRow = (dyRowCorner + wRow) / strideHeight;\n if (dyRow < 0 || dyRow >= convInfo.outHeight || Math.floor(dyRow) !== dyRow) {\n continue;\n }\n for (let wCol = 0; wCol < effectiveFilterWidth; wCol += dilationWidth) {\n const dyCol = (dyColCorner + wCol) / strideWidth;\n if (dyCol < 0 || dyCol >= convInfo.outWidth || Math.floor(dyCol) !== dyCol) {\n continue;\n }\n const pixel = dyBuf.get(batch, dyDepth, dyRow, dyCol, channel);\n dotProd += pixel;\n }\n }\n }\n dx.set(dotProd * avgMultiplier, batch, dxDepth, dxRow, dxCol, channel);\n }\n }\n }\n }\n }\n return backend2.makeTensorInfo(dx.shape, dx.dtype, dx.values);\n}\nvar avgPool3DGradConfig2 = {\n kernelName: AvgPool3DGrad,\n backendName: \"cpu\",\n kernelFunc: avgPool3DGrad\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/AvgPoolGrad.js\nfunction avgPoolGrad2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { dy, input: input2 } = inputs;\n const x = input2;\n assertNotComplex([dy, input2], \"avgPoolGrad\");\n const { filterSize, strides, pad: pad3 } = attrs;\n const convInfo = backend_util_exports.computePool2DInfo(x.shape, filterSize, strides, 1, pad3);\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const filterHeight = convInfo.filterHeight;\n const filterWidth = convInfo.filterWidth;\n const dilationHeight = convInfo.dilationHeight;\n const dilationWidth = convInfo.dilationWidth;\n const effectiveFilterHeight = convInfo.effectiveFilterHeight;\n const effectiveFilterWidth = convInfo.effectiveFilterWidth;\n const padLeft = effectiveFilterWidth - 1 - convInfo.padInfo.left;\n const padTop = effectiveFilterHeight - 1 - convInfo.padInfo.top;\n const dx = buffer(x.shape, \"float32\");\n const avgMultiplier = 1 / (filterHeight * filterWidth);\n const dyData = backend2.data.get(dy.dataId).values;\n const dyBuf = buffer(dy.shape, \"float32\", dyData);\n for (let b = 0; b < convInfo.batchSize; ++b) {\n for (let d = 0; d < convInfo.inChannels; ++d) {\n for (let dxR = 0; dxR < convInfo.inHeight; ++dxR) {\n for (let dxC = 0; dxC < convInfo.inWidth; ++dxC) {\n const dyRCorner = dxR - padTop;\n const dyCCorner = dxC - padLeft;\n let dotProd = 0;\n for (let wR = 0; wR < effectiveFilterHeight; wR += dilationHeight) {\n const dyR = (dyRCorner + wR) / strideHeight;\n if (dyR < 0 || dyR >= convInfo.outHeight || Math.floor(dyR) !== dyR) {\n continue;\n }\n for (let wC = 0; wC < effectiveFilterWidth; wC += dilationWidth) {\n const dyC = (dyCCorner + wC) / strideWidth;\n if (dyC < 0 || dyC >= convInfo.outWidth || Math.floor(dyC) !== dyC) {\n continue;\n }\n const pixel = dyBuf.get(b, dyR, dyC, d);\n dotProd += pixel;\n }\n }\n dx.set(dotProd * avgMultiplier, b, dxR, dxC, d);\n }\n }\n }\n }\n return backend2.makeTensorInfo(dx.shape, dx.dtype, dx.values);\n}\nvar avgPoolGradConfig2 = {\n kernelName: AvgPoolGrad,\n backendName: \"cpu\",\n kernelFunc: avgPoolGrad2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/BatchNorm.js\nfunction batchNorm2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, scale: scale2, offset, mean: mean5, variance } = inputs;\n util_exports.assert(mean5.shape.length === variance.shape.length, () => \"Batch normalization gradient requires mean and variance to have equal ranks.\");\n util_exports.assert(offset == null || mean5.shape.length === offset.shape.length, () => \"Batch normalization gradient requires mean and offset to have equal ranks.\");\n util_exports.assert(scale2 == null || mean5.shape.length === scale2.shape.length, () => \"Batch normalization gradient requires mean and scale to have equal ranks.\");\n assertNotComplex([x, mean5, variance, scale2, offset], \"batchNorm\");\n let { varianceEpsilon } = attrs;\n if (varianceEpsilon == null) {\n varianceEpsilon = 1e-3;\n }\n const xVals = backend2.data.get(x.dataId).values;\n const mVals = backend2.data.get(mean5.dataId).values;\n const varVals = backend2.data.get(variance.dataId).values;\n const sVals = scale2 ? backend2.data.get(scale2.dataId).values : new Float32Array([1]);\n const offVals = offset ? backend2.data.get(offset.dataId).values : new Float32Array([0]);\n const outVals = new Float32Array(xVals.length);\n const offValsLength = offVals.length;\n const sValsLength = sVals.length;\n const varValsLength = varVals.length;\n const mValsLength = mVals.length;\n let offi = 0;\n let mi = 0;\n let si = 0;\n let vi = 0;\n for (let i2 = 0; i2 < xVals.length; ++i2) {\n outVals[i2] = offVals[offi++] + (xVals[i2] - mVals[mi++]) * sVals[si++] / Math.sqrt(varVals[vi++] + varianceEpsilon);\n if (offi >= offValsLength) {\n offi = 0;\n }\n if (mi >= mValsLength) {\n mi = 0;\n }\n if (si >= sValsLength) {\n si = 0;\n }\n if (vi >= varValsLength) {\n vi = 0;\n }\n }\n return backend2.makeTensorInfo(x.shape, x.dtype, outVals);\n}\nvar batchNormConfig = {\n kernelName: FusedBatchNorm,\n backendName: \"cpu\",\n kernelFunc: batchNorm2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/BatchToSpaceND.js\nfunction batchToSpaceND2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { blockShape, crops } = attrs;\n assertNotComplex([x], \"batchToSpaceND\");\n const prod6 = blockShape.reduce((a, b) => a * b);\n const reshaped = backend_util_exports.getReshaped(x.shape, blockShape, prod6);\n const permuted = backend_util_exports.getPermuted(reshaped.length, blockShape.length);\n const reshapedPermuted = backend_util_exports.getReshapedPermuted(x.shape, blockShape, prod6);\n const sliceBeginCoords = backend_util_exports.getSliceBeginCoords(crops, blockShape.length);\n const sliceSize = backend_util_exports.getSliceSize(reshapedPermuted, crops, blockShape.length);\n const xReshaped = reshape3({ inputs: { x }, backend: backend2, attrs: { shape: reshaped } });\n const xTransposed = transpose2({ inputs: { x: xReshaped }, backend: backend2, attrs: { perm: permuted } });\n const xTransposedReshaped = reshape3({ inputs: { x: xTransposed }, backend: backend2, attrs: { shape: reshapedPermuted } });\n const result = slice2({\n inputs: { x: xTransposedReshaped },\n backend: backend2,\n attrs: { begin: sliceBeginCoords, size: sliceSize }\n });\n backend2.disposeIntermediateTensorInfo(xReshaped);\n backend2.disposeIntermediateTensorInfo(xTransposed);\n backend2.disposeIntermediateTensorInfo(xTransposedReshaped);\n return result;\n}\nvar batchToSpaceNDConfig = {\n kernelName: BatchToSpaceND,\n backendName: \"cpu\",\n kernelFunc: batchToSpaceND2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Bincount.js\nfunction bincount2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, weights } = inputs;\n const { size } = attrs;\n const xVals = backend2.data.get(x.dataId).values;\n const weightsVals = backend2.data.get(weights.dataId).values;\n const outVals = bincountImpl(xVals, weightsVals, weights.dtype, weights.shape, size);\n return backend2.makeTensorInfo([size], weights.dtype, outVals);\n}\nvar bincountConfig = {\n kernelName: Bincount,\n backendName: \"cpu\",\n kernelFunc: bincount2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/BroadcastArgs.js\nfunction broadcastArgs2(args) {\n const { inputs, backend: backend2 } = args;\n const { s0, s1 } = inputs;\n const s0Vals = backend2.data.get(s0.dataId).values;\n const s1Vals = backend2.data.get(s1.dataId).values;\n const broadcastShape = backend_util_exports.assertAndGetBroadcastShape(Array.from(s0Vals), Array.from(s1Vals));\n return backend2.makeTensorInfo([broadcastShape.length], \"int32\", Int32Array.from(broadcastShape));\n}\nvar broadcastArgsConfig = {\n kernelName: BroadcastArgs,\n backendName: \"cpu\",\n kernelFunc: broadcastArgs2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ClipByValue.js\nvar clipByValue2 = unaryKernelFunc(ClipByValue, (xi, attrs) => {\n const clipAttrs = attrs;\n if (xi > clipAttrs.clipValueMax) {\n return clipAttrs.clipValueMax;\n }\n return xi < clipAttrs.clipValueMin ? clipAttrs.clipValueMin : xi;\n});\nvar clipByValueConfig = {\n kernelName: ClipByValue,\n backendName: \"cpu\",\n kernelFunc: clipByValue2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ComplexAbs.js\nvar complexAbs = (args) => {\n const { x } = args.inputs;\n const cpuBackend = args.backend;\n const resultValues = new Float32Array(util_exports.sizeFromShape(x.shape));\n const complexVals = cpuBackend.data.get(x.dataId);\n const real5 = complexVals.complexTensorInfos.real;\n const imag5 = complexVals.complexTensorInfos.imag;\n const realVals = cpuBackend.data.get(real5.dataId).values;\n const imagVals = cpuBackend.data.get(imag5.dataId).values;\n for (let i2 = 0; i2 < realVals.length; i2++) {\n const real6 = realVals[i2];\n const imag6 = imagVals[i2];\n resultValues[i2] = Math.hypot(real6, imag6);\n }\n return cpuBackend.makeOutput(resultValues, x.shape, \"float32\");\n};\nvar complexAbsConfig = {\n kernelName: ComplexAbs,\n backendName: \"cpu\",\n kernelFunc: complexAbs\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Imag.js\nfunction imag2(args) {\n const { inputs, backend: backend2 } = args;\n const { input: input2 } = inputs;\n const imag5 = backend2.data.get(input2.dataId).complexTensorInfos.imag;\n const imagVal = backend2.data.get(imag5.dataId).values;\n return backend2.makeTensorInfo(imag5.shape, imag5.dtype, imagVal);\n}\nvar imagConfig = {\n kernelName: Imag,\n backendName: \"cpu\",\n kernelFunc: imag2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Concat.js\nfunction concat2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { axis } = attrs;\n const $axis = util_exports.parseAxisParam(axis, inputs[0].shape)[0];\n const shapes = inputs.map((t2) => t2.shape);\n backend_util_exports.assertParamsConsistent(shapes, $axis);\n let outShape = backend_util_exports.computeOutShape(inputs.map((t2) => t2.shape), $axis);\n if (util_exports.sizeFromShape(outShape) === 0) {\n return backend2.makeTensorInfo(outShape, inputs[0].dtype, []);\n }\n const $inputs = inputs.filter((t2) => util_exports.sizeFromShape(t2.shape) > 0);\n if ($inputs.length === 1) {\n return identity2({ inputs: { x: $inputs[0] }, backend: backend2 });\n }\n if ($inputs[0].dtype === \"complex64\") {\n const reals = $inputs.map((t2) => real2({ inputs: { input: t2 }, backend: backend2 }));\n const imags = $inputs.map((t2) => imag2({ inputs: { input: t2 }, backend: backend2 }));\n const realConcated = concat2({ inputs: reals, backend: backend2, attrs: { axis: $axis } });\n const imagConcated = concat2({ inputs: imags, backend: backend2, attrs: { axis: $axis } });\n const result = complex2({ inputs: { real: realConcated, imag: imagConcated }, backend: backend2 });\n reals.forEach((r2) => backend2.disposeIntermediateTensorInfo(r2));\n imags.forEach((i2) => backend2.disposeIntermediateTensorInfo(i2));\n backend2.disposeIntermediateTensorInfo(realConcated);\n backend2.disposeIntermediateTensorInfo(imagConcated);\n return result;\n }\n const inputs2D = $inputs.map((t2) => {\n const innerSize = util_exports.sizeFromShape(t2.shape.slice($axis));\n const shape = [-1, innerSize];\n return reshape3({ inputs: { x: t2 }, backend: backend2, attrs: { shape } });\n });\n const inputsValShapes = inputs2D.map((t2) => {\n return { vals: backend2.data.get(t2.dataId).values, shape: t2.shape };\n });\n outShape = backend_util_exports.computeOutShape(inputs2D.map((t2) => t2.shape), 1);\n const simplyConcat = inputs2D[0].shape[0] === 1;\n const outVals = concatImpl(inputsValShapes, outShape, inputs[0].dtype, simplyConcat);\n const finalOutShape = backend_util_exports.computeOutShape($inputs.map((t2) => t2.shape), $axis);\n const outInfo = backend2.makeTensorInfo(finalOutShape, inputs[0].dtype, outVals);\n inputs2D.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2));\n return outInfo;\n}\nvar concatConfig = {\n kernelName: Concat,\n backendName: \"cpu\",\n kernelFunc: concat2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Conv2D.js\nfunction conv2D(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, filter } = inputs;\n const { strides, pad: pad3, dataFormat, dilations, dimRoundingMode } = attrs;\n assertNotComplex([x, filter], \"conv2d\");\n const $dataFormat = backend_util_exports.convertConv2DDataFormat(dataFormat);\n const convInfo = backend_util_exports.computeConv2DInfo(x.shape, filter.shape, strides, dilations, pad3, dimRoundingMode, false, $dataFormat);\n const filterHeight = convInfo.filterHeight;\n const filterWidth = convInfo.filterWidth;\n const dilationHeight = convInfo.dilationHeight;\n const dilationWidth = convInfo.dilationWidth;\n const padLeft = convInfo.padInfo.left;\n const padTop = convInfo.padInfo.top;\n const isChannelsLast = convInfo.dataFormat === \"channelsLast\";\n const y = new TensorBuffer(convInfo.outShape, x.dtype);\n const xStrides = util_exports.computeStrides(x.shape);\n const filterStrides = util_exports.computeStrides(filter.shape);\n const xBatchStride = xStrides[0];\n const xRowStride = isChannelsLast ? xStrides[1] : xStrides[2];\n const xColStride = isChannelsLast ? xStrides[2] : 1;\n const xChannelStride = isChannelsLast ? 1 : xStrides[1];\n const yBatchStride = y.strides[0];\n const yRowStride = isChannelsLast ? y.strides[1] : y.strides[2];\n const yColStride = isChannelsLast ? y.strides[2] : 1;\n const yChannelStride = isChannelsLast ? 1 : y.strides[1];\n const xVals = backend2.data.get(x.dataId).values;\n const wVals = backend2.data.get(filter.dataId).values;\n const yVals = y.values;\n for (let b = 0; b < convInfo.batchSize; ++b) {\n const xOffset1 = b * xBatchStride;\n const yOffset1 = b * yBatchStride;\n for (let yR = 0; yR < convInfo.outHeight; ++yR) {\n const yOffset2 = yOffset1 + yR * yRowStride;\n const xRCorner = yR * convInfo.strideHeight - padTop;\n for (let wR = 0; wR < filterHeight; ++wR) {\n const xR = xRCorner + wR * dilationHeight;\n if (xR < 0 || xR >= convInfo.inHeight) {\n continue;\n }\n const wOffset1 = wR * filterStrides[0];\n const xOffset2 = xOffset1 + xR * xRowStride;\n for (let yC = 0; yC < convInfo.outWidth; ++yC) {\n const yOffset3 = yOffset2 + yC * yColStride;\n const xCCorner = yC * convInfo.strideWidth - padLeft;\n for (let wC = 0; wC < filterWidth; ++wC) {\n const xC = xCCorner + wC * dilationWidth;\n if (xC < 0 || xC >= convInfo.inWidth) {\n continue;\n }\n const wOffset2 = wOffset1 + wC * filterStrides[1];\n const xOffset3 = xOffset2 + xC * xColStride;\n let wOffset3 = wOffset2;\n for (let d1 = 0; d1 < convInfo.inChannels; ++d1) {\n const xVal = xVals[xOffset3 + d1 * xChannelStride];\n for (let d2 = 0; d2 < convInfo.outChannels; ++d2) {\n yVals[yOffset3 + d2 * yChannelStride] += xVal * wVals[wOffset3 + d2];\n }\n wOffset3 += convInfo.outChannels;\n }\n }\n }\n }\n }\n }\n return backend2.makeTensorInfo(y.shape, y.dtype, yVals);\n}\nvar conv2DConfig = {\n kernelName: Conv2D,\n backendName: \"cpu\",\n kernelFunc: conv2D\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Conv2DBackpropFilter.js\nfunction conv2DBackpropFilter2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, dy } = inputs;\n const { strides, pad: pad3, dataFormat, dimRoundingMode, filterShape } = attrs;\n assertNotComplex([x, dy], \"conv2dBackpropFilter\");\n const $dataFormat = backend_util_exports.convertConv2DDataFormat(dataFormat);\n const convInfo = backend_util_exports.computeConv2DInfo(x.shape, filterShape, strides, 1, pad3, dimRoundingMode, false, $dataFormat);\n const { strideHeight, strideWidth, filterHeight, filterWidth } = convInfo;\n const isChannelsLast = convInfo.dataFormat === \"channelsLast\";\n const dW = new TensorBuffer(convInfo.filterShape, \"float32\");\n const leftPad = convInfo.padInfo.left;\n const topPad = convInfo.padInfo.top;\n const xVals = backend2.data.get(x.dataId).values;\n const dyVals = backend2.data.get(dy.dataId).values;\n const xBuf = new TensorBuffer(x.shape, x.dtype, xVals);\n const dyBuf = new TensorBuffer(dy.shape, dy.dtype, dyVals);\n for (let wR = 0; wR < filterHeight; ++wR) {\n const yRMin = Math.max(0, Math.ceil((topPad - wR) / strideHeight));\n const yRMax = Math.min(convInfo.outHeight, (convInfo.inHeight + topPad - wR) / strideHeight);\n for (let wC = 0; wC < filterWidth; ++wC) {\n const yCMin = Math.max(0, Math.ceil((leftPad - wC) / strideWidth));\n const yCMax = Math.min(convInfo.outWidth, (convInfo.inWidth + leftPad - wC) / strideWidth);\n for (let d1 = 0; d1 < convInfo.inChannels; ++d1) {\n for (let d2 = 0; d2 < convInfo.outChannels; ++d2) {\n let dotProd = 0;\n for (let b = 0; b < convInfo.batchSize; ++b) {\n for (let yR = yRMin; yR < yRMax; ++yR) {\n const xR = wR + yR * strideHeight - topPad;\n for (let yC = yCMin; yC < yCMax; ++yC) {\n const xC = wC + yC * strideWidth - leftPad;\n if (isChannelsLast) {\n dotProd += xBuf.get(b, xR, xC, d1) * dyBuf.get(b, yR, yC, d2);\n } else {\n dotProd += xBuf.get(b, d1, xR, xC) * dyBuf.get(b, d2, yR, yC);\n }\n }\n }\n }\n dW.set(dotProd, wR, wC, d1, d2);\n }\n }\n }\n }\n return backend2.makeTensorInfo(dW.shape, dW.dtype, dW.values);\n}\nvar conv2DBackpropFilterConfig = {\n kernelName: Conv2DBackpropFilter,\n backendName: \"cpu\",\n kernelFunc: conv2DBackpropFilter2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Conv2DBackpropInput.js\nfunction conv2DBackpropInput2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { dy, filter } = inputs;\n const { inputShape, strides, pad: pad3, dataFormat, dimRoundingMode } = attrs;\n assertNotComplex([dy, filter], \"conv2dBackpropInput\");\n const filterStrides = util_exports.computeStrides(filter.shape);\n const dyStrides = util_exports.computeStrides(dy.shape);\n let $dataFormat = backend_util_exports.convertConv2DDataFormat(dataFormat);\n const convInfo = backend_util_exports.computeConv2DInfo(inputShape, filter.shape, strides, 1, pad3, dimRoundingMode, false, $dataFormat);\n const dx = new TensorBuffer(convInfo.inShape, \"float32\");\n const dxValues = dx.values;\n const dyValues = backend2.data.get(dy.dataId).values;\n const fltValues = backend2.data.get(filter.dataId).values;\n const [fltS0, fltS1, fltS2] = filterStrides;\n const { batchSize, filterHeight, filterWidth, inChannels, inHeight, inWidth, outChannels, outHeight, outWidth, strideHeight, strideWidth } = convInfo;\n $dataFormat = convInfo.dataFormat;\n const topPad = filterHeight - 1 - convInfo.padInfo.top;\n const leftPad = filterWidth - 1 - convInfo.padInfo.left;\n const isChannelsLast = $dataFormat === \"channelsLast\";\n const xBatchStride = dx.strides[0];\n const xRowStride = isChannelsLast ? dx.strides[1] : dx.strides[2];\n const xColStride = isChannelsLast ? dx.strides[2] : 1;\n const xChannelStride = isChannelsLast ? 1 : dx.strides[1];\n const yBatchStride = dyStrides[0];\n const yRowStride = isChannelsLast ? dyStrides[1] : dyStrides[2];\n const yColStride = isChannelsLast ? dyStrides[2] : 1;\n const yChannelStride = isChannelsLast ? 1 : dyStrides[1];\n for (let b = 0; b < batchSize; ++b) {\n for (let d1 = 0; d1 < inChannels; ++d1) {\n for (let xR = 0; xR < inHeight; ++xR) {\n const xRCorner = xR - topPad;\n const xRMin = Math.max(0, Math.ceil(xRCorner / strideHeight));\n const yRMax = Math.min(outHeight, (filterHeight + xRCorner) / strideHeight);\n for (let xC = 0; xC < inWidth; ++xC) {\n const xCCorner = xC - leftPad;\n const xCMin = Math.max(0, Math.ceil(xCCorner / strideWidth));\n const yCMax = Math.min(outWidth, (filterWidth + xCCorner) / strideWidth);\n let dotProd = 0;\n for (let yR = xRMin; yR < yRMax; ++yR) {\n const wR = yR * strideHeight - xRCorner;\n for (let yC = xCMin; yC < yCMax; ++yC) {\n const wC = yC * strideWidth - xCCorner;\n const dyOffset = yBatchStride * b + yRowStride * yR + yColStride * yC;\n const fltOffset = fltS0 * (filterHeight - 1 - wR) + fltS1 * (filterWidth - 1 - wC) + fltS2 * d1;\n for (let d2 = 0; d2 < outChannels; ++d2) {\n const pixel = dyValues[dyOffset + yChannelStride * d2];\n const weight = fltValues[fltOffset + d2];\n dotProd += pixel * weight;\n }\n }\n }\n const dxOffset = xBatchStride * b + xRowStride * xR + xColStride * xC + xChannelStride * d1;\n dxValues[dxOffset] = dotProd;\n }\n }\n }\n }\n return backend2.makeTensorInfo(dx.shape, dx.dtype, dx.values);\n}\nvar conv2DBackpropInputConfig = {\n kernelName: Conv2DBackpropInput,\n backendName: \"cpu\",\n kernelFunc: conv2DBackpropInput2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Conv3D.js\nfunction conv3D(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, filter } = inputs;\n const { strides, pad: pad3, dilations } = attrs;\n assertNotComplex([x, filter], \"conv3d\");\n const convInfo = backend_util_exports.computeConv3DInfo(x.shape, filter.shape, strides, dilations, pad3);\n const { filterDepth, filterHeight, filterWidth, dilationDepth, dilationHeight, dilationWidth, padInfo } = convInfo;\n const padFront = padInfo.front;\n const padLeft = padInfo.left;\n const padTop = padInfo.top;\n const y = new TensorBuffer(convInfo.outShape, x.dtype);\n const xVals = backend2.data.get(x.dataId).values;\n const wVals = backend2.data.get(filter.dataId).values;\n const yVals = y.values;\n const xStrides = util_exports.computeStrides(x.shape);\n const filterStrides = util_exports.computeStrides(filter.shape);\n for (let b = 0; b < convInfo.batchSize; ++b) {\n const xOffset1 = b * xStrides[0];\n const yOffset1 = b * y.strides[0];\n for (let yF = 0; yF < convInfo.outDepth; ++yF) {\n const yOffset2 = yOffset1 + yF * y.strides[1];\n const xFCorner = yF * convInfo.strideDepth - padFront;\n for (let wF = 0; wF < filterDepth; ++wF) {\n const xF = xFCorner + wF * dilationDepth;\n if (xF < 0 || xF >= convInfo.inDepth) {\n continue;\n }\n const wOffset1 = wF * filterStrides[0];\n const xOffset2 = xOffset1 + xF * xStrides[1];\n for (let yR = 0; yR < convInfo.outHeight; ++yR) {\n const yOffset3 = yOffset2 + yR * y.strides[2];\n const xRCorner = yR * convInfo.strideHeight - padTop;\n for (let wR = 0; wR < filterHeight; ++wR) {\n const xR = xRCorner + wR * dilationHeight;\n if (xR < 0 || xR >= convInfo.inHeight) {\n continue;\n }\n const wOffset2 = wOffset1 + wR * filterStrides[1];\n const xOffset3 = xOffset2 + xR * xStrides[2];\n for (let yC = 0; yC < convInfo.outWidth; ++yC) {\n const yOffset4 = yOffset3 + yC * convInfo.outChannels;\n const xCCorner = yC * convInfo.strideWidth - padLeft;\n for (let wC = 0; wC < filterWidth; ++wC) {\n const xC = xCCorner + wC * dilationWidth;\n if (xC < 0 || xC >= convInfo.inWidth) {\n continue;\n }\n const wOffset3 = wOffset2 + wC * filterStrides[2];\n const xOffset4 = xOffset3 + xC * convInfo.inChannels;\n let wOffset4 = wOffset3;\n for (let d1 = 0; d1 < convInfo.inChannels; ++d1) {\n const xVal = xVals[xOffset4 + d1];\n for (let d2 = 0; d2 < convInfo.outChannels; ++d2) {\n yVals[yOffset4 + d2] += xVal * wVals[wOffset4 + d2];\n }\n wOffset4 += convInfo.outChannels;\n }\n }\n }\n }\n }\n }\n }\n }\n return backend2.makeTensorInfo(y.shape, y.dtype, y.values);\n}\nvar conv3DConfig = {\n kernelName: Conv3D,\n backendName: \"cpu\",\n kernelFunc: conv3D\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Conv3DBackpropFilterV2.js\nfunction conv3DBackpropFilterV2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, dy } = inputs;\n const { strides, pad: pad3, filterShape } = attrs;\n assertNotComplex([x, dy], \"conv3dBackpropFilterV2\");\n const xStrides = util_exports.computeStrides(x.shape);\n const dyStrides = util_exports.computeStrides(dy.shape);\n const convInfo = backend_util_exports.computeConv3DInfo(x.shape, filterShape, strides, 1, pad3);\n const strideDepth = convInfo.strideDepth;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const filterDepth = convInfo.filterDepth;\n const filterHeight = convInfo.filterHeight;\n const filterWidth = convInfo.filterWidth;\n const dw = new TensorBuffer(convInfo.filterShape, \"float32\");\n const dwValues = dw.values;\n const [dwS0, dwS1, dwS2, dwS3] = dw.strides;\n const dyValues = backend2.data.get(dy.dataId).values;\n const [dyS0, dyS1, dyS2, dyS3] = dyStrides;\n const xValues = backend2.data.get(x.dataId).values;\n const [xS0, xS1, xS2, xS3] = xStrides;\n const frontPad = convInfo.padInfo.front;\n const leftPad = convInfo.padInfo.left;\n const topPad = convInfo.padInfo.top;\n for (let wF = 0; wF < filterDepth; ++wF) {\n const yFMin = Math.max(0, Math.ceil((frontPad - wF) / strideDepth));\n const yFMax = Math.min(convInfo.outDepth, (convInfo.inDepth + frontPad - wF) / strideDepth);\n const wOffset1 = wF * dwS0;\n for (let wR = 0; wR < filterHeight; ++wR) {\n const yRMin = Math.max(0, Math.ceil((topPad - wR) / strideHeight));\n const yRMax = Math.min(convInfo.outHeight, (convInfo.inHeight + topPad - wR) / strideHeight);\n const wOffset2 = wR * dwS1 + wOffset1;\n for (let wC = 0; wC < filterWidth; ++wC) {\n const yCMin = Math.max(0, Math.ceil((leftPad - wC) / strideWidth));\n const yCMax = Math.min(convInfo.outWidth, (convInfo.inWidth + leftPad - wC) / strideWidth);\n const wOffset3 = wC * dwS2 + wOffset2;\n for (let d1 = 0; d1 < convInfo.inChannels; ++d1) {\n const wOffset4 = d1 * dwS3 + wOffset3;\n for (let d2 = 0; d2 < convInfo.outChannels; ++d2) {\n let dotProd = 0;\n for (let b = 0; b < convInfo.batchSize; ++b) {\n const xOffset1 = b * xS0;\n const yOffset1 = b * dyS0;\n for (let yF = yFMin; yF < yFMax; ++yF) {\n const xF = wF + yF * strideDepth - frontPad;\n const xOffset2 = xF * xS1 + xOffset1;\n const yOffset2 = yF * dyS1 + yOffset1;\n for (let yR = yRMin; yR < yRMax; ++yR) {\n const xR = wR + yR * strideHeight - topPad;\n const xOffset3 = xR * xS2 + xOffset2;\n const yOffset3 = yR * dyS2 + yOffset2;\n for (let yC = yCMin; yC < yCMax; ++yC) {\n const xC = wC + yC * strideWidth - leftPad;\n const xOffset4 = xC * xS3 + xOffset3;\n const yOffset4 = yC * dyS3 + yOffset3;\n dotProd += xValues[xOffset4 + d1] * dyValues[yOffset4 + d2];\n }\n }\n }\n }\n dwValues[wOffset4 + d2] = dotProd;\n }\n }\n }\n }\n }\n return backend2.makeTensorInfo(dw.shape, dw.dtype, dw.values);\n}\nvar conv3DBackpropFilterV2Config = {\n kernelName: Conv3DBackpropFilterV2,\n backendName: \"cpu\",\n kernelFunc: conv3DBackpropFilterV2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Conv3DBackpropInputV2.js\nfunction conv3DBackpropInputV2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { dy, filter } = inputs;\n const { pad: pad3, strides, inputShape } = attrs;\n assertNotComplex([dy], \"conv3dBackpropInputV2\");\n const dyStrides = util_exports.computeStrides(dy.shape);\n const filterStrides = util_exports.computeStrides(filter.shape);\n const convInfo = backend_util_exports.computeConv3DInfo(inputShape, filter.shape, strides, 1, pad3);\n const dx = new TensorBuffer(convInfo.inShape, \"float32\");\n const dxValues = dx.values;\n const [dxS0, dxS1, dxS2, dxS3] = dx.strides;\n const dyValues = backend2.data.get(dy.dataId).values;\n const [dyS0, dyS1, dyS2, dyS3] = dyStrides;\n const fltValues = backend2.data.get(filter.dataId).values;\n const [fltS0, fltS1, fltS2, fltS3] = filterStrides;\n const { batchSize, filterDepth, filterHeight, filterWidth, inChannels, inDepth, inHeight, inWidth, outChannels, outDepth, outHeight, outWidth, strideDepth, strideHeight, strideWidth } = convInfo;\n const frontPad = filterDepth - 1 - convInfo.padInfo.front;\n const topPad = filterHeight - 1 - convInfo.padInfo.top;\n const leftPad = filterWidth - 1 - convInfo.padInfo.left;\n for (let b = 0; b < batchSize; ++b) {\n for (let d1 = 0; d1 < inChannels; ++d1) {\n for (let xF = 0; xF < inDepth; ++xF) {\n const xFCorner = xF - frontPad;\n const xFMin = Math.max(0, Math.ceil(xFCorner / strideDepth));\n const yFMax = Math.min(outDepth, (filterDepth + xFCorner) / strideDepth);\n for (let xR = 0; xR < inHeight; ++xR) {\n const xRCorner = xR - topPad;\n const xRMin = Math.max(0, Math.ceil(xRCorner / strideHeight));\n const yRMax = Math.min(outHeight, (filterHeight + xRCorner) / strideHeight);\n for (let xC = 0; xC < inWidth; ++xC) {\n const xCCorner = xC - leftPad;\n const xCMin = Math.max(0, Math.ceil(xCCorner / strideWidth));\n const yCMax = Math.min(outWidth, (filterWidth + xCCorner) / strideWidth);\n let dotProd = 0;\n for (let yF = xFMin; yF < yFMax; ++yF) {\n const wF = yF * strideDepth - xFCorner;\n for (let yR = xRMin; yR < yRMax; ++yR) {\n const wR = yR * strideHeight - xRCorner;\n for (let yC = xCMin; yC < yCMax; ++yC) {\n const wC = yC * strideWidth - xCCorner;\n const dyOffset = dyS0 * b + dyS1 * yF + dyS2 * yR + dyS3 * yC;\n const fltOffset = fltS0 * (filterDepth - 1 - wF) + fltS1 * (filterHeight - 1 - wR) + fltS2 * (filterWidth - 1 - wC) + fltS3 * d1;\n for (let d2 = 0; d2 < outChannels; ++d2) {\n const pixel = dyValues[dyOffset + d2];\n const weight = fltValues[fltOffset + d2];\n dotProd += pixel * weight;\n }\n }\n }\n }\n dxValues[dxS0 * b + dxS1 * xF + dxS2 * xR + dxS3 * xC + d1] = dotProd;\n }\n }\n }\n }\n }\n return backend2.makeTensorInfo(dx.shape, dx.dtype, dx.values);\n}\nvar conv3DBackpropInputV2Config = {\n kernelName: Conv3DBackpropInputV2,\n backendName: \"cpu\",\n kernelFunc: conv3DBackpropInputV2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Cos.js\nvar cos2 = unaryKernelFunc(Cos, (xi) => Math.cos(xi));\nvar cosConfig = {\n kernelName: Cos,\n backendName: \"cpu\",\n kernelFunc: cos2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Cosh.js\nvar cosh2 = unaryKernelFunc(Cosh, (xi) => Math.cosh(xi));\nvar coshConfig = {\n kernelName: Cosh,\n backendName: \"cpu\",\n kernelFunc: cosh2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/CropAndResize.js\nfunction cropAndResize2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { image: image2, boxes, boxInd } = inputs;\n const { cropSize, method, extrapolationValue } = attrs;\n const [batch, imageHeight, imageWidth, numChannels] = image2.shape;\n const numBoxes = boxes.shape[0];\n const [cropHeight, cropWidth] = cropSize;\n const output = buffer([numBoxes, cropHeight, cropWidth, numChannels], \"float32\");\n const boxVals = backend2.data.get(boxes.dataId).values;\n const boxIndVals = backend2.data.get(boxInd.dataId).values;\n const imageVals = backend2.data.get(image2.dataId).values;\n const inStride = util_exports.computeStrides(image2.shape);\n const outStride = util_exports.computeStrides(output.shape);\n for (let b = 0; b < numBoxes; b++) {\n const startInd = b * 4;\n const y1 = boxVals[startInd];\n const x1 = boxVals[startInd + 1];\n const y2 = boxVals[startInd + 2];\n const x2 = boxVals[startInd + 3];\n const bInd = boxIndVals[b];\n if (bInd >= batch) {\n continue;\n }\n const heightScale = cropHeight > 1 ? (y2 - y1) * (imageHeight - 1) / (cropHeight - 1) : 0;\n const widthScale = cropWidth > 1 ? (x2 - x1) * (imageWidth - 1) / (cropWidth - 1) : 0;\n for (let y = 0; y < cropHeight; y++) {\n const yInd = cropHeight > 1 ? y1 * (imageHeight - 1) + y * heightScale : 0.5 * (y1 + y2) * (imageHeight - 1);\n if (yInd < 0 || yInd > imageHeight - 1) {\n for (let x = 0; x < cropWidth; x++) {\n for (let c = 0; c < numChannels; c++) {\n const ind = c + x * outStride[2] + y * outStride[1] + b * outStride[0];\n output.values[ind] = extrapolationValue;\n }\n }\n continue;\n }\n if (method === \"bilinear\") {\n const topInd = Math.floor(yInd);\n const bottomInd = Math.ceil(yInd);\n const yLerp = yInd - topInd;\n for (let x = 0; x < cropWidth; x++) {\n const xInd = cropWidth > 1 ? x1 * (imageWidth - 1) + x * widthScale : 0.5 * (x1 + x2) * (imageWidth - 1);\n if (xInd < 0 || xInd > imageWidth - 1) {\n for (let c = 0; c < numChannels; c++) {\n const ind = c + x * outStride[2] + y * outStride[1] + b * outStride[0];\n output.values[ind] = extrapolationValue;\n }\n continue;\n }\n const leftInd = Math.floor(xInd);\n const rightInd = Math.ceil(xInd);\n const xLerp = xInd - leftInd;\n for (let c = 0; c < numChannels; c++) {\n let ind = c + leftInd * inStride[2] + topInd * inStride[1] + bInd * inStride[0];\n const topLeft = imageVals[ind];\n ind = c + rightInd * inStride[2] + topInd * inStride[1] + bInd * inStride[0];\n const topRight = imageVals[ind];\n ind = c + leftInd * inStride[2] + bottomInd * inStride[1] + bInd * inStride[0];\n const bottomLeft = imageVals[ind];\n ind = c + rightInd * inStride[2] + bottomInd * inStride[1] + bInd * inStride[0];\n const bottomRight = imageVals[ind];\n const top = topLeft + (topRight - topLeft) * xLerp;\n const bottom = bottomLeft + (bottomRight - bottomLeft) * xLerp;\n ind = c + x * outStride[2] + y * outStride[1] + b * outStride[0];\n output.values[ind] = top + (bottom - top) * yLerp;\n }\n }\n } else {\n for (let x = 0; x < cropWidth; ++x) {\n const xInd = cropWidth > 1 ? x1 * (imageWidth - 1) + x * widthScale : 0.5 * (x1 + x2) * (imageWidth - 1);\n if (xInd < 0 || xInd > imageWidth - 1) {\n for (let c = 0; c < numChannels; c++) {\n const ind = c + x * outStride[2] + y * outStride[1] + b * outStride[0];\n output.values[ind] = extrapolationValue;\n }\n continue;\n }\n const closestX = Math.round(xInd);\n const closestY = Math.round(yInd);\n for (let c = 0; c < numChannels; c++) {\n const inInd = c + closestX * inStride[2] + closestY * inStride[1] + bInd * inStride[0];\n const outInd = c + x * outStride[2] + y * outStride[1] + b * outStride[0];\n output.values[outInd] = imageVals[inInd];\n }\n }\n }\n }\n }\n return backend2.makeTensorInfo(output.shape, output.dtype, output.values);\n}\nvar cropAndResizeConfig = {\n kernelName: CropAndResize,\n backendName: \"cpu\",\n kernelFunc: cropAndResize2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Cumprod.js\nfunction cumprod2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis, exclusive, reverse: reverse5 } = attrs;\n assertNotComplex(x, \"cumprod\");\n const permutation = backend_util_exports.getAxesPermutation([axis], x.shape.length);\n let $x = x;\n if (permutation != null) {\n $x = transpose2({ inputs: { x }, backend: backend2, attrs: { perm: permutation } });\n }\n const permutedAxis = backend_util_exports.getInnerMostAxes(1, x.shape.length)[0];\n if (permutedAxis !== $x.shape.length - 1) {\n throw new Error(`backend.cumprod in CPU expects an inner-most axis=${$x.shape.length - 1} but got axis=${permutedAxis}`);\n }\n const resultDtype = upcastType($x.dtype, \"int32\");\n const vals = util_exports.makeOnesTypedArray(util_exports.sizeFromShape($x.shape), resultDtype);\n const aVals = backend2.data.get($x.dataId).values;\n const finalDim = $x.shape[$x.shape.length - 1];\n const indexAdjuster = reverse5 ? (i2, j) => i2 + finalDim - j - 1 : (i2, j) => i2 + j;\n for (let i2 = 0; i2 < aVals.length; i2 += finalDim) {\n for (let j = 0; j < finalDim; j++) {\n const idx = indexAdjuster(i2, j);\n if (j === 0) {\n vals[idx] = exclusive ? 1 : aVals[idx];\n } else {\n const prevIdx = indexAdjuster(i2, j - 1);\n vals[idx] = exclusive ? aVals[prevIdx] * vals[prevIdx] : aVals[idx] * vals[prevIdx];\n }\n }\n }\n const result = backend2.makeTensorInfo($x.shape, resultDtype, vals);\n if (permutation != null) {\n const reversePermutation = backend_util_exports.getUndoAxesPermutation(permutation);\n const reverseTransposedResult = transpose2({ inputs: { x: result }, backend: backend2, attrs: { perm: reversePermutation } });\n backend2.disposeIntermediateTensorInfo(result);\n backend2.disposeIntermediateTensorInfo($x);\n return reverseTransposedResult;\n }\n return result;\n}\nvar cumprodConfig = {\n kernelName: Cumprod,\n backendName: \"cpu\",\n kernelFunc: cumprod2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Cumsum.js\nfunction cumsum2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis, exclusive, reverse: reverse5 } = attrs;\n assertNotComplex(x, \"cumsum\");\n const permutation = backend_util_exports.getAxesPermutation([axis], x.shape.length);\n let $x = x;\n if (permutation != null) {\n $x = transpose2({ inputs: { x }, backend: backend2, attrs: { perm: permutation } });\n }\n const permutedAxis = backend_util_exports.getInnerMostAxes(1, x.shape.length)[0];\n if (permutedAxis !== $x.shape.length - 1) {\n throw new Error(`backend.cumsum in CPU expects an inner-most axis=${$x.shape.length - 1} but got axis=${permutedAxis}`);\n }\n const resultDtype = upcastType($x.dtype, \"int32\");\n const vals = util_exports.makeZerosTypedArray(util_exports.sizeFromShape($x.shape), resultDtype);\n const aVals = backend2.data.get($x.dataId).values;\n const finalDim = $x.shape[$x.shape.length - 1];\n const indexAdjuster = reverse5 ? (i2, j) => i2 + finalDim - j - 1 : (i2, j) => i2 + j;\n for (let i2 = 0; i2 < aVals.length; i2 += finalDim) {\n for (let j = 0; j < finalDim; j++) {\n const idx = indexAdjuster(i2, j);\n if (j === 0) {\n vals[idx] = exclusive ? 0 : aVals[idx];\n } else {\n const prevIdx = indexAdjuster(i2, j - 1);\n vals[idx] = exclusive ? aVals[prevIdx] + vals[prevIdx] : aVals[idx] + vals[prevIdx];\n }\n }\n }\n const result = backend2.makeTensorInfo($x.shape, resultDtype, vals);\n if (permutation != null) {\n const reversePermutation = backend_util_exports.getUndoAxesPermutation(permutation);\n const reverseTransposedResult = transpose2({ inputs: { x: result }, backend: backend2, attrs: { perm: reversePermutation } });\n backend2.disposeIntermediateTensorInfo(result);\n backend2.disposeIntermediateTensorInfo($x);\n return reverseTransposedResult;\n }\n return result;\n}\nvar cumsumConfig = {\n kernelName: Cumsum,\n backendName: \"cpu\",\n kernelFunc: cumsum2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/DenseBincount.js\nfunction denseBincount2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, weights } = inputs;\n const { size, binaryOutput } = attrs;\n if (x.shape.length === 1) {\n const xVals = backend2.data.get(x.dataId).values;\n const weightsVals = backend2.data.get(weights.dataId).values;\n const outVals = bincountImpl(xVals, weightsVals, weights.dtype, weights.shape, size);\n return backend2.makeTensorInfo([size], weights.dtype, outVals);\n } else if (x.shape.length === 2) {\n const xBuf = backend2.bufferSync(x);\n const weightsBuf = backend2.bufferSync(weights);\n const outBuf = bincountReduceImpl(xBuf, weightsBuf, size, binaryOutput);\n return backend2.makeTensorInfo(outBuf.shape, weights.dtype, outBuf.values);\n }\n throw new Error(`Error in denseBincount: input must be at most rank 2, but got rank${x.shape.length}.`);\n}\nvar denseBincountConfig = {\n kernelName: DenseBincount,\n backendName: \"cpu\",\n kernelFunc: denseBincount2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/DepthToSpace.js\nfunction depthToSpace2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { blockSize, dataFormat } = attrs;\n util_exports.assert(dataFormat === \"NHWC\", () => `Only NHWC dataFormat supported on CPU for depthToSpace. Got ${dataFormat}`);\n const batchSize = x.shape[0];\n const inputHeight = x.shape[1];\n const inputWidth = x.shape[2];\n const inputDepth = x.shape[3];\n const outputHeight = inputHeight * blockSize;\n const outputWidth = inputWidth * blockSize;\n const outputDepth = inputDepth / (blockSize * blockSize);\n const xValues = backend2.data.get(x.dataId).values;\n const result = new Float32Array(batchSize * outputHeight * outputWidth * outputDepth);\n let outputIdx = 0;\n for (let b = 0; b < batchSize; ++b) {\n for (let h = 0; h < outputHeight; ++h) {\n const inH = Math.floor(h / blockSize);\n const offsetH = h % blockSize;\n for (let w = 0; w < outputWidth; ++w) {\n const inW = Math.floor(w / blockSize);\n const offsetW = w % blockSize;\n const offsetD = (offsetH * blockSize + offsetW) * outputDepth;\n for (let d = 0; d < outputDepth; ++d) {\n const inD = d + offsetD;\n const inputIdx = inD + inputDepth * (inW + inputWidth * (inH + inputHeight * b));\n result[outputIdx++] = xValues[inputIdx];\n }\n }\n }\n }\n return backend2.makeTensorInfo([batchSize, outputHeight, outputWidth, outputDepth], x.dtype, result);\n}\nvar depthToSpaceConfig = {\n kernelName: DepthToSpace,\n backendName: \"cpu\",\n kernelFunc: depthToSpace2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/DepthwiseConv2dNative.js\nfunction depthwiseConv2dNative(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, filter } = inputs;\n const { strides, pad: pad3, dilations, dimRoundingMode } = attrs;\n assertNotComplex([x, filter], \"depthwiseConv2DNative\");\n const xStrides = util_exports.computeStrides(x.shape);\n const filterStrides = util_exports.computeStrides(filter.shape);\n let $dilations = dilations;\n if ($dilations == null) {\n $dilations = [1, 1];\n }\n util_exports.assert(backend_util_exports.eitherStridesOrDilationsAreOne(strides, $dilations), () => `Error in depthwiseConv2d: Either strides or dilations must be 1. Got strides ${strides} and dilations '${$dilations}'`);\n const convInfo = backend_util_exports.computeConv2DInfo(x.shape, filter.shape, strides, $dilations, pad3, dimRoundingMode, true);\n const { filterHeight, filterWidth, dilationHeight, dilationWidth, padInfo } = convInfo;\n const padLeft = padInfo.left;\n const padTop = padInfo.top;\n const chMul = convInfo.outChannels / convInfo.inChannels;\n const y = new TensorBuffer(convInfo.outShape, x.dtype);\n const xVals = backend2.data.get(x.dataId).values;\n const wVals = backend2.data.get(filter.dataId).values;\n const yVals = y.values;\n for (let b = 0; b < convInfo.batchSize; ++b) {\n const xOffset1 = b * xStrides[0];\n const yOffset1 = b * y.strides[0];\n for (let yR = 0; yR < convInfo.outHeight; ++yR) {\n const yOffset2 = yOffset1 + yR * y.strides[1];\n const xRCorner = yR * convInfo.strideHeight - padTop;\n for (let wR = 0; wR < filterHeight; ++wR) {\n const xR = xRCorner + wR * dilationHeight;\n if (xR < 0 || xR >= convInfo.inHeight) {\n continue;\n }\n const wOffset1 = wR * filterStrides[0];\n const xOffset2 = xOffset1 + xR * xStrides[1];\n for (let yC = 0; yC < convInfo.outWidth; ++yC) {\n const yOffset3 = yOffset2 + yC * y.strides[2];\n const xCCorner = yC * convInfo.strideWidth - padLeft;\n for (let wC = 0; wC < filterWidth; ++wC) {\n const xC = xCCorner + wC * dilationWidth;\n if (xC < 0 || xC >= convInfo.inWidth) {\n continue;\n }\n const wOffset2 = wOffset1 + wC * filterStrides[1];\n const xOffset3 = xOffset2 + xC * convInfo.inChannels;\n let yOffset4 = yOffset3;\n let wOffset3 = wOffset2;\n for (let d1 = 0; d1 < convInfo.inChannels; ++d1) {\n const xVal = xVals[xOffset3 + d1];\n for (let q = 0; q < chMul; ++q) {\n yVals[yOffset4 + q] += xVal * wVals[wOffset3 + q];\n }\n yOffset4 += chMul;\n wOffset3 += chMul;\n }\n }\n }\n }\n }\n }\n return backend2.makeTensorInfo(y.shape, y.dtype, y.values);\n}\nvar depthwiseConv2dNativeConfig = {\n kernelName: DepthwiseConv2dNative,\n backendName: \"cpu\",\n kernelFunc: depthwiseConv2dNative\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/DepthwiseConv2dNativeBackpropFilter.js\nfunction depthwiseConv2dNativeBackpropFilter2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, dy } = inputs;\n const { strides, dilations, pad: pad3, dimRoundingMode, filterShape } = attrs;\n assertNotComplex([x, dy], \"depthwiseConv2dNativeBackpropFilter\");\n const convInfo = backend_util_exports.computeConv2DInfo(x.shape, filterShape, strides, dilations, pad3, dimRoundingMode, true);\n const { strideHeight, strideWidth, filterHeight, filterWidth } = convInfo;\n const dW = new TensorBuffer(convInfo.filterShape, \"float32\");\n const leftPad = convInfo.padInfo.left;\n const topPad = convInfo.padInfo.top;\n const chMul = convInfo.outChannels / convInfo.inChannels;\n const xVals = backend2.data.get(x.dataId).values;\n const xBuf = new TensorBuffer(x.shape, x.dtype, xVals);\n const dyVals = backend2.data.get(dy.dataId).values;\n const dyBuf = new TensorBuffer(dy.shape, dy.dtype, dyVals);\n for (let wR = 0; wR < filterHeight; ++wR) {\n const yRMin = Math.max(0, Math.ceil((topPad - wR) / strideHeight));\n const yRMax = Math.min(convInfo.outHeight, (convInfo.inHeight + topPad - wR) / strideHeight);\n for (let wC = 0; wC < filterWidth; ++wC) {\n const yCMin = Math.max(0, Math.ceil((leftPad - wC) / strideWidth));\n const yCMax = Math.min(convInfo.outWidth, (convInfo.inWidth + leftPad - wC) / strideWidth);\n for (let d2 = 0; d2 < convInfo.outChannels; ++d2) {\n const d1 = Math.trunc(d2 / chMul);\n const dm = d2 % chMul;\n let dotProd = 0;\n for (let b = 0; b < convInfo.batchSize; ++b) {\n for (let yR = yRMin; yR < yRMax; ++yR) {\n const xR = wR + yR * strideHeight - topPad;\n for (let yC = yCMin; yC < yCMax; ++yC) {\n const xC = wC + yC * strideWidth - leftPad;\n dotProd += xBuf.get(b, xR, xC, d1) * dyBuf.get(b, yR, yC, d2);\n }\n }\n }\n dW.set(dotProd, wR, wC, d1, dm);\n }\n }\n }\n return backend2.makeTensorInfo(dW.shape, dW.dtype, dW.values);\n}\nvar depthwiseConv2dNativeBackpropFilterConfig = {\n kernelName: DepthwiseConv2dNativeBackpropFilter,\n backendName: \"cpu\",\n kernelFunc: depthwiseConv2dNativeBackpropFilter2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/DepthwiseConv2dNativeBackpropInput.js\nfunction depthwiseConv2dNativeBackpropInput2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { dy, filter } = inputs;\n const { strides, dilations, pad: pad3, dimRoundingMode, inputShape } = attrs;\n assertNotComplex([dy, filter], \"depthwiseConv2DNativeBackpropInput\");\n const dyStrides = util_exports.computeStrides(dy.shape);\n const filterStrides = util_exports.computeStrides(filter.shape);\n const convInfo = backend_util_exports.computeConv2DInfo(inputShape, filter.shape, strides, dilations, pad3, dimRoundingMode, true);\n const dx = new TensorBuffer(convInfo.inShape, \"float32\");\n const dxValues = dx.values;\n const [dxS0, dxS1, dxS2] = dx.strides;\n const dyValues = backend2.data.get(dy.dataId).values;\n const [dyS0, dyS1, dyS2] = dyStrides;\n const fltValues = backend2.data.get(filter.dataId).values;\n const [fltS0, fltS1, fltS2] = filterStrides;\n const { batchSize, filterHeight, filterWidth, inChannels, inHeight, inWidth, outChannels, outHeight, outWidth, strideHeight, strideWidth } = convInfo;\n const topPad = filterHeight - 1 - convInfo.padInfo.top;\n const leftPad = filterWidth - 1 - convInfo.padInfo.left;\n const chMul = outChannels / inChannels;\n for (let b = 0; b < batchSize; ++b) {\n for (let d1 = 0; d1 < inChannels; ++d1) {\n for (let xR = 0; xR < inHeight; ++xR) {\n const xRCorner = xR - topPad;\n const xRMin = Math.max(0, Math.ceil(xRCorner / strideHeight));\n const yRMax = Math.min(outHeight, (filterHeight + xRCorner) / strideHeight);\n for (let xC = 0; xC < inWidth; ++xC) {\n const xCCorner = xC - leftPad;\n const xCMin = Math.max(0, Math.ceil(xCCorner / strideWidth));\n const yCMax = Math.min(outWidth, (filterWidth + xCCorner) / strideWidth);\n let dotProd = 0;\n for (let yR = xRMin; yR < yRMax; ++yR) {\n const wR = yR * strideHeight - xRCorner;\n for (let yC = xCMin; yC < yCMax; ++yC) {\n const wC = yC * strideWidth - xCCorner;\n const dyOffset = dyS0 * b + dyS1 * yR + dyS2 * yC;\n const fltOffset = fltS0 * (filterHeight - 1 - wR) + fltS1 * (filterWidth - 1 - wC) + fltS2 * d1;\n for (let dm = 0; dm < chMul; ++dm) {\n const d2 = d1 * chMul + dm;\n const pixel = dyValues[dyOffset + d2];\n const weight = fltValues[fltOffset + dm];\n dotProd += pixel * weight;\n }\n }\n }\n dxValues[dxS0 * b + dxS1 * xR + dxS2 * xC + d1] = dotProd;\n }\n }\n }\n }\n return backend2.makeTensorInfo(dx.shape, dx.dtype, dx.values);\n}\nvar depthwiseConv2dNativeBackpropInputConfig = {\n kernelName: DepthwiseConv2dNativeBackpropInput,\n backendName: \"cpu\",\n kernelFunc: depthwiseConv2dNativeBackpropInput2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Diag.js\nfunction diag2(args) {\n const { inputs, backend: backend2 } = args;\n const { x } = inputs;\n const xSize = util_exports.sizeFromShape(x.shape);\n const xVals = backend2.data.get(x.dataId).values;\n const outBuf = buffer([xSize, xSize], x.dtype);\n const vals = outBuf.values;\n for (let i2 = 0; i2 < xVals.length; i2++) {\n vals[i2 * xSize + i2] = xVals[i2];\n }\n const outShape = [...x.shape, ...x.shape];\n return backend2.makeTensorInfo(outShape, outBuf.dtype, outBuf.values);\n}\nvar diagConfig = {\n kernelName: Diag,\n backendName: \"cpu\",\n kernelFunc: diag2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Dilation2D.js\nvar dilation2DConfig = {\n kernelName: Dilation2D,\n backendName: \"cpu\",\n kernelFunc: ({ inputs, backend: backend2, attrs }) => {\n const { x, filter } = inputs;\n const { strides, pad: pad3, dilations } = attrs;\n const cpuBackend = backend2;\n const xVals = cpuBackend.data.get(x.dataId).values;\n const xRank = x.shape.length;\n const filterVals = cpuBackend.data.get(filter.dataId).values;\n const filterRank = filter.shape.length;\n const { batchSize, inHeight, inWidth, inChannels, outHeight, outWidth, padInfo, strideHeight, strideWidth, filterHeight, filterWidth, dilationHeight, dilationWidth, outShape } = backend_util_exports.computeDilation2DInfo(x.shape, filter.shape, strides, pad3, \"NHWC\", dilations);\n const outSize = util_exports.sizeFromShape(outShape);\n const outRank = outShape.length;\n const outputVals = util_exports.getArrayFromDType(x.dtype, outSize);\n for (let b = 0; b < batchSize; ++b) {\n for (let hOut = 0; hOut < outHeight; ++hOut) {\n const hBeg = hOut * strideHeight - padInfo.top;\n for (let wOut = 0; wOut < outWidth; ++wOut) {\n const wBeg = wOut * strideWidth - padInfo.left;\n for (let d = 0; d < inChannels; ++d) {\n let curVal = Number.MIN_SAFE_INTEGER;\n for (let h = 0; h < filterHeight; ++h) {\n const hIn = hBeg + h * dilationHeight;\n if (hIn >= 0 && hIn < inHeight) {\n for (let w = 0; w < filterWidth; ++w) {\n const wIn = wBeg + w * dilationWidth;\n if (wIn >= 0 && wIn < inWidth) {\n const xIndex = util_exports.locToIndex([b, hIn, wIn, d], xRank, util_exports.computeStrides(x.shape));\n const filterIndex = util_exports.locToIndex([h, w, d], filterRank, util_exports.computeStrides(filter.shape));\n const val = xVals[xIndex] + filterVals[filterIndex];\n if (val > curVal) {\n curVal = val;\n }\n }\n }\n }\n }\n const outputIndex = util_exports.locToIndex([b, hOut, wOut, d], outRank, util_exports.computeStrides(outShape));\n outputVals[outputIndex] = curVal;\n }\n }\n }\n }\n const dataId = cpuBackend.write(util_exports.toTypedArray(outputVals, x.dtype), outShape, x.dtype);\n return { dataId, shape: outShape, dtype: x.dtype };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Dilation2DBackpropFilter.js\nvar dilation2DBackpropFilterConfig = {\n kernelName: Dilation2DBackpropFilter,\n backendName: \"cpu\",\n kernelFunc: ({ inputs, backend: backend2, attrs }) => {\n const { x, filter, dy } = inputs;\n const { strides, pad: pad3, dilations } = attrs;\n const cpuBackend = backend2;\n const $x = util_exports.toNestedArray(x.shape, cpuBackend.data.get(x.dataId).values);\n const $filter = util_exports.toNestedArray(filter.shape, cpuBackend.data.get(filter.dataId).values);\n const { batchSize, inHeight, inWidth, inChannels, outHeight, outWidth, padInfo, strideHeight, strideWidth, filterHeight, filterWidth, dilationHeight, dilationWidth, outShape } = backend_util_exports.computeDilation2DInfo(x.shape, filter.shape, strides, pad3, \"NHWC\", dilations);\n util_exports.assert(dy.rank === outShape.length, () => `Error in ${Dilation2DBackpropFilter}, dy must have the same rank as output ${outShape.length}, but got ${dy.rank}`);\n const $dy = util_exports.toNestedArray(outShape, cpuBackend.data.get(dy.dataId).values);\n const gradients = util_exports.makeZerosNestedTypedArray(filter.shape, filter.dtype);\n for (let b = 0; b < batchSize; ++b) {\n for (let hOut = 0; hOut < outHeight; ++hOut) {\n const hBeg = hOut * strideHeight - padInfo.top;\n for (let wOut = 0; wOut < outWidth; ++wOut) {\n const wBeg = wOut * strideWidth - padInfo.left;\n for (let d = 0; d < inChannels; ++d) {\n let curVal = Number.MIN_SAFE_INTEGER;\n let hMax = 0;\n let wMax = 0;\n for (let h = 0; h < filterHeight; ++h) {\n const hIn = hBeg + h * dilationHeight;\n if (hIn >= 0 && hIn < inHeight) {\n for (let w = 0; w < filterWidth; ++w) {\n const wIn = wBeg + w * dilationWidth;\n if (wIn >= 0 && wIn < inWidth) {\n const val = $x[b][hIn][wIn][d] + $filter[h][w][d];\n if (val > curVal) {\n curVal = val;\n hMax = h;\n wMax = w;\n }\n }\n }\n }\n }\n gradients[hMax][wMax][d] += $dy[b][hOut][wOut][d];\n }\n }\n }\n }\n const dataId = cpuBackend.write(util_exports.toTypedArray(gradients, x.dtype), filter.shape, filter.dtype);\n return { dataId, shape: filter.shape, dtype: filter.dtype };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Dilation2DBackpropInput.js\nvar dilation2DBackpropInputConfig = {\n kernelName: Dilation2DBackpropInput,\n backendName: \"cpu\",\n kernelFunc: ({ inputs, backend: backend2, attrs }) => {\n const { x, filter, dy } = inputs;\n const { strides, pad: pad3, dilations } = attrs;\n const cpuBackend = backend2;\n const $x = util_exports.toNestedArray(x.shape, cpuBackend.data.get(x.dataId).values);\n const $filter = util_exports.toNestedArray(filter.shape, cpuBackend.data.get(filter.dataId).values);\n const { batchSize, inHeight, inWidth, inChannels, outHeight, outWidth, padInfo, strideHeight, strideWidth, filterHeight, filterWidth, dilationHeight, dilationWidth, outShape } = backend_util_exports.computeDilation2DInfo(x.shape, filter.shape, strides, pad3, \"NHWC\", dilations);\n util_exports.assert(dy.rank === outShape.length, () => `Error in ${Dilation2DBackpropInput}, dy must have the same rank as output ${outShape.length}, but got ${dy.rank}`);\n const $dy = util_exports.toNestedArray(outShape, cpuBackend.data.get(dy.dataId).values);\n const gradients = util_exports.makeZerosNestedTypedArray(x.shape, x.dtype);\n for (let b = 0; b < batchSize; ++b) {\n for (let hOut = 0; hOut < outHeight; ++hOut) {\n const hBeg = hOut * strideHeight - padInfo.top;\n for (let wOut = 0; wOut < outWidth; ++wOut) {\n const wBeg = wOut * strideWidth - padInfo.left;\n for (let d = 0; d < inChannels; ++d) {\n let curVal = Number.MIN_SAFE_INTEGER;\n let hInMax = hBeg < 0 ? 0 : hBeg;\n let wInMax = wBeg < 0 ? 0 : wBeg;\n for (let h = 0; h < filterHeight; ++h) {\n const hIn = hBeg + h * dilationHeight;\n if (hIn >= 0 && hIn < inHeight) {\n for (let w = 0; w < filterWidth; ++w) {\n const wIn = wBeg + w * dilationWidth;\n if (wIn >= 0 && wIn < inWidth) {\n const val = $x[b][hIn][wIn][d] + $filter[h][w][d];\n if (val > curVal) {\n curVal = val;\n hInMax = hIn;\n wInMax = wIn;\n }\n }\n }\n }\n }\n gradients[b][hInMax][wInMax][d] += $dy[b][hOut][wOut][d];\n }\n }\n }\n }\n const dataId = cpuBackend.write(util_exports.toTypedArray(gradients, x.dtype), x.shape, x.dtype);\n return { dataId, shape: x.shape, dtype: x.dtype };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Sum.js\nfunction sum3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis, keepDims } = attrs;\n assertNotComplex(x, \"sum\");\n let $x;\n if (x.dtype === \"bool\") {\n $x = cast3({ inputs: { x }, backend: backend2, attrs: { dtype: \"int32\" } });\n } else {\n $x = identity2({ inputs: { x }, backend: backend2 });\n }\n const xRank = $x.shape.length;\n const axes = util_exports.parseAxisParam(axis, $x.shape);\n const permutation = backend_util_exports.getAxesPermutation(axes, xRank);\n let reductionAxes = axes;\n let permutedX = $x;\n if (permutation != null) {\n permutedX = transpose2({ inputs: { x: $x }, backend: backend2, attrs: { perm: permutation } });\n reductionAxes = backend_util_exports.getInnerMostAxes(reductionAxes.length, xRank);\n }\n backend_util_exports.assertAxesAreInnerMostDims(\"sum\", reductionAxes, permutedX.shape.length);\n const [outShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes(permutedX.shape, reductionAxes);\n const resultDtype = backend_util_exports.upcastType(permutedX.dtype, \"int32\");\n let result = zeros3(backend2, outShape, resultDtype);\n const reduceSize = util_exports.sizeFromShape(reduceShape);\n const vals = backend2.data.get(result.dataId).values;\n const aVals = backend2.data.get(permutedX.dataId).values;\n for (let i2 = 0; i2 < vals.length; ++i2) {\n const offset = i2 * reduceSize;\n let sum7 = 0;\n for (let j = 0; j < reduceSize; ++j) {\n sum7 += aVals[offset + j];\n }\n vals[i2] = sum7;\n }\n if (keepDims) {\n const newShape = backend_util_exports.expandShapeToKeepDim(result.shape, axes);\n const oldResult = result;\n result = reshape3({ inputs: { x: result }, backend: backend2, attrs: { shape: newShape } });\n backend2.disposeIntermediateTensorInfo(oldResult);\n }\n backend2.disposeIntermediateTensorInfo($x);\n if (permutation != null) {\n backend2.disposeIntermediateTensorInfo(permutedX);\n }\n return result;\n}\nvar sumConfig = {\n kernelName: Sum,\n backendName: \"cpu\",\n kernelFunc: sum3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Einsum.js\nfunction einsum2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { equation } = attrs;\n const tensors = inputs;\n const { allDims, summedDims, idDims } = backend_util_exports.decodeEinsumEquation(equation, tensors.length);\n backend_util_exports.checkEinsumDimSizes(allDims.length, idDims, tensors);\n const { path, steps } = backend_util_exports.getEinsumComputePath(summedDims, idDims);\n const nSteps = steps.length;\n let out = null;\n let numDimsRemaining = allDims.length;\n const tensorsToDispose = [];\n for (let i2 = 0; i2 < nSteps; ++i2) {\n for (const idTerm of steps[i2]) {\n const { permutationIndices: perm, expandDims: dimsToExpand } = backend_util_exports.getEinsumPermutation(numDimsRemaining, idDims[idTerm]);\n let x;\n if (backend_util_exports.isIdentityPermutation(perm)) {\n x = tensors[idTerm];\n } else {\n x = transpose2({ inputs: { x: tensors[idTerm] }, backend: backend2, attrs: { perm } });\n tensorsToDispose.push(x);\n }\n const targetShape = x.shape.slice();\n for (let k = 0; k < dimsToExpand.length; ++k) {\n targetShape.splice(dimsToExpand[k], 0, 1);\n }\n if (!util_exports.arraysEqual(x.shape, targetShape)) {\n x = reshape3({ inputs: { x }, backend: backend2, attrs: { shape: targetShape } });\n tensorsToDispose.push(x);\n }\n if (out === null) {\n out = x;\n } else {\n out = multiply2({ inputs: { a: x, b: out }, backend: backend2 });\n tensorsToDispose.push(out);\n }\n }\n if (i2 < nSteps - 1) {\n if (path[i2] >= 0) {\n out = sum3({\n inputs: { x: out },\n backend: backend2,\n attrs: {\n axis: path[i2] - (allDims.length - numDimsRemaining),\n keepDims: false\n }\n });\n tensorsToDispose.push(out);\n }\n numDimsRemaining--;\n }\n }\n for (const tensorInfo of tensorsToDispose) {\n if (tensorInfo === out) {\n continue;\n }\n backend2.disposeIntermediateTensorInfo(tensorInfo);\n }\n return out;\n}\nvar einsumConfig = {\n kernelName: Einsum,\n backendName: \"cpu\",\n kernelFunc: einsum2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/EluGrad.js\nfunction eluGrad(args) {\n const { inputs, backend: backend2 } = args;\n const { dy, y } = inputs;\n assertNotComplex([dy, y], \"eluGrad\");\n const resultValues = new Float32Array(util_exports.sizeFromShape(y.shape));\n const values = backend2.data.get(y.dataId).values;\n const dyValues = backend2.data.get(dy.dataId).values;\n for (let i2 = 0; i2 < values.length; ++i2) {\n const v = values[i2];\n if (v >= 1) {\n resultValues[i2] = dyValues[i2];\n } else {\n resultValues[i2] = dyValues[i2] * (v + 1);\n }\n }\n return backend2.makeTensorInfo(y.shape, \"float32\", resultValues);\n}\nvar eluGradConfig2 = {\n kernelName: EluGrad,\n backendName: \"cpu\",\n kernelFunc: eluGrad\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Erf.js\nvar p = backend_util_exports.ERF_P;\nvar a1 = backend_util_exports.ERF_A1;\nvar a2 = backend_util_exports.ERF_A2;\nvar a3 = backend_util_exports.ERF_A3;\nvar a4 = backend_util_exports.ERF_A4;\nvar a5 = backend_util_exports.ERF_A5;\nvar erf2 = unaryKernelFunc(Erf, (xi) => {\n const sign4 = Math.sign(xi);\n const v = Math.abs(xi);\n const t2 = 1 / (1 + p * v);\n return sign4 * (1 - ((((a5 * t2 + a4) * t2 + a3) * t2 + a2) * t2 + a1) * t2 * Math.exp(-v * v));\n});\nvar erfConfig = {\n kernelName: Erf,\n backendName: \"cpu\",\n kernelFunc: erf2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ExpandDims.js\nfunction expandDims3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { input: input2 } = inputs;\n const { dim } = attrs;\n const inputRank = input2.shape.length;\n const newShape = input2.shape.slice();\n let $dim = dim;\n if (dim < 0) {\n util_exports.assert(-(inputRank + 1) <= dim, () => `Axis must be in the interval [${-(inputRank + 1)}, ${inputRank}]`);\n $dim = inputRank + dim + 1;\n }\n newShape.splice($dim, 0, 1);\n return reshape3({ inputs: { x: input2 }, backend: backend2, attrs: { shape: newShape } });\n}\nvar expandDimsConfig = {\n kernelName: ExpandDims,\n backendName: \"cpu\",\n kernelFunc: expandDims3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/RealDiv.js\nvar realDivImpl = createSimpleBinaryKernelImpl((a, b) => a / b);\nvar div2 = binaryKernelFunc(RealDiv, realDivImpl);\nvar realDivConfig = {\n kernelName: RealDiv,\n backendName: \"cpu\",\n kernelFunc: div2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/utils/fft_utils.js\nfunction fftBatch(input2, inverse, cpuBackend) {\n const inputShape = input2.shape;\n const batch = inputShape[0];\n const innerDim = inputShape[1];\n const inputVals = cpuBackend.data.get(input2.dataId);\n const real2D = inputVals.complexTensorInfos.real;\n const imag2D = inputVals.complexTensorInfos.imag;\n const resultShape = [batch, innerDim];\n const resultSize = util_exports.sizeFromShape(resultShape);\n const resultReal = util_exports.getTypedArrayFromDType(\"float32\", resultSize);\n const resultImag = util_exports.getTypedArrayFromDType(\"float32\", resultSize);\n for (let b = 0; b < batch; b++) {\n const r2 = slice2({\n inputs: { x: real2D },\n backend: cpuBackend,\n attrs: { begin: [b, 0], size: [1, innerDim] }\n });\n const i2 = slice2({\n inputs: { x: imag2D },\n backend: cpuBackend,\n attrs: { begin: [b, 0], size: [1, innerDim] }\n });\n const input3 = complex2({ inputs: { real: r2, imag: i2 }, backend: cpuBackend });\n const { real: real5, imag: imag5 } = fftImpl(input3, inverse, cpuBackend);\n const res = backend_util_exports.mergeRealAndImagArrays(real5, imag5);\n for (let d = 0; d < innerDim; d++) {\n const c = backend_util_exports.getComplexWithIndex(res, d);\n resultReal[b * innerDim + d] = c.real;\n resultImag[b * innerDim + d] = c.imag;\n }\n cpuBackend.disposeIntermediateTensorInfo(r2);\n cpuBackend.disposeIntermediateTensorInfo(i2);\n cpuBackend.disposeIntermediateTensorInfo(input3);\n }\n const $realInfo = cpuBackend.makeTensorInfo(resultShape, \"float32\", resultReal);\n const $imagInfo = cpuBackend.makeTensorInfo(resultShape, \"float32\", resultImag);\n const result = complex2({ inputs: { real: $realInfo, imag: $imagInfo }, backend: cpuBackend });\n cpuBackend.disposeIntermediateTensorInfo($realInfo);\n cpuBackend.disposeIntermediateTensorInfo($imagInfo);\n return result;\n}\nfunction fftImpl(input2, inverse, cpuBackend) {\n const inputSize = util_exports.sizeFromShape(input2.shape);\n const inputVals = cpuBackend.data.get(input2.dataId);\n const realVals = cpuBackend.data.get(inputVals.complexTensorInfos.real.dataId).values;\n const imagVals = cpuBackend.data.get(inputVals.complexTensorInfos.imag.dataId).values;\n if (isExponentOf2(inputSize)) {\n const result = fftRadix2(realVals, imagVals, inputSize, inverse, cpuBackend);\n const resultShape = [input2.shape[0], input2.shape[1]];\n if (inverse) {\n const realInfo = cpuBackend.makeTensorInfo(resultShape, \"float32\", result.real);\n const imagInfo = cpuBackend.makeTensorInfo(resultShape, \"float32\", result.imag);\n const sizeInfo = cpuBackend.makeTensorInfo([], \"float32\", util_exports.createScalarValue(inputSize, \"float32\"));\n const sizeInfoCopy = identity2({ inputs: { x: sizeInfo }, backend: cpuBackend });\n const divRealInfo = realDivConfig.kernelFunc({ inputs: { a: realInfo, b: sizeInfo }, backend: cpuBackend });\n const divImagInfo = realDivConfig.kernelFunc({ inputs: { a: imagInfo, b: sizeInfoCopy }, backend: cpuBackend });\n const divRealVals = cpuBackend.data.get(divRealInfo.dataId).values;\n const divImagVals = cpuBackend.data.get(divImagInfo.dataId).values;\n cpuBackend.disposeIntermediateTensorInfo(realInfo);\n cpuBackend.disposeIntermediateTensorInfo(imagInfo);\n cpuBackend.disposeIntermediateTensorInfo(sizeInfo);\n cpuBackend.disposeIntermediateTensorInfo(sizeInfoCopy);\n cpuBackend.disposeIntermediateTensorInfo(divRealInfo);\n cpuBackend.disposeIntermediateTensorInfo(divImagInfo);\n return { real: divRealVals, imag: divImagVals };\n }\n return result;\n } else {\n const data = backend_util_exports.mergeRealAndImagArrays(realVals, imagVals);\n const rawOutput = fourierTransformByMatmul(data, inputSize, inverse);\n return backend_util_exports.splitRealAndImagArrays(rawOutput);\n }\n}\nfunction isExponentOf2(size) {\n return (size & size - 1) === 0;\n}\nfunction fftRadix2(realVals, imagVals, size, inverse, cpuBackend) {\n if (size === 1) {\n return { real: realVals, imag: imagVals };\n }\n const data = backend_util_exports.mergeRealAndImagArrays(realVals, imagVals);\n const half = size / 2;\n const evenComplex = backend_util_exports.complexWithEvenIndex(data);\n const evenRealVals = evenComplex.real;\n const evenImagVals = evenComplex.imag;\n const evenShape = [evenRealVals.length];\n const evenRealInfo = cpuBackend.makeTensorInfo(evenShape, \"float32\", evenRealVals);\n const evenImagInfo = cpuBackend.makeTensorInfo(evenShape, \"float32\", evenImagVals);\n const evenTensorInfo = complex2({ inputs: { real: evenRealInfo, imag: evenImagInfo }, backend: cpuBackend });\n const oddComplex = backend_util_exports.complexWithOddIndex(data);\n const oddRealVals = oddComplex.real;\n const oddImagVals = oddComplex.imag;\n const oddShape = [oddRealVals.length];\n const oddRealInfo = cpuBackend.makeTensorInfo(oddShape, \"float32\", oddRealVals);\n const oddImagInfo = cpuBackend.makeTensorInfo(oddShape, \"float32\", oddImagVals);\n const oddTensorInfo = complex2({ inputs: { real: oddRealInfo, imag: oddImagInfo }, backend: cpuBackend });\n const $evenComplex = fftRadix2(evenRealVals, evenImagVals, half, inverse, cpuBackend);\n const $evenRealVals = $evenComplex.real;\n const $evenImagVals = $evenComplex.imag;\n const $evenShape = [$evenRealVals.length];\n const $evenRealInfo = cpuBackend.makeTensorInfo($evenShape, \"float32\", $evenRealVals);\n const $evenImagInfo = cpuBackend.makeTensorInfo($evenShape, \"float32\", $evenImagVals);\n const $evenTensorInfo = complex2({\n inputs: { real: $evenRealInfo, imag: $evenImagInfo },\n backend: cpuBackend\n });\n const $oddComplex = fftRadix2(oddRealVals, oddImagVals, half, inverse, cpuBackend);\n const $oddRealVals = $oddComplex.real;\n const $oddImagVals = $oddComplex.imag;\n const $oddShape = [$oddRealVals.length];\n const $oddRealInfo = cpuBackend.makeTensorInfo($oddShape, \"float32\", $oddRealVals);\n const $oddImagInfo = cpuBackend.makeTensorInfo($oddShape, \"float32\", $oddImagVals);\n const $oddTensorInfo = complex2({ inputs: { real: $oddRealInfo, imag: $oddImagInfo }, backend: cpuBackend });\n const e2 = backend_util_exports.exponents(size, inverse);\n const eShape = [e2.real.length];\n const eRealInfo = cpuBackend.makeTensorInfo(eShape, \"float32\", e2.real);\n const eImagInfo = cpuBackend.makeTensorInfo(eShape, \"float32\", e2.imag);\n const complexInfo = complex2({ inputs: { real: eRealInfo, imag: eImagInfo }, backend: cpuBackend });\n const exponentInfo = multiply2({ inputs: { a: complexInfo, b: $oddTensorInfo }, backend: cpuBackend });\n const addPart = add4({\n inputs: { a: $evenTensorInfo, b: exponentInfo },\n backend: cpuBackend\n });\n const subPart = sub2({\n inputs: { a: $evenTensorInfo, b: exponentInfo },\n backend: cpuBackend\n });\n const addPartReal = real2({ inputs: { input: addPart }, backend: cpuBackend });\n const subPartReal = real2({ inputs: { input: subPart }, backend: cpuBackend });\n const addPartImag = imag2({ inputs: { input: addPart }, backend: cpuBackend });\n const subPartImag = imag2({ inputs: { input: subPart }, backend: cpuBackend });\n const $real = concat2({\n inputs: [addPartReal, subPartReal],\n backend: cpuBackend,\n attrs: { axis: 0 }\n });\n const $imag = concat2({\n inputs: [addPartImag, subPartImag],\n backend: cpuBackend,\n attrs: { axis: 0 }\n });\n const $realVals = cpuBackend.data.get($real.dataId).values;\n const $imagVals = cpuBackend.data.get($imag.dataId).values;\n cpuBackend.disposeIntermediateTensorInfo(evenRealInfo);\n cpuBackend.disposeIntermediateTensorInfo(evenImagInfo);\n cpuBackend.disposeIntermediateTensorInfo(evenTensorInfo);\n cpuBackend.disposeIntermediateTensorInfo(oddRealInfo);\n cpuBackend.disposeIntermediateTensorInfo(oddImagInfo);\n cpuBackend.disposeIntermediateTensorInfo(oddTensorInfo);\n cpuBackend.disposeIntermediateTensorInfo($evenRealInfo);\n cpuBackend.disposeIntermediateTensorInfo($evenImagInfo);\n cpuBackend.disposeIntermediateTensorInfo($evenTensorInfo);\n cpuBackend.disposeIntermediateTensorInfo($oddRealInfo);\n cpuBackend.disposeIntermediateTensorInfo($oddImagInfo);\n cpuBackend.disposeIntermediateTensorInfo($oddTensorInfo);\n cpuBackend.disposeIntermediateTensorInfo(eRealInfo);\n cpuBackend.disposeIntermediateTensorInfo(eImagInfo);\n cpuBackend.disposeIntermediateTensorInfo(complexInfo);\n cpuBackend.disposeIntermediateTensorInfo(exponentInfo);\n cpuBackend.disposeIntermediateTensorInfo(addPart);\n cpuBackend.disposeIntermediateTensorInfo(subPart);\n cpuBackend.disposeIntermediateTensorInfo(addPartReal);\n cpuBackend.disposeIntermediateTensorInfo(addPartImag);\n cpuBackend.disposeIntermediateTensorInfo(subPartReal);\n cpuBackend.disposeIntermediateTensorInfo(subPartImag);\n cpuBackend.disposeIntermediateTensorInfo($real);\n cpuBackend.disposeIntermediateTensorInfo($imag);\n return { real: $realVals, imag: $imagVals };\n}\nfunction fourierTransformByMatmul(data, size, inverse) {\n const ret = new Float32Array(size * 2);\n for (let r2 = 0; r2 < size; r2++) {\n let real5 = 0;\n let imag5 = 0;\n for (let c = 0; c < size; c++) {\n const e2 = backend_util_exports.exponent(r2 * c, size, inverse);\n const term = backend_util_exports.getComplexWithIndex(data, c);\n real5 += term.real * e2.real - term.imag * e2.imag;\n imag5 += term.real * e2.imag + term.imag * e2.real;\n }\n if (inverse) {\n real5 /= size;\n imag5 /= size;\n }\n backend_util_exports.assignToTypedArray(ret, real5, imag5, r2);\n }\n return ret;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/FFT.js\nfunction fft2(args) {\n const { inputs, backend: backend2 } = args;\n const { input: input2 } = inputs;\n const inputSize = util_exports.sizeFromShape(input2.shape);\n const innerDimensionSize = input2.shape[input2.shape.length - 1];\n const batch = inputSize / innerDimensionSize;\n const input2D = reshape3({\n inputs: { x: input2 },\n backend: backend2,\n attrs: { shape: [batch, innerDimensionSize] }\n });\n const result = fftBatch(input2D, false, backend2);\n const resultReshaped = reshape3({ inputs: { x: result }, backend: backend2, attrs: { shape: input2.shape } });\n backend2.disposeIntermediateTensorInfo(input2D);\n backend2.disposeIntermediateTensorInfo(result);\n return resultReshaped;\n}\nvar fftConfig = {\n kernelName: FFT,\n backendName: \"cpu\",\n kernelFunc: fft2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Fill.js\nfunction fill2(args) {\n const { backend: backend2, attrs } = args;\n const { shape, value, dtype } = attrs;\n const $dtype = dtype || util_exports.inferDtype(value);\n const values = util_exports.getArrayFromDType($dtype, util_exports.sizeFromShape(shape));\n fillValues(values, value, $dtype);\n return backend2.makeTensorInfo(shape, $dtype, values);\n}\nvar fillConfig = {\n kernelName: Fill,\n backendName: \"cpu\",\n kernelFunc: fill2\n};\nfunction fillValues(values, value, dtype) {\n if (dtype === \"string\") {\n values.fill(value);\n } else {\n values.fill(value);\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/FlipLeftRight.js\nvar flipLeftRightConfig = {\n kernelName: FlipLeftRight,\n backendName: \"cpu\",\n kernelFunc: ({ inputs, attrs, backend: backend2 }) => {\n const { image: image2 } = inputs;\n const cpuBackend = backend2;\n const output = util_exports.getTypedArrayFromDType(image2.dtype, util_exports.sizeFromShape(image2.shape));\n const [batch, imageHeight, imageWidth, numChannels] = image2.shape;\n const imageVals = cpuBackend.data.get(image2.dataId).values;\n for (let batchIdx = 0; batchIdx < batch; batchIdx++) {\n const batchOffset = batchIdx * imageWidth * imageHeight * numChannels;\n for (let row = 0; row < imageHeight; row++) {\n const rowOffset = row * (imageWidth * numChannels);\n for (let col = 0; col < imageWidth; col++) {\n const colOffset = col * numChannels;\n for (let channel = 0; channel < numChannels; channel++) {\n const coordX = Math.round(imageWidth - col - 1);\n const outIdx = batchOffset + rowOffset + colOffset + channel;\n let outputValue = imageVals[outIdx];\n if (coordX >= 0 && coordX < imageWidth) {\n const rotatedColOffset = coordX * numChannels;\n const imageIdx = batchOffset + rowOffset + rotatedColOffset + channel;\n outputValue = imageVals[imageIdx];\n }\n output[outIdx] = outputValue;\n }\n }\n }\n }\n const dataId = cpuBackend.write(output, image2.shape, image2.dtype);\n return { dataId, shape: image2.shape, dtype: image2.dtype };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/FloorDiv.js\nvar floorDivImpl = createSimpleBinaryKernelImpl((a, b) => Math.floor(a / b));\nvar floorDiv2 = binaryKernelFunc(FloorDiv, floorDivImpl, null, \"int32\");\nvar floorDivConfig = {\n kernelName: FloorDiv,\n backendName: \"cpu\",\n kernelFunc: floorDiv2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/FusedConv2D.js\nfunction fusedConv2D(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, filter, bias, preluActivationWeights } = inputs;\n const { strides, pad: pad3, dataFormat, dilations, dimRoundingMode, activation: activation2, leakyreluAlpha } = attrs;\n let result = conv2D({\n inputs: { x, filter },\n backend: backend2,\n attrs: { strides, pad: pad3, dataFormat, dilations, dimRoundingMode }\n });\n if (bias) {\n const resultOld = result;\n if (dataFormat === \"NCHW\" && bias.shape.length === 1 && bias.shape[0] !== 1) {\n const reshapedBias = reshape3({ inputs: { x: bias }, backend: backend2, attrs: { shape: [bias.shape[0], 1, 1] } });\n result = add4({ inputs: { a: result, b: reshapedBias }, backend: backend2 });\n backend2.disposeIntermediateTensorInfo(reshapedBias);\n } else {\n result = add4({ inputs: { a: result, b: bias }, backend: backend2 });\n }\n backend2.disposeIntermediateTensorInfo(resultOld);\n }\n if (activation2) {\n const resultOld = result;\n if (dataFormat === \"NCHW\" && activation2 === \"prelu\" && preluActivationWeights.shape.length === 1 && preluActivationWeights.shape[0] !== 1) {\n const reshapedAlpha = reshape3({\n inputs: { x: preluActivationWeights },\n backend: backend2,\n attrs: { shape: [preluActivationWeights.shape[0], 1, 1] }\n });\n result = applyActivation2(backend2, result, activation2, reshapedAlpha, leakyreluAlpha);\n backend2.disposeIntermediateTensorInfo(reshapedAlpha);\n } else {\n result = applyActivation2(backend2, result, activation2, preluActivationWeights, leakyreluAlpha);\n }\n backend2.disposeIntermediateTensorInfo(resultOld);\n }\n return result;\n}\nvar fusedConv2DConfig = {\n kernelName: FusedConv2D,\n backendName: \"cpu\",\n kernelFunc: fusedConv2D\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/FusedDepthwiseConv2D.js\nfunction fusedDepthwiseConv2D(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, filter, bias, preluActivationWeights } = inputs;\n const { strides, pad: pad3, dataFormat, dilations, dimRoundingMode, activation: activation2, leakyreluAlpha } = attrs;\n let result = depthwiseConv2dNative({\n inputs: { x, filter },\n backend: backend2,\n attrs: { strides, pad: pad3, dataFormat, dilations, dimRoundingMode }\n });\n if (bias) {\n const oldResult = result;\n result = add4({ inputs: { a: result, b: bias }, backend: backend2 });\n backend2.disposeIntermediateTensorInfo(oldResult);\n }\n if (activation2) {\n const oldResult = result;\n result = applyActivation2(backend2, result, activation2, preluActivationWeights, leakyreluAlpha);\n backend2.disposeIntermediateTensorInfo(oldResult);\n }\n return result;\n}\nvar fusedDepthwiseConv2DConfig = {\n kernelName: FusedDepthwiseConv2D,\n backendName: \"cpu\",\n kernelFunc: fusedDepthwiseConv2D\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/GatherNd.js\nfunction gatherNd(args) {\n const { inputs, backend: backend2 } = args;\n const { params, indices } = inputs;\n const paramsSize = util_exports.sizeFromShape(params.shape);\n const indicesShape = indices.shape;\n const sliceRank = indicesShape[indicesShape.length - 1];\n const [resultShape, numSlices, sliceSize, strides] = backend_util_exports.prepareAndValidate(params, indices);\n if (numSlices === 0) {\n return backend2.makeTensorInfo(resultShape, params.dtype, []);\n }\n const indicesData = backend2.data.get(indices.dataId).values;\n const paramsBuf = backend2.bufferSync(params);\n const outBuf = gatherNdImpl(indicesData, paramsBuf, params.dtype, numSlices, sliceRank, sliceSize, strides, params.shape, paramsSize);\n return backend2.makeTensorInfo(resultShape, params.dtype, outBuf.values);\n}\nvar gatherNdConfig = {\n kernelName: GatherNd,\n backendName: \"cpu\",\n kernelFunc: gatherNd\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/GatherV2.js\nfunction gatherV2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, indices } = inputs;\n const { axis, batchDims } = attrs;\n assertNotComplex([x, indices], \"gatherV2\");\n const parsedAxis = util_exports.parseAxisParam(axis, x.shape)[0];\n const indicesVals = backend2.data.get(indices.dataId).values;\n const axisDim = x.shape[parsedAxis];\n for (let i2 = 0; i2 < indicesVals.length; ++i2) {\n const index = indicesVals[i2];\n util_exports.assert(index <= axisDim - 1 && index >= 0, () => `GatherV2: the index value ${index} is not in [0, ${axisDim - 1}]`);\n }\n let $batchDims = batchDims;\n if (batchDims == null) {\n $batchDims = 0;\n }\n const indicesSize = util_exports.sizeFromShape(indices.shape);\n const shapeInfo = backend_util_exports.segment_util.collectGatherOpShapeInfo(x, indices, parsedAxis, $batchDims);\n const flattenX = reshape3({\n inputs: { x },\n backend: backend2,\n attrs: {\n shape: [\n shapeInfo.batchSize,\n shapeInfo.outerSize,\n shapeInfo.dimSize,\n shapeInfo.sliceSize\n ]\n }\n });\n const flattenIndex = reshape3({\n inputs: { x: indices },\n backend: backend2,\n attrs: { shape: [shapeInfo.batchSize, indicesSize / shapeInfo.batchSize] }\n });\n const flattenOutputShape = [\n shapeInfo.batchSize,\n shapeInfo.outerSize,\n indicesSize / shapeInfo.batchSize,\n shapeInfo.sliceSize\n ];\n const indicesBuf = backend2.bufferSync(flattenIndex);\n const xBuf = backend2.bufferSync(flattenX);\n const outBuf = gatherV2Impl(xBuf, indicesBuf, flattenOutputShape);\n backend2.disposeIntermediateTensorInfo(flattenX);\n backend2.disposeIntermediateTensorInfo(flattenIndex);\n return backend2.makeTensorInfo(shapeInfo.outputShape, outBuf.dtype, outBuf.values);\n}\nvar gatherV2Config = {\n kernelName: GatherV2,\n backendName: \"cpu\",\n kernelFunc: gatherV2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/IFFT.js\nfunction ifft2(args) {\n const { inputs, backend: backend2 } = args;\n const { input: input2 } = inputs;\n const inputSize = util_exports.sizeFromShape(input2.shape);\n const innerDimensionSize = input2.shape[input2.shape.length - 1];\n const batch = inputSize / innerDimensionSize;\n const input2D = reshape3({\n inputs: { x: input2 },\n backend: backend2,\n attrs: { shape: [batch, innerDimensionSize] }\n });\n const result = fftBatch(input2D, true, backend2);\n const resultReshaped = reshape3({ inputs: { x: result }, backend: backend2, attrs: { shape: input2.shape } });\n backend2.disposeIntermediateTensorInfo(input2D);\n backend2.disposeIntermediateTensorInfo(result);\n return resultReshaped;\n}\nvar ifftConfig = {\n kernelName: IFFT,\n backendName: \"cpu\",\n kernelFunc: ifft2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/IsFinite.js\nvar isFinite3 = unaryKernelFunc(IsFinite, (xi) => Number.isFinite(xi) ? 1 : 0, \"bool\");\nvar isFiniteConfig = {\n kernelName: IsFinite,\n backendName: \"cpu\",\n kernelFunc: isFinite3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/IsInf.js\nvar isInf2 = unaryKernelFunc(IsInf, (xi) => Math.abs(xi) === Infinity ? 1 : 0, \"bool\");\nvar isInfConfig = {\n kernelName: IsInf,\n backendName: \"cpu\",\n kernelFunc: isInf2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/IsNaN.js\nvar isNaN3 = unaryKernelFunc(IsNan, (xi) => Number.isNaN(xi) ? 1 : 0, \"bool\");\nvar isNaNConfig = {\n kernelName: IsNan,\n backendName: \"cpu\",\n kernelFunc: isNaN3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/LinSpace.js\nfunction linSpace(args) {\n const { backend: backend2, attrs } = args;\n const { start, stop, num } = attrs;\n const outVals = linSpaceImpl(start, stop, num);\n return backend2.makeTensorInfo([outVals.length], \"float32\", outVals);\n}\nvar linSpaceConfig = {\n kernelName: LinSpace,\n backendName: \"cpu\",\n kernelFunc: linSpace\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Log1p.js\nvar log1p2 = unaryKernelFunc(Log1p, (xi) => Math.log1p(xi));\nvar log1pConfig = {\n kernelName: Log1p,\n backendName: \"cpu\",\n kernelFunc: log1p2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/LogicalAnd.js\nvar logicalAndImpl = createSimpleBinaryKernelImpl((a, b) => a && b);\nvar logicalAnd2 = binaryKernelFunc(LogicalAnd, logicalAndImpl, null, \"bool\");\nvar logicalAndConfig = {\n kernelName: LogicalAnd,\n backendName: \"cpu\",\n kernelFunc: logicalAnd2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/LogicalNot.js\nvar logicalNot2 = unaryKernelFunc(LogicalNot, (xi) => xi ? 0 : 1, \"bool\");\nvar logicalNotConfig = {\n kernelName: LogicalNot,\n backendName: \"cpu\",\n kernelFunc: logicalNot2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/LogicalOr.js\nvar logicalOrImpl = createSimpleBinaryKernelImpl((a, b) => a || b);\nvar logicalOr2 = binaryKernelFunc(LogicalOr, logicalOrImpl, null, \"bool\");\nvar logicalOrConfig = {\n kernelName: LogicalOr,\n backendName: \"cpu\",\n kernelFunc: logicalOr2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/LRN.js\nfunction lRN(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { depthRadius, bias, alpha, beta } = attrs;\n assertNotComplex(x, \"LRN\");\n const channels = x.shape[3];\n const maxD = channels - 1;\n const xValues = backend2.data.get(x.dataId).values;\n const size = util_exports.sizeFromShape(x.shape);\n const result = new Float32Array(size);\n function sumAcrossChannels(offset) {\n const currentChannel = offset % channels;\n let beginSumOffset = offset - currentChannel + Math.max(0, currentChannel - depthRadius);\n const endSumOffset = offset - currentChannel + Math.min(currentChannel + depthRadius, maxD);\n let sum7 = 0;\n for (; beginSumOffset <= endSumOffset; beginSumOffset++) {\n const z = xValues[beginSumOffset];\n sum7 += z * z;\n }\n return sum7;\n }\n for (let offset = 0; offset < size; offset++) {\n const sum7 = sumAcrossChannels(offset);\n const val = xValues[offset] * Math.pow(bias + alpha * sum7, -beta);\n result[offset] = val;\n }\n return backend2.makeTensorInfo(x.shape, x.dtype, result);\n}\nvar LRNConfig = {\n kernelName: LRN,\n backendName: \"cpu\",\n kernelFunc: lRN\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/LRNGrad.js\nfunction lRNGrad(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, y, dy } = inputs;\n const { depthRadius, bias, alpha, beta } = attrs;\n assertNotComplex(dy, \"LRNGrad\");\n const dySize = util_exports.sizeFromShape(dy.shape);\n const channels = dy.shape[3];\n const dyValues = backend2.data.get(dy.dataId).values;\n const xValues = backend2.data.get(x.dataId).values;\n const yValues = backend2.data.get(y.dataId).values;\n const result = new Float32Array(dySize);\n const size = dySize;\n for (let offset = 0; offset < size; offset++) {\n const currentChannel = offset % channels;\n const depthBegin = offset - currentChannel + Math.max(0, currentChannel - depthRadius);\n const depthEnd = offset - currentChannel + Math.min(channels, currentChannel + depthRadius + 1);\n let norm2 = 0;\n for (let k = depthBegin; k < depthEnd; k++) {\n norm2 += Math.pow(xValues[k], 2);\n }\n norm2 = alpha * norm2 + bias;\n for (let k = depthBegin; k < depthEnd; k++) {\n let dyi = -2 * alpha * beta * xValues[k] * yValues[offset] / norm2;\n if (offset === k) {\n dyi += Math.pow(norm2, -beta);\n }\n dyi *= dyValues[offset];\n result[k] += dyi;\n }\n }\n return backend2.makeTensorInfo(dy.shape, x.dtype, result);\n}\nvar LRNGradConfig = {\n kernelName: LRNGrad,\n backendName: \"cpu\",\n kernelFunc: lRNGrad\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Max.js\nfunction max3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { reductionIndices, keepDims } = attrs;\n const cpuBackend = backend2;\n let xShape = x.shape;\n const xRank = xShape.length;\n const origAxes = util_exports.parseAxisParam(reductionIndices, xShape);\n let axes = origAxes;\n const permutedAxes = backend_util_exports.getAxesPermutation(axes, xRank);\n let xVals = cpuBackend.data.get(x.dataId).values;\n if (permutedAxes != null) {\n const newShape = new Array(xRank);\n for (let i2 = 0; i2 < newShape.length; i2++) {\n newShape[i2] = xShape[permutedAxes[i2]];\n }\n xVals = transposeImpl(xVals, xShape, x.dtype, permutedAxes, newShape);\n axes = backend_util_exports.getInnerMostAxes(axes.length, xRank);\n xShape = newShape;\n }\n assertNotComplex(x, \"max\");\n backend_util_exports.assertAxesAreInnerMostDims(\"max\", axes, xRank);\n const [maxOutShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes(xShape, axes);\n const reduceSize = util_exports.sizeFromShape(reduceShape);\n const result = maxImpl(xVals, reduceSize, maxOutShape, x.dtype);\n const dataId = cpuBackend.write(result, maxOutShape, x.dtype);\n let outShape = maxOutShape;\n if (keepDims) {\n const newShape = backend_util_exports.expandShapeToKeepDim(maxOutShape, origAxes);\n outShape = newShape;\n }\n return { dataId, shape: outShape, dtype: x.dtype };\n}\nvar maxConfig = {\n kernelName: Max,\n backendName: \"cpu\",\n kernelFunc: max3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/MaxPool.js\nfunction maxPool2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n assertNotComplex(x, \"maxPool\");\n const { filterSize, strides, pad: pad3, dimRoundingMode } = attrs;\n const dilations = 1;\n util_exports.assert(backend_util_exports.eitherStridesOrDilationsAreOne(strides, dilations), () => `Error in maxPool: Either strides or dilations must be 1. Got strides ${strides} and dilations '${dilations}'`);\n const convInfo = backend_util_exports.computePool2DInfo(x.shape, filterSize, strides, dilations, pad3, dimRoundingMode);\n let res;\n if (convInfo.filterWidth === 1 && convInfo.filterHeight === 1 && util_exports.arraysEqual(convInfo.inShape, convInfo.outShape)) {\n res = identity2({ inputs: { x }, backend: backend2 });\n } else {\n const xValues = backend2.data.get(x.dataId).values;\n const strides2 = util_exports.computeStrides(x.shape);\n const buffer2 = pool2(xValues, x.shape, x.dtype, strides2, convInfo, \"max\");\n res = backend2.makeTensorInfo(convInfo.outShape, x.dtype, buffer2.values);\n }\n return res;\n}\nvar maxPoolConfig = {\n kernelName: MaxPool,\n backendName: \"cpu\",\n kernelFunc: maxPool2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/MaxPool3D.js\nfunction maxPool3D(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { filterSize, strides, pad: pad3, dimRoundingMode, dataFormat } = attrs;\n assertNotComplex(x, \"maxPool3d\");\n const convInfo = backend_util_exports.computePool3DInfo(x.shape, filterSize, strides, 1, pad3, dimRoundingMode, dataFormat);\n const xValues = backend2.data.get(x.dataId).values;\n const outBuf = pool3d2(xValues, x.shape, x.dtype, util_exports.computeStrides(x.shape), convInfo, \"max\");\n return backend2.makeTensorInfo(outBuf.shape, \"float32\", outBuf.values);\n}\nvar maxPool3DConfig = {\n kernelName: MaxPool3D,\n backendName: \"cpu\",\n kernelFunc: maxPool3D\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/MaxPool3DGrad.js\nfunction maxPool3DGrad(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { dy, input: input2 } = inputs;\n const { filterSize, strides, pad: pad3, dimRoundingMode } = attrs;\n assertNotComplex([dy, input2], \"maxPool3DGrad\");\n const convInfo = backend_util_exports.computePool3DInfo(input2.shape, filterSize, strides, 1, pad3, dimRoundingMode);\n const inputBuf = backend2.bufferSync(input2);\n const maxPosBuf = maxPool3dPositions(inputBuf, convInfo);\n const strideDepth = convInfo.strideDepth;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const dilationDepth = convInfo.dilationDepth;\n const dilationHeight = convInfo.dilationHeight;\n const dilationWidth = convInfo.dilationWidth;\n const effectiveFilterDepth = convInfo.effectiveFilterDepth;\n const effectiveFilterHeight = convInfo.effectiveFilterHeight;\n const effectiveFilterWidth = convInfo.effectiveFilterWidth;\n const padFront = effectiveFilterDepth - 1 - convInfo.padInfo.front;\n const padLeft = effectiveFilterWidth - 1 - convInfo.padInfo.left;\n const padTop = effectiveFilterHeight - 1 - convInfo.padInfo.top;\n const dx = buffer(input2.shape, \"float32\");\n const dyBuf = backend2.bufferSync(dy);\n for (let batch = 0; batch < convInfo.batchSize; ++batch) {\n for (let channel = 0; channel < convInfo.inChannels; ++channel) {\n for (let dxDepth = 0; dxDepth < convInfo.inDepth; ++dxDepth) {\n for (let dxRow = 0; dxRow < convInfo.inHeight; ++dxRow) {\n for (let dxCol = 0; dxCol < convInfo.inWidth; ++dxCol) {\n const dyDepthCorner = dxDepth - padFront;\n const dyRowCorner = dxRow - padTop;\n const dyColCorner = dxCol - padLeft;\n let dotProd = 0;\n for (let wDepth = 0; wDepth < effectiveFilterDepth; wDepth += dilationDepth) {\n const dyDepth = (dyDepthCorner + wDepth) / strideDepth;\n if (dyDepth < 0 || dyDepth >= convInfo.outDepth || Math.floor(dyDepth) !== dyDepth) {\n continue;\n }\n for (let wRow = 0; wRow < effectiveFilterHeight; wRow += dilationHeight) {\n const dyRow = (dyRowCorner + wRow) / strideHeight;\n if (dyRow < 0 || dyRow >= convInfo.outHeight || Math.floor(dyRow) !== dyRow) {\n continue;\n }\n for (let wCol = 0; wCol < effectiveFilterWidth; wCol += dilationWidth) {\n const dyCol = (dyColCorner + wCol) / strideWidth;\n if (dyCol < 0 || dyCol >= convInfo.outWidth || Math.floor(dyCol) !== dyCol) {\n continue;\n }\n const maxPos = effectiveFilterDepth * effectiveFilterHeight * effectiveFilterWidth - 1 - maxPosBuf.get(batch, dyDepth, dyRow, dyCol, channel);\n const curPos = wDepth * effectiveFilterHeight * effectiveFilterWidth + wRow * effectiveFilterWidth + wCol;\n const mask = maxPos === curPos ? 1 : 0;\n if (mask === 0) {\n continue;\n }\n const pixel = dyBuf.get(batch, dyDepth, dyRow, dyCol, channel);\n dotProd += pixel * mask;\n }\n }\n }\n dx.set(dotProd, batch, dxDepth, dxRow, dxCol, channel);\n }\n }\n }\n }\n }\n return backend2.makeTensorInfo(dx.shape, dx.dtype, dx.values);\n}\nvar maxPool3DGradConfig2 = {\n kernelName: MaxPool3DGrad,\n backendName: \"cpu\",\n kernelFunc: maxPool3DGrad\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/MaxPoolGrad.js\nfunction maxPoolGrad2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { dy, input: input2, output } = inputs;\n const x = input2;\n assertNotComplex([input2, output], \"maxPoolGrad\");\n const { filterSize, strides, pad: pad3, dimRoundingMode } = attrs;\n const convInfo = backend_util_exports.computePool2DInfo(x.shape, filterSize, strides, 1, pad3, dimRoundingMode);\n const xValues = backend2.data.get(x.dataId).values;\n const maxPosBuf = buffer(convInfo.outShape, x.dtype, maxPoolPositions(xValues, x.shape, x.dtype, convInfo).values);\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const dilationHeight = convInfo.dilationHeight;\n const dilationWidth = convInfo.dilationWidth;\n const effectiveFilterHeight = convInfo.effectiveFilterHeight;\n const effectiveFilterWidth = convInfo.effectiveFilterWidth;\n const padLeft = effectiveFilterWidth - 1 - convInfo.padInfo.left;\n const padTop = effectiveFilterHeight - 1 - convInfo.padInfo.top;\n const dx = buffer(x.shape, \"float32\");\n const dyData = backend2.data.get(dy.dataId).values;\n const dyBuf = buffer(dy.shape, \"float32\", dyData);\n for (let b = 0; b < convInfo.batchSize; ++b) {\n for (let d = 0; d < convInfo.inChannels; ++d) {\n for (let dxR = 0; dxR < convInfo.inHeight; ++dxR) {\n for (let dxC = 0; dxC < convInfo.inWidth; ++dxC) {\n const dyRCorner = dxR - padTop;\n const dyCCorner = dxC - padLeft;\n let dotProd = 0;\n for (let wR = 0; wR < effectiveFilterHeight; wR += dilationHeight) {\n const dyR = (dyRCorner + wR) / strideHeight;\n if (dyR < 0 || dyR >= convInfo.outHeight || Math.floor(dyR) !== dyR) {\n continue;\n }\n for (let wC = 0; wC < effectiveFilterWidth; wC += dilationWidth) {\n const dyC = (dyCCorner + wC) / strideWidth;\n if (dyC < 0 || dyC >= convInfo.outWidth || Math.floor(dyC) !== dyC) {\n continue;\n }\n const maxPos = effectiveFilterHeight * effectiveFilterWidth - 1 - maxPosBuf.get(b, dyR, dyC, d);\n const curPos = wR * effectiveFilterWidth + wC;\n const mask = maxPos === curPos ? 1 : 0;\n if (mask === 0) {\n continue;\n }\n const pixel = dyBuf.get(b, dyR, dyC, d);\n dotProd += pixel * mask;\n }\n }\n dx.set(dotProd, b, dxR, dxC, d);\n }\n }\n }\n }\n return backend2.makeTensorInfo(dx.shape, dx.dtype, dx.values);\n}\nvar maxPoolGradConfig2 = {\n kernelName: MaxPoolGrad,\n backendName: \"cpu\",\n kernelFunc: maxPoolGrad2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/MaxPoolWithArgmax_impl.js\nfunction maxPoolWithArgmaxImpl(xValues, xShape, dtype, includeBatchInIndex, convInfo) {\n const strides = util_exports.computeStrides(xShape);\n const maxPools = pool2(xValues, xShape, dtype, strides, convInfo, \"max\");\n const maxPositions = maxPoolPositions(xValues, xShape, dtype, convInfo, true, includeBatchInIndex);\n return [maxPools.values, maxPositions.values];\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/MaxPoolWithArgmax.js\nvar maxPoolWithArgmaxConfig = {\n kernelName: MaxPoolWithArgmax,\n backendName: \"cpu\",\n kernelFunc: ({ inputs, attrs, backend: backend2 }) => {\n const { x } = inputs;\n const { filterSize, strides, pad: pad3, includeBatchInIndex } = attrs;\n const cpuBackend = backend2;\n assertNotComplex(x, \"MaxPoolWithArgmax\");\n const values = cpuBackend.data.get(x.dataId).values;\n const convInfo = backend_util_exports.computePool2DInfo(x.shape, filterSize, strides, [1, 1], pad3);\n const [pooled, indexes] = maxPoolWithArgmaxImpl(values, x.shape, x.dtype, includeBatchInIndex, convInfo);\n const pooledDataId = cpuBackend.write(pooled, convInfo.outShape, x.dtype);\n const indexesDataId = cpuBackend.write(indexes, convInfo.outShape, x.dtype);\n return [\n { dataId: pooledDataId, shape: convInfo.outShape, dtype: x.dtype },\n { dataId: indexesDataId, shape: convInfo.outShape, dtype: \"int32\" }\n ];\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Mean.js\nfunction mean2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis, keepDims } = attrs;\n const axes = util_exports.parseAxisParam(axis, x.shape);\n const shapes = backend_util_exports.computeOutAndReduceShapes(x.shape, axes);\n const reduceShape = shapes[1];\n const reduceSize = util_exports.sizeFromShape(reduceShape);\n const toDispose = [];\n const reduceSizeScalar = backend2.makeTensorInfo([], \"float32\", new Float32Array([reduceSize]));\n toDispose.push(reduceSizeScalar);\n const $x = cast3({ inputs: { x }, backend: backend2, attrs: { dtype: \"float32\" } });\n toDispose.push($x);\n const res = div2({ inputs: { a: $x, b: reduceSizeScalar }, backend: backend2 });\n toDispose.push(res);\n const result = sum3({ inputs: { x: res }, backend: backend2, attrs: { axis, keepDims } });\n toDispose.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2));\n return result;\n}\nvar meanConfig = {\n kernelName: Mean,\n backendName: \"cpu\",\n kernelFunc: mean2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Min.js\nfunction min3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis, keepDims } = attrs;\n assertNotComplex(x, \"min\");\n const origAxes = util_exports.parseAxisParam(axis, x.shape);\n let axes = origAxes;\n const permutedAxes = backend_util_exports.getAxesPermutation(axes, x.shape.length);\n let $x = x;\n if (permutedAxes != null) {\n $x = transpose2({ inputs: { x }, backend: backend2, attrs: { perm: permutedAxes } });\n axes = backend_util_exports.getInnerMostAxes(axes.length, x.shape.length);\n }\n backend_util_exports.assertAxesAreInnerMostDims(\"min\", axes, $x.shape.length);\n const [outShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes($x.shape, axes);\n const reduceSize = util_exports.sizeFromShape(reduceShape);\n const vals = util_exports.makeZerosTypedArray(util_exports.sizeFromShape(outShape), $x.dtype);\n const aVals = backend2.data.get($x.dataId).values;\n for (let i2 = 0; i2 < vals.length; ++i2) {\n const offset = i2 * reduceSize;\n let min7 = aVals[offset];\n for (let j = 0; j < reduceSize; ++j) {\n const value = aVals[offset + j];\n if (Number.isNaN(value) || value < min7) {\n min7 = value;\n }\n }\n vals[i2] = min7;\n }\n if (permutedAxes != null) {\n backend2.disposeIntermediateTensorInfo($x);\n }\n const result = backend2.makeTensorInfo(outShape, $x.dtype, vals);\n if (keepDims) {\n const expandedShape = backend_util_exports.expandShapeToKeepDim(outShape, origAxes);\n const reshapedResult = reshape3({ inputs: { x: result }, backend: backend2, attrs: { shape: expandedShape } });\n backend2.disposeIntermediateTensorInfo(result);\n return reshapedResult;\n }\n return result;\n}\nvar minConfig = {\n kernelName: Min,\n backendName: \"cpu\",\n kernelFunc: min3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/MirrorPad.js\nfunction mirrorPad2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { paddings, mode } = attrs;\n assertNotComplex(x, \"mirrorPad\");\n const outShape = paddings.map((p2, i2) => p2[0] + x.shape[i2] + p2[1]);\n const start = paddings.map((p2) => p2[0]);\n const end = paddings.map((p2, i2) => p2[0] + x.shape[i2]);\n const offset = mode === \"reflect\" ? 0 : 1;\n const xVals = backend2.data.get(x.dataId).values;\n const xRank = x.shape.length;\n const xStrides = util_exports.computeStrides(x.shape);\n const resultSize = util_exports.sizeFromShape(outShape);\n const resultRank = outShape.length;\n const resultStrides = util_exports.computeStrides(outShape);\n const resVals = util_exports.getTypedArrayFromDType(x.dtype, resultSize);\n for (let i2 = 0; i2 < resultSize; i2++) {\n let coords3 = util_exports.indexToLoc(i2, resultRank, resultStrides);\n for (let i3 = 0; i3 < resultRank; i3++) {\n if (coords3[i3] < start[i3]) {\n coords3[i3] = start[i3] * 2 - coords3[i3] - offset;\n } else if (coords3[i3] >= end[i3]) {\n coords3[i3] = (end[i3] - 1) * 2 - coords3[i3] + offset;\n }\n }\n coords3 = coords3.map((c, i3) => c - start[i3]);\n const inIndex = util_exports.locToIndex(coords3, xRank, xStrides);\n resVals[i2] = xVals[inIndex];\n }\n const outId = backend2.write(resVals, outShape, x.dtype);\n return { dataId: outId, shape: outShape, dtype: x.dtype };\n}\nvar mirrorPadConfig = {\n kernelName: MirrorPad,\n backendName: \"cpu\",\n kernelFunc: mirrorPad2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Mod.js\nvar modImpl = createSimpleBinaryKernelImpl((aValue, bValue) => {\n const rem = aValue % bValue;\n if (aValue < 0 && bValue < 0 || aValue >= 0 && bValue >= 0) {\n return rem;\n } else {\n return (rem + bValue) % bValue;\n }\n});\nvar mod2 = binaryKernelFunc(Mod, modImpl);\nvar modConfig = {\n kernelName: Mod,\n backendName: \"cpu\",\n kernelFunc: mod2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Multinomial.js\nvar seedrandom4 = __toESM(require_seedrandom2());\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Softmax.js\nfunction softmax3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { logits } = inputs;\n const { dim } = attrs;\n const logitsRank = logits.shape.length;\n let $dim = dim;\n if ($dim === -1) {\n $dim = logitsRank - 1;\n }\n if ($dim !== logitsRank - 1) {\n throw Error(`Softmax along a non-last dimension is not yet supported. Logits was rank ${logitsRank} and dim was ${$dim}`);\n }\n const axes = util_exports.parseAxisParam([$dim], logits.shape);\n const maxLogit = max3({\n inputs: { x: logits },\n backend: backend2,\n attrs: { reductionIndices: axes, keepDims: false }\n });\n const expandedShape = backend_util_exports.expandShapeToKeepDim(maxLogit.shape, axes);\n const maxLogitReshaped = reshape3({ inputs: { x: maxLogit }, backend: backend2, attrs: { shape: expandedShape } });\n const a = sub2({ inputs: { a: logits, b: maxLogitReshaped }, backend: backend2 });\n const b = exp2({ inputs: { x: a }, backend: backend2 });\n const sumExp = sum3({ inputs: { x: b }, backend: backend2, attrs: { axis: axes, keepDims: false } });\n const sumReshaped = reshape3({ inputs: { x: sumExp }, backend: backend2, attrs: { shape: expandedShape } });\n const result = div2({ inputs: { a: b, b: sumReshaped }, backend: backend2 });\n backend2.disposeIntermediateTensorInfo(maxLogit);\n backend2.disposeIntermediateTensorInfo(maxLogitReshaped);\n backend2.disposeIntermediateTensorInfo(a);\n backend2.disposeIntermediateTensorInfo(b);\n backend2.disposeIntermediateTensorInfo(sumExp);\n backend2.disposeIntermediateTensorInfo(sumReshaped);\n return result;\n}\nvar softmaxConfig = {\n kernelName: Softmax,\n backendName: \"cpu\",\n kernelFunc: softmax3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Multinomial.js\nfunction multinomial2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { logits } = inputs;\n const { numSamples, seed, normalized } = attrs;\n assertNotComplex(logits, \"multinomial\");\n const probabilities = normalized ? logits : softmax3({ inputs: { logits }, backend: backend2, attrs: { dim: -1 } });\n const batchSize = probabilities.shape[0];\n const numEvents = probabilities.shape[1];\n const probVals = backend2.data.get(probabilities.dataId).values;\n const resShape = [batchSize, numSamples];\n const resVals = util_exports.makeZerosTypedArray(util_exports.sizeFromShape(resShape), \"int32\");\n for (let b = 0; b < batchSize; ++b) {\n const offset = b * numEvents;\n const cdf = new Float32Array(numEvents - 1);\n cdf[0] = probVals[offset];\n for (let event = 1; event < cdf.length; ++event) {\n cdf[event] = cdf[event - 1] + probVals[offset + event];\n }\n const random = seedrandom4.alea(seed.toString());\n const outOffset = b * numSamples;\n for (let sampleId = 0; sampleId < numSamples; ++sampleId) {\n const r2 = random();\n resVals[outOffset + sampleId] = cdf.length;\n for (let event = 0; event < cdf.length; event++) {\n if (r2 < cdf[event]) {\n resVals[outOffset + sampleId] = event;\n break;\n }\n }\n }\n }\n if (!normalized) {\n backend2.disposeIntermediateTensorInfo(probabilities);\n }\n return backend2.makeTensorInfo(resShape, \"int32\", resVals);\n}\nvar multinomialConfig = {\n kernelName: Multinomial,\n backendName: \"cpu\",\n kernelFunc: multinomial2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/NonMaxSuppressionV3.js\nvar nonMaxSuppressionV3Impl2 = kernel_impls_exports.nonMaxSuppressionV3Impl;\nfunction nonMaxSuppressionV3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { boxes, scores } = inputs;\n const { maxOutputSize, iouThreshold, scoreThreshold } = attrs;\n assertNotComplex(boxes, \"NonMaxSuppression\");\n const boxesVals = backend2.data.get(boxes.dataId).values;\n const scoresVals = backend2.data.get(scores.dataId).values;\n const { selectedIndices } = nonMaxSuppressionV3Impl2(boxesVals, scoresVals, maxOutputSize, iouThreshold, scoreThreshold);\n return backend2.makeTensorInfo([selectedIndices.length], \"int32\", new Int32Array(selectedIndices));\n}\nvar nonMaxSuppressionV3Config = {\n kernelName: NonMaxSuppressionV3,\n backendName: \"cpu\",\n kernelFunc: nonMaxSuppressionV3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/NonMaxSuppressionV4.js\nvar nonMaxSuppressionV4Impl2 = kernel_impls_exports.nonMaxSuppressionV4Impl;\nfunction nonMaxSuppressionV4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { boxes, scores } = inputs;\n const { maxOutputSize, iouThreshold, scoreThreshold, padToMaxOutputSize } = attrs;\n assertNotComplex(boxes, \"NonMaxSuppressionPadded\");\n const boxesVals = backend2.data.get(boxes.dataId).values;\n const scoresVals = backend2.data.get(scores.dataId).values;\n const { selectedIndices, validOutputs } = nonMaxSuppressionV4Impl2(boxesVals, scoresVals, maxOutputSize, iouThreshold, scoreThreshold, padToMaxOutputSize);\n return [\n backend2.makeTensorInfo([selectedIndices.length], \"int32\", new Int32Array(selectedIndices)),\n backend2.makeTensorInfo([], \"int32\", new Int32Array([validOutputs]))\n ];\n}\nvar nonMaxSuppressionV4Config = {\n kernelName: NonMaxSuppressionV4,\n backendName: \"cpu\",\n kernelFunc: nonMaxSuppressionV4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/NonMaxSuppressionV5.js\nvar nonMaxSuppressionV5Impl2 = kernel_impls_exports.nonMaxSuppressionV5Impl;\nfunction nonMaxSuppressionV5(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { boxes, scores } = inputs;\n const { maxOutputSize, iouThreshold, scoreThreshold, softNmsSigma } = attrs;\n assertNotComplex(boxes, \"NonMaxSuppressionWithScore\");\n const boxesVals = backend2.data.get(boxes.dataId).values;\n const scoresVals = backend2.data.get(scores.dataId).values;\n const maxOutputSizeVal = maxOutputSize;\n const iouThresholdVal = iouThreshold;\n const scoreThresholdVal = scoreThreshold;\n const softNmsSigmaVal = softNmsSigma;\n const { selectedIndices, selectedScores } = nonMaxSuppressionV5Impl2(boxesVals, scoresVals, maxOutputSizeVal, iouThresholdVal, scoreThresholdVal, softNmsSigmaVal);\n return [\n backend2.makeTensorInfo([selectedIndices.length], \"int32\", new Int32Array(selectedIndices)),\n backend2.makeTensorInfo([selectedScores.length], \"float32\", new Float32Array(selectedScores))\n ];\n}\nvar nonMaxSuppressionV5Config = {\n kernelName: NonMaxSuppressionV5,\n backendName: \"cpu\",\n kernelFunc: nonMaxSuppressionV5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/OneHot.js\nfunction oneHot2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { indices } = inputs;\n const { dtype, depth, onValue, offValue } = attrs;\n assertNotComplex(indices, \"oneHot\");\n const indicesSize = util_exports.sizeFromShape(indices.shape);\n const res = new Float32Array(indicesSize * depth);\n res.fill(offValue);\n const indicesVal = backend2.data.get(indices.dataId).values;\n for (let event = 0; event < indicesSize; ++event) {\n if (indicesVal[event] >= 0 && indicesVal[event] < depth) {\n res[event * depth + indicesVal[event]] = onValue;\n }\n }\n return backend2.makeTensorInfo([...indices.shape, depth], dtype, res);\n}\nvar oneHotConfig = {\n kernelName: OneHot,\n backendName: \"cpu\",\n kernelFunc: oneHot2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ZerosLike.js\nfunction zerosLike2(args) {\n const { inputs, backend: backend2 } = args;\n const { x } = inputs;\n if (x.dtype === \"string\") {\n throw new Error(\"zerosLike is not supported for string tensors\");\n } else if (x.dtype === \"complex64\") {\n const realPart = real2({ inputs: { input: x }, backend: backend2 });\n const r2 = zerosLike2({ inputs: { x: realPart }, backend: backend2 });\n const imagPart = imag2({ inputs: { input: x }, backend: backend2 });\n const i2 = zerosLike2({ inputs: { x: imagPart }, backend: backend2 });\n const result = complex2({ inputs: { real: r2, imag: i2 }, backend: backend2 });\n backend2.disposeIntermediateTensorInfo(realPart);\n backend2.disposeIntermediateTensorInfo(r2);\n backend2.disposeIntermediateTensorInfo(imagPart);\n backend2.disposeIntermediateTensorInfo(i2);\n return result;\n } else {\n return fill2({ backend: backend2, attrs: { shape: x.shape, value: 0, dtype: x.dtype } });\n }\n}\nvar zerosLikeConfig = {\n kernelName: ZerosLike,\n backendName: \"cpu\",\n kernelFunc: zerosLike2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/OnesLike.js\nfunction onesLike2(args) {\n const { inputs, backend: backend2 } = args;\n const { x } = inputs;\n if (x.dtype === \"string\") {\n throw new Error(\"onesLike is not supported for string tensors\");\n } else if (x.dtype === \"complex64\") {\n const realPart = real2({ inputs: { input: x }, backend: backend2 });\n const r2 = onesLike2({ inputs: { x: realPart }, backend: backend2 });\n const imagPart = imag2({ inputs: { input: x }, backend: backend2 });\n const i2 = zerosLike2({ inputs: { x: imagPart }, backend: backend2 });\n const result = complex2({ inputs: { real: r2, imag: i2 }, backend: backend2 });\n backend2.disposeIntermediateTensorInfo(realPart);\n backend2.disposeIntermediateTensorInfo(r2);\n backend2.disposeIntermediateTensorInfo(imagPart);\n backend2.disposeIntermediateTensorInfo(i2);\n return result;\n } else {\n return fill2({ backend: backend2, attrs: { shape: x.shape, value: 1, dtype: x.dtype } });\n }\n}\nvar onesLikeConfig = {\n kernelName: OnesLike,\n backendName: \"cpu\",\n kernelFunc: onesLike2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Pack.js\nfunction pack(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { axis } = attrs;\n if (inputs.length === 1) {\n return expandDims3({ inputs: { input: inputs[0] }, backend: backend2, attrs: { dim: axis } });\n }\n const shape = inputs[0].shape;\n const dtype = inputs[0].dtype;\n inputs.forEach((t2) => {\n util_exports.assertShapesMatch(shape, t2.shape, \"All tensors passed to stack must have matching shapes\");\n util_exports.assert(dtype === t2.dtype, () => \"All tensors passed to stack must have matching dtypes\");\n });\n const intermediateTensorInfos = [];\n const expandedTensors = inputs.map((t2) => {\n const expandedT = expandDims3({ inputs: { input: t2 }, backend: backend2, attrs: { dim: axis } });\n intermediateTensorInfos.push(expandedT);\n return expandedT;\n });\n const result = concat2({ inputs: expandedTensors, backend: backend2, attrs: { axis } });\n intermediateTensorInfos.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2));\n return result;\n}\nvar packConfig = {\n kernelName: Pack,\n backendName: \"cpu\",\n kernelFunc: pack\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/PadV2.js\nfunction padV2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { paddings, constantValue } = attrs;\n assertNotComplex(x, \"pad\");\n const outShape = paddings.map((p2, i2) => p2[0] + x.shape[i2] + p2[1]);\n const start = paddings.map((p2) => p2[0]);\n const xVals = backend2.data.get(x.dataId).values;\n const xSize = util_exports.sizeFromShape(x.shape);\n const xRank = x.shape.length;\n const xStrides = util_exports.computeStrides(x.shape);\n const resultSize = util_exports.sizeFromShape(outShape);\n const resultRank = outShape.length;\n const resultStrides = util_exports.computeStrides(outShape);\n const resVals = util_exports.getTypedArrayFromDType(x.dtype, resultSize);\n if (constantValue !== 0) {\n resVals.fill(constantValue);\n }\n for (let i2 = 0; i2 < xSize; i2++) {\n const coords3 = util_exports.indexToLoc(i2, xRank, xStrides);\n const outCoords = coords3.map((c, i3) => c + start[i3]);\n const outIndex = util_exports.locToIndex(outCoords, resultRank, resultStrides);\n resVals[outIndex] = xVals[i2];\n }\n const outId = backend2.write(resVals, outShape, x.dtype);\n return { dataId: outId, shape: outShape, dtype: x.dtype };\n}\nvar padV2Config = {\n kernelName: PadV2,\n backendName: \"cpu\",\n kernelFunc: padV2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Pow.js\nvar powImpl = createSimpleBinaryKernelImpl((a, b) => Math.pow(a, b));\nvar pow2 = binaryKernelFunc(Pow, powImpl);\nvar powConfig = {\n kernelName: Pow,\n backendName: \"cpu\",\n kernelFunc: pow2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/RaggedGather.js\nfunction raggedGather2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { paramsNestedSplits, paramsDenseValues, indices } = inputs;\n const { outputRaggedRank } = attrs;\n const $paramsNestedSplits = paramsNestedSplits.map((t2) => backend2.data.get(t2.dataId).values);\n const $paramsNestedSplitsShapes = paramsNestedSplits.map((t2) => t2.shape);\n const $paramsDenseValues = backend2.data.get(paramsDenseValues.dataId).values;\n const $indices = backend2.data.get(indices.dataId).values;\n const [outputNestedSplits, outputDenseValues, outputDenseValuesShape] = raggedGatherImpl($paramsNestedSplits, $paramsNestedSplitsShapes, $paramsDenseValues, paramsDenseValues.shape, paramsDenseValues.dtype, $indices, indices.shape, outputRaggedRank);\n const outputNestedSplitsTensors = outputNestedSplits.map((splits) => backend2.makeTensorInfo([splits.length], \"int32\", splits));\n const outputDenseValuesTensor = backend2.makeTensorInfo(outputDenseValuesShape, paramsDenseValues.dtype, outputDenseValues);\n return outputNestedSplitsTensors.concat([outputDenseValuesTensor]);\n}\nvar raggedGatherConfig = {\n kernelName: RaggedGather,\n backendName: \"cpu\",\n kernelFunc: raggedGather2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/RaggedTensorToTensor.js\nfunction raggedTensorToTensor2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { shape, values, defaultValue, rowPartitionTensors } = inputs;\n const { rowPartitionTypes } = attrs;\n const $shape = backend2.data.get(shape.dataId).values;\n const $values = backend2.data.get(values.dataId).values;\n const $defaultValue = backend2.data.get(defaultValue.dataId).values;\n const $rowPartitionValues = rowPartitionTensors.map((t2) => backend2.data.get(t2.dataId).values);\n const rowPartitionValuesShapes = rowPartitionTensors.map((t2) => t2.shape);\n const [outputShape, output] = raggedTensorToTensorImpl($shape, shape.shape, $values, values.shape, values.dtype, $defaultValue, defaultValue.shape, $rowPartitionValues, rowPartitionValuesShapes, rowPartitionTypes);\n return backend2.makeTensorInfo(outputShape, values.dtype, output);\n}\nvar raggedTensorToTensorConfig = {\n kernelName: RaggedTensorToTensor,\n backendName: \"cpu\",\n kernelFunc: raggedTensorToTensor2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Range.js\nfunction range3(args) {\n const { backend: backend2, attrs } = args;\n const { start, stop, dtype, step: step5 } = attrs;\n const values = rangeImpl(start, stop, step5, dtype);\n return backend2.makeTensorInfo([values.length], dtype, values);\n}\nvar rangeConfig = {\n kernelName: Range,\n backendName: \"cpu\",\n kernelFunc: range3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Reciprocal.js\nvar reciprocal2 = unaryKernelFunc(Reciprocal, (xi) => 1 / xi);\nvar reciprocalConfig = {\n kernelName: Reciprocal,\n backendName: \"cpu\",\n kernelFunc: reciprocal2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ResizeBilinear.js\nfunction resizeBilinear2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { images } = inputs;\n const { alignCorners, halfPixelCenters, size } = attrs;\n assertNotComplex(images, \"resizeBilinear\");\n const imagesStrides = util_exports.computeStrides(images.shape);\n const [newHeight, newWidth] = size;\n const [batch, oldHeight, oldWidth, numChannels] = images.shape;\n const xValues = backend2.data.get(images.dataId).values;\n const result = new Float32Array(util_exports.sizeFromShape([batch, newHeight, newWidth, numChannels]));\n const effectiveInputSize = [\n alignCorners && newHeight > 1 ? oldHeight - 1 : oldHeight,\n alignCorners && newWidth > 1 ? oldWidth - 1 : oldWidth\n ];\n const effectiveOutputSize = [\n alignCorners && newHeight > 1 ? newHeight - 1 : newHeight,\n alignCorners && newWidth > 1 ? newWidth - 1 : newWidth\n ];\n let outputIdx = 0;\n const effectiveRowSizeRatio = effectiveInputSize[0] / effectiveOutputSize[0];\n const effectiveColSizeRatio = effectiveInputSize[1] / effectiveOutputSize[1];\n for (let b = 0; b < batch; b++) {\n for (let r2 = 0; r2 < newHeight; r2++) {\n let sourceFracRow;\n if (halfPixelCenters) {\n sourceFracRow = effectiveRowSizeRatio * (r2 + 0.5) - 0.5;\n } else {\n sourceFracRow = effectiveRowSizeRatio * r2;\n }\n const sourceRowFloor = Math.max(0, Math.floor(sourceFracRow));\n const rowFrac = sourceFracRow - sourceRowFloor;\n const sourceRowCeil = Math.min(oldHeight - 1, Math.ceil(sourceFracRow));\n const topRowOffset = b * imagesStrides[0] + sourceRowFloor * imagesStrides[1];\n const botRowOffset = b * imagesStrides[0] + sourceRowCeil * imagesStrides[1];\n for (let c = 0; c < newWidth; c++) {\n let sourceFracCol;\n if (halfPixelCenters) {\n sourceFracCol = effectiveColSizeRatio * (c + 0.5) - 0.5;\n } else {\n sourceFracCol = effectiveColSizeRatio * c;\n }\n const sourceColFloor = Math.max(0, Math.floor(sourceFracCol));\n const colFrac = sourceFracCol - sourceColFloor;\n const sourceColCeil = Math.min(oldWidth - 1, Math.ceil(sourceFracCol));\n const topLeftOffest = topRowOffset + sourceColFloor * imagesStrides[2];\n const botLeftOffset = botRowOffset + sourceColFloor * imagesStrides[2];\n const topRightOffset = topRowOffset + sourceColCeil * imagesStrides[2];\n const botRightOffest = botRowOffset + sourceColCeil * imagesStrides[2];\n for (let d = 0; d < numChannels; d++) {\n const topLeft = xValues[topLeftOffest + d];\n const bottomLeft = xValues[botLeftOffset + d];\n const topRight = xValues[topRightOffset + d];\n const bottomRight = xValues[botRightOffest + d];\n const top = topLeft + (topRight - topLeft) * colFrac;\n const bottom = bottomLeft + (bottomRight - bottomLeft) * colFrac;\n const newValue = top + (bottom - top) * rowFrac;\n result[outputIdx++] = newValue;\n }\n }\n }\n }\n return backend2.makeTensorInfo([batch, newHeight, newWidth, numChannels], \"float32\", result);\n}\nvar resizeBilinearConfig = {\n kernelName: ResizeBilinear,\n backendName: \"cpu\",\n kernelFunc: resizeBilinear2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ResizeBilinearGrad.js\nfunction resizeBilinearGrad(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { images, dy } = inputs;\n const { alignCorners } = attrs;\n assertNotComplex([dy, images], \"resizeBilinearGrad\");\n const imagesStrides = util_exports.computeStrides(images.shape);\n const [batch, xHeight, xWidth, depth] = images.shape;\n const [, yHeight, yWidth] = dy.shape;\n const output = new Float32Array(batch * xHeight * xWidth * depth);\n const effectiveXSize = [\n alignCorners && yHeight > 1 ? xHeight - 1 : xHeight,\n alignCorners && yWidth > 1 ? xWidth - 1 : xWidth\n ];\n const effectiveYSize = [\n alignCorners && yHeight > 1 ? yHeight - 1 : yHeight,\n alignCorners && yWidth > 1 ? yWidth - 1 : yWidth\n ];\n const heightScale = effectiveXSize[0] / effectiveYSize[0];\n const widthScale = effectiveXSize[1] / effectiveYSize[1];\n const dyValues = backend2.data.get(dy.dataId).values;\n let offset = 0;\n for (let b = 0; b < batch; b++) {\n const bOffset = b * imagesStrides[0];\n for (let r2 = 0; r2 < yHeight; r2++) {\n const dxR = r2 * heightScale;\n const topDxRIndex = Math.floor(dxR);\n const bottomDxRIndex = Math.min(Math.ceil(dxR), xHeight - 1);\n const topDxROffset = bOffset + topDxRIndex * imagesStrides[1];\n const bottomDxROffset = bOffset + bottomDxRIndex * imagesStrides[1];\n const dxRLerp = dxR - topDxRIndex;\n const inverseDxRLerp = 1 - dxRLerp;\n for (let c = 0; c < yWidth; c++) {\n const dxC = c * widthScale;\n const leftDxCIndex = Math.floor(dxC);\n const rightDxCIndex = Math.min(Math.ceil(dxC), xWidth - 1);\n const dxCLerp = dxC - leftDxCIndex;\n const inverseDxCLerp = 1 - dxCLerp;\n const topLeftRCOffset = topDxROffset + leftDxCIndex * imagesStrides[2];\n const topRightRCOffset = topDxROffset + rightDxCIndex * imagesStrides[2];\n const bottomLeftRCOffset = bottomDxROffset + leftDxCIndex * imagesStrides[2];\n const bottomRightRCOffset = bottomDxROffset + rightDxCIndex * imagesStrides[2];\n const inverseDxRLerpTimesInverseDxCLerp = inverseDxRLerp * inverseDxCLerp;\n const inverseDxRLerpTimesDxCLerp = inverseDxRLerp * dxCLerp;\n const dxRLerpTimesInverseDxCLerp = dxRLerp * inverseDxCLerp;\n const dxRLerpTimesDxCLerp = dxRLerp * dxCLerp;\n for (let d = 0; d < depth; d++) {\n const dyVal = dyValues[offset++];\n output[topLeftRCOffset + d] += dyVal * inverseDxRLerpTimesInverseDxCLerp;\n output[topRightRCOffset + d] += dyVal * inverseDxRLerpTimesDxCLerp;\n output[bottomLeftRCOffset + d] += dyVal * dxRLerpTimesInverseDxCLerp;\n output[bottomRightRCOffset + d] += dyVal * dxRLerpTimesDxCLerp;\n }\n }\n }\n }\n return backend2.makeTensorInfo([batch, xWidth, xHeight, depth], \"float32\", output);\n}\nvar resizeBilinearGradConfig2 = {\n kernelName: ResizeBilinearGrad,\n backendName: \"cpu\",\n kernelFunc: resizeBilinearGrad\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ResizeNearestNeighbor.js\nfunction resizeNearestNeighbor2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { images } = inputs;\n const { alignCorners, halfPixelCenters, size } = attrs;\n assertNotComplex(images, \"resizeNearestNeighbor\");\n const imagesStrides = util_exports.computeStrides(images.shape);\n const [newHeight, newWidth] = size;\n const [batch, oldHeight, oldWidth, numChannels] = images.shape;\n const xValues = backend2.data.get(images.dataId).values;\n const output = new Float32Array(batch * newHeight * newWidth * numChannels);\n const effectiveInputSize = [\n alignCorners && newHeight > 1 ? oldHeight - 1 : oldHeight,\n alignCorners && newWidth > 1 ? oldWidth - 1 : oldWidth\n ];\n const effectiveOutputSize = [\n alignCorners && newHeight > 1 ? newHeight - 1 : newHeight,\n alignCorners && newWidth > 1 ? newWidth - 1 : newWidth\n ];\n const effectiveRowSizeRatio = effectiveInputSize[0] / effectiveOutputSize[0];\n const effectiveColSizeRatio = effectiveInputSize[1] / effectiveOutputSize[1];\n let outputOffset = 0;\n for (let b = 0; b < batch; b++) {\n const batchOffset = b * imagesStrides[0];\n for (let r2 = 0; r2 < newHeight; r2++) {\n const sourceFracRow = halfPixelCenters ? effectiveRowSizeRatio * (r2 + 0.5) : effectiveRowSizeRatio * r2;\n let sourceNearestRow = Math.min(oldHeight - 1, alignCorners ? Math.round(sourceFracRow) : Math.floor(sourceFracRow));\n if (halfPixelCenters) {\n sourceNearestRow = Math.max(0, sourceNearestRow);\n }\n const rowOffset = batchOffset + sourceNearestRow * imagesStrides[1];\n for (let c = 0; c < newWidth; c++) {\n const sourceFracCol = halfPixelCenters ? effectiveColSizeRatio * (c + 0.5) : effectiveColSizeRatio * c;\n let sourceNearestCol = Math.min(oldWidth - 1, alignCorners ? Math.round(sourceFracCol) : Math.floor(sourceFracCol));\n if (halfPixelCenters) {\n sourceNearestCol = Math.max(0, sourceNearestCol);\n }\n const colOffset = rowOffset + sourceNearestCol * imagesStrides[2];\n for (let d = 0; d < numChannels; d++) {\n const newVal = xValues[colOffset + d];\n output[outputOffset++] = newVal;\n }\n }\n }\n }\n return backend2.makeTensorInfo([batch, newHeight, newWidth, numChannels], images.dtype, output);\n}\nvar resizeNearestNeighborConfig = {\n kernelName: ResizeNearestNeighbor,\n backendName: \"cpu\",\n kernelFunc: resizeNearestNeighbor2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ResizeNearestNeighborGrad.js\nfunction resizeNearestNeighborGrad(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { images, dy } = inputs;\n const { alignCorners } = attrs;\n assertNotComplex([dy, images], \"resizeNearestNeighborGrad\");\n const imagesStrides = util_exports.computeStrides(images.shape);\n const dyStrides = util_exports.computeStrides(dy.shape);\n const [batch, xHeight, xWidth, depth] = images.shape;\n const [, yHeight, yWidth] = dy.shape;\n const output = new Float32Array(batch * xHeight * xWidth * depth);\n const dyValues = backend2.data.get(dy.dataId).values;\n const effectiveXSize = [\n alignCorners && yHeight > 1 ? xHeight - 1 : xHeight,\n alignCorners && yWidth > 1 ? xWidth - 1 : xWidth\n ];\n const effectiveYSize = [\n alignCorners && yHeight > 1 ? yHeight - 1 : yHeight,\n alignCorners && yWidth > 1 ? yWidth - 1 : yWidth\n ];\n const heightScale = effectiveXSize[0] / effectiveYSize[0];\n const widthScale = effectiveXSize[1] / effectiveYSize[1];\n const invHeightScale = 1 / heightScale;\n const invWidthScale = 1 / widthScale;\n const winHeight = Math.ceil(invHeightScale) * 2 + 2;\n const winWidth = Math.ceil(invWidthScale) * 2 + 2;\n for (let b = 0; b < batch; b++) {\n const batchOffset = b * imagesStrides[0];\n for (let r2 = 0; r2 < xHeight; r2++) {\n const rowOffset = batchOffset + r2 * imagesStrides[1];\n const startRLerp = Math.floor(r2 * invHeightScale);\n const startDyR = Math.floor(startRLerp - winHeight / 2);\n for (let c = 0; c < xWidth; c++) {\n const colOffset = rowOffset + c * imagesStrides[2];\n const startCLerp = Math.floor(c * invWidthScale);\n const startDyC = Math.floor(startCLerp - winWidth / 2);\n for (let d = 0; d < depth; d++) {\n let accum = 0;\n for (let dyRIndex = 0; dyRIndex < winHeight; dyRIndex++) {\n const dyR = dyRIndex + startDyR;\n if (dyR < 0 || dyR >= yHeight) {\n continue;\n }\n const dyROffset = batchOffset + dyR * dyStrides[1];\n const sourceFracRow = dyR * heightScale;\n const sourceNearestRow = Math.min(xHeight - 1, alignCorners ? Math.round(sourceFracRow) : Math.floor(sourceFracRow));\n if (r2 !== sourceNearestRow) {\n continue;\n }\n for (let dyCIndex = 0; dyCIndex < winWidth; dyCIndex++) {\n const dyC = dyCIndex + startDyC;\n if (dyC < 0 || dyC >= yWidth) {\n continue;\n }\n const dyCOffset = dyROffset + dyC * dyStrides[2];\n const sourceFracCol = dyC * widthScale;\n const sourceNearestCol = Math.min(xWidth - 1, alignCorners ? Math.round(sourceFracCol) : Math.floor(sourceFracCol));\n if (c === sourceNearestCol) {\n accum += dyValues[dyCOffset + d];\n }\n }\n }\n output[colOffset + d] = accum;\n }\n }\n }\n }\n return backend2.makeTensorInfo(images.shape, images.dtype, output);\n}\nvar resizeNearestNeighborGradConfig2 = {\n kernelName: ResizeNearestNeighborGrad,\n backendName: \"cpu\",\n kernelFunc: resizeNearestNeighborGrad\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Reverse.js\nfunction reverse2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { dims } = attrs;\n assertNotComplex(x, \"reverse\");\n const xRank = x.shape.length;\n const $dims = util_exports.parseAxisParam(dims, x.shape);\n if (xRank === 0) {\n return identity2({ inputs: { x }, backend: backend2 });\n }\n const outBuf = new TensorBuffer(x.shape, x.dtype);\n const xBuf = backend2.bufferSync(x);\n for (let i2 = 0; i2 < outBuf.size; i2++) {\n const outLoc = outBuf.indexToLoc(i2);\n const inLoc = outLoc.slice();\n $dims.forEach((d) => inLoc[d] = x.shape[d] - 1 - inLoc[d]);\n outBuf.set(xBuf.get(...inLoc), ...outLoc);\n }\n return backend2.makeTensorInfo(outBuf.shape, outBuf.dtype, outBuf.values);\n}\nvar reverseConfig = {\n kernelName: Reverse,\n backendName: \"cpu\",\n kernelFunc: reverse2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/RotateWithOffset.js\nvar rotateWithOffsetConfig = {\n kernelName: RotateWithOffset,\n backendName: \"cpu\",\n kernelFunc: ({ inputs, attrs, backend: backend2 }) => {\n const { image: image2 } = inputs;\n const { radians, fillValue, center } = attrs;\n const cpuBackend = backend2;\n const output = util_exports.getTypedArrayFromDType(image2.dtype, util_exports.sizeFromShape(image2.shape));\n const [batch, imageHeight, imageWidth, numChannels] = image2.shape;\n const [centerX, centerY] = backend_util_exports.getImageCenter(center, imageHeight, imageWidth);\n const fullOpacityValue = 255;\n const sinFactor = Math.sin(radians);\n const cosFactor = Math.cos(radians);\n const imageVals = cpuBackend.data.get(image2.dataId).values;\n for (let batchIdx = 0; batchIdx < batch; batchIdx++) {\n const batchOffset = batchIdx * imageWidth * imageHeight * numChannels;\n for (let row = 0; row < imageHeight; row++) {\n const rowOffset = row * (imageWidth * numChannels);\n for (let col = 0; col < imageWidth; col++) {\n const colOffset = col * numChannels;\n for (let channel = 0; channel < numChannels; channel++) {\n const coords3 = [batch, row, col, channel];\n const x = coords3[2];\n const y = coords3[1];\n let coordX = (x - centerX) * cosFactor - (y - centerY) * sinFactor;\n let coordY = (x - centerX) * sinFactor + (y - centerY) * cosFactor;\n coordX = Math.round(coordX + centerX);\n coordY = Math.round(coordY + centerY);\n let outputValue = fillValue;\n if (typeof fillValue !== \"number\") {\n if (channel === 3) {\n outputValue = fullOpacityValue;\n } else {\n outputValue = fillValue[channel];\n }\n }\n if (coordX >= 0 && coordX < imageWidth && coordY >= 0 && coordY < imageHeight) {\n const rotatedRowOffset = coordY * (imageWidth * numChannels);\n const rotatedColOffset = coordX * numChannels;\n const imageIdx = batchOffset + rotatedRowOffset + rotatedColOffset + channel;\n outputValue = imageVals[imageIdx];\n }\n const outIdx = batchOffset + rowOffset + colOffset + channel;\n output[outIdx] = outputValue;\n }\n }\n }\n }\n const dataId = cpuBackend.write(output, image2.shape, image2.dtype);\n return { dataId, shape: image2.shape, dtype: image2.dtype };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Round.js\nvar round3 = unaryKernelFunc(Round, (xi) => {\n const base = Math.floor(xi);\n if (xi - base < 0.5) {\n return Math.floor(xi);\n } else if (xi - base > 0.5) {\n return Math.ceil(xi);\n } else {\n if (base % 2 === 0) {\n return base;\n } else {\n return base + 1;\n }\n }\n});\nvar roundConfig = {\n kernelName: Round,\n backendName: \"cpu\",\n kernelFunc: round3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ScatterNd.js\nfunction scatterNd(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { indices, updates } = inputs;\n const { shape } = attrs;\n const { sliceRank, numUpdates, sliceSize, strides, outputSize } = backend_util_exports.calculateShapes(updates, indices, shape);\n const sumDupeIndices = true;\n const indicesBuf = backend2.bufferSync(indices);\n const updatesBuf = backend2.bufferSync(updates);\n const outBuf = scatterImpl(indicesBuf, updatesBuf, shape, outputSize, sliceSize, numUpdates, sliceRank, strides, 0, sumDupeIndices);\n return backend2.makeTensorInfo(shape, outBuf.dtype, outBuf.values);\n}\nvar scatterNdConfig = {\n kernelName: ScatterNd,\n backendName: \"cpu\",\n kernelFunc: scatterNd\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SearchSorted_impl.js\nfunction lowerBound2(array2, value) {\n let left = 0;\n let right = array2.length;\n let mid = 0;\n while (left < right) {\n mid = Math.floor((left + right) / 2);\n if (array2[mid] < value) {\n left = mid + 1;\n } else {\n right = mid;\n }\n }\n return right;\n}\nfunction upperBound2(array2, value) {\n let left = 0;\n let right = array2.length;\n let mid = 0;\n while (left < right) {\n mid = Math.floor((left + right) / 2);\n if (array2[mid] <= value) {\n left = mid + 1;\n } else {\n right = mid;\n }\n }\n return right;\n}\nfunction searchSortedImpl(sortedInputs, values, batchSize, numInputs, numValues, side) {\n const output = util_exports.getArrayFromDType(\"int32\", batchSize * numValues);\n for (let b = 0; b < batchSize; ++b) {\n const sortedInputsSlice = sortedInputs.slice(b * numInputs, (b + 1) * numInputs);\n const outputOffset = b * numValues;\n for (let i2 = 0; i2 < numValues; ++i2) {\n output[outputOffset + i2] = side === \"left\" ? lowerBound2(sortedInputsSlice, values[i2 + outputOffset]) : upperBound2(sortedInputsSlice, values[i2 + outputOffset]);\n }\n }\n return output;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SearchSorted.js\nfunction searchSorted2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { sortedSequence, values } = inputs;\n const { side } = attrs;\n const $sortedSequence = backend2.data.get(sortedSequence.dataId).values;\n const $values = backend2.data.get(values.dataId).values;\n const output = searchSortedImpl($sortedSequence, $values, sortedSequence.shape[0], sortedSequence.shape[1], values.shape[1], side);\n return backend2.makeTensorInfo(values.shape, \"int32\", output);\n}\nvar searchSortedConfig = {\n kernelName: SearchSorted,\n backendName: \"cpu\",\n kernelFunc: searchSorted2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Select.js\nfunction select2(args) {\n const { inputs, backend: backend2 } = args;\n const { condition, t: t2, e: e2 } = inputs;\n assertNotComplex([condition, t2, e2], \"select\");\n const conditionRank = condition.shape.length;\n const values = backend2.data.get(condition.dataId).values;\n const tValues = backend2.data.get(t2.dataId).values;\n const eValues = backend2.data.get(e2.dataId).values;\n const resultDtype = upcastType(t2.dtype, e2.dtype);\n const newValues = util_exports.makeZerosTypedArray(util_exports.sizeFromShape(t2.shape), resultDtype);\n let index = 0;\n const offset = conditionRank === 0 || conditionRank > 1 || t2.shape.length === 1 ? 1 : util_exports.sizeFromShape(t2.shape.slice(1));\n for (let i2 = 0; i2 < values.length; i2++) {\n for (let j = 0; j < offset; j++) {\n if (values[i2] === 1) {\n newValues[index++] = tValues[i2];\n } else {\n newValues[index++] = eValues[i2];\n }\n }\n }\n return backend2.makeTensorInfo(t2.shape, resultDtype, newValues);\n}\nvar selectConfig = {\n kernelName: Select,\n backendName: \"cpu\",\n kernelFunc: select2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Selu.js\nvar scaleAlpha = backend_util_exports.SELU_SCALEALPHA;\nvar scale = backend_util_exports.SELU_SCALE;\nvar selu2 = unaryKernelFunc(Selu, (xi) => {\n if (xi >= 0) {\n return scale * xi;\n } else {\n return scaleAlpha * (Math.exp(xi) - 1);\n }\n});\nvar seluConfig = {\n kernelName: Selu,\n backendName: \"cpu\",\n kernelFunc: selu2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Sign.js\nvar sign2 = unaryKernelFunc(Sign, (xi) => {\n if (xi < 0) {\n return -1;\n } else if (xi > 0) {\n return 1;\n } else {\n return 0;\n }\n});\nvar signConfig = {\n kernelName: Sign,\n backendName: \"cpu\",\n kernelFunc: sign2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Sin.js\nvar sin2 = unaryKernelFunc(Sin, (xi) => Math.sin(xi));\nvar sinConfig = {\n kernelName: Sin,\n backendName: \"cpu\",\n kernelFunc: sin2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Sinh.js\nvar sinh2 = unaryKernelFunc(Sinh, (xi) => Math.sinh(xi));\nvar sinhConfig = {\n kernelName: Sinh,\n backendName: \"cpu\",\n kernelFunc: sinh2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Softplus.js\nvar epsilon2 = 11920928955078125e-23;\nvar threshold2 = Math.log(epsilon2) + 2;\nvar softplus2 = unaryKernelFunc(Softplus, (xi) => {\n const tooLarge = xi > -threshold2;\n const tooSmall = xi < threshold2;\n const expX = Math.exp(xi);\n let result;\n if (tooSmall) {\n result = expX;\n } else if (tooLarge) {\n result = xi;\n } else {\n result = Math.log(1 + expX);\n }\n return result;\n});\nvar softplusConfig = {\n kernelName: Softplus,\n backendName: \"cpu\",\n kernelFunc: softplus2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SpaceToBatchND.js\nfunction spaceToBatchND2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { blockShape, paddings } = attrs;\n assertNotComplex([x], \"spaceToBatchND\");\n const prod6 = util_exports.sizeFromShape(blockShape);\n const completePaddings = [[0, 0]];\n completePaddings.push(...paddings);\n for (let i2 = 1 + blockShape.length; i2 < x.shape.length; ++i2) {\n completePaddings.push([0, 0]);\n }\n const paddedX = padV2Config.kernelFunc({\n inputs: { x },\n backend: backend2,\n attrs: { paddings: completePaddings, constantValue: 0 }\n });\n const reshapedPaddedShape = backend_util_exports.getReshaped(paddedX.shape, blockShape, prod6, false);\n const permutedReshapedPaddedPermutation = backend_util_exports.getPermuted(reshapedPaddedShape.length, blockShape.length, false);\n const flattenShape = backend_util_exports.getReshapedPermuted(paddedX.shape, blockShape, prod6, false);\n const reshapeInputs = { x: paddedX };\n const reshapeAttrs = { shape: reshapedPaddedShape };\n const paddedXReshaped = reshape3({ inputs: reshapeInputs, backend: backend2, attrs: reshapeAttrs });\n const transposeInputs = { x: paddedXReshaped };\n const transposeAttrs = { perm: permutedReshapedPaddedPermutation };\n const paddedXT = transpose2({ inputs: transposeInputs, backend: backend2, attrs: transposeAttrs });\n const resultReshapeInputs = { x: paddedXT };\n const resultReshapeAttrs = { shape: flattenShape };\n const result = reshape3({ inputs: resultReshapeInputs, backend: backend2, attrs: resultReshapeAttrs });\n backend2.disposeIntermediateTensorInfo(paddedX);\n backend2.disposeIntermediateTensorInfo(paddedXReshaped);\n backend2.disposeIntermediateTensorInfo(paddedXT);\n return result;\n}\nvar spaceToBatchNDConfig = {\n kernelName: SpaceToBatchND,\n backendName: \"cpu\",\n kernelFunc: spaceToBatchND2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SparseFillEmptyRows.js\nfunction sparseFillEmptyRows2(args) {\n const { inputs, backend: backend2 } = args;\n const { indices, values, denseShape, defaultValue } = inputs;\n if (denseShape.shape.length !== 1) {\n throw new Error(`Dense shape must be a vector, saw:\n ${denseShape.shape}`);\n }\n if (indices.shape.length !== 2) {\n throw new Error(`Indices must be a matrix, saw:\n ${indices.shape}`);\n }\n if (values.shape.length !== 1) {\n throw new Error(`Values must be a vector, saw:\n ${values.shape}`);\n }\n if (defaultValue.shape.length !== 0) {\n throw new Error(`Default value must be a scalar, saw:\n ${defaultValue.shape}`);\n }\n const $indices = backend2.data.get(indices.dataId).values;\n const $values = backend2.data.get(values.dataId).values;\n const $denseShape = backend2.data.get(denseShape.dataId).values;\n const $defaultValue = backend2.data.get(defaultValue.dataId).values[0];\n const [outputIndices, outputIndicesShape, outputValues, emptyRowIndicator, reverseIndexMap] = sparseFillEmptyRowsImpl($indices, indices.shape, indices.dtype, $values, values.dtype, $denseShape, $defaultValue);\n return [\n backend2.makeTensorInfo(outputIndicesShape, indices.dtype, outputIndices),\n backend2.makeTensorInfo([outputIndicesShape[0]], values.dtype, outputValues),\n backend2.makeTensorInfo([emptyRowIndicator.length], \"bool\", new Uint8Array(emptyRowIndicator.map((value) => Number(value)))),\n backend2.makeTensorInfo([reverseIndexMap.length], indices.dtype, new Int32Array(reverseIndexMap))\n ];\n}\nvar sparseFillEmptyRowsConfig = {\n kernelName: SparseFillEmptyRows,\n backendName: \"cpu\",\n kernelFunc: sparseFillEmptyRows2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SparseReshape.js\nfunction sparseReshape2(args) {\n const { inputs, backend: backend2 } = args;\n const { inputIndices, inputShape, newShape } = inputs;\n if (inputIndices.shape.length !== 2) {\n throw new Error(`Input indices should be a matrix but received shape\n ${inputIndices.shape}`);\n }\n if (inputShape.shape.length !== 1) {\n throw new Error(`Input shape should be a vector but received shape\n ${inputShape.shape}`);\n }\n if (newShape.shape.length !== 1) {\n throw new Error(`Target shape should be a vector but received shape ${newShape.shape}`);\n }\n const $inputShape = Array.from(backend2.data.get(inputShape.dataId).values);\n const $inputIndices = backend2.data.get(inputIndices.dataId).values;\n const targetShape = Array.from(backend2.data.get(newShape.dataId).values);\n const [newIndices, indicesShape, outputShape] = sparseReshapeImpl($inputIndices, inputIndices.shape, inputIndices.dtype, $inputShape, targetShape);\n return [\n backend2.makeTensorInfo(indicesShape, inputIndices.dtype, newIndices),\n backend2.makeTensorInfo([outputShape.length], newShape.dtype, new Int32Array(outputShape))\n ];\n}\nvar sparseReshapeConfig = {\n kernelName: SparseReshape,\n backendName: \"cpu\",\n kernelFunc: sparseReshape2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SparseSegmentMean.js\nfunction sparseSegmentMean2(args) {\n const { inputs, backend: backend2 } = args;\n const { data, indices, segmentIds } = inputs;\n if (data.shape.length < 1) {\n throw new Error(`Data should be at least 1 dimensional but received scalar`);\n }\n if (indices.shape.length !== 1) {\n throw new Error(`Indices should be a vector but received shape\n ${indices.shape}`);\n }\n if (segmentIds.shape.length !== 1) {\n throw new Error(`Segment ids should be a vector but received shape\n ${segmentIds.shape}`);\n }\n if (indices.shape[0] !== segmentIds.shape[0]) {\n throw new Error(`segmentIds and indices should have same size.`);\n }\n const $data = backend2.data.get(data.dataId).values;\n const $indices = backend2.data.get(indices.dataId).values;\n const $segmentIds = backend2.data.get(segmentIds.dataId).values;\n const [outputData, outputDataShape] = sparseSegmentReductionImpl($data, data.shape, data.dtype, $indices, $segmentIds, true);\n return backend2.makeTensorInfo(outputDataShape, data.dtype, outputData);\n}\nvar sparseSegmentMeanConfig = {\n kernelName: SparseSegmentMean,\n backendName: \"cpu\",\n kernelFunc: sparseSegmentMean2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SparseSegmentSum.js\nfunction sparseSegmentSum2(args) {\n const { inputs, backend: backend2 } = args;\n const { data, indices, segmentIds } = inputs;\n if (data.shape.length < 1) {\n throw new Error(`Data should be at least 1 dimensional but received scalar`);\n }\n if (indices.shape.length !== 1) {\n throw new Error(`Indices should be a vector but received shape\n ${indices.shape}`);\n }\n if (segmentIds.shape.length !== 1) {\n throw new Error(`Segment ids should be a vector but received shape\n ${segmentIds.shape}`);\n }\n if (indices.shape[0] !== segmentIds.shape[0]) {\n throw new Error(`segmentIds and indices should have same size.`);\n }\n const $data = backend2.data.get(data.dataId).values;\n const $indices = backend2.data.get(indices.dataId).values;\n const $segmentIds = backend2.data.get(segmentIds.dataId).values;\n const [outputData, outputDataShape] = sparseSegmentReductionImpl($data, data.shape, data.dtype, $indices, $segmentIds);\n return backend2.makeTensorInfo(outputDataShape, data.dtype, outputData);\n}\nvar sparseSegmentSumConfig = {\n kernelName: SparseSegmentSum,\n backendName: \"cpu\",\n kernelFunc: sparseSegmentSum2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SparseToDense.js\nfunction sparseToDense2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { sparseIndices, sparseValues, defaultValue } = inputs;\n const { outputShape } = attrs;\n const { sliceRank, numUpdates, sliceSize, strides, outputSize } = backend_util_exports.calculateShapes(sparseValues, sparseIndices, outputShape);\n const sumDupeIndices = false;\n const indicesBuf = backend2.bufferSync(sparseIndices);\n let outBuf;\n switch (sparseValues.dtype) {\n case \"bool\": {\n const updatesBuf = backend2.bufferSync(sparseValues);\n const $defaultValue = Boolean(backend2.data.get(defaultValue.dataId).values[0]);\n outBuf = scatterImpl(indicesBuf, updatesBuf, outputShape, outputSize, sliceSize, numUpdates, sliceRank, strides, $defaultValue, sumDupeIndices);\n break;\n }\n case \"float32\": {\n const updatesBuf = backend2.bufferSync(sparseValues);\n const $defaultValue = backend2.data.get(defaultValue.dataId).values[0];\n outBuf = scatterImpl(indicesBuf, updatesBuf, outputShape, outputSize, sliceSize, numUpdates, sliceRank, strides, $defaultValue, sumDupeIndices);\n break;\n }\n case \"int32\": {\n const updatesBuf = backend2.bufferSync(sparseValues);\n const $defaultValue = backend2.data.get(defaultValue.dataId).values[0];\n outBuf = scatterImpl(indicesBuf, updatesBuf, outputShape, outputSize, sliceSize, numUpdates, sliceRank, strides, $defaultValue, sumDupeIndices);\n break;\n }\n case \"string\": {\n const updatesBuf = backend2.bufferSync(sparseValues);\n const $defaultValue = util_exports.decodeString(backend2.data.get(defaultValue.dataId).values[0]);\n outBuf = scatterImpl(indicesBuf, updatesBuf, outputShape, outputSize, sliceSize, numUpdates, sliceRank, strides, $defaultValue, sumDupeIndices);\n break;\n }\n default:\n throw new Error(`Unsupported type ${sparseValues.dtype}`);\n }\n return backend2.makeTensorInfo(outputShape, outBuf.dtype, outBuf.values);\n}\nvar sparseToDenseConfig = {\n kernelName: SparseToDense,\n backendName: \"cpu\",\n kernelFunc: sparseToDense2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SplitV.js\nfunction splitV(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { numOrSizeSplits, axis } = attrs;\n const $axis = util_exports.parseAxisParam(axis, x.shape)[0];\n const splitSizes = backend_util_exports.prepareSplitSize(x, numOrSizeSplits, $axis);\n const begin = new Array(x.shape.length).fill(0);\n const size = x.shape.slice();\n return splitSizes.map((s2) => {\n const sliceSize = [...size];\n sliceSize[$axis] = s2;\n const sliceT = slice2({ inputs: { x }, backend: backend2, attrs: { begin, size: sliceSize } });\n begin[$axis] += s2;\n return sliceT;\n });\n}\nvar splitVConfig = {\n kernelName: SplitV,\n backendName: \"cpu\",\n kernelFunc: splitV\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Square.js\nvar squareConfig = {\n kernelName: Square,\n backendName: \"cpu\",\n kernelFunc: ({ inputs, backend: backend2 }) => {\n const { x } = inputs;\n const cpuBackend = backend2;\n assertNotComplex(x, \"square\");\n const values = cpuBackend.data.get(x.dataId).values;\n const newValues = new Float32Array(values.length);\n for (let i2 = 0; i2 < values.length; ++i2) {\n const value = values[i2];\n newValues[i2] = value * value;\n }\n const dataId = cpuBackend.write(newValues, x.shape, x.dtype);\n return { dataId, shape: x.shape, dtype: x.dtype };\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Step.js\nvar step2 = unaryKernelFunc(Step, (xi, attrs) => {\n const stepAttrs = attrs;\n if (isNaN(xi)) {\n return NaN;\n } else {\n return xi > 0 ? 1 : stepAttrs.alpha;\n }\n});\nvar stepConfig = {\n kernelName: Step,\n backendName: \"cpu\",\n kernelFunc: step2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/StridedSlice.js\nfunction stridedSlice2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { begin, end, strides, beginMask, endMask, ellipsisMask, newAxisMask, shrinkAxisMask } = attrs;\n assertNotComplex(x, \"stridedSlice\");\n const { finalShapeSparse, finalShape, isIdentity, sliceDim0, isSimpleSlice, begin: $begin, end: $end, strides: $strides } = slice_util_exports.sliceInfo(x.shape, begin, end, strides, beginMask, endMask, ellipsisMask, newAxisMask, shrinkAxisMask);\n let result;\n if (isIdentity) {\n result = reshape3({ inputs: { x }, backend: backend2, attrs: { shape: finalShape } });\n } else if (sliceDim0 || isSimpleSlice) {\n util_exports.assert(x.shape.length >= 1, () => `Input must have rank at least 1, got: ${x.shape.length}`);\n const size = slice_util_exports.computeOutShape($begin, $end, $strides);\n const sliced = slice2({ inputs: { x }, backend: backend2, attrs: { begin: $begin, size } });\n result = reshape3({ inputs: { x: sliced }, backend: backend2, attrs: { shape: finalShape } });\n backend2.disposeIntermediateTensorInfo(sliced);\n } else {\n const xBuf = backend2.bufferSync(x);\n const outBuf = stridedSliceImpl(finalShapeSparse, xBuf, $strides, $begin);\n result = backend2.makeTensorInfo(finalShape, outBuf.dtype, outBuf.values);\n }\n return result;\n}\nvar stridedSliceConfig = {\n kernelName: StridedSlice,\n backendName: \"cpu\",\n kernelFunc: stridedSlice2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/StringNGrams.js\nfunction stringNGrams2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { separator, nGramWidths, leftPad, rightPad: rightPad2, padWidth, preserveShortSequences } = attrs;\n const { data, dataSplits } = inputs;\n const $data = backend2.data.get(data.dataId).values;\n const $dataSplits = backend2.data.get(dataSplits.dataId).values;\n const [nGrams, nGramsSplits] = stringNGramsImpl($data, $dataSplits, separator, nGramWidths, leftPad, rightPad2, padWidth, preserveShortSequences);\n return [\n backend2.makeTensorInfo([nGrams.length], \"string\", nGrams),\n backend2.makeTensorInfo(dataSplits.shape, \"int32\", nGramsSplits)\n ];\n}\nvar stringNGramsConfig = {\n kernelName: StringNGrams,\n backendName: \"cpu\",\n kernelFunc: stringNGrams2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/StringSplit.js\nfunction stringSplit2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { skipEmpty } = attrs;\n const { input: input2, delimiter } = inputs;\n if (input2.dtype !== \"string\") {\n throw new Error(\"Input must be of datatype string\");\n }\n if (input2.shape.length !== 1) {\n throw new Error(`Input must be a vector, got shape: ${input2.shape}`);\n }\n if (delimiter.shape.length !== 0) {\n throw new Error(`Delimiter must be a scalar, got shape: ${delimiter.shape}`);\n }\n const $input = backend2.data.get(input2.dataId).values;\n const $delimiter = backend2.data.get(delimiter.dataId).values[0];\n const [indices, values, shape] = stringSplitImpl($input, $delimiter, skipEmpty);\n const outputSize = values.length;\n return [\n backend2.makeTensorInfo([outputSize, 2], \"int32\", indices),\n backend2.makeTensorInfo([outputSize], \"string\", values),\n backend2.makeTensorInfo([2], \"int32\", new Int32Array(shape))\n ];\n}\nvar stringSplitConfig = {\n kernelName: StringSplit,\n backendName: \"cpu\",\n kernelFunc: stringSplit2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/StringToHashBucketFast.js\nfunction stringToHashBucketFast2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { numBuckets } = attrs;\n const { input: input2 } = inputs;\n if (input2.dtype !== \"string\") {\n throw new Error(\"Input must be of datatype string\");\n }\n if (numBuckets <= 0) {\n throw new Error(`Number of buckets must be at least 1`);\n }\n const $input = backend2.data.get(input2.dataId).values;\n const output = stringToHashBucketFastImpl($input, numBuckets);\n return backend2.makeTensorInfo(input2.shape, \"int32\", output);\n}\nvar stringToHashBucketFastConfig = {\n kernelName: StringToHashBucketFast,\n backendName: \"cpu\",\n kernelFunc: stringToHashBucketFast2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Tan.js\nvar tan2 = unaryKernelFunc(Tan, (xi) => Math.tan(xi));\nvar tanConfig = {\n kernelName: Tan,\n backendName: \"cpu\",\n kernelFunc: tan2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Tanh.js\nvar tanh3 = unaryKernelFunc(Tanh, (xi) => Math.tanh(xi));\nvar tanhConfig = {\n kernelName: Tanh,\n backendName: \"cpu\",\n kernelFunc: tanh3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Tile.js\nfunction tile3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { reps } = attrs;\n assertNotComplex(x, \"tile\");\n const outBuf = tileImpl(backend2.bufferSync(x), reps);\n return backend2.makeTensorInfo(outBuf.shape, outBuf.dtype, outBuf.values);\n}\nvar tileConfig = {\n kernelName: Tile,\n backendName: \"cpu\",\n kernelFunc: tile3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/TopK.js\nfunction topK(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { k, sorted } = attrs;\n assertNotComplex(x, \"topk\");\n const xVals = backend2.data.get(x.dataId).values;\n const [allTopKVals, allTopKIndices] = topKImpl(xVals, x.shape, x.dtype, k, sorted);\n return [\n backend2.makeTensorInfo(allTopKVals.shape, allTopKVals.dtype, allTopKVals.values),\n backend2.makeTensorInfo(allTopKIndices.shape, allTopKIndices.dtype, allTopKIndices.values)\n ];\n}\nvar topKConfig = {\n kernelName: TopK,\n backendName: \"cpu\",\n kernelFunc: topK\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Transform.js\nfunction transform2(args) {\n const { inputs, attrs, backend: backend2 } = args;\n const { image: image2, transforms } = inputs;\n const { interpolation, fillMode, fillValue, outputShape } = attrs;\n const [batch, imageHeight, imageWidth, numChannels] = image2.shape;\n const [outHeight, outWidth] = outputShape != null ? outputShape : [imageHeight, imageWidth];\n const outShape = [batch, outHeight, outWidth, numChannels];\n const inStrides = util_exports.computeStrides(image2.shape);\n const batchInStride = inStrides[0];\n const rowInStride = inStrides[1];\n const colInStride = inStrides[2];\n const outStrides = util_exports.computeStrides(outShape);\n const batchOutStride = outStrides[0];\n const rowOutStride = outStrides[1];\n const colOutStride = outStrides[2];\n const outVals = util_exports.getTypedArrayFromDType(image2.dtype, util_exports.sizeFromShape(outShape));\n outVals.fill(fillValue);\n const imageVals = backend2.data.get(image2.dataId).values;\n const transformVals = backend2.data.get(transforms.dataId).values;\n for (let b = 0; b < batch; ++b) {\n const transform6 = transforms.shape[0] === 1 ? transformVals : transformVals.subarray(b * 8, b * 8 + 8);\n for (let outY = 0; outY < outHeight; ++outY) {\n for (let outX = 0; outX < outWidth; ++outX) {\n for (let channel = 0; channel < numChannels; ++channel) {\n let val;\n const projection = transform6[6] * outX + transform6[7] * outY + 1;\n if (projection === 0) {\n continue;\n }\n const inX = (transform6[0] * outX + transform6[1] * outY + transform6[2]) / projection;\n const inY = (transform6[3] * outX + transform6[4] * outY + transform6[5]) / projection;\n const x = mapCoord(inX, imageWidth, fillMode);\n const y = mapCoord(inY, imageHeight, fillMode);\n switch (interpolation) {\n case \"nearest\":\n val = nearestInterpolation(imageVals, imageHeight, imageWidth, batchInStride, rowInStride, colInStride, b, y, x, channel, fillValue);\n break;\n case \"bilinear\":\n val = bilinearInterpolation(imageVals, imageHeight, imageWidth, batchInStride, rowInStride, colInStride, b, y, x, channel, fillValue);\n break;\n default:\n throw new Error(`Error in Transform: Expect 'nearest' or 'bilinear', but got ${interpolation}`);\n }\n const ind = b * batchOutStride + outY * rowOutStride + outX * colOutStride + channel;\n outVals[ind] = val;\n }\n }\n }\n return backend2.makeTensorInfo(outShape, image2.dtype, outVals);\n }\n const dataId = backend2.write(outVals, outShape, image2.dtype);\n return { dataId, shape: image2.shape, dtype: image2.dtype };\n}\nvar transformConfig = {\n kernelName: Transform,\n backendName: \"cpu\",\n kernelFunc: transform2\n};\nfunction mapCoord(outCoord, len, mode) {\n switch (mode) {\n case \"reflect\":\n return mapCoordReflect(outCoord, len);\n case \"wrap\":\n return mapCoordWrap(outCoord, len);\n case \"nearest\":\n return mapCoordNearest(outCoord, len);\n case \"constant\":\n default:\n return mapCoordConstant(outCoord, len);\n }\n}\nfunction mapCoordReflect(outCoord, len) {\n let inCoord = outCoord;\n if (inCoord < 0) {\n if (len <= 1) {\n inCoord = 0;\n } else {\n const sz2 = 2 * len;\n if (inCoord < sz2) {\n inCoord = sz2 * Math.trunc(-inCoord / sz2) + inCoord;\n }\n inCoord = inCoord < -len ? inCoord + sz2 : -inCoord - 1;\n }\n } else if (inCoord > len - 1) {\n if (len <= 1) {\n inCoord = 0;\n } else {\n const sz2 = 2 * len;\n inCoord -= sz2 * Math.trunc(inCoord / sz2);\n if (inCoord >= len) {\n inCoord = sz2 - inCoord - 1;\n }\n }\n }\n return util_exports.clamp(0, inCoord, len - 1);\n}\nfunction mapCoordWrap(outCoord, len) {\n let inCoord = outCoord;\n if (inCoord < 0) {\n if (len <= 1) {\n inCoord = 0;\n } else {\n const sz = len - 1;\n inCoord += len * (Math.trunc(-inCoord / sz) + 1);\n }\n } else if (inCoord > len - 1) {\n if (len <= 1) {\n inCoord = 0;\n } else {\n const sz = len - 1;\n inCoord -= len * Math.trunc(inCoord / sz);\n }\n }\n return util_exports.clamp(0, inCoord, len - 1);\n}\nfunction mapCoordConstant(outCoord, len) {\n return outCoord;\n}\nfunction mapCoordNearest(outCoord, len) {\n return util_exports.clamp(0, outCoord, len - 1);\n}\nfunction readWithFillValue(imageVals, imageHeight, imageWidth, batchStride, rowStride, colStride, batch, y, x, channel, fillValue) {\n const ind = batch * batchStride + y * rowStride + x * colStride + channel;\n if (0 <= y && y < imageHeight && 0 <= x && x < imageWidth) {\n return imageVals[ind];\n } else {\n return fillValue;\n }\n}\nfunction nearestInterpolation(imageVals, imageHeight, imageWidth, batchStride, rowStride, colStride, batch, y, x, channel, fillValue) {\n const $y = Math.round(y);\n const $x = Math.round(x);\n return readWithFillValue(imageVals, imageHeight, imageWidth, batchStride, rowStride, colStride, batch, $y, $x, channel, fillValue);\n}\nfunction bilinearInterpolation(imageVals, imageHeight, imageWidth, batchStride, rowStride, colStride, batch, y, x, channel, fillValue) {\n const yFloor = Math.floor(y);\n const xFloor = Math.floor(x);\n const yCeil = yFloor + 1;\n const xCeil = xFloor + 1;\n const valueYFloor = (xCeil - x) * readWithFillValue(imageVals, imageHeight, imageWidth, batchStride, rowStride, colStride, batch, yFloor, xFloor, channel, fillValue) + (x - xFloor) * readWithFillValue(imageVals, imageHeight, imageWidth, batchStride, rowStride, colStride, batch, yFloor, xCeil, channel, fillValue);\n const valueYCeil = (xCeil - x) * readWithFillValue(imageVals, imageHeight, imageWidth, batchStride, rowStride, colStride, batch, yCeil, xFloor, channel, fillValue) + (x - xFloor) * readWithFillValue(imageVals, imageHeight, imageWidth, batchStride, rowStride, colStride, batch, yCeil, xCeil, channel, fillValue);\n return (yCeil - y) * valueYFloor + (y - yFloor) * valueYCeil;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Unique.js\nfunction unique3(args) {\n const { inputs, attrs, backend: backend2 } = args;\n const { axis } = attrs;\n const { x } = inputs;\n assertNotComplex(x, \"unique\");\n const values = backend2.data.get(x.dataId).values;\n const { outputValues, outputShape, indices } = uniqueImpl(values, axis, x.shape, x.dtype);\n return [\n backend2.makeTensorInfo(outputShape, x.dtype, outputValues),\n backend2.makeTensorInfo([indices.length], \"int32\", indices)\n ];\n}\nvar uniqueConfig = {\n kernelName: Unique,\n backendName: \"cpu\",\n kernelFunc: unique3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Unpack.js\nfunction unpack(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { value } = inputs;\n let { axis } = attrs;\n if (axis < 0) {\n axis += value.shape.length;\n }\n const valueRank = value.shape.length;\n const num = value.shape[axis];\n const outShape = new Array(valueRank - 1);\n let outIndex = 0;\n for (let i2 = 0; i2 < valueRank; i2++) {\n if (i2 !== axis) {\n outShape[outIndex++] = value.shape[i2];\n }\n }\n const begin = new Array(valueRank).fill(0);\n const size = value.shape.slice();\n size[axis] = 1;\n const res = new Array(num);\n for (let i2 = 0; i2 < res.length; i2++) {\n begin[axis] = i2;\n const tempRes = slice2({ inputs: { x: value }, backend: backend2, attrs: { begin, size } });\n res[i2] = reshape3({ inputs: { x: tempRes }, backend: backend2, attrs: { shape: outShape } });\n backend2.disposeIntermediateTensorInfo(tempRes);\n }\n return res;\n}\nvar unpackConfig = {\n kernelName: Unpack,\n backendName: \"cpu\",\n kernelFunc: unpack\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/UnsortedSegmentSum.js\nfunction unsortedSegmentSum2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, segmentIds } = inputs;\n const { numSegments } = attrs;\n assertNotComplex(x, \"unsortedSegmentSum\");\n const xRank = x.shape.length;\n const segmentIdsRank = segmentIds.shape.length;\n const res = [];\n const intermediates = [];\n const numIters = xRank - segmentIdsRank;\n let $segmentIds = segmentIds;\n for (let i2 = 0; i2 < numIters; ++i2) {\n const expanded = expandDims3({ inputs: { input: $segmentIds }, backend: backend2, attrs: { dim: i2 + 1 } });\n $segmentIds = expanded;\n intermediates.push(expanded);\n }\n for (let i2 = 0; i2 < numSegments; ++i2) {\n const scalarValue = util_exports.createScalarValue(i2, \"int32\");\n const segmentId = backend2.makeTensorInfo([], \"int32\", scalarValue);\n const mask = equal2({ inputs: { a: segmentId, b: $segmentIds }, backend: backend2 });\n const maskCasted = cast3({ inputs: { x: mask }, backend: backend2, attrs: { dtype: \"float32\" } });\n const mul2 = multiply2({ inputs: { a: maskCasted, b: x }, backend: backend2 });\n const sumTensorInfo = sum3({ inputs: { x: mul2 }, backend: backend2, attrs: { axis: 0, keepDims: false } });\n res.push(sumTensorInfo);\n intermediates.push(segmentId);\n intermediates.push(mask);\n intermediates.push(maskCasted);\n intermediates.push(mul2);\n intermediates.push(sumTensorInfo);\n }\n const result = pack({ inputs: res, backend: backend2, attrs: { axis: 0 } });\n intermediates.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2));\n return result;\n}\nvar unsortedSegmentSumConfig = {\n kernelName: UnsortedSegmentSum,\n backendName: \"cpu\",\n kernelFunc: unsortedSegmentSum2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/register_all_kernels.js\nvar kernelConfigs = [\n _fusedMatMulConfig,\n absConfig,\n acosConfig,\n acoshConfig,\n addConfig,\n addNConfig,\n allConfig,\n anyConfig,\n argMaxConfig,\n argMinConfig,\n asinConfig,\n asinhConfig,\n atanConfig,\n atan2Config,\n atanhConfig,\n avgPoolConfig,\n avgPool3DConfig,\n avgPool3DGradConfig2,\n avgPoolGradConfig2,\n batchMatMulConfig,\n batchNormConfig,\n batchToSpaceNDConfig,\n bincountConfig,\n broadcastArgsConfig,\n castConfig,\n ceilConfig,\n clipByValueConfig,\n complexConfig,\n complexAbsConfig,\n concatConfig,\n conv2DConfig,\n conv2DBackpropFilterConfig,\n conv2DBackpropInputConfig,\n conv3DConfig,\n conv3DBackpropFilterV2Config,\n conv3DBackpropInputV2Config,\n cosConfig,\n coshConfig,\n cropAndResizeConfig,\n cumprodConfig,\n cumsumConfig,\n denseBincountConfig,\n depthToSpaceConfig,\n depthwiseConv2dNativeConfig,\n depthwiseConv2dNativeBackpropFilterConfig,\n depthwiseConv2dNativeBackpropInputConfig,\n diagConfig,\n dilation2DConfig,\n dilation2DBackpropFilterConfig,\n dilation2DBackpropInputConfig,\n einsumConfig,\n eluConfig,\n eluGradConfig2,\n equalConfig,\n erfConfig,\n expConfig,\n expandDimsConfig,\n expm1Config,\n fftConfig,\n fillConfig,\n flipLeftRightConfig,\n floorConfig,\n floorDivConfig,\n fusedConv2DConfig,\n fusedDepthwiseConv2DConfig,\n gatherNdConfig,\n gatherV2Config,\n greaterConfig,\n greaterEqualConfig,\n identityConfig,\n ifftConfig,\n imagConfig,\n isFiniteConfig,\n isInfConfig,\n isNaNConfig,\n leakyReluConfig,\n lessConfig,\n lessEqualConfig,\n linSpaceConfig,\n logConfig,\n log1pConfig,\n logicalAndConfig,\n logicalNotConfig,\n logicalOrConfig,\n LRNConfig,\n LRNGradConfig,\n maxConfig,\n maximumConfig,\n maxPoolConfig,\n maxPool3DConfig,\n maxPool3DGradConfig2,\n maxPoolGradConfig2,\n maxPoolWithArgmaxConfig,\n meanConfig,\n minConfig,\n minimumConfig,\n mirrorPadConfig,\n modConfig,\n multinomialConfig,\n multiplyConfig,\n negConfig,\n nonMaxSuppressionV3Config,\n nonMaxSuppressionV4Config,\n nonMaxSuppressionV5Config,\n notEqualConfig,\n oneHotConfig,\n onesLikeConfig,\n packConfig,\n padV2Config,\n powConfig,\n preluConfig,\n prodConfig,\n raggedGatherConfig,\n raggedTensorToTensorConfig,\n rangeConfig,\n realConfig,\n realDivConfig,\n reciprocalConfig,\n reluConfig,\n relu6Config,\n reshapeConfig,\n resizeBilinearConfig,\n resizeBilinearGradConfig2,\n resizeNearestNeighborConfig,\n resizeNearestNeighborGradConfig2,\n reverseConfig,\n rotateWithOffsetConfig,\n roundConfig,\n rsqrtConfig,\n scatterNdConfig,\n searchSortedConfig,\n selectConfig,\n seluConfig,\n sigmoidConfig,\n signConfig,\n sinConfig,\n sinhConfig,\n sliceConfig,\n softmaxConfig,\n softplusConfig,\n spaceToBatchNDConfig,\n sparseFillEmptyRowsConfig,\n sparseReshapeConfig,\n sparseSegmentMeanConfig,\n sparseSegmentSumConfig,\n sparseToDenseConfig,\n splitVConfig,\n sqrtConfig,\n squareConfig,\n squaredDifferenceConfig,\n stepConfig,\n stridedSliceConfig,\n stringNGramsConfig,\n stringSplitConfig,\n stringToHashBucketFastConfig,\n subConfig,\n sumConfig,\n tanConfig,\n tanhConfig,\n tileConfig,\n topKConfig,\n transformConfig,\n transposeConfig,\n uniqueConfig,\n unpackConfig,\n unsortedSegmentSumConfig,\n zerosLikeConfig\n];\nfor (const kernelConfig of kernelConfigs) {\n registerKernel(kernelConfig);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/webgl_util.js\nvar webgl_util_exports = {};\n__export(webgl_util_exports, {\n assertNotComplex: () => assertNotComplex2,\n bindCanvasToFramebuffer: () => bindCanvasToFramebuffer,\n bindColorTextureToFramebuffer: () => bindColorTextureToFramebuffer,\n bindTextureToProgramUniformSampler: () => bindTextureToProgramUniformSampler,\n bindTextureUnit: () => bindTextureUnit,\n bindVertexBufferToProgramAttribute: () => bindVertexBufferToProgramAttribute,\n callAndCheck: () => callAndCheck,\n canBeRepresented: () => canBeRepresented,\n createFragmentShader: () => createFragmentShader,\n createFramebuffer: () => createFramebuffer,\n createProgram: () => createProgram,\n createStaticIndexBuffer: () => createStaticIndexBuffer,\n createStaticVertexBuffer: () => createStaticVertexBuffer,\n createTexture: () => createTexture,\n createVertexShader: () => createVertexShader,\n getBatchDim: () => getBatchDim,\n getExtensionOrThrow: () => getExtensionOrThrow,\n getFramebufferErrorMessage: () => getFramebufferErrorMessage,\n getMaxTexturesInShader: () => getMaxTexturesInShader,\n getNumChannels: () => getNumChannels,\n getProgramUniformLocation: () => getProgramUniformLocation,\n getProgramUniformLocationOrThrow: () => getProgramUniformLocationOrThrow,\n getRowsCols: () => getRowsCols,\n getShapeAs3D: () => getShapeAs3D,\n getTextureShapeFromLogicalShape: () => getTextureShapeFromLogicalShape,\n getWebGLDisjointQueryTimerVersion: () => getWebGLDisjointQueryTimerVersion,\n getWebGLErrorMessage: () => getWebGLErrorMessage,\n getWebGLMaxTextureSize: () => getWebGLMaxTextureSize,\n hasExtension: () => hasExtension,\n isCapableOfRenderingToFloatTexture: () => isCapableOfRenderingToFloatTexture,\n isDownloadFloatTextureEnabled: () => isDownloadFloatTextureEnabled,\n isReshapeFree: () => isReshapeFree,\n isWebGLFenceEnabled: () => isWebGLFenceEnabled,\n isWebGLVersionEnabled: () => isWebGLVersionEnabled,\n linkProgram: () => linkProgram,\n logShaderSourceAndInfoLog: () => logShaderSourceAndInfoLog,\n resetMaxTextureSize: () => resetMaxTextureSize,\n resetMaxTexturesInShader: () => resetMaxTexturesInShader,\n unbindColorTextureFromFramebuffer: () => unbindColorTextureFromFramebuffer,\n unbindTextureUnit: () => unbindTextureUnit,\n validateFramebuffer: () => validateFramebuffer,\n validateProgram: () => validateProgram,\n validateTextureSize: () => validateTextureSize\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/canvas_util.js\nvar contexts = {};\nvar WEBGL_ATTRIBUTES = {\n alpha: false,\n antialias: false,\n premultipliedAlpha: false,\n preserveDrawingBuffer: false,\n depth: false,\n stencil: false,\n failIfMajorPerformanceCaveat: true\n};\nfunction setWebGLContext(webGLVersion, gl) {\n contexts[webGLVersion] = gl;\n}\nfunction getWebGLContext(webGLVersion, customCanvas) {\n if (!(webGLVersion in contexts) || customCanvas != null) {\n const newCtx = getWebGLRenderingContext(webGLVersion, customCanvas);\n if (newCtx !== null) {\n contexts[webGLVersion] = newCtx;\n } else {\n console.log(\"Could not get context for WebGL version\", webGLVersion);\n return null;\n }\n }\n const gl = contexts[webGLVersion];\n if (gl == null || gl.isContextLost()) {\n delete contexts[webGLVersion];\n return getWebGLContext(webGLVersion);\n }\n gl.disable(gl.DEPTH_TEST);\n gl.disable(gl.STENCIL_TEST);\n gl.disable(gl.BLEND);\n gl.disable(gl.DITHER);\n gl.disable(gl.POLYGON_OFFSET_FILL);\n gl.disable(gl.SAMPLE_COVERAGE);\n gl.enable(gl.SCISSOR_TEST);\n gl.enable(gl.CULL_FACE);\n gl.cullFace(gl.BACK);\n return contexts[webGLVersion];\n}\nfunction createCanvas(webGLVersion) {\n if (typeof OffscreenCanvas !== \"undefined\" && webGLVersion === 2) {\n return new OffscreenCanvas(300, 150);\n } else if (typeof document !== \"undefined\") {\n return document.createElement(\"canvas\");\n } else {\n throw new Error(\"Cannot create a canvas in this context\");\n }\n}\nfunction getWebGLRenderingContext(webGLVersion, customCanvas) {\n if (webGLVersion !== 1 && webGLVersion !== 2) {\n throw new Error(\"Cannot get WebGL rendering context, WebGL is disabled.\");\n }\n const canvas = customCanvas == null ? createCanvas(webGLVersion) : customCanvas;\n canvas.addEventListener(\"webglcontextlost\", (ev) => {\n ev.preventDefault();\n delete contexts[webGLVersion];\n }, false);\n if (env().getBool(\"SOFTWARE_WEBGL_ENABLED\")) {\n WEBGL_ATTRIBUTES.failIfMajorPerformanceCaveat = false;\n }\n if (webGLVersion === 1) {\n return canvas.getContext(\"webgl\", WEBGL_ATTRIBUTES) || canvas.getContext(\"experimental-webgl\", WEBGL_ATTRIBUTES);\n }\n return canvas.getContext(\"webgl2\", WEBGL_ATTRIBUTES);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/tex_util.js\nvar PackingScheme;\n(function(PackingScheme2) {\n PackingScheme2[PackingScheme2[\"DENSE\"] = 0] = \"DENSE\";\n PackingScheme2[PackingScheme2[\"SHARED_BATCH\"] = 1] = \"SHARED_BATCH\";\n})(PackingScheme || (PackingScheme = {}));\nvar TextureUsage;\n(function(TextureUsage2) {\n TextureUsage2[TextureUsage2[\"RENDER\"] = 0] = \"RENDER\";\n TextureUsage2[TextureUsage2[\"UPLOAD\"] = 1] = \"UPLOAD\";\n TextureUsage2[TextureUsage2[\"PIXELS\"] = 2] = \"PIXELS\";\n TextureUsage2[TextureUsage2[\"DOWNLOAD\"] = 3] = \"DOWNLOAD\";\n})(TextureUsage || (TextureUsage = {}));\nvar PhysicalTextureType;\n(function(PhysicalTextureType2) {\n PhysicalTextureType2[PhysicalTextureType2[\"UNPACKED_FLOAT16\"] = 0] = \"UNPACKED_FLOAT16\";\n PhysicalTextureType2[PhysicalTextureType2[\"UNPACKED_FLOAT32\"] = 1] = \"UNPACKED_FLOAT32\";\n PhysicalTextureType2[PhysicalTextureType2[\"PACKED_4X1_UNSIGNED_BYTE\"] = 2] = \"PACKED_4X1_UNSIGNED_BYTE\";\n PhysicalTextureType2[PhysicalTextureType2[\"PACKED_2X2_FLOAT32\"] = 3] = \"PACKED_2X2_FLOAT32\";\n PhysicalTextureType2[PhysicalTextureType2[\"PACKED_2X2_FLOAT16\"] = 4] = \"PACKED_2X2_FLOAT16\";\n})(PhysicalTextureType || (PhysicalTextureType = {}));\nfunction getUnpackedMatrixTextureShapeWidthHeight(rows, columns) {\n return [columns, rows];\n}\nfunction getUnpackedArraySizeFromMatrixSize(matrixSize, channelsPerTexture) {\n return matrixSize * channelsPerTexture;\n}\nfunction getDenseTexShape(shape) {\n const size = util_exports.sizeFromShape(shape);\n const texelsNeeded = Math.ceil(size / 4);\n return util_exports.sizeToSquarishShape(texelsNeeded);\n}\nfunction getPackedMatrixTextureShapeWidthHeight(rows, columns) {\n return [\n Math.max(1, Math.ceil(columns / 2)),\n Math.max(1, Math.ceil(rows / 2))\n ];\n}\nfunction getPackedRGBAArraySizeFromMatrixShape(rows, columns) {\n const [w, h] = getPackedMatrixTextureShapeWidthHeight(rows, columns);\n return w * h * 4;\n}\nfunction getTextureConfig(gl, textureHalfFloatExtension) {\n const glany = gl;\n let internalFormatFloat;\n let internalFormatHalfFloat;\n let internalFormatPackedHalfFloat;\n let internalFormatPackedFloat;\n let textureFormatFloat;\n let downloadTextureFormat;\n let downloadUnpackNumChannels;\n let defaultNumChannels;\n let textureTypeHalfFloat;\n let textureTypeFloat;\n if (env().getNumber(\"WEBGL_VERSION\") === 2) {\n internalFormatFloat = glany.R32F;\n internalFormatHalfFloat = glany.R16F;\n internalFormatPackedHalfFloat = glany.RGBA16F;\n internalFormatPackedFloat = glany.RGBA32F;\n textureFormatFloat = glany.RED;\n downloadUnpackNumChannels = 4;\n defaultNumChannels = 1;\n textureTypeHalfFloat = glany.HALF_FLOAT;\n textureTypeFloat = glany.FLOAT;\n downloadTextureFormat = glany.RGBA8;\n } else {\n internalFormatFloat = gl.RGBA;\n internalFormatHalfFloat = gl.RGBA;\n internalFormatPackedHalfFloat = gl.RGBA;\n internalFormatPackedFloat = glany.RGBA;\n textureFormatFloat = gl.RGBA;\n downloadUnpackNumChannels = 4;\n defaultNumChannels = 4;\n textureTypeHalfFloat = textureHalfFloatExtension != null ? textureHalfFloatExtension.HALF_FLOAT_OES : null;\n textureTypeFloat = gl.FLOAT;\n downloadTextureFormat = gl.RGBA;\n }\n return {\n internalFormatFloat,\n internalFormatHalfFloat,\n internalFormatPackedHalfFloat,\n internalFormatPackedFloat,\n textureFormatFloat,\n downloadTextureFormat,\n downloadUnpackNumChannels,\n defaultNumChannels,\n textureTypeHalfFloat,\n textureTypeFloat\n };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/webgl_util.js\nfunction callAndCheck(gl, func2) {\n const returnValue = func2();\n if (env().getBool(\"DEBUG\")) {\n checkWebGLError(gl);\n }\n return returnValue;\n}\nfunction checkWebGLError(gl) {\n const error = gl.getError();\n if (error !== gl.NO_ERROR) {\n throw new Error(\"WebGL Error: \" + getWebGLErrorMessage(gl, error));\n }\n}\nvar MIN_FLOAT16 = 596e-10;\nvar MAX_FLOAT16 = 65504;\nfunction canBeRepresented(num) {\n if (env().getBool(\"WEBGL_RENDER_FLOAT32_ENABLED\") || num === 0 || MIN_FLOAT16 < Math.abs(num) && Math.abs(num) < MAX_FLOAT16) {\n return true;\n }\n return false;\n}\nfunction getWebGLErrorMessage(gl, status) {\n switch (status) {\n case gl.NO_ERROR:\n return \"NO_ERROR\";\n case gl.INVALID_ENUM:\n return \"INVALID_ENUM\";\n case gl.INVALID_VALUE:\n return \"INVALID_VALUE\";\n case gl.INVALID_OPERATION:\n return \"INVALID_OPERATION\";\n case gl.INVALID_FRAMEBUFFER_OPERATION:\n return \"INVALID_FRAMEBUFFER_OPERATION\";\n case gl.OUT_OF_MEMORY:\n return \"OUT_OF_MEMORY\";\n case gl.CONTEXT_LOST_WEBGL:\n return \"CONTEXT_LOST_WEBGL\";\n default:\n return `Unknown error code ${status}`;\n }\n}\nfunction getExtensionOrThrow(gl, extensionName) {\n return throwIfNull(gl, () => gl.getExtension(extensionName), 'Extension \"' + extensionName + '\" not supported on this browser.');\n}\nfunction createVertexShader(gl, vertexShaderSource) {\n const vertexShader = throwIfNull(gl, () => gl.createShader(gl.VERTEX_SHADER), \"Unable to create vertex WebGLShader.\");\n callAndCheck(gl, () => gl.shaderSource(vertexShader, vertexShaderSource));\n callAndCheck(gl, () => gl.compileShader(vertexShader));\n if (gl.getShaderParameter(vertexShader, gl.COMPILE_STATUS) === false) {\n console.log(gl.getShaderInfoLog(vertexShader));\n throw new Error(\"Failed to compile vertex shader.\");\n }\n return vertexShader;\n}\nfunction createFragmentShader(gl, fragmentShaderSource) {\n const fragmentShader = throwIfNull(gl, () => gl.createShader(gl.FRAGMENT_SHADER), \"Unable to create fragment WebGLShader.\");\n callAndCheck(gl, () => gl.shaderSource(fragmentShader, fragmentShaderSource));\n callAndCheck(gl, () => gl.compileShader(fragmentShader));\n if (env().get(\"ENGINE_COMPILE_ONLY\")) {\n return fragmentShader;\n }\n if (gl.getShaderParameter(fragmentShader, gl.COMPILE_STATUS) === false) {\n logShaderSourceAndInfoLog(fragmentShaderSource, gl.getShaderInfoLog(fragmentShader));\n throw new Error(\"Failed to compile fragment shader.\");\n }\n return fragmentShader;\n}\nvar lineNumberRegex = /ERROR: [0-9]+:([0-9]+):/g;\nfunction logShaderSourceAndInfoLog(shaderSource, shaderInfoLog) {\n const lineNumberRegexResult = lineNumberRegex.exec(shaderInfoLog);\n if (lineNumberRegexResult == null) {\n console.log(`Couldn't parse line number in error: ${shaderInfoLog}`);\n console.log(shaderSource);\n return;\n }\n const lineNumber = +lineNumberRegexResult[1];\n const shaderLines = shaderSource.split(\"\\n\");\n const pad3 = shaderLines.length.toString().length + 2;\n const linesWithLineNumbers = shaderLines.map((line, lineNumber2) => util_exports.rightPad((lineNumber2 + 1).toString(), pad3) + line);\n let maxLineLength = 0;\n for (let i2 = 0; i2 < linesWithLineNumbers.length; i2++) {\n maxLineLength = Math.max(linesWithLineNumbers[i2].length, maxLineLength);\n }\n const beforeErrorLines = linesWithLineNumbers.slice(0, lineNumber - 1);\n const errorLine = linesWithLineNumbers.slice(lineNumber - 1, lineNumber);\n const afterErrorLines = linesWithLineNumbers.slice(lineNumber);\n console.log(beforeErrorLines.join(\"\\n\"));\n console.log(shaderInfoLog.split(\"\\n\")[0]);\n console.log(`%c ${util_exports.rightPad(errorLine[0], maxLineLength)}`, \"border:1px solid red; background-color:#e3d2d2; color:#a61717\");\n console.log(afterErrorLines.join(\"\\n\"));\n}\nfunction createProgram(gl) {\n return throwIfNull(gl, () => gl.createProgram(), \"Unable to create WebGLProgram.\");\n}\nfunction linkProgram(gl, program) {\n callAndCheck(gl, () => gl.linkProgram(program));\n if (env().get(\"ENGINE_COMPILE_ONLY\")) {\n return;\n }\n if (gl.getProgramParameter(program, gl.LINK_STATUS) === false) {\n console.log(gl.getProgramInfoLog(program));\n throw new Error(\"Failed to link vertex and fragment shaders.\");\n }\n}\nfunction validateProgram(gl, program) {\n callAndCheck(gl, () => gl.validateProgram(program));\n if (gl.getProgramParameter(program, gl.VALIDATE_STATUS) === false) {\n console.log(gl.getProgramInfoLog(program));\n throw new Error(\"Shader program validation failed.\");\n }\n}\nfunction createStaticVertexBuffer(gl, data) {\n const buffer2 = throwIfNull(gl, () => gl.createBuffer(), \"Unable to create WebGLBuffer\");\n callAndCheck(gl, () => gl.bindBuffer(gl.ARRAY_BUFFER, buffer2));\n callAndCheck(gl, () => gl.bufferData(gl.ARRAY_BUFFER, data, gl.STATIC_DRAW));\n return buffer2;\n}\nfunction createStaticIndexBuffer(gl, data) {\n const buffer2 = throwIfNull(gl, () => gl.createBuffer(), \"Unable to create WebGLBuffer\");\n callAndCheck(gl, () => gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, buffer2));\n callAndCheck(gl, () => gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, data, gl.STATIC_DRAW));\n return buffer2;\n}\nfunction getNumChannels() {\n if (env().getNumber(\"WEBGL_VERSION\") === 2) {\n return 1;\n }\n return 4;\n}\nfunction createTexture(gl) {\n return throwIfNull(gl, () => gl.createTexture(), \"Unable to create WebGLTexture.\");\n}\nfunction validateTextureSize(width, height) {\n const maxTextureSize = env().getNumber(\"WEBGL_MAX_TEXTURE_SIZE\");\n if (width <= 0 || height <= 0) {\n const requested = `[${width}x${height}]`;\n throw new Error(\"Requested texture size \" + requested + \" is invalid.\");\n }\n if (width > maxTextureSize || height > maxTextureSize) {\n const requested = `[${width}x${height}]`;\n const max7 = `[${maxTextureSize}x${maxTextureSize}]`;\n throw new Error(\"Requested texture size \" + requested + \" greater than WebGL maximum on this browser / GPU \" + max7 + \".\");\n }\n}\nfunction createFramebuffer(gl) {\n return throwIfNull(gl, () => gl.createFramebuffer(), \"Unable to create WebGLFramebuffer.\");\n}\nfunction bindVertexBufferToProgramAttribute(gl, program, attribute, buffer2, arrayEntriesPerItem, itemStrideInBytes, itemOffsetInBytes) {\n const loc = gl.getAttribLocation(program, attribute);\n if (loc === -1) {\n return false;\n }\n callAndCheck(gl, () => gl.bindBuffer(gl.ARRAY_BUFFER, buffer2));\n callAndCheck(gl, () => gl.vertexAttribPointer(loc, arrayEntriesPerItem, gl.FLOAT, false, itemStrideInBytes, itemOffsetInBytes));\n callAndCheck(gl, () => gl.enableVertexAttribArray(loc));\n return true;\n}\nfunction bindTextureUnit(gl, texture, textureUnit) {\n validateTextureUnit(gl, textureUnit);\n callAndCheck(gl, () => gl.activeTexture(gl.TEXTURE0 + textureUnit));\n callAndCheck(gl, () => gl.bindTexture(gl.TEXTURE_2D, texture));\n}\nfunction unbindTextureUnit(gl, textureUnit) {\n validateTextureUnit(gl, textureUnit);\n callAndCheck(gl, () => gl.activeTexture(gl.TEXTURE0 + textureUnit));\n callAndCheck(gl, () => gl.bindTexture(gl.TEXTURE_2D, null));\n}\nfunction getProgramUniformLocationOrThrow(gl, program, uniformName) {\n return throwIfNull(gl, () => gl.getUniformLocation(program, uniformName), 'uniform \"' + uniformName + '\" not present in program.');\n}\nfunction getProgramUniformLocation(gl, program, uniformName) {\n return gl.getUniformLocation(program, uniformName);\n}\nfunction bindTextureToProgramUniformSampler(gl, texture, uniformSamplerLocation, textureUnit) {\n callAndCheck(gl, () => bindTextureUnit(gl, texture, textureUnit));\n callAndCheck(gl, () => gl.uniform1i(uniformSamplerLocation, textureUnit));\n}\nfunction bindCanvasToFramebuffer(gl) {\n callAndCheck(gl, () => gl.bindFramebuffer(gl.FRAMEBUFFER, null));\n callAndCheck(gl, () => gl.viewport(0, 0, gl.canvas.width, gl.canvas.height));\n callAndCheck(gl, () => gl.scissor(0, 0, gl.canvas.width, gl.canvas.height));\n}\nfunction bindColorTextureToFramebuffer(gl, texture, framebuffer) {\n callAndCheck(gl, () => gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer));\n callAndCheck(gl, () => gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0));\n}\nfunction unbindColorTextureFromFramebuffer(gl, framebuffer) {\n callAndCheck(gl, () => gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer));\n callAndCheck(gl, () => gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0));\n}\nfunction validateFramebuffer(gl) {\n const status = gl.checkFramebufferStatus(gl.FRAMEBUFFER);\n if (status !== gl.FRAMEBUFFER_COMPLETE) {\n throw new Error(\"Error binding framebuffer: \" + getFramebufferErrorMessage(gl, status));\n }\n}\nfunction getFramebufferErrorMessage(gl, status) {\n switch (status) {\n case gl.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:\n return \"FRAMEBUFFER_INCOMPLETE_ATTACHMENT\";\n case gl.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:\n return \"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT\";\n case gl.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:\n return \"FRAMEBUFFER_INCOMPLETE_DIMENSIONS\";\n case gl.FRAMEBUFFER_UNSUPPORTED:\n return \"FRAMEBUFFER_UNSUPPORTED\";\n default:\n return `unknown error ${status}`;\n }\n}\nfunction throwIfNull(gl, returnTOrNull, failureMessage) {\n const tOrNull = callAndCheck(gl, () => returnTOrNull());\n if (tOrNull == null) {\n throw new Error(failureMessage);\n }\n return tOrNull;\n}\nfunction validateTextureUnit(gl, textureUnit) {\n const maxTextureUnit = gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS - 1;\n const glTextureUnit = textureUnit + gl.TEXTURE0;\n if (glTextureUnit < gl.TEXTURE0 || glTextureUnit > maxTextureUnit) {\n const textureUnitRange = `[gl.TEXTURE0, gl.TEXTURE${maxTextureUnit}]`;\n throw new Error(`textureUnit must be in ${textureUnitRange}.`);\n }\n}\nfunction getBatchDim(shape, dimsToSkip = 2) {\n return util_exports.sizeFromShape(shape.slice(0, shape.length - dimsToSkip));\n}\nfunction getRowsCols(shape) {\n if (shape.length === 0) {\n throw Error(\"Cannot get rows and columns of an empty shape array.\");\n }\n return [\n shape.length > 1 ? shape[shape.length - 2] : 1,\n shape[shape.length - 1]\n ];\n}\nfunction getShapeAs3D(shape) {\n let shapeAs3D = [1, 1, 1];\n const isScalar = shape.length === 0 || shape.length === 1 && shape[0] === 1;\n if (!isScalar) {\n shapeAs3D = [getBatchDim(shape), ...getRowsCols(shape)];\n }\n return shapeAs3D;\n}\nfunction getTextureShapeFromLogicalShape(logShape, isPacked = false) {\n let maxTexSize = env().getNumber(\"WEBGL_MAX_TEXTURE_SIZE\");\n let maxSizeForNarrowTex = env().getNumber(\"WEBGL_MAX_SIZE_FOR_NARROW_TEXTURE\");\n if (maxSizeForNarrowTex === Infinity && env().getBool(\"WEBGL_AUTO_SQUARIFY_NARROW_TEXTURE_SHAPE\")) {\n maxSizeForNarrowTex = maxTexSize / 2;\n }\n if (isPacked) {\n maxTexSize = maxTexSize * 2;\n maxSizeForNarrowTex = maxSizeForNarrowTex * 2;\n logShape = logShape.map((d, i2) => i2 >= logShape.length - 2 ? util_exports.nearestLargerEven(logShape[i2]) : logShape[i2]);\n if (logShape.length === 1) {\n logShape = [2, logShape[0]];\n }\n }\n if (logShape.length !== 2) {\n const squeezeResult = util_exports.squeezeShape(logShape);\n logShape = squeezeResult.newShape;\n }\n let size = util_exports.sizeFromShape(logShape);\n let textureShape = null;\n if (logShape.length <= 1 && size <= maxTexSize) {\n textureShape = [1, size];\n } else if (logShape.length === 2 && logShape[0] <= maxTexSize && logShape[1] <= maxTexSize) {\n textureShape = logShape;\n } else if (logShape.length === 3 && logShape[0] * logShape[1] <= maxTexSize && logShape[2] <= maxTexSize) {\n textureShape = [logShape[0] * logShape[1], logShape[2]];\n } else if (logShape.length === 3 && logShape[0] <= maxTexSize && logShape[1] * logShape[2] <= maxTexSize) {\n textureShape = [logShape[0], logShape[1] * logShape[2]];\n } else if (logShape.length === 4 && logShape[0] * logShape[1] * logShape[2] <= maxTexSize && logShape[3] <= maxTexSize) {\n textureShape = [logShape[0] * logShape[1] * logShape[2], logShape[3]];\n } else if (logShape.length === 4 && logShape[0] <= maxTexSize && logShape[1] * logShape[2] * logShape[3] <= maxTexSize) {\n textureShape = [logShape[0], logShape[1] * logShape[2] * logShape[3]];\n }\n const isLongNarrowTex = textureShape != null && Math.max(...textureShape) > maxSizeForNarrowTex && Math.min(...textureShape) <= (isPacked ? 2 : 1) && Math.min(...textureShape) > 0;\n if (textureShape == null || isLongNarrowTex) {\n if (isPacked) {\n const batchDim = getBatchDim(logShape);\n let rows = 2, cols = 2;\n if (logShape.length) {\n [rows, cols] = getRowsCols(logShape);\n }\n size = batchDim * (rows / 2) * (cols / 2);\n textureShape = util_exports.sizeToSquarishShape(size).map((d) => d * 2);\n } else {\n textureShape = util_exports.sizeToSquarishShape(size);\n }\n }\n return textureShape;\n}\nfunction isEven(n2) {\n return n2 % 2 === 0;\n}\nfunction isReshapeFree(shape1, shape2) {\n shape1 = shape1.slice(-2);\n shape2 = shape2.slice(-2);\n if (util_exports.arraysEqual(shape1, shape2)) {\n return true;\n }\n if (!shape1.length || !shape2.length) {\n return true;\n }\n if (shape1[0] === 0 || shape1[1] === 0 || shape2[0] === 0 || shape2[1] === 0) {\n return true;\n }\n if (shape1.length !== shape2.length) {\n const shape1Cols = shape1.slice(-1)[0];\n const shape2Cols = shape2.slice(-1)[0];\n if (shape1Cols === shape2Cols) {\n return true;\n }\n if (isEven(shape1Cols) && isEven(shape2Cols) && (shape1[0] === 1 || shape2[0] === 1)) {\n return true;\n }\n }\n return shape1[1] === shape2[1] && isEven(shape1[0]) && isEven(shape2[0]);\n}\nvar MAX_TEXTURE_SIZE;\nvar MAX_TEXTURES_IN_SHADER;\nfunction getWebGLMaxTextureSize(webGLVersion) {\n if (MAX_TEXTURE_SIZE == null) {\n const gl = getWebGLContext(webGLVersion);\n MAX_TEXTURE_SIZE = gl.getParameter(gl.MAX_TEXTURE_SIZE);\n }\n return MAX_TEXTURE_SIZE;\n}\nfunction resetMaxTextureSize() {\n MAX_TEXTURE_SIZE = null;\n}\nfunction resetMaxTexturesInShader() {\n MAX_TEXTURES_IN_SHADER = null;\n}\nfunction getMaxTexturesInShader(webGLVersion) {\n if (MAX_TEXTURES_IN_SHADER == null) {\n const gl = getWebGLContext(webGLVersion);\n MAX_TEXTURES_IN_SHADER = gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS);\n }\n return Math.min(16, MAX_TEXTURES_IN_SHADER);\n}\nfunction getWebGLDisjointQueryTimerVersion(webGLVersion) {\n if (webGLVersion === 0) {\n return 0;\n }\n let queryTimerVersion;\n const gl = getWebGLContext(webGLVersion);\n if (hasExtension(gl, \"EXT_disjoint_timer_query_webgl2\") && webGLVersion === 2) {\n queryTimerVersion = 2;\n } else if (hasExtension(gl, \"EXT_disjoint_timer_query\")) {\n queryTimerVersion = 1;\n } else {\n queryTimerVersion = 0;\n }\n return queryTimerVersion;\n}\nfunction hasExtension(gl, extensionName) {\n const ext = gl.getExtension(extensionName);\n return ext != null;\n}\nfunction isWebGLVersionEnabled(webGLVersion) {\n try {\n const gl = getWebGLContext(webGLVersion);\n if (gl != null) {\n return true;\n }\n } catch (e2) {\n console.log(\"Error when getting WebGL context: \", e2);\n return false;\n }\n return false;\n}\nfunction isCapableOfRenderingToFloatTexture(webGLVersion) {\n if (webGLVersion === 0) {\n return false;\n }\n const gl = getWebGLContext(webGLVersion);\n if (webGLVersion === 1) {\n if (!hasExtension(gl, \"OES_texture_float\")) {\n return false;\n }\n } else {\n if (!hasExtension(gl, \"EXT_color_buffer_float\")) {\n return false;\n }\n }\n const isFrameBufferComplete = createFloatTextureAndBindToFramebuffer(gl);\n return isFrameBufferComplete;\n}\nfunction isDownloadFloatTextureEnabled(webGLVersion) {\n if (webGLVersion === 0) {\n return false;\n }\n const gl = getWebGLContext(webGLVersion);\n if (webGLVersion === 1) {\n if (!hasExtension(gl, \"OES_texture_float\")) {\n return false;\n }\n if (!hasExtension(gl, \"WEBGL_color_buffer_float\")) {\n return false;\n }\n } else {\n if (hasExtension(gl, \"EXT_color_buffer_float\")) {\n return createFloatTextureAndBindToFramebuffer(gl);\n }\n const COLOR_BUFFER_HALF_FLOAT = \"EXT_color_buffer_half_float\";\n if (hasExtension(gl, COLOR_BUFFER_HALF_FLOAT)) {\n const textureHalfFloatExtension = gl.getExtension(COLOR_BUFFER_HALF_FLOAT);\n return createHalfFloatTextureAndBindToFramebuffer(gl, textureHalfFloatExtension);\n }\n return false;\n }\n const isFrameBufferComplete = createFloatTextureAndBindToFramebuffer(gl);\n return isFrameBufferComplete;\n}\nfunction createFloatTextureAndBindToFramebuffer(gl) {\n const texConfig = getTextureConfig(gl);\n const texture = gl.createTexture();\n gl.bindTexture(gl.TEXTURE_2D, texture);\n const width = 1;\n const height = 1;\n gl.texImage2D(gl.TEXTURE_2D, 0, texConfig.internalFormatFloat, width, height, 0, texConfig.textureFormatFloat, texConfig.textureTypeFloat, null);\n const frameBuffer = gl.createFramebuffer();\n gl.bindFramebuffer(gl.FRAMEBUFFER, frameBuffer);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);\n const isFrameBufferComplete = gl.checkFramebufferStatus(gl.FRAMEBUFFER) === gl.FRAMEBUFFER_COMPLETE;\n gl.bindTexture(gl.TEXTURE_2D, null);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteTexture(texture);\n gl.deleteFramebuffer(frameBuffer);\n return isFrameBufferComplete;\n}\nfunction createHalfFloatTextureAndBindToFramebuffer(gl, textureHalfFloatExtension) {\n const texConfig = getTextureConfig(gl, textureHalfFloatExtension);\n const texture = gl.createTexture();\n gl.bindTexture(gl.TEXTURE_2D, texture);\n const width = 1;\n const height = 1;\n gl.texImage2D(gl.TEXTURE_2D, 0, texConfig.internalFormatHalfFloat, width, height, 0, texConfig.textureFormatFloat, texConfig.textureTypeHalfFloat, null);\n const frameBuffer = gl.createFramebuffer();\n gl.bindFramebuffer(gl.FRAMEBUFFER, frameBuffer);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);\n const isFrameBufferComplete = gl.checkFramebufferStatus(gl.FRAMEBUFFER) === gl.FRAMEBUFFER_COMPLETE;\n gl.bindTexture(gl.TEXTURE_2D, null);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteTexture(texture);\n gl.deleteFramebuffer(frameBuffer);\n return isFrameBufferComplete;\n}\nfunction isWebGLFenceEnabled(webGLVersion) {\n if (webGLVersion !== 2) {\n return false;\n }\n const gl = getWebGLContext(webGLVersion);\n const isEnabled = gl.fenceSync != null;\n return isEnabled;\n}\nfunction assertNotComplex2(tensor2, opName) {\n if (!Array.isArray(tensor2)) {\n tensor2 = [tensor2];\n }\n tensor2.forEach((t2) => {\n if (t2 != null) {\n util_exports.assert(t2.dtype !== \"complex64\", () => `${opName} does not support complex64 tensors in the WebGL backend.`);\n }\n });\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/flags_webgl.js\nvar ENV5 = env();\nENV5.registerFlag(\"HAS_WEBGL\", () => ENV5.getNumber(\"WEBGL_VERSION\") > 0);\nENV5.registerFlag(\"WEBGL_VERSION\", () => {\n if (isWebGLVersionEnabled(2)) {\n return 2;\n } else if (isWebGLVersionEnabled(1)) {\n return 1;\n }\n return 0;\n});\nENV5.registerFlag(\"WEBGL_CHECK_NUMERICAL_PROBLEMS\", () => false);\nENV5.registerFlag(\"WEBGL_BUFFER_SUPPORTED\", () => ENV5.get(\"WEBGL_VERSION\") === 2);\nENV5.registerFlag(\"WEBGL_CPU_FORWARD\", () => true);\nENV5.registerFlag(\"WEBGL_FORCE_F16_TEXTURES\", () => false);\nENV5.registerFlag(\"WEBGL_PACK\", () => ENV5.getBool(\"HAS_WEBGL\"));\nENV5.registerFlag(\"WEBGL_PACK_NORMALIZATION\", () => ENV5.getBool(\"WEBGL_PACK\"));\nENV5.registerFlag(\"WEBGL_PACK_CLIP\", () => ENV5.getBool(\"WEBGL_PACK\"));\nENV5.registerFlag(\"WEBGL_PACK_DEPTHWISECONV\", () => ENV5.getBool(\"WEBGL_PACK\"));\nENV5.registerFlag(\"WEBGL_PACK_BINARY_OPERATIONS\", () => ENV5.getBool(\"WEBGL_PACK\"));\nENV5.registerFlag(\"WEBGL_PACK_UNARY_OPERATIONS\", () => ENV5.getBool(\"WEBGL_PACK\"));\nENV5.registerFlag(\"WEBGL_PACK_ARRAY_OPERATIONS\", () => ENV5.getBool(\"WEBGL_PACK\"));\nENV5.registerFlag(\"WEBGL_PACK_IMAGE_OPERATIONS\", () => ENV5.getBool(\"WEBGL_PACK\"));\nENV5.registerFlag(\"WEBGL_PACK_REDUCE\", () => ENV5.getBool(\"WEBGL_PACK\"));\nENV5.registerFlag(\"WEBGL_LAZILY_UNPACK\", () => ENV5.getBool(\"WEBGL_PACK\"));\nENV5.registerFlag(\"WEBGL_CONV_IM2COL\", () => ENV5.getBool(\"WEBGL_PACK\"));\nENV5.registerFlag(\"WEBGL_MAX_TEXTURE_SIZE\", () => getWebGLMaxTextureSize(ENV5.getNumber(\"WEBGL_VERSION\")));\nENV5.registerFlag(\"WEBGL_MAX_TEXTURES_IN_SHADER\", () => getMaxTexturesInShader(ENV5.getNumber(\"WEBGL_VERSION\")));\nENV5.registerFlag(\"WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION\", () => {\n const webGLVersion = ENV5.getNumber(\"WEBGL_VERSION\");\n if (webGLVersion === 0) {\n return 0;\n }\n return getWebGLDisjointQueryTimerVersion(webGLVersion);\n});\nENV5.registerFlag(\"WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE\", () => ENV5.getNumber(\"WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION\") > 0 && !device_util_exports.isMobile());\nENV5.registerFlag(\"WEBGL_RENDER_FLOAT32_CAPABLE\", () => isCapableOfRenderingToFloatTexture(ENV5.getNumber(\"WEBGL_VERSION\")));\nENV5.registerFlag(\"WEBGL_RENDER_FLOAT32_ENABLED\", () => {\n return ENV5.getBool(\"WEBGL_FORCE_F16_TEXTURES\") ? false : ENV5.getBool(\"WEBGL_RENDER_FLOAT32_CAPABLE\");\n});\nENV5.registerFlag(\"WEBGL_DOWNLOAD_FLOAT_ENABLED\", () => isDownloadFloatTextureEnabled(ENV5.getNumber(\"WEBGL_VERSION\")));\nENV5.registerFlag(\"WEBGL_FENCE_API_ENABLED\", () => isWebGLFenceEnabled(ENV5.getNumber(\"WEBGL_VERSION\")));\nENV5.registerFlag(\"WEBGL_SIZE_UPLOAD_UNIFORM\", () => {\n const useUniforms = ENV5.getBool(\"WEBGL_RENDER_FLOAT32_ENABLED\");\n return useUniforms ? 4 : 0;\n});\nENV5.registerFlag(\"WEBGL_DELETE_TEXTURE_THRESHOLD\", () => {\n return -1;\n}, (threshold3) => {\n if (threshold3 < 0 && threshold3 !== -1) {\n throw new Error(`WEBGL_DELETE_TEXTURE_THRESHOLD must be -1 (indicating never delete) or at least 0, but got ${threshold3}.`);\n }\n});\nENV5.registerFlag(\"WEBGL_FLUSH_THRESHOLD\", () => {\n return device_util_exports.isMobile() ? 1 : -1;\n}, (threshold3) => {\n if (threshold3 < 0 && threshold3 !== -1) {\n throw new Error(`WEBGL_FLUSH_THRESHOLD must be -1 (indicating never manual flush) or at least 0, but got ${threshold3}.`);\n }\n});\nENV5.registerFlag(\"CPU_HANDOFF_SIZE_THRESHOLD\", () => 128);\nENV5.registerFlag(\"WEBGL_USE_SHAPES_UNIFORMS\", () => false);\nENV5.registerFlag(\"TOPK_LAST_DIM_CPU_HANDOFF_SIZE_THRESHOLD\", () => 1e5);\nENV5.registerFlag(\"TOPK_K_CPU_HANDOFF_THRESHOLD\", () => 128);\nENV5.registerFlag(\"WEBGL_EXP_CONV\", () => false);\nENV5.registerFlag(\"SOFTWARE_WEBGL_ENABLED\", () => ENV5.getBool(\"IS_TEST\"));\nENV5.registerFlag(\"WEBGL_MAX_SIZE_FOR_NARROW_TEXTURE\", () => Infinity);\nENV5.registerFlag(\"WEBGL_AUTO_SQUARIFY_NARROW_TEXTURE_SHAPE\", () => false);\nENV5.registerFlag(\"WEBGL2_ISNAN_CUSTOM\", () => false);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/glsl_version.js\nfunction getGlslDifferences() {\n let version9;\n let attribute;\n let varyingVs;\n let varyingFs;\n let texture2D;\n let output;\n let defineOutput;\n let defineSpecialNaN;\n let defineSpecialInf;\n let defineRound;\n if (env().getNumber(\"WEBGL_VERSION\") === 2) {\n version9 = \"#version 300 es\";\n attribute = \"in\";\n varyingVs = \"out\";\n varyingFs = \"in\";\n texture2D = \"texture\";\n output = \"outputColor\";\n defineOutput = \"out vec4 outputColor;\";\n defineSpecialNaN = env().getBool(\"WEBGL2_ISNAN_CUSTOM\") ? `\n bool isnan_custom(float val) {\n uint floatToUint = floatBitsToUint(val);\n return (floatToUint & 0x7fffffffu) > 0x7f800000u;\n }\n\n bvec4 isnan_custom(vec4 val) {\n return bvec4(isnan_custom(val.x),\n isnan_custom(val.y), isnan_custom(val.z), isnan_custom(val.w));\n }\n\n #define isnan(value) isnan_custom(value)\n ` : \"\";\n defineSpecialInf = ``;\n defineRound = `\n #define round(value) newRound(value)\n int newRound(float value) {\n return int(floor(value + 0.5));\n }\n\n ivec4 newRound(vec4 value) {\n return ivec4(floor(value + vec4(0.5)));\n }\n `;\n } else {\n version9 = \"\";\n attribute = \"attribute\";\n varyingVs = \"varying\";\n varyingFs = \"varying\";\n texture2D = \"texture2D\";\n output = \"gl_FragColor\";\n defineOutput = \"\";\n defineSpecialNaN = `\n #define isnan(value) isnan_custom(value)\n bool isnan_custom(float val) {\n return (val > 0. || val < 1. || val == 0.) ? false : true;\n }\n bvec4 isnan_custom(vec4 val) {\n return bvec4(isnan(val.x), isnan(val.y), isnan(val.z), isnan(val.w));\n }\n `;\n defineSpecialInf = `\n uniform float INFINITY;\n\n bool isinf(float val) {\n return abs(val) == INFINITY;\n }\n bvec4 isinf(vec4 val) {\n return equal(abs(val), vec4(INFINITY));\n }\n `;\n defineRound = `\n int round(float value) {\n return int(floor(value + 0.5));\n }\n\n ivec4 round(vec4 value) {\n return ivec4(floor(value + vec4(0.5)));\n }\n `;\n }\n return {\n version: version9,\n attribute,\n varyingVs,\n varyingFs,\n texture2D,\n output,\n defineOutput,\n defineSpecialNaN,\n defineSpecialInf,\n defineRound\n };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/shader_compiler_util.js\nfunction getLogicalCoordinatesFromFlatIndex(coords3, shape, index = \"index\") {\n const strides = util_exports.computeStrides(shape);\n return strides.map((stride, i2) => {\n const line1 = `int ${coords3[i2]} = ${index} / ${stride}`;\n const line2 = i2 === strides.length - 1 ? `int ${coords3[i2 + 1]} = ${index} - ${coords3[i2]} * ${stride}` : `index -= ${coords3[i2]} * ${stride}`;\n return `${line1}; ${line2};`;\n }).join(\"\");\n}\nfunction getOutputLogicalCoordinatesFromFlatIndexByUniform(coords3, shape, index = \"index\") {\n const strides = util_exports.computeStrides(shape);\n return strides.map((_, i2) => {\n const line1 = `int ${coords3[i2]} = ${index} / outShapeStrides[${i2}]`;\n const line2 = i2 === strides.length - 1 ? `int ${coords3[i2 + 1]} = ${index} - ${coords3[i2]} * outShapeStrides[${i2}]` : `index -= ${coords3[i2]} * outShapeStrides[${i2}]`;\n return `${line1}; ${line2};`;\n }).join(\"\");\n}\nfunction symbolicallyComputeStrides(indicesArr, variableName) {\n const numCoords = indicesArr.length;\n const shape = indicesArr.map((d) => `${variableName}[${d}]`);\n const strides = new Array(numCoords - 1);\n strides[numCoords - 2] = shape[numCoords - 1];\n for (let i2 = numCoords - 3; i2 >= 0; --i2) {\n strides[i2] = `(${strides[i2 + 1]} * ${shape[i2 + 1]})`;\n }\n return strides;\n}\nfunction getLogicalCoordinatesFromFlatIndexByUniform(coords3, variableName, index = \"index\") {\n const indicesArray = coords3.map((_, i2) => i2);\n const strides = symbolicallyComputeStrides(indicesArray, variableName);\n return strides.map((_, i2) => {\n const line1 = `int ${coords3[i2]} = ${index} / ${strides[i2]}`;\n const line2 = i2 === strides.length - 1 ? `int ${coords3[i2 + 1]} = ${index} - ${coords3[i2]} * ${strides[i2]}` : `index -= ${coords3[i2]} * ${strides[i2]}`;\n return `${line1}; ${line2};`;\n }).join(\"\");\n}\nfunction getFlatIndexFrom3D(shape) {\n const strides = util_exports.computeStrides(shape).map((d) => d.toString());\n return `\n int getFlatIndex(ivec3 coords) {\n return coords.x * ${strides[0]} + coords.y * ${strides[1]} + coords.z;\n }\n`;\n}\nfunction getFlatIndexFrom3DOutput() {\n return `\n int getFlatIndex(ivec3 coords) {\n return coords.x * outShapeStrides[0] + coords.y * outShapeStrides[1] + coords.z;\n }\n`;\n}\nvar ENCODE_FLOAT_SNIPPET = `\n const float FLOAT_MAX = 1.70141184e38;\n const float FLOAT_MIN = 1.17549435e-38;\n\n lowp vec4 encode_float(highp float v) {\n if (isnan(v)) {\n return vec4(255, 255, 255, 255);\n }\n\n highp float av = abs(v);\n\n if(av < FLOAT_MIN) {\n return vec4(0.0, 0.0, 0.0, 0.0);\n } else if(v > FLOAT_MAX) {\n return vec4(0.0, 0.0, 128.0, 127.0) / 255.0;\n } else if(v < -FLOAT_MAX) {\n return vec4(0.0, 0.0, 128.0, 255.0) / 255.0;\n }\n\n highp vec4 c = vec4(0,0,0,0);\n\n highp float e = floor(log2(av));\n highp float m = exp2(fract(log2(av))) - 1.0;\n\n c[2] = floor(128.0 * m);\n m -= c[2] / 128.0;\n c[1] = floor(32768.0 * m);\n m -= c[1] / 32768.0;\n c[0] = floor(8388608.0 * m);\n\n highp float ebias = e + 127.0;\n c[3] = floor(ebias / 2.0);\n ebias -= c[3] * 2.0;\n c[2] += floor(ebias) * 128.0;\n\n c[3] += 128.0 * step(0.0, -v);\n\n return c / 255.0;\n }\n`;\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/shader_compiler.js\nvar { getBroadcastDims: getBroadcastDims2 } = backend_util_exports;\nfunction makeShader(inputsInfo, outputShape, program) {\n const prefixSnippets = [];\n inputsInfo.forEach((x) => {\n const size = util_exports.sizeFromShape(x.shapeInfo.logicalShape);\n if (x.shapeInfo.isUniform) {\n prefixSnippets.push(`uniform float ${x.name}${size > 1 ? `[${size}]` : \"\"};`);\n } else {\n prefixSnippets.push(`uniform sampler2D ${x.name};`);\n prefixSnippets.push(`uniform int offset${x.name};`);\n }\n if (program.enableShapeUniforms) {\n const { uniformShape } = getUniformInfoFromShape(program.packedInputs, x.shapeInfo.logicalShape, x.shapeInfo.texShape);\n switch (uniformShape.length) {\n case 1:\n prefixSnippets.push(`uniform int ${x.name}Shape;`);\n break;\n case 2:\n prefixSnippets.push(`uniform ivec2 ${x.name}Shape;`);\n break;\n case 3:\n prefixSnippets.push(`uniform ivec3 ${x.name}Shape;`);\n break;\n case 4:\n prefixSnippets.push(`uniform ivec4 ${x.name}Shape;`);\n break;\n default:\n break;\n }\n prefixSnippets.push(`uniform ivec2 ${x.name}TexShape;`);\n }\n });\n if (program.enableShapeUniforms) {\n switch (outputShape.logicalShape.length) {\n case 1:\n prefixSnippets.push(`uniform int outShape;`);\n break;\n case 2:\n prefixSnippets.push(`uniform ivec2 outShape;`);\n prefixSnippets.push(`uniform int outShapeStrides;`);\n break;\n case 3:\n prefixSnippets.push(`uniform ivec3 outShape;`);\n prefixSnippets.push(`uniform ivec2 outShapeStrides;`);\n break;\n case 4:\n prefixSnippets.push(`uniform ivec4 outShape;`);\n prefixSnippets.push(`uniform ivec3 outShapeStrides;`);\n break;\n default:\n break;\n }\n prefixSnippets.push(`uniform ivec2 outTexShape;`);\n }\n if (program.customUniforms) {\n program.customUniforms.forEach((d) => {\n prefixSnippets.push(`uniform ${d.type} ${d.name}${d.arrayIndex ? `[${d.arrayIndex}]` : \"\"};`);\n });\n }\n const inputPrefixSnippet = prefixSnippets.join(\"\\n\");\n const inputSamplingSnippet = inputsInfo.map((x) => getInputSamplingSnippet(x, outputShape, program.packedInputs, program.enableShapeUniforms)).join(\"\\n\");\n const outTexShape = outputShape.texShape;\n const glsl = getGlslDifferences();\n const floatTextureSampleSnippet = getFloatTextureSampleSnippet(glsl);\n let outputSamplingSnippet;\n let floatTextureSetOutputSnippet;\n let shaderPrefix = getShaderPrefix(glsl);\n if (outputShape.isPacked) {\n outputSamplingSnippet = getPackedOutputSamplingSnippet(outputShape.logicalShape, outTexShape, program.enableShapeUniforms);\n floatTextureSetOutputSnippet = getFloatTextureSetRGBASnippet(glsl);\n } else {\n outputSamplingSnippet = getOutputSamplingSnippet(outputShape.logicalShape, outTexShape, program.enableShapeUniforms);\n floatTextureSetOutputSnippet = getFloatTextureSetRSnippet(glsl);\n }\n if (program.packedInputs) {\n shaderPrefix += SHADER_PACKED_PREFIX;\n }\n const source = [\n shaderPrefix,\n floatTextureSampleSnippet,\n floatTextureSetOutputSnippet,\n inputPrefixSnippet,\n outputSamplingSnippet,\n inputSamplingSnippet,\n program.userCode\n ].join(\"\\n\");\n return source;\n}\nfunction getSamplerFromInInfo(inInfo, enableShapeUniforms = false) {\n const shape = inInfo.shapeInfo.logicalShape;\n switch (shape.length) {\n case 0:\n return getSamplerScalar(inInfo, enableShapeUniforms);\n case 1:\n return getSampler1D(inInfo, enableShapeUniforms);\n case 2:\n return getSampler2D(inInfo, enableShapeUniforms);\n case 3:\n return getSampler3D(inInfo, enableShapeUniforms);\n case 4:\n return getSampler4D(inInfo, enableShapeUniforms);\n case 5:\n return getSampler5D(inInfo);\n case 6:\n return getSampler6D(inInfo);\n default:\n throw new Error(`${shape.length}-D input sampling is not yet supported`);\n }\n}\nfunction getPackedSamplerFromInInfo(inInfo, enableShapeUniforms) {\n const shape = inInfo.shapeInfo.logicalShape;\n switch (shape.length) {\n case 0:\n return getPackedSamplerScalar(inInfo);\n case 1:\n return getPackedSampler1D(inInfo, enableShapeUniforms);\n case 2:\n return getPackedSampler2D(inInfo, enableShapeUniforms);\n case 3:\n return getPackedSampler3D(inInfo, enableShapeUniforms);\n default:\n return getPackedSamplerND(inInfo, enableShapeUniforms);\n }\n}\nfunction getInputSamplingSnippet(inInfo, outShapeInfo, usesPackedTextures = false, enableShapeUniforms) {\n let res = \"\";\n if (usesPackedTextures) {\n res += getPackedSamplerFromInInfo(inInfo, enableShapeUniforms);\n } else {\n res += getSamplerFromInInfo(inInfo, enableShapeUniforms);\n }\n const inShape = inInfo.shapeInfo.logicalShape;\n const outShape = outShapeInfo.logicalShape;\n if (inShape.length <= outShape.length) {\n if (usesPackedTextures) {\n res += getPackedSamplerAtOutputCoords(inInfo, outShapeInfo);\n } else {\n res += getSamplerAtOutputCoords(inInfo, outShapeInfo);\n }\n }\n return res;\n}\nfunction getPackedOutputSamplingSnippet(outShape, outTexShape, enableShapeUniforms) {\n switch (outShape.length) {\n case 0:\n return getOutputScalarCoords();\n case 1:\n return getOutputPacked1DCoords(outShape, outTexShape, enableShapeUniforms);\n case 2:\n return getOutputPacked2DCoords(outShape, outTexShape, enableShapeUniforms);\n case 3:\n return getOutputPacked3DCoords(outShape, outTexShape, enableShapeUniforms);\n default:\n return getOutputPackedNDCoords(outShape, outTexShape, enableShapeUniforms);\n }\n}\nfunction getOutputSamplingSnippet(outShape, outTexShape, enableShapeUniforms) {\n switch (outShape.length) {\n case 0:\n return getOutputScalarCoords();\n case 1:\n return getOutput1DCoords(outShape, outTexShape, enableShapeUniforms);\n case 2:\n return getOutput2DCoords(outShape, outTexShape, enableShapeUniforms);\n case 3:\n return getOutput3DCoords(outShape, outTexShape, enableShapeUniforms);\n case 4:\n return getOutput4DCoords(outShape, outTexShape, enableShapeUniforms);\n case 5:\n return getOutput5DCoords(outShape, outTexShape);\n case 6:\n return getOutput6DCoords(outShape, outTexShape);\n default:\n throw new Error(`${outShape.length}-D output sampling is not yet supported`);\n }\n}\nfunction getFloatTextureSampleSnippet(glsl) {\n return `\n float sampleTexture(sampler2D textureSampler, vec2 uv) {\n return ${glsl.texture2D}(textureSampler, uv).r;\n }\n `;\n}\nfunction getFloatTextureSetRSnippet(glsl) {\n return `\n void setOutput(float val) {\n ${glsl.output} = vec4(val, 0, 0, 0);\n }\n `;\n}\nfunction getFloatTextureSetRGBASnippet(glsl) {\n return `\n void setOutput(vec4 val) {\n ${glsl.output} = val;\n }\n `;\n}\nfunction getShaderPrefix(glsl) {\n const SHADER_PREFIX = `${glsl.version}\n precision highp float;\n precision highp int;\n precision highp sampler2D;\n ${glsl.varyingFs} vec2 resultUV;\n ${glsl.defineOutput}\n const vec2 halfCR = vec2(0.5, 0.5);\n\n struct ivec5\n {\n int x;\n int y;\n int z;\n int w;\n int u;\n };\n\n struct ivec6\n {\n int x;\n int y;\n int z;\n int w;\n int u;\n int v;\n };\n\n uniform float NAN;\n ${glsl.defineSpecialNaN}\n ${glsl.defineSpecialInf}\n ${glsl.defineRound}\n\n int imod(int x, int y) {\n return x - y * (x / y);\n }\n\n int idiv(int a, int b, float sign) {\n int res = a / b;\n int mod = imod(a, b);\n if (sign < 0. && mod != 0) {\n res -= 1;\n }\n return res;\n }\n\n //Based on the work of Dave Hoskins\n //https://www.shadertoy.com/view/4djSRW\n #define HASHSCALE1 443.8975\n float random(float seed){\n vec2 p = resultUV * seed;\n vec3 p3 = fract(vec3(p.xyx) * HASHSCALE1);\n p3 += dot(p3, p3.yzx + 19.19);\n return fract((p3.x + p3.y) * p3.z);\n }\n\n ${SAMPLE_1D_SNIPPET}\n ${SAMPLE_2D_SNIPPET}\n ${SAMPLE_3D_SNIPPET}\n `;\n return SHADER_PREFIX;\n}\nvar SAMPLE_1D_SNIPPET = `\nvec2 uvFromFlat(int texNumR, int texNumC, int index) {\n int texR = index / texNumC;\n int texC = index - texR * texNumC;\n return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);\n}\nvec2 packedUVfrom1D(int texNumR, int texNumC, int index) {\n int texelIndex = index / 2;\n int texR = texelIndex / texNumC;\n int texC = texelIndex - texR * texNumC;\n return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);\n}\n`;\nvar SAMPLE_2D_SNIPPET = `\nvec2 packedUVfrom2D(int texelsInLogicalRow, int texNumR,\n int texNumC, int row, int col) {\n int texelIndex = (row / 2) * texelsInLogicalRow + (col / 2);\n int texR = texelIndex / texNumC;\n int texC = texelIndex - texR * texNumC;\n return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);\n}\n`;\nvar SAMPLE_3D_SNIPPET = `\nvec2 packedUVfrom3D(int texNumR, int texNumC,\n int texelsInBatch, int texelsInLogicalRow, int b,\n int row, int col) {\n int index = b * texelsInBatch + (row / 2) * texelsInLogicalRow + (col / 2);\n int texR = index / texNumC;\n int texC = index - texR * texNumC;\n return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);\n}\n`;\nvar SHADER_PACKED_PREFIX = `\n float getChannel(vec4 frag, vec2 innerDims) {\n vec2 modCoord = mod(innerDims, 2.);\n return modCoord.x == 0. ?\n (modCoord.y == 0. ? frag.r : frag.g) :\n (modCoord.y == 0. ? frag.b : frag.a);\n }\n float getChannel(vec4 frag, int dim) {\n float modCoord = mod(float(dim), 2.);\n return modCoord == 0. ? frag.r : frag.g;\n }\n`;\nfunction getOutputScalarCoords() {\n return `\n int getOutputCoords() {\n return 0;\n }\n `;\n}\nfunction getOutputPacked1DCoords(shape, texShape, enableShapeUniforms) {\n const packedTexShape = [Math.ceil(texShape[0] / 2), Math.ceil(texShape[1] / 2)];\n if (packedTexShape[0] === 1) {\n if (enableShapeUniforms) {\n return `\n int getOutputCoords() {\n return 2 * int(resultUV.x * ceil(float(outTexShape[1]) / 2.0));\n }\n `;\n }\n return `\n int getOutputCoords() {\n return 2 * int(resultUV.x * ${packedTexShape[1]}.0);\n }\n `;\n }\n if (packedTexShape[1] === 1) {\n if (enableShapeUniforms) {\n return `\n int getOutputCoords() {\n return 2 * int(resultUV.y * ceil(float(outTexShape[0]) / 2.0));\n }\n `;\n }\n return `\n int getOutputCoords() {\n return 2 * int(resultUV.y * ${packedTexShape[0]}.0);\n }\n `;\n }\n if (enableShapeUniforms) {\n return `\n int getOutputCoords() {\n ivec2 packedTexShape = ivec2(ceil(float(outTexShape[0]) / 2.0), ceil(float(outTexShape[1]) / 2.0));\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(packedTexShape[0], packedTexShape[1]));\n return 2 * (resTexRC.x * packedTexShape[1] + resTexRC.y);\n }\n `;\n }\n return `\n int getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(${packedTexShape[0]}, ${packedTexShape[1]}));\n return 2 * (resTexRC.x * ${packedTexShape[1]} + resTexRC.y);\n }\n `;\n}\nfunction getOutput1DCoords(shape, texShape, enableShapeUniforms) {\n if (texShape[0] === 1) {\n if (enableShapeUniforms) {\n return `\n int getOutputCoords() {\n return int(resultUV.x * float(outTexShape[1]));\n }\n `;\n }\n return `\n int getOutputCoords() {\n return int(resultUV.x * ${texShape[1]}.0);\n }\n `;\n }\n if (texShape[1] === 1) {\n if (enableShapeUniforms) {\n return `\n int getOutputCoords() {\n return int(resultUV.y * float(outTexShape[0]));\n }\n `;\n }\n return `\n int getOutputCoords() {\n return int(resultUV.y * ${texShape[0]}.0);\n }\n `;\n }\n if (enableShapeUniforms) {\n return `\n int getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(outTexShape[0], outTexShape[1]));\n return resTexRC.x * outTexShape[1] + resTexRC.y;\n }\n `;\n }\n return `\n int getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(${texShape[0]}, ${texShape[1]}));\n return resTexRC.x * ${texShape[1]} + resTexRC.y;\n }\n `;\n}\nfunction getOutputPacked3DCoords(shape, texShape, enableShapeUniforms) {\n if (enableShapeUniforms) {\n return `\n ivec3 getOutputCoords() {\n ivec2 packedTexShape = ivec2(ceil(float(outTexShape[0]) / 2.0), ceil(float(outTexShape[1]) / 2.0));\n int texelsInLogicalRow = int(ceil(float(outShape[2]) / 2.0));\n int texelsInBatch = texelsInLogicalRow * int(ceil(float(outShape[1]) / 2.0));\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(packedTexShape[0], packedTexShape[1]));\n int index = resTexRC.x * packedTexShape[1] + resTexRC.y;\n\n int b = index / texelsInBatch;\n index -= b * texelsInBatch;\n\n int r = 2 * (index / texelsInLogicalRow);\n int c = imod(index, texelsInLogicalRow) * 2;\n\n return ivec3(b, r, c);\n }\n `;\n }\n const packedTexShape = [Math.ceil(texShape[0] / 2), Math.ceil(texShape[1] / 2)];\n const texelsInLogicalRow = Math.ceil(shape[2] / 2);\n const texelsInBatch = texelsInLogicalRow * Math.ceil(shape[1] / 2);\n return `\n ivec3 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(${packedTexShape[0]}, ${packedTexShape[1]}));\n int index = resTexRC.x * ${packedTexShape[1]} + resTexRC.y;\n\n int b = index / ${texelsInBatch};\n index -= b * ${texelsInBatch};\n\n int r = 2 * (index / ${texelsInLogicalRow});\n int c = imod(index, ${texelsInLogicalRow}) * 2;\n\n return ivec3(b, r, c);\n }\n `;\n}\nfunction getOutput3DCoords(shape, texShape, enableShapeUniforms) {\n if (enableShapeUniforms) {\n const coordsFromIndexSnippet2 = getOutputLogicalCoordinatesFromFlatIndexByUniform([\"r\", \"c\", \"d\"], shape);\n return `\n ivec3 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(outTexShape[0], outTexShape[1]));\n int index = resTexRC.x * outTexShape[1] + resTexRC.y;\n ${coordsFromIndexSnippet2}\n return ivec3(r, c, d);\n }\n`;\n }\n const coordsFromIndexSnippet = getLogicalCoordinatesFromFlatIndex([\"r\", \"c\", \"d\"], shape);\n return `\n ivec3 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(${texShape[0]}, ${texShape[1]}));\n int index = resTexRC.x * ${texShape[1]} + resTexRC.y;\n ${coordsFromIndexSnippet}\n return ivec3(r, c, d);\n }\n `;\n}\nfunction getOutputPackedNDCoords(shape, texShape, enableShapeUniforms) {\n if (enableShapeUniforms) {\n return `\n ivec4 getOutputCoords() {\n ivec2 packedTexShape = ivec2(ceil(float(outTexShape[0]) / 2.0), ceil(float(outTexShape[1]) / 2.0));\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(packedTexShape[0], packedTexShape[1]));\n int index = resTexRC.x * packedTexShape[1] + resTexRC.y;\n\n int texelsInLogicalRow = int(ceil(float(outShape[3]) / 2.0));\n int texelsInBatch = texelsInLogicalRow * int(ceil(float(outShape[2]) / 2.0));\n int texelsInBatchN = texelsInBatch * outShape[1];\n\n int b2 = index / texelsInBatchN;\n index -= b2 * texelsInBatchN;\n\n int b = index / texelsInBatch;\n index -= b * texelsInBatch;\n\n int r = 2 * (index / texelsInLogicalRow);\n int c = imod(index, texelsInLogicalRow) * 2;\n\n return ivec4(b2, b, r, c);\n }\n `;\n }\n const packedTexShape = [Math.ceil(texShape[0] / 2), Math.ceil(texShape[1] / 2)];\n const texelsInLogicalRow = Math.ceil(shape[shape.length - 1] / 2);\n const texelsInBatch = texelsInLogicalRow * Math.ceil(shape[shape.length - 2] / 2);\n let texelsInBatchN = texelsInBatch;\n let batches = ``;\n let coords3 = \"b, r, c\";\n for (let b = 2; b < shape.length - 1; b++) {\n texelsInBatchN *= shape[shape.length - b - 1];\n batches = `\n int b${b} = index / ${texelsInBatchN};\n index -= b${b} * ${texelsInBatchN};\n ` + batches;\n coords3 = `b${b}, ` + coords3;\n }\n return `\n ivec${shape.length} getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(${packedTexShape[0]}, ${packedTexShape[1]}));\n int index = resTexRC.x * ${packedTexShape[1]} + resTexRC.y;\n\n ${batches}\n\n int b = index / ${texelsInBatch};\n index -= b * ${texelsInBatch};\n\n int r = 2 * (index / ${texelsInLogicalRow});\n int c = imod(index, ${texelsInLogicalRow}) * 2;\n\n return ivec${shape.length}(${coords3});\n }\n `;\n}\nfunction getOutput4DCoords(shape, texShape, enableShapeUniforms) {\n if (enableShapeUniforms) {\n const coordsFromIndexSnippet2 = getOutputLogicalCoordinatesFromFlatIndexByUniform([\"r\", \"c\", \"d\", \"d2\"], shape);\n return `\n ivec4 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(outTexShape[0], outTexShape[1]));\n int index = resTexRC.x * outTexShape[1] + resTexRC.y;\n ${coordsFromIndexSnippet2}\n return ivec4(r, c, d, d2);\n }\n `;\n }\n const coordsFromIndexSnippet = getLogicalCoordinatesFromFlatIndex([\"r\", \"c\", \"d\", \"d2\"], shape);\n return `\n ivec4 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(${texShape[0]}, ${texShape[1]}));\n int index = resTexRC.x * ${texShape[1]} + resTexRC.y;\n ${coordsFromIndexSnippet}\n return ivec4(r, c, d, d2);\n }\n `;\n}\nfunction getOutput5DCoords(shape, texShape) {\n const coordsFromIndexSnippet = getLogicalCoordinatesFromFlatIndex([\"r\", \"c\", \"d\", \"d2\", \"d3\"], shape);\n return `\n ivec5 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx * vec2(${texShape[0]},\n ${texShape[1]}));\n\n int index = resTexRC.x * ${texShape[1]} + resTexRC.y;\n\n ${coordsFromIndexSnippet}\n\n ivec5 outShape = ivec5(r, c, d, d2, d3);\n return outShape;\n }\n `;\n}\nfunction getOutput6DCoords(shape, texShape) {\n const coordsFromIndexSnippet = getLogicalCoordinatesFromFlatIndex([\"r\", \"c\", \"d\", \"d2\", \"d3\", \"d4\"], shape);\n return `\n ivec6 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(${texShape[0]}, ${texShape[1]}));\n int index = resTexRC.x * ${texShape[1]} + resTexRC.y;\n\n ${coordsFromIndexSnippet}\n\n ivec6 result = ivec6(r, c, d, d2, d3, d4);\n return result;\n }\n `;\n}\nfunction getOutputPacked2DCoords(shape, texShape, enableShapeUniforms) {\n const packedTexShape = [Math.ceil(texShape[0] / 2), Math.ceil(texShape[1] / 2)];\n if (util_exports.arraysEqual(shape, texShape)) {\n if (enableShapeUniforms) {\n return `\n ivec2 getOutputCoords() {\n ivec2 packedTexShape = ivec2(ceil(float(outTexShape[0]) / 2.0), ceil(float(outTexShape[1]) / 2.0));\n return 2 * ivec2(resultUV.yx * vec2(packedTexShape[0], packedTexShape[1]));\n }\n `;\n }\n return `\n ivec2 getOutputCoords() {\n return 2 * ivec2(resultUV.yx * vec2(${packedTexShape[0]}, ${packedTexShape[1]}));\n }\n `;\n }\n const texelsInLogicalRow = Math.ceil(shape[1] / 2);\n if (enableShapeUniforms) {\n return `\n ivec2 getOutputCoords() {\n ivec2 packedTexShape = ivec2(ceil(float(outTexShape[0]) / 2.0), ceil(float(outTexShape[1]) / 2.0));\n int texelsInLogicalRow = int(ceil(float(outShape[1]) / 2.0));\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(packedTexShape[0], packedTexShape[1]));\n\n int index = resTexRC.x * packedTexShape[1] + resTexRC.y;\n int r = 2 * (index / texelsInLogicalRow);\n int c = imod(index, texelsInLogicalRow) * 2;\n\n return ivec2(r, c);\n }\n `;\n }\n return `\n ivec2 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(${packedTexShape[0]}, ${packedTexShape[1]}));\n\n int index = resTexRC.x * ${packedTexShape[1]} + resTexRC.y;\n int r = 2 * (index / ${texelsInLogicalRow});\n int c = imod(index, ${texelsInLogicalRow}) * 2;\n\n return ivec2(r, c);\n }\n `;\n}\nfunction getOutput2DCoords(shape, texShape, enableShapeUniforms) {\n if (util_exports.arraysEqual(shape, texShape)) {\n if (enableShapeUniforms) {\n return `\n ivec2 getOutputCoords() {\n return ivec2(resultUV.yx * vec2(outTexShape[0], outTexShape[1]));\n }\n `;\n }\n return `\n ivec2 getOutputCoords() {\n return ivec2(resultUV.yx * vec2(${texShape[0]}, ${texShape[1]}));\n }\n `;\n }\n if (shape[1] === 1) {\n if (enableShapeUniforms) {\n return `\n ivec2 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(outTexShape[0], outTexShape[1]));\n int index = resTexRC.x * outTexShape[1] + resTexRC.y;\n return ivec2(index, 0);\n }\n `;\n }\n return `\n ivec2 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(${texShape[0]}, ${texShape[1]}));\n int index = resTexRC.x * ${texShape[1]} + resTexRC.y;\n return ivec2(index, 0);\n }\n `;\n }\n if (shape[0] === 1) {\n if (enableShapeUniforms) {\n return `\n ivec2 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(outTexShape[0], outTexShape[1]));\n int index = resTexRC.x * outTexShape[1] + resTexRC.y;\n return ivec2(0, index);\n }\n `;\n }\n return `\n ivec2 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(${texShape[0]}, ${texShape[1]}));\n int index = resTexRC.x * ${texShape[1]} + resTexRC.y;\n return ivec2(0, index);\n }\n `;\n }\n if (enableShapeUniforms) {\n return `\n ivec2 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(outTexShape[0], outTexShape[1]));\n int index = resTexRC.x * outTexShape[1] + resTexRC.y;\n int r = index / outShape[1];\n int c = index - r * outShape[1];\n return ivec2(r, c);\n }\n `;\n }\n return `\n ivec2 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(${texShape[0]}, ${texShape[1]}));\n int index = resTexRC.x * ${texShape[1]} + resTexRC.y;\n int r = index / ${shape[1]};\n int c = index - r * ${shape[1]};\n return ivec2(r, c);\n }\n `;\n}\nfunction getFlatOffsetUniformName(texName) {\n return `offset${texName}`;\n}\nfunction getPackedSamplerScalar(inputInfo) {\n const texName = inputInfo.name;\n const funcName = \"get\" + texName.charAt(0).toUpperCase() + texName.slice(1);\n const glsl = getGlslDifferences();\n return `\n vec4 ${funcName}() {\n return ${glsl.texture2D}(${texName}, halfCR);\n }\n `;\n}\nfunction getSamplerScalar(inputInfo, enableShapeUniforms) {\n const texName = inputInfo.name;\n const funcName = \"get\" + texName.charAt(0).toUpperCase() + texName.slice(1);\n if (inputInfo.shapeInfo.isUniform) {\n return `float ${funcName}() {return ${texName};}`;\n }\n const [texNumR, texNumC] = inputInfo.shapeInfo.texShape;\n if (texNumR === 1 && texNumC === 1) {\n return `\n float ${funcName}() {\n return sampleTexture(${texName}, halfCR);\n }\n `;\n }\n const offset = getFlatOffsetUniformName(texName);\n if (enableShapeUniforms) {\n return `\n float ${funcName}() {\n vec2 uv = uvFromFlat(${texName}TexShape[0], ${texName}TexShape[1], ${offset});\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n const [tNumR, tNumC] = inputInfo.shapeInfo.texShape;\n return `\n float ${funcName}() {\n vec2 uv = uvFromFlat(${tNumR}, ${tNumC}, ${offset});\n return sampleTexture(${texName}, uv);\n }\n `;\n}\nfunction getPackedSampler1D(inputInfo, enableShapeUniforms) {\n const texName = inputInfo.name;\n const funcName = \"get\" + texName.charAt(0).toUpperCase() + texName.slice(1);\n const texShape = inputInfo.shapeInfo.texShape;\n const glsl = getGlslDifferences();\n if (enableShapeUniforms) {\n return `\n vec4 ${funcName}(int index) {\n ivec2 packedTexShape = ivec2(ceil(float(${texName}TexShape[0]) / 2.0), ceil(float(${texName}TexShape[1]) / 2.0));\n vec2 uv = packedUVfrom1D(\n packedTexShape[0], packedTexShape[1], index);\n return ${glsl.texture2D}(${texName}, uv);\n }\n `;\n }\n const packedTexShape = [Math.ceil(texShape[0] / 2), Math.ceil(texShape[1] / 2)];\n return `\n vec4 ${funcName}(int index) {\n vec2 uv = packedUVfrom1D(\n ${packedTexShape[0]}, ${packedTexShape[1]}, index);\n return ${glsl.texture2D}(${texName}, uv);\n }\n `;\n}\nfunction getSampler1D(inputInfo, enableShapeUniforms) {\n const texName = inputInfo.name;\n const funcName = \"get\" + texName.charAt(0).toUpperCase() + texName.slice(1);\n if (inputInfo.shapeInfo.isUniform) {\n return `\n float ${funcName}(int index) {\n ${getUniformSampler(inputInfo)}\n }\n `;\n }\n const texShape = inputInfo.shapeInfo.texShape;\n const tNumR = texShape[0];\n const tNumC = texShape[1];\n if (tNumC === 1 && tNumR === 1) {\n return `\n float ${funcName}(int index) {\n return sampleTexture(${texName}, halfCR);\n }\n `;\n }\n const offset = getFlatOffsetUniformName(texName);\n if (tNumC === 1) {\n if (enableShapeUniforms) {\n return `\n float ${funcName}(int index) {\n vec2 uv = vec2(0.5, (float(index + ${offset}) + 0.5) / float(${texName}TexShape[0]));\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n return `\n float ${funcName}(int index) {\n vec2 uv = vec2(0.5, (float(index + ${offset}) + 0.5) / ${tNumR}.0);\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n if (tNumR === 1) {\n if (enableShapeUniforms) {\n return `\n float ${funcName}(int index) {\n vec2 uv = vec2((float(index + ${offset}) + 0.5) / float(${texName}TexShape[1]), 0.5);\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n return `\n float ${funcName}(int index) {\n vec2 uv = vec2((float(index + ${offset}) + 0.5) / ${tNumC}.0, 0.5);\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n if (enableShapeUniforms) {\n return `\n float ${funcName}(int index) {\n vec2 uv = uvFromFlat(${texName}TexShape[0], ${texName}TexShape[1], index + ${offset});\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n return `\n float ${funcName}(int index) {\n vec2 uv = uvFromFlat(${tNumR}, ${tNumC}, index + ${offset});\n return sampleTexture(${texName}, uv);\n }\n `;\n}\nfunction getPackedSampler2D(inputInfo, enableShapeUniforms) {\n const shape = inputInfo.shapeInfo.logicalShape;\n const texName = inputInfo.name;\n const funcName = \"get\" + texName.charAt(0).toUpperCase() + texName.slice(1);\n const texShape = inputInfo.shapeInfo.texShape;\n const texNumR = texShape[0];\n const texNumC = texShape[1];\n const glsl = getGlslDifferences();\n if (texShape != null && util_exports.arraysEqual(shape, texShape)) {\n if (enableShapeUniforms) {\n return `\n vec4 ${funcName}(int row, int col) {\n vec2 uv = (vec2(col, row) + halfCR) / vec2(${texName}TexShape[1], ${texName}TexShape[0]);\n\n return ${glsl.texture2D}(${texName}, uv);\n }\n `;\n }\n return `\n vec4 ${funcName}(int row, int col) {\n vec2 uv = (vec2(col, row) + halfCR) / vec2(${texNumC}.0, ${texNumR}.0);\n\n return ${glsl.texture2D}(${texName}, uv);\n }\n `;\n }\n if (enableShapeUniforms) {\n return `\n vec4 ${funcName}(int row, int col) {\n ivec2 packedTexShape = ivec2(ceil(float(${texName}TexShape[0]) / 2.0), ceil(float(${texName}TexShape[1]) / 2.0));\n int valuesPerRow = int(ceil(float(${texName}Shape[1]) / 2.0));\n vec2 uv = packedUVfrom2D(valuesPerRow, packedTexShape[0], packedTexShape[1], row, col);\n return ${glsl.texture2D}(${texName}, uv);\n }\n `;\n }\n const packedTexShape = [Math.ceil(texShape[0] / 2), Math.ceil(texShape[1] / 2)];\n const valuesPerRow = Math.ceil(shape[1] / 2);\n return `\n vec4 ${funcName}(int row, int col) {\n vec2 uv = packedUVfrom2D(${valuesPerRow}, ${packedTexShape[0]}, ${packedTexShape[1]}, row, col);\n return ${glsl.texture2D}(${texName}, uv);\n }\n `;\n}\nfunction getSampler2D(inputInfo, enableShapeUniforms) {\n const shape = inputInfo.shapeInfo.logicalShape;\n const texName = inputInfo.name;\n const funcName = \"get\" + texName.charAt(0).toUpperCase() + texName.slice(1);\n const texShape = inputInfo.shapeInfo.texShape;\n if (texShape != null && util_exports.arraysEqual(shape, texShape)) {\n if (enableShapeUniforms) {\n return `\n float ${funcName}(int row, int col) {\n vec2 uv = (vec2(col, row) + halfCR) / vec2(${texName}TexShape[1], ${texName}TexShape[0]);\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n const texNumR2 = texShape[0];\n const texNumC2 = texShape[1];\n return `\n float ${funcName}(int row, int col) {\n vec2 uv = (vec2(col, row) + halfCR) / vec2(${texNumC2}.0, ${texNumR2}.0);\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n const { newShape, keptDims } = util_exports.squeezeShape(shape);\n const squeezedShape = newShape;\n if (squeezedShape.length < shape.length) {\n const newInputInfo = squeezeInputInfo(inputInfo, squeezedShape);\n const params = [\"row\", \"col\"];\n return `\n ${getSamplerFromInInfo(newInputInfo, enableShapeUniforms)}\n float ${funcName}(int row, int col) {\n return ${funcName}(${getSqueezedParams(params, keptDims)});\n }\n `;\n }\n if (inputInfo.shapeInfo.isUniform) {\n return `\n float ${funcName}(int row, int col) {\n int index = round(dot(vec2(row, col), vec2(${shape[1]}, 1)));\n ${getUniformSampler(inputInfo)}\n }\n `;\n }\n const texNumR = texShape[0];\n const texNumC = texShape[1];\n const offset = getFlatOffsetUniformName(texName);\n if (texNumC === 1) {\n if (enableShapeUniforms) {\n return `\n float ${funcName}(int row, int col) {\n float index = dot(vec3(row, col, ${offset}), vec3(${texName}Shape[1], 1, 1));\n vec2 uv = vec2(0.5, (index + 0.5) / float(${texName}TexShape[0]));\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n return `\n float ${funcName}(int row, int col) {\n float index = dot(vec3(row, col, ${offset}), vec3(${shape[1]}, 1, 1));\n vec2 uv = vec2(0.5, (index + 0.5) / ${texNumR}.0);\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n if (texNumR === 1) {\n if (enableShapeUniforms) {\n return `\n float ${funcName}(int row, int col) {\n float index = dot(vec3(row, col, ${offset}), vec3(${texName}Shape[1], 1, 1));\n vec2 uv = vec2((index + 0.5) / float(${texName}TexShape[1]), 0.5);\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n return `\n float ${funcName}(int row, int col) {\n float index = dot(vec3(row, col, ${offset}), vec3(${shape[1]}, 1, 1));\n vec2 uv = vec2((index + 0.5) / ${texNumC}.0, 0.5);\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n if (enableShapeUniforms) {\n return `\n float ${funcName}(int row, int col) {\n // Explicitly use integer operations as dot() only works on floats.\n int index = row * ${texName}Shape[1] + col + ${offset};\n vec2 uv = uvFromFlat(${texName}TexShape[0], ${texName}TexShape[1], index);\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n return `\n float ${funcName}(int row, int col) {\n // Explicitly use integer operations as dot() only works on floats.\n int index = row * ${shape[1]} + col + ${offset};\n vec2 uv = uvFromFlat(${texNumR}, ${texNumC}, index);\n return sampleTexture(${texName}, uv);\n }\n`;\n}\nfunction getPackedSampler3D(inputInfo, enableShapeUniforms) {\n const shape = inputInfo.shapeInfo.logicalShape;\n const texName = inputInfo.name;\n const funcName = \"get\" + texName.charAt(0).toUpperCase() + texName.slice(1);\n const texShape = inputInfo.shapeInfo.texShape;\n const packedTexShape = [Math.ceil(texShape[0] / 2), Math.ceil(texShape[1] / 2)];\n if (shape[0] === 1) {\n const squeezedShape = shape.slice(1);\n const keptDims = [1, 2];\n const newInputInfo = squeezeInputInfo(inputInfo, squeezedShape);\n const params = [\"b\", \"row\", \"col\"];\n return `\n ${getPackedSamplerFromInInfo(newInputInfo, enableShapeUniforms)}\n vec4 ${funcName}(int b, int row, int col) {\n return ${funcName}(${getSqueezedParams(params, keptDims)});\n }\n `;\n }\n const glsl = getGlslDifferences();\n if (enableShapeUniforms) {\n return `\n vec4 ${funcName}(int b, int row, int col) {\n ivec2 packedTexShape = ivec2(ceil(float(${texName}TexShape[0]) / 2.0), ceil(float(${texName}TexShape[1]) / 2.0));\n int valuesPerRow = int(ceil(float(${texName}Shape[2]) / 2.0));\n int texelsInBatch = valuesPerRow * int(ceil(float(${texName}Shape[1]) / 2.0));\n vec2 uv = packedUVfrom3D(\n packedTexShape[0], packedTexShape[1], texelsInBatch, valuesPerRow, b, row, col);\n return ${glsl.texture2D}(${texName}, uv);\n }\n `;\n }\n const texNumR = packedTexShape[0];\n const texNumC = packedTexShape[1];\n const valuesPerRow = Math.ceil(shape[2] / 2);\n const texelsInBatch = valuesPerRow * Math.ceil(shape[1] / 2);\n return `\n vec4 ${funcName}(int b, int row, int col) {\n vec2 uv = packedUVfrom3D(\n ${texNumR}, ${texNumC}, ${texelsInBatch}, ${valuesPerRow}, b, row, col);\n return ${glsl.texture2D}(${texName}, uv);\n }\n `;\n}\nfunction getSampler3D(inputInfo, enableShapeUniforms) {\n const shape = inputInfo.shapeInfo.logicalShape;\n const texName = inputInfo.name;\n const funcName = \"get\" + texName.charAt(0).toUpperCase() + texName.slice(1);\n const stride0 = shape[1] * shape[2];\n const stride1 = shape[2];\n const { newShape, keptDims } = util_exports.squeezeShape(shape);\n const squeezedShape = newShape;\n if (squeezedShape.length < shape.length) {\n const newInputInfo = squeezeInputInfo(inputInfo, squeezedShape);\n const params = [\"row\", \"col\", \"depth\"];\n return `\n ${getSamplerFromInInfo(newInputInfo, enableShapeUniforms)}\n float ${funcName}(int row, int col, int depth) {\n return ${funcName}(${getSqueezedParams(params, keptDims)});\n }\n `;\n }\n if (inputInfo.shapeInfo.isUniform) {\n return `\n float ${funcName}(int row, int col, int depth) {\n int index = round(dot(vec3(row, col, depth),\n vec3(${stride0}, ${stride1}, 1)));\n ${getUniformSampler(inputInfo)}\n }\n `;\n }\n const texShape = inputInfo.shapeInfo.texShape;\n const texNumR = texShape[0];\n const texNumC = texShape[1];\n const flatOffset = inputInfo.shapeInfo.flatOffset;\n if (texNumC === stride0 && flatOffset == null) {\n if (enableShapeUniforms) {\n return `\n float ${funcName}(int row, int col, int depth) {\n int stride1 = ${texName}Shape[2];\n float texR = float(row);\n float texC = dot(vec2(col, depth), vec2(stride1, 1));\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2(${texName}TexShape[1], ${texName}TexShape[0]);\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n return `\n float ${funcName}(int row, int col, int depth) {\n float texR = float(row);\n float texC = dot(vec2(col, depth), vec2(${stride1}, 1));\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2(${texNumC}.0, ${texNumR}.0);\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n if (texNumC === stride1 && flatOffset == null) {\n if (enableShapeUniforms) {\n return `\n float ${funcName}(int row, int col, int depth) {\n float texR = dot(vec2(row, col), vec2(${texName}Shape[1], 1));\n float texC = float(depth);\n vec2 uv = (vec2(texC, texR) + halfCR) / vec2(${texName}TexShape[1], ${texName}TexShape[0]);\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n return `\n float ${funcName}(int row, int col, int depth) {\n float texR = dot(vec2(row, col), vec2(${shape[1]}, 1));\n float texC = float(depth);\n vec2 uv = (vec2(texC, texR) + halfCR) / vec2(${texNumC}.0, ${texNumR}.0);\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n const offset = getFlatOffsetUniformName(texName);\n if (enableShapeUniforms) {\n return `\n float ${funcName}(int row, int col, int depth) {\n // Explicitly use integer operations as dot() only works on floats.\n int stride0 = ${texName}Shape[1] * ${texName}Shape[2];\n int stride1 = ${texName}Shape[2];\n int index = row * stride0 + col * stride1 + depth + ${offset};\n vec2 uv = uvFromFlat(${texName}TexShape[0], ${texName}TexShape[1], index);\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n return `\n float ${funcName}(int row, int col, int depth) {\n // Explicitly use integer operations as dot() only works on floats.\n int index = row * ${stride0} + col * ${stride1} + depth + ${offset};\n vec2 uv = uvFromFlat(${texNumR}, ${texNumC}, index);\n return sampleTexture(${texName}, uv);\n }\n `;\n}\nfunction getPackedSamplerND(inputInfo, enableShapeUniforms) {\n const texName = inputInfo.name;\n const funcName = \"get\" + texName.charAt(0).toUpperCase() + texName.slice(1);\n const glsl = getGlslDifferences();\n if (enableShapeUniforms) {\n return `\n vec4 ${funcName}(int b2, int b, int row, int col) {\n int valuesPerRow = int(ceil(float(${texName}Shape[3]) / 2.0));\n int texelsInBatch = valuesPerRow * int(ceil(float(${texName}Shape[2]) / 2.0));\n int index = b * texelsInBatch + (row / 2) * valuesPerRow + (col / 2);\n texelsInBatch *= ${texName}Shape[1];\n index = b2 * texelsInBatch + index;\n ivec2 packedTexShape = ivec2(ceil(float(${texName}TexShape[0]) / 2.0), ceil(float(${texName}TexShape[1]) / 2.0));\n int texR = index / packedTexShape[1];\n int texC = index - texR * packedTexShape[1];\n vec2 uv = (vec2(texC, texR) + halfCR) / vec2(packedTexShape[1], packedTexShape[0]); return ${glsl.texture2D}(${texName}, uv);\n }\n `;\n }\n const shape = inputInfo.shapeInfo.logicalShape;\n const rank = shape.length;\n const texShape = inputInfo.shapeInfo.texShape;\n const packedTexShape = [Math.ceil(texShape[0] / 2), Math.ceil(texShape[1] / 2)];\n const texNumR = packedTexShape[0];\n const texNumC = packedTexShape[1];\n const valuesPerRow = Math.ceil(shape[rank - 1] / 2);\n let texelsInBatch = valuesPerRow * Math.ceil(shape[rank - 2] / 2);\n let params = `int b, int row, int col`;\n let index = `b * ${texelsInBatch} + (row / 2) * ${valuesPerRow} + (col / 2)`;\n for (let b = 2; b < rank - 1; b++) {\n params = `int b${b}, ` + params;\n texelsInBatch *= shape[rank - b - 1];\n index = `b${b} * ${texelsInBatch} + ` + index;\n }\n return `\n vec4 ${funcName}(${params}) {\n int index = ${index};\n int texR = index / ${texNumC};\n int texC = index - texR * ${texNumC};\n vec2 uv = (vec2(texC, texR) + halfCR) / vec2(${texNumC}, ${texNumR});\n return ${glsl.texture2D}(${texName}, uv);\n }\n `;\n}\nfunction getSampler4D(inputInfo, enableShapeUniforms) {\n const shape = inputInfo.shapeInfo.logicalShape;\n const texName = inputInfo.name;\n const funcName = \"get\" + texName.charAt(0).toUpperCase() + texName.slice(1);\n const stride2 = shape[3];\n const stride1 = shape[2] * stride2;\n const stride0 = shape[1] * stride1;\n const { newShape, keptDims } = util_exports.squeezeShape(shape);\n if (newShape.length < shape.length) {\n const newInputInfo = squeezeInputInfo(inputInfo, newShape);\n const params = [\"row\", \"col\", \"depth\", \"depth2\"];\n return `\n ${getSamplerFromInInfo(newInputInfo, enableShapeUniforms)}\n float ${funcName}(int row, int col, int depth, int depth2) {\n return ${funcName}(${getSqueezedParams(params, keptDims)});\n }\n `;\n }\n if (inputInfo.shapeInfo.isUniform) {\n return `\n float ${funcName}(int row, int col, int depth, int depth2) {\n int index = round(dot(vec4(row, col, depth, depth2),\n vec4(${stride0}, ${stride1}, ${stride2}, 1)));\n ${getUniformSampler(inputInfo)}\n }\n `;\n }\n const flatOffset = inputInfo.shapeInfo.flatOffset;\n const texShape = inputInfo.shapeInfo.texShape;\n const texNumR = texShape[0];\n const texNumC = texShape[1];\n const stride2Str = `int stride2 = ${texName}Shape[3];`;\n const stride1Str = `int stride1 = ${texName}Shape[2] * stride2;`;\n const stride0Str = `int stride0 = ${texName}Shape[1] * stride1;`;\n if (texNumC === stride0 && flatOffset == null) {\n if (enableShapeUniforms) {\n return `\n float ${funcName}(int row, int col, int depth, int depth2) {\n ${stride2Str}\n ${stride1Str}\n float texR = float(row);\n float texC =\n dot(vec3(col, depth, depth2),\n vec3(stride1, stride2, 1));\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2(${texName}TexShape[1], ${texName}TexShape[0]);\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n return `\n float ${funcName}(int row, int col, int depth, int depth2) {\n float texR = float(row);\n float texC =\n dot(vec3(col, depth, depth2),\n vec3(${stride1}, ${stride2}, 1));\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2(${texNumC}.0, ${texNumR}.0);\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n if (texNumC === stride2 && flatOffset == null) {\n if (enableShapeUniforms) {\n return `\n float ${funcName}(int row, int col, int depth, int depth2) {\n float texR = dot(vec3(row, col, depth),\n vec3(${texName}Shape[1] * ${texName}Shape[2], ${texName}Shape[2], 1));\n float texC = float(depth2);\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2(${texName}TexShape[1], ${texName}TexShape[0]);\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n return `\n float ${funcName}(int row, int col, int depth, int depth2) {\n float texR = dot(vec3(row, col, depth),\n vec3(${shape[1] * shape[2]}, ${shape[2]}, 1));\n float texC = float(depth2);\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2(${texNumC}.0, ${texNumR}.0);\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n const offset = getFlatOffsetUniformName(texName);\n if (enableShapeUniforms) {\n return `\n float ${funcName}(int row, int col, int depth, int depth2) {\n // Explicitly use integer operations as dot() only works on floats.\n ${stride2Str}\n ${stride1Str}\n ${stride0Str}\n int index = row * stride0 + col * stride1 +\n depth * stride2 + depth2;\n vec2 uv = uvFromFlat(${texName}TexShape[0], ${texName}TexShape[1], index + ${offset});\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n return `\n float ${funcName}(int row, int col, int depth, int depth2) {\n // Explicitly use integer operations as dot() only works on floats.\n int index = row * ${stride0} + col * ${stride1} +\n depth * ${stride2} + depth2;\n vec2 uv = uvFromFlat(${texNumR}, ${texNumC}, index + ${offset});\n return sampleTexture(${texName}, uv);\n }\n `;\n}\nfunction getSampler5D(inputInfo) {\n const shape = inputInfo.shapeInfo.logicalShape;\n const texName = inputInfo.name;\n const funcName = \"get\" + texName.charAt(0).toUpperCase() + texName.slice(1);\n const stride3 = shape[4];\n const stride2 = shape[3] * stride3;\n const stride1 = shape[2] * stride2;\n const stride0 = shape[1] * stride1;\n const { newShape, keptDims } = util_exports.squeezeShape(shape);\n if (newShape.length < shape.length) {\n const newInputInfo = squeezeInputInfo(inputInfo, newShape);\n const params = [\"row\", \"col\", \"depth\", \"depth2\", \"depth3\"];\n return `\n ${getSamplerFromInInfo(newInputInfo)}\n float ${funcName}(int row, int col, int depth, int depth2, int depth3) {\n return ${funcName}(${getSqueezedParams(params, keptDims)});\n }\n `;\n }\n if (inputInfo.shapeInfo.isUniform) {\n return `\n float ${funcName}(int row, int col, int depth, int depth2, int depth3) {\n float index = dot(\n vec4(row, col, depth, depth2),\n vec4(${stride0}, ${stride1}, ${stride2}, ${stride3})) +\n depth3;\n ${getUniformSampler(inputInfo)}\n }\n `;\n }\n const flatOffset = inputInfo.shapeInfo.flatOffset;\n const texShape = inputInfo.shapeInfo.texShape;\n const texNumR = texShape[0];\n const texNumC = texShape[1];\n if (texNumC === stride0 && flatOffset == null) {\n return `\n float ${funcName}(int row, int col, int depth, int depth2, int depth3) {\n int texR = row;\n float texC = dot(vec4(col, depth, depth2, depth3),\n vec4(${stride1}, ${stride2}, ${stride3}, 1));\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2(${texNumC}.0, ${texNumR}.0);\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n if (texNumC === stride3 && flatOffset == null) {\n return `\n float ${funcName}(int row, int col, int depth, int depth2, int depth3) {\n float texR = dot(\n vec4(row, col, depth, depth2),\n vec4(${shape[1] * shape[2] * shape[3]},\n ${shape[2] * shape[3]}, ${shape[3]}, 1));\n int texC = depth3;\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2(${texNumC}.0, ${texNumR}.0);\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n const offset = getFlatOffsetUniformName(texName);\n return `\n float ${funcName}(int row, int col, int depth, int depth2, int depth3) {\n // Explicitly use integer operations as dot() only works on floats.\n int index = row * ${stride0} + col * ${stride1} + depth * ${stride2} +\n depth2 * ${stride3} + depth3 + ${offset};\n vec2 uv = uvFromFlat(${texNumR}, ${texNumC}, index);\n return sampleTexture(${texName}, uv);\n }\n `;\n}\nfunction getSampler6D(inputInfo) {\n const shape = inputInfo.shapeInfo.logicalShape;\n const texName = inputInfo.name;\n const funcName = \"get\" + texName.charAt(0).toUpperCase() + texName.slice(1);\n const { newShape, keptDims } = util_exports.squeezeShape(shape);\n if (newShape.length < shape.length) {\n const newInputInfo = squeezeInputInfo(inputInfo, newShape);\n const params = [\"row\", \"col\", \"depth\", \"depth2\", \"depth3\", \"depth4\"];\n return `\n ${getSamplerFromInInfo(newInputInfo)}\n float ${funcName}(int row, int col, int depth,\n int depth2, int depth3, int depth4) {\n return ${funcName}(${getSqueezedParams(params, keptDims)});\n }\n `;\n }\n const stride4 = shape[5];\n const stride3 = shape[4] * stride4;\n const stride2 = shape[3] * stride3;\n const stride1 = shape[2] * stride2;\n const stride0 = shape[1] * stride1;\n if (inputInfo.shapeInfo.isUniform) {\n return `\n float ${funcName}(int row, int col, int depth,\n int depth2, int depth3, int depth4) {\n int index = round(dot(\n vec4(row, col, depth, depth2),\n vec4(${stride0}, ${stride1}, ${stride2}, ${stride3})) +\n dot(\n vec2(depth3, depth4),\n vec2(${stride4}, 1)));\n ${getUniformSampler(inputInfo)}\n }\n `;\n }\n const flatOffset = inputInfo.shapeInfo.flatOffset;\n const texShape = inputInfo.shapeInfo.texShape;\n const texNumR = texShape[0];\n const texNumC = texShape[1];\n if (texNumC === stride0 && flatOffset == null) {\n return `\n float ${funcName}(int row, int col, int depth,\n int depth2, int depth3, int depth4) {\n int texR = row;\n float texC = dot(vec4(col, depth, depth2, depth3),\n vec4(${stride1}, ${stride2}, ${stride3}, ${stride4})) +\n float(depth4);\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2(${texNumC}.0, ${texNumR}.0);\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n if (texNumC === stride4 && flatOffset == null) {\n return `\n float ${funcName}(int row, int col, int depth,\n int depth2, int depth3, int depth4) {\n float texR = dot(vec4(row, col, depth, depth2),\n vec4(${shape[1] * shape[2] * shape[3] * shape[4]},\n ${shape[2] * shape[3] * shape[4]},\n ${shape[3] * shape[4]},\n ${shape[4]})) + float(depth3);\n int texC = depth4;\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2(${texNumC}.0, ${texNumR}.0);\n return sampleTexture(${texName}, uv);\n }\n `;\n }\n const offset = getFlatOffsetUniformName(texName);\n return `\n float ${funcName}(int row, int col, int depth,\n int depth2, int depth3, int depth4) {\n // Explicitly use integer operations as dot() only works on floats.\n int index = row * ${stride0} + col * ${stride1} + depth * ${stride2} +\n depth2 * ${stride3} + depth3 * ${stride4} + depth4 + ${offset};\n vec2 uv = uvFromFlat(${texNumR}, ${texNumC}, index);\n return sampleTexture(${texName}, uv);\n }\n `;\n}\nfunction getUniformSampler(inputInfo) {\n const texName = inputInfo.name;\n const inSize = util_exports.sizeFromShape(inputInfo.shapeInfo.logicalShape);\n if (inSize < 2) {\n return `return ${texName};`;\n }\n return `\n for (int i = 0; i < ${inSize}; i++) {\n if (i == index) {\n return ${texName}[i];\n }\n }\n `;\n}\nfunction getPackedSamplerAtOutputCoords(inputInfo, outShapeInfo) {\n const texName = inputInfo.name;\n const texFuncSnippet = texName.charAt(0).toUpperCase() + texName.slice(1);\n const funcName = \"get\" + texFuncSnippet + \"AtOutCoords\";\n const inRank = inputInfo.shapeInfo.logicalShape.length;\n const outRank = outShapeInfo.logicalShape.length;\n const broadcastDims = getBroadcastDims2(inputInfo.shapeInfo.logicalShape, outShapeInfo.logicalShape);\n const type = getCoordsDataType(outRank);\n const rankDiff = outRank - inRank;\n let coordsSnippet;\n const fields = [\"x\", \"y\", \"z\", \"w\", \"u\", \"v\"];\n if (inRank === 0) {\n coordsSnippet = \"\";\n } else if (outRank < 2 && broadcastDims.length >= 1) {\n coordsSnippet = \"coords = 0;\";\n } else {\n coordsSnippet = broadcastDims.map((d) => `coords.${fields[d + rankDiff]} = 0;`).join(\"\\n\");\n }\n let unpackedCoordsSnippet = \"\";\n if (outRank < 2 && inRank > 0) {\n unpackedCoordsSnippet = \"coords\";\n } else {\n unpackedCoordsSnippet = inputInfo.shapeInfo.logicalShape.map((s2, i2) => `coords.${fields[i2 + rankDiff]}`).join(\", \");\n }\n let output = `return outputValue;`;\n const inSize = util_exports.sizeFromShape(inputInfo.shapeInfo.logicalShape);\n const isInputScalar = inSize === 1;\n const outSize = util_exports.sizeFromShape(outShapeInfo.logicalShape);\n const isOutputScalar = outSize === 1;\n if (inRank === 1 && !isInputScalar && !isOutputScalar) {\n output = `\n return vec4(outputValue.xy, outputValue.xy);\n `;\n } else if (isInputScalar && !isOutputScalar) {\n if (outRank === 1) {\n output = `\n return vec4(outputValue.x, outputValue.x, 0., 0.);\n `;\n } else {\n output = `\n return vec4(outputValue.x);\n `;\n }\n } else if (broadcastDims.length) {\n const rows = inRank - 2;\n const cols = inRank - 1;\n if (broadcastDims.indexOf(rows) > -1 && broadcastDims.indexOf(cols) > -1) {\n output = `return vec4(outputValue.x);`;\n } else if (broadcastDims.indexOf(rows) > -1) {\n output = `return vec4(outputValue.x, outputValue.y, outputValue.x, outputValue.y);`;\n } else if (broadcastDims.indexOf(cols) > -1) {\n output = `return vec4(outputValue.xx, outputValue.zz);`;\n }\n }\n return `\n vec4 ${funcName}() {\n ${type} coords = getOutputCoords();\n ${coordsSnippet}\n vec4 outputValue = get${texFuncSnippet}(${unpackedCoordsSnippet});\n ${output}\n }\n `;\n}\nfunction getSamplerAtOutputCoords(inputInfo, outShapeInfo) {\n const texName = inputInfo.name;\n const texFuncSnippet = texName.charAt(0).toUpperCase() + texName.slice(1);\n const funcName = \"get\" + texFuncSnippet + \"AtOutCoords\";\n const outTexShape = outShapeInfo.texShape;\n const inTexShape = inputInfo.shapeInfo.texShape;\n const inRank = inputInfo.shapeInfo.logicalShape.length;\n const outRank = outShapeInfo.logicalShape.length;\n if (!inputInfo.shapeInfo.isUniform && inRank === outRank && inputInfo.shapeInfo.flatOffset == null && util_exports.arraysEqual(inTexShape, outTexShape)) {\n return `\n float ${funcName}() {\n return sampleTexture(${texName}, resultUV);\n }\n `;\n }\n const type = getCoordsDataType(outRank);\n const broadcastDims = getBroadcastDims2(inputInfo.shapeInfo.logicalShape, outShapeInfo.logicalShape);\n const rankDiff = outRank - inRank;\n let coordsSnippet;\n const fields = [\"x\", \"y\", \"z\", \"w\", \"u\", \"v\"];\n if (inRank === 0) {\n coordsSnippet = \"\";\n } else if (outRank < 2 && broadcastDims.length >= 1) {\n coordsSnippet = \"coords = 0;\";\n } else {\n coordsSnippet = broadcastDims.map((d) => `coords.${fields[d + rankDiff]} = 0;`).join(\"\\n\");\n }\n let unpackedCoordsSnippet = \"\";\n if (outRank < 2 && inRank > 0) {\n unpackedCoordsSnippet = \"coords\";\n } else {\n unpackedCoordsSnippet = inputInfo.shapeInfo.logicalShape.map((s2, i2) => `coords.${fields[i2 + rankDiff]}`).join(\", \");\n }\n return `\n float ${funcName}() {\n ${type} coords = getOutputCoords();\n ${coordsSnippet}\n return get${texFuncSnippet}(${unpackedCoordsSnippet});\n }\n `;\n}\nfunction getCoordsDataType(rank) {\n if (rank <= 1) {\n return \"int\";\n } else if (rank === 2) {\n return \"ivec2\";\n } else if (rank === 3) {\n return \"ivec3\";\n } else if (rank === 4) {\n return \"ivec4\";\n } else if (rank === 5) {\n return \"ivec5\";\n } else if (rank === 6) {\n return \"ivec6\";\n } else {\n throw Error(`GPU for rank ${rank} is not yet supported`);\n }\n}\nfunction getUniformInfoFromShape(isPacked, shape, texShape) {\n const { newShape, keptDims } = util_exports.squeezeShape(shape);\n const rank = shape.length;\n const useSqueezePackedShape = isPacked && rank === 3 && shape[0] === 1;\n const squeezeShape2 = useSqueezePackedShape ? shape.slice(1) : newShape;\n const useSqueezeShape = !isPacked && rank > 1 && !util_exports.arraysEqual(shape, texShape) && newShape.length < rank || useSqueezePackedShape;\n const uniformShape = useSqueezeShape ? squeezeShape2 : shape;\n return { useSqueezeShape, uniformShape, keptDims };\n}\nfunction squeezeInputInfo(inInfo, squeezedShape) {\n const newInputInfo = JSON.parse(JSON.stringify(inInfo));\n newInputInfo.shapeInfo.logicalShape = squeezedShape;\n return newInputInfo;\n}\nfunction getSqueezedParams(params, keptDims) {\n return keptDims.map((d) => params[d]).join(\", \");\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/gpgpu_math.js\nfunction compileProgram(gpgpu, program, inputs, output) {\n const inputInfos = inputs.map((input2, i2) => {\n const shapeInfo = {\n logicalShape: input2.shape,\n texShape: input2.isUniform ? null : input2.texData.texShape,\n isUniform: input2.isUniform,\n isPacked: input2.isUniform ? false : input2.texData.isPacked,\n flatOffset: null\n };\n if (input2.texData != null && input2.texData.slice != null && input2.texData.slice.flatOffset > 0) {\n shapeInfo.flatOffset = input2.texData.slice.flatOffset;\n }\n return { name: program.variableNames[i2], shapeInfo };\n });\n const inShapeInfos = inputInfos.map((x) => x.shapeInfo);\n const outShapeInfo = {\n logicalShape: output.shape,\n texShape: output.texData.texShape,\n isUniform: false,\n isPacked: output.texData.isPacked,\n flatOffset: null\n };\n const source = makeShader(inputInfos, outShapeInfo, program);\n const fragmentShader = createFragmentShader(gpgpu.gl, source);\n const webGLProgram = gpgpu.createProgram(fragmentShader);\n if (!env().get(\"ENGINE_COMPILE_ONLY\")) {\n return Object.assign({\n program,\n fragmentShader,\n source,\n webGLProgram,\n inShapeInfos,\n outShapeInfo\n }, getUniformLocations(gpgpu, program, webGLProgram));\n } else {\n return {\n program,\n fragmentShader,\n source,\n webGLProgram,\n inShapeInfos,\n outShapeInfo,\n uniformLocations: null,\n customUniformLocations: null,\n infLoc: null,\n nanLoc: null,\n inShapesLocations: null,\n inTexShapesLocations: null,\n outShapeLocation: null,\n outShapeStridesLocation: null,\n outTexShapeLocation: null\n };\n }\n}\nfunction getUniformLocations(gpgpu, program, webGLProgram) {\n const uniformLocations = {};\n const inShapesLocations = {};\n const inTexShapesLocations = {};\n const customUniformLocations = [];\n let outShapeLocation;\n let outTexShapeLocation;\n let outShapeStridesLocation;\n let infLoc = null;\n let nanLoc = null;\n nanLoc = gpgpu.getUniformLocation(webGLProgram, \"NAN\", false);\n if (env().getNumber(\"WEBGL_VERSION\") === 1) {\n infLoc = gpgpu.getUniformLocation(webGLProgram, \"INFINITY\", false);\n }\n const shouldThrow = false;\n for (let i2 = 0; i2 < program.variableNames.length; i2++) {\n const varName = program.variableNames[i2];\n uniformLocations[varName] = gpgpu.getUniformLocation(webGLProgram, varName, shouldThrow);\n uniformLocations[`offset${varName}`] = gpgpu.getUniformLocation(webGLProgram, `offset${varName}`, shouldThrow);\n if (program.enableShapeUniforms) {\n inShapesLocations[`${varName}Shape`] = gpgpu.getUniformLocation(webGLProgram, `${varName}Shape`, shouldThrow);\n inTexShapesLocations[`${varName}TexShape`] = gpgpu.getUniformLocation(webGLProgram, `${varName}TexShape`, shouldThrow);\n }\n }\n if (program.enableShapeUniforms) {\n outShapeLocation = gpgpu.getUniformLocation(webGLProgram, \"outShape\", shouldThrow);\n outShapeStridesLocation = gpgpu.getUniformLocation(webGLProgram, \"outShapeStrides\", shouldThrow);\n outTexShapeLocation = gpgpu.getUniformLocation(webGLProgram, \"outTexShape\", shouldThrow);\n }\n if (program.customUniforms) {\n program.customUniforms.forEach((d, i2) => {\n customUniformLocations[i2] = gpgpu.getUniformLocation(webGLProgram, d.name, shouldThrow);\n });\n }\n return {\n uniformLocations,\n customUniformLocations,\n infLoc,\n nanLoc,\n inShapesLocations,\n inTexShapesLocations,\n outShapeLocation,\n outShapeStridesLocation,\n outTexShapeLocation\n };\n}\nfunction validateBinaryAndProgram(shapeInfos, inputs) {\n if (shapeInfos.length !== inputs.length) {\n throw Error(`Binary was compiled with ${shapeInfos.length} inputs, but was executed with ${inputs.length} inputs`);\n }\n shapeInfos.forEach((s2, i2) => {\n const shapeA = s2.logicalShape;\n const input2 = inputs[i2];\n const shapeB = input2.shape;\n if (!util_exports.arraysEqual(shapeA, shapeB)) {\n throw Error(`Binary was compiled with different shapes than the current args. Shapes ${shapeA} and ${shapeB} must match`);\n }\n if (s2.isUniform && input2.isUniform) {\n return;\n }\n const texShapeA = s2.texShape;\n const texShapeB = input2.isUniform ? null : input2.texData.texShape;\n if (!util_exports.arraysEqual(texShapeA, texShapeB)) {\n throw Error(`Binary was compiled with different texture shapes than the current args. Shape ${texShapeA} and ${texShapeB} must match`);\n }\n });\n}\nfunction runProgram(gpgpu, binary, inputs, output, customUniformValues) {\n if (!binary.program.enableShapeUniforms) {\n validateBinaryAndProgram(binary.inShapeInfos, inputs);\n validateBinaryAndProgram([binary.outShapeInfo], [output]);\n }\n const outTex = output.texData.texture;\n const outTexShape = output.texData.texShape;\n if (output.texData.isPacked) {\n gpgpu.setOutputPackedMatrixTexture(outTex.texture, outTexShape[0], outTexShape[1]);\n } else {\n gpgpu.setOutputMatrixTexture(outTex.texture, outTexShape[0], outTexShape[1]);\n }\n gpgpu.setProgram(binary.webGLProgram);\n if (env().getNumber(\"WEBGL_VERSION\") === 1) {\n if (binary.infLoc !== null) {\n gpgpu.gl.uniform1f(binary.infLoc, Infinity);\n }\n }\n if (binary.nanLoc !== null) {\n gpgpu.gl.uniform1f(binary.nanLoc, NaN);\n }\n inputs.forEach((input2, i2) => {\n const varName = binary.program.variableNames[i2];\n const varLoc = binary.uniformLocations[varName];\n const varOffsetLoc = binary.uniformLocations[`offset${varName}`];\n const varShapeLoc = binary.inShapesLocations[`${varName}Shape`];\n const varTexShapeLoc = binary.inTexShapesLocations[`${varName}TexShape`];\n if (varShapeLoc) {\n const { uniformShape } = getUniformInfoFromShape(binary.program.packedInputs, input2.shape, input2.texData.texShape);\n switch (uniformShape.length) {\n case 1:\n gpgpu.gl.uniform1iv(varShapeLoc, new Int32Array(uniformShape));\n break;\n case 2:\n gpgpu.gl.uniform2iv(varShapeLoc, new Int32Array(uniformShape));\n break;\n case 3:\n gpgpu.gl.uniform3iv(varShapeLoc, new Int32Array(uniformShape));\n break;\n case 4:\n gpgpu.gl.uniform4iv(varShapeLoc, new Int32Array(uniformShape));\n break;\n default:\n break;\n }\n }\n if (varTexShapeLoc) {\n gpgpu.gl.uniform2i(varTexShapeLoc, input2.texData.texShape[0], input2.texData.texShape[1]);\n }\n if (varLoc == null) {\n return;\n }\n if (input2.isUniform) {\n if (util_exports.sizeFromShape(input2.shape) < 2) {\n gpgpu.gl.uniform1f(varLoc, input2.uniformValues[0]);\n } else {\n let vals = input2.uniformValues;\n if (!(vals instanceof Float32Array)) {\n vals = new Float32Array(vals);\n }\n gpgpu.gl.uniform1fv(varLoc, vals);\n }\n return;\n }\n if (input2.texData.slice != null && varOffsetLoc != null) {\n gpgpu.gl.uniform1i(varOffsetLoc, input2.texData.slice.flatOffset);\n }\n gpgpu.setInputMatrixTexture(input2.texData.texture.texture, varLoc, i2);\n });\n const outShapeLoc = binary.outShapeLocation;\n if (outShapeLoc) {\n switch (output.shape.length) {\n case 1:\n gpgpu.gl.uniform1iv(outShapeLoc, new Int32Array(output.shape));\n break;\n case 2:\n gpgpu.gl.uniform2iv(outShapeLoc, new Int32Array(output.shape));\n break;\n case 3:\n gpgpu.gl.uniform3iv(outShapeLoc, new Int32Array(output.shape));\n break;\n case 4:\n gpgpu.gl.uniform4iv(outShapeLoc, new Int32Array(output.shape));\n break;\n default:\n break;\n }\n }\n if (binary.outShapeStridesLocation) {\n const strides = util_exports.computeStrides(output.shape);\n switch (output.shape.length) {\n case 2:\n gpgpu.gl.uniform1iv(binary.outShapeStridesLocation, new Int32Array(strides));\n break;\n case 3:\n gpgpu.gl.uniform2iv(binary.outShapeStridesLocation, new Int32Array(strides));\n break;\n case 4:\n gpgpu.gl.uniform3iv(binary.outShapeStridesLocation, new Int32Array(strides));\n break;\n default:\n break;\n }\n }\n if (binary.outTexShapeLocation) {\n gpgpu.gl.uniform2i(binary.outTexShapeLocation, output.texData.texShape[0], output.texData.texShape[1]);\n }\n if (binary.program.customUniforms && customUniformValues) {\n binary.program.customUniforms.forEach((d, i2) => {\n const customLoc = binary.customUniformLocations[i2];\n const customValue = customUniformValues[i2];\n if (d.type === \"float\") {\n gpgpu.gl.uniform1fv(customLoc, customValue);\n } else if (d.type === \"vec2\") {\n gpgpu.gl.uniform2fv(customLoc, customValue);\n } else if (d.type === \"vec3\") {\n gpgpu.gl.uniform3fv(customLoc, customValue);\n } else if (d.type === \"vec4\") {\n gpgpu.gl.uniform4fv(customLoc, customValue);\n } else if (d.type === \"int\") {\n gpgpu.gl.uniform1iv(customLoc, customValue);\n } else if (d.type === \"ivec2\") {\n gpgpu.gl.uniform2iv(customLoc, customValue);\n } else if (d.type === \"ivec3\") {\n gpgpu.gl.uniform3iv(customLoc, customValue);\n } else if (d.type === \"ivec4\") {\n gpgpu.gl.uniform4iv(customLoc, customValue);\n } else {\n throw Error(`uniform type ${d.type} is not supported yet.`);\n }\n });\n }\n gpgpu.executeProgram();\n}\nfunction makeShaderKey(program, inputs, output) {\n let keyInputs = \"\";\n inputs.concat(output).forEach((x) => {\n const hasOffset = x.texData != null && x.texData.slice != null && x.texData.slice.flatOffset > 0;\n if (program.enableShapeUniforms && !x.isUniform) {\n const xTexShape = x.texData.texShape;\n const { useSqueezeShape, uniformShape, keptDims } = getUniformInfoFromShape(program.packedInputs, x.shape, xTexShape);\n let rank1 = \"\", rank2 = \"\", rank34 = \"\";\n if (uniformShape.length === 1 && program.packedInputs) {\n const packedTexShape = [Math.ceil(xTexShape[0] / 2), Math.ceil(xTexShape[1] / 2)];\n rank1 = `${packedTexShape[0] > 1}_${packedTexShape[1] > 1}`;\n } else if (uniformShape.length === 2 && !program.packedInputs) {\n rank2 = `${uniformShape[0] > 1}_${uniformShape[1] > 1}`;\n } else if (uniformShape.length > 2 && !program.packedInputs) {\n const strides = util_exports.computeStrides(uniformShape);\n rank34 = `${strides[0] === xTexShape[1]}_${strides[strides.length - 1] === xTexShape[1]}`;\n }\n const xRank = x.shape.length;\n const isLogicalShapTexShapeEqual = uniformShape.length === 2 && util_exports.arraysEqual(x.shape, xTexShape);\n const isScalar = util_exports.sizeFromShape(x.shape) === 1;\n const broadcastDims = backend_util_exports.getBroadcastDims(x.shape, output.shape);\n const isInOutTexShapeEqual = !program.packedInputs && xRank === output.shape.length && util_exports.arraysEqual(xTexShape, output.texData.texShape);\n const isTexShapeGreaterThanOne = program.packedInputs || uniformShape.length > 2 ? \"\" : `${xTexShape[0] > 1}_${xTexShape[1] > 1}`;\n keyInputs += `${xRank}_${isInOutTexShapeEqual}_${useSqueezeShape ? keptDims : \"\"}_${uniformShape.length}_${isScalar}_${broadcastDims}_${isLogicalShapTexShapeEqual}_${rank1}_${rank2}_${rank34}_${isTexShapeGreaterThanOne}_${hasOffset}`;\n } else {\n const texShape = x.isUniform ? \"uniform\" : x.texData.texShape;\n keyInputs += `${x.shape}_${texShape}_${hasOffset}`;\n }\n });\n const keyUserCode = program.userCode;\n let key = program.constructor.name;\n key += \"_\" + keyInputs + \"_\" + keyUserCode + `${env().getNumber(\"WEBGL_VERSION\")}`;\n return key;\n}\nfunction useShapeUniforms(rank) {\n return env().getBool(\"WEBGL_USE_SHAPES_UNIFORMS\") && rank <= 4;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/decode_matrix_gpu.js\nvar DecodeMatrixProgram = class {\n constructor(outputShape) {\n this.variableNames = [\"A\"];\n this.packedInputs = false;\n this.packedOutput = true;\n this.outPackingScheme = PackingScheme.DENSE;\n this.customUniforms = [{ name: \"texShape\", type: \"ivec2\" }];\n const glsl = getGlslDifferences();\n this.outputShape = outputShape;\n this.enableShapeUniforms = useShapeUniforms(this.outputShape.length);\n this.userCode = `\n ivec3 outCoordsFromFlatIndex(int index) {\n ${this.enableShapeUniforms ? getOutputLogicalCoordinatesFromFlatIndexByUniform([\"r\", \"c\", \"d\"], outputShape) : getLogicalCoordinatesFromFlatIndex([\"r\", \"c\", \"d\"], outputShape)}\n return ivec3(r, c, d);\n }\n\n void main() {\n ivec2 resTexRC = ivec2(resultUV.yx * vec2(texShape[0], texShape[1]));\n int index = 4 * (resTexRC.x * texShape[1] + resTexRC.y);\n\n vec4 result = vec4(0.);\n\n for (int i=0; i<4; i++) {\n int flatIndex = index + i;\n ivec3 rc = outCoordsFromFlatIndex(flatIndex);\n result[i] = getA(rc.x, rc.y, rc.z);\n }\n\n ${glsl.output} = result;\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/decode_matrix_packed_gpu.js\nvar DecodeMatrixPackedProgram = class {\n constructor(outputShape) {\n this.variableNames = [\"A\"];\n this.packedInputs = true;\n this.packedOutput = true;\n this.outPackingScheme = PackingScheme.DENSE;\n this.customUniforms = [{ name: \"texShape\", type: \"ivec2\" }];\n const glsl = getGlslDifferences();\n this.outputShape = outputShape;\n this.enableShapeUniforms = useShapeUniforms(this.outputShape.length);\n this.userCode = `\n ivec3 outCoordsFromFlatIndex(int index) {\n ${this.enableShapeUniforms ? getOutputLogicalCoordinatesFromFlatIndexByUniform([\"r\", \"c\", \"d\"], outputShape) : getLogicalCoordinatesFromFlatIndex([\"r\", \"c\", \"d\"], outputShape)}\n return ivec3(r, c, d);\n }\n\n void main() {\n ivec2 resTexRC = ivec2(resultUV.yx * vec2(texShape[0], texShape[1]));\n int index = 4 * (resTexRC.x * texShape[1] + resTexRC.y);\n\n vec4 result = vec4(0.);\n\n for (int i=0; i<4; i++) {\n int flatIndex = index + i;\n ivec3 rc = outCoordsFromFlatIndex(flatIndex);\n result[i] = getChannel(getA(rc.x, rc.y, rc.z), vec2(rc.y, rc.z));\n }\n\n ${glsl.output} = result;\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/encode_float_gpu.js\nvar EncodeFloatProgram = class {\n constructor(outputShape) {\n this.variableNames = [\"A\"];\n this.outTexUsage = TextureUsage.DOWNLOAD;\n const glsl = getGlslDifferences();\n this.outputShape = outputShape;\n this.userCode = `\n ${ENCODE_FLOAT_SNIPPET}\n\n void main() {\n float x = getAAtOutCoords();\n ${glsl.output} = encode_float(x);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/encode_float_packed_gpu.js\nvar EncodeFloatPackedProgram = class {\n constructor(outputShape) {\n this.variableNames = [\"A\"];\n this.packedInputs = true;\n this.packedOutput = false;\n this.outTexUsage = TextureUsage.DOWNLOAD;\n const glsl = getGlslDifferences();\n this.outputShape = outputShape;\n this.userCode = `\n ${ENCODE_FLOAT_SNIPPET}\n\n void main() {\n ivec3 coords = getOutputCoords();\n float x = getChannel(getAAtOutCoords(), vec2(coords.y, coords.z));\n ${glsl.output} = encode_float(x);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/encode_matrix_gpu.js\nvar EncodeMatrixProgram = class {\n constructor(outputShape, inputIsUnsignedByte = false) {\n this.variableNames = [\"A\"];\n this.customUniforms = [{ name: \"texShape\", type: \"ivec2\" }];\n const glsl = getGlslDifferences();\n this.outputShape = outputShape;\n this.enableShapeUniforms = useShapeUniforms(this.outputShape.length);\n let output = `result`;\n if (inputIsUnsignedByte) {\n output = `floor(result * 255. + 0.5)`;\n }\n this.userCode = `\n ${this.enableShapeUniforms ? getFlatIndexFrom3DOutput() : getFlatIndexFrom3D(outputShape)}\n\n void main() {\n ivec3 coords = getOutputCoords();\n\n int flatIndex = getFlatIndex(coords);\n int offset = imod(flatIndex, 4);\n\n flatIndex = idiv(flatIndex, 4, 1.);\n\n int r = flatIndex / texShape[1];\n int c = imod(flatIndex, texShape[1]);\n vec2 uv = (vec2(c, r) + halfCR) / vec2(texShape[1], texShape[0]);\n vec4 values = ${glsl.texture2D}(A, uv);\n\n float result;\n\n if(offset == 0) {\n result = values[0];\n } else if(offset == 1) {\n result = values[1];\n } else if(offset == 2) {\n result = values[2];\n } else {\n result = values[3];\n }\n\n ${glsl.output} = vec4(${output}, 0., 0., 0.);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/encode_matrix_packed_gpu.js\nvar EncodeMatrixPackedProgram = class {\n constructor(outputShape, inputIsUnsignedByte = false) {\n this.variableNames = [\"A\"];\n this.packedInputs = false;\n this.packedOutput = true;\n this.customUniforms = [{ name: \"texShape\", type: \"ivec2\" }];\n const glsl = getGlslDifferences();\n this.outputShape = outputShape;\n this.enableShapeUniforms = useShapeUniforms(this.outputShape.length);\n let mainLoop = \"\";\n let output = \"result\";\n if (inputIsUnsignedByte) {\n output = \"floor(result * 255. + 0.5)\";\n }\n for (let row = 0; row <= 1; row++) {\n for (let col = 0; col <= 1; col++) {\n const channel = row * 2 + col;\n mainLoop += `\n localCoords = coords;\n if(localCoords[2] + ${col} < ${this.enableShapeUniforms ? \"outShape[2]\" : `${outputShape[2]}`}) {\n localCoords[2] += ${col};\n if (localCoords[1] + ${row} < ${this.enableShapeUniforms ? \"outShape[1]\" : `${outputShape[1]}`}) {\n localCoords[1] += ${row};\n\n flatIndex = getFlatIndex(localCoords);\n offset = imod(flatIndex, 4);\n\n flatIndex = idiv(flatIndex, 4, 1.);\n\n int r = flatIndex / texShape[1];\n int c = imod(flatIndex, texShape[1]);\n vec2 uv = (vec2(c, r) + halfCR) / vec2(texShape[1], texShape[0]);\n values = ${glsl.texture2D}(A, uv);\n\n if (offset == 0) {\n result[${channel}] = values[0];\n } else if (offset == 1) {\n result[${channel}] = values[1];\n } else if (offset == 2) {\n result[${channel}] = values[2];\n } else {\n result[${channel}] = values[3];\n }\n }\n }\n `;\n }\n }\n this.userCode = `\n ${this.enableShapeUniforms ? getFlatIndexFrom3DOutput() : getFlatIndexFrom3D(outputShape)}\n\n void main() {\n ivec3 coords = getOutputCoords();\n\n vec4 result = vec4(0.);\n int flatIndex, r, c, offset;\n ivec3 localCoords;\n vec2 uv;\n vec4 values;\n\n ${mainLoop}\n\n ${glsl.output} = ${output};\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/gpgpu_util.js\nvar gpgpu_util_exports = {};\n__export(gpgpu_util_exports, {\n bindVertexProgramAttributeStreams: () => bindVertexProgramAttributeStreams,\n createBufferFromOutputTexture: () => createBufferFromOutputTexture,\n createFloat16MatrixTexture: () => createFloat16MatrixTexture,\n createFloat16PackedMatrixTexture: () => createFloat16PackedMatrixTexture,\n createFloat32MatrixTexture: () => createFloat32MatrixTexture,\n createIndexBuffer: () => createIndexBuffer,\n createPackedMatrixTexture: () => createPackedMatrixTexture,\n createUnsignedBytesMatrixTexture: () => createUnsignedBytesMatrixTexture,\n createVertexBuffer: () => createVertexBuffer,\n createVertexShader: () => createVertexShader2,\n downloadByteEncodedFloatMatrixFromOutputTexture: () => downloadByteEncodedFloatMatrixFromOutputTexture,\n downloadFloat32MatrixFromBuffer: () => downloadFloat32MatrixFromBuffer,\n downloadMatrixFromPackedOutputTexture: () => downloadMatrixFromPackedOutputTexture,\n downloadPackedMatrixFromBuffer: () => downloadPackedMatrixFromBuffer,\n getInternalFormatForFloat16MatrixTexture: () => getInternalFormatForFloat16MatrixTexture,\n getInternalFormatForFloat16PackedMatrixTexture: () => getInternalFormatForFloat16PackedMatrixTexture,\n getInternalFormatForFloat32MatrixTexture: () => getInternalFormatForFloat32MatrixTexture,\n getInternalFormatForPackedMatrixTexture: () => getInternalFormatForPackedMatrixTexture,\n getInternalFormatForUnsignedBytesMatrixTexture: () => getInternalFormatForUnsignedBytesMatrixTexture,\n uploadDenseMatrixToTexture: () => uploadDenseMatrixToTexture,\n uploadPixelDataToTexture: () => uploadPixelDataToTexture\n});\nfunction createVertexShader2(gl) {\n const glsl = getGlslDifferences();\n const vertexShaderSource = `${glsl.version}\n precision highp float;\n ${glsl.attribute} vec3 clipSpacePos;\n ${glsl.attribute} vec2 uv;\n ${glsl.varyingVs} vec2 resultUV;\n\n void main() {\n gl_Position = vec4(clipSpacePos, 1);\n resultUV = uv;\n }`;\n return createVertexShader(gl, vertexShaderSource);\n}\nfunction createVertexBuffer(gl) {\n const vertexArray = new Float32Array([-1, 1, 0, 0, 1, -1, -1, 0, 0, 0, 1, 1, 0, 1, 1, 1, -1, 0, 1, 0]);\n return createStaticVertexBuffer(gl, vertexArray);\n}\nfunction createIndexBuffer(gl) {\n const triangleVertexIndices = new Uint16Array([0, 1, 2, 2, 1, 3]);\n return createStaticIndexBuffer(gl, triangleVertexIndices);\n}\nfunction createAndConfigureTexture(gl, width, height, internalFormat, textureFormat, textureType) {\n validateTextureSize(width, height);\n const texture = createTexture(gl);\n const tex2d = gl.TEXTURE_2D;\n callAndCheck(gl, () => gl.bindTexture(tex2d, texture));\n callAndCheck(gl, () => gl.texParameteri(tex2d, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE));\n callAndCheck(gl, () => gl.texParameteri(tex2d, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE));\n callAndCheck(gl, () => gl.texParameteri(tex2d, gl.TEXTURE_MIN_FILTER, gl.NEAREST));\n callAndCheck(gl, () => gl.texParameteri(tex2d, gl.TEXTURE_MAG_FILTER, gl.NEAREST));\n if (env().getNumber(\"WEBGL_VERSION\") === 1) {\n callAndCheck(gl, () => gl.texImage2D(tex2d, 0, internalFormat, width, height, 0, textureFormat, textureType, null));\n } else {\n callAndCheck(gl, () => gl.texStorage2D(tex2d, 1, internalFormat, width, height));\n }\n callAndCheck(gl, () => gl.bindTexture(gl.TEXTURE_2D, null));\n return { texture, texShape: [height, width] };\n}\nfunction getInternalFormatForFloat32MatrixTexture(textureConfig) {\n return textureConfig.internalFormatFloat;\n}\nfunction createFloat32MatrixTexture(gl, rows, columns, textureConfig) {\n const [width, height] = getUnpackedMatrixTextureShapeWidthHeight(rows, columns);\n return createAndConfigureTexture(gl, width, height, getInternalFormatForFloat32MatrixTexture(textureConfig), textureConfig.textureFormatFloat, gl.FLOAT);\n}\nfunction getInternalFormatForFloat16MatrixTexture(textureConfig) {\n return textureConfig.internalFormatHalfFloat;\n}\nfunction createFloat16MatrixTexture(gl, rows, columns, textureConfig) {\n const [width, height] = getUnpackedMatrixTextureShapeWidthHeight(rows, columns);\n return createAndConfigureTexture(gl, width, height, getInternalFormatForFloat16MatrixTexture(textureConfig), textureConfig.textureFormatFloat, textureConfig.textureTypeHalfFloat);\n}\nfunction getInternalFormatForUnsignedBytesMatrixTexture(textureConfig) {\n return textureConfig.downloadTextureFormat;\n}\nfunction createUnsignedBytesMatrixTexture(gl, rows, columns, textureConfig) {\n const [width, height] = getUnpackedMatrixTextureShapeWidthHeight(rows, columns);\n return createAndConfigureTexture(gl, width, height, getInternalFormatForUnsignedBytesMatrixTexture(textureConfig), gl.RGBA, gl.UNSIGNED_BYTE);\n}\nfunction getInternalFormatForPackedMatrixTexture(textureConfig) {\n return textureConfig.internalFormatPackedFloat;\n}\nfunction createPackedMatrixTexture(gl, rows, columns, textureConfig) {\n const [width, height] = getPackedMatrixTextureShapeWidthHeight(rows, columns);\n return createAndConfigureTexture(gl, width, height, getInternalFormatForPackedMatrixTexture(textureConfig), gl.RGBA, gl.FLOAT);\n}\nfunction getInternalFormatForFloat16PackedMatrixTexture(textureConfig) {\n return textureConfig.internalFormatPackedHalfFloat;\n}\nfunction createFloat16PackedMatrixTexture(gl, rows, columns, textureConfig) {\n const [width, height] = getPackedMatrixTextureShapeWidthHeight(rows, columns);\n return createAndConfigureTexture(gl, width, height, getInternalFormatForFloat16PackedMatrixTexture(textureConfig), gl.RGBA, textureConfig.textureTypeHalfFloat);\n}\nfunction bindVertexProgramAttributeStreams(gl, program, vertexBuffer) {\n const posOffset = 0;\n const uvOffset = 3 * 4;\n const stride = 3 * 4 + 2 * 4;\n callAndCheck(gl, () => gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer));\n const success = bindVertexBufferToProgramAttribute(gl, program, \"clipSpacePos\", vertexBuffer, 3, stride, posOffset);\n return success && bindVertexBufferToProgramAttribute(gl, program, \"uv\", vertexBuffer, 2, stride, uvOffset);\n}\nfunction uploadDenseMatrixToTexture(gl, texture, width, height, data, textureConfig) {\n callAndCheck(gl, () => gl.bindTexture(gl.TEXTURE_2D, texture));\n let dataForUpload, texelDataType, internalFormat;\n if (data instanceof Uint8Array) {\n dataForUpload = new Uint8Array(width * height * 4);\n texelDataType = gl.UNSIGNED_BYTE;\n internalFormat = gl.RGBA;\n } else {\n dataForUpload = new Float32Array(width * height * 4);\n texelDataType = gl.FLOAT;\n internalFormat = textureConfig.internalFormatPackedFloat;\n }\n dataForUpload.set(data);\n if (env().getNumber(\"WEBGL_VERSION\") === 2) {\n callAndCheck(gl, () => gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, width, height, gl.RGBA, texelDataType, dataForUpload));\n } else {\n callAndCheck(gl, () => gl.texImage2D(gl.TEXTURE_2D, 0, internalFormat, width, height, 0, gl.RGBA, texelDataType, dataForUpload));\n }\n callAndCheck(gl, () => gl.bindTexture(gl.TEXTURE_2D, null));\n}\nfunction uploadPixelDataToTexture(gl, texture, pixels) {\n callAndCheck(gl, () => gl.bindTexture(gl.TEXTURE_2D, texture));\n if (pixels.data instanceof Uint8Array) {\n if (env().getNumber(\"WEBGL_VERSION\") === 2) {\n callAndCheck(gl, () => gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, pixels.width, pixels.height, gl.RGBA, gl.UNSIGNED_BYTE, pixels.data));\n } else {\n callAndCheck(gl, () => gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, pixels.width, pixels.height, 0, gl.RGBA, gl.UNSIGNED_BYTE, pixels.data));\n }\n } else {\n if (env().getNumber(\"WEBGL_VERSION\") === 2) {\n callAndCheck(gl, () => gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, pixels));\n } else {\n callAndCheck(gl, () => gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, pixels));\n }\n }\n callAndCheck(gl, () => gl.bindTexture(gl.TEXTURE_2D, null));\n}\nfunction createBufferFromOutputTexture(gl2, rows, columns, textureConfig) {\n const buffer2 = gl2.createBuffer();\n callAndCheck(gl2, () => gl2.bindBuffer(gl2.PIXEL_PACK_BUFFER, buffer2));\n const bytesPerFloat = 4;\n const valuesPerTexel = 4;\n const bufferSizeBytes = bytesPerFloat * valuesPerTexel * rows * columns;\n callAndCheck(gl2, () => gl2.bufferData(gl2.PIXEL_PACK_BUFFER, bufferSizeBytes, gl2.STREAM_READ));\n callAndCheck(gl2, () => gl2.readPixels(0, 0, columns, rows, gl2.RGBA, gl2.FLOAT, 0));\n callAndCheck(gl2, () => gl2.bindBuffer(gl2.PIXEL_PACK_BUFFER, null));\n return buffer2;\n}\nfunction downloadFloat32MatrixFromBuffer(gl, buffer2, size) {\n const gl2 = gl;\n const downloadTarget = new Float32Array(size);\n gl2.bindBuffer(gl2.PIXEL_PACK_BUFFER, buffer2);\n gl2.getBufferSubData(gl2.PIXEL_PACK_BUFFER, 0, downloadTarget);\n gl2.bindBuffer(gl2.PIXEL_PACK_BUFFER, null);\n return downloadTarget;\n}\nfunction downloadByteEncodedFloatMatrixFromOutputTexture(gl, rows, columns, textureConfig) {\n const [w, h] = getUnpackedMatrixTextureShapeWidthHeight(rows, columns);\n const numChannels = 4;\n const downloadTarget = new Uint8Array(getUnpackedArraySizeFromMatrixSize(rows * columns, numChannels));\n callAndCheck(gl, () => gl.readPixels(0, 0, w, h, textureConfig.downloadTextureFormat, gl.UNSIGNED_BYTE, downloadTarget));\n return new Float32Array(downloadTarget.buffer);\n}\nfunction downloadPackedMatrixFromBuffer(gl, buffer2, batch, rows, cols, physicalRows, physicalCols, textureConfig) {\n const gl2 = gl;\n const downloadTarget = new Float32Array(getPackedRGBAArraySizeFromMatrixShape(physicalRows, physicalCols));\n gl2.bindBuffer(gl2.PIXEL_PACK_BUFFER, buffer2);\n gl2.getBufferSubData(gl2.PIXEL_PACK_BUFFER, 0, downloadTarget);\n gl2.bindBuffer(gl2.PIXEL_PACK_BUFFER, null);\n return downloadTarget;\n}\nfunction downloadMatrixFromPackedOutputTexture(gl, physicalRows, physicalCols) {\n const packedRGBA = new Float32Array(physicalRows * physicalCols * 4);\n callAndCheck(gl, () => gl.readPixels(0, 0, physicalCols, physicalRows, gl.RGBA, gl.FLOAT, packedRGBA));\n return packedRGBA;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/gpgpu_context.js\nvar GPGPUContext = class {\n constructor(gl) {\n this.outputTexture = null;\n this.program = null;\n this.disposed = false;\n this.vertexAttrsAreBound = false;\n this.itemsToPoll = [];\n const glVersion = env().getNumber(\"WEBGL_VERSION\");\n if (gl != null) {\n this.gl = gl;\n setWebGLContext(glVersion, gl);\n } else {\n this.gl = getWebGLContext(glVersion);\n }\n let COLOR_BUFFER_FLOAT = \"WEBGL_color_buffer_float\";\n const COLOR_BUFFER_HALF_FLOAT = \"EXT_color_buffer_half_float\";\n this.parallelCompilationExtension = this.gl.getExtension(\"KHR_parallel_shader_compile\");\n if (env().getNumber(\"WEBGL_VERSION\") === 1) {\n const TEXTURE_FLOAT = \"OES_texture_float\";\n const TEXTURE_HALF_FLOAT = \"OES_texture_half_float\";\n this.textureFloatExtension = getExtensionOrThrow(this.gl, TEXTURE_FLOAT);\n if (hasExtension(this.gl, TEXTURE_HALF_FLOAT)) {\n this.textureHalfFloatExtension = getExtensionOrThrow(this.gl, TEXTURE_HALF_FLOAT);\n } else if (env().get(\"WEBGL_FORCE_F16_TEXTURES\")) {\n throw new Error(\"GL context does not support half float textures, yet the environment flag WEBGL_FORCE_F16_TEXTURES is set to true.\");\n }\n this.colorBufferFloatExtension = this.gl.getExtension(COLOR_BUFFER_FLOAT);\n if (hasExtension(this.gl, COLOR_BUFFER_HALF_FLOAT)) {\n this.colorBufferHalfFloatExtension = getExtensionOrThrow(this.gl, COLOR_BUFFER_HALF_FLOAT);\n } else if (env().get(\"WEBGL_FORCE_F16_TEXTURES\")) {\n throw new Error(\"GL context does not support color renderable half floats, yet the environment flag WEBGL_FORCE_F16_TEXTURES is set to true.\");\n }\n } else {\n COLOR_BUFFER_FLOAT = \"EXT_color_buffer_float\";\n if (hasExtension(this.gl, COLOR_BUFFER_FLOAT)) {\n this.colorBufferFloatExtension = this.gl.getExtension(COLOR_BUFFER_FLOAT);\n } else if (hasExtension(this.gl, COLOR_BUFFER_HALF_FLOAT)) {\n this.colorBufferHalfFloatExtension = this.gl.getExtension(COLOR_BUFFER_HALF_FLOAT);\n } else {\n throw new Error(\"GL context does not support color renderable floats\");\n }\n }\n this.vertexBuffer = createVertexBuffer(this.gl);\n this.indexBuffer = createIndexBuffer(this.gl);\n this.framebuffer = createFramebuffer(this.gl);\n this.textureConfig = getTextureConfig(this.gl, this.textureHalfFloatExtension);\n }\n get debug() {\n return env().getBool(\"DEBUG\");\n }\n dispose() {\n if (this.disposed) {\n return;\n }\n if (this.program != null) {\n console.warn(\"Disposing a GPGPUContext that still has a bound WebGLProgram. This is probably a resource leak, delete the program with GPGPUContext.deleteProgram before disposing.\");\n }\n if (this.outputTexture != null) {\n console.warn(\"Disposing a GPGPUContext that still has a bound output matrix texture. This is probably a resource leak, delete the output matrix texture with GPGPUContext.deleteMatrixTexture before disposing.\");\n }\n const gl = this.gl;\n callAndCheck(gl, () => gl.finish());\n callAndCheck(gl, () => gl.bindFramebuffer(gl.FRAMEBUFFER, null));\n callAndCheck(gl, () => gl.deleteFramebuffer(this.framebuffer));\n callAndCheck(gl, () => gl.bindBuffer(gl.ARRAY_BUFFER, null));\n callAndCheck(gl, () => gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null));\n callAndCheck(gl, () => gl.deleteBuffer(this.indexBuffer));\n this.disposed = true;\n }\n createFloat32MatrixTexture(rows, columns) {\n this.throwIfDisposed();\n return createFloat32MatrixTexture(this.gl, rows, columns, this.textureConfig);\n }\n createFloat16MatrixTexture(rows, columns) {\n this.throwIfDisposed();\n return createFloat16MatrixTexture(this.gl, rows, columns, this.textureConfig);\n }\n createUnsignedBytesMatrixTexture(rows, columns) {\n this.throwIfDisposed();\n return createUnsignedBytesMatrixTexture(this.gl, rows, columns, this.textureConfig);\n }\n uploadPixelDataToTexture(texture, pixels) {\n this.throwIfDisposed();\n uploadPixelDataToTexture(this.gl, texture, pixels);\n }\n uploadDenseMatrixToTexture(texture, width, height, data) {\n this.throwIfDisposed();\n uploadDenseMatrixToTexture(this.gl, texture, width, height, data, this.textureConfig);\n }\n createFloat16PackedMatrixTexture(rows, columns) {\n this.throwIfDisposed();\n return createFloat16PackedMatrixTexture(this.gl, rows, columns, this.textureConfig);\n }\n createPackedMatrixTexture(rows, columns) {\n this.throwIfDisposed();\n return createPackedMatrixTexture(this.gl, rows, columns, this.textureConfig);\n }\n deleteMatrixTexture(texture) {\n this.throwIfDisposed();\n if (this.outputTexture === texture) {\n unbindColorTextureFromFramebuffer(this.gl, this.framebuffer);\n this.outputTexture = null;\n }\n callAndCheck(this.gl, () => this.gl.deleteTexture(texture));\n }\n downloadByteEncodedFloatMatrixFromOutputTexture(texture, rows, columns) {\n return this.downloadMatrixDriver(texture, () => downloadByteEncodedFloatMatrixFromOutputTexture(this.gl, rows, columns, this.textureConfig));\n }\n downloadPackedMatrixFromBuffer(buffer2, batch, rows, columns, physicalRows, physicalCols) {\n return downloadPackedMatrixFromBuffer(this.gl, buffer2, batch, rows, columns, physicalRows, physicalCols, this.textureConfig);\n }\n downloadFloat32MatrixFromBuffer(buffer2, size) {\n return downloadFloat32MatrixFromBuffer(this.gl, buffer2, size);\n }\n createBufferFromTexture(texture, rows, columns) {\n this.bindTextureToFrameBuffer(texture);\n const result = createBufferFromOutputTexture(this.gl, rows, columns, this.textureConfig);\n this.unbindTextureToFrameBuffer();\n return result;\n }\n createAndWaitForFence() {\n const fenceContext = this.createFence(this.gl);\n return this.pollFence(fenceContext);\n }\n createFence(gl) {\n let query;\n let isFencePassed;\n if (env().getBool(\"WEBGL_FENCE_API_ENABLED\")) {\n const gl2 = gl;\n const sync = gl2.fenceSync(gl2.SYNC_GPU_COMMANDS_COMPLETE, 0);\n gl.flush();\n isFencePassed = () => {\n const status = gl2.clientWaitSync(sync, 0, 0);\n return status === gl2.ALREADY_SIGNALED || status === gl2.CONDITION_SATISFIED;\n };\n query = sync;\n } else if (env().getNumber(\"WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION\") > 0) {\n query = this.beginQuery();\n this.endQuery();\n isFencePassed = () => this.isQueryAvailable(query, env().getNumber(\"WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION\"));\n } else {\n isFencePassed = () => true;\n }\n return { query, isFencePassed };\n }\n downloadMatrixFromPackedTexture(texture, physicalRows, physicalCols) {\n return this.downloadMatrixDriver(texture, () => downloadMatrixFromPackedOutputTexture(this.gl, physicalRows, physicalCols));\n }\n createProgram(fragmentShader) {\n this.throwIfDisposed();\n const gl = this.gl;\n if (this.vertexShader == null) {\n this.vertexShader = createVertexShader2(gl);\n }\n const program = createProgram(gl);\n callAndCheck(gl, () => gl.attachShader(program, this.vertexShader));\n callAndCheck(gl, () => gl.attachShader(program, fragmentShader));\n linkProgram(gl, program);\n if (this.debug) {\n validateProgram(gl, program);\n }\n if (!this.vertexAttrsAreBound) {\n this.setProgram(program);\n this.vertexAttrsAreBound = bindVertexProgramAttributeStreams(gl, this.program, this.vertexBuffer);\n }\n return program;\n }\n deleteProgram(program) {\n this.throwIfDisposed();\n if (program === this.program) {\n this.program = null;\n }\n if (program != null) {\n callAndCheck(this.gl, () => this.gl.deleteProgram(program));\n }\n }\n setProgram(program) {\n this.throwIfDisposed();\n this.program = program;\n if (this.program != null && this.debug) {\n validateProgram(this.gl, this.program);\n }\n callAndCheck(this.gl, () => this.gl.useProgram(program));\n }\n getUniformLocation(program, uniformName, shouldThrow = true) {\n this.throwIfDisposed();\n if (shouldThrow) {\n return getProgramUniformLocationOrThrow(this.gl, program, uniformName);\n } else {\n return getProgramUniformLocation(this.gl, program, uniformName);\n }\n }\n getAttributeLocation(program, attribute) {\n this.throwIfDisposed();\n return callAndCheck(this.gl, () => this.gl.getAttribLocation(program, attribute));\n }\n getUniformLocationNoThrow(program, uniformName) {\n this.throwIfDisposed();\n return this.gl.getUniformLocation(program, uniformName);\n }\n setInputMatrixTexture(inputMatrixTexture, uniformLocation, textureUnit) {\n this.throwIfDisposed();\n this.throwIfNoProgram();\n bindTextureToProgramUniformSampler(this.gl, inputMatrixTexture, uniformLocation, textureUnit);\n }\n setOutputMatrixTexture(outputMatrixTexture, rows, columns) {\n this.setOutputMatrixTextureDriver(outputMatrixTexture, columns, rows);\n }\n setOutputPackedMatrixTexture(outputPackedMatrixTexture, rows, columns) {\n this.throwIfDisposed();\n const [width, height] = getPackedMatrixTextureShapeWidthHeight(rows, columns);\n this.setOutputMatrixTextureDriver(outputPackedMatrixTexture, width, height);\n }\n setOutputMatrixWriteRegion(startRow, numRows, startColumn, numColumns) {\n this.setOutputMatrixWriteRegionDriver(startColumn, startRow, numColumns, numRows);\n }\n setOutputPackedMatrixWriteRegion(startRow, numRows, startColumn, numColumns) {\n throw new Error(\"setOutputPackedMatrixWriteRegion not implemented.\");\n }\n debugValidate() {\n if (this.program != null) {\n validateProgram(this.gl, this.program);\n }\n validateFramebuffer(this.gl);\n }\n executeProgram() {\n this.throwIfDisposed();\n this.throwIfNoProgram();\n const gl = this.gl;\n if (this.debug) {\n this.debugValidate();\n }\n callAndCheck(gl, () => gl.drawElements(gl.TRIANGLES, 6, gl.UNSIGNED_SHORT, 0));\n }\n blockUntilAllProgramsCompleted() {\n this.throwIfDisposed();\n callAndCheck(this.gl, () => this.gl.finish());\n }\n getQueryTimerExtension() {\n if (this.disjointQueryTimerExtension == null) {\n this.disjointQueryTimerExtension = getExtensionOrThrow(this.gl, env().getNumber(\"WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION\") === 2 ? \"EXT_disjoint_timer_query_webgl2\" : \"EXT_disjoint_timer_query\");\n }\n return this.disjointQueryTimerExtension;\n }\n getQueryTimerExtensionWebGL2() {\n return this.getQueryTimerExtension();\n }\n getQueryTimerExtensionWebGL1() {\n return this.getQueryTimerExtension();\n }\n beginQuery() {\n if (env().getNumber(\"WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION\") === 2) {\n const gl2 = this.gl;\n const ext2 = this.getQueryTimerExtensionWebGL2();\n const query2 = gl2.createQuery();\n gl2.beginQuery(ext2.TIME_ELAPSED_EXT, query2);\n return query2;\n }\n const ext = this.getQueryTimerExtensionWebGL1();\n const query = ext.createQueryEXT();\n ext.beginQueryEXT(ext.TIME_ELAPSED_EXT, query);\n return query;\n }\n endQuery() {\n if (env().getNumber(\"WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION\") === 2) {\n const gl2 = this.gl;\n const ext2 = this.getQueryTimerExtensionWebGL2();\n gl2.endQuery(ext2.TIME_ELAPSED_EXT);\n return;\n }\n const ext = this.getQueryTimerExtensionWebGL1();\n ext.endQueryEXT(ext.TIME_ELAPSED_EXT);\n }\n async waitForQueryAndGetTime(query) {\n await util_exports.repeatedTry(() => this.disposed || this.isQueryAvailable(query, env().getNumber(\"WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION\")));\n return this.getQueryTime(query, env().getNumber(\"WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION\"));\n }\n getQueryTime(query, queryTimerVersion) {\n if (queryTimerVersion === 0) {\n return null;\n }\n if (queryTimerVersion === 2) {\n const gl2 = this.gl;\n const timeElapsedNanos = gl2.getQueryParameter(query, gl2.QUERY_RESULT);\n return timeElapsedNanos / 1e6;\n } else {\n const ext = this.getQueryTimerExtensionWebGL1();\n const timeElapsedNanos = ext.getQueryObjectEXT(query, ext.QUERY_RESULT_EXT);\n return timeElapsedNanos / 1e6;\n }\n }\n isQueryAvailable(query, queryTimerVersion) {\n if (queryTimerVersion === 0) {\n return true;\n }\n if (queryTimerVersion === 2) {\n const gl2 = this.gl;\n const ext = this.getQueryTimerExtensionWebGL2();\n const available = gl2.getQueryParameter(query, gl2.QUERY_RESULT_AVAILABLE);\n if (this.disjoint == null) {\n this.disjoint = this.gl.getParameter(ext.GPU_DISJOINT_EXT);\n }\n return available && !this.disjoint;\n } else {\n const ext = this.getQueryTimerExtensionWebGL1();\n const available = ext.getQueryObjectEXT(query, ext.QUERY_RESULT_AVAILABLE_EXT);\n if (this.disjoint == null) {\n this.disjoint = this.gl.getParameter(ext.GPU_DISJOINT_EXT);\n }\n return available && !this.disjoint;\n }\n }\n pollFence(fenceContext) {\n return new Promise((resolve) => {\n this.addItemToPoll(() => fenceContext.isFencePassed(), () => resolve());\n });\n }\n pollItems() {\n const index = linearSearchLastTrue(this.itemsToPoll.map((x) => x.isDoneFn));\n for (let i2 = 0; i2 <= index; ++i2) {\n const { resolveFn } = this.itemsToPoll[i2];\n resolveFn();\n }\n this.itemsToPoll = this.itemsToPoll.slice(index + 1);\n }\n addItemToPoll(isDoneFn, resolveFn) {\n this.itemsToPoll.push({ isDoneFn, resolveFn });\n if (this.itemsToPoll.length > 1) {\n return;\n }\n let scheduleFn = void 0;\n if (\"setTimeoutCustom\" in env().platform) {\n scheduleFn = env().platform.setTimeoutCustom.bind(env().platform);\n }\n util_exports.repeatedTry(() => {\n this.pollItems();\n return this.itemsToPoll.length === 0;\n }, () => 0, null, scheduleFn);\n }\n bindTextureToFrameBuffer(texture) {\n this.throwIfDisposed();\n bindColorTextureToFramebuffer(this.gl, texture, this.framebuffer);\n if (this.debug) {\n validateFramebuffer(this.gl);\n }\n }\n unbindTextureToFrameBuffer() {\n if (this.outputTexture != null) {\n bindColorTextureToFramebuffer(this.gl, this.outputTexture, this.framebuffer);\n if (this.debug) {\n validateFramebuffer(this.gl);\n }\n } else {\n unbindColorTextureFromFramebuffer(this.gl, this.framebuffer);\n }\n }\n downloadMatrixDriver(texture, downloadAndDecode) {\n this.bindTextureToFrameBuffer(texture);\n const result = downloadAndDecode();\n this.unbindTextureToFrameBuffer();\n return result;\n }\n setOutputMatrixTextureDriver(outputMatrixTextureMaybePacked, width, height) {\n this.throwIfDisposed();\n const gl = this.gl;\n bindColorTextureToFramebuffer(gl, outputMatrixTextureMaybePacked, this.framebuffer);\n if (this.debug) {\n validateFramebuffer(gl);\n }\n this.outputTexture = outputMatrixTextureMaybePacked;\n callAndCheck(gl, () => gl.viewport(0, 0, width, height));\n callAndCheck(gl, () => gl.scissor(0, 0, width, height));\n }\n setOutputMatrixWriteRegionDriver(x, y, width, height) {\n this.throwIfDisposed();\n callAndCheck(this.gl, () => this.gl.scissor(x, y, width, height));\n }\n throwIfDisposed() {\n if (this.disposed) {\n throw new Error(\"Attempted to use disposed GPGPUContext.\");\n }\n }\n throwIfNoProgram() {\n if (this.program == null) {\n throw new Error(\"No GPU program is currently set.\");\n }\n }\n};\nfunction linearSearchLastTrue(arr) {\n let i2 = 0;\n for (; i2 < arr.length; ++i2) {\n const isDone = arr[i2]();\n if (!isDone) {\n break;\n }\n }\n return i2 - 1;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernel_utils/shared.js\nvar { addImpl: addImplCPU, bincountImpl: bincountImplCPU, bincountReduceImpl: bincountReduceImplCPU, castImpl: castImplCPU, ceilImpl: ceilImplCPU, concatImpl: concatImplCPU, equalImpl: equalImplCPU, expImpl: expImplCPU, expm1Impl: expm1ImplCPU, floorImpl: floorImplCPU, gatherNdImpl: gatherNdImplCPU, gatherV2Impl: gatherV2ImplCPU, greaterImpl: greaterImplCPU, greaterEqualImpl: greaterEqualImplCPU, lessImpl: lessImplCPU, lessEqualImpl: lessEqualImplCPU, linSpaceImpl: linSpaceImplCPU, logImpl: logImplCPU, maxImpl: maxImplCPU, maximumImpl: maximumImplCPU, minimumImpl: minimumImplCPU, multiplyImpl: multiplyImplCPU, negImpl: negImplCPU, notEqualImpl: notEqualImplCPU, prodImpl: prodImplCPU, raggedGatherImpl: raggedGatherImplCPU, raggedTensorToTensorImpl: raggedTensorToTensorImplCPU, rangeImpl: rangeImplCPU, rsqrtImpl: rsqrtImplCPU, scatterImpl: scatterImplCPU, sigmoidImpl: sigmoidImplCPU, simpleAbsImpl: simpleAbsImplCPU, sliceImpl: sliceImplCPU, sparseFillEmptyRowsImpl: sparseFillEmptyRowsImplCPU, sparseReshapeImpl: sparseReshapeImplCPU, sparseSegmentReductionImpl: sparseSegmentReductionImplCPU, sqrtImpl: sqrtImplCPU, stridedSliceImpl: stridedSliceImplCPU, stringNGramsImpl: stringNGramsImplCPU, stringSplitImpl: stringSplitImplCPU, stringToHashBucketFastImpl: stringToHashBucketFastImplCPU, subImpl: subImplCPU, tileImpl: tileImplCPU, topKImpl: topKImplCPU, transposeImpl: transposeImplCPU, uniqueImpl: uniqueImplCPU } = shared_exports;\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/packing_util.js\nfunction getVecChannels(name, rank) {\n return [\"x\", \"y\", \"z\", \"w\", \"u\", \"v\"].slice(0, rank).map((d) => `${name}.${d}`);\n}\nfunction getChannels(name, rank) {\n if (rank === 1) {\n return [name];\n }\n return getVecChannels(name, rank);\n}\nfunction getSourceCoords(rank, dims) {\n if (rank === 1) {\n return \"rc\";\n }\n let coords3 = \"\";\n for (let i2 = 0; i2 < rank; i2++) {\n coords3 += dims[i2];\n if (i2 < rank - 1) {\n coords3 += \",\";\n }\n }\n return coords3;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/pack_gpu.js\nvar PackProgram = class {\n constructor(outputShape) {\n this.variableNames = [\"A\"];\n this.packedInputs = false;\n this.packedOutput = true;\n this.outputShape = outputShape;\n this.rank = outputShape.length;\n this.enableShapeUniforms = useShapeUniforms(this.outputShape.length);\n if (this.rank === 0) {\n this.userCode = `\n void main() {\n setOutput(vec4(getA(), 0., 0., 0.));\n }\n `;\n } else {\n const channels = getChannels(\"rc\", this.rank);\n const dtype = getCoordsDataType(this.rank);\n const outOfBoundsCondition = this.getOutOfBoundsCondition(channels);\n const setup51 = this.getSetup(channels);\n const output = this.getOutput(channels);\n this.userCode = `\n void main() {\n ${dtype} rc = getOutputCoords();\n\n if(${outOfBoundsCondition}) {\n setOutput(vec4(0));\n } else {\n ${setup51}\n\n setOutput(vec4(${output}));\n }\n }\n `;\n }\n }\n getSourceCoordsArr(dims) {\n const coords3 = [];\n for (let row = 0; row <= 1; row++) {\n for (let col = 0; col <= 1; col++) {\n let coord = `${row === 0 ? \"r\" : \"rp1\"}, ${col === 0 ? \"c\" : \"cp1\"}`;\n for (let d = 2; d < this.rank; d++) {\n coord = `${dims[dims.length - 1 - d]},` + coord;\n }\n coords3.push(coord);\n }\n }\n return coords3;\n }\n getOutOfBoundsCondition(dims) {\n if (this.rank === 1) {\n return `rc > ${this.enableShapeUniforms ? \"outShape\" : this.outputShape[0]}`;\n }\n let cond = \"\";\n for (let i2 = this.rank - 2; i2 < this.rank; i2++) {\n cond += `${dims[i2]} >= ${this.enableShapeUniforms ? `outShape[${i2}]` : this.outputShape[i2]}`;\n if (i2 < this.rank - 1) {\n cond += \"||\";\n }\n }\n return cond;\n }\n getSetup(dims) {\n if (this.rank === 1) {\n return \"\";\n }\n const innerDims = dims.slice(-2);\n const col = this.enableShapeUniforms ? `outShape[${this.rank} - 1]` : this.outputShape[this.rank - 1];\n const row = this.enableShapeUniforms ? `outShape[${this.rank} - 2]` : this.outputShape[this.rank - 2];\n return `\n int r = ${innerDims[0]};\n int c = ${innerDims[1]};\n int rp1 = r + 1;\n int cp1 = c + 1;\n\n bool cEdge = cp1 >= ${col};\n bool rEdge = rp1 >= ${row};\n `;\n }\n getOutput(dims) {\n const sourceCoords = this.getSourceCoordsArr(dims);\n if (this.rank === 1) {\n const outShape = this.enableShapeUniforms ? \"outShape\" : this.outputShape[0];\n return `getA(rc), (rc + 1 >= ${outShape} ? 0. : getA(rc + 1)), 0, 0`;\n }\n return `getA(${sourceCoords[0]}),\n cEdge ? 0. : getA(${sourceCoords[1]}),\n rEdge ? 0. : getA(${sourceCoords[2]}),\n rEdge || cEdge ? 0. : getA(${sourceCoords[3]})`;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/reshape_packed_gpu.js\nvar ReshapePackedProgram = class {\n constructor(outputShape, inputShape) {\n this.variableNames = [\"A\"];\n this.packedInputs = true;\n this.packedOutput = true;\n this.customUniforms = [{ name: \"inputShape\", type: \"ivec3\" }];\n this.outputShape = outputShape;\n this.enableShapeUniforms = useShapeUniforms(this.outputShape.length);\n let mainLoop = ``;\n for (let i2 = 0; i2 < 4; i2++) {\n let thisRC = `thisRC = rc;`;\n if (i2 % 2 === 1) {\n thisRC += `thisRC.z += 1;`;\n }\n if (i2 > 1) {\n thisRC += `thisRC.y += 1;`;\n }\n mainLoop += `\n ${thisRC}\n ${i2 > 0 ? `if(thisRC.y < rows && thisRC.z < cols){` : \"\"}\n int flatIndex = getFlatIndex(thisRC);\n\n ivec3 inputRC = inputCoordsFromReshapedOutCoords(flatIndex);\n vec2 inputRCInnerDims = vec2(float(inputRC.y),float(inputRC.z));\n\n result[${i2}] =\n getChannel(getA(inputRC.x, inputRC.y, inputRC.z), inputRCInnerDims);\n ${i2 > 0 ? \"}\" : \"\"}\n `;\n }\n this.userCode = `\n ${getReshapedInputCoords(inputShape, this.enableShapeUniforms)}\n ${this.enableShapeUniforms ? getFlatIndexFrom3DOutput() : getFlatIndexFrom3D(outputShape)}\n\n void main() {\n ivec3 rc = getOutputCoords();\n\n vec4 result = vec4(0.);\n\n ivec3 thisRC;\n int rows = ${this.enableShapeUniforms ? \"outShape[1]\" : outputShape[1]};\n int cols = ${this.enableShapeUniforms ? \"outShape[2]\" : outputShape[2]};\n\n ${mainLoop}\n\n setOutput(result);\n }\n `;\n }\n};\nfunction getReshapedInputCoords(shape, enableShapeUniforms) {\n const coordsFromIndexSnippet = enableShapeUniforms ? getLogicalCoordinatesFromFlatIndexByUniform([\"r\", \"c\", \"d\"], \"inputShape\") : getLogicalCoordinatesFromFlatIndex([\"r\", \"c\", \"d\"], shape);\n return `\n ivec3 inputCoordsFromReshapedOutCoords(int index) {\n ${coordsFromIndexSnippet}\n return ivec3(r, c, d);\n }\n `;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/texture_manager.js\nvar TextureManager = class {\n constructor(gpgpu) {\n this.gpgpu = gpgpu;\n this.numUsedTextures = 0;\n this.numFreeTextures = 0;\n this._numBytesAllocated = 0;\n this._numBytesFree = 0;\n this.freeTextures = {};\n this.logEnabled = false;\n this.usedTextures = {};\n }\n acquireTexture(shapeRC, usage, isPacked) {\n const physicalTexType = getPhysicalFromLogicalTextureType(usage, isPacked);\n const shapeKey = getKeyFromTextureShape(shapeRC, physicalTexType, isPacked);\n if (!(shapeKey in this.freeTextures)) {\n this.freeTextures[shapeKey] = [];\n }\n if (!(shapeKey in this.usedTextures)) {\n this.usedTextures[shapeKey] = [];\n }\n const texBytes = computeBytes(shapeRC, physicalTexType, this.gpgpu.gl, this.gpgpu.textureConfig, isPacked);\n if (this.freeTextures[shapeKey].length > 0) {\n this.numFreeTextures--;\n this.numUsedTextures++;\n this._numBytesFree -= texBytes;\n this.log();\n const newTexture2 = this.freeTextures[shapeKey].shift();\n this.usedTextures[shapeKey].push(newTexture2);\n return newTexture2;\n }\n let newTexture;\n if (physicalTexType === PhysicalTextureType.PACKED_2X2_FLOAT32) {\n newTexture = this.gpgpu.createPackedMatrixTexture(shapeRC[0], shapeRC[1]);\n } else if (physicalTexType === PhysicalTextureType.PACKED_2X2_FLOAT16) {\n newTexture = this.gpgpu.createFloat16PackedMatrixTexture(shapeRC[0], shapeRC[1]);\n } else if (physicalTexType === PhysicalTextureType.UNPACKED_FLOAT32) {\n newTexture = this.gpgpu.createFloat32MatrixTexture(shapeRC[0], shapeRC[1]);\n } else if (physicalTexType === PhysicalTextureType.UNPACKED_FLOAT16) {\n newTexture = this.gpgpu.createFloat16MatrixTexture(shapeRC[0], shapeRC[1]);\n } else if (physicalTexType === PhysicalTextureType.PACKED_4X1_UNSIGNED_BYTE) {\n newTexture = this.gpgpu.createUnsignedBytesMatrixTexture(shapeRC[0], shapeRC[1]);\n }\n this.usedTextures[shapeKey].push(newTexture);\n this.numUsedTextures++;\n this._numBytesAllocated += texBytes;\n this.log();\n return newTexture;\n }\n releaseTexture(texture, shape, logicalTexType, isPacked) {\n if (this.freeTextures == null) {\n return;\n }\n const physicalTexType = getPhysicalFromLogicalTextureType(logicalTexType, isPacked);\n const shapeKey = getKeyFromTextureShape(shape, physicalTexType, isPacked);\n if (!(shapeKey in this.freeTextures)) {\n this.freeTextures[shapeKey] = [];\n }\n const texBytes = computeBytes(shape, physicalTexType, this.gpgpu.gl, this.gpgpu.textureConfig, isPacked);\n const deleteTexThreshold = env().get(\"WEBGL_DELETE_TEXTURE_THRESHOLD\");\n if (deleteTexThreshold !== -1 && this._numBytesAllocated > deleteTexThreshold) {\n this.gpgpu.deleteMatrixTexture(texture.texture);\n this._numBytesAllocated -= texBytes;\n } else {\n this.freeTextures[shapeKey].push(texture);\n this.numFreeTextures++;\n this._numBytesFree += texBytes;\n }\n this.numUsedTextures--;\n const texList = this.usedTextures[shapeKey];\n const texIndex = texList.indexOf(texture);\n if (texIndex < 0) {\n throw new Error(\"Cannot release a texture that was never provided by this texture manager\");\n }\n texList.splice(texIndex, 1);\n this.log();\n }\n log() {\n if (!this.logEnabled) {\n return;\n }\n const total = this.numFreeTextures + this.numUsedTextures;\n console.log(\"Free/Used\", `${this.numFreeTextures} / ${this.numUsedTextures}`, `(${total})`);\n const freeRatio = this._numBytesFree / this._numBytesAllocated;\n console.log(`Bytes allocated: ${this._numBytesAllocated}`);\n console.log(`Bytes unused: ${this._numBytesFree} (${Math.round(100 * freeRatio)}%)`);\n }\n get numBytesAllocated() {\n return this._numBytesAllocated;\n }\n get numBytesFree() {\n return this._numBytesFree;\n }\n getNumUsedTextures() {\n return this.numUsedTextures;\n }\n getNumFreeTextures() {\n return this.numFreeTextures;\n }\n dispose() {\n if (this.freeTextures == null) {\n return;\n }\n for (const texShape in this.freeTextures) {\n this.freeTextures[texShape].forEach((tex) => {\n this.gpgpu.deleteMatrixTexture(tex.texture);\n });\n }\n for (const texShape in this.usedTextures) {\n this.usedTextures[texShape].forEach((tex) => {\n this.gpgpu.deleteMatrixTexture(tex.texture);\n });\n }\n this.freeTextures = null;\n this.usedTextures = null;\n this.numUsedTextures = 0;\n this.numFreeTextures = 0;\n this._numBytesAllocated = 0;\n this._numBytesFree = 0;\n }\n};\nfunction numBytesForInternalFormat(gl, internalFormat) {\n const glany = gl;\n if (internalFormat === glany.R32F) {\n return 4;\n } else if (internalFormat === glany.R16F) {\n return 2;\n } else if (internalFormat === glany.RGBA32F) {\n return 16;\n } else if (internalFormat === gl.RGBA) {\n return 16;\n } else if (internalFormat === glany.RGBA16F) {\n return 8;\n } else if (internalFormat === glany.RGBA8) {\n return 4;\n }\n throw new Error(`Unknown internal format ${internalFormat}`);\n}\nfunction computeBytes(shape, physicalTexType, gl, textureConfig, isPacked) {\n const internalFormat = internalFormatForPhysicalTexType(physicalTexType, textureConfig);\n let numElements;\n if (isPacked) {\n const [packedWidth, packedHeight] = getPackedMatrixTextureShapeWidthHeight(shape[0], shape[1]);\n numElements = packedWidth * packedHeight;\n } else {\n const [width, height] = getUnpackedMatrixTextureShapeWidthHeight(shape[0], shape[1]);\n numElements = width * height;\n }\n const bytesPerElement2 = numBytesForInternalFormat(gl, internalFormat);\n return numElements * bytesPerElement2;\n}\nfunction internalFormatForPhysicalTexType(physicalTexType, textureConfig) {\n switch (physicalTexType) {\n case PhysicalTextureType.PACKED_2X2_FLOAT32:\n return getInternalFormatForPackedMatrixTexture(textureConfig);\n case PhysicalTextureType.PACKED_2X2_FLOAT16:\n return getInternalFormatForFloat16PackedMatrixTexture(textureConfig);\n case PhysicalTextureType.UNPACKED_FLOAT32:\n return getInternalFormatForFloat32MatrixTexture(textureConfig);\n case PhysicalTextureType.UNPACKED_FLOAT16:\n return getInternalFormatForFloat16MatrixTexture(textureConfig);\n case PhysicalTextureType.PACKED_4X1_UNSIGNED_BYTE:\n return getInternalFormatForUnsignedBytesMatrixTexture(textureConfig);\n default:\n throw new Error(`Unknown physical texture type ${physicalTexType}`);\n }\n}\nfunction getPhysicalTextureForRendering(isPacked) {\n if (env().getBool(\"WEBGL_RENDER_FLOAT32_ENABLED\")) {\n if (isPacked) {\n return PhysicalTextureType.PACKED_2X2_FLOAT32;\n }\n return PhysicalTextureType.UNPACKED_FLOAT32;\n }\n if (isPacked) {\n return PhysicalTextureType.PACKED_2X2_FLOAT16;\n }\n return PhysicalTextureType.UNPACKED_FLOAT16;\n}\nfunction getPhysicalFromLogicalTextureType(logicalTexType, isPacked) {\n if (logicalTexType === TextureUsage.UPLOAD) {\n return PhysicalTextureType.PACKED_2X2_FLOAT32;\n } else if (logicalTexType === TextureUsage.RENDER || logicalTexType == null) {\n return getPhysicalTextureForRendering(isPacked);\n } else if (logicalTexType === TextureUsage.DOWNLOAD || logicalTexType === TextureUsage.PIXELS) {\n return PhysicalTextureType.PACKED_4X1_UNSIGNED_BYTE;\n }\n throw new Error(`Unknown logical texture type ${logicalTexType}`);\n}\nfunction getKeyFromTextureShape(shapeRowsCol, physicalTexType, isPacked) {\n return `${shapeRowsCol[0]}_${shapeRowsCol[1]}_${physicalTexType}_${isPacked}`;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/unaryop_gpu.js\nvar UnaryOpProgram = class {\n constructor(aShape, opSnippet) {\n this.variableNames = [\"A\"];\n this.outputShape = aShape;\n this.enableShapeUniforms = useShapeUniforms(this.outputShape.length);\n this.userCode = `\n float unaryOperation(float x) {\n ${opSnippet}\n }\n\n void main() {\n float x = getAAtOutCoords();\n float y = unaryOperation(x);\n\n setOutput(y);\n }\n `;\n }\n};\nvar CHECK_NAN_SNIPPET = `if (isnan(x)) return x;`;\nvar LINEAR = `return x;`;\nvar ABS = `return abs(x);`;\nvar ELU2 = `return (x >= 0.0) ? x : (exp(x) - 1.0);`;\nvar RELU = CHECK_NAN_SNIPPET + `\n return (x < 0.0) ? 0.0 : x;\n`;\nvar RELU6 = CHECK_NAN_SNIPPET + `\n return (x < 0.0) ? 0.0 : min(6.0, x);\n`;\nvar CLONE = \"return x;\";\nvar SIGMOID = `return 1.0 / (1.0 + exp(-1.0 * x));`;\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/unaryop_packed_gpu.js\nvar LINEAR2 = `return x;`;\nvar ELU3 = `\n vec4 result;\n\n result.r = (x.r >= 0.0) ? x.r : (exp(x.r) - 1.0);\n result.g = (x.g >= 0.0) ? x.g : (exp(x.g) - 1.0);\n result.b = (x.b >= 0.0) ? x.b : (exp(x.b) - 1.0);\n result.a = (x.a >= 0.0) ? x.a : (exp(x.a) - 1.0);\n\n return result;\n`;\nvar RELU2 = `\n vec4 result = x * vec4(greaterThanEqual(x, vec4(0.0)));\n bvec4 isNaN = isnan(x);\n\n result.r = isNaN.r ? x.r : result.r;\n result.g = isNaN.g ? x.g : result.g;\n result.b = isNaN.b ? x.b : result.b;\n result.a = isNaN.a ? x.a : result.a;\n\n return result;\n`;\nvar RELU62 = `\n vec4 result = min(x, vec4(6.)) * vec4(greaterThanEqual(x, vec4(0.0)));\n bvec4 isNaN = isnan(x);\n\n result.r = isNaN.r ? x.r : result.r;\n result.g = isNaN.g ? x.g : result.g;\n result.b = isNaN.b ? x.b : result.b;\n result.a = isNaN.a ? x.a : result.a;\n\n return result;\n`;\nvar SIGMOID2 = `return 1.0 / (1.0 + exp(-1.0 * x));`;\nvar UnaryOpPackedProgram = class {\n constructor(aShape, opSnippet) {\n this.variableNames = [\"A\"];\n this.packedInputs = true;\n this.packedOutput = true;\n this.outputShape = aShape;\n this.enableShapeUniforms = useShapeUniforms(this.outputShape.length);\n this.userCode = `\n vec4 unaryOperation(vec4 x) {\n ${opSnippet}\n }\n\n void main() {\n vec4 x = getAAtOutCoords();\n vec4 y = unaryOperation(x);\n\n setOutput(y);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/unpack_gpu.js\nvar UnpackProgram = class {\n constructor(outputShape) {\n this.variableNames = [\"A\"];\n this.packedInputs = true;\n this.packedOutput = false;\n this.outputShape = outputShape;\n this.enableShapeUniforms = useShapeUniforms(this.outputShape.length);\n const rank = outputShape.length;\n const channels = getChannels(\"rc\", rank);\n const dtype = getCoordsDataType(rank);\n const sourceCoords = getSourceCoords(rank, channels);\n const innerDims = channels.slice(-2);\n const coords3 = rank <= 1 ? \"rc\" : `vec2(${innerDims.join(\",\")})`;\n this.userCode = `\n void main() {\n ${dtype} rc = getOutputCoords();\n vec4 packedInput = getA(${sourceCoords});\n\n setOutput(getChannel(packedInput, ${coords3}));\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/backend_webgl.js\nvar whereImpl3 = kernel_impls_exports.whereImpl;\nvar EPSILON_FLOAT322 = 1e-7;\nvar EPSILON_FLOAT162 = 1e-4;\nvar binaryCaches = {};\nfunction getBinaryCache(webGLVersion) {\n if (webGLVersion in binaryCaches) {\n return binaryCaches[webGLVersion];\n }\n binaryCaches[webGLVersion] = {};\n return binaryCaches[webGLVersion];\n}\nvar CPU_HANDOFF_SIZE_THRESHOLD = env().getNumber(\"CPU_HANDOFF_SIZE_THRESHOLD\");\nvar BEFORE_PAGING_CONSTANT = 600;\nfunction numMBBeforeWarning() {\n if (env().global.screen == null) {\n return 1024;\n }\n return env().global.screen.height * env().global.screen.width * window.devicePixelRatio * BEFORE_PAGING_CONSTANT / 1024 / 1024;\n}\nvar MathBackendWebGL = class extends KernelBackend {\n constructor(gpuResource) {\n super();\n this.pendingRead = /* @__PURE__ */ new WeakMap();\n this.pendingDisposal = /* @__PURE__ */ new WeakSet();\n this.dataRefCount = /* @__PURE__ */ new WeakMap();\n this.numBytesInGPU = 0;\n this.uploadWaitMs = 0;\n this.downloadWaitMs = 0;\n this.lastGlFlushTime = 0;\n this.warnedAboutMemory = false;\n this.pendingDeletes = 0;\n this.disposed = false;\n if (!env().getBool(\"HAS_WEBGL\")) {\n throw new Error(\"WebGL is not supported on this device\");\n }\n let newGPGPU;\n if (gpuResource != null) {\n if (gpuResource instanceof GPGPUContext) {\n newGPGPU = gpuResource;\n } else {\n const gl = getWebGLContext(env().getNumber(\"WEBGL_VERSION\"), gpuResource);\n newGPGPU = new GPGPUContext(gl);\n }\n this.binaryCache = {};\n this.gpgpuCreatedLocally = false;\n } else {\n const gl = getWebGLContext(env().getNumber(\"WEBGL_VERSION\"));\n newGPGPU = new GPGPUContext(gl);\n this.binaryCache = getBinaryCache(env().getNumber(\"WEBGL_VERSION\"));\n this.gpgpuCreatedLocally = true;\n }\n this.gpgpu = newGPGPU;\n this.canvas = this.gpgpu.gl.canvas;\n this.textureManager = new TextureManager(this.gpgpu);\n this.numMBBeforeWarning = numMBBeforeWarning();\n this.texData = new DataStorage(this, engine());\n }\n nextDataId() {\n return MathBackendWebGL.nextDataId++;\n }\n numDataIds() {\n return this.texData.numDataIds() - this.pendingDeletes;\n }\n write(values, shape, dtype) {\n if (env().getBool(\"WEBGL_CHECK_NUMERICAL_PROBLEMS\") || env().getBool(\"DEBUG\")) {\n this.checkNumericalProblems(values);\n }\n if (dtype === \"complex64\" && values != null) {\n throw new Error(`Cannot write to a complex64 dtype. Please use tf.complex(real, imag).`);\n }\n const dataId = { id: this.nextDataId() };\n this.texData.set(dataId, { shape, dtype, values, usage: TextureUsage.UPLOAD, refCount: 1 });\n return dataId;\n }\n refCount(dataId) {\n if (this.texData.has(dataId)) {\n const tensorData = this.texData.get(dataId);\n return tensorData.refCount;\n }\n return 0;\n }\n incRef(dataId) {\n const texData = this.texData.get(dataId);\n texData.refCount++;\n }\n decRef(dataId) {\n if (this.texData.has(dataId)) {\n const texData = this.texData.get(dataId);\n texData.refCount--;\n }\n }\n move(dataId, values, shape, dtype, refCount) {\n if (env().getBool(\"DEBUG\")) {\n this.checkNumericalProblems(values);\n }\n if (dtype === \"complex64\") {\n throw new Error(`Cannot write to a complex64 dtype. Please use tf.complex(real, imag).`);\n }\n this.texData.set(dataId, { shape, dtype, values, usage: TextureUsage.UPLOAD, refCount });\n }\n disposeIntermediateTensorInfo(tensorInfo) {\n this.disposeData(tensorInfo.dataId);\n }\n readSync(dataId) {\n const texData = this.texData.get(dataId);\n const { values, dtype, complexTensorInfos, slice: slice6, shape, isPacked } = texData;\n if (slice6 != null) {\n let program;\n if (isPacked) {\n program = new UnaryOpPackedProgram(shape, CLONE);\n } else {\n program = new UnaryOpProgram(shape, CLONE);\n }\n const res = this.runWebGLProgram(program, [{ dataId, shape, dtype }], dtype);\n const data = this.readSync(res.dataId);\n this.disposeIntermediateTensorInfo(res);\n return data;\n }\n if (values != null) {\n return this.convertAndCacheOnCPU(dataId);\n }\n if (dtype === \"string\") {\n return values;\n }\n const shouldTimeProgram = this.activeTimers != null;\n let start;\n if (shouldTimeProgram) {\n start = util_exports.now();\n }\n let result;\n if (dtype === \"complex64\") {\n const realValues = this.readSync(complexTensorInfos.real.dataId);\n const imagValues = this.readSync(complexTensorInfos.imag.dataId);\n result = backend_util_exports.mergeRealAndImagArrays(realValues, imagValues);\n } else {\n result = this.getValuesFromTexture(dataId);\n }\n if (shouldTimeProgram) {\n this.downloadWaitMs += util_exports.now() - start;\n }\n return this.convertAndCacheOnCPU(dataId, result);\n }\n async read(dataId) {\n if (this.pendingRead.has(dataId)) {\n const subscribers2 = this.pendingRead.get(dataId);\n return new Promise((resolve) => subscribers2.push(resolve));\n }\n const texData = this.texData.get(dataId);\n const { values, shape, slice: slice6, dtype, complexTensorInfos, isPacked } = texData;\n if (slice6 != null) {\n let program;\n if (isPacked) {\n program = new UnaryOpPackedProgram(shape, CLONE);\n } else {\n program = new UnaryOpProgram(shape, CLONE);\n }\n const res = this.runWebGLProgram(program, [{ dataId, shape, dtype }], dtype);\n const data = this.read(res.dataId);\n this.disposeIntermediateTensorInfo(res);\n return data;\n }\n if (values != null) {\n return this.convertAndCacheOnCPU(dataId);\n }\n if (env().getBool(\"DEBUG\")) {\n if (!env().getBool(\"WEBGL_DOWNLOAD_FLOAT_ENABLED\") && env().getNumber(\"WEBGL_VERSION\") === 2) {\n throw new Error(`tensor.data() with WEBGL_DOWNLOAD_FLOAT_ENABLED=false and WEBGL_VERSION=2 not yet supported.`);\n }\n }\n let buffer2 = null;\n let tmpDownloadTarget;\n if (dtype !== \"complex64\" && env().get(\"WEBGL_BUFFER_SUPPORTED\")) {\n tmpDownloadTarget = this.decode(dataId);\n const tmpData = this.texData.get(tmpDownloadTarget.dataId);\n buffer2 = this.gpgpu.createBufferFromTexture(tmpData.texture.texture, ...getDenseTexShape(shape));\n }\n this.pendingRead.set(dataId, []);\n if (dtype !== \"complex64\") {\n await this.gpgpu.createAndWaitForFence();\n }\n let vals;\n if (dtype === \"complex64\") {\n const ps = await Promise.all([\n this.read(complexTensorInfos.real.dataId),\n this.read(complexTensorInfos.imag.dataId)\n ]);\n const realValues = ps[0];\n const imagValues = ps[1];\n vals = backend_util_exports.mergeRealAndImagArrays(realValues, imagValues);\n } else if (buffer2 == null) {\n vals = this.getValuesFromTexture(dataId);\n } else {\n const size = util_exports.sizeFromShape(shape);\n vals = this.gpgpu.downloadFloat32MatrixFromBuffer(buffer2, size);\n }\n if (tmpDownloadTarget != null) {\n this.disposeIntermediateTensorInfo(tmpDownloadTarget);\n }\n if (buffer2 != null) {\n const gl = this.gpgpu.gl;\n callAndCheck(gl, () => gl.deleteBuffer(buffer2));\n }\n const dTypeVals = this.convertAndCacheOnCPU(dataId, vals);\n const subscribers = this.pendingRead.get(dataId);\n this.pendingRead.delete(dataId);\n subscribers.forEach((resolve) => resolve(dTypeVals));\n if (this.pendingDisposal.has(dataId)) {\n this.pendingDisposal.delete(dataId);\n if (this.disposeData(dataId)) {\n engine().removeDataId(dataId, this);\n }\n this.pendingDeletes--;\n }\n return dTypeVals;\n }\n readToGPU(dataId, options = {}) {\n const texData = this.texData.get(dataId);\n const { values, shape, slice: slice6, dtype, isPacked, texture } = texData;\n if (dtype === \"complex64\") {\n throw new Error(\"Does not support reading texture for complex64 dtype.\");\n }\n if (slice6 != null) {\n let program;\n if (isPacked) {\n program = new UnaryOpPackedProgram(shape, CLONE);\n } else {\n program = new UnaryOpProgram(shape, CLONE);\n }\n const res = this.runWebGLProgram(program, [{ dataId, shape, dtype }], dtype);\n const gpuResouorce = this.readToGPU(res, options);\n this.disposeIntermediateTensorInfo(res);\n return gpuResouorce;\n }\n if (texture == null) {\n if (values != null) {\n throw new Error(\"Data is not on GPU but on CPU.\");\n } else {\n throw new Error(\"There is no data on GPU or CPU.\");\n }\n }\n const tmpTarget = this.decode(dataId, options.customTexShape);\n const tensorRef = engine().makeTensorFromTensorInfo(tmpTarget);\n const tmpData = this.texData.get(tmpTarget.dataId);\n return Object.assign({ tensorRef }, tmpData.texture);\n }\n bufferSync(t2) {\n const data = this.readSync(t2.dataId);\n if (t2.dtype === \"string\") {\n try {\n const strings = data.map((d) => util_exports.decodeString(d));\n return buffer(t2.shape, t2.dtype, strings);\n } catch (_a) {\n throw new Error(\"Failed to decode encoded string bytes into utf-8\");\n }\n }\n return buffer(t2.shape, t2.dtype, data);\n }\n checkNumericalProblems(values) {\n if (values == null) {\n return;\n }\n for (let i2 = 0; i2 < values.length; i2++) {\n const num = values[i2];\n if (!canBeRepresented(num)) {\n if (env().getBool(\"WEBGL_RENDER_FLOAT32_CAPABLE\")) {\n throw Error(`The value ${num} cannot be represented with your current settings. Consider enabling float32 rendering: 'tf.env().set('WEBGL_RENDER_FLOAT32_ENABLED', true);'`);\n }\n throw Error(`The value ${num} cannot be represented on this device.`);\n }\n }\n }\n getValuesFromTexture(dataId) {\n const { shape, dtype, isPacked } = this.texData.get(dataId);\n const size = util_exports.sizeFromShape(shape);\n if (env().getBool(\"WEBGL_DOWNLOAD_FLOAT_ENABLED\")) {\n const tmpTarget = this.decode(dataId);\n const tmpData2 = this.texData.get(tmpTarget.dataId);\n const vals2 = this.gpgpu.downloadMatrixFromPackedTexture(tmpData2.texture.texture, ...getDenseTexShape(shape)).subarray(0, size);\n this.disposeIntermediateTensorInfo(tmpTarget);\n return vals2;\n }\n const shouldUsePackedProgram = env().getBool(\"WEBGL_PACK\") && isPacked === true;\n const outputShape = shouldUsePackedProgram ? getShapeAs3D(shape) : shape;\n const program = shouldUsePackedProgram ? new EncodeFloatPackedProgram(outputShape) : new EncodeFloatProgram(outputShape);\n const output = this.runWebGLProgram(program, [{ shape: outputShape, dtype, dataId }], \"float32\");\n const tmpData = this.texData.get(output.dataId);\n const vals = this.gpgpu.downloadByteEncodedFloatMatrixFromOutputTexture(tmpData.texture.texture, tmpData.texShape[0], tmpData.texShape[1]).subarray(0, size);\n this.disposeIntermediateTensorInfo(output);\n return vals;\n }\n timerAvailable() {\n return env().getNumber(\"WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE\") > 0;\n }\n time(f) {\n const oldActiveTimers = this.activeTimers;\n const newActiveTimers = [];\n let outerMostTime = false;\n if (this.programTimersStack == null) {\n this.programTimersStack = newActiveTimers;\n outerMostTime = true;\n } else {\n this.activeTimers.push(newActiveTimers);\n }\n this.activeTimers = newActiveTimers;\n f();\n const flattenedActiveTimerQueries = util_exports.flatten(this.activeTimers.map((d) => d.query)).filter((d) => d != null);\n const flattenedActiveTimerNames = util_exports.flatten(this.activeTimers.map((d) => d.name)).filter((d) => d != null);\n this.activeTimers = oldActiveTimers;\n if (outerMostTime) {\n this.programTimersStack = null;\n }\n const res = {\n uploadWaitMs: this.uploadWaitMs,\n downloadWaitMs: this.downloadWaitMs,\n kernelMs: null,\n wallMs: null\n };\n return (async () => {\n if (env().getNumber(\"WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE\") > 0) {\n const kernelMs = await Promise.all(flattenedActiveTimerQueries);\n res[\"kernelMs\"] = util_exports.sum(kernelMs);\n res[\"getExtraProfileInfo\"] = () => kernelMs.map((d, i2) => ({ name: flattenedActiveTimerNames[i2], ms: d })).map((d) => `${d.name}: ${d.ms}`).join(\", \");\n } else {\n res[\"kernelMs\"] = {\n error: \"WebGL query timers are not supported in this environment.\"\n };\n }\n this.uploadWaitMs = 0;\n this.downloadWaitMs = 0;\n return res;\n })();\n }\n memory() {\n return {\n unreliable: false,\n numBytesInGPU: this.numBytesInGPU,\n numBytesInGPUAllocated: this.textureManager.numBytesAllocated,\n numBytesInGPUFree: this.textureManager.numBytesFree\n };\n }\n startTimer() {\n if (env().getNumber(\"WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE\") > 0) {\n return this.gpgpu.beginQuery();\n }\n return { startMs: util_exports.now(), endMs: null };\n }\n endTimer(query) {\n if (env().getNumber(\"WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE\") > 0) {\n this.gpgpu.endQuery();\n return query;\n }\n query.endMs = util_exports.now();\n return query;\n }\n async getQueryTime(query) {\n if (env().getNumber(\"WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE\") > 0) {\n return this.gpgpu.waitForQueryAndGetTime(query);\n }\n const timerQuery = query;\n return timerQuery.endMs - timerQuery.startMs;\n }\n disposeData(dataId, force = false) {\n if (this.pendingDisposal.has(dataId)) {\n return false;\n }\n if (!this.texData.has(dataId)) {\n return true;\n }\n if (force) {\n this.texData.get(dataId).refCount = 0;\n } else {\n this.texData.get(dataId).refCount--;\n }\n if (!force && this.texData.get(dataId).refCount > 0) {\n return false;\n }\n if (this.pendingRead.has(dataId)) {\n this.pendingDisposal.add(dataId);\n this.pendingDeletes++;\n return false;\n }\n this.releaseGPUData(dataId);\n const { complexTensorInfos } = this.texData.get(dataId);\n if (complexTensorInfos != null) {\n this.disposeData(complexTensorInfos.real.dataId, force);\n this.disposeData(complexTensorInfos.imag.dataId, force);\n }\n this.texData.delete(dataId);\n return true;\n }\n releaseGPUData(dataId) {\n const { texture, dtype, texShape, usage, isPacked, slice: slice6 } = this.texData.get(dataId);\n const key = slice6 && slice6.origDataId || dataId;\n const refCount = this.dataRefCount.get(key);\n if (refCount > 1) {\n this.dataRefCount.set(key, refCount - 1);\n } else {\n this.dataRefCount.delete(key);\n if (texture != null) {\n this.numBytesInGPU -= this.computeBytes(texShape, dtype);\n this.textureManager.releaseTexture(texture, texShape, usage, isPacked);\n }\n }\n const texData = this.texData.get(dataId);\n texData.texture = null;\n texData.texShape = null;\n texData.isPacked = false;\n texData.slice = null;\n }\n getTexture(dataId) {\n this.uploadToGPU(dataId);\n return this.texData.get(dataId).texture.texture;\n }\n getDataInfo(dataId) {\n return this.texData.get(dataId);\n }\n shouldExecuteOnCPU(inputs, sizeThreshold = CPU_HANDOFF_SIZE_THRESHOLD) {\n return env().getBool(\"WEBGL_CPU_FORWARD\") && inputs.every((input2) => this.texData.get(input2.dataId).texture == null && util_exports.sizeFromShape(input2.shape) < sizeThreshold);\n }\n getGPGPUContext() {\n return this.gpgpu;\n }\n where(condition) {\n backend_util_exports.warn(\"tf.where() in webgl locks the UI thread. Call tf.whereAsync() instead\");\n const condVals = condition.dataSync();\n return whereImpl3(condition.shape, condVals);\n }\n packedUnaryOp(x, op2, dtype) {\n const program = new UnaryOpPackedProgram(x.shape, op2);\n const outInfo = this.compileAndRun(program, [x], dtype);\n return engine().makeTensorFromTensorInfo(outInfo);\n }\n abs(x) {\n if (this.shouldExecuteOnCPU([x]) && x.dtype !== \"complex64\") {\n const outValues = simpleAbsImplCPU(this.texData.get(x.dataId).values);\n return this.makeOutput(x.shape, x.dtype, outValues);\n }\n if (env().getBool(\"WEBGL_PACK_UNARY_OPERATIONS\")) {\n return this.packedUnaryOp(x, ABS, x.dtype);\n }\n const program = new UnaryOpProgram(x.shape, ABS);\n const outInfo = this.compileAndRun(program, [x]);\n return engine().makeTensorFromTensorInfo(outInfo);\n }\n makeTensorInfo(shape, dtype, values) {\n let dataId;\n if (dtype === \"string\" && values != null && values.length > 0 && util_exports.isString(values[0])) {\n const encodedValues = values.map((d) => util_exports.encodeString(d));\n dataId = this.write(encodedValues, shape, dtype);\n } else {\n dataId = this.write(values, shape, dtype);\n }\n this.texData.get(dataId).usage = null;\n return { dataId, shape, dtype };\n }\n makeOutput(shape, dtype, values) {\n return engine().makeTensorFromTensorInfo(this.makeTensorInfo(shape, dtype, values), this);\n }\n unpackTensor(input2) {\n const program = new UnpackProgram(input2.shape);\n return this.runWebGLProgram(program, [input2], input2.dtype);\n }\n packTensor(input2) {\n const program = new PackProgram(input2.shape);\n const preventEagerUnpackingOutput = true;\n return this.runWebGLProgram(program, [input2], input2.dtype, null, preventEagerUnpackingOutput);\n }\n packedReshape(input2, afterShape) {\n const input3DShape = [\n getBatchDim(input2.shape),\n ...getRowsCols(input2.shape)\n ];\n const input3D = {\n dtype: input2.dtype,\n shape: input3DShape,\n dataId: input2.dataId\n };\n const afterShapeAs3D = [\n getBatchDim(afterShape),\n ...getRowsCols(afterShape)\n ];\n const program = new ReshapePackedProgram(afterShapeAs3D, input3DShape);\n const preventEagerUnpackingOfOutput = true;\n const customValues = [input3DShape];\n const output = this.runWebGLProgram(program, [input3D], input2.dtype, customValues, preventEagerUnpackingOfOutput);\n return { dataId: output.dataId, shape: afterShape, dtype: output.dtype };\n }\n decode(dataId, customTexShape) {\n const texData = this.texData.get(dataId);\n const { isPacked, shape, dtype } = texData;\n if (customTexShape != null) {\n const size = util_exports.sizeFromShape(shape);\n const texSize = customTexShape[0] * customTexShape[1] * 4;\n util_exports.assert(size <= texSize, () => \"customTexShape is too small. Row * Column * 4 should be equal or larger than the size of the tensor data.\");\n }\n const shapeAs3D = getShapeAs3D(shape);\n let program;\n if (isPacked) {\n program = new DecodeMatrixPackedProgram(shapeAs3D);\n } else {\n program = new DecodeMatrixProgram(shapeAs3D);\n }\n const preventEagerUnpackingOfOutput = true;\n const customValues = [customTexShape != null ? customTexShape : getDenseTexShape(shapeAs3D)];\n const out = this.runWebGLProgram(program, [{ shape: shapeAs3D, dtype, dataId }], dtype, customValues, preventEagerUnpackingOfOutput, customTexShape);\n return { dtype, shape, dataId: out.dataId };\n }\n runWebGLProgram(program, inputs, outputDtype, customUniformValues, preventEagerUnpackingOfOutput = false, customTexShape) {\n const output = this.makeTensorInfo(program.outputShape, outputDtype);\n const outData = this.texData.get(output.dataId);\n if (program.packedOutput) {\n outData.isPacked = true;\n }\n if (program.outPackingScheme === PackingScheme.DENSE) {\n const texelShape = customTexShape != null ? customTexShape : getDenseTexShape(program.outputShape);\n outData.texShape = texelShape.map((d) => d * 2);\n }\n if (program.outTexUsage != null) {\n outData.usage = program.outTexUsage;\n }\n if (util_exports.sizeFromShape(output.shape) === 0) {\n outData.values = util_exports.getTypedArrayFromDType(output.dtype, 0);\n return output;\n }\n const dataToDispose = [];\n const inputsData = inputs.map((input2) => {\n if (input2.dtype === \"complex64\") {\n throw new Error(`GPGPUProgram does not support complex64 input. For complex64 dtypes, please separate the program into real and imaginary parts.`);\n }\n let texData = this.texData.get(input2.dataId);\n if (texData.texture == null) {\n if (!program.packedInputs && util_exports.sizeFromShape(input2.shape) <= env().getNumber(\"WEBGL_SIZE_UPLOAD_UNIFORM\")) {\n return {\n shape: input2.shape,\n texData: null,\n isUniform: true,\n uniformValues: texData.values\n };\n }\n if (program.packedInputs) {\n texData.isPacked = true;\n texData.shape = input2.shape;\n }\n }\n this.uploadToGPU(input2.dataId);\n if (!!texData.isPacked !== !!program.packedInputs) {\n input2 = texData.isPacked ? this.unpackTensor(input2) : this.packTensor(input2);\n dataToDispose.push(input2);\n texData = this.texData.get(input2.dataId);\n } else if (texData.isPacked && !isReshapeFree(texData.shape, input2.shape)) {\n const savedInput = input2;\n const targetShape = input2.shape;\n input2.shape = texData.shape;\n input2 = this.packedReshape(input2, targetShape);\n dataToDispose.push(input2);\n texData = this.texData.get(input2.dataId);\n savedInput.shape = targetShape;\n }\n return { shape: input2.shape, texData, isUniform: false };\n });\n this.uploadToGPU(output.dataId);\n const outputData = { shape: output.shape, texData: outData, isUniform: false };\n const key = makeShaderKey(program, inputsData, outputData);\n const binary = this.getAndSaveBinary(key, () => {\n return compileProgram(this.gpgpu, program, inputsData, outputData);\n });\n const shouldTimeProgram = this.activeTimers != null;\n let query;\n if (shouldTimeProgram) {\n query = this.startTimer();\n }\n if (!env().get(\"ENGINE_COMPILE_ONLY\")) {\n runProgram(this.gpgpu, binary, inputsData, outputData, customUniformValues);\n }\n dataToDispose.forEach((info) => this.disposeIntermediateTensorInfo(info));\n if (shouldTimeProgram) {\n query = this.endTimer(query);\n this.activeTimers.push({ name: program.constructor.name, query: this.getQueryTime(query) });\n }\n const glFlushThreshold = env().get(\"WEBGL_FLUSH_THRESHOLD\");\n if (glFlushThreshold > 0) {\n const time2 = util_exports.now();\n if (time2 - this.lastGlFlushTime > glFlushThreshold) {\n this.gpgpu.gl.flush();\n this.lastGlFlushTime = time2;\n }\n }\n if (!env().getBool(\"WEBGL_LAZILY_UNPACK\") && outData.isPacked && preventEagerUnpackingOfOutput === false) {\n const unpacked = this.unpackTensor(output);\n this.disposeIntermediateTensorInfo(output);\n return unpacked;\n }\n return output;\n }\n compileAndRun(program, inputs, outputDtype, customUniformValues, preventEagerUnpackingOfOutput = false) {\n outputDtype = outputDtype || inputs[0].dtype;\n const outInfo = this.runWebGLProgram(program, inputs, outputDtype, customUniformValues, preventEagerUnpackingOfOutput);\n return outInfo;\n }\n getAndSaveBinary(key, getBinary) {\n if (!(key in this.binaryCache)) {\n this.binaryCache[key] = getBinary();\n }\n return this.binaryCache[key];\n }\n getTextureManager() {\n return this.textureManager;\n }\n dispose() {\n if (this.disposed) {\n return;\n }\n if (!env().getBool(\"IS_TEST\")) {\n const allKeys = Object.keys(this.binaryCache);\n allKeys.forEach((key) => {\n this.gpgpu.deleteProgram(this.binaryCache[key].webGLProgram);\n delete this.binaryCache[key];\n });\n }\n this.textureManager.dispose();\n if (this.canvas != null && (typeof HTMLCanvasElement !== \"undefined\" && this.canvas instanceof HTMLCanvasElement)) {\n this.canvas.remove();\n } else {\n this.canvas = null;\n }\n if (this.gpgpuCreatedLocally) {\n this.gpgpu.program = null;\n this.gpgpu.dispose();\n }\n this.disposed = true;\n }\n floatPrecision() {\n if (this.floatPrecisionValue == null) {\n this.floatPrecisionValue = tidy(() => {\n if (!env().get(\"WEBGL_RENDER_FLOAT32_ENABLED\")) {\n const debugFlag = env().getBool(\"DEBUG\");\n env().set(\"DEBUG\", false);\n const underflowCheckValue = this.abs(scalar(1e-8)).dataSync()[0];\n env().set(\"DEBUG\", debugFlag);\n if (underflowCheckValue > 0) {\n return 32;\n }\n }\n return 16;\n });\n }\n return this.floatPrecisionValue;\n }\n epsilon() {\n return this.floatPrecision() === 32 ? EPSILON_FLOAT322 : EPSILON_FLOAT162;\n }\n uploadToGPU(dataId) {\n const texData = this.texData.get(dataId);\n const { shape, dtype, values, texture, usage, isPacked } = texData;\n if (texture != null) {\n return;\n }\n const shouldTimeProgram = this.activeTimers != null;\n let start;\n if (shouldTimeProgram) {\n start = util_exports.now();\n }\n let texShape = texData.texShape;\n if (texShape == null) {\n texShape = getTextureShapeFromLogicalShape(shape, isPacked);\n texData.texShape = texShape;\n }\n if (values != null) {\n const shapeAs3D = getShapeAs3D(shape);\n let program;\n let width = texShape[1], height = texShape[0];\n const isByteArray = values instanceof Uint8Array || values instanceof Uint8ClampedArray;\n if (isPacked || !isByteArray) {\n [width, height] = getPackedMatrixTextureShapeWidthHeight(texShape[0], texShape[1]);\n }\n if (isPacked) {\n program = new EncodeMatrixPackedProgram(shapeAs3D, isByteArray);\n } else {\n program = new EncodeMatrixProgram(shapeAs3D, isByteArray);\n }\n const tempDenseInputTexShape = isByteArray ? [height, width] : texShape;\n const tempDenseInputHandle = this.makeTensorInfo(tempDenseInputTexShape, dtype);\n const tempDenseInputTexData = this.texData.get(tempDenseInputHandle.dataId);\n if (isByteArray) {\n tempDenseInputTexData.usage = TextureUsage.PIXELS;\n } else {\n tempDenseInputTexData.usage = TextureUsage.UPLOAD;\n }\n tempDenseInputTexData.texShape = tempDenseInputTexShape;\n this.gpgpu.uploadDenseMatrixToTexture(this.getTexture(tempDenseInputHandle.dataId), width, height, values);\n const customValues = [[height, width]];\n const preventEagerUnpacking = true;\n const encodedOutputTarget = this.runWebGLProgram(program, [tempDenseInputHandle], dtype, customValues, preventEagerUnpacking);\n const outputTexData = this.texData.get(encodedOutputTarget.dataId);\n texData.texShape = outputTexData.texShape;\n texData.isPacked = outputTexData.isPacked;\n texData.usage = outputTexData.usage;\n if (!env().get(\"ENGINE_COMPILE_ONLY\")) {\n texData.texture = outputTexData.texture;\n texData.values = null;\n this.texData.delete(encodedOutputTarget.dataId);\n } else {\n this.disposeData(encodedOutputTarget.dataId);\n }\n this.disposeIntermediateTensorInfo(tempDenseInputHandle);\n if (shouldTimeProgram) {\n this.uploadWaitMs += util_exports.now() - start;\n }\n } else {\n const newTexture = this.acquireTexture(texShape, usage, dtype, isPacked);\n texData.texture = newTexture;\n }\n }\n convertAndCacheOnCPU(dataId, float32Values) {\n const texData = this.texData.get(dataId);\n const { dtype } = texData;\n this.releaseGPUData(dataId);\n if (float32Values != null) {\n texData.values = float32ToTypedArray(float32Values, dtype);\n }\n return texData.values;\n }\n acquireTexture(texShape, texType, dtype, isPacked) {\n this.numBytesInGPU += this.computeBytes(texShape, dtype);\n if (!this.warnedAboutMemory && this.numBytesInGPU > this.numMBBeforeWarning * 1024 * 1024) {\n const mb = (this.numBytesInGPU / 1024 / 1024).toFixed(2);\n this.warnedAboutMemory = true;\n console.warn(`High memory usage in GPU: ${mb} MB, most likely due to a memory leak`);\n }\n return this.textureManager.acquireTexture(texShape, texType, isPacked);\n }\n computeBytes(shape, dtype) {\n return shape[0] * shape[1] * util_exports.bytesPerElement(dtype);\n }\n checkCompileCompletion() {\n for (const [, binary] of Object.entries(this.binaryCache)) {\n this.checkCompletion_(binary);\n }\n }\n async checkCompileCompletionAsync() {\n const ps = [];\n if (this.gpgpu.parallelCompilationExtension) {\n for (const [, binary] of Object.entries(this.binaryCache)) {\n ps.push(this.checkCompletionAsync_(binary));\n }\n return Promise.all(ps);\n } else {\n for (const [, binary] of Object.entries(this.binaryCache)) {\n const p2 = new Promise((resolve) => {\n try {\n this.checkCompletion_(binary);\n resolve(true);\n } catch (error) {\n throw error;\n }\n });\n ps.push(p2);\n }\n return Promise.all(ps);\n }\n }\n async checkCompletionAsync_(binary) {\n if (this.gpgpu.gl.getProgramParameter(binary.webGLProgram, this.gpgpu.parallelCompilationExtension.COMPLETION_STATUS_KHR)) {\n return this.checkCompletion_(binary);\n } else {\n await nextFrame();\n return this.checkCompletionAsync_(binary);\n }\n }\n checkCompletion_(binary) {\n if (this.gpgpu.gl.getProgramParameter(binary.webGLProgram, this.gpgpu.gl.LINK_STATUS) === false) {\n console.log(this.gpgpu.gl.getProgramInfoLog(binary.webGLProgram));\n if (this.gpgpu.gl.getShaderParameter(binary.fragmentShader, this.gpgpu.gl.COMPILE_STATUS) === false) {\n logShaderSourceAndInfoLog(binary.source, this.gpgpu.gl.getShaderInfoLog(binary.fragmentShader));\n throw new Error(\"Failed to compile fragment shader.\");\n }\n throw new Error(\"Failed to link vertex and fragment shaders.\");\n }\n return true;\n }\n getUniformLocations() {\n for (const [, binary] of Object.entries(this.binaryCache)) {\n const { uniformLocations, customUniformLocations, infLoc, nanLoc, inShapesLocations, inTexShapesLocations, outShapeLocation, outShapeStridesLocation, outTexShapeLocation } = getUniformLocations(this.gpgpu, binary.program, binary.webGLProgram);\n binary.uniformLocations = uniformLocations;\n binary.customUniformLocations = customUniformLocations;\n binary.infLoc = infLoc;\n binary.nanLoc = nanLoc;\n binary.inShapesLocations = inShapesLocations;\n binary.inTexShapesLocations = inTexShapesLocations;\n binary.outShapeLocation = outShapeLocation;\n binary.outShapeStridesLocation = outShapeStridesLocation;\n binary.outTexShapeLocation = outTexShapeLocation;\n }\n }\n};\nMathBackendWebGL.nextDataId = 0;\nfunction float32ToTypedArray(a, dtype) {\n if (dtype === \"float32\" || dtype === \"complex64\") {\n return a;\n } else if (dtype === \"int32\" || dtype === \"bool\") {\n const result = dtype === \"int32\" ? new Int32Array(a.length) : new Uint8Array(a.length);\n for (let i2 = 0; i2 < result.length; ++i2) {\n result[i2] = Math.round(a[i2]);\n }\n return result;\n } else {\n throw new Error(`Unknown dtype ${dtype}`);\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/version.js\nvar version6 = \"3.21.0\";\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/webgl.js\nfunction forceHalfFloat() {\n env().set(\"WEBGL_FORCE_F16_TEXTURES\", true);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/base.js\nif (device_util_exports.isBrowser()) {\n registerBackend(\"webgl\", () => new MathBackendWebGL(), 2);\n}\nvar webgl = { forceHalfFloat };\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/binaryop_gpu.js\nvar CHECK_NAN_SNIPPET2 = `\n if (isnan(a)) return a;\n if (isnan(b)) return b;\n`;\nvar BinaryOpProgram = class {\n constructor(op2, aShape, bShape) {\n this.variableNames = [\"A\", \"B\"];\n this.outputShape = backend_util_exports.assertAndGetBroadcastShape(aShape, bShape);\n this.enableShapeUniforms = useShapeUniforms(this.outputShape.length);\n this.userCode = `\n float binaryOperation(float a, float b) {\n ${op2}\n }\n\n void main() {\n float a = getAAtOutCoords();\n float b = getBAtOutCoords();\n setOutput(binaryOperation(a, b));\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/binaryop_packed_gpu.js\nvar CHECK_NAN_SNIPPET_PACKED = `\n result.r = isNaN.r ? NAN : result.r;\n result.g = isNaN.g ? NAN : result.g;\n result.b = isNaN.b ? NAN : result.b;\n result.a = isNaN.a ? NAN : result.a;\n`;\nvar BinaryOpPackedProgram = class {\n constructor(op2, aShape, bShape, checkOutOfBounds = false) {\n this.variableNames = [\"A\", \"B\"];\n this.supportsBroadcasting = true;\n this.packedInputs = true;\n this.packedOutput = true;\n this.outputShape = backend_util_exports.assertAndGetBroadcastShape(aShape, bShape);\n const rank = this.outputShape.length;\n this.enableShapeUniforms = useShapeUniforms(rank);\n let checkOutOfBoundsString = \"\";\n if (checkOutOfBounds) {\n if (rank === 0 || util_exports.sizeFromShape(this.outputShape) === 1) {\n checkOutOfBoundsString = `\n result.y = 0.;\n result.z = 0.;\n result.w = 0.;\n `;\n } else {\n const dtype = getCoordsDataType(rank);\n checkOutOfBoundsString = `\n ${dtype} coords = getOutputCoords();\n `;\n if (rank === 1) {\n if (this.enableShapeUniforms) {\n checkOutOfBoundsString += `\n result.y = (coords + 1) >= outShape ? 0. : result.y;\n result.z = 0.;\n result.w = 0.;\n `;\n } else {\n checkOutOfBoundsString += `\n result.y = (coords + 1) >= ${this.outputShape[0]} ? 0. : result.y;\n result.z = 0.;\n result.w = 0.;\n `;\n }\n } else {\n const channels = getChannels(\"coords\", rank);\n if (this.enableShapeUniforms) {\n checkOutOfBoundsString += `\n bool nextRowOutOfBounds =\n (${channels[rank - 2]} + 1) >= outShape[${rank} - 2];\n bool nextColOutOfBounds =\n (${channels[rank - 1]} + 1) >= outShape[${rank} - 1];\n result.y = nextColOutOfBounds ? 0. : result.y;\n result.z = nextRowOutOfBounds ? 0. : result.z;\n result.w = nextColOutOfBounds || nextRowOutOfBounds ? 0. : result.w;\n `;\n } else {\n checkOutOfBoundsString += `\n bool nextRowOutOfBounds =\n (${channels[rank - 2]} + 1) >= ${this.outputShape[rank - 2]};\n bool nextColOutOfBounds =\n (${channels[rank - 1]} + 1) >= ${this.outputShape[rank - 1]};\n result.y = nextColOutOfBounds ? 0. : result.y;\n result.z = nextRowOutOfBounds ? 0. : result.z;\n result.w = nextColOutOfBounds || nextRowOutOfBounds ? 0. : result.w;\n `;\n }\n }\n }\n }\n this.userCode = `\n vec4 binaryOperation(vec4 a, vec4 b) {\n ${op2}\n }\n\n void main() {\n vec4 a = getAAtOutCoords();\n vec4 b = getBAtOutCoords();\n\n vec4 result = binaryOperation(a, b);\n ${checkOutOfBoundsString}\n\n setOutput(result);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Identity.js\nfunction identity3(args) {\n const { inputs, backend: backend2 } = args;\n const { x } = inputs;\n backend2.incRef(x.dataId);\n return { dataId: x.dataId, shape: x.shape, dtype: x.dtype };\n}\nvar identityConfig2 = {\n kernelName: Identity,\n backendName: \"webgl\",\n kernelFunc: identity3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Complex.js\nfunction complex3(args) {\n const { inputs, backend: backend2 } = args;\n const { real: real5, imag: imag5 } = inputs;\n const complexInfo = backend2.makeTensorInfo(real5.shape, \"complex64\");\n const complex5 = backend2.texData.get(complexInfo.dataId);\n const realTensorInfo = identity3({ inputs: { x: real5 }, backend: backend2 });\n const imagTensorInfo = identity3({ inputs: { x: imag5 }, backend: backend2 });\n complex5.complexTensorInfos = { real: realTensorInfo, imag: imagTensorInfo };\n return complexInfo;\n}\nvar complexConfig2 = {\n kernelName: Complex,\n backendName: \"webgl\",\n kernelFunc: complex3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/LeakyRelu.js\nvar LEAKYRELU = `return (a < 0.) ? b * a : a;`;\nvar LEAKYRELU_PACKED = `\n vec4 aLessThanZero = vec4(lessThan(a, vec4(0.)));\n return (aLessThanZero * (b * a)) + ((vec4(1.0) - aLessThanZero) * a);\n`;\nfunction leakyRelu3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { alpha } = attrs;\n const $alpha = backend2.makeTensorInfo([], \"float32\", util_exports.createScalarValue(alpha, \"float32\"));\n const program = env().getBool(\"WEBGL_PACK_BINARY_OPERATIONS\") ? new BinaryOpPackedProgram(LEAKYRELU_PACKED, x.shape, $alpha.shape) : new BinaryOpProgram(LEAKYRELU, x.shape, $alpha.shape);\n const result = backend2.runWebGLProgram(program, [x, $alpha], \"float32\");\n backend2.disposeIntermediateTensorInfo($alpha);\n return result;\n}\nvar leakyReluConfig2 = {\n kernelName: LeakyRelu,\n backendName: \"webgl\",\n kernelFunc: leakyRelu3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Prelu.js\nvar PRELU = `return (a < 0.) ? b * a : a;`;\nvar PRELU_PACKED = `\n vec4 aLessThanZero = vec4(lessThan(a, vec4(0.)));\n return (aLessThanZero * (b * a)) + ((vec4(1.0) - aLessThanZero) * a);\n`;\nfunction prelu4(args) {\n const { inputs, backend: backend2 } = args;\n const { x, alpha } = inputs;\n const program = env().getBool(\"WEBGL_PACK_BINARY_OPERATIONS\") ? new BinaryOpPackedProgram(PRELU_PACKED, x.shape, alpha.shape) : new BinaryOpProgram(PRELU, x.shape, alpha.shape);\n return backend2.runWebGLProgram(program, [x, alpha], \"float32\");\n}\nvar preluConfig2 = {\n kernelName: Prelu,\n backendName: \"webgl\",\n kernelFunc: prelu4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernel_utils/kernel_funcs_utils.js\nvar CHECK_NAN_SNIPPET_UNARY = `if (isnan(x)) return x;`;\nfunction unaryKernelFunc2({ opSnippet, packedOpSnippet, cpuKernelImpl, dtype }) {\n return ({ inputs, backend: backend2 }) => {\n const { x } = inputs;\n const webglBackend = backend2;\n const $dtype = dtype || x.dtype;\n if (webglBackend.shouldExecuteOnCPU([x]) && cpuKernelImpl != null) {\n const xData = webglBackend.texData.get(x.dataId);\n const outValues = cpuKernelImpl(xData.values, $dtype);\n return webglBackend.makeTensorInfo(x.shape, $dtype, outValues);\n }\n const shouldUsePackedProgram = env().getBool(\"WEBGL_PACK_UNARY_OPERATIONS\") && packedOpSnippet != null;\n let program;\n if (shouldUsePackedProgram) {\n program = new UnaryOpPackedProgram(x.shape, packedOpSnippet);\n } else {\n program = new UnaryOpProgram(x.shape, opSnippet);\n }\n return webglBackend.runWebGLProgram(program, [x], $dtype);\n };\n}\nfunction binaryKernelFunc2({ opSnippet, packedOpSnippet, checkOutOfBounds = false, supportsComplex = false, cpuKernelImpl, dtype }) {\n return ({ inputs, backend: backend2 }) => {\n const { a, b } = inputs;\n const webglBackend = backend2;\n if (supportsComplex && a.dtype === \"complex64\") {\n const aData = webglBackend.texData.get(a.dataId);\n const bData = webglBackend.texData.get(b.dataId);\n const [real5, imag5] = [\n [aData.complexTensorInfos.real, bData.complexTensorInfos.real],\n [aData.complexTensorInfos.imag, bData.complexTensorInfos.imag]\n ].map((complexParts) => {\n const [aPart, bPart] = complexParts;\n const aHandle = {\n dataId: aPart.dataId,\n dtype: aPart.dtype,\n shape: a.shape\n };\n const bHandle = {\n dataId: bPart.dataId,\n dtype: bPart.dtype,\n shape: b.shape\n };\n const program2 = new BinaryOpProgram(opSnippet, a.shape, b.shape);\n return webglBackend.runWebGLProgram(program2, [aHandle, bHandle], upcastType(aPart.dtype, bPart.dtype));\n });\n const complexOutput = complex3({ inputs: { real: real5, imag: imag5 }, backend: webglBackend });\n webglBackend.disposeIntermediateTensorInfo(real5);\n webglBackend.disposeIntermediateTensorInfo(imag5);\n return complexOutput;\n }\n const $dtype = dtype || upcastType(a.dtype, b.dtype);\n if ((a.dtype === \"string\" || b.dtype === \"string\" || webglBackend.shouldExecuteOnCPU([a, b])) && cpuKernelImpl != null) {\n const aVals = webglBackend.texData.get(a.dataId).values;\n const bVals = webglBackend.texData.get(b.dataId).values;\n const decodedAVals = a.dtype === \"string\" ? backend_util_exports.fromUint8ToStringArray(aVals) : aVals;\n const decodedBVals = a.dtype === \"string\" ? backend_util_exports.fromUint8ToStringArray(bVals) : bVals;\n const [outValues, outShape] = cpuKernelImpl(a.shape, b.shape, decodedAVals, decodedBVals, $dtype);\n const out = webglBackend.makeTensorInfo(outShape, $dtype);\n const outData = webglBackend.texData.get(out.dataId);\n outData.values = outValues;\n return out;\n }\n const shouldUsePackedProgram = env().getBool(\"WEBGL_PACK_BINARY_OPERATIONS\") && packedOpSnippet != null;\n let program;\n if (shouldUsePackedProgram) {\n program = new BinaryOpPackedProgram(packedOpSnippet, a.shape, b.shape, checkOutOfBounds);\n } else {\n program = new BinaryOpProgram(opSnippet, a.shape, b.shape);\n }\n return webglBackend.runWebGLProgram(program, [a, b], $dtype);\n };\n}\nfunction mapActivationToShaderProgram(activation2, packed = false) {\n if (activation2 === \"linear\") {\n if (packed) {\n return LINEAR2;\n }\n return LINEAR;\n } else if (activation2 === \"relu\") {\n if (packed) {\n return RELU2;\n }\n return RELU;\n } else if (activation2 === \"elu\") {\n if (packed) {\n return ELU3;\n }\n return ELU2;\n } else if (activation2 === \"relu6\") {\n if (packed) {\n return RELU62;\n }\n return RELU6;\n } else if (activation2 === \"prelu\") {\n if (packed) {\n return PRELU_PACKED;\n }\n return PRELU;\n } else if (activation2 === \"leakyrelu\") {\n if (packed) {\n return LEAKYRELU_PACKED;\n }\n return LEAKYRELU;\n } else if (activation2 === \"sigmoid\") {\n if (packed) {\n return SIGMOID2;\n }\n return SIGMOID;\n }\n throw new Error(`Activation ${activation2} has not been implemented for the WebGL backend.`);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/mulmat_packed_gpu.js\nvar MatMulPackedProgram = class {\n constructor(aShape, bShape, outputShape, transposeA = false, transposeB = false, addBias = false, activation2 = null, hasPreluActivation = false, hasLeakyreluActivation = false) {\n this.variableNames = [\"matrixA\", \"matrixB\"];\n this.packedInputs = true;\n this.packedOutput = true;\n this.outputShape = outputShape;\n this.enableShapeUniforms = useShapeUniforms(this.outputShape.length);\n const sharedDim = transposeA ? aShape[1] : aShape[2];\n const sharedDimensionPacked = Math.ceil(sharedDim / 2);\n const aSample = transposeA ? \"i * 2, rc.y\" : \"rc.y, i * 2\";\n const bSample = transposeB ? \"rc.z, i * 2\" : \"i * 2, rc.z\";\n const aSwizzle = transposeA ? [\"a.xxyy\", \"a.zzww\"] : [\"a.xxzz\", \"a.yyww\"];\n const bSwizzle = transposeB ? [\"b.xzxz\", \"b.ywyw\"] : [\"b.xyxy\", \"b.zwzw\"];\n let activationSnippet = \"\", applyActivationSnippet = \"\";\n if (activation2) {\n if (hasPreluActivation) {\n activationSnippet = `vec4 activation(vec4 a) {\n vec4 b = getPreluActivationWeightsAtOutCoords();\n ${activation2}\n }`;\n } else if (hasLeakyreluActivation) {\n activationSnippet = `vec4 activation(vec4 a) {\n vec4 b = getLeakyreluAlphaAtOutCoords();\n ${activation2}\n }`;\n } else {\n activationSnippet = `vec4 activation(vec4 x) {\n ${activation2}\n }`;\n }\n applyActivationSnippet = `result = activation(result);`;\n }\n const addBiasSnippet = addBias ? \"result += getBiasAtOutCoords();\" : \"\";\n if (addBias) {\n this.variableNames.push(\"bias\");\n }\n if (hasPreluActivation) {\n this.variableNames.push(\"preluActivationWeights\");\n }\n if (hasLeakyreluActivation) {\n this.variableNames.push(\"leakyreluAlpha\");\n }\n let batchASnippet = \"rc.x\";\n let batchBSnippet = \"rc.x\";\n if (aShape[0] < bShape[0]) {\n batchASnippet = `int(min(float(rc.x), ${aShape[0] - 1}.))`;\n } else if (bShape[0] < aShape[0]) {\n batchBSnippet = `int(min(float(rc.x), ${bShape[0] - 1}.))`;\n }\n this.userCode = `\n ${activationSnippet}\n // Don't use uniform for sharedDimensionPacked for performance.\n const float sharedDimension = ${sharedDimensionPacked}.0;\n\n vec4 dot2x2ARowBCol(ivec3 rc) {\n vec4 result = vec4(0);\n for (int i = 0; i < ${sharedDimensionPacked}; i++) {\n int batchA = ${batchASnippet};\n int batchB = ${batchBSnippet};\n vec4 a = getMatrixA(batchA, ${aSample});\n vec4 b = getMatrixB(batchB, ${bSample});\n\n // These swizzled products need to be separately added.\n // See: https://github.com/tensorflow/tfjs/issues/1735\n result += (${aSwizzle[0]} * ${bSwizzle[0]});\n result += (${aSwizzle[1]} * ${bSwizzle[1]});\n }\n return result;\n }\n\n void main() {\n ivec3 rc = getOutputCoords();\n vec4 result = dot2x2ARowBCol(rc);\n\n ${addBiasSnippet}\n\n ${applyActivationSnippet}\n\n setOutput(result);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/binaryop_complex_gpu.js\nvar COMPLEX_MULTIPLY = {\n REAL: \"return areal * breal - aimag * bimag;\",\n IMAG: \"return areal * bimag + aimag * breal;\"\n};\nvar BinaryOpComplexProgram = class {\n constructor(op2, aShape, bShape) {\n this.variableNames = [\"AReal\", \"AImag\", \"BReal\", \"BImag\"];\n this.outputShape = backend_util_exports.assertAndGetBroadcastShape(aShape, bShape);\n this.userCode = `\n float binaryOpComplex(\n float areal, float aimag, float breal, float bimag) {\n ${op2}\n }\n\n void main() {\n float areal = getARealAtOutCoords();\n float aimag = getAImagAtOutCoords();\n float breal = getBRealAtOutCoords();\n float bimag = getBImagAtOutCoords();\n setOutput(binaryOpComplex(areal, aimag, breal, bimag));\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Multiply.js\nvar MUL = \"return a * b;\";\nfunction multiply3(args) {\n const { inputs, backend: backend2 } = args;\n const { a, b } = inputs;\n const dtype = backend_util_exports.upcastType(a.dtype, b.dtype);\n if (a.dtype === \"complex64\") {\n const aData = backend2.texData.get(a.dataId);\n const bData = backend2.texData.get(b.dataId);\n const realProgram = new BinaryOpComplexProgram(COMPLEX_MULTIPLY.REAL, a.shape, b.shape);\n const imagProgram = new BinaryOpComplexProgram(COMPLEX_MULTIPLY.IMAG, a.shape, b.shape);\n const inputs2 = [\n {\n dataId: aData.complexTensorInfos.real.dataId,\n dtype: aData.complexTensorInfos.real.dtype,\n shape: a.shape\n },\n {\n dataId: aData.complexTensorInfos.imag.dataId,\n dtype: aData.complexTensorInfos.imag.dtype,\n shape: a.shape\n },\n {\n dataId: bData.complexTensorInfos.real.dataId,\n dtype: bData.complexTensorInfos.real.dtype,\n shape: b.shape\n },\n {\n dataId: bData.complexTensorInfos.imag.dataId,\n dtype: bData.complexTensorInfos.imag.dtype,\n shape: b.shape\n }\n ];\n const realPart = backend2.runWebGLProgram(realProgram, inputs2, \"float32\");\n const imagPart = backend2.runWebGLProgram(imagProgram, inputs2, \"float32\");\n const complexOutput = complex3({ inputs: { real: realPart, imag: imagPart }, backend: backend2 });\n backend2.disposeIntermediateTensorInfo(realPart);\n backend2.disposeIntermediateTensorInfo(imagPart);\n return complexOutput;\n }\n if (backend2.shouldExecuteOnCPU([a, b])) {\n const aData = backend2.texData.get(a.dataId);\n const bData = backend2.texData.get(b.dataId);\n const [outValues, outShape] = multiplyImplCPU(a.shape, b.shape, aData.values, bData.values, dtype);\n const out = backend2.makeTensorInfo(outShape, dtype);\n const outData = backend2.texData.get(out.dataId);\n outData.values = outValues;\n return out;\n }\n let program;\n if (env().getBool(\"WEBGL_PACK_BINARY_OPERATIONS\")) {\n program = new BinaryOpPackedProgram(MUL, a.shape, b.shape);\n } else {\n program = new BinaryOpProgram(MUL, a.shape, b.shape);\n }\n return backend2.runWebGLProgram(program, [a, b], dtype);\n}\nvar multiplyConfig2 = {\n kernelName: Multiply,\n backendName: \"webgl\",\n kernelFunc: multiply3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernel_utils/reshape.js\nfunction packedReshape(input2, afterShape, backend2) {\n const input3DShape = [\n getBatchDim(input2.shape),\n ...getRowsCols(input2.shape)\n ];\n const input3D = {\n dtype: input2.dtype,\n shape: input3DShape,\n dataId: input2.dataId\n };\n const afterShapeAs3D = [\n getBatchDim(afterShape),\n ...getRowsCols(afterShape)\n ];\n const program = new ReshapePackedProgram(afterShapeAs3D, input3DShape);\n const preventEagerUnpackingOfOutput = true;\n const customValues = [input3DShape];\n const output = backend2.runWebGLProgram(program, [input3D], input2.dtype, customValues, preventEagerUnpackingOfOutput);\n return { dataId: output.dataId, shape: afterShape, dtype: output.dtype };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Reshape.js\nfunction reshape4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { shape } = attrs;\n const webglBackend = backend2;\n const xSize = util_exports.sizeFromShape(x.shape);\n const $shape = util_exports.inferFromImplicitShape(shape, xSize);\n const $xSize = util_exports.sizeFromShape($shape);\n util_exports.assert(xSize === $xSize, () => `The new shape (${$shape}) has ${$xSize} elements and the old shape (${x.shape}) has ${xSize} elements. The new shape and old shape must have the same number of elements.`);\n const xTexData = webglBackend.texData.get(x.dataId);\n if (xTexData.isPacked && !isReshapeFree(x.shape, $shape) && !(xTexData.texture !== null && isReshapeFree(xTexData.shape, $shape))) {\n return packedReshape(x, $shape, webglBackend);\n }\n webglBackend.incRef(x.dataId);\n return { dataId: x.dataId, shape: $shape, dtype: x.dtype };\n}\nvar reshapeConfig2 = {\n kernelName: Reshape,\n backendName: \"webgl\",\n kernelFunc: reshape4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/mean_gpu.js\nvar MeanProgram = class {\n constructor(reduceInfo, divisor) {\n this.variableNames = [\"x\"];\n const { windowSize, batchSize, inSize, outSize } = reduceInfo;\n this.outputShape = [batchSize, outSize];\n const windowSizeNearestVec4 = Math.floor(windowSize / 4) * 4;\n const windowSizeVec4Remainder = windowSize % 4;\n let updateSnippet = `sumValue += dot(values, ones);`;\n if (divisor != null) {\n const denominator = 1 / divisor;\n updateSnippet = `sumValue += dot(values * ${util_exports.isInt(denominator) ? denominator.toPrecision(2) : denominator}, ones);`;\n }\n let checkOutOfBounds = \"\";\n if (inSize % windowSize > 0) {\n checkOutOfBounds = `\n if (inIdx < 0 || inIdx >= ${inSize}) {\n return 0.0;\n }\n `;\n }\n this.userCode = `\n const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);\n\n float getValue(int batch, int inIdx) {\n ${checkOutOfBounds}\n return getX(batch, inIdx);\n }\n\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n int outIdx = coords[1];\n int inOffset = outIdx * ${windowSize};\n\n float sumValue = 0.0;\n\n for (int i = 0; i < ${windowSizeNearestVec4}; i += 4) {\n int inIdx = inOffset + i;\n vec4 values = vec4(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n getValue(batch, inIdx + 2),\n getValue(batch, inIdx + 3)\n );\n\n ${updateSnippet}\n }\n\n int inIdx = inOffset + ${windowSizeNearestVec4};\n if (${windowSizeVec4Remainder === 1}) {\n vec4 values = vec4(getValue(batch, inIdx), 0.0, 0.0, 0.0);\n\n ${updateSnippet}\n } else if (${windowSizeVec4Remainder === 2}) {\n vec4 values = vec4(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1), 0.0, 0.0);\n\n ${updateSnippet}\n } else if (${windowSizeVec4Remainder === 3}) {\n vec4 values = vec4(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n getValue(batch, inIdx + 2), 0.0);\n\n ${updateSnippet}\n }\n setOutput(sumValue);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/reduce_gpu.js\nvar ReduceProgram = class {\n constructor(reduceInfo, reduceType) {\n this.variableNames = [\"x\"];\n const { windowSize, batchSize, inSize, outSize } = reduceInfo;\n this.outputShape = [batchSize, outSize];\n let initializationValue = \"0.0\";\n let compareOp = ``;\n if (reduceType === \"prod\") {\n initializationValue = \"1.0\";\n } else if (reduceType === \"min\") {\n initializationValue = \"1.0 / 1e-20\";\n compareOp = `min`;\n } else if (reduceType === \"max\") {\n initializationValue = \"-1.0 / 1e-20\";\n compareOp = `max`;\n }\n let returnValue = `${reduceType}(${reduceType}(${reduceType}(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])`;\n if (reduceType === \"sum\") {\n returnValue = `sumValue`;\n } else if (reduceType === \"prod\") {\n returnValue = `prodValue`;\n } else if (reduceType === \"all\") {\n returnValue = `allValue`;\n } else if (reduceType === \"any\") {\n returnValue = `anyValue`;\n }\n const windowSizeNearestVec4 = Math.floor(windowSize / 4) * 4;\n const windowSizeVec4Remainder = windowSize % 4;\n let updateSnippet = `\n if (${reduceType === \"sum\"}) {\n sumValue += dot(values, ones);\n } else if (${reduceType === \"prod\"}) {\n vec2 tmp = vec2(values[0], values[1]) * vec2(values[2], values[3]);\n prodValue *= tmp[0] * tmp[1];\n } else {\n minMaxValue = ${compareOp}(values, minMaxValue);\n if (${reduceType === \"min\"} || ${reduceType === \"max\"}) {\n minMaxValue = ${compareOp}(values, minMaxValue);\n bvec4 isNaN = isnan(values);\n if (isNaN.r || isNaN.g || isNaN.b || isNaN.a) {\n minMaxValue = vec4(NAN);\n }\n }\n }\n `;\n let vecType = `vec4`;\n if (reduceType === \"all\") {\n initializationValue = \"1.0\";\n updateSnippet = `\n bool reducedAllValue = all(values);\n float floatedReducedAllValue = float(reducedAllValue);\n allValue = float(allValue >= 1.0 && floatedReducedAllValue >= 1.0);\n `;\n vecType = `bvec4`;\n } else if (reduceType === \"any\") {\n initializationValue = \"0.0\";\n updateSnippet = `\n bool reducedAnyValue = any(values);\n float floatedReducedAnyValue = float(reducedAnyValue);\n anyValue = float(anyValue >= 1.0 || floatedReducedAnyValue >= 1.0);\n `;\n vecType = `bvec4`;\n }\n let checkOutOfBounds = \"\";\n if (inSize % windowSize > 0) {\n checkOutOfBounds = `\n if (inIdx < 0 || inIdx >= ${inSize}) {\n return initializationValue;\n }\n `;\n }\n this.userCode = `\n const float initializationValue = ${initializationValue};\n const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);\n\n float getValue(int batch, int inIdx) {\n ${checkOutOfBounds}\n return getX(batch, inIdx);\n }\n\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n int outIdx = coords[1];\n int inOffset = outIdx * ${windowSize};\n\n vec4 minMaxValue = vec4(${initializationValue});\n float prodValue = 1.0;\n float sumValue = 0.0;\n float allValue = 1.0;\n float anyValue = 0.0;\n\n for (int i = 0; i < ${windowSizeNearestVec4}; i += 4) {\n int inIdx = inOffset + i;\n ${vecType} values = ${vecType}(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n getValue(batch, inIdx + 2),\n getValue(batch, inIdx + 3)\n );\n\n ${updateSnippet}\n }\n\n int inIdx = inOffset + ${windowSizeNearestVec4};\n if (${windowSizeVec4Remainder === 1}) {\n ${vecType} values = ${vecType}(\n getValue(batch, inIdx),\n initializationValue,\n initializationValue,\n initializationValue\n );\n\n ${updateSnippet}\n } else if (${windowSizeVec4Remainder === 2}) {\n ${vecType} values = ${vecType}(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n initializationValue,\n initializationValue\n );\n\n ${updateSnippet}\n } else if (${windowSizeVec4Remainder === 3}) {\n ${vecType} values = ${vecType}(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n getValue(batch, inIdx + 2),\n initializationValue\n );\n\n ${updateSnippet}\n }\n setOutput(${returnValue});\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernel_utils/reduce.js\nfunction getReductionStages(inShape) {\n const stages = [];\n while (stages.length === 0 || stages[stages.length - 1].outSize !== 1) {\n const outSize = stages.length ? stages[stages.length - 1].outSize : inShape[1];\n const windowSize = backend_util_exports.computeOptimalWindowSize(outSize);\n stages.push({\n inSize: outSize,\n windowSize,\n outSize: Math.ceil(outSize / windowSize)\n });\n }\n return stages;\n}\nfunction reduce(x, dtype, reductionType, backend2) {\n const reductionStages = getReductionStages(x.shape);\n let result = x;\n for (let i2 = 0; i2 < reductionStages.length; i2++) {\n const { inSize, windowSize, outSize } = reductionStages[i2];\n let program;\n let previousResult;\n if (reductionType === \"mean\") {\n program = i2 === 0 ? new MeanProgram({ windowSize, inSize, batchSize: x.shape[0], outSize }, inSize) : new MeanProgram({ windowSize, inSize, batchSize: x.shape[0], outSize });\n } else {\n program = new ReduceProgram({ windowSize, inSize, batchSize: x.shape[0], outSize }, reductionType);\n }\n previousResult = result;\n result = backend2.runWebGLProgram(program, [result], dtype);\n if (previousResult.dataId !== x.dataId) {\n backend2.disposeIntermediateTensorInfo(previousResult);\n }\n }\n return result;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/transpose_gpu.js\nvar TransposeProgram = class {\n constructor(aShape, newDim) {\n this.variableNames = [\"A\"];\n const outputShape = new Array(aShape.length);\n for (let i2 = 0; i2 < outputShape.length; i2++) {\n outputShape[i2] = aShape[newDim[i2]];\n }\n this.outputShape = outputShape;\n this.rank = outputShape.length;\n const dtype = getCoordsDataType(this.rank);\n const switched = getSwitchedCoords(newDim);\n this.userCode = `\n void main() {\n ${dtype} resRC = getOutputCoords();\n setOutput(getA(${switched}));\n }\n `;\n }\n};\nfunction getSwitchedCoords(newDim) {\n const rank = newDim.length;\n if (rank > 6) {\n throw Error(`Transpose for rank ${rank} is not yet supported`);\n }\n const originalOrder = [\"resRC.x\", \"resRC.y\", \"resRC.z\", \"resRC.w\", \"resRC.u\", \"resRC.v\"];\n const switchedCoords = new Array(rank);\n for (let i2 = 0; i2 < newDim.length; i2++) {\n switchedCoords[newDim[i2]] = originalOrder[i2];\n }\n return switchedCoords.join();\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/transpose_packed_gpu.js\nvar TransposePackedProgram = class {\n constructor(aShape, newDim) {\n this.variableNames = [\"A\"];\n this.packedInputs = true;\n this.packedOutput = true;\n const outputShape = new Array(aShape.length);\n for (let i2 = 0; i2 < outputShape.length; i2++) {\n outputShape[i2] = aShape[newDim[i2]];\n }\n this.outputShape = outputShape;\n this.rank = outputShape.length;\n if (this.rank > 6) {\n throw Error(`Packed transpose for rank ${this.rank} is not yet supported.`);\n }\n const dtype = getCoordsDataType(this.rank);\n const outputOrder = getVecChannels(\"rc\", this.rank);\n const switchedOrder = new Array(this.rank);\n for (let i2 = 0; i2 < newDim.length; i2++) {\n switchedOrder[newDim[i2]] = outputOrder[i2];\n }\n const innerDims = `vec2(${switchedOrder.slice(-2).join()})`;\n const nextColumn = `++${outputOrder[this.rank - 1]} < ${outputShape[this.rank - 1]}`;\n const getc = `getChannel(getA(${switchedOrder.join()}), ${innerDims})`;\n this.userCode = `\n void main() {\n ${dtype} rc = getOutputCoords();\n vec4 result = vec4(0.);\n result[0] = ${getc};\n if(${nextColumn}) {\n result[1] = ${getc};\n }\n --${outputOrder[this.rank - 1]};\n if(++${outputOrder[this.rank - 2]} < ${outputShape[this.rank - 2]}) {\n result[2] = ${getc};\n if(${nextColumn}) {\n result[3] = ${getc};\n }\n }\n setOutput(result);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Transpose_impl.js\nfunction transposeImpl2(x, perm, backend2) {\n const program = env().getBool(\"WEBGL_PACK_ARRAY_OPERATIONS\") ? new TransposePackedProgram(x.shape, perm) : new TransposeProgram(x.shape, perm);\n return backend2.runWebGLProgram(program, [x], x.dtype);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Sum_impl.js\nfunction sumImpl(x, axis, keepDims, backend2) {\n const reductionIndices = axis;\n const xRank = x.shape.length;\n const origAxes = util_exports.parseAxisParam(reductionIndices, x.shape);\n let axes = origAxes;\n const permutedAxes = backend_util_exports.getAxesPermutation(axes, xRank);\n const sumInputIsTransposed = permutedAxes != null;\n let sumInput = x;\n if (sumInputIsTransposed) {\n sumInput = transposeImpl2(x, permutedAxes, backend2);\n axes = backend_util_exports.getInnerMostAxes(axes.length, xRank);\n }\n backend_util_exports.assertAxesAreInnerMostDims(\"sum\", axes, xRank);\n const [sumOutShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes(sumInput.shape, axes);\n let outShape = sumOutShape;\n if (keepDims) {\n outShape = backend_util_exports.expandShapeToKeepDim(sumOutShape, origAxes);\n }\n const inSize = util_exports.sizeFromShape(reduceShape);\n const xSize = util_exports.sizeFromShape(x.shape);\n const batchSize = xSize / inSize;\n const reshapedInput = reshape4({ inputs: { x: sumInput }, attrs: { shape: [batchSize, inSize] }, backend: backend2 });\n const outType = sumOutType(x.dtype);\n const reduced = reduce(reshapedInput, outType, \"sum\", backend2);\n const out = reshape4({ inputs: { x: reduced }, attrs: { shape: outShape }, backend: backend2 });\n backend2.disposeIntermediateTensorInfo(reshapedInput);\n backend2.disposeIntermediateTensorInfo(reduced);\n if (sumInputIsTransposed) {\n backend2.disposeIntermediateTensorInfo(sumInput);\n }\n return out;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Sum.js\nfunction sum4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis, keepDims } = attrs;\n return sumImpl(x, axis, keepDims, backend2);\n}\nvar sumConfig2 = {\n kernelName: Sum,\n backendName: \"webgl\",\n kernelFunc: sum4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Transpose.js\nfunction transpose3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { perm } = attrs;\n const webglBackend = backend2;\n const xRank = x.shape.length;\n const newShape = new Array(xRank);\n for (let i2 = 0; i2 < newShape.length; i2++) {\n newShape[i2] = x.shape[perm[i2]];\n }\n let out;\n if (webglBackend.shouldExecuteOnCPU([x])) {\n const xTexData = webglBackend.texData.get(x.dataId);\n const values = xTexData.values;\n const outValues = transposeImplCPU(values, x.shape, x.dtype, perm, newShape);\n out = webglBackend.makeTensorInfo(newShape, x.dtype);\n const outData = webglBackend.texData.get(out.dataId);\n outData.values = outValues;\n } else {\n out = transposeImpl2(x, perm, webglBackend);\n }\n return out;\n}\nvar transposeConfig2 = {\n kernelName: Transpose,\n backendName: \"webgl\",\n kernelFunc: transpose3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/BatchMatMul_impl.js\nvar MATMUL_SHARED_DIM_THRESHOLD = 1e3;\nfunction batchMatMulImpl({ a, b, transposeA, transposeB, backend: backend2, bias = null, preluActivationWeights = null, leakyreluAlpha = 0, activation: activation2 = null }) {\n const aRank = a.shape.length;\n const bRank = b.shape.length;\n const innerShapeA = transposeA ? a.shape[aRank - 2] : a.shape[aRank - 1];\n const innerShapeB = transposeB ? b.shape[bRank - 1] : b.shape[bRank - 2];\n const outerShapeA = transposeA ? a.shape[aRank - 1] : a.shape[aRank - 2];\n const outerShapeB = transposeB ? b.shape[bRank - 2] : b.shape[bRank - 1];\n const outerDimsA = a.shape.slice(0, -2);\n const outerDimsB = b.shape.slice(0, -2);\n const batchDimA = util_exports.sizeFromShape(outerDimsA);\n const batchDimB = util_exports.sizeFromShape(outerDimsB);\n const outShapeOuterDims = broadcast_util_exports.assertAndGetBroadcastShape(a.shape.slice(0, -2), b.shape.slice(0, -2));\n const outShape = outShapeOuterDims.concat([outerShapeA, outerShapeB]);\n util_exports.assert(innerShapeA === innerShapeB, () => `Error in matMul: inner shapes (${innerShapeA}) and (${innerShapeB}) of Tensors with shapes ${a.shape} and ${b.shape} and transposeA=${transposeA} and transposeB=${transposeB} must match.`);\n const a3dShape = transposeA ? [batchDimA, innerShapeA, outerShapeA] : [batchDimA, outerShapeA, innerShapeA];\n const b3dShape = transposeB ? [batchDimB, outerShapeB, innerShapeB] : [batchDimB, innerShapeB, outerShapeB];\n const a3d = reshape4({ inputs: { x: a }, backend: backend2, attrs: { shape: a3dShape } });\n const b3d = reshape4({ inputs: { x: b }, backend: backend2, attrs: { shape: b3dShape } });\n const intermediates = [a3d, b3d];\n const batchDim = Math.max(batchDimA, batchDimB);\n const sharedDim = transposeA ? a3d.shape[1] : a3d.shape[2];\n const hasBias = bias != null;\n const hasPreluActivationWeights = preluActivationWeights != null;\n const hasLeakyreluAlpha = activation2 === \"leakyrelu\";\n const fusedActivation = activation2 != null ? mapActivationToShaderProgram(activation2, true) : null;\n const containsFusedOps = hasBias || hasPreluActivationWeights || hasLeakyreluAlpha || fusedActivation != null;\n let out;\n if ((outerShapeA === 1 || outerShapeB === 1) && sharedDim > MATMUL_SHARED_DIM_THRESHOLD && containsFusedOps === false) {\n let aVec = a3d;\n let bVec = b3d;\n if (transposeA) {\n aVec = transpose3({ inputs: { x: a3d }, backend: backend2, attrs: { perm: [0, 2, 1] } });\n intermediates.push(aVec);\n }\n if (transposeB) {\n bVec = transpose3({ inputs: { x: b3d }, backend: backend2, attrs: { perm: [0, 2, 1] } });\n intermediates.push(bVec);\n }\n const shouldReshapeA = outerShapeB !== 1;\n const shouldReshapeB = outerShapeB === 1;\n let aVec3d = aVec;\n if (shouldReshapeA) {\n aVec3d = reshape4({\n inputs: { x: aVec },\n backend: backend2,\n attrs: { shape: [batchDim, sharedDim, 1] }\n });\n intermediates.push(aVec3d);\n }\n const axis = outerShapeB === 1 ? 2 : 1;\n let bVec3d = bVec;\n if (shouldReshapeB) {\n bVec3d = reshape4({\n inputs: { x: bVec },\n backend: backend2,\n attrs: { shape: [batchDim, 1, sharedDim] }\n });\n intermediates.push(bVec3d);\n }\n const product = multiply3({ inputs: { a: aVec3d, b: bVec3d }, backend: backend2 });\n out = sum4({ inputs: { x: product }, backend: backend2, attrs: { axis, keepDims: true } });\n intermediates.push(product);\n } else {\n const dtype = upcastType(a.dtype, b.dtype);\n const program = new MatMulPackedProgram(a3dShape, b3dShape, [batchDim, outerShapeA, outerShapeB], transposeA, transposeB, hasBias, fusedActivation, hasPreluActivationWeights, hasLeakyreluAlpha);\n const inputs = [a3d, b3d];\n if (bias != null) {\n inputs.push(bias);\n }\n if (hasPreluActivationWeights) {\n inputs.push(preluActivationWeights);\n }\n if (hasLeakyreluAlpha) {\n const $leakyreluAlpha = backend2.makeTensorInfo([], \"float32\", util_exports.createScalarValue(leakyreluAlpha, \"float32\"));\n inputs.push($leakyreluAlpha);\n intermediates.push($leakyreluAlpha);\n }\n out = backend2.runWebGLProgram(program, inputs, dtype);\n }\n const outReshaped = reshape4({ inputs: { x: out }, backend: backend2, attrs: { shape: outShape } });\n intermediates.push(out);\n for (const i2 of intermediates) {\n backend2.disposeIntermediateTensorInfo(i2);\n }\n return outReshaped;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/_FusedMatMul.js\nfunction _fusedMatMul2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { a, b, bias, preluActivationWeights } = inputs;\n const { transposeA, transposeB, activation: activation2, leakyreluAlpha } = attrs;\n return batchMatMulImpl({\n a,\n b,\n transposeA,\n transposeB,\n backend: backend2,\n bias,\n preluActivationWeights,\n leakyreluAlpha,\n activation: activation2\n });\n}\nvar _fusedMatMulConfig2 = {\n kernelName: _FusedMatMul,\n backendName: \"webgl\",\n kernelFunc: _fusedMatMul2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Abs.js\nvar ABS2 = `return abs(x);`;\nfunction abs3(args) {\n const { inputs, backend: backend2 } = args;\n const { x } = inputs;\n if (backend2.shouldExecuteOnCPU([x]) && x.dtype !== \"complex64\") {\n const xData = backend2.texData.get(x.dataId);\n const outValues = simpleAbsImplCPU(xData.values);\n return backend2.makeTensorInfo(x.shape, x.dtype, outValues);\n }\n let program;\n if (env().getBool(\"WEBGL_PACK_UNARY_OPERATIONS\")) {\n program = new UnaryOpPackedProgram(x.shape, ABS2);\n } else {\n program = new UnaryOpProgram(x.shape, ABS2);\n }\n return backend2.runWebGLProgram(program, [x], x.dtype);\n}\nvar absConfig2 = {\n kernelName: Abs,\n backendName: \"webgl\",\n kernelFunc: abs3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Acos.js\nvar ACOS = CHECK_NAN_SNIPPET + `\n if (abs(x) > 1.) {\n return NAN;\n }\n return acos(x);\n`;\nvar acos3 = unaryKernelFunc2({ opSnippet: ACOS });\nvar acosConfig2 = {\n kernelName: Acos,\n backendName: \"webgl\",\n kernelFunc: acos3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Acosh.js\nvar ACOSH = CHECK_NAN_SNIPPET + `\n if (x < 1.0) return NAN;\nreturn log(x + sqrt(x * x - 1.0));`;\nvar acosh3 = unaryKernelFunc2({ opSnippet: ACOSH });\nvar acoshConfig2 = {\n kernelName: Acosh,\n backendName: \"webgl\",\n kernelFunc: acosh3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Add.js\nvar ADD = \"return a + b;\";\nvar addKernelFunc = binaryKernelFunc2({\n opSnippet: ADD,\n packedOpSnippet: ADD,\n supportsComplex: true,\n cpuKernelImpl: addImplCPU\n});\nvar addConfig2 = {\n kernelName: Add,\n backendName: \"webgl\",\n kernelFunc: addKernelFunc\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/addn_gpu.js\nvar AddNProgram = class {\n constructor(outputShape, shapes) {\n this.outputShape = [];\n this.outputShape = outputShape;\n this.variableNames = shapes.map((_, i2) => `T${i2}`);\n const snippets = [];\n this.variableNames.forEach((variable2) => {\n snippets.push(`float v${variable2} = get${variable2}AtOutCoords();`);\n });\n const operation = this.variableNames.map((variable2) => {\n return `v${variable2}`;\n }).join(\" + \");\n this.userCode = `\n void main() {\n ${snippets.join(\"\\n \")}\n\n float result = ${operation};\n setOutput(result);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/addn_packed_gpu.js\nvar AddNPackedProgram = class {\n constructor(outputShape, shapes) {\n this.outputShape = [];\n this.packedInputs = true;\n this.packedOutput = true;\n this.outputShape = outputShape;\n this.variableNames = shapes.map((_, i2) => `T${i2}`);\n const snippets = [];\n this.variableNames.forEach((variable2) => {\n snippets.push(`vec4 v${variable2} = get${variable2}AtOutCoords();`);\n });\n const operation = this.variableNames.map((variable2) => {\n return `v${variable2}`;\n }).join(\" + \");\n this.userCode = `\n void main() {\n ${snippets.join(\"\\n \")}\n\n vec4 result = ${operation};\n setOutput(result);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/AddN.js\nfunction addN3(args) {\n const { inputs, backend: backend2 } = args;\n const tensors = inputs;\n if (tensors.length === 1) {\n return identity3({ inputs: { x: tensors[0] }, backend: backend2 });\n }\n if (tensors.length > env().get(\"WEBGL_MAX_TEXTURES_IN_SHADER\")) {\n const midIndex = Math.floor(tensors.length / 2);\n const leftSide = addN3({ inputs: tensors.slice(0, midIndex), backend: backend2 });\n const rightSide = addN3({ inputs: tensors.slice(midIndex), backend: backend2 });\n return addN3({ inputs: [leftSide, rightSide], backend: backend2 });\n }\n const dtype = tensors.map((t2) => t2.dtype).reduce((d1, d2) => upcastType(d1, d2));\n const shapes = tensors.map((t2) => t2.shape);\n const usePackedOp = env().getBool(\"WEBGL_PACK\");\n const program = usePackedOp ? new AddNPackedProgram(tensors[0].shape, shapes) : new AddNProgram(tensors[0].shape, shapes);\n return backend2.runWebGLProgram(program, tensors, dtype);\n}\nvar addNConfig2 = {\n kernelName: AddN,\n backendName: \"webgl\",\n kernelFunc: addN3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/All.js\nfunction all3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis, keepDims } = attrs;\n const xRank = x.shape.length;\n const origAxes = util_exports.parseAxisParam(axis, x.shape);\n let axes = origAxes;\n const permutedAxes = backend_util_exports.getAxesPermutation(axes, xRank);\n let permutedX = x;\n if (permutedAxes != null) {\n permutedX = transpose3({ inputs: { x }, backend: backend2, attrs: { perm: permutedAxes } });\n axes = backend_util_exports.getInnerMostAxes(axes.length, xRank);\n }\n backend_util_exports.assertAxesAreInnerMostDims(\"all\", axes, xRank);\n const [outShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes(permutedX.shape, axes);\n const inSize = util_exports.sizeFromShape(reduceShape);\n const a2D = reshape4({ inputs: { x: permutedX }, backend: backend2, attrs: { shape: [-1, inSize] } });\n const reduced = reduce(a2D, a2D.dtype, \"all\", backend2);\n let res;\n if (keepDims) {\n const newShape = backend_util_exports.expandShapeToKeepDim(outShape, origAxes);\n res = reshape4({ inputs: { x: reduced }, backend: backend2, attrs: { shape: newShape } });\n } else {\n res = reshape4({ inputs: { x: reduced }, backend: backend2, attrs: { shape: outShape } });\n }\n backend2.disposeIntermediateTensorInfo(a2D);\n backend2.disposeIntermediateTensorInfo(reduced);\n if (permutedAxes != null) {\n backend2.disposeIntermediateTensorInfo(permutedX);\n }\n return res;\n}\nvar allConfig2 = {\n kernelName: All,\n backendName: \"webgl\",\n kernelFunc: all3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Any.js\nfunction any3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis, keepDims } = attrs;\n const xRank = x.shape.length;\n const origAxes = util_exports.parseAxisParam(axis, x.shape);\n let axes = origAxes;\n const permutedAxes = backend_util_exports.getAxesPermutation(axes, xRank);\n let permutedX = x;\n if (permutedAxes != null) {\n permutedX = transpose3({ inputs: { x }, backend: backend2, attrs: { perm: permutedAxes } });\n axes = backend_util_exports.getInnerMostAxes(axes.length, xRank);\n }\n backend_util_exports.assertAxesAreInnerMostDims(\"any\", axes, xRank);\n const [outShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes(permutedX.shape, axes);\n const inSize = util_exports.sizeFromShape(reduceShape);\n const a2D = reshape4({ inputs: { x: permutedX }, backend: backend2, attrs: { shape: [-1, inSize] } });\n const reduced = reduce(a2D, a2D.dtype, \"any\", backend2);\n let res;\n if (keepDims) {\n const newShape = backend_util_exports.expandShapeToKeepDim(outShape, origAxes);\n res = reshape4({ inputs: { x: reduced }, backend: backend2, attrs: { shape: newShape } });\n } else {\n res = reshape4({ inputs: { x: reduced }, backend: backend2, attrs: { shape: outShape } });\n }\n backend2.disposeIntermediateTensorInfo(a2D);\n backend2.disposeIntermediateTensorInfo(reduced);\n if (permutedAxes != null) {\n backend2.disposeIntermediateTensorInfo(permutedX);\n }\n return res;\n}\nvar anyConfig2 = {\n kernelName: Any,\n backendName: \"webgl\",\n kernelFunc: any3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/argminmax_gpu.js\nvar ArgMinMaxProgram = class {\n constructor(reduceInfo, op2, firstPass) {\n this.variableNames = [\"A\"];\n const { windowSize, batchSize, outSize } = reduceInfo;\n if (!firstPass) {\n this.variableNames.push(\"bestIndicesA\");\n }\n this.outputShape = [batchSize, outSize];\n const compOp = op2 === \"max\" ? \">\" : \"<\";\n const indexSnippet = firstPass ? \"inOffset + i;\" : \"round(getBestIndicesA(batch, inOffset + i));\";\n this.userCode = `\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n int outIdx = coords[1];\n int inOffset = outIdx * ${windowSize};\n\n int bestIndex = inOffset;\n float bestValue = getA(batch, bestIndex);\n\n for (int i = 0; i < ${windowSize}; i++) {\n int inIdx = ${indexSnippet};\n float candidate = getA(batch, inIdx);\n if (candidate ${compOp} bestValue) {\n bestValue = candidate;\n bestIndex = inIdx;\n }\n }\n setOutput(float(bestIndex));\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/argminmax_packed_gpu.js\nvar ArgMinMaxPackedProgram = class {\n constructor(shape, windowSize, op2, firstPass) {\n this.variableNames = [\"A\"];\n this.packedInputs = true;\n this.packedOutput = true;\n util_exports.assert(shape.length > 2, () => `Packed arg${op2.charAt(0).toUpperCase() + op2.slice(1)} supports only inputs with rank above 2.`);\n const inSize = shape[shape.length - 1];\n const outSize = Math.ceil(inSize / windowSize);\n this.outputShape = shape.slice(0, -1);\n if (outSize > 1) {\n this.outputShape.push(outSize);\n }\n if (!firstPass) {\n this.variableNames.push(\"bestIndicesA\");\n }\n const outShape = this.outputShape;\n const rank = outShape.length;\n const dtype = getCoordsDataType(rank);\n const coords3 = getChannels(\"coords\", rank);\n let sourceLocSetup;\n let sourceRank;\n if (outSize === 1) {\n sourceRank = rank + 1;\n const sourceLocDType = getCoordsDataType(sourceRank);\n sourceLocSetup = `\n ${sourceLocDType} sourceLocR = ${sourceLocDType}(${coords3.join()}, 0);\n ++${coords3[rank - 1]};\n ${sourceLocDType} sourceLocG = ${sourceLocDType}(${coords3.join()}, 0);\n ++${coords3[rank - 2]};\n ${sourceLocDType} sourceLocA = ${sourceLocDType}(${coords3.join()}, 0);\n --${coords3[rank - 1]};\n ${sourceLocDType} sourceLocB = ${sourceLocDType}(${coords3.join()}, 0);\n --${coords3[rank - 2]};`;\n } else {\n sourceRank = rank;\n sourceLocSetup = `\n ${dtype} sourceLocR = coords;\n ++${coords3[rank - 1]};\n ${dtype} sourceLocG = coords;\n ++${coords3[rank - 2]};\n ${dtype} sourceLocA = coords;\n --${coords3[rank - 1]};\n ${dtype} sourceLocB = coords;\n --${coords3[rank - 2]};`;\n }\n const channels = [\"x\", \"y\", \"z\", \"w\", \"u\", \"v\"].slice(0, sourceRank);\n const inChannel = \".\" + channels[sourceRank - 1];\n const intChannels = channels.map((x) => \"int \" + x);\n const srcRCoords = getChannels(\"sourceLocR\", sourceRank - 1).concat(\"inIdx.r\");\n const srcGCoords = getChannels(\"sourceLocG\", sourceRank - 1).concat(\"inIdx.g\");\n const srcBCoords = getChannels(\"sourceLocB\", sourceRank - 1).concat(\"inIdx.b\");\n const srcACoords = getChannels(\"sourceLocA\", sourceRank - 1).concat(\"inIdx.a\");\n const compOp = op2 === \"max\" ? \"greaterThan\" : \"lessThan\";\n const fetchCandidateIdx = firstPass ? \"\" : `\n inIdx = round(vec4(getBestIndicesAChannel(${srcRCoords.join()}),\n getBestIndicesAChannel(${srcGCoords.join()}),\n getBestIndicesAChannel(${srcBCoords.join()}),\n getBestIndicesAChannel(${srcACoords.join()})));`;\n const fetchValue = `vec4(\n getAChannel(${srcRCoords.join()}),\n hasNextCol ? getAChannel(${srcGCoords.join()}) : 0.,\n hasNextRow ? getAChannel(${srcBCoords.join()}) : 0.,\n hasNextRow && hasNextCol ? getAChannel(${srcACoords.join()}) : 0.)`;\n const getBestIndicesAChannelSnippet = firstPass ? \"\" : `\n float getBestIndicesAChannel(${intChannels.join()}) {\n return getChannel(getBestIndicesA(${channels.join()}),\n vec2(${channels.slice(-2).join()}));\n }`;\n this.userCode = `\n float getAChannel(${intChannels.join()}) {\n return getChannel(getA(${channels.join()}),\n vec2(${channels.slice(-2).join()}));\n }\n ${getBestIndicesAChannelSnippet}\n void main() {\n ${dtype} coords = getOutputCoords();\n bool hasNextCol = ${coords3[rank - 1]} < ${outShape[rank - 1] - 1};\n bool hasNextRow = ${coords3[rank - 2]} < ${outShape[rank - 2] - 1};\n ${sourceLocSetup}\n ivec4 srcIdx = ivec4(sourceLocR${inChannel}, sourceLocG${inChannel},\n sourceLocB${inChannel}, sourceLocA${inChannel}) * ${windowSize};\n ivec4 inIdx = srcIdx;\n vec4 bestIndex = vec4(inIdx);\n vec4 bestValue = ${fetchValue};\n\n for (int i = 0; i < ${windowSize}; i++) {\n inIdx = srcIdx;\n ${fetchCandidateIdx}\n vec4 candidate = ${fetchValue};\n bvec4 nan = isnan(candidate);\n bvec4 replace = bvec4(\n vec4(${compOp}(candidate, bestValue)) * (vec4(1.0) - vec4(nan)));\n\n bestValue = vec4(replace.x ? candidate.x : bestValue.x,\n replace.y ? candidate.y : bestValue.y,\n replace.z ? candidate.z : bestValue.z,\n replace.w ? candidate.w : bestValue.w);\n bestIndex = mix(bestIndex, vec4(inIdx), vec4(replace));\n srcIdx++;\n }\n setOutput(bestIndex);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernel_utils/arg_min_max.js\nfunction argReduce(backend2, x, reduceType, bestIndicesA = null) {\n let batchSize = x.shape[0];\n let inSize = x.shape[1];\n if (bestIndicesA != null) {\n batchSize = bestIndicesA.shape[0];\n inSize = bestIndicesA.shape[1];\n }\n const windowSize = backend_util_exports.computeOptimalWindowSize(inSize);\n const reduceInfo = { windowSize, inSize, batchSize, outSize: Math.ceil(inSize / windowSize) };\n const program = new ArgMinMaxProgram(reduceInfo, reduceType, bestIndicesA == null);\n const inputs = [x];\n if (bestIndicesA != null) {\n inputs.push(bestIndicesA);\n }\n const output = backend2.runWebGLProgram(program, inputs, \"int32\");\n if (output.shape[1] === 1) {\n return output;\n }\n const result = argReduce(backend2, x, reduceType, output);\n backend2.disposeIntermediateTensorInfo(output);\n return result;\n}\nfunction argReducePacked(backend2, x, reduceType, bestIndicesA = null) {\n const inShape = bestIndicesA != null ? bestIndicesA.shape : x.shape;\n const inSize = inShape[inShape.length - 1];\n const windowSize = backend_util_exports.computeOptimalWindowSize(inSize);\n const program = new ArgMinMaxPackedProgram(inShape, windowSize, reduceType, bestIndicesA == null);\n const inputs = bestIndicesA == null ? [x] : [x, bestIndicesA];\n const output = backend2.runWebGLProgram(program, inputs, \"int32\");\n if (output.shape.length === x.shape.length) {\n const result = argReducePacked(backend2, x, reduceType, output);\n backend2.disposeIntermediateTensorInfo(output);\n return result;\n }\n return output;\n}\nfunction argMinMaxReduce(backend2, x, axis, reduceType) {\n const axes = [axis];\n backend_util_exports.assertAxesAreInnerMostDims(\"arg\" + reduceType.charAt(0).toUpperCase() + reduceType.slice(1), axes, x.shape.length);\n if (!env().getBool(\"WEBGL_PACK_REDUCE\") || x.shape.length <= 2) {\n const intermediateTensorInfos = [];\n const xtexData = backend2.texData.get(x.dataId);\n const xIsPacked = xtexData !== null && xtexData.isPacked;\n let xUnPacked = x;\n if (xIsPacked) {\n xUnPacked = backend2.unpackTensor(x);\n intermediateTensorInfos.push(xUnPacked);\n }\n const [outShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes(xUnPacked.shape, axes);\n const inSize = util_exports.sizeFromShape(reduceShape);\n const a2D = reshape4({ inputs: { x: xUnPacked }, backend: backend2, attrs: { shape: [-1, inSize] } });\n intermediateTensorInfos.push(a2D);\n const reduced = argReduce(backend2, a2D, reduceType);\n intermediateTensorInfos.push(reduced);\n const reshaped = reshape4({ inputs: { x: reduced }, backend: backend2, attrs: { shape: outShape } });\n intermediateTensorInfos.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2));\n return reshaped;\n }\n return argReducePacked(backend2, x, reduceType);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ArgMax.js\nfunction argMax3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis } = attrs;\n let axes = util_exports.parseAxisParam(axis, x.shape);\n const permutedAxes = backend_util_exports.getAxesPermutation(axes, x.shape.length);\n let $x = x;\n const intermediateTensorInfos = [];\n if (permutedAxes != null) {\n $x = transpose3({ inputs: { x }, backend: backend2, attrs: { perm: permutedAxes } });\n intermediateTensorInfos.push($x);\n axes = backend_util_exports.getInnerMostAxes(axes.length, $x.shape.length);\n }\n backend_util_exports.assertAxesAreInnerMostDims(\"argMax\", [axes[0]], $x.shape.length);\n const out = argMinMaxReduce(backend2, $x, axes[0], \"max\");\n intermediateTensorInfos.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2));\n return out;\n}\nvar argMaxConfig2 = {\n kernelName: ArgMax,\n backendName: \"webgl\",\n kernelFunc: argMax3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ArgMin.js\nfunction argMin3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis } = attrs;\n let axes = util_exports.parseAxisParam(axis, x.shape);\n const permutedAxes = backend_util_exports.getAxesPermutation(axes, x.shape.length);\n let $x = x;\n const intermediateTensorInfos = [];\n if (permutedAxes != null) {\n $x = transpose3({ inputs: { x }, backend: backend2, attrs: { perm: permutedAxes } });\n intermediateTensorInfos.push($x);\n axes = backend_util_exports.getInnerMostAxes(axes.length, $x.shape.length);\n }\n backend_util_exports.assertAxesAreInnerMostDims(\"argMin\", [axes[0]], $x.shape.length);\n const out = argMinMaxReduce(backend2, $x, axes[0], \"min\");\n intermediateTensorInfos.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2));\n return out;\n}\nvar argMinConfig2 = {\n kernelName: ArgMin,\n backendName: \"webgl\",\n kernelFunc: argMin3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Asin.js\nvar ASIN = CHECK_NAN_SNIPPET + `\n if (abs(x) > 1.) {\n return NAN;\n }\n return asin(x);\n`;\nvar asin3 = unaryKernelFunc2({ opSnippet: ASIN });\nvar asinConfig2 = {\n kernelName: Asin,\n backendName: \"webgl\",\n kernelFunc: asin3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Asinh.js\nvar ASINH = CHECK_NAN_SNIPPET + `return log(x + sqrt(x * x + 1.0));`;\nvar asinh3 = unaryKernelFunc2({ opSnippet: ASINH });\nvar asinhConfig2 = {\n kernelName: Asinh,\n backendName: \"webgl\",\n kernelFunc: asinh3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Atan.js\nvar ATAN = CHECK_NAN_SNIPPET + `\n return atan(x);\n`;\nvar atan4 = unaryKernelFunc2({ opSnippet: ATAN });\nvar atanConfig2 = {\n kernelName: Atan,\n backendName: \"webgl\",\n kernelFunc: atan4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Atan2.js\nvar ATAN2 = CHECK_NAN_SNIPPET2 + `\n return atan(a, b);\n`;\nvar ATAN2_PACKED = `\n vec4 result = atan(a, b);\n bvec4 isNaNA = isnan(a);\n bvec4 isNaNB = isnan(b);\n bvec4 isNaN = bvec4(isNaNA.x || isNaNB.x, isNaNA.y || isNaNB.y, isNaNA.z || isNaNB.z, isNaNA.w || isNaNB.w);\n ` + CHECK_NAN_SNIPPET_PACKED + `\n return result;\n`;\nvar atan23 = binaryKernelFunc2({ opSnippet: ATAN2, packedOpSnippet: ATAN2_PACKED });\nvar atan2Config2 = {\n kernelName: Atan2,\n backendName: \"webgl\",\n kernelFunc: atan23\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Atanh.js\nvar ATANH = CHECK_NAN_SNIPPET + `\n if ((x < -1.0) || (x > 1.0)) return NAN;\nreturn (log(1.0 + x) - log(1.0 - x)) / 2.0;`;\nvar atanh3 = unaryKernelFunc2({ opSnippet: ATANH });\nvar atanhConfig2 = {\n kernelName: Atanh,\n backendName: \"webgl\",\n kernelFunc: atanh3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/pool_gpu.js\nvar Pool2DProgram = class {\n constructor(convInfo, poolType, computePositions, flattenPositions = false, includeBatchInIndex = false) {\n this.variableNames = [\"x\"];\n if (poolType === \"avg\" && computePositions) {\n throw new Error(\"Cannot compute positions for average pool.\");\n }\n const filterWidth = convInfo.filterWidth;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const dilationHeight = convInfo.dilationHeight;\n const dilationWidth = convInfo.dilationWidth;\n const effectiveFilterHeight = convInfo.effectiveFilterHeight;\n const effectiveFilterWidth = convInfo.effectiveFilterWidth;\n const padTop = convInfo.padInfo.top;\n const padLeft = convInfo.padInfo.left;\n this.outputShape = convInfo.outShape;\n const isAvgPool = poolType === \"avg\";\n const batchFlattenPositionStr = `((batch * ${convInfo.inHeight} + xR) * ${convInfo.inWidth} + xC) * ${convInfo.inChannels} + d`;\n const flattenPositionStr = `(xR * ${convInfo.inWidth} + xC) * ${convInfo.inChannels} + d`;\n let initializationValue = \"0.0\";\n if (!isAvgPool) {\n initializationValue = \"-1.0 / 1e-20\";\n }\n if (computePositions) {\n const compareOp2 = \">=\";\n this.userCode = `\n const ivec2 strides = ivec2(${strideHeight}, ${strideWidth});\n const ivec2 pads = ivec2(${padTop}, ${padLeft});\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d = coords[3];\n\n ivec2 xRCCorner = coords.yz * strides - pads;\n int xRCorner = xRCCorner.x;\n int xCCorner = xRCCorner.y;\n\n // max/min x(?, ?, d) to get y(yR, yC, d).\n // ? = to be determined\n float minMaxValue = 0.0;\n float minMaxValueFound = 0.0;\n int minMaxPosition = 0;\n float avgValue = 0.0;\n\n for (int wR = 0; wR < ${effectiveFilterHeight};\n wR += ${dilationHeight}) {\n int xR = xRCorner + wR;\n\n if (xR < 0 || xR >= ${convInfo.inHeight}) {\n continue;\n }\n\n for (int wC = 0; wC < ${effectiveFilterWidth};\n wC += ${dilationWidth}) {\n int xC = xCCorner + wC;\n\n if (xC < 0 || xC >= ${convInfo.inWidth}) {\n continue;\n }\n\n float value = getX(batch, xR, xC, d);\n\n // If a min / max value has already been found, use it. If not,\n // use the current value.\n float currMinMaxValue = mix(\n value, minMaxValue, minMaxValueFound);\n if (value ${compareOp2} currMinMaxValue) {\n minMaxValue = value;\n minMaxValueFound = 1.0;\n minMaxPosition = ${flattenPositions ? includeBatchInIndex ? batchFlattenPositionStr : flattenPositionStr : `wR * ${effectiveFilterWidth} + wC`};\n }\n }\n }\n setOutput(float(minMaxPosition));\n }\n `;\n return;\n }\n const compareOp = \"max\";\n let returnValue = `${poolType}(${poolType}(${poolType}(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])`;\n if (poolType === \"avg\") {\n returnValue = `avgValue / count`;\n }\n const filterWidthNearestVec4 = Math.floor(filterWidth / 4) * 4;\n const filterWidthVec4Remainder = filterWidth % 4;\n const updateSnippet = `\n if (${isAvgPool}) {\n avgValue += dot(values, ones);\n } else {\n minMaxValue = ${compareOp}(values, minMaxValue);\n }\n `;\n this.userCode = `\n const ivec2 strides = ivec2(${strideHeight}, ${strideWidth});\n const ivec2 pads = ivec2(${padTop}, ${padLeft});\n const float initializationValue = ${initializationValue};\n const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);\n\n float count = 0.0;\n\n float getValue(int batch, int xR, int xC, int d) {\n if (xC < 0 || xC >= ${convInfo.inWidth}) {\n return initializationValue;\n }\n count += 1.0;\n return getX(batch, xR, xC, d);\n }\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d = coords[3];\n\n ivec2 xRCCorner = coords.yz * strides - pads;\n int xRCorner = xRCCorner.x;\n int xCCorner = xRCCorner.y;\n\n // max/min x(?, ?, d) to get y(yR, yC, d).\n // ? = to be determined\n vec4 minMaxValue = vec4(${initializationValue});\n float avgValue = 0.0;\n count = 0.0;\n\n for (int wR = 0; wR < ${effectiveFilterHeight};\n wR += ${dilationHeight}) {\n int xR = xRCorner + wR;\n\n if (xR < 0 || xR >= ${convInfo.inHeight}) {\n continue;\n }\n\n for (int wC = 0; wC < ${filterWidthNearestVec4}; wC += 4) {\n int xC = xCCorner + wC * ${dilationWidth};\n\n vec4 values = vec4(\n getValue(batch, xR, xC, d),\n getValue(batch, xR, xC + ${dilationWidth}, d),\n getValue(batch, xR, xC + 2 * ${dilationWidth}, d),\n getValue(batch, xR, xC + 3 * ${dilationWidth}, d)\n );\n\n ${updateSnippet}\n }\n\n int xC = xCCorner + ${filterWidthNearestVec4};\n if (${filterWidthVec4Remainder === 1}) {\n vec4 values = vec4(\n getValue(batch, xR, xC, d),\n initializationValue,\n initializationValue,\n initializationValue\n );\n\n ${updateSnippet}\n } else if (${filterWidthVec4Remainder === 2}) {\n vec4 values = vec4(\n getValue(batch, xR, xC, d),\n getValue(batch, xR, xC + ${dilationWidth}, d),\n initializationValue,\n initializationValue\n );\n\n ${updateSnippet}\n } else if (${filterWidthVec4Remainder === 3}) {\n vec4 values = vec4(\n getValue(batch, xR, xC, d),\n getValue(batch, xR, xC + ${dilationWidth}, d),\n getValue(batch, xR, xC + 2 * ${dilationWidth}, d),\n initializationValue\n );\n\n ${updateSnippet}\n }\n }\n setOutput(${returnValue});\n }\n `;\n }\n};\nvar Pool3DProgram = class {\n constructor(convInfo, poolType, computePositions, flattenPositions = false, includeBatchInIndex = false) {\n this.variableNames = [\"x\"];\n if (poolType === \"avg\" && computePositions) {\n throw new Error(\"Cannot compute positions for average pool.\");\n }\n const filterWidth = convInfo.filterWidth;\n const strideDepth = convInfo.strideDepth;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const dilationDepth = convInfo.dilationDepth;\n const dilationHeight = convInfo.dilationHeight;\n const dilationWidth = convInfo.dilationWidth;\n const effectiveFilterDepth = convInfo.effectiveFilterDepth;\n const effectiveFilterHeight = convInfo.effectiveFilterHeight;\n const effectiveFilterWidth = convInfo.effectiveFilterWidth;\n const padFront = convInfo.padInfo.front;\n const padTop = convInfo.padInfo.top;\n const padLeft = convInfo.padInfo.left;\n this.outputShape = convInfo.outShape;\n const isAvgPool = poolType === \"avg\";\n let initializationValue = \"0.0\";\n if (!isAvgPool) {\n initializationValue = \"-1.0 / 1e-20\";\n }\n if (computePositions) {\n const compareOp2 = \">=\";\n this.userCode = `\n const ivec3 strides =\n ivec3(${strideDepth}, ${strideHeight}, ${strideWidth});\n const ivec3 pads = ivec3(${padFront}, ${padTop}, ${padLeft});\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int ch = coords.u;\n\n ivec3 xCorner = ivec3(coords.y, coords.z, coords.w) * strides - pads;\n int xDCorner = xCorner.x;\n int xRCorner = xCorner.y;\n int xCCorner = xCorner.z;\n\n // max/min x(?, ?, ?, ch) to get y(yD, yR, yC, ch).\n // ? = to be determined\n float minMaxValue = 0.0;\n float minMaxValueFound = 0.0;\n int minMaxPosition = 0;\n\n for (int wD = 0; wD < ${effectiveFilterDepth};\n wD += ${dilationDepth}) {\n int xD = xDCorner + wD;\n\n if (xD < 0 || xD >= ${convInfo.inDepth}) {\n continue;\n }\n\n for (int wR = 0; wR < ${effectiveFilterHeight};\n wR += ${dilationHeight}) {\n int xR = xRCorner + wR;\n\n if (xR < 0 || xR >= ${convInfo.inHeight}) {\n continue;\n }\n\n for (int wC = 0; wC < ${effectiveFilterWidth};\n wC += ${dilationWidth}) {\n int xC = xCCorner + wC;\n\n if (xC < 0 || xC >= ${convInfo.inWidth}) {\n continue;\n }\n\n float value = getX(batch, xD, xR, xC, ch);\n\n // If a min / max value has already been found, use it. If not,\n // use the current value.\n float currMinMaxValue = mix(\n value, minMaxValue, minMaxValueFound);\n if (value ${compareOp2} currMinMaxValue) {\n minMaxValue = value;\n minMaxValueFound = 1.0;\n minMaxPosition = ${flattenPositions ? includeBatchInIndex ? `(((batch * ${convInfo.inDepth} + xD) * ${convInfo.inHeight} + xR) * ${convInfo.inWidth} + xC) * ${convInfo.inChannels} + ch` : `((xD * ${convInfo.inHeight} + xR) * ${convInfo.inWidth} + xC) * ${convInfo.inChannels} + ch` : `wD * ${effectiveFilterHeight} * ${effectiveFilterWidth} +\n wR * ${effectiveFilterWidth} + wC`};\n }\n }\n }\n }\n setOutput(float(minMaxPosition));\n }\n `;\n return;\n }\n const compareOp = \"max\";\n let returnValue = `${poolType}(${poolType}(${poolType}(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])`;\n if (poolType === \"avg\") {\n returnValue = `avgValue / count`;\n }\n const filterWidthNearestVec4 = Math.floor(filterWidth / 4) * 4;\n const filterWidthVec4Remainder = filterWidth % 4;\n const updateSnippet = `\n if (${isAvgPool}) {\n avgValue += dot(values, ones);\n } else {\n minMaxValue = ${compareOp}(values, minMaxValue);\n }\n `;\n this.userCode = `\n const ivec3 strides =\n ivec3(${strideDepth}, ${strideHeight}, ${strideWidth});\n const ivec3 pads = ivec3(${padFront}, ${padTop}, ${padLeft});\n const float initializationValue = ${initializationValue};\n const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);\n\n float count = 0.0;\n\n float getValue(int batch, int xD, int xR, int xC, int ch) {\n if (xC < 0 || xC >= ${convInfo.inWidth}) {\n return initializationValue;\n }\n count += 1.0;\n return getX(batch, xD, xR, xC, ch);\n }\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int ch = coords.u;\n\n ivec3 xCorner = ivec3(coords.y, coords.z, coords.w) * strides - pads;\n int xDCorner = xCorner.x;\n int xRCorner = xCorner.y;\n int xCCorner = xCorner.z;\n\n // max/min x(?, ?, ?, d) to get y(yD, yR, yC, ch).\n // ? = to be determined\n vec4 minMaxValue = vec4(${initializationValue});\n float avgValue = 0.0;\n count = 0.0;\n\n for (int wD = 0; wD < ${effectiveFilterDepth};\n wD += ${dilationDepth}) {\n int xD = xDCorner + wD;\n\n if (xD < 0 || xD >= ${convInfo.inDepth}) {\n continue;\n }\n\n for (int wR = 0; wR < ${effectiveFilterHeight};\n wR += ${dilationHeight}) {\n int xR = xRCorner + wR;\n\n if (xR < 0 || xR >= ${convInfo.inHeight}) {\n continue;\n }\n\n for (int wC = 0; wC < ${filterWidthNearestVec4}; wC += 4) {\n int xC = xCCorner + wC * ${dilationWidth};\n\n vec4 values = vec4(\n getValue(batch, xD, xR, xC, ch),\n getValue(batch, xD, xR, xC + ${dilationWidth}, ch),\n getValue(batch, xD, xR, xC + 2 * ${dilationWidth}, ch),\n getValue(batch, xD, xR, xC + 3 * ${dilationWidth}, ch)\n );\n\n ${updateSnippet}\n }\n\n int xC = xCCorner + ${filterWidthNearestVec4};\n if (${filterWidthVec4Remainder === 1}) {\n vec4 values = vec4(\n getValue(batch, xD, xR, xC, ch),\n initializationValue,\n initializationValue,\n initializationValue\n );\n\n ${updateSnippet}\n } else if (${filterWidthVec4Remainder === 2}) {\n vec4 values = vec4(\n getValue(batch, xD, xR, xC, ch),\n getValue(batch, xD, xR, xC + ${dilationWidth}, ch),\n initializationValue,\n initializationValue\n );\n\n ${updateSnippet}\n } else if (${filterWidthVec4Remainder === 3}) {\n vec4 values = vec4(\n getValue(batch, xD, xR, xC, ch),\n getValue(batch, xD, xR, xC + ${dilationWidth}, ch),\n getValue(batch, xD, xR, xC + 2 * ${dilationWidth}, ch),\n initializationValue\n );\n\n ${updateSnippet}\n }\n }\n setOutput(${returnValue});\n }\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/AvgPool.js\nfunction avgPool3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n assertNotComplex2(x, \"avgPool\");\n const { filterSize, strides, pad: pad3, dimRoundingMode } = attrs;\n const dilations = 1;\n util_exports.assert(backend_util_exports.eitherStridesOrDilationsAreOne(strides, dilations), () => `Error in avgPool: Either strides or dilations must be 1. Got strides ${strides} and dilations '${dilations}'`);\n const convInfo = backend_util_exports.computePool2DInfo(x.shape, filterSize, strides, dilations, pad3, dimRoundingMode);\n if (convInfo.filterWidth === 1 && convInfo.filterHeight === 1 && util_exports.arraysEqual(convInfo.inShape, convInfo.outShape)) {\n return identity3({ inputs: { x }, backend: backend2 });\n }\n const avgPoolProgram = new Pool2DProgram(convInfo, \"avg\", false);\n return backend2.runWebGLProgram(avgPoolProgram, [x], \"float32\");\n}\nvar avgPoolConfig2 = {\n kernelName: AvgPool,\n backendName: \"webgl\",\n kernelFunc: avgPool3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/AvgPool3D.js\nfunction avgPool3D2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { filterSize, strides, pad: pad3, dimRoundingMode, dataFormat } = attrs;\n const dilations = [1, 1, 1];\n const convInfo = backend_util_exports.computePool3DInfo(x.shape, filterSize, strides, dilations, pad3, dimRoundingMode, dataFormat);\n const avgPoolProgram = new Pool3DProgram(convInfo, \"avg\", false);\n return backend2.runWebGLProgram(avgPoolProgram, [x], \"float32\");\n}\nvar avgPool3DConfig2 = {\n kernelName: AvgPool3D,\n backendName: \"webgl\",\n kernelFunc: avgPool3D2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/avg_pool_backprop_gpu.js\nvar AvgPool2DBackpropProgram = class {\n constructor(convInfo) {\n this.variableNames = [\"dy\"];\n this.outputShape = convInfo.inShape;\n const filterHeight = convInfo.filterHeight;\n const filterWidth = convInfo.filterWidth;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const dilationHeight = convInfo.dilationHeight;\n const dilationWidth = convInfo.dilationWidth;\n const effectiveFilterHeight = convInfo.effectiveFilterHeight;\n const effectiveFilterWidth = convInfo.effectiveFilterWidth;\n const padTop = effectiveFilterHeight - 1 - convInfo.padInfo.top;\n const padLeft = effectiveFilterWidth - 1 - convInfo.padInfo.left;\n const avgMultiplier = 1 / (filterHeight * filterWidth);\n this.userCode = `\n const ivec2 pads = ivec2(${padTop}, ${padLeft});\n const float avgMultiplier = float(${avgMultiplier});\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n\n ivec2 dyRCCorner = coords.yz - pads;\n int dyRCorner = dyRCCorner.x;\n int dyCCorner = dyRCCorner.y;\n\n // Convolve dy(?, ?, d) with pos mask(:, :, d) to get dx(xR, xC, d).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n for (int wR = 0; wR < ${effectiveFilterHeight};\n wR += ${dilationHeight}) {\n float dyR = float(dyRCorner + wR) / ${strideHeight}.0;\n\n if (dyR < 0.0 || dyR >= ${convInfo.outHeight}.0 || fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n for (int wC = 0; wC < ${effectiveFilterWidth};\n wC+= ${dilationWidth}) {\n float dyC = float(dyCCorner + wC) / ${strideWidth}.0;\n\n if (dyC < 0.0 || dyC >= ${convInfo.outWidth}.0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n float dyValue = getDy(b, idyR, idyC, d);\n\n dotProd += dyValue * avgMultiplier;\n }\n }\n setOutput(dotProd);\n }\n `;\n }\n};\nvar AvgPool3DBackpropProgram = class {\n constructor(convInfo) {\n this.variableNames = [\"dy\"];\n this.outputShape = convInfo.inShape;\n const filterDepth = convInfo.filterDepth;\n const filterHeight = convInfo.filterHeight;\n const filterWidth = convInfo.filterWidth;\n const strideDepth = convInfo.strideDepth;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const dilationDepth = convInfo.dilationDepth;\n const dilationHeight = convInfo.dilationHeight;\n const dilationWidth = convInfo.dilationWidth;\n const effectiveFilterDepth = convInfo.effectiveFilterDepth;\n const effectiveFilterHeight = convInfo.effectiveFilterHeight;\n const effectiveFilterWidth = convInfo.effectiveFilterWidth;\n const padFront = effectiveFilterDepth - 1 - convInfo.padInfo.front;\n const padTop = effectiveFilterHeight - 1 - convInfo.padInfo.top;\n const padLeft = effectiveFilterWidth - 1 - convInfo.padInfo.left;\n const avgMultiplier = 1 / (filterDepth * filterHeight * filterWidth);\n this.userCode = `\n const ivec3 pads = ivec3(${padFront}, ${padTop}, ${padLeft});\n const float avgMultiplier = float(${avgMultiplier});\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int ch = coords.u;\n\n ivec3 dyCorner = ivec3(coords.y, coords.z, coords.w) - pads;\n int dyDCorner = dyCorner.x;\n int dyRCorner = dyCorner.y;\n int dyCCorner = dyCorner.z;\n\n // Convolve dy(?, ?, ?, d) with pos mask(:, :, :, ch) to get\n // dx(xD, xR, xC, ch).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n\n for (int wD = 0; wD < ${effectiveFilterDepth};\n wD += ${dilationDepth}) {\n float dyD = float(dyDCorner + wD) / ${strideDepth}.0;\n\n if (dyD < 0.0 || dyD >= ${convInfo.outDepth}.0 || fract(dyD) > 0.0) {\n continue;\n }\n int idyD = int(dyD);\n\n for (int wR = 0; wR < ${effectiveFilterHeight};\n wR += ${dilationHeight}) {\n float dyR = float(dyRCorner + wR) / ${strideHeight}.0;\n\n if (dyR < 0.0 || dyR >= ${convInfo.outHeight}.0 ||\n fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n for (int wC = 0; wC < ${effectiveFilterWidth};\n wC += ${dilationWidth}) {\n float dyC = float(dyCCorner + wC) / ${strideWidth}.0;\n\n if (dyC < 0.0 || dyC >= ${convInfo.outWidth}.0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n float dyValue = getDy(batch, idyD, idyR, idyC, ch);\n\n dotProd += dyValue * avgMultiplier;\n }\n }\n }\n setOutput(dotProd);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/AvgPool3DGrad.js\nfunction avgPool3DGrad2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { dy, input: input2 } = inputs;\n const x = input2;\n const { filterSize, strides, pad: pad3, dimRoundingMode } = attrs;\n const dilations = [1, 1, 1];\n const convInfo = backend_util_exports.computePool3DInfo(x.shape, filterSize, strides, dilations, pad3, dimRoundingMode);\n const avgPoolBackpropProgram = new AvgPool3DBackpropProgram(convInfo);\n return backend2.runWebGLProgram(avgPoolBackpropProgram, [dy], x.dtype);\n}\nvar avgPool3DGradConfig3 = {\n kernelName: AvgPool3DGrad,\n backendName: \"webgl\",\n kernelFunc: avgPool3DGrad2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/AvgPoolGrad.js\nfunction avgPoolGrad3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { dy, input: input2 } = inputs;\n const x = input2;\n assertNotComplex2([dy, input2], \"avgPoolGrad\");\n const { filterSize, strides, pad: pad3 } = attrs;\n const convInfo = backend_util_exports.computePool2DInfo(x.shape, filterSize, strides, 1, pad3);\n const avgPoolBackpropProgram = new AvgPool2DBackpropProgram(convInfo);\n return backend2.runWebGLProgram(avgPoolBackpropProgram, [dy], x.dtype);\n}\nvar avgPoolGradConfig3 = {\n kernelName: AvgPoolGrad,\n backendName: \"webgl\",\n kernelFunc: avgPoolGrad3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/BatchMatMul.js\nfunction batchMatMul2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { a, b } = inputs;\n const { transposeA, transposeB } = attrs;\n return batchMatMulImpl({ a, b, transposeA, transposeB, backend: backend2 });\n}\nvar batchMatMulConfig2 = {\n kernelName: BatchMatMul,\n backendName: \"webgl\",\n kernelFunc: batchMatMul2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/batchnorm_gpu.js\nvar BatchNormProgram = class {\n constructor(xShape, meanShape, varianceShape, offsetShape, scaleShape, varianceEpsilon) {\n this.outputShape = [];\n this.variableNames = [\"x\", \"mean\", \"variance\"];\n backend_util_exports.assertAndGetBroadcastShape(xShape, meanShape);\n backend_util_exports.assertAndGetBroadcastShape(xShape, varianceShape);\n let offsetSnippet = \"0.0\";\n if (offsetShape != null) {\n backend_util_exports.assertAndGetBroadcastShape(xShape, offsetShape);\n this.variableNames.push(\"offset\");\n offsetSnippet = \"getOffsetAtOutCoords()\";\n }\n let scaleSnippet = \"1.0\";\n if (scaleShape != null) {\n backend_util_exports.assertAndGetBroadcastShape(xShape, scaleShape);\n this.variableNames.push(\"scale\");\n scaleSnippet = \"getScaleAtOutCoords()\";\n }\n this.outputShape = xShape;\n this.userCode = `\n void main() {\n float x = getXAtOutCoords();\n float mean = getMeanAtOutCoords();\n float variance = getVarianceAtOutCoords();\n float offset = ${offsetSnippet};\n float scale = ${scaleSnippet};\n float inv = scale * inversesqrt(variance + float(${varianceEpsilon}));\n setOutput(dot(vec3(x, -mean, offset), vec3(inv, inv, 1)));\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/batchnorm_packed_gpu.js\nvar BatchNormPackedProgram = class {\n constructor(xShape, meanShape, varianceShape, offsetShape, scaleShape, varianceEpsilon) {\n this.packedInputs = true;\n this.packedOutput = true;\n this.variableNames = [\"x\", \"mean\", \"variance\"];\n backend_util_exports.assertAndGetBroadcastShape(xShape, meanShape);\n backend_util_exports.assertAndGetBroadcastShape(xShape, varianceShape);\n let offsetSnippet = \"vec4(0.0)\";\n if (offsetShape != null) {\n backend_util_exports.assertAndGetBroadcastShape(xShape, offsetShape);\n this.variableNames.push(\"offset\");\n offsetSnippet = \"getOffsetAtOutCoords()\";\n }\n let scaleSnippet = \"vec4(1.0)\";\n if (scaleShape != null) {\n backend_util_exports.assertAndGetBroadcastShape(xShape, scaleShape);\n this.variableNames.push(\"scale\");\n scaleSnippet = \"getScaleAtOutCoords()\";\n }\n this.outputShape = xShape;\n this.userCode = `\n void main() {\n vec4 offset = ${offsetSnippet};\n vec4 scale = ${scaleSnippet};\n\n vec4 x = getXAtOutCoords();\n vec4 mean = getMeanAtOutCoords();\n vec4 variance = getVarianceAtOutCoords();\n\n vec4 inv = scale * inversesqrt(variance + vec4(${varianceEpsilon}));\n\n setOutput((x - mean) * inv + offset);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/BatchNorm.js\nvar batchNorm3 = ({ inputs, backend: backend2, attrs }) => {\n const { x, mean: mean5, variance, offset, scale: scale2 } = inputs;\n util_exports.assert(mean5.shape.length === variance.shape.length, () => \"Batch normalization gradient requires mean and variance to have equal ranks.\");\n util_exports.assert(offset == null || mean5.shape.length === offset.shape.length, () => \"Batch normalization gradient requires mean and offset to have equal ranks.\");\n util_exports.assert(scale2 == null || mean5.shape.length === scale2.shape.length, () => \"Batch normalization gradient requires mean and scale to have equal ranks.\");\n let { varianceEpsilon } = attrs;\n if (varianceEpsilon == null) {\n varianceEpsilon = 1e-3;\n }\n const finalInputs = [x, mean5, variance];\n let offsetShape = null;\n if (offset != null) {\n offsetShape = offset.shape;\n finalInputs.push(offset);\n }\n let scaleShape = null;\n if (scale2 != null) {\n scaleShape = scale2.shape;\n finalInputs.push(scale2);\n }\n const program = env().getBool(\"WEBGL_PACK_NORMALIZATION\") ? new BatchNormPackedProgram(x.shape, mean5.shape, variance.shape, offsetShape, scaleShape, varianceEpsilon) : new BatchNormProgram(x.shape, mean5.shape, variance.shape, offsetShape, scaleShape, varianceEpsilon);\n const output = backend2.runWebGLProgram(program, finalInputs, finalInputs[0].dtype);\n return output;\n};\nvar batchNormConfig2 = {\n kernelName: FusedBatchNorm,\n backendName: \"webgl\",\n kernelFunc: batchNorm3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/slice_gpu.js\nvar SliceProgram = class {\n constructor(destSize) {\n this.variableNames = [\"source\"];\n this.outputShape = destSize;\n this.rank = destSize.length;\n const dtype = getCoordsDataType(this.rank);\n this.customUniforms = [{ name: \"start\", arrayIndex: this.rank, type: \"int\" }];\n const sourceCoords = getCoords(this.rank);\n let body;\n const coordSum = destSize.map((_, i2) => {\n return `sourceLoc.${coords[i2]} = start[${i2}] + coords.${coords[i2]};`;\n });\n body = `\n ${dtype} sourceLoc;\n ${dtype} coords = getOutputCoords();\n ${coordSum.join(\"\\n\")}\n `;\n this.userCode = `\n void main() {\n ${body}\n setOutput(getSource(${sourceCoords}));\n }\n `;\n }\n};\nvar coords = [\"x\", \"y\", \"z\", \"w\", \"u\", \"v\"];\nfunction getCoords(rank) {\n if (rank === 1) {\n return \"sourceLoc\";\n } else if (rank <= 6) {\n return coords.slice(0, rank).map((x) => \"sourceLoc.\" + x).join(\",\");\n } else {\n throw Error(`Slicing for rank ${rank} is not yet supported`);\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/slice_packed_gpu.js\nvar SlicePackedProgram = class {\n constructor(destSize) {\n this.variableNames = [\"source\"];\n this.packedInputs = true;\n this.packedOutput = true;\n this.outputShape = destSize;\n this.rank = destSize.length;\n this.customUniforms = [{ name: \"start\", arrayIndex: this.rank, type: \"int\" }];\n const dtype = getCoordsDataType(this.rank);\n const coords3 = getChannels(\"coords\", this.rank);\n const sourceLoc = getChannels(\"sourceLoc\", this.rank);\n const innerDims = this.rank === 1 ? \"sourceLoc\" : `vec2(${sourceLoc.slice(-2).join()})`;\n const getChannel = `getChannel(getSource(${sourceLoc.join()}), ${innerDims})`;\n const upperRow = `\n result.x = ${getChannel};\n if (++${coords3[this.rank - 1]} < ${destSize[this.rank - 1]}) {\n ++${sourceLoc[this.rank - 1]};\n result.y = ${getChannel};\n --${sourceLoc[this.rank - 1]};\n }\n `;\n const lowerRow = this.rank === 1 ? \"\" : `\n --${coords3[this.rank - 1]};\n if (++${coords3[this.rank - 2]} < ${destSize[this.rank - 2]}) {\n ++${sourceLoc[this.rank - 2]};\n result.z = ${getChannel};\n if (++${coords3[this.rank - 1]} < ${destSize[this.rank - 1]}) {\n ++${sourceLoc[this.rank - 1]};\n result.w = ${getChannel};\n }\n }\n `;\n const sourceLocSetup = this.rank <= 4 ? `sourceLoc = coords +\n ${dtype}(${destSize.map((_, i2) => `start[${i2}]`).join()});` : destSize.map((_, i2) => `${sourceLoc[i2]} = ${coords3[i2]} + start[${i2}];`).join(\"\\n\");\n this.userCode = `\n void main() {\n ${dtype} coords = getOutputCoords();\n ${dtype} sourceLoc;\n ${sourceLocSetup}\n vec4 result = vec4(0.);\n ${upperRow}\n ${lowerRow}\n setOutput(result);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Slice.js\nfunction shallowSlice(x, begin, size, backend2) {\n const xTexData = backend2.texData.get(x.dataId);\n const t2 = backend2.makeTensorInfo(size, x.dtype);\n const newTexData = backend2.texData.get(t2.dataId);\n Object.assign(newTexData, xTexData);\n newTexData.refCount = 1;\n newTexData.shape = size;\n newTexData.dtype = x.dtype;\n let flatOffset = slice_util_exports.computeFlatOffset(begin, util_exports.computeStrides(x.shape));\n if (xTexData.slice) {\n flatOffset += xTexData.slice.flatOffset;\n }\n newTexData.slice = {\n flatOffset,\n origDataId: xTexData.slice && xTexData.slice.origDataId || x.dataId\n };\n const refCount = backend2.dataRefCount.get(newTexData.slice.origDataId) || 1;\n backend2.dataRefCount.set(newTexData.slice.origDataId, refCount + 1);\n return t2;\n}\nfunction slice3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { begin, size } = attrs;\n const [$begin, $size] = slice_util_exports.parseSliceParams(x, begin, size);\n slice_util_exports.assertParamsValid(x, $begin, $size);\n if (util_exports.sizeFromShape($size) === 0) {\n return backend2.makeTensorInfo($size, x.dtype, []);\n }\n if (backend2.shouldExecuteOnCPU([x]) || x.dtype === \"string\") {\n const xTexData = backend2.texData.get(x.dataId);\n const outValues = sliceImplCPU(xTexData.values, $begin, $size, x.shape, x.dtype);\n return backend2.makeTensorInfo($size, x.dtype, outValues);\n }\n const { isPacked } = backend2.texData.get(x.dataId);\n const isContinous = slice_util_exports.isSliceContinous(x.shape, $begin, $size);\n if (isPacked || !isContinous) {\n const program = env().getBool(\"WEBGL_PACK_ARRAY_OPERATIONS\") ? new SlicePackedProgram($size) : new SliceProgram($size);\n const customValues = [$begin];\n return backend2.runWebGLProgram(program, [x], x.dtype, customValues);\n }\n backend2.uploadToGPU(x.dataId);\n return shallowSlice(x, $begin, $size, backend2);\n}\nvar sliceConfig2 = {\n kernelName: Slice,\n backendName: \"webgl\",\n kernelFunc: slice3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/BatchToSpaceND.js\nvar batchToSpaceND3 = (args) => {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { blockShape, crops } = attrs;\n util_exports.assert(x.shape.length <= 4, () => \"batchToSpaceND for rank > 4 with a WebGL backend not implemented yet\");\n const prod6 = blockShape.reduce((a, b) => a * b);\n const reshaped = backend_util_exports.getReshaped(x.shape, blockShape, prod6);\n const permuted = backend_util_exports.getPermuted(reshaped.length, blockShape.length);\n const reshapedPermuted = backend_util_exports.getReshapedPermuted(x.shape, blockShape, prod6);\n const sliceBeginCoords = backend_util_exports.getSliceBeginCoords(crops, blockShape.length);\n const sliceSize = backend_util_exports.getSliceSize(reshapedPermuted, crops, blockShape.length);\n const toDispose = [];\n const reshapedIntermediate = reshape4({ inputs: { x }, backend: backend2, attrs: { shape: reshaped } });\n const transposedIntermediate = transpose3({ inputs: { x: reshapedIntermediate }, backend: backend2, attrs: { perm: permuted } });\n const reshapedIntermediate2 = reshape4({\n inputs: { x: transposedIntermediate },\n backend: backend2,\n attrs: { shape: reshapedPermuted }\n });\n const sliced = slice3({\n inputs: { x: reshapedIntermediate2 },\n backend: backend2,\n attrs: { begin: sliceBeginCoords, size: sliceSize }\n });\n toDispose.push(reshapedIntermediate);\n toDispose.push(transposedIntermediate);\n toDispose.push(reshapedIntermediate2);\n toDispose.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2));\n return sliced;\n};\nvar batchToSpaceNDConfig2 = {\n kernelName: BatchToSpaceND,\n backendName: \"webgl\",\n kernelFunc: batchToSpaceND3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Bincount.js\nfunction bincount3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, weights } = inputs;\n const { size } = attrs;\n const xVals = backend2.readSync(x.dataId);\n const weightsVals = backend2.readSync(weights.dataId);\n const outVals = bincountImplCPU(xVals, weightsVals, weights.dtype, weights.shape, size);\n return backend2.makeTensorInfo([size], weights.dtype, outVals);\n}\nvar bincountConfig2 = {\n kernelName: Bincount,\n backendName: \"webgl\",\n kernelFunc: bincount3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/BroadcastArgs.js\nfunction broadcastArgs3(args) {\n const { inputs, backend: backend2 } = args;\n const { s0, s1 } = inputs;\n const s0Vals = backend2.readSync(s0.dataId);\n const s1Vals = backend2.readSync(s1.dataId);\n const broadcastShape = backend_util_exports.assertAndGetBroadcastShape(Array.from(s0Vals), Array.from(s1Vals));\n return backend2.makeTensorInfo([broadcastShape.length], \"int32\", Int32Array.from(broadcastShape));\n}\nvar broadcastArgsConfig2 = {\n kernelName: BroadcastArgs,\n backendName: \"webgl\",\n kernelFunc: broadcastArgs3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/NotEqual.js\nvar NOT_EQUAL = `return float(a != b);`;\nvar notEqual3 = binaryKernelFunc2({ opSnippet: NOT_EQUAL, cpuKernelImpl: notEqualImplCPU, dtype: \"bool\" });\nvar notEqualConfig2 = {\n kernelName: NotEqual,\n backendName: \"webgl\",\n kernelFunc: notEqual3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Real.js\nfunction real3(args) {\n const { inputs, backend: backend2 } = args;\n const { input: input2 } = inputs;\n const inputData = backend2.texData.get(input2.dataId);\n return identity3({ inputs: { x: inputData.complexTensorInfos.real }, backend: backend2 });\n}\nvar realConfig2 = {\n kernelName: Real,\n backendName: \"webgl\",\n kernelFunc: real3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernel_utils/int.js\nvar TO_INT = `return float(int(x));`;\nfunction int(input2, backend2) {\n const program = new UnaryOpProgram(input2.shape, TO_INT);\n const output = backend2.runWebGLProgram(program, [input2], \"int32\");\n return { dataId: output.dataId, shape: output.shape, dtype: output.dtype };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Cast.js\nfunction cast4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { dtype } = attrs;\n if (dtype === \"complex64\") {\n if (x.dtype === \"complex64\") {\n return identity3({ inputs: { x }, backend: backend2 });\n }\n const zerosTensor = zeros(x.shape);\n const floatX = cast4({ inputs: { x }, backend: backend2, attrs: { dtype: \"float32\" } });\n const result = complex3({ inputs: { real: floatX, imag: zerosTensor }, backend: backend2 });\n zerosTensor.dispose();\n backend2.disposeIntermediateTensorInfo(floatX);\n return result;\n }\n if (x.dtype === \"complex64\") {\n const realPart = real3({ inputs: { input: x }, backend: backend2 });\n const result = cast4({ inputs: { x: realPart }, backend: backend2, attrs: { dtype } });\n backend2.disposeIntermediateTensorInfo(realPart);\n return result;\n }\n if (!util_exports.hasEncodingLoss(x.dtype, dtype)) {\n const result = identity3({ inputs: { x }, backend: backend2 });\n return { dataId: result.dataId, shape: result.shape, dtype };\n }\n if (backend2.shouldExecuteOnCPU([x])) {\n const values = backend2.texData.get(x.dataId).values;\n const [resultShape, resultType, resultData] = castImplCPU(values, x.shape, x.dtype, dtype);\n return backend2.makeTensorInfo(resultShape, resultType, resultData);\n }\n if (dtype === \"int32\") {\n return int(x, backend2);\n }\n if (dtype === \"bool\") {\n const zerosTensorInfo = backend2.makeTensorInfo([], \"bool\", util_exports.getTypedArrayFromDType(\"bool\", 1));\n const binaryInputs = { a: x, b: zerosTensorInfo };\n const result = notEqual3({ inputs: binaryInputs, backend: backend2 });\n backend2.disposeIntermediateTensorInfo(zerosTensorInfo);\n return result;\n }\n throw new Error(`Error in Cast: failed to cast ${x.dtype} to ${dtype}`);\n}\nvar castConfig2 = {\n kernelName: Cast,\n backendName: \"webgl\",\n kernelFunc: cast4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Ceil.js\nvar CEIL = `return ceil(x);`;\nvar ceil3 = unaryKernelFunc2({ opSnippet: CEIL, packedOpSnippet: CEIL, cpuKernelImpl: ceilImplCPU });\nvar ceilConfig2 = {\n kernelName: Ceil,\n backendName: \"webgl\",\n kernelFunc: ceil3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/clip_gpu.js\nvar ClipProgram = class {\n constructor(aShape) {\n this.variableNames = [\"A\"];\n this.customUniforms = [\n { name: \"minVal\", type: \"float\" },\n { name: \"maxVal\", type: \"float\" }\n ];\n this.outputShape = aShape;\n this.userCode = `\n\n void main() {\n float value = getAAtOutCoords();\n if (isnan(value)) {\n setOutput(value);\n return;\n }\n\n setOutput(clamp(value, minVal, maxVal));\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/clip_packed_gpu.js\nvar ClipPackedProgram = class {\n constructor(aShape) {\n this.variableNames = [\"A\"];\n this.packedInputs = true;\n this.packedOutput = true;\n this.customUniforms = [\n { name: \"minVal\", type: \"float\" },\n { name: \"maxVal\", type: \"float\" }\n ];\n this.outputShape = aShape;\n this.userCode = `\n void main() {\n vec4 value = getAAtOutCoords();\n\n if (any(isnan(value))) {\n setOutput(value);\n return;\n }\n\n setOutput(clamp(value, vec4(minVal), vec4(maxVal)));\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ClipByValue.js\nfunction clipByValue3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { clipValueMin, clipValueMax } = attrs;\n let program;\n if (env().getBool(\"WEBGL_PACK_CLIP\")) {\n program = new ClipPackedProgram(x.shape);\n } else {\n program = new ClipProgram(x.shape);\n }\n const customValues = [[clipValueMin], [clipValueMax]];\n return backend2.runWebGLProgram(program, [x], x.dtype, customValues);\n}\nvar clipByValueConfig2 = {\n kernelName: ClipByValue,\n backendName: \"webgl\",\n kernelFunc: clipByValue3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/complex_abs_gpu.js\nvar ComplexAbsProgram = class {\n constructor(shape) {\n this.variableNames = [\"real\", \"imag\"];\n this.outputShape = shape;\n this.userCode = `\n void main() {\n float re = abs(getRealAtOutCoords());\n float im = abs(getImagAtOutCoords());\n float mx = max(re, im);\n\n // sadly the length function in glsl is not underflow-safe\n // (at least not on Intel GPUs). So the safe solution is\n // to ensure underflow-safety in all cases.\n setOutput(\n mx == 0.0 ? 0.0 : mx * length(vec2(1, min(re, im)/mx))\n );\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ComplexAbs.js\nfunction makeComplexComponentTensorInfo(complexTensor, complexPart) {\n return {\n dataId: complexPart.dataId,\n dtype: complexPart.dtype,\n shape: complexTensor.shape\n };\n}\nfunction complexAbs2(args) {\n const { inputs, backend: backend2 } = args;\n const { x } = inputs;\n const xData = backend2.texData.get(x.dataId);\n const program = new ComplexAbsProgram(x.shape);\n const programInputs = [\n makeComplexComponentTensorInfo(x, xData.complexTensorInfos.real),\n makeComplexComponentTensorInfo(x, xData.complexTensorInfos.imag)\n ];\n return backend2.runWebGLProgram(program, programInputs, programInputs[0].dtype);\n}\nvar complexAbsConfig2 = {\n kernelName: ComplexAbs,\n backendName: \"webgl\",\n kernelFunc: complexAbs2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/concat_gpu.js\nvar ConcatProgram = class {\n constructor(shapes) {\n this.outputShape = [];\n this.outputShape = backend_util_exports.computeOutShape(shapes, 1);\n this.variableNames = shapes.map((_, i2) => `T${i2}`);\n const offsets = new Array(shapes.length - 1);\n offsets[0] = shapes[0][1];\n for (let i2 = 1; i2 < offsets.length; i2++) {\n offsets[i2] = offsets[i2 - 1] + shapes[i2][1];\n }\n const snippets = [`if (yC < ${offsets[0]}) setOutput(getT0(yR, yC));`];\n for (let i2 = 1; i2 < offsets.length; i2++) {\n const shift = offsets[i2 - 1];\n snippets.push(`else if (yC < ${offsets[i2]}) setOutput(getT${i2}(yR, yC-${shift}));`);\n }\n const lastIndex = offsets.length;\n const lastShift = offsets[offsets.length - 1];\n snippets.push(`else setOutput(getT${lastIndex}(yR, yC-${lastShift}));`);\n this.userCode = `\n void main() {\n ivec2 coords = getOutputCoords();\n int yR = coords.x;\n int yC = coords.y;\n\n ${snippets.join(\"\\n \")}\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/concat_packed_gpu.js\nvar ConcatPackedProgram = class {\n constructor(shapes, axis) {\n this.packedInputs = true;\n this.packedOutput = true;\n this.outputShape = [];\n this.outputShape = backend_util_exports.computeOutShape(shapes, axis);\n const shape = this.outputShape;\n const rank = shape.length;\n const dtype = getCoordsDataType(rank);\n const coords3 = getChannels(\"coords\", rank);\n const channels = [\"x\", \"y\", \"z\", \"w\", \"u\", \"v\"].slice(0, rank);\n this.variableNames = shapes.map((_, i2) => `T${i2}`);\n const offsets = new Array(shapes.length - 1);\n offsets[0] = shapes[0][axis];\n for (let i2 = 1; i2 < offsets.length; i2++) {\n offsets[i2] = offsets[i2 - 1] + shapes[i2][axis];\n }\n const channel = channels[axis];\n const lastChannels = channels.slice(-2);\n const allChannels = channels.join();\n let getValueSnippet = `if (${channel} < ${offsets[0]}) {\n return getChannel(\n getT0(${allChannels}), vec2(${lastChannels.join()}));\n }`;\n for (let i2 = 1; i2 < offsets.length; i2++) {\n const shift2 = offsets[i2 - 1];\n getValueSnippet += `\n if (${channel} < ${offsets[i2]} && ${channel} >= ${offsets[i2 - 1]}) {\n return getChannel(\n getT${i2}(${shiftedChannels(channels, channel, shift2)}),\n vec2(${shiftedChannels(lastChannels, channel, shift2)}));\n }`;\n }\n const lastIndex = offsets.length;\n const shift = offsets[offsets.length - 1];\n getValueSnippet += `\n return getChannel(\n getT${lastIndex}(${shiftedChannels(channels, channel, shift)}),\n vec2(${shiftedChannels(lastChannels, channel, shift)}));`;\n this.userCode = `\n float getValue(${channels.map((x) => \"int \" + x)}) {\n ${getValueSnippet}\n }\n\n void main() {\n ${dtype} coords = getOutputCoords();\n vec4 result = vec4(getValue(${coords3}), 0., 0., 0.);\n\n ${coords3[rank - 1]} = ${coords3[rank - 1]} + 1;\n if (${coords3[rank - 1]} < ${shape[rank - 1]}) {\n result.g = getValue(${coords3});\n }\n\n ${coords3[rank - 2]} = ${coords3[rank - 2]} + 1;\n if (${coords3[rank - 2]} < ${shape[rank - 2]}) {\n result.a = getValue(${coords3});\n }\n\n ${coords3[rank - 1]} = ${coords3[rank - 1]} - 1;\n if (${coords3[rank - 2]} < ${shape[rank - 2]} &&\n ${coords3[rank - 1]} < ${shape[rank - 1]}) {\n result.b = getValue(${coords3});\n }\n setOutput(result);\n }\n `;\n }\n};\nfunction shiftedChannels(channels, channel, shift) {\n const channelIdx = channels.indexOf(channel);\n const res = channels.map((c, idx) => {\n if (idx === channelIdx) {\n return `${c} - ${shift}`;\n } else {\n return c;\n }\n });\n return res.join();\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Imag.js\nfunction imag3(args) {\n const { inputs, backend: backend2 } = args;\n const { input: input2 } = inputs;\n const inputData = backend2.texData.get(input2.dataId);\n return identity3({ inputs: { x: inputData.complexTensorInfos.imag }, backend: backend2 });\n}\nvar imagConfig2 = {\n kernelName: Imag,\n backendName: \"webgl\",\n kernelFunc: imag3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Concat_impl.js\nfunction concatImpl2(inputs, axis, backend2) {\n const dtype = inputs[0].dtype;\n if (dtype === \"complex64\") {\n const reals = inputs.map((t2) => real3({ inputs: { input: t2 }, backend: backend2 }));\n const imags = inputs.map((t2) => imag3({ inputs: { input: t2 }, backend: backend2 }));\n const realConcated = concatImpl2(reals, axis, backend2);\n const imagConcated = concatImpl2(imags, axis, backend2);\n const result2 = complex3({ inputs: { real: realConcated, imag: imagConcated }, backend: backend2 });\n reals.forEach((r2) => backend2.disposeIntermediateTensorInfo(r2));\n imags.forEach((i2) => backend2.disposeIntermediateTensorInfo(i2));\n backend2.disposeIntermediateTensorInfo(realConcated);\n backend2.disposeIntermediateTensorInfo(imagConcated);\n return result2;\n }\n let runOnCpu = backend2.shouldExecuteOnCPU(inputs);\n if (dtype === \"string\") {\n runOnCpu = true;\n }\n if (runOnCpu) {\n const tensors2D2 = inputs.map((t2) => {\n const innerSize = util_exports.sizeFromShape(t2.shape.slice(axis));\n const shape = [-1, innerSize];\n return reshape4({ inputs: { x: t2 }, backend: backend2, attrs: { shape } });\n });\n const inputsValShapes = tensors2D2.map((t2) => {\n return { vals: backend2.readSync(t2.dataId), shape: t2.shape };\n });\n const outShape2 = backend_util_exports.computeOutShape(tensors2D2.map((t2) => t2.shape), 1);\n const simplyConcat = tensors2D2[0].shape[0] === 1;\n const outVals = concatImplCPU(inputsValShapes, outShape2, dtype, simplyConcat);\n const finalOutShape = backend_util_exports.computeOutShape(inputs.map((t2) => t2.shape), axis);\n const outInfo = backend2.makeTensorInfo(finalOutShape, dtype, outVals);\n tensors2D2.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2));\n return outInfo;\n }\n const maxTexturesInShader = env().getNumber(\"WEBGL_MAX_TEXTURES_IN_SHADER\");\n if (inputs.length > maxTexturesInShader) {\n const reducedInputs = [];\n for (let i2 = 0; i2 < inputs.length; i2 += maxTexturesInShader) {\n const subArray = inputs.slice(i2, i2 + maxTexturesInShader);\n reducedInputs.push(concatImpl2(subArray, axis, backend2));\n }\n const result2 = concatImpl2(reducedInputs, axis, backend2);\n for (const i2 of reducedInputs) {\n backend2.disposeIntermediateTensorInfo(i2);\n }\n return result2;\n }\n if (env().getBool(\"WEBGL_PACK_ARRAY_OPERATIONS\") && inputs[0].shape.length > 1) {\n const program2 = new ConcatPackedProgram(inputs.map((t2) => t2.shape), axis);\n return backend2.runWebGLProgram(program2, inputs, dtype);\n }\n const { tensors2D, outShape } = computeTensors2D(inputs, axis, backend2);\n const program = new ConcatProgram(tensors2D.map((t2) => t2.shape));\n const result = backend2.runWebGLProgram(program, tensors2D, dtype);\n tensors2D.forEach((r2) => backend2.disposeIntermediateTensorInfo(r2));\n const reshapedResult = reshape4({ inputs: { x: result }, attrs: { shape: outShape }, backend: backend2 });\n backend2.disposeIntermediateTensorInfo(result);\n return reshapedResult;\n}\nfunction computeTensors2D(inputs, axis, backend2) {\n const outShape = backend_util_exports.computeOutShape(inputs.map((t2) => t2.shape), axis);\n const tensors2D = inputs.map((x) => reshape4({\n inputs: { x },\n attrs: { shape: [-1, util_exports.sizeFromShape(x.shape.slice(axis))] },\n backend: backend2\n }));\n return { tensors2D, outShape };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Concat.js\nfunction concat3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { axis } = attrs;\n const $axis = util_exports.parseAxisParam(axis, inputs[0].shape)[0];\n const shapes = inputs.map((t2) => t2.shape);\n backend_util_exports.assertParamsConsistent(shapes, $axis);\n const outShape = backend_util_exports.computeOutShape(inputs.map((t2) => t2.shape), $axis);\n if (util_exports.sizeFromShape(outShape) === 0) {\n return backend2.makeTensorInfo(outShape, inputs[0].dtype, []);\n }\n const $inputs = inputs.filter((t2) => util_exports.sizeFromShape(t2.shape) > 0);\n if ($inputs.length === 1) {\n return identity3({ inputs: { x: $inputs[0] }, backend: backend2 });\n }\n return concatImpl2($inputs, $axis, backend2);\n}\nvar concatConfig2 = {\n kernelName: Concat,\n backendName: \"webgl\",\n kernelFunc: concat3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/conv_gpu.js\nvar Conv2DProgram = class {\n constructor(convInfo, addBias = false, activation2 = null, hasPreluActivationWeights = false, hasLeakyreluAlpha = false) {\n this.variableNames = [\"x\", \"W\"];\n this.outputShape = convInfo.outShape;\n const padTop = convInfo.padInfo.top;\n const padLeft = convInfo.padInfo.left;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const dilationHeight = convInfo.dilationHeight;\n const dilationWidth = convInfo.dilationWidth;\n const filterHeight = convInfo.filterHeight;\n const filterWidth = convInfo.filterWidth;\n const inputDepthNearestVec4 = Math.floor(convInfo.inChannels / 4) * 4;\n const inputDepthVec4Remainder = convInfo.inChannels % 4;\n const isChannelsLast = convInfo.dataFormat === \"channelsLast\";\n const rowDim = isChannelsLast ? 1 : 2;\n const colDim = isChannelsLast ? 2 : 3;\n const channelDim = isChannelsLast ? 3 : 1;\n let activationSnippet = \"\", applyActivationSnippet = \"\";\n if (activation2) {\n if (hasPreluActivationWeights) {\n activationSnippet = `float activation(float a) {\n float b = getPreluActivationWeightsAtOutCoords();\n ${activation2}\n }`;\n } else if (hasLeakyreluAlpha) {\n activationSnippet = `float activation(float a) {\n float b = getLeakyreluAlphaAtOutCoords();\n ${activation2}\n }`;\n } else {\n activationSnippet = `\n float activation(float x) {\n ${activation2}\n }\n `;\n }\n applyActivationSnippet = `result = activation(result);`;\n }\n const addBiasSnippet = addBias ? \"result += getBiasAtOutCoords();\" : \"\";\n if (addBias) {\n this.variableNames.push(\"bias\");\n }\n if (hasPreluActivationWeights) {\n this.variableNames.push(\"preluActivationWeights\");\n }\n if (hasLeakyreluAlpha) {\n this.variableNames.push(\"leakyreluAlpha\");\n }\n this.userCode = `\n ${activationSnippet}\n\n const ivec2 strides = ivec2(${strideHeight}, ${strideWidth});\n const ivec2 pads = ivec2(${padTop}, ${padLeft});\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d2 = coords[${channelDim}];\n\n ivec2 xRCCorner =\n ivec2(coords[${rowDim}], coords[${colDim}]) * strides - pads;\n int xRCorner = xRCCorner.x;\n int xCCorner = xRCCorner.y;\n\n // Convolve x(?, ?, d1) with w(:, :, d1, d2) to get y(yR, yC, d2).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n for (int wR = 0; wR < ${filterHeight}; wR++) {\n int xR = xRCorner + wR * ${dilationHeight};\n\n if (xR < 0 || xR >= ${convInfo.inHeight}) {\n continue;\n }\n\n for (int wC = 0; wC < ${filterWidth}; wC++) {\n int xC = xCCorner + wC * ${dilationWidth};\n\n if (xC < 0 || xC >= ${convInfo.inWidth}) {\n continue;\n }\n\n for (int d1 = 0; d1 < ${inputDepthNearestVec4}; d1 += 4) {\n vec4 wValues = vec4(\n getW(wR, wC, d1, d2),\n getW(wR, wC, d1 + 1, d2),\n getW(wR, wC, d1 + 2, d2),\n getW(wR, wC, d1 + 3, d2)\n );\n\n if (${isChannelsLast}) {\n vec4 xValues = vec4(\n getX(batch, xR, xC, d1),\n getX(batch, xR, xC, d1 + 1),\n getX(batch, xR, xC, d1 + 2),\n getX(batch, xR, xC, d1 + 3)\n );\n dotProd += dot(xValues, wValues);\n } else {\n vec4 xValues = vec4(\n getX(batch, d1, xR, xC),\n getX(batch, d1 + 1, xR, xC),\n getX(batch, d1 + 2, xR, xC),\n getX(batch, d1 + 3, xR, xC)\n );\n dotProd += dot(xValues, wValues);\n }\n }\n\n if (${inputDepthVec4Remainder === 1}) {\n\n if (${isChannelsLast}) {\n dotProd +=\n getX(batch, xR, xC, ${inputDepthNearestVec4}) *\n getW(wR, wC, ${inputDepthNearestVec4}, d2);\n } else {\n dotProd +=\n getX(batch, ${inputDepthNearestVec4}, xR, xC) *\n getW(wR, wC, ${inputDepthNearestVec4}, d2);\n }\n\n } else if (${inputDepthVec4Remainder === 2}) {\n vec2 wValues = vec2(\n getW(wR, wC, ${inputDepthNearestVec4}, d2),\n getW(wR, wC, ${inputDepthNearestVec4} + 1, d2)\n );\n\n if (${isChannelsLast}) {\n vec2 xValues = vec2(\n getX(batch, xR, xC, ${inputDepthNearestVec4}),\n getX(batch, xR, xC, ${inputDepthNearestVec4} + 1)\n );\n dotProd += dot(xValues, wValues);\n } else {\n vec2 xValues = vec2(\n getX(batch, ${inputDepthNearestVec4}, xR, xC),\n getX(batch, ${inputDepthNearestVec4} + 1, xR, xC)\n );\n dotProd += dot(xValues, wValues);\n }\n\n } else if (${inputDepthVec4Remainder === 3}) {\n vec3 wValues = vec3(\n getW(wR, wC, ${inputDepthNearestVec4}, d2),\n getW(wR, wC, ${inputDepthNearestVec4} + 1, d2),\n getW(wR, wC, ${inputDepthNearestVec4} + 2, d2)\n );\n\n if (${isChannelsLast}) {\n vec3 xValues = vec3(\n getX(batch, xR, xC, ${inputDepthNearestVec4}),\n getX(batch, xR, xC, ${inputDepthNearestVec4} + 1),\n getX(batch, xR, xC, ${inputDepthNearestVec4} + 2)\n );\n dotProd += dot(xValues, wValues);\n } else {\n vec3 xValues = vec3(\n getX(batch, ${inputDepthNearestVec4}, xR, xC),\n getX(batch, ${inputDepthNearestVec4} + 1, xR, xC),\n getX(batch, ${inputDepthNearestVec4} + 2, xR, xC)\n );\n dotProd += dot(xValues, wValues);\n }\n\n }\n }\n }\n\n float result = dotProd;\n ${addBiasSnippet}\n ${applyActivationSnippet}\n setOutput(result);\n }\n `;\n }\n};\nvar Conv3DProgram = class {\n constructor(convInfo) {\n this.variableNames = [\"x\", \"W\"];\n this.outputShape = convInfo.outShape;\n const padFront = convInfo.padInfo.front;\n const padTop = convInfo.padInfo.top;\n const padLeft = convInfo.padInfo.left;\n const strideDepth = convInfo.strideDepth;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const dilationDepth = convInfo.dilationDepth;\n const dilationHeight = convInfo.dilationHeight;\n const dilationWidth = convInfo.dilationWidth;\n const filterDepth = convInfo.filterDepth;\n const filterHeight = convInfo.filterHeight;\n const filterWidth = convInfo.filterWidth;\n const inputDepthNearestVec4 = Math.floor(convInfo.inChannels / 4) * 4;\n const inputDepthVec4Remainder = convInfo.inChannels % 4;\n this.userCode = `\n const ivec3 strides = ivec3(${strideDepth}, ${strideHeight}, ${strideWidth});\n const ivec3 pads = ivec3(${padFront}, ${padTop}, ${padLeft});\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int d2 = coords.u;\n\n ivec3 xFRCCorner = ivec3(coords.y, coords.z, coords.w) * strides - pads;\n int xFCorner = xFRCCorner.x;\n int xRCorner = xFRCCorner.y;\n int xCCorner = xFRCCorner.z;\n\n // Convolve x(?, ?, ?, d1) with w(:, :, :, d1, d2) to get\n // y(yF, yR, yC, d2). ? = to be determined. : = across all\n // values in that axis.\n float dotProd = 0.0;\n for (int wF = 0; wF < ${filterDepth}; wF++) {\n int xF = xFCorner + wF * ${dilationDepth};\n\n if (xF < 0 || xF >= ${convInfo.inDepth}) {\n continue;\n }\n\n for (int wR = 0; wR < ${filterHeight}; wR++) {\n int xR = xRCorner + wR * ${dilationHeight};\n\n if (xR < 0 || xR >= ${convInfo.inHeight}) {\n continue;\n }\n\n for (int wC = 0; wC < ${filterWidth}; wC++) {\n int xC = xCCorner + wC * ${dilationWidth};\n\n if (xC < 0 || xC >= ${convInfo.inWidth}) {\n continue;\n }\n\n for (int d1 = 0; d1 < ${inputDepthNearestVec4}; d1 += 4) {\n vec4 xValues = vec4(\n getX(batch, xF, xR, xC, d1),\n getX(batch, xF, xR, xC, d1 + 1),\n getX(batch, xF, xR, xC, d1 + 2),\n getX(batch, xF, xR, xC, d1 + 3)\n );\n vec4 wValues = vec4(\n getW(wF, wR, wC, d1, d2),\n getW(wF, wR, wC, d1 + 1, d2),\n getW(wF, wR, wC, d1 + 2, d2),\n getW(wF, wR, wC, d1 + 3, d2)\n );\n\n dotProd += dot(xValues, wValues);\n }\n\n if (${inputDepthVec4Remainder === 1}) {\n dotProd +=\n getX(batch, xF, xR, xC, ${inputDepthNearestVec4}) *\n getW(wF, wR, wC, ${inputDepthNearestVec4}, d2);\n } else if (${inputDepthVec4Remainder === 2}) {\n vec2 xValues = vec2(\n getX(batch, xF, xR, xC, ${inputDepthNearestVec4}),\n getX(batch, xF, xR, xC, ${inputDepthNearestVec4} + 1)\n );\n vec2 wValues = vec2(\n getW(wF, wR, wC, ${inputDepthNearestVec4}, d2),\n getW(wF, wR, wC, ${inputDepthNearestVec4} + 1, d2)\n );\n dotProd += dot(xValues, wValues);\n } else if (${inputDepthVec4Remainder === 3}) {\n vec3 xValues = vec3(\n getX(batch, xF, xR, xC, ${inputDepthNearestVec4}),\n getX(batch, xF, xR, xC, ${inputDepthNearestVec4} + 1),\n getX(batch, xF, xR, xC, ${inputDepthNearestVec4} + 2)\n );\n vec3 wValues = vec3(\n getW(wF, wR, wC, ${inputDepthNearestVec4}, d2),\n getW(wF, wR, wC, ${inputDepthNearestVec4} + 1, d2),\n getW(wF, wR, wC, ${inputDepthNearestVec4} + 2, d2)\n );\n dotProd += dot(xValues, wValues);\n }\n }\n }\n }\n setOutput(dotProd);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/conv_packed_gpu.js\nvar Conv2DPackedProgram = class {\n constructor(convInfo, addBias = false, activation2 = null, hasPreluActivation = false, hasLeakyReluAlpha = false) {\n this.variableNames = [\"x\", \"W\"];\n this.packedInputs = true;\n this.packedOutput = true;\n this.customUniforms = [\n { name: \"pads\", type: \"ivec2\" },\n { name: \"strides\", type: \"ivec2\" },\n { name: \"dilations\", type: \"ivec2\" },\n { name: \"inDims\", type: \"ivec2\" }\n ];\n this.outputShape = convInfo.outShape;\n this.enableShapeUniforms = useShapeUniforms(this.outputShape.length);\n const padLeft = convInfo.padInfo.left;\n const strideWidth = convInfo.strideWidth;\n const dilationWidth = convInfo.dilationWidth;\n const filterHeight = convInfo.filterHeight;\n const filterWidth = convInfo.filterWidth;\n const texelsAcross = filterWidth;\n let mainLoop = `\n int xR; int xC; int xCOffset;\n vec4 wTexel; vec4 previous; vec4 final;`;\n for (let c = 0; c < filterWidth; c++) {\n mainLoop += `\n vec4 xTexelC${c * 2};\n int xTexelC${c * 2}Ready;\n vec4 xTexelC${c * 2 + 1};\n int xTexelC${c * 2 + 1}Ready;\n vec4 xC${c};`;\n }\n mainLoop += `\n for (int r = 0; r < ${filterHeight}; r++) {\n for (int d1 = 0; d1 < ${convInfo.inChannels}; d1 += 2) {\n `;\n for (let c = 0; c < filterWidth; c++) {\n mainLoop += `\n xTexelC${c * 2} = vec4(0.0);\n xTexelC${c * 2}Ready = 0;\n xTexelC${c * 2 + 1} = vec4(0.0);\n xTexelC${c * 2 + 1}Ready = 0;\n xC${c} = vec4(0.0);`;\n }\n mainLoop += `\n xR = xRCorner + r * dilations[0];\n if (xR >=0 && xR < inDims[0]) {\n `;\n for (let texelC = 0; texelC < (texelsAcross + 1) / 2; texelC++) {\n const colIndex = texelC * 2;\n mainLoop += `\n xC = xCCorner + ${colIndex * dilationWidth};\n `;\n if (strideWidth === 1) {\n if (colIndex < filterWidth) {\n if (padLeft % 2 === 1) {\n mainLoop += `\n xCOffset = xC + 1;\n if (xCOffset >= 0 && xCOffset < inDims[1] && xTexelC${colIndex}Ready == 0) {\n xTexelC${colIndex} = getX(batch, xR, xCOffset, d1);\n\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if (xCOffset + 1 >= inDims[1]) {\n xTexelC${colIndex}.zw = vec2(0.0);\n }\n xTexelC${colIndex}Ready = 1;\n }\n `;\n if (dilationWidth === 1 && colIndex > 0) {\n mainLoop += `\n xC${colIndex} = vec4(xTexelC${colIndex - 2}.zw, xTexelC${colIndex}.xy);\n `;\n } else {\n mainLoop += `\n xCOffset = xC + 1 - 2;\n\n if (xCOffset >= 0 && xCOffset < inDims[1]) {\n previous = getX(batch, xR, xCOffset, d1);\n\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if (xCOffset + 1 >= inDims[1]) {\n previous.zw = vec2(0.0);\n }\n\n xC${colIndex} = vec4(previous.zw, xTexelC${colIndex}.xy);\n } else {\n xC${colIndex} = vec4(0.0, 0.0, xTexelC${colIndex}.xy);\n }\n `;\n }\n } else {\n mainLoop += `\n if (xC >= 0 && xC < inDims[1] && xTexelC${colIndex}Ready == 0) {\n xTexelC${colIndex} = getX(batch, xR, xC, d1);\n if (xC + 1 >= inDims[1]) {\n xTexelC${colIndex}.zw = vec2(0.0);\n }\n xTexelC${colIndex}Ready = 1;\n }\n\n xC${colIndex} = xTexelC${colIndex};\n `;\n }\n if (colIndex + 1 < filterWidth) {\n const nextTexelOffset = padLeft % 2 === 0 ? util_exports.nearestLargerEven(dilationWidth) : dilationWidth;\n if (dilationWidth % 2 === 0 && padLeft % 2 === 1 || dilationWidth % 2 !== 0 && padLeft % 2 !== 1) {\n mainLoop += `\n xCOffset = xC + imod(pads[1], 2) + ${nextTexelOffset};\n\n if (xCOffset >= 0 && xCOffset < inDims[1] && xTexelC${colIndex + 1}Ready == 0) {\n xTexelC${colIndex + 1} = getX(batch, xR, xCOffset, d1);\n\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if (xCOffset + 1 >= inDims[1]) {\n xTexelC${colIndex + 1}.zw = vec2(0.0);\n }\n xTexelC${colIndex + 1}Ready = 1;\n }\n `;\n if (dilationWidth > 1) {\n mainLoop += `\n xCOffset -= 2;\n if (xCOffset >= 0 && xCOffset < inDims[1]) {\n previous = getX(batch, xR, xCOffset, d1);\n xC${colIndex + 1} = vec4(previous.zw, xTexelC${colIndex + 1}.xy);\n } else {\n xC${colIndex + 1} = vec4(0.0, 0.0, xTexelC${colIndex + 1}.xy);\n }\n `;\n } else {\n mainLoop += `\n xC${colIndex + 1} = vec4(xTexelC${colIndex}.zw, xTexelC${colIndex + 1}.xy);\n `;\n }\n } else {\n if (nextTexelOffset === 1) {\n mainLoop += `\n xC${colIndex + 1} = xTexelC${colIndex};\n `;\n } else {\n mainLoop += `\n xCOffset = xC + ${nextTexelOffset};\n\n if (xCOffset >= 0 && xCOffset < inDims[1] && xTexelC${colIndex + 1}Ready == 0) {\n xTexelC${colIndex + 1} = getX(batch, xR, xCOffset, d1);\n if (xCOffset + 1 >= inDims[1]) {\n xTexelC${colIndex + 1}.zw = vec2(0.0);\n }\n xTexelC${colIndex + 1}Ready = 1;\n }\n\n xC${colIndex + 1} = xTexelC${colIndex + 1};\n `;\n }\n }\n }\n }\n } else {\n if (colIndex < filterWidth) {\n if (padLeft % 2 === 1) {\n mainLoop += `\n xCOffset = xC + 1 - strides[1];\n if(xCOffset >= 0 && xCOffset < inDims[1] && xTexelC${colIndex}Ready == 0) {\n xTexelC${colIndex} = getX(batch, xR, xCOffset, d1);\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if (xCOffset + 1 >= inDims[1]) {\n xTexelC${colIndex}.zw = vec2(0.0);\n }\n xTexelC${colIndex}Ready = 1;\n }\n\n if(xC + 1 >= 0 && xC + 1 < inDims[1] && xTexelC${colIndex + 1}Ready == 0) {\n xTexelC${colIndex + 1} = getX(batch, xR, xC + 1, d1);\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if (xC + 2 >= inDims[1]) {\n xTexelC${colIndex + 1}.zw = vec2(0.0);\n }\n xTexelC${colIndex + 1}Ready = 1;\n }\n\n xC${colIndex} = vec4(xTexelC${colIndex}.zw, xTexelC${colIndex + 1}.zw);\n `;\n if (colIndex + 1 < filterWidth) {\n mainLoop += `\n final = vec4(0.0);\n xCOffset = xC + 1 + strides[1];\n if(xCOffset >= 0 && xCOffset < inDims[1]) {\n final = getX(batch, xR, xCOffset, d1);\n }\n xC${colIndex + 1} = vec4(xTexelC${colIndex + 1}.xy, final.xy);\n `;\n }\n } else {\n mainLoop += `\n if(xC >= 0 && xC < inDims[1] && xTexelC${colIndex}Ready == 0) {\n xTexelC${colIndex} = getX(batch, xR, xC, d1);\n if (xC + 1 >= inDims[1]) {\n xTexelC${colIndex}.zw = vec2(0.0);\n }\n xTexelC${colIndex}Ready = 1;\n }\n\n xCOffset = xC + strides[1];\n if(xCOffset >= 0 && xCOffset < inDims[1] && xTexelC${colIndex + 1}Ready == 0) {\n xTexelC${colIndex + 1} = getX(batch, xR, xCOffset, d1);\n if (xCOffset + 1 >= inDims[1]) {\n xTexelC${colIndex + 1}.zw = vec2(0.);\n }\n xTexelC${colIndex + 1}Ready = 1;\n }\n\n xC${colIndex} = vec4(\n xTexelC${colIndex}.xy, xTexelC${colIndex + 1}.xy);\n `;\n if (colIndex + 1 < filterWidth) {\n mainLoop += `\n xC${colIndex + 1} = vec4(xTexelC${colIndex}.zw, xTexelC${colIndex + 1}.zw);\n `;\n }\n }\n }\n }\n if (colIndex < filterWidth) {\n mainLoop += `\n wTexel = getW(r, ${colIndex}, d1, d2);\n dotProd += xC${colIndex}.xxzz * vec4(wTexel.xy, wTexel.xy);\n if(d1 + 1 < ${convInfo.inChannels}) {\n dotProd += xC${colIndex}.yyww * vec4(wTexel.zw, wTexel.zw);\n }\n `;\n if (colIndex + 1 < filterWidth) {\n mainLoop += `\n wTexel = getW(r, ${colIndex + 1}, d1, d2);\n dotProd += xC${colIndex + 1}.xxzz * vec4(wTexel.xy, wTexel.xy);\n if(d1 + 1 < ${convInfo.inChannels}) {\n dotProd += xC${colIndex + 1}.yyww * vec4(wTexel.zw, wTexel.zw);\n }\n `;\n }\n }\n }\n mainLoop += `\n }\n `;\n mainLoop += `\n }\n `;\n mainLoop += `\n }\n `;\n let activationSnippet = \"\", applyActivationSnippet = \"\";\n if (activation2) {\n if (hasPreluActivation) {\n activationSnippet = `vec4 activation(vec4 a) {\n vec4 b = getPreluActivationWeightsAtOutCoords();\n ${activation2}\n }`;\n } else if (hasLeakyReluAlpha) {\n activationSnippet = `vec4 activation(vec4 a) {\n vec4 b = getLeakyreluAlphaAtOutCoords();\n ${activation2}\n }`;\n } else {\n activationSnippet = `vec4 activation(vec4 x) {\n ${activation2}\n }`;\n }\n applyActivationSnippet = `result = activation(result);`;\n }\n const addBiasSnippet = addBias ? \"result += getBiasAtOutCoords();\" : \"\";\n if (addBias) {\n this.variableNames.push(\"bias\");\n }\n if (hasPreluActivation) {\n this.variableNames.push(\"preluActivationWeights\");\n }\n if (hasLeakyReluAlpha) {\n this.variableNames.push(\"leakyreluAlpha\");\n }\n this.userCode = `\n ${activationSnippet}\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords.x;\n ivec2 xRCCorner = coords.yz * strides - pads;\n int d2 = coords.w;\n int xRCorner = xRCCorner.x;\n int xCCorner = xRCCorner.y;\n\n //intialize dotProd with a small epsilon seems to reduce GPU accuracy loss.\n vec4 dotProd = vec4(0.000000000000001);\n\n ${mainLoop}\n\n vec4 result = dotProd - vec4(0.000000000000001);\n ${addBiasSnippet}\n ${applyActivationSnippet}\n setOutput(result);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/im2col_packed_gpu.js\nvar Im2ColPackedProgram = class {\n constructor(outputShape, convInfo) {\n this.variableNames = [\"A\"];\n this.packedInputs = true;\n this.packedOutput = true;\n this.customUniforms = [\n { name: \"inputShape\", type: \"ivec4\" },\n { name: \"pad\", type: \"ivec2\" },\n { name: \"stride\", type: \"ivec2\" },\n { name: \"dilation\", type: \"ivec2\" },\n { name: \"inChannels\", type: \"int\" },\n { name: \"itemsPerBlockRow\", type: \"int\" },\n { name: \"outWidth\", type: \"int\" }\n ];\n this.outputShape = outputShape;\n this.enableShapeUniforms = useShapeUniforms(this.outputShape.length);\n const { dataFormat } = convInfo;\n const glsl = getGlslDifferences();\n const isChannelsLast = dataFormat === \"channelsLast\";\n const rowDim = isChannelsLast ? 1 : 2;\n const colDim = isChannelsLast ? 2 : 3;\n const boundsCheckingSnippet = this.enableShapeUniforms ? \"if(blockIndex < outShape[2] && pos < outShape[1]) {\" : `if(blockIndex < ${outputShape[2]} && pos < ${outputShape[1]}) {`;\n let unrolled = ``;\n for (let row = 0; row <= 1; row++) {\n for (let col = 0; col <= 1; col++) {\n unrolled += `\n blockIndex = rc.z + ${col};\n pos = rc.y + ${row};\n\n ${boundsCheckingSnippet}\n offsetY = int(blockIndex / outWidth) * stride[0] - pad[0];\n d0 = offsetY + dilation[0] * (pos / itemsPerBlockRow);\n\n if(d0 < inputShape[${rowDim}] && d0 >= 0) {\n // Use custom imod instead mod. On Intel GPU, mod may generate\n // unexpected value.\n // https://github.com/tensorflow/tfjs/issues/5447\n offsetX = imod(blockIndex, outWidth) * stride[1] - pad[1];\n d1 = offsetX + dilation[1] * (imod(pos, itemsPerBlockRow) /\n inChannels);\n\n if(d1 < inputShape[${colDim}] && d1 >= 0) {\n\n ch = imod(pos, inChannels);\n\n if (${isChannelsLast}) {\n innerDims = vec2(d1, ch);\n result[${row * 2 + col}] = getChannel(\n getA(rc.x, d0, int(innerDims.x),\n int(innerDims.y)), innerDims);\n } else {\n innerDims = vec2(d0, d1);\n result[${row * 2 + col}] = getChannel(\n getA(rc.x, ch, int(innerDims.x),\n int(innerDims.y)), innerDims);\n }\n }\n }\n }\n `;\n }\n }\n this.userCode = `\n void main() {\n ivec3 rc = getOutputCoords();\n\n vec4 result = vec4(0);\n\n int blockIndex, pos, offsetY, d0, offsetX, d1, ch;\n vec2 innerDims;\n\n ${unrolled}\n\n ${glsl.output} = result;\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Conv2D_impl.js\nfunction getShapeForBatchMatMul(shape, isChannelsLast) {\n const length = shape.length;\n if (length >= 3) {\n return isChannelsLast ? [\n ...shape.slice(0, -3),\n shape[length - 3] * shape[length - 2],\n shape[length - 1]\n ] : [\n ...shape.slice(0, -3),\n shape[length - 3],\n shape[length - 2] * shape[length - 1]\n ];\n } else if (!isChannelsLast && length === 1 && shape[0] > 1) {\n return [shape[0], 1];\n } else {\n return null;\n }\n}\nfunction conv2dByMatMul({ x, filter, convInfo, backend: backend2, bias = null, preluActivationWeights = null, leakyreluAlpha = 0, activation: activation2 = null }) {\n const xShape = x.shape;\n const xTexData = backend2.texData.get(x.dataId);\n const sharedMatMulDim = convInfo.inChannels;\n const outerShapeX = xShape[0] * xShape[1] * xShape[2];\n const outerShapeFilter = convInfo.outChannels;\n const isChannelsLast = convInfo.dataFormat === \"channelsLast\";\n const transposeA = false;\n const transposeB = false;\n let out;\n const intermediates = [];\n if (preluActivationWeights != null) {\n const targetShape = getShapeForBatchMatMul(preluActivationWeights.shape, isChannelsLast);\n if (targetShape != null) {\n preluActivationWeights = reshape4({\n inputs: { x: preluActivationWeights },\n backend: backend2,\n attrs: { shape: targetShape }\n });\n intermediates.push(preluActivationWeights);\n }\n }\n if (bias != null) {\n const targetShape = getShapeForBatchMatMul(bias.shape, isChannelsLast);\n if (targetShape != null) {\n bias = reshape4({ inputs: { x: bias }, backend: backend2, attrs: { shape: targetShape } });\n intermediates.push(bias);\n }\n }\n const batchMatMulWillBeUnpacked = (outerShapeX === 1 || outerShapeFilter === 1) && sharedMatMulDim > MATMUL_SHARED_DIM_THRESHOLD;\n const canOptimize = !batchMatMulWillBeUnpacked && xTexData.isPacked && isChannelsLast && xTexData.texture != null && xShape[2] % 2 !== 0 && util_exports.arraysEqual(xTexData.shape.slice(-3), xShape.slice(-3));\n if (canOptimize) {\n const targetShape = xShape[0] * xShape[1] * (xShape[2] + 1);\n const xReshaped = {\n dataId: x.dataId,\n shape: [1, targetShape, convInfo.inChannels],\n dtype: x.dtype\n };\n const originalXTexDataShape = xTexData.shape;\n xTexData.shape = xTexData.shape.slice();\n xTexData.shape[xTexData.shape.length - 2]++;\n util_exports.assert(isReshapeFree(xTexData.shape, xReshaped.shape), () => `packed reshape ${xTexData.shape} to ${xReshaped.shape} isn't free`);\n const filterReshaped = reshape4({\n inputs: { x: filter },\n backend: backend2,\n attrs: { shape: [1, convInfo.inChannels, convInfo.outChannels] }\n });\n intermediates.push(filterReshaped);\n const pointwiseConv = batchMatMulImpl({\n a: xReshaped,\n b: filterReshaped,\n backend: backend2,\n transposeA,\n transposeB,\n bias,\n activation: activation2,\n preluActivationWeights,\n leakyreluAlpha\n });\n const pointwiseConvTexData = backend2.texData.get(pointwiseConv.dataId);\n util_exports.assert(pointwiseConvTexData.isPacked, () => \"batchMatMul result is expected to be packed\");\n xTexData.shape = originalXTexDataShape;\n pointwiseConvTexData.shape = convInfo.outShape;\n out = identity3({ inputs: { x: pointwiseConv }, backend: backend2 });\n out.shape = convInfo.outShape;\n intermediates.push(pointwiseConv);\n } else {\n const numCols = convInfo.outHeight * convInfo.outWidth;\n const xReshaped = reshape4({\n inputs: { x },\n backend: backend2,\n attrs: {\n shape: isChannelsLast ? [convInfo.batchSize, numCols, convInfo.inChannels] : [convInfo.batchSize, convInfo.inChannels, numCols]\n }\n });\n const filterReshaped = reshape4({\n inputs: { x: filter },\n backend: backend2,\n attrs: { shape: [1, convInfo.inChannels, convInfo.outChannels] }\n });\n const result = batchMatMulImpl({\n a: isChannelsLast ? xReshaped : filterReshaped,\n b: isChannelsLast ? filterReshaped : xReshaped,\n transposeA: !isChannelsLast,\n transposeB,\n backend: backend2,\n bias,\n activation: activation2,\n preluActivationWeights,\n leakyreluAlpha\n });\n out = reshape4({ inputs: { x: result }, backend: backend2, attrs: { shape: convInfo.outShape } });\n intermediates.push(xReshaped);\n intermediates.push(filterReshaped);\n intermediates.push(result);\n }\n for (const i2 of intermediates) {\n backend2.disposeIntermediateTensorInfo(i2);\n }\n return out;\n}\nfunction conv2dWithIm2Row({ x, filter, convInfo, backend: backend2, bias = null, preluActivationWeights = null, leakyreluAlpha = 0, activation: activation2 = null }) {\n const { filterWidth, filterHeight, inChannels, outWidth, outHeight, dataFormat } = convInfo;\n const isChannelsLast = dataFormat === \"channelsLast\";\n const sharedDim = filterWidth * filterHeight * inChannels;\n const numCols = outHeight * outWidth;\n const x2ColShape = [convInfo.batchSize, sharedDim, numCols];\n const transposeA = true;\n const transposeB = false;\n const intermediates = [];\n if (preluActivationWeights != null) {\n const targetShape = getShapeForBatchMatMul(preluActivationWeights.shape, isChannelsLast);\n if (targetShape != null) {\n preluActivationWeights = reshape4({\n inputs: { x: preluActivationWeights },\n backend: backend2,\n attrs: { shape: targetShape }\n });\n intermediates.push(preluActivationWeights);\n }\n }\n if (bias != null) {\n const targetShape = getShapeForBatchMatMul(bias.shape, isChannelsLast);\n if (targetShape != null) {\n bias = reshape4({ inputs: { x: bias }, backend: backend2, attrs: { shape: targetShape } });\n intermediates.push(bias);\n }\n }\n const w2Row = reshape4({\n inputs: { x: filter },\n backend: backend2,\n attrs: { shape: [1, sharedDim, util_exports.sizeFromShape(filter.shape) / sharedDim] }\n });\n intermediates.push(w2Row);\n const im2ColProgram = new Im2ColPackedProgram(x2ColShape, convInfo);\n const customValues = [\n x.shape,\n [convInfo.padInfo.top, convInfo.padInfo.left],\n [convInfo.strideHeight, convInfo.strideWidth],\n [convInfo.dilationHeight, convInfo.dilationWidth],\n [convInfo.inChannels],\n [convInfo.filterWidth * convInfo.inChannels],\n [convInfo.outWidth]\n ];\n const im2Col = backend2.runWebGLProgram(im2ColProgram, [x], \"float32\", customValues);\n const im2ColReshaped = reshape4({ inputs: { x: im2Col }, backend: backend2, attrs: { shape: x2ColShape } });\n intermediates.push(im2Col);\n intermediates.push(im2ColReshaped);\n const hasBias = bias != null;\n const hasPreluActivationWeights = preluActivationWeights != null;\n const hasLeakyreluAlpha = activation2 === \"leakyrelu\";\n const fusedActivation = activation2 ? mapActivationToShaderProgram(activation2, true) : null;\n const matmulProgram = new MatMulPackedProgram(isChannelsLast ? im2ColReshaped.shape : w2Row.shape, isChannelsLast ? w2Row.shape : im2ColReshaped.shape, isChannelsLast ? [convInfo.batchSize, numCols, convInfo.outChannels] : [convInfo.batchSize, convInfo.outChannels, numCols], transposeA, transposeB, hasBias, fusedActivation, hasPreluActivationWeights, hasLeakyreluAlpha);\n const inputs = isChannelsLast ? [im2ColReshaped, w2Row] : [w2Row, im2ColReshaped];\n if (bias) {\n inputs.push(bias);\n }\n if (hasPreluActivationWeights) {\n inputs.push(preluActivationWeights);\n }\n if (hasLeakyreluAlpha) {\n const $leakyreluAlpha = backend2.makeTensorInfo([], \"float32\", util_exports.createScalarValue(leakyreluAlpha, \"float32\"));\n inputs.push($leakyreluAlpha);\n intermediates.push($leakyreluAlpha);\n }\n const product = backend2.runWebGLProgram(matmulProgram, inputs, \"float32\");\n const out = reshape4({ inputs: { x: product }, backend: backend2, attrs: { shape: convInfo.outShape } });\n intermediates.push(product);\n for (const i2 of intermediates) {\n backend2.disposeIntermediateTensorInfo(i2);\n }\n return out;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Conv2D.js\nfunction conv2d4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, filter } = inputs;\n const { strides, pad: pad3, dataFormat, dilations, dimRoundingMode } = attrs;\n const $dataFormat = backend_util_exports.convertConv2DDataFormat(dataFormat);\n const convInfo = backend_util_exports.computeConv2DInfo(x.shape, filter.shape, strides, dilations, pad3, dimRoundingMode, false, $dataFormat);\n let out;\n if (convInfo.filterHeight === 1 && convInfo.filterWidth === 1 && convInfo.dilationHeight === 1 && convInfo.dilationWidth === 1 && convInfo.strideHeight === 1 && convInfo.strideWidth === 1 && (convInfo.padInfo.type === \"SAME\" || convInfo.padInfo.type === \"VALID\")) {\n out = conv2dByMatMul({ x, filter, convInfo, backend: backend2 });\n } else if (convInfo.strideWidth <= 2 && $dataFormat === \"channelsLast\" && env().getBool(\"WEBGL_EXP_CONV\")) {\n const program = new Conv2DPackedProgram(convInfo);\n const customValues = [\n [convInfo.padInfo.top, convInfo.padInfo.left],\n [convInfo.strideHeight, convInfo.strideWidth],\n [convInfo.dilationHeight, convInfo.dilationWidth],\n [convInfo.inHeight, convInfo.inWidth]\n ];\n out = backend2.runWebGLProgram(program, [x, filter], \"float32\", customValues);\n } else if (env().getBool(\"WEBGL_CONV_IM2COL\")) {\n out = conv2dWithIm2Row({ x, filter, convInfo, backend: backend2 });\n } else {\n const program = new Conv2DProgram(convInfo);\n out = backend2.runWebGLProgram(program, [x, filter], \"float32\");\n }\n const outReshaped = reshape4({ inputs: { x: out }, backend: backend2, attrs: { shape: convInfo.outShape } });\n backend2.disposeIntermediateTensorInfo(out);\n return outReshaped;\n}\nvar conv2DConfig2 = {\n kernelName: Conv2D,\n backendName: \"webgl\",\n kernelFunc: conv2d4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/conv_backprop_gpu.js\nvar Conv2DDerFilterProgram = class {\n constructor(convInfo) {\n this.variableNames = [\"x\", \"dy\"];\n this.outputShape = convInfo.filterShape;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const padTop = convInfo.padInfo.top;\n const padLeft = convInfo.padInfo.left;\n const isChannelsLast = convInfo.dataFormat === \"channelsLast\";\n this.userCode = `\n void main() {\n ivec4 coords = getOutputCoords();\n int wR = coords.x;\n int wC = coords.y;\n int d1 = coords.z;\n int d2 = coords.w;\n\n // Convolve x(?, ?, d1) with dy(:, :, d2) to get dw(wR, wC, d1, d2).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n\n for (int b = 0; b < ${convInfo.batchSize}; b++) {\n for (int yR = 0; yR < ${convInfo.outHeight}; yR++) {\n int xR = wR + yR * ${strideHeight} - ${padTop};\n\n if (xR < 0 || xR >= ${convInfo.inHeight}) {\n continue;\n }\n\n for (int yC = 0; yC < ${convInfo.outWidth}; yC++) {\n int xC = wC + yC * ${strideWidth} - ${padLeft};\n\n if (xC < 0 || xC >= ${convInfo.inWidth}) {\n continue;\n }\n\n if (${isChannelsLast}) {\n float dyValue = getDy(b, yR, yC, d2);\n float xValue = getX(b, xR, xC, d1);\n dotProd += (xValue * dyValue);\n } else {\n float dyValue = getDy(b, d2, yR, yC);\n float xValue = getX(b, d1, xR, xC);\n dotProd += (xValue * dyValue);\n }\n\n }\n }\n }\n setOutput(dotProd);\n }\n `;\n }\n};\nvar Conv2DDerInputProgram = class {\n constructor(convInfo) {\n this.variableNames = [\"dy\", \"W\"];\n this.outputShape = convInfo.inShape;\n const filterHeight = convInfo.filterHeight;\n const filterWidth = convInfo.filterWidth;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const isChannelsLast = convInfo.dataFormat === \"channelsLast\";\n const padTop = filterHeight - 1 - convInfo.padInfo.top;\n const padLeft = filterWidth - 1 - convInfo.padInfo.left;\n const rowDim = isChannelsLast ? 1 : 2;\n const colDim = isChannelsLast ? 2 : 3;\n const channelDim = isChannelsLast ? 3 : 1;\n this.userCode = `\n const ivec2 pads = ivec2(${padTop}, ${padLeft});\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d1 = coords[${channelDim}];\n\n ivec2 dyCorner = ivec2(coords[${rowDim}], coords[${colDim}]) - pads;\n int dyRCorner = dyCorner.x;\n int dyCCorner = dyCorner.y;\n\n // Convolve dy(?, ?, d2) with w(:, :, d1, d2) to compute dx(xR, xC, d1).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n for (int wR = 0; wR < ${filterHeight}; wR++) {\n float dyR = float(dyRCorner + wR) / ${strideHeight}.0;\n\n if (dyR < 0.0 || dyR >= ${convInfo.outHeight}.0 || fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n int wRPerm = ${filterHeight} - 1 - wR;\n\n for (int wC = 0; wC < ${filterWidth}; wC++) {\n float dyC = float(dyCCorner + wC) / ${strideWidth}.0;\n\n if (dyC < 0.0 || dyC >= ${convInfo.outWidth}.0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n int wCPerm = ${filterWidth} - 1 - wC;\n\n for (int d2 = 0; d2 < ${convInfo.outChannels}; d2++) {\n\n if (${isChannelsLast}) {\n float xValue = getDy(batch, idyR, idyC, d2);\n float wValue = getW(wRPerm, wCPerm, d1, d2);\n dotProd += xValue * wValue;\n } else {\n float xValue = getDy(batch, d2, idyR, idyC);\n float wValue = getW(wRPerm, wCPerm, d1, d2);\n dotProd += xValue * wValue;\n }\n\n }\n }\n }\n setOutput(dotProd);\n }\n `;\n }\n};\nvar Conv3DDerFilterProgram = class {\n constructor(convInfo) {\n this.variableNames = [\"x\", \"dy\"];\n this.outputShape = convInfo.filterShape;\n const strideDepth = convInfo.strideDepth;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const padFront = convInfo.padInfo.front;\n const padTop = convInfo.padInfo.top;\n const padLeft = convInfo.padInfo.left;\n this.userCode = `\n void main() {\n ivec5 coords = getOutputCoords();\n int wF = coords.x;\n int wR = coords.y;\n int wC = coords.z;\n int d1 = coords.w;\n int d2 = coords.u;\n\n float dotProd = 0.0;\n\n for (int b = 0; b < ${convInfo.batchSize}; b++) {\n for (int yF = 0; yF < ${convInfo.outDepth}; yF++) {\n int xF = wF + yF * ${strideDepth} - ${padFront};\n\n if (xF < 0 || xF >= ${convInfo.inDepth}) {\n continue;\n }\n\n for (int yR = 0; yR < ${convInfo.outHeight}; yR++) {\n int xR = wR + yR * ${strideHeight} - ${padTop};\n\n if (xR < 0 || xR >= ${convInfo.inHeight}) {\n continue;\n }\n\n for (int yC = 0; yC < ${convInfo.outWidth}; yC++) {\n int xC = wC + yC * ${strideWidth} - ${padLeft};\n\n if (xC < 0 || xC >= ${convInfo.inWidth}) {\n continue;\n }\n\n float dyValue = getDy(b, yF, yR, yC, d2);\n float xValue = getX(b, xF, xR, xC, d1);\n dotProd += (xValue * dyValue);\n }\n }\n }\n }\n setOutput(dotProd);\n }\n `;\n }\n};\nvar Conv3DDerInputProgram = class {\n constructor(convInfo) {\n this.variableNames = [\"dy\", \"W\"];\n this.outputShape = convInfo.inShape;\n const filterDepth = convInfo.filterDepth;\n const filterHeight = convInfo.filterHeight;\n const filterWidth = convInfo.filterWidth;\n const strideDepth = convInfo.strideDepth;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const padFront = filterDepth - 1 - convInfo.padInfo.front;\n const padTop = filterHeight - 1 - convInfo.padInfo.top;\n const padLeft = filterWidth - 1 - convInfo.padInfo.left;\n this.userCode = `\n const ivec3 pads = ivec3(${padFront}, ${padTop}, ${padLeft});\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int d1 = coords.u;\n\n\n ivec3 dyCorner = ivec3(coords.y, coords.z, coords.w) - pads;\n int dyFCorner = dyCorner.x;\n int dyRCorner = dyCorner.y;\n int dyCCorner = dyCorner.z;\n\n float dotProd = 0.0;\n for (int wF = 0; wF < ${filterDepth}; wF++) {\n float dyF = float(dyFCorner + wF) / ${strideDepth}.0;\n\n if (dyF < 0.0 || dyF >= ${convInfo.outDepth}.0 || fract(dyF) > 0.0) {\n continue;\n }\n int idyF = int(dyF);\n\n int wFPerm = ${filterDepth} - 1 - wF;\n\n for (int wR = 0; wR < ${filterHeight}; wR++) {\n float dyR = float(dyRCorner + wR) / ${strideHeight}.0;\n\n if (dyR < 0.0 || dyR >= ${convInfo.outHeight}.0 ||\n fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n int wRPerm = ${filterHeight} - 1 - wR;\n\n for (int wC = 0; wC < ${filterWidth}; wC++) {\n float dyC = float(dyCCorner + wC) / ${strideWidth}.0;\n\n if (dyC < 0.0 || dyC >= ${convInfo.outWidth}.0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n int wCPerm = ${filterWidth} - 1 - wC;\n\n for (int d2 = 0; d2 < ${convInfo.outChannels}; d2++) {\n float xValue = getDy(batch, idyF, idyR, idyC, d2);\n float wValue = getW(wFPerm, wRPerm, wCPerm, d1, d2);\n dotProd += xValue * wValue;\n }\n }\n }\n }\n setOutput(dotProd);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Conv2DBackpropFilter.js\nfunction conv2DBackpropFilter3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, dy } = inputs;\n const { strides, pad: pad3, dataFormat, dimRoundingMode, filterShape } = attrs;\n const $dataFormat = backend_util_exports.convertConv2DDataFormat(dataFormat);\n const convInfo = backend_util_exports.computeConv2DInfo(x.shape, filterShape, strides, 1, pad3, dimRoundingMode, false, $dataFormat);\n const program = new Conv2DDerFilterProgram(convInfo);\n return backend2.runWebGLProgram(program, [x, dy], \"float32\");\n}\nvar conv2DBackpropFilterConfig2 = {\n kernelName: Conv2DBackpropFilter,\n backendName: \"webgl\",\n kernelFunc: conv2DBackpropFilter3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Conv2DBackpropInput.js\nfunction conv2DBackpropInput3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { dy, filter } = inputs;\n const { inputShape, strides, pad: pad3, dataFormat, dimRoundingMode } = attrs;\n const $dataFormat = backend_util_exports.convertConv2DDataFormat(dataFormat);\n const convInfo = backend_util_exports.computeConv2DInfo(inputShape, filter.shape, strides, 1, pad3, dimRoundingMode, false, $dataFormat);\n const program = new Conv2DDerInputProgram(convInfo);\n return backend2.runWebGLProgram(program, [dy, filter], \"float32\");\n}\nvar conv2DBackpropInputConfig2 = {\n kernelName: Conv2DBackpropInput,\n backendName: \"webgl\",\n kernelFunc: conv2DBackpropInput3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Conv3D.js\nfunction conv3D2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, filter } = inputs;\n const { strides, pad: pad3, dilations } = attrs;\n const convInfo = backend_util_exports.computeConv3DInfo(x.shape, filter.shape, strides, dilations, pad3);\n const program = new Conv3DProgram(convInfo);\n return backend2.runWebGLProgram(program, [x, filter], \"float32\");\n}\nvar conv3DConfig2 = {\n kernelName: Conv3D,\n backendName: \"webgl\",\n kernelFunc: conv3D2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Conv3DBackpropFilterV2.js\nfunction conv3DBackpropFilterV22(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, dy } = inputs;\n const { strides, pad: pad3, filterShape } = attrs;\n const convInfo = backend_util_exports.computeConv3DInfo(x.shape, filterShape, strides, 1, pad3);\n const program = new Conv3DDerFilterProgram(convInfo);\n return backend2.runWebGLProgram(program, [x, dy], \"float32\");\n}\nvar conv3DBackpropFilterV2Config2 = {\n kernelName: Conv3DBackpropFilterV2,\n backendName: \"webgl\",\n kernelFunc: conv3DBackpropFilterV22\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Conv3DBackpropInputV2.js\nfunction conv3DBackpropInput2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { dy, filter } = inputs;\n const { pad: pad3, strides, inputShape } = attrs;\n const convInfo = backend_util_exports.computeConv3DInfo(inputShape, filter.shape, strides, 1, pad3);\n const program = new Conv3DDerInputProgram(convInfo);\n return backend2.runWebGLProgram(program, [dy, filter], \"float32\");\n}\nvar conv3DBackpropInputConfig = {\n kernelName: Conv3DBackpropInputV2,\n backendName: \"webgl\",\n kernelFunc: conv3DBackpropInput2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Cos.js\nvar COS = CHECK_NAN_SNIPPET_UNARY + `\n return cos(x);\n`;\nvar cos3 = unaryKernelFunc2({ opSnippet: COS });\nvar cosConfig2 = {\n kernelName: Cos,\n backendName: \"webgl\",\n kernelFunc: cos3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Cosh.js\nvar COSH = `\n float e2x = exp(-x);\n return (e2x + 1.0 / e2x) / 2.0;\n`;\nvar cosh3 = unaryKernelFunc2({ opSnippet: COSH });\nvar coshConfig2 = {\n kernelName: Cosh,\n backendName: \"webgl\",\n kernelFunc: cosh3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/crop_and_resize_gpu.js\nvar CropAndResizeProgram = class {\n constructor(imageShape, boxShape, cropSize, method, extrapolationValue) {\n this.variableNames = [\"Image\", \"Boxes\", \"BoxInd\"];\n this.outputShape = [];\n const [batch, imageHeight, imageWidth, depth] = imageShape;\n const [numBoxes] = boxShape;\n const [cropHeight, cropWidth] = cropSize;\n this.outputShape = [numBoxes, cropHeight, cropWidth, depth];\n const methodId = method === \"bilinear\" ? 1 : 0;\n const [inputHeightFloat, inputWidthFloat] = [`${imageHeight - 1}.0`, `${imageWidth - 1}.0`];\n const [heightRatio, heightScale, inY] = cropHeight > 1 ? [\n `${(imageHeight - 1) / (cropHeight - 1)}`,\n \"(y2-y1) * height_ratio\",\n `y1*${inputHeightFloat} + float(y)*(height_scale)`\n ] : [\n \"0.0\",\n \"0.0\",\n `0.5 * (y1+y2) * ${inputHeightFloat}`\n ];\n const [widthRatio, widthScale, inX] = cropWidth > 1 ? [\n `${(imageWidth - 1) / (cropWidth - 1)}`,\n \"(x2-x1) * width_ratio\",\n `x1*${inputWidthFloat} + float(x)*(width_scale)`\n ] : [\n \"0.0\",\n \"0.0\",\n `0.5 * (x1+x2) * ${inputWidthFloat}`\n ];\n this.userCode = `\n const float height_ratio = float(${heightRatio});\n const float width_ratio = float(${widthRatio});\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int y = coords[1];\n int x = coords[2];\n int d = coords[3];\n\n // get box vals\n float y1 = getBoxes(b,0);\n float x1 = getBoxes(b,1);\n float y2 = getBoxes(b,2);\n float x2 = getBoxes(b,3);\n\n // get image in batch index\n int bInd = round(getBoxInd(b));\n if(bInd < 0 || bInd >= ${batch}) {\n return;\n }\n\n float height_scale = ${heightScale};\n float width_scale = ${widthScale};\n\n float in_y = ${inY};\n if( in_y < 0.0 || in_y > ${inputHeightFloat} ) {\n setOutput(float(${extrapolationValue}));\n return;\n }\n float in_x = ${inX};\n if( in_x < 0.0 || in_x > ${inputWidthFloat} ) {\n setOutput(float(${extrapolationValue}));\n return;\n }\n\n vec2 sourceFracIndexCR = vec2(in_x,in_y);\n if(${methodId} == 1) {\n // Compute the four integer indices.\n ivec2 sourceFloorCR = ivec2(sourceFracIndexCR);\n ivec2 sourceCeilCR = ivec2(ceil(sourceFracIndexCR));\n\n float topLeft = getImage(b, sourceFloorCR.y, sourceFloorCR.x, d);\n float bottomLeft = getImage(b, sourceCeilCR.y, sourceFloorCR.x, d);\n float topRight = getImage(b, sourceFloorCR.y, sourceCeilCR.x, d);\n float bottomRight = getImage(b, sourceCeilCR.y, sourceCeilCR.x, d);\n\n vec2 fracCR = sourceFracIndexCR - vec2(sourceFloorCR);\n\n float top = topLeft + (topRight - topLeft) * fracCR.x;\n float bottom = bottomLeft + (bottomRight - bottomLeft) * fracCR.x;\n float newValue = top + (bottom - top) * fracCR.y;\n setOutput(newValue);\n } else {\n // Compute the coordinators of nearest neighbor point.\n ivec2 sourceNearestCR = ivec2(floor(\n sourceFracIndexCR + vec2(0.5,0.5)));\n float newValue = getImage(b, sourceNearestCR.y, sourceNearestCR.x, d);\n setOutput(newValue);\n }\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/CropAndResize.js\nvar cropAndResize3 = (args) => {\n const { inputs, backend: backend2, attrs } = args;\n const { image: image2, boxes, boxInd } = inputs;\n const { cropSize, method, extrapolationValue } = attrs;\n const program = new CropAndResizeProgram(image2.shape, boxes.shape, cropSize, method, extrapolationValue);\n return backend2.runWebGLProgram(program, [image2, boxes, boxInd], \"float32\");\n};\nvar cropAndResizeConfig2 = {\n kernelName: CropAndResize,\n backendName: \"webgl\",\n kernelFunc: cropAndResize3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/cum_gpu.js\nvar CumOpType;\n(function(CumOpType3) {\n CumOpType3[\"Prod\"] = \"*\";\n CumOpType3[\"Sum\"] = \"+\";\n})(CumOpType || (CumOpType = {}));\nvar CumProgram = class {\n constructor(op2, outputShape, exclusive, reverse5) {\n this.op = op2;\n this.outputShape = outputShape;\n this.variableNames = [\"x\"];\n this.customUniforms = [{ name: \"index\", type: \"float\" }];\n const rank = this.outputShape.length;\n const initVal = this.op === CumOpType.Prod ? \"1.0\" : \"0.0\";\n const val = exclusive ? initVal : `getX(${getCoords2(rank, \"coords\", this.op)})`;\n const length = this.outputShape[this.outputShape.length - 1];\n let condition = \"\";\n let idxString = \"\";\n if (exclusive) {\n condition = reverse5 ? `end != ${length - 1}` : \"end != 0\";\n idxString = reverse5 ? \"end + 1\" : \"end - 1\";\n } else {\n condition = reverse5 ? `end + pow2 < ${length}` : \"end >= pow2\";\n idxString = reverse5 ? \"end + pow2\" : \"end - pow2\";\n }\n this.userCode = `\n void main() {\n ${getCoordsDataType(rank)} coords = getOutputCoords();\n int end = ${getFinalCoord(rank, \"coords\", this.op)};\n float val = ${val};\n int pow2 = int(pow(2.0, index));\n if (${condition}) {\n int idx = ${idxString};\n ${getFinalCoord(rank, \"coords\", this.op)} = idx;\n val ${this.op}= getX(${getCoords2(rank, \"coords\", this.op)});\n }\n setOutput(val);\n }\n `;\n }\n};\nfunction getCoords2(rank, name, op2) {\n if (rank === 1) {\n return `${name}`;\n } else if (rank === 2) {\n return `${name}.x, ${name}.y`;\n } else if (rank === 3) {\n return `${name}.x, ${name}.y, ${name}.z`;\n } else if (rank === 4) {\n return `${name}.x, ${name}.y, ${name}.z, ${name}.w`;\n } else {\n throw new Error(`Cumulative ${op2} for rank ${rank} is not yet supported`);\n }\n}\nfunction getFinalCoord(rank, name, op2) {\n if (rank === 1) {\n return `${name}`;\n } else if (rank === 2) {\n return `${name}.y`;\n } else if (rank === 3) {\n return `${name}.z`;\n } else if (rank === 4) {\n return `${name}.w`;\n } else {\n throw new Error(`Cumulative ${op2} for rank ${rank} is not yet supported`);\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Cum_impl.js\nfunction cumImpl(op2, x, backend2, axis, exclusive, reverse5) {\n const xRank = x.shape.length;\n const permutation = backend_util_exports.getAxesPermutation([axis], xRank);\n let permutedX = x;\n if (permutation != null) {\n permutedX = transpose3({ inputs: { x }, backend: backend2, attrs: { perm: permutation } });\n }\n const permutedAxis = backend_util_exports.getInnerMostAxes(1, xRank)[0];\n if (permutedAxis !== xRank - 1) {\n throw new Error(`WebGL cumprod shader expects an inner-most axis=${x.shape.length - 1} but got axis=${axis}`);\n }\n const size = permutedX.shape[permutedAxis];\n let result = identity3({ inputs: { x: permutedX }, backend: backend2 });\n for (let i2 = 0; i2 <= Math.ceil(Math.log2(size)) - 1; i2++) {\n const program = new CumProgram(op2, permutedX.shape, false, reverse5);\n const customValues = [[i2]];\n const prevResult = result;\n result = backend2.runWebGLProgram(program, [result], result.dtype, customValues);\n backend2.disposeIntermediateTensorInfo(prevResult);\n }\n if (exclusive) {\n const program = new CumProgram(op2, permutedX.shape, exclusive, reverse5);\n const prevResult = result;\n result = backend2.runWebGLProgram(program, [result], result.dtype);\n backend2.disposeIntermediateTensorInfo(prevResult);\n }\n if (permutation != null) {\n const reversePermutation = backend_util_exports.getUndoAxesPermutation(permutation);\n const reverseTransposedResult = transpose3({ inputs: { x: result }, backend: backend2, attrs: { perm: reversePermutation } });\n backend2.disposeIntermediateTensorInfo(result);\n backend2.disposeIntermediateTensorInfo(permutedX);\n return reverseTransposedResult;\n }\n return result;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Cumprod.js\nfunction cumprod3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis, exclusive, reverse: reverse5 } = attrs;\n return cumImpl(CumOpType.Prod, x, backend2, axis, exclusive, reverse5);\n}\nvar cumprodConfig2 = {\n kernelName: Cumprod,\n backendName: \"webgl\",\n kernelFunc: cumprod3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Cumsum.js\nfunction cumsum3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis, exclusive, reverse: reverse5 } = attrs;\n return cumImpl(CumOpType.Sum, x, backend2, axis, exclusive, reverse5);\n}\nvar cumsumConfig2 = {\n kernelName: Cumsum,\n backendName: \"webgl\",\n kernelFunc: cumsum3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/DenseBincount.js\nfunction denseBincount3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, weights } = inputs;\n const { size, binaryOutput } = attrs;\n if (x.shape.length === 1) {\n const xVals = backend2.readSync(x.dataId);\n const weightsVals = backend2.readSync(weights.dataId);\n const outVals = bincountImplCPU(xVals, weightsVals, weights.dtype, weights.shape, size);\n return backend2.makeTensorInfo([size], weights.dtype, outVals);\n } else if (x.shape.length === 2) {\n const xBuf = backend2.bufferSync(x);\n const weightsBuf = backend2.bufferSync(weights);\n const outBuf = bincountReduceImplCPU(xBuf, weightsBuf, size, binaryOutput);\n return backend2.makeTensorInfo(outBuf.shape, weights.dtype, outBuf.values);\n }\n throw new Error(`Error in denseBincount: input must be at most rank 2, but got rank${x.shape.length}.`);\n}\nvar denseBincountConfig2 = {\n kernelName: DenseBincount,\n backendName: \"webgl\",\n kernelFunc: denseBincount3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/depth_to_space_gpu.js\nvar DepthToSpaceProgram = class {\n constructor(outputShape, blockSize, dataFormat) {\n this.variableNames = [\"x\"];\n this.outputShape = [];\n this.outputShape = outputShape;\n this.blockSize = blockSize;\n this.dataFormat = dataFormat;\n this.userCode = `\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int h = ${this.getHeightCoordString()};\n int w = ${this.getWidthCoordString()};\n int d = ${this.getDepthCoordString()};\n\n int in_h = h / ${blockSize};\n int offset_h = imod(h, ${blockSize});\n int in_w = w / ${blockSize};\n int offset_w = imod(w, ${blockSize});\n int offset_d = (offset_h * ${blockSize} + offset_w) *\n ${this.getOutputDepthSize()};\n int in_d = d + offset_d;\n\n float result = ${this.getInputSamplingString()};\n setOutput(result);\n }\n `;\n }\n getHeightCoordString() {\n if (this.dataFormat === \"NHWC\") {\n return `coords[1]`;\n } else {\n return `coords[2]`;\n }\n }\n getWidthCoordString() {\n if (this.dataFormat === \"NHWC\") {\n return `coords[2]`;\n } else {\n return `coords[3]`;\n }\n }\n getDepthCoordString() {\n if (this.dataFormat === \"NHWC\") {\n return `coords[3]`;\n } else {\n return `coords[1]`;\n }\n }\n getOutputDepthSize() {\n if (this.dataFormat === \"NHWC\") {\n return this.outputShape[3];\n } else {\n return this.outputShape[1];\n }\n }\n getInputSamplingString() {\n if (this.dataFormat === \"NHWC\") {\n return `getX(b, in_h, in_w, in_d)`;\n } else {\n return `getX(b, in_d, in_h, in_w)`;\n }\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/DepthToSpace.js\nfunction depthToSpace3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { blockSize, dataFormat } = attrs;\n const batchSize = x.shape[0];\n const inputHeight = dataFormat === \"NHWC\" ? x.shape[1] : x.shape[2];\n const inputWidth = dataFormat === \"NHWC\" ? x.shape[2] : x.shape[3];\n const inputDepth = dataFormat === \"NHWC\" ? x.shape[3] : x.shape[1];\n const outputHeight = inputHeight * blockSize;\n const outputWidth = inputWidth * blockSize;\n const outputDepth = inputDepth / (blockSize * blockSize);\n const outputShape = dataFormat === \"NHWC\" ? [batchSize, outputHeight, outputWidth, outputDepth] : [batchSize, outputDepth, outputHeight, outputWidth];\n const program = new DepthToSpaceProgram(outputShape, blockSize, dataFormat);\n return backend2.runWebGLProgram(program, [x], x.dtype);\n}\nvar depthToSpaceConfig2 = {\n kernelName: DepthToSpace,\n backendName: \"webgl\",\n kernelFunc: depthToSpace3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/conv_gpu_depthwise.js\nvar DepthwiseConv2DProgram = class {\n constructor(convInfo, addBias = false, activation2 = null, hasPreluActivation = false, hasLeakyReluAlpha = false) {\n this.variableNames = [\"x\", \"W\"];\n this.customUniforms = [\n { name: \"pads\", type: \"ivec2\" },\n { name: \"strides\", type: \"ivec2\" },\n { name: \"dilations\", type: \"ivec2\" },\n { name: \"inDims\", type: \"ivec2\" }\n ];\n this.outputShape = convInfo.outShape;\n this.enableShapeUniforms = useShapeUniforms(this.outputShape.length);\n const filterHeight = convInfo.filterHeight;\n const filterWidth = convInfo.filterWidth;\n const channelMul = convInfo.outChannels / convInfo.inChannels;\n let activationSnippet = \"\", applyActivationSnippet = \"\";\n if (activation2) {\n if (hasPreluActivation) {\n activationSnippet = `float activation(float a) {\n float b = getPreluActivationWeightsAtOutCoords();\n ${activation2}\n }`;\n } else if (hasLeakyReluAlpha) {\n activationSnippet = `float activation(float a) {\n float b = getLeakyreluAlphaAtOutCoords();\n ${activation2}\n }`;\n } else {\n activationSnippet = `\n float activation(float x) {\n ${activation2}\n }\n `;\n }\n applyActivationSnippet = `result = activation(result);`;\n }\n const addBiasSnippet = addBias ? \"result += getBiasAtOutCoords();\" : \"\";\n if (addBias) {\n this.variableNames.push(\"bias\");\n }\n if (hasPreluActivation) {\n this.variableNames.push(\"preluActivationWeights\");\n }\n if (hasLeakyReluAlpha) {\n this.variableNames.push(\"leakyreluAlpha\");\n }\n this.userCode = `\n ${activationSnippet}\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords.x;\n ivec2 xRCCorner = coords.yz * strides - pads;\n int d2 = coords.w;\n int d1 = d2 / ${channelMul};\n int q = d2 - d1 * ${channelMul};\n\n int xRCorner = xRCCorner.x;\n int xCCorner = xRCCorner.y;\n\n // Convolve x(?, ?, d1) with w(:, :, d1, q) to get y(yR, yC, d2).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n // TO DO(dsmilkov): Flatten the two for loops and vec4 the operations.\n for (int wR = 0; wR < ${filterHeight}; wR++) {\n int xR = xRCorner + wR * dilations[0];\n\n if (xR < 0 || xR >= inDims[0]) {\n continue;\n }\n\n for (int wC = 0; wC < ${filterWidth}; wC++) {\n int xC = xCCorner + wC * dilations[1];\n\n if (xC < 0 || xC >= inDims[1]) {\n continue;\n }\n\n float xVal = getX(batch, xR, xC, d1);\n float wVal = getW(wR, wC, d1, q);\n dotProd += xVal * wVal;\n }\n }\n\n float result = dotProd;\n ${addBiasSnippet}\n ${applyActivationSnippet}\n setOutput(result);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/conv_packed_gpu_depthwise.js\nvar DepthwiseConvPacked2DProgram = class {\n constructor(convInfo, addBias = false, activation2 = null, hasPreluActivation = false, hasLeakyReluAlpha = false) {\n this.variableNames = [\"x\", \"W\"];\n this.packedInputs = true;\n this.packedOutput = true;\n this.customUniforms = [\n { name: \"pads\", type: \"ivec2\" },\n { name: \"strides\", type: \"ivec2\" },\n { name: \"dilations\", type: \"ivec2\" },\n { name: \"inDims\", type: \"ivec2\" }\n ];\n this.outputShape = convInfo.outShape;\n this.enableShapeUniforms = useShapeUniforms(this.outputShape.length);\n const channelMul = convInfo.outChannels / convInfo.inChannels;\n const padLeft = convInfo.padInfo.left;\n const strideWidth = convInfo.strideWidth;\n const dilationWidth = convInfo.dilationWidth;\n const filterHeight = convInfo.filterHeight;\n const filterWidth = convInfo.filterWidth;\n const texelsAcross = filterWidth;\n let mainLoop = `\n int xR; int xC; int xCOffset;\n vec4 wTexel; vec4 previous; vec4 final;`;\n for (let c = 0; c < filterWidth; c++) {\n mainLoop += `\n vec4 xTexelC${c * 2};\n int xTexelC${c * 2}Ready;\n vec4 xTexelC${c * 2 + 1};\n int xTexelC${c * 2 + 1}Ready;\n vec4 xC${c};`;\n }\n mainLoop += `\n for (int r = 0; r < ${filterHeight}; r++) {\n `;\n for (let c = 0; c < filterWidth; c++) {\n mainLoop += `\n xTexelC${c * 2} = vec4(0.0);\n xTexelC${c * 2}Ready = 0;\n xTexelC${c * 2 + 1} = vec4(0.0);\n xTexelC${c * 2 + 1}Ready = 0;\n xC${c} = vec4(0.0);`;\n }\n mainLoop += `\n xR = xRCorner + r * dilations[0];\n if (xR >=0 && xR < inDims[0]) {\n `;\n for (let texelC = 0; texelC < (texelsAcross + 1) / 2; texelC++) {\n const colIndex = texelC * 2;\n mainLoop += `\n xC = xCCorner + ${colIndex * dilationWidth};\n `;\n if (strideWidth === 1) {\n if (colIndex < filterWidth) {\n if (padLeft % 2 === 1) {\n mainLoop += `\n xCOffset = xC + 1;\n if (xCOffset >= 0 && xCOffset < inDims[1] && xTexelC${colIndex}Ready == 0) {\n xTexelC${colIndex} = getX(batch, xR, xCOffset, d1);\n\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if (xCOffset + 1 >= inDims[1]) {\n xTexelC${colIndex}.zw = vec2(0.0);\n }\n xTexelC${colIndex}Ready = 1;\n }\n `;\n if (dilationWidth === 1 && colIndex > 0) {\n mainLoop += `\n xC${colIndex} = vec4(xTexelC${colIndex - 2}.zw, xTexelC${colIndex}.xy);\n `;\n } else {\n mainLoop += `\n xCOffset = xC + 1 - 2;\n\n if (xCOffset >= 0 && xCOffset < inDims[1]) {\n previous = getX(batch, xR, xCOffset, d1);\n\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if (xCOffset + 1 >= inDims[1]) {\n previous.zw = vec2(0.0);\n }\n\n xC${colIndex} = vec4(previous.zw, xTexelC${colIndex}.xy);\n } else {\n xC${colIndex} = vec4(0.0, 0.0, xTexelC${colIndex}.xy);\n }\n `;\n }\n } else {\n mainLoop += `\n if (xC >= 0 && xC < inDims[1] && xTexelC${colIndex}Ready == 0) {\n xTexelC${colIndex} = getX(batch, xR, xC, d1);\n if (xC + 1 >= inDims[1]) {\n xTexelC${colIndex}.zw = vec2(0.0);\n }\n xTexelC${colIndex}Ready = 1;\n }\n\n xC${colIndex} = xTexelC${colIndex};\n `;\n }\n if (colIndex + 1 < filterWidth) {\n const nextTexelOffset = padLeft % 2 === 0 ? util_exports.nearestLargerEven(dilationWidth) : dilationWidth;\n if (dilationWidth % 2 === 0 && padLeft % 2 === 1 || dilationWidth % 2 !== 0 && padLeft % 2 !== 1) {\n mainLoop += `\n xCOffset = xC + imod(pads[1], 2) + ${nextTexelOffset};\n\n if (xCOffset >= 0 && xCOffset < inDims[1] && xTexelC${colIndex + 1}Ready == 0) {\n xTexelC${colIndex + 1} = getX(batch, xR, xCOffset, d1);\n\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if (xCOffset + 1 >= inDims[1]) {\n xTexelC${colIndex + 1}.zw = vec2(0.0);\n }\n xTexelC${colIndex + 1}Ready = 1;\n }\n `;\n if (dilationWidth > 1) {\n mainLoop += `\n xCOffset -= 2;\n if (xCOffset >= 0 && xCOffset < inDims[1]) {\n previous = getX(batch, xR, xCOffset, d1);\n xC${colIndex + 1} = vec4(previous.zw, xTexelC${colIndex + 1}.xy);\n } else {\n xC${colIndex + 1} = vec4(0.0, 0.0, xTexelC${colIndex + 1}.xy);\n }\n `;\n } else {\n mainLoop += `\n xC${colIndex + 1} = vec4(xTexelC${colIndex}.zw, xTexelC${colIndex + 1}.xy);\n `;\n }\n } else {\n if (nextTexelOffset === 1) {\n mainLoop += `\n xC${colIndex + 1} = xTexelC${colIndex};\n `;\n } else {\n mainLoop += `\n xCOffset = xC + ${nextTexelOffset};\n\n if (xCOffset >= 0 && xCOffset < inDims[1] && xTexelC${colIndex + 1}Ready == 0) {\n xTexelC${colIndex + 1} = getX(batch, xR, xCOffset, d1);\n if (xCOffset + 1 >= inDims[1]) {\n xTexelC${colIndex + 1}.zw = vec2(0.0);\n }\n xTexelC${colIndex + 1}Ready = 1;\n }\n\n xC${colIndex + 1} = xTexelC${colIndex + 1};\n `;\n }\n }\n }\n }\n } else {\n if (colIndex < filterWidth) {\n if (padLeft % 2 === 1) {\n mainLoop += `\n xCOffset = xC + 1 - strides[1];\n if(xCOffset >= 0 && xCOffset < inDims[1] && xTexelC${colIndex}Ready == 0) {\n xTexelC${colIndex} = getX(batch, xR, xCOffset, d1);\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if (xCOffset + 1 >= inDims[1]) {\n xTexelC${colIndex}.zw = vec2(0.0);\n }\n xTexelC${colIndex}Ready = 1;\n }\n\n if(xC + 1 >= 0 && xC + 1 < inDims[1] && xTexelC${colIndex + 1}Ready == 0) {\n xTexelC${colIndex + 1} = getX(batch, xR, xC + 1, d1);\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if (xC + 2 >= inDims[1]) {\n xTexelC${colIndex + 1}.zw = vec2(0.0);\n }\n xTexelC${colIndex + 1}Ready = 1;\n }\n\n xC${colIndex} = vec4(xTexelC${colIndex}.zw, xTexelC${colIndex + 1}.zw);\n `;\n if (colIndex + 1 < filterWidth) {\n mainLoop += `\n final = vec4(0.0);\n xCOffset = xC + 1 + strides[1];\n if(xCOffset >= 0 && xCOffset < inDims[1]) {\n final = getX(batch, xR, xCOffset, d1);\n }\n xC${colIndex + 1} = vec4(xTexelC${colIndex + 1}.xy, final.xy);\n `;\n }\n } else {\n mainLoop += `\n if(xC >= 0 && xC < inDims[1] && xTexelC${colIndex}Ready == 0) {\n xTexelC${colIndex} = getX(batch, xR, xC, d1);\n if (xC + 1 >= inDims[1]) {\n xTexelC${colIndex}.zw = vec2(0.0);\n }\n xTexelC${colIndex}Ready = 1;\n }\n\n xCOffset = xC + strides[1];\n if(xCOffset >= 0 && xCOffset < inDims[1] && xTexelC${colIndex + 1}Ready == 0) {\n xTexelC${colIndex + 1} = getX(batch, xR, xCOffset, d1);\n if (xCOffset + 1 >= inDims[1]) {\n xTexelC${colIndex + 1}.zw = vec2(0.);\n }\n xTexelC${colIndex + 1}Ready = 1;\n }\n\n xC${colIndex} = vec4(\n xTexelC${colIndex}.xy, xTexelC${colIndex + 1}.xy);\n `;\n if (colIndex + 1 < filterWidth) {\n mainLoop += `\n xC${colIndex + 1} = vec4(xTexelC${colIndex}.zw, xTexelC${colIndex + 1}.zw);\n `;\n }\n }\n }\n }\n if (colIndex < filterWidth) {\n mainLoop += `\n wTexel = getW(r, ${colIndex}, d1, q);\n dotProd += xC${colIndex} * vec4(wTexel.xz, wTexel.xz);\n `;\n if (colIndex + 1 < filterWidth) {\n mainLoop += `\n wTexel = getW(r, ${colIndex + 1}, d1, q);\n dotProd += xC${colIndex + 1} * vec4(wTexel.xz, wTexel.xz);\n `;\n }\n }\n }\n mainLoop += `\n }\n `;\n mainLoop += `\n }\n `;\n let activationSnippet = \"\", applyActivationSnippet = \"\";\n if (activation2) {\n if (hasPreluActivation) {\n activationSnippet = `vec4 activation(vec4 a) {\n vec4 b = getPreluActivationWeightsAtOutCoords();\n ${activation2}\n }`;\n } else if (hasLeakyReluAlpha) {\n activationSnippet = `vec4 activation(vec4 a) {\n vec4 b = getLeakyreluAlphaAtOutCoords();\n ${activation2}\n }`;\n } else {\n activationSnippet = `vec4 activation(vec4 x) {\n ${activation2}\n }`;\n }\n applyActivationSnippet = `result = activation(result);`;\n }\n const addBiasSnippet = addBias ? \"result += getBiasAtOutCoords();\" : \"\";\n if (addBias) {\n this.variableNames.push(\"bias\");\n }\n if (hasPreluActivation) {\n this.variableNames.push(\"preluActivationWeights\");\n }\n if (hasLeakyReluAlpha) {\n this.variableNames.push(\"leakyreluAlpha\");\n }\n this.userCode = `\n ${activationSnippet}\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords.x;\n ivec2 xRCCorner = coords.yz * strides - pads;\n int d2 = coords.w;\n int d1 = d2 / ${channelMul};\n int q = d2 - d1 * ${channelMul};\n int xRCorner = xRCCorner.x;\n int xCCorner = xRCCorner.y;\n\n //intialize dotProd with a small epsilon seems to reduce GPU accuracy loss.\n vec4 dotProd = vec4(0.000000000000001);\n\n ${mainLoop}\n\n vec4 result = dotProd - vec4(0.000000000000001);\n ${addBiasSnippet}\n ${applyActivationSnippet}\n setOutput(result);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/DepthwiseConv2dNative.js\nfunction depthwiseConv2dNative2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, filter } = inputs;\n const { strides, pad: pad3, dilations, dimRoundingMode } = attrs;\n let $dilations = dilations;\n if ($dilations == null) {\n $dilations = [1, 1];\n }\n util_exports.assert(backend_util_exports.eitherStridesOrDilationsAreOne(strides, $dilations), () => `Error in depthwiseConv2d: Either strides or dilations must be 1. Got strides ${strides} and dilations '${$dilations}'`);\n const convInfo = backend_util_exports.computeConv2DInfo(x.shape, filter.shape, strides, $dilations, pad3, dimRoundingMode, true);\n let program;\n if (env().getBool(\"WEBGL_PACK_DEPTHWISECONV\") && convInfo.strideWidth <= 2 && convInfo.outChannels / convInfo.inChannels === 1) {\n program = new DepthwiseConvPacked2DProgram(convInfo);\n } else {\n program = new DepthwiseConv2DProgram(convInfo);\n }\n const customValues = [\n [convInfo.padInfo.top, convInfo.padInfo.left],\n [convInfo.strideHeight, convInfo.strideWidth],\n [convInfo.dilationHeight, convInfo.dilationWidth],\n [convInfo.inHeight, convInfo.inWidth]\n ];\n return backend2.runWebGLProgram(program, [x, filter], \"float32\", customValues);\n}\nvar depthwiseConv2dNativeConfig2 = {\n kernelName: DepthwiseConv2dNative,\n backendName: \"webgl\",\n kernelFunc: depthwiseConv2dNative2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/conv_backprop_gpu_depthwise.js\nvar DepthwiseConv2DDerFilterProgram = class {\n constructor(convInfo) {\n this.variableNames = [\"x\", \"dy\"];\n this.outputShape = convInfo.filterShape;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const padTop = convInfo.padInfo.top;\n const padLeft = convInfo.padInfo.left;\n const channelMul = convInfo.outChannels / convInfo.inChannels;\n this.userCode = `\n void main() {\n ivec4 coords = getOutputCoords();\n int wR = coords.x;\n int wC = coords.y;\n int d1 = coords.z;\n int dm = coords.w;\n int d2 = d1 * ${channelMul} + dm;\n\n float dotProd = 0.0;\n\n // TO DO: Vec4 over the batch size\n for (int b = 0; b < ${convInfo.batchSize}; b++) {\n for (int yR = 0; yR < ${convInfo.outHeight}; yR++) {\n int xR = wR + yR * ${strideHeight} - ${padTop};\n\n if (xR < 0 || xR >= ${convInfo.inHeight}) {\n continue;\n }\n\n for (int yC = 0; yC < ${convInfo.outWidth}; yC++) {\n int xC = wC + yC * ${strideWidth} - ${padLeft};\n\n if (xC < 0 || xC >= ${convInfo.inWidth}) {\n continue;\n }\n\n float dyValue = getDy(b, yR, yC, d2);\n float xValue = getX(b, xR, xC, d1);\n dotProd += (xValue * dyValue);\n }\n }\n }\n setOutput(dotProd);\n }\n `;\n }\n};\nvar DepthwiseConv2DDerInputProgram = class {\n constructor(convInfo) {\n this.variableNames = [\"dy\", \"W\"];\n this.outputShape = convInfo.inShape;\n const filterHeight = convInfo.filterHeight;\n const filterWidth = convInfo.filterWidth;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const padTop = filterHeight - 1 - convInfo.padInfo.top;\n const padLeft = filterWidth - 1 - convInfo.padInfo.left;\n const channelMul = convInfo.outChannels / convInfo.inChannels;\n this.userCode = `\n const ivec2 pads = ivec2(${padTop}, ${padLeft});\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d1 = coords[3];\n ivec2 dyCorner = coords.yz - pads;\n int dyRCorner = dyCorner.x;\n int dyCCorner = dyCorner.y;\n\n float dotProd = 0.0;\n\n for (int wR = 0; wR < ${filterHeight}; wR++) {\n float dyR = float(dyRCorner + wR) / ${strideHeight}.0;\n\n if (dyR < 0.0 || dyR >= ${convInfo.outHeight}.0 || fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n int wRPerm = ${filterHeight} - 1 - wR;\n\n for (int wC = 0; wC < ${filterWidth}; wC++) {\n float dyC = float(dyCCorner + wC) / ${strideWidth}.0;\n\n if (dyC < 0.0 || dyC >= ${convInfo.outWidth}.0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n int wCPerm = ${filterWidth} - 1 - wC;\n\n // TO DO: Vec4 over the channelMul\n for (int dm = 0; dm < ${channelMul}; dm++) {\n int d2 = d1 * ${channelMul} + dm;\n float xValue = getDy(batch, idyR, idyC, d2);\n float wValue = getW(wRPerm, wCPerm, d1, dm);\n dotProd += xValue * wValue;\n }\n }\n }\n setOutput(dotProd);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/DepthwiseConv2dNativeBackpropFilter.js\nfunction depthwiseConv2dNativeBackpropFilter3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, dy } = inputs;\n const { strides, dilations, pad: pad3, dimRoundingMode, filterShape } = attrs;\n const convInfo = backend_util_exports.computeConv2DInfo(x.shape, filterShape, strides, dilations, pad3, dimRoundingMode, true);\n const program = new DepthwiseConv2DDerFilterProgram(convInfo);\n return backend2.runWebGLProgram(program, [x, dy], \"float32\");\n}\nvar depthwiseConv2dNativeBackpropFilterConfig2 = {\n kernelName: DepthwiseConv2dNativeBackpropFilter,\n backendName: \"webgl\",\n kernelFunc: depthwiseConv2dNativeBackpropFilter3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/DepthwiseConv2dNativeBackpropInput.js\nfunction depthwiseConv2dNativeBackpropInput3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { dy, filter } = inputs;\n const { strides, dilations, pad: pad3, dimRoundingMode, inputShape } = attrs;\n const convInfo = backend_util_exports.computeConv2DInfo(inputShape, filter.shape, strides, dilations, pad3, dimRoundingMode, true);\n const program = new DepthwiseConv2DDerInputProgram(convInfo);\n return backend2.runWebGLProgram(program, [dy, filter], \"float32\");\n}\nvar depthwiseConv2dNativeBackpropInputConfig2 = {\n kernelName: DepthwiseConv2dNativeBackpropInput,\n backendName: \"webgl\",\n kernelFunc: depthwiseConv2dNativeBackpropInput3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/diag_gpu.js\nvar DiagProgram = class {\n constructor(size) {\n this.variableNames = [\"X\"];\n this.outputShape = [size, size];\n this.userCode = `\n void main() {\n ivec2 coords = getOutputCoords();\n float val = coords[0] == coords[1] ? getX(coords[0]) : 0.0;\n setOutput(val);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Diag.js\nfunction diag3(args) {\n const { inputs, backend: backend2 } = args;\n const { x } = inputs;\n const outShape = [...x.shape, ...x.shape];\n const xSize = util_exports.sizeFromShape(x.shape);\n const flat = reshape4({ inputs: { x }, backend: backend2, attrs: { shape: [xSize] } });\n const program = new DiagProgram(xSize);\n const res = backend2.runWebGLProgram(program, [flat], flat.dtype);\n const out = reshape4({ inputs: { x: res }, backend: backend2, attrs: { shape: outShape } });\n backend2.disposeIntermediateTensorInfo(flat);\n backend2.disposeIntermediateTensorInfo(res);\n return out;\n}\nvar diagConfig2 = {\n kernelName: Diag,\n backendName: \"webgl\",\n kernelFunc: diag3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/dilation_gpu.js\nvar Dilation2DProgram = class {\n constructor(convInfo) {\n this.variableNames = [\"x\", \"W\"];\n this.outputShape = convInfo.outShape;\n const { inHeight, inWidth, padInfo, strideHeight, strideWidth, filterHeight, filterWidth, dilationHeight, dilationWidth } = convInfo;\n const { top: padTop, left: padLeft } = padInfo;\n this.userCode = `\n const ivec2 strides = ivec2(${strideHeight}, ${strideWidth});\n const ivec2 pads = ivec2(${padTop}, ${padLeft});\n const float neg_infinity = -3.4e38;\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords.x;\n int d1 = coords.w;\n ivec2 outTopLeftCorner =\n coords.yz * strides - pads;\n int hBeg = outTopLeftCorner.x;\n int wBeg = outTopLeftCorner.y;\n\n float curVal = neg_infinity;\n for (int h = 0; h < ${filterHeight}; h++) {\n int hIn = hBeg + h * ${dilationHeight};\n\n if (hIn >= 0 && hIn < ${inHeight}) {\n for (int w = 0; w < ${filterWidth}; w++) {\n int wIn = wBeg + w * ${dilationWidth};\n\n if (wIn >= 0 && wIn < ${inWidth}) {\n float xVal = getX(batch, hIn, wIn, d1);\n float wVal = getW(h, w, d1);\n\n float val = xVal + wVal;\n if (val > curVal) {\n curVal = val;\n }\n }\n }\n }\n }\n\n float result = curVal;\n setOutput(result);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Dilation2D.js\nfunction dilation2D(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, filter } = inputs;\n const { strides, pad: pad3, dilations } = attrs;\n const convInfo = backend_util_exports.computeDilation2DInfo(x.shape, filter.shape, strides, pad3, \"NHWC\", dilations);\n let out;\n const program = new Dilation2DProgram(convInfo);\n out = backend2.runWebGLProgram(program, [x, filter], \"float32\");\n const outReshaped = reshape4({ inputs: { x: out }, backend: backend2, attrs: { shape: convInfo.outShape } });\n backend2.disposeIntermediateTensorInfo(out);\n return outReshaped;\n}\nvar dilation2DConfig2 = {\n kernelName: Dilation2D,\n backendName: \"webgl\",\n kernelFunc: dilation2D\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Einsum.js\nfunction einsum3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { equation } = attrs;\n const tensors = inputs;\n const { allDims, summedDims, idDims } = backend_util_exports.decodeEinsumEquation(equation, tensors.length);\n backend_util_exports.checkEinsumDimSizes(allDims.length, idDims, tensors);\n const { path, steps } = backend_util_exports.getEinsumComputePath(summedDims, idDims);\n const nSteps = steps.length;\n let out = null;\n let numDimsRemaining = allDims.length;\n const tensorsToDispose = [];\n for (let i2 = 0; i2 < nSteps; ++i2) {\n for (const idTerm of steps[i2]) {\n const { permutationIndices: perm, expandDims: dimsToExpand } = backend_util_exports.getEinsumPermutation(numDimsRemaining, idDims[idTerm]);\n let x;\n if (backend_util_exports.isIdentityPermutation(perm)) {\n x = tensors[idTerm];\n } else {\n x = transpose3({ inputs: { x: tensors[idTerm] }, backend: backend2, attrs: { perm } });\n tensorsToDispose.push(x);\n }\n const targetShape = x.shape.slice();\n for (let k = 0; k < dimsToExpand.length; ++k) {\n targetShape.splice(dimsToExpand[k], 0, 1);\n }\n if (!util_exports.arraysEqual(x.shape, targetShape)) {\n x = reshape4({ inputs: { x }, backend: backend2, attrs: { shape: targetShape } });\n tensorsToDispose.push(x);\n }\n if (out === null) {\n out = x;\n } else {\n out = multiply3({ inputs: { a: x, b: out }, backend: backend2 });\n tensorsToDispose.push(out);\n }\n }\n if (i2 < nSteps - 1) {\n if (path[i2] >= 0) {\n out = sum4({\n inputs: { x: out },\n backend: backend2,\n attrs: {\n axis: path[i2] - (allDims.length - numDimsRemaining),\n keepDims: false\n }\n });\n tensorsToDispose.push(out);\n }\n numDimsRemaining--;\n }\n }\n for (const tensorInfo of tensorsToDispose) {\n if (tensorInfo === out) {\n continue;\n }\n backend2.disposeIntermediateTensorInfo(tensorInfo);\n }\n return out;\n}\nvar einsumConfig2 = {\n kernelName: Einsum,\n backendName: \"webgl\",\n kernelFunc: einsum3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Elu.js\nvar ELU4 = `return (x >= 0.0) ? x : (exp(x) - 1.0);`;\nvar ELU_PACKED = `\n vec4 result;\n\n result.r = (x.r >= 0.0) ? x.r : (exp(x.r) - 1.0);\n result.g = (x.g >= 0.0) ? x.g : (exp(x.g) - 1.0);\n result.b = (x.b >= 0.0) ? x.b : (exp(x.b) - 1.0);\n result.a = (x.a >= 0.0) ? x.a : (exp(x.a) - 1.0);\n\n return result;\n`;\nvar elu5 = unaryKernelFunc2({ opSnippet: ELU4, packedOpSnippet: ELU_PACKED });\nvar eluConfig2 = {\n kernelName: Elu,\n backendName: \"webgl\",\n kernelFunc: elu5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/EluGrad.js\nvar ELU_DER = `return (b >= 1.0) ? a : a * (b + 1.0);`;\nvar ELU_DER_PACKED = `\n vec4 bGTEZero = vec4(greaterThanEqual(b, vec4(0.)));\n return (bGTEZero * a) + ((vec4(1.0) - bGTEZero) * (a * (b + vec4(1.0))));\n`;\nvar eluGrad2 = (args) => {\n const { inputs, backend: backend2 } = args;\n const { dy, y } = inputs;\n const program = env().getBool(\"WEBGL_PACK_BINARY_OPERATIONS\") ? new BinaryOpPackedProgram(ELU_DER_PACKED, dy.shape, y.shape) : new BinaryOpProgram(ELU_DER, dy.shape, y.shape);\n return backend2.runWebGLProgram(program, [dy, y], dy.dtype);\n};\nvar eluGradConfig3 = {\n kernelName: EluGrad,\n backendName: \"webgl\",\n kernelFunc: eluGrad2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Equal.js\nvar PACKED_EQUAL = `\n return vec4(equal(a, b));\n`;\nvar EQUAL = `return float(a == b);`;\nvar equal3 = binaryKernelFunc2({\n opSnippet: EQUAL,\n packedOpSnippet: PACKED_EQUAL,\n dtype: \"bool\",\n cpuKernelImpl: equalImplCPU\n});\nvar equalConfig2 = {\n kernelName: Equal,\n backendName: \"webgl\",\n kernelFunc: equal3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Erf.js\nvar ERF = `\n // Error function is calculated approximately with elementary function.\n // See \"Handbook of Mathematical Functions with Formulas,\n // Graphs, and Mathematical Tables\", Abramowitz and Stegun.\n float p = ${backend_util_exports.ERF_P};\n float a1 = ${backend_util_exports.ERF_A1};\n float a2 = ${backend_util_exports.ERF_A2};\n float a3 = ${backend_util_exports.ERF_A3};\n float a4 = ${backend_util_exports.ERF_A4};\n float a5 = ${backend_util_exports.ERF_A5};\n\n float sign = sign(x);\n x = abs(x);\n float t = 1.0 / (1.0 + p * x);\n return sign * (1.0 - (((((a5*t + a4)*t) + a3)*t + a2)*t + a1)*t*exp(-x*x));\n`;\nvar erf3 = unaryKernelFunc2({ opSnippet: ERF });\nvar erfConfig2 = {\n kernelName: Erf,\n backendName: \"webgl\",\n kernelFunc: erf3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Exp.js\nvar EXP = CHECK_NAN_SNIPPET_UNARY + `\n return exp(x);\n`;\nvar EXP_PACKED = `\n vec4 result = exp(x);\n bvec4 isNaN = isnan(x);\n result.r = isNaN.r ? x.r : result.r;\n result.g = isNaN.g ? x.g : result.g;\n result.b = isNaN.b ? x.b : result.b;\n result.a = isNaN.a ? x.a : result.a;\n\n return result;\n`;\nvar exp3 = unaryKernelFunc2({\n opSnippet: EXP,\n packedOpSnippet: EXP_PACKED,\n cpuKernelImpl: expImplCPU,\n dtype: \"float32\"\n});\nvar expConfig2 = {\n kernelName: Exp,\n backendName: \"webgl\",\n kernelFunc: exp3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ExpandDims.js\nfunction expandDims4(args) {\n const { inputs, attrs, backend: backend2 } = args;\n const { dim } = attrs;\n const { input: input2 } = inputs;\n const inputRank = input2.shape.length;\n const newShape = input2.shape.slice();\n let $dim = dim;\n if (dim < 0) {\n util_exports.assert(-(inputRank + 1) <= dim, () => `Axis must be in the interval [${-(inputRank + 1)}, ${inputRank}]`);\n $dim = inputRank + dim + 1;\n }\n newShape.splice($dim, 0, 1);\n return reshape4({ inputs: { x: input2 }, backend: backend2, attrs: { shape: newShape } });\n}\nvar expandDimsConfig2 = {\n kernelName: ExpandDims,\n backendName: \"webgl\",\n kernelFunc: expandDims4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Expm1.js\nvar EXPM1 = `return exp(x) - 1.0;`;\nvar expm13 = unaryKernelFunc2({ opSnippet: EXPM1, packedOpSnippet: EXPM1, cpuKernelImpl: expm1ImplCPU });\nvar expm1Config2 = {\n kernelName: Expm1,\n backendName: \"webgl\",\n kernelFunc: expm13\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/fft_gpu.js\nvar FFTProgram = class {\n constructor(component, inputShape, inverse) {\n this.variableNames = [\"real\", \"imag\"];\n const innerDim = inputShape[1];\n this.outputShape = inputShape;\n const exponentMultiplierSnippet = inverse ? `2.0 * ${Math.PI}` : `-2.0 * ${Math.PI}`;\n const resultDenominator = inverse ? `${innerDim}.0` : \"1.0\";\n let opString;\n if (component === \"real\") {\n opString = \"return real * expR - imag * expI;\";\n } else if (component === \"imag\") {\n opString = \"return real * expI + imag * expR;\";\n } else {\n throw new Error(`FFT component must be either \"real\" or \"imag\", got ${component}.`);\n }\n this.userCode = `\n const float exponentMultiplier = ${exponentMultiplierSnippet};\n\n float unaryOpComplex(float real, float expR, float imag, float expI) {\n ${opString}\n }\n\n float mulMatDFT(int batch, int index) {\n float indexRatio = float(index) / float(${innerDim});\n float exponentMultiplierTimesIndexRatio =\n exponentMultiplier * indexRatio;\n\n float result = 0.0;\n\n for (int i = 0; i < ${innerDim}; i++) {\n // x = (-2|2 * PI / N) * index * i;\n float x = exponentMultiplierTimesIndexRatio * float(i);\n float expR = cos(x);\n float expI = sin(x);\n float real = getReal(batch, i);\n float imag = getImag(batch, i);\n\n result +=\n unaryOpComplex(real, expR, imag, expI) / ${resultDenominator};\n }\n\n return result;\n }\n\n void main() {\n ivec2 coords = getOutputCoords();\n setOutput(mulMatDFT(coords[0], coords[1]));\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/FFT_impl.js\nfunction fftImpl2(x, inverse, backend2) {\n const xData = backend2.texData.get(x.dataId);\n const inputSize = util_exports.sizeFromShape(x.shape);\n const innerDimensionSize = x.shape[x.shape.length - 1];\n const batch = inputSize / innerDimensionSize;\n const input2D = reshape4({ inputs: { x }, backend: backend2, attrs: { shape: [batch, innerDimensionSize] } });\n const xShape = input2D.shape;\n const realProgram = new FFTProgram(\"real\", xShape, inverse);\n const imagProgram = new FFTProgram(\"imag\", xShape, inverse);\n const inputs = [\n {\n dataId: xData.complexTensorInfos.real.dataId,\n dtype: xData.complexTensorInfos.real.dtype,\n shape: xShape\n },\n {\n dataId: xData.complexTensorInfos.imag.dataId,\n dtype: xData.complexTensorInfos.imag.dtype,\n shape: xShape\n }\n ];\n const realPart = backend2.runWebGLProgram(realProgram, inputs, \"float32\");\n const imagPart = backend2.runWebGLProgram(imagProgram, inputs, \"float32\");\n const complexOutput = complex3({ inputs: { real: realPart, imag: imagPart }, backend: backend2 });\n backend2.disposeIntermediateTensorInfo(realPart);\n backend2.disposeIntermediateTensorInfo(imagPart);\n const complexOutputReshaped = reshape4({ inputs: { x: complexOutput }, backend: backend2, attrs: { shape: x.shape } });\n backend2.disposeIntermediateTensorInfo(input2D);\n backend2.disposeIntermediateTensorInfo(complexOutput);\n return complexOutputReshaped;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/FFT.js\nfunction fft3(args) {\n const { inputs, backend: backend2 } = args;\n const { input: input2 } = inputs;\n return fftImpl2(input2, false, backend2);\n}\nvar fftConfig2 = {\n kernelName: FFT,\n backendName: \"webgl\",\n kernelFunc: fft3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/fill_gpu.js\nvar FillProgram = class {\n constructor(shape, value) {\n this.outputShape = [];\n this.customUniforms = [{ name: \"value\", type: \"float\" }];\n this.variableNames = [\"x\"];\n this.outputShape = shape;\n this.userCode = `\n void main() {\n // Input can be obtained from uniform value.\n setOutput(value);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Fill.js\nfunction fill3(args) {\n const { backend: backend2, attrs } = args;\n const { shape, value } = attrs;\n let { dtype } = attrs;\n dtype = dtype || util_exports.inferDtype(value);\n if (dtype === \"string\") {\n const values = util_exports.getArrayFromDType(dtype, util_exports.sizeFromShape(shape));\n values.fill(value);\n return backend2.makeTensorInfo(shape, dtype, values);\n } else {\n const program = new FillProgram(shape, value);\n const customValues = [[value]];\n return backend2.runWebGLProgram(program, [], dtype, customValues);\n }\n}\nvar fillConfig2 = {\n kernelName: Fill,\n backendName: \"webgl\",\n kernelFunc: fill3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/flip_left_right_gpu.js\nvar FlipLeftRightProgram = class {\n constructor(imageShape) {\n this.variableNames = [\"Image\"];\n this.outputShape = [];\n const imageWidth = imageShape[2];\n this.outputShape = imageShape;\n this.userCode = `\n void main() {\n ivec4 coords = getOutputCoords();\n int x = coords[2];\n\n int coordX = ${imageWidth} - x - 1;\n float outputValue;\n if(coordX >= 0 && coordX < ${imageWidth}) {\n outputValue = getImage(coords[0], coords[1], coordX, coords[3]);\n } else {\n outputValue = getImage(coords[0], coords[1], coords[2], coords[3]);\n }\n setOutput(outputValue);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/FlipLeftRight.js\nvar flipLeftRightConfig2 = {\n kernelName: FlipLeftRight,\n backendName: \"webgl\",\n kernelFunc: ({ inputs, backend: backend2 }) => {\n const { image: image2 } = inputs;\n const webglBackend = backend2;\n const program = new FlipLeftRightProgram(image2.shape);\n const output = webglBackend.runWebGLProgram(program, [image2], image2.dtype);\n return output;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Floor.js\nvar FLOOR = `return floor(x);`;\nvar floor3 = unaryKernelFunc2({ opSnippet: FLOOR, packedOpSnippet: FLOOR, cpuKernelImpl: floorImplCPU });\nvar floorConfig2 = {\n kernelName: Floor,\n backendName: \"webgl\",\n kernelFunc: floor3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/FloorDiv.js\nvar INT_DIV = `\n float s = sign(a) * sign(b);\n int ia = round(a);\n int ib = round(b);\n if (ib != 0) {\n // Windows (D3D) wants guaranteed non-zero int division at compile-time.\n return float(idiv(ia, ib, s));\n } else {\n return NAN;\n }\n`;\nvar INT_DIV_PACKED = `\n ivec4 ia = round(a);\n ivec4 ib = round(b);\n bvec4 cond = notEqual(ib, ivec4(0));\n ivec4 result = ivec4(0);\n vec4 s = sign(a) * sign(b);\n\n // Windows (D3D) wants guaranteed non-zero int division at compile-time.\n if (cond[0]) {\n result[0] = idiv(ia[0], ib[0], s[0]);\n }\n if (cond[1]) {\n result[1] = idiv(ia[1], ib[1], s[1]);\n }\n if (cond[2]) {\n result[2] = idiv(ia[2], ib[2], s[2]);\n }\n if (cond[3]) {\n result[3] = idiv(ia[3], ib[3], s[3]);\n }\n return vec4(result);\n`;\nvar floorDiv3 = binaryKernelFunc2({ opSnippet: INT_DIV, packedOpSnippet: INT_DIV_PACKED, dtype: \"int32\" });\nvar floorDivConfig2 = {\n kernelName: FloorDiv,\n backendName: \"webgl\",\n kernelFunc: floorDiv3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/FromPixels_utils/from_pixels_gpu.js\nvar FromPixelsProgram = class {\n constructor(outputShape) {\n this.variableNames = [\"A\"];\n const glsl = getGlslDifferences();\n const [height, width] = outputShape;\n this.outputShape = outputShape;\n this.userCode = `\n void main() {\n ivec3 coords = getOutputCoords();\n int texR = coords[0];\n int texC = coords[1];\n int depth = coords[2];\n vec2 uv = (vec2(texC, texR) + halfCR) / vec2(${width}.0, ${height}.0);\n\n vec4 values = ${glsl.texture2D}(A, uv);\n float value;\n if (depth == 0) {\n value = values.r;\n } else if (depth == 1) {\n value = values.g;\n } else if (depth == 2) {\n value = values.b;\n } else if (depth == 3) {\n value = values.a;\n }\n\n setOutput(floor(value * 255.0 + 0.5));\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/FromPixels_utils/from_pixels_packed_gpu.js\nvar FromPixelsPackedProgram = class {\n constructor(outputShape) {\n this.variableNames = [\"A\"];\n this.packedInputs = false;\n this.packedOutput = true;\n const glsl = getGlslDifferences();\n const [height, width] = outputShape;\n this.outputShape = outputShape;\n this.userCode = `\n void main() {\n ivec3 coords = getOutputCoords();\n int texR = coords[0];\n int texC = coords[1];\n int depth = coords[2];\n\n vec4 result = vec4(0.);\n\n for(int row=0; row<=1; row++) {\n for(int col=0; col<=1; col++) {\n texC = coords[1] + row;\n depth = coords[2] + col;\n\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2(${width}.0, ${height}.0);\n vec4 values = ${glsl.texture2D}(A, uv);\n float value;\n if (depth == 0) {\n value = values.r;\n } else if (depth == 1) {\n value = values.g;\n } else if (depth == 2) {\n value = values.b;\n } else if (depth == 3) {\n value = values.a;\n }\n\n result[row * 2 + col] = floor(value * 255.0 + 0.5);\n }\n }\n\n ${glsl.output} = result;\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/FromPixels.js\nvar fromPixelsConfig = {\n kernelName: FromPixels,\n backendName: \"webgl\",\n kernelFunc: fromPixels2\n};\nvar fromPixels2DContext2;\nvar willReadFrequently = env().getBool(\"CANVAS2D_WILL_READ_FREQUENTLY_FOR_GPU\");\nfunction fromPixels2(args) {\n const { inputs, backend: backend2, attrs } = args;\n let { pixels } = inputs;\n const { numChannels } = attrs;\n const isVideo = typeof HTMLVideoElement !== \"undefined\" && pixels instanceof HTMLVideoElement;\n const isImage = typeof HTMLImageElement !== \"undefined\" && pixels instanceof HTMLImageElement;\n const [width, height] = isVideo ? [\n pixels.videoWidth,\n pixels.videoHeight\n ] : [pixels.width, pixels.height];\n const texShape = [height, width];\n const outShape = [height, width, numChannels];\n if (isImage || isVideo) {\n const newWillReadFrequently = env().getBool(\"CANVAS2D_WILL_READ_FREQUENTLY_FOR_GPU\");\n if (fromPixels2DContext2 == null || newWillReadFrequently !== willReadFrequently) {\n willReadFrequently = newWillReadFrequently;\n fromPixels2DContext2 = document.createElement(\"canvas\").getContext(\"2d\", { willReadFrequently });\n }\n fromPixels2DContext2.canvas.width = width;\n fromPixels2DContext2.canvas.height = height;\n fromPixels2DContext2.drawImage(pixels, 0, 0, width, height);\n pixels = fromPixels2DContext2.canvas;\n }\n const tempPixelHandle = backend2.makeTensorInfo(texShape, \"int32\");\n backend2.texData.get(tempPixelHandle.dataId).usage = TextureUsage.PIXELS;\n backend2.gpgpu.uploadPixelDataToTexture(backend2.getTexture(tempPixelHandle.dataId), pixels);\n const program = env().getBool(\"WEBGL_PACK\") ? new FromPixelsPackedProgram(outShape) : new FromPixelsProgram(outShape);\n const res = backend2.runWebGLProgram(program, [tempPixelHandle], \"int32\");\n backend2.disposeData(tempPixelHandle.dataId);\n return res;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/FusedConv2D.js\nfunction fusedConv2d(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, filter, bias, preluActivationWeights } = inputs;\n const { strides, pad: pad3, dataFormat, dilations, dimRoundingMode, activation: activation2, leakyreluAlpha } = attrs;\n const $dataFormat = backend_util_exports.convertConv2DDataFormat(dataFormat);\n const convInfo = backend_util_exports.computeConv2DInfo(x.shape, filter.shape, strides, dilations, pad3, dimRoundingMode, false, $dataFormat);\n let out;\n const intermediates = [];\n const hasBias = bias != null;\n const hasPreluActivationWeights = preluActivationWeights != null;\n const hasLeakyreluAlpha = activation2 === \"leakyrelu\";\n const prepareInputs = () => {\n const inputs2 = [x, filter];\n const alignInputWithDataFormat = (input2, dataFormat2) => {\n if (dataFormat2 === \"NCHW\" && input2.shape.length === 1 && input2.shape[0] !== 1) {\n const alignedInput = reshape4({\n inputs: { x: input2 },\n backend: backend2,\n attrs: { shape: [input2.shape[0], 1, 1] }\n });\n intermediates.push(alignedInput);\n return alignedInput;\n }\n return input2;\n };\n if (hasBias) {\n inputs2.push(alignInputWithDataFormat(bias, dataFormat));\n }\n if (hasPreluActivationWeights) {\n inputs2.push(alignInputWithDataFormat(preluActivationWeights, dataFormat));\n }\n if (hasLeakyreluAlpha) {\n const $leakyreluAlpha = backend2.makeTensorInfo([], \"float32\", util_exports.createScalarValue(leakyreluAlpha, \"float32\"));\n inputs2.push($leakyreluAlpha);\n intermediates.push($leakyreluAlpha);\n }\n return inputs2;\n };\n if (convInfo.filterHeight === 1 && convInfo.filterWidth === 1 && convInfo.dilationHeight === 1 && convInfo.dilationWidth === 1 && convInfo.strideHeight === 1 && convInfo.strideWidth === 1 && (convInfo.padInfo.type === \"SAME\" || convInfo.padInfo.type === \"VALID\")) {\n out = conv2dByMatMul({\n x,\n filter,\n convInfo,\n backend: backend2,\n bias,\n activation: activation2,\n preluActivationWeights,\n leakyreluAlpha\n });\n } else if (convInfo.strideWidth <= 2 && $dataFormat === \"channelsLast\" && env().getBool(\"WEBGL_EXP_CONV\")) {\n const fusedActivation = activation2 ? mapActivationToShaderProgram(activation2, true) : null;\n const program = new Conv2DPackedProgram(convInfo, hasBias, fusedActivation, hasPreluActivationWeights, hasLeakyreluAlpha);\n const customValues = [\n [convInfo.padInfo.top, convInfo.padInfo.left],\n [convInfo.strideHeight, convInfo.strideWidth],\n [convInfo.dilationHeight, convInfo.dilationWidth],\n [convInfo.inHeight, convInfo.inWidth]\n ];\n const inputs2 = prepareInputs();\n out = backend2.runWebGLProgram(program, inputs2, \"float32\", customValues);\n } else if (env().getBool(\"WEBGL_CONV_IM2COL\")) {\n out = conv2dWithIm2Row({\n x,\n filter,\n convInfo,\n backend: backend2,\n bias,\n activation: activation2,\n preluActivationWeights,\n leakyreluAlpha\n });\n } else {\n const fusedActivation = activation2 ? mapActivationToShaderProgram(activation2, false) : null;\n const program = new Conv2DProgram(convInfo, hasBias, fusedActivation, hasPreluActivationWeights, hasLeakyreluAlpha);\n const inputs2 = prepareInputs();\n out = backend2.runWebGLProgram(program, inputs2, \"float32\");\n }\n const outReshaped = reshape4({ inputs: { x: out }, backend: backend2, attrs: { shape: convInfo.outShape } });\n intermediates.push(out);\n intermediates.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2));\n return outReshaped;\n}\nvar fusedConv2DConfig2 = {\n kernelName: FusedConv2D,\n backendName: \"webgl\",\n kernelFunc: fusedConv2d\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/FusedDepthwiseConv2D.js\nfunction fusedDepthwiseConv2D2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, filter, bias, preluActivationWeights } = inputs;\n const { strides, pad: pad3, dilations, dimRoundingMode, activation: activation2, leakyreluAlpha } = attrs;\n const intermediates = [];\n let $dilations = dilations;\n if ($dilations == null) {\n $dilations = [1, 1];\n }\n util_exports.assert(backend_util_exports.eitherStridesOrDilationsAreOne(strides, $dilations), () => `Error in depthwiseConv2d: Either strides or dilations must be 1. Got strides ${strides} and dilations '${$dilations}'`);\n const convInfo = backend_util_exports.computeConv2DInfo(x.shape, filter.shape, strides, $dilations, pad3, dimRoundingMode, true);\n const shouldPackDepthwiseConv = env().getBool(\"WEBGL_PACK_DEPTHWISECONV\") && convInfo.strideWidth <= 2 && convInfo.outChannels / convInfo.inChannels === 1;\n const fusedActivation = activation2 ? mapActivationToShaderProgram(activation2, shouldPackDepthwiseConv) : null;\n const programInputs = [x, filter];\n const hasBias = bias != null;\n const hasPreluActivationWeights = preluActivationWeights != null;\n const hasLeakyreluAlpha = activation2 === \"leakyrelu\";\n if (hasBias) {\n programInputs.push(bias);\n }\n if (hasPreluActivationWeights) {\n programInputs.push(preluActivationWeights);\n }\n if (hasLeakyreluAlpha) {\n const $leakyreluAlpha = backend2.makeTensorInfo([], \"float32\", util_exports.createScalarValue(leakyreluAlpha, \"float32\"));\n programInputs.push($leakyreluAlpha);\n intermediates.push($leakyreluAlpha);\n }\n let program;\n if (shouldPackDepthwiseConv) {\n program = new DepthwiseConvPacked2DProgram(convInfo, hasBias, fusedActivation, hasPreluActivationWeights, hasLeakyreluAlpha);\n } else {\n program = new DepthwiseConv2DProgram(convInfo, hasBias, fusedActivation, hasPreluActivationWeights, hasLeakyreluAlpha);\n }\n const customValues = [\n [convInfo.padInfo.top, convInfo.padInfo.left],\n [convInfo.strideHeight, convInfo.strideWidth],\n [convInfo.dilationHeight, convInfo.dilationWidth],\n [convInfo.inHeight, convInfo.inWidth]\n ];\n const result = backend2.runWebGLProgram(program, programInputs, \"float32\", customValues);\n intermediates.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2));\n return result;\n}\nvar fusedDepthwiseConv2DConfig2 = {\n kernelName: FusedDepthwiseConv2D,\n backendName: \"webgl\",\n kernelFunc: fusedDepthwiseConv2D2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/gather_nd_gpu.js\nvar GatherNDProgram = class {\n constructor(sliceDim, strides, shape, paramsShape) {\n this.sliceDim = sliceDim;\n this.strides = strides;\n this.paramsShape = paramsShape;\n this.variableNames = [\"x\", \"indices\"];\n this.outputShape = shape;\n const dtype = getCoordsDataType(shape.length);\n let mainLoop = `\n int index;`;\n for (let j = 0; j < this.sliceDim; j++) {\n mainLoop += `\n index = round(getIndices(coords[0], ${j}));\n out_of_bounds = out_of_bounds || index < 0;\n out_of_bounds = out_of_bounds || index >= ${this.paramsShape[j]};\n flattenIndex += index * ${this.strides[j]};`;\n }\n this.userCode = `\n void main() {\n ${dtype} coords = getOutputCoords();\n int flattenIndex = 0;\n bool out_of_bounds = false;\n\n ${mainLoop}\n\n setOutput(out_of_bounds ? 0.0 : getX(flattenIndex, coords[1]));\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/GatherNd.js\nfunction gatherNd2(args) {\n const { inputs, backend: backend2 } = args;\n const { params, indices } = inputs;\n const indicesShape = indices.shape;\n const sliceRank = indicesShape[indicesShape.length - 1];\n const paramsSize = util_exports.sizeFromShape(params.shape);\n const [resultShape, numSlices, sliceSize, strides] = backend_util_exports.prepareAndValidate(params, indices);\n const flattenIndices = reshape4({ inputs: { x: indices }, backend: backend2, attrs: { shape: [numSlices, sliceRank] } });\n const flattenX = reshape4({\n inputs: { x: params },\n backend: backend2,\n attrs: { shape: [util_exports.sizeFromShape(params.shape) / sliceSize, sliceSize] }\n });\n if (backend2.shouldExecuteOnCPU([params, indices]) || params.dtype === \"string\") {\n const indicesData = backend2.readSync(indices.dataId);\n const paramsBuf = backend2.bufferSync(params);\n const outValue = gatherNdImplCPU(indicesData, paramsBuf, params.dtype, numSlices, sliceRank, sliceSize, strides, params.shape, paramsSize);\n return backend2.makeTensorInfo(resultShape, params.dtype, outValue.values);\n }\n const program = new GatherNDProgram(sliceRank, strides, [numSlices, sliceSize], params.shape);\n const res = backend2.runWebGLProgram(program, [flattenX, flattenIndices], flattenX.dtype);\n const reshaped = reshape4({ inputs: { x: res }, backend: backend2, attrs: { shape: resultShape } });\n backend2.disposeIntermediateTensorInfo(flattenIndices);\n backend2.disposeIntermediateTensorInfo(flattenX);\n backend2.disposeIntermediateTensorInfo(res);\n return reshaped;\n}\nvar gatherNdConfig2 = {\n kernelName: GatherNd,\n backendName: \"webgl\",\n kernelFunc: gatherNd2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/gather_gpu.js\nvar GatherProgram = class {\n constructor(aShape, outputShape) {\n this.variableNames = [\"A\", \"indices\"];\n this.outputShape = outputShape;\n this.rank = outputShape.length;\n const dtype = getCoordsDataType(this.rank);\n const sourceCoords = getSourceCoords2(aShape, 2);\n this.userCode = `\n void main() {\n ${dtype} resRC = getOutputCoords();\n int index = int(getIndices(resRC.x, resRC.z));\n float inBounds = (index >= 0) && (index < ${aShape[2]}) ? 1.0 : 0.0;\n setOutput(inBounds * getA(${sourceCoords}));\n }\n `;\n }\n};\nfunction getSourceCoords2(aShape, axis) {\n const currentCoords = [\"resRC.x\", \"resRC.y\", \"resRC.z\", \"resRC.w\"];\n const sourceCoords = [];\n for (let i2 = 0; i2 < aShape.length; i2++) {\n if (i2 === 2) {\n sourceCoords.push(\"index\");\n } else {\n sourceCoords.push(`${currentCoords[i2]}`);\n }\n }\n return sourceCoords.join();\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/GatherV2.js\nfunction gatherV22(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, indices } = inputs;\n const { axis, batchDims } = attrs;\n const parsedAxis = util_exports.parseAxisParam(axis, x.shape)[0];\n if (env().get(\"DEBUG\")) {\n const indicesVals = backend2.readSync(indices.dataId);\n const axisDim = x.shape[parsedAxis];\n for (let i2 = 0; i2 < indicesVals.length; ++i2) {\n const index = indicesVals[i2];\n util_exports.assert(index <= axisDim - 1 && index >= 0, () => `GatherV2: the index value ${index} is not in [0, ${axisDim - 1}]`);\n }\n }\n const shapeInfo = backend_util_exports.segment_util.collectGatherOpShapeInfo(x, indices, parsedAxis, batchDims);\n const indicesSize = util_exports.sizeFromShape(indices.shape);\n const toDispose = [];\n const flattenX = reshape4({\n inputs: { x },\n backend: backend2,\n attrs: {\n shape: [\n shapeInfo.batchSize,\n shapeInfo.outerSize,\n shapeInfo.dimSize,\n shapeInfo.sliceSize\n ]\n }\n });\n const flattenIndex = reshape4({\n inputs: { x: indices },\n backend: backend2,\n attrs: { shape: [shapeInfo.batchSize, indicesSize / shapeInfo.batchSize] }\n });\n toDispose.push(flattenX);\n toDispose.push(flattenIndex);\n const flattenOutputShape = [\n shapeInfo.batchSize,\n shapeInfo.outerSize,\n indicesSize / shapeInfo.batchSize,\n shapeInfo.sliceSize\n ];\n if (backend2.shouldExecuteOnCPU([x, indices]) || x.dtype === \"string\") {\n const indicesBuf = backend2.bufferSync(flattenIndex);\n const xBuf = backend2.bufferSync(flattenX);\n const outBuf = gatherV2ImplCPU(xBuf, indicesBuf, flattenOutputShape);\n toDispose.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2));\n return backend2.makeTensorInfo(shapeInfo.outputShape, outBuf.dtype, outBuf.values);\n }\n const program = new GatherProgram(flattenX.shape, flattenOutputShape);\n const res = backend2.runWebGLProgram(program, [flattenX, flattenIndex], flattenX.dtype);\n toDispose.push(res);\n const reshaped = reshape4({ inputs: { x: res }, backend: backend2, attrs: { shape: shapeInfo.outputShape } });\n toDispose.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2));\n return reshaped;\n}\nvar gatherV2Config2 = {\n kernelName: GatherV2,\n backendName: \"webgl\",\n kernelFunc: gatherV22\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Greater.js\nvar GREATER = `return float(a > b);`;\nvar GREATER_PACKED = `\n return vec4(greaterThan(a, b));\n`;\nvar greater4 = binaryKernelFunc2({\n opSnippet: GREATER,\n packedOpSnippet: GREATER_PACKED,\n cpuKernelImpl: greaterImplCPU,\n dtype: \"bool\"\n});\nvar greaterConfig2 = {\n kernelName: Greater,\n backendName: \"webgl\",\n kernelFunc: greater4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/GreaterEqual.js\nvar GREATER_EQUAL = `return float(a >= b);`;\nvar GREATER_EQUAL_PACKED = `\n return vec4(greaterThanEqual(a, b));\n`;\nvar greaterEqual3 = binaryKernelFunc2({\n opSnippet: GREATER_EQUAL,\n packedOpSnippet: GREATER_EQUAL_PACKED,\n dtype: \"bool\",\n cpuKernelImpl: greaterEqualImplCPU\n});\nvar greaterEqualConfig2 = {\n kernelName: GreaterEqual,\n backendName: \"webgl\",\n kernelFunc: greaterEqual3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/IFFT.js\nfunction ifft3(args) {\n const { inputs, backend: backend2 } = args;\n const { input: input2 } = inputs;\n return fftImpl2(input2, true, backend2);\n}\nvar ifftConfig2 = {\n kernelName: IFFT,\n backendName: \"webgl\",\n kernelFunc: ifft3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/IsFinite.js\nvar IS_FINITE = `return float(!isnan(x) && !isinf(x));`;\nvar isFinite4 = unaryKernelFunc2({ opSnippet: IS_FINITE, dtype: \"bool\" });\nvar isFiniteConfig2 = {\n kernelName: IsFinite,\n backendName: \"webgl\",\n kernelFunc: isFinite4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/IsInf.js\nvar IS_INF = `return float(isinf(x));`;\nvar isInf3 = unaryKernelFunc2({ opSnippet: IS_INF, dtype: \"bool\" });\nvar isInfConfig2 = {\n kernelName: IsInf,\n backendName: \"webgl\",\n kernelFunc: isInf3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/IsNaN.js\nvar IS_NAN = `return float(isnan(x));`;\nvar isNaN4 = unaryKernelFunc2({ opSnippet: IS_NAN, dtype: \"bool\" });\nvar isNaNConfig2 = {\n kernelName: IsNan,\n backendName: \"webgl\",\n kernelFunc: isNaN4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Less.js\nvar LESS = `return float(a < b);`;\nvar LESS_PACKED = `\n return vec4(lessThan(a, b));\n`;\nvar less4 = binaryKernelFunc2({\n opSnippet: LESS,\n packedOpSnippet: LESS_PACKED,\n cpuKernelImpl: lessImplCPU,\n dtype: \"bool\"\n});\nvar lessConfig2 = {\n kernelName: Less,\n backendName: \"webgl\",\n kernelFunc: less4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/LessEqual.js\nvar LESS_EQUAL = `return float(a <= b);`;\nvar LESS_EQUAL_PACKED = `\n return vec4(lessThanEqual(a, b));\n`;\nvar lessEqual3 = binaryKernelFunc2({\n opSnippet: LESS_EQUAL,\n packedOpSnippet: LESS_EQUAL_PACKED,\n cpuKernelImpl: lessEqualImplCPU,\n dtype: \"bool\"\n});\nvar lessEqualConfig2 = {\n kernelName: LessEqual,\n backendName: \"webgl\",\n kernelFunc: lessEqual3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/LinSpace.js\nfunction linSpace2(args) {\n const { backend: backend2, attrs } = args;\n const { start, stop, num } = attrs;\n const outVals = linSpaceImplCPU(start, stop, num);\n return backend2.makeTensorInfo([outVals.length], \"float32\", outVals);\n}\nvar linSpaceConfig2 = {\n kernelName: LinSpace,\n backendName: \"webgl\",\n kernelFunc: linSpace2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Log.js\nvar LOG = CHECK_NAN_SNIPPET_UNARY + `\n return x < 0.0 ? 0./0. : log(x);\n`;\nvar LOG_PACKED = `\n vec4 result = log(x);\n bvec4 isNaN = isnan(x);\n result.r = isNaN.r ? x.r : (x.r < 0.0 ? 0./0. : result.r);\n result.g = isNaN.g ? x.g : (x.g < 0.0 ? 0./0. : result.g);\n result.b = isNaN.b ? x.b : (x.b < 0.0 ? 0./0. : result.b);\n result.a = isNaN.a ? x.a : (x.a < 0.0 ? 0./0. : result.a);\n return result;\n`;\nvar log4 = unaryKernelFunc2({ opSnippet: LOG, packedOpSnippet: LOG_PACKED, cpuKernelImpl: logImplCPU });\nvar logConfig2 = {\n kernelName: Log,\n backendName: \"webgl\",\n kernelFunc: log4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Log1p.js\nvar LOG1P = CHECK_NAN_SNIPPET_UNARY + `\n return log(1.0 + x);\n`;\nvar log1p3 = unaryKernelFunc2({ opSnippet: LOG1P });\nvar log1pConfig2 = {\n kernelName: Log1p,\n backendName: \"webgl\",\n kernelFunc: log1p3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/LogicalAnd.js\nvar LOGICAL_AND = `return float(a >= 1.0 && b >= 1.0);`;\nvar LOGICAL_AND_PACKED = `\n return vec4(\n vec4(greaterThanEqual(a, vec4(1.0))) *\n vec4(greaterThanEqual(b, vec4(1.0))));\n`;\nvar logicalAnd3 = binaryKernelFunc2({\n opSnippet: LOGICAL_AND,\n packedOpSnippet: LOGICAL_AND_PACKED,\n dtype: \"bool\"\n});\nvar logicalAndConfig2 = {\n kernelName: LogicalAnd,\n backendName: \"webgl\",\n kernelFunc: logicalAnd3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/LogicalNot.js\nvar LOGICAL_NOT = `return float(!(x >= 1.0));`;\nvar logicalNot3 = unaryKernelFunc2({ opSnippet: LOGICAL_NOT });\nvar logicalNotConfig2 = {\n kernelName: LogicalNot,\n backendName: \"webgl\",\n kernelFunc: logicalNot3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/LogicalOr.js\nvar LOGICAL_OR = `return float(a >= 1.0 || b >= 1.0);`;\nvar LOGICAL_OR_PACKED = `\n return min(\n vec4(greaterThanEqual(a, vec4(1.0))) +\n vec4(greaterThanEqual(b, vec4(1.0))),\n vec4(1.0));\n`;\nvar logicalOr3 = binaryKernelFunc2({ opSnippet: LOGICAL_OR, packedOpSnippet: LOGICAL_OR_PACKED, dtype: \"bool\" });\nvar logicalOrConfig2 = {\n kernelName: LogicalOr,\n backendName: \"webgl\",\n kernelFunc: logicalOr3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/lrn_gpu.js\nvar LRNProgram = class {\n constructor(xShape, radius, bias, alpha, beta) {\n this.variableNames = [\"x\"];\n this.outputShape = [];\n const rad = radius;\n const maxD = xShape[3] - 1;\n this.outputShape = xShape;\n let powOperator;\n const basis = `float(${bias}) + float(${alpha}) * sum`;\n if (beta === 0.5) {\n powOperator = `inversesqrt(${basis})`;\n } else if (beta === 1) {\n powOperator = `1.0/(${basis})`;\n } else {\n powOperator = `exp(log(${basis}) * float(-${beta}));`;\n }\n this.userCode = `\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int r = coords[1];\n int c = coords[2];\n int d = coords[3];\n float x = getX(b, r, c, d);\n float sum = 0.0;\n for (int j = -${rad}; j <= ${rad}; j++) {\n int idx = d + j;\n if (idx >= 0 && idx <= ${maxD}) {\n float z = getX(b, r, c, idx);\n sum += z * z;\n }\n }\n float val = x * ${powOperator};\n setOutput(val);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/lrn_packed_gpu.js\nvar LRNPackedProgram = class {\n constructor(xShape, radius, bias, alpha, beta) {\n this.variableNames = [\"x\"];\n this.outputShape = [];\n this.packedInputs = true;\n this.packedOutput = true;\n const rad = radius;\n const maxD = xShape[3] - 1;\n this.outputShape = xShape;\n let powOperator;\n const basis = `float(${bias}) + float(${alpha}) * sum`;\n if (beta === 0.5) {\n powOperator = `inversesqrt(${basis})`;\n } else if (beta === 1) {\n powOperator = `1.0/(${basis})`;\n } else {\n powOperator = `exp(log(${basis}) * float(-${beta}));`;\n }\n this.userCode = `\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords.x;\n int r = coords.y;\n int c = coords.z;\n int d = coords.w;\n\n bool hasNextCol = d < ${this.outputShape[3]};\n bool hasNextRow = c < ${this.outputShape[2]};\n\n vec4 sum = vec4(0.);\n vec4 xFragAtOutputCoords = getX(b, r, c, d);\n\n vec4 xAtOutputCoords = vec4(\n getChannel(xFragAtOutputCoords, vec2(c, d)),\n hasNextCol ?\n getChannel(xFragAtOutputCoords, vec2(c, d + 1)) : 0.0,\n hasNextRow ?\n getChannel(xFragAtOutputCoords , vec2(c + 1, d)) : 0.0,\n (hasNextRow && hasNextCol) ?\n getChannel(xFragAtOutputCoords, vec2(c + 1, d + 1)) : 0.0\n );\n\n int firstChannel = d - ${rad};\n vec2 cache = vec2(0.);\n if(firstChannel >= 0){\n vec4 firstChannelFrag = getX(b, r, c, firstChannel);\n cache.x = getChannel(firstChannelFrag, vec2(c, firstChannel));\n if(hasNextRow){\n cache.y = getChannel(firstChannelFrag, vec2(c + 1, firstChannel));\n }\n }\n\n ivec2 depth = ivec2(d, d + 1);\n for (int j = - ${rad}; j <= ${rad}; j++) {\n ivec2 idx = depth + j;\n bvec2 aboveLowerBound = greaterThanEqual(idx, ivec2(0));\n bvec2 belowUpperBound = lessThanEqual(idx, ivec2(${maxD}));\n\n bool depthInRange = aboveLowerBound.x && belowUpperBound.x;\n bool depthPlusOneInRange = aboveLowerBound.y && belowUpperBound.y;\n\n if(depthInRange || depthPlusOneInRange){\n vec4 z = vec4(0.);\n vec4 xFragAtCurrentDepth;\n z.xz = cache.xy;\n if(depthPlusOneInRange && hasNextCol){\n xFragAtCurrentDepth = idx.y != d ?\n getX(b, r, c, idx.y) : xFragAtOutputCoords;\n z.y = getChannel(xFragAtCurrentDepth, vec2(c, idx.y));\n if(hasNextRow){\n z.w = getChannel(xFragAtCurrentDepth, vec2(c + 1, idx.y));\n }\n }\n cache.xy = z.yw;\n sum += z * z;\n }\n }\n vec4 result = xAtOutputCoords * ${powOperator};\n setOutput(result);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/LRN.js\nvar lrn = (args) => {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { depthRadius, bias, alpha, beta } = attrs;\n const program = env().getBool(\"WEBGL_PACK_NORMALIZATION\") ? new LRNPackedProgram(x.shape, depthRadius, bias, alpha, beta) : new LRNProgram(x.shape, depthRadius, bias, alpha, beta);\n return backend2.runWebGLProgram(program, [x], x.dtype);\n};\nvar LRNConfig2 = {\n kernelName: LRN,\n backendName: \"webgl\",\n kernelFunc: lrn\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/lrn_grad_gpu.js\nvar LRNGradProgram = class {\n constructor(inputShape, depthRadius, bias, alpha, beta) {\n this.variableNames = [\"inputImage\", \"outputImage\", \"dy\"];\n this.outputShape = [];\n this.outputShape = inputShape;\n this.depth = inputShape[3];\n this.depthRadius = depthRadius;\n this.bias = bias;\n this.alpha = alpha;\n this.beta = beta;\n this.userCode = `\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int r = coords[1];\n int c = coords[2];\n\n float result = 0.0;\n for (int d = 0; d < ${this.depth}; ++d) {\n int depthBegin = int(max(0.0, float(d - ${depthRadius})));\n int depthEnd = int(min(float(${this.depth}),\n float(d + ${depthRadius} + 1)));\n\n const int MIN_DEPTH_BEGIN = 0;\n const int MAX_DEPTH_END = ${this.depth};\n\n float norm = 0.0;\n for (int k = MIN_DEPTH_BEGIN; k < MAX_DEPTH_END; ++k) {\n if (k < depthBegin){\n continue;\n }\n else if (k >= depthBegin && k < depthEnd) {\n norm += getInputImage(b, r, c, k) * getInputImage(b, r, c, k);\n }\n else {\n break;\n }\n }\n\n norm = float(${alpha}) * norm + float(${bias});\n\n for(int k = MIN_DEPTH_BEGIN; k < MAX_DEPTH_END; ++k){\n if (k < depthBegin){\n continue;\n }\n else if (k >= depthBegin && k < depthEnd){\n float dyi = -2.0 * float(${alpha})\n * float(${beta})\n * getInputImage(b ,r ,c, k) * getOutputImage(b, r, c, d)\n / norm;\n if (k == d) {\n dyi += pow(norm, -1.0 * ${beta});\n }\n if (k == coords[3]) {\n dyi *= getDy(b, r, c, d);\n result += dyi;\n }\n }\n else {\n break;\n }\n }\n }\n setOutput(result);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/LRNGrad.js\nvar lrnGrad = (args) => {\n const { inputs, backend: backend2, attrs } = args;\n const { x, y, dy } = inputs;\n const { depthRadius, bias, alpha, beta } = attrs;\n const program = new LRNGradProgram(x.shape, depthRadius, bias, alpha, beta);\n return backend2.runWebGLProgram(program, [x, y, dy], x.dtype);\n};\nvar LRNGradConfig2 = {\n kernelName: LRNGrad,\n backendName: \"webgl\",\n kernelFunc: lrnGrad\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Max_impl.js\nfunction maxImpl2(x, reduceShape, outShape, backend2) {\n const inSize = util_exports.sizeFromShape(reduceShape);\n const xSize = util_exports.sizeFromShape(x.shape);\n const batchSize = xSize / inSize;\n const reshapedInput = reshape4({ inputs: { x }, attrs: { shape: [batchSize, inSize] }, backend: backend2 });\n const reduced = reduce(reshapedInput, x.dtype, \"max\", backend2);\n const reshapedOutput = reshape4({ inputs: { x: reduced }, attrs: { shape: outShape }, backend: backend2 });\n backend2.disposeIntermediateTensorInfo(reshapedInput);\n backend2.disposeIntermediateTensorInfo(reduced);\n return reshapedOutput;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Max.js\nfunction max4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { reductionIndices, keepDims } = attrs;\n const xRank = x.shape.length;\n const origAxes = util_exports.parseAxisParam(reductionIndices, x.shape);\n let axes = origAxes;\n const permutedAxes = backend_util_exports.getAxesPermutation(axes, xRank);\n const maxInputIsTransposed = permutedAxes != null;\n const shouldExecuteOnCPU = backend2.shouldExecuteOnCPU([x]);\n let maxInput = x;\n if (maxInputIsTransposed) {\n if (shouldExecuteOnCPU) {\n const xTexData = backend2.texData.get(maxInput.dataId);\n const values = xTexData.values;\n const newShape = new Array(xRank);\n for (let i2 = 0; i2 < newShape.length; i2++) {\n newShape[i2] = x.shape[permutedAxes[i2]];\n }\n const maxInputValues = transposeImplCPU(values, x.shape, x.dtype, permutedAxes, newShape);\n maxInput = backend2.makeTensorInfo(newShape, x.dtype);\n const maxInputData = backend2.texData.get(maxInput.dataId);\n maxInputData.values = maxInputValues;\n } else {\n maxInput = transposeImpl2(x, permutedAxes, backend2);\n }\n axes = backend_util_exports.getInnerMostAxes(axes.length, xRank);\n }\n backend_util_exports.assertAxesAreInnerMostDims(\"max\", axes, xRank);\n const [maxOutShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes(maxInput.shape, axes);\n let outShape = maxOutShape;\n if (keepDims) {\n outShape = backend_util_exports.expandShapeToKeepDim(maxOutShape, origAxes);\n }\n let out;\n if (shouldExecuteOnCPU) {\n const xTexData = backend2.texData.get(maxInput.dataId);\n const values = xTexData.values;\n const outValues = maxImplCPU(values, util_exports.sizeFromShape(reduceShape), outShape, x.dtype);\n out = backend2.makeTensorInfo(outShape, x.dtype);\n const outData = backend2.texData.get(out.dataId);\n outData.values = outValues;\n } else {\n out = maxImpl2(maxInput, reduceShape, outShape, backend2);\n }\n if (maxInputIsTransposed) {\n backend2.disposeIntermediateTensorInfo(maxInput);\n }\n return out;\n}\nvar maxConfig2 = {\n kernelName: Max,\n backendName: \"webgl\",\n kernelFunc: max4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Maximum.js\nvar MAXIMUM = CHECK_NAN_SNIPPET2 + `\n return max(a, b);\n`;\nvar MAXIMUM_PACKED = `\n vec4 result = vec4(max(a, b));\n bvec4 isNaNA = isnan(a);\n bvec4 isNaNB = isnan(b);\n bvec4 isNaN = bvec4(isNaNA.x || isNaNB.x, isNaNA.y || isNaNB.y, isNaNA.z || isNaNB.z, isNaNA.w || isNaNB.w);\n ` + CHECK_NAN_SNIPPET_PACKED + `\n return result;\n`;\nvar maximum4 = binaryKernelFunc2({\n opSnippet: MAXIMUM,\n packedOpSnippet: MAXIMUM_PACKED,\n cpuKernelImpl: maximumImplCPU\n});\nvar maximumConfig2 = {\n kernelName: Maximum,\n backendName: \"webgl\",\n kernelFunc: maximum4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/MaxPool.js\nfunction maxPool3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n assertNotComplex2(x, \"maxPool\");\n const { filterSize, strides, pad: pad3, dimRoundingMode } = attrs;\n const dilations = 1;\n util_exports.assert(backend_util_exports.eitherStridesOrDilationsAreOne(strides, dilations), () => `Error in maxPool: Either strides or dilations must be 1. Got strides ${strides} and dilations '${dilations}'`);\n const convInfo = backend_util_exports.computePool2DInfo(x.shape, filterSize, strides, dilations, pad3, dimRoundingMode);\n if (convInfo.filterWidth === 1 && convInfo.filterHeight === 1 && util_exports.arraysEqual(convInfo.inShape, convInfo.outShape)) {\n return identity3({ inputs: { x }, backend: backend2 });\n }\n const maxPoolProgram = new Pool2DProgram(convInfo, \"max\", false);\n return backend2.runWebGLProgram(maxPoolProgram, [x], x.dtype);\n}\nvar maxPoolConfig2 = {\n kernelName: MaxPool,\n backendName: \"webgl\",\n kernelFunc: maxPool3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/MaxPool3D.js\nfunction maxPool3d2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { filterSize, strides, pad: pad3, dataFormat, dimRoundingMode } = attrs;\n const dilations = [1, 1, 1];\n const convInfo = backend_util_exports.computePool3DInfo(x.shape, filterSize, strides, dilations, pad3, dimRoundingMode, dataFormat);\n const maxPoolProgram = new Pool3DProgram(convInfo, \"max\", false);\n return backend2.runWebGLProgram(maxPoolProgram, [x], x.dtype);\n}\nvar maxPool3DConfig2 = {\n kernelName: MaxPool3D,\n backendName: \"webgl\",\n kernelFunc: maxPool3d2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/max_pool_backprop_gpu.js\nvar MaxPool2DBackpropProgram = class {\n constructor(convInfo) {\n this.variableNames = [\"dy\", \"maxPos\"];\n this.outputShape = convInfo.inShape;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const dilationHeight = convInfo.dilationHeight;\n const effectiveFilterHeight = convInfo.effectiveFilterHeight;\n const effectiveFilterWidth = convInfo.effectiveFilterWidth;\n const padTop = effectiveFilterHeight - 1 - convInfo.padInfo.top;\n const padLeft = effectiveFilterWidth - 1 - convInfo.padInfo.left;\n const lastIndex = effectiveFilterHeight * effectiveFilterWidth - 1;\n this.userCode = `\n const ivec2 pads = ivec2(${padTop}, ${padLeft});\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n\n ivec2 dyRCCorner = coords.yz - pads;\n int dyRCorner = dyRCCorner.x;\n int dyCCorner = dyRCCorner.y;\n\n // Convolve dy(?, ?, d) with pos mask(:, :, d) to get dx(xR, xC, d).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n for (int wR = 0; wR < ${effectiveFilterHeight};\n wR += ${dilationHeight}) {\n float dyR = float(dyRCorner + wR) / ${strideHeight}.0;\n\n if (dyR < 0.0 || dyR >= ${convInfo.outHeight}.0 || fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n for (int wC = 0; wC < ${effectiveFilterWidth}; wC++) {\n float dyC = float(dyCCorner + wC) / ${strideWidth}.0;\n\n if (dyC < 0.0 || dyC >= ${convInfo.outWidth}.0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n float dyValue = getDy(b, idyR, idyC, d);\n int maxPosValue = ${lastIndex} - int(getMaxPos(b, idyR, idyC, d));\n\n // Get the current value, check it against the value from the\n // position matrix.\n int curPosValue = wR * ${effectiveFilterWidth} + wC;\n float mask = float(maxPosValue == curPosValue ? 1.0 : 0.0);\n\n dotProd += dyValue * mask;\n }\n }\n setOutput(dotProd);\n }\n `;\n }\n};\nvar MaxPool3DBackpropProgram = class {\n constructor(convInfo) {\n this.variableNames = [\"dy\", \"maxPos\"];\n this.outputShape = convInfo.inShape;\n const strideDepth = convInfo.strideDepth;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const dilationDepth = convInfo.dilationDepth;\n const dilationHeight = convInfo.dilationHeight;\n const dilationWidth = convInfo.dilationWidth;\n const effectiveFilterDepth = convInfo.effectiveFilterDepth;\n const effectiveFilterHeight = convInfo.effectiveFilterHeight;\n const effectiveFilterWidth = convInfo.effectiveFilterWidth;\n const padFront = effectiveFilterDepth - 1 - convInfo.padInfo.front;\n const padTop = effectiveFilterHeight - 1 - convInfo.padInfo.top;\n const padLeft = effectiveFilterWidth - 1 - convInfo.padInfo.left;\n const lastIndex = effectiveFilterDepth * effectiveFilterHeight * effectiveFilterWidth - 1;\n this.userCode = `\n const ivec3 pads = ivec3(${padFront}, ${padTop}, ${padLeft});\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int ch = coords.u;\n\n ivec3 dyCorner = ivec3(coords.y, coords.z, coords.w) - pads;\n int dyDCorner = dyCorner.x;\n int dyRCorner = dyCorner.y;\n int dyCCorner = dyCorner.z;\n\n // Convolve dy(?, ?, ?, ch) with pos mask(:, :, :, d) to get\n // dx(xD, xR, xC, ch).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n\n for (int wD = 0; wD < ${effectiveFilterDepth};\n wD += ${dilationDepth}) {\n float dyD = float(dyDCorner + wD) / ${strideDepth}.0;\n\n if (dyD < 0.0 || dyD >= ${convInfo.outDepth}.0 || fract(dyD) > 0.0) {\n continue;\n }\n int idyD = int(dyD);\n\n for (int wR = 0; wR < ${effectiveFilterHeight};\n wR += ${dilationHeight}) {\n float dyR = float(dyRCorner + wR) / ${strideHeight}.0;\n\n if (dyR < 0.0 || dyR >= ${convInfo.outHeight}.0 ||\n fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n for (int wC = 0; wC < ${effectiveFilterWidth};\n wC += ${dilationWidth}) {\n float dyC = float(dyCCorner + wC) / ${strideWidth}.0;\n\n if (dyC < 0.0 || dyC >= ${convInfo.outWidth}.0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n float dyValue = getDy(batch, idyD, idyR, idyC, ch);\n int maxPosValue = ${lastIndex} -\n int(getMaxPos(batch, idyD, idyR, idyC, ch));\n\n // Get the current value, check it against the value from the\n // position matrix.\n int curPosValue =\n wD * ${effectiveFilterHeight} * ${effectiveFilterWidth} +\n wR * ${effectiveFilterWidth} + wC;\n float mask = float(maxPosValue == curPosValue ? 1.0 : 0.0);\n\n dotProd += dyValue * mask;\n }\n }\n }\n setOutput(dotProd);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/MaxPool3DGrad.js\nfunction maxPool3DGrad2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { dy, input: input2 } = inputs;\n const x = input2;\n const { filterSize, strides, pad: pad3, dimRoundingMode } = attrs;\n const dilations = [1, 1, 1];\n const convInfo = backend_util_exports.computePool3DInfo(x.shape, filterSize, strides, dilations, pad3, dimRoundingMode);\n const maxPool3dPositionsProgram = new Pool3DProgram(convInfo, \"max\", true);\n const maxPool3dPositions2 = backend2.runWebGLProgram(maxPool3dPositionsProgram, [x], x.dtype);\n const maxPoolBackpropProgram = new MaxPool3DBackpropProgram(convInfo);\n const result = backend2.runWebGLProgram(maxPoolBackpropProgram, [dy, maxPool3dPositions2], x.dtype);\n backend2.disposeIntermediateTensorInfo(maxPool3dPositions2);\n return result;\n}\nvar maxPool3DGradConfig3 = {\n kernelName: MaxPool3DGrad,\n backendName: \"webgl\",\n kernelFunc: maxPool3DGrad2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/MaxPoolGrad.js\nfunction maxPoolGrad3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { dy, input: input2, output } = inputs;\n const x = input2;\n assertNotComplex2([input2, output], \"maxPoolGrad\");\n const { filterSize, strides, pad: pad3, dimRoundingMode } = attrs;\n const convInfo = backend_util_exports.computePool2DInfo(x.shape, filterSize, strides, 1, pad3, dimRoundingMode);\n const getPositions = true;\n const maxPoolPositionsProgram = new Pool2DProgram(convInfo, \"max\", getPositions);\n const maxPoolPositions2 = backend2.runWebGLProgram(maxPoolPositionsProgram, [x], x.dtype);\n const maxPoolBackPropProgram = new MaxPool2DBackpropProgram(convInfo);\n const result = backend2.runWebGLProgram(maxPoolBackPropProgram, [dy, maxPoolPositions2], x.dtype);\n backend2.disposeIntermediateTensorInfo(maxPoolPositions2);\n return result;\n}\nvar maxPoolGradConfig3 = {\n kernelName: MaxPoolGrad,\n backendName: \"webgl\",\n kernelFunc: maxPoolGrad3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/MaxPoolWithArgmax_impl.js\nfunction maxPoolWithArgmaxImpl2(x, includeBatchInIndex, convInfo, backend2) {\n let program = new Pool2DProgram(convInfo, \"max\", false);\n const poolOutput = backend2.runWebGLProgram(program, [x], \"float32\");\n program = new Pool2DProgram(convInfo, \"max\", true, true, includeBatchInIndex);\n const indexOutput = backend2.runWebGLProgram(program, [x], \"float32\");\n return [poolOutput, indexOutput];\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/MaxPoolWithArgmax.js\nvar maxPoolWithArgmaxConfig2 = {\n kernelName: MaxPoolWithArgmax,\n backendName: \"webgl\",\n kernelFunc: ({ inputs, attrs, backend: backend2 }) => {\n const { x } = inputs;\n const { filterSize, strides, pad: pad3, includeBatchInIndex } = attrs;\n const webglBackend = backend2;\n util_exports.assert(x.shape.length === 4, () => `Error in maxPool: input must be rank 4 but got rank ${x.shape.length}.`);\n const dilations = [1, 1];\n util_exports.assert(backend_util_exports.eitherStridesOrDilationsAreOne(strides, dilations), () => `Error in maxPool: Either strides or dilations must be 1. Got strides ${strides} and dilations '${dilations}'`);\n const convInfo = backend_util_exports.computePool2DInfo(x.shape, filterSize, strides, dilations, pad3);\n const [result, indexes] = maxPoolWithArgmaxImpl2(x, includeBatchInIndex, convInfo, webglBackend);\n return [result, indexes];\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Mean_impl.js\nfunction meanImpl(x, reduceShape, outShape, backend2) {\n const inSize = util_exports.sizeFromShape(reduceShape);\n const xSize = util_exports.sizeFromShape(x.shape);\n const batchSize = xSize / inSize;\n const reshapedInput = reshape4({ inputs: { x }, attrs: { shape: [batchSize, inSize] }, backend: backend2 });\n const reduced = reduce(reshapedInput, \"float32\", \"mean\", backend2);\n const reshapedOutput = reshape4({ inputs: { x: reduced }, attrs: { shape: outShape }, backend: backend2 });\n backend2.disposeIntermediateTensorInfo(reshapedInput);\n backend2.disposeIntermediateTensorInfo(reduced);\n return reshapedOutput;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Mean.js\nvar meanConfig2 = {\n kernelName: Mean,\n backendName: \"webgl\",\n kernelFunc: ({ inputs, attrs, backend: backend2 }) => {\n const { x } = inputs;\n const { keepDims, axis } = attrs;\n const webglBackend = backend2;\n const xRank = x.shape.length;\n const origAxes = util_exports.parseAxisParam(axis, x.shape);\n let axes = origAxes;\n const permutedAxes = backend_util_exports.getAxesPermutation(axes, xRank);\n const meanInputIsTransposed = permutedAxes != null;\n const shouldExecuteOnCPU = webglBackend.shouldExecuteOnCPU([x]);\n const intermediates = [];\n let meanInput = x;\n if (meanInputIsTransposed) {\n if (shouldExecuteOnCPU) {\n const xTexData = webglBackend.texData.get(meanInput.dataId);\n const values = xTexData.values;\n const newShape = new Array(xRank);\n for (let i2 = 0; i2 < newShape.length; i2++) {\n newShape[i2] = x.shape[permutedAxes[i2]];\n }\n const meanInputValues = transposeImplCPU(values, x.shape, x.dtype, permutedAxes, newShape);\n meanInput = webglBackend.makeTensorInfo(newShape, x.dtype);\n const meanInputData = webglBackend.texData.get(meanInput.dataId);\n meanInputData.values = meanInputValues;\n } else {\n meanInput = transposeImpl2(x, permutedAxes, webglBackend);\n }\n intermediates.push(meanInput);\n axes = backend_util_exports.getInnerMostAxes(axes.length, xRank);\n }\n backend_util_exports.assertAxesAreInnerMostDims(\"sum\", axes, xRank);\n const [meanOutShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes(meanInput.shape, axes);\n let outShape = meanOutShape;\n if (keepDims) {\n outShape = backend_util_exports.expandShapeToKeepDim(meanOutShape, origAxes);\n }\n const out = meanImpl(meanInput, reduceShape, outShape, webglBackend);\n for (const i2 of intermediates) {\n webglBackend.disposeIntermediateTensorInfo(i2);\n }\n return out;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Min.js\nfunction min4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis, keepDims } = attrs;\n const xRank = x.shape.length;\n const origAxes = util_exports.parseAxisParam(axis, x.shape);\n let axes = origAxes;\n const permutedAxes = backend_util_exports.getAxesPermutation(axes, xRank);\n let permutedX = x;\n if (permutedAxes != null) {\n permutedX = transpose3({ inputs: { x }, backend: backend2, attrs: { perm: permutedAxes } });\n axes = backend_util_exports.getInnerMostAxes(axes.length, x.shape.length);\n }\n backend_util_exports.assertAxesAreInnerMostDims(\"min\", axes, xRank);\n const [outShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes(permutedX.shape, axes);\n const inSize = util_exports.sizeFromShape(reduceShape);\n const a2D = reshape4({ inputs: { x: permutedX }, backend: backend2, attrs: { shape: [-1, inSize] } });\n const reduced = reduce(a2D, a2D.dtype, \"min\", backend2);\n let res;\n if (keepDims) {\n const newShape = backend_util_exports.expandShapeToKeepDim(outShape, origAxes);\n res = reshape4({ inputs: { x: reduced }, backend: backend2, attrs: { shape: newShape } });\n } else {\n res = reshape4({ inputs: { x: reduced }, backend: backend2, attrs: { shape: outShape } });\n }\n backend2.disposeIntermediateTensorInfo(a2D);\n backend2.disposeIntermediateTensorInfo(reduced);\n if (permutedAxes != null) {\n backend2.disposeIntermediateTensorInfo(permutedX);\n }\n return res;\n}\nvar minConfig2 = {\n kernelName: Min,\n backendName: \"webgl\",\n kernelFunc: min4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Minimum.js\nvar MINIMUM = CHECK_NAN_SNIPPET2 + `\n return min(a, b);\n`;\nvar MINIMUM_PACKED = `\n vec4 result = vec4(min(a, b));\n bvec4 isNaNA = isnan(a);\n bvec4 isNaNB = isnan(b);\n bvec4 isNaN = bvec4(isNaNA.x || isNaNB.x, isNaNA.y || isNaNB.y, isNaNA.z || isNaNB.z, isNaNA.w || isNaNB.w);\n ` + CHECK_NAN_SNIPPET_PACKED + `\n return result;\n`;\nvar minimum4 = binaryKernelFunc2({\n opSnippet: MINIMUM,\n packedOpSnippet: MINIMUM_PACKED,\n cpuKernelImpl: minimumImplCPU\n});\nvar minimumConfig2 = {\n kernelName: Minimum,\n backendName: \"webgl\",\n kernelFunc: minimum4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/mirror_pad_gpu.js\nvar MirrorPadProgram = class {\n constructor(xShape, paddings, mode) {\n this.variableNames = [\"x\"];\n this.outputShape = paddings.map((p2, i2) => p2[0] + xShape[i2] + p2[1]);\n const rank = xShape.length;\n const dtype = getCoordsDataType(rank);\n const start = paddings.map((p2) => p2[0]).join(\",\");\n const end = paddings.map((p2, i2) => p2[0] + xShape[i2]).join(\",\");\n const unpackedCoords = [\"coords[0]\", \"coords[1]\", \"coords[2]\", \"coords[3]\"].slice(0, rank);\n const offset = mode === \"reflect\" ? 0 : 1;\n if (rank === 1) {\n this.userCode = `\n int start = ${start};\n int end = ${end};\n\n void main() {\n int outC = getOutputCoords();\n if (outC < start) {\n outC = start * 2 - outC - ${offset};\n } else if(outC >= end) {\n outC = (end - 1) * 2 - outC + ${offset};\n }\n setOutput(getX(outC - start));\n }\n `;\n return;\n }\n this.userCode = `\n ${dtype} start = ${dtype}(${start});\n ${dtype} end = ${dtype}(${end});\n\n void main() {\n ${dtype} outC = getOutputCoords();\n for (int i = 0; i < ${rank}; i++) {\n if (outC[i] < start[i]) {\n outC[i] = start[i] * 2 - outC[i] - ${offset};\n } else if(outC[i] >= end[i]) {\n outC[i] = (end[i] - 1) * 2 - outC[i] + ${offset};\n }\n }\n ${dtype} coords = outC - start;\n setOutput(getX(${unpackedCoords}));\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/mirror_pad_packed_gpu.js\nvar MirrorPadPackedProgram = class {\n constructor(xShape, paddings, mode) {\n this.variableNames = [\"x\"];\n this.packedInputs = true;\n this.packedOutput = true;\n this.outputShape = paddings.map((p2, i2) => p2[0] + xShape[i2] + p2[1]);\n const rank = xShape.length;\n const dtype = getCoordsDataType(rank);\n const start = paddings.map((p2) => p2[0]).join(\",\");\n const end = paddings.map((p2, i2) => p2[0] + xShape[i2]).join(\",\");\n const coords3 = getChannels(\"rc\", rank);\n const source = getChannels(\"source\", rank);\n const cLimit = `${coords3[rank - 1]} < ${this.outputShape[rank - 1]}`;\n const innerDims = rank === 1 ? \"source\" : `vec2(${source.slice(-2).join()})`;\n const offset = mode === \"reflect\" ? 0 : 1;\n let mainLoop = \"\";\n if (rank === 1) {\n const padSetup = `\n ${dtype} source = rc;\n if (source < start) {\n source = start * 2 - source - ${offset};\n } else if (source >= end) {\n source = (end - 1) * 2 - source + ${offset};\n }\n source -= start;\n `;\n mainLoop = `\n ${dtype} rc = outputLoc;\n ${padSetup}\n result[0] = getChannel(getX(${source.join()}), ${innerDims});\n ${coords3[rank - 1]} += 1;\n if(${cLimit}) {\n ${padSetup}\n result[1] = getChannel(getX(${source.join()}), ${innerDims});\n }\n `;\n } else {\n const padSetup = `\n ${dtype} source = rc;\n ${dtype} lt = ${dtype}(lessThan(source, start));\n ${dtype} gte = ${dtype}(greaterThanEqual(source, end));\n ${dtype} orig = 1 - (lt + gte);\n source = orig * source +\n lt * (start * 2 - source - ${offset}) +\n gte * ((end - 1) * 2 - source + ${offset});\n source -= start;\n `;\n mainLoop = `\n ${dtype} rc = outputLoc;\n ${padSetup}\n result[0] = getChannel(getX(${source.join()}), ${innerDims});\n ${coords3[rank - 1]} += 1;\n if(${cLimit}) {\n ${padSetup}\n result[1] = getChannel(getX(${source.join()}), ${innerDims});\n }\n rc = outputLoc;\n ${coords3[rank - 2]} += 1;\n if(${coords3[rank - 2]} < ${this.outputShape[rank - 2]}) {\n ${padSetup}\n result[2] = getChannel(getX(${source.join()}), ${innerDims});\n ${coords3[rank - 1]} += 1;\n if(${cLimit}) {\n ${padSetup}\n result[3] = getChannel(getX(${source.join()}), ${innerDims});\n }\n }\n `;\n }\n this.userCode = `\n const ${dtype} start = ${dtype}(${start});\n const ${dtype} end = ${dtype}(${end});\n\n void main() {\n ${dtype} outputLoc = getOutputCoords();\n vec4 result = vec4(0.);\n ${mainLoop}\n setOutput(result);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/MirrorPad.js\nvar mirrorPadKernelFunc = ({ inputs, backend: backend2, attrs }) => {\n const { x } = inputs;\n const { paddings, mode } = attrs;\n const program = env().getBool(\"WEBGL_PACK_ARRAY_OPERATIONS\") ? new MirrorPadPackedProgram(x.shape, paddings, mode) : new MirrorPadProgram(x.shape, paddings, mode);\n const output = backend2.runWebGLProgram(program, [x], x.dtype);\n return output;\n};\nvar mirrorPadConfig2 = {\n kernelName: MirrorPad,\n backendName: \"webgl\",\n kernelFunc: mirrorPadKernelFunc\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Mod.js\nvar MOD = `if (b == 0.0) return NAN;\n return mod(a, b);`;\nvar MOD_PACKED = `\n vec4 result = mod(a, b);\n bvec4 isNaN = equal(b, vec4(0.0));\n ` + CHECK_NAN_SNIPPET_PACKED + `\n return result;\n`;\nvar mod3 = binaryKernelFunc2({\n opSnippet: MOD,\n packedOpSnippet: MOD_PACKED\n});\nvar modConfig2 = {\n kernelName: Mod,\n backendName: \"webgl\",\n kernelFunc: mod3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/multinomial_gpu.js\nvar MultinomialProgram = class {\n constructor(batchSize, numOutcomes, numSamples) {\n this.variableNames = [\"probs\"];\n this.customUniforms = [{ name: \"seed\", type: \"float\" }];\n this.outputShape = [batchSize, numSamples];\n this.userCode = `\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n\n float r = random(seed);\n float cdf = 0.0;\n\n for (int i = 0; i < ${numOutcomes - 1}; i++) {\n cdf += getProbs(batch, i);\n\n if (r < cdf) {\n setOutput(float(i));\n return;\n }\n }\n\n // If no other event happened, last event happened.\n setOutput(float(${numOutcomes - 1}));\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/RealDiv.js\nvar DIV = `\nif (a == b) {\n return 1.0;\n};\nreturn a / b;`;\nvar DIV_PACKED = `\n // vec4 one = vec4(equal(a, b));\n // return one + (vec4(1.0) - one) * a / b;\n vec4 result = a / b;\n if(a.x == b.x) {\n result.x = 1.;\n }\n if(a.y == b.y) {\n result.y = 1.;\n }\n if(a.z == b.z) {\n result.z = 1.;\n }\n if(a.w == b.w) {\n result.w = 1.;\n }\n\n return result;\n`;\nvar realDiv = binaryKernelFunc2({ opSnippet: DIV, packedOpSnippet: DIV_PACKED, checkOutOfBounds: true });\nvar realDivConfig2 = {\n kernelName: RealDiv,\n backendName: \"webgl\",\n kernelFunc: realDiv\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Sub.js\nvar SUB = \"return a - b;\";\nvar sub3 = binaryKernelFunc2({\n opSnippet: SUB,\n packedOpSnippet: SUB,\n supportsComplex: true,\n cpuKernelImpl: subImplCPU\n});\nvar subConfig2 = {\n kernelName: Sub,\n backendName: \"webgl\",\n kernelFunc: sub3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Softmax.js\nfunction softmax4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { logits } = inputs;\n const { dim } = attrs;\n const axes = util_exports.parseAxisParam([dim], logits.shape);\n const maxLogit = max4({\n inputs: { x: logits },\n backend: backend2,\n attrs: { reductionIndices: axes, keepDims: false }\n });\n const expandedShape = backend_util_exports.expandShapeToKeepDim(maxLogit.shape, axes);\n const maxLogitsReshaped = reshape4({ inputs: { x: maxLogit }, backend: backend2, attrs: { shape: expandedShape } });\n const a = sub3({ inputs: { a: logits, b: maxLogitsReshaped }, backend: backend2 });\n const b = exp3({ inputs: { x: a }, backend: backend2 });\n const sumExp = sum4({ inputs: { x: b }, backend: backend2, attrs: { axis: axes, keepDims: false } });\n const sumExpReshaped = reshape4({ inputs: { x: sumExp }, backend: backend2, attrs: { shape: expandedShape } });\n const res = realDiv({ inputs: { a: b, b: sumExpReshaped }, backend: backend2 });\n backend2.disposeIntermediateTensorInfo(maxLogit);\n backend2.disposeIntermediateTensorInfo(maxLogitsReshaped);\n backend2.disposeIntermediateTensorInfo(a);\n backend2.disposeIntermediateTensorInfo(b);\n backend2.disposeIntermediateTensorInfo(sumExp);\n backend2.disposeIntermediateTensorInfo(sumExpReshaped);\n return res;\n}\nvar softmaxConfig2 = {\n kernelName: Softmax,\n backendName: \"webgl\",\n kernelFunc: softmax4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Multinomial.js\nfunction multinomial3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { logits } = inputs;\n const { numSamples, seed, normalized } = attrs;\n const probs = normalized ? logits : softmax4({ inputs: { logits }, backend: backend2, attrs: { dim: logits.shape.length - 1 } });\n const batchSize = probs.shape[0];\n const numOutcomes = probs.shape[1];\n const program = new MultinomialProgram(batchSize, numOutcomes, numSamples);\n const customValues = [[seed]];\n const res = backend2.runWebGLProgram(program, [probs], \"int32\", customValues);\n if (!normalized) {\n backend2.disposeIntermediateTensorInfo(probs);\n }\n return res;\n}\nvar multinomialConfig2 = {\n kernelName: Multinomial,\n backendName: \"webgl\",\n kernelFunc: multinomial3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Neg.js\nvar NEG = CHECK_NAN_SNIPPET + `\n return -x;\n`;\nvar NEG_PACKED = `\n vec4 result = -x;\n bvec4 isNaN = isnan(x);\n\n result.r = isNaN.r ? x.r : result.r;\n result.g = isNaN.g ? x.g : result.g;\n result.b = isNaN.b ? x.b : result.b;\n result.a = isNaN.a ? x.a : result.a;\n\n return result;\n`;\nfunction neg3(args) {\n const { inputs, backend: backend2 } = args;\n const { x } = inputs;\n if (backend2.shouldExecuteOnCPU([x])) {\n const xData = backend2.texData.get(x.dataId);\n const [outValues, newShape] = negImplCPU(xData.values, x.shape, x.dtype);\n return backend2.makeTensorInfo(newShape, x.dtype, outValues);\n }\n let program;\n if (env().getBool(\"WEBGL_PACK_UNARY_OPERATIONS\")) {\n program = new UnaryOpPackedProgram(x.shape, NEG_PACKED);\n } else {\n program = new UnaryOpProgram(x.shape, NEG);\n }\n return backend2.runWebGLProgram(program, [x], x.dtype);\n}\nvar negConfig2 = {\n kernelName: Neg,\n backendName: \"webgl\",\n kernelFunc: neg3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/NonMaxSuppressionV3.js\nvar nonMaxSuppressionV3Impl3 = kernel_impls_exports.nonMaxSuppressionV3Impl;\nfunction nonMaxSuppressionV32(args) {\n backend_util_exports.warn(\"tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead\");\n const { inputs, backend: backend2, attrs } = args;\n const { boxes, scores } = inputs;\n const { maxOutputSize, iouThreshold, scoreThreshold } = attrs;\n const boxesVals = backend2.readSync(boxes.dataId);\n const scoresVals = backend2.readSync(scores.dataId);\n const { selectedIndices } = nonMaxSuppressionV3Impl3(boxesVals, scoresVals, maxOutputSize, iouThreshold, scoreThreshold);\n return backend2.makeTensorInfo([selectedIndices.length], \"int32\", new Int32Array(selectedIndices));\n}\nvar nonMaxSuppressionV3Config2 = {\n kernelName: NonMaxSuppressionV3,\n backendName: \"webgl\",\n kernelFunc: nonMaxSuppressionV32\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/NonMaxSuppressionV4.js\nvar nonMaxSuppressionV4Impl3 = kernel_impls_exports.nonMaxSuppressionV4Impl;\nfunction nonMaxSuppressionV42(args) {\n backend_util_exports.warn(\"tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead\");\n const { inputs, backend: backend2, attrs } = args;\n const { boxes, scores } = inputs;\n const { maxOutputSize, iouThreshold, scoreThreshold, padToMaxOutputSize } = attrs;\n const boxesVals = backend2.readSync(boxes.dataId);\n const scoresVals = backend2.readSync(scores.dataId);\n const { selectedIndices, validOutputs } = nonMaxSuppressionV4Impl3(boxesVals, scoresVals, maxOutputSize, iouThreshold, scoreThreshold, padToMaxOutputSize);\n return [\n backend2.makeTensorInfo([selectedIndices.length], \"int32\", new Int32Array(selectedIndices)),\n backend2.makeTensorInfo([], \"int32\", new Int32Array([validOutputs]))\n ];\n}\nvar nonMaxSuppressionV4Config2 = {\n kernelName: NonMaxSuppressionV4,\n backendName: \"webgl\",\n kernelFunc: nonMaxSuppressionV42\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/NonMaxSuppressionV5.js\nvar nonMaxSuppressionV5Impl3 = kernel_impls_exports.nonMaxSuppressionV5Impl;\nfunction nonMaxSuppressionV52(args) {\n backend_util_exports.warn(\"tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead\");\n const { inputs, backend: backend2, attrs } = args;\n const { boxes, scores } = inputs;\n const { maxOutputSize, iouThreshold, scoreThreshold, softNmsSigma } = attrs;\n const boxesVals = backend2.readSync(boxes.dataId);\n const scoresVals = backend2.readSync(scores.dataId);\n const maxOutputSizeVal = maxOutputSize;\n const iouThresholdVal = iouThreshold;\n const scoreThresholdVal = scoreThreshold;\n const softNmsSigmaVal = softNmsSigma;\n const { selectedIndices, selectedScores } = nonMaxSuppressionV5Impl3(boxesVals, scoresVals, maxOutputSizeVal, iouThresholdVal, scoreThresholdVal, softNmsSigmaVal);\n return [\n backend2.makeTensorInfo([selectedIndices.length], \"int32\", new Int32Array(selectedIndices)),\n backend2.makeTensorInfo([selectedScores.length], \"float32\", new Float32Array(selectedScores))\n ];\n}\nvar nonMaxSuppressionV5Config2 = {\n kernelName: NonMaxSuppressionV5,\n backendName: \"webgl\",\n kernelFunc: nonMaxSuppressionV52\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/onehot_gpu.js\nvar OneHotProgram = class {\n constructor(numIndices, depth, onValue, offValue) {\n this.variableNames = [\"indices\"];\n this.outputShape = [numIndices, depth];\n this.userCode = `\n void main() {\n ivec2 coords = getOutputCoords();\n int index = round(getIndices(coords.x));\n setOutput(mix(float(${offValue}), float(${onValue}),\n float(index == coords.y)));\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/OneHot.js\nvar oneHot3 = (args) => {\n const { inputs, backend: backend2, attrs } = args;\n const { indices } = inputs;\n const { dtype, depth, onValue, offValue } = attrs;\n const indicesSize = util_exports.sizeFromShape(indices.shape);\n const program = new OneHotProgram(indicesSize, depth, onValue, offValue);\n const reshaped = reshape4({ inputs: { x: indices }, backend: backend2, attrs: { shape: [indicesSize] } });\n const result = backend2.runWebGLProgram(program, [reshaped], dtype);\n backend2.disposeIntermediateTensorInfo(reshaped);\n const outShape = [...indices.shape, depth];\n const out = reshape4({ inputs: { x: result }, backend: backend2, attrs: { shape: outShape } });\n backend2.disposeIntermediateTensorInfo(result);\n return out;\n};\nvar oneHotConfig2 = {\n kernelName: OneHot,\n backendName: \"webgl\",\n kernelFunc: oneHot3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ZerosLike.js\nfunction zerosLike3(args) {\n const { inputs, backend: backend2 } = args;\n const { x } = inputs;\n if (x.dtype === \"complex64\") {\n const realPart = real3({ inputs: { input: x }, backend: backend2 });\n const r2 = zerosLike3({ inputs: { x: realPart }, backend: backend2 });\n const imagPart = imag3({ inputs: { input: x }, backend: backend2 });\n const i2 = zerosLike3({ inputs: { x: imagPart }, backend: backend2 });\n const result = complex3({ inputs: { real: r2, imag: i2 }, backend: backend2 });\n backend2.disposeIntermediateTensorInfo(realPart);\n backend2.disposeIntermediateTensorInfo(r2);\n backend2.disposeIntermediateTensorInfo(imagPart);\n backend2.disposeIntermediateTensorInfo(i2);\n return result;\n } else {\n return fill3({\n attrs: {\n shape: x.shape,\n dtype: x.dtype,\n value: x.dtype === \"string\" ? \"\" : 0\n },\n backend: backend2\n });\n }\n}\nvar zerosLikeConfig2 = {\n kernelName: ZerosLike,\n backendName: \"webgl\",\n kernelFunc: zerosLike3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/OnesLike.js\nfunction onesLike3(args) {\n const { inputs, backend: backend2 } = args;\n const { x } = inputs;\n if (x.dtype === \"string\") {\n throw new Error(\"onesLike is not supported under string dtype\");\n } else if (x.dtype === \"complex64\") {\n const realPart = real3({ inputs: { input: x }, backend: backend2 });\n const r2 = onesLike3({ inputs: { x: realPart }, backend: backend2 });\n const imagPart = imag3({ inputs: { input: x }, backend: backend2 });\n const i2 = zerosLike3({ inputs: { x: imagPart }, backend: backend2 });\n const result = complex3({ inputs: { real: r2, imag: i2 }, backend: backend2 });\n backend2.disposeIntermediateTensorInfo(realPart);\n backend2.disposeIntermediateTensorInfo(r2);\n backend2.disposeIntermediateTensorInfo(imagPart);\n backend2.disposeIntermediateTensorInfo(i2);\n return result;\n } else {\n return fill3({ attrs: { shape: x.shape, dtype: x.dtype, value: 1 }, backend: backend2 });\n }\n}\nvar onesLikeConfig2 = {\n kernelName: OnesLike,\n backendName: \"webgl\",\n kernelFunc: onesLike3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Pack.js\nfunction pack2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { axis } = attrs;\n if (inputs.length === 1) {\n return expandDims4({ inputs: { input: inputs[0] }, backend: backend2, attrs: { dim: axis } });\n }\n const shape = inputs[0].shape;\n const dtype = inputs[0].dtype;\n inputs.forEach((t2) => {\n util_exports.assertShapesMatch(shape, t2.shape, \"All tensors passed to stack must have matching shapes\");\n util_exports.assert(dtype === t2.dtype, () => \"All tensors passed to stack must have matching dtypes\");\n });\n const intermediateTensorInfos = [];\n const expandedTensors = inputs.map((t2) => {\n const expandedT = expandDims4({ inputs: { input: t2 }, backend: backend2, attrs: { dim: axis } });\n intermediateTensorInfos.push(expandedT);\n return expandedT;\n });\n const result = concat3({ inputs: expandedTensors, backend: backend2, attrs: { axis } });\n intermediateTensorInfos.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2));\n return result;\n}\nvar packConfig2 = {\n kernelName: Pack,\n backendName: \"webgl\",\n kernelFunc: pack2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/pad_gpu.js\nvar PadProgram = class {\n constructor(xShape, paddings, constantValue) {\n this.variableNames = [\"x\"];\n this.customUniforms = [{ name: \"value\", type: \"float\" }];\n this.outputShape = paddings.map((p2, i2) => p2[0] + xShape[i2] + p2[1]);\n const rank = xShape.length;\n const type = getCoordsDataType(rank);\n const start = paddings.map((p2) => p2[0]).join(\",\");\n const end = paddings.map((p2, i2) => p2[0] + xShape[i2]).join(\",\");\n const unpackedCoords = [\"coords[0]\", \"coords[1]\", \"coords[2]\", \"coords[3]\"].slice(0, rank);\n if (rank === 1) {\n this.userCode = `\n int start = ${start};\n int end = ${end};\n\n void main() {\n int outC = getOutputCoords();\n if (outC < start || outC >= end) {\n setOutput(value);\n } else {\n setOutput(getX(outC - start));\n }\n }\n `;\n return;\n }\n this.userCode = `\n ${type} start = ${type}(${start});\n ${type} end = ${type}(${end});\n\n void main() {\n ${type} outC = getOutputCoords();\n if (any(lessThan(outC, start)) || any(greaterThanEqual(outC, end))) {\n setOutput(value);\n } else {\n ${type} coords = outC - start;\n setOutput(getX(${unpackedCoords}));\n }\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/pad_packed_gpu.js\nvar PadPackedProgram = class {\n constructor(xShape, paddings, constantValue) {\n this.variableNames = [\"x\"];\n this.packedInputs = true;\n this.packedOutput = true;\n this.customUniforms = [{ name: \"value\", type: \"float\" }];\n this.outputShape = paddings.map((p2, i2) => p2[0] + xShape[i2] + p2[1]);\n const rank = xShape.length;\n const dtype = getCoordsDataType(rank);\n const start = paddings.map((p2) => p2[0]).join(\",\");\n const end = paddings.map((p2, i2) => p2[0] + xShape[i2]).join(\",\");\n const coords3 = getChannels(\"rc\", rank);\n const source = getChannels(\"source\", rank);\n const cLimit = `${coords3[rank - 1]} < ${this.outputShape[rank - 1]}`;\n const innerDims = rank === 1 ? \"source\" : `vec2(${source.slice(-2).join()})`;\n const componentSetup = [\n `${dtype} rc = outputLoc;`,\n `${coords3[rank - 1]} += 1;\n if(${cLimit}) {\n `,\n rank === 1 ? \"\" : `}\n rc = outputLoc;\n ${coords3[rank - 2]} += 1;\n if(${coords3[rank - 2]} < ${this.outputShape[rank - 2]}) {`,\n rank === 1 ? \"\" : ` ${coords3[rank - 1]} += 1;\n if(${cLimit}) {`\n ];\n const paddingArea = rank === 1 ? \"rc < start || rc >= end\" : \"any(lessThan(rc, start)) || any(greaterThanEqual(rc, end))\";\n let mainLoop = \"\";\n for (let i2 = 0, j = rank === 1 ? 2 : 4; i2 < j; i2++) {\n mainLoop += `\n ${componentSetup[i2]}\n if (${paddingArea}) {\n result[${i2}] = float(value);\n } else {\n ${dtype} source = rc - start;\n result[${i2}] = getChannel(getX(${source.join()}), ${innerDims});\n }\n `;\n }\n mainLoop += rank === 1 ? `} ` : `}}`;\n this.userCode = `\n const ${dtype} start = ${dtype}(${start});\n const ${dtype} end = ${dtype}(${end});\n\n void main() {\n ${dtype} outputLoc = getOutputCoords();\n vec4 result = vec4(0.);\n ${mainLoop}\n setOutput(result);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/PadV2.js\nvar padV22 = (args) => {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { paddings, constantValue } = attrs;\n if (util_exports.sizeFromShape(x.shape) === 0) {\n const outputShape = paddings.map((p2, i2) => p2[0] + x.shape[i2] + p2[1]);\n return fill3({\n backend: backend2,\n attrs: { shape: outputShape, value: constantValue, dtype: x.dtype }\n });\n }\n const program = env().getBool(\"WEBGL_PACK_ARRAY_OPERATIONS\") ? new PadPackedProgram(x.shape, paddings, constantValue) : new PadProgram(x.shape, paddings, constantValue);\n const customValues = [[constantValue]];\n return backend2.runWebGLProgram(program, [x], x.dtype, customValues);\n};\nvar padV2Config2 = {\n kernelName: PadV2,\n backendName: \"webgl\",\n kernelFunc: padV22\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Pow.js\nvar POW = `\n if(a < 0.0 && floor(b) < b){\n return NAN;\n }\n if (b == 0.0) {\n return 1.0;\n }\n return (round(mod(b, 2.0)) != 1) ?\n pow(abs(a), b) : sign(a) * pow(abs(a), b);\n`;\nvar POW_PACKED = `\n // isModRound1 has 1 for components with round(mod(b, 2.0)) == 1, 0 otherwise.\n vec4 isModRound1 = vec4(equal(round(mod(b, 2.0)), ivec4(1)));\n vec4 multiplier = sign(a) * isModRound1 + (vec4(1.0) - isModRound1);\n vec4 result = multiplier * pow(abs(a), b);\n\n // Ensure that a^0 = 1, including 0^0 = 1 as this correspond to TF and JS\n bvec4 isExpZero = equal(b, vec4(0.0));\n result.r = isExpZero.r ? 1.0 : result.r;\n result.g = isExpZero.g ? 1.0 : result.g;\n result.b = isExpZero.b ? 1.0 : result.b;\n result.a = isExpZero.a ? 1.0 : result.a;\n\n bvec4 isNaN1 = lessThan(a, vec4(0.0));\n bvec4 isNaN2 = lessThan(floor(b), b);\n bvec4 isNaN = bvec4(isNaN1.x && isNaN2.x, isNaN1.y && isNaN2.y, isNaN1.z && isNaN2.z, isNaN1.w && isNaN2.w);\n ` + CHECK_NAN_SNIPPET_PACKED + `\n return result;\n`;\nvar pow3 = binaryKernelFunc2({ opSnippet: POW, packedOpSnippet: POW_PACKED });\nvar powConfig2 = {\n kernelName: Pow,\n backendName: \"webgl\",\n kernelFunc: pow3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Prod.js\nfunction prod3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis, keepDims } = attrs;\n const xRank = x.shape.length;\n const toDispose = [];\n const origAxes = util_exports.parseAxisParam(axis, x.shape);\n let axes = origAxes;\n const permutedAxes = backend_util_exports.getAxesPermutation(axes, xRank);\n let permutedX = x;\n if (permutedAxes != null) {\n permutedX = transpose3({ inputs: { x }, backend: backend2, attrs: { perm: permutedAxes } });\n axes = backend_util_exports.getInnerMostAxes(axes.length, xRank);\n toDispose.push(permutedX);\n }\n backend_util_exports.assertAxesAreInnerMostDims(\"prod\", axes, xRank);\n let res;\n if (backend2.shouldExecuteOnCPU([permutedX])) {\n const xVals = backend2.texData.get(permutedX.dataId).values;\n const { outVals, outShape, outDtype } = prodImplCPU(permutedX.shape, permutedX.dtype, xVals, axes);\n res = backend2.makeTensorInfo(outShape, outDtype, outVals);\n } else {\n const [outShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes(permutedX.shape, axes);\n const inSize = util_exports.sizeFromShape(reduceShape);\n const a2D = reshape4({ inputs: { x: permutedX }, backend: backend2, attrs: { shape: [-1, inSize] } });\n const outputDType = sumOutType(x.dtype);\n const reduced = reduce(a2D, outputDType, \"prod\", backend2);\n res = reshape4({ inputs: { x: reduced }, backend: backend2, attrs: { shape: outShape } });\n toDispose.push(a2D);\n toDispose.push(reduced);\n }\n if (keepDims) {\n toDispose.push(res);\n const newShape = backend_util_exports.expandShapeToKeepDim(res.shape, origAxes);\n res = reshape4({ inputs: { x: res }, backend: backend2, attrs: { shape: newShape } });\n }\n toDispose.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2));\n return res;\n}\nvar prodConfig2 = {\n kernelName: Prod,\n backendName: \"webgl\",\n kernelFunc: prod3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/RaggedGather.js\nfunction raggedGather3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { paramsNestedSplits, paramsDenseValues, indices } = inputs;\n const { outputRaggedRank } = attrs;\n const $paramsNestedSplits = paramsNestedSplits.map((t2) => backend2.readSync(t2.dataId));\n const $paramsNestedSplitsShapes = paramsNestedSplits.map((t2) => t2.shape);\n const $paramsDenseValues = backend2.readSync(paramsDenseValues.dataId);\n const $indices = backend2.readSync(indices.dataId);\n const [outputNestedSplits, outputDenseValues, outputDenseValuesShape] = raggedGatherImplCPU($paramsNestedSplits, $paramsNestedSplitsShapes, $paramsDenseValues, paramsDenseValues.shape, paramsDenseValues.dtype, $indices, indices.shape, outputRaggedRank);\n const outputNestedSplitsTensors = outputNestedSplits.map((splits) => backend2.makeTensorInfo([splits.length], \"int32\", splits));\n const outputDenseValuesTensor = backend2.makeTensorInfo(outputDenseValuesShape, paramsDenseValues.dtype, outputDenseValues);\n return outputNestedSplitsTensors.concat([outputDenseValuesTensor]);\n}\nvar raggedGatherConfig2 = {\n kernelName: RaggedGather,\n backendName: \"webgl\",\n kernelFunc: raggedGather3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/RaggedTensorToTensor.js\nfunction raggedTensorToTensor3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { shape, values, defaultValue, rowPartitionTensors } = inputs;\n const { rowPartitionTypes } = attrs;\n const $shape = backend2.readSync(shape.dataId);\n const $values = backend2.readSync(values.dataId);\n const $defaultValue = backend2.readSync(defaultValue.dataId);\n const $rowPartitionValues = rowPartitionTensors.map((t2) => backend2.readSync(t2.dataId));\n const rowPartitionValuesShapes = rowPartitionTensors.map((t2) => t2.shape);\n const [outputShape, output] = raggedTensorToTensorImplCPU($shape, shape.shape, $values, values.shape, values.dtype, $defaultValue, defaultValue.shape, $rowPartitionValues, rowPartitionValuesShapes, rowPartitionTypes);\n return backend2.makeTensorInfo(outputShape, values.dtype, output);\n}\nvar raggedTensorToTensorConfig2 = {\n kernelName: RaggedTensorToTensor,\n backendName: \"webgl\",\n kernelFunc: raggedTensorToTensor3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Range.js\nvar range4 = (args) => {\n const { backend: backend2, attrs } = args;\n const { start, stop, step: step5, dtype } = attrs;\n const values = rangeImplCPU(start, stop, step5, dtype);\n return backend2.makeTensorInfo([values.length], dtype, values);\n};\nvar rangeConfig2 = {\n kernelName: Range,\n backendName: \"webgl\",\n kernelFunc: range4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Reciprocal.js\nvar RECIPROCAL = `return 1.0 / x;`;\nvar reciprocal3 = unaryKernelFunc2({ opSnippet: RECIPROCAL });\nvar reciprocalConfig2 = {\n kernelName: Reciprocal,\n backendName: \"webgl\",\n kernelFunc: reciprocal3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Relu.js\nvar RELU3 = CHECK_NAN_SNIPPET + `\n return (x < 0.0) ? 0.0 : x;\n`;\nvar RELU_PACKED = `\n vec4 result = x * vec4(greaterThanEqual(x, vec4(0.0)));\n bvec4 isNaN = isnan(x);\n\n result.r = isNaN.r ? x.r : result.r;\n result.g = isNaN.g ? x.g : result.g;\n result.b = isNaN.b ? x.b : result.b;\n result.a = isNaN.a ? x.a : result.a;\n\n return result;\n`;\nvar relu3 = unaryKernelFunc2({ opSnippet: RELU3, packedOpSnippet: RELU_PACKED });\nvar reluConfig2 = {\n kernelName: Relu,\n backendName: \"webgl\",\n kernelFunc: relu3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Relu6.js\nvar RELU63 = CHECK_NAN_SNIPPET + `\n return (x < 0.0) ? 0.0 : min(6.0, x);\n`;\nvar RELU6_PACKED = `\n vec4 result = min(x, vec4(6.)) * vec4(greaterThanEqual(x, vec4(0.0)));\n bvec4 isNaN = isnan(x);\n\n result.r = isNaN.r ? x.r : result.r;\n result.g = isNaN.g ? x.g : result.g;\n result.b = isNaN.b ? x.b : result.b;\n result.a = isNaN.a ? x.a : result.a;\n\n return result;\n`;\nvar relu63 = unaryKernelFunc2({ opSnippet: RELU63, packedOpSnippet: RELU6_PACKED });\nvar relu6Config2 = {\n kernelName: Relu6,\n backendName: \"webgl\",\n kernelFunc: relu63\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/resize_bilinear_gpu.js\nvar ResizeBilinearProgram = class {\n constructor(inputShape, newHeight, newWidth, alignCorners, halfPixelCenters) {\n this.variableNames = [\"A\"];\n this.outputShape = [];\n const [batch, oldHeight, oldWidth, depth] = inputShape;\n this.outputShape = [batch, newHeight, newWidth, depth];\n const effectiveInSize = [\n alignCorners && newHeight > 1 ? oldHeight - 1 : oldHeight,\n alignCorners && newWidth > 1 ? oldWidth - 1 : oldWidth\n ];\n const effectiveOutSize = [\n alignCorners && newHeight > 1 ? newHeight - 1 : newHeight,\n alignCorners && newWidth > 1 ? newWidth - 1 : newWidth\n ];\n let sourceFracIndexRC;\n if (halfPixelCenters) {\n sourceFracIndexRC = `(vec2(yRC) + vec2(0.5)) * effectiveInputOverOutputRatioRC - vec2(0.5)`;\n } else {\n sourceFracIndexRC = `vec2(yRC) * effectiveInputOverOutputRatioRC`;\n }\n this.userCode = `\n const vec2 effectiveInputOverOutputRatioRC = vec2(\n ${effectiveInSize[0] / effectiveOutSize[0]},\n ${effectiveInSize[1] / effectiveOutSize[1]});\n const vec2 inputShapeRC = vec2(${oldHeight}.0, ${oldWidth}.0);\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n ivec2 yRC = coords.yz;\n\n // Fractional source index.\n vec2 sourceFracIndexRC = ${sourceFracIndexRC};\n\n // Compute the four integer indices.\n ivec2 sourceFloorRC = ivec2(max(sourceFracIndexRC, vec2(0.0)));\n ivec2 sourceCeilRC = ivec2(\n min(inputShapeRC - 1.0, ceil(sourceFracIndexRC)));\n\n float topLeft = getA(b, sourceFloorRC.x, sourceFloorRC.y, d);\n float bottomLeft = getA(b, sourceCeilRC.x, sourceFloorRC.y, d);\n float topRight = getA(b, sourceFloorRC.x, sourceCeilRC.y, d);\n float bottomRight = getA(b, sourceCeilRC.x, sourceCeilRC.y, d);\n\n vec2 fracRC = sourceFracIndexRC - vec2(sourceFloorRC);\n\n float top = topLeft + (topRight - topLeft) * fracRC.y;\n float bottom = bottomLeft + (bottomRight - bottomLeft) * fracRC.y;\n float newValue = top + (bottom - top) * fracRC.x;\n\n setOutput(newValue);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/resize_bilinear_packed_gpu.js\nvar ResizeBilinearPackedProgram = class {\n constructor(inputShape, newHeight, newWidth, alignCorners, halfPixelCenters) {\n this.variableNames = [\"A\"];\n this.packedInputs = true;\n this.packedOutput = true;\n this.outputShape = [];\n const [batch, oldHeight, oldWidth, depth] = inputShape;\n this.outputShape = [batch, newHeight, newWidth, depth];\n const effectiveInSize = [\n alignCorners && newHeight > 1 ? oldHeight - 1 : oldHeight,\n alignCorners && newWidth > 1 ? oldWidth - 1 : oldWidth\n ];\n const effectiveOutSize = [\n alignCorners && newHeight > 1 ? newHeight - 1 : newHeight,\n alignCorners && newWidth > 1 ? newWidth - 1 : newWidth\n ];\n let sourceFracIndexRC;\n if (halfPixelCenters) {\n sourceFracIndexRC = `(vec3(yRC) + vec3(0.5)) * effectiveInputOverOutputRatioRC - vec3(0.5)`;\n } else {\n sourceFracIndexRC = `vec3(yRC) * effectiveInputOverOutputRatioRC`;\n }\n this.userCode = `\n const vec3 effectiveInputOverOutputRatioRC = vec3(\n ${effectiveInSize[0] / effectiveOutSize[0]},\n ${effectiveInSize[1] / effectiveOutSize[1]},\n ${effectiveInSize[1] / effectiveOutSize[1]});\n const vec3 inputShapeRC = vec3(${oldHeight}.0, ${oldWidth}.0,\n ${oldWidth}.0);\n\n float getAValue(int b, int r, int c, int d) {\n return getChannel(getA(b, r, c, d), vec2(c, d));\n }\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n // Calculate values for next column in yRC.z.\n ivec3 yRC = coords.yzz + ivec3(0, 0, 1);\n\n // Fractional source index.\n vec3 sourceFracIndexRC = ${sourceFracIndexRC};\n\n // Compute the four integer indices.\n ivec3 sourceFloorRC = ivec3(max(sourceFracIndexRC, vec3(0.0)));\n ivec3 sourceCeilRC = ivec3(\n min(inputShapeRC - 1.0, ceil(sourceFracIndexRC)));\n\n // Should we calculate next column and row elements in 2x2 packed cell.\n bool hasNextCol = d < ${depth - 1};\n bool hasNextRow = coords.z < ${newWidth - 1};\n\n // In parallel, construct four corners for all four components in\n // packed 2x2 cell.\n vec4 topLeft = vec4(\n getAValue(b, sourceFloorRC.x, sourceFloorRC.y, d),\n hasNextCol ? getAValue(b, sourceFloorRC.x, sourceFloorRC.y, d + 1)\n : 0.0,\n hasNextRow ? getAValue(b, sourceFloorRC.x, sourceFloorRC.z, d)\n : 0.0,\n (hasNextRow && hasNextCol) ?\n getAValue(b, sourceFloorRC.x, sourceFloorRC.z, d + 1) : 0.0);\n\n vec4 bottomLeft = vec4(\n getAValue(b, sourceCeilRC.x, sourceFloorRC.y, d),\n hasNextCol ? getAValue(b, sourceCeilRC.x, sourceFloorRC.y, d + 1)\n : 0.0,\n hasNextRow ? getAValue(b, sourceCeilRC.x, sourceFloorRC.z, d)\n : 0.0,\n (hasNextRow && hasNextCol) ?\n getAValue(b, sourceCeilRC.x, sourceFloorRC.z, d + 1) : 0.0);\n\n vec4 topRight = vec4(\n getAValue(b, sourceFloorRC.x, sourceCeilRC.y, d),\n hasNextCol ? getAValue(b, sourceFloorRC.x, sourceCeilRC.y, d + 1)\n : 0.0,\n hasNextRow ? getAValue(b, sourceFloorRC.x, sourceCeilRC.z, d)\n : 0.0,\n (hasNextRow && hasNextCol) ?\n getAValue(b, sourceFloorRC.x, sourceCeilRC.z, d + 1) : 0.0);\n\n vec4 bottomRight = vec4(\n getAValue(b, sourceCeilRC.x, sourceCeilRC.y, d),\n hasNextCol ? getAValue(b, sourceCeilRC.x, sourceCeilRC.y, d + 1)\n : 0.0,\n hasNextRow ? getAValue(b, sourceCeilRC.x, sourceCeilRC.z, d)\n : 0.0,\n (hasNextRow && hasNextCol) ?\n getAValue(b, sourceCeilRC.x, sourceCeilRC.z, d + 1) : 0.0);\n\n vec3 fracRC = sourceFracIndexRC - vec3(sourceFloorRC);\n\n vec4 top = mix(topLeft, topRight, fracRC.yyzz);\n vec4 bottom = mix(bottomLeft, bottomRight, fracRC.yyzz);\n vec4 newValue = mix(top, bottom, fracRC.x);\n\n setOutput(newValue);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ResizeBilinear.js\nfunction resizeBilinear3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { images } = inputs;\n const { alignCorners, halfPixelCenters, size } = attrs;\n const [newHeight, newWidth] = size;\n const program = env().getBool(\"WEBGL_PACK_IMAGE_OPERATIONS\") ? new ResizeBilinearPackedProgram(images.shape, newHeight, newWidth, alignCorners, halfPixelCenters) : new ResizeBilinearProgram(images.shape, newHeight, newWidth, alignCorners, halfPixelCenters);\n return backend2.runWebGLProgram(program, [images], \"float32\");\n}\nvar resizeBilinearConfig2 = {\n kernelName: ResizeBilinear,\n backendName: \"webgl\",\n kernelFunc: resizeBilinear3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/resize_bilinear_backprop_gpu.js\nvar ResizeBilinearBackpropProgram = class {\n constructor(dyShape, inputShape, alignCorners) {\n this.variableNames = [\"dy\"];\n this.outputShape = [];\n this.outputShape = inputShape;\n const [, xHeight, xWidth] = inputShape;\n const [, yHeight, yWidth] = dyShape;\n const effectiveXSize = [\n alignCorners && yHeight > 1 ? xHeight - 1 : xHeight,\n alignCorners && yWidth > 1 ? xWidth - 1 : xWidth\n ];\n const effectiveYSize = [\n alignCorners && yHeight > 1 ? yHeight - 1 : yHeight,\n alignCorners && yWidth > 1 ? yWidth - 1 : yWidth\n ];\n const heightScale = effectiveXSize[0] / effectiveYSize[0];\n const widthScale = effectiveXSize[1] / effectiveYSize[1];\n const invHeightScale = 1 / heightScale;\n const invWidthScale = 1 / widthScale;\n const winHeight = Math.ceil(invHeightScale) * 2 + 2;\n const winWidth = Math.ceil(invWidthScale) * 2 + 2;\n this.userCode = `\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n int r = coords[1];\n int c = coords[2];\n\n float accumulator = 0.0;\n\n const float heightScale = float(${heightScale});\n const float widthScale = float(${widthScale});\n\n const float invHeightScale = float(${invHeightScale});\n const float invWidthScale = float(${invWidthScale});\n\n const int winHeight = int(${winHeight});\n const int winWidth = int(${winWidth});\n\n // Compute bounds for where in dy we will look\n float startRLerp = floor(float(r) * invHeightScale);\n int startDyR = int(startRLerp - float(winHeight / 2));\n\n float startCLerp = floor(float(c) * invWidthScale);\n int startDyC = int(startCLerp - float(winWidth / 2));\n\n // Loop over dy\n for (int dyROffset = 0; dyROffset < winHeight; dyROffset++) {\n int dyR = dyROffset + startDyR;\n\n // Guard against the window exceeding the bounds of dy\n if (dyR < 0 || dyR >= ${yHeight}) {\n continue;\n }\n\n for (int dyCOffset = 0; dyCOffset < winWidth; dyCOffset++) {\n int dyC = dyCOffset + startDyC;\n\n // Guard against the window exceeding the bounds of dy\n if (dyC < 0 || dyC >= ${yWidth}) {\n continue;\n }\n\n float dxR = float(dyR) * heightScale;\n int topDxRIndex = int(floor(dxR));\n int bottomDxRIndex = int(min(ceil(dxR), ${xHeight - 1}.0));\n float dxRLerp = dxR - float(topDxRIndex);\n float inverseDxRLerp = 1.0 - dxRLerp;\n\n float dxC = float(dyC) * widthScale;\n int leftDxCIndex = int(floor(dxC));\n int rightDxCIndex = int(min(ceil(dxC), ${xWidth - 1}.0));\n float dxCLerp = dxC - float(leftDxCIndex);\n float inverseDxCLerp = 1.0 - dxCLerp;\n\n if (r == topDxRIndex && c == leftDxCIndex) {\n // topLeft\n accumulator +=\n getDy(b, dyR, dyC, d) * inverseDxRLerp * inverseDxCLerp;\n }\n\n if (r == topDxRIndex && c == rightDxCIndex) {\n // topRight\n accumulator += getDy(b, dyR, dyC, d) * inverseDxRLerp * dxCLerp;\n }\n\n if (r == bottomDxRIndex && c == leftDxCIndex) {\n // bottomLeft\n accumulator += getDy(b, dyR, dyC, d) * dxRLerp * inverseDxCLerp;\n }\n\n if (r == bottomDxRIndex && c == rightDxCIndex) {\n // bottomRight\n accumulator += getDy(b, dyR, dyC, d) * dxRLerp * dxCLerp;\n }\n }\n }\n // End loop over dy\n\n setOutput(accumulator);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ResizeBilinearGrad.js\nfunction resizeBilinearGrad2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { images, dy } = inputs;\n const { alignCorners } = attrs;\n const program = new ResizeBilinearBackpropProgram(dy.shape, images.shape, alignCorners);\n return backend2.runWebGLProgram(program, [dy], dy.dtype);\n}\nvar resizeBilinearGradConfig3 = {\n kernelName: ResizeBilinearGrad,\n backendName: \"webgl\",\n kernelFunc: resizeBilinearGrad2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/resize_nearest_neighbor_gpu.js\nvar ResizeNearestNeighborProgram = class {\n constructor(inputShape, newHeight, newWidth, alignCorners, halfPixelCenters) {\n this.variableNames = [\"A\"];\n this.outputShape = [];\n const [batch, oldHeight, oldWidth, depth] = inputShape;\n this.outputShape = [batch, newHeight, newWidth, depth];\n const effectiveInSize = [\n alignCorners && newHeight > 1 ? oldHeight - 1 : oldHeight,\n alignCorners && newWidth > 1 ? oldWidth - 1 : oldWidth\n ];\n const effectiveOutSize = [\n alignCorners && newHeight > 1 ? newHeight - 1 : newHeight,\n alignCorners && newWidth > 1 ? newWidth - 1 : newWidth\n ];\n const roundBase = alignCorners ? \"0.5\" : \"0.0\";\n let sourceFracIndexRC;\n if (halfPixelCenters) {\n sourceFracIndexRC = `max((vec2(yRC) + vec2(0.5)) * effectiveInputOverOutputRatioRC, vec2(0.0))`;\n } else {\n sourceFracIndexRC = `vec2(yRC) * effectiveInputOverOutputRatioRC`;\n }\n this.userCode = `\n const vec2 effectiveInputOverOutputRatioRC = vec2(\n ${effectiveInSize[0] / effectiveOutSize[0]},\n ${effectiveInSize[1] / effectiveOutSize[1]});\n const vec2 inputShapeRC = vec2(${oldHeight}.0, ${oldWidth}.0);\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n ivec2 yRC = coords.yz;\n\n // Fractional source index.\n vec2 sourceFracIndexRC = ${sourceFracIndexRC};\n\n // Compute the coordinators of nearest neighbor point.\n ivec2 sourceNearestRC = ivec2(\n min(inputShapeRC - 1.0, floor(sourceFracIndexRC + ${roundBase})));\n float newValue = getA(b, sourceNearestRC.x, sourceNearestRC.y, d);\n\n setOutput(newValue);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/resize_nearest_neighbor_packed_gpu.js\nvar ResizeNearestNeighborPackedProgram = class {\n constructor(inputShape, newHeight, newWidth, alignCorners, halfPixelCenters) {\n this.variableNames = [\"A\"];\n this.packedInputs = true;\n this.packedOutput = true;\n this.outputShape = [];\n const [batch, oldHeight, oldWidth, depth] = inputShape;\n this.outputShape = [batch, newHeight, newWidth, depth];\n const effectiveInSize = [\n alignCorners && newHeight > 1 ? oldHeight - 1 : oldHeight,\n alignCorners && newWidth > 1 ? oldWidth - 1 : oldWidth\n ];\n const effectiveOutSize = [\n alignCorners && newHeight > 1 ? newHeight - 1 : newHeight,\n alignCorners && newWidth > 1 ? newWidth - 1 : newWidth\n ];\n const roundBase = alignCorners ? \"0.5\" : \"0.0\";\n let sourceFracIndexRC;\n if (halfPixelCenters) {\n sourceFracIndexRC = `max((vec3(yRC) + vec3(0.5)) * effectiveInputOverOutputRatioRC, vec3(0.0))`;\n } else {\n sourceFracIndexRC = `vec3(yRC) * effectiveInputOverOutputRatioRC`;\n }\n this.userCode = `\n const vec3 effectiveInputOverOutputRatioRC = vec3(\n ${effectiveInSize[0] / effectiveOutSize[0]},\n ${effectiveInSize[1] / effectiveOutSize[1]},\n ${effectiveInSize[1] / effectiveOutSize[1]});\n const vec3 inputShapeRC = vec3(${oldHeight}.0, ${oldWidth}.0,\n ${oldWidth}.0);\n\n float getAValue(int b, int r, int c, int d) {\n return getChannel(getA(b, r, c, d), vec2(c, d));\n }\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n // Calculate values for next column in yRC.z.\n ivec3 yRC = coords.yzz + ivec3(0, 0, 1);\n\n // Fractional source index.\n vec3 sourceFracIndexRC = ${sourceFracIndexRC};\n\n // Compute the coordinators of nearest neighbor point.\n ivec3 sourceNearestRC = ivec3(\n min(inputShapeRC - 1.0, floor(sourceFracIndexRC + ${roundBase})));\n\n // Should we calculate next column and row elements in 2x2 packed cell.\n bool hasNextCol = d < ${depth - 1};\n bool hasNextRow = coords.z < ${newWidth - 1};\n\n vec4 newValue = vec4(\n getAValue(b, sourceNearestRC.x, sourceNearestRC.y, d),\n hasNextCol ? getAValue(b, sourceNearestRC.x, sourceNearestRC.y, d + 1)\n : 0.0,\n hasNextRow ? getAValue(b, sourceNearestRC.x, sourceNearestRC.z, d)\n : 0.0,\n (hasNextRow && hasNextCol) ?\n getAValue(b, sourceNearestRC.x, sourceNearestRC.z, d + 1) : 0.0);\n\n setOutput(newValue);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ResizeNearestNeighbor.js\nfunction resizeNearestNeighbor3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { images } = inputs;\n const { alignCorners, halfPixelCenters, size } = attrs;\n const [newHeight, newWidth] = size;\n const program = env().getBool(\"WEBGL_PACK_IMAGE_OPERATIONS\") ? new ResizeNearestNeighborPackedProgram(images.shape, newHeight, newWidth, alignCorners, halfPixelCenters) : new ResizeNearestNeighborProgram(images.shape, newHeight, newWidth, alignCorners, halfPixelCenters);\n return backend2.runWebGLProgram(program, [images], images.dtype);\n}\nvar resizeNearestNeighborConfig2 = {\n kernelName: ResizeNearestNeighbor,\n backendName: \"webgl\",\n kernelFunc: resizeNearestNeighbor3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/resize_nearest_neighbor_backprop_gpu.js\nvar ResizeNearestNeigborBackpropProgram = class {\n constructor(dyShape, inputShape, alignCorners) {\n this.variableNames = [\"dy\"];\n this.outputShape = [];\n this.outputShape = inputShape;\n const [, xHeight, xWidth] = inputShape;\n const [, yHeight, yWidth] = dyShape;\n const effectiveXSize = [\n alignCorners && yHeight > 1 ? xHeight - 1 : xHeight,\n alignCorners && yWidth > 1 ? xWidth - 1 : xWidth\n ];\n const effectiveYSize = [\n alignCorners && yHeight > 1 ? yHeight - 1 : yHeight,\n alignCorners && yWidth > 1 ? yWidth - 1 : yWidth\n ];\n const heightScale = effectiveXSize[0] / effectiveYSize[0];\n const widthScale = effectiveXSize[1] / effectiveYSize[1];\n const invHeightScale = 1 / heightScale;\n const invWidthScale = 1 / widthScale;\n const winHeight = Math.ceil(invHeightScale) * 2 + 2;\n const winWidth = Math.ceil(invWidthScale) * 2 + 2;\n this.userCode = `\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n int r = coords[1];\n int c = coords[2];\n\n float accumulator = 0.0;\n\n const float heightScale = float(${heightScale});\n const float widthScale = float(${widthScale});\n\n const float invHeightScale = float(${invHeightScale});\n const float invWidthScale = float(${invWidthScale});\n\n const int winHeight = int(${winHeight});\n const int winWidth = int(${winWidth});\n\n // Compute bounds for where in dy we will look\n float startRLerp = floor(float(r) * invHeightScale);\n int startDyR = int(floor(startRLerp - float(winHeight / 2)));\n\n float startCLerp = floor(float(c) * invWidthScale);\n int startDyC = int(floor(startCLerp - float(winWidth / 2)));\n\n // Loop over dy\n for (int dyROffset = 0; dyROffset < winHeight; dyROffset++) {\n int dyR = dyROffset + startDyR;\n\n // Guard against the window exceeding the bounds of dy\n if (dyR < 0 || dyR >= ${yHeight}) {\n continue;\n }\n\n for (int dyCOffset = 0; dyCOffset < winWidth; dyCOffset++) {\n int dyC = dyCOffset + startDyC;\n\n // Guard against the window exceeding the bounds of dy\n if (dyC < 0 || dyC >= ${yWidth}) {\n continue;\n }\n\n float sourceFracRow =\n float(${effectiveXSize[0]}) *\n (float(dyR) / float(${effectiveYSize[0]}));\n\n float sourceFracCol =\n float(${effectiveXSize[1]}) *\n (float(dyC) / float(${effectiveYSize[1]}));\n\n int sourceNearestRow = int(min(\n float(int(${xHeight}) - 1),\n ${alignCorners} ? float(round(sourceFracRow)) :\n float(floor(sourceFracRow))));\n\n int sourceNearestCol = int(min(\n float(int(${xWidth}) - 1),\n ${alignCorners} ? float(round(sourceFracCol)) :\n float(floor(sourceFracCol))));\n\n if (r == sourceNearestRow && c == sourceNearestCol) {\n accumulator += getDy(b, dyR, dyC, d);\n }\n }\n }\n // End loop over dy\n\n setOutput(accumulator);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ResizeNearestNeighborGrad.js\nfunction resizeNearestNeighborGrad2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { images, dy } = inputs;\n const { alignCorners } = attrs;\n const program = new ResizeNearestNeigborBackpropProgram(dy.shape, images.shape, alignCorners);\n return backend2.runWebGLProgram(program, [dy], dy.dtype);\n}\nvar resizeNearestNeighborGradConfig3 = {\n kernelName: ResizeNearestNeighborGrad,\n backendName: \"webgl\",\n kernelFunc: resizeNearestNeighborGrad2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/reverse_gpu.js\nvar ReverseProgram = class {\n constructor(xShape, axis) {\n this.variableNames = [\"x\"];\n const rank = xShape.length;\n if (rank > 4) {\n throw new Error(`WebGL backend: Reverse of rank-${rank} tensor is not yet supported`);\n }\n this.outputShape = xShape;\n if (rank === 1) {\n this.userCode = `\n void main() {\n int coord = getOutputCoords();\n setOutput(getX(${xShape[0]} - coord - 1));\n }\n `;\n return;\n }\n const getInCoord = (i2) => {\n if (axis.indexOf(i2) !== -1 && xShape[i2] !== 1) {\n return `${xShape[i2]} - coords[${i2}] - 1`;\n }\n return `coords[${i2}]`;\n };\n const inCoords = xShape.map((_, i2) => getInCoord(i2)).join(\",\");\n const type = getCoordsDataType(rank);\n this.userCode = `\n void main() {\n ${type} coords = getOutputCoords();\n setOutput(getX(${inCoords}));\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/reverse_packed_gpu.js\nvar ReversePackedProgram = class {\n constructor(xShape, axis) {\n this.variableNames = [\"x\"];\n this.packedInputs = true;\n this.packedOutput = true;\n const rank = xShape.length;\n if (rank > 4) {\n throw new Error(`WebGL backend: Reverse of rank-${rank} tensor is not yet supported`);\n }\n this.outputShape = xShape;\n const channels = getChannels(\"rc\", rank);\n const nextColumn = `${channels[rank - 1]} + 1 < ${this.outputShape[rank - 1]}`;\n const nextRow = `${channels[rank - 2]} + 1 < ${this.outputShape[rank - 2]}`;\n const type = getCoordsDataType(rank);\n if (rank === 1) {\n this.userCode = `\n void main(){\n int rc = getOutputCoords();\n vec4 result = vec4(0.);\n result.r = getChannel(getX(${xShape[0]} - rc - 1),\n ${xShape[0]} - rc - 1);\n if(${nextColumn}){\n result.g = getChannel(getX(${xShape[0]} - (rc + 1) - 1),\n ${xShape[0]} - (rc + 1) - 1);\n }\n setOutput(result);\n }\n `;\n } else {\n this.userCode = `\n void main() {\n ${type} rc = getOutputCoords();\n vec4 result = vec4(0.);\n result.r = ${getR(channels.slice())};\n if(${nextColumn}){\n result.g = ${getG(channels.slice())};\n }\n if(${nextRow}) {\n result.b = ${getB(channels.slice())};\n if(${nextColumn}) {\n result.a = ${getA(channels.slice())};\n }\n }\n setOutput(result);\n }\n `;\n }\n function getR(channels2) {\n return getChannel(channels2);\n }\n function getG(channels2) {\n channels2[rank - 1] = \"(\" + channels2[rank - 1] + ` + 1)`;\n return getChannel(channels2);\n }\n function getB(channels2) {\n channels2[rank - 2] = \"(\" + channels2[rank - 2] + ` + 1)`;\n return getChannel(channels2);\n }\n function getA(channels2) {\n channels2[rank - 1] = \"(\" + channels2[rank - 1] + ` + 1)`;\n channels2[rank - 2] = \"(\" + channels2[rank - 2] + ` + 1)`;\n return getChannel(channels2);\n }\n function getChannel(channels2) {\n const inCoordsArray = xShape.map((_, i2) => getInCoord(i2, channels2));\n const inCoords = inCoordsArray.join(\",\");\n const innerDims = inCoordsArray.slice(-2).join(\",\");\n return `getChannel(getX(${inCoords}), vec2(${innerDims}))`;\n }\n function getInCoord(i2, channels1) {\n if (axis.indexOf(i2) !== -1 && xShape[i2] !== 1) {\n return `${xShape[i2]} - ${channels1[i2]} - 1`;\n } else {\n return `${channels1[i2]}`;\n }\n }\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Reverse.js\nfunction reverse3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { dims } = attrs;\n const xRank = x.shape.length;\n const $dims = util_exports.parseAxisParam(dims, x.shape);\n if (xRank === 0) {\n return identity3({ inputs: { x }, backend: backend2 });\n }\n const program = env().getBool(\"WEBGL_PACK_ARRAY_OPERATIONS\") ? new ReversePackedProgram(x.shape, $dims) : new ReverseProgram(x.shape, $dims);\n return backend2.runWebGLProgram(program, [x], x.dtype);\n}\nvar reverseConfig2 = {\n kernelName: Reverse,\n backendName: \"webgl\",\n kernelFunc: reverse3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/rotate_gpu.js\nvar RotateProgram = class {\n constructor(imageShape, fillValue) {\n this.variableNames = [\"Image\"];\n this.outputShape = [];\n this.customUniforms = [{ name: \"params\", type: \"vec4\" }];\n const imageHeight = imageShape[1];\n const imageWidth = imageShape[2];\n this.outputShape = imageShape;\n let fillSnippet = \"\";\n if (typeof fillValue === \"number\") {\n fillSnippet = `float outputValue = ${fillValue.toFixed(2)};`;\n } else {\n fillSnippet = `\n vec3 fill = vec3(${fillValue.join(\",\")});\n float outputValue = fill[coords[3]];`;\n }\n this.userCode = `\n void main() {\n ivec4 coords = getOutputCoords();\n int x = coords[2];\n int y = coords[1];\n float coordXFloat = (float(x) - params[0]) * params[3] -\n (float(y) - params[1]) * params[2];\n float coordYFloat = (float(x) - params[0]) * params[2] +\n (float(y) - params[1]) * params[3];\n int coordX = int(round(coordXFloat + params[0]));\n int coordY = int(round(coordYFloat + params[1]));\n ${fillSnippet}\n if(coordX >= 0 && coordX < ${imageWidth} && coordY >= 0 && coordY < ${imageHeight}) {\n outputValue = getImage(coords[0], coordY, coordX, coords[3]);\n }\n setOutput(outputValue);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/RotateWithOffset.js\nvar rotateWithOffsetConfig2 = {\n kernelName: RotateWithOffset,\n backendName: \"webgl\",\n kernelFunc: ({ inputs, attrs, backend: backend2 }) => {\n const { image: image2 } = inputs;\n const { radians, fillValue, center } = attrs;\n const webglBackend = backend2;\n const program = new RotateProgram(image2.shape, fillValue);\n const [centerX, centerY] = backend_util_exports.getImageCenter(center, image2.shape[1], image2.shape[2]);\n const customValues = [[centerX, centerY, Math.sin(radians), Math.cos(radians)]];\n const output = webglBackend.runWebGLProgram(program, [image2], image2.dtype, customValues);\n return output;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Round.js\nvar ROUND = `\n // OpenGL ES does not support round function.\n // The algorithm is based on banker's rounding.\n float base = floor(x);\n if ((x - base) < 0.5) {\n return floor(x);\n } else if ((x - base) > 0.5) {\n return ceil(x);\n } else {\n if (mod(base, 2.0) == 0.0) {\n return base;\n } else {\n return base + 1.0;\n }\n }\n`;\nvar round4 = unaryKernelFunc2({ opSnippet: ROUND });\nvar roundConfig2 = {\n kernelName: Round,\n backendName: \"webgl\",\n kernelFunc: round4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Rsqrt.js\nvar RSQRT = `return inversesqrt(x);`;\nvar rsqrt3 = unaryKernelFunc2({ opSnippet: RSQRT, cpuKernelImpl: rsqrtImplCPU });\nvar rsqrtConfig2 = {\n kernelName: Rsqrt,\n backendName: \"webgl\",\n kernelFunc: rsqrt3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/scatter_gpu.js\nvar ScatterProgram = class {\n constructor(updateSize, sliceDim, indicesRank, updatesRank, strides, shape, summingDupeIndex = true) {\n this.variableNames = [\"updates\", \"indices\", \"defaultValue\"];\n this.outputShape = shape;\n const stridesType = getCoordsDataType(strides.length);\n const dtype = getCoordsDataType(shape.length);\n let indicesString = \"\";\n if (indicesRank === 1) {\n indicesString = \"i\";\n } else if (indicesRank === 2) {\n indicesString = \"i, j\";\n }\n const indicesSnippet = `getIndices(${indicesString})`;\n let updatesString = \"\";\n if (updatesRank === 1) {\n updatesString = \"i\";\n } else if (updatesRank === 2) {\n updatesString = \"i, coords[1]\";\n }\n const updatesSnippet = `getUpdates(${updatesString})`;\n const strideString = sliceDim > 1 ? \"strides[j]\" : \"strides\";\n this.userCode = `\n ${stridesType} strides = ${stridesType}(${strides});\n\n void main() {\n ${dtype} coords = getOutputCoords();\n float sum = 0.0;\n bool found = false;\n for (int i = 0; i < ${updateSize}; i++) {\n int flattenedIndex = 0;\n for (int j = 0; j < ${sliceDim}; j++) {\n int index = round(${indicesSnippet});\n flattenedIndex += index * ${strideString};\n }\n if (flattenedIndex == coords[0]) {\n sum += ${updatesSnippet};\n found = true;\n }\n }\n setOutput(mix(getDefaultValue(), sum, float(found)));\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ScatterNd.js\nfunction scatterNd2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { indices, updates } = inputs;\n const { shape } = attrs;\n const { sliceRank, numUpdates, sliceSize, strides, outputSize } = backend_util_exports.calculateShapes(updates, indices, shape);\n const flattenShape = [outputSize / sliceSize, sliceSize];\n if (outputSize === 0) {\n return backend2.makeTensorInfo(shape, indices.dtype);\n }\n const flattenIndices = reshape4({ inputs: { x: indices }, backend: backend2, attrs: { shape: [numUpdates, sliceRank] } });\n const flattenX = reshape4({ inputs: { x: updates }, backend: backend2, attrs: { shape: [numUpdates, sliceSize] } });\n const defaultValue = backend2.makeTensorInfo([], \"float32\", new Float32Array([0]));\n const program = new ScatterProgram(numUpdates, sliceRank, flattenIndices.shape.length, flattenX.shape.length, strides, flattenShape);\n const res = backend2.runWebGLProgram(program, [flattenX, flattenIndices, defaultValue], flattenX.dtype);\n const reshaped = reshape4({ inputs: { x: res }, backend: backend2, attrs: { shape } });\n backend2.disposeIntermediateTensorInfo(flattenIndices);\n backend2.disposeIntermediateTensorInfo(flattenX);\n backend2.disposeIntermediateTensorInfo(res);\n backend2.disposeIntermediateTensorInfo(defaultValue);\n return reshaped;\n}\nvar scatterNdConfig2 = {\n kernelName: ScatterNd,\n backendName: \"webgl\",\n kernelFunc: scatterNd2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/search_sorted_gpu.js\nvar SearchSortedProgram = class {\n constructor(batchSize, numInputs, numValues, side) {\n this.variableNames = [\"sortedSequence\", \"values\"];\n this.customUniforms = [{ name: \"numInputs\", type: \"int\" }];\n this.outputShape = [batchSize, numValues];\n const webGL2LoopHead = \"while (left < right) {\";\n const webGL1LoopHead = `for (int i = 0; i < ${Math.ceil(Math.log2(numInputs + 1))}; ++i) { if (left >= right) break;`;\n const loopHead = env().getNumber(\"WEBGL_VERSION\") === 2 ? webGL2LoopHead : webGL1LoopHead;\n const boundComparator = side === \"left\" ? \"<\" : \"<=\";\n this.userCode = `\n int findBound(int batch, float value) {\n int left = 0;\n int right = numInputs;\n int mid;\n ${loopHead}\n mid = (left + right) / 2;\n if (getSortedSequence(batch, mid) ${boundComparator} value) {\n left = mid + 1;\n } else {\n right = mid;\n }\n }\n return right;\n }\n\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n int valueIndex = coords[1];\n\n float value = getValues(batch, valueIndex);\n\n setOutput(float(findBound(batch, value)));\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/SearchSorted.js\nfunction searchSorted3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { sortedSequence, values } = inputs;\n const { side } = attrs;\n const program = new SearchSortedProgram(sortedSequence.shape[0], sortedSequence.shape[1], values.shape[1], side);\n const customValues = [[sortedSequence.shape[1]]];\n return backend2.runWebGLProgram(program, [sortedSequence, values], \"int32\", customValues);\n}\nvar searchSortedConfig2 = {\n kernelName: SearchSorted,\n backendName: \"webgl\",\n kernelFunc: searchSorted3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/select_gpu.js\nvar SelectProgram = class {\n constructor(cRank, shape, rank) {\n this.variableNames = [\"c\", \"a\", \"b\"];\n this.outputShape = shape;\n let cCoords;\n let abCoords;\n if (rank > 4) {\n throw Error(`Where for rank ${rank} is not yet supported`);\n }\n if (rank === 1) {\n abCoords = `resRC`;\n cCoords = `resRC`;\n } else {\n const currentCoords = [\"resRC.x\", \"resRC.y\", \"resRC.z\", \"resRC.w\"];\n const cCoordVars = [];\n const abCoordVars = [];\n for (let i2 = 0; i2 < shape.length; i2++) {\n abCoordVars.push(`${currentCoords[i2]}`);\n if (i2 < cRank) {\n cCoordVars.push(`${currentCoords[i2]}`);\n }\n }\n cCoords = cCoordVars.join();\n abCoords = abCoordVars.join();\n }\n const dtype = getCoordsDataType(rank);\n this.userCode = `\n void main() {\n ${dtype} resRC = getOutputCoords();\n float cVal = getC(${cCoords});\n if (cVal >= 1.0) {\n setOutput(getA(${abCoords}));\n } else {\n setOutput(getB(${abCoords}));\n }\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Select.js\nfunction select3(args) {\n const { inputs, backend: backend2 } = args;\n const { condition, t: t2, e: e2 } = inputs;\n const program = new SelectProgram(condition.shape.length, t2.shape, t2.shape.length);\n return backend2.runWebGLProgram(program, [condition, t2, e2], upcastType(t2.dtype, e2.dtype));\n}\nvar selectConfig2 = {\n kernelName: Select,\n backendName: \"webgl\",\n kernelFunc: select3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Selu.js\nvar SELU = `\n // Stable and Attracting Fixed Point (0, 1) for Normalized Weights.\n // see: https://arxiv.org/abs/1706.02515\n float scaleAlpha = ${backend_util_exports.SELU_SCALEALPHA};\n float scale = ${backend_util_exports.SELU_SCALE};\n return (x >= 0.0) ? scale * x : scaleAlpha * (exp(x) - 1.0);\n`;\nvar selu3 = unaryKernelFunc2({ opSnippet: SELU });\nvar seluConfig2 = {\n kernelName: Selu,\n backendName: \"webgl\",\n kernelFunc: selu3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Sigmoid.js\nvar SIGMOID3 = CHECK_NAN_SNIPPET_UNARY + `\n return 1.0 / (1.0 + exp(-1.0 * x));\n`;\nvar SIGMOID_PACKED = `\n vec4 result = 1.0 / (1.0 + exp(-1.0 * x));\n bvec4 isNaN = isnan(x);\n\n result.r = isNaN.r ? x.r : result.r;\n result.g = isNaN.g ? x.g : result.g;\n result.b = isNaN.b ? x.b : result.b;\n result.a = isNaN.a ? x.a : result.a;\n\n return result;\n`;\nvar sigmoid3 = unaryKernelFunc2({\n opSnippet: SIGMOID3,\n packedOpSnippet: SIGMOID_PACKED,\n cpuKernelImpl: sigmoidImplCPU\n});\nvar sigmoidConfig2 = {\n kernelName: Sigmoid,\n backendName: \"webgl\",\n kernelFunc: sigmoid3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Sign.js\nvar SIGN = `\n if (isnan(x)) { return 0.0; }\n return sign(x);\n`;\nvar sign3 = unaryKernelFunc2({ opSnippet: SIGN });\nvar signConfig2 = {\n kernelName: Sign,\n backendName: \"webgl\",\n kernelFunc: sign3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Sin.js\nvar SIN = CHECK_NAN_SNIPPET_UNARY + `\n return sin(x);\n`;\nvar sin3 = unaryKernelFunc2({ opSnippet: SIN });\nvar sinConfig2 = {\n kernelName: Sin,\n backendName: \"webgl\",\n kernelFunc: sin3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Sinh.js\nvar SINH = `\n float e2x = exp(x);\n return (e2x - 1.0 / e2x) / 2.0;\n`;\nvar sinh3 = unaryKernelFunc2({ opSnippet: SINH });\nvar sinhConfig2 = {\n kernelName: Sinh,\n backendName: \"webgl\",\n kernelFunc: sinh3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Softplus.js\nvar SOFTPLUS = `\n float epsilon = 1.1920928955078125e-7;\n float threshold = log(epsilon) + 2.0;\n\n bool too_large = x > -threshold;\n bool too_small = x < threshold;\n\n float result;\n float exp_x = exp(x);\n\n if (too_large){\n result = x;\n }\n else if (too_small){\n result = exp_x;\n }\n else{\n result = log(exp_x + 1.0);\n }\n return result;\n`;\nvar softplus3 = unaryKernelFunc2({ opSnippet: SOFTPLUS });\nvar softplusConfig2 = {\n kernelName: Softplus,\n backendName: \"webgl\",\n kernelFunc: softplus3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/SpaceToBatchND.js\nvar spaceToBatchND3 = (args) => {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { blockShape, paddings } = attrs;\n util_exports.assert(x.shape.length <= 4, () => \"spaceToBatchND for rank > 4 with a WebGL backend not implemented yet\");\n const prod6 = blockShape.reduce((a, b) => a * b);\n const completePaddings = [[0, 0]];\n completePaddings.push(...paddings);\n for (let i2 = 1 + blockShape.length; i2 < x.shape.length; ++i2) {\n completePaddings.push([0, 0]);\n }\n const toDispose = [];\n const paddedX = padV22({\n inputs: { x },\n backend: backend2,\n attrs: { paddings: completePaddings, constantValue: 0 }\n });\n const reshapedPaddedShape = backend_util_exports.getReshaped(paddedX.shape, blockShape, prod6, false);\n const permutedReshapedPaddedPermutation = backend_util_exports.getPermuted(reshapedPaddedShape.length, blockShape.length, false);\n const flattenShape = backend_util_exports.getReshapedPermuted(paddedX.shape, blockShape, prod6, false);\n const reshapedPaddedX = reshape4({ inputs: { x: paddedX }, backend: backend2, attrs: { shape: reshapedPaddedShape } });\n const paddedXT = transpose3({\n inputs: { x: reshapedPaddedX },\n backend: backend2,\n attrs: { perm: permutedReshapedPaddedPermutation }\n });\n const result = reshape4({ inputs: { x: paddedXT }, backend: backend2, attrs: { shape: flattenShape } });\n toDispose.push(paddedX);\n toDispose.push(reshapedPaddedX);\n toDispose.push(paddedXT);\n toDispose.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2));\n return result;\n};\nvar spaceToBatchNDConfig2 = {\n kernelName: SpaceToBatchND,\n backendName: \"webgl\",\n kernelFunc: spaceToBatchND3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/SparseFillEmptyRows.js\nfunction sparseFillEmptyRows3(args) {\n const { inputs, backend: backend2 } = args;\n const { indices, values, denseShape, defaultValue } = inputs;\n if (denseShape.shape.length !== 1) {\n throw new Error(`Dense shape must be a vector, saw:\n ${denseShape.shape}`);\n }\n if (indices.shape.length !== 2) {\n throw new Error(`Indices must be a matrix, saw:\n ${indices.shape}`);\n }\n if (values.shape.length !== 1) {\n throw new Error(`Values must be a vector, saw:\n ${values.shape}`);\n }\n if (defaultValue.shape.length !== 0) {\n throw new Error(`Default value must be a scalar, saw:\n ${defaultValue.shape}`);\n }\n const $indices = backend2.readSync(indices.dataId);\n const $values = backend2.readSync(values.dataId);\n const $denseShape = backend2.readSync(denseShape.dataId);\n const $defaultValue = backend2.readSync(defaultValue.dataId)[0];\n const [outputIndices, outputIndicesShape, outputValues, emptyRowIndicator, reverseIndexMap] = sparseFillEmptyRowsImplCPU($indices, indices.shape, indices.dtype, $values, values.dtype, $denseShape, $defaultValue);\n return [\n backend2.makeTensorInfo(outputIndicesShape, indices.dtype, outputIndices),\n backend2.makeTensorInfo([outputIndicesShape[0]], values.dtype, outputValues),\n backend2.makeTensorInfo([emptyRowIndicator.length], \"bool\", new Uint8Array(emptyRowIndicator.map((value) => Number(value)))),\n backend2.makeTensorInfo([reverseIndexMap.length], indices.dtype, new Int32Array(reverseIndexMap))\n ];\n}\nvar sparseFillEmptyRowsConfig2 = {\n kernelName: SparseFillEmptyRows,\n backendName: \"webgl\",\n kernelFunc: sparseFillEmptyRows3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/SparseReshape.js\nfunction sparseReshape3(args) {\n const { inputs, backend: backend2 } = args;\n const { inputIndices, inputShape, newShape } = inputs;\n if (inputIndices.shape.length !== 2) {\n throw new Error(`Input indices should be a matrix but received shape ${inputIndices.shape}`);\n }\n if (inputShape.shape.length !== 1) {\n throw new Error(`Input shape should be a vector but received shape ${inputShape.shape}`);\n }\n if (newShape.shape.length !== 1) {\n throw new Error(`Target shape should be a vector but received shape ${newShape.shape}`);\n }\n const $inputShape = Array.from(backend2.readSync(inputShape.dataId));\n const $inputIndices = backend2.readSync(inputIndices.dataId);\n const targetShape = Array.from(backend2.readSync(newShape.dataId));\n const [newIndices, indicesShape, outputShape] = sparseReshapeImplCPU($inputIndices, inputIndices.shape, inputIndices.dtype, $inputShape, targetShape);\n return [\n backend2.makeTensorInfo(indicesShape, inputIndices.dtype, newIndices),\n backend2.makeTensorInfo([outputShape.length], newShape.dtype, new Int32Array(outputShape))\n ];\n}\nvar sparseReshapeConfig2 = {\n kernelName: SparseReshape,\n backendName: \"webgl\",\n kernelFunc: sparseReshape3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/SparseSegmentMean.js\nfunction sparseSegmentMean3(args) {\n const { inputs, backend: backend2 } = args;\n const { data, indices, segmentIds } = inputs;\n if (data.shape.length < 1) {\n throw new Error(`Data should be at least 1 dimensional but received scalar`);\n }\n if (indices.shape.length !== 1) {\n throw new Error(`Indices should be a vector but received shape\n ${indices.shape}`);\n }\n if (segmentIds.shape.length !== 1) {\n throw new Error(`Segment ids should be a vector but received shape\n ${segmentIds.shape}`);\n }\n const $data = backend2.readSync(data.dataId);\n const $indices = backend2.readSync(indices.dataId);\n const $segmentIds = backend2.readSync(segmentIds.dataId);\n const [outputData, outputDataShape] = sparseSegmentReductionImplCPU($data, data.shape, data.dtype, $indices, $segmentIds, true);\n return backend2.makeTensorInfo(outputDataShape, data.dtype, outputData);\n}\nvar sparseSegmentMeanConfig2 = {\n kernelName: SparseSegmentMean,\n backendName: \"webgl\",\n kernelFunc: sparseSegmentMean3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/SparseSegmentSum.js\nfunction sparseSegmentSum3(args) {\n const { inputs, backend: backend2 } = args;\n const { data, indices, segmentIds } = inputs;\n if (data.shape.length < 1) {\n throw new Error(`Data should be at least 1 dimensional but received scalar`);\n }\n if (indices.shape.length !== 1) {\n throw new Error(`Indices should be a vector but received shape\n ${indices.shape}`);\n }\n if (segmentIds.shape.length !== 1) {\n throw new Error(`Segment ids should be a vector but received shape\n ${segmentIds.shape}`);\n }\n const $data = backend2.readSync(data.dataId);\n const $indices = backend2.readSync(indices.dataId);\n const $segmentIds = backend2.readSync(segmentIds.dataId);\n const [outputData, outputDataShape] = sparseSegmentReductionImplCPU($data, data.shape, data.dtype, $indices, $segmentIds);\n return backend2.makeTensorInfo(outputDataShape, data.dtype, outputData);\n}\nvar sparseSegmentSumConfig2 = {\n kernelName: SparseSegmentSum,\n backendName: \"webgl\",\n kernelFunc: sparseSegmentSum3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/SparseToDense.js\nfunction sparseToDense3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { sparseIndices, sparseValues, defaultValue } = inputs;\n const { outputShape } = attrs;\n const { sliceRank, numUpdates, sliceSize, strides, outputSize } = backend_util_exports.calculateShapes(sparseValues, sparseIndices, outputShape);\n const sumDupeIndices = false;\n if (sparseValues.dtype === \"string\") {\n const indicesBuf = backend2.bufferSync(sparseIndices);\n const updatesBuf = backend2.bufferSync(sparseValues);\n const $defaultValue = util_exports.decodeString(backend2.readSync(defaultValue.dataId)[0]);\n const outBuf = scatterImplCPU(indicesBuf, updatesBuf, outputShape, outputSize, sliceSize, numUpdates, sliceRank, strides, $defaultValue, sumDupeIndices);\n return backend2.makeTensorInfo(outputShape, outBuf.dtype, outBuf.values);\n }\n const program = new ScatterProgram(numUpdates, sliceRank, sparseIndices.shape.length, sparseValues.shape.length, strides, [outputSize, 1], sumDupeIndices);\n const res = backend2.runWebGLProgram(program, [sparseValues, sparseIndices, defaultValue], sparseValues.dtype);\n const reshaped = reshape4({ inputs: { x: res }, backend: backend2, attrs: { shape: outputShape } });\n backend2.disposeIntermediateTensorInfo(res);\n return reshaped;\n}\nvar sparseToDenseConfig2 = {\n kernelName: SparseToDense,\n backendName: \"webgl\",\n kernelFunc: sparseToDense3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/SplitV.js\nfunction splitV2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { numOrSizeSplits, axis } = attrs;\n const $axis = util_exports.parseAxisParam(axis, x.shape)[0];\n const splitSizes = backend_util_exports.prepareSplitSize(x, numOrSizeSplits, $axis);\n const xRank = x.shape.length;\n const begin = new Array(xRank).fill(0);\n const size = x.shape.slice();\n return splitSizes.map((s2) => {\n const sliceSize = [...size];\n sliceSize[$axis] = s2;\n const sliceT = slice3({ inputs: { x }, backend: backend2, attrs: { begin, size: sliceSize } });\n begin[$axis] += s2;\n return sliceT;\n });\n}\nvar splitVConfig2 = {\n kernelName: SplitV,\n backendName: \"webgl\",\n kernelFunc: splitV2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Sqrt.js\nvar SQRT = `return sqrt(x);`;\nvar sqrt3 = unaryKernelFunc2({ opSnippet: SQRT, packedOpSnippet: SQRT, cpuKernelImpl: sqrtImplCPU });\nvar sqrtConfig2 = {\n kernelName: Sqrt,\n backendName: \"webgl\",\n kernelFunc: sqrt3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Square.js\nvar SQUARE = `return x * x;`;\nvar square3 = unaryKernelFunc2({ opSnippet: SQUARE });\nvar squareConfig2 = {\n kernelName: Square,\n backendName: \"webgl\",\n kernelFunc: square3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/SquaredDifference.js\nvar SQUARED_DIFFERENCE = \"return (a - b) * (a - b);\";\nvar squaredDifference3 = binaryKernelFunc2({ opSnippet: SQUARED_DIFFERENCE, packedOpSnippet: SQUARED_DIFFERENCE });\nvar squaredDifferenceConfig2 = {\n kernelName: SquaredDifference,\n backendName: \"webgl\",\n kernelFunc: squaredDifference3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Step.js\nfunction step3({ inputs, attrs, backend: backend2 }) {\n const { x } = inputs;\n const opSnippet = CHECK_NAN_SNIPPET + `\n return x > 0.0 ? 1.0 : float(${attrs.alpha});\n `;\n const program = new UnaryOpProgram(x.shape, opSnippet);\n return backend2.runWebGLProgram(program, [x], x.dtype);\n}\nvar stepConfig2 = {\n kernelName: Step,\n backendName: \"webgl\",\n kernelFunc: step3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/strided_slice_gpu.js\nvar StridedSliceProgram = class {\n constructor(begin, strides, size) {\n this.variableNames = [\"x\"];\n this.outputShape = size;\n const rank = size.length;\n const inputDtype = getCoordsDataType(size.length);\n const dtype = getCoordsDataType(size.length);\n let newCoords = \"\";\n if (rank === 1) {\n newCoords = \"coords * strides + begin\";\n } else {\n let outputAxis = 0;\n newCoords = size.map((_, i2) => {\n outputAxis++;\n return size.length === 1 ? `coords * strides[${i2}] + begin[${i2}]` : `coords[${outputAxis - 1}] * strides[${i2}] + begin[${i2}]`;\n }).join(\",\");\n }\n this.userCode = `\n ${inputDtype} begin = ${inputDtype}(${begin});\n ${inputDtype} strides = ${inputDtype}(${strides});\n\n void main() {\n ${dtype} coords = getOutputCoords();\n setOutput(getX(${newCoords}));\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/StridedSlice.js\nfunction stridedSlice3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { begin, end, strides, beginMask, endMask, ellipsisMask, newAxisMask, shrinkAxisMask } = attrs;\n const { finalShapeSparse, finalShape, isIdentity, sliceDim0, isSimpleSlice, begin: $begin, end: $end, strides: $strides } = slice_util_exports.sliceInfo(x.shape, begin, end, strides, beginMask, endMask, ellipsisMask, newAxisMask, shrinkAxisMask);\n let result;\n if (isIdentity) {\n result = reshape4({ inputs: { x }, backend: backend2, attrs: { shape: finalShape } });\n } else if (sliceDim0 || isSimpleSlice) {\n util_exports.assert(x.shape.length >= 1, () => `Input must have rank at least 1, got: ${x.shape.length}`);\n const size = slice_util_exports.computeOutShape($begin, $end, $strides);\n const sliced = slice3({ inputs: { x }, backend: backend2, attrs: { begin: $begin, size } });\n result = reshape4({ inputs: { x: sliced }, backend: backend2, attrs: { shape: finalShape } });\n backend2.disposeIntermediateTensorInfo(sliced);\n } else {\n const shouldExecuteOnCPU = backend2.shouldExecuteOnCPU([x]);\n if (shouldExecuteOnCPU) {\n const values = backend2.readSync(x.dataId);\n const xBuf = buffer(x.shape, x.dtype, values);\n const resultValues = stridedSliceImplCPU(finalShapeSparse, xBuf, $strides, $begin);\n result = backend2.makeTensorInfo(finalShape, x.dtype, resultValues.values);\n } else {\n const program = new StridedSliceProgram($begin, $strides, finalShapeSparse);\n result = backend2.runWebGLProgram(program, [x], x.dtype);\n }\n }\n const resultReshaped = reshape4({ inputs: { x: result }, backend: backend2, attrs: { shape: finalShape } });\n backend2.disposeIntermediateTensorInfo(result);\n return resultReshaped;\n}\nvar stridedSliceConfig2 = {\n kernelName: StridedSlice,\n backendName: \"webgl\",\n kernelFunc: stridedSlice3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/StringNGrams.js\nfunction stringNGrams3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { separator, nGramWidths, leftPad, rightPad: rightPad2, padWidth, preserveShortSequences } = attrs;\n const { data, dataSplits } = inputs;\n const $data = backend2.readSync(data.dataId);\n const $dataSplits = backend2.readSync(dataSplits.dataId);\n const [nGrams, nGramsSplits] = stringNGramsImplCPU($data, $dataSplits, separator, nGramWidths, leftPad, rightPad2, padWidth, preserveShortSequences);\n return [\n backend2.makeTensorInfo([nGrams.length], \"string\", nGrams),\n backend2.makeTensorInfo(dataSplits.shape, \"int32\", nGramsSplits)\n ];\n}\nvar stringNGramsConfig2 = {\n kernelName: StringNGrams,\n backendName: \"webgl\",\n kernelFunc: stringNGrams3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/StringSplit.js\nfunction stringSplit3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { skipEmpty } = attrs;\n const { input: input2, delimiter } = inputs;\n if (input2.dtype !== \"string\") {\n throw new Error(\"Input must be of datatype string\");\n }\n if (input2.shape.length !== 1) {\n throw new Error(`Input must be a vector, got shape: ${input2.shape}`);\n }\n if (delimiter.shape.length !== 0) {\n throw new Error(`Delimiter must be a scalar, got shape: ${delimiter.shape}`);\n }\n const $input = backend2.readSync(input2.dataId);\n const $delimiter = backend2.readSync(delimiter.dataId)[0];\n const [indices, values, shape] = stringSplitImplCPU($input, $delimiter, skipEmpty);\n const outputSize = values.length;\n return [\n backend2.makeTensorInfo([outputSize, 2], \"int32\", indices),\n backend2.makeTensorInfo([outputSize], \"string\", values),\n backend2.makeTensorInfo([2], \"int32\", new Int32Array(shape))\n ];\n}\nvar stringSplitConfig2 = {\n kernelName: StringSplit,\n backendName: \"webgl\",\n kernelFunc: stringSplit3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/StringToHashBucketFast.js\nfunction stringToHashBucketFast3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { numBuckets } = attrs;\n const { input: input2 } = inputs;\n if (input2.dtype !== \"string\") {\n throw new Error(\"Input must be of datatype string\");\n }\n if (numBuckets <= 0) {\n throw new Error(`Number of buckets must be at least 1`);\n }\n const $input = backend2.readSync(input2.dataId);\n const output = stringToHashBucketFastImplCPU($input, numBuckets);\n return backend2.makeTensorInfo(input2.shape, \"int32\", output);\n}\nvar stringToHashBucketFastConfig2 = {\n kernelName: StringToHashBucketFast,\n backendName: \"webgl\",\n kernelFunc: stringToHashBucketFast3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Tan.js\nvar TAN = `return tan(x);`;\nvar tan3 = unaryKernelFunc2({ opSnippet: TAN });\nvar tanConfig2 = {\n kernelName: Tan,\n backendName: \"webgl\",\n kernelFunc: tan3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Tanh.js\nvar TANH = `\n float e2x = exp(-2.0 * abs(x));\n return sign(x) * (1.0 - e2x) / (1.0 + e2x);\n`;\nvar tanh4 = unaryKernelFunc2({ opSnippet: TANH });\nvar tanhConfig2 = {\n kernelName: Tanh,\n backendName: \"webgl\",\n kernelFunc: tanh4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/tile_gpu.js\nvar TileProgram = class {\n constructor(aShape, reps) {\n this.variableNames = [\"A\"];\n const outputShape = new Array(aShape.length);\n for (let i2 = 0; i2 < outputShape.length; i2++) {\n outputShape[i2] = aShape[i2] * reps[i2];\n }\n this.outputShape = outputShape;\n this.rank = outputShape.length;\n const dtype = getCoordsDataType(this.rank);\n const sourceCoords = getSourceCoords3(aShape);\n this.userCode = `\n void main() {\n ${dtype} resRC = getOutputCoords();\n setOutput(getA(${sourceCoords}));\n }\n `;\n }\n};\nfunction getSourceCoords3(aShape) {\n const rank = aShape.length;\n if (rank > 5) {\n throw Error(`Tile for rank ${rank} is not yet supported`);\n }\n if (rank === 1) {\n return `imod(resRC, ${aShape[0]})`;\n }\n const currentCoords = [\"resRC.x\", \"resRC.y\", \"resRC.z\", \"resRC.w\", \"resRC.u\"];\n const sourceCoords = [];\n for (let i2 = 0; i2 < aShape.length; i2++) {\n sourceCoords.push(`imod(${currentCoords[i2]}, ${aShape[i2]})`);\n }\n return sourceCoords.join();\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Tile.js\nfunction tile4(params) {\n const { inputs, backend: backend2, attrs } = params;\n const { x } = inputs;\n const { reps } = attrs;\n if (x.dtype === \"string\" || x.shape.length > 5) {\n const data = backend2.readSync(x.dataId);\n const value = x.dtype === \"string\" ? data.map((d) => util_exports.decodeString(d)) : data;\n const buf = buffer(x.shape, x.dtype, value);\n const outBuf = tileImplCPU(buf, reps);\n return backend2.makeTensorInfo(outBuf.shape, outBuf.dtype, outBuf.values);\n }\n const program = new TileProgram(x.shape, reps);\n const output = backend2.runWebGLProgram(program, [x], x.dtype);\n return output;\n}\nvar tileConfig2 = {\n kernelName: Tile,\n backendName: \"webgl\",\n kernelFunc: tile4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/top_k_gpu.js\nvar SwapProgram = class {\n constructor(shape) {\n this.variableNames = [\"x\", \"indices\"];\n this.customUniforms = [\n { name: \"n\", type: \"int\" },\n { name: \"firstPass\", type: \"int\" },\n { name: \"negativeInf\", type: \"float\" },\n { name: \"dir\", type: \"int\" },\n { name: \"inc\", type: \"int\" }\n ];\n this.outputShape = shape;\n this.userCode = `\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n int elemIdx = coords[1];\n\n // We compare elements pair-wise within a group of size 2 * inc.\n // The comparing rule for each group alternates between ascending\n // and descending. Within each group, we compare each pair at\n // positions i and i+inc. To decide whether an element at position i\n // is x0 or x1, we mod it by 2 * inc, if the result is smaller than\n // inc, it is in the first half of the group, we denote it as x0,\n // otherwise we denote it as x1.\n // For example, as shown in the Bitonic top K paper referenced above,\n // Figure5(a) shows that element[1] is in the\n // second half of the group when group size is 2, but it is in the\n // first half of the group when group size is 4.\n\n bool isFirstInPair = imod(elemIdx, 2 * inc) < inc;\n int i = isFirstInPair ? elemIdx : elemIdx - inc;\n\n int i0 = firstPass == 1 ? i : int(getIndices(batch, i));\n int i1 = firstPass == 1 ? i + inc : int(getIndices(batch, i + inc));\n float x0 = i0 < n ? getX(batch, i0) : negativeInf;\n float x1 = i1 < n ? getX(batch, i1) : negativeInf;\n\n // Denotes which direction indices are in (ascending or descending).\n bool reverse = imod(elemIdx, 2 * dir) >= dir;\n bool isGreater = x0 > x1 || (x0 == x1 && i1 > i0);\n if (reverse == isGreater) { // Elements in opposite order of direction\n int iTemp = i0;\n i0 = i1;\n i1 = iTemp;\n }\n if (isFirstInPair) {\n setOutput(float(i0));\n } else {\n setOutput(float(i1));\n }\n }\n `;\n }\n};\nvar MergeProgram = class {\n constructor(shape) {\n this.variableNames = [\"x\", \"indices\"];\n this.customUniforms = [\n { name: \"n\", type: \"int\" },\n { name: \"firstPass\", type: \"int\" },\n { name: \"k\", type: \"int\" }\n ];\n this.outputShape = shape;\n this.userCode = `\n void main() {\n // Takes max of indices (0, k), (1, k + 1), (2, k + 2) ...\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n int elemIdx = coords[1];\n\n // The output size is half of the previous size.\n // If the previous sequence is | | | | _ _ _ _ | | | | _ _ _ _ (k=4),\n // we only need to output the indices at positions |, the indices at\n // positions _ can be thrown away, see Figure5(b) After Phase 2\n // (Merge phase) in the Bitonic Top K paper referenced above.\n // For example, the paper shows we only need to output the orange bars.\n // The output sequence should look like this | | | | | | | |.\n // Because the sequence is halved, to map the output index back\n // to the previous sequence to find the corresponding value,\n // we need to double the index. When we double the index,\n // we basically interpolate a position, so 2i looks like\n // | _ | _ | _ | _ | _ | _ | _. We move the | to the first k position\n // of each 2k positions by - elemIdx % k. E.g. for output at\n // index 4,5,6,7, we want to get the corresponding element at\n // original index 8,9,10,11, for output at index 8,9,10,11,\n // we want to get the corresponding element at original index\n // 16,17,18,19, so on and so forth.\n\n int i = elemIdx < k ? elemIdx : (elemIdx * 2 - imod(elemIdx, k));\n int i0 = firstPass == 1 ? i : int(getIndices(batch, i));\n int i1 = firstPass == 1 ? i + k : int(getIndices(batch, i + k));\n\n float x0 = getX(batch, i0);\n float x1 = i1 < n ? getX(batch, i1) : x0;\n\n setOutput(x0 >= x1 ? float(i0) : float(i1));\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/TopK.js\nfunction disposeIntermediateTensorInfoOrNull(backend2, tensorInfo) {\n if (tensorInfo !== null) {\n backend2.disposeIntermediateTensorInfo(tensorInfo);\n }\n}\nfunction roundUpToPow2(num) {\n let pow22 = 1;\n while (pow22 < num) {\n pow22 *= 2;\n }\n return pow22;\n}\nfunction topK2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { k, sorted } = attrs;\n const TOPK_LAST_DIM_CPU_HANDOFF_SIZE_THRESHOLD = env().getNumber(\"TOPK_LAST_DIM_CPU_HANDOFF_SIZE_THRESHOLD\");\n const TOPK_K_CPU_HANDOFF_THRESHOLD = env().getNumber(\"TOPK_K_CPU_HANDOFF_THRESHOLD\");\n const xShape = x.shape;\n const lastDim = xShape[xShape.length - 1];\n if (backend2.shouldExecuteOnCPU([x]) || lastDim < TOPK_LAST_DIM_CPU_HANDOFF_SIZE_THRESHOLD || k > TOPK_K_CPU_HANDOFF_THRESHOLD) {\n const xVals = backend2.readSync(x.dataId);\n const [allTopKVals, allTopKIndices] = topKImplCPU(xVals, xShape, x.dtype, k, sorted);\n return [\n backend2.makeTensorInfo(allTopKVals.shape, allTopKVals.dtype, allTopKVals.values),\n backend2.makeTensorInfo(allTopKIndices.shape, allTopKIndices.dtype, allTopKIndices.values)\n ];\n }\n if (k === 0) {\n xShape[xShape.length - 1] = 0;\n return [\n backend2.makeTensorInfo(xShape, x.dtype, []),\n backend2.makeTensorInfo(xShape, \"int32\", [])\n ];\n }\n if (lastDim === 1) {\n return [\n x,\n fill3({ attrs: { shape: xShape, dtype: \"int32\", value: 0 }, backend: backend2 })\n ];\n }\n const xtexData = backend2.texData.get(x.dataId);\n const xIsPacked = xtexData !== null && xtexData.isPacked;\n const xUnPacked = xIsPacked ? backend2.unpackTensor(x) : x;\n const xSize = util_exports.sizeFromShape(xShape);\n const batch = xSize / lastDim;\n const x2D = reshape4({ inputs: { x: xUnPacked }, attrs: { shape: [batch, lastDim] }, backend: backend2 });\n if (xIsPacked) {\n disposeIntermediateTensorInfoOrNull(backend2, xUnPacked);\n }\n const kPow2 = roundUpToPow2(k);\n const lastDimPow2 = roundUpToPow2(lastDim);\n let indices = null;\n const getInputs = () => indices === null ? [x2D, x2D] : [x2D, indices];\n const runSwap = (dir, inc, shape) => {\n const inputs2 = getInputs();\n const program = new SwapProgram(shape);\n const fistPass = indices === null ? 1 : 0;\n const customValues = [[lastDim], [fistPass], [Number.NEGATIVE_INFINITY], [dir], [inc]];\n const prevIndices2 = indices;\n indices = backend2.runWebGLProgram(program, inputs2, \"int32\", customValues);\n disposeIntermediateTensorInfoOrNull(backend2, prevIndices2);\n };\n for (let len = 1; len < kPow2; len *= 2) {\n const dir = len * 2;\n for (let inc = len; inc >= 1; inc /= 2) {\n runSwap(dir, inc, [batch, lastDimPow2]);\n }\n }\n for (let indicesSize = lastDimPow2; indicesSize > kPow2; indicesSize /= 2) {\n const inputs2 = getInputs();\n const mergeProgram = new MergeProgram([batch, indicesSize / 2]);\n const firstPass = indices === null ? 1 : 0;\n const customValues = [[lastDim], [firstPass], [kPow2]];\n const prevIndices2 = indices;\n indices = backend2.runWebGLProgram(mergeProgram, inputs2, \"int32\", customValues);\n disposeIntermediateTensorInfoOrNull(backend2, prevIndices2);\n const len = kPow2 / 2;\n const dir = len * 2;\n for (let inc = len; inc >= 1; inc /= 2) {\n runSwap(dir, inc, indices.shape);\n }\n }\n let prevIndices = indices;\n indices = slice3({ inputs: { x: indices }, backend: backend2, attrs: { begin: 0, size: [batch, k] } });\n disposeIntermediateTensorInfoOrNull(backend2, prevIndices);\n let values = gatherV22({ inputs: { x: x2D, indices }, backend: backend2, attrs: { axis: 1, batchDims: 1 } });\n disposeIntermediateTensorInfoOrNull(backend2, x2D);\n const newShape = xShape.slice(0, -1);\n newShape.push(k);\n prevIndices = indices;\n indices = reshape4({ inputs: { x: indices }, attrs: { shape: newShape }, backend: backend2 });\n disposeIntermediateTensorInfoOrNull(backend2, prevIndices);\n const prevValues = values;\n values = reshape4({ inputs: { x: values }, attrs: { shape: newShape }, backend: backend2 });\n disposeIntermediateTensorInfoOrNull(backend2, prevValues);\n return [values, indices];\n}\nvar topKConfig2 = {\n kernelName: TopK,\n backendName: \"webgl\",\n kernelFunc: topK2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/transform_gpu.js\nvar TransformProgram = class {\n constructor(imageHeight, imageWidth, interpolation, fillMode, fillValue, outShape) {\n this.variableNames = [\"Image\", \"Transforms\"];\n this.outputShape = outShape;\n const interpolationModeId = interpolation === \"nearest\" ? 1 : 2;\n let fillModeId;\n switch (fillMode) {\n case \"constant\":\n fillModeId = 1;\n break;\n case \"reflect\":\n fillModeId = 2;\n break;\n case \"wrap\":\n fillModeId = 3;\n break;\n case \"nearest\":\n fillModeId = 4;\n break;\n default:\n fillModeId = 1;\n break;\n }\n this.userCode = `\n float mapCoord(float outCoord, float len) {\n float inCoord = outCoord;\n if(${fillModeId} == 2) {\n if (inCoord < 0.0) {\n if (len <= 1.0) {\n inCoord = 0.0;\n } else {\n float sz2 = 2.0 * len;\n if (inCoord < sz2) {\n inCoord = sz2 * float(int(float(-inCoord / sz2))) +\n inCoord;\n }\n inCoord = inCoord < -len ? inCoord + sz2 : -inCoord - 1.0;\n }\n } else if (inCoord > len - 1.0) {\n if (len <= 1.0) {\n inCoord = 0.0;\n } else {\n float sz2 = 2.0 * len;\n inCoord -= sz2 * float(int(float(inCoord / sz2)));\n if (inCoord >= len) {\n inCoord = sz2 - inCoord - 1.0;\n }\n }\n }\n return clamp(inCoord, 0.0, len - 1.0);\n } else if (${fillModeId} == 3) {\n if (inCoord < 0.0) {\n if (len <= 1.0) {\n inCoord = 0.0;\n } else {\n float sz = len - 1.0;\n inCoord += len * (float(int(float(-inCoord / sz))) + 1.0);\n }\n } else if (inCoord > len - 1.0) {\n if (len <= 1.0) {\n inCoord = 0.0;\n } else {\n float sz = len - 1.0;\n inCoord -= len * float(int(float(inCoord / sz)));\n }\n }\n return clamp(inCoord, 0.0, len - 1.0);\n } else if (${fillModeId} == 4) {\n return clamp(outCoord, 0.0, len - 1.0);\n } else {\n return outCoord;\n }\n }\n\n float readWithFillValue(int batch, int coordY, int coordX,\n int channel) {\n float outputValue;\n if (0 <= coordY && coordY < ${imageHeight} && 0 <= coordX && coordX < ${imageWidth}) {\n outputValue = getImage(batch, coordY, coordX, channel);\n } else {\n outputValue = float(${fillValue});\n }\n return outputValue;\n }\n\n void main() {\n ivec4 coords = getOutputCoords();\n float outputValue;\n int batch = coords[0];\n int x = coords[2];\n int y = coords[1];\n int channel = coords[3];\n float xf = float(x);\n float yf = float(y);\n float a1 = getTransforms(batch, 0);\n float a2 = getTransforms(batch, 1);\n float a3 = getTransforms(batch, 2);\n float b1 = getTransforms(batch, 3);\n float b2 = getTransforms(batch, 4);\n float b3 = getTransforms(batch, 5);\n float c1 = getTransforms(batch, 6);\n float c2 = getTransforms(batch, 7);\n float projection = c1 * xf + c2 * yf + 1.0;\n if (projection == 0.0) {\n outputValue = float(${fillValue});\n } else {\n float inX = (a1 * xf + a2 * yf + a3) / projection;\n float inY = (b1 * xf + b2 * yf + b3) / projection;\n float mapX = mapCoord(inX, float(${imageWidth}));\n float mapY = mapCoord(inY, float(${imageHeight}));\n\n if (${interpolationModeId} == 1) {\n int coordY = int(round(mapY));\n int coordX = int(round(mapX));\n outputValue = readWithFillValue(batch, coordY, coordX,\n channel);\n } else {\n float yFloor = floor(mapY);\n float xFloor = floor(mapX);\n float yCeil = yFloor + 1.0;\n float xCeil = xFloor + 1.0;\n float valueYFloor = (xCeil - mapX) *\n readWithFillValue(batch, int(yFloor), int(xFloor), channel) +\n (mapX - xFloor) *\n readWithFillValue(batch, int(yFloor), int(xCeil), channel);\n float valueYCeil = (xCeil - mapX) *\n readWithFillValue(batch, int(yCeil), int(xFloor), channel) +\n (mapX - xFloor) *\n readWithFillValue(batch, int(yCeil), int(xCeil), channel);\n outputValue = (yCeil - mapY) * valueYFloor +\n (mapY - yFloor) * valueYCeil;\n }\n }\n setOutput(outputValue);\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Transform.js\nfunction transform3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { image: image2, transforms } = inputs;\n const { interpolation, fillMode, fillValue, outputShape } = attrs;\n const [batch, imageHeight, imageWidth, numChannels] = image2.shape;\n const [outHeight, outWidth] = outputShape != null ? outputShape : [imageHeight, imageWidth];\n const outShape = [\n batch,\n outHeight,\n outWidth,\n numChannels\n ];\n const program = new TransformProgram(imageHeight, imageWidth, interpolation, fillMode, fillValue, outShape);\n return backend2.runWebGLProgram(program, [image2, transforms], \"float32\");\n}\nvar transformConfig2 = {\n kernelName: Transform,\n backendName: \"webgl\",\n kernelFunc: transform3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Unique.js\nfunction unique4(args) {\n const { inputs, attrs, backend: backend2 } = args;\n const { axis } = attrs;\n const { x } = inputs;\n assertNotComplex2(x, \"unique\");\n console.warn(\"WARNING: \", \"UI might be locked temporarily as data is being downloaded\");\n const values = backend2.readSync(x.dataId);\n const { outputValues, outputShape, indices } = uniqueImplCPU(values, axis, x.shape, x.dtype);\n return [\n backend2.makeTensorInfo(outputShape, x.dtype, outputValues),\n backend2.makeTensorInfo([indices.length], \"int32\", indices)\n ];\n}\nvar uniqueConfig2 = {\n kernelName: Unique,\n backendName: \"webgl\",\n kernelFunc: unique4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Unpack.js\nfunction unpack2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { value } = inputs;\n let { axis } = attrs;\n if (axis < 0) {\n axis += value.shape.length;\n }\n const x = value;\n const xRank = x.shape.length;\n const num = value.shape[axis];\n const outShape = new Array(xRank - 1);\n let outIndex = 0;\n for (let i2 = 0; i2 < xRank; i2++) {\n if (i2 !== axis) {\n outShape[outIndex++] = x.shape[i2];\n }\n }\n const toDispose = [];\n const begin = new Array(xRank).fill(0);\n const size = x.shape.slice();\n size[axis] = 1;\n const res = new Array(num);\n for (let i2 = 0; i2 < res.length; i2++) {\n begin[axis] = i2;\n const sliced = slice3({ inputs: { x }, backend: backend2, attrs: { begin, size } });\n const reshaped = reshape4({ inputs: { x: sliced }, backend: backend2, attrs: { shape: outShape } });\n res[i2] = reshaped;\n toDispose.push(sliced);\n }\n toDispose.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2));\n return res;\n}\nvar unpackConfig2 = {\n kernelName: Unpack,\n backendName: \"webgl\",\n kernelFunc: unpack2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/segment_gpu.js\nvar SegmentOpProgram = class {\n constructor(segOpInfo, segOpType) {\n this.variableNames = [\"x\", \"segmentIds\"];\n const windowSize = segOpInfo.windowSize;\n const batchSize = segOpInfo.batchSize;\n const inSize = segOpInfo.inSize;\n const numSegments = segOpInfo.numSegments;\n const outSize = numSegments * Math.ceil(inSize / windowSize);\n this.outputShape = [batchSize, outSize];\n const initializationValue = \"0.0\";\n const returnValue = `sumValue`;\n const windowSizeNearestVec4 = Math.floor(windowSize / 4) * 4;\n const windowSizeVec4Remainder = windowSize % 4;\n const updateSnippet = `\n sumValue += dot(values, segFilter);\n `;\n let checkValueOutOfBounds = \"\";\n if (inSize % windowSize > 0) {\n checkValueOutOfBounds = `\n if (inIdx < 0 || inIdx >= ${inSize}) {\n return initializationValue;\n }\n `;\n }\n let checkSegmentIdOutOfBounds = \"\";\n if (inSize % windowSize > 0) {\n checkSegmentIdOutOfBounds = `\n if (inIdx < 0 || inIdx >= ${inSize}) {\n return -1.0;\n }\n `;\n }\n this.userCode = `\n const float initializationValue = ${initializationValue};\n\n float getValue(int batch, int inIdx) {\n ${checkValueOutOfBounds}\n return getX(batch, inIdx);\n }\n\n float getSegmentIdAtIndex(int inIdx) {\n ${checkSegmentIdOutOfBounds}\n return getSegmentIds(inIdx);\n }\n\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n int outIdx = coords[1];\n int inOffset = int(floor(float(outIdx) / float(\n ${numSegments})) * float(${windowSize}));\n int currentSeg = int(mod(float(outIdx), float(${numSegments})));\n\n float sumValue = 0.0;\n\n for (int i = 0; i < ${windowSizeNearestVec4}; i += 4) {\n int inIdx = inOffset + i;\n vec4 values = vec4(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n getValue(batch, inIdx + 2),\n getValue(batch, inIdx + 3)\n );\n\n vec4 segFilter = vec4(\n int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 2)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 3)) == currentSeg ? 1 : 0\n );\n\n ${updateSnippet}\n }\n\n int inIdx = inOffset + ${windowSizeNearestVec4};\n if (${windowSizeVec4Remainder === 1}) {\n vec4 values = vec4(\n getValue(batch, inIdx),\n initializationValue,\n initializationValue,\n initializationValue\n );\n\n int inIdxSeg = int(getSegmentIdAtIndex(inIdx));\n\n vec4 segFilter = vec4(\n int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,\n 0,\n 0,\n 0\n );\n\n ${updateSnippet}\n } else if (${windowSizeVec4Remainder === 2}) {\n vec4 values = vec4(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n initializationValue,\n initializationValue\n );\n\n vec4 segFilter = vec4(\n int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,\n 0,\n 0\n );\n\n ${updateSnippet}\n } else if (${windowSizeVec4Remainder === 3}) {\n vec4 values = vec4(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n getValue(batch, inIdx + 2),\n initializationValue\n );\n\n vec4 segFilter = vec4(\n int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 2)) == currentSeg ? 1 : 0,\n 0\n );\n\n ${updateSnippet}\n }\n setOutput(${returnValue});\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/UnsortedSegmentSum.js\nfunction unsortedSegmentSum3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, segmentIds } = inputs;\n const { numSegments } = attrs;\n const xRank = x.shape.length;\n const toDispose = [];\n let axis = 0;\n const permutation = backend_util_exports.getAxesPermutation([axis], xRank);\n let permutedX = x;\n if (permutation != null) {\n permutedX = transpose3({ inputs: { x }, backend: backend2, attrs: { perm: permutation } });\n toDispose.push(permutedX);\n axis = backend_util_exports.getInnerMostAxes(1, xRank)[0];\n }\n const outShape = backend_util_exports.segment_util.computeOutShape(permutedX.shape, axis, numSegments);\n const inSize = util_exports.sizeFromShape([permutedX.shape[axis]]);\n const a2D = reshape4({ inputs: { x: permutedX }, backend: backend2, attrs: { shape: [-1, inSize] } });\n toDispose.push(a2D);\n const outputDType = sumOutType(x.dtype);\n const segOpCompute = (x2, segOpType, segmentIds2, dtype, numSegments2) => {\n const batchSize = x2.shape[0];\n const inSize2 = x2.shape[1];\n const windowSize = backend_util_exports.segment_util.segOpComputeOptimalWindowSize(inSize2, numSegments2);\n const segOpInfo = { windowSize, inSize: inSize2, batchSize, numSegments: numSegments2 };\n const program = new SegmentOpProgram(segOpInfo, segOpType);\n const output = backend2.compileAndRun(program, [x2, segmentIds2], dtype);\n toDispose.push(output);\n if (output.shape[1] === numSegments2) {\n return output;\n }\n const rangeInfo = range4({\n backend: backend2,\n attrs: { start: 0, stop: numSegments2, step: 1, dtype: \"float32\" }\n });\n const tileInfo = tile4({\n inputs: { x: rangeInfo },\n backend: backend2,\n attrs: { reps: [inSize2 / windowSize] }\n });\n toDispose.push(rangeInfo);\n toDispose.push(tileInfo);\n const result2 = segOpCompute(output, segOpType, tileInfo, dtype, numSegments2);\n return result2;\n };\n const segOpResult = segOpCompute(a2D, \"unsortedSegmentSum\", segmentIds, outputDType, numSegments);\n const reshaped = reshape4({ inputs: { x: segOpResult }, backend: backend2, attrs: { shape: outShape } });\n let result = reshaped;\n if (permutation != null) {\n toDispose.push(reshaped);\n const perm = backend_util_exports.getUndoAxesPermutation(permutation);\n result = transpose3({ inputs: { x: result }, backend: backend2, attrs: { perm } });\n }\n toDispose.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2));\n return result;\n}\nvar unsortedSegmentSumConfig2 = {\n kernelName: UnsortedSegmentSum,\n backendName: \"webgl\",\n kernelFunc: unsortedSegmentSum3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/register_all_kernels.js\nvar kernelConfigs2 = [\n _fusedMatMulConfig2,\n absConfig2,\n acosConfig2,\n acoshConfig2,\n addConfig2,\n addNConfig2,\n allConfig2,\n anyConfig2,\n argMaxConfig2,\n argMinConfig2,\n asinConfig2,\n asinhConfig2,\n atanConfig2,\n atan2Config2,\n atanhConfig2,\n avgPoolConfig2,\n avgPool3DConfig2,\n avgPool3DGradConfig3,\n avgPoolGradConfig3,\n batchMatMulConfig2,\n batchNormConfig2,\n batchToSpaceNDConfig2,\n bincountConfig2,\n broadcastArgsConfig2,\n castConfig2,\n ceilConfig2,\n clipByValueConfig2,\n complexConfig2,\n complexAbsConfig2,\n concatConfig2,\n conv2DConfig2,\n conv2DBackpropFilterConfig2,\n conv2DBackpropInputConfig2,\n conv3DConfig2,\n conv3DBackpropFilterV2Config2,\n conv3DBackpropInputConfig,\n cosConfig2,\n coshConfig2,\n cropAndResizeConfig2,\n cumprodConfig2,\n cumsumConfig2,\n denseBincountConfig2,\n depthToSpaceConfig2,\n depthwiseConv2dNativeConfig2,\n depthwiseConv2dNativeBackpropFilterConfig2,\n depthwiseConv2dNativeBackpropInputConfig2,\n diagConfig2,\n dilation2DConfig2,\n einsumConfig2,\n eluConfig2,\n eluGradConfig3,\n equalConfig2,\n erfConfig2,\n expConfig2,\n expandDimsConfig2,\n expm1Config2,\n fftConfig2,\n fillConfig2,\n flipLeftRightConfig2,\n floorConfig2,\n floorDivConfig2,\n fromPixelsConfig,\n fusedConv2DConfig2,\n fusedDepthwiseConv2DConfig2,\n gatherNdConfig2,\n gatherV2Config2,\n greaterConfig2,\n greaterEqualConfig2,\n identityConfig2,\n ifftConfig2,\n imagConfig2,\n isFiniteConfig2,\n isInfConfig2,\n isNaNConfig2,\n leakyReluConfig2,\n lessConfig2,\n lessEqualConfig2,\n linSpaceConfig2,\n logConfig2,\n log1pConfig2,\n logicalAndConfig2,\n logicalNotConfig2,\n logicalOrConfig2,\n LRNConfig2,\n LRNGradConfig2,\n maxConfig2,\n maximumConfig2,\n maxPoolConfig2,\n maxPool3DConfig2,\n maxPool3DGradConfig3,\n maxPoolGradConfig3,\n maxPoolWithArgmaxConfig2,\n meanConfig2,\n minConfig2,\n minimumConfig2,\n mirrorPadConfig2,\n modConfig2,\n multinomialConfig2,\n multiplyConfig2,\n negConfig2,\n nonMaxSuppressionV3Config2,\n nonMaxSuppressionV4Config2,\n nonMaxSuppressionV5Config2,\n notEqualConfig2,\n oneHotConfig2,\n onesLikeConfig2,\n packConfig2,\n padV2Config2,\n powConfig2,\n preluConfig2,\n prodConfig2,\n raggedGatherConfig2,\n raggedTensorToTensorConfig2,\n rangeConfig2,\n realConfig2,\n realDivConfig2,\n reciprocalConfig2,\n reluConfig2,\n relu6Config2,\n reshapeConfig2,\n resizeBilinearConfig2,\n resizeBilinearGradConfig3,\n resizeNearestNeighborConfig2,\n resizeNearestNeighborGradConfig3,\n reverseConfig2,\n rotateWithOffsetConfig2,\n roundConfig2,\n rsqrtConfig2,\n scatterNdConfig2,\n searchSortedConfig2,\n selectConfig2,\n seluConfig2,\n sigmoidConfig2,\n signConfig2,\n sinConfig2,\n sinhConfig2,\n sliceConfig2,\n softmaxConfig2,\n softplusConfig2,\n spaceToBatchNDConfig2,\n sparseFillEmptyRowsConfig2,\n sparseReshapeConfig2,\n sparseSegmentMeanConfig2,\n sparseSegmentSumConfig2,\n sparseToDenseConfig2,\n splitVConfig2,\n sqrtConfig2,\n squareConfig2,\n squaredDifferenceConfig2,\n stepConfig2,\n stridedSliceConfig2,\n stringNGramsConfig2,\n stringSplitConfig2,\n stringToHashBucketFastConfig2,\n subConfig2,\n sumConfig2,\n tanConfig2,\n tanhConfig2,\n tileConfig2,\n topKConfig2,\n transformConfig2,\n transposeConfig2,\n uniqueConfig2,\n unpackConfig2,\n unsortedSegmentSumConfig2,\n zerosLikeConfig2\n];\nfor (const kernelConfig of kernelConfigs2) {\n registerKernel(kernelConfig);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/types.js\nvar CppDType;\n(function(CppDType2) {\n CppDType2[CppDType2[\"float32\"] = 0] = \"float32\";\n CppDType2[CppDType2[\"int32\"] = 1] = \"int32\";\n CppDType2[CppDType2[\"bool\"] = 2] = \"bool\";\n CppDType2[CppDType2[\"string\"] = 3] = \"string\";\n CppDType2[CppDType2[\"complex64\"] = 4] = \"complex64\";\n})(CppDType || (CppDType = {}));\nvar FusableActivation;\n(function(FusableActivation2) {\n FusableActivation2[FusableActivation2[\"linear\"] = 0] = \"linear\";\n FusableActivation2[FusableActivation2[\"relu\"] = 1] = \"relu\";\n FusableActivation2[FusableActivation2[\"relu6\"] = 2] = \"relu6\";\n FusableActivation2[FusableActivation2[\"prelu\"] = 3] = \"prelu\";\n FusableActivation2[FusableActivation2[\"leakyrelu\"] = 4] = \"leakyrelu\";\n FusableActivation2[FusableActivation2[\"sigmoid\"] = 5] = \"sigmoid\";\n FusableActivation2[FusableActivation2[\"elu\"] = 6] = \"elu\";\n})(FusableActivation || (FusableActivation = {}));\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/_FusedMatMul.js\nvar wasmFusedMatMul;\nfunction setup(backend2) {\n wasmFusedMatMul = backend2.wasm.cwrap(_FusedMatMul, null, [\n \"number\",\n \"array\",\n \"number\",\n \"number\",\n \"array\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction fusedBatchMatMul(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { a, b, bias, preluActivationWeights } = inputs;\n if (a.dtype !== \"float32\" || b.dtype !== \"float32\") {\n throw new Error(`_FusedMatMul for non non-float32 tensors not yet supported.`);\n }\n const { transposeA, transposeB, activation: activation2, leakyreluAlpha } = attrs;\n const aId = backend2.dataIdMap.get(a.dataId).id;\n const bId = backend2.dataIdMap.get(b.dataId).id;\n let biasId = 0;\n if (bias != null) {\n const biasData = backend2.dataIdMap.get(bias.dataId);\n if (biasData.shape.length !== 1) {\n throw new Error(`_FusedMatMul only supports rank-1 bias but got rank ${biasData.shape.length}.`);\n }\n biasId = biasData.id;\n }\n const preluActivationWeightsId = preluActivationWeights == null ? 0 : backend2.dataIdMap.get(preluActivationWeights.dataId).id;\n const fusedActivation = FusableActivation[activation2];\n if (fusedActivation == null) {\n throw new Error(`${activation2} activation not yet supported for FusedConv2D in the wasm backend.`);\n }\n const leftDim = transposeA ? a.shape[2] : a.shape[1];\n const rightDim = transposeB ? b.shape[1] : b.shape[2];\n const batchDims = broadcast_util_exports.assertAndGetBroadcastShape(a.shape.slice(0, -2), b.shape.slice(0, -2));\n const out = backend2.makeOutput([...batchDims, leftDim, rightDim], a.dtype);\n const outId = backend2.dataIdMap.get(out.dataId).id;\n const aShapeBytes = new Uint8Array(new Int32Array(a.shape).buffer);\n const bShapeBytes = new Uint8Array(new Int32Array(b.shape).buffer);\n wasmFusedMatMul(aId, aShapeBytes, a.shape.length, bId, bShapeBytes, b.shape.length, transposeA, transposeB, fusedActivation, biasId, preluActivationWeightsId, leakyreluAlpha || 0, outId);\n return out;\n}\nvar _fusedMatMulConfig3 = {\n kernelName: _FusedMatMul,\n backendName: \"wasm\",\n setupFunc: setup,\n kernelFunc: fusedBatchMatMul\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/unary_kernel.js\nfunction createUnaryKernelConfig(kernelName, outType) {\n let wasmFunc9;\n function setupFunc3(backend2) {\n wasmFunc9 = backend2.wasm.cwrap(kernelName, null, [\n \"number\",\n \"number\",\n \"number\"\n ]);\n }\n function kernelFunc3(args) {\n const { backend: backend2, inputs: { x } } = args;\n const xId = backend2.dataIdMap.get(x.dataId).id;\n const out = backend2.makeOutput(x.shape, outType || x.dtype);\n const outId = backend2.dataIdMap.get(out.dataId).id;\n if (util_exports.sizeFromShape(out.shape) === 0) {\n return out;\n }\n wasmFunc9(xId, CppDType[x.dtype], outId);\n return out;\n }\n return { kernelName, backendName: \"wasm\", setupFunc: setupFunc3, kernelFunc: kernelFunc3 };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Abs.js\nvar absConfig3 = createUnaryKernelConfig(Abs);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/binary_kernel.js\nfunction createBinaryKernelConfig(kernelName, supportsFullBroadcast19, dtype) {\n let wasmFunc9;\n function setupFunc3(backend2) {\n wasmFunc9 = backend2.wasm.cwrap(kernelName, null, [\n \"number\",\n \"array\",\n \"number\",\n \"number\",\n \"array\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n }\n function kernelFunc3(args) {\n const { backend: backend2, inputs } = args;\n const { a, b } = inputs;\n const aId = backend2.dataIdMap.get(a.dataId).id;\n const bId = backend2.dataIdMap.get(b.dataId).id;\n const outputType = dtype != null ? dtype : a.dtype;\n const newShape = backend_util_exports.assertAndGetBroadcastShape(a.shape, b.shape);\n const out = backend2.makeOutput(newShape, outputType);\n if (util_exports.sizeFromShape(newShape) === 0) {\n return out;\n }\n const aShapeBytes = new Uint8Array(new Int32Array(a.shape).buffer);\n const bShapeBytes = new Uint8Array(new Int32Array(b.shape).buffer);\n const outId = backend2.dataIdMap.get(out.dataId).id;\n const kernelFunc4 = () => wasmFunc9(aId, aShapeBytes, a.shape.length, bId, bShapeBytes, b.shape.length, CppDType[a.dtype], outId);\n kernelFunc4();\n return out;\n }\n return { kernelName, backendName: \"wasm\", setupFunc: setupFunc3, kernelFunc: kernelFunc3 };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Add.js\nvar supportsFullBroadcast = true;\nvar addConfig3 = createBinaryKernelConfig(Add, supportsFullBroadcast);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/AddN.js\nvar wasmFunc;\nfunction setupFunc(backend2) {\n wasmFunc = backend2.wasm.cwrap(AddN, null, [\n \"array\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction addn(args) {\n const { inputs, backend: backend2 } = args;\n const out = backend2.makeOutput(inputs[0].shape, inputs[0].dtype);\n if (util_exports.sizeFromShape(out.shape) === 0) {\n return out;\n }\n const inputIds = inputs.map((x) => backend2.dataIdMap.get(x.dataId).id);\n const inputIdsBytes = new Uint8Array(new Int32Array(inputIds).buffer);\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmFunc(inputIdsBytes, inputIds.length, CppDType[out.dtype], outId);\n return out;\n}\nvar addNConfig3 = {\n kernelName: AddN,\n backendName: \"wasm\",\n setupFunc,\n kernelFunc: addn\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Identity.js\nfunction identity4(args) {\n const { inputs: { x }, backend: backend2 } = args;\n const out = backend2.makeOutput(x.shape, x.dtype);\n const inVals = backend2.typedArrayFromHeap(x);\n const outVals = backend2.typedArrayFromHeap(out);\n outVals.set(inVals);\n return out;\n}\nvar identityConfig3 = {\n kernelName: Identity,\n backendName: \"wasm\",\n kernelFunc: identity4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Transpose.js\nvar wasmTranspose;\nfunction setup2(backend2) {\n wasmTranspose = backend2.wasm.cwrap(Transpose, null, [\n \"number\",\n \"array\",\n \"number\",\n \"number\",\n \"number\",\n \"array\",\n \"number\"\n ]);\n}\nfunction transpose4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const [reducedShape, perm] = removeOneSizeDims(inputs.x.shape, attrs.perm);\n let permIsNoOp = true;\n for (let i2 = 0; i2 < perm.length; i2++) {\n if (perm[i2] !== i2) {\n permIsNoOp = false;\n }\n }\n const outShape = computeOutShape4(inputs.x.shape, attrs.perm);\n const x = {\n dataId: inputs.x.dataId,\n shape: reducedShape,\n dtype: inputs.x.dtype\n };\n if (permIsNoOp) {\n const cloned = identity4({ inputs, backend: backend2 });\n cloned.shape = outShape;\n return cloned;\n }\n const out = backend2.makeOutput(outShape, x.dtype);\n const xId = backend2.dataIdMap.get(x.dataId).id;\n const outId = backend2.dataIdMap.get(out.dataId).id;\n const permBytes = new Uint8Array(new Int32Array(perm).buffer);\n const xShapeBytes = new Uint8Array(new Int32Array(x.shape).buffer);\n wasmTranspose(xId, xShapeBytes, x.shape.length, CppDType[x.dtype], outId, permBytes, perm.length);\n return out;\n}\nfunction computeOutShape4(inShape, perm) {\n const outShape = new Array(inShape.length);\n for (let i2 = 0; i2 < outShape.length; i2++) {\n outShape[i2] = inShape[perm[i2]];\n }\n return outShape;\n}\nfunction removeOneSizeDims(shape, perm) {\n const newShape = [];\n const newPerm = [];\n for (let i2 = 0; i2 < shape.length; ++i2) {\n if (shape[i2] !== 1) {\n newShape.push(shape[i2]);\n }\n if (shape[perm[i2]] !== 1) {\n newPerm.push(perm[i2]);\n }\n }\n for (let i2 = 0; i2 < newPerm.length; ++i2) {\n let minValIdx = -1;\n for (let j = 0; j < newPerm.length; ++j) {\n if (newPerm[j] >= i2 && (minValIdx === -1 || newPerm[minValIdx] > newPerm[j])) {\n minValIdx = j;\n }\n }\n newPerm[minValIdx] = i2;\n }\n return [newShape, newPerm];\n}\nvar transposeConfig3 = {\n kernelName: Transpose,\n backendName: \"wasm\",\n kernelFunc: transpose4,\n setupFunc: setup2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/kernel_utils.js\nfunction permuteAxesAndTranspose(x, axis, backend2) {\n const xShape = x.shape;\n const xRank = x.shape.length;\n const originalAxes = util_exports.parseAxisParam(axis, xShape);\n let axes = originalAxes;\n const permutedAxes = backend_util_exports.getAxesPermutation(axes, xRank);\n let xTransposed = null;\n let inputWasTransposed = false;\n if (permutedAxes != null) {\n const newShape = new Array(xRank);\n for (let i2 = 0; i2 < newShape.length; i2++) {\n newShape[i2] = xShape[permutedAxes[i2]];\n }\n axes = backend_util_exports.getInnerMostAxes(axes.length, xRank);\n xTransposed = transpose4({ inputs: { x }, attrs: { perm: permutedAxes }, backend: backend2 });\n const xId = backend2.dataIdMap.get(x.dataId).id;\n const transposedId = backend2.dataIdMap.get(xTransposed.dataId).id;\n if (transposedId !== xId) {\n inputWasTransposed = true;\n }\n }\n return { transposed: xTransposed, originalAxes, axes, inputWasTransposed };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/All.js\nvar wasmAll;\nfunction setup3(backend2) {\n wasmAll = backend2.wasm.cwrap(All, null, [\"number, number, number\"]);\n}\nfunction all4(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { axis, keepDims } = attrs;\n const { x } = inputs;\n const xId = backend2.dataIdMap.get(x.dataId).id;\n let inputId = xId;\n let input2 = x;\n const { transposed, axes, originalAxes, inputWasTransposed } = permuteAxesAndTranspose(x, axis, backend2);\n if (inputWasTransposed) {\n const transposedId = backend2.dataIdMap.get(transposed.dataId).id;\n input2 = transposed;\n inputId = transposedId;\n }\n const inputRank = input2.shape.length;\n backend_util_exports.assertAxesAreInnerMostDims(\"all\", axes, inputRank);\n const [outShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes(input2.shape, axes);\n const reduceSize = util_exports.sizeFromShape(reduceShape);\n const out = backend2.makeOutput(outShape, x.dtype);\n if (util_exports.sizeFromShape(input2.shape) !== 0) {\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmAll(inputId, reduceSize, outId);\n }\n if (inputWasTransposed) {\n backend2.disposeData(transposed.dataId);\n }\n if (keepDims) {\n const newShape = backend_util_exports.expandShapeToKeepDim(out.shape, originalAxes);\n out.shape = newShape;\n }\n return out;\n}\nvar allConfig3 = {\n kernelName: All,\n backendName: \"wasm\",\n setupFunc: setup3,\n kernelFunc: all4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Any.js\nvar wasmAny;\nfunction setup4(backend2) {\n wasmAny = backend2.wasm.cwrap(Any, null, [\"number, number, number\"]);\n}\nfunction any4(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { axis, keepDims } = attrs;\n const { x } = inputs;\n const xId = backend2.dataIdMap.get(x.dataId).id;\n let inputId = xId;\n let input2 = x;\n const { transposed, axes, originalAxes, inputWasTransposed } = permuteAxesAndTranspose(x, axis, backend2);\n if (inputWasTransposed) {\n const transposedId = backend2.dataIdMap.get(transposed.dataId).id;\n input2 = transposed;\n inputId = transposedId;\n }\n const inputRank = input2.shape.length;\n backend_util_exports.assertAxesAreInnerMostDims(\"any\", axes, inputRank);\n const [outShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes(input2.shape, axes);\n const reduceSize = util_exports.sizeFromShape(reduceShape);\n const out = backend2.makeOutput(outShape, x.dtype);\n if (util_exports.sizeFromShape(input2.shape) !== 0) {\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmAny(inputId, reduceSize, outId);\n }\n if (inputWasTransposed) {\n backend2.disposeData(transposed.dataId);\n }\n if (keepDims) {\n const newShape = backend_util_exports.expandShapeToKeepDim(out.shape, originalAxes);\n out.shape = newShape;\n }\n return out;\n}\nvar anyConfig3 = {\n kernelName: Any,\n backendName: \"wasm\",\n setupFunc: setup4,\n kernelFunc: any4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/ArgMax.js\nvar wasmFunc2;\nfunction setup5(backend2) {\n wasmFunc2 = backend2.wasm.cwrap(ArgMax, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction argmax(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { axis } = attrs;\n const { x } = inputs;\n const xId = backend2.dataIdMap.get(x.dataId).id;\n let inputId = xId;\n let input2 = x;\n const { transposed, axes, inputWasTransposed } = permuteAxesAndTranspose(x, axis, backend2);\n if (inputWasTransposed) {\n const transposedId = backend2.dataIdMap.get(transposed.dataId).id;\n if (transposedId !== xId) {\n input2 = transposed;\n inputId = transposedId;\n }\n }\n const outShape = input2.shape.slice(0, -1);\n const out = backend2.makeOutput(outShape, \"int32\");\n const outId = backend2.dataIdMap.get(out.dataId).id;\n const outerSize = util_exports.sizeFromShape(out.shape);\n const innerSize = input2.shape[axes[0]];\n wasmFunc2(inputId, CppDType[input2.dtype], outerSize, innerSize, outId);\n if (inputWasTransposed) {\n backend2.disposeData(transposed.dataId);\n }\n return out;\n}\nvar argMaxConfig3 = {\n kernelName: ArgMax,\n backendName: \"wasm\",\n kernelFunc: argmax,\n setupFunc: setup5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/AvgPool.js\nvar wasmAvgPool;\nfunction setup6(backend2) {\n wasmAvgPool = backend2.wasm.cwrap(AvgPool, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction avgPool4(args) {\n const { inputs, attrs, backend: backend2 } = args;\n const x = inputs.x;\n const xId = backend2.dataIdMap.get(x.dataId).id;\n const { filterSize, strides, pad: pad3, dimRoundingMode } = attrs;\n const convInfo = backend_util_exports.computePool2DInfo(x.shape, filterSize, strides, 1, pad3, dimRoundingMode);\n const filterHeight = convInfo.filterHeight;\n const filterWidth = convInfo.filterWidth;\n const padTop = convInfo.padInfo.top;\n const padRight = convInfo.padInfo.right;\n const padBottom = convInfo.padInfo.bottom;\n const padLeft = convInfo.padInfo.left;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const channels = convInfo.inChannels;\n if (convInfo.dataFormat !== \"channelsLast\") {\n throw new Error(`wasm backend does not support dataFormat:'${convInfo.dataFormat}'. Please use 'channelsLast'.`);\n }\n if (convInfo.dilationWidth !== 1 || convInfo.dilationHeight !== 1) {\n throw new Error(`was backend only supports average pooling with dilation = [1, 1], got [${convInfo.dilationHeight}, ${convInfo.dilationWidth}].`);\n }\n const out = backend2.makeOutput(convInfo.outShape, \"float32\");\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmAvgPool(xId, x.shape[0], x.shape[1], x.shape[2], filterHeight, filterWidth, padTop, padRight, padBottom, padLeft, strideHeight, strideWidth, channels, outId);\n return out;\n}\nvar avgPoolConfig3 = {\n kernelName: AvgPool,\n backendName: \"wasm\",\n setupFunc: setup6,\n kernelFunc: avgPool4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Reshape.js\nfunction reshape5(args) {\n const { inputs, attrs } = args;\n const { x } = inputs;\n const { shape } = attrs;\n const xSize = util_exports.sizeFromShape(x.shape);\n const $shape = util_exports.inferFromImplicitShape(shape, xSize);\n util_exports.assert(xSize === util_exports.sizeFromShape($shape), () => `new shape: ${$shape}, old shape: ${x.shape}. New shape and old shape must have the same number of elements.`);\n args.backend.incRef(x.dataId);\n return { dataId: x.dataId, shape: $shape, dtype: x.dtype };\n}\nvar reshapeConfig3 = {\n kernelName: Reshape,\n backendName: \"wasm\",\n kernelFunc: reshape5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/BatchMatMul.js\nvar wasmBatchMatMul;\nfunction setup7(backend2) {\n wasmBatchMatMul = backend2.wasm.cwrap(BatchMatMul, null, [\n \"number\",\n \"array\",\n \"number\",\n \"number\",\n \"array\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction batchMatMul3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { a, b } = inputs;\n const { transposeA, transposeB } = attrs;\n if (a.dtype !== \"float32\" || b.dtype !== \"float32\") {\n throw new Error(`BatchMatMul for non non-float32 tensors not yet supported.`);\n }\n const aRank = a.shape.length;\n const bRank = b.shape.length;\n const innerShapeA = transposeA ? a.shape[aRank - 2] : a.shape[aRank - 1];\n const innerShapeB = transposeB ? b.shape[bRank - 1] : b.shape[bRank - 2];\n const outerShapeA = transposeA ? a.shape[aRank - 1] : a.shape[aRank - 2];\n const outerShapeB = transposeB ? b.shape[bRank - 2] : b.shape[bRank - 1];\n const outerDimsA = a.shape.slice(0, -2);\n const outerDimsB = b.shape.slice(0, -2);\n const batchDimA = util_exports.sizeFromShape(outerDimsA);\n const batchDimB = util_exports.sizeFromShape(outerDimsB);\n const outShapeOuterDims = broadcast_util_exports.assertAndGetBroadcastShape(a.shape.slice(0, -2), b.shape.slice(0, -2));\n const outShape = outShapeOuterDims.concat([outerShapeA, outerShapeB]);\n util_exports.assert(innerShapeA === innerShapeB, () => `Error in matMul: inner shapes (${innerShapeA}) and (${innerShapeB}) of Tensors with shapes ${a.shape} and ${b.shape} and transposeA=${transposeA} and transposeB=${transposeB} must match.`);\n const a3dShape = transposeA ? [batchDimA, innerShapeA, outerShapeA] : [batchDimA, outerShapeA, innerShapeA];\n const b3dShape = transposeB ? [batchDimB, outerShapeB, innerShapeB] : [batchDimB, innerShapeB, outerShapeB];\n const a3d = reshape5({ inputs: { x: a }, backend: backend2, attrs: { shape: a3dShape } });\n const b3d = reshape5({ inputs: { x: b }, backend: backend2, attrs: { shape: b3dShape } });\n const a3dId = backend2.dataIdMap.get(a3d.dataId).id;\n const b3dId = backend2.dataIdMap.get(b3d.dataId).id;\n const leftDim = transposeA ? a3d.shape[2] : a3d.shape[1];\n const rightDim = transposeB ? b3d.shape[1] : b3d.shape[2];\n const batchDim = Math.max(batchDimA, batchDimB);\n const out = backend2.makeOutput([batchDim, leftDim, rightDim], a3d.dtype);\n const outId = backend2.dataIdMap.get(out.dataId).id;\n const aShapeBytes = new Uint8Array(new Int32Array(a3d.shape).buffer);\n const bShapeBytes = new Uint8Array(new Int32Array(b3d.shape).buffer);\n wasmBatchMatMul(a3dId, aShapeBytes, a3d.shape.length, b3dId, bShapeBytes, b3d.shape.length, transposeA, transposeB, outId);\n backend2.disposeData(a3d.dataId);\n backend2.disposeData(b3d.dataId);\n out.shape = outShape;\n return out;\n}\nvar batchMatMulConfig3 = {\n kernelName: BatchMatMul,\n backendName: \"wasm\",\n setupFunc: setup7,\n kernelFunc: batchMatMul3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Slice.js\nfunction slice4(args) {\n const { inputs: { x }, attrs: { begin, size }, backend: backend2 } = args;\n const [begin_, size_] = slice_util_exports.parseSliceParams(x, begin, size);\n const isContinous = slice_util_exports.isSliceContinous(x.shape, begin_, size_);\n const xVals = backend2.readSync(x.dataId);\n const out = backend2.makeOutput(size_, x.dtype);\n const xStrides = util_exports.computeStrides(x.shape);\n const outData = backend2.dataIdMap.get(out.dataId);\n if (isContinous) {\n const flatOffset = slice_util_exports.computeFlatOffset(begin_, xStrides);\n if (x.dtype === \"string\") {\n outData.stringBytes = xVals.slice(flatOffset, flatOffset + util_exports.sizeFromShape(size_));\n } else {\n const outVals2 = backend2.typedArrayFromHeap(out);\n outVals2.set(xVals.subarray(flatOffset, flatOffset + util_exports.sizeFromShape(size_)));\n }\n return out;\n }\n if (x.dtype === \"string\") {\n const res = sliceImpl(xVals, begin_, size_, x.shape, x.dtype);\n outData.stringBytes = res;\n return out;\n }\n const outVals = backend2.typedArrayFromHeap(out);\n const rank = x.shape.length;\n if (rank === 2) {\n slice2d2(xVals, xStrides[0], outVals, begin_, size_);\n } else if (rank === 3) {\n slice3d2(xVals, xStrides[0], xStrides[1], outVals, begin_, size_);\n } else if (rank === 4) {\n slice4d2(xVals, xStrides[0], xStrides[1], xStrides[2], outVals, begin_, size_);\n } else {\n const res = sliceImpl(xVals, begin_, size_, x.shape, x.dtype);\n outVals.set(res);\n }\n return out;\n}\nfunction slice2d2(xVals, xStride, outVals, begin, size) {\n let outOffset = 0;\n const beginI = begin[0];\n const beginJ = begin[1];\n const endI = beginI + size[0];\n for (let i2 = beginI; i2 < endI; i2++) {\n const xOffset = i2 * xStride + beginJ;\n outVals.set(xVals.subarray(xOffset, xOffset + size[1]), outOffset);\n outOffset += size[1];\n }\n}\nfunction slice3d2(xVals, xStride1, xStride2, outVals, begin, size) {\n let outOffset = 0;\n const beginI = begin[0];\n const beginJ = begin[1];\n const beginK = begin[2];\n const endI = beginI + size[0];\n const endJ = beginJ + size[1];\n for (let i2 = beginI; i2 < endI; i2++) {\n for (let j = beginJ; j < endJ; j++) {\n const xOffset = i2 * xStride1 + j * xStride2 + beginK;\n outVals.set(xVals.subarray(xOffset, xOffset + size[2]), outOffset);\n outOffset += size[2];\n }\n }\n}\nfunction slice4d2(xVals, xStride1, xStride2, xStride3, outVals, begin, size) {\n let outOffset = 0;\n const beginI = begin[0];\n const beginJ = begin[1];\n const beginK = begin[2];\n const endI = beginI + size[0];\n const endJ = beginJ + size[1];\n const endK = beginK + size[2];\n const beginL = begin[3];\n for (let i2 = beginI; i2 < endI; i2++) {\n for (let j = beginJ; j < endJ; j++) {\n for (let k = beginK; k < endK; k++) {\n const xOffset = i2 * xStride1 + j * xStride2 + k * xStride3 + beginL;\n outVals.set(xVals.subarray(xOffset, xOffset + size[3]), outOffset);\n outOffset += size[3];\n }\n }\n }\n}\nvar sliceConfig3 = {\n kernelName: Slice,\n backendName: \"wasm\",\n kernelFunc: slice4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/BatchToSpaceND.js\nfunction batchToSpaceND4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { blockShape, crops } = attrs;\n const prod6 = blockShape.reduce((a, b) => a * b);\n const reshaped = backend_util_exports.getReshaped(x.shape, blockShape, prod6);\n const permuted = backend_util_exports.getPermuted(reshaped.length, blockShape.length);\n const reshapedPermuted = backend_util_exports.getReshapedPermuted(x.shape, blockShape, prod6);\n const sliceBeginCoords = backend_util_exports.getSliceBeginCoords(crops, blockShape.length);\n const sliceSize = backend_util_exports.getSliceSize(reshapedPermuted, crops, blockShape.length);\n const xReshaped = reshape5({ inputs: { x }, backend: backend2, attrs: { shape: reshaped } });\n const xTransposed = transpose4({ inputs: { x: xReshaped }, backend: backend2, attrs: { perm: permuted } });\n const xTransposedReshaped = reshape5({ inputs: { x: xTransposed }, backend: backend2, attrs: { shape: reshapedPermuted } });\n const result = slice4({\n inputs: { x: xTransposedReshaped },\n backend: backend2,\n attrs: { begin: sliceBeginCoords, size: sliceSize }\n });\n backend2.disposeData(xReshaped.dataId);\n backend2.disposeData(xTransposed.dataId);\n backend2.disposeData(xReshaped.dataId);\n return result;\n}\nvar batchToSpaceNDConfig3 = {\n kernelName: BatchToSpaceND,\n backendName: \"wasm\",\n kernelFunc: batchToSpaceND4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Cast.js\nfunction cast5(args) {\n const { inputs: { x }, attrs: { dtype }, backend: backend2 } = args;\n const out = backend2.makeOutput(x.shape, dtype);\n const inVals = backend2.typedArrayFromHeap(x);\n const outVals = backend2.typedArrayFromHeap(out);\n outVals.set(inVals);\n return out;\n}\nvar castConfig3 = {\n kernelName: Cast,\n backendName: \"wasm\",\n kernelFunc: cast5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Ceil.js\nvar ceilConfig3 = createUnaryKernelConfig(Ceil);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/ClipByValue.js\nvar wasmClip;\nfunction setup8(backend2) {\n wasmClip = backend2.wasm.cwrap(ClipByValue, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction clip(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { clipValueMin, clipValueMax } = attrs;\n const xId = backend2.dataIdMap.get(x.dataId).id;\n const out = backend2.makeOutput(x.shape, x.dtype);\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmClip(xId, clipValueMin, clipValueMax, outId);\n return out;\n}\nvar clipByValueConfig3 = {\n kernelName: ClipByValue,\n backendName: \"wasm\",\n setupFunc: setup8,\n kernelFunc: clip\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Concat.js\nfunction concat4(args) {\n const { inputs, backend: backend2 } = args;\n const axis = util_exports.parseAxisParam(args.attrs.axis, inputs[0].shape)[0];\n const shapes = inputs.map((t2) => t2.shape);\n backend_util_exports.assertParamsConsistent(shapes, axis);\n let outShape = backend_util_exports.computeOutShape(inputs.map((t2) => t2.shape), axis);\n const $inputs = inputs.filter((t2) => util_exports.sizeFromShape(t2.shape) > 0);\n if ($inputs.length === 1) {\n return identity4({ inputs: { x: $inputs[0] }, backend: backend2 });\n }\n const out = backend2.makeOutput(outShape, inputs[0].dtype);\n if (util_exports.sizeFromShape(outShape) === 0) {\n return out;\n }\n if ($inputs[0].dtype === \"string\") {\n const inputs2D = $inputs.map((t2) => {\n const innerSize = util_exports.sizeFromShape(t2.shape.slice(axis));\n const shape = [-1, innerSize];\n return reshape5({ inputs: { x: t2 }, backend: backend2, attrs: { shape } });\n });\n const inputsValShapes = inputs2D.map((t2) => {\n return { vals: backend2.readSync(t2.dataId), shape: t2.shape };\n });\n outShape = backend_util_exports.computeOutShape(inputs2D.map((t2) => t2.shape), 1);\n const simplyConcat = inputs2D[0].shape[0] === 1;\n const outVals2 = concatImpl(inputsValShapes, outShape, inputs[0].dtype, simplyConcat);\n const finalOutShape = backend_util_exports.computeOutShape($inputs.map((t2) => t2.shape), axis);\n out.shape = finalOutShape;\n const outData = backend2.dataIdMap.get(out.dataId);\n outData.stringBytes = backend_util_exports.fromStringArrayToUint8(outVals2);\n inputs2D.forEach((t2) => backend2.disposeData(t2.dataId));\n return out;\n }\n const batchDim = util_exports.sizeFromShape($inputs[0].shape.slice(0, axis));\n let sumInnerDims = 0;\n const innerDims = $inputs.map((input2) => {\n const innerDim = util_exports.sizeFromShape(input2.shape.slice(axis));\n sumInnerDims += innerDim;\n return innerDim;\n });\n const inVals = $inputs.map((input2) => backend2.typedArrayFromHeap(input2));\n const outVals = backend2.typedArrayFromHeap(out);\n for (let b = 0; b < batchDim; b++) {\n let outOffset = b * sumInnerDims;\n for (let i2 = 0; i2 < inVals.length; i2++) {\n const innerDim = innerDims[i2];\n const inOffset = b * innerDim;\n const vals = inVals[i2].subarray(inOffset, inOffset + innerDim);\n outVals.set(vals, outOffset);\n outOffset += innerDim;\n }\n }\n return out;\n}\nvar concatConfig3 = {\n kernelName: Concat,\n backendName: \"wasm\",\n kernelFunc: concat4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Conv2D.js\nvar wasmConv2d;\nfunction setup9(backend2) {\n wasmConv2d = backend2.wasm.cwrap(Conv2D, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction conv2d5(args) {\n const { inputs, attrs, backend: backend2 } = args;\n const { x, filter } = inputs;\n const xId = backend2.dataIdMap.get(x.dataId).id;\n const filterId = backend2.dataIdMap.get(filter.dataId).id;\n const { strides, dilations, pad: pad3, dimRoundingMode, dataFormat } = attrs;\n const $dataFormat = backend_util_exports.convertConv2DDataFormat(dataFormat);\n const convInfo = backend_util_exports.computeConv2DInfo(x.shape, filter.shape, strides, dilations, pad3, dimRoundingMode, false, $dataFormat);\n const filterHeight = convInfo.filterHeight;\n const filterWidth = convInfo.filterWidth;\n const padTop = convInfo.padInfo.top;\n const padRight = convInfo.padInfo.right;\n const padBottom = convInfo.padInfo.bottom;\n const padLeft = convInfo.padInfo.left;\n const dilationHeight = convInfo.dilationHeight;\n const dilationWidth = convInfo.dilationWidth;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const inputChannels = convInfo.inChannels;\n const outputChannels = convInfo.outChannels;\n const isSamePad = convInfo.padInfo.type === \"SAME\" ? 1 : 0;\n if (convInfo.dataFormat !== \"channelsLast\") {\n throw new Error(`wasm backend Conv2D does not support dataFormat:'${convInfo.dataFormat}'. Please use 'channelsLast'.`);\n }\n const out = backend2.makeOutput(convInfo.outShape, \"float32\");\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmConv2d(xId, x.shape[0], x.shape[1], x.shape[2], filterId, filterHeight, filterWidth, padTop, padRight, padBottom, padLeft, isSamePad, dilationHeight, dilationWidth, strideHeight, strideWidth, inputChannels, outputChannels, outId);\n return out;\n}\nvar conv2DConfig3 = {\n kernelName: Conv2D,\n backendName: \"wasm\",\n setupFunc: setup9,\n kernelFunc: conv2d5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Conv2DBackpropInput.js\nvar wasmConv2DBackpropInput;\nfunction setup10(backend2) {\n wasmConv2DBackpropInput = backend2.wasm.cwrap(Conv2DBackpropInput, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction conv2DBackpropInput4(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { dy, filter } = inputs;\n const { strides, pad: pad3, dataFormat, dimRoundingMode, inputShape } = attrs;\n const dilations = 1;\n const $dataFormat = backend_util_exports.convertConv2DDataFormat(dataFormat);\n const convInfo = backend_util_exports.computeConv2DInfo(inputShape, filter.shape, strides, dilations, pad3, dimRoundingMode, false, $dataFormat);\n const { batchSize, filterHeight, filterWidth, inChannels, inHeight, inWidth, outChannels, outHeight, outWidth, strideHeight, strideWidth } = convInfo;\n const topPad = filterHeight - 1 - convInfo.padInfo.top;\n const leftPad = filterWidth - 1 - convInfo.padInfo.left;\n const isChannelsLast = convInfo.dataFormat === \"channelsLast\";\n const dxStrides = util_exports.computeStrides(convInfo.inShape);\n const dyStrides = util_exports.computeStrides(dy.shape);\n const [fltS0, fltS1, fltS2] = util_exports.computeStrides(filter.shape);\n const xBatchStride = dxStrides[0];\n const xRowStride = isChannelsLast ? dxStrides[1] : dxStrides[2];\n const xColStride = isChannelsLast ? dxStrides[2] : 1;\n const xChannelStride = isChannelsLast ? 1 : dxStrides[1];\n const yBatchStride = dyStrides[0];\n const yRowStride = isChannelsLast ? dyStrides[1] : dyStrides[2];\n const yColStride = isChannelsLast ? dyStrides[2] : 1;\n const yChannelStride = isChannelsLast ? 1 : dyStrides[1];\n const out = backend2.makeOutput(convInfo.inShape, \"float32\");\n const outId = backend2.dataIdMap.get(out.dataId).id;\n const dyId = backend2.dataIdMap.get(dy.dataId).id;\n const filterId = backend2.dataIdMap.get(filter.dataId).id;\n wasmConv2DBackpropInput(dyId, filterId, batchSize, filterHeight, filterWidth, inHeight, inWidth, inChannels, outHeight, outWidth, outChannels, strideHeight, strideWidth, topPad, leftPad, fltS0, fltS1, fltS2, xBatchStride, xRowStride, xColStride, xChannelStride, yBatchStride, yRowStride, yColStride, yChannelStride, outId);\n return out;\n}\nvar conv2DBackpropInputConfig3 = {\n kernelName: Conv2DBackpropInput,\n backendName: \"wasm\",\n setupFunc: setup10,\n kernelFunc: conv2DBackpropInput4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Cos.js\nvar cosConfig3 = createUnaryKernelConfig(Cos);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Cosh.js\nvar coshConfig3 = createUnaryKernelConfig(Cosh);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/CropAndResize.js\nvar InterpolationMethod;\n(function(InterpolationMethod2) {\n InterpolationMethod2[InterpolationMethod2[\"bilinear\"] = 0] = \"bilinear\";\n InterpolationMethod2[InterpolationMethod2[\"nearest\"] = 1] = \"nearest\";\n})(InterpolationMethod || (InterpolationMethod = {}));\nvar wasmCropAndResize;\nfunction setup11(backend2) {\n wasmCropAndResize = backend2.wasm.cwrap(CropAndResize, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"array\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction cropAndResize4(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { method, extrapolationValue, cropSize } = attrs;\n const { image: image2, boxes, boxInd } = inputs;\n const numBoxes = boxes.shape[0];\n const [cropHeight, cropWidth] = cropSize;\n const outShape = [numBoxes, cropHeight, cropWidth, image2.shape[3]];\n let imagesData = backend2.dataIdMap.get(image2.dataId);\n let castedData;\n if (image2.dtype !== \"float32\") {\n castedData = cast5({ backend: backend2, inputs: { x: image2 }, attrs: { dtype: \"float32\" } });\n imagesData = backend2.dataIdMap.get(castedData.dataId);\n }\n const imagesId = imagesData.id;\n const boxesId = backend2.dataIdMap.get(boxes.dataId).id;\n const boxIndId = backend2.dataIdMap.get(boxInd.dataId).id;\n const out = backend2.makeOutput(outShape, \"float32\");\n const outId = backend2.dataIdMap.get(out.dataId).id;\n const imagesShapeBytes = new Uint8Array(new Int32Array(image2.shape).buffer);\n wasmCropAndResize(imagesId, boxesId, boxIndId, numBoxes, imagesShapeBytes, cropHeight, cropWidth, InterpolationMethod[method], extrapolationValue, outId);\n if (castedData != null) {\n backend2.disposeData(castedData.dataId);\n }\n return out;\n}\nvar cropAndResizeConfig3 = {\n kernelName: CropAndResize,\n backendName: \"wasm\",\n setupFunc: setup11,\n kernelFunc: cropAndResize4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Cumprod.js\nvar wasmCumprod;\nfunction setup12(backend2) {\n wasmCumprod = backend2.wasm.cwrap(Cumprod, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction cumprod4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis, exclusive, reverse: reverse5 } = attrs;\n const xRank = x.shape.length;\n util_exports.assert(x.dtype === \"float32\" || x.dtype === \"int32\", () => `cumprod does not support ${x.dtype} tensors in the WASM backend`);\n const permutation = backend_util_exports.getAxesPermutation([axis], xRank);\n let permutedX = x;\n if (permutation !== null) {\n permutedX = transpose4({ inputs: { x }, attrs: { perm: permutation }, backend: backend2 });\n }\n const permutedAxis = backend_util_exports.getInnerMostAxes(1, xRank)[0];\n backend_util_exports.assertAxesAreInnerMostDims(\"cumprod\", [permutedAxis], xRank);\n const permutedOut = backend2.makeOutput(permutedX.shape, permutedX.dtype);\n const finalDim = permutedX.shape[permutedAxis];\n const permutedXId = backend2.dataIdMap.get(permutedX.dataId).id;\n const permutedOutId = backend2.dataIdMap.get(permutedOut.dataId).id;\n wasmCumprod(permutedXId, exclusive ? 1 : 0, reverse5 ? 1 : 0, finalDim, permutedOutId, CppDType[x.dtype]);\n let out = permutedOut;\n if (permutation !== null) {\n const undoPermutation = backend_util_exports.getUndoAxesPermutation(permutation);\n out = transpose4({ inputs: { x: permutedOut }, attrs: { perm: undoPermutation }, backend: backend2 });\n backend2.disposeData(permutedX.dataId);\n backend2.disposeData(permutedOut.dataId);\n }\n return out;\n}\nvar cumprodConfig3 = {\n kernelName: Cumprod,\n backendName: \"wasm\",\n setupFunc: setup12,\n kernelFunc: cumprod4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Cumsum.js\nvar wasmCumsum;\nfunction setup13(backend2) {\n wasmCumsum = backend2.wasm.cwrap(Cumsum, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction cumsum4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis, exclusive, reverse: reverse5 } = attrs;\n const xRank = x.shape.length;\n util_exports.assert(x.dtype === \"float32\" || x.dtype === \"int32\", () => `cumsum does not support ${x.dtype} tensors in the WASM backend`);\n const permutation = backend_util_exports.getAxesPermutation([axis], xRank);\n let permutedX = x;\n if (permutation !== null) {\n permutedX = transpose4({ inputs: { x }, attrs: { perm: permutation }, backend: backend2 });\n }\n const permutedAxis = backend_util_exports.getInnerMostAxes(1, xRank)[0];\n backend_util_exports.assertAxesAreInnerMostDims(\"cumsum\", [permutedAxis], xRank);\n const permutedOut = backend2.makeOutput(permutedX.shape, permutedX.dtype);\n const finalDim = permutedX.shape[permutedAxis];\n const permutedXId = backend2.dataIdMap.get(permutedX.dataId).id;\n const permutedOutId = backend2.dataIdMap.get(permutedOut.dataId).id;\n wasmCumsum(permutedXId, exclusive ? 1 : 0, reverse5 ? 1 : 0, finalDim, permutedOutId, CppDType[x.dtype]);\n let out = permutedOut;\n if (permutation !== null) {\n const undoPermutation = backend_util_exports.getUndoAxesPermutation(permutation);\n out = transpose4({ inputs: { x: permutedOut }, attrs: { perm: undoPermutation }, backend: backend2 });\n backend2.disposeData(permutedX.dataId);\n backend2.disposeData(permutedOut.dataId);\n }\n return out;\n}\nvar cumsumConfig3 = {\n kernelName: Cumsum,\n backendName: \"wasm\",\n setupFunc: setup13,\n kernelFunc: cumsum4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/DepthToSpace.js\nvar wasmDepthToSpace;\nfunction setup14(backend2) {\n wasmDepthToSpace = backend2.wasm.cwrap(DepthToSpace, null, [\n \"number\",\n \"number\",\n \"number\",\n \"array\",\n \"number\",\n \"array\",\n \"array\",\n \"number\",\n \"number\"\n ]);\n}\nfunction depthToSpace4(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { x } = inputs;\n const { blockSize, dataFormat } = attrs;\n const batchSize = x.shape[0];\n const inputHeight = dataFormat === \"NHWC\" ? x.shape[1] : x.shape[2];\n const inputWidth = dataFormat === \"NHWC\" ? x.shape[2] : x.shape[3];\n const inputDepth = dataFormat === \"NHWC\" ? x.shape[3] : x.shape[1];\n const outputHeight = inputHeight * blockSize;\n const outputWidth = inputWidth * blockSize;\n const outputDepth = inputDepth / (blockSize * blockSize);\n const outputShape = dataFormat === \"NHWC\" ? [batchSize, outputHeight, outputWidth, outputDepth] : [batchSize, outputDepth, outputHeight, outputWidth];\n const out = backend2.makeOutput(outputShape, \"float32\");\n const xData = backend2.dataIdMap.get(x.dataId);\n const xId = xData.id;\n const xStridesBytes = new Uint8Array(new Int32Array(util_exports.computeStrides(x.shape)).buffer);\n const outputShapeBytes = new Uint8Array(new Int32Array(outputShape).buffer);\n const outStridesBytes = new Uint8Array(new Int32Array(util_exports.computeStrides(outputShape)).buffer);\n const outId = backend2.dataIdMap.get(out.dataId).id;\n const channelsLast = dataFormat === \"NHWC\" ? 1 : 0;\n wasmDepthToSpace(xId, blockSize, channelsLast, xStridesBytes, x.shape.length - 1, outputShapeBytes, outStridesBytes, outputShape.length, outId);\n return out;\n}\nvar depthToSpaceConfig3 = {\n kernelName: DepthToSpace,\n backendName: \"wasm\",\n setupFunc: setup14,\n kernelFunc: depthToSpace4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/DepthwiseConv2dNative.js\nvar wasmDepthwiseConv2d;\nfunction setup15(backend2) {\n wasmDepthwiseConv2d = backend2.wasm.cwrap(DepthwiseConv2dNative, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction depthwiseConv2d5(args) {\n const { inputs, attrs, backend: backend2 } = args;\n const { x, filter } = inputs;\n const xId = backend2.dataIdMap.get(x.dataId).id;\n const filterId = backend2.dataIdMap.get(filter.dataId).id;\n const { strides, dilations, pad: pad3, dimRoundingMode } = attrs;\n const $dilations = dilations == null ? [1, 1] : dilations;\n const convInfo = backend_util_exports.computeConv2DInfo(x.shape, filter.shape, strides, $dilations, pad3, dimRoundingMode, true);\n const filterHeight = convInfo.filterHeight;\n const filterWidth = convInfo.filterWidth;\n const padTop = convInfo.padInfo.top;\n const padRight = convInfo.padInfo.right;\n const padBottom = convInfo.padInfo.bottom;\n const padLeft = convInfo.padInfo.left;\n const dilationHeight = convInfo.dilationHeight;\n const dilationWidth = convInfo.dilationWidth;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const inputChannels = convInfo.inChannels;\n const outputChannels = convInfo.outChannels;\n const isSamePad = convInfo.padInfo.type === \"SAME\" ? 1 : 0;\n if (convInfo.dataFormat !== \"channelsLast\") {\n throw new Error(`wasm backend DepthwiseConv2dNative does not support dataFormat:'${convInfo.dataFormat}'. Please use 'channelsLast'.`);\n }\n const out = backend2.makeOutput(convInfo.outShape, \"float32\");\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmDepthwiseConv2d(xId, x.shape[0], x.shape[1], x.shape[2], filterId, filterHeight, filterWidth, padTop, padRight, padBottom, padLeft, isSamePad, dilationHeight, dilationWidth, strideHeight, strideWidth, inputChannels, outputChannels, outId);\n return out;\n}\nvar depthwiseConv2dNativeConfig3 = {\n kernelName: DepthwiseConv2dNative,\n backendName: \"wasm\",\n setupFunc: setup15,\n kernelFunc: depthwiseConv2d5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Elu.js\nvar eluConfig3 = createUnaryKernelConfig(Elu);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Equal.js\nvar supportsFullBroadcast2 = false;\nvar equalConfig3 = createBinaryKernelConfig(Equal, supportsFullBroadcast2, \"bool\");\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Exp.js\nvar expConfig3 = createUnaryKernelConfig(Exp, \"float32\");\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/ExpandDims.js\nfunction expandDims5(args) {\n const { inputs, attrs, backend: backend2 } = args;\n const { input: input2 } = inputs;\n const { dim } = attrs;\n const inputRank = input2.shape.length;\n const newShape = input2.shape.slice();\n let $dim = dim;\n if (dim < 0) {\n util_exports.assert(-(inputRank + 1) <= dim, () => `Axis must be in the interval [${-(inputRank + 1)}, ${inputRank}]`);\n $dim = inputRank + dim + 1;\n }\n newShape.splice($dim, 0, 1);\n return reshape5({ inputs: { x: input2 }, backend: backend2, attrs: { shape: newShape } });\n}\nvar expandDimsConfig3 = {\n kernelName: ExpandDims,\n backendName: \"wasm\",\n kernelFunc: expandDims5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Fill.js\nfunction fill4(args) {\n const { attrs: { shape, value, dtype }, backend: backend2 } = args;\n const out = backend2.makeOutput(shape, dtype);\n const outVals = backend2.typedArrayFromHeap(out);\n outVals.fill(value);\n return out;\n}\nvar fillConfig3 = {\n kernelName: Fill,\n backendName: \"wasm\",\n kernelFunc: fill4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/FlipLeftRight.js\nvar wasmFlipLeftRight;\nfunction setup16(backend2) {\n wasmFlipLeftRight = backend2.wasm.cwrap(FlipLeftRight, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction flipLeftRight2(args) {\n const { inputs, backend: backend2 } = args;\n const { image: image2 } = inputs;\n const out = backend2.makeOutput(image2.shape, image2.dtype);\n const imageId = backend2.dataIdMap.get(image2.dataId).id;\n const outId = backend2.dataIdMap.get(out.dataId).id;\n const [batch, imageHeight, imageWidth, numChannels] = image2.shape;\n wasmFlipLeftRight(imageId, batch, imageHeight, imageWidth, numChannels, outId);\n return out;\n}\nvar flipLeftRightConfig3 = {\n kernelName: FlipLeftRight,\n backendName: \"wasm\",\n kernelFunc: flipLeftRight2,\n setupFunc: setup16\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Floor.js\nvar floorConfig3 = createUnaryKernelConfig(Floor);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/FloorDiv.js\nvar supportsFullBroadcast3 = false;\nvar floorDivConfig3 = createBinaryKernelConfig(FloorDiv, supportsFullBroadcast3);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/FusedBatchNorm.js\nvar wasmBatchNorm;\nfunction setup17(backend2) {\n wasmBatchNorm = backend2.wasm.cwrap(FusedBatchNorm, null, [\"number\", \"number\", \"number\", \"number\", \"number\", \"number\", \"number\"]);\n}\nfunction fusedBatchNorm(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { varianceEpsilon } = attrs;\n const { x, mean: mean5, variance, offset, scale: scale2 } = inputs;\n const xId = backend2.dataIdMap.get(x.dataId).id;\n const meanId = backend2.dataIdMap.get(mean5.dataId).id;\n const varianceId = backend2.dataIdMap.get(variance.dataId).id;\n const offsetId = offset != null ? backend2.dataIdMap.get(offset.dataId).id : 0;\n const scaleId = scale2 != null ? backend2.dataIdMap.get(scale2.dataId).id : 0;\n const out = backend2.makeOutput(x.shape, x.dtype);\n if (util_exports.sizeFromShape(x.shape) === 0) {\n return out;\n }\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmBatchNorm(xId, meanId, varianceId, offsetId, scaleId, varianceEpsilon, outId);\n return out;\n}\nvar fusedBatchNormConfig = {\n kernelName: FusedBatchNorm,\n backendName: \"wasm\",\n setupFunc: setup17,\n kernelFunc: fusedBatchNorm\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/FusedConv2D.js\nvar wasmFusedConv2d;\nfunction setup18(backend2) {\n wasmFusedConv2d = backend2.wasm.cwrap(FusedConv2D, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction fusedConv2d2(args) {\n const { inputs, attrs, backend: backend2 } = args;\n const { x, filter, bias, preluActivationWeights } = inputs;\n const { strides, pad: pad3, dilations, dataFormat, dimRoundingMode, activation: activation2, leakyreluAlpha } = attrs;\n const convInfo = backend_util_exports.computeConv2DInfo(x.shape, filter.shape, strides, dilations, pad3, dimRoundingMode);\n const fusedActivation = FusableActivation[activation2];\n if (fusedActivation == null) {\n throw new Error(`${activation2} activation not yet supported for FusedConv2D in the wasm backend.`);\n }\n const xId = backend2.dataIdMap.get(x.dataId).id;\n const filterId = backend2.dataIdMap.get(filter.dataId).id;\n const outputChannels = convInfo.outChannels;\n let biasId = 0;\n if (bias != null) {\n const biasData = backend2.dataIdMap.get(bias.dataId);\n if (biasData.shape.length !== 1) {\n throw new Error(`FusedConv2D only supports rank-1 bias but got rank ${biasData.shape.length}.`);\n }\n if (biasData.shape[0] !== outputChannels) {\n throw new Error(`FusedConv2D bias shape (${biasData.shape}) does not match the number of output channels (${outputChannels})`);\n }\n biasId = biasData.id;\n }\n const filterHeight = convInfo.filterHeight;\n const filterWidth = convInfo.filterWidth;\n const padTop = convInfo.padInfo.top;\n const padRight = convInfo.padInfo.right;\n const padBottom = convInfo.padInfo.bottom;\n const padLeft = convInfo.padInfo.left;\n const dilationHeight = convInfo.dilationHeight;\n const dilationWidth = convInfo.dilationWidth;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const inputChannels = convInfo.inChannels;\n const isSamePad = convInfo.padInfo.type === \"SAME\" ? 1 : 0;\n const batchSize = convInfo.batchSize;\n const inHeight = convInfo.inHeight;\n const inWidth = convInfo.inWidth;\n if (dataFormat !== \"NHWC\") {\n throw new Error(`wasm backend FusedConv2D does not support dataFormat:'${dataFormat}'. Please use 'NHWC'.`);\n }\n const out = backend2.makeOutput(convInfo.outShape, \"float32\");\n const outId = backend2.dataIdMap.get(out.dataId).id;\n const preluActivationWeightsId = preluActivationWeights == null ? 0 : backend2.dataIdMap.get(preluActivationWeights.dataId).id;\n wasmFusedConv2d(xId, batchSize, inHeight, inWidth, filterId, filterHeight, filterWidth, biasId, padTop, padRight, padBottom, padLeft, isSamePad, dilationHeight, dilationWidth, strideHeight, strideWidth, inputChannels, outputChannels, fusedActivation, preluActivationWeightsId, leakyreluAlpha || 0, outId);\n return out;\n}\nvar fusedConv2DConfig3 = {\n kernelName: FusedConv2D,\n backendName: \"wasm\",\n setupFunc: setup18,\n kernelFunc: fusedConv2d2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/FusedDepthwiseConv2D.js\nvar wasmFusedDepthwiseConv2d;\nfunction setup19(backend2) {\n wasmFusedDepthwiseConv2d = backend2.wasm.cwrap(FusedDepthwiseConv2D, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction fusedDepthwiseConv2d(args) {\n const { inputs, attrs, backend: backend2 } = args;\n const { x, filter, bias, preluActivationWeights } = inputs;\n const { strides, pad: pad3, dilations, dataFormat, dimRoundingMode, activation: activation2, leakyreluAlpha } = attrs;\n const convInfo = backend_util_exports.computeConv2DInfo(x.shape, filter.shape, strides, dilations, pad3, dimRoundingMode, true);\n const fusedActivation = FusableActivation[activation2];\n if (fusedActivation == null) {\n throw new Error(`${activation2} activation not yet supported for FusedDepthwiseConv2D in the wasm backend.`);\n }\n const xId = backend2.dataIdMap.get(x.dataId).id;\n const filterId = backend2.dataIdMap.get(filter.dataId).id;\n const outputChannels = convInfo.outChannels;\n let biasId = 0;\n if (bias != null) {\n const biasData = backend2.dataIdMap.get(bias.dataId);\n if (biasData.shape.length !== 1) {\n throw new Error(`FusedDepthwiseConv2D only supports rank-1 bias but got rank ${biasData.shape.length}.`);\n }\n if (biasData.shape[0] !== outputChannels) {\n throw new Error(`FusedDepthwiseConv2D bias shape (${biasData.shape}) does not match the number of output channels (${outputChannels})`);\n }\n biasId = biasData.id;\n }\n const filterHeight = convInfo.filterHeight;\n const filterWidth = convInfo.filterWidth;\n const padTop = convInfo.padInfo.top;\n const padRight = convInfo.padInfo.right;\n const padBottom = convInfo.padInfo.bottom;\n const padLeft = convInfo.padInfo.left;\n const dilationHeight = convInfo.dilationHeight;\n const dilationWidth = convInfo.dilationWidth;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const inputChannels = convInfo.inChannels;\n const isSamePad = convInfo.padInfo.type === \"SAME\" ? 1 : 0;\n const batchSize = convInfo.batchSize;\n const inHeight = convInfo.inHeight;\n const inWidth = convInfo.inWidth;\n if (dataFormat !== \"NHWC\") {\n throw new Error(`wasm backend FusedDepthwiseConv2D does not support dataFormat:'${dataFormat}'. Please use 'NHWC'.`);\n }\n const out = backend2.makeOutput(convInfo.outShape, \"float32\");\n const outId = backend2.dataIdMap.get(out.dataId).id;\n const preluActivationWeightsId = preluActivationWeights == null ? 0 : backend2.dataIdMap.get(preluActivationWeights.dataId).id;\n wasmFusedDepthwiseConv2d(xId, batchSize, inHeight, inWidth, filterId, filterHeight, filterWidth, biasId, padTop, padRight, padBottom, padLeft, isSamePad, dilationHeight, dilationWidth, strideHeight, strideWidth, inputChannels, outputChannels, fusedActivation, preluActivationWeightsId, leakyreluAlpha || 0, outId);\n return out;\n}\nvar fusedDepthwiseConv2DConfig3 = {\n kernelName: FusedDepthwiseConv2D,\n backendName: \"wasm\",\n setupFunc: setup19,\n kernelFunc: fusedDepthwiseConv2d\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/GatherNd.js\nvar wasmGatherNd;\nfunction setup20(backend2) {\n wasmGatherNd = backend2.wasm.cwrap(GatherNd, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"array\",\n \"number\"\n ]);\n}\nfunction gatherNd3(args) {\n const { backend: backend2, inputs } = args;\n const { params, indices } = inputs;\n const [resultShape, numSlices, sliceSize, strides] = gather_nd_util_exports.prepareAndValidate(params, indices);\n const out = backend2.makeOutput(resultShape, params.dtype);\n if (numSlices === 0) {\n return out;\n }\n const indicesShape = indices.shape;\n const sliceRank = indicesShape[indicesShape.length - 1];\n const xData = backend2.dataIdMap.get(params.dataId);\n const xId = xData.id;\n const indicesData = backend2.dataIdMap.get(indices.dataId);\n const indicesId = indicesData.id;\n const stridesBytes = new Uint8Array(new Int32Array(strides).buffer);\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmGatherNd(xId, CppDType[params.dtype], indicesId, numSlices, sliceRank, sliceSize, stridesBytes, outId);\n return out;\n}\nvar gatherNdConfig3 = {\n kernelName: GatherNd,\n backendName: \"wasm\",\n setupFunc: setup20,\n kernelFunc: gatherNd3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/GatherV2.js\nvar wasmGather;\nfunction setup21(backend2) {\n wasmGather = backend2.wasm.cwrap(\"Gather\", null, [\n \"number\",\n \"number\",\n \"array\",\n \"number\",\n \"number\",\n \"number\",\n \"array\",\n \"number\"\n ]);\n}\nfunction gatherV23(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { x, indices } = inputs;\n const { axis, batchDims } = attrs;\n const parsedAxis = util_exports.parseAxisParam(axis, x.shape)[0];\n const indicesVals = backend2.readSync(indices.dataId);\n const axisDim = x.shape[parsedAxis];\n for (let i2 = 0; i2 < indicesVals.length; ++i2) {\n const index = indicesVals[i2];\n util_exports.assert(index <= axisDim - 1 && index >= 0, () => `GatherV2: the index value ${index} is not in [0, ${axisDim - 1}]`);\n }\n const shapeInfo = backend_util_exports.segment_util.collectGatherOpShapeInfo(x, indices, parsedAxis, batchDims);\n const flattenX = reshape5({\n inputs: { x },\n attrs: {\n shape: [\n shapeInfo.batchSize,\n shapeInfo.outerSize,\n shapeInfo.dimSize,\n shapeInfo.sliceSize\n ]\n },\n backend: backend2\n });\n const indicesSize = util_exports.sizeFromShape(indices.shape);\n const flattenIndex = reshape5({\n inputs: { x: indices },\n attrs: { shape: [shapeInfo.batchSize, indicesSize / shapeInfo.batchSize] },\n backend: backend2\n });\n const flattenOutputShape = [\n shapeInfo.batchSize,\n shapeInfo.outerSize,\n indicesSize / shapeInfo.batchSize,\n shapeInfo.sliceSize\n ];\n const out = backend2.makeOutput(flattenOutputShape, x.dtype);\n if (util_exports.sizeFromShape(x.shape) === 0) {\n return out;\n }\n const stridesSize = flattenX.shape.length - 1;\n const xData = backend2.dataIdMap.get(flattenX.dataId);\n const xId = xData.id;\n const indicesData = backend2.dataIdMap.get(flattenIndex.dataId);\n const indicesId = indicesData.id;\n const outId = backend2.dataIdMap.get(out.dataId).id;\n const xStridesBytes = new Uint8Array(new Int32Array(util_exports.computeStrides(flattenX.shape)).buffer);\n const outStridesBytes = new Uint8Array(new Int32Array(util_exports.computeStrides(flattenOutputShape)).buffer);\n wasmGather(xId, CppDType[x.dtype], xStridesBytes, stridesSize, indicesId, shapeInfo.batchSize, outStridesBytes, outId);\n backend2.disposeData(flattenX.dataId);\n backend2.disposeData(flattenIndex.dataId);\n out.shape = shapeInfo.outputShape;\n return out;\n}\nvar gatherV2Config3 = {\n kernelName: GatherV2,\n backendName: \"wasm\",\n setupFunc: setup21,\n kernelFunc: gatherV23\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Greater.js\nvar supportsFullBroadcast4 = false;\nvar greaterConfig3 = createBinaryKernelConfig(Greater, supportsFullBroadcast4, \"bool\");\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/GreaterEqual.js\nvar supportsFullBroadcast5 = false;\nvar greaterEqualConfig3 = createBinaryKernelConfig(GreaterEqual, supportsFullBroadcast5, \"bool\");\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/LeakyRelu.js\nvar wasmFunc3;\nfunction setupFunc2(backend2) {\n wasmFunc3 = backend2.wasm.cwrap(LeakyRelu, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction leakyRelu4(args) {\n const { inputs: { x }, attrs: { alpha }, backend: backend2 } = args;\n const xId = backend2.dataIdMap.get(x.dataId).id;\n const out = backend2.makeOutput(x.shape, \"float32\");\n if (util_exports.sizeFromShape(x.shape) !== 0) {\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmFunc3(xId, CppDType[x.dtype], alpha, outId);\n }\n return out;\n}\nvar leakyReluConfig3 = {\n kernelName: LeakyRelu,\n backendName: \"wasm\",\n setupFunc: setupFunc2,\n kernelFunc: leakyRelu4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Less.js\nvar supportsFullBroadcast6 = false;\nvar lessConfig3 = createBinaryKernelConfig(Less, supportsFullBroadcast6, \"bool\");\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/LessEqual.js\nvar supportsFullBroadcast7 = false;\nvar lessEqualConfig3 = createBinaryKernelConfig(LessEqual, supportsFullBroadcast7, \"bool\");\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Log.js\nvar logConfig3 = createUnaryKernelConfig(Log);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/LogicalAnd.js\nvar supportsFullBroadcast8 = false;\nvar logicalAndConfig3 = createBinaryKernelConfig(LogicalAnd, supportsFullBroadcast8, \"bool\");\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/LogicalNot.js\nvar logicalNotConfig3 = createUnaryKernelConfig(LogicalNot);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/LogicalOr.js\nvar supportsFullBroadcast9 = false;\nvar logicalOrConfig3 = createBinaryKernelConfig(LogicalOr, supportsFullBroadcast9, \"bool\");\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/LogicalXor.js\nvar supportsFullBroadcast10 = false;\nvar logicalXorConfig = createBinaryKernelConfig(LogicalXor, supportsFullBroadcast10, \"bool\");\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Max.js\nvar wasmMax;\nfunction setup22(backend2) {\n wasmMax = backend2.wasm.cwrap(Max, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction max5(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { reductionIndices: axis, keepDims } = attrs;\n const { x } = inputs;\n const xId = backend2.dataIdMap.get(x.dataId).id;\n let inputId = xId;\n let input2 = x;\n const { transposed, axes, originalAxes, inputWasTransposed } = permuteAxesAndTranspose(x, axis, backend2);\n if (inputWasTransposed) {\n const transposedId = backend2.dataIdMap.get(transposed.dataId).id;\n input2 = transposed;\n inputId = transposedId;\n }\n const inputRank = input2.shape.length;\n backend_util_exports.assertAxesAreInnerMostDims(\"max\", axes, inputRank);\n const [outShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes(input2.shape, axes);\n const reduceSize = util_exports.sizeFromShape(reduceShape);\n const out = backend2.makeOutput(outShape, x.dtype);\n if (util_exports.sizeFromShape(input2.shape) !== 0) {\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmMax(inputId, CppDType[x.dtype], reduceSize, outId);\n }\n if (inputWasTransposed) {\n backend2.disposeData(transposed.dataId);\n }\n if (keepDims) {\n const newShape = backend_util_exports.expandShapeToKeepDim(out.shape, originalAxes);\n out.shape = newShape;\n }\n return out;\n}\nvar maxConfig3 = {\n kernelName: Max,\n backendName: \"wasm\",\n setupFunc: setup22,\n kernelFunc: max5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Maximum.js\nvar supportsFullBroadcast11 = false;\nvar maximumConfig3 = createBinaryKernelConfig(Maximum, supportsFullBroadcast11);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/MaxPool.js\nvar wasmMaxPool;\nfunction setup23(backend2) {\n wasmMaxPool = backend2.wasm.cwrap(MaxPool, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction maxPool4(args) {\n const { inputs, attrs, backend: backend2 } = args;\n const x = inputs.x;\n const xId = backend2.dataIdMap.get(x.dataId).id;\n util_exports.assert(x.dtype === \"float32\", () => `Error in MaxPool: only float32 input is supported. Got ${x.dtype}.`);\n const { filterSize, strides, pad: pad3, dimRoundingMode } = attrs;\n const convInfo = backend_util_exports.computePool2DInfo(x.shape, filterSize, strides, 1, pad3, dimRoundingMode);\n const filterHeight = convInfo.filterHeight;\n const filterWidth = convInfo.filterWidth;\n const padTop = convInfo.padInfo.top;\n const padRight = convInfo.padInfo.right;\n const padBottom = convInfo.padInfo.bottom;\n const padLeft = convInfo.padInfo.left;\n const dilationHeight = convInfo.dilationHeight;\n const dilationWidth = convInfo.dilationWidth;\n const strideHeight = convInfo.strideHeight;\n const strideWidth = convInfo.strideWidth;\n const inputChannels = convInfo.inChannels;\n const outputChannels = convInfo.outChannels;\n if (convInfo.dataFormat !== \"channelsLast\") {\n throw new Error(`wasm backend does not support dataFormat:'${convInfo.dataFormat}'. Please use 'channelsLast'.`);\n }\n const out = backend2.makeOutput(convInfo.outShape, \"float32\");\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmMaxPool(xId, x.shape[0], x.shape[1], x.shape[2], filterHeight, filterWidth, padTop, padRight, padBottom, padLeft, dilationHeight, dilationWidth, strideHeight, strideWidth, inputChannels, outputChannels, outId);\n return out;\n}\nvar maxPoolConfig3 = {\n kernelName: MaxPool,\n backendName: \"wasm\",\n setupFunc: setup23,\n kernelFunc: maxPool4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Mean.js\nvar wasmMean;\nfunction setup24(backend2) {\n wasmMean = backend2.wasm.cwrap(Mean, null, [\"number, number, number\"]);\n}\nfunction mean3(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { axis, keepDims } = attrs;\n const { x } = inputs;\n const xId = backend2.dataIdMap.get(x.dataId).id;\n let inputId = xId;\n let input2 = x;\n const { transposed, axes, originalAxes, inputWasTransposed } = permuteAxesAndTranspose(x, axis, backend2);\n let reductionAxes = axes;\n if (inputWasTransposed) {\n const transposedId = backend2.dataIdMap.get(transposed.dataId).id;\n if (transposedId !== xId) {\n input2 = transposed;\n inputId = transposedId;\n reductionAxes = backend_util_exports.getInnerMostAxes(reductionAxes.length, input2.shape.length);\n }\n }\n backend_util_exports.assertAxesAreInnerMostDims(\"mean\", reductionAxes, input2.shape.length);\n const [outShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes(input2.shape, reductionAxes);\n const reduceSize = util_exports.sizeFromShape(reduceShape);\n let castedInput = input2;\n if (input2.dtype !== \"float32\") {\n castedInput = cast5({ backend: backend2, inputs: { x: input2 }, attrs: { dtype: \"float32\" } });\n inputId = backend2.dataIdMap.get(castedInput.dataId).id;\n }\n const out = backend2.makeOutput(outShape, \"float32\");\n if (util_exports.sizeFromShape(input2.shape) !== 0) {\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmMean(inputId, reduceSize, outId);\n }\n if (inputWasTransposed) {\n backend2.disposeData(transposed.dataId);\n }\n if (keepDims) {\n const newShape = backend_util_exports.expandShapeToKeepDim(out.shape, originalAxes);\n out.shape = newShape;\n }\n if (input2.dtype !== \"float32\") {\n backend2.disposeData(castedInput.dataId);\n }\n return out;\n}\nvar meanConfig3 = {\n kernelName: Mean,\n backendName: \"wasm\",\n setupFunc: setup24,\n kernelFunc: mean3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Min.js\nvar wasmMin;\nfunction setup25(backend2) {\n wasmMin = backend2.wasm.cwrap(Min, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction min5(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { axis, keepDims } = attrs;\n const { x } = inputs;\n const xId = backend2.dataIdMap.get(x.dataId).id;\n let inputId = xId;\n let input2 = x;\n const { transposed, axes, originalAxes, inputWasTransposed } = permuteAxesAndTranspose(x, axis, backend2);\n if (inputWasTransposed) {\n const transposedId = backend2.dataIdMap.get(transposed.dataId).id;\n if (transposedId !== xId) {\n input2 = transposed;\n inputId = transposedId;\n }\n }\n const inputRank = input2.shape.length;\n backend_util_exports.assertAxesAreInnerMostDims(\"min\", axes, inputRank);\n const [outShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes(input2.shape, axes);\n const reduceSize = util_exports.sizeFromShape(reduceShape);\n const out = backend2.makeOutput(outShape, input2.dtype);\n if (util_exports.sizeFromShape(input2.shape) !== 0) {\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmMin(inputId, CppDType[x.dtype], reduceSize, outId);\n }\n if (inputWasTransposed) {\n backend2.disposeData(transposed.dataId);\n }\n if (keepDims) {\n const newShape = backend_util_exports.expandShapeToKeepDim(out.shape, originalAxes);\n out.shape = newShape;\n }\n return out;\n}\nvar minConfig3 = {\n kernelName: Min,\n backendName: \"wasm\",\n setupFunc: setup25,\n kernelFunc: min5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Minimum.js\nvar supportsFullBroadcast12 = false;\nvar minimumConfig3 = createBinaryKernelConfig(Minimum, supportsFullBroadcast12);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/MirrorPad.js\nvar MirrorPaddingMode;\n(function(MirrorPaddingMode2) {\n MirrorPaddingMode2[MirrorPaddingMode2[\"reflect\"] = 0] = \"reflect\";\n MirrorPaddingMode2[MirrorPaddingMode2[\"symmetric\"] = 1] = \"symmetric\";\n})(MirrorPaddingMode || (MirrorPaddingMode = {}));\nvar wasmMirrorPad;\nfunction setup26(backend2) {\n wasmMirrorPad = backend2.wasm.cwrap(MirrorPad, null, [\n \"number\",\n \"array\",\n \"number\",\n \"number\",\n \"array\",\n \"array\",\n \"number\",\n \"number\"\n ]);\n}\nfunction mirrorPad3(args) {\n const { inputs: { x }, backend: backend2, attrs: { paddings, mode } } = args;\n const outShape = paddings.map((p2, i2) => p2[0] + x.shape[i2] + p2[1]);\n const xId = backend2.dataIdMap.get(x.dataId).id;\n const out = backend2.makeOutput(outShape, x.dtype);\n const outId = backend2.dataIdMap.get(out.dataId).id;\n const xShapeBytes = new Uint8Array(new Int32Array(x.shape).buffer);\n const prePaddingsFlat = paddings.map((padTuple) => padTuple[0]);\n const postPaddingsFlat = paddings.map((padTuple) => padTuple[1]);\n const prePaddingsBytes = new Uint8Array(new Int32Array(prePaddingsFlat).buffer);\n const postPaddingsBytes = new Uint8Array(new Int32Array(postPaddingsFlat).buffer);\n wasmMirrorPad(xId, xShapeBytes, x.shape.length, CppDType[x.dtype], prePaddingsBytes, postPaddingsBytes, MirrorPaddingMode[mode], outId);\n return out;\n}\nvar mirrorPadConfig3 = {\n kernelName: MirrorPad,\n backendName: \"wasm\",\n kernelFunc: mirrorPad3,\n setupFunc: setup26\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Multiply.js\nvar supportsFullBroadcast13 = true;\nvar multiplyConfig3 = createBinaryKernelConfig(Multiply, supportsFullBroadcast13);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Neg.js\nvar negConfig3 = createUnaryKernelConfig(Neg);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/NonMaxSuppression_util.js\nfunction parseResultStruct(backend2, resOffset) {\n const result = new Int32Array(backend2.wasm.HEAPU8.buffer, resOffset, 4);\n const pSelectedIndices = result[0];\n const selectedSize = result[1];\n const pSelectedScores = result[2];\n const pValidOutputs = result[3];\n backend2.wasm._free(resOffset);\n return { pSelectedIndices, selectedSize, pSelectedScores, pValidOutputs };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/NonMaxSuppressionV3.js\nvar wasmFunc4;\nfunction setup27(backend2) {\n wasmFunc4 = backend2.wasm.cwrap(\n NonMaxSuppressionV3,\n \"number\",\n [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]\n );\n}\nfunction kernelFunc(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { iouThreshold, maxOutputSize, scoreThreshold } = attrs;\n const { boxes, scores } = inputs;\n const boxesId = backend2.dataIdMap.get(boxes.dataId).id;\n const scoresId = backend2.dataIdMap.get(scores.dataId).id;\n const resOffset = wasmFunc4(boxesId, scoresId, maxOutputSize, iouThreshold, scoreThreshold);\n const { pSelectedIndices, selectedSize, pSelectedScores, pValidOutputs } = parseResultStruct(backend2, resOffset);\n backend2.wasm._free(pSelectedScores);\n backend2.wasm._free(pValidOutputs);\n const selectedIndicesTensor = backend2.makeOutput([selectedSize], \"int32\", pSelectedIndices);\n return selectedIndicesTensor;\n}\nvar nonMaxSuppressionV3Config3 = {\n kernelName: NonMaxSuppressionV3,\n backendName: \"wasm\",\n setupFunc: setup27,\n kernelFunc\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/NonMaxSuppressionV4.js\nvar wasmFunc5;\nfunction setup28(backend2) {\n wasmFunc5 = backend2.wasm.cwrap(\n NonMaxSuppressionV4,\n \"number\",\n [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"bool\"\n ]\n );\n}\nfunction nonMaxSuppressionV43(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { iouThreshold, maxOutputSize, scoreThreshold, padToMaxOutputSize } = attrs;\n const { boxes, scores } = inputs;\n const boxesId = backend2.dataIdMap.get(boxes.dataId).id;\n const scoresId = backend2.dataIdMap.get(scores.dataId).id;\n const resOffset = wasmFunc5(boxesId, scoresId, maxOutputSize, iouThreshold, scoreThreshold, padToMaxOutputSize);\n const { pSelectedIndices, selectedSize, pSelectedScores, pValidOutputs } = parseResultStruct(backend2, resOffset);\n backend2.wasm._free(pSelectedScores);\n const selectedIndicesTensor = backend2.makeOutput([selectedSize], \"int32\", pSelectedIndices);\n const validOutputsTensor = backend2.makeOutput([], \"int32\", pValidOutputs);\n return [selectedIndicesTensor, validOutputsTensor];\n}\nvar nonMaxSuppressionV4Config3 = {\n kernelName: NonMaxSuppressionV4,\n backendName: \"wasm\",\n setupFunc: setup28,\n kernelFunc: nonMaxSuppressionV43\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/NonMaxSuppressionV5.js\nvar wasmFunc6;\nfunction setup29(backend2) {\n wasmFunc6 = backend2.wasm.cwrap(\n NonMaxSuppressionV5,\n \"number\",\n [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]\n );\n}\nfunction kernelFunc2(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { iouThreshold, maxOutputSize, scoreThreshold, softNmsSigma } = attrs;\n const { boxes, scores } = inputs;\n const boxesId = backend2.dataIdMap.get(boxes.dataId).id;\n const scoresId = backend2.dataIdMap.get(scores.dataId).id;\n const resOffset = wasmFunc6(boxesId, scoresId, maxOutputSize, iouThreshold, scoreThreshold, softNmsSigma);\n const { pSelectedIndices, selectedSize, pSelectedScores, pValidOutputs } = parseResultStruct(backend2, resOffset);\n backend2.wasm._free(pValidOutputs);\n const selectedIndicesTensor = backend2.makeOutput([selectedSize], \"int32\", pSelectedIndices);\n const selectedScoresTensor = backend2.makeOutput([selectedSize], \"float32\", pSelectedScores);\n return [selectedIndicesTensor, selectedScoresTensor];\n}\nvar nonMaxSuppressionV5Config3 = {\n kernelName: NonMaxSuppressionV5,\n backendName: \"wasm\",\n setupFunc: setup29,\n kernelFunc: kernelFunc2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/NotEqual.js\nvar supportsFullBroadcast14 = false;\nvar notEqualConfig3 = createBinaryKernelConfig(NotEqual, supportsFullBroadcast14, \"bool\");\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/OneHot.js\nvar wasmOneHot;\nfunction setup30(backend2) {\n wasmOneHot = backend2.wasm.cwrap(OneHot, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction oneHot4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { indices } = inputs;\n const { dtype, depth, onValue, offValue } = attrs;\n const out = backend2.makeOutput([...indices.shape, depth], dtype);\n const outId = backend2.dataIdMap.get(out.dataId).id;\n const indicesData = backend2.dataIdMap.get(indices.dataId);\n const indicesId = indicesData.id;\n wasmOneHot(indicesId, depth, onValue, offValue, outId);\n return out;\n}\nvar oneHotConfig3 = {\n kernelName: OneHot,\n backendName: \"wasm\",\n setupFunc: setup30,\n kernelFunc: oneHot4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/OnesLike.js\nfunction onesLike4(args) {\n const { inputs: { x }, backend: backend2 } = args;\n const out = backend2.makeOutput(x.shape, x.dtype);\n const outVals = backend2.typedArrayFromHeap(out);\n outVals.fill(1);\n return out;\n}\nvar onesLikeConfig3 = {\n kernelName: OnesLike,\n backendName: \"wasm\",\n kernelFunc: onesLike4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Pack.js\nfunction pack3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { axis } = attrs;\n if (inputs.length === 1) {\n return expandDims5({ inputs: { input: inputs[0] }, backend: backend2, attrs: { dim: axis } });\n }\n const shape = inputs[0].shape;\n const dtype = inputs[0].dtype;\n inputs.forEach((t2) => {\n util_exports.assertShapesMatch(shape, t2.shape, \"All tensors passed to stack must have matching shapes\");\n util_exports.assert(dtype === t2.dtype, () => \"All tensors passed to stack must have matching dtypes\");\n });\n const intermediateTensorInfos = [];\n const expandedTensors = inputs.map((t2) => {\n const expandedT = expandDims5({ inputs: { input: t2 }, backend: backend2, attrs: { dim: axis } });\n intermediateTensorInfos.push(expandedT);\n return expandedT;\n });\n const result = concat4({ inputs: expandedTensors, backend: backend2, attrs: { axis } });\n intermediateTensorInfos.forEach((t2) => backend2.disposeData(t2.dataId));\n return result;\n}\nvar packConfig3 = {\n kernelName: Pack,\n backendName: \"wasm\",\n kernelFunc: pack3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/PadV2.js\nvar wasmPadV2;\nfunction setup31(backend2) {\n wasmPadV2 = backend2.wasm.cwrap(PadV2, null, [\n \"number\",\n \"array\",\n \"number\",\n \"number\",\n \"array\",\n \"array\",\n \"number\",\n \"number\"\n ]);\n}\nfunction pad2(args) {\n const { inputs: { x }, backend: backend2, attrs: { paddings, constantValue } } = args;\n const outShape = paddings.map((p2, i2) => p2[0] + x.shape[i2] + p2[1]);\n if (util_exports.sizeFromShape(x.shape) === 0) {\n return fill4({\n backend: backend2,\n attrs: { shape: outShape, value: constantValue, dtype: x.dtype }\n });\n }\n const xId = backend2.dataIdMap.get(x.dataId).id;\n const out = backend2.makeOutput(outShape, x.dtype);\n const outTensorData = backend2.dataIdMap.get(out.dataId);\n const outId = outTensorData.id;\n const xShapeBytes = new Uint8Array(new Int32Array(x.shape).buffer);\n const prePaddingsFlat = paddings.map((padTuple) => padTuple[0]);\n const postPaddingsFlat = paddings.map((padTuple) => padTuple[1]);\n const prePaddingsBytes = new Uint8Array(new Int32Array(prePaddingsFlat).buffer);\n const postPaddingsBytes = new Uint8Array(new Int32Array(postPaddingsFlat).buffer);\n wasmPadV2(xId, xShapeBytes, x.shape.length, CppDType[x.dtype], prePaddingsBytes, postPaddingsBytes, constantValue, outId);\n return out;\n}\nvar padV2Config3 = {\n kernelName: PadV2,\n backendName: \"wasm\",\n kernelFunc: pad2,\n setupFunc: setup31\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Pow.js\nvar supportsFullBroadcast15 = false;\nvar powConfig3 = createBinaryKernelConfig(Pow, supportsFullBroadcast15);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Prelu.js\nvar wasmPrelu;\nfunction setup32(backend2) {\n wasmPrelu = backend2.wasm.cwrap(Prelu, null, [\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction prelu5(args) {\n const { inputs, backend: backend2 } = args;\n const { x, alpha } = inputs;\n const xId = backend2.dataIdMap.get(x.dataId).id;\n const weightsId = backend2.dataIdMap.get(alpha.dataId).id;\n let inputId = xId;\n const input2 = x;\n let castedInput = input2;\n if (input2.dtype !== \"float32\") {\n castedInput = cast5({ backend: backend2, inputs: { x }, attrs: { dtype: \"float32\" } });\n inputId = backend2.dataIdMap.get(castedInput.dataId).id;\n }\n const out = backend2.makeOutput(x.shape, \"float32\");\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmPrelu(inputId, weightsId, outId);\n if (input2.dtype !== \"float32\") {\n backend2.disposeData(castedInput.dataId);\n }\n return out;\n}\nvar preluConfig3 = {\n kernelName: Prelu,\n backendName: \"wasm\",\n setupFunc: setup32,\n kernelFunc: prelu5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Prod.js\nvar wasmProd;\nfunction setup33(backend2) {\n wasmProd = backend2.wasm.cwrap(Prod, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction prod4(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { axis, keepDims } = attrs;\n const { x } = inputs;\n const xId = backend2.dataIdMap.get(x.dataId).id;\n let inputId = xId;\n let input2 = x;\n const { transposed, axes, originalAxes, inputWasTransposed } = permuteAxesAndTranspose(x, axis, backend2);\n let reductionAxes = axes;\n if (inputWasTransposed) {\n const transposedId = backend2.dataIdMap.get(transposed.dataId).id;\n if (transposedId !== xId) {\n input2 = transposed;\n inputId = transposedId;\n reductionAxes = backend_util_exports.getInnerMostAxes(reductionAxes.length, input2.shape.length);\n }\n }\n backend_util_exports.assertAxesAreInnerMostDims(\"prod\", reductionAxes, input2.shape.length);\n const [outShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes(input2.shape, reductionAxes);\n const reduceSize = util_exports.sizeFromShape(reduceShape);\n const out = backend2.makeOutput(outShape, input2.dtype);\n if (util_exports.sizeFromShape(input2.shape) !== 0) {\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmProd(inputId, reduceSize, CppDType[out.dtype], outId);\n }\n if (inputWasTransposed) {\n backend2.disposeData(transposed.dataId);\n }\n if (keepDims) {\n const newShape = backend_util_exports.expandShapeToKeepDim(out.shape, originalAxes);\n out.shape = newShape;\n }\n return out;\n}\nvar prodConfig3 = {\n kernelName: Prod,\n backendName: \"wasm\",\n setupFunc: setup33,\n kernelFunc: prod4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Range.js\nvar range5 = (args) => {\n const { backend: backend2, attrs } = args;\n const { start, stop, step: step5, dtype } = attrs;\n const values = rangeImpl(start, stop, step5, dtype);\n const out = backend2.makeOutput([values.length], dtype);\n const outVals = backend2.typedArrayFromHeap(out);\n outVals.set(values);\n return out;\n};\nvar rangeConfig3 = {\n kernelName: Range,\n backendName: \"wasm\",\n kernelFunc: range5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/RealDiv.js\nvar supportsFullBroadcast16 = true;\nvar realDivConfig3 = createBinaryKernelConfig(RealDiv, supportsFullBroadcast16);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Relu.js\nvar reluConfig3 = createUnaryKernelConfig(Relu);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Relu6.js\nvar relu6Config3 = createUnaryKernelConfig(Relu6);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/ResizeBilinear.js\nvar wasmResizeBilinear;\nfunction setup34(backend2) {\n wasmResizeBilinear = backend2.wasm.cwrap(ResizeBilinear, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction resizeBilinear4(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { images } = inputs;\n const { alignCorners, halfPixelCenters, size } = attrs;\n const [newHeight, newWidth] = size;\n const [batch, oldHeight, oldWidth, numChannels] = images.shape;\n const outShape = [batch, newHeight, newWidth, numChannels];\n let xData = backend2.dataIdMap.get(images.dataId);\n let castedData;\n if (xData.dtype !== \"float32\") {\n castedData = cast5({ backend: backend2, inputs: { x: images }, attrs: { dtype: \"float32\" } });\n xData = backend2.dataIdMap.get(castedData.dataId);\n }\n const xId = xData.id;\n const out = backend2.makeOutput(outShape, \"float32\");\n if (util_exports.sizeFromShape(images.shape) === 0) {\n return out;\n }\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmResizeBilinear(xId, batch, oldHeight, oldWidth, numChannels, newHeight, newWidth, alignCorners ? 1 : 0, halfPixelCenters ? 1 : 0, outId);\n if (castedData != null) {\n backend2.disposeData(castedData.dataId);\n }\n return out;\n}\nvar resizeBilinearConfig3 = {\n kernelName: ResizeBilinear,\n backendName: \"wasm\",\n setupFunc: setup34,\n kernelFunc: resizeBilinear4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/ResizeNearestNeighbor.js\nvar wasmResizeNearestNeighbor;\nfunction setup35(backend2) {\n wasmResizeNearestNeighbor = backend2.wasm.cwrap(ResizeNearestNeighbor, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction resizeNearestNeighbor4(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { images } = inputs;\n const { alignCorners, halfPixelCenters, size } = attrs;\n const [newHeight, newWidth] = size;\n const [batch, oldHeight, oldWidth, numChannels] = images.shape;\n const outShape = [batch, newHeight, newWidth, numChannels];\n const out = backend2.makeOutput(outShape, \"float32\");\n if (util_exports.sizeFromShape(images.shape) === 0) {\n return out;\n }\n let xData = backend2.dataIdMap.get(images.dataId);\n let castedData;\n if (xData.dtype !== \"float32\") {\n castedData = cast5({\n backend: backend2,\n inputs: { x: images },\n attrs: { dtype: \"float32\" }\n });\n xData = backend2.dataIdMap.get(castedData.dataId);\n }\n const xId = xData.id;\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmResizeNearestNeighbor(xId, batch, oldHeight, oldWidth, numChannels, newHeight, newWidth, alignCorners ? 1 : 0, halfPixelCenters ? 1 : 0, outId);\n if (castedData != null) {\n backend2.disposeData(castedData.dataId);\n }\n return out;\n}\nvar resizeNearestNeighborConfig3 = {\n kernelName: ResizeNearestNeighbor,\n backendName: \"wasm\",\n setupFunc: setup35,\n kernelFunc: resizeNearestNeighbor4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Reverse.js\nvar wasmReverse;\nfunction setup36(backend2) {\n wasmReverse = backend2.wasm.cwrap(Reverse, null, [\n \"number\",\n \"array\",\n \"number\",\n \"array\",\n \"number\",\n \"number\"\n ]);\n}\nfunction reverse4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { dims } = attrs;\n const axes = util_exports.parseAxisParam(dims, x.shape);\n if (x.shape.length === 0) {\n return identity4({ inputs: { x }, backend: backend2 });\n }\n const out = backend2.makeOutput(x.shape, x.dtype);\n const xId = backend2.dataIdMap.get(x.dataId).id;\n const outId = backend2.dataIdMap.get(out.dataId).id;\n const axesBytes = new Uint8Array(new Int32Array(axes).buffer);\n const outShapeBytes = new Uint8Array(new Int32Array(x.shape).buffer);\n wasmReverse(xId, axesBytes, axes.length, outShapeBytes, x.shape.length, outId);\n const reshaped = reshape5({ inputs: { x: out }, attrs: { shape: x.shape }, backend: backend2 });\n backend2.disposeData(out.dataId);\n return reshaped;\n}\nvar reverseConfig3 = {\n kernelName: Reverse,\n backendName: \"wasm\",\n kernelFunc: reverse4,\n setupFunc: setup36\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/RotateWithOffset.js\nvar wasmRotate;\nfunction setup37(backend2) {\n wasmRotate = backend2.wasm.cwrap(RotateWithOffset, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"array\",\n \"number\",\n \"number\"\n ]);\n}\nfunction rotateWithOffset2(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { image: image2 } = inputs;\n const { radians, fillValue, center } = attrs;\n const out = backend2.makeOutput(image2.shape, image2.dtype);\n const imageId = backend2.dataIdMap.get(image2.dataId).id;\n const outId = backend2.dataIdMap.get(out.dataId).id;\n const [batch, imageHeight, imageWidth, numChannels] = image2.shape;\n const [centerX, centerY] = backend_util_exports.getImageCenter(center, imageHeight, imageWidth);\n const fillIsBlack = fillValue === 0;\n const fullOpacityValue = 255;\n const fillValues2 = typeof fillValue === \"number\" ? [fillValue, fillValue, fillValue, fillIsBlack ? 0 : fullOpacityValue] : [...fillValue, fullOpacityValue];\n const fillBytes = new Uint8Array(new Int32Array(fillValues2).buffer);\n wasmRotate(imageId, batch, imageHeight, imageWidth, numChannels, radians, centerX, centerY, fillBytes, fillValues2.length, outId);\n return out;\n}\nvar rotateWithOffsetConfig3 = {\n kernelName: RotateWithOffset,\n backendName: \"wasm\",\n kernelFunc: rotateWithOffset2,\n setupFunc: setup37\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Round.js\nvar roundConfig3 = createUnaryKernelConfig(Round);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Rsqrt.js\nvar rsqrtConfig3 = createUnaryKernelConfig(Rsqrt);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/ScatterNd.js\nvar wasmScatterNd;\nfunction setup38(backend2) {\n wasmScatterNd = backend2.wasm.cwrap(ScatterNd, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"array\",\n \"number\",\n \"number\"\n ]);\n}\nfunction scatterNd3(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { indices, updates } = inputs;\n const { shape } = attrs;\n const out = backend2.makeOutput(shape, updates.dtype);\n if (util_exports.sizeFromShape(shape) === 0) {\n return out;\n }\n const { sliceRank, numUpdates, sliceSize, strides, outputSize } = scatter_nd_util_exports.calculateShapes(updates, indices, shape);\n const indicesData = backend2.dataIdMap.get(indices.dataId);\n const indicesId = indicesData.id;\n const updatesData = backend2.dataIdMap.get(updates.dataId);\n const updatesId = updatesData.id;\n const stridesBytes = new Uint8Array(new Int32Array(strides).buffer);\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmScatterNd(indicesId, updatesId, CppDType[updates.dtype], sliceRank, numUpdates, sliceSize, stridesBytes, outputSize, outId);\n return out;\n}\nvar scatterNdConfig3 = {\n kernelName: ScatterNd,\n backendName: \"wasm\",\n setupFunc: setup38,\n kernelFunc: scatterNd3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Select.js\nvar wasmSelect;\nfunction setup39(backend2) {\n wasmSelect = backend2.wasm.cwrap(\"SelectV2\", null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction select4(args) {\n const { inputs, backend: backend2 } = args;\n const { condition, t: t2, e: e2 } = inputs;\n const conditionId = backend2.dataIdMap.get(condition.dataId).id;\n const tId = backend2.dataIdMap.get(t2.dataId).id;\n const eId = backend2.dataIdMap.get(e2.dataId).id;\n const out = backend2.makeOutput(t2.shape, t2.dtype);\n const outId = backend2.dataIdMap.get(out.dataId).id;\n const cRank = condition.shape.length;\n const tRank = t2.shape.length;\n const offset = cRank === 0 || cRank > 1 || tRank === 1 ? 1 : util_exports.sizeFromShape(t2.shape.slice(1));\n wasmSelect(conditionId, tId, eId, offset, outId);\n return out;\n}\nvar selectConfig3 = {\n kernelName: Select,\n backendName: \"wasm\",\n kernelFunc: select4,\n setupFunc: setup39\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Sigmoid.js\nvar wasmFunc7;\nfunction setup40(backend2) {\n wasmFunc7 = backend2.wasm.cwrap(Sigmoid, null, [\"number\", \"number\"]);\n}\nfunction sigmoid4(args) {\n const { backend: backend2, inputs: { x } } = args;\n const xId = backend2.dataIdMap.get(x.dataId).id;\n const out = backend2.makeOutput(x.shape, x.dtype);\n const outId = backend2.dataIdMap.get(out.dataId).id;\n if (util_exports.sizeFromShape(out.shape) === 0) {\n return out;\n }\n wasmFunc7(xId, outId);\n return out;\n}\nvar sigmoidConfig3 = {\n kernelName: \"Sigmoid\",\n backendName: \"wasm\",\n setupFunc: setup40,\n kernelFunc: sigmoid4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Sin.js\nvar sinConfig3 = createUnaryKernelConfig(Sin);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Softmax.js\nvar wasmFunc8;\nfunction setup41(backend2) {\n wasmFunc8 = backend2.wasm.cwrap(Softmax, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction softmax5(args) {\n const { backend: backend2, inputs: { logits }, attrs: { dim } } = args;\n const xId = backend2.dataIdMap.get(logits.dataId).id;\n const out = backend2.makeOutput(logits.shape, logits.dtype);\n const outId = backend2.dataIdMap.get(out.dataId).id;\n const channels = logits.shape[dim];\n const batch = util_exports.sizeFromShape(logits.shape) / channels;\n if (util_exports.sizeFromShape(out.shape) === 0) {\n return out;\n }\n wasmFunc8(xId, outId, channels, batch);\n return out;\n}\nvar softmaxConfig3 = {\n kernelName: Softmax,\n backendName: \"wasm\",\n setupFunc: setup41,\n kernelFunc: softmax5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/SpaceToBatchND.js\nfunction spaceToBatchND4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { blockShape, paddings } = attrs;\n const prod6 = util_exports.sizeFromShape(blockShape);\n const completePaddings = [[0, 0]];\n completePaddings.push(...paddings);\n for (let i2 = 1 + blockShape.length; i2 < x.shape.length; ++i2) {\n completePaddings.push([0, 0]);\n }\n const paddedX = padV2Config3.kernelFunc({\n inputs: { x },\n backend: backend2,\n attrs: { paddings: completePaddings, constantValue: 0 }\n });\n const reshapedPaddedShape = backend_util_exports.getReshaped(paddedX.shape, blockShape, prod6, false);\n const permutedReshapedPaddedPermutation = backend_util_exports.getPermuted(reshapedPaddedShape.length, blockShape.length, false);\n const flattenShape = backend_util_exports.getReshapedPermuted(paddedX.shape, blockShape, prod6, false);\n const reshapeInputs = { x: paddedX };\n const reshapeAttrs = { shape: reshapedPaddedShape };\n const paddedXReshaped = reshape5({ inputs: reshapeInputs, backend: backend2, attrs: reshapeAttrs });\n const transposeInputs = { x: paddedXReshaped };\n const transposeAttrs = { perm: permutedReshapedPaddedPermutation };\n const paddedXT = transpose4({ inputs: transposeInputs, backend: backend2, attrs: transposeAttrs });\n const resultReshapeInputs = { x: paddedXT };\n const resultReshapeAttrs = { shape: flattenShape };\n const result = reshape5({ inputs: resultReshapeInputs, backend: backend2, attrs: resultReshapeAttrs });\n backend2.disposeData(paddedX.dataId);\n backend2.disposeData(paddedXReshaped.dataId);\n backend2.disposeData(paddedXT.dataId);\n return result;\n}\nvar spaceToBatchNDConfig3 = {\n kernelName: SpaceToBatchND,\n backendName: \"wasm\",\n kernelFunc: spaceToBatchND4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/SparseFillEmptyRows.js\nvar wasmSparseFillEmptyRows;\nfunction setup42(backend2) {\n wasmSparseFillEmptyRows = backend2.wasm.cwrap(\"SparseFillEmptyRows\", \"number\", [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction sparseFillEmptyRows4(args) {\n const { backend: backend2, inputs } = args;\n const { indices, values, denseShape, defaultValue } = inputs;\n const indicesCount = indices.shape[0];\n const rank = indices.shape[1];\n const denseRows = backend2.readSync(denseShape.dataId)[0];\n const maxOutputIndicesShape = [indicesCount + denseRows, rank];\n const indicesId = backend2.dataIdMap.get(indices.dataId).id;\n const valuesId = backend2.dataIdMap.get(values.dataId).id;\n const defaultValueId = backend2.dataIdMap.get(defaultValue.dataId).id;\n const outputIndices = backend2.makeOutput(maxOutputIndicesShape, indices.dtype);\n const outputIndicesId = backend2.dataIdMap.get(outputIndices.dataId).id;\n const outputValues = backend2.makeOutput(maxOutputIndicesShape.slice(0, 1), values.dtype);\n const outputValuesId = backend2.dataIdMap.get(outputValues.dataId).id;\n const emptyRowIndicator = backend2.makeOutput([denseRows], \"bool\");\n const emptyRowIndicatorId = backend2.dataIdMap.get(emptyRowIndicator.dataId).id;\n const reverseIndexMap = backend2.makeOutput([indicesCount], indices.dtype);\n const reverseIndexMapId = backend2.dataIdMap.get(reverseIndexMap.dataId).id;\n const exceptionValues = backend2.makeOutput([4], \"int32\");\n const exceptionValuesId = backend2.dataIdMap.get(exceptionValues.dataId).id;\n const outputRows = wasmSparseFillEmptyRows(indicesId, valuesId, CppDType[values.dtype], indicesCount, denseRows, rank, defaultValueId, outputIndicesId, outputValuesId, emptyRowIndicatorId, reverseIndexMapId, exceptionValuesId);\n const exceptionValuesArray = backend2.readSync(exceptionValues.dataId);\n let exceptionMessage;\n switch (exceptionValuesArray[0]) {\n case 1: {\n exceptionMessage = backend_util_exports.getSparseFillEmptyRowsIndicesDenseShapeMismatch(exceptionValuesArray[1]);\n break;\n }\n case 2: {\n exceptionMessage = backend_util_exports.getSparseFillEmptyRowsNegativeIndexErrorMessage(exceptionValuesArray[1], exceptionValuesArray[2]);\n break;\n }\n case 3:\n exceptionMessage = backend_util_exports.getSparseFillEmptyRowsOutOfRangeIndexErrorMessage(exceptionValuesArray[1], exceptionValuesArray[2], exceptionValuesArray[3]);\n break;\n default:\n exceptionMessage = \"\";\n }\n backend2.disposeData(exceptionValues.dataId);\n if (exceptionMessage) {\n backend2.disposeData(outputIndices.dataId);\n backend2.disposeData(outputValues.dataId);\n backend2.disposeData(emptyRowIndicator.dataId);\n backend2.disposeData(reverseIndexMap.dataId);\n throw new Error(exceptionMessage);\n }\n let resizedIndices = outputIndices;\n let resizedValues = outputValues;\n if (outputRows !== maxOutputIndicesShape[0]) {\n resizedIndices = slice4({\n inputs: { x: outputIndices },\n attrs: { begin: 0, size: [outputRows, rank] },\n backend: backend2\n });\n resizedValues = slice4({\n inputs: { x: outputValues },\n attrs: { begin: 0, size: outputRows },\n backend: backend2\n });\n backend2.disposeData(outputIndices.dataId);\n backend2.disposeData(outputValues.dataId);\n }\n return [resizedIndices, resizedValues, emptyRowIndicator, reverseIndexMap];\n}\nvar sparseFillEmptyRowsConfig3 = {\n kernelName: SparseFillEmptyRows,\n backendName: \"wasm\",\n setupFunc: setup42,\n kernelFunc: sparseFillEmptyRows4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/SparseReshape.js\nvar wasmSparseReshape;\nfunction setup43(backend2) {\n wasmSparseReshape = backend2.wasm.cwrap(SparseReshape, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction sparseReshape4(args) {\n const { backend: backend2, inputs } = args;\n const { inputIndices, inputShape, newShape } = inputs;\n if (inputIndices.shape.length !== 2) {\n throw new Error(`Input indices should be a matrix but received shape\n ${inputIndices.shape}`);\n }\n if (inputShape.shape.length !== 1) {\n throw new Error(`Input shape should be a vector but received shape\n ${inputShape.shape}`);\n }\n if (newShape.shape.length !== 1) {\n throw new Error(`Target shape should be a vector but received shape ${newShape.shape}`);\n }\n const inputIndicesId = backend2.dataIdMap.get(inputIndices.dataId).id;\n const inputShapeId = backend2.dataIdMap.get(inputShape.dataId).id;\n const newShapeId = backend2.dataIdMap.get(newShape.dataId).id;\n const nnz = inputIndices.shape[0];\n const outputRank = util_exports.sizeFromShape(newShape.shape);\n const newIndices = backend2.makeOutput([nnz, outputRank], inputIndices.dtype);\n const newIndicesId = backend2.dataIdMap.get(newIndices.dataId).id;\n const outputShape = backend2.makeOutput([outputRank], newShape.dtype);\n const outputShapeId = backend2.dataIdMap.get(outputShape.dataId).id;\n const exceptionValues = backend2.makeOutput([3], \"int32\");\n const exceptionValuesId = backend2.dataIdMap.get(exceptionValues.dataId).id;\n wasmSparseReshape(inputIndicesId, inputShapeId, newShapeId, nnz, newIndicesId, outputShapeId, exceptionValuesId);\n const exceptionValuesArray = backend2.readSync(exceptionValues.dataId);\n let exceptionMessage;\n switch (exceptionValuesArray[0]) {\n case 0: {\n exceptionMessage = backend_util_exports.getSparseReshapeMultipleNegativeOneOutputDimErrorMessage(exceptionValuesArray[1], exceptionValuesArray[2]);\n break;\n }\n case 1: {\n exceptionMessage = backend_util_exports.getSparseReshapeNegativeOutputDimErrorMessage(exceptionValuesArray[1], exceptionValuesArray[2]);\n break;\n }\n case 2:\n exceptionMessage = backend_util_exports.getSparseReshapeEmptyTensorZeroOutputDimErrorMessage();\n break;\n case 3: {\n const inputShapeValues = Array.from(backend2.readSync(inputShape.dataId)), outputShapeValues = Array.from(backend2.readSync(outputShape.dataId));\n exceptionMessage = backend_util_exports.getSparseReshapeInputOutputMultipleErrorMessage(inputShapeValues, outputShapeValues);\n break;\n }\n case 4: {\n const inputShapeValues = Array.from(backend2.readSync(inputShape.dataId)), outputShapeValues = Array.from(backend2.readSync(outputShape.dataId));\n exceptionMessage = backend_util_exports.getSparseReshapeInputOutputMismatchErrorMessage(inputShapeValues, outputShapeValues);\n break;\n }\n default:\n exceptionMessage = \"\";\n }\n backend2.disposeData(exceptionValues.dataId);\n if (exceptionMessage) {\n backend2.disposeData(newIndices.dataId);\n backend2.disposeData(outputShape.dataId);\n throw new Error(exceptionMessage);\n }\n return [newIndices, outputShape];\n}\nvar sparseReshapeConfig3 = {\n kernelName: SparseReshape,\n backendName: \"wasm\",\n setupFunc: setup43,\n kernelFunc: sparseReshape4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/SparseSegmentReduction.js\nvar wasmSparseSegmentReduction;\nfunction setup44(backend2) {\n wasmSparseSegmentReduction = backend2.wasm.cwrap(\"SparseSegmentReduction\", null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction sparseSegmentReduction(args, isMean) {\n const { backend: backend2, inputs } = args;\n const { data, indices, segmentIds } = inputs;\n const numIndices = indices.shape[0];\n const segmentIdsBack = backend2.readSync(segmentIds.dataId, numIndices - 1, numIndices)[0];\n const lastSegmentIdPlusOne = numIndices > 0 ? segmentIdsBack + 1 : 0;\n const outputRows = lastSegmentIdPlusOne;\n if (outputRows < 0) {\n throw new Error(backend_util_exports.getSparseSegmentReductionNegativeSegmentIdsErrorMessage());\n }\n const outputShape = data.shape.slice();\n outputShape[0] = outputRows;\n const dataId = backend2.dataIdMap.get(data.dataId).id;\n const indicesId = backend2.dataIdMap.get(indices.dataId).id;\n const segmentIdsId = backend2.dataIdMap.get(segmentIds.dataId).id;\n const output = backend2.makeOutput(outputShape, data.dtype);\n const outputId = backend2.dataIdMap.get(output.dataId).id;\n const exceptionValues = backend2.makeOutput([4], \"int32\");\n const exceptionValuesId = backend2.dataIdMap.get(exceptionValues.dataId).id;\n wasmSparseSegmentReduction(dataId, CppDType[data.dtype], data.shape[0], indicesId, segmentIdsId, outputId, exceptionValuesId, isMean, 0);\n const exceptionValuesArray = backend2.readSync(exceptionValues.dataId);\n let exceptionMessage;\n switch (exceptionValuesArray[0]) {\n case 0: {\n exceptionMessage = backend_util_exports.getSparseSegmentReductionNegativeSegmentIdsErrorMessage();\n break;\n }\n case 1: {\n exceptionMessage = backend_util_exports.getSparseSegmentReductionNonIncreasingSegmentIdsErrorMessage();\n break;\n }\n case 2:\n exceptionMessage = backend_util_exports.getSparseSegmentReductionSegmentIdOutOfRangeErrorMessage(exceptionValuesArray[1], exceptionValuesArray[2]);\n break;\n case 3:\n exceptionMessage = backend_util_exports.getSparseSegmentReductionIndicesOutOfRangeErrorMessage(exceptionValuesArray[1], exceptionValuesArray[2], exceptionValuesArray[3]);\n break;\n default:\n exceptionMessage = \"\";\n }\n backend2.disposeData(exceptionValues.dataId);\n if (exceptionMessage) {\n backend2.disposeData(output.dataId);\n throw new Error(exceptionMessage);\n }\n return output;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/SparseSegmentMean.js\nfunction sparseSegmentMean4(args) {\n return sparseSegmentReduction(args, true);\n}\nvar sparseSegmentMeanConfig3 = {\n kernelName: SparseSegmentMean,\n backendName: \"wasm\",\n setupFunc: setup44,\n kernelFunc: sparseSegmentMean4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/SparseSegmentSum.js\nfunction sparseSegmentSum4(args) {\n return sparseSegmentReduction(args, false);\n}\nvar sparseSegmentSumConfig3 = {\n kernelName: SparseSegmentSum,\n backendName: \"wasm\",\n setupFunc: setup44,\n kernelFunc: sparseSegmentSum4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/SplitV.js\nfunction splitV3(args) {\n const { inputs, attrs, backend: backend2 } = args;\n const { x } = inputs;\n const { numOrSizeSplits, axis } = attrs;\n const $axis = util_exports.parseAxisParam(axis, x.shape)[0];\n const splitSizes = backend_util_exports.prepareSplitSize(x, numOrSizeSplits, $axis);\n const begin = new Array(x.shape.length).fill(0);\n const size = x.shape.slice();\n return splitSizes.map((s2) => {\n const xSliceSize = [...size];\n xSliceSize[$axis] = s2;\n const xSlice = slice4({ inputs: { x }, attrs: { begin, size: xSliceSize }, backend: backend2 });\n begin[$axis] += s2;\n return xSlice;\n });\n}\nvar splitVConfig3 = {\n kernelName: SplitV,\n backendName: \"wasm\",\n kernelFunc: splitV3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Sqrt.js\nvar sqrtConfig3 = createUnaryKernelConfig(Sqrt);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Square.js\nvar squareConfig3 = createUnaryKernelConfig(Square);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/SquaredDifference.js\nvar supportsFullBroadcast17 = true;\nvar squaredDifferenceConfig3 = createBinaryKernelConfig(SquaredDifference, supportsFullBroadcast17);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Step.js\nvar wasmStep;\nfunction setup45(backend2) {\n wasmStep = backend2.wasm.cwrap(Step, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction step4(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { alpha } = attrs;\n const { x } = inputs;\n const xId = backend2.dataIdMap.get(x.dataId).id;\n const out = backend2.makeOutput(x.shape, x.dtype);\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmStep(xId, alpha, CppDType[x.dtype], outId);\n return out;\n}\nvar stepConfig3 = {\n kernelName: Step,\n backendName: \"wasm\",\n setupFunc: setup45,\n kernelFunc: step4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/StridedSlice.js\nvar wasmStridedSlice;\nfunction setup46(backend2) {\n wasmStridedSlice = backend2.wasm.cwrap(StridedSlice, null, [\n \"number\",\n \"array\",\n \"number\",\n \"array\",\n \"array\",\n \"array\",\n \"array\",\n \"array\",\n \"number\",\n \"number\"\n ]);\n}\nfunction stridedSlice4(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { x } = inputs;\n const { begin, end, strides, beginMask, endMask, ellipsisMask, newAxisMask, shrinkAxisMask } = attrs;\n const { finalShapeSparse, finalShape, isIdentity, sliceDim0, isSimpleSlice, begin: $begin, end: $end, strides: $strides } = slice_util_exports.sliceInfo(x.shape, begin, end, strides, beginMask, endMask, ellipsisMask, newAxisMask, shrinkAxisMask);\n let result;\n if (isIdentity) {\n result = reshape5({ inputs: { x }, backend: backend2, attrs: { shape: finalShape } });\n } else if (sliceDim0 || isSimpleSlice) {\n util_exports.assert(x.shape.length >= 1, () => `Input must have rank at least 1, got: ${x.shape.length}`);\n const size = slice_util_exports.computeOutShape($begin, $end, $strides);\n const sliced = slice4({ inputs: { x }, backend: backend2, attrs: { begin: $begin, size } });\n result = reshape5({ inputs: { x: sliced }, backend: backend2, attrs: { shape: finalShape } });\n backend2.disposeData(sliced.dataId);\n } else {\n const out = backend2.makeOutput(finalShapeSparse, \"float32\");\n const xId = backend2.dataIdMap.get(x.dataId).id;\n const xStridesBytes = new Uint8Array(new Int32Array(util_exports.computeStrides(x.shape)).buffer);\n const beginBytes = new Uint8Array(new Int32Array($begin).buffer);\n const endBytes = new Uint8Array(new Int32Array($end).buffer);\n const stridesBytes = new Uint8Array(new Int32Array($strides).buffer);\n const outputShapeBytes = new Uint8Array(new Int32Array(finalShapeSparse).buffer);\n const outStridesBytes = new Uint8Array(new Int32Array(util_exports.computeStrides(finalShapeSparse)).buffer);\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmStridedSlice(xId, xStridesBytes, x.shape.length, beginBytes, endBytes, stridesBytes, outputShapeBytes, outStridesBytes, finalShapeSparse.length, outId);\n result = reshape5({ inputs: { x: out }, backend: backend2, attrs: { shape: finalShape } });\n backend2.disposeData(out.dataId);\n }\n return result;\n}\nvar stridedSliceConfig3 = {\n kernelName: StridedSlice,\n backendName: \"wasm\",\n setupFunc: setup46,\n kernelFunc: stridedSlice4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/StringNGrams.js\nfunction stringNGrams4(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { data, dataSplits } = inputs;\n const { separator, nGramWidths, leftPad, rightPad: rightPad2, padWidth, preserveShortSequences } = attrs;\n const $data = backend2.readSync(data.dataId);\n const $dataSplits = backend2.readSync(dataSplits.dataId);\n const [nGrams, nGramsSplits] = stringNGramsImpl($data, $dataSplits, separator, nGramWidths, leftPad, rightPad2, padWidth, preserveShortSequences);\n const nGramsOut = backend2.makeOutput([nGrams.length], \"string\");\n const nGramsOutData = backend2.dataIdMap.get(nGramsOut.dataId);\n nGramsOutData.stringBytes = nGrams;\n const nGramsSplitsOut = backend2.makeOutput(dataSplits.shape, \"int32\");\n const nGramsSplitsOutVals = backend2.typedArrayFromHeap(nGramsSplitsOut);\n nGramsSplitsOutVals.set(nGramsSplits);\n return [nGramsOut, nGramsSplitsOut];\n}\nvar stringNGramsConfig3 = {\n kernelName: StringNGrams,\n backendName: \"wasm\",\n kernelFunc: stringNGrams4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/StringSplit.js\nfunction stringSplit4(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { input: input2, delimiter } = inputs;\n const { skipEmpty } = attrs;\n const inputVals = backend2.readSync(input2.dataId);\n const delimiterVals = backend2.readSync(delimiter.dataId);\n const [indices, values, shape] = stringSplitImpl(inputVals, delimiterVals[0], skipEmpty);\n const outputSize = values.length;\n const indicesOut = backend2.makeOutput([outputSize, 2], \"int32\");\n const indicesOutVals = backend2.typedArrayFromHeap(indicesOut);\n indicesOutVals.set(indices);\n const valuesOut = backend2.makeOutput([outputSize], \"string\");\n const valuesOutData = backend2.dataIdMap.get(valuesOut.dataId);\n valuesOutData.stringBytes = values;\n const shapeOut = backend2.makeOutput([2], \"int32\");\n const shapeOutVals = backend2.typedArrayFromHeap(shapeOut);\n shapeOutVals.set(shape);\n return [indicesOut, valuesOut, shapeOut];\n}\nvar stringSplitConfig3 = {\n kernelName: StringSplit,\n backendName: \"wasm\",\n kernelFunc: stringSplit4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/StringToHashBucketFast.js\nfunction stringToHashBucketFast4(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { input: input2 } = inputs;\n const { numBuckets } = attrs;\n const inputVals = backend2.readSync(input2.dataId);\n const values = stringToHashBucketFastImpl(inputVals, numBuckets);\n const out = backend2.makeOutput(input2.shape, \"int32\");\n const outVals = backend2.typedArrayFromHeap(out);\n outVals.set(values);\n return out;\n}\nvar stringToHashBucketFastConfig3 = {\n kernelName: StringToHashBucketFast,\n backendName: \"wasm\",\n kernelFunc: stringToHashBucketFast4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Sub.js\nvar supportsFullBroadcast18 = true;\nvar subConfig3 = createBinaryKernelConfig(Sub, supportsFullBroadcast18);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Sum.js\nvar wasmSum;\nfunction setup47(backend2) {\n wasmSum = backend2.wasm.cwrap(Sum, null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction sum5(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { axis, keepDims } = attrs;\n const { x } = inputs;\n const xId = backend2.dataIdMap.get(x.dataId).id;\n let inputId = xId;\n let input2 = x;\n const { transposed, axes, originalAxes, inputWasTransposed } = permuteAxesAndTranspose(x, axis, backend2);\n let reductionAxes = axes;\n if (inputWasTransposed) {\n const transposedId = backend2.dataIdMap.get(transposed.dataId).id;\n if (transposedId !== xId) {\n input2 = transposed;\n inputId = transposedId;\n reductionAxes = backend_util_exports.getInnerMostAxes(reductionAxes.length, input2.shape.length);\n }\n }\n backend_util_exports.assertAxesAreInnerMostDims(\"sum\", reductionAxes, input2.shape.length);\n const [outShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes(input2.shape, reductionAxes);\n const reduceSize = util_exports.sizeFromShape(reduceShape);\n const out = backend2.makeOutput(outShape, input2.dtype);\n if (util_exports.sizeFromShape(input2.shape) !== 0) {\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmSum(inputId, reduceSize, CppDType[out.dtype], outId);\n }\n if (inputWasTransposed) {\n backend2.disposeData(transposed.dataId);\n }\n if (keepDims) {\n const newShape = backend_util_exports.expandShapeToKeepDim(out.shape, originalAxes);\n out.shape = newShape;\n }\n return out;\n}\nvar sumConfig3 = {\n kernelName: Sum,\n backendName: \"wasm\",\n setupFunc: setup47,\n kernelFunc: sum5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Tan.js\nvar tanConfig3 = createUnaryKernelConfig(Tan);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Tanh.js\nvar tanhConfig3 = createUnaryKernelConfig(Tanh);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Tile.js\nvar wasmTile;\nfunction setup48(backend2) {\n wasmTile = backend2.wasm.cwrap(Tile, null, [\n \"number\",\n \"array\",\n \"number\",\n \"array\",\n \"number\",\n \"number\"\n ]);\n}\nfunction tile5(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const xId = backend2.dataIdMap.get(x.dataId).id;\n const { reps } = attrs;\n const newShape = new Array(x.shape.length);\n for (let i2 = 0; i2 < newShape.length; i2++) {\n newShape[i2] = x.shape[i2] * reps[i2];\n }\n const xShapeBytes = new Uint8Array(new Int32Array(x.shape).buffer);\n const newShapeBytes = new Uint8Array(new Int32Array(newShape).buffer);\n const out = backend2.makeOutput(newShape, x.dtype);\n const outId = backend2.dataIdMap.get(out.dataId).id;\n wasmTile(xId, xShapeBytes, x.shape.length, newShapeBytes, newShape.length, CppDType[out.dtype], outId);\n return out;\n}\nvar tileConfig3 = {\n kernelName: Tile,\n backendName: \"wasm\",\n setupFunc: setup48,\n kernelFunc: tile5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/TopK.js\nvar wasmTopK;\nfunction setup49(backend2) {\n wasmTopK = backend2.wasm.cwrap(TopK, null, [\n \"number\",\n \"array\",\n \"number\",\n \"number\",\n \"number\",\n \"bool\",\n \"number\",\n \"number\"\n ]);\n}\nvar topk2 = ({ inputs, backend: backend2, attrs }) => {\n const { x } = inputs;\n const { k, sorted } = attrs;\n const xId = backend2.dataIdMap.get(x.dataId).id;\n const xShapeBytes = new Uint8Array(new Int32Array(x.shape).buffer);\n const outputShape = x.shape.slice();\n outputShape[outputShape.length - 1] = k;\n const outValues = backend2.makeOutput(outputShape, x.dtype);\n const outValuesId = backend2.dataIdMap.get(outValues.dataId).id;\n const outIndices = backend2.makeOutput(outputShape, \"int32\");\n const outIndicesId = backend2.dataIdMap.get(outIndices.dataId).id;\n wasmTopK(xId, xShapeBytes, x.shape.length, CppDType[x.dtype], k, sorted, outValuesId, outIndicesId);\n return [outValues, outIndices];\n};\nvar topKConfig3 = {\n kernelName: TopK,\n backendName: \"wasm\",\n setupFunc: setup49,\n kernelFunc: topk2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Transform.js\nvar wasmTransform;\nfunction setup50(backend2) {\n wasmTransform = backend2.wasm.cwrap(Transform, null, [\n \"number\",\n \"number\",\n \"bool\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"array\",\n \"number\",\n \"array\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\"\n ]);\n}\nfunction transform4(args) {\n const { backend: backend2, inputs, attrs } = args;\n const { image: image2, transforms } = inputs;\n const { interpolation, fillMode, fillValue, outputShape } = attrs;\n const [batch, imageHeight, imageWidth, numChannels] = image2.shape;\n const [outHeight, outWidth] = outputShape != null ? outputShape : [imageHeight, imageWidth];\n const outShape = [\n batch,\n outHeight,\n outWidth,\n numChannels\n ];\n const inputStrides = new Uint8Array(new Int32Array(util_exports.computeStrides(image2.shape)).buffer);\n const outputStrides = new Uint8Array(new Int32Array(util_exports.computeStrides(outShape)).buffer);\n const out = backend2.makeOutput(outShape, image2.dtype);\n const outId = backend2.dataIdMap.get(out.dataId).id;\n const imageData = backend2.dataIdMap.get(image2.dataId);\n const imageId = imageData.id;\n const transformsData = backend2.dataIdMap.get(transforms.dataId);\n const transformsId = transformsData.id;\n const interpolationModeId = interpolation === \"nearest\" ? 1 : 2;\n let fillModeId;\n switch (fillMode) {\n case \"constant\":\n fillModeId = 1;\n break;\n case \"reflect\":\n fillModeId = 2;\n break;\n case \"wrap\":\n fillModeId = 3;\n break;\n case \"nearest\":\n fillModeId = 4;\n break;\n default:\n fillModeId = 1;\n break;\n }\n wasmTransform(imageId, transformsId, transforms.shape[0] > 1, batch, outHeight, outWidth, numChannels, imageWidth, imageHeight, inputStrides, image2.shape.length - 1, outputStrides, outShape.length - 1, interpolationModeId, fillModeId, fillValue, outId);\n return out;\n}\nvar transformConfig3 = {\n kernelName: Transform,\n backendName: \"wasm\",\n setupFunc: setup50,\n kernelFunc: transform4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Unpack.js\nfunction unpack3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { value } = inputs;\n let { axis } = attrs;\n if (axis < 0) {\n axis += value.shape.length;\n }\n const numOutputs = value.shape[axis];\n const rank = value.shape.length;\n const outShape = new Array(rank - 1);\n let outIndex = 0;\n for (let i2 = 0; i2 < rank; i2++) {\n if (i2 !== axis) {\n outShape[outIndex++] = value.shape[i2];\n }\n }\n const outs = new Array(numOutputs);\n const begin = new Array(rank).fill(0);\n const size = value.shape.slice();\n size[axis] = 1;\n for (let i2 = 0; i2 < outs.length; i2++) {\n begin[axis] = i2;\n outs[i2] = slice4({ inputs: { x: value }, attrs: { begin, size }, backend: backend2 });\n }\n return outs.map(({ dataId, dtype }) => ({ dataId, dtype, shape: outShape }));\n}\nvar unpackConfig3 = {\n kernelName: Unpack,\n backendName: \"wasm\",\n kernelFunc: unpack3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/ZerosLike.js\nfunction zerosLike4(args) {\n const { inputs: { x }, backend: backend2 } = args;\n const out = backend2.makeOutput(x.shape, x.dtype);\n const outVals = backend2.typedArrayFromHeap(out);\n outVals.fill(0);\n return out;\n}\nvar zerosLikeConfig3 = {\n kernelName: ZerosLike,\n backendName: \"wasm\",\n kernelFunc: zerosLike4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/register_all_kernels.js\nvar kernelConfigs3 = [\n _fusedMatMulConfig3,\n absConfig3,\n addConfig3,\n addNConfig3,\n allConfig3,\n anyConfig3,\n argMaxConfig3,\n avgPoolConfig3,\n batchMatMulConfig3,\n batchToSpaceNDConfig3,\n castConfig3,\n ceilConfig3,\n clipByValueConfig3,\n concatConfig3,\n conv2DConfig3,\n conv2DBackpropInputConfig3,\n cosConfig3,\n coshConfig3,\n cropAndResizeConfig3,\n cumprodConfig3,\n cumsumConfig3,\n depthToSpaceConfig3,\n depthwiseConv2dNativeConfig3,\n eluConfig3,\n equalConfig3,\n expConfig3,\n expandDimsConfig3,\n fillConfig3,\n flipLeftRightConfig3,\n floorConfig3,\n floorDivConfig3,\n fusedBatchNormConfig,\n fusedConv2DConfig3,\n fusedDepthwiseConv2DConfig3,\n gatherNdConfig3,\n gatherV2Config3,\n greaterConfig3,\n greaterEqualConfig3,\n identityConfig3,\n leakyReluConfig3,\n lessConfig3,\n lessEqualConfig3,\n logConfig3,\n logicalAndConfig3,\n logicalNotConfig3,\n logicalOrConfig3,\n logicalXorConfig,\n maxConfig3,\n maximumConfig3,\n maxPoolConfig3,\n meanConfig3,\n minConfig3,\n minimumConfig3,\n mirrorPadConfig3,\n multiplyConfig3,\n negConfig3,\n nonMaxSuppressionV3Config3,\n nonMaxSuppressionV4Config3,\n nonMaxSuppressionV5Config3,\n notEqualConfig3,\n oneHotConfig3,\n onesLikeConfig3,\n packConfig3,\n padV2Config3,\n powConfig3,\n preluConfig3,\n prodConfig3,\n rangeConfig3,\n realDivConfig3,\n reluConfig3,\n relu6Config3,\n reshapeConfig3,\n resizeBilinearConfig3,\n resizeNearestNeighborConfig3,\n reverseConfig3,\n rotateWithOffsetConfig3,\n roundConfig3,\n rsqrtConfig3,\n scatterNdConfig3,\n selectConfig3,\n sigmoidConfig3,\n sinConfig3,\n sliceConfig3,\n softmaxConfig3,\n spaceToBatchNDConfig3,\n sparseFillEmptyRowsConfig3,\n sparseReshapeConfig3,\n sparseSegmentMeanConfig3,\n sparseSegmentSumConfig3,\n splitVConfig3,\n sqrtConfig3,\n squareConfig3,\n squaredDifferenceConfig3,\n stepConfig3,\n stridedSliceConfig3,\n stringNGramsConfig3,\n stringSplitConfig3,\n stringToHashBucketFastConfig3,\n subConfig3,\n sumConfig3,\n tanConfig3,\n tanhConfig3,\n tileConfig3,\n topKConfig3,\n transformConfig3,\n transposeConfig3,\n unpackConfig3,\n zerosLikeConfig3\n];\nfor (const kernelConfig of kernelConfigs3) {\n registerKernel(kernelConfig);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/flags_wasm.js\nvar ENV6 = env();\nENV6.registerFlag(\"WASM_HAS_SIMD_SUPPORT\", async () => {\n try {\n return WebAssembly.validate(new Uint8Array([\n 0,\n 97,\n 115,\n 109,\n 1,\n 0,\n 0,\n 0,\n 1,\n 4,\n 1,\n 96,\n 0,\n 0,\n 3,\n 2,\n 1,\n 0,\n 10,\n 9,\n 1,\n 7,\n 0,\n 65,\n 0,\n 253,\n 15,\n 26,\n 11\n ]));\n } catch (e2) {\n return false;\n }\n});\nENV6.registerFlag(\"WASM_HAS_MULTITHREAD_SUPPORT\", async () => {\n if (ENV6.get(\"IS_NODE\")) {\n return false;\n }\n try {\n new MessageChannel().port1.postMessage(new SharedArrayBuffer(1));\n return WebAssembly.validate(new Uint8Array([\n 0,\n 97,\n 115,\n 109,\n 1,\n 0,\n 0,\n 0,\n 1,\n 4,\n 1,\n 96,\n 0,\n 0,\n 3,\n 2,\n 1,\n 0,\n 5,\n 4,\n 1,\n 3,\n 1,\n 1,\n 10,\n 11,\n 1,\n 9,\n 0,\n 65,\n 0,\n 254,\n 16,\n 2,\n 0,\n 26,\n 11\n ]));\n } catch (e2) {\n return false;\n }\n});\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/backend_wasm.js\nvar wasmFactoryThreadedSimd_import = __toESM(require_tfjs_backend_wasm_threaded_simd());\nvar import_tfjs_backend_wasm_threaded_simd_worker = __toESM(require_tfjs_backend_wasm_threaded_simd_worker());\nvar wasmFactory_import = __toESM(require_tfjs_backend_wasm());\nvar wasmFactoryThreadedSimd = wasmFactoryThreadedSimd_import.default || wasmFactoryThreadedSimd_import;\nvar wasmFactory = wasmFactory_import.default || wasmFactory_import;\nvar BackendWasm = class extends KernelBackend {\n constructor(wasm) {\n super();\n this.wasm = wasm;\n this.dataIdNextNumber = 1;\n this.wasm.tfjs.initWithThreadsCount(threadsCount);\n actualThreadsCount = this.wasm.tfjs.getThreadsCount();\n this.dataIdMap = new DataStorage(this, engine());\n }\n write(values, shape, dtype) {\n const dataId = { id: this.dataIdNextNumber++ };\n this.move(dataId, values, shape, dtype, 1);\n return dataId;\n }\n numDataIds() {\n return this.dataIdMap.numDataIds();\n }\n async time(f) {\n const start = util_exports.now();\n f();\n const kernelMs = util_exports.now() - start;\n return { kernelMs };\n }\n move(dataId, values, shape, dtype, refCount) {\n const id = this.dataIdNextNumber++;\n if (dtype === \"string\") {\n const stringBytes = values;\n this.dataIdMap.set(dataId, { id, stringBytes, shape, dtype, memoryOffset: null, refCount });\n return;\n }\n const size = util_exports.sizeFromShape(shape);\n const numBytes = size * util_exports.bytesPerElement(dtype);\n const memoryOffset = this.wasm._malloc(numBytes);\n this.dataIdMap.set(dataId, { id, memoryOffset, shape, dtype, refCount });\n this.wasm.tfjs.registerTensor(id, size, memoryOffset);\n if (values != null) {\n this.wasm.HEAPU8.set(new Uint8Array(values.buffer, values.byteOffset, numBytes), memoryOffset);\n }\n }\n async read(dataId) {\n return this.readSync(dataId);\n }\n readSync(dataId, start, end) {\n const { memoryOffset, dtype, shape, stringBytes } = this.dataIdMap.get(dataId);\n if (dtype === \"string\") {\n if ((start == null || start === 0) && (end == null || end >= stringBytes.length)) {\n return stringBytes;\n }\n return stringBytes.slice(start, end);\n }\n start = start || 0;\n end = end || util_exports.sizeFromShape(shape);\n const bytesPerElement2 = util_exports.bytesPerElement(dtype);\n const bytes = this.wasm.HEAPU8.slice(memoryOffset + start * bytesPerElement2, memoryOffset + end * bytesPerElement2);\n return typedArrayFromBuffer(bytes.buffer, dtype);\n }\n disposeData(dataId, force = false) {\n if (this.dataIdMap.has(dataId)) {\n const data = this.dataIdMap.get(dataId);\n data.refCount--;\n if (!force && data.refCount > 0) {\n return false;\n }\n this.wasm._free(data.memoryOffset);\n this.wasm.tfjs.disposeData(data.id);\n this.dataIdMap.delete(dataId);\n }\n return true;\n }\n refCount(dataId) {\n if (this.dataIdMap.has(dataId)) {\n const tensorData = this.dataIdMap.get(dataId);\n return tensorData.refCount;\n }\n return 0;\n }\n incRef(dataId) {\n const data = this.dataIdMap.get(dataId);\n if (data != null) {\n data.refCount++;\n }\n }\n floatPrecision() {\n return 32;\n }\n getMemoryOffset(dataId) {\n return this.dataIdMap.get(dataId).memoryOffset;\n }\n dispose() {\n this.wasm.tfjs.dispose();\n if (\"PThread\" in this.wasm) {\n this.wasm.PThread.terminateAllThreads();\n }\n this.wasm = null;\n }\n memory() {\n return { unreliable: false };\n }\n makeOutput(shape, dtype, memoryOffset) {\n let dataId;\n if (memoryOffset == null) {\n dataId = this.write(null, shape, dtype);\n } else {\n const id = this.dataIdNextNumber++;\n dataId = { id };\n this.dataIdMap.set(dataId, { id, memoryOffset, shape, dtype, refCount: 1 });\n const size = util_exports.sizeFromShape(shape);\n this.wasm.tfjs.registerTensor(id, size, memoryOffset);\n }\n return { dataId, shape, dtype };\n }\n typedArrayFromHeap({ shape, dtype, dataId }) {\n const buffer2 = this.wasm.HEAPU8.buffer;\n const { memoryOffset } = this.dataIdMap.get(dataId);\n const size = util_exports.sizeFromShape(shape);\n switch (dtype) {\n case \"float32\":\n return new Float32Array(buffer2, memoryOffset, size);\n case \"int32\":\n return new Int32Array(buffer2, memoryOffset, size);\n case \"bool\":\n return new Uint8Array(buffer2, memoryOffset, size);\n default:\n throw new Error(`Unknown dtype ${dtype}`);\n }\n }\n};\nfunction createInstantiateWasmFunc(path) {\n return (imports, callback) => {\n util_exports.fetch(path, { credentials: \"same-origin\" }).then((response) => {\n if (!response[\"ok\"]) {\n imports.env.a(`failed to load wasm binary file at '${path}'`);\n }\n response.arrayBuffer().then((binary) => {\n WebAssembly.instantiate(binary, imports).then((output) => {\n callback(output.instance, output.module);\n });\n });\n });\n return {};\n };\n}\nfunction getPathToWasmBinary(simdSupported, threadsSupported, wasmModuleFolder) {\n if (wasmPath != null) {\n return wasmPath;\n }\n let path = \"tfjs-backend-wasm.wasm\";\n if (simdSupported && threadsSupported) {\n path = \"tfjs-backend-wasm-threaded-simd.wasm\";\n } else if (simdSupported) {\n path = \"tfjs-backend-wasm-simd.wasm\";\n }\n if (wasmFileMap != null) {\n if (wasmFileMap[path] != null) {\n return wasmFileMap[path];\n }\n }\n return wasmModuleFolder + path;\n}\nasync function init() {\n const [simdSupported, threadsSupported] = await Promise.all([\n env().getAsync(\"WASM_HAS_SIMD_SUPPORT\"),\n env().getAsync(\"WASM_HAS_MULTITHREAD_SUPPORT\")\n ]);\n return new Promise((resolve, reject) => {\n const factoryConfig = {};\n factoryConfig.locateFile = (path, prefix) => {\n if (path.endsWith(\".worker.js\")) {\n const response = import_tfjs_backend_wasm_threaded_simd_worker.wasmWorkerContents.replace(/\\n/g, \"\\\\n\");\n const blob = new Blob([response], { type: \"application/javascript\" });\n return URL.createObjectURL(blob);\n }\n if (path.endsWith(\".wasm\")) {\n return getPathToWasmBinary(simdSupported, threadsSupported, wasmPathPrefix != null ? wasmPathPrefix : prefix);\n }\n return prefix + path;\n };\n if (customFetch) {\n factoryConfig.instantiateWasm = createInstantiateWasmFunc(getPathToWasmBinary(simdSupported, threadsSupported, wasmPathPrefix != null ? wasmPathPrefix : \"\"));\n }\n let initialized = false;\n factoryConfig.onAbort = () => {\n if (initialized) {\n return;\n }\n if (initAborted) {\n return;\n }\n initAborted = true;\n const rejectMsg = \"Make sure the server can serve the `.wasm` file relative to the bundled js file. For more details see https://github.com/tensorflow/tfjs/blob/master/tfjs-backend-wasm/README.md#using-bundlers\";\n reject({ message: rejectMsg });\n };\n let wasm;\n if (threadsSupported && simdSupported && wasmPath == null) {\n factoryConfig.mainScriptUrlOrBlob = new Blob([`var WasmBackendModuleThreadedSimd = ` + wasmFactoryThreadedSimd.toString()], { type: \"text/javascript\" });\n wasm = wasmFactoryThreadedSimd(factoryConfig);\n } else {\n wasm = wasmFactory(factoryConfig);\n }\n wasm.then((module) => {\n initialized = true;\n initAborted = false;\n const voidReturnType = null;\n module.tfjs = {\n init: module.cwrap(\"init\", null, []),\n initWithThreadsCount: module.cwrap(\"init_with_threads_count\", null, [\"number\"]),\n getThreadsCount: module.cwrap(\"get_threads_count\", \"number\", []),\n registerTensor: module.cwrap(\"register_tensor\", null, [\n \"number\",\n \"number\",\n \"number\"\n ]),\n disposeData: module.cwrap(\"dispose_data\", voidReturnType, [\"number\"]),\n dispose: module.cwrap(\"dispose\", voidReturnType, [])\n };\n resolve({ wasm: module });\n }).catch(reject);\n });\n}\nfunction typedArrayFromBuffer(buffer2, dtype) {\n switch (dtype) {\n case \"float32\":\n return new Float32Array(buffer2);\n case \"int32\":\n return new Int32Array(buffer2);\n case \"bool\":\n return new Uint8Array(buffer2);\n default:\n throw new Error(`Unknown dtype ${dtype}`);\n }\n}\nvar wasmBinaryNames = [\n \"tfjs-backend-wasm.wasm\",\n \"tfjs-backend-wasm-simd.wasm\",\n \"tfjs-backend-wasm-threaded-simd.wasm\"\n];\nvar wasmPath = null;\nvar wasmPathPrefix = null;\nvar wasmFileMap = {};\nvar initAborted = false;\nvar customFetch = false;\nfunction setWasmPath(path, usePlatformFetch = false) {\n deprecationWarn(\"setWasmPath has been deprecated in favor of setWasmPaths and will be removed in a future release.\");\n if (initAborted) {\n throw new Error(\"The WASM backend was already initialized. Make sure you call `setWasmPath()` before you call `tf.setBackend()` or `tf.ready()`\");\n }\n wasmPath = path;\n customFetch = usePlatformFetch;\n}\nfunction setWasmPaths(prefixOrFileMap, usePlatformFetch = false) {\n if (initAborted) {\n throw new Error(\"The WASM backend was already initialized. Make sure you call `setWasmPaths()` before you call `tf.setBackend()` or `tf.ready()`\");\n }\n if (typeof prefixOrFileMap === \"string\") {\n wasmPathPrefix = prefixOrFileMap;\n } else {\n wasmFileMap = prefixOrFileMap;\n const missingPaths = wasmBinaryNames.filter((name) => wasmFileMap[name] == null);\n if (missingPaths.length > 0) {\n throw new Error(`There were no entries found for the following binaries: ${missingPaths.join(\",\")}. Please either call setWasmPaths with a map providing a path for each binary, or with a string indicating the directory where all the binaries can be found.`);\n }\n }\n customFetch = usePlatformFetch;\n}\nvar threadsCount = -1;\nvar actualThreadsCount = -1;\nfunction setThreadsCount(numThreads) {\n threadsCount = numThreads;\n}\nfunction getThreadsCount() {\n if (actualThreadsCount === -1) {\n throw new Error(`WASM backend not initialized.`);\n }\n return actualThreadsCount;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/version.js\nvar version8 = \"3.21.0\";\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/base.js\nvar WASM_PRIORITY = 2;\nregisterBackend(\"wasm\", async () => {\n const { wasm } = await init();\n return new BackendWasm(wasm);\n}, WASM_PRIORITY);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/flags_webgpu.js\nvar ENV7 = env();\nENV7.registerFlag(\"WEBGPU_DEFERRED_SUBMIT_BATCH_SIZE\", () => 15);\nENV7.registerFlag(\"WEBGPU_CPU_FORWARD\", () => true);\nENV7.registerFlag(\"WEBGPU_MATMUL_PROGRAM_TYPE\", () => -1);\nENV7.registerFlag(\"WEBGPU_USE_NAIVE_CONV2D_TRANSPOSE\", () => false);\nENV7.registerFlag(\"WEBGPU_USE_LOW_POWER_GPU\", () => false);\nENV7.registerFlag(\"WEBGPU_CPU_HANDOFF_SIZE_THRESHOLD\", () => 1e3);\nENV7.registerFlag(\"WEBGPU_USE_PROFILE_TOOL\", () => false);\nENV7.registerFlag(\"WEBGPU_IMPORT_EXTERNAL_TEXTURE\", () => true);\nENV7.registerFlag(\"WEBGPU_USE_NAIVE_CONV2D_DEBUG\", () => false);\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/adapter_info.js\nvar AdapterInfo = class {\n constructor(adapterInfo) {\n if (adapterInfo) {\n this.vendor = adapterInfo.vendor;\n }\n }\n isIntel() {\n return this.vendor === \"intel\";\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/buffer_manager.js\nvar BufferManager = class {\n constructor(device) {\n this.device = device;\n this.numUsedBuffers = 0;\n this.numFreeBuffers = 0;\n this.freeBuffers = /* @__PURE__ */ new Map();\n this.usedBuffers = /* @__PURE__ */ new Map();\n this.numBytesUsed = 0;\n this.numBytesAllocated = 0;\n }\n acquireUploadBuffer(size, usage) {\n return this.acquireBuffer(size, usage, true);\n }\n acquireBuffer(size, usage, mappedAtCreation = false) {\n const key = getBufferKey(size, usage);\n if (!this.freeBuffers.has(key)) {\n this.freeBuffers.set(key, []);\n }\n if (!this.usedBuffers.has(key)) {\n this.usedBuffers.set(key, []);\n }\n this.numBytesUsed += size;\n this.numUsedBuffers++;\n if (this.freeBuffers.get(key).length > 0) {\n this.numFreeBuffers--;\n const newBuffer2 = this.freeBuffers.get(key).shift();\n this.usedBuffers.get(key).push(newBuffer2);\n return newBuffer2;\n }\n this.numBytesAllocated += size;\n const newBuffer = this.device.createBuffer({ size, usage, mappedAtCreation });\n this.usedBuffers.get(key).push(newBuffer);\n return newBuffer;\n }\n releaseBuffer(buffer2, size, usage) {\n if (this.freeBuffers.size === 0) {\n return;\n }\n const key = getBufferKey(size, usage);\n if (!this.freeBuffers.has(key)) {\n this.freeBuffers.set(key, []);\n }\n this.freeBuffers.get(key).push(buffer2);\n this.numFreeBuffers++;\n this.numUsedBuffers--;\n const bufferList = this.usedBuffers.get(key);\n const bufferIndex = bufferList.indexOf(buffer2);\n if (bufferIndex < 0) {\n throw new Error(\"Cannot release a buffer that was never provided by this buffer manager\");\n }\n bufferList.splice(bufferIndex, 1);\n this.numBytesUsed -= size;\n }\n releaseUploadBuffer(buffer2, size, usage) {\n buffer2.mapAsync(GPUMapMode.WRITE).then(() => {\n this.releaseBuffer(buffer2, size, usage);\n }, (err) => {\n });\n }\n getNumUsedBuffers() {\n return this.numUsedBuffers;\n }\n getNumFreeBuffers() {\n return this.numFreeBuffers;\n }\n dispose() {\n this.freeBuffers.forEach((buffers, key) => {\n buffers.forEach((buffer2) => {\n buffer2.destroy();\n });\n });\n this.usedBuffers.forEach((buffers, key) => {\n buffers.forEach((buffer2) => {\n buffer2.destroy();\n });\n });\n this.freeBuffers = /* @__PURE__ */ new Map();\n this.usedBuffers = /* @__PURE__ */ new Map();\n this.numUsedBuffers = 0;\n this.numFreeBuffers = 0;\n this.numBytesUsed = 0;\n this.numBytesAllocated = 0;\n }\n};\nfunction getBufferKey(size, usage) {\n return `${size}_${usage}`;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/texture_manager.js\nvar TextureManager2 = class {\n constructor(device) {\n this.device = device;\n this.numUsedTextures = 0;\n this.numFreeTextures = 0;\n this.freeTextures = /* @__PURE__ */ new Map();\n this.usedTextures = /* @__PURE__ */ new Map();\n this.numBytesUsed = 0;\n this.numBytesAllocated = 0;\n }\n acquireTexture(width, height, format, usage) {\n const bytesPerElement2 = getBytesPerElement(format);\n const byteSize = width * height * bytesPerElement2;\n const key = getTextureKey(width, height, format, usage);\n if (!this.freeTextures.has(key)) {\n this.freeTextures.set(key, []);\n }\n if (!this.usedTextures.has(key)) {\n this.usedTextures.set(key, []);\n }\n this.numBytesUsed += byteSize;\n this.numUsedTextures++;\n if (this.freeTextures.get(key).length > 0) {\n this.numFreeTextures--;\n const newTexture2 = this.freeTextures.get(key).shift();\n this.usedTextures.get(key).push(newTexture2);\n return newTexture2;\n }\n this.numBytesAllocated += byteSize;\n const newTexture = this.device.createTexture({\n size: [width, height],\n format,\n usage\n });\n this.usedTextures.get(key).push(newTexture);\n return newTexture;\n }\n releaseTexture(texture, width, height, format, usage) {\n if (this.freeTextures.size === 0) {\n return;\n }\n const key = getTextureKey(width, height, format, usage);\n if (!this.freeTextures.has(key)) {\n this.freeTextures.set(key, []);\n }\n this.freeTextures.get(key).push(texture);\n this.numFreeTextures++;\n this.numUsedTextures--;\n const textureList = this.usedTextures.get(key);\n const textureIndex = textureList.indexOf(texture);\n if (textureIndex < 0) {\n throw new Error(\"Cannot release a texture that was never provided by this texture manager\");\n }\n textureList.splice(textureIndex, 1);\n const bytesPerElement2 = getBytesPerElement(format);\n const byteSize = width * height * bytesPerElement2;\n this.numBytesUsed -= byteSize;\n }\n getNumUsedTextures() {\n return this.numUsedTextures;\n }\n getNumFreeTextures() {\n return this.numFreeTextures;\n }\n dispose() {\n this.freeTextures.forEach((textures, key) => {\n textures.forEach((texture) => {\n texture.destroy();\n });\n });\n this.usedTextures.forEach((textures, key) => {\n textures.forEach((texture) => {\n texture.destroy();\n });\n });\n this.freeTextures = /* @__PURE__ */ new Map();\n this.usedTextures = /* @__PURE__ */ new Map();\n this.numUsedTextures = 0;\n this.numFreeTextures = 0;\n this.numBytesUsed = 0;\n this.numBytesAllocated = 0;\n }\n};\nfunction getTextureKey(width, height, format, usage) {\n return `${width}_${height}_${format}_${usage}`;\n}\nfunction getBytesPerElement(format) {\n if (format === \"rgba8unorm\") {\n return 16;\n } else {\n throw new Error(`${format} is not supported!`);\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/shader_util.js\nfunction symbolicallyComputeStrides2(indicesArr, variableName) {\n if (Math.max(...indicesArr) > 3) {\n throw new Error(\"Cannot symbolically compute strides for rank > 4 tensor.\");\n }\n const numCoords = indicesArr.length;\n const shape = indicesArr.map((d) => `${variableName}[${d}]`);\n const strides = new Array(numCoords - 1);\n strides[numCoords - 2] = shape[numCoords - 1];\n for (let i2 = numCoords - 3; i2 >= 0; --i2) {\n strides[i2] = `(${strides[i2 + 1]} * ${shape[i2 + 1]})`;\n }\n return strides;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/webgpu_program.js\nvar compileProgram2 = (device, program, inputsData, output) => {\n const outputData = { dtype: output.dtype, shape: output.shape };\n const source = makeShader2(inputsData, outputData, program);\n const module = device.createShaderModule({ code: source, label: program.constructor.name });\n const pipeline = device.createComputePipeline({\n compute: { module, entryPoint: \"_start\" },\n label: program.constructor.name,\n layout: \"auto\"\n });\n return pipeline;\n};\nfunction getCoordsDataType2(rank) {\n if (rank <= 1) {\n return \"i32\";\n } else if (rank === 2) {\n return `vec2`;\n } else if (rank === 3) {\n return `vec3`;\n } else if (rank === 4) {\n return `vec4`;\n } else if (rank === 5) {\n return `vec5`;\n } else if (rank === 6) {\n return `vec6`;\n } else {\n throw Error(`GPU for rank ${rank} is not yet supported`);\n }\n}\nfunction getCoordsXYZ(index) {\n if (index === 0) {\n return \"x\";\n } else if (index === 1) {\n return \"y\";\n } else if (index === 2) {\n return \"z\";\n } else if (index === 3) {\n return \"w\";\n } else if (index === 4) {\n return \"u\";\n } else if (index === 5) {\n return \"v\";\n } else {\n throw Error(`Index ${index} is not yet supported`);\n }\n}\nfunction getMainHeaderString(...params) {\n let snippet;\n switch (params.length) {\n case 0:\n snippet = `\n ${getWorkGroupSizeString()}\n fn _start(@builtin(local_invocation_id) LocalId : vec3,\n @builtin(global_invocation_id) GlobalId : vec3,\n @builtin(num_workgroups) NumWorkgroups : vec3) {\n localId = LocalId;\n globalId = GlobalId;\n numWorkgroups = NumWorkgroups;\n main();\n }\n\n fn main()\n `;\n break;\n case 1:\n snippet = `\n ${getWorkGroupSizeString()}\n fn _start(@builtin(local_invocation_id) LocalId : vec3,\n @builtin(global_invocation_id) GlobalId : vec3,\n @builtin(num_workgroups) NumWorkgroups : vec3) {\n localId = LocalId;\n globalId = GlobalId;\n numWorkgroups = NumWorkgroups;\n main(getGlobalIndex());\n }\n\n fn main(${params[0]} : i32)\n `;\n break;\n default:\n throw Error(\"Unreachable\");\n }\n return snippet;\n}\nfunction getWorkGroupSizeString() {\n return `\n @compute @workgroup_size(workGroupSizeX, workGroupSizeY, workGroupSizeZ)\n`;\n}\nfunction makeShader2(inputInfo, outputData, program) {\n const prefixSnippets = [];\n prefixSnippets.push(`\n const workGroupSizeX = ${program.workGroupSize[0]}u;\n const workGroupSizeY = ${program.workGroupSize[1]}u;\n const workGroupSizeZ = ${program.workGroupSize[2]}u;\n\n var localId: vec3;\n var globalId: vec3;\n var numWorkgroups: vec3;\n\n // Only used when the y/z dimension of workgroup size is 1.\n fn getGlobalIndex() -> i32 {\n ${isFlatDispatch(program) ? ` return i32(globalId.x);` : ` let localInvocationIndex = localId.z * workGroupSizeX * workGroupSizeY +\n localId.y * workGroupSizeX + localId.x;\n let workGroupID = (globalId - localId)/vec3(\n workGroupSizeX, workGroupSizeY, workGroupSizeZ);\n\n return i32((workGroupID.z * numWorkgroups.x * numWorkgroups.y +\n workGroupID.y * numWorkgroups.x + workGroupID.x) *\n (workGroupSizeX * workGroupSizeY * workGroupSizeZ) +\n localInvocationIndex);\n `}\n }\n `);\n if (program.isFromPixels) {\n prefixSnippets.push(`\n struct Uniform {\n size : i32,\n numChannels : i32,\n outShapeStrides : vec2,\n };\n\n @group(0) @binding(0) var result: array<${mapToWgslTypes(outputData.dtype, program.isVec4)}>;\n @group(0) @binding(2) var uniforms: Uniform;\n `);\n return [\n commonSnippet,\n prefixSnippets.join(\"\\n\"),\n getCoordsFromIndexSnippet(outputData.shape),\n program.getUserCode()\n ].join(\"\\n\");\n }\n let uniformDeclaration = \"struct Uniforms { NAN : f32, \";\n program.variableNames.forEach((x, i2) => {\n const perDataType = getCoordsDataType2(inputInfo[i2].shape.length);\n uniformDeclaration += `${x.charAt(0).toLowerCase() + x.slice(1)}Shape : ${perDataType}, `;\n });\n const outputDataType = getCoordsDataType2(outputData.shape.length);\n uniformDeclaration += `outShape : ${outputDataType}, `;\n const stridesLength = outputData.shape.length - 1;\n const stridesDataType = getCoordsDataType2(stridesLength);\n uniformDeclaration += `\n outShapeStrides: ${stridesDataType}, `;\n if (program.size) {\n uniformDeclaration += \"size : i32, \";\n }\n if (program.uniforms) {\n uniformDeclaration += program.uniforms;\n }\n uniformDeclaration += \"};\";\n uniformDeclaration = insertAlignment(uniformDeclaration);\n prefixSnippets.push(uniformDeclaration);\n if (program.atomic) {\n prefixSnippets.push(`\n @group(0) @binding(0) var result: array>;\n `);\n } else {\n prefixSnippets.push(`\n @group(0) @binding(0) var result: array<${mapToWgslTypes(outputData.dtype, program.isVec4)}>;\n `);\n }\n program.variableNames.forEach((x, i2) => {\n prefixSnippets.push(`\n @group(0) @binding(${1 + i2}) var ${x}: array<${program.variableTypes ? program.variableTypes[i2] : mapToWgslTypes(inputInfo[i2].dtype, program.isVec4)}>;\n `);\n });\n if (uniformDeclaration !== \"\") {\n prefixSnippets.push(`\n @group(0) @binding(${1 + program.variableNames.length}) var uniforms: Uniforms;\n `);\n }\n const coordsSnippet = getOutputCoordsSnippet(outputData.shape, program.dispatchLayout);\n const sources = [\n commonSnippet,\n prefixSnippets.join(\"\\n\"),\n getCoordsFromIndexSnippet(outputData.shape),\n coordsSnippet,\n getOutputIndexFromCoordsSnippet(outputData.shape.length)\n ];\n if (!program.atomic) {\n sources.push(setOutputSnippet(outputData.shape, outputData.dtype, program.isVec4));\n }\n const inputSnippet = inputInfo.map((x, i2) => getInputSnippet(x, outputData.shape, program.variableTypes ? program.variableTypes[i2] === \"vec4\" : program.isVec4, program.dispatchLayout.x.length === outputData.shape.length)).join(\"\\n\");\n sources.push(inputSnippet);\n sources.push(program.getUserCode());\n const source = sources.join(\"\\n\");\n return source;\n}\nfunction makeShaderKey2(program, shapes, inputsData, output) {\n let key = program.shaderKey;\n if (program.isFromPixels) {\n return key;\n }\n const types = inputsData.map((d) => d.dtype).concat(output.dtype);\n const broadcastDims = inputsData.map((d) => backend_util_exports.getBroadcastDims(d.shape, output.shape));\n const inputShapesEqualsOutShape = inputsData.map((d) => util_exports.arraysEqual(d.shape, output.shape)).join(\"_\");\n const broadcastDimsKey = broadcastDims.map((d) => d.join(\"_\")).join(\";\");\n const flatDispatchString = isFlatDispatch(program) ? \"flatDispatch\" : \"\";\n key += \"_\" + (program.workGroupSize ? program.workGroupSize.join(\",\") : \"\") + shapes.map((shape) => shape.length).join(\",\") + types.join(\",\") + program.variableNames.join(\",\") + broadcastDimsKey + inputShapesEqualsOutShape + flatDispatchString;\n return key;\n}\nvar commonSnippet = `\n struct vec5 {x: i32, y: i32, z: i32, w: i32, u: i32};\n struct vec6 {x: i32, y: i32, z: i32, w: i32, u: i32, v: i32};\n\n // Checks whether coordinates lie within the bounds of the shape.\n fn coordsInBounds2D(coord : vec2, shape : vec2) -> bool {\n return all(coord >= vec2(0)) && all(coord < shape);\n }\n fn coordsInBounds3D(coord : vec3, shape : vec3) -> bool {\n return all(coord >= vec3(0)) && all(coord < shape);\n }\n fn coordsInBounds4D(coord : vec4, shape : vec4) -> bool {\n return all(coord >= vec4(0)) && all(coord < shape);\n }\n\n fn getIndexFromCoords1D(coord : i32, shape : i32) -> i32 {\n return coord;\n }\n fn getIndexFromCoords2D(coords : vec2, shape : vec2) -> i32 {\n return dot(coords, vec2(shape.y, 1));\n }\n fn getIndexFromCoords3D(coords : vec3, shape : vec3) -> i32 {\n return dot(coords, vec3(shape.y * shape.z, shape.z, 1));\n }\n fn getIndexFromCoords4D(coords : vec4, shape : vec4) -> i32 {\n return dot(coords, vec4(\n shape.y * shape.z * shape.w, shape.z * shape.w, shape.w, 1));\n }\n fn getIndexFromCoords5D(coords : vec5, shape : vec5) -> i32 {\n let shapeStrides: vec5 = vec5(shape.y * shape.z * shape.w * shape.u, shape.z * shape.w * shape.u, shape.w * shape.u, shape.u, 1);\n return coords.x*shapeStrides.x + coords.y*shapeStrides.y + coords.z*shapeStrides.z + coords.w*shapeStrides.w + coords.u*shapeStrides.u;\n }\n fn getIndexFromCoords6D(coords : vec6, shape : vec6) -> i32 {\n let shapeStrides: vec6 = vec6(shape.y * shape.z * shape.w * shape.u * shape.v, shape.z * shape.w * shape.u * shape.v, shape.w * shape.u * shape.v, shape.u * shape.v, shape.v, 1);\n return coords.x*shapeStrides.x + coords.y*shapeStrides.y + coords.z*shapeStrides.z + coords.w*shapeStrides.w + coords.u*shapeStrides.u + coords.v*shapeStrides.v;\n }\n\n fn idiv(a: i32, b: i32, sign: f32) -> i32 {\n var res: i32 = a / b;\n let modulo: i32 = a % b;\n if (sign < 0. && modulo != 0) {\n res = res - 1;\n }\n return res;\n }\n\n // NaN defination in IEEE 754-1985 is :\n // - sign = either 0 or 1.\n // - biased exponent = all 1 bits.\n // - fraction = anything except all 0 bits (since all 0 bits represents infinity).\n // https://en.wikipedia.org/wiki/IEEE_754-1985#Representation_of_non-numbers\n fn isnan(val: f32) -> bool {\n let floatToUint: u32 = bitcast(val);\n return (floatToUint & 0x7fffffffu) > 0x7f800000u;\n }\n fn isnanVec4(val : vec4) -> vec4 {\n return vec4(isnan(val[0]), isnan(val[1]), isnan(val[2]), isnan(val[3]));\n }\n`;\nfunction getCoordsFromIndexSnippet(shape) {\n const rank = shape.length;\n if (rank <= 1) {\n return `fn getCoordsFromIndex(index : i32) -> i32 { return index; }`;\n }\n const strides = util_exports.computeStrides(shape);\n const dtype = getCoordsDataType2(rank);\n const coords3 = [];\n for (let i2 = 0; i2 < rank; i2++) {\n coords3.push(`d${i2}`);\n }\n if (strides.length === 1) {\n return ` fn getCoordsFromIndex(index : i32) -> vec2 {\n let d0 = index / uniforms.outShapeStrides; let d1 = index - d0 * uniforms.outShapeStrides;\n return vec2(d0, d1);\n }`;\n }\n let snippet;\n snippet = \"var index2 = index;\" + strides.map((_, i2) => {\n const line1 = `let ${coords3[i2]} = index2 / uniforms.outShapeStrides.${getCoordsXYZ(i2)}`;\n const line2 = i2 === strides.length - 1 ? `let ${coords3[i2 + 1]} = index2 - ${coords3[i2]} * uniforms.outShapeStrides.${getCoordsXYZ(i2)}` : `index2 = index2 - ${coords3[i2]} * uniforms.outShapeStrides.${getCoordsXYZ(i2)}`;\n return `${line1}; ${line2};`;\n }).join(\"\");\n return `\n fn getCoordsFromIndex(index : i32) -> ${dtype} {\n ${snippet}\n return ${dtype}(${coords3.join(\",\")});\n }\n `;\n}\nfunction getInputAtCoordsSnippet(inputInfo, isVec4) {\n const texName = inputInfo.name;\n const rank = inputInfo.shape.length;\n const type = getCoordsDataType2(rank);\n const funcName = \"get\" + texName.charAt(0).toUpperCase() + texName.slice(1);\n const dims = [\"d0\", \"d1\", \"d2\", \"d3\", \"d4\", \"d5\"].slice(0, rank);\n const inputs = dims.map((d) => `${d} : i32`).join(\", \");\n if (rank < 1) {\n if (isVec4) {\n return `\n fn ${funcName}() -> vec4 {\n return vec4(${texName}[0]);\n }\n `;\n }\n return `\n fn ${funcName}() ->f32 {\n return f32(${texName}[0]);\n }\n `;\n }\n const shapeStr = `uniforms.${texName.charAt(0).toLowerCase() + texName.slice(1)}Shape`;\n let rankStr = `${rank}D`;\n if (rank === 0) {\n rankStr = \"1D\";\n }\n if (isVec4) {\n return `\n fn ${funcName}(${inputs}) -> vec4 {\n return vec4(${texName}[getIndexFromCoords${rankStr}(${type}(${dims.join(\",\")}),\n ${shapeStr}) / 4]);\n }\n `;\n }\n return `\n fn ${funcName}(${inputs}) -> f32 {\n return f32(${texName}[getIndexFromCoords${rankStr}(${type}(${dims.join(\",\")}),\n ${shapeStr})]);\n }\n `;\n}\nfunction getInputByOutputSnippet(inputInfo, outShape, isVec4, isFlatDispatchLayout) {\n const texName = inputInfo.name;\n const texFuncSnippet = texName.charAt(0).toUpperCase() + texName.slice(1);\n const funcName = \"get\" + texFuncSnippet + \"ByOutput\";\n const inRank = inputInfo.shape.length;\n const outRank = outShape.length;\n const type = getCoordsDataType2(outRank);\n if (util_exports.arraysEqual(inputInfo.shape, outShape) && isFlatDispatchLayout) {\n if (isVec4) {\n return `\n fn ${funcName}Index(globalIndex : i32) -> vec4 {\n return vec4(${texName}[globalIndex]);\n }\n\n fn ${funcName}Coords(coords : ${type}) -> vec4 {\n return vec4(${texName}[${outRank > 1 ? \"getOutputIndexFromCoords(coords)\" : \"coords\"} / 4]);\n }\n `;\n } else {\n return `\n fn ${funcName}Index(globalIndex : i32) -> f32 {\n return f32(${texName}[globalIndex]);\n }\n\n fn ${funcName}Coords(coords : ${type}) -> f32 {\n return f32(${texName}[${outRank > 1 ? \"getOutputIndexFromCoords(coords)\" : \"coords\"}]);\n }\n `;\n }\n }\n const broadcastDims = backend_util_exports.getBroadcastDims(inputInfo.shape, outShape);\n const rankDiff = outRank - inRank;\n let coordsSnippet = \"\";\n if (inRank === 0) {\n if (isVec4) {\n return `\n fn ${funcName}Index(globalIndex : i32) -> vec4 {\n return get${texFuncSnippet}();\n }\n\n fn ${funcName}Coords(coords : ${type}) -> vec4 {\n return get${texFuncSnippet}();\n }\n `;\n }\n return `\n fn ${funcName}Index(globalIndex : i32) -> f32{\n return get${texFuncSnippet}();\n }\n\n fn ${funcName}Coords(coords : ${type}) -> f32{\n return get${texFuncSnippet}();\n }\n `;\n } else {\n if (outRank < 2 && broadcastDims.length >= 1) {\n coordsSnippet = \"coords = 0;\";\n } else {\n coordsSnippet = broadcastDims.map((d) => `coords.${getCoordsXYZ(d + rankDiff)} = 0;`).join(\"\\n\");\n }\n }\n let unpackedCoordsSnippet = \"\";\n if (outRank < 2 && inRank > 0) {\n unpackedCoordsSnippet = \"coords\";\n } else {\n if (outRank > 1) {\n const coordsType = getCoordsDataType2(inRank);\n const coordsValues = inputInfo.shape.map((s2, i2) => `coords.${getCoordsXYZ(i2 + rankDiff)}`).join(\", \");\n unpackedCoordsSnippet = `${coordsType}(${coordsValues})`;\n } else {\n unpackedCoordsSnippet = \"coords\";\n }\n }\n const shapeStr = `uniforms.${texName.charAt(0).toLowerCase() + texName.slice(1)}Shape`;\n const rankStr = `${inRank}D`;\n if (isVec4) {\n return `\n fn ${funcName}Index(globalIndex : i32) -> vec4 {\n var coords = getCoordsFromIndex(globalIndex);\n ${coordsSnippet}\n return ${texName}[getIndexFromCoords${rankStr}(${unpackedCoordsSnippet}, ${shapeStr}) / 4];\n }\n\n fn ${funcName}Coords(coordsIn : ${type}) -> vec4 {\n var coords = coordsIn;\n ${coordsSnippet}\n return ${texName}[getIndexFromCoords${rankStr}(${unpackedCoordsSnippet}, ${shapeStr}) / 4];\n }\n `;\n }\n return `\n fn ${funcName}Index(globalIndex : i32) -> f32 {\n var coords = getCoordsFromIndex(globalIndex);\n ${coordsSnippet}\n return f32(${texName}[getIndexFromCoords${rankStr}(${unpackedCoordsSnippet}, ${shapeStr})]);\n }\n\n fn ${funcName}Coords(coordsIn : ${type}) -> f32 {\n var coords = coordsIn;\n ${coordsSnippet}\n return f32(${texName}[getIndexFromCoords${rankStr}(${unpackedCoordsSnippet}, ${shapeStr})]);\n }\n`;\n}\nfunction getInputSnippet(inputInfo, outShape, isVec4, isFlatDispatchLayout) {\n let res = getInputAtCoordsSnippet(inputInfo, isVec4);\n const inShape = inputInfo.shape;\n if (inShape.length <= outShape.length) {\n res += getInputByOutputSnippet(inputInfo, outShape, isVec4, isFlatDispatchLayout);\n }\n return res;\n}\nfunction getOutputCoordsSnippet(outShape, dispatchLayout) {\n const { x, y = [], z = [] } = dispatchLayout;\n const outRank = outShape.length;\n const rank = x.length + y.length + z.length;\n if (rank !== outRank) {\n return \"\";\n }\n if (x.length === outRank) {\n const dtype2 = getCoordsDataType2(outRank);\n const snippet2 = `fn getOutputCoords() -> ${dtype2}{\n let globalIndex = getGlobalIndex();\n return getCoordsFromIndex(globalIndex);\n }\n `;\n return snippet2;\n }\n let gatherDimensionsStr = \"\";\n const dims = [x, y, z];\n for (let i2 = 0; i2 < dims.length; i2++) {\n const arr = dims[i2];\n if (arr.length === 0) {\n continue;\n }\n if (arr.length === 1) {\n gatherDimensionsStr += `let d${arr[0]} = i32(globalId[${i2}]);`;\n } else {\n const strides = symbolicallyComputeStrides2(arr, \"uniforms.outShape\");\n gatherDimensionsStr += `var index${i2} = i32(globalId[${i2}]);`;\n for (let j = 0; j < strides.length; j++) {\n gatherDimensionsStr += `let d${arr[j]} = index${i2} / ${strides[j]};`;\n if (j === strides.length - 1) {\n gatherDimensionsStr += `let d${arr[j + 1]} = index${i2} - d${arr[j]} * ${strides[j]};`;\n } else {\n gatherDimensionsStr += `index${i2} = index${i2} - d${arr[j]} * ${strides[j]};`;\n }\n }\n }\n }\n const dimensions = [];\n for (let i2 = 0; i2 < rank; i2++) {\n dimensions.push(`d${i2}`);\n }\n const dtype = getCoordsDataType2(rank);\n let snippet = `fn getOutputCoords() -> ${dtype} {\n ${gatherDimensionsStr}\n`;\n if (dimensions.length === 0) {\n snippet += `return ${dtype}(0); }`;\n } else {\n snippet += `return ${dtype}(${dimensions.join(\",\")}); }`;\n }\n return snippet;\n}\nfunction getOutputIndexFromCoordsSnippet(outRank) {\n let snippet = \"\";\n switch (outRank) {\n case 0:\n case 1:\n snippet += `\n fn getOutputIndexFromCoords(coords : i32) -> i32 {\n return coords;\n }\n `;\n break;\n case 2:\n snippet += `\n fn getOutputIndexFromCoords(coords : vec2) -> i32 {\n return dot(coords, vec2(uniforms.outShapeStrides, 1));\n }\n `;\n break;\n case 3:\n snippet += `\n fn getOutputIndexFromCoords(coords : vec3) -> i32 {\n return dot(coords, vec3(uniforms.outShapeStrides.x, uniforms.outShapeStrides.y, 1));\n }\n `;\n break;\n case 4:\n snippet += `\n fn getOutputIndexFromCoords(coords : vec4) -> i32 {\n return dot(coords, vec4(\n uniforms.outShapeStrides.x, uniforms.outShapeStrides.y, uniforms.outShapeStrides.z, 1));\n }\n `;\n break;\n case 5:\n snippet += `\n fn getOutputIndexFromCoords(coords : vec5) -> i32 {\n return coords.x * uniforms.outShapeStrides.x +\n coords.y * uniforms.outShapeStrides.y +\n coords.z * uniforms.outShapeStrides.z +\n coords.w * uniforms.outShapeStrides.w +\n coords.u;\n }\n `;\n break;\n case 6:\n snippet += `\n fn getOutputIndexFromCoords(coords : vec6) -> i32 {\n return coords.x * uniforms.outShapeStrides.x +\n coords.y * uniforms.outShapeStrides.y +\n coords.z * uniforms.outShapeStrides.z +\n coords.w * uniforms.outShapeStrides.w +\n coords.u * uniforms.outShapeStrides.u +\n coords.v;\n }\n `;\n break;\n default:\n util_exports.assert(false, () => `Unsupported ${outRank}D shape`);\n break;\n }\n return snippet;\n}\nfunction isFlatDispatch(program) {\n return program.dispatch[1] === 1 && program.dispatch[2] === 1;\n}\nfunction mapToWgslTypes(type, isVec4) {\n if (type === \"float32\") {\n return isVec4 ? \"vec4\" : \"f32\";\n } else if (type === \"int32\") {\n return isVec4 ? \"vec4\" : \"i32\";\n } else if (type === \"bool\") {\n return isVec4 ? \"vec4\" : \"i32\";\n }\n return type;\n}\nfunction setOutputSnippet(outShape, outBufferType, isVec4) {\n const outRank = outShape.length;\n const wgslType = mapToWgslTypes(outBufferType, isVec4);\n let snippet;\n if (isVec4) {\n snippet = `fn setOutputAtIndex(flatIndex : i32, value : vec4) {\n result[flatIndex] = ${wgslType}(value);\n }\n fn setOutputAtIndexI32(flatIndex : i32, value : vec4) {\n result[flatIndex] = ${wgslType}(value);\n }`;\n } else {\n snippet = `fn setOutputAtIndex(flatIndex : i32, value : f32) {\n result[flatIndex] = ${wgslType}(value);\n }\n fn setOutputAtIndexI32(flatIndex : i32, value : i32) {\n result[flatIndex] = ${wgslType}(value);\n }`;\n }\n if (outRank >= 2) {\n const dims = [\"d0\", \"d1\", \"d2\", \"d3\", \"d4\", \"d5\"].slice(0, outRank);\n const type = getCoordsDataType2(outRank);\n if (isVec4) {\n snippet += `\n fn setOutputAtCoords(${dims.map((d) => `${d} : i32`).join(\", \")}, value : vec4) {\n let flatIndex = getOutputIndexFromCoords(${type}(${dims.join(\", \")}));\n setOutputAtIndex(flatIndex / 4, value);\n }\n fn setOutputAtCoordsI32(${dims.map((d) => `${d} : i32`).join(\", \")}, value : vec4) {\n let flatIndex = getOutputIndexFromCoords(${type}(${dims.join(\", \")}));\n setOutputAtIndexI32(flatIndex / 4, value);\n }\n `;\n } else {\n snippet += `\n fn setOutputAtCoords(${dims.map((d) => `${d} : i32`).join(\", \")}, value : f32) {\n let flatIndex = getOutputIndexFromCoords(${type}(${dims.join(\", \")}));\n setOutputAtIndex(flatIndex, value);\n }\n fn setOutputAtCoordsI32(${dims.map((d) => `${d} : i32`).join(\", \")}, value : i32) {\n let flatIndex = getOutputIndexFromCoords(${type}(${dims.join(\", \")}));\n setOutputAtIndexI32(flatIndex, value);\n }\n `;\n }\n }\n return snippet;\n}\nfunction insertAlignment(uniformShader) {\n const curInsertRe = /(\\w+)\\s*:\\s*vec(5|6)/g;\n uniformShader = uniformShader.replace(curInsertRe, (match) => {\n return \"@align(16) \" + match;\n });\n const preInsertRe = /vec(5|6)\\s*,\\s*(\\w+)/g;\n uniformShader = uniformShader.replace(preInsertRe, (_, p1, p2) => {\n return `vec${p1}, @align(16) ${p2}`;\n });\n return uniformShader;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/webgpu_util.js\nvar webgpu_util_exports = {};\n__export(webgpu_util_exports, {\n ArrayBufferToTypedArray: () => ArrayBufferToTypedArray,\n GPUBytesPerElement: () => GPUBytesPerElement,\n MatMulProgramType: () => MatMulProgramType,\n computeDispatch: () => computeDispatch,\n computeWorkGroupInfoForMatMul: () => computeWorkGroupInfoForMatMul,\n computeWorkGroupSizeForConv2d: () => computeWorkGroupSizeForConv2d,\n computeWorkPerThreadForConv2d: () => computeWorkPerThreadForConv2d,\n flatDispatchLayout: () => flatDispatchLayout,\n isWebGPUSupported: () => isWebGPUSupported,\n tilesFitEvenlyIntoShape: () => tilesFitEvenlyIntoShape\n});\nvar arrayProduct = (arr) => {\n let product = 1;\n for (let i2 = 0; i2 < arr.length; i2++) {\n product *= arr[i2];\n }\n return product;\n};\nfunction tilesFitEvenlyIntoShape(tileSize, shape) {\n if (tileSize.length !== shape.length) {\n throw new Error(`Cannot compute whether rank ${tileSize.length} tiles fit evenly into rank ${shape.length} shape - ranks must match.`);\n }\n return shape.every((dim, dimIdx) => dim % tileSize[dimIdx] === 0);\n}\nfunction computeDispatch(layout, outputShape, workGroupSize = [1, 1, 1], elementsPerThread = [1, 1, 1]) {\n const [dispatchX, dispatchY, dispatchZ] = [\n Math.ceil(arrayProduct(layout.x.map((d) => outputShape[d])) / (workGroupSize[0] * elementsPerThread[0])),\n layout.y ? Math.ceil(arrayProduct(layout.y.map((d) => outputShape[d])) / (workGroupSize[1] * elementsPerThread[1])) : 1,\n layout.z ? Math.ceil(arrayProduct(layout.z.map((d) => outputShape[d])) / (workGroupSize[2] * elementsPerThread[2])) : 1\n ];\n return [dispatchX, dispatchY, dispatchZ];\n}\nfunction computeWorkGroupInfoForMatMul(dimAOuter, dimInner, dimBOuter, transposeA = false) {\n const workGroupSize = [8, 8, 1];\n const elementsPerThread = [4, 4, 1];\n if (!transposeA) {\n if (dimAOuter <= 8) {\n elementsPerThread[1] = 1;\n }\n if (dimInner <= 16 && dimBOuter <= 16) {\n workGroupSize[0] = 4;\n }\n }\n return { workGroupSize, elementsPerThread };\n}\nfunction computeWorkGroupSizeForConv2d(layout, outputShape, isVec4 = false) {\n if (isVec4) {\n return [8, 8, 1];\n }\n const dim0 = arrayProduct(layout.x.map((d) => outputShape[d]));\n const dim1 = arrayProduct(layout.y.map((d) => outputShape[d]));\n if (dim0 <= 4) {\n return [4, 16, 1];\n }\n if (dim1 <= 4) {\n return [16, 4, 1];\n }\n return [16, 16, 1];\n}\nfunction computeWorkPerThreadForConv2d(layout, outputShape, isVec4 = false) {\n if (isVec4) {\n return [4, 4, 1];\n }\n const dim0 = arrayProduct(layout.x.map((d) => outputShape[d]));\n const dim1 = arrayProduct(layout.y.map((d) => outputShape[d]));\n if (dim0 <= 4) {\n return [1, 2, 1];\n }\n if (dim1 <= 4) {\n return [2, 1, 1];\n }\n return [2, 2, 1];\n}\nfunction flatDispatchLayout(shape) {\n return { x: shape.map((d, i2) => i2) };\n}\nfunction GPUBytesPerElement(dtype) {\n if (dtype === \"float32\" || dtype === \"int32\" || dtype === \"bool\" || dtype === \"string\") {\n return 4;\n } else if (dtype === \"complex64\") {\n return 8;\n } else {\n throw new Error(`Unknown dtype ${dtype}`);\n }\n}\nfunction ArrayBufferToTypedArray(data, dtype) {\n if (dtype === \"float32\") {\n return new Float32Array(data);\n } else if (dtype === \"int32\") {\n return new Int32Array(data);\n } else if (dtype === \"bool\" || dtype === \"string\") {\n return Uint8Array.from(new Int32Array(data));\n } else {\n throw new Error(`Unknown dtype ${dtype}`);\n }\n}\nfunction isWebGPUSupported() {\n return (typeof window !== \"undefined\" || typeof WorkerGlobalScope !== \"undefined\") && !!navigator.gpu;\n}\nvar MatMulProgramType;\n(function(MatMulProgramType2) {\n MatMulProgramType2[MatMulProgramType2[\"MatMulReduceProgram\"] = 0] = \"MatMulReduceProgram\";\n MatMulProgramType2[MatMulProgramType2[\"MatMulSplitKProgram\"] = 1] = \"MatMulSplitKProgram\";\n MatMulProgramType2[MatMulProgramType2[\"MatMulSmallOutputSizeProgram\"] = 2] = \"MatMulSmallOutputSizeProgram\";\n MatMulProgramType2[MatMulProgramType2[\"MatMulPackedProgram\"] = 3] = \"MatMulPackedProgram\";\n MatMulProgramType2[MatMulProgramType2[\"MatMulMax\"] = 4] = \"MatMulMax\";\n})(MatMulProgramType || (MatMulProgramType = {}));\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/backend_webgpu.js\nvar CPU_HANDOFF_SIZE_THRESHOLD2 = env().getNumber(\"WEBGPU_CPU_HANDOFF_SIZE_THRESHOLD\");\nvar reshapeDispatch = (device, program) => {\n const MAX_COMPUTE_PER_DIMENSION_DISPATCH_SIZE = device.limits.maxComputeWorkgroupsPerDimension;\n const layout = program[\"dispatchLayout\"];\n const dispatch = program[\"dispatch\"];\n if (dispatch.every((d) => d <= MAX_COMPUTE_PER_DIMENSION_DISPATCH_SIZE)) {\n return dispatch;\n }\n util_exports.assert(dispatch[0] > MAX_COMPUTE_PER_DIMENSION_DISPATCH_SIZE && layout.y === void 0 && layout.z === void 0, () => \"Dispatch size exceeds WebGPU limits in Y or Z dimension.\");\n let dispatchAverage = Math.ceil(Math.sqrt(dispatch[0]));\n if (dispatchAverage > MAX_COMPUTE_PER_DIMENSION_DISPATCH_SIZE) {\n dispatchAverage = Math.ceil(Math.cbrt(dispatch[0]));\n util_exports.assert(dispatchAverage <= MAX_COMPUTE_PER_DIMENSION_DISPATCH_SIZE, () => \"Total dispatch size exceeds WebGPU maximum.\");\n return [dispatchAverage, dispatchAverage, dispatchAverage];\n } else {\n return [dispatchAverage, dispatchAverage, 1];\n }\n};\nvar WebGPUBackend = class extends KernelBackend {\n constructor(device, adapterInfo) {\n super();\n this.commandQueueOwnedIds = /* @__PURE__ */ new WeakSet();\n this.dispatchNumberInEncoder = 0;\n this.disposed = false;\n this.downloadWaitMs = 0;\n this.tensorDataPendingDisposal = [];\n this.stagingPendingDisposal = [];\n this.uniformPendingDisposal = [];\n this.uploadWaitMs = 0;\n if (!isWebGPUSupported()) {\n throw new Error(\"WebGPU is not supported on this device\");\n }\n this.pipelineCache = {};\n this.device = device;\n this.queue = device.queue;\n this.currentCommandEncoder = null;\n this.currentComputePass = null;\n this.supportTimeQuery = device.features.has(\"timestamp-query\");\n this.adapterInfo = new AdapterInfo(adapterInfo);\n this.bufferManager = new BufferManager(this.device);\n this.textureManager = new TextureManager2(this.device);\n this.tensorMap = new DataStorage(this, engine());\n if (this.supportTimeQuery) {\n this.querySet = this.device.createQuerySet({\n type: \"timestamp\",\n count: 2\n });\n }\n if (env().getBool(\"WEBGPU_USE_PROFILE_TOOL\")) {\n this.dummyCanvas = document.createElement(\"canvas\");\n this.dummyCanvas.width = 1;\n this.dummyCanvas.height = 1;\n this.dummyContext = this.dummyCanvas.getContext(\"webgpu\");\n this.dummyContext.configure({\n device,\n format: \"bgra8unorm\"\n });\n document.body.appendChild(this.dummyCanvas);\n }\n }\n nextDataId() {\n return WebGPUBackend.nextDataId++;\n }\n floatPrecision() {\n return 32;\n }\n defaultGpuBufferUsage() {\n return GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_SRC | GPUBufferUsage.COPY_DST;\n }\n disposeData(dataId, force = false) {\n if (this.tensorDataPendingDisposal.indexOf(dataId) >= 0) {\n return false;\n }\n if (!this.tensorMap.has(dataId)) {\n return true;\n }\n const tensorData = this.tensorMap.get(dataId);\n this.decRef(dataId);\n if (!force && tensorData.refCount > 0) {\n return false;\n }\n if (this.commandQueueOwnedIds.has(dataId)) {\n this.tensorDataPendingDisposal.push(dataId);\n return false;\n }\n const { complexTensorInfos } = this.tensorMap.get(dataId);\n if (complexTensorInfos != null) {\n this.disposeData(complexTensorInfos.real.dataId, force);\n this.disposeData(complexTensorInfos.imag.dataId, force);\n }\n this.releaseResource(dataId);\n this.tensorMap.delete(dataId);\n return true;\n }\n memory() {\n return {\n numBytesInGPU: this.bufferManager.numBytesUsed,\n numBytesAllocatedInGPU: this.bufferManager.numBytesAllocated,\n unreliable: false\n };\n }\n releaseResource(dataId) {\n const tensorData = this.tensorMap.get(dataId);\n if (!tensorData || !tensorData.resourceInfo) {\n return;\n }\n if (\"texture\" in tensorData.resourceInfo) {\n const textureInfo = tensorData.resourceInfo;\n if (textureInfo.texture instanceof GPUTexture) {\n this.textureManager.releaseTexture(textureInfo.texture, textureInfo.width, textureInfo.height, textureInfo.format, textureInfo.usage);\n }\n textureInfo.texture = null;\n } else {\n const bufferInfo = tensorData.resourceInfo;\n this.bufferManager.releaseBuffer(bufferInfo.buffer, bufferInfo.size, bufferInfo.usage);\n bufferInfo.buffer = null;\n }\n tensorData.resourceInfo = null;\n }\n refCount(dataId) {\n if (this.tensorMap.has(dataId)) {\n const tensorData = this.tensorMap.get(dataId);\n return tensorData.refCount;\n }\n return 0;\n }\n incRef(dataId) {\n const tensorData = this.tensorMap.get(dataId);\n tensorData.refCount++;\n }\n decRef(dataId) {\n if (this.tensorMap.has(dataId)) {\n const tensorData = this.tensorMap.get(dataId);\n tensorData.refCount--;\n }\n }\n write(values, shape, dtype) {\n if (dtype === \"complex64\" && values != null) {\n throw new Error(`Cannot write to a complex64 dtype. Please use tf.complex(real, imag).`);\n }\n const dataId = { id: this.nextDataId() };\n this.tensorMap.set(dataId, { dtype, shape, values, refCount: 1 });\n return dataId;\n }\n move(dataId, values, shape, dtype, refCount) {\n if (dtype === \"complex64\") {\n throw new Error(`Cannot write to a complex64 dtype. Please use tf.complex(real, imag).`);\n }\n this.tensorMap.set(dataId, { dtype, shape, values, refCount });\n }\n submitQueue() {\n this.ensureComputePassEnded();\n this.queue.submit([this.currentCommandEncoder.finish()]);\n this.currentCommandEncoder = null;\n this.dispatchNumberInEncoder = 0;\n this.commandQueueOwnedIds = /* @__PURE__ */ new WeakSet();\n this.tensorDataPendingDisposal.forEach((d) => {\n this.releaseResource(d);\n this.tensorMap.delete(d);\n });\n this.uniformPendingDisposal.forEach((d) => this.bufferManager.releaseBuffer(d.buffer, d.size, d.usage));\n this.stagingPendingDisposal.forEach((d) => this.bufferManager.releaseUploadBuffer(d.buffer, d.size, d.usage));\n this.tensorDataPendingDisposal = [];\n this.uniformPendingDisposal = [];\n this.stagingPendingDisposal = [];\n }\n ensureCommandEncoderReady() {\n if (!this.currentCommandEncoder) {\n this.currentCommandEncoder = this.device.createCommandEncoder();\n }\n }\n ensureComputePassEnded() {\n if (this.currentComputePass) {\n this.currentComputePass.end();\n this.currentComputePass = null;\n }\n }\n getComputePass() {\n if (!this.currentComputePass) {\n this.currentComputePass = this.currentCommandEncoder.beginComputePass();\n }\n return this.currentComputePass;\n }\n async getBufferData(buffer2, size) {\n const staging = this.bufferManager.acquireBuffer(size, GPUBufferUsage.COPY_DST | GPUBufferUsage.MAP_READ);\n this.ensureCommandEncoderReady();\n this.ensureComputePassEnded();\n this.currentCommandEncoder.copyBufferToBuffer(buffer2, 0, staging, 0, size);\n this.submitQueue();\n await staging.mapAsync(GPUMapMode.READ);\n const values = staging.getMappedRange().slice(0);\n staging.unmap();\n if (staging != null) {\n this.bufferManager.releaseBuffer(staging, size, GPUBufferUsage.COPY_DST | GPUBufferUsage.MAP_READ);\n }\n if (env().getBool(\"WEBGPU_USE_PROFILE_TOOL\")) {\n util_exports.assert(this.dummyContext !== void 0, () => `Fail to get context for profiling tool`);\n this.dummyContext.getCurrentTexture();\n }\n return values;\n }\n convertAndCacheOnCPU(dataId, data) {\n const tensorData = this.tensorMap.get(dataId);\n this.releaseResource(dataId);\n tensorData.values = data;\n return tensorData.values;\n }\n readSync(dataId) {\n const tensorData = this.tensorMap.get(dataId);\n const { values } = tensorData;\n if (values == null) {\n throw new Error(\"WebGPU readSync is only available for CPU-resident tensors.\");\n }\n return values;\n }\n async read(dataId) {\n if (!this.tensorMap.has(dataId)) {\n throw new Error(`Tensor ${dataId} was not registered!`);\n }\n const tensorData = this.tensorMap.get(dataId);\n const { values } = tensorData;\n if (values != null) {\n return this.convertAndCacheOnCPU(dataId, values);\n }\n let vals;\n if (tensorData.dtype === \"complex64\") {\n const ps = await Promise.all([\n this.read(tensorData.complexTensorInfos.real.dataId),\n this.read(tensorData.complexTensorInfos.imag.dataId)\n ]);\n const realValues = ps[0];\n const imagValues = ps[1];\n vals = backend_util_exports.mergeRealAndImagArrays(realValues, imagValues);\n } else {\n const bufferInfo = tensorData.resourceInfo;\n const data = await this.getBufferData(bufferInfo.buffer, bufferInfo.size);\n vals = ArrayBufferToTypedArray(data, tensorData.dtype);\n }\n this.convertAndCacheOnCPU(dataId, vals);\n return vals;\n }\n readToGPU(dataId) {\n const srcTensorData = this.tensorMap.get(dataId);\n const { values, dtype, shape, resourceInfo } = srcTensorData;\n if (dtype === \"complex64\") {\n throw new Error(\"Does not support reading buffer for complex64 dtype.\");\n }\n if (resourceInfo == null) {\n if (values != null) {\n throw new Error(\"Data is not on GPU but on CPU.\");\n } else {\n throw new Error(\"There is no data on GPU or CPU.\");\n }\n }\n const size = resourceInfo.size;\n const buffer2 = this.bufferManager.acquireBuffer(size, resourceInfo.usage);\n this.ensureCommandEncoderReady();\n this.ensureComputePassEnded();\n this.currentCommandEncoder.copyBufferToBuffer(resourceInfo.buffer, 0, buffer2, 0, size);\n this.submitQueue();\n const tensorInfo = this.makeTensorInfo(shape, dtype);\n const tensorRef = engine().makeTensorFromTensorInfo(tensorInfo);\n const tensorData = this.tensorMap.get(tensorInfo.dataId);\n tensorData.resourceInfo = { size, usage: this.defaultGpuBufferUsage(), buffer: buffer2 };\n return { tensorRef, buffer: buffer2, bufSize: size };\n }\n bufferSync(t2) {\n const data = this.readSync(t2.dataId);\n if (t2.dtype === \"string\") {\n try {\n const strings = data.map((d) => util_exports.decodeString(d));\n return buffer(t2.shape, t2.dtype, strings);\n } catch (_a) {\n throw new Error(\"Failed to decode encoded string bytes into utf-8\");\n }\n }\n return buffer(t2.shape, t2.dtype, data);\n }\n async time(f) {\n if (!this.supportTimeQuery) {\n console.warn(`This device doesn't support timestamp-query extension. Start Chrome browser with flag --disable-dawn-features=disallow_unsafe_apis then try again. Otherwise, zero will be shown for the kernel time when profiling mode is enabled. Using performance.now is not workable for webgpu since it doesn't support synchronous data read from GPU.`);\n }\n const oldActiveTimers = this.activeTimers;\n const newActiveTimers = [];\n let outerMostTime = false;\n if (this.programTimersStack == null) {\n this.programTimersStack = newActiveTimers;\n outerMostTime = true;\n } else {\n this.activeTimers.push(newActiveTimers);\n }\n this.activeTimers = newActiveTimers;\n f();\n const flattenedActiveTimerQueries = util_exports.flatten(this.activeTimers.map((d) => d.query)).filter((d) => d != null);\n const flattenedActiveTimerNames = util_exports.flatten(this.activeTimers.map((d) => d.name)).filter((d) => d != null);\n this.activeTimers = oldActiveTimers;\n if (outerMostTime) {\n this.programTimersStack = null;\n }\n const res = {\n uploadWaitMs: this.uploadWaitMs,\n downloadWaitMs: this.downloadWaitMs,\n kernelMs: null,\n wallMs: null\n };\n const kernelMs = await Promise.all(flattenedActiveTimerQueries);\n res[\"kernelMs\"] = util_exports.sum(kernelMs);\n res[\"getExtraProfileInfo\"] = () => kernelMs.map((d, i2) => ({ name: flattenedActiveTimerNames[i2], ms: d })).map((d) => `${d.name}: ${d.ms}`).join(\", \");\n this.uploadWaitMs = 0;\n this.downloadWaitMs = 0;\n return res;\n }\n makeTensorInfo(shape, dtype, values) {\n if (dtype === \"string\" && values != null && values.length > 0 && util_exports.isString(values[0])) {\n values = values.map((d) => util_exports.encodeString(d));\n }\n const dataId = this.write(values, shape, dtype);\n return { dataId, shape, dtype };\n }\n tensorToBinding(tensor2) {\n if (!tensor2) {\n return null;\n }\n const tensorData = this.tensorMap.get(tensor2.dataId);\n if (\"texture\" in tensorData.resourceInfo) {\n const info = tensorData.resourceInfo;\n if (info.texture instanceof GPUExternalTexture) {\n return info.texture;\n } else {\n return info.texture.createView();\n }\n }\n const bufferInfo = tensorData.resourceInfo;\n return { offset: 0, size: bufferInfo.size, buffer: bufferInfo.buffer };\n }\n async getQueryTime(query) {\n if (this.supportTimeQuery) {\n return this.getTimeFromQuerySet(query);\n } else {\n return 0;\n }\n }\n uploadToGPU(dataId) {\n const tensorData = this.tensorMap.get(dataId);\n if (tensorData.resourceInfo) {\n return;\n }\n const size = GPUBytesPerElement(tensorData.dtype) * util_exports.sizeFromShape(tensorData.shape);\n const buffer2 = this.bufferManager.acquireBuffer(size, this.defaultGpuBufferUsage());\n tensorData.resourceInfo = { size, usage: this.defaultGpuBufferUsage(), buffer: buffer2 };\n if (tensorData.values) {\n const stagingBuffer = this.bufferManager.acquireUploadBuffer(size, GPUBufferUsage.MAP_WRITE | GPUBufferUsage.COPY_SRC);\n const arrayBuffer = stagingBuffer.getMappedRange();\n if (tensorData.dtype === \"int32\" || tensorData.dtype === \"bool\") {\n new Int32Array(arrayBuffer).set(tensorData.values);\n } else {\n new Float32Array(arrayBuffer).set(tensorData.values);\n }\n stagingBuffer.unmap();\n this.ensureCommandEncoderReady();\n this.ensureComputePassEnded();\n this.currentCommandEncoder.copyBufferToBuffer(stagingBuffer, 0, buffer2, 0, size);\n const stagingInfo = {\n size,\n usage: GPUBufferUsage.MAP_WRITE | GPUBufferUsage.COPY_SRC,\n buffer: stagingBuffer\n };\n this.stagingPendingDisposal.push(stagingInfo);\n }\n }\n makeUniforms(programUniform) {\n let currentOffset = 0;\n let preLength = 0;\n const offsets = [];\n programUniform.forEach((d) => {\n if (d.data.length === 0) {\n d.data = [1];\n }\n let baseAlignment;\n switch (d.data.length) {\n case 1:\n baseAlignment = 4;\n break;\n case 2:\n baseAlignment = 8;\n break;\n case 3:\n baseAlignment = 16;\n break;\n case 4:\n baseAlignment = 16;\n break;\n case 5:\n baseAlignment = 16;\n break;\n case 6:\n baseAlignment = 16;\n break;\n default:\n util_exports.assert(false, () => `Unsupported ${d.data.length}D shape`);\n }\n if (preLength === 5 || preLength === 6) {\n baseAlignment = 16;\n }\n currentOffset = Math.ceil(currentOffset / baseAlignment) * baseAlignment;\n preLength = d.data.length;\n offsets.push(currentOffset);\n currentOffset += d.data.length * 4;\n });\n const arrayBuffer = new ArrayBuffer(currentOffset);\n programUniform.forEach((d, i2) => {\n const offset = offsets[i2];\n if (d.type === \"int32\") {\n new Int32Array(arrayBuffer, offset, d.data.length).set(d.data);\n } else if (d.type === \"uint32\") {\n new Uint32Array(arrayBuffer, offset, d.data.length).set(d.data);\n } else {\n new Float32Array(arrayBuffer, offset, d.data.length).set(d.data);\n }\n });\n const uniformBuffer = this.bufferManager.acquireBuffer(currentOffset, GPUBufferUsage.COPY_DST | GPUBufferUsage.UNIFORM);\n this.queue.writeBuffer(uniformBuffer, 0, arrayBuffer, 0, currentOffset);\n const uniformInfo = {\n size: currentOffset,\n usage: GPUBufferUsage.COPY_DST | GPUBufferUsage.UNIFORM,\n buffer: uniformBuffer\n };\n this.uniformPendingDisposal.push(uniformInfo);\n return { offset: 0, size: currentOffset, buffer: uniformBuffer };\n }\n runWebGPUProgram(program, inputs, outputDtype, programDefinedUniform, output) {\n if (!output) {\n output = this.makeTensorInfo(program.outputShape, outputDtype);\n }\n if (util_exports.sizeFromShape(output.shape) === 0) {\n this.tensorMap.get(output.dataId).values = util_exports.getTypedArrayFromDType(output.dtype, 0);\n return output;\n }\n this.uploadToGPU(output.dataId);\n program.dispatch = reshapeDispatch(this.device, program);\n let programUniform = [];\n let bufferShapes = [];\n if (!program.isFromPixels) {\n programUniform.push({ type: \"float32\", data: [NaN] });\n bufferShapes = inputs.concat(output).map((d) => d.shape);\n const uniformsType = \"int32\";\n bufferShapes.map((d) => {\n programUniform.push({ type: uniformsType, data: d });\n });\n const strides = util_exports.computeStrides(output.shape);\n programUniform.push({ type: uniformsType, data: strides });\n if (program.size) {\n const size = util_exports.sizeFromShape(program.outputShape);\n programUniform.push({ type: uniformsType, data: [program.isVec4 ? size / 4 : size] });\n }\n }\n const inputsData = inputs.map((input2, i2) => {\n if (input2.dtype === \"complex64\") {\n throw new Error(`GPGPUProgram does not support complex64 input. For complex64 dtypes, please separate the program into real and imaginary parts.`);\n }\n this.uploadToGPU(input2.dataId);\n return {\n dtype: this.tensorMap.get(input2.dataId).dtype,\n shape: input2.shape,\n name: program.variableNames[i2]\n };\n });\n const key = makeShaderKey2(program, bufferShapes, inputsData, output);\n let pipeline;\n if (key in this.pipelineCache) {\n pipeline = this.pipelineCache[key];\n } else {\n pipeline = compileProgram2(this.device, program, inputsData, output);\n this.pipelineCache[key] = pipeline;\n }\n if (programDefinedUniform) {\n programUniform = [...programUniform, ...programDefinedUniform];\n }\n const bindings = [\n this.tensorToBinding(output),\n ...inputs.map((t2) => this.tensorToBinding(t2)),\n this.makeUniforms(programUniform)\n ];\n const bindGroup = this.device.createBindGroup({\n layout: pipeline.getBindGroupLayout(0),\n entries: bindings.map((b, i2) => ({ binding: i2, resource: b }))\n });\n this.ensureCommandEncoderReady();\n const pass = this.getComputePass();\n const shouldTimeProgram = this.activeTimers != null;\n if (shouldTimeProgram) {\n if (this.supportTimeQuery) {\n pass.writeTimestamp(this.querySet, 0);\n }\n }\n pass.setPipeline(pipeline);\n pass.setBindGroup(0, bindGroup);\n pass.dispatchWorkgroups(program.dispatch[0], program.dispatch[1], program.dispatch[2]);\n if (shouldTimeProgram) {\n if (this.supportTimeQuery) {\n pass.writeTimestamp(this.querySet, 1);\n }\n }\n this.dispatchNumberInEncoder++;\n inputs.forEach((input2) => {\n this.commandQueueOwnedIds.add(input2.dataId);\n });\n this.commandQueueOwnedIds.add(output.dataId);\n if (env().get(\"WEBGPU_DEFERRED_SUBMIT_BATCH_SIZE\") <= this.dispatchNumberInEncoder) {\n this.submitQueue();\n }\n if (shouldTimeProgram) {\n this.activeTimers.push({\n name: program.constructor.name,\n query: this.getQueryTime(this.querySet)\n });\n }\n return output;\n }\n async getTimeFromQuerySet(querySet) {\n const queryBuffer = this.bufferManager.acquireBuffer(16, GPUBufferUsage.COPY_SRC | GPUBufferUsage.QUERY_RESOLVE);\n const dst = this.bufferManager.acquireBuffer(16, GPUBufferUsage.MAP_READ | GPUBufferUsage.COPY_DST);\n this.ensureCommandEncoderReady();\n this.ensureComputePassEnded();\n this.currentCommandEncoder.resolveQuerySet(querySet, 0, 2, queryBuffer, 0);\n this.currentCommandEncoder.copyBufferToBuffer(queryBuffer, 0, dst, 0, 16);\n this.submitQueue();\n await dst.mapAsync(GPUMapMode.READ);\n const arrayBuf = new BigUint64Array(dst.getMappedRange());\n const timeElapsedNanos = Number(arrayBuf[1] - arrayBuf[0]);\n dst.unmap();\n this.bufferManager.releaseBuffer(dst, 16, GPUBufferUsage.MAP_READ | GPUBufferUsage.COPY_DST);\n this.bufferManager.releaseBuffer(queryBuffer, 16, GPUBufferUsage.COPY_SRC | GPUBufferUsage.QUERY_RESOLVE);\n return timeElapsedNanos / 1e6;\n }\n shouldExecuteOnCPU(inputs, sizeThreshold = CPU_HANDOFF_SIZE_THRESHOLD2) {\n return env().getBool(\"WEBGPU_CPU_FORWARD\") && inputs.every((input2) => this.tensorMap.get(input2.dataId).resourceInfo == null && util_exports.sizeFromShape(input2.shape) < sizeThreshold);\n }\n numDataIds() {\n return this.tensorMap.numDataIds() - this.tensorDataPendingDisposal.length;\n }\n dispose() {\n if (this.disposed) {\n return;\n }\n this.bufferManager.dispose();\n this.textureManager.dispose();\n this.disposed = true;\n }\n};\nWebGPUBackend.nextDataId = 0;\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/base.js\nif (isWebGPUSupported()) {\n registerBackend(\"webgpu\", async () => {\n env().set(\"CHECK_COMPUTATION_FOR_ERRORS\", false);\n const gpuDescriptor = {\n powerPreference: env().get(\"WEBGPU_USE_LOW_POWER_GPU\") ? \"low-power\" : \"high-performance\"\n };\n const adapter = await navigator.gpu.requestAdapter(gpuDescriptor);\n const adapterLimits = adapter.limits;\n const deviceDescriptor = {};\n const supportTimeQuery = adapter.features.has(\"timestamp-query\");\n deviceDescriptor.requiredLimits = {\n \"maxComputeWorkgroupStorageSize\": adapterLimits.maxComputeWorkgroupStorageSize,\n \"maxComputeWorkgroupsPerDimension\": adapterLimits.maxComputeWorkgroupsPerDimension,\n \"maxStorageBufferBindingSize\": adapterLimits.maxStorageBufferBindingSize\n };\n if (supportTimeQuery) {\n deviceDescriptor.requiredFeatures = [\"timestamp-query\"];\n }\n const device = await adapter.requestDevice(deviceDescriptor);\n const adapterInfo = await adapter.requestAdapterInfo();\n return new WebGPUBackend(device, adapterInfo);\n }, 3);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/binary_op_util.js\nvar BinaryOpType;\n(function(BinaryOpType2) {\n BinaryOpType2[BinaryOpType2[\"MUL\"] = 0] = \"MUL\";\n BinaryOpType2[BinaryOpType2[\"ADD\"] = 1] = \"ADD\";\n BinaryOpType2[BinaryOpType2[\"ATAN2\"] = 2] = \"ATAN2\";\n BinaryOpType2[BinaryOpType2[\"SUB\"] = 3] = \"SUB\";\n BinaryOpType2[BinaryOpType2[\"DIV\"] = 4] = \"DIV\";\n BinaryOpType2[BinaryOpType2[\"EQUAL\"] = 5] = \"EQUAL\";\n BinaryOpType2[BinaryOpType2[\"GREATER\"] = 6] = \"GREATER\";\n BinaryOpType2[BinaryOpType2[\"GREATER_EQUAL\"] = 7] = \"GREATER_EQUAL\";\n BinaryOpType2[BinaryOpType2[\"LESS\"] = 8] = \"LESS\";\n BinaryOpType2[BinaryOpType2[\"LESS_EQUAL\"] = 9] = \"LESS_EQUAL\";\n BinaryOpType2[BinaryOpType2[\"LOGICAL_AND\"] = 10] = \"LOGICAL_AND\";\n BinaryOpType2[BinaryOpType2[\"NOT_EQUAL\"] = 11] = \"NOT_EQUAL\";\n BinaryOpType2[BinaryOpType2[\"SQUARED_DIFFERENCE\"] = 12] = \"SQUARED_DIFFERENCE\";\n BinaryOpType2[BinaryOpType2[\"INT_DIV\"] = 13] = \"INT_DIV\";\n BinaryOpType2[BinaryOpType2[\"POW\"] = 14] = \"POW\";\n BinaryOpType2[BinaryOpType2[\"PRELU\"] = 15] = \"PRELU\";\n BinaryOpType2[BinaryOpType2[\"MAX\"] = 16] = \"MAX\";\n BinaryOpType2[BinaryOpType2[\"MIN\"] = 17] = \"MIN\";\n BinaryOpType2[BinaryOpType2[\"COMPLEX_MULTIPLY_REAL\"] = 18] = \"COMPLEX_MULTIPLY_REAL\";\n BinaryOpType2[BinaryOpType2[\"COMPLEX_MULTIPLY_IMAG\"] = 19] = \"COMPLEX_MULTIPLY_IMAG\";\n})(BinaryOpType || (BinaryOpType = {}));\nvar CHECK_NAN_SNIPPET3 = `\n if (isnan(a)) { return a; }\n if (isnan(b)) { return b; }\n `;\nvar CHECK_NAN_SNIPPET_VEC4_INNER = `\n if (isNaN.r) {\n resultTemp.r = valueForNaN;\n }\n if (isNaN.g) {\n resultTemp.g = valueForNaN;\n }\n if (isNaN.b) {\n resultTemp.b = valueForNaN;\n }\n if (isNaN.a) {\n resultTemp.a = valueForNaN;\n }\n `;\nvar CHECK_NAN_SNIPPET_VEC4 = `\n let isNaN = isnanVec4(a) | isnanVec4(b);\n ${CHECK_NAN_SNIPPET_VEC4_INNER}\n `;\nvar ADD2 = \"return a + b;\";\nvar COMPLEX_MULTIPLY_REAL = \"return areal * breal - aimag * bimag;\";\nvar COMPLEX_MULTIPLY_IMAG = \"return areal * bimag + aimag * breal;\";\nvar DIV2 = \"return a / b;\";\nvar MUL2 = \"return a * b;\";\nvar SQUARED_DIFFERENCE2 = \"return (a - b) * (a - b);\";\nvar SUB2 = \"return a - b;\";\nvar EQUAL2 = \"return f32(a == b);\";\nvar EQUAL_VEC4 = \"return vec4(a == b);\";\nvar GREATER2 = \"return f32(a > b);\";\nvar GREATER_VEC4 = \"return vec4(a > b);\";\nvar GREATER_EQUAL2 = \"return f32(a >= b);\";\nvar GREATER_EQUAL_VEC4 = \"return vec4(a >= b);\";\nvar LESS2 = \"return f32(a < b);\";\nvar LESS_VEC4 = \"return vec4(a < b);\";\nvar LESS_EQUAL2 = \"return f32(a <= b);\";\nvar LESS_EQUAL_VEC4 = \"return vec4(a <= b);\";\nvar LOGICAL_AND2 = \"return f32(f32(a) >= 1.0 && f32(b) >= 1.0);\";\nvar LOGICAL_AND_VEC4 = `return (vec4(a >= vec4(1.0)) *\n vec4(b >= vec4(1.0)));`;\nvar INT_DIV2 = `\n let s = sign(a) * sign(b);\n let ia = i32(round(a));\n let ib = i32(round(b));\n return f32(idiv(ia, ib, s));\n `;\nvar INT_DIV_VEC4 = `\n let ia = vec4(round(a));\n let ib = vec4(round(b));\n let cond = ib != vec4(0);\n var resultTemp = vec4(0);\n let s = sign(a) * sign(b);\n\n // Windows (D3D) wants guaranteed non-zero int division at compile-time.\n if (cond[0]) {\n resultTemp[0] = idiv(ia[0], ib[0], s[0]);\n }\n if (cond[1]) {\n resultTemp[1] = idiv(ia[1], ib[1], s[1]);\n }\n if (cond[2]) {\n resultTemp[2] = idiv(ia[2], ib[2], s[2]);\n }\n if (cond[3]) {\n resultTemp[3] = idiv(ia[3], ib[3], s[3]);\n }\n return vec4(resultTemp);\n `;\nvar NOT_EQUAL2 = `\n if (isnan(a) || isnan(b)) {\n return 1.0;\n }\n return f32(a != b);\n`;\nvar NOT_EQUAL_VEC4 = `\n var resultTemp = vec4(a != b);\n let valueForNaN = 1.0;\n ${CHECK_NAN_SNIPPET_VEC4}\n\n return resultTemp;\n`;\nvar POW2 = `\n if(a < 0.0 && floor(b) < b) {\n return uniforms.NAN;\n }\n if (b == 0.0) {\n return 1.0;\n }\n if (round(abs(b) % 2.0) != 1.0) {\n return pow(abs(a), b);\n }\n return sign(a) * pow(abs(a), b);\n `;\nvar POW_VEC4 = `\n let isModRound1Bool = vec4(round(abs(b) % vec4(2.0))) == vec4(1);\n let isModRound1 = vec4(isModRound1Bool);\n let multiplier = sign(a) * isModRound1 + (vec4(1.0) - isModRound1);\n var resultTemp = multiplier * pow(abs(a), b);\n\n // Ensure that a^0 = 1, including 0^0 = 1 as this correspond to TF and JS\n let isExpZero = b == vec4(0.0);\n if (isExpZero.r) {\n resultTemp.r = 1.0;\n }\n if (isExpZero.g) {\n resultTemp.g = 1.0;\n }\n if (isExpZero.b) {\n resultTemp.b = 1.0;\n }\n if (isExpZero.a) {\n resultTemp.a = 1.0;\n }\n let isNaN = (a < vec4(0.0)) & (floor(b) < b);\n let valueForNaN = uniforms.NAN;\n ${CHECK_NAN_SNIPPET_VEC4_INNER}\n return resultTemp;\n `;\nvar PRELU2 = `if (a < 0.0) { return b * a; } return a;`;\nvar PRELU_VEC4 = `\n let aLessThanZero = vec4(a < vec4(0.0));\n return (aLessThanZero * (b * a)) + ((vec4(1.0) - aLessThanZero) * a);\n `;\nfunction getBinaryWithNanString(op2, useVec4, valueForNaN = \"uniforms.NAN\") {\n const checkNanSnippet = useVec4 ? CHECK_NAN_SNIPPET_VEC4 : CHECK_NAN_SNIPPET3;\n return useVec4 ? `\n let valueForNaN = ${valueForNaN};\n var resultTemp = vec4(${op2}(a, b));\n ` + checkNanSnippet + `\n return resultTemp;\n ` : checkNanSnippet + `\n return ${op2}(a, b);\n `;\n}\nfunction getBinaryOpString(type, useVec4) {\n switch (type) {\n case BinaryOpType.MUL:\n return MUL2;\n case BinaryOpType.ADD:\n return ADD2;\n case BinaryOpType.ATAN2:\n return getBinaryWithNanString(\"atan2\", useVec4);\n case BinaryOpType.SUB:\n return SUB2;\n case BinaryOpType.DIV:\n return DIV2;\n case BinaryOpType.EQUAL:\n return useVec4 ? EQUAL_VEC4 : EQUAL2;\n case BinaryOpType.GREATER:\n return useVec4 ? GREATER_VEC4 : GREATER2;\n case BinaryOpType.GREATER_EQUAL:\n return useVec4 ? GREATER_EQUAL_VEC4 : GREATER_EQUAL2;\n case BinaryOpType.LESS:\n return useVec4 ? LESS_VEC4 : LESS2;\n case BinaryOpType.LESS_EQUAL:\n return useVec4 ? LESS_EQUAL_VEC4 : LESS_EQUAL2;\n case BinaryOpType.LOGICAL_AND:\n return useVec4 ? LOGICAL_AND_VEC4 : LOGICAL_AND2;\n case BinaryOpType.NOT_EQUAL:\n return useVec4 ? NOT_EQUAL_VEC4 : NOT_EQUAL2;\n case BinaryOpType.SQUARED_DIFFERENCE:\n return SQUARED_DIFFERENCE2;\n case BinaryOpType.INT_DIV:\n return useVec4 ? INT_DIV_VEC4 : INT_DIV2;\n case BinaryOpType.PRELU:\n return useVec4 ? PRELU_VEC4 : PRELU2;\n case BinaryOpType.MAX:\n return getBinaryWithNanString(\"max\", useVec4);\n case BinaryOpType.MIN:\n return getBinaryWithNanString(\"min\", useVec4);\n case BinaryOpType.POW:\n return useVec4 ? POW_VEC4 : POW2;\n case BinaryOpType.COMPLEX_MULTIPLY_REAL:\n return COMPLEX_MULTIPLY_REAL;\n case BinaryOpType.COMPLEX_MULTIPLY_IMAG:\n return COMPLEX_MULTIPLY_IMAG;\n default:\n throw new Error(`BinaryType ${type} is not implemented!`);\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/unary_op_util.js\nvar UnaryOpType;\n(function(UnaryOpType2) {\n UnaryOpType2[UnaryOpType2[\"ABS\"] = 0] = \"ABS\";\n UnaryOpType2[UnaryOpType2[\"CEIL\"] = 1] = \"CEIL\";\n UnaryOpType2[UnaryOpType2[\"COS\"] = 2] = \"COS\";\n UnaryOpType2[UnaryOpType2[\"COSH\"] = 3] = \"COSH\";\n UnaryOpType2[UnaryOpType2[\"ELU\"] = 4] = \"ELU\";\n UnaryOpType2[UnaryOpType2[\"EXP\"] = 5] = \"EXP\";\n UnaryOpType2[UnaryOpType2[\"EXPM1\"] = 6] = \"EXPM1\";\n UnaryOpType2[UnaryOpType2[\"FLOOR\"] = 7] = \"FLOOR\";\n UnaryOpType2[UnaryOpType2[\"IS_NAN\"] = 8] = \"IS_NAN\";\n UnaryOpType2[UnaryOpType2[\"LINEAR\"] = 9] = \"LINEAR\";\n UnaryOpType2[UnaryOpType2[\"LOG\"] = 10] = \"LOG\";\n UnaryOpType2[UnaryOpType2[\"LOGICAL_NOT\"] = 11] = \"LOGICAL_NOT\";\n UnaryOpType2[UnaryOpType2[\"NEG\"] = 12] = \"NEG\";\n UnaryOpType2[UnaryOpType2[\"RELU\"] = 13] = \"RELU\";\n UnaryOpType2[UnaryOpType2[\"RELU6\"] = 14] = \"RELU6\";\n UnaryOpType2[UnaryOpType2[\"LEAKYRELU\"] = 15] = \"LEAKYRELU\";\n UnaryOpType2[UnaryOpType2[\"RECIPROCAL\"] = 16] = \"RECIPROCAL\";\n UnaryOpType2[UnaryOpType2[\"RSQRT\"] = 17] = \"RSQRT\";\n UnaryOpType2[UnaryOpType2[\"SIN\"] = 18] = \"SIN\";\n UnaryOpType2[UnaryOpType2[\"SINH\"] = 19] = \"SINH\";\n UnaryOpType2[UnaryOpType2[\"SIGMOID\"] = 20] = \"SIGMOID\";\n UnaryOpType2[UnaryOpType2[\"SQRT\"] = 21] = \"SQRT\";\n UnaryOpType2[UnaryOpType2[\"SQUARE\"] = 22] = \"SQUARE\";\n UnaryOpType2[UnaryOpType2[\"TANH\"] = 23] = \"TANH\";\n UnaryOpType2[UnaryOpType2[\"TO_INT\"] = 24] = \"TO_INT\";\n})(UnaryOpType || (UnaryOpType = {}));\nvar ABS3 = `return abs(a);`;\nvar CEIL2 = `return ceil(a);`;\nvar COS2 = `return cos(a);`;\nvar COSH2 = `\n let e2x = exp(-a);\n return (e2x + 1.0 / e2x) / 2.0;\n`;\nvar EXPM12 = `return exp(a) - 1.0;`;\nvar ELU5 = `if (a >= 0.0) { return a; } return (exp(a) - 1.0);`;\nvar ELU_VEC4 = `\n var resFloat = exp(a) - vec4(1.0);\n if (a.r >= 0.0) {\n resFloat.r = a.r;\n }\n if (a.g >= 0.0) {\n resFloat.g = a.g;\n }\n if (a.b >= 0.0) {\n resFloat.b = a.b;\n }\n if (a.a >= 0.0) {\n resFloat.a = a.a;\n }\n return resFloat;\n`;\nvar EXP2 = `return exp(a);`;\nvar FLOOR2 = `return floor(a);`;\nvar IS_NAN2 = `return f32(isnan(a));`;\nvar LINEAR3 = `return a;`;\nvar LOG2 = `if (a < 0.0) { return uniforms.NAN; }\n return log(a);`;\nvar LOGICAL_NOT2 = `return f32(!(a >= 1.0));`;\nvar NEG2 = `return -a;`;\nvar LEAKYRELU2 = `if (a < 0.0) { return uniforms.alpha * a; } return a;`;\nvar LEAKYRELU_VEC4 = `\n let aLessThanZero = vec4(a < vec4(0.0));\n return (aLessThanZero * (uniforms.alpha * a)) + ((vec4(1.0) - aLessThanZero) * a);\n`;\nvar RECIPROCAL2 = `return 1.0 / a;`;\nvar RELU4 = `return select(a, 0.0, a < 0.0);`;\nvar RELU64 = \"return clamp(a, 0.0, 6.0);\";\nvar RELU6_VEC4 = \"return clamp(a, vec4(0.0, 0.0, 0.0, 0.0), vec4(6.0, 6.0, 6.0, 6.0));\";\nvar RELU_VEC4 = `\n return select(a, vec4(0.0), a < vec4(0.0));\n`;\nvar RSQRT2 = `return 1.0/sqrt(a);`;\nvar SIGMOID4 = `return 1.0 / (1.0 + exp(-1.0 * a));`;\nvar SIN2 = `return sin(a);`;\nvar SINH2 = `\n let e2x = exp(a);\n return (e2x - 1.0 / e2x) / 2.0;\n`;\nvar SQRT2 = `return sqrt(a);`;\nvar SQUARE2 = `return a * a;`;\nvar TANH2 = `\n let e2x = exp(-2.0 * abs(a));\n return sign(a) * (1.0 - e2x) / (1.0 + e2x);\n`;\nvar TO_INT2 = `return f32(i32((a)));`;\nfunction getUnaryOpString(type, useVec4) {\n switch (type) {\n case UnaryOpType.ABS:\n return ABS3;\n case UnaryOpType.COS:\n return COS2;\n case UnaryOpType.COSH:\n return COSH2;\n case UnaryOpType.CEIL:\n return CEIL2;\n case UnaryOpType.ELU:\n return useVec4 ? ELU_VEC4 : ELU5;\n case UnaryOpType.EXP:\n return EXP2;\n case UnaryOpType.EXPM1:\n return EXPM12;\n case UnaryOpType.FLOOR:\n return FLOOR2;\n case UnaryOpType.IS_NAN:\n return IS_NAN2;\n case UnaryOpType.LINEAR:\n return LINEAR3;\n case UnaryOpType.LOG:\n return LOG2;\n case UnaryOpType.LOGICAL_NOT:\n return LOGICAL_NOT2;\n case UnaryOpType.NEG:\n return NEG2;\n case UnaryOpType.LEAKYRELU:\n return useVec4 ? LEAKYRELU_VEC4 : LEAKYRELU2;\n case UnaryOpType.RECIPROCAL:\n return RECIPROCAL2;\n case UnaryOpType.RELU:\n return useVec4 ? RELU_VEC4 : RELU4;\n case UnaryOpType.RELU6:\n return useVec4 ? RELU6_VEC4 : RELU64;\n case UnaryOpType.RSQRT:\n return RSQRT2;\n case UnaryOpType.SIGMOID:\n return SIGMOID4;\n case UnaryOpType.SIN:\n return SIN2;\n case UnaryOpType.SINH:\n return SINH2;\n case UnaryOpType.SQRT:\n return SQRT2;\n case UnaryOpType.SQUARE:\n return SQUARE2;\n case UnaryOpType.TANH:\n return TANH2;\n case UnaryOpType.TO_INT:\n return TO_INT2;\n default:\n throw new Error(`BinaryType ${type} is not implemented!`);\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/activation_util.js\nvar typeSnippet = (component) => {\n switch (component) {\n case 1:\n return \"f32\";\n case 2:\n return \"vec2\";\n case 3:\n return \"vec3\";\n case 4:\n return \"vec4\";\n default:\n throw new Error(`${component}-component is not supported.`);\n }\n};\nfunction activationFnSnippet(activation2, hasPreluActivationWeights = false, packed = false, coordsLength = 3) {\n if (activation2 === null) {\n return \"\";\n }\n let activationOpSnippet = \"\";\n if (activation2 === \"linear\") {\n activationOpSnippet = getUnaryOpString(UnaryOpType.LINEAR);\n } else if (activation2 === \"relu\") {\n activationOpSnippet = getUnaryOpString(UnaryOpType.RELU, packed);\n } else if (activation2 === \"elu\") {\n activationOpSnippet = getUnaryOpString(UnaryOpType.ELU, packed);\n } else if (activation2 === \"relu6\") {\n activationOpSnippet = getUnaryOpString(UnaryOpType.RELU6, packed);\n } else if (activation2 === \"prelu\") {\n activationOpSnippet = getBinaryOpString(BinaryOpType.PRELU, packed);\n } else if (activation2 === \"sigmoid\") {\n activationOpSnippet = getUnaryOpString(UnaryOpType.SIGMOID, packed);\n } else if (activation2 === \"leakyrelu\") {\n activationOpSnippet = getUnaryOpString(UnaryOpType.LEAKYRELU, packed);\n } else {\n throw new Error(`Activation ${activation2} has not been implemented for the WebGPU backend.`);\n }\n const elementSize = packed ? 4 : 1;\n const dataType = typeSnippet(elementSize);\n let activationFnSnippet2 = \"\";\n if (hasPreluActivationWeights) {\n activationFnSnippet2 = `\n fn activation(a : ${dataType}, coords : vec${coordsLength}) -> ${dataType} {\n let b = getPreluActivationWeightsByOutputCoords(coords);\n ${activationOpSnippet}\n }`;\n } else {\n activationFnSnippet2 = `\n fn activation(a : ${dataType}, coords : vec${coordsLength}) -> ${dataType} {\n ${activationOpSnippet}\n }`;\n }\n return activationFnSnippet2;\n}\nfunction biasActivationSnippet(hasBias, activation2) {\n return `\n ${hasBias ? \"value = value + getBiasByOutputCoords(coords);\" : \"\"}\n ${activation2 ? \"value = activation(value, coords);\" : \"\"}\n `;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/matmul_packed_webgpu.js\nfunction matMulReadFnSource(batchAEqualOne, batchBEqualOne, transposeA, transposeB, fitAOuter = false, fitBOuter = false, fitInner = false, component = 1) {\n util_exports.assert(transposeA && component === 1 || !transposeA, () => `transposeA ${transposeA} is not compatible with component size ${component}`);\n const sampleA = `\n let batch = ${batchAEqualOne ? \"0\" : \"batchIn\"};\n ${transposeA ? `value = getA(batch, col, row);` : `value = getA(batch, row, col);`}\n\n `;\n const sampleB = transposeB ? `value = getB(batch, col, row);` : `value = getB(batch, row, col);`;\n return `\n fn mm_readA(batchIn: i32, row: i32, colIn: i32) -> ${typeSnippet(component)} {\n var value = ${typeSnippet(component)}(0.0);\n let col = colIn * ${component};\n ${fitAOuter && fitInner ? sampleA : `\n ${transposeA ? `if(row < uniforms.dimAOuter && col < uniforms.dimInner)` : `if(row < uniforms.aShape[1] && col < uniforms.aShape[2])`}\n {\n ${sampleA}\n }\n `}\n return value;\n }\n\n fn mm_readB(batchIn: i32, row: i32, colIn: i32) -> ${typeSnippet(component)} {\n let col = colIn * ${component};\n let batch = ${batchBEqualOne ? \"0\" : \"batchIn\"};\n var value = ${typeSnippet(component)}(0.0);\n ${sampleB}\n return value;\n }\n `;\n}\nfunction matMulReadWriteFnSource(hasBias, activation2, batchAEqualOne, batchBEqualOne, transposeA, transposeB, fitAOuter = false, fitBOuter = false, fitInner = false, component = 1) {\n return `\n ${matMulReadFnSource(batchAEqualOne, batchBEqualOne, transposeA, transposeB, fitAOuter, fitBOuter, fitInner, component)}\n fn mm_write(batch: i32, row: i32, colIn: i32, valueIn: ${typeSnippet(component)}) {\n let col = colIn * ${component};\n ${fitAOuter && fitBOuter ? \"\" : \"if (row < uniforms.dimAOuter && col < uniforms.dimBOuter)\"}\n {\n var value = valueIn;\n let coords = vec3(batch, row, col);\n ${biasActivationSnippet(hasBias, activation2)}\n setOutputAtCoords(coords[0], coords[1], coords[2], value);\n }\n }\n `;\n}\nvar writeDataToSubAVec4Snippet = (transpose6) => {\n if (transpose6) {\n return `\n mm_Asub[inputRow][inputCol] = mm_readA(batch,\n kStart + inputRow,\n globalRowStart / InnerElementSize + inputCol);\n `;\n } else {\n return `\n mm_Asub[inputRow][inputCol] = mm_readA(batch,\n globalRow + innerRow,\n kStart / InnerElementSize + inputCol);\n `;\n }\n};\nvar calculateResultSnippet = (transposeA, innerElementSize) => {\n if (transposeA) {\n return `\n let ACached0 = mm_Asub[k * InnerElementSize][localRow];\n let ACached1 = mm_Asub[k * InnerElementSize + 1][localRow];\n let ACached2 = mm_Asub[k * InnerElementSize + 2][localRow];\n ${innerElementSize === 3 ? \"\" : \"let ACached3 = mm_Asub[k * InnerElementSize + 3][localRow];\"}\n for (var i = 0; i < RowPerThread; i = i + 1) {\n acc[i] = BCached0 * ACached0[i] + acc[i];\n acc[i] = BCached1 * ACached1[i] + acc[i];\n acc[i] = BCached2 * ACached2[i] + acc[i];\n ${innerElementSize === 3 ? \"\" : \"acc[i] = BCached3 * ACached3[i] + acc[i];\"}\n }`;\n } else {\n return `\n for (var i = 0; i < RowPerThread; i = i + 1) {\n let ACached = mm_Asub[tileRow + i][k];\n acc[i] = BCached0 * ACached.x + acc[i];\n acc[i] = BCached1 * ACached.y + acc[i];\n acc[i] = BCached2 * ACached.z + acc[i];\n ${innerElementSize === 3 ? \"\" : \"acc[i] = BCached3 * ACached.w + acc[i];\"}\n }`;\n }\n};\nfunction makeMatMulPackedVec4Source(workPerThread, workGroupSize, transposeA = false, tileInner = 32, splitK = false, splitedDimInner = 32, isVectorA = false) {\n const tileAOuter = workGroupSize[1] * workPerThread[1];\n const tileBOuter = workGroupSize[0] * workPerThread[0];\n const tileAWidth = transposeA ? tileAOuter : tileInner;\n const tileAHight = transposeA ? tileInner : tileAOuter;\n const innerElementSize = tileAWidth / workGroupSize[0];\n const rowPerThreadB = tileInner / workGroupSize[1];\n util_exports.assert((transposeA && innerElementSize === 4 && workPerThread[1] === 4 || !transposeA && (innerElementSize === 3 || innerElementSize === 4)) && tileAWidth % workGroupSize[0] === 0 && tileInner % workGroupSize[1] === 0 && workPerThread[0] === 4, () => `If transposeA ${transposeA} is true, innerElementSize ${innerElementSize} and workPerThread[1] ${workPerThread[1]} must be 4.\n Otherwise, innerElementSize ${innerElementSize} must be 3 or 4.\n tileAWidth ${tileAWidth} must be divisible by workGroupSize[0]${workGroupSize[0]}. tileInner ${tileInner} must be divisible by workGroupSize[1] ${workGroupSize[1]}. ColPerThread ${workPerThread[0]} must be 4.`);\n return `\n var mm_Asub : array, ${tileAWidth / innerElementSize}>, ${tileAHight}>;\n var mm_Bsub : array, ${tileBOuter / workPerThread[0]}>, ${tileInner}>;\n\n const RowPerThread = ${workPerThread[1]};\n const ColPerThread = ${workPerThread[0]};\n const InnerElementSize = ${innerElementSize};\n const TileInner = ${tileInner};\n\n @compute @workgroup_size(workGroupSizeX, workGroupSizeY, workGroupSizeZ)\n fn _start(@builtin(local_invocation_id) LocalId : vec3,\n @builtin(global_invocation_id) GlobalId : vec3,\n @builtin(num_workgroups) NumWorkgroups: vec3,\n @builtin(workgroup_id) workgroupId: vec3) {\n localId = LocalId;\n globalId = GlobalId;\n numWorkgroups = NumWorkgroups;\n\n let localRow = i32(localId.y);\n let tileRow = ${isVectorA ? \"0\" : \"localRow * RowPerThread\"};\n let tileCol = i32(localId.x);\n\n let globalRow = ${isVectorA ? \"0\" : \"i32(globalId.y) * RowPerThread\"};\n let globalCol = i32(globalId.x);\n let batch = ${splitK ? \"0\" : \"i32(globalId.z)\"};\n let globalRowStart = i32(workgroupId.y) * ${tileAOuter};\n\n let numTiles = ${splitK ? `${Math.ceil(splitedDimInner / tileInner)}` : \"(uniforms.dimInner - 1) / TileInner + 1\"};\n var kStart = ${splitK ? `i32(globalId.z) * ${splitedDimInner}` : \"0\"};\n\n var acc: array, RowPerThread>;\n\n // Loop over shared dimension.\n let tileRowB = localRow * ${rowPerThreadB};\n for (var t = 0; t < numTiles; t = t + 1) {\n // Load one tile of A into local memory.\n for (var innerRow = 0; innerRow < RowPerThread; innerRow = innerRow + 1) {\n let inputRow = tileRow + innerRow;\n let inputCol = tileCol;\n ${writeDataToSubAVec4Snippet(transposeA)}\n }\n\n // Load one tile of B into local memory.\n for (var innerRow = 0; innerRow < ${rowPerThreadB}; innerRow = innerRow + 1) {\n let inputRow = tileRowB + innerRow;\n let inputCol = tileCol;\n mm_Bsub[inputRow][inputCol] = mm_readB(batch, kStart + inputRow, globalCol);\n }\n kStart = kStart + TileInner;\n workgroupBarrier();\n\n // Compute acc values for a single thread.\n for (var k = 0; k < TileInner / InnerElementSize; k = k + 1) {\n let BCached0 = mm_Bsub[k * InnerElementSize][tileCol];\n let BCached1 = mm_Bsub[k * InnerElementSize + 1][tileCol];\n let BCached2 = mm_Bsub[k * InnerElementSize + 2][tileCol];\n ${innerElementSize === 3 ? \"\" : \"let BCached3 = mm_Bsub[k * InnerElementSize + 3][tileCol];\"}\n\n ${calculateResultSnippet(transposeA, innerElementSize)}\n }\n\n workgroupBarrier();\n }\n\n for (var innerRow = 0; innerRow < RowPerThread; innerRow = innerRow + 1) {\n mm_write(batch, globalRow + innerRow, globalCol, acc[innerRow]);\n }\n }`;\n}\nvar writeDataToSubASnippet = (transpose6) => {\n if (transpose6) {\n return `\n mm_Asub[inputRow][inputCol] = mm_readA(batch,\n kStart + inputRow,\n globalRowStart + inputCol);\n `;\n } else {\n return `\n mm_Asub[inputRow][inputCol] = mm_readA(batch,\n globalRowStart + inputRow,\n kStart + inputCol);\n `;\n }\n};\nvar readDataFromSubASnippet = (transposeA) => {\n return transposeA ? \"let ACached = mm_Asub[k][tileRow + innerRow];\" : \"let ACached = mm_Asub[tileRow + innerRow][k];\";\n};\nfunction makeMatMulPackedSource(workPerThread, workGroupSize, transposeA = false, tileInner = 32, splitK = false, splitedDimInner = 32, sequentialAccessByThreads = false) {\n const tileAOuter = workPerThread[1] * workGroupSize[1];\n const tileBOuter = workPerThread[0] * workGroupSize[0];\n const tileAWidth = transposeA ? tileAOuter : tileInner;\n const tileAHight = transposeA ? tileInner : tileAOuter;\n util_exports.assert(tileAHight % workGroupSize[1] === 0 && tileAWidth % workGroupSize[0] === 0 && tileInner % workGroupSize[1] === 0, () => `tileAHight ${tileAHight} must be divisible by workGroupSize[1]${workGroupSize[1]}, tileAWidth ${tileAWidth} must be divisible by workGroupSize[0]${workGroupSize[0]}, tileInner ${tileInner} must be divisible by workGroupSize[1]${workGroupSize[1]}`);\n const rowPerThreadA = tileAHight / workGroupSize[1];\n const colPerThreadA = tileAWidth / workGroupSize[0];\n const rowPerThreadB = tileInner / workGroupSize[1];\n const matmulSnippet = sequentialAccessByThreads ? `\n let localRow = i32(localId.y);\n let localCol = i32(localId.x);\n let globalRowStart = i32(workgroupId.y) * ${tileAOuter};\n let globalColStart = i32(workgroupId.x) * ${tileBOuter};\n\n // Loop over shared dimension.\n for (var t = 0; t < numTiles; t = t + 1) {\n // Load one tile of A into local memory.\n for (var inputRow = localRow; inputRow < ${tileAHight}; inputRow = inputRow + ${workGroupSize[1]}) {\n for (var inputCol = localCol; inputCol < ${tileAWidth}; inputCol = inputCol + ${workGroupSize[0]}) {\n ${writeDataToSubASnippet(transposeA)}\n }\n }\n // Load one tile of B into local memory.\n for (var inputRow = localRow; inputRow < ${tileInner}; inputRow = inputRow + ${workGroupSize[1]}) {\n for (var inputCol = localCol; inputCol < ${tileBOuter}; inputCol = inputCol + ${workGroupSize[0]}) {\n mm_Bsub[inputRow][inputCol] = mm_readB(batch,\n kStart + inputRow,\n globalColStart + inputCol);\n }\n }\n kStart = kStart + TileInner;\n workgroupBarrier();\n\n // Compute acc values for a single thread.\n var BCached : array;\n for (var k = 0; k < TileInner; k = k + 1) {\n for (var inner = 0; inner < ColPerThread; inner = inner + 1) {\n BCached[inner] = mm_Bsub[k][localCol + inner * ${workGroupSize[0]}];\n }\n for (var innerRow = 0; innerRow < RowPerThread; innerRow = innerRow + 1) {\n let ACached = ${transposeA ? `mm_Asub[k][localRow + innerRow * ${workGroupSize[1]}];` : `mm_Asub[localRow + innerRow * ${workGroupSize[1]}][k];`}\n for (var innerCol = 0; innerCol < ColPerThread; innerCol = innerCol + 1) {\n acc[innerRow][innerCol] = acc[innerRow][innerCol] +\n ACached * BCached[innerCol];\n }\n }\n }\n workgroupBarrier();\n }\n for (var innerRow = 0; innerRow < RowPerThread; innerRow = innerRow + 1) {\n let gRow = globalRowStart + localRow + innerRow * ${workGroupSize[1]};\n for (var innerCol = 0; innerCol < ColPerThread; innerCol = innerCol + 1) {\n let gCol = globalColStart + localCol + innerCol * ${workGroupSize[0]};\n mm_write(batch, gRow, gCol, acc[innerRow][innerCol]);\n }\n }\n ` : `\n let tileRow = i32(localId.y) * RowPerThread;\n let tileCol = i32(localId.x) * ColPerThread;\n\n let globalRow = i32(globalId.y) * RowPerThread;\n let globalCol = i32(globalId.x) * ColPerThread;\n let globalRowStart = i32(workgroupId.y) * ${tileAOuter};\n\n let tileRowA = i32(localId.y) * ${rowPerThreadA};\n let tileColA = i32(localId.x) * ${colPerThreadA};\n let tileRowB = i32(localId.y) * ${rowPerThreadB};\n // Loop over shared dimension.\n for (var t = 0; t < numTiles; t = t + 1) {\n // Load one tile of A into local memory.\n for (var innerRow = 0; innerRow < ${rowPerThreadA}; innerRow = innerRow + 1) {\n for (var innerCol = 0; innerCol < ${colPerThreadA}; innerCol = innerCol + 1) {\n let inputRow = tileRowA + innerRow;\n let inputCol = tileColA + innerCol;\n ${writeDataToSubASnippet(transposeA)}\n }\n }\n\n // Load one tile of B into local memory.\n for (var innerRow = 0; innerRow < ${rowPerThreadB}; innerRow = innerRow + 1) {\n for (var innerCol = 0; innerCol < ColPerThread; innerCol = innerCol + 1) {\n let inputRow = tileRowB + innerRow;\n let inputCol = tileCol + innerCol;\n mm_Bsub[inputRow][inputCol] = mm_readB(batch,\n kStart + inputRow,\n globalCol + innerCol);\n }\n }\n kStart = kStart + TileInner;\n workgroupBarrier();\n\n // Compute acc values for a single thread.\n var BCached : array;\n for (var k = 0; k < TileInner; k = k + 1) {\n for (var inner = 0; inner < ColPerThread; inner = inner + 1) {\n BCached[inner] = mm_Bsub[k][tileCol + inner];\n }\n\n for (var innerRow = 0; innerRow < RowPerThread; innerRow = innerRow + 1) {\n ${readDataFromSubASnippet(transposeA)}\n for (var innerCol = 0; innerCol < ColPerThread; innerCol = innerCol + 1) {\n acc[innerRow][innerCol] = acc[innerRow][innerCol] + ACached * BCached[innerCol];\n }\n }\n }\n\n workgroupBarrier();\n }\n\n for (var innerRow = 0; innerRow < RowPerThread; innerRow = innerRow + 1) {\n for (var innerCol = 0; innerCol < ColPerThread; innerCol = innerCol + 1) {\n mm_write(batch, globalRow + innerRow, globalCol + innerCol,\n acc[innerRow][innerCol]);\n }\n }\n `;\n return `\n var mm_Asub : array, ${tileAHight}>;\n var mm_Bsub : array, ${tileInner}>;\n const RowPerThread = ${workPerThread[1]};\n const ColPerThread = ${workPerThread[0]};\n const TileInner = ${tileInner};\n\n @compute @workgroup_size(workGroupSizeX, workGroupSizeY, workGroupSizeZ)\n fn _start(@builtin(local_invocation_id) LocalId : vec3,\n @builtin(global_invocation_id) GlobalId : vec3,\n @builtin(num_workgroups) NumWorkgroups: vec3,\n @builtin(workgroup_id) workgroupId: vec3) {\n localId = LocalId;\n globalId = GlobalId;\n numWorkgroups = NumWorkgroups;\n\n let batch = ${splitK ? \"0\" : \"i32(globalId.z)\"};\n let numTiles = ${splitK ? `${Math.ceil(splitedDimInner / tileInner)}` : \"(uniforms.dimInner - 1) / TileInner + 1\"};\n var kStart = ${splitK ? `i32(globalId.z) * ${splitedDimInner}` : \"0\"};\n\n var acc : array, RowPerThread>;\n\n // Without this initialization strange values show up in acc.\n for (var innerRow = 0; innerRow < RowPerThread; innerRow = innerRow + 1) {\n for (var innerCol = 0; innerCol < ColPerThread; innerCol = innerCol + 1) {\n acc[innerRow][innerCol] = 0.0;\n }\n }\n ${matmulSnippet}\n }\n `;\n}\nvar readVectorASnippet = (transpose6) => {\n return transpose6 ? `\n mm_readA(batch, colA, globalRow),\n mm_readA(batch, colA + 1, globalRow),\n mm_readA(batch, colA + 2, globalRow),\n mm_readA(batch, colA + 3, globalRow)\n ` : `\n mm_readA(batch, globalRow, colA),\n mm_readA(batch, globalRow, colA + 1),\n mm_readA(batch, globalRow, colA + 2),\n mm_readA(batch, globalRow, colA + 3)\n `;\n};\nfunction makeVectorMatrixProductSource(workGroupSize, transposeA = false) {\n util_exports.assert(workGroupSize[1] === 1 && workGroupSize[2] === 1, () => `A linear work group size is required. But got ${workGroupSize}.`);\n return `\n const TileSize = ${workGroupSize[0] * 4};\n var mm_Asub : array, ${workGroupSize[0]}>;\n\n ${getMainHeaderString()} {\n let tileCol = i32(localId.x);\n let globalCol = i32(globalId.x);\n let globalRow = i32(globalId.y);\n\n let numTiles = (uniforms.dimInner - 1) / TileSize + 1;\n let batch = i32(globalId.z);\n // Without this initialization strange values show up in acc.\n var acc = 0.0;\n\n // Loop over shared dimension.\n for (var t = 0; t < numTiles; t = t + 1) {\n // Load one tile of A into local memory.\n let colA = t * TileSize + tileCol * 4;\n mm_Asub[tileCol] = vec4(${readVectorASnippet(transposeA)});\n workgroupBarrier();\n\n // Compute acc values for a single thread.\n for (var k = 0; k < TileSize / 4; k = k + 1) {\n let rowB = t * TileSize + k * 4;\n let BCached = vec4(mm_readB(batch, rowB, globalCol),\n mm_readB(batch, rowB + 1, globalCol),\n mm_readB(batch, rowB + 2, globalCol),\n mm_readB(batch, rowB + 3, globalCol));\n\n let ACached = mm_Asub[k];\n acc = acc + dot(ACached, BCached);\n }\n\n workgroupBarrier();\n }\n\n mm_write(batch, globalRow, globalCol, acc);\n }\n `;\n}\nvar MatMulPackedProgram2 = class {\n constructor(aShape, outputShape, batchAEqualOne, batchBEqualOne, transposeA = false, transposeB = false, bias = null, activation2 = null, preluActivationWeights = null, sequentialAccessByThreads = false) {\n this.variableNames = [\"A\", \"B\"];\n this.uniforms = `dimAOuter : i32, dimBOuter : i32, dimInner : i32,`;\n this.outputShape = outputShape;\n this.dispatchLayout = { x: [2], y: [1], z: [0] };\n const dimInner = transposeA ? aShape[1] : aShape[2];\n this.isVec4 = (dimInner % 4 === 0 && !transposeA || outputShape[1] % 4 === 0 && transposeA) && outputShape[2] % 4 === 0 && !transposeB;\n this.isVectorA = outputShape[1] === 1 && !transposeA;\n if (!this.isVec4 && this.isVectorA) {\n this.elementsPerThread = [1, 1, 1];\n this.workGroupSize = [32, 1, 1];\n } else {\n const workGroupInfo = computeWorkGroupInfoForMatMul(outputShape[1], dimInner, outputShape[2], transposeA);\n this.workGroupSize = workGroupInfo.workGroupSize;\n this.elementsPerThread = workGroupInfo.elementsPerThread;\n }\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize, this.elementsPerThread);\n const addBias = bias != null;\n const hasPreluActivationWeights = preluActivationWeights != null;\n if (addBias) {\n this.variableNames.push(\"bias\");\n }\n if (hasPreluActivationWeights) {\n this.variableNames.push(\"preluActivationWeights\");\n }\n this.sequentialAccessByThreads = sequentialAccessByThreads;\n this.transposeA = transposeA;\n this.transposeB = transposeB;\n this.addBias = addBias;\n this.activation = activation2;\n this.hasPreluActivationWeights = hasPreluActivationWeights;\n this.batchAEqualOne = batchAEqualOne;\n this.batchBEqualOne = batchBEqualOne;\n [this.fitAOuter, this.fitBOuter, this.fitInner] = this.getShapeFit(outputShape[1], outputShape[2], dimInner);\n this.shaderKey = `matMulPacked_${this.elementsPerThread}_${transposeA}_${transposeB}_${this.activation}_${this.fitAOuter}_${this.fitBOuter}_${this.fitInner}_${this.isVec4}_${this.isVectorA}_${this.batchAEqualOne}_${this.batchBEqualOne}_${this.sequentialAccessByThreads}`;\n }\n getShapeFit(dimAOuter, dimBOuter, dimInner) {\n const tileAOuter = this.workGroupSize[1] * this.elementsPerThread[1];\n const tileBOuter = this.workGroupSize[0] * this.elementsPerThread[0];\n if (!this.isVec4 && this.isVectorA) {\n this.tileInner = this.workGroupSize[0] * 4;\n } else {\n this.tileInner = tileBOuter;\n }\n const fitAOuter = dimAOuter % tileAOuter === 0;\n const fitBOuter = dimBOuter % tileBOuter === 0;\n const fitInner = dimInner % this.tileInner === 0;\n return [fitAOuter, fitBOuter, fitInner];\n }\n getUserCode() {\n const userCode = `\n ${activationFnSnippet(this.activation, this.hasPreluActivationWeights, this.isVec4)}\n ${matMulReadWriteFnSource(this.addBias, this.activation, this.batchAEqualOne, this.batchBEqualOne, false, this.transposeB, this.fitAOuter, this.fitBOuter, this.fitInner, this.isVec4 ? 4 : 1)}\n ${this.isVec4 ? makeMatMulPackedVec4Source(this.elementsPerThread, this.workGroupSize, this.transposeA, this.tileInner, false, null, this.isVectorA) : this.isVectorA ? makeVectorMatrixProductSource(this.workGroupSize, this.transposeA) : makeMatMulPackedSource(this.elementsPerThread, this.workGroupSize, this.transposeA, this.tileInner, false, null, this.sequentialAccessByThreads)}\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/matmul_reduce_webgpu.js\nfunction makeMatMulReduceSource() {\n return `\n var sumValues : array;\n ${getMainHeaderString()} {\n let coords = getOutputCoords();\n let batch = coords[0];\n let row = coords[1];\n let col = coords[2];\n var sum = 0.0;\n let Length = uniforms.dimInner;\n for (var k = i32(localId.x); k < Length; k = k + i32(workGroupSizeX)) {\n let dataA = mm_readA(batch, row, k);\n let dataB = mm_readB(batch, k, col);\n sum = sum + dataA * dataB;\n }\n sumValues[localId.x] = sum;\n workgroupBarrier();\n\n for(var currentSize = workGroupSizeX / 2u; currentSize > 1u;\n currentSize = currentSize / 2u) {\n if (localId.x < currentSize)\n {\n sumValues[localId.x] = sumValues[localId.x] + sumValues[localId.x + currentSize];\n }\n workgroupBarrier();\n }\n\n if (localId.x == 0u) {\n sum = sumValues[0] + sumValues[1];\n mm_write(batch, row, col, sum);\n }\n }\n `;\n}\nvar MatMulReduceProgram = class {\n constructor(outputShape, batchAEqualOne, batchBEqualOne, transposeA = false, transposeB = false, bias = null, activation2 = null, preluActivationWeights = null) {\n this.variableNames = [\"A\", \"B\"];\n this.uniforms = `dimAOuter : i32, dimBOuter : i32, dimInner : i32,`;\n this.workGroupSize = [256, 1, 1];\n this.outputShape = outputShape;\n this.dispatchLayout = { x: [], y: [1, 2], z: [0] };\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n const addBias = bias != null;\n const hasPreluActivationWeights = preluActivationWeights != null;\n if (addBias) {\n this.variableNames.push(\"bias\");\n }\n if (hasPreluActivationWeights) {\n this.variableNames.push(\"preluActivationWeights\");\n }\n this.transposeA = transposeA;\n this.transposeB = transposeB;\n this.addBias = addBias;\n this.activation = activation2;\n this.hasPreluActivationWeights = hasPreluActivationWeights;\n this.batchAEqualOne = batchAEqualOne;\n this.batchBEqualOne = batchBEqualOne;\n this.shaderKey = `matMulReduce_${this.activation}_${transposeA}_${transposeB}_${this.batchAEqualOne}_${this.batchBEqualOne}`;\n }\n getUserCode() {\n const userCode = `\n ${activationFnSnippet(this.activation, this.hasPreluActivationWeights)}\n ${matMulReadWriteFnSource(this.addBias, this.activation, this.batchAEqualOne, this.batchBEqualOne, this.transposeA, this.transposeB)}\n ${makeMatMulReduceSource()}\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/matmul_small_output_size_webgpu.js\nfunction makeMatMulSmallOutputSizeSource(workGroupSize) {\n const tileAOuter = workGroupSize[1];\n const tileBOuter = workGroupSize[0];\n const tileInner = tileAOuter > tileBOuter ? tileAOuter : tileBOuter;\n return `\n var mm_Asub : array, ${tileAOuter}>;\n var mm_Bsub : array, ${tileInner}>;\n\n // If the output size is small for matrix multiplication, avoid to use vec4\n // and handle some elements per thread to optimally utilize the ALU.\n // Read data from global memory to registers firstly, then store them into\n // shared memory, so it is instruction-Level parallelism for arithmetic\n // operations and others handle IO operations between barrier api, makes ALU\n // and load/store units work simultaneously, could improves the performance.\n ${getMainHeaderString()} {\n let tileRow = i32(localId.y);\n let tileCol = i32(localId.x);\n let globalRow = i32(globalId.y);\n let globalCol = i32(globalId.x);\n let batch = i32(globalId.z);\n\n // uniforms.dimInner should be greater than 0.\n let numTiles = (uniforms.dimInner - 1) / ${tileInner} + 1;\n var acc = 0.0;\n\n var globalColA = tileCol;\n var globalRowB = 0;\n var regA = mm_readA(batch, globalRow, globalColA);\n var regB0 = mm_readB(batch, globalRowB + 2 * tileRow, globalCol);\n var regB1 = mm_readB(batch, globalRowB + 2 * tileRow + 1, globalCol);\n globalColA = globalColA + ${tileInner};\n globalRowB = globalRowB + ${tileInner};\n\n for (var t = 0; t < numTiles; t = t + 1) {\n mm_Asub[tileRow][tileCol] = regA;\n mm_Bsub[2 * tileRow][tileCol] = regB0;\n mm_Bsub[2 * tileRow + 1][tileCol] = regB1;\n\n workgroupBarrier();\n\n regA = mm_readA(batch, globalRow, globalColA);\n regB0 = mm_readB(batch, globalRowB + 2 * tileRow, globalCol);\n regB1 = mm_readB(batch, globalRowB + 2 * tileRow + 1, globalCol);\n globalColA = globalColA + ${tileInner};\n globalRowB = globalRowB + ${tileInner};\n\n for (var k = 0; k < ${tileInner}; k = k + 1) {\n acc = acc + mm_Asub[tileRow][k] * mm_Bsub[k][tileCol];\n }\n workgroupBarrier();\n }\n\n mm_write(batch, globalRow, globalCol, acc);\n }\n `;\n}\nvar MatMulSmallOutputSizeProgram = class {\n constructor(aShape, bShape, outputShape, transposeA = false, transposeB = false, bias = null, activation2 = null, preluActivationWeights = null) {\n this.variableNames = [\"A\", \"B\"];\n this.uniforms = `dimAOuter : i32, dimBOuter : i32, dimInner : i32,`;\n this.workGroupSize = [16, 8, 1];\n this.outputShape = outputShape;\n this.dispatchLayout = { x: [2], y: [1], z: [0] };\n this.dispatch = [\n Math.ceil(outputShape[2] / this.workGroupSize[0]),\n Math.ceil(outputShape[1] / this.workGroupSize[1]),\n outputShape[0]\n ];\n const addBias = bias != null;\n if (addBias) {\n this.variableNames.push(\"bias\");\n }\n const hasPreluActivationWeights = preluActivationWeights != null;\n if (hasPreluActivationWeights) {\n this.variableNames.push(\"preluActivationWeights\");\n }\n this.transposeA = transposeA;\n this.transposeB = transposeB;\n this.addBias = addBias;\n this.activation = activation2;\n this.hasPreluActivationWeights = hasPreluActivationWeights;\n this.batchAEqualOne = aShape[0] === 1;\n this.batchBEqualOne = bShape[0] === 1;\n this.shaderKey = `matMulSmallOutputSize_${this.activation}_${transposeA}_${transposeB}_${this.batchAEqualOne}_${this.batchBEqualOne}`;\n }\n getUserCode() {\n const userCode = `\n ${activationFnSnippet(this.activation, this.hasPreluActivationWeights)}\n ${matMulReadWriteFnSource(this.addBias, this.activation, this.batchAEqualOne, this.batchBEqualOne, this.transposeA, this.transposeB)}\n ${makeMatMulSmallOutputSizeSource(this.workGroupSize)}\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/matmul_splitK_webgpu.js\nvar MatMulSplitKProgram = class {\n constructor(outputShape, dimInner, batchAEqualOne, batchBEqualOne, transposeA = false, transposeB = false) {\n this.variableNames = [\"A\", \"B\"];\n this.uniforms = `dimAOuter : i32, dimBOuter : i32, dimInner : i32,`;\n this.workGroupSize = [8, 8, 1];\n this.atomic = true;\n this.isVec4 = false;\n this.splitedDimInner = 128;\n util_exports.assert(outputShape[0] === 1, () => \"MatMulSplitKProgram only supports batch = 1.\");\n this.outputShape = outputShape;\n this.dispatchLayout = { x: [2], y: [1], z: [0, 3] };\n this.isVec4 = (transposeA && this.outputShape[1] % 4 === 0 || !transposeA && dimInner % 4 === 0) && this.outputShape[2] % 4 === 0;\n this.elementsPerThread = [4, 4, this.splitedDimInner];\n if (!this.isVec4) {\n if (this.outputShape[1] < 16) {\n this.elementsPerThread[1] = 1;\n }\n if (this.outputShape[2] < 16) {\n this.elementsPerThread[0] = 1;\n }\n }\n this.dispatch = computeDispatch(this.dispatchLayout, [\n this.outputShape[0],\n this.outputShape[1],\n this.outputShape[2],\n dimInner\n ], this.workGroupSize, this.elementsPerThread);\n this.transposeA = transposeA;\n this.transposeB = transposeB;\n this.batchAEqualOne = batchAEqualOne;\n this.batchBEqualOne = batchBEqualOne;\n this.shaderKey = `matMulSplitK_${transposeA}_${transposeB}_${batchAEqualOne}_${batchBEqualOne}_${this.elementsPerThread}_${this.isVec4}`;\n }\n getUserCode() {\n const atomicAddSnippet = (component2) => {\n return `\n for (var i = 0; i < ${component2}; i = i + 1)\n {\n var oldValue = atomicLoad(&(result[flatIndex + i]));\n var exchanged = false;\n for (; !exchanged;) {\n let newValueF32 = bitcast(oldValue) + ${component2 > 1 ? \"value[i]\" : \"value\"};\n let newValue = bitcast(newValueF32);\n let res = atomicCompareExchangeWeak(&(result[flatIndex + i]), oldValue, newValue);\n oldValue = res.old_value;\n exchanged = res.exchanged;\n }\n }\n `;\n };\n const component = this.isVec4 ? 4 : 1;\n const userCode = `\n ${matMulReadFnSource(this.batchAEqualOne, this.batchBEqualOne, false, this.transposeB, false, false, false, component)}\n fn mm_write(batch: i32, row : i32, colIn : i32, value : ${typeSnippet(component)}) {\n let col = colIn * ${component};\n if (row < uniforms.dimAOuter && col < uniforms.dimBOuter) {\n let coords = vec3(batch, row, col);\n let flatIndex = getOutputIndexFromCoords(coords);\n // The problem is that we should initialize output to zero before using.\n // Otherwise, the original value will be added to the result.\n ${atomicAddSnippet(component)}\n }\n }\n ${this.isVec4 ? makeMatMulPackedVec4Source(this.elementsPerThread, this.workGroupSize, this.transposeA, 32, true, this.splitedDimInner) : makeMatMulPackedSource(this.elementsPerThread, this.workGroupSize, this.transposeA, 32, true, this.splitedDimInner)}\n `;\n return userCode;\n }\n};\nvar BiasActivationProgram = class {\n constructor(outputShape, bias = null, activation2 = null, preluActivationWeights = null) {\n this.uniforms = \"\";\n this.variableNames = [\"x\"];\n this.workGroupSize = [64, 1, 1];\n this.size = true;\n this.outputShape = outputShape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.addBias = bias != null;\n this.hasPreluActivationWeights = preluActivationWeights != null;\n this.activation = activation2;\n if (this.addBias) {\n this.variableNames.push(\"bias\");\n }\n if (this.hasPreluActivationWeights) {\n this.variableNames.push(\"preluActivationWeights\");\n }\n this.shaderKey = `biasActivation_${activation2}`;\n }\n getUserCode() {\n return `\n ${activationFnSnippet(this.activation, this.hasPreluActivationWeights)}\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let coords = getCoordsFromIndex(index);\n var value = getXByOutputIndex(index);\n ${biasActivationSnippet(this.addBias, this.activation)}\n setOutputAtIndex(index, value);\n }\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/fill_webgpu.js\nvar FillProgram2 = class {\n constructor(shape) {\n this.variableNames = [];\n this.outputShape = [];\n this.uniforms = \"value : f32,\";\n this.workGroupSize = [64, 1, 1];\n this.size = true;\n this.outputShape = shape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.shaderKey = \"fill\";\n }\n getUserCode() {\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n setOutputAtIndex(index, uniforms.value);\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Fill.js\nfunction fill5(args) {\n const { backend: backend2, attrs } = args;\n const { shape, value } = attrs;\n let { dtype } = attrs;\n dtype = dtype || util_exports.inferDtype(value);\n if (dtype === \"string\") {\n const values = util_exports.getArrayFromDType(dtype, util_exports.sizeFromShape(shape));\n values.fill(value);\n return backend2.makeTensorInfo(shape, dtype, values);\n } else {\n const program = new FillProgram2(shape);\n const uniformData = [{ type: \"float32\", data: [value] }];\n return backend2.runWebGPUProgram(program, [], dtype, uniformData);\n }\n}\nvar fillConfig4 = {\n kernelName: Fill,\n backendName: \"webgpu\",\n kernelFunc: fill5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Reshape.js\nfunction reshape6(args) {\n const { inputs, attrs } = args;\n const { x } = inputs;\n const { shape } = attrs;\n const xSize = util_exports.sizeFromShape(x.shape);\n const $shape = util_exports.inferFromImplicitShape(shape, xSize);\n const $xSize = util_exports.sizeFromShape($shape);\n util_exports.assert(xSize === $xSize, () => `The new shape (${$shape}) has ${$xSize} elements and the old shape (${x.shape}) has ${xSize} elements. The new shape and old shape must have the same number of elements.`);\n args.backend.incRef(x.dataId);\n return { dataId: x.dataId, shape: $shape, dtype: x.dtype };\n}\nvar reshapeConfig4 = {\n kernelName: Reshape,\n backendName: \"webgpu\",\n kernelFunc: reshape6\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/BatchMatMul_impl.js\nfunction batchMatMulImpl2({ a, b, transposeA, transposeB, backend: backend2, bias = null, preluActivationWeights = null, leakyreluAlpha = 0, activation: activation2 = null }) {\n const aRank = a.shape.length;\n const bRank = b.shape.length;\n const innerShapeA = transposeA ? a.shape[aRank - 2] : a.shape[aRank - 1];\n const innerShapeB = transposeB ? b.shape[bRank - 1] : b.shape[bRank - 2];\n const outerShapeA = transposeA ? a.shape[aRank - 1] : a.shape[aRank - 2];\n const outerShapeB = transposeB ? b.shape[bRank - 2] : b.shape[bRank - 1];\n const outerDimsA = a.shape.slice(0, -2);\n const outerDimsB = b.shape.slice(0, -2);\n const batchDimA = util_exports.sizeFromShape(outerDimsA);\n const batchDimB = util_exports.sizeFromShape(outerDimsB);\n const outShapeOuterDims = broadcast_util_exports.assertAndGetBroadcastShape(a.shape.slice(0, -2), b.shape.slice(0, -2));\n const outShape = outShapeOuterDims.concat([outerShapeA, outerShapeB]);\n util_exports.assert(innerShapeA === innerShapeB, () => `Error in matMul: inner shapes (${innerShapeA}) and (${innerShapeB}) of Tensors with shapes ${a.shape} and ${b.shape} and transposeA=${transposeA} and transposeB=${transposeB} must match.`);\n const a3dShape = transposeA ? [batchDimA, innerShapeA, outerShapeA] : [batchDimA, outerShapeA, innerShapeA];\n const b3dShape = transposeB ? [batchDimB, outerShapeB, innerShapeB] : [batchDimB, innerShapeB, outerShapeB];\n const a3d = reshape6({ inputs: { x: a }, backend: backend2, attrs: { shape: a3dShape } });\n const b3d = reshape6({ inputs: { x: b }, backend: backend2, attrs: { shape: b3dShape } });\n const intermediates = [a3d, b3d];\n const batchDim = Math.max(batchDimA, batchDimB);\n const batchAEqualOne = batchDimA === 1;\n const batchBEqualOne = batchDimB === 1;\n const inputs = [a3d, b3d];\n const dimensions = [\n { type: \"int32\", data: [outerShapeA] },\n { type: \"int32\", data: [outerShapeB] },\n { type: \"int32\", data: [innerShapeA] }\n ];\n let program;\n let out;\n const outputShape = [batchDim, outerShapeA, outerShapeB];\n let matmulProgramType = env().get(\"WEBGPU_MATMUL_PROGRAM_TYPE\");\n if (matmulProgramType < 0) {\n if (outerShapeA * outerShapeB <= 128) {\n matmulProgramType = MatMulProgramType.MatMulReduceProgram;\n } else if (batchDim === 1 && outerShapeA <= 128 && outerShapeB <= 48 && innerShapeB >= 2e3) {\n matmulProgramType = MatMulProgramType.MatMulSplitKProgram;\n } else if (outerShapeA <= 16 && (outerShapeB <= 512 || innerShapeB >= 2 * outerShapeB) || outerShapeB <= 16 && (outerShapeA <= 512 || innerShapeA >= 2 * outerShapeA)) {\n matmulProgramType = MatMulProgramType.MatMulSmallOutputSizeProgram;\n } else {\n matmulProgramType = MatMulProgramType.MatMulPackedProgram;\n }\n }\n switch (matmulProgramType) {\n case MatMulProgramType.MatMulReduceProgram:\n program = new MatMulReduceProgram(outputShape, batchAEqualOne, batchBEqualOne, transposeA, transposeB, bias, activation2, preluActivationWeights);\n break;\n case MatMulProgramType.MatMulSplitKProgram: {\n out = fill5({ backend: backend2, attrs: { shape: outputShape, value: 0, dtype: a.dtype } });\n program = new MatMulSplitKProgram(outputShape, innerShapeB, batchAEqualOne, batchBEqualOne, transposeA, transposeB);\n if (bias || activation2) {\n out = backend2.runWebGPUProgram(program, inputs, a.dtype, dimensions, out);\n const biasActivationProgram = new BiasActivationProgram(out.shape, bias, activation2, preluActivationWeights);\n let uniformData = null;\n const activationInputs = [out];\n if (bias) {\n activationInputs.push(bias);\n }\n if (preluActivationWeights) {\n activationInputs.push(preluActivationWeights);\n }\n if (activation2 === \"leakyrelu\") {\n uniformData = [{ type: \"float32\", data: [leakyreluAlpha] }];\n biasActivationProgram.uniforms += \" alpha : f32,\";\n }\n const outActivated = backend2.runWebGPUProgram(biasActivationProgram, activationInputs, out.dtype, uniformData);\n intermediates.push(out);\n const outReshaped2 = reshape6({ inputs: { x: outActivated }, backend: backend2, attrs: { shape: outShape } });\n intermediates.push(outActivated);\n for (const i2 of intermediates) {\n backend2.disposeData(i2.dataId);\n }\n return outReshaped2;\n }\n break;\n }\n case MatMulProgramType.MatMulSmallOutputSizeProgram:\n program = new MatMulSmallOutputSizeProgram(a3dShape, b3dShape, outputShape, transposeA, transposeB, bias, activation2, preluActivationWeights);\n break;\n case MatMulProgramType.MatMulPackedProgram:\n const sequentialAccessByThreads = backend2.adapterInfo.isIntel();\n program = new MatMulPackedProgram2(a3dShape, outputShape, batchAEqualOne, batchBEqualOne, transposeA, transposeB, bias, activation2, preluActivationWeights, sequentialAccessByThreads);\n break;\n default:\n throw new Error(`Unsupported MatMulProgramType ${matmulProgramType}.`);\n }\n if (bias) {\n inputs.push(bias);\n }\n if (preluActivationWeights) {\n inputs.push(preluActivationWeights);\n }\n if (activation2 === \"leakyrelu\") {\n dimensions.push({ type: \"float32\", data: [leakyreluAlpha] });\n program.uniforms += \" alpha : f32,\";\n }\n out = backend2.runWebGPUProgram(program, inputs, a.dtype, dimensions, out);\n const outReshaped = reshape6({ inputs: { x: out }, backend: backend2, attrs: { shape: outShape } });\n intermediates.push(out);\n for (const i2 of intermediates) {\n backend2.disposeData(i2.dataId);\n }\n return outReshaped;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/_FusedMatMul.js\nfunction _fusedMatMul3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { a, b, bias, preluActivationWeights } = inputs;\n const { transposeA, transposeB, activation: activation2, leakyreluAlpha } = attrs;\n return batchMatMulImpl2({\n a,\n b,\n transposeA,\n transposeB,\n backend: backend2,\n bias,\n preluActivationWeights,\n leakyreluAlpha,\n activation: activation2\n });\n}\nvar _fusedMatMulConfig4 = {\n kernelName: _FusedMatMul,\n backendName: \"webgpu\",\n kernelFunc: _fusedMatMul3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/binary_op_complex_webgpu.js\nvar BinaryOpComplexProgram2 = class {\n constructor(op2, aShape, bShape) {\n this.variableNames = [\"AReal\", \"AImag\", \"BReal\", \"BImag\"];\n this.workGroupSize = [128, 1, 1];\n this.size = true;\n this.outputShape = backend_util_exports.assertAndGetBroadcastShape(aShape, bShape);\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.shaderKey = `binaryOpComplex_${op2}`;\n this.op = op2;\n }\n getUserCode() {\n const opStr = getBinaryOpString(this.op, false);\n const userCode = `\n fn binaryOpComplex(\n areal : f32, aimag : f32, breal : f32, bimag : f32) -> f32 {\n ${opStr}\n }\n\n ${getMainHeaderString(\"index\")} {\n if(index < uniforms.size) {\n let areal = getARealByOutputIndex(index);\n let aimag = getAImagByOutputIndex(index);\n let breal = getBRealByOutputIndex(index);\n let bimag = getBImagByOutputIndex(index);\n setOutputAtIndex(index, binaryOpComplex(areal, aimag, breal, bimag));\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/binary_op_webgpu.js\nvar BinaryOpProgram2 = class {\n constructor(op2, aShape, bShape) {\n this.size = true;\n this.variableNames = [\"A\", \"B\"];\n this.outputShape = backend_util_exports.assertAndGetBroadcastShape(aShape, bShape);\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.op = op2;\n this.useSharedMemoryWithA = aShape.length <= 1 && bShape.length > 1 && aShape[0] < 128;\n this.useSharedMemoryWithB = bShape.length <= 1 && aShape.length > 1 && bShape[0] < 128;\n if (this.useSharedMemoryWithA || this.useSharedMemoryWithB) {\n this.isVec4 = false;\n this.lastDimensionSize = this.useSharedMemoryWithB ? bShape[0] : aShape[0];\n this.shaderKey = `binary_${this.type}_${op2}_${this.lastDimensionSize}_${this.useSharedMemoryWithB}`;\n this.type = \"shared\";\n this.workGroupSize = [256, 1, 1];\n this.workPerThread = 1;\n } else {\n if (util_exports.arraysEqual(aShape, bShape) && util_exports.sizeFromShape(aShape) % 4 === 0) {\n this.isVec4 = true;\n this.type = \"vec4\";\n this.workPerThread = 4;\n } else {\n this.isVec4 = false;\n this.type = \"plain\";\n this.workPerThread = 1;\n }\n this.shaderKey = `binary_${this.type}_${op2}`;\n this.workGroupSize = [128, 1, 1];\n }\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize, [this.workPerThread, 1, 1]);\n }\n getUserCode() {\n let userCode;\n const dType = this.isVec4 ? \"vec4\" : \"f32\";\n const opFnStr = `\n fn binaryOperation(a : ${dType}, b : ${dType}) -> ${dType} {\n ${getBinaryOpString(this.op, this.isVec4)}\n };\n `;\n if (this.type === \"shared\") {\n const sharedIndexSnippet = this.lastDimensionSize > 1 ? `coords[${this.outputShape.length - 1}]` : \"0\";\n const accessDataSnippet = this.useSharedMemoryWithB ? `let a = getAByOutputIndex(index);\n let b = sharedBuf[${sharedIndexSnippet}];` : `let a = sharedBuf[${sharedIndexSnippet}];\n let b = getBByOutputIndex(index);`;\n userCode = `\n ${opFnStr}\n var sharedBuf : array;\n ${getMainHeaderString(\"index\")} {\n // Fill in the shared memory buffer.\n let localIndex = i32(localId.x);\n if(localIndex < ${this.lastDimensionSize}) {\n sharedBuf[localIndex] = f32(${this.useSharedMemoryWithB ? \"B\" : \"A\"}[localIndex]);\n }\n workgroupBarrier();\n\n if(index < uniforms.size) {\n let coords = getCoordsFromIndex(index);\n ${accessDataSnippet}\n setOutputAtIndex(index, binaryOperation(a, b));\n }\n }\n `;\n } else {\n userCode = `\n ${opFnStr}\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let a = getAByOutputIndex(index);\n let b = getBByOutputIndex(index);\n setOutputAtIndex(index, binaryOperation(a, b));\n }\n }\n `;\n }\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Identity.js\nfunction identity5(args) {\n const { inputs } = args;\n const { x } = inputs;\n args.backend.incRef(x.dataId);\n return { dataId: x.dataId, shape: x.shape, dtype: x.dtype };\n}\nvar identityConfig4 = {\n kernelName: Identity,\n backendName: \"webgpu\",\n kernelFunc: identity5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Complex.js\nfunction complex4(args) {\n const { inputs, backend: backend2 } = args;\n const { real: real5, imag: imag5 } = inputs;\n const complexInfo = backend2.makeTensorInfo(real5.shape, \"complex64\");\n const complex5 = backend2.tensorMap.get(complexInfo.dataId);\n const realTensorInfo = identity5({ inputs: { x: real5 }, backend: backend2 });\n const imagTensorInfo = identity5({ inputs: { x: imag5 }, backend: backend2 });\n complex5.complexTensorInfos = { real: realTensorInfo, imag: imagTensorInfo };\n return complexInfo;\n}\nvar complexConfig3 = {\n kernelName: Complex,\n backendName: \"webgpu\",\n kernelFunc: complex4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/unary_op_webgpu.js\nvar UnaryOpProgram2 = class {\n constructor(outputShape, op2) {\n this.variableNames = [\"A\"];\n this.size = true;\n const workGroupSizeX = 128;\n this.workGroupSize = [workGroupSizeX, 1, 1];\n this.outputShape = outputShape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.op = op2;\n this.shaderKey = `unary_${op2}`;\n }\n getUserCode() {\n return `\n fn unaryOperation(a : f32) -> f32 {\n ${getUnaryOpString(this.op, false)}\n }\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let a = getAByOutputIndex(index);\n setOutputAtIndex(index, unaryOperation(a));\n }\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernel_utils/kernel_funcs_utils.js\nfunction unaryKernelFunc3({ opType, cpuKernelImpl, dtype }) {\n return ({ inputs, backend: backend2 }) => {\n const { x } = inputs;\n const webgpuBackend = backend2;\n const $dtype = dtype || x.dtype;\n if (webgpuBackend.shouldExecuteOnCPU([x]) && cpuKernelImpl != null) {\n const xData = webgpuBackend.tensorMap.get(x.dataId);\n const outValues = cpuKernelImpl(xData.values, $dtype);\n return webgpuBackend.makeTensorInfo(x.shape, $dtype, outValues);\n }\n const program = new UnaryOpProgram2(x.shape, opType);\n return webgpuBackend.runWebGPUProgram(program, [x], $dtype);\n };\n}\nfunction binaryKernelFunc3({ opType, cpuKernelImpl, supportsComplex = false, dtype }) {\n return ({ inputs, backend: backend2 }) => {\n const { a, b } = inputs;\n const webgpuBackend = backend2;\n if (supportsComplex && a.dtype === \"complex64\") {\n const aData = webgpuBackend.tensorMap.get(a.dataId);\n const bData = webgpuBackend.tensorMap.get(b.dataId);\n let real5, imag5;\n if (opType !== BinaryOpType.MUL) {\n [real5, imag5] = [\n [aData.complexTensorInfos.real, bData.complexTensorInfos.real],\n [aData.complexTensorInfos.imag, bData.complexTensorInfos.imag]\n ].map((complexParts) => {\n const [aPart, bPart] = complexParts;\n const aHandle = {\n dataId: aPart.dataId,\n dtype: aPart.dtype,\n shape: a.shape\n };\n const bHandle = {\n dataId: bPart.dataId,\n dtype: bPart.dtype,\n shape: b.shape\n };\n const program2 = new BinaryOpProgram2(opType, a.shape, b.shape);\n return webgpuBackend.runWebGPUProgram(program2, [aHandle, bHandle], upcastType(aPart.dtype, bPart.dtype));\n });\n } else {\n const realProgram = new BinaryOpComplexProgram2(BinaryOpType.COMPLEX_MULTIPLY_REAL, a.shape, b.shape);\n const imagProgram = new BinaryOpComplexProgram2(BinaryOpType.COMPLEX_MULTIPLY_IMAG, a.shape, b.shape);\n const inputs2 = [\n {\n dataId: aData.complexTensorInfos.real.dataId,\n dtype: aData.complexTensorInfos.real.dtype,\n shape: a.shape\n },\n {\n dataId: aData.complexTensorInfos.imag.dataId,\n dtype: aData.complexTensorInfos.imag.dtype,\n shape: a.shape\n },\n {\n dataId: bData.complexTensorInfos.real.dataId,\n dtype: bData.complexTensorInfos.real.dtype,\n shape: b.shape\n },\n {\n dataId: bData.complexTensorInfos.imag.dataId,\n dtype: bData.complexTensorInfos.imag.dtype,\n shape: b.shape\n }\n ];\n real5 = webgpuBackend.runWebGPUProgram(realProgram, inputs2, \"float32\");\n imag5 = webgpuBackend.runWebGPUProgram(imagProgram, inputs2, \"float32\");\n }\n const complexOutput = complex4({ inputs: { real: real5, imag: imag5 }, backend: webgpuBackend });\n webgpuBackend.disposeData(real5.dataId);\n webgpuBackend.disposeData(imag5.dataId);\n return complexOutput;\n }\n const $dtype = dtype || upcastType(a.dtype, b.dtype);\n if ((a.dtype === \"string\" || b.dtype === \"string\" || webgpuBackend.shouldExecuteOnCPU([a, b])) && cpuKernelImpl != null) {\n const aData = webgpuBackend.tensorMap.get(a.dataId).values;\n const bData = webgpuBackend.tensorMap.get(b.dataId).values;\n const decodedAVals = a.dtype === \"string\" ? backend_util_exports.fromUint8ToStringArray(aData) : aData;\n const decodedBVals = a.dtype === \"string\" ? backend_util_exports.fromUint8ToStringArray(bData) : bData;\n const [outValues, outShape] = cpuKernelImpl(a.shape, b.shape, decodedAVals, decodedBVals, $dtype);\n return webgpuBackend.makeTensorInfo(outShape, $dtype, outValues);\n }\n const program = new BinaryOpProgram2(opType, a.shape, b.shape);\n return webgpuBackend.runWebGPUProgram(program, [a, b], $dtype);\n };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernel_utils/shared.js\nvar { addImpl: addImplCPU2, castImpl: castImplCPU2, ceilImpl: ceilImplCPU2, concatImpl: concatImplCPU2, equalImpl: equalImplCPU2, expImpl: expImplCPU2, expm1Impl: expm1ImplCPU2, floorImpl: floorImplCPU2, gatherNdImpl: gatherNdImplCPU2, gatherV2Impl: gatherV2ImplCPU2, greaterEqualImpl: greaterEqualImplCPU2, greaterImpl: greaterImplCPU2, lessEqualImpl: lessEqualImplCPU2, lessImpl: lessImplCPU2, logImpl: logImplCPU2, maxImpl: maxImplCPU2, maximumImpl: maximumImplCPU2, minimumImpl: minimumImplCPU2, multiplyImpl: multiplyImplCPU2, negImpl: negImplCPU2, notEqualImpl: notEqualImplCPU2, prodImpl: prodImplCPU2, rangeImpl: rangeImplCPU2, rsqrtImpl: rsqrtImplCPU2, scatterImpl: scatterImplCPU2, simpleAbsImpl: simpleAbsImplCPU2, sliceImpl: sliceImplCPU2, stridedSliceImpl: stridedSliceImplCPU2, stringNGramsImpl: stringNGramsImplCPU2, subImpl: subImplCPU2, tileImpl: tileImplCPU2, topKImpl: topKImplCPU2, transposeImpl: transposeImplCPU2, uniqueImpl: uniqueImplCPU2 } = shared_exports;\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Abs.js\nvar abs4 = unaryKernelFunc3({ opType: UnaryOpType.ABS, cpuKernelImpl: simpleAbsImplCPU2 });\nvar absConfig4 = {\n kernelName: Abs,\n backendName: \"webgpu\",\n kernelFunc: abs4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Add.js\nvar addKernelFunc2 = binaryKernelFunc3({ opType: BinaryOpType.ADD, cpuKernelImpl: addImplCPU2, supportsComplex: true });\nvar addConfig4 = {\n kernelName: Add,\n backendName: \"webgpu\",\n kernelFunc: addKernelFunc2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/addn_packed_webgpu.js\nvar AddNPackedProgram2 = class {\n constructor(shapes) {\n this.workPerThread = 1;\n this.workGroupSize = [64, 1, 1];\n this.size = true;\n this.outputShape = shapes[0];\n this.variableNames = shapes.map((_, i2) => `T${i2}`);\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize, [this.workPerThread, 1, 1]);\n this.shaderKey = \"addN\";\n }\n getUserCode() {\n const snippets = [];\n this.variableNames.forEach((variable2) => {\n snippets.push(`let v${variable2} = get${variable2}ByOutputCoords(coords);`);\n });\n const operation = this.variableNames.map((variable2) => {\n return `v${variable2}`;\n }).join(\" + \");\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n for (var i = 0; i < ${this.workPerThread}; i = i + 1) {\n let flatIndex = index * ${this.workPerThread} + i;\n if (flatIndex < uniforms.size) {\n let coords = getCoordsFromIndex(flatIndex);\n ${snippets.join(\"\\n \")}\n setOutputAtIndex(flatIndex, ${operation});\n }\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/AddN.js\nfunction addN4(args) {\n const { inputs, backend: backend2 } = args;\n const tensors = inputs;\n if (tensors.length === 1) {\n return identity5({ inputs: { x: tensors[0] }, backend: backend2 });\n }\n const dtype = tensors.map((t2) => t2.dtype).reduce((d1, d2) => upcastType(d1, d2));\n const shapes = tensors.map((t2) => t2.shape);\n const program = new AddNPackedProgram2(shapes);\n return backend2.runWebGPUProgram(program, tensors, dtype);\n}\nvar addNConfig4 = {\n kernelName: AddN,\n backendName: \"webgpu\",\n kernelFunc: addN4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/argminmax_webgpu.js\nvar ArgMinMaxProgram2 = class {\n constructor(inputShape, axis, reduceType) {\n this.workGroupSize = [64, 1, 1];\n this.variableNames = [\"x\"];\n this.uniforms = \"infinityValue : f32,\";\n this.size = true;\n const axes = [axis];\n this.op = reduceType === \"min\" ? \"<\" : \">\";\n const [outputShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes(inputShape, axes);\n this.outputShape = outputShape.length === 0 ? [1] : outputShape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n if (util_exports.sizeFromShape(reduceShape) < 32 || util_exports.sizeFromShape(outputShape) > 1e3) {\n this.type = \"plain\";\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n } else {\n this.type = \"shared\";\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, [1, 1, 1]);\n }\n this.inputShape = inputShape;\n this.shaderKey = `argMinMax_${this.op}_${this.type}`;\n }\n getUserCode() {\n const getInputShapeLastDim = () => {\n if (this.inputShape.length === 1) {\n return \"uniforms.xShape\";\n } else {\n return `uniforms.xShape.${getCoordsXYZ(this.inputShape.length - 1)}`;\n }\n };\n const splitOutputCoords = () => {\n let snippet = \"\";\n if (this.outputShape.length === 1) {\n if (this.inputShape.length !== 1) {\n snippet += \"outputCoords,\";\n }\n } else {\n for (let i2 = 0; i2 < this.outputShape.length; i2++) {\n snippet += `outputCoords.${getCoordsXYZ(i2)},`;\n }\n }\n return snippet;\n };\n if (this.type === \"shared\") {\n const sharedMemorySnippet = `\n var xBestIndices : array;\n var xBestValues : array;\n `;\n const userCode = `\n fn DIV_CEIL(a : u32, b : u32) -> u32 {\n return ((a - 1u) / b + 1u);\n }\n\n ${sharedMemorySnippet}\n\n ${getMainHeaderString(\"index\")} {\n let outputIndex = index / i32(workGroupSizeX);\n let reduceLength = ${getInputShapeLastDim()};\n\n var bestIndex = i32(localId.x);\n var bestValue = uniforms.infinityValue;\n let outputCoords = getCoordsFromIndex(outputIndex);\n for (var k = i32(localId.x); k < reduceLength && outputIndex < uniforms.size;\n k = k + i32(workGroupSizeX)) {\n let candidate = getX(${splitOutputCoords()} k);\n if (!isnan(candidate) && candidate ${this.op} bestValue) {\n bestValue = candidate;\n bestIndex = k;\n }\n }\n xBestValues[localId.x] = bestValue;\n xBestIndices[localId.x] = bestIndex;\n workgroupBarrier();\n\n var reduceSize = min(u32(reduceLength), workGroupSizeX);\n for (var currentSize = reduceSize / 2u; reduceSize > 1u;\n currentSize = reduceSize / 2u) {\n let interval = DIV_CEIL(reduceSize, 2u);\n if (localId.x < currentSize) {\n let candidate = xBestValues[localId.x + interval];\n if (candidate ${this.op} bestValue) {\n bestValue = candidate;\n xBestValues[localId.x] = bestValue;\n xBestIndices[localId.x] = xBestIndices[localId.x + interval];\n }\n }\n reduceSize = interval;\n workgroupBarrier();\n }\n\n if (localId.x == 0u && outputIndex < uniforms.size) {\n setOutputAtIndexI32(outputIndex, xBestIndices[localId.x]);\n }\n }\n `;\n return userCode;\n } else {\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let outputCoords = getCoordsFromIndex(index);\n var bestIndex = 0;\n var bestValue = getX(${splitOutputCoords()} 0);\n let reduceLength = ${getInputShapeLastDim()};\n for (var i = 1; i < reduceLength; i++) {\n let candidate = getX(${splitOutputCoords()} i);\n if (candidate ${this.op} bestValue) {\n bestValue = candidate;\n bestIndex = i;\n }\n }\n setOutputAtIndexI32(index, bestIndex);\n }\n }\n `;\n return userCode;\n }\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/transpose_shared_webgpu.js\nvar TransposeSharedProgram = class {\n constructor(aShape, newDim) {\n this.variableNames = [\"A\"];\n this.workGroupSize = [16, 16, 1];\n const outputShape = new Array(aShape.length);\n for (let i2 = 0; i2 < outputShape.length; i2++) {\n outputShape[i2] = aShape[newDim[i2]];\n }\n this.outputShape = outputShape;\n this.dispatchLayout = { x: [0], y: [1] };\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize, [1, 1, 1]);\n this.shaderKey = \"transposeShared\";\n }\n getUserCode() {\n const userCode = `\n const TILE_DIM = ${this.workGroupSize[0]};\n var tile : array, ${this.workGroupSize[0]}>;\n ${getWorkGroupSizeString()}\n fn _start(@builtin(local_invocation_id) localId : vec3,\n @builtin(workgroup_id) workgroupId : vec3) {\n var x = i32(workgroupId.x) * TILE_DIM + i32(localId.x);\n var y = i32(workgroupId.y) * TILE_DIM + i32(localId.y);\n let width = uniforms.outShape[0];\n let height = uniforms.outShape[1];\n if (x < width && y < height) {\n tile[localId.y][localId.x] = A[y * width + x];\n }\n workgroupBarrier();\n\n x = i32(workgroupId.y) * TILE_DIM + i32(localId.x);\n y = i32(workgroupId.x) * TILE_DIM + i32(localId.y);\n if (x < height && y < width) {\n setOutputAtIndex((y * height + x), tile[localId.x]\n [localId.y]);\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/transpose_webgpu.js\nvar TransposeProgram2 = class {\n constructor(aShape, newDim) {\n this.variableNames = [\"A\"];\n this.workPerThread = 1;\n this.workGroupSize = [64, 1, 1];\n this.size = true;\n const outputShape = new Array(aShape.length);\n for (let i2 = 0; i2 < outputShape.length; i2++) {\n outputShape[i2] = aShape[newDim[i2]];\n }\n this.outputShape = outputShape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize, [this.workPerThread, 1, 1]);\n this.newDim = newDim;\n this.shaderKey = `transpose_${newDim}`;\n }\n getUserCode() {\n const dtype = getCoordsDataType2(this.outputShape.length);\n const switched = getSwitchedCoords2(this.newDim);\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n for(var i = 0; i < ${this.workPerThread}; i = i + 1) {\n let flatIndex = index * ${this.workPerThread} + i;\n if(flatIndex < uniforms.size) {\n let resRC = getCoordsFromIndex(flatIndex);\n setOutputAtIndex(flatIndex, A[getIndexFromCoords${this.outputShape.length}D(\n ${dtype}(${switched}), uniforms.aShape)]);\n }\n }\n }\n `;\n return userCode;\n }\n};\nfunction getSwitchedCoords2(newDim) {\n const rank = newDim.length;\n if (rank > 6) {\n throw Error(`Transpose for rank ${rank} is not yet supported`);\n }\n const switchedCoords = new Array(rank);\n for (let i2 = 0; i2 < newDim.length; i2++) {\n switchedCoords[newDim[i2]] = `resRC.${getCoordsXYZ(i2)}`;\n }\n return switchedCoords.join();\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Transpose.js\nfunction transpose5(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { perm } = attrs;\n const webgpuBackend = backend2;\n const xRank = x.shape.length;\n const newShape = new Array(xRank);\n for (let i2 = 0; i2 < newShape.length; i2++) {\n newShape[i2] = x.shape[perm[i2]];\n }\n if (backend2.shouldExecuteOnCPU([x])) {\n const xData = webgpuBackend.tensorMap.get(x.dataId);\n const values = xData.values;\n const outValues = transposeImplCPU2(values, x.shape, x.dtype, perm, newShape);\n return backend2.makeTensorInfo(newShape, x.dtype, outValues);\n }\n if (x.shape.length === 2 && util_exports.arraysEqual(perm, [1, 0])) {\n const program2 = new TransposeSharedProgram(x.shape, perm);\n return webgpuBackend.runWebGPUProgram(program2, [x], x.dtype);\n }\n const program = new TransposeProgram2(x.shape, perm);\n return webgpuBackend.runWebGPUProgram(program, [x], x.dtype);\n}\nvar transposeConfig4 = {\n kernelName: Transpose,\n backendName: \"webgpu\",\n kernelFunc: transpose5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/ArgMax.js\nfunction argMax4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis } = attrs;\n let axes = util_exports.parseAxisParam(axis, x.shape);\n const permutedAxes = backend_util_exports.getAxesPermutation(axes, x.shape.length);\n let $x = x;\n const intermediateTensorInfos = [];\n if (permutedAxes != null) {\n $x = transpose5({ inputs: { x }, backend: backend2, attrs: { perm: permutedAxes } });\n intermediateTensorInfos.push($x);\n axes = backend_util_exports.getInnerMostAxes(axes.length, $x.shape.length);\n }\n backend_util_exports.assertAxesAreInnerMostDims(\"argMax\", [axes[0]], $x.shape.length);\n const program = new ArgMinMaxProgram2($x.shape, axes[0], \"max\");\n const uniformData = [{ type: \"float32\", data: [Number.NEGATIVE_INFINITY] }];\n const out = backend2.runWebGPUProgram(program, [$x], \"int32\", uniformData);\n intermediateTensorInfos.forEach((t2) => backend2.disposeData(t2.dataId));\n return out;\n}\nvar argMaxConfig4 = {\n kernelName: ArgMax,\n backendName: \"webgpu\",\n kernelFunc: argMax4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/ArgMin.js\nfunction argMin4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis } = attrs;\n let axes = util_exports.parseAxisParam(axis, x.shape);\n const permutedAxes = backend_util_exports.getAxesPermutation(axes, x.shape.length);\n let $x = x;\n const intermediateTensorInfos = [];\n if (permutedAxes != null) {\n $x = transpose5({ inputs: { x }, backend: backend2, attrs: { perm: permutedAxes } });\n intermediateTensorInfos.push($x);\n axes = backend_util_exports.getInnerMostAxes(axes.length, $x.shape.length);\n }\n backend_util_exports.assertAxesAreInnerMostDims(\"argMin\", [axes[0]], $x.shape.length);\n const program = new ArgMinMaxProgram2($x.shape, axes[0], \"min\");\n const uniformData = [{ type: \"float32\", data: [Number.POSITIVE_INFINITY] }];\n const out = backend2.runWebGPUProgram(program, [$x], \"int32\", uniformData);\n intermediateTensorInfos.forEach((t2) => backend2.disposeData(t2.dataId));\n return out;\n}\nvar argMinConfig3 = {\n kernelName: ArgMin,\n backendName: \"webgpu\",\n kernelFunc: argMin4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Atan2.js\nvar atan24 = binaryKernelFunc3({ opType: BinaryOpType.ATAN2 });\nvar atan2Config3 = {\n kernelName: Atan2,\n backendName: \"webgpu\",\n kernelFunc: atan24\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/pool2d_webgpu.js\nvar Pool2DProgram2 = class {\n constructor(convInfo, poolType) {\n this.variableNames = [\"x\"];\n this.uniforms = `stride : vec2, pad : vec2, dilation : vec2, convDims : vec2, filterDims : vec2,`;\n this.workGroupSize = [128, 1, 1];\n this.size = true;\n this.outputShape = convInfo.outShape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.shaderKey = `pool2D_${poolType}`;\n this.poolType = poolType;\n }\n getUserCode() {\n let updateSnippet = `resultValue = max(value, resultValue);`;\n if (this.poolType === \"avg\") {\n updateSnippet = `resultValue = resultValue + value; count = count + 1.0;`;\n }\n let returnValue = `resultValue`;\n if (this.poolType === \"avg\") {\n returnValue = `resultValue / count`;\n }\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let coords = getCoordsFromIndex(index);\n let batch = coords[0];\n let xRCCorner = vec2(coords.yz) * uniforms.stride - uniforms.pad;\n let xRCorner = xRCCorner.x;\n let xCCorner = xRCCorner.y;\n\n var resultValue = ${this.poolType === \"avg\" ? \"0.0\" : \"-1.0 / pow(10.0, -20.0)\"};\n var count = 0.0;\n\n for (var wR = 0; wR < uniforms.filterDims.x; wR = wR + uniforms.dilation.x) {\n let xR = xRCorner + wR;\n\n if (xR < 0 || xR >= uniforms.convDims.x) {\n continue;\n }\n\n for (var wC = 0; wC < uniforms.filterDims.y; wC = wC + uniforms.dilation.y) {\n let xC = xCCorner + wC;\n if (xC < 0 || xC >= uniforms.convDims.y) {\n continue;\n }\n\n let value = getX(batch, xR, xC, coords[3]);\n ${updateSnippet}\n }\n }\n\n setOutputAtIndex(index, ${returnValue});\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/pool_filtersizeone_webgpu.js\nvar PoolWithFilterSizeEqualsOneProgram = class {\n constructor(convInfo) {\n this.variableNames = [\"x\"];\n this.uniforms = `stride : vec2,`;\n this.workGroupSize = [256, 1, 1];\n this.size = true;\n this.outputShape = convInfo.outShape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.shaderKey = \"poolWithFilterSizeEqualsOne\";\n }\n getUserCode() {\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let coords = getCoordsFromIndex(index);\n let batch = coords[0];\n let d = coords[3];\n\n let xRCCorner = coords.yz * uniforms.stride;\n let xRCorner = xRCCorner.x;\n let xCCorner = xRCCorner.y;\n\n let value = getX(batch, xRCorner, xCCorner, d);\n setOutputAtIndex(index, value);\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/reduce_webgpu.js\nvar ReduceProgram2 = class {\n constructor(reduceInfo, reduceType) {\n this.workGroupSize = [64, 1, 1];\n this.variableNames = [\"x\"];\n this.uniforms = \"reduceSize : i32,\";\n this.size = true;\n this.inputShape = [reduceInfo.batchSize, reduceInfo.inSize];\n const [outputShape] = backend_util_exports.computeOutAndReduceShapes(this.inputShape, [1]);\n this.outputShape = outputShape.length === 0 ? [1] : outputShape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, [1, 1, 1]);\n this.reduceType = reduceType;\n this.shaderKey = `reduce_${reduceType}`;\n }\n getUserCode() {\n let reduceOp = ``;\n let initValue = \"0.0\";\n if (this.reduceType === \"min\" || this.reduceType === \"max\") {\n reduceOp = `\n if (isnan(candidate)) {\n bestValue = uniforms.NAN;\n } else if (!isnan(bestValue) && candidate ${this.reduceType === \"min\" ? \"<\" : \">\"} bestValue)\n { bestValue = candidate; }`;\n initValue = \"f32(x[offset])\";\n } else if (this.reduceType === \"sum\" || this.reduceType === \"mean\") {\n reduceOp = \" bestValue = bestValue + candidate; \";\n } else if (this.reduceType === \"prod\") {\n reduceOp = \" bestValue = bestValue * candidate; \";\n initValue = \"1.0\";\n }\n const outputSnippet = this.reduceType === \"mean\" ? `setOutputAtIndex(outputIndex, bestValue / f32(uniforms.reduceSize));` : `setOutputAtIndex(outputIndex, bestValue);`;\n const sharedMemorySnippet = `\n var xBestValues : array;\n `;\n const userCode = `\n fn DIV_CEIL(a : u32, b : u32) -> u32 {\n return ((a - 1u) / b + 1u);\n }\n\n ${sharedMemorySnippet}\n fn getOffset(outputIndex : i32) -> i32 {\n let outputCoords = getCoordsFromIndex(outputIndex);\n let offset = ${this.outputShape.length === 1 ? \"outputCoords\" : \"outputCoords[0]\"} * uniforms.reduceSize;\n return offset;\n }\n ${getMainHeaderString(\"index\")} {\n let outputIndex = index / i32(workGroupSizeX);\n let offset = getOffset(outputIndex);\n var bestValue = ${initValue};\n let Length = uniforms.reduceSize;\n let WorkPerThread = DIV_CEIL(u32(Length), workGroupSizeX);\n for (var k = i32(localId.x); k < Length && outputIndex < uniforms.size;\n k = k + i32(workGroupSizeX)) {\n let candidate = f32(x[offset + k]);\n ${reduceOp}\n }\n xBestValues[localId.x] = bestValue;\n workgroupBarrier();\n\n var reduceSize = min(u32(Length), workGroupSizeX);\n for (var currentSize = reduceSize / 2u; reduceSize > 1u;\n currentSize = reduceSize / 2u) {\n let interval = DIV_CEIL(reduceSize, 2u);\n if (localId.x < currentSize) {\n let candidate = xBestValues[localId.x + interval];\n ${reduceOp}\n xBestValues[localId.x] = bestValue;\n }\n reduceSize = interval;\n workgroupBarrier();\n }\n\n if (localId.x == 0u && outputIndex < uniforms.size) {\n ${outputSnippet}\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernel_utils/reduce.js\nfunction reduce2(x, axis, keepDims, reduceType, backend2) {\n const xRank = x.shape.length;\n const toDispose = [];\n const origAxes = util_exports.parseAxisParam(axis, x.shape);\n let axes = origAxes;\n const permutedAxes = backend_util_exports.getAxesPermutation(axes, xRank);\n let input2 = x;\n if (permutedAxes != null) {\n input2 = transpose5({ inputs: { x }, attrs: { perm: permutedAxes }, backend: backend2 });\n axes = backend_util_exports.getInnerMostAxes(axes.length, xRank);\n toDispose.push(input2);\n }\n backend_util_exports.assertAxesAreInnerMostDims(reduceType, axes, xRank);\n const [reduceOutShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes(input2.shape, axes);\n let resOutShape = reduceOutShape;\n if (keepDims) {\n resOutShape = backend_util_exports.expandShapeToKeepDim(reduceOutShape, origAxes);\n }\n let res;\n if ((reduceType === \"max\" || reduceType === \"prod\") && backend2.shouldExecuteOnCPU([input2])) {\n const xVals = backend2.tensorMap.get(input2.dataId).values;\n switch (reduceType) {\n case \"max\":\n const outValues = maxImplCPU2(xVals, util_exports.sizeFromShape(reduceShape), resOutShape, x.dtype);\n res = backend2.makeTensorInfo(resOutShape, x.dtype, outValues);\n break;\n case \"prod\":\n const { outVals, outShape, outDtype } = prodImplCPU2(input2.shape, input2.dtype, xVals, axes);\n res = backend2.makeTensorInfo(outShape, outDtype, outVals);\n break;\n default:\n throw new Error(`${reduceType} CPU implementation is not yet supported.`);\n }\n } else {\n const inSize = util_exports.sizeFromShape(reduceShape);\n const xSize = util_exports.sizeFromShape(input2.shape);\n const batchSize = xSize / inSize;\n const reduceInfo = { windowSize: inSize, inSize, batchSize, outSize: 1 };\n const dtype = reduceType === \"mean\" ? \"float32\" : sumOutType(x.dtype);\n const uniformData = [\n { type: \"int32\", data: [inSize] }\n ];\n const program = new ReduceProgram2(reduceInfo, reduceType);\n const reduced = backend2.runWebGPUProgram(program, [input2], dtype, uniformData);\n toDispose.push(reduced);\n res = reshape6({ inputs: { x: reduced }, attrs: { shape: resOutShape }, backend: backend2 });\n }\n toDispose.forEach((t2) => backend2.disposeData(t2.dataId));\n return res;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Max.js\nfunction max6(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { reductionIndices, keepDims } = attrs;\n return reduce2(x, reductionIndices, keepDims, \"max\", backend2);\n}\nvar maxConfig4 = {\n kernelName: Max,\n backendName: \"webgpu\",\n kernelFunc: max6\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Mean.js\nfunction mean4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { keepDims, axis } = attrs;\n return reduce2(x, axis, keepDims, \"mean\", backend2);\n}\nvar meanConfig4 = {\n kernelName: Mean,\n backendName: \"webgpu\",\n kernelFunc: mean4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Pool_impl.js\nfunction poolImpl(x, convInfo, poolType, backend2) {\n if (convInfo.filterWidth === 1 && convInfo.filterHeight === 1 && util_exports.arraysEqual(convInfo.inShape, convInfo.outShape)) {\n return identity5({ inputs: { x }, backend: backend2 });\n }\n if (convInfo.filterWidth === convInfo.inWidth && convInfo.filterHeight === convInfo.inHeight && convInfo.batchSize === 1 && convInfo.padInfo.type === \"VALID\") {\n const length = x.shape.length;\n const reshapeX = reshape6({\n inputs: { x },\n backend: backend2,\n attrs: {\n shape: [\n x.shape[length - 3] * x.shape[length - 2],\n x.shape[length - 1]\n ]\n }\n });\n let reduceX;\n if (poolType === \"avg\") {\n reduceX = mean4({ inputs: { x: reshapeX }, backend: backend2, attrs: { axis: 0, keepDims: false } });\n } else {\n util_exports.assert(poolType === \"max\", () => `Invalid pool type ${poolType}`);\n reduceX = max6({\n inputs: { x: reshapeX },\n backend: backend2,\n attrs: { reductionIndices: 0, keepDims: false }\n });\n }\n const result = reshape6({ inputs: { x: reduceX }, backend: backend2, attrs: { shape: convInfo.outShape } });\n backend2.disposeData(reshapeX.dataId);\n backend2.disposeData(reduceX.dataId);\n return result;\n }\n let program;\n const dimensions = [{ type: \"int32\", data: [convInfo.strideHeight, convInfo.strideWidth] }];\n if (convInfo.filterHeight === 1 && convInfo.filterWidth === 1) {\n program = new PoolWithFilterSizeEqualsOneProgram(convInfo);\n } else {\n if (poolType === \"avg\") {\n program = new Pool2DProgram2(convInfo, \"avg\");\n } else {\n util_exports.assert(poolType === \"max\", () => `Invalid pool type ${poolType}`);\n program = new Pool2DProgram2(convInfo, \"max\");\n }\n dimensions.push({ type: \"int32\", data: [convInfo.padInfo.top, convInfo.padInfo.left] }, {\n type: \"int32\",\n data: [convInfo.dilationHeight, convInfo.dilationWidth]\n }, { type: \"int32\", data: [convInfo.inHeight, convInfo.inWidth] }, {\n type: \"int32\",\n data: [convInfo.effectiveFilterHeight, convInfo.effectiveFilterWidth]\n });\n }\n return backend2.runWebGPUProgram(program, [x], x.dtype, dimensions);\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/AvgPool.js\nfunction avgPool5(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { filterSize, strides, pad: pad3, dimRoundingMode } = attrs;\n const dilations = 1;\n const convInfo = backend_util_exports.computePool2DInfo(x.shape, filterSize, strides, dilations, pad3, dimRoundingMode);\n return poolImpl(x, convInfo, \"avg\", backend2);\n}\nvar avgPoolConfig4 = {\n kernelName: AvgPool,\n backendName: \"webgpu\",\n kernelFunc: avgPool5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/BatchMatMul.js\nfunction batchMatMul4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { a, b } = inputs;\n const { transposeA, transposeB } = attrs;\n return batchMatMulImpl2({ a, b, transposeA, transposeB, backend: backend2 });\n}\nvar batchMatMulConfig4 = {\n kernelName: BatchMatMul,\n backendName: \"webgpu\",\n kernelFunc: batchMatMul4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/slice_webgpu.js\nvar SliceProgram2 = class {\n constructor(start, destSize) {\n this.variableNames = [\"source\"];\n this.workPerThread = 1;\n this.workGroupSize = [64, 1, 1];\n this.size = true;\n this.outputShape = destSize;\n this.rank = destSize.length;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize, [this.workPerThread, 1, 1]);\n this.start = start;\n this.uniforms = `start : ${getCoordsDataType2(start.length)}, `;\n this.shaderKey = \"slice\";\n }\n getUserCode() {\n const dtype = getCoordsDataType2(this.rank);\n const sourceCoords = getCoords3(this.rank);\n let coordSum;\n if (this.start.length === 1) {\n coordSum = this.outputShape.map((_, i2) => {\n return `sourceLoc = uniforms.start + coords;`;\n });\n } else {\n coordSum = this.outputShape.map((_, i2) => {\n return `sourceLoc.${coords2[i2]} = uniforms.start.${getCoordsXYZ(i2)} + coords.${coords2[i2]};`;\n });\n }\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n var sourceLoc : ${dtype};\n let coords = getCoordsFromIndex(index);\n ${coordSum.join(\"\\n\")}\n setOutputAtIndex(index, getSource(${sourceCoords}));\n }\n }\n `;\n return userCode;\n }\n};\nvar coords2 = [\"x\", \"y\", \"z\", \"w\", \"u\", \"v\"];\nfunction getCoords3(rank) {\n if (rank === 1) {\n return \"sourceLoc\";\n } else if (rank <= 6) {\n return coords2.slice(0, rank).map((coord) => `sourceLoc.${coord}`).join(\",\");\n } else {\n throw Error(`Slicing for rank ${rank} is not yet supported`);\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Slice.js\nfunction slice5(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { begin, size } = attrs;\n const [$begin, $size] = slice_util_exports.parseSliceParams(x, begin, size);\n slice_util_exports.assertParamsValid(x, $begin, $size);\n if (backend2.shouldExecuteOnCPU([x]) || x.dtype === \"string\") {\n const xBufferInfo = backend2.tensorMap.get(x.dataId);\n const outValues = sliceImplCPU2(xBufferInfo.values, $begin, $size, x.shape, x.dtype);\n return backend2.makeTensorInfo($size, x.dtype, outValues);\n }\n if (util_exports.sizeFromShape($size) === 0) {\n return backend2.makeTensorInfo($size, x.dtype, []);\n }\n const program = new SliceProgram2($begin, $size);\n const uniformData = [{ type: \"int32\", data: $begin }];\n return backend2.runWebGPUProgram(program, [x], x.dtype, uniformData);\n}\nvar sliceConfig4 = {\n kernelName: Slice,\n backendName: \"webgpu\",\n kernelFunc: slice5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/BatchToSpaceND.js\nvar batchToSpaceND5 = (args) => {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { blockShape, crops } = attrs;\n util_exports.assert(x.shape.length <= 4, () => \"batchToSpaceND for rank > 4 with a WebGPU backend not implemented yet\");\n const prod6 = blockShape.reduce((a, b) => a * b);\n const reshaped = backend_util_exports.getReshaped(x.shape, blockShape, prod6);\n const permuted = backend_util_exports.getPermuted(reshaped.length, blockShape.length);\n const reshapedPermuted = backend_util_exports.getReshapedPermuted(x.shape, blockShape, prod6);\n const sliceBeginCoords = backend_util_exports.getSliceBeginCoords(crops, blockShape.length);\n const sliceSize = backend_util_exports.getSliceSize(reshapedPermuted, crops, blockShape.length);\n const toDispose = [];\n const reshapedIntermediate = reshape6({ inputs: { x }, backend: backend2, attrs: { shape: reshaped } });\n const transposedIntermediate = transpose5({ inputs: { x: reshapedIntermediate }, backend: backend2, attrs: { perm: permuted } });\n const reshapedIntermediate2 = reshape6({\n inputs: { x: transposedIntermediate },\n backend: backend2,\n attrs: { shape: reshapedPermuted }\n });\n const sliced = slice5({\n inputs: { x: reshapedIntermediate2 },\n backend: backend2,\n attrs: { begin: sliceBeginCoords, size: sliceSize }\n });\n toDispose.push(reshapedIntermediate);\n toDispose.push(transposedIntermediate);\n toDispose.push(reshapedIntermediate2);\n toDispose.forEach((t2) => backend2.disposeData(t2.dataId));\n return sliced;\n};\nvar batchToSpaceNDConfig4 = {\n kernelName: BatchToSpaceND,\n backendName: \"webgpu\",\n kernelFunc: batchToSpaceND5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/NotEqual.js\nvar notEqual4 = binaryKernelFunc3({\n opType: BinaryOpType.NOT_EQUAL,\n dtype: \"bool\",\n cpuKernelImpl: notEqualImplCPU2\n});\nvar notEqualConfig4 = {\n kernelName: NotEqual,\n backendName: \"webgpu\",\n kernelFunc: notEqual4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Real.js\nfunction real4(args) {\n const { inputs, backend: backend2 } = args;\n const { input: input2 } = inputs;\n const inputData = backend2.tensorMap.get(input2.dataId);\n return identity5({ inputs: { x: inputData.complexTensorInfos.real }, backend: backend2 });\n}\nvar realConfig3 = {\n kernelName: Real,\n backendName: \"webgpu\",\n kernelFunc: real4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernel_utils/int.js\nfunction int2(input2, backend2) {\n const program = new UnaryOpProgram2(input2.shape, UnaryOpType.TO_INT);\n const output = backend2.runWebGPUProgram(program, [input2], \"int32\");\n return { dataId: output.dataId, shape: output.shape, dtype: output.dtype };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Cast.js\nfunction cast6(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { dtype } = attrs;\n if (dtype === \"complex64\") {\n if (x.dtype === \"complex64\") {\n return identity5({ inputs: { x }, backend: backend2 });\n }\n const zerosTensor = zeros(x.shape);\n const floatX = cast6({ inputs: { x }, backend: backend2, attrs: { dtype: \"float32\" } });\n const result = complex4({ inputs: { real: floatX, imag: zerosTensor }, backend: backend2 });\n zerosTensor.dispose();\n backend2.disposeData(floatX.dataId);\n return result;\n }\n if (x.dtype === \"complex64\") {\n const realPart = real4({ inputs: { input: x }, backend: backend2 });\n const result = cast6({ inputs: { x: realPart }, backend: backend2, attrs: { dtype } });\n backend2.disposeData(realPart.dataId);\n return result;\n }\n if (!util_exports.hasEncodingLoss(x.dtype, dtype)) {\n const result = identity5({ inputs: { x }, backend: backend2 });\n return { dataId: result.dataId, shape: result.shape, dtype };\n }\n if (backend2.shouldExecuteOnCPU([x])) {\n const values = backend2.tensorMap.get(x.dataId).values;\n const [resultShape, resultType, resultData] = castImplCPU2(values, x.shape, x.dtype, dtype);\n return backend2.makeTensorInfo(resultShape, resultType, resultData);\n }\n if (dtype === \"int32\") {\n return int2(x, backend2);\n }\n if (dtype === \"bool\") {\n const zerosTensorInfo = backend2.makeTensorInfo([], \"bool\", util_exports.getTypedArrayFromDType(\"bool\", 1));\n const binaryInputs = { a: x, b: zerosTensorInfo };\n const result = notEqual4({ inputs: binaryInputs, backend: backend2 });\n backend2.disposeData(zerosTensorInfo.dataId);\n return result;\n }\n throw new Error(`Error in Cast: failed to cast ${x.dtype} to ${dtype}`);\n}\nvar castConfig4 = {\n kernelName: Cast,\n backendName: \"webgpu\",\n kernelFunc: cast6\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Ceil.js\nvar ceil4 = unaryKernelFunc3({ opType: UnaryOpType.CEIL, cpuKernelImpl: ceilImplCPU2 });\nvar ceilConfig4 = {\n kernelName: Ceil,\n backendName: \"webgpu\",\n kernelFunc: ceil4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/clip_vec4_webgpu.js\nvar ClipVec4Program = class {\n constructor(outputShape) {\n this.variableNames = [\"A\"];\n this.uniforms = \"minVal : f32, maxVal : f32,\";\n this.workPerThread = 4;\n this.workGroupSize = [64, 1, 1];\n this.isVec4 = true;\n this.size = true;\n this.outputShape = outputShape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize, [this.workPerThread, 1, 1]);\n this.shaderKey = \"clipVec4\";\n }\n getUserCode() {\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n if(index < uniforms.size) {\n let value = getAByOutputIndex(index);\n var clampedValue : vec4;\n for (var i = 0; i < 4; i = i + 1) {\n if (isnan(value[i])) {\n clampedValue[i] = value[i];\n } else {\n clampedValue[i] = clamp(value[i], uniforms.minVal, uniforms.maxVal);\n }\n }\n\n setOutputAtIndex(index, clampedValue);\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/clip_webgpu.js\nvar ClipProgram2 = class {\n constructor(outputShape) {\n this.variableNames = [\"A\"];\n this.uniforms = \"minVal : f32, maxVal : f32,\";\n this.workGroupSize = [64, 1, 1];\n this.size = true;\n this.outputShape = outputShape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.shaderKey = \"clip\";\n }\n getUserCode() {\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n if(index < uniforms.size) {\n let value = getAByOutputIndex(index);\n if (isnan(value)) {\n setOutputAtIndex(index, value);\n return;\n }\n setOutputAtIndex(index, clamp(value, uniforms.minVal, uniforms.maxVal));\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/ClipByValue.js\nfunction clipByValue4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { clipValueMin, clipValueMax } = attrs;\n let program;\n const uniformData = [\n { type: \"float32\", data: [clipValueMin] },\n { type: \"float32\", data: [clipValueMax] }\n ];\n if (util_exports.sizeFromShape(x.shape) % 4 === 0) {\n program = new ClipVec4Program(x.shape);\n } else {\n program = new ClipProgram2(x.shape);\n }\n return backend2.runWebGPUProgram(program, [x], x.dtype, uniformData);\n}\nvar clipByValueConfig4 = {\n kernelName: ClipByValue,\n backendName: \"webgpu\",\n kernelFunc: clipByValue4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/concat_webgpu.js\nvar ConcatProgram2 = class {\n constructor(shapes) {\n this.uniforms = \"\";\n this.workPerThread = 1;\n this.workGroupSize = [64, 1, 1];\n this.size = true;\n this.outputShape = backend_util_exports.computeOutShape(shapes, 1);\n this.variableNames = shapes.map((_, i2) => `T${i2}`);\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize, [this.workPerThread, 1, 1]);\n this.offsetLength = shapes.length - 1;\n for (let i2 = 0; i2 < this.offsetLength; i2++) {\n this.uniforms += `offset${i2} : i32,`;\n }\n this.shaderKey = \"concat\";\n }\n getUserCode() {\n const snippets = [];\n if (this.offsetLength > 0) {\n snippets.push(`if (yC < uniforms.offset0){ setOutputAtCoords(coords.x, coords.y, getT0(yR, yC)); }`);\n for (let i2 = 1; i2 < this.offsetLength; i2++) {\n snippets.push(`else if (yC < uniforms.offset${[i2]}){ setOutputAtCoords(coords.x, coords.y, getT${i2}(yR, yC - uniforms.offset${i2 - 1})); }`);\n }\n const lastIndex = this.offsetLength;\n const lastShiftIndex = this.offsetLength - 1;\n snippets.push(`else { setOutputAtCoords(coords.x, coords.y, getT${lastIndex}(yR, yC - uniforms.offset${lastShiftIndex})); }`);\n } else {\n snippets.push(`setOutputAtCoords(coords.x, coords.y, getT0(yR, yC));`);\n }\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n for(var i = 0; i < ${this.workPerThread}; i = i + 1) {\n let flatIndex = index * ${this.workPerThread} + i;\n if(flatIndex < uniforms.size) {\n let coords = getCoordsFromIndex(flatIndex);\n let yR = coords.x;\n let yC = coords.y;\n\n ${snippets.join(\"\\n \")}\n }\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Imag.js\nfunction imag4(args) {\n const { inputs, backend: backend2 } = args;\n const { input: input2 } = inputs;\n const inputData = backend2.tensorMap.get(input2.dataId);\n return identity5({ inputs: { x: inputData.complexTensorInfos.imag }, backend: backend2 });\n}\nvar imagConfig3 = {\n kernelName: Imag,\n backendName: \"webgpu\",\n kernelFunc: imag4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Concat_impl.js\nfunction concatImpl3(inputs, axis, backend2) {\n const dtype = inputs[0].dtype;\n if (dtype === \"complex64\") {\n const reals = inputs.map((t2) => real4({ inputs: { input: t2 }, backend: backend2 }));\n const imags = inputs.map((t2) => imag4({ inputs: { input: t2 }, backend: backend2 }));\n const realConcated = concatImpl3(reals, axis, backend2);\n const imagConcated = concatImpl3(imags, axis, backend2);\n const result = complex4({ inputs: { real: realConcated, imag: imagConcated }, backend: backend2 });\n reals.forEach((r2) => backend2.disposeData(r2.dataId));\n imags.forEach((i2) => backend2.disposeData(i2.dataId));\n backend2.disposeData(realConcated.dataId);\n backend2.disposeData(imagConcated.dataId);\n return result;\n }\n let runOnCpu = backend2.shouldExecuteOnCPU(inputs);\n if (dtype === \"string\") {\n runOnCpu = true;\n }\n if (runOnCpu) {\n const tensors2D2 = inputs.map((t2) => {\n const innerSize = util_exports.sizeFromShape(t2.shape.slice(axis));\n const shape = [-1, innerSize];\n return reshape6({ inputs: { x: t2 }, backend: backend2, attrs: { shape } });\n });\n const inputsValShapes = tensors2D2.map((t2) => {\n return { vals: backend2.readSync(t2.dataId), shape: t2.shape };\n });\n const outShape2 = backend_util_exports.computeOutShape(tensors2D2.map((t2) => t2.shape), 1);\n const simplyConcat = tensors2D2[0].shape[0] === 1;\n const outVals = concatImplCPU2(inputsValShapes, outShape2, dtype, simplyConcat);\n const finalOutShape = backend_util_exports.computeOutShape(inputs.map((t2) => t2.shape), axis);\n const outInfo = backend2.makeTensorInfo(finalOutShape, dtype, outVals);\n tensors2D2.forEach((t2) => backend2.disposeData(t2.dataId));\n return outInfo;\n }\n const maxInputNum = backend2.device.limits.maxStorageBuffersPerShaderStage - 1;\n if (inputs.length > maxInputNum) {\n const reducedInputs = [];\n for (let i2 = 0; i2 < inputs.length; i2 += maxInputNum) {\n const subArray = inputs.slice(i2, i2 + maxInputNum);\n reducedInputs.push(concatImpl3(subArray, axis, backend2));\n }\n const result = concatImpl3(reducedInputs, axis, backend2);\n for (const i2 of reducedInputs) {\n backend2.disposeData(i2.dataId);\n }\n return result;\n }\n const { tensors2D, outShape } = computeTensors2D2(inputs, axis, backend2);\n const shapes = tensors2D.map((t2) => t2.shape);\n const program = new ConcatProgram2(shapes);\n const uniformData = [];\n const offsets = new Array(shapes.length - 1);\n if (offsets.length > 0) {\n offsets[0] = shapes[0][1];\n uniformData.push({ type: \"int32\", data: [offsets[0]] });\n for (let i2 = 1; i2 < offsets.length; i2++) {\n offsets[i2] = offsets[i2 - 1] + shapes[i2][1];\n uniformData.push({ type: \"int32\", data: [offsets[i2]] });\n }\n }\n const res = backend2.runWebGPUProgram(program, tensors2D, tensors2D[0].dtype, uniformData);\n tensors2D.forEach((r2) => backend2.disposeData(r2.dataId));\n const reshapedResult = reshape6({ inputs: { x: res }, backend: backend2, attrs: { shape: outShape } });\n backend2.disposeData(res.dataId);\n return reshapedResult;\n}\nfunction computeTensors2D2(inputs, axis, backend2) {\n const outShape = backend_util_exports.computeOutShape(inputs.map((t2) => t2.shape), axis);\n const tensors2D = inputs.map((t2) => reshape6({\n inputs: { x: t2 },\n backend: backend2,\n attrs: {\n shape: [\n util_exports.sizeFromShape(t2.shape.slice(0, axis)),\n util_exports.sizeFromShape(t2.shape.slice(axis))\n ]\n }\n }));\n return { tensors2D, outShape };\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Concat.js\nfunction concat5(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { axis } = attrs;\n const $axis = util_exports.parseAxisParam(axis, inputs[0].shape)[0];\n const shapes = inputs.map((t2) => t2.shape);\n backend_util_exports.assertParamsConsistent(shapes, $axis);\n const outShape = backend_util_exports.computeOutShape(inputs.map((t2) => t2.shape), $axis);\n if (util_exports.sizeFromShape(outShape) === 0) {\n return backend2.makeTensorInfo(outShape, inputs[0].dtype, []);\n }\n const $inputs = inputs.filter((t2) => util_exports.sizeFromShape(t2.shape) > 0);\n if ($inputs.length === 1) {\n return identity5({ inputs: { x: $inputs[0] }, backend: backend2 });\n }\n return concatImpl3($inputs, $axis, backend2);\n}\nvar concatConfig4 = {\n kernelName: Concat,\n backendName: \"webgpu\",\n kernelFunc: concat5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/conv2d_mm_webgpu.js\nfunction conv2dCommonSnippet(isChannelsLast, fitAOuter, fitBOuter, fitInner, addBias = false, activation2 = null, hasPreluActivationWeights = false, innerElementSizeX = 4, innerElementSizeW = 4, innerElementSize = 4) {\n const getXSnippet = (innerElementSize2) => {\n switch (innerElementSize2) {\n case 1:\n return \"resData = x[xIndex];\";\n case 3:\n return \"resData = vec3(x[xIndex], x[xIndex + 1], x[xIndex + 2]);\";\n case 4:\n return \"resData = x[xIndex / 4];\";\n default:\n throw new Error(`innerElementSize ${innerElementSize2} is not supported.`);\n }\n };\n const getWSnippet = (innerElementSize2) => {\n switch (innerElementSize2) {\n case 1:\n return \"return W[row * uniforms.wShape[3] + colIn];\";\n case 4:\n return \"return W[row * uniforms.wShape[3] / 4 + colIn];\";\n default:\n throw new Error(`innerElementSize ${innerElementSize2} is not supported.`);\n }\n };\n const coordASnippet = isChannelsLast ? `\n let coord = vec4(batch, xRow, xCol, xCh);\n ` : `\n let coord = vec4(batch, xCh, xRow, xCol);\n `;\n const coordResSnippet = isChannelsLast ? `\n let coords = vec4(\n batch,\n row / outWidth,\n row % outWidth,\n col);\n ` : `\n let coords = vec4(\n batch,\n row,\n col / outWidth,\n col % outWidth);\n `;\n const xHight = isChannelsLast ? \"uniforms.xShape[1]\" : \"uniforms.xShape[2]\";\n const xWidth = isChannelsLast ? \"uniforms.xShape[2]\" : \"uniforms.xShape[3]\";\n const row = isChannelsLast ? \"row\" : \"col\";\n const col = isChannelsLast ? \"col\" : \"row\";\n const readXSnippet = `\n let inChannels = uniforms.wShape[2];\n let outWidth = ${isChannelsLast ? \"uniforms.outShape[2]\" : \"uniforms.outShape[3]\"};\n let outRow = ${row} / outWidth;\n let outCol = ${row} % outWidth;\n\n let WRow = ${col} / (uniforms.filterDims[1] * inChannels);\n let WCol = ${col} / inChannels % uniforms.filterDims[1];\n let xRow = outRow * uniforms.stride[0] + uniforms.dilation[0] * WRow - uniforms.pad[0];\n let xCol = outCol * uniforms.stride[1] + uniforms.dilation[1] * WCol - uniforms.pad[1];\n let xCh = ${col} % inChannels;\n var resData = ${typeSnippet(innerElementSizeX)}(0.0);\n // The bounds checking is always needed since we use it to pad zero for\n // the 'same' padding type.\n if (xRow >= 0 && xRow < ${xHight} && xCol >= 0 && xCol < ${xWidth}) {\n ${coordASnippet}\n let xIndex = getIndexFromCoords4D(coord, uniforms.xShape);\n ${getXSnippet(innerElementSizeX)}\n }\n return resData;`;\n const sampleX = isChannelsLast ? fitAOuter && fitInner ? `\n let col = colIn * ${innerElementSizeX};\n ${readXSnippet}` : `\n let col = colIn * ${innerElementSizeX};\n if (row < uniforms.dimAOuter && col < uniforms.dimInner) {\n ${readXSnippet}\n }\n return ${typeSnippet(innerElementSizeX)}(0.0);` : fitInner && fitBOuter ? `\n let col = colIn * ${innerElementSizeX};\n ${readXSnippet}` : `\n let col = colIn * ${innerElementSizeX};\n if (row < uniforms.dimInner && col < uniforms.dimBOuter) {\n ${readXSnippet}\n }\n return ${typeSnippet(innerElementSizeX)}(0.0);`;\n const sampleW = `${getWSnippet(innerElementSizeW)}`;\n const resType = typeSnippet(innerElementSize);\n const aType = isChannelsLast ? typeSnippet(innerElementSizeX) : typeSnippet(innerElementSizeW);\n const bType = isChannelsLast ? typeSnippet(innerElementSizeW) : typeSnippet(innerElementSizeX);\n const userCode = `\n ${activationFnSnippet(activation2, hasPreluActivationWeights, innerElementSize === 4, 4)}\n fn mm_readA(batch: i32, row : i32, colIn : i32) -> ${aType} {\n ${isChannelsLast ? sampleX : sampleW}\n }\n\n fn mm_readB(batch: i32, row : i32, colIn : i32) -> ${bType} {\n ${isChannelsLast ? sampleW : sampleX}\n }\n\n fn mm_write(batch: i32, row : i32, colIn : i32, valueIn : ${resType}) {\n let col = colIn * ${innerElementSize};\n if (row < uniforms.dimAOuter && col < uniforms.dimBOuter)\n {\n var value = valueIn;\n let outWidth = ${isChannelsLast ? \"uniforms.outShape[2]\" : \"uniforms.outShape[3]\"};\n ${coordResSnippet}\n ${biasActivationSnippet(addBias, activation2)}\n setOutputAtCoords(coords[0], coords[1], coords[2], coords[3], value);\n }\n }`;\n return userCode;\n}\nvar Conv2DMMProgram = class {\n constructor(convInfo, dimAOuter, dimBOuter, dimInner, addBias = false, activation2 = null, hasPreluActivationWeights = false, sequentialAccessByThreads = false) {\n this.variableNames = [\"x\", \"W\"];\n this.uniforms = `filterDims : vec2, pad : vec2, stride : vec2, dilation : vec2, dimAOuter : i32, dimBOuter : i32, dimInner : i32,`;\n this.outputShape = convInfo.outShape;\n this.isChannelsLast = convInfo.dataFormat === \"channelsLast\";\n this.isVec4 = ((convInfo.inChannels % 4 === 0 || convInfo.inChannels % 3 === 0) && this.isChannelsLast || convInfo.outWidth % 4 === 0 && !this.isChannelsLast) && convInfo.outChannels % 4 === 0;\n this.dispatchLayout = this.isChannelsLast ? { x: [3], y: [1, 2], z: [0] } : { x: [2, 3], y: [1], z: [0] };\n this.workGroupSize = computeWorkGroupSizeForConv2d(this.dispatchLayout, this.outputShape, this.isVec4);\n this.elementsPerThread = computeWorkPerThreadForConv2d(this.dispatchLayout, this.outputShape, this.isVec4);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize, this.elementsPerThread);\n if (this.isVec4) {\n if (this.isChannelsLast && convInfo.inChannels % 4 !== 0) {\n this.innerElementSize = 3;\n this.variableTypes = [\"f32\", \"vec4\"];\n } else {\n this.innerElementSize = 4;\n this.variableTypes = [\"vec4\", \"vec4\"];\n }\n if (addBias) {\n this.variableNames.push(\"bias\");\n this.variableTypes.push(\"vec4\");\n }\n if (hasPreluActivationWeights) {\n this.variableNames.push(\"preluActivationWeights\");\n this.variableTypes.push(\"vec4\");\n }\n } else {\n this.innerElementSize = this.elementsPerThread[0];\n if (addBias) {\n this.variableNames.push(\"bias\");\n }\n if (hasPreluActivationWeights) {\n this.variableNames.push(\"preluActivationWeights\");\n }\n }\n this.sequentialAccessByThreads = sequentialAccessByThreads;\n this.addBias = addBias;\n this.activation = activation2;\n this.hasPreluActivationWeights = hasPreluActivationWeights;\n this.tileAOuter = this.workGroupSize[1] * this.elementsPerThread[1];\n this.tileBOuter = this.workGroupSize[0] * this.elementsPerThread[0];\n this.tileInner = Math.max(this.workGroupSize[0] * this.innerElementSize, this.workGroupSize[1]);\n this.fitAOuter = dimAOuter % this.tileAOuter === 0;\n this.fitBOuter = dimBOuter % this.tileBOuter === 0;\n this.fitInner = dimInner % this.tileInner === 0;\n this.shaderKey = `conv2DMM_${this.elementsPerThread}_${this.activation}}_${this.fitAOuter}_${this.fitBOuter}_${this.fitInner}_${this.isVec4}_${this.innerElementSize}_${this.isChannelsLast}_${this.sequentialAccessByThreads}`;\n }\n getUserCode() {\n const matMulSource = this.isVec4 ? makeMatMulPackedVec4Source(this.elementsPerThread, this.workGroupSize, !this.isChannelsLast, this.tileInner) : makeMatMulPackedSource(this.elementsPerThread, this.workGroupSize, !this.isChannelsLast, this.tileInner, false, null, this.sequentialAccessByThreads);\n const elementsSize = this.isVec4 ? [this.innerElementSize, 4, 4] : [1, 1, 1];\n const userCode = `\n ${conv2dCommonSnippet(this.isChannelsLast, this.fitAOuter, this.fitBOuter, this.fitInner, this.addBias, this.activation, this.hasPreluActivationWeights, elementsSize[0], elementsSize[1], elementsSize[2])}\n ${matMulSource}\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/conv2d_naive_webgpu.js\nvar Conv2DNaiveProgram = class {\n constructor(convInfo, addBias = false, activation2 = null, hasPreluActivationWeights = false) {\n this.variableNames = [\"x\", \"W\"];\n this.uniforms = \"filterDims: vec2, pad: vec2, stride: vec2, dilation: vec2,\";\n this.workGroupSize = [4, 4, 8];\n this.outputShape = convInfo.outShape;\n this.isChannelsLast = convInfo.dataFormat === \"channelsLast\";\n this.dispatchLayout = this.isChannelsLast ? { x: [2], y: [1], z: [0, 3] } : { x: [3], y: [2], z: [0, 1] };\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.addBias = addBias;\n this.activation = activation2;\n this.hasPreluActivationWeights = hasPreluActivationWeights;\n if (addBias) {\n this.variableNames.push(\"bias\");\n }\n if (hasPreluActivationWeights) {\n this.variableNames.push(\"preluActivationWeights\");\n }\n this.shaderKey = `conv2dnaive_${this.activation}_${this.isChannelsLast}`;\n }\n getUserCode() {\n const userCode = `\n ${activationFnSnippet(this.activation, this.hasPreluActivationWeights, false, 4)}\n fn readInp(batch : i32, row : i32, col : i32, chan : i32) -> f32{\n let coords = vec4(batch, row, col, chan);\n if (coordsInBounds4D(coords, uniforms.xShape)) {\n return getX(batch, row, col, chan);\n } else {\n return 0.0;\n }\n }\n fn readFilt(row : i32, col : i32, xChannel : i32, outChannel : i32) -> f32{\n let coords = vec4(row, col, xChannel, outChannel);\n if(coordsInBounds4D(coords, uniforms.wShape)) {\n return getW(row, col, xChannel, outChannel);\n } else {\n return 0.0;\n }\n }\n fn writeResult(batch : i32, row : i32, col : i32, chan : i32, valueIn : f32) {\n let coords = ${this.isChannelsLast ? `vec4(batch, row, col, chan);` : `vec4(batch, chan, row, col);`}\n if (coordsInBounds4D(coords, uniforms.outShape)) {\n var value = valueIn;\n ${biasActivationSnippet(this.addBias, this.activation)}\n setOutputAtCoords(coords.x, coords.y, coords.z, coords.w, value);\n }\n }\n ${getMainHeaderString(\"index\")} {\n let coords = getOutputCoords();\n let batch = coords[0];\n let outChannel = ${this.isChannelsLast ? `coords[3];` : `coords[1];`}\n let outRow = ${this.isChannelsLast ? `coords[1];` : `coords[2];`}\n let outCol = ${this.isChannelsLast ? `coords[2];` : `coords[3];`}\n var acc : f32 = 0.0;\n for (var row = 0; row < uniforms.filterDims[0]; row = row + 1) {\n for (var col = 0; col < uniforms.filterDims[1]; col = col + 1) {\n let xRow = outRow * uniforms.stride[0] + uniforms.dilation[0] * row - uniforms.pad[0];\n let xCol = outCol * uniforms.stride[1] + uniforms.dilation[1] * col - uniforms.pad[1];\n for (var xChannel = 0; xChannel < ${this.isChannelsLast ? `uniforms.xShape[3];` : `uniforms.xShape[1];`} xChannel = xChannel + 1) {\n ${this.isChannelsLast ? `let v = readInp(batch, xRow, xCol, xChannel);` : `let v = readInp(batch, xChannel, xRow, xCol);`}\n let f = readFilt(row, col, xChannel, outChannel);\n acc = acc + v * f;\n }\n }\n }\n writeResult(batch, outRow, outCol, outChannel, acc);\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Conv2D_impl.js\nfunction getShapeForBatchMatMul2(shape, isChannelsLast) {\n const length = shape.length;\n if (length >= 3) {\n return isChannelsLast ? [\n ...shape.slice(0, -3),\n shape[length - 3] * shape[length - 2],\n shape[length - 1]\n ] : [\n ...shape.slice(0, -3),\n shape[length - 3],\n shape[length - 2] * shape[length - 1]\n ];\n } else if (!isChannelsLast && length === 1 && shape[0] > 1) {\n return [shape[0], 1];\n } else {\n return null;\n }\n}\nfunction conv2dByMatMul2({ x, filter, convInfo, backend: backend2, bias = null, preluActivationWeights = null, leakyreluAlpha = 0, activation: activation2 = null }) {\n const isChannelsLast = convInfo.dataFormat === \"channelsLast\";\n const transposeA = isChannelsLast ? false : true;\n const transposeB = false;\n const sameSize = isChannelsLast && convInfo.filterHeight === convInfo.inHeight && convInfo.filterWidth === convInfo.inWidth && convInfo.padInfo.type === \"VALID\";\n const intermediates = [];\n let xReshaped;\n let filterReshaped;\n if (sameSize) {\n const sharedDim = convInfo.inHeight * convInfo.inWidth * convInfo.inChannels;\n xReshaped = reshape6({\n inputs: { x },\n backend: backend2,\n attrs: { shape: [1, convInfo.batchSize, sharedDim] }\n });\n filterReshaped = reshape6({\n inputs: { x: filter },\n backend: backend2,\n attrs: { shape: [1, sharedDim, convInfo.outChannels] }\n });\n } else {\n xReshaped = reshape6({\n inputs: { x },\n backend: backend2,\n attrs: {\n shape: isChannelsLast ? [\n convInfo.batchSize,\n convInfo.inHeight * convInfo.inWidth,\n convInfo.inChannels\n ] : [\n convInfo.batchSize,\n convInfo.inChannels,\n convInfo.inHeight * convInfo.inWidth\n ]\n }\n });\n filterReshaped = reshape6({\n inputs: { x: filter },\n backend: backend2,\n attrs: { shape: [1, convInfo.inChannels, convInfo.outChannels] }\n });\n }\n intermediates.push(xReshaped);\n intermediates.push(filterReshaped);\n if (preluActivationWeights != null) {\n const targetShape = getShapeForBatchMatMul2(preluActivationWeights.shape, isChannelsLast);\n if (targetShape != null) {\n preluActivationWeights = reshape6({\n inputs: { x: preluActivationWeights },\n backend: backend2,\n attrs: { shape: targetShape }\n });\n intermediates.push(preluActivationWeights);\n }\n }\n if (bias != null) {\n const targetShape = getShapeForBatchMatMul2(bias.shape, isChannelsLast);\n if (targetShape != null) {\n bias = reshape6({ inputs: { x: bias }, backend: backend2, attrs: { shape: targetShape } });\n intermediates.push(bias);\n }\n }\n const result = batchMatMulImpl2({\n a: isChannelsLast ? xReshaped : filterReshaped,\n b: isChannelsLast ? filterReshaped : xReshaped,\n transposeA,\n transposeB,\n backend: backend2,\n bias,\n activation: activation2,\n preluActivationWeights,\n leakyreluAlpha\n });\n const out = reshape6({ inputs: { x: result }, backend: backend2, attrs: { shape: convInfo.outShape } });\n intermediates.push(result);\n for (const i2 of intermediates) {\n backend2.disposeData(i2.dataId);\n }\n return out;\n}\nfunction conv2DImpl({ x, filter, convInfo, backend: backend2, bias = null, preluActivationWeights = null, leakyreluAlpha = 0, activation: activation2 = null }) {\n const hasBias = bias != null;\n const hasPreluActivationWeights = preluActivationWeights != null;\n const isChannelsLast = convInfo.dataFormat === \"channelsLast\";\n const sameSize = isChannelsLast && convInfo.filterHeight === convInfo.inHeight && convInfo.filterWidth === convInfo.inWidth && convInfo.padInfo.type === \"VALID\";\n const useNaiveConv2d = env().getBool(\"WEBGPU_USE_NAIVE_CONV2D_DEBUG\");\n if (!useNaiveConv2d && (sameSize || convInfo.filterHeight === 1 && convInfo.filterWidth === 1 && convInfo.dilationHeight === 1 && convInfo.dilationWidth === 1 && convInfo.strideHeight === 1 && convInfo.strideWidth === 1 && (convInfo.padInfo.type === \"SAME\" || convInfo.padInfo.type === \"VALID\"))) {\n return conv2dByMatMul2({\n x,\n filter,\n convInfo,\n backend: backend2,\n bias,\n activation: activation2,\n preluActivationWeights,\n leakyreluAlpha\n });\n }\n let program;\n const padInfo = [convInfo.padInfo.top, convInfo.padInfo.left];\n const dimensions = [\n { type: \"int32\", data: [convInfo.filterHeight, convInfo.filterWidth] },\n { type: \"int32\", data: [...padInfo] },\n { type: \"int32\", data: [convInfo.strideHeight, convInfo.strideWidth] },\n { type: \"int32\", data: [convInfo.dilationHeight, convInfo.dilationWidth] }\n ];\n if (useNaiveConv2d) {\n program = new Conv2DNaiveProgram(convInfo, hasBias, activation2, hasPreluActivationWeights);\n } else {\n const dimAOuter = isChannelsLast ? convInfo.outHeight * convInfo.outWidth : convInfo.outChannels;\n const dimBOuter = isChannelsLast ? convInfo.outChannels : convInfo.outHeight * convInfo.outWidth;\n const dimInner = convInfo.filterHeight * convInfo.filterWidth * convInfo.inChannels;\n dimensions.push({ type: \"int32\", data: [dimAOuter] }, { type: \"int32\", data: [dimBOuter] }, { type: \"int32\", data: [dimInner] });\n const sequentialAccessByThreads = backend2.adapterInfo.isIntel();\n program = new Conv2DMMProgram(convInfo, dimAOuter, dimBOuter, dimInner, hasBias, activation2, hasPreluActivationWeights, sequentialAccessByThreads);\n }\n const intermediates = [];\n const inputVar = [x, filter];\n if (hasBias) {\n if (!isChannelsLast && bias.shape.length === 1) {\n bias = reshape6({ inputs: { x: bias }, backend: backend2, attrs: { shape: [bias.shape[0], 1, 1] } });\n intermediates.push(bias);\n }\n inputVar.push(bias);\n }\n if (hasPreluActivationWeights) {\n if (!isChannelsLast && preluActivationWeights.shape.length === 1) {\n preluActivationWeights = reshape6({\n inputs: { x: preluActivationWeights },\n backend: backend2,\n attrs: { shape: [preluActivationWeights.shape[0], 1, 1] }\n });\n intermediates.push(preluActivationWeights);\n }\n inputVar.push(preluActivationWeights);\n }\n if (activation2 === \"leakyrelu\") {\n dimensions.push({ type: \"float32\", data: [leakyreluAlpha] });\n program.uniforms += \" alpha : f32,\";\n }\n const out = backend2.runWebGPUProgram(program, inputVar, x.dtype, dimensions);\n for (const i2 of intermediates) {\n backend2.disposeData(i2.dataId);\n }\n return out;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Conv2D.js\nfunction conv2d6(args) {\n const { inputs, attrs, backend: backend2 } = args;\n const { x, filter } = inputs;\n const { strides, pad: pad3, dataFormat, dilations, dimRoundingMode } = attrs;\n const $dataFormat = backend_util_exports.convertConv2DDataFormat(dataFormat);\n const convInfo = backend_util_exports.computeConv2DInfo(x.shape, filter.shape, strides, dilations, pad3, dimRoundingMode, false, $dataFormat);\n return conv2DImpl({ x, filter, convInfo, backend: backend2 });\n}\nvar conv2DConfig4 = {\n kernelName: Conv2D,\n backendName: \"webgpu\",\n kernelFunc: conv2d6\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/conv_backprop_mm_webgpu.js\nfunction conv2dTransposeCommonSnippet(innerElementSize = 4) {\n const getWSnippet = (innerElementSize2) => {\n switch (innerElementSize2) {\n case 1:\n return \"return W[getIndexFromCoords4D(coord, uniforms.wShape)];\";\n case 4:\n return `\n let coord1 = vec4(coordX, coordY, col + 1, rowInner);\n let coord2 = vec4(coordX, coordY, col + 2, rowInner);\n let coord3 = vec4(coordX, coordY, col + 3, rowInner);\n let v0 = W[getIndexFromCoords4D(coord, uniforms.wShape)];\n let v1 = W[getIndexFromCoords4D(coord1, uniforms.wShape)];\n let v2 = W[getIndexFromCoords4D(coord2, uniforms.wShape)];\n let v3 = W[getIndexFromCoords4D(coord3, uniforms.wShape)];\n return vec4(v0, v1, v2, v3);\n `;\n default:\n throw new Error(`innerElementSize ${innerElementSize2} is not supported.`);\n }\n };\n const readASnippet = `\n let outRow = row / uniforms.outShape[2];\n let outCol = row % uniforms.outShape[2];\n\n let WRow = col / (uniforms.filterDims[1] * uniforms.outBackprop[3]);\n let WCol = col / uniforms.outBackprop[3] % uniforms.filterDims[1];\n let xR = f32(outRow - uniforms.pads[0] + WRow) / f32(uniforms.stride[0]);\n let xC = f32(outCol - uniforms.pads[1] + WCol) / f32(uniforms.stride[1]);\n if (xR < 0.0 || xR >= f32(uniforms.outBackprop[1]) || fract(xR) > 0.0) {\n return ${typeSnippet(innerElementSize)}(0.0);\n }\n if (xC < 0.0 || xC >= f32(uniforms.outBackprop[2]) || fract(xC) > 0.0) {\n return ${typeSnippet(innerElementSize)}(0.0);\n }\n let coord = vec4(\n batch,\n i32(xR),\n i32(xC),\n col % uniforms.outBackprop[3]);\n return x[getIndexFromCoords4D(coord, uniforms.xShape)/${innerElementSize}];`;\n const sampleA = `if (row < uniforms.dimAOuter && col < uniforms.dimInner) {\n ${readASnippet}\n }\n return ${typeSnippet(innerElementSize)}(0.0);`;\n const userCode = `\n fn mm_readA(batch: i32, row : i32, colIn : i32) -> ${typeSnippet(innerElementSize)} {\n let col = colIn * ${innerElementSize};\n ${sampleA}\n }\n\n fn mm_readB(batch: i32, row : i32, colIn : i32) -> ${typeSnippet(innerElementSize)} {\n let col = colIn * ${innerElementSize};\n let coordX = uniforms.filterDims.x - 1 -\n row / (uniforms.filterDims[1] * uniforms.outBackprop[3]);\n let coordY = uniforms.filterDims.y - 1 -\n (row / uniforms.outBackprop[3]) % uniforms.filterDims[1];\n if (row < uniforms.dimInner && col < uniforms.dimBOuter &&\n coordX >= 0 && coordY >= 0) {\n let rowInner = row % uniforms.outBackprop[3];\n let coord = vec4(coordX, coordY, col, rowInner);\n ${getWSnippet(innerElementSize)}\n }\n return ${typeSnippet(innerElementSize)}(0.0);\n }\n\n fn mm_write(batch: i32, row : i32, colIn : i32, valueInput : ${typeSnippet(innerElementSize)}) {\n let col = colIn * ${innerElementSize};\n if (row < uniforms.dimAOuter && (col + ${innerElementSize - 1}) < uniforms.dimBOuter) {\n var value = valueInput;\n let outCoord = vec4(\n batch,\n row / uniforms.outShape[2],\n row % uniforms.outShape[2],\n col);\n result[getIndexFromCoords4D(outCoord, uniforms.outShape)/${innerElementSize}] = value;\n }\n }`;\n return userCode;\n}\nvar Conv2DDerInputMMProgram = class {\n constructor(convInfo) {\n this.variableNames = [\"x\", \"W\"];\n this.uniforms = \"filterDims : vec2, pads : vec2, stride : vec2, outBackprop : vec4, dimAOuter : i32, dimBOuter : i32, dimInner : i32,\";\n this.outputShape = convInfo.inShape;\n util_exports.assert(convInfo.dataFormat === \"channelsLast\", () => \"TODO: NCHW is unimplemented\");\n this.isVec4 = convInfo.inChannels % 4 === 0 && convInfo.outChannels % 4 === 0;\n this.dispatchLayout = { x: [3], y: [1, 2], z: [0] };\n this.workGroupSize = computeWorkGroupSizeForConv2d(this.dispatchLayout, this.outputShape, this.isVec4);\n this.elementsPerThread = computeWorkPerThreadForConv2d(this.dispatchLayout, this.outputShape, this.isVec4);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize, this.elementsPerThread);\n if (this.isVec4) {\n this.variableTypes = [\"vec4\", \"f32\"];\n }\n this.shaderKey = `conv2DDerInputMM_${this.isVec4}_${this.elementsPerThread}`;\n }\n getUserCode() {\n const matMulSource = this.isVec4 ? makeMatMulPackedVec4Source(this.elementsPerThread, this.workGroupSize) : makeMatMulPackedSource(this.elementsPerThread, this.workGroupSize);\n const userCode = `\n ${conv2dTransposeCommonSnippet(this.isVec4 ? 4 : 1)}\n ${matMulSource}\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/conv_backprop_webgpu.js\nvar Conv2DDerInputProgram2 = class {\n constructor(convInfo) {\n this.variableNames = [\"dy\", \"W\"];\n this.uniforms = \"filterDims : vec2, pads : vec2, stride : vec2, outBackprop : vec4,\";\n this.workGroupSize = [64, 1, 1];\n this.size = true;\n this.outputShape = convInfo.inShape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.isChannelsLast = convInfo.dataFormat === \"channelsLast\";\n this.shaderKey = `conv2DDerInput_${this.isChannelsLast}`;\n }\n getUserCode() {\n const rowDim = this.isChannelsLast ? 1 : 2;\n const colDim = this.isChannelsLast ? 2 : 3;\n const channelDim = this.isChannelsLast ? 3 : 1;\n return `\n ${getMainHeaderString(\"index\")} {\n if(index < uniforms.size) {\n let coords = getCoordsFromIndex(index);\n let batch = coords[0];\n let d1 = coords[${channelDim}];\n\n let dyCorner = vec2(coords[${rowDim}], coords[${colDim}]) - uniforms.pads;\n let dyRCorner = dyCorner.x;\n let dyCCorner = dyCorner.y;\n\n // Convolve dy(?, ?, d2) with w(:, :, d1, d2) to compute dx(xR, xC, d1).\n // ? = to be determined. : = across all values in that axis.\n var dotProd = 0.0;\n for (var wR = 0; wR < uniforms.filterDims.x; wR = wR + 1) {\n let dyR = (f32(dyRCorner) + f32(wR)) / f32(uniforms.stride.x);\n let wRPerm = uniforms.filterDims.x - 1 - wR;\n if (dyR < 0.0 || dyR >= f32(uniforms.outBackprop[1]) || fract(dyR) > 0.0 ||\n wRPerm < 0) {\n continue;\n }\n let idyR = i32(dyR);\n\n for (var wC = 0; wC < uniforms.filterDims.y; wC = wC + 1) {\n let dyC = (f32(dyCCorner) + f32(wC)) / f32(uniforms.stride.y);\n let wCPerm = uniforms.filterDims.y - 1 - wC;\n if (dyC < 0.0 || dyC >= f32(uniforms.outBackprop[2]) ||\n fract(dyC) > 0.0 || wCPerm < 0) {\n continue;\n }\n let idyC = i32(dyC);\n\n for (var d2 = 0; d2 < uniforms.outBackprop[3]; d2 = d2 + 1) {\n if (${this.isChannelsLast}) {\n let xValue = getDy(batch, idyR, idyC, d2);\n let wValue = getW(wRPerm, wCPerm, d1, d2);\n dotProd = dotProd + xValue * wValue;\n } else {\n let xValue = getDy(batch, d2, idyR, idyC);\n let wValue = getW(wRPerm, wCPerm, d1, d2);\n dotProd = dotProd + xValue * wValue;\n }\n\n }\n }\n }\n setOutputAtIndex(index, dotProd);\n }\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Conv2DBackpropInput.js\nfunction conv2DBackpropInput5(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { dy, filter } = inputs;\n const { inputShape, strides, pad: pad3, dataFormat, dimRoundingMode } = attrs;\n const $dataFormat = backend_util_exports.convertConv2DDataFormat(dataFormat);\n const convInfo = backend_util_exports.computeConv2DInfo(inputShape, filter.shape, strides, 1, pad3, dimRoundingMode, false, $dataFormat);\n const dimensions = [\n { type: \"int32\", data: [convInfo.filterHeight, convInfo.filterWidth] },\n {\n type: \"int32\",\n data: [\n convInfo.filterHeight - 1 - convInfo.padInfo.top,\n convInfo.filterWidth - 1 - convInfo.padInfo.left\n ]\n },\n { type: \"int32\", data: [convInfo.strideHeight, convInfo.strideWidth] },\n {\n type: \"int32\",\n data: [\n convInfo.batchSize,\n convInfo.outHeight,\n convInfo.outWidth,\n convInfo.outChannels\n ]\n }\n ];\n let program;\n if (env().getBool(\"WEBGPU_USE_NAIVE_CONV2D_TRANSPOSE\") || convInfo.filterHeight <= 2 && convInfo.filterWidth <= 2 && convInfo.outChannels <= 16 && convInfo.inChannels === 1) {\n program = new Conv2DDerInputProgram2(convInfo);\n } else {\n program = new Conv2DDerInputMMProgram(convInfo);\n const dimAOuter = convInfo.inHeight * convInfo.inWidth;\n const dimBOuter = convInfo.inChannels;\n const dimInner = convInfo.filterHeight * convInfo.filterWidth * convInfo.outChannels;\n dimensions.push({ type: \"uint32\", data: [dimAOuter] }, { type: \"uint32\", data: [dimBOuter] }, { type: \"uint32\", data: [dimInner] });\n }\n return backend2.runWebGPUProgram(program, [dy, filter], \"float32\", dimensions);\n}\nvar conv2DBackpropInputConfig4 = {\n kernelName: Conv2DBackpropInput,\n backendName: \"webgpu\",\n kernelFunc: conv2DBackpropInput5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Cos.js\nvar cos4 = unaryKernelFunc3({ opType: UnaryOpType.COS });\nvar cosConfig4 = {\n kernelName: Cos,\n backendName: \"webgpu\",\n kernelFunc: cos4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Cosh.js\nvar cosh4 = unaryKernelFunc3({ opType: UnaryOpType.COSH });\nvar coshConfig4 = {\n kernelName: Cosh,\n backendName: \"webgpu\",\n kernelFunc: cosh4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/crop_and_resize_webgpu.js\nvar CropAndResizeProgram2 = class {\n constructor(channnel, boxShape, cropSize, method) {\n this.variableNames = [\"Image\", \"Boxes\", \"BoxInd\"];\n this.uniforms = \"extrapolationValue : f32,\";\n this.workGroupSize = [64, 1, 1];\n this.size = true;\n const [numBoxes] = boxShape;\n this.outputShape = [numBoxes, cropSize[0], cropSize[1], channnel];\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.methodId = method === \"bilinear\" ? 1 : 0;\n this.cropHeightBiggerThan1 = this.outputShape[1] > 1;\n this.cropWidthBiggerThan1 = this.outputShape[2] > 1;\n this.shaderKey = `cropAndResize_${this.methodId}_${this.cropHeightBiggerThan1}_${this.cropWidthBiggerThan1}`;\n }\n getUserCode() {\n const [inputHeightFloat, inputWidthFloat] = [`f32(uniforms.imageShape[1] - 1)`, `f32(uniforms.imageShape[2] - 1)`];\n const [heightRatio, heightScale, inY] = this.cropHeightBiggerThan1 ? [\n `(${inputHeightFloat} / f32(uniforms.outShape[1] - 1))`,\n \"(y2-y1) * height_ratio\",\n `y1*${inputHeightFloat} + f32(y)*(height_scale)`\n ] : [\n \"0.0\",\n \"0.0\",\n `0.5 * (y1+y2) * ${inputHeightFloat}`\n ];\n const [widthRatio, widthScale, inX] = this.cropWidthBiggerThan1 ? [\n `(${inputWidthFloat} / f32(uniforms.outShape[2] - 1))`,\n \"(x2-x1) * width_ratio\",\n `x1*${inputWidthFloat} + f32(x)*(width_scale)`\n ] : [\n \"0.0\",\n \"0.0\",\n `0.5 * (x1+x2) * ${inputWidthFloat}`\n ];\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let coords = getCoordsFromIndex(index);\n let height_ratio = f32(${heightRatio});\n let width_ratio = f32(${widthRatio});\n let b = coords[0];\n let y = coords[1];\n let x = coords[2];\n let d = coords[3];\n // get box vals\n let y1 = getBoxes(b, 0);\n let x1 = getBoxes(b, 1);\n let y2 = getBoxes(b, 2);\n let x2 = getBoxes(b, 3);\n // get image in batch index\n let bInd = i32(round(getBoxInd(b)));\n if(bInd < 0 || bInd >= uniforms.outShape[0]) {\n return;\n }\n let height_scale = ${heightScale};\n let width_scale = ${widthScale};\n let in_y = ${inY};\n if( in_y < 0.0 || in_y > ${inputHeightFloat} ) {\n setOutputAtIndex(index, uniforms.extrapolationValue);\n return;\n }\n let in_x = ${inX};\n if( in_x < 0.0 || in_x > ${inputWidthFloat} ) {\n setOutputAtIndex(index, uniforms.extrapolationValue);\n return;\n }\n let sourceFracIndexCR = vec2(in_x,in_y);\n if(${this.methodId} == 1) {\n // Compute the four integer indices.\n let sourceFloorCR = vec2(sourceFracIndexCR);\n let sourceCeilCR = vec2(ceil(sourceFracIndexCR));\n let topLeft = getImage(bInd, sourceFloorCR.y, sourceFloorCR.x, d);\n let bottomLeft = getImage(bInd, sourceCeilCR.y, sourceFloorCR.x, d);\n let topRight = getImage(bInd, sourceFloorCR.y, sourceCeilCR.x, d);\n let bottomRight = getImage(bInd, sourceCeilCR.y, sourceCeilCR.x, d);\n let fracCR = sourceFracIndexCR - vec2(sourceFloorCR);\n let top = topLeft + (topRight - topLeft) * fracCR.x;\n let bottom = bottomLeft + (bottomRight - bottomLeft) * fracCR.x;\n let newValue = top + (bottom - top) * fracCR.y;\n setOutputAtIndex(index, newValue);\n } else {\n // Compute the coordinators of nearest neighbor point.\n let sourceNearestCR = vec2(floor(\n sourceFracIndexCR + vec2(0.5,0.5)));\n let newValue = getImage(\n bInd, sourceNearestCR.y, sourceNearestCR.x, d);\n setOutputAtIndex(index, newValue);\n }\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/CropAndResize.js\nvar cropAndResize5 = (args) => {\n const { inputs, backend: backend2, attrs } = args;\n const { image: image2, boxes, boxInd } = inputs;\n const { cropSize, method, extrapolationValue } = attrs;\n const program = new CropAndResizeProgram2(image2.shape[3], boxes.shape, cropSize, method);\n const uniformData = [{ type: \"float32\", data: [extrapolationValue] }];\n return backend2.runWebGPUProgram(program, [image2, boxes, boxInd], \"float32\", uniformData);\n};\nvar cropAndResizeConfig4 = {\n kernelName: CropAndResize,\n backendName: \"webgpu\",\n kernelFunc: cropAndResize5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/cum_webgpu.js\nvar CumOpType2;\n(function(CumOpType3) {\n CumOpType3[\"Prod\"] = \"*\";\n CumOpType3[\"Sum\"] = \"+\";\n})(CumOpType2 || (CumOpType2 = {}));\nvar CumProgram2 = class {\n constructor(op2, shape, exclusive, reverse5) {\n this.variableNames = [\"x\"];\n this.uniforms = \"index : f32,\";\n this.size = true;\n const workGroupSizeX = 128;\n this.workGroupSize = [workGroupSizeX, 1, 1];\n this.outputShape = shape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.exclusive = exclusive;\n this.reverse = reverse5;\n this.op = op2;\n this.shaderKey = `cum_${this.op}_${this.exclusive}_${this.reverse}`;\n }\n getUserCode() {\n const rank = this.outputShape.length;\n const initVal = this.op === CumOpType2.Prod ? \"1.0\" : \"0.0\";\n const val = this.exclusive ? initVal : `getX(${getCoords4(rank, \"coords\", this.op)})`;\n const length = this.outputShape[this.outputShape.length - 1];\n let condition = \"\";\n let idxString = \"\";\n if (this.exclusive) {\n condition = this.reverse ? `end != ${length - 1}` : \"end != 0\";\n idxString = this.reverse ? \"end + 1\" : \"end - 1\";\n } else {\n condition = this.reverse ? `end + pow2 < ${length}` : \"end >= pow2\";\n idxString = this.reverse ? \"end + pow2\" : \"end - pow2\";\n }\n return `\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n var coords = getCoordsFromIndex(index);\n\n let end = ${getFinalCoord2(rank, \"coords\", this.op)};\n var val = ${val};\n let pow2 = i32(pow(2.0, uniforms.index));\n if (${condition}) {\n let idx = ${idxString};\n ${getFinalCoord2(rank, \"coords\", this.op)} = idx;\n val ${this.op}= getX(${getCoords4(rank, \"coords\", this.op)});\n }\n setOutputAtIndex(index, val);\n }\n }\n `;\n }\n};\nfunction getCoords4(rank, name, op2) {\n if (rank === 1) {\n return `${name}`;\n } else if (rank === 2) {\n return `${name}.x, ${name}.y`;\n } else if (rank === 3) {\n return `${name}.x, ${name}.y, ${name}.z`;\n } else if (rank === 4) {\n return `${name}.x, ${name}.y, ${name}.z, ${name}.w`;\n } else {\n throw Error(`Cumulative ${op2} for rank ${rank} is not yet supported`);\n }\n}\nfunction getFinalCoord2(rank, name, op2) {\n if (rank === 1) {\n return `${name}`;\n } else if (rank === 2) {\n return `${name}.y`;\n } else if (rank === 3) {\n return `${name}.z`;\n } else if (rank === 4) {\n return `${name}.w`;\n } else {\n throw Error(`Cumulative ${op2} for rank ${rank} is not yet supported`);\n }\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Cum_impl.js\nfunction cumImpl2(op2, x, backend2, axis, exclusive, reverse5) {\n const xRank = x.shape.length;\n const permutation = backend_util_exports.getAxesPermutation([axis], xRank);\n let permutedX = x;\n if (permutation != null) {\n permutedX = transpose5({ inputs: { x }, backend: backend2, attrs: { perm: permutation } });\n }\n const permutedAxis = backend_util_exports.getInnerMostAxes(1, xRank)[0];\n if (permutedAxis !== xRank - 1) {\n throw new Error(`WebGPU cumprod shader expects an inner-most axis=${x.shape.length - 1} but got axis=${axis}`);\n }\n const size = permutedX.shape[permutedAxis];\n let result = identity5({ inputs: { x: permutedX }, backend: backend2 });\n for (let i2 = 0; i2 <= Math.ceil(Math.log2(size)) - 1; i2++) {\n const program = new CumProgram2(op2, permutedX.shape, false, reverse5);\n const prevResult = result;\n const uniformData = [{ type: \"float32\", data: [i2] }];\n result = backend2.runWebGPUProgram(program, [result], result.dtype, uniformData);\n backend2.disposeData(prevResult.dataId);\n }\n if (exclusive) {\n const program = new CumProgram2(op2, permutedX.shape, exclusive, reverse5);\n const prevResult = result;\n const uniformData = [{ type: \"float32\", data: [0] }];\n result = backend2.runWebGPUProgram(program, [result], result.dtype, uniformData);\n backend2.disposeData(prevResult.dataId);\n }\n if (permutation != null) {\n const reversePermutation = backend_util_exports.getUndoAxesPermutation(permutation);\n const reverseTransposedResult = transpose5({ inputs: { x: result }, backend: backend2, attrs: { perm: reversePermutation } });\n backend2.disposeData(result.dataId);\n backend2.disposeData(permutedX.dataId);\n return reverseTransposedResult;\n }\n return result;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Cumprod.js\nfunction cumprod5(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis, exclusive, reverse: reverse5 } = attrs;\n return cumImpl2(CumOpType2.Prod, x, backend2, axis, exclusive, reverse5);\n}\nvar cumprodConfig4 = {\n kernelName: Cumprod,\n backendName: \"webgpu\",\n kernelFunc: cumprod5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Cumsum.js\nfunction cumsum5(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis, exclusive, reverse: reverse5 } = attrs;\n return cumImpl2(CumOpType2.Sum, x, backend2, axis, exclusive, reverse5);\n}\nvar cumsumConfig4 = {\n kernelName: Cumsum,\n backendName: \"webgpu\",\n kernelFunc: cumsum5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/depth_to_space_webgpu.js\nvar DepthToSpaceProgram2 = class {\n constructor(outputShape, dataFormat) {\n this.variableNames = [\"x\"];\n this.workGroupSize = [64, 1, 1];\n this.size = true;\n this.uniforms = \"blockSize : i32,\";\n this.outputShape = outputShape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.shaderKey = `depthToSpace_${dataFormat}`;\n this.dataFormat = dataFormat;\n }\n getUserCode() {\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let coords = getCoordsFromIndex(index);\n let b = coords[0];\n let h = ${this.getHeightCoordString()};\n let w = ${this.getWidthCoordString()};\n let d = ${this.getDepthCoordString()};\n\n let in_h = h / uniforms.blockSize;\n let offset_h = h % uniforms.blockSize;\n let in_w = w / uniforms.blockSize;\n let offset_w = w % uniforms.blockSize;\n let offset_d = (offset_h * uniforms.blockSize + offset_w) *\n ${this.getOutputDepthSize()};\n let in_d = d + offset_d;\n\n let rlt = ${this.getInputSamplingString()};\n setOutputAtIndex(index, rlt);\n }\n }`;\n return userCode;\n }\n getHeightCoordString() {\n if (this.dataFormat === \"NHWC\") {\n return `coords[1]`;\n } else {\n return `coords[2]`;\n }\n }\n getWidthCoordString() {\n if (this.dataFormat === \"NHWC\") {\n return `coords[2]`;\n } else {\n return `coords[3]`;\n }\n }\n getDepthCoordString() {\n if (this.dataFormat === \"NHWC\") {\n return `coords[3]`;\n } else {\n return `coords[1]`;\n }\n }\n getOutputDepthSize() {\n if (this.dataFormat === \"NHWC\") {\n return `uniforms.outShape[3]`;\n } else {\n return `uniforms.outShape[1]`;\n }\n }\n getInputSamplingString() {\n if (this.dataFormat === \"NHWC\") {\n return `getX(b, in_h, in_w, in_d)`;\n } else {\n return `getX(b, in_d, in_h, in_w)`;\n }\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/DepthToSpace.js\nfunction depthToSpace5(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { blockSize, dataFormat } = attrs;\n const batchSize = x.shape[0];\n const inputHeight = dataFormat === \"NHWC\" ? x.shape[1] : x.shape[2];\n const inputWidth = dataFormat === \"NHWC\" ? x.shape[2] : x.shape[3];\n const inputDepth = dataFormat === \"NHWC\" ? x.shape[3] : x.shape[1];\n const outputHeight = inputHeight * blockSize;\n const outputWidth = inputWidth * blockSize;\n const outputDepth = inputDepth / (blockSize * blockSize);\n const outputShape = dataFormat === \"NHWC\" ? [batchSize, outputHeight, outputWidth, outputDepth] : [batchSize, outputDepth, outputHeight, outputWidth];\n const uniformData = [\n { type: \"int32\", data: [blockSize] }\n ];\n const program = new DepthToSpaceProgram2(outputShape, dataFormat);\n return backend2.runWebGPUProgram(program, [x], x.dtype, uniformData);\n}\nvar depthToSpaceConfig4 = {\n kernelName: DepthToSpace,\n backendName: \"webgpu\",\n kernelFunc: depthToSpace5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/depthwise_conv2d_nchw_shared_webgpu.js\nvar DepthwiseConv2DNCHWSharedProgram = class {\n constructor(outputShape, filterHeight, filterWidth, addBias = false, activation2 = null, hasPreluActivation = false) {\n this.variableNames = [\"x\", \"W\"];\n this.uniforms = `pad : vec2, inDims : vec2,`;\n this.workGroupSize = [16, 16, 1];\n this.outputShape = outputShape;\n this.dispatchLayout = { x: [3], y: [2], z: [0, 1] };\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n if (addBias) {\n this.variableNames.push(\"bias\");\n }\n if (hasPreluActivation) {\n this.variableNames.push(\"preluActivationWeights\");\n }\n this.addBias = addBias;\n this.activation = activation2;\n this.hasPreluActivation = hasPreluActivation;\n this.filterHeight = filterHeight;\n this.filterWidth = filterWidth;\n this.shaderKey = `depthwiseNCHW_${this.activation}_${this.filterHeight}_${this.filterWidth}`;\n }\n getUserCode() {\n const filterSize = this.filterWidth * this.filterHeight;\n const workGroupSize = this.workGroupSize[0] * this.workGroupSize[1] * this.workGroupSize[2];\n const tileAHeight = this.workGroupSize[1] + this.filterHeight - 1;\n const tileAWidth = this.workGroupSize[0] + this.filterWidth - 1;\n const userCode = `\n ${activationFnSnippet(this.activation, this.hasPreluActivation, false, 4)}\n\n var mm_Asub : array, ${tileAHeight}>;\n var mm_Bsub : array, ${this.filterHeight}>;\n fn readX(batch : i32, channel : i32, row : i32, col : i32) -> f32 {\n var value = 0.0;\n if (row >=0 && row < uniforms.inDims[0] && col >=0 && col < uniforms.inDims[1])\n {\n value = getX(batch, channel, row, col);\n }\n return value;\n }\n\n ${getWorkGroupSizeString()}\n fn _start(@builtin(local_invocation_id) LocalId : vec3,\n @builtin(global_invocation_id) GlobalId : vec3,\n @builtin(local_invocation_index) LocalIndex: u32,\n @builtin(num_workgroups) NumWorkgroups: vec3) {\n localId = LocalId;\n globalId = GlobalId;\n let localIndex = i32(LocalIndex);\n numWorkgroups = NumWorkgroups;\n let coords = getOutputCoords();\n let batch = coords[0];\n let xRCCorner = vec2(coords.zw) - uniforms.pad;\n let channelMul = uniforms.wShape[3];\n let d1 = coords[1] / channelMul;\n let q = coords[1] % channelMul;\n\n let inputRowStart = xRCCorner.x;\n let inputColStart = xRCCorner.y;\n\n let localRow = i32(localId.y);\n let localCol = i32(localId.x);\n\n // Load one tile of X into local memory.\n for (var inputRow = localRow; inputRow < ${tileAHeight}; inputRow = inputRow + ${this.workGroupSize[1]}) {\n for (var inputCol = localCol; inputCol < ${tileAWidth}; inputCol = inputCol + ${this.workGroupSize[0]}) {\n let rowOffset = inputRow - localRow;\n let colOffset = inputCol - localCol;\n mm_Asub[inputRow][inputCol] = readX(batch, d1, inputRowStart + rowOffset, inputColStart + colOffset);\n }\n }\n\n // Load one tile of W into local memory.\n var wIndex = localIndex;\n ${filterSize < workGroupSize ? `if (wIndex < ${filterSize})` : `for(; wIndex < ${filterSize}; wIndex = wIndex + ${workGroupSize})`}\n\n {\n let wRow = wIndex / ${this.filterWidth};\n let wCol = wIndex % ${this.filterWidth};\n mm_Bsub[wRow][wCol] = getW(wRow, wCol, d1, q);\n }\n\n workgroupBarrier();\n\n var value = 0.0;\n for (var wR = 0; wR < ${this.filterHeight}; wR = wR + 1) {\n for (var wC = 0; wC < ${this.filterWidth}; wC = wC + 1) {\n let xVal = mm_Asub[localRow + wR][localCol + wC];\n let wVal = mm_Bsub[wR][wC];\n value = fma(xVal, wVal, value);\n }\n }\n ${biasActivationSnippet(this.addBias, this.activation)}\n if (coordsInBounds4D(coords, uniforms.outShape)) {\n setOutputAtCoords(coords[0], coords[1], coords[2], coords[3], value);\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/depthwise_conv2d_vec4_webgpu.js\nvar DepthwiseConv2DVec4Program = class {\n constructor(convInfo, addBias = false, activation2 = null, hasPreluActivation = false) {\n this.variableNames = [\"x\", \"W\"];\n this.uniforms = \"pad : vec2, inDims : vec2,\";\n this.workGroupSize = [4, 4, 4];\n this.workPerThread = 4;\n this.isVec4 = true;\n this.outputShape = convInfo.outShape;\n this.dispatchLayout = { x: [3], y: [2], z: [0, 1] };\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize, [4, this.workPerThread, 1]);\n util_exports.assert(convInfo.dataFormat === \"channelsLast\", () => \"TODO: NCHW is unimplemented\");\n if (addBias) {\n this.variableNames.push(\"bias\");\n }\n if (hasPreluActivation) {\n this.variableNames.push(\"preluActivationWeights\");\n }\n this.convInfo = convInfo;\n this.addBias = addBias;\n this.activation = activation2;\n this.hasPreluActivation = hasPreluActivation;\n this.shaderKey = `depthwiseVec4_${activation2}_${this.convInfo.filterHeight}_${this.convInfo.filterWidth}_${this.convInfo.strideHeight}_${this.convInfo.strideWidth}_${this.workPerThread}`;\n }\n getUserCode() {\n const xNumber = (this.workPerThread - 1) * this.convInfo.strideWidth + this.convInfo.filterWidth;\n const userCode = `\n ${activationFnSnippet(this.activation, this.hasPreluActivation, true, 4)}\n fn readX(batch : i32, row : i32, col : i32, channel : i32) -> vec4 {\n var value = vec4(0.0);\n if (col >=0 && col < uniforms.inDims[1]) {\n value = getX(batch, row, col, channel);\n }\n return value;\n }\n\n const strideHeight = ${this.convInfo.strideHeight};\n const strideWidth = ${this.convInfo.strideWidth};\n ${getWorkGroupSizeString()}\n fn _start(@builtin(global_invocation_id) globalId: vec3) {\n let batch = i32(globalId.z) / uniforms.outShape[1];\n let r = i32(globalId.z) % uniforms.outShape[1];\n let c = i32(globalId.y) * ${this.workPerThread};\n let d1 = i32(globalId.x) * 4;\n let xRCCorner = vec2(r, c) * vec2(strideHeight, strideWidth) - uniforms.pad;\n\n let xRCorner = xRCCorner.x;\n let xCCorner = xRCCorner.y;\n var xVals : array, ${xNumber}>;\n var dotProd : array, ${this.workPerThread}>;\n for (var i = 0; i < ${this.workPerThread}; i++) {\n dotProd[i] = vec4(0.0);\n }\n\n // Use constant instead of uniform can give better performance.\n for (var wR = 0; wR < ${this.convInfo.filterHeight}; wR = wR + 1) {\n let xR = xRCorner + wR;\n if (xR >=0 && xR < uniforms.inDims[0]) {\n for (var i = 0; i < ${xNumber}; i++) {\n xVals[i] = readX(batch, xR, xCCorner + i, d1);\n }\n for (var wC = 0; wC < ${this.convInfo.filterWidth}; wC = wC + 1) {\n let wValue = getW(wR, wC, d1, 0);\n for (var i = 0; i < ${this.workPerThread}; i++) {\n dotProd[i] = fma(xVals[i * strideWidth + wC], wValue, dotProd[i]);\n }\n }\n }\n }\n\n for (var i = 0; i < ${this.workPerThread}; i = i + 1) {\n let coords = vec4(batch, r, c + i, d1);\n if (coordsInBounds4D(coords, uniforms.outShape)) {\n var value = dotProd[i];\n ${biasActivationSnippet(this.addBias, this.activation)}\n setOutputAtCoords(coords[0], coords[1], coords[2], coords[3], value);\n }\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/depthwise_conv2d_webgpu.js\nvar DepthwiseConv2DProgram2 = class {\n constructor(convInfo, addBias = false, activation2 = null, hasPreluActivation = false) {\n this.variableNames = [\"x\", \"W\"];\n this.uniforms = `pad : vec2, inDims : vec2, filterHeight : i32,\n filterWidth : i32, stride : vec2, dilation : vec2,`;\n this.workGroupSize = [256, 1, 1];\n this.outputShape = convInfo.outShape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.isChannelsLast = convInfo.dataFormat === \"channelsLast\";\n if (addBias) {\n this.variableNames.push(\"bias\");\n }\n if (hasPreluActivation) {\n this.variableNames.push(\"preluActivationWeights\");\n }\n this.convInfo = convInfo;\n this.addBias = addBias;\n this.activation = activation2;\n this.hasPreluActivation = hasPreluActivation;\n this.shaderKey = `depthwise_${this.activation}_${this.isChannelsLast}`;\n }\n getUserCode() {\n const getXSnippet = this.isChannelsLast ? \"getX(batch, xR, xC, d1);\" : \"getX(batch, d1, xR, xC);\";\n const userCode = `\n ${activationFnSnippet(this.activation, this.hasPreluActivation, false, 4)}\n\n ${getMainHeaderString()} {\n let coords = getOutputCoords();\n let batch = coords[0];\n let xRCCorner = vec2(coords.${this.isChannelsLast ? \"yz\" : \"zw\"}) * uniforms.stride - uniforms.pad;\n let d2 = coords[${this.isChannelsLast ? 3 : 1}];\n let channelMul = uniforms.wShape[3];\n let d1 = d2 / channelMul;\n let q = d2 % channelMul;\n\n let inputRowStart = xRCCorner.x;\n let inputColStart = xRCCorner.y;\n let inputRowEnd = inputRowStart + uniforms.filterHeight *\n uniforms.dilation[0];\n let inputColEnd = inputColStart + uniforms.filterWidth *\n uniforms.dilation[1];\n\n // Convolve x(?, ?, d1)|x(d1, ?, ?) with w(:, :, d1, q) to get\n // y(yR, yC, d2)|y(d2, yR, yC). ? = to be determined. : = across all\n // values in that axis. x(?, ?, d1) and y(yR, yC, d2) is for NHWC.\n // x(d1, ?, ?) and y(d2, yR, yC) is for NCHW.\n var value = 0.0;\n\n // Extract if checking out of for loop for performance.\n if (inputRowStart >= 0 && inputColStart >= 0 &&\n inputRowEnd < uniforms.inDims[0] &&\n inputColEnd < uniforms.inDims[1]) {\n for (var wR = 0; wR < uniforms.filterHeight; wR = wR + 1) {\n let xR = inputRowStart + wR * uniforms.dilation[0];\n\n for (var wC = 0; wC < uniforms.filterWidth; wC = wC + 1) {\n let xC = inputColStart + wC * uniforms.dilation[1];\n\n let xVal = ${getXSnippet};\n let wVal = getW(wR, wC, d1, q);\n value = value + xVal * wVal;\n }\n }\n } else {\n for (var wR = 0; wR < uniforms.filterHeight; wR = wR + 1) {\n let xR = inputRowStart + wR * uniforms.dilation[0];\n\n if (xR < 0 || xR >= uniforms.inDims[0]) {\n continue;\n }\n\n for (var wC = 0; wC < uniforms.filterWidth; wC = wC + 1) {\n let xC = inputColStart + wC * uniforms.dilation[1];\n\n if (xC < 0 || xC >= uniforms.inDims[1]) {\n continue;\n }\n\n let xVal = ${getXSnippet};\n let wVal = getW(wR, wC, d1, q);\n value = value + xVal * wVal;\n }\n }\n }\n ${biasActivationSnippet(this.addBias, this.activation)}\n if (coordsInBounds4D(coords, uniforms.outShape)) {\n setOutputAtCoords(coords[0], coords[1], coords[2], coords[3], value);\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/DepthwiseConv2dNative.js\nfunction depthwiseConv2dNative3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, filter } = inputs;\n const { strides, pad: pad3, dataFormat, dilations, dimRoundingMode } = attrs;\n const $dataFormat = backend_util_exports.convertConv2DDataFormat(dataFormat);\n let $dilations = dilations;\n if ($dilations == null) {\n $dilations = [1, 1];\n }\n const convInfo = backend_util_exports.computeConv2DInfo(x.shape, filter.shape, strides, $dilations, pad3, dimRoundingMode, true, $dataFormat);\n const dimensions = [\n { type: \"int32\", data: [convInfo.padInfo.top, convInfo.padInfo.left] },\n { type: \"int32\", data: [convInfo.inHeight, convInfo.inWidth] }\n ];\n const isChannelsLast = convInfo.dataFormat === \"channelsLast\";\n let program;\n if (!isChannelsLast && convInfo.inHeight > 16 && convInfo.inWidth > 16 && convInfo.strideHeight === 1 && convInfo.strideWidth === 1 && convInfo.dilationWidth === 1 && convInfo.dilationHeight === 1 && convInfo.inChannels === convInfo.outChannels) {\n program = new DepthwiseConv2DNCHWSharedProgram(convInfo.outShape, convInfo.filterHeight, convInfo.filterWidth);\n } else if (isChannelsLast && convInfo.inHeight > 4 && convInfo.inWidth > 4 && convInfo.strideWidth <= 2 && convInfo.inChannels === convInfo.outChannels && convInfo.dilationHeight === 1 && convInfo.dilationWidth === 1 && convInfo.inChannels % 4 === 0) {\n program = new DepthwiseConv2DVec4Program(convInfo);\n } else {\n program = new DepthwiseConv2DProgram2(convInfo);\n dimensions.push({ type: \"int32\", data: [convInfo.filterHeight] }, { type: \"int32\", data: [convInfo.filterWidth] }, { type: \"int32\", data: [convInfo.strideHeight, convInfo.strideWidth] }, {\n type: \"int32\",\n data: [convInfo.dilationHeight, convInfo.dilationWidth]\n });\n }\n return backend2.runWebGPUProgram(program, [x, filter], x.dtype, dimensions);\n}\nvar depthwiseConv2dNativeConfig4 = {\n kernelName: DepthwiseConv2dNative,\n backendName: \"webgpu\",\n kernelFunc: depthwiseConv2dNative3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Multiply.js\nvar multiplyKernelFunc = binaryKernelFunc3({\n opType: BinaryOpType.MUL,\n cpuKernelImpl: multiplyImplCPU2,\n supportsComplex: true\n});\nvar multiplyConfig4 = {\n kernelName: Multiply,\n backendName: \"webgpu\",\n kernelFunc: multiplyKernelFunc\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Sum.js\nfunction sum6(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis, keepDims } = attrs;\n return reduce2(x, axis, keepDims, \"sum\", backend2);\n}\nvar sumConfig4 = {\n kernelName: Sum,\n backendName: \"webgpu\",\n kernelFunc: sum6\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Einsum.js\nfunction einsum4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { equation } = attrs;\n const tensors = inputs;\n const { allDims, summedDims, idDims } = backend_util_exports.decodeEinsumEquation(equation, tensors.length);\n backend_util_exports.checkEinsumDimSizes(allDims.length, idDims, tensors);\n const { path, steps } = backend_util_exports.getEinsumComputePath(summedDims, idDims);\n const nSteps = steps.length;\n let out = null;\n let numDimsRemaining = allDims.length;\n const tensorsToDispose = [];\n for (let i2 = 0; i2 < nSteps; ++i2) {\n for (const idTerm of steps[i2]) {\n const { permutationIndices: perm, expandDims: dimsToExpand } = backend_util_exports.getEinsumPermutation(numDimsRemaining, idDims[idTerm]);\n let x;\n if (backend_util_exports.isIdentityPermutation(perm)) {\n x = tensors[idTerm];\n } else {\n x = transpose5({ inputs: { x: tensors[idTerm] }, backend: backend2, attrs: { perm } });\n tensorsToDispose.push(x);\n }\n const targetShape = x.shape.slice();\n for (let k = 0; k < dimsToExpand.length; ++k) {\n targetShape.splice(dimsToExpand[k], 0, 1);\n }\n if (!util_exports.arraysEqual(x.shape, targetShape)) {\n x = reshape6({ inputs: { x }, backend: backend2, attrs: { shape: targetShape } });\n tensorsToDispose.push(x);\n }\n if (out === null) {\n out = x;\n } else {\n out = multiplyKernelFunc({ inputs: { a: x, b: out }, backend: backend2 });\n tensorsToDispose.push(out);\n }\n }\n if (i2 < nSteps - 1) {\n if (path[i2] >= 0) {\n out = sum6({\n inputs: { x: out },\n backend: backend2,\n attrs: {\n axis: path[i2] - (allDims.length - numDimsRemaining),\n keepDims: false\n }\n });\n tensorsToDispose.push(out);\n }\n numDimsRemaining--;\n }\n }\n for (const tensorInfo of tensorsToDispose) {\n if (tensorInfo === out) {\n continue;\n }\n backend2.disposeData(tensorInfo.dataId);\n }\n return out;\n}\nvar einsumConfig3 = {\n kernelName: Einsum,\n backendName: \"webgpu\",\n kernelFunc: einsum4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Elu.js\nvar elu6 = unaryKernelFunc3({ opType: UnaryOpType.ELU });\nvar eluConfig4 = {\n kernelName: Elu,\n backendName: \"webgpu\",\n kernelFunc: elu6\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Equal.js\nvar equal4 = binaryKernelFunc3({ opType: BinaryOpType.EQUAL, dtype: \"bool\", cpuKernelImpl: equalImplCPU2 });\nvar equalConfig4 = {\n kernelName: Equal,\n backendName: \"webgpu\",\n kernelFunc: equal4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Exp.js\nvar exp4 = unaryKernelFunc3({\n opType: UnaryOpType.EXP,\n cpuKernelImpl: expImplCPU2,\n dtype: \"float32\"\n});\nvar expConfig4 = {\n kernelName: Exp,\n backendName: \"webgpu\",\n kernelFunc: exp4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/ExpandDims.js\nfunction expandDims6(args) {\n const { inputs, attrs, backend: backend2 } = args;\n const { dim } = attrs;\n const { input: input2 } = inputs;\n const inputRank = input2.shape.length;\n const newShape = input2.shape.slice();\n let $dim = dim;\n if (dim < 0) {\n util_exports.assert(-(inputRank + 1) <= dim, () => `Axis must be in the interval [${-(inputRank + 1)}, ${inputRank}]`);\n $dim = inputRank + dim + 1;\n }\n newShape.splice($dim, 0, 1);\n return reshape6({ inputs: { x: input2 }, backend: backend2, attrs: { shape: newShape } });\n}\nvar expandDimsConfig4 = {\n kernelName: ExpandDims,\n backendName: \"webgpu\",\n kernelFunc: expandDims6\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Expm1.js\nvar expm14 = unaryKernelFunc3({ opType: UnaryOpType.EXPM1, cpuKernelImpl: expm1ImplCPU2 });\nvar expm1Config3 = {\n kernelName: Expm1,\n backendName: \"webgpu\",\n kernelFunc: expm14\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/flip_left_right_webgpu.js\nvar FlipLeftRightProgram2 = class {\n constructor(imageShape) {\n this.outputShape = [];\n this.variableNames = [\"x\"];\n this.workGroupSize = [64, 1, 1];\n this.size = true;\n this.outputShape = imageShape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.shaderKey = \"flipLeftRight\";\n }\n getUserCode() {\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let coords = getCoordsFromIndex(index);\n let coordX = uniforms.xShape[2] - coords[2] - 1;\n let outputValue = getX(coords[0], coords[1], coordX, coords[3]);\n setOutputAtIndex(index, outputValue);\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/FlipLeftRight.js\nvar flipLeftRightConfig4 = {\n kernelName: FlipLeftRight,\n backendName: \"webgpu\",\n kernelFunc: ({ inputs, backend: backend2 }) => {\n const { image: image2 } = inputs;\n const webgpuBackend = backend2;\n const program = new FlipLeftRightProgram2(image2.shape);\n const output = webgpuBackend.runWebGPUProgram(program, [image2], image2.dtype);\n return output;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Floor.js\nvar floor4 = unaryKernelFunc3({ opType: UnaryOpType.FLOOR, cpuKernelImpl: floorImplCPU2 });\nvar floorConfig4 = {\n kernelName: Floor,\n backendName: \"webgpu\",\n kernelFunc: floor4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/FloorDiv.js\nvar floorDiv4 = binaryKernelFunc3({ opType: BinaryOpType.INT_DIV, dtype: \"int32\" });\nvar floorDivConfig4 = {\n kernelName: FloorDiv,\n backendName: \"webgpu\",\n kernelFunc: floorDiv4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/from_pixels_webgpu.js\nvar FromPixelsProgram2 = class {\n constructor(outputShape, numChannels, importVideo = false) {\n this.isFromPixels = true;\n this.outputShape = [0];\n this.variableNames = [];\n this.workGroupSize = [256, 1, 1];\n this.outputShape = outputShape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize, [numChannels, 1, 1]);\n this.importVideo = importVideo;\n this.shaderKey = `fromPixels_${this.importVideo}`;\n }\n getUserCode() {\n const textureLoad = this.importVideo ? \"textureLoad(src, vec2(coords.yx));\" : \"textureLoad(src, vec2(coords.yx), 0)\";\n const textureType = this.importVideo ? \"texture_external\" : \"texture_2d\";\n return `\n @binding(1) @group(0) var src: ${textureType};\n ${getMainHeaderString(\"index\")} {\n let flatIndex = index * uniforms.numChannels;\n if (flatIndex < uniforms.size) {\n let coords = getCoordsFromIndex(flatIndex);\n let values = ${textureLoad};\n for (var i = 0; i < uniforms.numChannels; i = i + 1) {\n result[flatIndex + i] = i32(floor(255.0 * values[i]));\n }\n }\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/FromPixels.js\nvar fromPixelsConfig2 = {\n kernelName: FromPixels,\n backendName: \"webgpu\",\n kernelFunc: fromPixels3\n};\nvar fromPixels2DContext3;\nvar willReadFrequently2 = env().getBool(\"CANVAS2D_WILL_READ_FREQUENTLY_FOR_GPU\");\nvar videoToTextureMap = /* @__PURE__ */ new Map();\nfunction fromPixels3(args) {\n const { inputs, backend: backend2, attrs } = args;\n let { pixels } = inputs;\n const { numChannels } = attrs;\n if (pixels == null) {\n throw new Error(\"pixels passed to tf.browser.fromPixels() can not be null\");\n }\n const isVideo = typeof HTMLVideoElement !== \"undefined\" && pixels instanceof HTMLVideoElement;\n const isImage = typeof HTMLImageElement !== \"undefined\" && pixels instanceof HTMLImageElement;\n const isCanvas = typeof HTMLCanvasElement !== \"undefined\" && pixels instanceof HTMLCanvasElement || typeof OffscreenCanvas !== \"undefined\" && pixels instanceof OffscreenCanvas;\n const isImageBitmap = typeof ImageBitmap !== \"undefined\" && pixels instanceof ImageBitmap;\n const [width, height] = isVideo ? [\n pixels.videoWidth,\n pixels.videoHeight\n ] : [pixels.width, pixels.height];\n const outputShape = [height, width, numChannels];\n const importVideo = false;\n const isVideoOrImage = isVideo || isImage;\n if (isImageBitmap || isCanvas || isVideoOrImage) {\n let textureInfo;\n if (importVideo) {\n const videoElement = pixels;\n if (!videoToTextureMap.has(videoElement) || videoToTextureMap.get(videoElement).expired) {\n const externalTextureDescriptor = { source: videoElement };\n videoToTextureMap.set(videoElement, backend2.device.importExternalTexture(externalTextureDescriptor));\n }\n textureInfo = {\n width,\n height,\n format: null,\n usage: null,\n texture: videoToTextureMap.get(videoElement)\n };\n } else {\n if (isVideoOrImage) {\n const newWillReadFrequently = env().getBool(\"CANVAS2D_WILL_READ_FREQUENTLY_FOR_GPU\");\n if (fromPixels2DContext3 == null || newWillReadFrequently !== willReadFrequently2) {\n willReadFrequently2 = newWillReadFrequently;\n fromPixels2DContext3 = document.createElement(\"canvas\").getContext(\"2d\", { willReadFrequently: willReadFrequently2 });\n }\n fromPixels2DContext3.canvas.width = width;\n fromPixels2DContext3.canvas.height = height;\n fromPixels2DContext3.drawImage(pixels, 0, 0, width, height);\n pixels = fromPixels2DContext3.canvas;\n }\n const usage = GPUTextureUsage.COPY_DST | GPUTextureUsage.RENDER_ATTACHMENT | GPUTextureUsage.TEXTURE_BINDING;\n const format = \"rgba8unorm\";\n const texture = backend2.textureManager.acquireTexture(outputShape[1], outputShape[0], format, usage);\n backend2.queue.copyExternalImageToTexture({ source: pixels }, { texture }, [outputShape[1], outputShape[0]]);\n textureInfo = { width, height, format, usage, texture };\n }\n const size = util_exports.sizeFromShape(outputShape);\n const strides = util_exports.computeStrides(outputShape);\n const program = new FromPixelsProgram2(outputShape, numChannels, importVideo);\n const uniformData = [\n { type: \"uint32\", data: [size] },\n { type: \"uint32\", data: [numChannels] },\n { type: \"uint32\", data: [...strides] }\n ];\n const input2 = backend2.makeTensorInfo([height, width], \"int32\");\n const info = backend2.tensorMap.get(input2.dataId);\n info.resourceInfo = textureInfo;\n const result = backend2.runWebGPUProgram(program, [input2], \"int32\", uniformData);\n backend2.disposeData(input2.dataId);\n return result;\n }\n const imageData = pixels.data;\n let pixelArray = imageData;\n if (numChannels != null && numChannels !== 4) {\n pixelArray = new Uint8Array(pixels.width * pixels.height * numChannels);\n const dataLength = imageData.length;\n let j = 0;\n for (let i2 = 0; i2 < dataLength; i2++) {\n if (i2 % 4 < numChannels) {\n pixelArray[j++] = imageData[i2];\n }\n }\n }\n const output = backend2.makeTensorInfo(outputShape, \"int32\", new Int32Array(pixelArray));\n backend2.uploadToGPU(output.dataId);\n return output;\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/batchnorm_webgpu.js\nvar BatchNormProgram2 = class {\n constructor(xShape, meanShape, varianceShape, offsetShape, scaleShape) {\n this.uniforms = \"varianceEpsilon : f32,\";\n this.workGroupSize = [128, 1, 1];\n this.size = true;\n this.variableNames = [\"x\", \"mean\", \"variance\"];\n backend_util_exports.assertAndGetBroadcastShape(xShape, meanShape);\n backend_util_exports.assertAndGetBroadcastShape(xShape, varianceShape);\n this.outputShape = xShape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n if (offsetShape != null) {\n backend_util_exports.assertAndGetBroadcastShape(xShape, offsetShape);\n this.variableNames.push(\"offset\");\n }\n if (scaleShape != null) {\n backend_util_exports.assertAndGetBroadcastShape(xShape, scaleShape);\n this.variableNames.push(\"scale\");\n }\n this.offsetShape = offsetShape;\n this.scaleShape = scaleShape;\n this.shaderKey = \"batchNorm\";\n }\n getUserCode() {\n let offsetSnippet = \"0.0\";\n if (this.offsetShape != null) {\n offsetSnippet = \"getOffsetByOutputIndex(index)\";\n }\n let scaleSnippet = \"1.0\";\n if (this.scaleShape != null) {\n scaleSnippet = \"getScaleByOutputIndex(index)\";\n }\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size)\n {\n let xValue = getXByOutputIndex(index);\n let meanValue = getMeanByOutputIndex(index);\n let varianValue = getVarianceByOutputIndex(index);\n let offsetValue = ${offsetSnippet};\n let scaleValue = ${scaleSnippet};\n let inv = scaleValue * inverseSqrt(varianValue + f32(uniforms.varianceEpsilon));\n setOutputAtIndex(index,dot(vec3(xValue, -meanValue, offsetValue), vec3(inv, inv, 1.0)));\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/FusedBatchNorm.js\nvar fusedBatchNormConfig2 = {\n kernelName: FusedBatchNorm,\n backendName: \"webgpu\",\n kernelFunc: ({ inputs, attrs, backend: backend2 }) => {\n const { x, scale: scale2, offset, mean: mean5, variance } = inputs;\n const { varianceEpsilon } = attrs;\n const webGPUBackend = backend2;\n const batchNormInputs = [x, mean5, variance];\n let offsetShape = null;\n if (offset != null) {\n offsetShape = offset.shape;\n batchNormInputs.push(offset);\n }\n let scaleShape = null;\n if (scale2 != null) {\n scaleShape = scale2.shape;\n batchNormInputs.push(scale2);\n }\n const program = new BatchNormProgram2(x.shape, mean5.shape, variance.shape, offsetShape, scaleShape);\n const uniformData = [{ type: \"float32\", data: [varianceEpsilon] }];\n return webGPUBackend.runWebGPUProgram(program, batchNormInputs, x.dtype, uniformData);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/FusedConv2D.js\nfunction fusedConv2d3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, filter, bias, preluActivationWeights } = inputs;\n const { strides, pad: pad3, dataFormat, dilations, dimRoundingMode, activation: activation2, leakyreluAlpha } = attrs;\n const $dataFormat = backend_util_exports.convertConv2DDataFormat(dataFormat);\n const convInfo = backend_util_exports.computeConv2DInfo(x.shape, filter.shape, strides, dilations, pad3, dimRoundingMode, false, $dataFormat);\n return conv2DImpl({\n x,\n filter,\n convInfo,\n backend: backend2,\n bias,\n preluActivationWeights,\n leakyreluAlpha,\n activation: activation2\n });\n}\nvar fusedConv2DConfig4 = {\n kernelName: FusedConv2D,\n backendName: \"webgpu\",\n kernelFunc: fusedConv2d3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/FusedDepthwiseConv2D.js\nfunction fusedDepthwiseConv2D3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, filter, bias, preluActivationWeights } = inputs;\n const { strides, pad: pad3, dilations, dimRoundingMode, activation: activation2, leakyreluAlpha } = attrs;\n let $dilations = dilations;\n if ($dilations == null) {\n $dilations = [1, 1];\n }\n util_exports.assert(backend_util_exports.eitherStridesOrDilationsAreOne(strides, $dilations), () => `Error in depthwiseConv2d: Either strides or dilations must be 1. Got strides ${strides} and dilations '${$dilations}'`);\n const convInfo = backend_util_exports.computeConv2DInfo(x.shape, filter.shape, strides, $dilations, pad3, dimRoundingMode, true);\n const programInputs = [x, filter];\n const hasBias = bias != null;\n const hasPreluActivationWeights = preluActivationWeights != null;\n if (hasBias) {\n programInputs.push(bias);\n }\n if (hasPreluActivationWeights) {\n programInputs.push(preluActivationWeights);\n }\n const dimensions = [\n { type: \"int32\", data: [convInfo.padInfo.top, convInfo.padInfo.left] },\n { type: \"int32\", data: [convInfo.inHeight, convInfo.inWidth] }\n ];\n let program;\n if (convInfo.inHeight > 4 && convInfo.inWidth > 4 && convInfo.strideWidth <= 2 && convInfo.inChannels === convInfo.outChannels && convInfo.dilationHeight === 1 && convInfo.dilationWidth === 1 && convInfo.inChannels % 4 === 0) {\n program = new DepthwiseConv2DVec4Program(convInfo, hasBias, activation2, hasPreluActivationWeights);\n } else {\n program = new DepthwiseConv2DProgram2(convInfo, hasBias, activation2, hasPreluActivationWeights);\n dimensions.push({ type: \"int32\", data: [convInfo.filterHeight] }, { type: \"int32\", data: [convInfo.filterWidth] }, { type: \"int32\", data: [convInfo.strideHeight, convInfo.strideWidth] }, {\n type: \"int32\",\n data: [convInfo.dilationHeight, convInfo.dilationWidth]\n });\n }\n if (activation2 === \"leakyrelu\") {\n dimensions.push({ type: \"float32\", data: [leakyreluAlpha] });\n program.uniforms += \" alpha : f32,\";\n }\n const result = backend2.runWebGPUProgram(program, programInputs, \"float32\", dimensions);\n return result;\n}\nvar fusedDepthwiseConv2DConfig4 = {\n kernelName: FusedDepthwiseConv2D,\n backendName: \"webgpu\",\n kernelFunc: fusedDepthwiseConv2D3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/gather_nd_webgpu.js\nvar GatherNDProgram2 = class {\n constructor(sliceDim, shape) {\n this.variableNames = [\"A\", \"indices\"];\n this.workGroupSize = [64, 1, 1];\n this.size = true;\n this.outputShape = shape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.shaderKey = `gathernd_${sliceDim}`;\n this.sliceDim = sliceDim;\n this.uniforms = `sliceDim : i32, strides : ${getCoordsDataType2(sliceDim)},`;\n }\n getUserCode() {\n let strideString;\n if (this.sliceDim > 1) {\n strideString = \"uniforms.strides[j]\";\n } else {\n strideString = \"uniforms.strides\";\n }\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let coords = getCoordsFromIndex(index);\n var flattenIndex = 0;\n for (var j = 0; j < uniforms.sliceDim; j = j + 1) {\n let indexTemp = i32(round(getIndices(coords[0], j)));\n let strideNum = ${strideString};\n flattenIndex = flattenIndex + indexTemp * strideNum;\n }\n\n setOutputAtIndex(index, getA(flattenIndex, coords[1]));\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/GatherNd.js\nfunction gatherNd4(args) {\n const { inputs, backend: backend2 } = args;\n const { params, indices } = inputs;\n const indicesShape = indices.shape;\n const sliceRank = indicesShape[indicesShape.length - 1];\n const paramsSize = util_exports.sizeFromShape(params.shape);\n const [resultShape, numSlices, sliceSize, strides] = backend_util_exports.prepareAndValidate(params, indices);\n const flattenIndices = reshape6({ inputs: { x: indices }, backend: backend2, attrs: { shape: [numSlices, sliceRank] } });\n const flattenX = reshape6({\n inputs: { x: params },\n backend: backend2,\n attrs: { shape: [util_exports.sizeFromShape(params.shape) / sliceSize, sliceSize] }\n });\n if (backend2.shouldExecuteOnCPU([params, indices]) || params.dtype === \"string\") {\n const indicesData = backend2.readSync(indices.dataId);\n const paramsBuf = backend2.bufferSync(params);\n const outValue = gatherNdImplCPU2(indicesData, paramsBuf, params.dtype, numSlices, sliceRank, sliceSize, strides, params.shape, paramsSize);\n return backend2.makeTensorInfo(resultShape, params.dtype, outValue.values);\n }\n const program = new GatherNDProgram2(sliceRank, [numSlices, sliceSize]);\n const uniformData = [{ type: \"int32\", data: [sliceRank] }, { type: \"int32\", data: strides }];\n const res = backend2.runWebGPUProgram(program, [flattenX, flattenIndices], flattenX.dtype, uniformData);\n const reshaped = reshape6({ inputs: { x: res }, backend: backend2, attrs: { shape: resultShape } });\n backend2.disposeData(flattenIndices.dataId);\n backend2.disposeData(flattenX.dataId);\n backend2.disposeData(res.dataId);\n return reshaped;\n}\nvar gatherNdConfig4 = {\n kernelName: GatherNd,\n backendName: \"webgpu\",\n kernelFunc: gatherNd4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/gather_webgpu.js\nvar GatherProgram2 = class {\n constructor(aShape, outputShape) {\n this.variableNames = [\"A\", \"indices\"];\n this.workGroupSize = [64, 1, 1];\n this.size = true;\n this.outputShape = aShape.slice();\n this.aShape = aShape;\n this.outputShape = outputShape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.shaderKey = `gather`;\n }\n getUserCode() {\n const sourceCoords = getSourceCoords4(this.aShape);\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let resRC = getCoordsFromIndex(index);\n let indexZ = i32(getIndices(resRC.x, resRC.z));\n let inBounds = select(0.0, 1.0, indexZ >= 0 && indexZ < uniforms.aShape[2]);\n setOutputAtIndex(index, inBounds * getA(${sourceCoords}));\n }\n }\n `;\n return userCode;\n }\n};\nfunction getSourceCoords4(aShape) {\n const currentCoords = [\"resRC.x\", \"resRC.y\", \"resRC.z\", \"resRC.w\"];\n const sourceCoords = [];\n for (let i2 = 0; i2 < aShape.length; i2++) {\n if (i2 === 2) {\n sourceCoords.push(\"indexZ\");\n } else {\n sourceCoords.push(`${currentCoords[i2]}`);\n }\n }\n return sourceCoords.join();\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/GatherV2.js\nfunction gatherV24(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x, indices } = inputs;\n const { axis, batchDims } = attrs;\n const parsedAxis = util_exports.parseAxisParam(axis, x.shape)[0];\n const shapeInfo = backend_util_exports.segment_util.collectGatherOpShapeInfo(x, indices, parsedAxis, batchDims);\n const indicesSize = util_exports.sizeFromShape(indices.shape);\n const toDispose = [];\n const flattenX = reshape6({\n inputs: { x },\n backend: backend2,\n attrs: {\n shape: [\n shapeInfo.batchSize,\n shapeInfo.outerSize,\n shapeInfo.dimSize,\n shapeInfo.sliceSize\n ]\n }\n });\n const flattenIndex = reshape6({\n inputs: { x: indices },\n backend: backend2,\n attrs: { shape: [shapeInfo.batchSize, indicesSize / shapeInfo.batchSize] }\n });\n toDispose.push(flattenX);\n toDispose.push(flattenIndex);\n const flattenOutputShape = [\n shapeInfo.batchSize,\n shapeInfo.outerSize,\n indicesSize / shapeInfo.batchSize,\n shapeInfo.sliceSize\n ];\n if (backend2.shouldExecuteOnCPU([x, indices])) {\n const indicesBufferInfo = backend2.tensorMap.get(flattenIndex.dataId);\n const indicesValues = indicesBufferInfo.values;\n const indicesBuf = buffer(flattenIndex.shape, flattenIndex.dtype, indicesValues);\n const xBufferInfo = backend2.tensorMap.get(flattenX.dataId);\n const xValues = xBufferInfo.values;\n const xBuf = buffer(flattenX.shape, flattenX.dtype, xValues);\n const outBuf = gatherV2ImplCPU2(xBuf, indicesBuf, flattenOutputShape);\n toDispose.forEach((t2) => backend2.disposeData(t2.dataId));\n return backend2.makeTensorInfo(shapeInfo.outputShape, outBuf.dtype, outBuf.values);\n }\n const program = new GatherProgram2(flattenX.shape, flattenOutputShape);\n const res = backend2.runWebGPUProgram(program, [flattenX, flattenIndex], flattenX.dtype);\n toDispose.push(res);\n const reshaped = reshape6({ inputs: { x: res }, backend: backend2, attrs: { shape: shapeInfo.outputShape } });\n toDispose.forEach((t2) => backend2.disposeData(t2.dataId));\n return reshaped;\n}\nvar gatherV2Config4 = {\n kernelName: GatherV2,\n backendName: \"webgpu\",\n kernelFunc: gatherV24\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Greater.js\nvar greater5 = binaryKernelFunc3({\n opType: BinaryOpType.GREATER,\n cpuKernelImpl: greaterImplCPU2,\n dtype: \"bool\"\n});\nvar greaterConfig4 = {\n kernelName: Greater,\n backendName: \"webgpu\",\n kernelFunc: greater5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/GreaterEqual.js\nvar greaterEqual4 = binaryKernelFunc3({\n opType: BinaryOpType.GREATER_EQUAL,\n dtype: \"bool\",\n cpuKernelImpl: greaterEqualImplCPU2\n});\nvar greaterEqualConfig4 = {\n kernelName: GreaterEqual,\n backendName: \"webgpu\",\n kernelFunc: greaterEqual4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/IsNaN.js\nvar isNaN5 = unaryKernelFunc3({ opType: UnaryOpType.IS_NAN, dtype: \"bool\" });\nvar isNaNConfig3 = {\n kernelName: IsNan,\n backendName: \"webgpu\",\n kernelFunc: isNaN5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/LeakyRelu.js\nfunction leakyRelu5(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { alpha } = attrs;\n const uniformData = [{ type: \"float32\", data: [alpha] }];\n const program = new UnaryOpProgram2(x.shape, UnaryOpType.LEAKYRELU);\n program.uniforms = \"alpha : f32,\";\n return backend2.runWebGPUProgram(program, [x], \"float32\", uniformData);\n}\nvar leakyReluConfig4 = {\n kernelName: LeakyRelu,\n backendName: \"webgpu\",\n kernelFunc: leakyRelu5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Less.js\nvar less5 = binaryKernelFunc3({ opType: BinaryOpType.LESS, dtype: \"bool\", cpuKernelImpl: lessImplCPU2 });\nvar lessConfig4 = {\n kernelName: Less,\n backendName: \"webgpu\",\n kernelFunc: less5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/LessEqual.js\nvar lessEqual4 = binaryKernelFunc3({\n opType: BinaryOpType.LESS_EQUAL,\n dtype: \"bool\",\n cpuKernelImpl: lessEqualImplCPU2\n});\nvar lessEqualConfig4 = {\n kernelName: LessEqual,\n backendName: \"webgpu\",\n kernelFunc: lessEqual4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Log.js\nvar log5 = unaryKernelFunc3({ opType: UnaryOpType.LOG, cpuKernelImpl: logImplCPU2 });\nvar logConfig4 = {\n kernelName: Log,\n backendName: \"webgpu\",\n kernelFunc: log5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/LogicalAnd.js\nvar logicalAnd4 = binaryKernelFunc3({ opType: BinaryOpType.LOGICAL_AND, dtype: \"bool\" });\nvar logicalAndConfig4 = {\n kernelName: LogicalAnd,\n backendName: \"webgpu\",\n kernelFunc: logicalAnd4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/LogicalNot.js\nvar logicalNot4 = unaryKernelFunc3({ opType: UnaryOpType.LOGICAL_NOT });\nvar logicalNotConfig4 = {\n kernelName: LogicalNot,\n backendName: \"webgpu\",\n kernelFunc: logicalNot4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Maximum.js\nvar maximum5 = binaryKernelFunc3({\n opType: BinaryOpType.MAX,\n cpuKernelImpl: maximumImplCPU2\n});\nvar maximumConfig4 = {\n kernelName: Maximum,\n backendName: \"webgpu\",\n kernelFunc: maximum5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/MaxPool.js\nfunction maxPool5(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { filterSize, strides, pad: pad3, dimRoundingMode } = attrs;\n const dilations = 1;\n const convInfo = backend_util_exports.computePool2DInfo(x.shape, filterSize, strides, dilations, pad3, dimRoundingMode);\n return poolImpl(x, convInfo, \"max\", backend2);\n}\nvar maxPoolConfig4 = {\n kernelName: MaxPool,\n backendName: \"webgpu\",\n kernelFunc: maxPool5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Min.js\nfunction min6(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis, keepDims } = attrs;\n return reduce2(x, axis, keepDims, \"min\", backend2);\n}\nvar minConfig4 = {\n kernelName: Min,\n backendName: \"webgpu\",\n kernelFunc: min6\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Minimum.js\nvar minimum5 = binaryKernelFunc3({\n opType: BinaryOpType.MIN,\n cpuKernelImpl: minimumImplCPU2\n});\nvar minimumConfig4 = {\n kernelName: Minimum,\n backendName: \"webgpu\",\n kernelFunc: minimum5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/mirror_pad_webgpu.js\nvar MirrorPadProgram2 = class {\n constructor(xShape, paddings, mode) {\n this.uniforms = \"\";\n this.variableNames = [\"x\"];\n this.workGroupSize = [64, 1, 1];\n this.size = true;\n this.outputShape = paddings.map((p2, i2) => p2[0] + xShape[i2] + p2[1]);\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.xShape = xShape;\n paddings.map((_, i2) => {\n this.uniforms += ` pad${i2} : vec2,`;\n });\n this.offset = mode === \"reflect\" ? 0 : 1;\n this.shaderKey = `mirrorPad_${mode}`;\n }\n getUserCode() {\n const rank = this.xShape.length;\n const start = this.xShape.map((_, i2) => `uniforms.pad${i2}[0]`).join(\",\");\n const end = this.xShape.map((_, i2) => `uniforms.pad${i2}[0] + uniforms.xShape${rank > 1 ? `[${i2}]` : \"\"}`).join(\",\");\n const shaderStart = rank === 1 ? \"start\" : \"start[i]\";\n const shaderEnd = rank === 1 ? \"end\" : \"end[i]\";\n const shaderOutC = rank === 1 ? \"outC\" : \"outC[i]\";\n const dtype = getCoordsDataType2(rank);\n const unpackedCoords = rank > 1 ? [\"coords[0]\", \"coords[1]\", \"coords[2]\", \"coords[3]\"].slice(0, rank) : \"coords\";\n return `\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let start = ${dtype}(${start});\n let end = ${dtype}(${end});\n var outC = getCoordsFromIndex(index);\n for (var i = 0; i < ${rank}; i = i + 1) {\n if (${shaderOutC} < ${shaderStart}) {\n ${shaderOutC} = ${shaderStart} * 2 - ${shaderOutC} - ${this.offset};\n } else if(${shaderOutC} >= ${shaderEnd}) {\n ${shaderOutC} = (${shaderEnd} - 1) * 2 - ${shaderOutC} + ${this.offset};\n }\n }\n let coords = outC - start;\n setOutputAtIndex(index, getX(${unpackedCoords}));\n }\n }\n `;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/MirrorPad.js\nvar mirrorPadConfig4 = {\n kernelName: MirrorPad,\n backendName: \"webgpu\",\n kernelFunc: ({ inputs, attrs, backend: backend2 }) => {\n const { x } = inputs;\n const { paddings, mode } = attrs;\n const webGPUBackend = backend2;\n const uniformData = paddings.map((p2) => {\n return { type: \"int32\", data: [p2[0], p2[1]] };\n });\n const program = new MirrorPadProgram2(x.shape, paddings, mode);\n const output = webGPUBackend.runWebGPUProgram(program, [x], x.dtype, uniformData);\n return output;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Neg.js\nfunction neg4(args) {\n const { inputs, backend: backend2 } = args;\n const { x } = inputs;\n if (backend2.shouldExecuteOnCPU([x])) {\n const xData = backend2.tensorMap.get(x.dataId);\n const [outValues, newShape] = negImplCPU2(xData.values, x.shape, x.dtype);\n return backend2.makeTensorInfo(newShape, x.dtype, outValues);\n }\n const program = new UnaryOpProgram2(x.shape, UnaryOpType.NEG);\n return backend2.runWebGPUProgram(program, [x], x.dtype);\n}\nvar negConfig4 = {\n kernelName: Neg,\n backendName: \"webgpu\",\n kernelFunc: neg4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/NonMaxSuppressionV3.js\nfunction nonMaxSuppressionV33(args) {\n console.warn(\"tf.nonMaxSuppression() in webgpu locks the UI thread. Call tf.nonMaxSuppressionAsync() instead\");\n const { inputs, backend: backend2, attrs } = args;\n const { boxes, scores } = inputs;\n const { maxOutputSize, iouThreshold, scoreThreshold } = attrs;\n const boxesVals = backend2.readSync(boxes.dataId);\n const scoresVals = backend2.readSync(scores.dataId);\n const { selectedIndices } = kernel_impls_exports.nonMaxSuppressionV3Impl(boxesVals, scoresVals, maxOutputSize, iouThreshold, scoreThreshold);\n return backend2.makeTensorInfo([selectedIndices.length], \"int32\", new Int32Array(selectedIndices));\n}\nvar nonMaxSuppressionV3Config4 = {\n kernelName: NonMaxSuppressionV3,\n backendName: \"webgpu\",\n kernelFunc: nonMaxSuppressionV33\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/NonMaxSuppressionV5.js\nfunction nonMaxSuppressionV53(args) {\n console.warn(\"tf.nonMaxSuppression() in webgpu locks the UI thread. Call tf.nonMaxSuppressionAsync() instead\");\n const { inputs, backend: backend2, attrs } = args;\n const { boxes, scores } = inputs;\n const { maxOutputSize, iouThreshold, scoreThreshold, softNmsSigma } = attrs;\n const boxesVals = backend2.readSync(boxes.dataId);\n const scoresVals = backend2.readSync(scores.dataId);\n const maxOutputSizeVal = maxOutputSize;\n const iouThresholdVal = iouThreshold;\n const scoreThresholdVal = scoreThreshold;\n const softNmsSigmaVal = softNmsSigma;\n const { selectedIndices, selectedScores } = kernel_impls_exports.nonMaxSuppressionV5Impl(boxesVals, scoresVals, maxOutputSizeVal, iouThresholdVal, scoreThresholdVal, softNmsSigmaVal);\n return [\n backend2.makeTensorInfo([selectedIndices.length], \"int32\", new Int32Array(selectedIndices)),\n backend2.makeTensorInfo([selectedScores.length], \"float32\", new Float32Array(selectedScores))\n ];\n}\nvar nonMaxSuppressionV5Config4 = {\n kernelName: NonMaxSuppressionV5,\n backendName: \"webgpu\",\n kernelFunc: nonMaxSuppressionV53\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/ZerosLike.js\nfunction zerosLike5(args) {\n const { inputs, backend: backend2 } = args;\n const { x } = inputs;\n if (x.dtype === \"complex64\") {\n const realPart = real4({ inputs: { input: x }, backend: backend2 });\n const r2 = zerosLike5({ inputs: { x: realPart }, backend: backend2 });\n const imagPart = imag4({ inputs: { input: x }, backend: backend2 });\n const i2 = zerosLike5({ inputs: { x: imagPart }, backend: backend2 });\n const result = complex4({ inputs: { real: r2, imag: i2 }, backend: backend2 });\n backend2.disposeData(realPart.dataId);\n backend2.disposeData(r2.dataId);\n backend2.disposeData(imagPart.dataId);\n backend2.disposeData(i2.dataId);\n return result;\n } else {\n return fill5({\n attrs: {\n shape: x.shape,\n dtype: x.dtype,\n value: x.dtype === \"string\" ? \"\" : 0\n },\n backend: backend2\n });\n }\n}\nvar zerosLikeConfig4 = {\n kernelName: ZerosLike,\n backendName: \"webgpu\",\n kernelFunc: zerosLike5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/OnesLike.js\nfunction onesLike5(args) {\n const { inputs, backend: backend2 } = args;\n const { x } = inputs;\n if (x.dtype === \"string\") {\n throw new Error(\"onesLike is not supported under string dtype\");\n } else if (x.dtype === \"complex64\") {\n const realPart = real4({ inputs: { input: x }, backend: backend2 });\n const r2 = onesLike5({ inputs: { x: realPart }, backend: backend2 });\n const imagPart = imag4({ inputs: { input: x }, backend: backend2 });\n const i2 = zerosLike5({ inputs: { x: imagPart }, backend: backend2 });\n const result = complex4({ inputs: { real: r2, imag: i2 }, backend: backend2 });\n backend2.disposeData(realPart.dataId);\n backend2.disposeData(r2.dataId);\n backend2.disposeData(imagPart.dataId);\n backend2.disposeData(i2.dataId);\n return result;\n } else {\n return fill5({ attrs: { shape: x.shape, dtype: x.dtype, value: 1 }, backend: backend2 });\n }\n}\nvar onesLikeConfig4 = {\n kernelName: OnesLike,\n backendName: \"webgpu\",\n kernelFunc: onesLike5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Pack.js\nfunction pack4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { axis } = attrs;\n if (inputs.length === 1) {\n return expandDims6({ inputs: { input: inputs[0] }, backend: backend2, attrs: { dim: axis } });\n }\n const shape = inputs[0].shape;\n const dtype = inputs[0].dtype;\n inputs.forEach((t2) => {\n util_exports.assertShapesMatch(shape, t2.shape, \"All tensors passed to stack must have matching shapes\");\n util_exports.assert(dtype === t2.dtype, () => \"All tensors passed to stack must have matching dtypes\");\n });\n const intermediateTensorInfos = [];\n const expandedTensors = inputs.map((t2) => {\n const expandedT = expandDims6({ inputs: { input: t2 }, backend: backend2, attrs: { dim: axis } });\n intermediateTensorInfos.push(expandedT);\n return expandedT;\n });\n const result = concat5({ inputs: expandedTensors, backend: backend2, attrs: { axis } });\n intermediateTensorInfos.forEach((t2) => backend2.disposeData(t2.dataId));\n return result;\n}\nvar packConfig4 = {\n kernelName: Pack,\n backendName: \"webgpu\",\n kernelFunc: pack4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/pad_webgpu.js\nvar PadProgram2 = class {\n constructor(xShape, paddings) {\n this.variableNames = [\"x\"];\n this.uniforms = \"constantValue : f32,\";\n this.workGroupSize = [64, 1, 1];\n this.size = true;\n this.outputShape = paddings.map((p2, i2) => p2[0] + xShape[i2] + p2[1]);\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n paddings.map((_, i2) => {\n this.uniforms += ` pad${i2} : vec2,`;\n });\n this.xShape = xShape;\n this.shaderKey = \"pad\";\n }\n getUserCode() {\n const rank = this.xShape.length;\n const type = getCoordsDataType2(rank);\n const start = this.xShape.map((_, i2) => `uniforms.pad${i2}[0]`).join(\",\");\n const end = this.xShape.map((_, i2) => `uniforms.pad${i2}[0] + uniforms.xShape${rank > 1 ? `[${i2}]` : \"\"}`).join(\",\");\n const startValue = rank > 1 ? `${type}(${start})` : `${start}`;\n const endValue = rank > 1 ? `${type}(${end})` : `${end}`;\n const leftPadCondition = rank > 1 ? `any(outC < start)` : `outC < start`;\n const rightPadCondition = rank > 1 ? `any(outC >= end)` : `outC >= end`;\n const unpackedCoords = rank > 1 ? [\"coords[0]\", \"coords[1]\", \"coords[2]\", \"coords[3]\"].slice(0, rank) : \"coords\";\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let start = ${startValue};\n let end = ${endValue};\n let outC = getCoordsFromIndex(index);\n\n if (${leftPadCondition} || ${rightPadCondition}) {\n setOutputAtIndex(index, uniforms.constantValue);\n } else {\n let coords = outC - start;\n setOutputAtIndex(index, getX(${unpackedCoords}));\n }\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/PadV2.js\nvar padV23 = (args) => {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { paddings, constantValue } = attrs;\n if (paddings.every((p2) => util_exports.arraysEqual(p2, [0, 0]))) {\n return identity5({ inputs: { x }, backend: backend2 });\n }\n if (util_exports.sizeFromShape(x.shape) === 0) {\n const outputShape = paddings.map((p2, i2) => p2[0] + x.shape[i2] + p2[1]);\n return fill5({\n backend: backend2,\n attrs: { shape: outputShape, value: constantValue, dtype: x.dtype }\n });\n }\n const uniformData = [{ type: \"float32\", data: [constantValue] }];\n paddings.map((p2) => uniformData.push({ type: \"int32\", data: [p2[0], p2[1]] }));\n const program = new PadProgram2(x.shape, paddings);\n return backend2.runWebGPUProgram(program, [x], x.dtype, uniformData);\n};\nvar padV2Config4 = {\n kernelName: PadV2,\n backendName: \"webgpu\",\n kernelFunc: padV23\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Pow.js\nvar pow4 = binaryKernelFunc3({\n opType: BinaryOpType.POW\n});\nvar powConfig4 = {\n kernelName: Pow,\n backendName: \"webgpu\",\n kernelFunc: pow4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Prelu.js\nfunction prelu6(args) {\n const { inputs, backend: backend2 } = args;\n const { x, alpha } = inputs;\n const program = new BinaryOpProgram2(BinaryOpType.PRELU, x.shape, alpha.shape);\n return backend2.runWebGPUProgram(program, [x, alpha], \"float32\");\n}\nvar preluConfig4 = {\n kernelName: Prelu,\n backendName: \"webgpu\",\n kernelFunc: prelu6\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Prod.js\nfunction prod5(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { axis, keepDims } = attrs;\n return reduce2(x, axis, keepDims, \"prod\", backend2);\n}\nvar prodConfig4 = {\n kernelName: Prod,\n backendName: \"webgpu\",\n kernelFunc: prod5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Range.js\nvar range6 = (args) => {\n const { backend: backend2, attrs } = args;\n const { start, stop, step: step5, dtype } = attrs;\n const values = rangeImplCPU2(start, stop, step5, dtype);\n return backend2.makeTensorInfo([values.length], dtype, values);\n};\nvar rangeConfig4 = {\n kernelName: Range,\n backendName: \"webgpu\",\n kernelFunc: range6\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/RealDiv.js\nvar realDiv2 = binaryKernelFunc3({ opType: BinaryOpType.DIV });\nvar realDivConfig4 = {\n kernelName: RealDiv,\n backendName: \"webgpu\",\n kernelFunc: realDiv2\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Reciprocal.js\nvar reciprocal4 = unaryKernelFunc3({ opType: UnaryOpType.RECIPROCAL });\nvar reciprocalConfig3 = {\n kernelName: Reciprocal,\n backendName: \"webgpu\",\n kernelFunc: reciprocal4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Relu.js\nvar relu4 = unaryKernelFunc3({ opType: UnaryOpType.RELU });\nvar reluConfig4 = {\n kernelName: Relu,\n backendName: \"webgpu\",\n kernelFunc: relu4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Relu6.js\nvar relu64 = unaryKernelFunc3({ opType: UnaryOpType.RELU6 });\nvar relu6Config4 = {\n kernelName: Relu6,\n backendName: \"webgpu\",\n kernelFunc: relu64\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/resize_bilinear_webgpu.js\nvar ResizeBilinearProgram2 = class {\n constructor(inputShape, newHeight, newWidth) {\n this.variableNames = [\"x\"];\n this.uniforms = \"adjustHeightWidth : vec2, halfPixelCenters : f32,\";\n this.workGroupSize = [64, 1, 1];\n this.size = true;\n this.outputShape = [inputShape[0], newHeight, newWidth, inputShape[3]];\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.shaderKey = `resizeBilinear`;\n }\n getUserCode() {\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let coords = getCoordsFromIndex(index);\n let b = coords[0];\n let d = coords[3];\n let rc = coords.yz;\n\n let effectiveInSize = vec2(\n f32(uniforms.xShape.y) - uniforms.adjustHeightWidth[0],\n f32(uniforms.xShape.z) - uniforms.adjustHeightWidth[1]);\n\n let effectiveOutSize = vec2(\n f32(uniforms.outShape.y) - uniforms.adjustHeightWidth[0],\n f32(uniforms.outShape.z) - uniforms.adjustHeightWidth[1]);\n\n let effectiveInputOverOutputRatioRC =\n effectiveInSize / effectiveOutSize;\n\n // Fractional source index\n let sourceFracIndexRC =\n (vec2(rc) + vec2(uniforms.halfPixelCenters)) *\n effectiveInputOverOutputRatioRC - vec2(uniforms.halfPixelCenters);\n\n // Compute the four integer indices.\n let sourceFloorRC = vec2(sourceFracIndexRC);\n let sourceCeilRC = vec2(\n min(vec2(uniforms.xShape.yz) - vec2(1.0), ceil(sourceFracIndexRC)));\n\n let topLeft = getX(b, sourceFloorRC.x, sourceFloorRC.y, d);\n let bottomLeft = getX(b, sourceCeilRC.x, sourceFloorRC.y, d);\n let topRight = getX(b, sourceFloorRC.x, sourceCeilRC.y, d);\n let bottomRight = getX(b, sourceCeilRC.x, sourceCeilRC.y, d);\n\n let fracRC = sourceFracIndexRC - vec2(sourceFloorRC);\n\n let top = topLeft + (topRight - topLeft) * fracRC.y;\n let bottom = bottomLeft + (bottomRight - bottomLeft) * fracRC.y;\n let newValue = top + (bottom - top) * fracRC.x;\n\n setOutputAtIndex(index, newValue);\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/ResizeBilinear.js\nfunction resizeBilinear5(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { images } = inputs;\n const { alignCorners, size, halfPixelCenters } = attrs;\n const [newHeight, newWidth] = size;\n const adjustHeight = alignCorners && newHeight > 1 ? 1 : 0;\n const adjustWidth = alignCorners && newWidth > 1 ? 1 : 0;\n const halfPixelCentersValue = halfPixelCenters ? 0.5 : 0;\n const uniformData = [\n { type: \"float32\", data: [adjustHeight, adjustWidth] },\n { type: \"float32\", data: [halfPixelCentersValue] }\n ];\n const program = new ResizeBilinearProgram2(images.shape, newHeight, newWidth);\n return backend2.runWebGPUProgram(program, [images], \"float32\", uniformData);\n}\nvar resizeBilinearConfig4 = {\n kernelName: ResizeBilinear,\n backendName: \"webgpu\",\n kernelFunc: resizeBilinear5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/resize_nearest_neighbor_webgpu.js\nvar ResizeNearestNeighborProgram2 = class {\n constructor(inputShape, newHeight, newWidth, halfPixelCenters) {\n this.variableNames = [\"x\"];\n this.uniforms = \"adjustHeightWidth : vec2, roundBase : f32,\";\n this.workGroupSize = [64, 1, 1];\n this.size = true;\n this.outputShape = [inputShape[0], newHeight, newWidth, inputShape[3]];\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.halfPixelCenters = halfPixelCenters;\n this.shaderKey = `resizeNearest_${halfPixelCenters}`;\n }\n getUserCode() {\n let sourceFracIndexRC;\n if (this.halfPixelCenters) {\n sourceFracIndexRC = `max((vec2(rc) + vec2(0.5)) * effectiveInputOverOutputRatioRC, vec2(0.0))`;\n } else {\n sourceFracIndexRC = `vec2(rc) * effectiveInputOverOutputRatioRC`;\n }\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let coords = getCoordsFromIndex(index);\n let b = coords[0];\n let d = coords[3];\n let rc = coords.yz;\n\n let effectiveInSize = vec2(\n f32(uniforms.xShape.y) - uniforms.adjustHeightWidth[0],\n f32(uniforms.xShape.z) - uniforms.adjustHeightWidth[1]);\n\n let effectiveOutSize = vec2(\n f32(uniforms.outShape.y) - uniforms.adjustHeightWidth[0],\n f32(uniforms.outShape.z) - uniforms.adjustHeightWidth[1]);\n\n let effectiveInputOverOutputRatioRC =\n effectiveInSize / effectiveOutSize;\n\n // Fractional source index\n let sourceFracIndexRC = ${sourceFracIndexRC};\n\n // Compute the coordinators of nearest neighbor point.\n let inputShapeRC = vec2(f32(uniforms.xShape.y), f32(uniforms.xShape.z));\n let sourceNearestRC = vec2(\n min(inputShapeRC - 1.0, floor(sourceFracIndexRC + uniforms.roundBase)));\n let newValue = getX(b, sourceNearestRC.x, sourceNearestRC.y, d);\n\n setOutputAtIndex(index, newValue);\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/ResizeNearestNeighbor.js\nfunction resizeNearestNeighbor5(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { images } = inputs;\n const { alignCorners, halfPixelCenters, size } = attrs;\n const [newHeight, newWidth] = size;\n const adjustHeight = alignCorners && newHeight > 1 ? 1 : 0;\n const adjustWidth = alignCorners && newWidth > 1 ? 1 : 0;\n const roundBase = alignCorners ? 0.5 : 0;\n const uniformData = [\n { type: \"float32\", data: [adjustHeight, adjustWidth] },\n { type: \"float32\", data: [roundBase] }\n ];\n const program = new ResizeNearestNeighborProgram2(images.shape, newHeight, newWidth, halfPixelCenters);\n return backend2.runWebGPUProgram(program, [images], images.dtype, uniformData);\n}\nvar resizeNearestNeighborConfig4 = {\n kernelName: ResizeNearestNeighbor,\n backendName: \"webgpu\",\n kernelFunc: resizeNearestNeighbor5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/rotate_webgpu.js\nvar RotateProgram2 = class {\n constructor(imageShape, fillValue) {\n this.outputShape = [];\n this.variableNames = [\"x\"];\n this.workGroupSize = [64, 1, 1];\n this.size = true;\n this.outputShape = imageShape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.uniforms = `centerX : f32, centerY : f32, sinRadians : f32,\n cosRadians : f32,`;\n this.shaderKey = \"rotate\";\n this.outputShape = imageShape;\n if (typeof fillValue === \"number\") {\n this.uniforms += ` fillValue : f32,`;\n this.fillSnippet = `var outputValue = uniforms.fillValue;`;\n this.shaderKey += \"_float\";\n } else {\n this.uniforms += ` fillValue : vec3,`;\n this.fillSnippet = `var outputValue = uniforms.fillValue[coords[3]];`;\n this.shaderKey += \"_vec3\";\n }\n }\n getUserCode() {\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let coords = getCoordsFromIndex(index);\n let coordXFloat = (f32(coords[2]) - uniforms.centerX) *\n uniforms.cosRadians - (f32(coords[1]) - uniforms.centerY) *\n uniforms.sinRadians;\n let coordYFloat = (f32(coords[2]) - uniforms.centerX) *\n uniforms.sinRadians + (f32(coords[1]) - uniforms.centerY) *\n uniforms.cosRadians;\n let coordX = i32(round(coordXFloat + uniforms.centerX));\n let coordY = i32(round(coordYFloat + uniforms.centerY));\n ${this.fillSnippet}\n if(coordX >= 0 && coordX < uniforms.xShape[2] && coordY >= 0 &&\n coordY < uniforms.xShape[1]) {\n outputValue = getX(coords[0], coordY, coordX, coords[3]);\n }\n setOutputAtIndex(index, outputValue);\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/RotateWithOffset.js\nvar rotateWithOffsetConfig4 = {\n kernelName: RotateWithOffset,\n backendName: \"webgpu\",\n kernelFunc: ({ inputs, attrs, backend: backend2 }) => {\n const { image: image2 } = inputs;\n const { radians, fillValue, center } = attrs;\n const webgpuBackend = backend2;\n const program = new RotateProgram2(image2.shape, fillValue);\n const [centerX, centerY] = backend_util_exports.getImageCenter(center, image2.shape[1], image2.shape[2]);\n const uniformData = [\n { type: \"float32\", data: [centerX] },\n { type: \"float32\", data: [centerY] },\n { type: \"float32\", data: [Math.sin(radians)] },\n { type: \"float32\", data: [Math.cos(radians)] }\n ];\n if (typeof fillValue === \"number\") {\n uniformData.push({ type: \"float32\", data: [Number.parseFloat(fillValue.toFixed(2))] });\n } else {\n uniformData.push({ type: \"float32\", data: fillValue });\n }\n const output = webgpuBackend.runWebGPUProgram(program, [image2], image2.dtype, uniformData);\n return output;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Rsqrt.js\nvar rsqrt4 = unaryKernelFunc3({ opType: UnaryOpType.RSQRT, cpuKernelImpl: rsqrtImplCPU2 });\nvar rsqrtConfig4 = {\n kernelName: Rsqrt,\n backendName: \"webgpu\",\n kernelFunc: rsqrt4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/scatter_webgpu.js\nvar ScatterProgram2 = class {\n constructor(flattenXShape, sliceDim, indicesRank, updatesRank, strides, shape, outputDtype, sumDupeIndices = true) {\n this.variableNames = [\"updates\", \"indices\"];\n this.workGroupSize = [64, 1, 1];\n this.atomic = true;\n this.outputShape = shape;\n this.type = outputDtype;\n this.sumDupeIndices = sumDupeIndices;\n this.dispatchLayout = flatDispatchLayout(flattenXShape);\n this.dispatch = computeDispatch(this.dispatchLayout, flattenXShape, this.workGroupSize);\n this.sliceDimGreaterThanOne = sliceDim > 1;\n this.shaderKey = `scatter_${indicesRank}_${updatesRank}_${this.sliceDimGreaterThanOne}_${outputDtype}_${sumDupeIndices}`;\n const stridesType = getCoordsDataType2(strides.length);\n this.uniforms = `sliceDim : i32, strides: ${stridesType}, size: i32,`;\n this.updatesRank = updatesRank;\n this.indicesRank = indicesRank;\n }\n getUserCode() {\n let indicesString = \"\";\n if (this.indicesRank === 1) {\n indicesString = \"coords[0]\";\n } else if (this.indicesRank === 2) {\n indicesString = \"coords[0], j\";\n }\n const indicesSnippet = `getIndices(${indicesString})`;\n const strideString = this.sliceDimGreaterThanOne ? \"uniforms.strides[j]\" : \"uniforms.strides\";\n let outCoordsString = \"\";\n let getUpdatesCoordsFromFlatIndex = \"\";\n if (this.dispatchLayout.x.length === 1) {\n outCoordsString = \"flattenedIndex\";\n getUpdatesCoordsFromFlatIndex = `\n fn getUpdatesCoordsFromFlatIndex(index : i32) -> i32 {\n return index;\n }\n `;\n } else if (this.dispatchLayout.x.length === 2) {\n outCoordsString = \"vec2(flattenedIndex, coords[1])\";\n getUpdatesCoordsFromFlatIndex = `\n fn getUpdatesCoordsFromFlatIndex(index : i32) -> vec2 {\n // N.B. |updates| could be a scalar tensor, conceptually representing a\n // 2D tensor with all values equal to that. By design, its size must be\n // the same as |outShape[1]| in one dimension, and |indicesShape[0]|\n // gives the other.\n let sliceSize = uniforms.outShape[1];\n let d0 = index / sliceSize;\n let d1 = index - d0 * sliceSize;\n return vec2(d0, d1);\n }\n `;\n }\n const updatesString = Array.from({ length: this.updatesRank }, (_, idx) => `coords[${idx}]`);\n const updatesSnippet = `getUpdates(${updatesString.join(\", \")})`;\n const atomicRMW = (ptr, val) => {\n let atomicAddSnippet = `atomicAdd(${ptr}, bitcast(${val}))`;\n if (this.type === \"float32\") {\n atomicAddSnippet = `\n {\n var oldBits = 0;\n var newBits = bitcast(${val});\n loop {\n let info = atomicCompareExchangeWeak(${ptr}, oldBits, newBits);\n if (info.exchanged) {\n break;\n }\n oldBits = info.old_value;\n let oldValue = bitcast(oldBits);\n let newValue = oldValue + (${val});\n newBits = bitcast(newValue);\n }\n }\n `;\n }\n const atomicStoreSnippet = `atomicStore(${ptr}, bitcast(${val}));`;\n return this.sumDupeIndices ? atomicAddSnippet : atomicStoreSnippet;\n };\n const userCode = `\n ${getUpdatesCoordsFromFlatIndex}\n\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let coords = getUpdatesCoordsFromFlatIndex(index);\n var flattenedIndex = 0;\n for (var j = 0; j < uniforms.sliceDim; j = j + 1) {\n let indexInside = i32(round(${indicesSnippet}));\n flattenedIndex = flattenedIndex + indexInside * ${strideString};\n }\n let updateValue =\n ${mapToWgslTypes(this.type, false)}(${updatesSnippet});\n let flatIndex = getOutputIndexFromCoords(${outCoordsString});\n\n ${atomicRMW(\"&result[flatIndex]\", \"updateValue\")};\n }\n }`;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/ScatterNd.js\nfunction scatterNd4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { indices, updates } = inputs;\n const { shape } = attrs;\n const { sliceRank, numUpdates, sliceSize, strides, outputSize } = backend_util_exports.calculateShapes(updates, indices, shape);\n const flattenShape = [outputSize / sliceSize, sliceSize];\n if (outputSize === 0) {\n return backend2.makeTensorInfo(shape, indices.dtype);\n }\n const flattenIndices = reshape6({ inputs: { x: indices }, backend: backend2, attrs: { shape: [numUpdates, sliceRank] } });\n const flattenX = reshape6({ inputs: { x: updates }, backend: backend2, attrs: { shape: [numUpdates, sliceSize] } });\n const type = flattenX.dtype;\n const output = fill5({ backend: backend2, attrs: { shape: flattenShape, value: 0, dtype: type } });\n const size = util_exports.sizeFromShape(flattenX.shape);\n const uniformData = [\n { type: \"int32\", data: [sliceRank] },\n { type: \"int32\", data: strides },\n { type: \"int32\", data: [size] }\n ];\n const program = new ScatterProgram2(flattenX.shape, sliceRank, flattenIndices.shape.length, flattenX.shape.length, strides, flattenShape, type);\n const res = backend2.runWebGPUProgram(program, [flattenX, flattenIndices], type, uniformData, output);\n const reshaped = reshape6({ inputs: { x: res }, backend: backend2, attrs: { shape } });\n backend2.disposeData(flattenIndices.dataId);\n backend2.disposeData(flattenX.dataId);\n backend2.disposeData(res.dataId);\n return reshaped;\n}\nvar scatterNdConfig4 = {\n kernelName: ScatterNd,\n backendName: \"webgpu\",\n kernelFunc: scatterNd4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/select_webgpu.js\nvar SelectProgram2 = class {\n constructor(cRank, shape, rank) {\n this.variableNames = [\"c\", \"a\", \"b\"];\n this.workGroupSize = [64, 1, 1];\n this.size = true;\n this.outputShape = shape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.cRank = cRank;\n this.rank = rank;\n this.shaderKey = \"select\";\n }\n getUserCode() {\n let cCoords;\n let abCoords;\n if (this.rank > 4) {\n throw Error(`Where for rank ${this.rank} is not yet supported`);\n }\n if (this.rank === 1) {\n abCoords = `resRC`;\n cCoords = `resRC`;\n } else {\n const currentCoords = [\"resRC.x\", \"resRC.y\", \"resRC.z\", \"resRC.w\"];\n const cCoordVars = [];\n const abCoordVars = [];\n for (let i2 = 0; i2 < this.outputShape.length; i2++) {\n abCoordVars.push(`${currentCoords[i2]}`);\n if (i2 < this.cRank) {\n cCoordVars.push(`${currentCoords[i2]}`);\n }\n }\n cCoords = cCoordVars.join();\n abCoords = abCoordVars.join();\n }\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let resRC = getCoordsFromIndex(index);\n let cVal = getC(${cCoords});\n if (cVal >= 1.0) {\n setOutputAtIndex(index, getA(${abCoords}));\n } else {\n setOutputAtIndex(index, getB(${abCoords}));\n }\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Select.js\nfunction select5(args) {\n const { inputs, backend: backend2 } = args;\n const { condition, t: t2, e: e2 } = inputs;\n const program = new SelectProgram2(condition.shape.length, t2.shape, t2.shape.length);\n return backend2.runWebGPUProgram(program, [condition, t2, e2], upcastType(t2.dtype, e2.dtype));\n}\nvar selectConfig4 = {\n kernelName: Select,\n backendName: \"webgpu\",\n kernelFunc: select5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Sigmoid.js\nvar sigmoid5 = unaryKernelFunc3({ opType: UnaryOpType.SIGMOID });\nvar sigmoidConfig4 = {\n kernelName: Sigmoid,\n backendName: \"webgpu\",\n kernelFunc: sigmoid5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Sin.js\nvar sin4 = unaryKernelFunc3({ opType: UnaryOpType.SIN });\nvar sinConfig4 = {\n kernelName: Sin,\n backendName: \"webgpu\",\n kernelFunc: sin4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Sinh.js\nvar sinh4 = unaryKernelFunc3({ opType: UnaryOpType.SINH });\nvar sinhConfig3 = {\n kernelName: Sinh,\n backendName: \"webgpu\",\n kernelFunc: sinh4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Sub.js\nvar sub4 = binaryKernelFunc3({ opType: BinaryOpType.SUB, cpuKernelImpl: subImplCPU2, supportsComplex: true });\nvar subConfig4 = {\n kernelName: Sub,\n backendName: \"webgpu\",\n kernelFunc: sub4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Softmax.js\nfunction softmax6(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { logits } = inputs;\n const { dim } = attrs;\n const axes = util_exports.parseAxisParam([dim], logits.shape);\n const maxLogit = max6({\n inputs: { x: logits },\n backend: backend2,\n attrs: { reductionIndices: axes, keepDims: false }\n });\n const expandedShape = backend_util_exports.expandShapeToKeepDim(maxLogit.shape, axes);\n const maxLogitsReshaped = reshape6({ inputs: { x: maxLogit }, backend: backend2, attrs: { shape: expandedShape } });\n const a = sub4({ inputs: { a: logits, b: maxLogitsReshaped }, backend: backend2 });\n const b = exp4({ inputs: { x: a }, backend: backend2 });\n const sumExp = sum6({ inputs: { x: b }, backend: backend2, attrs: { axis: axes, keepDims: false } });\n const sumExpReshaped = reshape6({ inputs: { x: sumExp }, backend: backend2, attrs: { shape: expandedShape } });\n const res = realDiv2({ inputs: { a: b, b: sumExpReshaped }, backend: backend2 });\n backend2.disposeData(maxLogit.dataId);\n backend2.disposeData(maxLogitsReshaped.dataId);\n backend2.disposeData(a.dataId);\n backend2.disposeData(b.dataId);\n backend2.disposeData(sumExp.dataId);\n backend2.disposeData(sumExpReshaped.dataId);\n return res;\n}\nvar softmaxConfig4 = {\n kernelName: Softmax,\n backendName: \"webgpu\",\n kernelFunc: softmax6\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/SpaceToBatchND.js\nvar spaceToBatchND5 = (args) => {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { blockShape, paddings } = attrs;\n util_exports.assert(x.shape.length <= 4, () => \"spaceToBatchND for rank > 4 with a WebGPU backend not implemented yet\");\n const prod6 = blockShape.reduce((a, b) => a * b);\n const completePaddings = [[0, 0]];\n completePaddings.push(...paddings);\n for (let i2 = 1 + blockShape.length; i2 < x.shape.length; ++i2) {\n completePaddings.push([0, 0]);\n }\n const toDispose = [];\n const paddedX = padV23({\n inputs: { x },\n backend: backend2,\n attrs: { paddings: completePaddings, constantValue: 0 }\n });\n const reshapedPaddedShape = backend_util_exports.getReshaped(paddedX.shape, blockShape, prod6, false);\n const permutedReshapedPaddedPermutation = backend_util_exports.getPermuted(reshapedPaddedShape.length, blockShape.length, false);\n const flattenShape = backend_util_exports.getReshapedPermuted(paddedX.shape, blockShape, prod6, false);\n const reshapedPaddedX = reshape6({ inputs: { x: paddedX }, backend: backend2, attrs: { shape: reshapedPaddedShape } });\n const paddedXT = transpose5({\n inputs: { x: reshapedPaddedX },\n backend: backend2,\n attrs: { perm: permutedReshapedPaddedPermutation }\n });\n const result = reshape6({ inputs: { x: paddedXT }, backend: backend2, attrs: { shape: flattenShape } });\n toDispose.push(paddedX);\n toDispose.push(reshapedPaddedX);\n toDispose.push(paddedXT);\n toDispose.forEach((t2) => backend2.disposeData(t2.dataId));\n return result;\n};\nvar spaceToBatchNDConfig4 = {\n kernelName: SpaceToBatchND,\n backendName: \"webgpu\",\n kernelFunc: spaceToBatchND5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/tile_webgpu.js\nvar TileProgram2 = class {\n constructor(aShape, reps) {\n this.variableNames = [\"A\"];\n this.workGroupSize = [64, 1, 1];\n this.size = true;\n const outputShape = new Array(aShape.length);\n for (let i2 = 0; i2 < outputShape.length; i2++) {\n outputShape[i2] = aShape[i2] * reps[i2];\n }\n this.outputShape = outputShape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.rank = this.outputShape.length;\n this.shaderKey = \"tile\";\n }\n getUserCode() {\n const sourceCoords = getSourceCoords5(this.rank, \"uniforms.\");\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let resRC = getCoordsFromIndex(index);\n setOutputAtIndex(index, getA(${sourceCoords}));\n }\n }\n `;\n return userCode;\n }\n};\nfunction getSourceCoords5(rank, uniformPrefix = \"\") {\n if (rank >= 5) {\n throw Error(`Tile for rank ${rank} is not yet supported`);\n }\n if (rank === 1) {\n return `(resRC % ${uniformPrefix}aShape)`;\n }\n const currentCoords = [\"resRC.x\", \"resRC.y\", \"resRC.z\", \"resRC.w\"];\n const sourceCoords = [];\n for (let i2 = 0; i2 < rank; i2++) {\n sourceCoords.push(`(${currentCoords[i2]} % ${uniformPrefix}aShape[${i2}])`);\n }\n return sourceCoords.join();\n}\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Tile.js\nfunction tile6(params) {\n const { inputs, backend: backend2, attrs } = params;\n const { x } = inputs;\n const { reps } = attrs;\n if (backend2.shouldExecuteOnCPU([x]) || x.dtype === \"string\" || x.shape.length >= 5) {\n const data = backend2.readSync(x.dataId);\n const value = x.dtype === \"string\" ? data.map((d) => util_exports.decodeString(d)) : data;\n const buf = buffer(x.shape, x.dtype, value);\n const outBuf = tileImplCPU2(buf, reps);\n return backend2.makeTensorInfo(outBuf.shape, outBuf.dtype, outBuf.values);\n }\n const program = new TileProgram2(x.shape, reps);\n const output = backend2.runWebGPUProgram(program, [x], x.dtype);\n return output;\n}\nvar tileConfig4 = {\n kernelName: Tile,\n backendName: \"webgpu\",\n kernelFunc: tile6\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/SparseToDense.js\nfunction sparseToDense4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { sparseIndices, sparseValues, defaultValue } = inputs;\n const { outputShape } = attrs;\n const { sliceRank, numUpdates, sliceSize, strides, outputSize } = backend_util_exports.calculateShapes(sparseValues, sparseIndices, outputShape);\n const sumDupeIndices = false;\n if (sparseValues.dtype === \"string\") {\n const indicesBuf = backend2.bufferSync(sparseIndices);\n const updatesBuf = backend2.bufferSync(sparseValues);\n const $defaultValue2 = util_exports.decodeString(backend2.readSync(defaultValue.dataId)[0]);\n const outBuf = scatterImplCPU2(indicesBuf, updatesBuf, outputShape, outputSize, sliceSize, numUpdates, sliceRank, strides, $defaultValue2, sumDupeIndices);\n return backend2.makeTensorInfo(outputShape, outBuf.dtype, outBuf.values);\n }\n const flattenShape = [outputSize / sliceSize, sliceSize];\n const $sparseIndices = reshape6({\n inputs: { x: sparseIndices },\n backend: backend2,\n attrs: { shape: [numUpdates, sliceRank] }\n });\n const $sparseValues = sparseValues.shape.length ? reshape6({\n inputs: { x: sparseValues },\n backend: backend2,\n attrs: { shape: [numUpdates, sliceSize] }\n }) : identity5({ inputs: { x: sparseValues }, backend: backend2 });\n const type = $sparseValues.dtype;\n const zero = backend2.makeTensorInfo([], type, util_exports.makeZerosTypedArray(1, type));\n const $defaultValue = reshape6({\n inputs: { x: defaultValue },\n backend: backend2,\n attrs: { shape: Array(flattenShape.length).fill(1) }\n });\n const $denseValues = tile6({ inputs: { x: $defaultValue }, backend: backend2, attrs: { reps: flattenShape } });\n const size = util_exports.sizeFromShape([numUpdates, sliceSize]);\n const uniformData = [\n { type: \"int32\", data: [sliceRank] },\n { type: \"int32\", data: strides },\n { type: \"int32\", data: [size] }\n ];\n switch (numUpdates) {\n case 0:\n break;\n case 1:\n if (true) {\n const program = new ScatterProgram2([numUpdates, sliceSize], sliceRank, $sparseIndices.shape.length, $sparseValues.shape.length, strides, flattenShape, type, sumDupeIndices);\n backend2.runWebGPUProgram(program, [$sparseValues, $sparseIndices], type, uniformData, $denseValues);\n }\n break;\n default:\n if (true) {\n const program = new ScatterProgram2([numUpdates, sliceSize], sliceRank, $sparseIndices.shape.length, zero.shape.length, strides, flattenShape, type, sumDupeIndices);\n backend2.runWebGPUProgram(program, [zero, $sparseIndices], type, uniformData, $denseValues);\n }\n {\n const program = new ScatterProgram2([numUpdates, sliceSize], sliceRank, $sparseIndices.shape.length, $sparseValues.shape.length, strides, flattenShape, type);\n backend2.runWebGPUProgram(program, [$sparseValues, $sparseIndices], type, uniformData, $denseValues);\n }\n }\n const denseValues = reshape6({ inputs: { x: $denseValues }, backend: backend2, attrs: { shape: outputShape } });\n backend2.disposeData($sparseIndices.dataId);\n backend2.disposeData($sparseValues.dataId);\n backend2.disposeData($defaultValue.dataId);\n backend2.disposeData(zero.dataId);\n backend2.disposeData($denseValues.dataId);\n return denseValues;\n}\nvar sparseToDenseConfig3 = {\n kernelName: SparseToDense,\n backendName: \"webgpu\",\n kernelFunc: sparseToDense4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/SplitV.js\nfunction splitV4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { numOrSizeSplits, axis } = attrs;\n const $axis = util_exports.parseAxisParam(axis, x.shape)[0];\n const splitSizes = backend_util_exports.prepareSplitSize(x, numOrSizeSplits, $axis);\n const xRank = x.shape.length;\n const begin = new Array(xRank).fill(0);\n const size = x.shape.slice();\n return splitSizes.map((s2) => {\n const sliceSize = [...size];\n sliceSize[$axis] = s2;\n const sliceT = slice5({ inputs: { x }, backend: backend2, attrs: { begin, size: sliceSize } });\n begin[$axis] += s2;\n return sliceT;\n });\n}\nvar splitVConfig4 = {\n kernelName: SplitV,\n backendName: \"webgpu\",\n kernelFunc: splitV4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Sqrt.js\nvar sqrt4 = unaryKernelFunc3({ opType: UnaryOpType.SQRT });\nvar sqrtConfig4 = {\n kernelName: Sqrt,\n backendName: \"webgpu\",\n kernelFunc: sqrt4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Square.js\nvar squareConfig4 = {\n kernelName: Square,\n backendName: \"webgpu\",\n kernelFunc: ({ inputs, backend: backend2 }) => {\n const { x } = inputs;\n const webGPUBackend = backend2;\n const program = new UnaryOpProgram2(x.shape, UnaryOpType.SQUARE);\n return webGPUBackend.runWebGPUProgram(program, [x], x.dtype);\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/SquaredDifference.js\nvar squaredDifference4 = binaryKernelFunc3({\n opType: BinaryOpType.SQUARED_DIFFERENCE\n});\nvar squaredDifferenceConfig4 = {\n kernelName: SquaredDifference,\n backendName: \"webgpu\",\n kernelFunc: squaredDifference4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/strided_slice_webgpu.js\nvar StridedSliceProgram2 = class {\n constructor(destSize) {\n this.variableNames = [\"x\"];\n this.workPerThread = 1;\n this.workGroupSize = [64, 1, 1];\n this.size = true;\n this.outputShape = destSize;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize, [this.workPerThread, 1, 1]);\n const dtype = getCoordsDataType2(this.outputShape.length);\n this.uniforms = `begin : ${dtype}, strides : ${dtype}, `;\n this.shaderKey = \"stridedSlice\";\n }\n getUserCode() {\n const rank = this.outputShape.length;\n let newCoords = \"\";\n if (rank === 1) {\n newCoords = \"coords * uniforms.strides + uniforms.begin\";\n } else {\n let outputAxis = 0;\n newCoords = this.outputShape.map((_, i2) => {\n outputAxis++;\n return this.outputShape.length === 1 ? `coords * uniforms.strides[${i2}] + uniforms.begin[${i2}]` : `coords[${outputAxis - 1}] * uniforms.strides[${i2}] + uniforms.begin[${i2}]`;\n }).join(\",\");\n }\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let coords = getCoordsFromIndex(index);\n setOutputAtIndex(index, getX(${newCoords}));\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/StridedSlice.js\nfunction stridedSlice5(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { begin, end, strides, beginMask, endMask, ellipsisMask, newAxisMask, shrinkAxisMask } = attrs;\n const { finalShapeSparse, finalShape, isIdentity, sliceDim0, isSimpleSlice, begin: $begin, end: $end, strides: $strides } = slice_util_exports.sliceInfo(x.shape, begin, end, strides, beginMask, endMask, ellipsisMask, newAxisMask, shrinkAxisMask);\n let result;\n if (isIdentity) {\n result = reshape6({ inputs: { x }, backend: backend2, attrs: { shape: finalShape } });\n } else if (sliceDim0 || isSimpleSlice) {\n util_exports.assert(x.shape.length >= 1, () => `Input must have rank at least 1, got: ${x.shape.length}`);\n const size = slice_util_exports.computeOutShape($begin, $end, $strides);\n const sliced = slice5({ inputs: { x }, backend: backend2, attrs: { begin: $begin, size } });\n result = reshape6({ inputs: { x: sliced }, backend: backend2, attrs: { shape: finalShape } });\n backend2.disposeData(sliced.dataId);\n } else {\n const shouldExecuteOnCPU = backend2.shouldExecuteOnCPU([x]);\n if (shouldExecuteOnCPU) {\n const values = backend2.readSync(x.dataId);\n const xBuf = buffer(x.shape, x.dtype, values);\n const resultValues = stridedSliceImplCPU2(finalShapeSparse, xBuf, $strides, $begin);\n result = backend2.makeTensorInfo(finalShape, x.dtype, resultValues.values);\n } else {\n const program = new StridedSliceProgram2(finalShapeSparse);\n const uniformData = [{ type: \"int32\", data: $begin }, { type: \"int32\", data: $strides }];\n const resultValues = backend2.runWebGPUProgram(program, [x], x.dtype, uniformData);\n result = reshape6({ inputs: { x: resultValues }, backend: backend2, attrs: { shape: finalShape } });\n backend2.disposeData(resultValues.dataId);\n }\n }\n return result;\n}\nvar stridedSliceConfig4 = {\n kernelName: StridedSlice,\n backendName: \"webgpu\",\n kernelFunc: stridedSlice5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/StringNGrams.js\nfunction stringNGrams5(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { separator, nGramWidths, leftPad, rightPad: rightPad2, padWidth, preserveShortSequences } = attrs;\n const { data, dataSplits } = inputs;\n const $data = backend2.readSync(data.dataId);\n const $dataSplits = backend2.readSync(dataSplits.dataId);\n const [nGrams, nGramsSplits] = stringNGramsImplCPU2($data, $dataSplits, separator, nGramWidths, leftPad, rightPad2, padWidth, preserveShortSequences);\n return [\n backend2.makeTensorInfo([nGrams.length], \"string\", nGrams),\n backend2.makeTensorInfo(dataSplits.shape, \"int32\", nGramsSplits)\n ];\n}\nvar stringNGramsConfig4 = {\n kernelName: StringNGrams,\n backendName: \"webgpu\",\n kernelFunc: stringNGrams5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Tanh.js\nvar tanh5 = unaryKernelFunc3({ opType: UnaryOpType.TANH });\nvar tanhConfig4 = {\n kernelName: Tanh,\n backendName: \"webgpu\",\n kernelFunc: tanh5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/top_k_webgpu.js\nvar SwapProgram2 = class {\n constructor(shape) {\n this.variableNames = [\"x\", \"indices\"];\n this.workGroupSize = [256, 1, 1];\n this.size = true;\n this.outputShape = shape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.uniforms = `inputSize : i32, firstPass : i32, negativeInf : f32,\n dir : i32, inc : i32,`;\n this.shaderKey = \"swap\";\n }\n getUserCode() {\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let outC = getCoordsFromIndex(index);\n let batch = outC[0];\n let elemIdx = outC[1];\n // We compare elements pair-wise within a group of size 2 * inc.\n // The comparing rule for each group alternates between ascending\n // and descending. Within each group, we compare each pair at\n // positions i and i+inc. To decide whether an element at position i\n // is x0 or x1, we mod it by 2 * inc, if the result is smaller than\n // inc, it is in the first half of the group, we denote it as x0,\n // otherwise we denote it as x1.\n // For example, as shown in the Bitonic top K paper referenced\n // above, Figure5(a) shows that element[1] is in the second half of\n // the group when group size is 2, but it is in the first half of\n // the group when group size is 4.\n let isFirstInPair = elemIdx % (2 * uniforms.inc) < uniforms.inc;\n var i = 0;\n if (isFirstInPair) {\n i = elemIdx;\n } else {\n i = elemIdx - uniforms.inc;\n }\n\n var i0 = 0;\n if (uniforms.firstPass == 1) {\n i0 = i;\n } else {\n i0 = i32(getIndices(batch, i));\n }\n\n var i1 = 0;\n if (uniforms.firstPass == 1) {\n i1 = i + uniforms.inc;\n } else {\n i1 = i32(getIndices(batch, i + uniforms.inc));\n }\n\n var x0 = f32(0.0);\n var x1 = f32(0.0);\n if (i0 < uniforms.inputSize) {\n x0 = getX(batch, i0);\n } else {\n x0 = uniforms.negativeInf;\n }\n if (i1 < uniforms.inputSize) {\n x1 = getX(batch, i1);\n } else {\n x1 = uniforms.negativeInf;\n }\n\n let reverse = elemIdx % (2 * uniforms.dir) >= uniforms.dir;\n let isGreater = x0 > x1 || (x0 == x1 && i1 > i0);\n if (reverse == isGreater) {\n // Elements in opposite order of direction\n let iTemp = i0;\n i0 = i1;\n i1 = iTemp;\n }\n if (isFirstInPair) {\n setOutputAtIndex(index, f32(i0));\n } else {\n setOutputAtIndex(index, f32(i1));\n }\n }\n }\n `;\n return userCode;\n }\n};\nvar MergeProgram2 = class {\n constructor(shape) {\n this.variableNames = [\"x\", \"indices\"];\n this.workGroupSize = [256, 1, 1];\n this.size = true;\n this.outputShape = shape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.uniforms = `inputSize : i32, firstPass : i32, k : i32,`;\n this.shaderKey = \"merge\";\n }\n getUserCode() {\n const userCode = `\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let outC = getCoordsFromIndex(index);\n let batch = outC[0];\n let elemIdx = outC[1];\n // The output size is half of the previous size.\n // If the previous sequence is | | | | _ _ _ _ | | | | _ _ _ _\n // (k=4), we only need to output the indices at positions |, the\n // indices at positions _ can be thrown away, see Figure5(b) After\n // Phase 2 (Merge phase) in the Bitonic Top K paper referenced\n // above.\n // For example, the paper shows we only need to output the orange\n // bars. The output sequence should look like this | | | | | | | |.\n // Because the sequence is halved, to map the output index back to\n // the previous sequence to find the corresponding value, we need\n // to double the index. When we double the index, we basically\n // interpolate a position, so 2i looks like\n // | _ | _ | _ | _ | _ | _ | _. We move the | to the first k\n // position of each 2k positions by - elemIdx % k. E.g. for output\n // at index 4,5,6,7, we want to get the corresponding element at\n // original index 8,9,10,11, for output at index 8,9,10,11,\n // we want to get the corresponding element at original index\n // 16,17,18,19, so on and so forth.\n\n var i = 0;\n if (elemIdx < uniforms.k) {\n i = elemIdx;\n } else {\n i = elemIdx * 2 - elemIdx % uniforms.k;\n }\n var i0 = 0;\n if (uniforms.firstPass == 1) {\n i0 = i;\n } else {\n i0 = i32(getIndices(batch, i));\n }\n var i1 = 0;\n if (uniforms.firstPass == 1) {\n i1 = i + uniforms.k;\n } else {\n i1 = i32(getIndices(batch, i + uniforms.k));\n }\n\n let x0 = getX(batch, i0);\n var x1 = f32(0.0);\n if (i1 < uniforms.inputSize) {\n x1 = getX(batch, i1);\n } else {\n x1 = x0;\n }\n\n if (x0 >= x1) {\n setOutputAtIndex(index, f32(i0));\n } else {\n setOutputAtIndex(index, f32(i1));\n }\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/TopK.js\nfunction disposeIntermediateTensorInfoOrNull2(backend2, tensorInfo) {\n if (tensorInfo !== null) {\n backend2.disposeData(tensorInfo.dataId);\n }\n}\nfunction roundUpToPow22(num) {\n let pow22 = 1;\n while (pow22 < num) {\n pow22 *= 2;\n }\n return pow22;\n}\nfunction topK3(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { x } = inputs;\n const { k, sorted } = attrs;\n const xShape = x.shape;\n const lastDim = xShape[xShape.length - 1];\n if (backend2.shouldExecuteOnCPU([x])) {\n const xVals = backend2.readSync(x.dataId);\n const [allTopKVals, allTopKIndices] = topKImplCPU2(xVals, xShape, x.dtype, k, sorted);\n return [\n backend2.makeTensorInfo(allTopKVals.shape, allTopKVals.dtype, allTopKVals.values),\n backend2.makeTensorInfo(allTopKIndices.shape, allTopKIndices.dtype, allTopKIndices.values)\n ];\n }\n if (k === 0) {\n xShape[xShape.length - 1] = 0;\n return [\n backend2.makeTensorInfo(xShape, x.dtype, []),\n backend2.makeTensorInfo(xShape, \"int32\", [])\n ];\n }\n if (lastDim === 1) {\n return [\n x,\n fill5({ attrs: { shape: xShape, dtype: \"int32\", value: 0 }, backend: backend2 })\n ];\n }\n const xSize = util_exports.sizeFromShape(xShape);\n const batch = xSize / lastDim;\n const x2D = reshape6({ inputs: { x }, attrs: { shape: [batch, lastDim] }, backend: backend2 });\n const kPow2 = roundUpToPow22(k);\n const lastDimPow2 = roundUpToPow22(lastDim);\n let indices = null;\n const getInputs = () => indices === null ? [x2D, x2D] : [x2D, indices];\n const runSwap = (dir, inc, shape) => {\n const inputs2 = getInputs();\n const program = new SwapProgram2(shape);\n const firstPass = indices === null ? 1 : 0;\n const uniformDataSwap = [\n { type: \"int32\", data: [lastDim] },\n { type: \"int32\", data: [firstPass] },\n { type: \"float32\", data: [Number.NEGATIVE_INFINITY] },\n { type: \"int32\", data: [dir] },\n { type: \"int32\", data: [inc] }\n ];\n const prevIndices2 = indices;\n indices = backend2.runWebGPUProgram(program, inputs2, \"int32\", uniformDataSwap);\n disposeIntermediateTensorInfoOrNull2(backend2, prevIndices2);\n };\n for (let len = 1; len < kPow2; len *= 2) {\n const dir = len * 2;\n for (let inc = len; inc >= 1; inc /= 2) {\n runSwap(dir, inc, [batch, lastDimPow2]);\n }\n }\n for (let indicesSize = lastDimPow2; indicesSize > kPow2; indicesSize /= 2) {\n const inputs2 = getInputs();\n const mergeProgram = new MergeProgram2([batch, indicesSize / 2]);\n const firstPass = indices === null ? 1 : 0;\n const uniformDataMerge = [\n { type: \"int32\", data: [lastDim] },\n { type: \"int32\", data: [firstPass] },\n { type: \"int32\", data: [kPow2] }\n ];\n const prevIndices2 = indices;\n indices = backend2.runWebGPUProgram(mergeProgram, inputs2, \"int32\", uniformDataMerge);\n disposeIntermediateTensorInfoOrNull2(backend2, prevIndices2);\n const len = kPow2 / 2;\n const dir = len * 2;\n for (let inc = len; inc >= 1; inc /= 2) {\n runSwap(dir, inc, indices.shape);\n }\n }\n let prevIndices = indices;\n indices = slice5({ inputs: { x: indices }, backend: backend2, attrs: { begin: 0, size: [batch, k] } });\n disposeIntermediateTensorInfoOrNull2(backend2, prevIndices);\n let values = gatherV24({ inputs: { x: x2D, indices }, backend: backend2, attrs: { axis: 1, batchDims: 1 } });\n disposeIntermediateTensorInfoOrNull2(backend2, x2D);\n const newShape = xShape.slice(0, -1);\n newShape.push(k);\n prevIndices = indices;\n indices = reshape6({ inputs: { x: indices }, attrs: { shape: newShape }, backend: backend2 });\n disposeIntermediateTensorInfoOrNull2(backend2, prevIndices);\n const prevValues = values;\n values = reshape6({ inputs: { x: values }, attrs: { shape: newShape }, backend: backend2 });\n disposeIntermediateTensorInfoOrNull2(backend2, prevValues);\n return [values, indices];\n}\nvar topKConfig4 = {\n kernelName: TopK,\n backendName: \"webgpu\",\n kernelFunc: topK3\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/transform_webgpu.js\nvar TransformProgram2 = class {\n constructor(outShape) {\n this.variableNames = [\"Image\", \"Transforms\"];\n this.uniforms = \"interpolationModeId : i32, fillModeId : i32, fillValue : f32,\";\n this.workGroupSize = [64, 1, 1];\n this.size = true;\n this.outputShape = outShape;\n this.dispatchLayout = flatDispatchLayout(this.outputShape);\n this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize);\n this.shaderKey = \"transform\";\n }\n getUserCode() {\n const userCode = `\n fn mapCoord(outCoord : f32, len : f32) -> f32{\n var inCoord = outCoord;\n if(uniforms.fillModeId == 2) {\n if (inCoord < 0.0) {\n if (len <= 1.0) {\n inCoord = 0.0;\n } else {\n let sz2 = 2.0 * len;\n if (inCoord < sz2) {\n inCoord = sz2 * f32(i32(f32(-inCoord / sz2))) +\n inCoord;\n }\n if (inCoord < -len) {\n inCoord = inCoord + sz2;\n } else {\n inCoord = -inCoord - 1.0;\n }\n }\n } else if (inCoord > len - 1.0) {\n if (len <= 1.0) {\n inCoord = 0.0;\n } else {\n let sz2 = 2.0 * len;\n inCoord = inCoord - sz2 * f32(i32(f32(inCoord / sz2)));\n if (inCoord >= len) {\n inCoord = sz2 - inCoord - 1.0;\n }\n }\n }\n return clamp(inCoord, 0.0, len - 1.0);\n } else if (uniforms.fillModeId == 3) {\n if (inCoord < 0.0) {\n if (len <= 1.0) {\n inCoord = 0.0;\n } else {\n let sz = len - 1.0;\n inCoord = inCoord + len * (f32(i32(f32(-inCoord / sz))) + 1.0);\n }\n } else if (inCoord > len - 1.0) {\n if (len <= 1.0) {\n inCoord = 0.0;\n } else {\n let sz = len - 1.0;\n inCoord = inCoord - len * f32(i32(f32(inCoord / sz)));\n }\n }\n return clamp(inCoord, 0.0, len - 1.0);\n } else if (uniforms.fillModeId == 4) {\n return clamp(outCoord, 0.0, len - 1.0);\n }\n return outCoord;\n }\n fn readWithFillValue(batch : i32, coordY : i32, coordX : i32,\n channel : i32) -> f32 {\n var outputValue : f32;\n if (0 <= coordY && coordY < uniforms.imageShape[1] && 0 <= coordX && coordX < uniforms.imageShape[2]) {\n outputValue = getImage(batch, coordY, coordX, channel);\n } else {\n outputValue = uniforms.fillValue;\n }\n return outputValue;\n }\n\n ${getMainHeaderString(\"index\")} {\n if (index < uniforms.size) {\n let coords = getCoordsFromIndex(index);\n var outputValue : f32;\n let batch = coords[0];\n let x = coords[2];\n let y = coords[1];\n let channel = coords[3];\n let xf = f32(x);\n let yf = f32(y);\n let a1 = getTransforms(batch, 0);\n let a2 = getTransforms(batch, 1);\n let a3 = getTransforms(batch, 2);\n let b1 = getTransforms(batch, 3);\n let b2 = getTransforms(batch, 4);\n let b3 = getTransforms(batch, 5);\n let c1 = getTransforms(batch, 6);\n let c2 = getTransforms(batch, 7);\n let projection = c1 * xf + c2 * yf + 1.0;\n if (projection == 0.0) {\n outputValue = uniforms.fillValue;\n } else {\n let inX = (a1 * xf + a2 * yf + a3) / projection;\n let inY = (b1 * xf + b2 * yf + b3) / projection;\n let mapX = mapCoord(inX, f32(uniforms.imageShape[2]));\n let mapY = mapCoord(inY, f32(uniforms.imageShape[1]));\n\n if (uniforms.interpolationModeId == 1) {\n let coordY = i32(round(mapY));\n let coordX = i32(round(mapX));\n outputValue = readWithFillValue(batch, coordY, coordX,\n channel);\n } else {\n let yFloor = floor(mapY);\n let xFloor = floor(mapX);\n let yCeil = yFloor + 1.0;\n let xCeil = xFloor + 1.0;\n let valueYFloor = (xCeil - mapX) *\n readWithFillValue(batch, i32(yFloor), i32(xFloor), channel) +\n (mapX - xFloor) *\n readWithFillValue(batch, i32(yFloor), i32(xCeil), channel);\n let valueYCeil = (xCeil - mapX) *\n readWithFillValue(batch, i32(yCeil), i32(xFloor), channel) +\n (mapX - xFloor) *\n readWithFillValue(batch, i32(yCeil), i32(xCeil), channel);\n outputValue = (yCeil - mapY) * valueYFloor +\n (mapY - yFloor) * valueYCeil;\n }\n }\n setOutputAtIndex(index, outputValue);\n }\n }\n `;\n return userCode;\n }\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Transform.js\nfunction transform5(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { image: image2, transforms } = inputs;\n const { interpolation, fillMode, fillValue, outputShape } = attrs;\n const [batch, imageHeight, imageWidth, numChannels] = image2.shape;\n const [outHeight, outWidth] = outputShape != null ? outputShape : [imageHeight, imageWidth];\n const outShape = [\n batch,\n outHeight,\n outWidth,\n numChannels\n ];\n const program = new TransformProgram2(outShape);\n const interpolationModeId = interpolation === \"nearest\" ? 1 : 2;\n let fillModeId;\n switch (fillMode) {\n case \"constant\":\n fillModeId = 1;\n break;\n case \"reflect\":\n fillModeId = 2;\n break;\n case \"wrap\":\n fillModeId = 3;\n break;\n case \"nearest\":\n fillModeId = 4;\n break;\n default:\n fillModeId = 1;\n break;\n }\n const uniformData = [\n { type: \"int32\", data: [interpolationModeId] },\n { type: \"int32\", data: [fillModeId] },\n { type: \"float32\", data: [fillValue] }\n ];\n return backend2.runWebGPUProgram(program, [image2, transforms], \"float32\", uniformData);\n}\nvar transformConfig4 = {\n kernelName: Transform,\n backendName: \"webgpu\",\n kernelFunc: transform5\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Unpack.js\nfunction unpack4(args) {\n const { inputs, backend: backend2, attrs } = args;\n const { value } = inputs;\n let { axis } = attrs;\n if (axis < 0) {\n axis += value.shape.length;\n }\n const x = value;\n const xRank = x.shape.length;\n const num = value.shape[axis];\n const outShape = new Array(xRank - 1);\n let outIndex = 0;\n for (let i2 = 0; i2 < xRank; i2++) {\n if (i2 !== axis) {\n outShape[outIndex++] = x.shape[i2];\n }\n }\n const toDispose = [];\n const begin = new Array(xRank).fill(0);\n const size = x.shape.slice();\n size[axis] = 1;\n const res = new Array(num);\n for (let i2 = 0; i2 < res.length; i2++) {\n begin[axis] = i2;\n const sliced = slice5({ inputs: { x }, backend: backend2, attrs: { begin, size } });\n const reshaped = reshape6({ inputs: { x: sliced }, backend: backend2, attrs: { shape: outShape } });\n res[i2] = reshaped;\n toDispose.push(sliced);\n }\n toDispose.forEach((t2) => backend2.disposeData(t2.dataId));\n return res;\n}\nvar unpackConfig4 = {\n kernelName: Unpack,\n backendName: \"webgpu\",\n kernelFunc: unpack4\n};\n\n// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/register_all_kernels.js\nvar kernelConfigs4 = [\n _fusedMatMulConfig4,\n absConfig4,\n addConfig4,\n addNConfig4,\n argMaxConfig4,\n argMinConfig3,\n atan2Config3,\n avgPoolConfig4,\n batchMatMulConfig4,\n batchToSpaceNDConfig4,\n castConfig4,\n ceilConfig4,\n clipByValueConfig4,\n complexConfig3,\n concatConfig4,\n conv2DConfig4,\n conv2DBackpropInputConfig4,\n cosConfig4,\n coshConfig4,\n cropAndResizeConfig4,\n cumprodConfig4,\n cumsumConfig4,\n depthToSpaceConfig4,\n depthwiseConv2dNativeConfig4,\n einsumConfig3,\n eluConfig4,\n equalConfig4,\n expConfig4,\n expandDimsConfig4,\n expm1Config3,\n fillConfig4,\n flipLeftRightConfig4,\n fromPixelsConfig2,\n floorConfig4,\n floorDivConfig4,\n fusedBatchNormConfig2,\n fusedConv2DConfig4,\n fusedDepthwiseConv2DConfig4,\n gatherNdConfig4,\n gatherV2Config4,\n greaterConfig4,\n greaterEqualConfig4,\n identityConfig4,\n imagConfig3,\n isNaNConfig3,\n leakyReluConfig4,\n lessConfig4,\n lessEqualConfig4,\n logConfig4,\n logicalAndConfig4,\n logicalNotConfig4,\n maxConfig4,\n maximumConfig4,\n maxPoolConfig4,\n meanConfig4,\n minConfig4,\n minimumConfig4,\n mirrorPadConfig4,\n multiplyConfig4,\n negConfig4,\n nonMaxSuppressionV3Config4,\n nonMaxSuppressionV5Config4,\n notEqualConfig4,\n onesLikeConfig4,\n packConfig4,\n padV2Config4,\n powConfig4,\n preluConfig4,\n prodConfig4,\n rangeConfig4,\n realConfig3,\n realDivConfig4,\n reciprocalConfig3,\n reluConfig4,\n relu6Config4,\n reshapeConfig4,\n resizeBilinearConfig4,\n resizeNearestNeighborConfig4,\n rotateWithOffsetConfig4,\n rsqrtConfig4,\n scatterNdConfig4,\n selectConfig4,\n sigmoidConfig4,\n sinConfig4,\n sinhConfig3,\n sliceConfig4,\n stridedSliceConfig4,\n stringNGramsConfig4,\n softmaxConfig4,\n spaceToBatchNDConfig4,\n sparseToDenseConfig3,\n splitVConfig4,\n sqrtConfig4,\n squareConfig4,\n squaredDifferenceConfig4,\n subConfig4,\n sumConfig4,\n tanhConfig4,\n tileConfig4,\n topKConfig4,\n transformConfig4,\n transposeConfig4,\n unpackConfig4,\n zerosLikeConfig4\n];\nfor (const kernelConfig of kernelConfigs4) {\n registerKernel(kernelConfig);\n}\n\n// dist/tfjs.version.js\nvar e = \"3.21.0\";\nvar s = \"3.21.0\";\nvar t = \"3.21.0\";\nvar i = \"3.21.0\";\nvar n = \"3.21.0\";\nvar r = \"3.21.0\";\nvar l = \"3.21.0\";\nvar V = { tfjs: e, \"tfjs-core\": s, \"tfjs-data\": t, \"tfjs-layers\": i, \"tfjs-converter\": n, \"tfjs-backend-webgl\": r, \"tfjs-backend-wasm\": l };\nexport {\n Abs,\n Acos,\n Acosh,\n AdadeltaOptimizer,\n AdagradOptimizer,\n AdamOptimizer,\n AdamaxOptimizer,\n Add,\n AddN,\n All,\n Any,\n ArgMax,\n ArgMin,\n Asin,\n Asinh,\n Atan,\n Atan2,\n Atanh,\n AvgPool,\n AvgPool3D,\n AvgPool3DGrad,\n AvgPoolGrad,\n BackendWasm,\n BatchMatMul,\n BatchToSpaceND,\n Bincount,\n BroadcastArgs,\n BroadcastTo,\n Callback,\n CallbackList,\n Cast,\n Ceil,\n ClipByValue,\n Complex,\n ComplexAbs,\n Concat,\n Conv2D,\n Conv2DBackpropFilter,\n Conv2DBackpropInput,\n Conv3D,\n Conv3DBackpropFilterV2,\n Conv3DBackpropInputV2,\n Cos,\n Cosh,\n CropAndResize,\n Cumprod,\n Cumsum,\n CustomCallback,\n DataStorage,\n DenseBincount,\n DepthToSpace,\n DepthwiseConv2dNative,\n DepthwiseConv2dNativeBackpropFilter,\n DepthwiseConv2dNativeBackpropInput,\n Diag,\n Dilation2D,\n Dilation2DBackpropFilter,\n Dilation2DBackpropInput,\n ENV,\n EarlyStopping,\n Einsum,\n Elu,\n EluGrad,\n Environment,\n Equal,\n Erf,\n Exp,\n ExpandDims,\n Expm1,\n FFT,\n Fill,\n FlipLeftRight,\n Floor,\n FloorDiv,\n FromPixels,\n FusedBatchNorm,\n FusedConv2D,\n FusedDepthwiseConv2D,\n GPGPUContext,\n GatherNd,\n GatherV2,\n GraphModel,\n Greater,\n GreaterEqual,\n History,\n IFFT,\n Identity,\n Imag,\n InputSpec,\n IsFinite,\n IsInf,\n IsNan,\n KernelBackend,\n LRN,\n LRNGrad,\n LayerVariable,\n LayersModel,\n LeakyRelu,\n Less,\n LessEqual,\n LinSpace,\n Log,\n Log1p,\n LogSoftmax,\n LogicalAnd,\n LogicalNot,\n LogicalOr,\n LogicalXor,\n LowerBound,\n MathBackendWebGL,\n Max,\n MaxPool,\n MaxPool3D,\n MaxPool3DGrad,\n MaxPoolGrad,\n MaxPoolWithArgmax,\n Maximum,\n Mean,\n Min,\n Minimum,\n MirrorPad,\n Mod,\n MomentumOptimizer,\n Multinomial,\n Multiply,\n Neg,\n NonMaxSuppressionV3,\n NonMaxSuppressionV4,\n NonMaxSuppressionV5,\n NotEqual,\n OP_SCOPE_SUFFIX,\n OneHot,\n OnesLike,\n Optimizer,\n OptimizerConstructors,\n Pack,\n PadV2,\n Pool,\n Pow,\n Prelu,\n Prod,\n RMSPropOptimizer,\n RNN,\n RaggedGather,\n RaggedTensorToTensor,\n Range,\n Rank,\n Real,\n RealDiv,\n Reciprocal,\n Reduction,\n Relu,\n Relu6,\n Reshape,\n ResizeBilinear,\n ResizeBilinearGrad,\n ResizeNearestNeighbor,\n ResizeNearestNeighborGrad,\n Reverse,\n RotateWithOffset,\n Round,\n Rsqrt,\n SGDOptimizer,\n ScatterNd,\n SearchSorted,\n Select,\n Selu,\n Sequential,\n Sigmoid,\n Sign,\n Sin,\n Sinh,\n Slice,\n Softmax,\n Softplus,\n SpaceToBatchND,\n SparseFillEmptyRows,\n SparseReshape,\n SparseSegmentMean,\n SparseSegmentSum,\n SparseToDense,\n SplitV,\n Sqrt,\n Square,\n SquaredDifference,\n Step,\n StridedSlice,\n StringNGrams,\n StringSplit,\n StringToHashBucketFast,\n Sub,\n Sum,\n SymbolicTensor,\n Tan,\n Tanh,\n Tensor,\n TensorBuffer,\n Tile,\n TopK,\n Transform,\n Transpose,\n Unique,\n Unpack,\n UnsortedSegmentSum,\n UpperBound,\n Variable,\n WebGPUBackend,\n ZerosLike,\n _FusedMatMul,\n abs,\n acos,\n acosh,\n add2 as add,\n addN,\n all,\n any,\n argMax,\n argMin,\n asin,\n asinh,\n atan,\n atan2,\n atanh,\n avgPool,\n avgPool3d,\n backend,\n backend_util_exports as backend_util,\n basicLSTMCell,\n batchNorm,\n batchNorm2d,\n batchNorm3d,\n batchNorm4d,\n batchToSpaceND,\n bincount,\n booleanMaskAsync,\n broadcastArgs,\n broadcastTo,\n broadcast_util_exports as broadcast_util,\n browser_exports as browser,\n buffer,\n callbacks,\n cast,\n ceil,\n clipByValue,\n clone,\n complex,\n concat,\n concat1d,\n concat2d,\n concat3d,\n concat4d,\n exports_constraints_exports as constraints,\n conv1d,\n conv2d,\n conv2dTranspose,\n conv3d,\n conv3dTranspose,\n copyRegisteredKernels,\n cos,\n cosh,\n cosineWindow,\n cumprod,\n cumsum,\n customGrad,\n dist_exports2 as data,\n denseBincount,\n deprecationWarn,\n depthToSpace,\n depthwiseConv2d,\n deregisterOp,\n device_util_exports as device_util,\n diag,\n dilation2d,\n disableDeprecationWarnings,\n dispose,\n disposeVariables,\n div,\n divNoNan,\n dot,\n dropout,\n einsum,\n elu,\n enableDebugMode,\n enableProdMode,\n enclosingPowerOfTwo,\n engine,\n env,\n equal,\n erf,\n euclideanNorm,\n exp,\n expandDims,\n expm1,\n eye,\n fft,\n fill,\n findBackend,\n findBackendFactory,\n floor,\n floorDiv,\n forceHalfFloat,\n fused_ops_exports as fused,\n gather,\n gatherND,\n gather_nd_util_exports as gather_util,\n getBackend,\n getGradient,\n getKernel,\n getKernelsForBackend,\n getThreadsCount,\n gpgpu_util_exports as gpgpu_util,\n grad,\n grads,\n greater,\n greaterEqual,\n ifft,\n imag,\n image,\n inTopKAsync,\n exports_initializers_exports as initializers,\n input,\n io_exports as io,\n irfft,\n isFinite2 as isFinite,\n isInf,\n isNaN2 as isNaN,\n keep,\n kernel_impls_exports as kernel_impls,\n exports_layers_exports as layers,\n leakyRelu,\n less,\n lessEqual,\n linalg,\n linspace,\n loadGraphModel,\n loadGraphModelSync,\n loadLayersModel,\n localResponseNormalization,\n log2 as log,\n log1p,\n logSigmoid,\n logSoftmax,\n logSumExp,\n logicalAnd,\n logicalNot,\n logicalOr,\n logicalXor,\n losses,\n lowerBound,\n matMul,\n math_exports as math,\n max,\n maxPool,\n maxPool3d,\n maxPoolWithArgmax,\n maximum,\n mean,\n memory,\n meshgrid,\n exports_metrics_exports as metrics,\n min,\n minimum,\n mirrorPad,\n mod,\n model,\n exports_models_exports as models,\n moments,\n movingAverage,\n mul,\n multiRNNCell,\n multinomial,\n neg,\n nextFrame,\n norm,\n notEqual,\n oneHot,\n ones2 as ones,\n onesLike,\n op,\n outerProduct,\n pad,\n pad1d,\n pad2d,\n pad3d,\n pad4d,\n pool,\n pow,\n prelu,\n print,\n prod,\n profile,\n raggedGather,\n raggedTensorToTensor,\n rand,\n randomGamma,\n randomNormal,\n randomStandardNormal,\n randomUniform,\n range,\n ready,\n real,\n reciprocal,\n registerBackend,\n registerCallbackConstructor,\n registerGradient,\n registerKernel,\n registerOp,\n exports_regularizers_exports as regularizers,\n relu,\n relu6,\n removeBackend,\n reshape,\n reverse,\n reverse1d,\n reverse2d,\n reverse3d,\n reverse4d,\n rfft,\n round2 as round,\n rsqrt,\n scalar,\n scatterND,\n scatter_nd_util_exports as scatter_util,\n searchSorted,\n selu,\n separableConv2d,\n sequential,\n serialization_exports as serialization,\n setBackend,\n setPlatform,\n setThreadsCount,\n setWasmPath,\n setWasmPaths,\n setWebGLContext,\n setdiff1dAsync,\n sigmoid,\n sign,\n signal,\n sin,\n sinh,\n slice,\n slice1d,\n slice2d,\n slice3d,\n slice4d,\n slice_util_exports as slice_util,\n softmax,\n softplus,\n spaceToBatchND,\n sparse,\n sparseToDense,\n spectral,\n split,\n sqrt,\n square,\n squaredDifference,\n squeeze,\n stack,\n step,\n stridedSlice,\n string,\n sub,\n sum2 as sum,\n sumOutType,\n tan,\n tanh2 as tanh,\n tensor,\n tensor1d,\n tensor2d,\n tensor3d,\n tensor4d,\n tensor5d,\n tensor6d,\n tensor_util_exports as tensor_util,\n test_util_exports as test_util,\n tidy,\n tile,\n time,\n topk,\n train,\n transpose,\n truncatedNormal,\n unique,\n unregisterGradient,\n unregisterKernel,\n unsortedSegmentSum,\n unstack,\n upcastType,\n upperBound,\n util_exports as util,\n valueAndGrad,\n valueAndGrads,\n variable,\n variableGrads,\n V as version,\n version3 as version_converter,\n version as version_core,\n version2 as version_layers,\n version8 as version_wasm,\n version6 as version_webgl,\n webgl,\n webgl_util_exports as webgl_util,\n webgpu_util_exports as webgpu_util,\n where,\n whereAsync,\n zeros,\n zerosLike\n};\n", "export const vertexIdentity = `\n precision highp float;\n attribute vec2 pos;\n attribute vec2 uv;\n varying vec2 vUv;\n uniform float flipY;\n void main(void) {\n vUv = uv;\n gl_Position = vec4(pos.x, pos.y*flipY, 0.0, 1.);\n }\n`;\n\nexport const fragmentIdentity = `\n precision highp float;\n varying vec2 vUv;\n uniform sampler2D texture;\n void main(void) {\n gl_FragColor = texture2D(texture, vUv);\n }\n`;\n\nexport const colorMatrixWithAlpha = `\n precision highp float;\n varying vec2 vUv;\n uniform sampler2D texture;\n uniform float m[20];\n void main(void) {\n vec4 c = texture2D(texture, vUv);\n gl_FragColor.r = m[0] * c.r + m[1] * c.g + m[2] * c.b + m[3] * c.a + m[4];\n gl_FragColor.g = m[5] * c.r + m[6] * c.g + m[7] * c.b + m[8] * c.a + m[9];\n gl_FragColor.b = m[10] * c.r + m[11] * c.g + m[12] * c.b + m[13] * c.a + m[14];\n gl_FragColor.a = m[15] * c.r + m[16] * c.g + m[17] * c.b + m[18] * c.a + m[19];\n }\n`;\n\nexport const colorMatrixWithoutAlpha = `\n precision highp float;\n varying vec2 vUv;\n uniform sampler2D texture;\n uniform float m[20];\n void main(void) {\n vec4 c = texture2D(texture, vUv);\n gl_FragColor.r = m[0] * c.r + m[1] * c.g + m[2] * c.b + m[4];\n gl_FragColor.g = m[5] * c.r + m[6] * c.g + m[7] * c.b + m[9];\n gl_FragColor.b = m[10] * c.r + m[11] * c.g + m[12] * c.b + m[14];\n gl_FragColor.a = c.a;\n }\n`;\n\nexport const pixelate = `\n precision highp float;\n varying vec2 vUv;\n uniform vec2 size;\n uniform sampler2D texture;\n vec2 pixelate(vec2 coord, vec2 size) {\n return floor( coord / size ) * size;\n }\n void main(void) {\n gl_FragColor = vec4(0.0);\n vec2 coord = pixelate(vUv, size);\n gl_FragColor += texture2D(texture, coord);\n }\n`;\n\nexport const blur = `\n precision highp float;\n varying vec2 vUv;\n uniform sampler2D texture;\n uniform vec2 px;\n void main(void) {\n gl_FragColor = vec4(0.0);\n gl_FragColor += texture2D(texture, vUv + vec2(-7.0*px.x, -7.0*px.y))*0.0044299121055113265;\n gl_FragColor += texture2D(texture, vUv + vec2(-6.0*px.x, -6.0*px.y))*0.00895781211794;\n gl_FragColor += texture2D(texture, vUv + vec2(-5.0*px.x, -5.0*px.y))*0.0215963866053;\n gl_FragColor += texture2D(texture, vUv + vec2(-4.0*px.x, -4.0*px.y))*0.0443683338718;\n gl_FragColor += texture2D(texture, vUv + vec2(-3.0*px.x, -3.0*px.y))*0.0776744219933;\n gl_FragColor += texture2D(texture, vUv + vec2(-2.0*px.x, -2.0*px.y))*0.115876621105;\n gl_FragColor += texture2D(texture, vUv + vec2(-1.0*px.x, -1.0*px.y))*0.147308056121;\n gl_FragColor += texture2D(texture, vUv )*0.159576912161;\n gl_FragColor += texture2D(texture, vUv + vec2( 1.0*px.x, 1.0*px.y))*0.147308056121;\n gl_FragColor += texture2D(texture, vUv + vec2( 2.0*px.x, 2.0*px.y))*0.115876621105;\n gl_FragColor += texture2D(texture, vUv + vec2( 3.0*px.x, 3.0*px.y))*0.0776744219933;\n gl_FragColor += texture2D(texture, vUv + vec2( 4.0*px.x, 4.0*px.y))*0.0443683338718;\n gl_FragColor += texture2D(texture, vUv + vec2( 5.0*px.x, 5.0*px.y))*0.0215963866053;\n gl_FragColor += texture2D(texture, vUv + vec2( 6.0*px.x, 6.0*px.y))*0.00895781211794;\n gl_FragColor += texture2D(texture, vUv + vec2( 7.0*px.x, 7.0*px.y))*0.0044299121055113265;\n }\n`;\n\nexport const convolution = `\n precision highp float;\n varying vec2 vUv;\n uniform sampler2D texture;\n uniform vec2 px;\n uniform float m[9];\n void main(void) {\n vec4 c11 = texture2D(texture, vUv - px); // top left\n vec4 c12 = texture2D(texture, vec2(vUv.x, vUv.y - px.y)); // top center\n vec4 c13 = texture2D(texture, vec2(vUv.x + px.x, vUv.y - px.y)); // top right\n vec4 c21 = texture2D(texture, vec2(vUv.x - px.x, vUv.y) ); // mid left\n vec4 c22 = texture2D(texture, vUv); // mid center\n vec4 c23 = texture2D(texture, vec2(vUv.x + px.x, vUv.y) ); // mid right\n vec4 c31 = texture2D(texture, vec2(vUv.x - px.x, vUv.y + px.y) ); // bottom left\n vec4 c32 = texture2D(texture, vec2(vUv.x, vUv.y + px.y) ); // bottom center\n vec4 c33 = texture2D(texture, vUv + px ); // bottom right\n gl_FragColor = \n c11 * m[0] + c12 * m[1] + c22 * m[2] +\n c21 * m[3] + c22 * m[4] + c23 * m[5] +\n c31 * m[6] + c32 * m[7] + c33 * m[8];\n gl_FragColor.a = c22.a;\n }\n`;\n", "/**\n * Image Filters in WebGL algoritm implementation\n * Based on: [WebGLImageFilter](https://github.com/phoboslab/WebGLImageFilter)\n */\n\n/* eslint-disable func-names */\n\nimport * as shaders from './imagefxshaders';\nimport { canvas } from './image';\nimport { log } from '../util/util';\n\nconst collect = (source, prefix: string, collection) => {\n const r = new RegExp('\\\\b' + prefix + ' \\\\w+ (\\\\w+)', 'ig');\n source.replace(r, (match, name) => {\n collection[name] = 0;\n return match;\n });\n};\n\nclass GLProgram {\n uniform = {};\n attribute = {};\n gl: WebGLRenderingContext;\n id: WebGLProgram;\n\n constructor(gl, vertexSource, fragmentSource) {\n this.gl = gl;\n const vertexShader = this.compile(vertexSource, this.gl.VERTEX_SHADER);\n const fragmentShader = this.compile(fragmentSource, this.gl.FRAGMENT_SHADER);\n this.id = this.gl.createProgram() as WebGLProgram;\n if (!vertexShader || !fragmentShader) return;\n if (!this.id) {\n log('filter: could not create webgl program');\n return;\n }\n this.gl.attachShader(this.id, vertexShader);\n this.gl.attachShader(this.id, fragmentShader);\n this.gl.linkProgram(this.id);\n if (!this.gl.getProgramParameter(this.id, this.gl.LINK_STATUS)) {\n log(`filter: gl link failed: ${this.gl.getProgramInfoLog(this.id) || 'unknown'}`);\n return;\n }\n this.gl.useProgram(this.id);\n collect(vertexSource, 'attribute', this.attribute); // Collect attributes\n for (const a in this.attribute) this.attribute[a] = this.gl.getAttribLocation(this.id, a);\n collect(vertexSource, 'uniform', this.uniform); // Collect uniforms\n collect(fragmentSource, 'uniform', this.uniform);\n for (const u in this.uniform) this.uniform[u] = this.gl.getUniformLocation(this.id, u);\n }\n\n compile = (source, type): WebGLShader | null => {\n const shader = this.gl.createShader(type);\n if (!shader) {\n log('filter: could not create shader');\n return null;\n }\n this.gl.shaderSource(shader, source);\n this.gl.compileShader(shader);\n if (!this.gl.getShaderParameter(shader, this.gl.COMPILE_STATUS)) {\n log(`filter: gl compile failed: ${this.gl.getShaderInfoLog(shader) || 'unknown'}`);\n return null;\n }\n return shader;\n };\n}\n\n// function that is instantiated as class so it has private this members\n/**\n * @class GLImageFilter\n * @property {function} reset reset current filter chain\n * @property {function} add add specified filter to filter chain\n * @property {function} apply execute filter chain and draw result\n * @property {function} draw just draw input to result\n */\n\nexport function GLImageFilter() {\n let drawCount = 0;\n let sourceTexture: WebGLTexture | null = null;\n let lastInChain = false;\n let currentFramebufferIndex = -1;\n let tempFramebuffers: [null, null] | [{ fbo: WebGLFramebuffer | null, texture: WebGLTexture | null }] = [null, null];\n let filterChain: Record[] = [];\n let vertexBuffer: WebGLBuffer | null = null;\n let currentProgram: GLProgram | null = null;\n const fxcanvas = canvas(100, 100);\n const shaderProgramCache = { }; // key is the shader program source, value is the compiled program\n const DRAW = { INTERMEDIATE: 1 };\n const gl = fxcanvas.getContext('webgl') as WebGLRenderingContext;\n if (!gl) {\n log('filter: cannot get webgl context');\n return;\n }\n // @ts-ignore used for sanity checks outside of imagefx\n this.gl = gl;\n\n function resize(width, height) {\n if (width === fxcanvas.width && height === fxcanvas.height) return; // Same width/height? Nothing to do here\n fxcanvas.width = width;\n fxcanvas.height = height;\n if (!vertexBuffer) { // Create the context if we don't have it yet\n const vertices = new Float32Array([-1, -1, 0, 1, 1, -1, 1, 1, -1, 1, 0, 0, -1, 1, 0, 0, 1, -1, 1, 1, 1, 1, 1, 0]); // Create the vertex buffer for the two triangles [x, y, u, v] * 6\n vertexBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, vertices, gl.STATIC_DRAW);\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);\n }\n gl.viewport(0, 0, fxcanvas.width, fxcanvas.height);\n tempFramebuffers = [null, null]; // Delete old temp framebuffers\n }\n\n function createFramebufferTexture(width, height) {\n const fbo = gl.createFramebuffer();\n gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);\n const renderbuffer = gl.createRenderbuffer();\n gl.bindRenderbuffer(gl.RENDERBUFFER, renderbuffer);\n const texture = gl.createTexture();\n gl.bindTexture(gl.TEXTURE_2D, texture);\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);\n gl.bindTexture(gl.TEXTURE_2D, null);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n return { fbo, texture };\n }\n\n function getTempFramebuffer(index): { fbo: WebGLFramebuffer | null, texture: WebGLTexture | null } {\n tempFramebuffers[index] = tempFramebuffers[index] || createFramebufferTexture(fxcanvas.width, fxcanvas.height);\n return tempFramebuffers[index] as { fbo: WebGLFramebuffer, texture: WebGLTexture };\n }\n\n function draw(flags = 0) {\n if (!currentProgram) return;\n let source: WebGLTexture | null = null;\n let target: WebGLFramebuffer | null = null;\n let flipY = false;\n if (drawCount === 0) source = sourceTexture; // First draw call - use the source texture\n else source = getTempFramebuffer(currentFramebufferIndex).texture || null; // All following draw calls use the temp buffer last drawn to\n drawCount++;\n if (lastInChain && !(flags & DRAW.INTERMEDIATE)) { // Last filter in our chain - draw directly to the WebGL Canvas. We may also have to flip the image vertically now\n target = null;\n flipY = drawCount % 2 === 0;\n } else {\n currentFramebufferIndex = (currentFramebufferIndex + 1) % 2;\n target = getTempFramebuffer(currentFramebufferIndex).fbo || null; // Intermediate draw call - get a temp buffer to draw to\n }\n gl.bindTexture(gl.TEXTURE_2D, source); // Bind the source and target and draw the two triangles\n gl.bindFramebuffer(gl.FRAMEBUFFER, target);\n gl.uniform1f(currentProgram.uniform['flipY'], (flipY ? -1 : 1));\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n }\n\n function compileShader(fragmentSource): GLProgram | null {\n if (shaderProgramCache[fragmentSource]) {\n currentProgram = shaderProgramCache[fragmentSource];\n gl.useProgram((currentProgram ? currentProgram.id : null) || null);\n return currentProgram;\n }\n currentProgram = new GLProgram(gl, shaders.vertexIdentity, fragmentSource);\n if (!currentProgram) {\n log('filter: could not get webgl program');\n return null;\n }\n const floatSize = Float32Array.BYTES_PER_ELEMENT;\n const vertSize = 4 * floatSize;\n gl.enableVertexAttribArray(currentProgram.attribute['pos']);\n gl.vertexAttribPointer(currentProgram.attribute['pos'], 2, gl.FLOAT, false, vertSize, 0 * floatSize);\n gl.enableVertexAttribArray(currentProgram.attribute['uv']);\n gl.vertexAttribPointer(currentProgram.attribute['uv'], 2, gl.FLOAT, false, vertSize, 2 * floatSize);\n shaderProgramCache[fragmentSource] = currentProgram;\n return currentProgram;\n }\n\n const filter = {\n colorMatrix: (matrix: number[]) => { // general color matrix filter\n const m = new Float32Array(matrix);\n m[4] /= 255;\n m[9] /= 255;\n m[14] /= 255;\n m[19] /= 255;\n const shader = (m[18] === 1 && m[3] === 0 && m[8] === 0 && m[13] === 0 && m[15] === 0 && m[16] === 0 && m[17] === 0 && m[19] === 0) // Can we ignore the alpha value? Makes things a bit faster.\n ? shaders.colorMatrixWithoutAlpha\n : shaders.colorMatrixWithAlpha;\n const program = compileShader(shader);\n if (!program) return;\n gl.uniform1fv(program.uniform['m'], m);\n draw();\n },\n\n brightness: (brightness: number) => {\n const b = (brightness || 0) + 1;\n filter.colorMatrix([\n b, 0, 0, 0, 0,\n 0, b, 0, 0, 0,\n 0, 0, b, 0, 0,\n 0, 0, 0, 1, 0,\n ]);\n },\n\n saturation: (amount: number) => {\n const x = (amount || 0) * 2 / 3 + 1;\n const y = ((x - 1) * -0.5);\n filter.colorMatrix([\n x, y, y, 0, 0,\n y, x, y, 0, 0,\n y, y, x, 0, 0,\n 0, 0, 0, 1, 0,\n ]);\n },\n\n desaturate: () => {\n filter.saturation(-1);\n },\n\n contrast: (amount: number) => {\n const v = (amount || 0) + 1;\n const o = -128 * (v - 1);\n filter.colorMatrix([\n v, 0, 0, 0, o,\n 0, v, 0, 0, o,\n 0, 0, v, 0, o,\n 0, 0, 0, 1, 0,\n ]);\n },\n\n negative: () => {\n filter.contrast(-2);\n },\n\n hue: (rotation: number) => {\n rotation = (rotation || 0) / 180 * Math.PI;\n const cos = Math.cos(rotation);\n const sin = Math.sin(rotation);\n const lumR = 0.213;\n const lumG = 0.715;\n const lumB = 0.072;\n filter.colorMatrix([\n lumR + cos * (1 - lumR) + sin * (-lumR), lumG + cos * (-lumG) + sin * (-lumG), lumB + cos * (-lumB) + sin * (1 - lumB), 0, 0,\n lumR + cos * (-lumR) + sin * (0.143), lumG + cos * (1 - lumG) + sin * (0.140), lumB + cos * (-lumB) + sin * (-0.283), 0, 0,\n lumR + cos * (-lumR) + sin * (-(1 - lumR)), lumG + cos * (-lumG) + sin * (lumG), lumB + cos * (1 - lumB) + sin * (lumB), 0, 0,\n 0, 0, 0, 1, 0,\n ]);\n },\n\n desaturateLuminance: () => {\n filter.colorMatrix([\n 0.2764723, 0.9297080, 0.0938197, 0, -37.1,\n 0.2764723, 0.9297080, 0.0938197, 0, -37.1,\n 0.2764723, 0.9297080, 0.0938197, 0, -37.1,\n 0, 0, 0, 1, 0,\n ]);\n },\n\n sepia: () => {\n filter.colorMatrix([\n 0.393, 0.7689999, 0.18899999, 0, 0,\n 0.349, 0.6859999, 0.16799999, 0, 0,\n 0.272, 0.5339999, 0.13099999, 0, 0,\n 0, 0, 0, 1, 0,\n ]);\n },\n\n brownie: () => {\n filter.colorMatrix([\n 0.5997023498159715, 0.34553243048391263, -0.2708298674538042, 0, 47.43192855600873,\n -0.037703249837783157, 0.8609577587992641, 0.15059552388459913, 0, -36.96841498319127,\n 0.24113635128153335, -0.07441037908422492, 0.44972182064877153, 0, -7.562075277591283,\n 0, 0, 0, 1, 0,\n ]);\n },\n\n vintagePinhole: () => {\n filter.colorMatrix([\n 0.6279345635605994, 0.3202183420819367, -0.03965408211312453, 0, 9.651285835294123,\n 0.02578397704808868, 0.6441188644374771, 0.03259127616149294, 0, 7.462829176470591,\n 0.0466055556782719, -0.0851232987247891, 0.5241648018700465, 0, 5.159190588235296,\n 0, 0, 0, 1, 0,\n ]);\n },\n\n kodachrome: () => {\n filter.colorMatrix([\n 1.1285582396593525, -0.3967382283601348, -0.03992559172921793, 0, 63.72958762196502,\n -0.16404339962244616, 1.0835251566291304, -0.05498805115633132, 0, 24.732407896706203,\n -0.16786010706155763, -0.5603416277695248, 1.6014850761964943, 0, 35.62982807460946,\n 0, 0, 0, 1, 0,\n ]);\n },\n\n technicolor: () => {\n filter.colorMatrix([\n 1.9125277891456083, -0.8545344976951645, -0.09155508482755585, 0, 11.793603434377337,\n -0.3087833385928097, 1.7658908555458428, -0.10601743074722245, 0, -70.35205161461398,\n -0.231103377548616, -0.7501899197440212, 1.847597816108189, 0, 30.950940869491138,\n 0, 0, 0, 1, 0,\n ]);\n },\n\n polaroid: () => {\n filter.colorMatrix([\n 1.438, -0.062, -0.062, 0, 0,\n -0.122, 1.378, -0.122, 0, 0,\n -0.016, -0.016, 1.483, 0, 0,\n 0, 0, 0, 1, 0,\n ]);\n },\n\n shiftToBGR: () => {\n filter.colorMatrix([\n 0, 0, 1, 0, 0,\n 0, 1, 0, 0, 0,\n 1, 0, 0, 0, 0,\n 0, 0, 0, 1, 0,\n ]);\n },\n\n convolution: (matrix: number[]) => { // general convolution Filter\n const m = new Float32Array(matrix);\n const pixelSizeX = 1 / fxcanvas.width;\n const pixelSizeY = 1 / fxcanvas.height;\n const program = compileShader(shaders.convolution);\n if (!program) return;\n gl.uniform1fv(program.uniform['m'], m);\n gl.uniform2f(program.uniform['px'], pixelSizeX, pixelSizeY);\n draw();\n },\n\n detectEdges: () => {\n // @ts-ignore this\n filter.convolution.call(this, [\n 0, 1, 0,\n 1, -4, 1,\n 0, 1, 0,\n ]);\n },\n\n sobelX: () => {\n // @ts-ignore this\n filter.convolution.call(this, [\n -1, 0, 1,\n -2, 0, 2,\n -1, 0, 1,\n ]);\n },\n\n sobelY: () => {\n // @ts-ignore this\n filter.convolution.call(this, [\n -1, -2, -1,\n 0, 0, 0,\n 1, 2, 1,\n ]);\n },\n\n sharpen: (amount) => {\n const a = amount || 1;\n // @ts-ignore this\n filter.convolution.call(this, [\n 0, -1 * a, 0,\n -1 * a, 1 + 4 * a, -1 * a,\n 0, -1 * a, 0,\n ]);\n },\n\n emboss: (size: number) => {\n const s = size || 1;\n // @ts-ignore this\n filter.convolution.call(this, [\n -2 * s, -1 * s, 0,\n -1 * s, 1, 1 * s,\n 0, 1 * s, 2 * s,\n ]);\n },\n\n blur: (size: number) => {\n const blurSizeX = (size / 7) / fxcanvas.width;\n const blurSizeY = (size / 7) / fxcanvas.height;\n const program = compileShader(shaders.blur);\n if (!program) return;\n // Vertical\n gl.uniform2f(program.uniform['px'], 0, blurSizeY);\n draw(DRAW.INTERMEDIATE);\n // Horizontal\n gl.uniform2f(program.uniform['px'], blurSizeX, 0);\n draw();\n },\n\n pixelate: (size: number) => {\n const blurSizeX = (size) / fxcanvas.width;\n const blurSizeY = (size) / fxcanvas.height;\n const program = compileShader(shaders.pixelate);\n if (!program) return;\n gl.uniform2f(program.uniform['size'], blurSizeX, blurSizeY);\n draw();\n },\n };\n\n // @ts-ignore this\n this.add = function (name) {\n const args = Array.prototype.slice.call(arguments, 1); // eslint-disable-line prefer-rest-params\n const func = filter[name];\n filterChain.push({ func, args });\n };\n\n // @ts-ignore this\n this.reset = function () {\n filterChain = [];\n };\n\n // @ts-ignore this\n this.get = function () {\n return filterChain;\n };\n\n // @ts-ignore this\n this.apply = function (image) {\n resize(image.width, image.height);\n drawCount = 0;\n if (!sourceTexture) sourceTexture = gl.createTexture(); // Create the texture for the input image if we haven't yet\n gl.bindTexture(gl.TEXTURE_2D, sourceTexture);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image);\n for (let i = 0; i < filterChain.length; i++) {\n lastInChain = (i === filterChain.length - 1);\n const f = filterChain[i];\n // @ts-ignore function assigment\n f.func.apply(this, f.args || []);\n }\n return fxcanvas;\n };\n\n // @ts-ignore this\n this.draw = function (image) {\n this.add('brightness', 0);\n return this.apply(image);\n };\n}\n", "/**\n * Image enhancements\n */\n\nimport * as tf from '../../dist/tfjs.esm.js';\nimport type { Tensor } from '../exports';\n\nexport async function histogramEqualization(inputImage: Tensor): Promise {\n // const maxValue = 254; // using 255 results in values slightly larger than 1 due to math rounding errors\n const squeeze = inputImage.shape.length === 4 ? tf.squeeze(inputImage) : inputImage;\n const channels = tf.split(squeeze, 3, 2);\n const min: Tensor[] = [tf.min(channels[0]), tf.min(channels[1]), tf.min(channels[2])];\n const max: Tensor[] = [tf.max(channels[0]), tf.max(channels[1]), tf.max(channels[2])];\n const absMax = await Promise.all(max.map((channel) => channel.data()));\n const maxValue = 0.99 * Math.max(absMax[0][0], absMax[1][0], absMax[2][0]);\n const sub = [tf.sub(channels[0], min[0]), tf.sub(channels[1], min[1]), tf.sub(channels[2], min[2])];\n const range = [tf.sub(max[0], min[0]), tf.sub(max[1], min[1]), tf.sub(max[2], min[2])];\n const fact = [tf.div(maxValue, range[0]), tf.div(maxValue, range[1]), tf.div(maxValue, range[2])];\n const enh = [tf.mul(sub[0], fact[0]), tf.mul(sub[1], fact[1]), tf.mul(sub[2], fact[2])];\n const rgb = tf.stack([enh[0], enh[1], enh[2]], 2);\n const reshape = tf.reshape(rgb, [1, squeeze.shape[0], squeeze.shape[1], 3]);\n tf.dispose([...channels, ...min, ...max, ...sub, ...range, ...fact, ...enh, rgb, squeeze]);\n return reshape as Tensor; // output shape is [1, height, width, 3]\n}\n", "/**\n * Image Processing algorithm implementation\n */\n\nimport * as tf from '../../dist/tfjs.esm.js';\nimport * as fxImage from './imagefx';\nimport type { Input, AnyCanvas, Tensor, Config } from '../exports';\nimport { env } from '../util/env';\nimport { log } from '../util/util';\nimport * as enhance from './enhance';\n\nconst maxSize = 3840;\n// internal temp canvases\nlet inCanvas: AnyCanvas | null = null; // use global variable to avoid recreating canvas on each frame\nlet outCanvas: AnyCanvas | null = null; // use global variable to avoid recreating canvas on each frame\nlet tmpCanvas: AnyCanvas | null = null; // use global variable to avoid recreating canvas on each frame\n// @ts-ignore // imagefx is js module that should be converted to a class\nlet fx: fxImage.GLImageFilter | null; // instance of imagefx\n\nconst last: { inputSum: number, cacheDiff: number, sumMethod: number, inputTensor: undefined | Tensor } = {\n inputSum: 0,\n cacheDiff: 1,\n sumMethod: 0,\n inputTensor: undefined,\n};\n\nexport function reset() {\n last.inputSum = 0;\n last.cacheDiff = 1;\n last.sumMethod = 0;\n last.inputTensor = undefined;\n}\n\nexport function canvas(width: number, height: number): AnyCanvas {\n let c: AnyCanvas;\n if (env.browser) { // browser defines canvas object\n if (env.worker) { // if runing in web worker use OffscreenCanvas\n if (typeof OffscreenCanvas === 'undefined') throw new Error('canvas error: attempted to run in web worker but OffscreenCanvas is not supported');\n c = new OffscreenCanvas(width, height);\n } else { // otherwise use DOM canvas\n if (typeof document === 'undefined') throw new Error('canvas error: attempted to run in browser but DOM is not defined');\n c = document.createElement('canvas');\n c.width = width;\n c.height = height;\n }\n } else { // if not running in browser, there is no \"default\" canvas object, so we need monkey patch or fail\n // @ts-ignore // env.canvas is an external monkey-patch\n if (typeof env.Canvas !== 'undefined') c = new env.Canvas(width, height);\n else if (typeof globalThis.Canvas !== 'undefined') c = new globalThis.Canvas(width, height);\n // else throw new Error('canvas error: attempted to use canvas in nodejs without canvas support installed');\n }\n // @ts-ignore its either defined or we already threw an error\n return c;\n}\n\n// helper function to copy canvas from input to output\nexport function copy(input: AnyCanvas, output?: AnyCanvas) {\n const outputCanvas = output || canvas(input.width, input.height);\n const ctx = outputCanvas.getContext('2d') as CanvasRenderingContext2D;\n ctx.drawImage(input, 0, 0);\n return outputCanvas;\n}\n\n// process input image and return tensor\n// input can be tensor, imagedata, htmlimageelement, htmlvideoelement\n// input is resized and run through imagefx filter\nexport async function process(input: Input, config: Config, getTensor: boolean = true): Promise<{ tensor: Tensor | null, canvas: AnyCanvas | null }> {\n if (!input) {\n // throw new Error('input is missing');\n if (config.debug) log('input error: input is missing');\n return { tensor: null, canvas: null }; // video may become temporarily unavailable due to onresize\n }\n // sanity checks since different browsers do not implement all dom elements\n if (\n !(input instanceof tf.Tensor)\n && !(typeof Image !== 'undefined' && input instanceof Image)\n && !(typeof env.Canvas !== 'undefined' && input instanceof env.Canvas)\n && !(typeof globalThis.Canvas !== 'undefined' && input instanceof globalThis.Canvas)\n && !(typeof ImageData !== 'undefined' && input instanceof ImageData)\n && !(typeof ImageBitmap !== 'undefined' && input instanceof ImageBitmap)\n && !(typeof HTMLImageElement !== 'undefined' && input instanceof HTMLImageElement)\n && !(typeof HTMLMediaElement !== 'undefined' && input instanceof HTMLMediaElement)\n && !(typeof HTMLVideoElement !== 'undefined' && input instanceof HTMLVideoElement)\n && !(typeof HTMLCanvasElement !== 'undefined' && input instanceof HTMLCanvasElement)\n && !(typeof OffscreenCanvas !== 'undefined' && input instanceof OffscreenCanvas)\n ) {\n throw new Error('input error: type is not recognized');\n }\n if (input instanceof tf.Tensor) { // if input is tensor use as-is without filters but correct shape as needed\n let tensor: Tensor | null = null;\n if ((input as Tensor)['isDisposedInternal']) throw new Error('input error: attempted to use tensor but it is disposed');\n if (!(input as Tensor).shape) throw new Error('input error: attempted to use tensor without a shape');\n if ((input as Tensor).shape.length === 3) { // [height, width, 3 || 4]\n if ((input as Tensor).shape[2] === 3) { // [height, width, 3] so add batch\n tensor = tf.expandDims(input, 0);\n } else if ((input as Tensor).shape[2] === 4) { // [height, width, 4] so strip alpha and add batch\n const rgb = tf.slice3d(input, [0, 0, 0], [-1, -1, 3]);\n tensor = tf.expandDims(rgb, 0);\n tf.dispose(rgb);\n }\n } else if ((input as Tensor).shape.length === 4) { // [1, width, height, 3 || 4]\n if ((input as Tensor).shape[3] === 3) { // [1, width, height, 3] just clone\n tensor = tf.clone(input);\n } else if ((input as Tensor).shape[3] === 4) { // [1, width, height, 4] so strip alpha\n tensor = tf.slice4d(input, [0, 0, 0, 0], [-1, -1, -1, 3]);\n }\n }\n // at the end shape must be [1, height, width, 3]\n if (tensor == null || tensor.shape.length !== 4 || tensor.shape[0] !== 1 || tensor.shape[3] !== 3) throw new Error(`input error: attempted to use tensor with unrecognized shape: ${((input as Tensor).shape).toString()}`);\n if ((tensor).dtype === 'int32') {\n const cast = tf.cast(tensor, 'float32');\n tf.dispose(tensor);\n tensor = cast;\n }\n return { tensor, canvas: (config.filter.return ? outCanvas : null) };\n }\n // check if resizing will be needed\n if (typeof input['readyState'] !== 'undefined' && (input as HTMLMediaElement).readyState <= 2) {\n if (config.debug) log('input stream is not ready');\n return { tensor: null, canvas: inCanvas }; // video may become temporarily unavailable due to onresize\n }\n const originalWidth: number = input['naturalWidth'] || input['videoWidth'] || input['width'] || (input['shape'] && (input['shape'][1] > 0));\n const originalHeight: number = input['naturalHeight'] || input['videoHeight'] || input['height'] || (input['shape'] && (input['shape'][2] > 0));\n if (!originalWidth || !originalHeight) {\n if (config.debug) log('cannot determine input dimensions');\n return { tensor: null, canvas: inCanvas }; // video may become temporarily unavailable due to onresize\n }\n let targetWidth: number = originalWidth;\n let targetHeight: number = originalHeight;\n if (targetWidth > maxSize) {\n targetWidth = maxSize;\n targetHeight = Math.trunc(targetWidth * originalHeight / originalWidth);\n }\n if (targetHeight > maxSize) {\n targetHeight = maxSize;\n targetWidth = Math.trunc(targetHeight * originalWidth / originalHeight);\n }\n\n // create our canvas and resize it if needed\n if ((config.filter?.width || 0) > 0) targetWidth = config.filter.width as number;\n else if ((config.filter?.height || 0) > 0) targetWidth = originalWidth * ((config.filter.height || 0) / originalHeight);\n if ((config.filter.height || 0) > 0) targetHeight = config.filter.height as number;\n else if ((config.filter.width || 0) > 0) targetHeight = originalHeight * ((config.filter.width || 0) / originalWidth);\n if (!targetWidth || !targetHeight) throw new Error('input error: cannot determine dimension');\n if (!inCanvas || (inCanvas.width !== targetWidth) || (inCanvas.height !== targetHeight)) inCanvas = canvas(targetWidth, targetHeight);\n\n // draw input to our canvas\n const inCtx = inCanvas.getContext('2d') as CanvasRenderingContext2D;\n if ((typeof ImageData !== 'undefined') && (input instanceof ImageData)) {\n inCtx.putImageData(input, 0, 0);\n } else {\n if (config.filter.flip && typeof inCtx.translate !== 'undefined') {\n inCtx.translate(originalWidth, 0);\n inCtx.scale(-1, 1);\n inCtx.drawImage(input as AnyCanvas, 0, 0, originalWidth, originalHeight, 0, 0, inCanvas.width, inCanvas.height);\n inCtx.setTransform(1, 0, 0, 1, 0, 0); // resets transforms to defaults\n } else {\n inCtx.drawImage(input as AnyCanvas, 0, 0, originalWidth, originalHeight, 0, 0, inCanvas.width, inCanvas.height);\n }\n }\n\n if (!outCanvas || (inCanvas.width !== outCanvas.width) || (inCanvas.height !== outCanvas.height)) outCanvas = canvas(inCanvas.width, inCanvas.height); // init output canvas\n\n // imagefx transforms using gl from input canvas to output canvas\n if (config.filter.enabled && env.webgl.supported) {\n if (!fx) fx = env.browser ? new fxImage.GLImageFilter() : null; // && (typeof document !== 'undefined')\n env.filter = !!fx;\n if (!fx?.add) {\n if (config.debug) log('input process error: cannot initialize filters');\n env.webgl.supported = false;\n config.filter.enabled = false;\n copy(inCanvas, outCanvas); // filter failed to initialize\n // return { tensor: null, canvas: inCanvas };\n } else {\n fx.reset();\n if (config.filter.brightness !== 0) fx.add('brightness', config.filter.brightness);\n if (config.filter.contrast !== 0) fx.add('contrast', config.filter.contrast);\n if (config.filter.sharpness !== 0) fx.add('sharpen', config.filter.sharpness);\n if (config.filter.blur !== 0) fx.add('blur', config.filter.blur);\n if (config.filter.saturation !== 0) fx.add('saturation', config.filter.saturation);\n if (config.filter.hue !== 0) fx.add('hue', config.filter.hue);\n if (config.filter.negative) fx.add('negative');\n if (config.filter.sepia) fx.add('sepia');\n if (config.filter.vintage) fx.add('brownie');\n if (config.filter.sepia) fx.add('sepia');\n if (config.filter.kodachrome) fx.add('kodachrome');\n if (config.filter.technicolor) fx.add('technicolor');\n if (config.filter.polaroid) fx.add('polaroid');\n if (config.filter.pixelate !== 0) fx.add('pixelate', config.filter.pixelate);\n if (fx.get() > 0) outCanvas = fx.apply(inCanvas);\n else outCanvas = fx.draw(inCanvas);\n }\n } else {\n copy(inCanvas, outCanvas); // if no filters applied, output canvas is input canvas\n if (fx) fx = null;\n env.filter = !!fx;\n }\n\n if (!getTensor) return { tensor: null, canvas: outCanvas }; // just canvas was requested\n if (!outCanvas) throw new Error('canvas error: cannot create output');\n\n // create tensor from image unless input was a tensor already\n let pixels;\n let depth = 3;\n if ((typeof ImageData !== 'undefined' && input instanceof ImageData) || ((input as ImageData).data && (input as ImageData).width && (input as ImageData).height)) { // if input is imagedata, just use it\n if (env.browser && tf.browser) {\n pixels = tf.browser ? tf.browser.fromPixels(input) : null;\n } else {\n depth = (input as ImageData).data.length / (input as ImageData).height / (input as ImageData).width;\n // const arr = Uint8Array.from(input['data']);\n const arr = new Uint8Array((input as ImageData).data.buffer);\n pixels = tf.tensor(arr, [(input as ImageData).height, (input as ImageData).width, depth], 'int32');\n }\n } else {\n if (!tmpCanvas || (outCanvas.width !== tmpCanvas.width) || (outCanvas.height !== tmpCanvas.height)) tmpCanvas = canvas(outCanvas.width, outCanvas.height); // init output canvas\n if (tf.browser && env.browser) {\n if (config.backend === 'webgl' || config.backend === 'humangl' || config.backend === 'webgpu') {\n pixels = tf.browser.fromPixels(outCanvas); // safe to reuse since both backend and context are gl based\n } else {\n tmpCanvas = copy(outCanvas); // cannot use output canvas as it already has gl context so we do a silly one more canvas\n pixels = tf.browser.fromPixels(tmpCanvas);\n }\n } else {\n const tempCanvas = copy(outCanvas); // cannot use output canvas as it already has gl context so we do a silly one more canvas\n const tempCtx = tempCanvas.getContext('2d') as CanvasRenderingContext2D;\n const tempData = tempCtx.getImageData(0, 0, targetWidth, targetHeight);\n depth = tempData.data.length / targetWidth / targetHeight;\n const arr = new Uint8Array(tempData.data.buffer);\n pixels = tf.tensor(arr, [targetWidth, targetHeight, depth]);\n }\n }\n if (depth === 4) { // rgba to rgb\n const rgb = tf.slice3d(pixels, [0, 0, 0], [-1, -1, 3]); // strip alpha channel\n tf.dispose(pixels);\n pixels = rgb;\n }\n if (!pixels) throw new Error('input error: cannot create tensor');\n const casted: Tensor = tf.cast(pixels, 'float32');\n const tensor: Tensor = config.filter.equalization ? await enhance.histogramEqualization(casted) : tf.expandDims(casted, 0);\n tf.dispose([pixels, casted]);\n return { tensor, canvas: (config.filter.return ? outCanvas : null) };\n}\n\n/*\nconst checksum = async (input: Tensor): Promise => { // use tf sum or js based sum loop depending on which is faster\n const resizeFact = 48;\n const reduced: Tensor = tf.image.resizeBilinear(input, [Math.trunc((input.shape[1] || 1) / resizeFact), Math.trunc((input.shape[2] || 1) / resizeFact)]);\n const tfSum = async (): Promise => {\n const sumT = tf.sum(reduced);\n const sum0 = await sumT.data();\n tf.dispose(sumT);\n return sum0[0];\n };\n const jsSum = async (): Promise => {\n const reducedData = await reduced.data(); // raw image rgb array\n let sum0 = 0;\n for (let i = 0; i < reducedData.length / 3; i++) sum0 += reducedData[3 * i + 2]; // look only at green value of each pixel\n return sum0;\n };\n if (last.sumMethod === 0) {\n const t0 = now();\n await jsSum();\n const t1 = now();\n await tfSum();\n const t2 = now();\n last.sumMethod = t1 - t0 < t2 - t1 ? 1 : 2;\n }\n const res = last.sumMethod === 1 ? await jsSum() : await tfSum();\n tf.dispose(reduced);\n return res;\n};\n*/\n\nexport async function skip(config: Partial, input: Tensor) {\n let skipFrame = false;\n if (config.cacheSensitivity === 0 || !input.shape || input.shape.length !== 4 || input.shape[1] > 2048 || input.shape[2] > 2048) return skipFrame; // cache disabled or input is invalid or too large for cache analysis\n\n /*\n const checkSum = await checksum(input);\n const diff = 100 * (Math.max(checkSum, last.inputSum) / Math.min(checkSum, last.inputSum) - 1);\n last.inputSum = checkSum;\n // if previous frame was skipped, skip this frame if changed more than cacheSensitivity\n // if previous frame was not skipped, then look for cacheSensitivity or difference larger than one in previous frame to avoid resetting cache in subsequent frames unnecessarily\n let skipFrame = diff < Math.max(config.cacheSensitivity, last.cacheDiff);\n // if difference is above 10x threshold, don't use last value to force reset cache for significant change of scenes or images\n last.cacheDiff = diff > 10 * config.cacheSensitivity ? 0 : diff;\n skipFrame = skipFrame && (last.cacheDiff > 0); // if no cached diff value then force no skip\n */\n\n if (!last.inputTensor) {\n last.inputTensor = tf.clone(input);\n } else if (last.inputTensor.shape[1] !== input.shape[1] || last.inputTensor.shape[2] !== input.shape[2]) { // input resolution changed\n tf.dispose(last.inputTensor);\n last.inputTensor = tf.clone(input);\n } else {\n const t: Record = {};\n t.diff = tf.sub(input, last.inputTensor);\n t.squared = tf.mul(t.diff, t.diff);\n t.sum = tf.sum(t.squared);\n const diffSum = await t.sum.data();\n const diffRelative = diffSum[0] / (input.shape[1] || 1) / (input.shape[2] || 1) / 255 / 3; // squared difference relative to input resolution and averaged per channel\n tf.dispose([last.inputTensor, t.diff, t.squared, t.sum]);\n last.inputTensor = tf.clone(input);\n skipFrame = diffRelative <= (config.cacheSensitivity || 0);\n }\n return skipFrame;\n}\n\nexport async function compare(config: Partial, input1: Tensor, input2: Tensor): Promise {\n const t: Record = {};\n if (!input1 || !input2 || input1.shape.length !== 4 || input1.shape.length !== input2.shape.length) {\n if (!config.debug) log('invalid input tensor or tensor shapes do not match:', input1.shape, input2.shape);\n return 0;\n }\n if (input1.shape[0] !== 1 || input2.shape[0] !== 1 || input1.shape[3] !== 3 || input2.shape[3] !== 3) {\n if (!config.debug) log('input tensors must be of shape [1, height, width, 3]:', input1.shape, input2.shape);\n return 0;\n }\n t.input1 = tf.clone(input1);\n t.input2 = (input1.shape[1] !== input2.shape[1] || input1.shape[2] !== input2.shape[2]) ? tf.image.resizeBilinear(input2, [input1.shape[1], input1.shape[2]]) : tf.clone(input2);\n t.diff = tf.sub(t.input1, t.input2);\n t.squared = tf.mul(t.diff, t.diff);\n t.sum = tf.sum(t.squared);\n const diffSum = await t.sum.data();\n const diffRelative = diffSum[0] / (input1.shape[1] || 1) / (input1.shape[2] || 1) / 255 / 3;\n tf.dispose([t.input1, t.input2, t.diff, t.squared, t.sum]);\n return diffRelative;\n}\n", "import * as tf from '../../dist/tfjs.esm.js';\nimport * as image from '../image/image';\n\n/** Env class that holds detected capabilities */\nexport class Env {\n /** Running in Browser */\n browser: boolean;\n /** Running in NodeJS */\n node: boolean;\n /** Running in WebWorker thread */\n worker: boolean;\n /** Detected platform */\n platform: string = '';\n /** Detected agent */\n agent: string = '';\n /** List of supported backends */\n backends: string[] = [];\n /** Has any work been performed so far */\n initial: boolean;\n /** Are image filters supported? */\n filter: boolean | undefined;\n /** TFJS instance details */\n tfjs: {\n version: undefined | string,\n };\n /** Is offscreenCanvas supported? */\n offscreen: undefined | boolean;\n /** Are performance counter instant values or additive */\n perfadd: boolean = false;\n /** If using tfjs-node get version of underlying tensorflow shared library and if gpu acceleration is enabled */\n tensorflow: {\n version: undefined | string,\n gpu: undefined | boolean,\n } = {\n version: undefined,\n gpu: undefined,\n };\n /** WASM detected capabilities */\n wasm: {\n supported: undefined | boolean,\n backend: undefined | boolean,\n simd: undefined | boolean,\n multithread: undefined | boolean,\n } = {\n supported: undefined,\n backend: undefined,\n simd: undefined,\n multithread: undefined,\n };\n /** WebGL detected capabilities */\n webgl: {\n supported: undefined | boolean,\n backend: undefined | boolean,\n version: undefined | string,\n renderer: undefined | string,\n } = {\n supported: undefined,\n backend: undefined,\n version: undefined,\n renderer: undefined,\n };\n /** WebGPU detected capabilities */\n webgpu: {\n supported: undefined | boolean,\n backend: undefined | boolean,\n adapter: undefined | string,\n } = {\n supported: undefined,\n backend: undefined,\n adapter: undefined,\n };\n /** CPU info */\n cpu: {\n model: undefined | string,\n flags: string[],\n } = {\n model: undefined,\n flags: [],\n };\n /** List of supported kernels for current backend */\n kernels: string[] = [];\n /** MonkeyPatch for Canvas */\n Canvas: undefined;\n /** MonkeyPatch for Image */\n Image: undefined;\n /** MonkeyPatch for ImageData */\n ImageData: undefined;\n\n constructor() {\n this.browser = typeof navigator !== 'undefined';\n this.node = (typeof process !== 'undefined') && (typeof process.versions !== 'undefined') && (typeof process.versions.node !== 'undefined');\n this.tfjs = { version: tf.version['tfjs-core'] };\n this.offscreen = typeof OffscreenCanvas !== 'undefined';\n this.initial = true;\n\n // @ts-ignore WorkerGlobalScope evaluated in browser only\n this.worker = this.browser && this.offscreen ? (typeof WorkerGlobalScope !== 'undefined') : undefined;\n if (typeof navigator !== 'undefined') {\n const raw = navigator.userAgent.match(/\\(([^()]+)\\)/g);\n if (raw?.[0]) {\n const platformMatch = raw[0].match(/\\(([^()]+)\\)/g);\n this.platform = (platformMatch?.[0]) ? platformMatch[0].replace(/\\(|\\)/g, '') : '';\n this.agent = navigator.userAgent.replace(raw[0], '');\n if (this.platform[1]) this.agent = this.agent.replace(raw[1], '');\n this.agent = this.agent.replace(/ /g, ' ');\n // chrome offscreencanvas gpu memory leak\n /*\n const isChrome = env.agent.match(/Chrome\\/.[0-9]/g);\n const verChrome = isChrome && isChrome[0] ? isChrome[0].split('/')[1] : 0;\n if (verChrome > 92 && verChrome < 96) {\n log('disabling offscreenCanvas due to browser error:', isChrome ? isChrome[0] : 'unknown');\n this.offscreen = false;\n }\n */\n }\n } else if (typeof process !== 'undefined') {\n this.platform = `${process.platform} ${process.arch}`;\n this.agent = `NodeJS ${process.version}`;\n }\n }\n\n /** update backend information */\n async updateBackend() {\n // analyze backends\n this.backends = Object.keys(tf.engine().registryFactory);\n this.tensorflow = {\n version: (tf.backend().binding ? tf.backend().binding.TF_Version : undefined),\n gpu: (tf.backend().binding ? tf.backend().binding.isUsingGpuDevice() : undefined),\n };\n this.wasm.supported = typeof WebAssembly !== 'undefined';\n this.wasm.backend = this.backends.includes('wasm');\n if (this.wasm.supported && this.wasm.backend && tf.getBackend() === 'wasm') {\n this.wasm.simd = tf.env().get('WASM_HAS_SIMD_SUPPORT');\n this.wasm.multithread = tf.env().get('WASM_HAS_MULTITHREAD_SUPPORT');\n }\n const c = image.canvas(100, 100);\n const ctx = c ? c.getContext('webgl2') : undefined; // causes too many gl contexts\n // const ctx = typeof tf.backend().getGPGPUContext !== undefined ? tf.backend().getGPGPUContext : null;\n this.webgl.supported = typeof ctx !== 'undefined';\n this.webgl.backend = this.backends.includes('webgl');\n if (this.webgl.supported && this.webgl.backend && (tf.getBackend() === 'webgl' || tf.getBackend() === 'humangl')) {\n const gl = tf.backend().gpgpu !== 'undefined' ? await tf.backend().getGPGPUContext().gl : null;\n if (gl) {\n this.webgl.version = gl.getParameter(gl.VERSION);\n this.webgl.renderer = gl.getParameter(gl.RENDERER);\n }\n }\n this.webgpu.supported = this.browser && typeof navigator.gpu !== 'undefined';\n this.webgpu.backend = this.backends.includes('webgpu');\n try {\n if (this.webgpu.supported) {\n const adapter = await navigator.gpu.requestAdapter();\n this.webgpu.adapter = adapter ? adapter.name : undefined;\n }\n } catch {\n this.webgpu.supported = false;\n }\n try {\n this.kernels = tf.getKernelsForBackend(tf.getBackend()).map((kernel) => (kernel.kernelName as string).toLowerCase());\n } catch { /**/ }\n }\n\n /** update cpu information */\n updateCPU() {\n const cpu = { model: '', flags: [] };\n if (this.node && this.platform.startsWith('linux')) {\n /*\n const fs = require('fs');\n try {\n const data = fs.readFileSync('/proc/cpuinfo').toString();\n for (const line of data.split('\\n')) {\n if (line.startsWith('model name')) cpu.model = line.match(/:(.*)/g)[0].replace(':', '').trim();\n if (line.startsWith('flags')) cpu.flags = line.match(/:(.*)/g)[0].replace(':', '').trim().split(' ').sort();\n }\n } catch { }\n */\n }\n if (!this.cpu) Object.defineProperty(this, 'cpu', { value: cpu });\n else this.cpu = cpu;\n }\n}\n\nexport const env = new Env();\n", "import { log } from './util';\n\n// const log = (...msg) => console.log('webcam', ...msg); // eslint-disable-line no-console\n\n/** WebCam configuration */\nexport interface WebCamConfig {\n /**\n * element can be:\n * - string which indicates dom element id\n * - actual HTMLVideo dom element\n * - undefined in which case a new HTMLVideoElement will be created\n */\n element: string | HTMLVideoElement | undefined,\n /** print messages on console */\n debug: boolean,\n /** use front or back camera */\n mode: 'front' | 'back',\n /** camera crop mode */\n crop: boolean,\n /** desired webcam width */\n width: number,\n /** desired webcam height */\n height: number,\n}\n\nexport class WebCam { // eslint-disable-line @typescript-eslint/no-extraneous-class\n /** current webcam configuration */\n config: WebCamConfig;\n /** instance of dom element associated with webcam stream */\n element: HTMLVideoElement | undefined;\n /** active webcam stream */\n stream: MediaStream | undefined;\n\n constructor() {\n this.config = {\n element: undefined,\n debug: true,\n mode: 'front',\n crop: false,\n width: 0,\n height: 0,\n };\n }\n\n /** get active webcam stream track */\n public get track(): MediaStreamTrack | undefined {\n if (!this.stream) return undefined;\n return this.stream.getVideoTracks()[0];\n }\n\n /** get webcam capabilities */\n public get capabilities(): MediaTrackCapabilities | undefined {\n if (!this.track) return undefined;\n return this.track.getCapabilities ? this.track.getCapabilities() : undefined;\n }\n\n /** get webcam constraints */\n public get constraints(): MediaTrackConstraints | undefined {\n if (!this.track) return undefined;\n return this.track.getConstraints ? this.track.getConstraints() : undefined;\n }\n\n /** get webcam settings */\n public get settings(): MediaTrackSettings | undefined {\n if (!this.stream) return undefined;\n const track: MediaStreamTrack = this.stream.getVideoTracks()[0];\n return track.getSettings ? track.getSettings() : undefined;\n }\n\n /** get webcam label */\n public get label(): string {\n if (!this.track) return '';\n return this.track.label;\n }\n\n /** is webcam paused */\n public get paused(): boolean {\n return this.element?.paused || false;\n }\n\n /** webcam current width */\n public get width(): number {\n return this.element?.videoWidth || 0;\n }\n\n /** webcam current height */\n public get height(): number {\n return this.element?.videoHeight || 0;\n }\n\n /** start method initializizes webcam stream and associates it with a dom video element */\n public start = async (webcamConfig?: Partial): Promise => {\n // set config\n if (webcamConfig?.debug) this.config.debug = webcamConfig?.debug;\n if (webcamConfig?.crop) this.config.crop = webcamConfig?.crop;\n if (webcamConfig?.mode) this.config.mode = webcamConfig?.mode;\n if (webcamConfig?.width) this.config.width = webcamConfig?.width;\n if (webcamConfig?.height) this.config.height = webcamConfig?.height;\n\n // use or create dom element\n if (webcamConfig?.element) {\n if (typeof webcamConfig.element === 'string') {\n const el = document.getElementById(webcamConfig.element);\n if (el && el instanceof HTMLVideoElement) {\n this.element = el;\n } else {\n if (this.config.debug) log('webcam', 'cannot get dom element', webcamConfig.element);\n return;\n }\n } else if (webcamConfig.element instanceof HTMLVideoElement) {\n this.element = webcamConfig.element;\n } else {\n if (this.config.debug) log('webcam', 'unknown dom element', webcamConfig.element);\n return;\n }\n } else {\n this.element = document.createElement('video');\n }\n\n // set constraints to use\n const requestedConstraints: DisplayMediaStreamConstraints = {\n audio: false,\n video: {\n facingMode: this.config.mode === 'front' ? 'user' : 'environment',\n // @ts-ignore // resizeMode is still not defined in tslib\n resizeMode: this.config.crop ? 'crop-and-scale' : 'none',\n width: { ideal: this.config.width > 0 ? this.config.width : window.innerWidth },\n height: { ideal: this.config.height > 0 ? this.config.height : window.innerHeight },\n },\n };\n\n // set default event listeners\n this.element.addEventListener('play', () => { if (this.config.debug) log('webcam', 'play'); });\n this.element.addEventListener('pause', () => { if (this.config.debug) log('webcam', 'pause'); });\n this.element.addEventListener('click', async () => { // pause when clicked on screen and resume on next click\n if (!this.element || !this.stream) return;\n if (this.element.paused) await this.element.play();\n else this.element.pause();\n });\n\n // get webcam and set it to run in dom element\n if (!navigator?.mediaDevices) {\n if (this.config.debug) log('webcam', 'no devices');\n return;\n }\n try {\n this.stream = await navigator.mediaDevices.getUserMedia(requestedConstraints); // get stream that satisfies constraints\n } catch (err) {\n log('webcam', err);\n return;\n }\n if (!this.stream) {\n if (this.config.debug) log('webcam', 'no stream');\n return;\n }\n this.element.srcObject = this.stream; // assign it to dom element\n const ready = new Promise((resolve) => { // wait until stream is ready\n if (!this.element) resolve(false);\n else this.element.onloadeddata = () => resolve(true);\n });\n await ready;\n await this.element.play(); // start playing\n\n if (this.config.debug) {\n log('webcam', {\n width: this.width,\n height: this.height,\n label: this.label,\n stream: this.stream,\n track: this.track,\n settings: this.settings,\n constraints: this.constraints,\n capabilities: this.capabilities,\n });\n }\n };\n\n /** pause webcam video method */\n public pause = (): void => {\n if (this.element) this.element.pause();\n };\n\n /** play webcam video method */\n public play = async (): Promise => {\n if (this.element) await this.element.play();\n };\n\n /** stop method stops active webcam stream track and disconnects webcam */\n public stop = (): void => {\n if (this.config.debug) log('webcam', 'stop');\n if (this.track) this.track.stop();\n };\n}\n", "import { log, join } from '../util/util';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport type { GraphModel } from './types';\nimport type { Config } from '../config';\nimport * as modelsDefs from '../../models/models.json';\n// import { validateModel } from '../models';\n\nconst options = {\n cacheModels: true,\n cacheSupported: true,\n verbose: true,\n debug: false,\n modelBasePath: '',\n};\n\nexport interface ModelInfo {\n name: string,\n inCache: boolean,\n sizeDesired: number,\n sizeFromManifest: number,\n sizeLoadedWeights: number,\n}\n\nexport const modelStats: Record = {};\n\nasync function httpHandler(url: string, init?: RequestInit): Promise {\n if (options.debug) log('load model fetch:', url, init);\n return fetch(url, init);\n}\n\nexport function setModelLoadOptions(config: Config) {\n options.cacheModels = config.cacheModels;\n options.verbose = config.debug;\n options.modelBasePath = config.modelBasePath;\n}\n\nexport async function loadModel(modelPath: string | undefined): Promise {\n let modelUrl = join(options.modelBasePath, modelPath || '');\n if (!modelUrl.toLowerCase().endsWith('.json')) modelUrl += '.json';\n const modelPathSegments = modelUrl.includes('/') ? modelUrl.split('/') : modelUrl.split('\\\\');\n const shortModelName = modelPathSegments[modelPathSegments.length - 1].replace('.json', '');\n const cachedModelName = 'indexeddb://' + shortModelName; // generate short model name for cache\n modelStats[shortModelName] = {\n name: shortModelName,\n sizeFromManifest: 0,\n sizeLoadedWeights: 0,\n sizeDesired: modelsDefs[shortModelName],\n inCache: false,\n };\n options.cacheSupported = (typeof indexedDB !== 'undefined'); // check if localStorage and indexedb are available\n let cachedModels = {};\n try {\n cachedModels = (options.cacheSupported && options.cacheModels) ? await tf.io.listModels() : {}; // list all models already in cache // this fails for webview although localStorage is defined\n } catch {\n options.cacheSupported = false;\n }\n modelStats[shortModelName].inCache = (options.cacheSupported && options.cacheModels) && Object.keys(cachedModels).includes(cachedModelName); // is model found in cache\n const tfLoadOptions = typeof fetch === 'undefined' ? {} : { fetchFunc: (url: string, init?: RequestInit) => httpHandler(url, init) };\n let model: GraphModel = new tf.GraphModel(modelStats[shortModelName].inCache ? cachedModelName : modelUrl, tfLoadOptions) as unknown as GraphModel; // create model prototype and decide if load from cache or from original modelurl\n let loaded = false;\n try {\n // @ts-ignore private function\n model.findIOHandler(); // decide how to actually load a model\n if (options.debug) log('model load handler:', model['handler']);\n } catch (err) {\n log('error finding model i/o handler:', modelUrl, err);\n }\n try {\n // @ts-ignore private property\n const artifacts = await model.handler?.load() || null; // load manifest\n modelStats[shortModelName].sizeFromManifest = artifacts?.weightData?.byteLength || 0;\n if (artifacts) model.loadSync(artifacts); // load weights\n else model = await tf.loadGraphModel(modelStats[shortModelName].inCache ? cachedModelName : modelUrl, tfLoadOptions) as unknown as GraphModel;\n // @ts-ignore private property\n modelStats[shortModelName].sizeLoadedWeights = model.artifacts?.weightData?.byteLength || 0;\n if (options.verbose) log('load:', { model: shortModelName, url: model['modelUrl'], bytes: modelStats[shortModelName].sizeLoadedWeights });\n loaded = true;\n } catch (err) {\n log('error loading model:', modelUrl, err);\n }\n if (loaded && options.cacheModels && options.cacheSupported && !modelStats[shortModelName].inCache) { // save model to cache\n try {\n const saveResult = await model.save(cachedModelName);\n if (options.debug) log('model saved:', cachedModelName, saveResult);\n } catch (err) {\n log('error saving model:', modelUrl, err);\n }\n }\n // validateModel(null, model, `${modelPath || ''}`);\n return model;\n}\n", "/**\n * Loader and Validator for all models used by Human\n */\n\nimport { env } from './util/env';\nimport { log } from './util/util';\nimport * as antispoof from './face/antispoof';\nimport * as blazeface from './face/blazeface';\nimport * as blazepose from './body/blazepose';\nimport * as centernet from './object/centernet';\nimport * as efficientpose from './body/efficientpose';\nimport * as emotion from './gear/emotion';\nimport * as facemesh from './face/facemesh';\nimport * as faceres from './face/faceres';\nimport * as gear from './gear/gear';\nimport * as handpose from './hand/handpose';\nimport * as handtrack from './hand/handtrack';\nimport * as insightface from './face/insightface';\nimport * as iris from './face/iris';\nimport * as liveness from './face/liveness';\nimport * as meet from './segmentation/meet';\nimport * as mobilefacenet from './face/mobilefacenet';\nimport * as movenet from './body/movenet';\nimport * as nanodet from './object/nanodet';\nimport * as posenet from './body/posenet';\nimport * as rvm from './segmentation/rvm';\nimport * as selfie from './segmentation/selfie';\nimport * as ssrnetAge from './gear/ssrnet-age';\nimport * as ssrnetGender from './gear/ssrnet-gender';\nimport { modelStats, ModelInfo } from './tfjs/load';\nimport type { GraphModel } from './tfjs/types';\nimport type { Human } from './human';\n\n/** Instances of all possible TFJS Graph Models used by Human\n * - loaded as needed based on configuration\n * - initialized explictly with `human.load()` method\n * - initialized implicity on first call to `human.detect()`\n * - each model can be `null` if not loaded, instance of `GraphModel` if loaded or `Promise` if loading\n */\nexport class Models {\n ssrnetage: null | GraphModel | Promise = null;\n gear: null | GraphModel | Promise = null;\n blazeposedetect: null | GraphModel | Promise = null;\n blazepose: null | GraphModel | Promise = null;\n centernet: null | GraphModel | Promise = null;\n efficientpose: null | GraphModel | Promise = null;\n mobilefacenet: null | GraphModel | Promise = null;\n insightface: null | GraphModel | Promise = null;\n emotion: null | GraphModel | Promise = null;\n facedetect: null | GraphModel | Promise = null;\n faceiris: null | GraphModel | Promise = null;\n facemesh: null | GraphModel | Promise = null;\n faceres: null | GraphModel | Promise = null;\n ssrnetgender: null | GraphModel | Promise = null;\n handpose: null | GraphModel | Promise = null;\n handskeleton: null | GraphModel | Promise = null;\n handtrack: null | GraphModel | Promise = null;\n liveness: null | GraphModel | Promise = null;\n meet: null | GraphModel | Promise = null;\n movenet: null | GraphModel | Promise = null;\n nanodet: null | GraphModel | Promise = null;\n posenet: null | GraphModel | Promise = null;\n selfie: null | GraphModel | Promise = null;\n rvm: null | GraphModel | Promise = null;\n antispoof: null | GraphModel | Promise = null;\n}\n\n/** structure that holds global stats for currently loaded models */\nexport interface ModelStats {\n numLoadedModels: number,\n numDefinedModels: number,\n percentageLoaded: number,\n totalSizeFromManifest: number,\n totalSizeWeights: number,\n totalSizeLoading: number,\n totalSizeEnabled: undefined,\n modelStats: ModelInfo[],\n}\n\nlet instance: Human;\n\nexport const getModelStats = (currentInstance: Human): ModelStats => {\n if (currentInstance) instance = currentInstance;\n if (!instance) log('instance not registred');\n let totalSizeFromManifest = 0;\n let totalSizeWeights = 0;\n let totalSizeLoading = 0;\n for (const m of Object.values(modelStats)) {\n totalSizeFromManifest += m.sizeFromManifest;\n totalSizeWeights += m.sizeLoadedWeights;\n totalSizeLoading += m.sizeDesired;\n }\n const percentageLoaded = totalSizeLoading > 0 ? totalSizeWeights / totalSizeLoading : 0;\n return {\n numLoadedModels: Object.values(modelStats).length,\n numDefinedModels: Object.keys(instance.models).length,\n percentageLoaded,\n totalSizeFromManifest,\n totalSizeWeights,\n totalSizeLoading,\n totalSizeEnabled: undefined,\n modelStats: Object.values(modelStats),\n };\n};\n\nexport function reset(currentInstance: Human): void {\n if (currentInstance) instance = currentInstance;\n // if (instance.config.debug) log('resetting loaded models');\n for (const model of Object.keys(instance.models)) instance.models[model as keyof Models] = null;\n}\n\n/** Load method preloads all instance.configured models on-demand */\nexport async function load(currentInstance: Human): Promise {\n if (currentInstance) instance = currentInstance;\n if (!instance) log('instance not registred');\n if (env.initial) reset(instance);\n if (instance.config.hand.enabled) { // handpose model is a combo that must be loaded as a whole\n if (!instance.models.handpose && instance.config.hand.detector?.modelPath?.includes('handdetect')) {\n [instance.models.handpose, instance.models.handskeleton] = await handpose.load(instance.config);\n }\n if (!instance.models.handskeleton && instance.config.hand.landmarks && instance.config.hand.detector?.modelPath?.includes('handdetect')) {\n [instance.models.handpose, instance.models.handskeleton] = await handpose.load(instance.config);\n }\n }\n if (instance.config.body.enabled && !instance.models.blazepose && instance.config.body.modelPath?.includes('blazepose')) instance.models.blazepose = blazepose.loadPose(instance.config);\n if (instance.config.body.enabled && !instance.models.blazeposedetect && instance.config.body['detector'] && instance.config.body['detector'].modelPath) instance.models.blazeposedetect = blazepose.loadDetect(instance.config);\n if (instance.config.body.enabled && !instance.models.efficientpose && instance.config.body.modelPath?.includes('efficientpose')) instance.models.efficientpose = efficientpose.load(instance.config);\n if (instance.config.body.enabled && !instance.models.movenet && instance.config.body.modelPath?.includes('movenet')) instance.models.movenet = movenet.load(instance.config);\n if (instance.config.body.enabled && !instance.models.posenet && instance.config.body.modelPath?.includes('posenet')) instance.models.posenet = posenet.load(instance.config);\n if (instance.config.face.enabled && !instance.models.facedetect) instance.models.facedetect = blazeface.load(instance.config);\n if (instance.config.face.enabled && instance.config.face.antispoof?.enabled && !instance.models.antispoof) instance.models.antispoof = antispoof.load(instance.config);\n if (instance.config.face.enabled && instance.config.face.liveness?.enabled && !instance.models.liveness) instance.models.liveness = liveness.load(instance.config);\n if (instance.config.face.enabled && instance.config.face.description?.enabled && !instance.models.faceres) instance.models.faceres = faceres.load(instance.config);\n if (instance.config.face.enabled && instance.config.face.emotion?.enabled && !instance.models.emotion) instance.models.emotion = emotion.load(instance.config);\n if (instance.config.face.enabled && instance.config.face.iris?.enabled && !instance.config.face.attention?.enabled && !instance.models.faceiris) instance.models.faceiris = iris.load(instance.config);\n if (instance.config.face.enabled && instance.config.face.mesh?.enabled && (!instance.models.facemesh)) instance.models.facemesh = facemesh.load(instance.config);\n if (instance.config.face.enabled && instance.config.face['gear']?.enabled && !instance.models.gear) instance.models.gear = gear.load(instance.config);\n if (instance.config.face.enabled && instance.config.face['ssrnet']?.enabled && !instance.models.ssrnetage) instance.models.ssrnetage = ssrnetAge.load(instance.config);\n if (instance.config.face.enabled && instance.config.face['ssrnet']?.enabled && !instance.models.ssrnetgender) instance.models.ssrnetgender = ssrnetGender.load(instance.config);\n if (instance.config.face.enabled && instance.config.face['mobilefacenet']?.enabled && !instance.models.mobilefacenet) instance.models.mobilefacenet = mobilefacenet.load(instance.config);\n if (instance.config.face.enabled && instance.config.face['insightface']?.enabled && !instance.models.insightface) instance.models.insightface = insightface.load(instance.config);\n if (instance.config.hand.enabled && !instance.models.handtrack && instance.config.hand.detector?.modelPath?.includes('handtrack')) instance.models.handtrack = handtrack.loadDetect(instance.config);\n if (instance.config.hand.enabled && instance.config.hand.landmarks && !instance.models.handskeleton && instance.config.hand.detector?.modelPath?.includes('handtrack')) instance.models.handskeleton = handtrack.loadSkeleton(instance.config);\n if (instance.config.object.enabled && !instance.models.centernet && instance.config.object.modelPath?.includes('centernet')) instance.models.centernet = centernet.load(instance.config);\n if (instance.config.object.enabled && !instance.models.nanodet && instance.config.object.modelPath?.includes('nanodet')) instance.models.nanodet = nanodet.load(instance.config);\n if (instance.config.segmentation.enabled && !instance.models.selfie && instance.config.segmentation.modelPath?.includes('selfie')) instance.models.selfie = selfie.load(instance.config);\n if (instance.config.segmentation.enabled && !instance.models.meet && instance.config.segmentation.modelPath?.includes('meet')) instance.models.meet = meet.load(instance.config);\n if (instance.config.segmentation.enabled && !instance.models.rvm && instance.config.segmentation.modelPath?.includes('rvm')) instance.models.rvm = rvm.load(instance.config);\n\n // models are loaded in parallel asynchronously so lets wait until they are actually loaded\n for await (const model of Object.keys(instance.models)) {\n if (instance.models[model as keyof Models] && typeof instance.models[model as keyof Models] !== 'undefined') {\n instance.models[model as keyof Models] = await instance.models[model as keyof Models];\n }\n }\n}\n\nexport interface KernelOps { name: string, url: string, missing: string[], ops: string[] }\n\nexport function validateModel(currentInstance: Human | null, model: GraphModel | null, name: string): KernelOps | null {\n if (!model) return null;\n if (currentInstance) instance = currentInstance;\n if (!instance) log('instance not registred');\n if (!instance?.config?.validateModels) return null;\n const simpleOps = ['const', 'placeholder', 'noop', 'pad', 'squeeze', 'add', 'sub', 'mul', 'div'];\n const ignoreOps = ['biasadd', 'fusedbatchnormv3', 'matmul', 'switch', 'shape', 'merge', 'split', 'broadcastto'];\n const ops: string[] = [];\n const missing: string[] = [];\n interface Op { name: string, category: string, op: string }\n const url = model['modelUrl'] as string;\n const executor = model['executor'];\n if (executor?.graph?.nodes) {\n for (const kernel of Object.values(executor.graph.nodes)) {\n const op = (kernel as Op).op.toLowerCase();\n if (!ops.includes(op)) ops.push(op);\n }\n } else {\n if (!executor && instance.config.debug) {\n log('model not loaded', name);\n }\n }\n for (const op of ops) {\n if (!simpleOps.includes(op) // exclude simple ops\n && !ignoreOps.includes(op) // exclude specific ops\n && !instance.env.kernels.includes(op) // check actual kernel ops\n && !instance.env.kernels.includes(op.replace('_', '')) // check variation without _\n && !instance.env.kernels.includes(op.replace('native', '')) // check standard variation\n && !instance.env.kernels.includes(op.replace('v2', ''))) { // check non-versioned variation\n missing.push(op);\n }\n }\n if (instance.config.debug && missing.length > 0) log('model validation failed:', name, missing);\n return missing.length > 0 ? { name, missing, ops, url } : null;\n}\n\nexport function validate(currentInstance: Human): { name: string, missing: string[] }[] {\n if (currentInstance) instance = currentInstance;\n if (!instance) log('instance not registred');\n const missing: KernelOps[] = [];\n for (const defined of Object.keys(currentInstance.models)) {\n const model: GraphModel | null = currentInstance.models[defined as keyof Models] as GraphModel | null;\n if (!model) continue;\n const res = validateModel(currentInstance, model, defined);\n if (res) missing.push(res);\n }\n return missing;\n}\n", "/**\n * Anti-spoofing model implementation\n */\n\nimport { log, now } from '../util/util';\nimport type { Config } from '../config';\nimport type { GraphModel, Tensor } from '../tfjs/types';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport { loadModel } from '../tfjs/load';\nimport { env } from '../util/env';\n\nlet model: GraphModel | null;\nconst cached: number[] = [];\nlet skipped = Number.MAX_SAFE_INTEGER;\nlet lastCount = 0;\nlet lastTime = 0;\n\nexport async function load(config: Config): Promise {\n if (env.initial) model = null;\n if (!model) model = await loadModel(config.face.antispoof?.modelPath);\n else if (config.debug) log('cached model:', model['modelUrl']);\n return model;\n}\n\nexport async function predict(image: Tensor, config: Config, idx: number, count: number): Promise {\n if (!model || !model?.['executor']) return 0;\n const skipTime = (config.face.antispoof?.skipTime || 0) > (now() - lastTime);\n const skipFrame = skipped < (config.face.antispoof?.skipFrames || 0);\n if (config.skipAllowed && skipTime && skipFrame && (lastCount === count) && cached[idx]) {\n skipped++;\n return cached[idx];\n }\n skipped = 0;\n return new Promise(async (resolve) => {\n const resize = tf.image.resizeBilinear(image, [model?.inputs[0].shape ? model.inputs[0].shape[2] : 0, model?.inputs[0].shape ? model.inputs[0].shape[1] : 0], false);\n const res = model?.execute(resize) as Tensor;\n const num = (await res.data())[0];\n cached[idx] = Math.round(100 * num) / 100;\n lastCount = count;\n lastTime = now();\n tf.dispose([resize, res]);\n resolve(cached[idx]);\n });\n}\n", "/**\n * BlazeFace, FaceMesh & Iris model implementation\n * See `facemesh.ts` for entry point\n */\n\nexport const meshAnnotations: Record = {\n silhouette: [\n 10, 338, 297, 332, 284, 251, 389, 356, 454, 323, 361, 288,\n 397, 365, 379, 378, 400, 377, 152, 148, 176, 149, 150, 136,\n 172, 58, 132, 93, 234, 127, 162, 21, 54, 103, 67, 109,\n ],\n // lipsUpperOuter: [61, 185, 40, 39, 37, 0, 267, 269, 270, 409, 291], // 11\n // lipsLowerOuter: [146, 91, 181, 84, 17, 314, 405, 321, 375, 291], // 10\n // lipsUpperInner: [78, 191, 80, 81, 82, 13, 312, 311, 310, 415, 308], // 11\n // lipsLowerInner: [78, 95, 88, 178, 87, 14, 317, 402, 318, 324, 308], // 11\n lipsUpperOuter: [185, 40, 39, 37, 0, 267, 269, 270, 409],\n lipsLowerOuter: [61, 146, 91, 181, 84, 17, 314, 405, 321, 375, 291],\n lipsUpperInner: [191, 80, 81, 82, 13, 312, 311, 310, 415],\n lipsLowerInner: [78, 95, 88, 178, 87, 14, 317, 402, 318, 324, 308],\n lipsLowerSemiOuter: [76, 77, 90, 180, 85, 16, 315, 404, 320, 307, 306],\n lipsUpperSemiOuter: [184, 74, 73, 72, 11, 302, 303, 304, 408],\n lipsLowerSemiInner: [62, 96, 89, 179, 86, 15, 316, 403, 319, 325, 292],\n lipsUpperSemiInner: [183, 42, 41, 38, 12, 268, 271, 272, 407],\n rightEyeUpper0: [246, 161, 160, 159, 158, 157, 173], // 7\n rightEyeLower0: [33, 7, 163, 144, 145, 153, 154, 155, 133], // 9\n rightEyeUpper1: [247, 30, 29, 27, 28, 56, 190], // 7\n rightEyeLower1: [130, 25, 110, 24, 23, 22, 26, 112, 243], // 9\n rightEyeUpper2: [113, 225, 224, 223, 222, 221, 189], // 7\n rightEyeLower2: [226, 31, 228, 229, 230, 231, 232, 233, 244], // 9\n rightEyeLower3: [143, 111, 117, 118, 119, 120, 121, 128, 245], // 9\n rightEyebrowUpper: [156, 70, 63, 105, 66, 107, 55, 193], // 8\n rightEyebrowLower: [35, 124, 46, 53, 52, 65], // 6\n rightEyeIris: [473, 474, 475, 476, 477], // 5\n leftEyeUpper0: [466, 388, 387, 386, 385, 384, 398],\n leftEyeLower0: [263, 249, 390, 373, 374, 380, 381, 382, 362],\n leftEyeUpper1: [467, 260, 259, 257, 258, 286, 414],\n leftEyeLower1: [359, 255, 339, 254, 253, 252, 256, 341, 463],\n leftEyeUpper2: [342, 445, 444, 443, 442, 441, 413],\n leftEyeLower2: [446, 261, 448, 449, 450, 451, 452, 453, 464],\n leftEyeLower3: [372, 340, 346, 347, 348, 349, 350, 357, 465],\n leftEyebrowUpper: [383, 300, 293, 334, 296, 336, 285, 417],\n leftEyebrowLower: [265, 353, 276, 283, 282, 295],\n leftEyeIris: [468, 469, 470, 471, 472],\n midwayBetweenEyes: [168],\n noseTip: [1],\n noseBottom: [2],\n noseRightCorner: [98],\n noseLeftCorner: [327],\n rightCheek: [205],\n leftCheek: [425],\n};\n\nexport const meshLandmarks: Record = {\n count: 468,\n mouth: 13,\n symmetryLine: [13, meshAnnotations.midwayBetweenEyes[0]],\n};\n\nexport const blazeFaceLandmarks: Record = {\n leftEye: 0,\n rightEye: 1,\n nose: 2,\n mouth: 3,\n leftEar: 4,\n rightEar: 5,\n symmetryLine: [3, 2],\n};\n\nexport const irisIndices: { key: string, indices: number[] }[] = [ // A mapping from facemesh model keypoints to iris model keypoints.\n { key: 'EyeUpper0', indices: [9, 10, 11, 12, 13, 14, 15] }, // 7 x 3d\n { key: 'EyeUpper1', indices: [25, 26, 27, 28, 29, 30, 31] }, // 7 x 3d\n { key: 'EyeUpper2', indices: [41, 42, 43, 44, 45, 46, 47] }, // 7 x 3d\n { key: 'EyeLower0', indices: [0, 1, 2, 3, 4, 5, 6, 7, 8] }, // 7 x 3d\n { key: 'EyeLower1', indices: [16, 17, 18, 19, 20, 21, 22, 23, 24] }, // 9 x 3d\n { key: 'EyeLower2', indices: [32, 33, 34, 35, 36, 37, 38, 39, 40] }, // 9 x 3d\n { key: 'EyeLower3', indices: [54, 55, 56, 57, 58, 59, 60, 61, 62] }, // 9 x 3d\n { key: 'EyebrowUpper', indices: [63, 64, 65, 66, 67, 68, 69, 70] }, // 8 x 3d\n { key: 'EyebrowLower', indices: [48, 49, 50, 51, 52, 53] }, // 6 x 3d\n];\n\nexport const UV468: [number, number][] = [\n [0.499976992607117, 0.652534008026123],\n [0.500025987625122, 0.547487020492554],\n [0.499974012374878, 0.602371990680695],\n [0.482113003730774, 0.471979022026062],\n [0.500150978565216, 0.527155995368958],\n [0.499909996986389, 0.498252987861633],\n [0.499523013830185, 0.40106201171875],\n [0.289712011814117, 0.380764007568359],\n [0.499954998493195, 0.312398016452789],\n [0.499987006187439, 0.269918978214264],\n [0.500023007392883, 0.107050001621246],\n [0.500023007392883, 0.666234016418457],\n [0.5000159740448, 0.679224014282227],\n [0.500023007392883, 0.692348003387451],\n [0.499976992607117, 0.695277988910675],\n [0.499976992607117, 0.70593398809433],\n [0.499976992607117, 0.719385027885437],\n [0.499976992607117, 0.737019002437592],\n [0.499967992305756, 0.781370997428894],\n [0.499816000461578, 0.562981009483337],\n [0.473773002624512, 0.573909997940063],\n [0.104906998574734, 0.254140973091125],\n [0.365929991006851, 0.409575998783112],\n [0.338757991790771, 0.41302502155304],\n [0.311120003461838, 0.409460008144379],\n [0.274657994508743, 0.389131009578705],\n [0.393361985683441, 0.403706014156342],\n [0.345234006643295, 0.344011008739471],\n [0.370094001293182, 0.346076011657715],\n [0.319321990013123, 0.347265005111694],\n [0.297903001308441, 0.353591024875641],\n [0.24779200553894, 0.410809993743896],\n [0.396889001131058, 0.842755019664764],\n [0.280097991228104, 0.375599980354309],\n [0.106310002505779, 0.399955987930298],\n [0.2099249958992, 0.391353011131287],\n [0.355807989835739, 0.534406006336212],\n [0.471751004457474, 0.65040397644043],\n [0.474155008792877, 0.680191993713379],\n [0.439785003662109, 0.657229006290436],\n [0.414617002010345, 0.66654098033905],\n [0.450374007225037, 0.680860996246338],\n [0.428770989179611, 0.682690978050232],\n [0.374971002340317, 0.727805018424988],\n [0.486716985702515, 0.547628998756409],\n [0.485300987958908, 0.527395009994507],\n [0.257764995098114, 0.314490020275116],\n [0.401223003864288, 0.455172002315521],\n [0.429818987846375, 0.548614978790283],\n [0.421351999044418, 0.533740997314453],\n [0.276895999908447, 0.532056987285614],\n [0.483370006084442, 0.499586999416351],\n [0.33721199631691, 0.282882988452911],\n [0.296391993761063, 0.293242990970612],\n [0.169294998049736, 0.193813979625702],\n [0.447580009698868, 0.302609980106354],\n [0.392390012741089, 0.353887975215912],\n [0.354490011930466, 0.696784019470215],\n [0.067304998636246, 0.730105042457581],\n [0.442739009857178, 0.572826027870178],\n [0.457098007202148, 0.584792017936707],\n [0.381974011659622, 0.694710969924927],\n [0.392388999462128, 0.694203019142151],\n [0.277076005935669, 0.271932005882263],\n [0.422551989555359, 0.563233017921448],\n [0.385919004678726, 0.281364023685455],\n [0.383103013038635, 0.255840003490448],\n [0.331431001424789, 0.119714021682739],\n [0.229923993349075, 0.232002973556519],\n [0.364500999450684, 0.189113974571228],\n [0.229622006416321, 0.299540996551514],\n [0.173287004232407, 0.278747975826263],\n [0.472878992557526, 0.666198015213013],\n [0.446828007698059, 0.668527007102966],\n [0.422762006521225, 0.673889994621277],\n [0.445307999849319, 0.580065965652466],\n [0.388103008270264, 0.693961024284363],\n [0.403039008378983, 0.706539988517761],\n [0.403629004955292, 0.693953037261963],\n [0.460041999816895, 0.557139039039612],\n [0.431158006191254, 0.692366003990173],\n [0.452181994915009, 0.692366003990173],\n [0.475387006998062, 0.692366003990173],\n [0.465828001499176, 0.779190003871918],\n [0.472328990697861, 0.736225962638855],\n [0.473087012767792, 0.717857003211975],\n [0.473122000694275, 0.704625964164734],\n [0.473033010959625, 0.695277988910675],\n [0.427942007780075, 0.695277988910675],\n [0.426479011774063, 0.703539967536926],\n [0.423162013292313, 0.711845993995667],\n [0.4183090031147, 0.720062971115112],\n [0.390094995498657, 0.639572978019714],\n [0.013953999616206, 0.560034036636353],\n [0.499913990497589, 0.58014702796936],\n [0.413199990987778, 0.69539999961853],\n [0.409626007080078, 0.701822996139526],\n [0.468080013990402, 0.601534962654114],\n [0.422728985548019, 0.585985004901886],\n [0.463079988956451, 0.593783974647522],\n [0.37211999297142, 0.47341400384903],\n [0.334562003612518, 0.496073007583618],\n [0.411671012639999, 0.546965003013611],\n [0.242175996303558, 0.14767599105835],\n [0.290776997804642, 0.201445996761322],\n [0.327338010072708, 0.256527006626129],\n [0.399509996175766, 0.748921036720276],\n [0.441727995872498, 0.261676013469696],\n [0.429764986038208, 0.187834024429321],\n [0.412198007106781, 0.108901023864746],\n [0.288955003023148, 0.398952007293701],\n [0.218936994671822, 0.435410976409912],\n [0.41278201341629, 0.398970007896423],\n [0.257135003805161, 0.355440020561218],\n [0.427684992551804, 0.437960982322693],\n [0.448339998722076, 0.536936044692993],\n [0.178560003638268, 0.45755398273468],\n [0.247308000922203, 0.457193970680237],\n [0.286267012357712, 0.467674970626831],\n [0.332827985286713, 0.460712015628815],\n [0.368755996227264, 0.447206974029541],\n [0.398963987827301, 0.432654976844788],\n [0.476410001516342, 0.405806005001068],\n [0.189241006970406, 0.523923993110657],\n [0.228962004184723, 0.348950982093811],\n [0.490725994110107, 0.562400996685028],\n [0.404670000076294, 0.485132992267609],\n [0.019469000399113, 0.401564002037048],\n [0.426243007183075, 0.420431017875671],\n [0.396993011236191, 0.548797011375427],\n [0.266469985246658, 0.376977026462555],\n [0.439121007919312, 0.51895797252655],\n [0.032313998788595, 0.644356966018677],\n [0.419054001569748, 0.387154996395111],\n [0.462783008813858, 0.505746960639954],\n [0.238978996872902, 0.779744982719421],\n [0.198220998048782, 0.831938028335571],\n [0.107550002634525, 0.540755033493042],\n [0.183610007166862, 0.740257024765015],\n [0.134409993886948, 0.333683013916016],\n [0.385764002799988, 0.883153975009918],\n [0.490967005491257, 0.579378008842468],\n [0.382384985685349, 0.508572995662689],\n [0.174399003386497, 0.397670984268188],\n [0.318785011768341, 0.39623498916626],\n [0.343364000320435, 0.400596976280212],\n [0.396100014448166, 0.710216999053955],\n [0.187885001301765, 0.588537991046906],\n [0.430987000465393, 0.944064974784851],\n [0.318993002176285, 0.898285031318665],\n [0.266247987747192, 0.869701027870178],\n [0.500023007392883, 0.190576016902924],\n [0.499976992607117, 0.954452991485596],\n [0.366169989109039, 0.398822009563446],\n [0.393207013607025, 0.39553701877594],\n [0.410373002290726, 0.391080021858215],\n [0.194993004202843, 0.342101991176605],\n [0.388664990663528, 0.362284004688263],\n [0.365961998701096, 0.355970978736877],\n [0.343364000320435, 0.355356991291046],\n [0.318785011768341, 0.35834002494812],\n [0.301414996385574, 0.363156020641327],\n [0.058132998645306, 0.319076001644135],\n [0.301414996385574, 0.387449026107788],\n [0.499987989664078, 0.618434011936188],\n [0.415838003158569, 0.624195992946625],\n [0.445681989192963, 0.566076993942261],\n [0.465844005346298, 0.620640993118286],\n [0.49992299079895, 0.351523995399475],\n [0.288718998432159, 0.819945991039276],\n [0.335278987884521, 0.852819979190826],\n [0.440512001514435, 0.902418971061707],\n [0.128294005990028, 0.791940987110138],\n [0.408771991729736, 0.373893976211548],\n [0.455606997013092, 0.451801002025604],\n [0.499877005815506, 0.908990025520325],\n [0.375436991453171, 0.924192011356354],\n [0.11421000212431, 0.615022003650665],\n [0.448662012815475, 0.695277988910675],\n [0.4480200111866, 0.704632043838501],\n [0.447111994028091, 0.715808033943176],\n [0.444831997156143, 0.730794012546539],\n [0.430011987686157, 0.766808986663818],\n [0.406787008047104, 0.685672998428345],\n [0.400738000869751, 0.681069016456604],\n [0.392399996519089, 0.677703022956848],\n [0.367855995893478, 0.663918972015381],\n [0.247923001646996, 0.601333022117615],\n [0.452769994735718, 0.420849978923798],\n [0.43639200925827, 0.359887003898621],\n [0.416164010763168, 0.368713974952698],\n [0.413385987281799, 0.692366003990173],\n [0.228018000721931, 0.683571994304657],\n [0.468268007040024, 0.352671027183533],\n [0.411361992359161, 0.804327011108398],\n [0.499989002943039, 0.469825029373169],\n [0.479153990745544, 0.442654013633728],\n [0.499974012374878, 0.439637005329132],\n [0.432112008333206, 0.493588984012604],\n [0.499886006116867, 0.866917014122009],\n [0.49991300702095, 0.821729004383087],\n [0.456548988819122, 0.819200992584229],\n [0.344549000263214, 0.745438992977142],\n [0.37890899181366, 0.574010014533997],\n [0.374292999505997, 0.780184984207153],\n [0.319687992334366, 0.570737957954407],\n [0.357154995203018, 0.604269981384277],\n [0.295284003019333, 0.621580958366394],\n [0.447750002145767, 0.862477004528046],\n [0.410986006259918, 0.508723020553589],\n [0.31395098567009, 0.775308012962341],\n [0.354128003120422, 0.812552988529205],\n [0.324548006057739, 0.703992962837219],\n [0.189096003770828, 0.646299958229065],\n [0.279776990413666, 0.71465802192688],\n [0.1338230073452, 0.682700991630554],\n [0.336768001317978, 0.644733011722565],\n [0.429883986711502, 0.466521978378296],\n [0.455527991056442, 0.548622965812683],\n [0.437114000320435, 0.558896005153656],\n [0.467287987470627, 0.529924988746643],\n [0.414712011814117, 0.335219979286194],\n [0.37704598903656, 0.322777986526489],\n [0.344107985496521, 0.320150971412659],\n [0.312875986099243, 0.32233202457428],\n [0.283526003360748, 0.333190023899078],\n [0.241245999932289, 0.382785975933075],\n [0.102986000478268, 0.468762993812561],\n [0.267612010240555, 0.424560010433197],\n [0.297879010438919, 0.433175981044769],\n [0.333433985710144, 0.433878004550934],\n [0.366427004337311, 0.426115989685059],\n [0.396012008190155, 0.416696012020111],\n [0.420121014118195, 0.41022801399231],\n [0.007561000064015, 0.480777025222778],\n [0.432949006557465, 0.569517970085144],\n [0.458638995885849, 0.479089021682739],\n [0.473466008901596, 0.545744001865387],\n [0.476087987422943, 0.563830018043518],\n [0.468472003936768, 0.555056989192963],\n [0.433990985155106, 0.582361996173859],\n [0.483518004417419, 0.562983989715576],\n [0.482482999563217, 0.57784903049469],\n [0.42645001411438, 0.389798998832703],\n [0.438998997211456, 0.39649498462677],\n [0.450067013502121, 0.400434017181396],\n [0.289712011814117, 0.368252992630005],\n [0.276670008897781, 0.363372981548309],\n [0.517862021923065, 0.471948027610779],\n [0.710287988185883, 0.380764007568359],\n [0.526226997375488, 0.573909997940063],\n [0.895093023777008, 0.254140973091125],\n [0.634069979190826, 0.409575998783112],\n [0.661242008209229, 0.41302502155304],\n [0.688880026340485, 0.409460008144379],\n [0.725341975688934, 0.389131009578705],\n [0.606630027294159, 0.40370500087738],\n [0.654766023159027, 0.344011008739471],\n [0.629905998706818, 0.346076011657715],\n [0.680678009986877, 0.347265005111694],\n [0.702096998691559, 0.353591024875641],\n [0.75221198797226, 0.410804986953735],\n [0.602918028831482, 0.842862963676453],\n [0.719901978969574, 0.375599980354309],\n [0.893692970275879, 0.399959981441498],\n [0.790081977844238, 0.391354024410248],\n [0.643998026847839, 0.534487962722778],\n [0.528249025344849, 0.65040397644043],\n [0.525849997997284, 0.680191040039062],\n [0.560214996337891, 0.657229006290436],\n [0.585384011268616, 0.66654098033905],\n [0.549625992774963, 0.680860996246338],\n [0.57122802734375, 0.682691991329193],\n [0.624852001667023, 0.72809898853302],\n [0.513050019741058, 0.547281980514526],\n [0.51509702205658, 0.527251958847046],\n [0.742246985435486, 0.314507007598877],\n [0.598631024360657, 0.454979002475739],\n [0.570338010787964, 0.548575043678284],\n [0.578631997108459, 0.533622980117798],\n [0.723087012767792, 0.532054007053375],\n [0.516445994377136, 0.499638974666595],\n [0.662801027297974, 0.282917976379395],\n [0.70362401008606, 0.293271005153656],\n [0.830704987049103, 0.193813979625702],\n [0.552385985851288, 0.302568018436432],\n [0.607609987258911, 0.353887975215912],\n [0.645429015159607, 0.696707010269165],\n [0.932694971561432, 0.730105042457581],\n [0.557260990142822, 0.572826027870178],\n [0.542901992797852, 0.584792017936707],\n [0.6180260181427, 0.694710969924927],\n [0.607590973377228, 0.694203019142151],\n [0.722943007946014, 0.271963000297546],\n [0.577413976192474, 0.563166975975037],\n [0.614082992076874, 0.281386971473694],\n [0.616907000541687, 0.255886018276215],\n [0.668509006500244, 0.119913995265961],\n [0.770092010498047, 0.232020974159241],\n [0.635536015033722, 0.189248979091644],\n [0.77039098739624, 0.299556016921997],\n [0.826722025871277, 0.278755009174347],\n [0.527121007442474, 0.666198015213013],\n [0.553171992301941, 0.668527007102966],\n [0.577238023281097, 0.673889994621277],\n [0.554691970348358, 0.580065965652466],\n [0.611896991729736, 0.693961024284363],\n [0.59696102142334, 0.706539988517761],\n [0.596370995044708, 0.693953037261963],\n [0.539958000183105, 0.557139039039612],\n [0.568841993808746, 0.692366003990173],\n [0.547818005084991, 0.692366003990173],\n [0.52461302280426, 0.692366003990173],\n [0.534089982509613, 0.779141008853912],\n [0.527670979499817, 0.736225962638855],\n [0.526912987232208, 0.717857003211975],\n [0.526877999305725, 0.704625964164734],\n [0.526966989040375, 0.695277988910675],\n [0.572058022022247, 0.695277988910675],\n [0.573521018028259, 0.703539967536926],\n [0.57683801651001, 0.711845993995667],\n [0.581691026687622, 0.720062971115112],\n [0.609944999217987, 0.639909982681274],\n [0.986046016216278, 0.560034036636353],\n [0.5867999792099, 0.69539999961853],\n [0.590372025966644, 0.701822996139526],\n [0.531915009021759, 0.601536989212036],\n [0.577268004417419, 0.585934996604919],\n [0.536915004253387, 0.593786001205444],\n [0.627542972564697, 0.473352015018463],\n [0.665585994720459, 0.495950996875763],\n [0.588353991508484, 0.546862006187439],\n [0.757824003696442, 0.14767599105835],\n [0.709249973297119, 0.201507985591888],\n [0.672684013843536, 0.256581008434296],\n [0.600408971309662, 0.74900496006012],\n [0.55826598405838, 0.261672019958496],\n [0.570303976535797, 0.187870979309082],\n [0.588165998458862, 0.109044015407562],\n [0.711045026779175, 0.398952007293701],\n [0.781069993972778, 0.435405015945435],\n [0.587247014045715, 0.398931980133057],\n [0.742869973182678, 0.355445981025696],\n [0.572156012058258, 0.437651991844177],\n [0.55186802148819, 0.536570012569427],\n [0.821442008018494, 0.457556009292603],\n [0.752701997756958, 0.457181990146637],\n [0.71375697851181, 0.467626988887787],\n [0.66711300611496, 0.460672974586487],\n [0.631101012229919, 0.447153985500336],\n [0.6008620262146, 0.432473003864288],\n [0.523481011390686, 0.405627012252808],\n [0.810747981071472, 0.523926019668579],\n [0.771045982837677, 0.348959028720856],\n [0.509127020835876, 0.562718033790588],\n [0.595292985439301, 0.485023975372314],\n [0.980530977249146, 0.401564002037048],\n [0.573499977588654, 0.420000016689301],\n [0.602994978427887, 0.548687994480133],\n [0.733529984951019, 0.376977026462555],\n [0.560611009597778, 0.519016981124878],\n [0.967685997486115, 0.644356966018677],\n [0.580985009670258, 0.387160003185272],\n [0.537728011608124, 0.505385041236877],\n [0.760966002941132, 0.779752969741821],\n [0.801778972148895, 0.831938028335571],\n [0.892440974712372, 0.54076099395752],\n [0.816350996494293, 0.740260004997253],\n [0.865594983100891, 0.333687007427216],\n [0.614073991775513, 0.883246004581451],\n [0.508952975273132, 0.579437971115112],\n [0.617941975593567, 0.508316040039062],\n [0.825608015060425, 0.397674977779388],\n [0.681214988231659, 0.39623498916626],\n [0.656635999679565, 0.400596976280212],\n [0.603900015354156, 0.710216999053955],\n [0.81208598613739, 0.588539004325867],\n [0.56801301240921, 0.944564998149872],\n [0.681007981300354, 0.898285031318665],\n [0.733752012252808, 0.869701027870178],\n [0.633830010890961, 0.398822009563446],\n [0.606792986392975, 0.39553701877594],\n [0.589659988880157, 0.391062021255493],\n [0.805015981197357, 0.342108011245728],\n [0.611334979534149, 0.362284004688263],\n [0.634037971496582, 0.355970978736877],\n [0.656635999679565, 0.355356991291046],\n [0.681214988231659, 0.35834002494812],\n [0.698584973812103, 0.363156020641327],\n [0.941866993904114, 0.319076001644135],\n [0.698584973812103, 0.387449026107788],\n [0.584177017211914, 0.624107003211975],\n [0.554318010807037, 0.566076993942261],\n [0.534153997898102, 0.62064003944397],\n [0.711217999458313, 0.819975018501282],\n [0.664629995822906, 0.852871000766754],\n [0.559099972248077, 0.902631998062134],\n [0.871706008911133, 0.791940987110138],\n [0.591234028339386, 0.373893976211548],\n [0.544341027736664, 0.451583981513977],\n [0.624562978744507, 0.924192011356354],\n [0.88577002286911, 0.615028977394104],\n [0.551338016986847, 0.695277988910675],\n [0.551980018615723, 0.704632043838501],\n [0.552887976169586, 0.715808033943176],\n [0.555167973041534, 0.730794012546539],\n [0.569944024085999, 0.767035007476807],\n [0.593203008174896, 0.685675978660583],\n [0.599261999130249, 0.681069016456604],\n [0.607599973678589, 0.677703022956848],\n [0.631937980651855, 0.663500010967255],\n [0.752032995223999, 0.601315021514893],\n [0.547226011753082, 0.420395016670227],\n [0.563543975353241, 0.359827995300293],\n [0.583841025829315, 0.368713974952698],\n [0.586614012718201, 0.692366003990173],\n [0.771915018558502, 0.683578014373779],\n [0.531597018241882, 0.352482974529266],\n [0.588370978832245, 0.804440975189209],\n [0.52079701423645, 0.442565023899078],\n [0.567984998226166, 0.493479013442993],\n [0.543282985687256, 0.819254994392395],\n [0.655317008495331, 0.745514988899231],\n [0.621008992195129, 0.574018001556396],\n [0.625559985637665, 0.78031200170517],\n [0.680198013782501, 0.570719003677368],\n [0.64276397228241, 0.604337990283966],\n [0.704662978649139, 0.621529996395111],\n [0.552012026309967, 0.862591981887817],\n [0.589071989059448, 0.508637011051178],\n [0.685944974422455, 0.775357007980347],\n [0.645735025405884, 0.812640011310577],\n [0.675342977046967, 0.703978002071381],\n [0.810858011245728, 0.646304965019226],\n [0.72012197971344, 0.714666962623596],\n [0.866151988506317, 0.682704985141754],\n [0.663187026977539, 0.644596993923187],\n [0.570082008838654, 0.466325998306274],\n [0.544561982154846, 0.548375964164734],\n [0.562758982181549, 0.558784961700439],\n [0.531987011432648, 0.530140042304993],\n [0.585271000862122, 0.335177004337311],\n [0.622952997684479, 0.32277899980545],\n [0.655896008014679, 0.320163011550903],\n [0.687132000923157, 0.322345972061157],\n [0.716481983661652, 0.333200991153717],\n [0.758756995201111, 0.382786989212036],\n [0.897013008594513, 0.468769013881683],\n [0.732392013072968, 0.424547016620636],\n [0.70211398601532, 0.433162987232208],\n [0.66652500629425, 0.433866024017334],\n [0.633504986763, 0.426087975502014],\n [0.603875994682312, 0.416586995124817],\n [0.579657971858978, 0.409945011138916],\n [0.992439985275269, 0.480777025222778],\n [0.567192018032074, 0.569419980049133],\n [0.54136598110199, 0.478899002075195],\n [0.526564002037048, 0.546118021011353],\n [0.523913025856018, 0.563830018043518],\n [0.531529009342194, 0.555056989192963],\n [0.566035985946655, 0.582329034805298],\n [0.51631098985672, 0.563053965568542],\n [0.5174720287323, 0.577877044677734],\n [0.573594987392426, 0.389806985855103],\n [0.560697972774506, 0.395331978797913],\n [0.549755990505219, 0.399751007556915],\n [0.710287988185883, 0.368252992630005],\n [0.723330020904541, 0.363372981548309],\n];\n\nexport const TRI468: number[] = [\n 127, 34, 139, 11, 0, 37, 232, 231, 120, 72, 37, 39, 128, 121, 47, 232, 121, 128, 104, 69, 67, 175, 171, 148, 157, 154, 155, 118, 50, 101, 73, 39, 40, 9,\n 151, 108, 48, 115, 131, 194, 204, 211, 74, 40, 185, 80, 42, 183, 40, 92, 186, 230, 229, 118, 202, 212, 214, 83, 18, 17, 76, 61, 146, 160, 29, 30, 56,\n 157, 173, 106, 204, 194, 135, 214, 192, 203, 165, 98, 21, 71, 68, 51, 45, 4, 144, 24, 23, 77, 146, 91, 205, 50, 187, 201, 200, 18, 91, 106, 182, 90, 91,\n 181, 85, 84, 17, 206, 203, 36, 148, 171, 140, 92, 40, 39, 193, 189, 244, 159, 158, 28, 247, 246, 161, 236, 3, 196, 54, 68, 104, 193, 168, 8, 117,\n 228, 31, 189, 193, 55, 98, 97, 99, 126, 47, 100, 166, 79, 218, 155, 154, 26, 209, 49, 131, 135, 136, 150, 47, 126, 217, 223, 52, 53, 45, 51, 134, 211,\n 170, 140, 67, 69, 108, 43, 106, 91, 230, 119, 120, 226, 130, 247, 63, 53, 52, 238, 20, 242, 46, 70, 156, 78, 62, 96, 46, 53, 63, 143, 34, 227, 173,\n 155, 133, 123, 117, 111, 44, 125, 19, 236, 134, 51, 216, 206, 205, 154, 153, 22, 39, 37, 167, 200, 201, 208, 36, 142, 100, 57, 212, 202, 20, 60, 99, 28,\n 158, 157, 35, 226, 113, 160, 159, 27, 204, 202, 210, 113, 225, 46, 43, 202, 204, 62, 76, 77, 137, 123, 116, 41, 38, 72, 203, 129, 142, 64, 98, 240, 49,\n 102, 64, 41, 73, 74, 212, 216, 207, 42, 74, 184, 169, 170, 211, 170, 149, 176, 105, 66, 69, 122, 6, 168, 123, 147, 187, 96, 77, 90, 65, 55, 107, 89,\n 90, 180, 101, 100, 120, 63, 105, 104, 93, 137, 227, 15, 86, 85, 129, 102, 49, 14, 87, 86, 55, 8, 9, 100, 47, 121, 145, 23, 22, 88, 89, 179, 6, 122,\n 196, 88, 95, 96, 138, 172, 136, 215, 58, 172, 115, 48, 219, 42, 80, 81, 195, 3, 51, 43, 146, 61, 171, 175, 199, 81, 82, 38, 53, 46, 225, 144, 163, 110,\n 246, 33, 7, 52, 65, 66, 229, 228, 117, 34, 127, 234, 107, 108, 69, 109, 108, 151, 48, 64, 235, 62, 78, 191, 129, 209, 126, 111, 35, 143, 163, 161, 246,\n 117, 123, 50, 222, 65, 52, 19, 125, 141, 221, 55, 65, 3, 195, 197, 25, 7, 33, 220, 237, 44, 70, 71, 139, 122, 193, 245, 247, 130, 33, 71, 21, 162,\n 153, 158, 159, 170, 169, 150, 188, 174, 196, 216, 186, 92, 144, 160, 161, 2, 97, 167, 141, 125, 241, 164, 167, 37, 72, 38, 12, 145, 159, 160, 38, 82, 13,\n 63, 68, 71, 226, 35, 111, 158, 153, 154, 101, 50, 205, 206, 92, 165, 209, 198, 217, 165, 167, 97, 220, 115, 218, 133, 112, 243, 239, 238, 241, 214,\n 135, 169, 190, 173, 133, 171, 208, 32, 125, 44, 237, 86, 87, 178, 85, 86, 179, 84, 85, 180, 83, 84, 181, 201, 83, 182, 137, 93, 132, 76, 62, 183, 61,\n 76, 184, 57, 61, 185, 212, 57, 186, 214, 207, 187, 34, 143, 156, 79, 239, 237, 123, 137, 177, 44, 1, 4, 201, 194, 32, 64, 102, 129, 213, 215, 138, 59,\n 166, 219, 242, 99, 97, 2, 94, 141, 75, 59, 235, 24, 110, 228, 25, 130, 226, 23, 24, 229, 22, 23, 230, 26, 22, 231, 112, 26, 232, 189, 190, 243, 221, 56,\n 190, 28, 56, 221, 27, 28, 222, 29, 27, 223, 30, 29, 224, 247, 30, 225, 238, 79, 20, 166, 59, 75, 60, 75, 240, 147, 177, 215, 20, 79, 166, 187, 147, 213,\n 112, 233, 244, 233, 128, 245, 128, 114, 188, 114, 217, 174, 131, 115, 220, 217, 198, 236, 198, 131, 134, 177, 132, 58, 143, 35, 124, 110, 163, 7, 228,\n 110, 25, 356, 389, 368, 11, 302, 267, 452, 350, 349, 302, 303, 269, 357, 343, 277, 452, 453, 357, 333, 332, 297, 175, 152, 377, 384, 398, 382, 347,\n 348, 330, 303, 304, 270, 9, 336, 337, 278, 279, 360, 418, 262, 431, 304, 408, 409, 310, 415, 407, 270, 409, 410, 450, 348, 347, 422, 430, 434, 313,\n 314, 17, 306, 307, 375, 387, 388, 260, 286, 414, 398, 335, 406, 418, 364, 367, 416, 423, 358, 327, 251, 284, 298, 281, 5, 4, 373, 374, 253, 307, 320,\n 321, 425, 427, 411, 421, 313, 18, 321, 405, 406, 320, 404, 405, 315, 16, 17, 426, 425, 266, 377, 400, 369, 322, 391, 269, 417, 465, 464, 386, 257, 258,\n 466, 260, 388, 456, 399, 419, 284, 332, 333, 417, 285, 8, 346, 340, 261, 413, 441, 285, 327, 460, 328, 355, 371, 329, 392, 439, 438, 382, 341, 256,\n 429, 420, 360, 364, 394, 379, 277, 343, 437, 443, 444, 283, 275, 440, 363, 431, 262, 369, 297, 338, 337, 273, 375, 321, 450, 451, 349, 446, 342, 467,\n 293, 334, 282, 458, 461, 462, 276, 353, 383, 308, 324, 325, 276, 300, 293, 372, 345, 447, 382, 398, 362, 352, 345, 340, 274, 1, 19, 456, 248, 281, 436,\n 427, 425, 381, 256, 252, 269, 391, 393, 200, 199, 428, 266, 330, 329, 287, 273, 422, 250, 462, 328, 258, 286, 384, 265, 353, 342, 387, 259, 257, 424,\n 431, 430, 342, 353, 276, 273, 335, 424, 292, 325, 307, 366, 447, 345, 271, 303, 302, 423, 266, 371, 294, 455, 460, 279, 278, 294, 271, 272, 304, 432,\n 434, 427, 272, 407, 408, 394, 430, 431, 395, 369, 400, 334, 333, 299, 351, 417, 168, 352, 280, 411, 325, 319, 320, 295, 296, 336, 319, 403, 404, 330,\n 348, 349, 293, 298, 333, 323, 454, 447, 15, 16, 315, 358, 429, 279, 14, 15, 316, 285, 336, 9, 329, 349, 350, 374, 380, 252, 318, 402, 403, 6, 197, 419,\n 318, 319, 325, 367, 364, 365, 435, 367, 397, 344, 438, 439, 272, 271, 311, 195, 5, 281, 273, 287, 291, 396, 428, 199, 311, 271, 268, 283, 444, 445,\n 373, 254, 339, 263, 466, 249, 282, 334, 296, 449, 347, 346, 264, 447, 454, 336, 296, 299, 338, 10, 151, 278, 439, 455, 292, 407, 415, 358, 371, 355,\n 340, 345, 372, 390, 249, 466, 346, 347, 280, 442, 443, 282, 19, 94, 370, 441, 442, 295, 248, 419, 197, 263, 255, 359, 440, 275, 274, 300, 383, 368,\n 351, 412, 465, 263, 467, 466, 301, 368, 389, 380, 374, 386, 395, 378, 379, 412, 351, 419, 436, 426, 322, 373, 390, 388, 2, 164, 393, 370, 462, 461,\n 164, 0, 267, 302, 11, 12, 374, 373, 387, 268, 12, 13, 293, 300, 301, 446, 261, 340, 385, 384, 381, 330, 266, 425, 426, 423, 391, 429, 355, 437, 391,\n 327, 326, 440, 457, 438, 341, 382, 362, 459, 457, 461, 434, 430, 394, 414, 463, 362, 396, 369, 262, 354, 461, 457, 316, 403, 402, 315, 404, 403, 314,\n 405, 404, 313, 406, 405, 421, 418, 406, 366, 401, 361, 306, 408, 407, 291, 409, 408, 287, 410, 409, 432, 436, 410, 434, 416, 411, 264, 368, 383, 309,\n 438, 457, 352, 376, 401, 274, 275, 4, 421, 428, 262, 294, 327, 358, 433, 416, 367, 289, 455, 439, 462, 370, 326, 2, 326, 370, 305, 460, 455, 254,\n 449, 448, 255, 261, 446, 253, 450, 449, 252, 451, 450, 256, 452, 451, 341, 453, 452, 413, 464, 463, 441, 413, 414, 258, 442, 441, 257, 443, 442, 259,\n 444, 443, 260, 445, 444, 467, 342, 445, 459, 458, 250, 289, 392, 290, 290, 328, 460, 376, 433, 435, 250, 290, 392, 411, 416, 433, 341, 463, 464, 453,\n 464, 465, 357, 465, 412, 343, 412, 399, 360, 363, 440, 437, 399, 456, 420, 456, 363, 401, 435, 288, 372, 383, 353, 339, 255, 249, 448, 261, 255, 133,\n 243, 190, 133, 155, 112, 33, 246, 247, 33, 130, 25, 398, 384, 286, 362, 398, 414, 362, 463, 341, 263, 359, 467, 263, 249, 255, 466, 467, 260, 75, 60,\n 166, 238, 239, 79, 162, 127, 139, 72, 11, 37, 121, 232, 120, 73, 72, 39, 114, 128, 47, 233, 232, 128, 103, 104, 67, 152, 175, 148, 173, 157, 155,\n 119, 118, 101, 74, 73, 40, 107, 9, 108, 49, 48, 131, 32, 194, 211, 184, 74, 185, 191, 80, 183, 185, 40, 186, 119, 230, 118, 210, 202, 214, 84, 83, 17,\n 77, 76, 146, 161, 160, 30, 190, 56, 173, 182, 106, 194, 138, 135, 192, 129, 203, 98, 54, 21, 68, 5, 51, 4, 145, 144, 23, 90, 77, 91, 207, 205, 187, 83,\n 201, 18, 181, 91, 182, 180, 90, 181, 16, 85, 17, 205, 206, 36, 176, 148, 140, 165, 92, 39, 245, 193, 244, 27, 159, 28, 30, 247, 161, 174, 236, 196,\n 103, 54, 104, 55, 193, 8, 111, 117, 31, 221, 189, 55, 240, 98, 99, 142, 126, 100, 219, 166, 218, 112, 155, 26, 198, 209, 131, 169, 135, 150, 114, 47,\n 217, 224, 223, 53, 220, 45, 134, 32, 211, 140, 109, 67, 108, 146, 43, 91, 231, 230, 120, 113, 226, 247, 105, 63, 52, 241, 238, 242, 124, 46, 156, 95,\n 78, 96, 70, 46, 63, 116, 143, 227, 116, 123, 111, 1, 44, 19, 3, 236, 51, 207, 216, 205, 26, 154, 22, 165, 39, 167, 199, 200, 208, 101, 36, 100, 43,\n 57, 202, 242, 20, 99, 56, 28, 157, 124, 35, 113, 29, 160, 27, 211, 204, 210, 124, 113, 46, 106, 43, 204, 96, 62, 77, 227, 137, 116, 73, 41, 72, 36, 203,\n 142, 235, 64, 240, 48, 49, 64, 42, 41, 74, 214, 212, 207, 183, 42, 184, 210, 169, 211, 140, 170, 176, 104, 105, 69, 193, 122, 168, 50, 123, 187, 89, 96,\n 90, 66, 65, 107, 179, 89, 180, 119, 101, 120, 68, 63, 104, 234, 93, 227, 16, 15, 85, 209, 129, 49, 15, 14, 86, 107, 55, 9, 120, 100, 121, 153, 145, 22,\n 178, 88, 179, 197, 6, 196, 89, 88, 96, 135, 138, 136, 138, 215, 172, 218, 115, 219, 41, 42, 81, 5, 195, 51, 57, 43, 61, 208, 171, 199, 41, 81, 38,\n 224, 53, 225, 24, 144, 110, 105, 52, 66, 118, 229, 117, 227, 34, 234, 66, 107, 69, 10, 109, 151, 219, 48, 235, 183, 62, 191, 142, 129, 126, 116, 111,\n 143, 7, 163, 246, 118, 117, 50, 223, 222, 52, 94, 19, 141, 222, 221, 65, 196, 3, 197, 45, 220, 44, 156, 70, 139, 188, 122, 245, 139, 71, 162, 145,\n 153, 159, 149, 170, 150, 122, 188, 196, 206, 216, 92, 163, 144, 161, 164, 2, 167, 242, 141, 241, 0, 164, 37, 11, 72, 12, 144, 145, 160, 12, 38, 13, 70,\n 63, 71, 31, 226, 111, 157, 158, 154, 36, 101, 205, 203, 206, 165, 126, 209, 217, 98, 165, 97, 237, 220, 218, 237, 239, 241, 210, 214, 169, 140, 171, 32,\n 241, 125, 237, 179, 86, 178, 180, 85, 179, 181, 84, 180, 182, 83, 181, 194, 201, 182, 177, 137, 132, 184, 76, 183, 185, 61, 184, 186, 57, 185, 216, 212,\n 186, 192, 214, 187, 139, 34, 156, 218, 79, 237, 147, 123, 177, 45, 44, 4, 208, 201, 32, 98, 64, 129, 192, 213, 138, 235, 59, 219, 141, 242, 97, 97, 2,\n 141, 240, 75, 235, 229, 24, 228, 31, 25, 226, 230, 23, 229, 231, 22, 230, 232, 26, 231, 233, 112, 232, 244, 189, 243, 189, 221, 190, 222, 28, 221,\n 223, 27, 222, 224, 29, 223, 225, 30, 224, 113, 247, 225, 99, 60, 240, 213, 147, 215, 60, 20, 166, 192, 187, 213, 243, 112, 244, 244, 233, 245, 245,\n 128, 188, 188, 114, 174, 134, 131, 220, 174, 217, 236, 236, 198, 134, 215, 177, 58, 156, 143, 124, 25, 110, 7, 31, 228, 25, 264, 356, 368, 0, 11, 267,\n 451, 452, 349, 267, 302, 269, 350, 357, 277, 350, 452, 357, 299, 333, 297, 396, 175, 377, 381, 384, 382, 280, 347, 330, 269, 303, 270, 151, 9, 337,\n 344, 278, 360, 424, 418, 431, 270, 304, 409, 272, 310, 407, 322, 270, 410, 449, 450, 347, 432, 422, 434, 18, 313, 17, 291, 306, 375, 259, 387, 260,\n 424, 335, 418, 434, 364, 416, 391, 423, 327, 301, 251, 298, 275, 281, 4, 254, 373, 253, 375, 307, 321, 280, 425, 411, 200, 421, 18, 335, 321, 406,\n 321, 320, 405, 314, 315, 17, 423, 426, 266, 396, 377, 369, 270, 322, 269, 413, 417, 464, 385, 386, 258, 248, 456, 419, 298, 284, 333, 168, 417, 8,\n 448, 346, 261, 417, 413, 285, 326, 327, 328, 277, 355, 329, 309, 392, 438, 381, 382, 256, 279, 429, 360, 365, 364, 379, 355, 277, 437, 282, 443, 283,\n 281, 275, 363, 395, 431, 369, 299, 297, 337, 335, 273, 321, 348, 450, 349, 359, 446, 467, 283, 293, 282, 250, 458, 462, 300, 276, 383, 292, 308, 325,\n 283, 276, 293, 264, 372, 447, 346, 352, 340, 354, 274, 19, 363, 456, 281, 426, 436, 425, 380, 381, 252, 267, 269, 393, 421, 200, 428, 371, 266, 329,\n 432, 287, 422, 290, 250, 328, 385, 258, 384, 446, 265, 342, 386, 387, 257, 422, 424, 430, 445, 342, 276, 422, 273, 424, 306, 292, 307, 352, 366, 345,\n 268, 271, 302, 358, 423, 371, 327, 294, 460, 331, 279, 294, 303, 271, 304, 436, 432, 427, 304, 272, 408, 395, 394, 431, 378, 395, 400, 296, 334, 299,\n 6, 351, 168, 376, 352, 411, 307, 325, 320, 285, 295, 336, 320, 319, 404, 329, 330, 349, 334, 293, 333, 366, 323, 447, 316, 15, 315, 331, 358, 279,\n 317, 14, 316, 8, 285, 9, 277, 329, 350, 253, 374, 252, 319, 318, 403, 351, 6, 419, 324, 318, 325, 397, 367, 365, 288, 435, 397, 278, 344, 439, 310,\n 272, 311, 248, 195, 281, 375, 273, 291, 175, 396, 199, 312, 311, 268, 276, 283, 445, 390, 373, 339, 295, 282, 296, 448, 449, 346, 356, 264, 454, 337,\n 336, 299, 337, 338, 151, 294, 278, 455, 308, 292, 415, 429, 358, 355, 265, 340, 372, 388, 390, 466, 352, 346, 280, 295, 442, 282, 354, 19, 370, 285,\n 441, 295, 195, 248, 197, 457, 440, 274, 301, 300, 368, 417, 351, 465, 251, 301, 389, 385, 380, 386, 394, 395, 379, 399, 412, 419, 410, 436, 322, 387,\n 373, 388, 326, 2, 393, 354, 370, 461, 393, 164, 267, 268, 302, 12, 386, 374, 387, 312, 268, 13, 298, 293, 301, 265, 446, 340, 380, 385, 381, 280, 330,\n 425, 322, 426, 391, 420, 429, 437, 393, 391, 326, 344, 440, 438, 458, 459, 461, 364, 434, 394, 428, 396, 262, 274, 354, 457, 317, 316, 402, 316, 315,\n 403, 315, 314, 404, 314, 313, 405, 313, 421, 406, 323, 366, 361, 292, 306, 407, 306, 291, 408, 291, 287, 409, 287, 432, 410, 427, 434, 411, 372, 264,\n 383, 459, 309, 457, 366, 352, 401, 1, 274, 4, 418, 421, 262, 331, 294, 358, 435, 433, 367, 392, 289, 439, 328, 462, 326, 94, 2, 370, 289, 305, 455, 339,\n 254, 448, 359, 255, 446, 254, 253, 449, 253, 252, 450, 252, 256, 451, 256, 341, 452, 414, 413, 463, 286, 441, 414, 286, 258, 441, 258, 257, 442, 257,\n 259, 443, 259, 260, 444, 260, 467, 445, 309, 459, 250, 305, 289, 290, 305, 290, 460, 401, 376, 435, 309, 250, 392, 376, 411, 433, 453, 341, 464, 357,\n 453, 465, 343, 357, 412, 437, 343, 399, 344, 360, 440, 420, 437, 456, 360, 420, 363, 361, 401, 288, 265, 372, 353, 390, 339, 249, 339, 448, 255];\n\nexport const TRI68: number[] = [0, 1, 36, 0, 36, 17, 1, 2, 41, 1, 41, 36, 2, 3, 31, 2, 31, 41, 3, 4, 48, 3, 48, 31, 4, 5, 48, 5, 6, 48, 6, 7, 59, 6, 59, 48, 7, 8, 58, 7, 58, 59,\n 8, 9, 56, 8, 56, 57, 8, 57, 58, 9, 10, 55, 9, 55, 56, 10, 11, 54, 10, 54, 55, 11, 12, 54, 12, 13, 54, 13, 14, 35, 13, 35, 54, 14, 15, 46, 14, 46, 35, 15, 16,\n 45, 15, 45, 46, 16, 26, 45, 17, 36, 18, 18, 37, 19, 18, 36, 37, 19, 38, 20, 19, 37, 38, 20, 39, 21, 20, 38, 39, 21, 39, 27, 22, 42, 23, 22, 27, 42, 23, 43, 24,\n 23, 42, 43, 24, 44, 25, 24, 43, 44, 25, 45, 26, 25, 44, 45, 27, 39, 28, 27, 28, 42, 28, 39, 29, 28, 29, 42, 29, 31, 30, 29, 30, 35, 29, 40, 31, 29, 35, 47, 29,\n 39, 40, 29, 47, 42, 30, 31, 32, 30, 32, 33, 30, 33, 34, 30, 34, 35, 31, 50, 32, 31, 40, 41, 31, 48, 49, 31, 49, 50, 32, 51, 33, 32, 50, 51, 33, 51, 34, 34, 52,\n 35, 34, 51, 52, 35, 46, 47, 35, 52, 53, 35, 53, 54, 36, 41, 37, 37, 40, 38, 37, 41, 40, 38, 40, 39, 42, 47, 43, 43, 47, 44, 44, 46, 45, 44, 47, 46, 48, 60, 49,\n 48, 59, 60, 49, 61, 50, 49, 60, 61, 50, 62, 51, 50, 61, 62, 51, 62, 52, 52, 63, 53, 52, 62, 63, 53, 64, 54, 53, 63, 64, 54, 64, 55, 55, 65, 56, 55, 64, 65, 56,\n 66, 57, 56, 65, 66, 57, 66, 58, 58, 67, 59, 58, 66, 67, 59, 67, 60, 60, 67, 61, 61, 66, 62, 61, 67, 66, 62, 66, 63, 63, 65, 64, 63, 66, 65, 21, 27, 22];\n\nexport const TRI33: number[] = [\n /* eyes */ 0, 8, 7, 7, 8, 1, 2, 10, 9, 9, 10, 3,\n /* brows */ 17, 0, 18, 18, 0, 7, 18, 7, 19, 19, 7, 1, 19, 1, 11, 19, 11, 20, 21, 3, 22, 21, 9, 3, 20, 9, 21, 20, 2, 9, 20, 11, 2,\n /* 4head */ 23, 17, 18, 25, 21, 22, 24, 19, 20, 24, 18, 19, 24, 20, 21, 24, 23, 18, 24, 21, 25,\n /* nose */ 11, 12, 4, 11, 4, 13, 1, 12, 11, 11, 13, 2, 12, 14, 4, 4, 14, 13,\n /* up-lip */ 14, 5, 15, 14, 15, 6, 12, 5, 14, 14, 6, 13,\n /* cheeks */ 8, 12, 1, 2, 13, 10, 8, 26, 12, 10, 13, 27, 26, 5, 12, 13, 6, 27, 0, 26, 8, 10, 27, 3,\n /* chin */ 5, 32, 16, 16, 32, 6, 5, 30, 32, 6, 32, 31,\n /* cont */ 26, 30, 5, 27, 6, 31, 0, 28, 26, 3, 27, 29, 17, 28, 0, 3, 29, 22, 23, 28, 17, 22, 29, 25, 28, 30, 26, 27, 31, 29,\n];\n\nexport const TRI7: number[] = [0, 4, 1, 2, 4, 3, 4, 5, 6];\n\nexport const VTX68: number[] = [\n /* cont */ 127, 234, 132, 58, 172, 150, 149, 148, 152, 377, 378, 379, 397, 288, 361, 454, 356,\n /* brows */ 70, 63, 105, 66, 107, 336, 296, 334, 293, 300,\n /* nose */ 168, 6, 195, 4, 98, 97, 2, 326, 327,\n /* eyes */ 33, 160, 158, 133, 153, 144, 362, 385, 387, 263, 373, 380,\n /* lip */ 57, 40, 37, 0, 267, 270, 287, 321, 314, 17, 84, 91,\n /* mouth */ 78, 81, 13, 311, 308, 402, 14, 178,\n];\n\nexport const VTX33: number[] = [33, 133, 362, 263, 1, 62, 308, 159, 145, 386, 374, 6, 102, 331, 2, 13, 14, 70, 105, 107, 336, 334, 300, 54, 10, 284, 50, 280, 234, 454, 58, 288, 152];\n\nexport const VTX7: number[] = [33, 133, 362, 263, 1, 78, 308];\n\nexport const UV68 = VTX68.map((x) => UV468[x]);\n\nexport const UV33 = VTX33.map((x) => UV468[x]);\n\nexport const UV7 = VTX7.map((x) => UV468[x]);\n\n// https://github.com/tensorflow/tfjs-models/blob/master/face-landmarks-detection/src/constants.ts\n// https://github.com/google/mediapipe/mediapipe/python/solutions/face_mesh_connections.py\n\ntype PairArray = [number, number][];\n\nfunction connectionsToIndices(connections: PairArray) {\n const indices = connections.map((connection) => connection[0]);\n indices.push(connections[connections.length - 1][1]);\n return indices;\n}\n\nexport const pairsLips: PairArray = [\n [61, 146], [146, 91], [91, 181], [181, 84], [84, 17], [17, 314], [314, 405], [405, 321], [321, 375], [375, 291], [61, 185], [185, 40], [40, 39], [39, 37], [37, 0], [0, 267], [267, 269], [269, 270], [270, 409], [409, 291],\n [78, 95], [95, 88], [88, 178], [178, 87], [87, 14], [14, 317], [317, 402], [402, 318], [318, 324], [324, 308], [78, 191], [191, 80], [80, 81], [81, 82], [82, 13], [13, 312], [312, 311], [311, 310], [310, 415], [415, 308],\n];\n\nexport const pairsLeftEye: PairArray = [[263, 249], [249, 390], [390, 373], [373, 374], [374, 380], [380, 381], [381, 382], [382, 362], [263, 466], [466, 388], [388, 387], [387, 386], [386, 385], [385, 384], [384, 398], [398, 362]];\n\nexport const pairsLeftEyebrow: PairArray = [[276, 283], [283, 282], [282, 295], [295, 285], [300, 293], [293, 334], [334, 296], [296, 336]];\n\nexport const pairsLeftIris: PairArray = [[474, 475], [475, 476], [476, 477], [477, 474]];\n\nexport const pairsRightEye: PairArray = [[33, 7], [7, 163], [163, 144], [144, 145], [145, 153], [153, 154], [154, 155], [155, 133], [33, 246], [246, 161], [161, 160], [160, 159], [159, 158], [158, 157], [157, 173], [173, 133]];\n\nexport const pairsRightEyebrow: PairArray = [[46, 53], [53, 52], [52, 65], [65, 55], [70, 63], [63, 105], [105, 66], [66, 107]];\n\nexport const pairsRightIris: PairArray = [[469, 470], [470, 471], [471, 472], [472, 469]];\n\nexport const pairsFaceContour: PairArray = [\n [10, 338], [338, 297], [297, 332], [332, 284], [284, 251], [251, 389],\n [389, 356], [356, 454], [454, 323], [323, 361], [361, 288], [288, 397],\n [397, 365], [365, 379], [379, 378], [378, 400], [400, 377], [377, 152],\n [152, 148], [148, 176], [176, 149], [149, 150], [150, 136], [136, 172],\n [172, 58], [58, 132], [132, 93], [93, 234], [234, 127], [127, 162],\n [162, 21], [21, 54], [54, 103], [103, 67], [67, 109], [109, 10],\n];\n\nexport const contourKeypoints = {\n lips: connectionsToIndices(pairsLips),\n leftEye: connectionsToIndices(pairsLeftEye),\n leftEyebrow: connectionsToIndices(pairsLeftEyebrow),\n leftIris: connectionsToIndices(pairsLeftIris),\n rightEye: connectionsToIndices(pairsRightEye),\n rightEyebrow: connectionsToIndices(pairsRightEyebrow),\n rightIris: connectionsToIndices(pairsRightIris),\n faceOval: connectionsToIndices(pairsFaceContour),\n};\n\nexport const pairsFaceMesh: PairArray = [\n [127, 34], [34, 139], [139, 127], [11, 0], [0, 37], [37, 11],\n [232, 231], [231, 120], [120, 232], [72, 37], [37, 39], [39, 72],\n [128, 121], [121, 47], [47, 128], [232, 121], [121, 128], [128, 232],\n [104, 69], [69, 67], [67, 104], [175, 171], [171, 148], [148, 175],\n [118, 50], [50, 101], [101, 118], [73, 39], [39, 40], [40, 73],\n [9, 151], [151, 108], [108, 9], [48, 115], [115, 131], [131, 48],\n [194, 204], [204, 211], [211, 194], [74, 40], [40, 185], [185, 74],\n [80, 42], [42, 183], [183, 80], [40, 92], [92, 186], [186, 40],\n [230, 229], [229, 118], [118, 230], [202, 212], [212, 214], [214, 202],\n [83, 18], [18, 17], [17, 83], [76, 61], [61, 146], [146, 76],\n [160, 29], [29, 30], [30, 160], [56, 157], [157, 173], [173, 56],\n [106, 204], [204, 194], [194, 106], [135, 214], [214, 192], [192, 135],\n [203, 165], [165, 98], [98, 203], [21, 71], [71, 68], [68, 21],\n [51, 45], [45, 4], [4, 51], [144, 24], [24, 23], [23, 144],\n [77, 146], [146, 91], [91, 77], [205, 50], [50, 187], [187, 205],\n [201, 200], [200, 18], [18, 201], [91, 106], [106, 182], [182, 91],\n [90, 91], [91, 181], [181, 90], [85, 84], [84, 17], [17, 85],\n [206, 203], [203, 36], [36, 206], [148, 171], [171, 140], [140, 148],\n [92, 40], [40, 39], [39, 92], [193, 189], [189, 244], [244, 193],\n [159, 158], [158, 28], [28, 159], [247, 246], [246, 161], [161, 247],\n [236, 3], [3, 196], [196, 236], [54, 68], [68, 104], [104, 54],\n [193, 168], [168, 8], [8, 193], [117, 228], [228, 31], [31, 117],\n [189, 193], [193, 55], [55, 189], [98, 97], [97, 99], [99, 98],\n [126, 47], [47, 100], [100, 126], [166, 79], [79, 218], [218, 166],\n [155, 154], [154, 26], [26, 155], [209, 49], [49, 131], [131, 209],\n [135, 136], [136, 150], [150, 135], [47, 126], [126, 217], [217, 47],\n [223, 52], [52, 53], [53, 223], [45, 51], [51, 134], [134, 45],\n [211, 170], [170, 140], [140, 211], [67, 69], [69, 108], [108, 67],\n [43, 106], [106, 91], [91, 43], [230, 119], [119, 120], [120, 230],\n [226, 130], [130, 247], [247, 226], [63, 53], [53, 52], [52, 63],\n [238, 20], [20, 242], [242, 238], [46, 70], [70, 156], [156, 46],\n [78, 62], [62, 96], [96, 78], [46, 53], [53, 63], [63, 46],\n [143, 34], [34, 227], [227, 143], [123, 117], [117, 111], [111, 123],\n [44, 125], [125, 19], [19, 44], [236, 134], [134, 51], [51, 236],\n [216, 206], [206, 205], [205, 216], [154, 153], [153, 22], [22, 154],\n [39, 37], [37, 167], [167, 39], [200, 201], [201, 208], [208, 200],\n [36, 142], [142, 100], [100, 36], [57, 212], [212, 202], [202, 57],\n [20, 60], [60, 99], [99, 20], [28, 158], [158, 157], [157, 28],\n [35, 226], [226, 113], [113, 35], [160, 159], [159, 27], [27, 160],\n [204, 202], [202, 210], [210, 204], [113, 225], [225, 46], [46, 113],\n [43, 202], [202, 204], [204, 43], [62, 76], [76, 77], [77, 62],\n [137, 123], [123, 116], [116, 137], [41, 38], [38, 72], [72, 41],\n [203, 129], [129, 142], [142, 203], [64, 98], [98, 240], [240, 64],\n [49, 102], [102, 64], [64, 49], [41, 73], [73, 74], [74, 41],\n [212, 216], [216, 207], [207, 212], [42, 74], [74, 184], [184, 42],\n [169, 170], [170, 211], [211, 169], [170, 149], [149, 176], [176, 170],\n [105, 66], [66, 69], [69, 105], [122, 6], [6, 168], [168, 122],\n [123, 147], [147, 187], [187, 123], [96, 77], [77, 90], [90, 96],\n [65, 55], [55, 107], [107, 65], [89, 90], [90, 180], [180, 89],\n [101, 100], [100, 120], [120, 101], [63, 105], [105, 104], [104, 63],\n [93, 137], [137, 227], [227, 93], [15, 86], [86, 85], [85, 15],\n [129, 102], [102, 49], [49, 129], [14, 87], [87, 86], [86, 14],\n [55, 8], [8, 9], [9, 55], [100, 47], [47, 121], [121, 100],\n [145, 23], [23, 22], [22, 145], [88, 89], [89, 179], [179, 88],\n [6, 122], [122, 196], [196, 6], [88, 95], [95, 96], [96, 88],\n [138, 172], [172, 136], [136, 138], [215, 58], [58, 172], [172, 215],\n [115, 48], [48, 219], [219, 115], [42, 80], [80, 81], [81, 42],\n [195, 3], [3, 51], [51, 195], [43, 146], [146, 61], [61, 43],\n [171, 175], [175, 199], [199, 171], [81, 82], [82, 38], [38, 81],\n [53, 46], [46, 225], [225, 53], [144, 163], [163, 110], [110, 144],\n [52, 65], [65, 66], [66, 52], [229, 228], [228, 117], [117, 229],\n [34, 127], [127, 234], [234, 34], [107, 108], [108, 69], [69, 107],\n [109, 108], [108, 151], [151, 109], [48, 64], [64, 235], [235, 48],\n [62, 78], [78, 191], [191, 62], [129, 209], [209, 126], [126, 129],\n [111, 35], [35, 143], [143, 111], [117, 123], [123, 50], [50, 117],\n [222, 65], [65, 52], [52, 222], [19, 125], [125, 141], [141, 19],\n [221, 55], [55, 65], [65, 221], [3, 195], [195, 197], [197, 3],\n [25, 7], [7, 33], [33, 25], [220, 237], [237, 44], [44, 220],\n [70, 71], [71, 139], [139, 70], [122, 193], [193, 245], [245, 122],\n [247, 130], [130, 33], [33, 247], [71, 21], [21, 162], [162, 71],\n [170, 169], [169, 150], [150, 170], [188, 174], [174, 196], [196, 188],\n [216, 186], [186, 92], [92, 216], [2, 97], [97, 167], [167, 2],\n [141, 125], [125, 241], [241, 141], [164, 167], [167, 37], [37, 164],\n [72, 38], [38, 12], [12, 72], [38, 82], [82, 13], [13, 38],\n [63, 68], [68, 71], [71, 63], [226, 35], [35, 111], [111, 226],\n [101, 50], [50, 205], [205, 101], [206, 92], [92, 165], [165, 206],\n [209, 198], [198, 217], [217, 209], [165, 167], [167, 97], [97, 165],\n [220, 115], [115, 218], [218, 220], [133, 112], [112, 243], [243, 133],\n [239, 238], [238, 241], [241, 239], [214, 135], [135, 169], [169, 214],\n [190, 173], [173, 133], [133, 190], [171, 208], [208, 32], [32, 171],\n [125, 44], [44, 237], [237, 125], [86, 87], [87, 178], [178, 86],\n [85, 86], [86, 179], [179, 85], [84, 85], [85, 180], [180, 84],\n [83, 84], [84, 181], [181, 83], [201, 83], [83, 182], [182, 201],\n [137, 93], [93, 132], [132, 137], [76, 62], [62, 183], [183, 76],\n [61, 76], [76, 184], [184, 61], [57, 61], [61, 185], [185, 57],\n [212, 57], [57, 186], [186, 212], [214, 207], [207, 187], [187, 214],\n [34, 143], [143, 156], [156, 34], [79, 239], [239, 237], [237, 79],\n [123, 137], [137, 177], [177, 123], [44, 1], [1, 4], [4, 44],\n [201, 194], [194, 32], [32, 201], [64, 102], [102, 129], [129, 64],\n [213, 215], [215, 138], [138, 213], [59, 166], [166, 219], [219, 59],\n [242, 99], [99, 97], [97, 242], [2, 94], [94, 141], [141, 2],\n [75, 59], [59, 235], [235, 75], [24, 110], [110, 228], [228, 24],\n [25, 130], [130, 226], [226, 25], [23, 24], [24, 229], [229, 23],\n [22, 23], [23, 230], [230, 22], [26, 22], [22, 231], [231, 26],\n [112, 26], [26, 232], [232, 112], [189, 190], [190, 243], [243, 189],\n [221, 56], [56, 190], [190, 221], [28, 56], [56, 221], [221, 28],\n [27, 28], [28, 222], [222, 27], [29, 27], [27, 223], [223, 29],\n [30, 29], [29, 224], [224, 30], [247, 30], [30, 225], [225, 247],\n [238, 79], [79, 20], [20, 238], [166, 59], [59, 75], [75, 166],\n [60, 75], [75, 240], [240, 60], [147, 177], [177, 215], [215, 147],\n [20, 79], [79, 166], [166, 20], [187, 147], [147, 213], [213, 187],\n [112, 233], [233, 244], [244, 112], [233, 128], [128, 245], [245, 233],\n [128, 114], [114, 188], [188, 128], [114, 217], [217, 174], [174, 114],\n [131, 115], [115, 220], [220, 131], [217, 198], [198, 236], [236, 217],\n [198, 131], [131, 134], [134, 198], [177, 132], [132, 58], [58, 177],\n [143, 35], [35, 124], [124, 143], [110, 163], [163, 7], [7, 110],\n [228, 110], [110, 25], [25, 228], [356, 389], [389, 368], [368, 356],\n [11, 302], [302, 267], [267, 11], [452, 350], [350, 349], [349, 452],\n [302, 303], [303, 269], [269, 302], [357, 343], [343, 277], [277, 357],\n [452, 453], [453, 357], [357, 452], [333, 332], [332, 297], [297, 333],\n [175, 152], [152, 377], [377, 175], [347, 348], [348, 330], [330, 347],\n [303, 304], [304, 270], [270, 303], [9, 336], [336, 337], [337, 9],\n [278, 279], [279, 360], [360, 278], [418, 262], [262, 431], [431, 418],\n [304, 408], [408, 409], [409, 304], [310, 415], [415, 407], [407, 310],\n [270, 409], [409, 410], [410, 270], [450, 348], [348, 347], [347, 450],\n [422, 430], [430, 434], [434, 422], [313, 314], [314, 17], [17, 313],\n [306, 307], [307, 375], [375, 306], [387, 388], [388, 260], [260, 387],\n [286, 414], [414, 398], [398, 286], [335, 406], [406, 418], [418, 335],\n [364, 367], [367, 416], [416, 364], [423, 358], [358, 327], [327, 423],\n [251, 284], [284, 298], [298, 251], [281, 5], [5, 4], [4, 281],\n [373, 374], [374, 253], [253, 373], [307, 320], [320, 321], [321, 307],\n [425, 427], [427, 411], [411, 425], [421, 313], [313, 18], [18, 421],\n [321, 405], [405, 406], [406, 321], [320, 404], [404, 405], [405, 320],\n [315, 16], [16, 17], [17, 315], [426, 425], [425, 266], [266, 426],\n [377, 400], [400, 369], [369, 377], [322, 391], [391, 269], [269, 322],\n [417, 465], [465, 464], [464, 417], [386, 257], [257, 258], [258, 386],\n [466, 260], [260, 388], [388, 466], [456, 399], [399, 419], [419, 456],\n [284, 332], [332, 333], [333, 284], [417, 285], [285, 8], [8, 417],\n [346, 340], [340, 261], [261, 346], [413, 441], [441, 285], [285, 413],\n [327, 460], [460, 328], [328, 327], [355, 371], [371, 329], [329, 355],\n [392, 439], [439, 438], [438, 392], [382, 341], [341, 256], [256, 382],\n [429, 420], [420, 360], [360, 429], [364, 394], [394, 379], [379, 364],\n [277, 343], [343, 437], [437, 277], [443, 444], [444, 283], [283, 443],\n [275, 440], [440, 363], [363, 275], [431, 262], [262, 369], [369, 431],\n [297, 338], [338, 337], [337, 297], [273, 375], [375, 321], [321, 273],\n [450, 451], [451, 349], [349, 450], [446, 342], [342, 467], [467, 446],\n [293, 334], [334, 282], [282, 293], [458, 461], [461, 462], [462, 458],\n [276, 353], [353, 383], [383, 276], [308, 324], [324, 325], [325, 308],\n [276, 300], [300, 293], [293, 276], [372, 345], [345, 447], [447, 372],\n [352, 345], [345, 340], [340, 352], [274, 1], [1, 19], [19, 274],\n [456, 248], [248, 281], [281, 456], [436, 427], [427, 425], [425, 436],\n [381, 256], [256, 252], [252, 381], [269, 391], [391, 393], [393, 269],\n [200, 199], [199, 428], [428, 200], [266, 330], [330, 329], [329, 266],\n [287, 273], [273, 422], [422, 287], [250, 462], [462, 328], [328, 250],\n [258, 286], [286, 384], [384, 258], [265, 353], [353, 342], [342, 265],\n [387, 259], [259, 257], [257, 387], [424, 431], [431, 430], [430, 424],\n [342, 353], [353, 276], [276, 342], [273, 335], [335, 424], [424, 273],\n [292, 325], [325, 307], [307, 292], [366, 447], [447, 345], [345, 366],\n [271, 303], [303, 302], [302, 271], [423, 266], [266, 371], [371, 423],\n [294, 455], [455, 460], [460, 294], [279, 278], [278, 294], [294, 279],\n [271, 272], [272, 304], [304, 271], [432, 434], [434, 427], [427, 432],\n [272, 407], [407, 408], [408, 272], [394, 430], [430, 431], [431, 394],\n [395, 369], [369, 400], [400, 395], [334, 333], [333, 299], [299, 334],\n [351, 417], [417, 168], [168, 351], [352, 280], [280, 411], [411, 352],\n [325, 319], [319, 320], [320, 325], [295, 296], [296, 336], [336, 295],\n [319, 403], [403, 404], [404, 319], [330, 348], [348, 349], [349, 330],\n [293, 298], [298, 333], [333, 293], [323, 454], [454, 447], [447, 323],\n [15, 16], [16, 315], [315, 15], [358, 429], [429, 279], [279, 358],\n [14, 15], [15, 316], [316, 14], [285, 336], [336, 9], [9, 285],\n [329, 349], [349, 350], [350, 329], [374, 380], [380, 252], [252, 374],\n [318, 402], [402, 403], [403, 318], [6, 197], [197, 419], [419, 6],\n [318, 319], [319, 325], [325, 318], [367, 364], [364, 365], [365, 367],\n [435, 367], [367, 397], [397, 435], [344, 438], [438, 439], [439, 344],\n [272, 271], [271, 311], [311, 272], [195, 5], [5, 281], [281, 195],\n [273, 287], [287, 291], [291, 273], [396, 428], [428, 199], [199, 396],\n [311, 271], [271, 268], [268, 311], [283, 444], [444, 445], [445, 283],\n [373, 254], [254, 339], [339, 373], [282, 334], [334, 296], [296, 282],\n [449, 347], [347, 346], [346, 449], [264, 447], [447, 454], [454, 264],\n [336, 296], [296, 299], [299, 336], [338, 10], [10, 151], [151, 338],\n [278, 439], [439, 455], [455, 278], [292, 407], [407, 415], [415, 292],\n [358, 371], [371, 355], [355, 358], [340, 345], [345, 372], [372, 340],\n [346, 347], [347, 280], [280, 346], [442, 443], [443, 282], [282, 442],\n [19, 94], [94, 370], [370, 19], [441, 442], [442, 295], [295, 441],\n [248, 419], [419, 197], [197, 248], [263, 255], [255, 359], [359, 263],\n [440, 275], [275, 274], [274, 440], [300, 383], [383, 368], [368, 300],\n [351, 412], [412, 465], [465, 351], [263, 467], [467, 466], [466, 263],\n [301, 368], [368, 389], [389, 301], [395, 378], [378, 379], [379, 395],\n [412, 351], [351, 419], [419, 412], [436, 426], [426, 322], [322, 436],\n [2, 164], [164, 393], [393, 2], [370, 462], [462, 461], [461, 370],\n [164, 0], [0, 267], [267, 164], [302, 11], [11, 12], [12, 302],\n [268, 12], [12, 13], [13, 268], [293, 300], [300, 301], [301, 293],\n [446, 261], [261, 340], [340, 446], [330, 266], [266, 425], [425, 330],\n [426, 423], [423, 391], [391, 426], [429, 355], [355, 437], [437, 429],\n [391, 327], [327, 326], [326, 391], [440, 457], [457, 438], [438, 440],\n [341, 382], [382, 362], [362, 341], [459, 457], [457, 461], [461, 459],\n [434, 430], [430, 394], [394, 434], [414, 463], [463, 362], [362, 414],\n [396, 369], [369, 262], [262, 396], [354, 461], [461, 457], [457, 354],\n [316, 403], [403, 402], [402, 316], [315, 404], [404, 403], [403, 315],\n [314, 405], [405, 404], [404, 314], [313, 406], [406, 405], [405, 313],\n [421, 418], [418, 406], [406, 421], [366, 401], [401, 361], [361, 366],\n [306, 408], [408, 407], [407, 306], [291, 409], [409, 408], [408, 291],\n [287, 410], [410, 409], [409, 287], [432, 436], [436, 410], [410, 432],\n [434, 416], [416, 411], [411, 434], [264, 368], [368, 383], [383, 264],\n [309, 438], [438, 457], [457, 309], [352, 376], [376, 401], [401, 352],\n [274, 275], [275, 4], [4, 274], [421, 428], [428, 262], [262, 421],\n [294, 327], [327, 358], [358, 294], [433, 416], [416, 367], [367, 433],\n [289, 455], [455, 439], [439, 289], [462, 370], [370, 326], [326, 462],\n [2, 326], [326, 370], [370, 2], [305, 460], [460, 455], [455, 305],\n [254, 449], [449, 448], [448, 254], [255, 261], [261, 446], [446, 255],\n [253, 450], [450, 449], [449, 253], [252, 451], [451, 450], [450, 252],\n [256, 452], [452, 451], [451, 256], [341, 453], [453, 452], [452, 341],\n [413, 464], [464, 463], [463, 413], [441, 413], [413, 414], [414, 441],\n [258, 442], [442, 441], [441, 258], [257, 443], [443, 442], [442, 257],\n [259, 444], [444, 443], [443, 259], [260, 445], [445, 444], [444, 260],\n [467, 342], [342, 445], [445, 467], [459, 458], [458, 250], [250, 459],\n [289, 392], [392, 290], [290, 289], [290, 328], [328, 460], [460, 290],\n [376, 433], [433, 435], [435, 376], [250, 290], [290, 392], [392, 250],\n [411, 416], [416, 433], [433, 411], [341, 463], [463, 464], [464, 341],\n [453, 464], [464, 465], [465, 453], [357, 465], [465, 412], [412, 357],\n [343, 412], [412, 399], [399, 343], [360, 363], [363, 440], [440, 360],\n [437, 399], [399, 456], [456, 437], [420, 456], [456, 363], [363, 420],\n [401, 435], [435, 288], [288, 401], [372, 383], [383, 353], [353, 372],\n [339, 255], [255, 249], [249, 339], [448, 261], [261, 255], [255, 448],\n [133, 243], [243, 190], [190, 133], [133, 155], [155, 112], [112, 133],\n [33, 246], [246, 247], [247, 33], [33, 130], [130, 25], [25, 33],\n [398, 384], [384, 286], [286, 398], [362, 398], [398, 414], [414, 362],\n [362, 463], [463, 341], [341, 362], [263, 359], [359, 467], [467, 263],\n [263, 249], [249, 255], [255, 263], [466, 467], [467, 260], [260, 466],\n [75, 60], [60, 166], [166, 75], [238, 239], [239, 79], [79, 238],\n [162, 127], [127, 139], [139, 162], [72, 11], [11, 37], [37, 72],\n [121, 232], [232, 120], [120, 121], [73, 72], [72, 39], [39, 73],\n [114, 128], [128, 47], [47, 114], [233, 232], [232, 128], [128, 233],\n [103, 104], [104, 67], [67, 103], [152, 175], [175, 148], [148, 152],\n [119, 118], [118, 101], [101, 119], [74, 73], [73, 40], [40, 74],\n [107, 9], [9, 108], [108, 107], [49, 48], [48, 131], [131, 49],\n [32, 194], [194, 211], [211, 32], [184, 74], [74, 185], [185, 184],\n [191, 80], [80, 183], [183, 191], [185, 40], [40, 186], [186, 185],\n [119, 230], [230, 118], [118, 119], [210, 202], [202, 214], [214, 210],\n [84, 83], [83, 17], [17, 84], [77, 76], [76, 146], [146, 77],\n [161, 160], [160, 30], [30, 161], [190, 56], [56, 173], [173, 190],\n [182, 106], [106, 194], [194, 182], [138, 135], [135, 192], [192, 138],\n [129, 203], [203, 98], [98, 129], [54, 21], [21, 68], [68, 54],\n [5, 51], [51, 4], [4, 5], [145, 144], [144, 23], [23, 145],\n [90, 77], [77, 91], [91, 90], [207, 205], [205, 187], [187, 207],\n [83, 201], [201, 18], [18, 83], [181, 91], [91, 182], [182, 181],\n [180, 90], [90, 181], [181, 180], [16, 85], [85, 17], [17, 16],\n [205, 206], [206, 36], [36, 205], [176, 148], [148, 140], [140, 176],\n [165, 92], [92, 39], [39, 165], [245, 193], [193, 244], [244, 245],\n [27, 159], [159, 28], [28, 27], [30, 247], [247, 161], [161, 30],\n [174, 236], [236, 196], [196, 174], [103, 54], [54, 104], [104, 103],\n [55, 193], [193, 8], [8, 55], [111, 117], [117, 31], [31, 111],\n [221, 189], [189, 55], [55, 221], [240, 98], [98, 99], [99, 240],\n [142, 126], [126, 100], [100, 142], [219, 166], [166, 218], [218, 219],\n [112, 155], [155, 26], [26, 112], [198, 209], [209, 131], [131, 198],\n [169, 135], [135, 150], [150, 169], [114, 47], [47, 217], [217, 114],\n [224, 223], [223, 53], [53, 224], [220, 45], [45, 134], [134, 220],\n [32, 211], [211, 140], [140, 32], [109, 67], [67, 108], [108, 109],\n [146, 43], [43, 91], [91, 146], [231, 230], [230, 120], [120, 231],\n [113, 226], [226, 247], [247, 113], [105, 63], [63, 52], [52, 105],\n [241, 238], [238, 242], [242, 241], [124, 46], [46, 156], [156, 124],\n [95, 78], [78, 96], [96, 95], [70, 46], [46, 63], [63, 70],\n [116, 143], [143, 227], [227, 116], [116, 123], [123, 111], [111, 116],\n [1, 44], [44, 19], [19, 1], [3, 236], [236, 51], [51, 3],\n [207, 216], [216, 205], [205, 207], [26, 154], [154, 22], [22, 26],\n [165, 39], [39, 167], [167, 165], [199, 200], [200, 208], [208, 199],\n [101, 36], [36, 100], [100, 101], [43, 57], [57, 202], [202, 43],\n [242, 20], [20, 99], [99, 242], [56, 28], [28, 157], [157, 56],\n [124, 35], [35, 113], [113, 124], [29, 160], [160, 27], [27, 29],\n [211, 204], [204, 210], [210, 211], [124, 113], [113, 46], [46, 124],\n [106, 43], [43, 204], [204, 106], [96, 62], [62, 77], [77, 96],\n [227, 137], [137, 116], [116, 227], [73, 41], [41, 72], [72, 73],\n [36, 203], [203, 142], [142, 36], [235, 64], [64, 240], [240, 235],\n [48, 49], [49, 64], [64, 48], [42, 41], [41, 74], [74, 42],\n [214, 212], [212, 207], [207, 214], [183, 42], [42, 184], [184, 183],\n [210, 169], [169, 211], [211, 210], [140, 170], [170, 176], [176, 140],\n [104, 105], [105, 69], [69, 104], [193, 122], [122, 168], [168, 193],\n [50, 123], [123, 187], [187, 50], [89, 96], [96, 90], [90, 89],\n [66, 65], [65, 107], [107, 66], [179, 89], [89, 180], [180, 179],\n [119, 101], [101, 120], [120, 119], [68, 63], [63, 104], [104, 68],\n [234, 93], [93, 227], [227, 234], [16, 15], [15, 85], [85, 16],\n [209, 129], [129, 49], [49, 209], [15, 14], [14, 86], [86, 15],\n [107, 55], [55, 9], [9, 107], [120, 100], [100, 121], [121, 120],\n [153, 145], [145, 22], [22, 153], [178, 88], [88, 179], [179, 178],\n [197, 6], [6, 196], [196, 197], [89, 88], [88, 96], [96, 89],\n [135, 138], [138, 136], [136, 135], [138, 215], [215, 172], [172, 138],\n [218, 115], [115, 219], [219, 218], [41, 42], [42, 81], [81, 41],\n [5, 195], [195, 51], [51, 5], [57, 43], [43, 61], [61, 57],\n [208, 171], [171, 199], [199, 208], [41, 81], [81, 38], [38, 41],\n [224, 53], [53, 225], [225, 224], [24, 144], [144, 110], [110, 24],\n [105, 52], [52, 66], [66, 105], [118, 229], [229, 117], [117, 118],\n [227, 34], [34, 234], [234, 227], [66, 107], [107, 69], [69, 66],\n [10, 109], [109, 151], [151, 10], [219, 48], [48, 235], [235, 219],\n [183, 62], [62, 191], [191, 183], [142, 129], [129, 126], [126, 142],\n [116, 111], [111, 143], [143, 116], [118, 117], [117, 50], [50, 118],\n [223, 222], [222, 52], [52, 223], [94, 19], [19, 141], [141, 94],\n [222, 221], [221, 65], [65, 222], [196, 3], [3, 197], [197, 196],\n [45, 220], [220, 44], [44, 45], [156, 70], [70, 139], [139, 156],\n [188, 122], [122, 245], [245, 188], [139, 71], [71, 162], [162, 139],\n [149, 170], [170, 150], [150, 149], [122, 188], [188, 196], [196, 122],\n [206, 216], [216, 92], [92, 206], [164, 2], [2, 167], [167, 164],\n [242, 141], [141, 241], [241, 242], [0, 164], [164, 37], [37, 0],\n [11, 72], [72, 12], [12, 11], [12, 38], [38, 13], [13, 12],\n [70, 63], [63, 71], [71, 70], [31, 226], [226, 111], [111, 31],\n [36, 101], [101, 205], [205, 36], [203, 206], [206, 165], [165, 203],\n [126, 209], [209, 217], [217, 126], [98, 165], [165, 97], [97, 98],\n [237, 220], [220, 218], [218, 237], [237, 239], [239, 241], [241, 237],\n [210, 214], [214, 169], [169, 210], [140, 171], [171, 32], [32, 140],\n [241, 125], [125, 237], [237, 241], [179, 86], [86, 178], [178, 179],\n [180, 85], [85, 179], [179, 180], [181, 84], [84, 180], [180, 181],\n [182, 83], [83, 181], [181, 182], [194, 201], [201, 182], [182, 194],\n [177, 137], [137, 132], [132, 177], [184, 76], [76, 183], [183, 184],\n [185, 61], [61, 184], [184, 185], [186, 57], [57, 185], [185, 186],\n [216, 212], [212, 186], [186, 216], [192, 214], [214, 187], [187, 192],\n [139, 34], [34, 156], [156, 139], [218, 79], [79, 237], [237, 218],\n [147, 123], [123, 177], [177, 147], [45, 44], [44, 4], [4, 45],\n [208, 201], [201, 32], [32, 208], [98, 64], [64, 129], [129, 98],\n [192, 213], [213, 138], [138, 192], [235, 59], [59, 219], [219, 235],\n [141, 242], [242, 97], [97, 141], [97, 2], [2, 141], [141, 97],\n [240, 75], [75, 235], [235, 240], [229, 24], [24, 228], [228, 229],\n [31, 25], [25, 226], [226, 31], [230, 23], [23, 229], [229, 230],\n [231, 22], [22, 230], [230, 231], [232, 26], [26, 231], [231, 232],\n [233, 112], [112, 232], [232, 233], [244, 189], [189, 243], [243, 244],\n [189, 221], [221, 190], [190, 189], [222, 28], [28, 221], [221, 222],\n [223, 27], [27, 222], [222, 223], [224, 29], [29, 223], [223, 224],\n [225, 30], [30, 224], [224, 225], [113, 247], [247, 225], [225, 113],\n [99, 60], [60, 240], [240, 99], [213, 147], [147, 215], [215, 213],\n [60, 20], [20, 166], [166, 60], [192, 187], [187, 213], [213, 192],\n [243, 112], [112, 244], [244, 243], [244, 233], [233, 245], [245, 244],\n [245, 128], [128, 188], [188, 245], [188, 114], [114, 174], [174, 188],\n [134, 131], [131, 220], [220, 134], [174, 217], [217, 236], [236, 174],\n [236, 198], [198, 134], [134, 236], [215, 177], [177, 58], [58, 215],\n [156, 143], [143, 124], [124, 156], [25, 110], [110, 7], [7, 25],\n [31, 228], [228, 25], [25, 31], [264, 356], [356, 368], [368, 264],\n [0, 11], [11, 267], [267, 0], [451, 452], [452, 349], [349, 451],\n [267, 302], [302, 269], [269, 267], [350, 357], [357, 277], [277, 350],\n [350, 452], [452, 357], [357, 350], [299, 333], [333, 297], [297, 299],\n [396, 175], [175, 377], [377, 396], [280, 347], [347, 330], [330, 280],\n [269, 303], [303, 270], [270, 269], [151, 9], [9, 337], [337, 151],\n [344, 278], [278, 360], [360, 344], [424, 418], [418, 431], [431, 424],\n [270, 304], [304, 409], [409, 270], [272, 310], [310, 407], [407, 272],\n [322, 270], [270, 410], [410, 322], [449, 450], [450, 347], [347, 449],\n [432, 422], [422, 434], [434, 432], [18, 313], [313, 17], [17, 18],\n [291, 306], [306, 375], [375, 291], [259, 387], [387, 260], [260, 259],\n [424, 335], [335, 418], [418, 424], [434, 364], [364, 416], [416, 434],\n [391, 423], [423, 327], [327, 391], [301, 251], [251, 298], [298, 301],\n [275, 281], [281, 4], [4, 275], [254, 373], [373, 253], [253, 254],\n [375, 307], [307, 321], [321, 375], [280, 425], [425, 411], [411, 280],\n [200, 421], [421, 18], [18, 200], [335, 321], [321, 406], [406, 335],\n [321, 320], [320, 405], [405, 321], [314, 315], [315, 17], [17, 314],\n [423, 426], [426, 266], [266, 423], [396, 377], [377, 369], [369, 396],\n [270, 322], [322, 269], [269, 270], [413, 417], [417, 464], [464, 413],\n [385, 386], [386, 258], [258, 385], [248, 456], [456, 419], [419, 248],\n [298, 284], [284, 333], [333, 298], [168, 417], [417, 8], [8, 168],\n [448, 346], [346, 261], [261, 448], [417, 413], [413, 285], [285, 417],\n [326, 327], [327, 328], [328, 326], [277, 355], [355, 329], [329, 277],\n [309, 392], [392, 438], [438, 309], [381, 382], [382, 256], [256, 381],\n [279, 429], [429, 360], [360, 279], [365, 364], [364, 379], [379, 365],\n [355, 277], [277, 437], [437, 355], [282, 443], [443, 283], [283, 282],\n [281, 275], [275, 363], [363, 281], [395, 431], [431, 369], [369, 395],\n [299, 297], [297, 337], [337, 299], [335, 273], [273, 321], [321, 335],\n [348, 450], [450, 349], [349, 348], [359, 446], [446, 467], [467, 359],\n [283, 293], [293, 282], [282, 283], [250, 458], [458, 462], [462, 250],\n [300, 276], [276, 383], [383, 300], [292, 308], [308, 325], [325, 292],\n [283, 276], [276, 293], [293, 283], [264, 372], [372, 447], [447, 264],\n [346, 352], [352, 340], [340, 346], [354, 274], [274, 19], [19, 354],\n [363, 456], [456, 281], [281, 363], [426, 436], [436, 425], [425, 426],\n [380, 381], [381, 252], [252, 380], [267, 269], [269, 393], [393, 267],\n [421, 200], [200, 428], [428, 421], [371, 266], [266, 329], [329, 371],\n [432, 287], [287, 422], [422, 432], [290, 250], [250, 328], [328, 290],\n [385, 258], [258, 384], [384, 385], [446, 265], [265, 342], [342, 446],\n [386, 387], [387, 257], [257, 386], [422, 424], [424, 430], [430, 422],\n [445, 342], [342, 276], [276, 445], [422, 273], [273, 424], [424, 422],\n [306, 292], [292, 307], [307, 306], [352, 366], [366, 345], [345, 352],\n [268, 271], [271, 302], [302, 268], [358, 423], [423, 371], [371, 358],\n [327, 294], [294, 460], [460, 327], [331, 279], [279, 294], [294, 331],\n [303, 271], [271, 304], [304, 303], [436, 432], [432, 427], [427, 436],\n [304, 272], [272, 408], [408, 304], [395, 394], [394, 431], [431, 395],\n [378, 395], [395, 400], [400, 378], [296, 334], [334, 299], [299, 296],\n [6, 351], [351, 168], [168, 6], [376, 352], [352, 411], [411, 376],\n [307, 325], [325, 320], [320, 307], [285, 295], [295, 336], [336, 285],\n [320, 319], [319, 404], [404, 320], [329, 330], [330, 349], [349, 329],\n [334, 293], [293, 333], [333, 334], [366, 323], [323, 447], [447, 366],\n [316, 15], [15, 315], [315, 316], [331, 358], [358, 279], [279, 331],\n [317, 14], [14, 316], [316, 317], [8, 285], [285, 9], [9, 8],\n [277, 329], [329, 350], [350, 277], [253, 374], [374, 252], [252, 253],\n [319, 318], [318, 403], [403, 319], [351, 6], [6, 419], [419, 351],\n [324, 318], [318, 325], [325, 324], [397, 367], [367, 365], [365, 397],\n [288, 435], [435, 397], [397, 288], [278, 344], [344, 439], [439, 278],\n [310, 272], [272, 311], [311, 310], [248, 195], [195, 281], [281, 248],\n [375, 273], [273, 291], [291, 375], [175, 396], [396, 199], [199, 175],\n [312, 311], [311, 268], [268, 312], [276, 283], [283, 445], [445, 276],\n [390, 373], [373, 339], [339, 390], [295, 282], [282, 296], [296, 295],\n [448, 449], [449, 346], [346, 448], [356, 264], [264, 454], [454, 356],\n [337, 336], [336, 299], [299, 337], [337, 338], [338, 151], [151, 337],\n [294, 278], [278, 455], [455, 294], [308, 292], [292, 415], [415, 308],\n [429, 358], [358, 355], [355, 429], [265, 340], [340, 372], [372, 265],\n [352, 346], [346, 280], [280, 352], [295, 442], [442, 282], [282, 295],\n [354, 19], [19, 370], [370, 354], [285, 441], [441, 295], [295, 285],\n [195, 248], [248, 197], [197, 195], [457, 440], [440, 274], [274, 457],\n [301, 300], [300, 368], [368, 301], [417, 351], [351, 465], [465, 417],\n [251, 301], [301, 389], [389, 251], [394, 395], [395, 379], [379, 394],\n [399, 412], [412, 419], [419, 399], [410, 436], [436, 322], [322, 410],\n [326, 2], [2, 393], [393, 326], [354, 370], [370, 461], [461, 354],\n [393, 164], [164, 267], [267, 393], [268, 302], [302, 12], [12, 268],\n [312, 268], [268, 13], [13, 312], [298, 293], [293, 301], [301, 298],\n [265, 446], [446, 340], [340, 265], [280, 330], [330, 425], [425, 280],\n [322, 426], [426, 391], [391, 322], [420, 429], [429, 437], [437, 420],\n [393, 391], [391, 326], [326, 393], [344, 440], [440, 438], [438, 344],\n [458, 459], [459, 461], [461, 458], [364, 434], [434, 394], [394, 364],\n [428, 396], [396, 262], [262, 428], [274, 354], [354, 457], [457, 274],\n [317, 316], [316, 402], [402, 317], [316, 315], [315, 403], [403, 316],\n [315, 314], [314, 404], [404, 315], [314, 313], [313, 405], [405, 314],\n [313, 421], [421, 406], [406, 313], [323, 366], [366, 361], [361, 323],\n [292, 306], [306, 407], [407, 292], [306, 291], [291, 408], [408, 306],\n [291, 287], [287, 409], [409, 291], [287, 432], [432, 410], [410, 287],\n [427, 434], [434, 411], [411, 427], [372, 264], [264, 383], [383, 372],\n [459, 309], [309, 457], [457, 459], [366, 352], [352, 401], [401, 366],\n [1, 274], [274, 4], [4, 1], [418, 421], [421, 262], [262, 418],\n [331, 294], [294, 358], [358, 331], [435, 433], [433, 367], [367, 435],\n [392, 289], [289, 439], [439, 392], [328, 462], [462, 326], [326, 328],\n [94, 2], [2, 370], [370, 94], [289, 305], [305, 455], [455, 289],\n [339, 254], [254, 448], [448, 339], [359, 255], [255, 446], [446, 359],\n [254, 253], [253, 449], [449, 254], [253, 252], [252, 450], [450, 253],\n [252, 256], [256, 451], [451, 252], [256, 341], [341, 452], [452, 256],\n [414, 413], [413, 463], [463, 414], [286, 441], [441, 414], [414, 286],\n [286, 258], [258, 441], [441, 286], [258, 257], [257, 442], [442, 258],\n [257, 259], [259, 443], [443, 257], [259, 260], [260, 444], [444, 259],\n [260, 467], [467, 445], [445, 260], [309, 459], [459, 250], [250, 309],\n [305, 289], [289, 290], [290, 305], [305, 290], [290, 460], [460, 305],\n [401, 376], [376, 435], [435, 401], [309, 250], [250, 392], [392, 309],\n [376, 411], [411, 433], [433, 376], [453, 341], [341, 464], [464, 453],\n [357, 453], [453, 465], [465, 357], [343, 357], [357, 412], [412, 343],\n [437, 343], [343, 399], [399, 437], [344, 360], [360, 440], [440, 344],\n [420, 437], [437, 456], [456, 420], [360, 420], [420, 363], [363, 360],\n [361, 401], [401, 288], [288, 361], [265, 372], [372, 353], [353, 265],\n [390, 339], [339, 249], [249, 390], [339, 448], [448, 255], [255, 339],\n];\n", "import * as tf from '../../dist/tfjs.esm.js';\nimport type { Tensor } from './types';\n\nexport const constants: Record = {\n tf255: 255.0,\n tf1: 1.0,\n tf2: 2.0,\n tf05: 0.5,\n tf127: 127.5,\n rgb: [0.2989, 0.5870, 0.1140],\n};\n\nexport function init() {\n constants.tf255 = tf.scalar(255.0, 'float32');\n constants.tf1 = tf.scalar(1.0, 'float32');\n constants.tf2 = tf.scalar(2.0, 'float32');\n constants.tf05 = tf.scalar(0.5, 'float32');\n constants.tf127 = tf.scalar(127.5, 'float32');\n constants.rgb = tf.tensor1d([0.2989, 0.5870, 0.1140], 'float32'); // factors for red/green/blue colors when converting to grayscale\n}\n", "/**\n * BlazeFace, FaceMesh & Iris model implementation\n * See `facemesh.ts` for entry point\n */\n\nimport * as tf from '../../dist/tfjs.esm.js';\nimport * as coords from './facemeshcoords';\nimport { constants } from '../tfjs/constants';\nimport type { Box, Point } from '../result';\nimport { env } from '../util/env';\n\nexport const createBox = (startEndTensor) => ({ startPoint: tf.slice(startEndTensor, [0, 0], [-1, 2]), endPoint: tf.slice(startEndTensor, [0, 2], [-1, 2]) });\n\nexport const disposeBox = (t) => tf.dispose([t.startPoint, t.endPoint]);\n\nexport const getBoxSize = (box): [number, number] => [Math.abs(box.endPoint[0] - box.startPoint[0]), Math.abs(box.endPoint[1] - box.startPoint[1])];\n\nexport const getBoxCenter = (box): [number, number, number] => [box.startPoint[0] + (box.endPoint[0] - box.startPoint[0]) / 2, box.startPoint[1] + (box.endPoint[1] - box.startPoint[1]) / 2, 1];\n\nexport const clampBox = (box, input): Box => (box ? [\n Math.trunc(Math.max(0, box.startPoint[0])),\n Math.trunc(Math.max(0, box.startPoint[1])),\n Math.trunc(Math.min((input.shape[2] || 0), box.endPoint[0]) - Math.max(0, box.startPoint[0])),\n Math.trunc(Math.min((input.shape[1] || 0), box.endPoint[1]) - Math.max(0, box.startPoint[1])),\n] : [0, 0, 0, 0]);\n\nexport const getRawBox = (box, input): Box => (box ? [\n box.startPoint[0] / (input.shape[2] || 0),\n box.startPoint[1] / (input.shape[1] || 0),\n (box.endPoint[0] - box.startPoint[0]) / (input.shape[2] || 0),\n (box.endPoint[1] - box.startPoint[1]) / (input.shape[1] || 0),\n] : [0, 0, 0, 0]);\n\nexport const scaleBoxCoordinates = (box, factor) => {\n const startPoint: Point = [box.startPoint[0] * factor[0], box.startPoint[1] * factor[1]];\n const endPoint: Point = [box.endPoint[0] * factor[0], box.endPoint[1] * factor[1]];\n return { startPoint, endPoint, landmarks: box.landmarks, confidence: box.confidence };\n};\n\nexport const cutAndResize = (box, image, cropSize) => {\n const h = image.shape[1];\n const w = image.shape[2];\n const cutBox = [box.startPoint[1] / h, box.startPoint[0] / w, box.endPoint[1] / h, box.endPoint[0] / w];\n const crop = tf.image.cropAndResize(image, [cutBox], [0], cropSize);\n const norm = tf.div(crop, constants.tf255);\n tf.dispose(crop);\n return norm;\n};\n\nexport const enlargeBox = (box, factor) => {\n const center = getBoxCenter(box);\n const size = getBoxSize(box);\n const halfSize: [number, number] = [factor * size[0] / 2, factor * size[1] / 2];\n return { startPoint: [center[0] - halfSize[0], center[1] - halfSize[1]] as Point, endPoint: [center[0] + halfSize[0], center[1] + halfSize[1]] as Point, landmarks: box.landmarks, confidence: box.confidence };\n};\n\nexport const squarifyBox = (box) => {\n const centers = getBoxCenter(box);\n const size = getBoxSize(box);\n const halfSize = Math.max(...size) / 2;\n return { startPoint: [Math.round(centers[0] - halfSize), Math.round(centers[1] - halfSize)] as Point, endPoint: [Math.round(centers[0] + halfSize), Math.round(centers[1] + halfSize)] as Point, landmarks: box.landmarks, confidence: box.confidence };\n};\n\nexport const calculateLandmarksBoundingBox = (landmarks) => {\n const x = landmarks.map((d) => d[0]);\n const y = landmarks.map((d) => d[1]);\n return { startPoint: [Math.min(...x), Math.min(...y)] as Point, endPoint: [Math.max(...x), Math.max(...y)] as Point, landmarks };\n};\n\nexport const fixedRotationMatrix = [[1, 0, 0], [0, 1, 0], [0, 0, 1]];\n\nexport const normalizeRadians = (angle: number) => angle - 2 * Math.PI * Math.floor((angle + Math.PI) / (2 * Math.PI));\n\nexport const computeRotation = (point1, point2) => normalizeRadians(Math.PI / 2 - Math.atan2(-(point2[1] - point1[1]), point2[0] - point1[0]));\n\nexport const radToDegrees = (rad) => rad * 180 / Math.PI;\n\nexport const buildTranslationMatrix = (x, y) => [[1, 0, x], [0, 1, y], [0, 0, 1]];\n\nexport const dot = (v1: number[], v2: number[]) => {\n let product = 0;\n for (let i = 0; i < v1.length; i++) product += v1[i] * v2[i];\n return product;\n};\n\nexport const getColumnFrom2DArr = (arr, columnIndex) => {\n const column: number[] = [];\n for (let i = 0; i < arr.length; i++) column.push(arr[i][columnIndex]);\n return column;\n};\n\nexport const multiplyTransformMatrices = (mat1, mat2) => {\n const product: number[][] = [];\n const size = mat1.length;\n for (let row = 0; row < size; row++) {\n product.push([]);\n for (let col = 0; col < size; col++) product[row].push(dot(mat1[row], getColumnFrom2DArr(mat2, col)));\n }\n return product;\n};\n\nexport const buildRotationMatrix = (rotation, center) => {\n const cosA = Math.cos(rotation);\n const sinA = Math.sin(rotation);\n const rotationMatrix = [[cosA, -sinA, 0], [sinA, cosA, 0], [0, 0, 1]];\n const translationMatrix = buildTranslationMatrix(center[0], center[1]);\n const translationTimesRotation = multiplyTransformMatrices(translationMatrix, rotationMatrix);\n const negativeTranslationMatrix = buildTranslationMatrix(-center[0], -center[1]);\n return multiplyTransformMatrices(translationTimesRotation, negativeTranslationMatrix);\n};\n\nexport const invertTransformMatrix = (matrix) => {\n const rotationComponent = [[matrix[0][0], matrix[1][0]], [matrix[0][1], matrix[1][1]]];\n const translationComponent = [matrix[0][2], matrix[1][2]];\n const invertedTranslation = [-dot(rotationComponent[0], translationComponent), -dot(rotationComponent[1], translationComponent)];\n return [rotationComponent[0].concat(invertedTranslation[0]), rotationComponent[1].concat(invertedTranslation[1]), [0, 0, 1]];\n};\n\nexport const rotatePoint = (homogeneousCoordinate, rotationMatrix) => [dot(homogeneousCoordinate, rotationMatrix[0]), dot(homogeneousCoordinate, rotationMatrix[1])];\n\nexport const xyDistanceBetweenPoints = (a, b) => Math.sqrt(((a[0] - b[0]) ** 2) + ((a[1] - b[1]) ** 2));\n\nexport function generateAnchors(inputSize: number) {\n const spec = inputSize === 192\n ? { strides: [4], anchors: [1] } // facemesh-detector\n : { strides: [inputSize / 16, inputSize / 8], anchors: [2, 6] }; // blazeface\n const anchors: [number, number][] = [];\n for (let i = 0; i < spec.strides.length; i++) {\n const stride = spec.strides[i];\n const gridRows = Math.floor((inputSize + stride - 1) / stride);\n const gridCols = Math.floor((inputSize + stride - 1) / stride);\n const anchorsNum = spec.anchors[i];\n for (let gridY = 0; gridY < gridRows; gridY++) {\n const anchorY = stride * (gridY + 0.5);\n for (let gridX = 0; gridX < gridCols; gridX++) {\n const anchorX = stride * (gridX + 0.5);\n for (let n = 0; n < anchorsNum; n++) anchors.push([anchorX, anchorY]);\n }\n }\n }\n return anchors;\n}\n\nexport function transformRawCoords(coordsRaw, box, angle, rotationMatrix, inputSize) {\n const boxSize = getBoxSize(box);\n const coordsScaled = coordsRaw.map((coord) => ([ // scaled around zero-point\n (boxSize[0] / inputSize) * (coord[0] - (inputSize / 2)),\n (boxSize[1] / inputSize) * (coord[1] - (inputSize / 2)),\n (coord[2] || 0),\n ]));\n const largeAngle = angle && (angle !== 0) && (Math.abs(angle) > 0.2);\n const coordsRotationMatrix = largeAngle ? buildRotationMatrix(angle, [0, 0]) : fixedRotationMatrix;\n const coordsRotated = largeAngle ? coordsScaled.map((coord) => ([...rotatePoint(coord, coordsRotationMatrix), coord[2]])) : coordsScaled;\n const inverseRotationMatrix = largeAngle ? invertTransformMatrix(rotationMatrix) : fixedRotationMatrix;\n const boxCenter = getBoxCenter(box);\n const offsets = [dot(boxCenter, inverseRotationMatrix[0]), dot(boxCenter, inverseRotationMatrix[1])];\n return coordsRotated.map((coord) => ([\n Math.trunc(coord[0] + offsets[0]),\n Math.trunc(coord[1] + offsets[1]),\n Math.trunc(coord[2] || 0),\n ]));\n}\n\nexport function correctFaceRotation(rotate, box, input, inputSize) {\n const symmetryLine = (box.landmarks.length >= coords.meshLandmarks.count)\n ? coords.meshLandmarks.symmetryLine\n : coords.blazeFaceLandmarks.symmetryLine;\n let angle = 0; // default\n let rotationMatrix = fixedRotationMatrix; // default\n let face; // default\n\n if (rotate && env.kernels.includes('rotatewithoffset')) {\n angle = computeRotation(box.landmarks[symmetryLine[0]], box.landmarks[symmetryLine[1]]);\n const largeAngle = angle && (angle !== 0) && (Math.abs(angle) > 0.2);\n if (largeAngle) { // perform rotation only if angle is sufficiently high\n const center: Point = getBoxCenter(box);\n const centerRaw: Point = [center[0] / input.shape[2], center[1] / input.shape[1]];\n const rotated = tf.image.rotateWithOffset(input, angle, 0, centerRaw);\n rotationMatrix = buildRotationMatrix(-angle, center);\n face = cutAndResize(box, rotated, [inputSize, inputSize]);\n tf.dispose(rotated);\n } else {\n face = cutAndResize(box, input, [inputSize, inputSize]);\n }\n } else {\n face = cutAndResize(box, input, [inputSize, inputSize]);\n }\n return [angle, rotationMatrix, face];\n}\n\nexport const findFaceCenter = (mesh) => {\n const x = mesh.map((m) => m[0]);\n const y = mesh.map((m) => m[1]);\n // weighted center\n /*\n const sum = (arr: number[]) => arr.reduce((prev, curr) => prev + curr, 0);\n return [sum(x) / mesh.length, sum(y) / mesh.length];\n */\n // absolute center\n return [Math.min(...x) + (Math.max(...x) - Math.min(...x)) / 2, Math.min(...y) + (Math.max(...y) - Math.min(...y)) / 2];\n};\n\nexport const calculateFaceBox = (mesh, previousBox) => {\n const center = findFaceCenter(mesh);\n const boxSize = getBoxSize(previousBox);\n const calculatedBox = {\n startPoint: [center[0] - boxSize[0] / 2, center[1] - boxSize[1] / 2] as Point,\n endPoint: [center[0] + boxSize[0] / 2, center[1] + boxSize[1] / 2] as Point,\n };\n return calculatedBox;\n};\n", "/**\n * BlazeFace, FaceMesh & Iris model implementation\n * See `facemesh.ts` for entry point\n */\n\nimport { log } from '../util/util';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport * as util from './facemeshutil';\nimport { loadModel } from '../tfjs/load';\nimport { constants } from '../tfjs/constants';\nimport type { Config } from '../config';\nimport type { Tensor, GraphModel } from '../tfjs/types';\nimport { env } from '../util/env';\nimport type { Point } from '../result';\n\nconst keypointsCount = 6;\nconst faceBoxScaleFactor = 1.4;\nlet model: GraphModel | null;\nlet anchors: Tensor | null = null;\nlet inputSize = 0;\nlet inputSizeT: Tensor | null = null;\n\ninterface DetectBox { startPoint: Point, endPoint: Point, landmarks: Point[], confidence: number }\n\nexport const size = () => inputSize;\n\nexport async function load(config: Config): Promise {\n if (env.initial) model = null;\n if (!model) model = await loadModel(config.face.detector?.modelPath);\n else if (config.debug) log('cached model:', model['modelUrl']);\n inputSize = (model['executor'] && model.inputs[0].shape) ? model.inputs[0].shape[2] : 256;\n inputSizeT = tf.scalar(inputSize, 'int32') as Tensor;\n anchors = tf.tensor2d(util.generateAnchors(inputSize)) as Tensor;\n return model;\n}\n\nfunction decodeBoxes(boxOutputs: Tensor) {\n const t: Record = {};\n t.boxStarts = tf.slice(boxOutputs, [0, 1], [-1, 2]);\n t.centers = tf.add(t.boxStarts, anchors);\n t.boxSizes = tf.slice(boxOutputs, [0, 3], [-1, 2]);\n t.boxSizesNormalized = tf.div(t.boxSizes, inputSizeT);\n t.centersNormalized = tf.div(t.centers, inputSizeT);\n t.halfBoxSize = tf.div(t.boxSizesNormalized, constants.tf2);\n t.starts = tf.sub(t.centersNormalized, t.halfBoxSize);\n t.ends = tf.add(t.centersNormalized, t.halfBoxSize);\n t.startNormalized = tf.mul(t.starts, inputSizeT);\n t.endNormalized = tf.mul(t.ends, inputSizeT);\n const boxes = tf.concat2d([t.startNormalized, t.endNormalized], 1);\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n return boxes;\n}\n\nexport async function getBoxes(inputImage: Tensor, config: Config) {\n // sanity check on input\n if ((!inputImage) || (inputImage['isDisposedInternal']) || (inputImage.shape.length !== 4) || (inputImage.shape[1] < 1) || (inputImage.shape[2] < 1)) return [];\n const t: Record = {};\n t.resized = tf.image.resizeBilinear(inputImage, [inputSize, inputSize]);\n t.div = tf.div(t.resized, constants.tf127);\n t.normalized = tf.sub(t.div, constants.tf05);\n const res = model?.execute(t.normalized) as Tensor[];\n if (Array.isArray(res) && res.length > 2) { // pinto converted model?\n const sorted = res.sort((a, b) => a.size - b.size);\n t.concat384 = tf.concat([sorted[0], sorted[2]], 2); // dim: 384, 1 + 16\n t.concat512 = tf.concat([sorted[1], sorted[3]], 2); // dim: 512, 1 + 16\n t.concat = tf.concat([t.concat512, t.concat384], 1);\n t.batch = tf.squeeze(t.concat, 0);\n } else if (Array.isArray(res)) { // new facemesh-detection tfhub model\n t.batch = tf.squeeze(res[0]);\n } else { // original blazeface tfhub model\n t.batch = tf.squeeze(res);\n }\n tf.dispose(res);\n t.boxes = decodeBoxes(t.batch);\n t.logits = tf.slice(t.batch, [0, 0], [-1, 1]);\n t.sigmoid = tf.sigmoid(t.logits);\n t.scores = tf.squeeze(t.sigmoid);\n t.nms = await tf.image.nonMaxSuppressionAsync(t.boxes, t.scores, (config.face.detector?.maxDetected || 0), (config.face.detector?.iouThreshold || 0), (config.face.detector?.minConfidence || 0));\n const nms = await t.nms.array() as number[];\n const boxes: DetectBox[] = [];\n const scores = await t.scores.data();\n for (let i = 0; i < nms.length; i++) {\n const confidence = scores[nms[i]];\n if (confidence > (config.face.detector?.minConfidence || 0)) {\n const b: Record = {};\n b.bbox = tf.slice(t.boxes, [nms[i], 0], [1, -1]);\n b.slice = tf.slice(t.batch, [nms[i], keypointsCount - 1], [1, -1]);\n b.squeeze = tf.squeeze(b.slice);\n b.landmarks = tf.reshape(b.squeeze, [keypointsCount, -1]);\n const points = await b.bbox.data();\n const rawBox = {\n startPoint: [points[0], points[1]] as Point,\n endPoint: [points[2], points[3]] as Point,\n landmarks: (await b.landmarks.array()) as Point[],\n confidence,\n };\n const scaledBox = util.scaleBoxCoordinates(rawBox, [(inputImage.shape[2] || 0) / inputSize, (inputImage.shape[1] || 0) / inputSize]);\n const enlargedBox = util.enlargeBox(scaledBox, config.face['scale'] || faceBoxScaleFactor);\n const squaredBox = util.squarifyBox(enlargedBox);\n boxes.push(squaredBox);\n Object.keys(b).forEach((tensor) => tf.dispose(b[tensor]));\n }\n }\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n return boxes;\n}\n", "/* eslint-disable no-multi-spaces */\n\nexport const kpt: string[] = [\n 'nose', // 0\n 'leftEyeInside', // 1\n 'leftEye', // 2\n 'leftEyeOutside', // 3\n 'rightEyeInside', // 4\n 'rightEye', // 5\n 'rightEyeOutside', // 6\n 'leftEar', // 7\n 'rightEar', // 8\n 'leftMouth', // 9\n 'rightMouth', // 10\n 'leftShoulder', // 11\n 'rightShoulder', // 12\n 'leftElbow', // 13\n 'rightElbow', // 14\n 'leftWrist', // 15\n 'rightWrist', // 16\n 'leftPinky', // 17\n 'rightPinky', // 18\n 'leftIndex', // 19\n 'rightIndex', // 20\n 'leftThumb', // 21\n 'rightThumb', // 22\n 'leftHip', // 23\n 'rightHip', // 24\n 'leftKnee', // 25\n 'rightKnee', // 26\n 'leftAnkle', // 27\n 'rightAnkle', // 28\n 'leftHeel', // 29\n 'rightHeel', // 30\n 'leftFoot', // 31\n 'rightFoot', // 32\n 'bodyCenter', // 33\n 'bodyTop', // 34\n 'leftPalm', // 35 // z-coord not ok\n 'leftHand', // 36 // similar to wrist but z-coord not ok\n 'rightPalm', // 37 // z-coord not ok\n 'rightHand', // 38 // similar to wrist but z-coord not ok\n];\n\nexport const connected: Record = {\n shoulders: ['leftShoulder', 'rightShoulder'],\n hips: ['rightHip', 'leftHip'],\n mouth: ['leftMouth', 'rightMouth'],\n leftLegUpper: ['leftHip', 'leftKnee'],\n leftLegLower: ['leftKnee', 'leftAnkle'],\n leftFoot: ['leftAnkle', 'leftHeel', 'leftFoot'],\n leftTorso: ['leftShoulder', 'leftHip'],\n leftArmUpper: ['leftShoulder', 'leftElbow'],\n leftArmLower: ['leftElbow', 'leftWrist'],\n leftHand: ['leftWrist', 'leftPalm'],\n leftHandPinky: ['leftPalm', 'leftPinky'],\n leftHandIndex: ['leftPalm', 'leftIndex'],\n leftHandThumb: ['leftPalm', 'leftThumb'],\n leftEyeOutline: ['leftEyeInside', 'leftEyeOutside'],\n rightLegUpper: ['rightHip', 'rightKnee'],\n rightLegLower: ['rightKnee', 'rightAnkle'],\n rightFoot: ['rightAnkle', 'rightHeel', 'rightFoot'],\n rightTorso: ['rightShoulder', 'rightHip'],\n rightArmUpper: ['rightShoulder', 'rightElbow'],\n rightArmLower: ['rightElbow', 'rightWrist'],\n rightHand: ['rightWrist', 'rightPalm'],\n rightHandPinky: ['rightPalm', 'rightPinky'],\n rightHandIndex: ['rightPalm', 'rightIndex'],\n rightHandThumb: ['rightPalm', 'rightThumb'],\n rightEyeOutline: ['rightEyeInside', 'rightEyeOutside'],\n};\n", "import * as tf from '../../dist/tfjs.esm.js';\nimport type { Tensor } from '../tfjs/types';\nimport type { Box } from '../result';\nimport type { Config } from '../config';\n\ninterface DetectedBox { box: Box, boxRaw: Box, score: number }\n\nconst inputSize = 224;\nlet anchorTensor: { x, y };\nconst numLayers = 5;\nconst strides = [8, 16, 32, 32, 32];\n\nexport function createAnchors() {\n const anchors: { x: number, y: number }[] = [];\n let layerId = 0;\n while (layerId < numLayers) {\n let anchorCount = 0;\n let lastSameStrideLayer = layerId;\n while (lastSameStrideLayer < strides.length && strides[lastSameStrideLayer] === strides[layerId]) {\n anchorCount += 2;\n lastSameStrideLayer++;\n }\n const stride = strides[layerId];\n const featureMapHeight = Math.ceil(inputSize / stride);\n const featureMapWidth = Math.ceil(inputSize / stride);\n for (let y = 0; y < featureMapHeight; ++y) {\n for (let x = 0; x < featureMapWidth; ++x) {\n for (let anchorId = 0; anchorId < anchorCount; ++anchorId) {\n anchors.push({ x: (x + 0.5) / featureMapWidth, y: (y + 0.5) / featureMapHeight });\n }\n }\n }\n layerId = lastSameStrideLayer;\n }\n anchorTensor = { x: tf.tensor1d(anchors.map((a) => a.x)), y: tf.tensor1d(anchors.map((a) => a.y)) };\n}\n\nconst cropFactor = [5.0, 5.0];\nfunction decodeBoxes(boxesTensor, anchor): Tensor {\n return tf.tidy(() => {\n const split = tf.split(boxesTensor, 12, 1); // first 4 are box data [x,y,w,h] and 4 are keypoints data [x,y] for total of 12\n let xCenter = tf.squeeze(split[0]);\n let yCenter = tf.squeeze(split[1]);\n let width = tf.squeeze(split[2]);\n let height = tf.squeeze(split[3]);\n xCenter = tf.add(tf.div(xCenter, inputSize), anchor.x);\n yCenter = tf.add(tf.div(yCenter, inputSize), anchor.y);\n width = tf.mul(tf.div(width, inputSize), cropFactor[0]);\n height = tf.mul(tf.div(height, inputSize), cropFactor[1]);\n const xMin = tf.sub(xCenter, tf.div(width, 2));\n const yMin = tf.sub(yCenter, tf.div(height, 2));\n const boxes = tf.stack([xMin, yMin, width, height], 1);\n return boxes;\n });\n}\n\nexport async function decode(boxesTensor: Tensor, logitsTensor: Tensor, config: Config, outputSize: [number, number]): Promise {\n const t: Record = {};\n t.boxes = decodeBoxes(boxesTensor, anchorTensor);\n t.scores = tf.sigmoid(logitsTensor);\n t.argmax = tf.argMax(t.scores);\n const i = (await t.argmax.data())[0];\n const scores = await t.scores.data();\n const detected: { box: Box, boxRaw: Box, score: number }[] = [];\n const minScore = config.body?.['detector']?.minConfidence || 0;\n if (scores[i] >= minScore) {\n const boxes = await t.boxes.array();\n const boxRaw: Box = boxes[i];\n const box: Box = [boxRaw[0] * outputSize[0], boxRaw[1] * outputSize[1], boxRaw[2] * outputSize[0], boxRaw[3] * outputSize[1]];\n // console.log(box);\n detected.push({ box, boxRaw, score: scores[i] });\n }\n /*\n t.nms = await tf.image.nonMaxSuppressionAsync(t.boxes, t.scores, 1, config.body.detector?.minConfidence || 0.1, config.body.detector?.iouThreshold || 0.1);\n const boxes = t.boxes.arraySync();\n const scores = t.scores.dataSync();\n const nms = t.nms.dataSync();\n const detected: Array = [];\n for (const i of Array.from(nms)) {\n const boxRaw: Box = boxes[i];\n const box: Box = [boxRaw[0] * outputSize[0], boxRaw[0] * outputSize[1], boxRaw[3] * outputSize[0], boxRaw[2] * outputSize[1]];\n detected.push({ box, boxRaw, score: scores[i] });\n }\n */\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n return detected;\n}\n", "import type { Point, Box } from '../result';\n\nexport function calc(keypoints: Point[], outputSize: [number, number] = [1, 1]) {\n const coords = [keypoints.map((pt) => pt[0]), keypoints.map((pt) => pt[1])]; // all x/y coords\n const min = [Math.min(...coords[0]), Math.min(...coords[1])];\n const max = [Math.max(...coords[0]), Math.max(...coords[1])];\n const box: Box = [min[0], min[1], max[0] - min[0], max[1] - min[1]];\n const boxRaw: Box = [box[0] / outputSize[0], box[1] / outputSize[1], box[2] / outputSize[0], box[3] / outputSize[1]];\n return { box, boxRaw };\n}\n\nexport function square(keypoints: Point[], outputSize: [number, number] = [1, 1]) {\n const coords = [keypoints.map((pt) => pt[0]), keypoints.map((pt) => pt[1])]; // all x/y coords\n const min = [Math.min(...coords[0]), Math.min(...coords[1])];\n const max = [Math.max(...coords[0]), Math.max(...coords[1])];\n const center = [(min[0] + max[0]) / 2, (min[1] + max[1]) / 2]; // find center x and y coord of all fingers\n const dist = Math.max(center[0] - min[0], center[1] - min[1], -center[0] + max[0], -center[1] + max[1]); // largest distance from center in any direction\n const box: Box = [Math.trunc(center[0] - dist), Math.trunc(center[1] - dist), Math.trunc(2 * dist), Math.trunc(2 * dist)];\n const boxRaw: Box = [box[0] / outputSize[0], box[1] / outputSize[1], box[2] / outputSize[0], box[3] / outputSize[1]];\n return { box, boxRaw };\n}\n\nexport function scale(box: Box, scaleFact: number) {\n const dist = [box[2] * scaleFact, box[3] * scaleFact];\n const newBox: Box = [\n box[0] - (dist[0] - box[2]) / 2,\n box[1] - (dist[1] - box[3]) / 2,\n dist[0],\n dist[1],\n ];\n return newBox;\n}\n\nexport function crop(box: Box) { // [y1, x1, y2, x2] clamped to 0..1\n const yxBox: Box = [Math.max(0, box[1]), Math.max(0, box[0]), Math.min(1, box[3] + box[1]), Math.min(1, box[2] + box[0])];\n return yxBox;\n}\n", "/**\n * BlazePose model implementation\n */\n\nimport * as tf from '../../dist/tfjs.esm.js';\nimport { loadModel } from '../tfjs/load';\nimport { constants } from '../tfjs/constants';\nimport { log, now } from '../util/util';\nimport type { BodyKeypoint, BodyResult, BodyLandmark, Box, Point, BodyAnnotation } from '../result';\nimport type { GraphModel, Tensor } from '../tfjs/types';\nimport type { Config } from '../config';\nimport * as coords from './blazeposecoords';\nimport * as detect from './blazeposedetector';\nimport * as box from '../util/box';\n\nconst env = { initial: true };\n// const models: [GraphModel | null, GraphModel | null] = [null, null];\nconst models: { detector: GraphModel | null, landmarks: GraphModel | null } = { detector: null, landmarks: null };\nconst inputSize: { detector: [number, number], landmarks: [number, number] } = { detector: [224, 224], landmarks: [256, 256] };\nlet skipped = Number.MAX_SAFE_INTEGER;\nconst outputNodes: { detector: string[], landmarks: string[] } = {\n landmarks: ['ld_3d', 'activation_segmentation', 'activation_heatmap', 'world_3d', 'output_poseflag'],\n detector: [],\n};\n\nlet cache: BodyResult | null = null;\nlet cropBox: Box | undefined;\nlet padding: [number, number][] = [[0, 0], [0, 0], [0, 0], [0, 0]];\nlet lastTime = 0;\n\nconst sigmoid = (x) => (1 - (1 / (1 + Math.exp(x))));\n\nexport async function loadDetect(config: Config): Promise {\n if (env.initial) models.detector = null;\n if (!models.detector && config.body['detector'] && config.body['detector'].modelPath || '') {\n models.detector = await loadModel(config.body['detector'].modelPath);\n const inputs = models.detector?.['executor'] ? Object.values(models.detector.modelSignature['inputs']) : undefined;\n inputSize.detector[0] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[1].size) : 0;\n inputSize.detector[1] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : 0;\n } else if (config.debug && models.detector) log('cached model:', models.detector['modelUrl']);\n detect.createAnchors();\n return models.detector as GraphModel;\n}\n\nexport async function loadPose(config: Config): Promise {\n if (env.initial) models.landmarks = null;\n if (!models.landmarks) {\n models.landmarks = await loadModel(config.body.modelPath);\n const inputs = models.landmarks?.['executor'] ? Object.values(models.landmarks.modelSignature['inputs']) : undefined;\n inputSize.landmarks[0] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[1].size) : 0;\n inputSize.landmarks[1] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : 0;\n } else if (config.debug) log('cached model:', models.landmarks['modelUrl']);\n return models.landmarks;\n}\n\nexport async function load(config: Config): Promise<[GraphModel | null, GraphModel | null]> {\n if (!models.detector) await loadDetect(config);\n if (!models.landmarks) await loadPose(config);\n return [models.detector, models.landmarks];\n}\n\nfunction prepareImage(input: Tensor, size: number): Tensor {\n const t: Record = {};\n if (!input?.shape?.[1] || !input?.shape?.[2]) return input;\n let final: Tensor;\n if (cropBox) {\n t.cropped = tf.image.cropAndResize(input, [cropBox], [0], [input.shape[1], input.shape[2]]); // if we have cached box use it to crop input\n }\n if (input.shape[1] !== input.shape[2]) { // only pad if width different than height\n const height: [number, number] = [\n input.shape[2] > input.shape[1] ? Math.trunc((input.shape[2] - input.shape[1]) / 2) : 0,\n input.shape[2] > input.shape[1] ? Math.trunc((input.shape[2] - input.shape[1]) / 2) : 0,\n ];\n const width: [number, number] = [\n input.shape[1] > input.shape[2] ? Math.trunc((input.shape[1] - input.shape[2]) / 2) : 0,\n input.shape[1] > input.shape[2] ? Math.trunc((input.shape[1] - input.shape[2]) / 2) : 0,\n ];\n padding = [\n [0, 0], // dont touch batch\n height, // height before&after\n width, // width before&after\n [0, 0], // dont touch rbg\n ];\n t.pad = tf.pad(t.cropped || input, padding); // use cropped box if it exists\n t.resize = tf.image.resizeBilinear(t.pad, [size, size]);\n final = tf.div(t.resize, constants.tf255);\n } else if (input.shape[1] !== size) { // if input needs resizing\n t.resize = tf.image.resizeBilinear(t.cropped || input, [size, size]);\n final = tf.div(t.resize, constants.tf255);\n } else { // if input is already in a correct resolution just normalize it\n final = tf.div(t.cropped || input, constants.tf255);\n }\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n return final;\n}\n\nfunction rescaleKeypoints(keypoints: BodyKeypoint[], outputSize: [number, number]): BodyKeypoint[] {\n for (const kpt of keypoints) { // first rescale due to padding\n kpt.position = [\n Math.trunc(kpt.position[0] * (outputSize[0] + padding[2][0] + padding[2][1]) / outputSize[0] - padding[2][0]),\n Math.trunc(kpt.position[1] * (outputSize[1] + padding[1][0] + padding[1][1]) / outputSize[1] - padding[1][0]),\n kpt.position[2] as number,\n ];\n kpt.positionRaw = [kpt.position[0] / outputSize[0], kpt.position[1] / outputSize[1], 2 * (kpt.position[2] as number) / (outputSize[0] + outputSize[1])];\n }\n if (cropBox) { // second rescale due to cropping\n for (const kpt of keypoints) {\n kpt.positionRaw = [\n kpt.positionRaw[0] + cropBox[1], // correct offset due to crop\n kpt.positionRaw[1] + cropBox[0], // correct offset due to crop\n kpt.positionRaw[2] as number,\n ];\n kpt.position = [\n Math.trunc(kpt.positionRaw[0] * outputSize[0]),\n Math.trunc(kpt.positionRaw[1] * outputSize[1]),\n kpt.positionRaw[2] as number,\n ];\n }\n }\n return keypoints;\n}\n\nfunction fixKeypoints(keypoints: BodyKeypoint[]) {\n // palm z-coord is incorrect around near-zero so we approximate it\n const leftPalm = keypoints.find((k) => k.part === 'leftPalm') as BodyKeypoint;\n const leftWrist = keypoints.find((k) => k.part === 'leftWrist') as BodyKeypoint;\n const leftIndex = keypoints.find((k) => k.part === 'leftIndex') as BodyKeypoint;\n leftPalm.position[2] = ((leftWrist.position[2] || 0) + (leftIndex.position[2] || 0)) / 2;\n const rightPalm = keypoints.find((k) => k.part === 'rightPalm') as BodyKeypoint;\n const rightWrist = keypoints.find((k) => k.part === 'rightWrist') as BodyKeypoint;\n const rightIndex = keypoints.find((k) => k.part === 'rightIndex') as BodyKeypoint;\n rightPalm.position[2] = ((rightWrist.position[2] || 0) + (rightIndex.position[2] || 0)) / 2;\n}\n\nasync function detectLandmarks(input: Tensor, config: Config, outputSize: [number, number]): Promise {\n /**\n * t.ld: 39 keypoints [x,y,z,score,presence] normalized to input size\n * t.segmentation:\n * t.heatmap:\n * t.world: 39 keypoints [x,y,z] normalized to -1..1\n * t.poseflag: body score\n */\n if (!models.landmarks?.['executor']) return null;\n const t: Record = {};\n [t.ld/* 1,195(39*5) */, t.segmentation/* 1,256,256,1 */, t.heatmap/* 1,64,64,39 */, t.world/* 1,117(39*3) */, t.poseflag/* 1,1 */] = models.landmarks?.execute(input, outputNodes.landmarks) as Tensor[]; // run model\n const poseScore = (await t.poseflag.data())[0];\n const points = await t.ld.data();\n const distances = await t.world.data();\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor])); // dont need tensors after this\n const keypointsRelative: BodyKeypoint[] = [];\n const depth = 5; // each points has x,y,z,visibility,presence\n for (let i = 0; i < points.length / depth; i++) {\n const score = sigmoid(points[depth * i + 3]);\n const presence = sigmoid(points[depth * i + 4]);\n const adjScore = Math.trunc(100 * score * presence * poseScore) / 100;\n const positionRaw: Point = [points[depth * i + 0] / inputSize.landmarks[0], points[depth * i + 1] / inputSize.landmarks[1], points[depth * i + 2] + 0];\n const position: Point = [Math.trunc(outputSize[0] * positionRaw[0]), Math.trunc(outputSize[1] * positionRaw[1]), positionRaw[2] as number];\n const distance: Point = [distances[depth * i + 0], distances[depth * i + 1], distances[depth * i + 2] + 0];\n keypointsRelative.push({ part: coords.kpt[i] as BodyLandmark, positionRaw, position, distance, score: adjScore });\n }\n if (poseScore < (config.body.minConfidence || 0)) return null;\n fixKeypoints(keypointsRelative);\n const keypoints: BodyKeypoint[] = rescaleKeypoints(keypointsRelative, outputSize); // keypoints were relative to input image which is padded\n const kpts = keypoints.map((k) => k.position);\n const boxes = box.calc(kpts, [outputSize[0], outputSize[1]]); // now find boxes based on rescaled keypoints\n const annotations: Record = {} as Record;\n for (const [name, indexes] of Object.entries(coords.connected)) {\n const pt: Point[][] = [];\n for (let i = 0; i < indexes.length - 1; i++) {\n const pt0 = keypoints.find((kpt) => kpt.part === indexes[i]);\n const pt1 = keypoints.find((kpt) => kpt.part === indexes[i + 1]);\n if (pt0 && pt1) pt.push([pt0.position, pt1.position]);\n }\n annotations[name] = pt;\n }\n const body = { id: 0, score: Math.trunc(100 * poseScore) / 100, box: boxes.box, boxRaw: boxes.boxRaw, keypoints, annotations };\n return body;\n}\n\n/*\ninterface DetectedBox { box: Box, boxRaw: Box, score: number }\n\nfunction rescaleBoxes(boxes: Array, outputSize: [number, number]): Array {\n for (const b of boxes) {\n b.box = [\n Math.trunc(b.box[0] * (outputSize[0] + padding[2][0] + padding[2][1]) / outputSize[0]),\n Math.trunc(b.box[1] * (outputSize[1] + padding[1][0] + padding[1][1]) / outputSize[1]),\n Math.trunc(b.box[2] * (outputSize[0] + padding[2][0] + padding[2][1]) / outputSize[0]),\n Math.trunc(b.box[3] * (outputSize[1] + padding[1][0] + padding[1][1]) / outputSize[1]),\n ];\n b.boxRaw = [b.box[0] / outputSize[0], b.box[1] / outputSize[1], b.box[2] / outputSize[0], b.box[3] / outputSize[1]];\n }\n return boxes;\n}\n\nasync function detectBoxes(input: Tensor, config: Config, outputSize: [number, number]) {\n const t: Record = {};\n t.res = models.detector?.execute(input, ['Identity']) as Tensor; //\n t.logitsRaw = tf.slice(t.res, [0, 0, 0], [1, -1, 1]);\n t.boxesRaw = tf.slice(t.res, [0, 0, 1], [1, -1, -1]);\n t.logits = tf.squeeze(t.logitsRaw);\n t.boxes = tf.squeeze(t.boxesRaw);\n const boxes = await detect.decode(t.boxes, t.logits, config, outputSize);\n rescaleBoxes(boxes, outputSize);\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n return boxes;\n}\n*/\n\nexport async function predict(input: Tensor, config: Config): Promise {\n const outputSize: [number, number] = [input.shape[2] || 0, input.shape[1] || 0];\n const skipTime = (config.body.skipTime || 0) > (now() - lastTime);\n const skipFrame = skipped < (config.body.skipFrames || 0);\n if (config.skipAllowed && skipTime && skipFrame && cache !== null) {\n skipped++;\n } else {\n const t: Record = {};\n /*\n if (config.body['detector'] && config.body['detector']['enabled']) {\n t.detector = await prepareImage(input, 224);\n const boxes = await detectBoxes(t.detector, config, outputSize);\n }\n */\n t.landmarks = prepareImage(input, 256); // padded and resized\n cache = await detectLandmarks(t.landmarks, config, outputSize);\n /*\n cropBox = [0, 0, 1, 1]; // reset crop coordinates\n if (cache?.boxRaw && config.skipAllowed) {\n const cx = (2.0 * cache.boxRaw[0] + cache.boxRaw[2]) / 2;\n const cy = (2.0 * cache.boxRaw[1] + cache.boxRaw[3]) / 2;\n let size = cache.boxRaw[2] > cache.boxRaw[3] ? cache.boxRaw[2] : cache.boxRaw[3];\n size = (size * 1.0) / 2; // enlarge and half it\n if (cx > 0.1 && cx < 0.9 && cy > 0.1 && cy < 0.9 && size > 0.1) { // only update if box is sane\n const y = 0; // cy - size;\n const x = cx - size;\n cropBox = [y, x, y + 1, x + 1]; // [y0,x0,y1,x1] used for cropping but width/height are not yet implemented so we only reposition image to center of body\n }\n }\n */\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n lastTime = now();\n skipped = 0;\n }\n return cache ? [cache] : [];\n}\n", "/**\n * CoCo Labels used by object detection implementations\n */\nexport const labels = [\n { class: 1, label: 'person' },\n { class: 2, label: 'bicycle' },\n { class: 3, label: 'car' },\n { class: 4, label: 'motorcycle' },\n { class: 5, label: 'airplane' },\n { class: 6, label: 'bus' },\n { class: 7, label: 'train' },\n { class: 8, label: 'truck' },\n { class: 9, label: 'boat' },\n { class: 10, label: 'traffic light' },\n { class: 11, label: 'fire hydrant' },\n { class: 12, label: 'stop sign' },\n { class: 13, label: 'parking meter' },\n { class: 14, label: 'bench' },\n { class: 15, label: 'bird' },\n { class: 16, label: 'cat' },\n { class: 17, label: 'dog' },\n { class: 18, label: 'horse' },\n { class: 19, label: 'sheep' },\n { class: 20, label: 'cow' },\n { class: 21, label: 'elephant' },\n { class: 22, label: 'bear' },\n { class: 23, label: 'zebra' },\n { class: 24, label: 'giraffe' },\n { class: 25, label: 'backpack' },\n { class: 26, label: 'umbrella' },\n { class: 27, label: 'handbag' },\n { class: 28, label: 'tie' },\n { class: 29, label: 'suitcase' },\n { class: 30, label: 'frisbee' },\n { class: 31, label: 'skis' },\n { class: 32, label: 'snowboard' },\n { class: 33, label: 'sports ball' },\n { class: 34, label: 'kite' },\n { class: 35, label: 'baseball bat' },\n { class: 36, label: 'baseball glove' },\n { class: 37, label: 'skateboard' },\n { class: 38, label: 'surfboard' },\n { class: 39, label: 'tennis racket' },\n { class: 40, label: 'bottle' },\n { class: 41, label: 'wine glass' },\n { class: 42, label: 'cup' },\n { class: 43, label: 'fork' },\n { class: 44, label: 'knife' },\n { class: 45, label: 'spoon' },\n { class: 46, label: 'bowl' },\n { class: 47, label: 'banana' },\n { class: 48, label: 'apple' },\n { class: 49, label: 'sandwich' },\n { class: 50, label: 'orange' },\n { class: 51, label: 'broccoli' },\n { class: 52, label: 'carrot' },\n { class: 53, label: 'hot dog' },\n { class: 54, label: 'pizza' },\n { class: 55, label: 'donut' },\n { class: 56, label: 'cake' },\n { class: 57, label: 'chair' },\n { class: 58, label: 'couch' },\n { class: 59, label: 'potted plant' },\n { class: 60, label: 'bed' },\n { class: 61, label: 'dining table' },\n { class: 62, label: 'toilet' },\n { class: 63, label: 'tv' },\n { class: 64, label: 'laptop' },\n { class: 65, label: 'mouse' },\n { class: 66, label: 'remote' },\n { class: 67, label: 'keyboard' },\n { class: 68, label: 'cell phone' },\n { class: 69, label: 'microwave' },\n { class: 70, label: 'oven' },\n { class: 71, label: 'toaster' },\n { class: 72, label: 'sink' },\n { class: 73, label: 'refrigerator' },\n { class: 74, label: 'book' },\n { class: 75, label: 'clock' },\n { class: 76, label: 'vase' },\n { class: 77, label: 'scissors' },\n { class: 78, label: 'teddy bear' },\n { class: 79, label: 'hair drier' },\n { class: 80, label: 'toothbrush' },\n];\n", "/**\n * CenterNet object detection model implementation\n *\n * Based on: [**NanoDet**](https://github.com/RangiLyu/nanodet)\n */\n\nimport { log, now } from '../util/util';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport { loadModel } from '../tfjs/load';\nimport { labels } from './labels';\nimport type { ObjectResult, ObjectType, Box } from '../result';\nimport type { GraphModel, Tensor } from '../tfjs/types';\nimport type { Config } from '../config';\nimport { env } from '../util/env';\n\nlet model: GraphModel | null;\nlet inputSize = 0;\nlet last: ObjectResult[] = [];\nlet lastTime = 0;\nlet skipped = Number.MAX_SAFE_INTEGER;\n\nexport async function load(config: Config): Promise {\n if (env.initial) model = null;\n if (!model) {\n // fakeOps(['floormod'], config);\n model = await loadModel(config.object.modelPath);\n const inputs = model?.['executor'] ? Object.values(model.modelSignature['inputs']) : undefined;\n inputSize = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : 0;\n } else if (config.debug) log('cached model:', model['modelUrl']);\n return model;\n}\n\nasync function process(res: Tensor | null, outputShape: [number, number], config: Config) {\n if (!res) return [];\n const t: Record = {};\n const results: ObjectResult[] = [];\n const detections = await res.array() as number[][][];\n t.squeeze = tf.squeeze(res);\n const arr = tf.split(t.squeeze, 6, 1) as Tensor[]; // x1, y1, x2, y2, score, class\n t.stack = tf.stack([arr[1], arr[0], arr[3], arr[2]], 1); // reorder dims as tf.nms expects y, x\n t.boxes = tf.squeeze(t.stack);\n t.scores = tf.squeeze(arr[4]);\n t.classes = tf.squeeze(arr[5]);\n tf.dispose([res, ...arr]);\n t.nms = await tf.image.nonMaxSuppressionAsync(t.boxes, t.scores, config.object.maxDetected, config.object.iouThreshold, (config.object.minConfidence || 0));\n const nms = await t.nms.data();\n let i = 0;\n for (const id of Array.from(nms)) {\n const score = Math.trunc(100 * detections[0][id][4]) / 100;\n const classVal = detections[0][id][5];\n if (Number.isNaN(classVal)) continue;\n const label = labels[classVal].label as ObjectType;\n const [x, y] = [\n detections[0][id][0] / inputSize,\n detections[0][id][1] / inputSize,\n ];\n const boxRaw: Box = [\n x,\n y,\n detections[0][id][2] / inputSize - x,\n detections[0][id][3] / inputSize - y,\n ];\n const box: Box = [\n Math.trunc(boxRaw[0] * outputShape[0]),\n Math.trunc(boxRaw[1] * outputShape[1]),\n Math.trunc(boxRaw[2] * outputShape[0]),\n Math.trunc(boxRaw[3] * outputShape[1]),\n ];\n results.push({ id: i++, score, class: classVal, label, box, boxRaw });\n }\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n return results;\n}\n\nexport async function predict(input: Tensor, config: Config): Promise {\n if (!model?.['executor']) return [];\n const skipTime = (config.object.skipTime || 0) > (now() - lastTime);\n const skipFrame = skipped < (config.object.skipFrames || 0);\n if (config.skipAllowed && skipTime && skipFrame && (last.length > 0)) {\n skipped++;\n return last;\n }\n skipped = 0;\n return new Promise(async (resolve) => {\n const outputSize = [input.shape[2] || 0, input.shape[1] || 0] as [number, number];\n const resize = tf.image.resizeBilinear(input, [inputSize, inputSize]);\n const objectT = config.object.enabled ? model?.execute(resize, ['tower_0/detections']) as Tensor : null;\n lastTime = now();\n tf.dispose(resize);\n\n const obj = await process(objectT, outputSize, config);\n last = obj;\n\n resolve(obj);\n });\n}\n", "export const kpt: string[] = [\n 'head',\n 'neck',\n 'rightShoulder',\n 'rightElbow',\n 'rightWrist',\n 'chest',\n 'leftShoulder',\n 'leftElbow',\n 'leftWrist',\n 'bodyCenter',\n 'rightHip',\n 'rightKnee',\n 'rightAnkle',\n 'leftHip',\n 'leftKnee',\n 'leftAnkle',\n];\n\nexport const connected: Record = {\n leftLeg: ['leftHip', 'leftKnee', 'leftAnkle'],\n rightLeg: ['rightHip', 'rightKnee', 'rightAnkle'],\n torso: ['leftShoulder', 'rightShoulder', 'rightHip', 'leftHip', 'leftShoulder'],\n leftArm: ['leftShoulder', 'leftElbow', 'leftWrist'],\n rightArm: ['rightShoulder', 'rightElbow', 'rightWrist'],\n head: [],\n};\n", "/**\n * EfficientPose model implementation\n *\n * Based on: [**EfficientPose**](https://github.com/daniegr/EfficientPose)\n */\n\nimport { log, now } from '../util/util';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport { loadModel } from '../tfjs/load';\nimport * as coords from './efficientposecoords';\nimport { constants } from '../tfjs/constants';\nimport type { BodyResult, Point, BodyLandmark, BodyAnnotation } from '../result';\nimport type { GraphModel, Tensor } from '../tfjs/types';\nimport type { Config } from '../config';\nimport { env } from '../util/env';\n\nlet model: GraphModel | null;\nlet lastTime = 0;\nconst cache: BodyResult = { id: 0, keypoints: [], box: [0, 0, 0, 0], boxRaw: [0, 0, 0, 0], score: 0, annotations: {} as Record };\n\n// const keypoints: Array = [];\n// let box: Box = [0, 0, 0, 0];\n// let boxRaw: Box = [0, 0, 0, 0];\n// let score = 0;\nlet skipped = Number.MAX_SAFE_INTEGER;\n\nexport async function load(config: Config): Promise {\n if (env.initial) model = null;\n if (!model) model = await loadModel(config.body.modelPath);\n else if (config.debug) log('cached model:', model['modelUrl']);\n return model;\n}\n\n// performs argmax and max functions on a 2d tensor\nasync function max2d(inputs, minScore): Promise<[number, number, number]> {\n const [width, height] = inputs.shape;\n const reshaped = tf.reshape(inputs, [height * width]); // combine all data\n const max = tf.max(reshaped, 0);\n const newScore: number = (await max.data())[0]; // get highest score\n if (newScore > minScore) { // skip coordinate calculation is score is too low\n const coordinates = tf.argMax(reshaped, 0);\n const mod = tf.mod(coordinates, width);\n const x = (await mod.data())[0];\n const div = tf.div(coordinates, width);\n const y: number = (await div.data())[0];\n tf.dispose([reshaped, max, coordinates, mod, div]);\n return [x, y, newScore];\n }\n tf.dispose([reshaped, max]);\n return [0, 0, newScore];\n}\n\nexport async function predict(image: Tensor, config: Config): Promise {\n if (!model?.['executor']) return [];\n const skipTime = (config.body.skipTime || 0) > (now() - lastTime);\n const skipFrame = skipped < (config.body.skipFrames || 0);\n if (config.skipAllowed && skipTime && skipFrame && Object.keys(cache.keypoints).length > 0) {\n skipped++;\n return [cache];\n }\n skipped = 0;\n return new Promise(async (resolve) => {\n const tensor = tf.tidy(() => {\n if (!model?.inputs[0].shape) return null;\n const resize = tf.image.resizeBilinear(image, [model.inputs[0].shape[2], model.inputs[0].shape[1]], false);\n const enhance = tf.mul(resize, constants.tf2);\n const norm = tf.sub(enhance, constants.tf1);\n return norm;\n });\n let resT;\n if (config.body.enabled) resT = model?.execute(tensor);\n lastTime = now();\n tf.dispose(tensor);\n\n if (resT) {\n cache.keypoints.length = 0;\n const squeeze = tf.squeeze(resT);\n tf.dispose(resT);\n // body parts are basically just a stack of 2d tensors\n const stack = tf.unstack(squeeze, 2);\n tf.dispose(squeeze);\n\n // process each unstacked tensor as a separate body part\n for (let id = 0; id < stack.length; id++) {\n // actual processing to get coordinates and score\n const [x, y, partScore] = await max2d(stack[id], config.body.minConfidence);\n if (partScore > (config.body.minConfidence || 0)) {\n cache.keypoints.push({\n score: Math.round(100 * partScore) / 100,\n part: coords.kpt[id] as BodyLandmark,\n positionRaw: [ // normalized to 0..1\n // @ts-ignore model is not undefined here\n x / model.inputs[0].shape[2], y / model.inputs[0].shape[1],\n ],\n position: [ // normalized to input image size\n // @ts-ignore model is not undefined here\n Math.round(image.shape[2] * x / model.inputs[0].shape[2]), Math.round(image.shape[1] * y / model.inputs[0].shape[1]),\n ],\n });\n }\n }\n stack.forEach((s) => tf.dispose(s));\n }\n cache.score = cache.keypoints.reduce((prev, curr) => (curr.score > prev ? curr.score : prev), 0);\n const x = cache.keypoints.map((a) => a.position[0]);\n const y = cache.keypoints.map((a) => a.position[1]);\n cache.box = [\n Math.min(...x),\n Math.min(...y),\n Math.max(...x) - Math.min(...x),\n Math.max(...y) - Math.min(...y),\n ];\n const xRaw = cache.keypoints.map((a) => a.positionRaw[0]);\n const yRaw = cache.keypoints.map((a) => a.positionRaw[1]);\n cache.boxRaw = [\n Math.min(...xRaw),\n Math.min(...yRaw),\n Math.max(...xRaw) - Math.min(...xRaw),\n Math.max(...yRaw) - Math.min(...yRaw),\n ];\n for (const [name, indexes] of Object.entries(coords.connected)) {\n const pt: Point[][] = [];\n for (let i = 0; i < indexes.length - 1; i++) {\n const pt0 = cache.keypoints.find((kpt) => kpt.part === indexes[i]);\n const pt1 = cache.keypoints.find((kpt) => kpt.part === indexes[i + 1]);\n if (pt0 && pt1 && pt0.score > (config.body.minConfidence || 0) && pt1.score > (config.body.minConfidence || 0)) pt.push([pt0.position, pt1.position]);\n }\n cache.annotations[name] = pt;\n }\n resolve([cache]);\n });\n}\n", "/**\n * Emotion model implementation\n *\n * [**Oarriaga**](https://github.com/oarriaga/face_classification)\n */\n\nimport type { Emotion } from '../result';\nimport { log, now } from '../util/util';\nimport type { Config } from '../config';\nimport type { GraphModel, Tensor } from '../tfjs/types';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport { loadModel } from '../tfjs/load';\nimport { env } from '../util/env';\nimport { constants } from '../tfjs/constants';\n\nconst annotations = ['angry', 'disgust', 'fear', 'happy', 'sad', 'surprise', 'neutral'];\nlet model: GraphModel | null;\nconst last: { score: number, emotion: Emotion }[][] = [];\nlet lastCount = 0;\nlet lastTime = 0;\nlet skipped = Number.MAX_SAFE_INTEGER;\n\nexport async function load(config: Config): Promise {\n if (env.initial) model = null;\n if (!model) model = await loadModel(config.face.emotion?.modelPath);\n else if (config.debug) log('cached model:', model['modelUrl']);\n return model;\n}\n\nexport async function predict(image: Tensor, config: Config, idx: number, count: number): Promise<{ score: number, emotion: Emotion }[]> {\n if (!model) return [];\n const skipFrame = skipped < (config.face.emotion?.skipFrames || 0);\n const skipTime = (config.face.emotion?.skipTime || 0) > (now() - lastTime);\n if (config.skipAllowed && skipTime && skipFrame && (lastCount === count) && last[idx] && (last[idx].length > 0)) {\n skipped++;\n return last[idx];\n }\n skipped = 0;\n return new Promise(async (resolve) => {\n const obj: { score: number, emotion: Emotion }[] = [];\n if (config.face.emotion?.enabled) {\n const t: Record = {};\n const inputSize = model?.inputs[0].shape ? model.inputs[0].shape[2] : 0;\n t.resize = tf.image.resizeBilinear(image, [inputSize, inputSize], false);\n // const box = [[0.15, 0.15, 0.85, 0.85]]; // empyrical values for top, left, bottom, right\n // const resize = tf.image.cropAndResize(image, box, [0], [inputSize, inputSize]);\n // [t.red, t.green, t.blue] = tf.split(t.resize, 3, 3);\n // weighted rgb to grayscale: https://www.mathworks.com/help/matlab/ref/rgb2gray.html\n // t.redNorm = tf.mul(t.red, rgb[0]);\n // t.greenNorm = tf.mul(t.green, rgb[1]);\n // t.blueNorm = tf.mul(t.blue, rgb[2]);\n // t.grayscale = tf.addN([t.redNorm, t.greenNorm, t.blueNorm]);\n t.channels = tf.mul(t.resize, constants.rgb);\n t.grayscale = tf.sum(t.channels, 3, true);\n t.grayscaleSub = tf.sub(t.grayscale, constants.tf05);\n t.grayscaleMul = tf.mul(t.grayscaleSub, constants.tf2);\n t.emotion = model?.execute(t.grayscaleMul) as Tensor; // result is already in range 0..1, no need for additional activation\n lastTime = now();\n const data = await t.emotion.data();\n for (let i = 0; i < data.length; i++) {\n if (data[i] > (config.face.emotion.minConfidence || 0)) obj.push({ score: Math.min(0.99, Math.trunc(100 * data[i]) / 100), emotion: annotations[i] as Emotion });\n }\n obj.sort((a, b) => b.score - a.score);\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n }\n last[idx] = obj;\n lastCount = count;\n resolve(obj);\n });\n}\n", "import * as coords from './facemeshcoords';\nimport * as util from './facemeshutil';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport type { Tensor, GraphModel } from '../tfjs/types';\nimport { env } from '../util/env';\nimport { log } from '../util/util';\nimport { loadModel } from '../tfjs/load';\nimport type { Config } from '../config';\nimport type { Point } from '../result';\n\nlet model: GraphModel | null;\nlet inputSize = 0;\n\nconst irisEnlarge = 2.3;\n\nconst leftOutline = coords.meshAnnotations.leftEyeLower0;\nconst rightOutline = coords.meshAnnotations.rightEyeLower0;\n\nconst eyeLandmarks = {\n leftBounds: [leftOutline[0], leftOutline[leftOutline.length - 1]],\n rightBounds: [rightOutline[0], rightOutline[rightOutline.length - 1]],\n};\n\nconst irisLandmarks = {\n upperCenter: 3,\n lowerCenter: 4,\n index: 71,\n numCoordinates: 76,\n};\n\nexport async function load(config: Config): Promise {\n if (env.initial) model = null;\n if (!model) model = await loadModel(config.face.iris?.modelPath);\n else if (config.debug) log('cached model:', model['modelUrl']);\n inputSize = (model?.['executor'] && model.inputs?.[0].shape) ? model.inputs[0].shape[2] : 0;\n if (inputSize === -1) inputSize = 64;\n return model;\n}\n\n// Replace the raw coordinates returned by facemesh with refined iris model coordinates and update the z coordinate to be an average of the original and the new.\nexport function replaceIrisCoords(rawCoords, newCoords, prefix, keys) {\n for (let i = 0; i < coords.irisIndices.length; i++) {\n const { key, indices } = coords.irisIndices[i];\n const originalIndices = coords.meshAnnotations[`${prefix}${key}`];\n if (!keys || keys.includes(key)) {\n for (let j = 0; j < indices.length; j++) {\n const index = indices[j];\n rawCoords[originalIndices[j]] = [\n newCoords[index][0],\n newCoords[index][1],\n (newCoords[index][2] + rawCoords[originalIndices[j]][2]) / 2,\n ];\n }\n }\n }\n}\n\nexport const getLeftToRightEyeDepthDifference = (rawCoords) => {\n const leftEyeZ = rawCoords[eyeLandmarks.leftBounds[0]][2];\n const rightEyeZ = rawCoords[eyeLandmarks.rightBounds[0]][2];\n return leftEyeZ - rightEyeZ;\n};\n\n// Returns a box describing a cropped region around the eye fit for passing to the iris model.\nexport const getEyeBox = (rawCoords, face, eyeInnerCornerIndex, eyeOuterCornerIndex, meshSize, flip = false) => {\n const box = util.squarifyBox(util.enlargeBox(util.calculateLandmarksBoundingBox([rawCoords[eyeInnerCornerIndex], rawCoords[eyeOuterCornerIndex]]), irisEnlarge));\n const boxSize = util.getBoxSize(box);\n let crop = tf.image.cropAndResize(face, [[\n box.startPoint[1] / meshSize,\n box.startPoint[0] / meshSize, box.endPoint[1] / meshSize,\n box.endPoint[0] / meshSize,\n ]], [0], [inputSize, inputSize]);\n if (flip && env.kernels.includes('flipleftright')) {\n const flipped = tf.image.flipLeftRight(crop); // flipLeftRight is not defined for tfjs-node\n tf.dispose(crop);\n crop = flipped;\n }\n return { box, boxSize, crop };\n};\n\n// Given a cropped image of an eye, returns the coordinates of the contours surrounding the eye and the iris.\nexport const getEyeCoords = (eyeData, eyeBox, eyeBoxSize, flip = false) => {\n const eyeRawCoords: Point[] = [];\n for (let i = 0; i < irisLandmarks.numCoordinates; i++) {\n const x = eyeData[i * 3];\n const y = eyeData[i * 3 + 1];\n const z = eyeData[i * 3 + 2];\n eyeRawCoords.push([\n (flip ? (1 - (x / inputSize)) : (x / inputSize)) * eyeBoxSize[0] + eyeBox.startPoint[0],\n (y / inputSize) * eyeBoxSize[1] + eyeBox.startPoint[1], z,\n ]);\n }\n return { rawCoords: eyeRawCoords, iris: eyeRawCoords.slice(irisLandmarks.index) };\n};\n\n// The z-coordinates returned for the iris are unreliable, so we take the z values from the surrounding keypoints.\nexport const getAdjustedIrisCoords = (rawCoords, irisCoords, direction) => {\n const upperCenterZ = rawCoords[coords.meshAnnotations[`${direction}EyeUpper0`][irisLandmarks.upperCenter]][2];\n const lowerCenterZ = rawCoords[coords.meshAnnotations[`${direction}EyeLower0`][irisLandmarks.lowerCenter]][2];\n const averageZ = (upperCenterZ + lowerCenterZ) / 2;\n // Iris indices: 0: center | 1: right | 2: above | 3: left | 4: below\n return irisCoords.map((coord, i) => {\n let z = averageZ;\n if (i === 2) {\n z = upperCenterZ;\n } else if (i === 4) {\n z = lowerCenterZ;\n }\n return [coord[0], coord[1], z];\n });\n};\n\nexport async function augmentIris(rawCoords, face, meshSize) {\n if (!model?.['executor']) return rawCoords;\n const { box: leftEyeBox, boxSize: leftEyeBoxSize, crop: leftEyeCrop } = getEyeBox(rawCoords, face, eyeLandmarks.leftBounds[0], eyeLandmarks.leftBounds[1], meshSize, true);\n const { box: rightEyeBox, boxSize: rightEyeBoxSize, crop: rightEyeCrop } = getEyeBox(rawCoords, face, eyeLandmarks.rightBounds[0], eyeLandmarks.rightBounds[1], meshSize, true);\n const combined = tf.concat([leftEyeCrop, rightEyeCrop]);\n tf.dispose(leftEyeCrop);\n tf.dispose(rightEyeCrop);\n const eyePredictions = model.execute(combined) as Tensor;\n tf.dispose(combined);\n const eyePredictionsData = await eyePredictions.data();\n tf.dispose(eyePredictions);\n const leftEyeData = eyePredictionsData.slice(0, irisLandmarks.numCoordinates * 3);\n const { rawCoords: leftEyeRawCoords, iris: leftIrisRawCoords } = getEyeCoords(leftEyeData, leftEyeBox, leftEyeBoxSize, true);\n const rightEyeData = eyePredictionsData.slice(irisLandmarks.numCoordinates * 3);\n const { rawCoords: rightEyeRawCoords, iris: rightIrisRawCoords } = getEyeCoords(rightEyeData, rightEyeBox, rightEyeBoxSize, false);\n const leftToRightEyeDepthDifference = getLeftToRightEyeDepthDifference(rawCoords);\n if (Math.abs(leftToRightEyeDepthDifference) < 30) { // User is looking straight ahead.\n replaceIrisCoords(rawCoords, leftEyeRawCoords, 'left', null);\n replaceIrisCoords(rawCoords, rightEyeRawCoords, 'right', null);\n // If the user is looking to the left or to the right, the iris coordinates tend to diverge too much from the mesh coordinates for them to be merged so we only update a single contour line above and below the eye.\n } else if (leftToRightEyeDepthDifference < 1) { // User is looking towards the right.\n replaceIrisCoords(rawCoords, leftEyeRawCoords, 'left', ['EyeUpper0', 'EyeLower0']);\n } else { // User is looking towards the left.\n replaceIrisCoords(rawCoords, rightEyeRawCoords, 'right', ['EyeUpper0', 'EyeLower0']);\n }\n const adjustedLeftIrisCoords = getAdjustedIrisCoords(rawCoords, leftIrisRawCoords, 'left');\n const adjustedRightIrisCoords = getAdjustedIrisCoords(rawCoords, rightIrisRawCoords, 'right');\n const newCoords = rawCoords.concat(adjustedLeftIrisCoords).concat(adjustedRightIrisCoords);\n return newCoords;\n}\n", "// @tensorflow/tfjs-models/face-landmark-detection/src/constants.ts\n// https://github.com/google/mediapipe/mediapipe/python/solutions/face_mesh_connections.py\n\ntype PairArray = [number, number][];\n\nconst LIPS_CONNECTIONS: PairArray = [\n [61, 146], [146, 91], [91, 181], [181, 84], [84, 17], [17, 314], [314, 405], [405, 321], [321, 375], [375, 291], [61, 185], [185, 40], [40, 39], [39, 37], [37, 0], [0, 267], [267, 269], [269, 270], [270, 409], [409, 291],\n [78, 95], [95, 88], [88, 178], [178, 87], [87, 14], [14, 317], [317, 402], [402, 318], [318, 324], [324, 308], [78, 191], [191, 80], [80, 81], [81, 82], [82, 13], [13, 312], [312, 311], [311, 310], [310, 415], [415, 308],\n];\n\nconst LEFT_EYE_CONNECTIONS: PairArray = [[263, 249], [249, 390], [390, 373], [373, 374], [374, 380], [380, 381], [381, 382], [382, 362], [263, 466], [466, 388], [388, 387], [387, 386], [386, 385], [385, 384], [384, 398], [398, 362]];\n\nconst LEFT_EYEBROW_CONNECTIONS: PairArray = [[276, 283], [283, 282], [282, 295], [295, 285], [300, 293], [293, 334], [334, 296], [296, 336]];\n\nconst LEFT_IRIS_CONNECTIONS: PairArray = [[474, 475], [475, 476], [476, 477], [477, 474]];\n\nconst RIGHT_EYE_CONNECTIONS: PairArray = [[33, 7], [7, 163], [163, 144], [144, 145], [145, 153], [153, 154], [154, 155], [155, 133], [33, 246], [246, 161], [161, 160], [160, 159], [159, 158], [158, 157], [157, 173], [173, 133]];\n\nconst RIGHT_EYEBROW_CONNECTIONS: PairArray = [[46, 53], [53, 52], [52, 65], [65, 55], [70, 63], [63, 105], [105, 66], [66, 107]];\n\nconst RIGHT_IRIS_CONNECTIONS: PairArray = [[469, 470], [470, 471], [471, 472], [472, 469]];\n\nconst FACE_OVAL_CONNECTIONS: PairArray = [\n [10, 338], [338, 297], [297, 332], [332, 284], [284, 251], [251, 389], [389, 356], [356, 454], [454, 323], [323, 361], [361, 288], [288, 397], [397, 365], [365, 379], [379, 378], [378, 400], [400, 377], [377, 152],\n [152, 148], [148, 176], [176, 149], [149, 150], [150, 136], [136, 172], [172, 58], [58, 132], [132, 93], [93, 234], [234, 127], [127, 162], [162, 21], [21, 54], [54, 103], [103, 67], [67, 109], [109, 10],\n];\n\nexport const MEDIAPIPE_FACE_MESH_CONNECTED_KEYPOINTS_PAIRS: PairArray = [\n [127, 34], [34, 139], [139, 127], [11, 0], [0, 37], [37, 11], [232, 231], [231, 120], [120, 232], [72, 37], [37, 39], [39, 72], [128, 121], [121, 47], [47, 128], [232, 121], [121, 128], [128, 232],\n [104, 69], [69, 67], [67, 104], [175, 171], [171, 148], [148, 175], [118, 50], [50, 101], [101, 118], [73, 39], [39, 40], [40, 73], [9, 151], [151, 108], [108, 9], [48, 115], [115, 131], [131, 48],\n [194, 204], [204, 211], [211, 194], [74, 40], [40, 185], [185, 74], [80, 42], [42, 183], [183, 80], [40, 92], [92, 186], [186, 40], [230, 229], [229, 118], [118, 230], [202, 212], [212, 214], [214, 202],\n [83, 18], [18, 17], [17, 83], [76, 61], [61, 146], [146, 76], [160, 29], [29, 30], [30, 160], [56, 157], [157, 173], [173, 56], [106, 204], [204, 194], [194, 106], [135, 214], [214, 192], [192, 135],\n [203, 165], [165, 98], [98, 203], [21, 71], [71, 68], [68, 21], [51, 45], [45, 4], [4, 51], [144, 24], [24, 23], [23, 144], [77, 146], [146, 91], [91, 77], [205, 50], [50, 187], [187, 205],\n [201, 200], [200, 18], [18, 201], [91, 106], [106, 182], [182, 91], [90, 91], [91, 181], [181, 90], [85, 84], [84, 17], [17, 85], [206, 203], [203, 36], [36, 206], [148, 171], [171, 140], [140, 148],\n [92, 40], [40, 39], [39, 92], [193, 189], [189, 244], [244, 193], [159, 158], [158, 28], [28, 159], [247, 246], [246, 161], [161, 247], [236, 3], [3, 196], [196, 236], [54, 68], [68, 104], [104, 54],\n [193, 168], [168, 8], [8, 193], [117, 228], [228, 31], [31, 117], [189, 193], [193, 55], [55, 189], [98, 97], [97, 99], [99, 98], [126, 47], [47, 100], [100, 126], [166, 79], [79, 218], [218, 166],\n [155, 154], [154, 26], [26, 155], [209, 49], [49, 131], [131, 209], [135, 136], [136, 150], [150, 135], [47, 126], [126, 217], [217, 47], [223, 52], [52, 53], [53, 223], [45, 51], [51, 134], [134, 45],\n [211, 170], [170, 140], [140, 211], [67, 69], [69, 108], [108, 67], [43, 106], [106, 91], [91, 43], [230, 119], [119, 120], [120, 230], [226, 130], [130, 247], [247, 226], [63, 53], [53, 52], [52, 63],\n [238, 20], [20, 242], [242, 238], [46, 70], [70, 156], [156, 46], [78, 62], [62, 96], [96, 78], [46, 53], [53, 63], [63, 46], [143, 34], [34, 227], [227, 143], [123, 117], [117, 111], [111, 123],\n [44, 125], [125, 19], [19, 44], [236, 134], [134, 51], [51, 236], [216, 206], [206, 205], [205, 216], [154, 153], [153, 22], [22, 154], [39, 37], [37, 167], [167, 39], [200, 201], [201, 208], [208, 200],\n [36, 142], [142, 100], [100, 36], [57, 212], [212, 202], [202, 57], [20, 60], [60, 99], [99, 20], [28, 158], [158, 157], [157, 28], [35, 226], [226, 113], [113, 35], [160, 159], [159, 27], [27, 160],\n [204, 202], [202, 210], [210, 204], [113, 225], [225, 46], [46, 113], [43, 202], [202, 204], [204, 43], [62, 76], [76, 77], [77, 62], [137, 123], [123, 116], [116, 137], [41, 38], [38, 72], [72, 41],\n [203, 129], [129, 142], [142, 203], [64, 98], [98, 240], [240, 64], [49, 102], [102, 64], [64, 49], [41, 73], [73, 74], [74, 41], [212, 216], [216, 207], [207, 212], [42, 74], [74, 184], [184, 42],\n [169, 170], [170, 211], [211, 169], [170, 149], [149, 176], [176, 170], [105, 66], [66, 69], [69, 105], [122, 6], [6, 168], [168, 122], [123, 147], [147, 187], [187, 123], [96, 77], [77, 90], [90, 96],\n [65, 55], [55, 107], [107, 65], [89, 90], [90, 180], [180, 89], [101, 100], [100, 120], [120, 101], [63, 105], [105, 104], [104, 63], [93, 137], [137, 227], [227, 93], [15, 86], [86, 85], [85, 15],\n [129, 102], [102, 49], [49, 129], [14, 87], [87, 86], [86, 14], [55, 8], [8, 9], [9, 55], [100, 47], [47, 121], [121, 100], [145, 23], [23, 22], [22, 145], [88, 89], [89, 179], [179, 88],\n [6, 122], [122, 196], [196, 6], [88, 95], [95, 96], [96, 88], [138, 172], [172, 136], [136, 138], [215, 58], [58, 172], [172, 215], [115, 48], [48, 219], [219, 115], [42, 80], [80, 81], [81, 42],\n [195, 3], [3, 51], [51, 195], [43, 146], [146, 61], [61, 43], [171, 175], [175, 199], [199, 171], [81, 82], [82, 38], [38, 81], [53, 46], [46, 225], [225, 53], [144, 163], [163, 110], [110, 144],\n [52, 65], [65, 66], [66, 52], [229, 228], [228, 117], [117, 229], [34, 127], [127, 234], [234, 34], [107, 108], [108, 69], [69, 107], [109, 108], [108, 151], [151, 109], [48, 64], [64, 235], [235, 48],\n [62, 78], [78, 191], [191, 62], [129, 209], [209, 126], [126, 129], [111, 35], [35, 143], [143, 111], [117, 123], [123, 50], [50, 117], [222, 65], [65, 52], [52, 222], [19, 125], [125, 141], [141, 19],\n [221, 55], [55, 65], [65, 221], [3, 195], [195, 197], [197, 3], [25, 7], [7, 33], [33, 25], [220, 237], [237, 44], [44, 220], [70, 71], [71, 139], [139, 70], [122, 193], [193, 245], [245, 122],\n [247, 130], [130, 33], [33, 247], [71, 21], [21, 162], [162, 71], [170, 169], [169, 150], [150, 170], [188, 174], [174, 196], [196, 188], [216, 186], [186, 92], [92, 216], [2, 97], [97, 167], [167, 2],\n [141, 125], [125, 241], [241, 141], [164, 167], [167, 37], [37, 164], [72, 38], [38, 12], [12, 72], [38, 82], [82, 13], [13, 38], [63, 68], [68, 71], [71, 63], [226, 35], [35, 111], [111, 226],\n [101, 50], [50, 205], [205, 101], [206, 92], [92, 165], [165, 206], [209, 198], [198, 217], [217, 209], [165, 167], [167, 97], [97, 165], [220, 115], [115, 218], [218, 220], [133, 112], [112, 243], [243, 133],\n [239, 238], [238, 241], [241, 239], [214, 135], [135, 169], [169, 214], [190, 173], [173, 133], [133, 190], [171, 208], [208, 32], [32, 171], [125, 44], [44, 237], [237, 125], [86, 87], [87, 178], [178, 86],\n [85, 86], [86, 179], [179, 85], [84, 85], [85, 180], [180, 84], [83, 84], [84, 181], [181, 83], [201, 83], [83, 182], [182, 201], [137, 93], [93, 132], [132, 137], [76, 62], [62, 183], [183, 76],\n [61, 76], [76, 184], [184, 61], [57, 61], [61, 185], [185, 57], [212, 57], [57, 186], [186, 212], [214, 207], [207, 187], [187, 214], [34, 143], [143, 156], [156, 34], [79, 239], [239, 237], [237, 79],\n [123, 137], [137, 177], [177, 123], [44, 1], [1, 4], [4, 44], [201, 194], [194, 32], [32, 201], [64, 102], [102, 129], [129, 64], [213, 215], [215, 138], [138, 213], [59, 166], [166, 219], [219, 59],\n [242, 99], [99, 97], [97, 242], [2, 94], [94, 141], [141, 2], [75, 59], [59, 235], [235, 75], [24, 110], [110, 228], [228, 24], [25, 130], [130, 226], [226, 25], [23, 24], [24, 229], [229, 23],\n [22, 23], [23, 230], [230, 22], [26, 22], [22, 231], [231, 26], [112, 26], [26, 232], [232, 112], [189, 190], [190, 243], [243, 189], [221, 56], [56, 190], [190, 221], [28, 56], [56, 221], [221, 28],\n [27, 28], [28, 222], [222, 27], [29, 27], [27, 223], [223, 29], [30, 29], [29, 224], [224, 30], [247, 30], [30, 225], [225, 247], [238, 79], [79, 20], [20, 238], [166, 59], [59, 75], [75, 166],\n [60, 75], [75, 240], [240, 60], [147, 177], [177, 215], [215, 147], [20, 79], [79, 166], [166, 20], [187, 147], [147, 213], [213, 187], [112, 233], [233, 244], [244, 112], [233, 128], [128, 245], [245, 233],\n [128, 114], [114, 188], [188, 128], [114, 217], [217, 174], [174, 114], [131, 115], [115, 220], [220, 131], [217, 198], [198, 236], [236, 217], [198, 131], [131, 134], [134, 198], [177, 132], [132, 58], [58, 177],\n [143, 35], [35, 124], [124, 143], [110, 163], [163, 7], [7, 110], [228, 110], [110, 25], [25, 228], [356, 389], [389, 368], [368, 356], [11, 302], [302, 267], [267, 11], [452, 350], [350, 349], [349, 452],\n [302, 303], [303, 269], [269, 302], [357, 343], [343, 277], [277, 357], [452, 453], [453, 357], [357, 452], [333, 332], [332, 297], [297, 333], [175, 152], [152, 377], [377, 175], [347, 348], [348, 330], [330, 347],\n [303, 304], [304, 270], [270, 303], [9, 336], [336, 337], [337, 9], [278, 279], [279, 360], [360, 278], [418, 262], [262, 431], [431, 418], [304, 408], [408, 409], [409, 304], [310, 415], [415, 407], [407, 310],\n [270, 409], [409, 410], [410, 270], [450, 348], [348, 347], [347, 450], [422, 430], [430, 434], [434, 422], [313, 314], [314, 17], [17, 313], [306, 307], [307, 375], [375, 306], [387, 388], [388, 260], [260, 387],\n [286, 414], [414, 398], [398, 286], [335, 406], [406, 418], [418, 335], [364, 367], [367, 416], [416, 364], [423, 358], [358, 327], [327, 423], [251, 284], [284, 298], [298, 251], [281, 5], [5, 4], [4, 281],\n [373, 374], [374, 253], [253, 373], [307, 320], [320, 321], [321, 307], [425, 427], [427, 411], [411, 425], [421, 313], [313, 18], [18, 421], [321, 405], [405, 406], [406, 321], [320, 404], [404, 405], [405, 320],\n [315, 16], [16, 17], [17, 315], [426, 425], [425, 266], [266, 426], [377, 400], [400, 369], [369, 377], [322, 391], [391, 269], [269, 322], [417, 465], [465, 464], [464, 417], [386, 257], [257, 258], [258, 386],\n [466, 260], [260, 388], [388, 466], [456, 399], [399, 419], [419, 456], [284, 332], [332, 333], [333, 284], [417, 285], [285, 8], [8, 417], [346, 340], [340, 261], [261, 346], [413, 441], [441, 285], [285, 413],\n [327, 460], [460, 328], [328, 327], [355, 371], [371, 329], [329, 355], [392, 439], [439, 438], [438, 392], [382, 341], [341, 256], [256, 382], [429, 420], [420, 360], [360, 429], [364, 394], [394, 379], [379, 364],\n [277, 343], [343, 437], [437, 277], [443, 444], [444, 283], [283, 443], [275, 440], [440, 363], [363, 275], [431, 262], [262, 369], [369, 431], [297, 338], [338, 337], [337, 297], [273, 375], [375, 321], [321, 273],\n [450, 451], [451, 349], [349, 450], [446, 342], [342, 467], [467, 446], [293, 334], [334, 282], [282, 293], [458, 461], [461, 462], [462, 458], [276, 353], [353, 383], [383, 276], [308, 324], [324, 325], [325, 308],\n [276, 300], [300, 293], [293, 276], [372, 345], [345, 447], [447, 372], [352, 345], [345, 340], [340, 352], [274, 1], [1, 19], [19, 274], [456, 248], [248, 281], [281, 456], [436, 427], [427, 425], [425, 436],\n [381, 256], [256, 252], [252, 381], [269, 391], [391, 393], [393, 269], [200, 199], [199, 428], [428, 200], [266, 330], [330, 329], [329, 266], [287, 273], [273, 422], [422, 287], [250, 462], [462, 328], [328, 250],\n [258, 286], [286, 384], [384, 258], [265, 353], [353, 342], [342, 265], [387, 259], [259, 257], [257, 387], [424, 431], [431, 430], [430, 424], [342, 353], [353, 276], [276, 342], [273, 335], [335, 424], [424, 273],\n [292, 325], [325, 307], [307, 292], [366, 447], [447, 345], [345, 366], [271, 303], [303, 302], [302, 271], [423, 266], [266, 371], [371, 423], [294, 455], [455, 460], [460, 294], [279, 278], [278, 294], [294, 279],\n [271, 272], [272, 304], [304, 271], [432, 434], [434, 427], [427, 432], [272, 407], [407, 408], [408, 272], [394, 430], [430, 431], [431, 394], [395, 369], [369, 400], [400, 395], [334, 333], [333, 299], [299, 334],\n [351, 417], [417, 168], [168, 351], [352, 280], [280, 411], [411, 352], [325, 319], [319, 320], [320, 325], [295, 296], [296, 336], [336, 295], [319, 403], [403, 404], [404, 319], [330, 348], [348, 349], [349, 330],\n [293, 298], [298, 333], [333, 293], [323, 454], [454, 447], [447, 323], [15, 16], [16, 315], [315, 15], [358, 429], [429, 279], [279, 358], [14, 15], [15, 316], [316, 14], [285, 336], [336, 9], [9, 285],\n [329, 349], [349, 350], [350, 329], [374, 380], [380, 252], [252, 374], [318, 402], [402, 403], [403, 318], [6, 197], [197, 419], [419, 6], [318, 319], [319, 325], [325, 318], [367, 364], [364, 365], [365, 367],\n [435, 367], [367, 397], [397, 435], [344, 438], [438, 439], [439, 344], [272, 271], [271, 311], [311, 272], [195, 5], [5, 281], [281, 195], [273, 287], [287, 291], [291, 273], [396, 428], [428, 199], [199, 396],\n [311, 271], [271, 268], [268, 311], [283, 444], [444, 445], [445, 283], [373, 254], [254, 339], [339, 373], [282, 334], [334, 296], [296, 282], [449, 347], [347, 346], [346, 449], [264, 447], [447, 454], [454, 264],\n [336, 296], [296, 299], [299, 336], [338, 10], [10, 151], [151, 338], [278, 439], [439, 455], [455, 278], [292, 407], [407, 415], [415, 292], [358, 371], [371, 355], [355, 358], [340, 345], [345, 372], [372, 340],\n [346, 347], [347, 280], [280, 346], [442, 443], [443, 282], [282, 442], [19, 94], [94, 370], [370, 19], [441, 442], [442, 295], [295, 441], [248, 419], [419, 197], [197, 248], [263, 255], [255, 359], [359, 263],\n [440, 275], [275, 274], [274, 440], [300, 383], [383, 368], [368, 300], [351, 412], [412, 465], [465, 351], [263, 467], [467, 466], [466, 263], [301, 368], [368, 389], [389, 301], [395, 378], [378, 379], [379, 395],\n [412, 351], [351, 419], [419, 412], [436, 426], [426, 322], [322, 436], [2, 164], [164, 393], [393, 2], [370, 462], [462, 461], [461, 370], [164, 0], [0, 267], [267, 164], [302, 11], [11, 12], [12, 302],\n [268, 12], [12, 13], [13, 268], [293, 300], [300, 301], [301, 293], [446, 261], [261, 340], [340, 446], [330, 266], [266, 425], [425, 330], [426, 423], [423, 391], [391, 426], [429, 355], [355, 437], [437, 429],\n [391, 327], [327, 326], [326, 391], [440, 457], [457, 438], [438, 440], [341, 382], [382, 362], [362, 341], [459, 457], [457, 461], [461, 459], [434, 430], [430, 394], [394, 434], [414, 463], [463, 362], [362, 414],\n [396, 369], [369, 262], [262, 396], [354, 461], [461, 457], [457, 354], [316, 403], [403, 402], [402, 316], [315, 404], [404, 403], [403, 315], [314, 405], [405, 404], [404, 314], [313, 406], [406, 405], [405, 313],\n [421, 418], [418, 406], [406, 421], [366, 401], [401, 361], [361, 366], [306, 408], [408, 407], [407, 306], [291, 409], [409, 408], [408, 291], [287, 410], [410, 409], [409, 287], [432, 436], [436, 410], [410, 432],\n [434, 416], [416, 411], [411, 434], [264, 368], [368, 383], [383, 264], [309, 438], [438, 457], [457, 309], [352, 376], [376, 401], [401, 352], [274, 275], [275, 4], [4, 274], [421, 428], [428, 262], [262, 421],\n [294, 327], [327, 358], [358, 294], [433, 416], [416, 367], [367, 433], [289, 455], [455, 439], [439, 289], [462, 370], [370, 326], [326, 462], [2, 326], [326, 370], [370, 2], [305, 460], [460, 455], [455, 305],\n [254, 449], [449, 448], [448, 254], [255, 261], [261, 446], [446, 255], [253, 450], [450, 449], [449, 253], [252, 451], [451, 450], [450, 252], [256, 452], [452, 451], [451, 256], [341, 453], [453, 452], [452, 341],\n [413, 464], [464, 463], [463, 413], [441, 413], [413, 414], [414, 441], [258, 442], [442, 441], [441, 258], [257, 443], [443, 442], [442, 257], [259, 444], [444, 443], [443, 259], [260, 445], [445, 444], [444, 260],\n [467, 342], [342, 445], [445, 467], [459, 458], [458, 250], [250, 459], [289, 392], [392, 290], [290, 289], [290, 328], [328, 460], [460, 290], [376, 433], [433, 435], [435, 376], [250, 290], [290, 392], [392, 250],\n [411, 416], [416, 433], [433, 411], [341, 463], [463, 464], [464, 341], [453, 464], [464, 465], [465, 453], [357, 465], [465, 412], [412, 357], [343, 412], [412, 399], [399, 343], [360, 363], [363, 440], [440, 360],\n [437, 399], [399, 456], [456, 437], [420, 456], [456, 363], [363, 420], [401, 435], [435, 288], [288, 401], [372, 383], [383, 353], [353, 372], [339, 255], [255, 249], [249, 339], [448, 261], [261, 255], [255, 448],\n [133, 243], [243, 190], [190, 133], [133, 155], [155, 112], [112, 133], [33, 246], [246, 247], [247, 33], [33, 130], [130, 25], [25, 33], [398, 384], [384, 286], [286, 398], [362, 398], [398, 414], [414, 362],\n [362, 463], [463, 341], [341, 362], [263, 359], [359, 467], [467, 263], [263, 249], [249, 255], [255, 263], [466, 467], [467, 260], [260, 466], [75, 60], [60, 166], [166, 75], [238, 239], [239, 79], [79, 238],\n [162, 127], [127, 139], [139, 162], [72, 11], [11, 37], [37, 72], [121, 232], [232, 120], [120, 121], [73, 72], [72, 39], [39, 73], [114, 128], [128, 47], [47, 114], [233, 232], [232, 128], [128, 233],\n [103, 104], [104, 67], [67, 103], [152, 175], [175, 148], [148, 152], [119, 118], [118, 101], [101, 119], [74, 73], [73, 40], [40, 74], [107, 9], [9, 108], [108, 107], [49, 48], [48, 131], [131, 49],\n [32, 194], [194, 211], [211, 32], [184, 74], [74, 185], [185, 184], [191, 80], [80, 183], [183, 191], [185, 40], [40, 186], [186, 185], [119, 230], [230, 118], [118, 119], [210, 202], [202, 214], [214, 210],\n [84, 83], [83, 17], [17, 84], [77, 76], [76, 146], [146, 77], [161, 160], [160, 30], [30, 161], [190, 56], [56, 173], [173, 190], [182, 106], [106, 194], [194, 182], [138, 135], [135, 192], [192, 138],\n [129, 203], [203, 98], [98, 129], [54, 21], [21, 68], [68, 54], [5, 51], [51, 4], [4, 5], [145, 144], [144, 23], [23, 145], [90, 77], [77, 91], [91, 90], [207, 205], [205, 187], [187, 207],\n [83, 201], [201, 18], [18, 83], [181, 91], [91, 182], [182, 181], [180, 90], [90, 181], [181, 180], [16, 85], [85, 17], [17, 16], [205, 206], [206, 36], [36, 205], [176, 148], [148, 140], [140, 176],\n [165, 92], [92, 39], [39, 165], [245, 193], [193, 244], [244, 245], [27, 159], [159, 28], [28, 27], [30, 247], [247, 161], [161, 30], [174, 236], [236, 196], [196, 174], [103, 54], [54, 104], [104, 103],\n [55, 193], [193, 8], [8, 55], [111, 117], [117, 31], [31, 111], [221, 189], [189, 55], [55, 221], [240, 98], [98, 99], [99, 240], [142, 126], [126, 100], [100, 142], [219, 166], [166, 218], [218, 219],\n [112, 155], [155, 26], [26, 112], [198, 209], [209, 131], [131, 198], [169, 135], [135, 150], [150, 169], [114, 47], [47, 217], [217, 114], [224, 223], [223, 53], [53, 224], [220, 45], [45, 134], [134, 220],\n [32, 211], [211, 140], [140, 32], [109, 67], [67, 108], [108, 109], [146, 43], [43, 91], [91, 146], [231, 230], [230, 120], [120, 231], [113, 226], [226, 247], [247, 113], [105, 63], [63, 52], [52, 105],\n [241, 238], [238, 242], [242, 241], [124, 46], [46, 156], [156, 124], [95, 78], [78, 96], [96, 95], [70, 46], [46, 63], [63, 70], [116, 143], [143, 227], [227, 116], [116, 123], [123, 111], [111, 116],\n [1, 44], [44, 19], [19, 1], [3, 236], [236, 51], [51, 3], [207, 216], [216, 205], [205, 207], [26, 154], [154, 22], [22, 26], [165, 39], [39, 167], [167, 165], [199, 200], [200, 208], [208, 199],\n [101, 36], [36, 100], [100, 101], [43, 57], [57, 202], [202, 43], [242, 20], [20, 99], [99, 242], [56, 28], [28, 157], [157, 56], [124, 35], [35, 113], [113, 124], [29, 160], [160, 27], [27, 29],\n [211, 204], [204, 210], [210, 211], [124, 113], [113, 46], [46, 124], [106, 43], [43, 204], [204, 106], [96, 62], [62, 77], [77, 96], [227, 137], [137, 116], [116, 227], [73, 41], [41, 72], [72, 73],\n [36, 203], [203, 142], [142, 36], [235, 64], [64, 240], [240, 235], [48, 49], [49, 64], [64, 48], [42, 41], [41, 74], [74, 42], [214, 212], [212, 207], [207, 214], [183, 42], [42, 184], [184, 183],\n [210, 169], [169, 211], [211, 210], [140, 170], [170, 176], [176, 140], [104, 105], [105, 69], [69, 104], [193, 122], [122, 168], [168, 193], [50, 123], [123, 187], [187, 50], [89, 96], [96, 90], [90, 89],\n [66, 65], [65, 107], [107, 66], [179, 89], [89, 180], [180, 179], [119, 101], [101, 120], [120, 119], [68, 63], [63, 104], [104, 68], [234, 93], [93, 227], [227, 234], [16, 15], [15, 85], [85, 16],\n [209, 129], [129, 49], [49, 209], [15, 14], [14, 86], [86, 15], [107, 55], [55, 9], [9, 107], [120, 100], [100, 121], [121, 120], [153, 145], [145, 22], [22, 153], [178, 88], [88, 179], [179, 178],\n [197, 6], [6, 196], [196, 197], [89, 88], [88, 96], [96, 89], [135, 138], [138, 136], [136, 135], [138, 215], [215, 172], [172, 138], [218, 115], [115, 219], [219, 218], [41, 42], [42, 81], [81, 41],\n [5, 195], [195, 51], [51, 5], [57, 43], [43, 61], [61, 57], [208, 171], [171, 199], [199, 208], [41, 81], [81, 38], [38, 41], [224, 53], [53, 225], [225, 224], [24, 144], [144, 110], [110, 24],\n [105, 52], [52, 66], [66, 105], [118, 229], [229, 117], [117, 118], [227, 34], [34, 234], [234, 227], [66, 107], [107, 69], [69, 66], [10, 109], [109, 151], [151, 10], [219, 48], [48, 235], [235, 219],\n [183, 62], [62, 191], [191, 183], [142, 129], [129, 126], [126, 142], [116, 111], [111, 143], [143, 116], [118, 117], [117, 50], [50, 118], [223, 222], [222, 52], [52, 223], [94, 19], [19, 141], [141, 94],\n [222, 221], [221, 65], [65, 222], [196, 3], [3, 197], [197, 196], [45, 220], [220, 44], [44, 45], [156, 70], [70, 139], [139, 156], [188, 122], [122, 245], [245, 188], [139, 71], [71, 162], [162, 139],\n [149, 170], [170, 150], [150, 149], [122, 188], [188, 196], [196, 122], [206, 216], [216, 92], [92, 206], [164, 2], [2, 167], [167, 164], [242, 141], [141, 241], [241, 242], [0, 164], [164, 37], [37, 0],\n [11, 72], [72, 12], [12, 11], [12, 38], [38, 13], [13, 12], [70, 63], [63, 71], [71, 70], [31, 226], [226, 111], [111, 31], [36, 101], [101, 205], [205, 36], [203, 206], [206, 165], [165, 203],\n [126, 209], [209, 217], [217, 126], [98, 165], [165, 97], [97, 98], [237, 220], [220, 218], [218, 237], [237, 239], [239, 241], [241, 237], [210, 214], [214, 169], [169, 210], [140, 171], [171, 32], [32, 140],\n [241, 125], [125, 237], [237, 241], [179, 86], [86, 178], [178, 179], [180, 85], [85, 179], [179, 180], [181, 84], [84, 180], [180, 181], [182, 83], [83, 181], [181, 182], [194, 201], [201, 182], [182, 194],\n [177, 137], [137, 132], [132, 177], [184, 76], [76, 183], [183, 184], [185, 61], [61, 184], [184, 185], [186, 57], [57, 185], [185, 186], [216, 212], [212, 186], [186, 216], [192, 214], [214, 187], [187, 192],\n [139, 34], [34, 156], [156, 139], [218, 79], [79, 237], [237, 218], [147, 123], [123, 177], [177, 147], [45, 44], [44, 4], [4, 45], [208, 201], [201, 32], [32, 208], [98, 64], [64, 129], [129, 98],\n [192, 213], [213, 138], [138, 192], [235, 59], [59, 219], [219, 235], [141, 242], [242, 97], [97, 141], [97, 2], [2, 141], [141, 97], [240, 75], [75, 235], [235, 240], [229, 24], [24, 228], [228, 229],\n [31, 25], [25, 226], [226, 31], [230, 23], [23, 229], [229, 230], [231, 22], [22, 230], [230, 231], [232, 26], [26, 231], [231, 232], [233, 112], [112, 232], [232, 233], [244, 189], [189, 243], [243, 244],\n [189, 221], [221, 190], [190, 189], [222, 28], [28, 221], [221, 222], [223, 27], [27, 222], [222, 223], [224, 29], [29, 223], [223, 224], [225, 30], [30, 224], [224, 225], [113, 247], [247, 225], [225, 113],\n [99, 60], [60, 240], [240, 99], [213, 147], [147, 215], [215, 213], [60, 20], [20, 166], [166, 60], [192, 187], [187, 213], [213, 192], [243, 112], [112, 244], [244, 243], [244, 233], [233, 245], [245, 244],\n [245, 128], [128, 188], [188, 245], [188, 114], [114, 174], [174, 188], [134, 131], [131, 220], [220, 134], [174, 217], [217, 236], [236, 174], [236, 198], [198, 134], [134, 236], [215, 177], [177, 58], [58, 215],\n [156, 143], [143, 124], [124, 156], [25, 110], [110, 7], [7, 25], [31, 228], [228, 25], [25, 31], [264, 356], [356, 368], [368, 264], [0, 11], [11, 267], [267, 0], [451, 452], [452, 349], [349, 451],\n [267, 302], [302, 269], [269, 267], [350, 357], [357, 277], [277, 350], [350, 452], [452, 357], [357, 350], [299, 333], [333, 297], [297, 299], [396, 175], [175, 377], [377, 396], [280, 347], [347, 330], [330, 280],\n [269, 303], [303, 270], [270, 269], [151, 9], [9, 337], [337, 151], [344, 278], [278, 360], [360, 344], [424, 418], [418, 431], [431, 424], [270, 304], [304, 409], [409, 270], [272, 310], [310, 407], [407, 272],\n [322, 270], [270, 410], [410, 322], [449, 450], [450, 347], [347, 449], [432, 422], [422, 434], [434, 432], [18, 313], [313, 17], [17, 18], [291, 306], [306, 375], [375, 291], [259, 387], [387, 260], [260, 259],\n [424, 335], [335, 418], [418, 424], [434, 364], [364, 416], [416, 434], [391, 423], [423, 327], [327, 391], [301, 251], [251, 298], [298, 301], [275, 281], [281, 4], [4, 275], [254, 373], [373, 253], [253, 254],\n [375, 307], [307, 321], [321, 375], [280, 425], [425, 411], [411, 280], [200, 421], [421, 18], [18, 200], [335, 321], [321, 406], [406, 335], [321, 320], [320, 405], [405, 321], [314, 315], [315, 17], [17, 314],\n [423, 426], [426, 266], [266, 423], [396, 377], [377, 369], [369, 396], [270, 322], [322, 269], [269, 270], [413, 417], [417, 464], [464, 413], [385, 386], [386, 258], [258, 385], [248, 456], [456, 419], [419, 248],\n [298, 284], [284, 333], [333, 298], [168, 417], [417, 8], [8, 168], [448, 346], [346, 261], [261, 448], [417, 413], [413, 285], [285, 417], [326, 327], [327, 328], [328, 326], [277, 355], [355, 329], [329, 277],\n [309, 392], [392, 438], [438, 309], [381, 382], [382, 256], [256, 381], [279, 429], [429, 360], [360, 279], [365, 364], [364, 379], [379, 365], [355, 277], [277, 437], [437, 355], [282, 443], [443, 283], [283, 282],\n [281, 275], [275, 363], [363, 281], [395, 431], [431, 369], [369, 395], [299, 297], [297, 337], [337, 299], [335, 273], [273, 321], [321, 335], [348, 450], [450, 349], [349, 348], [359, 446], [446, 467], [467, 359],\n [283, 293], [293, 282], [282, 283], [250, 458], [458, 462], [462, 250], [300, 276], [276, 383], [383, 300], [292, 308], [308, 325], [325, 292], [283, 276], [276, 293], [293, 283], [264, 372], [372, 447], [447, 264],\n [346, 352], [352, 340], [340, 346], [354, 274], [274, 19], [19, 354], [363, 456], [456, 281], [281, 363], [426, 436], [436, 425], [425, 426], [380, 381], [381, 252], [252, 380], [267, 269], [269, 393], [393, 267],\n [421, 200], [200, 428], [428, 421], [371, 266], [266, 329], [329, 371], [432, 287], [287, 422], [422, 432], [290, 250], [250, 328], [328, 290], [385, 258], [258, 384], [384, 385], [446, 265], [265, 342], [342, 446],\n [386, 387], [387, 257], [257, 386], [422, 424], [424, 430], [430, 422], [445, 342], [342, 276], [276, 445], [422, 273], [273, 424], [424, 422], [306, 292], [292, 307], [307, 306], [352, 366], [366, 345], [345, 352],\n [268, 271], [271, 302], [302, 268], [358, 423], [423, 371], [371, 358], [327, 294], [294, 460], [460, 327], [331, 279], [279, 294], [294, 331], [303, 271], [271, 304], [304, 303], [436, 432], [432, 427], [427, 436],\n [304, 272], [272, 408], [408, 304], [395, 394], [394, 431], [431, 395], [378, 395], [395, 400], [400, 378], [296, 334], [334, 299], [299, 296], [6, 351], [351, 168], [168, 6], [376, 352], [352, 411], [411, 376],\n [307, 325], [325, 320], [320, 307], [285, 295], [295, 336], [336, 285], [320, 319], [319, 404], [404, 320], [329, 330], [330, 349], [349, 329], [334, 293], [293, 333], [333, 334], [366, 323], [323, 447], [447, 366],\n [316, 15], [15, 315], [315, 316], [331, 358], [358, 279], [279, 331], [317, 14], [14, 316], [316, 317], [8, 285], [285, 9], [9, 8], [277, 329], [329, 350], [350, 277], [253, 374], [374, 252], [252, 253],\n [319, 318], [318, 403], [403, 319], [351, 6], [6, 419], [419, 351], [324, 318], [318, 325], [325, 324], [397, 367], [367, 365], [365, 397], [288, 435], [435, 397], [397, 288], [278, 344], [344, 439], [439, 278],\n [310, 272], [272, 311], [311, 310], [248, 195], [195, 281], [281, 248], [375, 273], [273, 291], [291, 375], [175, 396], [396, 199], [199, 175], [312, 311], [311, 268], [268, 312], [276, 283], [283, 445], [445, 276],\n [390, 373], [373, 339], [339, 390], [295, 282], [282, 296], [296, 295], [448, 449], [449, 346], [346, 448], [356, 264], [264, 454], [454, 356], [337, 336], [336, 299], [299, 337], [337, 338], [338, 151], [151, 337],\n [294, 278], [278, 455], [455, 294], [308, 292], [292, 415], [415, 308], [429, 358], [358, 355], [355, 429], [265, 340], [340, 372], [372, 265], [352, 346], [346, 280], [280, 352], [295, 442], [442, 282], [282, 295],\n [354, 19], [19, 370], [370, 354], [285, 441], [441, 295], [295, 285], [195, 248], [248, 197], [197, 195], [457, 440], [440, 274], [274, 457], [301, 300], [300, 368], [368, 301], [417, 351], [351, 465], [465, 417],\n [251, 301], [301, 389], [389, 251], [394, 395], [395, 379], [379, 394], [399, 412], [412, 419], [419, 399], [410, 436], [436, 322], [322, 410], [326, 2], [2, 393], [393, 326], [354, 370], [370, 461], [461, 354],\n [393, 164], [164, 267], [267, 393], [268, 302], [302, 12], [12, 268], [312, 268], [268, 13], [13, 312], [298, 293], [293, 301], [301, 298], [265, 446], [446, 340], [340, 265], [280, 330], [330, 425], [425, 280],\n [322, 426], [426, 391], [391, 322], [420, 429], [429, 437], [437, 420], [393, 391], [391, 326], [326, 393], [344, 440], [440, 438], [438, 344], [458, 459], [459, 461], [461, 458], [364, 434], [434, 394], [394, 364],\n [428, 396], [396, 262], [262, 428], [274, 354], [354, 457], [457, 274], [317, 316], [316, 402], [402, 317], [316, 315], [315, 403], [403, 316], [315, 314], [314, 404], [404, 315], [314, 313], [313, 405], [405, 314],\n [313, 421], [421, 406], [406, 313], [323, 366], [366, 361], [361, 323], [292, 306], [306, 407], [407, 292], [306, 291], [291, 408], [408, 306], [291, 287], [287, 409], [409, 291], [287, 432], [432, 410], [410, 287],\n [427, 434], [434, 411], [411, 427], [372, 264], [264, 383], [383, 372], [459, 309], [309, 457], [457, 459], [366, 352], [352, 401], [401, 366], [1, 274], [274, 4], [4, 1], [418, 421], [421, 262], [262, 418],\n [331, 294], [294, 358], [358, 331], [435, 433], [433, 367], [367, 435], [392, 289], [289, 439], [439, 392], [328, 462], [462, 326], [326, 328], [94, 2], [2, 370], [370, 94], [289, 305], [305, 455], [455, 289],\n [339, 254], [254, 448], [448, 339], [359, 255], [255, 446], [446, 359], [254, 253], [253, 449], [449, 254], [253, 252], [252, 450], [450, 253], [252, 256], [256, 451], [451, 252], [256, 341], [341, 452], [452, 256],\n [414, 413], [413, 463], [463, 414], [286, 441], [441, 414], [414, 286], [286, 258], [258, 441], [441, 286], [258, 257], [257, 442], [442, 258], [257, 259], [259, 443], [443, 257], [259, 260], [260, 444], [444, 259],\n [260, 467], [467, 445], [445, 260], [309, 459], [459, 250], [250, 309], [305, 289], [289, 290], [290, 305], [305, 290], [290, 460], [460, 305], [401, 376], [376, 435], [435, 401], [309, 250], [250, 392], [392, 309],\n [376, 411], [411, 433], [433, 376], [453, 341], [341, 464], [464, 453], [357, 453], [453, 465], [465, 357], [343, 357], [357, 412], [412, 343], [437, 343], [343, 399], [399, 437], [344, 360], [360, 440], [440, 344],\n [420, 437], [437, 456], [456, 420], [360, 420], [420, 363], [363, 360], [361, 401], [401, 288], [288, 361], [265, 372], [372, 353], [353, 265], [390, 339], [339, 249], [249, 390], [339, 448], [448, 255], [255, 339],\n];\n\nfunction connectionsToIndices(connections: PairArray) {\n const indices = connections.map((connection) => connection[0]);\n indices.push(connections[connections.length - 1][1]);\n return indices;\n}\n\nexport const MEDIAPIPE_FACE_MESH_KEYPOINTS_BY_CONTOUR = {\n lips: connectionsToIndices(LIPS_CONNECTIONS),\n leftEye: connectionsToIndices(LEFT_EYE_CONNECTIONS),\n leftEyebrow: connectionsToIndices(LEFT_EYEBROW_CONNECTIONS),\n leftIris: connectionsToIndices(LEFT_IRIS_CONNECTIONS),\n rightEye: connectionsToIndices(RIGHT_EYE_CONNECTIONS),\n rightEyebrow: connectionsToIndices(RIGHT_EYEBROW_CONNECTIONS),\n rightIris: connectionsToIndices(RIGHT_IRIS_CONNECTIONS),\n faceOval: connectionsToIndices(FACE_OVAL_CONNECTIONS),\n};\n\nconst indexLabelPairs: [number, string][] = Object.entries(MEDIAPIPE_FACE_MESH_KEYPOINTS_BY_CONTOUR)\n .map(([label, indices]) => indices.map((index) => [index, label] as [number, string]))\n .flat();\n\nexport const MEDIAPIPE_FACE_MESH_KEYPOINTS = new Map(indexLabelPairs);\n\ntype AssignAverage = number[];\nexport interface LandmarksRefinementConfig {\n indexesMapping: number[]; // Maps indexes of the given set of landmarks to indexes of the resulting set of landmarks. Should be non empty and contain the same amount of indexes as landmarks in the corresponding input\n zRefinement: 'none'|'copy'|AssignAverage; // Z refinement instructions.\n}\n\nexport const LANDMARKS_REFINEMENT_LIPS_CONFIG = [\n 61, 146, 91, 181, 84, 17, 314, 405, 321, 375, 291, // Lower outer.\n 185, 40, 39, 37, 0, 267, 269, 270, 409, // Upper outer(excluding corners).\n 78, 95, 88, 178, 87, 14, 317, 402, 318, 324, 308, // Lower inner.\n 191, 80, 81, 82, 13, 312, 311, 310, 415, // Upper inner(excluding corners).\n 76, 77, 90, 180, 85, 16, 315, 404, 320, 307, 306, // Lower semi - outer.\n 184, 74, 73, 72, 11, 302, 303, 304, 408, // Upper semi - outer(excluding corners).\n 62, 96, 89, 179, 86, 15, 316, 403, 319, 325, 292, // Lower semi - inner.\n 183, 42, 41, 38, 12, 268, 271, 272, 407, // Upper semi - inner(excluding corners).\n];\n\nexport const LANDMARKS_REFINEMENT_LEFT_EYE_CONFIG = [\n 33, 7, 163, 144, 145, 153, 154, 155, 133, // Lower contour.\n 246, 161, 160, 159, 158, 157, 173, // upper contour (excluding corners).\n 130, 25, 110, 24, 23, 22, 26, 112, 243, // Halo x2 lower contour.\n 247, 30, 29, 27, 28, 56, 190, // Halo x2 upper contour (excluding corners).\n 226, 31, 228, 229, 230, 231, 232, 233, 244, // Halo x3 lower contour.\n 113, 225, 224, 223, 222, 221, 189, // Halo x3 upper contour (excluding corners).\n 35, 124, 46, 53, 52, 65, // Halo x4 upper contour (no lower because of mesh structure) or eyebrow inner contour.\n 143, 111, 117, 118, 119, 120, 121, 128, 245, // Halo x5 lower contour.\n 156, 70, 63, 105, 66, 107, 55, 193, // Halo x5 upper contour (excluding corners) or eyebrow outer contour.\n];\n\nexport const LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG = [\n 263, 249, 390, 373, 374, 380, 381, 382, 362, // Lower contour.\n 466, 388, 387, 386, 385, 384, 398, // Upper contour (excluding corners).\n 359, 255, 339, 254, 253, 252, 256, 341, 463, // Halo x2 lower contour.\n 467, 260, 259, 257, 258, 286, 414, // Halo x2 upper contour (excluding corners).\n 446, 261, 448, 449, 450, 451, 452, 453, 464, // Halo x3 lower contour.\n 342, 445, 444, 443, 442, 441, 413, // Halo x3 upper contour (excluding corners).\n 265, 353, 276, 283, 282, 295, // Halo x4 upper contour (no lower because of mesh structure) or/ eyebrow inner contour.\n 372, 340, 346, 347, 348, 349, 350, 357, 465, // Halo x5 lower contour.\n 383, 300, 293, 334, 296, 336, 285, 417, // Halo x5 upper contour (excluding corners) or eyebrow outer contour.\n];\n\nexport const LANDMARKS_REFINEMENT_LEFT_IRIS_CONFIG = [\n 468, // Center.\n 469, // Iris right edge.\n 470, // Iris top edge.\n 471, // Iris left edge.\n 472, // Iris bottom edge.\n];\n/*\nzRefinement: [\n 33, 7, 163, 144, 145, 153, 154, 155, 133, // Lower contour.\n 246, 161, 160, 159, 158, 157, 173, // Upper contour (excluding corners).\n];\n*/\n\nexport const LANDMARKS_REFINEMENT_RIGHT_IRIS_CONFIG = [\n 473, // Center.\n 474, // Iris right edge.\n 475, // Iris top edge.\n 476, // Iris left edge.\n 477, // Iris bottom edge.\n];\n/*\nzRefinement: [\n 263, 249, 390, 373, 374, 380, 381, 382, 362, // Lower contour.\n 466, 388, 387, 386, 385, 384, 398, // Upper contour (excluding corners).\n];\n*/\n", "import * as constants from './constants';\nimport type { Tensor } from '../tfjs/types';\n\nexport async function augment(rawCoords, results: Tensor[]) {\n const t: Record = { // all attention models produce 2d results so it needs to be later augmented with correct z-coords\n // mesh: results[0], // already have it in rawCoords // output_mesh_identity\n // flag: results[1], // already processed in parent // conv_faceflag\n lips: await results.filter((r) => r.size === 160)?.[0]?.data() as Float32Array, // 80 x 2d = 160 // output_lips\n irisL: await results.filter((r) => r.size === 10)?.[0]?.data() as Float32Array, // 5 x 2d = 10 // output_right_iris\n eyeL: await results.filter((r) => r.size === 142)?.[0]?.data() as Float32Array, // 71 x 2d = 142 // output_right_eye\n irisR: await results.filter((r) => r.size === 10)?.[1]?.data() as Float32Array, // 5 x 2d = 10 // output_left_iris\n eyeR: await results.filter((r) => r.size === 142)?.[1]?.data() as Float32Array, // 71 x 2d = 142// output_left_eye\n };\n for (const val of Object.values(t)) {\n if (!val) return rawCoords; // could not find tensor\n }\n\n // augment iris: adds additional 5 keypoints per eye\n const irisLDepth = constants.LANDMARKS_REFINEMENT_LEFT_EYE_CONFIG.reduce((prev, curr) => prev += rawCoords[curr][2], 0) / constants.LANDMARKS_REFINEMENT_LEFT_EYE_CONFIG.length; // get average z-coord for iris\n for (let i = 0; i < t.irisL.length / 2; i++) rawCoords.push([t.irisL[2 * i + 0], t.irisL[2 * i + 1], irisLDepth]);\n const irisRDepth = constants.LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG.reduce((prev, curr) => prev += rawCoords[curr][2], 0) / constants.LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG.length; // get average z-coord for iris\n for (let i = 0; i < t.irisR.length / 2; i++) rawCoords.push([t.irisR[2 * i + 0], t.irisR[2 * i + 1], irisRDepth]);\n\n // augment eyes: replaces eye keypoints based on heuristic mapping\n for (let i = 0; i < t.eyeL.length / 2; i++) rawCoords[constants.LANDMARKS_REFINEMENT_LEFT_EYE_CONFIG[i]] = [t.eyeL[2 * i + 0], t.eyeL[2 * i + 1], rawCoords[constants.LANDMARKS_REFINEMENT_LEFT_EYE_CONFIG[i]][2]];\n for (let i = 0; i < t.eyeR.length / 2; i++) rawCoords[constants.LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG[i]] = [t.eyeR[2 * i + 0], t.eyeR[2 * i + 1], rawCoords[constants.LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG[i]][2]];\n\n // augment lips: replaces eye keypoints based on heuristic mapping\n for (let i = 0; i < t.lips.length / 2; i++) rawCoords[constants.LANDMARKS_REFINEMENT_LIPS_CONFIG[i]] = [t.lips[2 * i + 0], t.lips[2 * i + 1], rawCoords[constants.LANDMARKS_REFINEMENT_LIPS_CONFIG[i]][2]];\n\n return rawCoords;\n}\n", "/**\n * BlazeFace, FaceMesh & Iris model implementation\n *\n * Based on:\n * - [**MediaPipe BlazeFace**](https://drive.google.com/file/d/1f39lSzU5Oq-j_OXgS67KfN5wNsoeAZ4V/view)\n * - Facial Spacial Geometry: [**MediaPipe FaceMesh**](https://drive.google.com/file/d/1VFC_wIpw4O7xBOiTgUldl79d9LA-LsnA/view)\n * - Eye Iris Details: [**MediaPipe Iris**](https://drive.google.com/file/d/1bsWbokp9AklH2ANjCfmjqEzzxO1CNbMu/view)\n */\n\nimport { log, now } from '../util/util';\nimport { loadModel } from '../tfjs/load';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport * as blazeface from './blazeface';\nimport * as util from './facemeshutil';\nimport * as coords from './facemeshcoords';\nimport * as iris from './iris';\nimport * as attention from './attention';\nimport { histogramEqualization } from '../image/enhance';\nimport { env } from '../util/env';\nimport type { GraphModel, Tensor } from '../tfjs/types';\nimport type { FaceResult, FaceLandmark, Point } from '../result';\nimport type { Config } from '../config';\n\ninterface DetectBox { startPoint: Point, endPoint: Point, landmarks: Point[], confidence: number }\n\nconst cache = {\n boxes: [] as DetectBox[],\n skipped: Number.MAX_SAFE_INTEGER,\n timestamp: 0,\n};\n\nlet model: GraphModel | null = null;\nlet inputSize = 0;\n\nexport async function predict(input: Tensor, config: Config): Promise {\n if (!model?.['executor']) return [];\n // reset cached boxes\n const skipTime = (config.face.detector?.skipTime || 0) > (now() - cache.timestamp);\n const skipFrame = cache.skipped < (config.face.detector?.skipFrames || 0);\n if (!config.skipAllowed || !skipTime || !skipFrame || cache.boxes.length === 0) {\n cache.boxes = await blazeface.getBoxes(input, config); // get results from blazeface detector\n cache.timestamp = now();\n cache.skipped = 0;\n } else {\n cache.skipped++;\n }\n const faces: FaceResult[] = [];\n const newCache: DetectBox[] = [];\n let id = 0;\n const size = inputSize;\n for (let i = 0; i < cache.boxes.length; i++) {\n const box = cache.boxes[i];\n let angle = 0;\n let rotationMatrix;\n const face: FaceResult = { // init face result\n id: id++,\n mesh: [],\n meshRaw: [],\n box: [0, 0, 0, 0],\n boxRaw: [0, 0, 0, 0],\n score: 0,\n boxScore: 0,\n faceScore: 0,\n // contoursRaw: [],\n // contours: [],\n annotations: {} as Record,\n };\n\n // optional rotation correction based on detector data only if mesh is disabled otherwise perform it later when we have more accurate mesh data. if no rotation correction this function performs crop\n [angle, rotationMatrix, face.tensor] = util.correctFaceRotation(config.face.detector?.rotation, box, input, config.face.mesh?.enabled ? inputSize : blazeface.size());\n if (config.filter.equalization) {\n const equilized = face.tensor ? await histogramEqualization(face.tensor) : undefined;\n tf.dispose(face.tensor);\n if (equilized) face.tensor = equilized;\n }\n face.boxScore = Math.round(100 * box.confidence) / 100;\n if (!config.face.mesh?.enabled) { // mesh not enabled, return resuts from detector only\n face.box = util.clampBox(box, input);\n face.boxRaw = util.getRawBox(box, input);\n face.score = face.boxScore;\n face.mesh = box.landmarks.map((pt) => [\n ((box.startPoint[0] + box.endPoint[0])) / 2 + ((box.endPoint[0] + box.startPoint[0]) * pt[0] / blazeface.size()),\n ((box.startPoint[1] + box.endPoint[1])) / 2 + ((box.endPoint[1] + box.startPoint[1]) * pt[1] / blazeface.size()),\n ]);\n face.meshRaw = face.mesh.map((pt) => [pt[0] / (input.shape[2] || 0), pt[1] / (input.shape[1] || 0), (pt[2] || 0) / size]);\n for (const key of Object.keys(coords.blazeFaceLandmarks)) {\n face.annotations[key] = [face.mesh[coords.blazeFaceLandmarks[key] as number]]; // add annotations\n }\n } else if (!model) { // mesh enabled, but not loaded\n if (config.debug) log('face mesh detection requested, but model is not loaded');\n } else { // mesh enabled\n if (config.face.attention?.enabled && !env.kernels.includes('atan2')) {\n config.face.attention.enabled = false;\n tf.dispose(face.tensor);\n return faces;\n }\n const results = model.execute(face.tensor as Tensor) as Tensor[];\n const confidenceT = results.find((t) => t.shape[t.shape.length - 1] === 1) as Tensor;\n const faceConfidence = await confidenceT.data();\n face.faceScore = Math.round(100 * faceConfidence[0]) / 100;\n if (face.faceScore < (config.face.detector?.minConfidence || 1)) { // low confidence in detected mesh\n box.confidence = face.faceScore; // reset confidence of cached box\n if (config.face.mesh.keepInvalid) {\n face.box = util.clampBox(box, input);\n face.boxRaw = util.getRawBox(box, input);\n face.score = face.boxScore;\n face.mesh = box.landmarks.map((pt) => [\n ((box.startPoint[0] + box.endPoint[0])) / 2 + ((box.endPoint[0] + box.startPoint[0]) * pt[0] / blazeface.size()),\n ((box.startPoint[1] + box.endPoint[1])) / 2 + ((box.endPoint[1] + box.startPoint[1]) * pt[1] / blazeface.size()),\n ]);\n face.meshRaw = face.mesh.map((pt) => [pt[0] / (input.shape[2] || 1), pt[1] / (input.shape[1] || 1), (pt[2] || 0) / size]);\n for (const key of Object.keys(coords.blazeFaceLandmarks)) {\n face.annotations[key] = [face.mesh[coords.blazeFaceLandmarks[key] as number]]; // add annotations\n }\n }\n } else {\n const meshT = results.find((t) => t.shape[t.shape.length - 1] === 1404) as Tensor;\n const coordsReshaped = tf.reshape(meshT, [-1, 3]);\n let rawCoords = await coordsReshaped.array();\n tf.dispose(coordsReshaped);\n if (config.face.attention?.enabled) {\n rawCoords = await attention.augment(rawCoords, results); // augment iris results using attention model results\n } else if (config.face.iris?.enabled) {\n rawCoords = await iris.augmentIris(rawCoords, face.tensor, inputSize); // run iris model and augment results\n }\n face.mesh = util.transformRawCoords(rawCoords, box, angle, rotationMatrix, inputSize); // get processed mesh\n face.meshRaw = face.mesh.map((pt) => [pt[0] / (input.shape[2] || 0), pt[1] / (input.shape[1] || 0), (pt[2] || 0) / size]);\n for (const key of Object.keys(coords.meshAnnotations)) face.annotations[key] = coords.meshAnnotations[key].map((index) => face.mesh[index]); // add annotations\n face.score = face.faceScore;\n const calculatedBox = { ...util.calculateFaceBox(face.mesh, box), confidence: box.confidence, landmarks: box.landmarks };\n face.box = util.clampBox(calculatedBox, input);\n face.boxRaw = util.getRawBox(calculatedBox, input);\n /*\n const contoursT = results.find((t) => t.shape[t.shape.length - 1] === 266) as Tensor;\n const contoursData = contoursT && await contoursT.data(); // 133 x 2d points\n face.contoursRaw = [];\n for (let j = 0; j < contoursData.length / 2; j++) face.contoursRaw.push([contoursData[2 * j + 0] / inputSize, contoursData[2 * j + 1] / inputSize]);\n face.contours = face.contoursRaw.map((c) => [Math.trunc((input.shape[2] || 1) * c[0]), Math.trunc((input.shape[1] || 1) * c[1])]);\n */\n newCache.push(calculatedBox);\n }\n tf.dispose(results);\n }\n if (face.score > (config.face.detector?.minConfidence || 1)) faces.push(face);\n else tf.dispose(face.tensor);\n }\n cache.boxes = newCache; // reset cache\n return faces;\n}\n\nexport async function load(config: Config): Promise {\n if (env.initial) model = null;\n if (config.face.attention?.enabled && model?.['signature']) {\n if (Object.keys(model?.['signature']?.outputs || {}).length < 6) model = null;\n }\n if (!model) {\n if (config.face.attention?.enabled) model = await loadModel(config.face.attention.modelPath);\n else model = await loadModel(config.face.mesh?.modelPath);\n } else if (config.debug) {\n log('cached model:', model['modelUrl']);\n }\n inputSize = (model['executor'] && model?.inputs?.[0].shape) ? model?.inputs?.[0].shape[2] : 256;\n return model;\n}\n\nexport const triangulation = coords.TRI468;\nexport const uvmap = coords.UV468;\n", "/**\n * FaceRes model implementation\n *\n * Returns Age, Gender, Descriptor\n * Implements Face simmilarity function\n *\n * Based on: [**HSE-FaceRes**](https://github.com/HSE-asavchenko/HSE_FaceRec_tf)\n */\n\nimport { log, now } from '../util/util';\nimport { env } from '../util/env';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport { loadModel } from '../tfjs/load';\nimport { constants } from '../tfjs/constants';\nimport type { Tensor, GraphModel } from '../tfjs/types';\nimport type { Config } from '../config';\nimport type { Gender, Race } from '../result';\n\nexport interface FaceRes { age: number, gender: Gender, genderScore: number, descriptor: number[], race?: { score: number, race: Race }[] }\n\nlet model: GraphModel | null;\nconst last: FaceRes[] = [];\n\nlet lastTime = 0;\nlet lastCount = 0;\nlet skipped = Number.MAX_SAFE_INTEGER;\n\nexport async function load(config: Config): Promise {\n if (env.initial) model = null;\n if (!model) model = await loadModel(config.face.description?.modelPath);\n else if (config.debug) log('cached model:', model['modelUrl']);\n return model;\n}\n\nexport function enhance(input): Tensor {\n const tensor = (input.image || input.tensor || input) as Tensor; // input received from detector is already normalized to 0..1, input is also assumed to be straightened\n if (!model?.inputs[0].shape) return tensor; // model has no shape so no point continuing\n const crop: Tensor = tf.image.resizeBilinear(tensor, [model.inputs[0].shape[2], model.inputs[0].shape[1]], false);\n const norm: Tensor = tf.mul(crop, constants.tf255);\n tf.dispose(crop);\n return norm;\n /*\n // do a tight crop of image and resize it to fit the model\n const box = [[0.05, 0.15, 0.85, 0.85]]; // empyrical values for top, left, bottom, right\n const crop = (tensor.shape.length === 3)\n ? tf.image.cropAndResize(tf.expandDims(tensor, 0), box, [0], [model.inputs[0].shape[2], model.inputs[0].shape[1]]) // add batch dimension if missing\n : tf.image.cropAndResize(tensor, box, [0], [model.inputs[0].shape[2], model.inputs[0].shape[1]]);\n */\n /*\n // convert to black&white to avoid colorization impact\n const rgb = [0.2989, 0.5870, 0.1140]; // factors for red/green/blue colors when converting to grayscale: https://www.mathworks.com/help/matlab/ref/rgb2gray.html\n const [red, green, blue] = tf.split(crop, 3, 3);\n const redNorm = tf.mul(red, rgb[0]);\n const greenNorm = tf.mul(green, rgb[1]);\n const blueNorm = tf.mul(blue, rgb[2]);\n const grayscale = tf.addN([redNorm, greenNorm, blueNorm]);\n const merge = tf.stack([grayscale, grayscale, grayscale], 3).squeeze(4);\n */\n}\n\nexport async function predict(image: Tensor, config: Config, idx: number, count: number): Promise {\n const obj: FaceRes = {\n age: 0 as number,\n gender: 'unknown' as Gender,\n genderScore: 0 as number,\n descriptor: [] as number[],\n };\n if (!model?.['executor']) return obj;\n const skipFrame = skipped < (config.face.description?.skipFrames || 0);\n const skipTime = (config.face.description?.skipTime || 0) > (now() - lastTime);\n if (config.skipAllowed && skipFrame && skipTime && (lastCount === count) && (last?.[idx]?.age > 0) && (last?.[idx]?.genderScore > 0)) {\n skipped++;\n return last[idx];\n }\n skipped = 0;\n return new Promise(async (resolve) => {\n if (config.face.description?.enabled) {\n const enhanced = enhance(image);\n const resT = model?.execute(enhanced) as Tensor[];\n lastTime = now();\n tf.dispose(enhanced);\n const genderT = resT.find((t) => t.shape[1] === 1) as Tensor;\n const gender = await genderT.data();\n const confidence = Math.trunc(200 * Math.abs((gender[0] - 0.5))) / 100;\n if (confidence > (config.face.description.minConfidence || 0)) {\n obj.gender = gender[0] <= 0.5 ? 'female' : 'male';\n obj.genderScore = Math.min(0.99, confidence);\n }\n const argmax = tf.argMax(resT.find((t) => t.shape[1] === 100), 1);\n const ageIdx: number = (await argmax.data())[0];\n tf.dispose(argmax);\n const ageT = resT.find((t) => t.shape[1] === 100) as Tensor;\n const all = await ageT.data();\n obj.age = Math.round(all[ageIdx - 1] > all[ageIdx + 1] ? 10 * ageIdx - 100 * all[ageIdx - 1] : 10 * ageIdx + 100 * all[ageIdx + 1]) / 10;\n\n if (Number.isNaN(gender[0]) || Number.isNaN(all[0])) log('faceres error:', { model, result: resT });\n\n const desc = resT.find((t) => t.shape[1] === 1024);\n // const reshape = desc.reshape([128, 8]); // reshape large 1024-element descriptor to 128 x 8\n // const reduce = reshape.logSumExp(1); // reduce 2nd dimension by calculating logSumExp on it which leaves us with 128-element descriptor\n const descriptor = desc ? await desc.data() : [] as number[];\n obj.descriptor = Array.from(descriptor);\n resT.forEach((t) => tf.dispose(t));\n }\n last[idx] = obj;\n lastCount = count;\n resolve(obj);\n });\n}\n", "/**\n * GEAR [gender/emotion/age/race] model implementation\n *\n * Based on: [**GEAR Predictor**](https://github.com/Udolf15/GEAR-Predictor)\n */\n\nimport { log, now } from '../util/util';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport { loadModel } from '../tfjs/load';\nimport type { Gender, Race } from '../result';\nimport type { Config } from '../config';\nimport type { GraphModel, Tensor } from '../tfjs/types';\nimport { env } from '../util/env';\n\nexport interface GearType { age: number, gender: Gender, genderScore: number, race: { score: number, race: Race }[] }\nlet model: GraphModel | null;\nconst last: GearType[] = [];\nconst raceNames = ['white', 'black', 'asian', 'indian', 'other'];\nconst ageWeights = [15, 23, 28, 35.5, 45.5, 55.5, 65];\nlet lastCount = 0;\nlet lastTime = 0;\nlet skipped = Number.MAX_SAFE_INTEGER;\n\nexport async function load(config: Config) {\n if (env.initial) model = null;\n if (!model) model = await loadModel(config.face.gear?.modelPath);\n else if (config.debug) log('cached model:', model['modelUrl']);\n return model;\n}\n\nexport async function predict(image: Tensor, config: Config, idx: number, count: number): Promise {\n if (!model) return { age: 0, gender: 'unknown', genderScore: 0, race: [] };\n const skipFrame = skipped < (config.face.gear?.skipFrames || 0);\n const skipTime = (config.face.gear?.skipTime || 0) > (now() - lastTime);\n if (config.skipAllowed && skipTime && skipFrame && (lastCount === count) && last[idx]) {\n skipped++;\n return last[idx];\n }\n skipped = 0;\n return new Promise(async (resolve) => {\n if (!model?.inputs[0].shape) return;\n const t: Record = {};\n // t.resize = tf.image.resizeBilinear(image, [model?.inputs[0].shape[2], model?.inputs[0].shape[1]], false);\n const box = [[0.0, 0.10, 0.90, 0.90]]; // empyrical values for top, left, bottom, right\n t.resize = tf.image.cropAndResize(image, box, [0], [model.inputs[0].shape[2], model.inputs[0].shape[1]]);\n const obj: GearType = { age: 0, gender: 'unknown', genderScore: 0, race: [] };\n if (config.face.gear?.enabled) [t.age, t.gender, t.race] = model.execute(t.resize, ['age_output', 'gender_output', 'race_output']) as Tensor[];\n const gender = await t.gender.data();\n obj.gender = gender[0] > gender[1] ? 'male' : 'female';\n obj.genderScore = Math.round(100 * (gender[0] > gender[1] ? gender[0] : gender[1])) / 100;\n const race = await t.race.data();\n for (let i = 0; i < race.length; i++) {\n if (race[i] > (config.face.gear?.minConfidence || 0.2)) obj.race.push({ score: Math.round(100 * race[i]) / 100, race: raceNames[i] as Race });\n }\n obj.race.sort((a, b) => b.score - a.score);\n // {0: 'Below20', 1: '21-25', 2: '26-30', 3: '31-40',4: '41-50', 5: '51-60', 6: 'Above60'}\n const ageDistribution = Array.from(await t.age.data());\n const ageSorted = ageDistribution.map((a, i) => [ageWeights[i], a]).sort((a, b) => b[1] - a[1]);\n let age = ageSorted[0][0]; // pick best starting point\n for (let i = 1; i < ageSorted.length; i++) age += ageSorted[i][1] * (ageSorted[i][0] - age); // adjust with each other choice by weight\n obj.age = Math.round(10 * age) / 10;\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n last[idx] = obj;\n lastCount = count;\n lastTime = now();\n resolve(obj);\n });\n}\n", "import * as tf from '../../dist/tfjs.esm.js';\nimport type { Point } from '../result';\n\nexport function getBoxSize(box) {\n return [\n Math.abs(box.endPoint[0] - box.startPoint[0]),\n Math.abs(box.endPoint[1] - box.startPoint[1]),\n ];\n}\n\nexport function getBoxCenter(box) {\n return [\n box.startPoint[0] + (box.endPoint[0] - box.startPoint[0]) / 2,\n box.startPoint[1] + (box.endPoint[1] - box.startPoint[1]) / 2,\n ];\n}\n\nexport function cutBoxFromImageAndResize(box, image, cropSize) {\n const h = image.shape[1];\n const w = image.shape[2];\n const boxes = [[\n box.startPoint[1] / h,\n box.startPoint[0] / w,\n box.endPoint[1] / h,\n box.endPoint[0] / w,\n ]];\n return tf.image.cropAndResize(image, boxes, [0], cropSize);\n}\n\nexport function scaleBoxCoordinates(box, factor) {\n const startPoint = [box.startPoint[0] * factor[0], box.startPoint[1] * factor[1]] as Point;\n const endPoint = [box.endPoint[0] * factor[0], box.endPoint[1] * factor[1]] as Point;\n const palmLandmarks = box.palmLandmarks.map((coord) => {\n const scaledCoord = [coord[0] * factor[0], coord[1] * factor[1]];\n return scaledCoord;\n });\n return { startPoint, endPoint, palmLandmarks, confidence: box.confidence };\n}\n\nexport function enlargeBox(box, factor = 1.5) {\n const center = getBoxCenter(box);\n const size = getBoxSize(box);\n const newHalfSize = [factor * size[0] / 2, factor * size[1] / 2];\n const startPoint = [center[0] - newHalfSize[0], center[1] - newHalfSize[1]] as Point;\n const endPoint = [center[0] + newHalfSize[0], center[1] + newHalfSize[1]] as Point;\n return { startPoint, endPoint, palmLandmarks: box.palmLandmarks };\n}\n\nexport function squarifyBox(box) {\n const centers = getBoxCenter(box);\n const size = getBoxSize(box);\n const maxEdge = Math.max(...size);\n const halfSize = maxEdge / 2;\n const startPoint = [centers[0] - halfSize, centers[1] - halfSize] as Point;\n const endPoint = [centers[0] + halfSize, centers[1] + halfSize] as Point;\n return { startPoint, endPoint, palmLandmarks: box.palmLandmarks };\n}\n\nexport function shiftBox(box, shiftFactor) {\n const boxSize = [\n box.endPoint[0] - box.startPoint[0],\n box.endPoint[1] - box.startPoint[1],\n ];\n const shiftVector = [boxSize[0] * shiftFactor[0], boxSize[1] * shiftFactor[1]];\n const startPoint = [box.startPoint[0] + shiftVector[0], box.startPoint[1] + shiftVector[1]] as Point;\n const endPoint = [box.endPoint[0] + shiftVector[0], box.endPoint[1] + shiftVector[1]] as Point;\n return { startPoint, endPoint, palmLandmarks: box.palmLandmarks };\n}\n\nexport function normalizeRadians(angle) {\n return angle - 2 * Math.PI * Math.floor((angle + Math.PI) / (2 * Math.PI));\n}\n\nexport function computeRotation(point1, point2) {\n const radians = Math.PI / 2 - Math.atan2(-(point2[1] - point1[1]), point2[0] - point1[0]);\n return normalizeRadians(radians);\n}\n\nexport const buildTranslationMatrix = (x, y) => [[1, 0, x], [0, 1, y], [0, 0, 1]];\n\nexport function dot(v1, v2) {\n let product = 0;\n for (let i = 0; i < v1.length; i++) {\n product += v1[i] * v2[i];\n }\n return product;\n}\n\nexport function getColumnFrom2DArr(arr, columnIndex) {\n const column: number[] = [];\n for (let i = 0; i < arr.length; i++) {\n column.push(arr[i][columnIndex]);\n }\n return column;\n}\n\nexport function multiplyTransformMatrices(mat1, mat2) {\n const product: number[][] = [];\n const size = mat1.length;\n for (let row = 0; row < size; row++) {\n product.push([]);\n for (let col = 0; col < size; col++) {\n product[row].push(dot(mat1[row], getColumnFrom2DArr(mat2, col)));\n }\n }\n return product;\n}\n\nexport function buildRotationMatrix(rotation, center) {\n const cosA = Math.cos(rotation);\n const sinA = Math.sin(rotation);\n const rotationMatrix = [[cosA, -sinA, 0], [sinA, cosA, 0], [0, 0, 1]];\n const translationMatrix = buildTranslationMatrix(center[0], center[1]);\n const translationTimesRotation = multiplyTransformMatrices(translationMatrix, rotationMatrix);\n const negativeTranslationMatrix = buildTranslationMatrix(-center[0], -center[1]);\n return multiplyTransformMatrices(translationTimesRotation, negativeTranslationMatrix);\n}\n\nexport function invertTransformMatrix(matrix) {\n const rotationComponent = [[matrix[0][0], matrix[1][0]], [matrix[0][1], matrix[1][1]]];\n const translationComponent = [matrix[0][2], matrix[1][2]];\n const invertedTranslation = [\n -dot(rotationComponent[0], translationComponent),\n -dot(rotationComponent[1], translationComponent),\n ];\n return [\n rotationComponent[0].concat(invertedTranslation[0]),\n rotationComponent[1].concat(invertedTranslation[1]),\n [0, 0, 1],\n ];\n}\n\nexport function rotatePoint(homogeneousCoordinate, rotationMatrix) {\n return [\n dot(homogeneousCoordinate, rotationMatrix[0]),\n dot(homogeneousCoordinate, rotationMatrix[1]),\n ];\n}\n", "/**\n * HandPose model implementation constants\n * See `handpose.ts` for entry point\n */\n\nexport const anchors = [\n { x: 0.015625, y: 0.015625 },\n { x: 0.015625, y: 0.015625 },\n { x: 0.046875, y: 0.015625 },\n { x: 0.046875, y: 0.015625 },\n { x: 0.078125, y: 0.015625 },\n { x: 0.078125, y: 0.015625 },\n { x: 0.109375, y: 0.015625 },\n { x: 0.109375, y: 0.015625 },\n { x: 0.140625, y: 0.015625 },\n { x: 0.140625, y: 0.015625 },\n { x: 0.171875, y: 0.015625 },\n { x: 0.171875, y: 0.015625 },\n { x: 0.203125, y: 0.015625 },\n { x: 0.203125, y: 0.015625 },\n { x: 0.234375, y: 0.015625 },\n { x: 0.234375, y: 0.015625 },\n { x: 0.265625, y: 0.015625 },\n { x: 0.265625, y: 0.015625 },\n { x: 0.296875, y: 0.015625 },\n { x: 0.296875, y: 0.015625 },\n { x: 0.328125, y: 0.015625 },\n { x: 0.328125, y: 0.015625 },\n { x: 0.359375, y: 0.015625 },\n { x: 0.359375, y: 0.015625 },\n { x: 0.390625, y: 0.015625 },\n { x: 0.390625, y: 0.015625 },\n { x: 0.421875, y: 0.015625 },\n { x: 0.421875, y: 0.015625 },\n { x: 0.453125, y: 0.015625 },\n { x: 0.453125, y: 0.015625 },\n { x: 0.484375, y: 0.015625 },\n { x: 0.484375, y: 0.015625 },\n { x: 0.515625, y: 0.015625 },\n { x: 0.515625, y: 0.015625 },\n { x: 0.546875, y: 0.015625 },\n { x: 0.546875, y: 0.015625 },\n { x: 0.578125, y: 0.015625 },\n { x: 0.578125, y: 0.015625 },\n { x: 0.609375, y: 0.015625 },\n { x: 0.609375, y: 0.015625 },\n { x: 0.640625, y: 0.015625 },\n { x: 0.640625, y: 0.015625 },\n { x: 0.671875, y: 0.015625 },\n { x: 0.671875, y: 0.015625 },\n { x: 0.703125, y: 0.015625 },\n { x: 0.703125, y: 0.015625 },\n { x: 0.734375, y: 0.015625 },\n { x: 0.734375, y: 0.015625 },\n { x: 0.765625, y: 0.015625 },\n { x: 0.765625, y: 0.015625 },\n { x: 0.796875, y: 0.015625 },\n { x: 0.796875, y: 0.015625 },\n { x: 0.828125, y: 0.015625 },\n { x: 0.828125, y: 0.015625 },\n { x: 0.859375, y: 0.015625 },\n { x: 0.859375, y: 0.015625 },\n { x: 0.890625, y: 0.015625 },\n { x: 0.890625, y: 0.015625 },\n { x: 0.921875, y: 0.015625 },\n { x: 0.921875, y: 0.015625 },\n { x: 0.953125, y: 0.015625 },\n { x: 0.953125, y: 0.015625 },\n { x: 0.984375, y: 0.015625 },\n { x: 0.984375, y: 0.015625 },\n { x: 0.015625, y: 0.046875 },\n { x: 0.015625, y: 0.046875 },\n { x: 0.046875, y: 0.046875 },\n { x: 0.046875, y: 0.046875 },\n { x: 0.078125, y: 0.046875 },\n { x: 0.078125, y: 0.046875 },\n { x: 0.109375, y: 0.046875 },\n { x: 0.109375, y: 0.046875 },\n { x: 0.140625, y: 0.046875 },\n { x: 0.140625, y: 0.046875 },\n { x: 0.171875, y: 0.046875 },\n { x: 0.171875, y: 0.046875 },\n { x: 0.203125, y: 0.046875 },\n { x: 0.203125, y: 0.046875 },\n { x: 0.234375, y: 0.046875 },\n { x: 0.234375, y: 0.046875 },\n { x: 0.265625, y: 0.046875 },\n { x: 0.265625, y: 0.046875 },\n { x: 0.296875, y: 0.046875 },\n { x: 0.296875, y: 0.046875 },\n { x: 0.328125, y: 0.046875 },\n { x: 0.328125, y: 0.046875 },\n { x: 0.359375, y: 0.046875 },\n { x: 0.359375, y: 0.046875 },\n { x: 0.390625, y: 0.046875 },\n { x: 0.390625, y: 0.046875 },\n { x: 0.421875, y: 0.046875 },\n { x: 0.421875, y: 0.046875 },\n { x: 0.453125, y: 0.046875 },\n { x: 0.453125, y: 0.046875 },\n { x: 0.484375, y: 0.046875 },\n { x: 0.484375, y: 0.046875 },\n { x: 0.515625, y: 0.046875 },\n { x: 0.515625, y: 0.046875 },\n { x: 0.546875, y: 0.046875 },\n { x: 0.546875, y: 0.046875 },\n { x: 0.578125, y: 0.046875 },\n { x: 0.578125, y: 0.046875 },\n { x: 0.609375, y: 0.046875 },\n { x: 0.609375, y: 0.046875 },\n { x: 0.640625, y: 0.046875 },\n { x: 0.640625, y: 0.046875 },\n { x: 0.671875, y: 0.046875 },\n { x: 0.671875, y: 0.046875 },\n { x: 0.703125, y: 0.046875 },\n { x: 0.703125, y: 0.046875 },\n { x: 0.734375, y: 0.046875 },\n { x: 0.734375, y: 0.046875 },\n { x: 0.765625, y: 0.046875 },\n { x: 0.765625, y: 0.046875 },\n { x: 0.796875, y: 0.046875 },\n { x: 0.796875, y: 0.046875 },\n { x: 0.828125, y: 0.046875 },\n { x: 0.828125, y: 0.046875 },\n { x: 0.859375, y: 0.046875 },\n { x: 0.859375, y: 0.046875 },\n { x: 0.890625, y: 0.046875 },\n { x: 0.890625, y: 0.046875 },\n { x: 0.921875, y: 0.046875 },\n { x: 0.921875, y: 0.046875 },\n { x: 0.953125, y: 0.046875 },\n { x: 0.953125, y: 0.046875 },\n { x: 0.984375, y: 0.046875 },\n { x: 0.984375, y: 0.046875 },\n { x: 0.015625, y: 0.078125 },\n { x: 0.015625, y: 0.078125 },\n { x: 0.046875, y: 0.078125 },\n { x: 0.046875, y: 0.078125 },\n { x: 0.078125, y: 0.078125 },\n { x: 0.078125, y: 0.078125 },\n { x: 0.109375, y: 0.078125 },\n { x: 0.109375, y: 0.078125 },\n { x: 0.140625, y: 0.078125 },\n { x: 0.140625, y: 0.078125 },\n { x: 0.171875, y: 0.078125 },\n { x: 0.171875, y: 0.078125 },\n { x: 0.203125, y: 0.078125 },\n { x: 0.203125, y: 0.078125 },\n { x: 0.234375, y: 0.078125 },\n { x: 0.234375, y: 0.078125 },\n { x: 0.265625, y: 0.078125 },\n { x: 0.265625, y: 0.078125 },\n { x: 0.296875, y: 0.078125 },\n { x: 0.296875, y: 0.078125 },\n { x: 0.328125, y: 0.078125 },\n { x: 0.328125, y: 0.078125 },\n { x: 0.359375, y: 0.078125 },\n { x: 0.359375, y: 0.078125 },\n { x: 0.390625, y: 0.078125 },\n { x: 0.390625, y: 0.078125 },\n { x: 0.421875, y: 0.078125 },\n { x: 0.421875, y: 0.078125 },\n { x: 0.453125, y: 0.078125 },\n { x: 0.453125, y: 0.078125 },\n { x: 0.484375, y: 0.078125 },\n { x: 0.484375, y: 0.078125 },\n { x: 0.515625, y: 0.078125 },\n { x: 0.515625, y: 0.078125 },\n { x: 0.546875, y: 0.078125 },\n { x: 0.546875, y: 0.078125 },\n { x: 0.578125, y: 0.078125 },\n { x: 0.578125, y: 0.078125 },\n { x: 0.609375, y: 0.078125 },\n { x: 0.609375, y: 0.078125 },\n { x: 0.640625, y: 0.078125 },\n { x: 0.640625, y: 0.078125 },\n { x: 0.671875, y: 0.078125 },\n { x: 0.671875, y: 0.078125 },\n { x: 0.703125, y: 0.078125 },\n { x: 0.703125, y: 0.078125 },\n { x: 0.734375, y: 0.078125 },\n { x: 0.734375, y: 0.078125 },\n { x: 0.765625, y: 0.078125 },\n { x: 0.765625, y: 0.078125 },\n { x: 0.796875, y: 0.078125 },\n { x: 0.796875, y: 0.078125 },\n { x: 0.828125, y: 0.078125 },\n { x: 0.828125, y: 0.078125 },\n { x: 0.859375, y: 0.078125 },\n { x: 0.859375, y: 0.078125 },\n { x: 0.890625, y: 0.078125 },\n { x: 0.890625, y: 0.078125 },\n { x: 0.921875, y: 0.078125 },\n { x: 0.921875, y: 0.078125 },\n { x: 0.953125, y: 0.078125 },\n { x: 0.953125, y: 0.078125 },\n { x: 0.984375, y: 0.078125 },\n { x: 0.984375, y: 0.078125 },\n { x: 0.015625, y: 0.109375 },\n { x: 0.015625, y: 0.109375 },\n { x: 0.046875, y: 0.109375 },\n { x: 0.046875, y: 0.109375 },\n { x: 0.078125, y: 0.109375 },\n { x: 0.078125, y: 0.109375 },\n { x: 0.109375, y: 0.109375 },\n { x: 0.109375, y: 0.109375 },\n { x: 0.140625, y: 0.109375 },\n { x: 0.140625, y: 0.109375 },\n { x: 0.171875, y: 0.109375 },\n { x: 0.171875, y: 0.109375 },\n { x: 0.203125, y: 0.109375 },\n { x: 0.203125, y: 0.109375 },\n { x: 0.234375, y: 0.109375 },\n { x: 0.234375, y: 0.109375 },\n { x: 0.265625, y: 0.109375 },\n { x: 0.265625, y: 0.109375 },\n { x: 0.296875, y: 0.109375 },\n { x: 0.296875, y: 0.109375 },\n { x: 0.328125, y: 0.109375 },\n { x: 0.328125, y: 0.109375 },\n { x: 0.359375, y: 0.109375 },\n { x: 0.359375, y: 0.109375 },\n { x: 0.390625, y: 0.109375 },\n { x: 0.390625, y: 0.109375 },\n { x: 0.421875, y: 0.109375 },\n { x: 0.421875, y: 0.109375 },\n { x: 0.453125, y: 0.109375 },\n { x: 0.453125, y: 0.109375 },\n { x: 0.484375, y: 0.109375 },\n { x: 0.484375, y: 0.109375 },\n { x: 0.515625, y: 0.109375 },\n { x: 0.515625, y: 0.109375 },\n { x: 0.546875, y: 0.109375 },\n { x: 0.546875, y: 0.109375 },\n { x: 0.578125, y: 0.109375 },\n { x: 0.578125, y: 0.109375 },\n { x: 0.609375, y: 0.109375 },\n { x: 0.609375, y: 0.109375 },\n { x: 0.640625, y: 0.109375 },\n { x: 0.640625, y: 0.109375 },\n { x: 0.671875, y: 0.109375 },\n { x: 0.671875, y: 0.109375 },\n { x: 0.703125, y: 0.109375 },\n { x: 0.703125, y: 0.109375 },\n { x: 0.734375, y: 0.109375 },\n { x: 0.734375, y: 0.109375 },\n { x: 0.765625, y: 0.109375 },\n { x: 0.765625, y: 0.109375 },\n { x: 0.796875, y: 0.109375 },\n { x: 0.796875, y: 0.109375 },\n { x: 0.828125, y: 0.109375 },\n { x: 0.828125, y: 0.109375 },\n { x: 0.859375, y: 0.109375 },\n { x: 0.859375, y: 0.109375 },\n { x: 0.890625, y: 0.109375 },\n { x: 0.890625, y: 0.109375 },\n { x: 0.921875, y: 0.109375 },\n { x: 0.921875, y: 0.109375 },\n { x: 0.953125, y: 0.109375 },\n { x: 0.953125, y: 0.109375 },\n { x: 0.984375, y: 0.109375 },\n { x: 0.984375, y: 0.109375 },\n { x: 0.015625, y: 0.140625 },\n { x: 0.015625, y: 0.140625 },\n { x: 0.046875, y: 0.140625 },\n { x: 0.046875, y: 0.140625 },\n { x: 0.078125, y: 0.140625 },\n { x: 0.078125, y: 0.140625 },\n { x: 0.109375, y: 0.140625 },\n { x: 0.109375, y: 0.140625 },\n { x: 0.140625, y: 0.140625 },\n { x: 0.140625, y: 0.140625 },\n { x: 0.171875, y: 0.140625 },\n { x: 0.171875, y: 0.140625 },\n { x: 0.203125, y: 0.140625 },\n { x: 0.203125, y: 0.140625 },\n { x: 0.234375, y: 0.140625 },\n { x: 0.234375, y: 0.140625 },\n { x: 0.265625, y: 0.140625 },\n { x: 0.265625, y: 0.140625 },\n { x: 0.296875, y: 0.140625 },\n { x: 0.296875, y: 0.140625 },\n { x: 0.328125, y: 0.140625 },\n { x: 0.328125, y: 0.140625 },\n { x: 0.359375, y: 0.140625 },\n { x: 0.359375, y: 0.140625 },\n { x: 0.390625, y: 0.140625 },\n { x: 0.390625, y: 0.140625 },\n { x: 0.421875, y: 0.140625 },\n { x: 0.421875, y: 0.140625 },\n { x: 0.453125, y: 0.140625 },\n { x: 0.453125, y: 0.140625 },\n { x: 0.484375, y: 0.140625 },\n { x: 0.484375, y: 0.140625 },\n { x: 0.515625, y: 0.140625 },\n { x: 0.515625, y: 0.140625 },\n { x: 0.546875, y: 0.140625 },\n { x: 0.546875, y: 0.140625 },\n { x: 0.578125, y: 0.140625 },\n { x: 0.578125, y: 0.140625 },\n { x: 0.609375, y: 0.140625 },\n { x: 0.609375, y: 0.140625 },\n { x: 0.640625, y: 0.140625 },\n { x: 0.640625, y: 0.140625 },\n { x: 0.671875, y: 0.140625 },\n { x: 0.671875, y: 0.140625 },\n { x: 0.703125, y: 0.140625 },\n { x: 0.703125, y: 0.140625 },\n { x: 0.734375, y: 0.140625 },\n { x: 0.734375, y: 0.140625 },\n { x: 0.765625, y: 0.140625 },\n { x: 0.765625, y: 0.140625 },\n { x: 0.796875, y: 0.140625 },\n { x: 0.796875, y: 0.140625 },\n { x: 0.828125, y: 0.140625 },\n { x: 0.828125, y: 0.140625 },\n { x: 0.859375, y: 0.140625 },\n { x: 0.859375, y: 0.140625 },\n { x: 0.890625, y: 0.140625 },\n { x: 0.890625, y: 0.140625 },\n { x: 0.921875, y: 0.140625 },\n { x: 0.921875, y: 0.140625 },\n { x: 0.953125, y: 0.140625 },\n { x: 0.953125, y: 0.140625 },\n { x: 0.984375, y: 0.140625 },\n { x: 0.984375, y: 0.140625 },\n { x: 0.015625, y: 0.171875 },\n { x: 0.015625, y: 0.171875 },\n { x: 0.046875, y: 0.171875 },\n { x: 0.046875, y: 0.171875 },\n { x: 0.078125, y: 0.171875 },\n { x: 0.078125, y: 0.171875 },\n { x: 0.109375, y: 0.171875 },\n { x: 0.109375, y: 0.171875 },\n { x: 0.140625, y: 0.171875 },\n { x: 0.140625, y: 0.171875 },\n { x: 0.171875, y: 0.171875 },\n { x: 0.171875, y: 0.171875 },\n { x: 0.203125, y: 0.171875 },\n { x: 0.203125, y: 0.171875 },\n { x: 0.234375, y: 0.171875 },\n { x: 0.234375, y: 0.171875 },\n { x: 0.265625, y: 0.171875 },\n { x: 0.265625, y: 0.171875 },\n { x: 0.296875, y: 0.171875 },\n { x: 0.296875, y: 0.171875 },\n { x: 0.328125, y: 0.171875 },\n { x: 0.328125, y: 0.171875 },\n { x: 0.359375, y: 0.171875 },\n { x: 0.359375, y: 0.171875 },\n { x: 0.390625, y: 0.171875 },\n { x: 0.390625, y: 0.171875 },\n { x: 0.421875, y: 0.171875 },\n { x: 0.421875, y: 0.171875 },\n { x: 0.453125, y: 0.171875 },\n { x: 0.453125, y: 0.171875 },\n { x: 0.484375, y: 0.171875 },\n { x: 0.484375, y: 0.171875 },\n { x: 0.515625, y: 0.171875 },\n { x: 0.515625, y: 0.171875 },\n { x: 0.546875, y: 0.171875 },\n { x: 0.546875, y: 0.171875 },\n { x: 0.578125, y: 0.171875 },\n { x: 0.578125, y: 0.171875 },\n { x: 0.609375, y: 0.171875 },\n { x: 0.609375, y: 0.171875 },\n { x: 0.640625, y: 0.171875 },\n { x: 0.640625, y: 0.171875 },\n { x: 0.671875, y: 0.171875 },\n { x: 0.671875, y: 0.171875 },\n { x: 0.703125, y: 0.171875 },\n { x: 0.703125, y: 0.171875 },\n { x: 0.734375, y: 0.171875 },\n { x: 0.734375, y: 0.171875 },\n { x: 0.765625, y: 0.171875 },\n { x: 0.765625, y: 0.171875 },\n { x: 0.796875, y: 0.171875 },\n { x: 0.796875, y: 0.171875 },\n { x: 0.828125, y: 0.171875 },\n { x: 0.828125, y: 0.171875 },\n { x: 0.859375, y: 0.171875 },\n { x: 0.859375, y: 0.171875 },\n { x: 0.890625, y: 0.171875 },\n { x: 0.890625, y: 0.171875 },\n { x: 0.921875, y: 0.171875 },\n { x: 0.921875, y: 0.171875 },\n { x: 0.953125, y: 0.171875 },\n { x: 0.953125, y: 0.171875 },\n { x: 0.984375, y: 0.171875 },\n { x: 0.984375, y: 0.171875 },\n { x: 0.015625, y: 0.203125 },\n { x: 0.015625, y: 0.203125 },\n { x: 0.046875, y: 0.203125 },\n { x: 0.046875, y: 0.203125 },\n { x: 0.078125, y: 0.203125 },\n { x: 0.078125, y: 0.203125 },\n { x: 0.109375, y: 0.203125 },\n { x: 0.109375, y: 0.203125 },\n { x: 0.140625, y: 0.203125 },\n { x: 0.140625, y: 0.203125 },\n { x: 0.171875, y: 0.203125 },\n { x: 0.171875, y: 0.203125 },\n { x: 0.203125, y: 0.203125 },\n { x: 0.203125, y: 0.203125 },\n { x: 0.234375, y: 0.203125 },\n { x: 0.234375, y: 0.203125 },\n { x: 0.265625, y: 0.203125 },\n { x: 0.265625, y: 0.203125 },\n { x: 0.296875, y: 0.203125 },\n { x: 0.296875, y: 0.203125 },\n { x: 0.328125, y: 0.203125 },\n { x: 0.328125, y: 0.203125 },\n { x: 0.359375, y: 0.203125 },\n { x: 0.359375, y: 0.203125 },\n { x: 0.390625, y: 0.203125 },\n { x: 0.390625, y: 0.203125 },\n { x: 0.421875, y: 0.203125 },\n { x: 0.421875, y: 0.203125 },\n { x: 0.453125, y: 0.203125 },\n { x: 0.453125, y: 0.203125 },\n { x: 0.484375, y: 0.203125 },\n { x: 0.484375, y: 0.203125 },\n { x: 0.515625, y: 0.203125 },\n { x: 0.515625, y: 0.203125 },\n { x: 0.546875, y: 0.203125 },\n { x: 0.546875, y: 0.203125 },\n { x: 0.578125, y: 0.203125 },\n { x: 0.578125, y: 0.203125 },\n { x: 0.609375, y: 0.203125 },\n { x: 0.609375, y: 0.203125 },\n { x: 0.640625, y: 0.203125 },\n { x: 0.640625, y: 0.203125 },\n { x: 0.671875, y: 0.203125 },\n { x: 0.671875, y: 0.203125 },\n { x: 0.703125, y: 0.203125 },\n { x: 0.703125, y: 0.203125 },\n { x: 0.734375, y: 0.203125 },\n { x: 0.734375, y: 0.203125 },\n { x: 0.765625, y: 0.203125 },\n { x: 0.765625, y: 0.203125 },\n { x: 0.796875, y: 0.203125 },\n { x: 0.796875, y: 0.203125 },\n { x: 0.828125, y: 0.203125 },\n { x: 0.828125, y: 0.203125 },\n { x: 0.859375, y: 0.203125 },\n { x: 0.859375, y: 0.203125 },\n { x: 0.890625, y: 0.203125 },\n { x: 0.890625, y: 0.203125 },\n { x: 0.921875, y: 0.203125 },\n { x: 0.921875, y: 0.203125 },\n { x: 0.953125, y: 0.203125 },\n { x: 0.953125, y: 0.203125 },\n { x: 0.984375, y: 0.203125 },\n { x: 0.984375, y: 0.203125 },\n { x: 0.015625, y: 0.234375 },\n { x: 0.015625, y: 0.234375 },\n { x: 0.046875, y: 0.234375 },\n { x: 0.046875, y: 0.234375 },\n { x: 0.078125, y: 0.234375 },\n { x: 0.078125, y: 0.234375 },\n { x: 0.109375, y: 0.234375 },\n { x: 0.109375, y: 0.234375 },\n { x: 0.140625, y: 0.234375 },\n { x: 0.140625, y: 0.234375 },\n { x: 0.171875, y: 0.234375 },\n { x: 0.171875, y: 0.234375 },\n { x: 0.203125, y: 0.234375 },\n { x: 0.203125, y: 0.234375 },\n { x: 0.234375, y: 0.234375 },\n { x: 0.234375, y: 0.234375 },\n { x: 0.265625, y: 0.234375 },\n { x: 0.265625, y: 0.234375 },\n { x: 0.296875, y: 0.234375 },\n { x: 0.296875, y: 0.234375 },\n { x: 0.328125, y: 0.234375 },\n { x: 0.328125, y: 0.234375 },\n { x: 0.359375, y: 0.234375 },\n { x: 0.359375, y: 0.234375 },\n { x: 0.390625, y: 0.234375 },\n { x: 0.390625, y: 0.234375 },\n { x: 0.421875, y: 0.234375 },\n { x: 0.421875, y: 0.234375 },\n { x: 0.453125, y: 0.234375 },\n { x: 0.453125, y: 0.234375 },\n { x: 0.484375, y: 0.234375 },\n { x: 0.484375, y: 0.234375 },\n { x: 0.515625, y: 0.234375 },\n { x: 0.515625, y: 0.234375 },\n { x: 0.546875, y: 0.234375 },\n { x: 0.546875, y: 0.234375 },\n { x: 0.578125, y: 0.234375 },\n { x: 0.578125, y: 0.234375 },\n { x: 0.609375, y: 0.234375 },\n { x: 0.609375, y: 0.234375 },\n { x: 0.640625, y: 0.234375 },\n { x: 0.640625, y: 0.234375 },\n { x: 0.671875, y: 0.234375 },\n { x: 0.671875, y: 0.234375 },\n { x: 0.703125, y: 0.234375 },\n { x: 0.703125, y: 0.234375 },\n { x: 0.734375, y: 0.234375 },\n { x: 0.734375, y: 0.234375 },\n { x: 0.765625, y: 0.234375 },\n { x: 0.765625, y: 0.234375 },\n { x: 0.796875, y: 0.234375 },\n { x: 0.796875, y: 0.234375 },\n { x: 0.828125, y: 0.234375 },\n { x: 0.828125, y: 0.234375 },\n { x: 0.859375, y: 0.234375 },\n { x: 0.859375, y: 0.234375 },\n { x: 0.890625, y: 0.234375 },\n { x: 0.890625, y: 0.234375 },\n { x: 0.921875, y: 0.234375 },\n { x: 0.921875, y: 0.234375 },\n { x: 0.953125, y: 0.234375 },\n { x: 0.953125, y: 0.234375 },\n { x: 0.984375, y: 0.234375 },\n { x: 0.984375, y: 0.234375 },\n { x: 0.015625, y: 0.265625 },\n { x: 0.015625, y: 0.265625 },\n { x: 0.046875, y: 0.265625 },\n { x: 0.046875, y: 0.265625 },\n { x: 0.078125, y: 0.265625 },\n { x: 0.078125, y: 0.265625 },\n { x: 0.109375, y: 0.265625 },\n { x: 0.109375, y: 0.265625 },\n { x: 0.140625, y: 0.265625 },\n { x: 0.140625, y: 0.265625 },\n { x: 0.171875, y: 0.265625 },\n { x: 0.171875, y: 0.265625 },\n { x: 0.203125, y: 0.265625 },\n { x: 0.203125, y: 0.265625 },\n { x: 0.234375, y: 0.265625 },\n { x: 0.234375, y: 0.265625 },\n { x: 0.265625, y: 0.265625 },\n { x: 0.265625, y: 0.265625 },\n { x: 0.296875, y: 0.265625 },\n { x: 0.296875, y: 0.265625 },\n { x: 0.328125, y: 0.265625 },\n { x: 0.328125, y: 0.265625 },\n { x: 0.359375, y: 0.265625 },\n { x: 0.359375, y: 0.265625 },\n { x: 0.390625, y: 0.265625 },\n { x: 0.390625, y: 0.265625 },\n { x: 0.421875, y: 0.265625 },\n { x: 0.421875, y: 0.265625 },\n { x: 0.453125, y: 0.265625 },\n { x: 0.453125, y: 0.265625 },\n { x: 0.484375, y: 0.265625 },\n { x: 0.484375, y: 0.265625 },\n { x: 0.515625, y: 0.265625 },\n { x: 0.515625, y: 0.265625 },\n { x: 0.546875, y: 0.265625 },\n { x: 0.546875, y: 0.265625 },\n { x: 0.578125, y: 0.265625 },\n { x: 0.578125, y: 0.265625 },\n { x: 0.609375, y: 0.265625 },\n { x: 0.609375, y: 0.265625 },\n { x: 0.640625, y: 0.265625 },\n { x: 0.640625, y: 0.265625 },\n { x: 0.671875, y: 0.265625 },\n { x: 0.671875, y: 0.265625 },\n { x: 0.703125, y: 0.265625 },\n { x: 0.703125, y: 0.265625 },\n { x: 0.734375, y: 0.265625 },\n { x: 0.734375, y: 0.265625 },\n { x: 0.765625, y: 0.265625 },\n { x: 0.765625, y: 0.265625 },\n { x: 0.796875, y: 0.265625 },\n { x: 0.796875, y: 0.265625 },\n { x: 0.828125, y: 0.265625 },\n { x: 0.828125, y: 0.265625 },\n { x: 0.859375, y: 0.265625 },\n { x: 0.859375, y: 0.265625 },\n { x: 0.890625, y: 0.265625 },\n { x: 0.890625, y: 0.265625 },\n { x: 0.921875, y: 0.265625 },\n { x: 0.921875, y: 0.265625 },\n { x: 0.953125, y: 0.265625 },\n { x: 0.953125, y: 0.265625 },\n { x: 0.984375, y: 0.265625 },\n { x: 0.984375, y: 0.265625 },\n { x: 0.015625, y: 0.296875 },\n { x: 0.015625, y: 0.296875 },\n { x: 0.046875, y: 0.296875 },\n { x: 0.046875, y: 0.296875 },\n { x: 0.078125, y: 0.296875 },\n { x: 0.078125, y: 0.296875 },\n { x: 0.109375, y: 0.296875 },\n { x: 0.109375, y: 0.296875 },\n { x: 0.140625, y: 0.296875 },\n { x: 0.140625, y: 0.296875 },\n { x: 0.171875, y: 0.296875 },\n { x: 0.171875, y: 0.296875 },\n { x: 0.203125, y: 0.296875 },\n { x: 0.203125, y: 0.296875 },\n { x: 0.234375, y: 0.296875 },\n { x: 0.234375, y: 0.296875 },\n { x: 0.265625, y: 0.296875 },\n { x: 0.265625, y: 0.296875 },\n { x: 0.296875, y: 0.296875 },\n { x: 0.296875, y: 0.296875 },\n { x: 0.328125, y: 0.296875 },\n { x: 0.328125, y: 0.296875 },\n { x: 0.359375, y: 0.296875 },\n { x: 0.359375, y: 0.296875 },\n { x: 0.390625, y: 0.296875 },\n { x: 0.390625, y: 0.296875 },\n { x: 0.421875, y: 0.296875 },\n { x: 0.421875, y: 0.296875 },\n { x: 0.453125, y: 0.296875 },\n { x: 0.453125, y: 0.296875 },\n { x: 0.484375, y: 0.296875 },\n { x: 0.484375, y: 0.296875 },\n { x: 0.515625, y: 0.296875 },\n { x: 0.515625, y: 0.296875 },\n { x: 0.546875, y: 0.296875 },\n { x: 0.546875, y: 0.296875 },\n { x: 0.578125, y: 0.296875 },\n { x: 0.578125, y: 0.296875 },\n { x: 0.609375, y: 0.296875 },\n { x: 0.609375, y: 0.296875 },\n { x: 0.640625, y: 0.296875 },\n { x: 0.640625, y: 0.296875 },\n { x: 0.671875, y: 0.296875 },\n { x: 0.671875, y: 0.296875 },\n { x: 0.703125, y: 0.296875 },\n { x: 0.703125, y: 0.296875 },\n { x: 0.734375, y: 0.296875 },\n { x: 0.734375, y: 0.296875 },\n { x: 0.765625, y: 0.296875 },\n { x: 0.765625, y: 0.296875 },\n { x: 0.796875, y: 0.296875 },\n { x: 0.796875, y: 0.296875 },\n { x: 0.828125, y: 0.296875 },\n { x: 0.828125, y: 0.296875 },\n { x: 0.859375, y: 0.296875 },\n { x: 0.859375, y: 0.296875 },\n { x: 0.890625, y: 0.296875 },\n { x: 0.890625, y: 0.296875 },\n { x: 0.921875, y: 0.296875 },\n { x: 0.921875, y: 0.296875 },\n { x: 0.953125, y: 0.296875 },\n { x: 0.953125, y: 0.296875 },\n { x: 0.984375, y: 0.296875 },\n { x: 0.984375, y: 0.296875 },\n { x: 0.015625, y: 0.328125 },\n { x: 0.015625, y: 0.328125 },\n { x: 0.046875, y: 0.328125 },\n { x: 0.046875, y: 0.328125 },\n { x: 0.078125, y: 0.328125 },\n { x: 0.078125, y: 0.328125 },\n { x: 0.109375, y: 0.328125 },\n { x: 0.109375, y: 0.328125 },\n { x: 0.140625, y: 0.328125 },\n { x: 0.140625, y: 0.328125 },\n { x: 0.171875, y: 0.328125 },\n { x: 0.171875, y: 0.328125 },\n { x: 0.203125, y: 0.328125 },\n { x: 0.203125, y: 0.328125 },\n { x: 0.234375, y: 0.328125 },\n { x: 0.234375, y: 0.328125 },\n { x: 0.265625, y: 0.328125 },\n { x: 0.265625, y: 0.328125 },\n { x: 0.296875, y: 0.328125 },\n { x: 0.296875, y: 0.328125 },\n { x: 0.328125, y: 0.328125 },\n { x: 0.328125, y: 0.328125 },\n { x: 0.359375, y: 0.328125 },\n { x: 0.359375, y: 0.328125 },\n { x: 0.390625, y: 0.328125 },\n { x: 0.390625, y: 0.328125 },\n { x: 0.421875, y: 0.328125 },\n { x: 0.421875, y: 0.328125 },\n { x: 0.453125, y: 0.328125 },\n { x: 0.453125, y: 0.328125 },\n { x: 0.484375, y: 0.328125 },\n { x: 0.484375, y: 0.328125 },\n { x: 0.515625, y: 0.328125 },\n { x: 0.515625, y: 0.328125 },\n { x: 0.546875, y: 0.328125 },\n { x: 0.546875, y: 0.328125 },\n { x: 0.578125, y: 0.328125 },\n { x: 0.578125, y: 0.328125 },\n { x: 0.609375, y: 0.328125 },\n { x: 0.609375, y: 0.328125 },\n { x: 0.640625, y: 0.328125 },\n { x: 0.640625, y: 0.328125 },\n { x: 0.671875, y: 0.328125 },\n { x: 0.671875, y: 0.328125 },\n { x: 0.703125, y: 0.328125 },\n { x: 0.703125, y: 0.328125 },\n { x: 0.734375, y: 0.328125 },\n { x: 0.734375, y: 0.328125 },\n { x: 0.765625, y: 0.328125 },\n { x: 0.765625, y: 0.328125 },\n { x: 0.796875, y: 0.328125 },\n { x: 0.796875, y: 0.328125 },\n { x: 0.828125, y: 0.328125 },\n { x: 0.828125, y: 0.328125 },\n { x: 0.859375, y: 0.328125 },\n { x: 0.859375, y: 0.328125 },\n { x: 0.890625, y: 0.328125 },\n { x: 0.890625, y: 0.328125 },\n { x: 0.921875, y: 0.328125 },\n { x: 0.921875, y: 0.328125 },\n { x: 0.953125, y: 0.328125 },\n { x: 0.953125, y: 0.328125 },\n { x: 0.984375, y: 0.328125 },\n { x: 0.984375, y: 0.328125 },\n { x: 0.015625, y: 0.359375 },\n { x: 0.015625, y: 0.359375 },\n { x: 0.046875, y: 0.359375 },\n { x: 0.046875, y: 0.359375 },\n { x: 0.078125, y: 0.359375 },\n { x: 0.078125, y: 0.359375 },\n { x: 0.109375, y: 0.359375 },\n { x: 0.109375, y: 0.359375 },\n { x: 0.140625, y: 0.359375 },\n { x: 0.140625, y: 0.359375 },\n { x: 0.171875, y: 0.359375 },\n { x: 0.171875, y: 0.359375 },\n { x: 0.203125, y: 0.359375 },\n { x: 0.203125, y: 0.359375 },\n { x: 0.234375, y: 0.359375 },\n { x: 0.234375, y: 0.359375 },\n { x: 0.265625, y: 0.359375 },\n { x: 0.265625, y: 0.359375 },\n { x: 0.296875, y: 0.359375 },\n { x: 0.296875, y: 0.359375 },\n { x: 0.328125, y: 0.359375 },\n { x: 0.328125, y: 0.359375 },\n { x: 0.359375, y: 0.359375 },\n { x: 0.359375, y: 0.359375 },\n { x: 0.390625, y: 0.359375 },\n { x: 0.390625, y: 0.359375 },\n { x: 0.421875, y: 0.359375 },\n { x: 0.421875, y: 0.359375 },\n { x: 0.453125, y: 0.359375 },\n { x: 0.453125, y: 0.359375 },\n { x: 0.484375, y: 0.359375 },\n { x: 0.484375, y: 0.359375 },\n { x: 0.515625, y: 0.359375 },\n { x: 0.515625, y: 0.359375 },\n { x: 0.546875, y: 0.359375 },\n { x: 0.546875, y: 0.359375 },\n { x: 0.578125, y: 0.359375 },\n { x: 0.578125, y: 0.359375 },\n { x: 0.609375, y: 0.359375 },\n { x: 0.609375, y: 0.359375 },\n { x: 0.640625, y: 0.359375 },\n { x: 0.640625, y: 0.359375 },\n { x: 0.671875, y: 0.359375 },\n { x: 0.671875, y: 0.359375 },\n { x: 0.703125, y: 0.359375 },\n { x: 0.703125, y: 0.359375 },\n { x: 0.734375, y: 0.359375 },\n { x: 0.734375, y: 0.359375 },\n { x: 0.765625, y: 0.359375 },\n { x: 0.765625, y: 0.359375 },\n { x: 0.796875, y: 0.359375 },\n { x: 0.796875, y: 0.359375 },\n { x: 0.828125, y: 0.359375 },\n { x: 0.828125, y: 0.359375 },\n { x: 0.859375, y: 0.359375 },\n { x: 0.859375, y: 0.359375 },\n { x: 0.890625, y: 0.359375 },\n { x: 0.890625, y: 0.359375 },\n { x: 0.921875, y: 0.359375 },\n { x: 0.921875, y: 0.359375 },\n { x: 0.953125, y: 0.359375 },\n { x: 0.953125, y: 0.359375 },\n { x: 0.984375, y: 0.359375 },\n { x: 0.984375, y: 0.359375 },\n { x: 0.015625, y: 0.390625 },\n { x: 0.015625, y: 0.390625 },\n { x: 0.046875, y: 0.390625 },\n { x: 0.046875, y: 0.390625 },\n { x: 0.078125, y: 0.390625 },\n { x: 0.078125, y: 0.390625 },\n { x: 0.109375, y: 0.390625 },\n { x: 0.109375, y: 0.390625 },\n { x: 0.140625, y: 0.390625 },\n { x: 0.140625, y: 0.390625 },\n { x: 0.171875, y: 0.390625 },\n { x: 0.171875, y: 0.390625 },\n { x: 0.203125, y: 0.390625 },\n { x: 0.203125, y: 0.390625 },\n { x: 0.234375, y: 0.390625 },\n { x: 0.234375, y: 0.390625 },\n { x: 0.265625, y: 0.390625 },\n { x: 0.265625, y: 0.390625 },\n { x: 0.296875, y: 0.390625 },\n { x: 0.296875, y: 0.390625 },\n { x: 0.328125, y: 0.390625 },\n { x: 0.328125, y: 0.390625 },\n { x: 0.359375, y: 0.390625 },\n { x: 0.359375, y: 0.390625 },\n { x: 0.390625, y: 0.390625 },\n { x: 0.390625, y: 0.390625 },\n { x: 0.421875, y: 0.390625 },\n { x: 0.421875, y: 0.390625 },\n { x: 0.453125, y: 0.390625 },\n { x: 0.453125, y: 0.390625 },\n { x: 0.484375, y: 0.390625 },\n { x: 0.484375, y: 0.390625 },\n { x: 0.515625, y: 0.390625 },\n { x: 0.515625, y: 0.390625 },\n { x: 0.546875, y: 0.390625 },\n { x: 0.546875, y: 0.390625 },\n { x: 0.578125, y: 0.390625 },\n { x: 0.578125, y: 0.390625 },\n { x: 0.609375, y: 0.390625 },\n { x: 0.609375, y: 0.390625 },\n { x: 0.640625, y: 0.390625 },\n { x: 0.640625, y: 0.390625 },\n { x: 0.671875, y: 0.390625 },\n { x: 0.671875, y: 0.390625 },\n { x: 0.703125, y: 0.390625 },\n { x: 0.703125, y: 0.390625 },\n { x: 0.734375, y: 0.390625 },\n { x: 0.734375, y: 0.390625 },\n { x: 0.765625, y: 0.390625 },\n { x: 0.765625, y: 0.390625 },\n { x: 0.796875, y: 0.390625 },\n { x: 0.796875, y: 0.390625 },\n { x: 0.828125, y: 0.390625 },\n { x: 0.828125, y: 0.390625 },\n { x: 0.859375, y: 0.390625 },\n { x: 0.859375, y: 0.390625 },\n { x: 0.890625, y: 0.390625 },\n { x: 0.890625, y: 0.390625 },\n { x: 0.921875, y: 0.390625 },\n { x: 0.921875, y: 0.390625 },\n { x: 0.953125, y: 0.390625 },\n { x: 0.953125, y: 0.390625 },\n { x: 0.984375, y: 0.390625 },\n { x: 0.984375, y: 0.390625 },\n { x: 0.015625, y: 0.421875 },\n { x: 0.015625, y: 0.421875 },\n { x: 0.046875, y: 0.421875 },\n { x: 0.046875, y: 0.421875 },\n { x: 0.078125, y: 0.421875 },\n { x: 0.078125, y: 0.421875 },\n { x: 0.109375, y: 0.421875 },\n { x: 0.109375, y: 0.421875 },\n { x: 0.140625, y: 0.421875 },\n { x: 0.140625, y: 0.421875 },\n { x: 0.171875, y: 0.421875 },\n { x: 0.171875, y: 0.421875 },\n { x: 0.203125, y: 0.421875 },\n { x: 0.203125, y: 0.421875 },\n { x: 0.234375, y: 0.421875 },\n { x: 0.234375, y: 0.421875 },\n { x: 0.265625, y: 0.421875 },\n { x: 0.265625, y: 0.421875 },\n { x: 0.296875, y: 0.421875 },\n { x: 0.296875, y: 0.421875 },\n { x: 0.328125, y: 0.421875 },\n { x: 0.328125, y: 0.421875 },\n { x: 0.359375, y: 0.421875 },\n { x: 0.359375, y: 0.421875 },\n { x: 0.390625, y: 0.421875 },\n { x: 0.390625, y: 0.421875 },\n { x: 0.421875, y: 0.421875 },\n { x: 0.421875, y: 0.421875 },\n { x: 0.453125, y: 0.421875 },\n { x: 0.453125, y: 0.421875 },\n { x: 0.484375, y: 0.421875 },\n { x: 0.484375, y: 0.421875 },\n { x: 0.515625, y: 0.421875 },\n { x: 0.515625, y: 0.421875 },\n { x: 0.546875, y: 0.421875 },\n { x: 0.546875, y: 0.421875 },\n { x: 0.578125, y: 0.421875 },\n { x: 0.578125, y: 0.421875 },\n { x: 0.609375, y: 0.421875 },\n { x: 0.609375, y: 0.421875 },\n { x: 0.640625, y: 0.421875 },\n { x: 0.640625, y: 0.421875 },\n { x: 0.671875, y: 0.421875 },\n { x: 0.671875, y: 0.421875 },\n { x: 0.703125, y: 0.421875 },\n { x: 0.703125, y: 0.421875 },\n { x: 0.734375, y: 0.421875 },\n { x: 0.734375, y: 0.421875 },\n { x: 0.765625, y: 0.421875 },\n { x: 0.765625, y: 0.421875 },\n { x: 0.796875, y: 0.421875 },\n { x: 0.796875, y: 0.421875 },\n { x: 0.828125, y: 0.421875 },\n { x: 0.828125, y: 0.421875 },\n { x: 0.859375, y: 0.421875 },\n { x: 0.859375, y: 0.421875 },\n { x: 0.890625, y: 0.421875 },\n { x: 0.890625, y: 0.421875 },\n { x: 0.921875, y: 0.421875 },\n { x: 0.921875, y: 0.421875 },\n { x: 0.953125, y: 0.421875 },\n { x: 0.953125, y: 0.421875 },\n { x: 0.984375, y: 0.421875 },\n { x: 0.984375, y: 0.421875 },\n { x: 0.015625, y: 0.453125 },\n { x: 0.015625, y: 0.453125 },\n { x: 0.046875, y: 0.453125 },\n { x: 0.046875, y: 0.453125 },\n { x: 0.078125, y: 0.453125 },\n { x: 0.078125, y: 0.453125 },\n { x: 0.109375, y: 0.453125 },\n { x: 0.109375, y: 0.453125 },\n { x: 0.140625, y: 0.453125 },\n { x: 0.140625, y: 0.453125 },\n { x: 0.171875, y: 0.453125 },\n { x: 0.171875, y: 0.453125 },\n { x: 0.203125, y: 0.453125 },\n { x: 0.203125, y: 0.453125 },\n { x: 0.234375, y: 0.453125 },\n { x: 0.234375, y: 0.453125 },\n { x: 0.265625, y: 0.453125 },\n { x: 0.265625, y: 0.453125 },\n { x: 0.296875, y: 0.453125 },\n { x: 0.296875, y: 0.453125 },\n { x: 0.328125, y: 0.453125 },\n { x: 0.328125, y: 0.453125 },\n { x: 0.359375, y: 0.453125 },\n { x: 0.359375, y: 0.453125 },\n { x: 0.390625, y: 0.453125 },\n { x: 0.390625, y: 0.453125 },\n { x: 0.421875, y: 0.453125 },\n { x: 0.421875, y: 0.453125 },\n { x: 0.453125, y: 0.453125 },\n { x: 0.453125, y: 0.453125 },\n { x: 0.484375, y: 0.453125 },\n { x: 0.484375, y: 0.453125 },\n { x: 0.515625, y: 0.453125 },\n { x: 0.515625, y: 0.453125 },\n { x: 0.546875, y: 0.453125 },\n { x: 0.546875, y: 0.453125 },\n { x: 0.578125, y: 0.453125 },\n { x: 0.578125, y: 0.453125 },\n { x: 0.609375, y: 0.453125 },\n { x: 0.609375, y: 0.453125 },\n { x: 0.640625, y: 0.453125 },\n { x: 0.640625, y: 0.453125 },\n { x: 0.671875, y: 0.453125 },\n { x: 0.671875, y: 0.453125 },\n { x: 0.703125, y: 0.453125 },\n { x: 0.703125, y: 0.453125 },\n { x: 0.734375, y: 0.453125 },\n { x: 0.734375, y: 0.453125 },\n { x: 0.765625, y: 0.453125 },\n { x: 0.765625, y: 0.453125 },\n { x: 0.796875, y: 0.453125 },\n { x: 0.796875, y: 0.453125 },\n { x: 0.828125, y: 0.453125 },\n { x: 0.828125, y: 0.453125 },\n { x: 0.859375, y: 0.453125 },\n { x: 0.859375, y: 0.453125 },\n { x: 0.890625, y: 0.453125 },\n { x: 0.890625, y: 0.453125 },\n { x: 0.921875, y: 0.453125 },\n { x: 0.921875, y: 0.453125 },\n { x: 0.953125, y: 0.453125 },\n { x: 0.953125, y: 0.453125 },\n { x: 0.984375, y: 0.453125 },\n { x: 0.984375, y: 0.453125 },\n { x: 0.015625, y: 0.484375 },\n { x: 0.015625, y: 0.484375 },\n { x: 0.046875, y: 0.484375 },\n { x: 0.046875, y: 0.484375 },\n { x: 0.078125, y: 0.484375 },\n { x: 0.078125, y: 0.484375 },\n { x: 0.109375, y: 0.484375 },\n { x: 0.109375, y: 0.484375 },\n { x: 0.140625, y: 0.484375 },\n { x: 0.140625, y: 0.484375 },\n { x: 0.171875, y: 0.484375 },\n { x: 0.171875, y: 0.484375 },\n { x: 0.203125, y: 0.484375 },\n { x: 0.203125, y: 0.484375 },\n { x: 0.234375, y: 0.484375 },\n { x: 0.234375, y: 0.484375 },\n { x: 0.265625, y: 0.484375 },\n { x: 0.265625, y: 0.484375 },\n { x: 0.296875, y: 0.484375 },\n { x: 0.296875, y: 0.484375 },\n { x: 0.328125, y: 0.484375 },\n { x: 0.328125, y: 0.484375 },\n { x: 0.359375, y: 0.484375 },\n { x: 0.359375, y: 0.484375 },\n { x: 0.390625, y: 0.484375 },\n { x: 0.390625, y: 0.484375 },\n { x: 0.421875, y: 0.484375 },\n { x: 0.421875, y: 0.484375 },\n { x: 0.453125, y: 0.484375 },\n { x: 0.453125, y: 0.484375 },\n { x: 0.484375, y: 0.484375 },\n { x: 0.484375, y: 0.484375 },\n { x: 0.515625, y: 0.484375 },\n { x: 0.515625, y: 0.484375 },\n { x: 0.546875, y: 0.484375 },\n { x: 0.546875, y: 0.484375 },\n { x: 0.578125, y: 0.484375 },\n { x: 0.578125, y: 0.484375 },\n { x: 0.609375, y: 0.484375 },\n { x: 0.609375, y: 0.484375 },\n { x: 0.640625, y: 0.484375 },\n { x: 0.640625, y: 0.484375 },\n { x: 0.671875, y: 0.484375 },\n { x: 0.671875, y: 0.484375 },\n { x: 0.703125, y: 0.484375 },\n { x: 0.703125, y: 0.484375 },\n { x: 0.734375, y: 0.484375 },\n { x: 0.734375, y: 0.484375 },\n { x: 0.765625, y: 0.484375 },\n { x: 0.765625, y: 0.484375 },\n { x: 0.796875, y: 0.484375 },\n { x: 0.796875, y: 0.484375 },\n { x: 0.828125, y: 0.484375 },\n { x: 0.828125, y: 0.484375 },\n { x: 0.859375, y: 0.484375 },\n { x: 0.859375, y: 0.484375 },\n { x: 0.890625, y: 0.484375 },\n { x: 0.890625, y: 0.484375 },\n { x: 0.921875, y: 0.484375 },\n { x: 0.921875, y: 0.484375 },\n { x: 0.953125, y: 0.484375 },\n { x: 0.953125, y: 0.484375 },\n { x: 0.984375, y: 0.484375 },\n { x: 0.984375, y: 0.484375 },\n { x: 0.015625, y: 0.515625 },\n { x: 0.015625, y: 0.515625 },\n { x: 0.046875, y: 0.515625 },\n { x: 0.046875, y: 0.515625 },\n { x: 0.078125, y: 0.515625 },\n { x: 0.078125, y: 0.515625 },\n { x: 0.109375, y: 0.515625 },\n { x: 0.109375, y: 0.515625 },\n { x: 0.140625, y: 0.515625 },\n { x: 0.140625, y: 0.515625 },\n { x: 0.171875, y: 0.515625 },\n { x: 0.171875, y: 0.515625 },\n { x: 0.203125, y: 0.515625 },\n { x: 0.203125, y: 0.515625 },\n { x: 0.234375, y: 0.515625 },\n { x: 0.234375, y: 0.515625 },\n { x: 0.265625, y: 0.515625 },\n { x: 0.265625, y: 0.515625 },\n { x: 0.296875, y: 0.515625 },\n { x: 0.296875, y: 0.515625 },\n { x: 0.328125, y: 0.515625 },\n { x: 0.328125, y: 0.515625 },\n { x: 0.359375, y: 0.515625 },\n { x: 0.359375, y: 0.515625 },\n { x: 0.390625, y: 0.515625 },\n { x: 0.390625, y: 0.515625 },\n { x: 0.421875, y: 0.515625 },\n { x: 0.421875, y: 0.515625 },\n { x: 0.453125, y: 0.515625 },\n { x: 0.453125, y: 0.515625 },\n { x: 0.484375, y: 0.515625 },\n { x: 0.484375, y: 0.515625 },\n { x: 0.515625, y: 0.515625 },\n { x: 0.515625, y: 0.515625 },\n { x: 0.546875, y: 0.515625 },\n { x: 0.546875, y: 0.515625 },\n { x: 0.578125, y: 0.515625 },\n { x: 0.578125, y: 0.515625 },\n { x: 0.609375, y: 0.515625 },\n { x: 0.609375, y: 0.515625 },\n { x: 0.640625, y: 0.515625 },\n { x: 0.640625, y: 0.515625 },\n { x: 0.671875, y: 0.515625 },\n { x: 0.671875, y: 0.515625 },\n { x: 0.703125, y: 0.515625 },\n { x: 0.703125, y: 0.515625 },\n { x: 0.734375, y: 0.515625 },\n { x: 0.734375, y: 0.515625 },\n { x: 0.765625, y: 0.515625 },\n { x: 0.765625, y: 0.515625 },\n { x: 0.796875, y: 0.515625 },\n { x: 0.796875, y: 0.515625 },\n { x: 0.828125, y: 0.515625 },\n { x: 0.828125, y: 0.515625 },\n { x: 0.859375, y: 0.515625 },\n { x: 0.859375, y: 0.515625 },\n { x: 0.890625, y: 0.515625 },\n { x: 0.890625, y: 0.515625 },\n { x: 0.921875, y: 0.515625 },\n { x: 0.921875, y: 0.515625 },\n { x: 0.953125, y: 0.515625 },\n { x: 0.953125, y: 0.515625 },\n { x: 0.984375, y: 0.515625 },\n { x: 0.984375, y: 0.515625 },\n { x: 0.015625, y: 0.546875 },\n { x: 0.015625, y: 0.546875 },\n { x: 0.046875, y: 0.546875 },\n { x: 0.046875, y: 0.546875 },\n { x: 0.078125, y: 0.546875 },\n { x: 0.078125, y: 0.546875 },\n { x: 0.109375, y: 0.546875 },\n { x: 0.109375, y: 0.546875 },\n { x: 0.140625, y: 0.546875 },\n { x: 0.140625, y: 0.546875 },\n { x: 0.171875, y: 0.546875 },\n { x: 0.171875, y: 0.546875 },\n { x: 0.203125, y: 0.546875 },\n { x: 0.203125, y: 0.546875 },\n { x: 0.234375, y: 0.546875 },\n { x: 0.234375, y: 0.546875 },\n { x: 0.265625, y: 0.546875 },\n { x: 0.265625, y: 0.546875 },\n { x: 0.296875, y: 0.546875 },\n { x: 0.296875, y: 0.546875 },\n { x: 0.328125, y: 0.546875 },\n { x: 0.328125, y: 0.546875 },\n { x: 0.359375, y: 0.546875 },\n { x: 0.359375, y: 0.546875 },\n { x: 0.390625, y: 0.546875 },\n { x: 0.390625, y: 0.546875 },\n { x: 0.421875, y: 0.546875 },\n { x: 0.421875, y: 0.546875 },\n { x: 0.453125, y: 0.546875 },\n { x: 0.453125, y: 0.546875 },\n { x: 0.484375, y: 0.546875 },\n { x: 0.484375, y: 0.546875 },\n { x: 0.515625, y: 0.546875 },\n { x: 0.515625, y: 0.546875 },\n { x: 0.546875, y: 0.546875 },\n { x: 0.546875, y: 0.546875 },\n { x: 0.578125, y: 0.546875 },\n { x: 0.578125, y: 0.546875 },\n { x: 0.609375, y: 0.546875 },\n { x: 0.609375, y: 0.546875 },\n { x: 0.640625, y: 0.546875 },\n { x: 0.640625, y: 0.546875 },\n { x: 0.671875, y: 0.546875 },\n { x: 0.671875, y: 0.546875 },\n { x: 0.703125, y: 0.546875 },\n { x: 0.703125, y: 0.546875 },\n { x: 0.734375, y: 0.546875 },\n { x: 0.734375, y: 0.546875 },\n { x: 0.765625, y: 0.546875 },\n { x: 0.765625, y: 0.546875 },\n { x: 0.796875, y: 0.546875 },\n { x: 0.796875, y: 0.546875 },\n { x: 0.828125, y: 0.546875 },\n { x: 0.828125, y: 0.546875 },\n { x: 0.859375, y: 0.546875 },\n { x: 0.859375, y: 0.546875 },\n { x: 0.890625, y: 0.546875 },\n { x: 0.890625, y: 0.546875 },\n { x: 0.921875, y: 0.546875 },\n { x: 0.921875, y: 0.546875 },\n { x: 0.953125, y: 0.546875 },\n { x: 0.953125, y: 0.546875 },\n { x: 0.984375, y: 0.546875 },\n { x: 0.984375, y: 0.546875 },\n { x: 0.015625, y: 0.578125 },\n { x: 0.015625, y: 0.578125 },\n { x: 0.046875, y: 0.578125 },\n { x: 0.046875, y: 0.578125 },\n { x: 0.078125, y: 0.578125 },\n { x: 0.078125, y: 0.578125 },\n { x: 0.109375, y: 0.578125 },\n { x: 0.109375, y: 0.578125 },\n { x: 0.140625, y: 0.578125 },\n { x: 0.140625, y: 0.578125 },\n { x: 0.171875, y: 0.578125 },\n { x: 0.171875, y: 0.578125 },\n { x: 0.203125, y: 0.578125 },\n { x: 0.203125, y: 0.578125 },\n { x: 0.234375, y: 0.578125 },\n { x: 0.234375, y: 0.578125 },\n { x: 0.265625, y: 0.578125 },\n { x: 0.265625, y: 0.578125 },\n { x: 0.296875, y: 0.578125 },\n { x: 0.296875, y: 0.578125 },\n { x: 0.328125, y: 0.578125 },\n { x: 0.328125, y: 0.578125 },\n { x: 0.359375, y: 0.578125 },\n { x: 0.359375, y: 0.578125 },\n { x: 0.390625, y: 0.578125 },\n { x: 0.390625, y: 0.578125 },\n { x: 0.421875, y: 0.578125 },\n { x: 0.421875, y: 0.578125 },\n { x: 0.453125, y: 0.578125 },\n { x: 0.453125, y: 0.578125 },\n { x: 0.484375, y: 0.578125 },\n { x: 0.484375, y: 0.578125 },\n { x: 0.515625, y: 0.578125 },\n { x: 0.515625, y: 0.578125 },\n { x: 0.546875, y: 0.578125 },\n { x: 0.546875, y: 0.578125 },\n { x: 0.578125, y: 0.578125 },\n { x: 0.578125, y: 0.578125 },\n { x: 0.609375, y: 0.578125 },\n { x: 0.609375, y: 0.578125 },\n { x: 0.640625, y: 0.578125 },\n { x: 0.640625, y: 0.578125 },\n { x: 0.671875, y: 0.578125 },\n { x: 0.671875, y: 0.578125 },\n { x: 0.703125, y: 0.578125 },\n { x: 0.703125, y: 0.578125 },\n { x: 0.734375, y: 0.578125 },\n { x: 0.734375, y: 0.578125 },\n { x: 0.765625, y: 0.578125 },\n { x: 0.765625, y: 0.578125 },\n { x: 0.796875, y: 0.578125 },\n { x: 0.796875, y: 0.578125 },\n { x: 0.828125, y: 0.578125 },\n { x: 0.828125, y: 0.578125 },\n { x: 0.859375, y: 0.578125 },\n { x: 0.859375, y: 0.578125 },\n { x: 0.890625, y: 0.578125 },\n { x: 0.890625, y: 0.578125 },\n { x: 0.921875, y: 0.578125 },\n { x: 0.921875, y: 0.578125 },\n { x: 0.953125, y: 0.578125 },\n { x: 0.953125, y: 0.578125 },\n { x: 0.984375, y: 0.578125 },\n { x: 0.984375, y: 0.578125 },\n { x: 0.015625, y: 0.609375 },\n { x: 0.015625, y: 0.609375 },\n { x: 0.046875, y: 0.609375 },\n { x: 0.046875, y: 0.609375 },\n { x: 0.078125, y: 0.609375 },\n { x: 0.078125, y: 0.609375 },\n { x: 0.109375, y: 0.609375 },\n { x: 0.109375, y: 0.609375 },\n { x: 0.140625, y: 0.609375 },\n { x: 0.140625, y: 0.609375 },\n { x: 0.171875, y: 0.609375 },\n { x: 0.171875, y: 0.609375 },\n { x: 0.203125, y: 0.609375 },\n { x: 0.203125, y: 0.609375 },\n { x: 0.234375, y: 0.609375 },\n { x: 0.234375, y: 0.609375 },\n { x: 0.265625, y: 0.609375 },\n { x: 0.265625, y: 0.609375 },\n { x: 0.296875, y: 0.609375 },\n { x: 0.296875, y: 0.609375 },\n { x: 0.328125, y: 0.609375 },\n { x: 0.328125, y: 0.609375 },\n { x: 0.359375, y: 0.609375 },\n { x: 0.359375, y: 0.609375 },\n { x: 0.390625, y: 0.609375 },\n { x: 0.390625, y: 0.609375 },\n { x: 0.421875, y: 0.609375 },\n { x: 0.421875, y: 0.609375 },\n { x: 0.453125, y: 0.609375 },\n { x: 0.453125, y: 0.609375 },\n { x: 0.484375, y: 0.609375 },\n { x: 0.484375, y: 0.609375 },\n { x: 0.515625, y: 0.609375 },\n { x: 0.515625, y: 0.609375 },\n { x: 0.546875, y: 0.609375 },\n { x: 0.546875, y: 0.609375 },\n { x: 0.578125, y: 0.609375 },\n { x: 0.578125, y: 0.609375 },\n { x: 0.609375, y: 0.609375 },\n { x: 0.609375, y: 0.609375 },\n { x: 0.640625, y: 0.609375 },\n { x: 0.640625, y: 0.609375 },\n { x: 0.671875, y: 0.609375 },\n { x: 0.671875, y: 0.609375 },\n { x: 0.703125, y: 0.609375 },\n { x: 0.703125, y: 0.609375 },\n { x: 0.734375, y: 0.609375 },\n { x: 0.734375, y: 0.609375 },\n { x: 0.765625, y: 0.609375 },\n { x: 0.765625, y: 0.609375 },\n { x: 0.796875, y: 0.609375 },\n { x: 0.796875, y: 0.609375 },\n { x: 0.828125, y: 0.609375 },\n { x: 0.828125, y: 0.609375 },\n { x: 0.859375, y: 0.609375 },\n { x: 0.859375, y: 0.609375 },\n { x: 0.890625, y: 0.609375 },\n { x: 0.890625, y: 0.609375 },\n { x: 0.921875, y: 0.609375 },\n { x: 0.921875, y: 0.609375 },\n { x: 0.953125, y: 0.609375 },\n { x: 0.953125, y: 0.609375 },\n { x: 0.984375, y: 0.609375 },\n { x: 0.984375, y: 0.609375 },\n { x: 0.015625, y: 0.640625 },\n { x: 0.015625, y: 0.640625 },\n { x: 0.046875, y: 0.640625 },\n { x: 0.046875, y: 0.640625 },\n { x: 0.078125, y: 0.640625 },\n { x: 0.078125, y: 0.640625 },\n { x: 0.109375, y: 0.640625 },\n { x: 0.109375, y: 0.640625 },\n { x: 0.140625, y: 0.640625 },\n { x: 0.140625, y: 0.640625 },\n { x: 0.171875, y: 0.640625 },\n { x: 0.171875, y: 0.640625 },\n { x: 0.203125, y: 0.640625 },\n { x: 0.203125, y: 0.640625 },\n { x: 0.234375, y: 0.640625 },\n { x: 0.234375, y: 0.640625 },\n { x: 0.265625, y: 0.640625 },\n { x: 0.265625, y: 0.640625 },\n { x: 0.296875, y: 0.640625 },\n { x: 0.296875, y: 0.640625 },\n { x: 0.328125, y: 0.640625 },\n { x: 0.328125, y: 0.640625 },\n { x: 0.359375, y: 0.640625 },\n { x: 0.359375, y: 0.640625 },\n { x: 0.390625, y: 0.640625 },\n { x: 0.390625, y: 0.640625 },\n { x: 0.421875, y: 0.640625 },\n { x: 0.421875, y: 0.640625 },\n { x: 0.453125, y: 0.640625 },\n { x: 0.453125, y: 0.640625 },\n { x: 0.484375, y: 0.640625 },\n { x: 0.484375, y: 0.640625 },\n { x: 0.515625, y: 0.640625 },\n { x: 0.515625, y: 0.640625 },\n { x: 0.546875, y: 0.640625 },\n { x: 0.546875, y: 0.640625 },\n { x: 0.578125, y: 0.640625 },\n { x: 0.578125, y: 0.640625 },\n { x: 0.609375, y: 0.640625 },\n { x: 0.609375, y: 0.640625 },\n { x: 0.640625, y: 0.640625 },\n { x: 0.640625, y: 0.640625 },\n { x: 0.671875, y: 0.640625 },\n { x: 0.671875, y: 0.640625 },\n { x: 0.703125, y: 0.640625 },\n { x: 0.703125, y: 0.640625 },\n { x: 0.734375, y: 0.640625 },\n { x: 0.734375, y: 0.640625 },\n { x: 0.765625, y: 0.640625 },\n { x: 0.765625, y: 0.640625 },\n { x: 0.796875, y: 0.640625 },\n { x: 0.796875, y: 0.640625 },\n { x: 0.828125, y: 0.640625 },\n { x: 0.828125, y: 0.640625 },\n { x: 0.859375, y: 0.640625 },\n { x: 0.859375, y: 0.640625 },\n { x: 0.890625, y: 0.640625 },\n { x: 0.890625, y: 0.640625 },\n { x: 0.921875, y: 0.640625 },\n { x: 0.921875, y: 0.640625 },\n { x: 0.953125, y: 0.640625 },\n { x: 0.953125, y: 0.640625 },\n { x: 0.984375, y: 0.640625 },\n { x: 0.984375, y: 0.640625 },\n { x: 0.015625, y: 0.671875 },\n { x: 0.015625, y: 0.671875 },\n { x: 0.046875, y: 0.671875 },\n { x: 0.046875, y: 0.671875 },\n { x: 0.078125, y: 0.671875 },\n { x: 0.078125, y: 0.671875 },\n { x: 0.109375, y: 0.671875 },\n { x: 0.109375, y: 0.671875 },\n { x: 0.140625, y: 0.671875 },\n { x: 0.140625, y: 0.671875 },\n { x: 0.171875, y: 0.671875 },\n { x: 0.171875, y: 0.671875 },\n { x: 0.203125, y: 0.671875 },\n { x: 0.203125, y: 0.671875 },\n { x: 0.234375, y: 0.671875 },\n { x: 0.234375, y: 0.671875 },\n { x: 0.265625, y: 0.671875 },\n { x: 0.265625, y: 0.671875 },\n { x: 0.296875, y: 0.671875 },\n { x: 0.296875, y: 0.671875 },\n { x: 0.328125, y: 0.671875 },\n { x: 0.328125, y: 0.671875 },\n { x: 0.359375, y: 0.671875 },\n { x: 0.359375, y: 0.671875 },\n { x: 0.390625, y: 0.671875 },\n { x: 0.390625, y: 0.671875 },\n { x: 0.421875, y: 0.671875 },\n { x: 0.421875, y: 0.671875 },\n { x: 0.453125, y: 0.671875 },\n { x: 0.453125, y: 0.671875 },\n { x: 0.484375, y: 0.671875 },\n { x: 0.484375, y: 0.671875 },\n { x: 0.515625, y: 0.671875 },\n { x: 0.515625, y: 0.671875 },\n { x: 0.546875, y: 0.671875 },\n { x: 0.546875, y: 0.671875 },\n { x: 0.578125, y: 0.671875 },\n { x: 0.578125, y: 0.671875 },\n { x: 0.609375, y: 0.671875 },\n { x: 0.609375, y: 0.671875 },\n { x: 0.640625, y: 0.671875 },\n { x: 0.640625, y: 0.671875 },\n { x: 0.671875, y: 0.671875 },\n { x: 0.671875, y: 0.671875 },\n { x: 0.703125, y: 0.671875 },\n { x: 0.703125, y: 0.671875 },\n { x: 0.734375, y: 0.671875 },\n { x: 0.734375, y: 0.671875 },\n { x: 0.765625, y: 0.671875 },\n { x: 0.765625, y: 0.671875 },\n { x: 0.796875, y: 0.671875 },\n { x: 0.796875, y: 0.671875 },\n { x: 0.828125, y: 0.671875 },\n { x: 0.828125, y: 0.671875 },\n { x: 0.859375, y: 0.671875 },\n { x: 0.859375, y: 0.671875 },\n { x: 0.890625, y: 0.671875 },\n { x: 0.890625, y: 0.671875 },\n { x: 0.921875, y: 0.671875 },\n { x: 0.921875, y: 0.671875 },\n { x: 0.953125, y: 0.671875 },\n { x: 0.953125, y: 0.671875 },\n { x: 0.984375, y: 0.671875 },\n { x: 0.984375, y: 0.671875 },\n { x: 0.015625, y: 0.703125 },\n { x: 0.015625, y: 0.703125 },\n { x: 0.046875, y: 0.703125 },\n { x: 0.046875, y: 0.703125 },\n { x: 0.078125, y: 0.703125 },\n { x: 0.078125, y: 0.703125 },\n { x: 0.109375, y: 0.703125 },\n { x: 0.109375, y: 0.703125 },\n { x: 0.140625, y: 0.703125 },\n { x: 0.140625, y: 0.703125 },\n { x: 0.171875, y: 0.703125 },\n { x: 0.171875, y: 0.703125 },\n { x: 0.203125, y: 0.703125 },\n { x: 0.203125, y: 0.703125 },\n { x: 0.234375, y: 0.703125 },\n { x: 0.234375, y: 0.703125 },\n { x: 0.265625, y: 0.703125 },\n { x: 0.265625, y: 0.703125 },\n { x: 0.296875, y: 0.703125 },\n { x: 0.296875, y: 0.703125 },\n { x: 0.328125, y: 0.703125 },\n { x: 0.328125, y: 0.703125 },\n { x: 0.359375, y: 0.703125 },\n { x: 0.359375, y: 0.703125 },\n { x: 0.390625, y: 0.703125 },\n { x: 0.390625, y: 0.703125 },\n { x: 0.421875, y: 0.703125 },\n { x: 0.421875, y: 0.703125 },\n { x: 0.453125, y: 0.703125 },\n { x: 0.453125, y: 0.703125 },\n { x: 0.484375, y: 0.703125 },\n { x: 0.484375, y: 0.703125 },\n { x: 0.515625, y: 0.703125 },\n { x: 0.515625, y: 0.703125 },\n { x: 0.546875, y: 0.703125 },\n { x: 0.546875, y: 0.703125 },\n { x: 0.578125, y: 0.703125 },\n { x: 0.578125, y: 0.703125 },\n { x: 0.609375, y: 0.703125 },\n { x: 0.609375, y: 0.703125 },\n { x: 0.640625, y: 0.703125 },\n { x: 0.640625, y: 0.703125 },\n { x: 0.671875, y: 0.703125 },\n { x: 0.671875, y: 0.703125 },\n { x: 0.703125, y: 0.703125 },\n { x: 0.703125, y: 0.703125 },\n { x: 0.734375, y: 0.703125 },\n { x: 0.734375, y: 0.703125 },\n { x: 0.765625, y: 0.703125 },\n { x: 0.765625, y: 0.703125 },\n { x: 0.796875, y: 0.703125 },\n { x: 0.796875, y: 0.703125 },\n { x: 0.828125, y: 0.703125 },\n { x: 0.828125, y: 0.703125 },\n { x: 0.859375, y: 0.703125 },\n { x: 0.859375, y: 0.703125 },\n { x: 0.890625, y: 0.703125 },\n { x: 0.890625, y: 0.703125 },\n { x: 0.921875, y: 0.703125 },\n { x: 0.921875, y: 0.703125 },\n { x: 0.953125, y: 0.703125 },\n { x: 0.953125, y: 0.703125 },\n { x: 0.984375, y: 0.703125 },\n { x: 0.984375, y: 0.703125 },\n { x: 0.015625, y: 0.734375 },\n { x: 0.015625, y: 0.734375 },\n { x: 0.046875, y: 0.734375 },\n { x: 0.046875, y: 0.734375 },\n { x: 0.078125, y: 0.734375 },\n { x: 0.078125, y: 0.734375 },\n { x: 0.109375, y: 0.734375 },\n { x: 0.109375, y: 0.734375 },\n { x: 0.140625, y: 0.734375 },\n { x: 0.140625, y: 0.734375 },\n { x: 0.171875, y: 0.734375 },\n { x: 0.171875, y: 0.734375 },\n { x: 0.203125, y: 0.734375 },\n { x: 0.203125, y: 0.734375 },\n { x: 0.234375, y: 0.734375 },\n { x: 0.234375, y: 0.734375 },\n { x: 0.265625, y: 0.734375 },\n { x: 0.265625, y: 0.734375 },\n { x: 0.296875, y: 0.734375 },\n { x: 0.296875, y: 0.734375 },\n { x: 0.328125, y: 0.734375 },\n { x: 0.328125, y: 0.734375 },\n { x: 0.359375, y: 0.734375 },\n { x: 0.359375, y: 0.734375 },\n { x: 0.390625, y: 0.734375 },\n { x: 0.390625, y: 0.734375 },\n { x: 0.421875, y: 0.734375 },\n { x: 0.421875, y: 0.734375 },\n { x: 0.453125, y: 0.734375 },\n { x: 0.453125, y: 0.734375 },\n { x: 0.484375, y: 0.734375 },\n { x: 0.484375, y: 0.734375 },\n { x: 0.515625, y: 0.734375 },\n { x: 0.515625, y: 0.734375 },\n { x: 0.546875, y: 0.734375 },\n { x: 0.546875, y: 0.734375 },\n { x: 0.578125, y: 0.734375 },\n { x: 0.578125, y: 0.734375 },\n { x: 0.609375, y: 0.734375 },\n { x: 0.609375, y: 0.734375 },\n { x: 0.640625, y: 0.734375 },\n { x: 0.640625, y: 0.734375 },\n { x: 0.671875, y: 0.734375 },\n { x: 0.671875, y: 0.734375 },\n { x: 0.703125, y: 0.734375 },\n { x: 0.703125, y: 0.734375 },\n { x: 0.734375, y: 0.734375 },\n { x: 0.734375, y: 0.734375 },\n { x: 0.765625, y: 0.734375 },\n { x: 0.765625, y: 0.734375 },\n { x: 0.796875, y: 0.734375 },\n { x: 0.796875, y: 0.734375 },\n { x: 0.828125, y: 0.734375 },\n { x: 0.828125, y: 0.734375 },\n { x: 0.859375, y: 0.734375 },\n { x: 0.859375, y: 0.734375 },\n { x: 0.890625, y: 0.734375 },\n { x: 0.890625, y: 0.734375 },\n { x: 0.921875, y: 0.734375 },\n { x: 0.921875, y: 0.734375 },\n { x: 0.953125, y: 0.734375 },\n { x: 0.953125, y: 0.734375 },\n { x: 0.984375, y: 0.734375 },\n { x: 0.984375, y: 0.734375 },\n { x: 0.015625, y: 0.765625 },\n { x: 0.015625, y: 0.765625 },\n { x: 0.046875, y: 0.765625 },\n { x: 0.046875, y: 0.765625 },\n { x: 0.078125, y: 0.765625 },\n { x: 0.078125, y: 0.765625 },\n { x: 0.109375, y: 0.765625 },\n { x: 0.109375, y: 0.765625 },\n { x: 0.140625, y: 0.765625 },\n { x: 0.140625, y: 0.765625 },\n { x: 0.171875, y: 0.765625 },\n { x: 0.171875, y: 0.765625 },\n { x: 0.203125, y: 0.765625 },\n { x: 0.203125, y: 0.765625 },\n { x: 0.234375, y: 0.765625 },\n { x: 0.234375, y: 0.765625 },\n { x: 0.265625, y: 0.765625 },\n { x: 0.265625, y: 0.765625 },\n { x: 0.296875, y: 0.765625 },\n { x: 0.296875, y: 0.765625 },\n { x: 0.328125, y: 0.765625 },\n { x: 0.328125, y: 0.765625 },\n { x: 0.359375, y: 0.765625 },\n { x: 0.359375, y: 0.765625 },\n { x: 0.390625, y: 0.765625 },\n { x: 0.390625, y: 0.765625 },\n { x: 0.421875, y: 0.765625 },\n { x: 0.421875, y: 0.765625 },\n { x: 0.453125, y: 0.765625 },\n { x: 0.453125, y: 0.765625 },\n { x: 0.484375, y: 0.765625 },\n { x: 0.484375, y: 0.765625 },\n { x: 0.515625, y: 0.765625 },\n { x: 0.515625, y: 0.765625 },\n { x: 0.546875, y: 0.765625 },\n { x: 0.546875, y: 0.765625 },\n { x: 0.578125, y: 0.765625 },\n { x: 0.578125, y: 0.765625 },\n { x: 0.609375, y: 0.765625 },\n { x: 0.609375, y: 0.765625 },\n { x: 0.640625, y: 0.765625 },\n { x: 0.640625, y: 0.765625 },\n { x: 0.671875, y: 0.765625 },\n { x: 0.671875, y: 0.765625 },\n { x: 0.703125, y: 0.765625 },\n { x: 0.703125, y: 0.765625 },\n { x: 0.734375, y: 0.765625 },\n { x: 0.734375, y: 0.765625 },\n { x: 0.765625, y: 0.765625 },\n { x: 0.765625, y: 0.765625 },\n { x: 0.796875, y: 0.765625 },\n { x: 0.796875, y: 0.765625 },\n { x: 0.828125, y: 0.765625 },\n { x: 0.828125, y: 0.765625 },\n { x: 0.859375, y: 0.765625 },\n { x: 0.859375, y: 0.765625 },\n { x: 0.890625, y: 0.765625 },\n { x: 0.890625, y: 0.765625 },\n { x: 0.921875, y: 0.765625 },\n { x: 0.921875, y: 0.765625 },\n { x: 0.953125, y: 0.765625 },\n { x: 0.953125, y: 0.765625 },\n { x: 0.984375, y: 0.765625 },\n { x: 0.984375, y: 0.765625 },\n { x: 0.015625, y: 0.796875 },\n { x: 0.015625, y: 0.796875 },\n { x: 0.046875, y: 0.796875 },\n { x: 0.046875, y: 0.796875 },\n { x: 0.078125, y: 0.796875 },\n { x: 0.078125, y: 0.796875 },\n { x: 0.109375, y: 0.796875 },\n { x: 0.109375, y: 0.796875 },\n { x: 0.140625, y: 0.796875 },\n { x: 0.140625, y: 0.796875 },\n { x: 0.171875, y: 0.796875 },\n { x: 0.171875, y: 0.796875 },\n { x: 0.203125, y: 0.796875 },\n { x: 0.203125, y: 0.796875 },\n { x: 0.234375, y: 0.796875 },\n { x: 0.234375, y: 0.796875 },\n { x: 0.265625, y: 0.796875 },\n { x: 0.265625, y: 0.796875 },\n { x: 0.296875, y: 0.796875 },\n { x: 0.296875, y: 0.796875 },\n { x: 0.328125, y: 0.796875 },\n { x: 0.328125, y: 0.796875 },\n { x: 0.359375, y: 0.796875 },\n { x: 0.359375, y: 0.796875 },\n { x: 0.390625, y: 0.796875 },\n { x: 0.390625, y: 0.796875 },\n { x: 0.421875, y: 0.796875 },\n { x: 0.421875, y: 0.796875 },\n { x: 0.453125, y: 0.796875 },\n { x: 0.453125, y: 0.796875 },\n { x: 0.484375, y: 0.796875 },\n { x: 0.484375, y: 0.796875 },\n { x: 0.515625, y: 0.796875 },\n { x: 0.515625, y: 0.796875 },\n { x: 0.546875, y: 0.796875 },\n { x: 0.546875, y: 0.796875 },\n { x: 0.578125, y: 0.796875 },\n { x: 0.578125, y: 0.796875 },\n { x: 0.609375, y: 0.796875 },\n { x: 0.609375, y: 0.796875 },\n { x: 0.640625, y: 0.796875 },\n { x: 0.640625, y: 0.796875 },\n { x: 0.671875, y: 0.796875 },\n { x: 0.671875, y: 0.796875 },\n { x: 0.703125, y: 0.796875 },\n { x: 0.703125, y: 0.796875 },\n { x: 0.734375, y: 0.796875 },\n { x: 0.734375, y: 0.796875 },\n { x: 0.765625, y: 0.796875 },\n { x: 0.765625, y: 0.796875 },\n { x: 0.796875, y: 0.796875 },\n { x: 0.796875, y: 0.796875 },\n { x: 0.828125, y: 0.796875 },\n { x: 0.828125, y: 0.796875 },\n { x: 0.859375, y: 0.796875 },\n { x: 0.859375, y: 0.796875 },\n { x: 0.890625, y: 0.796875 },\n { x: 0.890625, y: 0.796875 },\n { x: 0.921875, y: 0.796875 },\n { x: 0.921875, y: 0.796875 },\n { x: 0.953125, y: 0.796875 },\n { x: 0.953125, y: 0.796875 },\n { x: 0.984375, y: 0.796875 },\n { x: 0.984375, y: 0.796875 },\n { x: 0.015625, y: 0.828125 },\n { x: 0.015625, y: 0.828125 },\n { x: 0.046875, y: 0.828125 },\n { x: 0.046875, y: 0.828125 },\n { x: 0.078125, y: 0.828125 },\n { x: 0.078125, y: 0.828125 },\n { x: 0.109375, y: 0.828125 },\n { x: 0.109375, y: 0.828125 },\n { x: 0.140625, y: 0.828125 },\n { x: 0.140625, y: 0.828125 },\n { x: 0.171875, y: 0.828125 },\n { x: 0.171875, y: 0.828125 },\n { x: 0.203125, y: 0.828125 },\n { x: 0.203125, y: 0.828125 },\n { x: 0.234375, y: 0.828125 },\n { x: 0.234375, y: 0.828125 },\n { x: 0.265625, y: 0.828125 },\n { x: 0.265625, y: 0.828125 },\n { x: 0.296875, y: 0.828125 },\n { x: 0.296875, y: 0.828125 },\n { x: 0.328125, y: 0.828125 },\n { x: 0.328125, y: 0.828125 },\n { x: 0.359375, y: 0.828125 },\n { x: 0.359375, y: 0.828125 },\n { x: 0.390625, y: 0.828125 },\n { x: 0.390625, y: 0.828125 },\n { x: 0.421875, y: 0.828125 },\n { x: 0.421875, y: 0.828125 },\n { x: 0.453125, y: 0.828125 },\n { x: 0.453125, y: 0.828125 },\n { x: 0.484375, y: 0.828125 },\n { x: 0.484375, y: 0.828125 },\n { x: 0.515625, y: 0.828125 },\n { x: 0.515625, y: 0.828125 },\n { x: 0.546875, y: 0.828125 },\n { x: 0.546875, y: 0.828125 },\n { x: 0.578125, y: 0.828125 },\n { x: 0.578125, y: 0.828125 },\n { x: 0.609375, y: 0.828125 },\n { x: 0.609375, y: 0.828125 },\n { x: 0.640625, y: 0.828125 },\n { x: 0.640625, y: 0.828125 },\n { x: 0.671875, y: 0.828125 },\n { x: 0.671875, y: 0.828125 },\n { x: 0.703125, y: 0.828125 },\n { x: 0.703125, y: 0.828125 },\n { x: 0.734375, y: 0.828125 },\n { x: 0.734375, y: 0.828125 },\n { x: 0.765625, y: 0.828125 },\n { x: 0.765625, y: 0.828125 },\n { x: 0.796875, y: 0.828125 },\n { x: 0.796875, y: 0.828125 },\n { x: 0.828125, y: 0.828125 },\n { x: 0.828125, y: 0.828125 },\n { x: 0.859375, y: 0.828125 },\n { x: 0.859375, y: 0.828125 },\n { x: 0.890625, y: 0.828125 },\n { x: 0.890625, y: 0.828125 },\n { x: 0.921875, y: 0.828125 },\n { x: 0.921875, y: 0.828125 },\n { x: 0.953125, y: 0.828125 },\n { x: 0.953125, y: 0.828125 },\n { x: 0.984375, y: 0.828125 },\n { x: 0.984375, y: 0.828125 },\n { x: 0.015625, y: 0.859375 },\n { x: 0.015625, y: 0.859375 },\n { x: 0.046875, y: 0.859375 },\n { x: 0.046875, y: 0.859375 },\n { x: 0.078125, y: 0.859375 },\n { x: 0.078125, y: 0.859375 },\n { x: 0.109375, y: 0.859375 },\n { x: 0.109375, y: 0.859375 },\n { x: 0.140625, y: 0.859375 },\n { x: 0.140625, y: 0.859375 },\n { x: 0.171875, y: 0.859375 },\n { x: 0.171875, y: 0.859375 },\n { x: 0.203125, y: 0.859375 },\n { x: 0.203125, y: 0.859375 },\n { x: 0.234375, y: 0.859375 },\n { x: 0.234375, y: 0.859375 },\n { x: 0.265625, y: 0.859375 },\n { x: 0.265625, y: 0.859375 },\n { x: 0.296875, y: 0.859375 },\n { x: 0.296875, y: 0.859375 },\n { x: 0.328125, y: 0.859375 },\n { x: 0.328125, y: 0.859375 },\n { x: 0.359375, y: 0.859375 },\n { x: 0.359375, y: 0.859375 },\n { x: 0.390625, y: 0.859375 },\n { x: 0.390625, y: 0.859375 },\n { x: 0.421875, y: 0.859375 },\n { x: 0.421875, y: 0.859375 },\n { x: 0.453125, y: 0.859375 },\n { x: 0.453125, y: 0.859375 },\n { x: 0.484375, y: 0.859375 },\n { x: 0.484375, y: 0.859375 },\n { x: 0.515625, y: 0.859375 },\n { x: 0.515625, y: 0.859375 },\n { x: 0.546875, y: 0.859375 },\n { x: 0.546875, y: 0.859375 },\n { x: 0.578125, y: 0.859375 },\n { x: 0.578125, y: 0.859375 },\n { x: 0.609375, y: 0.859375 },\n { x: 0.609375, y: 0.859375 },\n { x: 0.640625, y: 0.859375 },\n { x: 0.640625, y: 0.859375 },\n { x: 0.671875, y: 0.859375 },\n { x: 0.671875, y: 0.859375 },\n { x: 0.703125, y: 0.859375 },\n { x: 0.703125, y: 0.859375 },\n { x: 0.734375, y: 0.859375 },\n { x: 0.734375, y: 0.859375 },\n { x: 0.765625, y: 0.859375 },\n { x: 0.765625, y: 0.859375 },\n { x: 0.796875, y: 0.859375 },\n { x: 0.796875, y: 0.859375 },\n { x: 0.828125, y: 0.859375 },\n { x: 0.828125, y: 0.859375 },\n { x: 0.859375, y: 0.859375 },\n { x: 0.859375, y: 0.859375 },\n { x: 0.890625, y: 0.859375 },\n { x: 0.890625, y: 0.859375 },\n { x: 0.921875, y: 0.859375 },\n { x: 0.921875, y: 0.859375 },\n { x: 0.953125, y: 0.859375 },\n { x: 0.953125, y: 0.859375 },\n { x: 0.984375, y: 0.859375 },\n { x: 0.984375, y: 0.859375 },\n { x: 0.015625, y: 0.890625 },\n { x: 0.015625, y: 0.890625 },\n { x: 0.046875, y: 0.890625 },\n { x: 0.046875, y: 0.890625 },\n { x: 0.078125, y: 0.890625 },\n { x: 0.078125, y: 0.890625 },\n { x: 0.109375, y: 0.890625 },\n { x: 0.109375, y: 0.890625 },\n { x: 0.140625, y: 0.890625 },\n { x: 0.140625, y: 0.890625 },\n { x: 0.171875, y: 0.890625 },\n { x: 0.171875, y: 0.890625 },\n { x: 0.203125, y: 0.890625 },\n { x: 0.203125, y: 0.890625 },\n { x: 0.234375, y: 0.890625 },\n { x: 0.234375, y: 0.890625 },\n { x: 0.265625, y: 0.890625 },\n { x: 0.265625, y: 0.890625 },\n { x: 0.296875, y: 0.890625 },\n { x: 0.296875, y: 0.890625 },\n { x: 0.328125, y: 0.890625 },\n { x: 0.328125, y: 0.890625 },\n { x: 0.359375, y: 0.890625 },\n { x: 0.359375, y: 0.890625 },\n { x: 0.390625, y: 0.890625 },\n { x: 0.390625, y: 0.890625 },\n { x: 0.421875, y: 0.890625 },\n { x: 0.421875, y: 0.890625 },\n { x: 0.453125, y: 0.890625 },\n { x: 0.453125, y: 0.890625 },\n { x: 0.484375, y: 0.890625 },\n { x: 0.484375, y: 0.890625 },\n { x: 0.515625, y: 0.890625 },\n { x: 0.515625, y: 0.890625 },\n { x: 0.546875, y: 0.890625 },\n { x: 0.546875, y: 0.890625 },\n { x: 0.578125, y: 0.890625 },\n { x: 0.578125, y: 0.890625 },\n { x: 0.609375, y: 0.890625 },\n { x: 0.609375, y: 0.890625 },\n { x: 0.640625, y: 0.890625 },\n { x: 0.640625, y: 0.890625 },\n { x: 0.671875, y: 0.890625 },\n { x: 0.671875, y: 0.890625 },\n { x: 0.703125, y: 0.890625 },\n { x: 0.703125, y: 0.890625 },\n { x: 0.734375, y: 0.890625 },\n { x: 0.734375, y: 0.890625 },\n { x: 0.765625, y: 0.890625 },\n { x: 0.765625, y: 0.890625 },\n { x: 0.796875, y: 0.890625 },\n { x: 0.796875, y: 0.890625 },\n { x: 0.828125, y: 0.890625 },\n { x: 0.828125, y: 0.890625 },\n { x: 0.859375, y: 0.890625 },\n { x: 0.859375, y: 0.890625 },\n { x: 0.890625, y: 0.890625 },\n { x: 0.890625, y: 0.890625 },\n { x: 0.921875, y: 0.890625 },\n { x: 0.921875, y: 0.890625 },\n { x: 0.953125, y: 0.890625 },\n { x: 0.953125, y: 0.890625 },\n { x: 0.984375, y: 0.890625 },\n { x: 0.984375, y: 0.890625 },\n { x: 0.015625, y: 0.921875 },\n { x: 0.015625, y: 0.921875 },\n { x: 0.046875, y: 0.921875 },\n { x: 0.046875, y: 0.921875 },\n { x: 0.078125, y: 0.921875 },\n { x: 0.078125, y: 0.921875 },\n { x: 0.109375, y: 0.921875 },\n { x: 0.109375, y: 0.921875 },\n { x: 0.140625, y: 0.921875 },\n { x: 0.140625, y: 0.921875 },\n { x: 0.171875, y: 0.921875 },\n { x: 0.171875, y: 0.921875 },\n { x: 0.203125, y: 0.921875 },\n { x: 0.203125, y: 0.921875 },\n { x: 0.234375, y: 0.921875 },\n { x: 0.234375, y: 0.921875 },\n { x: 0.265625, y: 0.921875 },\n { x: 0.265625, y: 0.921875 },\n { x: 0.296875, y: 0.921875 },\n { x: 0.296875, y: 0.921875 },\n { x: 0.328125, y: 0.921875 },\n { x: 0.328125, y: 0.921875 },\n { x: 0.359375, y: 0.921875 },\n { x: 0.359375, y: 0.921875 },\n { x: 0.390625, y: 0.921875 },\n { x: 0.390625, y: 0.921875 },\n { x: 0.421875, y: 0.921875 },\n { x: 0.421875, y: 0.921875 },\n { x: 0.453125, y: 0.921875 },\n { x: 0.453125, y: 0.921875 },\n { x: 0.484375, y: 0.921875 },\n { x: 0.484375, y: 0.921875 },\n { x: 0.515625, y: 0.921875 },\n { x: 0.515625, y: 0.921875 },\n { x: 0.546875, y: 0.921875 },\n { x: 0.546875, y: 0.921875 },\n { x: 0.578125, y: 0.921875 },\n { x: 0.578125, y: 0.921875 },\n { x: 0.609375, y: 0.921875 },\n { x: 0.609375, y: 0.921875 },\n { x: 0.640625, y: 0.921875 },\n { x: 0.640625, y: 0.921875 },\n { x: 0.671875, y: 0.921875 },\n { x: 0.671875, y: 0.921875 },\n { x: 0.703125, y: 0.921875 },\n { x: 0.703125, y: 0.921875 },\n { x: 0.734375, y: 0.921875 },\n { x: 0.734375, y: 0.921875 },\n { x: 0.765625, y: 0.921875 },\n { x: 0.765625, y: 0.921875 },\n { x: 0.796875, y: 0.921875 },\n { x: 0.796875, y: 0.921875 },\n { x: 0.828125, y: 0.921875 },\n { x: 0.828125, y: 0.921875 },\n { x: 0.859375, y: 0.921875 },\n { x: 0.859375, y: 0.921875 },\n { x: 0.890625, y: 0.921875 },\n { x: 0.890625, y: 0.921875 },\n { x: 0.921875, y: 0.921875 },\n { x: 0.921875, y: 0.921875 },\n { x: 0.953125, y: 0.921875 },\n { x: 0.953125, y: 0.921875 },\n { x: 0.984375, y: 0.921875 },\n { x: 0.984375, y: 0.921875 },\n { x: 0.015625, y: 0.953125 },\n { x: 0.015625, y: 0.953125 },\n { x: 0.046875, y: 0.953125 },\n { x: 0.046875, y: 0.953125 },\n { x: 0.078125, y: 0.953125 },\n { x: 0.078125, y: 0.953125 },\n { x: 0.109375, y: 0.953125 },\n { x: 0.109375, y: 0.953125 },\n { x: 0.140625, y: 0.953125 },\n { x: 0.140625, y: 0.953125 },\n { x: 0.171875, y: 0.953125 },\n { x: 0.171875, y: 0.953125 },\n { x: 0.203125, y: 0.953125 },\n { x: 0.203125, y: 0.953125 },\n { x: 0.234375, y: 0.953125 },\n { x: 0.234375, y: 0.953125 },\n { x: 0.265625, y: 0.953125 },\n { x: 0.265625, y: 0.953125 },\n { x: 0.296875, y: 0.953125 },\n { x: 0.296875, y: 0.953125 },\n { x: 0.328125, y: 0.953125 },\n { x: 0.328125, y: 0.953125 },\n { x: 0.359375, y: 0.953125 },\n { x: 0.359375, y: 0.953125 },\n { x: 0.390625, y: 0.953125 },\n { x: 0.390625, y: 0.953125 },\n { x: 0.421875, y: 0.953125 },\n { x: 0.421875, y: 0.953125 },\n { x: 0.453125, y: 0.953125 },\n { x: 0.453125, y: 0.953125 },\n { x: 0.484375, y: 0.953125 },\n { x: 0.484375, y: 0.953125 },\n { x: 0.515625, y: 0.953125 },\n { x: 0.515625, y: 0.953125 },\n { x: 0.546875, y: 0.953125 },\n { x: 0.546875, y: 0.953125 },\n { x: 0.578125, y: 0.953125 },\n { x: 0.578125, y: 0.953125 },\n { x: 0.609375, y: 0.953125 },\n { x: 0.609375, y: 0.953125 },\n { x: 0.640625, y: 0.953125 },\n { x: 0.640625, y: 0.953125 },\n { x: 0.671875, y: 0.953125 },\n { x: 0.671875, y: 0.953125 },\n { x: 0.703125, y: 0.953125 },\n { x: 0.703125, y: 0.953125 },\n { x: 0.734375, y: 0.953125 },\n { x: 0.734375, y: 0.953125 },\n { x: 0.765625, y: 0.953125 },\n { x: 0.765625, y: 0.953125 },\n { x: 0.796875, y: 0.953125 },\n { x: 0.796875, y: 0.953125 },\n { x: 0.828125, y: 0.953125 },\n { x: 0.828125, y: 0.953125 },\n { x: 0.859375, y: 0.953125 },\n { x: 0.859375, y: 0.953125 },\n { x: 0.890625, y: 0.953125 },\n { x: 0.890625, y: 0.953125 },\n { x: 0.921875, y: 0.953125 },\n { x: 0.921875, y: 0.953125 },\n { x: 0.953125, y: 0.953125 },\n { x: 0.953125, y: 0.953125 },\n { x: 0.984375, y: 0.953125 },\n { x: 0.984375, y: 0.953125 },\n { x: 0.015625, y: 0.984375 },\n { x: 0.015625, y: 0.984375 },\n { x: 0.046875, y: 0.984375 },\n { x: 0.046875, y: 0.984375 },\n { x: 0.078125, y: 0.984375 },\n { x: 0.078125, y: 0.984375 },\n { x: 0.109375, y: 0.984375 },\n { x: 0.109375, y: 0.984375 },\n { x: 0.140625, y: 0.984375 },\n { x: 0.140625, y: 0.984375 },\n { x: 0.171875, y: 0.984375 },\n { x: 0.171875, y: 0.984375 },\n { x: 0.203125, y: 0.984375 },\n { x: 0.203125, y: 0.984375 },\n { x: 0.234375, y: 0.984375 },\n { x: 0.234375, y: 0.984375 },\n { x: 0.265625, y: 0.984375 },\n { x: 0.265625, y: 0.984375 },\n { x: 0.296875, y: 0.984375 },\n { x: 0.296875, y: 0.984375 },\n { x: 0.328125, y: 0.984375 },\n { x: 0.328125, y: 0.984375 },\n { x: 0.359375, y: 0.984375 },\n { x: 0.359375, y: 0.984375 },\n { x: 0.390625, y: 0.984375 },\n { x: 0.390625, y: 0.984375 },\n { x: 0.421875, y: 0.984375 },\n { x: 0.421875, y: 0.984375 },\n { x: 0.453125, y: 0.984375 },\n { x: 0.453125, y: 0.984375 },\n { x: 0.484375, y: 0.984375 },\n { x: 0.484375, y: 0.984375 },\n { x: 0.515625, y: 0.984375 },\n { x: 0.515625, y: 0.984375 },\n { x: 0.546875, y: 0.984375 },\n { x: 0.546875, y: 0.984375 },\n { x: 0.578125, y: 0.984375 },\n { x: 0.578125, y: 0.984375 },\n { x: 0.609375, y: 0.984375 },\n { x: 0.609375, y: 0.984375 },\n { x: 0.640625, y: 0.984375 },\n { x: 0.640625, y: 0.984375 },\n { x: 0.671875, y: 0.984375 },\n { x: 0.671875, y: 0.984375 },\n { x: 0.703125, y: 0.984375 },\n { x: 0.703125, y: 0.984375 },\n { x: 0.734375, y: 0.984375 },\n { x: 0.734375, y: 0.984375 },\n { x: 0.765625, y: 0.984375 },\n { x: 0.765625, y: 0.984375 },\n { x: 0.796875, y: 0.984375 },\n { x: 0.796875, y: 0.984375 },\n { x: 0.828125, y: 0.984375 },\n { x: 0.828125, y: 0.984375 },\n { x: 0.859375, y: 0.984375 },\n { x: 0.859375, y: 0.984375 },\n { x: 0.890625, y: 0.984375 },\n { x: 0.890625, y: 0.984375 },\n { x: 0.921875, y: 0.984375 },\n { x: 0.921875, y: 0.984375 },\n { x: 0.953125, y: 0.984375 },\n { x: 0.953125, y: 0.984375 },\n { x: 0.984375, y: 0.984375 },\n { x: 0.984375, y: 0.984375 },\n { x: 0.03125, y: 0.03125 },\n { x: 0.03125, y: 0.03125 },\n { x: 0.09375, y: 0.03125 },\n { x: 0.09375, y: 0.03125 },\n { x: 0.15625, y: 0.03125 },\n { x: 0.15625, y: 0.03125 },\n { x: 0.21875, y: 0.03125 },\n { x: 0.21875, y: 0.03125 },\n { x: 0.28125, y: 0.03125 },\n { x: 0.28125, y: 0.03125 },\n { x: 0.34375, y: 0.03125 },\n { x: 0.34375, y: 0.03125 },\n { x: 0.40625, y: 0.03125 },\n { x: 0.40625, y: 0.03125 },\n { x: 0.46875, y: 0.03125 },\n { x: 0.46875, y: 0.03125 },\n { x: 0.53125, y: 0.03125 },\n { x: 0.53125, y: 0.03125 },\n { x: 0.59375, y: 0.03125 },\n { x: 0.59375, y: 0.03125 },\n { x: 0.65625, y: 0.03125 },\n { x: 0.65625, y: 0.03125 },\n { x: 0.71875, y: 0.03125 },\n { x: 0.71875, y: 0.03125 },\n { x: 0.78125, y: 0.03125 },\n { x: 0.78125, y: 0.03125 },\n { x: 0.84375, y: 0.03125 },\n { x: 0.84375, y: 0.03125 },\n { x: 0.90625, y: 0.03125 },\n { x: 0.90625, y: 0.03125 },\n { x: 0.96875, y: 0.03125 },\n { x: 0.96875, y: 0.03125 },\n { x: 0.03125, y: 0.09375 },\n { x: 0.03125, y: 0.09375 },\n { x: 0.09375, y: 0.09375 },\n { x: 0.09375, y: 0.09375 },\n { x: 0.15625, y: 0.09375 },\n { x: 0.15625, y: 0.09375 },\n { x: 0.21875, y: 0.09375 },\n { x: 0.21875, y: 0.09375 },\n { x: 0.28125, y: 0.09375 },\n { x: 0.28125, y: 0.09375 },\n { x: 0.34375, y: 0.09375 },\n { x: 0.34375, y: 0.09375 },\n { x: 0.40625, y: 0.09375 },\n { x: 0.40625, y: 0.09375 },\n { x: 0.46875, y: 0.09375 },\n { x: 0.46875, y: 0.09375 },\n { x: 0.53125, y: 0.09375 },\n { x: 0.53125, y: 0.09375 },\n { x: 0.59375, y: 0.09375 },\n { x: 0.59375, y: 0.09375 },\n { x: 0.65625, y: 0.09375 },\n { x: 0.65625, y: 0.09375 },\n { x: 0.71875, y: 0.09375 },\n { x: 0.71875, y: 0.09375 },\n { x: 0.78125, y: 0.09375 },\n { x: 0.78125, y: 0.09375 },\n { x: 0.84375, y: 0.09375 },\n { x: 0.84375, y: 0.09375 },\n { x: 0.90625, y: 0.09375 },\n { x: 0.90625, y: 0.09375 },\n { x: 0.96875, y: 0.09375 },\n { x: 0.96875, y: 0.09375 },\n { x: 0.03125, y: 0.15625 },\n { x: 0.03125, y: 0.15625 },\n { x: 0.09375, y: 0.15625 },\n { x: 0.09375, y: 0.15625 },\n { x: 0.15625, y: 0.15625 },\n { x: 0.15625, y: 0.15625 },\n { x: 0.21875, y: 0.15625 },\n { x: 0.21875, y: 0.15625 },\n { x: 0.28125, y: 0.15625 },\n { x: 0.28125, y: 0.15625 },\n { x: 0.34375, y: 0.15625 },\n { x: 0.34375, y: 0.15625 },\n { x: 0.40625, y: 0.15625 },\n { x: 0.40625, y: 0.15625 },\n { x: 0.46875, y: 0.15625 },\n { x: 0.46875, y: 0.15625 },\n { x: 0.53125, y: 0.15625 },\n { x: 0.53125, y: 0.15625 },\n { x: 0.59375, y: 0.15625 },\n { x: 0.59375, y: 0.15625 },\n { x: 0.65625, y: 0.15625 },\n { x: 0.65625, y: 0.15625 },\n { x: 0.71875, y: 0.15625 },\n { x: 0.71875, y: 0.15625 },\n { x: 0.78125, y: 0.15625 },\n { x: 0.78125, y: 0.15625 },\n { x: 0.84375, y: 0.15625 },\n { x: 0.84375, y: 0.15625 },\n { x: 0.90625, y: 0.15625 },\n { x: 0.90625, y: 0.15625 },\n { x: 0.96875, y: 0.15625 },\n { x: 0.96875, y: 0.15625 },\n { x: 0.03125, y: 0.21875 },\n { x: 0.03125, y: 0.21875 },\n { x: 0.09375, y: 0.21875 },\n { x: 0.09375, y: 0.21875 },\n { x: 0.15625, y: 0.21875 },\n { x: 0.15625, y: 0.21875 },\n { x: 0.21875, y: 0.21875 },\n { x: 0.21875, y: 0.21875 },\n { x: 0.28125, y: 0.21875 },\n { x: 0.28125, y: 0.21875 },\n { x: 0.34375, y: 0.21875 },\n { x: 0.34375, y: 0.21875 },\n { x: 0.40625, y: 0.21875 },\n { x: 0.40625, y: 0.21875 },\n { x: 0.46875, y: 0.21875 },\n { x: 0.46875, y: 0.21875 },\n { x: 0.53125, y: 0.21875 },\n { x: 0.53125, y: 0.21875 },\n { x: 0.59375, y: 0.21875 },\n { x: 0.59375, y: 0.21875 },\n { x: 0.65625, y: 0.21875 },\n { x: 0.65625, y: 0.21875 },\n { x: 0.71875, y: 0.21875 },\n { x: 0.71875, y: 0.21875 },\n { x: 0.78125, y: 0.21875 },\n { x: 0.78125, y: 0.21875 },\n { x: 0.84375, y: 0.21875 },\n { x: 0.84375, y: 0.21875 },\n { x: 0.90625, y: 0.21875 },\n { x: 0.90625, y: 0.21875 },\n { x: 0.96875, y: 0.21875 },\n { x: 0.96875, y: 0.21875 },\n { x: 0.03125, y: 0.28125 },\n { x: 0.03125, y: 0.28125 },\n { x: 0.09375, y: 0.28125 },\n { x: 0.09375, y: 0.28125 },\n { x: 0.15625, y: 0.28125 },\n { x: 0.15625, y: 0.28125 },\n { x: 0.21875, y: 0.28125 },\n { x: 0.21875, y: 0.28125 },\n { x: 0.28125, y: 0.28125 },\n { x: 0.28125, y: 0.28125 },\n { x: 0.34375, y: 0.28125 },\n { x: 0.34375, y: 0.28125 },\n { x: 0.40625, y: 0.28125 },\n { x: 0.40625, y: 0.28125 },\n { x: 0.46875, y: 0.28125 },\n { x: 0.46875, y: 0.28125 },\n { x: 0.53125, y: 0.28125 },\n { x: 0.53125, y: 0.28125 },\n { x: 0.59375, y: 0.28125 },\n { x: 0.59375, y: 0.28125 },\n { x: 0.65625, y: 0.28125 },\n { x: 0.65625, y: 0.28125 },\n { x: 0.71875, y: 0.28125 },\n { x: 0.71875, y: 0.28125 },\n { x: 0.78125, y: 0.28125 },\n { x: 0.78125, y: 0.28125 },\n { x: 0.84375, y: 0.28125 },\n { x: 0.84375, y: 0.28125 },\n { x: 0.90625, y: 0.28125 },\n { x: 0.90625, y: 0.28125 },\n { x: 0.96875, y: 0.28125 },\n { x: 0.96875, y: 0.28125 },\n { x: 0.03125, y: 0.34375 },\n { x: 0.03125, y: 0.34375 },\n { x: 0.09375, y: 0.34375 },\n { x: 0.09375, y: 0.34375 },\n { x: 0.15625, y: 0.34375 },\n { x: 0.15625, y: 0.34375 },\n { x: 0.21875, y: 0.34375 },\n { x: 0.21875, y: 0.34375 },\n { x: 0.28125, y: 0.34375 },\n { x: 0.28125, y: 0.34375 },\n { x: 0.34375, y: 0.34375 },\n { x: 0.34375, y: 0.34375 },\n { x: 0.40625, y: 0.34375 },\n { x: 0.40625, y: 0.34375 },\n { x: 0.46875, y: 0.34375 },\n { x: 0.46875, y: 0.34375 },\n { x: 0.53125, y: 0.34375 },\n { x: 0.53125, y: 0.34375 },\n { x: 0.59375, y: 0.34375 },\n { x: 0.59375, y: 0.34375 },\n { x: 0.65625, y: 0.34375 },\n { x: 0.65625, y: 0.34375 },\n { x: 0.71875, y: 0.34375 },\n { x: 0.71875, y: 0.34375 },\n { x: 0.78125, y: 0.34375 },\n { x: 0.78125, y: 0.34375 },\n { x: 0.84375, y: 0.34375 },\n { x: 0.84375, y: 0.34375 },\n { x: 0.90625, y: 0.34375 },\n { x: 0.90625, y: 0.34375 },\n { x: 0.96875, y: 0.34375 },\n { x: 0.96875, y: 0.34375 },\n { x: 0.03125, y: 0.40625 },\n { x: 0.03125, y: 0.40625 },\n { x: 0.09375, y: 0.40625 },\n { x: 0.09375, y: 0.40625 },\n { x: 0.15625, y: 0.40625 },\n { x: 0.15625, y: 0.40625 },\n { x: 0.21875, y: 0.40625 },\n { x: 0.21875, y: 0.40625 },\n { x: 0.28125, y: 0.40625 },\n { x: 0.28125, y: 0.40625 },\n { x: 0.34375, y: 0.40625 },\n { x: 0.34375, y: 0.40625 },\n { x: 0.40625, y: 0.40625 },\n { x: 0.40625, y: 0.40625 },\n { x: 0.46875, y: 0.40625 },\n { x: 0.46875, y: 0.40625 },\n { x: 0.53125, y: 0.40625 },\n { x: 0.53125, y: 0.40625 },\n { x: 0.59375, y: 0.40625 },\n { x: 0.59375, y: 0.40625 },\n { x: 0.65625, y: 0.40625 },\n { x: 0.65625, y: 0.40625 },\n { x: 0.71875, y: 0.40625 },\n { x: 0.71875, y: 0.40625 },\n { x: 0.78125, y: 0.40625 },\n { x: 0.78125, y: 0.40625 },\n { x: 0.84375, y: 0.40625 },\n { x: 0.84375, y: 0.40625 },\n { x: 0.90625, y: 0.40625 },\n { x: 0.90625, y: 0.40625 },\n { x: 0.96875, y: 0.40625 },\n { x: 0.96875, y: 0.40625 },\n { x: 0.03125, y: 0.46875 },\n { x: 0.03125, y: 0.46875 },\n { x: 0.09375, y: 0.46875 },\n { x: 0.09375, y: 0.46875 },\n { x: 0.15625, y: 0.46875 },\n { x: 0.15625, y: 0.46875 },\n { x: 0.21875, y: 0.46875 },\n { x: 0.21875, y: 0.46875 },\n { x: 0.28125, y: 0.46875 },\n { x: 0.28125, y: 0.46875 },\n { x: 0.34375, y: 0.46875 },\n { x: 0.34375, y: 0.46875 },\n { x: 0.40625, y: 0.46875 },\n { x: 0.40625, y: 0.46875 },\n { x: 0.46875, y: 0.46875 },\n { x: 0.46875, y: 0.46875 },\n { x: 0.53125, y: 0.46875 },\n { x: 0.53125, y: 0.46875 },\n { x: 0.59375, y: 0.46875 },\n { x: 0.59375, y: 0.46875 },\n { x: 0.65625, y: 0.46875 },\n { x: 0.65625, y: 0.46875 },\n { x: 0.71875, y: 0.46875 },\n { x: 0.71875, y: 0.46875 },\n { x: 0.78125, y: 0.46875 },\n { x: 0.78125, y: 0.46875 },\n { x: 0.84375, y: 0.46875 },\n { x: 0.84375, y: 0.46875 },\n { x: 0.90625, y: 0.46875 },\n { x: 0.90625, y: 0.46875 },\n { x: 0.96875, y: 0.46875 },\n { x: 0.96875, y: 0.46875 },\n { x: 0.03125, y: 0.53125 },\n { x: 0.03125, y: 0.53125 },\n { x: 0.09375, y: 0.53125 },\n { x: 0.09375, y: 0.53125 },\n { x: 0.15625, y: 0.53125 },\n { x: 0.15625, y: 0.53125 },\n { x: 0.21875, y: 0.53125 },\n { x: 0.21875, y: 0.53125 },\n { x: 0.28125, y: 0.53125 },\n { x: 0.28125, y: 0.53125 },\n { x: 0.34375, y: 0.53125 },\n { x: 0.34375, y: 0.53125 },\n { x: 0.40625, y: 0.53125 },\n { x: 0.40625, y: 0.53125 },\n { x: 0.46875, y: 0.53125 },\n { x: 0.46875, y: 0.53125 },\n { x: 0.53125, y: 0.53125 },\n { x: 0.53125, y: 0.53125 },\n { x: 0.59375, y: 0.53125 },\n { x: 0.59375, y: 0.53125 },\n { x: 0.65625, y: 0.53125 },\n { x: 0.65625, y: 0.53125 },\n { x: 0.71875, y: 0.53125 },\n { x: 0.71875, y: 0.53125 },\n { x: 0.78125, y: 0.53125 },\n { x: 0.78125, y: 0.53125 },\n { x: 0.84375, y: 0.53125 },\n { x: 0.84375, y: 0.53125 },\n { x: 0.90625, y: 0.53125 },\n { x: 0.90625, y: 0.53125 },\n { x: 0.96875, y: 0.53125 },\n { x: 0.96875, y: 0.53125 },\n { x: 0.03125, y: 0.59375 },\n { x: 0.03125, y: 0.59375 },\n { x: 0.09375, y: 0.59375 },\n { x: 0.09375, y: 0.59375 },\n { x: 0.15625, y: 0.59375 },\n { x: 0.15625, y: 0.59375 },\n { x: 0.21875, y: 0.59375 },\n { x: 0.21875, y: 0.59375 },\n { x: 0.28125, y: 0.59375 },\n { x: 0.28125, y: 0.59375 },\n { x: 0.34375, y: 0.59375 },\n { x: 0.34375, y: 0.59375 },\n { x: 0.40625, y: 0.59375 },\n { x: 0.40625, y: 0.59375 },\n { x: 0.46875, y: 0.59375 },\n { x: 0.46875, y: 0.59375 },\n { x: 0.53125, y: 0.59375 },\n { x: 0.53125, y: 0.59375 },\n { x: 0.59375, y: 0.59375 },\n { x: 0.59375, y: 0.59375 },\n { x: 0.65625, y: 0.59375 },\n { x: 0.65625, y: 0.59375 },\n { x: 0.71875, y: 0.59375 },\n { x: 0.71875, y: 0.59375 },\n { x: 0.78125, y: 0.59375 },\n { x: 0.78125, y: 0.59375 },\n { x: 0.84375, y: 0.59375 },\n { x: 0.84375, y: 0.59375 },\n { x: 0.90625, y: 0.59375 },\n { x: 0.90625, y: 0.59375 },\n { x: 0.96875, y: 0.59375 },\n { x: 0.96875, y: 0.59375 },\n { x: 0.03125, y: 0.65625 },\n { x: 0.03125, y: 0.65625 },\n { x: 0.09375, y: 0.65625 },\n { x: 0.09375, y: 0.65625 },\n { x: 0.15625, y: 0.65625 },\n { x: 0.15625, y: 0.65625 },\n { x: 0.21875, y: 0.65625 },\n { x: 0.21875, y: 0.65625 },\n { x: 0.28125, y: 0.65625 },\n { x: 0.28125, y: 0.65625 },\n { x: 0.34375, y: 0.65625 },\n { x: 0.34375, y: 0.65625 },\n { x: 0.40625, y: 0.65625 },\n { x: 0.40625, y: 0.65625 },\n { x: 0.46875, y: 0.65625 },\n { x: 0.46875, y: 0.65625 },\n { x: 0.53125, y: 0.65625 },\n { x: 0.53125, y: 0.65625 },\n { x: 0.59375, y: 0.65625 },\n { x: 0.59375, y: 0.65625 },\n { x: 0.65625, y: 0.65625 },\n { x: 0.65625, y: 0.65625 },\n { x: 0.71875, y: 0.65625 },\n { x: 0.71875, y: 0.65625 },\n { x: 0.78125, y: 0.65625 },\n { x: 0.78125, y: 0.65625 },\n { x: 0.84375, y: 0.65625 },\n { x: 0.84375, y: 0.65625 },\n { x: 0.90625, y: 0.65625 },\n { x: 0.90625, y: 0.65625 },\n { x: 0.96875, y: 0.65625 },\n { x: 0.96875, y: 0.65625 },\n { x: 0.03125, y: 0.71875 },\n { x: 0.03125, y: 0.71875 },\n { x: 0.09375, y: 0.71875 },\n { x: 0.09375, y: 0.71875 },\n { x: 0.15625, y: 0.71875 },\n { x: 0.15625, y: 0.71875 },\n { x: 0.21875, y: 0.71875 },\n { x: 0.21875, y: 0.71875 },\n { x: 0.28125, y: 0.71875 },\n { x: 0.28125, y: 0.71875 },\n { x: 0.34375, y: 0.71875 },\n { x: 0.34375, y: 0.71875 },\n { x: 0.40625, y: 0.71875 },\n { x: 0.40625, y: 0.71875 },\n { x: 0.46875, y: 0.71875 },\n { x: 0.46875, y: 0.71875 },\n { x: 0.53125, y: 0.71875 },\n { x: 0.53125, y: 0.71875 },\n { x: 0.59375, y: 0.71875 },\n { x: 0.59375, y: 0.71875 },\n { x: 0.65625, y: 0.71875 },\n { x: 0.65625, y: 0.71875 },\n { x: 0.71875, y: 0.71875 },\n { x: 0.71875, y: 0.71875 },\n { x: 0.78125, y: 0.71875 },\n { x: 0.78125, y: 0.71875 },\n { x: 0.84375, y: 0.71875 },\n { x: 0.84375, y: 0.71875 },\n { x: 0.90625, y: 0.71875 },\n { x: 0.90625, y: 0.71875 },\n { x: 0.96875, y: 0.71875 },\n { x: 0.96875, y: 0.71875 },\n { x: 0.03125, y: 0.78125 },\n { x: 0.03125, y: 0.78125 },\n { x: 0.09375, y: 0.78125 },\n { x: 0.09375, y: 0.78125 },\n { x: 0.15625, y: 0.78125 },\n { x: 0.15625, y: 0.78125 },\n { x: 0.21875, y: 0.78125 },\n { x: 0.21875, y: 0.78125 },\n { x: 0.28125, y: 0.78125 },\n { x: 0.28125, y: 0.78125 },\n { x: 0.34375, y: 0.78125 },\n { x: 0.34375, y: 0.78125 },\n { x: 0.40625, y: 0.78125 },\n { x: 0.40625, y: 0.78125 },\n { x: 0.46875, y: 0.78125 },\n { x: 0.46875, y: 0.78125 },\n { x: 0.53125, y: 0.78125 },\n { x: 0.53125, y: 0.78125 },\n { x: 0.59375, y: 0.78125 },\n { x: 0.59375, y: 0.78125 },\n { x: 0.65625, y: 0.78125 },\n { x: 0.65625, y: 0.78125 },\n { x: 0.71875, y: 0.78125 },\n { x: 0.71875, y: 0.78125 },\n { x: 0.78125, y: 0.78125 },\n { x: 0.78125, y: 0.78125 },\n { x: 0.84375, y: 0.78125 },\n { x: 0.84375, y: 0.78125 },\n { x: 0.90625, y: 0.78125 },\n { x: 0.90625, y: 0.78125 },\n { x: 0.96875, y: 0.78125 },\n { x: 0.96875, y: 0.78125 },\n { x: 0.03125, y: 0.84375 },\n { x: 0.03125, y: 0.84375 },\n { x: 0.09375, y: 0.84375 },\n { x: 0.09375, y: 0.84375 },\n { x: 0.15625, y: 0.84375 },\n { x: 0.15625, y: 0.84375 },\n { x: 0.21875, y: 0.84375 },\n { x: 0.21875, y: 0.84375 },\n { x: 0.28125, y: 0.84375 },\n { x: 0.28125, y: 0.84375 },\n { x: 0.34375, y: 0.84375 },\n { x: 0.34375, y: 0.84375 },\n { x: 0.40625, y: 0.84375 },\n { x: 0.40625, y: 0.84375 },\n { x: 0.46875, y: 0.84375 },\n { x: 0.46875, y: 0.84375 },\n { x: 0.53125, y: 0.84375 },\n { x: 0.53125, y: 0.84375 },\n { x: 0.59375, y: 0.84375 },\n { x: 0.59375, y: 0.84375 },\n { x: 0.65625, y: 0.84375 },\n { x: 0.65625, y: 0.84375 },\n { x: 0.71875, y: 0.84375 },\n { x: 0.71875, y: 0.84375 },\n { x: 0.78125, y: 0.84375 },\n { x: 0.78125, y: 0.84375 },\n { x: 0.84375, y: 0.84375 },\n { x: 0.84375, y: 0.84375 },\n { x: 0.90625, y: 0.84375 },\n { x: 0.90625, y: 0.84375 },\n { x: 0.96875, y: 0.84375 },\n { x: 0.96875, y: 0.84375 },\n { x: 0.03125, y: 0.90625 },\n { x: 0.03125, y: 0.90625 },\n { x: 0.09375, y: 0.90625 },\n { x: 0.09375, y: 0.90625 },\n { x: 0.15625, y: 0.90625 },\n { x: 0.15625, y: 0.90625 },\n { x: 0.21875, y: 0.90625 },\n { x: 0.21875, y: 0.90625 },\n { x: 0.28125, y: 0.90625 },\n { x: 0.28125, y: 0.90625 },\n { x: 0.34375, y: 0.90625 },\n { x: 0.34375, y: 0.90625 },\n { x: 0.40625, y: 0.90625 },\n { x: 0.40625, y: 0.90625 },\n { x: 0.46875, y: 0.90625 },\n { x: 0.46875, y: 0.90625 },\n { x: 0.53125, y: 0.90625 },\n { x: 0.53125, y: 0.90625 },\n { x: 0.59375, y: 0.90625 },\n { x: 0.59375, y: 0.90625 },\n { x: 0.65625, y: 0.90625 },\n { x: 0.65625, y: 0.90625 },\n { x: 0.71875, y: 0.90625 },\n { x: 0.71875, y: 0.90625 },\n { x: 0.78125, y: 0.90625 },\n { x: 0.78125, y: 0.90625 },\n { x: 0.84375, y: 0.90625 },\n { x: 0.84375, y: 0.90625 },\n { x: 0.90625, y: 0.90625 },\n { x: 0.90625, y: 0.90625 },\n { x: 0.96875, y: 0.90625 },\n { x: 0.96875, y: 0.90625 },\n { x: 0.03125, y: 0.96875 },\n { x: 0.03125, y: 0.96875 },\n { x: 0.09375, y: 0.96875 },\n { x: 0.09375, y: 0.96875 },\n { x: 0.15625, y: 0.96875 },\n { x: 0.15625, y: 0.96875 },\n { x: 0.21875, y: 0.96875 },\n { x: 0.21875, y: 0.96875 },\n { x: 0.28125, y: 0.96875 },\n { x: 0.28125, y: 0.96875 },\n { x: 0.34375, y: 0.96875 },\n { x: 0.34375, y: 0.96875 },\n { x: 0.40625, y: 0.96875 },\n { x: 0.40625, y: 0.96875 },\n { x: 0.46875, y: 0.96875 },\n { x: 0.46875, y: 0.96875 },\n { x: 0.53125, y: 0.96875 },\n { x: 0.53125, y: 0.96875 },\n { x: 0.59375, y: 0.96875 },\n { x: 0.59375, y: 0.96875 },\n { x: 0.65625, y: 0.96875 },\n { x: 0.65625, y: 0.96875 },\n { x: 0.71875, y: 0.96875 },\n { x: 0.71875, y: 0.96875 },\n { x: 0.78125, y: 0.96875 },\n { x: 0.78125, y: 0.96875 },\n { x: 0.84375, y: 0.96875 },\n { x: 0.84375, y: 0.96875 },\n { x: 0.90625, y: 0.96875 },\n { x: 0.90625, y: 0.96875 },\n { x: 0.96875, y: 0.96875 },\n { x: 0.96875, y: 0.96875 },\n { x: 0.0625, y: 0.0625 },\n { x: 0.0625, y: 0.0625 },\n { x: 0.0625, y: 0.0625 },\n { x: 0.0625, y: 0.0625 },\n { x: 0.0625, y: 0.0625 },\n { x: 0.0625, y: 0.0625 },\n { x: 0.1875, y: 0.0625 },\n { x: 0.1875, y: 0.0625 },\n { x: 0.1875, y: 0.0625 },\n { x: 0.1875, y: 0.0625 },\n { x: 0.1875, y: 0.0625 },\n { x: 0.1875, y: 0.0625 },\n { x: 0.3125, y: 0.0625 },\n { x: 0.3125, y: 0.0625 },\n { x: 0.3125, y: 0.0625 },\n { x: 0.3125, y: 0.0625 },\n { x: 0.3125, y: 0.0625 },\n { x: 0.3125, y: 0.0625 },\n { x: 0.4375, y: 0.0625 },\n { x: 0.4375, y: 0.0625 },\n { x: 0.4375, y: 0.0625 },\n { x: 0.4375, y: 0.0625 },\n { x: 0.4375, y: 0.0625 },\n { x: 0.4375, y: 0.0625 },\n { x: 0.5625, y: 0.0625 },\n { x: 0.5625, y: 0.0625 },\n { x: 0.5625, y: 0.0625 },\n { x: 0.5625, y: 0.0625 },\n { x: 0.5625, y: 0.0625 },\n { x: 0.5625, y: 0.0625 },\n { x: 0.6875, y: 0.0625 },\n { x: 0.6875, y: 0.0625 },\n { x: 0.6875, y: 0.0625 },\n { x: 0.6875, y: 0.0625 },\n { x: 0.6875, y: 0.0625 },\n { x: 0.6875, y: 0.0625 },\n { x: 0.8125, y: 0.0625 },\n { x: 0.8125, y: 0.0625 },\n { x: 0.8125, y: 0.0625 },\n { x: 0.8125, y: 0.0625 },\n { x: 0.8125, y: 0.0625 },\n { x: 0.8125, y: 0.0625 },\n { x: 0.9375, y: 0.0625 },\n { x: 0.9375, y: 0.0625 },\n { x: 0.9375, y: 0.0625 },\n { x: 0.9375, y: 0.0625 },\n { x: 0.9375, y: 0.0625 },\n { x: 0.9375, y: 0.0625 },\n { x: 0.0625, y: 0.1875 },\n { x: 0.0625, y: 0.1875 },\n { x: 0.0625, y: 0.1875 },\n { x: 0.0625, y: 0.1875 },\n { x: 0.0625, y: 0.1875 },\n { x: 0.0625, y: 0.1875 },\n { x: 0.1875, y: 0.1875 },\n { x: 0.1875, y: 0.1875 },\n { x: 0.1875, y: 0.1875 },\n { x: 0.1875, y: 0.1875 },\n { x: 0.1875, y: 0.1875 },\n { x: 0.1875, y: 0.1875 },\n { x: 0.3125, y: 0.1875 },\n { x: 0.3125, y: 0.1875 },\n { x: 0.3125, y: 0.1875 },\n { x: 0.3125, y: 0.1875 },\n { x: 0.3125, y: 0.1875 },\n { x: 0.3125, y: 0.1875 },\n { x: 0.4375, y: 0.1875 },\n { x: 0.4375, y: 0.1875 },\n { x: 0.4375, y: 0.1875 },\n { x: 0.4375, y: 0.1875 },\n { x: 0.4375, y: 0.1875 },\n { x: 0.4375, y: 0.1875 },\n { x: 0.5625, y: 0.1875 },\n { x: 0.5625, y: 0.1875 },\n { x: 0.5625, y: 0.1875 },\n { x: 0.5625, y: 0.1875 },\n { x: 0.5625, y: 0.1875 },\n { x: 0.5625, y: 0.1875 },\n { x: 0.6875, y: 0.1875 },\n { x: 0.6875, y: 0.1875 },\n { x: 0.6875, y: 0.1875 },\n { x: 0.6875, y: 0.1875 },\n { x: 0.6875, y: 0.1875 },\n { x: 0.6875, y: 0.1875 },\n { x: 0.8125, y: 0.1875 },\n { x: 0.8125, y: 0.1875 },\n { x: 0.8125, y: 0.1875 },\n { x: 0.8125, y: 0.1875 },\n { x: 0.8125, y: 0.1875 },\n { x: 0.8125, y: 0.1875 },\n { x: 0.9375, y: 0.1875 },\n { x: 0.9375, y: 0.1875 },\n { x: 0.9375, y: 0.1875 },\n { x: 0.9375, y: 0.1875 },\n { x: 0.9375, y: 0.1875 },\n { x: 0.9375, y: 0.1875 },\n { x: 0.0625, y: 0.3125 },\n { x: 0.0625, y: 0.3125 },\n { x: 0.0625, y: 0.3125 },\n { x: 0.0625, y: 0.3125 },\n { x: 0.0625, y: 0.3125 },\n { x: 0.0625, y: 0.3125 },\n { x: 0.1875, y: 0.3125 },\n { x: 0.1875, y: 0.3125 },\n { x: 0.1875, y: 0.3125 },\n { x: 0.1875, y: 0.3125 },\n { x: 0.1875, y: 0.3125 },\n { x: 0.1875, y: 0.3125 },\n { x: 0.3125, y: 0.3125 },\n { x: 0.3125, y: 0.3125 },\n { x: 0.3125, y: 0.3125 },\n { x: 0.3125, y: 0.3125 },\n { x: 0.3125, y: 0.3125 },\n { x: 0.3125, y: 0.3125 },\n { x: 0.4375, y: 0.3125 },\n { x: 0.4375, y: 0.3125 },\n { x: 0.4375, y: 0.3125 },\n { x: 0.4375, y: 0.3125 },\n { x: 0.4375, y: 0.3125 },\n { x: 0.4375, y: 0.3125 },\n { x: 0.5625, y: 0.3125 },\n { x: 0.5625, y: 0.3125 },\n { x: 0.5625, y: 0.3125 },\n { x: 0.5625, y: 0.3125 },\n { x: 0.5625, y: 0.3125 },\n { x: 0.5625, y: 0.3125 },\n { x: 0.6875, y: 0.3125 },\n { x: 0.6875, y: 0.3125 },\n { x: 0.6875, y: 0.3125 },\n { x: 0.6875, y: 0.3125 },\n { x: 0.6875, y: 0.3125 },\n { x: 0.6875, y: 0.3125 },\n { x: 0.8125, y: 0.3125 },\n { x: 0.8125, y: 0.3125 },\n { x: 0.8125, y: 0.3125 },\n { x: 0.8125, y: 0.3125 },\n { x: 0.8125, y: 0.3125 },\n { x: 0.8125, y: 0.3125 },\n { x: 0.9375, y: 0.3125 },\n { x: 0.9375, y: 0.3125 },\n { x: 0.9375, y: 0.3125 },\n { x: 0.9375, y: 0.3125 },\n { x: 0.9375, y: 0.3125 },\n { x: 0.9375, y: 0.3125 },\n { x: 0.0625, y: 0.4375 },\n { x: 0.0625, y: 0.4375 },\n { x: 0.0625, y: 0.4375 },\n { x: 0.0625, y: 0.4375 },\n { x: 0.0625, y: 0.4375 },\n { x: 0.0625, y: 0.4375 },\n { x: 0.1875, y: 0.4375 },\n { x: 0.1875, y: 0.4375 },\n { x: 0.1875, y: 0.4375 },\n { x: 0.1875, y: 0.4375 },\n { x: 0.1875, y: 0.4375 },\n { x: 0.1875, y: 0.4375 },\n { x: 0.3125, y: 0.4375 },\n { x: 0.3125, y: 0.4375 },\n { x: 0.3125, y: 0.4375 },\n { x: 0.3125, y: 0.4375 },\n { x: 0.3125, y: 0.4375 },\n { x: 0.3125, y: 0.4375 },\n { x: 0.4375, y: 0.4375 },\n { x: 0.4375, y: 0.4375 },\n { x: 0.4375, y: 0.4375 },\n { x: 0.4375, y: 0.4375 },\n { x: 0.4375, y: 0.4375 },\n { x: 0.4375, y: 0.4375 },\n { x: 0.5625, y: 0.4375 },\n { x: 0.5625, y: 0.4375 },\n { x: 0.5625, y: 0.4375 },\n { x: 0.5625, y: 0.4375 },\n { x: 0.5625, y: 0.4375 },\n { x: 0.5625, y: 0.4375 },\n { x: 0.6875, y: 0.4375 },\n { x: 0.6875, y: 0.4375 },\n { x: 0.6875, y: 0.4375 },\n { x: 0.6875, y: 0.4375 },\n { x: 0.6875, y: 0.4375 },\n { x: 0.6875, y: 0.4375 },\n { x: 0.8125, y: 0.4375 },\n { x: 0.8125, y: 0.4375 },\n { x: 0.8125, y: 0.4375 },\n { x: 0.8125, y: 0.4375 },\n { x: 0.8125, y: 0.4375 },\n { x: 0.8125, y: 0.4375 },\n { x: 0.9375, y: 0.4375 },\n { x: 0.9375, y: 0.4375 },\n { x: 0.9375, y: 0.4375 },\n { x: 0.9375, y: 0.4375 },\n { x: 0.9375, y: 0.4375 },\n { x: 0.9375, y: 0.4375 },\n { x: 0.0625, y: 0.5625 },\n { x: 0.0625, y: 0.5625 },\n { x: 0.0625, y: 0.5625 },\n { x: 0.0625, y: 0.5625 },\n { x: 0.0625, y: 0.5625 },\n { x: 0.0625, y: 0.5625 },\n { x: 0.1875, y: 0.5625 },\n { x: 0.1875, y: 0.5625 },\n { x: 0.1875, y: 0.5625 },\n { x: 0.1875, y: 0.5625 },\n { x: 0.1875, y: 0.5625 },\n { x: 0.1875, y: 0.5625 },\n { x: 0.3125, y: 0.5625 },\n { x: 0.3125, y: 0.5625 },\n { x: 0.3125, y: 0.5625 },\n { x: 0.3125, y: 0.5625 },\n { x: 0.3125, y: 0.5625 },\n { x: 0.3125, y: 0.5625 },\n { x: 0.4375, y: 0.5625 },\n { x: 0.4375, y: 0.5625 },\n { x: 0.4375, y: 0.5625 },\n { x: 0.4375, y: 0.5625 },\n { x: 0.4375, y: 0.5625 },\n { x: 0.4375, y: 0.5625 },\n { x: 0.5625, y: 0.5625 },\n { x: 0.5625, y: 0.5625 },\n { x: 0.5625, y: 0.5625 },\n { x: 0.5625, y: 0.5625 },\n { x: 0.5625, y: 0.5625 },\n { x: 0.5625, y: 0.5625 },\n { x: 0.6875, y: 0.5625 },\n { x: 0.6875, y: 0.5625 },\n { x: 0.6875, y: 0.5625 },\n { x: 0.6875, y: 0.5625 },\n { x: 0.6875, y: 0.5625 },\n { x: 0.6875, y: 0.5625 },\n { x: 0.8125, y: 0.5625 },\n { x: 0.8125, y: 0.5625 },\n { x: 0.8125, y: 0.5625 },\n { x: 0.8125, y: 0.5625 },\n { x: 0.8125, y: 0.5625 },\n { x: 0.8125, y: 0.5625 },\n { x: 0.9375, y: 0.5625 },\n { x: 0.9375, y: 0.5625 },\n { x: 0.9375, y: 0.5625 },\n { x: 0.9375, y: 0.5625 },\n { x: 0.9375, y: 0.5625 },\n { x: 0.9375, y: 0.5625 },\n { x: 0.0625, y: 0.6875 },\n { x: 0.0625, y: 0.6875 },\n { x: 0.0625, y: 0.6875 },\n { x: 0.0625, y: 0.6875 },\n { x: 0.0625, y: 0.6875 },\n { x: 0.0625, y: 0.6875 },\n { x: 0.1875, y: 0.6875 },\n { x: 0.1875, y: 0.6875 },\n { x: 0.1875, y: 0.6875 },\n { x: 0.1875, y: 0.6875 },\n { x: 0.1875, y: 0.6875 },\n { x: 0.1875, y: 0.6875 },\n { x: 0.3125, y: 0.6875 },\n { x: 0.3125, y: 0.6875 },\n { x: 0.3125, y: 0.6875 },\n { x: 0.3125, y: 0.6875 },\n { x: 0.3125, y: 0.6875 },\n { x: 0.3125, y: 0.6875 },\n { x: 0.4375, y: 0.6875 },\n { x: 0.4375, y: 0.6875 },\n { x: 0.4375, y: 0.6875 },\n { x: 0.4375, y: 0.6875 },\n { x: 0.4375, y: 0.6875 },\n { x: 0.4375, y: 0.6875 },\n { x: 0.5625, y: 0.6875 },\n { x: 0.5625, y: 0.6875 },\n { x: 0.5625, y: 0.6875 },\n { x: 0.5625, y: 0.6875 },\n { x: 0.5625, y: 0.6875 },\n { x: 0.5625, y: 0.6875 },\n { x: 0.6875, y: 0.6875 },\n { x: 0.6875, y: 0.6875 },\n { x: 0.6875, y: 0.6875 },\n { x: 0.6875, y: 0.6875 },\n { x: 0.6875, y: 0.6875 },\n { x: 0.6875, y: 0.6875 },\n { x: 0.8125, y: 0.6875 },\n { x: 0.8125, y: 0.6875 },\n { x: 0.8125, y: 0.6875 },\n { x: 0.8125, y: 0.6875 },\n { x: 0.8125, y: 0.6875 },\n { x: 0.8125, y: 0.6875 },\n { x: 0.9375, y: 0.6875 },\n { x: 0.9375, y: 0.6875 },\n { x: 0.9375, y: 0.6875 },\n { x: 0.9375, y: 0.6875 },\n { x: 0.9375, y: 0.6875 },\n { x: 0.9375, y: 0.6875 },\n { x: 0.0625, y: 0.8125 },\n { x: 0.0625, y: 0.8125 },\n { x: 0.0625, y: 0.8125 },\n { x: 0.0625, y: 0.8125 },\n { x: 0.0625, y: 0.8125 },\n { x: 0.0625, y: 0.8125 },\n { x: 0.1875, y: 0.8125 },\n { x: 0.1875, y: 0.8125 },\n { x: 0.1875, y: 0.8125 },\n { x: 0.1875, y: 0.8125 },\n { x: 0.1875, y: 0.8125 },\n { x: 0.1875, y: 0.8125 },\n { x: 0.3125, y: 0.8125 },\n { x: 0.3125, y: 0.8125 },\n { x: 0.3125, y: 0.8125 },\n { x: 0.3125, y: 0.8125 },\n { x: 0.3125, y: 0.8125 },\n { x: 0.3125, y: 0.8125 },\n { x: 0.4375, y: 0.8125 },\n { x: 0.4375, y: 0.8125 },\n { x: 0.4375, y: 0.8125 },\n { x: 0.4375, y: 0.8125 },\n { x: 0.4375, y: 0.8125 },\n { x: 0.4375, y: 0.8125 },\n { x: 0.5625, y: 0.8125 },\n { x: 0.5625, y: 0.8125 },\n { x: 0.5625, y: 0.8125 },\n { x: 0.5625, y: 0.8125 },\n { x: 0.5625, y: 0.8125 },\n { x: 0.5625, y: 0.8125 },\n { x: 0.6875, y: 0.8125 },\n { x: 0.6875, y: 0.8125 },\n { x: 0.6875, y: 0.8125 },\n { x: 0.6875, y: 0.8125 },\n { x: 0.6875, y: 0.8125 },\n { x: 0.6875, y: 0.8125 },\n { x: 0.8125, y: 0.8125 },\n { x: 0.8125, y: 0.8125 },\n { x: 0.8125, y: 0.8125 },\n { x: 0.8125, y: 0.8125 },\n { x: 0.8125, y: 0.8125 },\n { x: 0.8125, y: 0.8125 },\n { x: 0.9375, y: 0.8125 },\n { x: 0.9375, y: 0.8125 },\n { x: 0.9375, y: 0.8125 },\n { x: 0.9375, y: 0.8125 },\n { x: 0.9375, y: 0.8125 },\n { x: 0.9375, y: 0.8125 },\n { x: 0.0625, y: 0.9375 },\n { x: 0.0625, y: 0.9375 },\n { x: 0.0625, y: 0.9375 },\n { x: 0.0625, y: 0.9375 },\n { x: 0.0625, y: 0.9375 },\n { x: 0.0625, y: 0.9375 },\n { x: 0.1875, y: 0.9375 },\n { x: 0.1875, y: 0.9375 },\n { x: 0.1875, y: 0.9375 },\n { x: 0.1875, y: 0.9375 },\n { x: 0.1875, y: 0.9375 },\n { x: 0.1875, y: 0.9375 },\n { x: 0.3125, y: 0.9375 },\n { x: 0.3125, y: 0.9375 },\n { x: 0.3125, y: 0.9375 },\n { x: 0.3125, y: 0.9375 },\n { x: 0.3125, y: 0.9375 },\n { x: 0.3125, y: 0.9375 },\n { x: 0.4375, y: 0.9375 },\n { x: 0.4375, y: 0.9375 },\n { x: 0.4375, y: 0.9375 },\n { x: 0.4375, y: 0.9375 },\n { x: 0.4375, y: 0.9375 },\n { x: 0.4375, y: 0.9375 },\n { x: 0.5625, y: 0.9375 },\n { x: 0.5625, y: 0.9375 },\n { x: 0.5625, y: 0.9375 },\n { x: 0.5625, y: 0.9375 },\n { x: 0.5625, y: 0.9375 },\n { x: 0.5625, y: 0.9375 },\n { x: 0.6875, y: 0.9375 },\n { x: 0.6875, y: 0.9375 },\n { x: 0.6875, y: 0.9375 },\n { x: 0.6875, y: 0.9375 },\n { x: 0.6875, y: 0.9375 },\n { x: 0.6875, y: 0.9375 },\n { x: 0.8125, y: 0.9375 },\n { x: 0.8125, y: 0.9375 },\n { x: 0.8125, y: 0.9375 },\n { x: 0.8125, y: 0.9375 },\n { x: 0.8125, y: 0.9375 },\n { x: 0.8125, y: 0.9375 },\n { x: 0.9375, y: 0.9375 },\n { x: 0.9375, y: 0.9375 },\n { x: 0.9375, y: 0.9375 },\n { x: 0.9375, y: 0.9375 },\n { x: 0.9375, y: 0.9375 },\n { x: 0.9375, y: 0.9375 },\n];\n", "/**\n * HandPose model implementation\n * See `handpose.ts` for entry point\n */\n\nimport * as tf from '../../dist/tfjs.esm.js';\nimport * as util from './handposeutil';\nimport * as anchors from './handposeanchors';\nimport { constants } from '../tfjs/constants';\nimport type { Tensor, GraphModel } from '../tfjs/types';\nimport type { Point } from '../result';\nimport type { Config } from '../config';\n\nexport class HandDetector {\n model: GraphModel;\n anchors: number[][];\n anchorsTensor: Tensor;\n inputSize: number;\n inputSizeTensor: Tensor;\n doubleInputSizeTensor: Tensor;\n\n constructor(model: GraphModel) {\n this.model = model;\n this.anchors = anchors.anchors.map((anchor) => [anchor.x, anchor.y]);\n this.anchorsTensor = tf.tensor2d(this.anchors);\n this.inputSize = this?.model?.inputs?.[0]?.shape?.[2] || 0;\n this.inputSizeTensor = tf.tensor1d([this.inputSize, this.inputSize]);\n this.doubleInputSizeTensor = tf.tensor1d([this.inputSize * 2, this.inputSize * 2]);\n }\n\n normalizeBoxes(boxes) {\n const t: Record = {};\n t.boxOffsets = tf.slice(boxes, [0, 0], [-1, 2]);\n t.boxSizes = tf.slice(boxes, [0, 2], [-1, 2]);\n t.div = tf.div(t.boxOffsets, this.inputSizeTensor);\n t.boxCenterPoints = tf.add(t.div, this.anchorsTensor);\n t.halfBoxSizes = tf.div(t.boxSizes, this.doubleInputSizeTensor);\n t.sub = tf.sub(t.boxCenterPoints, t.halfBoxSizes);\n t.startPoints = tf.mul(t.sub, this.inputSizeTensor);\n t.add = tf.add(t.boxCenterPoints, t.halfBoxSizes);\n t.endPoints = tf.mul(t.add, this.inputSizeTensor);\n const res = tf.concat2d([t.startPoints, t.endPoints], 1);\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n return res as Tensor;\n }\n\n normalizeLandmarks(rawPalmLandmarks, index: number) {\n const t: Record = {};\n t.reshape = tf.reshape(rawPalmLandmarks, [-1, 7, 2]);\n t.div = tf.div(t.reshape, this.inputSizeTensor);\n t.landmarks = tf.add(t.div, this.anchors[index] ? this.anchors[index] : 0);\n const res = tf.mul(t.landmarks, this.inputSizeTensor);\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n return res as Tensor;\n }\n\n async predict(input: Tensor, config: Config): Promise<{ startPoint: Point; endPoint: Point, palmLandmarks: Point[]; confidence: number }[]> {\n const t: Record = {};\n t.resize = tf.image.resizeBilinear(input, [this.inputSize, this.inputSize]);\n t.div = tf.div(t.resize, constants.tf127);\n t.image = tf.sub(t.div, constants.tf1);\n t.batched = this.model.execute(t.image) as Tensor;\n t.predictions = tf.squeeze(t.batched);\n t.slice = tf.slice(t.predictions, [0, 0], [-1, 1]);\n t.sigmoid = tf.sigmoid(t.slice);\n t.scores = tf.squeeze(t.sigmoid);\n const scores = await t.scores.data();\n t.boxes = tf.slice(t.predictions, [0, 1], [-1, 4]);\n t.norm = this.normalizeBoxes(t.boxes);\n // box detection is flaky so we look for 3x boxes than we need results\n t.nms = await tf.image.nonMaxSuppressionAsync(t.norm, t.scores, 3 * (config.hand?.maxDetected || 1), config.hand.iouThreshold, config.hand.minConfidence);\n const nms = await t.nms.array() as number[];\n const hands: { startPoint: Point; endPoint: Point; palmLandmarks: Point[]; confidence: number }[] = [];\n for (const index of nms) {\n const p: Record = {};\n p.box = tf.slice(t.norm, [index, 0], [1, -1]);\n p.slice = tf.slice(t.predictions, [index, 5], [1, 14]);\n p.norm = this.normalizeLandmarks(p.slice, index);\n p.palmLandmarks = tf.reshape(p.norm, [-1, 2]);\n const box = await p.box.data();\n const startPoint = box.slice(0, 2) as unknown as Point;\n const endPoint = box.slice(2, 4) as unknown as Point;\n const palmLandmarks = await p.palmLandmarks.array();\n const hand = { startPoint, endPoint, palmLandmarks, confidence: scores[index] };\n const scaled = util.scaleBoxCoordinates(hand, [(input.shape[2] || 1) / this.inputSize, (input.shape[1] || 0) / this.inputSize]);\n hands.push(scaled);\n Object.keys(p).forEach((tensor) => tf.dispose(p[tensor]));\n }\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n return hands;\n }\n}\n", "/**\n * HandPose model implementation\n * See `handpose.ts` for entry point\n */\n\nimport * as tf from '../../dist/tfjs.esm.js';\nimport * as util from './handposeutil';\nimport type * as detector from './handposedetector';\nimport { constants } from '../tfjs/constants';\nimport type { Tensor, GraphModel } from '../tfjs/types';\nimport { env } from '../util/env';\nimport { now } from '../util/util';\nimport type { Point } from '../result';\n\nconst palmBoxEnlargeFactor = 5; // default 3\nconst handBoxEnlargeFactor = 1.65; // default 1.65\nconst palmLandmarkIds = [0, 5, 9, 13, 17, 1, 2];\nconst palmLandmarksPalmBase = 0;\nconst palmLandmarksMiddleFingerBase = 2;\nlet lastTime = 0;\n\nexport class HandPipeline {\n handDetector: detector.HandDetector;\n handPoseModel: GraphModel;\n inputSize: number;\n storedBoxes: ({ startPoint: Point; endPoint: Point; palmLandmarks: Point[]; confidence: number } | null)[];\n skipped: number;\n detectedHands: number;\n\n constructor(handDetector, handPoseModel) {\n this.handDetector = handDetector;\n this.handPoseModel = handPoseModel;\n this.inputSize = this.handPoseModel?.inputs?.[0].shape?.[2] || 0;\n this.storedBoxes = [];\n this.skipped = Number.MAX_SAFE_INTEGER;\n this.detectedHands = 0;\n }\n\n calculateLandmarksBoundingBox(landmarks) { // eslint-disable-line class-methods-use-this\n const xs = landmarks.map((d) => d[0]);\n const ys = landmarks.map((d) => d[1]);\n const startPoint = [Math.min(...xs), Math.min(...ys)];\n const endPoint = [Math.max(...xs), Math.max(...ys)];\n return { startPoint, endPoint };\n }\n\n getBoxForPalmLandmarks(palmLandmarks, rotationMatrix) {\n const rotatedPalmLandmarks = palmLandmarks.map((coord) => util.rotatePoint([...coord, 1], rotationMatrix));\n const boxAroundPalm = this.calculateLandmarksBoundingBox(rotatedPalmLandmarks);\n return util.enlargeBox(util.squarifyBox(boxAroundPalm), palmBoxEnlargeFactor);\n }\n\n getBoxForHandLandmarks(landmarks) {\n const boundingBox = this.calculateLandmarksBoundingBox(landmarks);\n const boxAroundHand = util.enlargeBox(util.squarifyBox(boundingBox), handBoxEnlargeFactor);\n boxAroundHand.palmLandmarks = [];\n for (let i = 0; i < palmLandmarkIds.length; i++) {\n boxAroundHand.palmLandmarks.push(landmarks[palmLandmarkIds[i]].slice(0, 2));\n }\n return boxAroundHand;\n }\n\n transformRawCoords(rawCoords, box2, angle, rotationMatrix) {\n const boxSize = util.getBoxSize(box2);\n const scaleFactor = [boxSize[0] / this.inputSize, boxSize[1] / this.inputSize, (boxSize[0] + boxSize[1]) / this.inputSize / 2];\n const coordsScaled = rawCoords.map((coord) => [\n scaleFactor[0] * (coord[0] - this.inputSize / 2),\n scaleFactor[1] * (coord[1] - this.inputSize / 2),\n scaleFactor[2] * coord[2],\n ]);\n const coordsRotationMatrix = util.buildRotationMatrix(angle, [0, 0]);\n const coordsRotated = coordsScaled.map((coord) => {\n const rotated = util.rotatePoint(coord, coordsRotationMatrix);\n return [...rotated, coord[2]];\n });\n const inverseRotationMatrix = util.invertTransformMatrix(rotationMatrix);\n const boxCenter = [...util.getBoxCenter(box2), 1];\n const originalBoxCenter = [\n util.dot(boxCenter, inverseRotationMatrix[0]),\n util.dot(boxCenter, inverseRotationMatrix[1]),\n ];\n return coordsRotated.map((coord) => [\n Math.trunc(coord[0] + originalBoxCenter[0]),\n Math.trunc(coord[1] + originalBoxCenter[1]),\n Math.trunc(coord[2]),\n ]);\n }\n\n async estimateHands(image, config) {\n let useFreshBox = false;\n\n // run new detector every skipFrames\n let boxes;\n const skipTime = (config.hand.skipTime || 0) > (now() - lastTime);\n const skipFrame = this.skipped < (config.hand.skipFrames || 0);\n if (config.skipAllowed && skipTime && skipFrame) {\n boxes = await this.handDetector.predict(image, config);\n this.skipped = 0;\n }\n if (config.skipAllowed) this.skipped++;\n\n // if detector result count doesn't match current working set, use it to reset current working set\n if (boxes && (boxes.length > 0) && ((boxes.length !== this.detectedHands) && (this.detectedHands !== config.hand.maxDetected) || !config.hand.landmarks)) {\n this.detectedHands = 0;\n this.storedBoxes = [...boxes];\n // for (const possible of boxes) this.storedBoxes.push(possible);\n if (this.storedBoxes.length > 0) useFreshBox = true;\n }\n const hands: { landmarks: Point[], confidence: number, boxConfidence: number, fingerConfidence: number, box: { topLeft: Point, bottomRight: Point } }[] = [];\n\n // go through working set of boxes\n for (let i = 0; i < this.storedBoxes.length; i++) {\n const currentBox = this.storedBoxes[i];\n if (!currentBox) continue;\n if (config.hand.landmarks) {\n const angle = config.hand.rotation ? util.computeRotation(currentBox.palmLandmarks[palmLandmarksPalmBase], currentBox.palmLandmarks[palmLandmarksMiddleFingerBase]) : 0;\n const palmCenter = util.getBoxCenter(currentBox);\n const palmCenterNormalized = [palmCenter[0] / image.shape[2], palmCenter[1] / image.shape[1]];\n const rotatedImage = config.hand.rotation && env.kernels.includes('rotatewithoffset') ? tf.image.rotateWithOffset(image, angle, 0, palmCenterNormalized) : image.clone();\n const rotationMatrix = util.buildRotationMatrix(-angle, palmCenter);\n const newBox = useFreshBox ? this.getBoxForPalmLandmarks(currentBox.palmLandmarks, rotationMatrix) : currentBox;\n const croppedInput = util.cutBoxFromImageAndResize(newBox, rotatedImage, [this.inputSize, this.inputSize]);\n const handImage = tf.div(croppedInput, constants.tf255);\n tf.dispose(croppedInput);\n tf.dispose(rotatedImage);\n const [confidenceT, keypoints] = this.handPoseModel.execute(handImage) as Tensor[];\n lastTime = now();\n tf.dispose(handImage);\n const confidence = (await confidenceT.data())[0];\n tf.dispose(confidenceT);\n if (confidence >= config.hand.minConfidence / 4) {\n const keypointsReshaped = tf.reshape(keypoints, [-1, 3]);\n const rawCoords = await keypointsReshaped.array();\n tf.dispose(keypoints);\n tf.dispose(keypointsReshaped);\n const coords = this.transformRawCoords(rawCoords, newBox, angle, rotationMatrix);\n const nextBoundingBox = this.getBoxForHandLandmarks(coords);\n this.storedBoxes[i] = { ...nextBoundingBox, confidence };\n const result = {\n landmarks: coords,\n confidence,\n boxConfidence: currentBox.confidence,\n fingerConfidence: confidence,\n box: { topLeft: nextBoundingBox.startPoint, bottomRight: nextBoundingBox.endPoint },\n };\n hands.push(result);\n } else {\n this.storedBoxes[i] = null;\n }\n tf.dispose(keypoints);\n } else {\n // const enlarged = box.enlargeBox(box.squarifyBox(box.shiftBox(currentBox, HAND_BOX_SHIFT_VECTOR)), handBoxEnlargeFactor);\n const enlarged = util.enlargeBox(util.squarifyBox(currentBox), handBoxEnlargeFactor);\n const result = {\n confidence: currentBox.confidence,\n boxConfidence: currentBox.confidence,\n fingerConfidence: 0,\n box: { topLeft: enlarged.startPoint, bottomRight: enlarged.endPoint },\n landmarks: [],\n };\n hands.push(result);\n }\n }\n this.storedBoxes = this.storedBoxes.filter((a) => a !== null);\n this.detectedHands = hands.length;\n if (hands.length > config.hand.maxDetected) hands.length = config.hand.maxDetected;\n return hands;\n }\n}\n", "/**\n * FingerPose algorithm implementation\n * See `fingerpose.ts` for entry point\n */\n\nexport const Finger = {\n thumb: 0,\n index: 1,\n middle: 2,\n ring: 3,\n pinky: 4,\n all: [0, 1, 2, 3, 4], // just for convenience\n nameMapping: { 0: 'thumb', 1: 'index', 2: 'middle', 3: 'ring', 4: 'pinky' },\n // Describes mapping of joints based on the 21 points returned by handpose.\n // [0] Palm\n // [1-4] Thumb\n // [5-8] Index\n // [9-12] Middle\n // [13-16] Ring\n // [17-20] Pinky\n pointsMapping: {\n 0: [[0, 1], [1, 2], [2, 3], [3, 4]],\n 1: [[0, 5], [5, 6], [6, 7], [7, 8]],\n 2: [[0, 9], [9, 10], [10, 11], [11, 12]],\n 3: [[0, 13], [13, 14], [14, 15], [15, 16]],\n 4: [[0, 17], [17, 18], [18, 19], [19, 20]],\n },\n getName: (value) => Finger.nameMapping[value],\n getPoints: (value) => Finger.pointsMapping[value],\n};\n\nexport const FingerCurl = {\n none: 0,\n half: 1,\n full: 2,\n nameMapping: { 0: 'none', 1: 'half', 2: 'full' },\n getName: (value) => FingerCurl.nameMapping[value],\n};\n\nexport const FingerDirection = {\n verticalUp: 0,\n verticalDown: 1,\n horizontalLeft: 2,\n horizontalRight: 3,\n diagonalUpRight: 4,\n diagonalUpLeft: 5,\n diagonalDownRight: 6,\n diagonalDownLeft: 7,\n nameMapping: { 0: 'verticalUp', 1: 'verticalDown', 2: 'horizontalLeft', 3: 'horizontalRight', 4: 'diagonalUpRight', 5: 'diagonalUpLeft', 6: 'diagonalDownRight', 7: 'diagonalDownLeft' },\n getName: (value) => FingerDirection.nameMapping[value],\n};\n\nexport class FingerGesture {\n name;\n curls;\n directions;\n weights;\n weightsRelative;\n\n constructor(name) {\n // name (should be unique)\n this.name = name;\n this.curls = {};\n this.directions = {};\n this.weights = [1.0, 1.0, 1.0, 1.0, 1.0];\n this.weightsRelative = [1.0, 1.0, 1.0, 1.0, 1.0];\n }\n\n curl(finger, curl, confidence) {\n if (typeof this.curls[finger] === 'undefined') this.curls[finger] = [];\n this.curls[finger].push([curl, confidence]);\n }\n\n direction(finger, position, confidence) {\n if (!this.directions[finger]) this.directions[finger] = [];\n this.directions[finger].push([position, confidence]);\n }\n\n weight(finger, weight) {\n this.weights[finger] = weight;\n // recalculate relative weights\n const total = this.weights.reduce((a, b) => a + b, 0);\n this.weightsRelative = this.weights.map((el) => el * 5 / total);\n }\n\n matchAgainst(detectedCurls, detectedDirections) {\n let confidence = 0.0;\n // look at the detected curl of each finger and compare with\n // the expected curl of this finger inside current gesture\n for (const fingerIdx in detectedCurls) {\n const detectedCurl = detectedCurls[fingerIdx];\n const expectedCurls = this.curls[fingerIdx];\n if (typeof expectedCurls === 'undefined') {\n // no curl description available for this finger\n // add default confidence of \"1\"\n confidence += this.weightsRelative[fingerIdx];\n continue;\n }\n // compare to each possible curl of this specific finger\n for (const [expectedCurl, score] of expectedCurls) {\n if (detectedCurl === expectedCurl) {\n confidence += score * this.weightsRelative[fingerIdx];\n break;\n }\n }\n }\n // same for detected direction of each finger\n for (const fingerIdx in detectedDirections) {\n const detectedDirection = detectedDirections[fingerIdx];\n const expectedDirections = this.directions[fingerIdx];\n if (typeof expectedDirections === 'undefined') {\n // no direction description available for this finger\n // add default confidence of \"1\"\n confidence += this.weightsRelative[fingerIdx];\n continue;\n }\n // compare to each possible direction of this specific finger\n for (const [expectedDirection, score] of expectedDirections) {\n if (detectedDirection === expectedDirection) {\n confidence += score * this.weightsRelative[fingerIdx];\n break;\n }\n }\n }\n return confidence / 10;\n }\n}\n", "/**\n * FingerPose algorithm implementation\n * See `fingerpose.ts` for entry point\n */\n\nimport { Finger, FingerCurl, FingerDirection, FingerGesture } from './fingerdef';\n\nexport const { thumb, index, middle, ring, pinky } = Finger;\nexport const { none, half, full } = FingerCurl;\nexport const { verticalUp, verticalDown, horizontalLeft, horizontalRight, diagonalUpRight, diagonalUpLeft, diagonalDownRight, diagonalDownLeft } = FingerDirection;\n\n// describe thumbs up gesture \uD83D\uDC4D\nconst ThumbsUp = new FingerGesture('thumbs up');\nThumbsUp.curl(thumb, none, 1.0);\nThumbsUp.direction(thumb, verticalUp, 1.0);\nThumbsUp.direction(thumb, diagonalUpLeft, 0.25);\nThumbsUp.direction(thumb, diagonalUpRight, 0.25);\nfor (const finger of [Finger.index, Finger.middle, Finger.ring, Finger.pinky]) {\n ThumbsUp.curl(finger, full, 1.0);\n ThumbsUp.direction(finger, horizontalLeft, 1.0);\n ThumbsUp.direction(finger, horizontalRight, 1.0);\n}\n\n// describe Victory gesture \u270C\uFE0F\nconst Victory = new FingerGesture('victory');\nVictory.curl(thumb, half, 0.5);\nVictory.curl(thumb, none, 0.5);\nVictory.direction(thumb, verticalUp, 1.0);\nVictory.direction(thumb, diagonalUpLeft, 1.0);\nVictory.curl(index, none, 1.0);\nVictory.direction(index, verticalUp, 0.75);\nVictory.direction(index, diagonalUpLeft, 1.0);\nVictory.curl(middle, none, 1.0);\nVictory.direction(middle, verticalUp, 1.0);\nVictory.direction(middle, diagonalUpLeft, 0.75);\nVictory.curl(ring, full, 1.0);\nVictory.direction(ring, verticalUp, 0.2);\nVictory.direction(ring, diagonalUpLeft, 1.0);\nVictory.direction(ring, horizontalLeft, 0.2);\nVictory.curl(pinky, full, 1.0);\nVictory.direction(pinky, verticalUp, 0.2);\nVictory.direction(pinky, diagonalUpLeft, 1.0);\nVictory.direction(pinky, horizontalLeft, 0.2);\nVictory.weight(index, 2);\nVictory.weight(middle, 2);\n\n// describe Point gesture \u270C\uFE0F\nconst Point = new FingerGesture('point');\nPoint.curl(thumb, full, 1.0);\nPoint.curl(index, none, 0.5);\nPoint.curl(middle, full, 0.5);\nPoint.curl(ring, full, 0.5);\nPoint.curl(pinky, full, 0.5);\nPoint.weight(index, 2);\nPoint.weight(middle, 2);\n\n// describe Point gesture \u270C\uFE0F\nconst MiddleFinger = new FingerGesture('middle finger');\nMiddleFinger.curl(thumb, none, 1.0);\nMiddleFinger.curl(index, full, 0.5);\nMiddleFinger.curl(middle, full, 0.5);\nMiddleFinger.curl(ring, full, 0.5);\nMiddleFinger.curl(pinky, full, 0.5);\nMiddleFinger.weight(index, 2);\nMiddleFinger.weight(middle, 2);\n\n// describe Open Palm gesture \u270C\uFE0F\nconst OpenPalm = new FingerGesture('open palm');\nOpenPalm.curl(thumb, none, 0.75);\nOpenPalm.curl(index, none, 0.75);\nOpenPalm.curl(middle, none, 0.75);\nOpenPalm.curl(ring, none, 0.75);\nOpenPalm.curl(pinky, none, 0.75);\n\nexport default [ThumbsUp, Victory, Point, MiddleFinger, OpenPalm];\n", "/**\n * FingerPose algorithm implementation constants\n *\n * Based on: [**FingerPose***](https://github.com/andypotato/fingerpose)\n */\n\n/* eslint-disable camelcase */\n\nimport { Finger, FingerCurl, FingerDirection } from './fingerdef';\nimport Gestures from '../hand/fingergesture';\n\nconst minConfidence = 0.7;\nconst options = {\n // curl estimation\n HALF_CURL_START_LIMIT: 60.0,\n NO_CURL_START_LIMIT: 130.0,\n // direction estimation\n DISTANCE_VOTE_POWER: 1.1,\n SINGLE_ANGLE_VOTE_POWER: 0.9,\n TOTAL_ANGLE_VOTE_POWER: 1.6,\n};\n\nfunction calculateSlope(point1x, point1y, point2x, point2y) {\n const value = (point1y - point2y) / (point1x - point2x);\n let slope = Math.atan(value) * 180 / Math.PI;\n if (slope <= 0) slope = -slope;\n else if (slope > 0) slope = 180 - slope;\n return slope;\n}\n\n// point1, point2 are 2d or 3d point arrays (xy[z])\n// returns either a single scalar (2d) or array of two slopes (3d)\nfunction getSlopes(point1, point2) {\n if (!point1 || !point2) return [0, 0];\n const slopeXY = calculateSlope(point1[0], point1[1], point2[0], point2[1]);\n if (point1.length === 2) return slopeXY;\n const slopeYZ = calculateSlope(point1[1], point1[2], point2[1], point2[2]);\n return [slopeXY, slopeYZ];\n}\n\nfunction angleOrientationAt(angle, weightageAt = 1.0) {\n let isVertical = 0;\n let isDiagonal = 0;\n let isHorizontal = 0;\n if (angle >= 75.0 && angle <= 105.0) isVertical = 1 * weightageAt;\n else if (angle >= 25.0 && angle <= 155.0) isDiagonal = 1 * weightageAt;\n else isHorizontal = 1 * weightageAt;\n return [isVertical, isDiagonal, isHorizontal];\n}\n\nfunction estimateFingerCurl(startPoint, midPoint, endPoint) {\n const start_mid_x_dist = startPoint[0] - midPoint[0];\n const start_end_x_dist = startPoint[0] - endPoint[0];\n const mid_end_x_dist = midPoint[0] - endPoint[0];\n const start_mid_y_dist = startPoint[1] - midPoint[1];\n const start_end_y_dist = startPoint[1] - endPoint[1];\n const mid_end_y_dist = midPoint[1] - endPoint[1];\n const start_mid_z_dist = startPoint[2] - midPoint[2];\n const start_end_z_dist = startPoint[2] - endPoint[2];\n const mid_end_z_dist = midPoint[2] - endPoint[2];\n const start_mid_dist = Math.sqrt(start_mid_x_dist * start_mid_x_dist + start_mid_y_dist * start_mid_y_dist + start_mid_z_dist * start_mid_z_dist);\n const start_end_dist = Math.sqrt(start_end_x_dist * start_end_x_dist + start_end_y_dist * start_end_y_dist + start_end_z_dist * start_end_z_dist);\n const mid_end_dist = Math.sqrt(mid_end_x_dist * mid_end_x_dist + mid_end_y_dist * mid_end_y_dist + mid_end_z_dist * mid_end_z_dist);\n let cos_in = (mid_end_dist * mid_end_dist + start_mid_dist * start_mid_dist - start_end_dist * start_end_dist) / (2 * mid_end_dist * start_mid_dist);\n if (cos_in > 1.0) cos_in = 1.0;\n else if (cos_in < -1.0) cos_in = -1.0;\n let angleOfCurve = Math.acos(cos_in);\n angleOfCurve = (57.2958 * angleOfCurve) % 180;\n let fingerCurl;\n if (angleOfCurve > options.NO_CURL_START_LIMIT) fingerCurl = FingerCurl.none;\n else if (angleOfCurve > options.HALF_CURL_START_LIMIT) fingerCurl = FingerCurl.half;\n else fingerCurl = FingerCurl.full;\n return fingerCurl;\n}\n\nfunction estimateHorizontalDirection(start_end_x_dist, start_mid_x_dist, mid_end_x_dist, max_dist_x) {\n let estimatedDirection;\n if (max_dist_x === Math.abs(start_end_x_dist)) {\n if (start_end_x_dist > 0) estimatedDirection = FingerDirection.horizontalLeft;\n else estimatedDirection = FingerDirection.horizontalRight;\n } else if (max_dist_x === Math.abs(start_mid_x_dist)) {\n if (start_mid_x_dist > 0) estimatedDirection = FingerDirection.horizontalLeft;\n else estimatedDirection = FingerDirection.horizontalRight;\n } else {\n if (mid_end_x_dist > 0) estimatedDirection = FingerDirection.horizontalLeft;\n else estimatedDirection = FingerDirection.horizontalRight;\n }\n return estimatedDirection;\n}\n\nfunction estimateVerticalDirection(start_end_y_dist, start_mid_y_dist, mid_end_y_dist, max_dist_y) {\n let estimatedDirection;\n if (max_dist_y === Math.abs(start_end_y_dist)) {\n if (start_end_y_dist < 0) estimatedDirection = FingerDirection.verticalDown;\n else estimatedDirection = FingerDirection.verticalUp;\n } else if (max_dist_y === Math.abs(start_mid_y_dist)) {\n if (start_mid_y_dist < 0) estimatedDirection = FingerDirection.verticalDown;\n else estimatedDirection = FingerDirection.verticalUp;\n } else {\n if (mid_end_y_dist < 0) estimatedDirection = FingerDirection.verticalDown;\n else estimatedDirection = FingerDirection.verticalUp;\n }\n return estimatedDirection;\n}\n\nfunction estimateDiagonalDirection(start_end_y_dist, start_mid_y_dist, mid_end_y_dist, max_dist_y, start_end_x_dist, start_mid_x_dist, mid_end_x_dist, max_dist_x) {\n let estimatedDirection;\n const reqd_vertical_direction = estimateVerticalDirection(start_end_y_dist, start_mid_y_dist, mid_end_y_dist, max_dist_y);\n const reqd_horizontal_direction = estimateHorizontalDirection(start_end_x_dist, start_mid_x_dist, mid_end_x_dist, max_dist_x);\n if (reqd_vertical_direction === FingerDirection.verticalUp) {\n if (reqd_horizontal_direction === FingerDirection.horizontalLeft) estimatedDirection = FingerDirection.diagonalUpLeft;\n else estimatedDirection = FingerDirection.diagonalUpRight;\n } else {\n if (reqd_horizontal_direction === FingerDirection.horizontalLeft) estimatedDirection = FingerDirection.diagonalDownLeft;\n else estimatedDirection = FingerDirection.diagonalDownRight;\n }\n return estimatedDirection;\n}\n\nfunction calculateFingerDirection(startPoint, midPoint, endPoint, fingerSlopes) {\n const start_mid_x_dist = startPoint[0] - midPoint[0];\n const start_end_x_dist = startPoint[0] - endPoint[0];\n const mid_end_x_dist = midPoint[0] - endPoint[0];\n const start_mid_y_dist = startPoint[1] - midPoint[1];\n const start_end_y_dist = startPoint[1] - endPoint[1];\n const mid_end_y_dist = midPoint[1] - endPoint[1];\n const max_dist_x = Math.max(Math.abs(start_mid_x_dist), Math.abs(start_end_x_dist), Math.abs(mid_end_x_dist));\n const max_dist_y = Math.max(Math.abs(start_mid_y_dist), Math.abs(start_end_y_dist), Math.abs(mid_end_y_dist));\n let voteVertical = 0.0;\n let voteDiagonal = 0.0;\n let voteHorizontal = 0.0;\n const start_end_x_y_dist_ratio = max_dist_y / (max_dist_x + 0.00001);\n if (start_end_x_y_dist_ratio > 1.5) voteVertical += options.DISTANCE_VOTE_POWER;\n else if (start_end_x_y_dist_ratio > 0.66) voteDiagonal += options.DISTANCE_VOTE_POWER;\n else voteHorizontal += options.DISTANCE_VOTE_POWER;\n const start_mid_dist = Math.sqrt(start_mid_x_dist * start_mid_x_dist + start_mid_y_dist * start_mid_y_dist);\n const start_end_dist = Math.sqrt(start_end_x_dist * start_end_x_dist + start_end_y_dist * start_end_y_dist);\n const mid_end_dist = Math.sqrt(mid_end_x_dist * mid_end_x_dist + mid_end_y_dist * mid_end_y_dist);\n const max_dist = Math.max(start_mid_dist, start_end_dist, mid_end_dist);\n let calc_start_point_x = startPoint[0];\n let calc_start_point_y = startPoint[1];\n let calc_end_point_x = endPoint[0];\n let calc_end_point_y = endPoint[1];\n if (max_dist === start_mid_dist) {\n calc_end_point_x = endPoint[0];\n calc_end_point_y = endPoint[1];\n } else if (max_dist === mid_end_dist) {\n calc_start_point_x = midPoint[0];\n calc_start_point_y = midPoint[1];\n }\n const calcStartPoint = [calc_start_point_x, calc_start_point_y];\n const calcEndPoint = [calc_end_point_x, calc_end_point_y];\n const totalAngle = getSlopes(calcStartPoint, calcEndPoint);\n const votes = angleOrientationAt(totalAngle, options.TOTAL_ANGLE_VOTE_POWER);\n voteVertical += votes[0];\n voteDiagonal += votes[1];\n voteHorizontal += votes[2];\n for (const fingerSlope of fingerSlopes) {\n const fingerVotes = angleOrientationAt(fingerSlope, options.SINGLE_ANGLE_VOTE_POWER);\n voteVertical += fingerVotes[0];\n voteDiagonal += fingerVotes[1];\n voteHorizontal += fingerVotes[2];\n }\n // in case of tie, highest preference goes to Vertical,\n // followed by horizontal and then diagonal\n let estimatedDirection;\n if (voteVertical === Math.max(voteVertical, voteDiagonal, voteHorizontal)) {\n estimatedDirection = estimateVerticalDirection(start_end_y_dist, start_mid_y_dist, mid_end_y_dist, max_dist_y);\n } else if (voteHorizontal === Math.max(voteDiagonal, voteHorizontal)) {\n estimatedDirection = estimateHorizontalDirection(start_end_x_dist, start_mid_x_dist, mid_end_x_dist, max_dist_x);\n } else {\n estimatedDirection = estimateDiagonalDirection(start_end_y_dist, start_mid_y_dist, mid_end_y_dist, max_dist_y, start_end_x_dist, start_mid_x_dist, mid_end_x_dist, max_dist_x);\n }\n return estimatedDirection;\n}\n\nfunction estimate(landmarks) {\n // step 1: calculate slopes\n const slopesXY: number[][] = [];\n const slopesYZ: number[][] = [];\n const fingerCurls: number[] = [];\n const fingerDirections: number[] = [];\n if (!landmarks) return { curls: fingerCurls, directions: fingerDirections };\n\n // step 1: calculate slopes\n for (const finger of Finger.all) {\n const points = Finger.getPoints(finger);\n const slopeAtXY: number[] = [];\n const slopeAtYZ: number[] = [];\n for (const point of points) {\n const point1 = landmarks[point[0]];\n const point2 = landmarks[point[1]];\n // calculate single slope\n const slopes = getSlopes(point1, point2);\n const slopeXY = slopes[0];\n const slopeYZ = slopes[1];\n slopeAtXY.push(slopeXY);\n slopeAtYZ.push(slopeYZ);\n }\n slopesXY.push(slopeAtXY);\n slopesYZ.push(slopeAtYZ);\n }\n\n // step 2: calculate orientations\n for (const finger of Finger.all) {\n // start finger predictions from palm - except for thumb\n const pointIndexAt = (finger === Finger.thumb) ? 1 : 0;\n const fingerPointsAt = Finger.getPoints(finger);\n const startPoint = landmarks[fingerPointsAt[pointIndexAt][0]];\n const midPoint = landmarks[fingerPointsAt[pointIndexAt + 1][1]];\n const endPoint = landmarks[fingerPointsAt[3][1]];\n // check if finger is curled\n const fingerCurled = estimateFingerCurl(startPoint, midPoint, endPoint);\n const fingerPosition = calculateFingerDirection(startPoint, midPoint, endPoint, slopesXY[finger].slice(pointIndexAt));\n fingerCurls[finger] = fingerCurled;\n fingerDirections[finger] = fingerPosition;\n }\n return { curls: fingerCurls, directions: fingerDirections };\n}\n\nexport function analyze(keypoints) { // get estimations of curl / direction for each finger\n if (!keypoints || keypoints.length === 0) return null;\n const estimatorRes = estimate(keypoints);\n const landmarks = {};\n for (const fingerIdx of Finger.all) {\n landmarks[Finger.getName(fingerIdx)] = {\n curl: FingerCurl.getName(estimatorRes.curls[fingerIdx]),\n direction: FingerDirection.getName(estimatorRes.directions[fingerIdx]),\n };\n }\n return landmarks;\n}\n\nexport function match(keypoints) { // compare gesture description to each known gesture\n const poses: { name: string, confidence: number }[] = [];\n if (!keypoints || keypoints.length === 0) return poses;\n const estimatorRes = estimate(keypoints);\n for (const gesture of Gestures) {\n const confidence = gesture.matchAgainst(estimatorRes.curls, estimatorRes.directions);\n if (confidence >= minConfidence) poses.push({ name: gesture.name, confidence });\n }\n return poses;\n}\n", "/**\n * HandPose model implementation\n *\n * Based on: [**MediaPipe HandPose**](https://drive.google.com/file/d/1sv4sSb9BSNVZhLzxXJ0jBv9DqD-4jnAz/view)\n */\n\nimport { log } from '../util/util';\nimport * as handdetector from './handposedetector';\nimport * as handpipeline from './handposepipeline';\nimport * as fingerPose from './fingerpose';\nimport { loadModel } from '../tfjs/load';\nimport type { HandResult, Box, Point } from '../result';\nimport type { Tensor, GraphModel } from '../tfjs/types';\nimport type { Config } from '../config';\nimport { env } from '../util/env';\n\nconst meshAnnotations = {\n thumb: [1, 2, 3, 4],\n index: [5, 6, 7, 8],\n middle: [9, 10, 11, 12],\n ring: [13, 14, 15, 16],\n pinky: [17, 18, 19, 20],\n palm: [0],\n};\n\nlet handDetectorModel: GraphModel | null;\nlet handPoseModel: GraphModel | null;\nlet handPipeline: handpipeline.HandPipeline;\n\nexport async function predict(input: Tensor, config: Config): Promise {\n const predictions = await handPipeline.estimateHands(input, config);\n if (!predictions) return [];\n const hands: HandResult[] = [];\n for (let i = 0; i < predictions.length; i++) {\n const annotations = {};\n if (predictions[i].landmarks) {\n for (const key of Object.keys(meshAnnotations)) {\n annotations[key] = meshAnnotations[key].map((index) => predictions[i].landmarks[index]);\n }\n }\n const keypoints = predictions[i].landmarks as unknown as Point[];\n let box: Box = [Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER, 0, 0]; // maximums so conditionals work\n let boxRaw: Box = [0, 0, 0, 0];\n if (keypoints && keypoints.length > 0) { // if we have landmarks, calculate box based on landmarks\n for (const pt of keypoints) {\n if (pt[0] < box[0]) box[0] = pt[0];\n if (pt[1] < box[1]) box[1] = pt[1];\n if (pt[0] > box[2]) box[2] = pt[0];\n if (pt[1] > box[3]) box[3] = pt[1];\n }\n box[2] -= box[0];\n box[3] -= box[1];\n boxRaw = [box[0] / (input.shape[2] || 0), box[1] / (input.shape[1] || 0), box[2] / (input.shape[2] || 0), box[3] / (input.shape[1] || 0)];\n } else { // otherwise use box from prediction\n box = predictions[i].box ? [\n Math.trunc(Math.max(0, predictions[i].box.topLeft[0])),\n Math.trunc(Math.max(0, predictions[i].box.topLeft[1])),\n Math.trunc(Math.min((input.shape[2] || 0), predictions[i].box.bottomRight[0]) - Math.max(0, predictions[i].box.topLeft[0])),\n Math.trunc(Math.min((input.shape[1] || 0), predictions[i].box.bottomRight[1]) - Math.max(0, predictions[i].box.topLeft[1])),\n ] : [0, 0, 0, 0];\n boxRaw = [\n (predictions[i].box.topLeft[0]) / (input.shape[2] || 0),\n (predictions[i].box.topLeft[1]) / (input.shape[1] || 0),\n (predictions[i].box.bottomRight[0] - predictions[i].box.topLeft[0]) / (input.shape[2] || 0),\n (predictions[i].box.bottomRight[1] - predictions[i].box.topLeft[1]) / (input.shape[1] || 0),\n ];\n }\n const landmarks = fingerPose.analyze(keypoints);\n hands.push({\n id: i,\n score: Math.round(100 * predictions[i].confidence) / 100,\n boxScore: Math.round(100 * predictions[i].boxConfidence) / 100,\n fingerScore: Math.round(100 * predictions[i].fingerConfidence) / 100,\n label: 'hand',\n box,\n boxRaw,\n keypoints,\n annotations: annotations as HandResult['annotations'],\n landmarks: landmarks as HandResult['landmarks'],\n });\n }\n return hands;\n}\n\nexport async function load(config: Config): Promise<[GraphModel | null, GraphModel | null]> {\n if (env.initial) {\n handDetectorModel = null;\n handPoseModel = null;\n }\n if (!handDetectorModel || !handPoseModel) {\n [handDetectorModel, handPoseModel] = await Promise.all([\n config.hand.enabled ? loadModel(config.hand.detector?.modelPath) : null,\n config.hand.landmarks ? loadModel(config.hand.skeleton?.modelPath) : null,\n ]);\n } else {\n if (config.debug) log('cached model:', handDetectorModel['modelUrl']);\n if (config.debug) log('cached model:', handPoseModel['modelUrl']);\n }\n const handDetector = handDetectorModel ? new handdetector.HandDetector(handDetectorModel) : undefined;\n if (handDetector && handPoseModel) handPipeline = new handpipeline.HandPipeline(handDetector, handPoseModel);\n return [handDetectorModel, handPoseModel];\n}\n", "/**\n * HandTrack model implementation\n *\n * Based on:\n * - Hand Detection & Skeleton: [**MediaPipe HandPose**](https://drive.google.com/file/d/1sv4sSb9BSNVZhLzxXJ0jBv9DqD-4jnAz/view)\n * - Hand Tracking: [**HandTracking**](https://github.com/victordibia/handtracking)\n */\n\nimport { log, now } from '../util/util';\nimport * as box from '../util/box';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport { loadModel } from '../tfjs/load';\nimport type { HandResult, HandType, Box, Point } from '../result';\nimport type { GraphModel, Tensor } from '../tfjs/types';\nimport type { Config } from '../config';\nimport { env } from '../util/env';\nimport * as fingerPose from './fingerpose';\nimport { fakeOps } from '../tfjs/backend';\nimport { constants } from '../tfjs/constants';\n\nconst models: [GraphModel | null, GraphModel | null] = [null, null];\nconst modelOutputNodes = ['StatefulPartitionedCall/Postprocessor/Slice', 'StatefulPartitionedCall/Postprocessor/ExpandDims_1'];\n\nconst inputSize = [[0, 0], [0, 0]];\n\nconst classes = ['hand', 'fist', 'pinch', 'point', 'face', 'tip', 'pinchtip'];\nconst faceIndex = 4;\n\nconst boxExpandFact = 1.6;\nconst maxDetectorResolution = 512;\nconst detectorExpandFact = 1.4;\n\nlet skipped = Number.MAX_SAFE_INTEGER;\nlet lastTime = 0;\nlet outputSize: [number, number] = [0, 0];\n\ninterface HandDetectResult {\n id: number,\n score: number,\n box: Box,\n boxRaw: Box,\n label: HandType,\n}\n\nconst cache: {\n boxes: HandDetectResult[],\n hands: HandResult[];\n} = {\n boxes: [],\n hands: [],\n};\n\nconst fingerMap = {\n /*\n thumb: [0, 1, 2, 3, 4],\n index: [0, 5, 6, 7, 8],\n middle: [0, 9, 10, 11, 12],\n ring: [0, 13, 14, 15, 16],\n pinky: [0, 17, 18, 19, 20],\n palm: [0],\n */\n thumb: [1, 2, 3, 4],\n index: [5, 6, 7, 8],\n middle: [9, 10, 11, 12],\n ring: [13, 14, 15, 16],\n pinky: [17, 18, 19, 20],\n base: [0],\n palm: [0, 17, 13, 9, 5, 1, 0],\n};\n\nexport async function loadDetect(config: Config): Promise {\n // HandTrack Model: Original: TFJS Port: \n if (env.initial) models[0] = null;\n if (!models[0]) {\n // handtrack model has some kernel ops defined in model but those are never referenced and non-existent in tfjs\n // ideally need to prune the model itself\n fakeOps(['tensorlistreserve', 'enter', 'tensorlistfromtensor', 'merge', 'loopcond', 'switch', 'exit', 'tensorliststack', 'nextiteration', 'tensorlistsetitem', 'tensorlistgetitem', 'reciprocal', 'shape', 'split', 'where'], config);\n models[0] = await loadModel(config.hand.detector?.modelPath);\n const inputs = models[0]['executor'] ? Object.values(models[0].modelSignature['inputs']) : undefined;\n inputSize[0][0] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[1].size) : 0;\n inputSize[0][1] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : 0;\n } else if (config.debug) log('cached model:', models[0]['modelUrl']);\n return models[0];\n}\n\nexport async function loadSkeleton(config: Config): Promise {\n if (env.initial) models[1] = null;\n if (!models[1]) {\n models[1] = await loadModel(config.hand.skeleton?.modelPath);\n const inputs = models[1]['executor'] ? Object.values(models[1].modelSignature['inputs']) : undefined;\n inputSize[1][0] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[1].size) : 0;\n inputSize[1][1] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : 0;\n } else if (config.debug) log('cached model:', models[1]['modelUrl']);\n return models[1];\n}\n\nexport async function load(config: Config): Promise<[GraphModel | null, GraphModel | null]> {\n if (!models[0]) await loadDetect(config);\n if (!models[1]) await loadSkeleton(config);\n return models;\n}\n\nasync function detectHands(input: Tensor, config: Config): Promise {\n const hands: HandDetectResult[] = [];\n if (!input || !models[0]) return hands;\n const t: Record = {};\n const ratio = (input.shape[2] || 1) / (input.shape[1] || 1);\n const height = Math.min(Math.round((input.shape[1] || 0) / 8) * 8, maxDetectorResolution); // use dynamic input size but cap at 512\n const width = Math.round(height * ratio / 8) * 8;\n t.resize = tf.image.resizeBilinear(input, [height, width]); // todo: resize with padding\n t.cast = tf.cast(t.resize, 'int32');\n [t.rawScores, t.rawBoxes] = await models[0].executeAsync(t.cast, modelOutputNodes) as Tensor[];\n t.boxes = tf.squeeze(t.rawBoxes, [0, 2]);\n t.scores = tf.squeeze(t.rawScores, [0]);\n const classScores: Tensor[] = tf.unstack(t.scores, 1); // unstack scores based on classes\n tf.dispose(classScores[faceIndex]);\n classScores.splice(faceIndex, 1); // remove faces\n t.filtered = tf.stack(classScores, 1); // restack\n tf.dispose(classScores);\n // t.filtered = t.scores;\n t.max = tf.max(t.filtered, 1); // max overall score\n t.argmax = tf.argMax(t.filtered, 1); // class index of max overall score\n let id = 0;\n t.nms = await tf.image.nonMaxSuppressionAsync(t.boxes, t.max, (config.hand.maxDetected || 0) + 1, config.hand.iouThreshold || 0, config.hand.minConfidence || 1);\n const nms = await t.nms.data();\n const scores = await t.max.data();\n const classNum = await t.argmax.data();\n for (const nmsIndex of Array.from(nms)) { // generates results for each class\n const boxSlice = tf.slice(t.boxes, nmsIndex, 1);\n const boxYX = await boxSlice.data();\n tf.dispose(boxSlice);\n const boxData: Box = [boxYX[1], boxYX[0], boxYX[3] - boxYX[1], boxYX[2] - boxYX[0]]; // yx box reshaped to standard box\n const boxRaw: Box = box.scale(boxData, detectorExpandFact);\n const boxFull: Box = [Math.trunc(boxData[0] * outputSize[0]), Math.trunc(boxData[1] * outputSize[1]), Math.trunc(boxData[2] * outputSize[0]), Math.trunc(boxData[3] * outputSize[1])];\n const score = scores[nmsIndex];\n const label = classes[classNum[nmsIndex]] as HandType;\n const hand: HandDetectResult = { id: id++, score, box: boxFull, boxRaw, label };\n hands.push(hand);\n }\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n hands.sort((a, b) => b.score - a.score);\n if (hands.length > (config.hand.maxDetected || 1)) hands.length = (config.hand.maxDetected || 1);\n return hands;\n}\n\nasync function detectFingers(input: Tensor, h: HandDetectResult, config: Config): Promise {\n const hand: HandResult = { // initial values inherited from hand detect\n id: h.id,\n score: Math.round(100 * h.score) / 100,\n boxScore: Math.round(100 * h.score) / 100,\n fingerScore: 0,\n box: h.box,\n boxRaw: h.boxRaw,\n label: h.label,\n keypoints: [],\n landmarks: {} as HandResult['landmarks'],\n annotations: {} as HandResult['annotations'],\n };\n if (input && models[1] && config.hand.landmarks && h.score > (config.hand.minConfidence || 0)) {\n const t: Record = {};\n const boxCrop = [h.boxRaw[1], h.boxRaw[0], h.boxRaw[3] + h.boxRaw[1], h.boxRaw[2] + h.boxRaw[0]] as Box;\n t.crop = tf.image.cropAndResize(input, [boxCrop], [0], [inputSize[1][0], inputSize[1][1]], 'bilinear');\n t.div = tf.div(t.crop, constants.tf255);\n [t.score, t.keypoints] = models[1].execute(t.div, ['Identity_1', 'Identity']) as Tensor[];\n const rawScore = (await t.score.data())[0];\n const score = (100 - Math.trunc(100 / (1 + Math.exp(rawScore)))) / 100; // reverse sigmoid value\n if (score >= (config.hand.minConfidence || 0)) {\n hand.fingerScore = score;\n t.reshaped = tf.reshape(t.keypoints, [-1, 3]);\n const coordsData: Point[] = await t.reshaped.array() as Point[];\n const coordsRaw: Point[] = coordsData.map((kpt) => [kpt[0] / inputSize[1][1], kpt[1] / inputSize[1][0], (kpt[2] || 0)]);\n const coordsNorm: Point[] = coordsRaw.map((kpt) => [kpt[0] * h.boxRaw[2], kpt[1] * h.boxRaw[3], (kpt[2] || 0)]);\n hand.keypoints = (coordsNorm).map((kpt) => [outputSize[0] * (kpt[0] + h.boxRaw[0]), outputSize[1] * (kpt[1] + h.boxRaw[1]), (kpt[2] || 0)]);\n hand.landmarks = fingerPose.analyze(hand.keypoints) as HandResult['landmarks']; // calculate finger gestures\n for (const key of Object.keys(fingerMap)) { // map keypoints to per-finger annotations\n hand.annotations[key] = fingerMap[key].map((index: number) => (hand.landmarks && hand.keypoints[index] ? hand.keypoints[index] : null));\n }\n }\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n }\n return hand;\n}\n\nexport async function predict(input: Tensor, config: Config): Promise {\n if (!models[0]?.['executor'] || !models[1]?.['executor'] || !models[0].inputs[0].shape || !models[1].inputs[0].shape) return []; // something is wrong with the model\n outputSize = [input.shape[2] || 0, input.shape[1] || 0];\n skipped++; // increment skip frames\n const skipTime = (config.hand.skipTime || 0) > (now() - lastTime);\n const skipFrame = skipped < (config.hand.skipFrames || 0);\n if (config.skipAllowed && skipTime && skipFrame) {\n return cache.hands; // return cached results without running anything\n }\n return new Promise(async (resolve) => {\n const skipTimeExtended = 3 * (config.hand.skipTime || 0) > (now() - lastTime);\n const skipFrameExtended = skipped < 3 * (config.hand.skipFrames || 0);\n if (config.skipAllowed && cache.hands.length === config.hand.maxDetected) { // we have all detected hands so we're definitely skipping\n cache.hands = await Promise.all(cache.boxes.map((handBox) => detectFingers(input, handBox, config)));\n } else if (config.skipAllowed && skipTimeExtended && skipFrameExtended && cache.hands.length > 0) { // we have some cached results: maybe not enough but anyhow continue for bit longer\n cache.hands = await Promise.all(cache.boxes.map((handBox) => detectFingers(input, handBox, config)));\n } else { // finally rerun detector\n cache.boxes = await detectHands(input, config);\n lastTime = now();\n cache.hands = await Promise.all(cache.boxes.map((handBox) => detectFingers(input, handBox, config)));\n skipped = 0;\n }\n\n const oldCache = [...cache.boxes];\n cache.boxes.length = 0; // reset cache\n if (config.cacheSensitivity > 0) {\n for (let i = 0; i < cache.hands.length; i++) {\n const boxKpt = box.square(cache.hands[i].keypoints, outputSize);\n if (boxKpt.box[2] / (input.shape[2] || 1) > 0.05 && boxKpt.box[3] / (input.shape[1] || 1) > 0.05 && cache.hands[i].fingerScore && cache.hands[i].fingerScore > (config.hand.minConfidence || 0)) {\n const boxScale = box.scale(boxKpt.box, boxExpandFact);\n const boxScaleRaw = box.scale(boxKpt.boxRaw, boxExpandFact);\n // const boxCrop = box.crop(boxScaleRaw);\n cache.boxes.push({ ...oldCache[i], box: boxScale, boxRaw: boxScaleRaw });\n }\n }\n }\n for (let i = 0; i < cache.hands.length; i++) { // replace detected boxes with calculated boxes in final output\n const bbox = box.calc(cache.hands[i].keypoints, outputSize);\n cache.hands[i].box = bbox.box;\n cache.hands[i].boxRaw = bbox.boxRaw;\n }\n resolve(cache.hands);\n });\n}\n", "/**\n * InsightFace model implementation\n *\n * Based on: [**DeepInsight InsightFace**](https://github.com/deepinsight/insightface)\n *\n * Alternative face embedding detection\n */\n\nimport { log, now } from '../util/util';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport { loadModel } from '../tfjs/load';\nimport type { Tensor, GraphModel } from '../tfjs/types';\nimport type { Config } from '../config';\nimport { env } from '../util/env';\n\nlet model: GraphModel | null;\nconst last: number[][] = [];\nlet lastCount = 0;\nlet lastTime = 0;\nlet skipped = Number.MAX_SAFE_INTEGER;\n\nexport async function load(config: Config): Promise {\n if (env.initial) model = null;\n if (!model) model = await loadModel(config.face['insightface'].modelPath);\n else if (config.debug) log('cached model:', model['modelUrl']);\n return model;\n}\n\nexport async function predict(input: Tensor, config: Config, idx, count): Promise {\n if (!model?.['executor']) return [];\n const skipFrame = skipped < (config.face['insightface']?.skipFrames || 0);\n const skipTime = (config.face['insightface']?.skipTime || 0) > (now() - lastTime);\n if (config.skipAllowed && skipTime && skipFrame && (lastCount === count) && last[idx]) {\n skipped++;\n return last[idx];\n }\n return new Promise(async (resolve) => {\n let data: number[] = [];\n if (config.face['insightface']?.enabled && model?.inputs[0].shape) {\n const t: Record = {};\n t.crop = tf.image.resizeBilinear(input, [model.inputs[0].shape[2], model.inputs[0].shape[1]], false); // just resize to fit the embedding model\n // do a tight crop of image and resize it to fit the model\n // const box = [[0.05, 0.15, 0.85, 0.85]]; // empyrical values for top, left, bottom, right\n // t.crop = tf.image.cropAndResize(input, box, [0], [model.inputs[0].shape[2], model.inputs[0].shape[1]]);\n t.data = model.execute(t.crop) as Tensor;\n const output = await t.data.data();\n data = Array.from(output); // convert typed array to simple array\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n }\n last[idx] = data;\n lastCount = count;\n lastTime = now();\n resolve(data);\n });\n}\n", "/**\n * Anti-spoofing model implementation\n */\n\nimport { log, now } from '../util/util';\nimport { loadModel } from '../tfjs/load';\nimport type { Config } from '../config';\nimport type { GraphModel, Tensor } from '../tfjs/types';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport { env } from '../util/env';\n\nlet model: GraphModel | null;\nconst cached: number[] = [];\nlet skipped = Number.MAX_SAFE_INTEGER;\nlet lastCount = 0;\nlet lastTime = 0;\n\nexport async function load(config: Config): Promise {\n if (env.initial) model = null;\n if (!model) model = await loadModel(config.face.liveness?.modelPath);\n else if (config.debug) log('cached model:', model['modelUrl']);\n return model;\n}\n\nexport async function predict(image: Tensor, config: Config, idx: number, count: number): Promise {\n if (!model?.['executor']) return 0;\n const skipTime = (config.face.liveness?.skipTime || 0) > (now() - lastTime);\n const skipFrame = skipped < (config.face.liveness?.skipFrames || 0);\n if (config.skipAllowed && skipTime && skipFrame && (lastCount === count) && cached[idx]) {\n skipped++;\n return cached[idx];\n }\n skipped = 0;\n return new Promise(async (resolve) => {\n const resize = tf.image.resizeBilinear(image, [model?.inputs[0].shape ? model.inputs[0].shape[2] : 0, model?.inputs[0].shape ? model.inputs[0].shape[1] : 0], false);\n const res = model?.execute(resize) as Tensor;\n const num = (await res.data())[0];\n cached[idx] = Math.round(100 * num) / 100;\n lastCount = count;\n lastTime = now();\n tf.dispose([resize, res]);\n resolve(cached[idx]);\n });\n}\n", "/**\n * Image segmentation for body detection model\n *\n * Based on:\n * - [**MediaPipe Meet**](https://drive.google.com/file/d/1lnP1bRi9CSqQQXUHa13159vLELYDgDu0/preview)\n */\n\nimport { log } from '../util/util';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport { loadModel } from '../tfjs/load';\nimport { constants } from '../tfjs/constants';\nimport type { GraphModel, Tensor } from '../tfjs/types';\nimport type { Config } from '../config';\nimport { env } from '../util/env';\n\nlet model: GraphModel;\n\nexport async function load(config: Config): Promise {\n if (!model || env.initial) model = await loadModel(config.segmentation.modelPath);\n else if (config.debug) log('cached model:', model['modelUrl']);\n return model;\n}\n\nexport async function predict(input: Tensor, config: Config): Promise {\n if (!model) model = await load(config);\n if (!model?.['executor'] || !model?.inputs?.[0].shape) return null; // something is wrong with the model\n const t: Record = {};\n t.resize = tf.image.resizeBilinear(input, [model.inputs[0].shape ? model.inputs[0].shape[1] : 0, model.inputs[0].shape ? model.inputs[0].shape[2] : 0], false);\n t.norm = tf.div(t.resize, constants.tf255);\n t.res = model.execute(t.norm) as Tensor;\n t.squeeze = tf.squeeze(t.res, 0);\n // t.softmax = tf.softmax(t.squeeze); // model meet has two channels for fg and bg\n [t.bgRaw, t.fgRaw] = tf.unstack(t.squeeze, 2);\n // t.bg = tf.softmax(t.bgRaw); // we can ignore bg channel\n t.fg = tf.softmax(t.fgRaw);\n t.mul = tf.mul(t.fg, constants.tf255);\n t.expand = tf.expandDims(t.mul, 2);\n t.output = tf.image.resizeBilinear(t.expand, [input.shape[1], input.shape[2]]);\n let rgba: Tensor;\n switch (config.segmentation.mode || 'default') {\n case 'default':\n t.input = tf.squeeze(input);\n t.concat = tf.concat([t.input, t.output], -1);\n rgba = tf.cast(t.concat, 'int32'); // combined original with alpha\n break;\n case 'alpha':\n rgba = tf.cast(t.output, 'int32'); // just get alpha value from model\n break;\n default:\n rgba = tf.tensor(0);\n }\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n return rgba;\n}\n", "/**\n * MobileFaceNet model implementation\n *\n * Based on: [**BecauseofAI MobileFace**](https://github.com/becauseofAI/MobileFace)\n *\n * Obsolete and replaced by `faceres` that performs age/gender/descriptor analysis\n */\n\nimport { log, now } from '../util/util';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport { loadModel } from '../tfjs/load';\nimport type { Tensor, GraphModel } from '../tfjs/types';\nimport type { Config } from '../config';\nimport { env } from '../util/env';\n\nlet model: GraphModel | null;\nconst last: number[][] = [];\nlet lastCount = 0;\nlet lastTime = 0;\nlet skipped = Number.MAX_SAFE_INTEGER;\n\nexport async function load(config: Config): Promise {\n if (env.initial) model = null;\n if (!model) model = await loadModel(config.face['mobilefacenet']?.modelPath);\n else if (config.debug) log('cached model:', model['modelUrl']);\n return model;\n}\n\n/*\n// convert to black&white to avoid colorization impact\nconst rgb = [0.2989, 0.5870, 0.1140]; // factors for red/green/blue colors when converting to grayscale: https://www.mathworks.com/help/matlab/ref/rgb2gray.html\nconst [red, green, blue] = tf.split(crop, 3, 3);\nconst redNorm = tf.mul(red, rgb[0]);\nconst greenNorm = tf.mul(green, rgb[1]);\nconst blueNorm = tf.mul(blue, rgb[2]);\nconst grayscale = tf.addN([redNorm, greenNorm, blueNorm]);\nconst merge = tf.stack([grayscale, grayscale, grayscale], 3).squeeze(4);\n\n// optional increase image contrast\n// or do it per-channel so mean is done on each channel\n// or do it based on histogram\nconst mean = merge.mean();\nconst factor = 5;\nconst contrast = merge.sub(mean).mul(factor).add(mean);\n*/\n\nexport async function predict(input: Tensor, config: Config, idx, count): Promise {\n if (!model?.['executor']) return [];\n const skipFrame = skipped < (config.face['mobilefacenet']?.skipFrames || 0);\n const skipTime = (config.face['mobilefacenet']?.skipTime || 0) > (now() - lastTime);\n if (config.skipAllowed && skipTime && skipFrame && (lastCount === count) && last[idx]) {\n skipped++;\n return last[idx];\n }\n return new Promise(async (resolve) => {\n let data: number[] = [];\n if (config.face['mobilefacenet']?.enabled && model?.inputs[0].shape) {\n const t: Record = {};\n t.crop = tf.image.resizeBilinear(input, [model.inputs[0].shape[2], model.inputs[0].shape[1]], false); // just resize to fit the embedding model\n // do a tight crop of image and resize it to fit the model\n // const box = [[0.05, 0.15, 0.85, 0.85]]; // empyrical values for top, left, bottom, right\n // t.crop = tf.image.cropAndResize(input, box, [0], [model.inputs[0].shape[2], model.inputs[0].shape[1]]);\n t.data = model.execute(t.crop) as Tensor;\n /*\n // optional normalize outputs with l2 normalization\n const scaled = tf.tidy(() => {\n const l2 = res.norm('euclidean');\n const scale = res.div(l2);\n return scale;\n });\n\n // optional reduce feature vector complexity\n const reshape = tf.reshape(res, [128, 2]); // split 256 vectors into 128 x 2\n const reduce = reshape.logSumExp(1); // reduce 2nd dimension by calculating logSumExp on it\n */\n const output = await t.data.data();\n data = Array.from(output); // convert typed array to simple array\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n }\n last[idx] = data;\n lastCount = count;\n lastTime = now();\n resolve(data);\n });\n}\n", "export const kpt: string[] = [ // used to create part labels\n 'nose',\n 'leftEye',\n 'rightEye',\n 'leftEar',\n 'rightEar',\n 'leftShoulder',\n 'rightShoulder',\n 'leftElbow',\n 'rightElbow',\n 'leftWrist',\n 'rightWrist',\n 'leftHip',\n 'rightHip',\n 'leftKnee',\n 'rightKnee',\n 'leftAnkle',\n 'rightAnkle',\n];\n\nexport const horizontal: string[][] = [ // used to fix left vs right\n ['leftEye', 'rightEye'],\n ['leftEar', 'rightEar'],\n ['leftShoulder', 'rightShoulder'],\n ['leftElbow', 'rightElbow'],\n ['leftWrist', 'rightWrist'],\n ['leftHip', 'rightHip'],\n ['leftKnee', 'rightKnee'],\n ['leftAnkle', 'rightAnkle'],\n];\n\nexport const vertical: string[][] = [ // used to remove unlikely keypoint positions\n ['leftKnee', 'leftShoulder'],\n ['rightKnee', 'rightShoulder'],\n ['leftAnkle', 'leftKnee'],\n ['rightAnkle', 'rightKnee'],\n];\n\nexport const relative: string[][][] = [ // used to match relative body parts\n [['leftHip', 'rightHip'], ['leftShoulder', 'rightShoulder']],\n [['leftElbow', 'rightElbow'], ['leftShoulder', 'rightShoulder']],\n];\n\nexport const connected: Record = { // used to create body outline in annotations\n leftLeg: ['leftHip', 'leftKnee', 'leftAnkle'],\n rightLeg: ['rightHip', 'rightKnee', 'rightAnkle'],\n torso: ['leftShoulder', 'rightShoulder', 'rightHip', 'leftHip', 'leftShoulder'],\n leftArm: ['leftShoulder', 'leftElbow', 'leftWrist'],\n rightArm: ['rightShoulder', 'rightElbow', 'rightWrist'],\n head: [],\n};\n", "import type { BodyKeypoint, BodyResult } from '../result';\nimport * as box from '../util/box';\nimport * as coords from './movenetcoords';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport type { Tensor } from '../tfjs/types';\n\nconst maxJitter = 0.005; // default allowed jitter is within 0.5%\n\nconst cache: {\n keypoints: BodyKeypoint[],\n padding: [number, number][];\n} = {\n keypoints: [],\n padding: [[0, 0], [0, 0], [0, 0], [0, 0]],\n};\n\nexport function bodyParts(body: BodyResult) { // model sometimes mixes up left vs right keypoints so we fix them\n for (const pair of coords.horizontal) { // fix body parts left vs right\n const left = body.keypoints.findIndex((kp) => kp.part === pair[0]);\n const right = body.keypoints.findIndex((kp) => kp.part === pair[1]);\n if (body.keypoints[left] && body.keypoints[right]) {\n if (body.keypoints[left].position[0] < body.keypoints[right].position[0]) {\n const tmp = body.keypoints[left];\n body.keypoints[left] = body.keypoints[right];\n body.keypoints[right] = tmp;\n }\n }\n }\n for (const pair of coords.vertical) { // remove body parts with improbable vertical position\n const lower = body.keypoints.findIndex((kp) => (kp && kp.part === pair[0]));\n const higher = body.keypoints.findIndex((kp) => (kp && kp.part === pair[1]));\n if (body.keypoints[lower] && body.keypoints[higher]) {\n if (body.keypoints[lower].position[1] < body.keypoints[higher].position[1]) {\n body.keypoints.splice(lower, 1);\n }\n }\n }\n for (const [pair, compare] of coords.relative) { // rearrange body parts according to their relative position\n const left = body.keypoints.findIndex((kp) => (kp && kp.part === pair[0]));\n const right = body.keypoints.findIndex((kp) => (kp && kp.part === pair[1]));\n const leftTo = body.keypoints.findIndex((kp) => (kp && kp.part === compare[0]));\n const rightTo = body.keypoints.findIndex((kp) => (kp && kp.part === compare[1]));\n if (!body.keypoints[leftTo] || !body.keypoints[rightTo]) continue; // only if we have both compare points\n const distanceLeft = body.keypoints[left] ? [\n Math.abs(body.keypoints[leftTo].position[0] - body.keypoints[left].position[0]),\n Math.abs(body.keypoints[rightTo].position[0] - body.keypoints[left].position[0]),\n ] : [0, 0];\n const distanceRight = body.keypoints[right] ? [\n Math.abs(body.keypoints[rightTo].position[0] - body.keypoints[right].position[0]),\n Math.abs(body.keypoints[leftTo].position[0] - body.keypoints[right].position[0]),\n ] : [0, 0];\n if (distanceLeft[0] > distanceLeft[1] || distanceRight[0] > distanceRight[1]) { // should flip keypoints\n const tmp = body.keypoints[left];\n body.keypoints[left] = body.keypoints[right];\n body.keypoints[right] = tmp;\n }\n }\n}\n\nexport function jitter(keypoints: BodyKeypoint[]): BodyKeypoint[] {\n for (let i = 0; i < keypoints.length; i++) {\n if (keypoints[i] && cache.keypoints[i]) {\n const diff = [Math.abs(keypoints[i].positionRaw[0] - cache.keypoints[i].positionRaw[0]), Math.abs(keypoints[i].positionRaw[1] - cache.keypoints[i].positionRaw[1])];\n if (diff[0] < maxJitter && diff[1] < maxJitter) {\n keypoints[i] = cache.keypoints[i]; // below jitter so replace keypoint\n } else {\n cache.keypoints[i] = keypoints[i]; // above jitter so update cache\n }\n } else {\n cache.keypoints[i] = keypoints[i]; // cache for keypoint doesnt exist so create it here\n }\n }\n return keypoints;\n}\n\nexport function padInput(input: Tensor, inputSize: number): Tensor {\n const t: Record = {};\n if (!input?.shape?.[1] || !input?.shape?.[2]) return input;\n cache.padding = [\n [0, 0], // dont touch batch\n [input.shape[2] > input.shape[1] ? Math.trunc((input.shape[2] - input.shape[1]) / 2) : 0, input.shape[2] > input.shape[1] ? Math.trunc((input.shape[2] - input.shape[1]) / 2) : 0], // height before&after\n [input.shape[1] > input.shape[2] ? Math.trunc((input.shape[1] - input.shape[2]) / 2) : 0, input.shape[1] > input.shape[2] ? Math.trunc((input.shape[1] - input.shape[2]) / 2) : 0], // width before&after\n [0, 0], // dont touch rbg\n ];\n t.pad = tf.pad(input, cache.padding);\n t.resize = tf.image.resizeBilinear(t.pad, [inputSize, inputSize]);\n const final = tf.cast(t.resize, 'int32');\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n return final;\n}\n\nexport function rescaleBody(body: BodyResult, outputSize: [number, number]): BodyResult {\n body.keypoints = body.keypoints.filter((kpt) => kpt?.position); // filter invalid keypoints\n for (const kpt of body.keypoints) {\n kpt.position = [\n kpt.position[0] * (outputSize[0] + cache.padding[2][0] + cache.padding[2][1]) / outputSize[0] - cache.padding[2][0],\n kpt.position[1] * (outputSize[1] + cache.padding[1][0] + cache.padding[1][1]) / outputSize[1] - cache.padding[1][0],\n ];\n kpt.positionRaw = [\n kpt.position[0] / outputSize[0], kpt.position[1] / outputSize[1],\n ];\n }\n const rescaledBoxes = box.calc(body.keypoints.map((pt) => pt.position), outputSize);\n body.box = rescaledBoxes.box;\n body.boxRaw = rescaledBoxes.boxRaw;\n return body;\n}\n", "/**\n * MoveNet model implementation\n *\n * Based on: [**MoveNet**](https://blog.tensorflow.org/2021/05/next-generation-pose-detection-with-movenet-and-tensorflowjs.html)\n */\n\nimport { log, now } from '../util/util';\nimport * as box from '../util/box';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport * as coords from './movenetcoords';\nimport * as fix from './movenetfix';\nimport { loadModel } from '../tfjs/load';\nimport type { BodyKeypoint, BodyResult, BodyLandmark, BodyAnnotation, Box, Point } from '../result';\nimport type { GraphModel, Tensor } from '../tfjs/types';\nimport type { Config } from '../config';\nimport { fakeOps } from '../tfjs/backend';\nimport { env } from '../util/env';\n\nlet model: GraphModel | null;\nlet inputSize = 0;\nlet skipped = Number.MAX_SAFE_INTEGER;\n// const boxExpandFact = 1.5; // increase to 150%\n\nconst cache: {\n boxes: Box[], // unused\n bodies: BodyResult[];\n last: number,\n} = {\n boxes: [],\n bodies: [],\n last: 0,\n};\n\nexport async function load(config: Config): Promise {\n if (env.initial) model = null;\n if (!model) {\n fakeOps(['size'], config);\n model = await loadModel(config.body.modelPath);\n } else if (config.debug) log('cached model:', model['modelUrl']);\n inputSize = (model?.['executor'] && model?.inputs?.[0].shape) ? model.inputs[0].shape[2] : 0;\n if (inputSize < 64) inputSize = 256;\n return model;\n}\n\nfunction parseSinglePose(res, config, image) {\n const kpt = res[0][0];\n const keypoints: BodyKeypoint[] = [];\n let score = 0;\n for (let id = 0; id < kpt.length; id++) {\n score = kpt[id][2];\n if (score > config.body.minConfidence) {\n const positionRaw: Point = [kpt[id][1], kpt[id][0]];\n keypoints.push({\n score: Math.round(100 * score) / 100,\n part: coords.kpt[id] as BodyLandmark,\n positionRaw,\n position: [ // normalized to input image size\n Math.round((image.shape[2] || 0) * positionRaw[0]),\n Math.round((image.shape[1] || 0) * positionRaw[1]),\n ],\n });\n }\n }\n score = keypoints.reduce((prev, curr) => (curr.score > prev ? curr.score : prev), 0);\n const bodies: BodyResult[] = [];\n const newBox = box.calc(keypoints.map((pt) => pt.position), [image.shape[2], image.shape[1]]);\n const annotations: Record = {};\n for (const [name, indexes] of Object.entries(coords.connected)) {\n const pt: Point[][] = [];\n for (let i = 0; i < indexes.length - 1; i++) {\n const pt0 = keypoints.find((kp) => kp.part === indexes[i]);\n const pt1 = keypoints.find((kp) => kp.part === indexes[i + 1]);\n if (pt0 && pt1 && pt0.score > (config.body.minConfidence || 0) && pt1.score > (config.body.minConfidence || 0)) pt.push([pt0.position, pt1.position]);\n }\n annotations[name] = pt;\n }\n const body: BodyResult = { id: 0, score, box: newBox.box, boxRaw: newBox.boxRaw, keypoints, annotations };\n fix.bodyParts(body);\n bodies.push(body);\n return bodies;\n}\n\nfunction parseMultiPose(res, config, image) {\n const bodies: BodyResult[] = [];\n for (let id = 0; id < res[0].length; id++) {\n const kpt = res[0][id];\n const totalScore = Math.round(100 * kpt[51 + 4]) / 100;\n if (totalScore > config.body.minConfidence) {\n const keypoints: BodyKeypoint[] = [];\n for (let i = 0; i < 17; i++) {\n const score = kpt[3 * i + 2];\n if (score > config.body.minConfidence) {\n const positionRaw: Point = [kpt[3 * i + 1], kpt[3 * i + 0]];\n keypoints.push({\n part: coords.kpt[i] as BodyLandmark,\n score: Math.round(100 * score) / 100,\n positionRaw,\n position: [Math.round((image.shape[2] || 0) * positionRaw[0]), Math.round((image.shape[1] || 0) * positionRaw[1])],\n });\n }\n }\n const newBox = box.calc(keypoints.map((pt) => pt.position), [image.shape[2], image.shape[1]]);\n // movenet-multipose has built-in box details\n // const boxRaw: Box = [kpt[51 + 1], kpt[51 + 0], kpt[51 + 3] - kpt[51 + 1], kpt[51 + 2] - kpt[51 + 0]];\n // const box: Box = [Math.trunc(boxRaw[0] * (image.shape[2] || 0)), Math.trunc(boxRaw[1] * (image.shape[1] || 0)), Math.trunc(boxRaw[2] * (image.shape[2] || 0)), Math.trunc(boxRaw[3] * (image.shape[1] || 0))];\n const annotations: Record = {} as Record;\n for (const [name, indexes] of Object.entries(coords.connected)) {\n const pt: Point[][] = [];\n for (let i = 0; i < indexes.length - 1; i++) {\n const pt0 = keypoints.find((kp) => kp.part === indexes[i]);\n const pt1 = keypoints.find((kp) => kp.part === indexes[i + 1]);\n if (pt0 && pt1 && pt0.score > (config.body.minConfidence || 0) && pt1.score > (config.body.minConfidence || 0)) pt.push([pt0.position, pt1.position]);\n }\n annotations[name] = pt;\n }\n const body: BodyResult = { id, score: totalScore, box: newBox.box, boxRaw: newBox.boxRaw, keypoints: [...keypoints], annotations };\n fix.bodyParts(body);\n bodies.push(body);\n }\n }\n bodies.sort((a, b) => b.score - a.score);\n if (bodies.length > config.body.maxDetected) bodies.length = config.body.maxDetected;\n return bodies;\n}\n\nexport async function predict(input: Tensor, config: Config): Promise {\n if (!model?.['executor'] || !model?.inputs?.[0].shape) return []; // something is wrong with the model\n if (!config.skipAllowed) cache.boxes.length = 0; // allowed to use cache or not\n skipped++; // increment skip frames\n const skipTime = (config.body.skipTime || 0) > (now() - cache.last);\n const skipFrame = skipped < (config.body.skipFrames || 0);\n if (config.skipAllowed && skipTime && skipFrame) {\n return cache.bodies; // return cached results without running anything\n }\n return new Promise(async (resolve) => {\n const t: Record = {};\n skipped = 0;\n // run detection on squared input and cached boxes\n /*\n cache.bodies = []; // reset bodies result\n if (cache.boxes.length >= (config.body.maxDetected || 0)) { // if we have enough cached boxes run detection using cache\n for (let i = 0; i < cache.boxes.length; i++) { // run detection based on cached boxes\n t.crop = tf.image.cropAndResize(input, [cache.boxes[i]], [0], [inputSize, inputSize], 'bilinear');\n t.cast = tf.cast(t.crop, 'int32');\n // t.input = prepareImage(input);\n t.res = model?.execute(t.cast) as Tensor;\n const res = await t.res.array();\n const newBodies = (t.res.shape[2] === 17) ? await parseSinglePose(res, config, input, cache.boxes[i]) : await parseMultiPose(res, config, input, cache.boxes[i]);\n cache.bodies = cache.bodies.concat(newBodies);\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n }\n }\n if (cache.bodies.length !== config.body.maxDetected) { // did not find enough bodies based on cached boxes so run detection on full frame\n t.input = prepareImage(input);\n t.res = model?.execute(t.input) as Tensor;\n const res = await t.res.array();\n cache.bodies = (t.res.shape[2] === 17) ? await parseSinglePose(res, config, input, [0, 0, 1, 1]) : await parseMultiPose(res, config, input, [0, 0, 1, 1]);\n for (const body of cache.bodies) rescaleBody(body, [input.shape[2] || 1, input.shape[1] || 1]);\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n }\n cache.boxes.length = 0; // reset cache\n for (let i = 0; i < cache.bodies.length; i++) {\n if (cache.bodies[i].keypoints.length > (coords.kpt.length / 2)) { // only update cache if we detected at least half keypoints\n const scaledBox = box.scale(cache.bodies[i].boxRaw, boxExpandFact);\n const cropBox = box.crop(scaledBox);\n cache.boxes.push(cropBox);\n }\n }\n */\n\n // run detection on squared input and no cached boxes\n t.input = fix.padInput(input, inputSize);\n t.res = model?.execute(t.input) as Tensor;\n cache.last = now();\n const res = await t.res.array();\n cache.bodies = (t.res.shape[2] === 17)\n ? parseSinglePose(res, config, input)\n : parseMultiPose(res, config, input);\n for (const body of cache.bodies) {\n fix.rescaleBody(body, [input.shape[2] || 1, input.shape[1] || 1]);\n fix.jitter(body.keypoints);\n }\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n\n resolve(cache.bodies);\n });\n}\n", "/**\n * NanoDet object detection model implementation\n *\n * Based on: [**MB3-CenterNet**](https://github.com/610265158/mobilenetv3_centernet)\n */\n\nimport { log, now } from '../util/util';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport { loadModel } from '../tfjs/load';\nimport { constants } from '../tfjs/constants';\nimport { labels } from './labels';\nimport type { ObjectResult, ObjectType, Box } from '../result';\nimport type { GraphModel, Tensor } from '../tfjs/types';\nimport type { Config } from '../config';\nimport { env } from '../util/env';\n\nlet model: GraphModel;\nlet last: ObjectResult[] = [];\nlet lastTime = 0;\nlet skipped = Number.MAX_SAFE_INTEGER;\nlet inputSize = 0;\n\nconst scaleBox = 2.5; // increase box size\n\nexport async function load(config: Config): Promise {\n if (!model || env.initial) {\n model = await loadModel(config.object.modelPath);\n const inputs = model?.['executor'] ? Object.values(model.modelSignature['inputs']) : undefined;\n inputSize = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : 416;\n } else if (config.debug) log('cached model:', model['modelUrl']);\n return model;\n}\n\nasync function process(res: Tensor[], outputShape: [number, number], config: Config) {\n let id = 0;\n let results: ObjectResult[] = [];\n const size = inputSize;\n for (const strideSize of [1, 2, 4]) { // try each stride size as it detects large/medium/small objects\n // find scores, boxes, classes\n const baseSize = strideSize * 13; // 13x13=169, 26x26=676, 52x52=2704\n // find boxes and scores output depending on stride\n const scoresT = tf.squeeze(res.find((a: Tensor) => (a.shape[1] === (baseSize ** 2) && (a.shape[2] || 0) === labels.length)));\n const scores = await scoresT.array(); // optionally use exponential scores or just as-is\n const featuresT = tf.squeeze(res.find((a: Tensor) => (a.shape[1] === (baseSize ** 2) && (a.shape[2] || 0) < labels.length)));\n const boxesMaxT = featuresT.reshape([-1, 4, featuresT.shape[1] / 4]); // reshape [output] to [4, output / 4] where number is number of different features inside each stride\n const boxIdxT = boxesMaxT.argMax(2); // what we need is indexes of features with highest scores, not values itself\n const boxIdx = await boxIdxT.array(); // what we need is indexes of features with highest scores, not values itself\n for (let i = 0; i < scoresT.shape[0]; i++) { // total strides (x * y matrix)\n for (let j = 0; j < scoresT.shape[1]; j++) { // one score for each class\n const score = scores[i][j]; // get score for current position\n if (score > (config.object.minConfidence || 0) && j !== 61) {\n const cx = (0.5 + Math.trunc(i % baseSize)) / baseSize; // center.x normalized to range 0..1\n const cy = (0.5 + Math.trunc(i / baseSize)) / baseSize; // center.y normalized to range 0..1\n const boxOffset = boxIdx[i].map((a: number) => a * (baseSize / strideSize / (size))); // just grab indexes of features with highest scores\n const [x, y] = [\n cx - (scaleBox / strideSize * boxOffset[0]),\n cy - (scaleBox / strideSize * boxOffset[1]),\n ];\n const [w, h] = [\n cx + (scaleBox / strideSize * boxOffset[2]) - x,\n cy + (scaleBox / strideSize * boxOffset[3]) - y,\n ];\n let boxRaw: Box = [x, y, w, h]; // results normalized to range 0..1\n boxRaw = boxRaw.map((a) => Math.max(0, Math.min(a, 1))) as Box; // fix out-of-bounds coords\n const box = [ // results normalized to input image pixels\n boxRaw[0] * outputShape[0],\n boxRaw[1] * outputShape[1],\n boxRaw[2] * outputShape[0],\n boxRaw[3] * outputShape[1],\n ];\n const result = {\n id: id++,\n // strideSize,\n score: Math.round(100 * score) / 100,\n class: j + 1,\n label: labels[j].label as ObjectType,\n // center: [Math.trunc(outputShape[0] * cx), Math.trunc(outputShape[1] * cy)],\n // centerRaw: [cx, cy],\n box: box.map((a) => Math.trunc(a)) as Box,\n boxRaw,\n };\n results.push(result);\n }\n }\n }\n tf.dispose([scoresT, featuresT, boxesMaxT, boxIdxT]);\n }\n\n // normally nms is run on raw results, but since boxes need to be calculated this way we skip calulcation of\n // unnecessary boxes and run nms only on good candidates (basically it just does IOU analysis as scores are already filtered)\n const nmsBoxes = results.map((a) => [a.boxRaw[1], a.boxRaw[0], a.boxRaw[3], a.boxRaw[2]]); // switches coordinates from x,y to y,x as expected by tf.nms\n const nmsScores = results.map((a) => a.score);\n let nmsIdx: number[] = [];\n if (nmsBoxes && nmsBoxes.length > 0) {\n const nms = await tf.image.nonMaxSuppressionAsync(nmsBoxes, nmsScores, config.object.maxDetected, config.object.iouThreshold, config.object.minConfidence);\n nmsIdx = await nms.data();\n tf.dispose(nms);\n }\n\n // filter & sort results\n results = results\n .filter((_val, idx) => nmsIdx.includes(idx))\n .sort((a, b) => (b.score - a.score));\n\n return results;\n}\n\nexport async function predict(image: Tensor, config: Config): Promise {\n if (!model?.['executor']) return [];\n const skipTime = (config.object.skipTime || 0) > (now() - lastTime);\n const skipFrame = skipped < (config.object.skipFrames || 0);\n if (config.skipAllowed && skipTime && skipFrame && (last.length > 0)) {\n skipped++;\n return last;\n }\n skipped = 0;\n if (!env.kernels.includes('mod') || !env.kernels.includes('sparsetodense')) return last;\n return new Promise(async (resolve) => {\n const outputSize = [image.shape[2] || 0, image.shape[1] || 0];\n const resizeT = tf.image.resizeBilinear(image, [inputSize, inputSize], false);\n const normT = tf.div(resizeT, constants.tf255);\n const transposeT = tf.transpose(normT, [0, 3, 1, 2]);\n\n let objectT;\n if (config.object.enabled) objectT = model.execute(transposeT);\n lastTime = now();\n\n const obj = await process(objectT as Tensor[], outputSize as [number, number], config);\n last = obj;\n tf.dispose([resizeT, normT, transposeT, ...objectT]);\n resolve(obj);\n });\n}\n", "/**\n * PoseNet body detection model implementation constants\n * See `posenet.ts` for entry point\n */\n\nimport type { Point, BodyResult, BodyAnnotation, BodyLandmark } from '../result';\n\nexport const partNames = [\n 'nose', 'leftEye', 'rightEye', 'leftEar', 'rightEar', 'leftShoulder',\n 'rightShoulder', 'leftElbow', 'rightElbow', 'leftWrist', 'rightWrist',\n 'leftHip', 'rightHip', 'leftKnee', 'rightKnee', 'leftAnkle', 'rightAnkle',\n];\n\nexport const count = partNames.length; // 17 keypoints\n\nexport const partIds = partNames.reduce((result, jointName, i) => {\n result[jointName] = i;\n return result;\n}, {});\n\nconst connectedPartNames = [\n ['leftHip', 'leftShoulder'], ['leftElbow', 'leftShoulder'],\n ['leftElbow', 'leftWrist'], ['leftHip', 'leftKnee'],\n ['leftKnee', 'leftAnkle'], ['rightHip', 'rightShoulder'],\n ['rightElbow', 'rightShoulder'], ['rightElbow', 'rightWrist'],\n ['rightHip', 'rightKnee'], ['rightKnee', 'rightAnkle'],\n ['leftShoulder', 'rightShoulder'], ['leftHip', 'rightHip'],\n];\nexport const connectedPartIndices = connectedPartNames.map(([jointNameA, jointNameB]) => ([partIds[jointNameA], partIds[jointNameB]]));\n\nexport const poseChain = [\n ['nose', 'leftEye'], ['leftEye', 'leftEar'], ['nose', 'rightEye'],\n ['rightEye', 'rightEar'], ['nose', 'leftShoulder'],\n ['leftShoulder', 'leftElbow'], ['leftElbow', 'leftWrist'],\n ['leftShoulder', 'leftHip'], ['leftHip', 'leftKnee'],\n ['leftKnee', 'leftAnkle'], ['nose', 'rightShoulder'],\n ['rightShoulder', 'rightElbow'], ['rightElbow', 'rightWrist'],\n ['rightShoulder', 'rightHip'], ['rightHip', 'rightKnee'],\n ['rightKnee', 'rightAnkle'],\n];\n\nexport function eitherPointDoesntMeetConfidence(a: number, b: number, minConfidence: number) {\n return (a < minConfidence || b < minConfidence);\n}\n\nexport function getAdjacentKeyPoints(keypoints, minConfidence: number) {\n return connectedPartIndices.reduce((result, [leftJoint, rightJoint]) => {\n if (eitherPointDoesntMeetConfidence(keypoints[leftJoint].score, keypoints[rightJoint].score, minConfidence)) {\n return result;\n }\n result.push([keypoints[leftJoint], keypoints[rightJoint]]);\n return result;\n }, []);\n}\n\nexport function getBoundingBox(keypoints): [number, number, number, number] {\n const coord = keypoints.reduce(({ maxX, maxY, minX, minY }, { position: { x, y } }) => ({\n maxX: Math.max(maxX, x),\n maxY: Math.max(maxY, y),\n minX: Math.min(minX, x),\n minY: Math.min(minY, y),\n }), {\n maxX: Number.NEGATIVE_INFINITY,\n maxY: Number.NEGATIVE_INFINITY,\n minX: Number.POSITIVE_INFINITY,\n minY: Number.POSITIVE_INFINITY,\n });\n return [coord.minX, coord.minY, coord.maxX - coord.minX, coord.maxY - coord.minY];\n}\n\nexport function scalePoses(poses, [height, width], [inputResolutionHeight, inputResolutionWidth]): BodyResult[] {\n const scaleY = height / inputResolutionHeight;\n const scaleX = width / inputResolutionWidth;\n const scalePose = (pose, i): BodyResult => ({\n id: i,\n score: pose.score,\n boxRaw: [pose.box[0] / inputResolutionWidth, pose.box[1] / inputResolutionHeight, pose.box[2] / inputResolutionWidth, pose.box[3] / inputResolutionHeight],\n box: [Math.trunc(pose.box[0] * scaleX), Math.trunc(pose.box[1] * scaleY), Math.trunc(pose.box[2] * scaleX), Math.trunc(pose.box[3] * scaleY)],\n keypoints: pose.keypoints.map(({ score, part, position }) => ({\n score: score as number,\n part: part as BodyLandmark,\n position: [Math.trunc(position.x * scaleX), Math.trunc(position.y * scaleY)] as Point,\n positionRaw: [position.x / inputResolutionHeight, position.y / inputResolutionHeight] as Point,\n })),\n annotations: {} as Record,\n });\n const scaledPoses = poses.map((pose, i) => scalePose(pose, i));\n return scaledPoses;\n}\n\n// algorithm based on Coursera Lecture from Algorithms, Part 1: https://www.coursera.org/learn/algorithms-part1/lecture/ZjoSM/heapsort\nexport class MaxHeap {\n priorityQueue: unknown[]; // don't touch\n numberOfElements: number;\n getElementValue: unknown; // function call\n\n constructor(maxSize, getElementValue) {\n this.priorityQueue = new Array(maxSize);\n this.numberOfElements = -1;\n this.getElementValue = getElementValue;\n }\n\n enqueue(x) {\n this.priorityQueue[++this.numberOfElements] = x;\n this.swim(this.numberOfElements);\n }\n\n dequeue() {\n const max = this.priorityQueue[0];\n this.exchange(0, this.numberOfElements--);\n this.sink(0);\n this.priorityQueue[this.numberOfElements + 1] = null;\n return max;\n }\n\n empty() { return this.numberOfElements === -1; }\n\n size() { return this.numberOfElements + 1; }\n\n all() { return this.priorityQueue.slice(0, this.numberOfElements + 1); }\n\n max() { return this.priorityQueue[0]; }\n\n swim(k) {\n while (k > 0 && this.less(Math.floor(k / 2), k)) {\n this.exchange(k, Math.floor(k / 2));\n k = Math.floor(k / 2);\n }\n }\n\n sink(k) {\n while (2 * k <= this.numberOfElements) {\n let j = 2 * k;\n if (j < this.numberOfElements && this.less(j, j + 1)) j++;\n if (!this.less(k, j)) break;\n this.exchange(k, j);\n k = j;\n }\n }\n\n getValueAt(i) {\n // @ts-ignore getter is of unknown type\n return this.getElementValue(this.priorityQueue[i]);\n }\n\n less(i, j) {\n return this.getValueAt(i) < this.getValueAt(j);\n }\n\n exchange(i, j) {\n const t = this.priorityQueue[i];\n this.priorityQueue[i] = this.priorityQueue[j];\n this.priorityQueue[j] = t;\n }\n}\n\nexport function getOffsetPoint(y, x, keypoint: number, offsets) {\n return {\n y: offsets.get(y, x, keypoint),\n x: offsets.get(y, x, keypoint + count),\n };\n}\n\nexport function getImageCoords(part, outputStride: number, offsets) {\n const { heatmapY, heatmapX, id: keypoint } = part;\n const { y, x } = getOffsetPoint(heatmapY, heatmapX, keypoint, offsets);\n return {\n x: part.heatmapX * outputStride + x,\n y: part.heatmapY * outputStride + y,\n };\n}\n\nexport function fillArray(element, size) {\n const result = new Array(size);\n for (let i = 0; i < size; i++) {\n result[i] = element;\n }\n return result;\n}\n\nexport function clamp(a, min, max) {\n if (a < min) return min;\n if (a > max) return max;\n return a;\n}\n\nexport function squaredDistance(y1, x1, y2, x2) {\n const dy = y2 - y1;\n const dx = x2 - x1;\n return dy * dy + dx * dx;\n}\n\nexport function addVectors(a: { x: number, y: number }, b: { x: number, y: number }) {\n return { x: a.x + b.x, y: a.y + b.y };\n}\n\nexport function clampVector(a, min, max) {\n return { y: clamp(a.y, min, max), x: clamp(a.x, min, max) };\n}\n", "/**\n * PoseNet body detection model implementation\n *\n * Based on: [**PoseNet**](https://medium.com/tensorflow/real-time-human-pose-estimation-in-the-browser-with-tensorflow-js-7dd0bc881cd5)\n */\n\nimport { log } from '../util/util';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport { loadModel } from '../tfjs/load';\nimport type { BodyResult, BodyLandmark, Box } from '../result';\nimport type { Tensor, GraphModel } from '../tfjs/types';\nimport type { Config } from '../config';\nimport { env } from '../util/env';\nimport * as utils from './posenetutils';\n\nlet model: GraphModel;\nconst poseNetOutputs = ['MobilenetV1/offset_2/BiasAdd'/* offsets */, 'MobilenetV1/heatmap_2/BiasAdd'/* heatmapScores */, 'MobilenetV1/displacement_fwd_2/BiasAdd'/* displacementFwd */, 'MobilenetV1/displacement_bwd_2/BiasAdd'/* displacementBwd */];\nconst localMaximumRadius = 1;\nconst outputStride = 16;\nconst squaredNmsRadius = 50 ** 2;\n\nfunction traverse(edgeId: number, sourceKeypoint, targetId, scores, offsets, displacements, offsetRefineStep = 2) {\n const getDisplacement = (point) => ({\n y: displacements.get(point.y, point.x, edgeId),\n x: displacements.get(point.y, point.x, (displacements.shape[2] / 2) + edgeId),\n });\n const getStridedIndexNearPoint = (point, height, width) => ({\n y: utils.clamp(Math.round(point.y / outputStride), 0, height - 1),\n x: utils.clamp(Math.round(point.x / outputStride), 0, width - 1),\n });\n\n const [height, width] = scores.shape;\n // Nearest neighbor interpolation for the source->target displacements.\n const sourceKeypointIndices = getStridedIndexNearPoint(sourceKeypoint.position, height, width);\n const displacement = getDisplacement(sourceKeypointIndices);\n const displacedPoint = utils.addVectors(sourceKeypoint.position, displacement);\n let targetKeypoint = displacedPoint;\n for (let i = 0; i < offsetRefineStep; i++) {\n const targetKeypointIndices = getStridedIndexNearPoint(targetKeypoint, height, width);\n const offsetPoint = utils.getOffsetPoint(targetKeypointIndices.y, targetKeypointIndices.x, targetId, offsets);\n targetKeypoint = utils.addVectors(\n { x: targetKeypointIndices.x * outputStride, y: targetKeypointIndices.y * outputStride },\n { x: offsetPoint.x, y: offsetPoint.y },\n );\n }\n const targetKeyPointIndices = getStridedIndexNearPoint(targetKeypoint, height, width);\n const score = scores.get(targetKeyPointIndices.y, targetKeyPointIndices.x, targetId);\n return { position: targetKeypoint, part: utils.partNames[targetId], score };\n}\n\nexport function decodePose(root, scores, offsets, displacementsFwd, displacementsBwd) {\n const tuples = utils.poseChain.map(([parentJoinName, childJoinName]) => ([utils.partIds[parentJoinName], utils.partIds[childJoinName]]));\n const edgesFwd = tuples.map(([, childJointId]) => childJointId);\n const edgesBwd = tuples.map(([parentJointId]) => parentJointId);\n const numParts = scores.shape[2]; // [21,21,17]\n const numEdges = edgesFwd.length;\n const keypoints = new Array(numParts);\n // Start a new detection instance at the position of the root.\n const rootPoint = utils.getImageCoords(root.part, outputStride, offsets);\n keypoints[root.part.id] = {\n score: root.score,\n part: utils.partNames[root.part.id] as BodyLandmark,\n position: rootPoint,\n };\n // Decode the part positions upwards in the tree, following the backward displacements.\n for (let edge = numEdges - 1; edge >= 0; --edge) {\n const sourceId = edgesFwd[edge];\n const targetId = edgesBwd[edge];\n if (keypoints[sourceId] && !keypoints[targetId]) {\n keypoints[targetId] = traverse(edge, keypoints[sourceId], targetId, scores, offsets, displacementsBwd);\n }\n }\n // Decode the part positions downwards in the tree, following the forward displacements.\n for (let edge = 0; edge < numEdges; ++edge) {\n const sourceId = edgesBwd[edge];\n const targetId = edgesFwd[edge];\n if (keypoints[sourceId] && !keypoints[targetId]) {\n keypoints[targetId] = traverse(edge, keypoints[sourceId], targetId, scores, offsets, displacementsFwd);\n }\n }\n return keypoints;\n}\n\nfunction scoreIsMaximumInLocalWindow(keypointId, score: number, heatmapY: number, heatmapX: number, scores) {\n const [height, width]: [number, number] = scores.shape;\n let localMaximum = true;\n const yStart = Math.max(heatmapY - localMaximumRadius, 0);\n const yEnd = Math.min(heatmapY + localMaximumRadius + 1, height);\n for (let yCurrent = yStart; yCurrent < yEnd; ++yCurrent) {\n const xStart = Math.max(heatmapX - localMaximumRadius, 0);\n const xEnd = Math.min(heatmapX + localMaximumRadius + 1, width);\n for (let xCurrent = xStart; xCurrent < xEnd; ++xCurrent) {\n if (scores.get(yCurrent, xCurrent, keypointId) > score) {\n localMaximum = false;\n break;\n }\n }\n if (!localMaximum) break;\n }\n return localMaximum;\n}\n\nexport function buildPartWithScoreQueue(minConfidence, scores) {\n const [height, width, numKeypoints] = scores.shape;\n const queue = new utils.MaxHeap(height * width * numKeypoints, ({ score }) => score);\n for (let heatmapY = 0; heatmapY < height; ++heatmapY) {\n for (let heatmapX = 0; heatmapX < width; ++heatmapX) {\n for (let keypointId = 0; keypointId < numKeypoints; ++keypointId) {\n const score = scores.get(heatmapY, heatmapX, keypointId);\n // Only consider parts with score greater or equal to threshold as root candidates.\n if (score < minConfidence) continue;\n // Only consider keypoints whose score is maximum in a local window.\n if (scoreIsMaximumInLocalWindow(keypointId, score, heatmapY, heatmapX, scores)) queue.enqueue({ score, part: { heatmapY, heatmapX, id: keypointId } });\n }\n }\n }\n return queue;\n}\n\nfunction withinRadius(poses, { x, y }, keypointId) {\n return poses.some(({ keypoints }) => {\n const correspondingKeypoint = keypoints[keypointId]?.position;\n if (!correspondingKeypoint) return false;\n return utils.squaredDistance(y, x, correspondingKeypoint.y, correspondingKeypoint.x) <= squaredNmsRadius;\n });\n}\n\nfunction getInstanceScore(existingPoses, keypoints) {\n const notOverlappedKeypointScores = keypoints.reduce((result, { position, score }, keypointId) => {\n if (!withinRadius(existingPoses, position, keypointId)) result += score;\n return result;\n }, 0.0);\n return notOverlappedKeypointScores / keypoints.length;\n}\n\nexport function decode(offsets, scores, displacementsFwd, displacementsBwd, maxDetected, minConfidence) {\n const poses: { keypoints, box: Box, score: number }[] = [];\n const queue = buildPartWithScoreQueue(minConfidence, scores);\n // Generate at most maxDetected object instances per image in decreasing root part score order.\n while (poses.length < maxDetected && !queue.empty()) {\n // The top element in the queue is the next root candidate.\n const root = queue.dequeue();\n // Part-based non-maximum suppression: We reject a root candidate if it is within a disk of `nmsRadius` pixels from the corresponding part of a previously detected instance.\n // @ts-ignore this one is tree walk\n const rootImageCoords = utils.getImageCoords(root.part, outputStride, offsets);\n // @ts-ignore this one is tree walk\n if (withinRadius(poses, rootImageCoords, root.part.id)) continue;\n // Else start a new detection instance at the position of the root.\n let keypoints = decodePose(root, scores, offsets, displacementsFwd, displacementsBwd);\n keypoints = keypoints.filter((a) => a.score > minConfidence);\n const score = getInstanceScore(poses, keypoints);\n const box = utils.getBoundingBox(keypoints);\n if (score > minConfidence) poses.push({ keypoints, box, score: Math.round(100 * score) / 100 });\n }\n return poses;\n}\n\nexport async function predict(input: Tensor, config: Config): Promise {\n /** posenet is mostly obsolete\n * caching is not implemented\n */\n if (!model?.['executor']) return [];\n const res = tf.tidy(() => {\n if (!model.inputs[0].shape) return [];\n const resized = tf.image.resizeBilinear(input, [model.inputs[0].shape[2], model.inputs[0].shape[1]]);\n const normalized = tf.sub(tf.div(tf.cast(resized, 'float32'), 127.5), 1.0);\n const results: Tensor[] = model.execute(normalized, poseNetOutputs) as Tensor[];\n const results3d = results.map((y) => tf.squeeze(y, [0]));\n results3d[1] = tf.sigmoid(results3d[1]); // apply sigmoid on scores\n return results3d;\n });\n\n const buffers = await Promise.all(res.map((tensor: Tensor) => tensor.buffer()));\n for (const t of res) tf.dispose(t);\n\n const decoded = decode(buffers[0], buffers[1], buffers[2], buffers[3], config.body.maxDetected, config.body.minConfidence);\n if (!model.inputs[0].shape) return [];\n const scaled = utils.scalePoses(decoded, [input.shape[1], input.shape[2]], [model.inputs[0].shape[2], model.inputs[0].shape[1]]);\n return scaled;\n}\n\nexport async function load(config: Config): Promise {\n if (!model || env.initial) model = await loadModel(config.body.modelPath);\n else if (config.debug) log('cached model:', model['modelUrl']);\n return model;\n}\n", "/**\n * Image segmentation for body detection model\n *\n * Based on:\n * - [**Robust Video Matting**](https://github.com/PeterL1n/RobustVideoMatting)\n */\n\nimport { log } from '../util/util';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport { loadModel } from '../tfjs/load';\nimport { constants } from '../tfjs/constants';\nimport type { GraphModel, Tensor } from '../tfjs/types';\nimport type { Config } from '../config';\nimport { env } from '../util/env';\n\nlet model: GraphModel;\n\n// internal state varaibles\nconst outputNodes = ['fgr', 'pha', 'r1o', 'r2o', 'r3o', 'r4o'];\nconst t: Record = {}; // contains input tensor and recurrent states\nlet ratio = 0;\n\nfunction init(config: Config) {\n tf.dispose([t.r1i, t.r2i, t.r3i, t.r4i, t.downsample_ratio]);\n t.r1i = tf.tensor(0.0);\n t.r2i = tf.tensor(0.0);\n t.r3i = tf.tensor(0.0);\n t.r4i = tf.tensor(0.0);\n ratio = config.segmentation.ratio || 0.5;\n t.downsample_ratio = tf.tensor(ratio); // initialize downsample ratio\n}\n\nexport async function load(config: Config): Promise {\n if (!model || env.initial) model = await loadModel(config.segmentation.modelPath);\n else if (config.debug) log('cached model:', model['modelUrl']);\n init(config);\n return model;\n}\n\nconst normalize = (r: Tensor) => tf.tidy(() => {\n const squeeze = tf.squeeze(r, ([0]));\n const mul = tf.mul(squeeze, constants.tf255);\n const cast = tf.cast(mul, 'int32');\n return cast as Tensor;\n});\n\nfunction getRGBA(fgr: Tensor | null, pha: Tensor | null): Tensor { // gets rgba // either fgr or pha must be present\n const rgb = fgr\n ? normalize(fgr) // normalize and use value\n : tf.fill([pha!.shape[1] || 0, pha!.shape[2] || 0, 3], 255, 'int32'); // eslint-disable-line @typescript-eslint/no-non-null-assertion\n const a = pha\n ? normalize(pha) // normalize and use value\n : tf.fill([fgr!.shape[1] || 0, fgr!.shape[2] || 0, 1], 255, 'int32'); // eslint-disable-line @typescript-eslint/no-non-null-assertion\n const rgba = tf.concat([rgb, a], -1);\n tf.dispose([rgb, a]);\n return rgba;\n}\n\nfunction getState(state: Tensor): Tensor { // gets internal recurrent states\n return tf.tidy(() => {\n const r: Record = {};\n r.unstack = tf.unstack(state, -1);\n r.concat = tf.concat(r.unstack, 1);\n r.split = tf.split(r.concat, 4, 1);\n r.stack = tf.concat(r.split, 2);\n r.squeeze = tf.squeeze(r.stack, [0]);\n r.expand = tf.expandDims(r.squeeze, -1);\n r.add = tf.add(r.expand, 1);\n r.mul = tf.mul(r.add, 127.5);\n r.cast = tf.cast(r.mul, 'int32');\n r.tile = tf.tile(r.cast, [1, 1, 3]) as Tensor;\n r.alpha = tf.fill([r.tile.shape[0] || 0, r.tile.shape[1] || 0, 1], 255, 'int32');\n return tf.concat([r.tile, r.alpha], -1) as Tensor;\n });\n}\n\nexport async function predict(input: Tensor, config: Config): Promise {\n if (!model) model = await load(config);\n if (!model?.['executor']) return null;\n // const expand = tf.expandDims(input, 0);\n t.src = tf.div(input, 255);\n if (ratio !== config.segmentation.ratio) init(config); // reinitialize recurrent states if requested downsample ratio changed\n const [fgr, pha, r1o, r2o, r3o, r4o] = await model.executeAsync(t, outputNodes) as Tensor[]; // execute model\n let rgba: Tensor;\n switch (config.segmentation.mode || 'default') {\n case 'default':\n rgba = getRGBA(fgr, pha);\n break;\n case 'alpha':\n rgba = getRGBA(null, pha);\n break;\n case 'foreground':\n rgba = getRGBA(fgr, null);\n break;\n case 'state':\n rgba = getState(r1o); // can view any internal recurrent state r10, r20, r3o, r4o\n break;\n default:\n rgba = tf.tensor(0);\n }\n tf.dispose([t.src, fgr, pha, t.r1i, t.r2i, t.r3i, t.r4i]);\n [t.r1i, t.r2i, t.r3i, t.r4i] = [r1o, r2o, r3o, r4o]; // update recurrent states\n return rgba;\n}\n", "/**\n * Image segmentation for body detection model\n *\n * Based on:\n * - [**MediaPipe Selfie**](https://drive.google.com/file/d/1dCfozqknMa068vVsO2j_1FgZkW_e3VWv/preview)\n */\n\nimport { log } from '../util/util';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport { loadModel } from '../tfjs/load';\nimport { constants } from '../tfjs/constants';\nimport type { GraphModel, Tensor } from '../tfjs/types';\nimport type { Config } from '../config';\nimport { env } from '../util/env';\n\nlet model: GraphModel;\n\nexport async function load(config: Config): Promise {\n if (!model || env.initial) model = await loadModel(config.segmentation.modelPath);\n else if (config.debug) log('cached model:', model['modelUrl']);\n return model;\n}\n\nexport async function predict(input: Tensor, config: Config): Promise {\n if (!model) model = await load(config);\n if (!model?.['executor'] || !model?.inputs?.[0].shape) return null; // something is wrong with the model\n const t: Record = {};\n t.resize = tf.image.resizeBilinear(input, [model.inputs[0].shape ? model.inputs[0].shape[1] : 0, model.inputs[0].shape ? model.inputs[0].shape[2] : 0], false);\n t.norm = tf.div(t.resize, constants.tf255);\n t.res = model.execute(t.norm) as Tensor;\n t.squeeze = tf.squeeze(t.res, 0); // meet.shape:[1,256,256,1], selfie.shape:[1,144,256,2]\n t.alpha = tf.image.resizeBilinear(t.squeeze, [input.shape[1], input.shape[2]]); // model selfie has a single channel that we can use directly\n t.mul = tf.mul(t.alpha, constants.tf255);\n let rgba: Tensor;\n switch (config.segmentation.mode || 'default') {\n case 'default':\n t.input = tf.squeeze(input);\n t.concat = tf.concat([t.input, t.mul], -1);\n rgba = tf.cast(t.concat, 'int32'); // combined original with alpha\n break;\n case 'alpha':\n rgba = tf.cast(t.mul, 'int32'); // just get alpha value from model\n break;\n default:\n rgba = tf.tensor(0);\n }\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n return rgba;\n}\n", "/**\n * Age model implementation\n *\n * Based on: [**SSR-Net**](https://github.com/shamangary/SSR-Net)\n */\n\nimport { log, now } from '../util/util';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport { loadModel } from '../tfjs/load';\nimport { env } from '../util/env';\nimport { constants } from '../tfjs/constants';\nimport type { Config } from '../config';\nimport type { GraphModel, Tensor } from '../tfjs/types';\n\nlet model: GraphModel | null;\nconst last: { age: number }[] = [];\nlet lastCount = 0;\nlet lastTime = 0;\nlet skipped = Number.MAX_SAFE_INTEGER;\n\nexport async function load(config: Config) {\n if (env.initial) model = null;\n if (!model) model = await loadModel(config.face['ssrnet'].modelPathAge);\n else if (config.debug) log('cached model:', model['modelUrl']);\n return model;\n}\n\nexport async function predict(image: Tensor, config: Config, idx: number, count: number): Promise<{ age: number }> {\n if (!model) return { age: 0 };\n const skipFrame = skipped < (config.face['ssrnet']?.skipFrames || 0);\n const skipTime = (config.face['ssrnet']?.skipTime || 0) > (now() - lastTime);\n if (config.skipAllowed && skipFrame && skipTime && (lastCount === count) && last[idx]?.age && (last[idx]?.age > 0)) {\n skipped++;\n return last[idx];\n }\n skipped = 0;\n return new Promise(async (resolve) => {\n if (!model?.inputs || !model.inputs[0] || !model.inputs[0].shape) return;\n const t: Record = {};\n t.resize = tf.image.resizeBilinear(image, [model.inputs[0].shape[2], model.inputs[0].shape[1]], false);\n t.enhance = tf.mul(t.resize, constants.tf255);\n const obj = { age: 0 };\n if (config.face['ssrnet']?.enabled) t.age = model.execute(t.enhance) as Tensor;\n if (t.age) {\n const data = await t.age.data();\n obj.age = Math.trunc(10 * data[0]) / 10;\n }\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n last[idx] = obj;\n lastCount = count;\n lastTime = now();\n resolve(obj);\n });\n}\n", "/**\n * Gender model implementation\n *\n * Based on: [**SSR-Net**](https://github.com/shamangary/SSR-Net)\n */\n\nimport { log, now } from '../util/util';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport { loadModel } from '../tfjs/load';\nimport { constants } from '../tfjs/constants';\nimport type { Gender } from '../result';\nimport type { Config } from '../config';\nimport type { GraphModel, Tensor } from '../tfjs/types';\nimport { env } from '../util/env';\n\nlet model: GraphModel | null;\nconst last: { gender: Gender, genderScore: number }[] = [];\nlet lastCount = 0;\nlet lastTime = 0;\nlet skipped = Number.MAX_SAFE_INTEGER;\n\n// tuning values\nconst rgb = [0.2989, 0.5870, 0.1140]; // factors for red/green/blue colors when converting to grayscale\n\nexport async function load(config: Config) {\n if (env.initial) model = null;\n if (!model) model = await loadModel(config.face['ssrnet']?.modelPathGender);\n else if (config.debug) log('cached model:', model['modelUrl']);\n return model;\n}\n\nexport async function predict(image: Tensor, config: Config, idx, count): Promise<{ gender: Gender, genderScore: number }> {\n if (!model) return { gender: 'unknown', genderScore: 0 };\n const skipFrame = skipped < (config.face['ssrnet']?.skipFrames || 0);\n const skipTime = (config.face['ssrnet']?.skipTime || 0) > (now() - lastTime);\n if (config.skipAllowed && skipFrame && skipTime && (lastCount === count) && last[idx]?.gender && (last[idx]?.genderScore > 0)) {\n skipped++;\n return last[idx];\n }\n skipped = 0;\n return new Promise(async (resolve) => {\n if (!model?.inputs[0].shape) return;\n const t: Record = {};\n t.resize = tf.image.resizeBilinear(image, [model.inputs[0].shape[2], model.inputs[0].shape[1]], false);\n t.enhance = tf.tidy(() => {\n const [red, green, blue] = tf.split(t.resize, 3, 3);\n const redNorm = tf.mul(red, rgb[0]);\n const greenNorm = tf.mul(green, rgb[1]);\n const blueNorm = tf.mul(blue, rgb[2]);\n const grayscale = tf.addN([redNorm, greenNorm, blueNorm]);\n const normalize = tf.mul(tf.sub(grayscale, constants.tf05), 2); // range grayscale:-1..1\n return normalize;\n });\n const obj: { gender: Gender, genderScore: number } = { gender: 'unknown', genderScore: 0 };\n if (config.face['ssrnet']?.enabled) t.gender = model.execute(t.enhance) as Tensor;\n const data = await t.gender.data();\n obj.gender = data[0] > data[1] ? 'female' : 'male'; // returns two values 0..1, bigger one is prediction\n obj.genderScore = data[0] > data[1] ? (Math.trunc(100 * data[0]) / 100) : (Math.trunc(100 * data[1]) / 100);\n Object.keys(t).forEach((tensor) => tf.dispose(t[tensor]));\n last[idx] = obj;\n lastCount = count;\n lastTime = now();\n resolve(obj);\n });\n}\n", "/** TFJS custom backend registration */\n\nimport type { Human } from '../human';\nimport { log } from '../util/util';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport * as image from '../image/image';\nimport * as models from '../models';\nimport type { AnyCanvas } from '../exports';\n// import { env } from '../env';\n\nexport const config = {\n name: 'humangl',\n priority: 999,\n canvas: null as null | AnyCanvas,\n gl: null as null | WebGL2RenderingContext,\n extensions: [] as string[] | null,\n webGLattr: { // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.2\n alpha: false,\n antialias: false,\n premultipliedAlpha: false,\n preserveDrawingBuffer: false,\n depth: false,\n stencil: false,\n failIfMajorPerformanceCaveat: false, // default=true\n desynchronized: true, // default=undefined\n },\n};\n\nfunction extensions(): void {\n /*\n https://www.khronos.org/registry/webgl/extensions/\n https://webglreport.com/?v=2\n */\n const gl = config.gl;\n if (!gl) return;\n config.extensions = gl.getSupportedExtensions();\n // gl.getExtension('KHR_parallel_shader_compile');\n}\n\n/**\n * Registers custom WebGL2 backend to be used by Human library\n *\n * @returns void\n */\nexport function register(instance: Human): void {\n // force backend reload if gl context is not valid\n if (instance.config.backend !== 'humangl') return;\n if ((config.name in tf.engine().registry) && !config?.gl?.getParameter(config.gl.VERSION)) {\n log('humangl error: backend invalid context');\n models.reset(instance);\n /*\n log('resetting humangl backend');\n await tf.removeBackend(config.name);\n await register(instance); // re-register\n */\n }\n if (!tf.findBackend(config.name)) {\n try {\n config.canvas = image.canvas(100, 100);\n } catch (err) {\n log('humangl error: cannot create canvas:', err);\n return;\n }\n try {\n config.gl = config.canvas.getContext('webgl2', config.webGLattr);\n if (!config.gl) {\n log('humangl error: cannot get webgl context');\n return;\n }\n const glv2 = config.gl.getParameter(config.gl.VERSION).includes('2.0');\n if (!glv2) {\n log('backend override: using fallback webgl backend as webgl 2.0 is not detected');\n instance.config.backend = 'webgl';\n return;\n }\n if (config.canvas) {\n config.canvas.addEventListener('webglcontextlost', (e) => {\n log('humangl error:', e.type);\n log('possible browser memory leak using webgl or conflict with multiple backend registrations');\n instance.emit('error');\n throw new Error('backend error: webgl context lost');\n // log('resetting humangl backend');\n // env.initial = true;\n // models.reset(instance);\n // await tf.removeBackend(config.name);\n // await register(instance); // re-register\n });\n config.canvas.addEventListener('webglcontextrestored', (e) => {\n log('humangl error: context restored:', e);\n });\n config.canvas.addEventListener('webglcontextcreationerror', (e) => {\n log('humangl error: context create:', e);\n });\n }\n } catch (err) {\n log('humangl error: cannot get webgl context:', err);\n return;\n }\n try {\n tf.setWebGLContext(2, config.gl);\n } catch (err) {\n log('humangl error: cannot set webgl context:', err);\n return;\n }\n try {\n const ctx = new tf.GPGPUContext(config.gl);\n tf.registerBackend(config.name, () => new tf.MathBackendWebGL(ctx), config.priority);\n } catch (err) {\n log('humangl error: cannot register webgl backend:', err);\n return;\n }\n try {\n const kernels = tf.getKernelsForBackend('webgl');\n kernels.forEach((kernelConfig) => {\n const newKernelConfig = { ...kernelConfig, backendName: config.name };\n tf.registerKernel(newKernelConfig);\n });\n } catch (err) {\n log('humangl error: cannot update webgl backend registration:', err);\n return;\n }\n try {\n if (tf.env().flagRegistry.WEBGL_VERSION) tf.env().set('WEBGL_VERSION', 2);\n } catch (err) {\n log('humangl error: cannot set WebGL backend flags:', err);\n return;\n }\n extensions();\n const current = tf.backend().getGPGPUContext ? tf.backend().getGPGPUContext().gl : null;\n if (current) {\n if (instance.config.debug) log('humangl backend registered:', { webgl: current.getParameter(current.VERSION) as string, renderer: current.getParameter(current.RENDERER) as string });\n } else {\n log('humangl error: no current gl context:', current, config.gl);\n }\n }\n}\n", "/** TFJS backend initialization and customization */\n\nimport type { Human, Config } from '../human';\nimport { log, now } from '../util/util';\nimport { env } from '../util/env';\nimport * as humangl from './humangl';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport * as constants from './constants';\n\nfunction registerCustomOps(config: Config) {\n const newKernels: string[] = [];\n if (!env.kernels.includes('mod')) {\n const kernelMod = {\n kernelName: 'Mod',\n backendName: tf.getBackend(),\n kernelFunc: (op) => tf.tidy(() => tf.sub(op.inputs.a, tf.mul(tf.div(op.inputs.a, op.inputs.b), op.inputs.b))),\n };\n tf.registerKernel(kernelMod);\n env.kernels.push('mod');\n newKernels.push('mod');\n }\n if (!env.kernels.includes('floormod')) {\n const kernelFloorMod = {\n kernelName: 'FloorMod',\n backendName: tf.getBackend(),\n kernelFunc: (op) => tf.tidy(() => tf.add(tf.mul(tf.floorDiv(op.inputs.a / op.inputs.b), op.inputs.b), tf.mod(op.inputs.a, op.inputs.b))),\n };\n tf.registerKernel(kernelFloorMod);\n env.kernels.push('floormod');\n newKernels.push('floormod');\n }\n /*\n if (!env.kernels.includes('atan2') && config.softwareKernels) {\n const kernelAtan2 = {\n kernelName: 'Atan2',\n backendName: tf.getBackend(),\n kernelFunc: (op) => tf.tidy(() => {\n const backend = tf.getBackend();\n tf.setBackend('cpu');\n const t = tf.atan2(op.inputs.a, op.inputs.b);\n tf.setBackend(backend);\n return t;\n }),\n };\n if (config.debug) log('registered kernel:', 'atan2');\n log('registered kernel:', 'atan2');\n tf.registerKernel(kernelAtan2);\n env.kernels.push('atan2');\n newKernels.push('atan2');\n }\n */\n if (!env.kernels.includes('rotatewithoffset') && config.softwareKernels) {\n const kernelRotateWithOffset = {\n kernelName: 'RotateWithOffset',\n backendName: tf.getBackend(),\n kernelFunc: (op) => tf.tidy(() => {\n const backend = tf.getBackend();\n tf.setBackend('cpu');\n const t = tf.image.rotateWithOffset(op.inputs.image, op.attrs.radians, op.attrs.fillValue, op.attrs.center);\n tf.setBackend(backend);\n return t;\n }),\n };\n tf.registerKernel(kernelRotateWithOffset);\n env.kernels.push('rotatewithoffset');\n newKernels.push('rotatewithoffset');\n }\n if ((newKernels.length > 0) && config.debug) log('registered kernels:', newKernels);\n}\n\nlet defaultFlags: Record = {};\n\nexport async function check(instance: Human, force = false) {\n instance.state = 'backend';\n if (force || env.initial || (instance.config.backend && (instance.config.backend.length > 0) && (tf.getBackend() !== instance.config.backend))) {\n const timeStamp = now();\n\n if (instance.config.backend && instance.config.backend.length > 0) {\n // detect web worker\n // @ts-ignore ignore missing type for WorkerGlobalScope as that is the point\n if (typeof window === 'undefined' && typeof WorkerGlobalScope !== 'undefined' && instance.config.debug) {\n if (instance.config.debug) log('running inside web worker');\n }\n\n // force browser vs node backend\n if (env.browser && instance.config.backend === 'tensorflow') {\n if (instance.config.debug) log('override: backend set to tensorflow while running in browser');\n instance.config.backend = 'webgl';\n }\n if (env.node && (instance.config.backend === 'webgl' || instance.config.backend === 'humangl')) {\n if (instance.config.debug) log(`override: backend set to ${instance.config.backend} while running in nodejs`);\n instance.config.backend = 'tensorflow';\n }\n\n // handle webgpu\n if (env.browser && instance.config.backend === 'webgpu') {\n if (typeof navigator === 'undefined' || typeof navigator.gpu === 'undefined') {\n log('override: backend set to webgpu but browser does not support webgpu');\n instance.config.backend = 'webgl';\n } else {\n const adapter = await navigator.gpu.requestAdapter();\n if (instance.config.debug) log('enumerated webgpu adapter:', adapter);\n if (!adapter) {\n log('override: backend set to webgpu but browser reports no available gpu');\n instance.config.backend = 'webgl';\n } else {\n // @ts-ignore requestAdapterInfo is not in tslib\n const adapterInfo = 'requestAdapterInfo' in adapter ? await (adapter as GPUAdapter).requestAdapterInfo() : undefined;\n // if (adapter.features) adapter.features.forEach((feature) => log('webgpu features:', feature));\n log('webgpu adapter info:', adapterInfo);\n }\n }\n }\n\n // check available backends\n let available = Object.keys(tf.engine().registryFactory as Record);\n if (instance.config.backend === 'humangl' && !available.includes('humangl')) {\n humangl.register(instance);\n available = Object.keys(tf.engine().registryFactory as Record);\n }\n if (instance.config.debug) log('available backends:', available);\n\n if (!available.includes(instance.config.backend)) {\n log(`error: backend ${instance.config.backend} not found in registry`);\n instance.config.backend = env.node ? 'tensorflow' : 'webgl';\n if (instance.config.debug) log(`override: setting backend ${instance.config.backend}`);\n }\n\n if (instance.config.debug) log('setting backend:', [instance.config.backend]);\n\n // customize wasm\n if (instance.config.backend === 'wasm') {\n if (tf.env().flagRegistry.CANVAS2D_WILL_READ_FREQUENTLY) tf.env().set('CANVAS2D_WILL_READ_FREQUENTLY', true);\n if (instance.config.debug) log('wasm path:', instance.config.wasmPath);\n if (typeof tf.setWasmPaths !== 'undefined') tf.setWasmPaths(instance.config.wasmPath, instance.config.wasmPlatformFetch);\n else throw new Error('backend error: attempting to use wasm backend but wasm path is not set');\n let mt = false;\n let simd = false;\n try {\n mt = await tf.env().getAsync('WASM_HAS_MULTITHREAD_SUPPORT');\n simd = await tf.env().getAsync('WASM_HAS_SIMD_SUPPORT');\n if (instance.config.debug) log(`wasm execution: ${simd ? 'simd' : 'no simd'} ${mt ? 'multithreaded' : 'singlethreaded'}`);\n if (instance.config.debug && !simd) log('warning: wasm simd support is not enabled');\n } catch {\n log('wasm detection failed');\n }\n }\n\n try {\n await tf.setBackend(instance.config.backend);\n await tf.ready();\n } catch (err) {\n log('error: cannot set backend:', instance.config.backend, err);\n return false;\n }\n if (instance.config.debug) defaultFlags = JSON.parse(JSON.stringify(tf.env().flags));\n }\n\n // customize humangl\n if (tf.getBackend() === 'humangl' || tf.getBackend() === 'webgl') {\n if (tf.env().flagRegistry.WEBGL_USE_SHAPES_UNIFORMS) tf.env().set('WEBGL_USE_SHAPES_UNIFORMS', true); // default=false \n if (tf.env().flagRegistry.WEBGL_EXP_CONV) tf.env().set('WEBGL_EXP_CONV', true); // default=false \n // if (tf.env().flagRegistry['WEBGL_PACK_DEPTHWISECONV']) tf.env().set('WEBGL_PACK_DEPTHWISECONV', false); // default=true \n // if (tf.env().flagRegistry.USE_SETTIMEOUTCUSTOM) tf.env().set('USE_SETTIMEOUTCUSTOM', true); // default=false \n // if (tf.env().flagRegistry.CPU_HANDOFF_SIZE_THRESHOLD) tf.env().set('CPU_HANDOFF_SIZE_THRESHOLD', 1024); // default=1000\n // if (tf.env().flagRegistry['WEBGL_FORCE_F16_TEXTURES'] && !instance.config.object.enabled) tf.env().set('WEBGL_FORCE_F16_TEXTURES', true); // safe to use 16bit precision\n if (instance.config.debug && typeof instance.config.deallocate !== 'undefined' && instance.config.deallocate) { // hidden param\n log('changing webgl: WEBGL_DELETE_TEXTURE_THRESHOLD:', true);\n tf.env().set('WEBGL_DELETE_TEXTURE_THRESHOLD', 0);\n }\n }\n\n // customize webgpu\n if (tf.getBackend() === 'webgpu') {\n // if (tf.env().flagRegistry['WEBGPU_CPU_HANDOFF_SIZE_THRESHOLD']) tf.env().set('WEBGPU_CPU_HANDOFF_SIZE_THRESHOLD', 512);\n // if (tf.env().flagRegistry['WEBGPU_DEFERRED_SUBMIT_BATCH_SIZE']) tf.env().set('WEBGPU_DEFERRED_SUBMIT_BATCH_SIZE', 0);\n // if (tf.env().flagRegistry['WEBGPU_CPU_FORWARD']) tf.env().set('WEBGPU_CPU_FORWARD', true);\n }\n\n if (instance.config.debug) {\n const newFlags = tf.env().flags;\n const updatedFlags = {};\n for (const key of Object.keys(newFlags)) {\n if (defaultFlags[key] === newFlags[key]) continue;\n updatedFlags[key] = newFlags[key];\n }\n if (instance.config.debug && Object.keys(updatedFlags).length > 0) log('backend:', tf.getBackend(), 'flags:', updatedFlags);\n }\n\n if (instance.config.flags && Object.keys(instance.config.flags).length > 0) {\n if (instance.config.debug) log('flags:', instance.config['flags']);\n for (const [key, val] of Object.entries(instance.config.flags)) {\n tf.env().set(key, val);\n }\n }\n\n tf.enableProdMode();\n constants.init();\n instance.performance.initBackend = Math.trunc(now() - timeStamp);\n instance.config.backend = tf.getBackend();\n await env.updateBackend(); // update env on backend init\n registerCustomOps(instance.config);\n // await env.updateBackend(); // update env on backend init\n env.initial = false;\n }\n return true;\n}\n\n// register fake missing tfjs ops\nexport function fakeOps(kernelNames: string[], config) {\n // if (config.debug) log('registerKernel:', kernelNames);\n for (const kernelName of kernelNames) {\n const kernelConfig = {\n kernelName,\n backendName: config.backend,\n kernelFunc: () => { if (config.debug) log('kernelFunc', kernelName, config.backend); },\n // setupFunc: () => { if (config.debug) log('kernelFunc', kernelName, config.backend); },\n // disposeFunc: () => { if (config.debug) log('kernelFunc', kernelName, config.backend); },\n };\n tf.registerKernel(kernelConfig);\n }\n env.kernels = tf.getKernelsForBackend(tf.getBackend()).map((kernel) => (kernel.kernelName as string).toLowerCase()); // re-scan registered ops\n}\n", "/**\n * Module that implements helper draw functions, exposed as human.draw\n */\n\nimport { mergeDeep, now } from '../util/util';\nimport { env } from '../util/env';\nimport { getCanvasContext, rect } from './primitives';\nimport { options } from './options';\nimport { face } from './face';\nimport { body } from './body';\nimport { hand } from './hand';\nimport { object } from './object';\nimport { gesture } from './gesture';\nimport type { Result, PersonResult } from '../result';\nimport type { AnyCanvas, DrawOptions } from '../exports';\n\nlet drawTime = 0;\n\nexport { options } from './options';\nexport { face } from './face';\nexport { body } from './body';\nexport { hand } from './hand';\nexport { object } from './object';\nexport { gesture } from './gesture';\n\n/** draw combined person results instead of individual detection result objects */\nexport function person(inCanvas: AnyCanvas, result: PersonResult[], drawOptions?: Partial) {\n const localOptions: DrawOptions = mergeDeep(options, drawOptions);\n if (!result || !inCanvas) return;\n const ctx = getCanvasContext(inCanvas);\n if (!ctx) return;\n ctx.lineJoin = 'round';\n ctx.font = localOptions.font;\n\n for (let i = 0; i < result.length; i++) {\n if (localOptions.drawBoxes) {\n ctx.strokeStyle = localOptions.color;\n ctx.fillStyle = localOptions.color;\n rect(ctx, result[i].box[0], result[i].box[1], result[i].box[2], result[i].box[3], localOptions);\n if (localOptions.drawLabels) {\n const label = `person #${i}`;\n if (localOptions.shadowColor && localOptions.shadowColor !== '') {\n ctx.fillStyle = localOptions.shadowColor;\n ctx.fillText(label, result[i].box[0] + 3, 1 + result[i].box[1] + localOptions.lineHeight, result[i].box[2]);\n }\n ctx.fillStyle = localOptions.labelColor;\n ctx.fillText(label, result[i].box[0] + 2, 0 + result[i].box[1] + localOptions.lineHeight, result[i].box[2]);\n }\n ctx.stroke();\n }\n }\n}\n\n/** draw processed canvas */\nexport function canvas(input: AnyCanvas | HTMLImageElement | HTMLVideoElement, output: AnyCanvas) {\n if (!input || !output) return;\n const ctx = getCanvasContext(output);\n if (!ctx) return;\n ctx.drawImage(input, 0, 0);\n}\n\n/** meta-function that performs draw for: canvas, face, body, hand */\nexport async function all(inCanvas: AnyCanvas, result: Result, drawOptions?: Partial) {\n if (!result?.performance || !inCanvas) return null;\n const timeStamp = now();\n const localOptions = mergeDeep(options, drawOptions);\n const promise = Promise.all([\n face(inCanvas, result.face, localOptions),\n body(inCanvas, result.body, localOptions),\n hand(inCanvas, result.hand, localOptions),\n object(inCanvas, result.object, localOptions),\n gesture(inCanvas, result.gesture, localOptions), // gestures do not have buffering\n // person(inCanvas, result.persons, localOptions); // already included above\n ]);\n drawTime = env.perfadd ? drawTime + Math.round(now() - timeStamp) : Math.round(now() - timeStamp);\n result.performance.draw = drawTime;\n return promise;\n}\n", "import { log } from '../util/util';\nimport type { AnyCanvas } from '../exports';\nimport type { Point } from '../result';\nimport type { DrawOptions } from './options';\n\nexport const getCanvasContext = (input: AnyCanvas) => {\n if (!input) log('draw error: invalid canvas');\n else if (!input.getContext) log('draw error: canvas context not defined');\n else {\n const ctx = input.getContext('2d');\n if (!ctx) log('draw error: cannot get canvas context');\n else return ctx;\n }\n return null;\n};\n\nexport const rad2deg = (theta: number) => Math.round((theta * 180) / Math.PI);\n\nexport const colorDepth = (z: number | undefined, opt: DrawOptions): string => { // performance optimization needed\n if (!opt.useDepth || typeof z === 'undefined') return opt.color;\n const rgb = Uint8ClampedArray.from([127 + (2 * z), 127 - (2 * z), 255]);\n return `rgba(${rgb[0]}, ${rgb[1]}, ${rgb[2]}, ${opt.alpha})`;\n};\n\nexport function point(ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D, x: number, y: number, z: number | undefined, localOptions: DrawOptions) {\n ctx.fillStyle = colorDepth(z, localOptions);\n ctx.beginPath();\n ctx.arc(x, y, localOptions.pointSize, 0, 2 * Math.PI);\n ctx.fill();\n}\n\nexport function rect(ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D, x: number, y: number, width: number, height: number, localOptions: DrawOptions) {\n ctx.beginPath();\n ctx.lineWidth = localOptions.lineWidth;\n if (localOptions.useCurves) {\n const cx = (x + x + width) / 2;\n const cy = (y + y + height) / 2;\n ctx.ellipse(cx, cy, width / 2, height / 2, 0, 0, 2 * Math.PI);\n } else {\n ctx.moveTo(x + localOptions.roundRect, y);\n ctx.lineTo(x + width - localOptions.roundRect, y);\n ctx.quadraticCurveTo(x + width, y, x + width, y + localOptions.roundRect);\n ctx.lineTo(x + width, y + height - localOptions.roundRect);\n ctx.quadraticCurveTo(x + width, y + height, x + width - localOptions.roundRect, y + height);\n ctx.lineTo(x + localOptions.roundRect, y + height);\n ctx.quadraticCurveTo(x, y + height, x, y + height - localOptions.roundRect);\n ctx.lineTo(x, y + localOptions.roundRect);\n ctx.quadraticCurveTo(x, y, x + localOptions.roundRect, y);\n ctx.closePath();\n }\n ctx.stroke();\n}\n\nexport function lines(ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D, points: Point[], localOptions: DrawOptions) {\n if (points.length < 2) return;\n ctx.beginPath();\n ctx.moveTo(points[0][0], points[0][1]);\n for (const pt of points) {\n ctx.strokeStyle = colorDepth(pt[2] || 0, localOptions);\n ctx.lineTo(Math.trunc(pt[0]), Math.trunc(pt[1]));\n }\n ctx.stroke();\n if (localOptions.fillPolygons) {\n ctx.closePath();\n ctx.fill();\n }\n}\n\nexport function curves(ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D, points: Point[], localOptions: DrawOptions) {\n if (points.length < 2) return;\n ctx.lineWidth = localOptions.lineWidth;\n if (!localOptions.useCurves || points.length <= 2) {\n lines(ctx, points, localOptions);\n return;\n }\n ctx.moveTo(points[0][0], points[0][1]);\n for (let i = 0; i < points.length - 2; i++) {\n const xc = (points[i][0] + points[i + 1][0]) / 2;\n const yc = (points[i][1] + points[i + 1][1]) / 2;\n ctx.quadraticCurveTo(points[i][0], points[i][1], xc, yc);\n }\n ctx.quadraticCurveTo(points[points.length - 2][0], points[points.length - 2][1], points[points.length - 1][0], points[points.length - 1][1]);\n ctx.stroke();\n if (localOptions.fillPolygons) {\n ctx.closePath();\n ctx.fill();\n }\n}\n\nexport function arrow(ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D, from: Point, to: Point, radius = 5) {\n let angle;\n let x;\n let y;\n ctx.beginPath();\n ctx.moveTo(from[0], from[1]);\n ctx.lineTo(to[0], to[1]);\n angle = Math.atan2(to[1] - from[1], to[0] - from[0]);\n x = radius * Math.cos(angle) + to[0];\n y = radius * Math.sin(angle) + to[1];\n ctx.moveTo(x, y);\n angle += (1.0 / 3.0) * (2 * Math.PI);\n x = radius * Math.cos(angle) + to[0];\n y = radius * Math.sin(angle) + to[1];\n ctx.lineTo(x, y);\n angle += (1.0 / 3.0) * (2 * Math.PI);\n x = radius * Math.cos(angle) + to[0];\n y = radius * Math.sin(angle) + to[1];\n ctx.lineTo(x, y);\n ctx.closePath();\n ctx.stroke();\n ctx.fill();\n}\n", "/** Draw Options\n * - Accessed via `human.draw.options` or provided per each draw method as the drawOptions optional parameter\n */\nexport interface DrawOptions {\n /** draw line color */\n color: string,\n /** alpha value used for lines */\n alpha: number,\n /** label color */\n labelColor: string,\n /** label shadow color */\n shadowColor: string,\n /** label font */\n font: string,\n /** line spacing between labels */\n lineHeight: number,\n /** line width for drawn lines */\n lineWidth: number,\n /** size of drawn points */\n pointSize: number,\n /** draw rounded boxes by n pixels */\n roundRect: number,\n /** should points be drawn? */\n drawPoints: boolean,\n /** should labels be drawn? */\n drawLabels: boolean,\n /** should face attention keypoints be highlighted */\n drawAttention: boolean;\n /** should detected gestures be drawn? */\n drawGestures: boolean,\n /** should draw boxes around detection results? */\n drawBoxes: boolean,\n /** should draw polygons from detection points? */\n drawPolygons: boolean,\n /** should draw gaze arrows? */\n drawGaze: boolean,\n /** should fill polygons? */\n fillPolygons: boolean,\n /** use z-coordinate when available */\n useDepth: boolean,\n /** should lines be curved? */\n useCurves: boolean,\n}\n\n/** currently set draw options {@link DrawOptions} */\nexport const options: DrawOptions = {\n color: 'rgba(173, 216, 230, 0.6)' as string, // 'lightblue' with light alpha channel\n labelColor: 'rgba(173, 216, 230, 1)' as string, // 'lightblue' with dark alpha channel\n shadowColor: 'black' as string,\n alpha: 0.5 as number,\n font: 'small-caps 16px \"Segoe UI\"' as string,\n lineHeight: 18 as number,\n lineWidth: 4 as number,\n pointSize: 2 as number,\n roundRect: 8 as number,\n drawPoints: false as boolean,\n drawLabels: true as boolean,\n drawBoxes: true as boolean,\n drawAttention: true as boolean,\n drawGestures: true as boolean,\n drawPolygons: true as boolean,\n drawGaze: true as boolean,\n fillPolygons: false as boolean,\n useDepth: true as boolean,\n useCurves: false as boolean,\n};\n", "import { TRI468 as triangulation } from '../face/facemeshcoords';\nimport { mergeDeep } from '../util/util';\nimport { getCanvasContext, rad2deg, rect, point, lines, arrow } from './primitives';\nimport { options } from './options';\nimport * as facemeshConstants from '../face/constants';\nimport type { FaceResult } from '../result';\nimport type { AnyCanvas, DrawOptions } from '../exports';\n\nlet opt: DrawOptions;\n\nfunction drawLabels(f: FaceResult, ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D) {\n if (opt.drawLabels) {\n // silly hack since fillText does not suport new line\n const labels:string[] = [];\n labels.push(`face: ${Math.trunc(100 * f.score)}%`);\n if (f.genderScore) labels.push(`${f.gender || ''} ${Math.trunc(100 * f.genderScore)}%`);\n if (f.age) labels.push(`age: ${f.age || ''}`);\n if (f.iris) labels.push(`distance: ${f.iris}`);\n if (f.real) labels.push(`real: ${Math.trunc(100 * f.real)}%`);\n if (f.live) labels.push(`live: ${Math.trunc(100 * f.live)}%`);\n if (f.emotion && f.emotion.length > 0) {\n const emotion = f.emotion.map((a) => `${Math.trunc(100 * a.score)}% ${a.emotion}`);\n if (emotion.length > 3) emotion.length = 3;\n labels.push(emotion.join(' '));\n }\n if (f.rotation?.angle && f.rotation?.gaze) {\n if (f.rotation.angle.roll) labels.push(`roll: ${rad2deg(f.rotation.angle.roll)}\u00B0 yaw:${rad2deg(f.rotation.angle.yaw)}\u00B0 pitch:${rad2deg(f.rotation.angle.pitch)}\u00B0`);\n if (f.rotation.gaze.bearing) labels.push(`gaze: ${rad2deg(f.rotation.gaze.bearing)}\u00B0`);\n }\n if (labels.length === 0) labels.push('face');\n ctx.fillStyle = opt.color;\n for (let i = labels.length - 1; i >= 0; i--) {\n const x = Math.max(f.box[0], 0);\n const y = i * opt.lineHeight + f.box[1];\n if (opt.shadowColor && opt.shadowColor !== '') {\n ctx.fillStyle = opt.shadowColor;\n ctx.fillText(labels[i], x + 5, y + 16);\n }\n ctx.fillStyle = opt.labelColor;\n ctx.fillText(labels[i], x + 4, y + 15);\n }\n }\n}\n\nfunction drawIrisElipse(f: FaceResult, ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D) {\n // iris: array[center, left, top, right, bottom]\n if (f.annotations?.leftEyeIris && f.annotations?.leftEyeIris[0]) {\n ctx.strokeStyle = opt.useDepth ? 'rgba(255, 200, 255, 0.3)' : opt.color;\n ctx.beginPath();\n const sizeX = Math.abs(f.annotations.leftEyeIris[3][0] - f.annotations.leftEyeIris[1][0]) / 2;\n const sizeY = Math.abs(f.annotations.leftEyeIris[4][1] - f.annotations.leftEyeIris[2][1]) / 2;\n ctx.ellipse(f.annotations.leftEyeIris[0][0], f.annotations.leftEyeIris[0][1], sizeX, sizeY, 0, 0, 2 * Math.PI);\n ctx.stroke();\n if (opt.fillPolygons) {\n ctx.fillStyle = opt.useDepth ? 'rgba(255, 255, 200, 0.3)' : opt.color;\n ctx.fill();\n }\n }\n if (f.annotations?.rightEyeIris && f.annotations?.rightEyeIris[0]) {\n ctx.strokeStyle = opt.useDepth ? 'rgba(255, 200, 255, 0.3)' : opt.color;\n ctx.beginPath();\n const sizeX = Math.abs(f.annotations.rightEyeIris[3][0] - f.annotations.rightEyeIris[1][0]) / 2;\n const sizeY = Math.abs(f.annotations.rightEyeIris[4][1] - f.annotations.rightEyeIris[2][1]) / 2;\n ctx.ellipse(f.annotations.rightEyeIris[0][0], f.annotations.rightEyeIris[0][1], sizeX, sizeY, 0, 0, 2 * Math.PI);\n ctx.stroke();\n if (opt.fillPolygons) {\n ctx.fillStyle = opt.useDepth ? 'rgba(255, 255, 200, 0.3)' : opt.color;\n ctx.fill();\n }\n }\n}\n\nfunction drawGazeSpheres(f: FaceResult, ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D) {\n if (opt.drawGaze && f.rotation?.angle && typeof Path2D !== 'undefined') {\n ctx.strokeStyle = 'pink';\n const valX = (f.box[0] + f.box[2] / 2) - (f.box[3] * rad2deg(f.rotation.angle.yaw) / 90);\n const valY = (f.box[1] + f.box[3] / 2) + (f.box[2] * rad2deg(f.rotation.angle.pitch) / 90);\n const pathV = new Path2D(`\n M ${f.box[0] + f.box[2] / 2} ${f.box[1]}\n C\n ${valX} ${f.box[1]},\n ${valX} ${f.box[1] + f.box[3]},\n ${f.box[0] + f.box[2] / 2} ${f.box[1] + f.box[3]}\n `);\n const pathH = new Path2D(`\n M ${f.box[0]} ${f.box[1] + f.box[3] / 2}\n C \n ${f.box[0]} ${valY},\n ${f.box[0] + f.box[2]} ${valY},\n ${f.box[0] + f.box[2]} ${f.box[1] + f.box[3] / 2}\n `);\n ctx.stroke(pathH);\n ctx.stroke(pathV);\n }\n}\n\nfunction drawGazeArrows(f: FaceResult, ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D) {\n if (opt.drawGaze && f.rotation?.gaze.strength && f.rotation.gaze.bearing && f.annotations.leftEyeIris && f.annotations.rightEyeIris && f.annotations.leftEyeIris[0] && f.annotations.rightEyeIris[0]) {\n ctx.strokeStyle = 'pink';\n ctx.fillStyle = 'pink';\n const leftGaze = [\n f.annotations.leftEyeIris[0][0] + (Math.sin(f.rotation.gaze.bearing) * f.rotation.gaze.strength * f.box[3]),\n f.annotations.leftEyeIris[0][1] + (Math.cos(f.rotation.gaze.bearing) * f.rotation.gaze.strength * f.box[2]),\n ];\n arrow(ctx, [f.annotations.leftEyeIris[0][0], f.annotations.leftEyeIris[0][1]], [leftGaze[0], leftGaze[1]], 4);\n const rightGaze = [\n f.annotations.rightEyeIris[0][0] + (Math.sin(f.rotation.gaze.bearing) * f.rotation.gaze.strength * f.box[3]),\n f.annotations.rightEyeIris[0][1] + (Math.cos(f.rotation.gaze.bearing) * f.rotation.gaze.strength * f.box[2]),\n ];\n arrow(ctx, [f.annotations.rightEyeIris[0][0], f.annotations.rightEyeIris[0][1]], [rightGaze[0], rightGaze[1]], 4);\n }\n}\n\nfunction drawFacePolygons(f: FaceResult, ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D) {\n if (opt.drawPolygons && f.mesh.length >= 468) {\n ctx.lineWidth = 1;\n for (let i = 0; i < triangulation.length / 3; i++) {\n const points = [triangulation[i * 3 + 0], triangulation[i * 3 + 1], triangulation[i * 3 + 2]].map((index) => f.mesh[index]);\n lines(ctx, points, opt);\n }\n drawIrisElipse(f, ctx);\n }\n /*\n if (opt.drawPolygons && f.contours.length > 1) {\n ctx.lineWidth = 5;\n lines(ctx, f.contours, opt);\n }\n ctx.lineWidth = 1;\n */\n}\n\nfunction drawFacePoints(f: FaceResult, ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D) {\n if (opt.drawPoints && f.mesh.length >= 468) {\n for (let i = 0; i < f.mesh.length; i++) {\n point(ctx, f.mesh[i][0], f.mesh[i][1], f.mesh[i][2], opt);\n if (opt.drawAttention) {\n if (facemeshConstants.LANDMARKS_REFINEMENT_LIPS_CONFIG.includes(i)) point(ctx, f.mesh[i][0], f.mesh[i][1], (f.mesh[i][2] as number) + 127, opt);\n if (facemeshConstants.LANDMARKS_REFINEMENT_LEFT_EYE_CONFIG.includes(i)) point(ctx, f.mesh[i][0], f.mesh[i][1], (f.mesh[i][2] as number) - 127, opt);\n if (facemeshConstants.LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG.includes(i)) point(ctx, f.mesh[i][0], f.mesh[i][1], (f.mesh[i][2] as number) - 127, opt);\n }\n }\n }\n}\n\nfunction drawFaceBoxes(f: FaceResult, ctx) {\n if (opt.drawBoxes) {\n rect(ctx, f.box[0], f.box[1], f.box[2], f.box[3], opt);\n }\n}\n\n/** draw detected faces */\nexport function face(inCanvas: AnyCanvas, result: FaceResult[], drawOptions?: Partial) {\n opt = mergeDeep(options, drawOptions);\n if (!result || !inCanvas) return;\n const ctx = getCanvasContext(inCanvas);\n if (!ctx) return;\n ctx.font = opt.font;\n ctx.strokeStyle = opt.color;\n ctx.fillStyle = opt.color;\n for (const f of result) {\n drawFaceBoxes(f, ctx);\n drawLabels(f, ctx);\n if (f.mesh && f.mesh.length > 0) {\n drawFacePoints(f, ctx);\n drawFacePolygons(f, ctx);\n drawGazeSpheres(f, ctx);\n drawGazeArrows(f, ctx);\n }\n }\n}\n", "import { mergeDeep } from '../util/util';\nimport { getCanvasContext, rect, point, curves, colorDepth } from './primitives';\nimport { options } from './options';\nimport type { BodyResult } from '../result';\nimport type { AnyCanvas, DrawOptions } from '../exports';\n\n/** draw detected bodies */\nexport function body(inCanvas: AnyCanvas, result: BodyResult[], drawOptions?: Partial) {\n const localOptions: DrawOptions = mergeDeep(options, drawOptions);\n if (!result || !inCanvas) return;\n const ctx = getCanvasContext(inCanvas);\n if (!ctx) return;\n ctx.lineJoin = 'round';\n for (let i = 0; i < result.length; i++) {\n ctx.strokeStyle = localOptions.color;\n ctx.fillStyle = localOptions.color;\n ctx.lineWidth = localOptions.lineWidth;\n ctx.font = localOptions.font;\n if (localOptions.drawBoxes && result[i].box && result[i].box.length === 4) {\n rect(ctx, result[i].box[0], result[i].box[1], result[i].box[2], result[i].box[3], localOptions);\n if (localOptions.drawLabels) {\n if (localOptions.shadowColor && localOptions.shadowColor !== '') {\n ctx.fillStyle = localOptions.shadowColor;\n ctx.fillText(`body ${100 * result[i].score}%`, result[i].box[0] + 3, 1 + result[i].box[1] + localOptions.lineHeight, result[i].box[2]);\n }\n ctx.fillStyle = localOptions.labelColor;\n ctx.fillText(`body ${100 * result[i].score}%`, result[i].box[0] + 2, 0 + result[i].box[1] + localOptions.lineHeight, result[i].box[2]);\n }\n }\n if (localOptions.drawPoints && result[i].keypoints) {\n for (let pt = 0; pt < result[i].keypoints.length; pt++) {\n if (!result[i].keypoints[pt].score || (result[i].keypoints[pt].score === 0)) continue;\n ctx.fillStyle = colorDepth(result[i].keypoints[pt].position[2], localOptions);\n point(ctx, result[i].keypoints[pt].position[0], result[i].keypoints[pt].position[1], 0, localOptions);\n }\n }\n if (localOptions.drawLabels && result[i].keypoints) {\n ctx.font = localOptions.font;\n for (const pt of result[i].keypoints) {\n if (!pt.score || (pt.score === 0)) continue;\n ctx.fillStyle = colorDepth(pt.position[2], localOptions);\n ctx.fillText(`${pt.part} ${Math.trunc(100 * pt.score)}%`, pt.position[0] + 4, pt.position[1] + 4);\n }\n }\n if (localOptions.drawPolygons && result[i].keypoints && result[i].annotations) {\n for (const part of Object.values(result[i].annotations)) {\n for (const connected of part) curves(ctx, connected, localOptions);\n }\n }\n }\n}\n", "import { mergeDeep } from '../util/util';\nimport { getCanvasContext, rect, point, colorDepth } from './primitives';\nimport { options } from './options';\nimport type { HandResult } from '../result';\nimport type { AnyCanvas, DrawOptions, Point } from '../exports';\n\n/** draw detected hands */\nexport function hand(inCanvas: AnyCanvas, result: HandResult[], drawOptions?: Partial) {\n const localOptions: DrawOptions = mergeDeep(options, drawOptions);\n if (!result || !inCanvas) return;\n const ctx = getCanvasContext(inCanvas);\n if (!ctx) return;\n ctx.lineJoin = 'round';\n ctx.font = localOptions.font;\n for (const h of result) {\n if (localOptions.drawBoxes) {\n ctx.strokeStyle = localOptions.color;\n ctx.fillStyle = localOptions.color;\n rect(ctx, h.box[0], h.box[1], h.box[2], h.box[3], localOptions);\n if (localOptions.drawLabels) {\n if (localOptions.shadowColor && localOptions.shadowColor !== '') {\n ctx.fillStyle = localOptions.shadowColor;\n ctx.fillText(`hand:${Math.trunc(100 * h.score)}%`, h.box[0] + 3, 1 + h.box[1] + localOptions.lineHeight, h.box[2]); // can use h.label\n }\n ctx.fillStyle = localOptions.labelColor;\n ctx.fillText(`hand:${Math.trunc(100 * h.score)}%`, h.box[0] + 2, 0 + h.box[1] + localOptions.lineHeight, h.box[2]); // can use h.label\n }\n ctx.stroke();\n }\n if (localOptions.drawPoints) {\n if (h.keypoints && h.keypoints.length > 0) {\n for (const pt of h.keypoints) {\n ctx.fillStyle = colorDepth(pt[2], localOptions);\n point(ctx, pt[0], pt[1], 0, localOptions);\n }\n }\n }\n if (localOptions.drawLabels && h.annotations) {\n const addHandLabel = (part: Point[], title: string) => {\n if (!part || part.length === 0 || !part[0]) return;\n const z = part[part.length - 1][2] || -256;\n ctx.fillStyle = colorDepth(z, localOptions);\n ctx.fillText(title, part[part.length - 1][0] + 4, part[part.length - 1][1] + 4);\n };\n ctx.font = localOptions.font;\n addHandLabel(h.annotations.index, 'index');\n addHandLabel(h.annotations.middle, 'middle');\n addHandLabel(h.annotations.ring, 'ring');\n addHandLabel(h.annotations.pinky, 'pinky');\n addHandLabel(h.annotations.thumb, 'thumb');\n addHandLabel(h.annotations.palm, 'palm');\n }\n if (localOptions.drawPolygons && h.annotations) {\n const addHandLine = (part: Point[]) => {\n if (!part || part.length === 0 || !part[0]) return;\n for (let i = 0; i < part.length; i++) {\n ctx.beginPath();\n const z = part[i][2] || 0;\n ctx.strokeStyle = colorDepth(i * z, localOptions);\n ctx.moveTo(part[i > 0 ? i - 1 : 0][0], part[i > 0 ? i - 1 : 0][1]);\n ctx.lineTo(part[i][0], part[i][1]);\n ctx.stroke();\n }\n };\n ctx.lineWidth = localOptions.lineWidth;\n addHandLine(h.annotations.index);\n addHandLine(h.annotations.middle);\n addHandLine(h.annotations.ring);\n addHandLine(h.annotations.pinky);\n addHandLine(h.annotations.thumb);\n // addPart(h.annotations.palm);\n }\n }\n}\n", "import { mergeDeep } from '../util/util';\nimport { getCanvasContext, rect } from './primitives';\nimport { options } from './options';\nimport type { ObjectResult } from '../result';\nimport type { AnyCanvas, DrawOptions } from '../exports';\n\n/** draw detected objects */\nexport function object(inCanvas: AnyCanvas, result: ObjectResult[], drawOptions?: Partial) {\n const localOptions: DrawOptions = mergeDeep(options, drawOptions);\n if (!result || !inCanvas) return;\n const ctx = getCanvasContext(inCanvas);\n if (!ctx) return;\n ctx.lineJoin = 'round';\n ctx.font = localOptions.font;\n for (const h of result) {\n if (localOptions.drawBoxes) {\n ctx.strokeStyle = localOptions.color;\n ctx.fillStyle = localOptions.color;\n rect(ctx, h.box[0], h.box[1], h.box[2], h.box[3], localOptions);\n if (localOptions.drawLabels) {\n const label = `${h.label} ${Math.round(100 * h.score)}%`;\n if (localOptions.shadowColor && localOptions.shadowColor !== '') {\n ctx.fillStyle = localOptions.shadowColor;\n ctx.fillText(label, h.box[0] + 3, 1 + h.box[1] + localOptions.lineHeight, h.box[2]);\n }\n ctx.fillStyle = localOptions.labelColor;\n ctx.fillText(label, h.box[0] + 2, 0 + h.box[1] + localOptions.lineHeight, h.box[2]);\n }\n ctx.stroke();\n }\n }\n}\n", "import { mergeDeep } from '../util/util';\nimport { getCanvasContext } from './primitives';\nimport { options } from './options';\nimport type { GestureResult } from '../result';\nimport type { AnyCanvas, DrawOptions } from '../exports';\n\n/** draw detected gestures */\nexport function gesture(inCanvas: AnyCanvas, result: GestureResult[], drawOptions?: Partial) {\n const localOptions: DrawOptions = mergeDeep(options, drawOptions);\n if (!result || !inCanvas) return;\n if (localOptions.drawGestures) {\n const ctx = getCanvasContext(inCanvas);\n if (!ctx) return;\n ctx.font = localOptions.font;\n ctx.fillStyle = localOptions.color;\n let i = 1;\n for (let j = 0; j < result.length; j++) {\n let where: unknown[] = []; // what&where is a record\n let what: unknown[] = []; // what&where is a record\n [where, what] = Object.entries(result[j]);\n if ((what.length > 1) && ((what[1] as string).length > 0)) {\n const who = where[1] as number > 0 ? `#${where[1]}` : '';\n const label = `${where[0]} ${who}: ${what[1]}`;\n if (localOptions.shadowColor && localOptions.shadowColor !== '') {\n ctx.fillStyle = localOptions.shadowColor;\n ctx.fillText(label, 8, 2 + (i * localOptions.lineHeight));\n }\n ctx.fillStyle = localOptions.labelColor;\n ctx.fillText(label, 6, 0 + (i * localOptions.lineHeight));\n i += 1;\n }\n }\n }\n}\n", "import type { Tensor } from '../tfjs/types';\nimport type { FaceResult } from '../result';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport { meshAnnotations } from './facemeshcoords';\n\nconst expandFact = 0.1;\nconst alpha = 0.5;\n\n// point inclusion in polygon based on https://wrf.ecse.rpi.edu/Research/Short_Notes/pnpoly.html\nfunction insidePoly(x: number, y: number, polygon: { x: number, y: number }[]): boolean {\n let inside = false;\n let j = polygon.length - 1;\n for (let i = 0; i < polygon.length; j = i++) {\n if (((polygon[i].y > y) !== (polygon[j].y > y)) && (x < (polygon[j].x - polygon[i].x) * (y - polygon[i].y) / (polygon[j].y - polygon[i].y) + polygon[i].x)) inside = !inside;\n }\n return inside;\n}\n\nexport async function mask(face: FaceResult): Promise {\n if (!face.tensor) return face.tensor;\n if (!face.mesh || face.mesh.length < 100) return face.tensor;\n const width = face.tensor.shape[2] || 0;\n const height = face.tensor.shape[1] || 0;\n const buffer = await face.tensor.buffer();\n let silhouette: { x: number, y: number }[] = [];\n for (const pt of meshAnnotations.silhouette) silhouette.push({ x: (face.mesh[pt][0] - face.box[0]) / face.box[2], y: (face.mesh[pt][1] - face.box[1]) / face.box[3] }); // add all silhouette points scaled to local box\n if (expandFact && expandFact > 0) silhouette = silhouette.map((pt) => ({ x: pt.x > 0.5 ? pt.x + expandFact : pt.x - expandFact, y: pt.y > 0.5 ? pt.y + expandFact : pt.y - expandFact })); // expand silhouette\n for (let x = 0; x < width; x++) {\n for (let y = 0; y < height; y++) {\n const inside = insidePoly(x / width, y / width, silhouette);\n if (!inside) {\n buffer.set(alpha * buffer.get(0, y, x, 0), 0, y, x, 0);\n buffer.set(alpha * buffer.get(0, y, x, 1), 0, y, x, 1);\n buffer.set(alpha * buffer.get(0, y, x, 2), 0, y, x, 2);\n }\n }\n }\n const output = buffer.toTensor();\n tf.dispose(buffer);\n return output;\n}\n", "import type { Point, FaceResult } from '../result';\n\ntype Vector = [number, number, number];\n\nconst calculateGaze = (face: FaceResult): { bearing: number, strength: number } => {\n const radians = (pt1: Point, pt2: Point) => Math.atan2(pt1[1] - pt2[1], pt1[0] - pt2[0]); // function to calculate angle between any two points\n if (!face.annotations.rightEyeIris || !face.annotations.leftEyeIris) return { bearing: 0, strength: 0 };\n\n const offsetIris = [0, -0.1]; // iris center may not align with average of eye extremes\n const eyeRatio = 1; // factor to normalize changes x vs y\n\n const left = (face.mesh[33][2] || 0) > (face.mesh[263][2] || 0); // pick left or right eye depending which one is closer bazed on outsize point z axis\n const irisCenter = left ? face.mesh[473] : face.mesh[468];\n const eyeCenter = left // eye center is average of extreme points on x axis for both x and y, ignoring y extreme points as eyelids naturally open/close more when gazing up/down so relative point is less precise\n ? [(face.mesh[133][0] + face.mesh[33][0]) / 2, (face.mesh[133][1] + face.mesh[33][1]) / 2]\n : [(face.mesh[263][0] + face.mesh[362][0]) / 2, (face.mesh[263][1] + face.mesh[362][1]) / 2];\n const eyeSize = left // eye size is difference between extreme points for both x and y, used to normalize & squarify eye dimensions\n ? [face.mesh[133][0] - face.mesh[33][0], face.mesh[23][1] - face.mesh[27][1]]\n : [face.mesh[263][0] - face.mesh[362][0], face.mesh[253][1] - face.mesh[257][1]];\n const eyeDiff: Point = [ // x distance between extreme point and center point normalized with eye size\n (eyeCenter[0] - irisCenter[0]) / eyeSize[0] - offsetIris[0],\n eyeRatio * (irisCenter[1] - eyeCenter[1]) / eyeSize[1] - offsetIris[1],\n ];\n let strength = Math.sqrt((eyeDiff[0] * eyeDiff[0]) + (eyeDiff[1] * eyeDiff[1])); // vector length is a diagonal between two differences\n strength = Math.min(strength, face.boxRaw[2] / 2, face.boxRaw[3] / 2); // limit strength to half of box size to avoid clipping due to low precision\n const bearing = (radians([0, 0], eyeDiff) + (Math.PI / 2)) % Math.PI; // using eyeDiff instead eyeCenter/irisCenter combo due to manual adjustments and rotate clockwise 90degrees\n return { bearing, strength };\n};\n\nexport const calculateFaceAngle = (face: FaceResult, imageSize: [number, number]): {\n angle: { pitch: number, yaw: number, roll: number },\n matrix: [number, number, number, number, number, number, number, number, number],\n gaze: { bearing: number, strength: number },\n} => {\n // const degrees = (theta) => Math.abs(((theta * 180) / Math.PI) % 360);\n const normalize = (v: Vector): Vector => { // normalize vector\n const length = Math.sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]);\n v[0] /= length;\n v[1] /= length;\n v[2] /= length;\n return v;\n };\n const subVectors = (a: Vector, b: Vector): Vector => { // vector subtraction (a - b)\n const x = a[0] - b[0];\n const y = a[1] - b[1];\n const z = a[2] - b[2];\n return [x, y, z];\n };\n const crossVectors = (a: Vector, b: Vector): Vector => { // vector cross product (a x b)\n const x = a[1] * b[2] - a[2] * b[1];\n const y = a[2] * b[0] - a[0] * b[2];\n const z = a[0] * b[1] - a[1] * b[0];\n return [x, y, z];\n };\n // 3x3 rotation matrix to Euler angles based on https://www.geometrictools.com/Documentation/EulerAngles.pdf\n const rotationMatrixToEulerAngle = (r: number[]): { pitch: number, yaw: number, roll: number } => {\n const [r00, _r01, _r02, r10, r11, r12, r20, r21, r22] = r; // eslint-disable-line @typescript-eslint/no-unused-vars\n let thetaX: number;\n let thetaY: number;\n let thetaZ: number;\n if (r10 < 1) { // YZX calculation\n if (r10 > -1) {\n thetaZ = Math.asin(r10);\n thetaY = Math.atan2(-r20, r00);\n thetaX = Math.atan2(-r12, r11);\n } else {\n thetaZ = -Math.PI / 2;\n thetaY = -Math.atan2(r21, r22);\n thetaX = 0;\n }\n } else {\n thetaZ = Math.PI / 2;\n thetaY = Math.atan2(r21, r22);\n thetaX = 0;\n }\n if (Number.isNaN(thetaX)) thetaX = 0;\n if (Number.isNaN(thetaY)) thetaY = 0;\n if (Number.isNaN(thetaZ)) thetaZ = 0;\n return { pitch: 2 * -thetaX, yaw: 2 * -thetaY, roll: 2 * -thetaZ };\n };\n\n /*\n const meshToEulerAngle = (mesh) => { // simple Euler angle calculation based existing 3D mesh\n const radians = (a1, a2, b1, b2) => Math.atan2(b2 - a2, b1 - a1);\n return { // values are in radians in range of -pi/2 to pi/2 which is -90 to +90 degrees, value of 0 means center\n pitch: radians(mesh[10][1], mesh[10][2], mesh[152][1], mesh[152][2]), // looking at y,z of top and bottom points of the face // pitch is face move up/down\n yaw: radians(mesh[33][0], mesh[33][2], mesh[263][0], mesh[263][2]), // looking at x,z of outside corners of leftEye and rightEye // yaw is face turn left/right\n roll: radians(mesh[33][0], mesh[33][1], mesh[263][0], mesh[263][1]), // looking at x,y of outside corners of leftEye and rightEye // roll is face lean left/right\n };\n };\n */\n\n // initialize gaze and mesh\n const mesh = face.meshRaw;\n if (!mesh || mesh.length < 300) return { angle: { pitch: 0, yaw: 0, roll: 0 }, matrix: [1, 0, 0, 0, 1, 0, 0, 0, 1], gaze: { bearing: 0, strength: 0 } };\n\n const size = Math.max(face.boxRaw[2] * imageSize[0], face.boxRaw[3] * imageSize[1]) / 1.5;\n // top, bottom, left, right\n const pts: Point[] = [mesh[10], mesh[152], mesh[234], mesh[454]].map((pt) => [pt[0] * imageSize[0] / size, pt[1] * imageSize[1] / size, pt[2]] as Point); // make the xyz coordinates proportional, independent of the image/box size\n\n const yAxis = normalize(subVectors(pts[1] as Vector, pts[0] as Vector));\n let xAxis = normalize(subVectors(pts[3] as Vector, pts[2] as Vector));\n const zAxis = normalize(crossVectors(xAxis, yAxis));\n // adjust xAxis to make sure that all axes are perpendicular to each other\n xAxis = crossVectors(yAxis, zAxis);\n\n // Rotation Matrix from Axis Vectors - http://renderdan.blogspot.com/2006/05/rotation-matrix-from-axis-vectors.html\n // 3x3 rotation matrix is flatten to array in row-major order. Note that the rotation represented by this matrix is inverted.\n const matrix: [number, number, number, number, number, number, number, number, number] = [\n xAxis[0], xAxis[1], xAxis[2],\n yAxis[0], yAxis[1], yAxis[2],\n zAxis[0], zAxis[1], zAxis[2],\n ];\n const angle = rotationMatrixToEulerAngle(matrix);\n // const angle = meshToEulerAngle(mesh);\n\n // we have iris keypoints so we can calculate gaze direction\n const gaze = mesh.length === 478 ? calculateGaze(face) : { bearing: 0, strength: 0 };\n\n return { angle, matrix, gaze };\n};\n", "/**\n * Face algorithm implementation\n * Uses FaceMesh, Emotion and FaceRes models to create a unified pipeline\n */\n\nimport { log, now } from '../util/util';\nimport { env } from '../util/env';\nimport * as tf from '../../dist/tfjs.esm.js';\nimport * as facemesh from './facemesh';\nimport * as emotion from '../gear/emotion';\nimport * as faceres from './faceres';\nimport * as mask from './mask';\nimport * as antispoof from './antispoof';\nimport * as liveness from './liveness';\nimport * as gear from '../gear/gear';\nimport * as ssrnetAge from '../gear/ssrnet-age';\nimport * as ssrnetGender from '../gear/ssrnet-gender';\nimport * as mobilefacenet from './mobilefacenet';\nimport * as insightface from './insightface';\nimport type { FaceResult, Emotion, Gender, Race } from '../result';\nimport type { Tensor } from '../tfjs/types';\nimport type { Human } from '../human';\nimport { calculateFaceAngle } from './angles';\n\ninterface DescRes { age: number, gender: Gender, genderScore: number, descriptor: number[], race?: { score: number, race: Race }[] }\n\nexport const detectFace = async (instance: Human /* instance of human */, input: Tensor): Promise => {\n // run facemesh, includes blazeface and iris\n let timeStamp: number = now();\n let ageRes: { age: number } | Promise<{ age: number }> | null;\n let gearRes: gear.GearType | Promise | null;\n let genderRes: { gender: string, genderScore: number } | Promise<{ gender: string, genderScore: number }> | null;\n let emotionRes: { score: number, emotion: Emotion }[] | Promise<{ score: number, emotion: Emotion }[]>;\n let mobilefacenetRes: number[] | Promise | null;\n let insightfaceRes: number[] | Promise | null;\n let antispoofRes: number | Promise | null;\n let livenessRes: number | Promise | null;\n let descRes: DescRes | Promise | null;\n\n const faceRes: FaceResult[] = [];\n instance.state = 'run:face';\n\n const faces = await facemesh.predict(input, instance.config);\n instance.performance.face = env.perfadd ? (instance.performance.face || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);\n if (!input.shape || input.shape.length !== 4) return [];\n if (!faces) return [];\n // for (const face of faces) {\n for (let i = 0; i < faces.length; i++) {\n instance.analyze('Get Face');\n\n // is something went wrong, skip the face\n // @ts-ignore possibly undefied\n if (!faces[i].tensor || faces[i].tensor.isDisposedInternal) {\n log('Face object is disposed:', faces[i].tensor);\n continue;\n }\n\n // optional face mask\n if (instance.config.face.detector?.mask) {\n const masked = await mask.mask(faces[i]);\n tf.dispose(faces[i].tensor);\n if (masked) faces[i].tensor = masked;\n }\n\n // calculate face angles\n const rotation = faces[i].mesh && (faces[i].mesh.length > 200) ? calculateFaceAngle(faces[i], [input.shape[2], input.shape[1]]) : null;\n\n // run emotion, inherits face from blazeface\n instance.analyze('Start Emotion:');\n if (instance.config.async) {\n emotionRes = instance.config.face.emotion?.enabled ? emotion.predict(faces[i].tensor || tf.tensor([]), instance.config, i, faces.length) : [];\n } else {\n instance.state = 'run:emotion';\n timeStamp = now();\n emotionRes = instance.config.face.emotion?.enabled ? await emotion.predict(faces[i].tensor || tf.tensor([]), instance.config, i, faces.length) : [];\n instance.performance.emotion = env.perfadd ? (instance.performance.emotion || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);\n }\n instance.analyze('End Emotion:');\n\n // run antispoof, inherits face from blazeface\n instance.analyze('Start AntiSpoof:');\n if (instance.config.async) {\n antispoofRes = instance.config.face.antispoof?.enabled ? antispoof.predict(faces[i].tensor || tf.tensor([]), instance.config, i, faces.length) : 0;\n } else {\n instance.state = 'run:antispoof';\n timeStamp = now();\n antispoofRes = instance.config.face.antispoof?.enabled ? await antispoof.predict(faces[i].tensor || tf.tensor([]), instance.config, i, faces.length) : 0;\n instance.performance.antispoof = env.perfadd ? (instance.performance.antispoof || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);\n }\n instance.analyze('End AntiSpoof:');\n\n // run liveness, inherits face from blazeface\n instance.analyze('Start Liveness:');\n if (instance.config.async) {\n livenessRes = instance.config.face.liveness?.enabled ? liveness.predict(faces[i].tensor || tf.tensor([]), instance.config, i, faces.length) : 0;\n } else {\n instance.state = 'run:liveness';\n timeStamp = now();\n livenessRes = instance.config.face.liveness?.enabled ? await liveness.predict(faces[i].tensor || tf.tensor([]), instance.config, i, faces.length) : 0;\n instance.performance.liveness = env.perfadd ? (instance.performance.antispoof || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);\n }\n instance.analyze('End Liveness:');\n\n // run gear, inherits face from blazeface\n instance.analyze('Start GEAR:');\n if (instance.config.async) {\n gearRes = instance.config.face.gear?.enabled ? gear.predict(faces[i].tensor || tf.tensor([]), instance.config, i, faces.length) : null;\n } else {\n instance.state = 'run:gear';\n timeStamp = now();\n gearRes = instance.config.face.gear?.enabled ? await gear.predict(faces[i].tensor || tf.tensor([]), instance.config, i, faces.length) : null;\n instance.performance.gear = Math.trunc(now() - timeStamp);\n }\n instance.analyze('End GEAR:');\n\n // run gear, inherits face from blazeface\n instance.analyze('Start SSRNet:');\n if (instance.config.async) {\n ageRes = instance.config.face['ssrnet']?.enabled ? ssrnetAge.predict(faces[i].tensor || tf.tensor([]), instance.config, i, faces.length) : null;\n genderRes = instance.config.face['ssrnet']?.enabled ? ssrnetGender.predict(faces[i].tensor || tf.tensor([]), instance.config, i, faces.length) : null;\n } else {\n instance.state = 'run:ssrnet';\n timeStamp = now();\n ageRes = instance.config.face['ssrnet']?.enabled ? await ssrnetAge.predict(faces[i].tensor || tf.tensor([]), instance.config, i, faces.length) : null;\n genderRes = instance.config.face['ssrnet']?.enabled ? await ssrnetGender.predict(faces[i].tensor || tf.tensor([]), instance.config, i, faces.length) : null;\n instance.performance.ssrnet = Math.trunc(now() - timeStamp);\n }\n instance.analyze('End SSRNet:');\n\n // run mobilefacenet alternative, inherits face from blazeface\n instance.analyze('Start MobileFaceNet:');\n if (instance.config.async) {\n mobilefacenetRes = instance.config.face['mobilefacenet']?.enabled ? mobilefacenet.predict(faces[i].tensor || tf.tensor([]), instance.config, i, faces.length) : null;\n } else {\n instance.state = 'run:mobilefacenet';\n timeStamp = now();\n mobilefacenetRes = instance.config.face['mobilefacenet']?.enabled ? await mobilefacenet.predict(faces[i].tensor || tf.tensor([]), instance.config, i, faces.length) : null;\n instance.performance.mobilefacenet = Math.trunc(now() - timeStamp);\n }\n instance.analyze('End MobileFaceNet:');\n\n // run insightface alternative, inherits face from blazeface\n instance.analyze('Start InsightFace:');\n if (instance.config.async) {\n insightfaceRes = instance.config.face['insightface']?.enabled ? insightface.predict(faces[i].tensor || tf.tensor([]), instance.config, i, faces.length) : null;\n } else {\n instance.state = 'run:mobilefacenet';\n timeStamp = now();\n insightfaceRes = instance.config.face['insightface']?.enabled ? await insightface.predict(faces[i].tensor || tf.tensor([]), instance.config, i, faces.length) : null;\n instance.performance.mobilefacenet = Math.trunc(now() - timeStamp);\n }\n instance.analyze('End InsightFace:');\n\n // run faceres, inherits face from blazeface\n instance.analyze('Start Description:');\n if (instance.config.async) {\n descRes = faceres.predict(faces[i].tensor || tf.tensor([]), instance.config, i, faces.length);\n } else {\n instance.state = 'run:description';\n timeStamp = now();\n descRes = await faceres.predict(faces[i].tensor || tf.tensor([]), instance.config, i, faces.length);\n instance.performance.description = env.perfadd ? (instance.performance.description || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);\n }\n instance.analyze('End Description:');\n\n // if async wait for results\n if (instance.config.async) {\n [ageRes, genderRes, emotionRes, mobilefacenetRes, insightfaceRes, descRes, gearRes, antispoofRes, livenessRes] = await Promise.all([ageRes, genderRes, emotionRes, mobilefacenetRes, insightfaceRes, descRes, gearRes, antispoofRes, livenessRes]);\n }\n instance.analyze('Finish Face:');\n\n if (instance.config.face['ssrnet']?.enabled && ageRes && genderRes) { // override age/gender if ssrnet model is used\n descRes = {\n ...(descRes as DescRes),\n age: (ageRes as { age: number}).age,\n gender: (genderRes as { gender: Gender, genderScore: number }).gender,\n genderScore: (genderRes as { gender: Gender, genderScore: number }).genderScore,\n };\n }\n if (instance.config.face.gear?.enabled && gearRes) { // override age/gender/race if gear model is used\n descRes = {\n ...(descRes as DescRes),\n age: (gearRes as gear.GearType).age,\n gender: (gearRes as gear.GearType).gender,\n genderScore: (gearRes as gear.GearType).genderScore,\n race: (gearRes as gear.GearType).race,\n };\n }\n if (instance.config.face['mobilefacenet']?.enabled && mobilefacenetRes) { // override descriptor if mobilefacenet model is used\n (descRes as DescRes).descriptor = mobilefacenetRes as number[];\n }\n\n if (instance.config.face['insightface']?.enabled && insightfaceRes) { // override descriptor if insightface model is used\n (descRes as DescRes).descriptor = insightfaceRes as number[];\n }\n\n // calculate iris distance\n // iris: array[ center, left, top, right, bottom]\n if (!instance.config.face.iris?.enabled) {\n // if (faces[i]?.annotations?.leftEyeIris) delete faces[i].annotations.leftEyeIris;\n // if (faces[i]?.annotations?.rightEyeIris) delete faces[i].annotations.rightEyeIris;\n }\n const irisSize = (faces[i]?.annotations?.leftEyeIris?.[0] && faces[i]?.annotations?.rightEyeIris?.[0]\n && (faces[i].annotations.leftEyeIris.length > 0) && (faces[i].annotations.rightEyeIris.length > 0)\n && (faces[i].annotations.leftEyeIris[0] !== null) && (faces[i].annotations.rightEyeIris[0] !== null))\n ? Math.max(Math.abs(faces[i].annotations.leftEyeIris[3][0] - faces[i].annotations.leftEyeIris[1][0]), Math.abs(faces[i].annotations.rightEyeIris[4][1] - faces[i].annotations.rightEyeIris[2][1])) / input.shape[2]\n : 0; // note: average human iris size is 11.7mm\n\n // optionally return tensor\n const tensor = instance.config.face.detector?.return ? tf.squeeze(faces[i].tensor) : null;\n // dispose original face tensor\n tf.dispose(faces[i].tensor);\n // delete temp face image\n if (faces[i].tensor) delete faces[i].tensor;\n // combine results\n const res: FaceResult = {\n ...faces[i],\n id: i,\n };\n if ((descRes as DescRes).age) res.age = (descRes as DescRes).age;\n if ((descRes as DescRes).gender) res.gender = (descRes as DescRes).gender;\n if ((descRes as DescRes).genderScore) res.genderScore = (descRes as DescRes).genderScore;\n if ((descRes as DescRes).descriptor) res.embedding = (descRes as DescRes).descriptor;\n if ((descRes as DescRes).race) res.race = (descRes as DescRes).race as { score: number, race: Race }[];\n if (emotionRes) res.emotion = emotionRes as { score: number, emotion: Emotion }[];\n if (antispoofRes) res.real = antispoofRes as number;\n if (livenessRes) res.live = livenessRes as number;\n if (irisSize && irisSize !== 0) res.iris = Math.trunc(500 / irisSize / 11.7) / 100;\n if (rotation) res.rotation = rotation;\n if (tensor) res.tensor = tensor;\n faceRes.push(res);\n instance.analyze('End Face');\n }\n instance.analyze('End FaceMesh:');\n if (instance.config.async) {\n if (instance.performance.face) delete instance.performance.face;\n if (instance.performance.age) delete instance.performance.age;\n if (instance.performance.gender) delete instance.performance.gender;\n if (instance.performance.emotion) delete instance.performance.emotion;\n }\n return faceRes;\n};\n", "/**\n * Gesture detection algorithm\n */\n\nimport type { GestureResult, BodyResult, FaceResult, HandResult, Point } from '../result';\nimport * as fingerPose from '../hand/fingerpose';\n\n/** face gesture type */\nexport type FaceGesture =\n `facing ${'left' | 'center' | 'right'}`\n | `blink ${'left' | 'right'} eye`\n | `mouth ${number}% open`\n | `head ${'up' | 'down'}`;\n\n/** iris gesture type */\nexport type IrisGesture =\n 'facing center'\n | `looking ${'left' | 'right' | 'up' | 'down'}`\n | 'looking center';\n\n/** body gesture type */\nexport type BodyGesture =\n `leaning ${'left' | 'right'}`\n | `raise ${'left' | 'right'} hand`\n | 'i give up';\n\n/** hand gesture type */\nexport type HandGesture =\n `${'thumb' | 'index' | 'middle' | 'ring' | 'pinky'} forward`\n | `${'thumb' | 'index' | 'middle' | 'ring' | 'pinky'} up`\n | 'victory'\n | 'thumbs up';\n\nexport const body = (res: BodyResult[]): GestureResult[] => {\n if (!res) return [];\n const gestures: { body: number, gesture: BodyGesture }[] = [];\n for (let i = 0; i < res.length; i++) {\n // raising hands\n const leftWrist = res[i].keypoints.find((a) => (a.part === 'leftWrist'));\n const rightWrist = res[i].keypoints.find((a) => (a.part === 'rightWrist'));\n const nose = res[i].keypoints.find((a) => (a.part === 'nose'));\n if (nose && leftWrist && rightWrist && (leftWrist.position[1] < nose.position[1]) && (rightWrist.position[1] < nose.position[1])) gestures.push({ body: i, gesture: 'i give up' });\n else if (nose && leftWrist && (leftWrist.position[1] < nose.position[1])) gestures.push({ body: i, gesture: 'raise left hand' });\n else if (nose && rightWrist && (rightWrist.position[1] < nose.position[1])) gestures.push({ body: i, gesture: 'raise right hand' });\n\n // leaning\n const leftShoulder = res[i].keypoints.find((a) => (a.part === 'leftShoulder'));\n const rightShoulder = res[i].keypoints.find((a) => (a.part === 'rightShoulder'));\n if (leftShoulder && rightShoulder && Math.abs(leftShoulder.positionRaw[1] - rightShoulder.positionRaw[1]) > 0.1) {\n gestures.push({ body: i, gesture: `leaning ${(leftShoulder.position[1] > rightShoulder.position[1]) ? 'left' : 'right'}` });\n }\n }\n return gestures;\n};\n\nexport const face = (res: FaceResult[]): GestureResult[] => {\n if (!res) return [];\n const gestures: { face: number, gesture: FaceGesture }[] = [];\n for (let i = 0; i < res.length; i++) {\n if (res[i].mesh && res[i].mesh.length > 450) {\n const zDiff = (res[i].mesh[33][2] || 0) - (res[i].mesh[263][2] || 0);\n const xDiff = res[i].mesh[33][0] - res[i].mesh[263][0];\n if (Math.abs(zDiff / xDiff) <= 0.15) gestures.push({ face: i, gesture: 'facing center' });\n else gestures.push({ face: i, gesture: `facing ${zDiff < 0 ? 'left' : 'right'}` });\n const openLeft = Math.abs(res[i].mesh[374][1] - res[i].mesh[386][1]) / Math.abs(res[i].mesh[443][1] - res[i].mesh[450][1]); // center of eye inner lid y coord div center of wider eye border y coord\n if (openLeft < 0.2) gestures.push({ face: i, gesture: 'blink left eye' });\n const openRight = Math.abs(res[i].mesh[145][1] - res[i].mesh[159][1]) / Math.abs(res[i].mesh[223][1] - res[i].mesh[230][1]); // center of eye inner lid y coord div center of wider eye border y coord\n if (openRight < 0.2) gestures.push({ face: i, gesture: 'blink right eye' });\n const mouthOpen = Math.min(100, 500 * Math.abs(res[i].mesh[13][1] - res[i].mesh[14][1]) / Math.abs(res[i].mesh[10][1] - res[i].mesh[152][1]));\n if (mouthOpen > 10) gestures.push({ face: i, gesture: `mouth ${Math.trunc(mouthOpen)}% open` });\n const chinDepth = res[i].mesh[152][2] || 0;\n if (Math.abs(chinDepth) > 10) gestures.push({ face: i, gesture: `head ${chinDepth < 0 ? 'up' : 'down'}` });\n }\n }\n return gestures;\n};\n\nexport const iris = (res: FaceResult[]): GestureResult[] => {\n if (!res) return [];\n const gestures: { iris: number, gesture: IrisGesture }[] = [];\n for (let i = 0; i < res.length; i++) {\n if (!res[i].annotations?.leftEyeIris?.[0] || !res[i].annotations?.rightEyeIris?.[0]) continue;\n const sizeXLeft = res[i].annotations.leftEyeIris[3][0] - res[i].annotations.leftEyeIris[1][0];\n const sizeYLeft = res[i].annotations.leftEyeIris[4][1] - res[i].annotations.leftEyeIris[2][1];\n const areaLeft = Math.abs(sizeXLeft * sizeYLeft);\n\n const sizeXRight = res[i].annotations.rightEyeIris[3][0] - res[i].annotations.rightEyeIris[1][0];\n const sizeYRight = res[i].annotations.rightEyeIris[4][1] - res[i].annotations.rightEyeIris[2][1];\n const areaRight = Math.abs(sizeXRight * sizeYRight);\n\n let center = false;\n const difference = Math.abs(areaLeft - areaRight) / Math.max(areaLeft, areaRight);\n if (difference < 0.25) {\n center = true;\n gestures.push({ iris: i, gesture: 'facing center' });\n }\n\n const leftIrisCenterX = Math.abs(res[i].mesh[263][0] - res[i].annotations.leftEyeIris[0][0]) / res[i].box[2];\n const rightIrisCenterX = Math.abs(res[i].mesh[33][0] - res[i].annotations.rightEyeIris[0][0]) / res[i].box[2];\n if (leftIrisCenterX > 0.06 || rightIrisCenterX > 0.06) center = false;\n if (leftIrisCenterX > rightIrisCenterX) { // check eye with bigger offset\n if (leftIrisCenterX > 0.05) gestures.push({ iris: i, gesture: 'looking right' });\n } else {\n if (rightIrisCenterX > 0.05) gestures.push({ iris: i, gesture: 'looking left' });\n }\n\n const rightIrisCenterY = Math.abs(res[i].mesh[145][1] - res[i].annotations.rightEyeIris[0][1]) / res[i].box[3];\n const leftIrisCenterY = Math.abs(res[i].mesh[374][1] - res[i].annotations.leftEyeIris[0][1]) / res[i].box[3];\n if (leftIrisCenterY < 0.01 || rightIrisCenterY < 0.01 || leftIrisCenterY > 0.022 || rightIrisCenterY > 0.022) center = false;\n if (leftIrisCenterY < 0.01 || rightIrisCenterY < 0.01) gestures.push({ iris: i, gesture: 'looking down' });\n if (leftIrisCenterY > 0.022 || rightIrisCenterY > 0.022) gestures.push({ iris: i, gesture: 'looking up' });\n\n // still center;\n if (center) gestures.push({ iris: i, gesture: 'looking center' });\n }\n return gestures;\n};\n\nexport const hand = (res: HandResult[]): GestureResult[] => {\n if (!res) return [];\n const gestures: { hand: number, gesture: HandGesture }[] = [];\n for (let i = 0; i < res.length; i++) {\n const fingers: { name: string, position: Point }[] = [];\n if (res[i].annotations) {\n for (const [finger, pos] of Object.entries(res[i].annotations)) {\n if (finger !== 'palmBase' && Array.isArray(pos) && pos[0]) fingers.push({ name: finger.toLowerCase(), position: pos[0] }); // get tip of each finger\n }\n }\n if (fingers && fingers.length > 0) {\n const closest = fingers.reduce((best, a) => ((best.position[2] || 0) < (a.position[2] || 0) ? best : a));\n gestures.push({ hand: i, gesture: `${closest.name} forward` as HandGesture });\n const highest = fingers.reduce((best, a) => (best.position[1] < a.position[1] ? best : a));\n gestures.push({ hand: i, gesture: `${highest.name} up` as HandGesture });\n }\n if (res[i].keypoints) {\n const poses = fingerPose.match(res[i].keypoints);\n for (const pose of poses) gestures.push({ hand: i, gesture: pose.name as HandGesture });\n }\n }\n return gestures;\n};\n", "/**\n * Results interpolation for smoothening of video detection results inbetween detected frames\n */\n\nimport type { Result, FaceResult, BodyResult, HandResult, ObjectResult, PersonResult, Box, Point, BodyLandmark, BodyAnnotation } from '../result';\nimport type { Config } from '../config';\n\nimport * as moveNetCoords from '../body/movenetcoords';\nimport * as blazePoseCoords from '../body/blazeposecoords';\nimport * as efficientPoseCoords from '../body/efficientposecoords';\nimport { now } from './util';\nimport { env } from './env';\n\nconst bufferedResult: Result = { face: [], body: [], hand: [], gesture: [], object: [], persons: [], performance: {}, timestamp: 0, error: null };\nlet interpolateTime = 0;\n\nexport function calc(newResult: Result, config: Config): Result {\n const t0 = now();\n if (!newResult) return { face: [], body: [], hand: [], gesture: [], object: [], persons: [], performance: {}, timestamp: 0, error: null };\n // each record is only updated using deep clone when number of detected record changes, otherwise it will converge by itself\n // otherwise bufferedResult is a shallow clone of result plus updated local calculated values\n // thus mixing by-reference and by-value assignments to minimize memory operations\n\n const elapsed = Date.now() - newResult.timestamp;\n\n /* curve fitted: buffer = 8 - ln(delay)\n interpolation formula: current = ((buffer - 1) * previous + live) / buffer\n - at 50ms delay buffer = ~4.1 => 28% towards live data\n - at 250ms delay buffer = ~2.5 => 40% towards live data\n - at 500ms delay buffer = ~1.8 => 55% towards live data\n - at 750ms delay buffer = ~1.4 => 71% towards live data\n - at 1sec delay buffer = 1 which means live data is used\n */\n const bufferedFactor = elapsed < 1000 ? 8 - Math.log(elapsed + 1) : 1;\n\n if (newResult.canvas) bufferedResult.canvas = newResult.canvas;\n if (newResult.error) bufferedResult.error = newResult.error;\n\n // interpolate body results\n if (!bufferedResult.body || (newResult.body.length !== bufferedResult.body.length)) {\n bufferedResult.body = JSON.parse(JSON.stringify(newResult.body)) as BodyResult[]; // deep clone once\n } else {\n for (let i = 0; i < newResult.body.length; i++) {\n const box = newResult.body[i].box // update box\n .map((newBoxCoord, j) => ((bufferedFactor - 1) * bufferedResult.body[i].box[j] + newBoxCoord) / bufferedFactor) as Box;\n const boxRaw = newResult.body[i].boxRaw // update boxRaw\n .map((newBoxCoord, j) => ((bufferedFactor - 1) * bufferedResult.body[i].boxRaw[j] + newBoxCoord) / bufferedFactor) as Box;\n const keypoints = (newResult.body[i].keypoints // update keypoints\n .map((newKpt, j) => ({\n score: newKpt.score,\n part: newKpt.part,\n position: [\n bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].position[0] || 0) + (newKpt.position[0] || 0)) / bufferedFactor : newKpt.position[0],\n bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].position[1] || 0) + (newKpt.position[1] || 0)) / bufferedFactor : newKpt.position[1],\n bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].position[2] || 0) + (newKpt.position[2] || 0)) / bufferedFactor : newKpt.position[2],\n ],\n positionRaw: [\n bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].positionRaw[0] || 0) + (newKpt.positionRaw[0] || 0)) / bufferedFactor : newKpt.positionRaw[0],\n bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].positionRaw[1] || 0) + (newKpt.positionRaw[1] || 0)) / bufferedFactor : newKpt.positionRaw[1],\n bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].positionRaw[2] || 0) + (newKpt.positionRaw[2] || 0)) / bufferedFactor : newKpt.positionRaw[2],\n ],\n distance: [\n bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].distance?.[0] || 0) + (newKpt.distance?.[0] || 0)) / bufferedFactor : newKpt.distance?.[0],\n bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].distance?.[1] || 0) + (newKpt.distance?.[1] || 0)) / bufferedFactor : newKpt.distance?.[1],\n bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].distance?.[2] || 0) + (newKpt.distance?.[2] || 0)) / bufferedFactor : newKpt.distance?.[2],\n ],\n }))) as { score: number, part: BodyLandmark, position: [number, number, number?], positionRaw: [number, number, number?] }[];\n\n const annotations: Record = {} as Record; // recreate annotations\n let coords = { connected: {} };\n if (config.body.modelPath?.includes('efficientpose')) coords = efficientPoseCoords;\n else if (config.body.modelPath?.includes('blazepose')) coords = blazePoseCoords;\n else if (config.body.modelPath?.includes('movenet')) coords = moveNetCoords;\n for (const [name, indexes] of Object.entries(coords.connected as Record)) {\n const pt: Point[][] = [];\n for (let j = 0; j < indexes.length - 1; j++) {\n const pt0 = keypoints.find((kp) => kp.part === indexes[j]);\n const pt1 = keypoints.find((kp) => kp.part === indexes[j + 1]);\n // if (pt0 && pt1 && pt0.score > (config.body.minConfidence || 0) && pt1.score > (config.body.minConfidence || 0)) pt.push([pt0.position, pt1.position]);\n if (pt0 && pt1) pt.push([pt0.position, pt1.position]);\n }\n annotations[name] = pt;\n }\n bufferedResult.body[i] = { ...newResult.body[i], box, boxRaw, keypoints, annotations }; // shallow clone plus updated values\n }\n }\n\n // interpolate hand results\n if (!bufferedResult.hand || (newResult.hand.length !== bufferedResult.hand.length)) {\n bufferedResult.hand = JSON.parse(JSON.stringify(newResult.hand)); // deep clone once\n } else {\n for (let i = 0; i < newResult.hand.length; i++) {\n const box = (newResult.hand[i].box// update box\n .map((b, j) => ((bufferedFactor - 1) * bufferedResult.hand[i].box[j] + b) / bufferedFactor)) as Box;\n const boxRaw = (newResult.hand[i].boxRaw // update boxRaw\n .map((b, j) => ((bufferedFactor - 1) * bufferedResult.hand[i].boxRaw[j] + b) / bufferedFactor)) as Box;\n if (bufferedResult.hand[i].keypoints.length !== newResult.hand[i].keypoints.length) bufferedResult.hand[i].keypoints = newResult.hand[i].keypoints; // reset keypoints as previous frame did not have them\n const keypoints = newResult.hand[i].keypoints && newResult.hand[i].keypoints.length > 0 ? newResult.hand[i].keypoints // update landmarks\n .map((landmark, j) => landmark\n .map((coord, k) => (((bufferedFactor - 1) * (bufferedResult.hand[i].keypoints[j][k] || 1) + (coord || 0)) / bufferedFactor)) as Point)\n : [];\n let annotations = {};\n if (Object.keys(bufferedResult.hand[i].annotations).length !== Object.keys(newResult.hand[i].annotations).length) {\n bufferedResult.hand[i].annotations = newResult.hand[i].annotations; // reset annotations as previous frame did not have them\n annotations = bufferedResult.hand[i].annotations;\n } else if (newResult.hand[i].annotations) {\n for (const key of Object.keys(newResult.hand[i].annotations)) { // update annotations\n annotations[key] = newResult.hand[i]?.annotations?.[key]?.[0]\n ? newResult.hand[i].annotations[key]\n .map((val, j: number) => val\n .map((coord: number, k: number) => ((bufferedFactor - 1) * bufferedResult.hand[i].annotations[key][j][k] + coord) / bufferedFactor))\n : null;\n }\n }\n bufferedResult.hand[i] = { ...newResult.hand[i], box, boxRaw, keypoints, annotations: annotations as HandResult['annotations'] }; // shallow clone plus updated values\n }\n }\n\n // interpolate face results\n if (!bufferedResult.face || (newResult.face.length !== bufferedResult.face.length)) {\n bufferedResult.face = JSON.parse(JSON.stringify(newResult.face)) as FaceResult[]; // deep clone once\n } else {\n for (let i = 0; i < newResult.face.length; i++) {\n const box = (newResult.face[i].box // update box\n .map((b, j) => ((bufferedFactor - 1) * bufferedResult.face[i].box[j] + b) / bufferedFactor)) as Box;\n const boxRaw = (newResult.face[i].boxRaw // update boxRaw\n .map((b, j) => ((bufferedFactor - 1) * bufferedResult.face[i].boxRaw[j] + b) / bufferedFactor)) as Box;\n if (newResult.face[i].rotation) {\n const rotation: {\n matrix: [number, number, number, number, number, number, number, number, number],\n angle: { roll: number, yaw: number, pitch: number },\n gaze: { bearing: number, strength: number }\n } = { matrix: [0, 0, 0, 0, 0, 0, 0, 0, 0], angle: { roll: 0, yaw: 0, pitch: 0 }, gaze: { bearing: 0, strength: 0 } };\n rotation.matrix = newResult.face[i].rotation?.matrix as [number, number, number, number, number, number, number, number, number];\n rotation.angle = {\n roll: ((bufferedFactor - 1) * (bufferedResult.face[i].rotation?.angle?.roll || 0) + (newResult.face[i].rotation?.angle?.roll || 0)) / bufferedFactor,\n yaw: ((bufferedFactor - 1) * (bufferedResult.face[i].rotation?.angle?.yaw || 0) + (newResult.face[i].rotation?.angle?.yaw || 0)) / bufferedFactor,\n pitch: ((bufferedFactor - 1) * (bufferedResult.face[i].rotation?.angle?.pitch || 0) + (newResult.face[i].rotation?.angle?.pitch || 0)) / bufferedFactor,\n };\n rotation.gaze = {\n // not fully correct due projection on circle, also causes wrap-around draw on jump from negative to positive\n bearing: ((bufferedFactor - 1) * (bufferedResult.face[i].rotation?.gaze.bearing || 0) + (newResult.face[i].rotation?.gaze.bearing || 0)) / bufferedFactor,\n strength: ((bufferedFactor - 1) * (bufferedResult.face[i].rotation?.gaze.strength || 0) + (newResult.face[i].rotation?.gaze.strength || 0)) / bufferedFactor,\n };\n bufferedResult.face[i] = { ...newResult.face[i], rotation, box, boxRaw }; // shallow clone plus updated values\n } else {\n bufferedResult.face[i] = { ...newResult.face[i], box, boxRaw }; // shallow clone plus updated values\n }\n }\n }\n\n // interpolate object detection results\n if (!bufferedResult.object || (newResult.object.length !== bufferedResult.object.length)) {\n bufferedResult.object = JSON.parse(JSON.stringify(newResult.object)) as ObjectResult[]; // deep clone once\n } else {\n for (let i = 0; i < newResult.object.length; i++) {\n const box = (newResult.object[i].box // update box\n .map((b, j) => ((bufferedFactor - 1) * bufferedResult.object[i].box[j] + b) / bufferedFactor)) as Box;\n const boxRaw = (newResult.object[i].boxRaw // update boxRaw\n .map((b, j) => ((bufferedFactor - 1) * bufferedResult.object[i].boxRaw[j] + b) / bufferedFactor)) as Box;\n bufferedResult.object[i] = { ...newResult.object[i], box, boxRaw }; // shallow clone plus updated values\n }\n }\n\n // interpolate person results\n if (newResult.persons) {\n const newPersons = newResult.persons; // trigger getter function\n if (!bufferedResult.persons || (newPersons.length !== bufferedResult.persons.length)) {\n bufferedResult.persons = JSON.parse(JSON.stringify(newPersons)) as PersonResult[];\n } else {\n for (let i = 0; i < newPersons.length; i++) { // update person box, we don't update the rest as it's updated as reference anyhow\n bufferedResult.persons[i].box = (newPersons[i].box\n .map((box, j) => ((bufferedFactor - 1) * bufferedResult.persons[i].box[j] + box) / bufferedFactor)) as Box;\n }\n }\n }\n\n // just copy latest gestures without interpolation\n if (newResult.gesture) bufferedResult.gesture = newResult.gesture;\n\n // append interpolation performance data\n const t1 = now();\n interpolateTime = env.perfadd ? interpolateTime + Math.round(t1 - t0) : Math.round(t1 - t0);\n if (newResult.performance) bufferedResult.performance = { ...newResult.performance, interpolate: interpolateTime };\n\n return bufferedResult;\n}\n", "/** Face descriptor type as number array */\nexport type Descriptor = number[]\nexport type MatchOptions = { order?: number, threshold?: number, multiplier?: number, min?: number, max?: number } | undefined;\n\n/** Calculates distance between two descriptors\n * @param options - calculation options\n * - order - algorithm to use\n * Euclidean distance if `order` is 2 (default), Minkowski distance algorithm of nth order if `order` is higher than 2\n * - multiplier - by how much to enhance difference analysis in range of 1..100\n * default is 20 which normalizes results to similarity above 0.5 can be considered a match\n */\nexport function distance(descriptor1: Descriptor, descriptor2: Descriptor, options: MatchOptions = { order: 2, multiplier: 25 }) {\n // general minkowski distance, euclidean distance is limited case where order is 2\n if (!descriptor1 || !descriptor1) return Number.MAX_SAFE_INTEGER;\n let sum = 0;\n for (let i = 0; i < descriptor1.length; i++) {\n const diff = (!options.order || options.order === 2) ? (descriptor1[i] - descriptor2[i]) : (Math.abs(descriptor1[i] - descriptor2[i]));\n sum += (!options.order || options.order === 2) ? (diff * diff) : (diff ** options.order);\n }\n return (options.multiplier || 20) * sum;\n}\n\n// invert distance to similarity, normalize to given range and clamp\nconst normalizeDistance = (dist, order, min, max) => {\n if (dist === 0) return 1; // short circuit for identical inputs\n const root = order === 2 ? Math.sqrt(dist) : dist ** (1 / order); // take root of distance\n const norm = (1 - (root / 100) - min) / (max - min); // normalize to range\n const clamp = Math.max(Math.min(norm, 1), 0); // clamp to 0..1\n return clamp;\n};\n\n/** Calculates normalized similarity between two face descriptors based on their `distance`\n * @param options - calculation options\n * - order - algorithm to use\n * Euclidean distance if `order` is 2 (default), Minkowski distance algorithm of nth order if `order` is higher than 2\n * - multiplier - by how much to enhance difference analysis in range of 1..100\n * default is 20 which normalizes results to similarity above 0.5 can be considered a match\n * - min - normalize similarity result to a given range\n * - max - normalzie similarity resutl to a given range\n * default is 0.2...0.8\n * Returns similarity between two face descriptors normalized to 0..1 range where 0 is no similarity and 1 is perfect similarity\n */\nexport function similarity(descriptor1: Descriptor, descriptor2: Descriptor, options: MatchOptions = { order: 2, multiplier: 25, min: 0.2, max: 0.8 }) {\n const dist = distance(descriptor1, descriptor2, options);\n return normalizeDistance(dist, options.order || 2, options.min || 0, options.max || 1);\n}\n\n/** Matches given descriptor to a closest entry in array of descriptors\n * @param descriptor - face descriptor\n * @param descriptors - array of face descriptors to commpare given descriptor to\n * @param options - see `similarity` method for options description\n * Returns\n * - `index` index array index where best match was found or -1 if no matches\n * - `distance` calculated `distance` of given descriptor to the best match\n * - `similarity` calculated normalized `similarity` of given descriptor to the best match\n*/\nexport function match(descriptor: Descriptor, descriptors: Descriptor[], options: MatchOptions = { order: 2, multiplier: 25, threshold: 0, min: 0.2, max: 0.8 }) {\n if (!Array.isArray(descriptor) || !Array.isArray(descriptors) || descriptor.length < 64 || descriptors.length === 0) { // validate input\n return { index: -1, distance: Number.POSITIVE_INFINITY, similarity: 0 };\n }\n let lowestDistance = Number.MAX_SAFE_INTEGER;\n let index = -1;\n for (let i = 0; i < descriptors.length; i++) {\n const res = descriptors[i].length === descriptor.length ? distance(descriptor, descriptors[i], options) : Number.MAX_SAFE_INTEGER;\n if (res < lowestDistance) {\n lowestDistance = res;\n index = i;\n }\n if (lowestDistance < (options.threshold || 0)) break;\n }\n const normalizedSimilarity = normalizeDistance(lowestDistance, options.order || 2, options.min || 0, options.max || 1);\n return { index, distance: lowestDistance, similarity: normalizedSimilarity };\n}\n", "/**\n * Analyze detection Results and sort&combine them into per-person view\n */\n\nimport type { FaceResult, BodyResult, HandResult, GestureResult, PersonResult, Box } from '../result';\n\nexport function join(faces: FaceResult[], bodies: BodyResult[], hands: HandResult[], gestures: GestureResult[], shape: number[] | undefined): PersonResult[] {\n let id = 0;\n const persons: PersonResult[] = [];\n for (const face of faces) { // person is defined primarily by face and then we append other objects as found\n const person: PersonResult = { id: id++, face, body: null, hands: { left: null, right: null }, gestures: [], box: [0, 0, 0, 0] };\n for (const body of bodies) {\n if (face.box[0] > body.box[0] // x within body\n && face.box[0] < body.box[0] + body.box[2]\n && face.box[1] + face.box[3] > body.box[1] // y within body\n && face.box[1] + face.box[3] < body.box[1] + body.box[3]) {\n person.body = body;\n }\n }\n if (person.body) { // only try to join hands if body is found\n for (const hand of hands) {\n if (hand.box[0] + hand.box[2] > person.body.box[0] // x within body for left hand\n && hand.box[0] + hand.box[2] < person.body.box[0] + person.body.box[2]\n && hand.box[1] + hand.box[3] > person.body.box[1] // x within body for left hand\n && hand.box[1] + hand.box[3] < person.body.box[1] + person.body.box[3]) {\n if (person.hands) person.hands.left = hand;\n }\n if (hand.box[0] < person.body.box[0] + person.body.box[2] // x within body for right hand\n && hand.box[0] > person.body.box[0]\n && hand.box[1] + hand.box[3] > person.body.box[1] // x within body for right hand\n && hand.box[1] + hand.box[3] < person.body.box[1] + person.body.box[3]) {\n if (person.hands) person.hands.right = hand;\n }\n }\n }\n for (const gesture of gestures) { // append all gestures according to ids\n if (gesture['face'] !== undefined && gesture['face'] === face.id) person.gestures.push(gesture);\n else if (gesture['iris'] !== undefined && gesture['iris'] === face.id) person.gestures.push(gesture);\n else if (gesture['body'] !== undefined && gesture['body'] === person.body?.id) person.gestures.push(gesture);\n else if (gesture['hand'] !== undefined && gesture['hand'] === person.hands.left?.id) person.gestures.push(gesture);\n else if (gesture['hand'] !== undefined && gesture['hand'] === person.hands.right?.id) person.gestures.push(gesture);\n }\n\n // create new overarching box from all boxes belonging to person\n const x: number[] = [];\n const y: number[] = [];\n const extractXY = (box: Box | undefined) => { // extract all [x, y] coordinates from boxes [x, y, width, height]\n if (box && box.length === 4) {\n x.push(box[0], box[0] + box[2]);\n y.push(box[1], box[1] + box[3]);\n }\n };\n extractXY(person.face.box);\n extractXY(person.body?.box);\n extractXY(person.hands.left?.box);\n extractXY(person.hands.right?.box);\n const minX = Math.min(...x);\n const minY = Math.min(...y);\n person.box = [minX, minY, Math.max(...x) - minX, Math.max(...y) - minY]; // create new overarching box\n\n // shape is known so we calculate boxRaw as well\n if (shape?.[1] && shape?.[2]) person.boxRaw = [person.box[0] / shape[2], person.box[1] / shape[1], person.box[2] / shape[2], person.box[3] / shape[1]];\n\n persons.push(person);\n }\n return persons;\n}\n", "/**\n * Embedded sample images used during warmup in dataURL format\n */\n\n// data:image/jpeg;base64,\nexport const face = `\n/9j/4AAQSkZJRgABAQEAYABgAAD/4QBoRXhpZgAATU0AKgAAAAgABAEaAAUAAAABAAAAPgEbAAUA\nAAABAAAARgEoAAMAAAABAAI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AAAABAAAAAAAAAAAAACBKAAAAAAAQ\nJQAAAhICEbJAYTWJ7wx8KvpC0BV4ceieWGewDHlNmWwCNjZICNhIDmcZredBecdpiY69FXCOLW+i\nUiZidukulmxxlx2paN4mNng+K4+I8Hy2yaTfl37TXetoCPfRxfp1qi3F48ofKMvtvxak8s6LDv61\nrZji9rPaLUf5PC+bfttS0q8q3p9W/wBrRMdpUZuKdN99nzvFqPbTVz7nD8OKs+do2/mW3h4D7Xaq\nZnPrtNpqz35aRaYOHY9Zk4pNt9rR+rl6zi+OnS+WN57Rv1lXp/YrNaYtruL6zNPnGO3hxP6O5w/2\nf0HDuun09Yv55Le9afznqcOvO4tBreMTHu30unnva0bWt8on+70nDuE4OHYYx4Kbesz3tPrMuhGO\nIjpDOKrK9YVpsyiGUQnYGOyUgI2SlAIEmwMWMs9kTAMJYzDOYRMArmGErZhhMArlHmzmGMwDE3Ts\nbAbs4swj5pgFkSziVcM4BZEsolXDKAZwyhjCYBkACQhIAAAAAAAJAAAAAAAAAAAAAAAAAAAShIAA\nAAAAAAJAAAAAAAAAAAAAABAJEAAAAAAAAAAAAAAAIEoBKAAAAAAAAAAAAAAABAlAAAAAAAIAAAAA\nBAkBAkBAkBAlACEgMZjdjbFW8bWrEx8YWANb6Fp+bfwab+vLDKMFK9qxH5L0bAr8OPRPKz2AY7J2\nSbAjYZAI2E7AIEgIEgIEgMdkSy2NgY7MdlmyNoBXsxmFuyNgVTVjNV3KjlBRNTlXTVHKCrlIqt5T\nlBhEMohlFerLlBjEMohMVTEARDKCITsAk2AEgAAAkAAAAAAAAAAAAAAAAAAAAAAAASAAAAAAAAD/\n2Q==`;\n", "/**\n * Warmup algorithm that uses embedded images to exercise loaded models for faster future inference\n */\n\nimport { log, now, mergeDeep } from './util/util';\nimport * as sample from './sample';\nimport * as tf from '../dist/tfjs.esm.js';\nimport * as image from './image/image';\nimport * as backend from './tfjs/backend';\nimport { env } from './util/env';\nimport type { Config } from './config';\nimport type { Result } from './result';\nimport { Human, models } from './human';\nimport type { Tensor } from './exports';\n\nasync function warmupBitmap(instance: Human): Promise {\n const b64toBlob = (base64: string, type = 'application/octet-stream') => fetch(`data:${type};base64,${base64}`).then((res) => res.blob());\n let blob: Blob | null;\n let res: Result | undefined;\n switch (instance.config.warmup) {\n case 'face': blob = await b64toBlob(sample.face); break;\n case 'body':\n case 'full': blob = await b64toBlob(sample.body); break;\n default: blob = null;\n }\n if (blob) {\n const bitmap = await createImageBitmap(blob);\n res = await instance.detect(bitmap, instance.config);\n bitmap.close();\n }\n return res;\n}\n\nasync function warmupCanvas(instance: Human): Promise {\n return new Promise((resolve) => {\n let src: string;\n // let size = 0;\n switch (instance.config.warmup) {\n case 'face':\n // size = 256;\n src = 'data:image/jpeg;base64,' + sample.face;\n break;\n case 'full':\n case 'body':\n // size = 1200;\n src = 'data:image/jpeg;base64,' + sample.body;\n break;\n default:\n src = '';\n }\n // src = encodeURI('../assets/human-sample-upper.jpg');\n let img: HTMLImageElement;\n if (typeof Image !== 'undefined') img = new Image();\n // @ts-ignore env.image is an external monkey-patch\n else if (env.Image) img = new env.Image();\n else return;\n img.onload = async () => {\n const canvas = image.canvas(img.naturalWidth, img.naturalHeight);\n if (!canvas) {\n log('Warmup: Canvas not found');\n resolve(undefined);\n } else {\n const ctx = canvas.getContext('2d');\n if (ctx) ctx.drawImage(img, 0, 0);\n // const data = ctx?.getImageData(0, 0, canvas.height, canvas.width);\n const tensor = await instance.image(canvas);\n const res = tensor.tensor ? await instance.detect(tensor.tensor, instance.config) : undefined;\n resolve(res);\n }\n };\n if (src) img.src = src;\n else resolve(undefined);\n });\n}\n\nasync function warmupNode(instance: Human): Promise {\n const atob = (str: string) => Buffer.from(str, 'base64');\n let img;\n if (instance.config.warmup === 'face') img = atob(sample.face);\n else img = atob(sample.body);\n let res: Result;\n if (('node' in tf) && (tf.getBackend() === 'tensorflow')) {\n const data: Tensor = tf['node'].decodeJpeg(img); // eslint-disable-line import/namespace\n const expanded: Tensor = tf.expandDims(data, 0);\n instance.tf.dispose(data);\n // log('Input:', expanded);\n res = await instance.detect(expanded, instance.config);\n instance.tf.dispose(expanded);\n } else {\n if (instance.config.debug) log('Warmup tfjs-node not loaded');\n /*\n const input = await canvasJS.loadImage(img);\n const canvas = canvasJS.createCanvas(input.width, input.height);\n const ctx = canvas.getContext('2d');\n ctx.drawImage(img, 0, 0, input.width, input.height);\n res = await instance.detect(input, instance.config);\n */\n }\n // @ts-ignore\n return res;\n}\n\nasync function runInference(instance: Human) {\n let res: Result | undefined;\n if (typeof createImageBitmap === 'function') res = await warmupBitmap(instance);\n else if (typeof Image !== 'undefined' || env.Canvas !== undefined) res = await warmupCanvas(instance);\n else res = await warmupNode(instance);\n return res;\n}\n\n/** Runs pre-compile on all loaded models */\nexport async function runCompile(instance: Human) {\n if (!tf.env().flagRegistry.ENGINE_COMPILE_ONLY) return; // tfjs does not support compile-only inference\n const backendType = tf.getBackend();\n const webGLBackend = tf.backend();\n if ((backendType !== 'webgl' && backendType !== 'humangl') || !webGLBackend?.checkCompileCompletion) {\n // log('compile pass: skip');\n return;\n }\n tf.env().set('ENGINE_COMPILE_ONLY', true);\n const numTensorsStart = tf.engine().state.numTensors;\n const compiledModels: string[] = [];\n for (const [modelName, model] of Object.entries(instance.models).filter(([key, val]) => (key !== null && val !== null))) {\n const shape = (model.inputs?.[0]?.shape) ? [...model.inputs[0].shape] : [1, 64, 64, 3];\n const dtype: string = (model.inputs?.[0]?.dtype) ? model.inputs[0].dtype : 'float32';\n for (let dim = 0; dim < shape.length; dim++) {\n if (shape[dim] === -1) shape[dim] = dim === 0 ? 1 : 64; // override batch number and any dynamic dimensions\n }\n const tensor = tf.zeros(shape, dtype);\n try {\n const res = model.execute(tensor);\n compiledModels.push(modelName);\n if (Array.isArray(res)) res.forEach((t) => tf.dispose(t));\n else tf.dispose(res);\n } catch {\n if (instance.config.debug) log('compile fail model:', modelName);\n }\n tf.dispose(tensor);\n }\n const kernels = await webGLBackend.checkCompileCompletionAsync();\n webGLBackend.getUniformLocations();\n if (instance.config.debug) log('compile pass:', { models: compiledModels, kernels: kernels.length });\n tf.env().set('ENGINE_COMPILE_ONLY', false);\n const numTensorsEnd = tf.engine().state.numTensors;\n if ((numTensorsEnd - numTensorsStart) > 0) log('tensor leak:', numTensorsEnd - numTensorsStart);\n}\n\n/** Warmup method pre-initializes all configured models for faster inference\n * - can take significant time on startup\n * - only used in browser environments for `webgl` and `humangl` backends\n * @param userConfig?: Config\n*/\nexport async function warmup(instance: Human, userConfig?: Partial): Promise {\n await backend.check(instance, false);\n const t0 = now();\n instance.state = 'warmup';\n if (userConfig) instance.config = mergeDeep(instance.config, userConfig) as Config;\n if (!instance.config.warmup || instance.config.warmup.length === 0 || instance.config.warmup === 'none') {\n return { face: [], body: [], hand: [], gesture: [], object: [], performance: instance.performance, timestamp: now(), persons: [], error: null };\n }\n return new Promise(async (resolve) => {\n await models.load(instance);\n await runCompile(instance);\n const res = await runInference(instance);\n const t1 = now();\n if (instance.config.debug) log('warmup', instance.config.warmup, Math.round(t1 - t0), 'ms');\n instance.emit('warmup');\n resolve(res);\n });\n}\n", "/**\n * Human main module\n * @default Human Library\n * @summary \n * @author \n * @copyright \n * @license MIT\n */\n\n// module imports\nimport { log, now, mergeDeep, validate } from './util/util';\nimport { defaults } from './config';\nimport { env, Env } from './util/env';\nimport { WebCam } from './util/webcam';\nimport { setModelLoadOptions } from './tfjs/load';\nimport * as tf from '../dist/tfjs.esm.js';\nimport * as app from '../package.json';\nimport * as backend from './tfjs/backend';\nimport * as draw from './draw/draw';\nimport * as blazepose from './body/blazepose';\nimport * as centernet from './object/centernet';\nimport * as efficientpose from './body/efficientpose';\nimport * as face from './face/face';\nimport * as facemesh from './face/facemesh';\nimport * as faceres from './face/faceres';\nimport * as gesture from './gesture/gesture';\nimport * as handpose from './hand/handpose';\nimport * as handtrack from './hand/handtrack';\nimport * as humangl from './tfjs/humangl';\nimport * as image from './image/image';\nimport * as interpolate from './util/interpolate';\nimport * as meet from './segmentation/meet';\nimport * as match from './face/match';\nimport * as models from './models';\nimport * as movenet from './body/movenet';\nimport * as nanodet from './object/nanodet';\nimport * as persons from './util/persons';\nimport * as posenet from './body/posenet';\nimport * as rvm from './segmentation/rvm';\nimport * as selfie from './segmentation/selfie';\nimport * as warmups from './warmup';\n\n// type definitions\nimport type { Input, Tensor, DrawOptions, Config, Result, FaceResult, HandResult, BodyResult, ObjectResult, GestureResult, PersonResult, AnyCanvas } from './exports';\n// type exports\nexport * from './exports';\n\n/** **Human** library main class\n *\n * All methods and properties are available only as members of Human class\n *\n * - Configuration object definition: {@link Config}\n * - Results object definition: {@link Result}\n * - Possible inputs: {@link Input}\n *\n * @param userConfig - {@link Config}\n * @returns instance of {@link Human}\n */\nexport class Human {\n /** Current version of Human library in *semver* format */\n version: string;\n\n /** Current configuration\n * - Defaults: [config](https://github.com/vladmandic/human/blob/main/src/config.ts#L262)\n */\n config: Config;\n\n /** Last known result of detect run\n * - Can be accessed anytime after initial detection\n */\n result: Result;\n\n /** Current state of Human library\n * - Can be polled to determine operations that are currently executed\n * - Progresses through: 'config', 'check', 'backend', 'load', 'run:', 'idle'\n */\n state: string;\n\n /** currenty processed image tensor and canvas */\n process: { tensor: Tensor | null, canvas: AnyCanvas | null };\n\n /** Instance of TensorFlow/JS used by Human\n * - Can be embedded or externally provided\n * [TFJS API](https://js.tensorflow.org/api/latest/)\n */\n tf;\n\n /** Object containing environment information used for diagnostics */\n env: Env;\n\n /** Draw helper classes that can draw detected objects on canvas using specified draw\n * - canvas: draws input to canvas\n * - options: are global settings for all draw operations, can be overriden for each draw method {@link DrawOptions}\n * - face, body, hand, gesture, object, person: draws detected results as overlays on canvas\n */\n draw: { canvas: typeof draw.canvas, face: typeof draw.face, body: typeof draw.body, hand: typeof draw.hand, gesture: typeof draw.gesture, object: typeof draw.object, person: typeof draw.person, all: typeof draw.all, options: DrawOptions };\n\n /** Currently loaded models\n * @internal\n * {@link models#Models}\n */\n models: models.Models;\n\n /** Container for events dispatched by Human\n * Possible events:\n * - `create`: triggered when Human object is instantiated\n * - `load`: triggered when models are loaded (explicitly or on-demand)\n * - `image`: triggered when input image is processed\n * - `result`: triggered when detection is complete\n * - `warmup`: triggered when warmup is complete\n * - `error`: triggered on some errors\n */\n events: EventTarget | undefined;\n /** Reference face triangualtion array of 468 points, used for triangle references between points */\n faceTriangulation: number[];\n /** Refernce UV map of 468 values, used for 3D mapping of the face mesh */\n faceUVMap: [number, number][];\n /** Performance object that contains values for all recently performed operations */\n performance: Record; // perf members are dynamically defined as needed\n #numTensors: number;\n #analyzeMemoryLeaks: boolean;\n #checkSanity: boolean;\n /** WebGL debug info */\n gl: Record;\n // definition end\n\n /** Constructor for **Human** library that is futher used for all operations\n * @param userConfig - user configuration object {@link Config}\n */\n constructor(userConfig?: Partial) {\n this.env = env;\n /*\n defaults.wasmPath = tf.version['tfjs-core'].includes('-') // custom build or official build\n ? 'https://vladmandic.github.io/tfjs/dist/'\n : `https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm@${tf.version_core}/dist/`;\n */\n const tfVersion = (tf.version.tfjs || tf.version_core).replace(/-(.*)/, '');\n defaults.wasmPath = `https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm@${tfVersion}/dist/`;\n defaults.modelBasePath = env.browser ? '../models/' : 'file://models/';\n defaults.backend = env.browser ? 'webgl' : 'tensorflow';\n this.version = app.version; // expose version property on instance of class\n Object.defineProperty(this, 'version', { value: app.version }); // expose version property directly on class itself\n this.config = JSON.parse(JSON.stringify(defaults));\n Object.seal(this.config);\n this.config.cacheModels = typeof indexedDB !== 'undefined';\n if (userConfig) this.config = mergeDeep(this.config, userConfig);\n setModelLoadOptions(this.config);\n this.tf = tf;\n this.state = 'idle';\n this.#numTensors = 0;\n this.#analyzeMemoryLeaks = false;\n this.#checkSanity = false;\n this.performance = {};\n this.events = (typeof EventTarget !== 'undefined') ? new EventTarget() : undefined;\n // object that contains all initialized models\n this.models = new models.Models();\n // reexport draw methods\n this.draw = {\n options: draw.options,\n canvas: (input: AnyCanvas | HTMLImageElement | HTMLVideoElement, output: AnyCanvas) => draw.canvas(input, output),\n face: (output: AnyCanvas, result: FaceResult[], options?: Partial) => draw.face(output, result, options),\n body: (output: AnyCanvas, result: BodyResult[], options?: Partial) => draw.body(output, result, options),\n hand: (output: AnyCanvas, result: HandResult[], options?: Partial) => draw.hand(output, result, options),\n gesture: (output: AnyCanvas, result: GestureResult[], options?: Partial) => draw.gesture(output, result, options),\n object: (output: AnyCanvas, result: ObjectResult[], options?: Partial) => draw.object(output, result, options),\n person: (output: AnyCanvas, result: PersonResult[], options?: Partial) => draw.person(output, result, options),\n all: (output: AnyCanvas, result: Result, options?: Partial) => draw.all(output, result, options),\n };\n this.result = { face: [], body: [], hand: [], gesture: [], object: [], performance: {}, timestamp: 0, persons: [], error: null };\n // export access to image processing\n this.process = { tensor: null, canvas: null };\n // export raw access to underlying models\n this.faceTriangulation = facemesh.triangulation;\n this.faceUVMap = facemesh.uvmap;\n // set gl info\n this.gl = humangl.config;\n // init model validation\n models.validateModel(this, null, '');\n // include platform info\n this.emit('create');\n if (this.config.debug || this.env.browser) log(`version: ${this.version}`);\n if (this.config.debug) log(`tfjs version: ${this.tf.version['tfjs-core']}`);\n const envTemp = JSON.parse(JSON.stringify(this.env));\n delete envTemp.kernels;\n delete envTemp.initial;\n delete envTemp.perfadd;\n if (this.config.debug) log('environment:', envTemp);\n }\n\n /** internal function to measure tensor leaks */\n analyze = (...msg: string[]) => {\n if (!this.#analyzeMemoryLeaks) return;\n const currentTensors = this.tf.engine().state.numTensors;\n const previousTensors = this.#numTensors;\n this.#numTensors = currentTensors;\n const leaked = currentTensors - previousTensors;\n if (leaked !== 0) log(...msg, leaked);\n };\n\n /** internal function for quick sanity check on inputs @hidden */\n #sanity = (input: Input): null | string => {\n if (!this.#checkSanity) return null;\n if (!input) return 'input is not defined';\n if (this.env.node && !(input instanceof tf.Tensor)) return 'input must be a tensor';\n try {\n this.tf.getBackend();\n } catch {\n return 'backend not loaded';\n }\n return null;\n };\n\n /** Reset configuration to default values */\n reset(): void {\n const currentBackend = this.config.backend; // save backend;\n this.config = JSON.parse(JSON.stringify(defaults));\n this.config.backend = currentBackend;\n image.reset();\n env.initial = true;\n }\n\n /** Validate current configuration schema */\n validate(userConfig?: Partial) {\n const msgs = validate(defaults, userConfig || this.config);\n if (msgs.length === 0) this.config = mergeDeep(this.config, userConfig) as Config;\n return msgs;\n }\n\n /** Check model for invalid kernel ops for current backend */\n check() {\n return models.validate(this);\n }\n\n /** Exports face matching methods {@link match#similarity} */\n public similarity = match.similarity;\n /** Exports face matching methods {@link match#distance} */\n public distance = match.distance;\n /** Exports face matching methods {@link match#match} */\n public match = match.match;\n\n /** Utility wrapper for performance.now() */\n now(): number { // eslint-disable-line class-methods-use-this\n return now();\n }\n\n /** Process input as return canvas and tensor\n *\n * @param input - any input {@link Input}\n * @param getTensor - should image processing also return tensor or just canvas\n * Returns object with `tensor` and `canvas`\n */\n image(input: Input, getTensor: boolean = true) {\n return image.process(input, this.config, getTensor);\n }\n\n /** Segmentation method takes any input and returns RGBA tensor\n * Note: Segmentation is not triggered as part of detect process\n *\n * @param input - {@link Input}\n * Returns tensor which contains image data in RGBA format\n */\n async segmentation(input: Input, userConfig?: Partial): Promise {\n if (userConfig) this.config = mergeDeep(this.config, userConfig) as Config;\n if (!this.config.segmentation.enabled) return null;\n const processed = await image.process(input, this.config);\n if (!processed.tensor) return null;\n let tensor: Tensor | null = null;\n if (this.config.segmentation.modelPath?.includes('rvm')) tensor = await rvm.predict(processed.tensor, this.config);\n if (this.config.segmentation.modelPath?.includes('meet')) tensor = await meet.predict(processed.tensor, this.config);\n if (this.config.segmentation.modelPath?.includes('selfie')) tensor = await selfie.predict(processed.tensor, this.config);\n tf.dispose(processed.tensor);\n return tensor;\n }\n\n /** Enhance method performs additional enhacements to face image previously detected for futher processing\n *\n * @param input - Tensor as provided in human.result.face[n].tensor\n * @returns Tensor\n */\n enhance(input: Tensor): Tensor | null { // eslint-disable-line class-methods-use-this\n return faceres.enhance(input);\n }\n\n /** Compare two input tensors for pixel simmilarity\n * - use `human.image` to process any valid input and get a tensor that can be used for compare\n * - when passing manually generated tensors:\n * - both input tensors must be in format [1, height, width, 3]\n * - if resolution of tensors does not match, second tensor will be resized to match resolution of the first tensor\n * - return value is pixel similarity score normalized by input resolution and rgb channels\n */\n compare(firstImageTensor: Tensor, secondImageTensor: Tensor): Promise {\n return image.compare(this.config, firstImageTensor, secondImageTensor);\n }\n\n /** Explicit backend initialization\n * - Normally done implicitly during initial load phase\n * - Call to explictly register and initialize TFJS backend without any other operations\n * - Use when changing backend during runtime\n */\n async init(): Promise {\n await backend.check(this, true);\n await this.tf.ready();\n image.reset();\n }\n\n /** WebCam helper methods\n *\n */\n public webcam = new WebCam();\n\n /** Load method preloads all configured models on-demand\n * - Not explicitly required as any required model is load implicitly on it's first run\n *\n * @param userConfig - {@link Config}\n */\n async load(userConfig?: Partial): Promise {\n this.state = 'load';\n const timeStamp = now();\n const count = Object.values(this.models).filter((model) => model).length;\n if (userConfig) this.config = mergeDeep(this.config, userConfig) as Config;\n\n if (this.env.initial) { // print version info on first run and check for correct backend setup\n if (!await backend.check(this, false)) log('error: backend check failed');\n await tf.ready();\n if (this.env.browser) {\n if (this.config.debug) log('configuration:', this.config);\n if (this.config.debug) log('tf flags:', this.tf.ENV.flags);\n }\n }\n\n await models.load(this); // actually loads models\n if (this.env.initial && this.config.debug) log('tf engine state:', this.tf.engine().state.numBytes, 'bytes', this.tf.engine().state.numTensors, 'tensors'); // print memory stats on first run\n this.env.initial = false;\n\n const loaded = Object.values(this.models).filter((model) => model).length;\n if (loaded !== count) { // number of loaded models changed\n models.validate(this); // validate kernel ops used by model against current backend\n this.emit('load');\n }\n\n const current = Math.trunc(now() - timeStamp);\n if (current > (this.performance.loadModels || 0)) this.performance.loadModels = this.env.perfadd ? (this.performance.loadModels || 0) + current : current;\n }\n\n /** emit event */\n emit = (event: string) => {\n if (this.events?.dispatchEvent) this.events.dispatchEvent(new Event(event));\n };\n\n /** Runs interpolation using last known result and returns smoothened result\n * Interpolation is based on time since last known result so can be called independently\n *\n * @param result - {@link Result} optional use specific result set to run interpolation on\n * @returns result - {@link Result}\n */\n next(result: Result = this.result): Result {\n return interpolate.calc(result, this.config);\n }\n\n /** get model loading/loaded stats */\n getModelStats(): models.ModelStats { return models.getModelStats(this); }\n\n /** Warmup method pre-initializes all configured models for faster inference\n * - can take significant time on startup\n * - only used for `webgl` and `humangl` backends\n * @param userConfig - {@link Config}\n * @returns result - {@link Result}\n */\n async warmup(userConfig?: Partial) {\n const t0 = now();\n const res = await warmups.warmup(this, userConfig);\n const t1 = now();\n this.performance.warmup = Math.trunc(t1 - t0);\n return res;\n }\n\n /** Run detect with tensorflow profiling\n * - result object will contain total exeuction time information for top-20 kernels\n * - actual detection object can be accessed via `human.result`\n */\n async profile(input: Input, userConfig?: Partial): Promise<{ kernel: string, time: number, perc: number }[]> {\n const profile = await this.tf.profile(() => this.detect(input, userConfig));\n const kernels: Record = {};\n let total = 0;\n for (const kernel of profile.kernels) { // sum kernel time values per kernel\n if (kernels[kernel.name]) kernels[kernel.name] += kernel.kernelTimeMs;\n else kernels[kernel.name] = kernel.kernelTimeMs;\n total += kernel.kernelTimeMs;\n }\n const kernelArr: { kernel: string, time: number, perc: number }[] = [];\n Object.entries(kernels).forEach((key) => kernelArr.push({ kernel: key[0], time: key[1] as unknown as number, perc: 0 })); // convert to array\n for (const kernel of kernelArr) {\n kernel.perc = Math.round(1000 * kernel.time / total) / 1000;\n kernel.time = Math.round(1000 * kernel.time) / 1000;\n }\n kernelArr.sort((a, b) => b.time - a.time); // sort\n kernelArr.length = 20; // crop\n return kernelArr;\n }\n\n /** Main detection method\n * - Analyze configuration: {@link Config}\n * - Pre-process input: {@link Input}\n * - Run inference for all configured models\n * - Process and return result: {@link Result}\n *\n * @param input - {@link Input}\n * @param userConfig - {@link Config}\n * @returns result - {@link Result}\n */\n async detect(input: Input, userConfig?: Partial): Promise {\n // detection happens inside a promise\n this.state = 'detect';\n return new Promise(async (resolve) => {\n this.state = 'config';\n let timeStamp;\n\n // update configuration\n this.config = mergeDeep(this.config, userConfig) as Config;\n\n // sanity checks\n this.state = 'check';\n const error = this.#sanity(input);\n if (error) {\n log(error, input);\n this.emit('error');\n resolve({ face: [], body: [], hand: [], gesture: [], object: [], performance: this.performance, timestamp: now(), persons: [], error });\n }\n\n const timeStart = now();\n\n // load models if enabled\n await this.load();\n\n timeStamp = now();\n this.state = 'image';\n const img = await image.process(input, this.config) as { canvas: AnyCanvas, tensor: Tensor };\n this.process = img;\n this.performance.inputProcess = this.env.perfadd ? (this.performance.inputProcess || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);\n this.analyze('Get Image:');\n\n if (!img.tensor) {\n if (this.config.debug) log('could not convert input to tensor');\n this.emit('error');\n resolve({ face: [], body: [], hand: [], gesture: [], object: [], performance: this.performance, timestamp: now(), persons: [], error: 'could not convert input to tensor' });\n return;\n }\n this.emit('image');\n\n timeStamp = now();\n this.config.skipAllowed = await image.skip(this.config, img.tensor);\n if (!this.performance.totalFrames) this.performance.totalFrames = 0;\n if (!this.performance.cachedFrames) this.performance.cachedFrames = 0;\n (this.performance.totalFrames)++;\n if (this.config.skipAllowed) this.performance.cachedFrames++;\n this.performance.cacheCheck = this.env.perfadd ? (this.performance.cacheCheck || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);\n this.analyze('Check Changed:');\n\n // prepare where to store model results\n // keep them with weak typing as it can be promise or not\n let faceRes: FaceResult[] | Promise | never[] = [];\n let bodyRes: BodyResult[] | Promise | never[] = [];\n let handRes: HandResult[] | Promise | never[] = [];\n let objectRes: ObjectResult[] | Promise | never[] = [];\n\n // run face detection followed by all models that rely on face bounding box: face mesh, age, gender, emotion\n this.state = 'detect:face';\n if (this.config.async) {\n faceRes = this.config.face.enabled ? face.detectFace(this, img.tensor) : [];\n if (this.performance.face) delete this.performance.face;\n } else {\n timeStamp = now();\n faceRes = this.config.face.enabled ? await face.detectFace(this, img.tensor) : [];\n this.performance.face = this.env.perfadd ? (this.performance.face || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);\n }\n\n if (this.config.async && (this.config.body.maxDetected === -1 || this.config.hand.maxDetected === -1)) faceRes = await faceRes; // need face result for auto-detect number of hands or bodies\n\n // run body: can be posenet, blazepose, efficientpose, movenet\n this.analyze('Start Body:');\n this.state = 'detect:body';\n const bodyConfig = this.config.body.maxDetected === -1 ? mergeDeep(this.config, { body: { maxDetected: this.config.face.enabled ? 1 * (faceRes as FaceResult[]).length : 1 } }) : this.config; // autodetect number of bodies\n if (this.config.async) {\n if (this.config.body.modelPath?.includes('posenet')) bodyRes = this.config.body.enabled ? posenet.predict(img.tensor, bodyConfig) : [];\n else if (this.config.body.modelPath?.includes('blazepose')) bodyRes = this.config.body.enabled ? blazepose.predict(img.tensor, bodyConfig) : [];\n else if (this.config.body.modelPath?.includes('efficientpose')) bodyRes = this.config.body.enabled ? efficientpose.predict(img.tensor, bodyConfig) : [];\n else if (this.config.body.modelPath?.includes('movenet')) bodyRes = this.config.body.enabled ? movenet.predict(img.tensor, bodyConfig) : [];\n if (this.performance.body) delete this.performance.body;\n } else {\n timeStamp = now();\n if (this.config.body.modelPath?.includes('posenet')) bodyRes = this.config.body.enabled ? await posenet.predict(img.tensor, bodyConfig) : [];\n else if (this.config.body.modelPath?.includes('blazepose')) bodyRes = this.config.body.enabled ? await blazepose.predict(img.tensor, bodyConfig) : [];\n else if (this.config.body.modelPath?.includes('efficientpose')) bodyRes = this.config.body.enabled ? await efficientpose.predict(img.tensor, bodyConfig) : [];\n else if (this.config.body.modelPath?.includes('movenet')) bodyRes = this.config.body.enabled ? await movenet.predict(img.tensor, bodyConfig) : [];\n this.performance.body = this.env.perfadd ? (this.performance.body || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);\n }\n this.analyze('End Body:');\n\n // run handpose\n this.analyze('Start Hand:');\n this.state = 'detect:hand';\n const handConfig = this.config.hand.maxDetected === -1 ? mergeDeep(this.config, { hand: { maxDetected: this.config.face.enabled ? 2 * (faceRes as FaceResult[]).length : 1 } }) : this.config; // autodetect number of hands\n if (this.config.async) {\n if (this.config.hand.detector?.modelPath?.includes('handdetect')) handRes = this.config.hand.enabled ? handpose.predict(img.tensor, handConfig) : [];\n else if (this.config.hand.detector?.modelPath?.includes('handtrack')) handRes = this.config.hand.enabled ? handtrack.predict(img.tensor, handConfig) : [];\n if (this.performance.hand) delete this.performance.hand;\n } else {\n timeStamp = now();\n if (this.config.hand.detector?.modelPath?.includes('handdetect')) handRes = this.config.hand.enabled ? await handpose.predict(img.tensor, handConfig) : [];\n else if (this.config.hand.detector?.modelPath?.includes('handtrack')) handRes = this.config.hand.enabled ? await handtrack.predict(img.tensor, handConfig) : [];\n this.performance.hand = this.env.perfadd ? (this.performance.hand || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);\n }\n this.analyze('End Hand:');\n\n // run object detection\n this.analyze('Start Object:');\n this.state = 'detect:object';\n if (this.config.async) {\n if (this.config.object.modelPath?.includes('nanodet')) objectRes = this.config.object.enabled ? nanodet.predict(img.tensor, this.config) : [];\n else if (this.config.object.modelPath?.includes('centernet')) objectRes = this.config.object.enabled ? centernet.predict(img.tensor, this.config) : [];\n if (this.performance.object) delete this.performance.object;\n } else {\n timeStamp = now();\n if (this.config.object.modelPath?.includes('nanodet')) objectRes = this.config.object.enabled ? await nanodet.predict(img.tensor, this.config) : [];\n else if (this.config.object.modelPath?.includes('centernet')) objectRes = this.config.object.enabled ? await centernet.predict(img.tensor, this.config) : [];\n this.performance.object = this.env.perfadd ? (this.performance.object || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);\n }\n this.analyze('End Object:');\n\n // if async wait for results\n this.state = 'detect:await';\n if (this.config.async) [faceRes, bodyRes, handRes, objectRes] = await Promise.all([faceRes, bodyRes, handRes, objectRes]);\n\n // run gesture analysis last\n this.state = 'detect:gesture';\n let gestureRes: GestureResult[] = [];\n if (this.config.gesture.enabled) {\n timeStamp = now();\n gestureRes = [...gesture.face(faceRes as FaceResult[]), ...gesture.body(bodyRes as BodyResult[]), ...gesture.hand(handRes as HandResult[]), ...gesture.iris(faceRes as FaceResult[])];\n if (!this.config.async) this.performance.gesture = this.env.perfadd ? (this.performance.gesture || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp);\n else if (this.performance.gesture) delete this.performance.gesture;\n }\n\n this.performance.total = this.env.perfadd ? (this.performance.total || 0) + Math.trunc(now() - timeStart) : Math.trunc(now() - timeStart);\n const shape = this.process.tensor?.shape || [];\n this.result = {\n face: faceRes as FaceResult[],\n body: bodyRes as BodyResult[],\n hand: handRes as HandResult[],\n gesture: gestureRes,\n object: objectRes as ObjectResult[],\n performance: this.performance,\n canvas: this.process.canvas,\n timestamp: Date.now(),\n error: null,\n get persons() { return persons.join(faceRes as FaceResult[], bodyRes as BodyResult[], handRes as HandResult[], gestureRes, shape); },\n };\n\n // finally dispose input tensor\n tf.dispose(img.tensor);\n\n // log('Result:', result);\n this.emit('detect');\n this.state = 'idle';\n resolve(this.result);\n });\n }\n\n /** Helper function\n * @param ms - sleep time in miliseconds\n */\n async sleep(ms: number): Promise { // eslint-disable-line class-methods-use-this\n return new Promise((resolve) => { setTimeout(resolve, ms); });\n }\n\n /** internal structure that keeps track of processed videos @hidden */\n #loops: Record = {};\n /** Continously detect video frames\n * @param element - HTMLVideoElement input\n * @param run - boolean run continously or stop if already running, default true\n * @param delay - number delay detection between frames for number of miliseconds, default 0\n */\n async video(element: HTMLVideoElement, run: boolean = true, delay: number = 0) {\n if (run) {\n if (!this.#loops[element.id]) {\n if (this.config.debug) log('video start', element.id);\n this.#loops[element.id] = true;\n }\n if (!element.paused && this.#loops[element.id] && (element.readyState >= 2)) await this.detect(element);\n if (delay > 0) await this.sleep(delay);\n if (this.#loops[element.id]) requestAnimationFrame(() => this.video(element, run, delay));\n } else {\n if (this.config.debug) log('video stop', element.id);\n this.#loops[element.id] = false;\n }\n }\n}\n\n/** Class Human as default export */\n/* eslint no-restricted-exports: [\"off\", { \"restrictedNamedExports\": [\"default\"] }] */\nexport { Human as default, match, draw, models };\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOO,SAAS,OAAO,KAAW;AAChC,QAAM,KAAK,IAAI,KAAK;AACpB,QAAM,KAAK,GAAG,GAAG,SAAS,EAAE,SAAS,EAAE,SAAS,GAAG,GAAG,KAAK,GAAG,WAAW,EAAE,SAAS,EAAE,SAAS,GAAG,GAAG,KAAK,GAAG,WAAW,EAAE,SAAS,EAAE,SAAS,GAAG,GAAG,KAAK,GAAG,gBAAgB,EAAE,SAAS,EAAE,SAAS,GAAG,GAAG;AACxM,MAAI;AAAK,YAAQ,IAAI,IAAI,UAAU,GAAG,GAAG;AAC3C;AAGO,SAAS,KAAK,QAAgB,MAAsB;AACzD,QAAM,YAAY,OAAO,SAAS,GAAG,IAAI,KAAK;AAC9C,QAAM,WAAW,KAAK,WAAW,GAAG,KAAK,KAAK,WAAW,GAAG,KAAK,KAAK,WAAW,OAAO,KAAK,KAAK,WAAW,QAAQ,KAAK,KAAK,WAAW,OAAO;AACjJ,QAAM,OAAO,WAAW,GAAG,SAAS,GAAG,SAAS,YAAY;AAC5D,MAAI,CAAC,KAAK,kBAAkB,EAAE,SAAS,OAAO;AAAG,UAAM,IAAI,MAAM,yCAAyC,MAAM;AAChH,SAAO;AACT;AAGO,IAAM,MAAM,MAAM;AACvB,MAAI,OAAO,gBAAgB;AAAa,WAAO,YAAY,IAAI;AAC/D,SAAO,UAAU,OAAO,QAAQ,OAAO,OAAO,CAAC,IAAI,MAAO,KAAM,SAAS,CAAC;AAC5E;AAGO,SAAS,SAAS,UAA2BA,SAAyB,SAAS,UAAU,OAA+D,CAAC,GAAG;AACjK,aAAW,OAAO,OAAO,KAAKA,OAAM,GAAG;AACrC,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AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE;AAAA,IACX,SAAS,IAAP;AAAA,IACF;AACA,aAAS,MAAM,KAAK,MAAM,UAAU;AAClC,WAAK,MAAM,MAAM;AACjB,WAAK,OAAO,OAAO;AACnB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,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AACA,WAAW,kBAAkB,aAAa;AACxC,mBAAiB,cAAc;AACjC;AAGA,qBAAqB,EAAE,UAAU,MAAM,WAAW;AAChD,OAAK,gBA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A;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AACA,WAAW,gBAAgB,eAAe;AACxC,iBAAe,YAAY;AAC7B;AAGA,IAAI,qBAAqB,CAAC;AAC1BN,UAAS,oBAAoB;AAAA,EAC3B,kBAAk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ACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA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rC,UAAI,mBAAK,QAAO,QAAQ;AAAK,8BAAsB,MAAM,KAAK,MAAM,SAAS,KAAK,KAAK,CAAC;AAAA,IAC1F,OAAO;AACL,UAAI,KAAK,OAAO;AAAO,YAAI,cAAc,QAAQ,EAAE;AACnD,yBAAK,QAAO,QAAQ,MAAM;AAAA,IAC5B;AAAA,EACF;AACF;AA7dE;AACA;AACA;AA+EA;AAwXA;", + "names": ["config", "log2", "__defProp", "__require", "__require2", "__export", "all5", "cache", "size", "compare", "log22", "t2", "copy", "init2", "mask", "options", "count2", "instance", "index", "object", "strides", "log", "config", "now", "node", "lines", "size2", "labels", "canvas", "outputSize", "scale2", "alpha", "log2", "half", "middle", "labels2", "inputSize", "padding", "lastTime", "now2", "model2", "constants", "maxSize", "node2", "outputNodes", "match", "skipped", "strides2", "body", "r", "match", "index", "cos", "sin", "size", "s", "func", "image", "i", "squeeze", "min", "max", "sub", "range", "rgb", "reshape", "env", "input", "process", "config", "getTensor", "tensor", "rgb", "cast", "t", "e", "env", "ready", "init", "config", "e", "model", "models_exports", "load", "reset", "validate", "model", "config", "env", "image", "count", "init", "input", "image", "norm", "size", "dot", "i", "size", "inputSize", "anchors", "i", "n", "dot", "input", "face", "env", "model", "load", "config", "env", "t", "tensor", "i", "inputSize", "anchors", "outputSize", "coords", "min", "max", "square", "scale", "env", "models", "inputSize", "skipped", "lastTime", "sigmoid", "config", "input", "size", "t", "tensor", "outputSize", "kpt", "config", "models", "i", "sigmoid", "inputSize", "distance", "annotations", "body", "predict", "lastTime", "skipped", "model", "inputSize", "last", "lastTime", "skipped", "load", "config", "env", "process", "t", "i", "tensor", "predict", "input", "outputSize", "connected", "kpt", "model", "lastTime", "cache", "skipped", "load", "config", "env", "max", "mod", "div", "predict", "image", "tensor", "enhance", "norm", "squeeze", "stack", "x", "y", "kpt", "s", "connected", "i", "model", "last", "lastCount", "lastTime", "skipped", "load", "config", "env", "predict", "image", "count", "_a", "t", "inputSize", "i", "tensor", "model", "inputSize", "load", "config", "env", "i", "index", "face", "connectionsToIndices", "index", "t", "r", "i", "cache", "model", "inputSize", "predict", "input", "config", "size", "i", "face", "env", "t", "index", "load", "model", "last", "lastTime", "lastCount", "skipped", "load", "config", "env", "input", "tensor", "norm", "predict", "image", "count", "_a", "t", "gender", "argmax", "all", "model", "last", "lastCount", "lastTime", "skipped", "load", "config", "env", "predict", "image", "count", "_a", "_b", "t", "gender", "i", "age", "tensor", "getBoxSize", "getBoxCenter", "image", "scaleBoxCoordinates", "enlargeBox", "size", "squarifyBox", "normalizeRadians", "computeRotation", "buildTranslationMatrix", "dot", "i", "getColumnFrom2DArr", "multiplyTransformMatrices", "size", "buildRotationMatrix", "invertTransformMatrix", "rotatePoint", "anchors", "model", "anchors", "t", "tensor", "index", "input", "config", "p", "hand", "scaleBoxCoordinates", "lastTime", "handPoseModel", "rotatePoint", "enlargeBox", "squarifyBox", "i", "getBoxSize", "buildRotationMatrix", "invertTransformMatrix", "getBoxCenter", "dot", "image", "config", "computeRotation", "env", "coords", "options", "point", "point2", "gesture", "meshAnnotations", "predict", "input", "config", "i", "annotations", "index", "load", "env", "models", "inputSize", "skipped", "lastTime", "cache", "loadDetect", "config", "env", "input", "config", "models", "t", "ratio", "scale", "hand", "tensor", "inputSize", "kpt", "index", "predict", "skipped", "lastTime", "cache", "i", "square", "model", "last", "lastCount", "lastTime", "skipped", "load", "config", "env", "predict", "input", "count", "_a", "t", "tensor", "model", "cached", "skipped", "lastCount", "lastTime", "load", "config", "env", "predict", "image", "count", "model", "load", "config", "env", "predict", "input", "t", "tensor", "model", "last", "lastCount", "lastTime", "skipped", "load", "config", "env", "predict", "input", "count", "_a", "t", "tensor", "connected", "kpt", "cache", "body", "compare", "i", "input", "inputSize", "t", "tensor", "outputSize", "kpt", "model", "inputSize", "skipped", "cache", "load", "config", "env", "image", "kpt", "annotations", "connected", "i", "body", "predict", "input", "t", "tensor", "model", "last", "lastTime", "skipped", "inputSize", "load", "config", "env", "process", "size", "i", "predict", "image", "outputSize", "count", "i", "i", "maxSize", "max", "t", "count", "outputStride", "clamp", "min", "max", "model", "point", "height", "width", "clamp", "i", "minConfidence", "predict", "input", "config", "tensor", "t", "load", "env", "model", "outputNodes", "t", "init", "config", "load", "env", "r", "squeeze", "mul", "cast", "rgb", "predict", "input", "model", "load", "config", "env", "predict", "input", "t", "tensor", "model", "last", "lastCount", "lastTime", "skipped", "load", "config", "env", "predict", "image", "count", "_a", "t", "tensor", "model", "last", "lastCount", "lastTime", "skipped", "load", "config", "env", "predict", "image", "count", "_a", "t", "normalize", "tensor", "reset", "model", "load", "env", "loadDetect", "op", "validate", "config", "instance", "reset", "e", "config", "env", "op", "backend", "t", "instance", "e", "init", "all", "canvas", "options", "input", "opt", "rgb", "i", "options", "labels", "emotion", "i", "index", "inCanvas", "options", "inCanvas", "options", "i", "connected", "inCanvas", "options", "i", "inCanvas", "options", "inCanvas", "options", "i", "where", "inCanvas", "options", "i", "canvas", "input", "all", "env", "i", "face", "buffer", "face", "normalize", "r", "size", "instance", "input", "predict", "env", "i", "tensor", "body", "i", "face", "iris", "hand", "calc", "config", "i", "_a", "_b", "_c", "_d", "_e", "_f", "_g", "_h", "_i", "annotations", "coords", "env", "match", "options", "sum", "i", "min", "max", "norm", "clamp", "index", "join", "face", "person", "body", "hand", "gesture", "face", "body", "instance", "res", "face", "body", "env", "canvas", "tensor", "atob", "model", "t", "e", "models_exports", "Human", "input", "e", "match", "env", "version", "options", "canvas", "all", "config", "validate", "getTensor", "process", "tensor", "predict", "count", "model", "load", "calc", "profile", "face", "body", "hand", "iris", "join"] } diff --git a/dist/human.js b/dist/human.js index fd8983f61..6947f4edb 100644 --- a/dist/human.js +++ b/dist/human.js @@ -4,64 +4,64 @@ author: ' */ -"use strict";var Human=(()=>{var Kf=Object.defineProperty;var R_=Object.getOwnPropertyDescriptor;var __=Object.getOwnPropertyNames;var D_=Object.prototype.hasOwnProperty;var $_=(e,t,n)=>t in e?Kf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var xa=(e,t)=>{for(var n in t)Kf(e,n,{get:t[n],enumerable:!0})},P_=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of __(t))!D_.call(e,r)&&r!==n&&Kf(e,r,{get:()=>t[r],enumerable:!(s=R_(t,r))||s.enumerable});return e};var F_=e=>P_(Kf({},"__esModule",{value:!0}),e);var fe=(e,t,n)=>($_(e,typeof t!="symbol"?t+"":t,n),n),Rv=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var Zr=(e,t,n)=>(Rv(e,t,"read from private field"),n?n.call(e):t.get(e)),Ku=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},sp=(e,t,n,s)=>(Rv(e,t,"write to private field"),s?s.call(e,n):t.set(e,n),n);var Jbe={};xa(Jbe,{Env:()=>Qh,Human:()=>lv,default:()=>lv,defaults:()=>Xa,draw:()=>tv,env:()=>me,match:()=>iv,models:()=>Od});function ne(...e){let t=new Date,n=`${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}:${t.getSeconds().toString().padStart(2,"0")}.${t.getMilliseconds().toString().padStart(3,"0")}`;e&&console.log(n,"Human:",...e)}function _v(e,t){let n=e.endsWith("/")?"":"/",r=t.startsWith(".")||t.startsWith("/")||t.startsWith("http:")||t.startsWith("https:")||t.startsWith("file:")?`${t}`:`${e}${n}${t}`;if(!r.toLocaleLowerCase().includes(".json"))throw new Error(`modelpath error: expecting json file: ${r}`);return r}var ue=()=>typeof performance!="undefined"?performance.now():parseInt((Number(process.hrtime.bigint())/1e3/1e3).toString());function g3(e,t,n="config",s=[]){for(let r of Object.keys(t))if(typeof t[r]=="object")g3(e[r],t[r],r,s);else{let a=e&&typeof e[r]!="undefined";a||s.push({reason:"unknown property",where:`${n}.${r} = ${t[r]}`});let o=e&&typeof e[r]==typeof t[r];a&&!o&&s.push({reason:"property type mismatch",where:`${n}.${r} = ${t[r]}`,expected:typeof e[r]})}return t.debug&&n==="config"&&s.length>0&&ne("invalid configuration",s),s}function Vt(...e){let t=n=>n&&typeof n=="object";return e.reduce((n,s)=>(Object.keys(s||{}).forEach(r=>{let a=n[r],o=s[r];Array.isArray(a)&&Array.isArray(o)?n[r]=a.concat(...o):t(a)&&t(o)?n[r]=Vt(a,o):n[r]=o}),n),{})}var Xa={backend:"",modelBasePath:"",cacheModels:!0,validateModels:!0,wasmPath:"",wasmPlatformFetch:!1,debug:!1,async:!0,warmup:"full",cacheSensitivity:.7,skipAllowed:!1,deallocate:!1,flags:{},softwareKernels:!1,filter:{enabled:!0,equalization:!1,width:0,height:0,flip:!1,return:!0,brightness:0,contrast:0,sharpness:0,blur:0,saturation:0,hue:0,negative:!1,sepia:!1,vintage:!1,kodachrome:!1,technicolor:!1,polaroid:!1,pixelate:0},gesture:{enabled:!0},face:{enabled:!0,detector:{modelPath:"blazeface.json",rotation:!0,maxDetected:1,skipFrames:99,skipTime:2500,minConfidence:.2,iouThreshold:.1,mask:!1,return:!1},mesh:{enabled:!0,modelPath:"facemesh.json",keepInvalid:!1},attention:{enabled:!1,modelPath:"facemesh-attention.json"},iris:{enabled:!0,modelPath:"iris.json"},emotion:{enabled:!0,minConfidence:.1,skipFrames:99,skipTime:1500,modelPath:"emotion.json"},description:{enabled:!0,modelPath:"faceres.json",skipFrames:99,skipTime:3e3,minConfidence:.1},antispoof:{enabled:!1,skipFrames:99,skipTime:4e3,modelPath:"antispoof.json"},liveness:{enabled:!1,skipFrames:99,skipTime:4e3,modelPath:"liveness.json"}},body:{enabled:!0,modelPath:"movenet-lightning.json",maxDetected:-1,minConfidence:.3,skipFrames:1,skipTime:200},hand:{enabled:!0,rotation:!0,skipFrames:99,skipTime:1e3,minConfidence:.5,iouThreshold:.2,maxDetected:-1,landmarks:!0,detector:{modelPath:"handtrack.json"},skeleton:{modelPath:"handlandmark-full.json"}},object:{enabled:!1,modelPath:"mb3-centernet.json",minConfidence:.2,iouThreshold:.4,maxDetected:10,skipFrames:99,skipTime:2e3},segmentation:{enabled:!1,modelPath:"rvm.json",ratio:.5,mode:"default"}};var Qe={};xa(Qe,{Abs:()=>xl,Acos:()=>Nc,Acosh:()=>Ec,AdadeltaOptimizer:()=>a2,AdagradOptimizer:()=>o2,AdamOptimizer:()=>i2,AdamaxOptimizer:()=>l2,Add:()=>Da,AddN:()=>xo,All:()=>Rc,Any:()=>_c,ArgMax:()=>bo,ArgMin:()=>Dc,Asin:()=>$c,Asinh:()=>Pc,Atan:()=>Fc,Atan2:()=>bl,Atanh:()=>Oc,AvgPool:()=>vo,AvgPool3D:()=>Hp,AvgPool3DGrad:()=>s0,AvgPoolGrad:()=>n0,BackendWasm:()=>mT,BatchMatMul:()=>wo,BatchToSpaceND:()=>vl,Bincount:()=>r0,BroadcastArgs:()=>a0,BroadcastTo:()=>P6,Callback:()=>X8,CallbackList:()=>Jk,Cast:()=>ko,Ceil:()=>So,ClipByValue:()=>$a,Complex:()=>jp,ComplexAbs:()=>qp,Concat:()=>wl,Conv2D:()=>Io,Conv2DBackpropFilter:()=>o0,Conv2DBackpropInput:()=>Co,Conv3D:()=>Xp,Conv3DBackpropFilterV2:()=>i0,Conv3DBackpropInputV2:()=>l0,Cos:()=>To,Cosh:()=>No,CropAndResize:()=>Sl,Cumprod:()=>kl,Cumsum:()=>Eo,CustomCallback:()=>e8,DataStorage:()=>Gp,DenseBincount:()=>u0,DepthToSpace:()=>Il,DepthwiseConv2dNative:()=>Ro,DepthwiseConv2dNativeBackpropFilter:()=>c0,DepthwiseConv2dNativeBackpropInput:()=>d0,Diag:()=>p0,Dilation2D:()=>Kp,Dilation2DBackpropFilter:()=>Im,Dilation2DBackpropInput:()=>Sm,ENV:()=>Wy,EarlyStopping:()=>K8,Einsum:()=>Zp,Elu:()=>Do,EluGrad:()=>h0,Environment:()=>D6,Equal:()=>Cl,Erf:()=>Mc,Exp:()=>$o,ExpandDims:()=>Tl,Expm1:()=>Nl,FFT:()=>f0,Fill:()=>zc,FlipLeftRight:()=>El,Floor:()=>Po,FloorDiv:()=>Fo,FromPixels:()=>Ip,FusedBatchNorm:()=>Oo,FusedConv2D:()=>oo,FusedDepthwiseConv2D:()=>io,GPGPUContext:()=>lc,GatherNd:()=>_l,GatherV2:()=>Rl,GraphModel:()=>Vh,Greater:()=>Dl,GreaterEqual:()=>Mo,History:()=>Qk,IFFT:()=>m0,Identity:()=>zo,Imag:()=>Yp,InputSpec:()=>on,IsFinite:()=>Lc,IsInf:()=>Bc,IsNan:()=>$l,KernelBackend:()=>Cc,LRN:()=>Jp,LRNGrad:()=>y0,LayerVariable:()=>Hk,LayersModel:()=>Ia,LeakyRelu:()=>Lo,Less:()=>Pl,LessEqual:()=>Fl,LinSpace:()=>g0,Log:()=>Bo,Log1p:()=>Wc,LogSoftmax:()=>O6,LogicalAnd:()=>Ol,LogicalNot:()=>Ml,LogicalOr:()=>Vc,LogicalXor:()=>F6,LowerBound:()=>CD,MathBackendWebGL:()=>Ad,Max:()=>Wo,MaxPool:()=>Uo,MaxPool3D:()=>Qp,MaxPool3DGrad:()=>x0,MaxPoolGrad:()=>A0,MaxPoolWithArgmax:()=>b0,Maximum:()=>Vo,Mean:()=>Go,Min:()=>Ho,Minimum:()=>jo,MirrorPad:()=>qo,Mod:()=>Uc,MomentumOptimizer:()=>u2,Multinomial:()=>v0,Multiply:()=>Xo,Neg:()=>zl,NonMaxSuppressionV3:()=>Bl,NonMaxSuppressionV4:()=>Gc,NonMaxSuppressionV5:()=>Wl,NotEqual:()=>Ll,OP_SCOPE_SUFFIX:()=>Hy,OneHot:()=>Ul,OnesLike:()=>Vl,Optimizer:()=>Oa,OptimizerConstructors:()=>Ka,Pack:()=>Gl,PadV2:()=>Ko,Pool:()=>TD,Pow:()=>Zo,Prelu:()=>Yo,Prod:()=>Jo,RMSPropOptimizer:()=>c2,RNN:()=>pa,RaggedTensorToTensor:()=>w0,Range:()=>Hc,Rank:()=>F3,Real:()=>eh,RealDiv:()=>_o,Reciprocal:()=>Hl,Reduction:()=>is,Relu:()=>Qo,Relu6:()=>ni,Reshape:()=>jl,ResizeBilinear:()=>ti,ResizeBilinearGrad:()=>S0,ResizeNearestNeighbor:()=>ei,ResizeNearestNeighborGrad:()=>k0,Reverse:()=>ql,RotateWithOffset:()=>iu,Round:()=>Xl,Rsqrt:()=>si,SGDOptimizer:()=>Rh,ScatterNd:()=>Kl,SearchSorted:()=>I0,Select:()=>Zl,Selu:()=>jc,Sequential:()=>xc,Sigmoid:()=>ai,Sign:()=>qc,Sin:()=>ri,Sinh:()=>Jl,Slice:()=>Yl,Softmax:()=>li,Softplus:()=>Xc,SpaceToBatchND:()=>Ql,SparseFillEmptyRows:()=>th,SparseReshape:()=>Kc,SparseSegmentMean:()=>nh,SparseSegmentSum:()=>sh,SparseToDense:()=>rh,SplitV:()=>eu,Sqrt:()=>oi,Square:()=>Zc,SquaredDifference:()=>ui,Step:()=>pi,StridedSlice:()=>tu,StringNGrams:()=>Yc,StringSplit:()=>ah,StringToHashBucketFast:()=>oh,Sub:()=>ci,Sum:()=>ii,SymbolicTensor:()=>Mr,Tan:()=>nu,Tanh:()=>di,Tensor:()=>it,TensorBuffer:()=>An,Tile:()=>Pa,TopK:()=>su,Transform:()=>ru,Transpose:()=>na,Unique:()=>C0,Unpack:()=>au,UnsortedSegmentSum:()=>ih,UpperBound:()=>ND,Variable:()=>Np,WebGPUBackend:()=>B2,ZerosLike:()=>ou,_FusedMatMul:()=>ao,abs:()=>an,acos:()=>uA,acosh:()=>cA,add:()=>de,addN:()=>N0,all:()=>E0,any:()=>_p,argMax:()=>Ms,argMin:()=>dA,asin:()=>pA,asinh:()=>hA,atan:()=>fA,atan2:()=>mA,atanh:()=>gA,avgPool:()=>yh,avgPool3d:()=>AA,backend:()=>Us,backend_util:()=>T,basicLSTMCell:()=>Tw,batchNorm:()=>Qc,batchNorm2d:()=>xA,batchNorm3d:()=>bA,batchNorm4d:()=>vA,batchToSpaceND:()=>Ah,bincount:()=>wA,booleanMaskAsync:()=>uk,broadcastArgs:()=>Nw,broadcastTo:()=>nl,broadcast_util:()=>uu,browser:()=>la,buffer:()=>Ue,callbacks:()=>Lj,cast:()=>ge,ceil:()=>kA,clipByValue:()=>ws,clone:()=>Gn,complex:()=>Ta,concat:()=>ct,concat1d:()=>SA,concat2d:()=>cu,concat3d:()=>IA,concat4d:()=>CA,constraints:()=>Xk,conv1d:()=>R0,conv2d:()=>Na,conv2dTranspose:()=>_0,conv3d:()=>NA,conv3dTranspose:()=>EA,copyRegisteredKernels:()=>DD,cos:()=>xh,cosh:()=>D0,cosineWindow:()=>e2,cumprod:()=>Dp,cumsum:()=>$0,customGrad:()=>oa,data:()=>xS,denseBincount:()=>Rw,deprecationWarn:()=>Qy,depthToSpace:()=>RA,depthwiseConv2d:()=>ed,deregisterOp:()=>Vj,device_util:()=>dh,diag:()=>_w,dilation2d:()=>_A,disableDeprecationWarnings:()=>aP,dispose:()=>Q,disposeVariables:()=>oP,div:()=>ye,divNoNan:()=>DA,dot:()=>$A,dropout:()=>a5,einsum:()=>Dw,elu:()=>td,enableDebugMode:()=>rP,enableProdMode:()=>Jy,enclosingPowerOfTwo:()=>o5,engine:()=>Qt,env:()=>H,equal:()=>zs,erf:()=>PA,euclideanNorm:()=>MA,exp:()=>Ls,expandDims:()=>Ft,expm1:()=>zA,eye:()=>P0,fft:()=>Nh,fill:()=>ca,findBackend:()=>eA,findBackendFactory:()=>cP,floor:()=>sd,floorDiv:()=>Jc,forceHalfFloat:()=>P9,fused:()=>gc,gather:()=>rd,gatherND:()=>hk,gather_util:()=>nA,getBackend:()=>dn,getGradient:()=>$3,getKernel:()=>Cm,getKernelsForBackend:()=>ra,getThreadsCount:()=>x0e,gpgpu_util:()=>p9,grad:()=>$O,grads:()=>PO,greater:()=>Is,greaterEqual:()=>mi,ifft:()=>mc,imag:()=>mh,image:()=>Ce,inTopKAsync:()=>fk,initializers:()=>Kk,input:()=>f8,io:()=>Fs,irfft:()=>Z0,isFinite:()=>LA,isInf:()=>BA,isNaN:()=>WA,keep:()=>Tn,kernel_impls:()=>Ar,layers:()=>Zk,leakyRelu:()=>bh,less:()=>F0,lessEqual:()=>gi,linalg:()=>u5,linspace:()=>Mw,loadGraphModel:()=>Lx,loadGraphModelSync:()=>Hq,loadLayersModel:()=>KG,localResponseNormalization:()=>VA,log:()=>Bs,log1p:()=>vh,logSigmoid:()=>UA,logSoftmax:()=>M0,logSumExp:()=>z0,logicalAnd:()=>gr,logicalNot:()=>wh,logicalOr:()=>L0,logicalXor:()=>GA,losses:()=>Ck,lowerBound:()=>Lw,matMul:()=>rt,math:()=>ow,max:()=>xn,maxPool:()=>kh,maxPool3d:()=>HA,maxPoolWithArgmax:()=>Bw,maximum:()=>da,mean:()=>Ut,memory:()=>Em,meshgrid:()=>Ww,metrics:()=>H8,min:()=>Ea,minimum:()=>ad,mirrorPad:()=>jA,mod:()=>pu,model:()=>qG,models:()=>j8,moments:()=>Sh,movingAverage:()=>ck,mul:()=>z,multiRNNCell:()=>Vw,multinomial:()=>Uw,neg:()=>Pt,nextFrame:()=>c5,norm:()=>nd,notEqual:()=>dl,oneHot:()=>pc,ones:()=>Os,onesLike:()=>Ws,op:()=>W,outerProduct:()=>Gw,pad:()=>ar,pad1d:()=>Hw,pad2d:()=>jw,pad3d:()=>qw,pad4d:()=>Xw,pool:()=>qA,pow:()=>Ra,prelu:()=>Ch,print:()=>Ky,prod:()=>XA,profile:()=>iP,raggedTensorToTensor:()=>Kw,rand:()=>Zw,randomGamma:()=>Yw,randomNormal:()=>W0,randomStandardNormal:()=>Jw,randomUniform:()=>od,range:()=>fc,ready:()=>fh,real:()=>hc,reciprocal:()=>YA,registerBackend:()=>lu,registerCallbackConstructor:()=>ZG,registerGradient:()=>M6,registerKernel:()=>rr,registerOp:()=>Wj,regularizers:()=>q8,relu:()=>Gr,relu6:()=>V0,removeBackend:()=>uP,reshape:()=>V,reverse:()=>nr,reverse1d:()=>Qw,reverse2d:()=>ek,reverse3d:()=>tk,reverse4d:()=>nk,rfft:()=>Eh,round:()=>U0,rsqrt:()=>G0,scalar:()=>Te,scatterND:()=>dk,scatter_util:()=>sA,searchSorted:()=>B0,selu:()=>H0,separableConv2d:()=>j0,sequential:()=>XG,serialization:()=>he,setBackend:()=>hh,setPlatform:()=>dP,setThreadsCount:()=>A0e,setWasmPath:()=>y0e,setWasmPaths:()=>L2,setWebGLContext:()=>D2,setdiff1dAsync:()=>sk,sigmoid:()=>On,sign:()=>JA,signal:()=>Ik,sin:()=>q0,sinh:()=>X0,slice:()=>Le,slice1d:()=>Th,slice2d:()=>K0,slice3d:()=>yi,slice4d:()=>uo,slice_util:()=>jt,softmax:()=>hu,softplus:()=>du,spaceToBatchND:()=>Ih,sparse:()=>Tk,sparseToDense:()=>pk,spectral:()=>Sk,split:()=>qt,sqrt:()=>zn,square:()=>wt,squaredDifference:()=>Y0,squeeze:()=>Ke,stack:()=>un,step:()=>fu,stridedSlice:()=>QA,string:()=>Nk,sub:()=>Ae,sum:()=>Se,sumOutType:()=>ch,tan:()=>e5,tanh:()=>ul,tensor:()=>Xe,tensor1d:()=>Ot,tensor2d:()=>mr,tensor3d:()=>tA,tensor4d:()=>rk,tensor5d:()=>ak,tensor6d:()=>ok,tensor_util:()=>zr,test_util:()=>vw,tidy:()=>Y,tile:()=>bs,time:()=>lP,topk:()=>t5,train:()=>ji,transpose:()=>at,truncatedNormal:()=>J0,unique:()=>n5,unregisterGradient:()=>_D,unregisterKernel:()=>RD,unsortedSegmentSum:()=>Q0,unstack:()=>wn,upcastType:()=>Hn,upperBound:()=>ik,util:()=>v,valueAndGrad:()=>FO,valueAndGrads:()=>OO,variable:()=>s5,variableGrads:()=>zw,version:()=>Jh,version_converter:()=>qq,version_core:()=>lA,version_layers:()=>D5,version_wasm:()=>b0e,version_webgl:()=>pse,webgl:()=>hse,webgl_util:()=>OI,webgpu_util:()=>AT,where:()=>jn,whereAsync:()=>r5,zeros:()=>Gt,zerosLike:()=>dt});var O_=Object.create,Oy=Object.defineProperty,M_=Object.getOwnPropertyDescriptor,b6=Object.getOwnPropertyNames,z_=Object.getPrototypeOf,L_=Object.prototype.hasOwnProperty,cn=(e,t)=>function(){return t||(0,e[b6(e)[0]])((t={exports:{}}).exports,t),t.exports},qe=(e,t)=>{for(var n in t)Oy(e,n,{get:t[n],enumerable:!0})},B_=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of b6(t))!L_.call(e,r)&&r!==n&&Oy(e,r,{get:()=>t[r],enumerable:!(s=M_(t,r))||s.enumerable});return e},yo=(e,t,n)=>(n=e!=null?O_(z_(e)):{},B_(t||!e||!e.__esModule?Oy(n,"default",{value:e,enumerable:!0}):n,e)),W_=cn({"node_modules/.pnpm/long@4.0.0/node_modules/long/src/long.js"(e,t){t.exports=s;var n=null;try{n=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(P){}function s(P,S,M){this.low=P|0,this.high=S|0,this.unsigned=!!M}s.prototype.__isLong__,Object.defineProperty(s.prototype,"__isLong__",{value:!0});function r(P){return(P&&P.__isLong__)===!0}s.isLong=r;var a={},o={};function i(P,S){var M,L,U;return S?(P>>>=0,(U=0<=P&&P<256)&&(L=o[P],L)?L:(M=u(P,(P|0)<0?-1:0,!0),U&&(o[P]=M),M)):(P|=0,(U=-128<=P&&P<128)&&(L=a[P],L)?L:(M=u(P,P<0?-1:0,!1),U&&(a[P]=M),M))}s.fromInt=i;function l(P,S){if(isNaN(P))return S?b:A;if(S){if(P<0)return b;if(P>=g)return _}else{if(P<=-y)return $;if(P+1>=y)return E}return P<0?l(-P,S).neg():u(P%m|0,P/m|0,S)}s.fromNumber=l;function u(P,S,M){return new s(P,S,M)}s.fromBits=u;var c=Math.pow;function p(P,S,M){if(P.length===0)throw Error("empty string");if(P==="NaN"||P==="Infinity"||P==="+Infinity"||P==="-Infinity")return A;if(typeof S=="number"?(M=S,S=!1):S=!!S,M=M||10,M<2||360)throw Error("interior hyphen");if(L===0)return p(P.substring(1),S,M).neg();for(var U=l(c(M,8)),K=A,q=0;q>>0:this.low},R.toNumber=function(){return this.unsigned?(this.high>>>0)*m+(this.low>>>0):this.high*m+(this.low>>>0)},R.toString=function(S){if(S=S||10,S<2||36>>0,le=te.toString(S);if(q=J,q.isZero())return le+Z;for(;le.length<6;)le="0"+le;Z=""+le+Z}},R.getHighBits=function(){return this.high},R.getHighBitsUnsigned=function(){return this.high>>>0},R.getLowBits=function(){return this.low},R.getLowBitsUnsigned=function(){return this.low>>>0},R.getNumBitsAbs=function(){if(this.isNegative())return this.eq($)?64:this.neg().getNumBitsAbs();for(var S=this.high!=0?this.high:this.low,M=31;M>0&&(S&1<=0},R.isOdd=function(){return(this.low&1)===1},R.isEven=function(){return(this.low&1)===0},R.equals=function(S){return r(S)||(S=d(S)),this.unsigned!==S.unsigned&&this.high>>>31===1&&S.high>>>31===1?!1:this.high===S.high&&this.low===S.low},R.eq=R.equals,R.notEquals=function(S){return!this.eq(S)},R.neq=R.notEquals,R.ne=R.notEquals,R.lessThan=function(S){return this.comp(S)<0},R.lt=R.lessThan,R.lessThanOrEqual=function(S){return this.comp(S)<=0},R.lte=R.lessThanOrEqual,R.le=R.lessThanOrEqual,R.greaterThan=function(S){return this.comp(S)>0},R.gt=R.greaterThan,R.greaterThanOrEqual=function(S){return this.comp(S)>=0},R.gte=R.greaterThanOrEqual,R.ge=R.greaterThanOrEqual,R.compare=function(S){if(r(S)||(S=d(S)),this.eq(S))return 0;var M=this.isNegative(),L=S.isNegative();return M&&!L?-1:!M&&L?1:this.unsigned?S.high>>>0>this.high>>>0||S.high===this.high&&S.low>>>0>this.low>>>0?-1:1:this.sub(S).isNegative()?-1:1},R.comp=R.compare,R.negate=function(){return!this.unsigned&&this.eq($)?$:this.not().add(w)},R.neg=R.negate,R.add=function(S){r(S)||(S=d(S));var M=this.high>>>16,L=this.high&65535,U=this.low>>>16,K=this.low&65535,q=S.high>>>16,Z=S.high&65535,J=S.low>>>16,te=S.low&65535,le=0,ae=0,pe=0,ce=0;return ce+=K+te,pe+=ce>>>16,ce&=65535,pe+=U+J,ae+=pe>>>16,pe&=65535,ae+=L+Z,le+=ae>>>16,ae&=65535,le+=M+q,le&=65535,u(pe<<16|ce,le<<16|ae,this.unsigned)},R.subtract=function(S){return r(S)||(S=d(S)),this.add(S.neg())},R.sub=R.subtract,R.multiply=function(S){if(this.isZero())return A;if(r(S)||(S=d(S)),n){var M=n.mul(this.low,this.high,S.low,S.high);return u(M,n.get_high(),this.unsigned)}if(S.isZero())return A;if(this.eq($))return S.isOdd()?$:A;if(S.eq($))return this.isOdd()?$:A;if(this.isNegative())return S.isNegative()?this.neg().mul(S.neg()):this.neg().mul(S).neg();if(S.isNegative())return this.mul(S.neg()).neg();if(this.lt(x)&&S.lt(x))return l(this.toNumber()*S.toNumber(),this.unsigned);var L=this.high>>>16,U=this.high&65535,K=this.low>>>16,q=this.low&65535,Z=S.high>>>16,J=S.high&65535,te=S.low>>>16,le=S.low&65535,ae=0,pe=0,ce=0,xe=0;return xe+=q*le,ce+=xe>>>16,xe&=65535,ce+=K*le,pe+=ce>>>16,ce&=65535,ce+=q*te,pe+=ce>>>16,ce&=65535,pe+=U*le,ae+=pe>>>16,pe&=65535,pe+=K*te,ae+=pe>>>16,pe&=65535,pe+=q*J,ae+=pe>>>16,pe&=65535,ae+=L*le+U*te+K*J+q*Z,ae&=65535,u(ce<<16|xe,ae<<16|pe,this.unsigned)},R.mul=R.multiply,R.divide=function(S){if(r(S)||(S=d(S)),S.isZero())throw Error("division by zero");if(n){if(!this.unsigned&&this.high===-2147483648&&S.low===-1&&S.high===-1)return this;var M=(this.unsigned?n.div_u:n.div_s)(this.low,this.high,S.low,S.high);return u(M,n.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?b:A;var L,U,K;if(this.unsigned){if(S.unsigned||(S=S.toUnsigned()),S.gt(this))return b;if(S.gt(this.shru(1)))return k;K=b}else{if(this.eq($)){if(S.eq(w)||S.eq(C))return $;if(S.eq($))return w;var q=this.shr(1);return L=q.div(S).shl(1),L.eq(A)?S.isNegative()?w:C:(U=this.sub(S.mul(L)),K=L.add(U.div(S)),K)}else if(S.eq($))return this.unsigned?b:A;if(this.isNegative())return S.isNegative()?this.neg().div(S.neg()):this.neg().div(S).neg();if(S.isNegative())return this.div(S.neg()).neg();K=A}for(U=this;U.gte(S);){L=Math.max(1,Math.floor(U.toNumber()/S.toNumber()));for(var Z=Math.ceil(Math.log(L)/Math.LN2),J=Z<=48?1:c(2,Z-48),te=l(L),le=te.mul(S);le.isNegative()||le.gt(U);)L-=J,te=l(L,this.unsigned),le=te.mul(S);te.isZero()&&(te=w),K=K.add(te),U=U.sub(le)}return K},R.div=R.divide,R.modulo=function(S){if(r(S)||(S=d(S)),n){var M=(this.unsigned?n.rem_u:n.rem_s)(this.low,this.high,S.low,S.high);return u(M,n.get_high(),this.unsigned)}return this.sub(this.div(S).mul(S))},R.mod=R.modulo,R.rem=R.modulo,R.not=function(){return u(~this.low,~this.high,this.unsigned)},R.and=function(S){return r(S)||(S=d(S)),u(this.low&S.low,this.high&S.high,this.unsigned)},R.or=function(S){return r(S)||(S=d(S)),u(this.low|S.low,this.high|S.high,this.unsigned)},R.xor=function(S){return r(S)||(S=d(S)),u(this.low^S.low,this.high^S.high,this.unsigned)},R.shiftLeft=function(S){return r(S)&&(S=S.toInt()),(S&=63)===0?this:S<32?u(this.low<>>32-S,this.unsigned):u(0,this.low<>>S|this.high<<32-S,this.high>>S,this.unsigned):u(this.high>>S-32,this.high>=0?0:-1,this.unsigned)},R.shr=R.shiftRight,R.shiftRightUnsigned=function(S){if(r(S)&&(S=S.toInt()),S&=63,S===0)return this;var M=this.high;if(S<32){var L=this.low;return u(L>>>S|M<<32-S,M>>>S,this.unsigned)}else return S===32?u(M,0,this.unsigned):u(M>>>S-32,0,this.unsigned)},R.shru=R.shiftRightUnsigned,R.shr_u=R.shiftRightUnsigned,R.toSigned=function(){return this.unsigned?u(this.low,this.high,!1):this},R.toUnsigned=function(){return this.unsigned?this:u(this.low,this.high,!0)},R.toBytes=function(S){return S?this.toBytesLE():this.toBytesBE()},R.toBytesLE=function(){var S=this.high,M=this.low;return[M&255,M>>>8&255,M>>>16&255,M>>>24,S&255,S>>>8&255,S>>>16&255,S>>>24]},R.toBytesBE=function(){var S=this.high,M=this.low;return[S>>>24,S>>>16&255,S>>>8&255,S&255,M>>>24,M>>>16&255,M>>>8&255,M&255]},s.fromBytes=function(S,M,L){return L?s.fromBytesLE(S,M):s.fromBytesBE(S,M)},s.fromBytesLE=function(S,M){return new s(S[0]|S[1]<<8|S[2]<<16|S[3]<<24,S[4]|S[5]<<8|S[6]<<16|S[7]<<24,M)},s.fromBytesBE=function(S,M){return new s(S[4]<<24|S[5]<<16|S[6]<<8|S[7],S[0]<<24|S[1]<<16|S[2]<<8|S[3],M)}}}),V_=cn({"(disabled):node_modules/.pnpm/node-fetch@2.6.7/node_modules/node-fetch/browser.js"(){}}),U_=cn({"(disabled):util"(){}}),G_=cn({"node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/alea.js"(e,t){(function(n,s,r){function a(u){var c=this,p=l();c.next=function(){var d=2091639*c.s0+c.c*23283064365386963e-26;return c.s0=c.s1,c.s1=c.s2,c.s2=d-(c.c=d|0)},c.c=1,c.s0=p(" "),c.s1=p(" "),c.s2=p(" "),c.s0-=p(u),c.s0<0&&(c.s0+=1),c.s1-=p(u),c.s1<0&&(c.s1+=1),c.s2-=p(u),c.s2<0&&(c.s2+=1),p=null}function o(u,c){return c.c=u.c,c.s0=u.s0,c.s1=u.s1,c.s2=u.s2,c}function i(u,c){var p=new a(u),d=c&&c.state,h=p.next;return h.int32=function(){return p.next()*4294967296|0},h.double=function(){return h()+(h()*2097152|0)*11102230246251565e-32},h.quick=h,d&&(typeof d=="object"&&o(d,p),h.state=function(){return o(p,{})}),h}function l(){var u=4022871197,c=function(p){p=String(p);for(var d=0;d>>0,h-=u,h*=u,u=h>>>0,h-=u,u+=h*4294967296}return(u>>>0)*23283064365386963e-26};return c}s&&s.exports?s.exports=i:r&&r.amd?r(function(){return i}):this.alea=i})(e,typeof t=="object"&&t,typeof define=="function"&&define)}}),H_=cn({"node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/xor128.js"(e,t){(function(n,s,r){function a(l){var u=this,c="";u.x=0,u.y=0,u.z=0,u.w=0,u.next=function(){var d=u.x^u.x<<11;return u.x=u.y,u.y=u.z,u.z=u.w,u.w^=u.w>>>19^d^d>>>8},l===(l|0)?u.x=l:c+=l;for(var p=0;p>>0)/4294967296};return d.double=function(){do var h=c.next()>>>11,f=(c.next()>>>0)/4294967296,m=(h+f)/(1<<21);while(m===0);return m},d.int32=c.next,d.quick=d,p&&(typeof p=="object"&&o(p,c),d.state=function(){return o(c,{})}),d}s&&s.exports?s.exports=i:r&&r.amd?r(function(){return i}):this.xor128=i})(e,typeof t=="object"&&t,typeof define=="function"&&define)}}),j_=cn({"node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/xorwow.js"(e,t){(function(n,s,r){function a(l){var u=this,c="";u.next=function(){var d=u.x^u.x>>>2;return u.x=u.y,u.y=u.z,u.z=u.w,u.w=u.v,(u.d=u.d+362437|0)+(u.v=u.v^u.v<<4^(d^d<<1))|0},u.x=0,u.y=0,u.z=0,u.w=0,u.v=0,l===(l|0)?u.x=l:c+=l;for(var p=0;p>>4),u.next()}function o(l,u){return u.x=l.x,u.y=l.y,u.z=l.z,u.w=l.w,u.v=l.v,u.d=l.d,u}function i(l,u){var c=new a(l),p=u&&u.state,d=function(){return(c.next()>>>0)/4294967296};return d.double=function(){do var h=c.next()>>>11,f=(c.next()>>>0)/4294967296,m=(h+f)/(1<<21);while(m===0);return m},d.int32=c.next,d.quick=d,p&&(typeof p=="object"&&o(p,c),d.state=function(){return o(c,{})}),d}s&&s.exports?s.exports=i:r&&r.amd?r(function(){return i}):this.xorwow=i})(e,typeof t=="object"&&t,typeof define=="function"&&define)}}),q_=cn({"node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/xorshift7.js"(e,t){(function(n,s,r){function a(l){var u=this;u.next=function(){var p=u.x,d=u.i,h,f,m;return h=p[d],h^=h>>>7,f=h^h<<24,h=p[d+1&7],f^=h^h>>>10,h=p[d+3&7],f^=h^h>>>3,h=p[d+4&7],f^=h^h<<7,h=p[d+7&7],h=h^h<<13,f^=h^h<<9,p[d]=f,u.i=d+1&7,f};function c(p,d){var h,f,m=[];if(d===(d|0))f=m[0]=d;else for(d=""+d,h=0;h0;--h)p.next()}c(u,l)}function o(l,u){return u.x=l.x.slice(),u.i=l.i,u}function i(l,u){l==null&&(l=+new Date);var c=new a(l),p=u&&u.state,d=function(){return(c.next()>>>0)/4294967296};return d.double=function(){do var h=c.next()>>>11,f=(c.next()>>>0)/4294967296,m=(h+f)/(1<<21);while(m===0);return m},d.int32=c.next,d.quick=d,p&&(p.x&&o(p,c),d.state=function(){return o(c,{})}),d}s&&s.exports?s.exports=i:r&&r.amd?r(function(){return i}):this.xorshift7=i})(e,typeof t=="object"&&t,typeof define=="function"&&define)}}),X_=cn({"node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/xor4096.js"(e,t){(function(n,s,r){function a(l){var u=this;u.next=function(){var p=u.w,d=u.X,h=u.i,f,m;return u.w=p=p+1640531527|0,m=d[h+34&127],f=d[h=h+1&127],m^=m<<13,f^=f<<17,m^=m>>>15,f^=f>>>12,m=d[h]=m^f,u.i=h,m+(p^p>>>16)|0};function c(p,d){var h,f,m,g,y,x=[],A=128;for(d===(d|0)?(f=d,d=null):(d=d+"\0",f=0,A=Math.max(A,d.length)),m=0,g=-32;g>>15,f^=f<<4,f^=f>>>13,g>=0&&(y=y+1640531527|0,h=x[g&127]^=f+y,m=h==0?m+1:0);for(m>=128&&(x[(d&&d.length||0)&127]=-1),m=127,g=4*128;g>0;--g)f=x[m+34&127],h=x[m=m+1&127],f^=f<<13,h^=h<<17,f^=f>>>15,h^=h>>>12,x[m]=f^h;p.w=y,p.X=x,p.i=m}c(u,l)}function o(l,u){return u.i=l.i,u.w=l.w,u.X=l.X.slice(),u}function i(l,u){l==null&&(l=+new Date);var c=new a(l),p=u&&u.state,d=function(){return(c.next()>>>0)/4294967296};return d.double=function(){do var h=c.next()>>>11,f=(c.next()>>>0)/4294967296,m=(h+f)/(1<<21);while(m===0);return m},d.int32=c.next,d.quick=d,p&&(p.X&&o(p,c),d.state=function(){return o(c,{})}),d}s&&s.exports?s.exports=i:r&&r.amd?r(function(){return i}):this.xor4096=i})(e,typeof t=="object"&&t,typeof define=="function"&&define)}}),K_=cn({"node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/tychei.js"(e,t){(function(n,s,r){function a(l){var u=this,c="";u.next=function(){var d=u.b,h=u.c,f=u.d,m=u.a;return d=d<<25^d>>>7^h,h=h-f|0,f=f<<24^f>>>8^m,m=m-d|0,u.b=d=d<<20^d>>>12^h,u.c=h=h-f|0,u.d=f<<16^h>>>16^m,u.a=m-d|0},u.a=0,u.b=0,u.c=-1640531527,u.d=1367130551,l===Math.floor(l)?(u.a=l/4294967296|0,u.b=l|0):c+=l;for(var p=0;p>>0)/4294967296};return d.double=function(){do var h=c.next()>>>11,f=(c.next()>>>0)/4294967296,m=(h+f)/(1<<21);while(m===0);return m},d.int32=c.next,d.quick=d,p&&(typeof p=="object"&&o(p,c),d.state=function(){return o(c,{})}),d}s&&s.exports?s.exports=i:r&&r.amd?r(function(){return i}):this.tychei=i})(e,typeof t=="object"&&t,typeof define=="function"&&define)}}),Z_=cn({"(disabled):crypto"(){}}),Y_=cn({"node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/seedrandom.js"(e,t){(function(n,s,r){var a=256,o=6,i=52,l="random",u=r.pow(a,o),c=r.pow(2,i),p=c*2,d=a-1,h;function f(w,k,C){var E=[];k=k==!0?{entropy:!0}:k||{};var _=x(y(k.entropy?[w,b(s)]:w==null?A():w,3),E),$=new m(E),R=function(){for(var P=$.g(o),S=u,M=0;P=p;)P/=2,S/=2,M>>>=1;return(P+M)/S};return R.int32=function(){return $.g(4)|0},R.quick=function(){return $.g(4)/4294967296},R.double=R,x(b($.S),s),(k.pass||C||function(P,S,M,L){return L&&(L.S&&g(L,$),P.state=function(){return g($,{})}),M?(r[l]=P,S):P})(R,_,"global"in k?k.global:this==r,k.state)}function m(w){var k,C=w.length,E=this,_=0,$=E.i=E.j=0,R=E.S=[];for(C||(w=[C++]);_{var s=typeof document!="undefined"&&document.currentScript?document.currentScript.src:void 0;return typeof __filename!="undefined"&&(s=s||__filename),function(r){r=r||{};function a(){return Me.buffer!=ns&&Tr(Me.buffer),mf}function o(){return Me.buffer!=ns&&Tr(Me.buffer),gf}function i(){return Me.buffer!=ns&&Tr(Me.buffer),Hd}function l(){return Me.buffer!=ns&&Tr(Me.buffer),yf}function u(){return Me.buffer!=ns&&Tr(Me.buffer),Af}function c(){return Me.buffer!=ns&&Tr(Me.buffer),xf}function p(){return Me.buffer!=ns&&Tr(Me.buffer),bf}var d=typeof r!="undefined"?r:{},h,f;d.ready=new Promise(function(N,F){h=N,f=F});var m;typeof process!="undefined"&&process.listeners&&(m={uncaughtException:process.listeners("uncaughtException"),unhandledRejection:process.listeners("unhandledRejection")});var g=Object.assign({},d),y=[],x="./this.program",A=(N,F)=>{throw F},b=typeof window=="object",w=typeof importScripts=="function",k=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",C=d.ENVIRONMENT_IS_PTHREAD||!1,E="";function _(N){return d.locateFile?d.locateFile(N,E):E+N}var $,R,P,S;function M(N){if(N instanceof tp)return;te("exiting due to exception: "+N)}var L,U,K;if(k){w?E=vm().dirname(E)+"/":E=__dirname+"/",K=()=>{U||(L=My(),U=vm())},$=function(G,se){return K(),G=U.normalize(G),L.readFileSync(G,se?void 0:"utf8")},P=F=>{var G=$(F,!0);return G.buffer||(G=new Uint8Array(G)),G},R=(F,G,se)=>{K(),F=U.normalize(F),L.readFile(F,function(be,ke){be?se(be):G(ke.buffer)})},process.argv.length>1&&(x=process.argv[1].replace(/\\/g,"/")),y=process.argv.slice(2),process.on("uncaughtException",function(F){if(!(F instanceof tp))throw F}),process.on("unhandledRejection",function(F){throw F}),A=(F,G)=>{if(zi())throw process.exitCode=F,G;M(G),process.exit(F)},d.inspect=function(){return"[Emscripten Module object]"};let N;try{N=J_()}catch(F){throw console.error('The "worker_threads" module is not supported in this node.js build - perhaps a newer version is needed?'),F}global.Worker=N.Worker}else(b||w)&&(w?E=self.location.href:typeof document!="undefined"&&document.currentScript&&(E=document.currentScript.src),typeof s!="undefined"&&s&&(E=s),E.indexOf("blob:")!==0?E=E.substr(0,E.replace(/[?#].*/,"").lastIndexOf("/")+1):E="",k||($=N=>{var F=new XMLHttpRequest;return F.open("GET",N,!1),F.send(null),F.responseText},w&&(P=N=>{var F=new XMLHttpRequest;return F.open("GET",N,!1),F.responseType="arraybuffer",F.send(null),new Uint8Array(F.response)}),R=(N,F,G)=>{var se=new XMLHttpRequest;se.open("GET",N,!0),se.responseType="arraybuffer",se.onload=()=>{if(se.status==200||se.status==0&&se.response){F(se.response);return}G()},se.onerror=G,se.send(null)}),S=N=>document.title=N);k&&typeof performance=="undefined"&&(global.performance=Q_().performance);var q=console.log.bind(console),Z=console.warn.bind(console);k&&(K(),q=N=>L.writeSync(1,N+` -`),Z=N=>L.writeSync(2,N+` -`));var J=d.print||q,te=d.printErr||Z;Object.assign(d,g),g=null,d.arguments&&(y=d.arguments),d.thisProgram&&(x=d.thisProgram),d.quit&&(A=d.quit);var le=4;function ae(N){ae.shown||(ae.shown={}),ae.shown[N]||(ae.shown[N]=1,te(N))}function pe(N,F){if(typeof WebAssembly.Function=="function"){for(var G={i:"i32",j:"i64",f:"f32",d:"f64"},se={parameters:[],results:F[0]=="v"?[]:[G[F[0]]]},be=1;be{De=N},ze=Atomics.load,ut=Atomics.store,At=Atomics.compareExchange,ft;d.wasmBinary&&(ft=d.wasmBinary);var xt=d.noExitRuntime||!0;typeof WebAssembly!="object"&&zu("no native wasm support detected");var Me,Tt,It=!1,Qn;function sn(N,F){N||zu(F)}function Ns(N){var F=d["_"+N];return F}function gn(N,F,G,se,be){var ke={string:function(_s){var Xu=0;if(_s!=null&&_s!==0){var Ev=(_s.length<<2)+1;Xu=qu(Ev),ya(_s,Xu,Ev)}return Xu},array:function(_s){var Xu=qu(_s.length);return Aa(_s,Xu),Xu}};function Ee(_s){return F==="string"?ts(_s):F==="boolean"?Boolean(_s):_s}var Be=Ns(N),Wt=[],_r=0;if(se)for(var Dr=0;Dr(G.buffer instanceof SharedArrayBuffer&&(G=new Uint8Array(G)),F.decode.call(F,G))}var Vn=typeof TextDecoder!="undefined"?new Rs("utf8"):void 0;function Zs(N,F,G){for(var se=F+G,be=F;N[be]&&!(be>=se);)++be;if(be-F>16&&N.subarray&&Vn)return Vn.decode(N.subarray(F,be));for(var ke="";F>10,56320|_r&1023)}}return ke}function ts(N,F){return N?Zs(o(),N,F):""}function ga(N,F,G,se){if(!(se>0))return 0;for(var be=G,ke=G+se-1,Ee=0;Ee=55296&&Be<=57343){var Wt=N.charCodeAt(++Ee);Be=65536+((Be&1023)<<10)|Wt&1023}if(Be<=127){if(G>=ke)break;F[G++]=Be}else if(Be<=2047){if(G+1>=ke)break;F[G++]=192|Be>>6,F[G++]=128|Be&63}else if(Be<=65535){if(G+2>=ke)break;F[G++]=224|Be>>12,F[G++]=128|Be>>6&63,F[G++]=128|Be&63}else{if(G+3>=ke)break;F[G++]=240|Be>>18,F[G++]=128|Be>>12&63,F[G++]=128|Be>>6&63,F[G++]=128|Be&63}}return F[G]=0,G-be}function ya(N,F,G){return ga(N,o(),F,G)}function Fu(N){for(var F=0,G=0;G=55296&&se<=57343&&(se=65536+((se&1023)<<10)|N.charCodeAt(++G)&1023),se<=127?++F:se<=2047?F+=2:se<=65535?F+=3:F+=4}return F}var Ga=typeof TextDecoder!="undefined"?new Rs("utf-16le"):void 0;function Aa(N,F){a().set(N,F)}function Gd(N,F,G){for(var se=0;se>0]=N.charCodeAt(se);G||(a()[F>>0]=0)}function Ou(N,F){return N%F>0&&(N+=F-N%F),N}var ns,mf,gf,Hd,yf,Af,uv,xf,bf;C&&(ns=d.buffer);function Tr(N){ns=N,d.HEAP8=mf=new Int8Array(N),d.HEAP16=Hd=new Int16Array(N),d.HEAP32=Af=new Int32Array(N),d.HEAPU8=gf=new Uint8Array(N),d.HEAPU16=yf=new Uint16Array(N),d.HEAPU32=uv=new Uint32Array(N),d.HEAPF32=xf=new Float32Array(N),d.HEAPF64=bf=new Float64Array(N)}var vf=d.INITIAL_MEMORY||16777216;if(C)Me=d.wasmMemory,ns=d.buffer;else if(d.wasmMemory)Me=d.wasmMemory;else if(Me=new WebAssembly.Memory({initial:vf/65536,maximum:32768,shared:!0}),!(Me.buffer instanceof SharedArrayBuffer))throw te("requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag"),k&&console.log("(on node you may need: --experimental-wasm-threads --experimental-wasm-bulk-memory and also use a recent version)"),Error("bad memory");Me&&(ns=Me.buffer),vf=ns.byteLength,Tr(ns);var Ys,Mu=[],Ha=[],F1=[],wf=[],Mi=!1,O1=!1,kf=0;function zi(){return xt||kf>0}function ss(){if(d.preRun)for(typeof d.preRun=="function"&&(d.preRun=[d.preRun]);d.preRun.length;)cv(d.preRun.shift());Tf(Mu)}function jd(){Mi=!0,!C&&Tf(Ha)}function M1(){C||(We.terminateAllThreads(),O1=!0)}function z1(){if(!C){if(d.postRun)for(typeof d.postRun=="function"&&(d.postRun=[d.postRun]);d.postRun.length;)qd(d.postRun.shift());Tf(wf)}}function cv(N){Mu.unshift(N)}function dv(N){Ha.unshift(N)}function qd(N){wf.unshift(N)}var ja=0,Sf=null,Nr=null;function Xd(N){ja++,d.monitorRunDependencies&&d.monitorRunDependencies(ja)}function pv(N){if(ja--,d.monitorRunDependencies&&d.monitorRunDependencies(ja),ja==0&&(Sf!==null&&(clearInterval(Sf),Sf=null),Nr)){var F=Nr;Nr=null,F()}}d.preloadedImages={},d.preloadedAudios={};function zu(N){C?postMessage({cmd:"onAbort",arg:N}):d.onAbort&&d.onAbort(N),N="Aborted("+N+")",te(N),It=!0,Qn=1,N+=". Build with -s ASSERTIONS=1 for more info.";var F=new WebAssembly.RuntimeError(N);throw f(F),F}var L1="data:application/octet-stream;base64,";function Kd(N){return N.startsWith(L1)}function If(N){return N.startsWith("file://")}var rs;rs="tfjs-backend-wasm-threaded-simd.wasm",Kd(rs)||(rs=_(rs));function Cf(N){try{if(N==rs&&ft)return new Uint8Array(ft);if(P)return P(N);throw"both async and sync fetching of the wasm failed"}catch(F){zu(F)}}function Lu(){if(!ft&&(b||w)){if(typeof fetch=="function"&&!If(rs))return fetch(rs,{credentials:"same-origin"}).then(function(N){if(!N.ok)throw"failed to load wasm binary file at '"+rs+"'";return N.arrayBuffer()}).catch(function(){return Cf(rs)});if(R)return new Promise(function(N,F){R(rs,function(G){N(new Uint8Array(G))},F)})}return Promise.resolve().then(function(){return Cf(rs)})}function B1(){var N={env:Lf,wasi_snapshot_preview1:Lf};function F(Ee,Be){var Wt=Ee.exports;if(d.asm=Wt,q1(d.asm.emscripten_tls_init),Ys=d.asm.__indirect_function_table,dv(d.asm.__wasm_call_ctors),Tt=Be,!C){var _r=We.unusedWorkers.length;We.unusedWorkers.forEach(function(Dr){We.loadWasmModuleToWorker(Dr,function(){--_r||pv("wasm-instantiate")})})}}C||Xd("wasm-instantiate");function G(Ee){F(Ee.instance,Ee.module)}function se(Ee){return Lu().then(function(Be){return WebAssembly.instantiate(Be,N)}).then(function(Be){return Be}).then(Ee,function(Be){te("failed to asynchronously prepare wasm: "+Be),zu(Be)})}function be(){return!ft&&typeof WebAssembly.instantiateStreaming=="function"&&!Kd(rs)&&!If(rs)&&typeof fetch=="function"?fetch(rs,{credentials:"same-origin"}).then(function(Ee){var Be=WebAssembly.instantiateStreaming(Ee,N);return Be.then(G,function(Wt){return te("wasm streaming compile failed: "+Wt),te("falling back to ArrayBuffer instantiation"),se(G)})}):se(G)}if(d.instantiateWasm)try{var ke=d.instantiateWasm(N,F);return ke}catch(Ee){return te("Module.instantiateWasm callback failed with error: "+Ee),!1}return be().catch(f),{}}var hv,fv,W1={};function Tf(N){for(;N.length>0;){var F=N.shift();if(typeof F=="function"){F(d);continue}var G=F.func;typeof G=="number"?F.arg===void 0?Wu(G)():Wu(G)(F.arg):G(F.arg===void 0?null:F.arg)}}function Bu(N){var F=f3(),G=N();return Gf(F),G}function MR(N){return N}function mv(N){var F=/\b_Z[\w\d_]+/g;return N.replace(F,function(G){var se=G;return G===se?G:se+" ["+G+"]"})}function V1(N){u()[N>>2]=0;var F=We.pthreads[N];delete We.pthreads[N],F.worker.terminate(),h3(N),We.runningWorkers.splice(We.runningWorkers.indexOf(F.worker),1),F.worker.pthread=void 0}function U1(N){var F=We.pthreads[N];F.worker.postMessage({cmd:"cancel"})}function Nf(N){var F=We.pthreads[N];if(F){u()[N>>2]=0;var G=F.worker;We.returnWorkerToPool(G)}}function Ef(N){C_(N)}function G1(N){if(N instanceof tp||N=="unwind")return Qn;A(1,N)}var We={unusedWorkers:[],runningWorkers:[],tlsInitFunctions:[],init:function(){C?We.initWorker():We.initMainThread()},initMainThread:function(){for(var N=8,F=0;F>2]=0;try{N()}finally{u()[Nv>>2]=1}},receiveObjectTransfer:function(N){},threadInit:function(){for(var N in We.tlsInitFunctions)We.tlsInitFunctions[N]()},loadWasmModuleToWorker:function(N,F){N.onmessage=G=>{var se=G.data,be=se.cmd;if(N.pthread&&(We.currentProxiedOperationCallerThread=N.pthread.threadInfoStruct),se.targetThread&&se.targetThread!=Uf()){var ke=We.pthreads[se.targetThread];ke?ke.worker.postMessage(se,se.transferList):te('Internal error! Worker sent a message "'+be+'" to target pthread '+se.targetThread+", but that thread no longer exists!"),We.currentProxiedOperationCallerThread=void 0;return}be==="processQueuedMainThreadWork"?kv():be==="spawnThread"?_f(se):be==="cleanupThread"?Nf(se.thread):be==="killThread"?V1(se.thread):be==="cancelThread"?U1(se.thread):be==="loaded"?(N.loaded=!0,F&&F(N),N.runPthread&&(N.runPthread(),delete N.runPthread)):be==="print"?J("Thread "+se.threadId+": "+se.text):be==="printErr"?te("Thread "+se.threadId+": "+se.text):be==="alert"?alert("Thread "+se.threadId+": "+se.text):se.target==="setimmediate"?N.postMessage(se):be==="onAbort"?d.onAbort&&d.onAbort(se.arg):te("worker sent an unknown command "+be),We.currentProxiedOperationCallerThread=void 0},N.onerror=G=>{var se="worker sent an error!";throw te(se+" "+G.filename+":"+G.lineno+": "+G.message),G},k&&(N.on("message",function(G){N.onmessage({data:G})}),N.on("error",function(G){N.onerror(G)}),N.on("detachedExit",function(){})),N.postMessage({cmd:"load",urlOrBlob:d.mainScriptUrlOrBlob||s,wasmMemory:Me,wasmModule:Tt})},allocateUnusedWorker:function(){var N=_("tfjs-backend-wasm-threaded-simd.worker.js");We.unusedWorkers.push(new Worker(N))},getNewWorker:function(){return We.unusedWorkers.length==0&&(We.allocateUnusedWorker(),We.loadWasmModuleToWorker(We.unusedWorkers[0])),We.unusedWorkers.pop()}};function H1(){var N=Uf(),F=u()[N+44>>2],G=u()[N+48>>2],se=F-G;Tv(F,se),Gf(F)}d.establishStackSpace=H1;function Rf(N){if(C)return Wi(1,0,N);try{Ef(N)}catch(F){G1(F)}}var Li=[];function Wu(N){var F=Li[N];return F||(N>=Li.length&&(Li.length=N+1),Li[N]=F=Ys.get(N)),F}function j1(N,F){return Wu(N)(F)}d.invokeEntryPoint=j1;function gv(){var N=new Error;if(!N.stack){try{throw new Error}catch(F){N=F}if(!N.stack)return"(no stack trace available)"}return N.stack.toString()}function q1(N,F,G){We.tlsInitFunctions.push(N)}function yv(N,F){Ys.set(N,F),Li[N]=F}var Bi;k?Bi=()=>{var N=process.hrtime();return N[0]*1e3+N[1]/1e6}:C?Bi=()=>performance.now()-d.__performance_now_clock_drift:Bi=()=>performance.now();var X1=!0;function K1(N){return u()[wv()>>2]=N,N}function Z1(N,F){var G;if(N===0)G=Date.now();else if((N===1||N===4)&&X1)G=Bi();else return K1(28),-1;return u()[F>>2]=G/1e3|0,u()[F+4>>2]=G%1e3*1e3*1e3|0,0}function Y1(N,F){return Z1(N,F)}function J1(N){Sv(N,!w,1,!b),We.threadInit()}function Q1(N){C?postMessage({cmd:"cleanupThread",thread:N}):Nf(N)}function _f(N){var F=We.getNewWorker();if(!F)return 6;We.runningWorkers.push(F);var G=We.pthreads[N.pthread_ptr]={worker:F,threadInfoStruct:N.pthread_ptr};F.pthread=G;var se={cmd:"run",start_routine:N.startRoutine,arg:N.arg,threadInfoStruct:N.pthread_ptr};return F.runPthread=()=>{se.time=performance.now(),F.postMessage(se,N.transferList)},F.loaded&&(F.runPthread(),delete F.runPthread),0}function eg(N,F,G,se){if(typeof SharedArrayBuffer=="undefined")return te("Current environment does not support SharedArrayBuffer, pthreads are not available!"),6;var be=[],ke=0;if(C&&(be.length===0||ke))return Iv(687865856,N,F,G,se);if(ke)return ke;var Ee={startRoutine:G,pthread_ptr:N,arg:se,transferList:be};return C?(Ee.cmd="spawnThread",postMessage(Ee,be),0):_f(Ee)}function tg(){return 2097152}function ng(N,F){if(N==F)postMessage({cmd:"processQueuedMainThreadWork"});else if(C)postMessage({targetThread:N,cmd:"processThreadQueue"});else{var G=We.pthreads[N],se=G&&G.worker;if(!se)return;se.postMessage({cmd:"processThreadQueue"})}return 1}function sg(){zu("")}function rg(){k||w||ae("Blocking on the main thread is very dangerous, see https://emscripten.org/docs/porting/pthreads.html#blocking-on-the-main-browser-thread")}function Df(){return 2147483648}function ag(N,F,G){o().copyWithin(N,F,F+G)}function og(){return k?eD().cpus().length:navigator.hardwareConcurrency}function Wi(N,F){var G=arguments.length-2,se=arguments;return Bu(function(){for(var be=G,ke=qu(be*8),Ee=ke>>3,Be=0;Be>3,be=0;be>>16),Tr(Me.buffer),1}catch(F){}}function ug(N){var F=o().length;if(N=N>>>0,N<=F)return!1;var G=Df();if(N>G)return!1;for(var se=1;se<=4;se*=2){var be=F*(1+.2/se);be=Math.min(be,N+100663296);var ke=Math.min(G,Ou(Math.max(N,be),65536)),Ee=lg(ke);if(Ee)return!0}return!1}var st={inEventHandler:0,removeAllEventListeners:function(){for(var N=st.eventHandlers.length-1;N>=0;--N)st._removeHandler(N);st.eventHandlers=[],st.deferredCalls=[]},registerRemoveEventListeners:function(){st.removeEventListenersRegistered||(F1.push(st.removeAllEventListeners),st.removeEventListenersRegistered=!0)},deferredCalls:[],deferCall:function(N,F,G){function se(Ee,Be){if(Ee.length!=Be.length)return!1;for(var Wt in Ee)if(Ee[Wt]!=Be[Wt])return!1;return!0}for(var be in st.deferredCalls){var ke=st.deferredCalls[be];if(ke.targetFunction==N&&se(ke.argsList,G))return}st.deferredCalls.push({targetFunction:N,precedence:F,argsList:G}),st.deferredCalls.sort(function(Ee,Be){return Ee.precedence>2]=G,u()[ke+4>>2]=se,u()[ke+8>>2]=be,p3(N,637534208,F,se,ke)})},getTargetThreadForEventCallback:function(N){switch(N){case 1:return 0;case 2:return We.currentProxiedOperationCallerThread;default:return N}},getNodeNameForTarget:function(N){return N?N==window?"#window":N==screen?"#screen":N&&N.nodeName?N.nodeName:"":""},fullscreenEnabled:function(){return document.fullscreenEnabled||document.webkitFullscreenEnabled}};function cg(N){var F=Fu(N)+1,G=d3(F);return ya(N,G,F),G}function dg(N,F,G,se){Bu(function(){var be=qu(12),ke=0;F&&(ke=cg(F)),u()[be>>2]=ke,u()[be+4>>2]=G,u()[be+8>>2]=se,p3(N,657457152,0,ke,be)})}function pg(N,F,G,se){F=F?ts(F):"",dg(N,F,G,se)}function hg(N){return N>2?ts(N):N}var fg=[0,typeof document!="undefined"?document:0,typeof window!="undefined"?window:0];function mg(N){N=hg(N);var F=fg[N]||(typeof document!="undefined"?document.querySelector(N):void 0);return F}function Yd(N){return mg(N)}function $f(N,F,G){var se=Yd(N);if(!se)return-4;if(se.canvasSharedPtr&&(u()[se.canvasSharedPtr>>2]=F,u()[se.canvasSharedPtr+4>>2]=G),se.offscreenCanvas||!se.controlTransferredOffscreen){se.offscreenCanvas&&(se=se.offscreenCanvas);var be=!1;if(se.GLctxObject&&se.GLctxObject.GLctx){var ke=se.GLctxObject.GLctx.getParameter(2978);be=ke[0]===0&&ke[1]===0&&ke[2]===se.width&&ke[3]===se.height}se.width=F,se.height=G,be&&se.GLctxObject.GLctx.viewport(0,0,F,G)}else if(se.canvasSharedPtr){var Ee=u()[se.canvasSharedPtr+8>>2];return pg(Ee,N,F,G),1}else return-4;return 0}function Pf(N,F,G){return C?Wi(2,1,N,F,G):$f(N,F,G)}function gg(N,F,G){var se=Yd(N);return se?$f(N,F,G):Pf(N,F,G)}function yg(){throw"unwind"}function Ag(N){var F=N.getExtension("ANGLE_instanced_arrays");if(F)return N.vertexAttribDivisor=function(G,se){F.vertexAttribDivisorANGLE(G,se)},N.drawArraysInstanced=function(G,se,be,ke){F.drawArraysInstancedANGLE(G,se,be,ke)},N.drawElementsInstanced=function(G,se,be,ke,Ee){F.drawElementsInstancedANGLE(G,se,be,ke,Ee)},1}function xg(N){var F=N.getExtension("OES_vertex_array_object");if(F)return N.createVertexArray=function(){return F.createVertexArrayOES()},N.deleteVertexArray=function(G){F.deleteVertexArrayOES(G)},N.bindVertexArray=function(G){F.bindVertexArrayOES(G)},N.isVertexArray=function(G){return F.isVertexArrayOES(G)},1}function bg(N){var F=N.getExtension("WEBGL_draw_buffers");if(F)return N.drawBuffers=function(G,se){F.drawBuffersWEBGL(G,se)},1}function vg(N){return!!(N.multiDrawWebgl=N.getExtension("WEBGL_multi_draw"))}var Bt={counter:1,buffers:[],programs:[],framebuffers:[],renderbuffers:[],textures:[],shaders:[],vaos:[],contexts:{},offscreenCanvases:{},queries:[],stringCache:{},unpackAlignment:4,recordError:function(F){Bt.lastError||(Bt.lastError=F)},getNewId:function(N){for(var F=Bt.counter++,G=N.length;G>2]:-1;be+=ts(u()[G+ke*4>>2],Ee<0?void 0:Ee)}return be},createContext:function(N,F){N.getContextSafariWebGL2Fixed||(N.getContextSafariWebGL2Fixed=N.getContext,N.getContext=function(be,ke){var Ee=N.getContextSafariWebGL2Fixed(be,ke);return be=="webgl"==Ee instanceof WebGLRenderingContext?Ee:null});var G=N.getContext("webgl",F);if(!G)return 0;var se=Bt.registerContext(G,F);return se},registerContext:function(N,F){var G=d3(8);u()[G+4>>2]=Uf();var se={handle:G,attributes:F,version:F.majorVersion,GLctx:N};return N.canvas&&(N.canvas.GLctxObject=se),Bt.contexts[G]=se,(typeof F.enableExtensionsByDefault=="undefined"||F.enableExtensionsByDefault)&&Bt.initExtensions(se),G},makeContextCurrent:function(N){return Bt.currentContext=Bt.contexts[N],d.ctx=zf=Bt.currentContext&&Bt.currentContext.GLctx,!(N&&!zf)},getContext:function(N){return Bt.contexts[N]},deleteContext:function(N){Bt.currentContext===Bt.contexts[N]&&(Bt.currentContext=null),typeof st=="object"&&st.removeAllHandlersOnTarget(Bt.contexts[N].GLctx.canvas),Bt.contexts[N]&&Bt.contexts[N].GLctx.canvas&&(Bt.contexts[N].GLctx.canvas.GLctxObject=void 0),vv(Bt.contexts[N].handle),Bt.contexts[N]=null},initExtensions:function(N){if(N||(N=Bt.currentContext),!N.initExtensionsDone){N.initExtensionsDone=!0;var F=N.GLctx;Ag(F),xg(F),bg(F),F.disjointTimerQueryExt=F.getExtension("EXT_disjoint_timer_query"),vg(F);var G=F.getSupportedExtensions()||[];G.forEach(function(se){!se.includes("lose_context")&&!se.includes("debug")&&F.getExtension(se)})}}},wg=["default","low-power","high-performance"];function kg(N,F){var G=F>>2,se=u()[G+6],be={alpha:!!u()[G+0],depth:!!u()[G+1],stencil:!!u()[G+2],antialias:!!u()[G+3],premultipliedAlpha:!!u()[G+4],preserveDrawingBuffer:!!u()[G+5],powerPreference:wg[se],failIfMajorPerformanceCaveat:!!u()[G+7],majorVersion:u()[G+8],minorVersion:u()[G+9],enableExtensionsByDefault:u()[G+10],explicitSwapControl:u()[G+11],proxyContextToMainThread:u()[G+12],renderViaOffscreenBackBuffer:u()[G+13]},ke=Yd(N);if(!ke||be.explicitSwapControl)return 0;var Ee=Bt.createContext(ke,be);return Ee}function Sg(N,F){return kg(N,F)}var Vu={mappings:{},buffers:[null,[],[]],printChar:function(N,F){var G=Vu.buffers[N];F===0||F===10?((N===1?J:te)(Zs(G,0)),G.length=0):G.push(F)},varargs:void 0,get:function(){Vu.varargs+=4;var N=u()[Vu.varargs-4>>2];return N},getStr:function(N){var F=ts(N);return F},get64:function(N,F){return N}};function Ff(N){return C?Wi(3,1,N):0}function Of(N,F,G,se,be){if(C)return Wi(4,1,N,F,G,se,be)}function Mf(N,F,G,se){if(C)return Wi(5,1,N,F,G,se);for(var be=0,ke=0;ke>2],Be=u()[F+4>>2];F+=8;for(var Wt=0;Wt>2]=be,0}function Ig(N){Ge(N)}We.init();var zf,Cg=[null,Rf,Pf,Ff,Of,Mf],Av=!1,Lf={__clock_gettime:Y1,__emscripten_init_main_thread_js:J1,__emscripten_thread_cleanup:Q1,__pthread_create_js:eg,_emscripten_default_pthread_stack_size:tg,_emscripten_notify_thread_queue:ng,abort:sg,emscripten_check_blocking_allowed:rg,emscripten_get_heap_max:Df,emscripten_get_now:Bi,emscripten_memcpy_big:ag,emscripten_num_logical_cores:og,emscripten_receive_on_main_thread_js:ig,emscripten_resize_heap:ug,emscripten_set_canvas_element_size:gg,emscripten_unwind_to_js_event_loop:yg,emscripten_webgl_create_context:Sg,exit:Ef,fd_close:Ff,fd_seek:Of,fd_write:Mf,memory:Me||d.wasmMemory,setTempRet0:Ig},xv=B1(),Tg=d.___wasm_call_ctors=function(){return(Tg=d.___wasm_call_ctors=d.asm.__wasm_call_ctors).apply(null,arguments)},Ng=d._init=function(){return(Ng=d._init=d.asm.init).apply(null,arguments)},Eg=d._init_with_threads_count=function(){return(Eg=d._init_with_threads_count=d.asm.init_with_threads_count).apply(null,arguments)},Rg=d._get_threads_count=function(){return(Rg=d._get_threads_count=d.asm.get_threads_count).apply(null,arguments)},_g=d._register_tensor=function(){return(_g=d._register_tensor=d.asm.register_tensor).apply(null,arguments)},Dg=d._dispose_data=function(){return(Dg=d._dispose_data=d.asm.dispose_data).apply(null,arguments)},$g=d._dispose=function(){return($g=d._dispose=d.asm.dispose).apply(null,arguments)},Pg=d._Abs=function(){return(Pg=d._Abs=d.asm.Abs).apply(null,arguments)},Fg=d._Add=function(){return(Fg=d._Add=d.asm.Add).apply(null,arguments)},Og=d._AddN=function(){return(Og=d._AddN=d.asm.AddN).apply(null,arguments)},Mg=d._All=function(){return(Mg=d._All=d.asm.All).apply(null,arguments)},zg=d._Any=function(){return(zg=d._Any=d.asm.Any).apply(null,arguments)},Lg=d._ArgMax=function(){return(Lg=d._ArgMax=d.asm.ArgMax).apply(null,arguments)},Bg=d._AvgPool=function(){return(Bg=d._AvgPool=d.asm.AvgPool).apply(null,arguments)},Wg=d._BatchMatMul=function(){return(Wg=d._BatchMatMul=d.asm.BatchMatMul).apply(null,arguments)},Vg=d._Ceil=function(){return(Vg=d._Ceil=d.asm.Ceil).apply(null,arguments)},Ug=d._ClipByValue=function(){return(Ug=d._ClipByValue=d.asm.ClipByValue).apply(null,arguments)},Gg=d._Conv2D=function(){return(Gg=d._Conv2D=d.asm.Conv2D).apply(null,arguments)},Hg=d._Conv2DBackpropInput=function(){return(Hg=d._Conv2DBackpropInput=d.asm.Conv2DBackpropInput).apply(null,arguments)},jg=d._Cos=function(){return(jg=d._Cos=d.asm.Cos).apply(null,arguments)},qg=d._Cosh=function(){return(qg=d._Cosh=d.asm.Cosh).apply(null,arguments)},Xg=d._CropAndResize=function(){return(Xg=d._CropAndResize=d.asm.CropAndResize).apply(null,arguments)},Kg=d._Cumprod=function(){return(Kg=d._Cumprod=d.asm.Cumprod).apply(null,arguments)},Zg=d._Cumsum=function(){return(Zg=d._Cumsum=d.asm.Cumsum).apply(null,arguments)},Yg=d._DepthToSpace=function(){return(Yg=d._DepthToSpace=d.asm.DepthToSpace).apply(null,arguments)},Jg=d._DepthwiseConv2dNative=function(){return(Jg=d._DepthwiseConv2dNative=d.asm.DepthwiseConv2dNative).apply(null,arguments)},Qg=d._Elu=function(){return(Qg=d._Elu=d.asm.Elu).apply(null,arguments)},e3=d._Equal=function(){return(e3=d._Equal=d.asm.Equal).apply(null,arguments)},t3=d._Exp=function(){return(t3=d._Exp=d.asm.Exp).apply(null,arguments)},n3=d._FlipLeftRight=function(){return(n3=d._FlipLeftRight=d.asm.FlipLeftRight).apply(null,arguments)},s3=d._Floor=function(){return(s3=d._Floor=d.asm.Floor).apply(null,arguments)},r3=d._FloorDiv=function(){return(r3=d._FloorDiv=d.asm.FloorDiv).apply(null,arguments)},a3=d._FusedBatchNorm=function(){return(a3=d._FusedBatchNorm=d.asm.FusedBatchNorm).apply(null,arguments)},o3=d._FusedConv2D=function(){return(o3=d._FusedConv2D=d.asm.FusedConv2D).apply(null,arguments)},Bf=d._FusedDepthwiseConv2D=function(){return(Bf=d._FusedDepthwiseConv2D=d.asm.FusedDepthwiseConv2D).apply(null,arguments)},Wf=d._Gather=function(){return(Wf=d._Gather=d.asm.Gather).apply(null,arguments)},Jd=d._GatherNd=function(){return(Jd=d._GatherNd=d.asm.GatherNd).apply(null,arguments)},i3=d._Greater=function(){return(i3=d._Greater=d.asm.Greater).apply(null,arguments)},l3=d._GreaterEqual=function(){return(l3=d._GreaterEqual=d.asm.GreaterEqual).apply(null,arguments)},Uu=d._LeakyRelu=function(){return(Uu=d._LeakyRelu=d.asm.LeakyRelu).apply(null,arguments)},Qd=d._Less=function(){return(Qd=d._Less=d.asm.Less).apply(null,arguments)},ep=d._LessEqual=function(){return(ep=d._LessEqual=d.asm.LessEqual).apply(null,arguments)},bv=d._Log=function(){return(bv=d._Log=d.asm.Log).apply(null,arguments)},Gu=d._LogicalAnd=function(){return(Gu=d._LogicalAnd=d.asm.LogicalAnd).apply(null,arguments)},Hu=d._LogicalNot=function(){return(Hu=d._LogicalNot=d.asm.LogicalNot).apply(null,arguments)},u3=d._LogicalOr=function(){return(u3=d._LogicalOr=d.asm.LogicalOr).apply(null,arguments)},X=d._LogicalXor=function(){return(X=d._LogicalXor=d.asm.LogicalXor).apply(null,arguments)},re=d._Max=function(){return(re=d._Max=d.asm.Max).apply(null,arguments)},ve=d._MaxPool=function(){return(ve=d._MaxPool=d.asm.MaxPool).apply(null,arguments)},$e=d._Maximum=function(){return($e=d._Maximum=d.asm.Maximum).apply(null,arguments)},mt=d._Mean=function(){return(mt=d._Mean=d.asm.Mean).apply(null,arguments)},yt=d._Min=function(){return(yt=d._Min=d.asm.Min).apply(null,arguments)},ot=d._Minimum=function(){return(ot=d._Minimum=d.asm.Minimum).apply(null,arguments)},tt=d._MirrorPad=function(){return(tt=d._MirrorPad=d.asm.MirrorPad).apply(null,arguments)},rn=d._Multiply=function(){return(rn=d._Multiply=d.asm.Multiply).apply(null,arguments)},Er=d._Neg=function(){return(Er=d._Neg=d.asm.Neg).apply(null,arguments)},Rr=d._NonMaxSuppressionV3=function(){return(Rr=d._NonMaxSuppressionV3=d.asm.NonMaxSuppressionV3).apply(null,arguments)},ju=d._NonMaxSuppressionV4=function(){return(ju=d._NonMaxSuppressionV4=d.asm.NonMaxSuppressionV4).apply(null,arguments)},Vi=d._NonMaxSuppressionV5=function(){return(Vi=d._NonMaxSuppressionV5=d.asm.NonMaxSuppressionV5).apply(null,arguments)},c3=d._NotEqual=function(){return(c3=d._NotEqual=d.asm.NotEqual).apply(null,arguments)},as=d._OneHot=function(){return(as=d._OneHot=d.asm.OneHot).apply(null,arguments)},qa=d._PadV2=function(){return(qa=d._PadV2=d.asm.PadV2).apply(null,arguments)},Vf=d._Pow=function(){return(Vf=d._Pow=d.asm.Pow).apply(null,arguments)},zR=d._Prelu=function(){return(zR=d._Prelu=d.asm.Prelu).apply(null,arguments)},LR=d._Prod=function(){return(LR=d._Prod=d.asm.Prod).apply(null,arguments)},BR=d._RealDiv=function(){return(BR=d._RealDiv=d.asm.RealDiv).apply(null,arguments)},WR=d._Relu=function(){return(WR=d._Relu=d.asm.Relu).apply(null,arguments)},VR=d._Relu6=function(){return(VR=d._Relu6=d.asm.Relu6).apply(null,arguments)},UR=d._ResizeBilinear=function(){return(UR=d._ResizeBilinear=d.asm.ResizeBilinear).apply(null,arguments)},GR=d._ResizeNearestNeighbor=function(){return(GR=d._ResizeNearestNeighbor=d.asm.ResizeNearestNeighbor).apply(null,arguments)},HR=d._Reverse=function(){return(HR=d._Reverse=d.asm.Reverse).apply(null,arguments)},jR=d._RotateWithOffset=function(){return(jR=d._RotateWithOffset=d.asm.RotateWithOffset).apply(null,arguments)},qR=d._Round=function(){return(qR=d._Round=d.asm.Round).apply(null,arguments)},XR=d._Rsqrt=function(){return(XR=d._Rsqrt=d.asm.Rsqrt).apply(null,arguments)},KR=d._ScatterNd=function(){return(KR=d._ScatterNd=d.asm.ScatterNd).apply(null,arguments)},ZR=d._SelectV2=function(){return(ZR=d._SelectV2=d.asm.SelectV2).apply(null,arguments)},YR=d._Sigmoid=function(){return(YR=d._Sigmoid=d.asm.Sigmoid).apply(null,arguments)},JR=d._Sin=function(){return(JR=d._Sin=d.asm.Sin).apply(null,arguments)},QR=d._Softmax=function(){return(QR=d._Softmax=d.asm.Softmax).apply(null,arguments)},e_=d._SparseFillEmptyRows=function(){return(e_=d._SparseFillEmptyRows=d.asm.SparseFillEmptyRows).apply(null,arguments)},t_=d._SparseReshape=function(){return(t_=d._SparseReshape=d.asm.SparseReshape).apply(null,arguments)},n_=d._SparseSegmentReduction=function(){return(n_=d._SparseSegmentReduction=d.asm.SparseSegmentReduction).apply(null,arguments)},s_=d._Sqrt=function(){return(s_=d._Sqrt=d.asm.Sqrt).apply(null,arguments)},r_=d._Square=function(){return(r_=d._Square=d.asm.Square).apply(null,arguments)},a_=d._SquaredDifference=function(){return(a_=d._SquaredDifference=d.asm.SquaredDifference).apply(null,arguments)},o_=d._Step=function(){return(o_=d._Step=d.asm.Step).apply(null,arguments)},i_=d._StridedSlice=function(){return(i_=d._StridedSlice=d.asm.StridedSlice).apply(null,arguments)},l_=d._Sub=function(){return(l_=d._Sub=d.asm.Sub).apply(null,arguments)},u_=d._Sum=function(){return(u_=d._Sum=d.asm.Sum).apply(null,arguments)},c_=d._Tan=function(){return(c_=d._Tan=d.asm.Tan).apply(null,arguments)},d_=d._Tanh=function(){return(d_=d._Tanh=d.asm.Tanh).apply(null,arguments)},p_=d._Tile=function(){return(p_=d._Tile=d.asm.Tile).apply(null,arguments)},h_=d._TopK=function(){return(h_=d._TopK=d.asm.TopK).apply(null,arguments)},f_=d._Transform=function(){return(f_=d._Transform=d.asm.Transform).apply(null,arguments)},m_=d._Transpose=function(){return(m_=d._Transpose=d.asm.Transpose).apply(null,arguments)},g_=d.__FusedMatMul=function(){return(g_=d.__FusedMatMul=d.asm._FusedMatMul).apply(null,arguments)},d3=d._malloc=function(){return(d3=d._malloc=d.asm.malloc).apply(null,arguments)},vv=d._free=function(){return(vv=d._free=d.asm.free).apply(null,arguments)},y_=d._emscripten_tls_init=function(){return(y_=d._emscripten_tls_init=d.asm.emscripten_tls_init).apply(null,arguments)},wv=d.___errno_location=function(){return(wv=d.___errno_location=d.asm.__errno_location).apply(null,arguments)},Uf=d._pthread_self=function(){return(Uf=d._pthread_self=d.asm.pthread_self).apply(null,arguments)},kv=d._emscripten_main_thread_process_queued_calls=function(){return(kv=d._emscripten_main_thread_process_queued_calls=d.asm.emscripten_main_thread_process_queued_calls).apply(null,arguments)},A_=d.__emscripten_thread_crashed=function(){return(A_=d.__emscripten_thread_crashed=d.asm._emscripten_thread_crashed).apply(null,arguments)},Sv=d.__emscripten_thread_init=function(){return(Sv=d.__emscripten_thread_init=d.asm._emscripten_thread_init).apply(null,arguments)},x_=d._emscripten_current_thread_process_queued_calls=function(){return(x_=d._emscripten_current_thread_process_queued_calls=d.asm.emscripten_current_thread_process_queued_calls).apply(null,arguments)},b_=d._emscripten_main_browser_thread_id=function(){return(b_=d._emscripten_main_browser_thread_id=d.asm.emscripten_main_browser_thread_id).apply(null,arguments)},v_=d._emscripten_sync_run_in_main_thread_2=function(){return(v_=d._emscripten_sync_run_in_main_thread_2=d.asm.emscripten_sync_run_in_main_thread_2).apply(null,arguments)},Iv=d._emscripten_sync_run_in_main_thread_4=function(){return(Iv=d._emscripten_sync_run_in_main_thread_4=d.asm.emscripten_sync_run_in_main_thread_4).apply(null,arguments)},Cv=d._emscripten_run_in_main_runtime_thread_js=function(){return(Cv=d._emscripten_run_in_main_runtime_thread_js=d.asm.emscripten_run_in_main_runtime_thread_js).apply(null,arguments)},p3=d._emscripten_dispatch_to_thread_=function(){return(p3=d._emscripten_dispatch_to_thread_=d.asm.emscripten_dispatch_to_thread_).apply(null,arguments)},h3=d.__emscripten_thread_free_data=function(){return(h3=d.__emscripten_thread_free_data=d.asm._emscripten_thread_free_data).apply(null,arguments)},w_=d.__emscripten_thread_exit=function(){return(w_=d.__emscripten_thread_exit=d.asm._emscripten_thread_exit).apply(null,arguments)},k_=d._memalign=function(){return(k_=d._memalign=d.asm.memalign).apply(null,arguments)},Tv=d._emscripten_stack_set_limits=function(){return(Tv=d._emscripten_stack_set_limits=d.asm.emscripten_stack_set_limits).apply(null,arguments)},f3=d.stackSave=function(){return(f3=d.stackSave=d.asm.stackSave).apply(null,arguments)},Gf=d.stackRestore=function(){return(Gf=d.stackRestore=d.asm.stackRestore).apply(null,arguments)},qu=d.stackAlloc=function(){return(qu=d.stackAlloc=d.asm.stackAlloc).apply(null,arguments)},S_=d.dynCall_iijjiiii=function(){return(S_=d.dynCall_iijjiiii=d.asm.dynCall_iijjiiii).apply(null,arguments)},I_=d.dynCall_jiji=function(){return(I_=d.dynCall_jiji=d.asm.dynCall_jiji).apply(null,arguments)},Nv=d.__emscripten_allow_main_runtime_queued_calls=21672;d.cwrap=es,d.keepRuntimeAlive=zi,d.PThread=We,d.PThread=We,d.wasmMemory=Me,d.ExitStatus=tp;var Hf;function tp(N){this.name="ExitStatus",this.message="Program terminated with exit("+N+")",this.status=N}Nr=function N(){Hf||m3(),Hf||(Nr=N)};function m3(N){if(N=N||y,ja>0)return;if(C){h(d),jd(),postMessage({cmd:"loaded"});return}if(ss(),ja>0)return;function F(){Hf||(Hf=!0,d.calledRun=!0,!It&&(jd(),h(d),d.onRuntimeInitialized&&d.onRuntimeInitialized(),z1()))}d.setStatus?(d.setStatus("Running..."),setTimeout(function(){setTimeout(function(){d.setStatus("")},1),F()},1)):F()}d.run=m3;function C_(N,F){if(Qn=N,!F&&C)throw Rf(N),"unwind";zi()||M1(),T_(N)}function T_(N){Qn=N,zi()||(We.terminateAllThreads(),d.onExit&&d.onExit(N),It=!0),A(N,new tp(N))}if(d.preInit)for(typeof d.preInit=="function"&&(d.preInit=[d.preInit]);d.preInit.length>0;)d.preInit.pop()();m3();var jf;m&&(jf={uncaughtException:process.listeners("uncaughtException").filter(function(N){return!m.uncaughtException.indexOf(N)>-1}),unhandledRejection:process.listeners("unhandledRejection").filter(function(N){return!m.unhandledRejection.indexOf(N)>-1})});var qf;if(typeof WasmBackendModule!="undefined")qf=WasmBackendModule;else if(typeof r!="undefined")qf=r;else throw new Error("Could not find wasm module in post.js");if(jf){var N_=qf._dispose;qf._dispose=function(){N_(),jf.uncaughtException.forEach(function(N){process.removeListener("uncaughtException",N)}),jf.unhandledRejection.forEach(function(N){process.removeListener("unhandledRejection",N)})}}return r.ready}})();typeof e=="object"&&typeof t=="object"?t.exports=n:typeof define=="function"&&define.amd?define([],function(){return n}):typeof e=="object"&&(e.WasmBackendModuleThreadedSimd=n)}}),nD=cn({"node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm-threaded-simd.worker.js"(e,t){t.exports.wasmWorkerContents=`"use strict";var Module={};var ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof process.versions==="object"&&typeof process.versions.node==="string";if(ENVIRONMENT_IS_NODE){var nodeWorkerThreads=require("worker_threads");var parentPort=nodeWorkerThreads.parentPort;parentPort.on("message",function(data){onmessage({data:data})});var fs=require("fs");Object.assign(global,{self:global,require:require,Module:Module,location:{href:__filename},Worker:nodeWorkerThreads.Worker,importScripts:function(f){(0,eval)(fs.readFileSync(f,"utf8"))},postMessage:function(msg){parentPort.postMessage(msg)},performance:global.performance||{now:function(){return Date.now()}}})}function threadPrintErr(){var text=Array.prototype.slice.call(arguments).join(" ");if(ENVIRONMENT_IS_NODE){fs.writeSync(2,text+" -");return}console.error(text)}function threadAlert(){var text=Array.prototype.slice.call(arguments).join(" ");postMessage({cmd:"alert",text:text,threadId:Module["_pthread_self"]()})}var err=threadPrintErr;self.alert=threadAlert;Module["instantiateWasm"]=((info,receiveInstance)=>{var instance=new WebAssembly.Instance(Module["wasmModule"],info);receiveInstance(instance);Module["wasmModule"]=null;return instance.exports});self.onmessage=(e=>{try{if(e.data.cmd==="load"){Module["wasmModule"]=e.data.wasmModule;Module["wasmMemory"]=e.data.wasmMemory;Module["buffer"]=Module["wasmMemory"].buffer;Module["ENVIRONMENT_IS_PTHREAD"]=true;if(typeof e.data.urlOrBlob==="string"){importScripts(e.data.urlOrBlob)}else{var objectUrl=URL.createObjectURL(e.data.urlOrBlob);importScripts(objectUrl);URL.revokeObjectURL(objectUrl)}WasmBackendModuleThreadedSimd(Module).then(function(instance){Module=instance})}else if(e.data.cmd==="run"){Module["__performance_now_clock_drift"]=performance.now()-e.data.time;Module["__emscripten_thread_init"](e.data.threadInfoStruct,0,0,1);Module["establishStackSpace"]();Module["PThread"].receiveObjectTransfer(e.data);Module["PThread"].threadInit();try{var result=Module["invokeEntryPoint"](e.data.start_routine,e.data.arg);if(Module["keepRuntimeAlive"]()){Module["PThread"].setExitStatus(result)}else{Module["__emscripten_thread_exit"](result)}}catch(ex){if(ex!="unwind"){if(ex instanceof Module["ExitStatus"]){if(Module["keepRuntimeAlive"]()){}else{Module["__emscripten_thread_exit"](ex.status)}}else{throw ex}}}}else if(e.data.cmd==="cancel"){if(Module["_pthread_self"]()){Module["__emscripten_thread_exit"](-1)}}else if(e.data.target==="setimmediate"){}else if(e.data.cmd==="processThreadQueue"){if(Module["_pthread_self"]()){Module["_emscripten_current_thread_process_queued_calls"]()}}else if(e.data.cmd==="processProxyingQueue"){if(Module["_pthread_self"]()){Module["_emscripten_proxy_execute_queue"](e.data.queue)}}else{err("worker.js received unknown command "+e.data.cmd);err(e.data)}}catch(ex){err("worker.js onmessage() captured an uncaught exception: "+ex);if(ex&&ex.stack)err(ex.stack);if(Module["__emscripten_thread_crashed"]){Module["__emscripten_thread_crashed"]()}throw ex}});`}}),sD=cn({"node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm.js"(e,t){var n=(()=>{var s=typeof document!="undefined"&&document.currentScript?document.currentScript.src:void 0;return typeof __filename!="undefined"&&(s=s||__filename),function(r){r=r||{};var a=typeof r!="undefined"?r:{},o,i;a.ready=new Promise(function(X,re){o=X,i=re});var l;typeof process!="undefined"&&process.listeners&&(l={uncaughtException:process.listeners("uncaughtException"),unhandledRejection:process.listeners("unhandledRejection")});var u=Object.assign({},a),c=[],p="./this.program",d=(X,re)=>{throw re},h=typeof window=="object",f=typeof importScripts=="function",m=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",g="";function y(X){return a.locateFile?a.locateFile(X,g):g+X}var x,A,b,w;function k(X){if(X instanceof Qd)return;R("exiting due to exception: "+X)}var C,E,_;m?(f?g=vm().dirname(g)+"/":g=__dirname+"/",_=()=>{E||(C=My(),E=vm())},x=function(re,ve){return _(),re=E.normalize(re),C.readFileSync(re,ve?void 0:"utf8")},b=X=>{var re=x(X,!0);return re.buffer||(re=new Uint8Array(re)),re},A=(X,re,ve)=>{_(),X=E.normalize(X),C.readFile(X,function($e,mt){$e?ve($e):re(mt.buffer)})},process.argv.length>1&&(p=process.argv[1].replace(/\\/g,"/")),c=process.argv.slice(2),process.on("uncaughtException",function(X){if(!(X instanceof Qd))throw X}),process.on("unhandledRejection",function(X){throw X}),d=(X,re)=>{if(Hd())throw process.exitCode=X,re;k(re),process.exit(X)},a.inspect=function(){return"[Emscripten Module object]"}):(h||f)&&(f?g=self.location.href:typeof document!="undefined"&&document.currentScript&&(g=document.currentScript.src),s&&(g=s),g.indexOf("blob:")!==0?g=g.substr(0,g.replace(/[?#].*/,"").lastIndexOf("/")+1):g="",x=X=>{var re=new XMLHttpRequest;return re.open("GET",X,!1),re.send(null),re.responseText},f&&(b=X=>{var re=new XMLHttpRequest;return re.open("GET",X,!1),re.responseType="arraybuffer",re.send(null),new Uint8Array(re.response)}),A=(X,re,ve)=>{var $e=new XMLHttpRequest;$e.open("GET",X,!0),$e.responseType="arraybuffer",$e.onload=()=>{if($e.status==200||$e.status==0&&$e.response){re($e.response);return}ve()},$e.onerror=ve,$e.send(null)},w=X=>document.title=X);var $=a.print||console.log.bind(console),R=a.printErr||console.warn.bind(console);Object.assign(a,u),u=null,a.arguments&&(c=a.arguments),a.thisProgram&&(p=a.thisProgram),a.quit&&(d=a.quit);var P=4;function S(X){S.shown||(S.shown={}),S.shown[X]||(S.shown[X]=1,R(X))}function M(X,re){if(typeof WebAssembly.Function=="function"){for(var ve={i:"i32",j:"i64",f:"f32",d:"f64"},$e={parameters:[],results:re[0]=="v"?[]:[ve[re[0]]]},mt=1;mt{Z=X},te;a.wasmBinary&&(te=a.wasmBinary);var le=a.noExitRuntime||!0;typeof WebAssembly!="object"&&Mi("no native wasm support detected");var ae,pe=!1,ce;function xe(X,re){X||Mi(re)}function ie(X){var re=a["_"+X];return re}function _e(X,re,ve,$e,mt){var yt={string:function(as){var qa=0;if(as!=null&&as!==0){var Vf=(as.length<<2)+1;qa=Jd(Vf),xt(as,qa,Vf)}return qa},array:function(as){var qa=Jd(as.length);return It(as,qa),qa}};function ot(as){return re==="string"?At(as):re==="boolean"?Boolean(as):as}var tt=ie(X),rn=[],Er=0;if($e)for(var Rr=0;Rr<$e.length;Rr++){var ju=yt[ve[Rr]];ju?(Er===0&&(Er=Bf()),rn[Rr]=ju($e[Rr])):rn[Rr]=$e[Rr]}var Vi=tt.apply(null,rn);function c3(as){return Er!==0&&Wf(Er),ot(as)}return Vi=c3(Vi),Vi}function De(X,re,ve,$e){ve=ve||[];var mt=ve.every(function(ot){return ot==="number"}),yt=re!=="string";return yt&&mt&&!$e?ie(X):function(){return _e(X,re,ve,arguments,$e)}}var Ge=1,ze=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0;function ut(X,re,ve){for(var $e=re+ve,mt=re;X[mt]&&!(mt>=$e);)++mt;if(mt-re>16&&X.subarray&&ze)return ze.decode(X.subarray(re,mt));for(var yt="";re>10,56320|Er&1023)}}return yt}function At(X,re){return X?ut(es,X,re):""}function ft(X,re,ve,$e){if(!($e>0))return 0;for(var mt=ve,yt=ve+$e-1,ot=0;ot=55296&&tt<=57343){var rn=X.charCodeAt(++ot);tt=65536+((tt&1023)<<10)|rn&1023}if(tt<=127){if(ve>=yt)break;re[ve++]=tt}else if(tt<=2047){if(ve+1>=yt)break;re[ve++]=192|tt>>6,re[ve++]=128|tt&63}else if(tt<=65535){if(ve+2>=yt)break;re[ve++]=224|tt>>12,re[ve++]=128|tt>>6&63,re[ve++]=128|tt&63}else{if(ve+3>=yt)break;re[ve++]=240|tt>>18,re[ve++]=128|tt>>12&63,re[ve++]=128|tt>>6&63,re[ve++]=128|tt&63}}return re[ve]=0,ve-mt}function xt(X,re,ve){return ft(X,es,re,ve)}function Me(X){for(var re=0,ve=0;ve=55296&&$e<=57343&&($e=65536+(($e&1023)<<10)|X.charCodeAt(++ve)&1023),$e<=127?++re:$e<=2047?re+=2:$e<=65535?re+=3:re+=4}return re}var Tt=typeof TextDecoder!="undefined"?new TextDecoder("utf-16le"):void 0;function It(X,re){gn.set(X,re)}function Qn(X,re,ve){for(var $e=0;$e>0]=X.charCodeAt($e);ve||(gn[re>>0]=0)}function sn(X,re){return X%re>0&&(X+=re-X%re),X}var Ns,gn,es,Es,Rs,Vn,Zs,ts,ga;function ya(X){Ns=X,a.HEAP8=gn=new Int8Array(X),a.HEAP16=Es=new Int16Array(X),a.HEAP32=Vn=new Int32Array(X),a.HEAPU8=es=new Uint8Array(X),a.HEAPU16=Rs=new Uint16Array(X),a.HEAPU32=Zs=new Uint32Array(X),a.HEAPF32=ts=new Float32Array(X),a.HEAPF64=ga=new Float64Array(X)}var Fu=a.INITIAL_MEMORY||16777216,Ga,Aa=[],Gd=[],Ou=[],ns=!1,mf=!1,gf=0;function Hd(){return le||gf>0}function yf(){if(a.preRun)for(typeof a.preRun=="function"&&(a.preRun=[a.preRun]);a.preRun.length;)bf(a.preRun.shift());qd(Aa)}function Af(){ns=!0,qd(Gd)}function uv(){mf=!0}function xf(){if(a.postRun)for(typeof a.postRun=="function"&&(a.postRun=[a.postRun]);a.postRun.length;)vf(a.postRun.shift());qd(Ou)}function bf(X){Aa.unshift(X)}function Tr(X){Gd.unshift(X)}function vf(X){Ou.unshift(X)}var Ys=0,Mu=null,Ha=null;function F1(X){Ys++,a.monitorRunDependencies&&a.monitorRunDependencies(Ys)}function wf(X){if(Ys--,a.monitorRunDependencies&&a.monitorRunDependencies(Ys),Ys==0&&(Mu!==null&&(clearInterval(Mu),Mu=null),Ha)){var re=Ha;Ha=null,re()}}a.preloadedImages={},a.preloadedAudios={};function Mi(X){a.onAbort&&a.onAbort(X),X="Aborted("+X+")",R(X),pe=!0,ce=1,X+=". Build with -s ASSERTIONS=1 for more info.";var re=new WebAssembly.RuntimeError(X);throw i(re),re}var O1="data:application/octet-stream;base64,";function kf(X){return X.startsWith(O1)}function zi(X){return X.startsWith("file://")}var ss;ss="tfjs-backend-wasm.wasm",kf(ss)||(ss=y(ss));function jd(X){try{if(X==ss&&te)return new Uint8Array(te);if(b)return b(X);throw"both async and sync fetching of the wasm failed"}catch(re){Mi(re)}}function M1(){if(!te&&(h||f)){if(typeof fetch=="function"&&!zi(ss))return fetch(ss,{credentials:"same-origin"}).then(function(X){if(!X.ok)throw"failed to load wasm binary file at '"+ss+"'";return X.arrayBuffer()}).catch(function(){return jd(ss)});if(A)return new Promise(function(X,re){A(ss,function(ve){X(new Uint8Array(ve))},re)})}return Promise.resolve().then(function(){return jd(ss)})}function z1(){var X={env:Bu,wasi_snapshot_preview1:Bu};function re(ot,tt){var rn=ot.exports;a.asm=rn,ae=a.asm.memory,ya(ae.buffer),Ga=a.asm.__indirect_function_table,Tr(a.asm.__wasm_call_ctors),wf("wasm-instantiate")}F1("wasm-instantiate");function ve(ot){re(ot.instance)}function $e(ot){return M1().then(function(tt){return WebAssembly.instantiate(tt,X)}).then(function(tt){return tt}).then(ot,function(tt){R("failed to asynchronously prepare wasm: "+tt),Mi(tt)})}function mt(){return!te&&typeof WebAssembly.instantiateStreaming=="function"&&!kf(ss)&&!zi(ss)&&typeof fetch=="function"?fetch(ss,{credentials:"same-origin"}).then(function(ot){var tt=WebAssembly.instantiateStreaming(ot,X);return tt.then(ve,function(rn){return R("wasm streaming compile failed: "+rn),R("falling back to ArrayBuffer instantiation"),$e(ve)})}):$e(ve)}if(a.instantiateWasm)try{var yt=a.instantiateWasm(X,re);return yt}catch(ot){return R("Module.instantiateWasm callback failed with error: "+ot),!1}return mt().catch(i),{}}var cv,dv;function qd(X){for(;X.length>0;){var re=X.shift();if(typeof re=="function"){re(a);continue}var ve=re.func;typeof ve=="number"?re.arg===void 0?Xd(ve)():Xd(ve)(re.arg):ve(re.arg===void 0?null:re.arg)}}function ja(X){return X}function Sf(X){var re=/\b_Z[\w\d_]+/g;return X.replace(re,function(ve){var $e=ve;return ve===$e?ve:$e+" ["+ve+"]"})}var Nr=[];function Xd(X){var re=Nr[X];return re||(X>=Nr.length&&(Nr.length=X+1),Nr[X]=re=Ga.get(X)),re}function pv(){var X=new Error;if(!X.stack){try{throw new Error}catch(re){X=re}if(!X.stack)return"(no stack trace available)"}return X.stack.toString()}function zu(X,re){Ga.set(X,re),Nr[X]=re}function L1(){Mi("")}function Kd(){return 2147483648}function If(X,re,ve){es.copyWithin(X,re,re+ve)}function rs(X){try{return ae.grow(X-Ns.byteLength+65535>>>16),ya(ae.buffer),1}catch(re){}}function Cf(X){var re=es.length;X=X>>>0;var ve=Kd();if(X>ve)return!1;for(var $e=1;$e<=4;$e*=2){var mt=re*(1+.2/$e);mt=Math.min(mt,X+100663296);var yt=Math.min(ve,sn(Math.max(X,mt),65536)),ot=rs(yt);if(ot)return!0}return!1}var Lu={mappings:{},buffers:[null,[],[]],printChar:function(X,re){var ve=Lu.buffers[X];re===0||re===10?((X===1?$:R)(ut(ve,0)),ve.length=0):ve.push(re)},varargs:void 0,get:function(){Lu.varargs+=4;var X=Vn[Lu.varargs-4>>2];return X},getStr:function(X){var re=At(X);return re},get64:function(X,re){return X}};function B1(X){return 0}function hv(X,re,ve,$e,mt){}function fv(X,re,ve,$e){for(var mt=0,yt=0;yt>2],tt=Vn[re+4>>2];re+=8;for(var rn=0;rn>2]=mt,0}function W1(X){J(X)}var Tf=!1,Bu={abort:L1,emscripten_get_heap_max:Kd,emscripten_memcpy_big:If,emscripten_resize_heap:Cf,fd_close:B1,fd_seek:hv,fd_write:fv,setTempRet0:W1},MR=z1(),mv=a.___wasm_call_ctors=function(){return(mv=a.___wasm_call_ctors=a.asm.__wasm_call_ctors).apply(null,arguments)},V1=a._init=function(){return(V1=a._init=a.asm.init).apply(null,arguments)},U1=a._init_with_threads_count=function(){return(U1=a._init_with_threads_count=a.asm.init_with_threads_count).apply(null,arguments)},Nf=a._get_threads_count=function(){return(Nf=a._get_threads_count=a.asm.get_threads_count).apply(null,arguments)},Ef=a._register_tensor=function(){return(Ef=a._register_tensor=a.asm.register_tensor).apply(null,arguments)},G1=a._dispose_data=function(){return(G1=a._dispose_data=a.asm.dispose_data).apply(null,arguments)},We=a._dispose=function(){return(We=a._dispose=a.asm.dispose).apply(null,arguments)},H1=a._Abs=function(){return(H1=a._Abs=a.asm.Abs).apply(null,arguments)},Rf=a._Add=function(){return(Rf=a._Add=a.asm.Add).apply(null,arguments)},Li=a._AddN=function(){return(Li=a._AddN=a.asm.AddN).apply(null,arguments)},Wu=a._All=function(){return(Wu=a._All=a.asm.All).apply(null,arguments)},j1=a._Any=function(){return(j1=a._Any=a.asm.Any).apply(null,arguments)},gv=a._ArgMax=function(){return(gv=a._ArgMax=a.asm.ArgMax).apply(null,arguments)},q1=a._AvgPool=function(){return(q1=a._AvgPool=a.asm.AvgPool).apply(null,arguments)},yv=a._BatchMatMul=function(){return(yv=a._BatchMatMul=a.asm.BatchMatMul).apply(null,arguments)},Bi=a._Ceil=function(){return(Bi=a._Ceil=a.asm.Ceil).apply(null,arguments)},X1=a._ClipByValue=function(){return(X1=a._ClipByValue=a.asm.ClipByValue).apply(null,arguments)},K1=a._Conv2D=function(){return(K1=a._Conv2D=a.asm.Conv2D).apply(null,arguments)},Z1=a._Conv2DBackpropInput=function(){return(Z1=a._Conv2DBackpropInput=a.asm.Conv2DBackpropInput).apply(null,arguments)},Y1=a._Cos=function(){return(Y1=a._Cos=a.asm.Cos).apply(null,arguments)},J1=a._Cosh=function(){return(J1=a._Cosh=a.asm.Cosh).apply(null,arguments)},Q1=a._CropAndResize=function(){return(Q1=a._CropAndResize=a.asm.CropAndResize).apply(null,arguments)},_f=a._Cumprod=function(){return(_f=a._Cumprod=a.asm.Cumprod).apply(null,arguments)},eg=a._Cumsum=function(){return(eg=a._Cumsum=a.asm.Cumsum).apply(null,arguments)},tg=a._DepthToSpace=function(){return(tg=a._DepthToSpace=a.asm.DepthToSpace).apply(null,arguments)},ng=a._DepthwiseConv2dNative=function(){return(ng=a._DepthwiseConv2dNative=a.asm.DepthwiseConv2dNative).apply(null,arguments)},sg=a._Elu=function(){return(sg=a._Elu=a.asm.Elu).apply(null,arguments)},rg=a._Equal=function(){return(rg=a._Equal=a.asm.Equal).apply(null,arguments)},Df=a._Exp=function(){return(Df=a._Exp=a.asm.Exp).apply(null,arguments)},ag=a._FlipLeftRight=function(){return(ag=a._FlipLeftRight=a.asm.FlipLeftRight).apply(null,arguments)},og=a._Floor=function(){return(og=a._Floor=a.asm.Floor).apply(null,arguments)},Wi=a._FloorDiv=function(){return(Wi=a._FloorDiv=a.asm.FloorDiv).apply(null,arguments)},Zd=a._FusedBatchNorm=function(){return(Zd=a._FusedBatchNorm=a.asm.FusedBatchNorm).apply(null,arguments)},ig=a._FusedConv2D=function(){return(ig=a._FusedConv2D=a.asm.FusedConv2D).apply(null,arguments)},lg=a._FusedDepthwiseConv2D=function(){return(lg=a._FusedDepthwiseConv2D=a.asm.FusedDepthwiseConv2D).apply(null,arguments)},ug=a._Gather=function(){return(ug=a._Gather=a.asm.Gather).apply(null,arguments)},st=a._GatherNd=function(){return(st=a._GatherNd=a.asm.GatherNd).apply(null,arguments)},cg=a._Greater=function(){return(cg=a._Greater=a.asm.Greater).apply(null,arguments)},dg=a._GreaterEqual=function(){return(dg=a._GreaterEqual=a.asm.GreaterEqual).apply(null,arguments)},pg=a._LeakyRelu=function(){return(pg=a._LeakyRelu=a.asm.LeakyRelu).apply(null,arguments)},hg=a._Less=function(){return(hg=a._Less=a.asm.Less).apply(null,arguments)},fg=a._LessEqual=function(){return(fg=a._LessEqual=a.asm.LessEqual).apply(null,arguments)},mg=a._Log=function(){return(mg=a._Log=a.asm.Log).apply(null,arguments)},Yd=a._LogicalAnd=function(){return(Yd=a._LogicalAnd=a.asm.LogicalAnd).apply(null,arguments)},$f=a._LogicalNot=function(){return($f=a._LogicalNot=a.asm.LogicalNot).apply(null,arguments)},Pf=a._LogicalOr=function(){return(Pf=a._LogicalOr=a.asm.LogicalOr).apply(null,arguments)},gg=a._LogicalXor=function(){return(gg=a._LogicalXor=a.asm.LogicalXor).apply(null,arguments)},yg=a._Max=function(){return(yg=a._Max=a.asm.Max).apply(null,arguments)},Ag=a._MaxPool=function(){return(Ag=a._MaxPool=a.asm.MaxPool).apply(null,arguments)},xg=a._Maximum=function(){return(xg=a._Maximum=a.asm.Maximum).apply(null,arguments)},bg=a._Mean=function(){return(bg=a._Mean=a.asm.Mean).apply(null,arguments)},vg=a._Min=function(){return(vg=a._Min=a.asm.Min).apply(null,arguments)},Bt=a._Minimum=function(){return(Bt=a._Minimum=a.asm.Minimum).apply(null,arguments)},wg=a._MirrorPad=function(){return(wg=a._MirrorPad=a.asm.MirrorPad).apply(null,arguments)},kg=a._Multiply=function(){return(kg=a._Multiply=a.asm.Multiply).apply(null,arguments)},Sg=a._Neg=function(){return(Sg=a._Neg=a.asm.Neg).apply(null,arguments)},Vu=a._NonMaxSuppressionV3=function(){return(Vu=a._NonMaxSuppressionV3=a.asm.NonMaxSuppressionV3).apply(null,arguments)},Ff=a._NonMaxSuppressionV4=function(){return(Ff=a._NonMaxSuppressionV4=a.asm.NonMaxSuppressionV4).apply(null,arguments)},Of=a._NonMaxSuppressionV5=function(){return(Of=a._NonMaxSuppressionV5=a.asm.NonMaxSuppressionV5).apply(null,arguments)},Mf=a._NotEqual=function(){return(Mf=a._NotEqual=a.asm.NotEqual).apply(null,arguments)},Ig=a._OneHot=function(){return(Ig=a._OneHot=a.asm.OneHot).apply(null,arguments)},zf=a._PadV2=function(){return(zf=a._PadV2=a.asm.PadV2).apply(null,arguments)},Cg=a._Pow=function(){return(Cg=a._Pow=a.asm.Pow).apply(null,arguments)},Av=a._Prelu=function(){return(Av=a._Prelu=a.asm.Prelu).apply(null,arguments)},Lf=a._Prod=function(){return(Lf=a._Prod=a.asm.Prod).apply(null,arguments)},xv=a._RealDiv=function(){return(xv=a._RealDiv=a.asm.RealDiv).apply(null,arguments)},Tg=a._Relu=function(){return(Tg=a._Relu=a.asm.Relu).apply(null,arguments)},Ng=a._Relu6=function(){return(Ng=a._Relu6=a.asm.Relu6).apply(null,arguments)},Eg=a._ResizeBilinear=function(){return(Eg=a._ResizeBilinear=a.asm.ResizeBilinear).apply(null,arguments)},Rg=a._ResizeNearestNeighbor=function(){return(Rg=a._ResizeNearestNeighbor=a.asm.ResizeNearestNeighbor).apply(null,arguments)},_g=a._Reverse=function(){return(_g=a._Reverse=a.asm.Reverse).apply(null,arguments)},Dg=a._RotateWithOffset=function(){return(Dg=a._RotateWithOffset=a.asm.RotateWithOffset).apply(null,arguments)},$g=a._Round=function(){return($g=a._Round=a.asm.Round).apply(null,arguments)},Pg=a._Rsqrt=function(){return(Pg=a._Rsqrt=a.asm.Rsqrt).apply(null,arguments)},Fg=a._ScatterNd=function(){return(Fg=a._ScatterNd=a.asm.ScatterNd).apply(null,arguments)},Og=a._SelectV2=function(){return(Og=a._SelectV2=a.asm.SelectV2).apply(null,arguments)},Mg=a._Sigmoid=function(){return(Mg=a._Sigmoid=a.asm.Sigmoid).apply(null,arguments)},zg=a._Sin=function(){return(zg=a._Sin=a.asm.Sin).apply(null,arguments)},Lg=a._Softmax=function(){return(Lg=a._Softmax=a.asm.Softmax).apply(null,arguments)},Bg=a._SparseFillEmptyRows=function(){return(Bg=a._SparseFillEmptyRows=a.asm.SparseFillEmptyRows).apply(null,arguments)},Wg=a._SparseReshape=function(){return(Wg=a._SparseReshape=a.asm.SparseReshape).apply(null,arguments)},Vg=a._SparseSegmentReduction=function(){return(Vg=a._SparseSegmentReduction=a.asm.SparseSegmentReduction).apply(null,arguments)},Ug=a._Sqrt=function(){return(Ug=a._Sqrt=a.asm.Sqrt).apply(null,arguments)},Gg=a._Square=function(){return(Gg=a._Square=a.asm.Square).apply(null,arguments)},Hg=a._SquaredDifference=function(){return(Hg=a._SquaredDifference=a.asm.SquaredDifference).apply(null,arguments)},jg=a._Step=function(){return(jg=a._Step=a.asm.Step).apply(null,arguments)},qg=a._StridedSlice=function(){return(qg=a._StridedSlice=a.asm.StridedSlice).apply(null,arguments)},Xg=a._Sub=function(){return(Xg=a._Sub=a.asm.Sub).apply(null,arguments)},Kg=a._Sum=function(){return(Kg=a._Sum=a.asm.Sum).apply(null,arguments)},Zg=a._Tan=function(){return(Zg=a._Tan=a.asm.Tan).apply(null,arguments)},Yg=a._Tanh=function(){return(Yg=a._Tanh=a.asm.Tanh).apply(null,arguments)},Jg=a._Tile=function(){return(Jg=a._Tile=a.asm.Tile).apply(null,arguments)},Qg=a._TopK=function(){return(Qg=a._TopK=a.asm.TopK).apply(null,arguments)},e3=a._Transform=function(){return(e3=a._Transform=a.asm.Transform).apply(null,arguments)},t3=a._Transpose=function(){return(t3=a._Transpose=a.asm.Transpose).apply(null,arguments)},n3=a.__FusedMatMul=function(){return(n3=a.__FusedMatMul=a.asm._FusedMatMul).apply(null,arguments)},s3=a._malloc=function(){return(s3=a._malloc=a.asm.malloc).apply(null,arguments)},r3=a._free=function(){return(r3=a._free=a.asm.free).apply(null,arguments)},a3=a.___errno_location=function(){return(a3=a.___errno_location=a.asm.__errno_location).apply(null,arguments)},o3=a._emscripten_main_thread_process_queued_calls=function(){return(o3=a._emscripten_main_thread_process_queued_calls=a.asm.emscripten_main_thread_process_queued_calls).apply(null,arguments)},Bf=a.stackSave=function(){return(Bf=a.stackSave=a.asm.stackSave).apply(null,arguments)},Wf=a.stackRestore=function(){return(Wf=a.stackRestore=a.asm.stackRestore).apply(null,arguments)},Jd=a.stackAlloc=function(){return(Jd=a.stackAlloc=a.asm.stackAlloc).apply(null,arguments)},i3=a.dynCall_iijjiiii=function(){return(i3=a.dynCall_iijjiiii=a.asm.dynCall_iijjiiii).apply(null,arguments)},l3=a.dynCall_jiji=function(){return(l3=a.dynCall_jiji=a.asm.dynCall_jiji).apply(null,arguments)};a.cwrap=De;var Uu;function Qd(X){this.name="ExitStatus",this.message="Program terminated with exit("+X+")",this.status=X}Ha=function X(){Uu||ep(),Uu||(Ha=X)};function ep(X){if(X=X||c,Ys>0||(yf(),Ys>0))return;function re(){Uu||(Uu=!0,a.calledRun=!0,!pe&&(Af(),o(a),a.onRuntimeInitialized&&a.onRuntimeInitialized(),xf()))}a.setStatus?(a.setStatus("Running..."),setTimeout(function(){setTimeout(function(){a.setStatus("")},1),re()},1)):re()}a.run=ep;function bv(X){ce=X,Hd()||(a.onExit&&a.onExit(X),pe=!0),d(X,new Qd(X))}if(a.preInit)for(typeof a.preInit=="function"&&(a.preInit=[a.preInit]);a.preInit.length>0;)a.preInit.pop()();ep();var Gu;l&&(Gu={uncaughtException:process.listeners("uncaughtException").filter(function(X){return!l.uncaughtException.indexOf(X)>-1}),unhandledRejection:process.listeners("unhandledRejection").filter(function(X){return!l.unhandledRejection.indexOf(X)>-1})});var Hu;if(typeof r!="undefined")Hu=r;else if(typeof WasmBackendModuleThreadedSimd!="undefined")Hu=WasmBackendModuleThreadedSimd;else throw new Error("Could not find wasm module in post.js");if(Gu){var u3=Hu._dispose;Hu._dispose=function(){u3(),Gu.uncaughtException.forEach(function(X){process.removeListener("uncaughtException",X)}),Gu.unhandledRejection.forEach(function(X){process.removeListener("unhandledRejection",X)})}}return r.ready}})();typeof e=="object"&&typeof t=="object"?t.exports=n:typeof define=="function"&&define.amd?define([],function(){return n}):typeof e=="object"&&(e.WasmBackendModule=n)}}),rD=1e-7,aD=1e-4,Gp=class{constructor(e,t){this.backend=e,this.dataMover=t,this.data=new WeakMap,this.dataIdsCount=0}get(e){return this.data.has(e)||this.dataMover.moveData(this.backend,e),this.data.get(e)}set(e,t){this.dataIdsCount++,this.data.set(e,t)}has(e){return this.data.has(e)}delete(e){return this.dataIdsCount--,this.data.delete(e)}numDataIds(){return this.dataIdsCount}},Cc=class{refCount(e){return Js("refCount")}incRef(e){return Js("incRef")}timerAvailable(){return!0}time(e){return Js("time")}read(e){return Js("read")}readSync(e){return Js("readSync")}readToGPU(e,t){return Js("readToGPU")}numDataIds(){return Js("numDataIds")}disposeData(e,t){return Js("disposeData")}write(e,t,n){return Js("write")}move(e,t,n,s,r){return Js("move")}memory(){return Js("memory")}floatPrecision(){return Js("floatPrecision")}epsilon(){return this.floatPrecision()===32?rD:aD}dispose(){return Js("dispose")}};function Js(e){throw new Error(`'${e}' not yet implemented or not found in the registry. This kernel may not be supported by the tfjs backend you have chosen`)}function w6(e){let t=e.length,n=0;for(;t>0;)n=Math.random()*t|0,t--,wm(e,t,n)}function oD(e,t){if(e.length!==t.length)throw new Error(`Array sizes must match to be shuffled together First array length was ${e.length}Second array length was ${t.length}`);let n=e.length,s=0;for(;n>0;)s=Math.random()*n|0,n--,wm(e,n,s),wm(t,n,s)}function Sp(e,t,n){return Math.max(e,Math.min(t,n))}function iD(e){return e%2===0?e:e+1}function wm(e,t,n){let s=e[t];e[t]=e[n],e[n]=s}function lD(e){let t=0;for(let n=0;nn+` Shapes ${e} and ${t} must match`)}function Al(e){O(e!=null,()=>"The input to the tensor constructor must be a non-null value.")}function ol(e,t=[],n=!1){if(t==null&&(t=[]),Array.isArray(e)||Un(e)&&!n)for(let s=0;s0,n){return new Promise((s,r)=>{let a=0,o=()=>{if(e()){s();return}a++;let i=t(a);if(n!=null&&a>=n){r();return}setTimeout(o,i)};o()})}function gD(e,t){let n=1,s=-1;for(let a=0;a=0)n*=e[a];else if(e[a]===-1){if(s!==-1)throw Error(`Shapes can only have 1 implicit size. Found -1 at dim ${s} and dim ${a}`);s=a}else if(e[a]<0)throw Error(`Shapes can not be < 0. Found ${e[a]} at dim ${a}`);if(s===-1){if(t>0&&t!==n)throw Error(`Size(${t}) must match the product of shape ${e}`);return e}if(n===0)throw Error(`Cannot infer the missing size in [${e}] when there are 0 elements`);if(t%n!==0)throw Error(`The implicit shape can't be a fractional number. Got ${t} / ${n}`);let r=e.slice();return r[s]=t/n,r}function yr(e,t){let n=t.length;return e=e==null?t.map((s,r)=>r):[].concat(e),O(e.every(s=>s>=-n&&s`All values in axis param must be in range [-${n}, ${n}) but got axis ${e}`),O(e.every(s=>uc(s)),()=>`All values in axis param must be integers but got axis ${e}`),e.map(s=>s<0?n+s:s)}function k6(e,t){let n=[],s=[],r=t!=null&&Array.isArray(t)&&t.length===0,a=t==null||r?null:yr(t,e).sort(),o=0;for(let i=0;ii)&&e[i]===1&&(n.push(e[i]),s.push(i)),a[o]<=i&&o++}e[i]!==1&&(n.push(e[i]),s.push(i))}return{newShape:n,keptDims:s}}function S6(e,t){let n=null;if(e==null||e==="float32")n=new Float32Array(t);else if(e==="int32")n=new Int32Array(t);else if(e==="bool")n=new Uint8Array(t);else throw new Error(`Unknown data type ${e}`);return n}function I6(e,t){let n=null;if(e==null||e==="float32")n=new Float32Array(t);else if(e==="int32")n=new Int32Array(t);else if(e==="bool")n=new Uint8Array(t);else if(e==="string")n=new Array(t);else throw new Error(`Unknown data type ${e}`);return n}function C6(e,t){for(let n=0;nt+=n.length),t}function Ja(e){return typeof e=="string"||e instanceof String}function E6(e){return typeof e=="boolean"}function R6(e){return typeof e=="number"}function e0(e){return Array.isArray(e)?e0(e[0]):e instanceof Float32Array?"float32":e instanceof Int32Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray?"int32":R6(e)?"float32":Ja(e)?"string":E6(e)?"bool":"float32"}function ro(e){return!!(e&&e.constructor&&e.call&&e.apply)}function km(e,t){for(let n=t;n=0;--s)n[s]=n[s+1]*e[s+1];return n}function _6(e,t,n,s=!1){let r=new Array;if(t.length===1){let a=t[0]*(s?2:1);for(let o=0;ol*u)*(s?2:1);for(let l=0;lr*a)*(n?2:1);if(s===0)return[];if(s!==t.length)throw new Error(`[${e}] does not match the input size ${t.length}${n?" for a complex tensor":""}.`);return _6(0,e,t,n)}function zy(e,t){let n=t0(e,t);for(let s=0;ss*r,1);if(t==null||t==="float32")return rc(e,new Float32Array(n));if(t==="int32")return rc(e,new Int32Array(n));if(t==="bool")return rc(e,new Uint8Array(n));throw new Error(`Unknown data type ${t}`)}function Ly(e){e.forEach(t=>{O(Number.isInteger(t)&&t>=0,()=>`Tensor must have a shape comprised of positive integers but got shape [${e}].`)})}function xD(e,t,n){if(t===0)return 0;if(t===1)return e[0];let s=e[e.length-1];for(let r=0;r{let[s,r]=n.split(":");this.urlFlags[s]=kD(s,r)})}};function vD(e){let t={};return e.replace(/[?&]([^=?&]+)(?:=([^&]*))?/g,(n,...s)=>(wD(t,s[0],s[1]),s.join("="))),t}function wD(e,t,n){e[decodeURIComponent(t)]=decodeURIComponent(n||"")}function kD(e,t){if(t=t.toLowerCase(),t==="true"||t==="false")return t==="true";if(`${+t}`===t)return+t;throw new Error(`Could not parse value flag value ${t} for flag ${e}.`)}function H(){return Wy}var Wy=null;function SD(e){Wy=e}var y3;function $6(){if(y3==null){let e;if(typeof window!="undefined")e=window;else if(typeof global!="undefined")e=global;else if(typeof process!="undefined")e=process;else if(typeof self!="undefined")e=self;else throw new Error("Could not find a global object");y3=e}return y3}function ID(){let e=$6();return e._tfGlobals==null&&(e._tfGlobals=new Map),e._tfGlobals}function Vy(e,t){let n=ID();if(n.has(e))return n.get(e);{let s=t();return n.set(e,s),n.get(e)}}var xl="Abs",Nc="Acos",Ec="Acosh",Da="Add",xo="AddN",Rc="All",_c="Any",bo="ArgMax",Dc="ArgMin",$c="Asin",Pc="Asinh",Fc="Atan",Oc="Atanh",bl="Atan2",vo="AvgPool",n0="AvgPoolGrad",Hp="AvgPool3D",s0="AvgPool3DGrad",wo="BatchMatMul",vl="BatchToSpaceND",r0="Bincount",P6="BroadcastTo",a0="BroadcastArgs",ko="Cast",So="Ceil",$a="ClipByValue",jp="Complex",qp="ComplexAbs",wl="Concat",Io="Conv2D",o0="Conv2DBackpropFilter",Co="Conv2DBackpropInput",Xp="Conv3D",i0="Conv3DBackpropFilterV2",l0="Conv3DBackpropInputV2",To="Cos",No="Cosh",kl="Cumprod",Eo="Cumsum",Sl="CropAndResize",u0="DenseBincount",Il="DepthToSpace",Ro="DepthwiseConv2dNative",c0="DepthwiseConv2dNativeBackpropFilter",d0="DepthwiseConv2dNativeBackpropInput",p0="Diag",Kp="Dilation2D",Sm="Dilation2DBackpropInput",Im="Dilation2DBackpropFilter",_o="RealDiv",Zp="Einsum",Do="Elu",h0="EluGrad",Mc="Erf",Cl="Equal",$o="Exp",Tl="ExpandDims",Nl="Expm1",f0="FFT",zc="Fill",El="FlipLeftRight",Po="Floor",Fo="FloorDiv",Oo="FusedBatchNorm",Rl="GatherV2",_l="GatherNd",Dl="Greater",Mo="GreaterEqual",zo="Identity",m0="IFFT",Yp="Imag",Lc="IsFinite",Bc="IsInf",$l="IsNan",Lo="LeakyRelu",Pl="Less",Fl="LessEqual",g0="LinSpace",Bo="Log",Wc="Log1p",Ol="LogicalAnd",Ml="LogicalNot",Vc="LogicalOr",F6="LogicalXor",O6="LogSoftmax",CD="LowerBound",Jp="LRN",y0="LRNGrad",Wo="Max",Vo="Maximum",Uo="MaxPool",A0="MaxPoolGrad",Qp="MaxPool3D",x0="MaxPool3DGrad",b0="MaxPoolWithArgmax",Go="Mean",Ho="Min",jo="Minimum",qo="MirrorPad",Uc="Mod",v0="Multinomial",Xo="Multiply",zl="Neg",Ll="NotEqual",Bl="NonMaxSuppressionV3",Gc="NonMaxSuppressionV4",Wl="NonMaxSuppressionV5",Vl="OnesLike",Ul="OneHot",Gl="Pack",Ko="PadV2",TD="Pool",Zo="Pow",Yo="Prelu",Jo="Prod",w0="RaggedTensorToTensor",Hc="Range",eh="Real",Hl="Reciprocal",Qo="Relu",jl="Reshape",ei="ResizeNearestNeighbor",k0="ResizeNearestNeighborGrad",ti="ResizeBilinear",S0="ResizeBilinearGrad",ni="Relu6",ql="Reverse",Xl="Round",si="Rsqrt",Kl="ScatterNd",I0="SearchSorted",Zl="Select",jc="Selu",Yl="Slice",ri="Sin",Jl="Sinh",qc="Sign",ai="Sigmoid",Xc="Softplus",oi="Sqrt",ii="Sum",Ql="SpaceToBatchND",eu="SplitV",li="Softmax",th="SparseFillEmptyRows",Kc="SparseReshape",nh="SparseSegmentMean",sh="SparseSegmentSum",rh="SparseToDense",ui="SquaredDifference",Zc="Square",tu="StridedSlice",Yc="StringNGrams",ah="StringSplit",oh="StringToHashBucketFast",ci="Sub",nu="Tan",di="Tanh",Pa="Tile",su="TopK",ru="Transform",na="Transpose",C0="Unique",au="Unpack",ih="UnsortedSegmentSum",ND="UpperBound",ou="ZerosLike",pi="Step",Ip="FromPixels",iu="RotateWithOffset",ao="_FusedMatMul",oo="FusedConv2D",io="FusedDepthwiseConv2D";function Ya(...e){H().getBool("IS_TEST")||H().getBool("PROD")||console.warn(...e)}function ED(...e){H().getBool("IS_TEST")||H().getBool("PROD")||console.log(...e)}var cc=Vy("kernelRegistry",()=>new Map),Cp=Vy("gradRegistry",()=>new Map);function Cm(e,t){let n=Uy(e,t);return cc.get(n)}function $3(e){return Cp.get(e)}function ra(e){let t=cc.entries(),n=[];for(;;){let{done:s,value:r}=t.next();if(s)break;let[a,o]=r,[i]=a.split("_");i===e&&n.push(o)}return n}function rr(e){let{kernelName:t,backendName:n}=e,s=Uy(t,n);cc.has(s)&&Ya(`The kernel '${t}' for backend '${n}' is already registered`),cc.set(s,e)}function M6(e){let{kernelName:t}=e;Cp.has(t)&&H().getBool("DEBUG")&&Ya(`Overriding the gradient for '${t}'`),Cp.set(t,e)}function RD(e,t){let n=Uy(e,t);if(!cc.has(n))throw new Error(`The kernel '${e}' for backend '${t}' is not registered`);cc.delete(n)}function _D(e){if(!Cp.has(e))throw new Error(`The gradient '${e}' for backend is not registered`);Cp.delete(e)}function DD(e,t){ra(e).forEach(s=>{let r=Object.assign({},s,{backendName:t});rr(r)})}function Uy(e,t){return`${t}_${e}`}var v={};qe(v,{arraysEqual:()=>Ao,assert:()=>O,assertNonNegativeIntegerDimensions:()=>Ly,assertNonNull:()=>Al,assertShapesMatch:()=>ds,bytesFromStringArray:()=>N6,bytesPerElement:()=>D3,checkConversionForErrors:()=>C6,clamp:()=>Sp,computeStrides:()=>Tc,createScalarValue:()=>zD,createShuffledIndices:()=>fD,decodeString:()=>Tm,distSquared:()=>cD,encodeString:()=>uh,fetch:()=>BD,fingerPrint64:()=>MD,flatten:()=>ol,getArrayFromDType:()=>I6,getTypedArrayFromDType:()=>S6,hasEncodingLoss:()=>yD,hexToLong:()=>lh,indexToLoc:()=>bD,inferDtype:()=>e0,inferFromImplicitShape:()=>gD,isBoolean:()=>E6,isFunction:()=>ro,isInt:()=>uc,isNumber:()=>R6,isPromise:()=>By,isScalarShape:()=>dD,isString:()=>Ja,isTypedArray:()=>Un,isValidDtype:()=>T6,locToIndex:()=>xD,makeOnesTypedArray:()=>zy,makeZerosNestedTypedArray:()=>AD,makeZerosTypedArray:()=>t0,nearestDivisor:()=>km,nearestLargerEven:()=>iD,now:()=>Tp,parseAxisParam:()=>yr,randUniform:()=>uD,repeatedTry:()=>mD,rightPad:()=>xp,shuffle:()=>w6,shuffleCombo:()=>oD,sizeFromShape:()=>Et,sizeToSquarishShape:()=>hD,squeezeShape:()=>k6,sum:()=>lD,swap:()=>wm,tanh:()=>pD,toNestedArray:()=>rc,toTypedArray:()=>T0});var $v=yo(W_()),Xi=$v.default||$v;function lh(e){return Xi.fromString(e,!0,16)}var z6=lh("c3a5c85c97cb3127"),Hi=lh("b492b66fbe98f273"),os=lh("9ae16a3b2f90404f");function P3(e){return e.xor(e.shru(47))}function L6(e,t,n){let s=e.slice(t,t+n);return Xi.fromBytes(Array.from(s),!0,!0)}function Nt(e,t){return L6(e,t,8)}function Pv(e,t){return L6(e,t,4)}function Cn(e,t){return t===0?e:e.shru(t).or(e.shl(64-t))}function to(e,t,n=lh("9ddfea08eb382d69")){let s=e.xor(t).mul(n);s=s.xor(s.shru(47));let r=t.xor(s).mul(n);return r=r.xor(r.shru(47)),r=r.mul(n),r}function $D(e,t,n,s,r,a){r=r.add(e),a=Cn(a.add(r).add(s),21);let o=r;return r=r.add(t),r=r.add(n),a=a.add(Cn(r,44)),[r.add(s),a.add(o)]}function Zf(e,t,n,s){return $D(Nt(e,t),Nt(e,t+8),Nt(e,t+16),Nt(e,t+24),n,s)}function PD(e,t=e.length){if(t>=8){let n=os.add(t*2),s=Nt(e,0).add(os),r=Nt(e,t-8),a=Cn(r,37).mul(n).add(s),o=Cn(s,25).add(r).mul(n);return to(a,o,n)}if(t>=4){let n=os.add(t*2),s=Pv(e,0);return to(s.shl(3).add(t),Pv(e,t-4),n)}if(t>0){let n=e[0],s=e[t>>1],r=e[t-1],a=n+(s<<8),o=t+(r<<2);return P3(os.mul(a).xor(z6.mul(o))).mul(os)}return os}function FD(e,t=e.length){let n=os.add(t*2),s=Nt(e,0).mul(Hi),r=Nt(e,8),a=Nt(e,t-8).mul(n),o=Nt(e,t-16).mul(os);return to(Cn(s.add(r),43).add(Cn(a,30)).add(o),s.add(Cn(r.add(os),18)).add(a),n)}function OD(e,t=e.length){let n=os.add(t*2),s=Nt(e,0).mul(os),r=Nt(e,8),a=Nt(e,t-8).mul(n),o=Nt(e,t-16).mul(os),i=Cn(s.add(r),43).add(Cn(a,30)).add(o),l=to(i,s.add(Cn(r.add(os),18)).add(a),n),u=Nt(e,16).mul(n),c=Nt(e,24),p=i.add(Nt(e,t-32)).mul(n),d=l.add(Nt(e,t-24)).mul(n);return to(Cn(u.add(c),43).add(Cn(p,30)).add(d),u.add(Cn(c.add(s),18)).add(p),n)}function MD(e,t=e.length){let n=Xi.fromNumber(81,!0);if(t<=32)return t<=16?PD(e,t):FD(e,t);if(t<=64)return OD(e,t);let s=n,r=n.mul(Hi).add(113),a=P3(r.mul(os).add(113)).mul(os),o=[Xi.UZERO,Xi.UZERO],i=[Xi.UZERO,Xi.UZERO];s=s.mul(os).add(Nt(e,0));let l=0,u=(t-1>>6)*64,c=u+(t-1&63)-63;do s=Cn(s.add(r).add(o[0]).add(Nt(e,l+8)),37).mul(Hi),r=Cn(r.add(o[1]).add(Nt(e,l+48)),42).mul(Hi),s=s.xor(i[1]),r=r.add(o[0]).add(Nt(e,l+40)),a=Cn(a.add(i[0]),33).mul(Hi),o=Zf(e,l,o[1].mul(Hi),s.add(i[0])),i=Zf(e,l+32,a.add(i[1]),r.add(Nt(e,l+16))),[a,s]=[s,a],l+=64;while(l!==u);let p=Hi.add(a.and(255).shl(1));return l=c,i[0]=i[0].add(t-1&63),o[0]=o[0].add(i[0]),i[0]=i[0].add(o[0]),s=Cn(s.add(r).add(o[0]).add(Nt(e,l+8)),37).mul(p),r=Cn(r.add(o[1]).add(Nt(e,l+48)),42).mul(p),s=s.xor(i[1].mul(9)),r=r.add(o[0].mul(9).add(Nt(e,l+40))),a=Cn(a.add(i[0]),33).mul(p),o=Zf(e,l,o[1].mul(p),s.add(i[0])),i=Zf(e,l+32,a.add(i[1]),r.add(Nt(e,l+16))),[a,s]=[s,a],to(to(o[0],i[0],p).add(P3(r).mul(z6)).add(a),to(o[1],i[1],p).add(s),p)}function zD(e,t){return t==="string"?uh(e):T0([e],t)}function LD(e,t){return e instanceof Float32Array&&t==="float32"||e instanceof Int32Array&&t==="int32"||e instanceof Uint8Array&&t==="bool"}function T0(e,t){if(t==="string")throw new Error("Cannot convert a string[] to a TypedArray");if(Array.isArray(e)&&(e=ol(e)),H().getBool("DEBUG")&&C6(e,t),LD(e,t))return e;if(t==null||t==="float32"||t==="complex64")return new Float32Array(e);if(t==="int32")return new Int32Array(e);if(t==="bool"){let n=new Uint8Array(e.length);for(let s=0;s{s=n()},a,o=Tp();if(this.backendTimer.timerAvailable())a=this.backendTimer.time(r);else{r();for(let l of s)l.dataSync();a=Promise.resolve({kernelMs:Tp()-o})}if(H().getBool("CHECK_COMPUTATION_FOR_ERRORS"))for(let l=0;l{VD(c,u.dtype,e)})}return{kernelName:e,outputs:s,inputs:t,timeMs:a.then(l=>l.kernelMs),extraInfo:a.then(l=>l.getExtraProfileInfo!=null?l.getExtraProfileInfo():"")}}logKernelProfile(e){let{kernelName:t,outputs:n,timeMs:s,inputs:r,extraInfo:a}=e;n.forEach(o=>{Promise.all([o.data(),s,a]).then(i=>{this.logger.logKernelProfile(t,o,i[0],i[1],r,i[2])})})}};function VD(e,t,n){if(t!=="float32")return!1;for(let s=0;s0?f:""} `}}console.log(`%c${i} %c${o} %c${l}D ${c} %c${u} %c${p} %c${a}`,"font-weight:bold","color:red","color:blue","color: orange","color: green","color: steelblue")}};function GD(e,t,n){let s={},r={};for(let l=0;ls[m.id]=!0),h=!0,r[u.id]=!0;break}if(h)break}}let a={};a[n.id]=!0;let o={};for(let l=e.length-1;l>=0;l--){let u=e[l],c=u.inputs;for(let p=0;p=0;r--){let a=t[r],o=[];if(a.outputs.forEach(l=>{let u=e[l.id];u!=null?o.push(u):o.push(null)}),a.gradient==null)throw new Error(`Cannot compute gradient: gradient function not found for ${a.kernelName}.`);let i=a.gradient(o);for(let l in a.inputs){if(!(l in i))throw new Error(`Cannot backprop through input ${l}. Available gradients found: ${Object.keys(i)}.`);let u=n(()=>i[l]());if(u.dtype!=="float32")throw new Error(`Error in gradient for op ${a.kernelName}. The gradient of input ${l} must have 'float32' dtype, but has '${u.dtype}'`);let c=a.inputs[l];if(!Ao(u.shape,c.shape))throw new Error(`Error in gradient for op ${a.kernelName}. The gradient of input '${l}' has shape '${u.shape}', which does not match the shape of the input '${c.shape}'`);if(e[c.id]==null)e[c.id]=u;else{let p=e[c.id];e[c.id]=s(p,u),p.dispose()}}}}var Fv=20,rp=3,A3=7;function jD(e,t,n,s){let r=Tc(t),a=qD(e,t,n,r),o=t.length,i=dm(e,t,n,r,a),l=["Tensor"];return s&&(l.push(` dtype: ${n}`),l.push(` rank: ${o}`),l.push(` shape: [${t}]`),l.push(" values:")),l.push(i.map(u=>" "+u).join(` +"use strict";var Human=(()=>{var Cf=Object.defineProperty;var e_=Object.getOwnPropertyDescriptor;var t_=Object.getOwnPropertyNames;var n_=Object.prototype.hasOwnProperty;var s_=(e,t,n)=>t in e?Cf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Pi=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(t,n)=>(typeof require!="undefined"?require:t)[n]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var fa=(e,t)=>{for(var n in t)Cf(e,n,{get:t[n],enumerable:!0})},r_=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of t_(t))!n_.call(e,r)&&r!==n&&Cf(e,r,{get:()=>t[r],enumerable:!(s=e_(t,r))||s.enumerable});return e};var a_=e=>r_(Cf({},"__esModule",{value:!0}),e);var de=(e,t,n)=>(s_(e,typeof t!="symbol"?t+"":t,n),n),lv=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var jr=(e,t,n)=>(lv(e,t,"read from private field"),n?n.call(e):t.get(e)),Mu=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Bd=(e,t,n,s)=>(lv(e,t,"write to private field"),s?s.call(e,n):t.set(e,n),n);var Fbe={};fa(Fbe,{Env:()=>zh,Human:()=>G4,default:()=>G4,defaults:()=>Ha,draw:()=>M4,env:()=>pe,match:()=>U4,models:()=>kd});function ee(...e){let t=new Date,n=`${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}:${t.getSeconds().toString().padStart(2,"0")}.${t.getMilliseconds().toString().padStart(3,"0")}`;e&&console.log(n,"Human:",...e)}function uv(e,t){let n=e.endsWith("/")?"":"/",r=t.startsWith(".")||t.startsWith("/")||t.startsWith("http:")||t.startsWith("https:")||t.startsWith("file:")?`${t}`:`${e}${n}${t}`;if(!r.toLocaleLowerCase().includes(".json"))throw new Error(`modelpath error: expecting json file: ${r}`);return r}var ie=()=>typeof performance!="undefined"?performance.now():parseInt((Number(process.hrtime.bigint())/1e3/1e3).toString());function Kg(e,t,n="config",s=[]){for(let r of Object.keys(t))if(typeof t[r]=="object")Kg(e[r],t[r],r,s);else{let a=e&&typeof e[r]!="undefined";a||s.push({reason:"unknown property",where:`${n}.${r} = ${t[r]}`});let o=e&&typeof e[r]==typeof t[r];a&&!o&&s.push({reason:"property type mismatch",where:`${n}.${r} = ${t[r]}`,expected:typeof e[r]})}return t.debug&&n==="config"&&s.length>0&&ee("invalid configuration",s),s}function Bt(...e){let t=n=>n&&typeof n=="object";return e.reduce((n,s)=>(Object.keys(s||{}).forEach(r=>{let a=n[r],o=s[r];Array.isArray(a)&&Array.isArray(o)?n[r]=a.concat(...o):t(a)&&t(o)?n[r]=Bt(a,o):n[r]=o}),n),{})}var Ha={backend:"",modelBasePath:"",cacheModels:!0,validateModels:!0,wasmPath:"",wasmPlatformFetch:!1,debug:!1,async:!0,warmup:"full",cacheSensitivity:.7,skipAllowed:!1,deallocate:!1,flags:{},softwareKernels:!1,filter:{enabled:!0,equalization:!1,width:0,height:0,flip:!1,return:!0,brightness:0,contrast:0,sharpness:0,blur:0,saturation:0,hue:0,negative:!1,sepia:!1,vintage:!1,kodachrome:!1,technicolor:!1,polaroid:!1,pixelate:0},gesture:{enabled:!0},face:{enabled:!0,detector:{modelPath:"blazeface.json",rotation:!0,maxDetected:1,skipFrames:99,skipTime:2500,minConfidence:.2,iouThreshold:.1,mask:!1,return:!1},mesh:{enabled:!0,modelPath:"facemesh.json",keepInvalid:!1},attention:{enabled:!1,modelPath:"facemesh-attention.json"},iris:{enabled:!0,modelPath:"iris.json"},emotion:{enabled:!0,minConfidence:.1,skipFrames:99,skipTime:1500,modelPath:"emotion.json"},description:{enabled:!0,modelPath:"faceres.json",skipFrames:99,skipTime:3e3,minConfidence:.1},antispoof:{enabled:!1,skipFrames:99,skipTime:4e3,modelPath:"antispoof.json"},liveness:{enabled:!1,skipFrames:99,skipTime:4e3,modelPath:"liveness.json"}},body:{enabled:!0,modelPath:"movenet-lightning.json",maxDetected:-1,minConfidence:.3,skipFrames:1,skipTime:200},hand:{enabled:!0,rotation:!0,skipFrames:99,skipTime:1e3,minConfidence:.5,iouThreshold:.2,maxDetected:-1,landmarks:!0,detector:{modelPath:"handtrack.json"},skeleton:{modelPath:"handlandmark-full.json"}},object:{enabled:!1,modelPath:"mb3-centernet.json",minConfidence:.2,iouThreshold:.4,maxDetected:10,skipFrames:99,skipTime:2e3},segmentation:{enabled:!1,modelPath:"rvm.json",ratio:.5,mode:"default"}};var Ye={};fa(Ye,{Abs:()=>dl,Acos:()=>gc,Acosh:()=>yc,AdadeltaOptimizer:()=>O0,AdagradOptimizer:()=>M0,AdamOptimizer:()=>z0,AdamaxOptimizer:()=>L0,Add:()=>Ta,AddN:()=>go,All:()=>Ac,Any:()=>xc,ArgMax:()=>yo,ArgMin:()=>bc,Asin:()=>vc,Asinh:()=>wc,Atan:()=>kc,Atan2:()=>pl,Atanh:()=>Sc,AvgPool:()=>Ao,AvgPool3D:()=>Np,AvgPool3DGrad:()=>$m,AvgPoolGrad:()=>Dm,BackendWasm:()=>QC,BatchMatMul:()=>xo,BatchToSpaceND:()=>hl,Bincount:()=>Pm,BroadcastArgs:()=>Fm,BroadcastTo:()=>mw,Callback:()=>D8,CallbackList:()=>Ok,Cast:()=>bo,Ceil:()=>vo,ClipByValue:()=>Na,Complex:()=>Ep,ComplexAbs:()=>Rp,Concat:()=>fl,Conv2D:()=>wo,Conv2DBackpropFilter:()=>Om,Conv2DBackpropInput:()=>ko,Conv3D:()=>_p,Conv3DBackpropFilterV2:()=>Mm,Conv3DBackpropInputV2:()=>zm,Cos:()=>So,Cosh:()=>Io,CropAndResize:()=>gl,Cumprod:()=>ml,Cumsum:()=>Co,CustomCallback:()=>zk,DataStorage:()=>Tp,DenseBincount:()=>Lm,DepthToSpace:()=>yl,DepthwiseConv2dNative:()=>To,DepthwiseConv2dNativeBackpropFilter:()=>Bm,DepthwiseConv2dNativeBackpropInput:()=>Wm,Diag:()=>Vm,Dilation2D:()=>Dp,Dilation2DBackpropFilter:()=>nm,Dilation2DBackpropInput:()=>tm,ENV:()=>by,EarlyStopping:()=>$8,Einsum:()=>$p,Elu:()=>Eo,EluGrad:()=>Um,Environment:()=>hw,Equal:()=>Al,Erf:()=>Ic,Exp:()=>Ro,ExpandDims:()=>xl,Expm1:()=>bl,FFT:()=>Gm,Fill:()=>Cc,FlipLeftRight:()=>vl,Floor:()=>_o,FloorDiv:()=>Do,FromPixels:()=>lp,FusedBatchNorm:()=>$o,FusedConv2D:()=>so,FusedDepthwiseConv2D:()=>ro,GPGPUContext:()=>Zu,GatherNd:()=>kl,GatherV2:()=>wl,GraphModel:()=>Ch,Greater:()=>Sl,GreaterEqual:()=>Po,History:()=>Mk,IFFT:()=>Hm,Identity:()=>Fo,Imag:()=>Pp,InputSpec:()=>an,IsFinite:()=>Tc,IsInf:()=>Nc,IsNan:()=>Il,KernelBackend:()=>fc,LRN:()=>Fp,LRNGrad:()=>qm,LayerVariable:()=>Ek,LayersModel:()=>ba,LeakyRelu:()=>Oo,Less:()=>Cl,LessEqual:()=>Tl,LinSpace:()=>jm,Log:()=>Mo,Log1p:()=>Ec,LogSoftmax:()=>yw,LogicalAnd:()=>Nl,LogicalNot:()=>El,LogicalOr:()=>Rc,LogicalXor:()=>gw,LowerBound:()=>Z_,MathBackendWebGL:()=>od,Max:()=>zo,MaxPool:()=>Bo,MaxPool3D:()=>Op,MaxPool3DGrad:()=>Km,MaxPoolGrad:()=>Xm,MaxPoolWithArgmax:()=>Zm,Maximum:()=>Lo,Mean:()=>Wo,Min:()=>Vo,Minimum:()=>Uo,MirrorPad:()=>Go,Mod:()=>_c,MomentumOptimizer:()=>B0,Multinomial:()=>Ym,Multiply:()=>Ho,Neg:()=>Rl,NonMaxSuppressionV3:()=>Dl,NonMaxSuppressionV4:()=>Dc,NonMaxSuppressionV5:()=>$l,NotEqual:()=>_l,OP_SCOPE_SUFFIX:()=>Sy,OneHot:()=>Fl,OnesLike:()=>Pl,Optimizer:()=>_a,OptimizerConstructors:()=>ja,Pack:()=>Ol,PadV2:()=>jo,Pool:()=>Y_,Pow:()=>qo,Prelu:()=>Xo,Prod:()=>Ko,RMSPropOptimizer:()=>W0,RNN:()=>ia,RaggedGather:()=>Jm,RaggedTensorToTensor:()=>Qm,Range:()=>$c,Rank:()=>f3,Real:()=>Mp,RealDiv:()=>No,Reciprocal:()=>Ml,Reduction:()=>rs,Relu:()=>Zo,Relu6:()=>Qo,Reshape:()=>zl,ResizeBilinear:()=>Jo,ResizeBilinearGrad:()=>t0,ResizeNearestNeighbor:()=>Yo,ResizeNearestNeighborGrad:()=>e0,Reverse:()=>Ll,RotateWithOffset:()=>Ql,Round:()=>Bl,Rsqrt:()=>ei,SGDOptimizer:()=>hh,ScatterNd:()=>Wl,SearchSorted:()=>n0,Select:()=>Vl,Selu:()=>Pc,Sequential:()=>ic,Sigmoid:()=>ni,Sign:()=>Fc,Sin:()=>ti,Sinh:()=>Gl,Slice:()=>Ul,Softmax:()=>ai,Softplus:()=>Oc,SpaceToBatchND:()=>Hl,SparseFillEmptyRows:()=>zp,SparseReshape:()=>Mc,SparseSegmentMean:()=>Lp,SparseSegmentSum:()=>Bp,SparseToDense:()=>Wp,SplitV:()=>jl,Sqrt:()=>si,Square:()=>zc,SquaredDifference:()=>oi,Step:()=>ui,StridedSlice:()=>ql,StringNGrams:()=>Lc,StringSplit:()=>Vp,StringToHashBucketFast:()=>Up,Sub:()=>ii,Sum:()=>ri,SymbolicTensor:()=>_r,Tan:()=>Xl,Tanh:()=>li,Tensor:()=>st,TensorBuffer:()=>gn,Tile:()=>Ea,TopK:()=>Kl,Transform:()=>Zl,Transpose:()=>Jr,Unique:()=>s0,Unpack:()=>Yl,UnsortedSegmentSum:()=>Gp,UpperBound:()=>J_,Variable:()=>dp,WebGPUBackend:()=>m2,ZerosLike:()=>Jl,_FusedMatMul:()=>no,abs:()=>rn,acos:()=>Vy,acosh:()=>Uy,add:()=>le,addN:()=>a0,all:()=>o0,any:()=>fp,argMax:()=>Ps,argMin:()=>Gy,asin:()=>Hy,asinh:()=>jy,atan:()=>qy,atan2:()=>Xy,atanh:()=>Ky,avgPool:()=>eh,avgPool3d:()=>Yy,backend:()=>Bs,backend_util:()=>T,basicLSTMCell:()=>c6,batchNorm:()=>Wc,batchNorm2d:()=>Jy,batchNorm3d:()=>Qy,batchNorm4d:()=>eA,batchToSpaceND:()=>th,bincount:()=>tA,booleanMaskAsync:()=>q6,broadcastArgs:()=>d6,broadcastTo:()=>Xi,broadcast_util:()=>tu,browser:()=>ra,buffer:()=>ze,callbacks:()=>dj,cast:()=>me,ceil:()=>nA,clipByValue:()=>bs,clone:()=>Hn,complex:()=>wa,concat:()=>ut,concat1d:()=>sA,concat2d:()=>nu,concat3d:()=>rA,concat4d:()=>aA,constraints:()=>Dk,conv1d:()=>i0,conv2d:()=>ka,conv2dTranspose:()=>l0,conv3d:()=>iA,conv3dTranspose:()=>lA,copyRegisteredKernels:()=>nD,cos:()=>nh,cosh:()=>u0,cosineWindow:()=>_0,cumprod:()=>mp,cumsum:()=>c0,customGrad:()=>na,data:()=>sS,denseBincount:()=>h6,deprecationWarn:()=>Dy,depthToSpace:()=>uA,depthwiseConv2d:()=>Vc,deregisterOp:()=>fj,device_util:()=>Xp,diag:()=>f6,dilation2d:()=>cA,disableDeprecationWarnings:()=>E$,dispose:()=>Y,disposeVariables:()=>R$,div:()=>ge,divNoNan:()=>dA,dot:()=>pA,dropout:()=>zA,einsum:()=>m6,elu:()=>Uc,enableDebugMode:()=>N$,enableProdMode:()=>_y,enclosingPowerOfTwo:()=>LA,engine:()=>Jt,env:()=>U,equal:()=>Fs,erf:()=>hA,euclideanNorm:()=>gA,exp:()=>Os,expandDims:()=>Ft,expm1:()=>yA,eye:()=>d0,fft:()=>dh,fill:()=>zr,findBackend:()=>$y,findBackendFactory:()=>P$,floor:()=>Hc,floorDiv:()=>Bc,forceHalfFloat:()=>x9,fused:()=>rc,gather:()=>jc,gatherND:()=>Y6,gather_util:()=>Fy,getBackend:()=>cn,getGradient:()=>p3,getKernel:()=>sm,getKernelsForBackend:()=>ea,getThreadsCount:()=>e0e,gpgpu_util:()=>YI,grad:()=>sO,grads:()=>rO,greater:()=>ks,greaterEqual:()=>pi,ifft:()=>sc,imag:()=>Jp,image:()=>ke,inTopKAsync:()=>J6,initializers:()=>$k,input:()=>Jk,io:()=>On,irfft:()=>T0,isFinite:()=>AA,isInf:()=>xA,isNaN:()=>bA,keep:()=>Cn,kernel_impls:()=>Ar,layers:()=>Pk,leakyRelu:()=>sh,less:()=>p0,lessEqual:()=>hi,linalg:()=>VA,linspace:()=>b6,loadGraphModel:()=>xx,loadGraphModelSync:()=>yq,loadLayersModel:()=>bG,localResponseNormalization:()=>vA,log:()=>Ms,log1p:()=>rh,logSigmoid:()=>wA,logSoftmax:()=>f0,logSumExp:()=>m0,logicalAnd:()=>gr,logicalNot:()=>ah,logicalOr:()=>g0,logicalXor:()=>kA,losses:()=>ck,lowerBound:()=>w6,matMul:()=>et,math:()=>Uw,max:()=>yn,maxPool:()=>oh,maxPool3d:()=>SA,maxPoolWithArgmax:()=>k6,maximum:()=>oa,mean:()=>Wt,memory:()=>om,meshgrid:()=>S6,metrics:()=>E8,min:()=>Sa,minimum:()=>qc,mirrorPad:()=>IA,mod:()=>ru,model:()=>AG,models:()=>R8,moments:()=>ih,movingAverage:()=>X6,mul:()=>M,multiRNNCell:()=>I6,multinomial:()=>C6,neg:()=>Dt,nextFrame:()=>UA,norm:()=>Gc,notEqual:()=>sl,oneHot:()=>ec,ones:()=>Ds,onesLike:()=>zs,op:()=>B,outerProduct:()=>T6,pad:()=>tr,pad1d:()=>N6,pad2d:()=>E6,pad3d:()=>R6,pad4d:()=>_6,pool:()=>CA,pow:()=>Ia,prelu:()=>uh,print:()=>Ny,prod:()=>TA,profile:()=>_$,raggedGather:()=>D6,raggedTensorToTensor:()=>$6,rand:()=>P6,randomGamma:()=>F6,randomNormal:()=>A0,randomStandardNormal:()=>O6,randomUniform:()=>Xc,range:()=>nc,ready:()=>Yp,real:()=>tc,reciprocal:()=>RA,registerBackend:()=>eu,registerCallbackConstructor:()=>vG,registerGradient:()=>Aw,registerKernel:()=>er,registerOp:()=>hj,regularizers:()=>_8,relu:()=>Lr,relu6:()=>x0,removeBackend:()=>$$,reshape:()=>W,reverse:()=>Js,reverse1d:()=>M6,reverse2d:()=>z6,reverse3d:()=>L6,reverse4d:()=>B6,rfft:()=>ph,round:()=>b0,rsqrt:()=>v0,scalar:()=>Ce,scatterND:()=>K6,scatter_util:()=>Oy,searchSorted:()=>y0,selu:()=>w0,separableConv2d:()=>k0,sequential:()=>xG,serialization:()=>ce,setBackend:()=>Zp,setPlatform:()=>F$,setThreadsCount:()=>Qme,setWasmPath:()=>Jme,setWasmPaths:()=>f2,setWebGLContext:()=>l2,setdiff1dAsync:()=>W6,sigmoid:()=>Mn,sign:()=>_A,signal:()=>uk,sin:()=>S0,sinh:()=>I0,slice:()=>Oe,slice1d:()=>ch,slice2d:()=>C0,slice3d:()=>fi,slice4d:()=>oo,slice_util:()=>Gt,softmax:()=>au,softplus:()=>su,spaceToBatchND:()=>lh,sparse:()=>dk,sparseToDense:()=>Z6,spectral:()=>lk,split:()=>Ht,sqrt:()=>Ln,square:()=>bt,squaredDifference:()=>N0,squeeze:()=>Ge,stack:()=>ln,step:()=>ou,stridedSlice:()=>DA,string:()=>pk,sub:()=>ye,sum:()=>ve,sumOutType:()=>qp,tan:()=>$A,tanh:()=>tl,tensor:()=>Ue,tensor1d:()=>Ot,tensor2d:()=>mr,tensor3d:()=>Py,tensor4d:()=>V6,tensor5d:()=>U6,tensor6d:()=>G6,tensor_util:()=>Dr,test_util:()=>r6,tidy:()=>X,tile:()=>As,time:()=>D$,topk:()=>PA,train:()=>zi,transpose:()=>tt,truncatedNormal:()=>E0,unique:()=>FA,unregisterGradient:()=>tD,unregisterKernel:()=>eD,unsortedSegmentSum:()=>R0,unstack:()=>bn,upcastType:()=>jn,upperBound:()=>H6,util:()=>v,valueAndGrad:()=>aO,valueAndGrads:()=>oO,variable:()=>OA,variableGrads:()=>v6,version:()=>Mh,version_converter:()=>xq,version_core:()=>Wy,version_layers:()=>d5,version_wasm:()=>t0e,version_webgl:()=>qne,webgl:()=>Xne,webgl_util:()=>vI,webgpu_util:()=>nT,where:()=>qn,whereAsync:()=>MA,zeros:()=>Vt,zerosLike:()=>ct});var o_=Object.create,my=Object.defineProperty,i_=Object.getOwnPropertyDescriptor,ew=Object.getOwnPropertyNames,l_=Object.getPrototypeOf,u_=Object.prototype.hasOwnProperty,tw=(e=>typeof Pi!="undefined"?Pi:typeof Proxy!="undefined"?new Proxy(e,{get:(t,n)=>(typeof Pi!="undefined"?Pi:t)[n]}):e)(function(e){if(typeof Pi!="undefined")return Pi.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')}),un=(e,t)=>function(){return t||(0,e[ew(e)[0]])((t={exports:{}}).exports,t),t.exports},We=(e,t)=>{for(var n in t)my(e,n,{get:t[n],enumerable:!0})},c_=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of ew(t))!u_.call(e,r)&&r!==n&&my(e,r,{get:()=>t[r],enumerable:!(s=i_(t,r))||s.enumerable});return e},fo=(e,t,n)=>(n=e!=null?o_(l_(e)):{},c_(t||!e||!e.__esModule?my(n,"default",{value:e,enumerable:!0}):n,e)),d_=un({"node_modules/.pnpm/long@4.0.0/node_modules/long/src/long.js"(e,t){t.exports=s;var n=null;try{n=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch($){}function s($,S,F){this.low=$|0,this.high=S|0,this.unsigned=!!F}s.prototype.__isLong__,Object.defineProperty(s.prototype,"__isLong__",{value:!0});function r($){return($&&$.__isLong__)===!0}s.isLong=r;var a={},o={};function i($,S){var F,z,V;return S?($>>>=0,(V=0<=$&&$<256)&&(z=o[$],z)?z:(F=u($,($|0)<0?-1:0,!0),V&&(o[$]=F),F)):($|=0,(V=-128<=$&&$<128)&&(z=a[$],z)?z:(F=u($,$<0?-1:0,!1),V&&(a[$]=F),F))}s.fromInt=i;function l($,S){if(isNaN($))return S?b:A;if(S){if($<0)return b;if($>=g)return R}else{if($<=-y)return D;if($+1>=y)return N}return $<0?l(-$,S).neg():u($%m|0,$/m|0,S)}s.fromNumber=l;function u($,S,F){return new s($,S,F)}s.fromBits=u;var c=Math.pow;function p($,S,F){if($.length===0)throw Error("empty string");if($==="NaN"||$==="Infinity"||$==="+Infinity"||$==="-Infinity")return A;if(typeof S=="number"?(F=S,S=!1):S=!!S,F=F||10,F<2||360)throw Error("interior hyphen");if(z===0)return p($.substring(1),S,F).neg();for(var V=l(c(F,8)),j=A,G=0;G<$.length;G+=8){var q=Math.min(8,$.length-G),K=parseInt($.substring(G,G+q),F);if(q<8){var ne=l(c(F,q));j=j.mul(ne).add(l(K))}else j=j.mul(V),j=j.add(l(K))}return j.unsigned=S,j}s.fromString=p;function d($,S){return typeof $=="number"?l($,S):typeof $=="string"?p($,S):u($.low,$.high,typeof S=="boolean"?S:$.unsigned)}s.fromValue=d;var h=1<<16,f=1<<24,m=h*h,g=m*m,y=g/2,x=i(f),A=i(0);s.ZERO=A;var b=i(0,!0);s.UZERO=b;var w=i(1);s.ONE=w;var k=i(1,!0);s.UONE=k;var C=i(-1);s.NEG_ONE=C;var N=u(-1,2147483647,!1);s.MAX_VALUE=N;var R=u(-1,-1,!0);s.MAX_UNSIGNED_VALUE=R;var D=u(0,-2147483648,!1);s.MIN_VALUE=D;var E=s.prototype;E.toInt=function(){return this.unsigned?this.low>>>0:this.low},E.toNumber=function(){return this.unsigned?(this.high>>>0)*m+(this.low>>>0):this.high*m+(this.low>>>0)},E.toString=function(S){if(S=S||10,S<2||36>>0,ae=ne.toString(S);if(G=K,G.isZero())return ae+q;for(;ae.length<6;)ae="0"+ae;q=""+ae+q}},E.getHighBits=function(){return this.high},E.getHighBitsUnsigned=function(){return this.high>>>0},E.getLowBits=function(){return this.low},E.getLowBitsUnsigned=function(){return this.low>>>0},E.getNumBitsAbs=function(){if(this.isNegative())return this.eq(D)?64:this.neg().getNumBitsAbs();for(var S=this.high!=0?this.high:this.low,F=31;F>0&&(S&1<=0},E.isOdd=function(){return(this.low&1)===1},E.isEven=function(){return(this.low&1)===0},E.equals=function(S){return r(S)||(S=d(S)),this.unsigned!==S.unsigned&&this.high>>>31===1&&S.high>>>31===1?!1:this.high===S.high&&this.low===S.low},E.eq=E.equals,E.notEquals=function(S){return!this.eq(S)},E.neq=E.notEquals,E.ne=E.notEquals,E.lessThan=function(S){return this.comp(S)<0},E.lt=E.lessThan,E.lessThanOrEqual=function(S){return this.comp(S)<=0},E.lte=E.lessThanOrEqual,E.le=E.lessThanOrEqual,E.greaterThan=function(S){return this.comp(S)>0},E.gt=E.greaterThan,E.greaterThanOrEqual=function(S){return this.comp(S)>=0},E.gte=E.greaterThanOrEqual,E.ge=E.greaterThanOrEqual,E.compare=function(S){if(r(S)||(S=d(S)),this.eq(S))return 0;var F=this.isNegative(),z=S.isNegative();return F&&!z?-1:!F&&z?1:this.unsigned?S.high>>>0>this.high>>>0||S.high===this.high&&S.low>>>0>this.low>>>0?-1:1:this.sub(S).isNegative()?-1:1},E.comp=E.compare,E.negate=function(){return!this.unsigned&&this.eq(D)?D:this.not().add(w)},E.neg=E.negate,E.add=function(S){r(S)||(S=d(S));var F=this.high>>>16,z=this.high&65535,V=this.low>>>16,j=this.low&65535,G=S.high>>>16,q=S.high&65535,K=S.low>>>16,ne=S.low&65535,ae=0,re=0,ue=0,oe=0;return oe+=j+ne,ue+=oe>>>16,oe&=65535,ue+=V+K,re+=ue>>>16,ue&=65535,re+=z+q,ae+=re>>>16,re&=65535,ae+=F+G,ae&=65535,u(ue<<16|oe,ae<<16|re,this.unsigned)},E.subtract=function(S){return r(S)||(S=d(S)),this.add(S.neg())},E.sub=E.subtract,E.multiply=function(S){if(this.isZero())return A;if(r(S)||(S=d(S)),n){var F=n.mul(this.low,this.high,S.low,S.high);return u(F,n.get_high(),this.unsigned)}if(S.isZero())return A;if(this.eq(D))return S.isOdd()?D:A;if(S.eq(D))return this.isOdd()?D:A;if(this.isNegative())return S.isNegative()?this.neg().mul(S.neg()):this.neg().mul(S).neg();if(S.isNegative())return this.mul(S.neg()).neg();if(this.lt(x)&&S.lt(x))return l(this.toNumber()*S.toNumber(),this.unsigned);var z=this.high>>>16,V=this.high&65535,j=this.low>>>16,G=this.low&65535,q=S.high>>>16,K=S.high&65535,ne=S.low>>>16,ae=S.low&65535,re=0,ue=0,oe=0,Ae=0;return Ae+=G*ae,oe+=Ae>>>16,Ae&=65535,oe+=j*ae,ue+=oe>>>16,oe&=65535,oe+=G*ne,ue+=oe>>>16,oe&=65535,ue+=V*ae,re+=ue>>>16,ue&=65535,ue+=j*ne,re+=ue>>>16,ue&=65535,ue+=G*K,re+=ue>>>16,ue&=65535,re+=z*ae+V*ne+j*K+G*q,re&=65535,u(oe<<16|Ae,re<<16|ue,this.unsigned)},E.mul=E.multiply,E.divide=function(S){if(r(S)||(S=d(S)),S.isZero())throw Error("division by zero");if(n){if(!this.unsigned&&this.high===-2147483648&&S.low===-1&&S.high===-1)return this;var F=(this.unsigned?n.div_u:n.div_s)(this.low,this.high,S.low,S.high);return u(F,n.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?b:A;var z,V,j;if(this.unsigned){if(S.unsigned||(S=S.toUnsigned()),S.gt(this))return b;if(S.gt(this.shru(1)))return k;j=b}else{if(this.eq(D)){if(S.eq(w)||S.eq(C))return D;if(S.eq(D))return w;var G=this.shr(1);return z=G.div(S).shl(1),z.eq(A)?S.isNegative()?w:C:(V=this.sub(S.mul(z)),j=z.add(V.div(S)),j)}else if(S.eq(D))return this.unsigned?b:A;if(this.isNegative())return S.isNegative()?this.neg().div(S.neg()):this.neg().div(S).neg();if(S.isNegative())return this.div(S.neg()).neg();j=A}for(V=this;V.gte(S);){z=Math.max(1,Math.floor(V.toNumber()/S.toNumber()));for(var q=Math.ceil(Math.log(z)/Math.LN2),K=q<=48?1:c(2,q-48),ne=l(z),ae=ne.mul(S);ae.isNegative()||ae.gt(V);)z-=K,ne=l(z,this.unsigned),ae=ne.mul(S);ne.isZero()&&(ne=w),j=j.add(ne),V=V.sub(ae)}return j},E.div=E.divide,E.modulo=function(S){if(r(S)||(S=d(S)),n){var F=(this.unsigned?n.rem_u:n.rem_s)(this.low,this.high,S.low,S.high);return u(F,n.get_high(),this.unsigned)}return this.sub(this.div(S).mul(S))},E.mod=E.modulo,E.rem=E.modulo,E.not=function(){return u(~this.low,~this.high,this.unsigned)},E.and=function(S){return r(S)||(S=d(S)),u(this.low&S.low,this.high&S.high,this.unsigned)},E.or=function(S){return r(S)||(S=d(S)),u(this.low|S.low,this.high|S.high,this.unsigned)},E.xor=function(S){return r(S)||(S=d(S)),u(this.low^S.low,this.high^S.high,this.unsigned)},E.shiftLeft=function(S){return r(S)&&(S=S.toInt()),(S&=63)===0?this:S<32?u(this.low<>>32-S,this.unsigned):u(0,this.low<>>S|this.high<<32-S,this.high>>S,this.unsigned):u(this.high>>S-32,this.high>=0?0:-1,this.unsigned)},E.shr=E.shiftRight,E.shiftRightUnsigned=function(S){if(r(S)&&(S=S.toInt()),S&=63,S===0)return this;var F=this.high;if(S<32){var z=this.low;return u(z>>>S|F<<32-S,F>>>S,this.unsigned)}else return S===32?u(F,0,this.unsigned):u(F>>>S-32,0,this.unsigned)},E.shru=E.shiftRightUnsigned,E.shr_u=E.shiftRightUnsigned,E.toSigned=function(){return this.unsigned?u(this.low,this.high,!1):this},E.toUnsigned=function(){return this.unsigned?this:u(this.low,this.high,!0)},E.toBytes=function(S){return S?this.toBytesLE():this.toBytesBE()},E.toBytesLE=function(){var S=this.high,F=this.low;return[F&255,F>>>8&255,F>>>16&255,F>>>24,S&255,S>>>8&255,S>>>16&255,S>>>24]},E.toBytesBE=function(){var S=this.high,F=this.low;return[S>>>24,S>>>16&255,S>>>8&255,S&255,F>>>24,F>>>16&255,F>>>8&255,F&255]},s.fromBytes=function(S,F,z){return z?s.fromBytesLE(S,F):s.fromBytesBE(S,F)},s.fromBytesLE=function(S,F){return new s(S[0]|S[1]<<8|S[2]<<16|S[3]<<24,S[4]|S[5]<<8|S[6]<<16|S[7]<<24,F)},s.fromBytesBE=function(S,F){return new s(S[4]<<24|S[5]<<16|S[6]<<8|S[7],S[0]<<24|S[1]<<16|S[2]<<8|S[3],F)}}}),p_=un({"(disabled):node_modules/.pnpm/node-fetch@2.6.7/node_modules/node-fetch/browser.js"(){}}),h_=un({"(disabled):util"(){}}),f_=un({"node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/alea.js"(e,t){(function(n,s,r){function a(u){var c=this,p=l();c.next=function(){var d=2091639*c.s0+c.c*23283064365386963e-26;return c.s0=c.s1,c.s1=c.s2,c.s2=d-(c.c=d|0)},c.c=1,c.s0=p(" "),c.s1=p(" "),c.s2=p(" "),c.s0-=p(u),c.s0<0&&(c.s0+=1),c.s1-=p(u),c.s1<0&&(c.s1+=1),c.s2-=p(u),c.s2<0&&(c.s2+=1),p=null}function o(u,c){return c.c=u.c,c.s0=u.s0,c.s1=u.s1,c.s2=u.s2,c}function i(u,c){var p=new a(u),d=c&&c.state,h=p.next;return h.int32=function(){return p.next()*4294967296|0},h.double=function(){return h()+(h()*2097152|0)*11102230246251565e-32},h.quick=h,d&&(typeof d=="object"&&o(d,p),h.state=function(){return o(p,{})}),h}function l(){var u=4022871197,c=function(p){p=String(p);for(var d=0;d>>0,h-=u,h*=u,u=h>>>0,h-=u,u+=h*4294967296}return(u>>>0)*23283064365386963e-26};return c}s&&s.exports?s.exports=i:r&&r.amd?r(function(){return i}):this.alea=i})(e,typeof t=="object"&&t,typeof define=="function"&&define)}}),m_=un({"node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/xor128.js"(e,t){(function(n,s,r){function a(l){var u=this,c="";u.x=0,u.y=0,u.z=0,u.w=0,u.next=function(){var d=u.x^u.x<<11;return u.x=u.y,u.y=u.z,u.z=u.w,u.w^=u.w>>>19^d^d>>>8},l===(l|0)?u.x=l:c+=l;for(var p=0;p>>0)/4294967296};return d.double=function(){do var h=c.next()>>>11,f=(c.next()>>>0)/4294967296,m=(h+f)/(1<<21);while(m===0);return m},d.int32=c.next,d.quick=d,p&&(typeof p=="object"&&o(p,c),d.state=function(){return o(c,{})}),d}s&&s.exports?s.exports=i:r&&r.amd?r(function(){return i}):this.xor128=i})(e,typeof t=="object"&&t,typeof define=="function"&&define)}}),g_=un({"node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/xorwow.js"(e,t){(function(n,s,r){function a(l){var u=this,c="";u.next=function(){var d=u.x^u.x>>>2;return u.x=u.y,u.y=u.z,u.z=u.w,u.w=u.v,(u.d=u.d+362437|0)+(u.v=u.v^u.v<<4^(d^d<<1))|0},u.x=0,u.y=0,u.z=0,u.w=0,u.v=0,l===(l|0)?u.x=l:c+=l;for(var p=0;p>>4),u.next()}function o(l,u){return u.x=l.x,u.y=l.y,u.z=l.z,u.w=l.w,u.v=l.v,u.d=l.d,u}function i(l,u){var c=new a(l),p=u&&u.state,d=function(){return(c.next()>>>0)/4294967296};return d.double=function(){do var h=c.next()>>>11,f=(c.next()>>>0)/4294967296,m=(h+f)/(1<<21);while(m===0);return m},d.int32=c.next,d.quick=d,p&&(typeof p=="object"&&o(p,c),d.state=function(){return o(c,{})}),d}s&&s.exports?s.exports=i:r&&r.amd?r(function(){return i}):this.xorwow=i})(e,typeof t=="object"&&t,typeof define=="function"&&define)}}),y_=un({"node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/xorshift7.js"(e,t){(function(n,s,r){function a(l){var u=this;u.next=function(){var p=u.x,d=u.i,h,f,m;return h=p[d],h^=h>>>7,f=h^h<<24,h=p[d+1&7],f^=h^h>>>10,h=p[d+3&7],f^=h^h>>>3,h=p[d+4&7],f^=h^h<<7,h=p[d+7&7],h=h^h<<13,f^=h^h<<9,p[d]=f,u.i=d+1&7,f};function c(p,d){var h,f,m=[];if(d===(d|0))f=m[0]=d;else for(d=""+d,h=0;h0;--h)p.next()}c(u,l)}function o(l,u){return u.x=l.x.slice(),u.i=l.i,u}function i(l,u){l==null&&(l=+new Date);var c=new a(l),p=u&&u.state,d=function(){return(c.next()>>>0)/4294967296};return d.double=function(){do var h=c.next()>>>11,f=(c.next()>>>0)/4294967296,m=(h+f)/(1<<21);while(m===0);return m},d.int32=c.next,d.quick=d,p&&(p.x&&o(p,c),d.state=function(){return o(c,{})}),d}s&&s.exports?s.exports=i:r&&r.amd?r(function(){return i}):this.xorshift7=i})(e,typeof t=="object"&&t,typeof define=="function"&&define)}}),A_=un({"node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/xor4096.js"(e,t){(function(n,s,r){function a(l){var u=this;u.next=function(){var p=u.w,d=u.X,h=u.i,f,m;return u.w=p=p+1640531527|0,m=d[h+34&127],f=d[h=h+1&127],m^=m<<13,f^=f<<17,m^=m>>>15,f^=f>>>12,m=d[h]=m^f,u.i=h,m+(p^p>>>16)|0};function c(p,d){var h,f,m,g,y,x=[],A=128;for(d===(d|0)?(f=d,d=null):(d=d+"\0",f=0,A=Math.max(A,d.length)),m=0,g=-32;g>>15,f^=f<<4,f^=f>>>13,g>=0&&(y=y+1640531527|0,h=x[g&127]^=f+y,m=h==0?m+1:0);for(m>=128&&(x[(d&&d.length||0)&127]=-1),m=127,g=4*128;g>0;--g)f=x[m+34&127],h=x[m=m+1&127],f^=f<<13,h^=h<<17,f^=f>>>15,h^=h>>>12,x[m]=f^h;p.w=y,p.X=x,p.i=m}c(u,l)}function o(l,u){return u.i=l.i,u.w=l.w,u.X=l.X.slice(),u}function i(l,u){l==null&&(l=+new Date);var c=new a(l),p=u&&u.state,d=function(){return(c.next()>>>0)/4294967296};return d.double=function(){do var h=c.next()>>>11,f=(c.next()>>>0)/4294967296,m=(h+f)/(1<<21);while(m===0);return m},d.int32=c.next,d.quick=d,p&&(p.X&&o(p,c),d.state=function(){return o(c,{})}),d}s&&s.exports?s.exports=i:r&&r.amd?r(function(){return i}):this.xor4096=i})(e,typeof t=="object"&&t,typeof define=="function"&&define)}}),x_=un({"node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/lib/tychei.js"(e,t){(function(n,s,r){function a(l){var u=this,c="";u.next=function(){var d=u.b,h=u.c,f=u.d,m=u.a;return d=d<<25^d>>>7^h,h=h-f|0,f=f<<24^f>>>8^m,m=m-d|0,u.b=d=d<<20^d>>>12^h,u.c=h=h-f|0,u.d=f<<16^h>>>16^m,u.a=m-d|0},u.a=0,u.b=0,u.c=-1640531527,u.d=1367130551,l===Math.floor(l)?(u.a=l/4294967296|0,u.b=l|0):c+=l;for(var p=0;p>>0)/4294967296};return d.double=function(){do var h=c.next()>>>11,f=(c.next()>>>0)/4294967296,m=(h+f)/(1<<21);while(m===0);return m},d.int32=c.next,d.quick=d,p&&(typeof p=="object"&&o(p,c),d.state=function(){return o(c,{})}),d}s&&s.exports?s.exports=i:r&&r.amd?r(function(){return i}):this.tychei=i})(e,typeof t=="object"&&t,typeof define=="function"&&define)}}),b_=un({"(disabled):crypto"(){}}),v_=un({"node_modules/.pnpm/seedrandom@3.0.5/node_modules/seedrandom/seedrandom.js"(e,t){(function(n,s,r){var a=256,o=6,i=52,l="random",u=r.pow(a,o),c=r.pow(2,i),p=c*2,d=a-1,h;function f(w,k,C){var N=[];k=k==!0?{entropy:!0}:k||{};var R=x(y(k.entropy?[w,b(s)]:w==null?A():w,3),N),D=new m(N),E=function(){for(var $=D.g(o),S=u,F=0;$=p;)$/=2,S/=2,F>>>=1;return($+F)/S};return E.int32=function(){return D.g(4)|0},E.quick=function(){return D.g(4)/4294967296},E.double=E,x(b(D.S),s),(k.pass||C||function($,S,F,z){return z&&(z.S&&g(z,D),$.state=function(){return g(D,{})}),F?(r[l]=$,S):$})(E,R,"global"in k?k.global:this==r,k.state)}function m(w){var k,C=w.length,N=this,R=0,D=N.i=N.j=0,E=N.S=[];for(C||(w=[C++]);R{var s=typeof document!="undefined"&&document.currentScript?document.currentScript.src:void 0;return typeof __filename!="undefined"&&(s=s||__filename),function(r){r=r||{};function a(){return Q.buffer!=Qe&&Rt(Q.buffer),kt}function o(){return Q.buffer!=Qe&&Rt(Q.buffer),Cs}function i(){return Q.buffer!=Qe&&Rt(Q.buffer),Kt}function l(){return Q.buffer!=Qe&&Rt(Q.buffer),Pn}function u(){return Q.buffer!=Qe&&Rt(Q.buffer),ir}function c(){return Q.buffer!=Qe&&Rt(Q.buffer),es}function p(){return Q.buffer!=Qe&&Rt(Q.buffer),Ts}var d=typeof r!="undefined"?r:{},h,f;d.ready=new Promise(function(O,Z){h=O,f=Z});var m;typeof process!="undefined"&&process.listeners&&(m={uncaughtException:process.listeners("uncaughtException"),unhandledRejection:process.listeners("unhandledRejection")});var g=Object.assign({},d),y=[],x="./this.program",A=(O,Z)=>{throw Z},b=typeof window=="object",w=typeof importScripts=="function",k=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",C=d.ENVIRONMENT_IS_PTHREAD||!1,N="";function R(O){return d.locateFile?d.locateFile(O,N):N+O}var D,E,$,S;function F(O){if(O instanceof Di)return;K("exiting due to exception: "+O)}if(k){w?N=Jf().dirname(N)+"/":N=__dirname+"/";var z,V;typeof tw=="function"&&(z=gy(),V=Jf()),D=(Z,fe)=>(Z=V.normalize(Z),z.readFileSync(Z,fe?void 0:"utf8")),$=Z=>{var fe=D(Z,!0);return fe.buffer||(fe=new Uint8Array(fe)),fe},E=(Z,fe,xe)=>{Z=V.normalize(Z),z.readFile(Z,function(Pe,lt){Pe?xe(Pe):fe(lt.buffer)})},process.argv.length>1&&(x=process.argv[1].replace(/\\/g,"/")),y=process.argv.slice(2),process.on("uncaughtException",function(Z){if(!(Z instanceof Di))throw Z}),process.on("unhandledRejection",function(Z){throw Z}),A=(Z,fe)=>{if(ur())throw process.exitCode=Z,fe;F(fe),process.exit(Z)},d.inspect=function(){return"[Emscripten Module object]"};let O;try{O=w_()}catch(Z){throw console.error('The "worker_threads" module is not supported in this node.js build - perhaps a newer version is needed?'),Z}global.Worker=O.Worker}else(b||w)&&(w?N=self.location.href:typeof document!="undefined"&&document.currentScript&&(N=document.currentScript.src),typeof s!="undefined"&&s&&(N=s),N.indexOf("blob:")!==0?N=N.substr(0,N.replace(/[?#].*/,"").lastIndexOf("/")+1):N="",k||(D=O=>{var Z=new XMLHttpRequest;return Z.open("GET",O,!1),Z.send(null),Z.responseText},w&&($=O=>{var Z=new XMLHttpRequest;return Z.open("GET",O,!1),Z.responseType="arraybuffer",Z.send(null),new Uint8Array(Z.response)}),E=(O,Z,fe)=>{var xe=new XMLHttpRequest;xe.open("GET",O,!0),xe.responseType="arraybuffer",xe.onload=()=>{if(xe.status==200||xe.status==0&&xe.response){Z(xe.response);return}fe()},xe.onerror=fe,xe.send(null)}),S=O=>document.title=O);k&&typeof performance=="undefined"&&(global.performance=k_().performance);var j=console.log.bind(console),G=console.warn.bind(console);k&&(j=O=>z.writeSync(1,O+` +`),G=O=>z.writeSync(2,O+` +`));var q=d.print||j,K=d.printErr||G;Object.assign(d,g),g=null,d.arguments&&(y=d.arguments),d.thisProgram&&(x=d.thisProgram),d.quit&&(A=d.quit);var ne=4,ae=Atomics.load,re=Atomics.store,ue=Atomics.compareExchange,oe;d.wasmBinary&&(oe=d.wasmBinary);var Ae=d.noExitRuntime||!0;typeof WebAssembly!="object"&&Ru("no native wasm support detected");var Q,Ie,Se=!1,Fe;function $e(O,Z){O||Ru(Z)}var rt=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0;function mt(O,Z,fe){for(var xe=Z+fe,Pe=Z;O[Pe]&&!(Pe>=xe);)++Pe;if(Pe-Z>16&&O.buffer&&rt)return rt.decode(O.buffer instanceof SharedArrayBuffer?O.slice(Z,Pe):O.subarray(Z,Pe));for(var lt="";Z>10,56320|Xs&1023)}}return lt}function gt(O,Z){return O?mt(o(),O,Z):""}function yt(O,Z,fe,xe){if(!(xe>0))return 0;for(var Pe=fe,lt=fe+xe-1,Ve=0;Ve=55296&&qe<=57343){var sn=O.charCodeAt(++Ve);qe=65536+((qe&1023)<<10)|sn&1023}if(qe<=127){if(fe>=lt)break;Z[fe++]=qe}else if(qe<=2047){if(fe+1>=lt)break;Z[fe++]=192|qe>>6,Z[fe++]=128|qe&63}else if(qe<=65535){if(fe+2>=lt)break;Z[fe++]=224|qe>>12,Z[fe++]=128|qe>>6&63,Z[fe++]=128|qe&63}else{if(fe+3>=lt)break;Z[fe++]=240|qe>>18,Z[fe++]=128|qe>>12&63,Z[fe++]=128|qe>>6&63,Z[fe++]=128|qe&63}}return Z[fe]=0,fe-Pe}function ht(O,Z,fe){return yt(O,o(),Z,fe)}var Qe,kt,Cs,Kt,or,Pn,ir,es,Ts;C&&(Qe=d.buffer);function Rt(O){Qe=O,d.HEAP8=kt=new Int8Array(O),d.HEAP16=Kt=new Int16Array(O),d.HEAP32=Pn=new Int32Array(O),d.HEAPU8=Cs=new Uint8Array(O),d.HEAPU16=or=new Uint16Array(O),d.HEAPU32=ir=new Uint32Array(O),d.HEAPF32=es=new Float32Array(O),d.HEAPF64=Ts=new Float64Array(O)}var ms=d.INITIAL_MEMORY||16777216;if(C)Q=d.wasmMemory,Qe=d.buffer;else if(d.wasmMemory)Q=d.wasmMemory;else if(Q=new WebAssembly.Memory({initial:ms/65536,maximum:32768,shared:!0}),!(Q.buffer instanceof SharedArrayBuffer))throw K("requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag"),k&&console.log("(on node you may need: --experimental-wasm-threads --experimental-wasm-bulk-memory and also use a recent version)"),Error("bad memory");Q&&(Qe=Q.buffer),ms=Qe.byteLength,Rt(Qe);var Un,Hr=[],Wa=[],lr=[],_d=!1;function ur(){return Ae}function Nu(){if(d.preRun)for(typeof d.preRun=="function"&&(d.preRun=[d.preRun]);d.preRun.length;)c1(d.preRun.shift());Fd(Hr)}function Sn(){_d=!0,!C&&Fd(Wa)}function Qh(){if(!C){if(d.postRun)for(typeof d.postRun=="function"&&(d.postRun=[d.postRun]);d.postRun.length;)H4(d.postRun.shift());Fd(lr)}}function c1(O){Hr.unshift(O)}function d1(O){Wa.unshift(O)}function H4(O){lr.unshift(O)}var Va=0,Eu=null,da=null;function j4(O){Va++,d.monitorRunDependencies&&d.monitorRunDependencies(Va)}function q4(O){if(Va--,d.monitorRunDependencies&&d.monitorRunDependencies(Va),Va==0&&(Eu!==null&&(clearInterval(Eu),Eu=null),da)){var Z=da;da=null,Z()}}function Ru(O){C?postMessage({cmd:"onAbort",arg:O}):d.onAbort&&d.onAbort(O),O="Aborted("+O+")",K(O),Se=!0,Fe=1,O+=". Build with -sASSERTIONS for more info.";var Z=new WebAssembly.RuntimeError(O);throw f(Z),Z}var p1="data:application/octet-stream;base64,";function ef(O){return O.startsWith(p1)}function Dd(O){return O.startsWith("file://")}var ts;ts="tfjs-backend-wasm-threaded-simd.wasm",ef(ts)||(ts=R(ts));function tf(O){try{if(O==ts&&oe)return new Uint8Array(oe);if($)return $(O);throw"both async and sync fetching of the wasm failed"}catch(Z){Ru(Z)}}function h1(){if(!oe&&(b||w)){if(typeof fetch=="function"&&!Dd(ts))return fetch(ts,{credentials:"same-origin"}).then(function(O){if(!O.ok)throw"failed to load wasm binary file at '"+ts+"'";return O.arrayBuffer()}).catch(function(){return tf(ts)});if(E)return new Promise(function(O,Z){E(ts,function(fe){O(new Uint8Array(fe))},Z)})}return Promise.resolve().then(function(){return tf(ts)})}function f1(){var O={env:ff,wasi_snapshot_preview1:ff};function Z(Ve,qe){var sn=Ve.exports;if(d.asm=sn,S1(d.asm._emscripten_tls_init),Un=d.asm.__indirect_function_table,d1(d.asm.__wasm_call_ctors),Ie=qe,!C){var Xs=je.unusedWorkers.length;je.unusedWorkers.forEach(function(ha){je.loadWasmModuleToWorker(ha,function(){--Xs||q4("wasm-instantiate")})})}}C||j4("wasm-instantiate");function fe(Ve){Z(Ve.instance,Ve.module)}function xe(Ve){return h1().then(function(qe){return WebAssembly.instantiate(qe,O)}).then(function(qe){return qe}).then(Ve,function(qe){K("failed to asynchronously prepare wasm: "+qe),Ru(qe)})}function Pe(){return!oe&&typeof WebAssembly.instantiateStreaming=="function"&&!ef(ts)&&!Dd(ts)&&!k&&typeof fetch=="function"?fetch(ts,{credentials:"same-origin"}).then(function(Ve){var qe=WebAssembly.instantiateStreaming(Ve,O);return qe.then(fe,function(sn){return K("wasm streaming compile failed: "+sn),K("falling back to ArrayBuffer instantiation"),xe(fe)})}):xe(fe)}if(d.instantiateWasm)try{var lt=d.instantiateWasm(O,Z);return lt}catch(Ve){K("Module.instantiateWasm callback failed with error: "+Ve),f(Ve)}return Pe().catch(f),{}}var m1,X4,g1={};function Di(O){this.name="ExitStatus",this.message="Program terminated with exit("+O+")",this.status=O}function y1(O){var Z=je.pthreads[O];delete je.pthreads[O],Z.terminate(),jg(O),je.runningWorkers.splice(je.runningWorkers.indexOf(Z),1),Z.pthread_ptr=0}function A1(O){var Z=je.pthreads[O];Z.postMessage({cmd:"cancel"})}function $d(O){var Z=je.pthreads[O];$e(Z),je.returnWorkerToPool(Z)}function nf(O){var Z=je.getNewWorker();if(!Z)return 6;je.runningWorkers.push(Z),je.pthreads[O.pthread_ptr]=Z,Z.pthread_ptr=O.pthread_ptr;var fe={cmd:"run",start_routine:O.startRoutine,arg:O.arg,pthread_ptr:O.pthread_ptr};return Z.runPthread=()=>{fe.time=performance.now(),Z.postMessage(fe,O.transferList)},Z.loaded&&(Z.runPthread(),delete Z.runPthread),0}var sf={varargs:void 0,get:function(){sf.varargs+=4;var O=l()[sf.varargs-4>>2];return O},getStr:function(O){var Z=gt(O);return Z}};function Pd(O){if(C)return Ua(1,1,O);Fe=O,ur()||(je.terminateAllThreads(),d.onExit&&d.onExit(O),Se=!0),A(O,new Di(O))}function K4(O,Z){if(Fe=O,!Z&&C)throw af(O),"unwind";Pd(O)}var rf=K4;function x1(O){if(O instanceof Di||O=="unwind")return Fe;A(1,O)}var je={unusedWorkers:[],runningWorkers:[],tlsInitFunctions:[],pthreads:{},init:function(){C?je.initWorker():je.initMainThread()},initMainThread:function(){for(var O=8;O--;)je.allocateUnusedWorker()},initWorker:function(){Ae=!1},setExitStatus:function(O){Fe=O},terminateAllThreads:function(){for(var O of Object.values(je.pthreads))je.returnWorkerToPool(O);for(var O of je.unusedWorkers)O.terminate();je.unusedWorkers=[]},returnWorkerToPool:function(O){var Z=O.pthread_ptr;delete je.pthreads[Z],je.unusedWorkers.push(O),je.runningWorkers.splice(je.runningWorkers.indexOf(O),1),O.pthread_ptr=0,jg(Z)},receiveObjectTransfer:function(O){},threadInitTLS:function(){je.tlsInitFunctions.forEach(O=>O())},loadWasmModuleToWorker:function(O,Z){O.onmessage=fe=>{var xe=fe.data,Pe=xe.cmd;if(O.pthread_ptr&&(je.currentProxiedOperationCallerThread=O.pthread_ptr),xe.targetThread&&xe.targetThread!=bf()){var lt=je.pthreads[xe.targetThread];lt?lt.postMessage(xe,xe.transferList):K('Internal error! Worker sent a message "'+Pe+'" to target pthread '+xe.targetThread+", but that thread no longer exists!"),je.currentProxiedOperationCallerThread=void 0;return}Pe==="processProxyingQueue"?Od(xe.queue):Pe==="spawnThread"?nf(xe):Pe==="cleanupThread"?$d(xe.thread):Pe==="killThread"?y1(xe.thread):Pe==="cancelThread"?A1(xe.thread):Pe==="loaded"?(O.loaded=!0,Z&&Z(O),O.runPthread&&(O.runPthread(),delete O.runPthread)):Pe==="print"?q("Thread "+xe.threadId+": "+xe.text):Pe==="printErr"?K("Thread "+xe.threadId+": "+xe.text):Pe==="alert"?alert("Thread "+xe.threadId+": "+xe.text):xe.target==="setimmediate"?O.postMessage(xe):Pe==="onAbort"?d.onAbort&&d.onAbort(xe.arg):Pe&&K("worker sent an unknown command "+Pe),je.currentProxiedOperationCallerThread=void 0},O.onerror=fe=>{var xe="worker sent an error!";throw K(xe+" "+fe.filename+":"+fe.lineno+": "+fe.message),fe},k&&(O.on("message",function(fe){O.onmessage({data:fe})}),O.on("error",function(fe){O.onerror(fe)}),O.on("detachedExit",function(){})),O.postMessage({cmd:"load",urlOrBlob:d.mainScriptUrlOrBlob||s,wasmMemory:Q,wasmModule:Ie})},allocateUnusedWorker:function(){var O=R("tfjs-backend-wasm-threaded-simd.worker.js");je.unusedWorkers.push(new Worker(O))},getNewWorker:function(){return je.unusedWorkers.length==0&&(je.allocateUnusedWorker(),je.loadWasmModuleToWorker(je.unusedWorkers[0])),je.unusedWorkers.pop()}};d.PThread=je;function Fd(O){for(;O.length>0;)O.shift()(d)}function b1(O){var Z=qg(),fe=O();return vf(Z),fe}function Z4(O){return O}function Y4(O){var Z=/\b_Z[\w\d_]+/g;return O.replace(Z,function(fe){var xe=fe;return fe===xe?fe:xe+" ["+fe+"]"})}function v1(){var O=bf(),Z=l()[O+44>>2],fe=l()[O+48>>2],xe=Z-fe;rv(Z,xe),vf(Z)}d.establishStackSpace=v1;function af(O){if(C)return Ua(2,0,O);try{rf(O)}catch(Z){x1(Z)}}var _u=[];function w1(O){var Z=_u[O];return Z||(O>=_u.length&&(_u.length=O+1),_u[O]=Z=Un.get(O)),Z}function k1(O,Z){var fe=w1(O)(Z);ur()?je.setExitStatus(fe):sv(fe)}d.invokeEntryPoint=k1;function J4(){var O=new Error;if(!O.stack){try{throw new Error}catch(Z){O=Z}if(!O.stack)return"(no stack trace available)"}return O.stack.toString()}function S1(O){je.tlsInitFunctions.push(O)}function I1(O,Z){a().set(O,Z)}function C1(O){ev(O,!w,1,!b),je.threadInitTLS()}function T1(O){C?postMessage({cmd:"cleanupThread",thread:O}):$d(O)}function of(O,Z,fe,xe){return C?Ua(3,1,O,Z,fe,xe):lf(O,Z,fe,xe)}function lf(O,Z,fe,xe){if(typeof SharedArrayBuffer=="undefined")return K("Current environment does not support SharedArrayBuffer, pthreads are not available!"),6;var Pe=[],lt=0;if(C&&(Pe.length===0||lt))return of(O,Z,fe,xe);if(lt)return lt;var Ve={startRoutine:fe,pthread_ptr:O,arg:xe,transferList:Pe};return C?(Ve.cmd="spawnThread",postMessage(Ve,Pe),0):nf(Ve)}function N1(){return 2097152}var E1=!0;function R1(){return E1}function Od(O){Atomics.store(l(),O>>2,1),bf()&&nv(O),Atomics.compareExchange(l(),O>>2,1,0)}d.executeNotifiedProxyingQueue=Od;function _1(O,Z,fe,xe){if(O==Z)setTimeout(()=>Od(xe));else if(C)postMessage({targetThread:O,cmd:"processProxyingQueue",queue:xe});else{var Pe=je.pthreads[O];if(!Pe)return;Pe.postMessage({cmd:"processProxyingQueue",queue:xe})}return 1}function D1(O,Z,fe){return-1}function $1(){Ru("")}function $i(O){$i.shown||($i.shown={}),$i.shown[O]||($i.shown[O]=1,k&&(O="warning: "+O),K(O))}function P1(){k||w||$i("Blocking on the main thread is very dangerous, see https://emscripten.org/docs/porting/pthreads.html#blocking-on-the-main-browser-thread")}function F1(){return Date.now()}function uf(){return 2147483648}function O1(){return uf()}var Du;k?Du=()=>{var O=process.hrtime();return O[0]*1e3+O[1]/1e6}:C?Du=()=>performance.now()-d.__performance_now_clock_drift:Du=()=>performance.now();function M1(O,Z,fe){o().copyWithin(O,Z,Z+fe)}function z1(){return k?S_().cpus().length:navigator.hardwareConcurrency}function Ua(O,Z){var fe=arguments.length-2,xe=arguments;return b1(()=>{for(var Pe=fe,lt=wf(Pe*8),Ve=lt>>3,qe=0;qe>3,Pe=0;Pe>>16),Rt(Q.buffer),1}catch(Z){}}function W1(O){var Z=o().length;if(O=O>>>0,O<=Z)return!1;var fe=uf();if(O>fe)return!1;let xe=(sn,Xs)=>sn+(Xs-sn%Xs)%Xs;for(var Pe=1;Pe<=4;Pe*=2){var lt=Z*(1+.2/Pe);lt=Math.min(lt,O+100663296);var Ve=Math.min(fe,xe(Math.max(O,lt),65536)),qe=B1(Ve);if(qe)return!0}return!1}function V1(){throw"unwind"}function cf(O){return C?Ua(4,1,O):52}function df(O,Z,fe,xe,Pe){return C?Ua(5,1,O,Z,fe,xe,Pe):70}var U1=[null,[],[]];function G1(O,Z){var fe=U1[O];Z===0||Z===10?((O===1?q:K)(mt(fe,0)),fe.length=0):fe.push(Z)}function pf(O,Z,fe,xe){if(C)return Ua(6,1,O,Z,fe,xe);for(var Pe=0,lt=0;lt>2],qe=u()[Z+4>>2];Z+=8;for(var sn=0;sn>2]=Pe,0}function hf(O){var Z=d["_"+O];return Z}function H1(O,Z,fe,xe,Pe){var lt={string:Ns=>{var Ou=0;if(Ns!=null&&Ns!==0){var iv=(Ns.length<<2)+1;Ou=wf(iv),ht(Ns,Ou,iv)}return Ou},array:Ns=>{var Ou=wf(Ns.length);return I1(Ns,Ou),Ou}};function Ve(Ns){return Z==="string"?gt(Ns):Z==="boolean"?Boolean(Ns):Ns}var qe=hf(O),sn=[],Xs=0;if(xe)for(var ha=0;haVe==="number"||Ve==="boolean"),lt=Z!=="string";return lt&&Pe&&!xe?hf(O):function(){return H1(O,Z,fe,arguments,xe)}}je.init();var q1=[null,Pd,af,of,cf,df,pf],ff={__emscripten_init_main_thread_js:C1,__emscripten_thread_cleanup:T1,__pthread_create_js:lf,_emscripten_default_pthread_stack_size:N1,_emscripten_get_now_is_monotonic:R1,_emscripten_notify_task_queue:_1,_emscripten_set_offscreencanvas_size:D1,abort:$1,emscripten_check_blocking_allowed:P1,emscripten_date_now:F1,emscripten_get_heap_max:O1,emscripten_get_now:Du,emscripten_memcpy_big:M1,emscripten_num_logical_cores:z1,emscripten_receive_on_main_thread_js:L1,emscripten_resize_heap:W1,emscripten_unwind_to_js_event_loop:V1,exit:rf,fd_close:cf,fd_seek:df,fd_write:pf,memory:Q||d.wasmMemory},Q4=f1(),X1=d.___wasm_call_ctors=function(){return(X1=d.___wasm_call_ctors=d.asm.__wasm_call_ctors).apply(null,arguments)},K1=d._init=function(){return(K1=d._init=d.asm.init).apply(null,arguments)},Z1=d._init_with_threads_count=function(){return(Z1=d._init_with_threads_count=d.asm.init_with_threads_count).apply(null,arguments)},Y1=d._get_threads_count=function(){return(Y1=d._get_threads_count=d.asm.get_threads_count).apply(null,arguments)},J1=d._register_tensor=function(){return(J1=d._register_tensor=d.asm.register_tensor).apply(null,arguments)},Q1=d._dispose_data=function(){return(Q1=d._dispose_data=d.asm.dispose_data).apply(null,arguments)},eg=d._dispose=function(){return(eg=d._dispose=d.asm.dispose).apply(null,arguments)},tg=d._Abs=function(){return(tg=d._Abs=d.asm.Abs).apply(null,arguments)},ng=d._Add=function(){return(ng=d._Add=d.asm.Add).apply(null,arguments)},sg=d._AddN=function(){return(sg=d._AddN=d.asm.AddN).apply(null,arguments)},rg=d._All=function(){return(rg=d._All=d.asm.All).apply(null,arguments)},ag=d._Any=function(){return(ag=d._Any=d.asm.Any).apply(null,arguments)},og=d._ArgMax=function(){return(og=d._ArgMax=d.asm.ArgMax).apply(null,arguments)},ig=d._AvgPool=function(){return(ig=d._AvgPool=d.asm.AvgPool).apply(null,arguments)},lg=d._BatchMatMul=function(){return(lg=d._BatchMatMul=d.asm.BatchMatMul).apply(null,arguments)},ug=d._Ceil=function(){return(ug=d._Ceil=d.asm.Ceil).apply(null,arguments)},cg=d._ClipByValue=function(){return(cg=d._ClipByValue=d.asm.ClipByValue).apply(null,arguments)},dg=d._Conv2D=function(){return(dg=d._Conv2D=d.asm.Conv2D).apply(null,arguments)},pg=d._Conv2DBackpropInput=function(){return(pg=d._Conv2DBackpropInput=d.asm.Conv2DBackpropInput).apply(null,arguments)},hg=d._Cos=function(){return(hg=d._Cos=d.asm.Cos).apply(null,arguments)},fg=d._Cosh=function(){return(fg=d._Cosh=d.asm.Cosh).apply(null,arguments)},mg=d._CropAndResize=function(){return(mg=d._CropAndResize=d.asm.CropAndResize).apply(null,arguments)},gg=d._Cumprod=function(){return(gg=d._Cumprod=d.asm.Cumprod).apply(null,arguments)},yg=d._Cumsum=function(){return(yg=d._Cumsum=d.asm.Cumsum).apply(null,arguments)},Ag=d._DepthToSpace=function(){return(Ag=d._DepthToSpace=d.asm.DepthToSpace).apply(null,arguments)},xg=d._DepthwiseConv2dNative=function(){return(xg=d._DepthwiseConv2dNative=d.asm.DepthwiseConv2dNative).apply(null,arguments)},bg=d._Elu=function(){return(bg=d._Elu=d.asm.Elu).apply(null,arguments)},vg=d._Equal=function(){return(vg=d._Equal=d.asm.Equal).apply(null,arguments)},wg=d._Exp=function(){return(wg=d._Exp=d.asm.Exp).apply(null,arguments)},kg=d._FlipLeftRight=function(){return(kg=d._FlipLeftRight=d.asm.FlipLeftRight).apply(null,arguments)},Sg=d._Floor=function(){return(Sg=d._Floor=d.asm.Floor).apply(null,arguments)},Ig=d._FloorDiv=function(){return(Ig=d._FloorDiv=d.asm.FloorDiv).apply(null,arguments)},Cg=d._FusedBatchNorm=function(){return(Cg=d._FusedBatchNorm=d.asm.FusedBatchNorm).apply(null,arguments)},Tg=d._FusedConv2D=function(){return(Tg=d._FusedConv2D=d.asm.FusedConv2D).apply(null,arguments)},Ng=d._FusedDepthwiseConv2D=function(){return(Ng=d._FusedDepthwiseConv2D=d.asm.FusedDepthwiseConv2D).apply(null,arguments)},Eg=d._Gather=function(){return(Eg=d._Gather=d.asm.Gather).apply(null,arguments)},Rg=d._GatherNd=function(){return(Rg=d._GatherNd=d.asm.GatherNd).apply(null,arguments)},_g=d._Greater=function(){return(_g=d._Greater=d.asm.Greater).apply(null,arguments)},Dg=d._GreaterEqual=function(){return(Dg=d._GreaterEqual=d.asm.GreaterEqual).apply(null,arguments)},$g=d._LeakyRelu=function(){return($g=d._LeakyRelu=d.asm.LeakyRelu).apply(null,arguments)},Pg=d._Less=function(){return(Pg=d._Less=d.asm.Less).apply(null,arguments)},Fg=d._LessEqual=function(){return(Fg=d._LessEqual=d.asm.LessEqual).apply(null,arguments)},Og=d._Log=function(){return(Og=d._Log=d.asm.Log).apply(null,arguments)},Mg=d._LogicalAnd=function(){return(Mg=d._LogicalAnd=d.asm.LogicalAnd).apply(null,arguments)},zg=d._LogicalNot=function(){return(zg=d._LogicalNot=d.asm.LogicalNot).apply(null,arguments)},Lg=d._LogicalOr=function(){return(Lg=d._LogicalOr=d.asm.LogicalOr).apply(null,arguments)},Bg=d._LogicalXor=function(){return(Bg=d._LogicalXor=d.asm.LogicalXor).apply(null,arguments)},Wg=d._Max=function(){return(Wg=d._Max=d.asm.Max).apply(null,arguments)},mf=d._MaxPool=function(){return(mf=d._MaxPool=d.asm.MaxPool).apply(null,arguments)},gf=d._Maximum=function(){return(gf=d._Maximum=d.asm.Maximum).apply(null,arguments)},zd=d._Mean=function(){return(zd=d._Mean=d.asm.Mean).apply(null,arguments)},Vg=d._Min=function(){return(Vg=d._Min=d.asm.Min).apply(null,arguments)},Ug=d._Minimum=function(){return(Ug=d._Minimum=d.asm.Minimum).apply(null,arguments)},$u=d._MirrorPad=function(){return($u=d._MirrorPad=d.asm.MirrorPad).apply(null,arguments)},yf=d._Multiply=function(){return(yf=d._Multiply=d.asm.Multiply).apply(null,arguments)},Pu=d._Neg=function(){return(Pu=d._Neg=d.asm.Neg).apply(null,arguments)},Fu=d._NonMaxSuppressionV3=function(){return(Fu=d._NonMaxSuppressionV3=d.asm.NonMaxSuppressionV3).apply(null,arguments)},Gg=d._NonMaxSuppressionV4=function(){return(Gg=d._NonMaxSuppressionV4=d.asm.NonMaxSuppressionV4).apply(null,arguments)},te=d._NonMaxSuppressionV5=function(){return(te=d._NonMaxSuppressionV5=d.asm.NonMaxSuppressionV5).apply(null,arguments)},he=d._NotEqual=function(){return(he=d._NotEqual=d.asm.NotEqual).apply(null,arguments)},Re=d._OneHot=function(){return(Re=d._OneHot=d.asm.OneHot).apply(null,arguments)},ot=d._PadV2=function(){return(ot=d._PadV2=d.asm.PadV2).apply(null,arguments)},$t=d._Pow=function(){return($t=d._Pow=d.asm.Pow).apply(null,arguments)},Pt=d._Prelu=function(){return(Pt=d._Prelu=d.asm.Prelu).apply(null,arguments)},at=d._Prod=function(){return(at=d._Prod=d.asm.Prod).apply(null,arguments)},nt=d._RealDiv=function(){return(nt=d._RealDiv=d.asm.RealDiv).apply(null,arguments)},nn=d._Relu=function(){return(nn=d._Relu=d.asm.Relu).apply(null,arguments)},qs=d._Relu6=function(){return(qs=d._Relu6=d.asm.Relu6).apply(null,arguments)},pa=d._ResizeBilinear=function(){return(pa=d._ResizeBilinear=d.asm.ResizeBilinear).apply(null,arguments)},Af=d._ResizeNearestNeighbor=function(){return(Af=d._ResizeNearestNeighbor=d.asm.ResizeNearestNeighbor).apply(null,arguments)},Ld=d._Reverse=function(){return(Ld=d._Reverse=d.asm.Reverse).apply(null,arguments)},Hg=d._RotateWithOffset=function(){return(Hg=d._RotateWithOffset=d.asm.RotateWithOffset).apply(null,arguments)},ns=d._Round=function(){return(ns=d._Round=d.asm.Round).apply(null,arguments)},Ga=d._Rsqrt=function(){return(Ga=d._Rsqrt=d.asm.Rsqrt).apply(null,arguments)},xf=d._ScatterNd=function(){return(xf=d._ScatterNd=d.asm.ScatterNd).apply(null,arguments)},vR=d._SelectV2=function(){return(vR=d._SelectV2=d.asm.SelectV2).apply(null,arguments)},wR=d._Sigmoid=function(){return(wR=d._Sigmoid=d.asm.Sigmoid).apply(null,arguments)},kR=d._Sin=function(){return(kR=d._Sin=d.asm.Sin).apply(null,arguments)},SR=d._Softmax=function(){return(SR=d._Softmax=d.asm.Softmax).apply(null,arguments)},IR=d._SparseFillEmptyRows=function(){return(IR=d._SparseFillEmptyRows=d.asm.SparseFillEmptyRows).apply(null,arguments)},CR=d._SparseReshape=function(){return(CR=d._SparseReshape=d.asm.SparseReshape).apply(null,arguments)},TR=d._SparseSegmentReduction=function(){return(TR=d._SparseSegmentReduction=d.asm.SparseSegmentReduction).apply(null,arguments)},NR=d._Sqrt=function(){return(NR=d._Sqrt=d.asm.Sqrt).apply(null,arguments)},ER=d._Square=function(){return(ER=d._Square=d.asm.Square).apply(null,arguments)},RR=d._SquaredDifference=function(){return(RR=d._SquaredDifference=d.asm.SquaredDifference).apply(null,arguments)},_R=d._Step=function(){return(_R=d._Step=d.asm.Step).apply(null,arguments)},DR=d._StridedSlice=function(){return(DR=d._StridedSlice=d.asm.StridedSlice).apply(null,arguments)},$R=d._Sub=function(){return($R=d._Sub=d.asm.Sub).apply(null,arguments)},PR=d._Sum=function(){return(PR=d._Sum=d.asm.Sum).apply(null,arguments)},FR=d._Tan=function(){return(FR=d._Tan=d.asm.Tan).apply(null,arguments)},OR=d._Tanh=function(){return(OR=d._Tanh=d.asm.Tanh).apply(null,arguments)},MR=d._Tile=function(){return(MR=d._Tile=d.asm.Tile).apply(null,arguments)},zR=d._TopK=function(){return(zR=d._TopK=d.asm.TopK).apply(null,arguments)},LR=d._Transform=function(){return(LR=d._Transform=d.asm.Transform).apply(null,arguments)},BR=d._Transpose=function(){return(BR=d._Transpose=d.asm.Transpose).apply(null,arguments)},WR=d.__FusedMatMul=function(){return(WR=d.__FusedMatMul=d.asm._FusedMatMul).apply(null,arguments)},VR=d._malloc=function(){return(VR=d._malloc=d.asm.malloc).apply(null,arguments)},UR=d._free=function(){return(UR=d._free=d.asm.free).apply(null,arguments)},GR=d.__emscripten_tls_init=function(){return(GR=d.__emscripten_tls_init=d.asm._emscripten_tls_init).apply(null,arguments)},bf=d._pthread_self=function(){return(bf=d._pthread_self=d.asm.pthread_self).apply(null,arguments)},HR=d.___errno_location=function(){return(HR=d.___errno_location=d.asm.__errno_location).apply(null,arguments)},ev=d.__emscripten_thread_init=function(){return(ev=d.__emscripten_thread_init=d.asm._emscripten_thread_init).apply(null,arguments)},jR=d.__emscripten_thread_crashed=function(){return(jR=d.__emscripten_thread_crashed=d.asm._emscripten_thread_crashed).apply(null,arguments)},qR=d._emscripten_main_thread_process_queued_calls=function(){return(qR=d._emscripten_main_thread_process_queued_calls=d.asm.emscripten_main_thread_process_queued_calls).apply(null,arguments)},XR=d._emscripten_main_browser_thread_id=function(){return(XR=d._emscripten_main_browser_thread_id=d.asm.emscripten_main_browser_thread_id).apply(null,arguments)},tv=d._emscripten_run_in_main_runtime_thread_js=function(){return(tv=d._emscripten_run_in_main_runtime_thread_js=d.asm.emscripten_run_in_main_runtime_thread_js).apply(null,arguments)},KR=d._emscripten_dispatch_to_thread_=function(){return(KR=d._emscripten_dispatch_to_thread_=d.asm.emscripten_dispatch_to_thread_).apply(null,arguments)},nv=d.__emscripten_proxy_execute_task_queue=function(){return(nv=d.__emscripten_proxy_execute_task_queue=d.asm._emscripten_proxy_execute_task_queue).apply(null,arguments)},jg=d.__emscripten_thread_free_data=function(){return(jg=d.__emscripten_thread_free_data=d.asm._emscripten_thread_free_data).apply(null,arguments)},sv=d.__emscripten_thread_exit=function(){return(sv=d.__emscripten_thread_exit=d.asm._emscripten_thread_exit).apply(null,arguments)},rv=d._emscripten_stack_set_limits=function(){return(rv=d._emscripten_stack_set_limits=d.asm.emscripten_stack_set_limits).apply(null,arguments)},qg=d.stackSave=function(){return(qg=d.stackSave=d.asm.stackSave).apply(null,arguments)},vf=d.stackRestore=function(){return(vf=d.stackRestore=d.asm.stackRestore).apply(null,arguments)},wf=d.stackAlloc=function(){return(wf=d.stackAlloc=d.asm.stackAlloc).apply(null,arguments)},ZR=d.dynCall_iijjiiii=function(){return(ZR=d.dynCall_iijjiiii=d.asm.dynCall_iijjiiii).apply(null,arguments)},YR=d.dynCall_jiji=function(){return(YR=d.dynCall_jiji=d.asm.dynCall_jiji).apply(null,arguments)};d.keepRuntimeAlive=ur,d.wasmMemory=Q,d.cwrap=j1,d.ExitStatus=Di,d.PThread=je;var kf;da=function O(){kf||av(),kf||(da=O)};function av(O){if(O=O||y,Va>0)return;if(C){h(d),Sn(),postMessage({cmd:"loaded"});return}if(Nu(),Va>0)return;function Z(){kf||(kf=!0,d.calledRun=!0,!Se&&(Sn(),h(d),d.onRuntimeInitialized&&d.onRuntimeInitialized(),Qh()))}d.setStatus?(d.setStatus("Running..."),setTimeout(function(){setTimeout(function(){d.setStatus("")},1),Z()},1)):Z()}if(d.preInit)for(typeof d.preInit=="function"&&(d.preInit=[d.preInit]);d.preInit.length>0;)d.preInit.pop()();av();var Sf;m&&(Sf={uncaughtException:process.listeners("uncaughtException").filter(function(O){return!m.uncaughtException.indexOf(O)>-1}),unhandledRejection:process.listeners("unhandledRejection").filter(function(O){return!m.unhandledRejection.indexOf(O)>-1})});var If;if(typeof WasmBackendModule!="undefined")If=WasmBackendModule;else if(typeof r!="undefined")If=r;else throw new Error("Could not find wasm module in post.js");if(Sf){var JR=If._dispose;If._dispose=function(){JR(),Sf.uncaughtException.forEach(function(O){process.removeListener("uncaughtException",O)}),Sf.unhandledRejection.forEach(function(O){process.removeListener("unhandledRejection",O)})}}return r.ready}})();typeof e=="object"&&typeof t=="object"?t.exports=n:typeof define=="function"&&define.amd?define([],function(){return n}):typeof e=="object"&&(e.WasmBackendModuleThreadedSimd=n)}}),C_=un({"node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm-threaded-simd.worker.js"(e,t){t.exports.wasmWorkerContents=`"use strict";var Module={};var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string";if(ENVIRONMENT_IS_NODE){var nodeWorkerThreads=require("worker_threads");var parentPort=nodeWorkerThreads.parentPort;parentPort.on("message",data=>onmessage({data:data}));var fs=require("fs");Object.assign(global,{self:global,require:require,Module:Module,location:{href:__filename},Worker:nodeWorkerThreads.Worker,importScripts:function(f){(0,eval)(fs.readFileSync(f,"utf8"))},postMessage:function(msg){parentPort.postMessage(msg)},performance:global.performance||{now:function(){return Date.now()}}})}var initializedJS=false;var pendingNotifiedProxyingQueues=[];function threadPrintErr(){var text=Array.prototype.slice.call(arguments).join(" ");if(ENVIRONMENT_IS_NODE){fs.writeSync(2,text+" +");return}console.error(text)}function threadAlert(){var text=Array.prototype.slice.call(arguments).join(" ");postMessage({cmd:"alert",text:text,threadId:Module["_pthread_self"]()})}var err=threadPrintErr;self.alert=threadAlert;Module["instantiateWasm"]=(info,receiveInstance)=>{var instance=new WebAssembly.Instance(Module["wasmModule"],info);receiveInstance(instance);Module["wasmModule"]=null;return instance.exports};self.onunhandledrejection=e=>{throw e.reason??e};self.onmessage=e=>{try{if(e.data.cmd==="load"){Module["wasmModule"]=e.data.wasmModule;Module["wasmMemory"]=e.data.wasmMemory;Module["buffer"]=Module["wasmMemory"].buffer;Module["ENVIRONMENT_IS_PTHREAD"]=true;if(typeof e.data.urlOrBlob=="string"){importScripts(e.data.urlOrBlob)}else{var objectUrl=URL.createObjectURL(e.data.urlOrBlob);importScripts(objectUrl);URL.revokeObjectURL(objectUrl)}WasmBackendModuleThreadedSimd(Module).then(function(instance){Module=instance})}else if(e.data.cmd==="run"){Module["__performance_now_clock_drift"]=performance.now()-e.data.time;Module["__emscripten_thread_init"](e.data.pthread_ptr,0,0,1);Module["establishStackSpace"]();Module["PThread"].receiveObjectTransfer(e.data);Module["PThread"].threadInitTLS();if(!initializedJS){pendingNotifiedProxyingQueues.forEach(queue=>{Module["executeNotifiedProxyingQueue"](queue)});pendingNotifiedProxyingQueues=[];initializedJS=true}try{Module["invokeEntryPoint"](e.data.start_routine,e.data.arg)}catch(ex){if(ex!="unwind"){if(ex instanceof Module["ExitStatus"]){if(Module["keepRuntimeAlive"]()){}else{Module["__emscripten_thread_exit"](ex.status)}}else{throw ex}}}}else if(e.data.cmd==="cancel"){if(Module["_pthread_self"]()){Module["__emscripten_thread_exit"](-1)}}else if(e.data.target==="setimmediate"){}else if(e.data.cmd==="processProxyingQueue"){if(initializedJS){Module["executeNotifiedProxyingQueue"](e.data.queue)}else{pendingNotifiedProxyingQueues.push(e.data.queue)}}else if(e.data.cmd){err("worker.js received unknown command "+e.data.cmd);err(e.data)}}catch(ex){if(Module["__emscripten_thread_crashed"]){Module["__emscripten_thread_crashed"]()}throw ex}};`}}),T_=un({"node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm.js"(e,t){var n=(()=>{var s=typeof document!="undefined"&&document.currentScript?document.currentScript.src:void 0;return typeof __filename!="undefined"&&(s=s||__filename),function(r){r=r||{};var a=typeof r!="undefined"?r:{},o,i;a.ready=new Promise(function(te,he){o=te,i=he});var l;typeof process!="undefined"&&process.listeners&&(l={uncaughtException:process.listeners("uncaughtException"),unhandledRejection:process.listeners("unhandledRejection")});var u=Object.assign({},a),c=[],p="./this.program",d=(te,he)=>{throw he},h=typeof window=="object",f=typeof importScripts=="function",m=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",g="";function y(te){return a.locateFile?a.locateFile(te,g):g+te}var x,A,b,w;function k(te){if(te instanceof Eu)return;D("exiting due to exception: "+te)}if(m){f?g=Jf().dirname(g)+"/":g=__dirname+"/";var C,N;typeof tw=="function"&&(C=gy(),N=Jf()),x=(te,he)=>(te=N.normalize(te),C.readFileSync(te,he?void 0:"utf8")),b=te=>{var he=x(te,!0);return he.buffer||(he=new Uint8Array(he)),he},A=(te,he,Re)=>{te=N.normalize(te),C.readFile(te,function(ot,$t){ot?Re(ot):he($t.buffer)})},process.argv.length>1&&(p=process.argv[1].replace(/\\/g,"/")),c=process.argv.slice(2),process.on("uncaughtException",function(te){if(!(te instanceof Eu))throw te}),process.on("unhandledRejection",function(te){throw te}),d=(te,he)=>{if(Cs())throw process.exitCode=te,he;k(he),process.exit(te)},a.inspect=function(){return"[Emscripten Module object]"}}else(h||f)&&(f?g=self.location.href:typeof document!="undefined"&&document.currentScript&&(g=document.currentScript.src),s&&(g=s),g.indexOf("blob:")!==0?g=g.substr(0,g.replace(/[?#].*/,"").lastIndexOf("/")+1):g="",x=te=>{var he=new XMLHttpRequest;return he.open("GET",te,!1),he.send(null),he.responseText},f&&(b=te=>{var he=new XMLHttpRequest;return he.open("GET",te,!1),he.responseType="arraybuffer",he.send(null),new Uint8Array(he.response)}),A=(te,he,Re)=>{var ot=new XMLHttpRequest;ot.open("GET",te,!0),ot.responseType="arraybuffer",ot.onload=()=>{if(ot.status==200||ot.status==0&&ot.response){he(ot.response);return}Re()},ot.onerror=Re,ot.send(null)},w=te=>document.title=te);var R=a.print||console.log.bind(console),D=a.printErr||console.warn.bind(console);Object.assign(a,u),u=null,a.arguments&&(c=a.arguments),a.thisProgram&&(p=a.thisProgram),a.quit&&(d=a.quit);var E=4,$;a.wasmBinary&&($=a.wasmBinary);var S=a.noExitRuntime||!0;typeof WebAssembly!="object"&&lr("no native wasm support detected");var F,z=!1,V;function j(te,he){te||lr(he)}var G=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0;function q(te,he,Re){for(var ot=he+Re,$t=he;te[$t]&&!($t>=ot);)++$t;if($t-he>16&&te.buffer&&G)return G.decode(te.subarray(he,$t));for(var Pt="";he<$t;){var at=te[he++];if(!(at&128)){Pt+=String.fromCharCode(at);continue}var nt=te[he++]&63;if((at&224)==192){Pt+=String.fromCharCode((at&31)<<6|nt);continue}var nn=te[he++]&63;if((at&240)==224?at=(at&15)<<12|nt<<6|nn:at=(at&7)<<18|nt<<12|nn<<6|te[he++]&63,at<65536)Pt+=String.fromCharCode(at);else{var qs=at-65536;Pt+=String.fromCharCode(55296|qs>>10,56320|qs&1023)}}return Pt}function K(te,he){return te?q(oe,te,he):""}function ne(te,he,Re,ot){if(!(ot>0))return 0;for(var $t=Re,Pt=Re+ot-1,at=0;at=55296&&nt<=57343){var nn=te.charCodeAt(++at);nt=65536+((nt&1023)<<10)|nn&1023}if(nt<=127){if(Re>=Pt)break;he[Re++]=nt}else if(nt<=2047){if(Re+1>=Pt)break;he[Re++]=192|nt>>6,he[Re++]=128|nt&63}else if(nt<=65535){if(Re+2>=Pt)break;he[Re++]=224|nt>>12,he[Re++]=128|nt>>6&63,he[Re++]=128|nt&63}else{if(Re+3>=Pt)break;he[Re++]=240|nt>>18,he[Re++]=128|nt>>12&63,he[Re++]=128|nt>>6&63,he[Re++]=128|nt&63}}return he[Re]=0,Re-$t}function ae(te,he,Re){return ne(te,oe,he,Re)}var re,ue,oe,Ae,Q,Ie,Se,Fe,$e;function rt(te){re=te,a.HEAP8=ue=new Int8Array(te),a.HEAP16=Ae=new Int16Array(te),a.HEAP32=Ie=new Int32Array(te),a.HEAPU8=oe=new Uint8Array(te),a.HEAPU16=Q=new Uint16Array(te),a.HEAPU32=Se=new Uint32Array(te),a.HEAPF32=Fe=new Float32Array(te),a.HEAPF64=$e=new Float64Array(te)}var mt=a.INITIAL_MEMORY||16777216,gt,yt=[],ht=[],Qe=[],kt=!1;function Cs(){return S}function Kt(){if(a.preRun)for(typeof a.preRun=="function"&&(a.preRun=[a.preRun]);a.preRun.length;)ir(a.preRun.shift());da(yt)}function or(){kt=!0,da(ht)}function Pn(){if(a.postRun)for(typeof a.postRun=="function"&&(a.postRun=[a.postRun]);a.postRun.length;)Ts(a.postRun.shift());da(Qe)}function ir(te){yt.unshift(te)}function es(te){ht.unshift(te)}function Ts(te){Qe.unshift(te)}var Rt=0,ms=null,Un=null;function Hr(te){Rt++,a.monitorRunDependencies&&a.monitorRunDependencies(Rt)}function Wa(te){if(Rt--,a.monitorRunDependencies&&a.monitorRunDependencies(Rt),Rt==0&&(ms!==null&&(clearInterval(ms),ms=null),Un)){var he=Un;Un=null,he()}}function lr(te){a.onAbort&&a.onAbort(te),te="Aborted("+te+")",D(te),z=!0,V=1,te+=". Build with -sASSERTIONS for more info.";var he=new WebAssembly.RuntimeError(te);throw i(he),he}var _d="data:application/octet-stream;base64,";function ur(te){return te.startsWith(_d)}function Nu(te){return te.startsWith("file://")}var Sn;Sn="tfjs-backend-wasm.wasm",ur(Sn)||(Sn=y(Sn));function Qh(te){try{if(te==Sn&&$)return new Uint8Array($);if(b)return b(te);throw"both async and sync fetching of the wasm failed"}catch(he){lr(he)}}function c1(){if(!$&&(h||f)){if(typeof fetch=="function"&&!Nu(Sn))return fetch(Sn,{credentials:"same-origin"}).then(function(te){if(!te.ok)throw"failed to load wasm binary file at '"+Sn+"'";return te.arrayBuffer()}).catch(function(){return Qh(Sn)});if(A)return new Promise(function(te,he){A(Sn,function(Re){te(new Uint8Array(Re))},he)})}return Promise.resolve().then(function(){return Qh(Sn)})}function d1(){var te={env:Pd,wasi_snapshot_preview1:Pd};function he(at,nt){var nn=at.exports;a.asm=nn,F=a.asm.memory,rt(F.buffer),gt=a.asm.__indirect_function_table,es(a.asm.__wasm_call_ctors),Wa("wasm-instantiate")}Hr("wasm-instantiate");function Re(at){he(at.instance)}function ot(at){return c1().then(function(nt){return WebAssembly.instantiate(nt,te)}).then(function(nt){return nt}).then(at,function(nt){D("failed to asynchronously prepare wasm: "+nt),lr(nt)})}function $t(){return!$&&typeof WebAssembly.instantiateStreaming=="function"&&!ur(Sn)&&!Nu(Sn)&&!m&&typeof fetch=="function"?fetch(Sn,{credentials:"same-origin"}).then(function(at){var nt=WebAssembly.instantiateStreaming(at,te);return nt.then(Re,function(nn){return D("wasm streaming compile failed: "+nn),D("falling back to ArrayBuffer instantiation"),ot(Re)})}):ot(Re)}if(a.instantiateWasm)try{var Pt=a.instantiateWasm(te,he);return Pt}catch(at){D("Module.instantiateWasm callback failed with error: "+at),i(at)}return $t().catch(i),{}}var H4,Va;function Eu(te){this.name="ExitStatus",this.message="Program terminated with exit("+te+")",this.status=te}function da(te){for(;te.length>0;)te.shift()(a)}function j4(te){return te}function q4(te){var he=/\b_Z[\w\d_]+/g;return te.replace(he,function(Re){var ot=Re;return Re===ot?Re:ot+" ["+Re+"]"})}function Ru(){var te=new Error;if(!te.stack){try{throw new Error}catch(he){te=he}if(!te.stack)return"(no stack trace available)"}return te.stack.toString()}function p1(te,he){ue.set(te,he)}function ef(){lr("")}function Dd(){return 2147483648}function ts(){return Dd()}function tf(te,he,Re){oe.copyWithin(te,he,he+Re)}function h1(te){try{return F.grow(te-re.byteLength+65535>>>16),rt(F.buffer),1}catch(he){}}function f1(te){var he=oe.length;te=te>>>0;var Re=Dd();if(te>Re)return!1;let ot=(nn,qs)=>nn+(qs-nn%qs)%qs;for(var $t=1;$t<=4;$t*=2){var Pt=he*(1+.2/$t);Pt=Math.min(Pt,te+100663296);var at=Math.min(Re,ot(Math.max(te,Pt),65536)),nt=h1(at);if(nt)return!0}return!1}var m1={varargs:void 0,get:function(){m1.varargs+=4;var te=Ie[m1.varargs-4>>2];return te},getStr:function(te){var he=K(te);return he}};function X4(te){return 52}function g1(te,he,Re,ot,$t){return 70}var Di=[null,[],[]];function y1(te,he){var Re=Di[te];he===0||he===10?((te===1?R:D)(q(Re,0)),Re.length=0):Re.push(he)}function A1(te,he,Re,ot){for(var $t=0,Pt=0;Pt>2],nt=Se[he+4>>2];he+=8;for(var nn=0;nn>2]=$t,0}function $d(te){var he=a["_"+te];return he}function nf(te,he,Re,ot,$t){var Pt={string:ns=>{var Ga=0;if(ns!=null&&ns!==0){var xf=(ns.length<<2)+1;Ga=zd(xf),ae(ns,Ga,xf)}return Ga},array:ns=>{var Ga=zd(ns.length);return p1(ns,Ga),Ga}};function at(ns){return he==="string"?K(ns):he==="boolean"?Boolean(ns):ns}var nt=$d(te),nn=[],qs=0;if(ot)for(var pa=0;paat==="number"||at==="boolean"),Pt=he!=="string";return Pt&&$t&&!ot?$d(te):function(){return nf(te,he,Re,arguments,ot)}}var Pd={abort:ef,emscripten_get_heap_max:ts,emscripten_memcpy_big:tf,emscripten_resize_heap:f1,fd_close:X4,fd_seek:g1,fd_write:A1},K4=d1(),rf=a.___wasm_call_ctors=function(){return(rf=a.___wasm_call_ctors=a.asm.__wasm_call_ctors).apply(null,arguments)},x1=a._init=function(){return(x1=a._init=a.asm.init).apply(null,arguments)},je=a._init_with_threads_count=function(){return(je=a._init_with_threads_count=a.asm.init_with_threads_count).apply(null,arguments)},Fd=a._get_threads_count=function(){return(Fd=a._get_threads_count=a.asm.get_threads_count).apply(null,arguments)},b1=a._register_tensor=function(){return(b1=a._register_tensor=a.asm.register_tensor).apply(null,arguments)},Z4=a._dispose_data=function(){return(Z4=a._dispose_data=a.asm.dispose_data).apply(null,arguments)},Y4=a._dispose=function(){return(Y4=a._dispose=a.asm.dispose).apply(null,arguments)},v1=a._Abs=function(){return(v1=a._Abs=a.asm.Abs).apply(null,arguments)},af=a._Add=function(){return(af=a._Add=a.asm.Add).apply(null,arguments)},_u=a._AddN=function(){return(_u=a._AddN=a.asm.AddN).apply(null,arguments)},w1=a._All=function(){return(w1=a._All=a.asm.All).apply(null,arguments)},k1=a._Any=function(){return(k1=a._Any=a.asm.Any).apply(null,arguments)},J4=a._ArgMax=function(){return(J4=a._ArgMax=a.asm.ArgMax).apply(null,arguments)},S1=a._AvgPool=function(){return(S1=a._AvgPool=a.asm.AvgPool).apply(null,arguments)},I1=a._BatchMatMul=function(){return(I1=a._BatchMatMul=a.asm.BatchMatMul).apply(null,arguments)},C1=a._Ceil=function(){return(C1=a._Ceil=a.asm.Ceil).apply(null,arguments)},T1=a._ClipByValue=function(){return(T1=a._ClipByValue=a.asm.ClipByValue).apply(null,arguments)},of=a._Conv2D=function(){return(of=a._Conv2D=a.asm.Conv2D).apply(null,arguments)},lf=a._Conv2DBackpropInput=function(){return(lf=a._Conv2DBackpropInput=a.asm.Conv2DBackpropInput).apply(null,arguments)},N1=a._Cos=function(){return(N1=a._Cos=a.asm.Cos).apply(null,arguments)},E1=a._Cosh=function(){return(E1=a._Cosh=a.asm.Cosh).apply(null,arguments)},R1=a._CropAndResize=function(){return(R1=a._CropAndResize=a.asm.CropAndResize).apply(null,arguments)},Od=a._Cumprod=function(){return(Od=a._Cumprod=a.asm.Cumprod).apply(null,arguments)},_1=a._Cumsum=function(){return(_1=a._Cumsum=a.asm.Cumsum).apply(null,arguments)},D1=a._DepthToSpace=function(){return(D1=a._DepthToSpace=a.asm.DepthToSpace).apply(null,arguments)},$1=a._DepthwiseConv2dNative=function(){return($1=a._DepthwiseConv2dNative=a.asm.DepthwiseConv2dNative).apply(null,arguments)},$i=a._Elu=function(){return($i=a._Elu=a.asm.Elu).apply(null,arguments)},P1=a._Equal=function(){return(P1=a._Equal=a.asm.Equal).apply(null,arguments)},F1=a._Exp=function(){return(F1=a._Exp=a.asm.Exp).apply(null,arguments)},uf=a._FlipLeftRight=function(){return(uf=a._FlipLeftRight=a.asm.FlipLeftRight).apply(null,arguments)},O1=a._Floor=function(){return(O1=a._Floor=a.asm.Floor).apply(null,arguments)},Du=a._FloorDiv=function(){return(Du=a._FloorDiv=a.asm.FloorDiv).apply(null,arguments)},M1=a._FusedBatchNorm=function(){return(M1=a._FusedBatchNorm=a.asm.FusedBatchNorm).apply(null,arguments)},z1=a._FusedConv2D=function(){return(z1=a._FusedConv2D=a.asm.FusedConv2D).apply(null,arguments)},Ua=a._FusedDepthwiseConv2D=function(){return(Ua=a._FusedDepthwiseConv2D=a.asm.FusedDepthwiseConv2D).apply(null,arguments)},Md=a._Gather=function(){return(Md=a._Gather=a.asm.Gather).apply(null,arguments)},L1=a._GatherNd=function(){return(L1=a._GatherNd=a.asm.GatherNd).apply(null,arguments)},B1=a._Greater=function(){return(B1=a._Greater=a.asm.Greater).apply(null,arguments)},W1=a._GreaterEqual=function(){return(W1=a._GreaterEqual=a.asm.GreaterEqual).apply(null,arguments)},V1=a._LeakyRelu=function(){return(V1=a._LeakyRelu=a.asm.LeakyRelu).apply(null,arguments)},cf=a._Less=function(){return(cf=a._Less=a.asm.Less).apply(null,arguments)},df=a._LessEqual=function(){return(df=a._LessEqual=a.asm.LessEqual).apply(null,arguments)},U1=a._Log=function(){return(U1=a._Log=a.asm.Log).apply(null,arguments)},G1=a._LogicalAnd=function(){return(G1=a._LogicalAnd=a.asm.LogicalAnd).apply(null,arguments)},pf=a._LogicalNot=function(){return(pf=a._LogicalNot=a.asm.LogicalNot).apply(null,arguments)},hf=a._LogicalOr=function(){return(hf=a._LogicalOr=a.asm.LogicalOr).apply(null,arguments)},H1=a._LogicalXor=function(){return(H1=a._LogicalXor=a.asm.LogicalXor).apply(null,arguments)},j1=a._Max=function(){return(j1=a._Max=a.asm.Max).apply(null,arguments)},q1=a._MaxPool=function(){return(q1=a._MaxPool=a.asm.MaxPool).apply(null,arguments)},ff=a._Maximum=function(){return(ff=a._Maximum=a.asm.Maximum).apply(null,arguments)},Q4=a._Mean=function(){return(Q4=a._Mean=a.asm.Mean).apply(null,arguments)},X1=a._Min=function(){return(X1=a._Min=a.asm.Min).apply(null,arguments)},K1=a._Minimum=function(){return(K1=a._Minimum=a.asm.Minimum).apply(null,arguments)},Z1=a._MirrorPad=function(){return(Z1=a._MirrorPad=a.asm.MirrorPad).apply(null,arguments)},Y1=a._Multiply=function(){return(Y1=a._Multiply=a.asm.Multiply).apply(null,arguments)},J1=a._Neg=function(){return(J1=a._Neg=a.asm.Neg).apply(null,arguments)},Q1=a._NonMaxSuppressionV3=function(){return(Q1=a._NonMaxSuppressionV3=a.asm.NonMaxSuppressionV3).apply(null,arguments)},eg=a._NonMaxSuppressionV4=function(){return(eg=a._NonMaxSuppressionV4=a.asm.NonMaxSuppressionV4).apply(null,arguments)},tg=a._NonMaxSuppressionV5=function(){return(tg=a._NonMaxSuppressionV5=a.asm.NonMaxSuppressionV5).apply(null,arguments)},ng=a._NotEqual=function(){return(ng=a._NotEqual=a.asm.NotEqual).apply(null,arguments)},sg=a._OneHot=function(){return(sg=a._OneHot=a.asm.OneHot).apply(null,arguments)},rg=a._PadV2=function(){return(rg=a._PadV2=a.asm.PadV2).apply(null,arguments)},ag=a._Pow=function(){return(ag=a._Pow=a.asm.Pow).apply(null,arguments)},og=a._Prelu=function(){return(og=a._Prelu=a.asm.Prelu).apply(null,arguments)},ig=a._Prod=function(){return(ig=a._Prod=a.asm.Prod).apply(null,arguments)},lg=a._RealDiv=function(){return(lg=a._RealDiv=a.asm.RealDiv).apply(null,arguments)},ug=a._Relu=function(){return(ug=a._Relu=a.asm.Relu).apply(null,arguments)},cg=a._Relu6=function(){return(cg=a._Relu6=a.asm.Relu6).apply(null,arguments)},dg=a._ResizeBilinear=function(){return(dg=a._ResizeBilinear=a.asm.ResizeBilinear).apply(null,arguments)},pg=a._ResizeNearestNeighbor=function(){return(pg=a._ResizeNearestNeighbor=a.asm.ResizeNearestNeighbor).apply(null,arguments)},hg=a._Reverse=function(){return(hg=a._Reverse=a.asm.Reverse).apply(null,arguments)},fg=a._RotateWithOffset=function(){return(fg=a._RotateWithOffset=a.asm.RotateWithOffset).apply(null,arguments)},mg=a._Round=function(){return(mg=a._Round=a.asm.Round).apply(null,arguments)},gg=a._Rsqrt=function(){return(gg=a._Rsqrt=a.asm.Rsqrt).apply(null,arguments)},yg=a._ScatterNd=function(){return(yg=a._ScatterNd=a.asm.ScatterNd).apply(null,arguments)},Ag=a._SelectV2=function(){return(Ag=a._SelectV2=a.asm.SelectV2).apply(null,arguments)},xg=a._Sigmoid=function(){return(xg=a._Sigmoid=a.asm.Sigmoid).apply(null,arguments)},bg=a._Sin=function(){return(bg=a._Sin=a.asm.Sin).apply(null,arguments)},vg=a._Softmax=function(){return(vg=a._Softmax=a.asm.Softmax).apply(null,arguments)},wg=a._SparseFillEmptyRows=function(){return(wg=a._SparseFillEmptyRows=a.asm.SparseFillEmptyRows).apply(null,arguments)},kg=a._SparseReshape=function(){return(kg=a._SparseReshape=a.asm.SparseReshape).apply(null,arguments)},Sg=a._SparseSegmentReduction=function(){return(Sg=a._SparseSegmentReduction=a.asm.SparseSegmentReduction).apply(null,arguments)},Ig=a._Sqrt=function(){return(Ig=a._Sqrt=a.asm.Sqrt).apply(null,arguments)},Cg=a._Square=function(){return(Cg=a._Square=a.asm.Square).apply(null,arguments)},Tg=a._SquaredDifference=function(){return(Tg=a._SquaredDifference=a.asm.SquaredDifference).apply(null,arguments)},Ng=a._Step=function(){return(Ng=a._Step=a.asm.Step).apply(null,arguments)},Eg=a._StridedSlice=function(){return(Eg=a._StridedSlice=a.asm.StridedSlice).apply(null,arguments)},Rg=a._Sub=function(){return(Rg=a._Sub=a.asm.Sub).apply(null,arguments)},_g=a._Sum=function(){return(_g=a._Sum=a.asm.Sum).apply(null,arguments)},Dg=a._Tan=function(){return(Dg=a._Tan=a.asm.Tan).apply(null,arguments)},$g=a._Tanh=function(){return($g=a._Tanh=a.asm.Tanh).apply(null,arguments)},Pg=a._Tile=function(){return(Pg=a._Tile=a.asm.Tile).apply(null,arguments)},Fg=a._TopK=function(){return(Fg=a._TopK=a.asm.TopK).apply(null,arguments)},Og=a._Transform=function(){return(Og=a._Transform=a.asm.Transform).apply(null,arguments)},Mg=a._Transpose=function(){return(Mg=a._Transpose=a.asm.Transpose).apply(null,arguments)},zg=a.__FusedMatMul=function(){return(zg=a.__FusedMatMul=a.asm._FusedMatMul).apply(null,arguments)},Lg=a._malloc=function(){return(Lg=a._malloc=a.asm.malloc).apply(null,arguments)},Bg=a._free=function(){return(Bg=a._free=a.asm.free).apply(null,arguments)},Wg=a.___errno_location=function(){return(Wg=a.___errno_location=a.asm.__errno_location).apply(null,arguments)},mf=a.stackSave=function(){return(mf=a.stackSave=a.asm.stackSave).apply(null,arguments)},gf=a.stackRestore=function(){return(gf=a.stackRestore=a.asm.stackRestore).apply(null,arguments)},zd=a.stackAlloc=function(){return(zd=a.stackAlloc=a.asm.stackAlloc).apply(null,arguments)},Vg=a.dynCall_iijjiiii=function(){return(Vg=a.dynCall_iijjiiii=a.asm.dynCall_iijjiiii).apply(null,arguments)},Ug=a.dynCall_jiji=function(){return(Ug=a.dynCall_jiji=a.asm.dynCall_jiji).apply(null,arguments)};a.cwrap=sf;var $u;Un=function te(){$u||yf(),$u||(Un=te)};function yf(te){if(te=te||c,Rt>0||(Kt(),Rt>0))return;function he(){$u||($u=!0,a.calledRun=!0,!z&&(or(),o(a),a.onRuntimeInitialized&&a.onRuntimeInitialized(),Pn()))}a.setStatus?(a.setStatus("Running..."),setTimeout(function(){setTimeout(function(){a.setStatus("")},1),he()},1)):he()}if(a.preInit)for(typeof a.preInit=="function"&&(a.preInit=[a.preInit]);a.preInit.length>0;)a.preInit.pop()();yf();var Pu;l&&(Pu={uncaughtException:process.listeners("uncaughtException").filter(function(te){return!l.uncaughtException.indexOf(te)>-1}),unhandledRejection:process.listeners("unhandledRejection").filter(function(te){return!l.unhandledRejection.indexOf(te)>-1})});var Fu;if(typeof r!="undefined")Fu=r;else if(typeof WasmBackendModuleThreadedSimd!="undefined")Fu=WasmBackendModuleThreadedSimd;else throw new Error("Could not find wasm module in post.js");if(Pu){var Gg=Fu._dispose;Fu._dispose=function(){Gg(),Pu.uncaughtException.forEach(function(te){process.removeListener("uncaughtException",te)}),Pu.unhandledRejection.forEach(function(te){process.removeListener("unhandledRejection",te)})}}return r.ready}})();typeof e=="object"&&typeof t=="object"?t.exports=n:typeof define=="function"&&define.amd?define([],function(){return n}):typeof e=="object"&&(e.WasmBackendModule=n)}}),N_=1e-7,E_=1e-4,Tp=class{constructor(e,t){this.backend=e,this.dataMover=t,this.data=new WeakMap,this.dataIdsCount=0}get(e){return this.data.has(e)||this.dataMover.moveData(this.backend,e),this.data.get(e)}set(e,t){this.dataIdsCount++,this.data.set(e,t)}has(e){return this.data.has(e)}delete(e){return this.dataIdsCount--,this.data.delete(e)}numDataIds(){return this.dataIdsCount}},fc=class{refCount(e){return Ks("refCount")}incRef(e){return Ks("incRef")}timerAvailable(){return!0}time(e){return Ks("time")}read(e){return Ks("read")}readSync(e){return Ks("readSync")}readToGPU(e,t){return Ks("readToGPU")}numDataIds(){return Ks("numDataIds")}disposeData(e,t){return Ks("disposeData")}write(e,t,n){return Ks("write")}move(e,t,n,s,r){return Ks("move")}memory(){return Ks("memory")}floatPrecision(){return Ks("floatPrecision")}epsilon(){return this.floatPrecision()===32?N_:E_}dispose(){return Ks("dispose")}};function Ks(e){throw new Error(`'${e}' not yet implemented or not found in the registry. This kernel may not be supported by the tfjs backend you have chosen`)}function sw(e){let t=e.length,n=0;for(;t>0;)n=Math.random()*t|0,t--,Qf(e,t,n)}function R_(e,t){if(e.length!==t.length)throw new Error(`Array sizes must match to be shuffled together First array length was ${e.length}Second array length was ${t.length}`);let n=e.length,s=0;for(;n>0;)s=Math.random()*n|0,n--,Qf(e,n,s),Qf(t,n,s)}function ip(e,t,n){return Math.max(e,Math.min(t,n))}function __(e){return e%2===0?e:e+1}function Qf(e,t,n){let s=e[t];e[t]=e[n],e[n]=s}function D_(e){let t=0;for(let n=0;nn+` Shapes ${e} and ${t} must match`)}function cl(e){P(e!=null,()=>"The input to the tensor constructor must be a non-null value.")}function Ji(e,t=[],n=!1){if(t==null&&(t=[]),Array.isArray(e)||Gn(e)&&!n)for(let s=0;s0,n,s=setTimeout){return new Promise((r,a)=>{let o=0,i=()=>{if(e()){r();return}o++;let l=t(o);if(n!=null&&o>=n){a();return}s(i,l)};i()})}function B_(e,t){let n=1,s=-1;for(let a=0;a=0)n*=e[a];else if(e[a]===-1){if(s!==-1)throw Error(`Shapes can only have 1 implicit size. Found -1 at dim ${s} and dim ${a}`);s=a}else if(e[a]<0)throw Error(`Shapes can not be < 0. Found ${e[a]} at dim ${a}`);if(s===-1){if(t>0&&t!==n)throw Error(`Size(${t}) must match the product of shape ${e}`);return e}if(n===0)throw Error(`Cannot infer the missing size in [${e}] when there are 0 elements`);if(t%n!==0)throw Error(`The implicit shape can't be a fractional number. Got ${t} / ${n}`);let r=e.slice();return r[s]=t/n,r}function yr(e,t){let n=t.length;return e=e==null?t.map((s,r)=>r):[].concat(e),P(e.every(s=>s>=-n&&s`All values in axis param must be in range [-${n}, ${n}) but got axis ${e}`),P(e.every(s=>Yu(s)),()=>`All values in axis param must be integers but got axis ${e}`),e.map(s=>s<0?n+s:s)}function rw(e,t){let n=[],s=[],r=t!=null&&Array.isArray(t)&&t.length===0,a=t==null||r?null:yr(t,e).sort(),o=0;for(let i=0;ii)&&e[i]===1&&(n.push(e[i]),s.push(i)),a[o]<=i&&o++}e[i]!==1&&(n.push(e[i]),s.push(i))}return{newShape:n,keptDims:s}}function aw(e,t){let n=null;if(e==null||e==="float32")n=new Float32Array(t);else if(e==="int32")n=new Int32Array(t);else if(e==="bool")n=new Uint8Array(t);else throw new Error(`Unknown data type ${e}`);return n}function ow(e,t){let n=null;if(e==null||e==="float32")n=new Float32Array(t);else if(e==="int32")n=new Int32Array(t);else if(e==="bool")n=new Uint8Array(t);else if(e==="string")n=new Array(t);else throw new Error(`Unknown data type ${e}`);return n}function iw(e,t){for(let n=0;nt+=n.length),t}function Ka(e){return typeof e=="string"||e instanceof String}function cw(e){return typeof e=="boolean"}function dw(e){return typeof e=="number"}function Rm(e){return Array.isArray(e)?Rm(e[0]):e instanceof Float32Array?"float32":e instanceof Int32Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray?"int32":dw(e)?"float32":Ka(e)?"string":cw(e)?"bool":"float32"}function to(e){return!!(e&&e.constructor&&e.call&&e.apply)}function em(e,t){for(let n=t;n=0;--s)n[s]=n[s+1]*e[s+1];return n}function pw(e,t,n,s=!1){let r=new Array;if(t.length===1){let a=t[0]*(s?2:1);for(let o=0;ol*u)*(s?2:1);for(let l=0;lr*a)*(n?2:1);if(s===0)return[];if(s!==t.length)throw new Error(`[${e}] does not match the input size ${t.length}${n?" for a complex tensor":""}.`);return pw(0,e,t,n)}function yy(e,t){let n=_m(e,t);for(let s=0;ss*r,1);if(t==null||t==="float32")return ju(e,new Float32Array(n));if(t==="int32")return ju(e,new Int32Array(n));if(t==="bool")return ju(e,new Uint8Array(n));throw new Error(`Unknown data type ${t}`)}function Ay(e){e.forEach(t=>{P(Number.isInteger(t)&&t>=0,()=>`Tensor must have a shape comprised of positive integers but got shape [${e}].`)})}function U_(e,t,n){if(t===0)return 0;if(t===1)return e[0];let s=e[e.length-1];for(let r=0;r{let[s,r]=n.split(":");this.urlFlags[s]=q_(s,r)})}};function H_(e){let t={};return e.replace(/[?&]([^=?&]+)(?:=([^&]*))?/g,(n,...s)=>(j_(t,s[0],s[1]),s.join("="))),t}function j_(e,t,n){e[decodeURIComponent(t)]=decodeURIComponent(n||"")}function q_(e,t){if(t=t.toLowerCase(),t==="true"||t==="false")return t==="true";if(`${+t}`===t)return+t;throw new Error(`Could not parse value flag value ${t} for flag ${e}.`)}function U(){return by}var by=null;function X_(e){by=e}var Zg;function fw(){if(Zg==null){let e;if(typeof window!="undefined")e=window;else if(typeof global!="undefined")e=global;else if(typeof process!="undefined")e=process;else if(typeof self!="undefined")e=self;else throw new Error("Could not find a global object");Zg=e}return Zg}function K_(){let e=fw();return e._tfGlobals==null&&(e._tfGlobals=new Map),e._tfGlobals}function vy(e,t){let n=K_();if(n.has(e))return n.get(e);{let s=t();return n.set(e,s),n.get(e)}}var dl="Abs",gc="Acos",yc="Acosh",Ta="Add",go="AddN",Ac="All",xc="Any",yo="ArgMax",bc="ArgMin",vc="Asin",wc="Asinh",kc="Atan",Sc="Atanh",pl="Atan2",Ao="AvgPool",Dm="AvgPoolGrad",Np="AvgPool3D",$m="AvgPool3DGrad",xo="BatchMatMul",hl="BatchToSpaceND",Pm="Bincount",mw="BroadcastTo",Fm="BroadcastArgs",bo="Cast",vo="Ceil",Na="ClipByValue",Ep="Complex",Rp="ComplexAbs",fl="Concat",wo="Conv2D",Om="Conv2DBackpropFilter",ko="Conv2DBackpropInput",_p="Conv3D",Mm="Conv3DBackpropFilterV2",zm="Conv3DBackpropInputV2",So="Cos",Io="Cosh",ml="Cumprod",Co="Cumsum",gl="CropAndResize",Lm="DenseBincount",yl="DepthToSpace",To="DepthwiseConv2dNative",Bm="DepthwiseConv2dNativeBackpropFilter",Wm="DepthwiseConv2dNativeBackpropInput",Vm="Diag",Dp="Dilation2D",tm="Dilation2DBackpropInput",nm="Dilation2DBackpropFilter",No="RealDiv",$p="Einsum",Eo="Elu",Um="EluGrad",Ic="Erf",Al="Equal",Ro="Exp",xl="ExpandDims",bl="Expm1",Gm="FFT",Cc="Fill",vl="FlipLeftRight",_o="Floor",Do="FloorDiv",$o="FusedBatchNorm",wl="GatherV2",kl="GatherNd",Sl="Greater",Po="GreaterEqual",Fo="Identity",Hm="IFFT",Pp="Imag",Tc="IsFinite",Nc="IsInf",Il="IsNan",Oo="LeakyRelu",Cl="Less",Tl="LessEqual",jm="LinSpace",Mo="Log",Ec="Log1p",Nl="LogicalAnd",El="LogicalNot",Rc="LogicalOr",gw="LogicalXor",yw="LogSoftmax",Z_="LowerBound",Fp="LRN",qm="LRNGrad",zo="Max",Lo="Maximum",Bo="MaxPool",Xm="MaxPoolGrad",Op="MaxPool3D",Km="MaxPool3DGrad",Zm="MaxPoolWithArgmax",Wo="Mean",Vo="Min",Uo="Minimum",Go="MirrorPad",_c="Mod",Ym="Multinomial",Ho="Multiply",Rl="Neg",_l="NotEqual",Dl="NonMaxSuppressionV3",Dc="NonMaxSuppressionV4",$l="NonMaxSuppressionV5",Pl="OnesLike",Fl="OneHot",Ol="Pack",jo="PadV2",Y_="Pool",qo="Pow",Xo="Prelu",Ko="Prod",Jm="RaggedGather",Qm="RaggedTensorToTensor",$c="Range",Mp="Real",Ml="Reciprocal",Zo="Relu",zl="Reshape",Yo="ResizeNearestNeighbor",e0="ResizeNearestNeighborGrad",Jo="ResizeBilinear",t0="ResizeBilinearGrad",Qo="Relu6",Ll="Reverse",Bl="Round",ei="Rsqrt",Wl="ScatterNd",n0="SearchSorted",Vl="Select",Pc="Selu",Ul="Slice",ti="Sin",Gl="Sinh",Fc="Sign",ni="Sigmoid",Oc="Softplus",si="Sqrt",ri="Sum",Hl="SpaceToBatchND",jl="SplitV",ai="Softmax",zp="SparseFillEmptyRows",Mc="SparseReshape",Lp="SparseSegmentMean",Bp="SparseSegmentSum",Wp="SparseToDense",oi="SquaredDifference",zc="Square",ql="StridedSlice",Lc="StringNGrams",Vp="StringSplit",Up="StringToHashBucketFast",ii="Sub",Xl="Tan",li="Tanh",Ea="Tile",Kl="TopK",Zl="Transform",Jr="Transpose",s0="Unique",Yl="Unpack",Gp="UnsortedSegmentSum",J_="UpperBound",Jl="ZerosLike",ui="Step",lp="FromPixels",Ql="RotateWithOffset",no="_FusedMatMul",so="FusedConv2D",ro="FusedDepthwiseConv2D";function Xa(...e){U().getBool("IS_TEST")||U().getBool("PROD")||console.warn(...e)}function Q_(...e){U().getBool("IS_TEST")||U().getBool("PROD")||console.log(...e)}var Ju=vy("kernelRegistry",()=>new Map),up=vy("gradRegistry",()=>new Map);function sm(e,t){let n=wy(e,t);return Ju.get(n)}function p3(e){return up.get(e)}function ea(e){let t=Ju.entries(),n=[];for(;;){let{done:s,value:r}=t.next();if(s)break;let[a,o]=r,[i]=a.split("_");i===e&&n.push(o)}return n}function er(e){let{kernelName:t,backendName:n}=e,s=wy(t,n);Ju.has(s)&&Xa(`The kernel '${t}' for backend '${n}' is already registered`),Ju.set(s,e)}function Aw(e){let{kernelName:t}=e;up.has(t)&&U().getBool("DEBUG")&&Xa(`Overriding the gradient for '${t}'`),up.set(t,e)}function eD(e,t){let n=wy(e,t);if(!Ju.has(n))throw new Error(`The kernel '${e}' for backend '${t}' is not registered`);Ju.delete(n)}function tD(e){if(!up.has(e))throw new Error(`The gradient '${e}' for backend is not registered`);up.delete(e)}function nD(e,t){ea(e).forEach(s=>{let r=Object.assign({},s,{backendName:t});er(r)})}function wy(e,t){return`${t}_${e}`}var v={};We(v,{arraysEqual:()=>mo,assert:()=>P,assertNonNegativeIntegerDimensions:()=>Ay,assertNonNull:()=>cl,assertShapesMatch:()=>ls,bytesFromStringArray:()=>uw,bytesPerElement:()=>d3,checkConversionForErrors:()=>iw,clamp:()=>ip,computeStrides:()=>mc,createScalarValue:()=>lD,createShuffledIndices:()=>z_,decodeString:()=>rm,distSquared:()=>P_,encodeString:()=>jp,fetch:()=>cD,fingerPrint64:()=>iD,flatten:()=>Ji,getArrayFromDType:()=>ow,getTypedArrayFromDType:()=>aw,hasEncodingLoss:()=>W_,hexToLong:()=>Hp,indexToLoc:()=>G_,inferDtype:()=>Rm,inferFromImplicitShape:()=>B_,isBoolean:()=>cw,isFunction:()=>to,isInt:()=>Yu,isNumber:()=>dw,isPromise:()=>xy,isScalarShape:()=>F_,isString:()=>Ka,isTypedArray:()=>Gn,isValidDtype:()=>lw,locToIndex:()=>U_,makeOnesTypedArray:()=>yy,makeZerosNestedTypedArray:()=>V_,makeZerosTypedArray:()=>_m,nearestDivisor:()=>em,nearestLargerEven:()=>__,now:()=>cp,parseAxisParam:()=>yr,randUniform:()=>$_,repeatedTry:()=>L_,rightPad:()=>np,shuffle:()=>sw,shuffleCombo:()=>R_,sizeFromShape:()=>It,sizeToSquarishShape:()=>M_,squeezeShape:()=>rw,sum:()=>D_,swap:()=>Qf,tanh:()=>O_,toNestedArray:()=>ju,toTypedArray:()=>r0});var dv=fo(d_()),Bi=dv.default||dv;function Hp(e){return Bi.fromString(e,!0,16)}var xw=Hp("c3a5c85c97cb3127"),Mi=Hp("b492b66fbe98f273"),ss=Hp("9ae16a3b2f90404f");function h3(e){return e.xor(e.shru(47))}function bw(e,t,n){let s=e.slice(t,t+n);return Bi.fromBytes(Array.from(s),!0,!0)}function St(e,t){return bw(e,t,8)}function pv(e,t){return bw(e,t,4)}function In(e,t){return t===0?e:e.shru(t).or(e.shl(64-t))}function Ja(e,t,n=Hp("9ddfea08eb382d69")){let s=e.xor(t).mul(n);s=s.xor(s.shru(47));let r=t.xor(s).mul(n);return r=r.xor(r.shru(47)),r=r.mul(n),r}function sD(e,t,n,s,r,a){r=r.add(e),a=In(a.add(r).add(s),21);let o=r;return r=r.add(t),r=r.add(n),a=a.add(In(r,44)),[r.add(s),a.add(o)]}function Tf(e,t,n,s){return sD(St(e,t),St(e,t+8),St(e,t+16),St(e,t+24),n,s)}function rD(e,t=e.length){if(t>=8){let n=ss.add(t*2),s=St(e,0).add(ss),r=St(e,t-8),a=In(r,37).mul(n).add(s),o=In(s,25).add(r).mul(n);return Ja(a,o,n)}if(t>=4){let n=ss.add(t*2),s=pv(e,0);return Ja(s.shl(3).add(t),pv(e,t-4),n)}if(t>0){let n=e[0],s=e[t>>1],r=e[t-1],a=n+(s<<8),o=t+(r<<2);return h3(ss.mul(a).xor(xw.mul(o))).mul(ss)}return ss}function aD(e,t=e.length){let n=ss.add(t*2),s=St(e,0).mul(Mi),r=St(e,8),a=St(e,t-8).mul(n),o=St(e,t-16).mul(ss);return Ja(In(s.add(r),43).add(In(a,30)).add(o),s.add(In(r.add(ss),18)).add(a),n)}function oD(e,t=e.length){let n=ss.add(t*2),s=St(e,0).mul(ss),r=St(e,8),a=St(e,t-8).mul(n),o=St(e,t-16).mul(ss),i=In(s.add(r),43).add(In(a,30)).add(o),l=Ja(i,s.add(In(r.add(ss),18)).add(a),n),u=St(e,16).mul(n),c=St(e,24),p=i.add(St(e,t-32)).mul(n),d=l.add(St(e,t-24)).mul(n);return Ja(In(u.add(c),43).add(In(p,30)).add(d),u.add(In(c.add(s),18)).add(p),n)}function iD(e,t=e.length){let n=Bi.fromNumber(81,!0);if(t<=32)return t<=16?rD(e,t):aD(e,t);if(t<=64)return oD(e,t);let s=n,r=n.mul(Mi).add(113),a=h3(r.mul(ss).add(113)).mul(ss),o=[Bi.UZERO,Bi.UZERO],i=[Bi.UZERO,Bi.UZERO];s=s.mul(ss).add(St(e,0));let l=0,u=(t-1>>6)*64,c=u+(t-1&63)-63;do s=In(s.add(r).add(o[0]).add(St(e,l+8)),37).mul(Mi),r=In(r.add(o[1]).add(St(e,l+48)),42).mul(Mi),s=s.xor(i[1]),r=r.add(o[0]).add(St(e,l+40)),a=In(a.add(i[0]),33).mul(Mi),o=Tf(e,l,o[1].mul(Mi),s.add(i[0])),i=Tf(e,l+32,a.add(i[1]),r.add(St(e,l+16))),[a,s]=[s,a],l+=64;while(l!==u);let p=Mi.add(a.and(255).shl(1));return l=c,i[0]=i[0].add(t-1&63),o[0]=o[0].add(i[0]),i[0]=i[0].add(o[0]),s=In(s.add(r).add(o[0]).add(St(e,l+8)),37).mul(p),r=In(r.add(o[1]).add(St(e,l+48)),42).mul(p),s=s.xor(i[1].mul(9)),r=r.add(o[0].mul(9).add(St(e,l+40))),a=In(a.add(i[0]),33).mul(p),o=Tf(e,l,o[1].mul(p),s.add(i[0])),i=Tf(e,l+32,a.add(i[1]),r.add(St(e,l+16))),[a,s]=[s,a],Ja(Ja(o[0],i[0],p).add(h3(r).mul(xw)).add(a),Ja(o[1],i[1],p).add(s),p)}function lD(e,t){return t==="string"?jp(e):r0([e],t)}function uD(e,t){return e instanceof Float32Array&&t==="float32"||e instanceof Int32Array&&t==="int32"||e instanceof Uint8Array&&t==="bool"}function r0(e,t){if(t==="string")throw new Error("Cannot convert a string[] to a TypedArray");if(Array.isArray(e)&&(e=Ji(e)),U().getBool("DEBUG")&&iw(e,t),uD(e,t))return e;if(t==null||t==="float32"||t==="complex64")return new Float32Array(e);if(t==="int32")return new Int32Array(e);if(t==="bool"){let n=new Uint8Array(e.length);for(let s=0;s{s=n()},a,o=cp();if(this.backendTimer.timerAvailable())a=this.backendTimer.time(r);else{r();for(let l of s)l.dataSync();a=Promise.resolve({kernelMs:cp()-o})}if(U().getBool("CHECK_COMPUTATION_FOR_ERRORS"))for(let l=0;l{pD(c,u.dtype,e)})}return{kernelName:e,outputs:s,inputs:t,timeMs:a.then(l=>l.kernelMs),extraInfo:a.then(l=>l.getExtraProfileInfo!=null?l.getExtraProfileInfo():"")}}logKernelProfile(e){let{kernelName:t,outputs:n,timeMs:s,inputs:r,extraInfo:a}=e;n.forEach(o=>{Promise.all([o.data(),s,a]).then(i=>{this.logger.logKernelProfile(t,o,i[0],i[1],r,i[2])})})}};function pD(e,t,n){if(t!=="float32")return!1;for(let s=0;s0?f:""} `}}console.log(`%c${i} %c${o} %c${l}D ${c} %c${u} %c${p} %c${a}`,"font-weight:bold","color:red","color:blue","color: orange","color: green","color: steelblue")}};function fD(e,t,n){let s={},r={};for(let l=0;ls[m.id]=!0),h=!0,r[u.id]=!0;break}if(h)break}}let a={};a[n.id]=!0;let o={};for(let l=e.length-1;l>=0;l--){let u=e[l],c=u.inputs;for(let p=0;p=0;r--){let a=t[r],o=[];if(a.outputs.forEach(l=>{let u=e[l.id];u!=null?o.push(u):o.push(null)}),a.gradient==null)throw new Error(`Cannot compute gradient: gradient function not found for ${a.kernelName}.`);let i=a.gradient(o);for(let l in a.inputs){if(!(l in i))throw new Error(`Cannot backprop through input ${l}. Available gradients found: ${Object.keys(i)}.`);let u=n(()=>i[l]());if(u.dtype!=="float32")throw new Error(`Error in gradient for op ${a.kernelName}. The gradient of input ${l} must have 'float32' dtype, but has '${u.dtype}'`);let c=a.inputs[l];if(!mo(u.shape,c.shape))throw new Error(`Error in gradient for op ${a.kernelName}. The gradient of input '${l}' has shape '${u.shape}', which does not match the shape of the input '${c.shape}'`);if(e[c.id]==null)e[c.id]=u;else{let p=e[c.id];e[c.id]=s(p,u),p.dispose()}}}}var hv=20,Wd=3,Yg=7;function gD(e,t,n,s){let r=mc(t),a=yD(e,t,n,r),o=t.length,i=Vf(e,t,n,r,a),l=["Tensor"];return s&&(l.push(` dtype: ${n}`),l.push(` rank: ${o}`),l.push(` shape: [${t}]`),l.push(" values:")),l.push(i.map(u=>" "+u).join(` `)),l.join(` -`)}function qD(e,t,n,s){let r=Et(t),a=s[s.length-1],o=new Array(a).fill(0),i=t.length,l=n==="complex64"?up(e):e;if(i>1)for(let u=0;uFv){let g=rp*o,y=Array.from(e.slice(0,g)),x=Array.from(e.slice((i-rp)*o,i*o));return n==="complex64"&&(y=up(y),x=up(x)),["["+y.map((A,b)=>lp(A,r[b],n)).join(", ")+", ..., "+x.map((A,b)=>lp(A,r[i-rp+b],n)).join(", ")+"]"]}let m=n==="complex64"?up(e):Array.from(e);return["["+m.map((g,y)=>lp(g,r[y],n)).join(", ")+"]"]}let u=t.slice(1),c=s.slice(1),p=s[0]*o,d=[];if(i>Fv){for(let m=0;m1)for(let u=0;uhv){let g=Wd*o,y=Array.from(e.slice(0,g)),x=Array.from(e.slice((i-Wd)*o,i*o));return n==="complex64"&&(y=jd(y),x=jd(x)),["["+y.map((A,b)=>Hd(A,r[b],n)).join(", ")+", ..., "+x.map((A,b)=>Hd(A,r[i-Wd+b],n)).join(", ")+"]"]}let m=n==="complex64"?jd(e):Array.from(e);return["["+m.map((g,y)=>Hd(g,r[y],n)).join(", ")+"]"]}let u=t.slice(1),c=s.slice(1),p=s[0]*o,d=[];if(i>hv){for(let m=0;m`Length of values '${s}' does not match the size inferred by the shape '${this.size}'.`)}if(t==="complex64")throw new Error("complex64 dtype TensorBuffers are not supported. Please create a TensorBuffer for the real and imaginary parts separately and call tf.complex(real, imag).");this.values=n||I6(t,this.size),this.strides=Tc(e)}set(e,...t){t.length===0&&(t=[0]),O(t.length===this.rank,()=>`The number of provided coordinates (${t.length}) must match the rank (${this.rank})`);let n=this.locToIndex(t);this.values[n]=e}get(...e){e.length===0&&(e=[0]);let t=0;for(let s of e){if(s<0||s>=this.shape[t]){let r=`Requested out of range element at ${e}. Buffer shape=${this.shape}`;throw new Error(r)}t++}let n=e[e.length-1];for(let s=0;sTm(n))}catch(n){throw new Error("Failed to decode the string bytes into utf-8. To get the original bytes, call tensor.bytes().")}}return e}dataToGPU(e){return this.throwIfDisposed(),Pr().readToGPU(this.dataId,e)}dataSync(){this.throwIfDisposed();let e=Pr().readSync(this.dataId);if(this.dtype==="string")try{return e.map(t=>Tm(t))}catch(t){throw new Error("Failed to decode the string bytes into utf-8. To get the original bytes, call tensor.bytes().")}return e}async bytes(){this.throwIfDisposed();let e=await Pr().read(this.dataId);return this.dtype==="string"?e:new Uint8Array(e.buffer)}dispose(){this.isDisposed||(Pr().disposeTensor(this),this.isDisposedInternal=!0)}get isDisposed(){return this.isDisposedInternal}throwIfDisposed(){if(this.isDisposed)throw new Error("Tensor is disposed.")}print(e=!1){return tc.print(this,e)}clone(){return this.throwIfDisposed(),tc.clone(this)}toString(e=!1){let t=this.dataSync();return jD(t,this.shape,this.dtype,e)}cast(e){return this.throwIfDisposed(),tc.cast(this,e)}variable(e=!0,t,n){return this.throwIfDisposed(),Pr().makeVariable(this,e,t,n)}};Object.defineProperty(it,Symbol.hasInstance,{value:e=>!!e&&e.data!=null&&e.dataSync!=null&&e.throwIfDisposed!=null});function oe(){return Vy("Tensor",()=>it)}oe();var Np=class extends it{constructor(e,t,n,s){super(e.shape,e.dtype,e.dataId,s),this.trainable=t,this.name=n}assign(e){if(e.dtype!==this.dtype)throw new Error(`dtype of the new value (${e.dtype}) and previous value (${this.dtype}) must match`);if(!Ao(e.shape,this.shape))throw new Error(`shape of the new value (${e.shape}) and previous value (${this.shape}) must match`);Pr().disposeTensor(this),this.dataId=e.dataId,Pr().incRef(this,null)}dispose(){Pr().disposeVariable(this),this.isDisposedInternal=!0}};Object.defineProperty(Np,Symbol.hasInstance,{value:e=>e instanceof it&&e.assign!=null&&e.assign instanceof Function});var zr={};qe(zr,{assertTypesMatch:()=>W6,getTensorsInContainer:()=>Gy,isTensorInList:()=>QD,makeTypesMatch:()=>Xt});var F3;(function(e){e.R0="R0",e.R1="R1",e.R2="R2",e.R3="R3",e.R4="R4",e.R5="R5",e.R6="R6"})(F3||(F3={}));var O3;(function(e){e.float32="float32",e.int32="int32",e.bool="int32",e.complex64="complex64"})(O3||(O3={}));var M3;(function(e){e.float32="float32",e.int32="int32",e.bool="bool",e.complex64="complex64"})(M3||(M3={}));var z3;(function(e){e.float32="float32",e.int32="float32",e.bool="float32",e.complex64="complex64"})(z3||(z3={}));var L3;(function(e){e.float32="complex64",e.int32="complex64",e.bool="complex64",e.complex64="complex64"})(L3||(L3={}));var JD={float32:z3,int32:O3,bool:M3,complex64:L3};function Hn(e,t){if(e==="string"||t==="string"){if(e==="string"&&t==="string")return"string";throw new Error(`Can not upcast ${e} with ${t}`)}return JD[e][t]}function ch(e){return Hn(e,"int32")}function Xt(e,t){if(e.dtype===t.dtype)return[e,t];let n=Hn(e.dtype,t.dtype);return[e.cast(n),t.cast(n)]}function W6(e,t){O(e.dtype===t.dtype,()=>`The dtypes of the first(${e.dtype}) and second(${t.dtype}) input must match`)}function QD(e,t){return t.some(n=>n.id===e.id)}function Gy(e){let t=[];return V6(e,t,new Set),t}function V6(e,t,n){if(e==null)return;if(e instanceof it){t.push(e);return}if(!e$(e))return;let s=e;for(let r in s){let a=s[r];n.has(a)||(n.add(a),V6(a,t,n))}}function e$(e){return Array.isArray(e)||typeof e=="object"}function x3(e){return e.kernelName!=null}var Ov=class{constructor(){this.registeredVariables={},this.nextTapeNodeId=0,this.numBytes=0,this.numTensors=0,this.numStringTensors=0,this.numDataBuffers=0,this.gradientDepth=0,this.kernelDepth=0,this.scopeStack=[],this.numDataMovesStack=[],this.nextScopeId=0,this.tensorInfo=new WeakMap,this.profiling=!1,this.activeProfile={newBytes:0,newTensors:0,peakBytes:0,kernels:[],result:null,get kernelNames(){return Array.from(new Set(this.kernels.map(e=>e.name)))}}}dispose(){for(let e in this.registeredVariables)this.registeredVariables[e].dispose()}},Ep=class{constructor(e){this.ENV=e,this.registry={},this.registryFactory={},this.pendingBackendInitId=0,this.state=new Ov}async ready(){if(this.pendingBackendInit!=null)return this.pendingBackendInit.then(()=>{});if(this.backendInstance!=null)return;let e=this.getSortedBackends();for(let t=0;t{t.setupFunc!=null&&t.setupFunc(this.backendInstance)})}disposeRegisteredKernels(e){ra(e).forEach(n=>{n.disposeFunc!=null&&n.disposeFunc(this.registry[e])})}initializeBackend(e){let t=this.registryFactory[e];if(t==null)throw new Error(`Cannot initialize backend ${e}, no registration found.`);try{let n=t.factory();if(n&&!(n instanceof Cc)&&typeof n.then=="function"){let s=++this.pendingBackendInitId,r=n.then(a=>s(sthis.registryFactory[t].priority-this.registryFactory[e].priority)}initializeBackendsAndReturnBest(){let e=this.getSortedBackends();for(let t=0;tthis.startScope(n),()=>this.endScope(s),()=>(s=t(),s instanceof Promise&&console.error("Cannot return a Promise inside of tidy."),s))}scopedRun(e,t,n){e();try{let s=n();return t(),s}catch(s){throw t(),s}}nextTensorId(){return Ep.nextTensorId++}nextVariableId(){return Ep.nextVariableId++}clone(e){let t=B.runKernel(zo,{x:e}),n={x:e},s=a=>({x:()=>{let o="float32",i={x:a},l={dtype:o};return B.runKernel(ko,i,l)}}),r=[];return this.addTapeNode(this.state.activeScope.name,n,[t],s,r,{}),t}runKernel(e,t,n){if(this.backendName==null&&this.backend,!(Cm(e,this.backendName)!=null))throw new Error(`Kernel '${e}' not registered for backend '${this.backendName}'`);return this.runKernelFunc({kernelName:e,inputs:t,attrs:n})}shouldCheckForMemLeaks(){return this.ENV.getBool("IS_TEST")}checkKernelForMemLeak(e,t,n){let s=this.backend.numDataIds(),r=0;n.forEach(i=>{r+=i.dtype==="complex64"?3:1});let a=this.state.numDataMovesStack[this.state.numDataMovesStack.length-1],o=s-t-r-a;if(o>0)throw new Error(`Backend '${this.backendName}' has an internal memory leak (${o} data ids) after running '${e}'`)}runKernelFunc(e){let t,n=[],s=this.isTapeOn(),r=this.state.numBytes,a=this.state.numTensors;this.shouldCheckForMemLeaks()&&this.state.numDataMovesStack.push(0);let o;this.backendName==null&&this.backend;let i,l=x3(e)?e.kernelName:this.state.activeScope!=null?this.state.activeScope.name:"";if(x3(e)){let{kernelName:h,inputs:f,attrs:m}=e;this.backendName==null&&this.backend;let g=Cm(h,this.backendName);O(g!=null,()=>`Cannot find registered kernel '${h}' for backend '${this.backendName}'`),o=()=>{let y=this.backend.numDataIds();i=g.kernelFunc({inputs:f,attrs:m,backend:this.backend});let x=Array.isArray(i)?i:[i];this.shouldCheckForMemLeaks()&&this.checkKernelForMemLeak(h,y,x);let A=x.map(b=>b.rank!=null?b:this.makeTensorFromTensorInfo(b));if(s){let b=this.getTensorsForGradient(h,f,A);n=this.saveTensorsForBackwardMode(b)}return A}}else{let{forwardFunc:h}=e,f=m=>{!s||(n=m.map(g=>this.keep(this.clone(g))))};o=()=>{let m=this.backend.numDataIds();i=this.tidy(()=>h(this.backend,f));let g=Array.isArray(i)?i:[i];return this.shouldCheckForMemLeaks()&&this.checkKernelForMemLeak(l,m,g),g}}let{inputs:u,attrs:c}=e,p=x3(e)?null:e.backwardsFunc,d;return this.scopedRun(()=>this.state.kernelDepth++,()=>this.state.kernelDepth--,()=>{!this.ENV.getBool("DEBUG")&&!this.state.profiling?t=o():(d=this.profiler.profileKernel(l,u,()=>o()),this.ENV.getBool("DEBUG")&&this.profiler.logKernelProfile(d),t=d.outputs)}),s&&this.addTapeNode(l,u,t,p,n,c),this.state.profiling&&this.state.activeProfile.kernels.push({name:l,bytesAdded:this.state.numBytes-r,totalBytesSnapshot:this.state.numBytes,tensorsAdded:this.state.numTensors-a,totalTensorsSnapshot:this.state.numTensors,inputShapes:Object.keys(u).map(h=>u[h]!=null?u[h].shape:null),outputShapes:t.map(h=>h.shape),kernelTimeMs:d.timeMs,extraInfo:d.extraInfo}),Array.isArray(i)?t:t[0]}saveTensorsForBackwardMode(e){return e.map(n=>this.keep(this.clone(n)))}getTensorsForGradient(e,t,n){let s=$3(e);if(s!=null){let r=s.inputsToSave||[],a=s.outputsToSave||[],o;s.saveAllInputs?(O(Array.isArray(t),()=>"saveAllInputs is true, expected inputs to be an array."),o=Object.keys(t).map(l=>t[l])):o=r.map(l=>t[l]);let i=n.filter((l,u)=>a[u]);return o.concat(i)}return[]}makeTensor(e,t,n,s){if(e==null)throw new Error("Values passed to engine.makeTensor() are null");n=n||"float32",s=s||this.backend;let r=e;n==="string"&&Ja(e[0])&&(r=e.map(i=>uh(i)));let a=s.write(r,t,n),o=new it(t,n,a,this.nextTensorId());if(this.trackTensor(o,s),n==="string"){let i=this.state.tensorInfo.get(a),l=N6(r);this.state.numBytes+=l-i.bytes,i.bytes=l}return o}makeTensorFromDataId(e,t,n,s){n=n||"float32";let r={dataId:e,shape:t,dtype:n};return this.makeTensorFromTensorInfo(r,s)}makeTensorFromTensorInfo(e,t){let{dataId:n,shape:s,dtype:r}=e,a=new it(s,r,n,this.nextTensorId());return this.trackTensor(a,t),a}makeVariable(e,t=!0,n,s){n=n||this.nextVariableId().toString(),s!=null&&s!==e.dtype&&(e=e.cast(s));let r=new Np(e,t,n,this.nextTensorId());if(this.state.registeredVariables[r.name]!=null)throw new Error(`Variable with name ${r.name} was already registered`);return this.state.registeredVariables[r.name]=r,this.incRef(r,this.backend),r}trackTensor(e,t){this.state.numTensors++,e.dtype==="string"&&this.state.numStringTensors++;let n=0;e.dtype!=="complex64"&&e.dtype!=="string"&&(n=e.size*D3(e.dtype)),this.state.numBytes+=n,this.state.tensorInfo.has(e.dataId)||(this.state.numDataBuffers++,this.state.tensorInfo.set(e.dataId,{backend:t||this.backend,dtype:e.dtype,shape:e.shape,bytes:n})),e instanceof Np||this.track(e)}incRef(e,t){this.trackTensor(e,t),this.backend.incRef(e.dataId)}removeDataId(e,t){this.state.tensorInfo.has(e)&&this.state.tensorInfo.get(e).backend===t&&(this.state.tensorInfo.delete(e),this.state.numDataBuffers--)}disposeTensor(e){if(!this.state.tensorInfo.has(e.dataId))return;let t=this.state.tensorInfo.get(e.dataId);if(this.state.numTensors--,e.dtype==="string"&&(this.state.numStringTensors--,this.state.numBytes-=t.bytes),e.dtype!=="complex64"&&e.dtype!=="string"){let n=e.size*D3(e.dtype);this.state.numBytes-=n}t.backend.disposeData(e.dataId)&&this.removeDataId(e.dataId,t.backend)}disposeVariables(){for(let e in this.state.registeredVariables){let t=this.state.registeredVariables[e];this.disposeVariable(t)}}disposeVariable(e){this.disposeTensor(e),this.state.registeredVariables[e.name]!=null&&delete this.state.registeredVariables[e.name]}memory(){let e=this.backend.memory();return e.numTensors=this.state.numTensors,e.numDataBuffers=this.state.numDataBuffers,e.numBytes=this.state.numBytes,this.state.numStringTensors>0&&(e.unreliable=!0,e.reasons==null&&(e.reasons=[]),e.reasons.push("Memory usage by string tensors is approximate (2 bytes per character)")),e}async profile(e){this.state.profiling=!0;let t=this.state.numBytes,n=this.state.numTensors;this.state.activeProfile.kernels=[],this.state.activeProfile.result=await e(),this.state.profiling=!1,this.state.activeProfile.peakBytes=Math.max(...this.state.activeProfile.kernels.map(s=>s.totalBytesSnapshot)),this.state.activeProfile.newBytes=this.state.numBytes-t,this.state.activeProfile.newTensors=this.state.numTensors-n;for(let s of this.state.activeProfile.kernels)s.kernelTimeMs=await s.kernelTimeMs,s.extraInfo=await s.extraInfo;return this.state.activeProfile}isTapeOn(){return this.state.gradientDepth>0&&this.state.kernelDepth===0}addTapeNode(e,t,n,s,r,a){let o={id:this.state.nextTapeNodeId++,kernelName:e,inputs:t,outputs:n,saved:r},i=$3(e);i!=null&&(s=i.gradFunc),s!=null&&(o.gradient=l=>(l=l.map((u,c)=>{if(u==null){let p=n[c],d=t0(p.size,p.dtype);return this.makeTensor(d,p.shape,p.dtype)}return u}),s(l.length>1?l:l[0],r,a))),this.state.activeTape.push(o)}keep(e){return e.kept=!0,e}startTape(){this.state.gradientDepth===0&&(this.state.activeTape=[]),this.state.gradientDepth++}endTape(){this.state.gradientDepth--}startScope(e){let t={track:[],name:"unnamed scope",id:this.state.nextScopeId++};e&&(t.name=e),this.state.scopeStack.push(t),this.state.activeScope=t}endScope(e){let t=Gy(e),n=new Set(t.map(r=>r.id));for(let r=0;r{!r.kept&&r.scopeId===s.id&&this.track(r)})}gradients(e,t,n,s=!1){if(O(t.length>0,()=>"gradients() received an empty list of xs."),n!=null&&n.dtype!=="float32")throw new Error(`dy must have 'float32' dtype, but has '${n.dtype}'`);let r=this.scopedRun(()=>this.startTape(),()=>this.endTape(),()=>this.tidy("forward",e));O(r instanceof it,()=>"The result y returned by f() must be a tensor.");let a=GD(this.state.activeTape,t,r);if(!s&&a.length===0&&t.length>0)throw new Error("Cannot compute gradient of y=f(x) with respect to x. Make sure that the f you passed encloses all operations that lead from x to y.");return this.tidy("backward",()=>{let o={};o[r.id]=n==null?t$(r.shape):n,HD(o,a,l=>this.tidy(l),n$);let i=t.map(l=>o[l.id]);return this.state.gradientDepth===0&&(this.state.activeTape.forEach(l=>{for(let u of l.saved)u.dispose()}),this.state.activeTape=null),{value:r,grads:i}})}customGrad(e){return O(ro(e),()=>"The f passed in customGrad(f) must be a function."),(...t)=>{O(t.every(o=>o instanceof it),()=>"The args passed in customGrad(f)(x1, x2,...) must all be tensors");let n,s={};t.forEach((o,i)=>{s[i]=o});let r=(o,i)=>(n=e(...t,i),O(n.value instanceof it,()=>"The function f passed in customGrad(f) must return an object where `obj.value` is a tensor"),O(ro(n.gradFunc),()=>"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function."),n.value),a=(o,i)=>{let l=n.gradFunc(o,i),u=Array.isArray(l)?l:[l];O(u.length===t.length,()=>"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function that returns the same number of tensors as inputs passed to f(...)."),O(u.every(p=>p instanceof it),()=>"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function that returns a list of only tensors.");let c={};return u.forEach((p,d)=>{c[d]=()=>p}),c};return this.runKernelFunc({forwardFunc:r,backwardsFunc:a,inputs:s})}}readSync(e){return this.state.tensorInfo.get(e).backend.readSync(e)}read(e){return this.state.tensorInfo.get(e).backend.read(e)}readToGPU(e,t){return this.state.tensorInfo.get(e).backend.readToGPU(e,t)}async time(e){let t=Tp(),n=await this.backend.time(e);return n.wallMs=Tp()-t,n}track(e){return this.state.activeScope!=null&&(e.scopeId=this.state.activeScope.id,this.state.activeScope.track.push(e)),e}get registeredVariables(){return this.state.registeredVariables}reset(){this.pendingBackendInitId++,this.state.dispose(),this.ENV.reset(),this.state=new Ov;for(let e in this.registry)this.disposeRegisteredKernels(e),this.registry[e].dispose(),delete this.registry[e];this.backendName=null,this.backendInstance=null,this.pendingBackendInit=null}};Ep.nextTensorId=0;Ep.nextVariableId=0;function t$(e){let t=zy(Et(e),"float32");return B.makeTensor(t,e,"float32")}function U6(){let e=$6();if(e._tfengine==null){let t=new D6(e);e._tfengine=new Ep(t)}return SD(e._tfengine.ENV),KD(()=>e._tfengine),e._tfengine}var B=U6();function n$(e,t){let n={a:e,b:t};return B.runKernel(Da,n)}var dh={};qe(dh,{isBrowser:()=>G6,isMobile:()=>a$,mockIsMobile:()=>r$});function s$(){return typeof navigator!="undefined"&&navigator!=null}var B3;function r$(e){B3=e}function a$(e){if(B3!==void 0)return B3;if(e||s$()){if(e||(e=navigator),e.product==="ReactNative")return!0;let t=e.userAgent||e.vendor||(typeof window!="undefined"?window.opera:"");if(!t){let n=e;return n.userAgentData&&n.userAgentData.mobile}return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4))}return!1}function G6(){return typeof window!="undefined"&&window.document!=null||typeof WorkerGlobalScope!="undefined"}var tr=H();tr.registerFlag("DEBUG",()=>!1,e=>{e&&console.warn("Debugging mode is ON. The output of every math call will be downloaded to CPU and checked for NaNs. This significantly impacts performance.")});tr.registerFlag("IS_BROWSER",()=>G6());tr.registerFlag("IS_NODE",()=>typeof process!="undefined"&&typeof process.versions!="undefined"&&typeof process.versions.node!="undefined");tr.registerFlag("IS_CHROME",()=>typeof navigator!="undefined"&&navigator!=null&&navigator.userAgent!=null&&/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor));tr.registerFlag("PROD",()=>!1);tr.registerFlag("TENSORLIKE_CHECK_SHAPE_CONSISTENCY",()=>tr.getBool("DEBUG"));tr.registerFlag("DEPRECATION_WARNINGS_ENABLED",()=>!0);tr.registerFlag("IS_TEST",()=>!1);tr.registerFlag("CHECK_COMPUTATION_FOR_ERRORS",()=>!0);tr.registerFlag("WRAP_TO_IMAGEBITMAP",()=>!1);tr.registerFlag("ENGINE_COMPILE_ONLY",()=>!1);tr.registerFlag("CANVAS2D_WILL_READ_FREQUENTLY_FOR_GPU",()=>!1);function aa(e,t){let n=e;if(Un(e))return t==="string"?[]:[e.length];if(!Array.isArray(e))return[];let s=[];for(;Array.isArray(n)||Un(n)&&t!=="string";)s.push(n.length),n=n[0];return Array.isArray(e)&&H().getBool("TENSORLIKE_CHECK_SHAPE_CONSISTENCY")&&H6(e,s,[]),s}function H6(e,t,n){if(n=n||[],!Array.isArray(e)&&!Un(e)){O(t.length===0,()=>`Element arr[${n.join("][")}] is a primitive, but should be an array/TypedArray of ${t[0]} elements`);return}O(t.length>0,()=>`Element arr[${n.join("][")}] should be a primitive, but is an array of ${e.length} elements`),O(e.length===t[0],()=>`Element arr[${n.join("][")}] should have ${t[0]} elements, but has ${e.length} elements`);let s=t.slice(1);for(let r=0;r=0&&(r=s),Mv(s,r,t,n),e==null||!Un(e)&&!Array.isArray(e)&&typeof e!="number"&&typeof e!="boolean"&&typeof e!="string"){let l=e==null?"null":e.constructor.name;throw new Error(`Argument '${t}' passed to '${n}' must be a Tensor or TensorLike, but got '${l}'`)}let a=aa(e,r);!Un(e)&&!Array.isArray(e)&&(e=[e]);let i=r!=="string"?T0(e,r):ol(e,[],!0);return B.makeTensor(i,a,r)}function Rp(e,t,n,s="numeric"){if(!Array.isArray(e))throw new Error(`Argument ${t} passed to ${n} must be a \`Tensor[]\` or \`TensorLike[]\``);return e.map((a,o)=>D(a,`${t}[${o}]`,n,s))}var Hy="__op";function W(e){let t=Object.keys(e);if(t.length!==1)throw new Error(`Please provide an object with a single key (operation name) mapping to a function. Got an object with ${t.length} keys.`);let n=t[0],s=e[n];n.endsWith("_")&&(n=n.substring(0,n.length-1)),n=n+Hy;let r=(...a)=>{B.startScope(n);try{let o=s(...a);return By(o)&&console.error("Cannot return a Promise inside of tidy."),B.endScope(o),o}catch(o){throw B.endScope(null),o}};return Object.defineProperty(r,"name",{value:n,configurable:!0}),r}function o$(e,t){let n=D(e,"real","complex"),s=D(t,"imag","complex");ds(n.shape,s.shape,`real and imag shapes, ${n.shape} and ${s.shape}, must match in call to tf.complex().`);let r={real:n,imag:s};return B.runKernel(jp,r)}var Ta=W({complex_:o$});function hi(e,t,n,s){if(s==null&&(s=e0(e)),s==="complex64")throw new Error("Cannot construct a complex64 tensor directly. Please use tf.complex(real, imag).");if(!Un(e)&&!Array.isArray(e)&&typeof e!="number"&&typeof e!="boolean"&&typeof e!="string")throw new Error("values passed to tensor(values) must be a number/boolean/string or an array of numbers/booleans/strings, or a TypedArray");if(t!=null){Ly(t);let r=Et(t),a=Et(n);O(r===a,()=>`Based on the provided shape, [${t}], the tensor should have ${r} values but has ${a}`);for(let o=0;o`Error creating a new Tensor. Inferred shape (${n}) does not match the provided shape (${t}). `)}}return!Un(e)&&!Array.isArray(e)&&(e=[e]),t=t||n,e=s!=="string"?T0(e,s):ol(e,[],!0),B.makeTensor(e,t,s)}function Xe(e,t,n){let s=aa(e,n);return hi(e,t,s,n)}var W3={float32:4,float16:2,int32:4,uint16:2,uint8:1,bool:1,complex64:8},Nm=4;async function i$(e,t){let n=[],s=[],r=Array.isArray(e)?e.map(o=>o.name):Object.keys(e);for(let o=0;o{let d=await l.bytes(),h=d.reduce((g,y)=>g+y.length,0)+Nm*d.length,f=new Uint8Array(h),m=0;for(let g=0;g{if(t+=a.byteLength,n.push(a.byteLength===a.buffer.byteLength?a:new a.constructor(a)),!(a instanceof Float32Array||a instanceof Int32Array||a instanceof Uint8Array))throw new Error(`Unsupported TypedArray subtype: ${a.constructor.name}`)});let s=new Uint8Array(t),r=0;return n.forEach(a=>{s.set(new Uint8Array(a.buffer),r),r+=a.byteLength}),s.buffer}var jy=typeof Buffer!="undefined"&&(typeof Blob=="undefined"||typeof atob=="undefined"||typeof btoa=="undefined");function zv(e){return jy?Buffer.byteLength(e):new Blob([e]).size}function u$(e){if(jy)return Buffer.from(e).toString("base64");let t=new Uint8Array(e),n="";for(let s=0,r=t.length;s{t+=r.byteLength});let n=new Uint8Array(t),s=0;return e.forEach(r=>{n.set(new Uint8Array(r),s),s+=r.byteLength}),n.buffer}function Lv(e){let t="/";for(e=e.trim();e.endsWith(t);)e=e.slice(0,e.length-1);let n=e.split(t);return n[n.length-1]}function q6(e,t){let n={modelTopology:e.modelTopology,format:e.format,generatedBy:e.generatedBy,convertedBy:e.convertedBy,weightsManifest:t};return e.signature!=null&&(n.signature=e.signature),e.userDefinedMetadata!=null&&(n.userDefinedMetadata=e.userDefinedMetadata),e.modelInitializer!=null&&(n.modelInitializer=e.modelInitializer),e.trainingConfig!=null&&(n.trainingConfig=e.trainingConfig),n}async function Xy(e,t){let n={modelTopology:e.modelTopology,format:e.format,generatedBy:e.generatedBy,convertedBy:e.convertedBy};if(e.trainingConfig!=null&&(n.trainingConfig=e.trainingConfig),e.weightsManifest!=null){let[s,r]=await t(e.weightsManifest);n.weightSpecs=s,n.weightData=r}return e.signature!=null&&(n.signature=e.signature),e.userDefinedMetadata!=null&&(n.userDefinedMetadata=e.userDefinedMetadata),e.modelInitializer!=null&&(n.modelInitializer=e.modelInitializer),n}function ph(e){if(e.modelTopology instanceof ArrayBuffer)throw new Error("Expected JSON model topology, received ArrayBuffer.");return{dateSaved:new Date,modelTopologyType:"JSON",modelTopologyBytes:e.modelTopology==null?0:zv(JSON.stringify(e.modelTopology)),weightSpecsBytes:e.weightSpecs==null?0:zv(JSON.stringify(e.weightSpecs)),weightDataBytes:e.weightData==null?0:e.weightData.byteLength}}function d$(){let e=n=>{let s=n<<13,r=0;for(;(s&8388608)===0;)r-=8388608,s<<=1;return s&=-8388609,r+=947912704,s|r},t=new Uint32Array(2048);t[0]=0;for(let n=1;n<1024;n++)t[n]=e(n);for(let n=1024;n<2048;n++)t[n]=939524096+(n-1024<<13);return t}function p$(){let e=new Uint32Array(64);e[0]=0,e[31]=1199570944,e[32]=2147483648,e[63]=3347054592;for(let t=1;t<31;t++)e[t]=t<<23;for(let t=33;t<63;t++)e[t]=2147483648+(t-32<<23);return e}function h$(){let e=new Uint32Array(64);for(let t=0;t<64;t++)e[t]=1024;return e[0]=e[32]=0,e}function f$(){let e=d$(),t=p$(),n=h$();return s=>{let r=new ArrayBuffer(4*s.length),a=new Uint32Array(r);for(let o=0;o>10]+(i&1023)]+t[i>>10];a[o]=l}return new Float32Array(r)}}var Yt=class{constructor(){this.saveRouters=[],this.loadRouters=[]}static getInstance(){return Yt.instance==null&&(Yt.instance=new Yt),Yt.instance}static registerSaveRouter(e){Yt.getInstance().saveRouters.push(e)}static registerLoadRouter(e){Yt.getInstance().loadRouters.push(e)}static getSaveHandlers(e){return Yt.getHandlers(e,"save")}static getLoadHandlers(e,t){return Yt.getHandlers(e,"load",t)}static getHandlers(e,t,n){let s=[];return(t==="load"?Yt.getInstance().loadRouters:Yt.getInstance().saveRouters).forEach(a=>{let o=a(e,n);o!==null&&s.push(o)}),s}},m$=e=>Yt.registerSaveRouter(e),g$=e=>Yt.registerLoadRouter(e),y$=e=>Yt.getSaveHandlers(e),A$=(e,t)=>Yt.getLoadHandlers(e,t),V3="tensorflowjs",U3=1,Ji="models_store",Qa="model_info_store";function X6(){if(!H().getBool("IS_BROWSER"))throw new Error("Failed to obtain IndexedDB factory because the current environmentis not a web browser.");let e=typeof window=="undefined"?self:window,t=e.indexedDB||e.mozIndexedDB||e.webkitIndexedDB||e.msIndexedDB||e.shimIndexedDB;if(t==null)throw new Error("The current browser does not appear to support IndexedDB.");return t}function G3(e){let t=e.result;t.createObjectStore(Ji,{keyPath:"modelPath"}),t.createObjectStore(Qa,{keyPath:"modelPath"})}var il=class{constructor(e){if(this.indexedDB=X6(),e==null||!e)throw new Error("For IndexedDB, modelPath must not be null, undefined or empty.");this.modelPath=e}async save(e){if(e.modelTopology instanceof ArrayBuffer)throw new Error("BrowserLocalStorage.save() does not support saving model topology in binary formats yet.");return this.databaseAction(this.modelPath,e)}async load(){return this.databaseAction(this.modelPath)}databaseAction(e,t){return new Promise((n,s)=>{let r=this.indexedDB.open(V3,U3);r.onupgradeneeded=()=>G3(r),r.onsuccess=()=>{let a=r.result;if(t==null){let o=a.transaction(Ji,"readonly"),l=o.objectStore(Ji).get(this.modelPath);l.onsuccess=()=>{if(l.result==null)return a.close(),s(new Error(`Cannot find model with path '${this.modelPath}' in IndexedDB.`));n(l.result.modelArtifacts)},l.onerror=u=>(a.close(),s(l.error)),o.oncomplete=()=>a.close()}else{let o=ph(t),i=a.transaction(Qa,"readwrite"),l=i.objectStore(Qa),u=l.put({modelPath:this.modelPath,modelArtifactsInfo:o}),c;u.onsuccess=()=>{c=a.transaction(Ji,"readwrite");let d=c.objectStore(Ji).put({modelPath:this.modelPath,modelArtifacts:t,modelArtifactsInfo:o});d.onsuccess=()=>n({modelArtifactsInfo:o}),d.onerror=h=>{l=i.objectStore(Qa);let f=l.delete(this.modelPath);f.onsuccess=()=>(a.close(),s(d.error)),f.onerror=m=>(a.close(),s(d.error))}},u.onerror=p=>(a.close(),s(u.error)),i.oncomplete=()=>{c==null?a.close():c.oncomplete=()=>a.close()}}},r.onerror=a=>s(r.error)})}};il.URL_SCHEME="indexeddb://";var K6=e=>H().getBool("IS_BROWSER")&&!Array.isArray(e)&&e.startsWith(il.URL_SCHEME)?x$(e.slice(il.URL_SCHEME.length)):null;Yt.registerSaveRouter(K6);Yt.registerLoadRouter(K6);function x$(e){return new il(e)}function b$(e){return e.startsWith(il.URL_SCHEME)?e.slice(il.URL_SCHEME.length):e}var v$=class{constructor(){this.indexedDB=X6()}async listModels(){return new Promise((e,t)=>{let n=this.indexedDB.open(V3,U3);n.onupgradeneeded=()=>G3(n),n.onsuccess=()=>{let s=n.result,r=s.transaction(Qa,"readonly"),o=r.objectStore(Qa).getAll();o.onsuccess=()=>{let i={};for(let l of o.result)i[l.modelPath]=l.modelArtifactsInfo;e(i)},o.onerror=i=>(s.close(),t(o.error)),r.oncomplete=()=>s.close()},n.onerror=s=>t(n.error)})}async removeModel(e){return e=b$(e),new Promise((t,n)=>{let s=this.indexedDB.open(V3,U3);s.onupgradeneeded=()=>G3(s),s.onsuccess=()=>{let r=s.result,a=r.transaction(Qa,"readwrite"),o=a.objectStore(Qa),i=o.get(e),l;i.onsuccess=()=>{if(i.result==null)return r.close(),n(new Error(`Cannot find model with path '${e}' in IndexedDB.`));{let u=o.delete(e),c=()=>{l=r.transaction(Ji,"readwrite");let d=l.objectStore(Ji).delete(e);d.onsuccess=()=>t(i.result.modelArtifactsInfo),d.onerror=h=>n(i.error)};u.onsuccess=c,u.onerror=p=>(c(),r.close(),n(i.error))}},i.onerror=u=>(r.close(),n(i.error)),a.oncomplete=()=>{l==null?r.close():l.oncomplete=()=>r.close()}},s.onerror=r=>n(s.error)})}},ka="/",nc="tensorflowjs_models",Z6="info",w$="model_topology",k$="weight_specs",S$="weight_data",I$="model_metadata";function Y6(e){return{info:[nc,e,Z6].join(ka),topology:[nc,e,w$].join(ka),weightSpecs:[nc,e,k$].join(ka),weightData:[nc,e,S$].join(ka),modelMetadata:[nc,e,I$].join(ka)}}function J6(e){for(let t of Object.values(e))window.localStorage.removeItem(t)}function C$(e){let t=e.split(ka);if(t.length<3)throw new Error(`Invalid key format: ${e}`);return t.slice(1,t.length-1).join(ka)}function T$(e){return e.startsWith(ll.URL_SCHEME)?e.slice(ll.URL_SCHEME.length):e}var ll=class{constructor(e){if(!H().getBool("IS_BROWSER")||typeof window=="undefined"||typeof window.localStorage=="undefined")throw new Error("The current environment does not support local storage.");if(this.LS=window.localStorage,e==null||!e)throw new Error("For local storage, modelPath must not be null, undefined or empty.");this.modelPath=e,this.keys=Y6(this.modelPath)}async save(e){if(e.modelTopology instanceof ArrayBuffer)throw new Error("BrowserLocalStorage.save() does not support saving model topology in binary formats yet.");{let t=JSON.stringify(e.modelTopology),n=JSON.stringify(e.weightSpecs),s=ph(e);try{this.LS.setItem(this.keys.info,JSON.stringify(s)),this.LS.setItem(this.keys.topology,t),this.LS.setItem(this.keys.weightSpecs,n),this.LS.setItem(this.keys.weightData,u$(e.weightData));let r={format:e.format,generatedBy:e.generatedBy,convertedBy:e.convertedBy,signature:e.signature!=null?e.signature:void 0,userDefinedMetadata:e.userDefinedMetadata!=null?e.userDefinedMetadata:void 0,modelInitializer:e.modelInitializer!=null?e.modelInitializer:void 0,trainingConfig:e.trainingConfig!=null?e.trainingConfig:void 0};return this.LS.setItem(this.keys.modelMetadata,JSON.stringify(r)),{modelArtifactsInfo:s}}catch(r){throw J6(this.keys),new Error(`Failed to save model '${this.modelPath}' to local storage: size quota being exceeded is a possible cause of this failure: modelTopologyBytes=${s.modelTopologyBytes}, weightSpecsBytes=${s.weightSpecsBytes}, weightDataBytes=${s.weightDataBytes}.`)}}}async load(){let e=JSON.parse(this.LS.getItem(this.keys.info));if(e==null)throw new Error(`In local storage, there is no model with name '${this.modelPath}'`);if(e.modelTopologyType!=="JSON")throw new Error("BrowserLocalStorage does not support loading non-JSON model topology yet.");let t={},n=JSON.parse(this.LS.getItem(this.keys.topology));if(n==null)throw new Error(`In local storage, the topology of model '${this.modelPath}' is missing.`);t.modelTopology=n;let s=JSON.parse(this.LS.getItem(this.keys.weightSpecs));if(s==null)throw new Error(`In local storage, the weight specs of model '${this.modelPath}' are missing.`);t.weightSpecs=s;let r=this.LS.getItem(this.keys.modelMetadata);if(r!=null){let o=JSON.parse(r);t.format=o.format,t.generatedBy=o.generatedBy,t.convertedBy=o.convertedBy,o.signature!=null&&(t.signature=o.signature),o.userDefinedMetadata!=null&&(t.userDefinedMetadata=o.userDefinedMetadata),o.modelInitializer!=null&&(t.modelInitializer=o.modelInitializer),o.trainingConfig!=null&&(t.trainingConfig=o.trainingConfig)}let a=this.LS.getItem(this.keys.weightData);if(a==null)throw new Error(`In local storage, the binary weight values of model '${this.modelPath}' are missing.`);return t.weightData=c$(a),t}};ll.URL_SCHEME="localstorage://";var Q6=e=>H().getBool("IS_BROWSER")&&!Array.isArray(e)&&e.startsWith(ll.URL_SCHEME)?N$(e.slice(ll.URL_SCHEME.length)):null;Yt.registerSaveRouter(Q6);Yt.registerLoadRouter(Q6);function N$(e){return new ll(e)}var E$=class{constructor(){O(H().getBool("IS_BROWSER"),()=>"Current environment is not a web browser"),O(typeof window=="undefined"||typeof window.localStorage!="undefined",()=>"Current browser does not appear to support localStorage"),this.LS=window.localStorage}async listModels(){let e={},t=nc+ka,n=ka+Z6;for(let s=0;s"scheme must not be undefined or null."),e.endsWith(ac)&&(e=e.slice(0,e.indexOf(ac))),O(e.length>0,()=>"scheme must not be an empty string.");let n=As.getInstance();O(n.managers[e]==null,()=>`A model store manager is already registered for scheme '${e}'.`),n.managers[e]=t}static getManager(e){let t=As.getInstance().managers[e];if(t==null)throw new Error(`Cannot find model manager for scheme '${e}'`);return t}static getSchemes(){return Object.keys(As.getInstance().managers)}};function pm(e){if(e.indexOf(ac)===-1)throw new Error(`The url string provided does not contain a scheme. Supported schemes are: ${As.getSchemes().join(",")}`);return{scheme:e.split(ac)[0],path:e.split(ac)[1]}}async function ew(e,t,n=!1){O(e!==t,()=>`Old path and new path are the same: '${e}'`);let s=Yt.getLoadHandlers(e);O(s.length>0,()=>`Copying failed because no load handler is found for source URL ${e}.`),O(s.length<2,()=>`Copying failed because more than one (${s.length}) load handlers for source URL ${e}.`);let r=s[0],a=Yt.getSaveHandlers(t);O(a.length>0,()=>`Copying failed because no save handler is found for destination URL ${t}.`),O(a.length<2,()=>`Copying failed because more than one (${s.length}) save handlers for destination URL ${t}.`);let o=a[0],i=pm(e).scheme,l=pm(e).path,u=i===pm(e).scheme,c=await r.load();n&&u&&await As.getManager(i).removeModel(l);let p=await o.save(c);return n&&!u&&await As.getManager(i).removeModel(l),p.modelArtifactsInfo}async function R$(){let e=As.getSchemes(),t={};for(let n of e){let s=await As.getManager(n).listModels();for(let r in s){let a=n+ac+r;t[a]=s[r]}}return t}async function _$(e){let t=pm(e);return As.getManager(t.scheme).removeModel(t.path)}async function D$(e,t){return ew(e,t,!1)}async function $$(e,t){return ew(e,t,!0)}var P$=class{fetch(e,t){return fetch(e,t)}now(){return performance.now()}encode(e,t){if(t!=="utf-8"&&t!=="utf8")throw new Error(`Browser's encoder only supports utf-8, but got ${t}`);return this.textEncoder==null&&(this.textEncoder=new TextEncoder),this.textEncoder.encode(e)}decode(e,t){return new TextDecoder(t).decode(e)}};if(H().get("IS_BROWSER")){H().setPlatform("browser",new P$);try{As.registerManager(ll.URL_SCHEME,new E$)}catch(e){}try{As.registerManager(il.URL_SCHEME,new v$)}catch(e){}}var F$={importFetch:()=>V_()},b3,O$=class{constructor(){this.util=U_(),this.textEncoder=new this.util.TextEncoder}fetch(e,t){return H().global.fetch!=null?H().global.fetch(e,t):(b3==null&&(b3=F$.importFetch()),b3(e,t))}now(){let e=process.hrtime();return e[0]*1e3+e[1]/1e6}encode(e,t){if(t!=="utf-8"&&t!=="utf8")throw new Error(`Node built-in encoder only supports utf-8, but got ${t}`);return this.textEncoder.encode(e)}decode(e,t){return e.length===0?"":new this.util.TextDecoder(t).decode(e)}};H().get("IS_NODE")&&!H().get("IS_BROWSER")&&H().setPlatform("node",new O$);function Ue(e,t="float32",n){return t=t||"float32",Ly(e),new An(e,t,n)}function M$(e,t){let n=D(e,"x","cast");if(!T6(t))throw new Error(`Failed to cast to unknown dtype ${t}`);if(t==="string"&&n.dtype!=="string"||t!=="string"&&n.dtype==="string")throw new Error("Only strings can be casted to strings");let s={x:n},r={dtype:t};return B.runKernel(ko,s,r)}var ge=W({cast_:M$});function z$(e){let n={x:D(e,"x","clone","string_or_numeric")};return B.runKernel(zo,n)}var Gn=W({clone_:z$});function Ky(e,t=!1){console.log(e.toString(t))}U6();var L$={buffer:Ue,cast:ge,clone:Gn,print:Ky};ZD(L$);var Fs={};qe(Fs,{browserFiles:()=>j$,browserHTTPRequest:()=>Y$,concatenateArrayBuffers:()=>qy,copyModel:()=>D$,decodeWeights:()=>j6,encodeWeights:()=>i$,fromMemory:()=>Q$,fromMemorySync:()=>aw,getLoadHandlers:()=>A$,getModelArtifactsForJSON:()=>Xy,getModelArtifactsInfoForJSON:()=>ph,getSaveHandlers:()=>y$,http:()=>Yy,isHTTPScheme:()=>H3,listModels:()=>R$,loadWeights:()=>q$,moveModel:()=>$$,registerLoadRouter:()=>g$,registerSaveRouter:()=>m$,removeModel:()=>_$,weightsLoaderFactory:()=>nw,withSaveHandler:()=>eP,withSaveHandlerSync:()=>tP});var B$="model",W$=".json",V$=".weights.bin";function Bv(e){return new Promise(t=>setTimeout(t)).then(e)}var dc=class{constructor(e){if(!H().getBool("IS_BROWSER"))throw new Error("browserDownloads() cannot proceed because the current environment is not a browser.");e.startsWith(dc.URL_SCHEME)&&(e=e.slice(dc.URL_SCHEME.length)),(e==null||e.length===0)&&(e=B$),this.modelJsonFileName=e+W$,this.weightDataFileName=e+V$}async save(e){if(typeof document=="undefined")throw new Error("Browser downloads are not supported in this environment since `document` is not present");let t=window.URL.createObjectURL(new Blob([e.weightData],{type:"application/octet-stream"}));if(e.modelTopology instanceof ArrayBuffer)throw new Error("BrowserDownloads.save() does not support saving model topology in binary formats yet.");{let n=[{paths:["./"+this.weightDataFileName],weights:e.weightSpecs}],s=q6(e,n),r=window.URL.createObjectURL(new Blob([JSON.stringify(s)],{type:"application/json"})),a=this.modelJsonAnchor==null?document.createElement("a"):this.modelJsonAnchor;if(a.download=this.modelJsonFileName,a.href=r,await Bv(()=>a.dispatchEvent(new MouseEvent("click"))),e.weightData!=null){let o=this.weightDataAnchor==null?document.createElement("a"):this.weightDataAnchor;o.download=this.weightDataFileName,o.href=t,await Bv(()=>o.dispatchEvent(new MouseEvent("click")))}return{modelArtifactsInfo:ph(e)}}}};dc.URL_SCHEME="downloads://";var U$=class{constructor(e){if(e==null||e.length<1)throw new Error(`When calling browserFiles, at least 1 file is required, but received ${e}`);this.jsonFile=e[0],this.weightsFiles=e.slice(1)}async load(){return new Promise((e,t)=>{let n=new FileReader;n.onload=s=>{let r=JSON.parse(s.target.result),a=r.modelTopology;if(a==null){t(new Error(`modelTopology field is missing from file ${this.jsonFile.name}`));return}if(r.weightsManifest==null){t(new Error(`weightManifest field is missing from file ${this.jsonFile.name}`));return}if(this.weightsFiles.length===0){e({modelTopology:a});return}let i=Xy(r,l=>this.loadWeights(l));e(i)},n.onerror=s=>t(`Failed to read model topology and weights manifest JSON from file '${this.jsonFile.name}'. BrowserFiles supports loading Keras-style tf.Model artifacts only.`),n.readAsText(this.jsonFile)})}loadWeights(e){let t=[],n=[];for(let a of e)t.push(...a.weights),n.push(...a.paths);let s=this.checkManifestAndWeightFiles(e),r=n.map(a=>this.loadWeightsFile(a,s[a]));return Promise.all(r).then(a=>[t,qy(a)])}loadWeightsFile(e,t){return new Promise((n,s)=>{let r=new FileReader;r.onload=a=>{let o=a.target.result;n(o)},r.onerror=a=>s(`Failed to weights data from file of path '${e}'.`),r.readAsArrayBuffer(t)})}checkManifestAndWeightFiles(e){let t=[],n=this.weightsFiles.map(r=>Lv(r.name)),s={};for(let r of e)r.paths.forEach(a=>{let o=Lv(a);if(t.indexOf(o)!==-1)throw new Error(`Duplicate file basename found in weights manifest: '${o}'`);if(t.push(o),n.indexOf(o)===-1)throw new Error(`Weight file with basename '${o}' is not provided.`);s[a]=this.weightsFiles[n.indexOf(o)]});if(t.length!==this.weightsFiles.length)throw new Error(`Mismatch in the number of files in weights manifest (${t.length}) and the number of weight files provided (${this.weightsFiles.length}).`);return s}},G$=e=>H().getBool("IS_BROWSER")&&!Array.isArray(e)&&e.startsWith(dc.URL_SCHEME)?H$(e.slice(dc.URL_SCHEME.length)):null;Yt.registerSaveRouter(G$);function H$(e="model"){return new dc(e)}function j$(e){return new U$(e)}function Wv(e,t,n,s){o(e),n=n==null?0:n,s=s==null?1:s,i(n,s);let r=0,a=l=>(l.then(u=>{let c=n+ ++r/e.length*(s-n);return t(c),u}),l);function o(l){O(l!=null&&Array.isArray(l)&&l.length>0,()=>"promises must be a none empty array")}function i(l,u){O(l>=0&&l<=1,()=>`Progress fraction must be in range [0, 1], but got startFraction ${l}`),O(u>=0&&u<=1,()=>`Progress fraction must be in range [0, 1], but got endFraction ${u}`),O(u>=l,()=>`startFraction must be no more than endFraction, but got startFraction ${l} and endFraction ${u}`)}return Promise.all(e.map(a))}async function tw(e,t){t==null&&(t={});let n=t.fetchFunc==null?H().platform.fetch:t.fetchFunc,s=e.map(p=>n(p,t.requestInit,{isBinary:!0})),r=0,a=.5,i=(t.onProgress==null?await Promise.all(s):await Wv(s,t.onProgress,r,a)).map(p=>p.arrayBuffer()),l=.5,u=1;return t.onProgress==null?await Promise.all(i):await Wv(i,t.onProgress,l,u)}async function q$(e,t="",n,s){return nw(o=>tw(o,{requestInit:s}))(e,t,n)}function nw(e){return async(t,n="",s)=>{let r=t.map(()=>!1),a={},o=s!=null?s.map(()=>!1):[],i=[];if(t.forEach((h,f)=>{let m=0;h.weights.forEach(g=>{let y="quantization"in g?g.quantization.dtype:g.dtype,x=W3[y]*Et(g.shape),A=()=>{r[f]=!0,a[f]==null&&(a[f]=[]),a[f].push({manifestEntry:g,groupOffset:m,sizeBytes:x})};s!=null?s.forEach((b,w)=>{b===g.name&&(A(),o[w]=!0)}):A(),i.push(g.name),m+=x})}),!o.every(h=>h)){let h=s.filter((f,m)=>!o[m]);throw new Error(`Could not find weights in manifest with names: ${h.join(", ")}. -Manifest JSON has weights with names: ${i.join(", ")}.`)}let l=r.reduce((h,f,m)=>(f&&h.push(m),h),[]),u=[];l.forEach(h=>{t[h].paths.forEach(f=>{let m=n+(n.endsWith("/")?"":"/")+f;u.push(m)})});let c=await e(u),p={},d=0;return l.forEach(h=>{let f=t[h].paths.length,m=0;for(let b=0;b{let w=g.slice(b.groupOffset,b.groupOffset+b.sizeBytes),k=j6(w,[b.manifestEntry]);for(let C in k)p[C]=k[C]}),d+=f}),p}}var X$="application/octet-stream",K$="application/json",Zy=class{constructor(e,t){if(this.DEFAULT_METHOD="POST",t==null&&(t={}),this.weightPathPrefix=t.weightPathPrefix,this.onProgress=t.onProgress,this.weightUrlConverter=t.weightUrlConverter,t.fetchFunc!=null?(O(typeof t.fetchFunc=="function",()=>"Must pass a function that matches the signature of `fetch` (see https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)"),this.fetch=t.fetchFunc):this.fetch=H().platform.fetch,O(e!=null&&e.length>0,()=>"URL path for http must not be null, undefined or empty."),Array.isArray(e)&&O(e.length===2,()=>`URL paths for http must have a length of 2, (actual length is ${e.length}).`),this.path=e,t.requestInit!=null&&t.requestInit.body!=null)throw new Error("requestInit is expected to have no pre-existing body, but has one.");this.requestInit=t.requestInit||{}}async save(e){if(e.modelTopology instanceof ArrayBuffer)throw new Error("BrowserHTTPRequest.save() does not support saving model topology in binary formats yet.");let t=Object.assign({method:this.DEFAULT_METHOD},this.requestInit);t.body=new FormData;let n=[{paths:["./model.weights.bin"],weights:e.weightSpecs}],s=q6(e,n);t.body.append("model.json",new Blob([JSON.stringify(s)],{type:K$}),"model.json"),e.weightData!=null&&t.body.append("model.weights.bin",new Blob([e.weightData],{type:X$}),"model.weights.bin");let r=await this.fetch(this.path,t);if(r.ok)return{modelArtifactsInfo:ph(e),responses:[r]};throw new Error(`BrowserHTTPRequest.save() failed due to HTTP response status ${r.status}.`)}async load(){let e=await this.fetch(this.path,this.requestInit);if(!e.ok)throw new Error(`Request to ${this.path} failed with status code ${e.status}. Please verify this URL points to the model JSON of the model to load.`);let t;try{t=await e.json()}catch(r){let a=`Failed to parse model JSON of response from ${this.path}.`;throw this.path.endsWith(".pb")?a+=" Your path contains a .pb file extension. Support for .pb models have been removed in TensorFlow.js 1.0 in favor of .json models. You can re-convert your Python TensorFlow model using the TensorFlow.js 1.0 conversion scripts or you can convert your.pb models with the 'pb2json'NPM script in the tensorflow/tfjs-converter repository.":a+=" Please make sure the server is serving valid JSON for this request.",new Error(a)}let n=t.modelTopology,s=t.weightsManifest;if(n==null&&s==null)throw new Error(`The JSON from HTTP path ${this.path} contains neither model topology or manifest for weights.`);return Xy(t,r=>this.loadWeights(r))}async loadWeights(e){let t=Array.isArray(this.path)?this.path[1]:this.path,[n,s]=Z$(t),r=this.weightPathPrefix||n,a=[];for(let u of e)a.push(...u.weights);let o=[],i=[];for(let u of e)for(let c of u.paths)this.weightUrlConverter!=null?i.push(this.weightUrlConverter(c)):o.push(r+c+s);this.weightUrlConverter&&o.push(...await Promise.all(i));let l=await tw(o,{requestInit:this.requestInit,fetchFunc:this.fetch,onProgress:this.onProgress});return[a,qy(l)]}};Zy.URL_SCHEME_REGEX=/^https?:\/\//;function Z$(e){let t=e.lastIndexOf("/"),n=e.lastIndexOf("?"),s=e.substring(0,t),r=n>t?e.substring(n):"";return[s+"/",r]}function H3(e){return e.match(Zy.URL_SCHEME_REGEX)!=null}var sw=(e,t)=>{if(typeof fetch=="undefined"&&(t==null||t.fetchFunc==null))return null;{let n=!0;if(Array.isArray(e)?n=e.every(s=>H3(s)):n=H3(e),n)return Yy(e,t)}return null};Yt.registerSaveRouter(sw);Yt.registerLoadRouter(sw);function Yy(e,t){return new Zy(e,t)}function Y$(e,t){return Yy(e,t)}var v3=class{constructor(e){this.modelArtifacts=e}load(){return this.modelArtifacts}},rw=class{constructor(e){this.saveHandler=e}save(e){return this.saveHandler(e)}},J$=class{constructor(e){e.load&&(this.load=()=>Promise.resolve(e.load())),e.save&&(this.save=t=>Promise.resolve(e.save(t)))}};function Q$(e,t,n,s){let r=arguments;return new J$(aw(...r))}function aw(e,t,n,s){return arguments.length===1?e.modelTopology!=null||e.weightSpecs!=null?new v3(e):(console.warn("Please call tf.io.fromMemory() with only one argument. The argument should be of type ModelArtifacts. The multi-argument signature of tf.io.fromMemory() has been deprecated and will be removed in a future release."),new v3({modelTopology:e})):(console.warn("Please call tf.io.fromMemory() with only one argument. The argument should be of type ModelArtifacts. The multi-argument signature of tf.io.fromMemory() has been deprecated and will be removed in a future release."),new v3({modelTopology:e,weightSpecs:t,weightData:n,trainingConfig:s}))}function eP(e){return new rw(e)}function tP(e){return new rw(e)}var ow={};qe(ow,{confusionMatrix:()=>yP});function nP(e,t,n=!1,s=!1){let r=D(e,"a","matMul"),a=D(t,"b","matMul");[r,a]=Xt(r,a);let o={a:r,b:a},i={transposeA:n,transposeB:s};return B.runKernel(wo,o,i)}var rt=W({matMul_:nP});function sP(e,t,n=1,s=0,r="int32"){if(t<2)throw new Error(`Error in oneHot: depth must be >=2, but it is ${t}`);let o={indices:D(e,"indices","oneHot","int32")},i={dtype:r,depth:t,onValue:n,offValue:s};return B.runKernel(Ul,o,i)}var pc=W({oneHot_:sP});function Jy(){H().set("PROD",!0)}function rP(){H().set("DEBUG",!0)}function aP(){H().set("DEPRECATION_WARNINGS_ENABLED",!1),console.warn("TensorFlow.js deprecation warnings have been disabled.")}function Qy(e){H().getBool("DEPRECATION_WARNINGS_ENABLED")&&console.warn(e+" You can disable deprecation warnings with tf.disableDeprecationWarnings().")}YD(Qy);function oP(){B.disposeVariables()}function Qt(){return B}function Em(){return B.memory()}function iP(e){return B.profile(e)}function Y(e,t){return B.tidy(e,t)}function Q(e){Gy(e).forEach(n=>n.dispose())}function Tn(e){return B.keep(e)}function lP(e){return B.time(e)}function hh(e){return B.setBackend(e)}function fh(){return B.ready()}function dn(){return B.backendName}function uP(e){B.removeBackend(e)}function eA(e){return B.findBackend(e)}function cP(e){return B.findBackendFactory(e)}function lu(e,t,n=1){return B.registerBackend(e,t,n)}function Us(){return B.backend}function dP(e,t){H().setPlatform(e,t)}function pP(e){let n={input:D(e,"input","imag")};return B.runKernel(Yp,n)}var mh=W({imag_:pP});function hP(e){let n={x:D(e,"x","neg")};return B.runKernel(zl,n)}var Pt=W({neg_:hP});function fP(e){let n={input:D(e,"input","real")};return B.runKernel(eh,n)}var hc=W({real_:fP});function mP(e,t,n){let s=D(e,"x","transpose");if(t==null&&(t=s.shape.map((o,i)=>i).reverse()),O(s.rank===t.length,()=>`Error in transpose: rank of input ${s.rank} must match length of perm ${t}.`),t.forEach(o=>{O(o>=0&&o`All entries in 'perm' must be between 0 and ${s.rank-1} but got ${t}`)}),s.rank<=1)return s.clone();let r={x:s},a={perm:t};return s.dtype==="complex64"?Y(()=>{let o=hc(s),i=mh(s);return o=B.runKernel(na,{x:o},a),i=B.runKernel(na,{x:i},a),n&&(i=Pt(i)),Ta(o,i)}):B.runKernel(na,r,a)}var at=W({transpose_:mP});function gP(e,t,n){let s=D(e,"labels","confusionMatrix"),r=D(t,"predictions","confusionMatrix");O(n==null||n>0&&Number.isInteger(n),()=>`If provided, numClasses must be a positive integer, but got ${n}`),O(s.rank===1,()=>`Expected the rank of labels to be 1, but got ${s.rank}`),O(r.rank===1,()=>`Expected the rank of predictions to be 1, but got ${r.rank}`),O(s.shape[0]===r.shape[0],()=>`Mismatch in the number of examples: ${s.shape[0]} vs. ${r.shape[0]}. Labels and predictions should have the same number of elements.`),O(n>0&&Number.isInteger(n),()=>`numClasses is required to be a positive integer, but got ${n}`);let a=pc(ge(s,"int32"),n),o=pc(ge(r,"int32"),n),i=at(a),l=rt(i,o);return ge(l,"int32")}var yP=W({confusionMatrix_:gP}),uu={};qe(uu,{assertAndGetBroadcastShape:()=>St,getBroadcastDims:()=>iw,getReductionAxes:()=>ln});function iw(e,t){let n=e.length,s=[];for(let r=0;r1&&o===1&&s.unshift(a)}return s}function ln(e,t){let n=[];for(let s=0;s1)&&n.unshift(a)}return n}function St(e,t){let n=[],s=Math.max(e.length,t.length);for(let r=0;rSP,fromPixelsAsync:()=>wP,toPixels:()=>kP});function tA(e,t,n){if(Al(e),t!=null&&t.length!==3)throw new Error("tensor3d() requires shape to have three numbers");let s=aa(e,n);if(s.length!==3&&s.length!==1)throw new Error("tensor3d() requires values to be number[][][] or flat/TypedArray");if(s.length===1&&t==null)throw new Error("tensor3d() requires shape to be provided when `values` are a flat array");return hi(e,t,s,n)}var Ui;function lw(e,t=3){if(t>4)throw new Error("Cannot construct Tensor with more than 4 channels from pixels.");if(e==null)throw new Error("pixels passed to tf.browser.fromPixels() can not be null");let n=!1,s=!1,r=!1,a=!1,o=!1,i=!1;if(e.data instanceof Uint8Array)n=!0;else if(typeof ImageData!="undefined"&&e instanceof ImageData)s=!0;else if(typeof HTMLVideoElement!="undefined"&&e instanceof HTMLVideoElement)r=!0;else if(typeof HTMLImageElement!="undefined"&&e instanceof HTMLImageElement)a=!0;else if(e.getContext!=null)o=!0;else if(typeof ImageBitmap!="undefined"&&e instanceof ImageBitmap)i=!0;else throw new Error(`pixels passed to tf.browser.fromPixels() must be either an HTMLVideoElement, HTMLImageElement, HTMLCanvasElement, ImageData in browser, or OffscreenCanvas, ImageData in webworker or {data: Uint32Array, width: number, height: number}, but was ${e.constructor.name}`);if(Cm(Ip,B.backendName)!=null){let f={pixels:e},m={numChannels:t};return B.runKernel(Ip,f,m)}let[u,c]=r?[e.videoWidth,e.videoHeight]:[e.width,e.height],p;if(o)p=e.getContext("2d").getImageData(0,0,u,c).data;else if(s||n)p=e.data;else if(a||r||i){if(Ui==null)if(typeof document=="undefined")if(typeof OffscreenCanvas!="undefined"&&typeof OffscreenCanvasRenderingContext2D!="undefined")Ui=new OffscreenCanvas(1,1).getContext("2d");else throw new Error("Cannot parse input in current context. Reason: OffscreenCanvas Context2D rendering is not supported.");else Ui=document.createElement("canvas").getContext("2d",{willReadFrequently:!0});Ui.canvas.width=u,Ui.canvas.height=c,Ui.drawImage(e,0,0,u,c),p=Ui.getImageData(0,0,u,c).data}let d;if(t===4)d=new Int32Array(p);else{let f=u*c;d=new Int32Array(f*t);for(let m=0;m4||a===2)throw new Error(`toPixels only supports depth of size 1, 3 or 4 but got ${a}`);if(n.dtype!=="float32"&&n.dtype!=="int32")throw new Error(`Unsupported type for toPixels: ${n.dtype}. Please use float32 or int32 tensors.`);let o=await n.data(),i=n.dtype==="float32"?255:1,l=new Uint8ClampedArray(r*s*4);for(let u=0;u1)throw new Error(`Tensor values for a float32 Tensor must be in the range [0 - 1] but encountered ${h}.`)}else if(n.dtype==="int32"&&(h<0||h>255))throw new Error(`Tensor values for a int32 Tensor must be in the range [0 - 255] but encountered ${h}.`);a===1?(c[0]=h*i,c[1]=h*i,c[2]=h*i):c[d]=h*i}let p=u*4;l[p+0]=Math.round(c[0]),l[p+1]=Math.round(c[1]),l[p+2]=Math.round(c[2]),l[p+3]=Math.round(c[3])}if(t!=null){t.width=r,t.height=s;let u=t.getContext("2d"),c=new ImageData(l,r,s);u.putImageData(c,0,0)}return n!==e&&n.dispose(),l}var SP=W({fromPixels_:lw}),nA={};qe(nA,{prepareAndValidate:()=>uw});function uw(e,t){let n=e.shape.length,s=t.shape.length;if(n<1)throw new Error(`tf.gatherND() expects the input to be rank 1 or higher, but the rank was ${n}.`);if(s<1)throw new Error(`tf.gatherND() expects the indices to be rank 1 or higher, but the rank was ${s}.`);if(t.dtype!=="int32")throw new Error(`tf.gatherND() expects the indices to be int32 type, but the dtype was ${t.dtype}.`);if(t.shape[s-1]>n)throw new Error(`index innermost dimension length must be <= tensor rank; saw: ${t.shape[s-1]} vs. ${n}`);if(Et(e.shape)===0)throw new Error(`Requested more than 0 entries, but input is empty. Input shape: ${e.shape}.`);let r=t.shape,a=r[r.length-1],o=1;for(let p=0;pp/u),1].slice(0,a);return[l,o,u,c]}var sA={};qe(sA,{calculateShapes:()=>cw,validateInput:()=>aA,validateUpdateShape:()=>rA});function rA(e,t,n){let s=t.rank>1?t.shape[t.rank-1]:1,r=t.rank>1?t.rank-1:1,a=`Must have updates.shape = indices.shape[:batchDim] + shape[sliceDim:], got updates.shape: ${n.shape}, indices.shape: ${t.shape}, shape: ${e}, sliceDim: ${s}, and batchDim: ${r}.`;if(n.rank1?t.shape[s-1]:1,a=n.length,o=1;for(let p=r;pCP,computeFlatOffset:()=>_P,computeOutShape:()=>NP,getNormalizedAxes:()=>EP,isSliceContinous:()=>RP,maskToAxes:()=>TP,parseSliceParams:()=>xw,sliceInfo:()=>DP,startForAxis:()=>yw,startIndicesWithElidedDims:()=>fw,stopForAxis:()=>Aw,stopIndicesWithElidedDims:()=>mw,stridesForAxis:()=>gw,stridesWithElidedDims:()=>dw});var j3=-2,IP=-1;function CP(e,t,n){let s=e.shape.length;O(s===t.length,()=>`Error in slice${s}D: Length of begin ${t} must match the rank of the array (${s}).`),O(s===n.length,()=>`Error in slice${s}D: Length of size ${n} must match the rank of the array (${s}).`);for(let r=0;r`Error in slice${s}D: begin[${r}] + size[${r}] (${t[r]+n[r]}) would overflow input.shape[${r}] (${e.shape[r]})`)}function TP(e){let t=[],n=0;for(;e>0;)e&1&&t.push(n),e/=2,n++;return t}function NP(e,t,n){let s=[];for(let r=0;r0){let h=t[0],f=n+1;c=fw(o,h,f,s,e),p=mw(i,h,f,r,e),d=dw(a,h,f,e)}else for(let h=0;h-1)a[i]=0;else{let l=pw(t,n,i),u=s[l];e&1<-1)a[i]=Number.MAX_SAFE_INTEGER;else{let l=pw(t,n,i),u=s[l];e&1<0?o=Number.MIN_SAFE_INTEGER:o=Number.MAX_SAFE_INTEGER);let l=s[r];return o<0&&(o+=l),o=Sp(0,o,l-1),o}function Aw(e,t,n,s,r,a){let o=t[r],i=n[r]||1;(e&1<0?o=Number.MAX_SAFE_INTEGER:o=Number.MIN_SAFE_INTEGER);let l=s[r];return o<0&&(o+=l),i>0?o=Sp(0,o,l):o=Sp(-1,o,l-1),o}function RP(e,t,n){let s=n.length;for(let r=0;r1){s=r;break}for(let r=s+1;r0||n[r]!==e[r])return!1;return!0}function _P(e,t){let n=e.length>0?e[e.length-1]:1;for(let s=0;s{O(o!==-1,()=>"slice() does not support negative begin indexing.")});let a;return n==null?a=new Array(r).fill(-1):typeof n=="number"?a=[n,...new Array(r-1).fill(-1)]:n.lengtho>=0?o:(O(o===-1,()=>`Negative size values should be exactly -1 but got ${o} for the slice() size at index ${i}.`),e.shape[i]-s[i])),[s,a]}function DP(e,t,n,s,r,a,o,i,l){let u;if(s==null?(u=new Array(t.length),u.fill(1)):u=s,o!=null&&(o&o-1)!==0)throw new Error("Multiple ellipses in slice is not allowed.");let c=!1,p={dims:u.length,numAddAxisAfterEllipsis:0,begin:t.slice(),end:n.slice(),strides:u.slice(),beginMask:r,endMask:a,ellipsisMask:o,newAxisMask:i,shrinkAxisMask:l};for(let A=0;A0?0:-1,d.strides[A]>0?w:w-1];if(b&&d.strides[A]<=0)throw Error("only stride 1 allowed on non-range indexing.");m=m&&d.strides[A]===1;let E=!!(d.beginMask&1<=w)throw Error(`slice index ${d.begin[A]} of dimension ${A} out of bounds.`)}else d.begin[A]=Vv(d.begin[A],0,d.strides[A],w,k,C),d.end[A]=Vv(d.end[A],1,d.strides[A],w,k,C);let R=d.strides[A]===1&&d.begin[A]===0&&d.end[A]===w;h=h&&R,f=f&&(A===0&&d.strides[A]===1||R)}else h=h&&d.strides[A]===1&&E,f=f&&(A===0&&d.strides[A]===1||E);let _,$=!1;if(d.beginValid&&d.endValid?(_=d.end[A]-d.begin[A],$=!0):b?(_=1,$=!0):E&&w>=0&&(d.strides[A]<0?_=-w:_=w,$=!0),$){let R;_===0||_<0!=d.strides[A]<0?R=0:R=Math.trunc(_/d.strides[A])+(_%d.strides[A]!==0?1:0),g.push(R)}else g.push(-1)}for(let A=0;A=0?y.push(g[b]):b===j3&&y.push(1)}return{finalShapeSparse:y.filter((A,b)=>d.finalShapeGatherIndices[b]!==j3),finalShape:y,isIdentity:h,sliceDim0:f,isSimpleSlice:m,begin:d.begin,end:d.end,strides:d.strides}}function $P(e,t){t.beginMask=0,t.endMask=0,t.shrinkAxisMask=0;let n=0;t.beginValid=e.begin!=null,t.endValid=e.end!=null,t.begin=new Array(t.dims),t.end=new Array(t.dims),t.strides=new Array(t.dims),t.finalShapeGatherIndices=[],t.finalShapeGatherIndicesSparse=[],t.inputShapeGatherIndicesSparse=new Array(t.dims);for(let s=0;s0?a[t]:a[t+1&1];{let o=e<0?s+e:e;return oa[1]?a[1]:o}}var he={};qe(he,{Serializable:()=>bw,SerializationMap:()=>Ki,registerClass:()=>fi});var bw=class{getClassName(){return this.constructor.className}static fromConfig(e,t){return new e(t)}},Ki=class{constructor(){this.classNameMap={}}static getMap(){return Ki.instance==null&&(Ki.instance=new Ki),Ki.instance}static register(e){Ki.getMap().classNameMap[e.className]=[e,e.fromConfig]}};function fi(e){O(e.className!=null,()=>"Class being registered does not have the static className property defined."),O(typeof e.className=="string",()=>"className is required to be a string, but got type "+typeof e.className),O(e.className.length>0,()=>"Class being registered has an empty-string as its className, which is disallowed."),Ki.register(e)}var vw={};qe(vw,{TEST_EPSILON_FLOAT16:()=>ww,createVideoElement:()=>WP,encodeStrings:()=>kw,expectArrayBuffersEqual:()=>BP,expectArraysClose:()=>FP,expectArraysEqual:()=>MP,expectNumbersClose:()=>zP,expectPromiseToFail:()=>OP,expectValuesInRange:()=>LP,play:()=>VP,testEpsilon:()=>oA});var PP=.001,ww=.1;function FP(e,t,n){return n==null&&(n=oA()),q3(e,t,(s,r)=>iA(s,r,n))}function oA(){return B.backend.floatPrecision()===32?PP:ww}function q3(e,t,n){let s=!0;if((Un(e)||Un(t))&&(s=!1),Un(e)&&Un(t)&&(s=!0),s){let o=e.constructor.name,i=t.constructor.name;if(o!==i)throw new Error(`Arrays are of different type. Actual: ${o}. Expected: ${i}`)}if(Array.isArray(e)&&Array.isArray(t)){let o=aa(e),i=aa(t);if(!Ao(o,i))throw new Error(`Arrays have different shapes. Actual: [${o}]. Expected: [${i}]`)}let r=Un(e)?e:ol(e),a=Un(t)?t:ol(t);if(r.length!==a.length)throw new Error(`Arrays have different lengths actual: ${r.length} vs expected: ${a.length}. +`;return d[d.length-1]=" "+d[d.length-1]+"]"+(a?"":f),d}function jd(e){let t=[];for(let n=0;n`Length of values '${s}' does not match the size inferred by the shape '${this.size}'.`)}if(t==="complex64")throw new Error("complex64 dtype TensorBuffers are not supported. Please create a TensorBuffer for the real and imaginary parts separately and call tf.complex(real, imag).");this.values=n||ow(t,this.size),this.strides=mc(e)}set(e,...t){t.length===0&&(t=[0]),P(t.length===this.rank,()=>`The number of provided coordinates (${t.length}) must match the rank (${this.rank})`);let n=this.locToIndex(t);this.values[n]=e}get(...e){e.length===0&&(e=[0]);let t=0;for(let s of e){if(s<0||s>=this.shape[t]){let r=`Requested out of range element at ${e}. Buffer shape=${this.shape}`;throw new Error(r)}t++}let n=e[e.length-1];for(let s=0;srm(n))}catch(n){throw new Error("Failed to decode the string bytes into utf-8. To get the original bytes, call tensor.bytes().")}}return e}dataToGPU(e){return this.throwIfDisposed(),Nr().readToGPU(this.dataId,e)}dataSync(){this.throwIfDisposed();let e=Nr().readSync(this.dataId);if(this.dtype==="string")try{return e.map(t=>rm(t))}catch(t){throw new Error("Failed to decode the string bytes into utf-8. To get the original bytes, call tensor.bytes().")}return e}async bytes(){this.throwIfDisposed();let e=await Nr().read(this.dataId);return this.dtype==="string"?e:new Uint8Array(e.buffer)}dispose(){this.isDisposed||(Nr().disposeTensor(this),this.isDisposedInternal=!0)}get isDisposed(){return this.isDisposedInternal}throwIfDisposed(){if(this.isDisposed)throw new Error("Tensor is disposed.")}print(e=!1){return Uu.print(this,e)}clone(){return this.throwIfDisposed(),Uu.clone(this)}toString(e=!1){let t=this.dataSync();return gD(t,this.shape,this.dtype,e)}cast(e){return this.throwIfDisposed(),Uu.cast(this,e)}variable(e=!0,t,n){return this.throwIfDisposed(),Nr().makeVariable(this,e,t,n)}};Object.defineProperty(st,Symbol.hasInstance,{value:e=>!!e&&e.data!=null&&e.dataSync!=null&&e.throwIfDisposed!=null});function se(){return vy("Tensor",()=>st)}se();var dp=class extends st{constructor(e,t,n,s){super(e.shape,e.dtype,e.dataId,s),this.trainable=t,this.name=n}assign(e){if(e.dtype!==this.dtype)throw new Error(`dtype of the new value (${e.dtype}) and previous value (${this.dtype}) must match`);if(!mo(e.shape,this.shape))throw new Error(`shape of the new value (${e.shape}) and previous value (${this.shape}) must match`);Nr().disposeTensor(this),this.dataId=e.dataId,Nr().incRef(this,null)}dispose(){Nr().disposeVariable(this),this.isDisposedInternal=!0}};Object.defineProperty(dp,Symbol.hasInstance,{value:e=>e instanceof st&&e.assign!=null&&e.assign instanceof Function});var Dr={};We(Dr,{assertTypesMatch:()=>ww,getTensorsInContainer:()=>ky,isTensorInList:()=>kD,makeTypesMatch:()=>jt});var f3;(function(e){e.R0="R0",e.R1="R1",e.R2="R2",e.R3="R3",e.R4="R4",e.R5="R5",e.R6="R6"})(f3||(f3={}));var m3;(function(e){e.float32="float32",e.int32="int32",e.bool="int32",e.complex64="complex64"})(m3||(m3={}));var g3;(function(e){e.float32="float32",e.int32="int32",e.bool="bool",e.complex64="complex64"})(g3||(g3={}));var y3;(function(e){e.float32="float32",e.int32="float32",e.bool="float32",e.complex64="complex64"})(y3||(y3={}));var A3;(function(e){e.float32="complex64",e.int32="complex64",e.bool="complex64",e.complex64="complex64"})(A3||(A3={}));var wD={float32:y3,int32:m3,bool:g3,complex64:A3};function jn(e,t){if(e==="string"||t==="string"){if(e==="string"&&t==="string")return"string";throw new Error(`Can not upcast ${e} with ${t}`)}return wD[e][t]}function qp(e){return jn(e,"int32")}function jt(e,t){if(e.dtype===t.dtype)return[e,t];let n=jn(e.dtype,t.dtype);return[e.cast(n),t.cast(n)]}function ww(e,t){P(e.dtype===t.dtype,()=>`The dtypes of the first(${e.dtype}) and second(${t.dtype}) input must match`)}function kD(e,t){return t.some(n=>n.id===e.id)}function ky(e){let t=[];return kw(e,t,new Set),t}function kw(e,t,n){if(e==null)return;if(e instanceof st){t.push(e);return}if(!SD(e))return;let s=e;for(let r in s){let a=s[r];n.has(a)||(n.add(a),kw(a,t,n))}}function SD(e){return Array.isArray(e)||typeof e=="object"}function Jg(e){return e.kernelName!=null}var fv=class{constructor(){this.registeredVariables={},this.nextTapeNodeId=0,this.numBytes=0,this.numTensors=0,this.numStringTensors=0,this.numDataBuffers=0,this.gradientDepth=0,this.kernelDepth=0,this.scopeStack=[],this.numDataMovesStack=[],this.nextScopeId=0,this.tensorInfo=new WeakMap,this.profiling=!1,this.activeProfile={newBytes:0,newTensors:0,peakBytes:0,kernels:[],result:null,get kernelNames(){return Array.from(new Set(this.kernels.map(e=>e.name)))}}}dispose(){for(let e in this.registeredVariables)this.registeredVariables[e].dispose()}},pp=class{constructor(e){this.ENV=e,this.registry={},this.registryFactory={},this.pendingBackendInitId=0,this.state=new fv}async ready(){if(this.pendingBackendInit!=null)return this.pendingBackendInit.then(()=>{});if(this.backendInstance!=null)return;let e=this.getSortedBackends();for(let t=0;t{t.setupFunc!=null&&t.setupFunc(this.backendInstance)})}disposeRegisteredKernels(e){ea(e).forEach(n=>{n.disposeFunc!=null&&n.disposeFunc(this.registry[e])})}initializeBackend(e){let t=this.registryFactory[e];if(t==null)throw new Error(`Cannot initialize backend ${e}, no registration found.`);try{let n=t.factory();if(n&&!(n instanceof fc)&&typeof n.then=="function"){let s=++this.pendingBackendInitId,r=n.then(a=>s(sthis.registryFactory[t].priority-this.registryFactory[e].priority)}initializeBackendsAndReturnBest(){let e=this.getSortedBackends();for(let t=0;tthis.startScope(n),()=>this.endScope(s),()=>(s=t(),s instanceof Promise&&console.error("Cannot return a Promise inside of tidy."),s))}scopedRun(e,t,n){e();try{let s=n();return t(),s}catch(s){throw t(),s}}nextTensorId(){return pp.nextTensorId++}nextVariableId(){return pp.nextVariableId++}clone(e){let t=L.runKernel(Fo,{x:e}),n={x:e},s=a=>({x:()=>{let o="float32",i={x:a},l={dtype:o};return L.runKernel(bo,i,l)}}),r=[];return this.addTapeNode(this.state.activeScope.name,n,[t],s,r,{}),t}runKernel(e,t,n){if(this.backendName==null&&this.backend,!(sm(e,this.backendName)!=null))throw new Error(`Kernel '${e}' not registered for backend '${this.backendName}'`);return this.runKernelFunc({kernelName:e,inputs:t,attrs:n})}shouldCheckForMemLeaks(){return this.ENV.getBool("IS_TEST")}checkKernelForMemLeak(e,t,n){let s=this.backend.numDataIds(),r=0;n.forEach(i=>{r+=i.dtype==="complex64"?3:1});let a=this.state.numDataMovesStack[this.state.numDataMovesStack.length-1],o=s-t-r-a;if(o>0)throw new Error(`Backend '${this.backendName}' has an internal memory leak (${o} data ids) after running '${e}'`)}runKernelFunc(e){let t,n=[],s=this.isTapeOn(),r=this.state.numBytes,a=this.state.numTensors;this.shouldCheckForMemLeaks()&&this.state.numDataMovesStack.push(0);let o;this.backendName==null&&this.backend;let i,l=Jg(e)?e.kernelName:this.state.activeScope!=null?this.state.activeScope.name:"";if(Jg(e)){let{kernelName:h,inputs:f,attrs:m}=e;this.backendName==null&&this.backend;let g=sm(h,this.backendName);P(g!=null,()=>`Cannot find registered kernel '${h}' for backend '${this.backendName}'`),o=()=>{let y=this.backend.numDataIds();i=g.kernelFunc({inputs:f,attrs:m,backend:this.backend});let x=Array.isArray(i)?i:[i];this.shouldCheckForMemLeaks()&&this.checkKernelForMemLeak(h,y,x);let A=x.map(b=>b.rank!=null?b:this.makeTensorFromTensorInfo(b));if(s){let b=this.getTensorsForGradient(h,f,A);n=this.saveTensorsForBackwardMode(b)}return A}}else{let{forwardFunc:h}=e,f=m=>{!s||(n=m.map(g=>this.keep(this.clone(g))))};o=()=>{let m=this.backend.numDataIds();i=this.tidy(()=>h(this.backend,f));let g=Array.isArray(i)?i:[i];return this.shouldCheckForMemLeaks()&&this.checkKernelForMemLeak(l,m,g),g}}let{inputs:u,attrs:c}=e,p=Jg(e)?null:e.backwardsFunc,d;return this.scopedRun(()=>this.state.kernelDepth++,()=>this.state.kernelDepth--,()=>{!this.ENV.getBool("DEBUG")&&!this.state.profiling?t=o():(d=this.profiler.profileKernel(l,u,()=>o()),this.ENV.getBool("DEBUG")&&this.profiler.logKernelProfile(d),t=d.outputs)}),s&&this.addTapeNode(l,u,t,p,n,c),this.state.profiling&&this.state.activeProfile.kernels.push({name:l,bytesAdded:this.state.numBytes-r,totalBytesSnapshot:this.state.numBytes,tensorsAdded:this.state.numTensors-a,totalTensorsSnapshot:this.state.numTensors,inputShapes:Object.keys(u).map(h=>u[h]!=null?u[h].shape:null),outputShapes:t.map(h=>h.shape),kernelTimeMs:d.timeMs,extraInfo:d.extraInfo}),Array.isArray(i)?t:t[0]}saveTensorsForBackwardMode(e){return e.map(n=>this.keep(this.clone(n)))}getTensorsForGradient(e,t,n){let s=p3(e);if(s!=null){let r=s.inputsToSave||[],a=s.outputsToSave||[],o;s.saveAllInputs?(P(Array.isArray(t),()=>"saveAllInputs is true, expected inputs to be an array."),o=Object.keys(t).map(l=>t[l])):o=r.map(l=>t[l]);let i=n.filter((l,u)=>a[u]);return o.concat(i)}return[]}makeTensor(e,t,n,s){if(e==null)throw new Error("Values passed to engine.makeTensor() are null");n=n||"float32",s=s||this.backend;let r=e;n==="string"&&Ka(e[0])&&(r=e.map(i=>jp(i)));let a=s.write(r,t,n),o=new st(t,n,a,this.nextTensorId());if(this.trackTensor(o,s),n==="string"){let i=this.state.tensorInfo.get(a),l=uw(r);this.state.numBytes+=l-i.bytes,i.bytes=l}return o}makeTensorFromDataId(e,t,n,s){n=n||"float32";let r={dataId:e,shape:t,dtype:n};return this.makeTensorFromTensorInfo(r,s)}makeTensorFromTensorInfo(e,t){let{dataId:n,shape:s,dtype:r}=e,a=new st(s,r,n,this.nextTensorId());return this.trackTensor(a,t),a}makeVariable(e,t=!0,n,s){n=n||this.nextVariableId().toString(),s!=null&&s!==e.dtype&&(e=e.cast(s));let r=new dp(e,t,n,this.nextTensorId());if(this.state.registeredVariables[r.name]!=null)throw new Error(`Variable with name ${r.name} was already registered`);return this.state.registeredVariables[r.name]=r,this.incRef(r,this.backend),r}trackTensor(e,t){this.state.numTensors++,e.dtype==="string"&&this.state.numStringTensors++;let n=0;e.dtype!=="complex64"&&e.dtype!=="string"&&(n=e.size*d3(e.dtype)),this.state.numBytes+=n,this.state.tensorInfo.has(e.dataId)||(this.state.numDataBuffers++,this.state.tensorInfo.set(e.dataId,{backend:t||this.backend,dtype:e.dtype,shape:e.shape,bytes:n})),e instanceof dp||this.track(e)}incRef(e,t){this.trackTensor(e,t),this.backend.incRef(e.dataId)}removeDataId(e,t){this.state.tensorInfo.has(e)&&this.state.tensorInfo.get(e).backend===t&&(this.state.tensorInfo.delete(e),this.state.numDataBuffers--)}disposeTensor(e){if(!this.state.tensorInfo.has(e.dataId))return;let t=this.state.tensorInfo.get(e.dataId);if(this.state.numTensors--,e.dtype==="string"&&(this.state.numStringTensors--,this.state.numBytes-=t.bytes),e.dtype!=="complex64"&&e.dtype!=="string"){let n=e.size*d3(e.dtype);this.state.numBytes-=n}t.backend.disposeData(e.dataId)&&this.removeDataId(e.dataId,t.backend)}disposeVariables(){for(let e in this.state.registeredVariables){let t=this.state.registeredVariables[e];this.disposeVariable(t)}}disposeVariable(e){this.disposeTensor(e),this.state.registeredVariables[e.name]!=null&&delete this.state.registeredVariables[e.name]}memory(){let e=this.backend.memory();return e.numTensors=this.state.numTensors,e.numDataBuffers=this.state.numDataBuffers,e.numBytes=this.state.numBytes,this.state.numStringTensors>0&&(e.unreliable=!0,e.reasons==null&&(e.reasons=[]),e.reasons.push("Memory usage by string tensors is approximate (2 bytes per character)")),e}async profile(e){this.state.profiling=!0;let t=this.state.numBytes,n=this.state.numTensors;this.state.activeProfile.kernels=[],this.state.activeProfile.result=await e(),this.state.profiling=!1,this.state.activeProfile.peakBytes=Math.max(...this.state.activeProfile.kernels.map(s=>s.totalBytesSnapshot)),this.state.activeProfile.newBytes=this.state.numBytes-t,this.state.activeProfile.newTensors=this.state.numTensors-n;for(let s of this.state.activeProfile.kernels)s.kernelTimeMs=await s.kernelTimeMs,s.extraInfo=await s.extraInfo;return this.state.activeProfile}isTapeOn(){return this.state.gradientDepth>0&&this.state.kernelDepth===0}addTapeNode(e,t,n,s,r,a){let o={id:this.state.nextTapeNodeId++,kernelName:e,inputs:t,outputs:n,saved:r},i=p3(e);i!=null&&(s=i.gradFunc),s!=null&&(o.gradient=l=>(l=l.map((u,c)=>{if(u==null){let p=n[c],d=_m(p.size,p.dtype);return this.makeTensor(d,p.shape,p.dtype)}return u}),s(l.length>1?l:l[0],r,a))),this.state.activeTape.push(o)}keep(e){return e.kept=!0,e}startTape(){this.state.gradientDepth===0&&(this.state.activeTape=[]),this.state.gradientDepth++}endTape(){this.state.gradientDepth--}startScope(e){let t={track:[],name:"unnamed scope",id:this.state.nextScopeId++};e&&(t.name=e),this.state.scopeStack.push(t),this.state.activeScope=t}endScope(e){let t=ky(e),n=new Set(t.map(r=>r.id));for(let r=0;r{!r.kept&&r.scopeId===s.id&&this.track(r)})}gradients(e,t,n,s=!1){if(P(t.length>0,()=>"gradients() received an empty list of xs."),n!=null&&n.dtype!=="float32")throw new Error(`dy must have 'float32' dtype, but has '${n.dtype}'`);let r=this.scopedRun(()=>this.startTape(),()=>this.endTape(),()=>this.tidy("forward",e));P(r instanceof st,()=>"The result y returned by f() must be a tensor.");let a=fD(this.state.activeTape,t,r);if(!s&&a.length===0&&t.length>0)throw new Error("Cannot compute gradient of y=f(x) with respect to x. Make sure that the f you passed encloses all operations that lead from x to y.");return this.tidy("backward",()=>{let o={};o[r.id]=n==null?ID(r.shape):n,mD(o,a,l=>this.tidy(l),CD);let i=t.map(l=>o[l.id]);return this.state.gradientDepth===0&&(this.state.activeTape.forEach(l=>{for(let u of l.saved)u.dispose()}),this.state.activeTape=null),{value:r,grads:i}})}customGrad(e){return P(to(e),()=>"The f passed in customGrad(f) must be a function."),(...t)=>{P(t.every(o=>o instanceof st),()=>"The args passed in customGrad(f)(x1, x2,...) must all be tensors");let n,s={};t.forEach((o,i)=>{s[i]=o});let r=(o,i)=>(n=e(...t,i),P(n.value instanceof st,()=>"The function f passed in customGrad(f) must return an object where `obj.value` is a tensor"),P(to(n.gradFunc),()=>"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function."),n.value),a=(o,i)=>{let l=n.gradFunc(o,i),u=Array.isArray(l)?l:[l];P(u.length===t.length,()=>"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function that returns the same number of tensors as inputs passed to f(...)."),P(u.every(p=>p instanceof st),()=>"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function that returns a list of only tensors.");let c={};return u.forEach((p,d)=>{c[d]=()=>p}),c};return this.runKernelFunc({forwardFunc:r,backwardsFunc:a,inputs:s})}}readSync(e){return this.state.tensorInfo.get(e).backend.readSync(e)}read(e){return this.state.tensorInfo.get(e).backend.read(e)}readToGPU(e,t){return this.state.tensorInfo.get(e).backend.readToGPU(e,t)}async time(e){let t=cp(),n=await this.backend.time(e);return n.wallMs=cp()-t,n}track(e){return this.state.activeScope!=null&&(e.scopeId=this.state.activeScope.id,this.state.activeScope.track.push(e)),e}get registeredVariables(){return this.state.registeredVariables}reset(){this.pendingBackendInitId++,this.state.dispose(),this.ENV.reset(),this.state=new fv;for(let e in this.registry)this.disposeRegisteredKernels(e),this.registry[e].dispose(),delete this.registry[e];this.backendName=null,this.backendInstance=null,this.pendingBackendInit=null}};pp.nextTensorId=0;pp.nextVariableId=0;function ID(e){let t=yy(It(e),"float32");return L.makeTensor(t,e,"float32")}function Sw(){let e=fw();if(e._tfengine==null){let t=new hw(e);e._tfengine=new pp(t)}return X_(e._tfengine.ENV),xD(()=>e._tfengine),e._tfengine}var L=Sw();function CD(e,t){let n={a:e,b:t};return L.runKernel(Ta,n)}var Xp={};We(Xp,{isBrowser:()=>Iw,isMobile:()=>ED,mockIsMobile:()=>ND});function TD(){return typeof navigator!="undefined"&&navigator!=null}var x3;function ND(e){x3=e}function ED(e){if(x3!==void 0)return x3;if(e||TD()){if(e||(e=navigator),e.product==="ReactNative")return!0;let t=e.userAgent||e.vendor||(typeof window!="undefined"?window.opera:"");if(!t){let n=e;return n.userAgentData&&n.userAgentData.mobile}return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4))}return!1}function Iw(){return typeof window!="undefined"&&window.document!=null||typeof WorkerGlobalScope!="undefined"}var $s=U();$s.registerFlag("DEBUG",()=>!1,e=>{e&&console.warn("Debugging mode is ON. The output of every math call will be downloaded to CPU and checked for NaNs. This significantly impacts performance.")});$s.registerFlag("IS_BROWSER",()=>Iw());$s.registerFlag("IS_NODE",()=>typeof process!="undefined"&&typeof process.versions!="undefined"&&typeof process.versions.node!="undefined");$s.registerFlag("IS_CHROME",()=>typeof navigator!="undefined"&&navigator!=null&&navigator.userAgent!=null&&/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor));$s.registerFlag("PROD",()=>!1);$s.registerFlag("TENSORLIKE_CHECK_SHAPE_CONSISTENCY",()=>$s.getBool("DEBUG"));$s.registerFlag("DEPRECATION_WARNINGS_ENABLED",()=>!0);$s.registerFlag("IS_TEST",()=>!1);$s.registerFlag("CHECK_COMPUTATION_FOR_ERRORS",()=>!0);$s.registerFlag("WRAP_TO_IMAGEBITMAP",()=>!1);$s.registerFlag("ENGINE_COMPILE_ONLY",()=>!1);$s.registerFlag("CANVAS2D_WILL_READ_FREQUENTLY_FOR_GPU",()=>!1);$s.registerFlag("USE_SETTIMEOUTCUSTOM",()=>!1);function ta(e,t){let n=e;if(Gn(e))return t==="string"?[]:[e.length];if(!Array.isArray(e))return[];let s=[];for(;Array.isArray(n)||Gn(n)&&t!=="string";)s.push(n.length),n=n[0];return Array.isArray(e)&&U().getBool("TENSORLIKE_CHECK_SHAPE_CONSISTENCY")&&Cw(e,s,[]),s}function Cw(e,t,n){if(n=n||[],!Array.isArray(e)&&!Gn(e)){P(t.length===0,()=>`Element arr[${n.join("][")}] is a primitive, but should be an array/TypedArray of ${t[0]} elements`);return}P(t.length>0,()=>`Element arr[${n.join("][")}] should be a primitive, but is an array of ${e.length} elements`),P(e.length===t[0],()=>`Element arr[${n.join("][")}] should have ${t[0]} elements, but has ${e.length} elements`);let s=t.slice(1);for(let r=0;r=0&&(r=s),mv(s,r,t,n),e==null||!Gn(e)&&!Array.isArray(e)&&typeof e!="number"&&typeof e!="boolean"&&typeof e!="string"){let l=e==null?"null":e.constructor.name;throw new Error(`Argument '${t}' passed to '${n}' must be a Tensor or TensorLike, but got '${l}'`)}let a=ta(e,r);!Gn(e)&&!Array.isArray(e)&&(e=[e]);let i=r!=="string"?r0(e,r):Ji(e,[],!0);return L.makeTensor(i,a,r)}function hp(e,t,n,s="numeric"){if(!Array.isArray(e))throw new Error(`Argument ${t} passed to ${n} must be a \`Tensor[]\` or \`TensorLike[]\``);return e.map((a,o)=>_(a,`${t}[${o}]`,n,s))}var Sy="__op";function B(e){let t=Object.keys(e);if(t.length!==1)throw new Error(`Please provide an object with a single key (operation name) mapping to a function. Got an object with ${t.length} keys.`);let n=t[0],s=e[n];n.endsWith("_")&&(n=n.substring(0,n.length-1)),n=n+Sy;let r=(...a)=>{L.startScope(n);try{let o=s(...a);return xy(o)&&console.error("Cannot return a Promise inside of tidy."),L.endScope(o),o}catch(o){throw L.endScope(null),o}};return Object.defineProperty(r,"name",{value:n,configurable:!0}),r}function RD(e,t){let n=_(e,"real","complex"),s=_(t,"imag","complex");ls(n.shape,s.shape,`real and imag shapes, ${n.shape} and ${s.shape}, must match in call to tf.complex().`);let r={real:n,imag:s};return L.runKernel(Ep,r)}var wa=B({complex_:RD});function ci(e,t,n,s){if(s==null&&(s=Rm(e)),s==="complex64")throw new Error("Cannot construct a complex64 tensor directly. Please use tf.complex(real, imag).");if(!Gn(e)&&!Array.isArray(e)&&typeof e!="number"&&typeof e!="boolean"&&typeof e!="string")throw new Error("values passed to tensor(values) must be a number/boolean/string or an array of numbers/booleans/strings, or a TypedArray");if(t!=null){Ay(t);let r=It(t),a=It(n);P(r===a,()=>`Based on the provided shape, [${t}], the tensor should have ${r} values but has ${a}`);for(let o=0;o`Error creating a new Tensor. Inferred shape (${n}) does not match the provided shape (${t}). `)}}return!Gn(e)&&!Array.isArray(e)&&(e=[e]),t=t||n,e=s!=="string"?r0(e,s):Ji(e,[],!0),L.makeTensor(e,t,s)}function Ue(e,t,n){let s=ta(e,n);return ci(e,t,s,n)}var b3={float32:4,float16:2,int32:4,uint16:2,uint8:1,bool:1,complex64:8},am=4;async function _D(e,t){let n=[],s=[],r=Array.isArray(e)?e.map(o=>o.name):Object.keys(e);for(let o=0;o{let d=await l.bytes(),h=d.reduce((g,y)=>g+y.length,0)+am*d.length,f=new Uint8Array(h),m=0;for(let g=0;g{if(t+=a.byteLength,n.push(a.byteLength===a.buffer.byteLength?a:new a.constructor(a)),!(a instanceof Float32Array||a instanceof Int32Array||a instanceof Uint8Array))throw new Error(`Unsupported TypedArray subtype: ${a.constructor.name}`)});let s=new Uint8Array(t),r=0;return n.forEach(a=>{s.set(new Uint8Array(a.buffer),r),r+=a.byteLength}),s.buffer}var Iy=typeof Buffer!="undefined"&&(typeof Blob=="undefined"||typeof atob=="undefined"||typeof btoa=="undefined");function gv(e){return Iy?Buffer.byteLength(e):new Blob([e]).size}function $D(e){if(Iy)return Buffer.from(e).toString("base64");let t=new Uint8Array(e),n="";for(let s=0,r=t.length;s{t+=r.byteLength});let n=new Uint8Array(t),s=0;return e.forEach(r=>{n.set(new Uint8Array(r),s),s+=r.byteLength}),n.buffer}function yv(e){let t="/";for(e=e.trim();e.endsWith(t);)e=e.slice(0,e.length-1);let n=e.split(t);return n[n.length-1]}function Nw(e,t){let n={modelTopology:e.modelTopology,format:e.format,generatedBy:e.generatedBy,convertedBy:e.convertedBy,weightsManifest:t};return e.signature!=null&&(n.signature=e.signature),e.userDefinedMetadata!=null&&(n.userDefinedMetadata=e.userDefinedMetadata),e.modelInitializer!=null&&(n.modelInitializer=e.modelInitializer),e.trainingConfig!=null&&(n.trainingConfig=e.trainingConfig),n}function Ew(e,t,n){let s={modelTopology:e.modelTopology,format:e.format,generatedBy:e.generatedBy,convertedBy:e.convertedBy};if(e.trainingConfig!=null&&(s.trainingConfig=e.trainingConfig),e.weightsManifest!=null){if(!t)throw new Error("modelJSON has weightsManifest but weightSpecs is null");if(!n)throw new Error("modelJSON has weightsManifest but weightData is null");s.weightSpecs=t,s.weightData=n}return e.signature!=null&&(s.signature=e.signature),e.userDefinedMetadata!=null&&(s.userDefinedMetadata=e.userDefinedMetadata),e.modelInitializer!=null&&(s.modelInitializer=e.modelInitializer),s}async function Ty(e,t){let n,s;return e.weightsManifest!=null&&([n,s]=await t(e.weightsManifest)),Ew(e,n,s)}function Kp(e){if(e.modelTopology instanceof ArrayBuffer)throw new Error("Expected JSON model topology, received ArrayBuffer.");return{dateSaved:new Date,modelTopologyType:"JSON",modelTopologyBytes:e.modelTopology==null?0:gv(JSON.stringify(e.modelTopology)),weightSpecsBytes:e.weightSpecs==null?0:gv(JSON.stringify(e.weightSpecs)),weightDataBytes:e.weightData==null?0:e.weightData.byteLength}}function Rw(e){let t=[];for(let n of e)t.push(...n.weights);return t}function FD(){let e=n=>{let s=n<<13,r=0;for(;(s&8388608)===0;)r-=8388608,s<<=1;return s&=-8388609,r+=947912704,s|r},t=new Uint32Array(2048);t[0]=0;for(let n=1;n<1024;n++)t[n]=e(n);for(let n=1024;n<2048;n++)t[n]=939524096+(n-1024<<13);return t}function OD(){let e=new Uint32Array(64);e[0]=0,e[31]=1199570944,e[32]=2147483648,e[63]=3347054592;for(let t=1;t<31;t++)e[t]=t<<23;for(let t=33;t<63;t++)e[t]=2147483648+(t-32<<23);return e}function MD(){let e=new Uint32Array(64);for(let t=0;t<64;t++)e[t]=1024;return e[0]=e[32]=0,e}function zD(){let e=FD(),t=OD(),n=MD();return s=>{let r=new ArrayBuffer(4*s.length),a=new Uint32Array(r);for(let o=0;o>10]+(i&1023)]+t[i>>10];a[o]=l}return new Float32Array(r)}}var Zt=class{constructor(){this.saveRouters=[],this.loadRouters=[]}static getInstance(){return Zt.instance==null&&(Zt.instance=new Zt),Zt.instance}static registerSaveRouter(e){Zt.getInstance().saveRouters.push(e)}static registerLoadRouter(e){Zt.getInstance().loadRouters.push(e)}static getSaveHandlers(e){return Zt.getHandlers(e,"save")}static getLoadHandlers(e,t){return Zt.getHandlers(e,"load",t)}static getHandlers(e,t,n){let s=[];return(t==="load"?Zt.getInstance().loadRouters:Zt.getInstance().saveRouters).forEach(a=>{let o=a(e,n);o!==null&&s.push(o)}),s}},LD=e=>Zt.registerSaveRouter(e),BD=e=>Zt.registerLoadRouter(e),WD=e=>Zt.getSaveHandlers(e),VD=(e,t)=>Zt.getLoadHandlers(e,t),v3="tensorflowjs",w3=1,Gi="models_store",Za="model_info_store";function _w(){if(!U().getBool("IS_BROWSER"))throw new Error("Failed to obtain IndexedDB factory because the current environmentis not a web browser.");let e=typeof window=="undefined"?self:window,t=e.indexedDB||e.mozIndexedDB||e.webkitIndexedDB||e.msIndexedDB||e.shimIndexedDB;if(t==null)throw new Error("The current browser does not appear to support IndexedDB.");return t}function k3(e){let t=e.result;t.createObjectStore(Gi,{keyPath:"modelPath"}),t.createObjectStore(Za,{keyPath:"modelPath"})}var Qi=class{constructor(e){if(this.indexedDB=_w(),e==null||!e)throw new Error("For IndexedDB, modelPath must not be null, undefined or empty.");this.modelPath=e}async save(e){if(e.modelTopology instanceof ArrayBuffer)throw new Error("BrowserLocalStorage.save() does not support saving model topology in binary formats yet.");return this.databaseAction(this.modelPath,e)}async load(){return this.databaseAction(this.modelPath)}databaseAction(e,t){return new Promise((n,s)=>{let r=this.indexedDB.open(v3,w3);r.onupgradeneeded=()=>k3(r),r.onsuccess=()=>{let a=r.result;if(t==null){let o=a.transaction(Gi,"readonly"),l=o.objectStore(Gi).get(this.modelPath);l.onsuccess=()=>{if(l.result==null)return a.close(),s(new Error(`Cannot find model with path '${this.modelPath}' in IndexedDB.`));n(l.result.modelArtifacts)},l.onerror=u=>(a.close(),s(l.error)),o.oncomplete=()=>a.close()}else{let o=Kp(t),i=a.transaction(Za,"readwrite"),l=i.objectStore(Za),u=l.put({modelPath:this.modelPath,modelArtifactsInfo:o}),c;u.onsuccess=()=>{c=a.transaction(Gi,"readwrite");let d=c.objectStore(Gi).put({modelPath:this.modelPath,modelArtifacts:t,modelArtifactsInfo:o});d.onsuccess=()=>n({modelArtifactsInfo:o}),d.onerror=h=>{l=i.objectStore(Za);let f=l.delete(this.modelPath);f.onsuccess=()=>(a.close(),s(d.error)),f.onerror=m=>(a.close(),s(d.error))}},u.onerror=p=>(a.close(),s(u.error)),i.oncomplete=()=>{c==null?a.close():c.oncomplete=()=>a.close()}}},r.onerror=a=>s(r.error)})}};Qi.URL_SCHEME="indexeddb://";var Dw=e=>U().getBool("IS_BROWSER")&&!Array.isArray(e)&&e.startsWith(Qi.URL_SCHEME)?UD(e.slice(Qi.URL_SCHEME.length)):null;Zt.registerSaveRouter(Dw);Zt.registerLoadRouter(Dw);function UD(e){return new Qi(e)}function GD(e){return e.startsWith(Qi.URL_SCHEME)?e.slice(Qi.URL_SCHEME.length):e}var HD=class{constructor(){this.indexedDB=_w()}async listModels(){return new Promise((e,t)=>{let n=this.indexedDB.open(v3,w3);n.onupgradeneeded=()=>k3(n),n.onsuccess=()=>{let s=n.result,r=s.transaction(Za,"readonly"),o=r.objectStore(Za).getAll();o.onsuccess=()=>{let i={};for(let l of o.result)i[l.modelPath]=l.modelArtifactsInfo;e(i)},o.onerror=i=>(s.close(),t(o.error)),r.oncomplete=()=>s.close()},n.onerror=s=>t(n.error)})}async removeModel(e){return e=GD(e),new Promise((t,n)=>{let s=this.indexedDB.open(v3,w3);s.onupgradeneeded=()=>k3(s),s.onsuccess=()=>{let r=s.result,a=r.transaction(Za,"readwrite"),o=a.objectStore(Za),i=o.get(e),l;i.onsuccess=()=>{if(i.result==null)return r.close(),n(new Error(`Cannot find model with path '${e}' in IndexedDB.`));{let u=o.delete(e),c=()=>{l=r.transaction(Gi,"readwrite");let d=l.objectStore(Gi).delete(e);d.onsuccess=()=>t(i.result.modelArtifactsInfo),d.onerror=h=>n(i.error)};u.onsuccess=c,u.onerror=p=>(c(),r.close(),n(i.error))}},i.onerror=u=>(r.close(),n(i.error)),a.oncomplete=()=>{l==null?r.close():l.oncomplete=()=>r.close()}},s.onerror=r=>n(s.error)})}},Aa="/",Gu="tensorflowjs_models",$w="info",jD="model_topology",qD="weight_specs",XD="weight_data",KD="model_metadata";function Pw(e){return{info:[Gu,e,$w].join(Aa),topology:[Gu,e,jD].join(Aa),weightSpecs:[Gu,e,qD].join(Aa),weightData:[Gu,e,XD].join(Aa),modelMetadata:[Gu,e,KD].join(Aa)}}function Fw(e){for(let t of Object.values(e))window.localStorage.removeItem(t)}function ZD(e){let t=e.split(Aa);if(t.length<3)throw new Error(`Invalid key format: ${e}`);return t.slice(1,t.length-1).join(Aa)}function YD(e){return e.startsWith(el.URL_SCHEME)?e.slice(el.URL_SCHEME.length):e}var el=class{constructor(e){if(!U().getBool("IS_BROWSER")||typeof window=="undefined"||typeof window.localStorage=="undefined")throw new Error("The current environment does not support local storage.");if(this.LS=window.localStorage,e==null||!e)throw new Error("For local storage, modelPath must not be null, undefined or empty.");this.modelPath=e,this.keys=Pw(this.modelPath)}async save(e){if(e.modelTopology instanceof ArrayBuffer)throw new Error("BrowserLocalStorage.save() does not support saving model topology in binary formats yet.");{let t=JSON.stringify(e.modelTopology),n=JSON.stringify(e.weightSpecs),s=Kp(e);try{this.LS.setItem(this.keys.info,JSON.stringify(s)),this.LS.setItem(this.keys.topology,t),this.LS.setItem(this.keys.weightSpecs,n),this.LS.setItem(this.keys.weightData,$D(e.weightData));let r={format:e.format,generatedBy:e.generatedBy,convertedBy:e.convertedBy,signature:e.signature!=null?e.signature:void 0,userDefinedMetadata:e.userDefinedMetadata!=null?e.userDefinedMetadata:void 0,modelInitializer:e.modelInitializer!=null?e.modelInitializer:void 0,trainingConfig:e.trainingConfig!=null?e.trainingConfig:void 0};return this.LS.setItem(this.keys.modelMetadata,JSON.stringify(r)),{modelArtifactsInfo:s}}catch(r){throw Fw(this.keys),new Error(`Failed to save model '${this.modelPath}' to local storage: size quota being exceeded is a possible cause of this failure: modelTopologyBytes=${s.modelTopologyBytes}, weightSpecsBytes=${s.weightSpecsBytes}, weightDataBytes=${s.weightDataBytes}.`)}}}async load(){let e=JSON.parse(this.LS.getItem(this.keys.info));if(e==null)throw new Error(`In local storage, there is no model with name '${this.modelPath}'`);if(e.modelTopologyType!=="JSON")throw new Error("BrowserLocalStorage does not support loading non-JSON model topology yet.");let t={},n=JSON.parse(this.LS.getItem(this.keys.topology));if(n==null)throw new Error(`In local storage, the topology of model '${this.modelPath}' is missing.`);t.modelTopology=n;let s=JSON.parse(this.LS.getItem(this.keys.weightSpecs));if(s==null)throw new Error(`In local storage, the weight specs of model '${this.modelPath}' are missing.`);t.weightSpecs=s;let r=this.LS.getItem(this.keys.modelMetadata);if(r!=null){let o=JSON.parse(r);t.format=o.format,t.generatedBy=o.generatedBy,t.convertedBy=o.convertedBy,o.signature!=null&&(t.signature=o.signature),o.userDefinedMetadata!=null&&(t.userDefinedMetadata=o.userDefinedMetadata),o.modelInitializer!=null&&(t.modelInitializer=o.modelInitializer),o.trainingConfig!=null&&(t.trainingConfig=o.trainingConfig)}let a=this.LS.getItem(this.keys.weightData);if(a==null)throw new Error(`In local storage, the binary weight values of model '${this.modelPath}' are missing.`);return t.weightData=PD(a),t}};el.URL_SCHEME="localstorage://";var Ow=e=>U().getBool("IS_BROWSER")&&!Array.isArray(e)&&e.startsWith(el.URL_SCHEME)?JD(e.slice(el.URL_SCHEME.length)):null;Zt.registerSaveRouter(Ow);Zt.registerLoadRouter(Ow);function JD(e){return new el(e)}var QD=class{constructor(){P(U().getBool("IS_BROWSER"),()=>"Current environment is not a web browser"),P(typeof window=="undefined"||typeof window.localStorage!="undefined",()=>"Current browser does not appear to support localStorage"),this.LS=window.localStorage}async listModels(){let e={},t=Gu+Aa,n=Aa+$w;for(let s=0;s"scheme must not be undefined or null."),e.endsWith(qu)&&(e=e.slice(0,e.indexOf(qu))),P(e.length>0,()=>"scheme must not be an empty string.");let n=gs.getInstance();P(n.managers[e]==null,()=>`A model store manager is already registered for scheme '${e}'.`),n.managers[e]=t}static getManager(e){let t=gs.getInstance().managers[e];if(t==null)throw new Error(`Cannot find model manager for scheme '${e}'`);return t}static getSchemes(){return Object.keys(gs.getInstance().managers)}};function Uf(e){if(e.indexOf(qu)===-1)throw new Error(`The url string provided does not contain a scheme. Supported schemes are: ${gs.getSchemes().join(",")}`);return{scheme:e.split(qu)[0],path:e.split(qu)[1]}}async function Mw(e,t,n=!1){P(e!==t,()=>`Old path and new path are the same: '${e}'`);let s=Zt.getLoadHandlers(e);P(s.length>0,()=>`Copying failed because no load handler is found for source URL ${e}.`),P(s.length<2,()=>`Copying failed because more than one (${s.length}) load handlers for source URL ${e}.`);let r=s[0],a=Zt.getSaveHandlers(t);P(a.length>0,()=>`Copying failed because no save handler is found for destination URL ${t}.`),P(a.length<2,()=>`Copying failed because more than one (${s.length}) save handlers for destination URL ${t}.`);let o=a[0],i=Uf(e).scheme,l=Uf(e).path,u=i===Uf(e).scheme,c=await r.load();n&&u&&await gs.getManager(i).removeModel(l);let p=await o.save(c);return n&&!u&&await gs.getManager(i).removeModel(l),p.modelArtifactsInfo}async function e$(){let e=gs.getSchemes(),t={};for(let n of e){let s=await gs.getManager(n).listModels();for(let r in s){let a=n+qu+r;t[a]=s[r]}}return t}async function t$(e){let t=Uf(e);return gs.getManager(t.scheme).removeModel(t.path)}async function n$(e,t){return Mw(e,t,!1)}async function s$(e,t){return Mw(e,t,!0)}var r$=class{constructor(){this.messageName="setTimeoutCustom",this.functionRefs=[],this.handledMessageCount=0,this.hasEventListener=!1}fetch(e,t){return fetch(e,t)}now(){return performance.now()}encode(e,t){if(t!=="utf-8"&&t!=="utf8")throw new Error(`Browser's encoder only supports utf-8, but got ${t}`);return this.textEncoder==null&&(this.textEncoder=new TextEncoder),this.textEncoder.encode(e)}decode(e,t){return new TextDecoder(t).decode(e)}setTimeoutCustom(e,t){if(!window||!U().getBool("USE_SETTIMEOUTCUSTOM")){setTimeout(e,t);return}this.functionRefs.push(e),setTimeout(()=>{window.postMessage({name:this.messageName,index:this.functionRefs.length-1},"*")},t),this.hasEventListener||(this.hasEventListener=!0,window.addEventListener("message",n=>{if(n.source===window&&n.data.name===this.messageName){n.stopPropagation();let s=this.functionRefs[n.data.index];s(),this.handledMessageCount++,this.handledMessageCount===this.functionRefs.length&&(this.functionRefs=[],this.handledMessageCount=0)}},!0))}};if(U().get("IS_BROWSER")){U().setPlatform("browser",new r$);try{gs.registerManager(el.URL_SCHEME,new QD)}catch(e){}try{gs.registerManager(Qi.URL_SCHEME,new HD)}catch(e){}}var a$={importFetch:()=>p_()},Qg,o$=class{constructor(){this.util=h_(),this.textEncoder=new this.util.TextEncoder}fetch(e,t){return U().global.fetch!=null?U().global.fetch(e,t):(Qg==null&&(Qg=a$.importFetch()),Qg(e,t))}now(){let e=process.hrtime();return e[0]*1e3+e[1]/1e6}encode(e,t){if(t!=="utf-8"&&t!=="utf8")throw new Error(`Node built-in encoder only supports utf-8, but got ${t}`);return this.textEncoder.encode(e)}decode(e,t){return e.length===0?"":new this.util.TextDecoder(t).decode(e)}};U().get("IS_NODE")&&!U().get("IS_BROWSER")&&U().setPlatform("node",new o$);function ze(e,t="float32",n){return t=t||"float32",Ay(e),new gn(e,t,n)}function i$(e,t){let n=_(e,"x","cast");if(!lw(t))throw new Error(`Failed to cast to unknown dtype ${t}`);if(t==="string"&&n.dtype!=="string"||t!=="string"&&n.dtype==="string")throw new Error("Only strings can be casted to strings");let s={x:n},r={dtype:t};return L.runKernel(bo,s,r)}var me=B({cast_:i$});function l$(e){let n={x:_(e,"x","clone","string_or_numeric")};return L.runKernel(Fo,n)}var Hn=B({clone_:l$});function Ny(e,t=!1){console.log(e.toString(t))}Sw();var u$={buffer:ze,cast:me,clone:Hn,print:Ny};bD(u$);var On={};We(On,{browserFiles:()=>g$,browserHTTPRequest:()=>v$,concatenateArrayBuffers:()=>Cy,copyModel:()=>n$,decodeWeights:()=>Tw,encodeWeights:()=>_D,fromMemory:()=>k$,fromMemorySync:()=>Vw,getLoadHandlers:()=>VD,getModelArtifactsForJSON:()=>Ty,getModelArtifactsForJSONSync:()=>Ew,getModelArtifactsInfoForJSON:()=>Kp,getSaveHandlers:()=>WD,getWeightSpecs:()=>Rw,http:()=>Ry,isHTTPScheme:()=>S3,listModels:()=>e$,loadWeights:()=>y$,moveModel:()=>s$,registerLoadRouter:()=>BD,registerSaveRouter:()=>LD,removeModel:()=>t$,weightsLoaderFactory:()=>Lw,withSaveHandler:()=>S$,withSaveHandlerSync:()=>I$});var c$="model",d$=".json",p$=".weights.bin";function Av(e){return new Promise(t=>setTimeout(t)).then(e)}var Qu=class{constructor(e){if(!U().getBool("IS_BROWSER"))throw new Error("browserDownloads() cannot proceed because the current environment is not a browser.");e.startsWith(Qu.URL_SCHEME)&&(e=e.slice(Qu.URL_SCHEME.length)),(e==null||e.length===0)&&(e=c$),this.modelJsonFileName=e+d$,this.weightDataFileName=e+p$}async save(e){if(typeof document=="undefined")throw new Error("Browser downloads are not supported in this environment since `document` is not present");let t=window.URL.createObjectURL(new Blob([e.weightData],{type:"application/octet-stream"}));if(e.modelTopology instanceof ArrayBuffer)throw new Error("BrowserDownloads.save() does not support saving model topology in binary formats yet.");{let n=[{paths:["./"+this.weightDataFileName],weights:e.weightSpecs}],s=Nw(e,n),r=window.URL.createObjectURL(new Blob([JSON.stringify(s)],{type:"application/json"})),a=this.modelJsonAnchor==null?document.createElement("a"):this.modelJsonAnchor;if(a.download=this.modelJsonFileName,a.href=r,await Av(()=>a.dispatchEvent(new MouseEvent("click"))),e.weightData!=null){let o=this.weightDataAnchor==null?document.createElement("a"):this.weightDataAnchor;o.download=this.weightDataFileName,o.href=t,await Av(()=>o.dispatchEvent(new MouseEvent("click")))}return{modelArtifactsInfo:Kp(e)}}}};Qu.URL_SCHEME="downloads://";var h$=class{constructor(e){if(e==null||e.length<1)throw new Error(`When calling browserFiles, at least 1 file is required, but received ${e}`);this.jsonFile=e[0],this.weightsFiles=e.slice(1)}async load(){return new Promise((e,t)=>{let n=new FileReader;n.onload=s=>{let r=JSON.parse(s.target.result),a=r.modelTopology;if(a==null){t(new Error(`modelTopology field is missing from file ${this.jsonFile.name}`));return}if(r.weightsManifest==null){t(new Error(`weightManifest field is missing from file ${this.jsonFile.name}`));return}if(this.weightsFiles.length===0){e({modelTopology:a});return}let i=Ty(r,l=>this.loadWeights(l));e(i)},n.onerror=s=>t(`Failed to read model topology and weights manifest JSON from file '${this.jsonFile.name}'. BrowserFiles supports loading Keras-style tf.Model artifacts only.`),n.readAsText(this.jsonFile)})}loadWeights(e){let t=[],n=[];for(let a of e)t.push(...a.weights),n.push(...a.paths);let s=this.checkManifestAndWeightFiles(e),r=n.map(a=>this.loadWeightsFile(a,s[a]));return Promise.all(r).then(a=>[t,Cy(a)])}loadWeightsFile(e,t){return new Promise((n,s)=>{let r=new FileReader;r.onload=a=>{let o=a.target.result;n(o)},r.onerror=a=>s(`Failed to weights data from file of path '${e}'.`),r.readAsArrayBuffer(t)})}checkManifestAndWeightFiles(e){let t=[],n=this.weightsFiles.map(r=>yv(r.name)),s={};for(let r of e)r.paths.forEach(a=>{let o=yv(a);if(t.indexOf(o)!==-1)throw new Error(`Duplicate file basename found in weights manifest: '${o}'`);if(t.push(o),n.indexOf(o)===-1)throw new Error(`Weight file with basename '${o}' is not provided.`);s[a]=this.weightsFiles[n.indexOf(o)]});if(t.length!==this.weightsFiles.length)throw new Error(`Mismatch in the number of files in weights manifest (${t.length}) and the number of weight files provided (${this.weightsFiles.length}).`);return s}},f$=e=>U().getBool("IS_BROWSER")&&!Array.isArray(e)&&e.startsWith(Qu.URL_SCHEME)?m$(e.slice(Qu.URL_SCHEME.length)):null;Zt.registerSaveRouter(f$);function m$(e="model"){return new Qu(e)}function g$(e){return new h$(e)}function xv(e,t,n,s){o(e),n=n==null?0:n,s=s==null?1:s,i(n,s);let r=0,a=l=>(l.then(u=>{let c=n+ ++r/e.length*(s-n);return t(c),u}),l);function o(l){P(l!=null&&Array.isArray(l)&&l.length>0,()=>"promises must be a none empty array")}function i(l,u){P(l>=0&&l<=1,()=>`Progress fraction must be in range [0, 1], but got startFraction ${l}`),P(u>=0&&u<=1,()=>`Progress fraction must be in range [0, 1], but got endFraction ${u}`),P(u>=l,()=>`startFraction must be no more than endFraction, but got startFraction ${l} and endFraction ${u}`)}return Promise.all(e.map(a))}async function zw(e,t){t==null&&(t={});let n=t.fetchFunc==null?U().platform.fetch:t.fetchFunc,s=e.map(p=>n(p,t.requestInit,{isBinary:!0})),r=0,a=.5,i=(t.onProgress==null?await Promise.all(s):await xv(s,t.onProgress,r,a)).map(p=>p.arrayBuffer()),l=.5,u=1;return t.onProgress==null?await Promise.all(i):await xv(i,t.onProgress,l,u)}async function y$(e,t="",n,s){return Lw(o=>zw(o,{requestInit:s}))(e,t,n)}function Lw(e){return async(t,n="",s)=>{let r=t.map(()=>!1),a={},o=s!=null?s.map(()=>!1):[],i=[];if(t.forEach((h,f)=>{let m=0;h.weights.forEach(g=>{let y="quantization"in g?g.quantization.dtype:g.dtype,x=b3[y]*It(g.shape),A=()=>{r[f]=!0,a[f]==null&&(a[f]=[]),a[f].push({manifestEntry:g,groupOffset:m,sizeBytes:x})};s!=null?s.forEach((b,w)=>{b===g.name&&(A(),o[w]=!0)}):A(),i.push(g.name),m+=x})}),!o.every(h=>h)){let h=s.filter((f,m)=>!o[m]);throw new Error(`Could not find weights in manifest with names: ${h.join(", ")}. +Manifest JSON has weights with names: ${i.join(", ")}.`)}let l=r.reduce((h,f,m)=>(f&&h.push(m),h),[]),u=[];l.forEach(h=>{t[h].paths.forEach(f=>{let m=n+(n.endsWith("/")?"":"/")+f;u.push(m)})});let c=await e(u),p={},d=0;return l.forEach(h=>{let f=t[h].paths.length,m=0;for(let b=0;b{let w=g.slice(b.groupOffset,b.groupOffset+b.sizeBytes),k=Tw(w,[b.manifestEntry]);for(let C in k)p[C]=k[C]}),d+=f}),p}}var A$="application/octet-stream",x$="application/json",Ey=class{constructor(e,t){if(this.DEFAULT_METHOD="POST",t==null&&(t={}),this.weightPathPrefix=t.weightPathPrefix,this.onProgress=t.onProgress,this.weightUrlConverter=t.weightUrlConverter,t.fetchFunc!=null?(P(typeof t.fetchFunc=="function",()=>"Must pass a function that matches the signature of `fetch` (see https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)"),this.fetch=t.fetchFunc):this.fetch=U().platform.fetch,P(e!=null&&e.length>0,()=>"URL path for http must not be null, undefined or empty."),Array.isArray(e)&&P(e.length===2,()=>`URL paths for http must have a length of 2, (actual length is ${e.length}).`),this.path=e,t.requestInit!=null&&t.requestInit.body!=null)throw new Error("requestInit is expected to have no pre-existing body, but has one.");this.requestInit=t.requestInit||{}}async save(e){if(e.modelTopology instanceof ArrayBuffer)throw new Error("BrowserHTTPRequest.save() does not support saving model topology in binary formats yet.");let t=Object.assign({method:this.DEFAULT_METHOD},this.requestInit);t.body=new FormData;let n=[{paths:["./model.weights.bin"],weights:e.weightSpecs}],s=Nw(e,n);t.body.append("model.json",new Blob([JSON.stringify(s)],{type:x$}),"model.json"),e.weightData!=null&&t.body.append("model.weights.bin",new Blob([e.weightData],{type:A$}),"model.weights.bin");let r=await this.fetch(this.path,t);if(r.ok)return{modelArtifactsInfo:Kp(e),responses:[r]};throw new Error(`BrowserHTTPRequest.save() failed due to HTTP response status ${r.status}.`)}async load(){let e=await this.fetch(this.path,this.requestInit);if(!e.ok)throw new Error(`Request to ${this.path} failed with status code ${e.status}. Please verify this URL points to the model JSON of the model to load.`);let t;try{t=await e.json()}catch(r){let a=`Failed to parse model JSON of response from ${this.path}.`;throw this.path.endsWith(".pb")?a+=" Your path contains a .pb file extension. Support for .pb models have been removed in TensorFlow.js 1.0 in favor of .json models. You can re-convert your Python TensorFlow model using the TensorFlow.js 1.0 conversion scripts or you can convert your.pb models with the 'pb2json'NPM script in the tensorflow/tfjs-converter repository.":a+=" Please make sure the server is serving valid JSON for this request.",new Error(a)}let n=t.modelTopology,s=t.weightsManifest;if(n==null&&s==null)throw new Error(`The JSON from HTTP path ${this.path} contains neither model topology or manifest for weights.`);return Ty(t,r=>this.loadWeights(r))}async loadWeights(e){let t=Array.isArray(this.path)?this.path[1]:this.path,[n,s]=b$(t),r=this.weightPathPrefix||n,a=Rw(e),o=[],i=[];for(let u of e)for(let c of u.paths)this.weightUrlConverter!=null?i.push(this.weightUrlConverter(c)):o.push(r+c+s);this.weightUrlConverter&&o.push(...await Promise.all(i));let l=await zw(o,{requestInit:this.requestInit,fetchFunc:this.fetch,onProgress:this.onProgress});return[a,Cy(l)]}};Ey.URL_SCHEME_REGEX=/^https?:\/\//;function b$(e){let t=e.lastIndexOf("/"),n=e.lastIndexOf("?"),s=e.substring(0,t),r=n>t?e.substring(n):"";return[s+"/",r]}function S3(e){return e.match(Ey.URL_SCHEME_REGEX)!=null}var Bw=(e,t)=>{if(typeof fetch=="undefined"&&(t==null||t.fetchFunc==null))return null;{let n=!0;if(Array.isArray(e)?n=e.every(s=>S3(s)):n=S3(e),n)return Ry(e,t)}return null};Zt.registerSaveRouter(Bw);Zt.registerLoadRouter(Bw);function Ry(e,t){return new Ey(e,t)}function v$(e,t){return Ry(e,t)}var e3=class{constructor(e){this.modelArtifacts=e}load(){return this.modelArtifacts}},Ww=class{constructor(e){this.saveHandler=e}save(e){return this.saveHandler(e)}},w$=class{constructor(e){e.load&&(this.load=()=>Promise.resolve(e.load())),e.save&&(this.save=t=>Promise.resolve(e.save(t)))}};function k$(e,t,n,s){let r=arguments;return new w$(Vw(...r))}function Vw(e,t,n,s){return arguments.length===1?e.modelTopology!=null||e.weightSpecs!=null?new e3(e):(console.warn("Please call tf.io.fromMemory() with only one argument. The argument should be of type ModelArtifacts. The multi-argument signature of tf.io.fromMemory() has been deprecated and will be removed in a future release."),new e3({modelTopology:e})):(console.warn("Please call tf.io.fromMemory() with only one argument. The argument should be of type ModelArtifacts. The multi-argument signature of tf.io.fromMemory() has been deprecated and will be removed in a future release."),new e3({modelTopology:e,weightSpecs:t,weightData:n,trainingConfig:s}))}function S$(e){return new Ww(e)}function I$(e){return new Ww(e)}var Uw={};We(Uw,{confusionMatrix:()=>W$});function C$(e,t,n=!1,s=!1){let r=_(e,"a","matMul"),a=_(t,"b","matMul");[r,a]=jt(r,a);let o={a:r,b:a},i={transposeA:n,transposeB:s};return L.runKernel(xo,o,i)}var et=B({matMul_:C$});function T$(e,t,n=1,s=0,r="int32"){if(t<2)throw new Error(`Error in oneHot: depth must be >=2, but it is ${t}`);let o={indices:_(e,"indices","oneHot","int32")},i={dtype:r,depth:t,onValue:n,offValue:s};return L.runKernel(Fl,o,i)}var ec=B({oneHot_:T$});function _y(){U().set("PROD",!0)}function N$(){U().set("DEBUG",!0)}function E$(){U().set("DEPRECATION_WARNINGS_ENABLED",!1),console.warn("TensorFlow.js deprecation warnings have been disabled.")}function Dy(e){U().getBool("DEPRECATION_WARNINGS_ENABLED")&&console.warn(e+" You can disable deprecation warnings with tf.disableDeprecationWarnings().")}vD(Dy);function R$(){L.disposeVariables()}function Jt(){return L}function om(){return L.memory()}function _$(e){return L.profile(e)}function X(e,t){return L.tidy(e,t)}function Y(e){ky(e).forEach(n=>n.dispose())}function Cn(e){return L.keep(e)}function D$(e){return L.time(e)}function Zp(e){return L.setBackend(e)}function Yp(){return L.ready()}function cn(){return L.backendName}function $$(e){L.removeBackend(e)}function $y(e){return L.findBackend(e)}function P$(e){return L.findBackendFactory(e)}function eu(e,t,n=1){return L.registerBackend(e,t,n)}function Bs(){return L.backend}function F$(e,t){U().setPlatform(e,t)}function O$(e){let n={input:_(e,"input","imag")};return L.runKernel(Pp,n)}var Jp=B({imag_:O$});function M$(e){let n={x:_(e,"x","neg")};return L.runKernel(Rl,n)}var Dt=B({neg_:M$});function z$(e){let n={input:_(e,"input","real")};return L.runKernel(Mp,n)}var tc=B({real_:z$});function L$(e,t,n){let s=_(e,"x","transpose");if(t==null&&(t=s.shape.map((o,i)=>i).reverse()),P(s.rank===t.length,()=>`Error in transpose: rank of input ${s.rank} must match length of perm ${t}.`),t.forEach(o=>{P(o>=0&&o`All entries in 'perm' must be between 0 and ${s.rank-1} but got ${t}`)}),s.rank<=1)return s.clone();let r={x:s},a={perm:t};return s.dtype==="complex64"?X(()=>{let o=tc(s),i=Jp(s);return o=L.runKernel(Jr,{x:o},a),i=L.runKernel(Jr,{x:i},a),n&&(i=Dt(i)),wa(o,i)}):L.runKernel(Jr,r,a)}var tt=B({transpose_:L$});function B$(e,t,n){let s=_(e,"labels","confusionMatrix"),r=_(t,"predictions","confusionMatrix");P(n==null||n>0&&Number.isInteger(n),()=>`If provided, numClasses must be a positive integer, but got ${n}`),P(s.rank===1,()=>`Expected the rank of labels to be 1, but got ${s.rank}`),P(r.rank===1,()=>`Expected the rank of predictions to be 1, but got ${r.rank}`),P(s.shape[0]===r.shape[0],()=>`Mismatch in the number of examples: ${s.shape[0]} vs. ${r.shape[0]}. Labels and predictions should have the same number of elements.`),P(n>0&&Number.isInteger(n),()=>`numClasses is required to be a positive integer, but got ${n}`);let a=ec(me(s,"int32"),n),o=ec(me(r,"int32"),n),i=tt(a),l=et(i,o);return me(l,"int32")}var W$=B({confusionMatrix_:B$}),tu={};We(tu,{assertAndGetBroadcastShape:()=>vt,getBroadcastDims:()=>Gw,getReductionAxes:()=>on});function Gw(e,t){let n=e.length,s=[];for(let r=0;r1&&o===1&&s.unshift(a)}return s}function on(e,t){let n=[];for(let s=0;s1)&&n.unshift(a)}return n}function vt(e,t){let n=[],s=Math.max(e.length,t.length);for(let r=0;rX$,fromPixelsAsync:()=>j$,toPixels:()=>q$});function Py(e,t,n){if(cl(e),t!=null&&t.length!==3)throw new Error("tensor3d() requires shape to have three numbers");let s=ta(e,n);if(s.length!==3&&s.length!==1)throw new Error("tensor3d() requires values to be number[][][] or flat/TypedArray");if(s.length===1&&t==null)throw new Error("tensor3d() requires shape to be provided when `values` are a flat array");return ci(e,t,s,n)}var Fi;function Hw(e,t=3){if(t>4)throw new Error("Cannot construct Tensor with more than 4 channels from pixels.");if(e==null)throw new Error("pixels passed to tf.browser.fromPixels() can not be null");let n=!1,s=!1,r=!1,a=!1,o=!1,i=!1;if(e.data instanceof Uint8Array)n=!0;else if(typeof ImageData!="undefined"&&e instanceof ImageData)s=!0;else if(typeof HTMLVideoElement!="undefined"&&e instanceof HTMLVideoElement)r=!0;else if(typeof HTMLImageElement!="undefined"&&e instanceof HTMLImageElement)a=!0;else if(e.getContext!=null)o=!0;else if(typeof ImageBitmap!="undefined"&&e instanceof ImageBitmap)i=!0;else throw new Error(`pixels passed to tf.browser.fromPixels() must be either an HTMLVideoElement, HTMLImageElement, HTMLCanvasElement, ImageData in browser, or OffscreenCanvas, ImageData in webworker or {data: Uint32Array, width: number, height: number}, but was ${e.constructor.name}`);if(sm(lp,L.backendName)!=null){let f={pixels:e},m={numChannels:t};return L.runKernel(lp,f,m)}let[u,c]=r?[e.videoWidth,e.videoHeight]:[e.width,e.height],p;if(o)p=e.getContext("2d").getImageData(0,0,u,c).data;else if(s||n)p=e.data;else if(a||r||i){if(Fi==null)if(typeof document=="undefined")if(typeof OffscreenCanvas!="undefined"&&typeof OffscreenCanvasRenderingContext2D!="undefined")Fi=new OffscreenCanvas(1,1).getContext("2d");else throw new Error("Cannot parse input in current context. Reason: OffscreenCanvas Context2D rendering is not supported.");else Fi=document.createElement("canvas").getContext("2d",{willReadFrequently:!0});Fi.canvas.width=u,Fi.canvas.height=c,Fi.drawImage(e,0,0,u,c),p=Fi.getImageData(0,0,u,c).data}let d;if(t===4)d=new Int32Array(p);else{let f=u*c;d=new Int32Array(f*t);for(let m=0;m4||a===2)throw new Error(`toPixels only supports depth of size 1, 3 or 4 but got ${a}`);if(n.dtype!=="float32"&&n.dtype!=="int32")throw new Error(`Unsupported type for toPixels: ${n.dtype}. Please use float32 or int32 tensors.`);let o=await n.data(),i=n.dtype==="float32"?255:1,l=new Uint8ClampedArray(r*s*4);for(let u=0;u1)throw new Error(`Tensor values for a float32 Tensor must be in the range [0 - 1] but encountered ${h}.`)}else if(n.dtype==="int32"&&(h<0||h>255))throw new Error(`Tensor values for a int32 Tensor must be in the range [0 - 255] but encountered ${h}.`);a===1?(c[0]=h*i,c[1]=h*i,c[2]=h*i):c[d]=h*i}let p=u*4;l[p+0]=Math.round(c[0]),l[p+1]=Math.round(c[1]),l[p+2]=Math.round(c[2]),l[p+3]=Math.round(c[3])}if(t!=null){t.width=r,t.height=s;let u=t.getContext("2d"),c=new ImageData(l,r,s);u.putImageData(c,0,0)}return n!==e&&n.dispose(),l}var X$=B({fromPixels_:Hw}),Fy={};We(Fy,{prepareAndValidate:()=>jw});function jw(e,t){let n=e.shape.length,s=t.shape.length;if(n<1)throw new Error(`tf.gatherND() expects the input to be rank 1 or higher, but the rank was ${n}.`);if(s<1)throw new Error(`tf.gatherND() expects the indices to be rank 1 or higher, but the rank was ${s}.`);if(t.dtype!=="int32")throw new Error(`tf.gatherND() expects the indices to be int32 type, but the dtype was ${t.dtype}.`);if(t.shape[s-1]>n)throw new Error(`index innermost dimension length must be <= tensor rank; saw: ${t.shape[s-1]} vs. ${n}`);if(It(e.shape)===0)throw new Error(`Requested more than 0 entries, but input is empty. Input shape: ${e.shape}.`);let r=t.shape,a=r[r.length-1],o=1;for(let p=0;pp/u),1].slice(0,a);return[l,o,u,c]}var Oy={};We(Oy,{calculateShapes:()=>qw,validateInput:()=>zy,validateUpdateShape:()=>My});function My(e,t,n){let s=t.rank>1?t.shape[t.rank-1]:1,r=t.rank>1?t.rank-1:1,a=`Must have updates.shape = indices.shape[:batchDim] + shape[sliceDim:], got updates.shape: ${n.shape}, indices.shape: ${t.shape}, shape: ${e}, sliceDim: ${s}, and batchDim: ${r}.`;if(n.rank1?t.shape[s-1]:1,a=n.length,o=1;for(let p=r;pZ$,computeFlatOffset:()=>tP,computeOutShape:()=>J$,getNormalizedAxes:()=>Q$,isSliceContinous:()=>eP,maskToAxes:()=>Y$,parseSliceParams:()=>n6,sliceInfo:()=>nP,startForAxis:()=>e6,startIndicesWithElidedDims:()=>Yw,stopForAxis:()=>t6,stopIndicesWithElidedDims:()=>Jw,stridesForAxis:()=>Qw,stridesWithElidedDims:()=>Xw});var I3=-2,K$=-1;function Z$(e,t,n){let s=e.shape.length;P(s===t.length,()=>`Error in slice${s}D: Length of begin ${t} must match the rank of the array (${s}).`),P(s===n.length,()=>`Error in slice${s}D: Length of size ${n} must match the rank of the array (${s}).`);for(let r=0;r`Error in slice${s}D: begin[${r}] + size[${r}] (${t[r]+n[r]}) would overflow input.shape[${r}] (${e.shape[r]})`)}function Y$(e){let t=[],n=0;for(;e>0;)e&1&&t.push(n),e/=2,n++;return t}function J$(e,t,n){let s=[];for(let r=0;r0){let h=t[0],f=n+1;c=Yw(o,h,f,s,e),p=Jw(i,h,f,r,e),d=Xw(a,h,f,e)}else for(let h=0;h-1)a[i]=0;else{let l=Kw(t,n,i),u=s[l];e&1<-1)a[i]=Number.MAX_SAFE_INTEGER;else{let l=Kw(t,n,i),u=s[l];e&1<0?o=Number.MIN_SAFE_INTEGER:o=Number.MAX_SAFE_INTEGER);let l=s[r];return o<0&&(o+=l),o=ip(0,o,l-1),o}function t6(e,t,n,s,r,a){let o=t[r],i=n[r]||1;(e&1<0?o=Number.MAX_SAFE_INTEGER:o=Number.MIN_SAFE_INTEGER);let l=s[r];return o<0&&(o+=l),i>0?o=ip(0,o,l):o=ip(-1,o,l-1),o}function eP(e,t,n){let s=n.length;for(let r=0;r1){s=r;break}for(let r=s+1;r0||n[r]!==e[r])return!1;return!0}function tP(e,t){let n=e.length>0?e[e.length-1]:1;for(let s=0;s{P(o!==-1,()=>"slice() does not support negative begin indexing.")});let a;return n==null?a=new Array(r).fill(-1):typeof n=="number"?a=[n,...new Array(r-1).fill(-1)]:n.lengtho>=0?o:(P(o===-1,()=>`Negative size values should be exactly -1 but got ${o} for the slice() size at index ${i}.`),e.shape[i]-s[i])),[s,a]}function nP(e,t,n,s,r,a,o,i,l){let u;if(s==null?(u=new Array(t.length),u.fill(1)):u=s,o!=null&&(o&o-1)!==0)throw new Error("Multiple ellipses in slice is not allowed.");let c=!1,p={dims:u.length,numAddAxisAfterEllipsis:0,begin:t.slice(),end:n.slice(),strides:u.slice(),beginMask:r,endMask:a,ellipsisMask:o,newAxisMask:i,shrinkAxisMask:l};for(let A=0;A0?0:-1,d.strides[A]>0?w:w-1];if(b&&d.strides[A]<=0)throw Error("only stride 1 allowed on non-range indexing.");m=m&&d.strides[A]===1;let N=!!(d.beginMask&1<=w)throw Error(`slice index ${d.begin[A]} of dimension ${A} out of bounds.`)}else d.begin[A]=bv(d.begin[A],0,d.strides[A],w,k,C),d.end[A]=bv(d.end[A],1,d.strides[A],w,k,C);let E=d.strides[A]===1&&d.begin[A]===0&&d.end[A]===w;h=h&&E,f=f&&(A===0&&d.strides[A]===1||E)}else h=h&&d.strides[A]===1&&N,f=f&&(A===0&&d.strides[A]===1||N);let R,D=!1;if(d.beginValid&&d.endValid?(R=d.end[A]-d.begin[A],D=!0):b?(R=1,D=!0):N&&w>=0&&(d.strides[A]<0?R=-w:R=w,D=!0),D){let E;R===0||R<0!=d.strides[A]<0?E=0:E=Math.trunc(R/d.strides[A])+(R%d.strides[A]!==0?1:0),g.push(E)}else g.push(-1)}for(let A=0;A=0?y.push(g[b]):b===I3&&y.push(1)}return{finalShapeSparse:y.filter((A,b)=>d.finalShapeGatherIndices[b]!==I3),finalShape:y,isIdentity:h,sliceDim0:f,isSimpleSlice:m,begin:d.begin,end:d.end,strides:d.strides}}function sP(e,t){t.beginMask=0,t.endMask=0,t.shrinkAxisMask=0;let n=0;t.beginValid=e.begin!=null,t.endValid=e.end!=null,t.begin=new Array(t.dims),t.end=new Array(t.dims),t.strides=new Array(t.dims),t.finalShapeGatherIndices=[],t.finalShapeGatherIndicesSparse=[],t.inputShapeGatherIndicesSparse=new Array(t.dims);for(let s=0;s0?a[t]:a[t+1&1];{let o=e<0?s+e:e;return oa[1]?a[1]:o}}var ce={};We(ce,{Serializable:()=>s6,SerializationMap:()=>Wi,registerClass:()=>di});var s6=class{getClassName(){return this.constructor.className}static fromConfig(e,t){return new e(t)}},Wi=class{constructor(){this.classNameMap={}}static getMap(){return Wi.instance==null&&(Wi.instance=new Wi),Wi.instance}static register(e){Wi.getMap().classNameMap[e.className]=[e,e.fromConfig]}};function di(e){P(e.className!=null,()=>"Class being registered does not have the static className property defined."),P(typeof e.className=="string",()=>"className is required to be a string, but got type "+typeof e.className),P(e.className.length>0,()=>"Class being registered has an empty-string as its className, which is disallowed."),Wi.register(e)}var r6={};We(r6,{TEST_EPSILON_FLOAT16:()=>a6,createVideoElement:()=>dP,encodeStrings:()=>o6,expectArrayBuffersEqual:()=>cP,expectArraysClose:()=>aP,expectArraysEqual:()=>iP,expectNumbersClose:()=>lP,expectPromiseToFail:()=>oP,expectValuesInRange:()=>uP,play:()=>pP,testEpsilon:()=>Ly});var rP=.001,a6=.1;function aP(e,t,n){return n==null&&(n=Ly()),C3(e,t,(s,r)=>By(s,r,n))}function Ly(){return L.backend.floatPrecision()===32?rP:a6}function C3(e,t,n){let s=!0;if((Gn(e)||Gn(t))&&(s=!1),Gn(e)&&Gn(t)&&(s=!0),s){let o=e.constructor.name,i=t.constructor.name;if(o!==i)throw new Error(`Arrays are of different type. Actual: ${o}. Expected: ${i}`)}if(Array.isArray(e)&&Array.isArray(t)){let o=ta(e),i=ta(t);if(!mo(o,i))throw new Error(`Arrays have different shapes. Actual: [${o}]. Expected: [${i}]`)}let r=Gn(e)?e:Ji(e),a=Gn(t)?t:Ji(t);if(r.length!==a.length)throw new Error(`Arrays have different lengths actual: ${r.length} vs expected: ${a.length}. Actual: ${r}. Expected: ${a}.`);for(let o=0;ot.fail(),()=>t()),typeof expect!="undefined"&&expect().nothing()}function MP(e,t){let n=typeof t=="string"||typeof t=="number"||typeof t=="boolean"?[t]:t;return Ja(e)||Ja(e[0])||Ja(t)||Ja(t[0])?q3(e,n,(s,r)=>s==r):q3(e,t,(s,r)=>iA(s,r,0))}function zP(e,t,n){if(n==null&&(n=oA()),!iA(e,t,n))throw new Error(`Numbers differ: actual === ${e}, expected === ${t}`);typeof expect!="undefined"&&expect().nothing()}function iA(e,t,n){return!isFinite(e)&&!isFinite(t)?!0:!(isNaN(e)||isNaN(t)||Math.abs(e-t)>n)}function LP(e,t,n){for(let s=0;sn)throw new Error(`Value out of range:${e[s]} low: ${t}, high: ${n}`)}function BP(e,t){let n=new Float32Array(e),s=new Float32Array(t);if(n.length!==s.length)throw new Error(`Expected ArrayBuffer to be of length ${s.length}, but it was ${n.length}`);for(let r=0;r{t.addEventListener("loadeddata",s=>n(t)),t.load()})}async function VP(e){await e.play(),"requestVideoFrameCallback"in e&&await new Promise(t=>{e.requestVideoFrameCallback(t)})}var lA="3.20.0";function UP(e,t){let n=D(e,"a","add"),s=D(t,"b","add");[n,s]=Xt(n,s);let r={a:n,b:s};return B.runKernel(Da,r)}var de=W({add_:UP});function GP(e,t){let n=D(e,"a","floorDiv"),s=D(t,"b","floorDiv");[n,s]=Xt(n,s);let r={a:n,b:s};return B.runKernel(Fo,r)}var Jc=W({floorDiv_:GP});function HP(e,t){let n=D(e,"a","div"),s=D(t,"b","div");if([n,s]=Xt(n,s),n.dtype==="int32"&&s.dtype==="int32")return Jc(n,s);let r={a:n,b:s},a={};return B.runKernel(_o,r,a)}var ye=W({div_:HP});function jP(e,t){let n=D(e,"a","mul"),s=D(t,"b","mul");[n,s]=Xt(n,s);let r={a:n,b:s};return B.runKernel(Xo,r)}var z=W({mul_:jP});function qP(e){let t=D(e,"x","abs");if(t.dtype==="complex64"){let n={x:t};return B.runKernel(qp,n)}else{let n={x:t};return B.runKernel(xl,n)}}var an=W({abs_:qP});function XP(e){let n={x:D(e,"x","acos")};return B.runKernel(Nc,n)}var uA=W({acos_:XP});function KP(e){let n={x:D(e,"x","acosh")};return B.runKernel(Ec,n)}var cA=W({acosh_:KP});function ZP(e){O(Array.isArray(e),()=>"The argument passed to tf.addN() must be a list of tensors"),O(e.length>=1,()=>`Must pass at least one tensor to tf.addN(), but got ${e.length}`);let t=e.map((r,a)=>D(r,`tensors${a}`,"addN")),n=t[0];t.forEach(r=>{if(r.dtype!==n.dtype)throw new Error("All tensors passed to tf.addN() must have the same dtype")}),t.forEach(r=>{if(!Ao(r.shape,n.shape))throw new Error("All tensors passed to tf.addN() must have the same shape")});let s=t;return B.runKernel(xo,s)}var N0=W({addN_:ZP});function YP(e,t=null,n=!1){let r={x:D(e,"x","all","bool")},a={axis:t,keepDims:n};return B.runKernel(Rc,r,a)}var E0=W({all_:YP});function JP(e,t=null,n=!1){let r={x:D(e,"x","any","bool")},a={axis:t,keepDims:n};return B.runKernel(_c,r,a)}var _p=W({any_:JP});function QP(e,t=0){let s={x:D(e,"x","argMax")},r={axis:t};return B.runKernel(bo,s,r)}var Ms=W({argMax_:QP});function eF(e,t=0){let s={x:D(e,"x","argMin")},r={axis:t};return B.runKernel(Dc,s,r)}var dA=W({argMin_:eF});function tF(e){let n={x:D(e,"x","asin")};return B.runKernel($c,n)}var pA=W({asin_:tF});function nF(e){let n={x:D(e,"x","asinh")};return B.runKernel(Pc,n)}var hA=W({asinh_:nF});function sF(e){let n={x:D(e,"x","atan")};return B.runKernel(Fc,n)}var fA=W({atan_:sF});function rF(e,t){let n=D(e,"a","atan2"),s=D(t,"b","atan2");[n,s]=Xt(n,s);let r={a:n,b:s};return B.runKernel(bl,r)}var mA=W({atan2_:rF});function aF(e){let n={x:D(e,"x","atanh")};return B.runKernel(Oc,n)}var gA=W({atanh_:aF});function oF(e,t,n,s,r="NHWC",a){let o=e[3],i=[...t,o],l=Cw(r);return gh(e,i,n,a,s,null,null,l)}function Sw(e,t,n,s,r,a,o="channelsLast"){let[i,l]=Rm(t),u;if(o==="channelsLast")u=[i,l,e[3],e[3]];else if(o==="channelsFirst")u=[i,l,e[1],e[1]];else throw new Error(`Unknown dataFormat ${o}`);return gh(e,u,n,s,r,a,!1,o)}function iF(e,t,n,s,r,a,o="NDHWC"){let[i,l,u]=X3(t),c,p;if(o==="NDHWC")p="channelsLast",c=[i,l,u,e[4],e[4]];else if(o==="NCDHW")p="channelsFirst",c=[i,l,u,e[1],e[1]];else throw new Error(`Unknown dataFormat ${o}`);return Iw(e,c,n,s,r,!1,p,a)}function gh(e,t,n,s,r,a,o=!1,i="channelsLast"){let[l,u,c,p]=[-1,-1,-1,-1];if(i==="channelsLast")[l,u,c,p]=e;else if(i==="channelsFirst")[l,p,u,c]=e;else throw new Error(`Unknown dataFormat ${i}`);let[d,h,,f]=t,[m,g]=Rm(n),[y,x]=Rm(s),A=oc(d,y),b=oc(h,x),{padInfo:w,outHeight:k,outWidth:C}=cF(r,u,c,m,g,A,b,a,i),E=o?f*p:f,_;return i==="channelsFirst"?_=[l,E,k,C]:i==="channelsLast"&&(_=[l,k,C,E]),{batchSize:l,dataFormat:i,inHeight:u,inWidth:c,inChannels:p,outHeight:k,outWidth:C,outChannels:E,padInfo:w,strideHeight:m,strideWidth:g,filterHeight:d,filterWidth:h,effectiveFilterHeight:A,effectiveFilterWidth:b,dilationHeight:y,dilationWidth:x,inShape:e,outShape:_,filterShape:t}}function Iw(e,t,n,s,r,a=!1,o="channelsLast",i){let[l,u,c,p,d]=[-1,-1,-1,-1,-1];if(o==="channelsLast")[l,u,c,p,d]=e;else if(o==="channelsFirst")[l,d,u,c,p]=e;else throw new Error(`Unknown dataFormat ${o}`);let[h,f,m,,g]=t,[y,x,A]=X3(n),[b,w,k]=X3(s),C=oc(h,b),E=oc(f,w),_=oc(m,k),{padInfo:$,outDepth:R,outHeight:P,outWidth:S}=dF(r,u,c,p,y,x,A,C,E,_,i),M=a?g*d:g,L;return o==="channelsFirst"?L=[l,M,R,P,S]:o==="channelsLast"&&(L=[l,R,P,S,M]),{batchSize:l,dataFormat:o,inDepth:u,inHeight:c,inWidth:p,inChannels:d,outDepth:R,outHeight:P,outWidth:S,outChannels:M,padInfo:$,strideDepth:y,strideHeight:x,strideWidth:A,filterDepth:h,filterHeight:f,filterWidth:m,effectiveFilterDepth:C,effectiveFilterHeight:E,effectiveFilterWidth:_,dilationDepth:b,dilationHeight:w,dilationWidth:k,inShape:e,outShape:L,filterShape:t}}function lF(e,t,n,s,r){s==null&&(s=yA(e,t,n));let a=e[0],o=e[1],i=tl((a-t+2*s)/n+1,r),l=tl((o-t+2*s)/n+1,r);return[i,l]}function uF(e,t,n,s,r,a){r==null&&(r=yA(e,t,s));let o=e[0],i=e[1],l=e[2],u=tl((o-t+2*r)/s+1,a),c=tl((i-t+2*r)/s+1,a),p=tl((l-t+2*r)/s+1,a);return[u,c,p,n]}function yA(e,t,n,s=1){let r=oc(t,s);return Math.floor((e[0]*(n-1)-n+r)/2)}function Rm(e){return typeof e=="number"?[e,e,e]:e.length===2?[e[0],e[1],1]:e}function X3(e){return typeof e=="number"?[e,e,e]:e}function oc(e,t){return t<=1?e:e+(e-1)*(t-1)}function cF(e,t,n,s,r,a,o,i,l){let u,c,p;if(typeof e=="number"){u={top:e,bottom:e,left:e,right:e,type:e===0?"VALID":"NUMBER"};let h=lF([t,n],a,s,e,i);c=h[0],p=h[1]}else if(e==="same"){c=Math.ceil(t/s),p=Math.ceil(n/r);let d=Math.max(0,(c-1)*s+a-t),h=Math.max(0,(p-1)*r+o-n),f=Math.floor(d/2),m=d-f,g=Math.floor(h/2),y=h-g;u={top:f,bottom:m,left:g,right:y,type:"SAME"}}else if(e==="valid")u={top:0,bottom:0,left:0,right:0,type:"VALID"},c=Math.ceil((t-a+1)/s),p=Math.ceil((n-o+1)/r);else if(typeof e=="object"){let d=l==="channelsLast"?e[1][0]:e[2][0],h=l==="channelsLast"?e[1][1]:e[2][1],f=l==="channelsLast"?e[2][0]:e[3][0],m=l==="channelsLast"?e[2][1]:e[3][1];u={top:d,bottom:h,left:f,right:m,type:d===0&&h===0&&f===0&&m===0?"VALID":"EXPLICIT"},c=tl((t-a+d+h)/s+1,i),p=tl((n-o+f+m)/r+1,i)}else throw Error(`Unknown padding parameter: ${e}`);return{padInfo:u,outHeight:c,outWidth:p}}function dF(e,t,n,s,r,a,o,i,l,u,c){let p,d,h,f;if(typeof e=="number"){p={top:e,bottom:e,left:e,right:e,front:e,back:e,type:e===0?"VALID":"NUMBER"};let g=uF([t,n,s,1],i,1,r,e,c);d=g[0],h=g[1],f=g[2]}else if(e==="same"){d=Math.ceil(t/r),h=Math.ceil(n/a),f=Math.ceil(s/o);let m=(d-1)*r+i-t,g=(h-1)*a+l-n,y=(f-1)*o+u-s,x=Math.floor(m/2),A=m-x,b=Math.floor(g/2),w=g-b,k=Math.floor(y/2),C=y-k;p={top:b,bottom:w,left:k,right:C,front:x,back:A,type:"SAME"}}else if(e==="valid")p={top:0,bottom:0,left:0,right:0,front:0,back:0,type:"VALID"},d=Math.ceil((t-i+1)/r),h=Math.ceil((n-l+1)/a),f=Math.ceil((s-u+1)/o);else throw Error(`Unknown padding parameter: ${e}`);return{padInfo:p,outDepth:d,outHeight:h,outWidth:f}}function tl(e,t){if(!t)return Math.trunc(e);switch(t){case"round":return Math.round(e);case"ceil":return Math.ceil(e);case"floor":return Math.floor(e);default:throw new Error(`Unknown roundingMode ${t}`)}}function lo(e){let[t,n,s]=Rm(e);return t===1&&n===1&&s===1}function ua(e,t){return lo(e)||lo(t)}function Cw(e){if(e==="NHWC")return"channelsLast";if(e==="NCHW")return"channelsFirst";throw new Error(`Unknown dataFormat ${e}`)}function ps(e,t,n){if(n!=null){if(typeof t=="string")throw Error(`Error in ${e}: pad must be an integer when using dimRoundingMode ${n} but got pad ${t}.`);if(typeof t=="number")O(uc(t),()=>`Error in ${e}: pad must be an integer when using dimRoundingMode ${n} but got pad ${t}.`);else if(typeof t=="object")t.forEach(s=>{s.forEach(r=>{O(uc(r),()=>`Error in ${e}: pad must be an integer when using dimRoundingMode ${n} but got pad ${r}.`)})});else throw Error(`Error in ${e}: Unknown padding parameter: ${t}`)}}function pF(e,t){let s={x:D(e,"x","reshape","string_or_numeric")},r={shape:t};return B.runKernel(jl,s,r)}var V=W({reshape_:pF});function hF(e,t,n,s,r){let a=D(e,"x","avgPool","float32"),o=1;O(ua(n,o),()=>`Error in avgPool: Either strides or dilations must be 1. Got strides ${n} and dilations '${o}'`);let i=a,l=!1;a.rank===3&&(l=!0,i=V(a,[1,a.shape[0],a.shape[1],a.shape[2]])),O(i.rank===4,()=>`Error in avgPool: x must be rank 4 but got rank ${i.rank}.`),ps("avgPool",s,r);let u={x:i},c={filterSize:t,strides:n,pad:s,dimRoundingMode:r},p=B.runKernel(vo,u,c);return p=ge(p,a.dtype),l?V(p,[p.shape[1],p.shape[2],p.shape[3]]):p}var yh=W({avgPool_:hF});function fF(e,t,n,s,r,a="NDHWC"){let o=D(e,"x","avgPool3d","float32"),i=o,l=!1;o.rank===4&&(l=!0,i=V(o,[1,o.shape[0],o.shape[1],o.shape[2],o.shape[3]])),O(i.rank===5,()=>`Error in avgPool3d: x must be rank 5 but got rank ${i.rank}.`),O(a==="NDHWC",()=>`Error in avgPool3d: Only NDHWC is currently supported, but got dataFormat of ${a}`),ps("avgPool3d",s,r);let u={x:i},c={filterSize:t,strides:n,pad:s,dimRoundingMode:r,dataFormat:a},p=B.runKernel(Hp,u,c);return p=ge(p,i.dtype),l?V(p,[p.shape[1],p.shape[2],p.shape[3],p.shape[4]]):p}var AA=W({avgPool3d_:fF});function mF(e,t=0){O(e.length>=1,()=>"Pass at least one tensor to concat");let n=Rp(e,"tensors","concat","string_or_numeric");if(n[0].dtype==="complex64"&&n.forEach(a=>{if(a.dtype!=="complex64")throw new Error(`Cannot concatenate complex64 tensors with a tensor - with dtype ${a.dtype}. `)}),n.length===1)return Gn(n[0]);let s=n,r={axis:t};return B.runKernel(wl,s,r)}var ct=W({concat_:mF});function gF(e){let n={x:D(e,"x","sigmoid","float32")};return B.runKernel(ai,n)}var On=W({sigmoid_:gF});function yF(e,t,n){let s=D(e,"x","slice","string_or_numeric");if(s.rank===0)throw new Error("Slicing scalar is not possible");let r={x:s},a={begin:t,size:n};return B.runKernel(Yl,r,a)}var Le=W({slice_:yF});function AF(e){let n={x:D(e,"x","tanh","float32")};return B.runKernel(di,n)}var ul=W({tanh_:AF});function xF(e,t,n,s,r,a){let o=D(e,"forgetBias","basicLSTMCell"),i=D(t,"lstmKernel","basicLSTMCell"),l=D(n,"lstmBias","basicLSTMCell"),u=D(s,"data","basicLSTMCell"),c=D(r,"c","basicLSTMCell"),p=D(a,"h","basicLSTMCell"),d=ct([u,p],1),h=rt(d,i),f=de(h,l),m=f.shape[0],g=f.shape[1]/4,y=[m,g],x=Le(f,[0,0],y),A=Le(f,[0,g],y),b=Le(f,[0,g*2],y),w=Le(f,[0,g*3],y),k=de(z(On(x),ul(A)),z(c,On(de(o,b)))),C=z(ul(k),On(w));return[k,C]}var Tw=W({basicLSTMCell_:xF});function bF(e,t,n){let s=D(e,"x","batchToSpaceND"),r=t.reduce((i,l)=>i*l);O(s.rank>=1+t.length,()=>`input rank is ${s.rank} but should be > than blockShape.length ${t.length}`),O(n.length===t.length,()=>`crops.length is ${n.length} but should be equal to blockShape.length ${t.length}`),O(s.shape[0]%r===0,()=>`input tensor batch is ${s.shape[0]} but is not divisible by the product of the elements of blockShape ${t.join(" * ")} === ${r}`);let a={x:s},o={blockShape:t,crops:n};return B.runKernel(vl,a,o)}var Ah=W({batchToSpaceND_:bF});function vF(e){let t;return e.rank===0||e.rank===1?t=V(e,[1,1,1,e.size]):e.rank===2?t=V(e,[1,1,e.shape[0],e.shape[1]]):e.rank===3?t=V(e,[1,e.shape[0],e.shape[1],e.shape[2]]):t=e,t}function wF(e,t,n,s,r,a){a==null&&(a=.001);let o=D(e,"x","batchNorm"),i=D(t,"mean","batchNorm"),l=D(n,"variance","batchNorm"),u;r!=null&&(u=D(r,"scale","batchNorm"));let c;s!=null&&(c=D(s,"offset","batchNorm")),O(i.rank===l.rank,()=>"Batch normalization gradient requires mean and variance to have equal ranks."),O(c==null||i.rank===c.rank,()=>"Batch normalization gradient requires mean and offset to have equal ranks."),O(u==null||i.rank===u.rank,()=>"Batch normalization gradient requires mean and scale to have equal ranks.");let d={x:vF(o),scale:u,offset:c,mean:i,variance:l},h={varianceEpsilon:a},f=B.runKernel(Oo,d,h);return V(f,o.shape)}var Qc=W({batchNorm_:wF});function kF(e,t,n,s,r,a){let o=D(e,"x","batchNorm"),i=D(t,"mean","batchNorm"),l=D(n,"variance","batchNorm"),u;r!=null&&(u=D(r,"scale","batchNorm"));let c;return s!=null&&(c=D(s,"offset","batchNorm")),O(o.rank===2,()=>`Error in batchNorm2D: x must be rank 2 but got rank ${o.rank}.`),O(i.rank===2||i.rank===1,()=>`Error in batchNorm2D: mean must be rank 2 or rank 1 but got rank ${i.rank}.`),O(l.rank===2||l.rank===1,()=>`Error in batchNorm2D: variance must be rank 2 or rank 1 but got rank ${l.rank}.`),u!=null&&O(u.rank===2||u.rank===1,()=>`Error in batchNorm2D: scale must be rank 2 or rank 1 but got rank ${u.rank}.`),c!=null&&O(c.rank===2||c.rank===1,()=>`Error in batchNorm2D: offset must be rank 2 or rank 1 but got rank ${c.rank}.`),Qc(o,i,l,c,u,a)}var xA=W({batchNorm2d_:kF});function SF(e,t,n,s,r,a){let o=D(e,"x","batchNorm"),i=D(t,"mean","batchNorm"),l=D(n,"variance","batchNorm"),u;r!=null&&(u=D(r,"scale","batchNorm"));let c;return s!=null&&(c=D(s,"offset","batchNorm")),O(o.rank===3,()=>`Error in batchNorm3D: x must be rank 3 but got rank ${o.rank}.`),O(i.rank===3||i.rank===1,()=>`Error in batchNorm3D: mean must be rank 3 or rank 1 but got rank ${i.rank}.`),O(l.rank===3||l.rank===1,()=>`Error in batchNorm3D: variance must be rank 3 or rank 1 but got rank ${l.rank}.`),u!=null&&O(u.rank===3||u.rank===1,()=>`Error in batchNorm3D: scale must be rank 3 or rank 1 but got rank ${u.rank}.`),c!=null&&O(c.rank===3||c.rank===1,()=>`Error in batchNorm3D: offset must be rank 3 or rank 1 but got rank ${c.rank}.`),Qc(o,i,l,c,u,a)}var bA=W({batchNorm3d_:SF});function IF(e,t,n,s,r,a){let o=D(e,"x","batchNorm"),i=D(t,"mean","batchNorm"),l=D(n,"variance","batchNorm"),u;r!=null&&(u=D(r,"scale","batchNorm"));let c;return s!=null&&(c=D(s,"offset","batchNorm")),O(o.rank===4,()=>`Error in batchNorm4D: x must be rank 4 but got rank ${o.rank}.`),O(i.rank===4||i.rank===1,()=>`Error in batchNorm4D: mean must be rank 4 or rank 1 but got rank ${i.rank}.`),O(l.rank===4||l.rank===1,()=>`Error in batchNorm4D: variance must be rank 4 or rank 1 but got rank ${l.rank}.`),u!=null&&O(u.rank===4||u.rank===1,()=>`Error in batchNorm4D: scale must be rank 4 or rank 1 but got rank ${u.rank}.`),c!=null&&O(c.rank===4||c.rank===1,()=>`Error in batchNorm4D: offset must be rank 4 or rank 1 but got rank ${c.rank}.`),Qc(o,i,l,c,u,a)}var vA=W({batchNorm4d_:IF});function CF(e,t,n){let s=D(e,"x","bincount"),r=D(t,"weights","bincount");O(s.dtype==="int32",()=>`Error in bincount: input dtype must be int32, but got ${s.dtype}`),O(n>=0,()=>`size must be non-negative, but got ${n}.`),O(r.size===s.size||r.size===0,()=>`Error in bincount: weights must have the same size as input or0-length, but got input shape: ${s.shape}, weights shape: ${r.shape}.`);let a={x:s,weights:r},o={size:n};return B.runKernel(r0,a,o)}var wA=W({bincount_:CF});function TF(e,t){let n=D(e,"s0","broadcastArgs","int32"),s=D(t,"s1","broadcastArgs","int32");if(n.rank!==1)throw new Error(`broadcastArgs(): first input must be a vector (rank=1). Has rank ${n.rank}`);if(s.rank!==1)throw new Error(`broadcastArgs(): second input must be a vector (rank=1). Has rank ${s.rank}`);let r={s0:n,s1:s};return B.runKernel(a0,r)}var Nw=W({broadcastArgs_:TF});function NF(e,t){let n=D(e,"broadcastTo","x"),s=n.shape;if(t.some(u=>!(u>0)||u%1!==0))throw new Error(`broadcastTo(): Invalid broadcast shape [${t}].`);if(t.lengthn.rank){let u=n.shape.slice();for(;u.length=0;u--)if(r[u]===t[u])a[u]=1;else if(n.shape[u]!==1)throw new Error(`broadcastTo(): [${s}] cannot be broadcast to [${t}].`);if(a.map((u,c)=>u>1?c:-1).filter(u=>u>=0).length===0)return Gn(n);let i={x:n},l={reps:a};return B.runKernel(Pa,i,l)}var nl=W({broadcastTo_:NF});function EF(e){let n={x:D(e,"x","ceil","float32")};return B.runKernel(So,n)}var kA=W({ceil_:EF});function RF(e,t,n){let s=D(e,"x","clipByValue");O(t<=n,()=>`Error in clip: min (${t}) must be less than or equal to max (${n}).`);let r={x:s},a={clipValueMin:t,clipValueMax:n};return B.runKernel($a,r,a)}var ws=W({clipByValue_:RF});function _F(e){return ct(e,0)}var SA=W({concat1d_:_F});function DF(e,t){return ct(e,t)}var cu=W({concat2d_:DF});function $F(e,t){return ct(e,t)}var IA=W({concat3d_:$F});function PF(e,t){return ct(e,t)}var CA=W({concat4d_:PF});function FF(e,t,n,s,r="NHWC",a=[1,1],o){let i=D(e,"x","conv2d","float32"),l=D(t,"filter","conv2d","float32"),u=i,c=!1;i.rank===3&&(c=!0,u=V(i,[1,i.shape[0],i.shape[1],i.shape[2]])),O(u.rank===4,()=>`Error in conv2d: input must be rank 4, but got rank ${u.rank}.`),O(l.rank===4,()=>`Error in conv2d: filter must be rank 4, but got rank ${l.rank}.`),ps("conv2d",s,o);let p=r==="NHWC"?u.shape[3]:u.shape[1];O(p===l.shape[2],()=>`Error in conv2d: depth of input (${p}) must match input depth for filter ${l.shape[2]}.`),O(ua(n,a),()=>`Error in conv2D: Either strides or dilations must be 1. Got strides ${n} and dilations '${a}'`);let d={x:u,filter:l},h={strides:n,pad:s,dataFormat:r,dilations:a,dimRoundingMode:o},f=B.runKernel(Io,d,h);return c?V(f,[f.shape[1],f.shape[2],f.shape[3]]):f}var Na=W({conv2d_:FF});function OF(e,t,n,s,r="NWC",a=1,o){let i=D(e,"x","conv1d"),l=D(t,"filter","conv1d"),u=i,c=!1;i.rank===2&&(c=!0,u=V(i,[1,i.shape[0],i.shape[1]])),O(u.rank===3,()=>`Error in conv1d: input must be rank 3, but got rank ${u.rank}.`),O(l.rank===3,()=>`Error in conv1d: filter must be rank 3, but got rank ${l.rank}.`),ps("conv1d",s,o),O(u.shape[2]===l.shape[1],()=>`Error in conv1d: depth of input (${u.shape[2]}) must match input depth for filter ${l.shape[1]}.`),O(ua(n,a),()=>`Error in conv1D: Either stride or dilation must be 1. Got stride ${n} and dilation '${a}'`),O(r==="NWC",()=>`Error in conv1d: got dataFormat of ${r} but only NWC is currently supported.`);let p=V(l,[1,l.shape[0],l.shape[1],l.shape[2]]),d=V(u,[u.shape[0],1,u.shape[1],u.shape[2]]),g=Na(d,p,[1,n],s,"NHWC",[1,a],o);return c?V(g,[g.shape[2],g.shape[3]]):V(g,[g.shape[0],g.shape[2],g.shape[3]])}var R0=W({conv1d_:OF});function MF(e,t,n,s,r,a="NHWC",o){O(e.length===t.rank,()=>`Length of inShape (${e.length}) and rank of dy (${t.rank}) must match`);let i=e,l=t,u=!1;t.rank===3&&(u=!0,l=V(t,[1,t.shape[0],t.shape[1],t.shape[2]]),i=[1,e[0],e[1],e[2]]),O(i.length===4,()=>`Error in conv2dDerInput: inShape must be length 4, but got length ${i.length}.`),O(l.rank===4,()=>`Error in conv2dDerInput: dy must be rank 4, but got rank ${l.rank}`),O(n.rank===4,()=>`Error in conv2dDerInput: filter must be rank 4, but got rank ${n.rank}`);let c=a==="NHWC"?i[3]:i[1],p=a==="NHWC"?l.shape[3]:l.shape[1];O(c===n.shape[2],()=>`Error in conv2dDerInput: depth of input (${c}) must match input depth for filter ${n.shape[2]}.`),O(p===n.shape[3],()=>`Error in conv2dDerInput: depth of output (${p}) must match output depth for filter ${n.shape[3]}.`),ps("conv2dDerInput",r,o);let d={dy:l,filter:n},h={strides:s,pad:r,dataFormat:a,dimRoundingMode:o,inputShape:i},f=B.runKernel(Co,d,h);return u?V(f,[f.shape[1],f.shape[2],f.shape[3]]):f}var TA=W({conv2DBackpropInput_:MF});function zF(e,t,n,s,r,a){let o=D(e,"x","conv2dTranspose"),i=D(t,"filter","conv2dTranspose");return TA(n,o,i,s,r,"NHWC",a)}var _0=W({conv2dTranspose_:zF});function LF(e,t,n,s,r="NDHWC",a=[1,1,1]){let o=D(e,"x","conv3d"),i=D(t,"filter","conv3d"),l=o,u=!1;o.rank===4&&(u=!0,l=V(o,[1,o.shape[0],o.shape[1],o.shape[2],o.shape[3]])),O(l.rank===5,()=>`Error in conv3d: input must be rank 5, but got rank ${l.rank}.`),O(i.rank===5,()=>`Error in conv3d: filter must be rank 5, but got rank ${i.rank}.`),O(l.shape[4]===i.shape[3],()=>`Error in conv3d: depth of input (${l.shape[4]}) must match input depth for filter ${i.shape[3]}.`),O(ua(n,a),()=>`Error in conv3D: Either strides or dilations must be 1. Got strides ${n} and dilations '${a}'`),O(r==="NDHWC",()=>`Error in conv3d: got dataFormat of ${r} but only NDHWC is currently supported.`);let c={x:l,filter:i},p={strides:n,pad:s,dataFormat:r,dilations:a},d=B.runKernel(Xp,c,p);return u?V(d,[d.shape[1],d.shape[2],d.shape[3],d.shape[4]]):d}var NA=W({conv3d_:LF});function BF(e,t,n,s,r){O(e.length===t.rank,()=>`Length of inShape (${e.length}) and rank of dy (${t.rank}) must match`);let a=e,o=t,i=!1;t.rank===4&&(i=!0,o=V(t,[1,t.shape[0],t.shape[1],t.shape[2],t.shape[3]]),a=[1,e[0],e[1],e[2],e[3]]);let l=a[4],u=o.shape[4];O(a.length===5,()=>`Error in conv3dDerInput: inShape must be length 5, but got length ${a.length}.`),O(o.rank===5,()=>`Error in conv3dDerInput: dy must be rank 5, but got rank ${o.rank}`),O(n.rank===5,()=>`Error in conv3dDerInput: filter must be rank 5, but got rank ${n.rank}`),O(l===n.shape[3],()=>`Error in conv3dDerInput: depth of input (${l}) must match input depth for filter ${n.shape[3]}.`),O(u===n.shape[4],()=>`Error in conv3dDerInput: depth of output (${u}) must match output depth for filter ${n.shape[4]}.`);let c={dy:o,filter:n},p={pad:r,strides:s,inputShape:a},d=B.runKernel(l0,c,p);return i?V(d,[d.shape[1],d.shape[2],d.shape[3],d.shape[4]]):d}var Ew=W({conv3DBackpropInput_:BF});function WF(e,t,n,s,r){let a=D(e,"x","conv3dTranspose"),o=D(t,"filter","conv3dTranspose");return Ew(n,a,o,s,r)}var EA=W({conv3dTranspose_:WF});function VF(e){let n={x:D(e,"x","cos","float32")};return B.runKernel(To,n)}var xh=W({cos_:VF});function UF(e){let n={x:D(e,"x","cosh","float32")};return B.runKernel(No,n)}var D0=W({cosh_:UF});function GF(e,t=0,n=!1,s=!1){let a={x:D(e,"x","cumprod")},o={axis:t,exclusive:n,reverse:s};return B.runKernel(kl,a,o)}var Dp=W({cumprod_:GF});function HF(e,t=0,n=!1,s=!1){let a={x:D(e,"x","cumsum")},o={axis:t,exclusive:n,reverse:s};return B.runKernel(Eo,a,o)}var $0=W({cumsum_:HF});function jF(e,t,n,s=!1){let r=D(e,"x","denseBincount"),a=D(t,"weights","denseBincount");O(r.dtype==="int32",()=>`Error in denseBincount: input dtype must be int32, but got ${r.dtype}`),O(r.rank<=2,()=>`Error in denseBincount: input must be at most rank 2, but got rank ${r.rank}.`),O(n>=0,()=>`size must be non-negative, but got ${n}.`),O(a.size===r.size||a.size===0,()=>`Error in denseBincount: weights must have the same shape as x or 0-length, but got x shape: ${r.shape}, weights shape: ${a.shape}.`);let o={x:r,weights:a},i={size:n,binaryOutput:s};return B.runKernel(u0,o,i)}var Rw=W({denseBincount_:jF});function qF(e,t,n="NHWC"){let s=D(e,"x","depthToSpace","float32"),r=n==="NHWC"?s.shape[1]:s.shape[2],a=n==="NHWC"?s.shape[2]:s.shape[3],o=n==="NHWC"?s.shape[3]:s.shape[1];O(t>1,()=>`blockSize should be > 1 for depthToSpace, but was: ${t}`),O(r*t>=0,()=>`Negative dimension size caused by overflow when multiplying +Expected: ${a}.`)}typeof expect!="undefined"&&expect().nothing()}function oP(e,t){e().then(()=>t.fail(),()=>t()),typeof expect!="undefined"&&expect().nothing()}function iP(e,t){let n=typeof t=="string"||typeof t=="number"||typeof t=="boolean"?[t]:t;return Ka(e)||Ka(e[0])||Ka(t)||Ka(t[0])?C3(e,n,(s,r)=>s==r):C3(e,t,(s,r)=>By(s,r,0))}function lP(e,t,n){if(n==null&&(n=Ly()),!By(e,t,n))throw new Error(`Numbers differ: actual === ${e}, expected === ${t}`);typeof expect!="undefined"&&expect().nothing()}function By(e,t,n){return!isFinite(e)&&!isFinite(t)?!0:!(isNaN(e)||isNaN(t)||Math.abs(e-t)>n)}function uP(e,t,n){for(let s=0;sn)throw new Error(`Value out of range:${e[s]} low: ${t}, high: ${n}`)}function cP(e,t){let n=new Float32Array(e),s=new Float32Array(t);if(n.length!==s.length)throw new Error(`Expected ArrayBuffer to be of length ${s.length}, but it was ${n.length}`);for(let r=0;r{t.addEventListener("loadeddata",s=>n(t)),t.load()})}async function pP(e){await e.play(),"requestVideoFrameCallback"in e&&await new Promise(t=>{e.requestVideoFrameCallback(t)})}var Wy="3.21.0";function hP(e,t){let n=_(e,"a","add"),s=_(t,"b","add");[n,s]=jt(n,s);let r={a:n,b:s};return L.runKernel(Ta,r)}var le=B({add_:hP});function fP(e,t){let n=_(e,"a","floorDiv"),s=_(t,"b","floorDiv");[n,s]=jt(n,s);let r={a:n,b:s};return L.runKernel(Do,r)}var Bc=B({floorDiv_:fP});function mP(e,t){let n=_(e,"a","div"),s=_(t,"b","div");if([n,s]=jt(n,s),n.dtype==="int32"&&s.dtype==="int32")return Bc(n,s);let r={a:n,b:s},a={};return L.runKernel(No,r,a)}var ge=B({div_:mP});function gP(e,t){let n=_(e,"a","mul"),s=_(t,"b","mul");[n,s]=jt(n,s);let r={a:n,b:s};return L.runKernel(Ho,r)}var M=B({mul_:gP});function yP(e){let t=_(e,"x","abs");if(t.dtype==="complex64"){let n={x:t};return L.runKernel(Rp,n)}else{let n={x:t};return L.runKernel(dl,n)}}var rn=B({abs_:yP});function AP(e){let n={x:_(e,"x","acos")};return L.runKernel(gc,n)}var Vy=B({acos_:AP});function xP(e){let n={x:_(e,"x","acosh")};return L.runKernel(yc,n)}var Uy=B({acosh_:xP});function bP(e){P(Array.isArray(e),()=>"The argument passed to tf.addN() must be a list of tensors"),P(e.length>=1,()=>`Must pass at least one tensor to tf.addN(), but got ${e.length}`);let t=e.map((r,a)=>_(r,`tensors${a}`,"addN")),n=t[0];t.forEach(r=>{if(r.dtype!==n.dtype)throw new Error("All tensors passed to tf.addN() must have the same dtype")}),t.forEach(r=>{if(!mo(r.shape,n.shape))throw new Error("All tensors passed to tf.addN() must have the same shape")});let s=t;return L.runKernel(go,s)}var a0=B({addN_:bP});function vP(e,t=null,n=!1){let r={x:_(e,"x","all","bool")},a={axis:t,keepDims:n};return L.runKernel(Ac,r,a)}var o0=B({all_:vP});function wP(e,t=null,n=!1){let r={x:_(e,"x","any","bool")},a={axis:t,keepDims:n};return L.runKernel(xc,r,a)}var fp=B({any_:wP});function kP(e,t=0){let s={x:_(e,"x","argMax")},r={axis:t};return L.runKernel(yo,s,r)}var Ps=B({argMax_:kP});function SP(e,t=0){let s={x:_(e,"x","argMin")},r={axis:t};return L.runKernel(bc,s,r)}var Gy=B({argMin_:SP});function IP(e){let n={x:_(e,"x","asin")};return L.runKernel(vc,n)}var Hy=B({asin_:IP});function CP(e){let n={x:_(e,"x","asinh")};return L.runKernel(wc,n)}var jy=B({asinh_:CP});function TP(e){let n={x:_(e,"x","atan")};return L.runKernel(kc,n)}var qy=B({atan_:TP});function NP(e,t){let n=_(e,"a","atan2"),s=_(t,"b","atan2");[n,s]=jt(n,s);let r={a:n,b:s};return L.runKernel(pl,r)}var Xy=B({atan2_:NP});function EP(e){let n={x:_(e,"x","atanh")};return L.runKernel(Sc,n)}var Ky=B({atanh_:EP});function RP(e,t,n,s,r="NHWC",a){let o=e[3],i=[...t,o],l=u6(r);return Qp(e,i,n,a,s,null,null,l)}function i6(e,t,n,s,r,a,o="channelsLast"){let[i,l]=im(t),u;if(o==="channelsLast")u=[i,l,e[3],e[3]];else if(o==="channelsFirst")u=[i,l,e[1],e[1]];else throw new Error(`Unknown dataFormat ${o}`);return Qp(e,u,n,s,r,a,!1,o)}function _P(e,t,n,s,r,a,o="NDHWC"){let[i,l,u]=T3(t),c,p;if(o==="NDHWC")p="channelsLast",c=[i,l,u,e[4],e[4]];else if(o==="NCDHW")p="channelsFirst",c=[i,l,u,e[1],e[1]];else throw new Error(`Unknown dataFormat ${o}`);return l6(e,c,n,s,r,!1,p,a)}function Qp(e,t,n,s,r,a,o=!1,i="channelsLast"){let[l,u,c,p]=[-1,-1,-1,-1];if(i==="channelsLast")[l,u,c,p]=e;else if(i==="channelsFirst")[l,p,u,c]=e;else throw new Error(`Unknown dataFormat ${i}`);let[d,h,,f]=t,[m,g]=im(n),[y,x]=im(s),A=Xu(d,y),b=Xu(h,x),{padInfo:w,outHeight:k,outWidth:C}=PP(r,u,c,m,g,A,b,a,i),N=o?f*p:f,R;return i==="channelsFirst"?R=[l,N,k,C]:i==="channelsLast"&&(R=[l,k,C,N]),{batchSize:l,dataFormat:i,inHeight:u,inWidth:c,inChannels:p,outHeight:k,outWidth:C,outChannels:N,padInfo:w,strideHeight:m,strideWidth:g,filterHeight:d,filterWidth:h,effectiveFilterHeight:A,effectiveFilterWidth:b,dilationHeight:y,dilationWidth:x,inShape:e,outShape:R,filterShape:t}}function l6(e,t,n,s,r,a=!1,o="channelsLast",i){let[l,u,c,p,d]=[-1,-1,-1,-1,-1];if(o==="channelsLast")[l,u,c,p,d]=e;else if(o==="channelsFirst")[l,d,u,c,p]=e;else throw new Error(`Unknown dataFormat ${o}`);let[h,f,m,,g]=t,[y,x,A]=T3(n),[b,w,k]=T3(s),C=Xu(h,b),N=Xu(f,w),R=Xu(m,k),{padInfo:D,outDepth:E,outHeight:$,outWidth:S}=FP(r,u,c,p,y,x,A,C,N,R,i),F=a?g*d:g,z;return o==="channelsFirst"?z=[l,F,E,$,S]:o==="channelsLast"&&(z=[l,E,$,S,F]),{batchSize:l,dataFormat:o,inDepth:u,inHeight:c,inWidth:p,inChannels:d,outDepth:E,outHeight:$,outWidth:S,outChannels:F,padInfo:D,strideDepth:y,strideHeight:x,strideWidth:A,filterDepth:h,filterHeight:f,filterWidth:m,effectiveFilterDepth:C,effectiveFilterHeight:N,effectiveFilterWidth:R,dilationDepth:b,dilationHeight:w,dilationWidth:k,inShape:e,outShape:z,filterShape:t}}function DP(e,t,n,s,r){s==null&&(s=Zy(e,t,n));let a=e[0],o=e[1],i=qi((a-t+2*s)/n+1,r),l=qi((o-t+2*s)/n+1,r);return[i,l]}function $P(e,t,n,s,r,a){r==null&&(r=Zy(e,t,s));let o=e[0],i=e[1],l=e[2],u=qi((o-t+2*r)/s+1,a),c=qi((i-t+2*r)/s+1,a),p=qi((l-t+2*r)/s+1,a);return[u,c,p,n]}function Zy(e,t,n,s=1){let r=Xu(t,s);return Math.floor((e[0]*(n-1)-n+r)/2)}function im(e){return typeof e=="number"?[e,e,e]:e.length===2?[e[0],e[1],1]:e}function T3(e){return typeof e=="number"?[e,e,e]:e}function Xu(e,t){return t<=1?e:e+(e-1)*(t-1)}function PP(e,t,n,s,r,a,o,i,l){let u,c,p;if(typeof e=="number"){u={top:e,bottom:e,left:e,right:e,type:e===0?"VALID":"NUMBER"};let h=DP([t,n],a,s,e,i);c=h[0],p=h[1]}else if(e==="same"){c=Math.ceil(t/s),p=Math.ceil(n/r);let d=Math.max(0,(c-1)*s+a-t),h=Math.max(0,(p-1)*r+o-n),f=Math.floor(d/2),m=d-f,g=Math.floor(h/2),y=h-g;u={top:f,bottom:m,left:g,right:y,type:"SAME"}}else if(e==="valid")u={top:0,bottom:0,left:0,right:0,type:"VALID"},c=Math.ceil((t-a+1)/s),p=Math.ceil((n-o+1)/r);else if(typeof e=="object"){let d=l==="channelsLast"?e[1][0]:e[2][0],h=l==="channelsLast"?e[1][1]:e[2][1],f=l==="channelsLast"?e[2][0]:e[3][0],m=l==="channelsLast"?e[2][1]:e[3][1];u={top:d,bottom:h,left:f,right:m,type:d===0&&h===0&&f===0&&m===0?"VALID":"EXPLICIT"},c=qi((t-a+d+h)/s+1,i),p=qi((n-o+f+m)/r+1,i)}else throw Error(`Unknown padding parameter: ${e}`);return{padInfo:u,outHeight:c,outWidth:p}}function FP(e,t,n,s,r,a,o,i,l,u,c){let p,d,h,f;if(typeof e=="number"){p={top:e,bottom:e,left:e,right:e,front:e,back:e,type:e===0?"VALID":"NUMBER"};let g=$P([t,n,s,1],i,1,r,e,c);d=g[0],h=g[1],f=g[2]}else if(e==="same"){d=Math.ceil(t/r),h=Math.ceil(n/a),f=Math.ceil(s/o);let m=(d-1)*r+i-t,g=(h-1)*a+l-n,y=(f-1)*o+u-s,x=Math.floor(m/2),A=m-x,b=Math.floor(g/2),w=g-b,k=Math.floor(y/2),C=y-k;p={top:b,bottom:w,left:k,right:C,front:x,back:A,type:"SAME"}}else if(e==="valid")p={top:0,bottom:0,left:0,right:0,front:0,back:0,type:"VALID"},d=Math.ceil((t-i+1)/r),h=Math.ceil((n-l+1)/a),f=Math.ceil((s-u+1)/o);else throw Error(`Unknown padding parameter: ${e}`);return{padInfo:p,outDepth:d,outHeight:h,outWidth:f}}function qi(e,t){if(!t)return Math.trunc(e);switch(t){case"round":return Math.round(e);case"ceil":return Math.ceil(e);case"floor":return Math.floor(e);default:throw new Error(`Unknown roundingMode ${t}`)}}function ao(e){let[t,n,s]=im(e);return t===1&&n===1&&s===1}function aa(e,t){return ao(e)||ao(t)}function u6(e){if(e==="NHWC")return"channelsLast";if(e==="NCHW")return"channelsFirst";throw new Error(`Unknown dataFormat ${e}`)}function us(e,t,n){if(n!=null){if(typeof t=="string")throw Error(`Error in ${e}: pad must be an integer when using dimRoundingMode ${n} but got pad ${t}.`);if(typeof t=="number")P(Yu(t),()=>`Error in ${e}: pad must be an integer when using dimRoundingMode ${n} but got pad ${t}.`);else if(typeof t=="object")t.forEach(s=>{s.forEach(r=>{P(Yu(r),()=>`Error in ${e}: pad must be an integer when using dimRoundingMode ${n} but got pad ${r}.`)})});else throw Error(`Error in ${e}: Unknown padding parameter: ${t}`)}}function OP(e,t){let s={x:_(e,"x","reshape","string_or_numeric")},r={shape:t};return L.runKernel(zl,s,r)}var W=B({reshape_:OP});function MP(e,t,n,s,r){let a=_(e,"x","avgPool","float32"),o=1;P(aa(n,o),()=>`Error in avgPool: Either strides or dilations must be 1. Got strides ${n} and dilations '${o}'`);let i=a,l=!1;a.rank===3&&(l=!0,i=W(a,[1,a.shape[0],a.shape[1],a.shape[2]])),P(i.rank===4,()=>`Error in avgPool: x must be rank 4 but got rank ${i.rank}.`),us("avgPool",s,r);let u={x:i},c={filterSize:t,strides:n,pad:s,dimRoundingMode:r},p=L.runKernel(Ao,u,c);return p=me(p,a.dtype),l?W(p,[p.shape[1],p.shape[2],p.shape[3]]):p}var eh=B({avgPool_:MP});function zP(e,t,n,s,r,a="NDHWC"){let o=_(e,"x","avgPool3d","float32"),i=o,l=!1;o.rank===4&&(l=!0,i=W(o,[1,o.shape[0],o.shape[1],o.shape[2],o.shape[3]])),P(i.rank===5,()=>`Error in avgPool3d: x must be rank 5 but got rank ${i.rank}.`),P(a==="NDHWC",()=>`Error in avgPool3d: Only NDHWC is currently supported, but got dataFormat of ${a}`),us("avgPool3d",s,r);let u={x:i},c={filterSize:t,strides:n,pad:s,dimRoundingMode:r,dataFormat:a},p=L.runKernel(Np,u,c);return p=me(p,i.dtype),l?W(p,[p.shape[1],p.shape[2],p.shape[3],p.shape[4]]):p}var Yy=B({avgPool3d_:zP});function LP(e,t=0){P(e.length>=1,()=>"Pass at least one tensor to concat");let n=hp(e,"tensors","concat","string_or_numeric");if(n[0].dtype==="complex64"&&n.forEach(a=>{if(a.dtype!=="complex64")throw new Error(`Cannot concatenate complex64 tensors with a tensor + with dtype ${a.dtype}. `)}),n.length===1)return Hn(n[0]);let s=n,r={axis:t};return L.runKernel(fl,s,r)}var ut=B({concat_:LP});function BP(e){let n={x:_(e,"x","sigmoid","float32")};return L.runKernel(ni,n)}var Mn=B({sigmoid_:BP});function WP(e,t,n){let s=_(e,"x","slice","string_or_numeric");if(s.rank===0)throw new Error("Slicing scalar is not possible");let r={x:s},a={begin:t,size:n};return L.runKernel(Ul,r,a)}var Oe=B({slice_:WP});function VP(e){let n={x:_(e,"x","tanh","float32")};return L.runKernel(li,n)}var tl=B({tanh_:VP});function UP(e,t,n,s,r,a){let o=_(e,"forgetBias","basicLSTMCell"),i=_(t,"lstmKernel","basicLSTMCell"),l=_(n,"lstmBias","basicLSTMCell"),u=_(s,"data","basicLSTMCell"),c=_(r,"c","basicLSTMCell"),p=_(a,"h","basicLSTMCell"),d=ut([u,p],1),h=et(d,i),f=le(h,l),m=f.shape[0],g=f.shape[1]/4,y=[m,g],x=Oe(f,[0,0],y),A=Oe(f,[0,g],y),b=Oe(f,[0,g*2],y),w=Oe(f,[0,g*3],y),k=le(M(Mn(x),tl(A)),M(c,Mn(le(o,b)))),C=M(tl(k),Mn(w));return[k,C]}var c6=B({basicLSTMCell_:UP});function GP(e,t,n){let s=_(e,"x","batchToSpaceND"),r=t.reduce((i,l)=>i*l);P(s.rank>=1+t.length,()=>`input rank is ${s.rank} but should be > than blockShape.length ${t.length}`),P(n.length===t.length,()=>`crops.length is ${n.length} but should be equal to blockShape.length ${t.length}`),P(s.shape[0]%r===0,()=>`input tensor batch is ${s.shape[0]} but is not divisible by the product of the elements of blockShape ${t.join(" * ")} === ${r}`);let a={x:s},o={blockShape:t,crops:n};return L.runKernel(hl,a,o)}var th=B({batchToSpaceND_:GP});function HP(e){let t;return e.rank===0||e.rank===1?t=W(e,[1,1,1,e.size]):e.rank===2?t=W(e,[1,1,e.shape[0],e.shape[1]]):e.rank===3?t=W(e,[1,e.shape[0],e.shape[1],e.shape[2]]):t=e,t}function jP(e,t,n,s,r,a){a==null&&(a=.001);let o=_(e,"x","batchNorm"),i=_(t,"mean","batchNorm"),l=_(n,"variance","batchNorm"),u;r!=null&&(u=_(r,"scale","batchNorm"));let c;s!=null&&(c=_(s,"offset","batchNorm")),P(i.rank===l.rank,()=>"Batch normalization gradient requires mean and variance to have equal ranks."),P(c==null||i.rank===c.rank,()=>"Batch normalization gradient requires mean and offset to have equal ranks."),P(u==null||i.rank===u.rank,()=>"Batch normalization gradient requires mean and scale to have equal ranks.");let d={x:HP(o),scale:u,offset:c,mean:i,variance:l},h={varianceEpsilon:a},f=L.runKernel($o,d,h);return W(f,o.shape)}var Wc=B({batchNorm_:jP});function qP(e,t,n,s,r,a){let o=_(e,"x","batchNorm"),i=_(t,"mean","batchNorm"),l=_(n,"variance","batchNorm"),u;r!=null&&(u=_(r,"scale","batchNorm"));let c;return s!=null&&(c=_(s,"offset","batchNorm")),P(o.rank===2,()=>`Error in batchNorm2D: x must be rank 2 but got rank ${o.rank}.`),P(i.rank===2||i.rank===1,()=>`Error in batchNorm2D: mean must be rank 2 or rank 1 but got rank ${i.rank}.`),P(l.rank===2||l.rank===1,()=>`Error in batchNorm2D: variance must be rank 2 or rank 1 but got rank ${l.rank}.`),u!=null&&P(u.rank===2||u.rank===1,()=>`Error in batchNorm2D: scale must be rank 2 or rank 1 but got rank ${u.rank}.`),c!=null&&P(c.rank===2||c.rank===1,()=>`Error in batchNorm2D: offset must be rank 2 or rank 1 but got rank ${c.rank}.`),Wc(o,i,l,c,u,a)}var Jy=B({batchNorm2d_:qP});function XP(e,t,n,s,r,a){let o=_(e,"x","batchNorm"),i=_(t,"mean","batchNorm"),l=_(n,"variance","batchNorm"),u;r!=null&&(u=_(r,"scale","batchNorm"));let c;return s!=null&&(c=_(s,"offset","batchNorm")),P(o.rank===3,()=>`Error in batchNorm3D: x must be rank 3 but got rank ${o.rank}.`),P(i.rank===3||i.rank===1,()=>`Error in batchNorm3D: mean must be rank 3 or rank 1 but got rank ${i.rank}.`),P(l.rank===3||l.rank===1,()=>`Error in batchNorm3D: variance must be rank 3 or rank 1 but got rank ${l.rank}.`),u!=null&&P(u.rank===3||u.rank===1,()=>`Error in batchNorm3D: scale must be rank 3 or rank 1 but got rank ${u.rank}.`),c!=null&&P(c.rank===3||c.rank===1,()=>`Error in batchNorm3D: offset must be rank 3 or rank 1 but got rank ${c.rank}.`),Wc(o,i,l,c,u,a)}var Qy=B({batchNorm3d_:XP});function KP(e,t,n,s,r,a){let o=_(e,"x","batchNorm"),i=_(t,"mean","batchNorm"),l=_(n,"variance","batchNorm"),u;r!=null&&(u=_(r,"scale","batchNorm"));let c;return s!=null&&(c=_(s,"offset","batchNorm")),P(o.rank===4,()=>`Error in batchNorm4D: x must be rank 4 but got rank ${o.rank}.`),P(i.rank===4||i.rank===1,()=>`Error in batchNorm4D: mean must be rank 4 or rank 1 but got rank ${i.rank}.`),P(l.rank===4||l.rank===1,()=>`Error in batchNorm4D: variance must be rank 4 or rank 1 but got rank ${l.rank}.`),u!=null&&P(u.rank===4||u.rank===1,()=>`Error in batchNorm4D: scale must be rank 4 or rank 1 but got rank ${u.rank}.`),c!=null&&P(c.rank===4||c.rank===1,()=>`Error in batchNorm4D: offset must be rank 4 or rank 1 but got rank ${c.rank}.`),Wc(o,i,l,c,u,a)}var eA=B({batchNorm4d_:KP});function ZP(e,t,n){let s=_(e,"x","bincount"),r=_(t,"weights","bincount");P(s.dtype==="int32",()=>`Error in bincount: input dtype must be int32, but got ${s.dtype}`),P(n>=0,()=>`size must be non-negative, but got ${n}.`),P(r.size===s.size||r.size===0,()=>`Error in bincount: weights must have the same size as input or0-length, but got input shape: ${s.shape}, weights shape: ${r.shape}.`);let a={x:s,weights:r},o={size:n};return L.runKernel(Pm,a,o)}var tA=B({bincount_:ZP});function YP(e,t){let n=_(e,"s0","broadcastArgs","int32"),s=_(t,"s1","broadcastArgs","int32");if(n.rank!==1)throw new Error(`broadcastArgs(): first input must be a vector (rank=1). Has rank ${n.rank}`);if(s.rank!==1)throw new Error(`broadcastArgs(): second input must be a vector (rank=1). Has rank ${s.rank}`);let r={s0:n,s1:s};return L.runKernel(Fm,r)}var d6=B({broadcastArgs_:YP});function JP(e,t){let n=_(e,"broadcastTo","x"),s=n.shape;if(t.some(u=>!(u>0)||u%1!==0))throw new Error(`broadcastTo(): Invalid broadcast shape [${t}].`);if(t.lengthn.rank){let u=n.shape.slice();for(;u.length=0;u--)if(r[u]===t[u])a[u]=1;else if(n.shape[u]!==1)throw new Error(`broadcastTo(): [${s}] cannot be broadcast to [${t}].`);if(a.map((u,c)=>u>1?c:-1).filter(u=>u>=0).length===0)return Hn(n);let i={x:n},l={reps:a};return L.runKernel(Ea,i,l)}var Xi=B({broadcastTo_:JP});function QP(e){let n={x:_(e,"x","ceil","float32")};return L.runKernel(vo,n)}var nA=B({ceil_:QP});function zr(e,t,n){let s={shape:e,value:t,dtype:n};return L.runKernel(Cc,{},s)}function eF(e,t,n){let s=_(e,"x","clipByValue");if(P(t<=n,()=>`Error in clip: min (${t}) must be less than or equal to max (${n}).`),t===n)return zr(s.shape,t,s.dtype);let r={x:s},a={clipValueMin:t,clipValueMax:n};return L.runKernel(Na,r,a)}var bs=B({clipByValue_:eF});function tF(e){return ut(e,0)}var sA=B({concat1d_:tF});function nF(e,t){return ut(e,t)}var nu=B({concat2d_:nF});function sF(e,t){return ut(e,t)}var rA=B({concat3d_:sF});function rF(e,t){return ut(e,t)}var aA=B({concat4d_:rF});function aF(e,t,n,s,r="NHWC",a=[1,1],o){let i=_(e,"x","conv2d","float32"),l=_(t,"filter","conv2d","float32"),u=i,c=!1;i.rank===3&&(c=!0,u=W(i,[1,i.shape[0],i.shape[1],i.shape[2]])),P(u.rank===4,()=>`Error in conv2d: input must be rank 4, but got rank ${u.rank}.`),P(l.rank===4,()=>`Error in conv2d: filter must be rank 4, but got rank ${l.rank}.`),us("conv2d",s,o);let p=r==="NHWC"?u.shape[3]:u.shape[1];P(p===l.shape[2],()=>`Error in conv2d: depth of input (${p}) must match input depth for filter ${l.shape[2]}.`),P(aa(n,a),()=>`Error in conv2D: Either strides or dilations must be 1. Got strides ${n} and dilations '${a}'`);let d={x:u,filter:l},h={strides:n,pad:s,dataFormat:r,dilations:a,dimRoundingMode:o},f=L.runKernel(wo,d,h);return c?W(f,[f.shape[1],f.shape[2],f.shape[3]]):f}var ka=B({conv2d_:aF});function oF(e,t,n,s,r="NWC",a=1,o){let i=_(e,"x","conv1d"),l=_(t,"filter","conv1d"),u=i,c=!1;i.rank===2&&(c=!0,u=W(i,[1,i.shape[0],i.shape[1]])),P(u.rank===3,()=>`Error in conv1d: input must be rank 3, but got rank ${u.rank}.`),P(l.rank===3,()=>`Error in conv1d: filter must be rank 3, but got rank ${l.rank}.`),us("conv1d",s,o),P(u.shape[2]===l.shape[1],()=>`Error in conv1d: depth of input (${u.shape[2]}) must match input depth for filter ${l.shape[1]}.`),P(aa(n,a),()=>`Error in conv1D: Either stride or dilation must be 1. Got stride ${n} and dilation '${a}'`),P(r==="NWC",()=>`Error in conv1d: got dataFormat of ${r} but only NWC is currently supported.`);let p=W(l,[1,l.shape[0],l.shape[1],l.shape[2]]),d=W(u,[u.shape[0],1,u.shape[1],u.shape[2]]),g=ka(d,p,[1,n],s,"NHWC",[1,a],o);return c?W(g,[g.shape[2],g.shape[3]]):W(g,[g.shape[0],g.shape[2],g.shape[3]])}var i0=B({conv1d_:oF});function iF(e,t,n,s,r,a="NHWC",o){P(e.length===t.rank,()=>`Length of inShape (${e.length}) and rank of dy (${t.rank}) must match`);let i=e,l=t,u=!1;t.rank===3&&(u=!0,l=W(t,[1,t.shape[0],t.shape[1],t.shape[2]]),i=[1,e[0],e[1],e[2]]),P(i.length===4,()=>`Error in conv2dDerInput: inShape must be length 4, but got length ${i.length}.`),P(l.rank===4,()=>`Error in conv2dDerInput: dy must be rank 4, but got rank ${l.rank}`),P(n.rank===4,()=>`Error in conv2dDerInput: filter must be rank 4, but got rank ${n.rank}`);let c=a==="NHWC"?i[3]:i[1],p=a==="NHWC"?l.shape[3]:l.shape[1];P(c===n.shape[2],()=>`Error in conv2dDerInput: depth of input (${c}) must match input depth for filter ${n.shape[2]}.`),P(p===n.shape[3],()=>`Error in conv2dDerInput: depth of output (${p}) must match output depth for filter ${n.shape[3]}.`),us("conv2dDerInput",r,o);let d={dy:l,filter:n},h={strides:s,pad:r,dataFormat:a,dimRoundingMode:o,inputShape:i},f=L.runKernel(ko,d,h);return u?W(f,[f.shape[1],f.shape[2],f.shape[3]]):f}var oA=B({conv2DBackpropInput_:iF});function lF(e,t,n,s,r,a){let o=_(e,"x","conv2dTranspose"),i=_(t,"filter","conv2dTranspose");return oA(n,o,i,s,r,"NHWC",a)}var l0=B({conv2dTranspose_:lF});function uF(e,t,n,s,r="NDHWC",a=[1,1,1]){let o=_(e,"x","conv3d"),i=_(t,"filter","conv3d"),l=o,u=!1;o.rank===4&&(u=!0,l=W(o,[1,o.shape[0],o.shape[1],o.shape[2],o.shape[3]])),P(l.rank===5,()=>`Error in conv3d: input must be rank 5, but got rank ${l.rank}.`),P(i.rank===5,()=>`Error in conv3d: filter must be rank 5, but got rank ${i.rank}.`),P(l.shape[4]===i.shape[3],()=>`Error in conv3d: depth of input (${l.shape[4]}) must match input depth for filter ${i.shape[3]}.`),P(aa(n,a),()=>`Error in conv3D: Either strides or dilations must be 1. Got strides ${n} and dilations '${a}'`),P(r==="NDHWC",()=>`Error in conv3d: got dataFormat of ${r} but only NDHWC is currently supported.`);let c={x:l,filter:i},p={strides:n,pad:s,dataFormat:r,dilations:a},d=L.runKernel(_p,c,p);return u?W(d,[d.shape[1],d.shape[2],d.shape[3],d.shape[4]]):d}var iA=B({conv3d_:uF});function cF(e,t,n,s,r){P(e.length===t.rank,()=>`Length of inShape (${e.length}) and rank of dy (${t.rank}) must match`);let a=e,o=t,i=!1;t.rank===4&&(i=!0,o=W(t,[1,t.shape[0],t.shape[1],t.shape[2],t.shape[3]]),a=[1,e[0],e[1],e[2],e[3]]);let l=a[4],u=o.shape[4];P(a.length===5,()=>`Error in conv3dDerInput: inShape must be length 5, but got length ${a.length}.`),P(o.rank===5,()=>`Error in conv3dDerInput: dy must be rank 5, but got rank ${o.rank}`),P(n.rank===5,()=>`Error in conv3dDerInput: filter must be rank 5, but got rank ${n.rank}`),P(l===n.shape[3],()=>`Error in conv3dDerInput: depth of input (${l}) must match input depth for filter ${n.shape[3]}.`),P(u===n.shape[4],()=>`Error in conv3dDerInput: depth of output (${u}) must match output depth for filter ${n.shape[4]}.`);let c={dy:o,filter:n},p={pad:r,strides:s,inputShape:a},d=L.runKernel(zm,c,p);return i?W(d,[d.shape[1],d.shape[2],d.shape[3],d.shape[4]]):d}var p6=B({conv3DBackpropInput_:cF});function dF(e,t,n,s,r){let a=_(e,"x","conv3dTranspose"),o=_(t,"filter","conv3dTranspose");return p6(n,a,o,s,r)}var lA=B({conv3dTranspose_:dF});function pF(e){let n={x:_(e,"x","cos","float32")};return L.runKernel(So,n)}var nh=B({cos_:pF});function hF(e){let n={x:_(e,"x","cosh","float32")};return L.runKernel(Io,n)}var u0=B({cosh_:hF});function fF(e,t=0,n=!1,s=!1){let a={x:_(e,"x","cumprod")},o={axis:t,exclusive:n,reverse:s};return L.runKernel(ml,a,o)}var mp=B({cumprod_:fF});function mF(e,t=0,n=!1,s=!1){let a={x:_(e,"x","cumsum")},o={axis:t,exclusive:n,reverse:s};return L.runKernel(Co,a,o)}var c0=B({cumsum_:mF});function gF(e,t,n,s=!1){let r=_(e,"x","denseBincount"),a=_(t,"weights","denseBincount");P(r.dtype==="int32",()=>`Error in denseBincount: input dtype must be int32, but got ${r.dtype}`),P(r.rank<=2,()=>`Error in denseBincount: input must be at most rank 2, but got rank ${r.rank}.`),P(n>=0,()=>`size must be non-negative, but got ${n}.`),P(a.size===r.size||a.size===0,()=>`Error in denseBincount: weights must have the same shape as x or 0-length, but got x shape: ${r.shape}, weights shape: ${a.shape}.`);let o={x:r,weights:a},i={size:n,binaryOutput:s};return L.runKernel(Lm,o,i)}var h6=B({denseBincount_:gF});function yF(e,t,n="NHWC"){let s=_(e,"x","depthToSpace","float32"),r=n==="NHWC"?s.shape[1]:s.shape[2],a=n==="NHWC"?s.shape[2]:s.shape[3],o=n==="NHWC"?s.shape[3]:s.shape[1];P(t>1,()=>`blockSize should be > 1 for depthToSpace, but was: ${t}`),P(r*t>=0,()=>`Negative dimension size caused by overflow when multiplying ${r} and ${t} for depthToSpace with input shape - ${s.shape}`),O(a*t>=0,()=>`Negative dimension size caused by overflow when multiplying + ${s.shape}`),P(a*t>=0,()=>`Negative dimension size caused by overflow when multiplying ${a} and ${t} for depthToSpace with input shape - ${s.shape}`),O(o%(t*t)===0,()=>`Dimension size must be evenly divisible by ${t*t} but is ${o} for depthToSpace with input shape ${s.shape}`);let i={x:s},l={blockSize:t,dataFormat:n};return B.runKernel(Il,i,l)}var RA=W({depthToSpace_:qF});function XF(e,t,n,s,r="NHWC",a=[1,1],o){let i=D(e,"x","depthwiseConv2d","float32"),l=D(t,"filter","depthwiseConv2d","float32"),u=i,c=!1;i.rank===3&&(c=!0,u=V(i,[1,i.shape[0],i.shape[1],i.shape[2]])),O(u.rank===4,()=>`Error in depthwiseConv2d: input must be rank 4, but got rank ${u.rank}.`),O(l.rank===4,()=>`Error in depthwiseConv2d: filter must be rank 4, but got rank ${l.rank}.`);let p=r==="NHWC"?u.shape[3]:u.shape[1];O(p===l.shape[2],()=>`Error in depthwiseConv2d: number of input channels (${p}) must match the inChannels dimension in filter ${l.shape[2]}.`),ps("depthwiseConv2d",s,o);let d={x:u,filter:l},h={strides:n,pad:s,dataFormat:r,dilations:a,dimRoundingMode:o},f=B.runKernel(Ro,d,h);return c?V(f,[f.shape[1],f.shape[2],f.shape[3]]):f}var ed=W({depthwiseConv2d_:XF});function KF(e){let n={x:D(e,"x","diag")};return B.runKernel(p0,n)}var _w=W({diag_:KF});function ZF(e,t,n,s,r=[1,1],a="NHWC"){let o=D(e,"x","dilation2d"),i=D(t,"filter","dilation2d");O(o.rank===3||o.rank===4,()=>`Error in dilation2d: input must be rank 3 or 4, but got rank ${o.rank}.`),O(i.rank===3,()=>`Error in dilation2d: filter must be rank 3, but got rank ${i.rank}.`),O(a==="NHWC",()=>`Error in dilation2d: Only NHWC is currently supported, but got dataFormat of ${a}`);let l=o,u=!1;o.rank===3&&(l=V(o,[1,o.shape[0],o.shape[1],o.shape[2]]),u=!0);let c={x:l,filter:i},p={strides:n,pad:s,dilations:r},d=B.runKernel(Kp,c,p);return u?V(d,[d.shape[1],d.shape[2],d.shape[3]]):d}var _A=W({dilation2d_:ZF});function YF(e,t){let n=D(e,"a","equal","string_or_numeric"),s=D(t,"b","equal","string_or_numeric");[n,s]=Xt(n,s),St(n.shape,s.shape);let r={a:n,b:s};return B.runKernel(Cl,r)}var zs=W({equal_:YF});function JF(e,t,n){let s=D(t,"a","where"),r=D(n,"b","where"),a=D(e,"condition","where","bool"),o=St(St(a.shape,s.shape),r.shape),i=nl(a,o),l=nl(s,o),u=nl(r,o),c={condition:i,t:l,e:u};return B.runKernel(Zl,c)}var jn=W({where_:JF});function QF(e){let n={x:D(e,"x","zerosLike")};return B.runKernel(ou,n)}var dt=W({zerosLike_:QF});function eO(e,t){let n=D(e,"a","div"),s=D(t,"b","div");[n,s]=Xt(n,s);let r=ye(n,s),a=dt(r),o=zs(s,a);return jn(o,a,r)}var DA=W({divNoNan_:eO});function tO(e,t){let n=D(e,"t1","dot"),s=D(t,"t2","dot");O((n.rank===1||n.rank===2)&&(s.rank===1||s.rank===2),()=>`Error in dot: inputs must all be rank 1 or 2, but got ranks ${n.rank} and ${s.rank}.`);let r=n.rank===1?n.size:n.shape[1],a=s.rank===1?s.size:s.shape[0];if(O(r===a,()=>`Error in dot: inner dimensions of inputs must match, but got ${r} and ${a}.`),n.rank===1&&s.rank===1){let o=V(n,[1,-1]),i=V(s,[-1,1]),l=rt(o,i);return V(l,[])}else if(n.rank===1&&s.rank===2){let o=V(n,[1,-1]),i=V(s,[s.shape[0],s.shape[1]]),l=rt(o,i);return V(l,[l.size])}else if(n.rank===2&&s.rank===1){let o=V(s,[-1,1]),i=rt(n,o);return V(i,[i.size])}else{let o=V(s,[s.shape[0],s.shape[1]]);return rt(n,o)}}var $A=W({dot_:tO});function nO(e,...t){let n=t.map((r,a)=>D(r,`tensors${a}`,"einsum")),s={equation:e};return B.runKernel(Zp,n,s)}var Dw=W({einsum_:nO});function sO(e){let n={x:D(e,"x","elu","float32")};return B.runKernel(Do,n)}var td=W({elu_:sO});function rO(e){let t=D(e,"x","erf");O(t.dtype==="int32"||t.dtype==="float32",()=>"Input dtype must be `int32` or `float32`."),t.dtype==="int32"&&(t=ge(t,"float32"));let n={x:t};return B.runKernel(Mc,n)}var PA=W({erf_:rO});function FA(e,t){for(let n=0;ne[a]);return[n,r]}function cl(e,t){let n=t.map(s=>1);return $w(e,n,t)}function aO(e,t,n){O(FA(t,n),()=>`${e} supports only inner-most axes for now. Got axes ${t} and rank-${n} input.`)}function Fw(e,t){if(FA(e,t))return null;let n=[];for(let s=0;sn.push(s)),n}function OA(e){return e.map((t,n)=>[n,t]).sort((t,n)=>t[1]-n[1]).map(t=>t[0])}function oO(e,t){let n=[];for(let s=t-e;s"Axis must be <= rank of the tensor");let s={input:n},r={dim:t};return B.runKernel(Tl,s,r)}var Ft=W({expandDims_:gO});function yO(e){let n={x:D(e,"x","expm1")};return B.runKernel(Nl,n)}var zA=W({expm1_:yO});function AO(e,t){let n=D(e,"x","tile","string_or_numeric");O(n.rank===t.length,()=>`Error in transpose: rank of input ${n.rank} must match length of reps ${t}.`);let s={x:n},r={reps:t};return B.runKernel(Pa,s,r)}var bs=W({tile_:AO});function xO(e,t,n,s="float32"){t==null&&(t=e);let r=Ue([e,t],s),a=e<=t?e:t;for(let i=0;i`Error in localResponseNormalization: x must be rank 3 or 4 but got - rank ${a.rank}.`),O(uc(t),()=>`Error in localResponseNormalization: depthRadius must be an integer but got depthRadius ${t}.`);let o=a,i=!1;a.rank===3&&(i=!0,o=V(a,[1,a.shape[0],a.shape[1],a.shape[2]]));let l={x:o},u={depthRadius:t,bias:n,alpha:s,beta:r},c=B.runKernel(Jp,l,u);return i?V(c,[c.shape[1],c.shape[2],c.shape[3]]):c}var VA=W({localResponseNormalization_:RO});function _O(e){let n={x:D(e,"x","log","float32")};return B.runKernel(Bo,n)}var Bs=W({log_:_O});function DO(e){let n={x:D(e,"x","log1p")};return B.runKernel(Wc,n)}var vh=W({log1p_:DO});function $O(e){return O(ro(e),()=>"The f passed in grad(f) must be a function"),(t,n)=>{let s=D(t,"x","tf.grad","string_or_numeric"),r=n!=null?D(n,"dy","tf.grad"):null;return B.tidy(()=>{let{value:a,grads:o}=B.gradients(()=>e(s),[s],r);return r!=null&&ds(a.shape,r.shape,"The shape of dy passed in grad(f)(x, dy) must match the shape returned by f(x)"),O0(o),o[0]})}}function PO(e){return O(ro(e),()=>"The f passed in grads(f) must be a function"),(t,n)=>{O(Array.isArray(t),()=>"The args passed in grads(f)(args) must be an array of `Tensor`s or `TensorLike`s");let s=Rp(t,"args","tf.grads","string_or_numeric"),r=n!=null?D(n,"dy","tf.grads"):null;return B.tidy(()=>{let{value:a,grads:o}=B.gradients(()=>e(...s),s,r);return r!=null&&ds(a.shape,r.shape,"The shape of dy passed in grads(f)([x1,...], dy) must match the shape returned by f([x1,...])"),O0(o),o})}}function FO(e){return O(ro(e),()=>"The f passed in valueAndGrad(f) must be a function"),(t,n)=>{O(t instanceof it,()=>"The x passed in valueAndGrad(f)(x) must be a tensor"),O(n==null||n instanceof it,()=>"The dy passed in valueAndGrad(f)(x, dy) must be a tensor");let{grads:s,value:r}=B.gradients(()=>e(t),[t],n);return O0(s),{grad:s[0],value:r}}}function OO(e){return O(ro(e),()=>"The f passed in valueAndGrads(f) must be a function"),(t,n)=>{O(Array.isArray(t)&&t.every(r=>r instanceof it),()=>"The args passed in valueAndGrads(f)(args) must be array of tensors"),O(n==null||n instanceof it,()=>"The dy passed in valueAndGrads(f)(args, dy) must be a tensor");let s=B.gradients(()=>e(...t),t,n);return n!=null&&ds(s.value.shape,n.shape,"The shape of dy passed in valueAndGrads(f)([x1,...], dy) must match the shape returned by f([x1,...])"),O0(s.grads),s}}function zw(e,t){O(ro(e),()=>"The f passed in variableGrads(f) must be a function"),O(t==null||Array.isArray(t)&&t.every(u=>u instanceof Np),()=>"The varList passed in variableGrads(f, varList) must be an array of variables");let n=t!=null;if(!n){t=[];for(let u in B.registeredVariables)t.push(B.registeredVariables[u])}let s=n?t.filter(u=>!u.trainable):null,r=t.length;t=t.filter(u=>u.trainable),O(t.length>0,()=>`variableGrads() expects at least one of the input variables to be trainable, but none of the ${r} variables is trainable.`);let a=!0,{value:o,grads:i}=B.gradients(e,t,null,a);O(i.some(u=>u!=null),()=>"Cannot find a connection between any variable and the result of the loss function y=f(x). Please make sure the operations that use variables are inside the function f passed to minimize()."),O(o.rank===0,()=>`The f passed in variableGrads(f) must return a scalar, but it returned a rank-${o.rank} tensor`);let l={};return t.forEach((u,c)=>{i[c]!=null&&(l[u.name]=i[c])}),s!=null&&s.forEach(u=>l[u.name]=null),{value:o,grads:l}}function oa(e){return B.customGrad(e)}function O0(e){if(e.filter(n=>n==null).length>0)throw new Error(`Cannot compute gradient of y=f(x) with respect to x. Make sure that - the f you passed encloses all operations that lead from x to y.`)}function MO(e){let n={x:D(e,"x","softplus")};return B.runKernel(Xc,n)}var du=W({softplus_:MO});function zO(e){let t=D(e,"x","logSigmoid");return oa(s=>({value:Pt(du(Pt(s))),gradFunc:o=>z(o,On(Pt(s)))}))(t)}var UA=W({logSigmoid_:zO});function LO(e,t){let n=D(e,"a","sub"),s=D(t,"b","sub");[n,s]=Xt(n,s);let r={a:n,b:s};return B.runKernel(ci,r)}var Ae=W({sub_:LO});function BO(e,t=-1){let n=D(e,"logits","logSoftmax");if(t===-1&&(t=n.rank-1),t!==n.rank-1)throw Error(`Log Softmax along a non-last dimension is not yet supported. Logits was rank ${n.rank} and axis was ${t}`);return oa((r,a)=>{let i=xn(r,t,!0),l=Ae(r,i),u=Ae(ge(l,"float32"),Bs(Se(Ls(l),t,!0)));return a([u]),{value:u,gradFunc:(p,d)=>{let[h]=d,f=!0,m=Ls(h);return Ae(p,z(Se(p,t,f),m))}}})(n)}var M0=W({logSoftmax_:BO});function WO(e,t=null,n=!1){let s=D(e,"x","logSumExp"),r=yr(t,s.shape),a=xn(s,r,!0),o=Ae(s,a),i=Ls(o),l=Se(i,r),u=Bs(l),c=de(V(a,u.shape),u);if(n){let p=cl(c.shape,r);return V(c,p)}return c}var z0=W({logSumExp_:WO});function VO(e,t){let n=D(e,"a","logicalAnd","bool"),s=D(t,"b","logicalAnd","bool");St(n.shape,s.shape);let r={a:n,b:s};return B.runKernel(Ol,r)}var gr=W({logicalAnd_:VO});function UO(e){let n={x:D(e,"x","logicalNot","bool")};return B.runKernel(Ml,n)}var wh=W({logicalNot_:UO});function GO(e,t){let n=D(e,"a","logicalOr","bool"),s=D(t,"b","logicalOr","bool");St(n.shape,s.shape);let r={a:n,b:s};return B.runKernel(Vc,r)}var L0=W({logicalOr_:GO});function HO(e,t){let n=D(e,"a","logicalXor","bool"),s=D(t,"b","logicalXor","bool");return St(n.shape,s.shape),gr(L0(e,t),wh(gr(e,t)))}var GA=W({logicalXor_:HO}),Yf=2147483648;function jO(e,t,n="left"){let s=D(e,"sortedSequence","searchSorted"),r=D(t,"values","searchSorted"),a=s.shape[s.shape.length-1],o=r.shape[r.shape.length-1],i=V(s,[-1,a]),l=V(r,[-1,o]);if(i.rank<2)throw new Error("Sorted input argument must be at least 2-dimensional");if(i.shape[0]!==l.shape[0])throw new Error("Leading dimension of 'sortedSequence' and 'values' must match.");if(Et(l.shape)>=Yf)throw new Error(`values tensor size must less than ${Yf}`);if(i.shape[1]>=Yf)throw new Error(`trailing dim_size must less than ${Yf} for int32 output type, was ${i.shape[1]}`);let u={sortedSequence:i,values:l},c={side:n};return B.runKernel(I0,u,c)}var B0=W({searchSorted_:jO});function Lw(e,t){return B0(e,t,"left")}function qO(e,t,n,s,r){let a=D(e,"x","maxPool"),o=1,i=a,l=!1;a.rank===3&&(l=!0,i=V(a,[1,a.shape[0],a.shape[1],a.shape[2]])),O(i.rank===4,()=>`Error in maxPool: input must be rank 4 but got rank ${i.rank}.`),O(ua(n,o),()=>`Error in maxPool: Either strides or dilations must be 1. Got strides ${n} and dilations '${o}'`),ps("maxPool",s,r);let u={x:i},c={filterSize:t,strides:n,pad:s,dimRoundingMode:r},p=B.runKernel(Uo,u,c);return l?V(p,[p.shape[1],p.shape[2],p.shape[3]]):p}var kh=W({maxPool_:qO});function XO(e,t=[1,1,1],n,s,r,a="NDHWC"){let o=D(e,"x","maxPool3d"),i=o,l=!1;o.rank===4&&(l=!0,i=V(o,[1,o.shape[0],o.shape[1],o.shape[2],o.shape[3]])),O(i.rank===5,()=>`Error in maxPool3d: x must be rank 5 but got rank ${i.rank}.`),O(a==="NDHWC",()=>`Error in maxPool3d: Only NDHWC is currently supported, but got dataFormat of ${a}`),ps("maxPool3d",s,r);let u={x:i},c={filterSize:t,strides:n,pad:s,dimRoundingMode:r,dataFormat:a},p=B.runKernel(Qp,u,c);return l?V(p,[p.shape[1],p.shape[2],p.shape[3],p.shape[4]]):p}var HA=W({maxPool3d_:XO});function KO(e,t,n,s,r=!1){let o={x:D(e,"x","maxPoolWithArgmax")},i={filterSize:t,strides:n,pad:s,includeBatchInIndex:r},l=B.runKernel(b0,o,i);return{result:l[0],indexes:l[1]}}var Bw=W({maxPoolWithArgmax_:KO});function ZO(e,t){let n=D(e,"a","maximum"),s=D(t,"b","maximum");[n,s]=Xt(n,s),n.dtype==="bool"&&(n=ge(n,"int32"),s=ge(s,"int32")),St(n.shape,s.shape);let r={a:n,b:s};return B.runKernel(Vo,r)}var da=W({maximum_:ZO});function YO(e,t=null,n=!1){let r={x:D(e,"x","mean")},a={axis:t,keepDims:n};return B.runKernel(Go,r,a)}var Ut=W({mean_:YO});function Gt(e,t="float32"){if(t==="complex64"){let s=Gt(e,"float32"),r=Gt(e,"float32");return Ta(s,r)}let n=t0(Et(e),t);return B.makeTensor(n,e,t)}function Os(e,t="float32"){if(t==="complex64"){let s=Os(e,"float32"),r=Gt(e,"float32");return Ta(s,r)}let n=zy(Et(e),t);return B.makeTensor(n,e,t)}function Ww(e,t,{indexing:n="xy"}={}){if(n!=="xy"&&n!=="ij")throw new TypeError(`${n} is not a valid third argument to meshgrid`);if(e===void 0)return[];let s=D(e,"x","meshgrid",e instanceof it?e.dtype:"float32");if(t===void 0)return[s];let r=D(t,"y","meshgrid",t instanceof it?t.dtype:"float32"),a=Et(s.shape),o=Et(r.shape);return n==="xy"?(s=V(s,[1,-1]),r=V(r,[-1,1]),[rt(Os([o,1],s.dtype),s),rt(r,Os([1,a],r.dtype))]):(s=V(s,[-1,1]),r=V(r,[1,-1]),[rt(s,Os([1,o],s.dtype)),rt(Os([a,1],r.dtype),r)])}function JO(e,t){let n=D(e,"a","minimum"),s=D(t,"b","minimum");[n,s]=Xt(n,s),n.dtype==="bool"&&(n=ge(n,"int32"),s=ge(s,"int32")),St(n.shape,s.shape);let r={a:n,b:s};return B.runKernel(jo,r)}var ad=W({minimum_:JO});function QO(e,t,n){O(n==="reflect"||n==="symmetric",()=>`Invalid mode. Mode must be either reflect or symmetric. Got ${n}.`);let s=D(e,"x","mirrorPad");if(s.rank===0)throw new Error("mirrorPad(scalar) is not defined. Pass non-scalar to mirrorPad");O(t.length===s.rank,()=>`Padding doesn't match input. Must be ${s.rank}. Got ${t.length}.`);let r=n==="reflect"?1:0;for(let i=0;i"Invalid number of paddings. Must be length of 2 each."),O(t[i][0]>=0&&t[i][0]<=s.shape[i]-r&&t[i][1]>=0&&t[i][1]<=s.shape[i]-r,()=>`Padding in dimension ${i} cannot be greater than or equal to ${s.shape[i]-r} or less than 0 for input of shape ${s.shape}`);let a={paddings:t,mode:n},o={x:s};return B.runKernel(qo,o,a)}var jA=W({mirrorPad_:QO});function eM(e,t){let n=D(e,"a","mod"),s=D(t,"b","mod");[n,s]=Xt(n,s);let r={a:n,b:s};return B.runKernel(Uc,r)}var pu=W({mod_:eM});function tM(e,t=null,n=!1){e=D(e,"x","moments");let s=yr(t,e.shape),r=Ut(e,s,n),a=r.shape;n||(a=cl(r.shape,s));let o=wt(Ae(ge(e,"float32"),V(r,a))),i=Ut(o,s,n);return{mean:r,variance:i}}var Sh=W({moments_:tM});function nM(e,t,n,s){let r=D(t,"data","multiRNNCell"),a=Rp(n,"c","multiRNNCell"),o=Rp(s,"h","multiRNNCell"),i=r,l=[];for(let p=0;p2)throw new Error(`Rank of probabilities must be 1 or 2, but is ${o}`);n=n||Math.random();let l={logits:o===1?V(r,[1,-1]):r},u={numSamples:t,seed:n,normalized:s},c=B.runKernel(v0,l,u);return o===1?V(c,[c.size]):c}var Uw=W({multinomial_:sM});function rM(e,t){let n=D(e,"a","notEqual","string_or_numeric"),s=D(t,"b","notEqual","string_or_numeric");[n,s]=Xt(n,s),St(n.shape,s.shape);let r={a:n,b:s};return B.runKernel(Ll,r)}var dl=W({notEqual_:rM});function aM(e){let n={x:D(e,"x","onesLike")};return B.runKernel(Vl,n)}var Ws=W({onesLike_:aM});function oM(e,t){let n=D(e,"v1","outerProduct"),s=D(t,"v2","outerProduct");O(n.rank===1&&s.rank===1,()=>`Error in outerProduct: inputs must be rank 1, but got ranks ${n.rank} and ${s.rank}.`);let r=V(n,[-1,1]),a=V(s,[1,-1]);return rt(r,a)}var Gw=W({outerProduct_:oM});function iM(e,t,n=0){let s=D(e,"x","pad");if(s.rank===0)throw new Error("pad(scalar) is not defined. Pass non-scalar to pad");let r={paddings:t,constantValue:n},a={x:s};return B.runKernel(Ko,a,r)}var ar=W({pad_:iM});function lM(e,t,n=0){return O(t.length===2,()=>"Invalid number of paddings. Must be length of 2."),ar(e,[t],n)}var Hw=W({pad1d_:lM});function uM(e,t,n=0){return O(t.length===2&&t[0].length===2&&t[1].length===2,()=>"Invalid number of paddings. Must be length of 2 each."),ar(e,t,n)}var jw=W({pad2d_:uM});function cM(e,t,n=0){return O(t.length===3&&t[0].length===2&&t[1].length===2&&t[2].length===2,()=>"Invalid number of paddings. Must be length of 2 each."),ar(e,t,n)}var qw=W({pad3d_:cM});function dM(e,t,n=0){return O(t.length===4&&t[0].length===2&&t[1].length===2&&t[2].length===2&&t[3].length===2,()=>"Invalid number of paddings. Must be length of 2 each."),ar(e,t,n)}var Xw=W({pad4d_:dM});function pM(e,t,n){let s=D(e,"x","spaceToBatchND");O(s.rank>=1+t.length,()=>`input rank ${s.rank} should be > than [blockShape] ${t.length}`),O(n.length===t.length,()=>`paddings.shape[0] ${n.length} must be equal to [blockShape] ${t.length}`),O(s.shape.reduce((o,i,l)=>l>0&&l<=t.length?o&&(i+n[l-1][0]+n[l-1][1])%t[l-1]===0:o,!0),()=>`input spatial dimensions ${s.shape.slice(1)} with paddings ${n.toString()} must be divisible by blockShapes ${t.toString()}`);let r={x:s},a={blockShape:t,paddings:n};return B.runKernel(Ql,r,a)}var Ih=W({spaceToBatchND_:pM});function hM(e,t,n,s,r,a,o){r==null&&(r=[1,1]),a==null&&(a=1),s===0&&(s="valid");let i=D(e,"x","maxPool"),l=i,u=!1;i.rank===3&&(u=!0,l=V(i,[1,i.shape[0],i.shape[1],i.shape[2]])),O(ua(a,r),()=>`Error in pool: Either strides or dilations must be 1. Got strides ${a} and dilations '${r}'`);let c=Sw(l.shape,t,a,r,s),p=[c.dilationHeight,c.dilationWidth],d;s==="same"?d=mM([c.filterHeight,c.filterWidth],p):d=[[0,0],[0,0]];let h=p[0]===1&&p[1]===1,[f,m]=fM([c.inHeight,c.inWidth],p,d),g=h?s:"valid",y=h?l:Ih(l,p,f),A=(n==="avg"?()=>yh(y,t,a,g,o):()=>kh(y,t,a,g,o))(),b=h?A:Ah(A,p,m);return u?V(b,[b.shape[1],b.shape[2],b.shape[3]]):b}function fM(e,t,n){let s=n.map(c=>c[0]),r=n.map(c=>c[1]),a=e.concat(s,r),o=t.map((c,p)=>(c-a[p]%c)%c),i=r.map((c,p)=>c+o[p]),l=t.map((c,p)=>[s[p],i[p]]),u=t.map((c,p)=>[0,o[p]]);return[l,u]}function mM(e,t){let s=e.map((o,i)=>o+(o-1)*(t[i]-1)).map(o=>o-1),r=s.map(o=>Math.floor(o/2)),a=s.map((o,i)=>o-r[i]);return s.map((o,i)=>[r[i],a[i]])}var qA=W({pool_:hM});function gM(e,t){let n=D(e,"x","prelu"),s=D(t,"alpha","prelu"),r={x:n,alpha:s};return B.runKernel(Yo,r)}var Ch=W({prelu_:gM});function yM(e,t=null,n=!1){let s=D(e,"x","prod");s.dtype==="bool"&&(s=ge(s,"int32"));let r={x:s},a={axis:t,keepDims:n};return B.runKernel(Jo,r,a)}var XA=W({prod_:yM});function AM(e,t,n,s,r){let a=D(e,"shape","raggedTensorToTensor","int32"),o=D(t,"values","raggedTensorToTensor"),i=D(n,"defaultValue","raggedTensorToTensor",o.dtype),l=s.map((p,d)=>D(p,`tensors${d}`,"raggedTensorToTensor","int32")),u={shape:a,values:o,defaultValue:i,rowPartitionTensors:l},c={rowPartitionTypes:r};return B.runKernel(w0,u,c)}var Kw=W({raggedTensorToTensor_:AM});function xM(e,t,n){let s=Et(e),r=null;if(n==null||n==="float32")r=new Float32Array(s);else if(n==="int32")r=new Int32Array(s);else if(n==="bool")r=new Uint8Array(s);else throw new Error(`Unknown data type ${n}`);for(let a=0;a=1||a===0);let o=Math.sqrt(-2*Math.log(a)/a);e=this.mean+this.stdDev*s*o,t=this.mean+this.stdDev*r*o,(!this.truncated||this.isValidTruncated(e))&&(n=!0)}return(!this.truncated||this.isValidTruncated(t))&&(this.nextVal=this.convertValue(t)),this.convertValue(e)}convertValue(e){return this.dtype==null||this.dtype==="float32"?e:Math.round(e)}isValidTruncated(e){return e<=this.upper&&e>=this.lower}},bM=class{constructor(e,t,n,s){this.alpha=e,this.beta=1/t,this.dtype=n;let r=s||Math.random();this.randu=KA.alea(r.toString()),this.randn=new ZA(0,1,n,!1,this.randu()),e<1?this.d=e+2/3:this.d=e-1/3,this.c=1/Math.sqrt(9*this.d)}nextValue(){let e,t,n,s,r,a;for(;;){do s=this.randn.nextValue(),a=1+this.c*s;while(a<=0);if(a*=a*a,e=s*s,t=1-.331*e*e,n=.5*e+this.d*(1-a+Math.log(a)),r=this.randu(),rthis.dtype==null||this.dtype==="float32",this.min=e,this.range=t-e,this.dtype=n,s==null&&(s=Math.random()),typeof s=="number"&&(s=s.toString()),!this.canReturnFloat()&&this.range<=1)throw new Error(`The difference between ${e} - ${t} <= 1 and dtype is not float`);this.random=KA.alea(s)}convertValue(e){return this.canReturnFloat()?e:Math.round(e)}nextValue(){return this.convertValue(this.min+this.range*this.random())}};function wM(e,t,n=1,s="float32",r){if(n==null&&(n=1),s==null&&(s="float32"),s!=="float32"&&s!=="int32")throw new Error(`Unsupported data type ${s}`);let a=new bM(t,n,s,r),o=Ue(e,s);for(let i=0;i`Error in reverse1D: x must be rank 1 but got rank ${t.rank}.`),nr(t,0)}var Qw=W({reverse1d_:RM});function _M(e,t){let n=D(e,"x","reverse");return O(n.rank===2,()=>`Error in reverse2D: x must be rank 2 but got rank ${n.rank}.`),nr(n,t)}var ek=W({reverse2d_:_M});function DM(e,t){let n=D(e,"x","reverse");return O(n.rank===3,()=>`Error in reverse3D: x must be rank 3 but got rank ${n.rank}.`),nr(n,t)}var tk=W({reverse3d_:DM});function $M(e,t){let n=D(e,"x","reverse");return O(n.rank===4,()=>`Error in reverse4D: x must be rank 4 but got rank ${n.rank}.`),nr(n,t)}var nk=W({reverse4d_:$M});function PM(e){let n={x:D(e,"x","round")};return B.runKernel(Xl,n)}var U0=W({round_:PM});function FM(e){let n={x:D(e,"x","rsqrt","float32")};return B.runKernel(si,n)}var G0=W({rsqrt_:FM});function OM(e){let n={x:D(e,"x","selu")};return B.runKernel(jc,n)}var H0=W({selu_:OM});function MM(e,t,n,s,r,a=[1,1],o="NHWC"){let i=D(e,"x","separableConv2d"),l=D(t,"depthwiseFilter","separableConv2d"),u=D(n,"pointwiseFilter","separableConv2d"),c=i,p=!1;if(i.rank===3&&(p=!0,c=V(i,[1,i.shape[0],i.shape[1],i.shape[2]])),o==="NCHW")throw new Error("separableConv2d currently does not support dataFormat NCHW; only NHWC is supported");O(c.rank===4,()=>`Error in separableConv2d: input must be rank 4, but got rank ${c.rank}.`),O(l.rank===4,()=>`Error in separableConv2d: depthwise filter must be rank 4, but got rank ${l.rank}.`),O(u.rank===4,()=>`Error in separableConv2d: pointwise filter must be rank 4, but got rank ${l.rank}.`),O(u.shape[0]===1,()=>`Error in separableConv2d: the first dimension of pointwise filter must be 1, but got ${u.shape[0]}.`),O(u.shape[1]===1,()=>`Error in separableConv2d: the second dimension of pointwise filter must be 1, but got ${u.shape[1]}.`);let d=l.shape[2],h=l.shape[3];O(u.shape[2]===d*h,()=>`Error in separableConv2d: the third dimension of pointwise filter must be ${d*h}, but got ${u.shape[2]}.`);let f=ed(c,l,s,r,o,a),g=Na(f,u,1,"valid",o);return p?V(g,[g.shape[1],g.shape[2],g.shape[3]]):g}var j0=W({separableConv2d_:MM});async function zM(e,t){let n=D(e,"x","setdiff1d"),s=D(t,"y","setdiff1d");O(n.dtype===s.dtype,()=>`x and y should have the same dtype, but got x (${n.dtype}) and y (${s.dtype}).`),O(n.rank===1,()=>`x should be 1D tensor, but got x (${n.shape}).`),O(s.rank===1,()=>`y should be 1D tensor, but got y (${s.shape}).`);let r=await n.data(),a=await s.data(),o=new Set(a),i=0;for(let c=0;c`slice1d expects a rank-1 tensor, but got a rank-${s.rank} tensor`),Le(s,[t],[n])}var Th=W({slice1d_:VM});function UM(e,t,n){let s=D(e,"x","slice2d");return O(s.rank===2,()=>`slice2d expects a rank-2 tensor, but got a rank-${s.rank} tensor`),Le(s,t,n)}var K0=W({slice2d_:UM});function GM(e,t,n){let s=D(e,"x","slice3d");return O(s.rank===3,()=>`slice3d expects a rank-3 tensor, but got a rank-${s.rank} tensor`),Le(s,t,n)}var yi=W({slice3d_:GM});function HM(e,t,n){let s=D(e,"x","slice4d");return O(s.rank===4,()=>`slice4d expects a rank-4 tensor, but got a rank-${s.rank} tensor`),Le(s,t,n)}var uo=W({slice4d_:HM});function jM(e,t=-1){let n=D(e,"logits","softmax","float32");if(t===-1&&(t=n.rank-1),t!==n.rank-1)throw Error(`Softmax along a non-last dimension is not yet supported. Logits was rank ${n.rank} and dim was ${t}`);let s={logits:n},r={dim:t};return B.runKernel(li,s,r)}var hu=W({softmax_:jM});function qM(e){O(e.dtype==="complex64",()=>`The dtype for tf.spectral.fft() must be complex64 but got ${e.dtype}.`);let t={input:e};return B.runKernel(f0,t)}var Nh=W({fft_:qM});function XM(e){O(e.dtype==="complex64",()=>`The dtype for tf.spectral.ifft() must be complex64 but got ${e.dtype}.`);let t={input:e};return B.runKernel(m0,t)}var mc=W({ifft_:XM});function KM(e){let t=e.shape[e.shape.length-1],n=e.size/t,s;if(t<=2){let r=V(e,[n,t]);s=mc(r)}else{let r=[n,2*(t-1)],a=V(hc(e),[n,t]),o=V(mh(e),[n,t]),i=nr(Le(a,[0,1],[n,t-2]),1),l=z(nr(Le(o,[0,1],[n,t-2]),1),Te(-1)),u=ct([a,i],1),c=ct([o,l],1),p=V(Ta(u,c),[r[0],r[1]]);s=mc(p)}if(s=hc(s),e.rank===3&&e.shape[0]!==0){let r=s,a=e.shape[0];s=V(s,[a,s.shape[0]/a,s.shape[1]]),r.dispose()}return s}var Z0=W({irfft_:KM});function ZM(e,t,n=0){let r={x:D(e,"x","split")},a={numOrSizeSplits:t,axis:n};return B.runKernel(eu,r,a)}var qt=W({split_:ZM});function YM(e,t){O(e.dtype==="float32",()=>`The dtype for rfft() must be real value but got ${e.dtype}`);let n=e.shape[e.shape.length-1],s=e.size/n,r;if(t!=null&&t0),m=e.shape.map(g=>g);m[e.shape.length-1]=t,r=Le(e,f,m),n=t}else if(t!=null&&t>n){let f=e.shape.map(m=>m);f[e.shape.length-1]=t-n,r=ct([e,Gt(f)],e.shape.length-1),n=t}else r=e;let a=dt(r),o=V(Ta(r,a),[s,n]),i=Nh(o),l=Math.floor(n/2)+1,u=hc(i),c=mh(i),p=qt(u,[l,n-l],u.shape.length-1),d=qt(c,[l,n-l],c.shape.length-1),h=r.shape.slice();return h[r.shape.length-1]=l,V(Ta(p[0],d[0]),h)}var Eh=W({rfft_:YM});function JM(e,t){let n=D(e,"a","squaredDifference"),s=D(t,"b","squaredDifference");[n,s]=Xt(n,s),St(n.shape,s.shape);let r={a:n,b:s},a={};return B.runKernel(ui,r,a)}var Y0=W({squaredDifference_:JM});function QM(e,t){let n=D(e,"x","squeeze","string_or_numeric");return V(n,k6(n.shape,t).newShape)}var Ke=W({squeeze_:QM});function ez(e,t=0){let n=Rp(e,"tensors","stack","string_or_numeric");O(n.length>=1,()=>"Pass at least one tensor to tf.stack"),n.length>0&&O(t<=n[0].rank,()=>"Axis must be <= rank of the tensor");let s=n,r={axis:t};return B.runKernel(Gl,s,r)}var un=W({stack_:ez});function tz(e,t=0){let s={x:D(e,"x","step")},r={alpha:t};return B.runKernel(pi,s,r)}var fu=W({step_:tz});function nz(e,t,n,s,r=0,a=0,o=0,i=0,l=0){let c={x:D(e,"x","stridedSlice","string_or_numeric")},p={begin:t,end:n,strides:s,beginMask:r,endMask:a,ellipsisMask:o,newAxisMask:i,shrinkAxisMask:l};return B.runKernel(tu,c,p)}var QA=W({stridedSlice_:nz});function sz(e){let n={x:D(e,"x","tan","float32")};return B.runKernel(nu,n)}var e5=W({tan_:sz});function Ot(e,t){Al(e);let n=aa(e,t);if(n.length!==1)throw new Error("tensor1d() requires values to be a flat/TypedArray");return hi(e,null,n,t)}function mr(e,t,n){if(Al(e),t!=null&&t.length!==2)throw new Error("tensor2d() requires shape to have two numbers");let s=aa(e,n);if(s.length!==2&&s.length!==1)throw new Error("tensor2d() requires values to be number[][] or flat/TypedArray");if(s.length===1&&t==null)throw new Error("tensor2d() requires shape to be provided when `values` are a flat/TypedArray");return hi(e,t,s,n)}function rk(e,t,n){if(Al(e),t!=null&&t.length!==4)throw new Error("tensor4d() requires shape to have four numbers");let s=aa(e,n);if(s.length!==4&&s.length!==1)throw new Error("tensor4d() requires values to be number[][][][] or flat/TypedArray");if(s.length===1&&t==null)throw new Error("tensor4d() requires shape to be provided when `values` are a flat array");return hi(e,t,s,n)}function ak(e,t,n){if(Al(e),t!=null&&t.length!==5)throw new Error("tensor5d() requires shape to have five numbers");let s=aa(e,n);if(s.length!==5&&s.length!==1)throw new Error("tensor5d() requires values to be number[][][][][] or flat/TypedArray");if(s.length===1&&t==null)throw new Error("tensor5d() requires shape to be provided when `values` are a flat array");return hi(e,t,s,n)}function ok(e,t,n){if(Al(e),t!=null&&t.length!==6)throw new Error("tensor6d() requires shape to have six numbers");let s=aa(e,n);if(s.length!==6&&s.length!==1)throw new Error("tensor6d() requires values to be number[][][][][][] or flat/TypedArray");if(s.length===1&&t==null)throw new Error("tensor6d() requires shape to be provided when `values` are a flat array");return t=t||s,hi(e,t,s,n)}function rz(e,t=1,n=!0){let s=D(e,"x","topk");if(s.rank===0)throw new Error("topk() expects the input to be of rank 1 or higher");let r=s.shape[s.shape.length-1];if(t<0)throw new Error(`'k' passed to topk() must be >= 0 but got ${t}`);if(t>r)throw new Error(`'k' passed to topk() must be <= the last dimension (${r}) but got ${t}`);let a={x:s},o={k:t,sorted:n},[i,l]=B.runKernel(su,a,o);return{values:i,indices:l}}var t5=W({topk_:rz});function az(e,t=0,n=1,s,r){if(s!=null&&s==="bool")throw new Error("Unsupported data type $ { dtype }");let a=new ZA(t,n,s,!0,r),o=Ue(e,s);for(let i=0;i0,()=>"The input tensor must be at least 1D");let s={x:n},r={axis:t},[a,o]=B.runKernel(C0,s,r);return{values:a,indices:o}}var n5=W({unique_:oz});function iz(e,t,n){let s=D(e,"x","unsortedSegmentSum"),r=D(t,"segmentIds","unsortedSegmentSum","int32");O(uc(n),()=>"numSegments must be of dtype int");let a={x:s,segmentIds:r},o={numSegments:n};return B.runKernel(ih,a,o)}var Q0=W({unsortedSegmentSum_:iz});function lz(e,t=0){let n=D(e,"x","unstack","string_or_numeric");O(t>=-n.shape.length&&t`Axis = ${t} is not in [-${n.shape.length}, ${n.shape.length})`);let s={value:n},r={axis:t};return B.runKernel(au,s,r)}var wn=W({unstack_:lz});function ik(e,t){return B0(e,t,"right")}function s5(e,t=!0,n,s){return B.makeVariable(e,t,n,s)}function lk(e,t){let n=[];for(let a=0;a0,()=>"mask cannot be scalar"),ds(i.slice(a,a+o),r.shape,"mask's shape must match the first K dimensions of tensor's shape,");let l=1;for(let m=a;m"Shape mismatch in v and x");let l=Te(1),u=Ae(l,i),c=z(Ae(o,a),u);if(r){O(s!=null,()=>"When using zeroDebias: true, step is required.");let p=D(s,"step","movingAverage");c=ye(c,Ae(l,Ra(i,p)))}return de(a,c)}var ck=W({movingAverage_:dz});function pz(e,t,n){let s=D(e,"indices","scatterND","int32"),r=D(t,"updates","scatterND");aA(r,s,n);let a={indices:s,updates:r},o={shape:n};return B.runKernel(Kl,a,o)}var dk=W({scatterND_:pz});function hz(e,t,n,s){if(e.dtype!=="int32")throw new Error(`tf.sparseToDense() expects the indices to be int32 type, but the dtype was ${e.dtype}.`);if(e.rank>2)throw new Error(`sparseIndices should be a scalar, vector, or matrix, but got shape ${e.shape}.`);let r=e.rank>0?e.shape[0]:1,a=e.rank>1?e.shape[1]:1;if(n.length!==a)throw new Error(`outputShape has incorrect number of elements:, ${n.length}, should be: ${a}.`);let o=t.size;if(!(t.rank===0||t.rank===1&&o===r))throw new Error(`sparseValues has incorrect shape ${t.shape}, should be [] or [${r}]`);if(t.dtype!==s.dtype)throw new Error("sparseValues.dtype must match defaultValues.dtype")}function fz(e,t,n,s=0){let r=D(e,"sparseIndices","sparseToDense","int32"),a=D(t,"sparseValues","sparseToDense","string_or_numeric"),o=D(s,"defaultValue","sparseToDense",a.dtype);hz(r,a,n,o);let i={sparseIndices:r,sparseValues:a,defaultValue:o},l={outputShape:n};return B.runKernel(rh,i,l)}var pk=W({sparseToDense_:fz});function mz(e,t){let n=D(t,"indices","gatherND","int32"),r={params:D(e,"x","gatherND","string_or_numeric"),indices:n};return B.runKernel(_l,r)}var hk=W({gatherND_:mz});function gz(e,t){if(t==null)return e.shape.slice();if(Ao(e.shape,t))return t;if(e.shape.length===t.length){let n=[];for(let s=0;s`x has to be a floating point tensor since it's going to be scaled, but got a ${r.dtype} tensor instead.`),O(t>=0&&t<1,()=>`rate must be a float in the range [0, 1), but got ${t}.`),t===0)return e instanceof it?r.clone():r;let a=gz(r,n),o=1-t,i=ye(sd(de(od(a,0,1,"float32",s),o)),o);return z(r,i)}var a5=W({dropout_:yz});function o5(e){return Math.floor(Math.pow(2,Math.ceil(Math.log(e)/Math.log(2))))}function e2(e,t,n){let s=1-e%2,r=new Float32Array(e);for(let a=0;a1,()=>`inTopK() expects the predictions to be of rank 2 or higher, but got ${s.rank}`),O(s.rank-1===r.rank,()=>`predictions rank should be 1 larger than targets rank, but got predictions rank ${s.rank} and targets rank ${r.rank}`),ds(s.shape.slice(0,s.shape.length-1),r.shape,"predictions's shape should be align with the targets' shape, except the last dimension.");let a=s.shape[s.shape.length-1];O(n>0&&n<=a,()=>`'k' passed to inTopK() must be > 0 && <= the predictions last dimension (${a}), but got ${n}`);let o=await s.data(),i=await r.data(),[l,u]=[o.length/a,a],c=S6("bool",l);for(let p=0;pg.value-m.value),c[p]=0;for(let m=0;mvz,depthwiseConv2d:()=>Iz,matMul:()=>Tz});function xz(e,t,n,s,r,a="NHWC",o){let i=e;e.rank===3&&(i=V(e,[1,e.shape[0],e.shape[1],e.shape[2]]));let l=t;l.rank===3&&(l=V(t,[1,t.shape[0],t.shape[1],t.shape[2]])),O(i.rank===4,()=>`Error in conv2dDerFilter: input must be rank 4, but got shape ${i.shape}.`),O(l.rank===4,()=>`Error in conv2dDerFilter: dy must be rank 4, but got shape ${l.shape}.`),O(n.length===4,()=>`Error in conv2dDerFilter: filterShape must be length 4, but got ${n}.`);let u=a==="NHWC"?i.shape[3]:i.shape[1],c=a==="NHWC"?l.shape[3]:l.shape[1];O(u===n[2],()=>`Error in conv2dDerFilter: depth of input ${u}) must match input depth in filter (${n[2]}.`),O(c===n[3],()=>`Error in conv2dDerFilter: depth of dy (${c}) must match output depth for filter (${n[3]}).`),ps("conv2dDerFilter",r,o);let p={x:i,dy:l},d={strides:s,pad:r,dataFormat:a,dimRoundingMode:o,filterShape:n};return B.runKernel(o0,p,d)}var i5=W({conv2DBackpropFilter_:xz});function t2(e,t,n){if(n==null||n==="linear")return e;if(n==="relu")return z(e,fu(t));throw new Error(`Cannot compute gradient for fused activation ${n}.`)}function n2(e,t){let n=t,s=ln(e.shape,t.shape);return s.length>0&&(n=Se(n,s)),V(n,e.shape)}function s2(e,t,n,s){if(t==="linear")return e;if(t==="relu")return Gr(e);if(t==="elu")return td(e);if(t==="relu6")return V0(e);if(t==="prelu")return Ch(e,n);if(t==="leakyrelu")return bh(e,s);if(t==="sigmoid")return On(e);throw new Error(`Unknown fused activation ${t}.`)}var r2=(e,t)=>!(e>0)||t==="linear";function bz({x:e,filter:t,strides:n,pad:s,dataFormat:r="NHWC",dilations:a=[1,1],dimRoundingMode:o,bias:i,activation:l="linear",preluActivationWeights:u,leakyreluAlpha:c}){if(l=l||"linear",r2(B.state.gradientDepth,l)===!1){O(r==="NHWC",()=>`Error in fused conv2d: got dataFormat of ${r} but only NHWC is currently supported for the case of gradient depth is 0 and the activation is not linear.`);let k=Na(e,t,n,s,r,a,o);return i!=null&&(k=de(k,i)),s2(k,l,u,c)}let p=D(e,"x","conv2d","float32"),d=D(t,"filter","conv2d","float32"),h=p,f=!1;p.rank===3&&(f=!0,h=V(p,[1,p.shape[0],p.shape[1],p.shape[2]])),O(h.rank===4,()=>`Error in fused conv2d: input must be rank 4, but got rank ${h.rank}.`),O(d.rank===4,()=>`Error in fused conv2d: filter must be rank 4, but got rank ${d.rank}.`),ps("fused conv2d",s,o);let m=r==="NHWC"?h.shape[3]:h.shape[1];O(d.shape[2]===m,()=>`Error in conv2d: depth of input (${m}) must match input depth for filter ${d.shape[2]}.`),O(ua(n,a),()=>`Error in conv2D: Either strides or dilations must be 1. Got strides ${n} and dilations '${a}'`);let g=gh(h.shape,d.shape,n,a,s,o),y;i!=null&&(y=D(i,"bias","fused conv2d"),[y]=Xt(y,p),r==="NHWC"?St(g.outShape,y.shape):(O(y.shape.length<=1,()=>`Error in fused conv2d: only supports scalar or 1-D Tensor bias for NCHW format but got the bias of rank-${y.shape.length}.`),O(y.shape.length===0||y.shape[0]===g.outChannels||y.shape[0]===1,()=>`Error in fused conv2d: bias shape (${y.shape}) is not compatible with the number of output channels (${g.outChannels})`)));let x;if(u!=null){let k=u.shape;if(O(k.length<=1||k.length===3,()=>`Error in fused conv2d: only supports scalar, 1-D Tensor or 3-D Tensor PReLU activation weights but got a tensor of rank-${k.length}.`),k.length===1)O(k[0]===1||k[0]===g.outChannels,()=>`Error in fused conv2d: PReLU activation weights (${k}) is not compatible with the number of output channels (${g.outChannels}).`);else if(k.length===3)try{St(k,g.outShape)}catch(C){let E=`Error in fused conv2d: PReLU activation weights (${k}) is not compatible with the output shape of the conv2d (${g.outShape}).`;throw Error(E)}x=D(u,"prelu weights","fused conv2d")}let A=(k,C)=>{O(r==="NHWC",()=>`Error in gradient of fused conv2D: got dataFormat of ${r} but only NHWC is currently supported.`);let[E,_,$,R]=C,P=t2(k,$,l);O(lo(a),()=>`Error in gradient of fused conv2D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '${a}'`);let S=TA(_.shape,P,E,n,s),M=i5(_,P,E.shape,n,s),L=[S,M];if(R!=null){let U=n2(R,P);L.push(U)}return L},b={x:h,filter:d,bias:y,preluActivationWeights:x},w={strides:n,pad:s,dataFormat:r,dilations:a,dimRoundingMode:o,activation:l,leakyreluAlpha:c};return i==null?oa((C,E,_)=>{let $=B.runKernel(oo,b,w);return _([E,C,$]),f&&($=V($,[$.shape[1],$.shape[2],$.shape[3]])),{value:$,gradFunc:A}})(h,d):oa((C,E,_,$)=>{let R=B.runKernel(oo,b,w);return $([E,C,R,_]),f&&(R=V(R,[R.shape[1],R.shape[2],R.shape[3]])),{value:R,gradFunc:A}})(h,d,y)}var vz=W({fusedConv2d_:bz});function wz(e,t,n,s,r,a=[1,1],o){let i=e;e.rank===3&&(i=V(e,[1,e.shape[0],e.shape[1],e.shape[2]]));let l=t;l.rank===3&&(l=V(t,[1,t.shape[0],t.shape[1],t.shape[2]]));let u={x:i,dy:l},c={strides:s,pad:r,dimRoundingMode:o,dilations:a,filterShape:n};return B.runKernel(c0,u,c)}var mk=W({depthwiseConv2dNativeBackpropFilter_:wz});function kz(e,t,n,s,r,a=[1,1],o){let i=t,l=!1;t.rank===3&&(l=!0,i=V(t,[1,t.shape[0],t.shape[1],t.shape[2]]));let u={dy:i,filter:n},c={strides:s,pad:r,dimRoundingMode:o,dilations:a,inputShape:e},p=B.runKernel(d0,u,c);return l?V(p,[p.shape[1],p.shape[2],p.shape[3]]):p}var gk=W({depthwiseConv2dNativeBackpropInput_:kz});function Sz({x:e,filter:t,strides:n,pad:s,dataFormat:r="NHWC",dilations:a=[1,1],dimRoundingMode:o,bias:i,activation:l="linear",preluActivationWeights:u,leakyreluAlpha:c}){if(r2(B.state.gradientDepth,l)===!1){let w=ed(e,t,n,s,r,a,o);return i!=null&&(w=de(w,i)),s2(w,l,u,c)}let p=D(e,"x","depthwiseConv2d","float32"),d=D(t,"filter","depthwiseConv2d","float32"),h=p,f=!1;p.rank===3&&(f=!0,h=V(p,[1,p.shape[0],p.shape[1],p.shape[2]])),O(h.rank===4,()=>`Error in fused depthwiseConv2d: input must be rank 4, but got rank ${h.rank}.`),O(d.rank===4,()=>`Error in fused depthwiseConv2d: filter must be rank 4, but got rank ${d.rank}.`),O(h.shape[3]===d.shape[2],()=>`Error in fused depthwiseConv2d: number of input channels (${h.shape[3]}) must match the inChannels dimension in filter ${d.shape[2]}.`),a==null&&(a=[1,1]),O(ua(n,a),()=>`Error in fused depthwiseConv2d: Either strides or dilations must be 1. Got strides ${n} and dilations '${a}'`),ps("fused depthwiseConv2d",s,o);let m=gh(h.shape,d.shape,n,a,s,o,!0),g;i!=null&&(g=D(i,"bias","fused conv2d"),[g]=Xt(g,p),St(m.outShape,g.shape));let y;u!=null&&(y=D(u,"prelu weights","fused depthwiseConv2d"));let x=(w,k)=>{O(lo(a),()=>`Error in gradient of fused depthwiseConv2d: dilation rates greater than 1 are not yet supported. Got dilations '${a}'`);let[C,E,_,$]=k,R=t2(w,_,l),P=gk(E.shape,R,C,n,s,a,o),S=mk(E,R,C.shape,n,s,a,o);if($!=null){let M=n2(g,R);return[P,S,M]}return[P,S]},A={x:h,filter:d,bias:g,preluActivationWeights:y},b={strides:n,pad:s,dataFormat:r,dilations:a,dimRoundingMode:o,activation:l,leakyreluAlpha:c};return i==null?oa((k,C,E)=>{let _=B.runKernel(io,A,b);return E([C,k,_]),f&&(_=V(_,[_.shape[1],_.shape[2],_.shape[3]])),{value:_,gradFunc:x}})(h,d):oa((k,C,E,_)=>{let $=B.runKernel(io,A,b);return _([C,k,$,E]),f&&($=V($,[$.shape[1],$.shape[2],$.shape[3]])),{value:$,gradFunc:x}})(h,d,g)}var Iz=W({fusedDepthwiseConv2d_:Sz});function Cz({a:e,b:t,transposeA:n=!1,transposeB:s=!1,bias:r,activation:a="linear",preluActivationWeights:o,leakyreluAlpha:i=.2}){if(r2(B.state.gradientDepth,a)===!1){let R=rt(e,t,n,s);return r!=null&&(R=de(R,r)),s2(R,a,o,i)}let l=D(e,"a","fused matMul"),u=D(t,"b","fused matMul");[l,u]=Xt(l,u);let c=n?l.shape[l.rank-2]:l.shape[l.rank-1],p=s?u.shape[u.rank-1]:u.shape[u.rank-2],d=n?l.shape[l.rank-1]:l.shape[l.rank-2],h=s?u.shape[u.rank-2]:u.shape[u.rank-1],f=l.shape.slice(0,-2),m=u.shape.slice(0,-2),g=Et(f),y=Et(m);O(c===p,()=>`Error in fused matMul: inner shapes (${c}) and (${p}) of Tensors with shapes ${l.shape} and ${u.shape} and transposeA=${n} and transposeB=${s} must match.`);let A=St(l.shape.slice(0,-2),u.shape.slice(0,-2)).concat([d,h]),b=n?V(l,[g,c,d]):V(l,[g,d,c]),w=s?V(u,[y,h,p]):V(u,[y,p,h]),k;r!=null&&(k=D(r,"bias","fused matMul"),[k]=Xt(k,l),St(A,k.shape));let C;o!=null&&(C=D(o,"prelu weights","fused matMul"));let E=(R,P)=>{let[S,M,L,U]=P,K=t2(V(R,L.shape),L,a),q,Z;if(!n&&!s?(q=rt(K,M,!1,!0),Z=rt(S,K,!0,!1)):!n&&s?(q=rt(K,M,!1,!1),Z=rt(K,S,!0,!1)):n&&!s?(q=rt(M,K,!1,!0),Z=rt(S,K,!1,!1)):(q=rt(M,K,!0,!0),Z=rt(K,S,!0,!0)),r!=null){let J=n2(U,K);return[q,Z,J]}else return[q,Z]},_={a:b,b:w,bias:k,preluActivationWeights:C},$={transposeA:n,transposeB:s,activation:a,leakyreluAlpha:i};return r==null?oa((P,S,M)=>{let L=B.runKernel(ao,_,$);return M([P,S,L]),{value:V(L,A),gradFunc:E}})(b,w):oa((P,S,M,L)=>{let U=B.runKernel(ao,_,$);return L([P,S,U,M]),{value:V(U,A),gradFunc:E}})(b,w,k)}var Tz=W({fusedMatMul_:Cz});function Nz(e){return e2(e,.54,.46)}var Ez=W({hammingWindow_:Nz});function Rz(e){return e2(e,.5,.5)}var yk=W({hannWindow_:Rz});function _z(e,t,n,s=!1,r=0){let a=0,o=[];for(;a+t<=e.size;)o.push(Le(e,a,t)),a+=n;if(s)for(;a`Error in cropAndResize: image must be rank 4,but got rank ${o.rank}.`),O(i.rank===2&&i.shape[1]===4,()=>`Error in cropAndResize: boxes must be have size [${u},4] but had shape ${i.shape}.`),O(l.rank===1&&l.shape[0]===u,()=>`Error in cropAndResize: boxInd must be have size [${u}] but had shape ${i.shape}.`),O(s.length===2,()=>`Error in cropAndResize: cropSize must be of length 2, but got length ${s.length}.`),O(s[0]>=1&&s[1]>=1,()=>`cropSize must be atleast [1,1], but was ${s}`),O(r==="bilinear"||r==="nearest",()=>`method must be bilinear or nearest, but was ${r}`);let c={image:o,boxes:i,boxInd:l},p={method:r,extrapolationValue:a,cropSize:s};return B.runKernel(Sl,c,p)}var Fz=W({cropAndResize_:Pz});function Oz(e){let t=D(e,"image","flipLeftRight","float32");O(t.rank===4,()=>`Error in flipLeftRight: image must be rank 4,but got rank ${t.rank}.`);let n={image:t};return B.runKernel(El,n,{})}var Mz=W({flipLeftRight_:Oz});function zz(e){let t=D(e,"image","grayscaleToRGB"),n=t.rank-1,s=t.shape[n];O(t.rank>=2,()=>`Error in grayscaleToRGB: images must be at least rank 2, but got rank ${t.rank}.`),O(s===1,()=>`Error in grayscaleToRGB: last dimension of a grayscale image should be size 1, but got size ${s}.`);let r=new Array(t.rank);return r.fill(1,0,n),r[n]=3,bs(t,r)}var Lz=W({grayscaleToRGB_:zz});function Bz(e,t,n=0,s=.5){let r=D(e,"image","rotateWithOffset","float32");O(r.rank===4,()=>`Error in rotateWithOffset: image must be rank 4,but got rank ${r.rank}.`);let a={image:r},o={radians:t,fillValue:n,center:s};return B.runKernel(iu,a,o)}var Wz=W({rotateWithOffset_:Bz});function id(e,t,n,s,r,a){s==null&&(s=.5),r==null&&(r=Number.NEGATIVE_INFINITY),a==null&&(a=0);let o=e.shape[0];return n=Math.min(n,o),O(0<=s&&s<=1,()=>`iouThreshold must be in [0, 1], but was '${s}'`),O(e.rank===2,()=>`boxes must be a 2D tensor, but was of rank '${e.rank}'`),O(e.shape[1]===4,()=>`boxes must have 4 columns, but 2nd dimension was ${e.shape[1]}`),O(t.rank===1,()=>"scores must be a 1D tensor"),O(t.shape[0]===o,()=>`scores has incompatible shape with boxes. Expected ${o}, but was ${t.shape[0]}`),O(0<=a&&a<=1,()=>`softNmsSigma must be in [0, 1], but was '${a}'`),{maxOutputSize:n,iouThreshold:s,scoreThreshold:r,softNmsSigma:a}}function Vz(e,t,n,s=.5,r=Number.NEGATIVE_INFINITY){let a=D(e,"boxes","nonMaxSuppression","float32"),o=D(t,"scores","nonMaxSuppression","float32"),i=id(a,o,n,s,r);n=i.maxOutputSize,s=i.iouThreshold,r=i.scoreThreshold;let l={maxOutputSize:n,iouThreshold:s,scoreThreshold:r};return B.runKernel(Bl,{boxes:a,scores:o},l)}var Uz=W({nonMaxSuppression_:Vz});function Gz(e,t,n){let s=Hz(e,t,n),r=s<0?-(s+1):s;e.splice(r,0,t)}function Hz(e,t,n){return qz(e,t,n||jz)}function jz(e,t){return e>t?1:e>>1);let i=n(t,e[a]);i>0?s=a+1:(r=a,o=!i)}return o?s:-s-1}function xk(e,t,n,s,r){return l5(e,t,n,s,r,0)}function bk(e,t,n,s,r,a){return l5(e,t,n,s,r,0,!1,a,!0)}function vk(e,t,n,s,r,a){return l5(e,t,n,s,r,a,!0)}function l5(e,t,n,s,r,a,o=!1,i=!1,l=!1){let u=[];for(let g=0;gr&&u.push({score:t[g],boxIndex:g,suppressBeginIndex:0});u.sort(Uv);let c=a>0?-.5/a:0,p=[],d=[];for(;p.length0;){let g=u.pop(),{score:y,boxIndex:x,suppressBeginIndex:A}=g;if(y=A;--w){let k=Xz(e,x,p[w]);if(k>=s){b=!0;break}if(g.score=g.score*Kz(s,c,k),g.score<=r)break}g.suppressBeginIndex=p.length,b||(g.score===y?(p.push(x),d.push(g.score)):g.score>r&&Gz(u,g,Uv))}let h=p.length,f=n-h;i&&f>0&&(p.push(...new Array(f).fill(0)),d.push(...new Array(f).fill(0)));let m={selectedIndices:p};return o&&(m.selectedScores=d),l&&(m.validOutputs=h),m}function Xz(e,t,n){let s=e.subarray(t*4,t*4+4),r=e.subarray(n*4,n*4+4),a=Math.min(s[0],s[2]),o=Math.min(s[1],s[3]),i=Math.max(s[0],s[2]),l=Math.max(s[1],s[3]),u=Math.min(r[0],r[2]),c=Math.min(r[1],r[3]),p=Math.max(r[0],r[2]),d=Math.max(r[1],r[3]),h=(i-a)*(l-o),f=(p-u)*(d-c);if(h<=0||f<=0)return 0;let m=Math.max(a,u),g=Math.max(o,c),y=Math.min(i,p),x=Math.min(l,d),A=Math.max(y-m,0)*Math.max(x-g,0);return A/(h+f-A)}function Kz(e,t,n){let s=Math.exp(t*n*n);return n<=e?s:0}function Uv(e,t){return e.score-t.score||e.score===t.score&&t.boxIndex-e.boxIndex}async function Zz(e,t,n,s=.5,r=Number.NEGATIVE_INFINITY){let a=D(e,"boxes","nonMaxSuppressionAsync"),o=D(t,"scores","nonMaxSuppressionAsync"),i=id(a,o,n,s,r);n=i.maxOutputSize,s=i.iouThreshold,r=i.scoreThreshold;let l=await Promise.all([a.data(),o.data()]),u=l[0],c=l[1],{selectedIndices:p}=xk(u,c,n,s,r);return a!==e&&a.dispose(),o!==t&&o.dispose(),Ot(p,"int32")}var Yz=Zz;function Jz(e,t,n,s=.5,r=Number.NEGATIVE_INFINITY,a=0){let o=D(e,"boxes","nonMaxSuppression"),i=D(t,"scores","nonMaxSuppression"),l=id(o,i,n,s,r,a);n=l.maxOutputSize,s=l.iouThreshold,r=l.scoreThreshold,a=l.softNmsSigma;let u={boxes:o,scores:i},c={maxOutputSize:n,iouThreshold:s,scoreThreshold:r,softNmsSigma:a},p=B.runKernel(Wl,u,c);return{selectedIndices:p[0],selectedScores:p[1]}}var Qz=W({nonMaxSuppressionWithScore_:Jz});async function eL(e,t,n,s=.5,r=Number.NEGATIVE_INFINITY,a=0){let o=D(e,"boxes","nonMaxSuppressionAsync"),i=D(t,"scores","nonMaxSuppressionAsync"),l=id(o,i,n,s,r,a);n=l.maxOutputSize,s=l.iouThreshold,r=l.scoreThreshold,a=l.softNmsSigma;let u=await Promise.all([o.data(),i.data()]),c=u[0],p=u[1],{selectedIndices:d,selectedScores:h}=vk(c,p,n,s,r,a);return o!==e&&o.dispose(),i!==t&&i.dispose(),{selectedIndices:Ot(d,"int32"),selectedScores:Ot(h)}}var tL=eL;function nL(e,t,n,s=.5,r=Number.NEGATIVE_INFINITY,a=!1){let o=D(e,"boxes","nonMaxSuppression"),i=D(t,"scores","nonMaxSuppression"),l=id(o,i,n,s,r,null),u=l.maxOutputSize,c=l.iouThreshold,p=l.scoreThreshold,d={boxes:o,scores:i},h={maxOutputSize:u,iouThreshold:c,scoreThreshold:p,padToMaxOutputSize:a},f=B.runKernel(Gc,d,h);return{selectedIndices:f[0],validOutputs:f[1]}}var sL=W({nonMaxSuppressionPadded_:nL});async function rL(e,t,n,s=.5,r=Number.NEGATIVE_INFINITY,a=!1){let o=D(e,"boxes","nonMaxSuppressionAsync"),i=D(t,"scores","nonMaxSuppressionAsync"),l=id(o,i,n,s,r,null),u=l.maxOutputSize,c=l.iouThreshold,p=l.scoreThreshold,[d,h]=await Promise.all([o.data(),i.data()]),{selectedIndices:f,validOutputs:m}=bk(d,h,u,c,p,a);return o!==e&&o.dispose(),i!==t&&i.dispose(),{selectedIndices:Ot(f,"int32"),validOutputs:Te(m,"int32")}}var aL=rL;function oL(e,t,n=!1,s=!1){let r=D(e,"images","resizeBilinear");O(r.rank===3||r.rank===4,()=>`Error in resizeBilinear: x must be rank 3 or 4, but got rank ${r.rank}.`),O(t.length===2,()=>`Error in resizeBilinear: new shape must 2D, but got shape ${t}.`),O(s===!1||n===!1,()=>"Error in resizeBilinear: If halfPixelCenters is true, alignCorners must be false.");let a=r,o=!1;r.rank===3&&(o=!0,a=V(r,[1,r.shape[0],r.shape[1],r.shape[2]]));let[]=t,i={images:a},l={alignCorners:n,halfPixelCenters:s,size:t},u=B.runKernel(ti,i,l);return o?V(u,[u.shape[1],u.shape[2],u.shape[3]]):u}var wk=W({resizeBilinear_:oL});function iL(e,t,n=!1,s=!1){let r=D(e,"images","resizeNearestNeighbor");O(r.rank===3||r.rank===4,()=>`Error in resizeNearestNeighbor: x must be rank 3 or 4, but got rank ${r.rank}.`),O(t.length===2,()=>`Error in resizeNearestNeighbor: new shape must 2D, but got shape ${t}.`),O(r.dtype==="float32"||r.dtype==="int32",()=>"`images` must have `int32` or `float32` as dtype"),O(s===!1||n===!1,()=>"Error in resizeNearestNeighbor: If halfPixelCenters is true, alignCorners must be false.");let a=r,o=!1;r.rank===3&&(o=!0,a=V(r,[1,r.shape[0],r.shape[1],r.shape[2]]));let[]=t,i={images:a},l={alignCorners:n,halfPixelCenters:s,size:t},u=B.runKernel(ei,i,l);return o?V(u,[u.shape[1],u.shape[2],u.shape[3]]):u}var kk=W({resizeNearestNeighbor_:iL});function lL(e,t="binary",n=!1,s=.5){let r=D(e,"image","threshold"),a=.2989,o=.587,i=.114,l=r.shape[0]*r.shape[1],u=z(Ot([s]),255),c,p,d,h;if(O(r.rank===3,()=>`Error in threshold: image must be rank 3,but got rank ${r.rank}.`),O(r.shape[2]===3||r.shape[2]===1,()=>`Error in threshold: image color channel must be equal to 3 or 1but got ${r.shape[2]}.`),O(r.dtype==="int32"||r.dtype==="float32",()=>`Error in dtype: image dtype must be int32 or float32,but got dtype ${r.dtype}.`),O(t==="otsu"||t==="binary",()=>`Method must be binary or otsu, but was ${t}`),r.shape[2]===3){[c,p,d]=qt(r,[1,1,1],-1);let g=z(c,a),y=z(p,o),x=z(d,i);h=de(de(g,y),x)}else h=e;if(t==="otsu"){let g=wA(ge(U0(h),"int32"),Xe([]),256);u=uL(g,l)}let f=n?gi(h,u):Is(h,u);return ge(z(f,255),"int32")}function uL(e,t){let n=Ot([-1]),s=Ot([0]),r=Ot([0]),a,o,i,l,u,c;for(let p=0;p`Error in transform: image must be rank 4,but got rank ${o.rank}.`),O(i.rank===2&&(i.shape[0]===o.shape[0]||i.shape[0]===1)&&i.shape[1]===8,()=>"Error in transform: Input transform should be batch x 8 or 1 x 8"),O(a==null||a.length===2,()=>`Error in transform: outputShape must be [height, width] or null, but got ${a}.`);let l={image:o,transforms:i},u={interpolation:n,fillMode:s,fillValue:r,outputShape:a};return B.runKernel(ru,l,u)}var pL=W({transform_:dL});function hL(e,t,n){O(t%1===0,()=>`bandPart(): numLower must be an integer, got ${t}.`),O(n%1===0,()=>`bandPart(): numUpper must be an integer, got ${n}.`);let s=D(e,"a","bandPart");O(s.rank>=2,()=>`bandPart(): Rank must be at least 2, got ${s.rank}.`);let r=s.shape,[a,o]=s.shape.slice(-2);if(!(t<=a))throw new Error(`bandPart(): numLower (${t}) must not be greater than the number of rows (${a}).`);if(!(n<=o))throw new Error(`bandPart(): numUpper (${n}) must not be greater than the number of columns (${o}).`);t<0&&(t=a),n<0&&(n=o);let i=V(fc(0,a,1,"int32"),[-1,1]),l=fc(0,o,1,"int32"),u=Ae(i,l),c=gr(gi(u,Te(+t,"int32")),mi(u,Te(-n,"int32"))),p=Gt([a,o],s.dtype);return V(un(wn(V(s,[-1,a,o])).map(d=>jn(c,d,p))),r)}var fL=W({bandPart_:hL});function mL(e){let t;if(Array.isArray(e)){t=!1,O(e!=null&&e.length>0,()=>"Gram-Schmidt process: input must not be null, undefined, or empty");let r=e[0].shape[0];for(let a=1;a`Gram-Schmidt: Non-unique lengths found in the input vectors: (${e[a].shape[0]} vs. ${r})`)}else t=!0,e=qt(e,e.shape[0],0).map(r=>Ke(r,[0]));O(e.length<=e[0].shape[0],()=>`Gram-Schmidt: Number of vectors (${e.length}) exceeds number of dimensions (${e[0].shape[0]}).`);let n=[],s=e;for(let r=0;r{let a=s[r];if(r>0)for(let o=0;o=2,()=>`qr() requires input tensor to have a rank >= 2, but got rank ${e.rank}`),e.rank===2)return Gv(e,t);{let n=e.shape.slice(0,e.shape.length-2).reduce((l,u)=>l*u),s=wn(V(e,[n,e.shape[e.shape.length-2],e.shape[e.shape.length-1]]),0),r=[],a=[];s.forEach(l=>{let[u,c]=Gv(l,t);r.push(u),a.push(c)});let o=V(un(r,0),e.shape),i=V(un(a,0),e.shape);return[o,i]}}function Gv(e,t=!1){return B.tidy(()=>{O(e.shape.length===2,()=>`qr2d() requires a 2D Tensor, but got a ${e.shape.length}D Tensor.`);let n=e.shape[0],s=e.shape[1],r=P0(n),a=Gn(e),o=mr([[1]],[1,1]),i=Gn(o),l=n>=s?s:n;for(let u=0;u{let h=Le(a,[u,u],[n-u,1]),f=nd(h),m=Le(a,[u,u],[1,1]),g=jn(Is(m,0),mr([[-1]]),mr([[1]])),y=Ae(m,z(g,f)),x=ye(h,y);x.shape[0]===1?i=Gn(o):i=ct([o,Le(x,[1,0],[x.shape[0]-1,x.shape[1]])],0);let A=Pt(ye(rt(g,y),f)),b=Le(a,[u,0],[n-u,s]),w=z(A,i),k=at(i);if(u===0)a=Ae(b,rt(w,rt(k,b)));else{let _=Ae(b,rt(w,rt(k,b)));a=ct([Le(a,[0,0],[u,s]),_],0)}let C=at(w),E=Le(r,[0,u],[n,r.shape[1]-u]);if(u===0)r=Ae(E,rt(rt(E,i),C));else{let _=Ae(E,rt(rt(E,i),C));r=ct([Le(r,[0,0],[n,u]),_],1)}return[i,a,r]}),Q([c,p,d])}return!t&&n>s&&(r=Le(r,[0,0],[n,s]),a=Le(a,[0,0],[s,s])),[r,a]})}var AL=W({qr_:yL}),is;(function(e){e[e.NONE=0]="NONE",e[e.MEAN=1]="MEAN",e[e.SUM=2]="SUM",e[e.SUM_BY_NONZERO_WEIGHTS=3]="SUM_BY_NONZERO_WEIGHTS"})(is||(is={}));function xL(e,t,n=is.SUM_BY_NONZERO_WEIGHTS){let s=D(e,"losses","computeWeightedLoss"),r=null;t!=null&&(r=D(t,"weights","computeWeightedLoss"));let a=r==null?s:z(s,r);if(n===is.NONE)return a;if(n===is.SUM)return Se(a);if(n===is.MEAN){if(r==null)return Ut(a);{let o=s.size/r.size,i=ye(Se(a),Se(r));return o>1?ye(i,Te(o)):i}}if(n===is.SUM_BY_NONZERO_WEIGHTS){if(r==null)return ye(Se(a),Te(s.size));{let o=z(r,Os(s.shape)),i=ge(Se(dl(o,Te(0))),"float32");return ye(Se(a),i)}}throw Error(`Unknown reduction: ${n}`)}var Fa=W({computeWeightedLoss_:xL});function bL(e,t,n,s=is.SUM_BY_NONZERO_WEIGHTS){let r=D(e,"labels","absoluteDifference"),a=D(t,"predictions","absoluteDifference"),o=null;n!=null&&(o=D(n,"weights","absoluteDifference")),ds(r.shape,a.shape,"Error in absoluteDifference: ");let i=an(Ae(r,a));return Fa(i,o,s)}var vL=W({absoluteDifference_:bL});function wL(e,t,n,s,r=is.SUM_BY_NONZERO_WEIGHTS){let a=D(e,"labels","cosineDistance"),o=D(t,"predictions","cosineDistance"),i=null;s!=null&&(i=D(s,"weights","cosineDistance")),ds(a.shape,o.shape,"Error in cosineDistance: ");let l=Te(1),u=Ae(l,Se(z(a,o),n,!0));return Fa(u,i,r)}var kL=W({cosineDistance_:wL});function SL(e,t,n,s=is.SUM_BY_NONZERO_WEIGHTS){let r=D(e,"labels","hingeLoss"),a=D(t,"predictions","hingeLoss"),o=null;n!=null&&(o=D(n,"weights","hingeLoss")),ds(r.shape,a.shape,"Error in hingeLoss: ");let i=Te(1);r=Ae(z(Te(2),r),i);let l=Gr(Ae(i,z(r,a)));return Fa(l,o,s)}var IL=W({hingeLoss_:SL});function CL(e,t,n,s=1,r=is.SUM_BY_NONZERO_WEIGHTS){let a=D(e,"labels","huberLoss"),o=D(t,"predictions","huberLoss"),i=null;n!=null&&(i=D(n,"weights","huberLoss")),ds(a.shape,o.shape,"Error in huberLoss: ");let l=Te(s),u=an(Ae(o,a)),c=ad(u,l),p=Ae(u,c),d=de(z(Te(.5),wt(c)),z(l,p));return Fa(d,i,r)}var TL=W({huberLoss_:CL});function NL(e,t,n,s=1e-7,r=is.SUM_BY_NONZERO_WEIGHTS){let a=D(e,"labels","logLoss"),o=D(t,"predictions","logLoss"),i=null;n!=null&&(i=D(n,"weights","logLoss")),ds(a.shape,o.shape,"Error in logLoss: ");let l=Te(1),u=Te(s),c=Pt(z(a,Bs(de(o,u)))),p=z(Ae(l,a),Bs(de(Ae(l,o),u))),d=Ae(c,p);return Fa(d,i,r)}var EL=W({logLoss_:NL});function RL(e,t,n,s=is.SUM_BY_NONZERO_WEIGHTS){let r=D(e,"labels","meanSquaredError"),a=D(t,"predictions","meanSquaredError"),o=null;n!=null&&(o=D(n,"weights","meanSquaredError")),ds(r.shape,a.shape,"Error in meanSquaredError: ");let i=Y0(r,a);return Fa(i,o,s)}var _L=W({meanSquaredError_:RL});function DL(e,t){let n=D(e,"labels","sigmoidCrossEntropyWithLogits"),s=D(t,"logits","sigmoidCrossEntropyWithLogits");ds(n.shape,s.shape,"Error in sigmoidCrossEntropyWithLogits: ");let r=Gr(s),a=z(s,n),o=vh(Ls(Pt(an(s))));return de(Ae(r,a),o)}function $L(e,t,n,s=0,r=is.SUM_BY_NONZERO_WEIGHTS){let a=D(e,"multiClassLabels","sigmoidCrossEntropy"),o=D(t,"logits","sigmoidCrossEntropy"),i=null;if(n!=null&&(i=D(n,"weights","sigmoidCrossEntropy")),ds(a.shape,o.shape,"Error in sigmoidCrossEntropy: "),s>0){let u=Te(s),c=Te(1),p=Te(.5);a=de(z(a,Ae(c,u)),z(p,u))}let l=DL(a,o);return Fa(l,i,r)}var PL=W({sigmoidCrossEntropy_:$L});function FL(e,t,n=-1){if(n===-1&&(n=t.rank-1),n!==t.rank-1)throw Error(`Softmax cross entropy along a non-last dimension is not yet supported. Labels / logits was rank ${t.rank} and dim was ${n}`);return oa((r,a,o)=>{let l=z0(a,[n],!0),u=Ae(ge(a,"float32"),l);o([r,u]);let c=Pt(z(u,r));return{value:Se(c,[n]),gradFunc:(h,f)=>{let[m,g]=f,y=cl(h.shape,[n]);return[z(V(h,y),Ae(ge(m,"float32"),Ls(g))),z(V(h,y),Ae(Ls(g),ge(m,"float32")))]}}})(e,t)}function OL(e,t,n,s=0,r=is.SUM_BY_NONZERO_WEIGHTS){let a=D(e,"onehotLabels","softmaxCrossEntropy"),o=D(t,"logits","softmaxCrossEntropy"),i=null;if(n!=null&&(i=D(n,"weights","softmaxCrossEntropy")),ds(a.shape,o.shape,"Error in softmaxCrossEntropy: "),s>0){let u=Te(s),c=Te(1),p=Te(a.shape[1]);a=de(z(a,Ae(c,u)),ye(u,p))}let l=FL(a,o);return Fa(l,i,r)}var ML=W({softmaxCrossEntropy_:OL});function zL(e,t,n,s){let r=D(e,"indices","sparseFillEmptyRows","int32"),a=D(t,"values","sparseFillEmptyRows"),o=D(n,"denseShape","sparseFillEmptyRows","int32"),i=D(s,"defaultValue","sparseFillEmptyRows",a.dtype);if(r.rank!==2)throw new Error(`Indices should be Tensor2D but received shape - ${r.shape}`);if(a.rank!==1)throw new Error(`Values should be Tensor1D but received shape ${a.shape}`);if(o.rank!==1)throw new Error(`Dense shape should be Tensor1D but received shape ${o.shape}`);if(i.rank!==0)throw new Error(`Default value should be a scalar but received shape ${i.shape}`);let l={indices:r,values:a,denseShape:o,defaultValue:i},u=B.runKernel(th,l);return{outputIndices:u[0],outputValues:u[1],emptyRowIndicator:u[2],reverseIndexMap:u[3]}}var LL=W({sparseFillEmptyRows_:zL});function BL(e,t,n){let s=D(e,"inputIndices","sparseReshape","int32"),r=D(t,"inputShape","sparseReshape","int32"),a=D(n,"newShape","sparseReshape","int32");if(s.rank!==2)throw new Error(`Input indices should be Tensor2D but received shape - ${s.shape}`);if(r.rank!==1)throw new Error(`Input shape should be Tensor1D but received shape ${r.shape}`);if(a.rank!==1)throw new Error(`New shape should be Tensor1D but received shape ${a.shape}`);let o={inputIndices:s,inputShape:r,newShape:a},i=B.runKernel(Kc,o);return{outputIndices:i[0],outputShape:i[1]}}var WL=W({sparseReshape_:BL});function VL(e,t,n){let s=D(e,"data","sparseSegmentMean"),r=D(t,"indices","sparseSegmentMean","int32"),a=D(n,"segmentIds","sparseSegmentMean","int32");if(s.rank<1)throw new Error("Data should be at least 1 dimensional but received scalar");if(r.rank!==1)throw new Error(`Indices should be Tensor1D but received shape + ${s.shape}`),P(o%(t*t)===0,()=>`Dimension size must be evenly divisible by ${t*t} but is ${o} for depthToSpace with input shape ${s.shape}`);let i={x:s},l={blockSize:t,dataFormat:n};return L.runKernel(yl,i,l)}var uA=B({depthToSpace_:yF});function AF(e,t,n,s,r="NHWC",a=[1,1],o){let i=_(e,"x","depthwiseConv2d","float32"),l=_(t,"filter","depthwiseConv2d","float32"),u=i,c=!1;i.rank===3&&(c=!0,u=W(i,[1,i.shape[0],i.shape[1],i.shape[2]])),P(u.rank===4,()=>`Error in depthwiseConv2d: input must be rank 4, but got rank ${u.rank}.`),P(l.rank===4,()=>`Error in depthwiseConv2d: filter must be rank 4, but got rank ${l.rank}.`);let p=r==="NHWC"?u.shape[3]:u.shape[1];P(p===l.shape[2],()=>`Error in depthwiseConv2d: number of input channels (${p}) must match the inChannels dimension in filter ${l.shape[2]}.`),us("depthwiseConv2d",s,o);let d={x:u,filter:l},h={strides:n,pad:s,dataFormat:r,dilations:a,dimRoundingMode:o},f=L.runKernel(To,d,h);return c?W(f,[f.shape[1],f.shape[2],f.shape[3]]):f}var Vc=B({depthwiseConv2d_:AF});function xF(e){let n={x:_(e,"x","diag")};return L.runKernel(Vm,n)}var f6=B({diag_:xF});function bF(e,t,n,s,r=[1,1],a="NHWC"){let o=_(e,"x","dilation2d"),i=_(t,"filter","dilation2d");P(o.rank===3||o.rank===4,()=>`Error in dilation2d: input must be rank 3 or 4, but got rank ${o.rank}.`),P(i.rank===3,()=>`Error in dilation2d: filter must be rank 3, but got rank ${i.rank}.`),P(a==="NHWC",()=>`Error in dilation2d: Only NHWC is currently supported, but got dataFormat of ${a}`);let l=o,u=!1;o.rank===3&&(l=W(o,[1,o.shape[0],o.shape[1],o.shape[2]]),u=!0);let c={x:l,filter:i},p={strides:n,pad:s,dilations:r},d=L.runKernel(Dp,c,p);return u?W(d,[d.shape[1],d.shape[2],d.shape[3]]):d}var cA=B({dilation2d_:bF});function vF(e,t){let n=_(e,"a","equal","string_or_numeric"),s=_(t,"b","equal","string_or_numeric");[n,s]=jt(n,s),vt(n.shape,s.shape);let r={a:n,b:s};return L.runKernel(Al,r)}var Fs=B({equal_:vF});function wF(e,t,n){let s=_(t,"a","where"),r=_(n,"b","where"),a=_(e,"condition","where","bool"),o=vt(vt(a.shape,s.shape),r.shape),i=Xi(a,o),l=Xi(s,o),u=Xi(r,o),c={condition:i,t:l,e:u};return L.runKernel(Vl,c)}var qn=B({where_:wF});function kF(e){let n={x:_(e,"x","zerosLike")};return L.runKernel(Jl,n)}var ct=B({zerosLike_:kF});function SF(e,t){let n=_(e,"a","div"),s=_(t,"b","div");[n,s]=jt(n,s);let r=ge(n,s),a=ct(r),o=Fs(s,a);return qn(o,a,r)}var dA=B({divNoNan_:SF});function IF(e,t){let n=_(e,"t1","dot"),s=_(t,"t2","dot");P((n.rank===1||n.rank===2)&&(s.rank===1||s.rank===2),()=>`Error in dot: inputs must all be rank 1 or 2, but got ranks ${n.rank} and ${s.rank}.`);let r=n.rank===1?n.size:n.shape[1],a=s.rank===1?s.size:s.shape[0];if(P(r===a,()=>`Error in dot: inner dimensions of inputs must match, but got ${r} and ${a}.`),n.rank===1&&s.rank===1){let o=W(n,[1,-1]),i=W(s,[-1,1]),l=et(o,i);return W(l,[])}else if(n.rank===1&&s.rank===2){let o=W(n,[1,-1]),i=W(s,[s.shape[0],s.shape[1]]),l=et(o,i);return W(l,[l.size])}else if(n.rank===2&&s.rank===1){let o=W(s,[-1,1]),i=et(n,o);return W(i,[i.size])}else{let o=W(s,[s.shape[0],s.shape[1]]);return et(n,o)}}var pA=B({dot_:IF});function CF(e,...t){let n=t.map((r,a)=>_(r,`tensors${a}`,"einsum")),s={equation:e};return L.runKernel($p,n,s)}var m6=B({einsum_:CF});function TF(e){let n={x:_(e,"x","elu","float32")};return L.runKernel(Eo,n)}var Uc=B({elu_:TF});function NF(e){let t=_(e,"x","erf");P(t.dtype==="int32"||t.dtype==="float32",()=>"Input dtype must be `int32` or `float32`."),t.dtype==="int32"&&(t=me(t,"float32"));let n={x:t};return L.runKernel(Ic,n)}var hA=B({erf_:NF});function fA(e,t){for(let n=0;ne[a]);return[n,r]}function nl(e,t){let n=t.map(s=>1);return g6(e,n,t)}function EF(e,t,n){P(fA(t,n),()=>`${e} supports only inner-most axes for now. Got axes ${t} and rank-${n} input.`)}function A6(e,t){if(fA(e,t))return null;let n=[];for(let s=0;sn.push(s)),n}function mA(e){return e.map((t,n)=>[n,t]).sort((t,n)=>t[1]-n[1]).map(t=>t[0])}function RF(e,t){let n=[];for(let s=t-e;s"Axis must be <= rank of the tensor");let s={input:n},r={dim:t};return L.runKernel(xl,s,r)}var Ft=B({expandDims_:BF});function WF(e){let n={x:_(e,"x","expm1")};return L.runKernel(bl,n)}var yA=B({expm1_:WF});function VF(e,t){let n=_(e,"x","tile","string_or_numeric");P(n.rank===t.length,()=>`Error in transpose: rank of input ${n.rank} must match length of reps ${t}.`);let s={x:n},r={reps:t};return L.runKernel(Ea,s,r)}var As=B({tile_:VF});function UF(e,t,n,s="float32"){t==null&&(t=e);let r=ze([e,t],s),a=e<=t?e:t;for(let i=0;i`Error in localResponseNormalization: x must be rank 3 or 4 but got + rank ${a.rank}.`),P(Yu(t),()=>`Error in localResponseNormalization: depthRadius must be an integer but got depthRadius ${t}.`);let o=a,i=!1;a.rank===3&&(i=!0,o=W(a,[1,a.shape[0],a.shape[1],a.shape[2]]));let l={x:o},u={depthRadius:t,bias:n,alpha:s,beta:r},c=L.runKernel(Fp,l,u);return i?W(c,[c.shape[1],c.shape[2],c.shape[3]]):c}var vA=B({localResponseNormalization_:eO});function tO(e){let n={x:_(e,"x","log","float32")};return L.runKernel(Mo,n)}var Ms=B({log_:tO});function nO(e){let n={x:_(e,"x","log1p")};return L.runKernel(Ec,n)}var rh=B({log1p_:nO});function sO(e){return P(to(e),()=>"The f passed in grad(f) must be a function"),(t,n)=>{let s=_(t,"x","tf.grad","string_or_numeric"),r=n!=null?_(n,"dy","tf.grad"):null;return L.tidy(()=>{let{value:a,grads:o}=L.gradients(()=>e(s),[s],r);return r!=null&&ls(a.shape,r.shape,"The shape of dy passed in grad(f)(x, dy) must match the shape returned by f(x)"),h0(o),o[0]})}}function rO(e){return P(to(e),()=>"The f passed in grads(f) must be a function"),(t,n)=>{P(Array.isArray(t),()=>"The args passed in grads(f)(args) must be an array of `Tensor`s or `TensorLike`s");let s=hp(t,"args","tf.grads","string_or_numeric"),r=n!=null?_(n,"dy","tf.grads"):null;return L.tidy(()=>{let{value:a,grads:o}=L.gradients(()=>e(...s),s,r);return r!=null&&ls(a.shape,r.shape,"The shape of dy passed in grads(f)([x1,...], dy) must match the shape returned by f([x1,...])"),h0(o),o})}}function aO(e){return P(to(e),()=>"The f passed in valueAndGrad(f) must be a function"),(t,n)=>{P(t instanceof st,()=>"The x passed in valueAndGrad(f)(x) must be a tensor"),P(n==null||n instanceof st,()=>"The dy passed in valueAndGrad(f)(x, dy) must be a tensor");let{grads:s,value:r}=L.gradients(()=>e(t),[t],n);return h0(s),{grad:s[0],value:r}}}function oO(e){return P(to(e),()=>"The f passed in valueAndGrads(f) must be a function"),(t,n)=>{P(Array.isArray(t)&&t.every(r=>r instanceof st),()=>"The args passed in valueAndGrads(f)(args) must be array of tensors"),P(n==null||n instanceof st,()=>"The dy passed in valueAndGrads(f)(args, dy) must be a tensor");let s=L.gradients(()=>e(...t),t,n);return n!=null&&ls(s.value.shape,n.shape,"The shape of dy passed in valueAndGrads(f)([x1,...], dy) must match the shape returned by f([x1,...])"),h0(s.grads),s}}function v6(e,t){P(to(e),()=>"The f passed in variableGrads(f) must be a function"),P(t==null||Array.isArray(t)&&t.every(u=>u instanceof dp),()=>"The varList passed in variableGrads(f, varList) must be an array of variables");let n=t!=null;if(!n){t=[];for(let u in L.registeredVariables)t.push(L.registeredVariables[u])}let s=n?t.filter(u=>!u.trainable):null,r=t.length;t=t.filter(u=>u.trainable),P(t.length>0,()=>`variableGrads() expects at least one of the input variables to be trainable, but none of the ${r} variables is trainable.`);let a=!0,{value:o,grads:i}=L.gradients(e,t,null,a);P(i.some(u=>u!=null),()=>"Cannot find a connection between any variable and the result of the loss function y=f(x). Please make sure the operations that use variables are inside the function f passed to minimize()."),P(o.rank===0,()=>`The f passed in variableGrads(f) must return a scalar, but it returned a rank-${o.rank} tensor`);let l={};return t.forEach((u,c)=>{i[c]!=null&&(l[u.name]=i[c])}),s!=null&&s.forEach(u=>l[u.name]=null),{value:o,grads:l}}function na(e){return L.customGrad(e)}function h0(e){if(e.filter(n=>n==null).length>0)throw new Error(`Cannot compute gradient of y=f(x) with respect to x. Make sure that + the f you passed encloses all operations that lead from x to y.`)}function iO(e){let n={x:_(e,"x","softplus")};return L.runKernel(Oc,n)}var su=B({softplus_:iO});function lO(e){let t=_(e,"x","logSigmoid");return na(s=>({value:Dt(su(Dt(s))),gradFunc:o=>M(o,Mn(Dt(s)))}))(t)}var wA=B({logSigmoid_:lO});function uO(e,t){let n=_(e,"a","sub"),s=_(t,"b","sub");[n,s]=jt(n,s);let r={a:n,b:s};return L.runKernel(ii,r)}var ye=B({sub_:uO});function cO(e,t=-1){let n=_(e,"logits","logSoftmax");if(t===-1&&(t=n.rank-1),t!==n.rank-1)throw Error(`Log Softmax along a non-last dimension is not yet supported. Logits was rank ${n.rank} and axis was ${t}`);return na((r,a)=>{let i=yn(r,t,!0),l=ye(r,i),u=ye(me(l,"float32"),Ms(ve(Os(l),t,!0)));return a([u]),{value:u,gradFunc:(p,d)=>{let[h]=d,f=!0,m=Os(h);return ye(p,M(ve(p,t,f),m))}}})(n)}var f0=B({logSoftmax_:cO});function dO(e,t=null,n=!1){let s=_(e,"x","logSumExp"),r=yr(t,s.shape),a=yn(s,r,!0),o=ye(s,a),i=Os(o),l=ve(i,r),u=Ms(l),c=le(W(a,u.shape),u);if(n){let p=nl(c.shape,r);return W(c,p)}return c}var m0=B({logSumExp_:dO});function pO(e,t){let n=_(e,"a","logicalAnd","bool"),s=_(t,"b","logicalAnd","bool");vt(n.shape,s.shape);let r={a:n,b:s};return L.runKernel(Nl,r)}var gr=B({logicalAnd_:pO});function hO(e){let n={x:_(e,"x","logicalNot","bool")};return L.runKernel(El,n)}var ah=B({logicalNot_:hO});function fO(e,t){let n=_(e,"a","logicalOr","bool"),s=_(t,"b","logicalOr","bool");vt(n.shape,s.shape);let r={a:n,b:s};return L.runKernel(Rc,r)}var g0=B({logicalOr_:fO});function mO(e,t){let n=_(e,"a","logicalXor","bool"),s=_(t,"b","logicalXor","bool");return vt(n.shape,s.shape),gr(g0(e,t),ah(gr(e,t)))}var kA=B({logicalXor_:mO}),Nf=2147483648;function gO(e,t,n="left"){let s=_(e,"sortedSequence","searchSorted"),r=_(t,"values","searchSorted"),a=s.shape[s.shape.length-1],o=r.shape[r.shape.length-1],i=W(s,[-1,a]),l=W(r,[-1,o]);if(i.rank<2)throw new Error("Sorted input argument must be at least 2-dimensional");if(i.shape[0]!==l.shape[0])throw new Error("Leading dimension of 'sortedSequence' and 'values' must match.");if(It(l.shape)>=Nf)throw new Error(`values tensor size must less than ${Nf}`);if(i.shape[1]>=Nf)throw new Error(`trailing dim_size must less than ${Nf} for int32 output type, was ${i.shape[1]}`);let u={sortedSequence:i,values:l},c={side:n};return L.runKernel(n0,u,c)}var y0=B({searchSorted_:gO});function w6(e,t){return y0(e,t,"left")}function yO(e,t,n,s,r){let a=_(e,"x","maxPool"),o=1,i=a,l=!1;a.rank===3&&(l=!0,i=W(a,[1,a.shape[0],a.shape[1],a.shape[2]])),P(i.rank===4,()=>`Error in maxPool: input must be rank 4 but got rank ${i.rank}.`),P(aa(n,o),()=>`Error in maxPool: Either strides or dilations must be 1. Got strides ${n} and dilations '${o}'`),us("maxPool",s,r);let u={x:i},c={filterSize:t,strides:n,pad:s,dimRoundingMode:r},p=L.runKernel(Bo,u,c);return l?W(p,[p.shape[1],p.shape[2],p.shape[3]]):p}var oh=B({maxPool_:yO});function AO(e,t=[1,1,1],n,s,r,a="NDHWC"){let o=_(e,"x","maxPool3d"),i=o,l=!1;o.rank===4&&(l=!0,i=W(o,[1,o.shape[0],o.shape[1],o.shape[2],o.shape[3]])),P(i.rank===5,()=>`Error in maxPool3d: x must be rank 5 but got rank ${i.rank}.`),P(a==="NDHWC",()=>`Error in maxPool3d: Only NDHWC is currently supported, but got dataFormat of ${a}`),us("maxPool3d",s,r);let u={x:i},c={filterSize:t,strides:n,pad:s,dimRoundingMode:r,dataFormat:a},p=L.runKernel(Op,u,c);return l?W(p,[p.shape[1],p.shape[2],p.shape[3],p.shape[4]]):p}var SA=B({maxPool3d_:AO});function xO(e,t,n,s,r=!1){let o={x:_(e,"x","maxPoolWithArgmax")},i={filterSize:t,strides:n,pad:s,includeBatchInIndex:r},l=L.runKernel(Zm,o,i);return{result:l[0],indexes:l[1]}}var k6=B({maxPoolWithArgmax_:xO});function bO(e,t){let n=_(e,"a","maximum"),s=_(t,"b","maximum");[n,s]=jt(n,s),n.dtype==="bool"&&(n=me(n,"int32"),s=me(s,"int32")),vt(n.shape,s.shape);let r={a:n,b:s};return L.runKernel(Lo,r)}var oa=B({maximum_:bO});function vO(e,t=null,n=!1){let r={x:_(e,"x","mean")},a={axis:t,keepDims:n};return L.runKernel(Wo,r,a)}var Wt=B({mean_:vO});function Vt(e,t="float32"){if(t==="complex64"){let s=Vt(e,"float32"),r=Vt(e,"float32");return wa(s,r)}let n=_m(It(e),t);return L.makeTensor(n,e,t)}function Ds(e,t="float32"){if(t==="complex64"){let s=Ds(e,"float32"),r=Vt(e,"float32");return wa(s,r)}let n=yy(It(e),t);return L.makeTensor(n,e,t)}function S6(e,t,{indexing:n="xy"}={}){if(n!=="xy"&&n!=="ij")throw new TypeError(`${n} is not a valid third argument to meshgrid`);if(e===void 0)return[];let s=_(e,"x","meshgrid",e instanceof st?e.dtype:"float32");if(t===void 0)return[s];let r=_(t,"y","meshgrid",t instanceof st?t.dtype:"float32"),a=It(s.shape),o=It(r.shape);return n==="xy"?(s=W(s,[1,-1]),r=W(r,[-1,1]),[et(Ds([o,1],s.dtype),s),et(r,Ds([1,a],r.dtype))]):(s=W(s,[-1,1]),r=W(r,[1,-1]),[et(s,Ds([1,o],s.dtype)),et(Ds([a,1],r.dtype),r)])}function wO(e,t){let n=_(e,"a","minimum"),s=_(t,"b","minimum");[n,s]=jt(n,s),n.dtype==="bool"&&(n=me(n,"int32"),s=me(s,"int32")),vt(n.shape,s.shape);let r={a:n,b:s};return L.runKernel(Uo,r)}var qc=B({minimum_:wO});function kO(e,t,n){P(n==="reflect"||n==="symmetric",()=>`Invalid mode. Mode must be either reflect or symmetric. Got ${n}.`);let s=_(e,"x","mirrorPad");if(s.rank===0)throw new Error("mirrorPad(scalar) is not defined. Pass non-scalar to mirrorPad");P(t.length===s.rank,()=>`Padding doesn't match input. Must be ${s.rank}. Got ${t.length}.`);let r=n==="reflect"?1:0;for(let i=0;i"Invalid number of paddings. Must be length of 2 each."),P(t[i][0]>=0&&t[i][0]<=s.shape[i]-r&&t[i][1]>=0&&t[i][1]<=s.shape[i]-r,()=>`Padding in dimension ${i} cannot be greater than or equal to ${s.shape[i]-r} or less than 0 for input of shape ${s.shape}`);let a={paddings:t,mode:n},o={x:s};return L.runKernel(Go,o,a)}var IA=B({mirrorPad_:kO});function SO(e,t){let n=_(e,"a","mod"),s=_(t,"b","mod");[n,s]=jt(n,s);let r={a:n,b:s};return L.runKernel(_c,r)}var ru=B({mod_:SO});function IO(e,t=null,n=!1){e=_(e,"x","moments");let s=yr(t,e.shape),r=Wt(e,s,n),a=r.shape;n||(a=nl(r.shape,s));let o=bt(ye(me(e,"float32"),W(r,a))),i=Wt(o,s,n);return{mean:r,variance:i}}var ih=B({moments_:IO});function CO(e,t,n,s){let r=_(t,"data","multiRNNCell"),a=hp(n,"c","multiRNNCell"),o=hp(s,"h","multiRNNCell"),i=r,l=[];for(let p=0;p2)throw new Error(`Rank of probabilities must be 1 or 2, but is ${o}`);n=n||Math.random();let l={logits:o===1?W(r,[1,-1]):r},u={numSamples:t,seed:n,normalized:s},c=L.runKernel(Ym,l,u);return o===1?W(c,[c.size]):c}var C6=B({multinomial_:TO});function NO(e,t){let n=_(e,"a","notEqual","string_or_numeric"),s=_(t,"b","notEqual","string_or_numeric");[n,s]=jt(n,s),vt(n.shape,s.shape);let r={a:n,b:s};return L.runKernel(_l,r)}var sl=B({notEqual_:NO});function EO(e){let n={x:_(e,"x","onesLike")};return L.runKernel(Pl,n)}var zs=B({onesLike_:EO});function RO(e,t){let n=_(e,"v1","outerProduct"),s=_(t,"v2","outerProduct");P(n.rank===1&&s.rank===1,()=>`Error in outerProduct: inputs must be rank 1, but got ranks ${n.rank} and ${s.rank}.`);let r=W(n,[-1,1]),a=W(s,[1,-1]);return et(r,a)}var T6=B({outerProduct_:RO});function _O(e,t,n=0){let s=_(e,"x","pad");if(s.rank===0)throw new Error("pad(scalar) is not defined. Pass non-scalar to pad");let r={paddings:t,constantValue:n},a={x:s};return L.runKernel(jo,a,r)}var tr=B({pad_:_O});function DO(e,t,n=0){return P(t.length===2,()=>"Invalid number of paddings. Must be length of 2."),tr(e,[t],n)}var N6=B({pad1d_:DO});function $O(e,t,n=0){return P(t.length===2&&t[0].length===2&&t[1].length===2,()=>"Invalid number of paddings. Must be length of 2 each."),tr(e,t,n)}var E6=B({pad2d_:$O});function PO(e,t,n=0){return P(t.length===3&&t[0].length===2&&t[1].length===2&&t[2].length===2,()=>"Invalid number of paddings. Must be length of 2 each."),tr(e,t,n)}var R6=B({pad3d_:PO});function FO(e,t,n=0){return P(t.length===4&&t[0].length===2&&t[1].length===2&&t[2].length===2&&t[3].length===2,()=>"Invalid number of paddings. Must be length of 2 each."),tr(e,t,n)}var _6=B({pad4d_:FO});function OO(e,t,n){let s=_(e,"x","spaceToBatchND");P(s.rank>=1+t.length,()=>`input rank ${s.rank} should be > than [blockShape] ${t.length}`),P(n.length===t.length,()=>`paddings.shape[0] ${n.length} must be equal to [blockShape] ${t.length}`),P(s.shape.reduce((o,i,l)=>l>0&&l<=t.length?o&&(i+n[l-1][0]+n[l-1][1])%t[l-1]===0:o,!0),()=>`input spatial dimensions ${s.shape.slice(1)} with paddings ${n.toString()} must be divisible by blockShapes ${t.toString()}`);let r={x:s},a={blockShape:t,paddings:n};return L.runKernel(Hl,r,a)}var lh=B({spaceToBatchND_:OO});function MO(e,t,n,s,r,a,o){r==null&&(r=[1,1]),a==null&&(a=1),s===0&&(s="valid");let i=_(e,"x","maxPool"),l=i,u=!1;i.rank===3&&(u=!0,l=W(i,[1,i.shape[0],i.shape[1],i.shape[2]])),P(aa(a,r),()=>`Error in pool: Either strides or dilations must be 1. Got strides ${a} and dilations '${r}'`);let c=i6(l.shape,t,a,r,s),p=[c.dilationHeight,c.dilationWidth],d;s==="same"?d=LO([c.filterHeight,c.filterWidth],p):d=[[0,0],[0,0]];let h=p[0]===1&&p[1]===1,[f,m]=zO([c.inHeight,c.inWidth],p,d),g=h?s:"valid",y=h?l:lh(l,p,f),A=(n==="avg"?()=>eh(y,t,a,g,o):()=>oh(y,t,a,g,o))(),b=h?A:th(A,p,m);return u?W(b,[b.shape[1],b.shape[2],b.shape[3]]):b}function zO(e,t,n){let s=n.map(c=>c[0]),r=n.map(c=>c[1]),a=e.concat(s,r),o=t.map((c,p)=>(c-a[p]%c)%c),i=r.map((c,p)=>c+o[p]),l=t.map((c,p)=>[s[p],i[p]]),u=t.map((c,p)=>[0,o[p]]);return[l,u]}function LO(e,t){let s=e.map((o,i)=>o+(o-1)*(t[i]-1)).map(o=>o-1),r=s.map(o=>Math.floor(o/2)),a=s.map((o,i)=>o-r[i]);return s.map((o,i)=>[r[i],a[i]])}var CA=B({pool_:MO});function BO(e,t){let n=_(e,"x","prelu"),s=_(t,"alpha","prelu"),r={x:n,alpha:s};return L.runKernel(Xo,r)}var uh=B({prelu_:BO});function WO(e,t=null,n=!1){let s=_(e,"x","prod");s.dtype==="bool"&&(s=me(s,"int32"));let r={x:s},a={axis:t,keepDims:n};return L.runKernel(Ko,r,a)}var TA=B({prod_:WO});function VO(e,t,n,s){let r=e.map((c,p)=>_(c,`tensors${p}`,"raggedGather","int32")),a=_(t,"paramsDenseValues","raggedGather"),o=_(n,"indices","raggedGather","int32"),i={paramsNestedSplits:r,paramsDenseValues:a,indices:o},l={outputRaggedRank:s},u=L.runKernel(Jm,i,l);return{outputNestedSplits:u.slice(0,u.length-1),outputDenseValues:u[u.length-1]}}var D6=B({raggedGather_:VO});function UO(e,t,n,s,r){let a=_(e,"shape","raggedTensorToTensor","int32"),o=_(t,"values","raggedTensorToTensor"),i=_(n,"defaultValue","raggedTensorToTensor",o.dtype),l=s.map((p,d)=>_(p,`tensors${d}`,"raggedTensorToTensor","int32")),u={shape:a,values:o,defaultValue:i,rowPartitionTensors:l},c={rowPartitionTypes:r};return L.runKernel(Qm,u,c)}var $6=B({raggedTensorToTensor_:UO});function GO(e,t,n){let s=It(e),r=null;if(n==null||n==="float32")r=new Float32Array(s);else if(n==="int32")r=new Int32Array(s);else if(n==="bool")r=new Uint8Array(s);else throw new Error(`Unknown data type ${n}`);for(let a=0;a=1||a===0);let o=Math.sqrt(-2*Math.log(a)/a);e=this.mean+this.stdDev*s*o,t=this.mean+this.stdDev*r*o,(!this.truncated||this.isValidTruncated(e))&&(n=!0)}return(!this.truncated||this.isValidTruncated(t))&&(this.nextVal=this.convertValue(t)),this.convertValue(e)}convertValue(e){return this.dtype==null||this.dtype==="float32"?e:Math.round(e)}isValidTruncated(e){return e<=this.upper&&e>=this.lower}},HO=class{constructor(e,t,n,s){this.alpha=e,this.beta=1/t,this.dtype=n;let r=s||Math.random();this.randu=NA.alea(r.toString()),this.randn=new EA(0,1,n,!1,this.randu()),e<1?this.d=e+2/3:this.d=e-1/3,this.c=1/Math.sqrt(9*this.d)}nextValue(){let e,t,n,s,r,a;for(;;){do s=this.randn.nextValue(),a=1+this.c*s;while(a<=0);if(a*=a*a,e=s*s,t=1-.331*e*e,n=.5*e+this.d*(1-a+Math.log(a)),r=this.randu(),rthis.dtype==null||this.dtype==="float32",this.min=e,this.range=t-e,this.dtype=n,s==null&&(s=Math.random()),typeof s=="number"&&(s=s.toString()),!this.canReturnFloat()&&this.range<=1)throw new Error(`The difference between ${e} - ${t} <= 1 and dtype is not float`);this.random=NA.alea(s)}convertValue(e){return this.canReturnFloat()?e:Math.round(e)}nextValue(){return this.convertValue(this.min+this.range*this.random())}};function qO(e,t,n=1,s="float32",r){if(n==null&&(n=1),s==null&&(s="float32"),s!=="float32"&&s!=="int32")throw new Error(`Unsupported data type ${s}`);let a=new HO(t,n,s,r),o=ze(e,s);for(let i=0;i`Error in reverse1D: x must be rank 1 but got rank ${t.rank}.`),Js(t,0)}var M6=B({reverse1d_:tM});function nM(e,t){let n=_(e,"x","reverse");return P(n.rank===2,()=>`Error in reverse2D: x must be rank 2 but got rank ${n.rank}.`),Js(n,t)}var z6=B({reverse2d_:nM});function sM(e,t){let n=_(e,"x","reverse");return P(n.rank===3,()=>`Error in reverse3D: x must be rank 3 but got rank ${n.rank}.`),Js(n,t)}var L6=B({reverse3d_:sM});function rM(e,t){let n=_(e,"x","reverse");return P(n.rank===4,()=>`Error in reverse4D: x must be rank 4 but got rank ${n.rank}.`),Js(n,t)}var B6=B({reverse4d_:rM});function aM(e){let n={x:_(e,"x","round")};return L.runKernel(Bl,n)}var b0=B({round_:aM});function oM(e){let n={x:_(e,"x","rsqrt","float32")};return L.runKernel(ei,n)}var v0=B({rsqrt_:oM});function iM(e){let n={x:_(e,"x","selu")};return L.runKernel(Pc,n)}var w0=B({selu_:iM});function lM(e,t,n,s,r,a=[1,1],o="NHWC"){let i=_(e,"x","separableConv2d"),l=_(t,"depthwiseFilter","separableConv2d"),u=_(n,"pointwiseFilter","separableConv2d"),c=i,p=!1;if(i.rank===3&&(p=!0,c=W(i,[1,i.shape[0],i.shape[1],i.shape[2]])),o==="NCHW")throw new Error("separableConv2d currently does not support dataFormat NCHW; only NHWC is supported");P(c.rank===4,()=>`Error in separableConv2d: input must be rank 4, but got rank ${c.rank}.`),P(l.rank===4,()=>`Error in separableConv2d: depthwise filter must be rank 4, but got rank ${l.rank}.`),P(u.rank===4,()=>`Error in separableConv2d: pointwise filter must be rank 4, but got rank ${l.rank}.`),P(u.shape[0]===1,()=>`Error in separableConv2d: the first dimension of pointwise filter must be 1, but got ${u.shape[0]}.`),P(u.shape[1]===1,()=>`Error in separableConv2d: the second dimension of pointwise filter must be 1, but got ${u.shape[1]}.`);let d=l.shape[2],h=l.shape[3];P(u.shape[2]===d*h,()=>`Error in separableConv2d: the third dimension of pointwise filter must be ${d*h}, but got ${u.shape[2]}.`);let f=Vc(c,l,s,r,o,a),g=ka(f,u,1,"valid",o);return p?W(g,[g.shape[1],g.shape[2],g.shape[3]]):g}var k0=B({separableConv2d_:lM});async function uM(e,t){let n=_(e,"x","setdiff1d"),s=_(t,"y","setdiff1d");P(n.dtype===s.dtype,()=>`x and y should have the same dtype, but got x (${n.dtype}) and y (${s.dtype}).`),P(n.rank===1,()=>`x should be 1D tensor, but got x (${n.shape}).`),P(s.rank===1,()=>`y should be 1D tensor, but got y (${s.shape}).`);let r=await n.data(),a=await s.data(),o=new Set(a),i=0;for(let c=0;c`slice1d expects a rank-1 tensor, but got a rank-${s.rank} tensor`),Oe(s,[t],[n])}var ch=B({slice1d_:hM});function fM(e,t,n){let s=_(e,"x","slice2d");return P(s.rank===2,()=>`slice2d expects a rank-2 tensor, but got a rank-${s.rank} tensor`),Oe(s,t,n)}var C0=B({slice2d_:fM});function mM(e,t,n){let s=_(e,"x","slice3d");return P(s.rank===3,()=>`slice3d expects a rank-3 tensor, but got a rank-${s.rank} tensor`),Oe(s,t,n)}var fi=B({slice3d_:mM});function gM(e,t,n){let s=_(e,"x","slice4d");return P(s.rank===4,()=>`slice4d expects a rank-4 tensor, but got a rank-${s.rank} tensor`),Oe(s,t,n)}var oo=B({slice4d_:gM});function yM(e,t=-1){let n=_(e,"logits","softmax","float32");if(t===-1&&(t=n.rank-1),t!==n.rank-1)throw Error(`Softmax along a non-last dimension is not yet supported. Logits was rank ${n.rank} and dim was ${t}`);let s={logits:n},r={dim:t};return L.runKernel(ai,s,r)}var au=B({softmax_:yM});function AM(e){P(e.dtype==="complex64",()=>`The dtype for tf.spectral.fft() must be complex64 but got ${e.dtype}.`);let t={input:e};return L.runKernel(Gm,t)}var dh=B({fft_:AM});function xM(e){P(e.dtype==="complex64",()=>`The dtype for tf.spectral.ifft() must be complex64 but got ${e.dtype}.`);let t={input:e};return L.runKernel(Hm,t)}var sc=B({ifft_:xM});function bM(e){let t=e.shape[e.shape.length-1],n=e.size/t,s;if(t<=2){let r=W(e,[n,t]);s=sc(r)}else{let r=[n,2*(t-1)],a=W(tc(e),[n,t]),o=W(Jp(e),[n,t]),i=Js(Oe(a,[0,1],[n,t-2]),1),l=M(Js(Oe(o,[0,1],[n,t-2]),1),Ce(-1)),u=ut([a,i],1),c=ut([o,l],1),p=W(wa(u,c),[r[0],r[1]]);s=sc(p)}if(s=tc(s),e.rank===3&&e.shape[0]!==0){let r=s,a=e.shape[0];s=W(s,[a,s.shape[0]/a,s.shape[1]]),r.dispose()}return s}var T0=B({irfft_:bM});function vM(e,t,n=0){let r={x:_(e,"x","split")},a={numOrSizeSplits:t,axis:n};return L.runKernel(jl,r,a)}var Ht=B({split_:vM});function wM(e,t){P(e.dtype==="float32",()=>`The dtype for rfft() must be real value but got ${e.dtype}`);let n=e.shape[e.shape.length-1],s=e.size/n,r;if(t!=null&&t0),m=e.shape.map(g=>g);m[e.shape.length-1]=t,r=Oe(e,f,m),n=t}else if(t!=null&&t>n){let f=e.shape.map(m=>m);f[e.shape.length-1]=t-n,r=ut([e,Vt(f)],e.shape.length-1),n=t}else r=e;let a=ct(r),o=W(wa(r,a),[s,n]),i=dh(o),l=Math.floor(n/2)+1,u=tc(i),c=Jp(i),p=Ht(u,[l,n-l],u.shape.length-1),d=Ht(c,[l,n-l],c.shape.length-1),h=r.shape.slice();return h[r.shape.length-1]=l,W(wa(p[0],d[0]),h)}var ph=B({rfft_:wM});function kM(e,t){let n=_(e,"a","squaredDifference"),s=_(t,"b","squaredDifference");[n,s]=jt(n,s),vt(n.shape,s.shape);let r={a:n,b:s},a={};return L.runKernel(oi,r,a)}var N0=B({squaredDifference_:kM});function SM(e,t){let n=_(e,"x","squeeze","string_or_numeric");return W(n,rw(n.shape,t).newShape)}var Ge=B({squeeze_:SM});function IM(e,t=0){let n=hp(e,"tensors","stack","string_or_numeric");P(n.length>=1,()=>"Pass at least one tensor to tf.stack"),n.length>0&&P(t<=n[0].rank,()=>"Axis must be <= rank of the tensor");let s=n,r={axis:t};return L.runKernel(Ol,s,r)}var ln=B({stack_:IM});function CM(e,t=0){let s={x:_(e,"x","step")},r={alpha:t};return L.runKernel(ui,s,r)}var ou=B({step_:CM});function TM(e,t,n,s,r=0,a=0,o=0,i=0,l=0){let c={x:_(e,"x","stridedSlice","string_or_numeric")},p={begin:t,end:n,strides:s,beginMask:r,endMask:a,ellipsisMask:o,newAxisMask:i,shrinkAxisMask:l};return L.runKernel(ql,c,p)}var DA=B({stridedSlice_:TM});function NM(e){let n={x:_(e,"x","tan","float32")};return L.runKernel(Xl,n)}var $A=B({tan_:NM});function Ot(e,t){cl(e);let n=ta(e,t);if(n.length!==1)throw new Error("tensor1d() requires values to be a flat/TypedArray");return ci(e,null,n,t)}function mr(e,t,n){if(cl(e),t!=null&&t.length!==2)throw new Error("tensor2d() requires shape to have two numbers");let s=ta(e,n);if(s.length!==2&&s.length!==1)throw new Error("tensor2d() requires values to be number[][] or flat/TypedArray");if(s.length===1&&t==null)throw new Error("tensor2d() requires shape to be provided when `values` are a flat/TypedArray");return ci(e,t,s,n)}function V6(e,t,n){if(cl(e),t!=null&&t.length!==4)throw new Error("tensor4d() requires shape to have four numbers");let s=ta(e,n);if(s.length!==4&&s.length!==1)throw new Error("tensor4d() requires values to be number[][][][] or flat/TypedArray");if(s.length===1&&t==null)throw new Error("tensor4d() requires shape to be provided when `values` are a flat array");return ci(e,t,s,n)}function U6(e,t,n){if(cl(e),t!=null&&t.length!==5)throw new Error("tensor5d() requires shape to have five numbers");let s=ta(e,n);if(s.length!==5&&s.length!==1)throw new Error("tensor5d() requires values to be number[][][][][] or flat/TypedArray");if(s.length===1&&t==null)throw new Error("tensor5d() requires shape to be provided when `values` are a flat array");return ci(e,t,s,n)}function G6(e,t,n){if(cl(e),t!=null&&t.length!==6)throw new Error("tensor6d() requires shape to have six numbers");let s=ta(e,n);if(s.length!==6&&s.length!==1)throw new Error("tensor6d() requires values to be number[][][][][][] or flat/TypedArray");if(s.length===1&&t==null)throw new Error("tensor6d() requires shape to be provided when `values` are a flat array");return t=t||s,ci(e,t,s,n)}function EM(e,t=1,n=!0){let s=_(e,"x","topk");if(s.rank===0)throw new Error("topk() expects the input to be of rank 1 or higher");let r=s.shape[s.shape.length-1];if(t<0)throw new Error(`'k' passed to topk() must be >= 0 but got ${t}`);if(t>r)throw new Error(`'k' passed to topk() must be <= the last dimension (${r}) but got ${t}`);let a={x:s},o={k:t,sorted:n},[i,l]=L.runKernel(Kl,a,o);return{values:i,indices:l}}var PA=B({topk_:EM});function RM(e,t=0,n=1,s,r){if(s!=null&&s==="bool")throw new Error("Unsupported data type $ { dtype }");let a=new EA(t,n,s,!0,r),o=ze(e,s);for(let i=0;i0,()=>"The input tensor must be at least 1D");let s={x:n},r={axis:t},[a,o]=L.runKernel(s0,s,r);return{values:a,indices:o}}var FA=B({unique_:_M});function DM(e,t,n){let s=_(e,"x","unsortedSegmentSum"),r=_(t,"segmentIds","unsortedSegmentSum","int32");P(Yu(n),()=>"numSegments must be of dtype int");let a={x:s,segmentIds:r},o={numSegments:n};return L.runKernel(Gp,a,o)}var R0=B({unsortedSegmentSum_:DM});function $M(e,t=0){let n=_(e,"x","unstack","string_or_numeric");P(t>=-n.shape.length&&t`Axis = ${t} is not in [-${n.shape.length}, ${n.shape.length})`);let s={value:n},r={axis:t};return L.runKernel(Yl,s,r)}var bn=B({unstack_:$M});function H6(e,t){return y0(e,t,"right")}function OA(e,t=!0,n,s){return L.makeVariable(e,t,n,s)}function j6(e,t){let n=[];for(let a=0;a0,()=>"mask cannot be scalar"),ls(i.slice(a,a+o),r.shape,"mask's shape must match the first K dimensions of tensor's shape,");let l=1;for(let m=a;m"Shape mismatch in v and x");let l=Ce(1),u=ye(l,i),c=M(ye(o,a),u);if(r){P(s!=null,()=>"When using zeroDebias: true, step is required.");let p=_(s,"step","movingAverage");c=ge(c,ye(l,Ia(i,p)))}return le(a,c)}var X6=B({movingAverage_:OM});function MM(e,t,n){let s=_(e,"indices","scatterND","int32"),r=_(t,"updates","scatterND");zy(r,s,n);let a={indices:s,updates:r},o={shape:n};return L.runKernel(Wl,a,o)}var K6=B({scatterND_:MM});function zM(e,t,n,s){if(e.dtype!=="int32")throw new Error(`tf.sparseToDense() expects the indices to be int32 type, but the dtype was ${e.dtype}.`);if(e.rank>2)throw new Error(`sparseIndices should be a scalar, vector, or matrix, but got shape ${e.shape}.`);let r=e.rank>0?e.shape[0]:1,a=e.rank>1?e.shape[1]:1;if(n.length!==a)throw new Error(`outputShape has incorrect number of elements:, ${n.length}, should be: ${a}.`);let o=t.size;if(!(t.rank===0||t.rank===1&&o===r))throw new Error(`sparseValues has incorrect shape ${t.shape}, should be [] or [${r}]`);if(t.dtype!==s.dtype)throw new Error("sparseValues.dtype must match defaultValues.dtype")}function LM(e,t,n,s=0){let r=_(e,"sparseIndices","sparseToDense","int32"),a=_(t,"sparseValues","sparseToDense","string_or_numeric"),o=_(s,"defaultValue","sparseToDense",a.dtype);zM(r,a,n,o);let i={sparseIndices:r,sparseValues:a,defaultValue:o},l={outputShape:n};return L.runKernel(Wp,i,l)}var Z6=B({sparseToDense_:LM});function BM(e,t){let n=_(t,"indices","gatherND","int32"),r={params:_(e,"x","gatherND","string_or_numeric"),indices:n};return L.runKernel(kl,r)}var Y6=B({gatherND_:BM});function WM(e,t){if(t==null)return e.shape.slice();if(mo(e.shape,t))return t;if(e.shape.length===t.length){let n=[];for(let s=0;s`x has to be a floating point tensor since it's going to be scaled, but got a ${r.dtype} tensor instead.`),P(t>=0&&t<1,()=>`rate must be a float in the range [0, 1), but got ${t}.`),t===0)return e instanceof st?r.clone():r;let a=WM(r,n),o=1-t,i=ge(Hc(le(Xc(a,0,1,"float32",s),o)),o);return M(r,i)}var zA=B({dropout_:VM});function LA(e){return Math.floor(Math.pow(2,Math.ceil(Math.log(e)/Math.log(2))))}function _0(e,t,n){let s=1-e%2,r=new Float32Array(e);for(let a=0;a1,()=>`inTopK() expects the predictions to be of rank 2 or higher, but got ${s.rank}`),P(s.rank-1===r.rank,()=>`predictions rank should be 1 larger than targets rank, but got predictions rank ${s.rank} and targets rank ${r.rank}`),ls(s.shape.slice(0,s.shape.length-1),r.shape,"predictions's shape should be align with the targets' shape, except the last dimension.");let a=s.shape[s.shape.length-1];P(n>0&&n<=a,()=>`'k' passed to inTopK() must be > 0 && <= the predictions last dimension (${a}), but got ${n}`);let o=await s.data(),i=await r.data(),[l,u]=[o.length/a,a],c=aw("bool",l);for(let p=0;pg.value-m.value),c[p]=0;for(let m=0;mjM,depthwiseConv2d:()=>ZM,matMul:()=>JM});function GM(e,t,n,s,r,a="NHWC",o){let i=e;e.rank===3&&(i=W(e,[1,e.shape[0],e.shape[1],e.shape[2]]));let l=t;l.rank===3&&(l=W(t,[1,t.shape[0],t.shape[1],t.shape[2]])),P(i.rank===4,()=>`Error in conv2dDerFilter: input must be rank 4, but got shape ${i.shape}.`),P(l.rank===4,()=>`Error in conv2dDerFilter: dy must be rank 4, but got shape ${l.shape}.`),P(n.length===4,()=>`Error in conv2dDerFilter: filterShape must be length 4, but got ${n}.`);let u=a==="NHWC"?i.shape[3]:i.shape[1],c=a==="NHWC"?l.shape[3]:l.shape[1];P(u===n[2],()=>`Error in conv2dDerFilter: depth of input ${u}) must match input depth in filter (${n[2]}.`),P(c===n[3],()=>`Error in conv2dDerFilter: depth of dy (${c}) must match output depth for filter (${n[3]}).`),us("conv2dDerFilter",r,o);let p={x:i,dy:l},d={strides:s,pad:r,dataFormat:a,dimRoundingMode:o,filterShape:n};return L.runKernel(Om,p,d)}var BA=B({conv2DBackpropFilter_:GM});function D0(e,t,n){if(n==null||n==="linear")return e;if(n==="relu")return M(e,ou(t));throw new Error(`Cannot compute gradient for fused activation ${n}.`)}function $0(e,t){let n=t,s=on(e.shape,t.shape);return s.length>0&&(n=ve(n,s)),W(n,e.shape)}function P0(e,t,n,s){if(t==="linear")return e;if(t==="relu")return Lr(e);if(t==="elu")return Uc(e);if(t==="relu6")return x0(e);if(t==="prelu")return uh(e,n);if(t==="leakyrelu")return sh(e,s);if(t==="sigmoid")return Mn(e);throw new Error(`Unknown fused activation ${t}.`)}var F0=(e,t)=>!(e>0)||t==="linear";function HM({x:e,filter:t,strides:n,pad:s,dataFormat:r="NHWC",dilations:a=[1,1],dimRoundingMode:o,bias:i,activation:l="linear",preluActivationWeights:u,leakyreluAlpha:c}){if(l=l||"linear",F0(L.state.gradientDepth,l)===!1){P(r==="NHWC",()=>`Error in fused conv2d: got dataFormat of ${r} but only NHWC is currently supported for the case of gradient depth is 0 and the activation is not linear.`);let k=ka(e,t,n,s,r,a,o);return i!=null&&(k=le(k,i)),P0(k,l,u,c)}let p=_(e,"x","conv2d","float32"),d=_(t,"filter","conv2d","float32"),h=p,f=!1;p.rank===3&&(f=!0,h=W(p,[1,p.shape[0],p.shape[1],p.shape[2]])),P(h.rank===4,()=>`Error in fused conv2d: input must be rank 4, but got rank ${h.rank}.`),P(d.rank===4,()=>`Error in fused conv2d: filter must be rank 4, but got rank ${d.rank}.`),us("fused conv2d",s,o);let m=r==="NHWC"?h.shape[3]:h.shape[1];P(d.shape[2]===m,()=>`Error in conv2d: depth of input (${m}) must match input depth for filter ${d.shape[2]}.`),P(aa(n,a),()=>`Error in conv2D: Either strides or dilations must be 1. Got strides ${n} and dilations '${a}'`);let g=Qp(h.shape,d.shape,n,a,s,o),y;i!=null&&(y=_(i,"bias","fused conv2d"),[y]=jt(y,p),r==="NHWC"?vt(g.outShape,y.shape):(P(y.shape.length<=1,()=>`Error in fused conv2d: only supports scalar or 1-D Tensor bias for NCHW format but got the bias of rank-${y.shape.length}.`),P(y.shape.length===0||y.shape[0]===g.outChannels||y.shape[0]===1,()=>`Error in fused conv2d: bias shape (${y.shape}) is not compatible with the number of output channels (${g.outChannels})`)));let x;if(u!=null){let k=u.shape;if(P(k.length<=1||k.length===3,()=>`Error in fused conv2d: only supports scalar, 1-D Tensor or 3-D Tensor PReLU activation weights but got a tensor of rank-${k.length}.`),k.length===1)P(k[0]===1||k[0]===g.outChannels,()=>`Error in fused conv2d: PReLU activation weights (${k}) is not compatible with the number of output channels (${g.outChannels}).`);else if(k.length===3)try{vt(k,g.outShape)}catch(C){let N=`Error in fused conv2d: PReLU activation weights (${k}) is not compatible with the output shape of the conv2d (${g.outShape}).`;throw Error(N)}x=_(u,"prelu weights","fused conv2d")}let A=(k,C)=>{P(r==="NHWC",()=>`Error in gradient of fused conv2D: got dataFormat of ${r} but only NHWC is currently supported.`);let[N,R,D,E]=C,$=D0(k,D,l);P(ao(a),()=>`Error in gradient of fused conv2D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '${a}'`);let S=oA(R.shape,$,N,n,s),F=BA(R,$,N.shape,n,s),z=[S,F];if(E!=null){let V=$0(E,$);z.push(V)}return z},b={x:h,filter:d,bias:y,preluActivationWeights:x},w={strides:n,pad:s,dataFormat:r,dilations:a,dimRoundingMode:o,activation:l,leakyreluAlpha:c};return i==null?na((C,N,R)=>{let D=L.runKernel(so,b,w);return R([N,C,D]),f&&(D=W(D,[D.shape[1],D.shape[2],D.shape[3]])),{value:D,gradFunc:A}})(h,d):na((C,N,R,D)=>{let E=L.runKernel(so,b,w);return D([N,C,E,R]),f&&(E=W(E,[E.shape[1],E.shape[2],E.shape[3]])),{value:E,gradFunc:A}})(h,d,y)}var jM=B({fusedConv2d_:HM});function qM(e,t,n,s,r,a=[1,1],o){let i=e;e.rank===3&&(i=W(e,[1,e.shape[0],e.shape[1],e.shape[2]]));let l=t;l.rank===3&&(l=W(t,[1,t.shape[0],t.shape[1],t.shape[2]]));let u={x:i,dy:l},c={strides:s,pad:r,dimRoundingMode:o,dilations:a,filterShape:n};return L.runKernel(Bm,u,c)}var Q6=B({depthwiseConv2dNativeBackpropFilter_:qM});function XM(e,t,n,s,r,a=[1,1],o){let i=t,l=!1;t.rank===3&&(l=!0,i=W(t,[1,t.shape[0],t.shape[1],t.shape[2]]));let u={dy:i,filter:n},c={strides:s,pad:r,dimRoundingMode:o,dilations:a,inputShape:e},p=L.runKernel(Wm,u,c);return l?W(p,[p.shape[1],p.shape[2],p.shape[3]]):p}var ek=B({depthwiseConv2dNativeBackpropInput_:XM});function KM({x:e,filter:t,strides:n,pad:s,dataFormat:r="NHWC",dilations:a=[1,1],dimRoundingMode:o,bias:i,activation:l="linear",preluActivationWeights:u,leakyreluAlpha:c}){if(F0(L.state.gradientDepth,l)===!1){let w=Vc(e,t,n,s,r,a,o);return i!=null&&(w=le(w,i)),P0(w,l,u,c)}let p=_(e,"x","depthwiseConv2d","float32"),d=_(t,"filter","depthwiseConv2d","float32"),h=p,f=!1;p.rank===3&&(f=!0,h=W(p,[1,p.shape[0],p.shape[1],p.shape[2]])),P(h.rank===4,()=>`Error in fused depthwiseConv2d: input must be rank 4, but got rank ${h.rank}.`),P(d.rank===4,()=>`Error in fused depthwiseConv2d: filter must be rank 4, but got rank ${d.rank}.`),P(h.shape[3]===d.shape[2],()=>`Error in fused depthwiseConv2d: number of input channels (${h.shape[3]}) must match the inChannels dimension in filter ${d.shape[2]}.`),a==null&&(a=[1,1]),P(aa(n,a),()=>`Error in fused depthwiseConv2d: Either strides or dilations must be 1. Got strides ${n} and dilations '${a}'`),us("fused depthwiseConv2d",s,o);let m=Qp(h.shape,d.shape,n,a,s,o,!0),g;i!=null&&(g=_(i,"bias","fused conv2d"),[g]=jt(g,p),vt(m.outShape,g.shape));let y;u!=null&&(y=_(u,"prelu weights","fused depthwiseConv2d"));let x=(w,k)=>{P(ao(a),()=>`Error in gradient of fused depthwiseConv2d: dilation rates greater than 1 are not yet supported. Got dilations '${a}'`);let[C,N,R,D]=k,E=D0(w,R,l),$=ek(N.shape,E,C,n,s,a,o),S=Q6(N,E,C.shape,n,s,a,o);if(D!=null){let F=$0(g,E);return[$,S,F]}return[$,S]},A={x:h,filter:d,bias:g,preluActivationWeights:y},b={strides:n,pad:s,dataFormat:r,dilations:a,dimRoundingMode:o,activation:l,leakyreluAlpha:c};return i==null?na((k,C,N)=>{let R=L.runKernel(ro,A,b);return N([C,k,R]),f&&(R=W(R,[R.shape[1],R.shape[2],R.shape[3]])),{value:R,gradFunc:x}})(h,d):na((k,C,N,R)=>{let D=L.runKernel(ro,A,b);return R([C,k,D,N]),f&&(D=W(D,[D.shape[1],D.shape[2],D.shape[3]])),{value:D,gradFunc:x}})(h,d,g)}var ZM=B({fusedDepthwiseConv2d_:KM});function YM({a:e,b:t,transposeA:n=!1,transposeB:s=!1,bias:r,activation:a="linear",preluActivationWeights:o,leakyreluAlpha:i=.2}){if(F0(L.state.gradientDepth,a)===!1){let E=et(e,t,n,s);return r!=null&&(E=le(E,r)),P0(E,a,o,i)}let l=_(e,"a","fused matMul"),u=_(t,"b","fused matMul");[l,u]=jt(l,u);let c=n?l.shape[l.rank-2]:l.shape[l.rank-1],p=s?u.shape[u.rank-1]:u.shape[u.rank-2],d=n?l.shape[l.rank-1]:l.shape[l.rank-2],h=s?u.shape[u.rank-2]:u.shape[u.rank-1],f=l.shape.slice(0,-2),m=u.shape.slice(0,-2),g=It(f),y=It(m);P(c===p,()=>`Error in fused matMul: inner shapes (${c}) and (${p}) of Tensors with shapes ${l.shape} and ${u.shape} and transposeA=${n} and transposeB=${s} must match.`);let A=vt(l.shape.slice(0,-2),u.shape.slice(0,-2)).concat([d,h]),b=n?W(l,[g,c,d]):W(l,[g,d,c]),w=s?W(u,[y,h,p]):W(u,[y,p,h]),k;r!=null&&(k=_(r,"bias","fused matMul"),[k]=jt(k,l),vt(A,k.shape));let C;o!=null&&(C=_(o,"prelu weights","fused matMul"));let N=(E,$)=>{let[S,F,z,V]=$,j=D0(W(E,z.shape),z,a),G,q;if(!n&&!s?(G=et(j,F,!1,!0),q=et(S,j,!0,!1)):!n&&s?(G=et(j,F,!1,!1),q=et(j,S,!0,!1)):n&&!s?(G=et(F,j,!1,!0),q=et(S,j,!1,!1)):(G=et(F,j,!0,!0),q=et(j,S,!0,!0)),r!=null){let K=$0(V,j);return[G,q,K]}else return[G,q]},R={a:b,b:w,bias:k,preluActivationWeights:C},D={transposeA:n,transposeB:s,activation:a,leakyreluAlpha:i};return r==null?na(($,S,F)=>{let z=L.runKernel(no,R,D);return F([$,S,z]),{value:W(z,A),gradFunc:N}})(b,w):na(($,S,F,z)=>{let V=L.runKernel(no,R,D);return z([$,S,V,F]),{value:W(V,A),gradFunc:N}})(b,w,k)}var JM=B({fusedMatMul_:YM});function QM(e){return _0(e,.54,.46)}var ez=B({hammingWindow_:QM});function tz(e){return _0(e,.5,.5)}var tk=B({hannWindow_:tz});function nz(e,t,n,s=!1,r=0){let a=0,o=[];for(;a+t<=e.size;)o.push(Oe(e,a,t)),a+=n;if(s)for(;a`Error in cropAndResize: image must be rank 4,but got rank ${o.rank}.`),P(i.rank===2&&i.shape[1]===4,()=>`Error in cropAndResize: boxes must be have size [${u},4] but had shape ${i.shape}.`),P(l.rank===1&&l.shape[0]===u,()=>`Error in cropAndResize: boxInd must be have size [${u}] but had shape ${i.shape}.`),P(s.length===2,()=>`Error in cropAndResize: cropSize must be of length 2, but got length ${s.length}.`),P(s[0]>=1&&s[1]>=1,()=>`cropSize must be atleast [1,1], but was ${s}`),P(r==="bilinear"||r==="nearest",()=>`method must be bilinear or nearest, but was ${r}`);let c={image:o,boxes:i,boxInd:l},p={method:r,extrapolationValue:a,cropSize:s};return L.runKernel(gl,c,p)}var oz=B({cropAndResize_:az});function iz(e){let t=_(e,"image","flipLeftRight","float32");P(t.rank===4,()=>`Error in flipLeftRight: image must be rank 4,but got rank ${t.rank}.`);let n={image:t};return L.runKernel(vl,n,{})}var lz=B({flipLeftRight_:iz});function uz(e){let t=_(e,"image","grayscaleToRGB"),n=t.rank-1,s=t.shape[n];P(t.rank>=2,()=>`Error in grayscaleToRGB: images must be at least rank 2, but got rank ${t.rank}.`),P(s===1,()=>`Error in grayscaleToRGB: last dimension of a grayscale image should be size 1, but got size ${s}.`);let r=new Array(t.rank);return r.fill(1,0,n),r[n]=3,As(t,r)}var cz=B({grayscaleToRGB_:uz});function dz(e,t,n=0,s=.5){let r=_(e,"image","rotateWithOffset","float32");P(r.rank===4,()=>`Error in rotateWithOffset: image must be rank 4,but got rank ${r.rank}.`);let a={image:r},o={radians:t,fillValue:n,center:s};return L.runKernel(Ql,a,o)}var pz=B({rotateWithOffset_:dz});function Kc(e,t,n,s,r,a){s==null&&(s=.5),r==null&&(r=Number.NEGATIVE_INFINITY),a==null&&(a=0);let o=e.shape[0];return n=Math.min(n,o),P(0<=s&&s<=1,()=>`iouThreshold must be in [0, 1], but was '${s}'`),P(e.rank===2,()=>`boxes must be a 2D tensor, but was of rank '${e.rank}'`),P(e.shape[1]===4,()=>`boxes must have 4 columns, but 2nd dimension was ${e.shape[1]}`),P(t.rank===1,()=>"scores must be a 1D tensor"),P(t.shape[0]===o,()=>`scores has incompatible shape with boxes. Expected ${o}, but was ${t.shape[0]}`),P(0<=a&&a<=1,()=>`softNmsSigma must be in [0, 1], but was '${a}'`),{maxOutputSize:n,iouThreshold:s,scoreThreshold:r,softNmsSigma:a}}function hz(e,t,n,s=.5,r=Number.NEGATIVE_INFINITY){let a=_(e,"boxes","nonMaxSuppression","float32"),o=_(t,"scores","nonMaxSuppression","float32"),i=Kc(a,o,n,s,r);n=i.maxOutputSize,s=i.iouThreshold,r=i.scoreThreshold;let l={maxOutputSize:n,iouThreshold:s,scoreThreshold:r};return L.runKernel(Dl,{boxes:a,scores:o},l)}var fz=B({nonMaxSuppression_:hz});function mz(e,t,n){let s=gz(e,t,n),r=s<0?-(s+1):s;e.splice(r,0,t)}function gz(e,t,n){return Az(e,t,n||yz)}function yz(e,t){return e>t?1:e>>1);let i=n(t,e[a]);i>0?s=a+1:(r=a,o=!i)}return o?s:-s-1}function sk(e,t,n,s,r){return WA(e,t,n,s,r,0)}function rk(e,t,n,s,r,a){return WA(e,t,n,s,r,0,!1,a,!0)}function ak(e,t,n,s,r,a){return WA(e,t,n,s,r,a,!0)}function WA(e,t,n,s,r,a,o=!1,i=!1,l=!1){let u=[];for(let g=0;gr&&u.push({score:t[g],boxIndex:g,suppressBeginIndex:0});u.sort(vv);let c=a>0?-.5/a:0,p=[],d=[];for(;p.length0;){let g=u.pop(),{score:y,boxIndex:x,suppressBeginIndex:A}=g;if(y=A;--w){let k=xz(e,x,p[w]);if(k>=s){b=!0;break}if(g.score=g.score*bz(s,c,k),g.score<=r)break}g.suppressBeginIndex=p.length,b||(g.score===y?(p.push(x),d.push(g.score)):g.score>r&&mz(u,g,vv))}let h=p.length,f=n-h;i&&f>0&&(p.push(...new Array(f).fill(0)),d.push(...new Array(f).fill(0)));let m={selectedIndices:p};return o&&(m.selectedScores=d),l&&(m.validOutputs=h),m}function xz(e,t,n){let s=e.subarray(t*4,t*4+4),r=e.subarray(n*4,n*4+4),a=Math.min(s[0],s[2]),o=Math.min(s[1],s[3]),i=Math.max(s[0],s[2]),l=Math.max(s[1],s[3]),u=Math.min(r[0],r[2]),c=Math.min(r[1],r[3]),p=Math.max(r[0],r[2]),d=Math.max(r[1],r[3]),h=(i-a)*(l-o),f=(p-u)*(d-c);if(h<=0||f<=0)return 0;let m=Math.max(a,u),g=Math.max(o,c),y=Math.min(i,p),x=Math.min(l,d),A=Math.max(y-m,0)*Math.max(x-g,0);return A/(h+f-A)}function bz(e,t,n){let s=Math.exp(t*n*n);return n<=e?s:0}function vv(e,t){return e.score-t.score||e.score===t.score&&t.boxIndex-e.boxIndex}async function vz(e,t,n,s=.5,r=Number.NEGATIVE_INFINITY){let a=_(e,"boxes","nonMaxSuppressionAsync"),o=_(t,"scores","nonMaxSuppressionAsync"),i=Kc(a,o,n,s,r);n=i.maxOutputSize,s=i.iouThreshold,r=i.scoreThreshold;let l=await Promise.all([a.data(),o.data()]),u=l[0],c=l[1],{selectedIndices:p}=sk(u,c,n,s,r);return a!==e&&a.dispose(),o!==t&&o.dispose(),Ot(p,"int32")}var wz=vz;function kz(e,t,n,s=.5,r=Number.NEGATIVE_INFINITY,a=0){let o=_(e,"boxes","nonMaxSuppression"),i=_(t,"scores","nonMaxSuppression"),l=Kc(o,i,n,s,r,a);n=l.maxOutputSize,s=l.iouThreshold,r=l.scoreThreshold,a=l.softNmsSigma;let u={boxes:o,scores:i},c={maxOutputSize:n,iouThreshold:s,scoreThreshold:r,softNmsSigma:a},p=L.runKernel($l,u,c);return{selectedIndices:p[0],selectedScores:p[1]}}var Sz=B({nonMaxSuppressionWithScore_:kz});async function Iz(e,t,n,s=.5,r=Number.NEGATIVE_INFINITY,a=0){let o=_(e,"boxes","nonMaxSuppressionAsync"),i=_(t,"scores","nonMaxSuppressionAsync"),l=Kc(o,i,n,s,r,a);n=l.maxOutputSize,s=l.iouThreshold,r=l.scoreThreshold,a=l.softNmsSigma;let u=await Promise.all([o.data(),i.data()]),c=u[0],p=u[1],{selectedIndices:d,selectedScores:h}=ak(c,p,n,s,r,a);return o!==e&&o.dispose(),i!==t&&i.dispose(),{selectedIndices:Ot(d,"int32"),selectedScores:Ot(h)}}var Cz=Iz;function Tz(e,t,n,s=.5,r=Number.NEGATIVE_INFINITY,a=!1){let o=_(e,"boxes","nonMaxSuppression"),i=_(t,"scores","nonMaxSuppression"),l=Kc(o,i,n,s,r,null),u=l.maxOutputSize,c=l.iouThreshold,p=l.scoreThreshold,d={boxes:o,scores:i},h={maxOutputSize:u,iouThreshold:c,scoreThreshold:p,padToMaxOutputSize:a},f=L.runKernel(Dc,d,h);return{selectedIndices:f[0],validOutputs:f[1]}}var Nz=B({nonMaxSuppressionPadded_:Tz});async function Ez(e,t,n,s=.5,r=Number.NEGATIVE_INFINITY,a=!1){let o=_(e,"boxes","nonMaxSuppressionAsync"),i=_(t,"scores","nonMaxSuppressionAsync"),l=Kc(o,i,n,s,r,null),u=l.maxOutputSize,c=l.iouThreshold,p=l.scoreThreshold,[d,h]=await Promise.all([o.data(),i.data()]),{selectedIndices:f,validOutputs:m}=rk(d,h,u,c,p,a);return o!==e&&o.dispose(),i!==t&&i.dispose(),{selectedIndices:Ot(f,"int32"),validOutputs:Ce(m,"int32")}}var Rz=Ez;function _z(e,t,n=!1,s=!1){let r=_(e,"images","resizeBilinear");P(r.rank===3||r.rank===4,()=>`Error in resizeBilinear: x must be rank 3 or 4, but got rank ${r.rank}.`),P(t.length===2,()=>`Error in resizeBilinear: new shape must 2D, but got shape ${t}.`),P(s===!1||n===!1,()=>"Error in resizeBilinear: If halfPixelCenters is true, alignCorners must be false.");let a=r,o=!1;r.rank===3&&(o=!0,a=W(r,[1,r.shape[0],r.shape[1],r.shape[2]]));let[]=t,i={images:a},l={alignCorners:n,halfPixelCenters:s,size:t},u=L.runKernel(Jo,i,l);return o?W(u,[u.shape[1],u.shape[2],u.shape[3]]):u}var ok=B({resizeBilinear_:_z});function Dz(e,t,n=!1,s=!1){let r=_(e,"images","resizeNearestNeighbor");P(r.rank===3||r.rank===4,()=>`Error in resizeNearestNeighbor: x must be rank 3 or 4, but got rank ${r.rank}.`),P(t.length===2,()=>`Error in resizeNearestNeighbor: new shape must 2D, but got shape ${t}.`),P(r.dtype==="float32"||r.dtype==="int32",()=>"`images` must have `int32` or `float32` as dtype"),P(s===!1||n===!1,()=>"Error in resizeNearestNeighbor: If halfPixelCenters is true, alignCorners must be false.");let a=r,o=!1;r.rank===3&&(o=!0,a=W(r,[1,r.shape[0],r.shape[1],r.shape[2]]));let[]=t,i={images:a},l={alignCorners:n,halfPixelCenters:s,size:t},u=L.runKernel(Yo,i,l);return o?W(u,[u.shape[1],u.shape[2],u.shape[3]]):u}var ik=B({resizeNearestNeighbor_:Dz});function $z(e,t="binary",n=!1,s=.5){let r=_(e,"image","threshold"),a=.2989,o=.587,i=.114,l=r.shape[0]*r.shape[1],u=M(Ot([s]),255),c,p,d,h;if(P(r.rank===3,()=>`Error in threshold: image must be rank 3,but got rank ${r.rank}.`),P(r.shape[2]===3||r.shape[2]===1,()=>`Error in threshold: image color channel must be equal to 3 or 1but got ${r.shape[2]}.`),P(r.dtype==="int32"||r.dtype==="float32",()=>`Error in dtype: image dtype must be int32 or float32,but got dtype ${r.dtype}.`),P(t==="otsu"||t==="binary",()=>`Method must be binary or otsu, but was ${t}`),r.shape[2]===3){[c,p,d]=Ht(r,[1,1,1],-1);let g=M(c,a),y=M(p,o),x=M(d,i);h=le(le(g,y),x)}else h=e;if(t==="otsu"){let g=tA(me(b0(h),"int32"),Ue([]),256);u=Pz(g,l)}let f=n?hi(h,u):ks(h,u);return me(M(f,255),"int32")}function Pz(e,t){let n=Ot([-1]),s=Ot([0]),r=Ot([0]),a,o,i,l,u,c;for(let p=0;p`Error in transform: image must be rank 4,but got rank ${o.rank}.`),P(i.rank===2&&(i.shape[0]===o.shape[0]||i.shape[0]===1)&&i.shape[1]===8,()=>"Error in transform: Input transform should be batch x 8 or 1 x 8"),P(a==null||a.length===2,()=>`Error in transform: outputShape must be [height, width] or null, but got ${a}.`);let l={image:o,transforms:i},u={interpolation:n,fillMode:s,fillValue:r,outputShape:a};return L.runKernel(Zl,l,u)}var Mz=B({transform_:Oz});function zz(e,t,n){P(t%1===0,()=>`bandPart(): numLower must be an integer, got ${t}.`),P(n%1===0,()=>`bandPart(): numUpper must be an integer, got ${n}.`);let s=_(e,"a","bandPart");P(s.rank>=2,()=>`bandPart(): Rank must be at least 2, got ${s.rank}.`);let r=s.shape,[a,o]=s.shape.slice(-2);if(!(t<=a))throw new Error(`bandPart(): numLower (${t}) must not be greater than the number of rows (${a}).`);if(!(n<=o))throw new Error(`bandPart(): numUpper (${n}) must not be greater than the number of columns (${o}).`);t<0&&(t=a),n<0&&(n=o);let i=W(nc(0,a,1,"int32"),[-1,1]),l=nc(0,o,1,"int32"),u=ye(i,l),c=gr(hi(u,Ce(+t,"int32")),pi(u,Ce(-n,"int32"))),p=Vt([a,o],s.dtype);return W(ln(bn(W(s,[-1,a,o])).map(d=>qn(c,d,p))),r)}var Lz=B({bandPart_:zz});function Bz(e){let t;if(Array.isArray(e)){t=!1,P(e!=null&&e.length>0,()=>"Gram-Schmidt process: input must not be null, undefined, or empty");let r=e[0].shape[0];for(let a=1;a`Gram-Schmidt: Non-unique lengths found in the input vectors: (${e[a].shape[0]} vs. ${r})`)}else t=!0,e=Ht(e,e.shape[0],0).map(r=>Ge(r,[0]));P(e.length<=e[0].shape[0],()=>`Gram-Schmidt: Number of vectors (${e.length}) exceeds number of dimensions (${e[0].shape[0]}).`);let n=[],s=e;for(let r=0;r{let a=s[r];if(r>0)for(let o=0;o=2,()=>`qr() requires input tensor to have a rank >= 2, but got rank ${e.rank}`),e.rank===2)return wv(e,t);{let n=e.shape.slice(0,e.shape.length-2).reduce((l,u)=>l*u),s=bn(W(e,[n,e.shape[e.shape.length-2],e.shape[e.shape.length-1]]),0),r=[],a=[];s.forEach(l=>{let[u,c]=wv(l,t);r.push(u),a.push(c)});let o=W(ln(r,0),e.shape),i=W(ln(a,0),e.shape);return[o,i]}}function wv(e,t=!1){return L.tidy(()=>{P(e.shape.length===2,()=>`qr2d() requires a 2D Tensor, but got a ${e.shape.length}D Tensor.`);let n=e.shape[0],s=e.shape[1],r=d0(n),a=Hn(e),o=mr([[1]],[1,1]),i=Hn(o),l=n>=s?s:n;for(let u=0;u{let h=Oe(a,[u,u],[n-u,1]),f=Gc(h),m=Oe(a,[u,u],[1,1]),g=qn(ks(m,0),mr([[-1]]),mr([[1]])),y=ye(m,M(g,f)),x=ge(h,y);x.shape[0]===1?i=Hn(o):i=ut([o,Oe(x,[1,0],[x.shape[0]-1,x.shape[1]])],0);let A=Dt(ge(et(g,y),f)),b=Oe(a,[u,0],[n-u,s]),w=M(A,i),k=tt(i);if(u===0)a=ye(b,et(w,et(k,b)));else{let R=ye(b,et(w,et(k,b)));a=ut([Oe(a,[0,0],[u,s]),R],0)}let C=tt(w),N=Oe(r,[0,u],[n,r.shape[1]-u]);if(u===0)r=ye(N,et(et(N,i),C));else{let R=ye(N,et(et(N,i),C));r=ut([Oe(r,[0,0],[n,u]),R],1)}return[i,a,r]}),Y([c,p,d])}return!t&&n>s&&(r=Oe(r,[0,0],[n,s]),a=Oe(a,[0,0],[s,s])),[r,a]})}var Uz=B({qr_:Vz}),rs;(function(e){e[e.NONE=0]="NONE",e[e.MEAN=1]="MEAN",e[e.SUM=2]="SUM",e[e.SUM_BY_NONZERO_WEIGHTS=3]="SUM_BY_NONZERO_WEIGHTS"})(rs||(rs={}));function Gz(e,t,n=rs.SUM_BY_NONZERO_WEIGHTS){let s=_(e,"losses","computeWeightedLoss"),r=null;t!=null&&(r=_(t,"weights","computeWeightedLoss"));let a=r==null?s:M(s,r);if(n===rs.NONE)return a;if(n===rs.SUM)return ve(a);if(n===rs.MEAN){if(r==null)return Wt(a);{let o=s.size/r.size,i=ge(ve(a),ve(r));return o>1?ge(i,Ce(o)):i}}if(n===rs.SUM_BY_NONZERO_WEIGHTS){if(r==null)return ge(ve(a),Ce(s.size));{let o=M(r,Ds(s.shape)),i=me(ve(sl(o,Ce(0))),"float32");return ge(ve(a),i)}}throw Error(`Unknown reduction: ${n}`)}var Ra=B({computeWeightedLoss_:Gz});function Hz(e,t,n,s=rs.SUM_BY_NONZERO_WEIGHTS){let r=_(e,"labels","absoluteDifference"),a=_(t,"predictions","absoluteDifference"),o=null;n!=null&&(o=_(n,"weights","absoluteDifference")),ls(r.shape,a.shape,"Error in absoluteDifference: ");let i=rn(ye(r,a));return Ra(i,o,s)}var jz=B({absoluteDifference_:Hz});function qz(e,t,n,s,r=rs.SUM_BY_NONZERO_WEIGHTS){let a=_(e,"labels","cosineDistance"),o=_(t,"predictions","cosineDistance"),i=null;s!=null&&(i=_(s,"weights","cosineDistance")),ls(a.shape,o.shape,"Error in cosineDistance: ");let l=Ce(1),u=ye(l,ve(M(a,o),n,!0));return Ra(u,i,r)}var Xz=B({cosineDistance_:qz});function Kz(e,t,n,s=rs.SUM_BY_NONZERO_WEIGHTS){let r=_(e,"labels","hingeLoss"),a=_(t,"predictions","hingeLoss"),o=null;n!=null&&(o=_(n,"weights","hingeLoss")),ls(r.shape,a.shape,"Error in hingeLoss: ");let i=Ce(1);r=ye(M(Ce(2),r),i);let l=Lr(ye(i,M(r,a)));return Ra(l,o,s)}var Zz=B({hingeLoss_:Kz});function Yz(e,t,n,s=1,r=rs.SUM_BY_NONZERO_WEIGHTS){let a=_(e,"labels","huberLoss"),o=_(t,"predictions","huberLoss"),i=null;n!=null&&(i=_(n,"weights","huberLoss")),ls(a.shape,o.shape,"Error in huberLoss: ");let l=Ce(s),u=rn(ye(o,a)),c=qc(u,l),p=ye(u,c),d=le(M(Ce(.5),bt(c)),M(l,p));return Ra(d,i,r)}var Jz=B({huberLoss_:Yz});function Qz(e,t,n,s=1e-7,r=rs.SUM_BY_NONZERO_WEIGHTS){let a=_(e,"labels","logLoss"),o=_(t,"predictions","logLoss"),i=null;n!=null&&(i=_(n,"weights","logLoss")),ls(a.shape,o.shape,"Error in logLoss: ");let l=Ce(1),u=Ce(s),c=Dt(M(a,Ms(le(o,u)))),p=M(ye(l,a),Ms(le(ye(l,o),u))),d=ye(c,p);return Ra(d,i,r)}var eL=B({logLoss_:Qz});function tL(e,t,n,s=rs.SUM_BY_NONZERO_WEIGHTS){let r=_(e,"labels","meanSquaredError"),a=_(t,"predictions","meanSquaredError"),o=null;n!=null&&(o=_(n,"weights","meanSquaredError")),ls(r.shape,a.shape,"Error in meanSquaredError: ");let i=N0(r,a);return Ra(i,o,s)}var nL=B({meanSquaredError_:tL});function sL(e,t){let n=_(e,"labels","sigmoidCrossEntropyWithLogits"),s=_(t,"logits","sigmoidCrossEntropyWithLogits");ls(n.shape,s.shape,"Error in sigmoidCrossEntropyWithLogits: ");let r=Lr(s),a=M(s,n),o=rh(Os(Dt(rn(s))));return le(ye(r,a),o)}function rL(e,t,n,s=0,r=rs.SUM_BY_NONZERO_WEIGHTS){let a=_(e,"multiClassLabels","sigmoidCrossEntropy"),o=_(t,"logits","sigmoidCrossEntropy"),i=null;if(n!=null&&(i=_(n,"weights","sigmoidCrossEntropy")),ls(a.shape,o.shape,"Error in sigmoidCrossEntropy: "),s>0){let u=Ce(s),c=Ce(1),p=Ce(.5);a=le(M(a,ye(c,u)),M(p,u))}let l=sL(a,o);return Ra(l,i,r)}var aL=B({sigmoidCrossEntropy_:rL});function oL(e,t,n=-1){if(n===-1&&(n=t.rank-1),n!==t.rank-1)throw Error(`Softmax cross entropy along a non-last dimension is not yet supported. Labels / logits was rank ${t.rank} and dim was ${n}`);return na((r,a,o)=>{let l=m0(a,[n],!0),u=ye(me(a,"float32"),l);o([r,u]);let c=Dt(M(u,r));return{value:ve(c,[n]),gradFunc:(h,f)=>{let[m,g]=f,y=nl(h.shape,[n]);return[M(W(h,y),ye(me(m,"float32"),Os(g))),M(W(h,y),ye(Os(g),me(m,"float32")))]}}})(e,t)}function iL(e,t,n,s=0,r=rs.SUM_BY_NONZERO_WEIGHTS){let a=_(e,"onehotLabels","softmaxCrossEntropy"),o=_(t,"logits","softmaxCrossEntropy"),i=null;if(n!=null&&(i=_(n,"weights","softmaxCrossEntropy")),ls(a.shape,o.shape,"Error in softmaxCrossEntropy: "),s>0){let u=Ce(s),c=Ce(1),p=Ce(a.shape[1]);a=le(M(a,ye(c,u)),ge(u,p))}let l=oL(a,o);return Ra(l,i,r)}var lL=B({softmaxCrossEntropy_:iL});function uL(e,t,n,s){let r=_(e,"indices","sparseFillEmptyRows","int32"),a=_(t,"values","sparseFillEmptyRows"),o=_(n,"denseShape","sparseFillEmptyRows","int32"),i=_(s,"defaultValue","sparseFillEmptyRows",a.dtype);if(r.rank!==2)throw new Error(`Indices should be Tensor2D but received shape + ${r.shape}`);if(a.rank!==1)throw new Error(`Values should be Tensor1D but received shape ${a.shape}`);if(o.rank!==1)throw new Error(`Dense shape should be Tensor1D but received shape ${o.shape}`);if(i.rank!==0)throw new Error(`Default value should be a scalar but received shape ${i.shape}`);let l={indices:r,values:a,denseShape:o,defaultValue:i},u=L.runKernel(zp,l);return{outputIndices:u[0],outputValues:u[1],emptyRowIndicator:u[2],reverseIndexMap:u[3]}}var cL=B({sparseFillEmptyRows_:uL});function dL(e,t,n){let s=_(e,"inputIndices","sparseReshape","int32"),r=_(t,"inputShape","sparseReshape","int32"),a=_(n,"newShape","sparseReshape","int32");if(s.rank!==2)throw new Error(`Input indices should be Tensor2D but received shape + ${s.shape}`);if(r.rank!==1)throw new Error(`Input shape should be Tensor1D but received shape ${r.shape}`);if(a.rank!==1)throw new Error(`New shape should be Tensor1D but received shape ${a.shape}`);let o={inputIndices:s,inputShape:r,newShape:a},i=L.runKernel(Mc,o);return{outputIndices:i[0],outputShape:i[1]}}var pL=B({sparseReshape_:dL});function hL(e,t,n){let s=_(e,"data","sparseSegmentMean"),r=_(t,"indices","sparseSegmentMean","int32"),a=_(n,"segmentIds","sparseSegmentMean","int32");if(s.rank<1)throw new Error("Data should be at least 1 dimensional but received scalar");if(r.rank!==1)throw new Error(`Indices should be Tensor1D but received shape ${r.shape}`);if(a.rank!==1)throw new Error(`Segment ids should be Tensor1D but received shape - ${a.shape}`);let o={data:s,indices:r,segmentIds:a};return B.runKernel(nh,o)}var UL=W({sparseSegmentMean_:VL});function GL(e,t,n){let s=D(e,"data","sparseSegmentSum"),r=D(t,"indices","sparseSegmentSum","int32"),a=D(n,"segmentIds","sparseSegmentSum","int32");if(s.rank<1)throw new Error("Data should be at least 1 dimensional but received scalar");if(r.rank!==1)throw new Error(`Indices should be Tensor1D but received shape + ${a.shape}`);let o={data:s,indices:r,segmentIds:a};return L.runKernel(Lp,o)}var fL=B({sparseSegmentMean_:hL});function mL(e,t,n){let s=_(e,"data","sparseSegmentSum"),r=_(t,"indices","sparseSegmentSum","int32"),a=_(n,"segmentIds","sparseSegmentSum","int32");if(s.rank<1)throw new Error("Data should be at least 1 dimensional but received scalar");if(r.rank!==1)throw new Error(`Indices should be Tensor1D but received shape ${r.shape}`);if(a.rank!==1)throw new Error(`Segment ids should be Tensor1D but received shape - ${a.shape}`);let o={data:s,indices:r,segmentIds:a};return B.runKernel(sh,o)}var HL=W({sparseSegmentSum_:GL});function jL(e,t,n,s,r,a,o,i){let l=D(e,"data","stringNGrams","string");if(l.dtype!=="string")throw new Error("Data must be of datatype string");if(l.shape.length!==1)throw new Error(`Data must be a vector, saw: ${l.shape}`);let u=D(t,"dataSplits","stringNGrams");if(u.dtype!=="int32")throw new Error("Data splits must be of datatype int32");let c={separator:n,nGramWidths:s,leftPad:r,rightPad:a,padWidth:o,preserveShortSequences:i},p={data:l,dataSplits:u},d=B.runKernel(Yc,p,c);return{nGrams:d[0],nGramsSplits:d[1]}}var qL=W({stringNGrams_:jL});function XL(e,t,n=!0){let s=D(e,"input","stringSplit","string"),r=D(t,"delimiter","stringSplit","string");if(s.rank!==1)throw new Error(`Input should be Tensor1D but received shape ${s.shape}`);if(r.rank!==0)throw new Error(`Delimiter should be a scalar but received shape ${r.shape}`);let a={skipEmpty:n},o={input:s,delimiter:r},i=B.runKernel(ah,o,a);return{indices:i[0],values:i[1],shape:i[2]}}var KL=W({stringSplit_:XL});function ZL(e,t){let n=D(e,"input","stringToHashBucketFast","string"),s={numBuckets:t};if(t<=0)throw new Error("Number of buckets must be at least 1");let r={input:n};return B.runKernel(oh,r,s)}var YL=W({stringToHashBucketFast_:ZL}),Sk={fft:Nh,ifft:mc,rfft:Eh,irfft:Z0},Ik={hammingWindow:Ez,hannWindow:yk,frame:Ak,stft:$z},Ce={flipLeftRight:Mz,grayscaleToRGB:Lz,resizeNearestNeighbor:kk,resizeBilinear:wk,rotateWithOffset:Wz,cropAndResize:Fz,nonMaxSuppression:Uz,nonMaxSuppressionAsync:Yz,nonMaxSuppressionWithScore:Qz,nonMaxSuppressionWithScoreAsync:tL,nonMaxSuppressionPadded:sL,nonMaxSuppressionPaddedAsync:aL,threshold:cL,transform:pL},u5={bandPart:fL,gramSchmidt:gL,qr:AL},Ck={absoluteDifference:vL,computeWeightedLoss:Fa,cosineDistance:kL,hingeLoss:IL,huberLoss:TL,logLoss:EL,meanSquaredError:_L,sigmoidCrossEntropy:PL,softmaxCrossEntropy:ML},Tk={sparseFillEmptyRows:LL,sparseReshape:WL,sparseSegmentMean:UL,sparseSegmentSum:HL},Nk={stringNGrams:qL,stringSplit:KL,stringToHashBucketFast:YL},Oa=class extends bw{minimize(e,t=!1,n){let{value:s,grads:r}=this.computeGradients(e,n);if(n!=null){let a=n.map(o=>({name:o.name,tensor:r[o.name]}));this.applyGradients(a)}else this.applyGradients(r);return Q(r),t?s:(s.dispose(),null)}get iterations(){return this.iterations_==null&&(this.iterations_=0),this.iterations_}incrementIterations(){this.iterations_=this.iterations+1}computeGradients(e,t){return zw(e,t)}dispose(){this.iterations_!=null&&Q(this.iterations_)}async saveIterations(){return this.iterations_==null&&(this.iterations_=0),{name:"iter",tensor:Te(this.iterations_,"int32")}}async getWeights(){throw new Error("getWeights() is not implemented for this optimizer yet.")}async setWeights(e){throw new Error(`setWeights() is not implemented for this optimizer class ${this.getClassName()}`)}async extractIterations(e){return this.iterations_=(await e[0].tensor.data())[0],e.slice(1)}};Object.defineProperty(Oa,Symbol.hasInstance,{value:e=>e.minimize!=null&&e.computeGradients!=null&&e.applyGradients!=null});var a2=class extends Oa{constructor(e,t,n=null){super(),this.learningRate=e,this.rho=t,this.epsilon=n,this.accumulatedGrads=[],this.accumulatedUpdates=[],n==null&&(this.epsilon=B.backend.epsilon())}applyGradients(e){(Array.isArray(e)?e.map(n=>n.name):Object.keys(e)).forEach((n,s)=>{let r=B.registeredVariables[n],a=!1;this.accumulatedGrads[s]==null&&(this.accumulatedGrads[s]={originalName:`${n}/accum_grad`,variable:Y(()=>dt(r).variable(a))}),this.accumulatedUpdates[s]==null&&(this.accumulatedUpdates[s]={originalName:`${n}/accum_var`,variable:Y(()=>dt(r).variable(a))});let o=Array.isArray(e)?e[s].tensor:e[n];if(o==null)return;let i=this.accumulatedGrads[s].variable,l=this.accumulatedUpdates[s].variable;Y(()=>{let u=de(z(i,this.rho),z(wt(o),1-this.rho)),c=z(ye(zn(de(l,this.epsilon)),zn(de(i,this.epsilon))),o),p=de(z(l,this.rho),z(wt(c),1-this.rho));i.assign(u),l.assign(p);let d=de(z(c,-this.learningRate),r);r.assign(d)})}),this.incrementIterations()}dispose(){this.accumulatedUpdates!=null&&(Q(this.accumulatedGrads.map(e=>e.variable)),Q(this.accumulatedUpdates.map(e=>e.variable)))}async getWeights(){let e=[...this.accumulatedGrads,...this.accumulatedUpdates];return[await this.saveIterations()].concat(e.map(t=>({name:t.originalName,tensor:t.variable})))}async setWeights(e){e=await this.extractIterations(e);let t=e.length/2,n=!1;this.accumulatedGrads=e.slice(0,t).map(s=>({originalName:s.name,variable:s.tensor.variable(n)})),this.accumulatedUpdates=e.slice(t,t*2).map(s=>({originalName:s.name,variable:s.tensor.variable(n)}))}getConfig(){return{learningRate:this.learningRate,rho:this.rho,epsilon:this.epsilon}}static fromConfig(e,t){return new e(t.learningRate,t.rho,t.epsilon)}};a2.className="Adadelta";fi(a2);var o2=class extends Oa{constructor(e,t=.1){super(),this.learningRate=e,this.initialAccumulatorValue=t,this.accumulatedGrads=[]}applyGradients(e){(Array.isArray(e)?e.map(n=>n.name):Object.keys(e)).forEach((n,s)=>{let r=B.registeredVariables[n];this.accumulatedGrads[s]==null&&(this.accumulatedGrads[s]={originalName:`${n}/accumulator`,variable:Y(()=>ca(r.shape,this.initialAccumulatorValue).variable(!1))});let a=Array.isArray(e)?e[s].tensor:e[n];if(a==null)return;let o=this.accumulatedGrads[s].variable;Y(()=>{let i=de(o,wt(a));o.assign(i);let l=de(z(ye(a,zn(de(i,B.backend.epsilon()))),-this.learningRate),r);r.assign(l)})}),this.incrementIterations()}dispose(){this.accumulatedGrads!=null&&Q(this.accumulatedGrads.map(e=>e.variable))}async getWeights(){return[await this.saveIterations()].concat(this.accumulatedGrads.map(e=>({name:e.originalName,tensor:e.variable})))}async setWeights(e){e=await this.extractIterations(e);let t=!1;this.accumulatedGrads=e.map(n=>({originalName:n.name,variable:n.tensor.variable(t)}))}getConfig(){return{learningRate:this.learningRate,initialAccumulatorValue:this.initialAccumulatorValue}}static fromConfig(e,t){return new e(t.learningRate,t.initialAccumulatorValue)}};o2.className="Adagrad";fi(o2);var i2=class extends Oa{constructor(e,t,n,s=null){super(),this.learningRate=e,this.beta1=t,this.beta2=n,this.epsilon=s,this.accumulatedFirstMoment=[],this.accumulatedSecondMoment=[],Y(()=>{this.accBeta1=Te(t).variable(),this.accBeta2=Te(n).variable()}),s==null&&(this.epsilon=B.backend.epsilon())}applyGradients(e){let t=Array.isArray(e)?e.map(n=>n.name):Object.keys(e);Y(()=>{let n=Ae(1,this.accBeta1),s=Ae(1,this.accBeta2);t.forEach((r,a)=>{let o=B.registeredVariables[r],i=!1;this.accumulatedFirstMoment[a]==null&&(this.accumulatedFirstMoment[a]={originalName:`${r}/m`,variable:Y(()=>dt(o).variable(i))}),this.accumulatedSecondMoment[a]==null&&(this.accumulatedSecondMoment[a]={originalName:`${r}/v`,variable:Y(()=>dt(o).variable(i))});let l=Array.isArray(e)?e[a].tensor:e[r];if(l==null)return;let u=this.accumulatedFirstMoment[a].variable,c=this.accumulatedSecondMoment[a].variable,p=de(z(u,this.beta1),z(l,1-this.beta1)),d=de(z(c,this.beta2),z(wt(l),1-this.beta2)),h=ye(p,n),f=ye(d,s);u.assign(p),c.assign(d);let m=de(z(ye(h,de(zn(f),this.epsilon)),-this.learningRate),o);o.assign(m)}),this.accBeta1.assign(z(this.accBeta1,this.beta1)),this.accBeta2.assign(z(this.accBeta2,this.beta2))}),this.incrementIterations()}dispose(){this.accBeta1.dispose(),this.accBeta2.dispose(),this.accumulatedFirstMoment!=null&&Q(this.accumulatedFirstMoment.map(e=>e.variable)),this.accumulatedSecondMoment!=null&&Q(this.accumulatedSecondMoment.map(e=>e.variable))}async getWeights(){let e=[...this.accumulatedFirstMoment,...this.accumulatedSecondMoment];return[await this.saveIterations()].concat(e.map(t=>({name:t.originalName,tensor:t.variable})))}async setWeights(e){e=await this.extractIterations(e),Y(()=>{this.accBeta1.assign(Ra(this.beta1,this.iterations_+1)),this.accBeta2.assign(Ra(this.beta2,this.iterations_+1))});let t=e.length/2,n=!1;this.accumulatedFirstMoment=e.slice(0,t).map(s=>({originalName:s.name,variable:s.tensor.variable(n)})),this.accumulatedSecondMoment=e.slice(t,t*2).map(s=>({originalName:s.name,variable:s.tensor.variable(n)}))}getConfig(){return{learningRate:this.learningRate,beta1:this.beta1,beta2:this.beta2,epsilon:this.epsilon}}static fromConfig(e,t){return new e(t.learningRate,t.beta1,t.beta2,t.epsilon)}};i2.className="Adam";fi(i2);var l2=class extends Oa{constructor(e,t,n,s=null,r=0){super(),this.learningRate=e,this.beta1=t,this.beta2=n,this.epsilon=s,this.decay=r,this.accumulatedFirstMoment=[],this.accumulatedWeightedInfNorm=[],Y(()=>{this.iteration=Te(0).variable(),this.accBeta1=Te(t).variable()}),s==null&&(this.epsilon=B.backend.epsilon())}applyGradients(e){let t=Array.isArray(e)?e.map(n=>n.name):Object.keys(e);Y(()=>{let n=Ae(1,this.accBeta1),s=ye(-this.learningRate,de(z(this.iteration,this.decay),1));t.forEach((r,a)=>{let o=B.registeredVariables[r],i=!1;this.accumulatedFirstMoment[a]==null&&(this.accumulatedFirstMoment[a]={originalName:`${r}/m`,variable:dt(o).variable(i)}),this.accumulatedWeightedInfNorm[a]==null&&(this.accumulatedWeightedInfNorm[a]={originalName:`${r}/v`,variable:dt(o).variable(i)});let l=Array.isArray(e)?e[a].tensor:e[r];if(l==null)return;let u=this.accumulatedFirstMoment[a].variable,c=this.accumulatedWeightedInfNorm[a].variable,p=de(z(u,this.beta1),z(l,1-this.beta1)),d=z(c,this.beta2),h=an(l),f=da(d,h);u.assign(p),c.assign(f);let m=de(z(ye(s,n),ye(p,de(f,this.epsilon))),o);o.assign(m)}),this.iteration.assign(de(this.iteration,1)),this.accBeta1.assign(z(this.accBeta1,this.beta1))}),this.incrementIterations()}dispose(){this.accBeta1.dispose(),this.iteration.dispose(),this.accumulatedFirstMoment!=null&&Q(this.accumulatedFirstMoment.map(e=>e.variable)),this.accumulatedWeightedInfNorm!=null&&Q(this.accumulatedWeightedInfNorm.map(e=>e.variable))}async getWeights(){throw new Error("getWeights() is not implemented for Adamax yet.")}async setWeights(e){throw new Error("setWeights() is not implemented for Adamax yet.")}getConfig(){return{learningRate:this.learningRate,beta1:this.beta1,beta2:this.beta2,epsilon:this.epsilon,decay:this.decay}}static fromConfig(e,t){return new e(t.learningRate,t.beta1,t.beta2,t.epsilon,t.decay)}};l2.className="Adamax";fi(l2);var Rh=class extends Oa{constructor(e){super(),this.learningRate=e,this.setLearningRate(e)}applyGradients(e){(Array.isArray(e)?e.map(n=>n.name):Object.keys(e)).forEach((n,s)=>{let r=Array.isArray(e)?e[s].tensor:e[n];if(r==null)return;let a=B.registeredVariables[n];Y(()=>{let o=de(z(this.c,r),a);a.assign(o)})}),this.incrementIterations()}setLearningRate(e){this.learningRate=e,this.c!=null&&this.c.dispose(),this.c=Tn(Te(-e))}dispose(){this.c.dispose()}async getWeights(){return[await this.saveIterations()]}async setWeights(e){if(e=await this.extractIterations(e),e.length!==0)throw new Error("SGD optimizer does not have settable weights.")}getConfig(){return{learningRate:this.learningRate}}static fromConfig(e,t){return new e(t.learningRate)}};Rh.className="SGD";fi(Rh);var u2=class extends Rh{constructor(e,t,n=!1){super(e),this.learningRate=e,this.momentum=t,this.useNesterov=n,this.accumulations=[],this.m=Te(this.momentum)}applyGradients(e){(Array.isArray(e)?e.map(n=>n.name):Object.keys(e)).forEach((n,s)=>{let r=B.registeredVariables[n];this.accumulations[s]==null&&(this.accumulations[s]={originalName:`${n}/momentum`,variable:Y(()=>dt(r).variable(!1))});let a=this.accumulations[s].variable,o=Array.isArray(e)?e[s].tensor:e[n];o!=null&&Y(()=>{let i,l=de(z(this.m,a),o);this.useNesterov?i=de(z(this.c,de(o,z(l,this.m))),r):i=de(z(this.c,l),r),a.assign(l),r.assign(i)})}),this.incrementIterations()}dispose(){this.m.dispose(),this.accumulations!=null&&Q(this.accumulations.map(e=>e.variable))}setMomentum(e){this.momentum=e}async getWeights(){return[await this.saveIterations()].concat(this.accumulations.map(e=>({name:e.originalName,tensor:e.variable})))}async setWeights(e){e=await this.extractIterations(e);let t=!1;this.accumulations=e.map(n=>({originalName:n.name,variable:n.tensor.variable(t)}))}getConfig(){return{learningRate:this.learningRate,momentum:this.momentum,useNesterov:this.useNesterov}}static fromConfig(e,t){return new e(t.learningRate,t.momentum,t.useNesterov)}};u2.className="Momentum";fi(u2);var c2=class extends Oa{constructor(e,t=.9,n=0,s=null,r=!1){if(super(),this.learningRate=e,this.decay=t,this.momentum=n,this.epsilon=s,this.accumulatedMeanSquares=[],this.accumulatedMoments=[],this.accumulatedMeanGrads=[],this.centered=r,s==null&&(this.epsilon=B.backend.epsilon()),e==null)throw new Error("learningRate for RMSPropOptimizer must be defined.")}applyGradients(e){(Array.isArray(e)?e.map(n=>n.name):Object.keys(e)).forEach((n,s)=>{let r=B.registeredVariables[n],a=!1;this.accumulatedMeanSquares[s]==null&&(this.accumulatedMeanSquares[s]={originalName:`${n}/rms`,variable:Y(()=>dt(r).variable(a))}),this.accumulatedMoments[s]==null&&(this.accumulatedMoments[s]={originalName:`${n}/momentum`,variable:Y(()=>dt(r).variable(a))}),this.accumulatedMeanGrads[s]==null&&this.centered&&(this.accumulatedMeanGrads[s]={originalName:`${n}/mg`,variable:Y(()=>dt(r).variable(a))});let o=Array.isArray(e)?e[s].tensor:e[n];if(o==null)return;let i=this.accumulatedMeanSquares[s].variable,l=this.accumulatedMoments[s].variable;Y(()=>{let u=de(z(i,this.decay),z(wt(o),1-this.decay));if(this.centered){let c=this.accumulatedMeanGrads[s].variable,p=de(z(c,this.decay),z(o,1-this.decay)),d=ye(z(o,this.learningRate),zn(Ae(u,de(wt(p),this.epsilon)))),h=de(z(l,this.momentum),d);i.assign(u),c.assign(p),l.assign(h);let f=Ae(r,h);r.assign(f)}else{let c=de(z(i,this.decay),z(wt(o),1-this.decay)),p=de(z(l,this.momentum),ye(z(o,this.learningRate),zn(de(c,this.epsilon))));i.assign(c),l.assign(p);let d=Ae(r,p);r.assign(d)}})}),this.incrementIterations()}dispose(){this.accumulatedMeanSquares!=null&&Q(this.accumulatedMeanSquares.map(e=>e.variable)),this.accumulatedMeanGrads!=null&&this.centered&&Q(this.accumulatedMeanGrads.map(e=>e.variable)),this.accumulatedMoments!=null&&Q(this.accumulatedMoments.map(e=>e.variable))}async getWeights(){let e=[...this.accumulatedMeanSquares,...this.accumulatedMoments];return this.centered&&e.push(...this.accumulatedMeanGrads),[await this.saveIterations()].concat(e.map(t=>({name:t.originalName,tensor:t.variable})))}async setWeights(e){e=await this.extractIterations(e);let t=this.centered?e.length/3:e.length/2,n=!1;this.accumulatedMeanSquares=e.slice(0,t).map(s=>({originalName:s.name,variable:s.tensor.variable(n)})),this.accumulatedMoments=e.slice(t,t*2).map(s=>({originalName:s.name,variable:s.tensor.variable(n)})),this.centered&&(this.accumulatedMeanGrads=e.slice(t*2,t*3).map(s=>({originalName:s.name,variable:s.tensor.variable(n)})))}getConfig(){return{learningRate:this.learningRate,decay:this.decay,momentum:this.momentum,epsilon:this.epsilon,centered:this.centered}}static fromConfig(e,t){return new e(t.learningRate,t.decay,t.momentum,t.epsilon,t.centered)}};c2.className="RMSProp";fi(c2);var Ka=class{static sgd(e){return new Rh(e)}static momentum(e,t,n=!1){return new u2(e,t,n)}static rmsprop(e,t=.9,n=0,s=null,r=!1){return new c2(e,t,n,s,r)}static adam(e=.001,t=.9,n=.999,s=null){return new i2(e,t,n,s)}static adadelta(e=.001,t=.95,n=null){return new a2(e,t,n)}static adamax(e=.002,t=.9,n=.999,s=null,r=0){return new l2(e,t,n,s,r)}static adagrad(e,t=.1){return new o2(e,t)}},ji={sgd:Ka.sgd,momentum:Ka.momentum,adadelta:Ka.adadelta,adagrad:Ka.adagrad,rmsprop:Ka.rmsprop,adamax:Ka.adamax,adam:Ka.adam},JL=(()=>typeof requestAnimationFrame!="undefined"?requestAnimationFrame:typeof setImmediate!="undefined"?setImmediate:e=>e())();function c5(){return new Promise(e=>JL(()=>e()))}var T={};qe(T,{ERF_A1:()=>hB,ERF_A2:()=>fB,ERF_A3:()=>mB,ERF_A4:()=>gB,ERF_A5:()=>yB,ERF_P:()=>pB,PARALLELIZE_THRESHOLD:()=>d5,RowPartitionType:()=>Jr,SELU_SCALE:()=>Rk,SELU_SCALEALPHA:()=>Ek,applyActivation:()=>s2,assertAndGetBroadcastShape:()=>St,assertAxesAreInnerMostDims:()=>aO,assertParamsConsistent:()=>QL,assignToTypedArray:()=>kB,axesAreInnerMostDims:()=>FA,calculateShapes:()=>cw,checkEinsumDimSizes:()=>EB,checkPadOnDimRoundingMode:()=>ps,combineLocations:()=>$w,combineRaggedTensorToTensorShapes:()=>tB,complexWithEvenIndex:()=>bB,complexWithOddIndex:()=>vB,computeConv2DInfo:()=>gh,computeConv3DInfo:()=>Iw,computeDefaultPad:()=>yA,computeDilation2DInfo:()=>oF,computeOptimalWindowSize:()=>aB,computeOutAndReduceShapes:()=>Pw,computeOutShape:()=>eB,computePool2DInfo:()=>Sw,computePool3DInfo:()=>iF,convertConv2DDataFormat:()=>Cw,decodeEinsumEquation:()=>TB,eitherStridesOrDilationsAreOne:()=>ua,expandShapeToKeepDim:()=>cl,exponent:()=>IB,exponents:()=>SB,fromStringArrayToUint8:()=>ZB,fromUint8ToStringArray:()=>KB,getAxesPermutation:()=>Fw,getBroadcastDims:()=>iw,getComplexWithIndex:()=>wB,getEinsumComputePath:()=>RB,getEinsumPermutation:()=>NB,getFusedBiasGradient:()=>n2,getFusedDyActivation:()=>t2,getImageCenter:()=>oB,getInnerMostAxes:()=>oO,getPermuted:()=>lB,getRaggedRank:()=>sB,getReductionAxes:()=>ln,getReshaped:()=>iB,getReshapedPermuted:()=>uB,getRowPartitionTypesHelper:()=>nB,getSliceBeginCoords:()=>cB,getSliceSize:()=>dB,getSparseFillEmptyRowsIndicesDenseShapeMismatch:()=>PB,getSparseFillEmptyRowsNegativeIndexErrorMessage:()=>FB,getSparseFillEmptyRowsOutOfRangeIndexErrorMessage:()=>OB,getSparseReshapeEmptyTensorZeroOutputDimErrorMessage:()=>LB,getSparseReshapeInputOutputMismatchErrorMessage:()=>WB,getSparseReshapeInputOutputMultipleErrorMessage:()=>BB,getSparseReshapeMultipleNegativeOneOutputDimErrorMessage:()=>MB,getSparseReshapeNegativeOutputDimErrorMessage:()=>zB,getSparseSegmentReductionIndicesOutOfRangeErrorMessage:()=>HB,getSparseSegmentReductionNegativeSegmentIdsErrorMessage:()=>VB,getSparseSegmentReductionNonIncreasingSegmentIdsErrorMessage:()=>UB,getSparseSegmentReductionSegmentIdOutOfRangeErrorMessage:()=>GB,getUndoAxesPermutation:()=>OA,isIdentityPermutation:()=>_B,log:()=>ED,mergeRealAndImagArrays:()=>AB,prepareAndValidate:()=>uw,prepareSplitSize:()=>$B,segment_util:()=>_k,shouldFuse:()=>r2,slice_util:()=>jt,splitRealAndImagArrays:()=>xB,tupleValuesAreOne:()=>lo,upcastType:()=>Hn,validateDefaultValueShape:()=>rB,validateInput:()=>aA,validateUpdateShape:()=>rA,warn:()=>Ya});function QL(e,t){let n=e[0].length;e.forEach((r,a)=>{O(r.length===n,()=>`Error in concat${n}D: rank of tensors[${a}] must be the same as the rank of the rest (${n})`)}),O(t>=0&&t`Error in concat${n}D: axis must be between 0 and ${n-1}.`);let s=e[0];e.forEach((r,a)=>{for(let o=0;o`Error in concat${n}D: Shape of tensors[${a}] (${r}) does not match the shape of the rest (${s}) along the non-concatenated axis ${a}.`)})}function eB(e,t){let n=e[0].slice();for(let s=1;s=0)if(i>=0){if(i!==a)throw new Error(`rt input.shape and shape=${t} are incompatible: rt input.shape[${r+e}] = ${a} but shape[${r+e}] = ${i}`)}else s[o]=a}return s}function nB(e){let t={FIRST_DIM_SIZE:Jr.FIRST_DIM_SIZE,VALUE_ROWIDS:Jr.VALUE_ROWIDS,ROW_LENGTHS:Jr.ROW_LENGTHS,ROW_SPLITS:Jr.ROW_SPLITS,ROW_LIMITS:Jr.ROW_LIMITS,ROW_STARTS:Jr.ROW_STARTS},n=[];for(let s of e)if(s in t)n.push(t[s]);else break;return n}function sB(e){return e.length===0?0:e[0]===Jr.FIRST_DIM_SIZE?e.length-1:e.length}function rB(e,t){if(e==null||t==null)return;let n=e.length,s=t.length;if(n>=s)throw new Error(`defaultValue.shape=${e} and ragged tensor flatValues.shape=${t}, are incompatible: defaultValue.rank = ${n} must be less than ragged tensor input flatValues.rank = ${s})`);for(let r=0;r=0&&o>=0&&a!==1&&a!==o)throw new Error(`defaultValue.shape=${e}, and ragged tensor input flatValues.shape=${t} are incompatible: defaultValue.shape[${r-e.length}] = ${a} but ragged tensor input.flatValues.shape[${r-e.length}] = ${o}`)}}var d5=30;function aB(e){return e<=d5?e:km(e,Math.floor(Math.sqrt(e)))}function oB(e,t,n){let s=n*(typeof e=="number"?e:e[0]),r=t*(typeof e=="number"?e:e[1]);return[s,r]}function iB(e,t,n,s=!0){let r=[];if(s)r=r.concat(t.slice(0)),r.push(e[0]/n),r=r.concat(e.slice(1));else{r=r.concat(e[0]);let a=t.length;for(let o=0;o=t*2+1||o%2===1?a.push(o):r.push(o);s.push(...r),s.push(0),s.push(...a)}return s}function uB(e,t,n,s=!0){let r=[];s?r.push(e[0]/n):r.push(e[0]*n);for(let a=1;a/g,Hv=",",jv="...";function TB(e,t){e=e.replace(/\s/g,"");let n=(e.length-e.replace(CB,"").length)/w3.length;if(n<1)throw new Error("Equations without an arrow are not supported.");if(n>1)throw new Error(`Equation must contain exactly one arrow ("${w3}").`);let[s,r]=e.split(w3);O(s.indexOf(jv)===-1,()=>`The ellipsis notation ("${jv}") is not supported yet.`);let a=s.split(Hv),o=a.length;if(t!==o)throw new Error(`Expected ${o} input tensors, received ${t}`);if(o>2)throw new Error("Support for more than 2 input tensors is not implemented yet.");let i=[];for(let d=0;df.indexOf(h)!==-1))throw new Error(`Output subscripts contain the label ${h} not present in the input subscripts.`);i.indexOf(h)===-1&&i.push(h)}for(let d=0;dr!==-1),{permutationIndices:n,expandDims:s}}function EB(e,t,n){let s=new Array(e);for(let r=0;r`Expected dimension ${s[t[r][o]]} at axis ${o} of input shaped ${JSON.stringify(a)}, but got dimension ${a[o]}`)}}function RB(e,t){let n=e,s=[],r=0;e.length===0&&n.push(-1),r=e.length+1;for(let o=0;ot===n)}function DB(e,t){let n=[];for(let s=0;s"Number of splits must evenly divide the axis."),s=new Array(t).fill(e.shape[n]/t);else{let r=t.reduce((o,i)=>(i===-1&&(o+=1),o),0);O(r<=1,()=>"There should be only one negative value in split array.");let a=t.indexOf(-1);if(a!==-1){let o=t.reduce((i,l)=>l>0?i+l:i);t[a]=e.shape[n]-o}O(e.shape[n]===t.reduce((o,i)=>o+i),()=>"The sum of sizes must match the size of the axis dimension."),s=t}return s}function PB(e){return`Received SparseTensor with denseShape[0] = 0 but - indices.shape[0] = ${e}`}function FB(e,t){return`indices(${e}, 0) is invalid: ${t} < 0`}function OB(e,t,n){return`indices(${e}, 0) is invalid: ${t} >= ${n}`}function MB(e,t){return`only one output dimension may be -1, not both ${e} and ${t}`}function zB(e,t){return`size ${e} must be non-negative, not ${t}`}function LB(){return"reshape cannot infer the missing input size for an empty tensor unless all specified input sizes are non-zero"}function BB(e,t){let n=Et(e),s=Et(t);return`Input to reshape is a SparseTensor with ${n} - dense values, but the requested shape requires a multiple of ${s}. inputShape=${e} outputShape= ${t}`}function WB(e,t){let n=Et(e),s=Et(t);return`Input to reshape is a tensor with ${n} dense values, but the requested shape has ${s}. inputShape=${e} outputShape=${t}`}function VB(){return"segment ids must be >= 0"}function UB(){return"segment ids are not increasing"}function GB(e,t){return`Segment id ${e} out of range [0, ${t}), possibly because segmentIds input is not sorted.`}function HB(e,t,n){return`Bad: indices[${e}] == ${t} out of range [0, ${n})`}var _k={};qe(_k,{collectGatherOpShapeInfo:()=>XB,computeOutShape:()=>qB,segOpComputeOptimalWindowSize:()=>jB});function jB(e,t){let n=!1,s;for(e<=d5?(s=e,n=!0):s=km(e,Math.floor(Math.sqrt(e)));!n;)s>t||s===e?n=!0:s=km(e,s+1);return s}function qB(e,t,n){let s=[],r=e.length;for(let a=0;ar))throw new Error(`Expect batchDims in the range of [-${r}, ${r}], but got ${s}`);if(s<0&&(s+=r),s>a)throw new Error(`batchDims (${s}) must be less than rank(x) ( - ${a}).`);if(nTm(t))}catch(t){throw new Error(`Failed to decode encoded string bytes into utf-8, error: ${t}`)}}function ZB(e){return e.map(t=>uh(t))}var Ar={};qe(Ar,{nonMaxSuppressionV3Impl:()=>xk,nonMaxSuppressionV4Impl:()=>bk,nonMaxSuppressionV5Impl:()=>vk,whereImpl:()=>lk});var Dk={kernelName:xl,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>z(e,fu(ge(n,"float32"),-1))}}},YB={kernelName:Nc,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>{let s=wt(ge(n,"float32")),r=zn(Ae(Te(1),s));return Pt(ye(e,r))}}}},JB={kernelName:Ec,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>{let s=zn(Ae(wt(ge(n,"float32")),1));return ye(e,s)}}}},QB={kernelName:Da,inputsToSave:["a","b"],gradFunc:(e,t)=>{let[n,s]=t,r=St(n.shape,s.shape);return{a:()=>{let i=e,l=ln(n.shape,r);return l.length>0&&(i=Se(i,l)),V(i,n.shape)},b:()=>{let i=e,l=ln(s.shape,r);return l.length>0&&(i=Se(i,l)),V(i,s.shape)}}}},eW={kernelName:xo,saveAllInputs:!0,gradFunc:(e,t)=>{let n={};return t.forEach((s,r)=>{n[r]=()=>e.clone()}),n}},tW={kernelName:bo,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>dt(n)}}},nW={kernelName:Dc,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>dt(n)}}},sW={kernelName:$c,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>ye(e,zn(Ae(Te(1),wt(ge(n,"float32")))))}}},rW={kernelName:Pc,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>{let s=zn(de(Te(1),wt(ge(n,"float32"))));return ye(e,s)}}}},aW={kernelName:bl,inputsToSave:["a","b"],gradFunc:(e,t)=>{let[n,s]=t,r=St(n.shape,s.shape);return{a:()=>{let i=de(wt(n),wt(s)),l=z(e,ye(s,i)),u=ln(n.shape,r);return u.length>0&&(l=Se(l,u)),V(l,n.shape)},b:()=>{let i=de(wt(n),wt(s)),l=Pt(z(e,ye(n,i))),u=ln(s.shape,r);return u.length>0&&(l=Se(l,u)),V(l,s.shape)}}}},oW={kernelName:Fc,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>ye(e,de(wt(ge(n,"float32")),1))}}},iW={kernelName:Oc,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>ye(e,Ae(Te(1),wt(ge(n,"float32"))))}}};function lW(e,t,n,s,r,a){let o=D(e,"dy","avgPool3dGrad"),i=D(t,"input","avgPool3dGrad"),l=o,u=i,c=!1;i.rank===4&&(c=!0,l=V(o,[1,o.shape[0],o.shape[1],o.shape[2],o.shape[3]]),u=V(i,[1,i.shape[0],i.shape[1],i.shape[2],i.shape[3]])),O(l.rank===5,()=>`Error in avgPool3dGrad: dy must be rank 5 but got rank ${l.rank}.`),O(u.rank===5,()=>`Error in avgPool3dGrad: input must be rank 5 but got rank ${u.rank}.`),ps("avgPool3dGrad",r,a);let p={dy:l,input:u},d={filterSize:n,strides:s,pad:r,dimRoundingMode:a},h=B.runKernel(s0,p,d);return c?V(h,[h.shape[1],h.shape[2],h.shape[3],h.shape[4]]):h}var uW=W({avgPool3dGrad_:lW}),cW={kernelName:Hp,inputsToSave:["x"],gradFunc:(e,t,n)=>{let[s]=t,{filterSize:r,strides:a,pad:o,dimRoundingMode:i}=n;return{x:()=>uW(e,s,r,a,o,i)}}};function dW(e,t,n,s,r){let a=D(e,"dy","avgPoolGrad"),o=D(t,"input","avgPoolGrad");O(o.rank===a.rank,()=>`Rank of input (${o.rank}) does not match rank of dy (${a.rank})`);let i=o,l=a,u=!1;o.rank===3&&(u=!0,i=V(o,[1,o.shape[0],o.shape[1],o.shape[2]]),l=V(a,[1,a.shape[0],a.shape[1],a.shape[2]])),O(l.rank===4,()=>`Error in avgPoolGrad: dy must be rank 4 but got rank ${l.rank}.`),O(i.rank===4,()=>`Error in avgPoolGrad: input must be rank 4 but got rank ${i.rank}.`);let c={dy:l,input:i},p={filterSize:n,strides:s,pad:r},d=B.runKernel(n0,c,p);return u?V(d,[d.shape[1],d.shape[2],d.shape[3]]):d}var pW=W({avgPoolGrad_:dW}),hW={kernelName:vo,inputsToSave:["x"],gradFunc:(e,t,n)=>{let[s]=t,{filterSize:r,strides:a,pad:o}=n;return{x:()=>pW(e,s,r,a,o)}}},fW={kernelName:wo,inputsToSave:["a","b"],gradFunc:(e,t,n)=>{let[s,r]=t,{transposeA:a,transposeB:o}=n;return!a&&!o?{a:()=>rt(e,r,!1,!0),b:()=>rt(s,e,!0,!1)}:!a&&o?{a:()=>rt(e,r,!1,!1),b:()=>rt(e,s,!0,!1)}:a&&!o?{a:()=>rt(r,e,!1,!0),b:()=>rt(s,e,!1,!1)}:{a:()=>rt(r,e,!0,!0),b:()=>rt(e,s,!0,!0)}}},mW={kernelName:vl,gradFunc:(e,t,n)=>{let{blockShape:s,crops:r}=n;return{x:()=>Ih(e,s,r)}}},gW={kernelName:P6,gradFunc:(e,t,n)=>{let s=n,r=s.inputShape,a=s.shape,o=Array.from(a);for(let l=r.length-1;l>=0;l--)if(r[l]===a[l])o[l]=1;else if(r[l]!==1)throw new Error(`broadcastTo(): [${r}] cannot be broadcast to [${a}].`);let i=[];for(let l=0;l1&&i.push(l);return{x:()=>Se(e,i,!0)}}},yW={kernelName:ko,gradFunc:e=>({x:()=>e.clone()})},AW={kernelName:So,gradFunc:e=>({x:()=>dt(e)})},xW={kernelName:$a,inputsToSave:["x"],gradFunc:(e,t,n)=>{let[s]=t,{clipValueMin:r,clipValueMax:a}=n;return{x:()=>jn(gr(mi(s,r),gi(s,a)),e,dt(e))}}},bW={kernelName:qp,inputsToSave:["x"],gradFunc:Dk.gradFunc},vW={kernelName:wl,saveAllInputs:!0,gradFunc:(e,t,n)=>{let s=t.map(l=>l.shape),{axis:r}=n,a=yr(r,t[0].shape)[0],o=s.map(l=>l[a]);return qt(e,o,a).map(l=>()=>l)}},wW={kernelName:Io,inputsToSave:["x","filter"],gradFunc:(e,t,n)=>{let[s,r]=t,{dilations:a,strides:o,pad:i,dataFormat:l}=n;return O(lo(a),()=>`Error in gradient of conv2D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '${a}'`),{x:()=>TA(s.shape,e,r,o,i,l),filter:()=>i5(s,e,r.shape,o,i,l)}}},kW={kernelName:Co,inputsToSave:["dy","filter"],gradFunc:(e,t,n)=>{let[s,r]=t,{strides:a,pad:o,dataFormat:i,dimRoundingMode:l}=n;return{dy:()=>Na(e,r,a,o,i,1,l),filter:()=>i5(e,s,r.shape,a,o,i,l)}}};function SW(e,t,n,s,r){let a=e;e.rank===4&&(a=V(e,[1,e.shape[0],e.shape[1],e.shape[2],e.shape[3]]));let o=t;o.rank===4&&(o=V(t,[1,t.shape[0],t.shape[1],t.shape[2],t.shape[3]])),O(a.rank===5,()=>`Error in conv3dDerFilter: input must be rank 5, but got shape ${a.shape}.`),O(o.rank===5,()=>`Error in conv3dDerFilter: dy must be rank 5, but got shape ${o.shape}.`),O(n.length===5,()=>`Error in conv3dDerFilter: filterShape must be length 5, but got ${n}.`),O(a.shape[4]===n[3],()=>`Error in conv3dDerFilter: depth of input ${a.shape[4]}) must match input depth in filter (${n[3]}.`),O(o.shape[4]===n[4],()=>`Error in conv3dDerFilter: depth of dy (${o.shape[4]}) must match output depth for filter (${n[4]}).`);let i={x:a,dy:o},l={strides:s,pad:r,filterShape:n};return B.runKernel(i0,i,l)}var IW=W({conv3DBackpropFilter_:SW}),CW={kernelName:Xp,inputsToSave:["x","filter"],gradFunc:(e,t,n)=>{let{dilations:s,strides:r,pad:a}=n;O(lo(s),()=>`Error in gradient of conv3D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '${s}'`);let[o,i]=t;return{x:()=>Ew(o.shape,e,i,r,a),filter:()=>IW(o,e,i.shape,r,a)}}},TW={kernelName:To,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>z(Pt(q0(ge(n,"float32"))),e)}}},NW={kernelName:No,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>z(X0(ge(n,"float32")),e)}}},EW={kernelName:Eo,inputsToSave:["x"],gradFunc:(e,t,n)=>{let[s]=t,{axis:r,exclusive:a,reverse:o}=n;return{x:()=>{let i=Fw([r],s.rank),l=$0(e,r,a,!o);return i!=null&&(l=at(l,i)),l}}}},RW={kernelName:Ro,inputsToSave:["x","filter"],gradFunc:(e,t,n)=>{let{dilations:s,strides:r,pad:a,dimRoundingMode:o}=n,i=s==null?[1,1]:s;O(lo(i),()=>`Error in gradient of depthwiseConv2dNative: dilation rates greater than 1 are not yet supported. Got dilations '${i}'`);let[l,u]=t;return O(l.rank===4,()=>`Error in gradient of depthwiseConv2dNative: input must be rank 4, but got rank ${l.rank}.`),O(u.rank===4,()=>`Error in gradient of depthwiseConv2dNative: filter must be rank 4, but got rank ${u.rank}.`),O(l.shape[3]===u.shape[2],()=>`Error in gradient of depthwiseConv2d: number of input channels (${l.shape[3]}) must match the inChannels dimension in filter ${u.shape[2]}.`),O(ua(r,i),()=>`Error in gradient of depthwiseConv2d: Either strides or dilations must be 1. Got strides ${r} and dilations '${i}'.`),ps("depthwiseConv2d",a,o),{x:()=>gk(l.shape,e,u,r,a,i,o),filter:()=>mk(l,e,u.shape,r,a,i,o)}}},_W={kernelName:Kp,inputsToSave:["x","filter"],gradFunc:(e,t,n)=>{let[s,r]=t,a={x:s,filter:r,dy:e},o={x:s,filter:r,dy:e};return{x:()=>B.runKernel(Sm,a,n),filter:()=>B.runKernel(Im,o,n)}}},DW={kernelName:Do,outputsToSave:[!0],gradFunc:(e,t)=>{let[n]=t,s={dy:e,y:n};return{x:()=>B.runKernel(h0,s)}}},$W={kernelName:Mc,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t,s=z(Ls(Pt(wt(n))),2/Math.sqrt(Math.PI));return{x:()=>z(e,s)}}},PW={kernelName:$o,outputsToSave:[!0],gradFunc:(e,t)=>{let[n]=t;return{x:()=>z(e,n)}}},FW={kernelName:Tl,inputsToSave:["input"],gradFunc:(e,t)=>{let[n]=t;return{input:()=>V(e,n.shape)}}},OW={kernelName:Nl,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>z(e,Ls(n))}}},MW={kernelName:Po,gradFunc:e=>({x:()=>dt(e)})},zW={kernelName:Fo,inputsToSave:["a","b"],gradFunc:(e,t)=>{let[n,s]=t,r=St(n.shape,s.shape);return{a:()=>{let i=ye(e,ge(s,"float32")),l=ln(n.shape,r);return l.length>0?V(Se(i,l),n.shape):i},b:()=>{let i=z(e,ge(n,"float32")),l=ln(s.shape,r);l.length>0&&(i=V(Se(i,l),s.shape));let u=wt(s);return Pt(ye(i,ge(u,"float32")))}}}},LW={kernelName:Oo,inputsToSave:["x","mean","variance","scale"],gradFunc:(e,t,n)=>{let{varianceEpsilon:s}=n,[r,a,o,i]=t,l=i==null?Te(1):i,u=ln(a.shape,r.shape),c=[];if(a.rank===1){for(let b=0;ba.rank===1?V(z(z(e,bs(V(h,[1,1,1,a.shape[0]]),c)),l),r.shape):V(z(z(e,h),l),r.shape),mean:()=>{let b=z(z(h,Te(-1)),d);return a.rank===1&&(b=Se(b,u)),V(b,a.shape)},variance:()=>{let b=z(z(f,p),d);return a.rank===1&&(b=Se(b,u)),V(b,a.shape)},scale:()=>{let b=z(p,h),w=z(e,b);return a.rank===1&&(w=Se(w,u)),V(w,a.shape)},offset:()=>{let b=e;return a.rank===1&&(b=Se(b,u)),V(b,a.shape)}}}},BW={kernelName:Rl,inputsToSave:["x","indices"],gradFunc:(e,t,n)=>{let[s,r]=t,{axis:a}=n,o=yr(a,s.shape)[0];return{x:()=>{let l=s.shape,u=r.size,c=l.slice(0,o),p=c.length,d=l.slice(a,l.length).slice(1),h=d.length,f=qv(0,p),m=qv(p+1,p+1+h),g=Xv([c,[u],d]),y=V(e,g),x=V(r,[u]),A=Xv([[p],f,m]),b=at(y,A),w=Q0(b,x,s.shape[o]),k=OA(A);return w=at(w,k),w},indices:()=>r}}};function qv(e,t){let n=[];for(let s=e;s{let[n,s]=t;return{a:()=>dt(n),b:()=>dt(s)}}},VW={kernelName:zo,gradFunc:e=>({x:()=>ge(e,"float32")})},UW={kernelName:Lc,gradFunc:e=>({x:()=>dt(e)})},GW={kernelName:Bc,gradFunc:e=>({x:()=>dt(e)})},HW={kernelName:$l,gradFunc:e=>({x:()=>dt(e)})},jW={kernelName:Lo,inputsToSave:["x"],gradFunc:(e,t,n)=>{let[s]=t,{alpha:r}=n,a=Is(s,0);return{x:()=>jn(a,e,z(e,r))}}},qW={kernelName:Wc,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>ye(e,de(n,1))}}},XW={kernelName:Bo,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>ye(e,ge(n,"float32"))}}},KW={kernelName:O6,inputsToSave:[],outputsToSave:[!0],gradFunc:(e,t,n)=>{let[s]=t,{axis:r}=n;return{logits:()=>{let o=Ls(s);return Ae(e,z(Se(e,r,!0),o))}}}};function ZW(e,t,n,s=5,r=1,a=1,o=.5){let i={x:e,y:t,dy:n},l={depthRadius:s,bias:r,alpha:a,beta:o};return B.runKernel(y0,i,l)}var YW=W({localResponseNormalizationBackprop_:ZW}),JW={kernelName:Jp,inputsToSave:["x"],outputsToSave:[!0],gradFunc:(e,t,n)=>{let[s,r]=t,{depthRadius:a,bias:o,alpha:i,beta:l}=n;return{x:()=>YW(s,r,e,a,o,i,l)}}};function $k(e,t,n,s){return t.rankz(e,ge(zs(n,t),e.dtype))}}var Kv={kernelName:Wo,inputsToSave:["x"],outputsToSave:[!0],gradFunc:(e,t,n)=>{let s=n,{reductionIndices:r}=s,a=t[0],o=t[1],i=yr(r,a.shape),l=$k(e,o,a,i);return{x:()=>l.x()}}},QW={kernelName:Vo,inputsToSave:["a","b"],gradFunc:(e,t)=>{let[n,s]=t;return{a:()=>z(e,ge(mi(n,s),"float32")),b:()=>z(e,ge(F0(n,s),"float32"))}}};function eV(e,t,n,s,r,a,o){let i=D(e,"dy","maxPool3dGrad"),l=D(t,"input","maxPool3dGrad"),u=D(n,"output","maxPool3dGrad"),c=i,p=l,d=u,h=!1;l.rank===4&&(h=!0,c=V(i,[1,i.shape[0],i.shape[1],i.shape[2],i.shape[3]]),p=V(l,[1,l.shape[0],l.shape[1],l.shape[2],l.shape[3]]),d=V(u,[1,u.shape[0],u.shape[1],u.shape[2],u.shape[3]])),O(c.rank===5,()=>`Error in maxPool3dGrad: dy must be rank 5 but got rank ${c.rank}.`),O(p.rank===5,()=>`Error in maxPool3dGrad: input must be rank 5 but got rank ${p.rank}.`),O(d.rank===5,()=>`Error in maxPool3dGrad: output must be rank 5 but got rank ${d.rank}.`),ps("maxPool3dGrad",a,o);let f={dy:c,input:p,output:d},m={filterSize:s,strides:r,pad:a,dimRoundingMode:o},g=B.runKernel(x0,f,m);return h?V(g,[g.shape[1],g.shape[2],g.shape[3],g.shape[4]]):g}var tV=W({maxPool3dGrad_:eV}),nV={kernelName:Qp,inputsToSave:["x"],outputsToSave:[!0],gradFunc:(e,t,n)=>{let[s,r]=t,{filterSize:a,strides:o,pad:i,dimRoundingMode:l}=n;return{x:()=>tV(e,s,r,a,o,i,l)}}};function sV(e,t,n,s,r,a,o){let i=D(e,"dy","maxPoolGrad"),l=D(t,"input","maxPoolGrad"),u=D(n,"output","maxPoolGrad");O(l.rank===i.rank,()=>`Rank of input (${l.rank}) does not match rank of dy (${i.rank})`),O(i.rank===4,()=>`Error in maxPoolGrad: dy must be rank 4 but got rank ${i.rank}.`),O(l.rank===4,()=>`Error in maxPoolGrad: input must be rank 4 but got rank ${l.rank}.`),ps("maxPoolGrad",a,o);let c={dy:i,input:l,output:u},p={filterSize:s,strides:r,pad:a,dimRoundingMode:o};return B.runKernel(A0,c,p)}var rV=W({maxPoolGrad_:sV}),aV={kernelName:Uo,inputsToSave:["x"],outputsToSave:[!0],gradFunc:(e,t,n)=>{let[s,r]=t,{filterSize:a,strides:o,pad:i}=n;return{x:()=>rV(e,s,r,a,o,i)}}},oV={kernelName:Go,inputsToSave:["x"],gradFunc:(e,t,n)=>{let[s]=t,{axis:r}=n,a=yr(r,s.shape),i=Pw(s.shape,a)[1],l=Et(i);return{x:()=>{let c=s.shape.slice();a.forEach(h=>{c[h]=1});let p=V(e,c);return ye(z(p,Os(s.shape,"float32")),l)}}}},iV={kernelName:Ho,inputsToSave:["x"],outputsToSave:[!0],gradFunc:(e,t,n)=>{let s=n,{axis:r}=s,[a,o]=t,i=yr(r,a.shape),l=$k(e,o,a,i);return{x:()=>l.x()}}},lV={kernelName:jo,inputsToSave:["a","b"],gradFunc:(e,t)=>{let[n,s]=t;return{a:()=>z(e,ge(gi(n,s),"float32")),b:()=>z(e,ge(Is(n,s),"float32"))}}},uV={kernelName:qo,inputsToSave:["x"],gradFunc:(e,t,n)=>{let s=t[0],{paddings:r}=n,a=r.map(o=>o[0]);return{x:()=>Le(e,a,s.shape)}}},cV={kernelName:Uc,inputsToSave:["a","b"],gradFunc:(e,t)=>{let[n,s]=t,r=St(n.shape,s.shape);return{a:()=>{let i=ln(n.shape,r);return i.length>0?V(Se(e,i),n.shape):e},b:()=>{let i=z(e,Pt(sd(ye(n,s)))),l=ln(s.shape,r);return l.length>0?V(Se(i,l),s.shape):i}}}},dV={kernelName:Xo,inputsToSave:["a","b"],gradFunc:(e,t)=>{let[n,s]=t,r=St(n.shape,s.shape);return{a:()=>{let i=z(e,ge(s,"float32")),l=ln(n.shape,r);return l.length>0?V(Se(i,l),n.shape):i},b:()=>{let i=z(e,ge(n,"float32")),l=ln(s.shape,r);return l.length>0?V(Se(i,l),s.shape):i}}}},pV={kernelName:zl,gradFunc:e=>({x:()=>Pt(e)})},hV={kernelName:Ul,inputsToSave:["indices"],gradFunc:(e,t)=>{let n=t[0];return{indices:()=>Gt(n.shape,"float32")}}},fV={kernelName:Vl,gradFunc:e=>({x:()=>dt(e)})},mV={kernelName:Gl,saveAllInputs:!0,gradFunc:(e,t,n)=>{let{axis:s}=n;return wn(e,s).map(a=>()=>a)}},Zv={kernelName:Ko,inputsToSave:["x"],gradFunc:(e,t,n)=>{let s=t[0],{paddings:r}=n,a=r.map(o=>o[0]);return{x:()=>Le(e,a,s.shape)}}},gV={kernelName:Zo,inputsToSave:["a","b"],outputsToSave:[!0],gradFunc:(e,t)=>{let[n,s,r]=t,a=n,o=s,i=St(a.shape,o.shape);return{a:()=>{let c=ge(o,"float32"),p=z(e,z(c,Ra(a,Ae(c,Te(1))))),d=ln(a.shape,i);return d.length>0&&(p=Se(p,d)),V(p,a.shape)},b:()=>{let c=Is(a,0),p=jn(c,Bs(a),dt(a)),d=z(e,z(r,p)),h=ln(o.shape,i);return h.length>0&&(d=Se(d,h)),V(d,o.shape)}}}},yV={kernelName:Yo,inputsToSave:["x","alpha"],gradFunc:(e,t)=>{let[n,s]=t,r=Is(n,0);return{x:()=>jn(r,e,z(e,s)),alpha:()=>{let a=jn(r,dt(e),z(e,n)),o=ln(s.shape,e.shape);return o.length>0&&(a=Se(a,o)),V(a,s.shape)}}}};function AV(e,t,n){let s=e.shape.slice();s[n]=1;let r=V(t,s),a=Dp(e,n,!0,!1),o=Dp(e,n,!0,!0),i=z(a,o);return z(r,i)}function xV(e,t,n){let s=e.shape.length,r=s-n.length,a=T.getAxesPermutation(n,s),o=e;a!=null&&(o=at(e,a));let i=o.shape.slice(),u=i.splice(s-n.length,n.length).reduce((d,h)=>d*h,1);i.push(u);let c=o.reshape(i),p=AV(c,t,r);if(p=p.reshape(o.shape),a!=null){let d=T.getUndoAxesPermutation(a);p=at(p,d)}return p}var bV={kernelName:Jo,inputsToSave:["x"],gradFunc:(e,t,n)=>{let[s]=t,{axis:r}=n,a=[];return r==null?a=s.shape.map((o,i)=>i):typeof r=="number"?a=[r]:a=r,{x:()=>xV(s,e,a)}}},vV={kernelName:_o,inputsToSave:["a","b"],gradFunc:(e,t)=>{let[n,s]=t,r=St(n.shape,s.shape);return{a:()=>{let i=ye(e,ge(s,"float32")),l=ln(n.shape,r);return l.length>0?V(Se(i,l),n.shape):i},b:()=>{let i=z(e,ge(n,"float32")),l=ln(s.shape,r);l.length>0&&(i=V(Se(i,l),s.shape));let u=wt(s);return Pt(ye(i,ge(u,"float32")))}}}},wV={kernelName:Hl,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>ye(e,Pt(wt(n)))}}},kV={kernelName:ni,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t,s=z(gi(n,6),fu(n));return{x:()=>z(e,ge(s,"float32"))}}},SV={kernelName:Qo,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>z(e,ge(fu(n),"float32"))}}},IV={kernelName:jl,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>V(e,n.shape)}}},CV={kernelName:ti,inputsToSave:["images"],gradFunc:(e,t,n)=>{let[s]=t,r={dy:e,images:s};return{images:()=>B.runKernel(S0,r,n)}}},TV={kernelName:ei,inputsToSave:["images"],gradFunc:(e,t,n)=>{let[s]=t,r={dy:e,images:s};return{images:()=>B.runKernel(k0,r,n)}}},NV={kernelName:ql,gradFunc:(e,t,n)=>{let{dims:s}=n,r=yr(s,e.shape);return{x:()=>nr(e,r)}}},EV={kernelName:Xl,gradFunc:e=>({x:()=>dt(e)})},RV={kernelName:si,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>Pt(ye(e,z(Ra(n,1.5),2)))}}},_V={kernelName:Zl,inputsToSave:["condition"],gradFunc:(e,t)=>{let[n]=t;return{condition:()=>ge(dt(n),"float32"),t:()=>z(e,ge(n,e.dtype)),e:()=>z(e,ge(wh(n),e.dtype))}}},DV={kernelName:jc,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>{let s=Is(n,Te(0)),r=Te(Ek),a=Te(Rk),o=z(e,a),i=z(z(e,r),Ls(ge(n,"float32")));return jn(s,o,i)}}}},$V={kernelName:ai,outputsToSave:[!0],gradFunc:(e,t)=>{let[n]=t;return{x:()=>z(e,z(n,Ae(Te(1),n)))}}},PV={kernelName:qc,gradFunc:e=>({x:()=>dt(e)})},FV={kernelName:ri,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>z(xh(ge(n,"float32")),e)}}},OV={kernelName:Jl,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>z(D0(ge(n,"float32")),e)}}},MV={kernelName:Yl,inputsToSave:["x"],gradFunc:(e,t,n)=>{let[s]=t,{begin:r,size:a}=n,o=s.shape,[i,l]=xw(s,r,a),u=[];for(let c=0;car(e,u)}}},zV={kernelName:li,outputsToSave:[!0],gradFunc:(e,t,n)=>{let[s]=t,{dim:r}=n,a=!0,o=z(e,s);return{logits:()=>Ae(o,z(Se(o,[r],a),s))}}},LV={kernelName:Xc,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>z(e,On(n))}}},Yv={kernelName:Ql,gradFunc:(e,t,n)=>{let{blockShape:s,paddings:r}=n;return{x:()=>Ah(e,s,r)}}},Jv={kernelName:eu,gradFunc:(e,t,n)=>{let{axis:s}=n;return{x:()=>ct(e,s)}}},BV={kernelName:oi,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>ye(e,z(zn(ge(n,"float32")),2))}}},WV={kernelName:Zc,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>z(e,z(ge(n,"float32"),2))}}},VV={kernelName:ui,inputsToSave:["a","b"],gradFunc:(e,t)=>{let[n,s]=t,r=Te(2);return{a:()=>z(e,z(r,Ae(n,s))),b:()=>z(e,z(r,Ae(s,n)))}}},UV={kernelName:pi,gradFunc:e=>({x:()=>dt(e)})},GV={kernelName:ci,inputsToSave:["a","b"],gradFunc:(e,t)=>{let[n,s]=t,r=St(n.shape,s.shape);return{a:()=>{let i=e,l=ln(n.shape,r);return l.length>0&&(i=Se(i,l)),V(i,n.shape)},b:()=>{let i=e,l=ln(s.shape,r);return l.length>0&&(i=Se(i,l)),V(Pt(i),s.shape)}}}},HV={kernelName:ii,inputsToSave:["x"],gradFunc:(e,t,n)=>{let[s]=t,r=s.shape.slice(),{axis:a}=n;yr(a,s.shape).forEach(u=>{r[u]=1});let i=V(e,r),l=z(i,Os(s.shape,"float32"));return{x:()=>l}}},jV={kernelName:nu,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>ye(e,wt(xh(n)))}}},qV={kernelName:di,outputsToSave:[!0],gradFunc:(e,t)=>{let[n]=t;return{x:()=>z(Ae(Te(1),wt(n)),e)}}},XV={kernelName:Pa,inputsToSave:["x"],gradFunc:(e,t,n)=>{let[s]=t,{reps:r}=n;return{x:()=>{let o=dt(s);if(s.rank===1)for(let i=0;i{let s=n,{perm:r}=s,a=OA(r);return{x:()=>at(e,a)}}},ZV={kernelName:au,gradFunc:(e,t,n)=>{let s=n,{axis:r}=s;return{value:()=>un(e,r)}}},YV={kernelName:ih,inputsToSave:["segmentIds"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>JV(e,n)}}};function JV(e,t){let n=da(t,dt(t)),s=rd(e,n),r=mi(t,Te(0,"int32")),a=s.rank-r.rank;for(let i=0;i({x:()=>dt(e)})},eU=[Dk,YB,JB,QB,eW,tW,nW,sW,rW,aW,oW,iW,cW,hW,fW,mW,gW,yW,AW,xW,bW,vW,kW,wW,CW,TW,NW,EW,RW,_W,vV,DW,$W,PW,FW,OW,zW,MW,LW,BW,WW,VW,UW,GW,HW,jW,qW,XW,KW,JW,Kv,Kv,QW,nV,aV,oV,iV,lV,uV,cV,dV,pV,hV,fV,mV,Zv,Zv,gV,yV,bV,wV,kV,SV,IV,CV,TV,NV,EV,RV,_V,DV,$V,PV,FV,OV,MV,zV,LV,Yv,Yv,Jv,Jv,BV,VV,WV,UV,GV,HV,jV,qV,XV,KV,ZV,YV,QV];for(let e of eU)M6(e);oe().prototype.abs=function(){return this.throwIfDisposed(),an(this)};oe().prototype.acos=function(){return this.throwIfDisposed(),uA(this)};oe().prototype.acosh=function(){return this.throwIfDisposed(),cA(this)};oe().prototype.add=function(e){return this.throwIfDisposed(),de(this,e)};oe().prototype.all=function(e,t){return this.throwIfDisposed(),E0(this,e,t)};oe().prototype.any=function(e,t){return this.throwIfDisposed(),_p(this,e,t)};oe().prototype.argMax=function(e){return this.throwIfDisposed(),Ms(this,e)};oe().prototype.argMin=function(e){return this.throwIfDisposed(),dA(this,e)};oe().prototype.asScalar=function(){return this.throwIfDisposed(),O(this.size===1,()=>"The array must have only 1 element."),V(this,[])};oe().prototype.asType=function(e){return this.throwIfDisposed(),ge(this,e)};oe().prototype.as1D=function(){return this.throwIfDisposed(),V(this,[this.size])};oe().prototype.as2D=function(e,t){return this.throwIfDisposed(),V(this,[e,t])};oe().prototype.as3D=function(e,t,n){return this.throwIfDisposed(),V(this,[e,t,n])};oe().prototype.as4D=function(e,t,n,s){return this.throwIfDisposed(),V(this,[e,t,n,s])};oe().prototype.as5D=function(e,t,n,s,r){return this.throwIfDisposed(),V(this,[e,t,n,s,r])};oe().prototype.asin=function(){return this.throwIfDisposed(),pA(this)};oe().prototype.asinh=function(){return this.throwIfDisposed(),hA(this)};oe().prototype.atan=function(){return this.throwIfDisposed(),fA(this)};oe().prototype.atan2=function(e){return this.throwIfDisposed(),mA(this,e)};oe().prototype.atanh=function(){return this.throwIfDisposed(),gA(this)};oe().prototype.avgPool=function(e,t,n,s){return this.throwIfDisposed(),yh(this,e,t,n,s)};oe().prototype.batchToSpaceND=function(e,t){return this.throwIfDisposed(),Ah(this,e,t)};oe().prototype.batchNorm=function(e,t,n,s,r){return this.throwIfDisposed(),Qc(this,e,t,n,s,r)};oe().prototype.broadcastTo=function(e){return this.throwIfDisposed(),nl(this,e)};oe().prototype.cast=function(e){return this.throwIfDisposed(),ge(this,e)};oe().prototype.ceil=function(){return this.throwIfDisposed(),kA(this)};oe().prototype.clipByValue=function(e,t){return this.throwIfDisposed(),ws(this,e,t)};oe().prototype.concat=function(e,t){return this.throwIfDisposed(),e instanceof it&&(e=[e]),ct([this,...e],t)};oe().prototype.conv1d=function(e,t,n,s,r,a){return this.throwIfDisposed(),R0(this,e,t,n,s,r,a)};oe().prototype.conv2dTranspose=function(e,t,n,s,r){return this.throwIfDisposed(),_0(this,e,t,n,s,r)};oe().prototype.conv2d=function(e,t,n,s,r,a){return this.throwIfDisposed(),Na(this,e,t,n,s,r,a)};oe().prototype.cos=function(){return this.throwIfDisposed(),xh(this)};oe().prototype.cosh=function(){return this.throwIfDisposed(),D0(this)};oe().prototype.cumprod=function(e,t,n){return this.throwIfDisposed(),Dp(this,e,t,n)};oe().prototype.cumsum=function(e,t,n){return this.throwIfDisposed(),$0(this,e,t,n)};oe().prototype.depthToSpace=function(e,t){return this.throwIfDisposed(),RA(this,e,t)};oe().prototype.depthwiseConv2d=function(e,t,n,s,r,a){return this.throwIfDisposed(),ed(this,e,t,n,s,r,a)};oe().prototype.dilation2d=function(e,t,n,s,r){return this.throwIfDisposed(),_A(this,e,t,n,s,r)};oe().prototype.divNoNan=function(e){return this.throwIfDisposed(),DA(this,e)};oe().prototype.div=function(e){return this.throwIfDisposed(),ye(this,e)};oe().prototype.dot=function(e){return this.throwIfDisposed(),$A(this,e)};oe().prototype.elu=function(){return this.throwIfDisposed(),td(this)};oe().prototype.equal=function(e){return this.throwIfDisposed(),zs(this,e)};oe().prototype.erf=function(){return this.throwIfDisposed(),PA(this)};oe().prototype.euclideanNorm=function(e,t){return this.throwIfDisposed(),MA(this,e,t)};oe().prototype.exp=function(){return this.throwIfDisposed(),Ls(this)};oe().prototype.expandDims=function(e){return this.throwIfDisposed(),Ft(this,e)};oe().prototype.expm1=function(){return this.throwIfDisposed(),zA(this)};oe().prototype.fft=function(){return this.throwIfDisposed(),Nh(this)};oe().prototype.flatten=function(){return this.throwIfDisposed(),V(this,[this.size])};oe().prototype.floor=function(){return this.throwIfDisposed(),sd(this)};oe().prototype.floorDiv=function(e){return this.throwIfDisposed(),Jc(this,e)};oe().prototype.gather=function(e,t){return this.throwIfDisposed(),rd(this,e,t)};oe().prototype.greaterEqual=function(e){return this.throwIfDisposed(),mi(this,e)};oe().prototype.greater=function(e){return this.throwIfDisposed(),Is(this,e)};oe().prototype.ifft=function(){return this.throwIfDisposed(),mc(this)};oe().prototype.irfft=function(){return this.throwIfDisposed(),Z0(this)};oe().prototype.isFinite=function(){return this.throwIfDisposed(),LA(this)};oe().prototype.isInf=function(){return this.throwIfDisposed(),BA(this)};oe().prototype.isNaN=function(){return this.throwIfDisposed(),WA(this)};oe().prototype.leakyRelu=function(e){return this.throwIfDisposed(),bh(this,e)};oe().prototype.lessEqual=function(e){return this.throwIfDisposed(),gi(this,e)};oe().prototype.less=function(e){return this.throwIfDisposed(),F0(this,e)};oe().prototype.localResponseNormalization=function(e,t,n,s){return this.throwIfDisposed(),VA(this,e,t,n,s)};oe().prototype.logSigmoid=function(){return this.throwIfDisposed(),UA(this)};oe().prototype.logSoftmax=function(e){return this.throwIfDisposed(),M0(this,e)};oe().prototype.logSumExp=function(e,t){return this.throwIfDisposed(),z0(this,e,t)};oe().prototype.log=function(){return this.throwIfDisposed(),Bs(this)};oe().prototype.log1p=function(){return this.throwIfDisposed(),vh(this)};oe().prototype.logicalAnd=function(e){return this.throwIfDisposed(),gr(this,e)};oe().prototype.logicalNot=function(){return this.throwIfDisposed(),wh(this)};oe().prototype.logicalOr=function(e){return this.throwIfDisposed(),L0(this,e)};oe().prototype.logicalXor=function(e){return this.throwIfDisposed(),GA(this,e)};oe().prototype.matMul=function(e,t,n){return this.throwIfDisposed(),rt(this,e,t,n)};oe().prototype.maxPool=function(e,t,n,s){return this.throwIfDisposed(),kh(this,e,t,n,s)};oe().prototype.max=function(e,t){return this.throwIfDisposed(),xn(this,e,t)};oe().prototype.maximum=function(e){return this.throwIfDisposed(),da(this,e)};oe().prototype.mean=function(e,t){return this.throwIfDisposed(),Ut(this,e,t)};oe().prototype.min=function(e,t){return this.throwIfDisposed(),Ea(this,e,t)};oe().prototype.minimum=function(e){return this.throwIfDisposed(),ad(this,e)};oe().prototype.mirrorPad=function(e,t){return this.throwIfDisposed(),jA(this,e,t)};oe().prototype.mod=function(e){return this.throwIfDisposed(),pu(this,e)};oe().prototype.mul=function(e){return this.throwIfDisposed(),z(this,e)};oe().prototype.neg=function(){return this.throwIfDisposed(),Pt(this)};oe().prototype.norm=function(e,t,n){return this.throwIfDisposed(),nd(this,e,t,n)};oe().prototype.notEqual=function(e){return this.throwIfDisposed(),dl(this,e)};oe().prototype.oneHot=function(e,t=1,n=0){return this.throwIfDisposed(),pc(this,e,t,n)};oe().prototype.onesLike=function(){return this.throwIfDisposed(),Ws(this)};oe().prototype.pad=function(e,t){return this.throwIfDisposed(),ar(this,e,t)};oe().prototype.pool=function(e,t,n,s,r,a){return this.throwIfDisposed(),qA(this,e,t,n,s,r,a)};oe().prototype.pow=function(e){return this.throwIfDisposed(),Ra(this,e)};oe().prototype.prelu=function(e){return this.throwIfDisposed(),Ch(this,e)};oe().prototype.prod=function(e,t){return this.throwIfDisposed(),XA(this,e,t)};oe().prototype.reciprocal=function(){return this.throwIfDisposed(),YA(this)};oe().prototype.relu=function(){return this.throwIfDisposed(),Gr(this)};oe().prototype.relu6=function(){return this.throwIfDisposed(),V0(this)};oe().prototype.reshapeAs=function(e){return this.throwIfDisposed(),V(this,e.shape)};oe().prototype.reshape=function(e){return this.throwIfDisposed(),V(this,e)};oe().prototype.resizeBilinear=function(e,t,n){return this.throwIfDisposed(),wk(this,e,t,n)};oe().prototype.resizeNearestNeighbor=function(e,t,n){return this.throwIfDisposed(),kk(this,e,t,n)};oe().prototype.reverse=function(e){return this.throwIfDisposed(),nr(this,e)};oe().prototype.rfft=function(){return this.throwIfDisposed(),Eh(this)};oe().prototype.round=function(){return this.throwIfDisposed(),U0(this)};oe().prototype.rsqrt=function(){return this.throwIfDisposed(),G0(this)};oe().prototype.selu=function(){return this.throwIfDisposed(),H0(this)};oe().prototype.separableConv2d=function(e,t,n,s,r,a){return this.throwIfDisposed(),j0(this,e,t,n,s,r,a)};oe().prototype.sigmoid=function(){return this.throwIfDisposed(),On(this)};oe().prototype.sign=function(){return this.throwIfDisposed(),JA(this)};oe().prototype.sin=function(){return this.throwIfDisposed(),q0(this)};oe().prototype.sinh=function(){return this.throwIfDisposed(),X0(this)};oe().prototype.slice=function(e,t){return this.throwIfDisposed(),Le(this,e,t)};oe().prototype.softmax=function(e){return this.throwIfDisposed(),hu(this,e)};oe().prototype.softplus=function(){return this.throwIfDisposed(),du(this)};oe().prototype.spaceToBatchND=function(e,t){return this.throwIfDisposed(),Ih(this,e,t)};oe().prototype.split=function(e,t){return this.throwIfDisposed(),qt(this,e,t)};oe().prototype.sqrt=function(){return this.throwIfDisposed(),zn(this)};oe().prototype.square=function(){return this.throwIfDisposed(),wt(this)};oe().prototype.squaredDifference=function(e){return this.throwIfDisposed(),Y0(this,e)};oe().prototype.squeeze=function(e){return this.throwIfDisposed(),Ke(this,e)};oe().prototype.stack=function(e,t){this.throwIfDisposed();let n=e instanceof it?[this,e]:[this,...e];return un(n,t)};oe().prototype.step=function(e){return this.throwIfDisposed(),fu(this,e)};oe().prototype.stridedSlice=function(e,t,n,s,r,a,o,i){return this.throwIfDisposed(),QA(this,e,t,n,s,r,a,o,i)};oe().prototype.sub=function(e){return this.throwIfDisposed(),Ae(this,e)};oe().prototype.sum=function(e,t){return this.throwIfDisposed(),Se(this,e,t)};oe().prototype.tan=function(){return this.throwIfDisposed(),e5(this)};oe().prototype.tanh=function(){return this.throwIfDisposed(),ul(this)};oe().prototype.tile=function(e){return this.throwIfDisposed(),bs(this,e)};oe().prototype.toBool=function(){return this.throwIfDisposed(),ge(this,"bool")};oe().prototype.toFloat=function(){return this.throwIfDisposed(),ge(this,"float32")};oe().prototype.toInt=function(){return this.throwIfDisposed(),ge(this,"int32")};oe().prototype.topk=function(e,t){return this.throwIfDisposed(),t5(this,e,t)};oe().prototype.transpose=function(e){return this.throwIfDisposed(),at(this,e)};oe().prototype.unique=function(e){return this.throwIfDisposed(),n5(this,e)};oe().prototype.unsortedSegmentSum=function(e,t){return this.throwIfDisposed(),Q0(this,e,t)};oe().prototype.unstack=function(e){return this.throwIfDisposed(),wn(this,e)};oe().prototype.where=function(e,t){return this.throwIfDisposed(),jn(e,this,t)};oe().prototype.zerosLike=function(){return this.throwIfDisposed(),dt(this)};var ba=class extends Error{constructor(e){super(e),Object.setPrototypeOf(this,ba.prototype)}},Or=class extends Error{constructor(e){super(e),Object.setPrototypeOf(this,Or.prototype)}},j=class extends Error{constructor(e){super(e),Object.setPrototypeOf(this,j.prototype)}},Je=class extends Error{constructor(e){super(e),Object.setPrototypeOf(this,Je.prototype)}},Pk=class extends Error{constructor(e){super(e),Object.setPrototypeOf(this,Pk.prototype)}},Fk=class{constructor(e){this.maxEntries=e||100,this.cache=new Map}get(e){let t;return this.cache.has(e)&&(t=this.cache.get(e),this.cache.delete(e),this.cache.set(e,t)),t}put(e,t){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size>=this.maxEntries){let n=this.cache.keys().next().value;this.cache.delete(n)}this.cache.set(e,t)}getMaxEntries(){return this.maxEntries}setMaxEntries(e){if(e<0)throw new Error(`The maxEntries of LRU caches must be at least 0, but got ${e}.`);if(this.maxEntries>e)for(let t=0;tn.toUpperCase())}var cr={};function p5(e){if(e==null)return null;let t={};return t.className=e.getClassName(),t.config=e.getConfig(),t}function K3(e){if(!(e==null||typeof e!="object"))if(Array.isArray(e))e.forEach(t=>K3(t));else{let t=Object.keys(e);for(let n of t){let s=e[n];s!=null&&typeof s=="object"&&(!Array.isArray(s)&&s.type==="ndarray"&&typeof s.value=="number"?e[n]=s.value:K3(s))}}}function _h(e,t={},n={},s="object",r=!1){if(typeof e=="string"){let a=e,o;if(a in n)o=n[a];else if(a in cr)o=cr[a];else if(o=t[a],o==null)throw new j(`Unknown ${s}: ${e}. This may be due to one of the following reasons: + ${a.shape}`);let o={data:s,indices:r,segmentIds:a};return L.runKernel(Bp,o)}var gL=B({sparseSegmentSum_:mL});function yL(e,t,n,s,r,a,o,i){let l=_(e,"data","stringNGrams","string");if(l.dtype!=="string")throw new Error("Data must be of datatype string");if(l.shape.length!==1)throw new Error(`Data must be a vector, saw: ${l.shape}`);let u=_(t,"dataSplits","stringNGrams");if(u.dtype!=="int32")throw new Error("Data splits must be of datatype int32");let c={separator:n,nGramWidths:s,leftPad:r,rightPad:a,padWidth:o,preserveShortSequences:i},p={data:l,dataSplits:u},d=L.runKernel(Lc,p,c);return{nGrams:d[0],nGramsSplits:d[1]}}var AL=B({stringNGrams_:yL});function xL(e,t,n=!0){let s=_(e,"input","stringSplit","string"),r=_(t,"delimiter","stringSplit","string");if(s.rank!==1)throw new Error(`Input should be Tensor1D but received shape ${s.shape}`);if(r.rank!==0)throw new Error(`Delimiter should be a scalar but received shape ${r.shape}`);let a={skipEmpty:n},o={input:s,delimiter:r},i=L.runKernel(Vp,o,a);return{indices:i[0],values:i[1],shape:i[2]}}var bL=B({stringSplit_:xL});function vL(e,t){let n=_(e,"input","stringToHashBucketFast","string"),s={numBuckets:t};if(t<=0)throw new Error("Number of buckets must be at least 1");let r={input:n};return L.runKernel(Up,r,s)}var wL=B({stringToHashBucketFast_:vL}),lk={fft:dh,ifft:sc,rfft:ph,irfft:T0},uk={hammingWindow:ez,hannWindow:tk,frame:nk,stft:rz},ke={flipLeftRight:lz,grayscaleToRGB:cz,resizeNearestNeighbor:ik,resizeBilinear:ok,rotateWithOffset:pz,cropAndResize:oz,nonMaxSuppression:fz,nonMaxSuppressionAsync:wz,nonMaxSuppressionWithScore:Sz,nonMaxSuppressionWithScoreAsync:Cz,nonMaxSuppressionPadded:Nz,nonMaxSuppressionPaddedAsync:Rz,threshold:Fz,transform:Mz},VA={bandPart:Lz,gramSchmidt:Wz,qr:Uz},ck={absoluteDifference:jz,computeWeightedLoss:Ra,cosineDistance:Xz,hingeLoss:Zz,huberLoss:Jz,logLoss:eL,meanSquaredError:nL,sigmoidCrossEntropy:aL,softmaxCrossEntropy:lL},dk={sparseFillEmptyRows:cL,sparseReshape:pL,sparseSegmentMean:fL,sparseSegmentSum:gL},pk={stringNGrams:AL,stringSplit:bL,stringToHashBucketFast:wL},_a=class extends s6{minimize(e,t=!1,n){let{value:s,grads:r}=this.computeGradients(e,n);if(n!=null){let a=n.map(o=>({name:o.name,tensor:r[o.name]}));this.applyGradients(a)}else this.applyGradients(r);return Y(r),t?s:(s.dispose(),null)}get iterations(){return this.iterations_==null&&(this.iterations_=0),this.iterations_}incrementIterations(){this.iterations_=this.iterations+1}computeGradients(e,t){return v6(e,t)}dispose(){this.iterations_!=null&&Y(this.iterations_)}async saveIterations(){return this.iterations_==null&&(this.iterations_=0),{name:"iter",tensor:Ce(this.iterations_,"int32")}}async getWeights(){throw new Error("getWeights() is not implemented for this optimizer yet.")}async setWeights(e){throw new Error(`setWeights() is not implemented for this optimizer class ${this.getClassName()}`)}async extractIterations(e){return this.iterations_=(await e[0].tensor.data())[0],e.slice(1)}};Object.defineProperty(_a,Symbol.hasInstance,{value:e=>e.minimize!=null&&e.computeGradients!=null&&e.applyGradients!=null});var O0=class extends _a{constructor(e,t,n=null){super(),this.learningRate=e,this.rho=t,this.epsilon=n,this.accumulatedGrads=[],this.accumulatedUpdates=[],n==null&&(this.epsilon=L.backend.epsilon())}applyGradients(e){(Array.isArray(e)?e.map(n=>n.name):Object.keys(e)).forEach((n,s)=>{let r=L.registeredVariables[n],a=!1;this.accumulatedGrads[s]==null&&(this.accumulatedGrads[s]={originalName:`${n}/accum_grad`,variable:X(()=>ct(r).variable(a))}),this.accumulatedUpdates[s]==null&&(this.accumulatedUpdates[s]={originalName:`${n}/accum_var`,variable:X(()=>ct(r).variable(a))});let o=Array.isArray(e)?e[s].tensor:e[n];if(o==null)return;let i=this.accumulatedGrads[s].variable,l=this.accumulatedUpdates[s].variable;X(()=>{let u=le(M(i,this.rho),M(bt(o),1-this.rho)),c=M(ge(Ln(le(l,this.epsilon)),Ln(le(i,this.epsilon))),o),p=le(M(l,this.rho),M(bt(c),1-this.rho));i.assign(u),l.assign(p);let d=le(M(c,-this.learningRate),r);r.assign(d)})}),this.incrementIterations()}dispose(){this.accumulatedUpdates!=null&&(Y(this.accumulatedGrads.map(e=>e.variable)),Y(this.accumulatedUpdates.map(e=>e.variable)))}async getWeights(){let e=[...this.accumulatedGrads,...this.accumulatedUpdates];return[await this.saveIterations()].concat(e.map(t=>({name:t.originalName,tensor:t.variable})))}async setWeights(e){e=await this.extractIterations(e);let t=e.length/2,n=!1;this.accumulatedGrads=e.slice(0,t).map(s=>({originalName:s.name,variable:s.tensor.variable(n)})),this.accumulatedUpdates=e.slice(t,t*2).map(s=>({originalName:s.name,variable:s.tensor.variable(n)}))}getConfig(){return{learningRate:this.learningRate,rho:this.rho,epsilon:this.epsilon}}static fromConfig(e,t){return new e(t.learningRate,t.rho,t.epsilon)}};O0.className="Adadelta";di(O0);var M0=class extends _a{constructor(e,t=.1){super(),this.learningRate=e,this.initialAccumulatorValue=t,this.accumulatedGrads=[]}applyGradients(e){(Array.isArray(e)?e.map(n=>n.name):Object.keys(e)).forEach((n,s)=>{let r=L.registeredVariables[n];this.accumulatedGrads[s]==null&&(this.accumulatedGrads[s]={originalName:`${n}/accumulator`,variable:X(()=>zr(r.shape,this.initialAccumulatorValue).variable(!1))});let a=Array.isArray(e)?e[s].tensor:e[n];if(a==null)return;let o=this.accumulatedGrads[s].variable;X(()=>{let i=le(o,bt(a));o.assign(i);let l=le(M(ge(a,Ln(le(i,L.backend.epsilon()))),-this.learningRate),r);r.assign(l)})}),this.incrementIterations()}dispose(){this.accumulatedGrads!=null&&Y(this.accumulatedGrads.map(e=>e.variable))}async getWeights(){return[await this.saveIterations()].concat(this.accumulatedGrads.map(e=>({name:e.originalName,tensor:e.variable})))}async setWeights(e){e=await this.extractIterations(e);let t=!1;this.accumulatedGrads=e.map(n=>({originalName:n.name,variable:n.tensor.variable(t)}))}getConfig(){return{learningRate:this.learningRate,initialAccumulatorValue:this.initialAccumulatorValue}}static fromConfig(e,t){return new e(t.learningRate,t.initialAccumulatorValue)}};M0.className="Adagrad";di(M0);var z0=class extends _a{constructor(e,t,n,s=null){super(),this.learningRate=e,this.beta1=t,this.beta2=n,this.epsilon=s,this.accumulatedFirstMoment=[],this.accumulatedSecondMoment=[],X(()=>{this.accBeta1=Ce(t).variable(),this.accBeta2=Ce(n).variable()}),s==null&&(this.epsilon=L.backend.epsilon())}applyGradients(e){let t=Array.isArray(e)?e.map(n=>n.name):Object.keys(e);X(()=>{let n=ye(1,this.accBeta1),s=ye(1,this.accBeta2);t.forEach((r,a)=>{let o=L.registeredVariables[r],i=!1;this.accumulatedFirstMoment[a]==null&&(this.accumulatedFirstMoment[a]={originalName:`${r}/m`,variable:X(()=>ct(o).variable(i))}),this.accumulatedSecondMoment[a]==null&&(this.accumulatedSecondMoment[a]={originalName:`${r}/v`,variable:X(()=>ct(o).variable(i))});let l=Array.isArray(e)?e[a].tensor:e[r];if(l==null)return;let u=this.accumulatedFirstMoment[a].variable,c=this.accumulatedSecondMoment[a].variable,p=le(M(u,this.beta1),M(l,1-this.beta1)),d=le(M(c,this.beta2),M(bt(l),1-this.beta2)),h=ge(p,n),f=ge(d,s);u.assign(p),c.assign(d);let m=le(M(ge(h,le(Ln(f),this.epsilon)),-this.learningRate),o);o.assign(m)}),this.accBeta1.assign(M(this.accBeta1,this.beta1)),this.accBeta2.assign(M(this.accBeta2,this.beta2))}),this.incrementIterations()}dispose(){this.accBeta1.dispose(),this.accBeta2.dispose(),this.accumulatedFirstMoment!=null&&Y(this.accumulatedFirstMoment.map(e=>e.variable)),this.accumulatedSecondMoment!=null&&Y(this.accumulatedSecondMoment.map(e=>e.variable))}async getWeights(){let e=[...this.accumulatedFirstMoment,...this.accumulatedSecondMoment];return[await this.saveIterations()].concat(e.map(t=>({name:t.originalName,tensor:t.variable})))}async setWeights(e){e=await this.extractIterations(e),X(()=>{this.accBeta1.assign(Ia(this.beta1,this.iterations_+1)),this.accBeta2.assign(Ia(this.beta2,this.iterations_+1))});let t=e.length/2,n=!1;this.accumulatedFirstMoment=e.slice(0,t).map(s=>({originalName:s.name,variable:s.tensor.variable(n)})),this.accumulatedSecondMoment=e.slice(t,t*2).map(s=>({originalName:s.name,variable:s.tensor.variable(n)}))}getConfig(){return{learningRate:this.learningRate,beta1:this.beta1,beta2:this.beta2,epsilon:this.epsilon}}static fromConfig(e,t){return new e(t.learningRate,t.beta1,t.beta2,t.epsilon)}};z0.className="Adam";di(z0);var L0=class extends _a{constructor(e,t,n,s=null,r=0){super(),this.learningRate=e,this.beta1=t,this.beta2=n,this.epsilon=s,this.decay=r,this.accumulatedFirstMoment=[],this.accumulatedWeightedInfNorm=[],X(()=>{this.iteration=Ce(0).variable(),this.accBeta1=Ce(t).variable()}),s==null&&(this.epsilon=L.backend.epsilon())}applyGradients(e){let t=Array.isArray(e)?e.map(n=>n.name):Object.keys(e);X(()=>{let n=ye(1,this.accBeta1),s=ge(-this.learningRate,le(M(this.iteration,this.decay),1));t.forEach((r,a)=>{let o=L.registeredVariables[r],i=!1;this.accumulatedFirstMoment[a]==null&&(this.accumulatedFirstMoment[a]={originalName:`${r}/m`,variable:ct(o).variable(i)}),this.accumulatedWeightedInfNorm[a]==null&&(this.accumulatedWeightedInfNorm[a]={originalName:`${r}/v`,variable:ct(o).variable(i)});let l=Array.isArray(e)?e[a].tensor:e[r];if(l==null)return;let u=this.accumulatedFirstMoment[a].variable,c=this.accumulatedWeightedInfNorm[a].variable,p=le(M(u,this.beta1),M(l,1-this.beta1)),d=M(c,this.beta2),h=rn(l),f=oa(d,h);u.assign(p),c.assign(f);let m=le(M(ge(s,n),ge(p,le(f,this.epsilon))),o);o.assign(m)}),this.iteration.assign(le(this.iteration,1)),this.accBeta1.assign(M(this.accBeta1,this.beta1))}),this.incrementIterations()}dispose(){this.accBeta1.dispose(),this.iteration.dispose(),this.accumulatedFirstMoment!=null&&Y(this.accumulatedFirstMoment.map(e=>e.variable)),this.accumulatedWeightedInfNorm!=null&&Y(this.accumulatedWeightedInfNorm.map(e=>e.variable))}async getWeights(){throw new Error("getWeights() is not implemented for Adamax yet.")}async setWeights(e){throw new Error("setWeights() is not implemented for Adamax yet.")}getConfig(){return{learningRate:this.learningRate,beta1:this.beta1,beta2:this.beta2,epsilon:this.epsilon,decay:this.decay}}static fromConfig(e,t){return new e(t.learningRate,t.beta1,t.beta2,t.epsilon,t.decay)}};L0.className="Adamax";di(L0);var hh=class extends _a{constructor(e){super(),this.learningRate=e,this.setLearningRate(e)}applyGradients(e){(Array.isArray(e)?e.map(n=>n.name):Object.keys(e)).forEach((n,s)=>{let r=Array.isArray(e)?e[s].tensor:e[n];if(r==null)return;let a=L.registeredVariables[n];X(()=>{let o=le(M(this.c,r),a);a.assign(o)})}),this.incrementIterations()}setLearningRate(e){this.learningRate=e,this.c!=null&&this.c.dispose(),this.c=Cn(Ce(-e))}dispose(){this.c.dispose()}async getWeights(){return[await this.saveIterations()]}async setWeights(e){if(e=await this.extractIterations(e),e.length!==0)throw new Error("SGD optimizer does not have settable weights.")}getConfig(){return{learningRate:this.learningRate}}static fromConfig(e,t){return new e(t.learningRate)}};hh.className="SGD";di(hh);var B0=class extends hh{constructor(e,t,n=!1){super(e),this.learningRate=e,this.momentum=t,this.useNesterov=n,this.accumulations=[],this.m=Ce(this.momentum)}applyGradients(e){(Array.isArray(e)?e.map(n=>n.name):Object.keys(e)).forEach((n,s)=>{let r=L.registeredVariables[n];this.accumulations[s]==null&&(this.accumulations[s]={originalName:`${n}/momentum`,variable:X(()=>ct(r).variable(!1))});let a=this.accumulations[s].variable,o=Array.isArray(e)?e[s].tensor:e[n];o!=null&&X(()=>{let i,l=le(M(this.m,a),o);this.useNesterov?i=le(M(this.c,le(o,M(l,this.m))),r):i=le(M(this.c,l),r),a.assign(l),r.assign(i)})}),this.incrementIterations()}dispose(){this.m.dispose(),this.accumulations!=null&&Y(this.accumulations.map(e=>e.variable))}setMomentum(e){this.momentum=e}async getWeights(){return[await this.saveIterations()].concat(this.accumulations.map(e=>({name:e.originalName,tensor:e.variable})))}async setWeights(e){e=await this.extractIterations(e);let t=!1;this.accumulations=e.map(n=>({originalName:n.name,variable:n.tensor.variable(t)}))}getConfig(){return{learningRate:this.learningRate,momentum:this.momentum,useNesterov:this.useNesterov}}static fromConfig(e,t){return new e(t.learningRate,t.momentum,t.useNesterov)}};B0.className="Momentum";di(B0);var W0=class extends _a{constructor(e,t=.9,n=0,s=null,r=!1){if(super(),this.learningRate=e,this.decay=t,this.momentum=n,this.epsilon=s,this.accumulatedMeanSquares=[],this.accumulatedMoments=[],this.accumulatedMeanGrads=[],this.centered=r,s==null&&(this.epsilon=L.backend.epsilon()),e==null)throw new Error("learningRate for RMSPropOptimizer must be defined.")}applyGradients(e){(Array.isArray(e)?e.map(n=>n.name):Object.keys(e)).forEach((n,s)=>{let r=L.registeredVariables[n],a=!1;this.accumulatedMeanSquares[s]==null&&(this.accumulatedMeanSquares[s]={originalName:`${n}/rms`,variable:X(()=>ct(r).variable(a))}),this.accumulatedMoments[s]==null&&(this.accumulatedMoments[s]={originalName:`${n}/momentum`,variable:X(()=>ct(r).variable(a))}),this.accumulatedMeanGrads[s]==null&&this.centered&&(this.accumulatedMeanGrads[s]={originalName:`${n}/mg`,variable:X(()=>ct(r).variable(a))});let o=Array.isArray(e)?e[s].tensor:e[n];if(o==null)return;let i=this.accumulatedMeanSquares[s].variable,l=this.accumulatedMoments[s].variable;X(()=>{let u=le(M(i,this.decay),M(bt(o),1-this.decay));if(this.centered){let c=this.accumulatedMeanGrads[s].variable,p=le(M(c,this.decay),M(o,1-this.decay)),d=ge(M(o,this.learningRate),Ln(ye(u,le(bt(p),this.epsilon)))),h=le(M(l,this.momentum),d);i.assign(u),c.assign(p),l.assign(h);let f=ye(r,h);r.assign(f)}else{let c=le(M(i,this.decay),M(bt(o),1-this.decay)),p=le(M(l,this.momentum),ge(M(o,this.learningRate),Ln(le(c,this.epsilon))));i.assign(c),l.assign(p);let d=ye(r,p);r.assign(d)}})}),this.incrementIterations()}dispose(){this.accumulatedMeanSquares!=null&&Y(this.accumulatedMeanSquares.map(e=>e.variable)),this.accumulatedMeanGrads!=null&&this.centered&&Y(this.accumulatedMeanGrads.map(e=>e.variable)),this.accumulatedMoments!=null&&Y(this.accumulatedMoments.map(e=>e.variable))}async getWeights(){let e=[...this.accumulatedMeanSquares,...this.accumulatedMoments];return this.centered&&e.push(...this.accumulatedMeanGrads),[await this.saveIterations()].concat(e.map(t=>({name:t.originalName,tensor:t.variable})))}async setWeights(e){e=await this.extractIterations(e);let t=this.centered?e.length/3:e.length/2,n=!1;this.accumulatedMeanSquares=e.slice(0,t).map(s=>({originalName:s.name,variable:s.tensor.variable(n)})),this.accumulatedMoments=e.slice(t,t*2).map(s=>({originalName:s.name,variable:s.tensor.variable(n)})),this.centered&&(this.accumulatedMeanGrads=e.slice(t*2,t*3).map(s=>({originalName:s.name,variable:s.tensor.variable(n)})))}getConfig(){return{learningRate:this.learningRate,decay:this.decay,momentum:this.momentum,epsilon:this.epsilon,centered:this.centered}}static fromConfig(e,t){return new e(t.learningRate,t.decay,t.momentum,t.epsilon,t.centered)}};W0.className="RMSProp";di(W0);var ja=class{static sgd(e){return new hh(e)}static momentum(e,t,n=!1){return new B0(e,t,n)}static rmsprop(e,t=.9,n=0,s=null,r=!1){return new W0(e,t,n,s,r)}static adam(e=.001,t=.9,n=.999,s=null){return new z0(e,t,n,s)}static adadelta(e=.001,t=.95,n=null){return new O0(e,t,n)}static adamax(e=.002,t=.9,n=.999,s=null,r=0){return new L0(e,t,n,s,r)}static adagrad(e,t=.1){return new M0(e,t)}},zi={sgd:ja.sgd,momentum:ja.momentum,adadelta:ja.adadelta,adagrad:ja.adagrad,rmsprop:ja.rmsprop,adamax:ja.adamax,adam:ja.adam},kL=(()=>typeof requestAnimationFrame!="undefined"?requestAnimationFrame:typeof setImmediate!="undefined"?setImmediate:e=>e())();function UA(){return new Promise(e=>kL(()=>e()))}var T={};We(T,{ERF_A1:()=>zL,ERF_A2:()=>LL,ERF_A3:()=>BL,ERF_A4:()=>WL,ERF_A5:()=>VL,ERF_P:()=>ML,PARALLELIZE_THRESHOLD:()=>GA,RowPartitionType:()=>Xr,SELU_SCALE:()=>fk,SELU_SCALEALPHA:()=>hk,applyActivation:()=>P0,assertAndGetBroadcastShape:()=>vt,assertAxesAreInnerMostDims:()=>EF,assertParamsConsistent:()=>SL,assignToTypedArray:()=>XL,axesAreInnerMostDims:()=>fA,calculateShapes:()=>qw,checkEinsumDimSizes:()=>eB,checkPadOnDimRoundingMode:()=>us,combineLocations:()=>g6,combineRaggedTensorToTensorShapes:()=>CL,complexWithEvenIndex:()=>HL,complexWithOddIndex:()=>jL,computeConv2DInfo:()=>Qp,computeConv3DInfo:()=>l6,computeDefaultPad:()=>Zy,computeDilation2DInfo:()=>RP,computeOptimalWindowSize:()=>RL,computeOutAndReduceShapes:()=>y6,computeOutShape:()=>IL,computePool2DInfo:()=>i6,computePool3DInfo:()=>_P,convertConv2DDataFormat:()=>u6,decodeEinsumEquation:()=>JL,eitherStridesOrDilationsAreOne:()=>aa,expandShapeToKeepDim:()=>nl,exponent:()=>ZL,exponents:()=>KL,fromStringArrayToUint8:()=>vB,fromUint8ToStringArray:()=>bB,getAxesPermutation:()=>A6,getBroadcastDims:()=>Gw,getComplexWithIndex:()=>qL,getEinsumComputePath:()=>tB,getEinsumPermutation:()=>QL,getFusedBiasGradient:()=>$0,getFusedDyActivation:()=>D0,getImageCenter:()=>_L,getInnerMostAxes:()=>RF,getPermuted:()=>$L,getRaggedRank:()=>NL,getReductionAxes:()=>on,getReshaped:()=>DL,getReshapedPermuted:()=>PL,getRowPartitionTypesHelper:()=>TL,getSliceBeginCoords:()=>FL,getSliceSize:()=>OL,getSparseFillEmptyRowsIndicesDenseShapeMismatch:()=>aB,getSparseFillEmptyRowsNegativeIndexErrorMessage:()=>oB,getSparseFillEmptyRowsOutOfRangeIndexErrorMessage:()=>iB,getSparseReshapeEmptyTensorZeroOutputDimErrorMessage:()=>cB,getSparseReshapeInputOutputMismatchErrorMessage:()=>pB,getSparseReshapeInputOutputMultipleErrorMessage:()=>dB,getSparseReshapeMultipleNegativeOneOutputDimErrorMessage:()=>lB,getSparseReshapeNegativeOutputDimErrorMessage:()=>uB,getSparseSegmentReductionIndicesOutOfRangeErrorMessage:()=>gB,getSparseSegmentReductionNegativeSegmentIdsErrorMessage:()=>hB,getSparseSegmentReductionNonIncreasingSegmentIdsErrorMessage:()=>fB,getSparseSegmentReductionSegmentIdOutOfRangeErrorMessage:()=>mB,getUndoAxesPermutation:()=>mA,isIdentityPermutation:()=>nB,log:()=>Q_,mergeRealAndImagArrays:()=>UL,prepareAndValidate:()=>jw,prepareSplitSize:()=>rB,segment_util:()=>mk,shouldFuse:()=>F0,slice_util:()=>Gt,splitRealAndImagArrays:()=>GL,tupleValuesAreOne:()=>ao,upcastType:()=>jn,validateDefaultValueShape:()=>EL,validateInput:()=>zy,validateUpdateShape:()=>My,warn:()=>Xa});function SL(e,t){let n=e[0].length;e.forEach((r,a)=>{P(r.length===n,()=>`Error in concat${n}D: rank of tensors[${a}] must be the same as the rank of the rest (${n})`)}),P(t>=0&&t`Error in concat${n}D: axis must be between 0 and ${n-1}.`);let s=e[0];e.forEach((r,a)=>{for(let o=0;o`Error in concat${n}D: Shape of tensors[${a}] (${r}) does not match the shape of the rest (${s}) along the non-concatenated axis ${a}.`)})}function IL(e,t){let n=e[0].slice();for(let s=1;s=0)if(i>=0){if(i!==a)throw new Error(`rt input.shape and shape=${t} are incompatible: rt input.shape[${r+e}] = ${a} but shape[${r+e}] = ${i}`)}else s[o]=a}return s}function TL(e){let t={FIRST_DIM_SIZE:Xr.FIRST_DIM_SIZE,VALUE_ROWIDS:Xr.VALUE_ROWIDS,ROW_LENGTHS:Xr.ROW_LENGTHS,ROW_SPLITS:Xr.ROW_SPLITS,ROW_LIMITS:Xr.ROW_LIMITS,ROW_STARTS:Xr.ROW_STARTS},n=[];for(let s of e)if(s in t)n.push(t[s]);else break;return n}function NL(e){return e.length===0?0:e[0]===Xr.FIRST_DIM_SIZE?e.length-1:e.length}function EL(e,t){if(e==null||t==null)return;let n=e.length,s=t.length;if(n>=s)throw new Error(`defaultValue.shape=${e} and ragged tensor flatValues.shape=${t}, are incompatible: defaultValue.rank = ${n} must be less than ragged tensor input flatValues.rank = ${s})`);for(let r=0;r=0&&o>=0&&a!==1&&a!==o)throw new Error(`defaultValue.shape=${e}, and ragged tensor input flatValues.shape=${t} are incompatible: defaultValue.shape[${r-e.length}] = ${a} but ragged tensor input.flatValues.shape[${r-e.length}] = ${o}`)}}var GA=30;function RL(e){return e<=GA?e:em(e,Math.floor(Math.sqrt(e)))}function _L(e,t,n){let s=n*(typeof e=="number"?e:e[0]),r=t*(typeof e=="number"?e:e[1]);return[s,r]}function DL(e,t,n,s=!0){let r=[];if(s)r=r.concat(t.slice(0)),r.push(e[0]/n),r=r.concat(e.slice(1));else{r=r.concat(e[0]);let a=t.length;for(let o=0;o=t*2+1||o%2===1?a.push(o):r.push(o);s.push(...r),s.push(0),s.push(...a)}return s}function PL(e,t,n,s=!0){let r=[];s?r.push(e[0]/n):r.push(e[0]*n);for(let a=1;a/g,kv=",",Sv="...";function JL(e,t){e=e.replace(/\s/g,"");let n=(e.length-e.replace(YL,"").length)/t3.length;if(n<1)throw new Error("Equations without an arrow are not supported.");if(n>1)throw new Error(`Equation must contain exactly one arrow ("${t3}").`);let[s,r]=e.split(t3);P(s.indexOf(Sv)===-1,()=>`The ellipsis notation ("${Sv}") is not supported yet.`);let a=s.split(kv),o=a.length;if(t!==o)throw new Error(`Expected ${o} input tensors, received ${t}`);if(o>2)throw new Error("Support for more than 2 input tensors is not implemented yet.");let i=[];for(let d=0;df.indexOf(h)!==-1))throw new Error(`Output subscripts contain the label ${h} not present in the input subscripts.`);i.indexOf(h)===-1&&i.push(h)}for(let d=0;dr!==-1),{permutationIndices:n,expandDims:s}}function eB(e,t,n){let s=new Array(e);for(let r=0;r`Expected dimension ${s[t[r][o]]} at axis ${o} of input shaped ${JSON.stringify(a)}, but got dimension ${a[o]}`)}}function tB(e,t){let n=e,s=[],r=0;e.length===0&&n.push(-1),r=e.length+1;for(let o=0;ot===n)}function sB(e,t){let n=[];for(let s=0;s"Number of splits must evenly divide the axis."),s=new Array(t).fill(e.shape[n]/t);else{let r=t.reduce((o,i)=>(i===-1&&(o+=1),o),0);P(r<=1,()=>"There should be only one negative value in split array.");let a=t.indexOf(-1);if(a!==-1){let o=t.reduce((i,l)=>l>0?i+l:i);t[a]=e.shape[n]-o}P(e.shape[n]===t.reduce((o,i)=>o+i),()=>"The sum of sizes must match the size of the axis dimension."),s=t}return s}function aB(e){return`Received SparseTensor with denseShape[0] = 0 but + indices.shape[0] = ${e}`}function oB(e,t){return`indices(${e}, 0) is invalid: ${t} < 0`}function iB(e,t,n){return`indices(${e}, 0) is invalid: ${t} >= ${n}`}function lB(e,t){return`only one output dimension may be -1, not both ${e} and ${t}`}function uB(e,t){return`size ${e} must be non-negative, not ${t}`}function cB(){return"reshape cannot infer the missing input size for an empty tensor unless all specified input sizes are non-zero"}function dB(e,t){let n=It(e),s=It(t);return`Input to reshape is a SparseTensor with ${n} + dense values, but the requested shape requires a multiple of ${s}. inputShape=${e} outputShape= ${t}`}function pB(e,t){let n=It(e),s=It(t);return`Input to reshape is a tensor with ${n} dense values, but the requested shape has ${s}. inputShape=${e} outputShape=${t}`}function hB(){return"segment ids must be >= 0"}function fB(){return"segment ids are not increasing"}function mB(e,t){return`Segment id ${e} out of range [0, ${t}), possibly because segmentIds input is not sorted.`}function gB(e,t,n){return`Bad: indices[${e}] == ${t} out of range [0, ${n})`}var mk={};We(mk,{collectGatherOpShapeInfo:()=>xB,computeOutShape:()=>AB,segOpComputeOptimalWindowSize:()=>yB});function yB(e,t){let n=!1,s;for(e<=GA?(s=e,n=!0):s=em(e,Math.floor(Math.sqrt(e)));!n;)s>t||s===e?n=!0:s=em(e,s+1);return s}function AB(e,t,n){let s=[],r=e.length;for(let a=0;ar))throw new Error(`Expect batchDims in the range of [-${r}, ${r}], but got ${s}`);if(s<0&&(s+=r),s>a)throw new Error(`batchDims (${s}) must be less than rank(x) ( + ${a}).`);if(nrm(t))}catch(t){throw new Error(`Failed to decode encoded string bytes into utf-8, error: ${t}`)}}function vB(e){return e.map(t=>jp(t))}var Ar={};We(Ar,{nonMaxSuppressionV3Impl:()=>sk,nonMaxSuppressionV4Impl:()=>rk,nonMaxSuppressionV5Impl:()=>ak,whereImpl:()=>j6});var gk={kernelName:dl,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>M(e,ou(me(n,"float32"),-1))}}},wB={kernelName:gc,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>{let s=bt(me(n,"float32")),r=Ln(ye(Ce(1),s));return Dt(ge(e,r))}}}},kB={kernelName:yc,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>{let s=Ln(ye(bt(me(n,"float32")),1));return ge(e,s)}}}},SB={kernelName:Ta,inputsToSave:["a","b"],gradFunc:(e,t)=>{let[n,s]=t,r=vt(n.shape,s.shape);return{a:()=>{let i=e,l=on(n.shape,r);return l.length>0&&(i=ve(i,l)),W(i,n.shape)},b:()=>{let i=e,l=on(s.shape,r);return l.length>0&&(i=ve(i,l)),W(i,s.shape)}}}},IB={kernelName:go,saveAllInputs:!0,gradFunc:(e,t)=>{let n={};return t.forEach((s,r)=>{n[r]=()=>e.clone()}),n}},CB={kernelName:yo,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>ct(n)}}},TB={kernelName:bc,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>ct(n)}}},NB={kernelName:vc,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>ge(e,Ln(ye(Ce(1),bt(me(n,"float32")))))}}},EB={kernelName:wc,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>{let s=Ln(le(Ce(1),bt(me(n,"float32"))));return ge(e,s)}}}},RB={kernelName:pl,inputsToSave:["a","b"],gradFunc:(e,t)=>{let[n,s]=t,r=vt(n.shape,s.shape);return{a:()=>{let i=le(bt(n),bt(s)),l=M(e,ge(s,i)),u=on(n.shape,r);return u.length>0&&(l=ve(l,u)),W(l,n.shape)},b:()=>{let i=le(bt(n),bt(s)),l=Dt(M(e,ge(n,i))),u=on(s.shape,r);return u.length>0&&(l=ve(l,u)),W(l,s.shape)}}}},_B={kernelName:kc,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>ge(e,le(bt(me(n,"float32")),1))}}},DB={kernelName:Sc,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>ge(e,ye(Ce(1),bt(me(n,"float32"))))}}};function $B(e,t,n,s,r,a){let o=_(e,"dy","avgPool3dGrad"),i=_(t,"input","avgPool3dGrad"),l=o,u=i,c=!1;i.rank===4&&(c=!0,l=W(o,[1,o.shape[0],o.shape[1],o.shape[2],o.shape[3]]),u=W(i,[1,i.shape[0],i.shape[1],i.shape[2],i.shape[3]])),P(l.rank===5,()=>`Error in avgPool3dGrad: dy must be rank 5 but got rank ${l.rank}.`),P(u.rank===5,()=>`Error in avgPool3dGrad: input must be rank 5 but got rank ${u.rank}.`),us("avgPool3dGrad",r,a);let p={dy:l,input:u},d={filterSize:n,strides:s,pad:r,dimRoundingMode:a},h=L.runKernel($m,p,d);return c?W(h,[h.shape[1],h.shape[2],h.shape[3],h.shape[4]]):h}var PB=B({avgPool3dGrad_:$B}),FB={kernelName:Np,inputsToSave:["x"],gradFunc:(e,t,n)=>{let[s]=t,{filterSize:r,strides:a,pad:o,dimRoundingMode:i}=n;return{x:()=>PB(e,s,r,a,o,i)}}};function OB(e,t,n,s,r){let a=_(e,"dy","avgPoolGrad"),o=_(t,"input","avgPoolGrad");P(o.rank===a.rank,()=>`Rank of input (${o.rank}) does not match rank of dy (${a.rank})`);let i=o,l=a,u=!1;o.rank===3&&(u=!0,i=W(o,[1,o.shape[0],o.shape[1],o.shape[2]]),l=W(a,[1,a.shape[0],a.shape[1],a.shape[2]])),P(l.rank===4,()=>`Error in avgPoolGrad: dy must be rank 4 but got rank ${l.rank}.`),P(i.rank===4,()=>`Error in avgPoolGrad: input must be rank 4 but got rank ${i.rank}.`);let c={dy:l,input:i},p={filterSize:n,strides:s,pad:r},d=L.runKernel(Dm,c,p);return u?W(d,[d.shape[1],d.shape[2],d.shape[3]]):d}var MB=B({avgPoolGrad_:OB}),zB={kernelName:Ao,inputsToSave:["x"],gradFunc:(e,t,n)=>{let[s]=t,{filterSize:r,strides:a,pad:o}=n;return{x:()=>MB(e,s,r,a,o)}}},LB={kernelName:xo,inputsToSave:["a","b"],gradFunc:(e,t,n)=>{let[s,r]=t,{transposeA:a,transposeB:o}=n;return!a&&!o?{a:()=>et(e,r,!1,!0),b:()=>et(s,e,!0,!1)}:!a&&o?{a:()=>et(e,r,!1,!1),b:()=>et(e,s,!0,!1)}:a&&!o?{a:()=>et(r,e,!1,!0),b:()=>et(s,e,!1,!1)}:{a:()=>et(r,e,!0,!0),b:()=>et(e,s,!0,!0)}}},BB={kernelName:hl,gradFunc:(e,t,n)=>{let{blockShape:s,crops:r}=n;return{x:()=>lh(e,s,r)}}},WB={kernelName:mw,gradFunc:(e,t,n)=>{let s=n,r=s.inputShape,a=s.shape,o=Array.from(a);for(let l=r.length-1;l>=0;l--)if(r[l]===a[l])o[l]=1;else if(r[l]!==1)throw new Error(`broadcastTo(): [${r}] cannot be broadcast to [${a}].`);let i=[];for(let l=0;l1&&i.push(l);return{x:()=>ve(e,i,!0)}}},VB={kernelName:bo,gradFunc:e=>({x:()=>e.clone()})},UB={kernelName:vo,gradFunc:e=>({x:()=>ct(e)})},GB={kernelName:Na,inputsToSave:["x"],gradFunc:(e,t,n)=>{let[s]=t,{clipValueMin:r,clipValueMax:a}=n;return{x:()=>qn(gr(pi(s,r),hi(s,a)),e,ct(e))}}},HB={kernelName:Rp,inputsToSave:["x"],gradFunc:gk.gradFunc},jB={kernelName:fl,saveAllInputs:!0,gradFunc:(e,t,n)=>{let s=t.map(l=>l.shape),{axis:r}=n,a=yr(r,t[0].shape)[0],o=s.map(l=>l[a]);return Ht(e,o,a).map(l=>()=>l)}},qB={kernelName:wo,inputsToSave:["x","filter"],gradFunc:(e,t,n)=>{let[s,r]=t,{dilations:a,strides:o,pad:i,dataFormat:l}=n;return P(ao(a),()=>`Error in gradient of conv2D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '${a}'`),{x:()=>oA(s.shape,e,r,o,i,l),filter:()=>BA(s,e,r.shape,o,i,l)}}},XB={kernelName:ko,inputsToSave:["dy","filter"],gradFunc:(e,t,n)=>{let[s,r]=t,{strides:a,pad:o,dataFormat:i,dimRoundingMode:l}=n;return{dy:()=>ka(e,r,a,o,i,1,l),filter:()=>BA(e,s,r.shape,a,o,i,l)}}};function KB(e,t,n,s,r){let a=e;e.rank===4&&(a=W(e,[1,e.shape[0],e.shape[1],e.shape[2],e.shape[3]]));let o=t;o.rank===4&&(o=W(t,[1,t.shape[0],t.shape[1],t.shape[2],t.shape[3]])),P(a.rank===5,()=>`Error in conv3dDerFilter: input must be rank 5, but got shape ${a.shape}.`),P(o.rank===5,()=>`Error in conv3dDerFilter: dy must be rank 5, but got shape ${o.shape}.`),P(n.length===5,()=>`Error in conv3dDerFilter: filterShape must be length 5, but got ${n}.`),P(a.shape[4]===n[3],()=>`Error in conv3dDerFilter: depth of input ${a.shape[4]}) must match input depth in filter (${n[3]}.`),P(o.shape[4]===n[4],()=>`Error in conv3dDerFilter: depth of dy (${o.shape[4]}) must match output depth for filter (${n[4]}).`);let i={x:a,dy:o},l={strides:s,pad:r,filterShape:n};return L.runKernel(Mm,i,l)}var ZB=B({conv3DBackpropFilter_:KB}),YB={kernelName:_p,inputsToSave:["x","filter"],gradFunc:(e,t,n)=>{let{dilations:s,strides:r,pad:a}=n;P(ao(s),()=>`Error in gradient of conv3D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '${s}'`);let[o,i]=t;return{x:()=>p6(o.shape,e,i,r,a),filter:()=>ZB(o,e,i.shape,r,a)}}},JB={kernelName:So,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>M(Dt(S0(me(n,"float32"))),e)}}},QB={kernelName:Io,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>M(I0(me(n,"float32")),e)}}},eW={kernelName:Co,inputsToSave:["x"],gradFunc:(e,t,n)=>{let[s]=t,{axis:r,exclusive:a,reverse:o}=n;return{x:()=>{let i=A6([r],s.rank),l=c0(e,r,a,!o);return i!=null&&(l=tt(l,i)),l}}}},tW={kernelName:To,inputsToSave:["x","filter"],gradFunc:(e,t,n)=>{let{dilations:s,strides:r,pad:a,dimRoundingMode:o}=n,i=s==null?[1,1]:s;P(ao(i),()=>`Error in gradient of depthwiseConv2dNative: dilation rates greater than 1 are not yet supported. Got dilations '${i}'`);let[l,u]=t;return P(l.rank===4,()=>`Error in gradient of depthwiseConv2dNative: input must be rank 4, but got rank ${l.rank}.`),P(u.rank===4,()=>`Error in gradient of depthwiseConv2dNative: filter must be rank 4, but got rank ${u.rank}.`),P(l.shape[3]===u.shape[2],()=>`Error in gradient of depthwiseConv2d: number of input channels (${l.shape[3]}) must match the inChannels dimension in filter ${u.shape[2]}.`),P(aa(r,i),()=>`Error in gradient of depthwiseConv2d: Either strides or dilations must be 1. Got strides ${r} and dilations '${i}'.`),us("depthwiseConv2d",a,o),{x:()=>ek(l.shape,e,u,r,a,i,o),filter:()=>Q6(l,e,u.shape,r,a,i,o)}}},nW={kernelName:Dp,inputsToSave:["x","filter"],gradFunc:(e,t,n)=>{let[s,r]=t,a={x:s,filter:r,dy:e},o={x:s,filter:r,dy:e};return{x:()=>L.runKernel(tm,a,n),filter:()=>L.runKernel(nm,o,n)}}},sW={kernelName:Eo,outputsToSave:[!0],gradFunc:(e,t)=>{let[n]=t,s={dy:e,y:n};return{x:()=>L.runKernel(Um,s)}}},rW={kernelName:Ic,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t,s=M(Os(Dt(bt(n))),2/Math.sqrt(Math.PI));return{x:()=>M(e,s)}}},aW={kernelName:Ro,outputsToSave:[!0],gradFunc:(e,t)=>{let[n]=t;return{x:()=>M(e,n)}}},oW={kernelName:xl,inputsToSave:["input"],gradFunc:(e,t)=>{let[n]=t;return{input:()=>W(e,n.shape)}}},iW={kernelName:bl,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>M(e,Os(n))}}},lW={kernelName:_o,gradFunc:e=>({x:()=>ct(e)})},uW={kernelName:Do,inputsToSave:["a","b"],gradFunc:(e,t)=>{let[n,s]=t,r=vt(n.shape,s.shape);return{a:()=>{let i=ge(e,me(s,"float32")),l=on(n.shape,r);return l.length>0?W(ve(i,l),n.shape):i},b:()=>{let i=M(e,me(n,"float32")),l=on(s.shape,r);l.length>0&&(i=W(ve(i,l),s.shape));let u=bt(s);return Dt(ge(i,me(u,"float32")))}}}},cW={kernelName:$o,inputsToSave:["x","mean","variance","scale"],gradFunc:(e,t,n)=>{let{varianceEpsilon:s}=n,[r,a,o,i]=t,l=i==null?Ce(1):i,u=on(a.shape,r.shape),c=[];if(a.rank===1){for(let b=0;ba.rank===1?W(M(M(e,As(W(h,[1,1,1,a.shape[0]]),c)),l),r.shape):W(M(M(e,h),l),r.shape),mean:()=>{let b=M(M(h,Ce(-1)),d);return a.rank===1&&(b=ve(b,u)),W(b,a.shape)},variance:()=>{let b=M(M(f,p),d);return a.rank===1&&(b=ve(b,u)),W(b,a.shape)},scale:()=>{let b=M(p,h),w=M(e,b);return a.rank===1&&(w=ve(w,u)),W(w,a.shape)},offset:()=>{let b=e;return a.rank===1&&(b=ve(b,u)),W(b,a.shape)}}}},dW={kernelName:wl,inputsToSave:["x","indices"],gradFunc:(e,t,n)=>{let[s,r]=t,{axis:a}=n,o=yr(a,s.shape)[0];return{x:()=>{let l=s.shape,u=r.size,c=l.slice(0,o),p=c.length,d=l.slice(a,l.length).slice(1),h=d.length,f=Iv(0,p),m=Iv(p+1,p+1+h),g=Cv([c,[u],d]),y=W(e,g),x=W(r,[u]),A=Cv([[p],f,m]),b=tt(y,A),w=R0(b,x,s.shape[o]),k=mA(A);return w=tt(w,k),w},indices:()=>r}}};function Iv(e,t){let n=[];for(let s=e;s{let[n,s]=t;return{a:()=>ct(n),b:()=>ct(s)}}},hW={kernelName:Fo,gradFunc:e=>({x:()=>me(e,"float32")})},fW={kernelName:Tc,gradFunc:e=>({x:()=>ct(e)})},mW={kernelName:Nc,gradFunc:e=>({x:()=>ct(e)})},gW={kernelName:Il,gradFunc:e=>({x:()=>ct(e)})},yW={kernelName:Oo,inputsToSave:["x"],gradFunc:(e,t,n)=>{let[s]=t,{alpha:r}=n,a=ks(s,0);return{x:()=>qn(a,e,M(e,r))}}},AW={kernelName:Ec,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>ge(e,le(n,1))}}},xW={kernelName:Mo,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>ge(e,me(n,"float32"))}}},bW={kernelName:yw,inputsToSave:[],outputsToSave:[!0],gradFunc:(e,t,n)=>{let[s]=t,{axis:r}=n;return{logits:()=>{let o=Os(s);return ye(e,M(ve(e,r,!0),o))}}}};function vW(e,t,n,s=5,r=1,a=1,o=.5){let i={x:e,y:t,dy:n},l={depthRadius:s,bias:r,alpha:a,beta:o};return L.runKernel(qm,i,l)}var wW=B({localResponseNormalizationBackprop_:vW}),kW={kernelName:Fp,inputsToSave:["x"],outputsToSave:[!0],gradFunc:(e,t,n)=>{let[s,r]=t,{depthRadius:a,bias:o,alpha:i,beta:l}=n;return{x:()=>wW(s,r,e,a,o,i,l)}}};function yk(e,t,n,s){return t.rankM(e,me(Fs(n,t),e.dtype))}}var Tv={kernelName:zo,inputsToSave:["x"],outputsToSave:[!0],gradFunc:(e,t,n)=>{let s=n,{reductionIndices:r}=s,a=t[0],o=t[1],i=yr(r,a.shape),l=yk(e,o,a,i);return{x:()=>l.x()}}},SW={kernelName:Lo,inputsToSave:["a","b"],gradFunc:(e,t)=>{let[n,s]=t;return{a:()=>M(e,me(pi(n,s),"float32")),b:()=>M(e,me(p0(n,s),"float32"))}}};function IW(e,t,n,s,r,a,o){let i=_(e,"dy","maxPool3dGrad"),l=_(t,"input","maxPool3dGrad"),u=_(n,"output","maxPool3dGrad"),c=i,p=l,d=u,h=!1;l.rank===4&&(h=!0,c=W(i,[1,i.shape[0],i.shape[1],i.shape[2],i.shape[3]]),p=W(l,[1,l.shape[0],l.shape[1],l.shape[2],l.shape[3]]),d=W(u,[1,u.shape[0],u.shape[1],u.shape[2],u.shape[3]])),P(c.rank===5,()=>`Error in maxPool3dGrad: dy must be rank 5 but got rank ${c.rank}.`),P(p.rank===5,()=>`Error in maxPool3dGrad: input must be rank 5 but got rank ${p.rank}.`),P(d.rank===5,()=>`Error in maxPool3dGrad: output must be rank 5 but got rank ${d.rank}.`),us("maxPool3dGrad",a,o);let f={dy:c,input:p,output:d},m={filterSize:s,strides:r,pad:a,dimRoundingMode:o},g=L.runKernel(Km,f,m);return h?W(g,[g.shape[1],g.shape[2],g.shape[3],g.shape[4]]):g}var CW=B({maxPool3dGrad_:IW}),TW={kernelName:Op,inputsToSave:["x"],outputsToSave:[!0],gradFunc:(e,t,n)=>{let[s,r]=t,{filterSize:a,strides:o,pad:i,dimRoundingMode:l}=n;return{x:()=>CW(e,s,r,a,o,i,l)}}};function NW(e,t,n,s,r,a,o){let i=_(e,"dy","maxPoolGrad"),l=_(t,"input","maxPoolGrad"),u=_(n,"output","maxPoolGrad");P(l.rank===i.rank,()=>`Rank of input (${l.rank}) does not match rank of dy (${i.rank})`),P(i.rank===4,()=>`Error in maxPoolGrad: dy must be rank 4 but got rank ${i.rank}.`),P(l.rank===4,()=>`Error in maxPoolGrad: input must be rank 4 but got rank ${l.rank}.`),us("maxPoolGrad",a,o);let c={dy:i,input:l,output:u},p={filterSize:s,strides:r,pad:a,dimRoundingMode:o};return L.runKernel(Xm,c,p)}var EW=B({maxPoolGrad_:NW}),RW={kernelName:Bo,inputsToSave:["x"],outputsToSave:[!0],gradFunc:(e,t,n)=>{let[s,r]=t,{filterSize:a,strides:o,pad:i}=n;return{x:()=>EW(e,s,r,a,o,i)}}},_W={kernelName:Wo,inputsToSave:["x"],gradFunc:(e,t,n)=>{let[s]=t,{axis:r}=n,a=yr(r,s.shape),i=y6(s.shape,a)[1],l=It(i);return{x:()=>{let c=s.shape.slice();a.forEach(h=>{c[h]=1});let p=W(e,c);return ge(M(p,Ds(s.shape,"float32")),l)}}}},DW={kernelName:Vo,inputsToSave:["x"],outputsToSave:[!0],gradFunc:(e,t,n)=>{let s=n,{axis:r}=s,[a,o]=t,i=yr(r,a.shape),l=yk(e,o,a,i);return{x:()=>l.x()}}},$W={kernelName:Uo,inputsToSave:["a","b"],gradFunc:(e,t)=>{let[n,s]=t;return{a:()=>M(e,me(hi(n,s),"float32")),b:()=>M(e,me(ks(n,s),"float32"))}}},PW={kernelName:Go,inputsToSave:["x"],gradFunc:(e,t,n)=>{let s=t[0],{paddings:r}=n,a=r.map(o=>o[0]);return{x:()=>Oe(e,a,s.shape)}}},FW={kernelName:_c,inputsToSave:["a","b"],gradFunc:(e,t)=>{let[n,s]=t,r=vt(n.shape,s.shape);return{a:()=>{let i=on(n.shape,r);return i.length>0?W(ve(e,i),n.shape):e},b:()=>{let i=M(e,Dt(Hc(ge(n,s)))),l=on(s.shape,r);return l.length>0?W(ve(i,l),s.shape):i}}}},OW={kernelName:Ho,inputsToSave:["a","b"],gradFunc:(e,t)=>{let[n,s]=t,r=vt(n.shape,s.shape);return{a:()=>{let i=M(e,me(s,"float32")),l=on(n.shape,r);return l.length>0?W(ve(i,l),n.shape):i},b:()=>{let i=M(e,me(n,"float32")),l=on(s.shape,r);return l.length>0?W(ve(i,l),s.shape):i}}}},MW={kernelName:Rl,gradFunc:e=>({x:()=>Dt(e)})},zW={kernelName:Fl,inputsToSave:["indices"],gradFunc:(e,t)=>{let n=t[0];return{indices:()=>Vt(n.shape,"float32")}}},LW={kernelName:Pl,gradFunc:e=>({x:()=>ct(e)})},BW={kernelName:Ol,saveAllInputs:!0,gradFunc:(e,t,n)=>{let{axis:s}=n;return bn(e,s).map(a=>()=>a)}},Nv={kernelName:jo,inputsToSave:["x"],gradFunc:(e,t,n)=>{let s=t[0],{paddings:r}=n,a=r.map(o=>o[0]);return{x:()=>Oe(e,a,s.shape)}}},WW={kernelName:qo,inputsToSave:["a","b"],outputsToSave:[!0],gradFunc:(e,t)=>{let[n,s,r]=t,a=n,o=s,i=vt(a.shape,o.shape);return{a:()=>{let c=me(o,"float32"),p=M(e,M(c,Ia(a,ye(c,Ce(1))))),d=on(a.shape,i);return d.length>0&&(p=ve(p,d)),W(p,a.shape)},b:()=>{let c=ks(a,0),p=qn(c,Ms(a),ct(a)),d=M(e,M(r,p)),h=on(o.shape,i);return h.length>0&&(d=ve(d,h)),W(d,o.shape)}}}},VW={kernelName:Xo,inputsToSave:["x","alpha"],gradFunc:(e,t)=>{let[n,s]=t,r=ks(n,0);return{x:()=>qn(r,e,M(e,s)),alpha:()=>{let a=qn(r,ct(e),M(e,n)),o=on(s.shape,e.shape);return o.length>0&&(a=ve(a,o)),W(a,s.shape)}}}};function UW(e,t,n){let s=e.shape.slice();s[n]=1;let r=W(t,s),a=mp(e,n,!0,!1),o=mp(e,n,!0,!0),i=M(a,o);return M(r,i)}function GW(e,t,n){let s=e.shape.length,r=s-n.length,a=T.getAxesPermutation(n,s),o=e;a!=null&&(o=tt(e,a));let i=o.shape.slice(),u=i.splice(s-n.length,n.length).reduce((d,h)=>d*h,1);i.push(u);let c=o.reshape(i),p=UW(c,t,r);if(p=p.reshape(o.shape),a!=null){let d=T.getUndoAxesPermutation(a);p=tt(p,d)}return p}var HW={kernelName:Ko,inputsToSave:["x"],gradFunc:(e,t,n)=>{let[s]=t,{axis:r}=n,a=[];return r==null?a=s.shape.map((o,i)=>i):typeof r=="number"?a=[r]:a=r,{x:()=>GW(s,e,a)}}},jW={kernelName:No,inputsToSave:["a","b"],gradFunc:(e,t)=>{let[n,s]=t,r=vt(n.shape,s.shape);return{a:()=>{let i=ge(e,me(s,"float32")),l=on(n.shape,r);return l.length>0?W(ve(i,l),n.shape):i},b:()=>{let i=M(e,me(n,"float32")),l=on(s.shape,r);l.length>0&&(i=W(ve(i,l),s.shape));let u=bt(s);return Dt(ge(i,me(u,"float32")))}}}},qW={kernelName:Ml,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>ge(e,Dt(bt(n)))}}},XW={kernelName:Qo,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t,s=M(hi(n,6),ou(n));return{x:()=>M(e,me(s,"float32"))}}},KW={kernelName:Zo,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>M(e,me(ou(n),"float32"))}}},ZW={kernelName:zl,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>W(e,n.shape)}}},YW={kernelName:Jo,inputsToSave:["images"],gradFunc:(e,t,n)=>{let[s]=t,r={dy:e,images:s};return{images:()=>L.runKernel(t0,r,n)}}},JW={kernelName:Yo,inputsToSave:["images"],gradFunc:(e,t,n)=>{let[s]=t,r={dy:e,images:s};return{images:()=>L.runKernel(e0,r,n)}}},QW={kernelName:Ll,gradFunc:(e,t,n)=>{let{dims:s}=n,r=yr(s,e.shape);return{x:()=>Js(e,r)}}},eV={kernelName:Bl,gradFunc:e=>({x:()=>ct(e)})},tV={kernelName:ei,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>Dt(ge(e,M(Ia(n,1.5),2)))}}},nV={kernelName:Vl,inputsToSave:["condition"],gradFunc:(e,t)=>{let[n]=t;return{condition:()=>me(ct(n),"float32"),t:()=>M(e,me(n,e.dtype)),e:()=>M(e,me(ah(n),e.dtype))}}},sV={kernelName:Pc,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>{let s=ks(n,Ce(0)),r=Ce(hk),a=Ce(fk),o=M(e,a),i=M(M(e,r),Os(me(n,"float32")));return qn(s,o,i)}}}},rV={kernelName:ni,outputsToSave:[!0],gradFunc:(e,t)=>{let[n]=t;return{x:()=>M(e,M(n,ye(Ce(1),n)))}}},aV={kernelName:Fc,gradFunc:e=>({x:()=>ct(e)})},oV={kernelName:ti,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>M(nh(me(n,"float32")),e)}}},iV={kernelName:Gl,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>M(u0(me(n,"float32")),e)}}},lV={kernelName:Ul,inputsToSave:["x"],gradFunc:(e,t,n)=>{let[s]=t,{begin:r,size:a}=n,o=s.shape,[i,l]=n6(s,r,a),u=[];for(let c=0;ctr(e,u)}}},uV={kernelName:ai,outputsToSave:[!0],gradFunc:(e,t,n)=>{let[s]=t,{dim:r}=n,a=!0,o=M(e,s);return{logits:()=>ye(o,M(ve(o,[r],a),s))}}},cV={kernelName:Oc,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>M(e,Mn(n))}}},Ev={kernelName:Hl,gradFunc:(e,t,n)=>{let{blockShape:s,paddings:r}=n;return{x:()=>th(e,s,r)}}},Rv={kernelName:jl,gradFunc:(e,t,n)=>{let{axis:s}=n;return{x:()=>ut(e,s)}}},dV={kernelName:si,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>ge(e,M(Ln(me(n,"float32")),2))}}},pV={kernelName:zc,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>M(e,M(me(n,"float32"),2))}}},hV={kernelName:oi,inputsToSave:["a","b"],gradFunc:(e,t)=>{let[n,s]=t,r=Ce(2);return{a:()=>M(e,M(r,ye(n,s))),b:()=>M(e,M(r,ye(s,n)))}}},fV={kernelName:ui,gradFunc:e=>({x:()=>ct(e)})},mV={kernelName:ii,inputsToSave:["a","b"],gradFunc:(e,t)=>{let[n,s]=t,r=vt(n.shape,s.shape);return{a:()=>{let i=e,l=on(n.shape,r);return l.length>0&&(i=ve(i,l)),W(i,n.shape)},b:()=>{let i=e,l=on(s.shape,r);return l.length>0&&(i=ve(i,l)),W(Dt(i),s.shape)}}}},gV={kernelName:ri,inputsToSave:["x"],gradFunc:(e,t,n)=>{let[s]=t,r=s.shape.slice(),{axis:a}=n;yr(a,s.shape).forEach(u=>{r[u]=1});let i=W(e,r),l=M(i,Ds(s.shape,"float32"));return{x:()=>l}}},yV={kernelName:Xl,inputsToSave:["x"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>ge(e,bt(nh(n)))}}},AV={kernelName:li,outputsToSave:[!0],gradFunc:(e,t)=>{let[n]=t;return{x:()=>M(ye(Ce(1),bt(n)),e)}}},xV={kernelName:Ea,inputsToSave:["x"],gradFunc:(e,t,n)=>{let[s]=t,{reps:r}=n;return{x:()=>{let o=ct(s);if(s.rank===1)for(let i=0;i{let s=n,{perm:r}=s,a=mA(r);return{x:()=>tt(e,a)}}},vV={kernelName:Yl,gradFunc:(e,t,n)=>{let s=n,{axis:r}=s;return{value:()=>ln(e,r)}}},wV={kernelName:Gp,inputsToSave:["segmentIds"],gradFunc:(e,t)=>{let[n]=t;return{x:()=>kV(e,n)}}};function kV(e,t){let n=oa(t,ct(t)),s=jc(e,n),r=pi(t,Ce(0,"int32")),a=s.rank-r.rank;for(let i=0;i({x:()=>ct(e)})},IV=[gk,wB,kB,SB,IB,CB,TB,NB,EB,RB,_B,DB,FB,zB,LB,BB,WB,VB,UB,GB,HB,jB,XB,qB,YB,JB,QB,eW,tW,nW,jW,sW,rW,aW,oW,iW,uW,lW,cW,dW,pW,hW,fW,mW,gW,yW,AW,xW,bW,kW,Tv,Tv,SW,TW,RW,_W,DW,$W,PW,FW,OW,MW,zW,LW,BW,Nv,Nv,WW,VW,HW,qW,XW,KW,ZW,YW,JW,QW,eV,tV,nV,sV,rV,aV,oV,iV,lV,uV,cV,Ev,Ev,Rv,Rv,dV,hV,pV,fV,mV,gV,yV,AV,xV,bV,vV,wV,SV];for(let e of IV)Aw(e);se().prototype.abs=function(){return this.throwIfDisposed(),rn(this)};se().prototype.acos=function(){return this.throwIfDisposed(),Vy(this)};se().prototype.acosh=function(){return this.throwIfDisposed(),Uy(this)};se().prototype.add=function(e){return this.throwIfDisposed(),le(this,e)};se().prototype.all=function(e,t){return this.throwIfDisposed(),o0(this,e,t)};se().prototype.any=function(e,t){return this.throwIfDisposed(),fp(this,e,t)};se().prototype.argMax=function(e){return this.throwIfDisposed(),Ps(this,e)};se().prototype.argMin=function(e){return this.throwIfDisposed(),Gy(this,e)};se().prototype.asScalar=function(){return this.throwIfDisposed(),P(this.size===1,()=>"The array must have only 1 element."),W(this,[])};se().prototype.asType=function(e){return this.throwIfDisposed(),me(this,e)};se().prototype.as1D=function(){return this.throwIfDisposed(),W(this,[this.size])};se().prototype.as2D=function(e,t){return this.throwIfDisposed(),W(this,[e,t])};se().prototype.as3D=function(e,t,n){return this.throwIfDisposed(),W(this,[e,t,n])};se().prototype.as4D=function(e,t,n,s){return this.throwIfDisposed(),W(this,[e,t,n,s])};se().prototype.as5D=function(e,t,n,s,r){return this.throwIfDisposed(),W(this,[e,t,n,s,r])};se().prototype.asin=function(){return this.throwIfDisposed(),Hy(this)};se().prototype.asinh=function(){return this.throwIfDisposed(),jy(this)};se().prototype.atan=function(){return this.throwIfDisposed(),qy(this)};se().prototype.atan2=function(e){return this.throwIfDisposed(),Xy(this,e)};se().prototype.atanh=function(){return this.throwIfDisposed(),Ky(this)};se().prototype.avgPool=function(e,t,n,s){return this.throwIfDisposed(),eh(this,e,t,n,s)};se().prototype.batchToSpaceND=function(e,t){return this.throwIfDisposed(),th(this,e,t)};se().prototype.batchNorm=function(e,t,n,s,r){return this.throwIfDisposed(),Wc(this,e,t,n,s,r)};se().prototype.broadcastTo=function(e){return this.throwIfDisposed(),Xi(this,e)};se().prototype.cast=function(e){return this.throwIfDisposed(),me(this,e)};se().prototype.ceil=function(){return this.throwIfDisposed(),nA(this)};se().prototype.clipByValue=function(e,t){return this.throwIfDisposed(),bs(this,e,t)};se().prototype.concat=function(e,t){return this.throwIfDisposed(),e instanceof st&&(e=[e]),ut([this,...e],t)};se().prototype.conv1d=function(e,t,n,s,r,a){return this.throwIfDisposed(),i0(this,e,t,n,s,r,a)};se().prototype.conv2dTranspose=function(e,t,n,s,r){return this.throwIfDisposed(),l0(this,e,t,n,s,r)};se().prototype.conv2d=function(e,t,n,s,r,a){return this.throwIfDisposed(),ka(this,e,t,n,s,r,a)};se().prototype.cos=function(){return this.throwIfDisposed(),nh(this)};se().prototype.cosh=function(){return this.throwIfDisposed(),u0(this)};se().prototype.cumprod=function(e,t,n){return this.throwIfDisposed(),mp(this,e,t,n)};se().prototype.cumsum=function(e,t,n){return this.throwIfDisposed(),c0(this,e,t,n)};se().prototype.depthToSpace=function(e,t){return this.throwIfDisposed(),uA(this,e,t)};se().prototype.depthwiseConv2d=function(e,t,n,s,r,a){return this.throwIfDisposed(),Vc(this,e,t,n,s,r,a)};se().prototype.dilation2d=function(e,t,n,s,r){return this.throwIfDisposed(),cA(this,e,t,n,s,r)};se().prototype.divNoNan=function(e){return this.throwIfDisposed(),dA(this,e)};se().prototype.div=function(e){return this.throwIfDisposed(),ge(this,e)};se().prototype.dot=function(e){return this.throwIfDisposed(),pA(this,e)};se().prototype.elu=function(){return this.throwIfDisposed(),Uc(this)};se().prototype.equal=function(e){return this.throwIfDisposed(),Fs(this,e)};se().prototype.erf=function(){return this.throwIfDisposed(),hA(this)};se().prototype.euclideanNorm=function(e,t){return this.throwIfDisposed(),gA(this,e,t)};se().prototype.exp=function(){return this.throwIfDisposed(),Os(this)};se().prototype.expandDims=function(e){return this.throwIfDisposed(),Ft(this,e)};se().prototype.expm1=function(){return this.throwIfDisposed(),yA(this)};se().prototype.fft=function(){return this.throwIfDisposed(),dh(this)};se().prototype.flatten=function(){return this.throwIfDisposed(),W(this,[this.size])};se().prototype.floor=function(){return this.throwIfDisposed(),Hc(this)};se().prototype.floorDiv=function(e){return this.throwIfDisposed(),Bc(this,e)};se().prototype.gather=function(e,t){return this.throwIfDisposed(),jc(this,e,t)};se().prototype.greaterEqual=function(e){return this.throwIfDisposed(),pi(this,e)};se().prototype.greater=function(e){return this.throwIfDisposed(),ks(this,e)};se().prototype.ifft=function(){return this.throwIfDisposed(),sc(this)};se().prototype.irfft=function(){return this.throwIfDisposed(),T0(this)};se().prototype.isFinite=function(){return this.throwIfDisposed(),AA(this)};se().prototype.isInf=function(){return this.throwIfDisposed(),xA(this)};se().prototype.isNaN=function(){return this.throwIfDisposed(),bA(this)};se().prototype.leakyRelu=function(e){return this.throwIfDisposed(),sh(this,e)};se().prototype.lessEqual=function(e){return this.throwIfDisposed(),hi(this,e)};se().prototype.less=function(e){return this.throwIfDisposed(),p0(this,e)};se().prototype.localResponseNormalization=function(e,t,n,s){return this.throwIfDisposed(),vA(this,e,t,n,s)};se().prototype.logSigmoid=function(){return this.throwIfDisposed(),wA(this)};se().prototype.logSoftmax=function(e){return this.throwIfDisposed(),f0(this,e)};se().prototype.logSumExp=function(e,t){return this.throwIfDisposed(),m0(this,e,t)};se().prototype.log=function(){return this.throwIfDisposed(),Ms(this)};se().prototype.log1p=function(){return this.throwIfDisposed(),rh(this)};se().prototype.logicalAnd=function(e){return this.throwIfDisposed(),gr(this,e)};se().prototype.logicalNot=function(){return this.throwIfDisposed(),ah(this)};se().prototype.logicalOr=function(e){return this.throwIfDisposed(),g0(this,e)};se().prototype.logicalXor=function(e){return this.throwIfDisposed(),kA(this,e)};se().prototype.matMul=function(e,t,n){return this.throwIfDisposed(),et(this,e,t,n)};se().prototype.maxPool=function(e,t,n,s){return this.throwIfDisposed(),oh(this,e,t,n,s)};se().prototype.max=function(e,t){return this.throwIfDisposed(),yn(this,e,t)};se().prototype.maximum=function(e){return this.throwIfDisposed(),oa(this,e)};se().prototype.mean=function(e,t){return this.throwIfDisposed(),Wt(this,e,t)};se().prototype.min=function(e,t){return this.throwIfDisposed(),Sa(this,e,t)};se().prototype.minimum=function(e){return this.throwIfDisposed(),qc(this,e)};se().prototype.mirrorPad=function(e,t){return this.throwIfDisposed(),IA(this,e,t)};se().prototype.mod=function(e){return this.throwIfDisposed(),ru(this,e)};se().prototype.mul=function(e){return this.throwIfDisposed(),M(this,e)};se().prototype.neg=function(){return this.throwIfDisposed(),Dt(this)};se().prototype.norm=function(e,t,n){return this.throwIfDisposed(),Gc(this,e,t,n)};se().prototype.notEqual=function(e){return this.throwIfDisposed(),sl(this,e)};se().prototype.oneHot=function(e,t=1,n=0){return this.throwIfDisposed(),ec(this,e,t,n)};se().prototype.onesLike=function(){return this.throwIfDisposed(),zs(this)};se().prototype.pad=function(e,t){return this.throwIfDisposed(),tr(this,e,t)};se().prototype.pool=function(e,t,n,s,r,a){return this.throwIfDisposed(),CA(this,e,t,n,s,r,a)};se().prototype.pow=function(e){return this.throwIfDisposed(),Ia(this,e)};se().prototype.prelu=function(e){return this.throwIfDisposed(),uh(this,e)};se().prototype.prod=function(e,t){return this.throwIfDisposed(),TA(this,e,t)};se().prototype.reciprocal=function(){return this.throwIfDisposed(),RA(this)};se().prototype.relu=function(){return this.throwIfDisposed(),Lr(this)};se().prototype.relu6=function(){return this.throwIfDisposed(),x0(this)};se().prototype.reshapeAs=function(e){return this.throwIfDisposed(),W(this,e.shape)};se().prototype.reshape=function(e){return this.throwIfDisposed(),W(this,e)};se().prototype.resizeBilinear=function(e,t,n){return this.throwIfDisposed(),ok(this,e,t,n)};se().prototype.resizeNearestNeighbor=function(e,t,n){return this.throwIfDisposed(),ik(this,e,t,n)};se().prototype.reverse=function(e){return this.throwIfDisposed(),Js(this,e)};se().prototype.rfft=function(){return this.throwIfDisposed(),ph(this)};se().prototype.round=function(){return this.throwIfDisposed(),b0(this)};se().prototype.rsqrt=function(){return this.throwIfDisposed(),v0(this)};se().prototype.selu=function(){return this.throwIfDisposed(),w0(this)};se().prototype.separableConv2d=function(e,t,n,s,r,a){return this.throwIfDisposed(),k0(this,e,t,n,s,r,a)};se().prototype.sigmoid=function(){return this.throwIfDisposed(),Mn(this)};se().prototype.sign=function(){return this.throwIfDisposed(),_A(this)};se().prototype.sin=function(){return this.throwIfDisposed(),S0(this)};se().prototype.sinh=function(){return this.throwIfDisposed(),I0(this)};se().prototype.slice=function(e,t){return this.throwIfDisposed(),Oe(this,e,t)};se().prototype.softmax=function(e){return this.throwIfDisposed(),au(this,e)};se().prototype.softplus=function(){return this.throwIfDisposed(),su(this)};se().prototype.spaceToBatchND=function(e,t){return this.throwIfDisposed(),lh(this,e,t)};se().prototype.split=function(e,t){return this.throwIfDisposed(),Ht(this,e,t)};se().prototype.sqrt=function(){return this.throwIfDisposed(),Ln(this)};se().prototype.square=function(){return this.throwIfDisposed(),bt(this)};se().prototype.squaredDifference=function(e){return this.throwIfDisposed(),N0(this,e)};se().prototype.squeeze=function(e){return this.throwIfDisposed(),Ge(this,e)};se().prototype.stack=function(e,t){this.throwIfDisposed();let n=e instanceof st?[this,e]:[this,...e];return ln(n,t)};se().prototype.step=function(e){return this.throwIfDisposed(),ou(this,e)};se().prototype.stridedSlice=function(e,t,n,s,r,a,o,i){return this.throwIfDisposed(),DA(this,e,t,n,s,r,a,o,i)};se().prototype.sub=function(e){return this.throwIfDisposed(),ye(this,e)};se().prototype.sum=function(e,t){return this.throwIfDisposed(),ve(this,e,t)};se().prototype.tan=function(){return this.throwIfDisposed(),$A(this)};se().prototype.tanh=function(){return this.throwIfDisposed(),tl(this)};se().prototype.tile=function(e){return this.throwIfDisposed(),As(this,e)};se().prototype.toBool=function(){return this.throwIfDisposed(),me(this,"bool")};se().prototype.toFloat=function(){return this.throwIfDisposed(),me(this,"float32")};se().prototype.toInt=function(){return this.throwIfDisposed(),me(this,"int32")};se().prototype.topk=function(e,t){return this.throwIfDisposed(),PA(this,e,t)};se().prototype.transpose=function(e){return this.throwIfDisposed(),tt(this,e)};se().prototype.unique=function(e){return this.throwIfDisposed(),FA(this,e)};se().prototype.unsortedSegmentSum=function(e,t){return this.throwIfDisposed(),R0(this,e,t)};se().prototype.unstack=function(e){return this.throwIfDisposed(),bn(this,e)};se().prototype.where=function(e,t){return this.throwIfDisposed(),qn(e,this,t)};se().prototype.zerosLike=function(){return this.throwIfDisposed(),ct(this)};var ma=class extends Error{constructor(e){super(e),Object.setPrototypeOf(this,ma.prototype)}},Rr=class extends Error{constructor(e){super(e),Object.setPrototypeOf(this,Rr.prototype)}},H=class extends Error{constructor(e){super(e),Object.setPrototypeOf(this,H.prototype)}},Ke=class extends Error{constructor(e){super(e),Object.setPrototypeOf(this,Ke.prototype)}},Ak=class extends Error{constructor(e){super(e),Object.setPrototypeOf(this,Ak.prototype)}},xk=class{constructor(e){this.maxEntries=e||100,this.cache=new Map}get(e){let t;return this.cache.has(e)&&(t=this.cache.get(e),this.cache.delete(e),this.cache.set(e,t)),t}put(e,t){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size>=this.maxEntries){let n=this.cache.keys().next().value;this.cache.delete(n)}this.cache.set(e,t)}getMaxEntries(){return this.maxEntries}setMaxEntries(e){if(e<0)throw new Error(`The maxEntries of LRU caches must be at least 0, but got ${e}.`);if(this.maxEntries>e)for(let t=0;tn.toUpperCase())}var cr={};function HA(e){if(e==null)return null;let t={};return t.className=e.getClassName(),t.config=e.getConfig(),t}function N3(e){if(!(e==null||typeof e!="object"))if(Array.isArray(e))e.forEach(t=>N3(t));else{let t=Object.keys(e);for(let n of t){let s=e[n];s!=null&&typeof s=="object"&&(!Array.isArray(s)&&s.type==="ndarray"&&typeof s.value=="number"?e[n]=s.value:N3(s))}}}function fh(e,t={},n={},s="object",r=!1){if(typeof e=="string"){let a=e,o;if(a in n)o=n[a];else if(a in cr)o=cr[a];else if(o=t[a],o==null)throw new H(`Unknown ${s}: ${e}. This may be due to one of the following reasons: 1. The ${s} is defined in Python, in which case it needs to be ported to TensorFlow.js or your JavaScript code. -2. The custom ${s} is defined in JavaScript, but is not registered properly with tf.serialization.registerClass().`);return o}else{let a=e;if(a.className==null||a.config==null)throw new j(`${s}: Improper config format: ${JSON.stringify(a)}. -'className' and 'config' must set.`);let o=a.className,i,l;if(o in n?[i,l]=n[o]:o in cr?[i,l]=cr.className:o in t&&([i,l]=t[o]),i==null)throw new j(`Unknown ${s}: ${o}. This may be due to one of the following reasons: +2. The custom ${s} is defined in JavaScript, but is not registered properly with tf.serialization.registerClass().`);return o}else{let a=e;if(a.className==null||a.config==null)throw new H(`${s}: Improper config format: ${JSON.stringify(a)}. +'className' and 'config' must set.`);let o=a.className,i,l;if(o in n?[i,l]=n[o]:o in cr?[i,l]=cr.className:o in t&&([i,l]=t[o]),i==null)throw new H(`Unknown ${s}: ${o}. This may be due to one of the following reasons: 1. The ${s} is defined in Python, in which case it needs to be ported to TensorFlow.js or your JavaScript code. -2. The custom ${s} is defined in JavaScript, but is not registered properly with tf.serialization.registerClass().`);if(l!=null){let u={};for(let h of Object.keys(cr))u[h]=cr[h];for(let h of Object.keys(n))u[h]=n[h];let c=a.config;c.customObjects=u;let p=Object.assign({},cr);for(let h of Object.keys(n))cr[h]=n[h];K3(a.config);let d=l(i,a.config,n,r);return cr=Object.assign({},p),d}else{let u=Object.assign({},cr);for(let p of Object.keys(n))cr[p]=n[p];let c=new i(a.config);return cr=Object.assign({},u),c}}}function tU(e,t){return et?1:0}function Jf(e,t){return-1*tU(e,t)}function no(e){if(e==null)return e;let t=[];for(let n of e)t.indexOf(n)===-1&&t.push(n);return t}function nU(e){if(e==null)throw new j(`Invalid value in obj: ${JSON.stringify(e)}`);for(let t in e)if(e.hasOwnProperty(t))return!1;return!0}function mu(e,t,n){if(n!=null&&e.indexOf(n)<0)throw new j(`${n} is not a valid ${t}. Valid values are ${e} or null/undefined.`)}function h5(e,t,n=0,s=1/0){return Qr(n>=0),Qr(s>=n),Array.isArray(e)&&e.length>=n&&e.length<=s&&e.every(r=>typeof r===t)}function Nn(e,t){Array.isArray(e)?(v.assert(e.length>0,()=>`${t} is unexpectedly an empty array.`),e.forEach((n,s)=>Nn(n,`element ${s+1} of ${t}`))):v.assert(Number.isInteger(e)&&e>0,()=>`Expected ${t} to be a positive integer, but got ${Ok(e)}.`)}function Ok(e){return e===null?"null":Array.isArray(e)?"["+e.map(t=>Ok(t)).join(",")+"]":typeof e=="string"?`"${e}"`:`${e}`}function sU(e,t,n){let s=n!=null?n():v.now(),r;return(...o)=>{let i=n!=null?n():v.now();return i-s0){let n=`${e}_${t}`;return Zu.set(n,1),n}else return e}var pU=new RegExp(/^[A-Za-z0-9][-A-Za-z0-9\._\/]*$/);function Vk(e){return!!e.match(pU)}function hU(e){return e===parseInt(e.toString(),10)}function so(e,t,n){t==null&&(t=0),n==null&&(n=e.length);let s=1;for(let r=t;rt&&(t=s)}return t}function Wr(e,t){if(t{if(e.shape.length!==2)throw new j(`repeat() expects a rank-2 tensor, but received a rank-${e.shape.length} tensor.`);let n=Dh(e,1);return Z3(n,[1,t,1])})}function mU(e){let t=[so(e.shape)];return V(e,t)}function gU(e){if(e.rank<=1)throw new j(`batchFlatten requires a minimum rank of 2. Got rank: ${e.rank}.`);let t=[e.shape[0],so(e.shape,1)];return V(e,t)}function rl(e,t,n){return Y(()=>{switch(e.rank){case 1:return Th(e,t,n);case 2:return K0(e,[t,0],[n,e.shape[1]]);case 3:return yi(e,[t,0,0],[n,e.shape[1],e.shape[2]]);case 4:return uo(e,[t,0,0,0],[n,e.shape[1],e.shape[2],e.shape[3]]);case 5:return Le(e,[t,0,0,0,0],[n,e.shape[1],e.shape[2],e.shape[3],e.shape[4]]);case 6:return Le(e,[t,0,0,0,0,0],[n,e.shape[1],e.shape[2],e.shape[3],e.shape[4],e.shape[5]]);default:throw new j(`sliceAlongFirstAxis() received an unsupported tensor rank: ${e.rank}`)}})}function S3(e,t,n){return Y(()=>{switch(e.rank){case 1:return Th(e,t,n);case 2:return K0(e,[0,t],[e.shape[0],n]);case 3:return yi(e,[0,0,t],[e.shape[0],e.shape[1],n]);case 4:return uo(e,[0,0,0,t],[e.shape[0],e.shape[1],e.shape[2],n]);default:throw new j(`sliceAlongLastAxis() received an unsupported tensor rank: ${e.rank}`)}})}function em(e,t,n,s){return Y(()=>{switch(e.rank){case 1:return Th(e,t,n);case 2:switch(s){case 1:return rl(e,t,n);case 2:return S3(e,t,n);default:throw new j(`The axis is not within the rank of the tensor ${s}`)}case 3:switch(s){case 1:return rl(e,t,n);case 2:return yi(e,[0,t,0],[e.shape[0],n,e.shape[2]]);case 3:return S3(e,t,n);default:throw new j(`The axis is not within the rank of the tensor ${s}`)}case 4:switch(s){case 1:return rl(e,t,n);case 2:return uo(e,[0,t,0,0],[e.shape[0],n,e.shape[2],e.shape[3]]);case 3:return uo(e,[0,0,t,0],[e.shape[0],e.shape[1],n,e.shape[3]]);case 4:return S3(e,t,n);default:throw new j(`The axis is not within the rank of the tensor ${s}`)}default:throw new j(`sliceAlongLastAxis() received an unsupported tensor rank: ${e.rank}`)}})}function f5(e,t=-1){let n;return t<0&&(n=e[0].rank,n!==0?t=n:t=0),t===e[0].rank&&(t=-1),ct(e,t)}function t7(e,t){switch(e.rank){case 1:return SA([e,t]);case 2:return cu([e,t],0);case 3:return IA([e,t],0);case 4:return CA([e,t],0);default:throw new j(`concatAlongFirstAxis() received an unsupported tensor rank: ${e.rank}`)}}function Z3(e,t){if(Array.isArray(t)||(t=[t]),e.rank!==t.length)throw new j(`The length of input n (${t.length}) does not match the number of dimensions in input x (${e.rank})`);return bs(e,t)}function h2(e,t=0,n=1,s,r){return W0(e,t,n,s,r)}function sa(e,t,n,s){if(e.rank<2||t.rank<2)throw new Je(`dot requires both inputs to be rank >= 2 but got x shape = ${e.shape} and y shape = ${t.shape}`);if(t.rank>=3){let r=e.shape.slice(-1)[0],a=t.shape.slice(-2)[0];if(r!==a)throw new Je(`If rank y >= 3, then the second last dim of y must equal the last dim of x but got x shape = ${e.shape} and y shape = ${t.shape}`)}if(e.rank===2&&t.rank===2)return gc.matMul({a:e,b:t,transposeA:!1,transposeB:!1,bias:s?Y3(e.rank,s,Vr()):null,activation:n});{let r=e.shape.slice(),a=r.pop();e=V(e,[-1,a]);let o=t.shape.slice(),i=o.pop(),l=o.pop(),u=[...o,i],c=Array.from({length:t.rank},(f,m)=>m===0?t.rank-2:m<=t.rank-2?m-1:m);t=V(at(t,c),[l,-1]);let p=[...r,...u],d=!1,h=!1;return V(gc.matMul({a:e,b:t,transposeA:d,transposeB:h,bias:s?Y3(e.rank,s,Vr()):null,activation:n}),p)}}function Uk(e,t,n){return Y(()=>(Array.isArray(t)?t=Ot(t,"int32"):t=ge(t,"int32"),rd(e,t,n)))}function $h(e){return z(e,e)}function Y3(e,t,n){let s=t.shape;if(t.rank!==1&&t.rank!==e)throw new j(`Unexpected bias dimensions: ${t.rank}; expected it to be 1 or ${e}`);if(e===5){if(n==="channelsFirst")return s.length===1?V(t,[1,s[0],1,1,1]):V(t,[1,s[3],s[0],s[1],s[2]]);if(n==="channelsLast")return s.length===1?V(t,[1,1,1,1,s[0]]):V(t,[1].concat(s))}else if(e===4){if(n==="channelsFirst")return s.length===1?V(t,[1,s[0],1,1]):V(t,[1,s[2],s[0],s[1]]);if(n==="channelsLast")return s.length===1?V(t,[1,1,1,s[0]]):V(t,[1].concat(s))}else if(e===3){if(n==="channelsFirst")return s.length===1?V(t,[1,s[0],1]):V(t,[1,s[1],s[0]]);if(n==="channelsLast")return s.length===1?V(t,[1,1,s[0]]):V(t,[1].concat(s))}else if(e<3)return t;throw new j(`Unsupported input rank by biasAdd: ${t.rank}`)}function Hr(e,t,n){return Y(()=>(n==null&&(n=Vr()),en(n),de(e,Y3(e.rank,t,n))))}function yU(e,t=1){if(t!==1)throw new Je(`Support for alpha values other than 1 (${t}) is not implemented yet.`);return td(e)}function AU(e){return Y(()=>ye(e,de(an(e),1)))}function Gk(e,t,n,s){return Y(()=>a5(e,t,n,s))}function xU(e){return Y(()=>{let t=de(.5,z(.2,e));return ws(t,0,1)})}function Ph(e,t,n=!1){return n?e():t()}var bU=["fanIn","fanOut","fanAvg"],vU=["normal","uniform","truncatedNormal"];function wU(e){mu(bU,"FanMode",e)}function kU(e){mu(vU,"Distribution",e)}var xr=class extends he.Serializable{fromConfigUsesCustomObjects(){return!1}getConfig(){return{}}},m5=class extends xr{apply(e,t){return Gt(e,t)}};m5.className="Zeros";he.registerClass(m5);var f2=class extends xr{apply(e,t){return Os(e,t)}};f2.className="Ones";he.registerClass(f2);var g5=class extends xr{constructor(e){if(super(),typeof e!="object")throw new j(`Expected argument of type ConstantConfig but got ${e}`);if(e.value===void 0)throw new j(`config must have value set but got ${e}`);this.value=e.value}apply(e,t){return Y(()=>z(Te(this.value),Os(e,t)))}getConfig(){return{value:this.value}}};g5.className="Constant";he.registerClass(g5);var y5=class extends xr{constructor(e){super(),this.DEFAULT_MINVAL=-.05,this.DEFAULT_MAXVAL=.05,this.minval=e.minval||this.DEFAULT_MINVAL,this.maxval=e.maxval||this.DEFAULT_MAXVAL,this.seed=e.seed}apply(e,t){return od(e,this.minval,this.maxval,t)}getConfig(){return{minval:this.minval,maxval:this.maxval,seed:this.seed}}};y5.className="RandomUniform";he.registerClass(y5);var A5=class extends xr{constructor(e){super(),this.DEFAULT_MEAN=0,this.DEFAULT_STDDEV=.05,this.mean=e.mean||this.DEFAULT_MEAN,this.stddev=e.stddev||this.DEFAULT_STDDEV,this.seed=e.seed}apply(e,t){if(t=t||"float32",t!=="float32"&&t!=="int32")throw new Je(`randomNormal does not support dType ${t}.`);return h2(e,this.mean,this.stddev,t,this.seed)}getConfig(){return{mean:this.mean,stddev:this.stddev,seed:this.seed}}};A5.className="RandomNormal";he.registerClass(A5);var x5=class extends xr{constructor(e){super(),this.DEFAULT_MEAN=0,this.DEFAULT_STDDEV=.05,this.mean=e.mean||this.DEFAULT_MEAN,this.stddev=e.stddev||this.DEFAULT_STDDEV,this.seed=e.seed}apply(e,t){if(t=t||"float32",t!=="float32"&&t!=="int32")throw new Je(`truncatedNormal does not support dType ${t}.`);return J0(e,this.mean,this.stddev,t,this.seed)}getConfig(){return{mean:this.mean,stddev:this.stddev,seed:this.seed}}};x5.className="TruncatedNormal";he.registerClass(x5);var b5=class extends xr{constructor(e){super(),this.gain=e.gain!=null?e.gain:1}apply(e,t){return Y(()=>{if(e.length!==2||e[0]!==e[1])throw new j("Identity matrix initializer can only be used for 2D square matrices.");return z(this.gain,P0(e[0]))})}getConfig(){return{gain:this.gain}}};b5.className="Identity";he.registerClass(b5);function SU(e,t="channelsLast"){let n,s;if(en(t),e.length===2)n=e[0],s=e[1];else if([3,4,5].indexOf(e.length)!==-1){if(t==="channelsFirst"){let r=so(e,2);n=e[1]*r,s=e[0]*r}else if(t==="channelsLast"){let r=so(e,0,e.length-2);n=e[e.length-2]*r,s=e[e.length-1]*r}}else{let r=so(e);n=Math.sqrt(r),s=Math.sqrt(r)}return[n,s]}var ks=class extends xr{constructor(e){if(super(),e.scale<0)throw new j(`scale must be a positive float. Got: ${e.scale}`);this.scale=e.scale==null?1:e.scale,this.mode=e.mode==null?"fanIn":e.mode,wU(this.mode),this.distribution=e.distribution==null?"normal":e.distribution,kU(this.distribution),this.seed=e.seed}apply(e,t){let n=SU(e),s=n[0],r=n[1],a=this.scale;if(this.mode==="fanIn"?a/=Math.max(1,s):this.mode==="fanOut"?a/=Math.max(1,r):a/=Math.max(1,(s+r)/2),this.distribution==="normal"){let o=Math.sqrt(a);if(t=t||"float32",t!=="float32"&&t!=="int32")throw new Je(`${this.getClassName()} does not support dType ${t}.`);return J0(e,0,o,t,this.seed)}else{let o=Math.sqrt(3*a);return od(e,-o,o,t)}}getConfig(){return{scale:this.scale,mode:this.mode,distribution:this.distribution,seed:this.seed}}};ks.className="VarianceScaling";he.registerClass(ks);var m2=class extends ks{constructor(e){super({scale:1,mode:"fanAvg",distribution:"uniform",seed:e==null?null:e.seed})}getClassName(){return ks.className}};m2.className="GlorotUniform";he.registerClass(m2);var g2=class extends ks{constructor(e){super({scale:1,mode:"fanAvg",distribution:"normal",seed:e==null?null:e.seed})}getClassName(){return ks.className}};g2.className="GlorotNormal";he.registerClass(g2);var y2=class extends ks{constructor(e){super({scale:2,mode:"fanIn",distribution:"normal",seed:e==null?null:e.seed})}getClassName(){return ks.className}};y2.className="HeNormal";he.registerClass(y2);var A2=class extends ks{constructor(e){super({scale:2,mode:"fanIn",distribution:"uniform",seed:e==null?null:e.seed})}getClassName(){return ks.className}};A2.className="HeUniform";he.registerClass(A2);var x2=class extends ks{constructor(e){super({scale:1,mode:"fanIn",distribution:"normal",seed:e==null?null:e.seed})}getClassName(){return ks.className}};x2.className="LeCunNormal";he.registerClass(x2);var b2=class extends ks{constructor(e){super({scale:1,mode:"fanIn",distribution:"uniform",seed:e==null?null:e.seed})}getClassName(){return ks.className}};b2.className="LeCunNormal";he.registerClass(b2);var v5=class extends xr{constructor(e){if(super(),this.DEFAULT_GAIN=1,this.gain=e.gain==null?this.DEFAULT_GAIN:e.gain,this.seed=e.seed,this.seed!=null)throw new Je("Random seed is not implemented for Orthogonal Initializer yet.")}apply(e,t){return Y(()=>{if(e.length<2)throw new Je("Shape must be at least 2D.");e[0]*e[1]>2e3&&console.warn(`Orthogonal initializer is being called on a matrix with more than 2000 (${e[0]*e[1]}) elements: Slowness may result.`);let n=e[0]>e[1]?[e[1],e[0]]:e,s=h2(n,0,1,"float32"),r=u5.gramSchmidt(s);return e[0]>e[1]&&(r=at(r)),z(this.gain,r)})}getConfig(){return{gain:this.gain,seed:this.seed}}};v5.className="Orthogonal";he.registerClass(v5);var n7={constant:"Constant",glorotNormal:"GlorotNormal",glorotUniform:"GlorotUniform",heNormal:"HeNormal",heUniform:"HeUniform",identity:"Identity",leCunNormal:"LeCunNormal",leCunUniform:"LeCunUniform",ones:"Ones",orthogonal:"Orthogonal",randomNormal:"RandomNormal",randomUniform:"RandomUniform",truncatedNormal:"TruncatedNormal",varianceScaling:"VarianceScaling",zeros:"Zeros"};function s7(e,t={}){return _h(e,he.SerializationMap.getMap().classNameMap,t,"initializer")}function Ht(e){return p5(e)}function Mt(e){if(typeof e=="string"){let t=e in n7?n7[e]:e;if(t==="GlorotNormal")return new g2;if(t==="GlorotUniform")return new m2;if(t==="HeNormal")return new y2;if(t==="HeUniform")return new A2;if(t==="LeCunNormal")return new x2;if(t==="LeCunUniform")return new b2;{let n={};return n.className=t,n.config={},s7(n)}}else return e instanceof xr?e:s7(e)}function J3(e){return Array.isArray(e)&&Array.isArray(e[0])}function _m(e){return e.length===0?[]:Array.isArray(e[0])?e:[e]}function et(e){let t;if(Array.isArray(e)){if(e.length!==1)throw new j(`Expected Tensor length to be 1; got ${e.length}`);t=e[0]}else t=e;return t}function bt(e){if(Array.isArray(e)&&Array.isArray(e[0])){if(e.length===1)return e=e,e[0];throw new j(`Expected exactly 1 Shape; got ${e.length}`)}else return e}function Dm(e){let t=0;for(let n of e)n.shape.length===0?t+=1:t+=n.shape.reduce((s,r)=>s*r);return t}var r7="Variable",Hk=class{constructor(e,t="float32",n=r7,s=!0,r=null){this.dtype=t==null?"float32":t,this.shape=e.shape,this.id=zk(),n=n==null?r7:n,this.originalName=Bk(n),this.name=Wk(this.originalName),this.trainable_=s,this.constraint=r,this.val=s5(e,this.trainable_,this.name,this.dtype)}read(){return this.assertNotDisposed(),this.val}write(e){return this.assertNotDisposed(),IU(this.val,e),this.val.id!==e.id&&(this.val.assign(e),this.constraint!=null&&this.val.assign(this.constraint.apply(this.val))),this}dispose(){this.assertNotDisposed(),this.val.dispose()}assertNotDisposed(){if(this.val.isDisposed)throw new Error(`LayersVariable ${this.name} is already disposed.`)}get trainable(){return this.trainable_}set trainable(e){this.trainable_=e,this.val.trainable=e}};function IU(e,t){if(e.shape.toString()!==t.shape.toString())throw new Error("Shape mismatch: "+JSON.stringify(e.shape)+" vs. "+JSON.stringify(t.shape))}function Q3(e){return e.map(t=>t.read())}function w5(e){e.forEach(t=>{t[0].write(t[1])})}var on=class{constructor(e){this.dtype=e.dtype,this.shape=e.shape,e.shape!=null?this.ndim=e.shape.length:this.ndim=e.ndim,this.maxNDim=e.maxNDim,this.minNDim=e.minNDim,this.axes=e.axes||{}}},Mr=class{constructor(e,t,n,s,r,a,o){this.dtype=e,this.shape=t,this.sourceLayer=n,this.inputs=s,this.callArgs=r,this.outputTensorIndex=o,this.id=zk(),a!=null&&(this.originalName=Bk(a),this.name=Wk(this.originalName)),this.rank=t.length}},CU=0,v2=class{constructor(e,t){this.callArgs=t,this.id=CU++,this.outboundLayer=e.outboundLayer,this.inboundLayers=e.inboundLayers,this.nodeIndices=e.nodeIndices,this.tensorIndices=e.tensorIndices,this.inputTensors=e.inputTensors,this.outputTensors=e.outputTensors,this.inputMasks=e.inputMasks,this.outputMasks=e.outputMasks,this.inputShapes=e.inputShapes,this.outputShapes=e.outputShapes;for(let n of e.inboundLayers)n!=null&&n.outboundNodes.push(this);e.outboundLayer.inboundNodes.push(this)}getConfig(){let e=[];for(let t of this.inboundLayers)t!=null?e.push(t.name):e.push(null);return{outboundLayer:this.outboundLayer?this.outboundLayer.name:null,inboundLayers:e,nodeIndices:this.nodeIndices,tensorIndices:this.tensorIndices}}},TU=0,pt=class extends he.Serializable{constructor(e={}){super(),this._callHook=null,this._addedWeightNames=[],this._stateful=!1,this.id=TU++,this.activityRegularizer=null,this.inputSpec=null,this.supportsMasking=!1,this._trainableWeights=[],this._nonTrainableWeights=[],this._losses=[],this._updates=[],this._built=!1,this.inboundNodes=[],this.outboundNodes=[];let t=e.name;if(!t){let n=this.getClassName();t=va(n)+"_"+d2(n)}if(this.name=t,this.trainable_=e.trainable==null?!0:e.trainable,e.inputShape!=null||e.batchInputShape!=null){let n;if(e.batchInputShape!=null)n=e.batchInputShape;else if(e.inputShape!=null){let r=null;e.batchSize!=null&&(r=e.batchSize),n=[r].concat(e.inputShape)}this.batchInputShape=n;let s=e.dtype;s==null&&(s=e.inputDType),s==null&&(s="float32"),this.dtype=s}e.weights!=null?this.initialWeights=e.weights:this.initialWeights=null,this._refCount=null,this.fastWeightInitDuringBuild=!1}static nodeKey(e,t){return e.name+"_ib-"+t.toString()}getNodeAtIndex(e,t){if(this.inboundNodes.length===0)throw new Or(`The layer has never been called and thus has no defined ${t}.`);if(this.inboundNodes.length<=e)throw new j(`Asked to get ${t} at node ${e}, but the layer has only ${this.inboundNodes.length} inbound nodes.`);return this.inboundNodes[e]}getInputAt(e){return xs(this.getNodeAtIndex(e,"input").inputTensors)}getOutputAt(e){return xs(this.getNodeAtIndex(e,"output").outputTensors)}get input(){if(this.inboundNodes.length>1)throw new ba(`Layer ${this.name} has multiple inbound nodes, hence the notion of "layer input" is ill-defined. Use \`getInputAt(nodeIndex)\` instead.`);if(this.inboundNodes.length===0)throw new ba(`Layer ${this.name} is not connected, no input to return.`);return xs(this.getNodeAtIndex(0,"input").inputTensors)}get output(){if(this.inboundNodes.length===0)throw new ba(`Layer ${this.name} has no inbound nodes.`);if(this.inboundNodes.length>1)throw new ba(`Layer ${this.name} has multiple inbound nodes, hence the notion of "layer output" is ill-defined. Use \`getOutputAt(nodeIndex)\` instead.`);return xs(this.getNodeAtIndex(0,"output").outputTensors)}get losses(){return this._losses}calculateLosses(){return this.losses.map(e=>e())}get updates(){return this._updates}get built(){return this._built}set built(e){this._built=e}get trainable(){return this.trainable_}set trainable(e){this._trainableWeights.forEach(t=>t.trainable=e),this.trainable_=e}get trainableWeights(){return this.trainable_?this._trainableWeights.filter(e=>e.trainable):[]}set trainableWeights(e){this._trainableWeights=e}get nonTrainableWeights(){return this.trainable?this._trainableWeights.filter(e=>!e.trainable).concat(this._nonTrainableWeights):this._trainableWeights.concat(this._nonTrainableWeights)}set nonTrainableWeights(e){this._nonTrainableWeights=e}get weights(){return this.trainableWeights.concat(this.nonTrainableWeights)}get stateful(){return this._stateful}resetStates(){if(!this.stateful)throw new Error("Cannot call the resetStates() method of a non-stateful Layer object.")}assertInputCompatibility(e){if(e=$t(e),this.inputSpec==null||this.inputSpec.length===0)return;let t=$t(this.inputSpec);if(e.length!==t.length)throw new j(`Layer ${this.name} expects ${t.length} inputs, but it received ${e.length} input tensors. Input received: ${e}`);for(let n=0;nr.maxNDim)throw new j(`Input ${n} is incompatible with layer ${this.name}: expected max_ndim=${r.maxNDim}, found ndim=${a}`);if(r.minNDim!=null&&a=0?o[l]:o[o.length+l];if(u!=null&&[u,null].indexOf(c)===-1)throw new j(`Input ${n} is incompatible with layer ${this.name}: expected axis ${l} of input shape to have value ${u} but got shape ${o}.`)}}if(r.shape!=null)for(let o=0;o{if(!this.built){this.assertInputCompatibility(e);let a=[];for(let o of $t(e))a.push(o.shape);this.build(xs(a)),this.built=!0,this.initialWeights&&this.setWeights(this.initialWeights),this._refCount===null&&r&&(this._refCount=1)}if(this.assertInputCompatibility(e),r){let a=this.call(e,t),o=$t(a),i=[];for(let l of o)n.indexOf(l)!==-1&&(l=l.clone()),i.push(l);if(a=xs(i),this.activityRegularizer!=null)throw new Je("Layer invocation in the presence of activity regularizer(s) is not supported yet.");return a}else{let a=NU(e),o=this.computeOutputShape(a),i,l=EU(e);if(this.warnOnIncompatibleInputShape(Array.isArray(e)?a[0]:a),o!=null&&o.length>0&&Array.isArray(o[0])?i=o.map((u,c)=>new Mr(l,u,this,$t(e),t,this.name,c)):i=new Mr(l,o,this,$t(e),t,this.name),this.addInboundNode(e,i,null,null,a,o,t),this._refCount++,this.activityRegularizer!=null)throw new Je("Layer invocation in the presence of activity regularizer(s) is not supported yet.");return i}})}warnOnIncompatibleInputShape(e){if(this.batchInputShape!=null)if(e.length!==this.batchInputShape.length)console.warn(`The rank of the input tensor provided (shape: ${JSON.stringify(e)}) does not match that of the batchInputShape (${JSON.stringify(this.batchInputShape)}) of the layer ${this.name}`);else{let t=!1;this.batchInputShape.forEach((n,s)=>{n!=null&&e[s]!=null&&e[s]!==n&&(t=!0)}),t&&console.warn(`The shape of the input tensor (${JSON.stringify(e)}) does not match the expectation of layer ${this.name}: ${JSON.stringify(this.batchInputShape)}`)}}get outputShape(){if(this.inboundNodes==null||this.inboundNodes.length===0)throw new ba(`The layer ${this.name} has never been called and thus has no defined output shape.`);let e=[];for(let t of this.inboundNodes){let n=JSON.stringify(t.outputShapes);e.indexOf(n)===-1&&e.push(n)}if(e.length===1){let t=this.inboundNodes[0].outputShapes;return Array.isArray(t)&&Array.isArray(t[0])&&t.length===1?t[0]:t}else throw new ba(`The layer ${this.name} has multiple inbound nodes with different output shapes. Hence the notion of "output shape" is ill-defined for the layer.`)}countParams(){if(!this.built)throw new Or(`You tried to call countParams() on ${this.name}, but the layer is not built yet. Build it first by calling build(batchInputShape).`);return Dm(this.weights)}build(e){this.built=!0}getWeights(e=!1){return Q3(e?this.trainableWeights:this.weights)}setWeights(e){Y(()=>{let t=this.weights;if(t.length!==e.length)throw new j(`You called setWeights(weights) on layer "${this.name}" with a weight list of length ${e.length}, but the layer was expecting ${t.length} weights. Provided weights: ${e}...`);if(t.length===0)return;let n=[],s=Q3(t);for(let r=0;rr.apply(u.read())),a==null&&(a=!0),a?this._trainableWeights.push(u):this._nonTrainableWeights.push(u),u}setFastWeightInitDuringBuild(e){this.fastWeightInitDuringBuild=e}addLoss(e){e==null||Array.isArray(e)&&e.length===0||(e=$t(e),this._losses!==void 0&&this._losses!==null&&this.losses.push(...e))}computeOutputShape(e){return e}computeMask(e,t){if(!this.supportsMasking){if(t!=null)if(Array.isArray(t))t.forEach(n=>{if(n!=null)throw new TypeError(`Layer ${this.name} does not support masking, but was passed an inputMask.`)});else throw new TypeError(`Layer ${this.name} does not support masking, but was passed an inputMask.`);return null}return t}addInboundNode(e,t,n,s,r,a,o=null){let i=$t(e);t=$t(t),n=$t(n),s=$t(s),r=_m(r),a=_m(a);let l=[],u=[],c=[];for(let p of i)l.push(p.sourceLayer),u.push(p.nodeIndex),c.push(p.tensorIndex);new v2({outboundLayer:this,inboundLayers:l,nodeIndices:u,tensorIndices:c,inputTensors:i,outputTensors:t,inputMasks:n,outputMasks:s,inputShapes:r,outputShapes:a},o);for(let p=0;pe.dispose()),this.weights.length}assertNotDisposed(){if(this._refCount===0)throw new Error(`Layer '${this.name}' is already disposed.`)}dispose(){if(!this.built)throw new Error(`Cannot dispose Layer ${this.name} because it has not been built yet.`);if(this._refCount===null)throw new Error(`Cannot dispose Layer ${this.name} because it has not been used yet.`);this.assertNotDisposed();let e=0;return--this._refCount===0&&(e=this.disposeWeights()),{refCountAfterDispose:this._refCount,numDisposedVariables:e}}};function NU(e){e=$t(e);let t=[];for(let n of e)t.push(n.shape);return xs(t)}function EU(e){return"float32"}function jk(e,t,n){if((t==null||n!=null&&n>0)&&(t=e.sourceLayer,n=e.nodeIndex),t.inboundNodes.length===0)return[e];{let s=t.inboundNodes[n];if(s.inboundLayers.length===0)return s.inputTensors;{let r=[];for(let a=0;af.name),l=[],u=t.names();for(let f of i)u.indexOf(f)!==-1?l.push(t.getValue(f)):l.push(null);s!=null&&(s.maxNumTensors=-1/0,s.minNumTensors=1/0);let c=i.join(",")+"|"+t.names().sort().join(","),p=$m.get(c),d;if(p==null){let f=DU(o,t);p=f.sorted,d=f.recipientCounts,$m.put(c,p),Pm.put(c,d)}d={},r||Object.assign(d,Pm.get(c));let h=new Qi(t);for(let f=0;fs.maxNumTensors&&(s.maxNumTensors=_),_0,()=>"Expected at least one fetch, got none");let n=[],s={};if(e.length===1){let r=a7(e[0],t);n=r.sorted,s=r.recipientMap}else{let r=new Set;for(let a of e){let{sorted:o,recipientMap:i}=a7(a,t);for(let l of o)r.has(l.name)||(n.push(l),r.add(l.name));for(let l in i)s[l]==null&&(s[l]=new Set),i[l].forEach(u=>s[l].add(u))}}return{sorted:n,recipientCounts:$U(s)}}function $U(e){let t={};for(let n in e)t[n]=e[n].size;return t}function a7(e,t){let n=new Set,s=[],r={};for(let i of t.names())n.add(i);let a=[],o=[];for(a.push(e);a.length>0;){let i=a[a.length-1];if(n.has(i.name)){a.pop();continue}let l=o[o.length-1]===a.length-1;if(i.inputs.length===0||l)a.pop(),s.push(i),n.add(i.name),l&&o.pop();else{o.push(a.length-1);for(let u of i.inputs)r[u.name]==null&&(r[u.name]=new Set),r[u.name].add(i.name),!n.has(u.name)&&a.push(u)}}return{sorted:s,recipientMap:r}}function PU(e){let t;if(e.sourceLayer.inboundNodes.length===1)t=e.sourceLayer.output;else{let n=null;for(let s=0;s100,_U);var Xk={};qe(Xk,{maxNorm:()=>OU,minMaxNorm:()=>LU,nonNeg:()=>zU,unitNorm:()=>MU});function k5(e,t){return Y(()=>zn(Se(z(e,e),t,!0)))}var Fh=class extends he.Serializable{getConfig(){return{}}},S5=class extends Fh{constructor(e){super(),this.defaultMaxValue=2,this.defaultAxis=0,this.maxValue=e.maxValue!=null?e.maxValue:this.defaultMaxValue,this.axis=e.axis!=null?e.axis:this.defaultAxis}apply(e){return Y(()=>{let t=k5(e,this.axis),n=ws(t,0,this.maxValue);return z(e,ye(n,de(yn(),t)))})}getConfig(){return{maxValue:this.maxValue,axis:this.axis}}};S5.className="MaxNorm";he.registerClass(S5);var I5=class extends Fh{constructor(e){super(),this.defaultAxis=0,this.axis=e.axis!=null?e.axis:this.defaultAxis}apply(e){return Y(()=>ye(e,de(yn(),k5(e,this.axis))))}getConfig(){return{axis:this.axis}}};I5.className="UnitNorm";he.registerClass(I5);var C5=class extends Fh{apply(e){return Gr(e)}};C5.className="NonNeg";he.registerClass(C5);var T5=class extends Fh{constructor(e){super(),this.defaultMinValue=0,this.defaultMaxValue=1,this.defaultRate=1,this.defaultAxis=0,this.minValue=e.minValue!=null?e.minValue:this.defaultMinValue,this.maxValue=e.maxValue!=null?e.maxValue:this.defaultMaxValue,this.rate=e.rate!=null?e.rate:this.defaultRate,this.axis=e.axis!=null?e.axis:this.defaultAxis}apply(e){return Y(()=>{let t=k5(e,this.axis),n=de(z(this.rate,ws(t,this.minValue,this.maxValue)),z(1-this.rate,t));return z(e,ye(n,de(yn(),t)))})}getConfig(){return{minValue:this.minValue,maxValue:this.maxValue,rate:this.rate,axis:this.axis}}};T5.className="MinMaxNorm";he.registerClass(T5);var o7={maxNorm:"MaxNorm",minMaxNorm:"MinMaxNorm",nonNeg:"NonNeg",unitNorm:"UnitNorm"};function bn(e){return p5(e)}function i7(e,t={}){return _h(e,he.SerializationMap.getMap().classNameMap,t,"constraint")}function vn(e){if(e==null)return null;if(typeof e=="string"){let n={className:e in o7?o7[e]:e,config:{}};return i7(n)}else return e instanceof Fh?e:i7(e)}function OU(e){return new S5(e)}function MU(e){return new I5(e)}function zU(){return new C5}function LU(e){return new T5(e)}var Kk={};qe(Kk,{constant:()=>VU,glorotNormal:()=>KU,glorotUniform:()=>XU,heNormal:()=>ZU,heUniform:()=>YU,identity:()=>jU,leCunNormal:()=>JU,leCunUniform:()=>QU,ones:()=>WU,orthogonal:()=>eG,randomNormal:()=>GU,randomUniform:()=>UU,truncatedNormal:()=>HU,varianceScaling:()=>qU,zeros:()=>BU});function BU(){return new m5}function WU(){return new f2}function VU(e){return new g5(e)}function UU(e){return new y5(e)}function GU(e){return new A5(e)}function HU(e){return new x5(e)}function jU(e){return new b5(e)}function qU(e){return new ks(e)}function XU(e){return new m2(e)}function KU(e){return new g2(e)}function ZU(e){return new y2(e)}function YU(e){return new A2(e)}function JU(e){return new x2(e)}function QU(e){return new b2(e)}function eG(e){return new v5(e)}var Zk={};qe(Zk,{Layer:()=>pt,RNN:()=>pa,RNNCell:()=>Bh,activation:()=>CH,add:()=>FH,alphaDropout:()=>Aj,average:()=>OH,averagePooling1d:()=>Px,averagePooling2d:()=>Fx,averagePooling3d:()=>Ox,avgPool1d:()=>HH,avgPool2d:()=>qH,avgPool3d:()=>KH,avgPooling1d:()=>jH,avgPooling2d:()=>XH,avgPooling3d:()=>ZH,batchNormalization:()=>VH,bidirectional:()=>cj,concatenate:()=>MH,conv1d:()=>yH,conv2d:()=>AH,conv2dTranspose:()=>xH,conv3d:()=>bH,conv3dTranspose:()=>vH,convLstm2d:()=>oj,convLstm2dCell:()=>ij,cropping2D:()=>kH,dense:()=>TH,depthwiseConv2d:()=>IH,dot:()=>WH,dropout:()=>NH,elu:()=>dH,embedding:()=>PH,flatten:()=>RH,gaussianDropout:()=>yj,gaussianNoise:()=>gj,globalAveragePooling1d:()=>YH,globalAveragePooling2d:()=>JH,globalMaxPool1d:()=>pj,globalMaxPool2d:()=>hj,globalMaxPooling1d:()=>W8,globalMaxPooling2d:()=>V8,gru:()=>ej,gruCell:()=>tj,input:()=>f8,inputLayer:()=>cH,layerNormalization:()=>UH,leakyReLU:()=>hH,lstm:()=>nj,lstmCell:()=>sj,masking:()=>xj,maxPool1d:()=>fj,maxPool2d:()=>mj,maxPooling1d:()=>U8,maxPooling2d:()=>G8,maxPooling3d:()=>QH,maximum:()=>zH,minimum:()=>LH,multiply:()=>BH,permute:()=>$H,prelu:()=>fH,reLU:()=>pH,repeatVector:()=>_H,reshape:()=>DH,rnn:()=>lj,separableConv2d:()=>wH,simpleRNN:()=>rj,simpleRNNCell:()=>aj,softmax:()=>mH,spatialDropout1d:()=>EH,stackedRNNCells:()=>uj,thresholdedReLU:()=>gH,timeDistributed:()=>dj,upSampling2d:()=>SH,zeroPadding2d:()=>GH});async function Za(e){if(e==null)return;let t=[],n=[],s=[];for(let r in e){let a=e[r];if(typeof a!="number"){let o=a;t.push(o.data()),n.push(r),s.push(o)}}if(t.length>0){let r=await Promise.all(t);for(let a=0;ade(this.totals[s],z(r,n)));this.totals[s]=o,a!=null&&a.dispose()}}}async onEpochEnd(e,t){if(t!=null)for(let n of this.params.metrics)this.totals[n]!=null&&(typeof this.totals[n]=="number"?t[n]=this.totals[n]/this.seen:Y(()=>{let s=z(ye(1,this.seen),this.totals[n]);t[n]=s,this.totals[n].dispose(),Tn(t[n])}))}},Qk=class extends Ac{async onTrainBegin(e){this.epoch=[],this.history={}}async onEpochEnd(e,t){t==null&&(t={}),this.epoch.push(e);for(let n in t)this.history[n]==null&&(this.history[n]=[]),this.history[n].push(t[n])}async syncData(){let e=[],t=[],n=[];for(let r in this.history){let a=this.history[r];for(let o=0;onew e8(s,t))}var hr=class{constructor(){}static registerCallbackConstructor(e,t){v.assert(e>=0&&Number.isInteger(e),()=>`Verbosity level is expected to be an integer >= 0, but got ${e}`),hr.checkForDuplicate(t),hr.constructors[e]==null&&(hr.constructors[e]=[]),hr.constructors[e].push(t)}static checkForDuplicate(e){for(let t in hr.constructors)hr.constructors[+t].forEach(s=>{if(s===e)throw new j("Duplicate callback constructor.")})}static clear(){hr.constructors={}}static createCallbacks(e){let t=[];for(let n in hr.constructors){let s=+n;e>=s&&t.push(...hr.constructors[s])}return t.map(n=>new n)}};hr.constructors={};function n8(e,t,n,s,r,a,o,i,l){let u=new Qk,c=[new nG,...hr.createCallbacks(t)];e!=null&&c.push(...e),c.push(u);let p=new Jk(c);return p.setParams({epochs:n,initialEpoch:s,samples:r,steps:a,batchSize:o,verbose:t,doValidation:i,metrics:l}),{callbackList:p,history:u}}function Lr(e,t={},n=!1){return _h(e,he.SerializationMap.getMap().classNameMap,t,"layer",n)}function Fm(e,t){return Y(()=>{e.dtype!=="float32"&&(e=ge(e,"float32"));let n=Se($h(e),t,!0),s=ca(n.shape,yn()),r=zn(da(n,s));return ye(e,r)})}function gu(e,t){return Y(()=>Ut($h(Ae(t,e)),-1))}function w2(e,t){return Y(()=>Ut(an(Ae(t,e)),-1))}function ud(e,t){return Y(()=>{let n=Ae(e,t),s=ws(an(e),yn(),Number.MAX_VALUE),r=an(ye(n,s));return z(100,Ut(r,-1))})}function sG(e,t){return Y(()=>{let n=ws(t,yn(),Number.MAX_VALUE),s=Bs(de(1,n)),r=ws(e,yn(),Number.MAX_VALUE),a=Bs(de(1,r));return Ut($h(Ae(s,a)),-1)})}function rG(e,t){return Y(()=>{let n=da(0,Ae(1,z(e,t)));return Ut($h(n),-1)})}function aG(e,t){return Y(()=>{let n=da(0,Ae(1,z(e,t)));return Ut(n,-1)})}function oG(e,t){return Y(()=>{let n=Se(z(e,t),-1),s=xn(z(Ae(1,e),t),-1);return da(0,de(1,Ae(s,n)))})}function iG(e,t){return Y(()=>{let n=Math.log(2),s=Ae(t,e),r=Ae(de(s,du(z(-2,s))),n);return Ut(r,-1)})}function $p(e,t,n=!1){return Y(()=>{if(n)t=hu(t);else{let s=Se(t,t.shape.length-1,!0);t=ye(t,s)}return t=ws(t,yn(),1-yn()),Pt(Se(z(ge(e,"float32"),Bs(t)),t.shape.length-1))})}function Om(e,t,n=!1){return Y(()=>{let s=ge(sd(mU(e)),"int32");t=ws(t,yn(),1-yn());let r=t.shape,a=V(pc(s,r[r.length-1]),r);return $p(a,t,n)})}function lG(e,t){if(!v.arraysEqual(e.shape,t.shape))throw new j(`logits and labels must have the same shape, but got shapes ${JSON.stringify(e.shape)} and ${JSON.stringify(t.shape)}`);return Y(()=>{let n=Gr(t),s=Pt(an(t));return de(Ae(n,z(t,e)),vh(Ls(s)))})}function k2(e,t){return Y(()=>{let n;return n=ws(t,yn(),1-yn()),n=Bs(ye(n,Ae(1,n))),Ut(lG(e,n),-1)})}function uG(e,t){return Y(()=>{let n=ws(e,yn(),1),s=ws(t,yn(),1);return Se(z(e,Bs(ye(n,s))),-1)})}function cG(e,t){return Y(()=>{let n=Bs(de(yn(),t));return Ut(Ae(t,z(e,n)),-1)})}function N5(e,t){return Y(()=>{let n=Fm(e,-1),s=Fm(t,-1),r=z(n,s);return Pt(Se(r,-1))})}var Mm={meanSquaredError:gu,meanAbsoluteError:w2,meanAbsolutePercentageError:ud,meanSquaredLogarithmicError:sG,squaredHinge:rG,hinge:aG,categoricalHinge:oG,logcosh:iG,categoricalCrossentropy:$p,sparseCategoricalCrossentropy:Om,binaryCrossentropy:k2,kullbackLeiblerDivergence:uG,poisson:cG,cosineProximity:N5};function I3(e){if(typeof e=="string"){if(e in Mm)return Mm[e];let t=`Unknown loss ${e}`;throw e.toLowerCase().includes("softmaxcrossentropy")&&(t=`Unknown loss ${e}. Use "categoricalCrossentropy" as the string name for tf.losses.softmaxCrossEntropy`),new j(t)}else return e}function E5(e,t){return Y(()=>{let n=z(.5,Ws(t)),s=p2(Is(t,n),e.dtype);return Ut(zs(e,s),-1)})}function R5(e,t){return Y(()=>p2(zs(Ms(e,-1),Ms(t,-1)),"float32"))}function s8(e,t){return Y(()=>ge(Se(gr(zs(e,1),zs(t,1))),"float32"))}function dG(e,t){return Y(()=>ge(Se(gr(zs(e,1),zs(t,0))),"float32"))}function pG(e,t){return Y(()=>ge(Se(gr(zs(e,0),zs(t,1))),"float32"))}function r8(e,t){return Y(()=>{let n=s8(e,t),s=pG(e,t),r=de(n,s);return ge(jn(Is(r,0),ye(n,r),0),"float32")})}function hG(e,t){return Y(()=>{let n=s8(e,t),s=dG(e,t),r=de(n,s);return ge(jn(Is(r,0),ye(n,r),0),"float32")})}function a8(e,t){return k2(e,t)}function o8(e,t){return e.rank===t.rank&&(e=Ke(e,[e.rank-1])),t=Ms(t,-1),t.dtype!==e.dtype&&(t=ge(t,e.dtype)),ge(zs(e,t),"float32")}var fG=gu,mG=gu,gG=w2,yG=w2,AG=ud,xG=ud,_5=$p,bG=N5,i8=Om,zm={binaryAccuracy:E5,categoricalAccuracy:R5,precision:r8,categoricalCrossentropy:_5,sparseCategoricalCrossentropy:i8,mse:fG,MSE:mG,mae:gG,MAE:yG,mape:AG,MAPE:xG,cosine:bG};function vG(e){if(typeof e=="string"&&e in zm)return zm[e];if(typeof e!="string"&&e!=null)return e;throw new j(`Unknown metric ${e}`)}function tm(e){if(Qr(e!==null,`Unknown LossOrMetricFn ${e}`),typeof e=="string")return e;{let t;for(let n of Object.keys(Mm))if(Mm[n]===e){t=n;break}if(t!==void 0)return t;for(let n of Object.keys(zm))if(zm[n]===e){t=n;break}return t!==void 0?t:e.name}}function wG(e){let t={Adagrad:()=>ji.adagrad(.01),Adadelta:()=>ji.adadelta(1,.95,yn()),Adam:()=>ji.adam(.001,.9,.999,yn()),Adamax:()=>ji.adamax(.002,.9,.999,yn(),0),RMSProp:()=>ji.rmsprop(.001,.9,0,yn()),SGD:()=>ji.sgd(.01)};if(t.adagrad=t.Adagrad,t.adadelta=t.Adadelta,t.adam=t.Adam,t.adamax=t.Adamax,t.rmsprop=t.RMSProp,t.sgd=t.SGD,e in t)return t[e]();throw new j(`Unknown Optimizer ${e}`)}var u7=1*1024*1024;function c7(e,t,n=!1){if(e==null||typeof e!="object"||Object.getPrototypeOf(e)!==Object.prototype||!ey(e))throw new Error("User-defined metadata is expected to be a JSON object, but is not.");if(n){let s=JSON.stringify(e);s.length>u7&&console.warn(`User-defined metadata of model "${t}" is too large in size (length=${s.length} when serialized). It is not recommended to store such large objects in user-defined metadata. Please make sure its serialized length is <= ${u7}.`)}}function ey(e){if(e===null)return!0;if(typeof e=="object")if(Object.getPrototypeOf(e)===Object.prototype){let t=Object.keys(e);for(let n of t)if(typeof n!="string"||!ey(e[n]))return!1;return!0}else if(Array.isArray(e)){for(let t of e)if(!ey(t))return!1;return!0}else return!1;else{let t=typeof e;return t==="string"||t==="number"||t==="boolean"}}function kG(e,t,n,s=console.log){let r=IG(e),a=["Layer (type)","Input Shape","Output shape","Param #"];r?(t=t||90,n=n||[.32,.61,.89,1]):(t=t||115,n=n||[.24,.48,.7,.8,1]),n[n.length-1]<=1&&(n=n.map(c=>Math.floor(t*c)));let o;if(!r){a.push("Receives inputs"),o=[];for(let c in e.nodesByDepth)o.push(...e.nodesByDepth[c])}s("_".repeat(t)),Lm(a,n,s),s("=".repeat(t));let i=e.layers;for(let c=0;c1||r.length===1&&r[0].inboundLayers.length>1){t=!1;break}s.push(...r)}if(t)for(let r of e.layers){let a=!1;for(let o of r.inboundNodes)if(s.indexOf(o)!==-1)if(a){t=!1;break}else a=!0;if(!t)break}return t}function Lm(e,t,n=console.log){let s="";for(let r=0;r0&&(s=s.slice(0,s.length-1)+" "),s+=e[r],s=s.slice(0,t[r]),s+=" ".repeat(t[r]-s.length);n(s)}function CG(e,t,n){let s,r;try{r=e.inboundNodes.map(l=>JSON.stringify(l.inputShapes)).join(",")}catch(l){r="multiple"}try{s=JSON.stringify(e.outputShape)}catch(l){s="multiple"}let a=e.name,o=e.getClassName(),i=[`${a} (${o})`,r,s,e.countParams().toString()];Lm(i,t,n)}function TG(e,t,n,s){let r,a;try{a=e.inboundNodes.map(p=>JSON.stringify(p.inputShapes)).join(",")}catch(p){a="multiple"}try{r=JSON.stringify(e.outputShape)}catch(p){r="multiple"}let o=[];for(let p of e.inboundNodes)if(!(n!=null&&n.length>0&&n.indexOf(p)===-1))for(let d=0;dy.name)}`);no(this.outputs).length!==this.outputs.length&&console.warn(`The list of outputs passed to the model is redundant. All outputs should only appear once. Found: ${this.outputs.map(y=>y.name)}`),this.inputLayers=[],this.inputLayersNodeIndices=[],this.inputLayersTensorIndices=[],this.outputLayers=[],this.outputLayersNodeIndices=[],this.outputLayersTensorIndices=[],this.layers=[],this.internalContainerRefs=[];for(let y of this.outputs){let x=y.sourceLayer,A=y.nodeIndex,b=y.tensorIndex;this.outputLayers.push(x),this.outputLayersNodeIndices.push(A),this.outputLayersTensorIndices.push(b)}for(let y of this.inputs){let x=y.sourceLayer,A=y.nodeIndex,b=y.tensorIndex;Qr(A===0,"input layer has >1 nodes"),Qr(b===0,"input layer has >1 tensors"),this.inputLayers.push(x),this.inputLayersNodeIndices.push(A),this.inputLayersTensorIndices.push(b)}this.inputNames=[],this.outputNames=[],this.feedInputShapes=[],this.feedInputNames=[],this.feedOutputNames=[];for(let y=0;yy.shape),this.internalOutputShapes=this.outputs.map(y=>y.shape);let t={},n={},s={},r={},a={},o=[],i=(y,x,A,b,w,k)=>{(b==null||w==null||k==null)&&(b=y.sourceLayer,w=y.nodeIndex,k=y.tensorIndex);let C=b.inboundNodes[w];if(A.indexOf(C)!==-1)throw new Or(`The tensor ${y.name} at layer "${b.name}" is part of a cycle.`);if(x.indexOf(C)!==-1)return;this.containerNodes.add(Yr.nodeKey(b,w)),b.id in a||(a[b.id]=Object.keys(a).length),A.indexOf(C)===-1&&A.push(C);let E=C.inboundLayers.length;for(let _=0;_=0;)A.splice(A.indexOf(C),1);o.push(C)},l=[],u=[];for(let y of this.outputs)i(y,l,u);let c=o.slice().reverse();for(let y of c){n[y.id]=y,y.id in t||(t[y.id]=0);let x=t[y.id],A=s[y.outboundLayer.id]==null?0:s[y.outboundLayer.id];x=Math.max(x,A),s[y.outboundLayer.id]=x,r[y.outboundLayer.id]=y.outboundLayer,t[y.id]=x;for(let b=0;bparseInt(y,10)).sort(Jf);this.layers=[];for(let y of h){let x=d[y];x.sort((A,b)=>{let w=a[A.id],k=a[b.id];return wk?1:0});for(let A of x)A instanceof Yr&&this.internalContainerRefs.push(A),this.layers.push(A)}this.layersByDepth=d,h=Object.keys(p).map(y=>parseInt(y,10)).sort(Jf);let f=this.inputs.slice(),m=[];for(let y of h)for(let x of p[y]){let A=x.outboundLayer;if(A!=null){for(let b of x.inputTensors)if(f.indexOf(b)===-1)throw new Or(`Graph disconnected: cannot obtain value for tensor ${b} at layer "${A.name}". The following previous layers were accessed without issue: ${m}`);for(let b of x.outputTensors)f.push(b);m.push(A.name)}}this.nodesByDepth=p;let g=this.layers.map(y=>y.name);for(let y of g){let x=g.filter(A=>A===y).length;if(x!==1)throw new Or(`The name "${y}" is used ${x} times in the model. All layer names should be unique. Layer names: `+JSON.stringify(g))}this.outboundNodes=[],this.inboundNodes=[],new v2({outboundLayer:this,inboundLayers:[],nodeIndices:[],tensorIndices:[],inputTensors:this.inputs,outputTensors:this.outputs,inputMasks:this.inputs.map(y=>null),outputMasks:this.outputs.map(y=>null),inputShapes:this.inputs.map(y=>y.shape),outputShapes:this.outputs.map(y=>y.shape)}),this.built=!0,this._refCount=1}assertNotDisposed(){if(this._refCount===0)throw new Error(`Container '${this.name}' is already disposed.`)}dispose(){this.assertNotDisposed();let e={refCountAfterDispose:null,numDisposedVariables:0};if(--this._refCount===0){for(let t of this.layers)e.numDisposedVariables+=t.dispose().numDisposedVariables;for(let t of this.internalContainerRefs)e.numDisposedVariables+=t.dispose().numDisposedVariables}return e.refCountAfterDispose=this._refCount,e}get trainable(){return this.trainable_}set trainable(e){this.layers.forEach(t=>{t._trainableWeights.forEach(n=>n.trainable=e)}),this.trainable_=e}get trainableWeights(){if(this._trainableWeights.length>0)throw new j("Container instance unexpectedly contains _trainableWeights.The trainable weights of a Container are a union of the trainable weights of its consituent Layers. Its own _trainableWeights must remain an empty Array.");if(!this.trainable)return[];let e=[];for(let t of this.layers)e=e.concat(t.trainableWeights);return e}get nonTrainableWeights(){let e=[];for(let t of this.layers)e.push(...t.nonTrainableWeights);if(!this.trainable){let t=[];for(let n of this.layers)t.push(...n.trainableWeights);return t.concat(e)}return e}get weights(){return this.trainableWeights.concat(this.nonTrainableWeights)}loadWeights(e,t=!0){let n={},s=0;for(let a of this.layers)for(let o of a.weights){if(n[o.originalName]!=null)throw new j(`Duplicate weight name: ${o.originalName}`);n[o.originalName]=o,s++}let r=[];for(let a in e){let o=a;if(n[a]==null){let i=a.split("/");o=i.slice(0,-2).concat([i[i.length-1]]).join("/")}if(n[o]!=null)r.push([n[o],e[a]]);else if(t)throw new j(`Provided weight data has no target variable: ${a}`);delete n[o]}if(t){let a=[];for(let o in n)a.push(o);if(a.length>0)throw new j(`${a.length} of ${s} weights are not set: ${a}`)}w5(r)}updatedConfig(){let e=this.getConfig(),t={};return t.className=this.getClassName(),t.config=e,t.kerasVersion=`tfjs-layers ${D5}`,t.backend="TensorFlow.js",t}toJSON(e,t=!0){let n=ty(this.updatedConfig());return t?JSON.stringify(n):n}call(e,t){return Y(()=>{e=$t(e);let n=new Qi;for(let s=0;s{e=$t(e);let n;return t==null?n=pl(null,e.length):n=$t(t),this.runInternalGraph(e,n)[1]})}computeOutputShape(e){let t=_m(e);if(t.length!==this.inputLayers.length)throw new j(`Invalid inputShape argument ${e}: model has ${this.inputLayers.length} tensor inputs.`);let n={};for(let o=0;oparseInt(o,10)).sort(Jf);if(s.length>1)for(let o of s){let i=this.nodesByDepth[o];for(let l of i){let u=l.outboundLayer;if(this.inputLayers.map(f=>f.id).indexOf(u.id)!==-1)continue;let c=[];for(let f=0;fparseInt(i,10)).sort(Jf);for(let i of s){let l=this.nodesByDepth[i];for(let u of l){let c=u.outboundLayer,p=u.inputTensors,d=u.outputTensors,h=new Array;for(let f of p)f.id in n&&h.push(n[f.id]);if(h.length===p.length){let f={},m,g,y,x;if(u.callArgs!=null&&(f=u.callArgs),h.length===1){let[A,b]=h[0];f.mask==null&&(f.mask=b),y=$t(c.call(A,f)),x=$t(c.computeMask(A,b)),m=[A],g=[b]}else m=h.map(A=>A[0]),g=h.map(A=>A[1]),f.mask==null&&(f.mask=g),y=$t(c.call(m,f)),x=$t(c.computeMask(m,g));if(c.activityRegularizer)throw new Je("LayersModel invocation with concrete Tensor value(s) in the presence of activity regularizer(s) is not supported yet.");for(let A=0;A{let e=[];for(let t of this.layers)for(let n=0;n0){let f=[];for(let m=0;m0&&m.apply(xs(y),x)}function l(m){let g=m.name,y=Lr(m,t.customObjects!=null?t.customObjects:{});y.setFastWeightInitDuringBuild(s),r[g]=y,m.inboundNodes.forEach(A=>{if(!(A instanceof Array))throw new j(`Corrupted configuration, expected array for nodeData: ${A}`);o(y,A)})}let u=t.name,c=t.layers;for(let m of c)l(m);for(;!nU(a);)for(let m of c){let g=r[m.name];if(g.name in a){let y=a[g.name];delete a[g.name];for(let x of y)i(g,x)}}let p=[],d=[],h=t.inputLayers;for(let m of h){let g=m[0],y=m[1],x=m[2];Qr(g in r);let b=r[g].inboundNodes[y].outputTensors;p.push(b[x])}let f=t.outputLayers;for(let m of f){let g=m[0],y=m[1],x=m[2];Qr(g in r);let b=r[g].inboundNodes[y].outputTensors;d.push(b[x])}return new e({inputs:p,outputs:d,name:u})}get stateful(){if(this._stateful)throw new j("Container instance unexpectedly has _stateful = true. The statefulness of a Container is determined by the Layers it contains. Its _stateful property must remain the default false.");for(let e of this.layers)if(e.stateful)return!0;return!1}resetStates(){Y(()=>{this.layers.forEach(e=>{e.stateful&&e.resetStates()})})}};function NG(e,t,n){let s=t.length;if(e==null||Array.isArray(e)&&e.length===0)return t.map(r=>null);if(s===1)return Array.isArray(e)&&e.length===1?e:typeof e=="object"&&t[0]in e?[e[t[0]]]:[e];if(Array.isArray(e)){if(e.length!==s)throw new Error(`Provided ${n} is an array of ${e.length} element(s), but the model has ${s} outputs. Make sure a set of weights is provided for each model output.`);return e}else if(typeof e=="object"&&Object.keys(e).length>0&&typeof e[Object.keys(e)[0]]=="object"){let r=[];return t.forEach(a=>{a in e?r.push(e[a]):r.push(null)}),r}else throw new Error(`The model has multiple (${s}) outputs, so ${n} must be either an array with ${s} elements or an object with ${t} keys. Provided ${n} not understood: ${JSON.stringify(e)}`)}function u8(e,t){return NG(e,t,"classWeight")}async function c8(e,t,n,s){if(t!=null||s!=null)throw new Error("Support sampleWeight is not implemented yet");if(n!=null){let r=Y(()=>{if(e.shape.length===1)return Gn(e);if(e.shape.length===2){if(e.shape[1]>1)return Ms(e,1);if(e.shape[1]===1)return V(e,[e.shape[0]]);throw new Error(`Encountered unexpected last-dimension size (${e.shape[1]}) during handling of class weights. The size is expected to be >= 1.`)}else throw new Error(`Unexpected rank of target (y) tensor (${e.rank}) during handling of class weights. The rank is expected to be 1 or 2.`)}),a=Array.from(await r.data());Q(r);let o=[];return a.forEach(i=>{if(n[i]==null)throw new Error(`classWeight must contain all classes in the training data. The class ${i} exists in the data but not in classWeight`);o.push(n[i])}),Ot(o,"float32")}else return null}function EG(e,t){return z(e,t)}var RG=32;function d8(e,t){let n,s,r=t;n=r.xs,s=r.ys,v.assert(n!=null&&s!=null,()=>`A Dataset iterator for fitDataset() is expected to generate objects of the form \`{xs: xVal, ys: yVal}\`, where the two values may be \`tf.Tensor\`, an array of Tensors, or a map of string to Tensor. The provided Dataset instead generates ${t}`);let a=d7("input",e.inputNames,n),o=d7("output",e.outputNames,s),i=a[0].shape[0];v.assert(a.length===e.inputs.length,()=>`LayersModel has ${e.inputs.length} inputs, but the dataset provides ${a.length} inputs. (Expected input keys: ${JSON.stringify(e.inputNames)})`),v.assert(o.length===e.outputs.length,()=>`LayersModel has ${e.outputs.length} outputs, but the dataset provides ${o.length} outputs. (Expected output keys: ${JSON.stringify(e.outputNames)})`);for(let l=0;l`Batch size mismatch: input ${e.inputNames[l]} has ${a[l].shape[0]}; expected ${i} based on input ${e.inputNames[0]}.`);for(let l=0;l`Batch size mismatch: output ${e.outputNames[l]} has ${o[l].shape[0]}; expected ${i} based on input ${e.inputNames[0]}.`);return{xs:a,ys:o}}function d7(e,t,n){if(n instanceof it)return[n];if(Array.isArray(n))return v.assert(n.length===t.length,()=>`Received an array of ${n.length} Tensors, but expected ${t.length} to match the ${e} keys ${t}.`),n;{let s=[];for(let r of t){if(n[r]==null)throw new j(`The feature data generated by the dataset lacks the required ${e} key '${r}'.`);s.push(n[r])}return s}}function _G(e){if(e.length===3)throw new Je("Validation with sample weights is not implemented yet.");return{xs:e[0],ys:e[1]}}async function DG(e,t,n){let s=n.batchesPerEpoch!=null;if(v.assert(e.optimizer!=null,()=>"You must compile a model before training/testing. Use LayersModel.compile(modelCompileConfig)."),v.assert(n!=null,()=>"For fitDataset(), the 2nd argument (config) is required, but it is not provided in this call."),v.assert(n.epochs!=null&&n.epochs>0&&Number.isInteger(n.epochs),()=>`For fitDataset(), config.epochs is expected to be a positive integer, but got ${n.epochs}`),v.assert(!s||n.batchesPerEpoch>0&&Number.isInteger(n.batchesPerEpoch),()=>`For fitDataset(), config.batchesPerEpoch is expected to be a positive integer if specified, but got ${n.batchesPerEpoch}`),v.assert(n.validationSplit==null,()=>"`validationSplit` is not supported by `fitDataset()`. Use validationData instead."),e.isTraining)throw new Error("Cannot start training because another fit() call is ongoing.");e.isTraining=!0;try{let r=n.validationData!=null,a,o;if(r)if(p7(n.validationData))v.assert(n.validationBatches==null||n.validationBatches>0&&Number.isInteger(n.validationBatches),()=>`For fitDataset() with dataset-based validation, config.validationBatches is expected not to be provided, or to be a positive integer, but got ${n.validationBatches}`);else{let g=_G(n.validationData);a=g.xs,o=g.ys}let i=e.makeTrainFunction(),l=e.getDedupedMetricsNames(),u;r?u=l.slice().concat(l.map(g=>"val_"+g)):u=l.slice();let c=t8(n.callbacks,n.yieldEvery),p=n.verbose==null?1:n.verbose,{callbackList:d,history:h}=n8(c,p,n.epochs,null,null,$G(t,n),null,r,u);d.setModel(e),e.history=h,await d.onTrainBegin(),e.stopTraining_=!1;let f=n.initialEpoch==null?0:n.initialEpoch,m=await t.iterator();for(;f=n.batchesPerEpoch:A.done){if(r){let b;p7(n.validationData)?b=$t(await e.evaluateDataset(n.validationData,{batches:n.validationBatches})):b=$t(e.evaluate(a,o,{batchSize:n.validationBatchSize==null?RG:n.validationBatchSize,verbose:0}));for(let w=0;w0)throw new Je("Verbose mode is not implemented yet.");v.assert(!s||n.batches>0&&Number.isInteger(n.batches),()=>`Test loop expects \`batches\` to be a positive integer, but received ${JSON.stringify(n.batches)}`);let o=PG(t)?t:await t.iterator(),i=0,l=0;for(;!s||l{if(u.value){let{xs:c,ys:p}=d8(e,u.value),d=c.concat(p),h=Y(()=>r(d));if(Q(d),l===0)for(let m=0;mde(a[m],z(f,g))),l>0&&Q(y)}Q(h),i+=f,++l}return a}),u.done){s&&console.warn(`Your dataset iterator ran out of data during evaluateDataset(). Interrupting evalution. Make sure that your dataset can generate at least \`batches\` batches (in this case, ${n.batches} batches). You may need to use the repeat() function when building your dataset.`);break}}for(let u=0;u0&&Number.isInteger(e),()=>`batchSize is required to be a positive integer, but got ${e}`)}function dp(e,t,n){return e==null?[null]:Array.isArray(e)?e.map(s=>rl(s,t,n-t)):rl(e,t,n-t)}function $5(e,t){return Y(()=>e==null?null:Array.isArray(e)?e.map(n=>$5(n,t)):Uk(e,t.dtype==="int32"?t:ge(t,"int32")))}function sy(e,t){let n=[],s=0,r=null;for(;s=e&&(r=e),n.push([s,r]),s=r;return n}async function OG(e,t,n,s,r,a,o,i,l,u,c,p,d,h,f){r==null&&(r=32),a==null&&(a=1),c==null&&(c=!0),d==null&&(d=0);let m=!1;if(l!=null&&u!=null&&(m=!0),f!=null&&(m=!0,h==null))throw new j("Can only use `validationSteps` when doing step-wise training, i.e., `stepsPerEpoch` must be set.");let g=e.checkNumSamples(n,r,h,"steps_per_epoch"),y;g!=null&&(y=Wr(0,g)),o==null&&(o=1);let{callbackList:x,history:A}=n8(i,o,a,d,g,h,r,m,p);x.setModel(e),e.history=A,await x.onTrainBegin(),e.stopTraining_=!1;for(let b=d;b{let $=C[E][0],R=C[E][1],P=rl(k,$,R-$);_.batch=E,_.size=R-$;let S=$5(n,P),M=t(S);for(let L=0;L0){if(g=!0,s.validationData.length===2)l=s.validationData[0],u=s.validationData[1];else throw s.validationData.length===3?new Je("validationData including sample weights is not supported yet."):new j(`When passing validation data, it must contain 2 (valX, valY) or 3 (valX, valY, valSampleWeight) items; ${s.validationData} is invalid.`);let _=!0,$=await e.standardizeUserData(l,u,null,null,_,h);c=$[0],p=$[1],y=c.concat(p)}else if(s.validationSplit!=null&&s.validationSplit>0&&s.validationSplit<1){g=!0;let _=Math.floor(r[0].shape[0]*(1-s.validationSplit)),$=r[0].shape[0];c=dp(r,_,$),o=r,r=dp(r,0,_),p=dp(a,_,$),i=a,a=dp(a,0,_),y=c.concat(p)}else s.validationSteps!=null&&(g=!0);let x=r.concat(a).concat(d);e.checkTrainableWeightsConsistency();let A=e.makeTrainFunction(),b=e.getDedupedMetricsNames(),w,k;g?(e.makeTestFunction(),w=e.testFunction,k=b.slice().concat(b.map(_=>"val_"+_))):(w=null,y=[],k=b.slice());let C=t8(s.callbacks,s.yieldEvery);return await OG(e,A,x,b,h,s.epochs,s.verbose,C,w,y,s.shuffle,k,s.initialEpoch,null,null)}finally{e.isTraining=!1,Fr(r,t),Fr(a,n),Fr(o,t),Fr(i,n),Fr(c,l),Fr(p,u),d!=null&&Q(d)}}function p8(e){let t=[];e instanceof it&&(e=[e]);for(let n=0;nn.push(r.id));else if(t!=null)for(let r in t){let a=t[r];n.push(a.id)}let s=[];if(e instanceof it)n.indexOf(e.id)===-1&&s.push(e);else if(Array.isArray(e))e.forEach(r=>{n.indexOf(r.id)===-1&&s.push(r)});else if(e!=null)for(let r in e){let a=e[r];n.indexOf(a.id)===-1&&s.push(a)}s.forEach(r=>{r.isDisposed||r.dispose()})}function zG(e){return e instanceof it}function ry(e){return Array.isArray(e)}function h7(e){return!zG(e)&&!ry(e)}function f7(e,t,n,s=!0,r=""){if(t==null||t.length===0){if(e!=null){let o=!1;if(ry(e)&&e.length>0)o=!0;else if(h7(e)){for(let i in e)if(e.hasOwnProperty(i)){o=!0;break}}else o=!0;if(o)throw new j(`Error when checking model ${r} expected no data, but got ${e}`)}return[]}if(e==null)return t.map(o=>null);let a;if(h7(e)){e=e,a=[];for(let o of t){if(e[o]==null)throw new j(`No data provided for "${o}". Need data for each key in: ${t}`);a.push(e[o])}}else if(ry(e)){if(e=e,e.length!==t.length)throw new j(`Error when checking model ${r}: the Array of Tensors that you are passing to your model is not the size the model expected. Expected to see ${t.length} Tensor(s), but instead got the following list of Tensor(s): ${e}`);a=e}else{if(e=e,t.length>1)throw new j(`The model ${r} expects ${t.length} Tensor(s), but only received one Tensor. Found: Tensor with shape ${e.shape}`);a=[e]}if(a=p8(a),n!=null)for(let o=0;o=0&&u!==c)throw new j(`${r} expected a batch of elements where each example has shape [${n[o].slice(1,n[o].length)}] (i.e.,tensor shape [*,${n[o].slice(1,n[o].length)}]) but the ${r} received an input with ${i.shape[0]} examples, each with shape [${i.shape.slice(1,i.shape.length)}] (tensor shape [${i.shape}])`)}}return a}function LG(e,t,n){let s=no(e.map(a=>a.shape[0]));s.sort();let r=no(t.map(a=>a.shape[0]));if(r.sort(),s.length>1)throw new j(`All input Tensors (x) should have the same number of samples. Got array shapes: ${JSON.stringify(e.map(a=>a.shape))}`);if(r.length>1)throw new j(`All target Tensors (y) should have the same number of samples. Got array shapes: ${JSON.stringify(t.map(a=>a.shape))}`);if(s.length>0&&r.length>0&&!v.arraysEqual(s,r))throw new j(`Input Tensors should have the same number of samples as target Tensors. Found ${s[0]} input sample(s) and ${r[0]} target sample(s).`)}function BG(e,t,n){let s=[gu,k2,$p];for(let r=0;r1)throw new j(`The model expects ${t.length} ${r} Tensors, but only received one Tensor. Found: array with shape ${JSON.stringify(e.shape)}.`);a=[e]}if(n!=null)for(let o=0;o[]);let n;if(typeof e=="string"||typeof e=="function")n=[e];else if(Array.isArray(e)||typeof e=="object")n=e;else throw new TypeError(`Type of metrics argument not understood. Expected an string,function, Array, or Object, found: ${e}`);if(Array.isArray(n))return t.map(s=>n);{let s=[];for(let r of t){let a=n.hasOwnProperty(r)?n[r]:[];Array.isArray(a)||(a=[a]),s.push(a)}return s}}var VG="layers-model",Ia=class extends Yr{constructor(e){super(e),this.isTraining=!1}summary(e,t,n=console.log){if(!this.built)throw new j("This model has never been called, thus its weights have not been created yet. So no summary can be displayed. Build the model first (e.g., by calling it on some test data).");kG(this,e,t,n)}compile(e){if(e.loss==null&&(e.loss=[]),this.loss=e.loss,typeof e.optimizer=="string")this.optimizer_=wG(e.optimizer),this.isOptimizerOwned=!0;else{if(!(e.optimizer instanceof Oa))throw new j("User-defined optimizer must be an instance of tf.Optimizer.");this.optimizer_=e.optimizer,this.isOptimizerOwned=!1}let t=[];if(!Array.isArray(e.loss)&&typeof e.loss!="string"&&typeof e.loss!="function"){e.loss=e.loss;for(let a in e.loss)if(this.outputNames.indexOf(a)===-1)throw new j(`Unknown entry in loss dictionary: "${a}". Only expected the following keys: ${this.outputNames}`);for(let a of this.outputNames)e.loss[a]==null&&console.warn(`Output "${a}" is missing from loss dictionary. We assume this was done on purpose, and we will not be expecting data to be passed to ${a} during training`),t.push(I3(e.loss[a]))}else if(Array.isArray(e.loss)){if(e.loss.length!==this.outputs.length)throw new j(`When passing an Array as loss, it should have one entry per model output. The model has ${this.outputs.length} output(s), but you passed loss=${e.loss}.`);t=e.loss.map(o=>I3(o))}else{let a=I3(e.loss);this.outputs.forEach(o=>{t.push(a)})}this.lossFunctions=t,this.feedOutputNames=[],this.feedOutputShapes=[],this.feedLossFns=[];for(let a=0;a{for(let a=0;a1&&(this.metricsTensors.push([o,a]),this.metricsNames.push(this.outputNames[a]+"_loss"))}});let s=WG(e.metrics,this.outputNames),r=(a,o,i)=>{this.outputNames.length>1&&(o=this.outputNames[a]+"_"+o),this.metricsNames.push(o),this.metricsTensors.push([i,a])};sl("metric",()=>{for(let a=0;a{let u="",c,p,d;for(let h of l){if(typeof h=="string"&&["accuracy","acc","crossentropy","ce"].indexOf(h)!==-1){let m=this.internalOutputShapes[a];m[m.length-1]===1||this.lossFunctions[a]===k2?["accuracy","acc"].indexOf(h)!==-1?p=E5:["crossentropy","ce"].indexOf(h)!==-1&&(p=a8):this.lossFunctions[a]===Om?["accuracy","acc"].indexOf(h)!==-1?p=o8:["crossentropy","ce"].indexOf(h)!==-1&&(p=i8):["accuracy","acc"].indexOf(h)!==-1?p=R5:["crossentropy","ce"].indexOf(h)!==-1&&(p=_5);let g;["accuracy","acc"].indexOf(h)!==-1?g="acc":["crossentropy","ce"].indexOf(h)!==-1&&(g="ce"),d=p,c=u+g}else d=vG(h),c=u+tm(h);let f;sl(c,()=>{f=d}),r(a,c,f)}})(o)}}),this.collectedTrainableWeights=this.trainableWeights}checkTrainableWeightsConsistency(){this.collectedTrainableWeights!=null&&this.trainableWeights.length!==this.collectedTrainableWeights.length&&console.warn("Discrepancy between trainableweights and collected trainable weights. Did you set `model.trainable` without calling `model.compile()` afterwards?")}evaluate(e,t,n={}){let s=n.batchSize==null?32:n.batchSize;ny(s);let r=!0,a=this.standardizeUserDataXY(e,t,r,s);try{let o=a[0].concat(a[1]);this.makeTestFunction();let i=this.testFunction,l=this.testLoop(i,o,s,n.verbose,n.steps);return xs(l)}finally{Fr(a[0],e),Fr(a[1],t)}}async evaluateDataset(e,t){return this.makeTestFunction(),FG(this,e,t)}checkNumSamples(e,t,n,s="steps"){let r;if(n!=null){if(r=null,t!=null)throw new j(`If ${s} is set, batchSize must be null or undefined.Got batchSize = ${t}`)}else if(e!=null)Array.isArray(e)?r=e[0].shape[0]:r=e.shape[0];else throw new j(`Either the input data should have a defined shape, or ${s} shoud be specified.`);return r}execute(e,t){if(Array.isArray(t)&&t.length===0)throw new j("`outputs` is an empty Array, which is not allowed.");let n=Array.isArray(t),s=n?t:[t],r=this.retrieveSymbolicTensors(s),a=new Qi;if(e instanceof it&&(e=[e]),Array.isArray(e)){if(e.length!==this.inputs.length)throw new j(`The number of inputs provided (${e.length}) does not match the number of inputs of this model (${this.inputs.length}).`);for(let i=0;io.name);for(let o=0;o0){let s=[];throw t.forEach((r,a)=>{r==null&&s.push(e[a])}),new j(`Cannot find SymbolicTensors for output name(s): ${JSON.stringify(s)}`)}return t}predictLoop(e,t=32,n=!1){return Y(()=>{let s=this.checkNumSamples(e);if(n)throw new Je("Verbose predictLoop() is not implemented yet.");let r=sy(s,t),a=this.outputs.map(o=>[]);for(let o=0;o{let l=r[o][0],u=r[o][1],c=dp(e,l,u),p=[];if(Array.isArray(c))for(let h=0;ha[u].push(l));return xs(a.map(o=>ct(o,0)))})}predict(e,t={}){let n=p8(e);m7(n,this.inputNames,this.feedInputShapes,!1);try{let s=t.batchSize==null?32:t.batchSize;return ny(s),this.predictLoop(n,s)}finally{Fr(n,e)}}predictOnBatch(e){m7(e,this.inputNames,this.feedInputShapes,!0);let t=(Array.isArray(e)?e[0]:e).shape[0];return this.predictLoop(e,t)}standardizeUserDataXY(e,t,n=!0,s){if(this.optimizer_==null)throw new Or("You must compile a model before training/testing. Use LayersModel.compile(modelCompileArgs).");let r=[];for(let a=0;a0&&e[0].shape[0]%s!==0)throw new j(`In a stateful network, you should only pass inputs with a number of samples that is divisible by the batch size ${s}. Found: ${e[0].shape[0]} sample(s).`);return[e,t]}async standardizeUserData(e,t,n,s,r=!0,a){let[o,i]=this.standardizeUserDataXY(e,t,r,a);if(n!=null)throw new Error("sample weight is not supported yet.");let l=null;if(s!=null){let u=u8(s,this.outputNames);l=[];for(let c=0;c{let a=this.checkNumSamples(t,n,r,"steps"),o=[];if(s>0)throw new Je("Verbose mode is not implemented yet.");if(r!=null)throw new Je("steps mode in testLoop() is not implemented yet");{let i=sy(a,n),l=Ot(Wr(0,a));for(let u=0;u1&&(r+=`_${Qv(e.slice(0,n),s)}`),t.push(r)}return t}makeTrainFunction(){return e=>{let t=[],n=e.slice(0,this.inputs.length),s=e.slice(this.inputs.length,this.inputs.length+this.outputs.length),r=e.slice(this.inputs.length+this.outputs.length,this.inputs.length+this.outputs.length*2),a=[],o=()=>{let c=[];for(let f=0;f1&&f{h=de(h,f)}),h},i=this.collectedTrainableWeights.map(c=>c.read()),l=!0;return[this.optimizer_.minimize(o,l,i)].concat(a)}}makeTestFunction(){this.testFunction=e=>Y(()=>{let t=[],n,s=e.slice(0,this.inputs.length),r=e.slice(this.inputs.length,this.inputs.length+this.outputs.length),a=[];for(let l=0;lva(t))}else{let t=Object.keys(this.loss);e={};let n=this.loss;for(let s of t)if(typeof n[s]=="string")e[s]=va(n[s]);else throw new Error("Serialization of non-string loss is not supported.")}return e}getMetricIdentifiers(){if(typeof this.metrics=="string"||typeof this.metrics=="function")return[va(tm(this.metrics))];if(Array.isArray(this.metrics))return this.metrics.map(e=>va(tm(e)));{let e={};for(let t in this.metrics)e[t]=va(tm(this.metrics[t]));return e}}getTrainingConfig(){return{loss:this.getLossIdentifiers(),metrics:this.getMetricIdentifiers(),optimizer_config:{class_name:this.optimizer.getClassName(),config:this.optimizer.getConfig()}}}loadTrainingConfig(e){if(e.weighted_metrics!=null)throw new Error("Loading weight_metrics is not supported yet.");if(e.loss_weights!=null)throw new Error("Loading loss_weights is not supported yet.");if(e.sample_weight_mode!=null)throw new Error("Loading sample_weight_mode is not supported yet.");let t=Pp(e.optimizer_config),n=Lr(t),s;if(typeof e.loss=="string")s=Zi(e.loss);else if(Array.isArray(e.loss))s=e.loss.map(a=>Zi(a));else if(e.loss!=null){s={};for(let a in e.loss)s[a]=Zi(e.loss[a])}let r;if(Array.isArray(e.metrics))r=e.metrics.map(a=>Zi(a));else if(e.metrics!=null){r={};for(let a in e.metrics)r[a]=Zi(e.metrics[a])}this.compile({loss:s,metrics:r,optimizer:n})}async save(e,t){if(typeof e=="string"){let l=Fs.getSaveHandlers(e);if(l.length===0)throw new j(`Cannot find any save handlers for URL '${e}'`);if(l.length>1)throw new j(`Found more than one (${l.length}) save handlers for URL '${e}'`);e=l[0]}if(e.save==null)throw new j("LayersModel.save() cannot proceed because the IOHandler provided does not have the `save` attribute defined.");let n=await Fs.encodeWeights(this.getNamedWeights(t)),s=!1,r=null,o={modelTopology:this.toJSON(r,s),format:VG,generatedBy:`TensorFlow.js tfjs-layers v${D5}`,convertedBy:null};if((t==null?!1:t.includeOptimizer)&&this.optimizer!=null){o.trainingConfig=this.getTrainingConfig();let l="optimizer",{data:u,specs:c}=await Fs.encodeWeights(await this.optimizer.getWeights(),l);n.specs.push(...c),n.data=Fs.concatenateArrayBuffers([n.data,u])}return this.userDefinedMetadata!=null&&(c7(this.userDefinedMetadata,this.name,!0),o.userDefinedMetadata=this.userDefinedMetadata),o.weightData=n.data,o.weightSpecs=n.specs,e.save(o)}setUserDefinedMetadata(e){c7(e,this.name),this.userDefinedMetadata=e}getUserDefinedMetadata(){return this.userDefinedMetadata}};Ia.className="Model";he.registerClass(Ia);var h8=class extends Ia{};h8.className="Functional";he.registerClass(h8);async function UG(e,t){"modelTopology"in e||(e={modelTopology:e}),e=e;let n=e.modelTopology;n.model_config!=null&&(n=n.model_config);let s=Pp(n),r=Lr(s,t);if(e.weightsManifest!=null){let a=await Fs.loadWeights(e.weightsManifest,e.pathPrefix,r.weights.map(i=>i.originalName)),o={};for(let i of r.weights)o[i.originalName]=a[i.originalName];r.loadWeights(o),Q(a)}return r}async function GG(e,t){if(t==null&&(t={}),typeof e=="string"){let n=Fs.getLoadHandlers(e,t);if(n.length===0)n.push(Fs.browserHTTPRequest(e,t));else if(n.length>1)throw new j(`Found more than one (${n.length}) load handlers for URL '${e}'`);e=n[0]}return HG(e,void 0,t)}async function HG(e,t,n){if(n==null&&(n={}),e.load==null)throw new j("Cannot proceed with model loading because the IOHandler provided does not have the `load` method implemented.");let s=await e.load(),r=s.modelTopology;r.model_config!=null&&(r=r.model_config);let a=n.strict==null?!0:n.strict,o=s.weightData!=null&&s.weightSpecs!=null&&a,i=Lr(Pp(r),t,o),l=s.trainingConfig;if(l!=null&&i.loadTrainingConfig(l),s.userDefinedMetadata!=null&&i.setUserDefinedMetadata(s.userDefinedMetadata),s.weightData!=null){if(s.weightSpecs==null)throw new j("LayersModel artifacts contains weight data, but not weight specs. Therefore loading of weights cannot proceed.");let{modelWeights:u,optimizerWeights:c}=jG(s.weightData,s.weightSpecs);i.loadWeights(u,a),i.optimizer!=null&&c.length>0&&await i.optimizer.setWeights(c),Q(u),Q(c.map(p=>p.tensor))}return i}function jG(e,t){let n=Fs.decodeWeights(e,t),s={},r=[];return t.forEach(a=>{a.group==="optimizer"?r.push({name:a.name,tensor:n[a.name]}):s[a.name]=n[a.name]}),{modelWeights:s,optimizerWeights:r}}var xc=class extends Ia{constructor(e){if(super({inputs:[],outputs:[]}),e=e||{},this.trainable=!0,this.built=!1,this.name=e.name!=null?e.name:d2("sequential_"),e.layers!=null)for(let t of e.layers)this.add(t)}checkShape(e){if(e.inboundNodes[0].outputTensors[0].shape.some(n=>n<0))throw new j(`Negative dimension size caused by adding layer ${e.name} with input shape [${e.inboundNodes[0].inputTensors[0].shape}]`)}add(e){let t=e instanceof xc||e instanceof Ia,n;if(t){if(n=e,n.outputs.length!==1)throw new j("All layers in a Sequential model should have a single output tensor. For multi-output layers, use the functional API.");if(n.inputs.length!==1)throw new j("All layers in a Sequential model should have a single input tensor. For multi-input layers, use the functional API.")}if(this.outputs.length===0){if(e.inboundNodes.length===0){if(e.batchInputShape==null)throw new j("The first layer in a Sequential model must get an `inputShape` or `batchInputShape` argument.");let s=qk({batchShape:e.batchInputShape,dtype:e.dtype,name:e.name+"_input"});e.apply(s)}if(t)this.outputs=n.outputs,this.inputs=n.inputs;else{if(e.inboundNodes.length!==1)throw new j(`A layer added to a Sequential model must not already be connected somewhere else. LayersModel received layer ${e.name} which has ${e.inboundNodes.length} pre-existing inbound connections.`);if(e.inboundNodes[0].outputTensors.length!==1)throw new j("All layers in a Sequential model should have a single output tensor. For multi-output layers, use the functional API.");this.checkShape(e),this.outputs=[e.inboundNodes[0].outputTensors[0]],this.inputs=jk(this.outputs[0])}this.inboundNodes=[],new v2({outboundLayer:this,inboundLayers:[],nodeIndices:[],tensorIndices:[],inputTensors:this.inputs,outputTensors:this.outputs,inputMasks:pl(null,this.inputs.length),outputMasks:[null],inputShapes:this.inputs.map(s=>s.shape),outputShapes:this.outputs[0].shape})}else{let s=e.apply(this.outputs[0]);if(Array.isArray(s))throw new TypeError("All layers in a Sequential model should have a single output tensor. For multi-output layers, use the functional API.");this.checkShape(e),this.outputs=[s],this.inboundNodes[0].outputTensors=this.outputs,this.inboundNodes[0].outputShapes=[this.outputs[0].shape]}this.layers.push(e),this.built=!1}pop(){if(this.layers.length===0)throw new TypeError("There are no layers in the model.");if(this.layers.pop(),this.layers.length===0)this.outputs=[],this.inboundNodes=[],this.outboundNodes=[];else{let e=this.layers.length-1;this.layers[e].outboundNodes=[],this.outputs=[this.layers[e].output],this.inboundNodes[0].outputTensors=this.outputs,this.inboundNodes[0].outputShapes=[this.outputs[0].shape]}}call(e,t){return this.model==null&&this.build(),this.model.call(e,t)}build(e){if(bt(e),this.inputs.length===0||this.outputs.length===0)throw new TypeError("Sequential model cannot be built: model is empty. Add some layers first.");this.model=new Ia({inputs:this.inputs,outputs:this.outputs[0],name:this.name+"_model"}),this.model.trainable=this.trainable,this.supportsMasking=this.model.supportsMasking,this.inputLayers=this.model.inputLayers,this.inputLayersNodeIndices=this.model.inputLayersNodeIndices,this.inputLayersTensorIndices=this.model.inputLayersTensorIndices,this.outputLayers=this.model.outputLayers,this.outputLayersNodeIndices=this.model.outputLayersNodeIndices,this.outputLayersTensorIndices=this.model.outputLayersTensorIndices,this.nodesByDepth=this.model.nodesByDepth,this.containerNodes=this.model.containerNodes,this.outputNames=this.model.outputNames,this.inputNames=this.model.inputNames,this.built=!0}countParams(){return this.built||this.build(),super.countParams()}summary(e,t,n=console.log){this.built||this.build(),super.summary(e,t,n)}setWeights(e){this.model==null&&this.build(),this.model.setWeights(e)}evaluate(e,t,n={}){if(!this.built)throw new Or("The model needs to be compiled before being used.");return this.model.evaluate(e,t,n)}async evaluateDataset(e,t){if(!this.built)throw new Or("The model needs to be compiled before being used.");return this.model.evaluateDataset(e,t)}predict(e,t={}){return this.model==null&&this.build(),this.model.predict(e,t)}predictOnBatch(e){return this.model==null&&this.build(),this.model.predictOnBatch(e)}compile(e){this.build(),this.model.compile(e),this.optimizer_=this.model.optimizer,this.isOptimizerOwned=this.model.isOptimizerOwned,this.loss=this.model.loss,this.metrics=this.model.metrics,this.metricsTensors=this.model.metricsTensors,this.metricsNames=this.model.metricsNames}get optimizer(){return this.model==null?void 0:this.model.optimizer}set optimizer(e){this.model.optimizer=e}async fit(e,t,n={}){if(!this.built)throw new Or("The model needs to be compiled before being used.");return this.model.fit(e,t,n)}async fitDataset(e,t){if(!this.built)throw new Or("The model needs to be compiled before being used.");return this.model.fitDataset(e,t)}async trainOnBatch(e,t){return this.model.trainOnBatch(e,t)}static fromConfig(e,t,n={},s=!1){let r,a={};if(t instanceof Array){if(t[0].className==null||t[0].className==="Merge")throw new j("Legacy serialization format not supported yet.");r=t}else v.assert(t.layers!=null,()=>"When the config data for a Sequential model is not an Array, it must be an Object that contains the 'layers' field."),r=t.layers,delete t.layers,a=t;let o=new e(a);if(!(o instanceof xc))throw new Je(`Sequential.fromConfig called on non-Sequential input: ${o}`);for(let i of r){let u=Lr(i,void 0,s);s&&u.setFastWeightInitDuringBuild(!0),o.add(u)}return o}set stopTraining(e){if(this.model==null)throw new j("Cannot set the stopTraining property of a sequential model before it is compiled.");this.model.stopTraining=e}get stopTraining(){if(this.model==null)throw new j("Cannot get the stopTraining property of a sequential model before it is compiled.");return this.model.stopTraining}getConfig(){let e=[];for(let t of this.layers){let n={};n.className=t.getClassName(),n.config=t.getConfig(),e.push(n)}return{name:this.name,layers:e}}};xc.className="Sequential";he.registerClass(xc);function qG(e){return new Ia(e)}function XG(e){return new xc(e)}function KG(e,t){return t==null&&(t={}),GG(e,t)}function f8(e){return qk(e)}function ZG(e,t){hr.registerCallbackConstructor(e,t)}var Cs=class extends he.Serializable{getConfig(){return{}}},m8=class extends Cs{apply(e,t=1){return yU(e,t)}};m8.className="elu";he.registerClass(m8);var g8=class extends Cs{apply(e){return H0(e)}};g8.className="selu";he.registerClass(g8);var y8=class extends Cs{apply(e){return Gr(e)}};y8.className="relu";he.registerClass(y8);var A8=class extends Cs{apply(e){return Y(()=>ad(6,Gr(e)))}};A8.className="relu6";he.registerClass(A8);var x8=class extends Cs{apply(e){return e}};x8.className="linear";he.registerClass(x8);var b8=class extends Cs{apply(e){return On(e)}};b8.className="sigmoid";he.registerClass(b8);var v8=class extends Cs{apply(e){return xU(e)}};v8.className="hardSigmoid";he.registerClass(v8);var w8=class extends Cs{apply(e){return du(e)}};w8.className="softplus";he.registerClass(w8);var k8=class extends Cs{apply(e){return AU(e)}};k8.className="softsign";he.registerClass(k8);var S8=class extends Cs{apply(e){return ul(e)}};S8.className="tanh";he.registerClass(S8);var P5=class extends Cs{apply(e,t=-1){return hu(e,t)}};P5.className="softmax";he.registerClass(P5);var I8=class extends Cs{apply(e,t=-1){return M0(e,t)}};I8.className="logSoftmax";he.registerClass(I8);var C8=class extends Cs{apply(e,t=1){return Y(()=>z(On(z(e,t)),e))}};C8.className="swish";he.registerClass(C8);var T8=class extends Cs{apply(e){return Y(()=>z(e,ul(du(e))))}};T8.className="mish";he.registerClass(T8);function po(e){return e.getClassName()}function C3(e,t={}){return _h(e,he.SerializationMap.getMap().classNameMap,t,"activation")}function ho(e){if(e==null){let t={};return t.className="linear",t.config={},C3(t)}if(typeof e=="string"){let t={};return t.className=e,t.config={},C3(t)}else return e instanceof Cs?e:C3(e)}function F5(e){if(e!=null&&typeof e!="object")throw new Error(`Argument to L1L2 regularizer's constructor is expected to be an object, but received: ${e}`)}var N8=class extends he.Serializable{},Oh=class extends N8{constructor(e){super(),F5(e),this.l1=e==null||e.l1==null?.01:e.l1,this.l2=e==null||e.l2==null?.01:e.l2,this.hasL1=this.l1!==0,this.hasL2=this.l2!==0}apply(e){return Y(()=>{let t=Gt([1]);return this.hasL1&&(t=de(t,Se(z(this.l1,an(e))))),this.hasL2&&(t=de(t,Se(z(this.l2,$h(e))))),V(t,[])})}getConfig(){return{l1:this.l1,l2:this.l2}}static fromConfig(e,t){return new e({l1:t.l1,l2:t.l2})}};Oh.className="L1L2";he.registerClass(Oh);function YG(e){return F5(e),new Oh({l1:e!=null?e.l1:null,l2:0})}function JG(e){return F5(e),new Oh({l2:e!=null?e.l2:null,l1:0})}var g7={l1l2:"L1L2"};function Ct(e){return p5(e)}function y7(e,t={}){return _h(e,he.SerializationMap.getMap().classNameMap,t,"regularizer")}function zt(e){if(e==null)return null;if(typeof e=="string"){let n={className:e in g7?g7[e]:e,config:{}};return y7(n)}else return e instanceof N8?e:y7(e)}var O5=class extends pt{constructor(e){super(e==null?{}:e),this.supportsMasking=!0,e!=null&&(this.maxValue=e.maxValue)}call(e,t){e=et(e);let n=Gr(e);return this.maxValue!=null&&(n=ws(n,0,this.maxValue)),n}computeOutputShape(e){return e}getConfig(){let e={maxValue:this.maxValue},t=super.getConfig();return Object.assign(e,t),e}};O5.className="ReLU";he.registerClass(O5);var M5=class extends pt{constructor(e){super(e==null?{}:e),this.DEFAULT_ALPHA=.3,e==null&&(e={}),this.alpha=e.alpha==null?this.DEFAULT_ALPHA:e.alpha}call(e,t){let n=et(e);return bh(n,this.alpha)}computeOutputShape(e){return e}getConfig(){let e={alpha:this.alpha},t=super.getConfig();return Object.assign(e,t),e}};M5.className="LeakyReLU";he.registerClass(M5);var z5=class extends pt{constructor(e){if(super(e==null?{}:e),this.DEFAULT_ALPHA_INITIALIZER="zeros",e==null&&(e={}),this.supportsMasking=!0,this.alphaInitializer=Mt(e.alphaInitializer||this.DEFAULT_ALPHA_INITIALIZER),this.alphaRegularizer=zt(e.alphaRegularizer),this.alphaConstraint=vn(e.alphaConstraint),e.sharedAxes==null)this.sharedAxes=null;else if(Array.isArray(e.sharedAxes))this.sharedAxes=e.sharedAxes;else if(typeof e.sharedAxes=="number")this.sharedAxes=[e.sharedAxes];else throw new j(`Expected sharedAxes to be a number or an array of numbers, but got ${e.sharedAxes}`)}build(e){e=bt(e);let t=e.slice(1);if(this.sharedAxes!=null)for(let s of this.sharedAxes)t[s-1]=1;this.alpha=this.addWeight("alpha",t,"float32",this.alphaInitializer,this.alphaRegularizer,!0,this.alphaConstraint);let n={};if(this.sharedAxes!=null)for(let s=1;s(en(t),t==="channelsFirst"?at(e,[0,2,3,1]):e))}function E8(e,t){return Y(()=>(en(t),t==="channelsFirst"?at(e,[0,2,3,4,1]):e))}function QG(e,t,n,s=1,r="valid",a,o=1){return Y(()=>{if(a==null&&(a=Vr()),en(a),e.shape.length!==3)throw new j(`The input of a conv1dWithBias operation should be 3, but is ${e.shape.length} instead.`);if(t.shape.length!==3)throw new j(`The kernel for a conv1dWithBias operation should be 3, but is ${t.shape.length} instead`);if(n!=null&&n.shape.length!==1)throw new j(`The bias for a conv1dWithBias operation should be 1, but is ${t.shape.length} instead`);if(a==="channelsFirst"&&(e=at(e,[0,2,1])),r==="causal")throw new Je("The support for CAUSAL padding mode in conv1dWithBias is not implemented yet.");let i=R0(e,t,s,r==="same"?"same":"valid","NWC",o);return n!=null&&(i=Hr(i,n)),i})}function A7(e,t,n,s=[1,1],r="valid",a,o,i=null){return Y(()=>{if(a==null&&(a=Vr()),en(a),e.rank!==3&&e.rank!==4)throw new j(`conv2dWithBiasActivation expects input to be of rank 3 or 4, but received ${e.rank}.`);if(t.rank!==3&&t.rank!==4)throw new j(`conv2dWithBiasActivation expects kernel to be of rank 3 or 4, but received ${e.rank}.`);let l=V5(e,a);if(r==="causal")throw new Je("The support for CAUSAL padding mode in conv1dWithBias is not implemented yet.");return l=gc.conv2d({x:l,filter:t,strides:s,pad:r==="same"?"same":"valid",dilations:o,dataFormat:"NHWC",bias:n,activation:i}),a==="channelsFirst"&&(l=at(l,[0,3,1,2])),l})}function eH(e,t,n,s=[1,1,1],r="valid",a,o){return Y(()=>{if(a==null&&(a=Vr()),en(a),e.rank!==4&&e.rank!==5)throw new j(`conv3dWithBias expects input to be of rank 4 or 5, but received ${e.rank}.`);if(t.rank!==4&&t.rank!==5)throw new j(`conv3dWithBias expects kernel to be of rank 4 or 5, but received ${e.rank}.`);let i=E8(e,a);if(r==="causal")throw new Je("The support for CAUSAL padding mode in conv3dWithBias is not implemented yet.");return i=NA(i,t,s,r==="same"?"same":"valid","NDHWC",o),n!=null&&(i=Hr(i,n)),a==="channelsFirst"&&(i=at(i,[0,4,1,2,3])),i})}var U5=class extends pt{constructor(e,t){if(super(t),this.bias=null,this.DEFAULT_KERNEL_INITIALIZER="glorotNormal",this.DEFAULT_BIAS_INITIALIZER="zeros",U5.verifyArgs(t),this.rank=e,Nn(this.rank,"rank"),this.rank!==1&&this.rank!==2&&this.rank!==3)throw new Je(`Convolution layer for rank other than 1, 2, or 3 (${this.rank}) is not implemented yet.`);if(this.kernelSize=ic(t.kernelSize,e,"kernelSize"),this.strides=ic(t.strides==null?1:t.strides,e,"strides"),this.padding=t.padding==null?"valid":t.padding,or(this.padding),this.dataFormat=t.dataFormat==null?"channelsLast":t.dataFormat,en(this.dataFormat),this.activation=ho(t.activation),this.useBias=t.useBias==null?!0:t.useBias,this.biasInitializer=Mt(t.biasInitializer||this.DEFAULT_BIAS_INITIALIZER),this.biasConstraint=vn(t.biasConstraint),this.biasRegularizer=zt(t.biasRegularizer),this.activityRegularizer=zt(t.activityRegularizer),this.dilationRate=ic(t.dilationRate==null?1:t.dilationRate,e,"dilationRate"),this.rank===1&&Array.isArray(this.dilationRate)&&this.dilationRate.length!==1)throw new j(`dilationRate must be a number or an array of a single number for 1D convolution, but received ${JSON.stringify(this.dilationRate)}`);if(this.rank===2){if(typeof this.dilationRate=="number")this.dilationRate=[this.dilationRate,this.dilationRate];else if(this.dilationRate.length!==2)throw new j(`dilationRate must be a number or array of two numbers for 2D convolution, but received ${JSON.stringify(this.dilationRate)}`)}else if(this.rank===3){if(typeof this.dilationRate=="number")this.dilationRate=[this.dilationRate,this.dilationRate,this.dilationRate];else if(this.dilationRate.length!==3)throw new j(`dilationRate must be a number or array of three numbers for 3D convolution, but received ${JSON.stringify(this.dilationRate)}`)}}static verifyArgs(e){if(Qr("kernelSize"in e,"required key 'kernelSize' not in config"),typeof e.kernelSize!="number"&&!h5(e.kernelSize,"number",1,3))throw new j(`BaseConv expects config.kernelSize to be number or number[] with length 1, 2, or 3, but received ${JSON.stringify(e.kernelSize)}.`)}getConfig(){let e={kernelSize:this.kernelSize,strides:this.strides,padding:this.padding,dataFormat:this.dataFormat,dilationRate:this.dilationRate,activation:po(this.activation),useBias:this.useBias,biasInitializer:Ht(this.biasInitializer),biasRegularizer:Ct(this.biasRegularizer),activityRegularizer:Ct(this.activityRegularizer),biasConstraint:bn(this.biasConstraint)},t=super.getConfig();return Object.assign(e,t),e}},Mh=class extends U5{constructor(e,t){super(e,t),this.kernel=null,Mh.verifyArgs(t),this.filters=t.filters,Nn(this.filters,"filters"),this.kernelInitializer=Mt(t.kernelInitializer||this.DEFAULT_KERNEL_INITIALIZER),this.kernelConstraint=vn(t.kernelConstraint),this.kernelRegularizer=zt(t.kernelRegularizer)}build(e){e=bt(e);let t=this.dataFormat==="channelsFirst"?1:e.length-1;if(e[t]==null)throw new j(`The channel dimension of the input should be defined. Found ${e[t]}`);let n=e[t],s=this.kernelSize.concat([n,this.filters]);this.kernel=this.addWeight("kernel",s,null,this.kernelInitializer,this.kernelRegularizer,!0,this.kernelConstraint),this.useBias&&(this.bias=this.addWeight("bias",[this.filters],null,this.biasInitializer,this.biasRegularizer,!0,this.biasConstraint)),this.inputSpec=[{ndim:this.rank+2,axes:{[t]:n}}],this.built=!0}call(e,t){return Y(()=>{e=et(e);let n,s=this.bias==null?null:this.bias.read(),r=Mk(this.activation.getClassName());if(r!=null&&this.rank===2)n=A7(e,this.kernel.read(),s,this.strides,this.padding,this.dataFormat,this.dilationRate,r);else{if(this.rank===1)n=QG(e,this.kernel.read(),s,this.strides[0],this.padding,this.dataFormat,this.dilationRate[0]);else if(this.rank===2)n=A7(e,this.kernel.read(),s,this.strides,this.padding,this.dataFormat,this.dilationRate);else if(this.rank===3)n=eH(e,this.kernel.read(),s,this.strides,this.padding,this.dataFormat,this.dilationRate);else throw new Je("convolutions greater than 3D are not implemented yet.");this.activation!=null&&(n=this.activation.apply(n))}return n})}computeOutputShape(e){e=bt(e);let t=[],n=this.dataFormat==="channelsLast"?e.slice(1,e.length-1):e.slice(2);for(let r=0;r 0 but got ${JSON.stringify(e.filters)}`)}},zh=class extends Mh{constructor(e){super(2,e),zh.verifyArgs(e)}getConfig(){let e=super.getConfig();return delete e.rank,e}static verifyArgs(e){if(typeof e.kernelSize!="number"&&!h5(e.kernelSize,"number",1,2))throw new j(`Conv2D expects config.kernelSize to be number or number[] with length 1 or 2, but received ${JSON.stringify(e.kernelSize)}.`)}};zh.className="Conv2D";he.registerClass(zh);var Lh=class extends Mh{constructor(e){super(3,e),Lh.verifyArgs(e)}getConfig(){let e=super.getConfig();return delete e.rank,e}static verifyArgs(e){if(typeof e.kernelSize!="number"&&!(Array.isArray(e.kernelSize)&&(e.kernelSize.length===1||e.kernelSize.length===3)))throw new j(`Conv3D expects config.kernelSize to be number or [number, number, number], but received ${JSON.stringify(e.kernelSize)}.`)}};Lh.className="Conv3D";he.registerClass(Lh);var G5=class extends zh{constructor(e){if(super(e),this.inputSpec=[new on({ndim:4})],this.padding!=="same"&&this.padding!=="valid")throw new j(`Conv2DTranspose currently supports only padding modes 'same' and 'valid', but received padding mode ${this.padding}`)}build(e){if(e=bt(e),e.length!==4)throw new j("Input should have rank 4; Received input shape: "+JSON.stringify(e));let t=this.dataFormat==="channelsFirst"?1:e.length-1;if(e[t]==null)throw new j("The channel dimension of the inputs should be defined. Found `None`.");let n=e[t],s=this.kernelSize.concat([this.filters,n]);this.kernel=this.addWeight("kernel",s,"float32",this.kernelInitializer,this.kernelRegularizer,!0,this.kernelConstraint),this.useBias&&(this.bias=this.addWeight("bias",[this.filters],"float32",this.biasInitializer,this.biasRegularizer,!0,this.biasConstraint)),this.inputSpec=[new on({ndim:4,axes:{[t]:n}})],this.built=!0}call(e,t){return Y(()=>{let n=et(e);if(n.shape.length!==4)throw new j(`Conv2DTranspose.call() expects input tensor to be rank-4, but received a tensor of rank-${n.shape.length}`);let s=n.shape,r=s[0],a,o;this.dataFormat==="channelsFirst"?(a=2,o=3):(a=1,o=2);let i=s[a],l=s[o],u=this.kernelSize[0],c=this.kernelSize[1],p=this.strides[0],d=this.strides[1],h=ea(i,p,u,this.padding),f=ea(l,d,c,this.padding),m=[r,h,f,this.filters];this.dataFormat!=="channelsLast"&&(n=at(n,[0,2,3,1]));let g=_0(n,this.kernel.read(),m,this.strides,this.padding);return this.dataFormat!=="channelsLast"&&(g=at(g,[0,3,1,2])),this.bias!=null&&(g=Hr(g,this.bias.read(),this.dataFormat)),this.activation!=null&&(g=this.activation.apply(g)),g})}computeOutputShape(e){e=bt(e);let t=e.slice(),n,s,r;this.dataFormat==="channelsFirst"?(n=1,s=2,r=3):(n=3,s=1,r=2);let a=this.kernelSize[0],o=this.kernelSize[1],i=this.strides[0],l=this.strides[1];return t[n]=this.filters,t[s]=ea(t[s],i,a,this.padding),t[r]=ea(t[r],l,o,this.padding),t}getConfig(){let e=super.getConfig();return delete e.dilationRate,e}};G5.className="Conv2DTranspose";he.registerClass(G5);var H5=class extends Lh{constructor(e){if(super(e),this.inputSpec=[new on({ndim:5})],this.padding!=="same"&&this.padding!=="valid")throw new j(`Conv3DTranspose currently supports only padding modes 'same' and 'valid', but received padding mode ${this.padding}`)}build(e){if(e=bt(e),e.length!==5)throw new j("Input should have rank 5; Received input shape: "+JSON.stringify(e));let t=this.dataFormat==="channelsFirst"?1:e.length-1;if(e[t]==null)throw new j("The channel dimension of the inputs should be defined. Found `None`.");let n=e[t],s=this.kernelSize.concat([this.filters,n]);this.kernel=this.addWeight("kernel",s,"float32",this.kernelInitializer,this.kernelRegularizer,!0,this.kernelConstraint),this.useBias&&(this.bias=this.addWeight("bias",[this.filters],"float32",this.biasInitializer,this.biasRegularizer,!0,this.biasConstraint)),this.inputSpec=[new on({ndim:5,axes:{[t]:n}})],this.built=!0}call(e,t){return Y(()=>{let n=et(e);if(n.shape.length!==5)throw new j(`Conv3DTranspose.call() expects input tensor to be rank-4, but received a tensor of rank-${n.shape.length}`);let s=n.shape,r=s[0],a,o,i;this.dataFormat==="channelsFirst"?(i=2,a=3,o=4):(i=1,a=2,o=3);let l=s[i],u=s[a],c=s[o],p=this.kernelSize[0],d=this.kernelSize[1],h=this.kernelSize[2],f=this.strides[0],m=this.strides[1],g=this.strides[2],y=ea(l,f,p,this.padding),x=ea(u,m,d,this.padding),A=ea(c,g,h,this.padding),b=[r,y,x,A,this.filters];this.dataFormat!=="channelsLast"&&(n=at(n,[0,2,3,4,1]));let w=EA(n,this.kernel.read(),b,this.strides,this.padding);return this.dataFormat!=="channelsLast"&&(w=at(w,[0,4,1,2,3])),this.bias!==null&&(w=Hr(w,this.bias.read(),this.dataFormat)),this.activation!==null&&(w=this.activation.apply(w)),w})}computeOutputShape(e){e=bt(e);let t=e.slice(),n,s,r,a;this.dataFormat==="channelsFirst"?(n=1,s=2,r=3,a=4):(n=4,s=1,r=2,a=3);let o=this.kernelSize[0],i=this.kernelSize[1],l=this.kernelSize[2],u=this.strides[0],c=this.strides[1],p=this.strides[2];return t[n]=this.filters,t[s]=ea(t[s],u,o,this.padding),t[r]=ea(t[r],c,i,this.padding),t[a]=ea(t[a],p,l,this.padding),t}getConfig(){let e=super.getConfig();return delete e.dilationRate,e}};H5.className="Conv3DTranspose";he.registerClass(H5);var R8=class extends Mh{constructor(e,t){if(super(e,t),this.DEFAULT_DEPTHWISE_INITIALIZER="glorotUniform",this.DEFAULT_POINTWISE_INITIALIZER="glorotUniform",this.depthwiseKernel=null,this.pointwiseKernel=null,t.filters==null)throw new j("The `filters` configuration field is required by SeparableConv, but is unspecified.");if(t.kernelInitializer!=null||t.kernelRegularizer!=null||t.kernelConstraint!=null)throw new j("Fields kernelInitializer, kernelRegularizer and kernelConstraint are invalid for SeparableConv2D. Use depthwiseInitializer, depthwiseRegularizer, depthwiseConstraint, pointwiseInitializer, pointwiseRegularizer and pointwiseConstraint instead.");if(t.padding!=null&&t.padding!=="same"&&t.padding!=="valid")throw new j(`SeparableConv${this.rank}D supports only padding modes: 'same' and 'valid', but received ${JSON.stringify(t.padding)}`);this.depthMultiplier=t.depthMultiplier==null?1:t.depthMultiplier,this.depthwiseInitializer=Mt(t.depthwiseInitializer||this.DEFAULT_DEPTHWISE_INITIALIZER),this.depthwiseRegularizer=zt(t.depthwiseRegularizer),this.depthwiseConstraint=vn(t.depthwiseConstraint),this.pointwiseInitializer=Mt(t.depthwiseInitializer||this.DEFAULT_POINTWISE_INITIALIZER),this.pointwiseRegularizer=zt(t.pointwiseRegularizer),this.pointwiseConstraint=vn(t.pointwiseConstraint)}build(e){if(e=bt(e),e.length{e=et(e);let n;if(this.rank===1)throw new Je("1D separable convolution is not implemented yet.");return this.rank===2&&(this.dataFormat==="channelsFirst"&&(e=at(e,[0,2,3,1])),n=j0(e,this.depthwiseKernel.read(),this.pointwiseKernel.read(),this.strides,this.padding,this.dilationRate,"NHWC")),this.useBias&&(n=Hr(n,this.bias.read(),this.dataFormat)),this.activation!=null&&(n=this.activation.apply(n)),this.dataFormat==="channelsFirst"&&(n=at(n,[0,3,1,2])),n})}getConfig(){let e=super.getConfig();return delete e.rank,delete e.kernelInitializer,delete e.kernelRegularizer,delete e.kernelConstraint,e.depthwiseInitializer=Ht(this.depthwiseInitializer),e.pointwiseInitializer=Ht(this.pointwiseInitializer),e.depthwiseRegularizer=Ct(this.depthwiseRegularizer),e.pointwiseRegularizer=Ct(this.pointwiseRegularizer),e.depthwiseConstraint=bn(this.depthwiseConstraint),e.pointwiseConstraint=bn(this.pointwiseConstraint),e}};R8.className="SeparableConv";var j5=class extends R8{constructor(e){super(2,e)}};j5.className="SeparableConv2D";he.registerClass(j5);var S2=class extends Mh{constructor(e){super(1,e),S2.verifyArgs(e),this.inputSpec=[{ndim:3}]}getConfig(){let e=super.getConfig();return delete e.rank,delete e.dataFormat,e}static verifyArgs(e){if(typeof e.kernelSize!="number"&&!h5(e.kernelSize,"number",1,1))throw new j(`Conv1D expects config.kernelSize to be number or number[] with length 1, but received ${JSON.stringify(e.kernelSize)}.`)}};S2.className="Conv1D";he.registerClass(S2);var q5=class extends pt{constructor(e){super(e),typeof e.cropping=="number"?this.cropping=[[e.cropping,e.cropping],[e.cropping,e.cropping]]:typeof e.cropping[0]=="number"?this.cropping=[[e.cropping[0],e.cropping[0]],[e.cropping[1],e.cropping[1]]]:this.cropping=e.cropping,this.dataFormat=e.dataFormat===void 0?"channelsLast":e.dataFormat,this.inputSpec=[{ndim:4}]}computeOutputShape(e){return this.dataFormat==="channelsFirst"?[e[0],e[1],e[2]-this.cropping[0][0]-this.cropping[0][1],e[3]-this.cropping[1][0]-this.cropping[1][1]]:[e[0],e[1]-this.cropping[0][0]-this.cropping[0][1],e[2]-this.cropping[1][0]-this.cropping[1][1],e[3]]}call(e,t){return Y(()=>{if(e=et(e),this.dataFormat==="channelsLast"){let n=em(e,this.cropping[0][0],e.shape[1]-this.cropping[0][0]-this.cropping[0][1],2);return em(n,this.cropping[1][0],e.shape[2]-this.cropping[1][1]-this.cropping[1][0],3)}else{let n=em(e,this.cropping[0][0],e.shape[2]-this.cropping[0][0]-this.cropping[0][1],3);return em(n,this.cropping[1][0],e.shape[3]-this.cropping[1][1]-this.cropping[1][0],4)}})}getConfig(){let e={cropping:this.cropping,dataFormat:this.dataFormat},t=super.getConfig();return Object.assign(e,t),e}};q5.className="Cropping2D";he.registerClass(q5);var X5=class extends pt{constructor(e){super(e),this.DEFAULT_SIZE=[2,2],this.inputSpec=[{ndim:4}],this.size=e.size==null?this.DEFAULT_SIZE:e.size,this.dataFormat=e.dataFormat==null?"channelsLast":e.dataFormat,en(this.dataFormat),this.interpolation=e.interpolation==null?"nearest":e.interpolation,cU(this.interpolation)}computeOutputShape(e){if(this.dataFormat==="channelsFirst"){let t=e[2]==null?null:this.size[0]*e[2],n=e[3]==null?null:this.size[1]*e[3];return[e[0],e[1],t,n]}else{let t=e[1]==null?null:this.size[0]*e[1],n=e[2]==null?null:this.size[1]*e[2];return[e[0],t,n,e[3]]}}call(e,t){return Y(()=>{let n=et(e),s=n.shape;if(this.dataFormat==="channelsFirst"){n=at(n,[0,2,3,1]);let r=this.size[0]*s[2],a=this.size[1]*s[3],o=this.interpolation==="nearest"?Ce.resizeNearestNeighbor(n,[r,a]):Ce.resizeBilinear(n,[r,a]);return at(o,[0,3,1,2])}else{let r=this.size[0]*s[1],a=this.size[1]*s[2];return this.interpolation==="nearest"?Ce.resizeNearestNeighbor(n,[r,a]):Ce.resizeBilinear(n,[r,a])}})}getConfig(){let e={size:this.size,dataFormat:this.dataFormat,interpolation:this.interpolation},t=super.getConfig();return Object.assign(e,t),e}};X5.className="UpSampling2D";he.registerClass(X5);function tH(e,t,n=[1,1],s="valid",r,a){return Y(()=>{r==null&&(r=Vr()),en(r);let o=V5(e,r);if(e.rank!==4)throw new j(`Input for depthwiseConv2d is required to be 4-D, but is instead ${e.rank}-D`);if(t.rank!==4)throw new j(`depthwiseKernel is required to be 4-D, but is instead ${t.rank}-D`);return o=ed(o,t,n,s==="same"?"same":"valid","NHWC",a),r==="channelsFirst"&&(o=at(o,[0,3,1,2])),o})}var K5=class extends U5{constructor(e){super(2,e),this.depthwiseKernel=null,this.depthMultiplier=e.depthMultiplier==null?1:e.depthMultiplier,this.depthwiseInitializer=Mt(e.depthwiseInitializer||this.DEFAULT_KERNEL_INITIALIZER),this.depthwiseConstraint=vn(e.depthwiseConstraint),this.depthwiseRegularizer=zt(e.depthwiseRegularizer)}build(e){if(e=bt(e),e.length<4)throw new j(`Inputs to DepthwiseConv2D should have rank 4. Received input shape: ${JSON.stringify(e)}.`);let t=this.dataFormat==="channelsFirst"?1:3;if(e[t]==null||e[t]<0)throw new j(`The channel dimension of the inputs to DepthwiseConv2D should be defined, but is not (${e[t]}).`);let n=e[t],s=[this.kernelSize[0],this.kernelSize[1],n,this.depthMultiplier];this.depthwiseKernel=this.addWeight("depthwise_kernel",s,null,this.depthwiseInitializer,this.depthwiseRegularizer,!0,this.depthwiseConstraint),this.useBias?this.bias=this.addWeight("bias",[n*this.depthMultiplier],null,this.biasInitializer,this.biasRegularizer,!0,this.biasConstraint):this.bias=null,this.built=!0}call(e,t){return Y(()=>{e=et(e);let n=tH(e,this.depthwiseKernel.read(),this.strides,this.padding,this.dataFormat,null);return this.useBias&&(n=Hr(n,this.bias.read(),this.dataFormat)),this.activation!=null&&(n=this.activation.apply(n)),n})}computeOutputShape(e){e=bt(e);let t=this.dataFormat==="channelsFirst"?e[2]:e[1],n=this.dataFormat==="channelsFirst"?e[3]:e[2],s=this.dataFormat==="channelsFirst"?e[1]*this.depthMultiplier:e[3]*this.depthMultiplier,r=Br(t,this.kernelSize[0],this.padding,this.strides[0]),a=Br(n,this.kernelSize[1],this.padding,this.strides[1]);return this.dataFormat==="channelsFirst"?[e[0],s,r,a]:[e[0],r,a,s]}getConfig(){let e=super.getConfig();return e.depthMultiplier=this.depthMultiplier,e.depthwiseInitializer=Ht(this.depthwiseInitializer),e.depthwiseRegularizer=Ct(this.depthwiseRegularizer),e.depthwiseConstraint=bn(this.depthwiseRegularizer),e}};K5.className="DepthwiseConv2D";he.registerClass(K5);function _8(e,t,n,s){if(Array.isArray(e)){if(t!=null||n!=null)throw new j("When inputs is an array, neither initialState or constants should be provided");s!=null&&(n=e.slice(e.length-s,e.length),e=e.slice(0,e.length-s)),e.length>1&&(t=e.slice(1,e.length)),e=e[0]}function r(a){return a==null||Array.isArray(a)?a:[a]}return t=r(t),n=r(n),{inputs:e,initialState:t,constants:n}}function D8(e,t,n,s=!1,r,a,o=!1,i=!1){return Y(()=>{let l=t.shape.length;if(l<3)throw new j(`Input should be at least 3D, but is ${l}D.`);let u=[1,0].concat(Wr(2,l));if(t=at(t,u),a!=null)throw new Je("The rnn() functoin of the deeplearn.js backend does not support constants yet.");o&&console.warn("Backend rnn(): the unroll = true option is not applicable to the imperative deeplearn.js backend."),r!=null&&(r=ge(ge(r,"bool"),"float32"),r.rank===l-1&&(r=Ft(r,-1)),r=at(r,u)),s&&(t=nr(t,0),r!=null&&(r=nr(r,0)));let c=[],p,d=n,h=t.shape[0],f=wn(t),m;r!=null&&(m=wn(r));for(let y=0;ye(x,d));if(r==null)p=A[0],d=A[1];else{let b=Y(()=>{let w=m[y],k=Ae(Ws(w),w),C=de(z(A[0],w),z(d[0],k)),E=d.map((_,$)=>de(z(A[1][$],w),z(_,k)));return{output:C,newStates:E}});p=b.output,d=b.newStates}i&&c.push(p)}let g;return i&&(g=un(c,1)),[p,g,d]})}var pa=class extends pt{constructor(e){super(e);let t;if(e.cell==null)throw new j("cell property is missing for the constructor of RNN.");if(Array.isArray(e.cell)?t=new T2({cells:e.cell}):t=e.cell,t.stateSize==null)throw new j("The RNN cell should have an attribute `stateSize` (tuple of integers, one integer per RNN state).");this.cell=t,this.returnSequences=e.returnSequences==null?!1:e.returnSequences,this.returnState=e.returnState==null?!1:e.returnState,this.goBackwards=e.goBackwards==null?!1:e.goBackwards,this._stateful=e.stateful==null?!1:e.stateful,this.unroll=e.unroll==null?!1:e.unroll,this.supportsMasking=!0,this.inputSpec=[new on({ndim:3})],this.stateSpec=null,this.states_=null,this.numConstants=null,this.keptStates=[]}getStates(){if(this.states_==null){let e=Array.isArray(this.cell.stateSize)?this.cell.stateSize.length:1;return Wr(0,e).map(t=>null)}else return this.states_}setStates(e){this.states_=e}computeOutputShape(e){J3(e)&&(e=e[0]),e=e;let t=this.cell.stateSize;Array.isArray(t)||(t=[t]);let n=t[0],s;if(this.returnSequences?s=[e[0],e[1],n]:s=[e[0],n],this.returnState){let r=[];for(let a of t)r.push([e[0],a]);return[s].concat(r)}else return s}computeMask(e,t){return Y(()=>{Array.isArray(t)&&(t=t[0]);let n=this.returnSequences?t:null;if(this.returnState){let s=this.states.map(r=>null);return[n].concat(s)}else return n})}get states(){if(this.states_==null){let e=Array.isArray(this.cell.stateSize)?this.cell.stateSize.length:1,t=[];for(let n=0;no.shape[o.shape.length-1]),a))throw new j(`An initialState was passed that is not compatible with cell.stateSize. Received stateSpec=${this.stateSpec}; However cell.stateSize is ${this.cell.stateSize}`)}else this.stateSpec=a.map(o=>new on({shape:[null,o]}));this.stateful&&this.resetStates()}resetStates(e,t=!1){Y(()=>{if(!this.stateful)throw new ba("Cannot call resetStates() on an RNN Layer that is not stateful.");let n=this.inputSpec[0].shape[0];if(n==null)throw new j("If an RNN is stateful, it needs to know its batch size. Specify the batch size of your input tensors: \n- If using a Sequential model, specify the batch size by passing a `batchInputShape` option to your first layer.\n- If using the functional API, specify the batch size by passing a `batchShape` option to your Input layer.");if(this.states_==null)Array.isArray(this.cell.stateSize)?this.states_=this.cell.stateSize.map(s=>Gt([n,s])):this.states_=[Gt([n,this.cell.stateSize])];else if(e==null)Q(this.states_),this.keptStates!=null&&(Q(this.keptStates),this.keptStates=[]),Array.isArray(this.cell.stateSize)?this.states_=this.cell.stateSize.map(s=>Gt([n,s])):this.states_[0]=Gt([n,this.cell.stateSize]);else{if(Array.isArray(e)||(e=[e]),e.length!==this.states_.length)throw new j(`Layer ${this.name} expects ${this.states_.length} state(s), but it received ${e.length} state value(s). Input received: ${e}`);t===!0?this.keptStates.push(this.states_.slice()):Q(this.states_);for(let s=0;sTn(s.clone()))})}apply(e,t){let n=t==null?null:t.initialState,s=t==null?null:t.constants;t==null&&(t={});let r=_8(e,n,s,this.numConstants);e=r.inputs,n=r.initialState,s=r.constants;let a=[],o=[];if(n!=null){t.initialState=n,a=a.concat(n),this.stateSpec=[];for(let l of n)this.stateSpec.push(new on({shape:l.shape}));o=o.concat(this.stateSpec)}if(s!=null&&(t.constants=s,a=a.concat(s),this.numConstants=s.length),a[0]instanceof Mr){let l=[e].concat(a),u=this.inputSpec.concat(o),c=this.inputSpec;this.inputSpec=u;let p=super.apply(l,t);return this.inputSpec=c,p}else return super.apply(e,t)}call(e,t){return Y(()=>{let n=t==null?null:t.mask,s=t==null?null:t.training,r=t==null?null:t.initialState;e=et(e),r==null&&(this.stateful?r=this.states_:r=this.getInitialState(e));let a=Array.isArray(this.cell.stateSize)?this.cell.stateSize.length:1;if(r.length!==a)throw new j(`RNN Layer has ${a} state(s) but was passed ${r.length} initial state(s).`);this.unroll&&console.warn("Ignoring unroll = true for RNN layer, due to imperative backend.");let o={training:s},l=D8((h,f)=>{let m=this.cell.call([h].concat(f),o);return[m[0],m.slice(1)]},e,r,this.goBackwards,n,null,this.unroll,this.returnSequences),u=l[0],c=l[1],p=l[2];this.stateful&&this.resetStates(p,s);let d=this.returnSequences?c:u;return this.returnState?[d].concat(p):d})}getInitialState(e){return Y(()=>{let t=Gt(e.shape);return t=Se(t,[1,2]),t=Dh(t),Array.isArray(this.cell.stateSize)?this.cell.stateSize.map(n=>n>1?Z3(t,[1,n]):t):this.cell.stateSize>1?[Z3(t,[1,this.cell.stateSize])]:[t]})}get trainableWeights(){return this.trainable?this.cell.trainableWeights:[]}get nonTrainableWeights(){return this.trainable?this.cell.nonTrainableWeights:this.cell.weights}setFastWeightInitDuringBuild(e){super.setFastWeightInitDuringBuild(e),this.cell!=null&&this.cell.setFastWeightInitDuringBuild(e)}getConfig(){let e=super.getConfig(),t={returnSequences:this.returnSequences,returnState:this.returnState,goBackwards:this.goBackwards,stateful:this.stateful,unroll:this.unroll};this.numConstants!=null&&(t.numConstants=this.numConstants);let n=this.cell.getConfig();return this.getClassName()===pa.className&&(t.cell={className:this.cell.getClassName(),config:n}),Object.assign({},n,e,t)}static fromConfig(e,t,n={}){let s=t.cell,r=Lr(s,n);return new e(Object.assign(t,{cell:r}))}};pa.className="RNN";he.registerClass(pa);var Bh=class extends pt{},I2=class extends Bh{constructor(e){super(e),this.DEFAULT_ACTIVATION="tanh",this.DEFAULT_KERNEL_INITIALIZER="glorotNormal",this.DEFAULT_RECURRENT_INITIALIZER="orthogonal",this.DEFAULT_BIAS_INITIALIZER="zeros",this.units=e.units,Nn(this.units,"units"),this.activation=ho(e.activation==null?this.DEFAULT_ACTIVATION:e.activation),this.useBias=e.useBias==null?!0:e.useBias,this.kernelInitializer=Mt(e.kernelInitializer||this.DEFAULT_KERNEL_INITIALIZER),this.recurrentInitializer=Mt(e.recurrentInitializer||this.DEFAULT_RECURRENT_INITIALIZER),this.biasInitializer=Mt(e.biasInitializer||this.DEFAULT_BIAS_INITIALIZER),this.kernelRegularizer=zt(e.kernelRegularizer),this.recurrentRegularizer=zt(e.recurrentRegularizer),this.biasRegularizer=zt(e.biasRegularizer),this.kernelConstraint=vn(e.kernelConstraint),this.recurrentConstraint=vn(e.recurrentConstraint),this.biasConstraint=vn(e.biasConstraint),this.dropout=yc([1,co([0,e.dropout==null?0:e.dropout])]),this.recurrentDropout=yc([1,co([0,e.recurrentDropout==null?0:e.recurrentDropout])]),this.dropoutFunc=e.dropoutFunc,this.stateSize=this.units,this.dropoutMask=null,this.recurrentDropoutMask=null}build(e){e=bt(e),this.kernel=this.addWeight("kernel",[e[e.length-1],this.units],null,this.kernelInitializer,this.kernelRegularizer,!0,this.kernelConstraint),this.recurrentKernel=this.addWeight("recurrent_kernel",[this.units,this.units],null,this.recurrentInitializer,this.recurrentRegularizer,!0,this.recurrentConstraint),this.useBias?this.bias=this.addWeight("bias",[this.units],null,this.biasInitializer,this.biasRegularizer,!0,this.biasConstraint):this.bias=null,this.built=!0}call(e,t){return Y(()=>{if(e=e,e.length!==2)throw new j(`SimpleRNNCell expects 2 input Tensors, got ${e.length}.`);let n=e[1];e=e[0];let s=t.training==null?!1:t.training;0Ws(e),rate:this.dropout,training:s,dropoutFunc:this.dropoutFunc})),0Ws(n),rate:this.recurrentDropout,training:s,dropoutFunc:this.dropoutFunc}));let r,a=this.dropoutMask,o=this.recurrentDropoutMask;a!=null?r=sa(z(e,a),this.kernel.read()):r=sa(e,this.kernel.read()),this.bias!=null&&(r=Hr(r,this.bias.read())),o!=null&&(n=z(n,o));let i=de(r,sa(n,this.recurrentKernel.read()));return this.activation!=null&&(i=this.activation.apply(i)),[i,i]})}getConfig(){let e=super.getConfig(),t={units:this.units,activation:po(this.activation),useBias:this.useBias,kernelInitializer:Ht(this.kernelInitializer),recurrentInitializer:Ht(this.recurrentInitializer),biasInitializer:Ht(this.biasInitializer),kernelRegularizer:Ct(this.kernelRegularizer),recurrentRegularizer:Ct(this.recurrentRegularizer),biasRegularizer:Ct(this.biasRegularizer),activityRegularizer:Ct(this.activityRegularizer),kernelConstraint:bn(this.kernelConstraint),recurrentConstraint:bn(this.recurrentConstraint),biasConstraint:bn(this.biasConstraint),dropout:this.dropout,recurrentDropout:this.recurrentDropout};return Object.assign({},e,t)}};I2.className="SimpleRNNCell";he.registerClass(I2);var Z5=class extends pa{constructor(e){e.cell=new I2(e),super(e)}call(e,t){return Y(()=>{this.cell.dropoutMask!=null&&(Q(this.cell.dropoutMask),this.cell.dropoutMask=null),this.cell.recurrentDropoutMask!=null&&(Q(this.cell.recurrentDropoutMask),this.cell.recurrentDropoutMask=null);let n=t==null?null:t.mask,s=t==null?null:t.training,r=t==null?null:t.initialState;return super.call(e,{mask:n,training:s,initialState:r})})}static fromConfig(e,t){return new e(t)}};Z5.className="SimpleRNN";he.registerClass(Z5);var C2=class extends Bh{constructor(e){if(super(e),this.DEFAULT_ACTIVATION="tanh",this.DEFAULT_RECURRENT_ACTIVATION="hardSigmoid",this.DEFAULT_KERNEL_INITIALIZER="glorotNormal",this.DEFAULT_RECURRENT_INITIALIZER="orthogonal",this.DEFAULT_BIAS_INITIALIZER="zeros",e.resetAfter)throw new j("GRUCell does not support reset_after parameter set to true.");this.units=e.units,Nn(this.units,"units"),this.activation=ho(e.activation===void 0?this.DEFAULT_ACTIVATION:e.activation),this.recurrentActivation=ho(e.recurrentActivation===void 0?this.DEFAULT_RECURRENT_ACTIVATION:e.recurrentActivation),this.useBias=e.useBias==null?!0:e.useBias,this.kernelInitializer=Mt(e.kernelInitializer||this.DEFAULT_KERNEL_INITIALIZER),this.recurrentInitializer=Mt(e.recurrentInitializer||this.DEFAULT_RECURRENT_INITIALIZER),this.biasInitializer=Mt(e.biasInitializer||this.DEFAULT_BIAS_INITIALIZER),this.kernelRegularizer=zt(e.kernelRegularizer),this.recurrentRegularizer=zt(e.recurrentRegularizer),this.biasRegularizer=zt(e.biasRegularizer),this.kernelConstraint=vn(e.kernelConstraint),this.recurrentConstraint=vn(e.recurrentConstraint),this.biasConstraint=vn(e.biasConstraint),this.dropout=yc([1,co([0,e.dropout==null?0:e.dropout])]),this.recurrentDropout=yc([1,co([0,e.recurrentDropout==null?0:e.recurrentDropout])]),this.dropoutFunc=e.dropoutFunc,this.implementation=e.implementation,this.stateSize=this.units,this.dropoutMask=null,this.recurrentDropoutMask=null}build(e){e=bt(e);let t=e[e.length-1];this.kernel=this.addWeight("kernel",[t,this.units*3],null,this.kernelInitializer,this.kernelRegularizer,!0,this.kernelConstraint),this.recurrentKernel=this.addWeight("recurrent_kernel",[this.units,this.units*3],null,this.recurrentInitializer,this.recurrentRegularizer,!0,this.recurrentConstraint),this.useBias?this.bias=this.addWeight("bias",[this.units*3],null,this.biasInitializer,this.biasRegularizer,!0,this.biasConstraint):this.bias=null,this.built=!0}call(e,t){return Y(()=>{if(e=e,e.length!==2)throw new j(`GRUCell expects 2 input Tensors (inputs, h, c), got ${e.length}.`);let n=t.training==null?!1:t.training,s=e[1];e=e[0],0Ws(e),rate:this.dropout,training:n,count:3,dropoutFunc:this.dropoutFunc})),0Ws(s),rate:this.recurrentDropout,training:n,count:3,dropoutFunc:this.dropoutFunc}));let r=this.dropoutMask,a=this.recurrentDropoutMask,o,i,l;0{this.cell.dropoutMask!=null&&(Q(this.cell.dropoutMask),this.cell.dropoutMask=null),this.cell.recurrentDropoutMask!=null&&(Q(this.cell.recurrentDropoutMask),this.cell.recurrentDropoutMask=null);let n=t==null?null:t.mask,s=t==null?null:t.training,r=t==null?null:t.initialState;return super.call(e,{mask:n,training:s,initialState:r})})}static fromConfig(e,t){return t.implmentation===0&&(t.implementation=1),new e(t)}};Y5.className="GRU";he.registerClass(Y5);var Wh=class extends Bh{constructor(e){super(e),this.DEFAULT_ACTIVATION="tanh",this.DEFAULT_RECURRENT_ACTIVATION="hardSigmoid",this.DEFAULT_KERNEL_INITIALIZER="glorotNormal",this.DEFAULT_RECURRENT_INITIALIZER="orthogonal",this.DEFAULT_BIAS_INITIALIZER="zeros",this.units=e.units,Nn(this.units,"units"),this.activation=ho(e.activation===void 0?this.DEFAULT_ACTIVATION:e.activation),this.recurrentActivation=ho(e.recurrentActivation===void 0?this.DEFAULT_RECURRENT_ACTIVATION:e.recurrentActivation),this.useBias=e.useBias==null?!0:e.useBias,this.kernelInitializer=Mt(e.kernelInitializer||this.DEFAULT_KERNEL_INITIALIZER),this.recurrentInitializer=Mt(e.recurrentInitializer||this.DEFAULT_RECURRENT_INITIALIZER),this.biasInitializer=Mt(e.biasInitializer||this.DEFAULT_BIAS_INITIALIZER),this.unitForgetBias=e.unitForgetBias,this.kernelRegularizer=zt(e.kernelRegularizer),this.recurrentRegularizer=zt(e.recurrentRegularizer),this.biasRegularizer=zt(e.biasRegularizer),this.kernelConstraint=vn(e.kernelConstraint),this.recurrentConstraint=vn(e.recurrentConstraint),this.biasConstraint=vn(e.biasConstraint),this.dropout=yc([1,co([0,e.dropout==null?0:e.dropout])]),this.recurrentDropout=yc([1,co([0,e.recurrentDropout==null?0:e.recurrentDropout])]),this.dropoutFunc=e.dropoutFunc,this.implementation=e.implementation,this.stateSize=[this.units,this.units],this.dropoutMask=null,this.recurrentDropoutMask=null}build(e){var t;e=bt(e);let n=e[e.length-1];this.kernel=this.addWeight("kernel",[n,this.units*4],null,this.kernelInitializer,this.kernelRegularizer,!0,this.kernelConstraint),this.recurrentKernel=this.addWeight("recurrent_kernel",[this.units,this.units*4],null,this.recurrentInitializer,this.recurrentRegularizer,!0,this.recurrentConstraint);let s;if(this.useBias){if(this.unitForgetBias){let r=this.biasInitializer,a=this.units;s=new(t=class extends xr{apply(i,l){let u=r.apply([a]),c=new f2().apply([a]),p=r.apply([a*2]);return t7(t7(u,c),p)}},t.className="CustomInit",t)}else s=this.biasInitializer;this.bias=this.addWeight("bias",[this.units*4],null,s,this.biasRegularizer,!0,this.biasConstraint)}else this.bias=null;this.built=!0}call(e,t){return Y(()=>{let n=t.training==null?!1:t.training;if(e=e,e.length!==3)throw new j(`LSTMCell expects 3 input Tensors (inputs, h, c), got ${e.length}.`);let s=e[1],r=e[2];e=e[0],0Ws(e),rate:this.dropout,training:n,count:4,dropoutFunc:this.dropoutFunc})),0Ws(s),rate:this.recurrentDropout,training:n,count:4,dropoutFunc:this.dropoutFunc}));let a=this.dropoutMask,o=this.recurrentDropoutMask,i,l,u,c;0{this.cell.dropoutMask!=null&&(Q(this.cell.dropoutMask),this.cell.dropoutMask=null),this.cell.recurrentDropoutMask!=null&&(Q(this.cell.recurrentDropoutMask),this.cell.recurrentDropoutMask=null);let n=t==null?null:t.mask,s=t==null?null:t.training,r=t==null?null:t.initialState;return super.call(e,{mask:n,training:s,initialState:r})})}static fromConfig(e,t){return t.implmentation===0&&(t.implementation=1),new e(t)}};J5.className="LSTM";he.registerClass(J5);var T2=class extends Bh{constructor(e){super(e),this.cells=e.cells}get stateSize(){let e=[];for(let t of this.cells.slice().reverse())Array.isArray(t.stateSize)?e.push(...t.stateSize):e.push(t.stateSize);return e}call(e,t){return Y(()=>{e=e;let n=e.slice(1),s=[];for(let o of this.cells.slice().reverse())Array.isArray(o.stateSize)?s.push(n.splice(0,o.stateSize.length)):s.push(n.splice(0,1));s.reverse();let r=[],a;for(let o=0;o{sl(`RNNCell_${s}`,()=>{n.build(e),Array.isArray(n.stateSize)?t=n.stateSize[0]:t=n.stateSize,e=[e[0],t]})}),this.built=!0}getConfig(){let e=super.getConfig(),t=r=>({className:r.getClassName(),config:r.getConfig()}),s={cells:this.cells.map(t)};return Object.assign({},e,s)}static fromConfig(e,t,n={}){let s=[];for(let r of t.cells)s.push(Lr(r,n));return new e({cells:s})}get trainableWeights(){if(!this.trainable)return[];let e=[];for(let t of this.cells)e.push(...t.trainableWeights);return e}get nonTrainableWeights(){let e=[];for(let t of this.cells)e.push(...t.nonTrainableWeights);if(!this.trainable){let t=[];for(let n of this.cells)t.push(...n.trainableWeights);return t.concat(e)}return e}getWeights(){let e=[];for(let t of this.cells)e.push(...t.weights);return Q3(e)}setWeights(e){let t=[];for(let n of this.cells){let s=n.weights.length,r=e.splice(s);for(let a=0;aa!=null?a(t(),n):Gk(t(),n),i=()=>Ph(o,t,s);return!r||r<=1?Tn(i().clone()):Array(r).fill(void 0).map(i).map(u=>Tn(u.clone()))}var nH=function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,s=Object.getOwnPropertySymbols(e);r{if(this.cell.dropoutMask!=null&&(Q(this.cell.dropoutMask),this.cell.dropoutMask=null),this.cell.recurrentDropoutMask!=null&&(Q(this.cell.recurrentDropoutMask),this.cell.recurrentDropoutMask=null),t&&t.constants)throw new j("ConvRNN2D cell does not support constants");let n=t==null?null:t.mask,s=t==null?null:t.training,r=t==null?null:t.initialState;return super.call(e,{mask:n,training:s,initialState:r})})}computeOutputShape(e){let t=this.computeSingleOutputShape(e);return this.returnSequences||(t=[t[0],...t.slice(2)]),this.returnState&&(t=[t,...Array(2).fill([e[0],...t.slice(-3)])]),t}getInitialState(e){return Y(()=>{let{stateSize:t}=this.cell,n=e.shape,s=this.computeSingleOutputShape(n),r=[s[0],...s.slice(2)],a=Gt(r);return Array.isArray(t)?Array(t.length).fill(a):[a]})}resetStates(e,t=!1){Y(()=>{if(!this.stateful)throw new ba("Cannot call resetStates() on an RNN Layer that is not stateful.");let n=this.inputSpec[0].shape,s=this.computeSingleOutputShape(n),r=[s[0],...s.slice(2)];if(n[0]==null)throw new j("If an RNN is stateful, it needs to know its batch size. Specify the batch size of your input tensors: \n- If using a Sequential model, specify the batch size by passing a `batchInputShape` option to your first layer.\n- If using the functional API, specify the batch size by passing a `batchShape` option to your Input layer.");if(this.getStates()==null)Array.isArray(this.cell.stateSize)?this.states_=this.cell.stateSize.map(()=>Gt(r)):this.states_=[Gt(r)];else if(e==null)Q(this.states_),this.keptStates!=null&&(Q(this.keptStates),this.keptStates=[]),Array.isArray(this.cell.stateSize)?this.states_=this.cell.stateSize.map(()=>Gt(r)):this.states_[0]=Gt(r);else{if(Array.isArray(e)||(e=[e]),e.length!==this.states_.length)throw new j(`Layer ${this.name} expects ${this.states_.length} state(s), but it received ${e.length} state value(s). Input received: ${e}`);t?this.keptStates.push(this.states_.slice()):Q(this.states_);for(let o=0;oTn(o.clone()))})}computeSingleOutputShape(e){let{dataFormat:t,filters:n,kernelSize:s,padding:r,strides:a,dilationRate:o}=this.cell,i=t==="channelsFirst",l=e[i?3:2],u=e[i?4:3],c=Br(l,s[0],r,a[0],o[0]),p=Br(u,s[1],r,a[1],o[1]);return[...e.slice(0,2),...i?[n,c,p]:[c,p,n]]}};$8.className="ConvRNN2D";var N2=class extends Wh{constructor(e){let{filters:t,kernelSize:n,strides:s,padding:r,dataFormat:a,dilationRate:o}=e;super(Object.assign({},e,{units:t})),this.filters=t,Nn(this.filters,"filters"),this.kernelSize=ic(n,2,"kernelSize"),this.kernelSize.forEach(i=>Nn(i,"kernelSize")),this.strides=ic(s||1,2,"strides"),this.strides.forEach(i=>Nn(i,"strides")),this.padding=r||"valid",or(this.padding),this.dataFormat=a||"channelsLast",en(this.dataFormat),this.dilationRate=ic(o||1,2,"dilationRate"),this.dilationRate.forEach(i=>Nn(i,"dilationRate"))}build(e){var t;e=bt(e);let n=this.dataFormat==="channelsFirst"?1:e.length-1;if(e[n]==null)throw new j(`The channel dimension of the input should be defined. Found ${e[n]}`);let s=e[n],r=4,a=this.kernelSize.concat([s,this.filters*r]);this.kernel=this.addWeight("kernel",a,null,this.kernelInitializer,this.kernelRegularizer,!0,this.kernelConstraint);let o=this.kernelSize.concat([this.filters,this.filters*r]);if(this.recurrentKernel=this.addWeight("recurrent_kernel",o,null,this.recurrentInitializer,this.recurrentRegularizer,!0,this.recurrentConstraint),this.useBias){let i;if(this.unitForgetBias){let l=this.biasInitializer,u=this.filters;i=new(t=class extends xr{apply(p,d){let h=l.apply([u]),f=Os([u]),m=l.apply([u*2]);return f5([h,f,m])}},t.className="CustomInit",t)}else i=this.biasInitializer;this.bias=this.addWeight("bias",[this.filters*r],null,i,this.biasRegularizer,!0,this.biasConstraint)}this.built=!0}call(e,t){return Y(()=>{if(e.length!==3)throw new j(`ConvLSTM2DCell expects 3 input Tensors (inputs, h, c), got ${e.length}.`);let n=t.training||!1,s=e[0],r=e[1],a=e[2],o=4;0Ws(s),rate:this.dropout,training:n,count:o,dropoutFunc:this.dropoutFunc}));let i=this.dropoutMask,l=(Z,J,te)=>!J||!J[te]?Z:z(J[te],Z),u=l(s,i,0),c=l(s,i,1),p=l(s,i,2),d=l(s,i,3);0Ws(r),rate:this.recurrentDropout,training:n,count:o,dropoutFunc:this.dropoutFunc}));let h=this.recurrentDropoutMask,f=l(r,h,0),m=l(r,h,1),g=l(r,h,2),y=l(r,h,3),x=3,[A,b,w,k]=qt(this.kernel.read(),o,x),[C,E,_,$]=this.useBias?qt(this.bias.read(),o):[null,null,null,null];u=this.inputConv(u,A,C,this.padding),c=this.inputConv(c,b,E,this.padding),p=this.inputConv(p,w,_,this.padding),d=this.inputConv(d,k,$,this.padding);let[R,P,S,M]=qt(this.recurrentKernel.read(),o,x);f=this.recurrentConv(f,R),m=this.recurrentConv(m,P),g=this.recurrentConv(g,S),y=this.recurrentConv(y,M);let L=this.recurrentActivation.apply(de(u,f)),U=this.recurrentActivation.apply(de(c,m)),K=de(z(U,a),z(L,this.activation.apply(de(p,g)))),q=z(this.recurrentActivation.apply(de(d,y)),this.activation.apply(K));return[q,q,K]})}getConfig(){let e=super.getConfig(),{units:t}=e,n=nH(e,["units"]),s={filters:this.filters,kernelSize:this.kernelSize,padding:this.padding,dataFormat:this.dataFormat,dilationRate:this.dilationRate,strides:this.strides};return Object.assign({},n,s)}inputConv(e,t,n,s){let r=Na(e,t,this.strides,s||"valid",this.dataFormat==="channelsFirst"?"NCHW":"NHWC",this.dilationRate);return n?Hr(r,n,this.dataFormat):r}recurrentConv(e,t){return Na(e,t,1,"same",this.dataFormat==="channelsFirst"?"NCHW":"NHWC")}};N2.className="ConvLSTM2DCell";he.registerClass(N2);var Q5=class extends $8{constructor(e){let t=new N2(e);super(Object.assign({},e,{cell:t}))}static fromConfig(e,t){return new e(t)}};Q5.className="ConvLSTM2D";he.registerClass(Q5);var E2=class extends pt{constructor(e){super(e),this.rate=Math.max(Math.min(e.rate,1),0),this.noiseShape=e.noiseShape,this.seed=e.seed,this.supportsMasking=!0}getNoiseShape(e){if(this.noiseShape==null)return this.noiseShape;let t=e.shape,n=[];for(let s=0;s{this.invokeCallHook(e,t);let n=et(e);if(0Gk(n,this.rate,r,this.seed),()=>n,s)}return e})}getConfig(){let e={rate:this.rate,noiseShape:this.noiseShape,seed:this.seed},t=super.getConfig();return Object.assign(e,t),e}dispose(){return super.dispose()}};E2.className="Dropout";he.registerClass(E2);var ex=class extends E2{constructor(e){super(e),this.inputSpec=[{ndim:3}]}getNoiseShape(e){let t=e.shape;return[t[0],1,t[2]]}};ex.className="SpatialDropout1D";he.registerClass(ex);var tx=class extends pt{constructor(e){if(super(e),this.activation=null,this.useBias=!0,this.kernel=null,this.bias=null,this.DEFAULT_KERNEL_INITIALIZER="glorotNormal",this.DEFAULT_BIAS_INITIALIZER="zeros",e.batchInputShape==null&&e.inputShape==null&&e.inputDim!=null){let t=null;e.batchSize!=null&&(t=e.batchSize),this.batchInputShape=[t,e.inputDim]}this.units=e.units,Nn(this.units,"units"),this.activation=ho(e.activation),e.useBias!=null&&(this.useBias=e.useBias),this.kernelInitializer=Mt(e.kernelInitializer||this.DEFAULT_KERNEL_INITIALIZER),this.biasInitializer=Mt(e.biasInitializer||this.DEFAULT_BIAS_INITIALIZER),this.kernelConstraint=vn(e.kernelConstraint),this.biasConstraint=vn(e.biasConstraint),this.kernelRegularizer=zt(e.kernelRegularizer),this.biasRegularizer=zt(e.biasRegularizer),this.activityRegularizer=zt(e.activityRegularizer),this.supportsMasking=!0,this.inputSpec=[{minNDim:2}]}build(e){e=bt(e);let t=e[e.length-1];this.kernel==null&&(this.kernel=this.addWeight("kernel",[t,this.units],null,this.kernelInitializer,this.kernelRegularizer,!0,this.kernelConstraint),this.useBias&&(this.bias=this.addWeight("bias",[this.units],null,this.biasInitializer,this.biasRegularizer,!0,this.biasConstraint))),this.inputSpec=[{minNDim:2,axes:{[-1]:t}}],this.built=!0}computeOutputShape(e){e=bt(e);let t=e.slice();return t[t.length-1]=this.units,t}call(e,t){return Y(()=>{this.invokeCallHook(e,t);let n=et(e),s=Mk(this.activation.getClassName()),r;return s!=null?r=sa(n,this.kernel.read(),s,this.bias?this.bias.read():null):(r=sa(n,this.kernel.read()),this.bias!=null&&(r=Hr(r,this.bias.read())),this.activation!=null&&(r=this.activation.apply(r))),r})}getConfig(){let e={units:this.units,activation:po(this.activation),useBias:this.useBias,kernelInitializer:Ht(this.kernelInitializer),biasInitializer:Ht(this.biasInitializer),kernelRegularizer:Ct(this.kernelRegularizer),biasRegularizer:Ct(this.biasRegularizer),activityRegularizer:Ct(this.activityRegularizer),kernelConstraint:bn(this.kernelConstraint),biasConstraint:bn(this.biasConstraint)},t=super.getConfig();return Object.assign(e,t),e}};tx.className="Dense";he.registerClass(tx);var nx=class extends pt{constructor(e){e=e||{},super(e),this.inputSpec=[{minNDim:3}],this.dataFormat=e.dataFormat}computeOutputShape(e){e=bt(e);for(let t of e.slice(1))if(t==null)throw new j(`The shape of the input to "Flatten" is not fully defined (got ${e.slice(1)}). Make sure to pass a complete "input_shape" or "batch_input_shape" argument to the first layer in your model.`);return[e[0],so(e,1)]}call(e,t){return Y(()=>{this.invokeCallHook(e,t);let n=et(e);if(this.dataFormat==="channelsFirst"&&n.rank>1){let s=[0];for(let r=2;r{this.invokeCallHook(e,t);let n=et(e);return this.activation.apply(n)})}getConfig(){let e={activation:po(this.activation)},t=super.getConfig();return Object.assign(e,t),e}};sx.className="Activation";he.registerClass(sx);var rx=class extends pt{constructor(e){super(e),this.n=e.n,this.inputSpec=[{ndim:2}]}computeOutputShape(e){return[e[0],this.n,e[1]]}call(e,t){return Y(()=>(e=et(e),fU(e,this.n)))}getConfig(){let e={n:this.n},t=super.getConfig();return Object.assign(e,t),e}};rx.className="RepeatVector";he.registerClass(rx);var ax=class extends pt{constructor(e){super(e),this.targetShape=e.targetShape;for(let t=0;t{this.invokeCallHook(e,t);let n=et(e),s=n.shape,r=s.slice(0,1).concat(this.fixUnknownDimension(s.slice(1),this.targetShape));return V(n,r)})}getConfig(){let e={targetShape:this.targetShape},t=super.getConfig();return Object.assign(e,t),e}};ax.className="Reshape";he.registerClass(ax);var ox=class extends pt{constructor(e){if(super(e),e.dims==null)throw new Error("Required configuration field `dims` is missing during Permute constructor call.");if(!Array.isArray(e.dims))throw new Error(`Permute constructor requires \`dims\` to be an Array, but received ${e.dims} instead.`);let t=Wr(1,e.dims.length+1);if(!v.arraysEqual(e.dims.slice().sort(),t))throw new Error("Invalid permutation `dims`: "+JSON.stringify(e.dims)+" `dims` must contain consecutive integers starting from 1.");this.dims=e.dims,this.dimsIncludingBatch=[0].concat(this.dims),this.inputSpec=[new on({ndim:this.dims.length+1})]}computeOutputShape(e){e=bt(e);let t=e.slice();return this.dims.forEach((n,s)=>{t[s+1]=e[n]}),t}call(e,t){return at(et(e),this.dimsIncludingBatch)}getConfig(){let e={dims:this.dims},t=super.getConfig();return Object.assign(e,t),e}};ox.className="Permute";he.registerClass(ox);var ix=class extends pt{constructor(e){super(e==null?{}:e),this.supportsMasking=!0,e!=null?this.maskValue=e.maskValue==null?0:e.maskValue:this.maskValue=0}computeOutputShape(e){return e}getConfig(){let e=super.getConfig(),t={maskValue:this.maskValue};return Object.assign(t,e),t}computeMask(e,t){let n=et(e),s=-1;return _p(dl(n,this.maskValue),s)}call(e,t){return Y(()=>{this.invokeCallHook(e,t);let n=et(e),s=-1,r=!0,a=_p(dl(n,this.maskValue),s,r);return z(n,ge(a,n.dtype))})}};ix.className="Masking";he.registerClass(ix);var lx=class extends pt{constructor(e){if(super(e),this.embeddings=null,this.DEFAULT_EMBEDDINGS_INITIALIZER="randomUniform",e.batchInputShape==null&&e.inputShape==null){let t=null;e.batchSize!=null&&(t=e.batchSize),e.inputLength==null?this.batchInputShape=[t,null]:this.batchInputShape=[t].concat($t(e.inputLength))}this.inputDim=e.inputDim,Nn(this.inputDim,"inputDim"),this.outputDim=e.outputDim,Nn(this.outputDim,"outputDim"),this.embeddingsInitializer=Mt(e.embeddingsInitializer||this.DEFAULT_EMBEDDINGS_INITIALIZER),this.embeddingsRegularizer=zt(e.embeddingsRegularizer),this.activityRegularizer=zt(e.activityRegularizer),this.embeddingsConstraint=vn(e.embeddingsConstraint),this.maskZero=e.maskZero,this.supportsMasking=e.maskZero,this.inputLength=e.inputLength}build(e){this.embeddings=this.addWeight("embeddings",[this.inputDim,this.outputDim],this.dtype,this.embeddingsInitializer,this.embeddingsRegularizer,!0,this.embeddingsConstraint),this.built=!0}warnOnIncompatibleInputShape(e){}computeMask(e,t){return Y(()=>this.maskZero?(e=et(e),dl(e,dt(e))):null)}computeOutputShape(e){if(e=bt(e),this.inputLength==null)return[...e,this.outputDim];let t=$t(this.inputLength);if(t.length!==e.length-1)throw new j(`"inputLength" is ${this.inputLength}, but received input shape has shape ${e}`);{let n=0;for(let s=0;s{this.invokeCallHook(e,t);let n=et(e);n.dtype!=="int32"&&(n=p2(n,"int32"));let s=Uk(this.embeddings.read(),V(n,[n.size]));return V(s,bt(this.computeOutputShape(n.shape)))})}getConfig(){let e={inputDim:this.inputDim,outputDim:this.outputDim,embeddingsInitializer:Ht(this.embeddingsInitializer),embeddingsRegularizer:Ct(this.embeddingsRegularizer),activityRegularizer:Ct(this.activityRegularizer),embeddingsConstraint:bn(this.embeddingsConstraint),maskZero:this.maskZero,inputLength:this.inputLength},t=super.getConfig();return Object.assign(e,t),e}};lx.className="Embedding";he.registerClass(lx);var yu=class extends pt{constructor(e){super(e||{}),this.supportsMasking=!0}mergeFunction(e){throw new Je}computeElementwiseOpOutputShape(e,t){if(e==null||t==null)return null;if(e.length1)throw new j(`Can not merge tensors with different batch sizes. Got tensors with shapes: ${JSON.stringify(e)}.`);let n=e[0]==null?null:e[0].slice(1);for(let r=1;rr.length);e.indexOf(null)===-1&&no(s).length===1?this.reshapeRequired=!1:this.reshapeRequired=!0}call(e,t){return Y(()=>{if(e=e,this.reshapeRequired){let n=[],s=e.map(r=>r.rank);if(s.indexOf(null)===-1){let r=co(s);for(let a of e){let o=a.rank;for(let i=0;i1){let u=Wr(1,l).concat([0]);n.push(at(i,u)),r=!0}else n.push(i)}let a=this.mergeFunction(n),o=a.rank;if(r){if(o==null){let i=a.shape,l=i.length,u=i[l-1],c=[u].concat(i.slice(0,i.length-1));a=V(at(V(a,[-1,u]),[1,0]),c)}else if(o>1){let i=[o-1].concat(Wr(0,o-1));a=at(a,i)}}return a}}else return this.mergeFunction(e)})}computeOutputShape(e){e=e;let t;e[0]==null?t=null:t=e[0].slice(1);for(let s=1;s{if(t==null)return null;if(!Array.isArray(t))throw new j("`mask` should be an Array");if(!Array.isArray(e))throw new j("`inputs` should be an Array");if(t.length!==e.length)throw new j(`The Array 'inputs' and 'mask' are expected to have the same length, but have different lengths (${e.length} vs ${t.length})`);if(t.every(s=>s==null))return null;t=t.map(s=>s==null?s:Ft(s,0));let n=t[0];for(let s=1;s{let t=e[0].clone();for(let n=1;n{let t=e[0].clone();for(let n=1;n{let t=e[0].clone();for(let n=1;n{let t=e[0];for(let n=1;n{let t=e[0];for(let n=1;n1)throw new j("A `Concatenate` layer requires inputs with matching shapes except for the concat axis. Got input shapes: "+JSON.stringify(e))}mergeFunction(e){return Y(()=>f5(e,this.axis))}computeOutputShape(e){if(!(Array.isArray(e)&&Array.isArray(e[0])))throw new j("A `Concatenate` layer should be called on a list of inputs.");let t=e,n=t[0].slice(),s=this.axis<0?n.length+this.axis:this.axis;for(let r of t.slice(1)){if(n[s]==null||r[s]==null){n[s]=null;break}n[s]+=r[s]}return n}computeMask(e,t){if(t==null)return null;if(!Array.isArray(t))throw new j("`mask` should be an array for Concatenate");if(!Array.isArray(e))throw new j("`inputs` should be an array for Concatenate");if(t.length!==e.length)throw new j(`Mismatch in the length of mask (${t.length}) and the legnth of inputs (${e.length})`);return Y(()=>{let n=!0;if(t.forEach(a=>{if(a!=null){n=!1;return}}),n)return null;let s=[];for(let a=0;a3||t.shape.length>3)throw new Je("batchDot is not implemented for tensors of 4D or higher rank yet");if(v.assert(e.shape.length>=2,()=>`batchDot requires the rank of x to be >= 2, but got ${e.shape.length}`),v.assert(e.shape.length>=2,()=>`batchDot requires the rank of y to be >= 2, but got ${t.shape.length}`),typeof n=="number"&&(n=[n,n]),e.dtype==="complex64"||t.dtype==="complex64")throw new Je("batchDot is not implemented for complex64-type Tensors yet.");let s=e.shape.length,r=t.shape.length;n==null&&(n=[s-1,r-2]);let a=n;return Y(()=>{let o;if(s>r){o=s-r;let l=[];for(let u=0;us){o=r-s;let l=[];for(let u=0;u0){let l;s>r?l=s+r-3:l=s-1;let u=[];for(let c=l;c"A `Dot` layer should be called on a list of exactly 2 inputs.");let t=e[0],n=e[1];if(t.length>3||n.length>3)throw new Je("Dot layer does not support tensors of 4D or higher rank yet.");let s=this.interpretAxes(t,n);if(t[s[0]]!==n[s[1]])throw new j(`Dimension incompatibility: ${t[s[0]]} !== ${n[s[1]]}`)}mergeFunction(e){if(e.length!==2)throw new j(`A \`Dot\` layer must be called on exactly 2 inputs, but received ${e.length} input(s).`);let t=e[0],n=e[1],s;return Array.isArray(this.axes)?s=this.axes.map((r,a)=>ap(r,e[a].shape.length)):s=[ap(this.axes,t.shape.length),ap(this.axes,n.shape.length)],this.normalize&&(t=Fm(t,s[0]),n=Fm(n,s[1])),sH(t,n,s)}interpretAxes(e,t){let n;return Array.isArray(this.axes)?n=this.axes:n=[ap(this.axes,e.length),ap(this.axes,t.length)],n}computeOutputShape(e){v.assert(Array.isArray(e)&&e.length===2&&Array.isArray(e[0])&&Array.isArray(e[1]),()=>"A `Dot` layer should be called on a list of exactly 2 inputs.");let t=e[0].slice(),n=e[1].slice();if(t.length>3||n.length>3)throw new Je("Dot layer does not support tensors of 4D or higher rank yet.");let s=this.interpretAxes(t,n);t.splice(s[0],1),n.splice(s[1],1),n.splice(0,1);let r=t.concat(n);return r.length===1&&r.push(1),r}computeMask(e,t){return null}getConfig(){let e={axes:this.axes,normalize:this.normalize},t=super.getConfig();return Object.assign(e,t),e}};mx.className="Dot";he.registerClass(mx);var gx=class extends pt{constructor(e){super(e),this.supportsMasking=!0,this.stddev=e.stddev}computeOutputShape(e){return e}getConfig(){let e=super.getConfig(),t={stddev:this.stddev};return Object.assign(t,e),t}call(e,t){return Y(()=>{this.invokeCallHook(e,t);let n=et(e);return Ph(()=>de(h2(n.shape,0,this.stddev),n),()=>n,t.training||!1)})}};gx.className="GaussianNoise";he.registerClass(gx);var yx=class extends pt{constructor(e){super(e),this.supportsMasking=!0,this.rate=e.rate}computeOutputShape(e){return e}getConfig(){let e=super.getConfig(),t={rate:this.rate};return Object.assign(t,e),t}call(e,t){return Y(()=>{this.invokeCallHook(e,t);let n=et(e);return this.rate>0&&this.rate<1?Ph(()=>{let r=Math.sqrt(this.rate/(1-this.rate));return z(n,h2(n.shape,1,r))},()=>n,t.training||!1):n})}};yx.className="GaussianDropout";he.registerClass(yx);var Ax=class extends pt{constructor(e){super(e),this.supportsMasking=!0,this.rate=e.rate,this.noiseShape=e.noiseShape}_getNoiseShape(e){return this.noiseShape||et(e).shape}computeOutputShape(e){return e}getConfig(){let e=super.getConfig(),t={rate:this.rate};return Object.assign(t,e),t}call(e,t){return Y(()=>{if(this.rate<1&&this.rate>0){let n=this._getNoiseShape(e);return Ph(()=>{let r=et(e),a=1.6732632423543772,o=1.0507009873554805,i=-a*o,l=mi(od(n),this.rate);l=p2(l,"float32");let u=((1-this.rate)*(1+this.rate*i**2))**-.5,c=-u*i*this.rate,p=de(z(r,l),z(de(l,-1),i));return de(z(p,u),c)},()=>et(e),t.training||!1)}return e})}};Ax.className="AlphaDropout";he.registerClass(Ax);function Fp(e,t,n,s,r,a=.001){let o;if(e.rank===2)o=xA(e,t,n,s,r,a);else if(e.rank===3)o=bA(e,t,n,s,r,a);else if(e.rank===4)o=vA(e,t,n,s,r,a);else throw new Je(`batchNormalization is not implemented for array of rank ${e.rank} yet`);return o}function rH(e,t,n,s,r=.001){return Y(()=>{let a=Sh(e,s),o=a.mean,i=a.variance;return[Fp(e,o,i,n,t,r),o,i]})}function aH(e,t,n,s,r=.001){return Y(()=>{let a=Sh(e,s),o=a.mean,i=a.variance,l=[];for(let f of Wr(0,e.rank))s.indexOf(f)!==-1?l.push(1):l.push(e.shape[f]);let u=V(o,l),c=V(i,l),p=t==null?null:V(t,l),d=n==null?null:V(n,l);return[Fp(e,u,c,d,p,r),o,i]})}function oH(e,t,n,s,r=.001){return v.arraysEqual(s.slice().sort(),Wr(0,e.rank-1))?rH(e,t,n,s,r):aH(e,t,n,s,r)}var xx=class extends pt{constructor(e){e==null&&(e={}),super(e),this.supportsMasking=!0,this.axis=e.axis==null?-1:e.axis,this.momentum=e.momentum==null?.99:e.momentum,this.epsilon=e.epsilon==null?.001:e.epsilon,this.center=e.center==null?!0:e.center,this.scale=e.scale==null?!0:e.scale,this.betaInitializer=Mt(e.betaInitializer||"zeros"),this.gammaInitializer=Mt(e.gammaInitializer||"ones"),this.movingMeanInitializer=Mt(e.movingMeanInitializer||"zeros"),this.movingVarianceInitializer=Mt(e.movingVarianceInitializer||"ones"),this.betaConstraint=vn(e.betaConstraint),this.gammaConstraint=vn(e.gammaConstraint),this.betaRegularizer=zt(e.betaRegularizer),this.gammaRegularizer=zt(e.gammaRegularizer)}build(e){e=bt(e);let t=this.axis>=0?this.axis:this.axis+e.length,n=e[t];if(n==null)throw new j(`Axis ${t} of input tensor should have a defined dimension but the layer received an input with shape ${JSON.stringify(e)}.`);this.inputSpec=[new on({ndim:e.length,axes:{[t]:n}})];let s=[n];this.scale&&(this.gamma=this.addWeight("gamma",s,null,this.gammaInitializer,this.gammaRegularizer,!0,this.gammaConstraint)),this.center&&(this.beta=this.addWeight("beta",s,null,this.betaInitializer,this.betaRegularizer,!0,this.betaConstraint)),this.movingMean=this.addWeight("moving_mean",s,null,this.movingMeanInitializer,null,!1),this.movingVariance=this.addWeight("moving_variance",s,null,this.movingVarianceInitializer,null,!1),this.built=!0}call(e,t){return Y(()=>{let n=t.training==null?!1:t.training,s=et(e),r=s.shape,a=r.length,o=Wr(0,a),i=this.axis>=0?this.axis:this.axis+a;o.splice(i,1);let l=pl(1,a);l[i]=r[i];let u=o.slice();u.sort();let c=!v.arraysEqual(u,Wr(0,a).slice(0,a-1)),p=()=>{if(c){let y=V(this.movingMean.read(),l),x=V(this.movingVariance.read(),l),A=this.center?V(this.beta.read(),l):null,b=this.scale?V(this.gamma.read(),l):null;return Fp(s,y,x,A,b,this.epsilon)}else return Fp(s,this.movingMean.read(),this.movingVariance.read(),this.beta==null?null:this.beta.read(),this.gamma==null?null:this.gamma.read(),this.epsilon)};if(!n)return p();let[d,h,f]=oH(s,this.gamma.read(),this.beta.read(),o,this.epsilon),m=(y,x,A)=>{Y(()=>{let b=1-A,w=y.read(),k=z(Ae(w,x),b);y.write(Ae(w,k))})};return(()=>{m(this.movingMean,h,this.momentum),m(this.movingVariance,f,this.momentum)})(),d})}getConfig(){let e={axis:this.axis,momentum:this.momentum,epsilon:this.epsilon,center:this.center,scale:this.scale,betaInitializer:Ht(this.betaInitializer),gammaInitializer:Ht(this.gammaInitializer),movingMeanInitializer:Ht(this.movingMeanInitializer),movingVarianceInitializer:Ht(this.movingVarianceInitializer),betaRegularizer:Ct(this.betaRegularizer),gammaRegularizer:Ct(this.gammaRegularizer),betaConstraint:bn(this.betaConstraint),gammaConstraint:bn(this.gammaConstraint)},t=super.getConfig();return Object.assign(e,t),e}};xx.className="BatchNormalization";he.registerClass(xx);var bx=class extends pt{constructor(e){if(e==null&&(e={}),super(e),this.axis=e.axis==null?-1:e.axis,typeof this.axis=="number"){if(!Number.isInteger(this.axis))throw new Error(`Expected axis to be an integer, but received ${this.axis}`)}else if(Array.isArray(this.axis)){for(let t of this.axis)if(!Number.isInteger(t))throw new Error(`Expected axis to be an array of integers, but received ${JSON.stringify(this.axis)}`)}else throw new Error(`Expected axis to be an integer or an array of integers, but received ${JSON.stringify(this.axis)}`);this.epsilon=e.epsilon==null?.001:e.epsilon,this.center=e.center==null?!0:e.center,this.scale=e.scale==null?!0:e.scale,this.betaInitializer=Mt(e.betaInitializer||"zeros"),this.gammaInitializer=Mt(e.gammaInitializer||"ones"),this.betaRegularizer=zt(e.betaRegularizer),this.gammaRegularizer=zt(e.gammaRegularizer),this.supportsMasking=!0}build(e){e=bt(e);let t=e.length;typeof this.axis=="number"&&(this.axis=[this.axis]);for(let r=0;r=t)throw new Error(`Invalid axis: ${r}`);if(this.axis.length!==no(this.axis).length)throw new Error(`Found duplicate axes in: ${this.axis}`);let n=this.axis.map(r=>e[r]),s=!0;this.scale?this.gamma=this.addWeight("gamma",n,"float32",this.gammaInitializer,this.gammaRegularizer,s):this.gamma=null,this.center?this.beta=this.addWeight("beta",n,"float32",this.betaInitializer,this.betaRegularizer,s):this.beta=null,this.built=!0}call(e,t){let n=et(e),s=n.shape,r=s.length;return Y(()=>{let{mean:o,variance:i}=Sh(n,this.axis,!0),l=pl(1,r);for(let f of this.axis)l[f]=s[f];let u=f=>f!=null&&f.shape.length!==r?V(f,l):f,c=this.scale?u(this.gamma.read()):null,p=this.center?u(this.beta.read()):null,d=[],h=[];for(let f=0;f{if(e.rank!==4)throw new j(`temporalPadding expects input tensor to be 4-D, but received a ${e.rank}-D tensor.`);if(t==null&&(t=[[1,1],[1,1]]),t.length!==2||t[0].length!==2||t[1].length!==2)throw new j("spatial2dPadding expects `padding` to be an Array of two Arrays, each of which is an Array of two integers.");if(n==null&&(n=Vr()),n!=="channelsLast"&&n!=="channelsFirst")throw new j(`Unknown data format: ${n}. Supported data formats are 'channelsLast' and 'channelsFirst.`);let s;return n==="channelsFirst"?s=[[0,0],[0,0],t[0],t[1]]:s=[[0,0],t[0],t[1],[0,0]],ar(e,s)})}var vx=class extends pt{constructor(e){if(e==null&&(e={}),super(e),this.dataFormat=e.dataFormat==null?Vr():e.dataFormat,e.padding==null)this.padding=[[1,1],[1,1]];else if(typeof e.padding=="number")this.padding=[[e.padding,e.padding],[e.padding,e.padding]];else{if(e.padding=e.padding,e.padding.length!==2)throw new j(`ZeroPadding2D expects padding to be a length-2 array, but received a length-${e.padding.length} array.`);let t,n;if(typeof e.padding[0]=="number")t=[e.padding[0],e.padding[0]],n=[e.padding[1],e.padding[1]];else{if(e.padding=e.padding,e.padding[0].length!==2)throw new j(`ZeroPadding2D expects height padding to be a length-2 array, but received a length-${e.padding[0].length} array.`);if(t=e.padding[0],e.padding[1].length!==2)throw new j(`ZeroPadding2D expects width padding to be a length-2 array, but received a length-${e.padding[1].length} array.`);n=e.padding[1]}this.padding=[t,n]}this.inputSpec=[new on({ndim:4})]}computeOutputShape(e){e=bt(e);let t,n;return this.dataFormat==="channelsFirst"?(e[2]!=null&&e[2]>=0?t=e[2]+this.padding[0][0]+this.padding[0][1]:t=null,e[3]!=null&&e[3]>=0?n=e[3]+this.padding[1][0]+this.padding[1][1]:n=null,[e[0],e[1],t,n]):(e[1]!=null&&e[1]>=0?t=e[1]+this.padding[0][0]+this.padding[0][1]:t=null,e[2]!=null&&e[2]>=0?n=e[2]+this.padding[1][0]+this.padding[1][1]:n=null,[e[0],t,n,e[3]])}call(e,t){return Y(()=>iH(et(e),this.padding,this.dataFormat))}getConfig(){let e={padding:this.padding,dataFormat:this.dataFormat},t=super.getConfig();return Object.assign(e,t),e}};vx.className="ZeroPadding2D";he.registerClass(vx);function R2(e,t,n,s,r,a){return Y(()=>{en(r),Lk(a),or(s),n==null&&(n=[1,1]),s==null&&(s="valid"),r==null&&(r=Vr()),a==null&&(a="max"),e=V5(e,r);let o,i=s==="same"?"same":"valid";return a==="max"?o=kh(e,t,n,i):o=yh(e,t,n,i),r==="channelsFirst"&&(o=at(o,[0,3,1,2])),o})}function P8(e,t,n,s,r,a){return Y(()=>{en(r),Lk(a),or(s),n==null&&(n=[1,1,1]),s==null&&(s="valid"),r==null&&(r=Vr()),a==null&&(a="max"),e=E8(e,r);let o,i=s==="same"?"same":"valid";return a==="max"?o=HA(e,t,n,i):o=AA(e,t,n,i),r==="channelsFirst"&&(o=at(o,[0,4,1,2,3])),o})}var F8=class extends pt{constructor(e){if(e.poolSize==null&&(e.poolSize=2),super(e),typeof e.poolSize=="number")this.poolSize=[e.poolSize];else if(Array.isArray(e.poolSize)&&e.poolSize.length===1&&typeof e.poolSize[0]=="number")this.poolSize=e.poolSize;else throw new j(`poolSize for 1D convolutional layer must be a number or an Array of a single number, but received ${JSON.stringify(e.poolSize)}`);if(Nn(this.poolSize,"poolSize"),e.strides==null)this.strides=this.poolSize;else if(typeof e.strides=="number")this.strides=[e.strides];else if(Array.isArray(e.strides)&&e.strides.length===1&&typeof e.strides[0]=="number")this.strides=e.strides;else throw new j(`strides for 1D convolutional layer must be a number or an Array of a single number, but received ${JSON.stringify(e.strides)}`);Nn(this.strides,"strides"),this.padding=e.padding==null?"valid":e.padding,or(this.padding),this.inputSpec=[new on({ndim:3})]}computeOutputShape(e){e=bt(e);let t=Br(e[1],this.poolSize[0],this.padding,this.strides[0]);return[e[0],t,e[2]]}call(e,t){return Y(()=>{this.invokeCallHook(e,t),e=Dh(et(e),2);let n=this.poolingFunction(et(e),[this.poolSize[0],1],[this.strides[0],1],this.padding,"channelsLast");return Ke(n,[2])})}getConfig(){let e={poolSize:this.poolSize,padding:this.padding,strides:this.strides},t=super.getConfig();return Object.assign(e,t),e}},wx=class extends F8{constructor(e){super(e)}poolingFunction(e,t,n,s,r){return en(r),or(s),R2(e,t,n,s,r,"max")}};wx.className="MaxPooling1D";he.registerClass(wx);var kx=class extends F8{constructor(e){super(e)}poolingFunction(e,t,n,s,r){return en(r),or(s),R2(e,t,n,s,r,"avg")}};kx.className="AveragePooling1D";he.registerClass(kx);var O8=class extends pt{constructor(e){if(e.poolSize==null&&(e.poolSize=[2,2]),super(e),this.poolSize=Array.isArray(e.poolSize)?e.poolSize:[e.poolSize,e.poolSize],e.strides==null)this.strides=this.poolSize;else if(Array.isArray(e.strides)){if(e.strides.length!==2)throw new j(`If the strides property of a 2D pooling layer is an Array, it is expected to have a length of 2, but received length ${e.strides.length}.`);this.strides=e.strides}else this.strides=[e.strides,e.strides];Nn(this.poolSize,"poolSize"),Nn(this.strides,"strides"),this.padding=e.padding==null?"valid":e.padding,this.dataFormat=e.dataFormat==null?"channelsLast":e.dataFormat,en(this.dataFormat),or(this.padding),this.inputSpec=[new on({ndim:4})]}computeOutputShape(e){e=bt(e);let t=this.dataFormat==="channelsFirst"?e[2]:e[1],n=this.dataFormat==="channelsFirst"?e[3]:e[2];return t=Br(t,this.poolSize[0],this.padding,this.strides[0]),n=Br(n,this.poolSize[1],this.padding,this.strides[1]),this.dataFormat==="channelsFirst"?[e[0],e[1],t,n]:[e[0],t,n,e[3]]}call(e,t){return Y(()=>(this.invokeCallHook(e,t),this.poolingFunction(et(e),this.poolSize,this.strides,this.padding,this.dataFormat)))}getConfig(){let e={poolSize:this.poolSize,padding:this.padding,strides:this.strides,dataFormat:this.dataFormat},t=super.getConfig();return Object.assign(e,t),e}},Sx=class extends O8{constructor(e){super(e)}poolingFunction(e,t,n,s,r){return en(r),or(s),R2(e,t,n,s,r,"max")}};Sx.className="MaxPooling2D";he.registerClass(Sx);var Ix=class extends O8{constructor(e){super(e)}poolingFunction(e,t,n,s,r){return en(r),or(s),R2(e,t,n,s,r,"avg")}};Ix.className="AveragePooling2D";he.registerClass(Ix);var M8=class extends pt{constructor(e){if(e.poolSize==null&&(e.poolSize=[2,2,2]),super(e),this.poolSize=Array.isArray(e.poolSize)?e.poolSize:[e.poolSize,e.poolSize,e.poolSize],e.strides==null)this.strides=this.poolSize;else if(Array.isArray(e.strides)){if(e.strides.length!==3)throw new j(`If the strides property of a 3D pooling layer is an Array, it is expected to have a length of 3, but received length ${e.strides.length}.`);this.strides=e.strides}else this.strides=[e.strides,e.strides,e.strides];Nn(this.poolSize,"poolSize"),Nn(this.strides,"strides"),this.padding=e.padding==null?"valid":e.padding,this.dataFormat=e.dataFormat==null?"channelsLast":e.dataFormat,en(this.dataFormat),or(this.padding),this.inputSpec=[new on({ndim:5})]}computeOutputShape(e){e=bt(e);let t=this.dataFormat==="channelsFirst"?e[2]:e[1],n=this.dataFormat==="channelsFirst"?e[3]:e[2],s=this.dataFormat==="channelsFirst"?e[4]:e[3];return t=Br(t,this.poolSize[0],this.padding,this.strides[0]),n=Br(n,this.poolSize[1],this.padding,this.strides[1]),s=Br(s,this.poolSize[2],this.padding,this.strides[2]),this.dataFormat==="channelsFirst"?[e[0],e[1],t,n,s]:[e[0],t,n,s,e[4]]}call(e,t){return Y(()=>(this.invokeCallHook(e,t),this.poolingFunction(et(e),this.poolSize,this.strides,this.padding,this.dataFormat)))}getConfig(){let e={poolSize:this.poolSize,padding:this.padding,strides:this.strides,dataFormat:this.dataFormat},t=super.getConfig();return Object.assign(e,t),e}},Cx=class extends M8{constructor(e){super(e)}poolingFunction(e,t,n,s,r){return en(r),or(s),P8(e,t,n,s,r,"max")}};Cx.className="MaxPooling3D";he.registerClass(Cx);var Tx=class extends M8{constructor(e){super(e)}poolingFunction(e,t,n,s,r){return en(r),or(s),P8(e,t,n,s,r,"avg")}};Tx.className="AveragePooling3D";he.registerClass(Tx);var z8=class extends pt{constructor(e){super(e),this.inputSpec=[new on({ndim:3})]}computeOutputShape(e){return[e[0],e[2]]}call(e,t){throw new Je}},Nx=class extends z8{constructor(e){super(e||{})}call(e,t){return Y(()=>{let n=et(e);return Ut(n,1)})}};Nx.className="GlobalAveragePooling1D";he.registerClass(Nx);var Ex=class extends z8{constructor(e){super(e||{})}call(e,t){return Y(()=>{let n=et(e);return xn(n,1)})}};Ex.className="GlobalMaxPooling1D";he.registerClass(Ex);var L8=class extends pt{constructor(e){super(e),this.dataFormat=e.dataFormat==null?"channelsLast":e.dataFormat,en(this.dataFormat),this.inputSpec=[new on({ndim:4})]}computeOutputShape(e){return e=e,this.dataFormat==="channelsLast"?[e[0],e[3]]:[e[0],e[1]]}call(e,t){throw new Je}getConfig(){let e={dataFormat:this.dataFormat},t=super.getConfig();return Object.assign(e,t),e}},Rx=class extends L8{call(e,t){return Y(()=>{let n=et(e);return this.dataFormat==="channelsLast"?Ut(n,[1,2]):Ut(n,[2,3])})}};Rx.className="GlobalAveragePooling2D";he.registerClass(Rx);var _x=class extends L8{call(e,t){return Y(()=>{let n=et(e);return this.dataFormat==="channelsLast"?xn(n,[1,2]):xn(n,[2,3])})}};_x.className="GlobalMaxPooling2D";he.registerClass(_x);var B8=class extends pt{constructor(e){super(e),this.layer=e.layer}build(e){this.built=!0}get trainable(){return this.layer!=null?this.layer.trainable:!1}set trainable(e){this.layer!=null&&(this.layer.trainable=e)}get trainableWeights(){return this.layer.trainableWeights}get nonTrainableWeights(){return this.layer.nonTrainableWeights}get updates(){return this.layer._updates}get losses(){return this.layer.losses}getWeights(){return this.layer.getWeights()}setWeights(e){this.layer.setWeights(e)}getConfig(){let e={layer:{className:this.layer.getClassName(),config:this.layer.getConfig()}},t=super.getConfig();return Object.assign(e,t),e}setFastWeightInitDuringBuild(e){super.setFastWeightInitDuringBuild(e),this.layer!=null&&this.layer.setFastWeightInitDuringBuild(e)}static fromConfig(e,t,n={}){let s=t.layer,r=Lr(s,n);delete t.layer;let a={layer:r};return Object.assign(a,t),new e(a)}},Dx=class extends B8{constructor(e){super(e),this.supportsMasking=!0}build(e){if(e=bt(e),e.length<3)throw new j(`TimeDistributed layer expects an input shape >= 3D, but received input shape ${JSON.stringify(e)}`);this.inputSpec=[{shape:e}];let t=[e[0]].concat(e.slice(2));this.layer.built||(this.layer.build(t),this.layer.built=!0),super.build(e)}computeOutputShape(e){e=bt(e);let t=[e[0]].concat(e.slice(2)),n=this.layer.computeOutputShape(t),s=e[1];return[n[0],s].concat(n.slice(1))}call(e,t){return Y(()=>(e=et(e),D8((a,o)=>[et(this.layer.call(a,t)),[]],e,[],!1,null,null,!1,!0)[1]))}};Dx.className="TimeDistributed";he.registerClass(Dx);function lH(e){mu(uU,"BidirectionalMergeMode",e)}var uH="concat",$x=class extends B8{constructor(e){super(e);let t=e.layer.getConfig(),n={};n.className=e.layer.getClassName(),n.config=t,this.forwardLayer=Lr(n),t.goBackwards=t.goBackwards!==!0;let s={};if(s.className=e.layer.getClassName(),s.config=t,this.backwardLayer=Lr(s),this.forwardLayer.name="forward_"+this.forwardLayer.name,this.backwardLayer.name="backward_"+this.backwardLayer.name,this.mergeMode=e.mergeMode===void 0?uH:e.mergeMode,lH(this.mergeMode),e.weights)throw new Je("weights support is not implemented for Bidirectional layer yet.");this._stateful=e.layer.stateful,this.returnSequences=e.layer.returnSequences,this.returnState=e.layer.returnState,this.supportsMasking=!0,this._trainable=!0,this.inputSpec=e.layer.inputSpec,this.numConstants=null}get trainable(){return this._trainable}set trainable(e){this._trainable=e,this.forwardLayer!=null&&(this.forwardLayer.trainable=e),this.backwardLayer!=null&&(this.backwardLayer.trainable=e)}getWeights(){return this.forwardLayer.getWeights().concat(this.backwardLayer.getWeights())}setWeights(e){let t=e.length,n=Math.floor(t/2);this.forwardLayer.setWeights(e.slice(0,n)),this.backwardLayer.setWeights(e.slice(n))}computeOutputShape(e){let t=this.forwardLayer.computeOutputShape(e);Array.isArray(t)&&Array.isArray(t[0])||(t=[t]),t=t;let n,s,r;return this.returnState&&(r=t.slice(1)),n=t[0],n=n,this.mergeMode==="concat"?(n[n.length-1]*=2,s=[n]):this.mergeMode==null?s=[n,n.slice()]:s=[n],this.returnState?this.mergeMode==null?s.concat(r).concat(r.slice()):[n].concat(r).concat(r.slice()):xs(s)}apply(e,t){let n=t==null?null:t.initialState,s=t==null?null:t.constants;t==null&&(t={});let r=_8(e,n,s,this.numConstants);if(e=r.inputs,n=r.initialState,s=r.constants,Array.isArray(e)&&(n=e.slice(1),e=e[0]),(n==null||n.length===0)&&s==null)return super.apply(e,t);let a=[],o=[];if(n!=null){let l=n.length;if(l%2>0)throw new j("When passing `initialState` to a Bidrectional RNN, the state should be an Array containing the states of the underlying RNNs.");t.initialState=n,a.push(...n);let u=n.map(c=>new on({shape:c.shape}));this.forwardLayer.stateSpec=u.slice(0,l/2),this.backwardLayer.stateSpec=u.slice(l/2),o.push(...u)}if(s!=null)throw new Je("Support for constants in Bidirectional layers is not implemented yet.");let i=a[0]instanceof Mr;for(let l of a)if(l instanceof Mr!==i)throw new j("The initial state of a Bidirectional layer cannot be specified as a mix of symbolic and non-symbolic tensors");if(i){let l=[e].concat(a),u=this.inputSpec.concat(o),c=this.inputSpec;this.inputSpec=u;let p=super.apply(l,t);return this.inputSpec=c,p}else return super.apply(e,t)}call(e,t){return Y(()=>{let n=t.initialState,s,r;if(n==null)s=this.forwardLayer.call(e,t),r=this.backwardLayer.call(e,t);else{let i=n.slice(0,n.length/2),l=n.slice(n.length/2);s=this.forwardLayer.call(e,Object.assign(t,{initialState:i})),r=this.backwardLayer.call(e,Object.assign(t,{initialState:l}))}let a;this.returnState&&(Array.isArray(s)&&(a=s.slice(1).concat(r.slice(1))),s=s[0],r=r[0]),this.returnSequences&&(r=nr(r,1));let o;return this.mergeMode==="concat"?o=f5([s,r]):this.mergeMode==="sum"?o=de(s,r):this.mergeMode==="ave"?o=z(.5,de(s,r)):this.mergeMode==="mul"?o=z(s,r):this.mergeMode==null&&(o=[s,r]),this.returnState?this.mergeMode==null?o.concat(a):[o].concat(a):o})}resetStates(e){this.forwardLayer.resetStates(),this.backwardLayer.resetStates()}build(e){sl(this.forwardLayer.name,()=>{this.forwardLayer.build(e)}),sl(this.backwardLayer.name,()=>{this.backwardLayer.build(e)}),this.built=!0}computeMask(e,t){Array.isArray(t)&&(t=t[0]);let n;if(this.returnSequences?this.mergeMode==null?n=[t,t]:n=t:this.mergeMode==null?n=[null,null]:n=null,this.returnState){let r=this.forwardLayer.states.map(a=>null);return Array.isArray(n)?n.concat(r).concat(r):[n].concat(r).concat(r)}else return n}get trainableWeights(){return this.forwardLayer.trainableWeights.concat(this.backwardLayer.trainableWeights)}get nonTrainableWeights(){return this.forwardLayer.nonTrainableWeights.concat(this.backwardLayer.nonTrainableWeights)}setFastWeightInitDuringBuild(e){super.setFastWeightInitDuringBuild(e),this.forwardLayer!=null&&this.forwardLayer.setFastWeightInitDuringBuild(e),this.backwardLayer!=null&&this.backwardLayer.setFastWeightInitDuringBuild(e)}getConfig(){let e={mergeMode:this.mergeMode},t=super.getConfig();return Object.assign(e,t),e}static fromConfig(e,t){let n=Lr(t.layer);if(delete t.layer,t.numConstants!=null)throw new Je("Deserialization of a Bidirectional layer with numConstants present is not supported yet.");let s=t;return s.layer=n,new e(s)}};$x.className="Bidirectional";he.registerClass($x);function cH(e){return new ld(e)}function dH(e){return new L5(e)}function pH(e){return new O5(e)}function hH(e){return new M5(e)}function fH(e){return new z5(e)}function mH(e){return new W5(e)}function gH(e){return new B5(e)}function yH(e){return new S2(e)}function AH(e){return new zh(e)}function xH(e){return new G5(e)}function bH(e){return new Lh(e)}function vH(e){return new H5(e)}function wH(e){return new j5(e)}function kH(e){return new q5(e)}function SH(e){return new X5(e)}function IH(e){return new K5(e)}function CH(e){return new sx(e)}function TH(e){return new tx(e)}function NH(e){return new E2(e)}function EH(e){return new ex(e)}function RH(e){return new nx(e)}function _H(e){return new rx(e)}function DH(e){return new ax(e)}function $H(e){return new ox(e)}function PH(e){return new lx(e)}function FH(e){return new ux(e)}function OH(e){return new dx(e)}function MH(e){return new fx(e)}function zH(e){return new px(e)}function LH(e){return new hx(e)}function BH(e){return new cx(e)}function WH(e){return new mx(e)}function VH(e){return new xx(e)}function UH(e){return new bx(e)}function GH(e){return new vx(e)}function Px(e){return new kx(e)}function HH(e){return Px(e)}function jH(e){return Px(e)}function Fx(e){return new Ix(e)}function qH(e){return Fx(e)}function XH(e){return Fx(e)}function Ox(e){return new Tx(e)}function KH(e){return Ox(e)}function ZH(e){return Ox(e)}function YH(e){return new Nx(e)}function JH(e){return new Rx(e)}function W8(e){return new Ex(e)}function V8(e){return new _x(e)}function U8(e){return new wx(e)}function G8(e){return new Sx(e)}function QH(e){return new Cx(e)}function ej(e){return new Y5(e)}function tj(e){return new C2(e)}function nj(e){return new J5(e)}function sj(e){return new Wh(e)}function rj(e){return new Z5(e)}function aj(e){return new I2(e)}function oj(e){return new Q5(e)}function ij(e){return new N2(e)}function lj(e){return new pa(e)}function uj(e){return new T2(e)}function cj(e){return new $x(e)}function dj(e){return new Dx(e)}var pj=W8,hj=V8,fj=U8,mj=G8;function gj(e){return new gx(e)}function yj(e){return new yx(e)}function Aj(e){return new Ax(e)}function xj(e){return new ix(e)}var H8={};qe(H8,{MAPE:()=>Rj,MSE:()=>$j,binaryAccuracy:()=>bj,binaryCrossentropy:()=>vj,categoricalAccuracy:()=>kj,categoricalCrossentropy:()=>Sj,cosineProximity:()=>Tj,mape:()=>_j,meanAbsoluteError:()=>Nj,meanAbsolutePercentageError:()=>Ej,meanSquaredError:()=>Dj,mse:()=>Pj,precision:()=>Ij,recall:()=>Cj,sparseCategoricalAccuracy:()=>wj});function bj(e,t){return E5(e,t)}function vj(e,t){return a8(e,t)}function wj(e,t){return o8(e,t)}function kj(e,t){return R5(e,t)}function Sj(e,t){return _5(e,t)}function Ij(e,t){return r8(e,t)}function Cj(e,t){return hG(e,t)}function Tj(e,t){return N5(e,t)}function Nj(e,t){return w2(e,t)}function Ej(e,t){return ud(e,t)}function Rj(e,t){return ud(e,t)}function _j(e,t){return ud(e,t)}function Dj(e,t){return gu(e,t)}function $j(e,t){return gu(e,t)}function Pj(e,t){return gu(e,t)}var j8={};qe(j8,{modelFromJSON:()=>UG});var q8={};qe(q8,{l1:()=>Oj,l1l2:()=>Fj,l2:()=>Mj});function Fj(e){return new Oh(e)}function Oj(e){return YG(e)}function Mj(e){return JG(e)}var X8=class extends Ac{constructor(){super(...arguments),this.model=null}setModel(e){if(!(e instanceof Ia))throw new Error("model must be a LayersModel, not some other Container");this.model=e}};function nm(e,t){return et}var K8=class extends X8{constructor(e){if(super(),e==null&&(e={}),e.restoreBestWeights)throw new Je("restoreBestWeights = True is not implemented in EarlyStopping yet.");this.monitor=e.monitor||"val_loss",this.minDelta=Math.abs(e.minDelta||0),this.patience=e.patience||0,this.verbose=e.verbose||0,this.mode=e.mode||"auto",this.baseline=e.baseline,["auto","min","max"].indexOf(this.mode)===-1&&(console.warn(`EarlyStopping mode '${this.mode}' is invalid. Falling back to mode 'auto'.`),this.mode="auto"),this.mode==="min"?this.monitorFunc=nm:this.mode==="max"?this.monitorFunc=x7:this.monitor.indexOf("acc")!==-1?this.monitorFunc=x7:this.monitorFunc=nm,this.monitorFunc===nm&&(this.minDelta*=-1)}async onTrainBegin(e){this.wait=0,this.stoppedEpoch=0,this.baseline!=null?this.best=this.baseline:this.best=this.monitorFunc===nm?1/0:-1/0}async onEpochEnd(e,t){await Za(t);let n=this.getMonitorValue(t);n!=null&&(this.monitorFunc(n-this.minDelta,this.best)?(this.best=n,this.wait=0):(this.wait++,this.wait>=this.patience&&(this.stoppedEpoch=e,this.model.stopTraining=!0)))}async onTrainEnd(e){this.stoppedEpoch>0&&this.verbose&&console.log(`Epoch ${this.stoppedEpoch}: early stopping.`)}getMonitorValue(e){e==null&&(e={});let t=e[this.monitor];return t==null&&console.warn(`Metric for EarlyStopping ${this.monitor} is not available. Available metrics are: ${Object.keys(e)}`),t}};function zj(e){return new K8(e)}var Lj={earlyStopping:zj},Bj=H();Bj.registerFlag("KEEP_INTERMEDIATE_TENSORS",()=>!1,e=>{e&&console.warn("Keep intermediate tensors is ON. This will print the values of all intermediate tensors during model inference. Not all models support this mode. For details, check e2e/benchmarks/ model_config.js. This significantly impacts performance.")});var pr;(function(e){e[e.DT_INVALID=0]="DT_INVALID",e[e.DT_FLOAT=1]="DT_FLOAT",e[e.DT_DOUBLE=2]="DT_DOUBLE",e[e.DT_INT32=3]="DT_INT32",e[e.DT_UINT8=4]="DT_UINT8",e[e.DT_INT16=5]="DT_INT16",e[e.DT_INT8=6]="DT_INT8",e[e.DT_STRING=7]="DT_STRING",e[e.DT_COMPLEX64=8]="DT_COMPLEX64",e[e.DT_INT64=9]="DT_INT64",e[e.DT_BOOL=10]="DT_BOOL",e[e.DT_QINT8=11]="DT_QINT8",e[e.DT_QUINT8=12]="DT_QUINT8",e[e.DT_QINT32=13]="DT_QINT32",e[e.DT_BFLOAT16=14]="DT_BFLOAT16",e[e.DT_QINT16=15]="DT_QINT16",e[e.DT_QUINT16=16]="DT_QUINT16",e[e.DT_UINT16=17]="DT_UINT16",e[e.DT_COMPLEX128=18]="DT_COMPLEX128",e[e.DT_HALF=19]="DT_HALF",e[e.DT_RESOURCE=20]="DT_RESOURCE",e[e.DT_VARIANT=21]="DT_VARIANT",e[e.DT_UINT32=22]="DT_UINT32",e[e.DT_UINT64=23]="DT_UINT64",e[e.DT_FLOAT_REF=101]="DT_FLOAT_REF",e[e.DT_DOUBLE_REF=102]="DT_DOUBLE_REF",e[e.DT_INT32_REF=103]="DT_INT32_REF",e[e.DT_UINT8_REF=104]="DT_UINT8_REF",e[e.DT_INT16_REF=105]="DT_INT16_REF",e[e.DT_INT8_REF=106]="DT_INT8_REF",e[e.DT_STRING_REF=107]="DT_STRING_REF",e[e.DT_COMPLEX64_REF=108]="DT_COMPLEX64_REF",e[e.DT_INT64_REF=109]="DT_INT64_REF",e[e.DT_BOOL_REF=110]="DT_BOOL_REF",e[e.DT_QINT8_REF=111]="DT_QINT8_REF",e[e.DT_QUINT8_REF=112]="DT_QUINT8_REF",e[e.DT_QINT32_REF=113]="DT_QINT32_REF",e[e.DT_BFLOAT16_REF=114]="DT_BFLOAT16_REF",e[e.DT_QINT16_REF=115]="DT_QINT16_REF",e[e.DT_QUINT16_REF=116]="DT_QUINT16_REF",e[e.DT_UINT16_REF=117]="DT_UINT16_REF",e[e.DT_COMPLEX128_REF=118]="DT_COMPLEX128_REF",e[e.DT_HALF_REF=119]="DT_HALF_REF",e[e.DT_RESOURCE_REF=120]="DT_RESOURCE_REF",e[e.DT_VARIANT_REF=121]="DT_VARIANT_REF",e[e.DT_UINT32_REF=122]="DT_UINT32_REF",e[e.DT_UINT64_REF=123]="DT_UINT64_REF"})(pr||(pr={}));var b7;(function(e){let t;(function(n){n[n.LEGACY=0]="LEGACY",n[n.V1=1]="V1",n[n.V2=2]="V2"})(t=e.CheckpointFormatVersion||(e.CheckpointFormatVersion={}))})(b7||(b7={}));var Mx={};function Wj(e,t){let n={tfOpName:e,category:"custom",inputs:[],attrs:[],customExecutor:t};Mx[e]=n}function Z8(e){return Mx[e]}function Vj(e){delete Mx[e]}function I(e,t,n,s,r){let a=t.inputParams[e];if(a&&a.inputIndexStart!==void 0){let i=a.inputIndexStart,l=a.inputIndexEnd===0?void 0:a.inputIndexEnd===void 0?i+1:a.inputIndexEnd;if(a.type==="tensor")return ls(t.inputNames[a.inputIndexStart],n,s,r);if(a.type==="tensors")return t.inputNames.slice(i,l).map(d=>ls(d,n,s,r));let u=ls(t.inputNames.slice(i)[0],n,s,r),c=u.dataSync();return a.type==="number"?c[0]:v.toNestedArray(u.shape,c)}let o=t.attrParams[e];return o&&o.value}function ls(e,t,n,s){let[r,a]=$s(e);if(s!=null){let i=s.getHashTableHandleByName(r);if(i!=null)return i}let o=n.currentContextIds.find(i=>!!t[Bm(r,i)]);return o!==void 0?t[Bm(r,o)][a]:void 0}function Uj(e,t,n){return t[Bm(e,n.currentContextId)]}function ta(e,t){let[n,s,r]=$s(e);return[Bm(n,t&&t.currentContextId),s,r]}function Bm(e,t){return t?`${e}-${t}`:e}function $s(e){let t=e.split(":");if(t.length===1)return[e,0,void 0];let n=t[0],s=t.length===3?t[1]:void 0,r=Number(t[t.length-1]);return[n,r,s]}function hm(e,t,n){let s=I("pad",e,t,n);if(s==="explicit"){s=I("explicitPaddings",e,t,n);let r=[[0,0],[0,0],[0,0],[0,0]];for(let a=0;a<4;a++)r[a][0]=s[a*2],r[a][1]=s[a*2+1];return r}return s}function wa(e){return e.kept?e:Gn(e)}var Y8={};qe(Y8,{json:()=>Gj});var Gj=[{tfOpName:"Add",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"AddV2",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"AddN",category:"arithmetic",inputs:[{start:0,end:0,name:"tensors",type:"tensors"}]},{tfOpName:"BiasAdd",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0}]},{tfOpName:"Sub",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"RealDiv",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Div",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"DivNoNan",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"FloorDiv",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Mul",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Maximum",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Minimum",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Pow",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"SquaredDifference",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Mod",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"FloorMod",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]}],J8={};qe(J8,{json:()=>Hj});var Hj=[{tfOpName:"Abs",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Acos",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Asin",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Atan",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Atan2",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"y",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Ceil",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"ClipByValue",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"clipValueMin",type:"number"},{start:2,name:"clipValueMax",type:"number"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Complex",category:"basic_math",inputs:[{start:0,name:"real",type:"tensor"},{start:1,name:"imag",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"ComplexAbs",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Cos",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Cosh",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Elu",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Exp",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Floor",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Log",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Imag",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"Tout",name:"outputType",type:"dtype",notSupported:!0}]},{tfOpName:"Neg",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Real",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"Tout",name:"outputType",type:"dtype",notSupported:!0}]},{tfOpName:"Prelu",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"alpha",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Relu",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Relu6",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Selu",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Sigmoid",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Sin",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Sinh",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Sqrt",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Rsqrt",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Square",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Tan",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Tanh",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Sign",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Round",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Expm1",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Log1p",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Reciprocal",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Softplus",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Asinh",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Acosh",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Atanh",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Erf",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Prod",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axes",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool",notSupported:!0},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"LeakyRelu",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"alpha",name:"alpha",type:"number",defaultValue:.2},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"IsNan",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]}],Q8={};qe(Q8,{json:()=>jj});var jj=[{tfOpName:"EmptyTensorList",category:"control",inputs:[{start:0,name:"elementShape",type:"shape"},{start:1,name:"maxNumElements",type:"number"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"LoopCond",category:"control",inputs:[{start:0,name:"pred",type:"tensor"}]},{tfOpName:"Switch",category:"control",inputs:[{start:0,name:"data",type:"tensor"},{start:1,name:"pred",type:"tensor"}]},{tfOpName:"Merge",category:"control",inputs:[{start:0,end:0,name:"tensors",type:"tensors"}]},{tfOpName:"Enter",category:"control",inputs:[{start:0,name:"tensor",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"frame_name",name:"frameName",type:"string"},{tfName:"is_constant",name:"isConstant",type:"bool"}]},{tfOpName:"Exit",category:"control",inputs:[{start:0,name:"tensor",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"NextIteration",category:"control",inputs:[{start:0,name:"tensor",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"TensorArrayV3",category:"control",inputs:[{start:0,name:"size",type:"number"}],attrs:[{tfName:"dtype",name:"dtype",type:"dtype"},{tfName:"element_shape",name:"elementShape",type:"shape"},{tfName:"dynamic_size",name:"dynamicSize",type:"bool"},{tfName:"clear_after_read",name:"clearAfterRead",type:"bool"},{tfName:"identical_element_shapes",name:"identicalElementShapes",type:"bool"},{tfName:"tensor_array_name",name:"name",type:"string"}]},{tfOpName:"TensorArrayWriteV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"},{start:1,name:"index",type:"number"},{start:2,name:"tensor",type:"tensor"},{start:3,name:"flowIn",type:"number"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"TensorArrayReadV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"},{start:1,name:"index",type:"number"},{start:2,name:"flowIn",type:"number"}],attrs:[{tfName:"dtype",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"TensorArrayGatherV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"},{start:1,name:"indices",type:"number[]"},{start:2,name:"flowIn",type:"number"}],attrs:[{tfName:"dtype",name:"dtype",type:"dtype"},{tfName:"element_shape",name:"elementShape",type:"shape"}]},{tfOpName:"TensorArrayScatterV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"},{start:1,name:"indices",type:"number[]"},{start:2,name:"tensor",type:"tensor"},{start:3,name:"flowIn",type:"number"}],attrs:[{tfName:"T",name:"dtype",type:"dtype"}]},{tfOpName:"TensorArrayConcatV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"},{start:1,name:"flowIn",type:"number"}],attrs:[{tfName:"dtype",name:"dtype",type:"dtype"},{tfName:"element_shape_except0",name:"elementShapeExcept0",type:"shape",notSupported:!0}]},{tfOpName:"TensorArraySplitV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"},{start:1,name:"tensor",type:"tensor"},{start:2,name:"lengths",type:"number[]"},{start:3,name:"flowIn",type:"number"}],attrs:[{tfName:"T",name:"dtype",type:"dtype"}]},{tfOpName:"TensorArraySizeV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"},{start:1,name:"flowIn",type:"number"}]},{tfOpName:"TensorArrayCloseV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"}]},{tfOpName:"StatelessIf",category:"control",inputs:[{start:0,name:"cond",type:"tensor"},{start:1,end:0,name:"args",type:"tensors"}],attrs:[{tfName:"then_branch",name:"thenBranch",type:"func"},{tfName:"else_branch",name:"elseBranch",type:"func"}]},{tfOpName:"If",category:"control",inputs:[{start:0,name:"cond",type:"tensor"},{start:1,end:0,name:"args",type:"tensors"}],attrs:[{tfName:"then_branch",name:"thenBranch",type:"func"},{tfName:"else_branch",name:"elseBranch",type:"func"}]},{tfOpName:"StatelessWhile",category:"control",inputs:[{start:0,end:0,name:"args",type:"tensors"}],attrs:[{tfName:"cond",name:"cond",type:"func"},{tfName:"body",name:"body",type:"func"}]},{tfOpName:"While",category:"control",inputs:[{start:0,end:0,name:"args",type:"tensors"}],attrs:[{tfName:"cond",name:"cond",type:"func"},{tfName:"body",name:"body",type:"func"}]},{tfOpName:"TensorListScatter",category:"control",inputs:[{start:0,name:"tensor",type:"tensor"},{start:1,name:"indices",type:"number[]"},{start:2,name:"elementShape",type:"shape"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListScatterV2",category:"control",inputs:[{start:0,name:"tensor",type:"tensor"},{start:1,name:"indices",type:"number[]"},{start:2,name:"elementShape",type:"shape"},{start:3,name:"numElements",type:"number"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListGather",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"},{start:1,name:"indices",type:"number[]"},{start:2,name:"elementShape",type:"shape"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListGetItem",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"},{start:1,name:"index",type:"number"},{start:2,name:"elementShape",type:"shape"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListSetItem",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"},{start:1,name:"index",type:"number"},{start:2,name:"tensor",type:"tensor"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListReserve",category:"control",inputs:[{start:0,name:"elementShape",type:"shape"},{start:1,name:"numElements",type:"number"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListFromTensor",category:"control",inputs:[{start:0,name:"tensor",type:"tensor"},{start:1,name:"elementShape",type:"shape"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListStack",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"},{start:1,name:"elementShape",type:"shape"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"},{tfName:"num_elements",name:"numElements",type:"dtype"}]},{tfOpName:"TensorListSplit",category:"control",inputs:[{start:0,name:"tensor",type:"tensor"},{start:1,name:"elementShape",type:"shape"},{start:2,name:"lengths",type:"number[]"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListConcat",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"}],attrs:[{tfName:"element_shape",name:"elementShape",type:"shape"},{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListConcatV2",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"}],attrs:[{tfName:"element_shape",name:"elementShape",type:"shape"},{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListPopBack",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"},{start:1,name:"elementShape",type:"shape"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListPushBack",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"},{start:1,name:"tensor",type:"tensor"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListLength",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"}]},{tfOpName:"TensorListResize",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"},{start:1,name:"size",type:"number"}]}],eS={};qe(eS,{json:()=>qj});var qj=[{tfOpName:"AvgPool",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0},{tfName:"ksize",name:"kernelSize",type:"number[]"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"MaxPool",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0},{tfName:"ksize",name:"kernelSize",type:"number[]"},{tfName:"explicit_paddings",name:"explicitPaddings",type:"number[]",defaultValue:[],notSupported:!0},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"MaxPoolWithArgmax",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"ksize",name:"kernelSize",type:"number[]"},{tfName:"include_batch_in_index",name:"includeBatchInIndex",type:"bool"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"AvgPool3D",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0},{tfName:"ksize",name:"kernelSize",type:"number[]"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"MaxPool3D",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0},{tfName:"ksize",name:"kernelSize",type:"number[]"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Conv1D",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"filter",type:"tensor"}],attrs:[{tfName:"stride",name:"stride",type:"number"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",defaultValue:"NWC"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"dilation",name:"dilation",type:"number",defaultValue:1}]},{tfOpName:"Conv2D",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"filter",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"useCudnnOnGpu",name:"useCudnnOnGpu",type:"bool"},{tfName:"data_format",name:"dataFormat",type:"string",defaultValue:"NHWC"},{tfName:"explicit_paddings",name:"explicitPaddings",type:"number[]",defaultValue:[]},{tfName:"dilations",name:"dilations",type:"number[]"}]},{tfOpName:"_FusedConv2D",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"filter",type:"tensor"},{start:2,end:0,name:"args",type:"tensors"}],attrs:[{tfName:"num_args",name:"numArgs",type:"number"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"explicit_paddings",name:"explicitPaddings",type:"number[]",defaultValue:[]},{tfName:"use_cudnn_on_gpu",name:"useCudnnOnGpu",type:"bool",defaultValue:!0},{tfName:"data_format",name:"dataFormat",type:"string",defaultValue:"NHWC"},{tfName:"dilations",name:"dilations",type:"number[]",defaultValue:[1,1,1,1]},{tfName:"fused_ops",name:"fusedOps",type:"string[]",defaultValue:[]},{tfName:"epsilon",name:"epsilon",type:"number",defaultValue:1e-4},{tfName:"leakyrelu_alpha",name:"leakyreluAlpha",type:"number",defaultValue:.2}]},{tfOpName:"Conv2DBackpropInput",category:"convolution",inputs:[{start:2,name:"x",type:"tensor"},{start:1,name:"filter",type:"tensor"},{start:0,name:"outputShape",type:"number[]"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0},{tfName:"explicit_paddings",name:"explicitPaddings",type:"number[]",defaultValue:[]},{tfName:"dilations",name:"dilations",type:"number[]",notSupported:!0}]},{tfOpName:"DepthwiseConv2d",category:"convolution",inputs:[{start:0,name:"input",type:"tensor"},{start:1,name:"filter",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",defaultValue:"NHWC"},{tfName:"explicit_paddings",name:"explicitPaddings",type:"number[]",defaultValue:[]},{tfName:"dilations",name:"dilations",type:"number[]"}]},{tfOpName:"DepthwiseConv2dNative",category:"convolution",inputs:[{start:0,name:"input",type:"tensor"},{start:1,name:"filter",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",defaultValue:"NHWC"},{tfName:"explicit_paddings",name:"explicitPaddings",type:"number[]",defaultValue:[]},{tfName:"dilations",name:"dilations",type:"number[]"}]},{tfOpName:"FusedDepthwiseConv2dNative",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"filter",type:"tensor"},{start:2,end:0,name:"args",type:"tensors"}],attrs:[{tfName:"num_args",name:"numArgs",type:"number"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",defaultValue:"NHWC"},{tfName:"dilations",name:"dilations",type:"number[]",defaultValue:[1,1,1,1]},{tfName:"fused_ops",name:"fusedOps",type:"string[]",defaultValue:[]},{tfName:"explicit_paddings",name:"explicitPaddings",type:"number[]",defaultValue:[]}]},{tfOpName:"Conv3D",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"filter",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",defaultValue:"NHWC"},{tfName:"dilations",name:"dilations",type:"number[]"}]},{tfOpName:"Dilation2D",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"filter",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"rates",name:"dilations",type:"number[]"},{tfName:"padding",name:"pad",type:"string"}]}],tS={};qe(tS,{json:()=>Xj});var Xj=[{tfOpName:"Fill",category:"creation",inputs:[{start:0,name:"shape",type:"number[]"},{start:1,name:"value",type:"number"}],attrs:[{tfName:"T",name:"dtype",type:"dtype"}]},{tfOpName:"LinSpace",category:"creation",inputs:[{start:0,name:"start",type:"number"},{start:1,name:"stop",type:"number"},{start:2,name:"num",type:"number"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"OneHot",category:"creation",inputs:[{start:0,name:"indices",type:"tensor"},{start:1,name:"depth",type:"number"},{start:2,name:"onValue",type:"number",defaultValue:1},{start:3,name:"offValue",type:"number",defaultValue:0}],attrs:[{tfName:"axis",name:"axis",type:"number",notSupported:!0},{tfName:"T",name:"dtype",type:"dtype"}]},{tfOpName:"Ones",category:"creation",inputs:[{start:0,name:"shape",type:"number[]"}],attrs:[{tfName:"T",name:"dtype",type:"dtype"}]},{tfOpName:"OnesLike",category:"creation",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"dtype",name:"dtype",type:"dtype"}]},{tfOpName:"RandomStandardNormal",category:"creation",inputs:[{start:0,name:"shape",type:"number[]"}],attrs:[{tfName:"seed",name:"seed",type:"number",defaultValue:0},{tfName:"seed2",name:"seed2",type:"number",defaultValue:0,notSupported:!0},{tfName:"dtype",name:"dtype",type:"dtype"},{tfName:"T",name:"T",type:"number",notSupported:!0}]},{tfOpName:"RandomUniform",category:"creation",inputs:[{start:0,name:"shape",type:"number[]"}],attrs:[{tfName:"minval",name:"minval",type:"number",defaultValue:0},{tfName:"maxval",name:"maxval",type:"number",defaultValue:1},{tfName:"dtype",name:"dtype",type:"dtype"},{tfName:"seed",name:"seed",type:"number",defaultValue:0},{tfName:"seed2",name:"seed2",type:"number",defaultValue:0,notSupported:!0},{tfName:"T",name:"T",type:"number",notSupported:!0}]},{tfOpName:"Range",category:"creation",inputs:[{start:0,name:"start",type:"number"},{start:1,name:"stop",type:"number"},{start:2,name:"step",type:"number",defaultValue:0}],attrs:[{tfName:"Tidx",name:"dtype",type:"dtype"}]},{tfOpName:"TruncatedNormal",category:"creation",inputs:[{start:0,name:"shape",type:"number[]"}],attrs:[{tfName:"means",name:"mean",type:"number",defaultValue:0},{tfName:"stddev",name:"stdDev",type:"number",defaultValue:1},{tfName:"seed",name:"seed",type:"number"},{tfName:"seed2",name:"seed2",type:"number",defaultValue:0,notSupported:!0},{tfName:"dtype",name:"dtype",type:"dtype"},{tfName:"T",name:"T",type:"number",notSupported:!0}]},{tfOpName:"Zeros",category:"creation",inputs:[{start:0,name:"shape",type:"number[]"}],attrs:[{tfName:"T",name:"dtype",type:"dtype"}]},{tfOpName:"ZerosLike",category:"creation",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype"}]},{tfOpName:"Multinomial",category:"creation",inputs:[{start:0,name:"logits",type:"tensor"},{start:1,name:"numSamples",type:"number"}],attrs:[{tfName:"seed",name:"seed",type:"number"},{tfName:"seed2",name:"seed2",type:"number"},{tfName:"T",name:"dtype",type:"dtype"},{tfName:"output_dtype",name:"output_dtype",type:"dtype"}]}],nS={};qe(nS,{json:()=>Kj});var Kj=[{tfOpName:"NonMaxSuppressionV2",category:"dynamic",inputs:[{start:0,name:"boxes",type:"tensor"},{start:1,name:"scores",type:"tensor"},{start:2,name:"maxOutputSize",type:"number"},{start:3,name:"iouThreshold",type:"number"}]},{tfOpName:"NonMaxSuppressionV3",category:"dynamic",inputs:[{start:0,name:"boxes",type:"tensor"},{start:1,name:"scores",type:"tensor"},{start:2,name:"maxOutputSize",type:"number"},{start:3,name:"iouThreshold",type:"number"},{start:4,name:"scoreThreshold",type:"number"}]},{tfOpName:"NonMaxSuppressionV4",category:"dynamic",inputs:[{start:0,name:"boxes",type:"tensor"},{start:1,name:"scores",type:"tensor"},{start:2,name:"maxOutputSize",type:"number"},{start:3,name:"iouThreshold",type:"number"},{start:4,name:"scoreThreshold",type:"number"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"T_threshold",name:"threshold",type:"dtype",notSupported:!0},{tfName:"pad_to_max_output_size",name:"padToMaxOutputSize",type:"bool"}]},{tfOpName:"NonMaxSuppressionV5",category:"dynamic",inputs:[{start:0,name:"boxes",type:"tensor"},{start:1,name:"scores",type:"tensor"},{start:2,name:"maxOutputSize",type:"number"},{start:3,name:"iouThreshold",type:"number"},{start:4,name:"scoreThreshold",type:"number"},{start:5,name:"softNmsSigma",type:"number"}]},{tfOpName:"Where",category:"dynamic",inputs:[{start:0,name:"condition",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"ListDiff",category:"dynamic",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"y",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]}],sS={};qe(sS,{json:()=>Zj});var Zj=[{tfOpName:"LowerBound",category:"evaluation",inputs:[{start:0,name:"sortedSequence",type:"tensor"},{start:1,name:"values",type:"tensor"}]},{tfOpName:"TopKV2",category:"evaluation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"k",type:"number"}],attrs:[{tfName:"sorted",name:"sorted",type:"bool"}]},{tfOpName:"UpperBound",category:"evaluation",inputs:[{start:0,name:"sortedSequence",type:"tensor"},{start:1,name:"values",type:"tensor"}]},{tfOpName:"Unique",category:"evaluation",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"UniqueV2",category:"evaluation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number"}]}],rS={};qe(rS,{json:()=>Yj});var Yj=[{tfOpName:"PlaceholderWithDefault",category:"graph",inputs:[{start:0,name:"default",type:"tensor"}],attrs:[{tfName:"shape",name:"shape",type:"shape"},{tfName:"dtype",name:"dtype",type:"dtype"}]},{tfOpName:"Placeholder",category:"graph",attrs:[{tfName:"shape",name:"shape",type:"shape"},{tfName:"dtype",name:"dtype",type:"dtype"}]},{tfOpName:"Const",category:"graph"},{tfOpName:"Identity",category:"graph",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"IdentityN",category:"graph",inputs:[{start:0,end:0,name:"x",type:"tensors"}]},{tfOpName:"Snapshot",category:"graph",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"Rank",category:"graph",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"Size",category:"graph",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"Shape",category:"graph",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"ShapeN",category:"graph",inputs:[{start:0,end:0,name:"x",type:"tensors"}]},{tfOpName:"Print",category:"graph",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"data",type:"tensors"}],attrs:[{tfName:"message",name:"message",type:"string"},{tfName:"first_n",name:"firstN",type:"number",notSupported:!0},{tfName:"summarize",name:"summarize",type:"number",defaultValue:3}]},{tfOpName:"NoOp",category:"graph",inputs:[]},{tfOpName:"StopGradient",category:"graph",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"FakeQuantWithMinMaxVars",category:"graph",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"min",name:"min",type:"number"},{tfName:"max",name:"max",type:"number"}]}],aS={};qe(aS,{json:()=>Jj});var Jj=[{tfOpName:"HashTable",category:"hash_table",inputs:[],attrs:[{tfName:"shared_name",name:"sharedName",type:"string"},{tfName:"use_node_name_sharing",name:"useNodeNameSharing",type:"bool"},{tfName:"key_dtype",name:"keyDType",type:"dtype"},{tfName:"value_dtype",name:"valueDType",type:"dtype"}]},{tfOpName:"HashTableV2",category:"hash_table",inputs:[],attrs:[{tfName:"shared_name",name:"sharedName",type:"string"},{tfName:"use_node_name_sharing",name:"useNodeNameSharing",type:"bool"},{tfName:"key_dtype",name:"keyDType",type:"dtype"},{tfName:"value_dtype",name:"valueDType",type:"dtype"}]},{tfOpName:"LookupTableImport",category:"hash_table",inputs:[{start:0,name:"tableHandle",type:"tensor"},{start:1,name:"keys",type:"tensor"},{start:2,name:"values",type:"tensor"}],attrs:[{tfName:"Tin",name:"tIn",type:"dtype",notSupported:!0},{tfName:"Tout",name:"tOut",type:"dtype",notSupported:!0}]},{tfOpName:"LookupTableImportV2",category:"hash_table",inputs:[{start:0,name:"tableHandle",type:"tensor"},{start:1,name:"keys",type:"tensor"},{start:2,name:"values",type:"tensor"}],attrs:[{tfName:"Tin",name:"tIn",type:"dtype",notSupported:!0},{tfName:"Tout",name:"tOut",type:"dtype",notSupported:!0}]},{tfOpName:"LookupTableFind",category:"hash_table",inputs:[{start:0,name:"tableHandle",type:"tensor"},{start:1,name:"keys",type:"tensor"},{start:2,name:"defaultValue",type:"tensor"}],attrs:[{tfName:"Tin",name:"tIn",type:"dtype",notSupported:!0},{tfName:"Tout",name:"tOut",type:"dtype",notSupported:!0}]},{tfOpName:"LookupTableFindV2",category:"hash_table",inputs:[{start:0,name:"tableHandle",type:"tensor"},{start:1,name:"keys",type:"tensor"},{start:2,name:"defaultValue",type:"tensor"}],attrs:[{tfName:"Tin",name:"tIn",type:"dtype",notSupported:!0},{tfName:"Tout",name:"tOut",type:"dtype",notSupported:!0}]},{tfOpName:"LookupTableSize",category:"hash_table",inputs:[{start:0,name:"tableHandle",type:"tensor"}]},{tfOpName:"LookupTableSizeV2",category:"hash_table",inputs:[{start:0,name:"tableHandle",type:"tensor"}]}],oS={};qe(oS,{json:()=>Qj});var Qj=[{tfOpName:"ResizeBilinear",category:"image",inputs:[{start:0,name:"images",type:"tensor"},{start:1,name:"size",type:"number[]"}],attrs:[{tfName:"align_corners",name:"alignCorners",type:"bool"},{tfName:"half_pixel_centers",name:"halfPixelCenters",type:"bool"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"ResizeNearestNeighbor",category:"image",inputs:[{start:0,name:"images",type:"tensor"},{start:1,name:"size",type:"number[]"}],attrs:[{tfName:"align_corners",name:"alignCorners",type:"bool"},{tfName:"half_pixel_centers",name:"halfPixelCenters",type:"bool"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"CropAndResize",category:"image",inputs:[{start:0,name:"image",type:"tensor"},{start:1,name:"boxes",type:"tensor"},{start:2,name:"boxInd",type:"tensor"},{start:3,name:"cropSize",type:"number[]"}],attrs:[{tfName:"method",name:"method",type:"string"},{tfName:"extrapolation_value",name:"extrapolationValue",type:"number"}]},{tfOpName:"ImageProjectiveTransformV3",category:"image",inputs:[{start:0,name:"images",type:"tensor"},{start:1,name:"transforms",type:"tensor"},{start:2,name:"outputShape",type:"number[]"},{start:3,name:"fillValue",type:"number"}],attrs:[{tfName:"interpolation",name:"interpolation",type:"string"},{tfName:"fill_mode",name:"fillMode",type:"string"}]}],iS={};qe(iS,{json:()=>eq});var eq=[{tfOpName:"Equal",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"NotEqual",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Greater",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"GreaterEqual",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Less",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"LessEqual",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"LogicalAnd",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"LogicalNot",category:"logical",inputs:[{start:0,name:"a",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"LogicalOr",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Select",category:"logical",inputs:[{start:0,name:"condition",type:"tensor"},{start:1,name:"a",type:"tensor"},{start:2,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"SelectV2",category:"logical",inputs:[{start:0,name:"condition",type:"tensor"},{start:1,name:"a",type:"tensor"},{start:2,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]}],lS={};qe(lS,{json:()=>tq});var tq=[{tfOpName:"_FusedMatMul",category:"matrices",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"},{start:2,end:0,name:"args",type:"tensors"}],attrs:[{tfName:"num_args",name:"numArgs",type:"number"},{tfName:"fused_ops",name:"fusedOps",type:"string[]",defaultValue:[]},{tfName:"epsilon",name:"epsilon",type:"number",defaultValue:1e-4},{tfName:"transpose_a",name:"transposeA",type:"bool",defaultValue:!1},{tfName:"transpose_b",name:"transposeB",type:"bool",defaultValue:!1},{tfName:"leakyrelu_alpha",name:"leakyreluAlpha",type:"number",defaultValue:.2},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"MatMul",category:"matrices",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"transpose_a",name:"transposeA",type:"bool",defaultValue:!1},{tfName:"transpose_b",name:"transposeB",type:"bool",defaultValue:!1},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"BatchMatMul",category:"matrices",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"adj_x",name:"transposeA",type:"bool",defaultValue:!1},{tfName:"adj_y",name:"transposeB",type:"bool",defaultValue:!1},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"BatchMatMulV2",category:"matrices",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"adj_x",name:"transposeA",type:"bool",defaultValue:!1},{tfName:"adj_y",name:"transposeB",type:"bool",defaultValue:!1},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Transpose",category:"matrices",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"perm",type:"number[]"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Einsum",category:"matrices",inputs:[{start:0,end:0,name:"tensors",type:"tensors"}],attrs:[{tfName:"equation",name:"equation",type:"string"},{tfName:"N",name:"n",type:"number",defaultValue:2},{tfName:"T",name:"dtype",type:"dtype"}]}],uS={};qe(uS,{json:()=>nq});var nq=[{tfOpName:"EuclideanNorm",category:"normalization",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool",defaultValue:!1}]},{tfOpName:"FusedBatchNorm",category:"normalization",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"scale",type:"tensor"},{start:2,name:"offset",type:"tensor"},{start:3,name:"mean",type:"tensor"},{start:4,name:"variance",type:"tensor"}],attrs:[{tfName:"epsilon",name:"epsilon",type:"number",defaultValue:.001},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0}]},{tfOpName:"FusedBatchNormV2",category:"normalization",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"scale",type:"tensor"},{start:2,name:"offset",type:"tensor"},{start:3,name:"mean",type:"tensor"},{start:4,name:"variance",type:"tensor"}],attrs:[{tfName:"epsilon",name:"epsilon",type:"number",defaultValue:.001},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0}]},{tfOpName:"FusedBatchNormV3",category:"normalization",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"scale",type:"tensor"},{start:2,name:"offset",type:"tensor"},{start:3,name:"mean",type:"tensor"},{start:4,name:"variance",type:"tensor"}],attrs:[{tfName:"epsilon",name:"epsilon",type:"number",defaultValue:.001},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0}]},{tfOpName:"LRN",category:"normalization",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"depth_radius",name:"radius",type:"number",defaultValue:5},{tfName:"bias",name:"bias",type:"number",defaultValue:1},{tfName:"alpha",name:"alpha",type:"number",defaultValue:1},{tfName:"beta",name:"beta",type:"number",defaultValue:.5}]},{tfOpName:"Softmax",category:"normalization",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"LogSoftmax",category:"normalization",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"SparseToDense",category:"normalization",inputs:[{start:0,name:"sparseIndices",type:"tensor"},{start:1,name:"outputShape",type:"number[]"},{start:2,name:"sparseValues",type:"tensor"},{start:3,name:"defaultValue",type:"tensor"}],attrs:[{tfName:"validate_indices",name:"validateIndices",type:"bool",defaultValue:!0,notSupported:!0}]}],cS={};qe(cS,{json:()=>sq});var sq=[{tfOpName:"Bincount",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"size",type:"number"},{start:2,name:"weights",type:"tensor"}]},{tfOpName:"DenseBincount",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"size",type:"number"},{start:2,name:"weights",type:"tensor"}],attrs:[{tfName:"binary_output",name:"binaryOutput",type:"bool"}]},{tfOpName:"Max",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool"}]},{tfOpName:"Mean",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool"}]},{tfOpName:"Min",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool"}]},{tfOpName:"Sum",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool"}]},{tfOpName:"All",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool"}]},{tfOpName:"Any",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool"}]},{tfOpName:"ArgMax",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number"}]},{tfOpName:"ArgMin",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number"}]},{tfOpName:"Prod",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool"}]},{tfOpName:"Cumprod",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number"}],attrs:[{tfName:"exclusive",name:"exclusive",type:"bool"},{tfName:"reverse",name:"reverse",type:"bool"}]},{tfOpName:"Cumsum",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number"}],attrs:[{tfName:"exclusive",name:"exclusive",type:"bool"},{tfName:"reverse",name:"reverse",type:"bool"}]}],dS={};qe(dS,{json:()=>rq});var rq=[{tfOpName:"ConcatV2",category:"slice_join",inputs:[{start:0,end:-1,name:"tensors",type:"tensors"},{start:-1,name:"axis",type:"number"}],attrs:[{tfName:"N",name:"n",type:"number",defaultValue:2}]},{tfOpName:"Concat",category:"slice_join",inputs:[{start:1,end:0,name:"tensors",type:"tensors"},{start:0,name:"axis",type:"number"}],attrs:[{tfName:"N",name:"n",type:"number",defaultValue:2}]},{tfOpName:"GatherV2",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"indices",type:"tensor"},{start:2,name:"axis",type:"number",defaultValue:0}],attrs:[{tfName:"batch_dims",name:"batchDims",type:"number",defaultValue:0}]},{tfOpName:"Gather",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"indices",type:"tensor"}],attrs:[{tfName:"validate_indices",name:"validateIndices",type:"bool",notSupported:!0}]},{tfOpName:"Reverse",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"dims",type:"bool[]"}]},{tfOpName:"ReverseV2",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}]},{tfOpName:"Slice",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"begin",type:"number[]"},{start:2,name:"size",type:"number[]"}]},{tfOpName:"StridedSlice",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"begin",type:"number[]"},{start:2,name:"end",type:"number[]"},{start:3,name:"strides",type:"number[]"}],attrs:[{tfName:"begin_mask",name:"beginMask",type:"number",defaultValue:0},{tfName:"end_mask",name:"endMask",type:"number",defaultValue:0},{tfName:"new_axis_mask",name:"newAxisMask",type:"number",defaultValue:0},{tfName:"ellipsis_mask",name:"ellipsisMask",type:"number",defaultValue:0},{tfName:"shrink_axis_mask",name:"shrinkAxisMask",type:"number",defaultValue:0}]},{tfOpName:"Pack",category:"slice_join",inputs:[{start:0,end:0,name:"tensors",type:"tensors"}],attrs:[{tfName:"axis",name:"axis",type:"number",defaultValue:0}]},{tfOpName:"Unpack",category:"slice_join",inputs:[{start:0,name:"tensor",type:"tensor"}],attrs:[{tfName:"axis",name:"axis",type:"number",defaultValue:0},{tfName:"num",name:"num",type:"number",defaultValue:0,notSupported:!0}]},{tfOpName:"Tile",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"reps",type:"number[]"}]},{tfOpName:"Split",category:"slice_join",inputs:[{start:0,name:"axis",type:"number",defaultValue:0},{start:1,name:"x",type:"tensor"}],attrs:[{tfName:"num_split",name:"numOrSizeSplits",type:"number",defaultValue:1}]},{tfOpName:"SplitV",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"numOrSizeSplits",type:"number[]"},{start:2,name:"axis",type:"number",defaultValue:0}]},{tfOpName:"ScatterNd",category:"slice_join",inputs:[{start:0,name:"indices",type:"tensor"},{start:1,name:"values",type:"tensor"},{start:2,name:"shape",type:"number[]"}]},{tfOpName:"GatherNd",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"indices",type:"tensor"}]},{tfOpName:"SparseToDense",category:"slice_join",inputs:[{start:0,name:"sparseIndices",type:"tensor"},{start:1,name:"outputShape",type:"number[]"},{start:2,name:"sparseValues",type:"tensor"},{start:3,name:"defaultValue",type:"tensor"}],attrs:[{tfName:"validate_indices",name:"validateIndices",type:"bool",defaultValue:!1,notSupported:!0}]}],pS={};qe(pS,{json:()=>aq});var aq=[{tfOpName:"SparseFillEmptyRows",category:"sparse",inputs:[{start:0,name:"indices",type:"tensor"},{start:1,name:"values",type:"tensor"},{start:2,name:"denseShape",type:"tensor"},{start:3,name:"defaultValue",type:"tensor"}]},{tfOpName:"SparseReshape",category:"sparse",inputs:[{start:0,name:"inputIndices",type:"tensor"},{start:1,name:"inputShape",type:"tensor"},{start:2,name:"newShape",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"SparseSegmentMean",category:"sparse",inputs:[{start:0,name:"data",type:"tensor"},{start:1,name:"indices",type:"tensor"},{start:2,name:"segmentIds",type:"tensor"}]},{tfOpName:"SparseSegmentSum",category:"sparse",inputs:[{start:0,name:"data",type:"tensor"},{start:1,name:"indices",type:"tensor"},{start:2,name:"segmentIds",type:"tensor"}]}],hS={};qe(hS,{json:()=>oq});var oq=[{tfOpName:"FFT",category:"spectral",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"IFFT",category:"spectral",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"RFFT",category:"spectral",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"fft_length",type:"number",notSupported:!0}]},{tfOpName:"IRFFT",category:"spectral",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"fft_length",type:"number",notSupported:!0}]}],fS={};qe(fS,{json:()=>iq});var iq=[{tfOpName:"StringNGrams",category:"string",inputs:[{start:0,name:"data",type:"tensor"},{start:1,name:"dataSplits",type:"tensor"}],attrs:[{tfName:"separator",name:"separator",type:"string"},{tfName:"ngram_widths",name:"nGramWidths",type:"number[]"},{tfName:"left_pad",name:"leftPad",type:"string"},{tfName:"right_pad",name:"rightPad",type:"string"},{tfName:"pad_width",name:"padWidth",type:"number"},{tfName:"preserve_short_sequences",name:"preserveShortSequences",type:"bool"}],outputs:["ngrams","ngrams_splits"]},{tfOpName:"StringSplit",category:"string",inputs:[{start:0,name:"input",type:"tensor"},{start:1,name:"delimiter",type:"tensor"}],attrs:[{tfName:"skip_empty",name:"skipEmpty",type:"bool"}],outputs:["indices","values","shape"]},{tfOpName:"StringToHashBucketFast",category:"string",inputs:[{start:0,name:"input",type:"tensor"}],attrs:[{tfName:"num_buckets",name:"numBuckets",type:"number"}]}],mS={};qe(mS,{json:()=>lq});var lq=[{tfOpName:"Cast",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"SrcT",name:"sdtype",type:"dtype",notSupported:!0},{tfName:"DstT",name:"dtype",type:"dtype"}]},{tfOpName:"ExpandDims",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number"}]},{tfOpName:"MirrorPad",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"padding",type:"number[]"}],attrs:[{tfName:"mode",name:"mode",type:"string"}]},{tfOpName:"Pad",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"padding",type:"number[]"}],attrs:[{tfName:"constant_value",name:"constantValue",type:"number",defaultValue:0}]},{tfOpName:"PadV2",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"padding",type:"number[]"},{start:2,name:"constantValue",type:"number",defaultValue:0}]},{tfOpName:"Reshape",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"shape",type:"number[]"}]},{tfOpName:"Squeeze",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"axis",tfDeprecatedName:"squeeze_dims",name:"axis",type:"number[]"}]},{tfOpName:"SpaceToBatchND",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"blockShape",type:"number[]"},{start:2,name:"paddings",type:"number[]"}]},{tfOpName:"BatchToSpaceND",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"blockShape",type:"number[]"},{start:2,name:"crops",type:"number[]"}]},{tfOpName:"DepthToSpace",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"block_size",name:"blockSize",type:"number"},{tfName:"data_format",name:"dataFormat",type:"string"}]},{tfOpName:"BroadcastTo",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"shape",type:"number[]"}],attrs:[]},{tfOpName:"BroadcastArgs",category:"transformation",inputs:[{start:0,name:"s0",type:"tensor"},{start:1,name:"s1",type:"tensor"}],attrs:[]}],v7=class{static get Instance(){return this._instance||(this._instance=new this)}constructor(){let e=[Y8,J8,Q8,eS,tS,nS,sS,rS,aS,oS,iS,lS,uS,cS,dS,pS,hS,fS,mS],t=[].concat(...e.map(n=>n.json));this.opMappers=t.reduce((n,s)=>(n[s.tfOpName]=s,n),{})}transformGraph(e,t={}){let n=e.node,s=[],r=[],a=[],o=n.reduce((f,m)=>(f[m.name]=this.mapNode(m),m.op.startsWith("Placeholder")?s.push(f[m.name]):m.op==="Const"?r.push(f[m.name]):(m.input==null||m.input.length===0)&&a.push(f[m.name]),f),{}),i=[],l=[],u={},c={};t!=null&&(u=this.mapSignatureEntries(t.inputs),c=this.mapSignatureEntries(t.outputs));let p=Object.keys(o);p.forEach(f=>{let m=o[f];m.inputNames.forEach((g,y)=>{let[x,,A]=ta(g),b=o[x];if(b.outputs!=null){let w=b.outputs.indexOf(A);if(w!==-1){let k=`${x}:${w}`;m.inputNames[y]=k}}m.inputs.push(b),b.children.push(m)})}),Object.keys(c).length===0?p.forEach(f=>{let m=o[f];m.children.length===0&&l.push(m)}):Object.keys(c).forEach(f=>{let[m]=ta(f),g=o[m];g!=null&&(g.signatureKey=c[f],l.push(g))}),Object.keys(u).length>0?Object.keys(u).forEach(f=>{let[m]=ta(f),g=o[m];g&&(g.signatureKey=u[f],i.push(g))}):i=s;let d={};e.library!=null&&e.library.function!=null&&(d=e.library.function.reduce((f,m)=>(f[m.signature.name]=this.mapFunction(m),f),{}));let h={nodes:o,inputs:i,outputs:l,weights:r,placeholders:s,signature:t,functions:d};return a.length>0&&(h.initNodes=a),h}mapSignatureEntries(e){return Object.keys(e||{}).reduce((t,n)=>(t[e[n].name]=n,t),{})}mapNode(e){let t=Z8(e.op)||this.opMappers[e.op]||{};e.attr==null&&(e.attr={});let n={name:e.name,op:e.op,category:t.category,inputNames:(e.input||[]).map(s=>s.startsWith("^")?s.slice(1):s),inputs:[],children:[],inputParams:{},attrParams:{},rawAttrs:e.attr,outputs:t.outputs};return t.inputs!=null&&(n.inputParams=t.inputs.reduce((s,r)=>(s[r.name]={type:r.type,inputIndexStart:r.start,inputIndexEnd:r.end},s),{})),t.attrs!=null&&(n.attrParams=t.attrs.reduce((s,r)=>{let a=r.type,o;switch(r.type){case"string":o=ay(e.attr,r.tfName,r.defaultValue),o===void 0&&!!r.tfDeprecatedName&&(o=ay(e.attr,r.tfDeprecatedName,r.defaultValue));break;case"string[]":o=py(e.attr,r.tfName,r.defaultValue),o===void 0&&!!r.tfDeprecatedName&&(o=py(e.attr,r.tfDeprecatedName,r.defaultValue));break;case"number":o=iy(e.attr,r.tfName,r.defaultValue||0),o===void 0&&!!r.tfDeprecatedName&&(o=iy(e.attr,r.tfDeprecatedName,r.defaultValue));break;case"number[]":o=dy(e.attr,r.tfName,r.defaultValue),o===void 0&&!!r.tfDeprecatedName&&(o=dy(e.attr,r.tfDeprecatedName,r.defaultValue));break;case"bool":o=oy(e.attr,r.tfName,r.defaultValue),o===void 0&&!!r.tfDeprecatedName&&(o=oy(e.attr,r.tfDeprecatedName,r.defaultValue));break;case"bool[]":o=fy(e.attr,r.tfName,r.defaultValue),o===void 0&&!!r.tfDeprecatedName&&(o=fy(e.attr,r.tfDeprecatedName,r.defaultValue));break;case"shape":o=cy(e.attr,r.tfName,r.defaultValue),o===void 0&&!!r.tfDeprecatedName&&(o=cy(e.attr,r.tfDeprecatedName,r.defaultValue));break;case"shape[]":o=hy(e.attr,r.tfName,r.defaultValue),o===void 0&&!!r.tfDeprecatedName&&(o=hy(e.attr,r.tfDeprecatedName,r.defaultValue));break;case"dtype":o=ly(e.attr,r.tfName,r.defaultValue),o===void 0&&!!r.tfDeprecatedName&&(o=ly(e.attr,r.tfDeprecatedName,r.defaultValue));break;case"dtype[]":o=uy(e.attr,r.tfName,r.defaultValue),o===void 0&&!!r.tfDeprecatedName&&(o=uy(e.attr,r.tfDeprecatedName,r.defaultValue));break;case"func":o=w7(e.attr,r.tfName,r.defaultValue),o===void 0&&!!r.tfDeprecatedName&&(o=w7(e.attr,r.tfDeprecatedName,r.defaultValue));break;case"tensor":case"tensors":break;default:throw new Error(`Unsupported param type: ${r.type} for op: ${e.op}`)}return s[r.name]={value:o,type:a},s},{})),n}mapFunction(e){let t=e.nodeDef,n=[],s=[],r={};t!=null&&(r=t.reduce((c,p)=>(c[p.name]=this.mapNode(p),p.op==="Const"&&s.push(c[p.name]),c),{}));let a=[],o=[];e.signature.inputArg.forEach(c=>{let[p]=ta(c.name),d={name:p,op:"Placeholder",inputs:[],inputNames:[],category:"graph",inputParams:{},attrParams:{dtype:{value:zx(c.type),type:"dtype"}},children:[]};d.signatureKey=c.name,a.push(d),r[p]=d}),Object.keys(r).forEach(c=>{let p=r[c];p.inputNames.forEach((d,h)=>{let[f,,m]=ta(d),g=r[f];if(g.outputs!=null){let y=g.outputs.indexOf(m);if(y!==-1){let x=`${f}:${y}`;p.inputNames[h]=x}}p.inputs.push(g),g.children.push(p)})});let l=e.ret;e.signature.outputArg.forEach(c=>{let[p,d]=ta(l[c.name]),h=r[p];h!=null&&(h.defaultOutput=d,o.push(h))});let u=this.mapArgsToSignature(e);return{nodes:r,inputs:a,outputs:o,weights:s,placeholders:n,signature:u}}mapArgsToSignature(e){return{methodName:e.signature.name,inputs:e.signature.inputArg.reduce((t,n)=>(t[n.name]=this.mapArgToTensorInfo(n),t),{}),outputs:e.signature.outputArg.reduce((t,n)=>(t[n.name]=this.mapArgToTensorInfo(n,e.ret),t),{})}}mapArgToTensorInfo(e,t){let n=e.name;return t!=null&&(n=t[n]),{name:n,dtype:e.type}}};function uq(e){let t=H().global;if(typeof t.atob!="undefined")return t.atob(e);if(typeof Buffer!="undefined")return new Buffer(e,"base64").toString();throw new Error("Unable to decode base64 in this environment. Missing built-in atob() or Buffer()")}function gS(e,t){let n=Array.isArray(e)?String.fromCharCode.apply(null,e):uq(e);return t?n:n.toLowerCase()}function ay(e,t,n,s=!1){let r=e[t];return r!=null?gS(r.s,s):n}function oy(e,t,n){let s=e[t];return s?s.b:n}function iy(e,t,n){let s=e[t]||{},r=s.i!=null?s.i:s.f!=null?s.f:n;return typeof r=="number"?r:parseInt(r,10)}function zx(e){switch(typeof e=="string"&&(e=pr[e]),e){case pr.DT_FLOAT:case pr.DT_HALF:return"float32";case pr.DT_INT32:case pr.DT_INT64:case pr.DT_INT8:case pr.DT_UINT8:return"int32";case pr.DT_BOOL:return"bool";case pr.DT_DOUBLE:return"float32";case pr.DT_STRING:return"string";default:return null}}function w7(e,t,n){let s=e[t];return s&&s.func?s.func.name:n}function ly(e,t,n){let s=e[t];return s&&s.type?zx(s.type):n}function uy(e,t,n){let s=e[t];return s&&s.list&&s.list.type?s.list.type.map(r=>zx(r)):n}function yS(e){if(!e.unknownRank)return e.dim!=null?e.dim.map(t=>typeof t.size=="number"?t.size:parseInt(t.size,10)):[]}function cy(e,t,n){let s=e[t];return s&&s.shape?yS(s.shape):n}function dy(e,t,n){let s=e[t];return s?((s.list.f&&s.list.f.length?s.list.f:s.list.i)||[]).map(r=>typeof r=="number"?r:parseInt(r,10)):n}function py(e,t,n,s=!1){let r=e[t];return r&&r.list&&r.list.s?r.list.s.map(a=>gS(a,s)):n}function hy(e,t,n){let s=e[t];return s&&s.list&&s.list.shape?s.list.shape.map(r=>yS(r)):n}function fy(e,t,n){let s=e[t];return s&&s.list&&s.list.b?s.list.b:n}var cq=class{constructor(e,t,n){this.node=e,this.tensorMap=t,this.context=n,this.inputs=[],this.attrs={},this.inputs=e.inputNames.map(s=>this.getInput(s)),e.rawAttrs!=null&&(this.attrs=Object.keys(e.rawAttrs).reduce((s,r)=>(s[r]=this.getAttr(r),s),{}))}getInput(e){return ls(e,this.tensorMap,this.context)}getAttr(e,t){let n=this.node.rawAttrs[e];if(n.tensor!=null)return ls(e,this.tensorMap,this.context);if(n.i!=null||n.f!=null)return iy(this.node.rawAttrs,e,t);if(n.s!=null)return ay(this.node.rawAttrs,e,t);if(n.b!=null)return oy(this.node.rawAttrs,e,t);if(n.shape!=null)return cy(this.node.rawAttrs,e,t);if(n.type!=null)return ly(this.node.rawAttrs,e,t);if(n.list!=null){if(n.list.i!=null||n.list.f!=null)return dy(this.node.rawAttrs,e,t);if(n.list.s!=null)return py(this.node.rawAttrs,e,t);if(n.list.shape!=null)return hy(this.node.rawAttrs,e,t);if(n.list.b!=null)return fy(this.node.rawAttrs,e,t);if(n.list.type!=null)return uy(this.node.rawAttrs,e,t)}return t}},Ln={};qe(Ln,{OP_SCOPE_SUFFIX:()=>Hy,abs:()=>an,acos:()=>uA,acosh:()=>cA,add:()=>de,addN:()=>N0,all:()=>E0,any:()=>_p,argMax:()=>Ms,argMin:()=>dA,asin:()=>pA,asinh:()=>hA,atan:()=>fA,atan2:()=>mA,atanh:()=>gA,avgPool:()=>yh,avgPool3d:()=>AA,basicLSTMCell:()=>Tw,batchNorm:()=>Qc,batchNorm2d:()=>xA,batchNorm3d:()=>bA,batchNorm4d:()=>vA,batchToSpaceND:()=>Ah,bincount:()=>wA,booleanMaskAsync:()=>uk,broadcastArgs:()=>Nw,broadcastTo:()=>nl,buffer:()=>Ue,cast:()=>ge,ceil:()=>kA,clipByValue:()=>ws,clone:()=>Gn,complex:()=>Ta,concat:()=>ct,concat1d:()=>SA,concat2d:()=>cu,concat3d:()=>IA,concat4d:()=>CA,conv1d:()=>R0,conv2d:()=>Na,conv2dTranspose:()=>_0,conv3d:()=>NA,conv3dTranspose:()=>EA,cos:()=>xh,cosh:()=>D0,cosineWindow:()=>e2,cumprod:()=>Dp,cumsum:()=>$0,denseBincount:()=>Rw,depthToSpace:()=>RA,depthwiseConv2d:()=>ed,diag:()=>_w,dilation2d:()=>_A,div:()=>ye,divNoNan:()=>DA,dot:()=>$A,dropout:()=>a5,einsum:()=>Dw,elu:()=>td,enclosingPowerOfTwo:()=>o5,equal:()=>zs,erf:()=>PA,euclideanNorm:()=>MA,exp:()=>Ls,expandDims:()=>Ft,expm1:()=>zA,eye:()=>P0,fft:()=>Nh,fill:()=>ca,floor:()=>sd,floorDiv:()=>Jc,fused:()=>gc,gather:()=>rd,gatherND:()=>hk,greater:()=>Is,greaterEqual:()=>mi,ifft:()=>mc,imag:()=>mh,image:()=>Ce,inTopKAsync:()=>fk,irfft:()=>Z0,isFinite:()=>LA,isInf:()=>BA,isNaN:()=>WA,leakyRelu:()=>bh,less:()=>F0,lessEqual:()=>gi,linalg:()=>u5,linspace:()=>Mw,localResponseNormalization:()=>VA,log:()=>Bs,log1p:()=>vh,logSigmoid:()=>UA,logSoftmax:()=>M0,logSumExp:()=>z0,logicalAnd:()=>gr,logicalNot:()=>wh,logicalOr:()=>L0,logicalXor:()=>GA,losses:()=>Ck,lowerBound:()=>Lw,matMul:()=>rt,max:()=>xn,maxPool:()=>kh,maxPool3d:()=>HA,maxPoolWithArgmax:()=>Bw,maximum:()=>da,mean:()=>Ut,meshgrid:()=>Ww,min:()=>Ea,minimum:()=>ad,mirrorPad:()=>jA,mod:()=>pu,moments:()=>Sh,movingAverage:()=>ck,mul:()=>z,multiRNNCell:()=>Vw,multinomial:()=>Uw,neg:()=>Pt,norm:()=>nd,notEqual:()=>dl,oneHot:()=>pc,ones:()=>Os,onesLike:()=>Ws,op:()=>W,outerProduct:()=>Gw,pad:()=>ar,pad1d:()=>Hw,pad2d:()=>jw,pad3d:()=>qw,pad4d:()=>Xw,pool:()=>qA,pow:()=>Ra,prelu:()=>Ch,print:()=>Ky,prod:()=>XA,raggedTensorToTensor:()=>Kw,rand:()=>Zw,randomGamma:()=>Yw,randomNormal:()=>W0,randomStandardNormal:()=>Jw,randomUniform:()=>od,range:()=>fc,real:()=>hc,reciprocal:()=>YA,relu:()=>Gr,relu6:()=>V0,reshape:()=>V,reverse:()=>nr,reverse1d:()=>Qw,reverse2d:()=>ek,reverse3d:()=>tk,reverse4d:()=>nk,rfft:()=>Eh,round:()=>U0,rsqrt:()=>G0,scalar:()=>Te,scatterND:()=>dk,searchSorted:()=>B0,selu:()=>H0,separableConv2d:()=>j0,setdiff1dAsync:()=>sk,sigmoid:()=>On,sign:()=>JA,signal:()=>Ik,sin:()=>q0,sinh:()=>X0,slice:()=>Le,slice1d:()=>Th,slice2d:()=>K0,slice3d:()=>yi,slice4d:()=>uo,softmax:()=>hu,softplus:()=>du,spaceToBatchND:()=>Ih,sparse:()=>Tk,sparseToDense:()=>pk,spectral:()=>Sk,split:()=>qt,sqrt:()=>zn,square:()=>wt,squaredDifference:()=>Y0,squeeze:()=>Ke,stack:()=>un,step:()=>fu,stridedSlice:()=>QA,string:()=>Nk,sub:()=>Ae,sum:()=>Se,tan:()=>e5,tanh:()=>ul,tensor:()=>Xe,tensor1d:()=>Ot,tensor2d:()=>mr,tensor3d:()=>tA,tensor4d:()=>rk,tensor5d:()=>ak,tensor6d:()=>ok,tile:()=>bs,topk:()=>t5,transpose:()=>at,truncatedNormal:()=>J0,unique:()=>n5,unsortedSegmentSum:()=>Q0,unstack:()=>wn,upperBound:()=>ik,variable:()=>s5,where:()=>jn,whereAsync:()=>r5,zeros:()=>Gt,zerosLike:()=>dt});var dq=(e,t,n,s=Ln)=>{switch(e.op){case"BiasAdd":case"AddV2":case"Add":return[s.add(I("a",e,t,n),I("b",e,t,n))];case"AddN":return[s.addN(I("tensors",e,t,n))];case"FloorMod":case"Mod":return[s.mod(I("a",e,t,n),I("b",e,t,n))];case"Mul":return[s.mul(I("a",e,t,n),I("b",e,t,n))];case"RealDiv":case"Div":return[s.div(I("a",e,t,n),I("b",e,t,n))];case"DivNoNan":return[s.divNoNan(I("a",e,t,n),I("b",e,t,n))];case"FloorDiv":return[s.floorDiv(I("a",e,t,n),I("b",e,t,n))];case"Sub":return[s.sub(I("a",e,t,n),I("b",e,t,n))];case"Minimum":return[s.minimum(I("a",e,t,n),I("b",e,t,n))];case"Maximum":return[s.maximum(I("a",e,t,n),I("b",e,t,n))];case"Pow":return[s.pow(I("a",e,t,n),I("b",e,t,n))];case"SquaredDifference":return[s.squaredDifference(I("a",e,t,n),I("b",e,t,n))];default:throw TypeError(`Node type ${e.op} is not implemented`)}},pq=(e,t,n,s=Ln)=>{switch(e.op){case"Abs":case"ComplexAbs":return[s.abs(I("x",e,t,n))];case"Acos":return[s.acos(I("x",e,t,n))];case"Acosh":return[s.acosh(I("x",e,t,n))];case"Asin":return[s.asin(I("x",e,t,n))];case"Asinh":return[s.asinh(I("x",e,t,n))];case"Atan":return[s.atan(I("x",e,t,n))];case"Atan2":return[s.atan2(I("x",e,t,n),I("y",e,t,n))];case"Atanh":return[s.atanh(I("x",e,t,n))];case"Ceil":return[s.ceil(I("x",e,t,n))];case"Complex":return[s.complex(I("real",e,t,n),I("imag",e,t,n))];case"Cos":return[s.cos(I("x",e,t,n))];case"Cosh":return[s.cosh(I("x",e,t,n))];case"Elu":return[s.elu(I("x",e,t,n))];case"Erf":return[s.erf(I("x",e,t,n))];case"Exp":return[s.exp(I("x",e,t,n))];case"Expm1":return[s.expm1(I("x",e,t,n))];case"Floor":return[s.floor(I("x",e,t,n))];case"Log":return[s.log(I("x",e,t,n))];case"Log1p":return[s.log1p(I("x",e,t,n))];case"Imag":return[s.imag(I("x",e,t,n))];case"Neg":return[s.neg(I("x",e,t,n))];case"Reciprocal":return[s.reciprocal(I("x",e,t,n))];case"Real":return[s.real(I("x",e,t,n))];case"Relu":return[s.relu(I("x",e,t,n))];case"Round":return[s.round(I("x",e,t,n))];case"Selu":return[s.selu(I("x",e,t,n))];case"Sigmoid":return[s.sigmoid(I("x",e,t,n))];case"Sin":return[s.sin(I("x",e,t,n))];case"Sign":return[s.sign(I("x",e,t,n))];case"Sinh":return[s.sinh(I("x",e,t,n))];case"Softplus":return[s.softplus(I("x",e,t,n))];case"Sqrt":return[s.sqrt(I("x",e,t,n))];case"Square":return[s.square(I("x",e,t,n))];case"Tanh":return[s.tanh(I("x",e,t,n))];case"Tan":return[s.tan(I("x",e,t,n))];case"ClipByValue":return[s.clipByValue(I("x",e,t,n),I("clipValueMin",e,t,n),I("clipValueMax",e,t,n))];case"Relu6":return[s.relu6(I("x",e,t,n))];case"Rsqrt":return[s.rsqrt(ls(e.inputNames[0],t,n))];case"Prod":return[s.prod(I("x",e,t,n),I("axes",e,t,n))];case"LeakyRelu":return[s.leakyRelu(I("x",e,t,n),I("alpha",e,t,n))];case"Prelu":return[s.prelu(I("x",e,t,n),I("alpha",e,t,n))];case"IsNan":return[s.isNaN(ls(e.inputNames[0],t,n))];default:throw TypeError(`Node type ${e.op} is not implemented`)}};function fr(e,t,n=""){if(!(typeof e=="number"||typeof t=="number")){v.assert(e.length===t.length,()=>n+` Shapes ${e} and ${t} must match`);for(let s=0;sn+` Shapes ${e} and ${t} must match`)}}}function k7(e){return!(typeof e=="number"||e.some(t=>t<0))}function op(e,t,n){let s=my(e,n),r=!k7(s);if(r&&t.length===0)throw new Error(`Tried to calculate elements of an empty list with non-fully-defined elementShape: ${s}`);if(r&&t.forEach(a=>{s=my(a.shape,s)}),!k7(s))throw new Error(`Non-fully-defined elementShape: ${s}`);return s}function my(e,t){if(typeof e=="number")return t;if(typeof t=="number")return e;if(e.length!==t.length)throw new Error(`Incompatible ranks during merge: ${e} vs. ${t}`);let n=[];for(let s=0;s=0&&a>=0&&r!==a)throw new Error(`Incompatible shape during merge: ${e} vs. ${t}`);n[s]=r>=0?r:a}return n}var hq=class{constructor(e,t,n,s,r,a,o){this.name=e,this.dtype=t,this.maxSize=n,this.elementShape=s,this.identicalElementShapes=r,this.dynamicSize=a,this.clearAfterRead=o,this.tensors=[],this.closed_=!1,this.idTensor=Te(0),Tn(this.idTensor)}get id(){return this.idTensor.id}get closed(){return this.closed_}clearAndClose(e){this.tensors.forEach(t=>{(e==null||!e.has(t.tensor.id))&&t.tensor.dispose()}),this.tensors=[],this.closed_=!0,this.idTensor.dispose()}size(){return this.tensors.length}read(e){if(this.closed_)throw new Error(`TensorArray ${this.name} has already been closed.`);if(e<0||e>=this.size())throw new Error(`Tried to read from index ${e}, but array size is: ${this.size()}`);let t=this.tensors[e];if(t.cleared)throw new Error(`TensorArray ${this.name}: Could not read index ${e} twice because it was cleared after a previous read (perhaps try setting clear_after_read = false?).`);return this.clearAfterRead&&(t.cleared=!0),t.read=!0,t.tensor}readMany(e){return e.map(t=>this.read(t))}write(e,t){if(this.closed_)throw new Error(`TensorArray ${this.name} has already been closed.`);if(e<0||!this.dynamicSize&&e>=this.maxSize)throw new Error(`Tried to write to index ${e}, but array is not resizeable and size is: ${this.maxSize}`);let n=this.tensors[e]||{};if(t.dtype!==this.dtype)throw new Error(`TensorArray ${this.name}: Could not write to TensorArray index ${e}, - because the value dtype is ${t.dtype}, but TensorArray dtype is ${this.dtype}.`);if(this.size()===0&&(this.elementShape==null||this.elementShape.length===0)&&(this.elementShape=t.shape),fr(this.elementShape,t.shape,`TensorArray ${this.name}: Could not write to TensorArray index ${e}.`),n.read)throw new Error(`TensorArray ${this.name}: Could not write to TensorArray index ${e}, because it has already been read.`);if(n.written)throw new Error(`TensorArray ${this.name}: Could not write to TensorArray index ${e}, because it has already been written.`);n.tensor=t,Tn(t),n.written=!0,this.tensors[e]=n}writeMany(e,t){if(e.length!==t.length)throw new Error(`TensorArray ${this.name}: could not write multiple tensors,because the index size: ${e.length} is not the same as tensors size: ${t.length}.`);e.forEach((n,s)=>this.write(n,t[s]))}gather(e,t){if(!!t&&t!==this.dtype)throw new Error(`TensorArray dtype is ${this.dtype} but gather requested dtype ${t}`);if(e)e=e.slice(0,this.size());else{e=[];for(let s=0;s=this.maxSize)throw new Error(`Max index must be < array size (${n} vs. ${this.maxSize})`);this.writeMany(e,wn(t,0))}split(e,t){if(t.dtype!==this.dtype)throw new Error(`TensorArray dtype is ${this.dtype} but tensor has dtype ${t.dtype}`);let n=0,s=e.map(i=>(n+=i,n));if(n!==t.shape[0])throw new Error(`Expected sum of lengths to be equal to +2. The custom ${s} is defined in JavaScript, but is not registered properly with tf.serialization.registerClass().`);if(l!=null){let u={};for(let h of Object.keys(cr))u[h]=cr[h];for(let h of Object.keys(n))u[h]=n[h];let c=a.config;c.customObjects=u;let p=Object.assign({},cr);for(let h of Object.keys(n))cr[h]=n[h];N3(a.config);let d=l(i,a.config,n,r);return cr=Object.assign({},p),d}else{let u=Object.assign({},cr);for(let p of Object.keys(n))cr[p]=n[p];let c=new i(a.config);return cr=Object.assign({},u),c}}}function CV(e,t){return et?1:0}function Ef(e,t){return-1*CV(e,t)}function Qa(e){if(e==null)return e;let t=[];for(let n of e)t.indexOf(n)===-1&&t.push(n);return t}function TV(e){if(e==null)throw new H(`Invalid value in obj: ${JSON.stringify(e)}`);for(let t in e)if(e.hasOwnProperty(t))return!1;return!0}function iu(e,t,n){if(n!=null&&e.indexOf(n)<0)throw new H(`${n} is not a valid ${t}. Valid values are ${e} or null/undefined.`)}function jA(e,t,n=0,s=1/0){return Kr(n>=0),Kr(s>=n),Array.isArray(e)&&e.length>=n&&e.length<=s&&e.every(r=>typeof r===t)}function Tn(e,t){Array.isArray(e)?(v.assert(e.length>0,()=>`${t} is unexpectedly an empty array.`),e.forEach((n,s)=>Tn(n,`element ${s+1} of ${t}`))):v.assert(Number.isInteger(e)&&e>0,()=>`Expected ${t} to be a positive integer, but got ${bk(e)}.`)}function bk(e){return e===null?"null":Array.isArray(e)?"["+e.map(t=>bk(t)).join(",")+"]":typeof e=="string"?`"${e}"`:`${e}`}function NV(e,t,n){let s=n!=null?n():v.now(),r;return(...o)=>{let i=n!=null?n():v.now();return i-s0){let n=`${e}_${t}`;return zu.set(n,1),n}else return e}var MV=new RegExp(/^[A-Za-z0-9][-A-Za-z0-9\._\/]*$/);function Ck(e){return!!e.match(MV)}function zV(e){return e===parseInt(e.toString(),10)}function eo(e,t,n){t==null&&(t=0),n==null&&(n=e.length);let s=1;for(let r=t;rt&&(t=s)}return t}function Fr(e,t){if(t{if(e.shape.length!==2)throw new H(`repeat() expects a rank-2 tensor, but received a rank-${e.shape.length} tensor.`);let n=gh(e,1);return E3(n,[1,t,1])})}function BV(e){let t=[eo(e.shape)];return W(e,t)}function WV(e){if(e.rank<=1)throw new H(`batchFlatten requires a minimum rank of 2. Got rank: ${e.rank}.`);let t=[e.shape[0],eo(e.shape,1)];return W(e,t)}function Zi(e,t,n){return X(()=>{switch(e.rank){case 1:return ch(e,t,n);case 2:return C0(e,[t,0],[n,e.shape[1]]);case 3:return fi(e,[t,0,0],[n,e.shape[1],e.shape[2]]);case 4:return oo(e,[t,0,0,0],[n,e.shape[1],e.shape[2],e.shape[3]]);case 5:return Oe(e,[t,0,0,0,0],[n,e.shape[1],e.shape[2],e.shape[3],e.shape[4]]);case 6:return Oe(e,[t,0,0,0,0,0],[n,e.shape[1],e.shape[2],e.shape[3],e.shape[4],e.shape[5]]);default:throw new H(`sliceAlongFirstAxis() received an unsupported tensor rank: ${e.rank}`)}})}function s3(e,t,n){return X(()=>{switch(e.rank){case 1:return ch(e,t,n);case 2:return C0(e,[0,t],[e.shape[0],n]);case 3:return fi(e,[0,0,t],[e.shape[0],e.shape[1],n]);case 4:return oo(e,[0,0,0,t],[e.shape[0],e.shape[1],e.shape[2],n]);default:throw new H(`sliceAlongLastAxis() received an unsupported tensor rank: ${e.rank}`)}})}function _f(e,t,n,s){return X(()=>{switch(e.rank){case 1:return ch(e,t,n);case 2:switch(s){case 1:return Zi(e,t,n);case 2:return s3(e,t,n);default:throw new H(`The axis is not within the rank of the tensor ${s}`)}case 3:switch(s){case 1:return Zi(e,t,n);case 2:return fi(e,[0,t,0],[e.shape[0],n,e.shape[2]]);case 3:return s3(e,t,n);default:throw new H(`The axis is not within the rank of the tensor ${s}`)}case 4:switch(s){case 1:return Zi(e,t,n);case 2:return oo(e,[0,t,0,0],[e.shape[0],n,e.shape[2],e.shape[3]]);case 3:return oo(e,[0,0,t,0],[e.shape[0],e.shape[1],n,e.shape[3]]);case 4:return s3(e,t,n);default:throw new H(`The axis is not within the rank of the tensor ${s}`)}default:throw new H(`sliceAlongLastAxis() received an unsupported tensor rank: ${e.rank}`)}})}function qA(e,t=-1){let n;return t<0&&(n=e[0].rank,n!==0?t=n:t=0),t===e[0].rank&&(t=-1),ut(e,t)}function $v(e,t){switch(e.rank){case 1:return sA([e,t]);case 2:return nu([e,t],0);case 3:return rA([e,t],0);case 4:return aA([e,t],0);default:throw new H(`concatAlongFirstAxis() received an unsupported tensor rank: ${e.rank}`)}}function E3(e,t){if(Array.isArray(t)||(t=[t]),e.rank!==t.length)throw new H(`The length of input n (${t.length}) does not match the number of dimensions in input x (${e.rank})`);return As(e,t)}function U0(e,t=0,n=1,s,r){return A0(e,t,n,s,r)}function Qr(e,t,n,s){if(e.rank<2||t.rank<2)throw new Ke(`dot requires both inputs to be rank >= 2 but got x shape = ${e.shape} and y shape = ${t.shape}`);if(t.rank>=3){let r=e.shape.slice(-1)[0],a=t.shape.slice(-2)[0];if(r!==a)throw new Ke(`If rank y >= 3, then the second last dim of y must equal the last dim of x but got x shape = ${e.shape} and y shape = ${t.shape}`)}if(e.rank===2&&t.rank===2)return rc.matMul({a:e,b:t,transposeA:!1,transposeB:!1,bias:s?R3(e.rank,s,Or()):null,activation:n});{let r=e.shape.slice(),a=r.pop();e=W(e,[-1,a]);let o=t.shape.slice(),i=o.pop(),l=o.pop(),u=[...o,i],c=Array.from({length:t.rank},(f,m)=>m===0?t.rank-2:m<=t.rank-2?m-1:m);t=W(tt(t,c),[l,-1]);let p=[...r,...u],d=!1,h=!1;return W(rc.matMul({a:e,b:t,transposeA:d,transposeB:h,bias:s?R3(e.rank,s,Or()):null,activation:n}),p)}}function Tk(e,t,n){return X(()=>(Array.isArray(t)?t=Ot(t,"int32"):t=me(t,"int32"),jc(e,t,n)))}function yh(e){return M(e,e)}function R3(e,t,n){let s=t.shape;if(t.rank!==1&&t.rank!==e)throw new H(`Unexpected bias dimensions: ${t.rank}; expected it to be 1 or ${e}`);if(e===5){if(n==="channelsFirst")return s.length===1?W(t,[1,s[0],1,1,1]):W(t,[1,s[3],s[0],s[1],s[2]]);if(n==="channelsLast")return s.length===1?W(t,[1,1,1,1,s[0]]):W(t,[1].concat(s))}else if(e===4){if(n==="channelsFirst")return s.length===1?W(t,[1,s[0],1,1]):W(t,[1,s[2],s[0],s[1]]);if(n==="channelsLast")return s.length===1?W(t,[1,1,1,s[0]]):W(t,[1].concat(s))}else if(e===3){if(n==="channelsFirst")return s.length===1?W(t,[1,s[0],1]):W(t,[1,s[1],s[0]]);if(n==="channelsLast")return s.length===1?W(t,[1,1,s[0]]):W(t,[1].concat(s))}else if(e<3)return t;throw new H(`Unsupported input rank by biasAdd: ${t.rank}`)}function Br(e,t,n){return X(()=>(n==null&&(n=Or()),Qt(n),le(e,R3(e.rank,t,n))))}function VV(e,t=1){if(t!==1)throw new Ke(`Support for alpha values other than 1 (${t}) is not implemented yet.`);return Uc(e)}function UV(e){return X(()=>ge(e,le(rn(e),1)))}function Nk(e,t,n,s){return X(()=>zA(e,t,n,s))}function GV(e){return X(()=>{let t=le(.5,M(.2,e));return bs(t,0,1)})}function Ah(e,t,n=!1){return n?e():t()}var HV=["fanIn","fanOut","fanAvg"],jV=["normal","uniform","truncatedNormal"];function qV(e){iu(HV,"FanMode",e)}function XV(e){iu(jV,"Distribution",e)}var xr=class extends ce.Serializable{fromConfigUsesCustomObjects(){return!1}getConfig(){return{}}},XA=class extends xr{apply(e,t){return Vt(e,t)}};XA.className="Zeros";ce.registerClass(XA);var G0=class extends xr{apply(e,t){return Ds(e,t)}};G0.className="Ones";ce.registerClass(G0);var KA=class extends xr{constructor(e){if(super(),typeof e!="object")throw new H(`Expected argument of type ConstantConfig but got ${e}`);if(e.value===void 0)throw new H(`config must have value set but got ${e}`);this.value=e.value}apply(e,t){return X(()=>M(Ce(this.value),Ds(e,t)))}getConfig(){return{value:this.value}}};KA.className="Constant";ce.registerClass(KA);var ZA=class extends xr{constructor(e){super(),this.DEFAULT_MINVAL=-.05,this.DEFAULT_MAXVAL=.05,this.minval=e.minval||this.DEFAULT_MINVAL,this.maxval=e.maxval||this.DEFAULT_MAXVAL,this.seed=e.seed}apply(e,t){return Xc(e,this.minval,this.maxval,t)}getConfig(){return{minval:this.minval,maxval:this.maxval,seed:this.seed}}};ZA.className="RandomUniform";ce.registerClass(ZA);var YA=class extends xr{constructor(e){super(),this.DEFAULT_MEAN=0,this.DEFAULT_STDDEV=.05,this.mean=e.mean||this.DEFAULT_MEAN,this.stddev=e.stddev||this.DEFAULT_STDDEV,this.seed=e.seed}apply(e,t){if(t=t||"float32",t!=="float32"&&t!=="int32")throw new Ke(`randomNormal does not support dType ${t}.`);return U0(e,this.mean,this.stddev,t,this.seed)}getConfig(){return{mean:this.mean,stddev:this.stddev,seed:this.seed}}};YA.className="RandomNormal";ce.registerClass(YA);var JA=class extends xr{constructor(e){super(),this.DEFAULT_MEAN=0,this.DEFAULT_STDDEV=.05,this.mean=e.mean||this.DEFAULT_MEAN,this.stddev=e.stddev||this.DEFAULT_STDDEV,this.seed=e.seed}apply(e,t){if(t=t||"float32",t!=="float32"&&t!=="int32")throw new Ke(`truncatedNormal does not support dType ${t}.`);return E0(e,this.mean,this.stddev,t,this.seed)}getConfig(){return{mean:this.mean,stddev:this.stddev,seed:this.seed}}};JA.className="TruncatedNormal";ce.registerClass(JA);var QA=class extends xr{constructor(e){super(),this.gain=e.gain!=null?e.gain:1}apply(e,t){return X(()=>{if(e.length!==2||e[0]!==e[1])throw new H("Identity matrix initializer can only be used for 2D square matrices.");return M(this.gain,d0(e[0]))})}getConfig(){return{gain:this.gain}}};QA.className="Identity";ce.registerClass(QA);function KV(e,t="channelsLast"){let n,s;if(Qt(t),e.length===2)n=e[0],s=e[1];else if([3,4,5].indexOf(e.length)!==-1){if(t==="channelsFirst"){let r=eo(e,2);n=e[1]*r,s=e[0]*r}else if(t==="channelsLast"){let r=eo(e,0,e.length-2);n=e[e.length-2]*r,s=e[e.length-1]*r}}else{let r=eo(e);n=Math.sqrt(r),s=Math.sqrt(r)}return[n,s]}var vs=class extends xr{constructor(e){if(super(),e.scale<0)throw new H(`scale must be a positive float. Got: ${e.scale}`);this.scale=e.scale==null?1:e.scale,this.mode=e.mode==null?"fanIn":e.mode,qV(this.mode),this.distribution=e.distribution==null?"normal":e.distribution,XV(this.distribution),this.seed=e.seed}apply(e,t){let n=KV(e),s=n[0],r=n[1],a=this.scale;if(this.mode==="fanIn"?a/=Math.max(1,s):this.mode==="fanOut"?a/=Math.max(1,r):a/=Math.max(1,(s+r)/2),this.distribution==="normal"){let o=Math.sqrt(a);if(t=t||"float32",t!=="float32"&&t!=="int32")throw new Ke(`${this.getClassName()} does not support dType ${t}.`);return E0(e,0,o,t,this.seed)}else{let o=Math.sqrt(3*a);return Xc(e,-o,o,t)}}getConfig(){return{scale:this.scale,mode:this.mode,distribution:this.distribution,seed:this.seed}}};vs.className="VarianceScaling";ce.registerClass(vs);var H0=class extends vs{constructor(e){super({scale:1,mode:"fanAvg",distribution:"uniform",seed:e==null?null:e.seed})}getClassName(){return vs.className}};H0.className="GlorotUniform";ce.registerClass(H0);var j0=class extends vs{constructor(e){super({scale:1,mode:"fanAvg",distribution:"normal",seed:e==null?null:e.seed})}getClassName(){return vs.className}};j0.className="GlorotNormal";ce.registerClass(j0);var q0=class extends vs{constructor(e){super({scale:2,mode:"fanIn",distribution:"normal",seed:e==null?null:e.seed})}getClassName(){return vs.className}};q0.className="HeNormal";ce.registerClass(q0);var X0=class extends vs{constructor(e){super({scale:2,mode:"fanIn",distribution:"uniform",seed:e==null?null:e.seed})}getClassName(){return vs.className}};X0.className="HeUniform";ce.registerClass(X0);var K0=class extends vs{constructor(e){super({scale:1,mode:"fanIn",distribution:"normal",seed:e==null?null:e.seed})}getClassName(){return vs.className}};K0.className="LeCunNormal";ce.registerClass(K0);var Z0=class extends vs{constructor(e){super({scale:1,mode:"fanIn",distribution:"uniform",seed:e==null?null:e.seed})}getClassName(){return vs.className}};Z0.className="LeCunNormal";ce.registerClass(Z0);var e5=class extends xr{constructor(e){if(super(),this.DEFAULT_GAIN=1,this.gain=e.gain==null?this.DEFAULT_GAIN:e.gain,this.seed=e.seed,this.seed!=null)throw new Ke("Random seed is not implemented for Orthogonal Initializer yet.")}apply(e,t){return X(()=>{if(e.length<2)throw new Ke("Shape must be at least 2D.");e[0]*e[1]>2e3&&console.warn(`Orthogonal initializer is being called on a matrix with more than 2000 (${e[0]*e[1]}) elements: Slowness may result.`);let n=e[0]>e[1]?[e[1],e[0]]:e,s=U0(n,0,1,"float32"),r=VA.gramSchmidt(s);return e[0]>e[1]&&(r=tt(r)),M(this.gain,r)})}getConfig(){return{gain:this.gain,seed:this.seed}}};e5.className="Orthogonal";ce.registerClass(e5);var Pv={constant:"Constant",glorotNormal:"GlorotNormal",glorotUniform:"GlorotUniform",heNormal:"HeNormal",heUniform:"HeUniform",identity:"Identity",leCunNormal:"LeCunNormal",leCunUniform:"LeCunUniform",ones:"Ones",orthogonal:"Orthogonal",randomNormal:"RandomNormal",randomUniform:"RandomUniform",truncatedNormal:"TruncatedNormal",varianceScaling:"VarianceScaling",zeros:"Zeros"};function Fv(e,t={}){return fh(e,ce.SerializationMap.getMap().classNameMap,t,"initializer")}function Ut(e){return HA(e)}function Mt(e){if(typeof e=="string"){let t=e in Pv?Pv[e]:e;if(t==="GlorotNormal")return new j0;if(t==="GlorotUniform")return new H0;if(t==="HeNormal")return new q0;if(t==="HeUniform")return new X0;if(t==="LeCunNormal")return new K0;if(t==="LeCunUniform")return new Z0;{let n={};return n.className=t,n.config={},Fv(n)}}else return e instanceof xr?e:Fv(e)}function _3(e){return Array.isArray(e)&&Array.isArray(e[0])}function lm(e){return e.length===0?[]:Array.isArray(e[0])?e:[e]}function Ze(e){let t;if(Array.isArray(e)){if(e.length!==1)throw new H(`Expected Tensor length to be 1; got ${e.length}`);t=e[0]}else t=e;return t}function At(e){if(Array.isArray(e)&&Array.isArray(e[0])){if(e.length===1)return e=e,e[0];throw new H(`Expected exactly 1 Shape; got ${e.length}`)}else return e}function um(e){let t=0;for(let n of e)n.shape.length===0?t+=1:t+=n.shape.reduce((s,r)=>s*r);return t}var Ov="Variable",Ek=class{constructor(e,t="float32",n=Ov,s=!0,r=null){this.dtype=t==null?"float32":t,this.shape=e.shape,this.id=wk(),n=n==null?Ov:n,this.originalName=Sk(n),this.name=Ik(this.originalName),this.trainable_=s,this.constraint=r,this.val=OA(e,this.trainable_,this.name,this.dtype)}read(){return this.assertNotDisposed(),this.val}write(e){return this.assertNotDisposed(),ZV(this.val,e),this.val.id!==e.id&&(this.val.assign(e),this.constraint!=null&&this.val.assign(this.constraint.apply(this.val))),this}dispose(){this.assertNotDisposed(),this.val.dispose()}assertNotDisposed(){if(this.val.isDisposed)throw new Error(`LayersVariable ${this.name} is already disposed.`)}get trainable(){return this.trainable_}set trainable(e){this.trainable_=e,this.val.trainable=e}};function ZV(e,t){if(e.shape.toString()!==t.shape.toString())throw new Error("Shape mismatch: "+JSON.stringify(e.shape)+" vs. "+JSON.stringify(t.shape))}function D3(e){return e.map(t=>t.read())}function t5(e){e.forEach(t=>{t[0].write(t[1])})}var an=class{constructor(e){this.dtype=e.dtype,this.shape=e.shape,e.shape!=null?this.ndim=e.shape.length:this.ndim=e.ndim,this.maxNDim=e.maxNDim,this.minNDim=e.minNDim,this.axes=e.axes||{}}},_r=class{constructor(e,t,n,s,r,a,o){this.dtype=e,this.shape=t,this.sourceLayer=n,this.inputs=s,this.callArgs=r,this.outputTensorIndex=o,this.id=wk(),a!=null&&(this.originalName=Sk(a),this.name=Ik(this.originalName)),this.rank=t.length}},YV=0,Y0=class{constructor(e,t){this.callArgs=t,this.id=YV++,this.outboundLayer=e.outboundLayer,this.inboundLayers=e.inboundLayers,this.nodeIndices=e.nodeIndices,this.tensorIndices=e.tensorIndices,this.inputTensors=e.inputTensors,this.outputTensors=e.outputTensors,this.inputMasks=e.inputMasks,this.outputMasks=e.outputMasks,this.inputShapes=e.inputShapes,this.outputShapes=e.outputShapes;for(let n of e.inboundLayers)n!=null&&n.outboundNodes.push(this);e.outboundLayer.inboundNodes.push(this)}getConfig(){let e=[];for(let t of this.inboundLayers)t!=null?e.push(t.name):e.push(null);return{outboundLayer:this.outboundLayer?this.outboundLayer.name:null,inboundLayers:e,nodeIndices:this.nodeIndices,tensorIndices:this.tensorIndices}}},JV=0,dt=class extends ce.Serializable{constructor(e={}){super(),this._callHook=null,this._addedWeightNames=[],this._stateful=!1,this.id=JV++,this.activityRegularizer=null,this.inputSpec=null,this.supportsMasking=!1,this._trainableWeights=[],this._nonTrainableWeights=[],this._losses=[],this._updates=[],this._built=!1,this.inboundNodes=[],this.outboundNodes=[];let t=e.name;if(!t){let n=this.getClassName();t=ga(n)+"_"+V0(n)}if(this.name=t,this.trainable_=e.trainable==null?!0:e.trainable,e.inputShape!=null||e.batchInputShape!=null){let n;if(e.batchInputShape!=null)n=e.batchInputShape;else if(e.inputShape!=null){let r=null;e.batchSize!=null&&(r=e.batchSize),n=[r].concat(e.inputShape)}this.batchInputShape=n;let s=e.dtype;s==null&&(s=e.inputDType),s==null&&(s="float32"),this.dtype=s}e.weights!=null?this.initialWeights=e.weights:this.initialWeights=null,this._refCount=null,this.fastWeightInitDuringBuild=!1}static nodeKey(e,t){return e.name+"_ib-"+t.toString()}getNodeAtIndex(e,t){if(this.inboundNodes.length===0)throw new Rr(`The layer has never been called and thus has no defined ${t}.`);if(this.inboundNodes.length<=e)throw new H(`Asked to get ${t} at node ${e}, but the layer has only ${this.inboundNodes.length} inbound nodes.`);return this.inboundNodes[e]}getInputAt(e){return ys(this.getNodeAtIndex(e,"input").inputTensors)}getOutputAt(e){return ys(this.getNodeAtIndex(e,"output").outputTensors)}get input(){if(this.inboundNodes.length>1)throw new ma(`Layer ${this.name} has multiple inbound nodes, hence the notion of "layer input" is ill-defined. Use \`getInputAt(nodeIndex)\` instead.`);if(this.inboundNodes.length===0)throw new ma(`Layer ${this.name} is not connected, no input to return.`);return ys(this.getNodeAtIndex(0,"input").inputTensors)}get output(){if(this.inboundNodes.length===0)throw new ma(`Layer ${this.name} has no inbound nodes.`);if(this.inboundNodes.length>1)throw new ma(`Layer ${this.name} has multiple inbound nodes, hence the notion of "layer output" is ill-defined. Use \`getOutputAt(nodeIndex)\` instead.`);return ys(this.getNodeAtIndex(0,"output").outputTensors)}get losses(){return this._losses}calculateLosses(){return this.losses.map(e=>e())}get updates(){return this._updates}get built(){return this._built}set built(e){this._built=e}get trainable(){return this.trainable_}set trainable(e){this._trainableWeights.forEach(t=>t.trainable=e),this.trainable_=e}get trainableWeights(){return this.trainable_?this._trainableWeights.filter(e=>e.trainable):[]}set trainableWeights(e){this._trainableWeights=e}get nonTrainableWeights(){return this.trainable?this._trainableWeights.filter(e=>!e.trainable).concat(this._nonTrainableWeights):this._trainableWeights.concat(this._nonTrainableWeights)}set nonTrainableWeights(e){this._nonTrainableWeights=e}get weights(){return this.trainableWeights.concat(this.nonTrainableWeights)}get stateful(){return this._stateful}resetStates(){if(!this.stateful)throw new Error("Cannot call the resetStates() method of a non-stateful Layer object.")}assertInputCompatibility(e){if(e=_t(e),this.inputSpec==null||this.inputSpec.length===0)return;let t=_t(this.inputSpec);if(e.length!==t.length)throw new H(`Layer ${this.name} expects ${t.length} inputs, but it received ${e.length} input tensors. Input received: ${e}`);for(let n=0;nr.maxNDim)throw new H(`Input ${n} is incompatible with layer ${this.name}: expected max_ndim=${r.maxNDim}, found ndim=${a}`);if(r.minNDim!=null&&a=0?o[l]:o[o.length+l];if(u!=null&&[u,null].indexOf(c)===-1)throw new H(`Input ${n} is incompatible with layer ${this.name}: expected axis ${l} of input shape to have value ${u} but got shape ${o}.`)}}if(r.shape!=null)for(let o=0;o{if(!this.built){this.assertInputCompatibility(e);let a=[];for(let o of _t(e))a.push(o.shape);this.build(ys(a)),this.built=!0,this.initialWeights&&this.setWeights(this.initialWeights),this._refCount===null&&r&&(this._refCount=1)}if(this.assertInputCompatibility(e),r){let a=this.call(e,t),o=_t(a),i=[];for(let l of o)n.indexOf(l)!==-1&&(l=l.clone()),i.push(l);if(a=ys(i),this.activityRegularizer!=null)throw new Ke("Layer invocation in the presence of activity regularizer(s) is not supported yet.");return a}else{let a=QV(e),o=this.computeOutputShape(a),i,l=eU(e);if(this.warnOnIncompatibleInputShape(Array.isArray(e)?a[0]:a),o!=null&&o.length>0&&Array.isArray(o[0])?i=o.map((u,c)=>new _r(l,u,this,_t(e),t,this.name,c)):i=new _r(l,o,this,_t(e),t,this.name),this.addInboundNode(e,i,null,null,a,o,t),this._refCount++,this.activityRegularizer!=null)throw new Ke("Layer invocation in the presence of activity regularizer(s) is not supported yet.");return i}})}warnOnIncompatibleInputShape(e){if(this.batchInputShape!=null)if(e.length!==this.batchInputShape.length)console.warn(`The rank of the input tensor provided (shape: ${JSON.stringify(e)}) does not match that of the batchInputShape (${JSON.stringify(this.batchInputShape)}) of the layer ${this.name}`);else{let t=!1;this.batchInputShape.forEach((n,s)=>{n!=null&&e[s]!=null&&e[s]!==n&&(t=!0)}),t&&console.warn(`The shape of the input tensor (${JSON.stringify(e)}) does not match the expectation of layer ${this.name}: ${JSON.stringify(this.batchInputShape)}`)}}get outputShape(){if(this.inboundNodes==null||this.inboundNodes.length===0)throw new ma(`The layer ${this.name} has never been called and thus has no defined output shape.`);let e=[];for(let t of this.inboundNodes){let n=JSON.stringify(t.outputShapes);e.indexOf(n)===-1&&e.push(n)}if(e.length===1){let t=this.inboundNodes[0].outputShapes;return Array.isArray(t)&&Array.isArray(t[0])&&t.length===1?t[0]:t}else throw new ma(`The layer ${this.name} has multiple inbound nodes with different output shapes. Hence the notion of "output shape" is ill-defined for the layer.`)}countParams(){if(!this.built)throw new Rr(`You tried to call countParams() on ${this.name}, but the layer is not built yet. Build it first by calling build(batchInputShape).`);return um(this.weights)}build(e){this.built=!0}getWeights(e=!1){return D3(e?this.trainableWeights:this.weights)}setWeights(e){X(()=>{let t=this.weights;if(t.length!==e.length)throw new H(`You called setWeights(weights) on layer "${this.name}" with a weight list of length ${e.length}, but the layer was expecting ${t.length} weights. Provided weights: ${e}...`);if(t.length===0)return;let n=[],s=D3(t);for(let r=0;rr.apply(u.read())),a==null&&(a=!0),a?this._trainableWeights.push(u):this._nonTrainableWeights.push(u),u}setFastWeightInitDuringBuild(e){this.fastWeightInitDuringBuild=e}addLoss(e){e==null||Array.isArray(e)&&e.length===0||(e=_t(e),this._losses!==void 0&&this._losses!==null&&this.losses.push(...e))}computeOutputShape(e){return e}computeMask(e,t){if(!this.supportsMasking){if(t!=null)if(Array.isArray(t))t.forEach(n=>{if(n!=null)throw new TypeError(`Layer ${this.name} does not support masking, but was passed an inputMask.`)});else throw new TypeError(`Layer ${this.name} does not support masking, but was passed an inputMask.`);return null}return t}addInboundNode(e,t,n,s,r,a,o=null){let i=_t(e);t=_t(t),n=_t(n),s=_t(s),r=lm(r),a=lm(a);let l=[],u=[],c=[];for(let p of i)l.push(p.sourceLayer),u.push(p.nodeIndex),c.push(p.tensorIndex);new Y0({outboundLayer:this,inboundLayers:l,nodeIndices:u,tensorIndices:c,inputTensors:i,outputTensors:t,inputMasks:n,outputMasks:s,inputShapes:r,outputShapes:a},o);for(let p=0;pe.dispose()),this.weights.length}assertNotDisposed(){if(this._refCount===0)throw new Error(`Layer '${this.name}' is already disposed.`)}dispose(){if(!this.built)throw new Error(`Cannot dispose Layer ${this.name} because it has not been built yet.`);if(this._refCount===null)throw new Error(`Cannot dispose Layer ${this.name} because it has not been used yet.`);this.assertNotDisposed();let e=0;return--this._refCount===0&&(e=this.disposeWeights()),{refCountAfterDispose:this._refCount,numDisposedVariables:e}}};function QV(e){e=_t(e);let t=[];for(let n of e)t.push(n.shape);return ys(t)}function eU(e){return"float32"}function Rk(e,t,n){if((t==null||n!=null&&n>0)&&(t=e.sourceLayer,n=e.nodeIndex),t.inboundNodes.length===0)return[e];{let s=t.inboundNodes[n];if(s.inboundLayers.length===0)return s.inputTensors;{let r=[];for(let a=0;af.name),l=[],u=t.names();for(let f of i)u.indexOf(f)!==-1?l.push(t.getValue(f)):l.push(null);s!=null&&(s.maxNumTensors=-1/0,s.minNumTensors=1/0);let c=i.join(",")+"|"+t.names().sort().join(","),p=cm.get(c),d;if(p==null){let f=sU(o,t);p=f.sorted,d=f.recipientCounts,cm.put(c,p),dm.put(c,d)}d={},r||Object.assign(d,dm.get(c));let h=new Hi(t);for(let f=0;fs.maxNumTensors&&(s.maxNumTensors=R),R0,()=>"Expected at least one fetch, got none");let n=[],s={};if(e.length===1){let r=Mv(e[0],t);n=r.sorted,s=r.recipientMap}else{let r=new Set;for(let a of e){let{sorted:o,recipientMap:i}=Mv(a,t);for(let l of o)r.has(l.name)||(n.push(l),r.add(l.name));for(let l in i)s[l]==null&&(s[l]=new Set),i[l].forEach(u=>s[l].add(u))}}return{sorted:n,recipientCounts:rU(s)}}function rU(e){let t={};for(let n in e)t[n]=e[n].size;return t}function Mv(e,t){let n=new Set,s=[],r={};for(let i of t.names())n.add(i);let a=[],o=[];for(a.push(e);a.length>0;){let i=a[a.length-1];if(n.has(i.name)){a.pop();continue}let l=o[o.length-1]===a.length-1;if(i.inputs.length===0||l)a.pop(),s.push(i),n.add(i.name),l&&o.pop();else{o.push(a.length-1);for(let u of i.inputs)r[u.name]==null&&(r[u.name]=new Set),r[u.name].add(i.name),!n.has(u.name)&&a.push(u)}}return{sorted:s,recipientMap:r}}function aU(e){let t;if(e.sourceLayer.inboundNodes.length===1)t=e.sourceLayer.output;else{let n=null;for(let s=0;s100,nU);var Dk={};We(Dk,{maxNorm:()=>iU,minMaxNorm:()=>cU,nonNeg:()=>uU,unitNorm:()=>lU});function n5(e,t){return X(()=>Ln(ve(M(e,e),t,!0)))}var xh=class extends ce.Serializable{getConfig(){return{}}},s5=class extends xh{constructor(e){super(),this.defaultMaxValue=2,this.defaultAxis=0,this.maxValue=e.maxValue!=null?e.maxValue:this.defaultMaxValue,this.axis=e.axis!=null?e.axis:this.defaultAxis}apply(e){return X(()=>{let t=n5(e,this.axis),n=bs(t,0,this.maxValue);return M(e,ge(n,le(mn(),t)))})}getConfig(){return{maxValue:this.maxValue,axis:this.axis}}};s5.className="MaxNorm";ce.registerClass(s5);var r5=class extends xh{constructor(e){super(),this.defaultAxis=0,this.axis=e.axis!=null?e.axis:this.defaultAxis}apply(e){return X(()=>ge(e,le(mn(),n5(e,this.axis))))}getConfig(){return{axis:this.axis}}};r5.className="UnitNorm";ce.registerClass(r5);var a5=class extends xh{apply(e){return Lr(e)}};a5.className="NonNeg";ce.registerClass(a5);var o5=class extends xh{constructor(e){super(),this.defaultMinValue=0,this.defaultMaxValue=1,this.defaultRate=1,this.defaultAxis=0,this.minValue=e.minValue!=null?e.minValue:this.defaultMinValue,this.maxValue=e.maxValue!=null?e.maxValue:this.defaultMaxValue,this.rate=e.rate!=null?e.rate:this.defaultRate,this.axis=e.axis!=null?e.axis:this.defaultAxis}apply(e){return X(()=>{let t=n5(e,this.axis),n=le(M(this.rate,bs(t,this.minValue,this.maxValue)),M(1-this.rate,t));return M(e,ge(n,le(mn(),t)))})}getConfig(){return{minValue:this.minValue,maxValue:this.maxValue,rate:this.rate,axis:this.axis}}};o5.className="MinMaxNorm";ce.registerClass(o5);var zv={maxNorm:"MaxNorm",minMaxNorm:"MinMaxNorm",nonNeg:"NonNeg",unitNorm:"UnitNorm"};function An(e){return HA(e)}function Lv(e,t={}){return fh(e,ce.SerializationMap.getMap().classNameMap,t,"constraint")}function xn(e){if(e==null)return null;if(typeof e=="string"){let n={className:e in zv?zv[e]:e,config:{}};return Lv(n)}else return e instanceof xh?e:Lv(e)}function iU(e){return new s5(e)}function lU(e){return new r5(e)}function uU(){return new a5}function cU(e){return new o5(e)}var $k={};We($k,{constant:()=>hU,glorotNormal:()=>bU,glorotUniform:()=>xU,heNormal:()=>vU,heUniform:()=>wU,identity:()=>yU,leCunNormal:()=>kU,leCunUniform:()=>SU,ones:()=>pU,orthogonal:()=>IU,randomNormal:()=>mU,randomUniform:()=>fU,truncatedNormal:()=>gU,varianceScaling:()=>AU,zeros:()=>dU});function dU(){return new XA}function pU(){return new G0}function hU(e){return new KA(e)}function fU(e){return new ZA(e)}function mU(e){return new YA(e)}function gU(e){return new JA(e)}function yU(e){return new QA(e)}function AU(e){return new vs(e)}function xU(e){return new H0(e)}function bU(e){return new j0(e)}function vU(e){return new q0(e)}function wU(e){return new X0(e)}function kU(e){return new K0(e)}function SU(e){return new Z0(e)}function IU(e){return new e5(e)}var Pk={};We(Pk,{Layer:()=>dt,RNN:()=>ia,RNNCell:()=>Sh,activation:()=>YG,add:()=>oH,alphaDropout:()=>UH,average:()=>iH,averagePooling1d:()=>fx,averagePooling2d:()=>mx,averagePooling3d:()=>gx,avgPool1d:()=>gH,avgPool2d:()=>AH,avgPool3d:()=>bH,avgPooling1d:()=>yH,avgPooling2d:()=>xH,avgPooling3d:()=>vH,batchNormalization:()=>hH,bidirectional:()=>FH,concatenate:()=>lH,conv1d:()=>VG,conv2d:()=>UG,conv2dTranspose:()=>GG,conv3d:()=>HG,conv3dTranspose:()=>jG,convLstm2d:()=>_H,convLstm2dCell:()=>DH,cropping2D:()=>XG,dense:()=>JG,depthwiseConv2d:()=>ZG,dot:()=>pH,dropout:()=>QG,elu:()=>OG,embedding:()=>aH,flatten:()=>tH,gaussianDropout:()=>VH,gaussianNoise:()=>WH,globalAveragePooling1d:()=>wH,globalAveragePooling2d:()=>kH,globalMaxPool1d:()=>MH,globalMaxPool2d:()=>zH,globalMaxPooling1d:()=>I8,globalMaxPooling2d:()=>C8,gru:()=>IH,gruCell:()=>CH,input:()=>Jk,inputLayer:()=>FG,layerNormalization:()=>fH,leakyReLU:()=>zG,lstm:()=>TH,lstmCell:()=>NH,masking:()=>GH,maxPool1d:()=>LH,maxPool2d:()=>BH,maxPooling1d:()=>T8,maxPooling2d:()=>N8,maxPooling3d:()=>SH,maximum:()=>uH,minimum:()=>cH,multiply:()=>dH,permute:()=>rH,prelu:()=>LG,reLU:()=>MG,repeatVector:()=>nH,rescaling:()=>HH,reshape:()=>sH,rnn:()=>$H,separableConv2d:()=>qG,simpleRNN:()=>EH,simpleRNNCell:()=>RH,softmax:()=>BG,spatialDropout1d:()=>eH,stackedRNNCells:()=>PH,thresholdedReLU:()=>WG,timeDistributed:()=>OH,upSampling2d:()=>KG,zeroPadding2d:()=>mH});async function qa(e){if(e==null)return;let t=[],n=[],s=[];for(let r in e){let a=e[r];if(typeof a!="number"){let o=a;t.push(o.data()),n.push(r),s.push(o)}}if(t.length>0){let r=await Promise.all(t);for(let a=0;ale(this.totals[s],M(r,n)));this.totals[s]=o,a!=null&&a.dispose()}}}async onEpochEnd(e,t){if(t!=null)for(let n of this.params.metrics)this.totals[n]!=null&&(typeof this.totals[n]=="number"?t[n]=this.totals[n]/this.seen:X(()=>{let s=M(ge(1,this.seen),this.totals[n]);t[n]=s,this.totals[n].dispose(),Cn(t[n])}))}},Mk=class extends oc{async onTrainBegin(e){this.epoch=[],this.history={}}async onEpochEnd(e,t){t==null&&(t={}),this.epoch.push(e);for(let n in t)this.history[n]==null&&(this.history[n]=[]),this.history[n].push(t[n])}async syncData(){let e=[],t=[],n=[];for(let r in this.history){let a=this.history[r];for(let o=0;onew zk(s,t))}var hr=class{constructor(){}static registerCallbackConstructor(e,t){v.assert(e>=0&&Number.isInteger(e),()=>`Verbosity level is expected to be an integer >= 0, but got ${e}`),hr.checkForDuplicate(t),hr.constructors[e]==null&&(hr.constructors[e]=[]),hr.constructors[e].push(t)}static checkForDuplicate(e){for(let t in hr.constructors)hr.constructors[+t].forEach(s=>{if(s===e)throw new H("Duplicate callback constructor.")})}static clear(){hr.constructors={}}static createCallbacks(e){let t=[];for(let n in hr.constructors){let s=+n;e>=s&&t.push(...hr.constructors[s])}return t.map(n=>new n)}};hr.constructors={};function Bk(e,t,n,s,r,a,o,i,l){let u=new Mk,c=[new TU,...hr.createCallbacks(t)];e!=null&&c.push(...e),c.push(u);let p=new Ok(c);return p.setParams({epochs:n,initialEpoch:s,samples:r,steps:a,batchSize:o,verbose:t,doValidation:i,metrics:l}),{callbackList:p,history:u}}function $r(e,t={},n=!1){return fh(e,ce.SerializationMap.getMap().classNameMap,t,"layer",n)}function pm(e,t){return X(()=>{e.dtype!=="float32"&&(e=me(e,"float32"));let n=ve(yh(e),t,!0),s=zr(n.shape,mn()),r=Ln(oa(n,s));return ge(e,r)})}function lu(e,t){return X(()=>Wt(yh(ye(t,e)),-1))}function J0(e,t){return X(()=>Wt(rn(ye(t,e)),-1))}function Yc(e,t){return X(()=>{let n=ye(e,t),s=bs(rn(e),mn(),Number.MAX_VALUE),r=rn(ge(n,s));return M(100,Wt(r,-1))})}function NU(e,t){return X(()=>{let n=bs(t,mn(),Number.MAX_VALUE),s=Ms(le(1,n)),r=bs(e,mn(),Number.MAX_VALUE),a=Ms(le(1,r));return Wt(yh(ye(s,a)),-1)})}function EU(e,t){return X(()=>{let n=oa(0,ye(1,M(e,t)));return Wt(yh(n),-1)})}function RU(e,t){return X(()=>{let n=oa(0,ye(1,M(e,t)));return Wt(n,-1)})}function _U(e,t){return X(()=>{let n=ve(M(e,t),-1),s=yn(M(ye(1,e),t),-1);return oa(0,le(1,ye(s,n)))})}function DU(e,t){return X(()=>{let n=Math.log(2),s=ye(t,e),r=ye(le(s,su(M(-2,s))),n);return Wt(r,-1)})}function gp(e,t,n=!1){return X(()=>{if(n)t=au(t);else{let s=ve(t,t.shape.length-1,!0);t=ge(t,s)}return t=bs(t,mn(),1-mn()),Dt(ve(M(me(e,"float32"),Ms(t)),t.shape.length-1))})}function hm(e,t,n=!1){return X(()=>{let s=me(Hc(BV(e)),"int32");t=bs(t,mn(),1-mn());let r=t.shape,a=W(ec(s,r[r.length-1]),r);return gp(a,t,n)})}function $U(e,t){if(!v.arraysEqual(e.shape,t.shape))throw new H(`logits and labels must have the same shape, but got shapes ${JSON.stringify(e.shape)} and ${JSON.stringify(t.shape)}`);return X(()=>{let n=Lr(t),s=Dt(rn(t));return le(ye(n,M(t,e)),rh(Os(s)))})}function Q0(e,t){return X(()=>{let n;return n=bs(t,mn(),1-mn()),n=Ms(ge(n,ye(1,n))),Wt($U(e,n),-1)})}function PU(e,t){return X(()=>{let n=bs(e,mn(),1),s=bs(t,mn(),1);return ve(M(e,Ms(ge(n,s))),-1)})}function FU(e,t){return X(()=>{let n=Ms(le(mn(),t));return Wt(ye(t,M(e,n)),-1)})}function i5(e,t){return X(()=>{let n=pm(e,-1),s=pm(t,-1),r=M(n,s);return Dt(ve(r,-1))})}var fm={meanSquaredError:lu,meanAbsoluteError:J0,meanAbsolutePercentageError:Yc,meanSquaredLogarithmicError:NU,squaredHinge:EU,hinge:RU,categoricalHinge:_U,logcosh:DU,categoricalCrossentropy:gp,sparseCategoricalCrossentropy:hm,binaryCrossentropy:Q0,kullbackLeiblerDivergence:PU,poisson:FU,cosineProximity:i5};function r3(e){if(typeof e=="string"){if(e in fm)return fm[e];let t=`Unknown loss ${e}`;throw e.toLowerCase().includes("softmaxcrossentropy")&&(t=`Unknown loss ${e}. Use "categoricalCrossentropy" as the string name for tf.losses.softmaxCrossEntropy`),new H(t)}else return e}function l5(e,t){return X(()=>{let n=M(.5,zs(t)),s=mh(ks(t,n),e.dtype);return Wt(Fs(e,s),-1)})}function u5(e,t){return X(()=>mh(Fs(Ps(e,-1),Ps(t,-1)),"float32"))}function Wk(e,t){return X(()=>me(ve(gr(Fs(e,1),Fs(t,1))),"float32"))}function OU(e,t){return X(()=>me(ve(gr(Fs(e,1),Fs(t,0))),"float32"))}function MU(e,t){return X(()=>me(ve(gr(Fs(e,0),Fs(t,1))),"float32"))}function Vk(e,t){return X(()=>{let n=Wk(e,t),s=MU(e,t),r=le(n,s);return me(qn(ks(r,0),ge(n,r),0),"float32")})}function zU(e,t){return X(()=>{let n=Wk(e,t),s=OU(e,t),r=le(n,s);return me(qn(ks(r,0),ge(n,r),0),"float32")})}function Uk(e,t){return Q0(e,t)}function Gk(e,t){return e.rank===t.rank&&(e=Ge(e,[e.rank-1])),t=Ps(t,-1),t.dtype!==e.dtype&&(t=me(t,e.dtype)),me(Fs(e,t),"float32")}var LU=lu,BU=lu,WU=J0,VU=J0,UU=Yc,GU=Yc,c5=gp,HU=i5,Hk=hm,mm={binaryAccuracy:l5,categoricalAccuracy:u5,precision:Vk,categoricalCrossentropy:c5,sparseCategoricalCrossentropy:Hk,mse:LU,MSE:BU,mae:WU,MAE:VU,mape:UU,MAPE:GU,cosine:HU};function jU(e){if(typeof e=="string"&&e in mm)return mm[e];if(typeof e!="string"&&e!=null)return e;throw new H(`Unknown metric ${e}`)}function Df(e){if(Kr(e!==null,`Unknown LossOrMetricFn ${e}`),typeof e=="string")return e;{let t;for(let n of Object.keys(fm))if(fm[n]===e){t=n;break}if(t!==void 0)return t;for(let n of Object.keys(mm))if(mm[n]===e){t=n;break}return t!==void 0?t:e.name}}function qU(e){let t={Adagrad:()=>zi.adagrad(.01),Adadelta:()=>zi.adadelta(1,.95,mn()),Adam:()=>zi.adam(.001,.9,.999,mn()),Adamax:()=>zi.adamax(.002,.9,.999,mn(),0),RMSProp:()=>zi.rmsprop(.001,.9,0,mn()),SGD:()=>zi.sgd(.01)};if(t.adagrad=t.Adagrad,t.adadelta=t.Adadelta,t.adam=t.Adam,t.adamax=t.Adamax,t.rmsprop=t.RMSProp,t.sgd=t.SGD,e in t)return t[e]();throw new H(`Unknown Optimizer ${e}`)}var Wv=1*1024*1024;function Vv(e,t,n=!1){if(e==null||typeof e!="object"||Object.getPrototypeOf(e)!==Object.prototype||!$3(e))throw new Error("User-defined metadata is expected to be a JSON object, but is not.");if(n){let s=JSON.stringify(e);s.length>Wv&&console.warn(`User-defined metadata of model "${t}" is too large in size (length=${s.length} when serialized). It is not recommended to store such large objects in user-defined metadata. Please make sure its serialized length is <= ${Wv}.`)}}function $3(e){if(e===null)return!0;if(typeof e=="object")if(Object.getPrototypeOf(e)===Object.prototype){let t=Object.keys(e);for(let n of t)if(typeof n!="string"||!$3(e[n]))return!1;return!0}else if(Array.isArray(e)){for(let t of e)if(!$3(t))return!1;return!0}else return!1;else{let t=typeof e;return t==="string"||t==="number"||t==="boolean"}}function XU(e,t,n,s=console.log){let r=ZU(e),a=["Layer (type)","Input Shape","Output shape","Param #"];r?(t=t||90,n=n||[.32,.61,.89,1]):(t=t||115,n=n||[.24,.48,.7,.8,1]),n[n.length-1]<=1&&(n=n.map(c=>Math.floor(t*c)));let o;if(!r){a.push("Receives inputs"),o=[];for(let c in e.nodesByDepth)o.push(...e.nodesByDepth[c])}s("_".repeat(t)),gm(a,n,s),s("=".repeat(t));let i=e.layers;for(let c=0;c1||r.length===1&&r[0].inboundLayers.length>1){t=!1;break}s.push(...r)}if(t)for(let r of e.layers){let a=!1;for(let o of r.inboundNodes)if(s.indexOf(o)!==-1)if(a){t=!1;break}else a=!0;if(!t)break}return t}function gm(e,t,n=console.log){let s="";for(let r=0;r0&&(s=s.slice(0,s.length-1)+" "),s+=e[r],s=s.slice(0,t[r]),s+=" ".repeat(t[r]-s.length);n(s)}function YU(e,t,n){let s,r;try{r=e.inboundNodes.map(l=>JSON.stringify(l.inputShapes)).join(",")}catch(l){r="multiple"}try{s=JSON.stringify(e.outputShape)}catch(l){s="multiple"}let a=e.name,o=e.getClassName(),i=[`${a} (${o})`,r,s,e.countParams().toString()];gm(i,t,n)}function JU(e,t,n,s){let r,a;try{a=e.inboundNodes.map(p=>JSON.stringify(p.inputShapes)).join(",")}catch(p){a="multiple"}try{r=JSON.stringify(e.outputShape)}catch(p){r="multiple"}let o=[];for(let p of e.inboundNodes)if(!(n!=null&&n.length>0&&n.indexOf(p)===-1))for(let d=0;dy.name)}`);Qa(this.outputs).length!==this.outputs.length&&console.warn(`The list of outputs passed to the model is redundant. All outputs should only appear once. Found: ${this.outputs.map(y=>y.name)}`),this.inputLayers=[],this.inputLayersNodeIndices=[],this.inputLayersTensorIndices=[],this.outputLayers=[],this.outputLayersNodeIndices=[],this.outputLayersTensorIndices=[],this.layers=[],this.internalContainerRefs=[];for(let y of this.outputs){let x=y.sourceLayer,A=y.nodeIndex,b=y.tensorIndex;this.outputLayers.push(x),this.outputLayersNodeIndices.push(A),this.outputLayersTensorIndices.push(b)}for(let y of this.inputs){let x=y.sourceLayer,A=y.nodeIndex,b=y.tensorIndex;Kr(A===0,"input layer has >1 nodes"),Kr(b===0,"input layer has >1 tensors"),this.inputLayers.push(x),this.inputLayersNodeIndices.push(A),this.inputLayersTensorIndices.push(b)}this.inputNames=[],this.outputNames=[],this.feedInputShapes=[],this.feedInputNames=[],this.feedOutputNames=[];for(let y=0;yy.shape),this.internalOutputShapes=this.outputs.map(y=>y.shape);let t={},n={},s={},r={},a={},o=[],i=(y,x,A,b,w,k)=>{(b==null||w==null||k==null)&&(b=y.sourceLayer,w=y.nodeIndex,k=y.tensorIndex);let C=b.inboundNodes[w];if(A.indexOf(C)!==-1)throw new Rr(`The tensor ${y.name} at layer "${b.name}" is part of a cycle.`);if(x.indexOf(C)!==-1)return;this.containerNodes.add(qr.nodeKey(b,w)),b.id in a||(a[b.id]=Object.keys(a).length),A.indexOf(C)===-1&&A.push(C);let N=C.inboundLayers.length;for(let R=0;R=0;)A.splice(A.indexOf(C),1);o.push(C)},l=[],u=[];for(let y of this.outputs)i(y,l,u);let c=o.slice().reverse();for(let y of c){n[y.id]=y,y.id in t||(t[y.id]=0);let x=t[y.id],A=s[y.outboundLayer.id]==null?0:s[y.outboundLayer.id];x=Math.max(x,A),s[y.outboundLayer.id]=x,r[y.outboundLayer.id]=y.outboundLayer,t[y.id]=x;for(let b=0;bparseInt(y,10)).sort(Ef);this.layers=[];for(let y of h){let x=d[y];x.sort((A,b)=>{let w=a[A.id],k=a[b.id];return wk?1:0});for(let A of x)A instanceof qr&&this.internalContainerRefs.push(A),this.layers.push(A)}this.layersByDepth=d,h=Object.keys(p).map(y=>parseInt(y,10)).sort(Ef);let f=this.inputs.slice(),m=[];for(let y of h)for(let x of p[y]){let A=x.outboundLayer;if(A!=null){for(let b of x.inputTensors)if(f.indexOf(b)===-1)throw new Rr(`Graph disconnected: cannot obtain value for tensor ${b} at layer "${A.name}". The following previous layers were accessed without issue: ${m}`);for(let b of x.outputTensors)f.push(b);m.push(A.name)}}this.nodesByDepth=p;let g=this.layers.map(y=>y.name);for(let y of g){let x=g.filter(A=>A===y).length;if(x!==1)throw new Rr(`The name "${y}" is used ${x} times in the model. All layer names should be unique. Layer names: `+JSON.stringify(g))}this.outboundNodes=[],this.inboundNodes=[],new Y0({outboundLayer:this,inboundLayers:[],nodeIndices:[],tensorIndices:[],inputTensors:this.inputs,outputTensors:this.outputs,inputMasks:this.inputs.map(y=>null),outputMasks:this.outputs.map(y=>null),inputShapes:this.inputs.map(y=>y.shape),outputShapes:this.outputs.map(y=>y.shape)}),this.built=!0,this._refCount=1}assertNotDisposed(){if(this._refCount===0)throw new Error(`Container '${this.name}' is already disposed.`)}dispose(){this.assertNotDisposed();let e={refCountAfterDispose:null,numDisposedVariables:0};if(--this._refCount===0){for(let t of this.layers)e.numDisposedVariables+=t.dispose().numDisposedVariables;for(let t of this.internalContainerRefs)e.numDisposedVariables+=t.dispose().numDisposedVariables}return e.refCountAfterDispose=this._refCount,e}get trainable(){return this.trainable_}set trainable(e){this.layers.forEach(t=>{t._trainableWeights.forEach(n=>n.trainable=e)}),this.trainable_=e}get trainableWeights(){if(this._trainableWeights.length>0)throw new H("Container instance unexpectedly contains _trainableWeights.The trainable weights of a Container are a union of the trainable weights of its consituent Layers. Its own _trainableWeights must remain an empty Array.");if(!this.trainable)return[];let e=[];for(let t of this.layers)e=e.concat(t.trainableWeights);return e}get nonTrainableWeights(){let e=[];for(let t of this.layers)e.push(...t.nonTrainableWeights);if(!this.trainable){let t=[];for(let n of this.layers)t.push(...n.trainableWeights);return t.concat(e)}return e}get weights(){return this.trainableWeights.concat(this.nonTrainableWeights)}loadWeights(e,t=!0){let n={},s=0;for(let a of this.layers)for(let o of a.weights){if(n[o.originalName]!=null)throw new H(`Duplicate weight name: ${o.originalName}`);n[o.originalName]=o,s++}let r=[];for(let a in e){let o=a;if(n[a]==null){let i=a.split("/");o=i.slice(0,-2).concat([i[i.length-1]]).join("/")}if(n[o]!=null)r.push([n[o],e[a]]);else if(t)throw new H(`Provided weight data has no target variable: ${a}`);delete n[o]}if(t){let a=[];for(let o in n)a.push(o);if(a.length>0)throw new H(`${a.length} of ${s} weights are not set: ${a}`)}t5(r)}updatedConfig(){let e=this.getConfig(),t={};return t.className=this.getClassName(),t.config=e,t.kerasVersion=`tfjs-layers ${d5}`,t.backend="TensorFlow.js",t}toJSON(e,t=!0){let n=P3(this.updatedConfig());return t?JSON.stringify(n):n}call(e,t){return X(()=>{e=_t(e);let n=new Hi;for(let s=0;s{e=_t(e);let n;return t==null?n=rl(null,e.length):n=_t(t),this.runInternalGraph(e,n)[1]})}computeOutputShape(e){let t=lm(e);if(t.length!==this.inputLayers.length)throw new H(`Invalid inputShape argument ${e}: model has ${this.inputLayers.length} tensor inputs.`);let n={};for(let o=0;oparseInt(o,10)).sort(Ef);if(s.length>1)for(let o of s){let i=this.nodesByDepth[o];for(let l of i){let u=l.outboundLayer;if(this.inputLayers.map(f=>f.id).indexOf(u.id)!==-1)continue;let c=[];for(let f=0;fparseInt(i,10)).sort(Ef);for(let i of s){let l=this.nodesByDepth[i];for(let u of l){let c=u.outboundLayer,p=u.inputTensors,d=u.outputTensors,h=new Array;for(let f of p)f.id in n&&h.push(n[f.id]);if(h.length===p.length){let f={},m,g,y,x;if(u.callArgs!=null&&(f=u.callArgs),h.length===1){let[A,b]=h[0];f.mask==null&&(f.mask=b),y=_t(c.call(A,f)),x=_t(c.computeMask(A,b)),m=[A],g=[b]}else m=h.map(A=>A[0]),g=h.map(A=>A[1]),f.mask==null&&(f.mask=g),y=_t(c.call(m,f)),x=_t(c.computeMask(m,g));if(c.activityRegularizer)throw new Ke("LayersModel invocation with concrete Tensor value(s) in the presence of activity regularizer(s) is not supported yet.");for(let A=0;A{let e=[];for(let t of this.layers)for(let n=0;n0){let f=[];for(let m=0;m0&&m.apply(ys(y),x)}function l(m){let g=m.name,y=$r(m,t.customObjects!=null?t.customObjects:{});y.setFastWeightInitDuringBuild(s),r[g]=y,m.inboundNodes.forEach(A=>{if(!(A instanceof Array))throw new H(`Corrupted configuration, expected array for nodeData: ${A}`);o(y,A)})}let u=t.name,c=t.layers;for(let m of c)l(m);for(;!TV(a);)for(let m of c){let g=r[m.name];if(g.name in a){let y=a[g.name];delete a[g.name];for(let x of y)i(g,x)}}let p=[],d=[],h=t.inputLayers;for(let m of h){let g=m[0],y=m[1],x=m[2];Kr(g in r);let b=r[g].inboundNodes[y].outputTensors;p.push(b[x])}let f=t.outputLayers;for(let m of f){let g=m[0],y=m[1],x=m[2];Kr(g in r);let b=r[g].inboundNodes[y].outputTensors;d.push(b[x])}return new e({inputs:p,outputs:d,name:u})}get stateful(){if(this._stateful)throw new H("Container instance unexpectedly has _stateful = true. The statefulness of a Container is determined by the Layers it contains. Its _stateful property must remain the default false.");for(let e of this.layers)if(e.stateful)return!0;return!1}resetStates(){X(()=>{this.layers.forEach(e=>{e.stateful&&e.resetStates()})})}};function QU(e,t,n){let s=t.length;if(e==null||Array.isArray(e)&&e.length===0)return t.map(r=>null);if(s===1)return Array.isArray(e)&&e.length===1?e:typeof e=="object"&&t[0]in e?[e[t[0]]]:[e];if(Array.isArray(e)){if(e.length!==s)throw new Error(`Provided ${n} is an array of ${e.length} element(s), but the model has ${s} outputs. Make sure a set of weights is provided for each model output.`);return e}else if(typeof e=="object"&&Object.keys(e).length>0&&typeof e[Object.keys(e)[0]]=="object"){let r=[];return t.forEach(a=>{a in e?r.push(e[a]):r.push(null)}),r}else throw new Error(`The model has multiple (${s}) outputs, so ${n} must be either an array with ${s} elements or an object with ${t} keys. Provided ${n} not understood: ${JSON.stringify(e)}`)}function qk(e,t){return QU(e,t,"classWeight")}async function Xk(e,t,n,s){if(t!=null||s!=null)throw new Error("Support sampleWeight is not implemented yet");if(n!=null){let r=X(()=>{if(e.shape.length===1)return Hn(e);if(e.shape.length===2){if(e.shape[1]>1)return Ps(e,1);if(e.shape[1]===1)return W(e,[e.shape[0]]);throw new Error(`Encountered unexpected last-dimension size (${e.shape[1]}) during handling of class weights. The size is expected to be >= 1.`)}else throw new Error(`Unexpected rank of target (y) tensor (${e.rank}) during handling of class weights. The rank is expected to be 1 or 2.`)}),a=Array.from(await r.data());Y(r);let o=[];return a.forEach(i=>{if(n[i]==null)throw new Error(`classWeight must contain all classes in the training data. The class ${i} exists in the data but not in classWeight`);o.push(n[i])}),Ot(o,"float32")}else return null}function eG(e,t){return M(e,t)}var tG=32;function Kk(e,t){let n,s,r=t;n=r.xs,s=r.ys,v.assert(n!=null&&s!=null,()=>`A Dataset iterator for fitDataset() is expected to generate objects of the form \`{xs: xVal, ys: yVal}\`, where the two values may be \`tf.Tensor\`, an array of Tensors, or a map of string to Tensor. The provided Dataset instead generates ${t}`);let a=Uv("input",e.inputNames,n),o=Uv("output",e.outputNames,s),i=a[0].shape[0];v.assert(a.length===e.inputs.length,()=>`LayersModel has ${e.inputs.length} inputs, but the dataset provides ${a.length} inputs. (Expected input keys: ${JSON.stringify(e.inputNames)})`),v.assert(o.length===e.outputs.length,()=>`LayersModel has ${e.outputs.length} outputs, but the dataset provides ${o.length} outputs. (Expected output keys: ${JSON.stringify(e.outputNames)})`);for(let l=0;l`Batch size mismatch: input ${e.inputNames[l]} has ${a[l].shape[0]}; expected ${i} based on input ${e.inputNames[0]}.`);for(let l=0;l`Batch size mismatch: output ${e.outputNames[l]} has ${o[l].shape[0]}; expected ${i} based on input ${e.inputNames[0]}.`);return{xs:a,ys:o}}function Uv(e,t,n){if(n instanceof st)return[n];if(Array.isArray(n))return v.assert(n.length===t.length,()=>`Received an array of ${n.length} Tensors, but expected ${t.length} to match the ${e} keys ${t}.`),n;{let s=[];for(let r of t){if(n[r]==null)throw new H(`The feature data generated by the dataset lacks the required ${e} key '${r}'.`);s.push(n[r])}return s}}function nG(e){if(e.length===3)throw new Ke("Validation with sample weights is not implemented yet.");return{xs:e[0],ys:e[1]}}async function sG(e,t,n){let s=n.batchesPerEpoch!=null;if(v.assert(e.optimizer!=null,()=>"You must compile a model before training/testing. Use LayersModel.compile(modelCompileConfig)."),v.assert(n!=null,()=>"For fitDataset(), the 2nd argument (config) is required, but it is not provided in this call."),v.assert(n.epochs!=null&&n.epochs>0&&Number.isInteger(n.epochs),()=>`For fitDataset(), config.epochs is expected to be a positive integer, but got ${n.epochs}`),v.assert(!s||n.batchesPerEpoch>0&&Number.isInteger(n.batchesPerEpoch),()=>`For fitDataset(), config.batchesPerEpoch is expected to be a positive integer if specified, but got ${n.batchesPerEpoch}`),v.assert(n.validationSplit==null,()=>"`validationSplit` is not supported by `fitDataset()`. Use validationData instead."),e.isTraining)throw new Error("Cannot start training because another fit() call is ongoing.");e.isTraining=!0;try{let r=n.validationData!=null,a,o;if(r)if(Gv(n.validationData))v.assert(n.validationBatches==null||n.validationBatches>0&&Number.isInteger(n.validationBatches),()=>`For fitDataset() with dataset-based validation, config.validationBatches is expected not to be provided, or to be a positive integer, but got ${n.validationBatches}`);else{let g=nG(n.validationData);a=g.xs,o=g.ys}let i=e.makeTrainFunction(),l=e.getDedupedMetricsNames(),u;r?u=l.slice().concat(l.map(g=>"val_"+g)):u=l.slice();let c=Lk(n.callbacks,n.yieldEvery),p=n.verbose==null?1:n.verbose,{callbackList:d,history:h}=Bk(c,p,n.epochs,null,null,rG(t,n),null,r,u);d.setModel(e),e.history=h,await d.onTrainBegin(),e.stopTraining_=!1;let f=n.initialEpoch==null?0:n.initialEpoch,m=await t.iterator();for(;f=n.batchesPerEpoch:A.done){if(r){let b;Gv(n.validationData)?b=_t(await e.evaluateDataset(n.validationData,{batches:n.validationBatches})):b=_t(e.evaluate(a,o,{batchSize:n.validationBatchSize==null?tG:n.validationBatchSize,verbose:0}));for(let w=0;w0)throw new Ke("Verbose mode is not implemented yet.");v.assert(!s||n.batches>0&&Number.isInteger(n.batches),()=>`Test loop expects \`batches\` to be a positive integer, but received ${JSON.stringify(n.batches)}`);let o=aG(t)?t:await t.iterator(),i=0,l=0;for(;!s||l{if(u.value){let{xs:c,ys:p}=Kk(e,u.value),d=c.concat(p),h=X(()=>r(d));if(Y(d),l===0)for(let m=0;mle(a[m],M(f,g))),l>0&&Y(y)}Y(h),i+=f,++l}return a}),u.done){s&&console.warn(`Your dataset iterator ran out of data during evaluateDataset(). Interrupting evalution. Make sure that your dataset can generate at least \`batches\` batches (in this case, ${n.batches} batches). You may need to use the repeat() function when building your dataset.`);break}}for(let u=0;u0&&Number.isInteger(e),()=>`batchSize is required to be a positive integer, but got ${e}`)}function Xd(e,t,n){return e==null?[null]:Array.isArray(e)?e.map(s=>Zi(s,t,n-t)):Zi(e,t,n-t)}function p5(e,t){return X(()=>e==null?null:Array.isArray(e)?e.map(n=>p5(n,t)):Tk(e,t.dtype==="int32"?t:me(t,"int32")))}function O3(e,t){let n=[],s=0,r=null;for(;s=e&&(r=e),n.push([s,r]),s=r;return n}async function iG(e,t,n,s,r,a,o,i,l,u,c,p,d,h,f){r==null&&(r=32),a==null&&(a=1),c==null&&(c=!0),d==null&&(d=0);let m=!1;if(l!=null&&u!=null&&(m=!0),f!=null&&(m=!0,h==null))throw new H("Can only use `validationSteps` when doing step-wise training, i.e., `stepsPerEpoch` must be set.");let g=e.checkNumSamples(n,r,h,"steps_per_epoch"),y;g!=null&&(y=Fr(0,g)),o==null&&(o=1);let{callbackList:x,history:A}=Bk(i,o,a,d,g,h,r,m,p);x.setModel(e),e.history=A,await x.onTrainBegin(),e.stopTraining_=!1;for(let b=d;b{let D=C[N][0],E=C[N][1],$=Zi(k,D,E-D);R.batch=N,R.size=E-D;let S=p5(n,$),F=t(S);for(let z=0;z0){if(g=!0,s.validationData.length===2)l=s.validationData[0],u=s.validationData[1];else throw s.validationData.length===3?new Ke("validationData including sample weights is not supported yet."):new H(`When passing validation data, it must contain 2 (valX, valY) or 3 (valX, valY, valSampleWeight) items; ${s.validationData} is invalid.`);let R=!0,D=await e.standardizeUserData(l,u,null,null,R,h);c=D[0],p=D[1],y=c.concat(p)}else if(s.validationSplit!=null&&s.validationSplit>0&&s.validationSplit<1){g=!0;let R=Math.floor(r[0].shape[0]*(1-s.validationSplit)),D=r[0].shape[0];c=Xd(r,R,D),o=r,r=Xd(r,0,R),p=Xd(a,R,D),i=a,a=Xd(a,0,R),y=c.concat(p)}else s.validationSteps!=null&&(g=!0);let x=r.concat(a).concat(d);e.checkTrainableWeightsConsistency();let A=e.makeTrainFunction(),b=e.getDedupedMetricsNames(),w,k;g?(e.makeTestFunction(),w=e.testFunction,k=b.slice().concat(b.map(R=>"val_"+R))):(w=null,y=[],k=b.slice());let C=Lk(s.callbacks,s.yieldEvery);return await iG(e,A,x,b,h,s.epochs,s.verbose,C,w,y,s.shuffle,k,s.initialEpoch,null,null)}finally{e.isTraining=!1,Er(r,t),Er(a,n),Er(o,t),Er(i,n),Er(c,l),Er(p,u),d!=null&&Y(d)}}function Zk(e){let t=[];e instanceof st&&(e=[e]);for(let n=0;nn.push(r.id));else if(t!=null)for(let r in t){let a=t[r];n.push(a.id)}let s=[];if(e instanceof st)n.indexOf(e.id)===-1&&s.push(e);else if(Array.isArray(e))e.forEach(r=>{n.indexOf(r.id)===-1&&s.push(r)});else if(e!=null)for(let r in e){let a=e[r];n.indexOf(a.id)===-1&&s.push(a)}s.forEach(r=>{r.isDisposed||r.dispose()})}function uG(e){return e instanceof st}function M3(e){return Array.isArray(e)}function Hv(e){return!uG(e)&&!M3(e)}function jv(e,t,n,s=!0,r=""){if(t==null||t.length===0){if(e!=null){let o=!1;if(M3(e)&&e.length>0)o=!0;else if(Hv(e)){for(let i in e)if(e.hasOwnProperty(i)){o=!0;break}}else o=!0;if(o)throw new H(`Error when checking model ${r} expected no data, but got ${e}`)}return[]}if(e==null)return t.map(o=>null);let a;if(Hv(e)){e=e,a=[];for(let o of t){if(e[o]==null)throw new H(`No data provided for "${o}". Need data for each key in: ${t}`);a.push(e[o])}}else if(M3(e)){if(e=e,e.length!==t.length)throw new H(`Error when checking model ${r}: the Array of Tensors that you are passing to your model is not the size the model expected. Expected to see ${t.length} Tensor(s), but instead got the following list of Tensor(s): ${e}`);a=e}else{if(e=e,t.length>1)throw new H(`The model ${r} expects ${t.length} Tensor(s), but only received one Tensor. Found: Tensor with shape ${e.shape}`);a=[e]}if(a=Zk(a),n!=null)for(let o=0;o=0&&u!==c)throw new H(`${r} expected a batch of elements where each example has shape [${n[o].slice(1,n[o].length)}] (i.e.,tensor shape [*,${n[o].slice(1,n[o].length)}]) but the ${r} received an input with ${i.shape[0]} examples, each with shape [${i.shape.slice(1,i.shape.length)}] (tensor shape [${i.shape}])`)}}return a}function cG(e,t,n){let s=Qa(e.map(a=>a.shape[0]));s.sort();let r=Qa(t.map(a=>a.shape[0]));if(r.sort(),s.length>1)throw new H(`All input Tensors (x) should have the same number of samples. Got array shapes: ${JSON.stringify(e.map(a=>a.shape))}`);if(r.length>1)throw new H(`All target Tensors (y) should have the same number of samples. Got array shapes: ${JSON.stringify(t.map(a=>a.shape))}`);if(s.length>0&&r.length>0&&!v.arraysEqual(s,r))throw new H(`Input Tensors should have the same number of samples as target Tensors. Found ${s[0]} input sample(s) and ${r[0]} target sample(s).`)}function dG(e,t,n){let s=[lu,Q0,gp];for(let r=0;r1)throw new H(`The model expects ${t.length} ${r} Tensors, but only received one Tensor. Found: array with shape ${JSON.stringify(e.shape)}.`);a=[e]}if(n!=null)for(let o=0;o[]);let n;if(typeof e=="string"||typeof e=="function")n=[e];else if(Array.isArray(e)||typeof e=="object")n=e;else throw new TypeError(`Type of metrics argument not understood. Expected an string,function, Array, or Object, found: ${e}`);if(Array.isArray(n))return t.map(s=>n);{let s=[];for(let r of t){let a=n.hasOwnProperty(r)?n[r]:[];Array.isArray(a)||(a=[a]),s.push(a)}return s}}var hG="layers-model",ba=class extends qr{constructor(e){super(e),this.isTraining=!1}summary(e,t,n=console.log){if(!this.built)throw new H("This model has never been called, thus its weights have not been created yet. So no summary can be displayed. Build the model first (e.g., by calling it on some test data).");XU(this,e,t,n)}compile(e){if(e.loss==null&&(e.loss=[]),this.loss=e.loss,typeof e.optimizer=="string")this.optimizer_=qU(e.optimizer),this.isOptimizerOwned=!0;else{if(!(e.optimizer instanceof _a))throw new H("User-defined optimizer must be an instance of tf.Optimizer.");this.optimizer_=e.optimizer,this.isOptimizerOwned=!1}let t=[];if(!Array.isArray(e.loss)&&typeof e.loss!="string"&&typeof e.loss!="function"){e.loss=e.loss;for(let a in e.loss)if(this.outputNames.indexOf(a)===-1)throw new H(`Unknown entry in loss dictionary: "${a}". Only expected the following keys: ${this.outputNames}`);for(let a of this.outputNames)e.loss[a]==null&&console.warn(`Output "${a}" is missing from loss dictionary. We assume this was done on purpose, and we will not be expecting data to be passed to ${a} during training`),t.push(r3(e.loss[a]))}else if(Array.isArray(e.loss)){if(e.loss.length!==this.outputs.length)throw new H(`When passing an Array as loss, it should have one entry per model output. The model has ${this.outputs.length} output(s), but you passed loss=${e.loss}.`);t=e.loss.map(o=>r3(o))}else{let a=r3(e.loss);this.outputs.forEach(o=>{t.push(a)})}this.lossFunctions=t,this.feedOutputNames=[],this.feedOutputShapes=[],this.feedLossFns=[];for(let a=0;a{for(let a=0;a1&&(this.metricsTensors.push([o,a]),this.metricsNames.push(this.outputNames[a]+"_loss"))}});let s=pG(e.metrics,this.outputNames),r=(a,o,i)=>{this.outputNames.length>1&&(o=this.outputNames[a]+"_"+o),this.metricsNames.push(o),this.metricsTensors.push([i,a])};Ki("metric",()=>{for(let a=0;a{let u="",c,p,d;for(let h of l){if(typeof h=="string"&&["accuracy","acc","crossentropy","ce"].indexOf(h)!==-1){let m=this.internalOutputShapes[a];m[m.length-1]===1||this.lossFunctions[a]===Q0?["accuracy","acc"].indexOf(h)!==-1?p=l5:["crossentropy","ce"].indexOf(h)!==-1&&(p=Uk):this.lossFunctions[a]===hm?["accuracy","acc"].indexOf(h)!==-1?p=Gk:["crossentropy","ce"].indexOf(h)!==-1&&(p=Hk):["accuracy","acc"].indexOf(h)!==-1?p=u5:["crossentropy","ce"].indexOf(h)!==-1&&(p=c5);let g;["accuracy","acc"].indexOf(h)!==-1?g="acc":["crossentropy","ce"].indexOf(h)!==-1&&(g="ce"),d=p,c=u+g}else d=jU(h),c=u+Df(h);let f;Ki(c,()=>{f=d}),r(a,c,f)}})(o)}}),this.collectedTrainableWeights=this.trainableWeights}checkTrainableWeightsConsistency(){this.collectedTrainableWeights!=null&&this.trainableWeights.length!==this.collectedTrainableWeights.length&&console.warn("Discrepancy between trainableweights and collected trainable weights. Did you set `model.trainable` without calling `model.compile()` afterwards?")}evaluate(e,t,n={}){let s=n.batchSize==null?32:n.batchSize;F3(s);let r=!0,a=this.standardizeUserDataXY(e,t,r,s);try{let o=a[0].concat(a[1]);this.makeTestFunction();let i=this.testFunction,l=this.testLoop(i,o,s,n.verbose,n.steps);return ys(l)}finally{Er(a[0],e),Er(a[1],t)}}async evaluateDataset(e,t){return this.makeTestFunction(),oG(this,e,t)}checkNumSamples(e,t,n,s="steps"){let r;if(n!=null){if(r=null,t!=null)throw new H(`If ${s} is set, batchSize must be null or undefined.Got batchSize = ${t}`)}else if(e!=null)Array.isArray(e)?r=e[0].shape[0]:r=e.shape[0];else throw new H(`Either the input data should have a defined shape, or ${s} shoud be specified.`);return r}execute(e,t){if(Array.isArray(t)&&t.length===0)throw new H("`outputs` is an empty Array, which is not allowed.");let n=Array.isArray(t),s=n?t:[t],r=this.retrieveSymbolicTensors(s),a=new Hi;if(e instanceof st&&(e=[e]),Array.isArray(e)){if(e.length!==this.inputs.length)throw new H(`The number of inputs provided (${e.length}) does not match the number of inputs of this model (${this.inputs.length}).`);for(let i=0;io.name);for(let o=0;o0){let s=[];throw t.forEach((r,a)=>{r==null&&s.push(e[a])}),new H(`Cannot find SymbolicTensors for output name(s): ${JSON.stringify(s)}`)}return t}predictLoop(e,t=32,n=!1){return X(()=>{let s=this.checkNumSamples(e);if(n)throw new Ke("Verbose predictLoop() is not implemented yet.");let r=O3(s,t),a=this.outputs.map(o=>[]);for(let o=0;o{let l=r[o][0],u=r[o][1],c=Xd(e,l,u),p=[];if(Array.isArray(c))for(let h=0;ha[u].push(l));return ys(a.map(o=>ut(o,0)))})}predict(e,t={}){let n=Zk(e);qv(n,this.inputNames,this.feedInputShapes,!1);try{let s=t.batchSize==null?32:t.batchSize;return F3(s),this.predictLoop(n,s)}finally{Er(n,e)}}predictOnBatch(e){qv(e,this.inputNames,this.feedInputShapes,!0);let t=(Array.isArray(e)?e[0]:e).shape[0];return this.predictLoop(e,t)}standardizeUserDataXY(e,t,n=!0,s){if(this.optimizer_==null)throw new Rr("You must compile a model before training/testing. Use LayersModel.compile(modelCompileArgs).");let r=[];for(let a=0;a0&&e[0].shape[0]%s!==0)throw new H(`In a stateful network, you should only pass inputs with a number of samples that is divisible by the batch size ${s}. Found: ${e[0].shape[0]} sample(s).`);return[e,t]}async standardizeUserData(e,t,n,s,r=!0,a){let[o,i]=this.standardizeUserDataXY(e,t,r,a);if(n!=null)throw new Error("sample weight is not supported yet.");let l=null;if(s!=null){let u=qk(s,this.outputNames);l=[];for(let c=0;c{let a=this.checkNumSamples(t,n,r,"steps"),o=[];if(s>0)throw new Ke("Verbose mode is not implemented yet.");if(r!=null)throw new Ke("steps mode in testLoop() is not implemented yet");{let i=O3(a,n),l=Ot(Fr(0,a));for(let u=0;u1&&(r+=`_${_v(e.slice(0,n),s)}`),t.push(r)}return t}makeTrainFunction(){return e=>{let t=[],n=e.slice(0,this.inputs.length),s=e.slice(this.inputs.length,this.inputs.length+this.outputs.length),r=e.slice(this.inputs.length+this.outputs.length,this.inputs.length+this.outputs.length*2),a=[],o=()=>{let c=[];for(let f=0;f1&&f{h=le(h,f)}),h},i=this.collectedTrainableWeights.map(c=>c.read()),l=!0;return[this.optimizer_.minimize(o,l,i)].concat(a)}}makeTestFunction(){this.testFunction=e=>X(()=>{let t=[],n,s=e.slice(0,this.inputs.length),r=e.slice(this.inputs.length,this.inputs.length+this.outputs.length),a=[];for(let l=0;lga(t))}else{let t=Object.keys(this.loss);e={};let n=this.loss;for(let s of t)if(typeof n[s]=="string")e[s]=ga(n[s]);else throw new Error("Serialization of non-string loss is not supported.")}return e}getMetricIdentifiers(){if(typeof this.metrics=="string"||typeof this.metrics=="function")return[ga(Df(this.metrics))];if(Array.isArray(this.metrics))return this.metrics.map(e=>ga(Df(e)));{let e={};for(let t in this.metrics)e[t]=ga(Df(this.metrics[t]));return e}}getTrainingConfig(){return{loss:this.getLossIdentifiers(),metrics:this.getMetricIdentifiers(),optimizer_config:{class_name:this.optimizer.getClassName(),config:this.optimizer.getConfig()}}}loadTrainingConfig(e){if(e.weighted_metrics!=null)throw new Error("Loading weight_metrics is not supported yet.");if(e.loss_weights!=null)throw new Error("Loading loss_weights is not supported yet.");if(e.sample_weight_mode!=null)throw new Error("Loading sample_weight_mode is not supported yet.");let t=yp(e.optimizer_config),n=$r(t),s;if(typeof e.loss=="string")s=Vi(e.loss);else if(Array.isArray(e.loss))s=e.loss.map(a=>Vi(a));else if(e.loss!=null){s={};for(let a in e.loss)s[a]=Vi(e.loss[a])}let r;if(Array.isArray(e.metrics))r=e.metrics.map(a=>Vi(a));else if(e.metrics!=null){r={};for(let a in e.metrics)r[a]=Vi(e.metrics[a])}this.compile({loss:s,metrics:r,optimizer:n})}async save(e,t){if(typeof e=="string"){let l=On.getSaveHandlers(e);if(l.length===0)throw new H(`Cannot find any save handlers for URL '${e}'`);if(l.length>1)throw new H(`Found more than one (${l.length}) save handlers for URL '${e}'`);e=l[0]}if(e.save==null)throw new H("LayersModel.save() cannot proceed because the IOHandler provided does not have the `save` attribute defined.");let n=await On.encodeWeights(this.getNamedWeights(t)),s=!1,r=null,o={modelTopology:this.toJSON(r,s),format:hG,generatedBy:`TensorFlow.js tfjs-layers v${d5}`,convertedBy:null};if((t==null?!1:t.includeOptimizer)&&this.optimizer!=null){o.trainingConfig=this.getTrainingConfig();let l="optimizer",{data:u,specs:c}=await On.encodeWeights(await this.optimizer.getWeights(),l);n.specs.push(...c),n.data=On.concatenateArrayBuffers([n.data,u])}return this.userDefinedMetadata!=null&&(Vv(this.userDefinedMetadata,this.name,!0),o.userDefinedMetadata=this.userDefinedMetadata),o.weightData=n.data,o.weightSpecs=n.specs,e.save(o)}setUserDefinedMetadata(e){Vv(e,this.name),this.userDefinedMetadata=e}getUserDefinedMetadata(){return this.userDefinedMetadata}};ba.className="Model";ce.registerClass(ba);var Yk=class extends ba{};Yk.className="Functional";ce.registerClass(Yk);async function fG(e,t){"modelTopology"in e||(e={modelTopology:e}),e=e;let n=e.modelTopology;n.model_config!=null&&(n=n.model_config);let s=yp(n),r=$r(s,t);if(e.weightsManifest!=null){let a=await On.loadWeights(e.weightsManifest,e.pathPrefix,r.weights.map(i=>i.originalName)),o={};for(let i of r.weights)o[i.originalName]=a[i.originalName];r.loadWeights(o),Y(a)}return r}async function mG(e,t){if(t==null&&(t={}),typeof e=="string"){let n=On.getLoadHandlers(e,t);if(n.length===0)n.push(On.browserHTTPRequest(e,t));else if(n.length>1)throw new H(`Found more than one (${n.length}) load handlers for URL '${e}'`);e=n[0]}return gG(e,void 0,t)}async function gG(e,t,n){if(n==null&&(n={}),e.load==null)throw new H("Cannot proceed with model loading because the IOHandler provided does not have the `load` method implemented.");let s=await e.load(),r=s.modelTopology;r.model_config!=null&&(r=r.model_config);let a=n.strict==null?!0:n.strict,o=s.weightData!=null&&s.weightSpecs!=null&&a,i=$r(yp(r),t,o),l=s.trainingConfig;if(l!=null&&i.loadTrainingConfig(l),s.userDefinedMetadata!=null&&i.setUserDefinedMetadata(s.userDefinedMetadata),s.weightData!=null){if(s.weightSpecs==null)throw new H("LayersModel artifacts contains weight data, but not weight specs. Therefore loading of weights cannot proceed.");let{modelWeights:u,optimizerWeights:c}=yG(s.weightData,s.weightSpecs);i.loadWeights(u,a),i.optimizer!=null&&c.length>0&&await i.optimizer.setWeights(c),Y(u),Y(c.map(p=>p.tensor))}return i}function yG(e,t){let n=On.decodeWeights(e,t),s={},r=[];return t.forEach(a=>{a.group==="optimizer"?r.push({name:a.name,tensor:n[a.name]}):s[a.name]=n[a.name]}),{modelWeights:s,optimizerWeights:r}}var ic=class extends ba{constructor(e){if(super({inputs:[],outputs:[]}),e=e||{},this.trainable=!0,this.built=!1,this.name=e.name!=null?e.name:V0("sequential_"),e.layers!=null)for(let t of e.layers)this.add(t)}checkShape(e){if(e.inboundNodes[0].outputTensors[0].shape.some(n=>n<0))throw new H(`Negative dimension size caused by adding layer ${e.name} with input shape [${e.inboundNodes[0].inputTensors[0].shape}]`)}add(e){let t=e instanceof ic||e instanceof ba,n;if(t){if(n=e,n.outputs.length!==1)throw new H("All layers in a Sequential model should have a single output tensor. For multi-output layers, use the functional API.");if(n.inputs.length!==1)throw new H("All layers in a Sequential model should have a single input tensor. For multi-input layers, use the functional API.")}if(this.outputs.length===0){if(e.inboundNodes.length===0){if(e.batchInputShape==null)throw new H("The first layer in a Sequential model must get an `inputShape` or `batchInputShape` argument.");let s=_k({batchShape:e.batchInputShape,dtype:e.dtype,name:e.name+"_input"});e.apply(s)}if(t)this.outputs=n.outputs,this.inputs=n.inputs;else{if(e.inboundNodes.length!==1)throw new H(`A layer added to a Sequential model must not already be connected somewhere else. LayersModel received layer ${e.name} which has ${e.inboundNodes.length} pre-existing inbound connections.`);if(e.inboundNodes[0].outputTensors.length!==1)throw new H("All layers in a Sequential model should have a single output tensor. For multi-output layers, use the functional API.");this.checkShape(e),this.outputs=[e.inboundNodes[0].outputTensors[0]],this.inputs=Rk(this.outputs[0])}this.inboundNodes=[],new Y0({outboundLayer:this,inboundLayers:[],nodeIndices:[],tensorIndices:[],inputTensors:this.inputs,outputTensors:this.outputs,inputMasks:rl(null,this.inputs.length),outputMasks:[null],inputShapes:this.inputs.map(s=>s.shape),outputShapes:this.outputs[0].shape})}else{let s=e.apply(this.outputs[0]);if(Array.isArray(s))throw new TypeError("All layers in a Sequential model should have a single output tensor. For multi-output layers, use the functional API.");this.checkShape(e),this.outputs=[s],this.inboundNodes[0].outputTensors=this.outputs,this.inboundNodes[0].outputShapes=[this.outputs[0].shape]}this.layers.push(e),this.built=!1}pop(){if(this.layers.length===0)throw new TypeError("There are no layers in the model.");if(this.layers.pop(),this.layers.length===0)this.outputs=[],this.inboundNodes=[],this.outboundNodes=[];else{let e=this.layers.length-1;this.layers[e].outboundNodes=[],this.outputs=[this.layers[e].output],this.inboundNodes[0].outputTensors=this.outputs,this.inboundNodes[0].outputShapes=[this.outputs[0].shape]}}call(e,t){return this.model==null&&this.build(),this.model.call(e,t)}build(e){if(At(e),this.inputs.length===0||this.outputs.length===0)throw new TypeError("Sequential model cannot be built: model is empty. Add some layers first.");this.model=new ba({inputs:this.inputs,outputs:this.outputs[0],name:this.name+"_model"}),this.model.trainable=this.trainable,this.supportsMasking=this.model.supportsMasking,this.inputLayers=this.model.inputLayers,this.inputLayersNodeIndices=this.model.inputLayersNodeIndices,this.inputLayersTensorIndices=this.model.inputLayersTensorIndices,this.outputLayers=this.model.outputLayers,this.outputLayersNodeIndices=this.model.outputLayersNodeIndices,this.outputLayersTensorIndices=this.model.outputLayersTensorIndices,this.nodesByDepth=this.model.nodesByDepth,this.containerNodes=this.model.containerNodes,this.outputNames=this.model.outputNames,this.inputNames=this.model.inputNames,this.built=!0}countParams(){return this.built||this.build(),super.countParams()}summary(e,t,n=console.log){this.built||this.build(),super.summary(e,t,n)}setWeights(e){this.model==null&&this.build(),this.model.setWeights(e)}evaluate(e,t,n={}){if(!this.built)throw new Rr("The model needs to be compiled before being used.");return this.model.evaluate(e,t,n)}async evaluateDataset(e,t){if(!this.built)throw new Rr("The model needs to be compiled before being used.");return this.model.evaluateDataset(e,t)}predict(e,t={}){return this.model==null&&this.build(),this.model.predict(e,t)}predictOnBatch(e){return this.model==null&&this.build(),this.model.predictOnBatch(e)}compile(e){this.build(),this.model.compile(e),this.optimizer_=this.model.optimizer,this.isOptimizerOwned=this.model.isOptimizerOwned,this.loss=this.model.loss,this.metrics=this.model.metrics,this.metricsTensors=this.model.metricsTensors,this.metricsNames=this.model.metricsNames}get optimizer(){return this.model==null?void 0:this.model.optimizer}set optimizer(e){this.model.optimizer=e}async fit(e,t,n={}){if(!this.built)throw new Rr("The model needs to be compiled before being used.");return this.model.fit(e,t,n)}async fitDataset(e,t){if(!this.built)throw new Rr("The model needs to be compiled before being used.");return this.model.fitDataset(e,t)}async trainOnBatch(e,t){return this.model.trainOnBatch(e,t)}static fromConfig(e,t,n={},s=!1){let r,a={};if(t instanceof Array){if(t[0].className==null||t[0].className==="Merge")throw new H("Legacy serialization format not supported yet.");r=t}else v.assert(t.layers!=null,()=>"When the config data for a Sequential model is not an Array, it must be an Object that contains the 'layers' field."),r=t.layers,delete t.layers,a=t;let o=new e(a);if(!(o instanceof ic))throw new Ke(`Sequential.fromConfig called on non-Sequential input: ${o}`);for(let i of r){let u=$r(i,void 0,s);s&&u.setFastWeightInitDuringBuild(!0),o.add(u)}return o}set stopTraining(e){if(this.model==null)throw new H("Cannot set the stopTraining property of a sequential model before it is compiled.");this.model.stopTraining=e}get stopTraining(){if(this.model==null)throw new H("Cannot get the stopTraining property of a sequential model before it is compiled.");return this.model.stopTraining}getConfig(){let e=[];for(let t of this.layers){let n={};n.className=t.getClassName(),n.config=t.getConfig(),e.push(n)}return{name:this.name,layers:e}}};ic.className="Sequential";ce.registerClass(ic);function AG(e){return new ba(e)}function xG(e){return new ic(e)}function bG(e,t){return t==null&&(t={}),mG(e,t)}function Jk(e){return _k(e)}function vG(e,t){hr.registerCallbackConstructor(e,t)}var Ss=class extends ce.Serializable{getConfig(){return{}}},Qk=class extends Ss{apply(e,t=1){return VV(e,t)}};Qk.className="elu";ce.registerClass(Qk);var e8=class extends Ss{apply(e){return w0(e)}};e8.className="selu";ce.registerClass(e8);var t8=class extends Ss{apply(e){return Lr(e)}};t8.className="relu";ce.registerClass(t8);var n8=class extends Ss{apply(e){return X(()=>qc(6,Lr(e)))}};n8.className="relu6";ce.registerClass(n8);var s8=class extends Ss{apply(e){return e}};s8.className="linear";ce.registerClass(s8);var r8=class extends Ss{apply(e){return Mn(e)}};r8.className="sigmoid";ce.registerClass(r8);var a8=class extends Ss{apply(e){return GV(e)}};a8.className="hardSigmoid";ce.registerClass(a8);var o8=class extends Ss{apply(e){return su(e)}};o8.className="softplus";ce.registerClass(o8);var i8=class extends Ss{apply(e){return UV(e)}};i8.className="softsign";ce.registerClass(i8);var l8=class extends Ss{apply(e){return tl(e)}};l8.className="tanh";ce.registerClass(l8);var h5=class extends Ss{apply(e,t=-1){return au(e,t)}};h5.className="softmax";ce.registerClass(h5);var u8=class extends Ss{apply(e,t=-1){return f0(e,t)}};u8.className="logSoftmax";ce.registerClass(u8);var c8=class extends Ss{apply(e,t=1){return X(()=>M(Mn(M(e,t)),e))}};c8.className="swish";ce.registerClass(c8);var d8=class extends Ss{apply(e){return X(()=>M(e,tl(su(e))))}};d8.className="mish";ce.registerClass(d8);function lo(e){return e.getClassName()}function a3(e,t={}){return fh(e,ce.SerializationMap.getMap().classNameMap,t,"activation")}function uo(e){if(e==null){let t={};return t.className="linear",t.config={},a3(t)}if(typeof e=="string"){let t={};return t.className=e,t.config={},a3(t)}else return e instanceof Ss?e:a3(e)}function f5(e){if(e!=null&&typeof e!="object")throw new Error(`Argument to L1L2 regularizer's constructor is expected to be an object, but received: ${e}`)}var p8=class extends ce.Serializable{},bh=class extends p8{constructor(e){super(),f5(e),this.l1=e==null||e.l1==null?.01:e.l1,this.l2=e==null||e.l2==null?.01:e.l2,this.hasL1=this.l1!==0,this.hasL2=this.l2!==0}apply(e){return X(()=>{let t=Vt([1]);return this.hasL1&&(t=le(t,ve(M(this.l1,rn(e))))),this.hasL2&&(t=le(t,ve(M(this.l2,yh(e))))),W(t,[])})}getConfig(){return{l1:this.l1,l2:this.l2}}static fromConfig(e,t){return new e({l1:t.l1,l2:t.l2})}};bh.className="L1L2";ce.registerClass(bh);function wG(e){return f5(e),new bh({l1:e!=null?e.l1:null,l2:0})}function kG(e){return f5(e),new bh({l2:e!=null?e.l2:null,l1:0})}var Xv={l1l2:"L1L2"};function wt(e){return HA(e)}function Kv(e,t={}){return fh(e,ce.SerializationMap.getMap().classNameMap,t,"regularizer")}function zt(e){if(e==null)return null;if(typeof e=="string"){let n={className:e in Xv?Xv[e]:e,config:{}};return Kv(n)}else return e instanceof p8?e:Kv(e)}var m5=class extends dt{constructor(e){super(e==null?{}:e),this.supportsMasking=!0,e!=null&&(this.maxValue=e.maxValue)}call(e,t){e=Ze(e);let n=Lr(e);return this.maxValue!=null&&(n=bs(n,0,this.maxValue)),n}computeOutputShape(e){return e}getConfig(){let e={maxValue:this.maxValue},t=super.getConfig();return Object.assign(e,t),e}};m5.className="ReLU";ce.registerClass(m5);var g5=class extends dt{constructor(e){super(e==null?{}:e),this.DEFAULT_ALPHA=.3,e==null&&(e={}),this.alpha=e.alpha==null?this.DEFAULT_ALPHA:e.alpha}call(e,t){let n=Ze(e);return sh(n,this.alpha)}computeOutputShape(e){return e}getConfig(){let e={alpha:this.alpha},t=super.getConfig();return Object.assign(e,t),e}};g5.className="LeakyReLU";ce.registerClass(g5);var y5=class extends dt{constructor(e){if(super(e==null?{}:e),this.DEFAULT_ALPHA_INITIALIZER="zeros",e==null&&(e={}),this.supportsMasking=!0,this.alphaInitializer=Mt(e.alphaInitializer||this.DEFAULT_ALPHA_INITIALIZER),this.alphaRegularizer=zt(e.alphaRegularizer),this.alphaConstraint=xn(e.alphaConstraint),e.sharedAxes==null)this.sharedAxes=null;else if(Array.isArray(e.sharedAxes))this.sharedAxes=e.sharedAxes;else if(typeof e.sharedAxes=="number")this.sharedAxes=[e.sharedAxes];else throw new H(`Expected sharedAxes to be a number or an array of numbers, but got ${e.sharedAxes}`)}build(e){e=At(e);let t=e.slice(1);if(this.sharedAxes!=null)for(let s of this.sharedAxes)t[s-1]=1;this.alpha=this.addWeight("alpha",t,"float32",this.alphaInitializer,this.alphaRegularizer,!0,this.alphaConstraint);let n={};if(this.sharedAxes!=null)for(let s=1;s(Qt(t),t==="channelsFirst"?tt(e,[0,2,3,1]):e))}function h8(e,t){return X(()=>(Qt(t),t==="channelsFirst"?tt(e,[0,2,3,4,1]):e))}function SG(e,t,n,s=1,r="valid",a,o=1){return X(()=>{if(a==null&&(a=Or()),Qt(a),e.shape.length!==3)throw new H(`The input of a conv1dWithBias operation should be 3, but is ${e.shape.length} instead.`);if(t.shape.length!==3)throw new H(`The kernel for a conv1dWithBias operation should be 3, but is ${t.shape.length} instead`);if(n!=null&&n.shape.length!==1)throw new H(`The bias for a conv1dWithBias operation should be 1, but is ${t.shape.length} instead`);if(a==="channelsFirst"&&(e=tt(e,[0,2,1])),r==="causal")throw new Ke("The support for CAUSAL padding mode in conv1dWithBias is not implemented yet.");let i=i0(e,t,s,r==="same"?"same":"valid","NWC",o);return n!=null&&(i=Br(i,n)),i})}function Zv(e,t,n,s=[1,1],r="valid",a,o,i=null){return X(()=>{if(a==null&&(a=Or()),Qt(a),e.rank!==3&&e.rank!==4)throw new H(`conv2dWithBiasActivation expects input to be of rank 3 or 4, but received ${e.rank}.`);if(t.rank!==3&&t.rank!==4)throw new H(`conv2dWithBiasActivation expects kernel to be of rank 3 or 4, but received ${e.rank}.`);let l=v5(e,a);if(r==="causal")throw new Ke("The support for CAUSAL padding mode in conv1dWithBias is not implemented yet.");return l=rc.conv2d({x:l,filter:t,strides:s,pad:r==="same"?"same":"valid",dilations:o,dataFormat:"NHWC",bias:n,activation:i}),a==="channelsFirst"&&(l=tt(l,[0,3,1,2])),l})}function IG(e,t,n,s=[1,1,1],r="valid",a,o){return X(()=>{if(a==null&&(a=Or()),Qt(a),e.rank!==4&&e.rank!==5)throw new H(`conv3dWithBias expects input to be of rank 4 or 5, but received ${e.rank}.`);if(t.rank!==4&&t.rank!==5)throw new H(`conv3dWithBias expects kernel to be of rank 4 or 5, but received ${e.rank}.`);let i=h8(e,a);if(r==="causal")throw new Ke("The support for CAUSAL padding mode in conv3dWithBias is not implemented yet.");return i=iA(i,t,s,r==="same"?"same":"valid","NDHWC",o),n!=null&&(i=Br(i,n)),a==="channelsFirst"&&(i=tt(i,[0,4,1,2,3])),i})}var w5=class extends dt{constructor(e,t){if(super(t),this.bias=null,this.DEFAULT_KERNEL_INITIALIZER="glorotNormal",this.DEFAULT_BIAS_INITIALIZER="zeros",w5.verifyArgs(t),this.rank=e,Tn(this.rank,"rank"),this.rank!==1&&this.rank!==2&&this.rank!==3)throw new Ke(`Convolution layer for rank other than 1, 2, or 3 (${this.rank}) is not implemented yet.`);if(this.kernelSize=Ku(t.kernelSize,e,"kernelSize"),this.strides=Ku(t.strides==null?1:t.strides,e,"strides"),this.padding=t.padding==null?"valid":t.padding,nr(this.padding),this.dataFormat=t.dataFormat==null?"channelsLast":t.dataFormat,Qt(this.dataFormat),this.activation=uo(t.activation),this.useBias=t.useBias==null?!0:t.useBias,this.biasInitializer=Mt(t.biasInitializer||this.DEFAULT_BIAS_INITIALIZER),this.biasConstraint=xn(t.biasConstraint),this.biasRegularizer=zt(t.biasRegularizer),this.activityRegularizer=zt(t.activityRegularizer),this.dilationRate=Ku(t.dilationRate==null?1:t.dilationRate,e,"dilationRate"),this.rank===1&&Array.isArray(this.dilationRate)&&this.dilationRate.length!==1)throw new H(`dilationRate must be a number or an array of a single number for 1D convolution, but received ${JSON.stringify(this.dilationRate)}`);if(this.rank===2){if(typeof this.dilationRate=="number")this.dilationRate=[this.dilationRate,this.dilationRate];else if(this.dilationRate.length!==2)throw new H(`dilationRate must be a number or array of two numbers for 2D convolution, but received ${JSON.stringify(this.dilationRate)}`)}else if(this.rank===3){if(typeof this.dilationRate=="number")this.dilationRate=[this.dilationRate,this.dilationRate,this.dilationRate];else if(this.dilationRate.length!==3)throw new H(`dilationRate must be a number or array of three numbers for 3D convolution, but received ${JSON.stringify(this.dilationRate)}`)}}static verifyArgs(e){if(Kr("kernelSize"in e,"required key 'kernelSize' not in config"),typeof e.kernelSize!="number"&&!jA(e.kernelSize,"number",1,3))throw new H(`BaseConv expects config.kernelSize to be number or number[] with length 1, 2, or 3, but received ${JSON.stringify(e.kernelSize)}.`)}getConfig(){let e={kernelSize:this.kernelSize,strides:this.strides,padding:this.padding,dataFormat:this.dataFormat,dilationRate:this.dilationRate,activation:lo(this.activation),useBias:this.useBias,biasInitializer:Ut(this.biasInitializer),biasRegularizer:wt(this.biasRegularizer),activityRegularizer:wt(this.activityRegularizer),biasConstraint:An(this.biasConstraint)},t=super.getConfig();return Object.assign(e,t),e}},vh=class extends w5{constructor(e,t){super(e,t),this.kernel=null,vh.verifyArgs(t),this.filters=t.filters,Tn(this.filters,"filters"),this.kernelInitializer=Mt(t.kernelInitializer||this.DEFAULT_KERNEL_INITIALIZER),this.kernelConstraint=xn(t.kernelConstraint),this.kernelRegularizer=zt(t.kernelRegularizer)}build(e){e=At(e);let t=this.dataFormat==="channelsFirst"?1:e.length-1;if(e[t]==null)throw new H(`The channel dimension of the input should be defined. Found ${e[t]}`);let n=e[t],s=this.kernelSize.concat([n,this.filters]);this.kernel=this.addWeight("kernel",s,null,this.kernelInitializer,this.kernelRegularizer,!0,this.kernelConstraint),this.useBias&&(this.bias=this.addWeight("bias",[this.filters],null,this.biasInitializer,this.biasRegularizer,!0,this.biasConstraint)),this.inputSpec=[{ndim:this.rank+2,axes:{[t]:n}}],this.built=!0}call(e,t){return X(()=>{e=Ze(e);let n,s=this.bias==null?null:this.bias.read(),r=vk(this.activation.getClassName());if(r!=null&&this.rank===2)n=Zv(e,this.kernel.read(),s,this.strides,this.padding,this.dataFormat,this.dilationRate,r);else{if(this.rank===1)n=SG(e,this.kernel.read(),s,this.strides[0],this.padding,this.dataFormat,this.dilationRate[0]);else if(this.rank===2)n=Zv(e,this.kernel.read(),s,this.strides,this.padding,this.dataFormat,this.dilationRate);else if(this.rank===3)n=IG(e,this.kernel.read(),s,this.strides,this.padding,this.dataFormat,this.dilationRate);else throw new Ke("convolutions greater than 3D are not implemented yet.");this.activation!=null&&(n=this.activation.apply(n))}return n})}computeOutputShape(e){e=At(e);let t=[],n=this.dataFormat==="channelsLast"?e.slice(1,e.length-1):e.slice(2);for(let r=0;r 0 but got ${JSON.stringify(e.filters)}`)}},wh=class extends vh{constructor(e){super(2,e),wh.verifyArgs(e)}getConfig(){let e=super.getConfig();return delete e.rank,e}static verifyArgs(e){if(typeof e.kernelSize!="number"&&!jA(e.kernelSize,"number",1,2))throw new H(`Conv2D expects config.kernelSize to be number or number[] with length 1 or 2, but received ${JSON.stringify(e.kernelSize)}.`)}};wh.className="Conv2D";ce.registerClass(wh);var kh=class extends vh{constructor(e){super(3,e),kh.verifyArgs(e)}getConfig(){let e=super.getConfig();return delete e.rank,e}static verifyArgs(e){if(typeof e.kernelSize!="number"&&!(Array.isArray(e.kernelSize)&&(e.kernelSize.length===1||e.kernelSize.length===3)))throw new H(`Conv3D expects config.kernelSize to be number or [number, number, number], but received ${JSON.stringify(e.kernelSize)}.`)}};kh.className="Conv3D";ce.registerClass(kh);var k5=class extends wh{constructor(e){if(super(e),this.inputSpec=[new an({ndim:4})],this.padding!=="same"&&this.padding!=="valid")throw new H(`Conv2DTranspose currently supports only padding modes 'same' and 'valid', but received padding mode ${this.padding}`)}build(e){if(e=At(e),e.length!==4)throw new H("Input should have rank 4; Received input shape: "+JSON.stringify(e));let t=this.dataFormat==="channelsFirst"?1:e.length-1;if(e[t]==null)throw new H("The channel dimension of the inputs should be defined. Found `None`.");let n=e[t],s=this.kernelSize.concat([this.filters,n]);this.kernel=this.addWeight("kernel",s,"float32",this.kernelInitializer,this.kernelRegularizer,!0,this.kernelConstraint),this.useBias&&(this.bias=this.addWeight("bias",[this.filters],"float32",this.biasInitializer,this.biasRegularizer,!0,this.biasConstraint)),this.inputSpec=[new an({ndim:4,axes:{[t]:n}})],this.built=!0}call(e,t){return X(()=>{let n=Ze(e);if(n.shape.length!==4)throw new H(`Conv2DTranspose.call() expects input tensor to be rank-4, but received a tensor of rank-${n.shape.length}`);let s=n.shape,r=s[0],a,o;this.dataFormat==="channelsFirst"?(a=2,o=3):(a=1,o=2);let i=s[a],l=s[o],u=this.kernelSize[0],c=this.kernelSize[1],p=this.strides[0],d=this.strides[1],h=Zr(i,p,u,this.padding),f=Zr(l,d,c,this.padding),m=[r,h,f,this.filters];this.dataFormat!=="channelsLast"&&(n=tt(n,[0,2,3,1]));let g=l0(n,this.kernel.read(),m,this.strides,this.padding);return this.dataFormat!=="channelsLast"&&(g=tt(g,[0,3,1,2])),this.bias!=null&&(g=Br(g,this.bias.read(),this.dataFormat)),this.activation!=null&&(g=this.activation.apply(g)),g})}computeOutputShape(e){e=At(e);let t=e.slice(),n,s,r;this.dataFormat==="channelsFirst"?(n=1,s=2,r=3):(n=3,s=1,r=2);let a=this.kernelSize[0],o=this.kernelSize[1],i=this.strides[0],l=this.strides[1];return t[n]=this.filters,t[s]=Zr(t[s],i,a,this.padding),t[r]=Zr(t[r],l,o,this.padding),t}getConfig(){let e=super.getConfig();return delete e.dilationRate,e}};k5.className="Conv2DTranspose";ce.registerClass(k5);var S5=class extends kh{constructor(e){if(super(e),this.inputSpec=[new an({ndim:5})],this.padding!=="same"&&this.padding!=="valid")throw new H(`Conv3DTranspose currently supports only padding modes 'same' and 'valid', but received padding mode ${this.padding}`)}build(e){if(e=At(e),e.length!==5)throw new H("Input should have rank 5; Received input shape: "+JSON.stringify(e));let t=this.dataFormat==="channelsFirst"?1:e.length-1;if(e[t]==null)throw new H("The channel dimension of the inputs should be defined. Found `None`.");let n=e[t],s=this.kernelSize.concat([this.filters,n]);this.kernel=this.addWeight("kernel",s,"float32",this.kernelInitializer,this.kernelRegularizer,!0,this.kernelConstraint),this.useBias&&(this.bias=this.addWeight("bias",[this.filters],"float32",this.biasInitializer,this.biasRegularizer,!0,this.biasConstraint)),this.inputSpec=[new an({ndim:5,axes:{[t]:n}})],this.built=!0}call(e,t){return X(()=>{let n=Ze(e);if(n.shape.length!==5)throw new H(`Conv3DTranspose.call() expects input tensor to be rank-4, but received a tensor of rank-${n.shape.length}`);let s=n.shape,r=s[0],a,o,i;this.dataFormat==="channelsFirst"?(i=2,a=3,o=4):(i=1,a=2,o=3);let l=s[i],u=s[a],c=s[o],p=this.kernelSize[0],d=this.kernelSize[1],h=this.kernelSize[2],f=this.strides[0],m=this.strides[1],g=this.strides[2],y=Zr(l,f,p,this.padding),x=Zr(u,m,d,this.padding),A=Zr(c,g,h,this.padding),b=[r,y,x,A,this.filters];this.dataFormat!=="channelsLast"&&(n=tt(n,[0,2,3,4,1]));let w=lA(n,this.kernel.read(),b,this.strides,this.padding);return this.dataFormat!=="channelsLast"&&(w=tt(w,[0,4,1,2,3])),this.bias!==null&&(w=Br(w,this.bias.read(),this.dataFormat)),this.activation!==null&&(w=this.activation.apply(w)),w})}computeOutputShape(e){e=At(e);let t=e.slice(),n,s,r,a;this.dataFormat==="channelsFirst"?(n=1,s=2,r=3,a=4):(n=4,s=1,r=2,a=3);let o=this.kernelSize[0],i=this.kernelSize[1],l=this.kernelSize[2],u=this.strides[0],c=this.strides[1],p=this.strides[2];return t[n]=this.filters,t[s]=Zr(t[s],u,o,this.padding),t[r]=Zr(t[r],c,i,this.padding),t[a]=Zr(t[a],p,l,this.padding),t}getConfig(){let e=super.getConfig();return delete e.dilationRate,e}};S5.className="Conv3DTranspose";ce.registerClass(S5);var f8=class extends vh{constructor(e,t){if(super(e,t),this.DEFAULT_DEPTHWISE_INITIALIZER="glorotUniform",this.DEFAULT_POINTWISE_INITIALIZER="glorotUniform",this.depthwiseKernel=null,this.pointwiseKernel=null,t.filters==null)throw new H("The `filters` configuration field is required by SeparableConv, but is unspecified.");if(t.kernelInitializer!=null||t.kernelRegularizer!=null||t.kernelConstraint!=null)throw new H("Fields kernelInitializer, kernelRegularizer and kernelConstraint are invalid for SeparableConv2D. Use depthwiseInitializer, depthwiseRegularizer, depthwiseConstraint, pointwiseInitializer, pointwiseRegularizer and pointwiseConstraint instead.");if(t.padding!=null&&t.padding!=="same"&&t.padding!=="valid")throw new H(`SeparableConv${this.rank}D supports only padding modes: 'same' and 'valid', but received ${JSON.stringify(t.padding)}`);this.depthMultiplier=t.depthMultiplier==null?1:t.depthMultiplier,this.depthwiseInitializer=Mt(t.depthwiseInitializer||this.DEFAULT_DEPTHWISE_INITIALIZER),this.depthwiseRegularizer=zt(t.depthwiseRegularizer),this.depthwiseConstraint=xn(t.depthwiseConstraint),this.pointwiseInitializer=Mt(t.depthwiseInitializer||this.DEFAULT_POINTWISE_INITIALIZER),this.pointwiseRegularizer=zt(t.pointwiseRegularizer),this.pointwiseConstraint=xn(t.pointwiseConstraint)}build(e){if(e=At(e),e.length{e=Ze(e);let n;if(this.rank===1)throw new Ke("1D separable convolution is not implemented yet.");return this.rank===2&&(this.dataFormat==="channelsFirst"&&(e=tt(e,[0,2,3,1])),n=k0(e,this.depthwiseKernel.read(),this.pointwiseKernel.read(),this.strides,this.padding,this.dilationRate,"NHWC")),this.useBias&&(n=Br(n,this.bias.read(),this.dataFormat)),this.activation!=null&&(n=this.activation.apply(n)),this.dataFormat==="channelsFirst"&&(n=tt(n,[0,3,1,2])),n})}getConfig(){let e=super.getConfig();return delete e.rank,delete e.kernelInitializer,delete e.kernelRegularizer,delete e.kernelConstraint,e.depthwiseInitializer=Ut(this.depthwiseInitializer),e.pointwiseInitializer=Ut(this.pointwiseInitializer),e.depthwiseRegularizer=wt(this.depthwiseRegularizer),e.pointwiseRegularizer=wt(this.pointwiseRegularizer),e.depthwiseConstraint=An(this.depthwiseConstraint),e.pointwiseConstraint=An(this.pointwiseConstraint),e}};f8.className="SeparableConv";var I5=class extends f8{constructor(e){super(2,e)}};I5.className="SeparableConv2D";ce.registerClass(I5);var e2=class extends vh{constructor(e){super(1,e),e2.verifyArgs(e),this.inputSpec=[{ndim:3}]}getConfig(){let e=super.getConfig();return delete e.rank,delete e.dataFormat,e}static verifyArgs(e){if(typeof e.kernelSize!="number"&&!jA(e.kernelSize,"number",1,1))throw new H(`Conv1D expects config.kernelSize to be number or number[] with length 1, but received ${JSON.stringify(e.kernelSize)}.`)}};e2.className="Conv1D";ce.registerClass(e2);var C5=class extends dt{constructor(e){super(e),typeof e.cropping=="number"?this.cropping=[[e.cropping,e.cropping],[e.cropping,e.cropping]]:typeof e.cropping[0]=="number"?this.cropping=[[e.cropping[0],e.cropping[0]],[e.cropping[1],e.cropping[1]]]:this.cropping=e.cropping,this.dataFormat=e.dataFormat===void 0?"channelsLast":e.dataFormat,this.inputSpec=[{ndim:4}]}computeOutputShape(e){return this.dataFormat==="channelsFirst"?[e[0],e[1],e[2]-this.cropping[0][0]-this.cropping[0][1],e[3]-this.cropping[1][0]-this.cropping[1][1]]:[e[0],e[1]-this.cropping[0][0]-this.cropping[0][1],e[2]-this.cropping[1][0]-this.cropping[1][1],e[3]]}call(e,t){return X(()=>{if(e=Ze(e),this.dataFormat==="channelsLast"){let n=_f(e,this.cropping[0][0],e.shape[1]-this.cropping[0][0]-this.cropping[0][1],2);return _f(n,this.cropping[1][0],e.shape[2]-this.cropping[1][1]-this.cropping[1][0],3)}else{let n=_f(e,this.cropping[0][0],e.shape[2]-this.cropping[0][0]-this.cropping[0][1],3);return _f(n,this.cropping[1][0],e.shape[3]-this.cropping[1][1]-this.cropping[1][0],4)}})}getConfig(){let e={cropping:this.cropping,dataFormat:this.dataFormat},t=super.getConfig();return Object.assign(e,t),e}};C5.className="Cropping2D";ce.registerClass(C5);var T5=class extends dt{constructor(e){super(e),this.DEFAULT_SIZE=[2,2],this.inputSpec=[{ndim:4}],this.size=e.size==null?this.DEFAULT_SIZE:e.size,this.dataFormat=e.dataFormat==null?"channelsLast":e.dataFormat,Qt(this.dataFormat),this.interpolation=e.interpolation==null?"nearest":e.interpolation,FV(this.interpolation)}computeOutputShape(e){if(this.dataFormat==="channelsFirst"){let t=e[2]==null?null:this.size[0]*e[2],n=e[3]==null?null:this.size[1]*e[3];return[e[0],e[1],t,n]}else{let t=e[1]==null?null:this.size[0]*e[1],n=e[2]==null?null:this.size[1]*e[2];return[e[0],t,n,e[3]]}}call(e,t){return X(()=>{let n=Ze(e),s=n.shape;if(this.dataFormat==="channelsFirst"){n=tt(n,[0,2,3,1]);let r=this.size[0]*s[2],a=this.size[1]*s[3],o=this.interpolation==="nearest"?ke.resizeNearestNeighbor(n,[r,a]):ke.resizeBilinear(n,[r,a]);return tt(o,[0,3,1,2])}else{let r=this.size[0]*s[1],a=this.size[1]*s[2];return this.interpolation==="nearest"?ke.resizeNearestNeighbor(n,[r,a]):ke.resizeBilinear(n,[r,a])}})}getConfig(){let e={size:this.size,dataFormat:this.dataFormat,interpolation:this.interpolation},t=super.getConfig();return Object.assign(e,t),e}};T5.className="UpSampling2D";ce.registerClass(T5);function CG(e,t,n=[1,1],s="valid",r,a){return X(()=>{r==null&&(r=Or()),Qt(r);let o=v5(e,r);if(e.rank!==4)throw new H(`Input for depthwiseConv2d is required to be 4-D, but is instead ${e.rank}-D`);if(t.rank!==4)throw new H(`depthwiseKernel is required to be 4-D, but is instead ${t.rank}-D`);return o=Vc(o,t,n,s==="same"?"same":"valid","NHWC",a),r==="channelsFirst"&&(o=tt(o,[0,3,1,2])),o})}var N5=class extends w5{constructor(e){super(2,e),this.depthwiseKernel=null,this.depthMultiplier=e.depthMultiplier==null?1:e.depthMultiplier,this.depthwiseInitializer=Mt(e.depthwiseInitializer||this.DEFAULT_KERNEL_INITIALIZER),this.depthwiseConstraint=xn(e.depthwiseConstraint),this.depthwiseRegularizer=zt(e.depthwiseRegularizer)}build(e){if(e=At(e),e.length<4)throw new H(`Inputs to DepthwiseConv2D should have rank 4. Received input shape: ${JSON.stringify(e)}.`);let t=this.dataFormat==="channelsFirst"?1:3;if(e[t]==null||e[t]<0)throw new H(`The channel dimension of the inputs to DepthwiseConv2D should be defined, but is not (${e[t]}).`);let n=e[t],s=[this.kernelSize[0],this.kernelSize[1],n,this.depthMultiplier];this.depthwiseKernel=this.addWeight("depthwise_kernel",s,null,this.depthwiseInitializer,this.depthwiseRegularizer,!0,this.depthwiseConstraint),this.useBias?this.bias=this.addWeight("bias",[n*this.depthMultiplier],null,this.biasInitializer,this.biasRegularizer,!0,this.biasConstraint):this.bias=null,this.built=!0}call(e,t){return X(()=>{e=Ze(e);let n=CG(e,this.depthwiseKernel.read(),this.strides,this.padding,this.dataFormat,null);return this.useBias&&(n=Br(n,this.bias.read(),this.dataFormat)),this.activation!=null&&(n=this.activation.apply(n)),n})}computeOutputShape(e){e=At(e);let t=this.dataFormat==="channelsFirst"?e[2]:e[1],n=this.dataFormat==="channelsFirst"?e[3]:e[2],s=this.dataFormat==="channelsFirst"?e[1]*this.depthMultiplier:e[3]*this.depthMultiplier,r=Pr(t,this.kernelSize[0],this.padding,this.strides[0]),a=Pr(n,this.kernelSize[1],this.padding,this.strides[1]);return this.dataFormat==="channelsFirst"?[e[0],s,r,a]:[e[0],r,a,s]}getConfig(){let e=super.getConfig();return e.depthMultiplier=this.depthMultiplier,e.depthwiseInitializer=Ut(this.depthwiseInitializer),e.depthwiseRegularizer=wt(this.depthwiseRegularizer),e.depthwiseConstraint=An(this.depthwiseRegularizer),e}};N5.className="DepthwiseConv2D";ce.registerClass(N5);function m8(e,t,n,s){if(Array.isArray(e)){if(t!=null||n!=null)throw new H("When inputs is an array, neither initialState or constants should be provided");s!=null&&(n=e.slice(e.length-s,e.length),e=e.slice(0,e.length-s)),e.length>1&&(t=e.slice(1,e.length)),e=e[0]}function r(a){return a==null||Array.isArray(a)?a:[a]}return t=r(t),n=r(n),{inputs:e,initialState:t,constants:n}}function g8(e,t,n,s=!1,r,a,o=!1,i=!1){return X(()=>{let l=t.shape.length;if(l<3)throw new H(`Input should be at least 3D, but is ${l}D.`);let u=[1,0].concat(Fr(2,l));if(t=tt(t,u),a!=null)throw new Ke("The rnn() functoin of the deeplearn.js backend does not support constants yet.");o&&console.warn("Backend rnn(): the unroll = true option is not applicable to the imperative deeplearn.js backend."),r!=null&&(r=me(me(r,"bool"),"float32"),r.rank===l-1&&(r=Ft(r,-1)),r=tt(r,u)),s&&(t=Js(t,0),r!=null&&(r=Js(r,0)));let c=[],p,d=n,h=t.shape[0],f=bn(t),m;r!=null&&(m=bn(r));for(let y=0;ye(x,d));if(r==null)p=A[0],d=A[1];else{let b=X(()=>{let w=m[y],k=ye(zs(w),w),C=le(M(A[0],w),M(d[0],k)),N=d.map((R,D)=>le(M(A[1][D],w),M(R,k)));return{output:C,newStates:N}});p=b.output,d=b.newStates}i&&c.push(p)}let g;return i&&(g=ln(c,1)),[p,g,d]})}var ia=class extends dt{constructor(e){super(e);let t;if(e.cell==null)throw new H("cell property is missing for the constructor of RNN.");if(Array.isArray(e.cell)?t=new s2({cells:e.cell}):t=e.cell,t.stateSize==null)throw new H("The RNN cell should have an attribute `stateSize` (tuple of integers, one integer per RNN state).");this.cell=t,this.returnSequences=e.returnSequences==null?!1:e.returnSequences,this.returnState=e.returnState==null?!1:e.returnState,this.goBackwards=e.goBackwards==null?!1:e.goBackwards,this._stateful=e.stateful==null?!1:e.stateful,this.unroll=e.unroll==null?!1:e.unroll,this.supportsMasking=!0,this.inputSpec=[new an({ndim:3})],this.stateSpec=null,this.states_=null,this.numConstants=null,this.keptStates=[]}getStates(){if(this.states_==null){let e=Array.isArray(this.cell.stateSize)?this.cell.stateSize.length:1;return Fr(0,e).map(t=>null)}else return this.states_}setStates(e){this.states_=e}computeOutputShape(e){_3(e)&&(e=e[0]),e=e;let t=this.cell.stateSize;Array.isArray(t)||(t=[t]);let n=t[0],s;if(this.returnSequences?s=[e[0],e[1],n]:s=[e[0],n],this.returnState){let r=[];for(let a of t)r.push([e[0],a]);return[s].concat(r)}else return s}computeMask(e,t){return X(()=>{Array.isArray(t)&&(t=t[0]);let n=this.returnSequences?t:null;if(this.returnState){let s=this.states.map(r=>null);return[n].concat(s)}else return n})}get states(){if(this.states_==null){let e=Array.isArray(this.cell.stateSize)?this.cell.stateSize.length:1,t=[];for(let n=0;no.shape[o.shape.length-1]),a))throw new H(`An initialState was passed that is not compatible with cell.stateSize. Received stateSpec=${this.stateSpec}; However cell.stateSize is ${this.cell.stateSize}`)}else this.stateSpec=a.map(o=>new an({shape:[null,o]}));this.stateful&&this.resetStates()}resetStates(e,t=!1){X(()=>{if(!this.stateful)throw new ma("Cannot call resetStates() on an RNN Layer that is not stateful.");let n=this.inputSpec[0].shape[0];if(n==null)throw new H("If an RNN is stateful, it needs to know its batch size. Specify the batch size of your input tensors: \n- If using a Sequential model, specify the batch size by passing a `batchInputShape` option to your first layer.\n- If using the functional API, specify the batch size by passing a `batchShape` option to your Input layer.");if(this.states_==null)Array.isArray(this.cell.stateSize)?this.states_=this.cell.stateSize.map(s=>Vt([n,s])):this.states_=[Vt([n,this.cell.stateSize])];else if(e==null)Y(this.states_),this.keptStates!=null&&(Y(this.keptStates),this.keptStates=[]),Array.isArray(this.cell.stateSize)?this.states_=this.cell.stateSize.map(s=>Vt([n,s])):this.states_[0]=Vt([n,this.cell.stateSize]);else{if(Array.isArray(e)||(e=[e]),e.length!==this.states_.length)throw new H(`Layer ${this.name} expects ${this.states_.length} state(s), but it received ${e.length} state value(s). Input received: ${e}`);t===!0?this.keptStates.push(this.states_.slice()):Y(this.states_);for(let s=0;sCn(s.clone()))})}apply(e,t){let n=t==null?null:t.initialState,s=t==null?null:t.constants;t==null&&(t={});let r=m8(e,n,s,this.numConstants);e=r.inputs,n=r.initialState,s=r.constants;let a=[],o=[];if(n!=null){t.initialState=n,a=a.concat(n),this.stateSpec=[];for(let l of n)this.stateSpec.push(new an({shape:l.shape}));o=o.concat(this.stateSpec)}if(s!=null&&(t.constants=s,a=a.concat(s),this.numConstants=s.length),a[0]instanceof _r){let l=[e].concat(a),u=this.inputSpec.concat(o),c=this.inputSpec;this.inputSpec=u;let p=super.apply(l,t);return this.inputSpec=c,p}else return super.apply(e,t)}call(e,t){return X(()=>{let n=t==null?null:t.mask,s=t==null?null:t.training,r=t==null?null:t.initialState;e=Ze(e),r==null&&(this.stateful?r=this.states_:r=this.getInitialState(e));let a=Array.isArray(this.cell.stateSize)?this.cell.stateSize.length:1;if(r.length!==a)throw new H(`RNN Layer has ${a} state(s) but was passed ${r.length} initial state(s).`);this.unroll&&console.warn("Ignoring unroll = true for RNN layer, due to imperative backend.");let o={training:s},l=g8((h,f)=>{let m=this.cell.call([h].concat(f),o);return[m[0],m.slice(1)]},e,r,this.goBackwards,n,null,this.unroll,this.returnSequences),u=l[0],c=l[1],p=l[2];this.stateful&&this.resetStates(p,s);let d=this.returnSequences?c:u;return this.returnState?[d].concat(p):d})}getInitialState(e){return X(()=>{let t=Vt(e.shape);return t=ve(t,[1,2]),t=gh(t),Array.isArray(this.cell.stateSize)?this.cell.stateSize.map(n=>n>1?E3(t,[1,n]):t):this.cell.stateSize>1?[E3(t,[1,this.cell.stateSize])]:[t]})}get trainableWeights(){return this.trainable?this.cell.trainableWeights:[]}get nonTrainableWeights(){return this.trainable?this.cell.nonTrainableWeights:this.cell.weights}setFastWeightInitDuringBuild(e){super.setFastWeightInitDuringBuild(e),this.cell!=null&&this.cell.setFastWeightInitDuringBuild(e)}getConfig(){let e=super.getConfig(),t={returnSequences:this.returnSequences,returnState:this.returnState,goBackwards:this.goBackwards,stateful:this.stateful,unroll:this.unroll};this.numConstants!=null&&(t.numConstants=this.numConstants);let n=this.cell.getConfig();return this.getClassName()===ia.className&&(t.cell={className:this.cell.getClassName(),config:n}),Object.assign({},n,e,t)}static fromConfig(e,t,n={}){let s=t.cell,r=$r(s,n);return new e(Object.assign(t,{cell:r}))}};ia.className="RNN";ce.registerClass(ia);var Sh=class extends dt{},t2=class extends Sh{constructor(e){super(e),this.DEFAULT_ACTIVATION="tanh",this.DEFAULT_KERNEL_INITIALIZER="glorotNormal",this.DEFAULT_RECURRENT_INITIALIZER="orthogonal",this.DEFAULT_BIAS_INITIALIZER="zeros",this.units=e.units,Tn(this.units,"units"),this.activation=uo(e.activation==null?this.DEFAULT_ACTIVATION:e.activation),this.useBias=e.useBias==null?!0:e.useBias,this.kernelInitializer=Mt(e.kernelInitializer||this.DEFAULT_KERNEL_INITIALIZER),this.recurrentInitializer=Mt(e.recurrentInitializer||this.DEFAULT_RECURRENT_INITIALIZER),this.biasInitializer=Mt(e.biasInitializer||this.DEFAULT_BIAS_INITIALIZER),this.kernelRegularizer=zt(e.kernelRegularizer),this.recurrentRegularizer=zt(e.recurrentRegularizer),this.biasRegularizer=zt(e.biasRegularizer),this.kernelConstraint=xn(e.kernelConstraint),this.recurrentConstraint=xn(e.recurrentConstraint),this.biasConstraint=xn(e.biasConstraint),this.dropout=ac([1,io([0,e.dropout==null?0:e.dropout])]),this.recurrentDropout=ac([1,io([0,e.recurrentDropout==null?0:e.recurrentDropout])]),this.dropoutFunc=e.dropoutFunc,this.stateSize=this.units,this.dropoutMask=null,this.recurrentDropoutMask=null}build(e){e=At(e),this.kernel=this.addWeight("kernel",[e[e.length-1],this.units],null,this.kernelInitializer,this.kernelRegularizer,!0,this.kernelConstraint),this.recurrentKernel=this.addWeight("recurrent_kernel",[this.units,this.units],null,this.recurrentInitializer,this.recurrentRegularizer,!0,this.recurrentConstraint),this.useBias?this.bias=this.addWeight("bias",[this.units],null,this.biasInitializer,this.biasRegularizer,!0,this.biasConstraint):this.bias=null,this.built=!0}call(e,t){return X(()=>{if(e=e,e.length!==2)throw new H(`SimpleRNNCell expects 2 input Tensors, got ${e.length}.`);let n=e[1];e=e[0];let s=t.training==null?!1:t.training;0zs(e),rate:this.dropout,training:s,dropoutFunc:this.dropoutFunc})),0zs(n),rate:this.recurrentDropout,training:s,dropoutFunc:this.dropoutFunc}));let r,a=this.dropoutMask,o=this.recurrentDropoutMask;a!=null?r=Qr(M(e,a),this.kernel.read()):r=Qr(e,this.kernel.read()),this.bias!=null&&(r=Br(r,this.bias.read())),o!=null&&(n=M(n,o));let i=le(r,Qr(n,this.recurrentKernel.read()));return this.activation!=null&&(i=this.activation.apply(i)),[i,i]})}getConfig(){let e=super.getConfig(),t={units:this.units,activation:lo(this.activation),useBias:this.useBias,kernelInitializer:Ut(this.kernelInitializer),recurrentInitializer:Ut(this.recurrentInitializer),biasInitializer:Ut(this.biasInitializer),kernelRegularizer:wt(this.kernelRegularizer),recurrentRegularizer:wt(this.recurrentRegularizer),biasRegularizer:wt(this.biasRegularizer),activityRegularizer:wt(this.activityRegularizer),kernelConstraint:An(this.kernelConstraint),recurrentConstraint:An(this.recurrentConstraint),biasConstraint:An(this.biasConstraint),dropout:this.dropout,recurrentDropout:this.recurrentDropout};return Object.assign({},e,t)}};t2.className="SimpleRNNCell";ce.registerClass(t2);var E5=class extends ia{constructor(e){e.cell=new t2(e),super(e)}call(e,t){return X(()=>{this.cell.dropoutMask!=null&&(Y(this.cell.dropoutMask),this.cell.dropoutMask=null),this.cell.recurrentDropoutMask!=null&&(Y(this.cell.recurrentDropoutMask),this.cell.recurrentDropoutMask=null);let n=t==null?null:t.mask,s=t==null?null:t.training,r=t==null?null:t.initialState;return super.call(e,{mask:n,training:s,initialState:r})})}static fromConfig(e,t){return new e(t)}};E5.className="SimpleRNN";ce.registerClass(E5);var n2=class extends Sh{constructor(e){if(super(e),this.DEFAULT_ACTIVATION="tanh",this.DEFAULT_RECURRENT_ACTIVATION="hardSigmoid",this.DEFAULT_KERNEL_INITIALIZER="glorotNormal",this.DEFAULT_RECURRENT_INITIALIZER="orthogonal",this.DEFAULT_BIAS_INITIALIZER="zeros",e.resetAfter)throw new H("GRUCell does not support reset_after parameter set to true.");this.units=e.units,Tn(this.units,"units"),this.activation=uo(e.activation===void 0?this.DEFAULT_ACTIVATION:e.activation),this.recurrentActivation=uo(e.recurrentActivation===void 0?this.DEFAULT_RECURRENT_ACTIVATION:e.recurrentActivation),this.useBias=e.useBias==null?!0:e.useBias,this.kernelInitializer=Mt(e.kernelInitializer||this.DEFAULT_KERNEL_INITIALIZER),this.recurrentInitializer=Mt(e.recurrentInitializer||this.DEFAULT_RECURRENT_INITIALIZER),this.biasInitializer=Mt(e.biasInitializer||this.DEFAULT_BIAS_INITIALIZER),this.kernelRegularizer=zt(e.kernelRegularizer),this.recurrentRegularizer=zt(e.recurrentRegularizer),this.biasRegularizer=zt(e.biasRegularizer),this.kernelConstraint=xn(e.kernelConstraint),this.recurrentConstraint=xn(e.recurrentConstraint),this.biasConstraint=xn(e.biasConstraint),this.dropout=ac([1,io([0,e.dropout==null?0:e.dropout])]),this.recurrentDropout=ac([1,io([0,e.recurrentDropout==null?0:e.recurrentDropout])]),this.dropoutFunc=e.dropoutFunc,this.implementation=e.implementation,this.stateSize=this.units,this.dropoutMask=null,this.recurrentDropoutMask=null}build(e){e=At(e);let t=e[e.length-1];this.kernel=this.addWeight("kernel",[t,this.units*3],null,this.kernelInitializer,this.kernelRegularizer,!0,this.kernelConstraint),this.recurrentKernel=this.addWeight("recurrent_kernel",[this.units,this.units*3],null,this.recurrentInitializer,this.recurrentRegularizer,!0,this.recurrentConstraint),this.useBias?this.bias=this.addWeight("bias",[this.units*3],null,this.biasInitializer,this.biasRegularizer,!0,this.biasConstraint):this.bias=null,this.built=!0}call(e,t){return X(()=>{if(e=e,e.length!==2)throw new H(`GRUCell expects 2 input Tensors (inputs, h, c), got ${e.length}.`);let n=t.training==null?!1:t.training,s=e[1];e=e[0],0zs(e),rate:this.dropout,training:n,count:3,dropoutFunc:this.dropoutFunc})),0zs(s),rate:this.recurrentDropout,training:n,count:3,dropoutFunc:this.dropoutFunc}));let r=this.dropoutMask,a=this.recurrentDropoutMask,o,i,l;0{this.cell.dropoutMask!=null&&(Y(this.cell.dropoutMask),this.cell.dropoutMask=null),this.cell.recurrentDropoutMask!=null&&(Y(this.cell.recurrentDropoutMask),this.cell.recurrentDropoutMask=null);let n=t==null?null:t.mask,s=t==null?null:t.training,r=t==null?null:t.initialState;return super.call(e,{mask:n,training:s,initialState:r})})}static fromConfig(e,t){return t.implmentation===0&&(t.implementation=1),new e(t)}};R5.className="GRU";ce.registerClass(R5);var Ih=class extends Sh{constructor(e){super(e),this.DEFAULT_ACTIVATION="tanh",this.DEFAULT_RECURRENT_ACTIVATION="hardSigmoid",this.DEFAULT_KERNEL_INITIALIZER="glorotNormal",this.DEFAULT_RECURRENT_INITIALIZER="orthogonal",this.DEFAULT_BIAS_INITIALIZER="zeros",this.units=e.units,Tn(this.units,"units"),this.activation=uo(e.activation===void 0?this.DEFAULT_ACTIVATION:e.activation),this.recurrentActivation=uo(e.recurrentActivation===void 0?this.DEFAULT_RECURRENT_ACTIVATION:e.recurrentActivation),this.useBias=e.useBias==null?!0:e.useBias,this.kernelInitializer=Mt(e.kernelInitializer||this.DEFAULT_KERNEL_INITIALIZER),this.recurrentInitializer=Mt(e.recurrentInitializer||this.DEFAULT_RECURRENT_INITIALIZER),this.biasInitializer=Mt(e.biasInitializer||this.DEFAULT_BIAS_INITIALIZER),this.unitForgetBias=e.unitForgetBias,this.kernelRegularizer=zt(e.kernelRegularizer),this.recurrentRegularizer=zt(e.recurrentRegularizer),this.biasRegularizer=zt(e.biasRegularizer),this.kernelConstraint=xn(e.kernelConstraint),this.recurrentConstraint=xn(e.recurrentConstraint),this.biasConstraint=xn(e.biasConstraint),this.dropout=ac([1,io([0,e.dropout==null?0:e.dropout])]),this.recurrentDropout=ac([1,io([0,e.recurrentDropout==null?0:e.recurrentDropout])]),this.dropoutFunc=e.dropoutFunc,this.implementation=e.implementation,this.stateSize=[this.units,this.units],this.dropoutMask=null,this.recurrentDropoutMask=null}build(e){var t;e=At(e);let n=e[e.length-1];this.kernel=this.addWeight("kernel",[n,this.units*4],null,this.kernelInitializer,this.kernelRegularizer,!0,this.kernelConstraint),this.recurrentKernel=this.addWeight("recurrent_kernel",[this.units,this.units*4],null,this.recurrentInitializer,this.recurrentRegularizer,!0,this.recurrentConstraint);let s;if(this.useBias){if(this.unitForgetBias){let r=this.biasInitializer,a=this.units;s=new(t=class extends xr{apply(i,l){let u=r.apply([a]),c=new G0().apply([a]),p=r.apply([a*2]);return $v($v(u,c),p)}},t.className="CustomInit",t)}else s=this.biasInitializer;this.bias=this.addWeight("bias",[this.units*4],null,s,this.biasRegularizer,!0,this.biasConstraint)}else this.bias=null;this.built=!0}call(e,t){return X(()=>{let n=t.training==null?!1:t.training;if(e=e,e.length!==3)throw new H(`LSTMCell expects 3 input Tensors (inputs, h, c), got ${e.length}.`);let s=e[1],r=e[2];e=e[0],0zs(e),rate:this.dropout,training:n,count:4,dropoutFunc:this.dropoutFunc})),0zs(s),rate:this.recurrentDropout,training:n,count:4,dropoutFunc:this.dropoutFunc}));let a=this.dropoutMask,o=this.recurrentDropoutMask,i,l,u,c;0{this.cell.dropoutMask!=null&&(Y(this.cell.dropoutMask),this.cell.dropoutMask=null),this.cell.recurrentDropoutMask!=null&&(Y(this.cell.recurrentDropoutMask),this.cell.recurrentDropoutMask=null);let n=t==null?null:t.mask,s=t==null?null:t.training,r=t==null?null:t.initialState;return super.call(e,{mask:n,training:s,initialState:r})})}static fromConfig(e,t){return t.implmentation===0&&(t.implementation=1),new e(t)}};_5.className="LSTM";ce.registerClass(_5);var s2=class extends Sh{constructor(e){super(e),this.cells=e.cells}get stateSize(){let e=[];for(let t of this.cells.slice().reverse())Array.isArray(t.stateSize)?e.push(...t.stateSize):e.push(t.stateSize);return e}call(e,t){return X(()=>{e=e;let n=e.slice(1),s=[];for(let o of this.cells.slice().reverse())Array.isArray(o.stateSize)?s.push(n.splice(0,o.stateSize.length)):s.push(n.splice(0,1));s.reverse();let r=[],a;for(let o=0;o{Ki(`RNNCell_${s}`,()=>{n.build(e),Array.isArray(n.stateSize)?t=n.stateSize[0]:t=n.stateSize,e=[e[0],t]})}),this.built=!0}getConfig(){let e=super.getConfig(),t=r=>({className:r.getClassName(),config:r.getConfig()}),s={cells:this.cells.map(t)};return Object.assign({},e,s)}static fromConfig(e,t,n={}){let s=[];for(let r of t.cells)s.push($r(r,n));return new e({cells:s})}get trainableWeights(){if(!this.trainable)return[];let e=[];for(let t of this.cells)e.push(...t.trainableWeights);return e}get nonTrainableWeights(){let e=[];for(let t of this.cells)e.push(...t.nonTrainableWeights);if(!this.trainable){let t=[];for(let n of this.cells)t.push(...n.trainableWeights);return t.concat(e)}return e}getWeights(){let e=[];for(let t of this.cells)e.push(...t.weights);return D3(e)}setWeights(e){let t=[];for(let n of this.cells){let s=n.weights.length,r=e.splice(s);for(let a=0;aa!=null?a(t(),n):Nk(t(),n),i=()=>Ah(o,t,s);return!r||r<=1?Cn(i().clone()):Array(r).fill(void 0).map(i).map(u=>Cn(u.clone()))}var TG=function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,s=Object.getOwnPropertySymbols(e);r{if(this.cell.dropoutMask!=null&&(Y(this.cell.dropoutMask),this.cell.dropoutMask=null),this.cell.recurrentDropoutMask!=null&&(Y(this.cell.recurrentDropoutMask),this.cell.recurrentDropoutMask=null),t&&t.constants)throw new H("ConvRNN2D cell does not support constants");let n=t==null?null:t.mask,s=t==null?null:t.training,r=t==null?null:t.initialState;return super.call(e,{mask:n,training:s,initialState:r})})}computeOutputShape(e){let t=this.computeSingleOutputShape(e);return this.returnSequences||(t=[t[0],...t.slice(2)]),this.returnState&&(t=[t,...Array(2).fill([e[0],...t.slice(-3)])]),t}getInitialState(e){return X(()=>{let{stateSize:t}=this.cell,n=e.shape,s=this.computeSingleOutputShape(n),r=[s[0],...s.slice(2)],a=Vt(r);return Array.isArray(t)?Array(t.length).fill(a):[a]})}resetStates(e,t=!1){X(()=>{if(!this.stateful)throw new ma("Cannot call resetStates() on an RNN Layer that is not stateful.");let n=this.inputSpec[0].shape,s=this.computeSingleOutputShape(n),r=[s[0],...s.slice(2)];if(n[0]==null)throw new H("If an RNN is stateful, it needs to know its batch size. Specify the batch size of your input tensors: \n- If using a Sequential model, specify the batch size by passing a `batchInputShape` option to your first layer.\n- If using the functional API, specify the batch size by passing a `batchShape` option to your Input layer.");if(this.getStates()==null)Array.isArray(this.cell.stateSize)?this.states_=this.cell.stateSize.map(()=>Vt(r)):this.states_=[Vt(r)];else if(e==null)Y(this.states_),this.keptStates!=null&&(Y(this.keptStates),this.keptStates=[]),Array.isArray(this.cell.stateSize)?this.states_=this.cell.stateSize.map(()=>Vt(r)):this.states_[0]=Vt(r);else{if(Array.isArray(e)||(e=[e]),e.length!==this.states_.length)throw new H(`Layer ${this.name} expects ${this.states_.length} state(s), but it received ${e.length} state value(s). Input received: ${e}`);t?this.keptStates.push(this.states_.slice()):Y(this.states_);for(let o=0;oCn(o.clone()))})}computeSingleOutputShape(e){let{dataFormat:t,filters:n,kernelSize:s,padding:r,strides:a,dilationRate:o}=this.cell,i=t==="channelsFirst",l=e[i?3:2],u=e[i?4:3],c=Pr(l,s[0],r,a[0],o[0]),p=Pr(u,s[1],r,a[1],o[1]);return[...e.slice(0,2),...i?[n,c,p]:[c,p,n]]}};y8.className="ConvRNN2D";var r2=class extends Ih{constructor(e){let{filters:t,kernelSize:n,strides:s,padding:r,dataFormat:a,dilationRate:o}=e;super(Object.assign({},e,{units:t})),this.filters=t,Tn(this.filters,"filters"),this.kernelSize=Ku(n,2,"kernelSize"),this.kernelSize.forEach(i=>Tn(i,"kernelSize")),this.strides=Ku(s||1,2,"strides"),this.strides.forEach(i=>Tn(i,"strides")),this.padding=r||"valid",nr(this.padding),this.dataFormat=a||"channelsLast",Qt(this.dataFormat),this.dilationRate=Ku(o||1,2,"dilationRate"),this.dilationRate.forEach(i=>Tn(i,"dilationRate"))}build(e){var t;e=At(e);let n=this.dataFormat==="channelsFirst"?1:e.length-1;if(e[n]==null)throw new H(`The channel dimension of the input should be defined. Found ${e[n]}`);let s=e[n],r=4,a=this.kernelSize.concat([s,this.filters*r]);this.kernel=this.addWeight("kernel",a,null,this.kernelInitializer,this.kernelRegularizer,!0,this.kernelConstraint);let o=this.kernelSize.concat([this.filters,this.filters*r]);if(this.recurrentKernel=this.addWeight("recurrent_kernel",o,null,this.recurrentInitializer,this.recurrentRegularizer,!0,this.recurrentConstraint),this.useBias){let i;if(this.unitForgetBias){let l=this.biasInitializer,u=this.filters;i=new(t=class extends xr{apply(p,d){let h=l.apply([u]),f=Ds([u]),m=l.apply([u*2]);return qA([h,f,m])}},t.className="CustomInit",t)}else i=this.biasInitializer;this.bias=this.addWeight("bias",[this.filters*r],null,i,this.biasRegularizer,!0,this.biasConstraint)}this.built=!0}call(e,t){return X(()=>{if(e.length!==3)throw new H(`ConvLSTM2DCell expects 3 input Tensors (inputs, h, c), got ${e.length}.`);let n=t.training||!1,s=e[0],r=e[1],a=e[2],o=4;0zs(s),rate:this.dropout,training:n,count:o,dropoutFunc:this.dropoutFunc}));let i=this.dropoutMask,l=(q,K,ne)=>!K||!K[ne]?q:M(K[ne],q),u=l(s,i,0),c=l(s,i,1),p=l(s,i,2),d=l(s,i,3);0zs(r),rate:this.recurrentDropout,training:n,count:o,dropoutFunc:this.dropoutFunc}));let h=this.recurrentDropoutMask,f=l(r,h,0),m=l(r,h,1),g=l(r,h,2),y=l(r,h,3),x=3,[A,b,w,k]=Ht(this.kernel.read(),o,x),[C,N,R,D]=this.useBias?Ht(this.bias.read(),o):[null,null,null,null];u=this.inputConv(u,A,C,this.padding),c=this.inputConv(c,b,N,this.padding),p=this.inputConv(p,w,R,this.padding),d=this.inputConv(d,k,D,this.padding);let[E,$,S,F]=Ht(this.recurrentKernel.read(),o,x);f=this.recurrentConv(f,E),m=this.recurrentConv(m,$),g=this.recurrentConv(g,S),y=this.recurrentConv(y,F);let z=this.recurrentActivation.apply(le(u,f)),V=this.recurrentActivation.apply(le(c,m)),j=le(M(V,a),M(z,this.activation.apply(le(p,g)))),G=M(this.recurrentActivation.apply(le(d,y)),this.activation.apply(j));return[G,G,j]})}getConfig(){let e=super.getConfig(),{units:t}=e,n=TG(e,["units"]),s={filters:this.filters,kernelSize:this.kernelSize,padding:this.padding,dataFormat:this.dataFormat,dilationRate:this.dilationRate,strides:this.strides};return Object.assign({},n,s)}inputConv(e,t,n,s){let r=ka(e,t,this.strides,s||"valid",this.dataFormat==="channelsFirst"?"NCHW":"NHWC",this.dilationRate);return n?Br(r,n,this.dataFormat):r}recurrentConv(e,t){return ka(e,t,1,"same",this.dataFormat==="channelsFirst"?"NCHW":"NHWC")}};r2.className="ConvLSTM2DCell";ce.registerClass(r2);var D5=class extends y8{constructor(e){let t=new r2(e);super(Object.assign({},e,{cell:t}))}static fromConfig(e,t){return new e(t)}};D5.className="ConvLSTM2D";ce.registerClass(D5);var a2=class extends dt{constructor(e){super(e),this.rate=Math.max(Math.min(e.rate,1),0),this.noiseShape=e.noiseShape,this.seed=e.seed,this.supportsMasking=!0}getNoiseShape(e){if(this.noiseShape==null)return this.noiseShape;let t=e.shape,n=[];for(let s=0;s{this.invokeCallHook(e,t);let n=Ze(e);if(0Nk(n,this.rate,r,this.seed),()=>n,s)}return e})}getConfig(){let e={rate:this.rate,noiseShape:this.noiseShape,seed:this.seed},t=super.getConfig();return Object.assign(e,t),e}dispose(){return super.dispose()}};a2.className="Dropout";ce.registerClass(a2);var $5=class extends a2{constructor(e){super(e),this.inputSpec=[{ndim:3}]}getNoiseShape(e){let t=e.shape;return[t[0],1,t[2]]}};$5.className="SpatialDropout1D";ce.registerClass($5);var P5=class extends dt{constructor(e){if(super(e),this.activation=null,this.useBias=!0,this.kernel=null,this.bias=null,this.DEFAULT_KERNEL_INITIALIZER="glorotNormal",this.DEFAULT_BIAS_INITIALIZER="zeros",e.batchInputShape==null&&e.inputShape==null&&e.inputDim!=null){let t=null;e.batchSize!=null&&(t=e.batchSize),this.batchInputShape=[t,e.inputDim]}this.units=e.units,Tn(this.units,"units"),this.activation=uo(e.activation),e.useBias!=null&&(this.useBias=e.useBias),this.kernelInitializer=Mt(e.kernelInitializer||this.DEFAULT_KERNEL_INITIALIZER),this.biasInitializer=Mt(e.biasInitializer||this.DEFAULT_BIAS_INITIALIZER),this.kernelConstraint=xn(e.kernelConstraint),this.biasConstraint=xn(e.biasConstraint),this.kernelRegularizer=zt(e.kernelRegularizer),this.biasRegularizer=zt(e.biasRegularizer),this.activityRegularizer=zt(e.activityRegularizer),this.supportsMasking=!0,this.inputSpec=[{minNDim:2}]}build(e){e=At(e);let t=e[e.length-1];this.kernel==null&&(this.kernel=this.addWeight("kernel",[t,this.units],null,this.kernelInitializer,this.kernelRegularizer,!0,this.kernelConstraint),this.useBias&&(this.bias=this.addWeight("bias",[this.units],null,this.biasInitializer,this.biasRegularizer,!0,this.biasConstraint))),this.inputSpec=[{minNDim:2,axes:{[-1]:t}}],this.built=!0}computeOutputShape(e){e=At(e);let t=e.slice();return t[t.length-1]=this.units,t}call(e,t){return X(()=>{this.invokeCallHook(e,t);let n=Ze(e),s=vk(this.activation.getClassName()),r;return s!=null?r=Qr(n,this.kernel.read(),s,this.bias?this.bias.read():null):(r=Qr(n,this.kernel.read()),this.bias!=null&&(r=Br(r,this.bias.read())),this.activation!=null&&(r=this.activation.apply(r))),r})}getConfig(){let e={units:this.units,activation:lo(this.activation),useBias:this.useBias,kernelInitializer:Ut(this.kernelInitializer),biasInitializer:Ut(this.biasInitializer),kernelRegularizer:wt(this.kernelRegularizer),biasRegularizer:wt(this.biasRegularizer),activityRegularizer:wt(this.activityRegularizer),kernelConstraint:An(this.kernelConstraint),biasConstraint:An(this.biasConstraint)},t=super.getConfig();return Object.assign(e,t),e}};P5.className="Dense";ce.registerClass(P5);var F5=class extends dt{constructor(e){e=e||{},super(e),this.inputSpec=[{minNDim:3}],this.dataFormat=e.dataFormat}computeOutputShape(e){e=At(e);for(let t of e.slice(1))if(t==null)throw new H(`The shape of the input to "Flatten" is not fully defined (got ${e.slice(1)}). Make sure to pass a complete "input_shape" or "batch_input_shape" argument to the first layer in your model.`);return[e[0],eo(e,1)]}call(e,t){return X(()=>{this.invokeCallHook(e,t);let n=Ze(e);if(this.dataFormat==="channelsFirst"&&n.rank>1){let s=[0];for(let r=2;r{this.invokeCallHook(e,t);let n=Ze(e);return this.activation.apply(n)})}getConfig(){let e={activation:lo(this.activation)},t=super.getConfig();return Object.assign(e,t),e}};O5.className="Activation";ce.registerClass(O5);var M5=class extends dt{constructor(e){super(e),this.n=e.n,this.inputSpec=[{ndim:2}]}computeOutputShape(e){return[e[0],this.n,e[1]]}call(e,t){return X(()=>(e=Ze(e),LV(e,this.n)))}getConfig(){let e={n:this.n},t=super.getConfig();return Object.assign(e,t),e}};M5.className="RepeatVector";ce.registerClass(M5);var z5=class extends dt{constructor(e){super(e),this.targetShape=e.targetShape;for(let t=0;t{this.invokeCallHook(e,t);let n=Ze(e),s=n.shape,r=s.slice(0,1).concat(this.fixUnknownDimension(s.slice(1),this.targetShape));return W(n,r)})}getConfig(){let e={targetShape:this.targetShape},t=super.getConfig();return Object.assign(e,t),e}};z5.className="Reshape";ce.registerClass(z5);var L5=class extends dt{constructor(e){if(super(e),e.dims==null)throw new Error("Required configuration field `dims` is missing during Permute constructor call.");if(!Array.isArray(e.dims))throw new Error(`Permute constructor requires \`dims\` to be an Array, but received ${e.dims} instead.`);let t=Fr(1,e.dims.length+1);if(!v.arraysEqual(e.dims.slice().sort(),t))throw new Error("Invalid permutation `dims`: "+JSON.stringify(e.dims)+" `dims` must contain consecutive integers starting from 1.");this.dims=e.dims,this.dimsIncludingBatch=[0].concat(this.dims),this.inputSpec=[new an({ndim:this.dims.length+1})]}computeOutputShape(e){e=At(e);let t=e.slice();return this.dims.forEach((n,s)=>{t[s+1]=e[n]}),t}call(e,t){return tt(Ze(e),this.dimsIncludingBatch)}getConfig(){let e={dims:this.dims},t=super.getConfig();return Object.assign(e,t),e}};L5.className="Permute";ce.registerClass(L5);var B5=class extends dt{constructor(e){super(e==null?{}:e),this.supportsMasking=!0,e!=null?this.maskValue=e.maskValue==null?0:e.maskValue:this.maskValue=0}computeOutputShape(e){return e}getConfig(){let e=super.getConfig(),t={maskValue:this.maskValue};return Object.assign(t,e),t}computeMask(e,t){let n=Ze(e),s=-1;return fp(sl(n,this.maskValue),s)}call(e,t){return X(()=>{this.invokeCallHook(e,t);let n=Ze(e),s=-1,r=!0,a=fp(sl(n,this.maskValue),s,r);return M(n,me(a,n.dtype))})}};B5.className="Masking";ce.registerClass(B5);var W5=class extends dt{constructor(e){if(super(e),this.embeddings=null,this.DEFAULT_EMBEDDINGS_INITIALIZER="randomUniform",e.batchInputShape==null&&e.inputShape==null){let t=null;e.batchSize!=null&&(t=e.batchSize),e.inputLength==null?this.batchInputShape=[t,null]:this.batchInputShape=[t].concat(_t(e.inputLength))}this.inputDim=e.inputDim,Tn(this.inputDim,"inputDim"),this.outputDim=e.outputDim,Tn(this.outputDim,"outputDim"),this.embeddingsInitializer=Mt(e.embeddingsInitializer||this.DEFAULT_EMBEDDINGS_INITIALIZER),this.embeddingsRegularizer=zt(e.embeddingsRegularizer),this.activityRegularizer=zt(e.activityRegularizer),this.embeddingsConstraint=xn(e.embeddingsConstraint),this.maskZero=e.maskZero,this.supportsMasking=e.maskZero,this.inputLength=e.inputLength}build(e){this.embeddings=this.addWeight("embeddings",[this.inputDim,this.outputDim],this.dtype,this.embeddingsInitializer,this.embeddingsRegularizer,!0,this.embeddingsConstraint),this.built=!0}warnOnIncompatibleInputShape(e){}computeMask(e,t){return X(()=>this.maskZero?(e=Ze(e),sl(e,ct(e))):null)}computeOutputShape(e){if(e=At(e),this.inputLength==null)return[...e,this.outputDim];let t=_t(this.inputLength);if(t.length!==e.length-1)throw new H(`"inputLength" is ${this.inputLength}, but received input shape has shape ${e}`);{let n=0;for(let s=0;s{this.invokeCallHook(e,t);let n=Ze(e);n.dtype!=="int32"&&(n=mh(n,"int32"));let s=Tk(this.embeddings.read(),W(n,[n.size]));return W(s,At(this.computeOutputShape(n.shape)))})}getConfig(){let e={inputDim:this.inputDim,outputDim:this.outputDim,embeddingsInitializer:Ut(this.embeddingsInitializer),embeddingsRegularizer:wt(this.embeddingsRegularizer),activityRegularizer:wt(this.activityRegularizer),embeddingsConstraint:An(this.embeddingsConstraint),maskZero:this.maskZero,inputLength:this.inputLength},t=super.getConfig();return Object.assign(e,t),e}};W5.className="Embedding";ce.registerClass(W5);var uu=class extends dt{constructor(e){super(e||{}),this.supportsMasking=!0}mergeFunction(e){throw new Ke}computeElementwiseOpOutputShape(e,t){if(e==null||t==null)return null;if(e.length1)throw new H(`Can not merge tensors with different batch sizes. Got tensors with shapes: ${JSON.stringify(e)}.`);let n=e[0]==null?null:e[0].slice(1);for(let r=1;rr.length);e.indexOf(null)===-1&&Qa(s).length===1?this.reshapeRequired=!1:this.reshapeRequired=!0}call(e,t){return X(()=>{if(e=e,this.reshapeRequired){let n=[],s=e.map(r=>r.rank);if(s.indexOf(null)===-1){let r=io(s);for(let a of e){let o=a.rank;for(let i=0;i1){let u=Fr(1,l).concat([0]);n.push(tt(i,u)),r=!0}else n.push(i)}let a=this.mergeFunction(n),o=a.rank;if(r){if(o==null){let i=a.shape,l=i.length,u=i[l-1],c=[u].concat(i.slice(0,i.length-1));a=W(tt(W(a,[-1,u]),[1,0]),c)}else if(o>1){let i=[o-1].concat(Fr(0,o-1));a=tt(a,i)}}return a}}else return this.mergeFunction(e)})}computeOutputShape(e){e=e;let t;e[0]==null?t=null:t=e[0].slice(1);for(let s=1;s{if(t==null)return null;if(!Array.isArray(t))throw new H("`mask` should be an Array");if(!Array.isArray(e))throw new H("`inputs` should be an Array");if(t.length!==e.length)throw new H(`The Array 'inputs' and 'mask' are expected to have the same length, but have different lengths (${e.length} vs ${t.length})`);if(t.every(s=>s==null))return null;t=t.map(s=>s==null?s:Ft(s,0));let n=t[0];for(let s=1;s{let t=e[0].clone();for(let n=1;n{let t=e[0].clone();for(let n=1;n{let t=e[0].clone();for(let n=1;n{let t=e[0];for(let n=1;n{let t=e[0];for(let n=1;n1)throw new H("A `Concatenate` layer requires inputs with matching shapes except for the concat axis. Got input shapes: "+JSON.stringify(e))}mergeFunction(e){return X(()=>qA(e,this.axis))}computeOutputShape(e){if(!(Array.isArray(e)&&Array.isArray(e[0])))throw new H("A `Concatenate` layer should be called on a list of inputs.");let t=e,n=t[0].slice(),s=this.axis<0?n.length+this.axis:this.axis;for(let r of t.slice(1)){if(n[s]==null||r[s]==null){n[s]=null;break}n[s]+=r[s]}return n}computeMask(e,t){if(t==null)return null;if(!Array.isArray(t))throw new H("`mask` should be an array for Concatenate");if(!Array.isArray(e))throw new H("`inputs` should be an array for Concatenate");if(t.length!==e.length)throw new H(`Mismatch in the length of mask (${t.length}) and the legnth of inputs (${e.length})`);return X(()=>{let n=!0;if(t.forEach(a=>{if(a!=null){n=!1;return}}),n)return null;let s=[];for(let a=0;a3||t.shape.length>3)throw new Ke("batchDot is not implemented for tensors of 4D or higher rank yet");if(v.assert(e.shape.length>=2,()=>`batchDot requires the rank of x to be >= 2, but got ${e.shape.length}`),v.assert(e.shape.length>=2,()=>`batchDot requires the rank of y to be >= 2, but got ${t.shape.length}`),typeof n=="number"&&(n=[n,n]),e.dtype==="complex64"||t.dtype==="complex64")throw new Ke("batchDot is not implemented for complex64-type Tensors yet.");let s=e.shape.length,r=t.shape.length;n==null&&(n=[s-1,r-2]);let a=n;return X(()=>{let o;if(s>r){o=s-r;let l=[];for(let u=0;us){o=r-s;let l=[];for(let u=0;u0){let l;s>r?l=s+r-3:l=s-1;let u=[];for(let c=l;c"A `Dot` layer should be called on a list of exactly 2 inputs.");let t=e[0],n=e[1];if(t.length>3||n.length>3)throw new Ke("Dot layer does not support tensors of 4D or higher rank yet.");let s=this.interpretAxes(t,n);if(t[s[0]]!==n[s[1]])throw new H(`Dimension incompatibility: ${t[s[0]]} !== ${n[s[1]]}`)}mergeFunction(e){if(e.length!==2)throw new H(`A \`Dot\` layer must be called on exactly 2 inputs, but received ${e.length} input(s).`);let t=e[0],n=e[1],s;return Array.isArray(this.axes)?s=this.axes.map((r,a)=>Vd(r,e[a].shape.length)):s=[Vd(this.axes,t.shape.length),Vd(this.axes,n.shape.length)],this.normalize&&(t=pm(t,s[0]),n=pm(n,s[1])),NG(t,n,s)}interpretAxes(e,t){let n;return Array.isArray(this.axes)?n=this.axes:n=[Vd(this.axes,e.length),Vd(this.axes,t.length)],n}computeOutputShape(e){v.assert(Array.isArray(e)&&e.length===2&&Array.isArray(e[0])&&Array.isArray(e[1]),()=>"A `Dot` layer should be called on a list of exactly 2 inputs.");let t=e[0].slice(),n=e[1].slice();if(t.length>3||n.length>3)throw new Ke("Dot layer does not support tensors of 4D or higher rank yet.");let s=this.interpretAxes(t,n);t.splice(s[0],1),n.splice(s[1],1),n.splice(0,1);let r=t.concat(n);return r.length===1&&r.push(1),r}computeMask(e,t){return null}getConfig(){let e={axes:this.axes,normalize:this.normalize},t=super.getConfig();return Object.assign(e,t),e}};X5.className="Dot";ce.registerClass(X5);var K5=class extends dt{constructor(e){super(e),this.supportsMasking=!0,this.stddev=e.stddev}computeOutputShape(e){return e}getConfig(){let e=super.getConfig(),t={stddev:this.stddev};return Object.assign(t,e),t}call(e,t){return X(()=>{this.invokeCallHook(e,t);let n=Ze(e);return Ah(()=>le(U0(n.shape,0,this.stddev),n),()=>n,t.training||!1)})}};K5.className="GaussianNoise";ce.registerClass(K5);var Z5=class extends dt{constructor(e){super(e),this.supportsMasking=!0,this.rate=e.rate}computeOutputShape(e){return e}getConfig(){let e=super.getConfig(),t={rate:this.rate};return Object.assign(t,e),t}call(e,t){return X(()=>{this.invokeCallHook(e,t);let n=Ze(e);return this.rate>0&&this.rate<1?Ah(()=>{let r=Math.sqrt(this.rate/(1-this.rate));return M(n,U0(n.shape,1,r))},()=>n,t.training||!1):n})}};Z5.className="GaussianDropout";ce.registerClass(Z5);var Y5=class extends dt{constructor(e){super(e),this.supportsMasking=!0,this.rate=e.rate,this.noiseShape=e.noiseShape}_getNoiseShape(e){return this.noiseShape||Ze(e).shape}computeOutputShape(e){return e}getConfig(){let e=super.getConfig(),t={rate:this.rate};return Object.assign(t,e),t}call(e,t){return X(()=>{if(this.rate<1&&this.rate>0){let n=this._getNoiseShape(e);return Ah(()=>{let r=Ze(e),a=1.6732632423543772,o=1.0507009873554805,i=-a*o,l=pi(Xc(n),this.rate);l=mh(l,"float32");let u=((1-this.rate)*(1+this.rate*i**2))**-.5,c=-u*i*this.rate,p=le(M(r,l),M(le(l,-1),i));return le(M(p,u),c)},()=>Ze(e),t.training||!1)}return e})}};Y5.className="AlphaDropout";ce.registerClass(Y5);function Ap(e,t,n,s,r,a=.001){let o;if(e.rank===2)o=Jy(e,t,n,s,r,a);else if(e.rank===3)o=Qy(e,t,n,s,r,a);else if(e.rank===4)o=eA(e,t,n,s,r,a);else throw new Ke(`batchNormalization is not implemented for array of rank ${e.rank} yet`);return o}function EG(e,t,n,s,r=.001){return X(()=>{let a=ih(e,s),o=a.mean,i=a.variance;return[Ap(e,o,i,n,t,r),o,i]})}function RG(e,t,n,s,r=.001){return X(()=>{let a=ih(e,s),o=a.mean,i=a.variance,l=[];for(let f of Fr(0,e.rank))s.indexOf(f)!==-1?l.push(1):l.push(e.shape[f]);let u=W(o,l),c=W(i,l),p=t==null?null:W(t,l),d=n==null?null:W(n,l);return[Ap(e,u,c,d,p,r),o,i]})}function _G(e,t,n,s,r=.001){return v.arraysEqual(s.slice().sort(),Fr(0,e.rank-1))?EG(e,t,n,s,r):RG(e,t,n,s,r)}var J5=class extends dt{constructor(e){e==null&&(e={}),super(e),this.supportsMasking=!0,this.axis=e.axis==null?-1:e.axis,this.momentum=e.momentum==null?.99:e.momentum,this.epsilon=e.epsilon==null?.001:e.epsilon,this.center=e.center==null?!0:e.center,this.scale=e.scale==null?!0:e.scale,this.betaInitializer=Mt(e.betaInitializer||"zeros"),this.gammaInitializer=Mt(e.gammaInitializer||"ones"),this.movingMeanInitializer=Mt(e.movingMeanInitializer||"zeros"),this.movingVarianceInitializer=Mt(e.movingVarianceInitializer||"ones"),this.betaConstraint=xn(e.betaConstraint),this.gammaConstraint=xn(e.gammaConstraint),this.betaRegularizer=zt(e.betaRegularizer),this.gammaRegularizer=zt(e.gammaRegularizer)}build(e){e=At(e);let t=this.axis>=0?this.axis:this.axis+e.length,n=e[t];if(n==null)throw new H(`Axis ${t} of input tensor should have a defined dimension but the layer received an input with shape ${JSON.stringify(e)}.`);this.inputSpec=[new an({ndim:e.length,axes:{[t]:n}})];let s=[n];this.scale&&(this.gamma=this.addWeight("gamma",s,null,this.gammaInitializer,this.gammaRegularizer,!0,this.gammaConstraint)),this.center&&(this.beta=this.addWeight("beta",s,null,this.betaInitializer,this.betaRegularizer,!0,this.betaConstraint)),this.movingMean=this.addWeight("moving_mean",s,null,this.movingMeanInitializer,null,!1),this.movingVariance=this.addWeight("moving_variance",s,null,this.movingVarianceInitializer,null,!1),this.built=!0}call(e,t){return X(()=>{let n=t.training==null?!1:t.training,s=Ze(e),r=s.shape,a=r.length,o=Fr(0,a),i=this.axis>=0?this.axis:this.axis+a;o.splice(i,1);let l=rl(1,a);l[i]=r[i];let u=o.slice();u.sort();let c=!v.arraysEqual(u,Fr(0,a).slice(0,a-1)),p=()=>{if(c){let y=W(this.movingMean.read(),l),x=W(this.movingVariance.read(),l),A=this.center?W(this.beta.read(),l):null,b=this.scale?W(this.gamma.read(),l):null;return Ap(s,y,x,A,b,this.epsilon)}else return Ap(s,this.movingMean.read(),this.movingVariance.read(),this.beta==null?null:this.beta.read(),this.gamma==null?null:this.gamma.read(),this.epsilon)};if(!n)return p();let[d,h,f]=_G(s,this.gamma.read(),this.beta.read(),o,this.epsilon),m=(y,x,A)=>{X(()=>{let b=1-A,w=y.read(),k=M(ye(w,x),b);y.write(ye(w,k))})};return(()=>{m(this.movingMean,h,this.momentum),m(this.movingVariance,f,this.momentum)})(),d})}getConfig(){let e={axis:this.axis,momentum:this.momentum,epsilon:this.epsilon,center:this.center,scale:this.scale,betaInitializer:Ut(this.betaInitializer),gammaInitializer:Ut(this.gammaInitializer),movingMeanInitializer:Ut(this.movingMeanInitializer),movingVarianceInitializer:Ut(this.movingVarianceInitializer),betaRegularizer:wt(this.betaRegularizer),gammaRegularizer:wt(this.gammaRegularizer),betaConstraint:An(this.betaConstraint),gammaConstraint:An(this.gammaConstraint)},t=super.getConfig();return Object.assign(e,t),e}};J5.className="BatchNormalization";ce.registerClass(J5);var Q5=class extends dt{constructor(e){if(e==null&&(e={}),super(e),this.axis=e.axis==null?-1:e.axis,typeof this.axis=="number"){if(!Number.isInteger(this.axis))throw new Error(`Expected axis to be an integer, but received ${this.axis}`)}else if(Array.isArray(this.axis)){for(let t of this.axis)if(!Number.isInteger(t))throw new Error(`Expected axis to be an array of integers, but received ${JSON.stringify(this.axis)}`)}else throw new Error(`Expected axis to be an integer or an array of integers, but received ${JSON.stringify(this.axis)}`);this.epsilon=e.epsilon==null?.001:e.epsilon,this.center=e.center==null?!0:e.center,this.scale=e.scale==null?!0:e.scale,this.betaInitializer=Mt(e.betaInitializer||"zeros"),this.gammaInitializer=Mt(e.gammaInitializer||"ones"),this.betaRegularizer=zt(e.betaRegularizer),this.gammaRegularizer=zt(e.gammaRegularizer),this.supportsMasking=!0}build(e){e=At(e);let t=e.length;typeof this.axis=="number"&&(this.axis=[this.axis]);for(let r=0;r=t)throw new Error(`Invalid axis: ${r}`);if(this.axis.length!==Qa(this.axis).length)throw new Error(`Found duplicate axes in: ${this.axis}`);let n=this.axis.map(r=>e[r]),s=!0;this.scale?this.gamma=this.addWeight("gamma",n,"float32",this.gammaInitializer,this.gammaRegularizer,s):this.gamma=null,this.center?this.beta=this.addWeight("beta",n,"float32",this.betaInitializer,this.betaRegularizer,s):this.beta=null,this.built=!0}call(e,t){let n=Ze(e),s=n.shape,r=s.length;return X(()=>{let{mean:o,variance:i}=ih(n,this.axis,!0),l=rl(1,r);for(let f of this.axis)l[f]=s[f];let u=f=>f!=null&&f.shape.length!==r?W(f,l):f,c=this.scale?u(this.gamma.read()):null,p=this.center?u(this.beta.read()):null,d=[],h=[];for(let f=0;f{if(e.rank!==4)throw new H(`temporalPadding expects input tensor to be 4-D, but received a ${e.rank}-D tensor.`);if(t==null&&(t=[[1,1],[1,1]]),t.length!==2||t[0].length!==2||t[1].length!==2)throw new H("spatial2dPadding expects `padding` to be an Array of two Arrays, each of which is an Array of two integers.");if(n==null&&(n=Or()),n!=="channelsLast"&&n!=="channelsFirst")throw new H(`Unknown data format: ${n}. Supported data formats are 'channelsLast' and 'channelsFirst.`);let s;return n==="channelsFirst"?s=[[0,0],[0,0],t[0],t[1]]:s=[[0,0],t[0],t[1],[0,0]],tr(e,s)})}var ex=class extends dt{constructor(e){if(e==null&&(e={}),super(e),this.dataFormat=e.dataFormat==null?Or():e.dataFormat,e.padding==null)this.padding=[[1,1],[1,1]];else if(typeof e.padding=="number")this.padding=[[e.padding,e.padding],[e.padding,e.padding]];else{if(e.padding=e.padding,e.padding.length!==2)throw new H(`ZeroPadding2D expects padding to be a length-2 array, but received a length-${e.padding.length} array.`);let t,n;if(typeof e.padding[0]=="number")t=[e.padding[0],e.padding[0]],n=[e.padding[1],e.padding[1]];else{if(e.padding=e.padding,e.padding[0].length!==2)throw new H(`ZeroPadding2D expects height padding to be a length-2 array, but received a length-${e.padding[0].length} array.`);if(t=e.padding[0],e.padding[1].length!==2)throw new H(`ZeroPadding2D expects width padding to be a length-2 array, but received a length-${e.padding[1].length} array.`);n=e.padding[1]}this.padding=[t,n]}this.inputSpec=[new an({ndim:4})]}computeOutputShape(e){e=At(e);let t,n;return this.dataFormat==="channelsFirst"?(e[2]!=null&&e[2]>=0?t=e[2]+this.padding[0][0]+this.padding[0][1]:t=null,e[3]!=null&&e[3]>=0?n=e[3]+this.padding[1][0]+this.padding[1][1]:n=null,[e[0],e[1],t,n]):(e[1]!=null&&e[1]>=0?t=e[1]+this.padding[0][0]+this.padding[0][1]:t=null,e[2]!=null&&e[2]>=0?n=e[2]+this.padding[1][0]+this.padding[1][1]:n=null,[e[0],t,n,e[3]])}call(e,t){return X(()=>DG(Ze(e),this.padding,this.dataFormat))}getConfig(){let e={padding:this.padding,dataFormat:this.dataFormat},t=super.getConfig();return Object.assign(e,t),e}};ex.className="ZeroPadding2D";ce.registerClass(ex);function o2(e,t,n,s,r,a){return X(()=>{Qt(r),kk(a),nr(s),n==null&&(n=[1,1]),s==null&&(s="valid"),r==null&&(r=Or()),a==null&&(a="max"),e=v5(e,r);let o,i=s==="same"?"same":"valid";return a==="max"?o=oh(e,t,n,i):o=eh(e,t,n,i),r==="channelsFirst"&&(o=tt(o,[0,3,1,2])),o})}function A8(e,t,n,s,r,a){return X(()=>{Qt(r),kk(a),nr(s),n==null&&(n=[1,1,1]),s==null&&(s="valid"),r==null&&(r=Or()),a==null&&(a="max"),e=h8(e,r);let o,i=s==="same"?"same":"valid";return a==="max"?o=SA(e,t,n,i):o=Yy(e,t,n,i),r==="channelsFirst"&&(o=tt(o,[0,4,1,2,3])),o})}var x8=class extends dt{constructor(e){if(e.poolSize==null&&(e.poolSize=2),super(e),typeof e.poolSize=="number")this.poolSize=[e.poolSize];else if(Array.isArray(e.poolSize)&&e.poolSize.length===1&&typeof e.poolSize[0]=="number")this.poolSize=e.poolSize;else throw new H(`poolSize for 1D convolutional layer must be a number or an Array of a single number, but received ${JSON.stringify(e.poolSize)}`);if(Tn(this.poolSize,"poolSize"),e.strides==null)this.strides=this.poolSize;else if(typeof e.strides=="number")this.strides=[e.strides];else if(Array.isArray(e.strides)&&e.strides.length===1&&typeof e.strides[0]=="number")this.strides=e.strides;else throw new H(`strides for 1D convolutional layer must be a number or an Array of a single number, but received ${JSON.stringify(e.strides)}`);Tn(this.strides,"strides"),this.padding=e.padding==null?"valid":e.padding,nr(this.padding),this.inputSpec=[new an({ndim:3})]}computeOutputShape(e){e=At(e);let t=Pr(e[1],this.poolSize[0],this.padding,this.strides[0]);return[e[0],t,e[2]]}call(e,t){return X(()=>{this.invokeCallHook(e,t),e=gh(Ze(e),2);let n=this.poolingFunction(Ze(e),[this.poolSize[0],1],[this.strides[0],1],this.padding,"channelsLast");return Ge(n,[2])})}getConfig(){let e={poolSize:this.poolSize,padding:this.padding,strides:this.strides},t=super.getConfig();return Object.assign(e,t),e}},tx=class extends x8{constructor(e){super(e)}poolingFunction(e,t,n,s,r){return Qt(r),nr(s),o2(e,t,n,s,r,"max")}};tx.className="MaxPooling1D";ce.registerClass(tx);var nx=class extends x8{constructor(e){super(e)}poolingFunction(e,t,n,s,r){return Qt(r),nr(s),o2(e,t,n,s,r,"avg")}};nx.className="AveragePooling1D";ce.registerClass(nx);var b8=class extends dt{constructor(e){if(e.poolSize==null&&(e.poolSize=[2,2]),super(e),this.poolSize=Array.isArray(e.poolSize)?e.poolSize:[e.poolSize,e.poolSize],e.strides==null)this.strides=this.poolSize;else if(Array.isArray(e.strides)){if(e.strides.length!==2)throw new H(`If the strides property of a 2D pooling layer is an Array, it is expected to have a length of 2, but received length ${e.strides.length}.`);this.strides=e.strides}else this.strides=[e.strides,e.strides];Tn(this.poolSize,"poolSize"),Tn(this.strides,"strides"),this.padding=e.padding==null?"valid":e.padding,this.dataFormat=e.dataFormat==null?"channelsLast":e.dataFormat,Qt(this.dataFormat),nr(this.padding),this.inputSpec=[new an({ndim:4})]}computeOutputShape(e){e=At(e);let t=this.dataFormat==="channelsFirst"?e[2]:e[1],n=this.dataFormat==="channelsFirst"?e[3]:e[2];return t=Pr(t,this.poolSize[0],this.padding,this.strides[0]),n=Pr(n,this.poolSize[1],this.padding,this.strides[1]),this.dataFormat==="channelsFirst"?[e[0],e[1],t,n]:[e[0],t,n,e[3]]}call(e,t){return X(()=>(this.invokeCallHook(e,t),this.poolingFunction(Ze(e),this.poolSize,this.strides,this.padding,this.dataFormat)))}getConfig(){let e={poolSize:this.poolSize,padding:this.padding,strides:this.strides,dataFormat:this.dataFormat},t=super.getConfig();return Object.assign(e,t),e}},sx=class extends b8{constructor(e){super(e)}poolingFunction(e,t,n,s,r){return Qt(r),nr(s),o2(e,t,n,s,r,"max")}};sx.className="MaxPooling2D";ce.registerClass(sx);var rx=class extends b8{constructor(e){super(e)}poolingFunction(e,t,n,s,r){return Qt(r),nr(s),o2(e,t,n,s,r,"avg")}};rx.className="AveragePooling2D";ce.registerClass(rx);var v8=class extends dt{constructor(e){if(e.poolSize==null&&(e.poolSize=[2,2,2]),super(e),this.poolSize=Array.isArray(e.poolSize)?e.poolSize:[e.poolSize,e.poolSize,e.poolSize],e.strides==null)this.strides=this.poolSize;else if(Array.isArray(e.strides)){if(e.strides.length!==3)throw new H(`If the strides property of a 3D pooling layer is an Array, it is expected to have a length of 3, but received length ${e.strides.length}.`);this.strides=e.strides}else this.strides=[e.strides,e.strides,e.strides];Tn(this.poolSize,"poolSize"),Tn(this.strides,"strides"),this.padding=e.padding==null?"valid":e.padding,this.dataFormat=e.dataFormat==null?"channelsLast":e.dataFormat,Qt(this.dataFormat),nr(this.padding),this.inputSpec=[new an({ndim:5})]}computeOutputShape(e){e=At(e);let t=this.dataFormat==="channelsFirst"?e[2]:e[1],n=this.dataFormat==="channelsFirst"?e[3]:e[2],s=this.dataFormat==="channelsFirst"?e[4]:e[3];return t=Pr(t,this.poolSize[0],this.padding,this.strides[0]),n=Pr(n,this.poolSize[1],this.padding,this.strides[1]),s=Pr(s,this.poolSize[2],this.padding,this.strides[2]),this.dataFormat==="channelsFirst"?[e[0],e[1],t,n,s]:[e[0],t,n,s,e[4]]}call(e,t){return X(()=>(this.invokeCallHook(e,t),this.poolingFunction(Ze(e),this.poolSize,this.strides,this.padding,this.dataFormat)))}getConfig(){let e={poolSize:this.poolSize,padding:this.padding,strides:this.strides,dataFormat:this.dataFormat},t=super.getConfig();return Object.assign(e,t),e}},ax=class extends v8{constructor(e){super(e)}poolingFunction(e,t,n,s,r){return Qt(r),nr(s),A8(e,t,n,s,r,"max")}};ax.className="MaxPooling3D";ce.registerClass(ax);var ox=class extends v8{constructor(e){super(e)}poolingFunction(e,t,n,s,r){return Qt(r),nr(s),A8(e,t,n,s,r,"avg")}};ox.className="AveragePooling3D";ce.registerClass(ox);var w8=class extends dt{constructor(e){super(e),this.inputSpec=[new an({ndim:3})]}computeOutputShape(e){return[e[0],e[2]]}call(e,t){throw new Ke}},ix=class extends w8{constructor(e){super(e||{})}call(e,t){return X(()=>{let n=Ze(e);return Wt(n,1)})}};ix.className="GlobalAveragePooling1D";ce.registerClass(ix);var lx=class extends w8{constructor(e){super(e||{})}call(e,t){return X(()=>{let n=Ze(e);return yn(n,1)})}};lx.className="GlobalMaxPooling1D";ce.registerClass(lx);var k8=class extends dt{constructor(e){super(e),this.dataFormat=e.dataFormat==null?"channelsLast":e.dataFormat,Qt(this.dataFormat),this.inputSpec=[new an({ndim:4})]}computeOutputShape(e){return e=e,this.dataFormat==="channelsLast"?[e[0],e[3]]:[e[0],e[1]]}call(e,t){throw new Ke}getConfig(){let e={dataFormat:this.dataFormat},t=super.getConfig();return Object.assign(e,t),e}},ux=class extends k8{call(e,t){return X(()=>{let n=Ze(e);return this.dataFormat==="channelsLast"?Wt(n,[1,2]):Wt(n,[2,3])})}};ux.className="GlobalAveragePooling2D";ce.registerClass(ux);var cx=class extends k8{call(e,t){return X(()=>{let n=Ze(e);return this.dataFormat==="channelsLast"?yn(n,[1,2]):yn(n,[2,3])})}};cx.className="GlobalMaxPooling2D";ce.registerClass(cx);var S8=class extends dt{constructor(e){super(e),this.layer=e.layer}build(e){this.built=!0}get trainable(){return this.layer!=null?this.layer.trainable:!1}set trainable(e){this.layer!=null&&(this.layer.trainable=e)}get trainableWeights(){return this.layer.trainableWeights}get nonTrainableWeights(){return this.layer.nonTrainableWeights}get updates(){return this.layer._updates}get losses(){return this.layer.losses}getWeights(){return this.layer.getWeights()}setWeights(e){this.layer.setWeights(e)}getConfig(){let e={layer:{className:this.layer.getClassName(),config:this.layer.getConfig()}},t=super.getConfig();return Object.assign(e,t),e}setFastWeightInitDuringBuild(e){super.setFastWeightInitDuringBuild(e),this.layer!=null&&this.layer.setFastWeightInitDuringBuild(e)}static fromConfig(e,t,n={}){let s=t.layer,r=$r(s,n);delete t.layer;let a={layer:r};return Object.assign(a,t),new e(a)}},dx=class extends S8{constructor(e){super(e),this.supportsMasking=!0}build(e){if(e=At(e),e.length<3)throw new H(`TimeDistributed layer expects an input shape >= 3D, but received input shape ${JSON.stringify(e)}`);this.inputSpec=[{shape:e}];let t=[e[0]].concat(e.slice(2));this.layer.built||(this.layer.build(t),this.layer.built=!0),super.build(e)}computeOutputShape(e){e=At(e);let t=[e[0]].concat(e.slice(2)),n=this.layer.computeOutputShape(t),s=e[1];return[n[0],s].concat(n.slice(1))}call(e,t){return X(()=>(e=Ze(e),g8((a,o)=>[Ze(this.layer.call(a,t)),[]],e,[],!1,null,null,!1,!0)[1]))}};dx.className="TimeDistributed";ce.registerClass(dx);function $G(e){iu(PV,"BidirectionalMergeMode",e)}var PG="concat",px=class extends S8{constructor(e){super(e);let t=e.layer.getConfig(),n={};n.className=e.layer.getClassName(),n.config=t,this.forwardLayer=$r(n),t.goBackwards=t.goBackwards!==!0;let s={};if(s.className=e.layer.getClassName(),s.config=t,this.backwardLayer=$r(s),this.forwardLayer.name="forward_"+this.forwardLayer.name,this.backwardLayer.name="backward_"+this.backwardLayer.name,this.mergeMode=e.mergeMode===void 0?PG:e.mergeMode,$G(this.mergeMode),e.weights)throw new Ke("weights support is not implemented for Bidirectional layer yet.");this._stateful=e.layer.stateful,this.returnSequences=e.layer.returnSequences,this.returnState=e.layer.returnState,this.supportsMasking=!0,this._trainable=!0,this.inputSpec=e.layer.inputSpec,this.numConstants=null}get trainable(){return this._trainable}set trainable(e){this._trainable=e,this.forwardLayer!=null&&(this.forwardLayer.trainable=e),this.backwardLayer!=null&&(this.backwardLayer.trainable=e)}getWeights(){return this.forwardLayer.getWeights().concat(this.backwardLayer.getWeights())}setWeights(e){let t=e.length,n=Math.floor(t/2);this.forwardLayer.setWeights(e.slice(0,n)),this.backwardLayer.setWeights(e.slice(n))}computeOutputShape(e){let t=this.forwardLayer.computeOutputShape(e);Array.isArray(t)&&Array.isArray(t[0])||(t=[t]),t=t;let n,s,r;return this.returnState&&(r=t.slice(1)),n=t[0],n=n,this.mergeMode==="concat"?(n[n.length-1]*=2,s=[n]):this.mergeMode==null?s=[n,n.slice()]:s=[n],this.returnState?this.mergeMode==null?s.concat(r).concat(r.slice()):[n].concat(r).concat(r.slice()):ys(s)}apply(e,t){let n=t==null?null:t.initialState,s=t==null?null:t.constants;t==null&&(t={});let r=m8(e,n,s,this.numConstants);if(e=r.inputs,n=r.initialState,s=r.constants,Array.isArray(e)&&(n=e.slice(1),e=e[0]),(n==null||n.length===0)&&s==null)return super.apply(e,t);let a=[],o=[];if(n!=null){let l=n.length;if(l%2>0)throw new H("When passing `initialState` to a Bidrectional RNN, the state should be an Array containing the states of the underlying RNNs.");t.initialState=n,a.push(...n);let u=n.map(c=>new an({shape:c.shape}));this.forwardLayer.stateSpec=u.slice(0,l/2),this.backwardLayer.stateSpec=u.slice(l/2),o.push(...u)}if(s!=null)throw new Ke("Support for constants in Bidirectional layers is not implemented yet.");let i=a[0]instanceof _r;for(let l of a)if(l instanceof _r!==i)throw new H("The initial state of a Bidirectional layer cannot be specified as a mix of symbolic and non-symbolic tensors");if(i){let l=[e].concat(a),u=this.inputSpec.concat(o),c=this.inputSpec;this.inputSpec=u;let p=super.apply(l,t);return this.inputSpec=c,p}else return super.apply(e,t)}call(e,t){return X(()=>{let n=t.initialState,s,r;if(n==null)s=this.forwardLayer.call(e,t),r=this.backwardLayer.call(e,t);else{let i=n.slice(0,n.length/2),l=n.slice(n.length/2);s=this.forwardLayer.call(e,Object.assign(t,{initialState:i})),r=this.backwardLayer.call(e,Object.assign(t,{initialState:l}))}let a;this.returnState&&(Array.isArray(s)&&(a=s.slice(1).concat(r.slice(1))),s=s[0],r=r[0]),this.returnSequences&&(r=Js(r,1));let o;return this.mergeMode==="concat"?o=qA([s,r]):this.mergeMode==="sum"?o=le(s,r):this.mergeMode==="ave"?o=M(.5,le(s,r)):this.mergeMode==="mul"?o=M(s,r):this.mergeMode==null&&(o=[s,r]),this.returnState?this.mergeMode==null?o.concat(a):[o].concat(a):o})}resetStates(e){this.forwardLayer.resetStates(),this.backwardLayer.resetStates()}build(e){Ki(this.forwardLayer.name,()=>{this.forwardLayer.build(e)}),Ki(this.backwardLayer.name,()=>{this.backwardLayer.build(e)}),this.built=!0}computeMask(e,t){Array.isArray(t)&&(t=t[0]);let n;if(this.returnSequences?this.mergeMode==null?n=[t,t]:n=t:this.mergeMode==null?n=[null,null]:n=null,this.returnState){let r=this.forwardLayer.states.map(a=>null);return Array.isArray(n)?n.concat(r).concat(r):[n].concat(r).concat(r)}else return n}get trainableWeights(){return this.forwardLayer.trainableWeights.concat(this.backwardLayer.trainableWeights)}get nonTrainableWeights(){return this.forwardLayer.nonTrainableWeights.concat(this.backwardLayer.nonTrainableWeights)}setFastWeightInitDuringBuild(e){super.setFastWeightInitDuringBuild(e),this.forwardLayer!=null&&this.forwardLayer.setFastWeightInitDuringBuild(e),this.backwardLayer!=null&&this.backwardLayer.setFastWeightInitDuringBuild(e)}getConfig(){let e={mergeMode:this.mergeMode},t=super.getConfig();return Object.assign(e,t),e}static fromConfig(e,t){let n=$r(t.layer);if(delete t.layer,t.numConstants!=null)throw new Ke("Deserialization of a Bidirectional layer with numConstants present is not supported yet.");let s=t;return s.layer=n,new e(s)}};px.className="Bidirectional";ce.registerClass(px);var hx=class extends dt{constructor(e){super(e),this.scale=e.scale,e.offset?this.offset=e.offset:this.offset=0}getConfig(){let e={scale:this.scale,offset:this.offset},t=super.getConfig();return Object.assign(e,t),e}call(e,t){return X(()=>(e=Ze(e),e.dtype!=="float32"&&(e=mh(e,"float32")),le(M(e,this.scale),this.offset)))}};hx.className="Rescaling";ce.registerClass(hx);function FG(e){return new Zc(e)}function OG(e){return new A5(e)}function MG(e){return new m5(e)}function zG(e){return new g5(e)}function LG(e){return new y5(e)}function BG(e){return new b5(e)}function WG(e){return new x5(e)}function VG(e){return new e2(e)}function UG(e){return new wh(e)}function GG(e){return new k5(e)}function HG(e){return new kh(e)}function jG(e){return new S5(e)}function qG(e){return new I5(e)}function XG(e){return new C5(e)}function KG(e){return new T5(e)}function ZG(e){return new N5(e)}function YG(e){return new O5(e)}function JG(e){return new P5(e)}function QG(e){return new a2(e)}function eH(e){return new $5(e)}function tH(e){return new F5(e)}function nH(e){return new M5(e)}function sH(e){return new z5(e)}function rH(e){return new L5(e)}function aH(e){return new W5(e)}function oH(e){return new V5(e)}function iH(e){return new G5(e)}function lH(e){return new q5(e)}function uH(e){return new H5(e)}function cH(e){return new j5(e)}function dH(e){return new U5(e)}function pH(e){return new X5(e)}function hH(e){return new J5(e)}function fH(e){return new Q5(e)}function mH(e){return new ex(e)}function fx(e){return new nx(e)}function gH(e){return fx(e)}function yH(e){return fx(e)}function mx(e){return new rx(e)}function AH(e){return mx(e)}function xH(e){return mx(e)}function gx(e){return new ox(e)}function bH(e){return gx(e)}function vH(e){return gx(e)}function wH(e){return new ix(e)}function kH(e){return new ux(e)}function I8(e){return new lx(e)}function C8(e){return new cx(e)}function T8(e){return new tx(e)}function N8(e){return new sx(e)}function SH(e){return new ax(e)}function IH(e){return new R5(e)}function CH(e){return new n2(e)}function TH(e){return new _5(e)}function NH(e){return new Ih(e)}function EH(e){return new E5(e)}function RH(e){return new t2(e)}function _H(e){return new D5(e)}function DH(e){return new r2(e)}function $H(e){return new ia(e)}function PH(e){return new s2(e)}function FH(e){return new px(e)}function OH(e){return new dx(e)}var MH=I8,zH=C8,LH=T8,BH=N8;function WH(e){return new K5(e)}function VH(e){return new Z5(e)}function UH(e){return new Y5(e)}function GH(e){return new B5(e)}function HH(e){return new hx(e)}var E8={};We(E8,{MAPE:()=>nj,MSE:()=>aj,binaryAccuracy:()=>jH,binaryCrossentropy:()=>qH,categoricalAccuracy:()=>KH,categoricalCrossentropy:()=>ZH,cosineProximity:()=>QH,mape:()=>sj,meanAbsoluteError:()=>ej,meanAbsolutePercentageError:()=>tj,meanSquaredError:()=>rj,mse:()=>oj,precision:()=>YH,recall:()=>JH,sparseCategoricalAccuracy:()=>XH});function jH(e,t){return l5(e,t)}function qH(e,t){return Uk(e,t)}function XH(e,t){return Gk(e,t)}function KH(e,t){return u5(e,t)}function ZH(e,t){return c5(e,t)}function YH(e,t){return Vk(e,t)}function JH(e,t){return zU(e,t)}function QH(e,t){return i5(e,t)}function ej(e,t){return J0(e,t)}function tj(e,t){return Yc(e,t)}function nj(e,t){return Yc(e,t)}function sj(e,t){return Yc(e,t)}function rj(e,t){return lu(e,t)}function aj(e,t){return lu(e,t)}function oj(e,t){return lu(e,t)}var R8={};We(R8,{modelFromJSON:()=>fG});var _8={};We(_8,{l1:()=>lj,l1l2:()=>ij,l2:()=>uj});function ij(e){return new bh(e)}function lj(e){return wG(e)}function uj(e){return kG(e)}var D8=class extends oc{constructor(){super(...arguments),this.model=null}setModel(e){if(!(e instanceof ba))throw new Error("model must be a LayersModel, not some other Container");this.model=e}};function $f(e,t){return et}var $8=class extends D8{constructor(e){if(super(),e==null&&(e={}),e.restoreBestWeights)throw new Ke("restoreBestWeights = True is not implemented in EarlyStopping yet.");this.monitor=e.monitor||"val_loss",this.minDelta=Math.abs(e.minDelta||0),this.patience=e.patience||0,this.verbose=e.verbose||0,this.mode=e.mode||"auto",this.baseline=e.baseline,["auto","min","max"].indexOf(this.mode)===-1&&(console.warn(`EarlyStopping mode '${this.mode}' is invalid. Falling back to mode 'auto'.`),this.mode="auto"),this.mode==="min"?this.monitorFunc=$f:this.mode==="max"?this.monitorFunc=Yv:this.monitor.indexOf("acc")!==-1?this.monitorFunc=Yv:this.monitorFunc=$f,this.monitorFunc===$f&&(this.minDelta*=-1)}async onTrainBegin(e){this.wait=0,this.stoppedEpoch=0,this.baseline!=null?this.best=this.baseline:this.best=this.monitorFunc===$f?1/0:-1/0}async onEpochEnd(e,t){await qa(t);let n=this.getMonitorValue(t);n!=null&&(this.monitorFunc(n-this.minDelta,this.best)?(this.best=n,this.wait=0):(this.wait++,this.wait>=this.patience&&(this.stoppedEpoch=e,this.model.stopTraining=!0)))}async onTrainEnd(e){this.stoppedEpoch>0&&this.verbose&&console.log(`Epoch ${this.stoppedEpoch}: early stopping.`)}getMonitorValue(e){e==null&&(e={});let t=e[this.monitor];return t==null&&console.warn(`Metric for EarlyStopping ${this.monitor} is not available. Available metrics are: ${Object.keys(e)}`),t}};function cj(e){return new $8(e)}var dj={earlyStopping:cj},pj=U();pj.registerFlag("KEEP_INTERMEDIATE_TENSORS",()=>!1,e=>{e&&console.warn("Keep intermediate tensors is ON. This will print the values of all intermediate tensors during model inference. Not all models support this mode. For details, check e2e/benchmarks/ model_config.js. This significantly impacts performance.")});var pr;(function(e){e[e.DT_INVALID=0]="DT_INVALID",e[e.DT_FLOAT=1]="DT_FLOAT",e[e.DT_DOUBLE=2]="DT_DOUBLE",e[e.DT_INT32=3]="DT_INT32",e[e.DT_UINT8=4]="DT_UINT8",e[e.DT_INT16=5]="DT_INT16",e[e.DT_INT8=6]="DT_INT8",e[e.DT_STRING=7]="DT_STRING",e[e.DT_COMPLEX64=8]="DT_COMPLEX64",e[e.DT_INT64=9]="DT_INT64",e[e.DT_BOOL=10]="DT_BOOL",e[e.DT_QINT8=11]="DT_QINT8",e[e.DT_QUINT8=12]="DT_QUINT8",e[e.DT_QINT32=13]="DT_QINT32",e[e.DT_BFLOAT16=14]="DT_BFLOAT16",e[e.DT_QINT16=15]="DT_QINT16",e[e.DT_QUINT16=16]="DT_QUINT16",e[e.DT_UINT16=17]="DT_UINT16",e[e.DT_COMPLEX128=18]="DT_COMPLEX128",e[e.DT_HALF=19]="DT_HALF",e[e.DT_RESOURCE=20]="DT_RESOURCE",e[e.DT_VARIANT=21]="DT_VARIANT",e[e.DT_UINT32=22]="DT_UINT32",e[e.DT_UINT64=23]="DT_UINT64",e[e.DT_FLOAT_REF=101]="DT_FLOAT_REF",e[e.DT_DOUBLE_REF=102]="DT_DOUBLE_REF",e[e.DT_INT32_REF=103]="DT_INT32_REF",e[e.DT_UINT8_REF=104]="DT_UINT8_REF",e[e.DT_INT16_REF=105]="DT_INT16_REF",e[e.DT_INT8_REF=106]="DT_INT8_REF",e[e.DT_STRING_REF=107]="DT_STRING_REF",e[e.DT_COMPLEX64_REF=108]="DT_COMPLEX64_REF",e[e.DT_INT64_REF=109]="DT_INT64_REF",e[e.DT_BOOL_REF=110]="DT_BOOL_REF",e[e.DT_QINT8_REF=111]="DT_QINT8_REF",e[e.DT_QUINT8_REF=112]="DT_QUINT8_REF",e[e.DT_QINT32_REF=113]="DT_QINT32_REF",e[e.DT_BFLOAT16_REF=114]="DT_BFLOAT16_REF",e[e.DT_QINT16_REF=115]="DT_QINT16_REF",e[e.DT_QUINT16_REF=116]="DT_QUINT16_REF",e[e.DT_UINT16_REF=117]="DT_UINT16_REF",e[e.DT_COMPLEX128_REF=118]="DT_COMPLEX128_REF",e[e.DT_HALF_REF=119]="DT_HALF_REF",e[e.DT_RESOURCE_REF=120]="DT_RESOURCE_REF",e[e.DT_VARIANT_REF=121]="DT_VARIANT_REF",e[e.DT_UINT32_REF=122]="DT_UINT32_REF",e[e.DT_UINT64_REF=123]="DT_UINT64_REF"})(pr||(pr={}));var Jv;(function(e){let t;(function(n){n[n.LEGACY=0]="LEGACY",n[n.V1=1]="V1",n[n.V2=2]="V2"})(t=e.CheckpointFormatVersion||(e.CheckpointFormatVersion={}))})(Jv||(Jv={}));var yx={};function hj(e,t){let n={tfOpName:e,category:"custom",inputs:[],attrs:[],customExecutor:t};yx[e]=n}function P8(e){return yx[e]}function fj(e){delete yx[e]}function I(e,t,n,s,r){let a=t.inputParams[e];if(a&&a.inputIndexStart!==void 0){let i=a.inputIndexStart,l=a.inputIndexEnd===0?void 0:a.inputIndexEnd===void 0?i+1:a.inputIndexEnd;if(a.type==="tensor")return as(t.inputNames[a.inputIndexStart],n,s,r);if(a.type==="tensors")return t.inputNames.slice(i,l).map(d=>as(d,n,s,r));let u=as(t.inputNames.slice(i)[0],n,s,r),c=u.dataSync();return a.type==="number"?c[0]:v.toNestedArray(u.shape,c)}let o=t.attrParams[e];return o&&o.value}function as(e,t,n,s){let[r,a]=Rs(e);if(s!=null){let i=s.getHashTableHandleByName(r);if(i!=null)return i}let o=n.currentContextIds.find(i=>!!t[ym(r,i)]);return o!==void 0?t[ym(r,o)][a]:void 0}function mj(e,t,n){return t[ym(e,n.currentContextId)]}function Yr(e,t){let[n,s,r]=Rs(e);return[ym(n,t&&t.currentContextId),s,r]}function ym(e,t){return t?`${e}-${t}`:e}function Rs(e){let t=e.split(":");if(t.length===1)return[e,0,void 0];let n=t[0],s=t.length===3?t[1]:void 0,r=Number(t[t.length-1]);return[n,r,s]}function Gf(e,t,n){let s=I("pad",e,t,n);if(s==="explicit"){s=I("explicitPaddings",e,t,n);let r=[[0,0],[0,0],[0,0],[0,0]];for(let a=0;a<4;a++)r[a][0]=s[a*2],r[a][1]=s[a*2+1];return r}return s}function ya(e){return e.kept?e:Hn(e)}var F8={};We(F8,{json:()=>gj});var gj=[{tfOpName:"Add",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"AddV2",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"AddN",category:"arithmetic",inputs:[{start:0,end:0,name:"tensors",type:"tensors"}]},{tfOpName:"BiasAdd",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0}]},{tfOpName:"Sub",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"RealDiv",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Div",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"DivNoNan",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"FloorDiv",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Mul",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Maximum",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Minimum",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Pow",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"SquaredDifference",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Mod",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"FloorMod",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]}],O8={};We(O8,{json:()=>yj});var yj=[{tfOpName:"Abs",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Acos",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Asin",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Atan",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Atan2",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"y",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Ceil",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"ClipByValue",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"clipValueMin",type:"number"},{start:2,name:"clipValueMax",type:"number"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Complex",category:"basic_math",inputs:[{start:0,name:"real",type:"tensor"},{start:1,name:"imag",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"ComplexAbs",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Cos",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Cosh",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Elu",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Exp",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Floor",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Log",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Imag",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"Tout",name:"outputType",type:"dtype",notSupported:!0}]},{tfOpName:"Neg",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Real",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"Tout",name:"outputType",type:"dtype",notSupported:!0}]},{tfOpName:"Prelu",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"alpha",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Relu",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Relu6",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Selu",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Sigmoid",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Sin",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Sinh",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Sqrt",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Rsqrt",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Square",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Tan",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Tanh",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Sign",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Round",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Expm1",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Log1p",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Reciprocal",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Softplus",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Asinh",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Acosh",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Atanh",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Erf",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Prod",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axes",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool",notSupported:!0},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"LeakyRelu",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"alpha",name:"alpha",type:"number",defaultValue:.2},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"IsNan",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]}],M8={};We(M8,{json:()=>Aj});var Aj=[{tfOpName:"EmptyTensorList",category:"control",inputs:[{start:0,name:"elementShape",type:"shape"},{start:1,name:"maxNumElements",type:"number"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"LoopCond",category:"control",inputs:[{start:0,name:"pred",type:"tensor"}]},{tfOpName:"Switch",category:"control",inputs:[{start:0,name:"data",type:"tensor"},{start:1,name:"pred",type:"tensor"}]},{tfOpName:"Merge",category:"control",inputs:[{start:0,end:0,name:"tensors",type:"tensors"}]},{tfOpName:"Enter",category:"control",inputs:[{start:0,name:"tensor",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"frame_name",name:"frameName",type:"string"},{tfName:"is_constant",name:"isConstant",type:"bool"}]},{tfOpName:"Exit",category:"control",inputs:[{start:0,name:"tensor",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"NextIteration",category:"control",inputs:[{start:0,name:"tensor",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"TensorArrayV3",category:"control",inputs:[{start:0,name:"size",type:"number"}],attrs:[{tfName:"dtype",name:"dtype",type:"dtype"},{tfName:"element_shape",name:"elementShape",type:"shape"},{tfName:"dynamic_size",name:"dynamicSize",type:"bool"},{tfName:"clear_after_read",name:"clearAfterRead",type:"bool"},{tfName:"identical_element_shapes",name:"identicalElementShapes",type:"bool"},{tfName:"tensor_array_name",name:"name",type:"string"}]},{tfOpName:"TensorArrayWriteV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"},{start:1,name:"index",type:"number"},{start:2,name:"tensor",type:"tensor"},{start:3,name:"flowIn",type:"number"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"TensorArrayReadV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"},{start:1,name:"index",type:"number"},{start:2,name:"flowIn",type:"number"}],attrs:[{tfName:"dtype",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"TensorArrayGatherV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"},{start:1,name:"indices",type:"number[]"},{start:2,name:"flowIn",type:"number"}],attrs:[{tfName:"dtype",name:"dtype",type:"dtype"},{tfName:"element_shape",name:"elementShape",type:"shape"}]},{tfOpName:"TensorArrayScatterV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"},{start:1,name:"indices",type:"number[]"},{start:2,name:"tensor",type:"tensor"},{start:3,name:"flowIn",type:"number"}],attrs:[{tfName:"T",name:"dtype",type:"dtype"}]},{tfOpName:"TensorArrayConcatV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"},{start:1,name:"flowIn",type:"number"}],attrs:[{tfName:"dtype",name:"dtype",type:"dtype"},{tfName:"element_shape_except0",name:"elementShapeExcept0",type:"shape",notSupported:!0}]},{tfOpName:"TensorArraySplitV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"},{start:1,name:"tensor",type:"tensor"},{start:2,name:"lengths",type:"number[]"},{start:3,name:"flowIn",type:"number"}],attrs:[{tfName:"T",name:"dtype",type:"dtype"}]},{tfOpName:"TensorArraySizeV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"},{start:1,name:"flowIn",type:"number"}]},{tfOpName:"TensorArrayCloseV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"}]},{tfOpName:"StatelessIf",category:"control",inputs:[{start:0,name:"cond",type:"tensor"},{start:1,end:0,name:"args",type:"tensors"}],attrs:[{tfName:"then_branch",name:"thenBranch",type:"func"},{tfName:"else_branch",name:"elseBranch",type:"func"}]},{tfOpName:"If",category:"control",inputs:[{start:0,name:"cond",type:"tensor"},{start:1,end:0,name:"args",type:"tensors"}],attrs:[{tfName:"then_branch",name:"thenBranch",type:"func"},{tfName:"else_branch",name:"elseBranch",type:"func"}]},{tfOpName:"StatelessWhile",category:"control",inputs:[{start:0,end:0,name:"args",type:"tensors"}],attrs:[{tfName:"cond",name:"cond",type:"func"},{tfName:"body",name:"body",type:"func"}]},{tfOpName:"While",category:"control",inputs:[{start:0,end:0,name:"args",type:"tensors"}],attrs:[{tfName:"cond",name:"cond",type:"func"},{tfName:"body",name:"body",type:"func"}]},{tfOpName:"TensorListScatter",category:"control",inputs:[{start:0,name:"tensor",type:"tensor"},{start:1,name:"indices",type:"number[]"},{start:2,name:"elementShape",type:"shape"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListScatterV2",category:"control",inputs:[{start:0,name:"tensor",type:"tensor"},{start:1,name:"indices",type:"number[]"},{start:2,name:"elementShape",type:"shape"},{start:3,name:"numElements",type:"number"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListGather",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"},{start:1,name:"indices",type:"number[]"},{start:2,name:"elementShape",type:"shape"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListGetItem",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"},{start:1,name:"index",type:"number"},{start:2,name:"elementShape",type:"shape"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListSetItem",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"},{start:1,name:"index",type:"number"},{start:2,name:"tensor",type:"tensor"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListReserve",category:"control",inputs:[{start:0,name:"elementShape",type:"shape"},{start:1,name:"numElements",type:"number"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListFromTensor",category:"control",inputs:[{start:0,name:"tensor",type:"tensor"},{start:1,name:"elementShape",type:"shape"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListStack",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"},{start:1,name:"elementShape",type:"shape"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"},{tfName:"num_elements",name:"numElements",type:"dtype"}]},{tfOpName:"TensorListSplit",category:"control",inputs:[{start:0,name:"tensor",type:"tensor"},{start:1,name:"elementShape",type:"shape"},{start:2,name:"lengths",type:"number[]"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListConcat",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"}],attrs:[{tfName:"element_shape",name:"elementShape",type:"shape"},{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListConcatV2",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"}],attrs:[{tfName:"element_shape",name:"elementShape",type:"shape"},{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListPopBack",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"},{start:1,name:"elementShape",type:"shape"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListPushBack",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"},{start:1,name:"tensor",type:"tensor"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListLength",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"}]},{tfOpName:"TensorListResize",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"},{start:1,name:"size",type:"number"}]}],z8={};We(z8,{json:()=>xj});var xj=[{tfOpName:"AvgPool",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0},{tfName:"ksize",name:"kernelSize",type:"number[]"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"MaxPool",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0},{tfName:"ksize",name:"kernelSize",type:"number[]"},{tfName:"explicit_paddings",name:"explicitPaddings",type:"number[]",defaultValue:[],notSupported:!0},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"MaxPoolWithArgmax",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"ksize",name:"kernelSize",type:"number[]"},{tfName:"include_batch_in_index",name:"includeBatchInIndex",type:"bool"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"AvgPool3D",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0},{tfName:"ksize",name:"kernelSize",type:"number[]"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"MaxPool3D",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0},{tfName:"ksize",name:"kernelSize",type:"number[]"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Conv1D",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"filter",type:"tensor"}],attrs:[{tfName:"stride",name:"stride",type:"number"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",defaultValue:"NWC"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"dilation",name:"dilation",type:"number",defaultValue:1}]},{tfOpName:"Conv2D",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"filter",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"useCudnnOnGpu",name:"useCudnnOnGpu",type:"bool"},{tfName:"data_format",name:"dataFormat",type:"string",defaultValue:"NHWC"},{tfName:"explicit_paddings",name:"explicitPaddings",type:"number[]",defaultValue:[]},{tfName:"dilations",name:"dilations",type:"number[]"}]},{tfOpName:"_FusedConv2D",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"filter",type:"tensor"},{start:2,end:0,name:"args",type:"tensors"}],attrs:[{tfName:"num_args",name:"numArgs",type:"number"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"explicit_paddings",name:"explicitPaddings",type:"number[]",defaultValue:[]},{tfName:"use_cudnn_on_gpu",name:"useCudnnOnGpu",type:"bool",defaultValue:!0},{tfName:"data_format",name:"dataFormat",type:"string",defaultValue:"NHWC"},{tfName:"dilations",name:"dilations",type:"number[]",defaultValue:[1,1,1,1]},{tfName:"fused_ops",name:"fusedOps",type:"string[]",defaultValue:[]},{tfName:"epsilon",name:"epsilon",type:"number",defaultValue:1e-4},{tfName:"leakyrelu_alpha",name:"leakyreluAlpha",type:"number",defaultValue:.2}]},{tfOpName:"Conv2DBackpropInput",category:"convolution",inputs:[{start:2,name:"x",type:"tensor"},{start:1,name:"filter",type:"tensor"},{start:0,name:"outputShape",type:"number[]"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0},{tfName:"explicit_paddings",name:"explicitPaddings",type:"number[]",defaultValue:[]},{tfName:"dilations",name:"dilations",type:"number[]",notSupported:!0}]},{tfOpName:"DepthwiseConv2d",category:"convolution",inputs:[{start:0,name:"input",type:"tensor"},{start:1,name:"filter",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",defaultValue:"NHWC"},{tfName:"explicit_paddings",name:"explicitPaddings",type:"number[]",defaultValue:[]},{tfName:"dilations",name:"dilations",type:"number[]"}]},{tfOpName:"DepthwiseConv2dNative",category:"convolution",inputs:[{start:0,name:"input",type:"tensor"},{start:1,name:"filter",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",defaultValue:"NHWC"},{tfName:"explicit_paddings",name:"explicitPaddings",type:"number[]",defaultValue:[]},{tfName:"dilations",name:"dilations",type:"number[]"}]},{tfOpName:"FusedDepthwiseConv2dNative",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"filter",type:"tensor"},{start:2,end:0,name:"args",type:"tensors"}],attrs:[{tfName:"num_args",name:"numArgs",type:"number"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",defaultValue:"NHWC"},{tfName:"dilations",name:"dilations",type:"number[]",defaultValue:[1,1,1,1]},{tfName:"fused_ops",name:"fusedOps",type:"string[]",defaultValue:[]},{tfName:"explicit_paddings",name:"explicitPaddings",type:"number[]",defaultValue:[]}]},{tfOpName:"Conv3D",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"filter",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",defaultValue:"NHWC"},{tfName:"dilations",name:"dilations",type:"number[]"}]},{tfOpName:"Dilation2D",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"filter",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"rates",name:"dilations",type:"number[]"},{tfName:"padding",name:"pad",type:"string"}]}],L8={};We(L8,{json:()=>bj});var bj=[{tfOpName:"Fill",category:"creation",inputs:[{start:0,name:"shape",type:"number[]"},{start:1,name:"value",type:"number"}],attrs:[{tfName:"T",name:"dtype",type:"dtype"}]},{tfOpName:"LinSpace",category:"creation",inputs:[{start:0,name:"start",type:"number"},{start:1,name:"stop",type:"number"},{start:2,name:"num",type:"number"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"OneHot",category:"creation",inputs:[{start:0,name:"indices",type:"tensor"},{start:1,name:"depth",type:"number"},{start:2,name:"onValue",type:"number",defaultValue:1},{start:3,name:"offValue",type:"number",defaultValue:0}],attrs:[{tfName:"axis",name:"axis",type:"number",notSupported:!0},{tfName:"T",name:"dtype",type:"dtype"}]},{tfOpName:"Ones",category:"creation",inputs:[{start:0,name:"shape",type:"number[]"}],attrs:[{tfName:"T",name:"dtype",type:"dtype"}]},{tfOpName:"OnesLike",category:"creation",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"dtype",name:"dtype",type:"dtype"}]},{tfOpName:"RandomStandardNormal",category:"creation",inputs:[{start:0,name:"shape",type:"number[]"}],attrs:[{tfName:"seed",name:"seed",type:"number",defaultValue:0},{tfName:"seed2",name:"seed2",type:"number",defaultValue:0,notSupported:!0},{tfName:"dtype",name:"dtype",type:"dtype"},{tfName:"T",name:"T",type:"number",notSupported:!0}]},{tfOpName:"RandomUniform",category:"creation",inputs:[{start:0,name:"shape",type:"number[]"}],attrs:[{tfName:"minval",name:"minval",type:"number",defaultValue:0},{tfName:"maxval",name:"maxval",type:"number",defaultValue:1},{tfName:"dtype",name:"dtype",type:"dtype"},{tfName:"seed",name:"seed",type:"number",defaultValue:0},{tfName:"seed2",name:"seed2",type:"number",defaultValue:0,notSupported:!0},{tfName:"T",name:"T",type:"number",notSupported:!0}]},{tfOpName:"Range",category:"creation",inputs:[{start:0,name:"start",type:"number"},{start:1,name:"stop",type:"number"},{start:2,name:"step",type:"number",defaultValue:0}],attrs:[{tfName:"Tidx",name:"dtype",type:"dtype"}]},{tfOpName:"TruncatedNormal",category:"creation",inputs:[{start:0,name:"shape",type:"number[]"}],attrs:[{tfName:"means",name:"mean",type:"number",defaultValue:0},{tfName:"stddev",name:"stdDev",type:"number",defaultValue:1},{tfName:"seed",name:"seed",type:"number"},{tfName:"seed2",name:"seed2",type:"number",defaultValue:0,notSupported:!0},{tfName:"dtype",name:"dtype",type:"dtype"},{tfName:"T",name:"T",type:"number",notSupported:!0}]},{tfOpName:"Zeros",category:"creation",inputs:[{start:0,name:"shape",type:"number[]"}],attrs:[{tfName:"T",name:"dtype",type:"dtype"}]},{tfOpName:"ZerosLike",category:"creation",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype"}]},{tfOpName:"Multinomial",category:"creation",inputs:[{start:0,name:"logits",type:"tensor"},{start:1,name:"numSamples",type:"number"}],attrs:[{tfName:"seed",name:"seed",type:"number"},{tfName:"seed2",name:"seed2",type:"number"},{tfName:"T",name:"dtype",type:"dtype"},{tfName:"output_dtype",name:"output_dtype",type:"dtype"}]}],B8={};We(B8,{json:()=>vj});var vj=[{tfOpName:"NonMaxSuppressionV2",category:"dynamic",inputs:[{start:0,name:"boxes",type:"tensor"},{start:1,name:"scores",type:"tensor"},{start:2,name:"maxOutputSize",type:"number"},{start:3,name:"iouThreshold",type:"number"}]},{tfOpName:"NonMaxSuppressionV3",category:"dynamic",inputs:[{start:0,name:"boxes",type:"tensor"},{start:1,name:"scores",type:"tensor"},{start:2,name:"maxOutputSize",type:"number"},{start:3,name:"iouThreshold",type:"number"},{start:4,name:"scoreThreshold",type:"number"}]},{tfOpName:"NonMaxSuppressionV4",category:"dynamic",inputs:[{start:0,name:"boxes",type:"tensor"},{start:1,name:"scores",type:"tensor"},{start:2,name:"maxOutputSize",type:"number"},{start:3,name:"iouThreshold",type:"number"},{start:4,name:"scoreThreshold",type:"number"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"T_threshold",name:"threshold",type:"dtype",notSupported:!0},{tfName:"pad_to_max_output_size",name:"padToMaxOutputSize",type:"bool"}]},{tfOpName:"NonMaxSuppressionV5",category:"dynamic",inputs:[{start:0,name:"boxes",type:"tensor"},{start:1,name:"scores",type:"tensor"},{start:2,name:"maxOutputSize",type:"number"},{start:3,name:"iouThreshold",type:"number"},{start:4,name:"scoreThreshold",type:"number"},{start:5,name:"softNmsSigma",type:"number"}]},{tfOpName:"Where",category:"dynamic",inputs:[{start:0,name:"condition",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"ListDiff",category:"dynamic",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"y",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]}],W8={};We(W8,{json:()=>wj});var wj=[{tfOpName:"LowerBound",category:"evaluation",inputs:[{start:0,name:"sortedSequence",type:"tensor"},{start:1,name:"values",type:"tensor"}]},{tfOpName:"TopKV2",category:"evaluation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"k",type:"number"}],attrs:[{tfName:"sorted",name:"sorted",type:"bool"}]},{tfOpName:"UpperBound",category:"evaluation",inputs:[{start:0,name:"sortedSequence",type:"tensor"},{start:1,name:"values",type:"tensor"}]},{tfOpName:"Unique",category:"evaluation",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"UniqueV2",category:"evaluation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number"}]}],V8={};We(V8,{json:()=>kj});var kj=[{tfOpName:"PlaceholderWithDefault",category:"graph",inputs:[{start:0,name:"default",type:"tensor"}],attrs:[{tfName:"shape",name:"shape",type:"shape"},{tfName:"dtype",name:"dtype",type:"dtype"}]},{tfOpName:"Placeholder",category:"graph",attrs:[{tfName:"shape",name:"shape",type:"shape"},{tfName:"dtype",name:"dtype",type:"dtype"}]},{tfOpName:"Const",category:"graph"},{tfOpName:"Identity",category:"graph",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"IdentityN",category:"graph",inputs:[{start:0,end:0,name:"x",type:"tensors"}]},{tfOpName:"Snapshot",category:"graph",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"Rank",category:"graph",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"Size",category:"graph",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"Shape",category:"graph",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"ShapeN",category:"graph",inputs:[{start:0,end:0,name:"x",type:"tensors"}]},{tfOpName:"Print",category:"graph",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"data",type:"tensors"}],attrs:[{tfName:"message",name:"message",type:"string"},{tfName:"first_n",name:"firstN",type:"number",notSupported:!0},{tfName:"summarize",name:"summarize",type:"number",defaultValue:3}]},{tfOpName:"NoOp",category:"graph",inputs:[]},{tfOpName:"StopGradient",category:"graph",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"FakeQuantWithMinMaxVars",category:"graph",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"min",name:"min",type:"number"},{tfName:"max",name:"max",type:"number"}]}],U8={};We(U8,{json:()=>Sj});var Sj=[{tfOpName:"HashTable",category:"hash_table",inputs:[],attrs:[{tfName:"shared_name",name:"sharedName",type:"string"},{tfName:"use_node_name_sharing",name:"useNodeNameSharing",type:"bool"},{tfName:"key_dtype",name:"keyDType",type:"dtype"},{tfName:"value_dtype",name:"valueDType",type:"dtype"}]},{tfOpName:"HashTableV2",category:"hash_table",inputs:[],attrs:[{tfName:"shared_name",name:"sharedName",type:"string"},{tfName:"use_node_name_sharing",name:"useNodeNameSharing",type:"bool"},{tfName:"key_dtype",name:"keyDType",type:"dtype"},{tfName:"value_dtype",name:"valueDType",type:"dtype"}]},{tfOpName:"LookupTableImport",category:"hash_table",inputs:[{start:0,name:"tableHandle",type:"tensor"},{start:1,name:"keys",type:"tensor"},{start:2,name:"values",type:"tensor"}],attrs:[{tfName:"Tin",name:"tIn",type:"dtype",notSupported:!0},{tfName:"Tout",name:"tOut",type:"dtype",notSupported:!0}]},{tfOpName:"LookupTableImportV2",category:"hash_table",inputs:[{start:0,name:"tableHandle",type:"tensor"},{start:1,name:"keys",type:"tensor"},{start:2,name:"values",type:"tensor"}],attrs:[{tfName:"Tin",name:"tIn",type:"dtype",notSupported:!0},{tfName:"Tout",name:"tOut",type:"dtype",notSupported:!0}]},{tfOpName:"LookupTableFind",category:"hash_table",inputs:[{start:0,name:"tableHandle",type:"tensor"},{start:1,name:"keys",type:"tensor"},{start:2,name:"defaultValue",type:"tensor"}],attrs:[{tfName:"Tin",name:"tIn",type:"dtype",notSupported:!0},{tfName:"Tout",name:"tOut",type:"dtype",notSupported:!0}]},{tfOpName:"LookupTableFindV2",category:"hash_table",inputs:[{start:0,name:"tableHandle",type:"tensor"},{start:1,name:"keys",type:"tensor"},{start:2,name:"defaultValue",type:"tensor"}],attrs:[{tfName:"Tin",name:"tIn",type:"dtype",notSupported:!0},{tfName:"Tout",name:"tOut",type:"dtype",notSupported:!0}]},{tfOpName:"LookupTableSize",category:"hash_table",inputs:[{start:0,name:"tableHandle",type:"tensor"}]},{tfOpName:"LookupTableSizeV2",category:"hash_table",inputs:[{start:0,name:"tableHandle",type:"tensor"}]}],G8={};We(G8,{json:()=>Ij});var Ij=[{tfOpName:"ResizeBilinear",category:"image",inputs:[{start:0,name:"images",type:"tensor"},{start:1,name:"size",type:"number[]"}],attrs:[{tfName:"align_corners",name:"alignCorners",type:"bool"},{tfName:"half_pixel_centers",name:"halfPixelCenters",type:"bool"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"ResizeNearestNeighbor",category:"image",inputs:[{start:0,name:"images",type:"tensor"},{start:1,name:"size",type:"number[]"}],attrs:[{tfName:"align_corners",name:"alignCorners",type:"bool"},{tfName:"half_pixel_centers",name:"halfPixelCenters",type:"bool"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"CropAndResize",category:"image",inputs:[{start:0,name:"image",type:"tensor"},{start:1,name:"boxes",type:"tensor"},{start:2,name:"boxInd",type:"tensor"},{start:3,name:"cropSize",type:"number[]"}],attrs:[{tfName:"method",name:"method",type:"string"},{tfName:"extrapolation_value",name:"extrapolationValue",type:"number"}]},{tfOpName:"ImageProjectiveTransformV3",category:"image",inputs:[{start:0,name:"images",type:"tensor"},{start:1,name:"transforms",type:"tensor"},{start:2,name:"outputShape",type:"number[]"},{start:3,name:"fillValue",type:"number"}],attrs:[{tfName:"interpolation",name:"interpolation",type:"string"},{tfName:"fill_mode",name:"fillMode",type:"string"}]}],H8={};We(H8,{json:()=>Cj});var Cj=[{tfOpName:"Equal",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"NotEqual",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Greater",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"GreaterEqual",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Less",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"LessEqual",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"LogicalAnd",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"LogicalNot",category:"logical",inputs:[{start:0,name:"a",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"LogicalOr",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Select",category:"logical",inputs:[{start:0,name:"condition",type:"tensor"},{start:1,name:"a",type:"tensor"},{start:2,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"SelectV2",category:"logical",inputs:[{start:0,name:"condition",type:"tensor"},{start:1,name:"a",type:"tensor"},{start:2,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]}],j8={};We(j8,{json:()=>Tj});var Tj=[{tfOpName:"_FusedMatMul",category:"matrices",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"},{start:2,end:0,name:"args",type:"tensors"}],attrs:[{tfName:"num_args",name:"numArgs",type:"number"},{tfName:"fused_ops",name:"fusedOps",type:"string[]",defaultValue:[]},{tfName:"epsilon",name:"epsilon",type:"number",defaultValue:1e-4},{tfName:"transpose_a",name:"transposeA",type:"bool",defaultValue:!1},{tfName:"transpose_b",name:"transposeB",type:"bool",defaultValue:!1},{tfName:"leakyrelu_alpha",name:"leakyreluAlpha",type:"number",defaultValue:.2},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"MatMul",category:"matrices",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"transpose_a",name:"transposeA",type:"bool",defaultValue:!1},{tfName:"transpose_b",name:"transposeB",type:"bool",defaultValue:!1},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"BatchMatMul",category:"matrices",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"adj_x",name:"transposeA",type:"bool",defaultValue:!1},{tfName:"adj_y",name:"transposeB",type:"bool",defaultValue:!1},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"BatchMatMulV2",category:"matrices",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"adj_x",name:"transposeA",type:"bool",defaultValue:!1},{tfName:"adj_y",name:"transposeB",type:"bool",defaultValue:!1},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Transpose",category:"matrices",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"perm",type:"number[]"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Einsum",category:"matrices",inputs:[{start:0,end:0,name:"tensors",type:"tensors"}],attrs:[{tfName:"equation",name:"equation",type:"string"},{tfName:"N",name:"n",type:"number",defaultValue:2},{tfName:"T",name:"dtype",type:"dtype"}]}],q8={};We(q8,{json:()=>Nj});var Nj=[{tfOpName:"EuclideanNorm",category:"normalization",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool",defaultValue:!1}]},{tfOpName:"FusedBatchNorm",category:"normalization",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"scale",type:"tensor"},{start:2,name:"offset",type:"tensor"},{start:3,name:"mean",type:"tensor"},{start:4,name:"variance",type:"tensor"}],attrs:[{tfName:"epsilon",name:"epsilon",type:"number",defaultValue:.001},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0}]},{tfOpName:"FusedBatchNormV2",category:"normalization",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"scale",type:"tensor"},{start:2,name:"offset",type:"tensor"},{start:3,name:"mean",type:"tensor"},{start:4,name:"variance",type:"tensor"}],attrs:[{tfName:"epsilon",name:"epsilon",type:"number",defaultValue:.001},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0}]},{tfOpName:"FusedBatchNormV3",category:"normalization",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"scale",type:"tensor"},{start:2,name:"offset",type:"tensor"},{start:3,name:"mean",type:"tensor"},{start:4,name:"variance",type:"tensor"}],attrs:[{tfName:"epsilon",name:"epsilon",type:"number",defaultValue:.001},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0}]},{tfOpName:"LRN",category:"normalization",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"depth_radius",name:"radius",type:"number",defaultValue:5},{tfName:"bias",name:"bias",type:"number",defaultValue:1},{tfName:"alpha",name:"alpha",type:"number",defaultValue:1},{tfName:"beta",name:"beta",type:"number",defaultValue:.5}]},{tfOpName:"Softmax",category:"normalization",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"LogSoftmax",category:"normalization",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"SparseToDense",category:"normalization",inputs:[{start:0,name:"sparseIndices",type:"tensor"},{start:1,name:"outputShape",type:"number[]"},{start:2,name:"sparseValues",type:"tensor"},{start:3,name:"defaultValue",type:"tensor"}],attrs:[{tfName:"validate_indices",name:"validateIndices",type:"bool",defaultValue:!0,notSupported:!0}]}],X8={};We(X8,{json:()=>Ej});var Ej=[{tfOpName:"Bincount",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"size",type:"number"},{start:2,name:"weights",type:"tensor"}]},{tfOpName:"DenseBincount",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"size",type:"number"},{start:2,name:"weights",type:"tensor"}],attrs:[{tfName:"binary_output",name:"binaryOutput",type:"bool"}]},{tfOpName:"Max",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool"}]},{tfOpName:"Mean",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool"}]},{tfOpName:"Min",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool"}]},{tfOpName:"Sum",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool"}]},{tfOpName:"All",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool"}]},{tfOpName:"Any",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool"}]},{tfOpName:"ArgMax",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number"}]},{tfOpName:"ArgMin",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number"}]},{tfOpName:"Prod",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool"}]},{tfOpName:"Cumprod",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number"}],attrs:[{tfName:"exclusive",name:"exclusive",type:"bool"},{tfName:"reverse",name:"reverse",type:"bool"}]},{tfOpName:"Cumsum",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number"}],attrs:[{tfName:"exclusive",name:"exclusive",type:"bool"},{tfName:"reverse",name:"reverse",type:"bool"}]}],K8={};We(K8,{json:()=>Rj});var Rj=[{tfOpName:"ConcatV2",category:"slice_join",inputs:[{start:0,end:-1,name:"tensors",type:"tensors"},{start:-1,name:"axis",type:"number"}],attrs:[{tfName:"N",name:"n",type:"number",defaultValue:2}]},{tfOpName:"Concat",category:"slice_join",inputs:[{start:1,end:0,name:"tensors",type:"tensors"},{start:0,name:"axis",type:"number"}],attrs:[{tfName:"N",name:"n",type:"number",defaultValue:2}]},{tfOpName:"GatherV2",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"indices",type:"tensor"},{start:2,name:"axis",type:"number",defaultValue:0}],attrs:[{tfName:"batch_dims",name:"batchDims",type:"number",defaultValue:0}]},{tfOpName:"Gather",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"indices",type:"tensor"}],attrs:[{tfName:"validate_indices",name:"validateIndices",type:"bool",notSupported:!0}]},{tfOpName:"Reverse",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"dims",type:"bool[]"}]},{tfOpName:"ReverseV2",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}]},{tfOpName:"Slice",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"begin",type:"number[]"},{start:2,name:"size",type:"number[]"}]},{tfOpName:"StridedSlice",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"begin",type:"number[]"},{start:2,name:"end",type:"number[]"},{start:3,name:"strides",type:"number[]"}],attrs:[{tfName:"begin_mask",name:"beginMask",type:"number",defaultValue:0},{tfName:"end_mask",name:"endMask",type:"number",defaultValue:0},{tfName:"new_axis_mask",name:"newAxisMask",type:"number",defaultValue:0},{tfName:"ellipsis_mask",name:"ellipsisMask",type:"number",defaultValue:0},{tfName:"shrink_axis_mask",name:"shrinkAxisMask",type:"number",defaultValue:0}]},{tfOpName:"Pack",category:"slice_join",inputs:[{start:0,end:0,name:"tensors",type:"tensors"}],attrs:[{tfName:"axis",name:"axis",type:"number",defaultValue:0}]},{tfOpName:"Unpack",category:"slice_join",inputs:[{start:0,name:"tensor",type:"tensor"}],attrs:[{tfName:"axis",name:"axis",type:"number",defaultValue:0},{tfName:"num",name:"num",type:"number",defaultValue:0,notSupported:!0}]},{tfOpName:"Tile",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"reps",type:"number[]"}]},{tfOpName:"Split",category:"slice_join",inputs:[{start:0,name:"axis",type:"number",defaultValue:0},{start:1,name:"x",type:"tensor"}],attrs:[{tfName:"num_split",name:"numOrSizeSplits",type:"number",defaultValue:1}]},{tfOpName:"SplitV",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"numOrSizeSplits",type:"number[]"},{start:2,name:"axis",type:"number",defaultValue:0}]},{tfOpName:"ScatterNd",category:"slice_join",inputs:[{start:0,name:"indices",type:"tensor"},{start:1,name:"values",type:"tensor"},{start:2,name:"shape",type:"number[]"}]},{tfOpName:"GatherNd",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"indices",type:"tensor"}]},{tfOpName:"SparseToDense",category:"slice_join",inputs:[{start:0,name:"sparseIndices",type:"tensor"},{start:1,name:"outputShape",type:"number[]"},{start:2,name:"sparseValues",type:"tensor"},{start:3,name:"defaultValue",type:"tensor"}],attrs:[{tfName:"validate_indices",name:"validateIndices",type:"bool",defaultValue:!1,notSupported:!0}]}],Z8={};We(Z8,{json:()=>_j});var _j=[{tfOpName:"SparseFillEmptyRows",category:"sparse",inputs:[{start:0,name:"indices",type:"tensor"},{start:1,name:"values",type:"tensor"},{start:2,name:"denseShape",type:"tensor"},{start:3,name:"defaultValue",type:"tensor"}]},{tfOpName:"SparseReshape",category:"sparse",inputs:[{start:0,name:"inputIndices",type:"tensor"},{start:1,name:"inputShape",type:"tensor"},{start:2,name:"newShape",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"SparseSegmentMean",category:"sparse",inputs:[{start:0,name:"data",type:"tensor"},{start:1,name:"indices",type:"tensor"},{start:2,name:"segmentIds",type:"tensor"}]},{tfOpName:"SparseSegmentSum",category:"sparse",inputs:[{start:0,name:"data",type:"tensor"},{start:1,name:"indices",type:"tensor"},{start:2,name:"segmentIds",type:"tensor"}]}],Y8={};We(Y8,{json:()=>Dj});var Dj=[{tfOpName:"FFT",category:"spectral",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"IFFT",category:"spectral",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"RFFT",category:"spectral",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"fft_length",type:"number",notSupported:!0}]},{tfOpName:"IRFFT",category:"spectral",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"fft_length",type:"number",notSupported:!0}]}],J8={};We(J8,{json:()=>$j});var $j=[{tfOpName:"StringNGrams",category:"string",inputs:[{start:0,name:"data",type:"tensor"},{start:1,name:"dataSplits",type:"tensor"}],attrs:[{tfName:"separator",name:"separator",type:"string"},{tfName:"ngram_widths",name:"nGramWidths",type:"number[]"},{tfName:"left_pad",name:"leftPad",type:"string"},{tfName:"right_pad",name:"rightPad",type:"string"},{tfName:"pad_width",name:"padWidth",type:"number"},{tfName:"preserve_short_sequences",name:"preserveShortSequences",type:"bool"}],outputs:["ngrams","ngrams_splits"]},{tfOpName:"StringSplit",category:"string",inputs:[{start:0,name:"input",type:"tensor"},{start:1,name:"delimiter",type:"tensor"}],attrs:[{tfName:"skip_empty",name:"skipEmpty",type:"bool"}],outputs:["indices","values","shape"]},{tfOpName:"StringToHashBucketFast",category:"string",inputs:[{start:0,name:"input",type:"tensor"}],attrs:[{tfName:"num_buckets",name:"numBuckets",type:"number"}]}],Q8={};We(Q8,{json:()=>Pj});var Pj=[{tfOpName:"Cast",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"SrcT",name:"sdtype",type:"dtype",notSupported:!0},{tfName:"DstT",name:"dtype",type:"dtype"}]},{tfOpName:"ExpandDims",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number"}]},{tfOpName:"MirrorPad",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"padding",type:"number[]"}],attrs:[{tfName:"mode",name:"mode",type:"string"}]},{tfOpName:"Pad",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"padding",type:"number[]"}],attrs:[{tfName:"constant_value",name:"constantValue",type:"number",defaultValue:0}]},{tfOpName:"PadV2",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"padding",type:"number[]"},{start:2,name:"constantValue",type:"number",defaultValue:0}]},{tfOpName:"Reshape",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"shape",type:"number[]"}]},{tfOpName:"Squeeze",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"axis",tfDeprecatedName:"squeeze_dims",name:"axis",type:"number[]"}]},{tfOpName:"SpaceToBatchND",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"blockShape",type:"number[]"},{start:2,name:"paddings",type:"number[]"}]},{tfOpName:"BatchToSpaceND",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"blockShape",type:"number[]"},{start:2,name:"crops",type:"number[]"}]},{tfOpName:"DepthToSpace",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"block_size",name:"blockSize",type:"number"},{tfName:"data_format",name:"dataFormat",type:"string"}]},{tfOpName:"BroadcastTo",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"shape",type:"number[]"}],attrs:[]},{tfOpName:"BroadcastArgs",category:"transformation",inputs:[{start:0,name:"s0",type:"tensor"},{start:1,name:"s1",type:"tensor"}],attrs:[]}],Qv=class{static get Instance(){return this._instance||(this._instance=new this)}constructor(){let e=[F8,O8,M8,z8,L8,B8,W8,V8,U8,G8,H8,j8,q8,X8,K8,Z8,Y8,J8,Q8],t=[].concat(...e.map(n=>n.json));this.opMappers=t.reduce((n,s)=>(n[s.tfOpName]=s,n),{})}transformGraph(e,t={}){let n=e.node,s=[],r=[],a=[],o=n.reduce((f,m)=>(f[m.name]=this.mapNode(m),m.op.startsWith("Placeholder")?s.push(f[m.name]):m.op==="Const"?r.push(f[m.name]):(m.input==null||m.input.length===0)&&a.push(f[m.name]),f),{}),i=[],l=[],u={},c={};t!=null&&(u=this.mapSignatureEntries(t.inputs),c=this.mapSignatureEntries(t.outputs));let p=Object.keys(o);p.forEach(f=>{let m=o[f];m.inputNames.forEach((g,y)=>{let[x,,A]=Yr(g),b=o[x];if(b.outputs!=null){let w=b.outputs.indexOf(A);if(w!==-1){let k=`${x}:${w}`;m.inputNames[y]=k}}m.inputs.push(b),b.children.push(m)})}),Object.keys(c).length===0?p.forEach(f=>{let m=o[f];m.children.length===0&&l.push(m)}):Object.keys(c).forEach(f=>{let[m]=Yr(f),g=o[m];g!=null&&(g.signatureKey=c[f],l.push(g))}),Object.keys(u).length>0?Object.keys(u).forEach(f=>{let[m]=Yr(f),g=o[m];g&&(g.signatureKey=u[f],i.push(g))}):i=s;let d={};e.library!=null&&e.library.function!=null&&(d=e.library.function.reduce((f,m)=>(f[m.signature.name]=this.mapFunction(m),f),{}));let h={nodes:o,inputs:i,outputs:l,weights:r,placeholders:s,signature:t,functions:d};return a.length>0&&(h.initNodes=a),h}mapSignatureEntries(e){return Object.keys(e||{}).reduce((t,n)=>(t[e[n].name]=n,t),{})}mapNode(e){let t=P8(e.op)||this.opMappers[e.op]||{};e.attr==null&&(e.attr={});let n={name:e.name,op:e.op,category:t.category,inputNames:(e.input||[]).map(s=>s.startsWith("^")?s.slice(1):s),inputs:[],children:[],inputParams:{},attrParams:{},rawAttrs:e.attr,outputs:t.outputs};return t.inputs!=null&&(n.inputParams=t.inputs.reduce((s,r)=>(s[r.name]={type:r.type,inputIndexStart:r.start,inputIndexEnd:r.end},s),{})),t.attrs!=null&&(n.attrParams=t.attrs.reduce((s,r)=>{let a=r.type,o;switch(r.type){case"string":o=z3(e.attr,r.tfName,r.defaultValue),o===void 0&&!!r.tfDeprecatedName&&(o=z3(e.attr,r.tfDeprecatedName,r.defaultValue));break;case"string[]":o=H3(e.attr,r.tfName,r.defaultValue),o===void 0&&!!r.tfDeprecatedName&&(o=H3(e.attr,r.tfDeprecatedName,r.defaultValue));break;case"number":o=B3(e.attr,r.tfName,r.defaultValue||0),o===void 0&&!!r.tfDeprecatedName&&(o=B3(e.attr,r.tfDeprecatedName,r.defaultValue));break;case"number[]":o=G3(e.attr,r.tfName,r.defaultValue),o===void 0&&!!r.tfDeprecatedName&&(o=G3(e.attr,r.tfDeprecatedName,r.defaultValue));break;case"bool":o=L3(e.attr,r.tfName,r.defaultValue),o===void 0&&!!r.tfDeprecatedName&&(o=L3(e.attr,r.tfDeprecatedName,r.defaultValue));break;case"bool[]":o=q3(e.attr,r.tfName,r.defaultValue),o===void 0&&!!r.tfDeprecatedName&&(o=q3(e.attr,r.tfDeprecatedName,r.defaultValue));break;case"shape":o=U3(e.attr,r.tfName,r.defaultValue),o===void 0&&!!r.tfDeprecatedName&&(o=U3(e.attr,r.tfDeprecatedName,r.defaultValue));break;case"shape[]":o=j3(e.attr,r.tfName,r.defaultValue),o===void 0&&!!r.tfDeprecatedName&&(o=j3(e.attr,r.tfDeprecatedName,r.defaultValue));break;case"dtype":o=W3(e.attr,r.tfName,r.defaultValue),o===void 0&&!!r.tfDeprecatedName&&(o=W3(e.attr,r.tfDeprecatedName,r.defaultValue));break;case"dtype[]":o=V3(e.attr,r.tfName,r.defaultValue),o===void 0&&!!r.tfDeprecatedName&&(o=V3(e.attr,r.tfDeprecatedName,r.defaultValue));break;case"func":o=e7(e.attr,r.tfName,r.defaultValue),o===void 0&&!!r.tfDeprecatedName&&(o=e7(e.attr,r.tfDeprecatedName,r.defaultValue));break;case"tensor":case"tensors":break;default:throw new Error(`Unsupported param type: ${r.type} for op: ${e.op}`)}return s[r.name]={value:o,type:a},s},{})),n}mapFunction(e){let t=e.nodeDef,n=[],s=[],r={};t!=null&&(r=t.reduce((c,p)=>(c[p.name]=this.mapNode(p),p.op==="Const"&&s.push(c[p.name]),c),{}));let a=[],o=[];e.signature.inputArg.forEach(c=>{let[p]=Yr(c.name),d={name:p,op:"Placeholder",inputs:[],inputNames:[],category:"graph",inputParams:{},attrParams:{dtype:{value:Ax(c.type),type:"dtype"}},children:[]};d.signatureKey=c.name,a.push(d),r[p]=d}),Object.keys(r).forEach(c=>{let p=r[c];p.inputNames.forEach((d,h)=>{let[f,,m]=Yr(d),g=r[f];if(g.outputs!=null){let y=g.outputs.indexOf(m);if(y!==-1){let x=`${f}:${y}`;p.inputNames[h]=x}}p.inputs.push(g),g.children.push(p)})});let l=e.ret;e.signature.outputArg.forEach(c=>{let[p,d]=Yr(l[c.name]),h=r[p];h!=null&&(h.defaultOutput=d,o.push(h))});let u=this.mapArgsToSignature(e);return{nodes:r,inputs:a,outputs:o,weights:s,placeholders:n,signature:u}}mapArgsToSignature(e){return{methodName:e.signature.name,inputs:e.signature.inputArg.reduce((t,n)=>(t[n.name]=this.mapArgToTensorInfo(n),t),{}),outputs:e.signature.outputArg.reduce((t,n)=>(t[n.name]=this.mapArgToTensorInfo(n,e.ret),t),{})}}mapArgToTensorInfo(e,t){let n=e.name;return t!=null&&(n=t[n]),{name:n,dtype:e.type}}};function Fj(e){let t=U().global;if(typeof t.atob!="undefined")return t.atob(e);if(typeof Buffer!="undefined")return new Buffer(e,"base64").toString();throw new Error("Unable to decode base64 in this environment. Missing built-in atob() or Buffer()")}function eS(e,t){let n=Array.isArray(e)?String.fromCharCode.apply(null,e):Fj(e);return t?n:n.toLowerCase()}function z3(e,t,n,s=!1){let r=e[t];return r!=null?eS(r.s,s):n}function L3(e,t,n){let s=e[t];return s?s.b:n}function B3(e,t,n){let s=e[t]||{},r=s.i!=null?s.i:s.f!=null?s.f:n;return typeof r=="number"?r:parseInt(r,10)}function Ax(e){switch(typeof e=="string"&&(e=pr[e]),e){case pr.DT_FLOAT:case pr.DT_HALF:return"float32";case pr.DT_INT32:case pr.DT_INT64:case pr.DT_INT8:case pr.DT_UINT8:return"int32";case pr.DT_BOOL:return"bool";case pr.DT_DOUBLE:return"float32";case pr.DT_STRING:return"string";default:return null}}function e7(e,t,n){let s=e[t];return s&&s.func?s.func.name:n}function W3(e,t,n){let s=e[t];return s&&s.type?Ax(s.type):n}function V3(e,t,n){let s=e[t];return s&&s.list&&s.list.type?s.list.type.map(r=>Ax(r)):n}function tS(e){if(!e.unknownRank)return e.dim!=null?e.dim.map(t=>typeof t.size=="number"?t.size:parseInt(t.size,10)):[]}function U3(e,t,n){let s=e[t];return s&&s.shape?tS(s.shape):n}function G3(e,t,n){let s=e[t];return s?((s.list.f&&s.list.f.length?s.list.f:s.list.i)||[]).map(r=>typeof r=="number"?r:parseInt(r,10)):n}function H3(e,t,n,s=!1){let r=e[t];return r&&r.list&&r.list.s?r.list.s.map(a=>eS(a,s)):n}function j3(e,t,n){let s=e[t];return s&&s.list&&s.list.shape?s.list.shape.map(r=>tS(r)):n}function q3(e,t,n){let s=e[t];return s&&s.list&&s.list.b?s.list.b:n}var Oj=class{constructor(e,t,n){this.node=e,this.tensorMap=t,this.context=n,this.inputs=[],this.attrs={},this.inputs=e.inputNames.map(s=>this.getInput(s)),e.rawAttrs!=null&&(this.attrs=Object.keys(e.rawAttrs).reduce((s,r)=>(s[r]=this.getAttr(r),s),{}))}getInput(e){return as(e,this.tensorMap,this.context)}getAttr(e,t){let n=this.node.rawAttrs[e];if(n.tensor!=null)return as(e,this.tensorMap,this.context);if(n.i!=null||n.f!=null)return B3(this.node.rawAttrs,e,t);if(n.s!=null)return z3(this.node.rawAttrs,e,t);if(n.b!=null)return L3(this.node.rawAttrs,e,t);if(n.shape!=null)return U3(this.node.rawAttrs,e,t);if(n.type!=null)return W3(this.node.rawAttrs,e,t);if(n.list!=null){if(n.list.i!=null||n.list.f!=null)return G3(this.node.rawAttrs,e,t);if(n.list.s!=null)return H3(this.node.rawAttrs,e,t);if(n.list.shape!=null)return j3(this.node.rawAttrs,e,t);if(n.list.b!=null)return q3(this.node.rawAttrs,e,t);if(n.list.type!=null)return V3(this.node.rawAttrs,e,t)}return t}},Bn={};We(Bn,{OP_SCOPE_SUFFIX:()=>Sy,abs:()=>rn,acos:()=>Vy,acosh:()=>Uy,add:()=>le,addN:()=>a0,all:()=>o0,any:()=>fp,argMax:()=>Ps,argMin:()=>Gy,asin:()=>Hy,asinh:()=>jy,atan:()=>qy,atan2:()=>Xy,atanh:()=>Ky,avgPool:()=>eh,avgPool3d:()=>Yy,basicLSTMCell:()=>c6,batchNorm:()=>Wc,batchNorm2d:()=>Jy,batchNorm3d:()=>Qy,batchNorm4d:()=>eA,batchToSpaceND:()=>th,bincount:()=>tA,booleanMaskAsync:()=>q6,broadcastArgs:()=>d6,broadcastTo:()=>Xi,buffer:()=>ze,cast:()=>me,ceil:()=>nA,clipByValue:()=>bs,clone:()=>Hn,complex:()=>wa,concat:()=>ut,concat1d:()=>sA,concat2d:()=>nu,concat3d:()=>rA,concat4d:()=>aA,conv1d:()=>i0,conv2d:()=>ka,conv2dTranspose:()=>l0,conv3d:()=>iA,conv3dTranspose:()=>lA,cos:()=>nh,cosh:()=>u0,cosineWindow:()=>_0,cumprod:()=>mp,cumsum:()=>c0,denseBincount:()=>h6,depthToSpace:()=>uA,depthwiseConv2d:()=>Vc,diag:()=>f6,dilation2d:()=>cA,div:()=>ge,divNoNan:()=>dA,dot:()=>pA,dropout:()=>zA,einsum:()=>m6,elu:()=>Uc,enclosingPowerOfTwo:()=>LA,equal:()=>Fs,erf:()=>hA,euclideanNorm:()=>gA,exp:()=>Os,expandDims:()=>Ft,expm1:()=>yA,eye:()=>d0,fft:()=>dh,fill:()=>zr,floor:()=>Hc,floorDiv:()=>Bc,fused:()=>rc,gather:()=>jc,gatherND:()=>Y6,greater:()=>ks,greaterEqual:()=>pi,ifft:()=>sc,imag:()=>Jp,image:()=>ke,inTopKAsync:()=>J6,irfft:()=>T0,isFinite:()=>AA,isInf:()=>xA,isNaN:()=>bA,leakyRelu:()=>sh,less:()=>p0,lessEqual:()=>hi,linalg:()=>VA,linspace:()=>b6,localResponseNormalization:()=>vA,log:()=>Ms,log1p:()=>rh,logSigmoid:()=>wA,logSoftmax:()=>f0,logSumExp:()=>m0,logicalAnd:()=>gr,logicalNot:()=>ah,logicalOr:()=>g0,logicalXor:()=>kA,losses:()=>ck,lowerBound:()=>w6,matMul:()=>et,max:()=>yn,maxPool:()=>oh,maxPool3d:()=>SA,maxPoolWithArgmax:()=>k6,maximum:()=>oa,mean:()=>Wt,meshgrid:()=>S6,min:()=>Sa,minimum:()=>qc,mirrorPad:()=>IA,mod:()=>ru,moments:()=>ih,movingAverage:()=>X6,mul:()=>M,multiRNNCell:()=>I6,multinomial:()=>C6,neg:()=>Dt,norm:()=>Gc,notEqual:()=>sl,oneHot:()=>ec,ones:()=>Ds,onesLike:()=>zs,op:()=>B,outerProduct:()=>T6,pad:()=>tr,pad1d:()=>N6,pad2d:()=>E6,pad3d:()=>R6,pad4d:()=>_6,pool:()=>CA,pow:()=>Ia,prelu:()=>uh,print:()=>Ny,prod:()=>TA,raggedGather:()=>D6,raggedTensorToTensor:()=>$6,rand:()=>P6,randomGamma:()=>F6,randomNormal:()=>A0,randomStandardNormal:()=>O6,randomUniform:()=>Xc,range:()=>nc,real:()=>tc,reciprocal:()=>RA,relu:()=>Lr,relu6:()=>x0,reshape:()=>W,reverse:()=>Js,reverse1d:()=>M6,reverse2d:()=>z6,reverse3d:()=>L6,reverse4d:()=>B6,rfft:()=>ph,round:()=>b0,rsqrt:()=>v0,scalar:()=>Ce,scatterND:()=>K6,searchSorted:()=>y0,selu:()=>w0,separableConv2d:()=>k0,setdiff1dAsync:()=>W6,sigmoid:()=>Mn,sign:()=>_A,signal:()=>uk,sin:()=>S0,sinh:()=>I0,slice:()=>Oe,slice1d:()=>ch,slice2d:()=>C0,slice3d:()=>fi,slice4d:()=>oo,softmax:()=>au,softplus:()=>su,spaceToBatchND:()=>lh,sparse:()=>dk,sparseToDense:()=>Z6,spectral:()=>lk,split:()=>Ht,sqrt:()=>Ln,square:()=>bt,squaredDifference:()=>N0,squeeze:()=>Ge,stack:()=>ln,step:()=>ou,stridedSlice:()=>DA,string:()=>pk,sub:()=>ye,sum:()=>ve,tan:()=>$A,tanh:()=>tl,tensor:()=>Ue,tensor1d:()=>Ot,tensor2d:()=>mr,tensor3d:()=>Py,tensor4d:()=>V6,tensor5d:()=>U6,tensor6d:()=>G6,tile:()=>As,topk:()=>PA,transpose:()=>tt,truncatedNormal:()=>E0,unique:()=>FA,unsortedSegmentSum:()=>R0,unstack:()=>bn,upperBound:()=>H6,variable:()=>OA,where:()=>qn,whereAsync:()=>MA,zeros:()=>Vt,zerosLike:()=>ct});var Mj=(e,t,n,s=Bn)=>{switch(e.op){case"BiasAdd":case"AddV2":case"Add":return[s.add(I("a",e,t,n),I("b",e,t,n))];case"AddN":return[s.addN(I("tensors",e,t,n))];case"FloorMod":case"Mod":return[s.mod(I("a",e,t,n),I("b",e,t,n))];case"Mul":return[s.mul(I("a",e,t,n),I("b",e,t,n))];case"RealDiv":case"Div":return[s.div(I("a",e,t,n),I("b",e,t,n))];case"DivNoNan":return[s.divNoNan(I("a",e,t,n),I("b",e,t,n))];case"FloorDiv":return[s.floorDiv(I("a",e,t,n),I("b",e,t,n))];case"Sub":return[s.sub(I("a",e,t,n),I("b",e,t,n))];case"Minimum":return[s.minimum(I("a",e,t,n),I("b",e,t,n))];case"Maximum":return[s.maximum(I("a",e,t,n),I("b",e,t,n))];case"Pow":return[s.pow(I("a",e,t,n),I("b",e,t,n))];case"SquaredDifference":return[s.squaredDifference(I("a",e,t,n),I("b",e,t,n))];default:throw TypeError(`Node type ${e.op} is not implemented`)}},zj=(e,t,n,s=Bn)=>{switch(e.op){case"Abs":case"ComplexAbs":return[s.abs(I("x",e,t,n))];case"Acos":return[s.acos(I("x",e,t,n))];case"Acosh":return[s.acosh(I("x",e,t,n))];case"Asin":return[s.asin(I("x",e,t,n))];case"Asinh":return[s.asinh(I("x",e,t,n))];case"Atan":return[s.atan(I("x",e,t,n))];case"Atan2":return[s.atan2(I("x",e,t,n),I("y",e,t,n))];case"Atanh":return[s.atanh(I("x",e,t,n))];case"Ceil":return[s.ceil(I("x",e,t,n))];case"Complex":return[s.complex(I("real",e,t,n),I("imag",e,t,n))];case"Cos":return[s.cos(I("x",e,t,n))];case"Cosh":return[s.cosh(I("x",e,t,n))];case"Elu":return[s.elu(I("x",e,t,n))];case"Erf":return[s.erf(I("x",e,t,n))];case"Exp":return[s.exp(I("x",e,t,n))];case"Expm1":return[s.expm1(I("x",e,t,n))];case"Floor":return[s.floor(I("x",e,t,n))];case"Log":return[s.log(I("x",e,t,n))];case"Log1p":return[s.log1p(I("x",e,t,n))];case"Imag":return[s.imag(I("x",e,t,n))];case"Neg":return[s.neg(I("x",e,t,n))];case"Reciprocal":return[s.reciprocal(I("x",e,t,n))];case"Real":return[s.real(I("x",e,t,n))];case"Relu":return[s.relu(I("x",e,t,n))];case"Round":return[s.round(I("x",e,t,n))];case"Selu":return[s.selu(I("x",e,t,n))];case"Sigmoid":return[s.sigmoid(I("x",e,t,n))];case"Sin":return[s.sin(I("x",e,t,n))];case"Sign":return[s.sign(I("x",e,t,n))];case"Sinh":return[s.sinh(I("x",e,t,n))];case"Softplus":return[s.softplus(I("x",e,t,n))];case"Sqrt":return[s.sqrt(I("x",e,t,n))];case"Square":return[s.square(I("x",e,t,n))];case"Tanh":return[s.tanh(I("x",e,t,n))];case"Tan":return[s.tan(I("x",e,t,n))];case"ClipByValue":return[s.clipByValue(I("x",e,t,n),I("clipValueMin",e,t,n),I("clipValueMax",e,t,n))];case"Relu6":return[s.relu6(I("x",e,t,n))];case"Rsqrt":return[s.rsqrt(as(e.inputNames[0],t,n))];case"Prod":return[s.prod(I("x",e,t,n),I("axes",e,t,n))];case"LeakyRelu":return[s.leakyRelu(I("x",e,t,n),I("alpha",e,t,n))];case"Prelu":return[s.prelu(I("x",e,t,n),I("alpha",e,t,n))];case"IsNan":return[s.isNaN(as(e.inputNames[0],t,n))];default:throw TypeError(`Node type ${e.op} is not implemented`)}};function fr(e,t,n=""){if(!(typeof e=="number"||typeof t=="number")){v.assert(e.length===t.length,()=>n+` Shapes ${e} and ${t} must match`);for(let s=0;sn+` Shapes ${e} and ${t} must match`)}}}function t7(e){return!(typeof e=="number"||e.some(t=>t<0))}function Ud(e,t,n){let s=X3(e,n),r=!t7(s);if(r&&t.length===0)throw new Error(`Tried to calculate elements of an empty list with non-fully-defined elementShape: ${s}`);if(r&&t.forEach(a=>{s=X3(a.shape,s)}),!t7(s))throw new Error(`Non-fully-defined elementShape: ${s}`);return s}function X3(e,t){if(typeof e=="number")return t;if(typeof t=="number")return e;if(e.length!==t.length)throw new Error(`Incompatible ranks during merge: ${e} vs. ${t}`);let n=[];for(let s=0;s=0&&a>=0&&r!==a)throw new Error(`Incompatible shape during merge: ${e} vs. ${t}`);n[s]=r>=0?r:a}return n}var Lj=class{constructor(e,t,n,s,r,a,o){this.name=e,this.dtype=t,this.maxSize=n,this.elementShape=s,this.identicalElementShapes=r,this.dynamicSize=a,this.clearAfterRead=o,this.tensors=[],this.closed_=!1,this.idTensor=Ce(0),Cn(this.idTensor)}get id(){return this.idTensor.id}get closed(){return this.closed_}clearAndClose(e){this.tensors.forEach(t=>{(e==null||!e.has(t.tensor.id))&&t.tensor.dispose()}),this.tensors=[],this.closed_=!0,this.idTensor.dispose()}size(){return this.tensors.length}read(e){if(this.closed_)throw new Error(`TensorArray ${this.name} has already been closed.`);if(e<0||e>=this.size())throw new Error(`Tried to read from index ${e}, but array size is: ${this.size()}`);let t=this.tensors[e];if(t.cleared)throw new Error(`TensorArray ${this.name}: Could not read index ${e} twice because it was cleared after a previous read (perhaps try setting clear_after_read = false?).`);return this.clearAfterRead&&(t.cleared=!0),t.read=!0,t.tensor}readMany(e){return e.map(t=>this.read(t))}write(e,t){if(this.closed_)throw new Error(`TensorArray ${this.name} has already been closed.`);if(e<0||!this.dynamicSize&&e>=this.maxSize)throw new Error(`Tried to write to index ${e}, but array is not resizeable and size is: ${this.maxSize}`);let n=this.tensors[e]||{};if(t.dtype!==this.dtype)throw new Error(`TensorArray ${this.name}: Could not write to TensorArray index ${e}, + because the value dtype is ${t.dtype}, but TensorArray dtype is ${this.dtype}.`);if(this.size()===0&&(this.elementShape==null||this.elementShape.length===0)&&(this.elementShape=t.shape),fr(this.elementShape,t.shape,`TensorArray ${this.name}: Could not write to TensorArray index ${e}.`),n.read)throw new Error(`TensorArray ${this.name}: Could not write to TensorArray index ${e}, because it has already been read.`);if(n.written)throw new Error(`TensorArray ${this.name}: Could not write to TensorArray index ${e}, because it has already been written.`);n.tensor=t,Cn(t),n.written=!0,this.tensors[e]=n}writeMany(e,t){if(e.length!==t.length)throw new Error(`TensorArray ${this.name}: could not write multiple tensors,because the index size: ${e.length} is not the same as tensors size: ${t.length}.`);e.forEach((n,s)=>this.write(n,t[s]))}gather(e,t){if(!!t&&t!==this.dtype)throw new Error(`TensorArray dtype is ${this.dtype} but gather requested dtype ${t}`);if(e)e=e.slice(0,this.size());else{e=[];for(let s=0;s=this.maxSize)throw new Error(`Max index must be < array size (${n} vs. ${this.maxSize})`);this.writeMany(e,bn(t,0))}split(e,t){if(t.dtype!==this.dtype)throw new Error(`TensorArray dtype is ${this.dtype} but tensor has dtype ${t.dtype}`);let n=0,s=e.map(i=>(n+=i,n));if(n!==t.shape[0])throw new Error(`Expected sum of lengths to be equal to tensor.shape[0], but sum of lengths is - ${n}, and tensor's shape is: ${t.shape}`);if(!this.dynamicSize&&e.length!==this.maxSize)throw new Error(`TensorArray's size is not equal to the size of lengths (${this.maxSize} vs. ${e.length}), and the TensorArray is not marked as dynamically resizeable`);let r=n===0?0:t.size/n,a=[];Y(()=>{t=V(t,[1,n,r]);for(let i=0;i{if(n!==r.dtype)throw new Error(`Invalid data types; op elements ${n}, but list elements ${r.dtype}`);fr(t,r.shape,"TensorList shape mismatch: "),Tn(r)}),this.idTensor=Te(0),this.maxNumElements=s,Tn(this.idTensor)}get id(){return this.idTensor.id}copy(){return new bc([...this.tensors],this.elementShape,this.elementDtype)}clearAndClose(e){this.tensors.forEach(t=>{(e==null||!e.has(t.id))&&t.dispose()}),this.tensors.length=0,this.idTensor.dispose()}size(){return this.tensors.length}stack(e,t,n=-1){if(t!==this.elementDtype)throw new Error(`Invalid data types; op elements ${t}, but list elements ${this.elementDtype}`);if(n!==-1&&this.tensors.length!==n)throw new Error(`Operation expected a list with ${n} elements but got a list with ${this.tensors.length} elements.`);fr(e,this.elementShape,"TensorList shape mismatch: ");let s=op(this.elementShape,this.tensors,e);return Y(()=>{let r=this.tensors.map(a=>V(a,s));return un(r,0)})}popBack(e,t){if(t!==this.elementDtype)throw new Error(`Invalid data types; op elements ${t}, but list elements ${this.elementDtype}`);if(this.size()===0)throw new Error("Trying to pop from an empty list.");let n=op(this.elementShape,this.tensors,e),s=this.tensors.pop();return s.kept=!1,fr(s.shape,e,"TensorList shape mismatch: "),V(s,n)}pushBack(e){if(e.dtype!==this.elementDtype)throw new Error(`Invalid data types; op elements ${e.dtype}, but list elements ${this.elementDtype}`);if(fr(e.shape,this.elementShape,"TensorList shape mismatch: "),this.maxNumElements===this.size())throw new Error("Trying to push element into a full list.");Tn(e),this.tensors.push(e)}resize(e){if(e<0)throw new Error(`TensorListResize expects size to be non-negative. Got: ${e}`);if(this.maxNumElements!==-1&&e>this.maxNumElements)throw new Error(`TensorListResize input size ${e} is greater maxNumElement ${this.maxNumElements}.`);let t=new bc([],this.elementShape,this.elementDtype,this.maxNumElements);t.tensors.length=e;for(let n=0;nthis.tensors.length)throw new Error(`Trying to access element ${e} in a list with ${this.tensors.length} elements.`);if(this.tensors[e]==null)throw new Error(`element at index ${e} is null.`);fr(this.tensors[e].shape,t,"TensorList shape mismatch: ");let s=op(this.elementShape,this.tensors,t);return V(this.tensors[e],s)}setItem(e,t){if(t.dtype!==this.elementDtype)throw new Error(`Invalid data types; op elements ${t.dtype}, but list elements ${this.elementDtype}`);if(e<0||this.maxNumElements!==-1&&e>=this.maxNumElements)throw new Error(`Trying to set element ${e} in a list with max ${this.maxNumElements} elements.`);fr(this.elementShape,t.shape,"TensorList shape mismatch: "),Tn(t),this.tensors[e]!=null&&(this.tensors[e].kept=!1),this.tensors[e]=t}gather(e,t,n){if(t!==this.elementDtype)throw new Error(`Invalid data types; op elements ${t}, but list elements ${this.elementDtype}`);fr(this.elementShape,n,"TensorList shape mismatch: "),e=e.slice(0,this.size());let s=op(this.elementShape,this.tensors,n);return e.length===0?Xe([],[0].concat(s)):Y(()=>{let r=e.map(a=>V(this.tensors[a],s));return un(r,0)})}concat(e,t){if(!!e&&e!==this.elementDtype)throw new Error(`TensorList dtype is ${this.elementDtype} but concat requested dtype ${e}`);fr(this.elementShape,t,"TensorList shape mismatch: ");let n=op(this.elementShape,this.tensors,t);return this.size()===0?Xe([],[0].concat(n)):Y(()=>{let s=this.tensors.map(r=>V(r,n));return ct(s,0)})}};function fq(e,t,n){let s=e.dtype;if(e.shape.length<1)throw new Error(`Tensor must be at least a vector, but saw shape: ${e.shape}`);if(e.dtype!==n)throw new Error(`Invalid data types; op elements ${e.dtype}, but list elements ${n}`);let r=e.shape.slice(1);fr(r,t,"TensorList shape mismatch: ");let a=wn(e);return new bc(a,t,s)}function mq(e,t,n,s){return new bc([],e,t,s)}function gq(e,t,n,s){if(t.length!==e.shape[0])throw new Error(`Expected len(indices) == tensor.shape[0], but saw: ${t.length} vs. ${e.shape[0]}`);let r=Math.max(...t);if(s!=null&&s!==-1&&r>=s)throw new Error(`Max index must be < array size (${r} vs. ${s})`);let a=new bc([],n,e.dtype,s),o=wn(e,0);return t.forEach((i,l)=>{a.setItem(i,o[l])}),a}function yq(e,t,n){let s=0,r=t.map(c=>(s+=c,s));if(s!==e.shape[0])throw new Error(`Expected sum of lengths to be equal to + ${n}, and tensor's shape is: ${t.shape}`);if(!this.dynamicSize&&e.length!==this.maxSize)throw new Error(`TensorArray's size is not equal to the size of lengths (${this.maxSize} vs. ${e.length}), and the TensorArray is not marked as dynamically resizeable`);let r=n===0?0:t.size/n,a=[];X(()=>{t=W(t,[1,n,r]);for(let i=0;i{if(n!==r.dtype)throw new Error(`Invalid data types; op elements ${n}, but list elements ${r.dtype}`);fr(t,r.shape,"TensorList shape mismatch: "),Cn(r)}),this.idTensor=Ce(0),this.maxNumElements=s,Cn(this.idTensor)}get id(){return this.idTensor.id}copy(){return new lc([...this.tensors],this.elementShape,this.elementDtype)}clearAndClose(e){this.tensors.forEach(t=>{(e==null||!e.has(t.id))&&t.dispose()}),this.tensors.length=0,this.idTensor.dispose()}size(){return this.tensors.length}stack(e,t,n=-1){if(t!==this.elementDtype)throw new Error(`Invalid data types; op elements ${t}, but list elements ${this.elementDtype}`);if(n!==-1&&this.tensors.length!==n)throw new Error(`Operation expected a list with ${n} elements but got a list with ${this.tensors.length} elements.`);fr(e,this.elementShape,"TensorList shape mismatch: ");let s=Ud(this.elementShape,this.tensors,e);return X(()=>{let r=this.tensors.map(a=>W(a,s));return ln(r,0)})}popBack(e,t){if(t!==this.elementDtype)throw new Error(`Invalid data types; op elements ${t}, but list elements ${this.elementDtype}`);if(this.size()===0)throw new Error("Trying to pop from an empty list.");let n=Ud(this.elementShape,this.tensors,e),s=this.tensors.pop();return s.kept=!1,fr(s.shape,e,"TensorList shape mismatch: "),W(s,n)}pushBack(e){if(e.dtype!==this.elementDtype)throw new Error(`Invalid data types; op elements ${e.dtype}, but list elements ${this.elementDtype}`);if(fr(e.shape,this.elementShape,"TensorList shape mismatch: "),this.maxNumElements===this.size())throw new Error("Trying to push element into a full list.");Cn(e),this.tensors.push(e)}resize(e){if(e<0)throw new Error(`TensorListResize expects size to be non-negative. Got: ${e}`);if(this.maxNumElements!==-1&&e>this.maxNumElements)throw new Error(`TensorListResize input size ${e} is greater maxNumElement ${this.maxNumElements}.`);let t=new lc([],this.elementShape,this.elementDtype,this.maxNumElements);t.tensors.length=e;for(let n=0;nthis.tensors.length)throw new Error(`Trying to access element ${e} in a list with ${this.tensors.length} elements.`);if(this.tensors[e]==null)throw new Error(`element at index ${e} is null.`);fr(this.tensors[e].shape,t,"TensorList shape mismatch: ");let s=Ud(this.elementShape,this.tensors,t);return W(this.tensors[e],s)}setItem(e,t){if(t.dtype!==this.elementDtype)throw new Error(`Invalid data types; op elements ${t.dtype}, but list elements ${this.elementDtype}`);if(e<0||this.maxNumElements!==-1&&e>=this.maxNumElements)throw new Error(`Trying to set element ${e} in a list with max ${this.maxNumElements} elements.`);fr(this.elementShape,t.shape,"TensorList shape mismatch: "),Cn(t),this.tensors[e]!=null&&(this.tensors[e].kept=!1),this.tensors[e]=t}gather(e,t,n){if(t!==this.elementDtype)throw new Error(`Invalid data types; op elements ${t}, but list elements ${this.elementDtype}`);fr(this.elementShape,n,"TensorList shape mismatch: "),e=e.slice(0,this.size());let s=Ud(this.elementShape,this.tensors,n);return e.length===0?Ue([],[0].concat(s)):X(()=>{let r=e.map(a=>W(this.tensors[a],s));return ln(r,0)})}concat(e,t){if(!!e&&e!==this.elementDtype)throw new Error(`TensorList dtype is ${this.elementDtype} but concat requested dtype ${e}`);fr(this.elementShape,t,"TensorList shape mismatch: ");let n=Ud(this.elementShape,this.tensors,t);return this.size()===0?Ue([],[0].concat(n)):X(()=>{let s=this.tensors.map(r=>W(r,n));return ut(s,0)})}};function Bj(e,t,n){let s=e.dtype;if(e.shape.length<1)throw new Error(`Tensor must be at least a vector, but saw shape: ${e.shape}`);if(e.dtype!==n)throw new Error(`Invalid data types; op elements ${e.dtype}, but list elements ${n}`);let r=e.shape.slice(1);fr(r,t,"TensorList shape mismatch: ");let a=bn(e);return new lc(a,t,s)}function Wj(e,t,n,s){return new lc([],e,t,s)}function Vj(e,t,n,s){if(t.length!==e.shape[0])throw new Error(`Expected len(indices) == tensor.shape[0], but saw: ${t.length} vs. ${e.shape[0]}`);let r=Math.max(...t);if(s!=null&&s!==-1&&r>=s)throw new Error(`Max index must be < array size (${r} vs. ${s})`);let a=new lc([],n,e.dtype,s),o=bn(e,0);return t.forEach((i,l)=>{a.setItem(i,o[l])}),a}function Uj(e,t,n){let s=0,r=t.map(c=>(s+=c,s));if(s!==e.shape[0])throw new Error(`Expected sum of lengths to be equal to tensor.shape[0], but sum of lengths is - ${s}, and tensor's shape is: ${e.shape}`);let a=e.shape.slice(1),o=my(a,n),i=s===0?0:e.size/s,l=Y(()=>{let c=[];e=V(e,[1,s,i]);for(let p=0;p{switch(e.op){case"If":case"StatelessIf":{let s=I("thenBranch",e,t,n),r=I("elseBranch",e,t,n),a=I("cond",e,t,n),o=I("args",e,t,n);return(await a.data())[0]?n.functionMap[s].executeFunctionAsync(o,n.tensorArrayMap,n.tensorListMap):n.functionMap[r].executeFunctionAsync(o,n.tensorArrayMap,n.tensorListMap)}case"While":case"StatelessWhile":{let s=I("body",e,t,n),r=I("cond",e,t,n),a=I("args",e,t,n),o=await n.functionMap[r].executeFunctionAsync(a,n.tensorArrayMap,n.tensorListMap),i=a.map(c=>c.id),l=await o[0].data();o.forEach(c=>{!c.kept&&i.indexOf(c.id)===-1&&c.dispose()});let u=a;for(;l[0];){let c=u;u=await n.functionMap[s].executeFunctionAsync(u,n.tensorArrayMap,n.tensorListMap);let p=u.map(h=>h.id);c.forEach(h=>{!h.kept&&i.indexOf(h.id)===-1&&p.indexOf(h.id)===-1&&h.dispose()});let d=await n.functionMap[r].executeFunctionAsync(u,n.tensorArrayMap,n.tensorListMap);l=await d[0].data(),d.forEach(h=>{!h.kept&&i.indexOf(h.id)===-1&&p.indexOf(h.id)===-1&&h.dispose()})}return u}case"LoopCond":{let s=I("pred",e,t,n);return[wa(s)]}case"Switch":{let s=I("pred",e,t,n),r=I("data",e,t,n);return r.kept||(r=wa(r)),(await s.data())[0]?[void 0,r]:[r,void 0]}case"Merge":{let s=e.inputNames.find(r=>ls(r,t,n)!==void 0);if(s){let r=ls(s,t,n);return[wa(r)]}return}case"Enter":{let s=I("frameName",e,t,n),r=I("tensor",e,t,n);return n.enterFrame(s),[wa(r)]}case"Exit":{let s=I("tensor",e,t,n);return n.exitFrame(),[wa(s)]}case"NextIteration":{let s=I("tensor",e,t,n);return n.nextIteration(),[wa(s)]}case"TensorArrayV3":{let s=I("size",e,t,n),r=I("dtype",e,t,n),a=I("elementShape",e,t,n),o=I("dynamicSize",e,t,n),i=I("clearAfterRead",e,t,n),l=I("identicalElementShapes",e,t,n),u=I("name",e,t,n),c=new hq(u,r,s,a,l,o,i);return n.addTensorArray(c),[c.idTensor,Te(1)]}case"TensorArrayWriteV3":{let s=I("tensorArrayId",e,t,n),r=I("index",e,t,n),a=I("tensor",e,t,n),o=n.getTensorArray(s.id);return o.write(r,a),[o.idTensor]}case"TensorArrayReadV3":{let s=I("tensorArrayId",e,t,n),r=I("index",e,t,n);return[n.getTensorArray(s.id).read(r)]}case"TensorArrayGatherV3":{let s=I("tensorArrayId",e,t,n),r=I("indices",e,t,n),a=I("dtype",e,t,n);return[n.getTensorArray(s.id).gather(r,a)]}case"TensorArrayScatterV3":{let s=I("tensorArrayId",e,t,n),r=I("indices",e,t,n),a=I("tensor",e,t,n),o=n.getTensorArray(s.id);return o.scatter(r,a),[o.idTensor]}case"TensorArrayConcatV3":{let s=I("tensorArrayId",e,t,n),r=n.getTensorArray(s.id),a=I("dtype",e,t,n);return[r.concat(a)]}case"TensorArraySplitV3":{let s=I("tensorArrayId",e,t,n),r=I("tensor",e,t,n),a=I("lengths",e,t,n),o=n.getTensorArray(s.id);return o.split(a,r),[o.idTensor]}case"TensorArraySizeV3":{let s=I("tensorArrayId",e,t,n),r=n.getTensorArray(s.id);return[Te(r.size(),"int32")]}case"TensorArrayCloseV3":{let s=I("tensorArrayId",e,t,n),r=n.getTensorArray(s.id);return r.clearAndClose(),[r.idTensor]}case"TensorListSetItem":{let s=I("tensorListId",e,t,n),r=I("index",e,t,n),a=I("tensor",e,t,n),o=n.getTensorList(s.id);return o.setItem(r,a),[o.idTensor]}case"TensorListGetItem":{let s=I("tensorListId",e,t,n),r=I("index",e,t,n),a=I("elementShape",e,t,n),o=I("elementDType",e,t,n);return[n.getTensorList(s.id).getItem(r,a,o)]}case"TensorListScatterV2":case"TensorListScatter":{let s=I("indices",e,t,n),r=I("tensor",e,t,n),a=I("elementShape",e,t,n),o=I("numElements",e,t,n),i=gq(r,s,a,o);return n.addTensorList(i),[i.idTensor]}case"TensorListReserve":case"EmptyTensorList":{let s=I("elementShape",e,t,n),r=I("elementDType",e,t,n),a;e.op==="TensorListReserve"?a="numElements":a="maxNumElements";let o=I(a,e,t,n),i=e.op==="TensorListReserve"?-1:o,l=mq(s,r,o,i);return n.addTensorList(l),[l.idTensor]}case"TensorListGather":{let s=I("tensorListId",e,t,n),r=I("indices",e,t,n),a=I("elementShape",e,t,n),o=I("elementDType",e,t,n);return[n.getTensorList(s.id).gather(r,o,a)]}case"TensorListStack":{let s=I("tensorListId",e,t,n),r=I("elementShape",e,t,n),a=I("elementDType",e,t,n),o=I("numElements",e,t,n);return[n.getTensorList(s.id).stack(r,a,o)]}case"TensorListFromTensor":{let s=I("tensor",e,t,n),r=I("elementShape",e,t,n),a=I("elementDType",e,t,n),o=fq(s,r,a);return n.addTensorList(o),[o.idTensor]}case"TensorListConcat":case"TensorListConcatV2":{let s=I("tensorListId",e,t,n),r=n.getTensorList(s.id),a=I("dtype",e,t,n),o=I("elementShape",e,t,n);return[r.concat(a,o)]}case"TensorListPushBack":{let s=I("tensorListId",e,t,n),r=I("tensor",e,t,n),a=n.getTensorList(s.id);return a.pushBack(r),[a.idTensor]}case"TensorListPopBack":{let s=I("tensorListId",e,t,n),r=I("elementShape",e,t,n),a=I("elementDType",e,t,n);return[n.getTensorList(s.id).popBack(r,a)]}case"TensorListSplit":{let s=I("tensor",e,t,n),r=I("elementShape",e,t,n),a=I("lengths",e,t,n),o=yq(s,a,r);return n.addTensorList(o),[o.idTensor]}case"TensorListLength":{let s=I("tensorListId",e,t,n),r=n.getTensorList(s.id);return[Te(r.size(),"int32")]}case"TensorListResize":{let s=I("tensorListId",e,t,n),r=I("size",e,t,n),o=n.getTensorList(s.id).resize(r);return n.addTensorList(o),[o.idTensor]}default:throw TypeError(`Node type ${e.op} is not implemented`)}};function S7(e,t,n){let[s,r]=I("fusedOps",e,t,n),a=s==="biasadd",o=!a,i=r==="prelu",l=s==="fusedbatchnorm",u=I("numArgs",e,t,n);if(a){if(i&&u!==2)throw new Error("FusedConv2d and DepthwiseConv2d with BiasAdd and Prelu must have two extra arguments: bias and alpha.");if(!i&&a&&u!==1)throw new Error("FusedConv2d and DepthwiseConv2d with BiasAdd must have one extra argument: bias.")}if(l)throw new Error("FusedConv2d and DepthwiseConv2d with FusedBatchNorm is not supported");let c=I("strides",e,t,n),p=hm(e,t,n),d=I("dataFormat",e,t,n).toUpperCase(),h=I("dilations",e,t,n),[f,m]=I("args",e,t,n);o&&(m=f,f=void 0);let g=I("leakyreluAlpha",e,t,n);return{stride:c,pad:p,dataFormat:d,dilations:h,biasArg:f,preluArg:m,activationFunc:r,leakyreluAlpha:g}}var xq=(e,t,n,s=Ln)=>{switch(e.op){case"Conv1D":{let r=I("stride",e,t,n),a=I("pad",e,t,n),o=I("dataFormat",e,t,n).toUpperCase(),i=I("dilation",e,t,n);return[s.conv1d(I("x",e,t,n),I("filter",e,t,n),r,a,o,i)]}case"Conv2D":{let r=I("strides",e,t,n),a=hm(e,t,n),o=I("dataFormat",e,t,n).toUpperCase(),i=I("dilations",e,t,n);return[s.conv2d(I("x",e,t,n),I("filter",e,t,n),[r[1],r[2]],a,o,[i[1],i[2]])]}case"_FusedConv2D":{let{stride:r,pad:a,dataFormat:o,dilations:i,biasArg:l,preluArg:u,activationFunc:c,leakyreluAlpha:p}=S7(e,t,n);return[s.fused.conv2d({x:I("x",e,t,n),filter:I("filter",e,t,n),strides:[r[1],r[2]],pad:a,dataFormat:o,dilations:[i[1],i[2]],bias:l,activation:c,preluActivationWeights:u,leakyreluAlpha:p})]}case"FusedDepthwiseConv2dNative":{let{stride:r,pad:a,dataFormat:o,dilations:i,biasArg:l,preluArg:u,activationFunc:c,leakyreluAlpha:p}=S7(e,t,n);return[s.fused.depthwiseConv2d({x:I("x",e,t,n),filter:I("filter",e,t,n),strides:[r[1],r[2]],pad:a,dataFormat:o,dilations:[i[1],i[2]],bias:l,activation:c,preluActivationWeights:u,leakyreluAlpha:p})]}case"Conv2DBackpropInput":case"Conv2dTranspose":{let r=I("outputShape",e,t,n),a=I("strides",e,t,n),o=hm(e,t,n);return[s.conv2dTranspose(I("x",e,t,n),I("filter",e,t,n),r,[a[1],a[2]],o)]}case"DepthwiseConv2dNative":case"DepthwiseConv2d":{let r=I("strides",e,t,n),a=hm(e,t,n),o=I("dilations",e,t,n),i=I("dataFormat",e,t,n).toUpperCase();return[s.depthwiseConv2d(I("input",e,t,n),I("filter",e,t,n),[r[1],r[2]],a,i,[o[1],o[2]])]}case"Conv3D":{let r=I("strides",e,t,n),a=I("pad",e,t,n),o=I("dataFormat",e,t,n).toUpperCase(),i=I("dilations",e,t,n);return[s.conv3d(I("x",e,t,n),I("filter",e,t,n),[r[1],r[2],r[3]],a,o,[i[1],i[2],i[3]])]}case"AvgPool":{let r=I("strides",e,t,n),a=I("pad",e,t,n),o=I("kernelSize",e,t,n);return[s.avgPool(I("x",e,t,n),[o[1],o[2]],[r[1],r[2]],a)]}case"MaxPool":{let r=I("strides",e,t,n),a=I("pad",e,t,n),o=I("kernelSize",e,t,n);return[s.maxPool(I("x",e,t,n),[o[1],o[2]],[r[1],r[2]],a)]}case"MaxPoolWithArgmax":{let r=I("strides",e,t,n),a=I("pad",e,t,n),o=I("kernelSize",e,t,n),i=I("includeBatchInIndex",e,t,n),{result:l,indexes:u}=s.maxPoolWithArgmax(I("x",e,t,n),[o[1],o[2]],[r[1],r[2]],a,i);return[l,u]}case"AvgPool3D":{let r=I("strides",e,t,n),a=I("pad",e,t,n),o=I("kernelSize",e,t,n);return[s.avgPool3d(I("x",e,t,n),[o[1],o[2],o[3]],[r[1],r[2],r[3]],a)]}case"MaxPool3D":{let r=I("strides",e,t,n),a=I("pad",e,t,n),o=I("kernelSize",e,t,n);return[s.maxPool3d(I("x",e,t,n),[o[1],o[2],o[3]],[r[1],r[2],r[3]],a)]}case"Dilation2D":{let r=I("strides",e,t,n),a=I("pad",e,t,n),o=I("dilations",e,t,n),i=r[1],l=r[2],u=o[1],c=o[2];return[s.dilation2d(I("x",e,t,n),I("filter",e,t,n),[i,l],a,[u,c],"NHWC")]}default:throw TypeError(`Node type ${e.op} is not implemented`)}},bq=(e,t,n,s=Ln)=>{switch(e.op){case"Fill":{let r=I("shape",e,t,n),a=I("dtype",e,t,n),o=I("value",e,t,n);return[s.fill(r,o,a)]}case"LinSpace":{let r=I("start",e,t,n),a=I("stop",e,t,n),o=I("num",e,t,n);return[s.linspace(r,a,o)]}case"Multinomial":{let r=I("logits",e,t,n),a=I("numSamples",e,t,n),o=I("seed",e,t,n);return[s.multinomial(r,a,o)]}case"OneHot":{let r=I("indices",e,t,n),a=I("depth",e,t,n),o=I("onValue",e,t,n),i=I("offValue",e,t,n),l=I("dtype",e,t,n);return[s.oneHot(r,a,o,i,l)]}case"Ones":return[s.ones(I("shape",e,t,n),I("dtype",e,t,n))];case"OnesLike":return[s.onesLike(I("x",e,t,n))];case"RandomStandardNormal":return[s.randomStandardNormal(I("shape",e,t,n),I("dtype",e,t,n),I("seed",e,t,n))];case"RandomUniform":return[s.randomUniform(I("shape",e,t,n),I("minval",e,t,n),I("maxval",e,t,n),I("dtype",e,t,n))];case"Range":{let r=I("start",e,t,n),a=I("stop",e,t,n),o=I("step",e,t,n);return[s.range(r,a,o,I("dtype",e,t,n))]}case"TruncatedNormal":{let r=I("shape",e,t,n),a=I("mean",e,t,n),o=I("stdDev",e,t,n),i=I("seed",e,t,n);return[s.truncatedNormal(r,a,o,I("dtype",e,t,n),i)]}case"Zeros":return[s.zeros(I("shape",e,t,n),I("dtype",e,t,n))];case"ZerosLike":return[s.zerosLike(I("x",e,t,n))];default:throw TypeError(`Node type ${e.op} is not implemented`)}};function T3(e,t,n){let s=I("boxes",e,t,n),r=I("scores",e,t,n),a=I("maxOutputSize",e,t,n),o=I("iouThreshold",e,t,n),i=I("scoreThreshold",e,t,n),l=I("softNmsSigma",e,t,n);return{boxes:s,scores:r,maxOutputSize:a,iouThreshold:o,scoreThreshold:i,softNmsSigma:l}}var vq=async(e,t,n,s,r=Ln)=>{switch(e.op){case"NonMaxSuppressionV5":{let{boxes:a,scores:o,maxOutputSize:i,iouThreshold:l,scoreThreshold:u,softNmsSigma:c}=T3(e,t,n),p=await r.image.nonMaxSuppressionWithScoreAsync(a,o,i,l,u,c);return[p.selectedIndices,p.selectedScores]}case"NonMaxSuppressionV4":{let{boxes:a,scores:o,maxOutputSize:i,iouThreshold:l,scoreThreshold:u}=T3(e,t,n),c=I("padToMaxOutputSize",e,t,n),p=await r.image.nonMaxSuppressionPaddedAsync(a,o,i,l,u,c);return[p.selectedIndices,p.validOutputs]}case"NonMaxSuppressionV3":case"NonMaxSuppressionV2":{let{boxes:a,scores:o,maxOutputSize:i,iouThreshold:l,scoreThreshold:u}=T3(e,t,n);return[await r.image.nonMaxSuppressionAsync(a,o,i,l,u)]}case"Where":{let a=r.cast(I("condition",e,t,n),"bool"),o=[await r.whereAsync(a)];return a.dispose(),o}case"ListDiff":return r.setdiff1dAsync(I("x",e,t,n),I("y",e,t,n));default:throw TypeError(`Node type ${e.op} is not implemented`)}},wq=(e,t,n,s=Ln)=>{switch(e.op){case"LowerBound":{let r=I("sortedSequence",e,t,n),a=I("values",e,t,n);return[s.lowerBound(r,a)]}case"TopKV2":{let r=I("x",e,t,n),a=I("k",e,t,n),o=I("sorted",e,t,n),i=s.topk(r,a,o);return[i.values,i.indices]}case"UpperBound":{let r=I("sortedSequence",e,t,n),a=I("values",e,t,n);return[s.upperBound(r,a)]}case"Unique":{let r=I("x",e,t,n),a=s.unique(r);return[a.values,a.indices]}case"UniqueV2":{let r=I("x",e,t,n),a=I("axis",e,t,n),o=s.unique(r,a);return[o.values,o.indices]}default:throw TypeError(`Node type ${e.op} is not implemented`)}},kq=(e,t,n,s=Ln)=>{switch(e.op){case"Const":return t[e.name];case"PlaceholderWithDefault":let r=I("default",e,t,n);return[ls(e.name,t,n)||r];case"Placeholder":return[ls(e.name,t,n)];case"Identity":case"StopGradient":case"FakeQuantWithMinMaxVars":{let c=I("x",e,t,n);return[wa(c)]}case"IdentityN":return I("x",e,t,n).map(c=>wa(c));case"Snapshot":let a=I("x",e,t,n);return[wa(a)];case"Shape":return[s.tensor1d(I("x",e,t,n).shape,"int32")];case"ShapeN":return I("x",e,t,n).map(c=>s.tensor1d(c.shape));case"Size":return[s.scalar(I("x",e,t,n).size,"int32")];case"Rank":return[s.scalar(I("x",e,t,n).rank,"int32")];case"NoOp":return[s.scalar(1)];case"Print":let o=I("x",e,t,n),i=I("data",e,t,n),l=I("message",e,t,n),u=I("summarize",e,t,n);console.warn("The graph has a tf.print() operation,usually used for debugging, which slows down performance."),console.log(l);for(let c=0;ce.dispose()),this.tensorMap.clear(),this.handle.dispose()}size(){return this.tensorMap.size}tensorSize(){return Te(this.size(),"int32")}async import(e,t){this.checkKeyAndValueTensor(e,t);let n=await e.data();return this.tensorMap.forEach(s=>s.dispose()),this.tensorMap.clear(),Y(()=>{let s=wn(t),r=n.length,a=s.length;v.assert(r===a,()=>`The number of elements doesn't match, keys has ${r} elements, the values has ${a} elements.`);for(let o=0;o{let s=[];for(let r=0;r{switch(e.op){case"HashTable":case"HashTableV2":{let r=I("keyDType",e,t,n),a=I("valueDType",e,t,n),o=new Sq(r,a);return s.addHashTable(e.name,o),[o.handle]}case"LookupTableImport":case"LookupTableImportV2":{let r=I("tableHandle",e,t,n,s),a=I("keys",e,t,n),o=I("values",e,t,n);return[await s.getHashTableById(r.id).import(a,o)]}case"LookupTableFind":case"LookupTableFindV2":{let r=I("tableHandle",e,t,n,s),a=I("keys",e,t,n),o=I("defaultValue",e,t,n);return[await s.getHashTableById(r.id).find(a,o)]}case"LookupTableSize":case"LookupTableSizeV2":{let r=I("tableHandle",e,t,n,s);return[s.getHashTableById(r.id).tensorSize()]}default:throw TypeError(`Node type ${e.op} is not implemented`)}},Cq=(e,t,n,s=Ln)=>{switch(e.op){case"ResizeBilinear":{let r=I("images",e,t,n),a=I("size",e,t,n),o=I("alignCorners",e,t,n),i=I("halfPixelCenters",e,t,n);return[s.image.resizeBilinear(r,[a[0],a[1]],o,i)]}case"ResizeNearestNeighbor":{let r=I("images",e,t,n),a=I("size",e,t,n),o=I("alignCorners",e,t,n),i=I("halfPixelCenters",e,t,n);return[s.image.resizeNearestNeighbor(r,[a[0],a[1]],o,i)]}case"CropAndResize":{let r=I("image",e,t,n),a=I("boxes",e,t,n),o=I("boxInd",e,t,n),i=I("cropSize",e,t,n),l=I("method",e,t,n),u=I("extrapolationValue",e,t,n);return[s.image.cropAndResize(r,a,o,i,l,u)]}case"ImageProjectiveTransformV3":{let r=I("images",e,t,n),a=I("transforms",e,t,n),o=I("outputShape",e,t,n),i=I("fillValue",e,t,n),l=I("interpolation",e,t,n),u=I("fillMode",e,t,n);return[s.image.transform(r,a,l.toLowerCase(),u.toLowerCase(),i,o)]}default:throw TypeError(`Node type ${e.op} is not implemented`)}},Tq=(e,t,n,s=Ln)=>{switch(e.op){case"Equal":return[s.equal(I("a",e,t,n),I("b",e,t,n))];case"NotEqual":return[s.notEqual(I("a",e,t,n),I("b",e,t,n))];case"Greater":return[s.greater(I("a",e,t,n),I("b",e,t,n))];case"GreaterEqual":return[s.greaterEqual(I("a",e,t,n),I("b",e,t,n))];case"Less":return[s.less(I("a",e,t,n),I("b",e,t,n))];case"LessEqual":return[s.lessEqual(I("a",e,t,n),I("b",e,t,n))];case"LogicalAnd":return[s.logicalAnd(I("a",e,t,n),I("b",e,t,n))];case"LogicalNot":return[s.logicalNot(I("a",e,t,n))];case"LogicalOr":return[s.logicalOr(I("a",e,t,n),I("b",e,t,n))];case"Select":case"SelectV2":return[s.where(I("condition",e,t,n),I("a",e,t,n),I("b",e,t,n))];default:throw TypeError(`Node type ${e.op} is not implemented`)}},Nq=(e,t,n,s=Ln)=>{switch(e.op){case"BatchMatMul":case"BatchMatMulV2":case"MatMul":return[s.matMul(I("a",e,t,n),I("b",e,t,n),I("transposeA",e,t,n),I("transposeB",e,t,n))];case"Einsum":return[s.einsum(I("equation",e,t,n),...I("tensors",e,t,n))];case"Transpose":return[s.transpose(I("x",e,t,n),I("perm",e,t,n))];case"_FusedMatMul":let[r,a]=I("fusedOps",e,t,n),o=r==="biasadd",i=a==="prelu",l=I("numArgs",e,t,n),u=I("leakyreluAlpha",e,t,n);if(o){if(i&&l!==2)throw new Error("Fused MatMul with BiasAdd and Prelu must have two extra arguments: bias and alpha.");if(!i&&l!==1)throw new Error("Fused MatMul with BiasAdd must have one extra argument: bias.")}let[c,p]=I("args",e,t,n);return[s.fused.matMul({a:I("a",e,t,n),b:I("b",e,t,n),transposeA:I("transposeA",e,t,n),transposeB:I("transposeB",e,t,n),bias:c,activation:a,preluActivationWeights:p,leakyreluAlpha:u})];default:throw TypeError(`Node type ${e.op} is not implemented`)}},Eq=(e,t,n,s=Ln)=>{switch(e.op){case"EuclideanNorm":return[s.euclideanNorm(I("x",e,t,n),I("axis",e,t,n),I("keepDims",e,t,n))];case"FusedBatchNorm":case"FusedBatchNormV2":return[s.batchNorm(I("x",e,t,n),I("mean",e,t,n),I("variance",e,t,n),I("offset",e,t,n),I("scale",e,t,n),I("epsilon",e,t,n))];case"FusedBatchNormV3":return[s.batchNorm(I("x",e,t,n),I("mean",e,t,n),I("variance",e,t,n),I("offset",e,t,n),I("scale",e,t,n),I("epsilon",e,t,n))];case"LRN":return[s.localResponseNormalization(I("x",e,t,n),I("radius",e,t,n),I("bias",e,t,n),I("alpha",e,t,n),I("beta",e,t,n))];case"Softmax":return[s.softmax(I("x",e,t,n))];case"LogSoftmax":return[s.logSoftmax(I("x",e,t,n))];case"SparseToDense":return[s.sparseToDense(I("sparseIndices",e,t,n),I("outputShape",e,t,n),I("sparseValues",e,t,n),I("defaultValue",e,t,n))];default:throw TypeError(`Node type ${e.op} is not implemented`)}},Rq=(e,t,n,s=Ln)=>{switch(e.op){case"Max":{let i=I("axis",e,t,n),l=I("keepDims",e,t,n);return[s.max(I("x",e,t,n),i,l)]}case"Mean":{let i=I("axis",e,t,n),l=I("keepDims",e,t,n);return[s.mean(I("x",e,t,n),i,l)]}case"Min":{let i=I("axis",e,t,n),l=I("keepDims",e,t,n);return[s.min(I("x",e,t,n),i,l)]}case"Sum":{let i=I("axis",e,t,n),l=I("keepDims",e,t,n);return[s.sum(I("x",e,t,n),i,l)]}case"All":{let i=I("axis",e,t,n),l=I("keepDims",e,t,n);return[s.all(I("x",e,t,n),i,l)]}case"Any":{let i=I("axis",e,t,n),l=I("keepDims",e,t,n);return[s.any(I("x",e,t,n),i,l)]}case"ArgMax":{let i=I("axis",e,t,n);return[s.argMax(I("x",e,t,n),i)]}case"ArgMin":{let i=I("axis",e,t,n);return[s.argMin(I("x",e,t,n),i)]}case"Prod":{let i=I("axis",e,t,n),l=I("keepDims",e,t,n);return[s.prod(I("x",e,t,n),i,l)]}case"Cumprod":{let i=I("axis",e,t,n),l=I("exclusive",e,t,n),u=I("reverse",e,t,n);return[s.cumprod(I("x",e,t,n),i,l,u)]}case"Cumsum":{let i=I("axis",e,t,n),l=I("exclusive",e,t,n),u=I("reverse",e,t,n);return[s.cumsum(I("x",e,t,n),i,l,u)]}case"Bincount":let r=I("x",e,t,n),a=I("weights",e,t,n),o=I("size",e,t,n);return[s.bincount(r,a,o)];case"DenseBincount":{let i=I("x",e,t,n),l=I("weights",e,t,n),u=I("size",e,t,n),c=I("binaryOutput",e,t,n);return[s.denseBincount(i,l,u,c)]}default:throw TypeError(`Node type ${e.op} is not implemented`)}},_q=(e,t,n,s=Ln)=>{switch(e.op){case"ConcatV2":case"Concat":{let r=I("n",e,t,n),a=I("axis",e,t,n),o=I("tensors",e,t,n);return o=o.slice(0,r),[s.concat(o,a)]}case"Gather":{let r=I("x",e,t,n),a=I("indices",e,t,n);return[s.gather(r,s.cast(a,"int32"),0)]}case"GatherV2":{let r=I("axis",e,t,n),a=I("batchDims",e,t,n),o=I("x",e,t,n),i=I("indices",e,t,n);return[s.gather(o,s.cast(i,"int32"),r,a)]}case"Reverse":{let r=I("dims",e,t,n),a=[];for(let i=0;i{let r=I("axis",e,t,n),a=I("tensors",e,t,n),o=a[0].shape,i=s.squeeze(a[0]).shape,l=a.map(u=>{let c=v.arraysEqual(u.shape,o);if(!c&&!v.arraysEqual(s.squeeze(u).shape,i))throw new Error("the input tensors shape does not match");return c?u:s.reshape(u,o)});return[s.stack(l,r)]});case"Unpack":{let r=I("axis",e,t,n),a=I("tensor",e,t,n);return s.unstack(a,r)}case"Tile":{let r=I("reps",e,t,n);return[s.tile(I("x",e,t,n),r)]}case"Split":case"SplitV":{let r=I("axis",e,t,n),a=I("numOrSizeSplits",e,t,n),o=I("x",e,t,n);return s.split(o,a,r)}case"ScatterNd":{let r=I("indices",e,t,n),a=I("values",e,t,n),o=I("shape",e,t,n);return[s.scatterND(r,a,o)]}case"GatherNd":{let r=I("x",e,t,n),a=I("indices",e,t,n);return[s.gatherND(r,a)]}case"SparseToDense":{let r=I("sparseIndices",e,t,n),a=I("outputShape",e,t,n),o=I("sparseValues",e,t,n),i=I("defaultValue",e,t,n);return[s.sparseToDense(r,o,a,o.dtype===i.dtype?i:s.cast(i,o.dtype))]}default:throw TypeError(`Node type ${e.op} is not implemented`)}},Dq=(e,t,n,s=Ln)=>{switch(e.op){case"SparseFillEmptyRows":{let{outputIndices:r,outputValues:a,emptyRowIndicator:o,reverseIndexMap:i}=s.sparse.sparseFillEmptyRows(I("indices",e,t,n),I("values",e,t,n),I("denseShape",e,t,n),I("defaultValue",e,t,n));return[r,a,o,i]}case"SparseReshape":{let{outputIndices:r,outputShape:a}=s.sparse.sparseReshape(I("inputIndices",e,t,n),I("inputShape",e,t,n),I("newShape",e,t,n));return[r,a]}case"SparseSegmentMean":return[s.sparse.sparseSegmentMean(I("data",e,t,n),I("indices",e,t,n),I("segmentIds",e,t,n))];case"SparseSegmentSum":return[s.sparse.sparseSegmentSum(I("data",e,t,n),I("indices",e,t,n),I("segmentIds",e,t,n))];default:throw TypeError(`Node type ${e.op} is not implemented`)}},$q=(e,t,n,s=Ln)=>{switch(e.op){case"FFT":return[s.fft(I("x",e,t,n))];case"IFFT":return[s.ifft(I("x",e,t,n))];case"RFFT":return[s.rfft(I("x",e,t,n))];case"IRFFT":return[s.irfft(I("x",e,t,n))];default:throw TypeError(`Node type ${e.op} is not implemented`)}},Pq=(e,t,n,s=Ln)=>{switch(e.op){case"StringNGrams":{let{nGrams:r,nGramsSplits:a}=s.string.stringNGrams(I("data",e,t,n),I("dataSplits",e,t,n),I("separator",e,t,n),I("nGramWidths",e,t,n),I("leftPad",e,t,n),I("rightPad",e,t,n),I("padWidth",e,t,n),I("preserveShortSequences",e,t,n));return[r,a]}case"StringSplit":{let{indices:r,values:a,shape:o}=s.string.stringSplit(I("input",e,t,n),I("delimiter",e,t,n),I("skipEmpty",e,t,n));return[r,a,o]}case"StringToHashBucketFast":return[s.string.stringToHashBucketFast(I("input",e,t,n),I("numBuckets",e,t,n))];default:throw TypeError(`Node type ${e.op} is not implemented`)}},Fq=(e,t,n,s=Ln)=>{switch(e.op){case"Cast":return[s.cast(I("x",e,t,n),I("dtype",e,t,n))];case"ExpandDims":{let r=I("axis",e,t,n);return[s.expandDims(I("x",e,t,n),r)]}case"Squeeze":{let r=I("axis",e,t,n);return[s.squeeze(I("x",e,t,n),r)]}case"Reshape":return[s.reshape(I("x",e,t,n),I("shape",e,t,n))];case"MirrorPad":return[s.mirrorPad(I("x",e,t,n),I("padding",e,t,n),I("mode",e,t,n))];case"PadV2":case"Pad":return[s.pad(I("x",e,t,n),I("padding",e,t,n),I("constantValue",e,t,n))];case"SpaceToBatchND":{let r=I("blockShape",e,t,n),a=I("paddings",e,t,n);return[s.spaceToBatchND(I("x",e,t,n),r,a)]}case"BatchToSpaceND":{let r=I("blockShape",e,t,n),a=I("crops",e,t,n);return[s.batchToSpaceND(I("x",e,t,n),r,a)]}case"DepthToSpace":{let r=I("blockSize",e,t,n),a=I("dataFormat",e,t,n).toUpperCase();return[s.depthToSpace(I("x",e,t,n),r,a)]}case"BroadcastTo":return[s.broadcastTo(I("x",e,t,n),I("shape",e,t,n))];case"BroadcastArgs":return[s.broadcastArgs(I("s0",e,t,n),I("s1",e,t,n))];default:throw TypeError(`Node type ${e.op} is not implemented`)}};function I7(e,t,n,s,r=Y){let a=((o,i,l)=>{switch(o.category){case"arithmetic":return r(()=>dq(o,i,l));case"basic_math":return r(()=>pq(o,i,l));case"control":return Aq(o,i,l);case"convolution":return r(()=>xq(o,i,l));case"creation":return r(()=>bq(o,i,l));case"dynamic":return vq(o,i,l);case"evaluation":return r(()=>wq(o,i,l));case"image":return r(()=>Cq(o,i,l));case"graph":return r(()=>kq(o,i,l));case"logical":return r(()=>Tq(o,i,l));case"matrices":return r(()=>Nq(o,i,l));case"normalization":return r(()=>Eq(o,i,l));case"reduction":return r(()=>Rq(o,i,l));case"slice_join":return r(()=>_q(o,i,l));case"sparse":return r(()=>Dq(o,i,l));case"spectral":return r(()=>$q(o,i,l));case"string":return r(()=>Pq(o,i,l));case"transformation":return r(()=>Fq(o,i,l));case"hash_table":return Iq(o,i,l,s);case"custom":let u=Z8(o.op);if(u&&u.customExecutor)return u.customExecutor(new cq(o,i,l));throw TypeError(`Custom op ${o.op} is not registered.`);default:throw TypeError(`Unknown op '${o.op}'. File an issue at https://github.com/tensorflow/tfjs/issues so we can add it, or register a custom execution with tf.registerOp()`)}})(e,t,n);return v.isPromise(a)?a.then(o=>[].concat(o)):[].concat(a)}var C7=class{constructor(e={},t={},n={},s={}){this.weightMap=e,this.tensorArrayMap=t,this.tensorListMap=n,this.functionMap=s,this.rootContext={id:0,frameName:"",iterationId:0},this.contexts=[this.rootContext],this.lastId=0,this.generateCurrentContextIds()}newFrame(e,t){return{id:e,frameName:t,iterationId:0}}set currentContext(e){this.contexts!==e&&(this.contexts=e,this.generateCurrentContextIds())}get currentContext(){return this.contexts}get currentContextId(){return this._currentContextIds[0]}get currentContextIds(){return this._currentContextIds}generateCurrentContextIds(){let e=[];for(let t=0;tt.id===0&&t.iterationId===0?"":`${t.frameName}-${t.iterationId}`).join("/"):""}enterFrame(e){this.contexts&&(this.lastId++,this.contexts=this.contexts.slice(),this.contexts.push(this.newFrame(this.lastId,e)),this._currentContextIds.unshift(this.contextIdforContexts(this.contexts)))}exitFrame(){if(this.contexts&&this.contexts.length>1)this.contexts=this.contexts.slice(),this.contexts.splice(-1),this.currentContextIds.shift();else throw new Error("Cannot exit frame, the context is empty")}nextIteration(){if(this.contexts&&this.contexts.length>0){this.contexts=this.contexts.slice(),this.lastId++;let e=Object.assign({},this.contexts[this.contexts.length-1]);e.iterationId+=1,e.id=this.lastId,this.contexts.splice(-1,1,e),this._currentContextIds.splice(0,1,this.contextIdforContexts(this.contexts))}else throw new Error("Cannot increase frame iteration, the context is empty")}getWeight(e){return this.weightMap[e]}addTensorArray(e){this.tensorArrayMap[e.id]=e}getTensorArray(e){return this.tensorArrayMap[e]}addTensorList(e){this.tensorListMap[e.id]=e}getTensorList(e){return this.tensorListMap[e]}dispose(e){for(let t in this.tensorArrayMap)this.tensorArrayMap[t].clearAndClose(e);for(let t in this.tensorListMap)this.tensorListMap[t].clearAndClose(e)}};function T7(e,t,n,s){let r=new Set,a=[],o=null,i=null,l=new Set,u=Object.keys(e).map(d=>$s(d)[0]),c=[];s!=null&&(c=s.map(d=>$s(d.name)[0]));let p=[...t];for(;p.length>0;){let d=p.pop();if((AS(d)||Bq(d)||Wq(d))&&o==null&&(o=d,i=o.children.map(h=>h.name).filter(h=>r.has(h))),r.add(d.name),n[d.name]==null&&u.indexOf(d.name)===-1&&c.indexOf(d.name)===-1){if(d.inputs.length===0){a.push(d.name);continue}d.inputs.forEach(h=>{l.has(h.name)||(l.add(h.name),p.push(h))})}}return{inputs:e,outputs:t,usedNodes:r,missingInputs:a,dynamicNode:o,syncInputs:i}}function Oq(e,t,n){let{usedNodes:s,inputs:r}=n,a=[],o=Object.keys(r).map(c=>$s(c)[0]).map(c=>e.nodes[c]),i=e.initNodes;o.forEach(c=>{s.has(c.name)&&a.push(c)}),e.weights.forEach(c=>{s.has(c.name)&&a.push(c)}),i!=null&&i.forEach(c=>{s.has(c.name)&&a.push(c)});let l=new Set,u=[];for(;a.length>0;){let c=a.pop();l.add(c.name),t[c.name]||u.push(c),c.children.forEach(p=>{!l.has(p.name)&&s.has(p.name)&&p.inputs.every(d=>l.has(d.name))&&a.push(p)})}return u}var Mq=["Switch","Merge","Enter","Exit","NextIteration","StatelessIf","StatelessWhile","if","While"],zq=["NonMaxSuppressionV2","NonMaxSuppressionV3","NonMaxSuppressionV5","Where"],Lq=["HashTable","HashTableV2","LookupTableImport","LookupTableImportV2","LookupTableFind","LookupTableFindV2","LookupTableSize","LookupTableSizeV2"];function AS(e){return Mq.indexOf(e.op)>=0}function Bq(e){return zq.indexOf(e.op)>=0}function Wq(e){return Lq.indexOf(e.op)>=0}var gy=class{constructor(e,t){this.graph=e,this.parent=t,this.compiledMap=new Map,this._weightMap={},this.SEPERATOR=",",this._functions={},this._functionExecutorMap={},this.intermediateTensors={},this.keepTensorForDebug=!1,this._outputs=e.outputs,this._inputs=e.inputs,this._initNodes=e.initNodes,this._signature=e.signature,this._functions=e.functions,e.functions!=null&&Object.keys(e.functions).forEach(n=>{this._functionExecutorMap[n]=new gy(e.functions[n],this)})}get weightIds(){return this.parent?this.parent.weightIds:this._weightIds}get functionExecutorMap(){return this.parent?this.parent.functionExecutorMap:this._functionExecutorMap}get weightMap(){return this.parent?this.parent.weightMap:this._weightMap}set weightMap(e){let t=Object.keys(e).map(n=>e[n].map(s=>s.id));this._weightIds=[].concat(...t),this._weightMap=e}set resourceManager(e){this._resourceManager=e}get inputs(){return this._inputs.map(e=>({name:e.name,shape:e.attrParams.shape?e.attrParams.shape.value:void 0,dtype:e.attrParams.dtype?e.attrParams.dtype.value:void 0}))}get outputs(){return this._outputs.map(e=>({name:e.name,shape:e.attrParams.shape?e.attrParams.shape.value:void 0,dtype:e.attrParams.dtype?e.attrParams.dtype.value:void 0}))}get inputNodes(){return this._inputs.map(e=>e.signatureKey||e.name)}get outputNodes(){return this._outputs.map(e=>{let t=e.signatureKey||e.name;return e.defaultOutput?`${t}:${e.defaultOutput}`:t})}get functions(){return Object.keys(this._functions).reduce((e,t)=>(e[t]=this._functions[t].signature,e),{})}getCompilationKey(e,t){let n=e.map(r=>r.name).sort(),s=t.map(r=>r.name).sort();return n.join(this.SEPERATOR)+"--"+s.join(this.SEPERATOR)}compile(e,t){let n=T7(e,t,this.weightMap,this._initNodes),{missingInputs:s,dynamicNode:r,syncInputs:a}=n;if(r!=null)throw new Error(`This execution contains the node '${r.name}', which has the dynamic op '${r.op}'. Please use model.executeAsync() instead. Alternatively, to avoid the dynamic ops, specify the inputs [${a}]`);if(s.length>0){let o=t.map(l=>l.name),i=Object.keys(e);throw new Error(`Cannot compute the outputs [${o}] from the provided inputs [${i}]. Missing the following inputs: [${s}]`)}return Oq(this.graph,this.weightMap,n)}execute(e,t){e=this.mapInputs(e);let n=Object.keys(e).sort();this.checkInputs(e),this.checkInputShapeAndType(e),t=this.mapOutputs(t),this.checkOutputs(t);let s=n.map(c=>this.graph.nodes[$s(c)[0]]),r=t.map(c=>$s(c)[0]),a=r.map(c=>this.graph.nodes[c]);this.resetIntermediateTensors(),a.length===0&&(a=this._outputs);let o=this.getCompilationKey(s,a),i=this.compiledMap.get(o);i==null&&(i=this.compile(e,a),this.compiledMap.set(o,i));let l={},u={};return Y(()=>{let c=new C7(this.weightMap,l,u,this.functionExecutorMap),p=Object.assign({},this.weightMap);Object.keys(e).forEach(f=>{let[m,g]=$s(f),y=[];y[g]=e[f],p[m]=y});let d=this.getFrozenTensorIds(p),h={};for(let f=0;fls(f,p,c))})}getFrozenTensorIds(e){let t=[].concat.apply([],Object.keys(e).map(n=>e[n]).map(n=>n.map(s=>s.id)));return new Set(t)}checkTensorForDisposal(e,t,n,s,r,a,o){t.category==="control"||a.indexOf(e)!==-1||(n[e].forEach(i=>{i!=null&&(o[i.id]=(o[i.id]||0)+t.children.length)}),t.inputs.forEach(i=>{if(i.category!=="control"){let l=Uj(i.name,n,s);l!=null&&l.forEach(u=>{if(u&&!u.kept&&!r.has(u.id)){let c=o[u.id];if(c===1){if(!this.keepTensorForDebug)u.dispose();else{let[p,d]=ta(t.name,s);this.intermediateTensors[p]?this.intermediateTensors[p][d]=u:(this.intermediateTensors[p]=[],this.intermediateTensors[p][d]=u)}delete o[u.id]}else c!=null&&o[u.id]--}})}}))}async executeAsync(e,t){return this._executeAsync(e,t)}disposeIntermediateTensors(){!this.intermediateTensors||(Object.keys(this.intermediateTensors).forEach(e=>this.intermediateTensors[e].forEach(t=>t.dispose())),this.disposeTensorsMap())}disposeTensorsMap(){!this.tensorsMap||Object.keys(this.tensorsMap).forEach(e=>{this.tensorsMap[e].forEach(n=>{n&&!n.kept&&!n.isDisposed&&!this.keepIds.has(n.id)&&n.dispose()})})}getIntermediateTensors(){return this.tensorsMap}resetIntermediateTensors(){for(let e in this.intermediateTensors)this.intermediateTensors[e].forEach(t=>t.dispose()),delete this.intermediateTensors[e]}async _executeAsync(e,t,n=!1,s={},r={}){n||(e=this.mapInputs(e),this.checkInputs(e),this.checkInputShapeAndType(e),t=this.mapOutputs(t),this.checkOutputs(t));try{this.keepTensorForDebug=H().getBool("KEEP_INTERMEDIATE_TENSORS")}catch(u){console.warn(u.message)}this.resetIntermediateTensors();let a=new C7(this.weightMap,s,r,this.functionExecutorMap);this.tensorsMap=await this.executeWithControlFlow(e,a,t,n);let o=t.map(u=>ls(u,this.tensorsMap,a)),i=o.map(u=>u.id),l=Object.keys(e).map(u=>e[u].id);return this.keepIds=new Set([...i,...l,...this.weightIds]),this.keepTensorForDebug||this.disposeTensorsMap(),this.parent==null&&a.dispose(this.keepIds),o}async executeFunctionAsync(e,t,n){let s=e.reduce((r,a,o)=>(r[this.inputs[o].name]=a,r),{});return this._executeAsync(s,this.outputNodes,!0,t,n)}async executeWithControlFlow(e,t,n,s){let r=Object.keys(e),a=r.map(x=>this.graph.nodes[$s(x)[0]]),o=n.map(x=>$s(x)[0]),i=o.map(x=>this.graph.nodes[x]);i.length===0&&(i=this._outputs);let{usedNodes:l,missingInputs:u,dynamicNode:c,syncInputs:p}=T7(e,i,this.weightMap,this._initNodes),d=[...a,...this.graph.weights,...this._initNodes||[]].map(x=>({node:x,contexts:t.currentContext})),h=Object.assign({},this.weightMap);Object.keys(e).forEach(x=>{let[A,b]=$s(x),w=[];w[b]=e[x],h[A]=w});let f={},m=this.getFrozenTensorIds(h),g={};for(;d.length>0;){let x=this.processStack(a,d,t,h,g,m,o,f,l);await Promise.all(x)}c==null&&!s&&console.warn("This model execution did not contain any nodes with control flow or dynamic output shapes. You can use model.execute() instead.");let y=i.filter(x=>!AS(x)&&!ls(x.name,h,t)).map(x=>x.name);if(y.length>0){let x="";throw c!=null&&(x=`Alternatively, to avoid the dynamic ops, use model.execute() and specify the inputs [${p}]`),new Error(`Cannot compute the outputs [${y}] from the provided inputs [${r}]. Consider providing the following inputs: [${u}]. ${x}`)}return h}processStack(e,t,n,s,r,a,o,i,l){let u=[];for(;t.length>0;){let c=t.pop();n.currentContext=c.contexts;let p="";if(c.node.op==="Enter"&&I("isConstant",c.node,s,n)&&([p]=ta(c.node.name,n)),s[c.node.name]==null){let d=I7(c.node,s,n,this._resourceManager);p||([p]=ta(c.node.name,n));let h=n.currentContext;v.isPromise(d)?u.push(d.then(f=>(s[p]=f,n.currentContext=h,this.checkTensorForDisposal(p,c.node,s,n,a,o,i),this.processChildNodes(c.node,t,n,s,r,l),f))):(s[p]=d,this.checkTensorForDisposal(p,c.node,s,n,a,o,i),this.processChildNodes(c.node,t,n,s,r,l))}else this.processChildNodes(c.node,t,n,s,r,l)}return u}processChildNodes(e,t,n,s,r,a){e.children.forEach(o=>{let[i]=ta(o.name,n);r[i]||!a.has(o.name)||(o.op==="Merge"?o.inputNames.some(l=>!!ls(l,s,n))&&(r[i]=!0,t.push({contexts:n.currentContext,node:o})):o.inputNames.every(l=>!!ls(l,s,n))&&(r[i]=!0,t.push({contexts:n.currentContext,node:o})))})}dispose(){Object.keys(this.weightMap).forEach(e=>this.weightMap[e].forEach(t=>t.dispose()))}checkInputShapeAndType(e){Object.keys(e).forEach(t=>{let n=e[t],[s]=$s(t),r=this.graph.nodes[s];if(r.attrParams.shape&&r.attrParams.shape.value){let a=r.attrParams.shape.value,o=a.length===n.shape.length&&n.shape.every((i,l)=>a[l]===-1||a[l]===i);v.assert(o,()=>`The shape of dict['${r.name}'] provided in model.execute(dict) must be [${a}], but was [${n.shape}]`)}r.attrParams.dtype&&r.attrParams.dtype.value&&v.assert(n.dtype===r.attrParams.dtype.value,()=>`The dtype of dict['${r.name}'] provided in model.execute(dict) must be ${r.attrParams.dtype.value}, but was ${n.dtype}`)})}mapInputs(e){let t={};for(let n in e)if(this._signature!=null&&this._signature.inputs!=null&&this._signature.inputs[n]!=null){let s=this._signature.inputs[n];t[s.name]=e[n]}else t[n]=e[n];return t}checkInputs(e){let t=Object.keys(e).filter(n=>{let[s]=$s(n);return this.graph.nodes[s]==null});if(t.length>0)throw new Error(`The dict provided in model.execute(dict) has keys: [${t}] that are not part of graph`)}mapOutputs(e){return e.map(t=>this._signature!=null&&this._signature.outputs!=null&&this._signature.outputs[t]!=null?this._signature.outputs[t].name:t,{})}checkOutputs(e){e.forEach(t=>{let[n]=$s(t);if(!this.graph.nodes[n])throw new Error(`The output '${t}' is not found in the graph`)})}},Vq=class{constructor(e={},t={}){this.hashTableNameToHandle=e,this.hashTableMap=t}addHashTable(e,t){this.hashTableNameToHandle[e]=t.handle,this.hashTableMap[t.id]=t}getHashTableHandleByName(e){return this.hashTableNameToHandle[e]}getHashTableById(e){return this.hashTableMap[e]}dispose(){for(let e in this.hashTableMap)this.hashTableMap[e].clearAndClose(),delete this.hashTableMap[e];for(let e in this.hashTableNameToHandle)this.hashTableNameToHandle[e].dispose(),delete this.hashTableNameToHandle[e]}},Uq="?tfjs-format=file",Gq="model.json",Vh=class{constructor(e,t={},n=Fs){this.modelUrl=e,this.loadOptions=t,this.version="n/a",this.io=n,t==null&&(this.loadOptions={}),this.resourceManager=new Vq}get modelVersion(){return this.version}get inputNodes(){return this.executor.inputNodes}get outputNodes(){return this.executor.outputNodes}get inputs(){return this.executor.inputs}get outputs(){return this.executor.outputs}get weights(){return this.executor.weightMap}get metadata(){return this.artifacts.userDefinedMetadata}get modelSignature(){return this.signature}get modelStructuredOutputKeys(){return this.structuredOutputKeys}findIOHandler(){let e=this.modelUrl;if(e.load!=null)this.handler=e;else if(this.loadOptions.requestInit!=null)this.handler=this.io.browserHTTPRequest(e,this.loadOptions);else{let t=this.io.getLoadHandlers(e,this.loadOptions);if(t.length===0)t.push(this.io.browserHTTPRequest(e,this.loadOptions));else if(t.length>1)throw new Error(`Found more than one (${t.length}) load handlers for URL '${[e]}'`);this.handler=t[0]}}load(){if(this.findIOHandler(),this.handler.load==null)throw new Error("Cannot proceed with model loading because the IOHandler provided does not have the `load` method implemented.");let e=this.handler.load();return v.isPromise(e)?e.then(t=>this.loadSync(t)):this.loadSync(e)}loadSync(e){this.artifacts=e;let t=this.artifacts.modelTopology,n=this.artifacts.signature;if(this.artifacts.userDefinedMetadata!=null){let r=this.artifacts.userDefinedMetadata;r.signature!=null&&(n=r.signature),r.structuredOutputKeys!=null&&(this.structuredOutputKeys=r.structuredOutputKeys)}this.signature=n,this.version=`${t.versions.producer}.${t.versions.minConsumer}`;let s=this.io.decodeWeights(this.artifacts.weightData,this.artifacts.weightSpecs);if(this.executor=new gy(v7.Instance.transformGraph(t,this.signature)),this.executor.weightMap=this.convertTensorMapToTensorsMap(s),this.executor.resourceManager=this.resourceManager,e.modelInitializer!=null&&e.modelInitializer.node!=null){let r=v7.Instance.transformGraph(e.modelInitializer);this.initializer=new gy(r),this.initializer.weightMap=this.executor.weightMap,this.initializer.resourceManager=this.resourceManager,this.initializer.executeAsync({},[])}return!0}async save(e,t){if(typeof e=="string"){let n=this.io.getSaveHandlers(e);if(n.length===0)throw new Error(`Cannot find any save handlers for URL '${e}'`);if(n.length>1)throw new Error(`Found more than one (${n.length}) save handlers for URL '${e}'`);e=n[0]}if(e.save==null)throw new Error("GraphModel.save() cannot proceed because the IOHandler provided does not have the `save` attribute defined.");return e.save(this.artifacts)}predict(e,t){let n=this.execute(e,this.outputNodes);if(this.structuredOutputKeys){let s=n instanceof it?[n]:n,r={};return s.forEach((a,o)=>r[this.structuredOutputKeys[o]]=a),r}return n}normalizeInputs(e){if(!(e instanceof it)&&!Array.isArray(e))return e;if(e=Array.isArray(e)?e:[e],e.length!==this.inputNodes.length)throw new Error(`Input tensor count mismatch,the graph model has ${this.inputNodes.length} placeholders, while there are ${e.length} input tensors.`);return this.inputNodes.reduce((t,n,s)=>(t[n]=e[s],t),{})}normalizeOutputs(e){return e=e||this.outputNodes,Array.isArray(e)?e:[e]}execute(e,t){e=this.normalizeInputs(e),t=this.normalizeOutputs(t);let n=this.executor.execute(e,t);return n.length>1?n:n[0]}async executeAsync(e,t){e=this.normalizeInputs(e),t=this.normalizeOutputs(t);let n=await this.executor.executeAsync(e,t);return n.length>1?n:n[0]}getIntermediateTensors(){return this.executor.getIntermediateTensors()}disposeIntermediateTensors(){this.executor.disposeIntermediateTensors()}convertTensorMapToTensorsMap(e){return Object.keys(e).reduce((t,n)=>(t[n]=[e[n]],t),{})}dispose(){this.executor.dispose(),this.initializer&&this.initializer.dispose(),this.resourceManager.dispose()}};async function Lx(e,t={},n=Fs){if(e==null)throw new Error("modelUrl in loadGraphModel() cannot be null. Please provide a url or an IOHandler that loads the model");t==null&&(t={}),t.fromTFHub&&typeof e=="string"&&(e=jq(e));let s=new Vh(e,t,n);return await s.load(),s}function Hq(e){if(e==null)throw new Error("modelUrl in loadGraphModelSync() cannot be null. Please provide a url or an IOHandler that loads the model");if(!e.load)throw new Error(`modelUrl IO Handler ${e} has no load function`);let t=new Vh(e);return t.load(),t}function jq(e){return e.endsWith("/")||(e=e+"/"),`${e}${Gq}${Uq}`}var qq="3.20.0",xS={};qe(xS,{CSVDataset:()=>NS,Dataset:()=>cd,FileDataSource:()=>FS,TextLineDataset:()=>TS,URLDataSource:()=>OS,array:()=>gX,csv:()=>TX,func:()=>NX,generator:()=>EX,microphone:()=>_X,version_data:()=>DX,webcam:()=>RX,zip:()=>yX});var Xq=yo(Qm()),Kq=yo(Qm());function Zq(e,t){return Wm(e,t)}function Wm(e,t,n=new Map,s=new Set){if(e==null)return null;if(typeof Blob=="function"&&e instanceof Blob)return e.slice();if(s.has(e))throw new Error("Circular references are not supported.");if(n.has(e))return n.get(e);let r=t(e);if(r.recurse&&r.value!==null)throw new Error("A deep map function may not return both a value and recurse=true.");if(r.recurse)if(vc(e)){let a=Array.isArray(e)?[]:{};s.add(e);for(let o in e){let i=e[o],l=Wm(i,t,n,s);a[o]=l}return s.delete(e),e.__proto__&&(a.__proto__=e.__proto__),a}else throw new Error(`Can't recurse into non-iterable type: ${e}`);else return n.set(e,r.value),r.value}function Yq(e,t=vS){return bS(e,t)}function bS(e,t,n=new Set){let s=e[0];if(n.has(s))throw new Error("Circular references are not supported.");let r=t(e);if(r.recurse&&r.value!==null)throw new Error("A deep zip function may not return both a value and recurse=true.");if(r.recurse)if(vc(s)){let a=Array.isArray(s)?[]:{};n.add(s);for(let o in s){let i=e.map(u=>u[o]),l=bS(i,t,n);a[o]=l}return n.delete(s),a}else throw new Error(`Can't recurse into non-iterable type: ${s}`);else return r.value}function vS(e){return e===null?null:vc(e[0])?{value:null,recurse:!0}:{value:e,recurse:!1}}async function wS(e,t){let n=new Map;Wm(e,t,n);for(let r of Array.from(n.keys())){let a=n.get(r);if(v.isPromise(a)){let o=await a;n.set(r,o)}}return Wm(e,t,n)}function vc(e){let t=!1;if(H().get("IS_BROWSER"))t=e instanceof TextDecoder;else{let{StringDecoder:n}=v6();t=e instanceof n}return e!=null&&!ArrayBuffer.isView(e)&&(Array.isArray(e)||typeof e=="object"&&!(e instanceof it)&&!(e instanceof Promise)&&!t)}function Jq(e){return e==null||Qq(e)||Array.isArray(e)||typeof e=="object"&&e instanceof it||v.isTypedArray(e)}function Qq(e){return e===null||typeof e!="object"&&typeof e!="function"}function eX(e){return Zq(e,tX)}function tX(e){return e instanceof it?{value:e.clone(),recurse:!1}:vc(e)?{value:null,recurse:!0}:{value:e,recurse:!1}}var kS=class{constructor(e){if(this.capacity=e,this.begin=0,this.end=0,e==null)throw new RangeError("Can't create a ring buffer of unknown capacity.");if(e<1)throw new RangeError("Can't create ring buffer of capacity < 1.");this.data=new Array(e),this.doubledCapacity=2*e}wrap(e){for(;e<0;)e+=this.doubledCapacity;return e%this.doubledCapacity}get(e){if(e<0)throw new RangeError("Can't get item at a negative index.");return this.data[e%this.capacity]}set(e,t){if(e<0)throw new RangeError("Can't set item at a negative index.");this.data[e%this.capacity]=t}length(){let e=this.end-this.begin;return e<0&&(e=this.doubledCapacity+e),e}isFull(){return this.length()===this.capacity}isEmpty(){return this.length()===0}push(e){if(this.isFull())throw new RangeError("Ring buffer is full.");this.set(this.end,e),this.end=this.wrap(this.end+1)}pushAll(e){for(let t of e)this.push(t)}pop(){if(this.isEmpty())throw new RangeError("Ring buffer is empty.");this.end=this.wrap(this.end-1);let e=this.get(this.end);return this.set(this.end,void 0),e}unshift(e){if(this.isFull())throw new RangeError("Ring buffer is full.");this.begin=this.wrap(this.begin-1),this.set(this.begin,e)}shift(){if(this.isEmpty())throw new RangeError("Ring buffer is empty.");let e=this.get(this.begin);return this.set(this.begin,void 0),this.begin=this.wrap(this.begin+1),e}shuffleExcise(e){if(this.isEmpty())throw new RangeError("Ring buffer is empty.");let t=this.wrap(this.begin+e),n=this.get(t);return this.set(t,this.pop()),n}},Bx=class extends kS{constructor(){super(Bx.INITIAL_CAPACITY)}isFull(){return!1}push(e){super.isFull()&&this.expand(),super.push(e)}unshift(e){super.isFull()&&this.expand(),super.unshift(e)}expand(){let e=this.capacity*2,t=new Array(e),n=this.length();for(let s=0;st===!0)}rowMajorBatch(e,t=!0){return new uX(this,e,t)}columnMajorBatch(e,t=!0,n=vS){return this.rowMajorBatch(e,t).map(r=>Yq(r,n))}concatenate(e,t){return new IS(SS([this,e]),t)}take(e){return e<0||e==null?this:new lX(this,e)}skip(e){return e<0||e==null?this:new iX(this,e)}prefetch(e){return new CS(this,e)}shuffle(e,t){return new mX(this,e,t)}serial(){return new oX(this)}},rX=class extends En{constructor(e){super(),this.items=e,this.trav=0}summary(){return`Array of ${this.items.length} items`}async next(){if(this.trav>=this.items.length)return{value:null,done:!0};let e=this.items[this.trav];return this.trav++,{value:eX(e),done:!1}}},aX=class extends En{constructor(e){super(),this.nextFn=e}summary(){return"Function call"}async next(){try{return this.nextFn()}catch(e){throw e.message=`Error thrown while iterating through a dataset: ${e.message}`,e}}},oX=class extends En{constructor(e){super(),this.upstream=e,this.lastRead=Promise.resolve({value:null,done:!1})}summary(){return`${this.upstream.summary()} -> Serial`}async next(){return this.lastRead=this.lastRead.then(()=>this.serialNext()),this.lastRead}async serialNext(){return this.upstream.next()}},iX=class extends En{constructor(e,t){super(),this.upstream=e,this.maxCount=t,this.count=0,this.lastRead=Promise.resolve({value:null,done:!1})}summary(){return`${this.upstream.summary()} -> Skip`}async next(){return this.lastRead=this.lastRead.then(()=>this.serialNext()),this.lastRead}async serialNext(){for(;this.count++ Take`}async next(){return this.count++>=this.maxCount?{value:null,done:!0}:this.upstream.next()}},uX=class extends En{constructor(e,t,n=!0){super(),this.upstream=e,this.batchSize=t,this.enableSmallLastBatch=n,this.lastRead=Promise.resolve({value:null,done:!1})}summary(){return`${this.upstream.summary()} -> RowMajorBatch`}async next(){return this.lastRead=this.lastRead.then(()=>this.serialNext()),this.lastRead}async serialNext(){let e=[];for(;e.length0?{value:e,done:!1}:{value:null,done:!0};e.push(t.value)}return{value:e,done:!1}}},cX=class extends En{constructor(e,t){super(),this.upstream=e,this.predicate=t,this.lastRead=Promise.resolve({value:null,done:!1})}summary(){return`${this.upstream.summary()} -> Filter`}async next(){return this.lastRead=this.lastRead.then(()=>this.serialNext()),this.lastRead}async serialNext(){for(;;){let e=await this.upstream.next();if(e.done||this.predicate(e.value))return e;Q(e.value)}}},dX=class extends En{constructor(e,t){super(),this.upstream=e,this.transform=t}summary(){return`${this.upstream.summary()} -> Map`}async next(){let e=await this.upstream.next();if(e.done)return{value:null,done:!0};let t=zr.getTensorsInContainer(e.value),n=this.transform(e.value),s=zr.getTensorsInContainer(n);for(let r of t)zr.isTensorInList(r,s)||r.dispose();return{value:n,done:!1}}},pX=class extends En{constructor(e,t){super(),this.upstream=e,this.handler=t,this.count=0,this.lastRead=Promise.resolve({value:null,done:!1})}summary(){return`${this.upstream.summary()} -> handleErrors`}async next(){return this.lastRead=this.lastRead.then(()=>this.serialNext()),this.lastRead}async serialNext(){for(;;)try{return await this.upstream.next()}catch(e){if(!this.handler(e))return{value:null,done:!0}}}},N7=class extends En{constructor(e,t){super(),this.upstream=e,this.transform=t}summary(){return`${this.upstream.summary()} -> AsyncMap`}async next(){let e=await this.upstream.next();if(e.done)return{value:null,done:!0};let t=zr.getTensorsInContainer(e.value),n=await this.transform(e.value),s=zr.getTensorsInContainer(n);for(let r of t)zr.isTensorInList(r,s)||r.dispose();return{value:n,done:!1}}},Vx=class extends En{constructor(){super(),this.outputQueue=new Bx,this.lastRead=Promise.resolve({value:null,done:!1})}async next(){return this.lastRead=this.lastRead.then(()=>this.serialNext()),this.lastRead}async serialNext(){for(;this.outputQueue.length()===0;)if(!await this.pump())return{value:null,done:!0};return{value:this.outputQueue.shift(),done:!1}}},hX=class extends Vx{constructor(e,t){super(),this.upstream=e,this.transform=t}summary(){return`${this.upstream.summary()} -> Flatmap`}async pump(){let e=await this.upstream.next();if(e.done)return!1;let t=zr.getTensorsInContainer(e.value),n=this.transform(e.value),s=zr.getTensorsInContainer(n);this.outputQueue.pushAll(n);for(let r of t)zr.isTensorInList(r,s)||r.dispose();return!0}},IS=class extends En{constructor(e,t){super(),this.baseErrorHandler=t,this.lastRead=null,this.iterator=null,this.moreIterators=e}summary(){return"TODO: fill in upstream of chained summaries -> Chained"}async next(){return this.lastRead=this.readFromChain(this.lastRead),this.lastRead}async readFromChain(e){if(await e,this.iterator==null){let n=await this.moreIterators.next();if(n.done)return{value:null,done:!0};this.iterator=n.value,this.baseErrorHandler!=null&&(this.iterator=this.iterator.handleErrors(this.baseErrorHandler))}let t=await this.iterator.next();return t.done?(this.iterator=null,this.readFromChain(e)):t}},eo;(function(e){e[e.FAIL=0]="FAIL",e[e.SHORTEST=1]="SHORTEST",e[e.LONGEST=2]="LONGEST"})(eo||(eo={}));var fX=class extends En{constructor(e,t=eo.FAIL){super(),this.iterators=e,this.mismatchMode=t,this.count=0,this.currentPromise=null}summary(){return"{TODO: fill in upstream of zip summaries} -> Zip"}async nextState(e){await e;let t=0,n=0;function s(a){return a instanceof En?{value:a.next().then(i=>(t++,i.done&&n++,i.value)),recurse:!1}:{value:null,recurse:!0}}let r=await wS(this.iterators,s);if(t===n)return{value:null,done:!0};if(n>0)switch(this.mismatchMode){case eo.FAIL:throw new Error(`Zipped streams should have the same length. Mismatched at element ${this.count}.`);case eo.SHORTEST:return{value:null,done:!0};case eo.LONGEST:default:}return this.count++,{value:r,done:!1}}async next(){return this.currentPromise=this.nextState(this.currentPromise),this.currentPromise}},CS=class extends En{constructor(e,t){super(),this.upstream=e,this.bufferSize=t,this.buffer=new kS(t)}summary(){return`${this.upstream.summary()} -> Prefetch`}refill(){for(;!this.buffer.isFull();){let e=this.upstream.next();this.buffer.push(e)}}next(){return this.refill(),this.buffer.shift()}},mX=class extends CS{constructor(e,t,n){super(e,t),this.upstream=e,this.windowSize=t,this.upstreamExhausted=!1,this.random=Kq.alea(n||v.now().toString()),this.lastRead=Promise.resolve({value:null,done:!1})}async next(){return this.lastRead=this.lastRead.then(()=>this.serialNext()),this.lastRead}randomInt(e){return Math.floor(this.random()*e)}chooseIndex(){return this.randomInt(this.buffer.length())}async serialNext(){for(this.upstreamExhausted||this.refill();!this.buffer.isEmpty();){let e=this.chooseIndex(),t=await this.buffer.shuffleExcise(e);if(t.done)this.upstreamExhausted=!0;else return this.refill(),t}return{value:null,done:!0}}},cd=class{constructor(){this.size=null}batch(e,t=!0){let n=this;v.assert(e>0,()=>`batchSize needs to be positive, but it is - ${e}`);let s;return this.size===1/0||this.size==null?s=this.size:t?s=Math.ceil(this.size/e):s=Math.floor(this.size/e),Ds(async()=>(await n.iterator()).columnMajorBatch(e,t,AX),s)}concatenate(e){let t=this,n;return this.size===1/0||e.size===1/0?n=1/0:this.size!=null&&e.size!=null?n=this.size+e.size:n=null,Ds(async()=>(await t.iterator()).concatenate(await e.iterator()),n)}filter(e){let t=this,n;return this.size===1/0?n=1/0:n=null,Ds(async()=>(await t.iterator()).filter(s=>Y(()=>e(s))),n)}async forEachAsync(e){return(await this.iterator()).forEachAsync(e)}map(e){let t=this;return Ds(async()=>(await t.iterator()).map(n=>Y(()=>e(n))),this.size)}mapAsync(e){let t=this;return Ds(async()=>(await t.iterator()).mapAsync(e),this.size)}prefetch(e){if(e==null)throw new RangeError("`Dataset.prefetch()` requires bufferSize to be specified.");let t=this;return Ds(async()=>(await t.iterator()).prefetch(e),this.size)}repeat(e){let t=this,n;return this.size!=null&&e>0?n=this.size*e:e===0?n=0:this.size!=null&&(e===void 0||e<0)?n=1/0:n=null,Ds(async()=>{let s=Wx(async()=>({value:await t.iterator(),done:!1}));return nX(s.take(e))},n)}skip(e){let t=this,n;return this.size!=null&&e>=0&&this.size>=e?n=this.size-e:this.size!=null&&(this.size(await t.iterator()).skip(e),n)}shuffle(e,t,n=!0){if(e==null||e<0)throw this.size==null?new RangeError("`Dataset.shuffle()` requires bufferSize to be specified."):new RangeError(`\`Dataset.shuffle()\` requires bufferSize to be specified. If your data fits in main memory (for regular JS objects), and/or GPU memory (for \`tf.Tensor\`s), consider setting bufferSize to the dataset size (${this.size} elements)`);let s=this,r=Xq.alea(t||v.now().toString());return Ds(async()=>{let a=r.int32();return n&&(a+=r.int32()),(await s.iterator()).shuffle(e,a.toString())},this.size)}take(e){let t=this,n;return this.size!=null&&this.size>e?n=e:this.size!=null&&this.size<=e?n=this.size:n=null,Ds(async()=>(await t.iterator()).take(e),n)}async toArray(){if(this.size===1/0)throw new Error("Can not convert infinite data stream to array.");return(await this.iterator()).toArray()}async toArrayForTest(){if(this.size===1/0)throw new Error("Can not convert infinite data stream to array.");return(await this.iterator()).toArrayForTest()}};cd.MAX_BUFFER_SIZE=1e4;function Ds(e,t=null){return new class extends cd{constructor(){super(...arguments),this.size=t}async iterator(){return e()}}}function gX(e){return Ds(async()=>SS(e),e.length)}function yX(e){if(!vc(e))throw new Error("The argument to zip() must be an object or array.");let t;if(Array.isArray(e))for(let n=0;n{let n=await wS(e,s=>{if(s instanceof cd)return{value:s.iterator(),recurse:!1};if(vc(s))return{value:null,recurse:!0};throw new Error("Leaves of the structure passed to zip() must be Datasets, not primitives.")});return sX(n,eo.SHORTEST)},t)}function AX(e){if(e===null)return null;let t=e[0];return Jq(t)?{value:xX(e),recurse:!1}:{value:null,recurse:!0}}function xX(e){if(e.length===0)throw new Error("Can't make a batch of zero elements.");return e[0]instanceof it?un(e):Xe(e)}var TS=class extends cd{constructor(e){super(),this.input=e}async iterator(){return(await this.input.iterator()).decodeUTF8().split(` -`).map(s=>(s.endsWith("\r")&&(s=s.slice(0,-1)),s))}},sm='"',ip=Symbol("out"),E7=Symbol("field"),rm=Symbol("quote"),N3=Symbol("quoteafterquote"),R7=Symbol("quoteinquote"),NS=class extends cd{constructor(e,t){super(),this.input=e,this.hasHeader=!0,this.fullColumnNames=null,this.columnNamesValidated=!1,this.columnConfigs=null,this.configuredColumnsOnly=!1,this.delimiter=",",this.delimWhitespace=!1,this.base=new TS(e),t||(t={}),this.hasHeader=t.hasHeader!==!1,this.fullColumnNames=t.columnNames,this.columnConfigs=t.columnConfigs,this.configuredColumnsOnly=t.configuredColumnsOnly,t.delimWhitespace?(v.assert(t.delimiter==null,()=>"Delimiter should not be provided when delimWhitespace is true."),this.delimWhitespace=!0,this.delimiter=" "):this.delimiter=t.delimiter?t.delimiter:","}async columnNames(){return this.columnNamesValidated||await this.setColumnNames(),this.configuredColumnsOnly?Object.keys(this.columnConfigs):this.fullColumnNames}async setColumnNames(){let e=await this.maybeReadHeaderLine();if(!this.fullColumnNames&&!e)throw new Error("Column names must be provided if there is no header line.");this.fullColumnNames&&e&&v.assert(e.length===this.fullColumnNames.length,()=>"The length of provided columnNames ("+this.fullColumnNames.length.toString()+") does not match the length of the header line read from file ("+e.length.toString()+")."),this.fullColumnNames||(this.fullColumnNames=e);let t=this.fullColumnNames.reduce((s,r)=>(s[r]=s[r]+1||1,s),{}),n=Object.keys(t).filter(s=>t[s]>1);if(v.assert(n.length===0,()=>"Duplicate column names found: "+n.toString()),this.columnConfigs){for(let s of Object.keys(this.columnConfigs))if(this.fullColumnNames.indexOf(s)===-1)throw new Error('The key "'+s+'" provided in columnConfigs does not match any of the column names ('+this.fullColumnNames.toString()+").")}this.columnNamesValidated=!0}async maybeReadHeaderLine(){if(this.hasHeader){let t=await(await this.base.iterator()).next();if(t.done)throw new Error("No data was found for CSV parsing.");let n=t.value;return this.parseRow(n,!1)}else return null}async iterator(){this.columnNamesValidated||await this.setColumnNames();let e=await this.base.iterator();return this.hasHeader&&(e=e.skip(1)),e.map(t=>this.makeDataElement(t))}makeDataElement(e){let t=this.parseRow(e),n={},s={};for(let r=0;r14||!Number.isInteger(t))throw new Error(`Invalid fftSize: it must be a power of 2 between 2 to 4 and 2 to 14, but got ${this.fftSize}`);if(this.numFrames=e.numFramesPerSpectrogram||43,this.sampleRateHz=e.sampleRateHz,this.columnTruncateLength=e.columnTruncateLength||this.fftSize,this.audioTrackConstraints=e.audioTrackConstraints,this.smoothingTimeConstant=e.smoothingTimeConstant||0,this.includeSpectrogram=e.includeSpectrogram!==!1,this.includeWaveform=e.includeWaveform===!0,!this.includeSpectrogram&&!this.includeWaveform)throw new Error("Both includeSpectrogram and includeWaveform are false. At least one type of data should be returned.")}summary(){return"microphone"}static async create(e={}){if(!H().get("IS_BROWSER"))throw new Error("microphone API is only supported in browser environment.");let t=new ES(e);return await t.start(),t}async start(){try{this.stream=await navigator.mediaDevices.getUserMedia({audio:this.audioTrackConstraints==null?!0:this.audioTrackConstraints,video:!1})}catch(n){throw new Error(`Error thrown while initializing video stream: ${n.message}`)}if(!this.stream)throw new Error("Could not obtain audio from microphone.");let e=window.AudioContext||window.webkitAudioContext;if(this.audioContext=new e,!this.sampleRateHz)this.sampleRateHz=this.audioContext.sampleRate;else if(this.audioContext.sampleRate!==this.sampleRateHz)throw new Error(`Mismatch in sampling rate: Expected: ${this.sampleRateHz}; Actual: ${this.audioContext.sampleRate}`);let t=this.audioContext.createMediaStreamSource(this.stream);this.analyser=this.audioContext.createAnalyser(),this.analyser.fftSize=this.fftSize*2,this.analyser.smoothingTimeConstant=this.smoothingTimeConstant,t.connect(this.analyser),this.freqData=new Float32Array(this.fftSize),this.timeData=new Float32Array(this.fftSize)}async next(){if(this.isClosed)return{value:null,done:!0};let e,t,n=await this.getAudioData();if(this.includeSpectrogram){let s=this.flattenQueue(n.freqDataQueue);e=this.getTensorFromAudioDataArray(s,[this.numFrames,this.columnTruncateLength,1])}if(this.includeWaveform){let s=this.flattenQueue(n.timeDataQueue);t=this.getTensorFromAudioDataArray(s,[this.numFrames*this.fftSize,1])}return{value:{spectrogram:e,waveform:t},done:!1}}async capture(){return(await this.next()).value}async getAudioData(){let e=[],t=[],n=0;return new Promise(s=>{let r=setInterval(()=>{this.includeSpectrogram&&(this.analyser.getFloatFrequencyData(this.freqData),this.freqData[0]===-1/0&&s({freqDataQueue:e,timeDataQueue:t}),e.push(this.freqData.slice(0,this.columnTruncateLength))),this.includeWaveform&&(this.analyser.getFloatTimeDomainData(this.timeData),t.push(this.timeData.slice())),++n===this.numFrames&&(clearInterval(r),s({freqDataQueue:e,timeDataQueue:t}))},this.fftSize/this.sampleRateHz*1e3)})}stop(){this.isClosed||(this.isClosed=!0,this.analyser.disconnect(),this.audioContext.close(),this.stream!=null&&this.stream.getTracks().length>0&&this.stream.getTracks()[0].stop())}toArray(){throw new Error("Can not convert infinite audio stream to array.")}getSampleRate(){return this.sampleRateHz}flattenQueue(e){let t=e[0].length,n=new Float32Array(e.length*t);return e.forEach((s,r)=>n.set(s,r*t)),n}getTensorFromAudioDataArray(e,t){let n=new Float32Array(v.sizeFromShape(t));return n.set(e,n.length-e.length),Xe(n,t)}},RS=class extends En{constructor(e,t){if(super(),this.webcamVideoElement=e,this.webcamConfig=t,this.isClosed=!0,this.resize=!1,this.needToResize())if(this.resize=!0,this.cropSize=[this.webcamConfig.resizeHeight,this.webcamConfig.resizeWidth],this.cropBoxInd=Ot([0],"int32"),this.webcamConfig.centerCrop){let n=this.webcamConfig.resizeWidth*1/this.webcamVideoElement.width,s=this.webcamConfig.resizeHeight*1/this.webcamVideoElement.height,r=(1-n)/2,a=(1-s)/2,o=r+n,i=s+a;this.cropBox=mr([a,r,i,o],[1,4])}else this.cropBox=mr([0,0,1,1],[1,4])}summary(){return"webcam"}static async create(e,t={}){if(!H().get("IS_BROWSER"))throw new Error("tf.data.webcam is only supported in browser environment.");if(!e){if(e=document.createElement("video"),!t.resizeWidth||!t.resizeHeight)throw new Error("Please provide webcam video element, or resizeWidth and resizeHeight to create a hidden video element.");e.width=t.resizeWidth,e.height=t.resizeHeight}let n=new RS(e,t);return await n.start(),n}async start(){this.webcamConfig.facingMode&&v.assert(this.webcamConfig.facingMode==="user"||this.webcamConfig.facingMode==="environment",()=>`Invalid webcam facing mode: ${this.webcamConfig.facingMode}. Please provide 'user' or 'environment'`);try{this.stream=await navigator.mediaDevices.getUserMedia({video:{deviceId:this.webcamConfig.deviceId,facingMode:this.webcamConfig.facingMode?this.webcamConfig.facingMode:"user",width:this.webcamVideoElement.width,height:this.webcamVideoElement.height}})}catch(e){throw e.message=`Error thrown while initializing video stream: ${e.message}`,e}if(!this.stream)throw new Error("Could not obtain video from webcam.");try{this.webcamVideoElement.srcObject=this.stream}catch(e){console.log(e),this.webcamVideoElement.src=window.URL.createObjectURL(this.stream)}return this.webcamVideoElement.play(),this.isClosed=!1,new Promise(e=>{this.webcamVideoElement.onloadedmetadata=()=>{e()}})}async next(){if(this.isClosed)return{value:null,done:!0};let e;try{e=la.fromPixels(this.webcamVideoElement)}catch(t){throw new Error(`Error thrown converting video to pixels: ${JSON.stringify(t)}`)}if(this.resize)try{return{value:this.cropAndResizeFrame(e),done:!1}}catch(t){throw new Error(`Error thrown cropping the video: ${t.message}`)}finally{e.dispose()}else return{value:e,done:!1}}needToResize(){return!!(this.webcamConfig.resizeWidth&&this.webcamConfig.resizeHeight&&(this.webcamVideoElement.width!==this.webcamConfig.resizeWidth||this.webcamVideoElement.height!==this.webcamConfig.resizeHeight))}cropAndResizeFrame(e){return Y(()=>{let t=Ft(ge(e,"float32"),0),n;n=Ce.cropAndResize(t,this.cropBox,this.cropBoxInd,this.cropSize,"bilinear");let s=n.shape;return V(n,s.slice(1))})}async capture(){return(await this.next()).value}stop(){this.stream.getTracks().forEach(t=>t.stop());try{this.webcamVideoElement.srcObject=null}catch(t){console.log(t),this.webcamVideoElement.src=null}this.isClosed=!0}toArray(){throw new Error("Can not convert infinite video stream to array.")}},_S=class{},DS=class extends En{split(e){return new bX(this,e)}},bX=class extends DS{constructor(e,t){super(),this.upstream=e,this.impl=new vX(e,t)}summary(){return this.impl.summary()}async next(){return this.impl.next()}},vX=class extends Vx{constructor(e,t){super(),this.upstream=e,this.separator=t,this.carryover=""}summary(){return`${this.upstream.summary()} -> Split('${this.separator}')`}async pump(){let e=await this.upstream.next();if(e.done)return this.carryover===""?!1:(this.outputQueue.push(this.carryover),this.carryover="",!0);let t=e.value.split(this.separator);t[0]=this.carryover+t[0];for(let n of t.slice(0,-1))this.outputQueue.push(n);return this.carryover=t[t.length-1],!0}},wX=class extends En{decodeUTF8(){return new kX(this)}},kX=class extends DS{constructor(e){super(),this.upstream=e,this.impl=new SX(e)}summary(){return this.impl.summary()}async next(){return this.impl.next()}},SX=class extends Vx{constructor(e){if(super(),this.upstream=e,H().get("IS_BROWSER"))this.decoder=new TextDecoder("utf-8");else{let{StringDecoder:t}=v6();this.decoder=new t("utf8")}}summary(){return`${this.upstream.summary()} -> Utf8`}async pump(){let e=await this.upstream.next(),t;if(e.done)return!1;t=e.value;let n;return H().get("IS_BROWSER")?n=this.decoder.decode(t,{stream:!0}):n=this.decoder.write(Buffer.from(t.buffer)),this.outputQueue.push(n),!0}},$S=class extends wX{constructor(e,t={}){super(),this.file=e,this.options=t,v.assert(e instanceof Uint8Array||(H().get("IS_BROWSER")?e instanceof File||e instanceof Blob:!1),()=>"FileChunkIterator only supports File, Blob and Uint8Array right now."),this.offset=t.offset||0,this.chunkSize=t.chunkSize||1024*1024}summary(){return`FileChunks ${this.file}`}async next(){return this.offset>=(this.file instanceof Uint8Array?this.file.byteLength:this.file.size)?{value:null,done:!0}:{value:await new Promise((t,n)=>{let s=this.offset+this.chunkSize;if(this.file instanceof Uint8Array)t(new Uint8Array(this.file.slice(this.offset,s)));else{let r=new FileReader;r.onload=o=>{let i=r.result;if(i instanceof ArrayBuffer&&(i=new Uint8Array(i)),!(i instanceof Uint8Array))return n(new TypeError("FileReader returned unknown type."));t(i)},r.onabort=o=>n(new Error("Aborted")),r.onerror=o=>n(new Error(o.type));let a=this.file.slice(this.offset,s);r.readAsArrayBuffer(a)}this.offset=s}),done:!1}}};async function IX(e,t={},n){let s,r;typeof e=="string"?s=e:(s=e.url,r=CX(e));let a=await(n||v.fetch)(s,r);if(a.ok){let o=new Uint8Array(await a.arrayBuffer());return new $S(o,t)}else throw new Error(a.statusText)}var CX=e=>({method:e.method,headers:e.headers,body:e.body,mode:e.mode,credentials:e.credentials,cache:e.cache,redirect:e.redirect,referrer:e.referrer,integrity:e.integrity});function PS(e){return typeof e=="string"&&e.slice(0,7)==="file://"}var FS=class extends _S{constructor(e,t={}){super(),this.input=e,this.options=t}async iterator(){if(PS(this.input)&&H().get("IS_NODE")){let e=My();this.input=e.readFileSync(this.input.slice(7))}return new $S(this.input,this.options)}},OS=class extends _S{constructor(e,t={}){super(),this.url=e,this.fileOptions=t}async iterator(){return PS(this.url)?new FS(this.url,this.fileOptions).iterator():IX(this.url,this.fileOptions)}};function TX(e,t={}){return new NS(new OS(e),t)}function NX(e){let t=Wx(e);return Ds(async()=>t)}function EX(e){return Ds(async()=>{let t=await e();return Wx(()=>t.next())})}async function RX(e,t){return RS.create(e,t)}async function _X(e){return ES.create(e)}var DX="3.20.0";function Ne(e,t){Array.isArray(e)||(e=[e]),e.forEach(n=>{n!=null&&v.assert(n.dtype!=="complex64",()=>`${t} does not support complex64 tensors in the CPU backend.`)})}var $X=Ar.whereImpl,Ux=class extends Cc{constructor(){super(),this.blockSize=48,this.firstUse=!0,this.data=new Gp(this,Qt())}nextDataId(){return Ux.nextDataId++}write(e,t,n){this.firstUse&&(this.firstUse=!1,H().get("IS_NODE")&&T.warn(` + ${s}, and tensor's shape is: ${e.shape}`);let a=e.shape.slice(1),o=X3(a,n),i=s===0?0:e.size/s,l=X(()=>{let c=[];e=W(e,[1,s,i]);for(let p=0;p{switch(e.op){case"If":case"StatelessIf":{let s=I("thenBranch",e,t,n),r=I("elseBranch",e,t,n),a=I("cond",e,t,n),o=I("args",e,t,n);return(await a.data())[0]?n.functionMap[s].executeFunctionAsync(o,n.tensorArrayMap,n.tensorListMap):n.functionMap[r].executeFunctionAsync(o,n.tensorArrayMap,n.tensorListMap)}case"While":case"StatelessWhile":{let s=I("body",e,t,n),r=I("cond",e,t,n),a=I("args",e,t,n),o=await n.functionMap[r].executeFunctionAsync(a,n.tensorArrayMap,n.tensorListMap),i=a.map(c=>c.id),l=await o[0].data();o.forEach(c=>{!c.kept&&i.indexOf(c.id)===-1&&c.dispose()});let u=a;for(;l[0];){let c=u;u=await n.functionMap[s].executeFunctionAsync(u,n.tensorArrayMap,n.tensorListMap);let p=u.map(h=>h.id);c.forEach(h=>{!h.kept&&i.indexOf(h.id)===-1&&p.indexOf(h.id)===-1&&h.dispose()});let d=await n.functionMap[r].executeFunctionAsync(u,n.tensorArrayMap,n.tensorListMap);l=await d[0].data(),d.forEach(h=>{!h.kept&&i.indexOf(h.id)===-1&&p.indexOf(h.id)===-1&&h.dispose()})}return u}case"LoopCond":{let s=I("pred",e,t,n);return[ya(s)]}case"Switch":{let s=I("pred",e,t,n),r=I("data",e,t,n);return r.kept||(r=ya(r)),(await s.data())[0]?[void 0,r]:[r,void 0]}case"Merge":{let s=e.inputNames.find(r=>as(r,t,n)!==void 0);if(s){let r=as(s,t,n);return[ya(r)]}return}case"Enter":{let s=I("frameName",e,t,n),r=I("tensor",e,t,n);return n.enterFrame(s),[ya(r)]}case"Exit":{let s=I("tensor",e,t,n);return n.exitFrame(),[ya(s)]}case"NextIteration":{let s=I("tensor",e,t,n);return n.nextIteration(),[ya(s)]}case"TensorArrayV3":{let s=I("size",e,t,n),r=I("dtype",e,t,n),a=I("elementShape",e,t,n),o=I("dynamicSize",e,t,n),i=I("clearAfterRead",e,t,n),l=I("identicalElementShapes",e,t,n),u=I("name",e,t,n),c=new Lj(u,r,s,a,l,o,i);return n.addTensorArray(c),[c.idTensor,Ce(1)]}case"TensorArrayWriteV3":{let s=I("tensorArrayId",e,t,n),r=I("index",e,t,n),a=I("tensor",e,t,n),o=n.getTensorArray(s.id);return o.write(r,a),[o.idTensor]}case"TensorArrayReadV3":{let s=I("tensorArrayId",e,t,n),r=I("index",e,t,n);return[n.getTensorArray(s.id).read(r)]}case"TensorArrayGatherV3":{let s=I("tensorArrayId",e,t,n),r=I("indices",e,t,n),a=I("dtype",e,t,n);return[n.getTensorArray(s.id).gather(r,a)]}case"TensorArrayScatterV3":{let s=I("tensorArrayId",e,t,n),r=I("indices",e,t,n),a=I("tensor",e,t,n),o=n.getTensorArray(s.id);return o.scatter(r,a),[o.idTensor]}case"TensorArrayConcatV3":{let s=I("tensorArrayId",e,t,n),r=n.getTensorArray(s.id),a=I("dtype",e,t,n);return[r.concat(a)]}case"TensorArraySplitV3":{let s=I("tensorArrayId",e,t,n),r=I("tensor",e,t,n),a=I("lengths",e,t,n),o=n.getTensorArray(s.id);return o.split(a,r),[o.idTensor]}case"TensorArraySizeV3":{let s=I("tensorArrayId",e,t,n),r=n.getTensorArray(s.id);return[Ce(r.size(),"int32")]}case"TensorArrayCloseV3":{let s=I("tensorArrayId",e,t,n),r=n.getTensorArray(s.id);return r.clearAndClose(),[r.idTensor]}case"TensorListSetItem":{let s=I("tensorListId",e,t,n),r=I("index",e,t,n),a=I("tensor",e,t,n),o=n.getTensorList(s.id);return o.setItem(r,a),[o.idTensor]}case"TensorListGetItem":{let s=I("tensorListId",e,t,n),r=I("index",e,t,n),a=I("elementShape",e,t,n),o=I("elementDType",e,t,n);return[n.getTensorList(s.id).getItem(r,a,o)]}case"TensorListScatterV2":case"TensorListScatter":{let s=I("indices",e,t,n),r=I("tensor",e,t,n),a=I("elementShape",e,t,n),o=I("numElements",e,t,n),i=Vj(r,s,a,o);return n.addTensorList(i),[i.idTensor]}case"TensorListReserve":case"EmptyTensorList":{let s=I("elementShape",e,t,n),r=I("elementDType",e,t,n),a;e.op==="TensorListReserve"?a="numElements":a="maxNumElements";let o=I(a,e,t,n),i=e.op==="TensorListReserve"?-1:o,l=Wj(s,r,o,i);return n.addTensorList(l),[l.idTensor]}case"TensorListGather":{let s=I("tensorListId",e,t,n),r=I("indices",e,t,n),a=I("elementShape",e,t,n),o=I("elementDType",e,t,n);return[n.getTensorList(s.id).gather(r,o,a)]}case"TensorListStack":{let s=I("tensorListId",e,t,n),r=I("elementShape",e,t,n),a=I("elementDType",e,t,n),o=I("numElements",e,t,n);return[n.getTensorList(s.id).stack(r,a,o)]}case"TensorListFromTensor":{let s=I("tensor",e,t,n),r=I("elementShape",e,t,n),a=I("elementDType",e,t,n),o=Bj(s,r,a);return n.addTensorList(o),[o.idTensor]}case"TensorListConcat":case"TensorListConcatV2":{let s=I("tensorListId",e,t,n),r=n.getTensorList(s.id),a=I("dtype",e,t,n),o=I("elementShape",e,t,n);return[r.concat(a,o)]}case"TensorListPushBack":{let s=I("tensorListId",e,t,n),r=I("tensor",e,t,n),a=n.getTensorList(s.id);return a.pushBack(r),[a.idTensor]}case"TensorListPopBack":{let s=I("tensorListId",e,t,n),r=I("elementShape",e,t,n),a=I("elementDType",e,t,n);return[n.getTensorList(s.id).popBack(r,a)]}case"TensorListSplit":{let s=I("tensor",e,t,n),r=I("elementShape",e,t,n),a=I("lengths",e,t,n),o=Uj(s,a,r);return n.addTensorList(o),[o.idTensor]}case"TensorListLength":{let s=I("tensorListId",e,t,n),r=n.getTensorList(s.id);return[Ce(r.size(),"int32")]}case"TensorListResize":{let s=I("tensorListId",e,t,n),r=I("size",e,t,n),o=n.getTensorList(s.id).resize(r);return n.addTensorList(o),[o.idTensor]}default:throw TypeError(`Node type ${e.op} is not implemented`)}};function n7(e,t,n){let[s,r]=I("fusedOps",e,t,n),a=s==="biasadd",o=!a,i=r==="prelu",l=s==="fusedbatchnorm",u=I("numArgs",e,t,n);if(a){if(i&&u!==2)throw new Error("FusedConv2d and DepthwiseConv2d with BiasAdd and Prelu must have two extra arguments: bias and alpha.");if(!i&&a&&u!==1)throw new Error("FusedConv2d and DepthwiseConv2d with BiasAdd must have one extra argument: bias.")}if(l)throw new Error("FusedConv2d and DepthwiseConv2d with FusedBatchNorm is not supported");let c=I("strides",e,t,n),p=Gf(e,t,n),d=I("dataFormat",e,t,n).toUpperCase(),h=I("dilations",e,t,n),[f,m]=I("args",e,t,n);o&&(m=f,f=void 0);let g=I("leakyreluAlpha",e,t,n);return{stride:c,pad:p,dataFormat:d,dilations:h,biasArg:f,preluArg:m,activationFunc:r,leakyreluAlpha:g}}var Hj=(e,t,n,s=Bn)=>{switch(e.op){case"Conv1D":{let r=I("stride",e,t,n),a=I("pad",e,t,n),o=I("dataFormat",e,t,n).toUpperCase(),i=I("dilation",e,t,n);return[s.conv1d(I("x",e,t,n),I("filter",e,t,n),r,a,o,i)]}case"Conv2D":{let r=I("strides",e,t,n),a=Gf(e,t,n),o=I("dataFormat",e,t,n).toUpperCase(),i=I("dilations",e,t,n);return[s.conv2d(I("x",e,t,n),I("filter",e,t,n),[r[1],r[2]],a,o,[i[1],i[2]])]}case"_FusedConv2D":{let{stride:r,pad:a,dataFormat:o,dilations:i,biasArg:l,preluArg:u,activationFunc:c,leakyreluAlpha:p}=n7(e,t,n);return[s.fused.conv2d({x:I("x",e,t,n),filter:I("filter",e,t,n),strides:[r[1],r[2]],pad:a,dataFormat:o,dilations:[i[1],i[2]],bias:l,activation:c,preluActivationWeights:u,leakyreluAlpha:p})]}case"FusedDepthwiseConv2dNative":{let{stride:r,pad:a,dataFormat:o,dilations:i,biasArg:l,preluArg:u,activationFunc:c,leakyreluAlpha:p}=n7(e,t,n);return[s.fused.depthwiseConv2d({x:I("x",e,t,n),filter:I("filter",e,t,n),strides:[r[1],r[2]],pad:a,dataFormat:o,dilations:[i[1],i[2]],bias:l,activation:c,preluActivationWeights:u,leakyreluAlpha:p})]}case"Conv2DBackpropInput":case"Conv2dTranspose":{let r=I("outputShape",e,t,n),a=I("strides",e,t,n),o=Gf(e,t,n);return[s.conv2dTranspose(I("x",e,t,n),I("filter",e,t,n),r,[a[1],a[2]],o)]}case"DepthwiseConv2dNative":case"DepthwiseConv2d":{let r=I("strides",e,t,n),a=Gf(e,t,n),o=I("dilations",e,t,n),i=I("dataFormat",e,t,n).toUpperCase();return[s.depthwiseConv2d(I("input",e,t,n),I("filter",e,t,n),[r[1],r[2]],a,i,[o[1],o[2]])]}case"Conv3D":{let r=I("strides",e,t,n),a=I("pad",e,t,n),o=I("dataFormat",e,t,n).toUpperCase(),i=I("dilations",e,t,n);return[s.conv3d(I("x",e,t,n),I("filter",e,t,n),[r[1],r[2],r[3]],a,o,[i[1],i[2],i[3]])]}case"AvgPool":{let r=I("strides",e,t,n),a=I("pad",e,t,n),o=I("kernelSize",e,t,n);return[s.avgPool(I("x",e,t,n),[o[1],o[2]],[r[1],r[2]],a)]}case"MaxPool":{let r=I("strides",e,t,n),a=I("pad",e,t,n),o=I("kernelSize",e,t,n);return[s.maxPool(I("x",e,t,n),[o[1],o[2]],[r[1],r[2]],a)]}case"MaxPoolWithArgmax":{let r=I("strides",e,t,n),a=I("pad",e,t,n),o=I("kernelSize",e,t,n),i=I("includeBatchInIndex",e,t,n),{result:l,indexes:u}=s.maxPoolWithArgmax(I("x",e,t,n),[o[1],o[2]],[r[1],r[2]],a,i);return[l,u]}case"AvgPool3D":{let r=I("strides",e,t,n),a=I("pad",e,t,n),o=I("kernelSize",e,t,n);return[s.avgPool3d(I("x",e,t,n),[o[1],o[2],o[3]],[r[1],r[2],r[3]],a)]}case"MaxPool3D":{let r=I("strides",e,t,n),a=I("pad",e,t,n),o=I("kernelSize",e,t,n);return[s.maxPool3d(I("x",e,t,n),[o[1],o[2],o[3]],[r[1],r[2],r[3]],a)]}case"Dilation2D":{let r=I("strides",e,t,n),a=I("pad",e,t,n),o=I("dilations",e,t,n),i=r[1],l=r[2],u=o[1],c=o[2];return[s.dilation2d(I("x",e,t,n),I("filter",e,t,n),[i,l],a,[u,c],"NHWC")]}default:throw TypeError(`Node type ${e.op} is not implemented`)}},jj=(e,t,n,s=Bn)=>{switch(e.op){case"Fill":{let r=I("shape",e,t,n),a=I("dtype",e,t,n),o=I("value",e,t,n);return[s.fill(r,o,a)]}case"LinSpace":{let r=I("start",e,t,n),a=I("stop",e,t,n),o=I("num",e,t,n);return[s.linspace(r,a,o)]}case"Multinomial":{let r=I("logits",e,t,n),a=I("numSamples",e,t,n),o=I("seed",e,t,n);return[s.multinomial(r,a,o)]}case"OneHot":{let r=I("indices",e,t,n),a=I("depth",e,t,n),o=I("onValue",e,t,n),i=I("offValue",e,t,n),l=I("dtype",e,t,n);return[s.oneHot(r,a,o,i,l)]}case"Ones":return[s.ones(I("shape",e,t,n),I("dtype",e,t,n))];case"OnesLike":return[s.onesLike(I("x",e,t,n))];case"RandomStandardNormal":return[s.randomStandardNormal(I("shape",e,t,n),I("dtype",e,t,n),I("seed",e,t,n))];case"RandomUniform":return[s.randomUniform(I("shape",e,t,n),I("minval",e,t,n),I("maxval",e,t,n),I("dtype",e,t,n))];case"Range":{let r=I("start",e,t,n),a=I("stop",e,t,n),o=I("step",e,t,n);return[s.range(r,a,o,I("dtype",e,t,n))]}case"TruncatedNormal":{let r=I("shape",e,t,n),a=I("mean",e,t,n),o=I("stdDev",e,t,n),i=I("seed",e,t,n);return[s.truncatedNormal(r,a,o,I("dtype",e,t,n),i)]}case"Zeros":return[s.zeros(I("shape",e,t,n),I("dtype",e,t,n))];case"ZerosLike":return[s.zerosLike(I("x",e,t,n))];default:throw TypeError(`Node type ${e.op} is not implemented`)}};function o3(e,t,n){let s=I("boxes",e,t,n),r=I("scores",e,t,n),a=I("maxOutputSize",e,t,n),o=I("iouThreshold",e,t,n),i=I("scoreThreshold",e,t,n),l=I("softNmsSigma",e,t,n);return{boxes:s,scores:r,maxOutputSize:a,iouThreshold:o,scoreThreshold:i,softNmsSigma:l}}var qj=async(e,t,n,s,r=Bn)=>{switch(e.op){case"NonMaxSuppressionV5":{let{boxes:a,scores:o,maxOutputSize:i,iouThreshold:l,scoreThreshold:u,softNmsSigma:c}=o3(e,t,n),p=await r.image.nonMaxSuppressionWithScoreAsync(a,o,i,l,u,c);return[p.selectedIndices,p.selectedScores]}case"NonMaxSuppressionV4":{let{boxes:a,scores:o,maxOutputSize:i,iouThreshold:l,scoreThreshold:u}=o3(e,t,n),c=I("padToMaxOutputSize",e,t,n),p=await r.image.nonMaxSuppressionPaddedAsync(a,o,i,l,u,c);return[p.selectedIndices,p.validOutputs]}case"NonMaxSuppressionV3":case"NonMaxSuppressionV2":{let{boxes:a,scores:o,maxOutputSize:i,iouThreshold:l,scoreThreshold:u}=o3(e,t,n);return[await r.image.nonMaxSuppressionAsync(a,o,i,l,u)]}case"Where":{let a=r.cast(I("condition",e,t,n),"bool"),o=[await r.whereAsync(a)];return a.dispose(),o}case"ListDiff":return r.setdiff1dAsync(I("x",e,t,n),I("y",e,t,n));default:throw TypeError(`Node type ${e.op} is not implemented`)}},Xj=(e,t,n,s=Bn)=>{switch(e.op){case"LowerBound":{let r=I("sortedSequence",e,t,n),a=I("values",e,t,n);return[s.lowerBound(r,a)]}case"TopKV2":{let r=I("x",e,t,n),a=I("k",e,t,n),o=I("sorted",e,t,n),i=s.topk(r,a,o);return[i.values,i.indices]}case"UpperBound":{let r=I("sortedSequence",e,t,n),a=I("values",e,t,n);return[s.upperBound(r,a)]}case"Unique":{let r=I("x",e,t,n),a=s.unique(r);return[a.values,a.indices]}case"UniqueV2":{let r=I("x",e,t,n),a=I("axis",e,t,n),o=s.unique(r,a);return[o.values,o.indices]}default:throw TypeError(`Node type ${e.op} is not implemented`)}},Kj=(e,t,n,s=Bn)=>{switch(e.op){case"Const":return t[e.name];case"PlaceholderWithDefault":let r=I("default",e,t,n);return[as(e.name,t,n)||r];case"Placeholder":return[as(e.name,t,n)];case"Identity":case"StopGradient":case"FakeQuantWithMinMaxVars":{let c=I("x",e,t,n);return[ya(c)]}case"IdentityN":return I("x",e,t,n).map(c=>ya(c));case"Snapshot":let a=I("x",e,t,n);return[ya(a)];case"Shape":return[s.tensor1d(I("x",e,t,n).shape,"int32")];case"ShapeN":return I("x",e,t,n).map(c=>s.tensor1d(c.shape));case"Size":return[s.scalar(I("x",e,t,n).size,"int32")];case"Rank":return[s.scalar(I("x",e,t,n).rank,"int32")];case"NoOp":return[s.scalar(1)];case"Print":let o=I("x",e,t,n),i=I("data",e,t,n),l=I("message",e,t,n),u=I("summarize",e,t,n);console.warn("The graph has a tf.print() operation,usually used for debugging, which slows down performance."),console.log(l);for(let c=0;ce.dispose()),this.tensorMap.clear(),this.handle.dispose()}size(){return this.tensorMap.size}tensorSize(){return Ce(this.size(),"int32")}async import(e,t){this.checkKeyAndValueTensor(e,t);let n=await e.data();return this.tensorMap.forEach(s=>s.dispose()),this.tensorMap.clear(),X(()=>{let s=bn(t),r=n.length,a=s.length;v.assert(r===a,()=>`The number of elements doesn't match, keys has ${r} elements, the values has ${a} elements.`);for(let o=0;o{let s=[];for(let r=0;r{switch(e.op){case"HashTable":case"HashTableV2":{let r=I("keyDType",e,t,n),a=I("valueDType",e,t,n),o=new Zj(r,a);return s.addHashTable(e.name,o),[o.handle]}case"LookupTableImport":case"LookupTableImportV2":{let r=I("tableHandle",e,t,n,s),a=I("keys",e,t,n),o=I("values",e,t,n);return[await s.getHashTableById(r.id).import(a,o)]}case"LookupTableFind":case"LookupTableFindV2":{let r=I("tableHandle",e,t,n,s),a=I("keys",e,t,n),o=I("defaultValue",e,t,n);return[await s.getHashTableById(r.id).find(a,o)]}case"LookupTableSize":case"LookupTableSizeV2":{let r=I("tableHandle",e,t,n,s);return[s.getHashTableById(r.id).tensorSize()]}default:throw TypeError(`Node type ${e.op} is not implemented`)}},Jj=(e,t,n,s=Bn)=>{switch(e.op){case"ResizeBilinear":{let r=I("images",e,t,n),a=I("size",e,t,n),o=I("alignCorners",e,t,n),i=I("halfPixelCenters",e,t,n);return[s.image.resizeBilinear(r,[a[0],a[1]],o,i)]}case"ResizeNearestNeighbor":{let r=I("images",e,t,n),a=I("size",e,t,n),o=I("alignCorners",e,t,n),i=I("halfPixelCenters",e,t,n);return[s.image.resizeNearestNeighbor(r,[a[0],a[1]],o,i)]}case"CropAndResize":{let r=I("image",e,t,n),a=I("boxes",e,t,n),o=I("boxInd",e,t,n),i=I("cropSize",e,t,n),l=I("method",e,t,n),u=I("extrapolationValue",e,t,n);return[s.image.cropAndResize(r,a,o,i,l,u)]}case"ImageProjectiveTransformV3":{let r=I("images",e,t,n),a=I("transforms",e,t,n),o=I("outputShape",e,t,n),i=I("fillValue",e,t,n),l=I("interpolation",e,t,n),u=I("fillMode",e,t,n);return[s.image.transform(r,a,l.toLowerCase(),u.toLowerCase(),i,o)]}default:throw TypeError(`Node type ${e.op} is not implemented`)}},Qj=(e,t,n,s=Bn)=>{switch(e.op){case"Equal":return[s.equal(I("a",e,t,n),I("b",e,t,n))];case"NotEqual":return[s.notEqual(I("a",e,t,n),I("b",e,t,n))];case"Greater":return[s.greater(I("a",e,t,n),I("b",e,t,n))];case"GreaterEqual":return[s.greaterEqual(I("a",e,t,n),I("b",e,t,n))];case"Less":return[s.less(I("a",e,t,n),I("b",e,t,n))];case"LessEqual":return[s.lessEqual(I("a",e,t,n),I("b",e,t,n))];case"LogicalAnd":return[s.logicalAnd(I("a",e,t,n),I("b",e,t,n))];case"LogicalNot":return[s.logicalNot(I("a",e,t,n))];case"LogicalOr":return[s.logicalOr(I("a",e,t,n),I("b",e,t,n))];case"Select":case"SelectV2":return[s.where(I("condition",e,t,n),I("a",e,t,n),I("b",e,t,n))];default:throw TypeError(`Node type ${e.op} is not implemented`)}},eq=(e,t,n,s=Bn)=>{switch(e.op){case"BatchMatMul":case"BatchMatMulV2":case"MatMul":return[s.matMul(I("a",e,t,n),I("b",e,t,n),I("transposeA",e,t,n),I("transposeB",e,t,n))];case"Einsum":return[s.einsum(I("equation",e,t,n),...I("tensors",e,t,n))];case"Transpose":return[s.transpose(I("x",e,t,n),I("perm",e,t,n))];case"_FusedMatMul":let[r,a]=I("fusedOps",e,t,n),o=r==="biasadd",i=a==="prelu",l=I("numArgs",e,t,n),u=I("leakyreluAlpha",e,t,n);if(o){if(i&&l!==2)throw new Error("Fused MatMul with BiasAdd and Prelu must have two extra arguments: bias and alpha.");if(!i&&l!==1)throw new Error("Fused MatMul with BiasAdd must have one extra argument: bias.")}let[c,p]=I("args",e,t,n);return[s.fused.matMul({a:I("a",e,t,n),b:I("b",e,t,n),transposeA:I("transposeA",e,t,n),transposeB:I("transposeB",e,t,n),bias:c,activation:a,preluActivationWeights:p,leakyreluAlpha:u})];default:throw TypeError(`Node type ${e.op} is not implemented`)}},tq=(e,t,n,s=Bn)=>{switch(e.op){case"EuclideanNorm":return[s.euclideanNorm(I("x",e,t,n),I("axis",e,t,n),I("keepDims",e,t,n))];case"FusedBatchNorm":case"FusedBatchNormV2":return[s.batchNorm(I("x",e,t,n),I("mean",e,t,n),I("variance",e,t,n),I("offset",e,t,n),I("scale",e,t,n),I("epsilon",e,t,n))];case"FusedBatchNormV3":return[s.batchNorm(I("x",e,t,n),I("mean",e,t,n),I("variance",e,t,n),I("offset",e,t,n),I("scale",e,t,n),I("epsilon",e,t,n))];case"LRN":return[s.localResponseNormalization(I("x",e,t,n),I("radius",e,t,n),I("bias",e,t,n),I("alpha",e,t,n),I("beta",e,t,n))];case"Softmax":return[s.softmax(I("x",e,t,n))];case"LogSoftmax":return[s.logSoftmax(I("x",e,t,n))];case"SparseToDense":return[s.sparseToDense(I("sparseIndices",e,t,n),I("outputShape",e,t,n),I("sparseValues",e,t,n),I("defaultValue",e,t,n))];default:throw TypeError(`Node type ${e.op} is not implemented`)}},nq=(e,t,n,s=Bn)=>{switch(e.op){case"Max":{let i=I("axis",e,t,n),l=I("keepDims",e,t,n);return[s.max(I("x",e,t,n),i,l)]}case"Mean":{let i=I("axis",e,t,n),l=I("keepDims",e,t,n);return[s.mean(I("x",e,t,n),i,l)]}case"Min":{let i=I("axis",e,t,n),l=I("keepDims",e,t,n);return[s.min(I("x",e,t,n),i,l)]}case"Sum":{let i=I("axis",e,t,n),l=I("keepDims",e,t,n);return[s.sum(I("x",e,t,n),i,l)]}case"All":{let i=I("axis",e,t,n),l=I("keepDims",e,t,n);return[s.all(I("x",e,t,n),i,l)]}case"Any":{let i=I("axis",e,t,n),l=I("keepDims",e,t,n);return[s.any(I("x",e,t,n),i,l)]}case"ArgMax":{let i=I("axis",e,t,n);return[s.argMax(I("x",e,t,n),i)]}case"ArgMin":{let i=I("axis",e,t,n);return[s.argMin(I("x",e,t,n),i)]}case"Prod":{let i=I("axis",e,t,n),l=I("keepDims",e,t,n);return[s.prod(I("x",e,t,n),i,l)]}case"Cumprod":{let i=I("axis",e,t,n),l=I("exclusive",e,t,n),u=I("reverse",e,t,n);return[s.cumprod(I("x",e,t,n),i,l,u)]}case"Cumsum":{let i=I("axis",e,t,n),l=I("exclusive",e,t,n),u=I("reverse",e,t,n);return[s.cumsum(I("x",e,t,n),i,l,u)]}case"Bincount":let r=I("x",e,t,n),a=I("weights",e,t,n),o=I("size",e,t,n);return[s.bincount(r,a,o)];case"DenseBincount":{let i=I("x",e,t,n),l=I("weights",e,t,n),u=I("size",e,t,n),c=I("binaryOutput",e,t,n);return[s.denseBincount(i,l,u,c)]}default:throw TypeError(`Node type ${e.op} is not implemented`)}},sq=(e,t,n,s=Bn)=>{switch(e.op){case"ConcatV2":case"Concat":{let r=I("n",e,t,n),a=I("axis",e,t,n),o=I("tensors",e,t,n);return o=o.slice(0,r),[s.concat(o,a)]}case"Gather":{let r=I("x",e,t,n),a=I("indices",e,t,n);return[s.gather(r,s.cast(a,"int32"),0)]}case"GatherV2":{let r=I("axis",e,t,n),a=I("batchDims",e,t,n),o=I("x",e,t,n),i=I("indices",e,t,n);return[s.gather(o,s.cast(i,"int32"),r,a)]}case"Reverse":{let r=I("dims",e,t,n),a=[];for(let i=0;i{let r=I("axis",e,t,n),a=I("tensors",e,t,n),o=a[0].shape,i=s.squeeze(a[0]).shape,l=a.map(u=>{let c=v.arraysEqual(u.shape,o);if(!c&&!v.arraysEqual(s.squeeze(u).shape,i))throw new Error("the input tensors shape does not match");return c?u:s.reshape(u,o)});return[s.stack(l,r)]});case"Unpack":{let r=I("axis",e,t,n),a=I("tensor",e,t,n);return s.unstack(a,r)}case"Tile":{let r=I("reps",e,t,n);return[s.tile(I("x",e,t,n),r)]}case"Split":case"SplitV":{let r=I("axis",e,t,n),a=I("numOrSizeSplits",e,t,n),o=I("x",e,t,n);return s.split(o,a,r)}case"ScatterNd":{let r=I("indices",e,t,n),a=I("values",e,t,n),o=I("shape",e,t,n);return[s.scatterND(r,a,o)]}case"GatherNd":{let r=I("x",e,t,n),a=I("indices",e,t,n);return[s.gatherND(r,a)]}case"SparseToDense":{let r=I("sparseIndices",e,t,n),a=I("outputShape",e,t,n),o=I("sparseValues",e,t,n),i=I("defaultValue",e,t,n);return[s.sparseToDense(r,o,a,o.dtype===i.dtype?i:s.cast(i,o.dtype))]}default:throw TypeError(`Node type ${e.op} is not implemented`)}},rq=(e,t,n,s=Bn)=>{switch(e.op){case"SparseFillEmptyRows":{let{outputIndices:r,outputValues:a,emptyRowIndicator:o,reverseIndexMap:i}=s.sparse.sparseFillEmptyRows(I("indices",e,t,n),I("values",e,t,n),I("denseShape",e,t,n),I("defaultValue",e,t,n));return[r,a,o,i]}case"SparseReshape":{let{outputIndices:r,outputShape:a}=s.sparse.sparseReshape(I("inputIndices",e,t,n),I("inputShape",e,t,n),I("newShape",e,t,n));return[r,a]}case"SparseSegmentMean":return[s.sparse.sparseSegmentMean(I("data",e,t,n),I("indices",e,t,n),I("segmentIds",e,t,n))];case"SparseSegmentSum":return[s.sparse.sparseSegmentSum(I("data",e,t,n),I("indices",e,t,n),I("segmentIds",e,t,n))];default:throw TypeError(`Node type ${e.op} is not implemented`)}},aq=(e,t,n,s=Bn)=>{switch(e.op){case"FFT":return[s.fft(I("x",e,t,n))];case"IFFT":return[s.ifft(I("x",e,t,n))];case"RFFT":return[s.rfft(I("x",e,t,n))];case"IRFFT":return[s.irfft(I("x",e,t,n))];default:throw TypeError(`Node type ${e.op} is not implemented`)}},oq=(e,t,n,s=Bn)=>{switch(e.op){case"StringNGrams":{let{nGrams:r,nGramsSplits:a}=s.string.stringNGrams(I("data",e,t,n),I("dataSplits",e,t,n),I("separator",e,t,n),I("nGramWidths",e,t,n),I("leftPad",e,t,n),I("rightPad",e,t,n),I("padWidth",e,t,n),I("preserveShortSequences",e,t,n));return[r,a]}case"StringSplit":{let{indices:r,values:a,shape:o}=s.string.stringSplit(I("input",e,t,n),I("delimiter",e,t,n),I("skipEmpty",e,t,n));return[r,a,o]}case"StringToHashBucketFast":return[s.string.stringToHashBucketFast(I("input",e,t,n),I("numBuckets",e,t,n))];default:throw TypeError(`Node type ${e.op} is not implemented`)}},iq=(e,t,n,s=Bn)=>{switch(e.op){case"Cast":return[s.cast(I("x",e,t,n),I("dtype",e,t,n))];case"ExpandDims":{let r=I("axis",e,t,n);return[s.expandDims(I("x",e,t,n),r)]}case"Squeeze":{let r=I("axis",e,t,n);return[s.squeeze(I("x",e,t,n),r)]}case"Reshape":return[s.reshape(I("x",e,t,n),I("shape",e,t,n))];case"MirrorPad":return[s.mirrorPad(I("x",e,t,n),I("padding",e,t,n),I("mode",e,t,n))];case"PadV2":case"Pad":return[s.pad(I("x",e,t,n),I("padding",e,t,n),I("constantValue",e,t,n))];case"SpaceToBatchND":{let r=I("blockShape",e,t,n),a=I("paddings",e,t,n);return[s.spaceToBatchND(I("x",e,t,n),r,a)]}case"BatchToSpaceND":{let r=I("blockShape",e,t,n),a=I("crops",e,t,n);return[s.batchToSpaceND(I("x",e,t,n),r,a)]}case"DepthToSpace":{let r=I("blockSize",e,t,n),a=I("dataFormat",e,t,n).toUpperCase();return[s.depthToSpace(I("x",e,t,n),r,a)]}case"BroadcastTo":return[s.broadcastTo(I("x",e,t,n),I("shape",e,t,n))];case"BroadcastArgs":return[s.broadcastArgs(I("s0",e,t,n),I("s1",e,t,n))];default:throw TypeError(`Node type ${e.op} is not implemented`)}};function s7(e,t,n,s,r=X){let a=((o,i,l)=>{switch(o.category){case"arithmetic":return r(()=>Mj(o,i,l));case"basic_math":return r(()=>zj(o,i,l));case"control":return Gj(o,i,l);case"convolution":return r(()=>Hj(o,i,l));case"creation":return r(()=>jj(o,i,l));case"dynamic":return qj(o,i,l);case"evaluation":return r(()=>Xj(o,i,l));case"image":return r(()=>Jj(o,i,l));case"graph":return r(()=>Kj(o,i,l));case"logical":return r(()=>Qj(o,i,l));case"matrices":return r(()=>eq(o,i,l));case"normalization":return r(()=>tq(o,i,l));case"reduction":return r(()=>nq(o,i,l));case"slice_join":return r(()=>sq(o,i,l));case"sparse":return r(()=>rq(o,i,l));case"spectral":return r(()=>aq(o,i,l));case"string":return r(()=>oq(o,i,l));case"transformation":return r(()=>iq(o,i,l));case"hash_table":return Yj(o,i,l,s);case"custom":let u=P8(o.op);if(u&&u.customExecutor)return u.customExecutor(new Oj(o,i,l));throw TypeError(`Custom op ${o.op} is not registered.`);default:throw TypeError(`Unknown op '${o.op}'. File an issue at https://github.com/tensorflow/tfjs/issues so we can add it, or register a custom execution with tf.registerOp()`)}})(e,t,n);return v.isPromise(a)?a.then(o=>[].concat(o)):[].concat(a)}var r7=class{constructor(e={},t={},n={},s={}){this.weightMap=e,this.tensorArrayMap=t,this.tensorListMap=n,this.functionMap=s,this.rootContext={id:0,frameName:"",iterationId:0},this.contexts=[this.rootContext],this.lastId=0,this.generateCurrentContextIds()}newFrame(e,t){return{id:e,frameName:t,iterationId:0}}set currentContext(e){this.contexts!==e&&(this.contexts=e,this.generateCurrentContextIds())}get currentContext(){return this.contexts}get currentContextId(){return this._currentContextIds[0]}get currentContextIds(){return this._currentContextIds}generateCurrentContextIds(){let e=[];for(let t=0;tt.id===0&&t.iterationId===0?"":`${t.frameName}-${t.iterationId}`).join("/"):""}enterFrame(e){this.contexts&&(this.lastId++,this.contexts=this.contexts.slice(),this.contexts.push(this.newFrame(this.lastId,e)),this._currentContextIds.unshift(this.contextIdforContexts(this.contexts)))}exitFrame(){if(this.contexts&&this.contexts.length>1)this.contexts=this.contexts.slice(),this.contexts.splice(-1),this.currentContextIds.shift();else throw new Error("Cannot exit frame, the context is empty")}nextIteration(){if(this.contexts&&this.contexts.length>0){this.contexts=this.contexts.slice(),this.lastId++;let e=Object.assign({},this.contexts[this.contexts.length-1]);e.iterationId+=1,e.id=this.lastId,this.contexts.splice(-1,1,e),this._currentContextIds.splice(0,1,this.contextIdforContexts(this.contexts))}else throw new Error("Cannot increase frame iteration, the context is empty")}getWeight(e){return this.weightMap[e]}addTensorArray(e){this.tensorArrayMap[e.id]=e}getTensorArray(e){return this.tensorArrayMap[e]}addTensorList(e){this.tensorListMap[e.id]=e}getTensorList(e){return this.tensorListMap[e]}dispose(e){for(let t in this.tensorArrayMap)this.tensorArrayMap[t].clearAndClose(e);for(let t in this.tensorListMap)this.tensorListMap[t].clearAndClose(e)}};function a7(e,t,n,s){let r=new Set,a=[],o=null,i=null,l=new Set,u=Object.keys(e).map(d=>Rs(d)[0]),c=[];s!=null&&(c=s.map(d=>Rs(d.name)[0]));let p=[...t];for(;p.length>0;){let d=p.pop();if((nS(d)||pq(d)||hq(d))&&o==null&&(o=d,i=o.children.map(h=>h.name).filter(h=>r.has(h))),r.add(d.name),n[d.name]==null&&u.indexOf(d.name)===-1&&c.indexOf(d.name)===-1){if(d.inputs.length===0){a.push(d.name);continue}d.inputs.forEach(h=>{l.has(h.name)||(l.add(h.name),p.push(h))})}}return{inputs:e,outputs:t,usedNodes:r,missingInputs:a,dynamicNode:o,syncInputs:i}}function lq(e,t,n){let{usedNodes:s,inputs:r}=n,a=[],o=Object.keys(r).map(c=>Rs(c)[0]).map(c=>e.nodes[c]),i=e.initNodes;o.forEach(c=>{s.has(c.name)&&a.push(c)}),e.weights.forEach(c=>{s.has(c.name)&&a.push(c)}),i!=null&&i.forEach(c=>{s.has(c.name)&&a.push(c)});let l=new Set,u=[];for(;a.length>0;){let c=a.pop();l.add(c.name),t[c.name]||u.push(c),c.children.forEach(p=>{!l.has(p.name)&&s.has(p.name)&&p.inputs.every(d=>l.has(d.name))&&a.push(p)})}return u}var uq=["Switch","Merge","Enter","Exit","NextIteration","StatelessIf","StatelessWhile","if","While"],cq=["NonMaxSuppressionV2","NonMaxSuppressionV3","NonMaxSuppressionV5","Where"],dq=["HashTable","HashTableV2","LookupTableImport","LookupTableImportV2","LookupTableFind","LookupTableFindV2","LookupTableSize","LookupTableSizeV2"];function nS(e){return uq.indexOf(e.op)>=0}function pq(e){return cq.indexOf(e.op)>=0}function hq(e){return dq.indexOf(e.op)>=0}var K3=class{constructor(e,t){this.graph=e,this.parent=t,this.compiledMap=new Map,this._weightMap={},this.SEPERATOR=",",this._functions={},this._functionExecutorMap={},this.intermediateTensors={},this.keepTensorForDebug=!1,this._outputs=e.outputs,this._inputs=e.inputs,this._initNodes=e.initNodes,this._signature=e.signature,this._functions=e.functions,e.functions!=null&&Object.keys(e.functions).forEach(n=>{this._functionExecutorMap[n]=new K3(e.functions[n],this)})}get weightIds(){return this.parent?this.parent.weightIds:this._weightIds}get functionExecutorMap(){return this.parent?this.parent.functionExecutorMap:this._functionExecutorMap}get weightMap(){return this.parent?this.parent.weightMap:this._weightMap}set weightMap(e){let t=Object.keys(e).map(n=>e[n].map(s=>s.id));this._weightIds=[].concat(...t),this._weightMap=e}set resourceManager(e){this._resourceManager=e}get inputs(){return this._inputs.map(e=>({name:e.name,shape:e.attrParams.shape?e.attrParams.shape.value:void 0,dtype:e.attrParams.dtype?e.attrParams.dtype.value:void 0}))}get outputs(){return this._outputs.map(e=>({name:e.name,shape:e.attrParams.shape?e.attrParams.shape.value:void 0,dtype:e.attrParams.dtype?e.attrParams.dtype.value:void 0}))}get inputNodes(){return this._inputs.map(e=>e.signatureKey||e.name)}get outputNodes(){return this._outputs.map(e=>{let t=e.signatureKey||e.name;return e.defaultOutput?`${t}:${e.defaultOutput}`:t})}get functions(){return Object.keys(this._functions).reduce((e,t)=>(e[t]=this._functions[t].signature,e),{})}getCompilationKey(e,t){let n=e.map(r=>r.name).sort(),s=t.map(r=>r.name).sort();return n.join(this.SEPERATOR)+"--"+s.join(this.SEPERATOR)}compile(e,t){let n=a7(e,t,this.weightMap,this._initNodes),{missingInputs:s,dynamicNode:r,syncInputs:a}=n;if(r!=null)throw new Error(`This execution contains the node '${r.name}', which has the dynamic op '${r.op}'. Please use model.executeAsync() instead. Alternatively, to avoid the dynamic ops, specify the inputs [${a}]`);if(s.length>0){let o=t.map(l=>l.name),i=Object.keys(e);throw new Error(`Cannot compute the outputs [${o}] from the provided inputs [${i}]. Missing the following inputs: [${s}]`)}return lq(this.graph,this.weightMap,n)}execute(e,t){e=this.mapInputs(e);let n=Object.keys(e).sort();this.checkInputs(e),this.checkInputShapeAndType(e),t=this.mapOutputs(t),this.checkOutputs(t);let s=n.map(c=>this.graph.nodes[Rs(c)[0]]),r=t.map(c=>Rs(c)[0]),a=r.map(c=>this.graph.nodes[c]);this.resetIntermediateTensors(),a.length===0&&(a=this._outputs);let o=this.getCompilationKey(s,a),i=this.compiledMap.get(o);i==null&&(i=this.compile(e,a),this.compiledMap.set(o,i));let l={},u={};return X(()=>{let c=new r7(this.weightMap,l,u,this.functionExecutorMap),p=Object.assign({},this.weightMap);Object.keys(e).forEach(f=>{let[m,g]=Rs(f),y=[];y[g]=e[f],p[m]=y});let d=this.getFrozenTensorIds(p),h={};for(let f=0;fas(f,p,c))})}getFrozenTensorIds(e){let t=[].concat.apply([],Object.keys(e).map(n=>e[n]).map(n=>n.map(s=>s.id)));return new Set(t)}checkTensorForDisposal(e,t,n,s,r,a,o){t.category==="control"||a.indexOf(e)!==-1||(n[e].forEach(i=>{i!=null&&(o[i.id]=(o[i.id]||0)+t.children.length)}),t.inputs.forEach(i=>{if(i.category!=="control"){let l=mj(i.name,n,s);l!=null&&l.forEach(u=>{if(u&&!u.kept&&!r.has(u.id)){let c=o[u.id];if(c===1){if(!this.keepTensorForDebug)u.dispose();else{let[p,d]=Yr(t.name,s);this.intermediateTensors[p]?this.intermediateTensors[p][d]=u:(this.intermediateTensors[p]=[],this.intermediateTensors[p][d]=u)}delete o[u.id]}else c!=null&&o[u.id]--}})}}))}async executeAsync(e,t){return this._executeAsync(e,t)}disposeIntermediateTensors(){!this.intermediateTensors||(Object.keys(this.intermediateTensors).forEach(e=>this.intermediateTensors[e].forEach(t=>t.dispose())),this.disposeTensorsMap())}disposeTensorsMap(){!this.tensorsMap||Object.keys(this.tensorsMap).forEach(e=>{this.tensorsMap[e].forEach(n=>{n&&!n.kept&&!n.isDisposed&&!this.keepIds.has(n.id)&&n.dispose()})})}getIntermediateTensors(){return this.tensorsMap}resetIntermediateTensors(){for(let e in this.intermediateTensors)this.intermediateTensors[e].forEach(t=>t.dispose()),delete this.intermediateTensors[e]}async _executeAsync(e,t,n=!1,s={},r={}){n||(e=this.mapInputs(e),this.checkInputs(e),this.checkInputShapeAndType(e),t=this.mapOutputs(t),this.checkOutputs(t));try{this.keepTensorForDebug=U().getBool("KEEP_INTERMEDIATE_TENSORS")}catch(u){console.warn(u.message)}this.resetIntermediateTensors();let a=new r7(this.weightMap,s,r,this.functionExecutorMap);this.tensorsMap=await this.executeWithControlFlow(e,a,t,n);let o=t.map(u=>as(u,this.tensorsMap,a)),i=o.map(u=>u.id),l=Object.keys(e).map(u=>e[u].id);return this.keepIds=new Set([...i,...l,...this.weightIds]),this.keepTensorForDebug||this.disposeTensorsMap(),this.parent==null&&a.dispose(this.keepIds),o}async executeFunctionAsync(e,t,n){let s=e.reduce((r,a,o)=>(r[this.inputs[o].name]=a,r),{});return this._executeAsync(s,this.outputNodes,!0,t,n)}async executeWithControlFlow(e,t,n,s){let r=Object.keys(e),a=r.map(x=>this.graph.nodes[Rs(x)[0]]),o=n.map(x=>Rs(x)[0]),i=o.map(x=>this.graph.nodes[x]);i.length===0&&(i=this._outputs);let{usedNodes:l,missingInputs:u,dynamicNode:c,syncInputs:p}=a7(e,i,this.weightMap,this._initNodes),d=[...a,...this.graph.weights,...this._initNodes||[]].map(x=>({node:x,contexts:t.currentContext})),h=Object.assign({},this.weightMap);Object.keys(e).forEach(x=>{let[A,b]=Rs(x),w=[];w[b]=e[x],h[A]=w});let f={},m=this.getFrozenTensorIds(h),g={};for(;d.length>0;){let x=this.processStack(a,d,t,h,g,m,o,f,l);await Promise.all(x)}c==null&&!s&&console.warn("This model execution did not contain any nodes with control flow or dynamic output shapes. You can use model.execute() instead.");let y=i.filter(x=>!nS(x)&&!as(x.name,h,t)).map(x=>x.name);if(y.length>0){let x="";throw c!=null&&(x=`Alternatively, to avoid the dynamic ops, use model.execute() and specify the inputs [${p}]`),new Error(`Cannot compute the outputs [${y}] from the provided inputs [${r}]. Consider providing the following inputs: [${u}]. ${x}`)}return h}processStack(e,t,n,s,r,a,o,i,l){let u=[];for(;t.length>0;){let c=t.pop();n.currentContext=c.contexts;let p="";if(c.node.op==="Enter"&&I("isConstant",c.node,s,n)&&([p]=Yr(c.node.name,n)),s[c.node.name]==null){let d=s7(c.node,s,n,this._resourceManager);p||([p]=Yr(c.node.name,n));let h=n.currentContext;v.isPromise(d)?u.push(d.then(f=>(s[p]=f,n.currentContext=h,this.checkTensorForDisposal(p,c.node,s,n,a,o,i),this.processChildNodes(c.node,t,n,s,r,l),f))):(s[p]=d,this.checkTensorForDisposal(p,c.node,s,n,a,o,i),this.processChildNodes(c.node,t,n,s,r,l))}else this.processChildNodes(c.node,t,n,s,r,l)}return u}processChildNodes(e,t,n,s,r,a){e.children.forEach(o=>{let[i]=Yr(o.name,n);r[i]||!a.has(o.name)||(o.op==="Merge"?o.inputNames.some(l=>!!as(l,s,n))&&(r[i]=!0,t.push({contexts:n.currentContext,node:o})):o.inputNames.every(l=>!!as(l,s,n))&&(r[i]=!0,t.push({contexts:n.currentContext,node:o})))})}dispose(){Object.keys(this.weightMap).forEach(e=>this.weightMap[e].forEach(t=>t.dispose()))}checkInputShapeAndType(e){Object.keys(e).forEach(t=>{let n=e[t],[s]=Rs(t),r=this.graph.nodes[s];if(r.attrParams.shape&&r.attrParams.shape.value){let a=r.attrParams.shape.value,o=a.length===n.shape.length&&n.shape.every((i,l)=>a[l]===-1||a[l]===i);v.assert(o,()=>`The shape of dict['${r.name}'] provided in model.execute(dict) must be [${a}], but was [${n.shape}]`)}r.attrParams.dtype&&r.attrParams.dtype.value&&v.assert(n.dtype===r.attrParams.dtype.value,()=>`The dtype of dict['${r.name}'] provided in model.execute(dict) must be ${r.attrParams.dtype.value}, but was ${n.dtype}`)})}mapInputs(e){let t={};for(let n in e)if(this._signature!=null&&this._signature.inputs!=null&&this._signature.inputs[n]!=null){let s=this._signature.inputs[n];t[s.name]=e[n]}else t[n]=e[n];return t}checkInputs(e){let t=Object.keys(e).filter(n=>{let[s]=Rs(n);return this.graph.nodes[s]==null});if(t.length>0)throw new Error(`The dict provided in model.execute(dict) has keys: [${t}] that are not part of graph`)}mapOutputs(e){return e.map(t=>this._signature!=null&&this._signature.outputs!=null&&this._signature.outputs[t]!=null?this._signature.outputs[t].name:t,{})}checkOutputs(e){e.forEach(t=>{let[n]=Rs(t);if(!this.graph.nodes[n])throw new Error(`The output '${t}' is not found in the graph`)})}},fq=class{constructor(e={},t={}){this.hashTableNameToHandle=e,this.hashTableMap=t}addHashTable(e,t){this.hashTableNameToHandle[e]=t.handle,this.hashTableMap[t.id]=t}getHashTableHandleByName(e){return this.hashTableNameToHandle[e]}getHashTableById(e){return this.hashTableMap[e]}dispose(){for(let e in this.hashTableMap)this.hashTableMap[e].clearAndClose(),delete this.hashTableMap[e];for(let e in this.hashTableNameToHandle)this.hashTableNameToHandle[e].dispose(),delete this.hashTableNameToHandle[e]}},mq="?tfjs-format=file",gq="model.json",Ch=class{constructor(e,t={},n=On){this.modelUrl=e,this.loadOptions=t,this.version="n/a",this.io=n,t==null&&(this.loadOptions={}),this.resourceManager=new fq}get modelVersion(){return this.version}get inputNodes(){return this.executor.inputNodes}get outputNodes(){return this.executor.outputNodes}get inputs(){return this.executor.inputs}get outputs(){return this.executor.outputs}get weights(){return this.executor.weightMap}get metadata(){return this.artifacts.userDefinedMetadata}get modelSignature(){return this.signature}get modelStructuredOutputKeys(){return this.structuredOutputKeys}findIOHandler(){let e=this.modelUrl;if(e.load!=null)this.handler=e;else if(this.loadOptions.requestInit!=null)this.handler=this.io.browserHTTPRequest(e,this.loadOptions);else{let t=this.io.getLoadHandlers(e,this.loadOptions);if(t.length===0)t.push(this.io.browserHTTPRequest(e,this.loadOptions));else if(t.length>1)throw new Error(`Found more than one (${t.length}) load handlers for URL '${[e]}'`);this.handler=t[0]}}load(){if(this.findIOHandler(),this.handler.load==null)throw new Error("Cannot proceed with model loading because the IOHandler provided does not have the `load` method implemented.");let e=this.handler.load();return v.isPromise(e)?e.then(t=>this.loadSync(t)):this.loadSync(e)}loadSync(e){this.artifacts=e;let t=this.artifacts.modelTopology,n=this.artifacts.signature;if(this.artifacts.userDefinedMetadata!=null){let r=this.artifacts.userDefinedMetadata;r.signature!=null&&(n=r.signature),r.structuredOutputKeys!=null&&(this.structuredOutputKeys=r.structuredOutputKeys)}this.signature=n,this.version=`${t.versions.producer}.${t.versions.minConsumer}`;let s=this.io.decodeWeights(this.artifacts.weightData,this.artifacts.weightSpecs);if(this.executor=new K3(Qv.Instance.transformGraph(t,this.signature)),this.executor.weightMap=this.convertTensorMapToTensorsMap(s),this.executor.resourceManager=this.resourceManager,e.modelInitializer!=null&&e.modelInitializer.node!=null){let r=Qv.Instance.transformGraph(e.modelInitializer);this.initializer=new K3(r),this.initializer.weightMap=this.executor.weightMap,this.initializer.resourceManager=this.resourceManager,this.initializer.executeAsync({},[])}return!0}async save(e,t){if(typeof e=="string"){let n=this.io.getSaveHandlers(e);if(n.length===0)throw new Error(`Cannot find any save handlers for URL '${e}'`);if(n.length>1)throw new Error(`Found more than one (${n.length}) save handlers for URL '${e}'`);e=n[0]}if(e.save==null)throw new Error("GraphModel.save() cannot proceed because the IOHandler provided does not have the `save` attribute defined.");return e.save(this.artifacts)}predict(e,t){let n=this.execute(e,this.outputNodes);if(this.structuredOutputKeys){let s=n instanceof st?[n]:n,r={};return s.forEach((a,o)=>r[this.structuredOutputKeys[o]]=a),r}return n}normalizeInputs(e){if(!(e instanceof st)&&!Array.isArray(e))return e;if(e=Array.isArray(e)?e:[e],e.length!==this.inputNodes.length)throw new Error(`Input tensor count mismatch,the graph model has ${this.inputNodes.length} placeholders, while there are ${e.length} input tensors.`);return this.inputNodes.reduce((t,n,s)=>(t[n]=e[s],t),{})}normalizeOutputs(e){return e=e||this.outputNodes,Array.isArray(e)?e:[e]}execute(e,t){e=this.normalizeInputs(e),t=this.normalizeOutputs(t);let n=this.executor.execute(e,t);return n.length>1?n:n[0]}async executeAsync(e,t){e=this.normalizeInputs(e),t=this.normalizeOutputs(t);let n=await this.executor.executeAsync(e,t);return n.length>1?n:n[0]}getIntermediateTensors(){return this.executor.getIntermediateTensors()}disposeIntermediateTensors(){this.executor.disposeIntermediateTensors()}convertTensorMapToTensorsMap(e){return Object.keys(e).reduce((t,n)=>(t[n]=[e[n]],t),{})}dispose(){this.executor.dispose(),this.initializer&&this.initializer.dispose(),this.resourceManager.dispose()}};async function xx(e,t={},n=On){if(e==null)throw new Error("modelUrl in loadGraphModel() cannot be null. Please provide a url or an IOHandler that loads the model");t==null&&(t={}),t.fromTFHub&&typeof e=="string"&&(e=Aq(e));let s=new Ch(e,t,n);return await s.load(),s}function yq(e){if(e==null)throw new Error("modelUrl in loadGraphModelSync() cannot be null. Please provide model artifacts or an IOHandler that loads the model");let t;if(e instanceof Array){let[s,r]=e;if(!s)throw new Error("modelJSON must be the first element of the array");if(!r||!(r instanceof ArrayBuffer))throw new Error("An ArrayBuffer of weights must be the second element of the array");if(!("modelTopology"in s))throw new Error("Model JSON is missing 'modelTopology'");if(!("weightsManifest"in s))throw new Error("Model JSON is missing 'weightsManifest'");let a=On.getWeightSpecs(s.weightsManifest),o=On.getModelArtifactsForJSONSync(s,a,r);t=On.fromMemorySync(o)}else if("load"in e)t=e;else if("modelTopology"in e&&"weightSpecs"in e&&"weightData"in e)t=On.fromMemorySync(e);else throw new Error("Unknown model format");let n=new Ch(t);return n.load(),n}function Aq(e){return e.endsWith("/")||(e=e+"/"),`${e}${gq}${mq}`}var xq="3.21.0",sS={};We(sS,{CSVDataset:()=>pS,Dataset:()=>Jc,FileDataSource:()=>xS,TextLineDataset:()=>dS,URLDataSource:()=>bS,array:()=>Vq,csv:()=>Qq,func:()=>eX,generator:()=>tX,microphone:()=>sX,version_data:()=>rX,webcam:()=>nX,zip:()=>Uq});var bq=fo(Em()),vq=fo(Em());function wq(e,t){return Am(e,t)}function Am(e,t,n=new Map,s=new Set){if(e==null)return null;if(typeof Blob=="function"&&e instanceof Blob)return e.slice();if(s.has(e))throw new Error("Circular references are not supported.");if(n.has(e))return n.get(e);let r=t(e);if(r.recurse&&r.value!==null)throw new Error("A deep map function may not return both a value and recurse=true.");if(r.recurse)if(uc(e)){let a=Array.isArray(e)?[]:{};s.add(e);for(let o in e){let i=e[o],l=Am(i,t,n,s);a[o]=l}return s.delete(e),e.__proto__&&(a.__proto__=e.__proto__),a}else throw new Error(`Can't recurse into non-iterable type: ${e}`);else return n.set(e,r.value),r.value}function kq(e,t=aS){return rS(e,t)}function rS(e,t,n=new Set){let s=e[0];if(n.has(s))throw new Error("Circular references are not supported.");let r=t(e);if(r.recurse&&r.value!==null)throw new Error("A deep zip function may not return both a value and recurse=true.");if(r.recurse)if(uc(s)){let a=Array.isArray(s)?[]:{};n.add(s);for(let o in s){let i=e.map(u=>u[o]),l=rS(i,t,n);a[o]=l}return n.delete(s),a}else throw new Error(`Can't recurse into non-iterable type: ${s}`);else return r.value}function aS(e){return e===null?null:uc(e[0])?{value:null,recurse:!0}:{value:e,recurse:!1}}async function oS(e,t){let n=new Map;Am(e,t,n);for(let r of Array.from(n.keys())){let a=n.get(r);if(v.isPromise(a)){let o=await a;n.set(r,o)}}return Am(e,t,n)}function uc(e){let t=!1;if(U().get("IS_BROWSER"))t=e instanceof TextDecoder;else{let{StringDecoder:n}=nw();t=e instanceof n}return e!=null&&!ArrayBuffer.isView(e)&&(Array.isArray(e)||typeof e=="object"&&!(e instanceof st)&&!(e instanceof Promise)&&!t)}function Sq(e){return e==null||Iq(e)||Array.isArray(e)||typeof e=="object"&&e instanceof st||v.isTypedArray(e)}function Iq(e){return e===null||typeof e!="object"&&typeof e!="function"}function Cq(e){return wq(e,Tq)}function Tq(e){return e instanceof st?{value:e.clone(),recurse:!1}:uc(e)?{value:null,recurse:!0}:{value:e,recurse:!1}}var iS=class{constructor(e){if(this.capacity=e,this.begin=0,this.end=0,e==null)throw new RangeError("Can't create a ring buffer of unknown capacity.");if(e<1)throw new RangeError("Can't create ring buffer of capacity < 1.");this.data=new Array(e),this.doubledCapacity=2*e}wrap(e){for(;e<0;)e+=this.doubledCapacity;return e%this.doubledCapacity}get(e){if(e<0)throw new RangeError("Can't get item at a negative index.");return this.data[e%this.capacity]}set(e,t){if(e<0)throw new RangeError("Can't set item at a negative index.");this.data[e%this.capacity]=t}length(){let e=this.end-this.begin;return e<0&&(e=this.doubledCapacity+e),e}isFull(){return this.length()===this.capacity}isEmpty(){return this.length()===0}push(e){if(this.isFull())throw new RangeError("Ring buffer is full.");this.set(this.end,e),this.end=this.wrap(this.end+1)}pushAll(e){for(let t of e)this.push(t)}pop(){if(this.isEmpty())throw new RangeError("Ring buffer is empty.");this.end=this.wrap(this.end-1);let e=this.get(this.end);return this.set(this.end,void 0),e}unshift(e){if(this.isFull())throw new RangeError("Ring buffer is full.");this.begin=this.wrap(this.begin-1),this.set(this.begin,e)}shift(){if(this.isEmpty())throw new RangeError("Ring buffer is empty.");let e=this.get(this.begin);return this.set(this.begin,void 0),this.begin=this.wrap(this.begin+1),e}shuffleExcise(e){if(this.isEmpty())throw new RangeError("Ring buffer is empty.");let t=this.wrap(this.begin+e),n=this.get(t);return this.set(t,this.pop()),n}},bx=class extends iS{constructor(){super(bx.INITIAL_CAPACITY)}isFull(){return!1}push(e){super.isFull()&&this.expand(),super.push(e)}unshift(e){super.isFull()&&this.expand(),super.unshift(e)}expand(){let e=this.capacity*2,t=new Array(e),n=this.length();for(let s=0;st===!0)}rowMajorBatch(e,t=!0){return new Fq(this,e,t)}columnMajorBatch(e,t=!0,n=aS){return this.rowMajorBatch(e,t).map(r=>kq(r,n))}concatenate(e,t){return new uS(lS([this,e]),t)}take(e){return e<0||e==null?this:new Pq(this,e)}skip(e){return e<0||e==null?this:new $q(this,e)}prefetch(e){return new cS(this,e)}shuffle(e,t){return new Wq(this,e,t)}serial(){return new Dq(this)}},Rq=class extends Nn{constructor(e){super(),this.items=e,this.trav=0}summary(){return`Array of ${this.items.length} items`}async next(){if(this.trav>=this.items.length)return{value:null,done:!0};let e=this.items[this.trav];return this.trav++,{value:Cq(e),done:!1}}},_q=class extends Nn{constructor(e){super(),this.nextFn=e}summary(){return"Function call"}async next(){try{return this.nextFn()}catch(e){throw e.message=`Error thrown while iterating through a dataset: ${e.message}`,e}}},Dq=class extends Nn{constructor(e){super(),this.upstream=e,this.lastRead=Promise.resolve({value:null,done:!1})}summary(){return`${this.upstream.summary()} -> Serial`}async next(){return this.lastRead=this.lastRead.then(()=>this.serialNext()),this.lastRead}async serialNext(){return this.upstream.next()}},$q=class extends Nn{constructor(e,t){super(),this.upstream=e,this.maxCount=t,this.count=0,this.lastRead=Promise.resolve({value:null,done:!1})}summary(){return`${this.upstream.summary()} -> Skip`}async next(){return this.lastRead=this.lastRead.then(()=>this.serialNext()),this.lastRead}async serialNext(){for(;this.count++ Take`}async next(){return this.count++>=this.maxCount?{value:null,done:!0}:this.upstream.next()}},Fq=class extends Nn{constructor(e,t,n=!0){super(),this.upstream=e,this.batchSize=t,this.enableSmallLastBatch=n,this.lastRead=Promise.resolve({value:null,done:!1})}summary(){return`${this.upstream.summary()} -> RowMajorBatch`}async next(){return this.lastRead=this.lastRead.then(()=>this.serialNext()),this.lastRead}async serialNext(){let e=[];for(;e.length0?{value:e,done:!1}:{value:null,done:!0};e.push(t.value)}return{value:e,done:!1}}},Oq=class extends Nn{constructor(e,t){super(),this.upstream=e,this.predicate=t,this.lastRead=Promise.resolve({value:null,done:!1})}summary(){return`${this.upstream.summary()} -> Filter`}async next(){return this.lastRead=this.lastRead.then(()=>this.serialNext()),this.lastRead}async serialNext(){for(;;){let e=await this.upstream.next();if(e.done||this.predicate(e.value))return e;Y(e.value)}}},Mq=class extends Nn{constructor(e,t){super(),this.upstream=e,this.transform=t}summary(){return`${this.upstream.summary()} -> Map`}async next(){let e=await this.upstream.next();if(e.done)return{value:null,done:!0};let t=Dr.getTensorsInContainer(e.value),n=this.transform(e.value),s=Dr.getTensorsInContainer(n);for(let r of t)Dr.isTensorInList(r,s)||r.dispose();return{value:n,done:!1}}},zq=class extends Nn{constructor(e,t){super(),this.upstream=e,this.handler=t,this.count=0,this.lastRead=Promise.resolve({value:null,done:!1})}summary(){return`${this.upstream.summary()} -> handleErrors`}async next(){return this.lastRead=this.lastRead.then(()=>this.serialNext()),this.lastRead}async serialNext(){for(;;)try{return await this.upstream.next()}catch(e){if(!this.handler(e))return{value:null,done:!0}}}},o7=class extends Nn{constructor(e,t){super(),this.upstream=e,this.transform=t}summary(){return`${this.upstream.summary()} -> AsyncMap`}async next(){let e=await this.upstream.next();if(e.done)return{value:null,done:!0};let t=Dr.getTensorsInContainer(e.value),n=await this.transform(e.value),s=Dr.getTensorsInContainer(n);for(let r of t)Dr.isTensorInList(r,s)||r.dispose();return{value:n,done:!1}}},wx=class extends Nn{constructor(){super(),this.outputQueue=new bx,this.lastRead=Promise.resolve({value:null,done:!1})}async next(){return this.lastRead=this.lastRead.then(()=>this.serialNext()),this.lastRead}async serialNext(){for(;this.outputQueue.length()===0;)if(!await this.pump())return{value:null,done:!0};return{value:this.outputQueue.shift(),done:!1}}},Lq=class extends wx{constructor(e,t){super(),this.upstream=e,this.transform=t}summary(){return`${this.upstream.summary()} -> Flatmap`}async pump(){let e=await this.upstream.next();if(e.done)return!1;let t=Dr.getTensorsInContainer(e.value),n=this.transform(e.value),s=Dr.getTensorsInContainer(n);this.outputQueue.pushAll(n);for(let r of t)Dr.isTensorInList(r,s)||r.dispose();return!0}},uS=class extends Nn{constructor(e,t){super(),this.baseErrorHandler=t,this.lastRead=null,this.iterator=null,this.moreIterators=e}summary(){return"TODO: fill in upstream of chained summaries -> Chained"}async next(){return this.lastRead=this.readFromChain(this.lastRead),this.lastRead}async readFromChain(e){if(await e,this.iterator==null){let n=await this.moreIterators.next();if(n.done)return{value:null,done:!0};this.iterator=n.value,this.baseErrorHandler!=null&&(this.iterator=this.iterator.handleErrors(this.baseErrorHandler))}let t=await this.iterator.next();return t.done?(this.iterator=null,this.readFromChain(e)):t}},Ya;(function(e){e[e.FAIL=0]="FAIL",e[e.SHORTEST=1]="SHORTEST",e[e.LONGEST=2]="LONGEST"})(Ya||(Ya={}));var Bq=class extends Nn{constructor(e,t=Ya.FAIL){super(),this.iterators=e,this.mismatchMode=t,this.count=0,this.currentPromise=null}summary(){return"{TODO: fill in upstream of zip summaries} -> Zip"}async nextState(e){await e;let t=0,n=0;function s(a){return a instanceof Nn?{value:a.next().then(i=>(t++,i.done&&n++,i.value)),recurse:!1}:{value:null,recurse:!0}}let r=await oS(this.iterators,s);if(t===n)return{value:null,done:!0};if(n>0)switch(this.mismatchMode){case Ya.FAIL:throw new Error(`Zipped streams should have the same length. Mismatched at element ${this.count}.`);case Ya.SHORTEST:return{value:null,done:!0};case Ya.LONGEST:default:}return this.count++,{value:r,done:!1}}async next(){return this.currentPromise=this.nextState(this.currentPromise),this.currentPromise}},cS=class extends Nn{constructor(e,t){super(),this.upstream=e,this.bufferSize=t,this.buffer=new iS(t)}summary(){return`${this.upstream.summary()} -> Prefetch`}refill(){for(;!this.buffer.isFull();){let e=this.upstream.next();this.buffer.push(e)}}next(){return this.refill(),this.buffer.shift()}},Wq=class extends cS{constructor(e,t,n){super(e,t),this.upstream=e,this.windowSize=t,this.upstreamExhausted=!1,this.random=vq.alea(n||v.now().toString()),this.lastRead=Promise.resolve({value:null,done:!1})}async next(){return this.lastRead=this.lastRead.then(()=>this.serialNext()),this.lastRead}randomInt(e){return Math.floor(this.random()*e)}chooseIndex(){return this.randomInt(this.buffer.length())}async serialNext(){for(this.upstreamExhausted||this.refill();!this.buffer.isEmpty();){let e=this.chooseIndex(),t=await this.buffer.shuffleExcise(e);if(t.done)this.upstreamExhausted=!0;else return this.refill(),t}return{value:null,done:!0}}},Jc=class{constructor(){this.size=null}batch(e,t=!0){let n=this;v.assert(e>0,()=>`batchSize needs to be positive, but it is + ${e}`);let s;return this.size===1/0||this.size==null?s=this.size:t?s=Math.ceil(this.size/e):s=Math.floor(this.size/e),Es(async()=>(await n.iterator()).columnMajorBatch(e,t,Gq),s)}concatenate(e){let t=this,n;return this.size===1/0||e.size===1/0?n=1/0:this.size!=null&&e.size!=null?n=this.size+e.size:n=null,Es(async()=>(await t.iterator()).concatenate(await e.iterator()),n)}filter(e){let t=this,n;return this.size===1/0?n=1/0:n=null,Es(async()=>(await t.iterator()).filter(s=>X(()=>e(s))),n)}async forEachAsync(e){return(await this.iterator()).forEachAsync(e)}map(e){let t=this;return Es(async()=>(await t.iterator()).map(n=>X(()=>e(n))),this.size)}mapAsync(e){let t=this;return Es(async()=>(await t.iterator()).mapAsync(e),this.size)}prefetch(e){if(e==null)throw new RangeError("`Dataset.prefetch()` requires bufferSize to be specified.");let t=this;return Es(async()=>(await t.iterator()).prefetch(e),this.size)}repeat(e){let t=this,n;return this.size!=null&&e>0?n=this.size*e:e===0?n=0:this.size!=null&&(e===void 0||e<0)?n=1/0:n=null,Es(async()=>{let s=vx(async()=>({value:await t.iterator(),done:!1}));return Nq(s.take(e))},n)}skip(e){let t=this,n;return this.size!=null&&e>=0&&this.size>=e?n=this.size-e:this.size!=null&&(this.size(await t.iterator()).skip(e),n)}shuffle(e,t,n=!0){if(e==null||e<0)throw this.size==null?new RangeError("`Dataset.shuffle()` requires bufferSize to be specified."):new RangeError(`\`Dataset.shuffle()\` requires bufferSize to be specified. If your data fits in main memory (for regular JS objects), and/or GPU memory (for \`tf.Tensor\`s), consider setting bufferSize to the dataset size (${this.size} elements)`);let s=this,r=bq.alea(t||v.now().toString());return Es(async()=>{let a=r.int32();return n&&(a+=r.int32()),(await s.iterator()).shuffle(e,a.toString())},this.size)}take(e){let t=this,n;return this.size!=null&&this.size>e?n=e:this.size!=null&&this.size<=e?n=this.size:n=null,Es(async()=>(await t.iterator()).take(e),n)}async toArray(){if(this.size===1/0)throw new Error("Can not convert infinite data stream to array.");return(await this.iterator()).toArray()}async toArrayForTest(){if(this.size===1/0)throw new Error("Can not convert infinite data stream to array.");return(await this.iterator()).toArrayForTest()}};Jc.MAX_BUFFER_SIZE=1e4;function Es(e,t=null){return new class extends Jc{constructor(){super(...arguments),this.size=t}async iterator(){return e()}}}function Vq(e){return Es(async()=>lS(e),e.length)}function Uq(e){if(!uc(e))throw new Error("The argument to zip() must be an object or array.");let t;if(Array.isArray(e))for(let n=0;n{let n=await oS(e,s=>{if(s instanceof Jc)return{value:s.iterator(),recurse:!1};if(uc(s))return{value:null,recurse:!0};throw new Error("Leaves of the structure passed to zip() must be Datasets, not primitives.")});return Eq(n,Ya.SHORTEST)},t)}function Gq(e){if(e===null)return null;let t=e[0];return Sq(t)?{value:Hq(e),recurse:!1}:{value:null,recurse:!0}}function Hq(e){if(e.length===0)throw new Error("Can't make a batch of zero elements.");return e[0]instanceof st?ln(e):Ue(e)}var dS=class extends Jc{constructor(e){super(),this.input=e}async iterator(){return(await this.input.iterator()).decodeUTF8().split(` +`).map(s=>(s.endsWith("\r")&&(s=s.slice(0,-1)),s))}},Pf='"',Gd=Symbol("out"),i7=Symbol("field"),Ff=Symbol("quote"),i3=Symbol("quoteafterquote"),l7=Symbol("quoteinquote"),pS=class extends Jc{constructor(e,t){super(),this.input=e,this.hasHeader=!0,this.fullColumnNames=null,this.columnNamesValidated=!1,this.columnConfigs=null,this.configuredColumnsOnly=!1,this.delimiter=",",this.delimWhitespace=!1,this.base=new dS(e),t||(t={}),this.hasHeader=t.hasHeader!==!1,this.fullColumnNames=t.columnNames,this.columnConfigs=t.columnConfigs,this.configuredColumnsOnly=t.configuredColumnsOnly,t.delimWhitespace?(v.assert(t.delimiter==null,()=>"Delimiter should not be provided when delimWhitespace is true."),this.delimWhitespace=!0,this.delimiter=" "):this.delimiter=t.delimiter?t.delimiter:","}async columnNames(){return this.columnNamesValidated||await this.setColumnNames(),this.configuredColumnsOnly?Object.keys(this.columnConfigs):this.fullColumnNames}async setColumnNames(){let e=await this.maybeReadHeaderLine();if(!this.fullColumnNames&&!e)throw new Error("Column names must be provided if there is no header line.");this.fullColumnNames&&e&&v.assert(e.length===this.fullColumnNames.length,()=>"The length of provided columnNames ("+this.fullColumnNames.length.toString()+") does not match the length of the header line read from file ("+e.length.toString()+")."),this.fullColumnNames||(this.fullColumnNames=e);let t=this.fullColumnNames.reduce((s,r)=>(s[r]=s[r]+1||1,s),{}),n=Object.keys(t).filter(s=>t[s]>1);if(v.assert(n.length===0,()=>"Duplicate column names found: "+n.toString()),this.columnConfigs){for(let s of Object.keys(this.columnConfigs))if(this.fullColumnNames.indexOf(s)===-1)throw new Error('The key "'+s+'" provided in columnConfigs does not match any of the column names ('+this.fullColumnNames.toString()+").")}this.columnNamesValidated=!0}async maybeReadHeaderLine(){if(this.hasHeader){let t=await(await this.base.iterator()).next();if(t.done)throw new Error("No data was found for CSV parsing.");let n=t.value;return this.parseRow(n,!1)}else return null}async iterator(){this.columnNamesValidated||await this.setColumnNames();let e=await this.base.iterator();return this.hasHeader&&(e=e.skip(1)),e.map(t=>this.makeDataElement(t))}makeDataElement(e){let t=this.parseRow(e),n={},s={};for(let r=0;r14||!Number.isInteger(t))throw new Error(`Invalid fftSize: it must be a power of 2 between 2 to 4 and 2 to 14, but got ${this.fftSize}`);if(this.numFrames=e.numFramesPerSpectrogram||43,this.sampleRateHz=e.sampleRateHz,this.columnTruncateLength=e.columnTruncateLength||this.fftSize,this.audioTrackConstraints=e.audioTrackConstraints,this.smoothingTimeConstant=e.smoothingTimeConstant||0,this.includeSpectrogram=e.includeSpectrogram!==!1,this.includeWaveform=e.includeWaveform===!0,!this.includeSpectrogram&&!this.includeWaveform)throw new Error("Both includeSpectrogram and includeWaveform are false. At least one type of data should be returned.")}summary(){return"microphone"}static async create(e={}){if(!U().get("IS_BROWSER"))throw new Error("microphone API is only supported in browser environment.");let t=new hS(e);return await t.start(),t}async start(){try{this.stream=await navigator.mediaDevices.getUserMedia({audio:this.audioTrackConstraints==null?!0:this.audioTrackConstraints,video:!1})}catch(n){throw new Error(`Error thrown while initializing video stream: ${n.message}`)}if(!this.stream)throw new Error("Could not obtain audio from microphone.");let e=window.AudioContext||window.webkitAudioContext;if(this.audioContext=new e,!this.sampleRateHz)this.sampleRateHz=this.audioContext.sampleRate;else if(this.audioContext.sampleRate!==this.sampleRateHz)throw new Error(`Mismatch in sampling rate: Expected: ${this.sampleRateHz}; Actual: ${this.audioContext.sampleRate}`);let t=this.audioContext.createMediaStreamSource(this.stream);this.analyser=this.audioContext.createAnalyser(),this.analyser.fftSize=this.fftSize*2,this.analyser.smoothingTimeConstant=this.smoothingTimeConstant,t.connect(this.analyser),this.freqData=new Float32Array(this.fftSize),this.timeData=new Float32Array(this.fftSize)}async next(){if(this.isClosed)return{value:null,done:!0};let e,t,n=await this.getAudioData();if(this.includeSpectrogram){let s=this.flattenQueue(n.freqDataQueue);e=this.getTensorFromAudioDataArray(s,[this.numFrames,this.columnTruncateLength,1])}if(this.includeWaveform){let s=this.flattenQueue(n.timeDataQueue);t=this.getTensorFromAudioDataArray(s,[this.numFrames*this.fftSize,1])}return{value:{spectrogram:e,waveform:t},done:!1}}async capture(){return(await this.next()).value}async getAudioData(){let e=[],t=[],n=0;return new Promise(s=>{let r=setInterval(()=>{this.includeSpectrogram&&(this.analyser.getFloatFrequencyData(this.freqData),this.freqData[0]===-1/0&&s({freqDataQueue:e,timeDataQueue:t}),e.push(this.freqData.slice(0,this.columnTruncateLength))),this.includeWaveform&&(this.analyser.getFloatTimeDomainData(this.timeData),t.push(this.timeData.slice())),++n===this.numFrames&&(clearInterval(r),s({freqDataQueue:e,timeDataQueue:t}))},this.fftSize/this.sampleRateHz*1e3)})}stop(){this.isClosed||(this.isClosed=!0,this.analyser.disconnect(),this.audioContext.close(),this.stream!=null&&this.stream.getTracks().length>0&&this.stream.getTracks()[0].stop())}toArray(){throw new Error("Can not convert infinite audio stream to array.")}getSampleRate(){return this.sampleRateHz}flattenQueue(e){let t=e[0].length,n=new Float32Array(e.length*t);return e.forEach((s,r)=>n.set(s,r*t)),n}getTensorFromAudioDataArray(e,t){let n=new Float32Array(v.sizeFromShape(t));return n.set(e,n.length-e.length),Ue(n,t)}},fS=class extends Nn{constructor(e,t){if(super(),this.webcamVideoElement=e,this.webcamConfig=t,this.isClosed=!0,this.resize=!1,this.needToResize())if(this.resize=!0,this.cropSize=[this.webcamConfig.resizeHeight,this.webcamConfig.resizeWidth],this.cropBoxInd=Ot([0],"int32"),this.webcamConfig.centerCrop){let n=this.webcamConfig.resizeWidth*1/this.webcamVideoElement.width,s=this.webcamConfig.resizeHeight*1/this.webcamVideoElement.height,r=(1-n)/2,a=(1-s)/2,o=r+n,i=s+a;this.cropBox=mr([a,r,i,o],[1,4])}else this.cropBox=mr([0,0,1,1],[1,4])}summary(){return"webcam"}static async create(e,t={}){if(!U().get("IS_BROWSER"))throw new Error("tf.data.webcam is only supported in browser environment.");if(!e){if(e=document.createElement("video"),!t.resizeWidth||!t.resizeHeight)throw new Error("Please provide webcam video element, or resizeWidth and resizeHeight to create a hidden video element.");e.width=t.resizeWidth,e.height=t.resizeHeight}let n=new fS(e,t);return await n.start(),n}async start(){this.webcamConfig.facingMode&&v.assert(this.webcamConfig.facingMode==="user"||this.webcamConfig.facingMode==="environment",()=>`Invalid webcam facing mode: ${this.webcamConfig.facingMode}. Please provide 'user' or 'environment'`);try{this.stream=await navigator.mediaDevices.getUserMedia({video:{deviceId:this.webcamConfig.deviceId,facingMode:this.webcamConfig.facingMode?this.webcamConfig.facingMode:"user",width:this.webcamVideoElement.width,height:this.webcamVideoElement.height}})}catch(e){throw e.message=`Error thrown while initializing video stream: ${e.message}`,e}if(!this.stream)throw new Error("Could not obtain video from webcam.");try{this.webcamVideoElement.srcObject=this.stream}catch(e){console.log(e),this.webcamVideoElement.src=window.URL.createObjectURL(this.stream)}return this.webcamVideoElement.play(),this.isClosed=!1,new Promise(e=>{this.webcamVideoElement.onloadedmetadata=()=>{e()}})}async next(){if(this.isClosed)return{value:null,done:!0};let e;try{e=ra.fromPixels(this.webcamVideoElement)}catch(t){throw new Error(`Error thrown converting video to pixels: ${JSON.stringify(t)}`)}if(this.resize)try{return{value:this.cropAndResizeFrame(e),done:!1}}catch(t){throw new Error(`Error thrown cropping the video: ${t.message}`)}finally{e.dispose()}else return{value:e,done:!1}}needToResize(){return!!(this.webcamConfig.resizeWidth&&this.webcamConfig.resizeHeight&&(this.webcamVideoElement.width!==this.webcamConfig.resizeWidth||this.webcamVideoElement.height!==this.webcamConfig.resizeHeight))}cropAndResizeFrame(e){return X(()=>{let t=Ft(me(e,"float32"),0),n;n=ke.cropAndResize(t,this.cropBox,this.cropBoxInd,this.cropSize,"bilinear");let s=n.shape;return W(n,s.slice(1))})}async capture(){return(await this.next()).value}stop(){this.stream.getTracks().forEach(t=>t.stop());try{this.webcamVideoElement.srcObject=null}catch(t){console.log(t),this.webcamVideoElement.src=null}this.isClosed=!0}toArray(){throw new Error("Can not convert infinite video stream to array.")}},mS=class{},gS=class extends Nn{split(e){return new jq(this,e)}},jq=class extends gS{constructor(e,t){super(),this.upstream=e,this.impl=new qq(e,t)}summary(){return this.impl.summary()}async next(){return this.impl.next()}},qq=class extends wx{constructor(e,t){super(),this.upstream=e,this.separator=t,this.carryover=""}summary(){return`${this.upstream.summary()} -> Split('${this.separator}')`}async pump(){let e=await this.upstream.next();if(e.done)return this.carryover===""?!1:(this.outputQueue.push(this.carryover),this.carryover="",!0);let t=e.value.split(this.separator);t[0]=this.carryover+t[0];for(let n of t.slice(0,-1))this.outputQueue.push(n);return this.carryover=t[t.length-1],!0}},Xq=class extends Nn{decodeUTF8(){return new Kq(this)}},Kq=class extends gS{constructor(e){super(),this.upstream=e,this.impl=new Zq(e)}summary(){return this.impl.summary()}async next(){return this.impl.next()}},Zq=class extends wx{constructor(e){if(super(),this.upstream=e,U().get("IS_BROWSER"))this.decoder=new TextDecoder("utf-8");else{let{StringDecoder:t}=nw();this.decoder=new t("utf8")}}summary(){return`${this.upstream.summary()} -> Utf8`}async pump(){let e=await this.upstream.next(),t;if(e.done)return!1;t=e.value;let n;return U().get("IS_BROWSER")?n=this.decoder.decode(t,{stream:!0}):n=this.decoder.write(Buffer.from(t.buffer)),this.outputQueue.push(n),!0}},yS=class extends Xq{constructor(e,t={}){super(),this.file=e,this.options=t,v.assert(e instanceof Uint8Array||(U().get("IS_BROWSER")?e instanceof File||e instanceof Blob:!1),()=>"FileChunkIterator only supports File, Blob and Uint8Array right now."),this.offset=t.offset||0,this.chunkSize=t.chunkSize||1024*1024}summary(){return`FileChunks ${this.file}`}async next(){return this.offset>=(this.file instanceof Uint8Array?this.file.byteLength:this.file.size)?{value:null,done:!0}:{value:await new Promise((t,n)=>{let s=this.offset+this.chunkSize;if(this.file instanceof Uint8Array)t(new Uint8Array(this.file.slice(this.offset,s)));else{let r=new FileReader;r.onload=o=>{let i=r.result;if(i instanceof ArrayBuffer&&(i=new Uint8Array(i)),!(i instanceof Uint8Array))return n(new TypeError("FileReader returned unknown type."));t(i)},r.onabort=o=>n(new Error("Aborted")),r.onerror=o=>n(new Error(o.type));let a=this.file.slice(this.offset,s);r.readAsArrayBuffer(a)}this.offset=s}),done:!1}}};async function Yq(e,t={},n){let s,r;typeof e=="string"?s=e:(s=e.url,r=Jq(e));let a=await(n||v.fetch)(s,r);if(a.ok){let o=new Uint8Array(await a.arrayBuffer());return new yS(o,t)}else throw new Error(a.statusText)}var Jq=e=>({method:e.method,headers:e.headers,body:e.body,mode:e.mode,credentials:e.credentials,cache:e.cache,redirect:e.redirect,referrer:e.referrer,integrity:e.integrity});function AS(e){return typeof e=="string"&&e.slice(0,7)==="file://"}var xS=class extends mS{constructor(e,t={}){super(),this.input=e,this.options=t}async iterator(){if(AS(this.input)&&U().get("IS_NODE")){let e=gy();this.input=e.readFileSync(this.input.slice(7))}return new yS(this.input,this.options)}},bS=class extends mS{constructor(e,t={}){super(),this.url=e,this.fileOptions=t}async iterator(){return AS(this.url)?new xS(this.url,this.fileOptions).iterator():Yq(this.url,this.fileOptions)}};function Qq(e,t={}){return new pS(new bS(e),t)}function eX(e){let t=vx(e);return Es(async()=>t)}function tX(e){return Es(async()=>{let t=await e();return vx(()=>t.next())})}async function nX(e,t){return fS.create(e,t)}async function sX(e){return hS.create(e)}var rX="3.21.0";function Te(e,t){Array.isArray(e)||(e=[e]),e.forEach(n=>{n!=null&&v.assert(n.dtype!=="complex64",()=>`${t} does not support complex64 tensors in the CPU backend.`)})}var aX=Ar.whereImpl,kx=class extends fc{constructor(){super(),this.blockSize=48,this.firstUse=!0,this.data=new Tp(this,Jt())}nextDataId(){return kx.nextDataId++}write(e,t,n){this.firstUse&&(this.firstUse=!1,U().get("IS_NODE")&&T.warn(` ============================ Hi, looks like you are running TensorFlow.js in Node.js. To speed things up dramatically, install our node backend, visit https://github.com/tensorflow/tfjs-node for more details. -============================`));let s={id:this.nextDataId()};return this.data.set(s,{values:e,dtype:n,refCount:1}),s}makeTensorInfo(e,t,n){let s;if(t==="string"&&n!=null&&n.length>0&&v.isString(n[0])){let r=n.map(a=>v.encodeString(a));s=this.write(r,e,t)}else s=this.write(n,e,t);return{dataId:s,shape:e,dtype:t}}refCount(e){return this.data.has(e)?this.data.get(e).refCount:0}incRef(e){let t=this.data.get(e);t.refCount++}decRef(e){if(this.data.has(e)){let t=this.data.get(e);t.refCount--}}move(e,t,n,s,r){this.data.set(e,{values:t,dtype:s,refCount:r})}numDataIds(){return this.data.numDataIds()}async read(e){return this.readSync(e)}readSync(e){let{dtype:t,complexTensorInfos:n}=this.data.get(e);if(t==="complex64"){let s=this.readSync(n.real.dataId),r=this.readSync(n.imag.dataId);return T.mergeRealAndImagArrays(s,r)}return this.data.get(e).values}bufferSync(e){let t=this.readSync(e.dataId);if(e.dtype==="string")try{let n=t.map(s=>v.decodeString(s));return Ue(e.shape,e.dtype,n)}catch(n){throw new Error("Failed to decode encoded string bytes into utf-8")}return Ue(e.shape,e.dtype,t)}makeOutput(e,t,n){return Qt().makeTensorFromTensorInfo(this.makeTensorInfo(t,n,e),this)}disposeData(e,t=!1){if(this.data.has(e)){if(this.data.get(e).refCount--,!t&&this.data.get(e).refCount>0)return!1;let{complexTensorInfos:n}=this.data.get(e);n!=null&&(this.disposeData(n.real.dataId,!0),this.disposeData(n.imag.dataId,!0)),this.data.delete(e)}return!0}disposeIntermediateTensorInfo(e){this.disposeData(e.dataId)}async time(e){let t=v.now();return e(),{kernelMs:v.now()-t}}memory(){return{unreliable:!0,reasons:["The reported memory is an upper bound. Due to automatic garbage collection, the true allocated memory may be less."]}}where(e){Ne([e],"where");let t=this.readSync(e.dataId);return $X(e.shape,t)}dispose(){}floatPrecision(){return 32}epsilon(){return super.epsilon()}};Ux.nextDataId=0;var Gx={};qe(Gx,{addImpl:()=>LS,bincountImpl:()=>jx,bincountReduceImpl:()=>BS,castImpl:()=>zS,ceilImpl:()=>WS,concatImpl:()=>qx,equalImpl:()=>VS,expImpl:()=>GS,expm1Impl:()=>jS,floorImpl:()=>qS,gatherNdImpl:()=>XS,gatherV2Impl:()=>KS,greaterEqualImpl:()=>YS,greaterImpl:()=>ZS,lessEqualImpl:()=>QS,lessImpl:()=>JS,linSpaceImpl:()=>eI,logImpl:()=>tI,maxImpl:()=>nI,maximumImpl:()=>sI,minimumImpl:()=>rI,multiplyImpl:()=>Xx,negImpl:()=>aI,notEqualImpl:()=>oI,prodImpl:()=>iI,raggedTensorToTensorImpl:()=>lI,rangeImpl:()=>Zx,rsqrtImpl:()=>uI,scatterImpl:()=>sc,sigmoidImpl:()=>vK,simpleAbsImpl:()=>MS,sliceImpl:()=>Um,sparseFillEmptyRowsImpl:()=>dI,sparseReshapeImpl:()=>pI,sparseSegmentReductionImpl:()=>Yx,sqrtImpl:()=>SK,squaredDifferenceImpl:()=>hI,stridedSliceImpl:()=>fI,stringNGramsImpl:()=>Jx,stringSplitImpl:()=>Qx,stringToHashBucketFastImpl:()=>eb,subImpl:()=>mI,tileImpl:()=>gI,topKImpl:()=>AI,transposeImpl:()=>Kx,uniqueImpl:()=>xI});function MS(e){let t=new Float32Array(e.length);for(let n=0;n{let{x:t}=e.inputs,n=e.backend;Ne(t,"abs");let s=new Float32Array(v.sizeFromShape(t.shape)),r=n.data.get(t.dataId).values;return s=MS(r),n.makeOutput(s,t.shape,t.dtype)},FX={kernelName:xl,backendName:"cpu",kernelFunc:PX};function pn(e){return(t,n,s,r,a)=>{let o=T.assertAndGetBroadcastShape(t,n),i=o.length,l=v.computeStrides(o),u=v.sizeFromShape(o),c=v.getTypedArrayFromDType(a,u),p=t.length,d=n.length,h=v.computeStrides(t),f=v.computeStrides(n),m=T.getBroadcastDims(t,o),g=T.getBroadcastDims(n,o);if(m.length+g.length===0)for(let y=0;yA[C]=0);let b=v.locToIndex(A,p,h),w=x.slice(-d);g.forEach(C=>w[C]=0);let k=v.locToIndex(w,d,f);c[y]=e(s[b],r[k])}return[c,o]}}function Ps(e){let{inputs:t,backend:n}=e,{real:s,imag:r}=t,a=n.data.get(s.dataId).values,o=n.data.get(r.dataId).values,i=n.makeTensorInfo(s.shape,"complex64"),l=n.data.get(i.dataId);return l.complexTensorInfos={real:n.makeTensorInfo(s.shape,"float32",a),imag:n.makeTensorInfo(r.shape,"float32",o)},i}var OX={kernelName:jp,backendName:"cpu",kernelFunc:Ps};function Vm(e,t,n="float32"){if(n==="complex64"){let r=Vm(e,t,"float32"),a=Vm(e,t,"float32");return Ps({inputs:{real:r,imag:a},backend:e})}let s=v.makeZerosTypedArray(v.sizeFromShape(t),n);return e.makeTensorInfo(t,n,s)}function ia(e){let{inputs:t,backend:n}=e,{x:s}=t;return n.incRef(s.dataId),{dataId:s.dataId,shape:s.shape,dtype:s.dtype}}var MX={kernelName:zo,backendName:"cpu",kernelFunc:ia};function hl(e){let{inputs:t,backend:n}=e,{input:s}=t,r=n.data.get(s.dataId).complexTensorInfos.real,a=n.data.get(r.dataId).values;return n.makeTensorInfo(r.shape,r.dtype,a)}var zX={kernelName:eh,backendName:"cpu",kernelFunc:hl};function zS(e,t,n,s){if(s==="int32"){let r=Int32Array.from(e);return[t,"int32",r]}if(s==="bool"){let r=v.toTypedArray([0],n),[a,o]=pn((i,l)=>i!==l?1:0)(t,[],e,r,"bool");return[o,"bool",a]}throw new Error(`Error in Cast: failed to cast ${n} to ${s}`)}function mo(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{dtype:a}=s;if(a==="complex64"){if(r.dtype==="complex64")return ia({inputs:{x:r},backend:n});let c=Vm(n,r.shape,r.dtype),p=mo({inputs:{x:r},backend:n,attrs:{dtype:"float32"}}),d=Ps({inputs:{real:p,imag:c},backend:n});return n.disposeIntermediateTensorInfo(c),n.disposeIntermediateTensorInfo(p),d}if(r.dtype==="complex64"){let c=hl({inputs:{input:r},backend:n}),p=mo({inputs:{x:c},backend:n,attrs:{dtype:a}});return n.disposeIntermediateTensorInfo(c),p}if(!v.hasEncodingLoss(r.dtype,a)){let c=ia({inputs:{x:r},backend:n});return{dataId:c.dataId,shape:c.shape,dtype:a}}let o=n.data.get(r.dataId).values,[i,l,u]=zS(o,r.shape,r.dtype,a);return n.makeTensorInfo(i,l,u)}var LX={kernelName:ko,backendName:"cpu",kernelFunc:mo};function Rn(e,t,n,s){return n==null?({inputs:r,backend:a})=>{let{a:o,b:i}=r,l=a;Ne([o,i],e);let u=l.data.get(o.dataId).values,c=l.data.get(i.dataId).values,p=o.dtype==="string"?T.fromUint8ToStringArray(u):u,d=o.dtype==="string"?T.fromUint8ToStringArray(c):c,h=s||o.dtype,[f,m]=t(o.shape,i.shape,p,d,h);return l.makeTensorInfo(m,h,f)}:({inputs:r,backend:a})=>{let{a:o,b:i}=r,l=a;if(o.dtype==="complex64"||i.dtype==="complex64"){let u=mo({inputs:{x:o},backend:l,attrs:{dtype:"complex64"}}),c=l.data.get(u.dataId),p=c.complexTensorInfos.real,d=c.complexTensorInfos.imag,h=l.data.get(p.dataId).values,f=l.data.get(d.dataId).values,m=mo({inputs:{x:i},backend:l,attrs:{dtype:"complex64"}}),g=l.data.get(m.dataId),y=g.complexTensorInfos.real,x=g.complexTensorInfos.imag,A=l.data.get(y.dataId).values,b=l.data.get(x.dataId).values,[w,k,C]=n(o.shape,i.shape,h,f,A,b),E=l.makeTensorInfo(C,"float32",w),_=l.makeTensorInfo(C,"float32",k),$=Ps({inputs:{real:E,imag:_},backend:l});return l.disposeIntermediateTensorInfo(u),l.disposeIntermediateTensorInfo(m),l.disposeIntermediateTensorInfo(E),l.disposeIntermediateTensorInfo(_),$}else{let u=l.data.get(o.dataId).values,c=l.data.get(i.dataId).values,p=s||o.dtype,[d,h]=t(o.shape,i.shape,u,c,p);return l.makeTensorInfo(h,p,d)}}}function Hx(e){return(t,n,s,r,a,o)=>{let i=T.assertAndGetBroadcastShape(t,n),l=v.sizeFromShape(i),u=i.length,c=v.computeStrides(i),p=v.getTypedArrayFromDType("float32",l),d=v.getTypedArrayFromDType("float32",l),h=T.getBroadcastDims(t,i),f=T.getBroadcastDims(n,i),m=T.mergeRealAndImagArrays(s,r),g=T.mergeRealAndImagArrays(a,o),y=t.length,x=v.computeStrides(t),A=n.length,b=v.computeStrides(n);if(h.length+f.length===0)for(let w=0;wC[P]=0);let E=v.locToIndex(C,y,x),_=k.slice(-A);f.forEach(P=>_[P]=0);let $=v.locToIndex(_,A,b),R=e(m[E*2],m[E*2+1],g[$*2],g[$*2+1]);p[w]=R.real,d[w]=R.imag}return[p,d,i]}}var LS=pn((e,t)=>e+t),BX=Hx((e,t,n,s)=>({real:e+n,imag:t+s})),wc=Rn(Da,LS,BX),WX={kernelName:Da,backendName:"cpu",kernelFunc:wc};function jx(e,t,n,s,r){let a=v.sizeFromShape(s),o=v.makeZerosTypedArray(r,n);for(let i=0;i=r||(a>0?o[l]+=t[i]:o[l]+=1)}return o}function BS(e,t,n,s=!1){let r=e.shape[0],a=e.shape[1],o=Ue([r,n],t.dtype);for(let i=0;i=n||(s?o.set(1,i,u):t.size>0?o.set(o.get(i,u)+t.get(i,l),i,u):o.set(o.get(i,u)+1,i,u))}return o}function Ai(e){return(t,n,s)=>{let r=v.getTypedArrayFromDType(n,t.length);for(let a=0;a{let{x:o}=s;if(Ne(o,e),o.dtype==="string"||n==="string")throw new Error("unaryKernelFunc does not support string input/output");let i=a,l=i.data.get(o.dataId).values,u=v.sizeFromShape(o.shape),c=n||o.dtype,p=v.getArrayFromDType(c,u);for(let d=0;d{let{x:o}=s;if(Ne(o,e),o.dtype==="string"||n==="string")throw new Error("unaryKernelFunc does not support string input/output");let i=a,l=i.data.get(o.dataId).values,u=n||o.dtype,c=t(l,u,r);return i.makeTensorInfo(o.shape,u,c)}}var WS=Ai(e=>Math.ceil(e)),VX=dd(So,WS),UX={kernelName:So,backendName:"cpu",kernelFunc:VX};function qx(e,t,n,s){let r=v.getArrayFromDType(n,v.sizeFromShape(t));if(s&&n!=="string"){let a=0;e.forEach(o=>{let i=v.sizeFromShape(o.shape);r.set(o.vals,a),a+=i})}else{let a=0;e.forEach(o=>{let i=n==="string"?T.fromUint8ToStringArray(o.vals):o.vals,l=0;for(let u=0;ue===t?1:0),US=Rn(Cl,VS,null,"bool"),GX={kernelName:Cl,backendName:"cpu",kernelFunc:US},GS=Ai(e=>Math.exp(e)),HS=dd($o,GS,"float32"),HX={kernelName:$o,backendName:"cpu",kernelFunc:HS},jS=Ai(e=>Math.expm1(e)),jX=dd(Nl,jS),qX={kernelName:Nl,backendName:"cpu",kernelFunc:jX},qS=Ai(e=>Math.floor(e)),XX=dd(Po,qS),KX={kernelName:Po,backendName:"cpu",kernelFunc:XX};function XS(e,t,n,s,r,a,o,i,l){let u=Ue([s,a],n);for(let c=0;c=l/a)throw new Error(`Invalid indices: ${p} does not index into ${i}`);for(let h=0;he>t?1:0),ZX=Rn(Dl,ZS,null,"bool"),YX={kernelName:Dl,backendName:"cpu",kernelFunc:ZX},YS=pn((e,t)=>e>=t?1:0),JX=Rn(Mo,YS,null,"bool"),QX={kernelName:Mo,backendName:"cpu",kernelFunc:JX},JS=pn((e,t)=>ee<=t?1:0),nK=Rn(Fl,QS,null,"bool"),sK={kernelName:Fl,backendName:"cpu",kernelFunc:nK};function eI(e,t,n){let s=(t-e)/(n-1),r=v.makeZerosTypedArray(n,"float32");r[0]=e;for(let a=1;aMath.log(e)),rK=dd(Bo,tI),aK={kernelName:Bo,backendName:"cpu",kernelFunc:rK};function nI(e,t,n,s){let r=v.getTypedArrayFromDType(s,v.sizeFromShape(n));for(let a=0;ai)&&(i=u)}r[a]=i}return r}var sI=pn((e,t)=>Math.max(e,t)),oK=Rn(Vo,sI),iK={kernelName:Vo,backendName:"cpu",kernelFunc:oK},rI=pn((e,t)=>Math.min(e,t)),lK=Rn(jo,rI),uK={kernelName:jo,backendName:"cpu",kernelFunc:lK},Xx=pn((e,t)=>e*t),cK=Hx((e,t,n,s)=>({real:e*n-t*s,imag:e*s+t*n})),_2=Rn(Xo,Xx,cK),dK={kernelName:Xo,backendName:"cpu",kernelFunc:_2};function aI(e,t,n){let s=v.createScalarValue(-1,n);return Xx([],t,s,e,n)}function pK(e){let{inputs:t,backend:n}=e,{x:s}=t;Ne(s,"neg");let r=n.data.get(s.dataId).values,[a,o]=aI(r,s.shape,s.dtype);return n.makeTensorInfo(o,s.dtype,a)}var hK={kernelName:zl,backendName:"cpu",kernelFunc:pK},oI=pn((e,t)=>e!==t?1:0),fK=Rn(Ll,oI,null,"bool"),mK={kernelName:Ll,backendName:"cpu",kernelFunc:fK};function Kx(e,t,n,s,r){let a=t.length,o=v.sizeFromShape(t),i=v.computeStrides(t),l=v.computeStrides(r),u=v.getTypedArrayFromDType(n,v.sizeFromShape(r));for(let c=0;cn.disposeIntermediateTensorInfo(x)),n.makeTensorInfo(y,g,f)}var AK={kernelName:Jo,backendName:"cpu",kernelFunc:yK},dr=T.RowPartitionType,yy=class{constructor(e,t,n,s,r,a,o,i,l,u){this.shape=e,this.shapeShape=t,this.values=n,this.valuesShape=s,this.valuesDType=r,this.defaultValue=a,this.defaultValueShape=o,this.rowPartitionValues=i,this.rowPartitionValuesShapes=l,this.rowPartitionTypes=T.getRowPartitionTypesHelper(u),this.raggedRank=T.getRaggedRank(this.rowPartitionTypes)}getRowPartitionTypeByDimension(e){return this.rowPartitionTypes[0]===dr.FIRST_DIM_SIZE?this.rowPartitionTypes[e+1]:this.rowPartitionTypes[e]}getRowPartitionTensor(e){return this.rowPartitionTypes[0]===dr.FIRST_DIM_SIZE?this.rowPartitionValues[e+1]:this.rowPartitionValues[e]}getMaxWidth(e){let t=this.getRowPartitionTensor(e-1);switch(this.getRowPartitionTypeByDimension(e-1)){case dr.VALUE_ROWIDS:return yy.getMaxWidthValueRowID(t);case dr.ROW_SPLITS:return yy.getMaxWidthRowSplit(t);default:throw new Error(`Cannot handle partition type ${dr[this.getRowPartitionTypeByDimension(e-1)]}`)}}static getMaxWidthRowSplit(e){let t=e.length;if(t===0||t===1)return 0;let n=0;for(let s=0;sn&&(n=r)}return n}static getMaxWidthValueRowID(e){let t=e.length;if(t===0)return 0;let n=0,s=e[0],r=0;for(let a=1;a"Final length of result must be equal to firstDimension."),r}calculateOutputIndexRowSplit(e,t,n,s){let r=e.length,a=[];for(let o=0;o0&&a.length!==e[r-1])throw new Error("Invalid row split size.");return a}calculateOutputIndexValueRowID(e,t,n,s){let r=e.length,a=[];if(r===0)return[];let o=0,i=e[0];if(i>=t.length)throw new Error(`Got currentValueRowId=${i}, which is not less than ${t.length}`);let l=t[i];a.push(l);for(let u=1;u=0&&(++o,o=t.length)throw new Error(`Got nextValueRowId=${c} which is not less than ${t.length}`);l=t[c]}a.push(l)}if(a.length!==e.length)throw new Error("Invalid row ids.");return a}calculateOutputIndex(e,t,n,s){let r=this.getRowPartitionTensor(e),a=this.getRowPartitionTypeByDimension(e);switch(a){case dr.VALUE_ROWIDS:return this.calculateOutputIndexValueRowID(r,t,n,s);case dr.ROW_SPLITS:if(r.length-1>t.length)throw new Error(`Row partition size is greater than output size: ${r.length-1} > ${t.length}`);return this.calculateOutputIndexRowSplit(r,t,n,s);default:throw new Error(`Unsupported partition type: ${dr[a]}`)}}getFirstDimensionSize(){let e=this.rowPartitionValues[0];if(this.rowPartitionTypes.length===0)throw new Error("No row_partition_types given.");let t=this.rowPartitionTypes[0];switch(t){case dr.FIRST_DIM_SIZE:return e[0];case dr.VALUE_ROWIDS:throw new Error("Cannot handle VALUE_ROWIDS in first dimension.");case dr.ROW_SPLITS:return this.rowPartitionValuesShapes[0][0]-1;default:throw new Error(`Cannot handle type ${dr[t]}`)}}compute(){if(this.rowPartitionValues[0].length<=0)throw new Error("Invalid first partition input. Tensor requires at least one element.");let t=this.getFirstDimensionSize(),n=this.calculateOutputSize(t),s=new Array(this.raggedRank+1);s[s.length-1]=1;for(let i=s.length-2;i>=0;--i)s[i]=s[i+1]*n[i+1];let r=D7(n,!1),a=v.getArrayFromDType(this.valuesDType,v.sizeFromShape(r));if(s[0]*n[0]>0){let i=this.calculateFirstParentOutputIndex(t,s[0],n[0]);for(let l=1;l<=this.raggedRank;++l)i=this.calculateOutputIndex(l-1,i,s[l],n[l]);this.setOutput(this.raggedRank,i,a,r)}return[r,a]}setOutput(e,t,n,s){if(n.length===0)return;let r=this.values,a=n,o=s.slice();o=o.slice(e+1);let i=v.sizeFromShape(o),l=t.length,u=this.defaultValue;if(u.length!==i&&u.length!==1){let h=this.defaultValueShape;Y(()=>{let f=V(u,h);u=nl(f,o).dataSync()})}let c=0,p=0,d=0;for(let h=0;h<=l;++h){let f=h=l){let m=n.length;f=Math.floor(m/i)}if(f>d)if(this.defaultValue.length===1)a.subarray(d*i,f*i).fill(this.defaultValue[0]),d=f;else for(;f>d;){let m=a.slice(d*i);_7(m,u,i),++d}f<0?(c=h+1,p=d):(c=h,p=d,d=p+1)}}};function _7(e,t,n){for(let s=0;s= 0`);if(s<-1)throw new Error(`Dimension ${s} must be >= -1`);s=-1}n.push(s)}return n}function lI(e,t,n,s,r,a,o,i,l,u){return new yy(e,t,n,s,r,a,o,i,l,u).compute()}function Zx(e,t,n,s){let r=e===t,a=e1;if(r||a||o)return v.makeZerosTypedArray(0,s);let i=Math.abs(Math.ceil((t-e)/n)),l=v.makeZerosTypedArray(i,s);t1/Math.sqrt(e)),xK=dd(si,uI),bK={kernelName:si,backendName:"cpu",kernelFunc:xK};function sc(e,t,n,s,r,a,o,i,l,u){let c=[s/r,r],p=e.values,d=t.values;if(s===0)return Ue(n,t.dtype);let h=Ue(c,t.dtype);typeof l=="string"||typeof l=="number"?h.values.fill(l):typeof l=="boolean"&&h.values.fill(+l);for(let f=0;f=s/r)throw new Error(`Invalid indices: ${m} does not index into ${n}`);for(let y=0;y1/(1+Math.exp(-e))),cI=vt(ai,e=>1/(1+Math.exp(-e))),wK={kernelName:ai,backendName:"cpu",kernelFunc:cI};function Um(e,t,n,s,r){let a=jt.isSliceContinous(s,t,n),o=v.sizeFromShape(n),i=v.computeStrides(s);if(a){let p=jt.computeFlatOffset(t,i);return r==="string"?e.slice(p,p+o):e.subarray(p,p+o)}let l=r==="string"?T.fromUint8ToStringArray(e):e,u=Ue(s,r,l),c=Ue(n,r);for(let p=0;pf+t[m]);c.set(u.get(...h),...d)}return r==="string"?T.fromStringArrayToUint8(c.values):c.values}function fl(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{begin:a,size:o}=s;Ne(r,"slice");let[i,l]=jt.parseSliceParams(r,a,o);jt.assertParamsValid(r,i,l);let u=n.data.get(r.dataId).values,c=Um(u,i,l,r.shape,r.dtype);return n.makeTensorInfo(l,r.dtype,c)}var kK={kernelName:Yl,backendName:"cpu",kernelFunc:fl};function dI(e,t,n,s,r,a,o){let i=t[0],l=a[0],u=new Array(l),c=new Array(i),p=t[1];if(l===0){if(i!==0)throw new Error(T.getSparseFillEmptyRowsIndicesDenseShapeMismatch(i));let g=v.getArrayFromDType(n,0),y=v.getArrayFromDType(r,0);return[g,[0,p],y,u,c]}let d=!0,h=0,f=new Array(l).fill(0);for(let g=0;g=l)throw new Error(T.getSparseFillEmptyRowsOutOfRangeIndexErrorMessage(g,y,l));++f[y],d=d&&y>=h,h=y}let m=!0;for(let g=0;g0&&(f[g]+=f[g-1])}if(m&&d){let g=e,y=s;for(let x=0;x0){h[d-1]=1;for(let g=d-2;g>=0;--g)h[g]=h[g+1]*s[g+1]}let f=[];if(i>0){f[i-1]=1;for(let g=i-2;g>=0;--g)f[g]=f[g+1]*l[g+1]}let m=v.getArrayFromDType(n,o*i);for(let g=0;g0?r[i-1]+1:0;if(p<0)throw new Error(T.getSparseSegmentReductionNegativeSegmentIdsErrorMessage());let d=t.slice();d[0]=p;let h=d.reduce((A,b)=>A*b,1),f=v.getArrayFromDType(n,h);if(i===0)return p>0&&f.fill(o),[f,d];if(p<=0)throw new Error(T.getSparseSegmentReductionNegativeSegmentIdsErrorMessage());let m=0,g=1,y=0,x=r[m];for(;;){let A=0;if(g=A)throw new Error(T.getSparseSegmentReductionNonIncreasingSegmentIdsErrorMessage())}if(x<0||x>=p)throw new Error(T.getSparseSegmentReductionSegmentIdOutOfRangeErrorMessage(x,p));x>y&&f.fill(o,y*u,x*u);for(let b=m;b=l[0])throw new Error(T.getSparseSegmentReductionIndicesOutOfRangeErrorMessage(b,s[b],l[0]));for(let k=0;ki)break}return yMath.sqrt(e)),IK=vt(oi,e=>Math.sqrt(e)),CK={kernelName:oi,backendName:"cpu",kernelFunc:IK},hI=pn((e,t)=>{let n=e-t;return n*n}),TK=Rn(ui,hI),NK={kernelName:ui,backendName:"cpu",kernelFunc:TK};function fI(e,t,n,s){let r=Ue(e,t.dtype);for(let a=0;a0?0:o-i),d=0;d+=l*this.leftPad.length;for(let y=0;yy.forEach(x=>f[m++]=x);for(let y=0;y0){g(e[p+c-1]);for(let y=0;y0){let i=t[0];if(i!==0)throw new Error(`First split value must be 0, got ${i}`);for(let l=1;l=i;if(u=u&&t[l]<=n,!u)throw new Error(`Invalid split value ${t[l]}, must be in [${i}, ${n}]`);i=t[l]}if(i!==n)throw new Error(`Last split value must be data size. Expected ${n}, got ${i}`)}let r=s-1,a=v.getArrayFromDType("int32",s);if(n===0||s===0){let i=new Array(n);for(let l=0;l<=r;++l)a[l]=0;return[i,a]}a[0]=0;for(let i=1;i<=r;++i){let l=t[i]-t[i-1],u=0;this.nGramWidths.forEach(c=>{u+=this.getNumNGrams(l,c)}),this.preserveShort&&l>0&&u===0&&(u=1),a[i]=a[i-1]+u}let o=new Array(a[r]);for(let i=0;i{let p=t[i+1]-t[i],d=this.getNumNGrams(p,c);this.createNGrams(e,l,o,u,d,c),u+=d}),this.preserveShort&&u===a[i]){let c=t[i+1]-t[i];if(c===0)continue;let p=c+2*this.padWidth,d=1;this.createNGrams(e,l,o,u,d,p)}}return[o,a]}};function Jx(e,t,n,s,r,a,o,i){return new EK(n,s,r,a,o,i).compute(e,t)}function RK(e,t,n,s){if(!e.length)return;if(t.length===0){for(let a=0;ae-t),_K=Hx((e,t,n,s)=>({real:e-n,imag:t-s})),tb=Rn(ci,mI,_K),DK={kernelName:ci,backendName:"cpu",kernelFunc:tb};function gI(e,t){let n=new Array(e.rank);for(let r=0;r{let n=t.value-e.value;return n===0?e.index-t.index:n};function yI(e,t,n=0,s=e.length-1){for(;s>n;){if(s-n>600){let i=s-n+1,l=t-n+1,u=Math.log(i),c=.5*Math.exp(2*u/3),p=.5*Math.sqrt(u*c*(i-c)/i)*Math.sign(l-i/2),d=Math.max(n,Math.floor(t-l*c/i+p)),h=Math.min(s,Math.floor(t+(i-l)*c/i+p));yI(e,t,d,h)}let r=e[t],a=n,o=s;for(v.swap(e,n,t),pp(e[s],r)>0&&v.swap(e,n,s);a0;)o=o-1}pp(e[n],r)===0?v.swap(e,n,o):(o=o+1,v.swap(e,o,s)),o<=t&&(n=o+1),t<=o&&(s=o-1)}}function AI(e,t,n,s,r){let a=t[t.length-1],[o,i]=[e.length/a,a],l=v.getTypedArrayFromDType(n,o*s),u=v.getTypedArrayFromDType("int32",o*s);for(let p=0;pf[A]={value:x,index:A}),s{for(let g=0;gnew Ux,1);var bI=vt(Do,e=>e>=0?e:Math.exp(e)-1),$K={kernelName:Do,backendName:"cpu",kernelFunc:bI};function vI(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{alpha:a}=s;Ne([r],"leakyRelu");let o=v.sizeFromShape(r.shape),i=n.data.get(r.dataId).values,l=v.getTypedArrayFromDType("float32",o);for(let u=0;ue<0?t*e:e);function wI(e){let{inputs:t,backend:n}=e,{x:s,alpha:r}=t;Ne([s,r],"prelu");let a=n.data.get(s.dataId).values,o=n.data.get(r.dataId).values,[i,l]=FK(s.shape,r.shape,a,o,"float32");return n.makeTensorInfo(l,"float32",i)}var OK={kernelName:Yo,backendName:"cpu",kernelFunc:wI},kI=vt(Qo,e=>Math.max(0,e)),MK={kernelName:Qo,backendName:"cpu",kernelFunc:kI},SI=vt(ni,e=>Math.min(Math.max(0,e),6)),zK={kernelName:ni,backendName:"cpu",kernelFunc:SI};function Gm(e,t,n,s,r){if(n==="linear")return ia({inputs:{x:t},backend:e});if(n==="relu")return kI({inputs:{x:t},backend:e});if(n==="elu")return bI({inputs:{x:t},backend:e});if(n==="relu6")return SI({inputs:{x:t},backend:e});if(n==="prelu")return wI({inputs:{x:t,alpha:s},backend:e});if(n==="leakyrelu")return vI({inputs:{x:t},backend:e,attrs:{alpha:r}});if(n==="sigmoid")return cI({inputs:{x:t},backend:e});throw new Error(`Activation ${n} has not been implemented for the CPU backend.`)}function Rt(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{shape:a}=s,o=v.sizeFromShape(r.shape),i=v.inferFromImplicitShape(a,o),l=v.sizeFromShape(i);v.assert(o===l,()=>`The new shape (${i}) has ${l} elements and the old shape (${r.shape}) has ${o} elements. The new shape and old shape must have the same number of elements.`),n.incRef(r.dataId);let u=n.data.get(r.dataId);if(u.complexTensorInfos!=null){let c=u.complexTensorInfos.real,p=u.complexTensorInfos.imag;c.shape=i,p.shape=i}return{dataId:r.dataId,shape:i,dtype:r.dtype}}var LK={kernelName:jl,backendName:"cpu",kernelFunc:Rt};function II(e){let{inputs:t,backend:n,attrs:s}=e,{a:r,b:a}=t,{transposeA:o,transposeB:i}=s;Ne([r,a],"matMul");let l=r.shape.length,u=a.shape.length,c=o?r.shape[l-2]:r.shape[l-1],p=i?a.shape[u-1]:a.shape[u-2],d=o?r.shape[l-1]:r.shape[l-2],h=i?a.shape[u-2]:a.shape[u-1],f=r.shape.slice(0,-2),m=a.shape.slice(0,-2),g=v.sizeFromShape(f),y=v.sizeFromShape(m),A=uu.assertAndGetBroadcastShape(r.shape.slice(0,-2),a.shape.slice(0,-2)).concat([d,h]);v.assert(c===p,()=>`Error in matMul: inner shapes (${c}) and (${p}) of Tensors with shapes ${r.shape} and ${a.shape} and transposeA=${o} and transposeB=${i} must match.`);let b=o?[g,c,d]:[g,d,c],w=i?[y,h,p]:[y,p,h],k=Rt({inputs:{x:r},backend:n,attrs:{shape:b}}),C=Rt({inputs:{x:a},backend:n,attrs:{shape:w}}),E=o?k.shape[1]:k.shape[2],_=o?k.shape[2]:k.shape[1],$=i?C.shape[1]:C.shape[2],R=Math.max(g,y),P=n.data.get(k.dataId).values,S=n.data.get(C.dataId).values,M=v.computeStrides(k.shape),L=v.computeStrides(C.shape),[U,K,q]=o?[M[0],1,M[1]]:[M[0],M[1],1],[Z,J,te]=i?[1,L[1],L[0]]:[L[1],1,L[0]],le=_*$,ae=Ue([R,_,$],k.dtype),pe=ae.values,ce=n.blockSize;for(let xe=0;xeMath.acos(e)),GK={kernelName:Nc,backendName:"cpu",kernelFunc:UK},HK=vt(Ec,e=>Math.acosh(e)),jK={kernelName:Ec,backendName:"cpu",kernelFunc:HK};function qK(e){let{inputs:t,backend:n}=e,s=t;Ne(t,"addN");let r=s.map(i=>n.data.get(i.dataId).values),a=Ue(s[0].shape,s[0].dtype),o=a.values;for(let i=0;ix&&(x=w,A=b)}h[g]=A}return u.forEach(g=>n.disposeIntermediateTensorInfo(g)),n.makeTensorInfo(c,"int32",h)}var eZ={kernelName:bo,backendName:"cpu",kernelFunc:QK};function tZ(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{axis:a}=s;Ne(r,"argMin");let o=v.parseAxisParam(a,r.shape),i=T.getAxesPermutation(o,r.shape.length),l=r,u=[];i!=null&&(l=Ss({inputs:{x:r},backend:n,attrs:{perm:i}}),u.push(l),o=T.getInnerMostAxes(o.length,l.shape.length)),o=[o[0]],T.assertAxesAreInnerMostDims("argMin",o,l.shape.length);let[c,p]=T.computeOutAndReduceShapes(l.shape,o),d=v.sizeFromShape(c),h=v.makeZerosTypedArray(d,"int32"),f=v.sizeFromShape(p),m=n.data.get(l.dataId).values;for(let g=0;gn.disposeIntermediateTensorInfo(g)),n.makeTensorInfo(c,"int32",h)}var nZ={kernelName:Dc,backendName:"cpu",kernelFunc:tZ},sZ=vt($c,e=>Math.asin(e)),rZ={kernelName:$c,backendName:"cpu",kernelFunc:sZ},aZ=vt(Pc,e=>Math.asinh(e)),oZ={kernelName:Pc,backendName:"cpu",kernelFunc:aZ},iZ=vt(Fc,e=>Math.atan(e)),lZ={kernelName:Fc,backendName:"cpu",kernelFunc:iZ},uZ=pn((e,t)=>Math.atan2(e,t)),cZ=Rn(bl,uZ),dZ={kernelName:bl,backendName:"cpu",kernelFunc:cZ},pZ=vt(Oc,e=>Math.atanh(e)),hZ={kernelName:Oc,backendName:"cpu",kernelFunc:pZ};function nb(e,t,n,s,r,a){let o=r.strideHeight,i=r.strideWidth,l=r.dilationHeight,u=r.dilationWidth,c=r.effectiveFilterHeight,p=r.effectiveFilterWidth,d=r.padInfo.top,h=r.padInfo.left,f=a==="max"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,m=Ue(r.outShape,n),g=m.values,y=r.outShape[1]*r.outShape[2]*r.outShape[3],x=r.outShape[2]*r.outShape[3],A=r.outShape[3];for(let b=0;bK?K=ce:a==="avg"&&(q+=ce,Z++)}if(isNaN(K))break}let J=P+S*A+C;g[J]=a==="avg"?q/Z:K}}}return m}function CI(e,t,n,s,r=!1,a=!1){let o=Ue(s.outShape,"int32"),i=s.strideHeight,l=s.strideWidth,u=s.dilationHeight,c=s.dilationWidth,p=s.effectiveFilterHeight,d=s.effectiveFilterWidth,h=s.padInfo.top,f=s.padInfo.left,m=Ue(t,n,e);for(let g=0;g$&&($=U,r?R=a?((g*s.inHeight+P)*s.inWidth+M)*s.inChannels+y:(P*s.inWidth+M)*s.inChannels+y:R=S*d+L)}}o.set(R,g,x,k,y)}}return o}function TI(e,t,n,s,r,a){let o=r.strideDepth,i=r.strideHeight,l=r.strideWidth,u=r.dilationDepth,c=r.dilationHeight,p=r.dilationWidth,d=r.effectiveFilterDepth,h=r.effectiveFilterHeight,f=r.effectiveFilterWidth,m=r.padInfo.front,g=r.padInfo.top,y=r.padInfo.left,x=a==="max"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,A=Ue(r.outShape,n),b=A.values,w=r.outShape[1]*r.outShape[2]*r.outShape[3]*r.outShape[4],k=r.outShape[2]*r.outShape[3]*r.outShape[4],C=r.outShape[3]*r.outShape[4],E=r.outShape[4];for(let _=0;__e?_e=It:a==="avg"&&(De+=It,Ge++),isNaN(_e))break}if(isNaN(_e))break}if(isNaN(_e))break}let ze=ie+P;b[ze]=a==="avg"?De/Ge:_e}}}}return A}function fZ(e,t){let n=Ue(t.outShape,"int32"),s=t.strideDepth,r=t.strideHeight,a=t.strideWidth,o=t.dilationDepth,i=t.dilationHeight,l=t.dilationWidth,u=t.effectiveFilterDepth,c=t.effectiveFilterHeight,p=t.effectiveFilterWidth,d=t.padInfo.front,h=t.padInfo.top,f=t.padInfo.left;for(let m=0;m=S&&(S=te,M=U*c*p+q*c+J)}}}n.set(M,m,y,w,_,g)}}}return n}function mZ(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t;Ne(r,"avgPool");let{filterSize:a,strides:o,pad:i,dimRoundingMode:l}=s,u=1;v.assert(T.eitherStridesOrDilationsAreOne(o,u),()=>`Error in avgPool: Either strides or dilations must be 1. Got strides ${o} and dilations '${u}'`);let c=T.computePool2DInfo(r.shape,a,o,u,i,l),p;if(c.filterWidth===1&&c.filterHeight===1&&v.arraysEqual(c.inShape,c.outShape))p=ia({inputs:{x:r},backend:n});else{let d=n.data.get(r.dataId).values,h=v.computeStrides(r.shape),f=nb(d,r.shape,r.dtype,h,c,"avg");p=n.makeTensorInfo(c.outShape,r.dtype,f.values)}return p}var gZ={kernelName:vo,backendName:"cpu",kernelFunc:mZ};function yZ(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{filterSize:a,strides:o,pad:i,dimRoundingMode:l,dataFormat:u}=s;Ne(r,"avgPool3d");let c=T.computePool3DInfo(r.shape,a,o,1,i,l,u),p=n.data.get(r.dataId).values,d=TI(p,r.shape,r.dtype,v.computeStrides(r.shape),c,"avg");return n.makeTensorInfo(d.shape,"float32",d.values)}var AZ={kernelName:Hp,backendName:"cpu",kernelFunc:yZ};function xZ(e){let{inputs:t,backend:n,attrs:s}=e,{dy:r,input:a}=t,{filterSize:o,strides:i,pad:l,dimRoundingMode:u}=s;Ne([r,a],"avgPool3DGrad");let c=T.computePool3DInfo(a.shape,o,i,1,l,u),p=c.strideDepth,d=c.strideHeight,h=c.strideWidth,f=c.filterDepth,m=c.filterHeight,g=c.filterWidth,y=c.dilationDepth,x=c.dilationHeight,A=c.dilationWidth,b=c.effectiveFilterDepth,w=c.effectiveFilterHeight,k=c.effectiveFilterWidth,C=b-1-c.padInfo.front,E=k-1-c.padInfo.left,_=w-1-c.padInfo.top,$=Ue(a.shape,"float32"),R=1/(f*m*g),P=n.bufferSync(r);for(let S=0;S=c.outDepth||Math.floor(ae)!==ae))for(let pe=0;pe=c.outHeight||Math.floor(ce)!==ce))for(let xe=0;xe=c.outWidth||Math.floor(ie)!==ie)continue;te+=P.get(S,ae,ce,ie,M)}}}$.set(te*R,S,L,U,K,M)}return n.makeTensorInfo($.shape,$.dtype,$.values)}var bZ={kernelName:s0,backendName:"cpu",kernelFunc:xZ};function vZ(e){let{inputs:t,backend:n,attrs:s}=e,{dy:r,input:a}=t,o=a;Ne([r,a],"avgPoolGrad");let{filterSize:i,strides:l,pad:u}=s,c=T.computePool2DInfo(o.shape,i,l,1,u),p=c.strideHeight,d=c.strideWidth,h=c.filterHeight,f=c.filterWidth,m=c.dilationHeight,g=c.dilationWidth,y=c.effectiveFilterHeight,x=c.effectiveFilterWidth,A=x-1-c.padInfo.left,b=y-1-c.padInfo.top,w=Ue(o.shape,"float32"),k=1/(h*f),C=n.data.get(r.dataId).values,E=Ue(r.shape,"float32",C);for(let _=0;_=c.outHeight||Math.floor(K)!==K))for(let q=0;q=c.outWidth||Math.floor(Z)!==Z)continue;L+=E.get(_,K,Z,$)}}w.set(L*k,_,R,P,$)}return n.makeTensorInfo(w.shape,w.dtype,w.values)}var wZ={kernelName:n0,backendName:"cpu",kernelFunc:vZ};function kZ(e){let{inputs:t,backend:n,attrs:s}=e,{x:r,scale:a,offset:o,mean:i,variance:l}=t;v.assert(i.shape.length===l.shape.length,()=>"Batch normalization gradient requires mean and variance to have equal ranks."),v.assert(o==null||i.shape.length===o.shape.length,()=>"Batch normalization gradient requires mean and offset to have equal ranks."),v.assert(a==null||i.shape.length===a.shape.length,()=>"Batch normalization gradient requires mean and scale to have equal ranks."),Ne([r,i,l,a,o],"batchNorm");let{varianceEpsilon:u}=s;u==null&&(u=.001);let c=n.data.get(r.dataId).values,p=n.data.get(i.dataId).values,d=n.data.get(l.dataId).values,h=a?n.data.get(a.dataId).values:new Float32Array([1]),f=o?n.data.get(o.dataId).values:new Float32Array([0]),m=new Float32Array(c.length),g=f.length,y=h.length,x=d.length,A=p.length,b=0,w=0,k=0,C=0;for(let E=0;E=g&&(b=0),w>=A&&(w=0),k>=y&&(k=0),C>=x&&(C=0);return n.makeTensorInfo(r.shape,r.dtype,m)}var SZ={kernelName:Oo,backendName:"cpu",kernelFunc:kZ};function IZ(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{blockShape:a,crops:o}=s;Ne([r],"batchToSpaceND");let i=a.reduce((y,x)=>y*x),l=T.getReshaped(r.shape,a,i),u=T.getPermuted(l.length,a.length),c=T.getReshapedPermuted(r.shape,a,i),p=T.getSliceBeginCoords(o,a.length),d=T.getSliceSize(c,o,a.length),h=Rt({inputs:{x:r},backend:n,attrs:{shape:l}}),f=Ss({inputs:{x:h},backend:n,attrs:{perm:u}}),m=Rt({inputs:{x:f},backend:n,attrs:{shape:c}}),g=fl({inputs:{x:m},backend:n,attrs:{begin:p,size:d}});return n.disposeIntermediateTensorInfo(h),n.disposeIntermediateTensorInfo(f),n.disposeIntermediateTensorInfo(m),g}var CZ={kernelName:vl,backendName:"cpu",kernelFunc:IZ};function TZ(e){let{inputs:t,backend:n,attrs:s}=e,{x:r,weights:a}=t,{size:o}=s,i=n.data.get(r.dataId).values,l=n.data.get(a.dataId).values,u=jx(i,l,a.dtype,a.shape,o);return n.makeTensorInfo([o],a.dtype,u)}var NZ={kernelName:r0,backendName:"cpu",kernelFunc:TZ};function EZ(e){let{inputs:t,backend:n}=e,{s0:s,s1:r}=t,a=n.data.get(s.dataId).values,o=n.data.get(r.dataId).values,i=T.assertAndGetBroadcastShape(Array.from(a),Array.from(o));return n.makeTensorInfo([i.length],"int32",Int32Array.from(i))}var RZ={kernelName:a0,backendName:"cpu",kernelFunc:EZ},_Z=vt($a,(e,t)=>{let n=t;return e>n.clipValueMax?n.clipValueMax:e{let{x:t}=e.inputs,n=e.backend,s=new Float32Array(v.sizeFromShape(t.shape)),r=n.data.get(t.dataId),a=r.complexTensorInfos.real,o=r.complexTensorInfos.imag,i=n.data.get(a.dataId).values,l=n.data.get(o.dataId).values;for(let u=0;um.shape),a);if(v.sizeFromShape(o)===0)return n.makeTensorInfo(o,t[0].dtype,[]);let i=t.filter(m=>v.sizeFromShape(m.shape)>0);if(i.length===1)return ia({inputs:{x:i[0]},backend:n});let l=i.map(m=>m.shape);if(T.assertParamsConsistent(l,a),i[0].dtype==="complex64"){let m=i.map(b=>hl({inputs:{input:b},backend:n})),g=i.map(b=>kc({inputs:{input:b},backend:n})),y=Sc({inputs:m,backend:n,attrs:{axis:a}}),x=Sc({inputs:g,backend:n,attrs:{axis:a}}),A=Ps({inputs:{real:y,imag:x},backend:n});return m.forEach(b=>n.disposeIntermediateTensorInfo(b)),g.forEach(b=>n.disposeIntermediateTensorInfo(b)),n.disposeIntermediateTensorInfo(y),n.disposeIntermediateTensorInfo(x),A}let u=i.map(m=>{let g=v.sizeFromShape(m.shape.slice(a));return Rt({inputs:{x:m},backend:n,attrs:{shape:[-1,g]}})}),c=u.map(m=>({vals:n.data.get(m.dataId).values,shape:m.shape}));o=T.computeOutShape(u.map(m=>m.shape),1);let p=u[0].shape[0]===1,d=qx(c,o,t[0].dtype,p),h=T.computeOutShape(i.map(m=>m.shape),a),f=n.makeTensorInfo(h,t[0].dtype,d);return u.forEach(m=>n.disposeIntermediateTensorInfo(m)),f}var OZ={kernelName:wl,backendName:"cpu",kernelFunc:Sc};function NI(e){let{inputs:t,backend:n,attrs:s}=e,{x:r,filter:a}=t,{strides:o,pad:i,dataFormat:l,dilations:u,dimRoundingMode:c}=s;Ne([r,a],"conv2d");let p=T.convertConv2DDataFormat(l),d=T.computeConv2DInfo(r.shape,a.shape,o,u,i,c,!1,p),h=d.filterHeight,f=d.filterWidth,m=d.dilationHeight,g=d.dilationWidth,y=d.padInfo.left,x=d.padInfo.top,A=d.dataFormat==="channelsLast",b=new An(d.outShape,r.dtype),w=v.computeStrides(r.shape),k=v.computeStrides(a.shape),C=w[0],E=A?w[1]:w[2],_=A?w[2]:1,$=A?1:w[1],R=b.strides[0],P=A?b.strides[1]:b.strides[2],S=A?b.strides[2]:1,M=A?1:b.strides[1],L=n.data.get(r.dataId).values,U=n.data.get(a.dataId).values,K=b.values;for(let q=0;q=d.inHeight)continue;let xe=pe*k[0],ie=Z+ce*E;for(let _e=0;_e=d.inWidth)continue;let At=xe+ze*k[1],ft=ie+ut*_,xt=At;for(let Me=0;Me=u.inDepth)continue;let q=U*_[0],Z=R+K*E[1];for(let J=0;J=u.inHeight)continue;let ce=q+ae*_[1],xe=Z+pe*E[2];for(let ie=0;ie=u.inWidth)continue;let ut=ce+Ge*_[2],At=xe+ze*u.inChannels,ft=ut;for(let xt=0;xtMath.cos(e)),KZ={kernelName:To,backendName:"cpu",kernelFunc:XZ},ZZ=vt(No,e=>Math.cosh(e)),YZ={kernelName:No,backendName:"cpu",kernelFunc:ZZ};function JZ(e){let{inputs:t,backend:n,attrs:s}=e,{image:r,boxes:a,boxInd:o}=t,{cropSize:i,method:l,extrapolationValue:u}=s,[c,p,d,h]=r.shape,f=a.shape[0],[m,g]=i,y=Ue([f,m,g,h],"float32"),x=n.data.get(a.dataId).values,A=n.data.get(o.dataId).values,b=n.data.get(r.dataId).values,w=v.computeStrides(r.shape),k=v.computeStrides(y.shape);for(let C=0;C=c)continue;let M=m>1?(R-_)*(p-1)/(m-1):0,L=g>1?(P-$)*(d-1)/(g-1):0;for(let U=0;U1?_*(p-1)+U*M:.5*(_+R)*(p-1);if(K<0||K>p-1){for(let q=0;q1?$*(d-1)+te*L:.5*($+P)*(d-1);if(le<0||le>d-1){for(let xe=0;xe1?$*(d-1)+q*L:.5*($+P)*(d-1);if(Z<0||Z>d-1){for(let le=0;ley+f-x-1:(y,x)=>y+x;for(let y=0;yy+f-x-1:(y,x)=>y+x;for(let y=0;y`Only NHWC dataFormat supported on CPU for depthToSpace. Got ${o}`);let i=r.shape[0],l=r.shape[1],u=r.shape[2],c=r.shape[3],p=l*a,d=u*a,h=c/(a*a),f=n.data.get(r.dataId).values,m=new Float32Array(i*p*d*h),g=0;for(let y=0;y`Error in depthwiseConv2d: Either strides or dilations must be 1. Got strides ${o} and dilations '${d}'`);let h=T.computeConv2DInfo(r.shape,a.shape,o,d,i,u,!0),{filterHeight:f,filterWidth:m,dilationHeight:g,dilationWidth:y,padInfo:x}=h,A=x.left,b=x.top,w=h.outChannels/h.inChannels,k=new An(h.outShape,r.dtype),C=n.data.get(r.dataId).values,E=n.data.get(a.dataId).values,_=k.values;for(let $=0;$=h.inHeight)continue;let q=U*p[0],Z=R+K*c[1];for(let J=0;J=h.inWidth)continue;let ce=q+ae*p[1],xe=Z+pe*h.inChannels,ie=te,_e=ce;for(let De=0;De{let{x:s,filter:r}=e,{strides:a,pad:o,dilations:i}=n,l=t,u=l.data.get(s.dataId).values,c=s.shape.length,p=l.data.get(r.dataId).values,d=r.shape.length,{batchSize:h,inHeight:f,inWidth:m,inChannels:g,outHeight:y,outWidth:x,padInfo:A,strideHeight:b,strideWidth:w,filterHeight:k,filterWidth:C,dilationHeight:E,dilationWidth:_,outShape:$}=T.computeDilation2DInfo(s.shape,r.shape,a,o,"NHWC",i),R=v.sizeFromShape($),P=$.length,S=v.getArrayFromDType(s.dtype,R);for(let L=0;L=0&&pe=0&&xete&&(te=De)}}}let le=v.locToIndex([L,U,q,J],P,v.computeStrides($));S[le]=te}}}return{dataId:l.write(v.toTypedArray(S,s.dtype),$,s.dtype),shape:$,dtype:s.dtype}}},gY={kernelName:Im,backendName:"cpu",kernelFunc:({inputs:e,backend:t,attrs:n})=>{let{x:s,filter:r,dy:a}=e,{strides:o,pad:i,dilations:l}=n,u=t,c=v.toNestedArray(s.shape,u.data.get(s.dataId).values),p=v.toNestedArray(r.shape,u.data.get(r.dataId).values),{batchSize:d,inHeight:h,inWidth:f,inChannels:m,outHeight:g,outWidth:y,padInfo:x,strideHeight:A,strideWidth:b,filterHeight:w,filterWidth:k,dilationHeight:C,dilationWidth:E,outShape:_}=T.computeDilation2DInfo(s.shape,r.shape,o,i,"NHWC",l);v.assert(a.rank===_.length,()=>`Error in ${Im}, dy must have the same rank as output ${_.length}, but got ${a.rank}`);let $=v.toNestedArray(_,u.data.get(a.dataId).values),R=v.makeZerosNestedTypedArray(r.shape,r.dtype);for(let S=0;S=0&&ae=0&&ceZ&&(Z=xe,J=le,te=pe)}}}R[J][te][q]+=$[S][M][U][q]}}}return{dataId:u.write(v.toTypedArray(R,s.dtype),r.shape,r.dtype),shape:r.shape,dtype:r.dtype}}},yY={kernelName:Sm,backendName:"cpu",kernelFunc:({inputs:e,backend:t,attrs:n})=>{let{x:s,filter:r,dy:a}=e,{strides:o,pad:i,dilations:l}=n,u=t,c=v.toNestedArray(s.shape,u.data.get(s.dataId).values),p=v.toNestedArray(r.shape,u.data.get(r.dataId).values),{batchSize:d,inHeight:h,inWidth:f,inChannels:m,outHeight:g,outWidth:y,padInfo:x,strideHeight:A,strideWidth:b,filterHeight:w,filterWidth:k,dilationHeight:C,dilationWidth:E,outShape:_}=T.computeDilation2DInfo(s.shape,r.shape,o,i,"NHWC",l);v.assert(a.rank===_.length,()=>`Error in ${Sm}, dy must have the same rank as output ${_.length}, but got ${a.rank}`);let $=v.toNestedArray(_,u.data.get(a.dataId).values),R=v.makeZerosNestedTypedArray(s.shape,s.dtype);for(let S=0;S=0&&ae=0&&ceZ&&(Z=xe,J=ae,te=ce)}}}R[S][J][te][q]+=$[S][M][U][q]}}}return{dataId:u.write(v.toTypedArray(R,s.dtype),s.shape,s.dtype),shape:s.shape,dtype:s.dtype}}};function Uh(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{axis:a,keepDims:o}=s;Ne(r,"sum");let i;r.dtype==="bool"?i=mo({inputs:{x:r},backend:n,attrs:{dtype:"int32"}}):i=ia({inputs:{x:r},backend:n});let l=i.shape.length,u=v.parseAxisParam(a,i.shape),c=T.getAxesPermutation(u,l),p=u,d=i;c!=null&&(d=Ss({inputs:{x:i},backend:n,attrs:{perm:c}}),p=T.getInnerMostAxes(p.length,l)),T.assertAxesAreInnerMostDims("sum",p,d.shape.length);let[h,f]=T.computeOutAndReduceShapes(d.shape,p),m=T.upcastType(d.dtype,"int32"),g=Vm(n,h,m),y=v.sizeFromShape(f),x=n.data.get(g.dataId).values,A=n.data.get(d.dataId).values;for(let b=0;b=0&&(d=Uh({inputs:{x:d},backend:n,attrs:{axis:u[m]-(o.length-h),keepDims:!1}}),f.push(d)),h--)}for(let m of f)m!==d&&n.disposeIntermediateTensorInfo(m);return d}var bY={kernelName:Zp,backendName:"cpu",kernelFunc:xY};function vY(e){let{inputs:t,backend:n}=e,{dy:s,y:r}=t;Ne([s,r],"eluGrad");let a=new Float32Array(v.sizeFromShape(r.shape)),o=n.data.get(r.dataId).values,i=n.data.get(s.dataId).values;for(let l=0;l=1?a[l]=i[l]:a[l]=i[l]*(u+1)}return n.makeTensorInfo(r.shape,"float32",a)}var wY={kernelName:h0,backendName:"cpu",kernelFunc:vY},kY=T.ERF_P,SY=T.ERF_A1,IY=T.ERF_A2,CY=T.ERF_A3,TY=T.ERF_A4,NY=T.ERF_A5,EY=vt(Mc,e=>{let t=Math.sign(e),n=Math.abs(e),s=1/(1+kY*n);return t*(1-((((NY*s+TY)*s+CY)*s+IY)*s+SY)*s*Math.exp(-n*n))}),RY={kernelName:Mc,backendName:"cpu",kernelFunc:EY};function Hm(e){let{inputs:t,backend:n,attrs:s}=e,{input:r}=t,{dim:a}=s,o=r.shape.length,i=r.shape.slice(),l=a;return a<0&&(v.assert(-(o+1)<=a,()=>`Axis must be in the interval [${-(o+1)}, ${o}]`),l=o+a+1),i.splice(l,0,1),Rt({inputs:{x:r},backend:n,attrs:{shape:i}})}var _Y={kernelName:Tl,backendName:"cpu",kernelFunc:Hm},DY=pn((e,t)=>e/t),sb=Rn(_o,DY),Ay={kernelName:_o,backendName:"cpu",kernelFunc:sb};function RI(e,t,n){let s=e.shape,r=s[0],a=s[1],o=n.data.get(e.dataId),i=o.complexTensorInfos.real,l=o.complexTensorInfos.imag,u=[r,a],c=v.sizeFromShape(u),p=v.getTypedArrayFromDType("float32",c),d=v.getTypedArrayFromDType("float32",c);for(let g=0;g{let{image:s}=e,r=n,a=v.getTypedArrayFromDType(s.dtype,v.sizeFromShape(s.shape)),[o,i,l,u]=s.shape,c=r.data.get(s.dataId).values;for(let d=0;d=0&&AMath.floor(e/t)),VY=Rn(Fo,WY,null,"int32"),UY={kernelName:Fo,backendName:"cpu",kernelFunc:VY};function GY(e){let{inputs:t,backend:n,attrs:s}=e,{x:r,filter:a,bias:o,preluActivationWeights:i}=t,{strides:l,pad:u,dataFormat:c,dilations:p,dimRoundingMode:d,activation:h,leakyreluAlpha:f}=s,m=NI({inputs:{x:r,filter:a},backend:n,attrs:{strides:l,pad:u,dataFormat:c,dilations:p,dimRoundingMode:d}});if(o){let g=m;if(c==="NCHW"&&o.shape.length===1&&o.shape[0]!==1){let y=Rt({inputs:{x:o},backend:n,attrs:{shape:[o.shape[0],1,1]}});m=wc({inputs:{a:m,b:y},backend:n}),n.disposeIntermediateTensorInfo(y)}else m=wc({inputs:{a:m,b:o},backend:n});n.disposeIntermediateTensorInfo(g)}if(h){let g=m;if(c==="NCHW"&&h==="prelu"&&i.shape.length===1&&i.shape[0]!==1){let y=Rt({inputs:{x:i},backend:n,attrs:{shape:[i.shape[0],1,1]}});m=Gm(n,m,h,y,f),n.disposeIntermediateTensorInfo(y)}else m=Gm(n,m,h,i,f);n.disposeIntermediateTensorInfo(g)}return m}var HY={kernelName:oo,backendName:"cpu",kernelFunc:GY};function jY(e){let{inputs:t,backend:n,attrs:s}=e,{x:r,filter:a,bias:o,preluActivationWeights:i}=t,{strides:l,pad:u,dataFormat:c,dilations:p,dimRoundingMode:d,activation:h,leakyreluAlpha:f}=s,m=EI({inputs:{x:r,filter:a},backend:n,attrs:{strides:l,pad:u,dataFormat:c,dilations:p,dimRoundingMode:d}});if(o){let g=m;m=wc({inputs:{a:m,b:o},backend:n}),n.disposeIntermediateTensorInfo(g)}if(h){let g=m;m=Gm(n,m,h,i,f),n.disposeIntermediateTensorInfo(g)}return m}var qY={kernelName:io,backendName:"cpu",kernelFunc:jY};function XY(e){let{inputs:t,backend:n}=e,{params:s,indices:r}=t,a=v.sizeFromShape(s.shape),o=r.shape,i=o[o.length-1],[l,u,c,p]=T.prepareAndValidate(s,r);if(u===0)return n.makeTensorInfo(l,s.dtype,[]);let d=n.data.get(r.dataId).values,h=n.bufferSync(s),f=XS(d,h,s.dtype,u,i,c,p,s.shape,a);return n.makeTensorInfo(l,s.dtype,f.values)}var KY={kernelName:_l,backendName:"cpu",kernelFunc:XY};function ZY(e){let{inputs:t,backend:n,attrs:s}=e,{x:r,indices:a}=t,{axis:o,batchDims:i}=s;Ne([r,a],"gatherV2");let l=v.parseAxisParam(o,r.shape)[0],u=n.data.get(a.dataId).values,c=r.shape[l];for(let b=0;b=0,()=>`GatherV2: the index value ${w} is not in [0, ${c-1}]`)}let p=i;i==null&&(p=0);let d=v.sizeFromShape(a.shape),h=T.segment_util.collectGatherOpShapeInfo(r,a,l,p),f=Rt({inputs:{x:r},backend:n,attrs:{shape:[h.batchSize,h.outerSize,h.dimSize,h.sliceSize]}}),m=Rt({inputs:{x:a},backend:n,attrs:{shape:[h.batchSize,d/h.batchSize]}}),g=[h.batchSize,h.outerSize,d/h.batchSize,h.sliceSize],y=n.bufferSync(m),x=n.bufferSync(f),A=KS(x,y,g);return n.disposeIntermediateTensorInfo(f),n.disposeIntermediateTensorInfo(m),n.makeTensorInfo(h.outputShape,A.dtype,A.values)}var YY={kernelName:Rl,backendName:"cpu",kernelFunc:ZY};function JY(e){let{inputs:t,backend:n}=e,{input:s}=t,r=v.sizeFromShape(s.shape),a=s.shape[s.shape.length-1],o=r/a,i=Rt({inputs:{x:s},backend:n,attrs:{shape:[o,a]}}),l=RI(i,!0,n),u=Rt({inputs:{x:l},backend:n,attrs:{shape:s.shape}});return n.disposeIntermediateTensorInfo(i),n.disposeIntermediateTensorInfo(l),u}var QY={kernelName:m0,backendName:"cpu",kernelFunc:JY},eJ=vt(Lc,e=>Number.isFinite(e)?1:0,"bool"),tJ={kernelName:Lc,backendName:"cpu",kernelFunc:eJ},nJ=vt(Bc,e=>Math.abs(e)===1/0?1:0,"bool"),sJ={kernelName:Bc,backendName:"cpu",kernelFunc:nJ},rJ=vt($l,e=>Number.isNaN(e)?1:0,"bool"),aJ={kernelName:$l,backendName:"cpu",kernelFunc:rJ};function oJ(e){let{backend:t,attrs:n}=e,{start:s,stop:r,num:a}=n,o=eI(s,r,a);return t.makeTensorInfo([o.length],"float32",o)}var iJ={kernelName:g0,backendName:"cpu",kernelFunc:oJ},lJ=vt(Wc,e=>Math.log1p(e)),uJ={kernelName:Wc,backendName:"cpu",kernelFunc:lJ},cJ=pn((e,t)=>e&&t),dJ=Rn(Ol,cJ,null,"bool"),pJ={kernelName:Ol,backendName:"cpu",kernelFunc:dJ},hJ=vt(Ml,e=>e?0:1,"bool"),fJ={kernelName:Ml,backendName:"cpu",kernelFunc:hJ},mJ=pn((e,t)=>e||t),gJ=Rn(Vc,mJ,null,"bool"),yJ={kernelName:Vc,backendName:"cpu",kernelFunc:gJ};function AJ(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{depthRadius:a,bias:o,alpha:i,beta:l}=s;Ne(r,"LRN");let u=r.shape[3],c=u-1,p=n.data.get(r.dataId).values,d=v.sizeFromShape(r.shape),h=new Float32Array(d);function f(m){let g=m%u,y=m-g+Math.max(0,g-a),x=m-g+Math.min(g+a,c),A=0;for(;y<=x;y++){let b=p[y];A+=b*b}return A}for(let m=0;m`Error in maxPool: Either strides or dilations must be 1. Got strides ${o} and dilations '${u}'`);let c=T.computePool2DInfo(r.shape,a,o,u,i,l),p;if(c.filterWidth===1&&c.filterHeight===1&&v.arraysEqual(c.inShape,c.outShape))p=ia({inputs:{x:r},backend:n});else{let d=n.data.get(r.dataId).values,h=v.computeStrides(r.shape),f=nb(d,r.shape,r.dtype,h,c,"max");p=n.makeTensorInfo(c.outShape,r.dtype,f.values)}return p}var SJ={kernelName:Uo,backendName:"cpu",kernelFunc:kJ};function IJ(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{filterSize:a,strides:o,pad:i,dimRoundingMode:l,dataFormat:u}=s;Ne(r,"maxPool3d");let c=T.computePool3DInfo(r.shape,a,o,1,i,l,u),p=n.data.get(r.dataId).values,d=TI(p,r.shape,r.dtype,v.computeStrides(r.shape),c,"max");return n.makeTensorInfo(d.shape,"float32",d.values)}var CJ={kernelName:Qp,backendName:"cpu",kernelFunc:IJ};function TJ(e){let{inputs:t,backend:n,attrs:s}=e,{dy:r,input:a}=t,{filterSize:o,strides:i,pad:l,dimRoundingMode:u}=s;Ne([r,a],"maxPool3DGrad");let c=T.computePool3DInfo(a.shape,o,i,1,l,u),p=n.bufferSync(a),d=fZ(p,c),h=c.strideDepth,f=c.strideHeight,m=c.strideWidth,g=c.dilationDepth,y=c.dilationHeight,x=c.dilationWidth,A=c.effectiveFilterDepth,b=c.effectiveFilterHeight,w=c.effectiveFilterWidth,k=A-1-c.padInfo.front,C=w-1-c.padInfo.left,E=b-1-c.padInfo.top,_=Ue(a.shape,"float32"),$=n.bufferSync(r);for(let R=0;R=c.outDepth||Math.floor(te)!==te))for(let le=0;le=c.outHeight||Math.floor(ae)!==ae))for(let pe=0;pe=c.outWidth||Math.floor(ce)!==ce)continue;let xe=A*b*w-1-d.get(R,te,ae,ce,P),ie=J*b*w+le*w+pe,_e=xe===ie?1:0;if(_e===0)continue;Z+=$.get(R,te,ae,ce,P)*_e}}}_.set(Z,R,S,M,L,P)}return n.makeTensorInfo(_.shape,_.dtype,_.values)}var NJ={kernelName:x0,backendName:"cpu",kernelFunc:TJ};function EJ(e){let{inputs:t,backend:n,attrs:s}=e,{dy:r,input:a,output:o}=t,i=a;Ne([a,o],"maxPoolGrad");let{filterSize:l,strides:u,pad:c,dimRoundingMode:p}=s,d=T.computePool2DInfo(i.shape,l,u,1,c,p),h=n.data.get(i.dataId).values,f=Ue(d.outShape,i.dtype,CI(h,i.shape,i.dtype,d).values),m=d.strideHeight,g=d.strideWidth,y=d.dilationHeight,x=d.dilationWidth,A=d.effectiveFilterHeight,b=d.effectiveFilterWidth,w=b-1-d.padInfo.left,k=A-1-d.padInfo.top,C=Ue(i.shape,"float32"),E=n.data.get(r.dataId).values,_=Ue(r.shape,"float32",E);for(let $=0;$=d.outHeight||Math.floor(q)!==q))for(let Z=0;Z=d.outWidth||Math.floor(J)!==J)continue;let te=A*b-1-f.get($,q,J,R),le=K*b+Z,ae=te===le?1:0;if(ae===0)continue;U+=_.get($,q,J,R)*ae}}C.set(U,$,P,S,R)}return n.makeTensorInfo(C.shape,C.dtype,C.values)}var RJ={kernelName:A0,backendName:"cpu",kernelFunc:EJ};function _J(e,t,n,s,r){let a=v.computeStrides(t),o=nb(e,t,n,a,r,"max"),i=CI(e,t,n,r,!0,s);return[o.values,i.values]}var DJ={kernelName:b0,backendName:"cpu",kernelFunc:({inputs:e,attrs:t,backend:n})=>{let{x:s}=e,{filterSize:r,strides:a,pad:o,includeBatchInIndex:i}=t,l=n;Ne(s,"MaxPoolWithArgmax");let u=l.data.get(s.dataId).values,c=T.computePool2DInfo(s.shape,r,a,[1,1],o),[p,d]=_J(u,s.shape,s.dtype,i,c),h=l.write(p,c.outShape,s.dtype),f=l.write(d,c.outShape,s.dtype);return[{dataId:h,shape:c.outShape,dtype:s.dtype},{dataId:f,shape:c.outShape,dtype:"int32"}]}};function $J(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{axis:a,keepDims:o}=s,i=v.parseAxisParam(a,r.shape),u=T.computeOutAndReduceShapes(r.shape,i)[1],c=v.sizeFromShape(u),p=[],d=n.makeTensorInfo([],"float32",new Float32Array([c]));p.push(d);let h=mo({inputs:{x:r},backend:n,attrs:{dtype:"float32"}});p.push(h);let f=sb({inputs:{a:h,b:d},backend:n});p.push(f);let m=Uh({inputs:{x:f},backend:n,attrs:{axis:a,keepDims:o}});return p.forEach(g=>n.disposeIntermediateTensorInfo(g)),m}var PJ={kernelName:Go,backendName:"cpu",kernelFunc:$J};function FJ(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{axis:a,keepDims:o}=s;Ne(r,"min");let i=v.parseAxisParam(a,r.shape),l=i,u=T.getAxesPermutation(l,r.shape.length),c=r;u!=null&&(c=Ss({inputs:{x:r},backend:n,attrs:{perm:u}}),l=T.getInnerMostAxes(l.length,r.shape.length)),T.assertAxesAreInnerMostDims("min",l,c.shape.length);let[p,d]=T.computeOutAndReduceShapes(c.shape,l),h=v.sizeFromShape(d),f=v.makeZerosTypedArray(v.sizeFromShape(p),c.dtype),m=n.data.get(c.dataId).values;for(let y=0;yA[0]+r.shape[b]+A[1]),l=a.map(A=>A[0]),u=a.map((A,b)=>A[0]+r.shape[b]),c=o==="reflect"?0:1,p=n.data.get(r.dataId).values,d=r.shape.length,h=v.computeStrides(r.shape),f=v.sizeFromShape(i),m=i.length,g=v.computeStrides(i),y=v.getTypedArrayFromDType(r.dtype,f);for(let A=0;A=u[k]&&(b[k]=(u[k]-1)*2-b[k]+c);b=b.map((k,C)=>k-l[C]);let w=v.locToIndex(b,d,h);y[A]=p[w]}return{dataId:n.write(y,i,r.dtype),shape:i,dtype:r.dtype}}var zJ={kernelName:qo,backendName:"cpu",kernelFunc:MJ},LJ=pn((e,t)=>{let n=e%t;return e<0&&t<0||e>=0&&t>=0?n:(n+t)%t}),BJ=Rn(Uc,LJ),WJ={kernelName:Uc,backendName:"cpu",kernelFunc:BJ},VJ=yo(Qm());function DI(e){let{inputs:t,backend:n,attrs:s}=e,{logits:r}=t,{dim:a}=s,o=r.shape.length,i=a;if(i===-1&&(i=o-1),i!==o-1)throw Error(`Softmax along a non-last dimension is not yet supported. Logits was rank ${o} and dim was ${i}`);let l=v.parseAxisParam([i],r.shape),u=_I({inputs:{x:r},backend:n,attrs:{reductionIndices:l,keepDims:!1}}),c=T.expandShapeToKeepDim(u.shape,l),p=Rt({inputs:{x:u},backend:n,attrs:{shape:c}}),d=tb({inputs:{a:r,b:p},backend:n}),h=HS({inputs:{x:d},backend:n}),f=Uh({inputs:{x:h},backend:n,attrs:{axis:l,keepDims:!1}}),m=Rt({inputs:{x:f},backend:n,attrs:{shape:c}}),g=sb({inputs:{a:h,b:m},backend:n});return n.disposeIntermediateTensorInfo(u),n.disposeIntermediateTensorInfo(p),n.disposeIntermediateTensorInfo(d),n.disposeIntermediateTensorInfo(h),n.disposeIntermediateTensorInfo(f),n.disposeIntermediateTensorInfo(m),g}var UJ={kernelName:li,backendName:"cpu",kernelFunc:DI};function GJ(e){let{inputs:t,backend:n,attrs:s}=e,{logits:r}=t,{numSamples:a,seed:o,normalized:i}=s;Ne(r,"multinomial");let l=i?r:DI({inputs:{logits:r},backend:n,attrs:{dim:-1}}),u=l.shape[0],c=l.shape[1],p=n.data.get(l.dataId).values,d=[u,a],h=v.makeZerosTypedArray(v.sizeFromShape(d),"int32");for(let f=0;f=0&&p[d]{v.assertShapesMatch(a,c.shape,"All tensors passed to stack must have matching shapes"),v.assert(o===c.dtype,()=>"All tensors passed to stack must have matching dtypes")});let i=[],l=t.map(c=>{let p=Hm({inputs:{input:c},backend:n,attrs:{dim:r}});return i.push(p),p}),u=Sc({inputs:l,backend:n,attrs:{axis:r}});return i.forEach(c=>n.disposeIntermediateTensorInfo(c)),u}var aQ={kernelName:Gl,backendName:"cpu",kernelFunc:PI};function oQ(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{paddings:a,constantValue:o}=s;Ne(r,"pad");let i=a.map((x,A)=>x[0]+r.shape[A]+x[1]),l=a.map(x=>x[0]),u=n.data.get(r.dataId).values,c=v.sizeFromShape(r.shape),p=r.shape.length,d=v.computeStrides(r.shape),h=v.sizeFromShape(i),f=i.length,m=v.computeStrides(i),g=v.getTypedArrayFromDType(r.dtype,h);o!==0&&g.fill(o);for(let x=0;xk+l[C]),w=v.locToIndex(b,f,m);g[w]=u[x]}return{dataId:n.write(g,i,r.dtype),shape:i,dtype:r.dtype}}var FI={kernelName:Ko,backendName:"cpu",kernelFunc:oQ},iQ=pn((e,t)=>Math.pow(e,t)),lQ=Rn(Zo,iQ),uQ={kernelName:Zo,backendName:"cpu",kernelFunc:lQ};function cQ(e){let{inputs:t,backend:n,attrs:s}=e,{shape:r,values:a,defaultValue:o,rowPartitionTensors:i}=t,{rowPartitionTypes:l}=s,u=n.data.get(r.dataId).values,c=n.data.get(a.dataId).values,p=n.data.get(o.dataId).values,d=i.map(g=>n.data.get(g.dataId).values),h=i.map(g=>g.shape),[f,m]=lI(u,r.shape,c,a.shape,a.dtype,p,o.shape,d,h,l);return n.makeTensorInfo(f,a.dtype,m)}var dQ={kernelName:w0,backendName:"cpu",kernelFunc:cQ};function pQ(e){let{backend:t,attrs:n}=e,{start:s,stop:r,dtype:a,step:o}=n,i=Zx(s,r,o,a);return t.makeTensorInfo([i.length],a,i)}var hQ={kernelName:Hc,backendName:"cpu",kernelFunc:pQ},fQ=vt(Hl,e=>1/e),mQ={kernelName:Hl,backendName:"cpu",kernelFunc:fQ};function gQ(e){let{inputs:t,backend:n,attrs:s}=e,{images:r}=t,{alignCorners:a,halfPixelCenters:o,size:i}=s;Ne(r,"resizeBilinear");let l=v.computeStrides(r.shape),[u,c]=i,[p,d,h,f]=r.shape,m=n.data.get(r.dataId).values,g=new Float32Array(v.sizeFromShape([p,u,c,f])),y=[a&&u>1?d-1:d,a&&c>1?h-1:h],x=[a&&u>1?u-1:u,a&&c>1?c-1:c],A=0,b=y[0]/x[0],w=y[1]/x[1];for(let k=0;k1?u-1:u,o&&h>1?c-1:c],g=[o&&d>1?d-1:d,o&&h>1?h-1:h],y=m[0]/g[0],x=m[1]/g[1],A=n.data.get(a.dataId).values,b=0;for(let w=0;w1?d-1:d,a&&c>1?h-1:h],x=[a&&u>1?u-1:u,a&&c>1?c-1:c],A=y[0]/x[0],b=y[1]/x[1],w=0;for(let k=0;k1?c-1:c,o&&f>1?p-1:p],x=[o&&h>1?h-1:h,o&&f>1?f-1:f],A=y[0]/x[0],b=y[1]/x[1],w=1/A,k=1/b,C=Math.ceil(w)*2+2,E=Math.ceil(k)*2+2;for(let _=0;_=h)continue;let ae=$+le*l[1],pe=le*A,ce=Math.min(c-1,o?Math.round(pe):Math.floor(pe));if(R===ce)for(let xe=0;xe=f)continue;let _e=ae+ie*l[2],De=ie*b,Ge=Math.min(p-1,o?Math.round(De):Math.floor(De));L===Ge&&(J+=g[_e+Z])}}m[U+Z]=J}}}}return n.makeTensorInfo(r.shape,r.dtype,m)}var kQ={kernelName:k0,backendName:"cpu",kernelFunc:wQ};function SQ(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{dims:a}=s;Ne(r,"reverse");let o=r.shape.length,i=v.parseAxisParam(a,r.shape);if(o===0)return ia({inputs:{x:r},backend:n});let l=new An(r.shape,r.dtype),u=n.bufferSync(r);for(let c=0;cd[h]=r.shape[h]-1-d[h]),l.set(u.get(...d),...p)}return n.makeTensorInfo(l.shape,l.dtype,l.values)}var IQ={kernelName:ql,backendName:"cpu",kernelFunc:SQ},CQ={kernelName:iu,backendName:"cpu",kernelFunc:({inputs:e,attrs:t,backend:n})=>{let{image:s}=e,{radians:r,fillValue:a,center:o}=t,i=n,l=v.getTypedArrayFromDType(s.dtype,v.sizeFromShape(s.shape)),[u,c,p,d]=s.shape,[h,f]=T.getImageCenter(o,c,p),m=255,g=Math.sin(r),y=Math.cos(r),x=i.data.get(s.dataId).values;for(let b=0;b=0&&M=0&&L{let t=Math.floor(e);return e-t<.5?Math.floor(e):e-t>.5?Math.ceil(e):t%2===0?t:t+1}),NQ={kernelName:Xl,backendName:"cpu",kernelFunc:TQ};function EQ(e){let{inputs:t,backend:n,attrs:s}=e,{indices:r,updates:a}=t,{shape:o}=s,{sliceRank:i,numUpdates:l,sliceSize:u,strides:c,outputSize:p}=T.calculateShapes(a,r,o),d=!0,h=n.bufferSync(r),f=n.bufferSync(a),m=sc(h,f,o,p,u,l,i,c,0,d);return n.makeTensorInfo(o,m.dtype,m.values)}var RQ={kernelName:Kl,backendName:"cpu",kernelFunc:EQ};function _Q(e,t){let n=0,s=e.length,r=0;for(;n1||r.shape.length===1?1:v.sizeFromShape(r.shape.slice(1));for(let f=0;fe>=0?LQ*e:zQ*(Math.exp(e)-1)),WQ={kernelName:jc,backendName:"cpu",kernelFunc:BQ},VQ=vt(qc,e=>e<0?-1:e>0?1:0),UQ={kernelName:qc,backendName:"cpu",kernelFunc:VQ},GQ=vt(ri,e=>Math.sin(e)),HQ={kernelName:ri,backendName:"cpu",kernelFunc:GQ},jQ=vt(Jl,e=>Math.sinh(e)),qQ={kernelName:Jl,backendName:"cpu",kernelFunc:jQ},XQ=11920928955078125e-23,$7=Math.log(XQ)+2,KQ=vt(Xc,e=>{let t=e>-$7,n=e<$7,s=Math.exp(e),r;return n?r=s:t?r=e:r=Math.log(1+s),r}),ZQ={kernelName:Xc,backendName:"cpu",kernelFunc:KQ};function YQ(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{blockShape:a,paddings:o}=s;Ne([r],"spaceToBatchND");let i=v.sizeFromShape(a),l=[[0,0]];l.push(...o);for(let k=1+a.length;k0&&v.isString(n[0])){let r=n.map(a=>v.encodeString(a));s=this.write(r,e,t)}else s=this.write(n,e,t);return{dataId:s,shape:e,dtype:t}}refCount(e){return this.data.has(e)?this.data.get(e).refCount:0}incRef(e){let t=this.data.get(e);t.refCount++}decRef(e){if(this.data.has(e)){let t=this.data.get(e);t.refCount--}}move(e,t,n,s,r){this.data.set(e,{values:t,dtype:s,refCount:r})}numDataIds(){return this.data.numDataIds()}async read(e){return this.readSync(e)}readSync(e){let{dtype:t,complexTensorInfos:n}=this.data.get(e);if(t==="complex64"){let s=this.readSync(n.real.dataId),r=this.readSync(n.imag.dataId);return T.mergeRealAndImagArrays(s,r)}return this.data.get(e).values}bufferSync(e){let t=this.readSync(e.dataId);if(e.dtype==="string")try{let n=t.map(s=>v.decodeString(s));return ze(e.shape,e.dtype,n)}catch(n){throw new Error("Failed to decode encoded string bytes into utf-8")}return ze(e.shape,e.dtype,t)}makeOutput(e,t,n){return Jt().makeTensorFromTensorInfo(this.makeTensorInfo(t,n,e),this)}disposeData(e,t=!1){if(this.data.has(e)){if(this.data.get(e).refCount--,!t&&this.data.get(e).refCount>0)return!1;let{complexTensorInfos:n}=this.data.get(e);n!=null&&(this.disposeData(n.real.dataId,!0),this.disposeData(n.imag.dataId,!0)),this.data.delete(e)}return!0}disposeIntermediateTensorInfo(e){this.disposeData(e.dataId)}async time(e){let t=v.now();return e(),{kernelMs:v.now()-t}}memory(){return{unreliable:!0,reasons:["The reported memory is an upper bound. Due to automatic garbage collection, the true allocated memory may be less."]}}where(e){Te([e],"where");let t=this.readSync(e.dataId);return aX(e.shape,t)}dispose(){}floatPrecision(){return 32}epsilon(){return super.epsilon()}};kx.nextDataId=0;var Sx={};We(Sx,{addImpl:()=>kS,bincountImpl:()=>Cx,bincountReduceImpl:()=>SS,castImpl:()=>wS,ceilImpl:()=>IS,concatImpl:()=>Tx,equalImpl:()=>CS,expImpl:()=>NS,expm1Impl:()=>RS,floorImpl:()=>_S,gatherNdImpl:()=>DS,gatherV2Impl:()=>$S,greaterEqualImpl:()=>FS,greaterImpl:()=>PS,lessEqualImpl:()=>MS,lessImpl:()=>OS,linSpaceImpl:()=>zS,logImpl:()=>LS,maxImpl:()=>BS,maximumImpl:()=>WS,minimumImpl:()=>VS,multiplyImpl:()=>Nx,negImpl:()=>US,notEqualImpl:()=>GS,prodImpl:()=>HS,raggedGatherImpl:()=>jS,raggedTensorToTensorImpl:()=>qS,rangeImpl:()=>Rx,rsqrtImpl:()=>XS,scatterImpl:()=>Hu,sigmoidImpl:()=>QX,simpleAbsImpl:()=>vS,sliceImpl:()=>bm,sparseFillEmptyRowsImpl:()=>ZS,sparseReshapeImpl:()=>YS,sparseSegmentReductionImpl:()=>_x,sqrtImpl:()=>nK,squaredDifferenceImpl:()=>JS,stridedSliceImpl:()=>QS,stringNGramsImpl:()=>Dx,stringSplitImpl:()=>$x,stringToHashBucketFastImpl:()=>Px,subImpl:()=>eI,tileImpl:()=>tI,topKImpl:()=>sI,transposeImpl:()=>Ex,uniqueImpl:()=>rI});function vS(e){let t=new Float32Array(e.length);for(let n=0;n{let{x:t}=e.inputs,n=e.backend;Te(t,"abs");let s=new Float32Array(v.sizeFromShape(t.shape)),r=n.data.get(t.dataId).values;return s=vS(r),n.makeOutput(s,t.shape,t.dtype)},iX={kernelName:dl,backendName:"cpu",kernelFunc:oX};function dn(e){return(t,n,s,r,a)=>{let o=T.assertAndGetBroadcastShape(t,n),i=o.length,l=v.computeStrides(o),u=v.sizeFromShape(o),c=v.getTypedArrayFromDType(a,u),p=t.length,d=n.length,h=v.computeStrides(t),f=v.computeStrides(n),m=T.getBroadcastDims(t,o),g=T.getBroadcastDims(n,o);if(m.length+g.length===0)for(let y=0;yA[C]=0);let b=v.locToIndex(A,p,h),w=x.slice(-d);g.forEach(C=>w[C]=0);let k=v.locToIndex(w,d,f);c[y]=e(s[b],r[k])}return[c,o]}}function _s(e){let{inputs:t,backend:n}=e,{real:s,imag:r}=t,a=n.data.get(s.dataId).values,o=n.data.get(r.dataId).values,i=n.makeTensorInfo(s.shape,"complex64"),l=n.data.get(i.dataId);return l.complexTensorInfos={real:n.makeTensorInfo(s.shape,"float32",a),imag:n.makeTensorInfo(r.shape,"float32",o)},i}var lX={kernelName:Ep,backendName:"cpu",kernelFunc:_s};function xm(e,t,n="float32"){if(n==="complex64"){let r=xm(e,t,"float32"),a=xm(e,t,"float32");return _s({inputs:{real:r,imag:a},backend:e})}let s=v.makeZerosTypedArray(v.sizeFromShape(t),n);return e.makeTensorInfo(t,n,s)}function sa(e){let{inputs:t,backend:n}=e,{x:s}=t;return n.incRef(s.dataId),{dataId:s.dataId,shape:s.shape,dtype:s.dtype}}var uX={kernelName:Fo,backendName:"cpu",kernelFunc:sa};function al(e){let{inputs:t,backend:n}=e,{input:s}=t,r=n.data.get(s.dataId).complexTensorInfos.real,a=n.data.get(r.dataId).values;return n.makeTensorInfo(r.shape,r.dtype,a)}var cX={kernelName:Mp,backendName:"cpu",kernelFunc:al};function wS(e,t,n,s){if(s==="int32"){let r=Int32Array.from(e);return[t,"int32",r]}if(s==="bool"){let r=v.toTypedArray([0],n),[a,o]=dn((i,l)=>i!==l?1:0)(t,[],e,r,"bool");return[o,"bool",a]}throw new Error(`Error in Cast: failed to cast ${n} to ${s}`)}function po(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{dtype:a}=s;if(a==="complex64"){if(r.dtype==="complex64")return sa({inputs:{x:r},backend:n});let c=xm(n,r.shape,r.dtype),p=po({inputs:{x:r},backend:n,attrs:{dtype:"float32"}}),d=_s({inputs:{real:p,imag:c},backend:n});return n.disposeIntermediateTensorInfo(c),n.disposeIntermediateTensorInfo(p),d}if(r.dtype==="complex64"){let c=al({inputs:{input:r},backend:n}),p=po({inputs:{x:c},backend:n,attrs:{dtype:a}});return n.disposeIntermediateTensorInfo(c),p}if(!v.hasEncodingLoss(r.dtype,a)){let c=sa({inputs:{x:r},backend:n});return{dataId:c.dataId,shape:c.shape,dtype:a}}let o=n.data.get(r.dataId).values,[i,l,u]=wS(o,r.shape,r.dtype,a);return n.makeTensorInfo(i,l,u)}var dX={kernelName:bo,backendName:"cpu",kernelFunc:po};function En(e,t,n,s){return n==null?({inputs:r,backend:a})=>{let{a:o,b:i}=r,l=a;Te([o,i],e);let u=l.data.get(o.dataId).values,c=l.data.get(i.dataId).values,p=o.dtype==="string"?T.fromUint8ToStringArray(u):u,d=o.dtype==="string"?T.fromUint8ToStringArray(c):c,h=s||o.dtype,[f,m]=t(o.shape,i.shape,p,d,h);return l.makeTensorInfo(m,h,f)}:({inputs:r,backend:a})=>{let{a:o,b:i}=r,l=a;if(o.dtype==="complex64"||i.dtype==="complex64"){let u=po({inputs:{x:o},backend:l,attrs:{dtype:"complex64"}}),c=l.data.get(u.dataId),p=c.complexTensorInfos.real,d=c.complexTensorInfos.imag,h=l.data.get(p.dataId).values,f=l.data.get(d.dataId).values,m=po({inputs:{x:i},backend:l,attrs:{dtype:"complex64"}}),g=l.data.get(m.dataId),y=g.complexTensorInfos.real,x=g.complexTensorInfos.imag,A=l.data.get(y.dataId).values,b=l.data.get(x.dataId).values,[w,k,C]=n(o.shape,i.shape,h,f,A,b),N=l.makeTensorInfo(C,"float32",w),R=l.makeTensorInfo(C,"float32",k),D=_s({inputs:{real:N,imag:R},backend:l});return l.disposeIntermediateTensorInfo(u),l.disposeIntermediateTensorInfo(m),l.disposeIntermediateTensorInfo(N),l.disposeIntermediateTensorInfo(R),D}else{let u=l.data.get(o.dataId).values,c=l.data.get(i.dataId).values,p=s||o.dtype,[d,h]=t(o.shape,i.shape,u,c,p);return l.makeTensorInfo(h,p,d)}}}function Ix(e){return(t,n,s,r,a,o)=>{let i=T.assertAndGetBroadcastShape(t,n),l=v.sizeFromShape(i),u=i.length,c=v.computeStrides(i),p=v.getTypedArrayFromDType("float32",l),d=v.getTypedArrayFromDType("float32",l),h=T.getBroadcastDims(t,i),f=T.getBroadcastDims(n,i),m=T.mergeRealAndImagArrays(s,r),g=T.mergeRealAndImagArrays(a,o),y=t.length,x=v.computeStrides(t),A=n.length,b=v.computeStrides(n);if(h.length+f.length===0)for(let w=0;wC[$]=0);let N=v.locToIndex(C,y,x),R=k.slice(-A);f.forEach($=>R[$]=0);let D=v.locToIndex(R,A,b),E=e(m[N*2],m[N*2+1],g[D*2],g[D*2+1]);p[w]=E.real,d[w]=E.imag}return[p,d,i]}}var kS=dn((e,t)=>e+t),pX=Ix((e,t,n,s)=>({real:e+n,imag:t+s})),cc=En(Ta,kS,pX),hX={kernelName:Ta,backendName:"cpu",kernelFunc:cc};function Cx(e,t,n,s,r){let a=v.sizeFromShape(s),o=v.makeZerosTypedArray(r,n);for(let i=0;i=r||(a>0?o[l]+=t[i]:o[l]+=1)}return o}function SS(e,t,n,s=!1){let r=e.shape[0],a=e.shape[1],o=ze([r,n],t.dtype);for(let i=0;i=n||(s?o.set(1,i,u):t.size>0?o.set(o.get(i,u)+t.get(i,l),i,u):o.set(o.get(i,u)+1,i,u))}return o}function mi(e){return(t,n,s)=>{let r=v.getTypedArrayFromDType(n,t.length);for(let a=0;a{let{x:o}=s;if(Te(o,e),o.dtype==="string"||n==="string")throw new Error("unaryKernelFunc does not support string input/output");let i=a,l=i.data.get(o.dataId).values,u=v.sizeFromShape(o.shape),c=n||o.dtype,p=v.getArrayFromDType(c,u);for(let d=0;d{let{x:o}=s;if(Te(o,e),o.dtype==="string"||n==="string")throw new Error("unaryKernelFunc does not support string input/output");let i=a,l=i.data.get(o.dataId).values,u=n||o.dtype,c=t(l,u,r);return i.makeTensorInfo(o.shape,u,c)}}var IS=mi(e=>Math.ceil(e)),fX=Qc(vo,IS),mX={kernelName:vo,backendName:"cpu",kernelFunc:fX};function Tx(e,t,n,s){let r=v.getArrayFromDType(n,v.sizeFromShape(t));if(s&&n!=="string"){let a=0;e.forEach(o=>{let i=v.sizeFromShape(o.shape);r.set(o.vals,a),a+=i})}else{let a=0;e.forEach(o=>{let i=n==="string"?T.fromUint8ToStringArray(o.vals):o.vals,l=0;for(let u=0;ue===t?1:0),TS=En(Al,CS,null,"bool"),gX={kernelName:Al,backendName:"cpu",kernelFunc:TS},NS=mi(e=>Math.exp(e)),ES=Qc(Ro,NS,"float32"),yX={kernelName:Ro,backendName:"cpu",kernelFunc:ES},RS=mi(e=>Math.expm1(e)),AX=Qc(bl,RS),xX={kernelName:bl,backendName:"cpu",kernelFunc:AX},_S=mi(e=>Math.floor(e)),bX=Qc(_o,_S),vX={kernelName:_o,backendName:"cpu",kernelFunc:bX};function DS(e,t,n,s,r,a,o,i,l){let u=ze([s,a],n);for(let c=0;c=l/a)throw new Error(`Invalid indices: ${p} does not index into ${i}`);for(let h=0;he>t?1:0),wX=En(Sl,PS,null,"bool"),kX={kernelName:Sl,backendName:"cpu",kernelFunc:wX},FS=dn((e,t)=>e>=t?1:0),SX=En(Po,FS,null,"bool"),IX={kernelName:Po,backendName:"cpu",kernelFunc:SX},OS=dn((e,t)=>ee<=t?1:0),NX=En(Tl,MS,null,"bool"),EX={kernelName:Tl,backendName:"cpu",kernelFunc:NX};function zS(e,t,n){let s=(t-e)/(n-1),r=v.makeZerosTypedArray(n,"float32");r[0]=e;for(let a=1;aMath.log(e)),RX=Qc(Mo,LS),_X={kernelName:Mo,backendName:"cpu",kernelFunc:RX};function BS(e,t,n,s){let r=v.getTypedArrayFromDType(s,v.sizeFromShape(n));for(let a=0;ai)&&(i=u)}r[a]=i}return r}var WS=dn((e,t)=>Math.max(e,t)),DX=En(Lo,WS),$X={kernelName:Lo,backendName:"cpu",kernelFunc:DX},VS=dn((e,t)=>Math.min(e,t)),PX=En(Uo,VS),FX={kernelName:Uo,backendName:"cpu",kernelFunc:PX},Nx=dn((e,t)=>e*t),OX=Ix((e,t,n,s)=>({real:e*n-t*s,imag:e*s+t*n})),i2=En(Ho,Nx,OX),MX={kernelName:Ho,backendName:"cpu",kernelFunc:i2};function US(e,t,n){let s=v.createScalarValue(-1,n);return Nx([],t,s,e,n)}function zX(e){let{inputs:t,backend:n}=e,{x:s}=t;Te(s,"neg");let r=n.data.get(s.dataId).values,[a,o]=US(r,s.shape,s.dtype);return n.makeTensorInfo(o,s.dtype,a)}var LX={kernelName:Rl,backendName:"cpu",kernelFunc:zX},GS=dn((e,t)=>e!==t?1:0),BX=En(_l,GS,null,"bool"),WX={kernelName:_l,backendName:"cpu",kernelFunc:BX};function Ex(e,t,n,s,r){let a=t.length,o=v.sizeFromShape(t),i=v.computeStrides(t),l=v.computeStrides(r),u=v.getTypedArrayFromDType(n,v.sizeFromShape(r));for(let c=0;cn.disposeIntermediateTensorInfo(x)),n.makeTensorInfo(y,g,f)}var GX={kernelName:Ko,backendName:"cpu",kernelFunc:UX};function HX(e,t,n){e.forEach((s,r)=>{if(s<0||s>=n){let a=v.indexToLoc(r,t.length,v.computeStrides(t)).join(",");throw new Error(`indices[${a}] = ${s} is not in [0, ${n})`)}})}function jX(e,t){for(let n=0;nr)throw new Error("Ragged splits must not point past values");for(let a=1;as[a])throw new Error("Ragged splits must be sorted in ascending order")}}function qX(e,t,n,s){let r=[],a=0,o=t.length-1+n.length,i=new Array(o).fill(null).map(()=>[0]);jX(n,s);let l=1;for(let u=0;u=0){let m=i[f],g=m[m.length-1]-h[c];for(let y=c;yr[o]=a)}return t}function u7(e,t){let n=e.slice(0,t);for(;n.lengthn&&(n=r)}return n}static getMaxWidthValueRowID(e){let t=e.length;if(t===0)return 0;let n=0,s=e[0],r=0;for(let a=1;a"Final length of result must be equal to firstDimension."),r}calculateOutputIndexRowSplit(e,t,n,s){let r=e.length,a=[];for(let o=0;o0&&a.length!==e[r-1])throw new Error("Invalid row split size.");return a}calculateOutputIndexValueRowID(e,t,n,s){let r=e.length,a=[];if(r===0)return[];let o=0,i=e[0];if(i>=t.length)throw new Error(`Got currentValueRowId=${i}, which is not less than ${t.length}`);let l=t[i];a.push(l);for(let u=1;u=0&&(++o,o=t.length)throw new Error(`Got nextValueRowId=${c} which is not less than ${t.length}`);l=t[c]}a.push(l)}if(a.length!==e.length)throw new Error("Invalid row ids.");return a}calculateOutputIndex(e,t,n,s){let r=this.getRowPartitionTensor(e),a=this.getRowPartitionTypeByDimension(e);switch(a){case dr.VALUE_ROWIDS:return this.calculateOutputIndexValueRowID(r,t,n,s);case dr.ROW_SPLITS:if(r.length-1>t.length)throw new Error(`Row partition size is greater than output size: ${r.length-1} > ${t.length}`);return this.calculateOutputIndexRowSplit(r,t,n,s);default:throw new Error(`Unsupported partition type: ${dr[a]}`)}}getFirstDimensionSize(){let e=this.rowPartitionValues[0];if(this.rowPartitionTypes.length===0)throw new Error("No row_partition_types given.");let t=this.rowPartitionTypes[0];switch(t){case dr.FIRST_DIM_SIZE:return e[0];case dr.VALUE_ROWIDS:throw new Error("Cannot handle VALUE_ROWIDS in first dimension.");case dr.ROW_SPLITS:return this.rowPartitionValuesShapes[0][0]-1;default:throw new Error(`Cannot handle type ${dr[t]}`)}}compute(){if(this.rowPartitionValues[0].length<=0)throw new Error("Invalid first partition input. Tensor requires at least one element.");let t=this.getFirstDimensionSize(),n=this.calculateOutputSize(t),s=new Array(this.raggedRank+1);s[s.length-1]=1;for(let i=s.length-2;i>=0;--i)s[i]=s[i+1]*n[i+1];let r=d7(n,!1),a=v.getArrayFromDType(this.valuesDType,v.sizeFromShape(r));if(s[0]*n[0]>0){let i=this.calculateFirstParentOutputIndex(t,s[0],n[0]);for(let l=1;l<=this.raggedRank;++l)i=this.calculateOutputIndex(l-1,i,s[l],n[l]);this.setOutput(this.raggedRank,i,a,r)}return[r,a]}setOutput(e,t,n,s){if(n.length===0)return;let r=this.values,a=n,o=s.slice();o=o.slice(e+1);let i=v.sizeFromShape(o),l=t.length,u=this.defaultValue;if(u.length!==i&&u.length!==1){let h=this.defaultValueShape;X(()=>{let f=W(u,h);u=Xi(f,o).dataSync()})}let c=0,p=0,d=0;for(let h=0;h<=l;++h){let f=h=l){let m=n.length;f=Math.floor(m/i)}if(f>d)if(this.defaultValue.length===1)a.subarray(d*i,f*i).fill(this.defaultValue[0]),d=f;else for(;f>d;){let m=a.slice(d*i);c7(m,u,i),++d}f<0?(c=h+1,p=d):(c=h,p=d,d=p+1)}}};function c7(e,t,n){for(let s=0;s= 0`);if(s<-1)throw new Error(`Dimension ${s} must be >= -1`);s=-1}n.push(s)}return n}function qS(e,t,n,s,r,a,o,i,l,u){return new Z3(e,t,n,s,r,a,o,i,l,u).compute()}function Rx(e,t,n,s){let r=e===t,a=e1;if(r||a||o)return v.makeZerosTypedArray(0,s);let i=Math.abs(Math.ceil((t-e)/n)),l=v.makeZerosTypedArray(i,s);t1/Math.sqrt(e)),YX=Qc(ei,XS),JX={kernelName:ei,backendName:"cpu",kernelFunc:YX};function Hu(e,t,n,s,r,a,o,i,l,u){let c=[s/r,r],p=e.values,d=t.values;if(s===0)return ze(n,t.dtype);let h=ze(c,t.dtype);typeof l=="string"||typeof l=="number"?h.values.fill(l):typeof l=="boolean"&&h.values.fill(+l);for(let f=0;f=s/r)throw new Error(`Invalid indices: ${m} does not index into ${n}`);for(let y=0;y1/(1+Math.exp(-e))),KS=xt(ni,e=>1/(1+Math.exp(-e))),eK={kernelName:ni,backendName:"cpu",kernelFunc:KS};function bm(e,t,n,s,r){let a=Gt.isSliceContinous(s,t,n),o=v.sizeFromShape(n),i=v.computeStrides(s);if(a){let p=Gt.computeFlatOffset(t,i);return r==="string"?e.slice(p,p+o):e.subarray(p,p+o)}let l=r==="string"?T.fromUint8ToStringArray(e):e,u=ze(s,r,l),c=ze(n,r);for(let p=0;pf+t[m]);c.set(u.get(...h),...d)}return r==="string"?T.fromStringArrayToUint8(c.values):c.values}function ol(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{begin:a,size:o}=s;Te(r,"slice");let[i,l]=Gt.parseSliceParams(r,a,o);Gt.assertParamsValid(r,i,l);let u=n.data.get(r.dataId).values,c=bm(u,i,l,r.shape,r.dtype);return n.makeTensorInfo(l,r.dtype,c)}var tK={kernelName:Ul,backendName:"cpu",kernelFunc:ol};function ZS(e,t,n,s,r,a,o){let i=t[0],l=a[0],u=new Array(l),c=new Array(i),p=t[1];if(l===0){if(i!==0)throw new Error(T.getSparseFillEmptyRowsIndicesDenseShapeMismatch(i));let g=v.getArrayFromDType(n,0),y=v.getArrayFromDType(r,0);return[g,[0,p],y,u,c]}let d=!0,h=0,f=new Array(l).fill(0);for(let g=0;g=l)throw new Error(T.getSparseFillEmptyRowsOutOfRangeIndexErrorMessage(g,y,l));++f[y],d=d&&y>=h,h=y}let m=!0;for(let g=0;g0&&(f[g]+=f[g-1])}if(m&&d){let g=e,y=s;for(let x=0;x0){h[d-1]=1;for(let g=d-2;g>=0;--g)h[g]=h[g+1]*s[g+1]}let f=[];if(i>0){f[i-1]=1;for(let g=i-2;g>=0;--g)f[g]=f[g+1]*l[g+1]}let m=v.getArrayFromDType(n,o*i);for(let g=0;g0?r[i-1]+1:0;if(p<0)throw new Error(T.getSparseSegmentReductionNegativeSegmentIdsErrorMessage());let d=t.slice();d[0]=p;let h=d.reduce((A,b)=>A*b,1),f=v.getArrayFromDType(n,h);if(i===0)return p>0&&f.fill(o),[f,d];if(p<=0)throw new Error(T.getSparseSegmentReductionNegativeSegmentIdsErrorMessage());let m=0,g=1,y=0,x=r[m];for(;;){let A=0;if(g=A)throw new Error(T.getSparseSegmentReductionNonIncreasingSegmentIdsErrorMessage())}if(x<0||x>=p)throw new Error(T.getSparseSegmentReductionSegmentIdOutOfRangeErrorMessage(x,p));x>y&&f.fill(o,y*u,x*u);for(let b=m;b=l[0])throw new Error(T.getSparseSegmentReductionIndicesOutOfRangeErrorMessage(b,s[b],l[0]));for(let k=0;ki)break}return yMath.sqrt(e)),sK=xt(si,e=>Math.sqrt(e)),rK={kernelName:si,backendName:"cpu",kernelFunc:sK},JS=dn((e,t)=>{let n=e-t;return n*n}),aK=En(oi,JS),oK={kernelName:oi,backendName:"cpu",kernelFunc:aK};function QS(e,t,n,s){let r=ze(e,t.dtype);for(let a=0;a0?0:o-i),d=0;d+=l*this.leftPad.length;for(let y=0;yy.forEach(x=>f[m++]=x);for(let y=0;y0){g(e[p+c-1]);for(let y=0;y0){let i=t[0];if(i!==0)throw new Error(`First split value must be 0, got ${i}`);for(let l=1;l=i;if(u=u&&t[l]<=n,!u)throw new Error(`Invalid split value ${t[l]}, must be in [${i}, ${n}]`);i=t[l]}if(i!==n)throw new Error(`Last split value must be data size. Expected ${n}, got ${i}`)}let r=s-1,a=v.getArrayFromDType("int32",s);if(n===0||s===0){let i=new Array(n);for(let l=0;l<=r;++l)a[l]=0;return[i,a]}a[0]=0;for(let i=1;i<=r;++i){let l=t[i]-t[i-1],u=0;this.nGramWidths.forEach(c=>{u+=this.getNumNGrams(l,c)}),this.preserveShort&&l>0&&u===0&&(u=1),a[i]=a[i-1]+u}let o=new Array(a[r]);for(let i=0;i{let p=t[i+1]-t[i],d=this.getNumNGrams(p,c);this.createNGrams(e,l,o,u,d,c),u+=d}),this.preserveShort&&u===a[i]){let c=t[i+1]-t[i];if(c===0)continue;let p=c+2*this.padWidth,d=1;this.createNGrams(e,l,o,u,d,p)}}return[o,a]}};function Dx(e,t,n,s,r,a,o,i){return new iK(n,s,r,a,o,i).compute(e,t)}function lK(e,t,n,s){if(!e.length)return;if(t.length===0){for(let a=0;ae-t),uK=Ix((e,t,n,s)=>({real:e-n,imag:t-s})),Fx=En(ii,eI,uK),cK={kernelName:ii,backendName:"cpu",kernelFunc:Fx};function tI(e,t){let n=new Array(e.rank);for(let r=0;r{let n=t.value-e.value;return n===0?e.index-t.index:n};function nI(e,t,n=0,s=e.length-1){for(;s>n;){if(s-n>600){let i=s-n+1,l=t-n+1,u=Math.log(i),c=.5*Math.exp(2*u/3),p=.5*Math.sqrt(u*c*(i-c)/i)*Math.sign(l-i/2),d=Math.max(n,Math.floor(t-l*c/i+p)),h=Math.min(s,Math.floor(t+(i-l)*c/i+p));nI(e,t,d,h)}let r=e[t],a=n,o=s;for(v.swap(e,n,t),Kd(e[s],r)>0&&v.swap(e,n,s);a0;)o=o-1}Kd(e[n],r)===0?v.swap(e,n,o):(o=o+1,v.swap(e,o,s)),o<=t&&(n=o+1),t<=o&&(s=o-1)}}function sI(e,t,n,s,r){let a=t[t.length-1],[o,i]=[e.length/a,a],l=v.getTypedArrayFromDType(n,o*s),u=v.getTypedArrayFromDType("int32",o*s);for(let p=0;pf[A]={value:x,index:A}),s{for(let g=0;gnew kx,1);var aI=xt(Eo,e=>e>=0?e:Math.exp(e)-1),dK={kernelName:Eo,backendName:"cpu",kernelFunc:aI};function oI(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{alpha:a}=s;Te([r],"leakyRelu");let o=v.sizeFromShape(r.shape),i=n.data.get(r.dataId).values,l=v.getTypedArrayFromDType("float32",o);for(let u=0;ue<0?t*e:e);function iI(e){let{inputs:t,backend:n}=e,{x:s,alpha:r}=t;Te([s,r],"prelu");let a=n.data.get(s.dataId).values,o=n.data.get(r.dataId).values,[i,l]=hK(s.shape,r.shape,a,o,"float32");return n.makeTensorInfo(l,"float32",i)}var fK={kernelName:Xo,backendName:"cpu",kernelFunc:iI},lI=xt(Zo,e=>Math.max(0,e)),mK={kernelName:Zo,backendName:"cpu",kernelFunc:lI},uI=xt(Qo,e=>Math.min(Math.max(0,e),6)),gK={kernelName:Qo,backendName:"cpu",kernelFunc:uI};function vm(e,t,n,s,r){if(n==="linear")return sa({inputs:{x:t},backend:e});if(n==="relu")return lI({inputs:{x:t},backend:e});if(n==="elu")return aI({inputs:{x:t},backend:e});if(n==="relu6")return uI({inputs:{x:t},backend:e});if(n==="prelu")return iI({inputs:{x:t,alpha:s},backend:e});if(n==="leakyrelu")return oI({inputs:{x:t},backend:e,attrs:{alpha:r}});if(n==="sigmoid")return KS({inputs:{x:t},backend:e});throw new Error(`Activation ${n} has not been implemented for the CPU backend.`)}function Ct(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{shape:a}=s,o=v.sizeFromShape(r.shape),i=v.inferFromImplicitShape(a,o),l=v.sizeFromShape(i);v.assert(o===l,()=>`The new shape (${i}) has ${l} elements and the old shape (${r.shape}) has ${o} elements. The new shape and old shape must have the same number of elements.`),n.incRef(r.dataId);let u=n.data.get(r.dataId);if(u.complexTensorInfos!=null){let c=u.complexTensorInfos.real,p=u.complexTensorInfos.imag;c.shape=i,p.shape=i}return{dataId:r.dataId,shape:i,dtype:r.dtype}}var yK={kernelName:zl,backendName:"cpu",kernelFunc:Ct};function cI(e){let{inputs:t,backend:n,attrs:s}=e,{a:r,b:a}=t,{transposeA:o,transposeB:i}=s;Te([r,a],"matMul");let l=r.shape.length,u=a.shape.length,c=o?r.shape[l-2]:r.shape[l-1],p=i?a.shape[u-1]:a.shape[u-2],d=o?r.shape[l-1]:r.shape[l-2],h=i?a.shape[u-2]:a.shape[u-1],f=r.shape.slice(0,-2),m=a.shape.slice(0,-2),g=v.sizeFromShape(f),y=v.sizeFromShape(m),A=tu.assertAndGetBroadcastShape(r.shape.slice(0,-2),a.shape.slice(0,-2)).concat([d,h]);v.assert(c===p,()=>`Error in matMul: inner shapes (${c}) and (${p}) of Tensors with shapes ${r.shape} and ${a.shape} and transposeA=${o} and transposeB=${i} must match.`);let b=o?[g,c,d]:[g,d,c],w=i?[y,h,p]:[y,p,h],k=Ct({inputs:{x:r},backend:n,attrs:{shape:b}}),C=Ct({inputs:{x:a},backend:n,attrs:{shape:w}}),N=o?k.shape[1]:k.shape[2],R=o?k.shape[2]:k.shape[1],D=i?C.shape[1]:C.shape[2],E=Math.max(g,y),$=n.data.get(k.dataId).values,S=n.data.get(C.dataId).values,F=v.computeStrides(k.shape),z=v.computeStrides(C.shape),[V,j,G]=o?[F[0],1,F[1]]:[F[0],F[1],1],[q,K,ne]=i?[1,z[1],z[0]]:[z[1],1,z[0]],ae=R*D,re=ze([E,R,D],k.dtype),ue=re.values,oe=n.blockSize;for(let Ae=0;AeMath.acos(e)),wK={kernelName:gc,backendName:"cpu",kernelFunc:vK},kK=xt(yc,e=>Math.acosh(e)),SK={kernelName:yc,backendName:"cpu",kernelFunc:kK};function IK(e){let{inputs:t,backend:n}=e,s=t;Te(t,"addN");let r=s.map(i=>n.data.get(i.dataId).values),a=ze(s[0].shape,s[0].dtype),o=a.values;for(let i=0;ix&&(x=w,A=b)}h[g]=A}return u.forEach(g=>n.disposeIntermediateTensorInfo(g)),n.makeTensorInfo(c,"int32",h)}var DK={kernelName:yo,backendName:"cpu",kernelFunc:_K};function $K(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{axis:a}=s;Te(r,"argMin");let o=v.parseAxisParam(a,r.shape),i=T.getAxesPermutation(o,r.shape.length),l=r,u=[];i!=null&&(l=ws({inputs:{x:r},backend:n,attrs:{perm:i}}),u.push(l),o=T.getInnerMostAxes(o.length,l.shape.length)),o=[o[0]],T.assertAxesAreInnerMostDims("argMin",o,l.shape.length);let[c,p]=T.computeOutAndReduceShapes(l.shape,o),d=v.sizeFromShape(c),h=v.makeZerosTypedArray(d,"int32"),f=v.sizeFromShape(p),m=n.data.get(l.dataId).values;for(let g=0;gn.disposeIntermediateTensorInfo(g)),n.makeTensorInfo(c,"int32",h)}var PK={kernelName:bc,backendName:"cpu",kernelFunc:$K},FK=xt(vc,e=>Math.asin(e)),OK={kernelName:vc,backendName:"cpu",kernelFunc:FK},MK=xt(wc,e=>Math.asinh(e)),zK={kernelName:wc,backendName:"cpu",kernelFunc:MK},LK=xt(kc,e=>Math.atan(e)),BK={kernelName:kc,backendName:"cpu",kernelFunc:LK},WK=dn((e,t)=>Math.atan2(e,t)),VK=En(pl,WK),UK={kernelName:pl,backendName:"cpu",kernelFunc:VK},GK=xt(Sc,e=>Math.atanh(e)),HK={kernelName:Sc,backendName:"cpu",kernelFunc:GK};function Ox(e,t,n,s,r,a){let o=r.strideHeight,i=r.strideWidth,l=r.dilationHeight,u=r.dilationWidth,c=r.effectiveFilterHeight,p=r.effectiveFilterWidth,d=r.padInfo.top,h=r.padInfo.left,f=a==="max"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,m=ze(r.outShape,n),g=m.values,y=r.outShape[1]*r.outShape[2]*r.outShape[3],x=r.outShape[2]*r.outShape[3],A=r.outShape[3];for(let b=0;bj?j=oe:a==="avg"&&(G+=oe,q++)}if(isNaN(j))break}let K=$+S*A+C;g[K]=a==="avg"?G/q:j}}}return m}function dI(e,t,n,s,r=!1,a=!1){let o=ze(s.outShape,"int32"),i=s.strideHeight,l=s.strideWidth,u=s.dilationHeight,c=s.dilationWidth,p=s.effectiveFilterHeight,d=s.effectiveFilterWidth,h=s.padInfo.top,f=s.padInfo.left,m=ze(t,n,e);for(let g=0;gD&&(D=V,r?E=a?((g*s.inHeight+$)*s.inWidth+F)*s.inChannels+y:($*s.inWidth+F)*s.inChannels+y:E=S*d+z)}}o.set(E,g,x,k,y)}}return o}function pI(e,t,n,s,r,a){let o=r.strideDepth,i=r.strideHeight,l=r.strideWidth,u=r.dilationDepth,c=r.dilationHeight,p=r.dilationWidth,d=r.effectiveFilterDepth,h=r.effectiveFilterHeight,f=r.effectiveFilterWidth,m=r.padInfo.front,g=r.padInfo.top,y=r.padInfo.left,x=a==="max"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,A=ze(r.outShape,n),b=A.values,w=r.outShape[1]*r.outShape[2]*r.outShape[3]*r.outShape[4],k=r.outShape[2]*r.outShape[3]*r.outShape[4],C=r.outShape[3]*r.outShape[4],N=r.outShape[4];for(let R=0;RIe?Ie=kt:a==="avg"&&(Se+=kt,Fe++),isNaN(Ie))break}if(isNaN(Ie))break}if(isNaN(Ie))break}let $e=Q+$;b[$e]=a==="avg"?Se/Fe:Ie}}}}return A}function jK(e,t){let n=ze(t.outShape,"int32"),s=t.strideDepth,r=t.strideHeight,a=t.strideWidth,o=t.dilationDepth,i=t.dilationHeight,l=t.dilationWidth,u=t.effectiveFilterDepth,c=t.effectiveFilterHeight,p=t.effectiveFilterWidth,d=t.padInfo.front,h=t.padInfo.top,f=t.padInfo.left;for(let m=0;m=S&&(S=ne,F=V*c*p+G*c+K)}}}n.set(F,m,y,w,R,g)}}}return n}function qK(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t;Te(r,"avgPool");let{filterSize:a,strides:o,pad:i,dimRoundingMode:l}=s,u=1;v.assert(T.eitherStridesOrDilationsAreOne(o,u),()=>`Error in avgPool: Either strides or dilations must be 1. Got strides ${o} and dilations '${u}'`);let c=T.computePool2DInfo(r.shape,a,o,u,i,l),p;if(c.filterWidth===1&&c.filterHeight===1&&v.arraysEqual(c.inShape,c.outShape))p=sa({inputs:{x:r},backend:n});else{let d=n.data.get(r.dataId).values,h=v.computeStrides(r.shape),f=Ox(d,r.shape,r.dtype,h,c,"avg");p=n.makeTensorInfo(c.outShape,r.dtype,f.values)}return p}var XK={kernelName:Ao,backendName:"cpu",kernelFunc:qK};function KK(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{filterSize:a,strides:o,pad:i,dimRoundingMode:l,dataFormat:u}=s;Te(r,"avgPool3d");let c=T.computePool3DInfo(r.shape,a,o,1,i,l,u),p=n.data.get(r.dataId).values,d=pI(p,r.shape,r.dtype,v.computeStrides(r.shape),c,"avg");return n.makeTensorInfo(d.shape,"float32",d.values)}var ZK={kernelName:Np,backendName:"cpu",kernelFunc:KK};function YK(e){let{inputs:t,backend:n,attrs:s}=e,{dy:r,input:a}=t,{filterSize:o,strides:i,pad:l,dimRoundingMode:u}=s;Te([r,a],"avgPool3DGrad");let c=T.computePool3DInfo(a.shape,o,i,1,l,u),p=c.strideDepth,d=c.strideHeight,h=c.strideWidth,f=c.filterDepth,m=c.filterHeight,g=c.filterWidth,y=c.dilationDepth,x=c.dilationHeight,A=c.dilationWidth,b=c.effectiveFilterDepth,w=c.effectiveFilterHeight,k=c.effectiveFilterWidth,C=b-1-c.padInfo.front,N=k-1-c.padInfo.left,R=w-1-c.padInfo.top,D=ze(a.shape,"float32"),E=1/(f*m*g),$=n.bufferSync(r);for(let S=0;S=c.outDepth||Math.floor(re)!==re))for(let ue=0;ue=c.outHeight||Math.floor(oe)!==oe))for(let Ae=0;Ae=c.outWidth||Math.floor(Q)!==Q)continue;ne+=$.get(S,re,oe,Q,F)}}}D.set(ne*E,S,z,V,j,F)}return n.makeTensorInfo(D.shape,D.dtype,D.values)}var JK={kernelName:$m,backendName:"cpu",kernelFunc:YK};function QK(e){let{inputs:t,backend:n,attrs:s}=e,{dy:r,input:a}=t,o=a;Te([r,a],"avgPoolGrad");let{filterSize:i,strides:l,pad:u}=s,c=T.computePool2DInfo(o.shape,i,l,1,u),p=c.strideHeight,d=c.strideWidth,h=c.filterHeight,f=c.filterWidth,m=c.dilationHeight,g=c.dilationWidth,y=c.effectiveFilterHeight,x=c.effectiveFilterWidth,A=x-1-c.padInfo.left,b=y-1-c.padInfo.top,w=ze(o.shape,"float32"),k=1/(h*f),C=n.data.get(r.dataId).values,N=ze(r.shape,"float32",C);for(let R=0;R=c.outHeight||Math.floor(j)!==j))for(let G=0;G=c.outWidth||Math.floor(q)!==q)continue;z+=N.get(R,j,q,D)}}w.set(z*k,R,E,$,D)}return n.makeTensorInfo(w.shape,w.dtype,w.values)}var eZ={kernelName:Dm,backendName:"cpu",kernelFunc:QK};function tZ(e){let{inputs:t,backend:n,attrs:s}=e,{x:r,scale:a,offset:o,mean:i,variance:l}=t;v.assert(i.shape.length===l.shape.length,()=>"Batch normalization gradient requires mean and variance to have equal ranks."),v.assert(o==null||i.shape.length===o.shape.length,()=>"Batch normalization gradient requires mean and offset to have equal ranks."),v.assert(a==null||i.shape.length===a.shape.length,()=>"Batch normalization gradient requires mean and scale to have equal ranks."),Te([r,i,l,a,o],"batchNorm");let{varianceEpsilon:u}=s;u==null&&(u=.001);let c=n.data.get(r.dataId).values,p=n.data.get(i.dataId).values,d=n.data.get(l.dataId).values,h=a?n.data.get(a.dataId).values:new Float32Array([1]),f=o?n.data.get(o.dataId).values:new Float32Array([0]),m=new Float32Array(c.length),g=f.length,y=h.length,x=d.length,A=p.length,b=0,w=0,k=0,C=0;for(let N=0;N=g&&(b=0),w>=A&&(w=0),k>=y&&(k=0),C>=x&&(C=0);return n.makeTensorInfo(r.shape,r.dtype,m)}var nZ={kernelName:$o,backendName:"cpu",kernelFunc:tZ};function sZ(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{blockShape:a,crops:o}=s;Te([r],"batchToSpaceND");let i=a.reduce((y,x)=>y*x),l=T.getReshaped(r.shape,a,i),u=T.getPermuted(l.length,a.length),c=T.getReshapedPermuted(r.shape,a,i),p=T.getSliceBeginCoords(o,a.length),d=T.getSliceSize(c,o,a.length),h=Ct({inputs:{x:r},backend:n,attrs:{shape:l}}),f=ws({inputs:{x:h},backend:n,attrs:{perm:u}}),m=Ct({inputs:{x:f},backend:n,attrs:{shape:c}}),g=ol({inputs:{x:m},backend:n,attrs:{begin:p,size:d}});return n.disposeIntermediateTensorInfo(h),n.disposeIntermediateTensorInfo(f),n.disposeIntermediateTensorInfo(m),g}var rZ={kernelName:hl,backendName:"cpu",kernelFunc:sZ};function aZ(e){let{inputs:t,backend:n,attrs:s}=e,{x:r,weights:a}=t,{size:o}=s,i=n.data.get(r.dataId).values,l=n.data.get(a.dataId).values,u=Cx(i,l,a.dtype,a.shape,o);return n.makeTensorInfo([o],a.dtype,u)}var oZ={kernelName:Pm,backendName:"cpu",kernelFunc:aZ};function iZ(e){let{inputs:t,backend:n}=e,{s0:s,s1:r}=t,a=n.data.get(s.dataId).values,o=n.data.get(r.dataId).values,i=T.assertAndGetBroadcastShape(Array.from(a),Array.from(o));return n.makeTensorInfo([i.length],"int32",Int32Array.from(i))}var lZ={kernelName:Fm,backendName:"cpu",kernelFunc:iZ},uZ=xt(Na,(e,t)=>{let n=t;return e>n.clipValueMax?n.clipValueMax:e{let{x:t}=e.inputs,n=e.backend,s=new Float32Array(v.sizeFromShape(t.shape)),r=n.data.get(t.dataId),a=r.complexTensorInfos.real,o=r.complexTensorInfos.imag,i=n.data.get(a.dataId).values,l=n.data.get(o.dataId).values;for(let u=0;um.shape);T.assertParamsConsistent(o,a);let i=T.computeOutShape(t.map(m=>m.shape),a);if(v.sizeFromShape(i)===0)return n.makeTensorInfo(i,t[0].dtype,[]);let l=t.filter(m=>v.sizeFromShape(m.shape)>0);if(l.length===1)return sa({inputs:{x:l[0]},backend:n});if(l[0].dtype==="complex64"){let m=l.map(b=>al({inputs:{input:b},backend:n})),g=l.map(b=>dc({inputs:{input:b},backend:n})),y=pc({inputs:m,backend:n,attrs:{axis:a}}),x=pc({inputs:g,backend:n,attrs:{axis:a}}),A=_s({inputs:{real:y,imag:x},backend:n});return m.forEach(b=>n.disposeIntermediateTensorInfo(b)),g.forEach(b=>n.disposeIntermediateTensorInfo(b)),n.disposeIntermediateTensorInfo(y),n.disposeIntermediateTensorInfo(x),A}let u=l.map(m=>{let g=v.sizeFromShape(m.shape.slice(a));return Ct({inputs:{x:m},backend:n,attrs:{shape:[-1,g]}})}),c=u.map(m=>({vals:n.data.get(m.dataId).values,shape:m.shape}));i=T.computeOutShape(u.map(m=>m.shape),1);let p=u[0].shape[0]===1,d=Tx(c,i,t[0].dtype,p),h=T.computeOutShape(l.map(m=>m.shape),a),f=n.makeTensorInfo(h,t[0].dtype,d);return u.forEach(m=>n.disposeIntermediateTensorInfo(m)),f}var fZ={kernelName:fl,backendName:"cpu",kernelFunc:pc};function hI(e){let{inputs:t,backend:n,attrs:s}=e,{x:r,filter:a}=t,{strides:o,pad:i,dataFormat:l,dilations:u,dimRoundingMode:c}=s;Te([r,a],"conv2d");let p=T.convertConv2DDataFormat(l),d=T.computeConv2DInfo(r.shape,a.shape,o,u,i,c,!1,p),h=d.filterHeight,f=d.filterWidth,m=d.dilationHeight,g=d.dilationWidth,y=d.padInfo.left,x=d.padInfo.top,A=d.dataFormat==="channelsLast",b=new gn(d.outShape,r.dtype),w=v.computeStrides(r.shape),k=v.computeStrides(a.shape),C=w[0],N=A?w[1]:w[2],R=A?w[2]:1,D=A?1:w[1],E=b.strides[0],$=A?b.strides[1]:b.strides[2],S=A?b.strides[2]:1,F=A?1:b.strides[1],z=n.data.get(r.dataId).values,V=n.data.get(a.dataId).values,j=b.values;for(let G=0;G=d.inHeight)continue;let Ae=ue*k[0],Q=q+oe*N;for(let Ie=0;Ie=d.inWidth)continue;let mt=Ae+$e*k[1],gt=Q+rt*R,yt=mt;for(let ht=0;ht=u.inDepth)continue;let G=V*R[0],q=E+j*N[1];for(let K=0;K=u.inHeight)continue;let oe=G+re*R[1],Ae=q+ue*N[2];for(let Q=0;Q=u.inWidth)continue;let rt=oe+Fe*R[2],mt=Ae+$e*u.inChannels,gt=rt;for(let yt=0;ytMath.cos(e)),TZ={kernelName:So,backendName:"cpu",kernelFunc:CZ},NZ=xt(Io,e=>Math.cosh(e)),EZ={kernelName:Io,backendName:"cpu",kernelFunc:NZ};function RZ(e){let{inputs:t,backend:n,attrs:s}=e,{image:r,boxes:a,boxInd:o}=t,{cropSize:i,method:l,extrapolationValue:u}=s,[c,p,d,h]=r.shape,f=a.shape[0],[m,g]=i,y=ze([f,m,g,h],"float32"),x=n.data.get(a.dataId).values,A=n.data.get(o.dataId).values,b=n.data.get(r.dataId).values,w=v.computeStrides(r.shape),k=v.computeStrides(y.shape);for(let C=0;C=c)continue;let F=m>1?(E-R)*(p-1)/(m-1):0,z=g>1?($-D)*(d-1)/(g-1):0;for(let V=0;V1?R*(p-1)+V*F:.5*(R+E)*(p-1);if(j<0||j>p-1){for(let G=0;G1?D*(d-1)+ne*z:.5*(D+$)*(d-1);if(ae<0||ae>d-1){for(let Ae=0;Ae1?D*(d-1)+G*z:.5*(D+$)*(d-1);if(q<0||q>d-1){for(let ae=0;aey+f-x-1:(y,x)=>y+x;for(let y=0;yy+f-x-1:(y,x)=>y+x;for(let y=0;y`Only NHWC dataFormat supported on CPU for depthToSpace. Got ${o}`);let i=r.shape[0],l=r.shape[1],u=r.shape[2],c=r.shape[3],p=l*a,d=u*a,h=c/(a*a),f=n.data.get(r.dataId).values,m=new Float32Array(i*p*d*h),g=0;for(let y=0;y`Error in depthwiseConv2d: Either strides or dilations must be 1. Got strides ${o} and dilations '${d}'`);let h=T.computeConv2DInfo(r.shape,a.shape,o,d,i,u,!0),{filterHeight:f,filterWidth:m,dilationHeight:g,dilationWidth:y,padInfo:x}=h,A=x.left,b=x.top,w=h.outChannels/h.inChannels,k=new gn(h.outShape,r.dtype),C=n.data.get(r.dataId).values,N=n.data.get(a.dataId).values,R=k.values;for(let D=0;D=h.inHeight)continue;let G=V*p[0],q=E+j*c[1];for(let K=0;K=h.inWidth)continue;let oe=G+re*p[1],Ae=q+ue*h.inChannels,Q=ne,Ie=oe;for(let Se=0;Se{let{x:s,filter:r}=e,{strides:a,pad:o,dilations:i}=n,l=t,u=l.data.get(s.dataId).values,c=s.shape.length,p=l.data.get(r.dataId).values,d=r.shape.length,{batchSize:h,inHeight:f,inWidth:m,inChannels:g,outHeight:y,outWidth:x,padInfo:A,strideHeight:b,strideWidth:w,filterHeight:k,filterWidth:C,dilationHeight:N,dilationWidth:R,outShape:D}=T.computeDilation2DInfo(s.shape,r.shape,a,o,"NHWC",i),E=v.sizeFromShape(D),$=D.length,S=v.getArrayFromDType(s.dtype,E);for(let z=0;z=0&&ue=0&&Aene&&(ne=Se)}}}let ae=v.locToIndex([z,V,G,K],$,v.computeStrides(D));S[ae]=ne}}}return{dataId:l.write(v.toTypedArray(S,s.dtype),D,s.dtype),shape:D,dtype:s.dtype}}},XZ={kernelName:nm,backendName:"cpu",kernelFunc:({inputs:e,backend:t,attrs:n})=>{let{x:s,filter:r,dy:a}=e,{strides:o,pad:i,dilations:l}=n,u=t,c=v.toNestedArray(s.shape,u.data.get(s.dataId).values),p=v.toNestedArray(r.shape,u.data.get(r.dataId).values),{batchSize:d,inHeight:h,inWidth:f,inChannels:m,outHeight:g,outWidth:y,padInfo:x,strideHeight:A,strideWidth:b,filterHeight:w,filterWidth:k,dilationHeight:C,dilationWidth:N,outShape:R}=T.computeDilation2DInfo(s.shape,r.shape,o,i,"NHWC",l);v.assert(a.rank===R.length,()=>`Error in ${nm}, dy must have the same rank as output ${R.length}, but got ${a.rank}`);let D=v.toNestedArray(R,u.data.get(a.dataId).values),E=v.makeZerosNestedTypedArray(r.shape,r.dtype);for(let S=0;S=0&&re=0&&oeq&&(q=Ae,K=ae,ne=ue)}}}E[K][ne][G]+=D[S][F][V][G]}}}return{dataId:u.write(v.toTypedArray(E,s.dtype),r.shape,r.dtype),shape:r.shape,dtype:r.dtype}}},KZ={kernelName:tm,backendName:"cpu",kernelFunc:({inputs:e,backend:t,attrs:n})=>{let{x:s,filter:r,dy:a}=e,{strides:o,pad:i,dilations:l}=n,u=t,c=v.toNestedArray(s.shape,u.data.get(s.dataId).values),p=v.toNestedArray(r.shape,u.data.get(r.dataId).values),{batchSize:d,inHeight:h,inWidth:f,inChannels:m,outHeight:g,outWidth:y,padInfo:x,strideHeight:A,strideWidth:b,filterHeight:w,filterWidth:k,dilationHeight:C,dilationWidth:N,outShape:R}=T.computeDilation2DInfo(s.shape,r.shape,o,i,"NHWC",l);v.assert(a.rank===R.length,()=>`Error in ${tm}, dy must have the same rank as output ${R.length}, but got ${a.rank}`);let D=v.toNestedArray(R,u.data.get(a.dataId).values),E=v.makeZerosNestedTypedArray(s.shape,s.dtype);for(let S=0;S=0&&re=0&&oeq&&(q=Ae,K=re,ne=oe)}}}E[S][K][ne][G]+=D[S][F][V][G]}}}return{dataId:u.write(v.toTypedArray(E,s.dtype),s.shape,s.dtype),shape:s.shape,dtype:s.dtype}}};function Th(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{axis:a,keepDims:o}=s;Te(r,"sum");let i;r.dtype==="bool"?i=po({inputs:{x:r},backend:n,attrs:{dtype:"int32"}}):i=sa({inputs:{x:r},backend:n});let l=i.shape.length,u=v.parseAxisParam(a,i.shape),c=T.getAxesPermutation(u,l),p=u,d=i;c!=null&&(d=ws({inputs:{x:i},backend:n,attrs:{perm:c}}),p=T.getInnerMostAxes(p.length,l)),T.assertAxesAreInnerMostDims("sum",p,d.shape.length);let[h,f]=T.computeOutAndReduceShapes(d.shape,p),m=T.upcastType(d.dtype,"int32"),g=xm(n,h,m),y=v.sizeFromShape(f),x=n.data.get(g.dataId).values,A=n.data.get(d.dataId).values;for(let b=0;b=0&&(d=Th({inputs:{x:d},backend:n,attrs:{axis:u[m]-(o.length-h),keepDims:!1}}),f.push(d)),h--)}for(let m of f)m!==d&&n.disposeIntermediateTensorInfo(m);return d}var JZ={kernelName:$p,backendName:"cpu",kernelFunc:YZ};function QZ(e){let{inputs:t,backend:n}=e,{dy:s,y:r}=t;Te([s,r],"eluGrad");let a=new Float32Array(v.sizeFromShape(r.shape)),o=n.data.get(r.dataId).values,i=n.data.get(s.dataId).values;for(let l=0;l=1?a[l]=i[l]:a[l]=i[l]*(u+1)}return n.makeTensorInfo(r.shape,"float32",a)}var eY={kernelName:Um,backendName:"cpu",kernelFunc:QZ},tY=T.ERF_P,nY=T.ERF_A1,sY=T.ERF_A2,rY=T.ERF_A3,aY=T.ERF_A4,oY=T.ERF_A5,iY=xt(Ic,e=>{let t=Math.sign(e),n=Math.abs(e),s=1/(1+tY*n);return t*(1-((((oY*s+aY)*s+rY)*s+sY)*s+nY)*s*Math.exp(-n*n))}),lY={kernelName:Ic,backendName:"cpu",kernelFunc:iY};function wm(e){let{inputs:t,backend:n,attrs:s}=e,{input:r}=t,{dim:a}=s,o=r.shape.length,i=r.shape.slice(),l=a;return a<0&&(v.assert(-(o+1)<=a,()=>`Axis must be in the interval [${-(o+1)}, ${o}]`),l=o+a+1),i.splice(l,0,1),Ct({inputs:{x:r},backend:n,attrs:{shape:i}})}var uY={kernelName:xl,backendName:"cpu",kernelFunc:wm},cY=dn((e,t)=>e/t),Mx=En(No,cY),Y3={kernelName:No,backendName:"cpu",kernelFunc:Mx};function mI(e,t,n){let s=e.shape,r=s[0],a=s[1],o=n.data.get(e.dataId),i=o.complexTensorInfos.real,l=o.complexTensorInfos.imag,u=[r,a],c=v.sizeFromShape(u),p=v.getTypedArrayFromDType("float32",c),d=v.getTypedArrayFromDType("float32",c);for(let g=0;g{let{image:s}=e,r=n,a=v.getTypedArrayFromDType(s.dtype,v.sizeFromShape(s.shape)),[o,i,l,u]=s.shape,c=r.data.get(s.dataId).values;for(let d=0;d=0&&AMath.floor(e/t)),bY=En(Do,xY,null,"int32"),vY={kernelName:Do,backendName:"cpu",kernelFunc:bY};function wY(e){let{inputs:t,backend:n,attrs:s}=e,{x:r,filter:a,bias:o,preluActivationWeights:i}=t,{strides:l,pad:u,dataFormat:c,dilations:p,dimRoundingMode:d,activation:h,leakyreluAlpha:f}=s,m=hI({inputs:{x:r,filter:a},backend:n,attrs:{strides:l,pad:u,dataFormat:c,dilations:p,dimRoundingMode:d}});if(o){let g=m;if(c==="NCHW"&&o.shape.length===1&&o.shape[0]!==1){let y=Ct({inputs:{x:o},backend:n,attrs:{shape:[o.shape[0],1,1]}});m=cc({inputs:{a:m,b:y},backend:n}),n.disposeIntermediateTensorInfo(y)}else m=cc({inputs:{a:m,b:o},backend:n});n.disposeIntermediateTensorInfo(g)}if(h){let g=m;if(c==="NCHW"&&h==="prelu"&&i.shape.length===1&&i.shape[0]!==1){let y=Ct({inputs:{x:i},backend:n,attrs:{shape:[i.shape[0],1,1]}});m=vm(n,m,h,y,f),n.disposeIntermediateTensorInfo(y)}else m=vm(n,m,h,i,f);n.disposeIntermediateTensorInfo(g)}return m}var kY={kernelName:so,backendName:"cpu",kernelFunc:wY};function SY(e){let{inputs:t,backend:n,attrs:s}=e,{x:r,filter:a,bias:o,preluActivationWeights:i}=t,{strides:l,pad:u,dataFormat:c,dilations:p,dimRoundingMode:d,activation:h,leakyreluAlpha:f}=s,m=fI({inputs:{x:r,filter:a},backend:n,attrs:{strides:l,pad:u,dataFormat:c,dilations:p,dimRoundingMode:d}});if(o){let g=m;m=cc({inputs:{a:m,b:o},backend:n}),n.disposeIntermediateTensorInfo(g)}if(h){let g=m;m=vm(n,m,h,i,f),n.disposeIntermediateTensorInfo(g)}return m}var IY={kernelName:ro,backendName:"cpu",kernelFunc:SY};function CY(e){let{inputs:t,backend:n}=e,{params:s,indices:r}=t,a=v.sizeFromShape(s.shape),o=r.shape,i=o[o.length-1],[l,u,c,p]=T.prepareAndValidate(s,r);if(u===0)return n.makeTensorInfo(l,s.dtype,[]);let d=n.data.get(r.dataId).values,h=n.bufferSync(s),f=DS(d,h,s.dtype,u,i,c,p,s.shape,a);return n.makeTensorInfo(l,s.dtype,f.values)}var TY={kernelName:kl,backendName:"cpu",kernelFunc:CY};function NY(e){let{inputs:t,backend:n,attrs:s}=e,{x:r,indices:a}=t,{axis:o,batchDims:i}=s;Te([r,a],"gatherV2");let l=v.parseAxisParam(o,r.shape)[0],u=n.data.get(a.dataId).values,c=r.shape[l];for(let b=0;b=0,()=>`GatherV2: the index value ${w} is not in [0, ${c-1}]`)}let p=i;i==null&&(p=0);let d=v.sizeFromShape(a.shape),h=T.segment_util.collectGatherOpShapeInfo(r,a,l,p),f=Ct({inputs:{x:r},backend:n,attrs:{shape:[h.batchSize,h.outerSize,h.dimSize,h.sliceSize]}}),m=Ct({inputs:{x:a},backend:n,attrs:{shape:[h.batchSize,d/h.batchSize]}}),g=[h.batchSize,h.outerSize,d/h.batchSize,h.sliceSize],y=n.bufferSync(m),x=n.bufferSync(f),A=$S(x,y,g);return n.disposeIntermediateTensorInfo(f),n.disposeIntermediateTensorInfo(m),n.makeTensorInfo(h.outputShape,A.dtype,A.values)}var EY={kernelName:wl,backendName:"cpu",kernelFunc:NY};function RY(e){let{inputs:t,backend:n}=e,{input:s}=t,r=v.sizeFromShape(s.shape),a=s.shape[s.shape.length-1],o=r/a,i=Ct({inputs:{x:s},backend:n,attrs:{shape:[o,a]}}),l=mI(i,!0,n),u=Ct({inputs:{x:l},backend:n,attrs:{shape:s.shape}});return n.disposeIntermediateTensorInfo(i),n.disposeIntermediateTensorInfo(l),u}var _Y={kernelName:Hm,backendName:"cpu",kernelFunc:RY},DY=xt(Tc,e=>Number.isFinite(e)?1:0,"bool"),$Y={kernelName:Tc,backendName:"cpu",kernelFunc:DY},PY=xt(Nc,e=>Math.abs(e)===1/0?1:0,"bool"),FY={kernelName:Nc,backendName:"cpu",kernelFunc:PY},OY=xt(Il,e=>Number.isNaN(e)?1:0,"bool"),MY={kernelName:Il,backendName:"cpu",kernelFunc:OY};function zY(e){let{backend:t,attrs:n}=e,{start:s,stop:r,num:a}=n,o=zS(s,r,a);return t.makeTensorInfo([o.length],"float32",o)}var LY={kernelName:jm,backendName:"cpu",kernelFunc:zY},BY=xt(Ec,e=>Math.log1p(e)),WY={kernelName:Ec,backendName:"cpu",kernelFunc:BY},VY=dn((e,t)=>e&&t),UY=En(Nl,VY,null,"bool"),GY={kernelName:Nl,backendName:"cpu",kernelFunc:UY},HY=xt(El,e=>e?0:1,"bool"),jY={kernelName:El,backendName:"cpu",kernelFunc:HY},qY=dn((e,t)=>e||t),XY=En(Rc,qY,null,"bool"),KY={kernelName:Rc,backendName:"cpu",kernelFunc:XY};function ZY(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{depthRadius:a,bias:o,alpha:i,beta:l}=s;Te(r,"LRN");let u=r.shape[3],c=u-1,p=n.data.get(r.dataId).values,d=v.sizeFromShape(r.shape),h=new Float32Array(d);function f(m){let g=m%u,y=m-g+Math.max(0,g-a),x=m-g+Math.min(g+a,c),A=0;for(;y<=x;y++){let b=p[y];A+=b*b}return A}for(let m=0;m`Error in maxPool: Either strides or dilations must be 1. Got strides ${o} and dilations '${u}'`);let c=T.computePool2DInfo(r.shape,a,o,u,i,l),p;if(c.filterWidth===1&&c.filterHeight===1&&v.arraysEqual(c.inShape,c.outShape))p=sa({inputs:{x:r},backend:n});else{let d=n.data.get(r.dataId).values,h=v.computeStrides(r.shape),f=Ox(d,r.shape,r.dtype,h,c,"max");p=n.makeTensorInfo(c.outShape,r.dtype,f.values)}return p}var nJ={kernelName:Bo,backendName:"cpu",kernelFunc:tJ};function sJ(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{filterSize:a,strides:o,pad:i,dimRoundingMode:l,dataFormat:u}=s;Te(r,"maxPool3d");let c=T.computePool3DInfo(r.shape,a,o,1,i,l,u),p=n.data.get(r.dataId).values,d=pI(p,r.shape,r.dtype,v.computeStrides(r.shape),c,"max");return n.makeTensorInfo(d.shape,"float32",d.values)}var rJ={kernelName:Op,backendName:"cpu",kernelFunc:sJ};function aJ(e){let{inputs:t,backend:n,attrs:s}=e,{dy:r,input:a}=t,{filterSize:o,strides:i,pad:l,dimRoundingMode:u}=s;Te([r,a],"maxPool3DGrad");let c=T.computePool3DInfo(a.shape,o,i,1,l,u),p=n.bufferSync(a),d=jK(p,c),h=c.strideDepth,f=c.strideHeight,m=c.strideWidth,g=c.dilationDepth,y=c.dilationHeight,x=c.dilationWidth,A=c.effectiveFilterDepth,b=c.effectiveFilterHeight,w=c.effectiveFilterWidth,k=A-1-c.padInfo.front,C=w-1-c.padInfo.left,N=b-1-c.padInfo.top,R=ze(a.shape,"float32"),D=n.bufferSync(r);for(let E=0;E=c.outDepth||Math.floor(ne)!==ne))for(let ae=0;ae=c.outHeight||Math.floor(re)!==re))for(let ue=0;ue=c.outWidth||Math.floor(oe)!==oe)continue;let Ae=A*b*w-1-d.get(E,ne,re,oe,$),Q=K*b*w+ae*w+ue,Ie=Ae===Q?1:0;if(Ie===0)continue;q+=D.get(E,ne,re,oe,$)*Ie}}}R.set(q,E,S,F,z,$)}return n.makeTensorInfo(R.shape,R.dtype,R.values)}var oJ={kernelName:Km,backendName:"cpu",kernelFunc:aJ};function iJ(e){let{inputs:t,backend:n,attrs:s}=e,{dy:r,input:a,output:o}=t,i=a;Te([a,o],"maxPoolGrad");let{filterSize:l,strides:u,pad:c,dimRoundingMode:p}=s,d=T.computePool2DInfo(i.shape,l,u,1,c,p),h=n.data.get(i.dataId).values,f=ze(d.outShape,i.dtype,dI(h,i.shape,i.dtype,d).values),m=d.strideHeight,g=d.strideWidth,y=d.dilationHeight,x=d.dilationWidth,A=d.effectiveFilterHeight,b=d.effectiveFilterWidth,w=b-1-d.padInfo.left,k=A-1-d.padInfo.top,C=ze(i.shape,"float32"),N=n.data.get(r.dataId).values,R=ze(r.shape,"float32",N);for(let D=0;D=d.outHeight||Math.floor(G)!==G))for(let q=0;q=d.outWidth||Math.floor(K)!==K)continue;let ne=A*b-1-f.get(D,G,K,E),ae=j*b+q,re=ne===ae?1:0;if(re===0)continue;V+=R.get(D,G,K,E)*re}}C.set(V,D,$,S,E)}return n.makeTensorInfo(C.shape,C.dtype,C.values)}var lJ={kernelName:Xm,backendName:"cpu",kernelFunc:iJ};function uJ(e,t,n,s,r){let a=v.computeStrides(t),o=Ox(e,t,n,a,r,"max"),i=dI(e,t,n,r,!0,s);return[o.values,i.values]}var cJ={kernelName:Zm,backendName:"cpu",kernelFunc:({inputs:e,attrs:t,backend:n})=>{let{x:s}=e,{filterSize:r,strides:a,pad:o,includeBatchInIndex:i}=t,l=n;Te(s,"MaxPoolWithArgmax");let u=l.data.get(s.dataId).values,c=T.computePool2DInfo(s.shape,r,a,[1,1],o),[p,d]=uJ(u,s.shape,s.dtype,i,c),h=l.write(p,c.outShape,s.dtype),f=l.write(d,c.outShape,s.dtype);return[{dataId:h,shape:c.outShape,dtype:s.dtype},{dataId:f,shape:c.outShape,dtype:"int32"}]}};function dJ(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{axis:a,keepDims:o}=s,i=v.parseAxisParam(a,r.shape),u=T.computeOutAndReduceShapes(r.shape,i)[1],c=v.sizeFromShape(u),p=[],d=n.makeTensorInfo([],"float32",new Float32Array([c]));p.push(d);let h=po({inputs:{x:r},backend:n,attrs:{dtype:"float32"}});p.push(h);let f=Mx({inputs:{a:h,b:d},backend:n});p.push(f);let m=Th({inputs:{x:f},backend:n,attrs:{axis:a,keepDims:o}});return p.forEach(g=>n.disposeIntermediateTensorInfo(g)),m}var pJ={kernelName:Wo,backendName:"cpu",kernelFunc:dJ};function hJ(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{axis:a,keepDims:o}=s;Te(r,"min");let i=v.parseAxisParam(a,r.shape),l=i,u=T.getAxesPermutation(l,r.shape.length),c=r;u!=null&&(c=ws({inputs:{x:r},backend:n,attrs:{perm:u}}),l=T.getInnerMostAxes(l.length,r.shape.length)),T.assertAxesAreInnerMostDims("min",l,c.shape.length);let[p,d]=T.computeOutAndReduceShapes(c.shape,l),h=v.sizeFromShape(d),f=v.makeZerosTypedArray(v.sizeFromShape(p),c.dtype),m=n.data.get(c.dataId).values;for(let y=0;yA[0]+r.shape[b]+A[1]),l=a.map(A=>A[0]),u=a.map((A,b)=>A[0]+r.shape[b]),c=o==="reflect"?0:1,p=n.data.get(r.dataId).values,d=r.shape.length,h=v.computeStrides(r.shape),f=v.sizeFromShape(i),m=i.length,g=v.computeStrides(i),y=v.getTypedArrayFromDType(r.dtype,f);for(let A=0;A=u[k]&&(b[k]=(u[k]-1)*2-b[k]+c);b=b.map((k,C)=>k-l[C]);let w=v.locToIndex(b,d,h);y[A]=p[w]}return{dataId:n.write(y,i,r.dtype),shape:i,dtype:r.dtype}}var gJ={kernelName:Go,backendName:"cpu",kernelFunc:mJ},yJ=dn((e,t)=>{let n=e%t;return e<0&&t<0||e>=0&&t>=0?n:(n+t)%t}),AJ=En(_c,yJ),xJ={kernelName:_c,backendName:"cpu",kernelFunc:AJ},bJ=fo(Em());function yI(e){let{inputs:t,backend:n,attrs:s}=e,{logits:r}=t,{dim:a}=s,o=r.shape.length,i=a;if(i===-1&&(i=o-1),i!==o-1)throw Error(`Softmax along a non-last dimension is not yet supported. Logits was rank ${o} and dim was ${i}`);let l=v.parseAxisParam([i],r.shape),u=gI({inputs:{x:r},backend:n,attrs:{reductionIndices:l,keepDims:!1}}),c=T.expandShapeToKeepDim(u.shape,l),p=Ct({inputs:{x:u},backend:n,attrs:{shape:c}}),d=Fx({inputs:{a:r,b:p},backend:n}),h=ES({inputs:{x:d},backend:n}),f=Th({inputs:{x:h},backend:n,attrs:{axis:l,keepDims:!1}}),m=Ct({inputs:{x:f},backend:n,attrs:{shape:c}}),g=Mx({inputs:{a:h,b:m},backend:n});return n.disposeIntermediateTensorInfo(u),n.disposeIntermediateTensorInfo(p),n.disposeIntermediateTensorInfo(d),n.disposeIntermediateTensorInfo(h),n.disposeIntermediateTensorInfo(f),n.disposeIntermediateTensorInfo(m),g}var vJ={kernelName:ai,backendName:"cpu",kernelFunc:yI};function wJ(e){let{inputs:t,backend:n,attrs:s}=e,{logits:r}=t,{numSamples:a,seed:o,normalized:i}=s;Te(r,"multinomial");let l=i?r:yI({inputs:{logits:r},backend:n,attrs:{dim:-1}}),u=l.shape[0],c=l.shape[1],p=n.data.get(l.dataId).values,d=[u,a],h=v.makeZerosTypedArray(v.sizeFromShape(d),"int32");for(let f=0;f=0&&p[d]{v.assertShapesMatch(a,c.shape,"All tensors passed to stack must have matching shapes"),v.assert(o===c.dtype,()=>"All tensors passed to stack must have matching dtypes")});let i=[],l=t.map(c=>{let p=wm({inputs:{input:c},backend:n,attrs:{dim:r}});return i.push(p),p}),u=pc({inputs:l,backend:n,attrs:{axis:r}});return i.forEach(c=>n.disposeIntermediateTensorInfo(c)),u}var MJ={kernelName:Ol,backendName:"cpu",kernelFunc:xI};function zJ(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{paddings:a,constantValue:o}=s;Te(r,"pad");let i=a.map((x,A)=>x[0]+r.shape[A]+x[1]),l=a.map(x=>x[0]),u=n.data.get(r.dataId).values,c=v.sizeFromShape(r.shape),p=r.shape.length,d=v.computeStrides(r.shape),h=v.sizeFromShape(i),f=i.length,m=v.computeStrides(i),g=v.getTypedArrayFromDType(r.dtype,h);o!==0&&g.fill(o);for(let x=0;xk+l[C]),w=v.locToIndex(b,f,m);g[w]=u[x]}return{dataId:n.write(g,i,r.dtype),shape:i,dtype:r.dtype}}var bI={kernelName:jo,backendName:"cpu",kernelFunc:zJ},LJ=dn((e,t)=>Math.pow(e,t)),BJ=En(qo,LJ),WJ={kernelName:qo,backendName:"cpu",kernelFunc:BJ};function VJ(e){let{inputs:t,backend:n,attrs:s}=e,{paramsNestedSplits:r,paramsDenseValues:a,indices:o}=t,{outputRaggedRank:i}=s,l=r.map(y=>n.data.get(y.dataId).values),u=r.map(y=>y.shape),c=n.data.get(a.dataId).values,p=n.data.get(o.dataId).values,[d,h,f]=jS(l,u,c,a.shape,a.dtype,p,o.shape,i),m=d.map(y=>n.makeTensorInfo([y.length],"int32",y)),g=n.makeTensorInfo(f,a.dtype,h);return m.concat([g])}var UJ={kernelName:Jm,backendName:"cpu",kernelFunc:VJ};function GJ(e){let{inputs:t,backend:n,attrs:s}=e,{shape:r,values:a,defaultValue:o,rowPartitionTensors:i}=t,{rowPartitionTypes:l}=s,u=n.data.get(r.dataId).values,c=n.data.get(a.dataId).values,p=n.data.get(o.dataId).values,d=i.map(g=>n.data.get(g.dataId).values),h=i.map(g=>g.shape),[f,m]=qS(u,r.shape,c,a.shape,a.dtype,p,o.shape,d,h,l);return n.makeTensorInfo(f,a.dtype,m)}var HJ={kernelName:Qm,backendName:"cpu",kernelFunc:GJ};function jJ(e){let{backend:t,attrs:n}=e,{start:s,stop:r,dtype:a,step:o}=n,i=Rx(s,r,o,a);return t.makeTensorInfo([i.length],a,i)}var qJ={kernelName:$c,backendName:"cpu",kernelFunc:jJ},XJ=xt(Ml,e=>1/e),KJ={kernelName:Ml,backendName:"cpu",kernelFunc:XJ};function ZJ(e){let{inputs:t,backend:n,attrs:s}=e,{images:r}=t,{alignCorners:a,halfPixelCenters:o,size:i}=s;Te(r,"resizeBilinear");let l=v.computeStrides(r.shape),[u,c]=i,[p,d,h,f]=r.shape,m=n.data.get(r.dataId).values,g=new Float32Array(v.sizeFromShape([p,u,c,f])),y=[a&&u>1?d-1:d,a&&c>1?h-1:h],x=[a&&u>1?u-1:u,a&&c>1?c-1:c],A=0,b=y[0]/x[0],w=y[1]/x[1];for(let k=0;k1?u-1:u,o&&h>1?c-1:c],g=[o&&d>1?d-1:d,o&&h>1?h-1:h],y=m[0]/g[0],x=m[1]/g[1],A=n.data.get(a.dataId).values,b=0;for(let w=0;w1?d-1:d,a&&c>1?h-1:h],x=[a&&u>1?u-1:u,a&&c>1?c-1:c],A=y[0]/x[0],b=y[1]/x[1],w=0;for(let k=0;k1?c-1:c,o&&f>1?p-1:p],x=[o&&h>1?h-1:h,o&&f>1?f-1:f],A=y[0]/x[0],b=y[1]/x[1],w=1/A,k=1/b,C=Math.ceil(w)*2+2,N=Math.ceil(k)*2+2;for(let R=0;R=h)continue;let re=D+ae*l[1],ue=ae*A,oe=Math.min(c-1,o?Math.round(ue):Math.floor(ue));if(E===oe)for(let Ae=0;Ae=f)continue;let Ie=re+Q*l[2],Se=Q*b,Fe=Math.min(p-1,o?Math.round(Se):Math.floor(Se));z===Fe&&(K+=g[Ie+q])}}m[V+q]=K}}}}return n.makeTensorInfo(r.shape,r.dtype,m)}var sQ={kernelName:e0,backendName:"cpu",kernelFunc:nQ};function rQ(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{dims:a}=s;Te(r,"reverse");let o=r.shape.length,i=v.parseAxisParam(a,r.shape);if(o===0)return sa({inputs:{x:r},backend:n});let l=new gn(r.shape,r.dtype),u=n.bufferSync(r);for(let c=0;cd[h]=r.shape[h]-1-d[h]),l.set(u.get(...d),...p)}return n.makeTensorInfo(l.shape,l.dtype,l.values)}var aQ={kernelName:Ll,backendName:"cpu",kernelFunc:rQ},oQ={kernelName:Ql,backendName:"cpu",kernelFunc:({inputs:e,attrs:t,backend:n})=>{let{image:s}=e,{radians:r,fillValue:a,center:o}=t,i=n,l=v.getTypedArrayFromDType(s.dtype,v.sizeFromShape(s.shape)),[u,c,p,d]=s.shape,[h,f]=T.getImageCenter(o,c,p),m=255,g=Math.sin(r),y=Math.cos(r),x=i.data.get(s.dataId).values;for(let b=0;b=0&&F=0&&z{let t=Math.floor(e);return e-t<.5?Math.floor(e):e-t>.5?Math.ceil(e):t%2===0?t:t+1}),lQ={kernelName:Bl,backendName:"cpu",kernelFunc:iQ};function uQ(e){let{inputs:t,backend:n,attrs:s}=e,{indices:r,updates:a}=t,{shape:o}=s,{sliceRank:i,numUpdates:l,sliceSize:u,strides:c,outputSize:p}=T.calculateShapes(a,r,o),d=!0,h=n.bufferSync(r),f=n.bufferSync(a),m=Hu(h,f,o,p,u,l,i,c,0,d);return n.makeTensorInfo(o,m.dtype,m.values)}var cQ={kernelName:Wl,backendName:"cpu",kernelFunc:uQ};function dQ(e,t){let n=0,s=e.length,r=0;for(;n1||r.shape.length===1?1:v.sizeFromShape(r.shape.slice(1));for(let f=0;fe>=0?xQ*e:AQ*(Math.exp(e)-1)),vQ={kernelName:Pc,backendName:"cpu",kernelFunc:bQ},wQ=xt(Fc,e=>e<0?-1:e>0?1:0),kQ={kernelName:Fc,backendName:"cpu",kernelFunc:wQ},SQ=xt(ti,e=>Math.sin(e)),IQ={kernelName:ti,backendName:"cpu",kernelFunc:SQ},CQ=xt(Gl,e=>Math.sinh(e)),TQ={kernelName:Gl,backendName:"cpu",kernelFunc:CQ},NQ=11920928955078125e-23,p7=Math.log(NQ)+2,EQ=xt(Oc,e=>{let t=e>-p7,n=eNumber(g)))),n.makeTensorInfo([m.length],s.dtype,new Int32Array(m))]}var eee={kernelName:th,backendName:"cpu",kernelFunc:QQ};function tee(e){let{inputs:t,backend:n}=e,{inputIndices:s,inputShape:r,newShape:a}=t;if(s.shape.length!==2)throw new Error(`Input indices should be a matrix but received shape + ${o.shape}`);let i=n.data.get(s.dataId).values,l=n.data.get(r.dataId).values,u=n.data.get(a.dataId).values,c=n.data.get(o.dataId).values[0],[p,d,h,f,m]=ZS(i,s.shape,s.dtype,l,r.dtype,u,c);return[n.makeTensorInfo(d,s.dtype,p),n.makeTensorInfo([d[0]],r.dtype,h),n.makeTensorInfo([f.length],"bool",new Uint8Array(f.map(g=>Number(g)))),n.makeTensorInfo([m.length],s.dtype,new Int32Array(m))]}var PQ={kernelName:zp,backendName:"cpu",kernelFunc:$Q};function FQ(e){let{inputs:t,backend:n}=e,{inputIndices:s,inputShape:r,newShape:a}=t;if(s.shape.length!==2)throw new Error(`Input indices should be a matrix but received shape ${s.shape}`);if(r.shape.length!==1)throw new Error(`Input shape should be a vector but received shape - ${r.shape}`);if(a.shape.length!==1)throw new Error(`Target shape should be a vector but received shape ${a.shape}`);let o=Array.from(n.data.get(r.dataId).values),i=n.data.get(s.dataId).values,l=Array.from(n.data.get(a.dataId).values),[u,c,p]=pI(i,s.shape,s.dtype,o,l);return[n.makeTensorInfo(c,s.dtype,u),n.makeTensorInfo([p.length],a.dtype,new Int32Array(p))]}var nee={kernelName:Kc,backendName:"cpu",kernelFunc:tee};function see(e){let{inputs:t,backend:n}=e,{data:s,indices:r,segmentIds:a}=t;if(s.shape.length<1)throw new Error("Data should be at least 1 dimensional but received scalar");if(r.shape.length!==1)throw new Error(`Indices should be a vector but received shape + ${r.shape}`);if(a.shape.length!==1)throw new Error(`Target shape should be a vector but received shape ${a.shape}`);let o=Array.from(n.data.get(r.dataId).values),i=n.data.get(s.dataId).values,l=Array.from(n.data.get(a.dataId).values),[u,c,p]=YS(i,s.shape,s.dtype,o,l);return[n.makeTensorInfo(c,s.dtype,u),n.makeTensorInfo([p.length],a.dtype,new Int32Array(p))]}var OQ={kernelName:Mc,backendName:"cpu",kernelFunc:FQ};function MQ(e){let{inputs:t,backend:n}=e,{data:s,indices:r,segmentIds:a}=t;if(s.shape.length<1)throw new Error("Data should be at least 1 dimensional but received scalar");if(r.shape.length!==1)throw new Error(`Indices should be a vector but received shape ${r.shape}`);if(a.shape.length!==1)throw new Error(`Segment ids should be a vector but received shape - ${a.shape}`);if(r.shape[0]!==a.shape[0])throw new Error("segmentIds and indices should have same size.");let o=n.data.get(s.dataId).values,i=n.data.get(r.dataId).values,l=n.data.get(a.dataId).values,[u,c]=Yx(o,s.shape,s.dtype,i,l,!0);return n.makeTensorInfo(c,s.dtype,u)}var ree={kernelName:nh,backendName:"cpu",kernelFunc:see};function aee(e){let{inputs:t,backend:n}=e,{data:s,indices:r,segmentIds:a}=t;if(s.shape.length<1)throw new Error("Data should be at least 1 dimensional but received scalar");if(r.shape.length!==1)throw new Error(`Indices should be a vector but received shape + ${a.shape}`);if(r.shape[0]!==a.shape[0])throw new Error("segmentIds and indices should have same size.");let o=n.data.get(s.dataId).values,i=n.data.get(r.dataId).values,l=n.data.get(a.dataId).values,[u,c]=_x(o,s.shape,s.dtype,i,l,!0);return n.makeTensorInfo(c,s.dtype,u)}var zQ={kernelName:Lp,backendName:"cpu",kernelFunc:MQ};function LQ(e){let{inputs:t,backend:n}=e,{data:s,indices:r,segmentIds:a}=t;if(s.shape.length<1)throw new Error("Data should be at least 1 dimensional but received scalar");if(r.shape.length!==1)throw new Error(`Indices should be a vector but received shape ${r.shape}`);if(a.shape.length!==1)throw new Error(`Segment ids should be a vector but received shape - ${a.shape}`);if(r.shape[0]!==a.shape[0])throw new Error("segmentIds and indices should have same size.");let o=n.data.get(s.dataId).values,i=n.data.get(r.dataId).values,l=n.data.get(a.dataId).values,[u,c]=Yx(o,s.shape,s.dtype,i,l);return n.makeTensorInfo(c,s.dtype,u)}var oee={kernelName:sh,backendName:"cpu",kernelFunc:aee};function iee(e){let{inputs:t,backend:n,attrs:s}=e,{sparseIndices:r,sparseValues:a,defaultValue:o}=t,{outputShape:i}=s,{sliceRank:l,numUpdates:u,sliceSize:c,strides:p,outputSize:d}=T.calculateShapes(a,r,i),h=!1,f=n.bufferSync(r),m;switch(a.dtype){case"bool":{let g=n.bufferSync(a),y=Boolean(n.data.get(o.dataId).values[0]);m=sc(f,g,i,d,c,u,l,p,y,h);break}case"float32":{let g=n.bufferSync(a),y=n.data.get(o.dataId).values[0];m=sc(f,g,i,d,c,u,l,p,y,h);break}case"int32":{let g=n.bufferSync(a),y=n.data.get(o.dataId).values[0];m=sc(f,g,i,d,c,u,l,p,y,h);break}case"string":{let g=n.bufferSync(a),y=v.decodeString(n.data.get(o.dataId).values[0]);m=sc(f,g,i,d,c,u,l,p,y,h);break}default:throw new Error(`Unsupported type ${a.dtype}`)}return n.makeTensorInfo(i,m.dtype,m.values)}var lee={kernelName:rh,backendName:"cpu",kernelFunc:iee};function uee(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{numOrSizeSplits:a,axis:o}=s,i=v.parseAxisParam(o,r.shape)[0],l=T.prepareSplitSize(r,a,i),u=new Array(r.shape.length).fill(0),c=r.shape.slice();return l.map(p=>{let d=[...c];d[i]=p;let h=fl({inputs:{x:r},backend:n,attrs:{begin:u,size:d}});return u[i]+=p,h})}var cee={kernelName:eu,backendName:"cpu",kernelFunc:uee},dee={kernelName:Zc,backendName:"cpu",kernelFunc:({inputs:e,backend:t})=>{let{x:n}=e,s=t;Ne(n,"square");let r=s.data.get(n.dataId).values,a=new Float32Array(r.length);for(let i=0;i{let n=t;return isNaN(e)?NaN:e>0?1:n.alpha}),hee={kernelName:pi,backendName:"cpu",kernelFunc:pee};function fee(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{begin:a,end:o,strides:i,beginMask:l,endMask:u,ellipsisMask:c,newAxisMask:p,shrinkAxisMask:d}=s;Ne(r,"stridedSlice");let{finalShapeSparse:h,finalShape:f,isIdentity:m,sliceDim0:g,isSimpleSlice:y,begin:x,end:A,strides:b}=jt.sliceInfo(r.shape,a,o,i,l,u,c,p,d),w;if(m)w=Rt({inputs:{x:r},backend:n,attrs:{shape:f}});else if(g||y){v.assert(r.shape.length>=1,()=>`Input must have rank at least 1, got: ${r.shape.length}`);let k=jt.computeOutShape(x,A,b),C=fl({inputs:{x:r},backend:n,attrs:{begin:x,size:k}});w=Rt({inputs:{x:C},backend:n,attrs:{shape:f}}),n.disposeIntermediateTensorInfo(C)}else{let k=n.bufferSync(r),C=fI(h,k,b,x);w=n.makeTensorInfo(f,C.dtype,C.values)}return w}var mee={kernelName:tu,backendName:"cpu",kernelFunc:fee};function gee(e){let{inputs:t,backend:n,attrs:s}=e,{separator:r,nGramWidths:a,leftPad:o,rightPad:i,padWidth:l,preserveShortSequences:u}=s,{data:c,dataSplits:p}=t,d=n.data.get(c.dataId).values,h=n.data.get(p.dataId).values,[f,m]=Jx(d,h,r,a,o,i,l,u);return[n.makeTensorInfo([f.length],"string",f),n.makeTensorInfo(p.shape,"int32",m)]}var yee={kernelName:Yc,backendName:"cpu",kernelFunc:gee};function Aee(e){let{inputs:t,backend:n,attrs:s}=e,{skipEmpty:r}=s,{input:a,delimiter:o}=t;if(a.dtype!=="string")throw new Error("Input must be of datatype string");if(a.shape.length!==1)throw new Error(`Input must be a vector, got shape: ${a.shape}`);if(o.shape.length!==0)throw new Error(`Delimiter must be a scalar, got shape: ${o.shape}`);let i=n.data.get(a.dataId).values,l=n.data.get(o.dataId).values[0],[u,c,p]=Qx(i,l,r),d=c.length;return[n.makeTensorInfo([d,2],"int32",u),n.makeTensorInfo([d],"string",c),n.makeTensorInfo([2],"int32",new Int32Array(p))]}var xee={kernelName:ah,backendName:"cpu",kernelFunc:Aee};function bee(e){let{inputs:t,backend:n,attrs:s}=e,{numBuckets:r}=s,{input:a}=t;if(a.dtype!=="string")throw new Error("Input must be of datatype string");if(r<=0)throw new Error("Number of buckets must be at least 1");let o=n.data.get(a.dataId).values,i=eb(o,r);return n.makeTensorInfo(a.shape,"int32",i)}var vee={kernelName:oh,backendName:"cpu",kernelFunc:bee},wee=vt(nu,e=>Math.tan(e)),kee={kernelName:nu,backendName:"cpu",kernelFunc:wee},See=vt(di,e=>Math.tanh(e)),Iee={kernelName:di,backendName:"cpu",kernelFunc:See};function Cee(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{reps:a}=s;Ne(r,"tile");let o=gI(n.bufferSync(r),a);return n.makeTensorInfo(o.shape,o.dtype,o.values)}var Tee={kernelName:Pa,backendName:"cpu",kernelFunc:Cee};function Nee(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{k:a,sorted:o}=s;Ne(r,"topk");let i=n.data.get(r.dataId).values,[l,u]=AI(i,r.shape,r.dtype,a,o);return[n.makeTensorInfo(l.shape,l.dtype,l.values),n.makeTensorInfo(u.shape,u.dtype,u.values)]}var Eee={kernelName:su,backendName:"cpu",kernelFunc:Nee};function Ree(e){let{inputs:t,attrs:n,backend:s}=e,{image:r,transforms:a}=t,{interpolation:o,fillMode:i,fillValue:l,outputShape:u}=n,[c,p,d,h]=r.shape,[f,m]=u!=null?u:[p,d],g=[c,f,m,h],y=v.computeStrides(r.shape),x=y[0],A=y[1],b=y[2],w=v.computeStrides(g),k=w[0],C=w[1],E=w[2],_=v.getTypedArrayFromDType(r.dtype,v.sizeFromShape(g));_.fill(l);let $=s.data.get(r.dataId).values,R=s.data.get(a.dataId).values;for(let S=0;St-1)if(t<=1)n=0;else{let s=2*t;n-=s*Math.trunc(n/s),n>=t&&(n=s-n-1)}return v.clamp(0,n,t-1)}function $ee(e,t){let n=e;if(n<0)if(t<=1)n=0;else{let s=t-1;n+=t*(Math.trunc(-n/s)+1)}else if(n>t-1)if(t<=1)n=0;else{let s=t-1;n-=t*Math.trunc(n/s)}return v.clamp(0,n,t-1)}function Pee(e,t){return e}function Fee(e,t){return v.clamp(0,e,t-1)}function hp(e,t,n,s,r,a,o,i,l,u,c){let p=o*s+i*r+l*a+u;return 0<=i&&in.disposeIntermediateTensorInfo(f)),h}var Uee={kernelName:ih,backendName:"cpu",kernelFunc:Vee},Gee=[VK,FX,GK,jK,WX,XK,ZK,JK,eZ,nZ,rZ,oZ,lZ,dZ,hZ,gZ,AZ,bZ,wZ,BK,SZ,CZ,NZ,RZ,LX,UX,DZ,OX,PZ,OZ,MZ,LZ,WZ,UZ,HZ,qZ,KZ,YZ,QZ,tY,sY,aY,iY,lY,cY,pY,fY,mY,gY,yY,bY,$K,wY,GX,RY,HX,_Y,qX,MY,zY,BY,KX,UY,HY,qY,KY,YY,YX,QX,MX,QY,FZ,tJ,sJ,aJ,PK,tK,sK,iJ,aK,uJ,pJ,fJ,yJ,xJ,vJ,wJ,iK,SJ,CJ,NJ,RJ,DJ,PJ,OJ,uK,zJ,WJ,HJ,dK,hK,XJ,YJ,eQ,mK,nQ,rQ,aQ,FI,uQ,OK,AK,dQ,hQ,zX,Ay,mQ,MK,zK,LK,yQ,xQ,vQ,kQ,IQ,CQ,NQ,bK,RQ,FQ,MQ,WQ,wK,UQ,HQ,qQ,kK,UJ,ZQ,JQ,eee,nee,ree,oee,lee,cee,CK,dee,NK,hee,mee,yee,xee,vee,DK,AY,kee,Iee,Tee,Eee,_ee,gK,Lee,Wee,Uee,sQ];for(let e of Gee)rr(e);var OI={};qe(OI,{assertNotComplex:()=>hd,bindCanvasToFramebuffer:()=>tte,bindColorTextureToFramebuffer:()=>mm,bindTextureToProgramUniformSampler:()=>YI,bindTextureUnit:()=>XI,bindVertexBufferToProgramAttribute:()=>by,callAndCheck:()=>Ie,canBeRepresented:()=>MI,createFragmentShader:()=>BI,createFramebuffer:()=>qI,createProgram:()=>WI,createStaticIndexBuffer:()=>GI,createStaticVertexBuffer:()=>UI,createTexture:()=>HI,createVertexShader:()=>LI,getBatchDim:()=>ml,getExtensionOrThrow:()=>fp,getFramebufferErrorMessage:()=>JI,getMaxTexturesInShader:()=>n9,getNumChannels:()=>Qee,getProgramUniformLocation:()=>ZI,getProgramUniformLocationOrThrow:()=>KI,getRowsCols:()=>gl,getShapeAs3D:()=>gm,getTextureShapeFromLogicalShape:()=>e9,getWebGLDisjointQueryTimerVersion:()=>s9,getWebGLErrorMessage:()=>zI,getWebGLMaxTextureSize:()=>t9,hasExtension:()=>er,isCapableOfRenderingToFloatTexture:()=>r9,isDownloadFloatTextureEnabled:()=>a9,isReshapeFree:()=>Mp,isWebGLFenceEnabled:()=>o9,isWebGLVersionEnabled:()=>wy,linkProgram:()=>VI,logShaderSourceAndInfoLog:()=>ob,resetMaxTextureSize:()=>nte,resetMaxTexturesInShader:()=>ste,unbindColorTextureFromFramebuffer:()=>vy,unbindTextureUnit:()=>ete,validateFramebuffer:()=>mp,validateProgram:()=>fm,validateTextureSize:()=>jI});var Yi={},am={alpha:!1,antialias:!1,premultipliedAlpha:!1,preserveDrawingBuffer:!1,depth:!1,stencil:!1,failIfMajorPerformanceCaveat:!0};function D2(e,t){Yi[e]=t}function Ur(e,t){if(!(e in Yi)||t!=null){let s=jee(e,t);if(s!==null)Yi[e]=s;else return console.log("Could not get context for WebGL version",e),null}let n=Yi[e];return n==null||n.isContextLost()?(delete Yi[e],Ur(e)):(n.disable(n.DEPTH_TEST),n.disable(n.STENCIL_TEST),n.disable(n.BLEND),n.disable(n.DITHER),n.disable(n.POLYGON_OFFSET_FILL),n.disable(n.SAMPLE_COVERAGE),n.enable(n.SCISSOR_TEST),n.enable(n.CULL_FACE),n.cullFace(n.BACK),Yi[e])}function Hee(e){if(typeof OffscreenCanvas!="undefined"&&e===2)return new OffscreenCanvas(300,150);if(typeof document!="undefined")return document.createElement("canvas");throw new Error("Cannot create a canvas in this context")}function jee(e,t){if(e!==1&&e!==2)throw new Error("Cannot get WebGL rendering context, WebGL is disabled.");let n=t==null?Hee(e):t;return n.addEventListener("webglcontextlost",s=>{s.preventDefault(),delete Yi[e]},!1),H().getBool("SOFTWARE_WEBGL_ENABLED")&&(am.failIfMajorPerformanceCaveat=!1),e===1?n.getContext("webgl",am)||n.getContext("experimental-webgl",am):n.getContext("webgl2",am)}var Op;(function(e){e[e.DENSE=0]="DENSE",e[e.SHARED_BATCH=1]="SHARED_BATCH"})(Op||(Op={}));var Qs;(function(e){e[e.RENDER=0]="RENDER",e[e.UPLOAD=1]="UPLOAD",e[e.PIXELS=2]="PIXELS",e[e.DOWNLOAD=3]="DOWNLOAD"})(Qs||(Qs={}));var Fn;(function(e){e[e.UNPACKED_FLOAT16=0]="UNPACKED_FLOAT16",e[e.UNPACKED_FLOAT32=1]="UNPACKED_FLOAT32",e[e.PACKED_4X1_UNSIGNED_BYTE=2]="PACKED_4X1_UNSIGNED_BYTE",e[e.PACKED_2X2_FLOAT32=3]="PACKED_2X2_FLOAT32",e[e.PACKED_2X2_FLOAT16=4]="PACKED_2X2_FLOAT16"})(Fn||(Fn={}));function Gh(e,t){return[t,e]}function qee(e,t){return e*t}function om(e){let t=v.sizeFromShape(e),n=Math.ceil(t/4);return v.sizeToSquarishShape(n)}function pd(e,t){return[Math.max(1,Math.ceil(t/2)),Math.max(1,Math.ceil(e/2))]}function Xee(e,t){let[n,s]=pd(e,t);return n*s*4}function ab(e,t){let n=e,s,r,a,o,i,l,u,c,p,d;return H().getNumber("WEBGL_VERSION")===2?(s=n.R32F,r=n.R16F,a=n.RGBA16F,o=n.RGBA32F,i=n.RED,u=4,c=1,p=n.HALF_FLOAT,d=n.FLOAT,l=n.RGBA8):(s=e.RGBA,r=e.RGBA,a=e.RGBA,o=n.RGBA,i=e.RGBA,u=4,c=4,p=t!=null?t.HALF_FLOAT_OES:null,d=e.FLOAT,l=e.RGBA),{internalFormatFloat:s,internalFormatHalfFloat:r,internalFormatPackedHalfFloat:a,internalFormatPackedFloat:o,textureFormatFloat:i,downloadTextureFormat:l,downloadUnpackNumChannels:u,defaultNumChannels:c,textureTypeHalfFloat:p,textureTypeFloat:d}}function Ie(e,t){let n=t();return H().getBool("DEBUG")&&Kee(e),n}function Kee(e){let t=e.getError();if(t!==e.NO_ERROR)throw new Error("WebGL Error: "+zI(e,t))}var Zee=596e-10,Yee=65504;function MI(e){return!!(H().getBool("WEBGL_RENDER_FLOAT32_ENABLED")||e===0||Zeee.getExtension(t),'Extension "'+t+'" not supported on this browser.')}function LI(e,t){let n=Ma(e,()=>e.createShader(e.VERTEX_SHADER),"Unable to create vertex WebGLShader.");if(Ie(e,()=>e.shaderSource(n,t)),Ie(e,()=>e.compileShader(n)),e.getShaderParameter(n,e.COMPILE_STATUS)===!1)throw console.log(e.getShaderInfoLog(n)),new Error("Failed to compile vertex shader.");return n}function BI(e,t){let n=Ma(e,()=>e.createShader(e.FRAGMENT_SHADER),"Unable to create fragment WebGLShader.");if(Ie(e,()=>e.shaderSource(n,t)),Ie(e,()=>e.compileShader(n)),H().get("ENGINE_COMPILE_ONLY"))return n;if(e.getShaderParameter(n,e.COMPILE_STATUS)===!1)throw ob(t,e.getShaderInfoLog(n)),new Error("Failed to compile fragment shader.");return n}var Jee=/ERROR: [0-9]+:([0-9]+):/g;function ob(e,t){let n=Jee.exec(t);if(n==null){console.log(`Couldn't parse line number in error: ${t}`),console.log(e);return}let s=+n[1],r=e.split(` + ${a.shape}`);if(r.shape[0]!==a.shape[0])throw new Error("segmentIds and indices should have same size.");let o=n.data.get(s.dataId).values,i=n.data.get(r.dataId).values,l=n.data.get(a.dataId).values,[u,c]=_x(o,s.shape,s.dtype,i,l);return n.makeTensorInfo(c,s.dtype,u)}var BQ={kernelName:Bp,backendName:"cpu",kernelFunc:LQ};function WQ(e){let{inputs:t,backend:n,attrs:s}=e,{sparseIndices:r,sparseValues:a,defaultValue:o}=t,{outputShape:i}=s,{sliceRank:l,numUpdates:u,sliceSize:c,strides:p,outputSize:d}=T.calculateShapes(a,r,i),h=!1,f=n.bufferSync(r),m;switch(a.dtype){case"bool":{let g=n.bufferSync(a),y=Boolean(n.data.get(o.dataId).values[0]);m=Hu(f,g,i,d,c,u,l,p,y,h);break}case"float32":{let g=n.bufferSync(a),y=n.data.get(o.dataId).values[0];m=Hu(f,g,i,d,c,u,l,p,y,h);break}case"int32":{let g=n.bufferSync(a),y=n.data.get(o.dataId).values[0];m=Hu(f,g,i,d,c,u,l,p,y,h);break}case"string":{let g=n.bufferSync(a),y=v.decodeString(n.data.get(o.dataId).values[0]);m=Hu(f,g,i,d,c,u,l,p,y,h);break}default:throw new Error(`Unsupported type ${a.dtype}`)}return n.makeTensorInfo(i,m.dtype,m.values)}var VQ={kernelName:Wp,backendName:"cpu",kernelFunc:WQ};function UQ(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{numOrSizeSplits:a,axis:o}=s,i=v.parseAxisParam(o,r.shape)[0],l=T.prepareSplitSize(r,a,i),u=new Array(r.shape.length).fill(0),c=r.shape.slice();return l.map(p=>{let d=[...c];d[i]=p;let h=ol({inputs:{x:r},backend:n,attrs:{begin:u,size:d}});return u[i]+=p,h})}var GQ={kernelName:jl,backendName:"cpu",kernelFunc:UQ},HQ={kernelName:zc,backendName:"cpu",kernelFunc:({inputs:e,backend:t})=>{let{x:n}=e,s=t;Te(n,"square");let r=s.data.get(n.dataId).values,a=new Float32Array(r.length);for(let i=0;i{let n=t;return isNaN(e)?NaN:e>0?1:n.alpha}),qQ={kernelName:ui,backendName:"cpu",kernelFunc:jQ};function XQ(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{begin:a,end:o,strides:i,beginMask:l,endMask:u,ellipsisMask:c,newAxisMask:p,shrinkAxisMask:d}=s;Te(r,"stridedSlice");let{finalShapeSparse:h,finalShape:f,isIdentity:m,sliceDim0:g,isSimpleSlice:y,begin:x,end:A,strides:b}=Gt.sliceInfo(r.shape,a,o,i,l,u,c,p,d),w;if(m)w=Ct({inputs:{x:r},backend:n,attrs:{shape:f}});else if(g||y){v.assert(r.shape.length>=1,()=>`Input must have rank at least 1, got: ${r.shape.length}`);let k=Gt.computeOutShape(x,A,b),C=ol({inputs:{x:r},backend:n,attrs:{begin:x,size:k}});w=Ct({inputs:{x:C},backend:n,attrs:{shape:f}}),n.disposeIntermediateTensorInfo(C)}else{let k=n.bufferSync(r),C=QS(h,k,b,x);w=n.makeTensorInfo(f,C.dtype,C.values)}return w}var KQ={kernelName:ql,backendName:"cpu",kernelFunc:XQ};function ZQ(e){let{inputs:t,backend:n,attrs:s}=e,{separator:r,nGramWidths:a,leftPad:o,rightPad:i,padWidth:l,preserveShortSequences:u}=s,{data:c,dataSplits:p}=t,d=n.data.get(c.dataId).values,h=n.data.get(p.dataId).values,[f,m]=Dx(d,h,r,a,o,i,l,u);return[n.makeTensorInfo([f.length],"string",f),n.makeTensorInfo(p.shape,"int32",m)]}var YQ={kernelName:Lc,backendName:"cpu",kernelFunc:ZQ};function JQ(e){let{inputs:t,backend:n,attrs:s}=e,{skipEmpty:r}=s,{input:a,delimiter:o}=t;if(a.dtype!=="string")throw new Error("Input must be of datatype string");if(a.shape.length!==1)throw new Error(`Input must be a vector, got shape: ${a.shape}`);if(o.shape.length!==0)throw new Error(`Delimiter must be a scalar, got shape: ${o.shape}`);let i=n.data.get(a.dataId).values,l=n.data.get(o.dataId).values[0],[u,c,p]=$x(i,l,r),d=c.length;return[n.makeTensorInfo([d,2],"int32",u),n.makeTensorInfo([d],"string",c),n.makeTensorInfo([2],"int32",new Int32Array(p))]}var QQ={kernelName:Vp,backendName:"cpu",kernelFunc:JQ};function eee(e){let{inputs:t,backend:n,attrs:s}=e,{numBuckets:r}=s,{input:a}=t;if(a.dtype!=="string")throw new Error("Input must be of datatype string");if(r<=0)throw new Error("Number of buckets must be at least 1");let o=n.data.get(a.dataId).values,i=Px(o,r);return n.makeTensorInfo(a.shape,"int32",i)}var tee={kernelName:Up,backendName:"cpu",kernelFunc:eee},nee=xt(Xl,e=>Math.tan(e)),see={kernelName:Xl,backendName:"cpu",kernelFunc:nee},ree=xt(li,e=>Math.tanh(e)),aee={kernelName:li,backendName:"cpu",kernelFunc:ree};function oee(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{reps:a}=s;Te(r,"tile");let o=tI(n.bufferSync(r),a);return n.makeTensorInfo(o.shape,o.dtype,o.values)}var iee={kernelName:Ea,backendName:"cpu",kernelFunc:oee};function lee(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{k:a,sorted:o}=s;Te(r,"topk");let i=n.data.get(r.dataId).values,[l,u]=sI(i,r.shape,r.dtype,a,o);return[n.makeTensorInfo(l.shape,l.dtype,l.values),n.makeTensorInfo(u.shape,u.dtype,u.values)]}var uee={kernelName:Kl,backendName:"cpu",kernelFunc:lee};function cee(e){let{inputs:t,attrs:n,backend:s}=e,{image:r,transforms:a}=t,{interpolation:o,fillMode:i,fillValue:l,outputShape:u}=n,[c,p,d,h]=r.shape,[f,m]=u!=null?u:[p,d],g=[c,f,m,h],y=v.computeStrides(r.shape),x=y[0],A=y[1],b=y[2],w=v.computeStrides(g),k=w[0],C=w[1],N=w[2],R=v.getTypedArrayFromDType(r.dtype,v.sizeFromShape(g));R.fill(l);let D=s.data.get(r.dataId).values,E=s.data.get(a.dataId).values;for(let S=0;St-1)if(t<=1)n=0;else{let s=2*t;n-=s*Math.trunc(n/s),n>=t&&(n=s-n-1)}return v.clamp(0,n,t-1)}function hee(e,t){let n=e;if(n<0)if(t<=1)n=0;else{let s=t-1;n+=t*(Math.trunc(-n/s)+1)}else if(n>t-1)if(t<=1)n=0;else{let s=t-1;n-=t*Math.trunc(n/s)}return v.clamp(0,n,t-1)}function fee(e,t){return e}function mee(e,t){return v.clamp(0,e,t-1)}function Zd(e,t,n,s,r,a,o,i,l,u,c){let p=o*s+i*r+l*a+u;return 0<=i&&in.disposeIntermediateTensorInfo(f)),h}var kee={kernelName:Gp,backendName:"cpu",kernelFunc:wee},See=[bK,iX,wK,SK,hX,CK,NK,RK,DK,PK,OK,zK,BK,UK,HK,XK,ZK,JK,eZ,AK,nZ,rZ,oZ,lZ,dX,mX,cZ,lX,pZ,fZ,mZ,yZ,xZ,vZ,kZ,IZ,TZ,EZ,_Z,$Z,FZ,MZ,LZ,BZ,VZ,GZ,jZ,qZ,XZ,KZ,JZ,dK,eY,gX,lY,yX,uY,xX,mY,gY,AY,vX,vY,kY,IY,TY,EY,kX,IX,uX,_Y,hZ,$Y,FY,MY,pK,TX,EX,LY,_X,WY,GY,jY,KY,YY,QY,eJ,$X,nJ,rJ,oJ,lJ,cJ,pJ,fJ,FX,gJ,xJ,kJ,MX,LX,CJ,EJ,DJ,WX,PJ,OJ,MJ,bI,WJ,fK,GX,UJ,HJ,qJ,cX,Y3,KJ,mK,gK,yK,YJ,QJ,tQ,sQ,aQ,oQ,lQ,JX,cQ,mQ,yQ,vQ,eK,kQ,IQ,TQ,tK,vJ,RQ,DQ,PQ,OQ,zQ,BQ,VQ,GQ,rK,HQ,oK,qQ,KQ,YQ,QQ,tee,cK,ZZ,see,aee,iee,uee,dee,VX,xee,vee,kee,FJ];for(let e of See)er(e);var vI={};We(vI,{assertNotComplex:()=>td,bindCanvasToFramebuffer:()=>Fee,bindColorTextureToFramebuffer:()=>jf,bindTextureToProgramUniformSampler:()=>OI,bindTextureUnit:()=>$I,bindVertexBufferToProgramAttribute:()=>Q3,callAndCheck:()=>we,canBeRepresented:()=>wI,createFragmentShader:()=>II,createFramebuffer:()=>DI,createProgram:()=>CI,createStaticIndexBuffer:()=>EI,createStaticVertexBuffer:()=>NI,createTexture:()=>RI,createVertexShader:()=>SI,getBatchDim:()=>il,getExtensionOrThrow:()=>Yd,getFramebufferErrorMessage:()=>MI,getMaxTexturesInShader:()=>WI,getNumChannels:()=>$ee,getProgramUniformLocation:()=>FI,getProgramUniformLocationOrThrow:()=>PI,getRowsCols:()=>ll,getShapeAs3D:()=>qf,getTextureShapeFromLogicalShape:()=>LI,getWebGLDisjointQueryTimerVersion:()=>VI,getWebGLErrorMessage:()=>kI,getWebGLMaxTextureSize:()=>BI,hasExtension:()=>Ys,isCapableOfRenderingToFloatTexture:()=>UI,isDownloadFloatTextureEnabled:()=>GI,isReshapeFree:()=>bp,isWebGLFenceEnabled:()=>HI,isWebGLVersionEnabled:()=>ty,linkProgram:()=>TI,logShaderSourceAndInfoLog:()=>Bx,resetMaxTextureSize:()=>Oee,resetMaxTexturesInShader:()=>Mee,unbindColorTextureFromFramebuffer:()=>ey,unbindTextureUnit:()=>Pee,validateFramebuffer:()=>Jd,validateProgram:()=>Hf,validateTextureSize:()=>_I});var Ui={},Of={alpha:!1,antialias:!1,premultipliedAlpha:!1,preserveDrawingBuffer:!1,depth:!1,stencil:!1,failIfMajorPerformanceCaveat:!0};function l2(e,t){Ui[e]=t}function Mr(e,t){if(!(e in Ui)||t!=null){let s=Cee(e,t);if(s!==null)Ui[e]=s;else return console.log("Could not get context for WebGL version",e),null}let n=Ui[e];return n==null||n.isContextLost()?(delete Ui[e],Mr(e)):(n.disable(n.DEPTH_TEST),n.disable(n.STENCIL_TEST),n.disable(n.BLEND),n.disable(n.DITHER),n.disable(n.POLYGON_OFFSET_FILL),n.disable(n.SAMPLE_COVERAGE),n.enable(n.SCISSOR_TEST),n.enable(n.CULL_FACE),n.cullFace(n.BACK),Ui[e])}function Iee(e){if(typeof OffscreenCanvas!="undefined"&&e===2)return new OffscreenCanvas(300,150);if(typeof document!="undefined")return document.createElement("canvas");throw new Error("Cannot create a canvas in this context")}function Cee(e,t){if(e!==1&&e!==2)throw new Error("Cannot get WebGL rendering context, WebGL is disabled.");let n=t==null?Iee(e):t;return n.addEventListener("webglcontextlost",s=>{s.preventDefault(),delete Ui[e]},!1),U().getBool("SOFTWARE_WEBGL_ENABLED")&&(Of.failIfMajorPerformanceCaveat=!1),e===1?n.getContext("webgl",Of)||n.getContext("experimental-webgl",Of):n.getContext("webgl2",Of)}var xp;(function(e){e[e.DENSE=0]="DENSE",e[e.SHARED_BATCH=1]="SHARED_BATCH"})(xp||(xp={}));var Zs;(function(e){e[e.RENDER=0]="RENDER",e[e.UPLOAD=1]="UPLOAD",e[e.PIXELS=2]="PIXELS",e[e.DOWNLOAD=3]="DOWNLOAD"})(Zs||(Zs={}));var Fn;(function(e){e[e.UNPACKED_FLOAT16=0]="UNPACKED_FLOAT16",e[e.UNPACKED_FLOAT32=1]="UNPACKED_FLOAT32",e[e.PACKED_4X1_UNSIGNED_BYTE=2]="PACKED_4X1_UNSIGNED_BYTE",e[e.PACKED_2X2_FLOAT32=3]="PACKED_2X2_FLOAT32",e[e.PACKED_2X2_FLOAT16=4]="PACKED_2X2_FLOAT16"})(Fn||(Fn={}));function Nh(e,t){return[t,e]}function Tee(e,t){return e*t}function Mf(e){let t=v.sizeFromShape(e),n=Math.ceil(t/4);return v.sizeToSquarishShape(n)}function ed(e,t){return[Math.max(1,Math.ceil(t/2)),Math.max(1,Math.ceil(e/2))]}function Nee(e,t){let[n,s]=ed(e,t);return n*s*4}function Lx(e,t){let n=e,s,r,a,o,i,l,u,c,p,d;return U().getNumber("WEBGL_VERSION")===2?(s=n.R32F,r=n.R16F,a=n.RGBA16F,o=n.RGBA32F,i=n.RED,u=4,c=1,p=n.HALF_FLOAT,d=n.FLOAT,l=n.RGBA8):(s=e.RGBA,r=e.RGBA,a=e.RGBA,o=n.RGBA,i=e.RGBA,u=4,c=4,p=t!=null?t.HALF_FLOAT_OES:null,d=e.FLOAT,l=e.RGBA),{internalFormatFloat:s,internalFormatHalfFloat:r,internalFormatPackedHalfFloat:a,internalFormatPackedFloat:o,textureFormatFloat:i,downloadTextureFormat:l,downloadUnpackNumChannels:u,defaultNumChannels:c,textureTypeHalfFloat:p,textureTypeFloat:d}}function we(e,t){let n=t();return U().getBool("DEBUG")&&Eee(e),n}function Eee(e){let t=e.getError();if(t!==e.NO_ERROR)throw new Error("WebGL Error: "+kI(e,t))}var Ree=596e-10,_ee=65504;function wI(e){return!!(U().getBool("WEBGL_RENDER_FLOAT32_ENABLED")||e===0||Reee.getExtension(t),'Extension "'+t+'" not supported on this browser.')}function SI(e,t){let n=Da(e,()=>e.createShader(e.VERTEX_SHADER),"Unable to create vertex WebGLShader.");if(we(e,()=>e.shaderSource(n,t)),we(e,()=>e.compileShader(n)),e.getShaderParameter(n,e.COMPILE_STATUS)===!1)throw console.log(e.getShaderInfoLog(n)),new Error("Failed to compile vertex shader.");return n}function II(e,t){let n=Da(e,()=>e.createShader(e.FRAGMENT_SHADER),"Unable to create fragment WebGLShader.");if(we(e,()=>e.shaderSource(n,t)),we(e,()=>e.compileShader(n)),U().get("ENGINE_COMPILE_ONLY"))return n;if(e.getShaderParameter(n,e.COMPILE_STATUS)===!1)throw Bx(t,e.getShaderInfoLog(n)),new Error("Failed to compile fragment shader.");return n}var Dee=/ERROR: [0-9]+:([0-9]+):/g;function Bx(e,t){let n=Dee.exec(t);if(n==null){console.log(`Couldn't parse line number in error: ${t}`),console.log(e);return}let s=+n[1],r=e.split(` `),a=r.length.toString().length+2,o=r.map((p,d)=>v.rightPad((d+1).toString(),a)+p),i=0;for(let p=0;pe.createProgram(),"Unable to create WebGLProgram.")}function VI(e,t){if(Ie(e,()=>e.linkProgram(t)),!H().get("ENGINE_COMPILE_ONLY")&&e.getProgramParameter(t,e.LINK_STATUS)===!1)throw console.log(e.getProgramInfoLog(t)),new Error("Failed to link vertex and fragment shaders.")}function fm(e,t){if(Ie(e,()=>e.validateProgram(t)),e.getProgramParameter(t,e.VALIDATE_STATUS)===!1)throw console.log(e.getProgramInfoLog(t)),new Error("Shader program validation failed.")}function UI(e,t){let n=Ma(e,()=>e.createBuffer(),"Unable to create WebGLBuffer");return Ie(e,()=>e.bindBuffer(e.ARRAY_BUFFER,n)),Ie(e,()=>e.bufferData(e.ARRAY_BUFFER,t,e.STATIC_DRAW)),n}function GI(e,t){let n=Ma(e,()=>e.createBuffer(),"Unable to create WebGLBuffer");return Ie(e,()=>e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,n)),Ie(e,()=>e.bufferData(e.ELEMENT_ARRAY_BUFFER,t,e.STATIC_DRAW)),n}function Qee(){return H().getNumber("WEBGL_VERSION")===2?1:4}function HI(e){return Ma(e,()=>e.createTexture(),"Unable to create WebGLTexture.")}function jI(e,t){let n=H().getNumber("WEBGL_MAX_TEXTURE_SIZE");if(e<=0||t<=0){let s=`[${e}x${t}]`;throw new Error("Requested texture size "+s+" is invalid.")}if(e>n||t>n){let s=`[${e}x${t}]`,r=`[${n}x${n}]`;throw new Error("Requested texture size "+s+" greater than WebGL maximum on this browser / GPU "+r+".")}}function qI(e){return Ma(e,()=>e.createFramebuffer(),"Unable to create WebGLFramebuffer.")}function by(e,t,n,s,r,a,o){let i=e.getAttribLocation(t,n);return i===-1?!1:(Ie(e,()=>e.bindBuffer(e.ARRAY_BUFFER,s)),Ie(e,()=>e.vertexAttribPointer(i,r,e.FLOAT,!1,a,o)),Ie(e,()=>e.enableVertexAttribArray(i)),!0)}function XI(e,t,n){QI(e,n),Ie(e,()=>e.activeTexture(e.TEXTURE0+n)),Ie(e,()=>e.bindTexture(e.TEXTURE_2D,t))}function ete(e,t){QI(e,t),Ie(e,()=>e.activeTexture(e.TEXTURE0+t)),Ie(e,()=>e.bindTexture(e.TEXTURE_2D,null))}function KI(e,t,n){return Ma(e,()=>e.getUniformLocation(t,n),'uniform "'+n+'" not present in program.')}function ZI(e,t,n){return e.getUniformLocation(t,n)}function YI(e,t,n,s){Ie(e,()=>XI(e,t,s)),Ie(e,()=>e.uniform1i(n,s))}function tte(e){Ie(e,()=>e.bindFramebuffer(e.FRAMEBUFFER,null)),Ie(e,()=>e.viewport(0,0,e.canvas.width,e.canvas.height)),Ie(e,()=>e.scissor(0,0,e.canvas.width,e.canvas.height))}function mm(e,t,n){Ie(e,()=>e.bindFramebuffer(e.FRAMEBUFFER,n)),Ie(e,()=>e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0))}function vy(e,t){Ie(e,()=>e.bindFramebuffer(e.FRAMEBUFFER,t)),Ie(e,()=>e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,null,0))}function mp(e){let t=e.checkFramebufferStatus(e.FRAMEBUFFER);if(t!==e.FRAMEBUFFER_COMPLETE)throw new Error("Error binding framebuffer: "+JI(e,t))}function JI(e,t){switch(t){case e.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:return"FRAMEBUFFER_INCOMPLETE_ATTACHMENT";case e.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:return"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT";case e.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:return"FRAMEBUFFER_INCOMPLETE_DIMENSIONS";case e.FRAMEBUFFER_UNSUPPORTED:return"FRAMEBUFFER_UNSUPPORTED";default:return`unknown error ${t}`}}function Ma(e,t,n){let s=Ie(e,()=>t());if(s==null)throw new Error(n);return s}function QI(e,t){let n=e.MAX_COMBINED_TEXTURE_IMAGE_UNITS-1,s=t+e.TEXTURE0;if(sn){let r=`[gl.TEXTURE0, gl.TEXTURE${n}]`;throw new Error(`textureUnit must be in ${r}.`)}}function ml(e,t=2){return v.sizeFromShape(e.slice(0,e.length-t))}function gl(e){if(e.length===0)throw Error("Cannot get rows and columns of an empty shape array.");return[e.length>1?e[e.length-2]:1,e[e.length-1]]}function gm(e){let t=[1,1,1];return e.length===0||e.length===1&&e[0]===1||(t=[ml(e),...gl(e)]),t}function e9(e,t=!1){let n=H().getNumber("WEBGL_MAX_TEXTURE_SIZE");t&&(n=n*2,e=e.map((r,a)=>a>=e.length-2?v.nearestLargerEven(e[a]):e[a]),e.length===1&&(e=[2,e[0]])),e.length!==2&&(e=v.squeezeShape(e).newShape);let s=v.sizeFromShape(e);if(e.length<=1&&s<=n)return[1,s];if(e.length===2&&e[0]<=n&&e[1]<=n)return e;if(e.length===3&&e[0]*e[1]<=n&&e[2]<=n)return[e[0]*e[1],e[2]];if(e.length===3&&e[0]<=n&&e[1]*e[2]<=n)return[e[0],e[1]*e[2]];if(e.length===4&&e[0]*e[1]*e[2]<=n&&e[3]<=n)return[e[0]*e[1]*e[2],e[3]];if(e.length===4&&e[0]<=n&&e[1]*e[2]*e[3]<=n)return[e[0],e[1]*e[2]*e[3]];if(t){let r=ml(e),a=2,o=2;return e.length&&([a,o]=gl(e)),s=r*(a/2)*(o/2),v.sizeToSquarishShape(s).map(i=>i*2)}return v.sizeToSquarishShape(s)}function im(e){return e%2===0}function Mp(e,t){if(e=e.slice(-2),t=t.slice(-2),v.arraysEqual(e,t)||!e.length||!t.length||e[0]===0||e[1]===0||t[0]===0||t[1]===0)return!0;if(e.length!==t.length){let n=e.slice(-1)[0],s=t.slice(-1)[0];if(n===s||im(n)&&im(s)&&(e[0]===1||t[0]===1))return!0}return e[1]===t[1]&&im(e[0])&&im(t[0])}var ym,Am;function t9(e){if(ym==null){let t=Ur(e);ym=t.getParameter(t.MAX_TEXTURE_SIZE)}return ym}function nte(){ym=null}function ste(){Am=null}function n9(e){if(Am==null){let t=Ur(e);Am=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS)}return Math.min(16,Am)}function s9(e){if(e===0)return 0;let t,n=Ur(e);return er(n,"EXT_disjoint_timer_query_webgl2")&&e===2?t=2:er(n,"EXT_disjoint_timer_query")?t=1:t=0,t}function er(e,t){return e.getExtension(t)!=null}function wy(e){try{if(Ur(e)!=null)return!0}catch(t){return console.log("Error when getting WebGL context: ",t),!1}return!1}function r9(e){if(e===0)return!1;let t=Ur(e);if(e===1){if(!er(t,"OES_texture_float"))return!1}else if(!er(t,"EXT_color_buffer_float"))return!1;return ky(t)}function a9(e){if(e===0)return!1;let t=Ur(e);if(e===1){if(!er(t,"OES_texture_float")||!er(t,"WEBGL_color_buffer_float"))return!1}else{if(er(t,"EXT_color_buffer_float"))return ky(t);let s="EXT_color_buffer_half_float";if(er(t,s)){let r=t.getExtension(s);return rte(t,r)}return!1}return ky(t)}function ky(e){let t=ab(e),n=e.createTexture();e.bindTexture(e.TEXTURE_2D,n);let s=1,r=1;e.texImage2D(e.TEXTURE_2D,0,t.internalFormatFloat,s,r,0,t.textureFormatFloat,t.textureTypeFloat,null);let a=e.createFramebuffer();e.bindFramebuffer(e.FRAMEBUFFER,a),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,n,0);let o=e.checkFramebufferStatus(e.FRAMEBUFFER)===e.FRAMEBUFFER_COMPLETE;return e.bindTexture(e.TEXTURE_2D,null),e.bindFramebuffer(e.FRAMEBUFFER,null),e.deleteTexture(n),e.deleteFramebuffer(a),o}function rte(e,t){let n=ab(e,t),s=e.createTexture();e.bindTexture(e.TEXTURE_2D,s);let r=1,a=1;e.texImage2D(e.TEXTURE_2D,0,n.internalFormatHalfFloat,r,a,0,n.textureFormatFloat,n.textureTypeHalfFloat,null);let o=e.createFramebuffer();e.bindFramebuffer(e.FRAMEBUFFER,o),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,s,0);let i=e.checkFramebufferStatus(e.FRAMEBUFFER)===e.FRAMEBUFFER_COMPLETE;return e.bindTexture(e.TEXTURE_2D,null),e.bindFramebuffer(e.FRAMEBUFFER,null),e.deleteTexture(s),e.deleteFramebuffer(o),i}function o9(e){return e!==2?!1:Ur(e).fenceSync!=null}function hd(e,t){Array.isArray(e)||(e=[e]),e.forEach(n=>{n!=null&&v.assert(n.dtype!=="complex64",()=>`${t} does not support complex64 tensors in the WebGL backend.`)})}var Pe=H();Pe.registerFlag("HAS_WEBGL",()=>Pe.getNumber("WEBGL_VERSION")>0);Pe.registerFlag("WEBGL_VERSION",()=>wy(2)?2:wy(1)?1:0);Pe.registerFlag("WEBGL_CHECK_NUMERICAL_PROBLEMS",()=>!1);Pe.registerFlag("WEBGL_BUFFER_SUPPORTED",()=>Pe.get("WEBGL_VERSION")===2);Pe.registerFlag("WEBGL_CPU_FORWARD",()=>!0);Pe.registerFlag("WEBGL_FORCE_F16_TEXTURES",()=>!1);Pe.registerFlag("WEBGL_PACK",()=>Pe.getBool("HAS_WEBGL"));Pe.registerFlag("WEBGL_PACK_NORMALIZATION",()=>Pe.getBool("WEBGL_PACK"));Pe.registerFlag("WEBGL_PACK_CLIP",()=>Pe.getBool("WEBGL_PACK"));Pe.registerFlag("WEBGL_PACK_DEPTHWISECONV",()=>Pe.getBool("WEBGL_PACK"));Pe.registerFlag("WEBGL_PACK_BINARY_OPERATIONS",()=>Pe.getBool("WEBGL_PACK"));Pe.registerFlag("WEBGL_PACK_UNARY_OPERATIONS",()=>Pe.getBool("WEBGL_PACK"));Pe.registerFlag("WEBGL_PACK_ARRAY_OPERATIONS",()=>Pe.getBool("WEBGL_PACK"));Pe.registerFlag("WEBGL_PACK_IMAGE_OPERATIONS",()=>Pe.getBool("WEBGL_PACK"));Pe.registerFlag("WEBGL_PACK_REDUCE",()=>Pe.getBool("WEBGL_PACK"));Pe.registerFlag("WEBGL_LAZILY_UNPACK",()=>Pe.getBool("WEBGL_PACK"));Pe.registerFlag("WEBGL_CONV_IM2COL",()=>Pe.getBool("WEBGL_PACK"));Pe.registerFlag("WEBGL_MAX_TEXTURE_SIZE",()=>t9(Pe.getNumber("WEBGL_VERSION")));Pe.registerFlag("WEBGL_MAX_TEXTURES_IN_SHADER",()=>n9(Pe.getNumber("WEBGL_VERSION")));Pe.registerFlag("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION",()=>{let e=Pe.getNumber("WEBGL_VERSION");return e===0?0:s9(e)});Pe.registerFlag("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE",()=>Pe.getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")>0&&!dh.isMobile());Pe.registerFlag("WEBGL_RENDER_FLOAT32_CAPABLE",()=>r9(Pe.getNumber("WEBGL_VERSION")));Pe.registerFlag("WEBGL_RENDER_FLOAT32_ENABLED",()=>Pe.getBool("WEBGL_FORCE_F16_TEXTURES")?!1:Pe.getBool("WEBGL_RENDER_FLOAT32_CAPABLE"));Pe.registerFlag("WEBGL_DOWNLOAD_FLOAT_ENABLED",()=>a9(Pe.getNumber("WEBGL_VERSION")));Pe.registerFlag("WEBGL_FENCE_API_ENABLED",()=>o9(Pe.getNumber("WEBGL_VERSION")));Pe.registerFlag("WEBGL_SIZE_UPLOAD_UNIFORM",()=>Pe.getBool("WEBGL_RENDER_FLOAT32_ENABLED")?4:0);Pe.registerFlag("WEBGL_DELETE_TEXTURE_THRESHOLD",()=>-1,e=>{if(e<0&&e!==-1)throw new Error(`WEBGL_DELETE_TEXTURE_THRESHOLD must be -1 (indicating never delete) or at least 0, but got ${e}.`)});Pe.registerFlag("WEBGL_FLUSH_THRESHOLD",()=>dh.isMobile()?1:-1,e=>{if(e<0&&e!==-1)throw new Error(`WEBGL_FLUSH_THRESHOLD must be -1 (indicating never manual flush) or at least 0, but got ${e}.`)});Pe.registerFlag("CPU_HANDOFF_SIZE_THRESHOLD",()=>128);Pe.registerFlag("WEBGL_USE_SHAPES_UNIFORMS",()=>!1);Pe.registerFlag("TOPK_LAST_DIM_CPU_HANDOFF_SIZE_THRESHOLD",()=>1e5);Pe.registerFlag("TOPK_K_CPU_HANDOFF_THRESHOLD",()=>128);Pe.registerFlag("WEBGL_EXP_CONV",()=>!1);Pe.registerFlag("SOFTWARE_WEBGL_ENABLED",()=>Pe.getBool("IS_TEST"));function hs(){let e,t,n,s,r,a,o,i,l,u;return H().getNumber("WEBGL_VERSION")===2?(e="#version 300 es",t="in",n="out",s="in",r="texture",a="outputColor",o="out vec4 outputColor;",i=` +`))}function CI(e){return Da(e,()=>e.createProgram(),"Unable to create WebGLProgram.")}function TI(e,t){if(we(e,()=>e.linkProgram(t)),!U().get("ENGINE_COMPILE_ONLY")&&e.getProgramParameter(t,e.LINK_STATUS)===!1)throw console.log(e.getProgramInfoLog(t)),new Error("Failed to link vertex and fragment shaders.")}function Hf(e,t){if(we(e,()=>e.validateProgram(t)),e.getProgramParameter(t,e.VALIDATE_STATUS)===!1)throw console.log(e.getProgramInfoLog(t)),new Error("Shader program validation failed.")}function NI(e,t){let n=Da(e,()=>e.createBuffer(),"Unable to create WebGLBuffer");return we(e,()=>e.bindBuffer(e.ARRAY_BUFFER,n)),we(e,()=>e.bufferData(e.ARRAY_BUFFER,t,e.STATIC_DRAW)),n}function EI(e,t){let n=Da(e,()=>e.createBuffer(),"Unable to create WebGLBuffer");return we(e,()=>e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,n)),we(e,()=>e.bufferData(e.ELEMENT_ARRAY_BUFFER,t,e.STATIC_DRAW)),n}function $ee(){return U().getNumber("WEBGL_VERSION")===2?1:4}function RI(e){return Da(e,()=>e.createTexture(),"Unable to create WebGLTexture.")}function _I(e,t){let n=U().getNumber("WEBGL_MAX_TEXTURE_SIZE");if(e<=0||t<=0){let s=`[${e}x${t}]`;throw new Error("Requested texture size "+s+" is invalid.")}if(e>n||t>n){let s=`[${e}x${t}]`,r=`[${n}x${n}]`;throw new Error("Requested texture size "+s+" greater than WebGL maximum on this browser / GPU "+r+".")}}function DI(e){return Da(e,()=>e.createFramebuffer(),"Unable to create WebGLFramebuffer.")}function Q3(e,t,n,s,r,a,o){let i=e.getAttribLocation(t,n);return i===-1?!1:(we(e,()=>e.bindBuffer(e.ARRAY_BUFFER,s)),we(e,()=>e.vertexAttribPointer(i,r,e.FLOAT,!1,a,o)),we(e,()=>e.enableVertexAttribArray(i)),!0)}function $I(e,t,n){zI(e,n),we(e,()=>e.activeTexture(e.TEXTURE0+n)),we(e,()=>e.bindTexture(e.TEXTURE_2D,t))}function Pee(e,t){zI(e,t),we(e,()=>e.activeTexture(e.TEXTURE0+t)),we(e,()=>e.bindTexture(e.TEXTURE_2D,null))}function PI(e,t,n){return Da(e,()=>e.getUniformLocation(t,n),'uniform "'+n+'" not present in program.')}function FI(e,t,n){return e.getUniformLocation(t,n)}function OI(e,t,n,s){we(e,()=>$I(e,t,s)),we(e,()=>e.uniform1i(n,s))}function Fee(e){we(e,()=>e.bindFramebuffer(e.FRAMEBUFFER,null)),we(e,()=>e.viewport(0,0,e.canvas.width,e.canvas.height)),we(e,()=>e.scissor(0,0,e.canvas.width,e.canvas.height))}function jf(e,t,n){we(e,()=>e.bindFramebuffer(e.FRAMEBUFFER,n)),we(e,()=>e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0))}function ey(e,t){we(e,()=>e.bindFramebuffer(e.FRAMEBUFFER,t)),we(e,()=>e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,null,0))}function Jd(e){let t=e.checkFramebufferStatus(e.FRAMEBUFFER);if(t!==e.FRAMEBUFFER_COMPLETE)throw new Error("Error binding framebuffer: "+MI(e,t))}function MI(e,t){switch(t){case e.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:return"FRAMEBUFFER_INCOMPLETE_ATTACHMENT";case e.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:return"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT";case e.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:return"FRAMEBUFFER_INCOMPLETE_DIMENSIONS";case e.FRAMEBUFFER_UNSUPPORTED:return"FRAMEBUFFER_UNSUPPORTED";default:return`unknown error ${t}`}}function Da(e,t,n){let s=we(e,()=>t());if(s==null)throw new Error(n);return s}function zI(e,t){let n=e.MAX_COMBINED_TEXTURE_IMAGE_UNITS-1,s=t+e.TEXTURE0;if(sn){let r=`[gl.TEXTURE0, gl.TEXTURE${n}]`;throw new Error(`textureUnit must be in ${r}.`)}}function il(e,t=2){return v.sizeFromShape(e.slice(0,e.length-t))}function ll(e){if(e.length===0)throw Error("Cannot get rows and columns of an empty shape array.");return[e.length>1?e[e.length-2]:1,e[e.length-1]]}function qf(e){let t=[1,1,1];return e.length===0||e.length===1&&e[0]===1||(t=[il(e),...ll(e)]),t}function LI(e,t=!1){let n=U().getNumber("WEBGL_MAX_TEXTURE_SIZE"),s=U().getNumber("WEBGL_MAX_SIZE_FOR_NARROW_TEXTURE");s===1/0&&U().getBool("WEBGL_AUTO_SQUARIFY_NARROW_TEXTURE_SHAPE")&&(s=n/2),t&&(n=n*2,s=s*2,e=e.map((i,l)=>l>=e.length-2?v.nearestLargerEven(e[l]):e[l]),e.length===1&&(e=[2,e[0]])),e.length!==2&&(e=v.squeezeShape(e).newShape);let r=v.sizeFromShape(e),a=null;e.length<=1&&r<=n?a=[1,r]:e.length===2&&e[0]<=n&&e[1]<=n?a=e:e.length===3&&e[0]*e[1]<=n&&e[2]<=n?a=[e[0]*e[1],e[2]]:e.length===3&&e[0]<=n&&e[1]*e[2]<=n?a=[e[0],e[1]*e[2]]:e.length===4&&e[0]*e[1]*e[2]<=n&&e[3]<=n?a=[e[0]*e[1]*e[2],e[3]]:e.length===4&&e[0]<=n&&e[1]*e[2]*e[3]<=n&&(a=[e[0],e[1]*e[2]*e[3]]);let o=a!=null&&Math.max(...a)>s&&Math.min(...a)<=(t?2:1)&&Math.min(...a)>0;if(a==null||o)if(t){let i=il(e),l=2,u=2;e.length&&([l,u]=ll(e)),r=i*(l/2)*(u/2),a=v.sizeToSquarishShape(r).map(c=>c*2)}else a=v.sizeToSquarishShape(r);return a}function zf(e){return e%2===0}function bp(e,t){if(e=e.slice(-2),t=t.slice(-2),v.arraysEqual(e,t)||!e.length||!t.length||e[0]===0||e[1]===0||t[0]===0||t[1]===0)return!0;if(e.length!==t.length){let n=e.slice(-1)[0],s=t.slice(-1)[0];if(n===s||zf(n)&&zf(s)&&(e[0]===1||t[0]===1))return!0}return e[1]===t[1]&&zf(e[0])&&zf(t[0])}var Xf,Kf;function BI(e){if(Xf==null){let t=Mr(e);Xf=t.getParameter(t.MAX_TEXTURE_SIZE)}return Xf}function Oee(){Xf=null}function Mee(){Kf=null}function WI(e){if(Kf==null){let t=Mr(e);Kf=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS)}return Math.min(16,Kf)}function VI(e){if(e===0)return 0;let t,n=Mr(e);return Ys(n,"EXT_disjoint_timer_query_webgl2")&&e===2?t=2:Ys(n,"EXT_disjoint_timer_query")?t=1:t=0,t}function Ys(e,t){return e.getExtension(t)!=null}function ty(e){try{if(Mr(e)!=null)return!0}catch(t){return console.log("Error when getting WebGL context: ",t),!1}return!1}function UI(e){if(e===0)return!1;let t=Mr(e);if(e===1){if(!Ys(t,"OES_texture_float"))return!1}else if(!Ys(t,"EXT_color_buffer_float"))return!1;return ny(t)}function GI(e){if(e===0)return!1;let t=Mr(e);if(e===1){if(!Ys(t,"OES_texture_float")||!Ys(t,"WEBGL_color_buffer_float"))return!1}else{if(Ys(t,"EXT_color_buffer_float"))return ny(t);let s="EXT_color_buffer_half_float";if(Ys(t,s)){let r=t.getExtension(s);return zee(t,r)}return!1}return ny(t)}function ny(e){let t=Lx(e),n=e.createTexture();e.bindTexture(e.TEXTURE_2D,n);let s=1,r=1;e.texImage2D(e.TEXTURE_2D,0,t.internalFormatFloat,s,r,0,t.textureFormatFloat,t.textureTypeFloat,null);let a=e.createFramebuffer();e.bindFramebuffer(e.FRAMEBUFFER,a),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,n,0);let o=e.checkFramebufferStatus(e.FRAMEBUFFER)===e.FRAMEBUFFER_COMPLETE;return e.bindTexture(e.TEXTURE_2D,null),e.bindFramebuffer(e.FRAMEBUFFER,null),e.deleteTexture(n),e.deleteFramebuffer(a),o}function zee(e,t){let n=Lx(e,t),s=e.createTexture();e.bindTexture(e.TEXTURE_2D,s);let r=1,a=1;e.texImage2D(e.TEXTURE_2D,0,n.internalFormatHalfFloat,r,a,0,n.textureFormatFloat,n.textureTypeHalfFloat,null);let o=e.createFramebuffer();e.bindFramebuffer(e.FRAMEBUFFER,o),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,s,0);let i=e.checkFramebufferStatus(e.FRAMEBUFFER)===e.FRAMEBUFFER_COMPLETE;return e.bindTexture(e.TEXTURE_2D,null),e.bindFramebuffer(e.FRAMEBUFFER,null),e.deleteTexture(s),e.deleteFramebuffer(o),i}function HI(e){return e!==2?!1:Mr(e).fenceSync!=null}function td(e,t){Array.isArray(e)||(e=[e]),e.forEach(n=>{n!=null&&v.assert(n.dtype!=="complex64",()=>`${t} does not support complex64 tensors in the WebGL backend.`)})}var Ee=U();Ee.registerFlag("HAS_WEBGL",()=>Ee.getNumber("WEBGL_VERSION")>0);Ee.registerFlag("WEBGL_VERSION",()=>ty(2)?2:ty(1)?1:0);Ee.registerFlag("WEBGL_CHECK_NUMERICAL_PROBLEMS",()=>!1);Ee.registerFlag("WEBGL_BUFFER_SUPPORTED",()=>Ee.get("WEBGL_VERSION")===2);Ee.registerFlag("WEBGL_CPU_FORWARD",()=>!0);Ee.registerFlag("WEBGL_FORCE_F16_TEXTURES",()=>!1);Ee.registerFlag("WEBGL_PACK",()=>Ee.getBool("HAS_WEBGL"));Ee.registerFlag("WEBGL_PACK_NORMALIZATION",()=>Ee.getBool("WEBGL_PACK"));Ee.registerFlag("WEBGL_PACK_CLIP",()=>Ee.getBool("WEBGL_PACK"));Ee.registerFlag("WEBGL_PACK_DEPTHWISECONV",()=>Ee.getBool("WEBGL_PACK"));Ee.registerFlag("WEBGL_PACK_BINARY_OPERATIONS",()=>Ee.getBool("WEBGL_PACK"));Ee.registerFlag("WEBGL_PACK_UNARY_OPERATIONS",()=>Ee.getBool("WEBGL_PACK"));Ee.registerFlag("WEBGL_PACK_ARRAY_OPERATIONS",()=>Ee.getBool("WEBGL_PACK"));Ee.registerFlag("WEBGL_PACK_IMAGE_OPERATIONS",()=>Ee.getBool("WEBGL_PACK"));Ee.registerFlag("WEBGL_PACK_REDUCE",()=>Ee.getBool("WEBGL_PACK"));Ee.registerFlag("WEBGL_LAZILY_UNPACK",()=>Ee.getBool("WEBGL_PACK"));Ee.registerFlag("WEBGL_CONV_IM2COL",()=>Ee.getBool("WEBGL_PACK"));Ee.registerFlag("WEBGL_MAX_TEXTURE_SIZE",()=>BI(Ee.getNumber("WEBGL_VERSION")));Ee.registerFlag("WEBGL_MAX_TEXTURES_IN_SHADER",()=>WI(Ee.getNumber("WEBGL_VERSION")));Ee.registerFlag("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION",()=>{let e=Ee.getNumber("WEBGL_VERSION");return e===0?0:VI(e)});Ee.registerFlag("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE",()=>Ee.getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")>0&&!Xp.isMobile());Ee.registerFlag("WEBGL_RENDER_FLOAT32_CAPABLE",()=>UI(Ee.getNumber("WEBGL_VERSION")));Ee.registerFlag("WEBGL_RENDER_FLOAT32_ENABLED",()=>Ee.getBool("WEBGL_FORCE_F16_TEXTURES")?!1:Ee.getBool("WEBGL_RENDER_FLOAT32_CAPABLE"));Ee.registerFlag("WEBGL_DOWNLOAD_FLOAT_ENABLED",()=>GI(Ee.getNumber("WEBGL_VERSION")));Ee.registerFlag("WEBGL_FENCE_API_ENABLED",()=>HI(Ee.getNumber("WEBGL_VERSION")));Ee.registerFlag("WEBGL_SIZE_UPLOAD_UNIFORM",()=>Ee.getBool("WEBGL_RENDER_FLOAT32_ENABLED")?4:0);Ee.registerFlag("WEBGL_DELETE_TEXTURE_THRESHOLD",()=>-1,e=>{if(e<0&&e!==-1)throw new Error(`WEBGL_DELETE_TEXTURE_THRESHOLD must be -1 (indicating never delete) or at least 0, but got ${e}.`)});Ee.registerFlag("WEBGL_FLUSH_THRESHOLD",()=>Xp.isMobile()?1:-1,e=>{if(e<0&&e!==-1)throw new Error(`WEBGL_FLUSH_THRESHOLD must be -1 (indicating never manual flush) or at least 0, but got ${e}.`)});Ee.registerFlag("CPU_HANDOFF_SIZE_THRESHOLD",()=>128);Ee.registerFlag("WEBGL_USE_SHAPES_UNIFORMS",()=>!1);Ee.registerFlag("TOPK_LAST_DIM_CPU_HANDOFF_SIZE_THRESHOLD",()=>1e5);Ee.registerFlag("TOPK_K_CPU_HANDOFF_THRESHOLD",()=>128);Ee.registerFlag("WEBGL_EXP_CONV",()=>!1);Ee.registerFlag("SOFTWARE_WEBGL_ENABLED",()=>Ee.getBool("IS_TEST"));Ee.registerFlag("WEBGL_MAX_SIZE_FOR_NARROW_TEXTURE",()=>1/0);Ee.registerFlag("WEBGL_AUTO_SQUARIFY_NARROW_TEXTURE_SHAPE",()=>!1);Ee.registerFlag("WEBGL2_ISNAN_CUSTOM",()=>!1);function cs(){let e,t,n,s,r,a,o,i,l,u;return U().getNumber("WEBGL_VERSION")===2?(e="#version 300 es",t="in",n="out",s="in",r="texture",a="outputColor",o="out vec4 outputColor;",i=U().getBool("WEBGL2_ISNAN_CUSTOM")?` bool isnan_custom(float val) { uint floatToUint = floatBitsToUint(val); return (floatToUint & 0x7fffffffu) > 0x7f800000u; @@ -73,7 +73,7 @@ Hi, looks like you are running TensorFlow.js in Node.js. To speed things up dram } #define isnan(value) isnan_custom(value) - `,l="",u=` + `:"",l="",u=` #define round(value) newRound(value) int newRound(float value) { return int(floor(value + 0.5)); @@ -107,15 +107,15 @@ Hi, looks like you are running TensorFlow.js in Node.js. To speed things up dram ivec4 round(vec4 value) { return ivec4(floor(value + vec4(0.5))); } - `),{version:e,attribute:t,varyingVs:n,varyingFs:s,texture2D:r,output:a,defineOutput:o,defineSpecialNaN:i,defineSpecialInf:l,defineRound:u}}function Au(e,t,n="index"){let s=v.computeStrides(t);return s.map((r,a)=>{let o=`int ${e[a]} = ${n} / ${r}`,i=a===s.length-1?`int ${e[a+1]} = ${n} - ${e[a]} * ${r}`:`index -= ${e[a]} * ${r}`;return`${o}; ${i};`}).join("")}function $2(e,t,n="index"){let s=v.computeStrides(t);return s.map((r,a)=>{let o=`int ${e[a]} = ${n} / outShapeStrides[${a}]`,i=a===s.length-1?`int ${e[a+1]} = ${n} - ${e[a]} * outShapeStrides[${a}]`:`index -= ${e[a]} * outShapeStrides[${a}]`;return`${o}; ${i};`}).join("")}function ate(e,t){let n=e.length,s=e.map(a=>`${t}[${a}]`),r=new Array(n-1);r[n-2]=s[n-1];for(let a=n-3;a>=0;--a)r[a]=`(${r[a+1]} * ${s[a+1]})`;return r}function ote(e,t,n="index"){let s=e.map((a,o)=>o),r=ate(s,t);return r.map((a,o)=>{let i=`int ${e[o]} = ${n} / ${r[o]}`,l=o===r.length-1?`int ${e[o+1]} = ${n} - ${e[o]} * ${r[o]}`:`index -= ${e[o]} * ${r[o]}`;return`${i}; ${l};`}).join("")}function ib(e){let t=v.computeStrides(e).map(n=>n.toString());return` + `),{version:e,attribute:t,varyingVs:n,varyingFs:s,texture2D:r,output:a,defineOutput:o,defineSpecialNaN:i,defineSpecialInf:l,defineRound:u}}function cu(e,t,n="index"){let s=v.computeStrides(t);return s.map((r,a)=>{let o=`int ${e[a]} = ${n} / ${r}`,i=a===s.length-1?`int ${e[a+1]} = ${n} - ${e[a]} * ${r}`:`index -= ${e[a]} * ${r}`;return`${o}; ${i};`}).join("")}function u2(e,t,n="index"){let s=v.computeStrides(t);return s.map((r,a)=>{let o=`int ${e[a]} = ${n} / outShapeStrides[${a}]`,i=a===s.length-1?`int ${e[a+1]} = ${n} - ${e[a]} * outShapeStrides[${a}]`:`index -= ${e[a]} * outShapeStrides[${a}]`;return`${o}; ${i};`}).join("")}function Lee(e,t){let n=e.length,s=e.map(a=>`${t}[${a}]`),r=new Array(n-1);r[n-2]=s[n-1];for(let a=n-3;a>=0;--a)r[a]=`(${r[a+1]} * ${s[a+1]})`;return r}function Bee(e,t,n="index"){let s=e.map((a,o)=>o),r=Lee(s,t);return r.map((a,o)=>{let i=`int ${e[o]} = ${n} / ${r[o]}`,l=o===r.length-1?`int ${e[o+1]} = ${n} - ${e[o]} * ${r[o]}`:`index -= ${e[o]} * ${r[o]}`;return`${i}; ${l};`}).join("")}function Wx(e){let t=v.computeStrides(e).map(n=>n.toString());return` int getFlatIndex(ivec3 coords) { return coords.x * ${t[0]} + coords.y * ${t[1]} + coords.z; } -`}function lb(){return` +`}function Vx(){return` int getFlatIndex(ivec3 coords) { return coords.x * outShapeStrides[0] + coords.y * outShapeStrides[1] + coords.z; } -`}var i9=` +`}var jI=` const float FLOAT_MAX = 1.70141184e38; const float FLOAT_MIN = 1.17549435e-38; @@ -154,22 +154,22 @@ Hi, looks like you are running TensorFlow.js in Node.js. To speed things up dram return c / 255.0; } -`,{getBroadcastDims:l9}=T;function ite(e,t,n){let s=[];if(e.forEach(h=>{let f=v.sizeFromShape(h.shapeInfo.logicalShape);if(h.shapeInfo.isUniform?s.push(`uniform float ${h.name}${f>1?`[${f}]`:""};`):(s.push(`uniform sampler2D ${h.name};`),s.push(`uniform int offset${h.name};`)),n.enableShapeUniforms){let{uniformShape:m}=ub(n.packedInputs,h.shapeInfo.logicalShape,h.shapeInfo.texShape);switch(m.length){case 1:s.push(`uniform int ${h.name}Shape;`);break;case 2:s.push(`uniform ivec2 ${h.name}Shape;`);break;case 3:s.push(`uniform ivec3 ${h.name}Shape;`);break;case 4:s.push(`uniform ivec4 ${h.name}Shape;`);break;default:break}s.push(`uniform ivec2 ${h.name}TexShape;`)}}),n.enableShapeUniforms){switch(t.logicalShape.length){case 1:s.push("uniform int outShape;");break;case 2:s.push("uniform ivec2 outShape;"),s.push("uniform int outShapeStrides;");break;case 3:s.push("uniform ivec3 outShape;"),s.push("uniform ivec2 outShapeStrides;");break;case 4:s.push("uniform ivec4 outShape;"),s.push("uniform ivec3 outShapeStrides;");break;default:break}s.push("uniform ivec2 outTexShape;")}n.customUniforms&&n.customUniforms.forEach(h=>{s.push(`uniform ${h.type} ${h.name}${h.arrayIndex?`[${h.arrayIndex}]`:""};`)});let r=s.join(` -`),a=e.map(h=>lte(h,t,n.packedInputs,n.enableShapeUniforms)).join(` -`),o=t.texShape,i=hs(),l=dte(i),u,c,p=fte(i);return t.isPacked?(u=ute(t.logicalShape,o,n.enableShapeUniforms),c=hte(i)):(u=cte(t.logicalShape,o,n.enableShapeUniforms),c=pte(i)),n.packedInputs&&(p+=Ate),[p,l,c,r,u,a,n.userCode].join(` -`)}function fd(e,t=!1){let n=e.shapeInfo.logicalShape;switch(n.length){case 0:return Rte(e,t);case 1:return Dte(e,t);case 2:return Pte(e,t);case 3:return Ote(e,t);case 4:return zte(e,t);case 5:return Lte(e);case 6:return Bte(e);default:throw new Error(`${n.length}-D input sampling is not yet supported`)}}function u9(e,t){switch(e.shapeInfo.logicalShape.length){case 0:return Ete(e);case 1:return _te(e,t);case 2:return $te(e,t);case 3:return Fte(e,t);default:return Mte(e,t)}}function lte(e,t,n=!1,s){let r="";n?r+=u9(e,s):r+=fd(e,s);let a=e.shapeInfo.logicalShape,o=t.logicalShape;return a.length<=o.length&&(n?r+=Wte(e,t):r+=Vte(e,t)),r}function ute(e,t,n){switch(e.length){case 0:return c9();case 1:return xte(e,t,n);case 2:return Tte(e,t,n);case 3:return vte(e,t,n);default:return kte(e,t,n)}}function cte(e,t,n){switch(e.length){case 0:return c9();case 1:return bte(e,t,n);case 2:return Nte(e,t,n);case 3:return wte(e,t,n);case 4:return Ste(e,t,n);case 5:return Ite(e,t);case 6:return Cte(e,t);default:throw new Error(`${e.length}-D output sampling is not yet supported`)}}function dte(e){return` +`,{getBroadcastDims:qI}=T;function Wee(e,t,n){let s=[];if(e.forEach(h=>{let f=v.sizeFromShape(h.shapeInfo.logicalShape);if(h.shapeInfo.isUniform?s.push(`uniform float ${h.name}${f>1?`[${f}]`:""};`):(s.push(`uniform sampler2D ${h.name};`),s.push(`uniform int offset${h.name};`)),n.enableShapeUniforms){let{uniformShape:m}=Ux(n.packedInputs,h.shapeInfo.logicalShape,h.shapeInfo.texShape);switch(m.length){case 1:s.push(`uniform int ${h.name}Shape;`);break;case 2:s.push(`uniform ivec2 ${h.name}Shape;`);break;case 3:s.push(`uniform ivec3 ${h.name}Shape;`);break;case 4:s.push(`uniform ivec4 ${h.name}Shape;`);break;default:break}s.push(`uniform ivec2 ${h.name}TexShape;`)}}),n.enableShapeUniforms){switch(t.logicalShape.length){case 1:s.push("uniform int outShape;");break;case 2:s.push("uniform ivec2 outShape;"),s.push("uniform int outShapeStrides;");break;case 3:s.push("uniform ivec3 outShape;"),s.push("uniform ivec2 outShapeStrides;");break;case 4:s.push("uniform ivec4 outShape;"),s.push("uniform ivec3 outShapeStrides;");break;default:break}s.push("uniform ivec2 outTexShape;")}n.customUniforms&&n.customUniforms.forEach(h=>{s.push(`uniform ${h.type} ${h.name}${h.arrayIndex?`[${h.arrayIndex}]`:""};`)});let r=s.join(` +`),a=e.map(h=>Vee(h,t,n.packedInputs,n.enableShapeUniforms)).join(` +`),o=t.texShape,i=cs(),l=Hee(i),u,c,p=Xee(i);return t.isPacked?(u=Uee(t.logicalShape,o,n.enableShapeUniforms),c=qee(i)):(u=Gee(t.logicalShape,o,n.enableShapeUniforms),c=jee(i)),n.packedInputs&&(p+=Jee),[p,l,c,r,u,a,n.userCode].join(` +`)}function nd(e,t=!1){let n=e.shapeInfo.logicalShape;switch(n.length){case 0:return cte(e,t);case 1:return pte(e,t);case 2:return fte(e,t);case 3:return gte(e,t);case 4:return Ate(e,t);case 5:return xte(e);case 6:return bte(e);default:throw new Error(`${n.length}-D input sampling is not yet supported`)}}function XI(e,t){switch(e.shapeInfo.logicalShape.length){case 0:return ute(e);case 1:return dte(e,t);case 2:return hte(e,t);case 3:return mte(e,t);default:return yte(e,t)}}function Vee(e,t,n=!1,s){let r="";n?r+=XI(e,s):r+=nd(e,s);let a=e.shapeInfo.logicalShape,o=t.logicalShape;return a.length<=o.length&&(n?r+=vte(e,t):r+=wte(e,t)),r}function Uee(e,t,n){switch(e.length){case 0:return KI();case 1:return Qee(e,t,n);case 2:return ite(e,t,n);case 3:return tte(e,t,n);default:return ste(e,t,n)}}function Gee(e,t,n){switch(e.length){case 0:return KI();case 1:return ete(e,t,n);case 2:return lte(e,t,n);case 3:return nte(e,t,n);case 4:return rte(e,t,n);case 5:return ate(e,t);case 6:return ote(e,t);default:throw new Error(`${e.length}-D output sampling is not yet supported`)}}function Hee(e){return` float sampleTexture(sampler2D textureSampler, vec2 uv) { return ${e.texture2D}(textureSampler, uv).r; } - `}function pte(e){return` + `}function jee(e){return` void setOutput(float val) { ${e.output} = vec4(val, 0, 0, 0); } - `}function hte(e){return` + `}function qee(e){return` void setOutput(vec4 val) { ${e.output} = val; } - `}function fte(e){return`${e.version} + `}function Xee(e){return`${e.version} precision highp float; precision highp int; precision highp sampler2D; @@ -224,10 +224,10 @@ Hi, looks like you are running TensorFlow.js in Node.js. To speed things up dram return fract((p3.x + p3.y) * p3.z); } - ${mte} - ${gte} - ${yte} - `}var mte=` + ${Kee} + ${Zee} + ${Yee} + `}var Kee=` vec2 uvFromFlat(int texNumR, int texNumC, int index) { int texR = index / texNumC; int texC = index - texR * texNumC; @@ -239,7 +239,7 @@ vec2 packedUVfrom1D(int texNumR, int texNumC, int index) { int texC = texelIndex - texR * texNumC; return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR); } -`,gte=` +`,Zee=` vec2 packedUVfrom2D(int texelsInLogicalRow, int texNumR, int texNumC, int row, int col) { int texelIndex = (row / 2) * texelsInLogicalRow + (col / 2); @@ -247,7 +247,7 @@ vec2 packedUVfrom2D(int texelsInLogicalRow, int texNumR, int texC = texelIndex - texR * texNumC; return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR); } -`,yte=` +`,Yee=` vec2 packedUVfrom3D(int texNumR, int texNumC, int texelsInBatch, int texelsInLogicalRow, int b, int row, int col) { @@ -256,7 +256,7 @@ vec2 packedUVfrom3D(int texNumR, int texNumC, int texC = index - texR * texNumC; return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR); } -`,Ate=` +`,Jee=` float getChannel(vec4 frag, vec2 innerDims) { vec2 modCoord = mod(innerDims, 2.); return modCoord.x == 0. ? @@ -267,11 +267,11 @@ vec2 packedUVfrom3D(int texNumR, int texNumC, float modCoord = mod(float(dim), 2.); return modCoord == 0. ? frag.r : frag.g; } -`;function c9(){return` +`;function KI(){return` int getOutputCoords() { return 0; } - `}function xte(e,t,n){let s=[Math.ceil(t[0]/2),Math.ceil(t[1]/2)];return s[0]===1?n?` + `}function Qee(e,t,n){let s=[Math.ceil(t[0]/2),Math.ceil(t[1]/2)];return s[0]===1?n?` int getOutputCoords() { return 2 * int(resultUV.x * ceil(float(outTexShape[1]) / 2.0)); } @@ -300,7 +300,7 @@ vec2 packedUVfrom3D(int texNumR, int texNumC, vec2(${s[0]}, ${s[1]})); return 2 * (resTexRC.x * ${s[1]} + resTexRC.y); } - `}function bte(e,t,n){return t[0]===1?n?` + `}function ete(e,t,n){return t[0]===1?n?` int getOutputCoords() { return int(resultUV.x * float(outTexShape[1])); } @@ -328,7 +328,7 @@ vec2 packedUVfrom3D(int texNumR, int texNumC, vec2(${t[0]}, ${t[1]})); return resTexRC.x * ${t[1]} + resTexRC.y; } - `}function vte(e,t,n){if(n)return` + `}function tte(e,t,n){if(n)return` ivec3 getOutputCoords() { ivec2 packedTexShape = ivec2(ceil(float(outTexShape[0]) / 2.0), ceil(float(outTexShape[1]) / 2.0)); int texelsInLogicalRow = int(ceil(float(outShape[2]) / 2.0)); @@ -359,15 +359,15 @@ vec2 packedUVfrom3D(int texNumR, int texNumC, return ivec3(b, r, c); } - `}function wte(e,t,n){if(n)return` + `}function nte(e,t,n){if(n)return` ivec3 getOutputCoords() { ivec2 resTexRC = ivec2(resultUV.yx * vec2(outTexShape[0], outTexShape[1])); int index = resTexRC.x * outTexShape[1] + resTexRC.y; - ${$2(["r","c","d"],e)} + ${u2(["r","c","d"],e)} return ivec3(r, c, d); } -`;let s=Au(["r","c","d"],e);return` +`;let s=cu(["r","c","d"],e);return` ivec3 getOutputCoords() { ivec2 resTexRC = ivec2(resultUV.yx * vec2(${t[0]}, ${t[1]})); @@ -375,7 +375,7 @@ vec2 packedUVfrom3D(int texNumR, int texNumC, ${s} return ivec3(r, c, d); } - `}function kte(e,t,n){if(n)return` + `}function ste(e,t,n){if(n)return` ivec4 getOutputCoords() { ivec2 packedTexShape = ivec2(ceil(float(outTexShape[0]) / 2.0), ceil(float(outTexShape[1]) / 2.0)); ivec2 resTexRC = ivec2(resultUV.yx * @@ -416,15 +416,15 @@ vec2 packedUVfrom3D(int texNumR, int texNumC, return ivec${e.length}(${l}); } - `}function Ste(e,t,n){if(n)return` + `}function rte(e,t,n){if(n)return` ivec4 getOutputCoords() { ivec2 resTexRC = ivec2(resultUV.yx * vec2(outTexShape[0], outTexShape[1])); int index = resTexRC.x * outTexShape[1] + resTexRC.y; - ${$2(["r","c","d","d2"],e)} + ${u2(["r","c","d","d2"],e)} return ivec4(r, c, d, d2); } - `;let s=Au(["r","c","d","d2"],e);return` + `;let s=cu(["r","c","d","d2"],e);return` ivec4 getOutputCoords() { ivec2 resTexRC = ivec2(resultUV.yx * vec2(${t[0]}, ${t[1]})); @@ -432,7 +432,7 @@ vec2 packedUVfrom3D(int texNumR, int texNumC, ${s} return ivec4(r, c, d, d2); } - `}function Ite(e,t){let n=Au(["r","c","d","d2","d3"],e);return` + `}function ate(e,t){let n=cu(["r","c","d","d2","d3"],e);return` ivec5 getOutputCoords() { ivec2 resTexRC = ivec2(resultUV.yx * vec2(${t[0]}, ${t[1]})); @@ -444,7 +444,7 @@ vec2 packedUVfrom3D(int texNumR, int texNumC, ivec5 outShape = ivec5(r, c, d, d2, d3); return outShape; } - `}function Cte(e,t){let n=Au(["r","c","d","d2","d3","d4"],e);return` + `}function ote(e,t){let n=cu(["r","c","d","d2","d3","d4"],e);return` ivec6 getOutputCoords() { ivec2 resTexRC = ivec2(resultUV.yx * vec2(${t[0]}, ${t[1]})); @@ -455,7 +455,7 @@ vec2 packedUVfrom3D(int texNumR, int texNumC, ivec6 result = ivec6(r, c, d, d2, d3, d4); return result; } - `}function Tte(e,t,n){let s=[Math.ceil(t[0]/2),Math.ceil(t[1]/2)];if(v.arraysEqual(e,t))return n?` + `}function ite(e,t,n){let s=[Math.ceil(t[0]/2),Math.ceil(t[1]/2)];if(v.arraysEqual(e,t))return n?` ivec2 getOutputCoords() { ivec2 packedTexShape = ivec2(ceil(float(outTexShape[0]) / 2.0), ceil(float(outTexShape[1]) / 2.0)); return 2 * ivec2(resultUV.yx * vec2(packedTexShape[0], packedTexShape[1])); @@ -488,7 +488,7 @@ vec2 packedUVfrom3D(int texNumR, int texNumC, return ivec2(r, c); } - `}function Nte(e,t,n){return v.arraysEqual(e,t)?n?` + `}function lte(e,t,n){return v.arraysEqual(e,t)?n?` ivec2 getOutputCoords() { return ivec2(resultUV.yx * vec2(outTexShape[0], outTexShape[1])); } @@ -542,15 +542,15 @@ vec2 packedUVfrom3D(int texNumR, int texNumC, int c = index - r * ${e[1]}; return ivec2(r, c); } - `}function xu(e){return`offset${e}`}function Ete(e){let t=e.name,n="get"+t.charAt(0).toUpperCase()+t.slice(1),s=hs();return` + `}function du(e){return`offset${e}`}function ute(e){let t=e.name,n="get"+t.charAt(0).toUpperCase()+t.slice(1),s=cs();return` vec4 ${n}() { return ${s.texture2D}(${t}, halfCR); } - `}function Rte(e,t){let n=e.name,s="get"+n.charAt(0).toUpperCase()+n.slice(1);if(e.shapeInfo.isUniform)return`float ${s}() {return ${n};}`;let[r,a]=e.shapeInfo.texShape;if(r===1&&a===1)return` + `}function cte(e,t){let n=e.name,s="get"+n.charAt(0).toUpperCase()+n.slice(1);if(e.shapeInfo.isUniform)return`float ${s}() {return ${n};}`;let[r,a]=e.shapeInfo.texShape;if(r===1&&a===1)return` float ${s}() { return sampleTexture(${n}, halfCR); } - `;let o=xu(n);if(t)return` + `;let o=du(n);if(t)return` float ${s}() { vec2 uv = uvFromFlat(${n}TexShape[0], ${n}TexShape[1], ${o}); return sampleTexture(${n}, uv); @@ -560,7 +560,7 @@ vec2 packedUVfrom3D(int texNumR, int texNumC, vec2 uv = uvFromFlat(${i}, ${l}, ${o}); return sampleTexture(${n}, uv); } - `}function _te(e,t){let n=e.name,s="get"+n.charAt(0).toUpperCase()+n.slice(1),r=e.shapeInfo.texShape,a=hs();if(t)return` + `}function dte(e,t){let n=e.name,s="get"+n.charAt(0).toUpperCase()+n.slice(1),r=e.shapeInfo.texShape,a=cs();if(t)return` vec4 ${s}(int index) { ivec2 packedTexShape = ivec2(ceil(float(${n}TexShape[0]) / 2.0), ceil(float(${n}TexShape[1]) / 2.0)); vec2 uv = packedUVfrom1D( @@ -573,15 +573,15 @@ vec2 packedUVfrom3D(int texNumR, int texNumC, ${o[0]}, ${o[1]}, index); return ${a.texture2D}(${n}, uv); } - `}function Dte(e,t){let n=e.name,s="get"+n.charAt(0).toUpperCase()+n.slice(1);if(e.shapeInfo.isUniform)return` + `}function pte(e,t){let n=e.name,s="get"+n.charAt(0).toUpperCase()+n.slice(1);if(e.shapeInfo.isUniform)return` float ${s}(int index) { - ${md(e)} + ${sd(e)} } `;let r=e.shapeInfo.texShape,a=r[0],o=r[1];if(o===1&&a===1)return` float ${s}(int index) { return sampleTexture(${n}, halfCR); } - `;let i=xu(n);return o===1?t?` + `;let i=du(n);return o===1?t?` float ${s}(int index) { vec2 uv = vec2(0.5, (float(index + ${i}) + 0.5) / float(${n}TexShape[0])); return sampleTexture(${n}, uv); @@ -611,7 +611,7 @@ vec2 packedUVfrom3D(int texNumR, int texNumC, vec2 uv = uvFromFlat(${a}, ${o}, index + ${i}); return sampleTexture(${n}, uv); } - `}function $te(e,t){let n=e.shapeInfo.logicalShape,s=e.name,r="get"+s.charAt(0).toUpperCase()+s.slice(1),a=e.shapeInfo.texShape,o=a[0],i=a[1],l=hs();if(a!=null&&v.arraysEqual(n,a))return t?` + `}function hte(e,t){let n=e.shapeInfo.logicalShape,s=e.name,r="get"+s.charAt(0).toUpperCase()+s.slice(1),a=e.shapeInfo.texShape,o=a[0],i=a[1],l=cs();if(a!=null&&v.arraysEqual(n,a))return t?` vec4 ${r}(int row, int col) { vec2 uv = (vec2(col, row) + halfCR) / vec2(${s}TexShape[1], ${s}TexShape[0]); @@ -635,7 +635,7 @@ vec2 packedUVfrom3D(int texNumR, int texNumC, vec2 uv = packedUVfrom2D(${c}, ${u[0]}, ${u[1]}, row, col); return ${l.texture2D}(${s}, uv); } - `}function Pte(e,t){let n=e.shapeInfo.logicalShape,s=e.name,r="get"+s.charAt(0).toUpperCase()+s.slice(1),a=e.shapeInfo.texShape;if(a!=null&&v.arraysEqual(n,a)){if(t)return` + `}function fte(e,t){let n=e.shapeInfo.logicalShape,s=e.name,r="get"+s.charAt(0).toUpperCase()+s.slice(1),a=e.shapeInfo.texShape;if(a!=null&&v.arraysEqual(n,a)){if(t)return` float ${r}(int row, int col) { vec2 uv = (vec2(col, row) + halfCR) / vec2(${s}TexShape[1], ${s}TexShape[0]); return sampleTexture(${s}, uv); @@ -645,17 +645,17 @@ vec2 packedUVfrom3D(int texNumR, int texNumC, vec2 uv = (vec2(col, row) + halfCR) / vec2(${h}.0, ${d}.0); return sampleTexture(${s}, uv); } - `}let{newShape:o,keptDims:i}=v.squeezeShape(n),l=o;if(l.length=1?c="coords = 0;":c=i.map(x=>`coords.${p[x+u]} = 0;`).join(` + `}function vte(e,t){let n=e.name,s=n.charAt(0).toUpperCase()+n.slice(1),r="get"+s+"AtOutCoords",a=e.shapeInfo.logicalShape.length,o=t.logicalShape.length,i=qI(e.shapeInfo.logicalShape,t.logicalShape),l=Tt(o),u=o-a,c,p=["x","y","z","w","u","v"];a===0?c="":o<2&&i.length>=1?c="coords = 0;":c=i.map(x=>`coords.${p[x+u]} = 0;`).join(` `);let d="";o<2&&a>0?d="coords":d=e.shapeInfo.logicalShape.map((x,A)=>`coords.${p[A+u]}`).join(", ");let h="return outputValue;",m=v.sizeFromShape(e.shapeInfo.logicalShape)===1,y=v.sizeFromShape(t.logicalShape)===1;if(a===1&&!m&&!y)h=` return vec4(outputValue.xy, outputValue.xy); `;else if(m&&!y)o===1?h=` @@ -972,20 +972,20 @@ vec2 packedUVfrom3D(int texNumR, int texNumC, vec4 outputValue = get${s}(${d}); ${h} } - `}function Vte(e,t){let n=e.name,s=n.charAt(0).toUpperCase()+n.slice(1),r="get"+s+"AtOutCoords",a=t.texShape,o=e.shapeInfo.texShape,i=e.shapeInfo.logicalShape.length,l=t.logicalShape.length;if(!e.shapeInfo.isUniform&&i===l&&e.shapeInfo.flatOffset==null&&v.arraysEqual(o,a))return` + `}function wte(e,t){let n=e.name,s=n.charAt(0).toUpperCase()+n.slice(1),r="get"+s+"AtOutCoords",a=t.texShape,o=e.shapeInfo.texShape,i=e.shapeInfo.logicalShape.length,l=t.logicalShape.length;if(!e.shapeInfo.isUniform&&i===l&&e.shapeInfo.flatOffset==null&&v.arraysEqual(o,a))return` float ${r}() { return sampleTexture(${n}, resultUV); } - `;let u=kt(l),c=l9(e.shapeInfo.logicalShape,t.logicalShape),p=l-i,d,h=["x","y","z","w","u","v"];i===0?d="":l<2&&c.length>=1?d="coords = 0;":d=c.map(m=>`coords.${h[m+p]} = 0;`).join(` + `;let u=Tt(l),c=qI(e.shapeInfo.logicalShape,t.logicalShape),p=l-i,d,h=["x","y","z","w","u","v"];i===0?d="":l<2&&c.length>=1?d="coords = 0;":d=c.map(m=>`coords.${h[m+p]} = 0;`).join(` `);let f="";return l<2&&i>0?f="coords":f=e.shapeInfo.logicalShape.map((m,g)=>`coords.${h[g+p]}`).join(", "),` float ${r}() { ${u} coords = getOutputCoords(); ${d} return get${s}(${f}); } - `}function kt(e){if(e<=1)return"int";if(e===2)return"ivec2";if(e===3)return"ivec3";if(e===4)return"ivec4";if(e===5)return"ivec5";if(e===6)return"ivec6";throw Error(`GPU for rank ${e} is not yet supported`)}function ub(e,t,n){let{newShape:s,keptDims:r}=v.squeezeShape(t),a=t.length,o=e&&a===3&&t[0]===1,i=o?t.slice(1):s,l=!e&&a>1&&!v.arraysEqual(t,n)&&s.lengthe[n]).join(", ")}function Ute(e,t,n,s){let r=n.map((c,p)=>{let d={logicalShape:c.shape,texShape:c.isUniform?null:c.texData.texShape,isUniform:c.isUniform,isPacked:c.isUniform?!1:c.texData.isPacked,flatOffset:null};return c.texData!=null&&c.texData.slice!=null&&c.texData.slice.flatOffset>0&&(d.flatOffset=c.texData.slice.flatOffset),{name:t.variableNames[p],shapeInfo:d}}),a=r.map(c=>c.shapeInfo),o={logicalShape:s.shape,texShape:s.texData.texShape,isUniform:!1,isPacked:s.texData.isPacked,flatOffset:null},i=ite(r,o,t),l=BI(e.gl,i),u=e.createProgram(l);return H().get("ENGINE_COMPILE_ONLY")?{program:t,fragmentShader:l,source:i,webGLProgram:u,inShapeInfos:a,outShapeInfo:o,uniformLocations:null,customUniformLocations:null,infLoc:null,nanLoc:null,inShapesLocations:null,inTexShapesLocations:null,outShapeLocation:null,outShapeStridesLocation:null,outTexShapeLocation:null}:Object.assign({program:t,fragmentShader:l,source:i,webGLProgram:u,inShapeInfos:a,outShapeInfo:o},d9(e,t,u))}function d9(e,t,n){let s={},r={},a={},o=[],i,l,u,c=null,p=null;p=e.getUniformLocation(n,"NAN",!1),H().getNumber("WEBGL_VERSION")===1&&(c=e.getUniformLocation(n,"INFINITY",!1));let d=!1;for(let h=0;h{o[f]=e.getUniformLocation(n,h.name,d)}),{uniformLocations:s,customUniformLocations:o,infLoc:c,nanLoc:p,inShapesLocations:r,inTexShapesLocations:a,outShapeLocation:i,outShapeStridesLocation:u,outTexShapeLocation:l}}function F7(e,t){if(e.length!==t.length)throw Error(`Binary was compiled with ${e.length} inputs, but was executed with ${t.length} inputs`);e.forEach((n,s)=>{let r=n.logicalShape,a=t[s],o=a.shape;if(!v.arraysEqual(r,o))throw Error(`Binary was compiled with different shapes than the current args. Shapes ${r} and ${o} must match`);if(n.isUniform&&a.isUniform)return;let i=n.texShape,l=a.isUniform?null:a.texData.texShape;if(!v.arraysEqual(i,l))throw Error(`Binary was compiled with different texture shapes than the current args. Shape ${i} and ${l} must match`)})}function Gte(e,t,n,s,r){t.program.enableShapeUniforms||(F7(t.inShapeInfos,n),F7([t.outShapeInfo],[s]));let a=s.texData.texture,o=s.texData.texShape;s.texData.isPacked?e.setOutputPackedMatrixTexture(a.texture,o[0],o[1]):e.setOutputMatrixTexture(a.texture,o[0],o[1]),e.setProgram(t.webGLProgram),H().getNumber("WEBGL_VERSION")===1&&t.infLoc!==null&&e.gl.uniform1f(t.infLoc,1/0),t.nanLoc!==null&&e.gl.uniform1f(t.nanLoc,NaN),n.forEach((l,u)=>{let c=t.program.variableNames[u],p=t.uniformLocations[c],d=t.uniformLocations[`offset${c}`],h=t.inShapesLocations[`${c}Shape`],f=t.inTexShapesLocations[`${c}TexShape`];if(h){let{uniformShape:m}=ub(t.program.packedInputs,l.shape,l.texData.texShape);switch(m.length){case 1:e.gl.uniform1iv(h,new Int32Array(m));break;case 2:e.gl.uniform2iv(h,new Int32Array(m));break;case 3:e.gl.uniform3iv(h,new Int32Array(m));break;case 4:e.gl.uniform4iv(h,new Int32Array(m));break;default:break}}if(f&&e.gl.uniform2i(f,l.texData.texShape[0],l.texData.texShape[1]),p!=null){if(l.isUniform){if(v.sizeFromShape(l.shape)<2)e.gl.uniform1f(p,l.uniformValues[0]);else{let m=l.uniformValues;m instanceof Float32Array||(m=new Float32Array(m)),e.gl.uniform1fv(p,m)}return}l.texData.slice!=null&&d!=null&&e.gl.uniform1i(d,l.texData.slice.flatOffset),e.setInputMatrixTexture(l.texData.texture.texture,p,u)}});let i=t.outShapeLocation;if(i)switch(s.shape.length){case 1:e.gl.uniform1iv(i,new Int32Array(s.shape));break;case 2:e.gl.uniform2iv(i,new Int32Array(s.shape));break;case 3:e.gl.uniform3iv(i,new Int32Array(s.shape));break;case 4:e.gl.uniform4iv(i,new Int32Array(s.shape));break;default:break}if(t.outShapeStridesLocation){let l=v.computeStrides(s.shape);switch(s.shape.length){case 2:e.gl.uniform1iv(t.outShapeStridesLocation,new Int32Array(l));break;case 3:e.gl.uniform2iv(t.outShapeStridesLocation,new Int32Array(l));break;case 4:e.gl.uniform3iv(t.outShapeStridesLocation,new Int32Array(l));break;default:break}}t.outTexShapeLocation&&e.gl.uniform2i(t.outTexShapeLocation,s.texData.texShape[0],s.texData.texShape[1]),t.program.customUniforms&&r&&t.program.customUniforms.forEach((l,u)=>{let c=t.customUniformLocations[u],p=r[u];if(l.type==="float")e.gl.uniform1fv(c,p);else if(l.type==="vec2")e.gl.uniform2fv(c,p);else if(l.type==="vec3")e.gl.uniform3fv(c,p);else if(l.type==="vec4")e.gl.uniform4fv(c,p);else if(l.type==="int")e.gl.uniform1iv(c,p);else if(l.type==="ivec2")e.gl.uniform2iv(c,p);else if(l.type==="ivec3")e.gl.uniform3iv(c,p);else if(l.type==="ivec4")e.gl.uniform4iv(c,p);else throw Error(`uniform type ${l.type} is not supported yet.`)}),e.executeProgram()}function Hte(e,t,n){let s="";t.concat(n).forEach(o=>{let i=o.texData!=null&&o.texData.slice!=null&&o.texData.slice.flatOffset>0;if(e.enableShapeUniforms&&!o.isUniform){let l=o.texData.texShape,{useSqueezeShape:u,uniformShape:c,keptDims:p}=ub(e.packedInputs,o.shape,l),d="",h="",f="";if(c.length===1&&e.packedInputs){let w=[Math.ceil(l[0]/2),Math.ceil(l[1]/2)];d=`${w[0]>1}_${w[1]>1}`}else if(c.length===2&&!e.packedInputs)h=`${c[0]>1}_${c[1]>1}`;else if(c.length>2&&!e.packedInputs){let w=v.computeStrides(c);f=`${w[0]===l[1]}_${w[w.length-1]===l[1]}`}let m=o.shape.length,g=c.length===2&&v.arraysEqual(o.shape,l),y=v.sizeFromShape(o.shape)===1,x=T.getBroadcastDims(o.shape,n.shape),A=!e.packedInputs&&m===n.shape.length&&v.arraysEqual(l,n.texData.texShape),b=e.packedInputs||c.length>2?"":`${l[0]>1}_${l[1]>1}`;s+=`${m}_${A}_${u?p:""}_${c.length}_${y}_${x}_${g}_${d}_${h}_${f}_${b}_${i}`}else{let l=o.isUniform?"uniform":o.texData.texShape;s+=`${o.shape}_${l}_${i}`}});let r=e.userCode,a=e.constructor.name;return a+="_"+s+"_"+r+`${H().getNumber("WEBGL_VERSION")}`,a}function fs(e){return H().getBool("WEBGL_USE_SHAPES_UNIFORMS")&&e<=4}var jte=class{constructor(e){this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0,this.outPackingScheme=Op.DENSE,this.customUniforms=[{name:"texShape",type:"ivec2"}];let t=hs();this.outputShape=e,this.enableShapeUniforms=fs(this.outputShape.length),this.userCode=` + `}function Tt(e){if(e<=1)return"int";if(e===2)return"ivec2";if(e===3)return"ivec3";if(e===4)return"ivec4";if(e===5)return"ivec5";if(e===6)return"ivec6";throw Error(`GPU for rank ${e} is not yet supported`)}function Ux(e,t,n){let{newShape:s,keptDims:r}=v.squeezeShape(t),a=t.length,o=e&&a===3&&t[0]===1,i=o?t.slice(1):s,l=!e&&a>1&&!v.arraysEqual(t,n)&&s.lengthe[n]).join(", ")}function kte(e,t,n,s){let r=n.map((c,p)=>{let d={logicalShape:c.shape,texShape:c.isUniform?null:c.texData.texShape,isUniform:c.isUniform,isPacked:c.isUniform?!1:c.texData.isPacked,flatOffset:null};return c.texData!=null&&c.texData.slice!=null&&c.texData.slice.flatOffset>0&&(d.flatOffset=c.texData.slice.flatOffset),{name:t.variableNames[p],shapeInfo:d}}),a=r.map(c=>c.shapeInfo),o={logicalShape:s.shape,texShape:s.texData.texShape,isUniform:!1,isPacked:s.texData.isPacked,flatOffset:null},i=Wee(r,o,t),l=II(e.gl,i),u=e.createProgram(l);return U().get("ENGINE_COMPILE_ONLY")?{program:t,fragmentShader:l,source:i,webGLProgram:u,inShapeInfos:a,outShapeInfo:o,uniformLocations:null,customUniformLocations:null,infLoc:null,nanLoc:null,inShapesLocations:null,inTexShapesLocations:null,outShapeLocation:null,outShapeStridesLocation:null,outTexShapeLocation:null}:Object.assign({program:t,fragmentShader:l,source:i,webGLProgram:u,inShapeInfos:a,outShapeInfo:o},ZI(e,t,u))}function ZI(e,t,n){let s={},r={},a={},o=[],i,l,u,c=null,p=null;p=e.getUniformLocation(n,"NAN",!1),U().getNumber("WEBGL_VERSION")===1&&(c=e.getUniformLocation(n,"INFINITY",!1));let d=!1;for(let h=0;h{o[f]=e.getUniformLocation(n,h.name,d)}),{uniformLocations:s,customUniformLocations:o,infLoc:c,nanLoc:p,inShapesLocations:r,inTexShapesLocations:a,outShapeLocation:i,outShapeStridesLocation:u,outTexShapeLocation:l}}function f7(e,t){if(e.length!==t.length)throw Error(`Binary was compiled with ${e.length} inputs, but was executed with ${t.length} inputs`);e.forEach((n,s)=>{let r=n.logicalShape,a=t[s],o=a.shape;if(!v.arraysEqual(r,o))throw Error(`Binary was compiled with different shapes than the current args. Shapes ${r} and ${o} must match`);if(n.isUniform&&a.isUniform)return;let i=n.texShape,l=a.isUniform?null:a.texData.texShape;if(!v.arraysEqual(i,l))throw Error(`Binary was compiled with different texture shapes than the current args. Shape ${i} and ${l} must match`)})}function Ste(e,t,n,s,r){t.program.enableShapeUniforms||(f7(t.inShapeInfos,n),f7([t.outShapeInfo],[s]));let a=s.texData.texture,o=s.texData.texShape;s.texData.isPacked?e.setOutputPackedMatrixTexture(a.texture,o[0],o[1]):e.setOutputMatrixTexture(a.texture,o[0],o[1]),e.setProgram(t.webGLProgram),U().getNumber("WEBGL_VERSION")===1&&t.infLoc!==null&&e.gl.uniform1f(t.infLoc,1/0),t.nanLoc!==null&&e.gl.uniform1f(t.nanLoc,NaN),n.forEach((l,u)=>{let c=t.program.variableNames[u],p=t.uniformLocations[c],d=t.uniformLocations[`offset${c}`],h=t.inShapesLocations[`${c}Shape`],f=t.inTexShapesLocations[`${c}TexShape`];if(h){let{uniformShape:m}=Ux(t.program.packedInputs,l.shape,l.texData.texShape);switch(m.length){case 1:e.gl.uniform1iv(h,new Int32Array(m));break;case 2:e.gl.uniform2iv(h,new Int32Array(m));break;case 3:e.gl.uniform3iv(h,new Int32Array(m));break;case 4:e.gl.uniform4iv(h,new Int32Array(m));break;default:break}}if(f&&e.gl.uniform2i(f,l.texData.texShape[0],l.texData.texShape[1]),p!=null){if(l.isUniform){if(v.sizeFromShape(l.shape)<2)e.gl.uniform1f(p,l.uniformValues[0]);else{let m=l.uniformValues;m instanceof Float32Array||(m=new Float32Array(m)),e.gl.uniform1fv(p,m)}return}l.texData.slice!=null&&d!=null&&e.gl.uniform1i(d,l.texData.slice.flatOffset),e.setInputMatrixTexture(l.texData.texture.texture,p,u)}});let i=t.outShapeLocation;if(i)switch(s.shape.length){case 1:e.gl.uniform1iv(i,new Int32Array(s.shape));break;case 2:e.gl.uniform2iv(i,new Int32Array(s.shape));break;case 3:e.gl.uniform3iv(i,new Int32Array(s.shape));break;case 4:e.gl.uniform4iv(i,new Int32Array(s.shape));break;default:break}if(t.outShapeStridesLocation){let l=v.computeStrides(s.shape);switch(s.shape.length){case 2:e.gl.uniform1iv(t.outShapeStridesLocation,new Int32Array(l));break;case 3:e.gl.uniform2iv(t.outShapeStridesLocation,new Int32Array(l));break;case 4:e.gl.uniform3iv(t.outShapeStridesLocation,new Int32Array(l));break;default:break}}t.outTexShapeLocation&&e.gl.uniform2i(t.outTexShapeLocation,s.texData.texShape[0],s.texData.texShape[1]),t.program.customUniforms&&r&&t.program.customUniforms.forEach((l,u)=>{let c=t.customUniformLocations[u],p=r[u];if(l.type==="float")e.gl.uniform1fv(c,p);else if(l.type==="vec2")e.gl.uniform2fv(c,p);else if(l.type==="vec3")e.gl.uniform3fv(c,p);else if(l.type==="vec4")e.gl.uniform4fv(c,p);else if(l.type==="int")e.gl.uniform1iv(c,p);else if(l.type==="ivec2")e.gl.uniform2iv(c,p);else if(l.type==="ivec3")e.gl.uniform3iv(c,p);else if(l.type==="ivec4")e.gl.uniform4iv(c,p);else throw Error(`uniform type ${l.type} is not supported yet.`)}),e.executeProgram()}function Ite(e,t,n){let s="";t.concat(n).forEach(o=>{let i=o.texData!=null&&o.texData.slice!=null&&o.texData.slice.flatOffset>0;if(e.enableShapeUniforms&&!o.isUniform){let l=o.texData.texShape,{useSqueezeShape:u,uniformShape:c,keptDims:p}=Ux(e.packedInputs,o.shape,l),d="",h="",f="";if(c.length===1&&e.packedInputs){let w=[Math.ceil(l[0]/2),Math.ceil(l[1]/2)];d=`${w[0]>1}_${w[1]>1}`}else if(c.length===2&&!e.packedInputs)h=`${c[0]>1}_${c[1]>1}`;else if(c.length>2&&!e.packedInputs){let w=v.computeStrides(c);f=`${w[0]===l[1]}_${w[w.length-1]===l[1]}`}let m=o.shape.length,g=c.length===2&&v.arraysEqual(o.shape,l),y=v.sizeFromShape(o.shape)===1,x=T.getBroadcastDims(o.shape,n.shape),A=!e.packedInputs&&m===n.shape.length&&v.arraysEqual(l,n.texData.texShape),b=e.packedInputs||c.length>2?"":`${l[0]>1}_${l[1]>1}`;s+=`${m}_${A}_${u?p:""}_${c.length}_${y}_${x}_${g}_${d}_${h}_${f}_${b}_${i}`}else{let l=o.isUniform?"uniform":o.texData.texShape;s+=`${o.shape}_${l}_${i}`}});let r=e.userCode,a=e.constructor.name;return a+="_"+s+"_"+r+`${U().getNumber("WEBGL_VERSION")}`,a}function ds(e){return U().getBool("WEBGL_USE_SHAPES_UNIFORMS")&&e<=4}var Cte=class{constructor(e){this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0,this.outPackingScheme=xp.DENSE,this.customUniforms=[{name:"texShape",type:"ivec2"}];let t=cs();this.outputShape=e,this.enableShapeUniforms=ds(this.outputShape.length),this.userCode=` ivec3 outCoordsFromFlatIndex(int index) { - ${this.enableShapeUniforms?$2(["r","c","d"],e):Au(["r","c","d"],e)} + ${this.enableShapeUniforms?u2(["r","c","d"],e):cu(["r","c","d"],e)} return ivec3(r, c, d); } @@ -1003,9 +1003,9 @@ vec2 packedUVfrom3D(int texNumR, int texNumC, ${t.output} = result; } - `}},qte=class{constructor(e){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outPackingScheme=Op.DENSE,this.customUniforms=[{name:"texShape",type:"ivec2"}];let t=hs();this.outputShape=e,this.enableShapeUniforms=fs(this.outputShape.length),this.userCode=` + `}},Tte=class{constructor(e){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outPackingScheme=xp.DENSE,this.customUniforms=[{name:"texShape",type:"ivec2"}];let t=cs();this.outputShape=e,this.enableShapeUniforms=ds(this.outputShape.length),this.userCode=` ivec3 outCoordsFromFlatIndex(int index) { - ${this.enableShapeUniforms?$2(["r","c","d"],e):Au(["r","c","d"],e)} + ${this.enableShapeUniforms?u2(["r","c","d"],e):cu(["r","c","d"],e)} return ivec3(r, c, d); } @@ -1023,23 +1023,23 @@ vec2 packedUVfrom3D(int texNumR, int texNumC, ${t.output} = result; } - `}},Xte=class{constructor(e){this.variableNames=["A"],this.outTexUsage=Qs.DOWNLOAD;let t=hs();this.outputShape=e,this.userCode=` - ${i9} + `}},Nte=class{constructor(e){this.variableNames=["A"],this.outTexUsage=Zs.DOWNLOAD;let t=cs();this.outputShape=e,this.userCode=` + ${jI} void main() { float x = getAAtOutCoords(); ${t.output} = encode_float(x); } - `}},Kte=class{constructor(e){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!1,this.outTexUsage=Qs.DOWNLOAD;let t=hs();this.outputShape=e,this.userCode=` - ${i9} + `}},Ete=class{constructor(e){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!1,this.outTexUsage=Zs.DOWNLOAD;let t=cs();this.outputShape=e,this.userCode=` + ${jI} void main() { ivec3 coords = getOutputCoords(); float x = getChannel(getAAtOutCoords(), vec2(coords.y, coords.z)); ${t.output} = encode_float(x); } - `}},Zte=class{constructor(e,t=!1){this.variableNames=["A"],this.customUniforms=[{name:"texShape",type:"ivec2"}];let n=hs();this.outputShape=e,this.enableShapeUniforms=fs(this.outputShape.length);let s="result";t&&(s="floor(result * 255. + 0.5)"),this.userCode=` - ${this.enableShapeUniforms?lb():ib(e)} + `}},Rte=class{constructor(e,t=!1){this.variableNames=["A"],this.customUniforms=[{name:"texShape",type:"ivec2"}];let n=cs();this.outputShape=e,this.enableShapeUniforms=ds(this.outputShape.length);let s="result";t&&(s="floor(result * 255. + 0.5)"),this.userCode=` + ${this.enableShapeUniforms?Vx():Wx(e)} void main() { ivec3 coords = getOutputCoords(); @@ -1068,7 +1068,7 @@ vec2 packedUVfrom3D(int texNumR, int texNumC, ${n.output} = vec4(${s}, 0., 0., 0.); } - `}},Yte=class{constructor(e,t=!1){this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0,this.customUniforms=[{name:"texShape",type:"ivec2"}];let n=hs();this.outputShape=e,this.enableShapeUniforms=fs(this.outputShape.length);let s="",r="result";t&&(r="floor(result * 255. + 0.5)");for(let a=0;a<=1;a++)for(let o=0;o<=1;o++){let i=a*2+o;s+=` + `}},_te=class{constructor(e,t=!1){this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0,this.customUniforms=[{name:"texShape",type:"ivec2"}];let n=cs();this.outputShape=e,this.enableShapeUniforms=ds(this.outputShape.length);let s="",r="result";t&&(r="floor(result * 255. + 0.5)");for(let a=0;a<=1;a++)for(let o=0;o<=1;o++){let i=a*2+o;s+=` localCoords = coords; if(localCoords[2] + ${o} < ${this.enableShapeUniforms?"outShape[2]":`${e[2]}`}) { localCoords[2] += ${o}; @@ -1097,7 +1097,7 @@ vec2 packedUVfrom3D(int texNumR, int texNumC, } } `}this.userCode=` - ${this.enableShapeUniforms?lb():ib(e)} + ${this.enableShapeUniforms?Vx():Wx(e)} void main() { ivec3 coords = getOutputCoords(); @@ -1112,7 +1112,7 @@ vec2 packedUVfrom3D(int texNumR, int texNumC, ${n.output} = ${r}; } - `}},p9={};qe(p9,{bindVertexProgramAttributeStreams:()=>v9,createBufferFromOutputTexture:()=>S9,createFloat16MatrixTexture:()=>y9,createFloat16PackedMatrixTexture:()=>b9,createFloat32MatrixTexture:()=>g9,createIndexBuffer:()=>m9,createPackedMatrixTexture:()=>x9,createUnsignedBytesMatrixTexture:()=>A9,createVertexBuffer:()=>f9,createVertexShader:()=>h9,downloadByteEncodedFloatMatrixFromOutputTexture:()=>C9,downloadFloat32MatrixFromBuffer:()=>I9,downloadMatrixFromPackedOutputTexture:()=>N9,downloadPackedMatrixFromBuffer:()=>T9,getInternalFormatForFloat16MatrixTexture:()=>db,getInternalFormatForFloat16PackedMatrixTexture:()=>fb,getInternalFormatForFloat32MatrixTexture:()=>cb,getInternalFormatForPackedMatrixTexture:()=>hb,getInternalFormatForUnsignedBytesMatrixTexture:()=>pb,uploadDenseMatrixToTexture:()=>w9,uploadPixelDataToTexture:()=>k9});function h9(e){let t=hs(),n=`${t.version} + `}},YI={};We(YI,{bindVertexProgramAttributeStreams:()=>o9,createBufferFromOutputTexture:()=>u9,createFloat16MatrixTexture:()=>n9,createFloat16PackedMatrixTexture:()=>a9,createFloat32MatrixTexture:()=>t9,createIndexBuffer:()=>e9,createPackedMatrixTexture:()=>r9,createUnsignedBytesMatrixTexture:()=>s9,createVertexBuffer:()=>QI,createVertexShader:()=>JI,downloadByteEncodedFloatMatrixFromOutputTexture:()=>d9,downloadFloat32MatrixFromBuffer:()=>c9,downloadMatrixFromPackedOutputTexture:()=>h9,downloadPackedMatrixFromBuffer:()=>p9,getInternalFormatForFloat16MatrixTexture:()=>Hx,getInternalFormatForFloat16PackedMatrixTexture:()=>Xx,getInternalFormatForFloat32MatrixTexture:()=>Gx,getInternalFormatForPackedMatrixTexture:()=>qx,getInternalFormatForUnsignedBytesMatrixTexture:()=>jx,uploadDenseMatrixToTexture:()=>i9,uploadPixelDataToTexture:()=>l9});function JI(e){let t=cs(),n=`${t.version} precision highp float; ${t.attribute} vec3 clipSpacePos; ${t.attribute} vec2 uv; @@ -1121,11 +1121,11 @@ vec2 packedUVfrom3D(int texNumR, int texNumC, void main() { gl_Position = vec4(clipSpacePos, 1); resultUV = uv; - }`;return LI(e,n)}function f9(e){let t=new Float32Array([-1,1,0,0,1,-1,-1,0,0,0,1,1,0,1,1,1,-1,0,1,0]);return UI(e,t)}function m9(e){let t=new Uint16Array([0,1,2,2,1,3]);return GI(e,t)}function Hh(e,t,n,s,r,a){jI(t,n);let o=HI(e),i=e.TEXTURE_2D;return Ie(e,()=>e.bindTexture(i,o)),Ie(e,()=>e.texParameteri(i,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE)),Ie(e,()=>e.texParameteri(i,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE)),Ie(e,()=>e.texParameteri(i,e.TEXTURE_MIN_FILTER,e.NEAREST)),Ie(e,()=>e.texParameteri(i,e.TEXTURE_MAG_FILTER,e.NEAREST)),H().getNumber("WEBGL_VERSION")===1?Ie(e,()=>e.texImage2D(i,0,s,t,n,0,r,a,null)):Ie(e,()=>e.texStorage2D(i,1,s,t,n)),Ie(e,()=>e.bindTexture(e.TEXTURE_2D,null)),{texture:o,texShape:[n,t]}}function cb(e){return e.internalFormatFloat}function g9(e,t,n,s){let[r,a]=Gh(t,n);return Hh(e,r,a,cb(s),s.textureFormatFloat,e.FLOAT)}function db(e){return e.internalFormatHalfFloat}function y9(e,t,n,s){let[r,a]=Gh(t,n);return Hh(e,r,a,db(s),s.textureFormatFloat,s.textureTypeHalfFloat)}function pb(e){return e.downloadTextureFormat}function A9(e,t,n,s){let[r,a]=Gh(t,n);return Hh(e,r,a,pb(s),e.RGBA,e.UNSIGNED_BYTE)}function hb(e){return e.internalFormatPackedFloat}function x9(e,t,n,s){let[r,a]=pd(t,n);return Hh(e,r,a,hb(s),e.RGBA,e.FLOAT)}function fb(e){return e.internalFormatPackedHalfFloat}function b9(e,t,n,s){let[r,a]=pd(t,n);return Hh(e,r,a,fb(s),e.RGBA,s.textureTypeHalfFloat)}function v9(e,t,n){return Ie(e,()=>e.bindBuffer(e.ARRAY_BUFFER,n)),by(e,t,"clipSpacePos",n,3,20,0)&&by(e,t,"uv",n,2,20,12)}function w9(e,t,n,s,r,a){Ie(e,()=>e.bindTexture(e.TEXTURE_2D,t));let o,i,l;r instanceof Uint8Array?(o=new Uint8Array(n*s*4),i=e.UNSIGNED_BYTE,l=e.RGBA):(o=new Float32Array(n*s*4),i=e.FLOAT,l=a.internalFormatPackedFloat),o.set(r),H().getNumber("WEBGL_VERSION")===2?Ie(e,()=>e.texSubImage2D(e.TEXTURE_2D,0,0,0,n,s,e.RGBA,i,o)):Ie(e,()=>e.texImage2D(e.TEXTURE_2D,0,l,n,s,0,e.RGBA,i,o)),Ie(e,()=>e.bindTexture(e.TEXTURE_2D,null))}function k9(e,t,n){Ie(e,()=>e.bindTexture(e.TEXTURE_2D,t)),n.data instanceof Uint8Array?H().getNumber("WEBGL_VERSION")===2?Ie(e,()=>e.texSubImage2D(e.TEXTURE_2D,0,0,0,n.width,n.height,e.RGBA,e.UNSIGNED_BYTE,n.data)):Ie(e,()=>e.texImage2D(e.TEXTURE_2D,0,e.RGBA,n.width,n.height,0,e.RGBA,e.UNSIGNED_BYTE,n.data)):H().getNumber("WEBGL_VERSION")===2?Ie(e,()=>e.texSubImage2D(e.TEXTURE_2D,0,0,0,e.RGBA,e.UNSIGNED_BYTE,n)):Ie(e,()=>e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,n)),Ie(e,()=>e.bindTexture(e.TEXTURE_2D,null))}function S9(e,t,n,s){let r=e.createBuffer();Ie(e,()=>e.bindBuffer(e.PIXEL_PACK_BUFFER,r));let i=4*4*t*n;return Ie(e,()=>e.bufferData(e.PIXEL_PACK_BUFFER,i,e.STREAM_READ)),Ie(e,()=>e.readPixels(0,0,n,t,e.RGBA,e.FLOAT,0)),Ie(e,()=>e.bindBuffer(e.PIXEL_PACK_BUFFER,null)),r}function I9(e,t,n){let s=e,r=new Float32Array(n);return s.bindBuffer(s.PIXEL_PACK_BUFFER,t),s.getBufferSubData(s.PIXEL_PACK_BUFFER,0,r),s.bindBuffer(s.PIXEL_PACK_BUFFER,null),r}function C9(e,t,n,s){let[r,a]=Gh(t,n),o=4,i=new Uint8Array(qee(t*n,o));return Ie(e,()=>e.readPixels(0,0,r,a,s.downloadTextureFormat,e.UNSIGNED_BYTE,i)),new Float32Array(i.buffer)}function T9(e,t,n,s,r,a,o,i){let l=e,u=new Float32Array(Xee(a,o));return l.bindBuffer(l.PIXEL_PACK_BUFFER,t),l.getBufferSubData(l.PIXEL_PACK_BUFFER,0,u),l.bindBuffer(l.PIXEL_PACK_BUFFER,null),u}function N9(e,t,n){let s=new Float32Array(t*n*4);return Ie(e,()=>e.readPixels(0,0,n,t,e.RGBA,e.FLOAT,s)),s}var lc=class{constructor(e){this.outputTexture=null,this.program=null,this.disposed=!1,this.vertexAttrsAreBound=!1,this.itemsToPoll=[];let t=H().getNumber("WEBGL_VERSION");e!=null?(this.gl=e,D2(t,e)):this.gl=Ur(t);let n="WEBGL_color_buffer_float",s="EXT_color_buffer_half_float";if(this.parallelCompilationExtension=this.gl.getExtension("KHR_parallel_shader_compile"),H().getNumber("WEBGL_VERSION")===1){let r="OES_texture_float",a="OES_texture_half_float";if(this.textureFloatExtension=fp(this.gl,r),er(this.gl,a))this.textureHalfFloatExtension=fp(this.gl,a);else if(H().get("WEBGL_FORCE_F16_TEXTURES"))throw new Error("GL context does not support half float textures, yet the environment flag WEBGL_FORCE_F16_TEXTURES is set to true.");if(this.colorBufferFloatExtension=this.gl.getExtension(n),er(this.gl,s))this.colorBufferHalfFloatExtension=fp(this.gl,s);else if(H().get("WEBGL_FORCE_F16_TEXTURES"))throw new Error("GL context does not support color renderable half floats, yet the environment flag WEBGL_FORCE_F16_TEXTURES is set to true.")}else if(n="EXT_color_buffer_float",er(this.gl,n))this.colorBufferFloatExtension=this.gl.getExtension(n);else if(er(this.gl,s))this.colorBufferHalfFloatExtension=this.gl.getExtension(s);else throw new Error("GL context does not support color renderable floats");this.vertexBuffer=f9(this.gl),this.indexBuffer=m9(this.gl),this.framebuffer=qI(this.gl),this.textureConfig=ab(this.gl,this.textureHalfFloatExtension)}get debug(){return H().getBool("DEBUG")}dispose(){if(this.disposed)return;this.program!=null&&console.warn("Disposing a GPGPUContext that still has a bound WebGLProgram. This is probably a resource leak, delete the program with GPGPUContext.deleteProgram before disposing."),this.outputTexture!=null&&console.warn("Disposing a GPGPUContext that still has a bound output matrix texture. This is probably a resource leak, delete the output matrix texture with GPGPUContext.deleteMatrixTexture before disposing.");let e=this.gl;Ie(e,()=>e.finish()),Ie(e,()=>e.bindFramebuffer(e.FRAMEBUFFER,null)),Ie(e,()=>e.deleteFramebuffer(this.framebuffer)),Ie(e,()=>e.bindBuffer(e.ARRAY_BUFFER,null)),Ie(e,()=>e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,null)),Ie(e,()=>e.deleteBuffer(this.indexBuffer)),this.disposed=!0}createFloat32MatrixTexture(e,t){return this.throwIfDisposed(),g9(this.gl,e,t,this.textureConfig)}createFloat16MatrixTexture(e,t){return this.throwIfDisposed(),y9(this.gl,e,t,this.textureConfig)}createUnsignedBytesMatrixTexture(e,t){return this.throwIfDisposed(),A9(this.gl,e,t,this.textureConfig)}uploadPixelDataToTexture(e,t){this.throwIfDisposed(),k9(this.gl,e,t)}uploadDenseMatrixToTexture(e,t,n,s){this.throwIfDisposed(),w9(this.gl,e,t,n,s,this.textureConfig)}createFloat16PackedMatrixTexture(e,t){return this.throwIfDisposed(),b9(this.gl,e,t,this.textureConfig)}createPackedMatrixTexture(e,t){return this.throwIfDisposed(),x9(this.gl,e,t,this.textureConfig)}deleteMatrixTexture(e){this.throwIfDisposed(),this.outputTexture===e&&(vy(this.gl,this.framebuffer),this.outputTexture=null),Ie(this.gl,()=>this.gl.deleteTexture(e))}downloadByteEncodedFloatMatrixFromOutputTexture(e,t,n){return this.downloadMatrixDriver(e,()=>C9(this.gl,t,n,this.textureConfig))}downloadPackedMatrixFromBuffer(e,t,n,s,r,a){return T9(this.gl,e,t,n,s,r,a,this.textureConfig)}downloadFloat32MatrixFromBuffer(e,t){return I9(this.gl,e,t)}createBufferFromTexture(e,t,n){this.bindTextureToFrameBuffer(e);let s=S9(this.gl,t,n,this.textureConfig);return this.unbindTextureToFrameBuffer(),s}createAndWaitForFence(){let e=this.createFence(this.gl);return this.pollFence(e)}createFence(e){let t,n;if(H().getBool("WEBGL_FENCE_API_ENABLED")){let s=e,r=s.fenceSync(s.SYNC_GPU_COMMANDS_COMPLETE,0);e.flush(),n=()=>{let a=s.clientWaitSync(r,0,0);return a===s.ALREADY_SIGNALED||a===s.CONDITION_SATISFIED},t=r}else H().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")>0?(t=this.beginQuery(),this.endQuery(),n=()=>this.isQueryAvailable(t,H().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"))):n=()=>!0;return{query:t,isFencePassed:n}}downloadMatrixFromPackedTexture(e,t,n){return this.downloadMatrixDriver(e,()=>N9(this.gl,t,n))}createProgram(e){this.throwIfDisposed();let t=this.gl;this.vertexShader==null&&(this.vertexShader=h9(t));let n=WI(t);return Ie(t,()=>t.attachShader(n,this.vertexShader)),Ie(t,()=>t.attachShader(n,e)),VI(t,n),this.debug&&fm(t,n),this.vertexAttrsAreBound||(this.setProgram(n),this.vertexAttrsAreBound=v9(t,this.program,this.vertexBuffer)),n}deleteProgram(e){this.throwIfDisposed(),e===this.program&&(this.program=null),e!=null&&Ie(this.gl,()=>this.gl.deleteProgram(e))}setProgram(e){this.throwIfDisposed(),this.program=e,this.program!=null&&this.debug&&fm(this.gl,this.program),Ie(this.gl,()=>this.gl.useProgram(e))}getUniformLocation(e,t,n=!0){return this.throwIfDisposed(),n?KI(this.gl,e,t):ZI(this.gl,e,t)}getAttributeLocation(e,t){return this.throwIfDisposed(),Ie(this.gl,()=>this.gl.getAttribLocation(e,t))}getUniformLocationNoThrow(e,t){return this.throwIfDisposed(),this.gl.getUniformLocation(e,t)}setInputMatrixTexture(e,t,n){this.throwIfDisposed(),this.throwIfNoProgram(),YI(this.gl,e,t,n)}setOutputMatrixTexture(e,t,n){this.setOutputMatrixTextureDriver(e,n,t)}setOutputPackedMatrixTexture(e,t,n){this.throwIfDisposed();let[s,r]=pd(t,n);this.setOutputMatrixTextureDriver(e,s,r)}setOutputMatrixWriteRegion(e,t,n,s){this.setOutputMatrixWriteRegionDriver(n,e,s,t)}setOutputPackedMatrixWriteRegion(e,t,n,s){throw new Error("setOutputPackedMatrixWriteRegion not implemented.")}debugValidate(){this.program!=null&&fm(this.gl,this.program),mp(this.gl)}executeProgram(){this.throwIfDisposed(),this.throwIfNoProgram();let e=this.gl;this.debug&&this.debugValidate(),Ie(e,()=>e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0))}blockUntilAllProgramsCompleted(){this.throwIfDisposed(),Ie(this.gl,()=>this.gl.finish())}getQueryTimerExtension(){return this.disjointQueryTimerExtension==null&&(this.disjointQueryTimerExtension=fp(this.gl,H().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")===2?"EXT_disjoint_timer_query_webgl2":"EXT_disjoint_timer_query")),this.disjointQueryTimerExtension}getQueryTimerExtensionWebGL2(){return this.getQueryTimerExtension()}getQueryTimerExtensionWebGL1(){return this.getQueryTimerExtension()}beginQuery(){if(H().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")===2){let n=this.gl,s=this.getQueryTimerExtensionWebGL2(),r=n.createQuery();return n.beginQuery(s.TIME_ELAPSED_EXT,r),r}let e=this.getQueryTimerExtensionWebGL1(),t=e.createQueryEXT();return e.beginQueryEXT(e.TIME_ELAPSED_EXT,t),t}endQuery(){if(H().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")===2){let t=this.gl,n=this.getQueryTimerExtensionWebGL2();t.endQuery(n.TIME_ELAPSED_EXT);return}let e=this.getQueryTimerExtensionWebGL1();e.endQueryEXT(e.TIME_ELAPSED_EXT)}async waitForQueryAndGetTime(e){return await v.repeatedTry(()=>this.disposed||this.isQueryAvailable(e,H().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"))),this.getQueryTime(e,H().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"))}getQueryTime(e,t){if(t===0)return null;if(t===2){let n=this.gl;return n.getQueryParameter(e,n.QUERY_RESULT)/1e6}else{let n=this.getQueryTimerExtensionWebGL1();return n.getQueryObjectEXT(e,n.QUERY_RESULT_EXT)/1e6}}isQueryAvailable(e,t){if(t===0)return!0;if(t===2){let n=this.gl,s=this.getQueryTimerExtensionWebGL2(),r=n.getQueryParameter(e,n.QUERY_RESULT_AVAILABLE);return this.disjoint==null&&(this.disjoint=this.gl.getParameter(s.GPU_DISJOINT_EXT)),r&&!this.disjoint}else{let n=this.getQueryTimerExtensionWebGL1(),s=n.getQueryObjectEXT(e,n.QUERY_RESULT_AVAILABLE_EXT);return this.disjoint==null&&(this.disjoint=this.gl.getParameter(n.GPU_DISJOINT_EXT)),s&&!this.disjoint}}pollFence(e){return new Promise(t=>{this.addItemToPoll(()=>e.isFencePassed(),()=>t())})}pollItems(){let e=Jte(this.itemsToPoll.map(t=>t.isDoneFn));for(let t=0;t<=e;++t){let{resolveFn:n}=this.itemsToPoll[t];n()}this.itemsToPoll=this.itemsToPoll.slice(e+1)}addItemToPoll(e,t){this.itemsToPoll.push({isDoneFn:e,resolveFn:t}),!(this.itemsToPoll.length>1)&&v.repeatedTry(()=>(this.pollItems(),this.itemsToPoll.length===0))}bindTextureToFrameBuffer(e){this.throwIfDisposed(),mm(this.gl,e,this.framebuffer),this.debug&&mp(this.gl)}unbindTextureToFrameBuffer(){this.outputTexture!=null?(mm(this.gl,this.outputTexture,this.framebuffer),this.debug&&mp(this.gl)):vy(this.gl,this.framebuffer)}downloadMatrixDriver(e,t){this.bindTextureToFrameBuffer(e);let n=t();return this.unbindTextureToFrameBuffer(),n}setOutputMatrixTextureDriver(e,t,n){this.throwIfDisposed();let s=this.gl;mm(s,e,this.framebuffer),this.debug&&mp(s),this.outputTexture=e,Ie(s,()=>s.viewport(0,0,t,n)),Ie(s,()=>s.scissor(0,0,t,n))}setOutputMatrixWriteRegionDriver(e,t,n,s){this.throwIfDisposed(),Ie(this.gl,()=>this.gl.scissor(e,t,n,s))}throwIfDisposed(){if(this.disposed)throw new Error("Attempted to use disposed GPGPUContext.")}throwIfNoProgram(){if(this.program==null)throw new Error("No GPU program is currently set.")}};function Jte(e){let t=0;for(;t`${e}.${n}`)}function us(e,t){return t===1?[e]:D9(e,t)}function Bne(e,t){if(e===1)return"rc";let n="";for(let s=0;se.bindTexture(i,o)),we(e,()=>e.texParameteri(i,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE)),we(e,()=>e.texParameteri(i,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE)),we(e,()=>e.texParameteri(i,e.TEXTURE_MIN_FILTER,e.NEAREST)),we(e,()=>e.texParameteri(i,e.TEXTURE_MAG_FILTER,e.NEAREST)),U().getNumber("WEBGL_VERSION")===1?we(e,()=>e.texImage2D(i,0,s,t,n,0,r,a,null)):we(e,()=>e.texStorage2D(i,1,s,t,n)),we(e,()=>e.bindTexture(e.TEXTURE_2D,null)),{texture:o,texShape:[n,t]}}function Gx(e){return e.internalFormatFloat}function t9(e,t,n,s){let[r,a]=Nh(t,n);return Eh(e,r,a,Gx(s),s.textureFormatFloat,e.FLOAT)}function Hx(e){return e.internalFormatHalfFloat}function n9(e,t,n,s){let[r,a]=Nh(t,n);return Eh(e,r,a,Hx(s),s.textureFormatFloat,s.textureTypeHalfFloat)}function jx(e){return e.downloadTextureFormat}function s9(e,t,n,s){let[r,a]=Nh(t,n);return Eh(e,r,a,jx(s),e.RGBA,e.UNSIGNED_BYTE)}function qx(e){return e.internalFormatPackedFloat}function r9(e,t,n,s){let[r,a]=ed(t,n);return Eh(e,r,a,qx(s),e.RGBA,e.FLOAT)}function Xx(e){return e.internalFormatPackedHalfFloat}function a9(e,t,n,s){let[r,a]=ed(t,n);return Eh(e,r,a,Xx(s),e.RGBA,s.textureTypeHalfFloat)}function o9(e,t,n){return we(e,()=>e.bindBuffer(e.ARRAY_BUFFER,n)),Q3(e,t,"clipSpacePos",n,3,20,0)&&Q3(e,t,"uv",n,2,20,12)}function i9(e,t,n,s,r,a){we(e,()=>e.bindTexture(e.TEXTURE_2D,t));let o,i,l;r instanceof Uint8Array?(o=new Uint8Array(n*s*4),i=e.UNSIGNED_BYTE,l=e.RGBA):(o=new Float32Array(n*s*4),i=e.FLOAT,l=a.internalFormatPackedFloat),o.set(r),U().getNumber("WEBGL_VERSION")===2?we(e,()=>e.texSubImage2D(e.TEXTURE_2D,0,0,0,n,s,e.RGBA,i,o)):we(e,()=>e.texImage2D(e.TEXTURE_2D,0,l,n,s,0,e.RGBA,i,o)),we(e,()=>e.bindTexture(e.TEXTURE_2D,null))}function l9(e,t,n){we(e,()=>e.bindTexture(e.TEXTURE_2D,t)),n.data instanceof Uint8Array?U().getNumber("WEBGL_VERSION")===2?we(e,()=>e.texSubImage2D(e.TEXTURE_2D,0,0,0,n.width,n.height,e.RGBA,e.UNSIGNED_BYTE,n.data)):we(e,()=>e.texImage2D(e.TEXTURE_2D,0,e.RGBA,n.width,n.height,0,e.RGBA,e.UNSIGNED_BYTE,n.data)):U().getNumber("WEBGL_VERSION")===2?we(e,()=>e.texSubImage2D(e.TEXTURE_2D,0,0,0,e.RGBA,e.UNSIGNED_BYTE,n)):we(e,()=>e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,n)),we(e,()=>e.bindTexture(e.TEXTURE_2D,null))}function u9(e,t,n,s){let r=e.createBuffer();we(e,()=>e.bindBuffer(e.PIXEL_PACK_BUFFER,r));let i=4*4*t*n;return we(e,()=>e.bufferData(e.PIXEL_PACK_BUFFER,i,e.STREAM_READ)),we(e,()=>e.readPixels(0,0,n,t,e.RGBA,e.FLOAT,0)),we(e,()=>e.bindBuffer(e.PIXEL_PACK_BUFFER,null)),r}function c9(e,t,n){let s=e,r=new Float32Array(n);return s.bindBuffer(s.PIXEL_PACK_BUFFER,t),s.getBufferSubData(s.PIXEL_PACK_BUFFER,0,r),s.bindBuffer(s.PIXEL_PACK_BUFFER,null),r}function d9(e,t,n,s){let[r,a]=Nh(t,n),o=4,i=new Uint8Array(Tee(t*n,o));return we(e,()=>e.readPixels(0,0,r,a,s.downloadTextureFormat,e.UNSIGNED_BYTE,i)),new Float32Array(i.buffer)}function p9(e,t,n,s,r,a,o,i){let l=e,u=new Float32Array(Nee(a,o));return l.bindBuffer(l.PIXEL_PACK_BUFFER,t),l.getBufferSubData(l.PIXEL_PACK_BUFFER,0,u),l.bindBuffer(l.PIXEL_PACK_BUFFER,null),u}function h9(e,t,n){let s=new Float32Array(t*n*4);return we(e,()=>e.readPixels(0,0,n,t,e.RGBA,e.FLOAT,s)),s}var Zu=class{constructor(e){this.outputTexture=null,this.program=null,this.disposed=!1,this.vertexAttrsAreBound=!1,this.itemsToPoll=[];let t=U().getNumber("WEBGL_VERSION");e!=null?(this.gl=e,l2(t,e)):this.gl=Mr(t);let n="WEBGL_color_buffer_float",s="EXT_color_buffer_half_float";if(this.parallelCompilationExtension=this.gl.getExtension("KHR_parallel_shader_compile"),U().getNumber("WEBGL_VERSION")===1){let r="OES_texture_float",a="OES_texture_half_float";if(this.textureFloatExtension=Yd(this.gl,r),Ys(this.gl,a))this.textureHalfFloatExtension=Yd(this.gl,a);else if(U().get("WEBGL_FORCE_F16_TEXTURES"))throw new Error("GL context does not support half float textures, yet the environment flag WEBGL_FORCE_F16_TEXTURES is set to true.");if(this.colorBufferFloatExtension=this.gl.getExtension(n),Ys(this.gl,s))this.colorBufferHalfFloatExtension=Yd(this.gl,s);else if(U().get("WEBGL_FORCE_F16_TEXTURES"))throw new Error("GL context does not support color renderable half floats, yet the environment flag WEBGL_FORCE_F16_TEXTURES is set to true.")}else if(n="EXT_color_buffer_float",Ys(this.gl,n))this.colorBufferFloatExtension=this.gl.getExtension(n);else if(Ys(this.gl,s))this.colorBufferHalfFloatExtension=this.gl.getExtension(s);else throw new Error("GL context does not support color renderable floats");this.vertexBuffer=QI(this.gl),this.indexBuffer=e9(this.gl),this.framebuffer=DI(this.gl),this.textureConfig=Lx(this.gl,this.textureHalfFloatExtension)}get debug(){return U().getBool("DEBUG")}dispose(){if(this.disposed)return;this.program!=null&&console.warn("Disposing a GPGPUContext that still has a bound WebGLProgram. This is probably a resource leak, delete the program with GPGPUContext.deleteProgram before disposing."),this.outputTexture!=null&&console.warn("Disposing a GPGPUContext that still has a bound output matrix texture. This is probably a resource leak, delete the output matrix texture with GPGPUContext.deleteMatrixTexture before disposing.");let e=this.gl;we(e,()=>e.finish()),we(e,()=>e.bindFramebuffer(e.FRAMEBUFFER,null)),we(e,()=>e.deleteFramebuffer(this.framebuffer)),we(e,()=>e.bindBuffer(e.ARRAY_BUFFER,null)),we(e,()=>e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,null)),we(e,()=>e.deleteBuffer(this.indexBuffer)),this.disposed=!0}createFloat32MatrixTexture(e,t){return this.throwIfDisposed(),t9(this.gl,e,t,this.textureConfig)}createFloat16MatrixTexture(e,t){return this.throwIfDisposed(),n9(this.gl,e,t,this.textureConfig)}createUnsignedBytesMatrixTexture(e,t){return this.throwIfDisposed(),s9(this.gl,e,t,this.textureConfig)}uploadPixelDataToTexture(e,t){this.throwIfDisposed(),l9(this.gl,e,t)}uploadDenseMatrixToTexture(e,t,n,s){this.throwIfDisposed(),i9(this.gl,e,t,n,s,this.textureConfig)}createFloat16PackedMatrixTexture(e,t){return this.throwIfDisposed(),a9(this.gl,e,t,this.textureConfig)}createPackedMatrixTexture(e,t){return this.throwIfDisposed(),r9(this.gl,e,t,this.textureConfig)}deleteMatrixTexture(e){this.throwIfDisposed(),this.outputTexture===e&&(ey(this.gl,this.framebuffer),this.outputTexture=null),we(this.gl,()=>this.gl.deleteTexture(e))}downloadByteEncodedFloatMatrixFromOutputTexture(e,t,n){return this.downloadMatrixDriver(e,()=>d9(this.gl,t,n,this.textureConfig))}downloadPackedMatrixFromBuffer(e,t,n,s,r,a){return p9(this.gl,e,t,n,s,r,a,this.textureConfig)}downloadFloat32MatrixFromBuffer(e,t){return c9(this.gl,e,t)}createBufferFromTexture(e,t,n){this.bindTextureToFrameBuffer(e);let s=u9(this.gl,t,n,this.textureConfig);return this.unbindTextureToFrameBuffer(),s}createAndWaitForFence(){let e=this.createFence(this.gl);return this.pollFence(e)}createFence(e){let t,n;if(U().getBool("WEBGL_FENCE_API_ENABLED")){let s=e,r=s.fenceSync(s.SYNC_GPU_COMMANDS_COMPLETE,0);e.flush(),n=()=>{let a=s.clientWaitSync(r,0,0);return a===s.ALREADY_SIGNALED||a===s.CONDITION_SATISFIED},t=r}else U().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")>0?(t=this.beginQuery(),this.endQuery(),n=()=>this.isQueryAvailable(t,U().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"))):n=()=>!0;return{query:t,isFencePassed:n}}downloadMatrixFromPackedTexture(e,t,n){return this.downloadMatrixDriver(e,()=>h9(this.gl,t,n))}createProgram(e){this.throwIfDisposed();let t=this.gl;this.vertexShader==null&&(this.vertexShader=JI(t));let n=CI(t);return we(t,()=>t.attachShader(n,this.vertexShader)),we(t,()=>t.attachShader(n,e)),TI(t,n),this.debug&&Hf(t,n),this.vertexAttrsAreBound||(this.setProgram(n),this.vertexAttrsAreBound=o9(t,this.program,this.vertexBuffer)),n}deleteProgram(e){this.throwIfDisposed(),e===this.program&&(this.program=null),e!=null&&we(this.gl,()=>this.gl.deleteProgram(e))}setProgram(e){this.throwIfDisposed(),this.program=e,this.program!=null&&this.debug&&Hf(this.gl,this.program),we(this.gl,()=>this.gl.useProgram(e))}getUniformLocation(e,t,n=!0){return this.throwIfDisposed(),n?PI(this.gl,e,t):FI(this.gl,e,t)}getAttributeLocation(e,t){return this.throwIfDisposed(),we(this.gl,()=>this.gl.getAttribLocation(e,t))}getUniformLocationNoThrow(e,t){return this.throwIfDisposed(),this.gl.getUniformLocation(e,t)}setInputMatrixTexture(e,t,n){this.throwIfDisposed(),this.throwIfNoProgram(),OI(this.gl,e,t,n)}setOutputMatrixTexture(e,t,n){this.setOutputMatrixTextureDriver(e,n,t)}setOutputPackedMatrixTexture(e,t,n){this.throwIfDisposed();let[s,r]=ed(t,n);this.setOutputMatrixTextureDriver(e,s,r)}setOutputMatrixWriteRegion(e,t,n,s){this.setOutputMatrixWriteRegionDriver(n,e,s,t)}setOutputPackedMatrixWriteRegion(e,t,n,s){throw new Error("setOutputPackedMatrixWriteRegion not implemented.")}debugValidate(){this.program!=null&&Hf(this.gl,this.program),Jd(this.gl)}executeProgram(){this.throwIfDisposed(),this.throwIfNoProgram();let e=this.gl;this.debug&&this.debugValidate(),we(e,()=>e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0))}blockUntilAllProgramsCompleted(){this.throwIfDisposed(),we(this.gl,()=>this.gl.finish())}getQueryTimerExtension(){return this.disjointQueryTimerExtension==null&&(this.disjointQueryTimerExtension=Yd(this.gl,U().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")===2?"EXT_disjoint_timer_query_webgl2":"EXT_disjoint_timer_query")),this.disjointQueryTimerExtension}getQueryTimerExtensionWebGL2(){return this.getQueryTimerExtension()}getQueryTimerExtensionWebGL1(){return this.getQueryTimerExtension()}beginQuery(){if(U().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")===2){let n=this.gl,s=this.getQueryTimerExtensionWebGL2(),r=n.createQuery();return n.beginQuery(s.TIME_ELAPSED_EXT,r),r}let e=this.getQueryTimerExtensionWebGL1(),t=e.createQueryEXT();return e.beginQueryEXT(e.TIME_ELAPSED_EXT,t),t}endQuery(){if(U().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")===2){let t=this.gl,n=this.getQueryTimerExtensionWebGL2();t.endQuery(n.TIME_ELAPSED_EXT);return}let e=this.getQueryTimerExtensionWebGL1();e.endQueryEXT(e.TIME_ELAPSED_EXT)}async waitForQueryAndGetTime(e){return await v.repeatedTry(()=>this.disposed||this.isQueryAvailable(e,U().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"))),this.getQueryTime(e,U().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"))}getQueryTime(e,t){if(t===0)return null;if(t===2){let n=this.gl;return n.getQueryParameter(e,n.QUERY_RESULT)/1e6}else{let n=this.getQueryTimerExtensionWebGL1();return n.getQueryObjectEXT(e,n.QUERY_RESULT_EXT)/1e6}}isQueryAvailable(e,t){if(t===0)return!0;if(t===2){let n=this.gl,s=this.getQueryTimerExtensionWebGL2(),r=n.getQueryParameter(e,n.QUERY_RESULT_AVAILABLE);return this.disjoint==null&&(this.disjoint=this.gl.getParameter(s.GPU_DISJOINT_EXT)),r&&!this.disjoint}else{let n=this.getQueryTimerExtensionWebGL1(),s=n.getQueryObjectEXT(e,n.QUERY_RESULT_AVAILABLE_EXT);return this.disjoint==null&&(this.disjoint=this.gl.getParameter(n.GPU_DISJOINT_EXT)),s&&!this.disjoint}}pollFence(e){return new Promise(t=>{this.addItemToPoll(()=>e.isFencePassed(),()=>t())})}pollItems(){let e=Dte(this.itemsToPoll.map(t=>t.isDoneFn));for(let t=0;t<=e;++t){let{resolveFn:n}=this.itemsToPoll[t];n()}this.itemsToPoll=this.itemsToPoll.slice(e+1)}addItemToPoll(e,t){if(this.itemsToPoll.push({isDoneFn:e,resolveFn:t}),this.itemsToPoll.length>1)return;let n;"setTimeoutCustom"in U().platform&&(n=U().platform.setTimeoutCustom.bind(U().platform)),v.repeatedTry(()=>(this.pollItems(),this.itemsToPoll.length===0),()=>0,null,n)}bindTextureToFrameBuffer(e){this.throwIfDisposed(),jf(this.gl,e,this.framebuffer),this.debug&&Jd(this.gl)}unbindTextureToFrameBuffer(){this.outputTexture!=null?(jf(this.gl,this.outputTexture,this.framebuffer),this.debug&&Jd(this.gl)):ey(this.gl,this.framebuffer)}downloadMatrixDriver(e,t){this.bindTextureToFrameBuffer(e);let n=t();return this.unbindTextureToFrameBuffer(),n}setOutputMatrixTextureDriver(e,t,n){this.throwIfDisposed();let s=this.gl;jf(s,e,this.framebuffer),this.debug&&Jd(s),this.outputTexture=e,we(s,()=>s.viewport(0,0,t,n)),we(s,()=>s.scissor(0,0,t,n))}setOutputMatrixWriteRegionDriver(e,t,n,s){this.throwIfDisposed(),we(this.gl,()=>this.gl.scissor(e,t,n,s))}throwIfDisposed(){if(this.disposed)throw new Error("Attempted to use disposed GPGPUContext.")}throwIfNoProgram(){if(this.program==null)throw new Error("No GPU program is currently set.")}};function Dte(e){let t=0;for(;t`${e}.${n}`)}function os(e,t){return t===1?[e]:y9(e,t)}function vne(e,t){if(e===1)return"rc";let n="";for(let s=0;s= ${this.enableShapeUniforms?"outShape":this.outputShape[0]} ? 0. : getA(rc + 1)), 0, 0`:`getA(${t[0]}), cEdge ? 0. : getA(${t[1]}), rEdge ? 0. : getA(${t[2]}), - rEdge || cEdge ? 0. : getA(${t[3]})`}},$9=class{constructor(e,t){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.customUniforms=[{name:"inputShape",type:"ivec3"}],this.outputShape=e,this.enableShapeUniforms=fs(this.outputShape.length);let n="";for(let s=0;s<4;s++){let r="thisRC = rc;";s%2===1&&(r+="thisRC.z += 1;"),s>1&&(r+="thisRC.y += 1;"),n+=` + rEdge || cEdge ? 0. : getA(${t[3]})`}},A9=class{constructor(e,t){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.customUniforms=[{name:"inputShape",type:"ivec3"}],this.outputShape=e,this.enableShapeUniforms=ds(this.outputShape.length);let n="";for(let s=0;s<4;s++){let r="thisRC = rc;";s%2===1&&(r+="thisRC.z += 1;"),s>1&&(r+="thisRC.y += 1;"),n+=` ${r} ${s>0?"if(thisRC.y < rows && thisRC.z < cols){":""} int flatIndex = getFlatIndex(thisRC); @@ -1160,8 +1160,8 @@ vec2 packedUVfrom3D(int texNumR, int texNumC, getChannel(getA(inputRC.x, inputRC.y, inputRC.z), inputRCInnerDims); ${s>0?"}":""} `}this.userCode=` - ${Vne(t,this.enableShapeUniforms)} - ${this.enableShapeUniforms?lb():ib(e)} + ${kne(t,this.enableShapeUniforms)} + ${this.enableShapeUniforms?Vx():Wx(e)} void main() { ivec3 rc = getOutputCoords(); @@ -1176,12 +1176,12 @@ vec2 packedUVfrom3D(int texNumR, int texNumC, setOutput(result); } - `}};function Vne(e,t){return` + `}};function kne(e,t){return` ivec3 inputCoordsFromReshapedOutCoords(int index) { - ${t?ote(["r","c","d"],"inputShape"):Au(["r","c","d"],e)} + ${t?Bee(["r","c","d"],"inputShape"):cu(["r","c","d"],e)} return ivec3(r, c, d); } - `}var Une=class{constructor(e){this.gpgpu=e,this.numUsedTextures=0,this.numFreeTextures=0,this._numBytesAllocated=0,this._numBytesFree=0,this.freeTextures={},this.logEnabled=!1,this.usedTextures={}}acquireTexture(e,t,n){let s=M7(t,n),r=z7(e,s,n);r in this.freeTextures||(this.freeTextures[r]=[]),r in this.usedTextures||(this.usedTextures[r]=[]);let a=O7(e,s,this.gpgpu.gl,this.gpgpu.textureConfig,n);if(this.freeTextures[r].length>0){this.numFreeTextures--,this.numUsedTextures++,this._numBytesFree-=a,this.log();let i=this.freeTextures[r].shift();return this.usedTextures[r].push(i),i}let o;return s===Fn.PACKED_2X2_FLOAT32?o=this.gpgpu.createPackedMatrixTexture(e[0],e[1]):s===Fn.PACKED_2X2_FLOAT16?o=this.gpgpu.createFloat16PackedMatrixTexture(e[0],e[1]):s===Fn.UNPACKED_FLOAT32?o=this.gpgpu.createFloat32MatrixTexture(e[0],e[1]):s===Fn.UNPACKED_FLOAT16?o=this.gpgpu.createFloat16MatrixTexture(e[0],e[1]):s===Fn.PACKED_4X1_UNSIGNED_BYTE&&(o=this.gpgpu.createUnsignedBytesMatrixTexture(e[0],e[1])),this.usedTextures[r].push(o),this.numUsedTextures++,this._numBytesAllocated+=a,this.log(),o}releaseTexture(e,t,n,s){if(this.freeTextures==null)return;let r=M7(n,s),a=z7(t,r,s);a in this.freeTextures||(this.freeTextures[a]=[]);let o=O7(t,r,this.gpgpu.gl,this.gpgpu.textureConfig,s),i=H().get("WEBGL_DELETE_TEXTURE_THRESHOLD");i!==-1&&this._numBytesAllocated>i?(this.gpgpu.deleteMatrixTexture(e.texture),this._numBytesAllocated-=o):(this.freeTextures[a].push(e),this.numFreeTextures++,this._numBytesFree+=o),this.numUsedTextures--;let l=this.usedTextures[a],u=l.indexOf(e);if(u<0)throw new Error("Cannot release a texture that was never provided by this texture manager");l.splice(u,1),this.log()}log(){if(!this.logEnabled)return;let e=this.numFreeTextures+this.numUsedTextures;console.log("Free/Used",`${this.numFreeTextures} / ${this.numUsedTextures}`,`(${e})`);let t=this._numBytesFree/this._numBytesAllocated;console.log(`Bytes allocated: ${this._numBytesAllocated}`),console.log(`Bytes unused: ${this._numBytesFree} (${Math.round(100*t)}%)`)}get numBytesAllocated(){return this._numBytesAllocated}get numBytesFree(){return this._numBytesFree}getNumUsedTextures(){return this.numUsedTextures}getNumFreeTextures(){return this.numFreeTextures}dispose(){if(this.freeTextures!=null){for(let e in this.freeTextures)this.freeTextures[e].forEach(t=>{this.gpgpu.deleteMatrixTexture(t.texture)});for(let e in this.usedTextures)this.usedTextures[e].forEach(t=>{this.gpgpu.deleteMatrixTexture(t.texture)});this.freeTextures=null,this.usedTextures=null,this.numUsedTextures=0,this.numFreeTextures=0,this._numBytesAllocated=0,this._numBytesFree=0}}};function Gne(e,t){let n=e;if(t===n.R32F)return 4;if(t===n.R16F)return 2;if(t===n.RGBA32F)return 16;if(t===e.RGBA)return 16;if(t===n.RGBA16F)return 8;if(t===n.RGBA8)return 4;throw new Error(`Unknown internal format ${t}`)}function O7(e,t,n,s,r){let a=Hne(t,s),o;if(r){let[l,u]=pd(e[0],e[1]);o=l*u}else{let[l,u]=Gh(e[0],e[1]);o=l*u}let i=Gne(n,a);return o*i}function Hne(e,t){switch(e){case Fn.PACKED_2X2_FLOAT32:return hb(t);case Fn.PACKED_2X2_FLOAT16:return fb(t);case Fn.UNPACKED_FLOAT32:return cb(t);case Fn.UNPACKED_FLOAT16:return db(t);case Fn.PACKED_4X1_UNSIGNED_BYTE:return pb(t);default:throw new Error(`Unknown physical texture type ${e}`)}}function jne(e){return H().getBool("WEBGL_RENDER_FLOAT32_ENABLED")?e?Fn.PACKED_2X2_FLOAT32:Fn.UNPACKED_FLOAT32:e?Fn.PACKED_2X2_FLOAT16:Fn.UNPACKED_FLOAT16}function M7(e,t){if(e===Qs.UPLOAD)return Fn.PACKED_2X2_FLOAT32;if(e===Qs.RENDER||e==null)return jne(t);if(e===Qs.DOWNLOAD||e===Qs.PIXELS)return Fn.PACKED_4X1_UNSIGNED_BYTE;throw new Error(`Unknown logical texture type ${e}`)}function z7(e,t,n){return`${e[0]}_${e[1]}_${t}_${n}`}var Sa=class{constructor(e,t){this.variableNames=["A"],this.outputShape=e,this.enableShapeUniforms=fs(this.outputShape.length),this.userCode=` + `}var Sne=class{constructor(e){this.gpgpu=e,this.numUsedTextures=0,this.numFreeTextures=0,this._numBytesAllocated=0,this._numBytesFree=0,this.freeTextures={},this.logEnabled=!1,this.usedTextures={}}acquireTexture(e,t,n){let s=g7(t,n),r=y7(e,s,n);r in this.freeTextures||(this.freeTextures[r]=[]),r in this.usedTextures||(this.usedTextures[r]=[]);let a=m7(e,s,this.gpgpu.gl,this.gpgpu.textureConfig,n);if(this.freeTextures[r].length>0){this.numFreeTextures--,this.numUsedTextures++,this._numBytesFree-=a,this.log();let i=this.freeTextures[r].shift();return this.usedTextures[r].push(i),i}let o;return s===Fn.PACKED_2X2_FLOAT32?o=this.gpgpu.createPackedMatrixTexture(e[0],e[1]):s===Fn.PACKED_2X2_FLOAT16?o=this.gpgpu.createFloat16PackedMatrixTexture(e[0],e[1]):s===Fn.UNPACKED_FLOAT32?o=this.gpgpu.createFloat32MatrixTexture(e[0],e[1]):s===Fn.UNPACKED_FLOAT16?o=this.gpgpu.createFloat16MatrixTexture(e[0],e[1]):s===Fn.PACKED_4X1_UNSIGNED_BYTE&&(o=this.gpgpu.createUnsignedBytesMatrixTexture(e[0],e[1])),this.usedTextures[r].push(o),this.numUsedTextures++,this._numBytesAllocated+=a,this.log(),o}releaseTexture(e,t,n,s){if(this.freeTextures==null)return;let r=g7(n,s),a=y7(t,r,s);a in this.freeTextures||(this.freeTextures[a]=[]);let o=m7(t,r,this.gpgpu.gl,this.gpgpu.textureConfig,s),i=U().get("WEBGL_DELETE_TEXTURE_THRESHOLD");i!==-1&&this._numBytesAllocated>i?(this.gpgpu.deleteMatrixTexture(e.texture),this._numBytesAllocated-=o):(this.freeTextures[a].push(e),this.numFreeTextures++,this._numBytesFree+=o),this.numUsedTextures--;let l=this.usedTextures[a],u=l.indexOf(e);if(u<0)throw new Error("Cannot release a texture that was never provided by this texture manager");l.splice(u,1),this.log()}log(){if(!this.logEnabled)return;let e=this.numFreeTextures+this.numUsedTextures;console.log("Free/Used",`${this.numFreeTextures} / ${this.numUsedTextures}`,`(${e})`);let t=this._numBytesFree/this._numBytesAllocated;console.log(`Bytes allocated: ${this._numBytesAllocated}`),console.log(`Bytes unused: ${this._numBytesFree} (${Math.round(100*t)}%)`)}get numBytesAllocated(){return this._numBytesAllocated}get numBytesFree(){return this._numBytesFree}getNumUsedTextures(){return this.numUsedTextures}getNumFreeTextures(){return this.numFreeTextures}dispose(){if(this.freeTextures!=null){for(let e in this.freeTextures)this.freeTextures[e].forEach(t=>{this.gpgpu.deleteMatrixTexture(t.texture)});for(let e in this.usedTextures)this.usedTextures[e].forEach(t=>{this.gpgpu.deleteMatrixTexture(t.texture)});this.freeTextures=null,this.usedTextures=null,this.numUsedTextures=0,this.numFreeTextures=0,this._numBytesAllocated=0,this._numBytesFree=0}}};function Ine(e,t){let n=e;if(t===n.R32F)return 4;if(t===n.R16F)return 2;if(t===n.RGBA32F)return 16;if(t===e.RGBA)return 16;if(t===n.RGBA16F)return 8;if(t===n.RGBA8)return 4;throw new Error(`Unknown internal format ${t}`)}function m7(e,t,n,s,r){let a=Cne(t,s),o;if(r){let[l,u]=ed(e[0],e[1]);o=l*u}else{let[l,u]=Nh(e[0],e[1]);o=l*u}let i=Ine(n,a);return o*i}function Cne(e,t){switch(e){case Fn.PACKED_2X2_FLOAT32:return qx(t);case Fn.PACKED_2X2_FLOAT16:return Xx(t);case Fn.UNPACKED_FLOAT32:return Gx(t);case Fn.UNPACKED_FLOAT16:return Hx(t);case Fn.PACKED_4X1_UNSIGNED_BYTE:return jx(t);default:throw new Error(`Unknown physical texture type ${e}`)}}function Tne(e){return U().getBool("WEBGL_RENDER_FLOAT32_ENABLED")?e?Fn.PACKED_2X2_FLOAT32:Fn.UNPACKED_FLOAT32:e?Fn.PACKED_2X2_FLOAT16:Fn.UNPACKED_FLOAT16}function g7(e,t){if(e===Zs.UPLOAD)return Fn.PACKED_2X2_FLOAT32;if(e===Zs.RENDER||e==null)return Tne(t);if(e===Zs.DOWNLOAD||e===Zs.PIXELS)return Fn.PACKED_4X1_UNSIGNED_BYTE;throw new Error(`Unknown logical texture type ${e}`)}function y7(e,t,n){return`${e[0]}_${e[1]}_${t}_${n}`}var xa=class{constructor(e,t){this.variableNames=["A"],this.outputShape=e,this.enableShapeUniforms=ds(this.outputShape.length),this.userCode=` float unaryOperation(float x) { ${t} } @@ -1192,11 +1192,11 @@ vec2 packedUVfrom3D(int texNumR, int texNumC, setOutput(y); } - `}},br="if (isnan(x)) return x;",qne="return x;",L7="return abs(x);",Xne="return (x >= 0.0) ? x : (exp(x) - 1.0);",Kne=br+` + `}},br="if (isnan(x)) return x;",Nne="return x;",A7="return abs(x);",Ene="return (x >= 0.0) ? x : (exp(x) - 1.0);",Rne=br+` return (x < 0.0) ? 0.0 : x; -`,Zne=br+` +`,_ne=br+` return (x < 0.0) ? 0.0 : min(6.0, x); -`,Yu="return x;",Yne="return 1.0 / (1.0 + exp(-1.0 * x));",Jne="return x;",Qne=` +`,Lu="return x;",Dne="return 1.0 / (1.0 + exp(-1.0 * x));",$ne="return x;",Pne=` vec4 result; result.r = (x.r >= 0.0) ? x.r : (exp(x.r) - 1.0); @@ -1205,7 +1205,7 @@ vec2 packedUVfrom3D(int texNumR, int texNumC, result.a = (x.a >= 0.0) ? x.a : (exp(x.a) - 1.0); return result; -`,ese=` +`,Fne=` vec4 result = x * vec4(greaterThanEqual(x, vec4(0.0))); bvec4 isNaN = isnan(x); @@ -1215,7 +1215,7 @@ vec2 packedUVfrom3D(int texNumR, int texNumC, result.a = isNaN.a ? x.a : result.a; return result; -`,tse=` +`,One=` vec4 result = min(x, vec4(6.)) * vec4(greaterThanEqual(x, vec4(0.0))); bvec4 isNaN = isnan(x); @@ -1225,7 +1225,7 @@ vec2 packedUVfrom3D(int texNumR, int texNumC, result.a = isNaN.a ? x.a : result.a; return result; -`,nse="return 1.0 / (1.0 + exp(-1.0 * x));",el=class{constructor(e,t){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=e,this.enableShapeUniforms=fs(this.outputShape.length),this.userCode=` +`,Mne="return 1.0 / (1.0 + exp(-1.0 * x));",ji=class{constructor(e,t){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=e,this.enableShapeUniforms=ds(this.outputShape.length),this.userCode=` vec4 unaryOperation(vec4 x) { ${t} } @@ -1236,17 +1236,17 @@ vec2 packedUVfrom3D(int texNumR, int texNumC, setOutput(y); } - `}},sse=class{constructor(e){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!1,this.outputShape=e,this.enableShapeUniforms=fs(this.outputShape.length);let t=e.length,n=us("rc",t),s=kt(t),r=Bne(t,n),a=n.slice(-2),o=t<=1?"rc":`vec2(${a.join(",")})`;this.userCode=` + `}},zne=class{constructor(e){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!1,this.outputShape=e,this.enableShapeUniforms=ds(this.outputShape.length);let t=e.length,n=os("rc",t),s=Tt(t),r=vne(t,n),a=n.slice(-2),o=t<=1?"rc":`vec2(${a.join(",")})`;this.userCode=` void main() { ${s} rc = getOutputCoords(); vec4 packedInput = getA(${r}); setOutput(getChannel(packedInput, ${o})); } - `}},rse=Ar.whereImpl,ase=1e-7,ose=1e-4,lm={};function ise(e){return e in lm||(lm[e]={}),lm[e]}var lse=H().getNumber("CPU_HANDOFF_SIZE_THRESHOLD"),use=600;function cse(){return H().global.screen==null?1024:H().global.screen.height*H().global.screen.width*window.devicePixelRatio*use/1024/1024}var Ad=class extends Cc{constructor(e){if(super(),this.pendingRead=new WeakMap,this.pendingDisposal=new WeakSet,this.dataRefCount=new WeakMap,this.numBytesInGPU=0,this.uploadWaitMs=0,this.downloadWaitMs=0,this.lastGlFlushTime=0,this.warnedAboutMemory=!1,this.pendingDeletes=0,this.disposed=!1,!H().getBool("HAS_WEBGL"))throw new Error("WebGL is not supported on this device");let t;if(e!=null){if(e instanceof lc)t=e;else{let n=Ur(H().getNumber("WEBGL_VERSION"),e);t=new lc(n)}this.binaryCache={},this.gpgpuCreatedLocally=!1}else{let n=Ur(H().getNumber("WEBGL_VERSION"));t=new lc(n),this.binaryCache=ise(H().getNumber("WEBGL_VERSION")),this.gpgpuCreatedLocally=!0}this.gpgpu=t,this.canvas=this.gpgpu.gl.canvas,this.textureManager=new Une(this.gpgpu),this.numMBBeforeWarning=cse(),this.texData=new Gp(this,Qt())}nextDataId(){return Ad.nextDataId++}numDataIds(){return this.texData.numDataIds()-this.pendingDeletes}write(e,t,n){if((H().getBool("WEBGL_CHECK_NUMERICAL_PROBLEMS")||H().getBool("DEBUG"))&&this.checkNumericalProblems(e),n==="complex64"&&e!=null)throw new Error("Cannot write to a complex64 dtype. Please use tf.complex(real, imag).");let s={id:this.nextDataId()};return this.texData.set(s,{shape:t,dtype:n,values:e,usage:Qs.UPLOAD,refCount:1}),s}refCount(e){return this.texData.has(e)?this.texData.get(e).refCount:0}incRef(e){let t=this.texData.get(e);t.refCount++}decRef(e){if(this.texData.has(e)){let t=this.texData.get(e);t.refCount--}}move(e,t,n,s,r){if(H().getBool("DEBUG")&&this.checkNumericalProblems(t),s==="complex64")throw new Error("Cannot write to a complex64 dtype. Please use tf.complex(real, imag).");this.texData.set(e,{shape:n,dtype:s,values:t,usage:Qs.UPLOAD,refCount:r})}disposeIntermediateTensorInfo(e){this.disposeData(e.dataId)}readSync(e){let t=this.texData.get(e),{values:n,dtype:s,complexTensorInfos:r,slice:a,shape:o,isPacked:i}=t;if(a!=null){let p;i?p=new el(o,Yu):p=new Sa(o,Yu);let d=this.runWebGLProgram(p,[{dataId:e,shape:o,dtype:s}],s),h=this.readSync(d.dataId);return this.disposeIntermediateTensorInfo(d),h}if(n!=null)return this.convertAndCacheOnCPU(e);if(s==="string")return n;let l=this.activeTimers!=null,u;l&&(u=v.now());let c;if(s==="complex64"){let p=this.readSync(r.real.dataId),d=this.readSync(r.imag.dataId);c=T.mergeRealAndImagArrays(p,d)}else c=this.getValuesFromTexture(e);return l&&(this.downloadWaitMs+=v.now()-u),this.convertAndCacheOnCPU(e,c)}async read(e){if(this.pendingRead.has(e)){let h=this.pendingRead.get(e);return new Promise(f=>h.push(f))}let t=this.texData.get(e),{values:n,shape:s,slice:r,dtype:a,complexTensorInfos:o,isPacked:i}=t;if(r!=null){let h;i?h=new el(s,Yu):h=new Sa(s,Yu);let f=this.runWebGLProgram(h,[{dataId:e,shape:s,dtype:a}],a),m=this.read(f.dataId);return this.disposeIntermediateTensorInfo(f),m}if(n!=null)return this.convertAndCacheOnCPU(e);if(H().getBool("DEBUG")&&!H().getBool("WEBGL_DOWNLOAD_FLOAT_ENABLED")&&H().getNumber("WEBGL_VERSION")===2)throw new Error("tensor.data() with WEBGL_DOWNLOAD_FLOAT_ENABLED=false and WEBGL_VERSION=2 not yet supported.");let l=null,u;if(a!=="complex64"&&H().get("WEBGL_BUFFER_SUPPORTED")){u=this.decode(e);let h=this.texData.get(u.dataId);l=this.gpgpu.createBufferFromTexture(h.texture.texture,...om(s))}this.pendingRead.set(e,[]),a!=="complex64"&&await this.gpgpu.createAndWaitForFence();let c;if(a==="complex64"){let h=await Promise.all([this.read(o.real.dataId),this.read(o.imag.dataId)]),f=h[0],m=h[1];c=T.mergeRealAndImagArrays(f,m)}else if(l==null)c=this.getValuesFromTexture(e);else{let h=v.sizeFromShape(s);c=this.gpgpu.downloadFloat32MatrixFromBuffer(l,h)}if(u!=null&&this.disposeIntermediateTensorInfo(u),l!=null){let h=this.gpgpu.gl;Ie(h,()=>h.deleteBuffer(l))}let p=this.convertAndCacheOnCPU(e,c),d=this.pendingRead.get(e);return this.pendingRead.delete(e),d.forEach(h=>h(p)),this.pendingDisposal.has(e)&&(this.pendingDisposal.delete(e),this.disposeData(e)&&Qt().removeDataId(e,this),this.pendingDeletes--),p}readToGPU(e,t={}){let n=this.texData.get(e),{values:s,shape:r,slice:a,dtype:o,isPacked:i,texture:l}=n;if(o==="complex64")throw new Error("Does not support reading texture for complex64 dtype.");if(a!=null){let d;i?d=new el(r,Yu):d=new Sa(r,Yu);let h=this.runWebGLProgram(d,[{dataId:e,shape:r,dtype:o}],o),f=this.readToGPU(h,t);return this.disposeIntermediateTensorInfo(h),f}if(l==null)throw s!=null?new Error("Data is not on GPU but on CPU."):new Error("There is no data on GPU or CPU.");let u=this.decode(e,t.customTexShape),c=Qt().makeTensorFromTensorInfo(u),p=this.texData.get(u.dataId);return Object.assign({tensorRef:c},p.texture)}bufferSync(e){let t=this.readSync(e.dataId);if(e.dtype==="string")try{let n=t.map(s=>v.decodeString(s));return Ue(e.shape,e.dtype,n)}catch(n){throw new Error("Failed to decode encoded string bytes into utf-8")}return Ue(e.shape,e.dtype,t)}checkNumericalProblems(e){if(e!=null)for(let t=0;t0}time(e){let t=this.activeTimers,n=[],s=!1;this.programTimersStack==null?(this.programTimersStack=n,s=!0):this.activeTimers.push(n),this.activeTimers=n,e();let r=v.flatten(this.activeTimers.map(i=>i.query)).filter(i=>i!=null),a=v.flatten(this.activeTimers.map(i=>i.name)).filter(i=>i!=null);this.activeTimers=t,s&&(this.programTimersStack=null);let o={uploadWaitMs:this.uploadWaitMs,downloadWaitMs:this.downloadWaitMs,kernelMs:null,wallMs:null};return(async()=>{if(H().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0){let i=await Promise.all(r);o.kernelMs=v.sum(i),o.getExtraProfileInfo=()=>i.map((l,u)=>({name:a[u],ms:l})).map(l=>`${l.name}: ${l.ms}`).join(", ")}else o.kernelMs={error:"WebGL query timers are not supported in this environment."};return this.uploadWaitMs=0,this.downloadWaitMs=0,o})()}memory(){return{unreliable:!1,numBytesInGPU:this.numBytesInGPU,numBytesInGPUAllocated:this.textureManager.numBytesAllocated,numBytesInGPUFree:this.textureManager.numBytesFree}}startTimer(){return H().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0?this.gpgpu.beginQuery():{startMs:v.now(),endMs:null}}endTimer(e){return H().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0?(this.gpgpu.endQuery(),e):(e.endMs=v.now(),e)}async getQueryTime(e){if(H().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0)return this.gpgpu.waitForQueryAndGetTime(e);let t=e;return t.endMs-t.startMs}disposeData(e,t=!1){if(this.pendingDisposal.has(e))return!1;if(!this.texData.has(e))return!0;if(t?this.texData.get(e).refCount=0:this.texData.get(e).refCount--,!t&&this.texData.get(e).refCount>0)return!1;if(this.pendingRead.has(e))return this.pendingDisposal.add(e),this.pendingDeletes++,!1;this.releaseGPUData(e);let{complexTensorInfos:n}=this.texData.get(e);return n!=null&&(this.disposeData(n.real.dataId,t),this.disposeData(n.imag.dataId,t)),this.texData.delete(e),!0}releaseGPUData(e){let{texture:t,dtype:n,texShape:s,usage:r,isPacked:a,slice:o}=this.texData.get(e),i=o&&o.origDataId||e,l=this.dataRefCount.get(i);l>1?this.dataRefCount.set(i,l-1):(this.dataRefCount.delete(i),t!=null&&(this.numBytesInGPU-=this.computeBytes(s,n),this.textureManager.releaseTexture(t,s,r,a)));let u=this.texData.get(e);u.texture=null,u.texShape=null,u.isPacked=!1,u.slice=null}getTexture(e){return this.uploadToGPU(e),this.texData.get(e).texture.texture}getDataInfo(e){return this.texData.get(e)}shouldExecuteOnCPU(e,t=lse){return H().getBool("WEBGL_CPU_FORWARD")&&e.every(n=>this.texData.get(n.dataId).texture==null&&v.sizeFromShape(n.shape)0&&v.isString(n[0])){let r=n.map(a=>v.encodeString(a));s=this.write(r,e,t)}else s=this.write(n,e,t);return this.texData.get(s).usage=null,{dataId:s,shape:e,dtype:t}}makeOutput(e,t,n){return Qt().makeTensorFromTensorInfo(this.makeTensorInfo(e,t,n),this)}unpackTensor(e){let t=new sse(e.shape);return this.runWebGLProgram(t,[e],e.dtype)}packTensor(e){let t=new Wne(e.shape),n=!0;return this.runWebGLProgram(t,[e],e.dtype,null,n)}packedReshape(e,t){let n=[ml(e.shape),...gl(e.shape)],s={dtype:e.dtype,shape:n,dataId:e.dataId},r=[ml(t),...gl(t)],a=new $9(r,n),o=!0,i=[n],l=this.runWebGLProgram(a,[s],e.dtype,i,o);return{dataId:l.dataId,shape:t,dtype:l.dtype}}decode(e,t){let n=this.texData.get(e),{isPacked:s,shape:r,dtype:a}=n;if(t!=null){let p=v.sizeFromShape(r),d=t[0]*t[1]*4;v.assert(p<=d,()=>"customTexShape is too small. Row * Column * 4 should be equal or larger than the size of the tensor data.")}let o=gm(r),i;s?i=new qte(o):i=new jte(o);let l=!0,u=[t!=null?t:om(o)],c=this.runWebGLProgram(i,[{shape:o,dtype:a,dataId:e}],a,u,l,t);return{dtype:a,shape:r,dataId:c.dataId}}runWebGLProgram(e,t,n,s,r=!1,a){let o=this.makeTensorInfo(e.outputShape,n),i=this.texData.get(o.dataId);if(e.packedOutput&&(i.isPacked=!0),e.outPackingScheme===Op.DENSE){let g=a!=null?a:om(e.outputShape);i.texShape=g.map(y=>y*2)}if(e.outTexUsage!=null&&(i.usage=e.outTexUsage),v.sizeFromShape(o.shape)===0)return i.values=v.getTypedArrayFromDType(o.dtype,0),o;let l=[],u=t.map(g=>{if(g.dtype==="complex64")throw new Error("GPGPUProgram does not support complex64 input. For complex64 dtypes, please separate the program into real and imaginary parts.");let y=this.texData.get(g.dataId);if(y.texture==null){if(!e.packedInputs&&v.sizeFromShape(g.shape)<=H().getNumber("WEBGL_SIZE_UPLOAD_UNIFORM"))return{shape:g.shape,texData:null,isUniform:!0,uniformValues:y.values};e.packedInputs&&(y.isPacked=!0,y.shape=g.shape)}if(this.uploadToGPU(g.dataId),!!y.isPacked!=!!e.packedInputs)g=y.isPacked?this.unpackTensor(g):this.packTensor(g),l.push(g),y=this.texData.get(g.dataId);else if(y.isPacked&&!Mp(y.shape,g.shape)){let x=g,A=g.shape;g.shape=y.shape,g=this.packedReshape(g,A),l.push(g),y=this.texData.get(g.dataId),x.shape=A}return{shape:g.shape,texData:y,isUniform:!1}});this.uploadToGPU(o.dataId);let c={shape:o.shape,texData:i,isUniform:!1},p=Hte(e,u,c),d=this.getAndSaveBinary(p,()=>Ute(this.gpgpu,e,u,c)),h=this.activeTimers!=null,f;h&&(f=this.startTimer()),H().get("ENGINE_COMPILE_ONLY")||Gte(this.gpgpu,d,u,c,s),l.forEach(g=>this.disposeIntermediateTensorInfo(g)),h&&(f=this.endTimer(f),this.activeTimers.push({name:e.constructor.name,query:this.getQueryTime(f)}));let m=H().get("WEBGL_FLUSH_THRESHOLD");if(m>0){let g=v.now();g-this.lastGlFlushTime>m&&(this.gpgpu.gl.flush(),this.lastGlFlushTime=g)}if(!H().getBool("WEBGL_LAZILY_UNPACK")&&i.isPacked&&r===!1){let g=this.unpackTensor(o);return this.disposeIntermediateTensorInfo(o),g}return o}compileAndRun(e,t,n,s,r=!1){return n=n||t[0].dtype,this.runWebGLProgram(e,t,n,s,r)}getAndSaveBinary(e,t){return e in this.binaryCache||(this.binaryCache[e]=t()),this.binaryCache[e]}getTextureManager(){return this.textureManager}dispose(){this.disposed||(H().getBool("IS_TEST")||Object.keys(this.binaryCache).forEach(t=>{this.gpgpu.deleteProgram(this.binaryCache[t].webGLProgram),delete this.binaryCache[t]}),this.textureManager.dispose(),this.canvas!=null&&typeof HTMLCanvasElement!="undefined"&&this.canvas instanceof HTMLCanvasElement?this.canvas.remove():this.canvas=null,this.gpgpuCreatedLocally&&(this.gpgpu.program=null,this.gpgpu.dispose()),this.disposed=!0)}floatPrecision(){return this.floatPrecisionValue==null&&(this.floatPrecisionValue=Y(()=>{if(!H().get("WEBGL_RENDER_FLOAT32_ENABLED")){let e=H().getBool("DEBUG");H().set("DEBUG",!1);let t=this.abs(Te(1e-8)).dataSync()[0];if(H().set("DEBUG",e),t>0)return 32}return 16})),this.floatPrecisionValue}epsilon(){return this.floatPrecision()===32?ase:ose}uploadToGPU(e){let t=this.texData.get(e),{shape:n,dtype:s,values:r,texture:a,usage:o,isPacked:i}=t;if(a!=null)return;let l=this.activeTimers!=null,u;l&&(u=v.now());let c=t.texShape;if(c==null&&(c=e9(n,i),t.texShape=c),r!=null){let p=gm(n),d,h=c[1],f=c[0],m=r instanceof Uint8Array||r instanceof Uint8ClampedArray;(i||!m)&&([h,f]=pd(c[0],c[1])),i?d=new Yte(p,m):d=new Zte(p,m);let g=m?[f,h]:c,y=this.makeTensorInfo(g,s),x=this.texData.get(y.dataId);m?x.usage=Qs.PIXELS:x.usage=Qs.UPLOAD,x.texShape=g,this.gpgpu.uploadDenseMatrixToTexture(this.getTexture(y.dataId),h,f,r);let A=[[f,h]],b=!0,w=this.runWebGLProgram(d,[y],s,A,b),k=this.texData.get(w.dataId);t.texShape=k.texShape,t.isPacked=k.isPacked,t.usage=k.usage,H().get("ENGINE_COMPILE_ONLY")?this.disposeData(w.dataId):(t.texture=k.texture,t.values=null,this.texData.delete(w.dataId)),this.disposeIntermediateTensorInfo(y),l&&(this.uploadWaitMs+=v.now()-u)}else{let p=this.acquireTexture(c,o,s,i);t.texture=p}}convertAndCacheOnCPU(e,t){let n=this.texData.get(e),{dtype:s}=n;return this.releaseGPUData(e),t!=null&&(n.values=dse(t,s)),n.values}acquireTexture(e,t,n,s){if(this.numBytesInGPU+=this.computeBytes(e,n),!this.warnedAboutMemory&&this.numBytesInGPU>this.numMBBeforeWarning*1024*1024){let r=(this.numBytesInGPU/1024/1024).toFixed(2);this.warnedAboutMemory=!0,console.warn(`High memory usage in GPU: ${r} MB, most likely due to a memory leak`)}return this.textureManager.acquireTexture(e,t,s)}computeBytes(e,t){return e[0]*e[1]*v.bytesPerElement(t)}checkCompileCompletion(){for(let[,e]of Object.entries(this.binaryCache))this.checkCompletion_(e)}async checkCompileCompletionAsync(){let e=[];if(this.gpgpu.parallelCompilationExtension){for(let[,t]of Object.entries(this.binaryCache))e.push(this.checkCompletionAsync_(t));return Promise.all(e)}else{for(let[,t]of Object.entries(this.binaryCache)){let n=new Promise(s=>{try{this.checkCompletion_(t),s(!0)}catch(r){throw r}});e.push(n)}return Promise.all(e)}}async checkCompletionAsync_(e){return this.gpgpu.gl.getProgramParameter(e.webGLProgram,this.gpgpu.parallelCompilationExtension.COMPLETION_STATUS_KHR)?this.checkCompletion_(e):(await c5(),this.checkCompletionAsync_(e))}checkCompletion_(e){if(this.gpgpu.gl.getProgramParameter(e.webGLProgram,this.gpgpu.gl.LINK_STATUS)===!1)throw console.log(this.gpgpu.gl.getProgramInfoLog(e.webGLProgram)),this.gpgpu.gl.getShaderParameter(e.fragmentShader,this.gpgpu.gl.COMPILE_STATUS)===!1?(ob(e.source,this.gpgpu.gl.getShaderInfoLog(e.fragmentShader)),new Error("Failed to compile fragment shader.")):new Error("Failed to link vertex and fragment shaders.");return!0}getUniformLocations(){for(let[,e]of Object.entries(this.binaryCache)){let{uniformLocations:t,customUniformLocations:n,infLoc:s,nanLoc:r,inShapesLocations:a,inTexShapesLocations:o,outShapeLocation:i,outShapeStridesLocation:l,outTexShapeLocation:u}=d9(this.gpgpu,e.program,e.webGLProgram);e.uniformLocations=t,e.customUniformLocations=n,e.infLoc=s,e.nanLoc=r,e.inShapesLocations=a,e.inTexShapesLocations=o,e.outShapeLocation=i,e.outShapeStridesLocation=l,e.outTexShapeLocation=u}}};Ad.nextDataId=0;function dse(e,t){if(t==="float32"||t==="complex64")return e;if(t==="int32"||t==="bool"){let n=t==="int32"?new Int32Array(e.length):new Uint8Array(e.length);for(let s=0;snew Ad,2);var hse={forceHalfFloat:P9},F9=` + `}},Lne=Ar.whereImpl,Bne=1e-7,Wne=1e-4,Lf={};function Vne(e){return e in Lf||(Lf[e]={}),Lf[e]}var Une=U().getNumber("CPU_HANDOFF_SIZE_THRESHOLD"),Gne=600;function Hne(){return U().global.screen==null?1024:U().global.screen.height*U().global.screen.width*window.devicePixelRatio*Gne/1024/1024}var od=class extends fc{constructor(e){if(super(),this.pendingRead=new WeakMap,this.pendingDisposal=new WeakSet,this.dataRefCount=new WeakMap,this.numBytesInGPU=0,this.uploadWaitMs=0,this.downloadWaitMs=0,this.lastGlFlushTime=0,this.warnedAboutMemory=!1,this.pendingDeletes=0,this.disposed=!1,!U().getBool("HAS_WEBGL"))throw new Error("WebGL is not supported on this device");let t;if(e!=null){if(e instanceof Zu)t=e;else{let n=Mr(U().getNumber("WEBGL_VERSION"),e);t=new Zu(n)}this.binaryCache={},this.gpgpuCreatedLocally=!1}else{let n=Mr(U().getNumber("WEBGL_VERSION"));t=new Zu(n),this.binaryCache=Vne(U().getNumber("WEBGL_VERSION")),this.gpgpuCreatedLocally=!0}this.gpgpu=t,this.canvas=this.gpgpu.gl.canvas,this.textureManager=new Sne(this.gpgpu),this.numMBBeforeWarning=Hne(),this.texData=new Tp(this,Jt())}nextDataId(){return od.nextDataId++}numDataIds(){return this.texData.numDataIds()-this.pendingDeletes}write(e,t,n){if((U().getBool("WEBGL_CHECK_NUMERICAL_PROBLEMS")||U().getBool("DEBUG"))&&this.checkNumericalProblems(e),n==="complex64"&&e!=null)throw new Error("Cannot write to a complex64 dtype. Please use tf.complex(real, imag).");let s={id:this.nextDataId()};return this.texData.set(s,{shape:t,dtype:n,values:e,usage:Zs.UPLOAD,refCount:1}),s}refCount(e){return this.texData.has(e)?this.texData.get(e).refCount:0}incRef(e){let t=this.texData.get(e);t.refCount++}decRef(e){if(this.texData.has(e)){let t=this.texData.get(e);t.refCount--}}move(e,t,n,s,r){if(U().getBool("DEBUG")&&this.checkNumericalProblems(t),s==="complex64")throw new Error("Cannot write to a complex64 dtype. Please use tf.complex(real, imag).");this.texData.set(e,{shape:n,dtype:s,values:t,usage:Zs.UPLOAD,refCount:r})}disposeIntermediateTensorInfo(e){this.disposeData(e.dataId)}readSync(e){let t=this.texData.get(e),{values:n,dtype:s,complexTensorInfos:r,slice:a,shape:o,isPacked:i}=t;if(a!=null){let p;i?p=new ji(o,Lu):p=new xa(o,Lu);let d=this.runWebGLProgram(p,[{dataId:e,shape:o,dtype:s}],s),h=this.readSync(d.dataId);return this.disposeIntermediateTensorInfo(d),h}if(n!=null)return this.convertAndCacheOnCPU(e);if(s==="string")return n;let l=this.activeTimers!=null,u;l&&(u=v.now());let c;if(s==="complex64"){let p=this.readSync(r.real.dataId),d=this.readSync(r.imag.dataId);c=T.mergeRealAndImagArrays(p,d)}else c=this.getValuesFromTexture(e);return l&&(this.downloadWaitMs+=v.now()-u),this.convertAndCacheOnCPU(e,c)}async read(e){if(this.pendingRead.has(e)){let h=this.pendingRead.get(e);return new Promise(f=>h.push(f))}let t=this.texData.get(e),{values:n,shape:s,slice:r,dtype:a,complexTensorInfos:o,isPacked:i}=t;if(r!=null){let h;i?h=new ji(s,Lu):h=new xa(s,Lu);let f=this.runWebGLProgram(h,[{dataId:e,shape:s,dtype:a}],a),m=this.read(f.dataId);return this.disposeIntermediateTensorInfo(f),m}if(n!=null)return this.convertAndCacheOnCPU(e);if(U().getBool("DEBUG")&&!U().getBool("WEBGL_DOWNLOAD_FLOAT_ENABLED")&&U().getNumber("WEBGL_VERSION")===2)throw new Error("tensor.data() with WEBGL_DOWNLOAD_FLOAT_ENABLED=false and WEBGL_VERSION=2 not yet supported.");let l=null,u;if(a!=="complex64"&&U().get("WEBGL_BUFFER_SUPPORTED")){u=this.decode(e);let h=this.texData.get(u.dataId);l=this.gpgpu.createBufferFromTexture(h.texture.texture,...Mf(s))}this.pendingRead.set(e,[]),a!=="complex64"&&await this.gpgpu.createAndWaitForFence();let c;if(a==="complex64"){let h=await Promise.all([this.read(o.real.dataId),this.read(o.imag.dataId)]),f=h[0],m=h[1];c=T.mergeRealAndImagArrays(f,m)}else if(l==null)c=this.getValuesFromTexture(e);else{let h=v.sizeFromShape(s);c=this.gpgpu.downloadFloat32MatrixFromBuffer(l,h)}if(u!=null&&this.disposeIntermediateTensorInfo(u),l!=null){let h=this.gpgpu.gl;we(h,()=>h.deleteBuffer(l))}let p=this.convertAndCacheOnCPU(e,c),d=this.pendingRead.get(e);return this.pendingRead.delete(e),d.forEach(h=>h(p)),this.pendingDisposal.has(e)&&(this.pendingDisposal.delete(e),this.disposeData(e)&&Jt().removeDataId(e,this),this.pendingDeletes--),p}readToGPU(e,t={}){let n=this.texData.get(e),{values:s,shape:r,slice:a,dtype:o,isPacked:i,texture:l}=n;if(o==="complex64")throw new Error("Does not support reading texture for complex64 dtype.");if(a!=null){let d;i?d=new ji(r,Lu):d=new xa(r,Lu);let h=this.runWebGLProgram(d,[{dataId:e,shape:r,dtype:o}],o),f=this.readToGPU(h,t);return this.disposeIntermediateTensorInfo(h),f}if(l==null)throw s!=null?new Error("Data is not on GPU but on CPU."):new Error("There is no data on GPU or CPU.");let u=this.decode(e,t.customTexShape),c=Jt().makeTensorFromTensorInfo(u),p=this.texData.get(u.dataId);return Object.assign({tensorRef:c},p.texture)}bufferSync(e){let t=this.readSync(e.dataId);if(e.dtype==="string")try{let n=t.map(s=>v.decodeString(s));return ze(e.shape,e.dtype,n)}catch(n){throw new Error("Failed to decode encoded string bytes into utf-8")}return ze(e.shape,e.dtype,t)}checkNumericalProblems(e){if(e!=null)for(let t=0;t0}time(e){let t=this.activeTimers,n=[],s=!1;this.programTimersStack==null?(this.programTimersStack=n,s=!0):this.activeTimers.push(n),this.activeTimers=n,e();let r=v.flatten(this.activeTimers.map(i=>i.query)).filter(i=>i!=null),a=v.flatten(this.activeTimers.map(i=>i.name)).filter(i=>i!=null);this.activeTimers=t,s&&(this.programTimersStack=null);let o={uploadWaitMs:this.uploadWaitMs,downloadWaitMs:this.downloadWaitMs,kernelMs:null,wallMs:null};return(async()=>{if(U().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0){let i=await Promise.all(r);o.kernelMs=v.sum(i),o.getExtraProfileInfo=()=>i.map((l,u)=>({name:a[u],ms:l})).map(l=>`${l.name}: ${l.ms}`).join(", ")}else o.kernelMs={error:"WebGL query timers are not supported in this environment."};return this.uploadWaitMs=0,this.downloadWaitMs=0,o})()}memory(){return{unreliable:!1,numBytesInGPU:this.numBytesInGPU,numBytesInGPUAllocated:this.textureManager.numBytesAllocated,numBytesInGPUFree:this.textureManager.numBytesFree}}startTimer(){return U().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0?this.gpgpu.beginQuery():{startMs:v.now(),endMs:null}}endTimer(e){return U().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0?(this.gpgpu.endQuery(),e):(e.endMs=v.now(),e)}async getQueryTime(e){if(U().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0)return this.gpgpu.waitForQueryAndGetTime(e);let t=e;return t.endMs-t.startMs}disposeData(e,t=!1){if(this.pendingDisposal.has(e))return!1;if(!this.texData.has(e))return!0;if(t?this.texData.get(e).refCount=0:this.texData.get(e).refCount--,!t&&this.texData.get(e).refCount>0)return!1;if(this.pendingRead.has(e))return this.pendingDisposal.add(e),this.pendingDeletes++,!1;this.releaseGPUData(e);let{complexTensorInfos:n}=this.texData.get(e);return n!=null&&(this.disposeData(n.real.dataId,t),this.disposeData(n.imag.dataId,t)),this.texData.delete(e),!0}releaseGPUData(e){let{texture:t,dtype:n,texShape:s,usage:r,isPacked:a,slice:o}=this.texData.get(e),i=o&&o.origDataId||e,l=this.dataRefCount.get(i);l>1?this.dataRefCount.set(i,l-1):(this.dataRefCount.delete(i),t!=null&&(this.numBytesInGPU-=this.computeBytes(s,n),this.textureManager.releaseTexture(t,s,r,a)));let u=this.texData.get(e);u.texture=null,u.texShape=null,u.isPacked=!1,u.slice=null}getTexture(e){return this.uploadToGPU(e),this.texData.get(e).texture.texture}getDataInfo(e){return this.texData.get(e)}shouldExecuteOnCPU(e,t=Une){return U().getBool("WEBGL_CPU_FORWARD")&&e.every(n=>this.texData.get(n.dataId).texture==null&&v.sizeFromShape(n.shape)0&&v.isString(n[0])){let r=n.map(a=>v.encodeString(a));s=this.write(r,e,t)}else s=this.write(n,e,t);return this.texData.get(s).usage=null,{dataId:s,shape:e,dtype:t}}makeOutput(e,t,n){return Jt().makeTensorFromTensorInfo(this.makeTensorInfo(e,t,n),this)}unpackTensor(e){let t=new zne(e.shape);return this.runWebGLProgram(t,[e],e.dtype)}packTensor(e){let t=new wne(e.shape),n=!0;return this.runWebGLProgram(t,[e],e.dtype,null,n)}packedReshape(e,t){let n=[il(e.shape),...ll(e.shape)],s={dtype:e.dtype,shape:n,dataId:e.dataId},r=[il(t),...ll(t)],a=new A9(r,n),o=!0,i=[n],l=this.runWebGLProgram(a,[s],e.dtype,i,o);return{dataId:l.dataId,shape:t,dtype:l.dtype}}decode(e,t){let n=this.texData.get(e),{isPacked:s,shape:r,dtype:a}=n;if(t!=null){let p=v.sizeFromShape(r),d=t[0]*t[1]*4;v.assert(p<=d,()=>"customTexShape is too small. Row * Column * 4 should be equal or larger than the size of the tensor data.")}let o=qf(r),i;s?i=new Tte(o):i=new Cte(o);let l=!0,u=[t!=null?t:Mf(o)],c=this.runWebGLProgram(i,[{shape:o,dtype:a,dataId:e}],a,u,l,t);return{dtype:a,shape:r,dataId:c.dataId}}runWebGLProgram(e,t,n,s,r=!1,a){let o=this.makeTensorInfo(e.outputShape,n),i=this.texData.get(o.dataId);if(e.packedOutput&&(i.isPacked=!0),e.outPackingScheme===xp.DENSE){let g=a!=null?a:Mf(e.outputShape);i.texShape=g.map(y=>y*2)}if(e.outTexUsage!=null&&(i.usage=e.outTexUsage),v.sizeFromShape(o.shape)===0)return i.values=v.getTypedArrayFromDType(o.dtype,0),o;let l=[],u=t.map(g=>{if(g.dtype==="complex64")throw new Error("GPGPUProgram does not support complex64 input. For complex64 dtypes, please separate the program into real and imaginary parts.");let y=this.texData.get(g.dataId);if(y.texture==null){if(!e.packedInputs&&v.sizeFromShape(g.shape)<=U().getNumber("WEBGL_SIZE_UPLOAD_UNIFORM"))return{shape:g.shape,texData:null,isUniform:!0,uniformValues:y.values};e.packedInputs&&(y.isPacked=!0,y.shape=g.shape)}if(this.uploadToGPU(g.dataId),!!y.isPacked!=!!e.packedInputs)g=y.isPacked?this.unpackTensor(g):this.packTensor(g),l.push(g),y=this.texData.get(g.dataId);else if(y.isPacked&&!bp(y.shape,g.shape)){let x=g,A=g.shape;g.shape=y.shape,g=this.packedReshape(g,A),l.push(g),y=this.texData.get(g.dataId),x.shape=A}return{shape:g.shape,texData:y,isUniform:!1}});this.uploadToGPU(o.dataId);let c={shape:o.shape,texData:i,isUniform:!1},p=Ite(e,u,c),d=this.getAndSaveBinary(p,()=>kte(this.gpgpu,e,u,c)),h=this.activeTimers!=null,f;h&&(f=this.startTimer()),U().get("ENGINE_COMPILE_ONLY")||Ste(this.gpgpu,d,u,c,s),l.forEach(g=>this.disposeIntermediateTensorInfo(g)),h&&(f=this.endTimer(f),this.activeTimers.push({name:e.constructor.name,query:this.getQueryTime(f)}));let m=U().get("WEBGL_FLUSH_THRESHOLD");if(m>0){let g=v.now();g-this.lastGlFlushTime>m&&(this.gpgpu.gl.flush(),this.lastGlFlushTime=g)}if(!U().getBool("WEBGL_LAZILY_UNPACK")&&i.isPacked&&r===!1){let g=this.unpackTensor(o);return this.disposeIntermediateTensorInfo(o),g}return o}compileAndRun(e,t,n,s,r=!1){return n=n||t[0].dtype,this.runWebGLProgram(e,t,n,s,r)}getAndSaveBinary(e,t){return e in this.binaryCache||(this.binaryCache[e]=t()),this.binaryCache[e]}getTextureManager(){return this.textureManager}dispose(){this.disposed||(U().getBool("IS_TEST")||Object.keys(this.binaryCache).forEach(t=>{this.gpgpu.deleteProgram(this.binaryCache[t].webGLProgram),delete this.binaryCache[t]}),this.textureManager.dispose(),this.canvas!=null&&typeof HTMLCanvasElement!="undefined"&&this.canvas instanceof HTMLCanvasElement?this.canvas.remove():this.canvas=null,this.gpgpuCreatedLocally&&(this.gpgpu.program=null,this.gpgpu.dispose()),this.disposed=!0)}floatPrecision(){return this.floatPrecisionValue==null&&(this.floatPrecisionValue=X(()=>{if(!U().get("WEBGL_RENDER_FLOAT32_ENABLED")){let e=U().getBool("DEBUG");U().set("DEBUG",!1);let t=this.abs(Ce(1e-8)).dataSync()[0];if(U().set("DEBUG",e),t>0)return 32}return 16})),this.floatPrecisionValue}epsilon(){return this.floatPrecision()===32?Bne:Wne}uploadToGPU(e){let t=this.texData.get(e),{shape:n,dtype:s,values:r,texture:a,usage:o,isPacked:i}=t;if(a!=null)return;let l=this.activeTimers!=null,u;l&&(u=v.now());let c=t.texShape;if(c==null&&(c=LI(n,i),t.texShape=c),r!=null){let p=qf(n),d,h=c[1],f=c[0],m=r instanceof Uint8Array||r instanceof Uint8ClampedArray;(i||!m)&&([h,f]=ed(c[0],c[1])),i?d=new _te(p,m):d=new Rte(p,m);let g=m?[f,h]:c,y=this.makeTensorInfo(g,s),x=this.texData.get(y.dataId);m?x.usage=Zs.PIXELS:x.usage=Zs.UPLOAD,x.texShape=g,this.gpgpu.uploadDenseMatrixToTexture(this.getTexture(y.dataId),h,f,r);let A=[[f,h]],b=!0,w=this.runWebGLProgram(d,[y],s,A,b),k=this.texData.get(w.dataId);t.texShape=k.texShape,t.isPacked=k.isPacked,t.usage=k.usage,U().get("ENGINE_COMPILE_ONLY")?this.disposeData(w.dataId):(t.texture=k.texture,t.values=null,this.texData.delete(w.dataId)),this.disposeIntermediateTensorInfo(y),l&&(this.uploadWaitMs+=v.now()-u)}else{let p=this.acquireTexture(c,o,s,i);t.texture=p}}convertAndCacheOnCPU(e,t){let n=this.texData.get(e),{dtype:s}=n;return this.releaseGPUData(e),t!=null&&(n.values=jne(t,s)),n.values}acquireTexture(e,t,n,s){if(this.numBytesInGPU+=this.computeBytes(e,n),!this.warnedAboutMemory&&this.numBytesInGPU>this.numMBBeforeWarning*1024*1024){let r=(this.numBytesInGPU/1024/1024).toFixed(2);this.warnedAboutMemory=!0,console.warn(`High memory usage in GPU: ${r} MB, most likely due to a memory leak`)}return this.textureManager.acquireTexture(e,t,s)}computeBytes(e,t){return e[0]*e[1]*v.bytesPerElement(t)}checkCompileCompletion(){for(let[,e]of Object.entries(this.binaryCache))this.checkCompletion_(e)}async checkCompileCompletionAsync(){let e=[];if(this.gpgpu.parallelCompilationExtension){for(let[,t]of Object.entries(this.binaryCache))e.push(this.checkCompletionAsync_(t));return Promise.all(e)}else{for(let[,t]of Object.entries(this.binaryCache)){let n=new Promise(s=>{try{this.checkCompletion_(t),s(!0)}catch(r){throw r}});e.push(n)}return Promise.all(e)}}async checkCompletionAsync_(e){return this.gpgpu.gl.getProgramParameter(e.webGLProgram,this.gpgpu.parallelCompilationExtension.COMPLETION_STATUS_KHR)?this.checkCompletion_(e):(await UA(),this.checkCompletionAsync_(e))}checkCompletion_(e){if(this.gpgpu.gl.getProgramParameter(e.webGLProgram,this.gpgpu.gl.LINK_STATUS)===!1)throw console.log(this.gpgpu.gl.getProgramInfoLog(e.webGLProgram)),this.gpgpu.gl.getShaderParameter(e.fragmentShader,this.gpgpu.gl.COMPILE_STATUS)===!1?(Bx(e.source,this.gpgpu.gl.getShaderInfoLog(e.fragmentShader)),new Error("Failed to compile fragment shader.")):new Error("Failed to link vertex and fragment shaders.");return!0}getUniformLocations(){for(let[,e]of Object.entries(this.binaryCache)){let{uniformLocations:t,customUniformLocations:n,infLoc:s,nanLoc:r,inShapesLocations:a,inTexShapesLocations:o,outShapeLocation:i,outShapeStridesLocation:l,outTexShapeLocation:u}=ZI(this.gpgpu,e.program,e.webGLProgram);e.uniformLocations=t,e.customUniformLocations=n,e.infLoc=s,e.nanLoc=r,e.inShapesLocations=a,e.inTexShapesLocations=o,e.outShapeLocation=i,e.outShapeStridesLocation=l,e.outTexShapeLocation=u}}};od.nextDataId=0;function jne(e,t){if(t==="float32"||t==="complex64")return e;if(t==="int32"||t==="bool"){let n=t==="int32"?new Int32Array(e.length):new Uint8Array(e.length);for(let s=0;snew od,2);var Xne={forceHalfFloat:x9},Zx=` if (isnan(a)) return a; if (isnan(b)) return b; -`,Ic=class{constructor(e,t,n){this.variableNames=["A","B"],this.outputShape=T.assertAndGetBroadcastShape(t,n),this.enableShapeUniforms=fs(this.outputShape.length),this.userCode=` +`,hc=class{constructor(e,t,n){this.variableNames=["A","B"],this.outputShape=T.assertAndGetBroadcastShape(t,n),this.enableShapeUniforms=ds(this.outputShape.length),this.userCode=` float binaryOperation(float a, float b) { ${e} } @@ -1256,17 +1256,17 @@ vec2 packedUVfrom3D(int texNumR, int texNumC, float b = getBAtOutCoords(); setOutput(binaryOperation(a, b)); } - `}},P2=` - result.r = isNaN.r > 0. ? NAN : result.r; - result.g = isNaN.g > 0. ? NAN : result.g; - result.b = isNaN.b > 0. ? NAN : result.b; - result.a = isNaN.a > 0. ? NAN : result.a; -`,jh=class{constructor(e,t,n,s=!1){this.variableNames=["A","B"],this.supportsBroadcasting=!0,this.packedInputs=!0,this.packedOutput=!0,this.outputShape=T.assertAndGetBroadcastShape(t,n);let r=this.outputShape.length;this.enableShapeUniforms=fs(r);let a="";if(s)if(r===0||v.sizeFromShape(this.outputShape)===1)a=` + `}},Rh=` + result.r = isNaN.r ? NAN : result.r; + result.g = isNaN.g ? NAN : result.g; + result.b = isNaN.b ? NAN : result.b; + result.a = isNaN.a ? NAN : result.a; +`,_h=class{constructor(e,t,n,s=!1){this.variableNames=["A","B"],this.supportsBroadcasting=!0,this.packedInputs=!0,this.packedOutput=!0,this.outputShape=T.assertAndGetBroadcastShape(t,n);let r=this.outputShape.length;this.enableShapeUniforms=ds(r);let a="";if(s)if(r===0||v.sizeFromShape(this.outputShape)===1)a=` result.y = 0.; result.z = 0.; result.w = 0.; `;else if(a=` - ${kt(r)} coords = getOutputCoords(); + ${Tt(r)} coords = getOutputCoords(); `,r===1)this.enableShapeUniforms?a+=` result.y = (coords + 1) >= outShape ? 0. : result.y; result.z = 0.; @@ -1275,7 +1275,7 @@ vec2 packedUVfrom3D(int texNumR, int texNumC, result.y = (coords + 1) >= ${this.outputShape[0]} ? 0. : result.y; result.z = 0.; result.w = 0.; - `;else{let i=us("coords",r);this.enableShapeUniforms?a+=` + `;else{let i=os("coords",r);this.enableShapeUniforms?a+=` bool nextRowOutOfBounds = (${i[r-2]} + 1) >= outShape[${r} - 2]; bool nextColOutOfBounds = @@ -1305,21 +1305,13 @@ vec2 packedUVfrom3D(int texNumR, int texNumC, setOutput(result); } - `}};function Vs(e){let{inputs:t,backend:n}=e,{x:s}=t;return n.incRef(s.dataId),{dataId:s.dataId,shape:s.shape,dtype:s.dtype}}var fse={kernelName:zo,backendName:"webgl",kernelFunc:Vs};function xi(e){let{inputs:t,backend:n}=e,{real:s,imag:r}=t,a=n.makeTensorInfo(s.shape,"complex64"),o=n.texData.get(a.dataId),i=Vs({inputs:{x:s},backend:n}),l=Vs({inputs:{x:r},backend:n});return o.complexTensorInfos={real:i,imag:l},a}var mse={kernelName:jp,backendName:"webgl",kernelFunc:xi},O9="return (a < 0.) ? b * a : a;",M9=` + `}};function Ls(e){let{inputs:t,backend:n}=e,{x:s}=t;return n.incRef(s.dataId),{dataId:s.dataId,shape:s.shape,dtype:s.dtype}}var Kne={kernelName:Fo,backendName:"webgl",kernelFunc:Ls};function gi(e){let{inputs:t,backend:n}=e,{real:s,imag:r}=t,a=n.makeTensorInfo(s.shape,"complex64"),o=n.texData.get(a.dataId),i=Ls({inputs:{x:s},backend:n}),l=Ls({inputs:{x:r},backend:n});return o.complexTensorInfos={real:i,imag:l},a}var Zne={kernelName:Ep,backendName:"webgl",kernelFunc:gi},b9="return (a < 0.) ? b * a : a;",v9=` vec4 aLessThanZero = vec4(lessThan(a, vec4(0.))); return (aLessThanZero * (b * a)) + ((vec4(1.0) - aLessThanZero) * a); -`;function gse(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{alpha:a}=s,o=n.makeTensorInfo([],"float32",v.createScalarValue(a,"float32")),i=H().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new jh(M9,r.shape,o.shape):new Ic(O9,r.shape,o.shape),l=n.runWebGLProgram(i,[r,o],"float32");return n.disposeIntermediateTensorInfo(o),l}var yse={kernelName:Lo,backendName:"webgl",kernelFunc:gse},z9="return (a < 0.) ? b * a : a;",L9=` +`;function Yne(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{alpha:a}=s,o=n.makeTensorInfo([],"float32",v.createScalarValue(a,"float32")),i=U().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new _h(v9,r.shape,o.shape):new hc(b9,r.shape,o.shape),l=n.runWebGLProgram(i,[r,o],"float32");return n.disposeIntermediateTensorInfo(o),l}var Jne={kernelName:Oo,backendName:"webgl",kernelFunc:Yne},w9="return (a < 0.) ? b * a : a;",k9=` vec4 aLessThanZero = vec4(lessThan(a, vec4(0.))); return (aLessThanZero * (b * a)) + ((vec4(1.0) - aLessThanZero) * a); -`;function Ase(e){let{inputs:t,backend:n}=e,{x:s,alpha:r}=t,a=H().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new jh(L9,s.shape,r.shape):new Ic(z9,s.shape,r.shape);return n.runWebGLProgram(a,[s,r],"float32")}var xse={kernelName:Yo,backendName:"webgl",kernelFunc:Ase},xd="if (isnan(x)) return x;",bse=` - if (isnan(a)) return a; - if (isnan(b)) return b; -`,vse=` - result.r = isNaN.r > 0. ? NAN : result.r; - result.g = isNaN.g > 0. ? NAN : result.g; - result.b = isNaN.b > 0. ? NAN : result.b; - result.a = isNaN.a > 0. ? NAN : result.a; -`;function ht({opSnippet:e,packedOpSnippet:t,cpuKernelImpl:n,dtype:s}){return({inputs:r,backend:a})=>{let{x:o}=r,i=a,l=s||o.dtype;if(i.shouldExecuteOnCPU([o])&&n!=null){let p=i.texData.get(o.dataId),d=n(p.values,l);return i.makeTensorInfo(o.shape,l,d)}let u=H().getBool("WEBGL_PACK_UNARY_OPERATIONS")&&t!=null,c;return u?c=new el(o.shape,t):c=new Sa(o.shape,e),i.runWebGLProgram(c,[o],l)}}function Bn({opSnippet:e,packedOpSnippet:t,checkOutOfBounds:n=!1,supportsComplex:s=!1,cpuKernelImpl:r,dtype:a}){return({inputs:o,backend:i})=>{let{a:l,b:u}=o,c=i;if(s&&l.dtype==="complex64"){let f=c.texData.get(l.dataId),m=c.texData.get(u.dataId),[g,y]=[[f.complexTensorInfos.real,m.complexTensorInfos.real],[f.complexTensorInfos.imag,m.complexTensorInfos.imag]].map(A=>{let[b,w]=A,k={dataId:b.dataId,dtype:b.dtype,shape:l.shape},C={dataId:w.dataId,dtype:w.dtype,shape:u.shape},E=new Ic(e,l.shape,u.shape);return c.runWebGLProgram(E,[k,C],Hn(b.dtype,w.dtype))}),x=xi({inputs:{real:g,imag:y},backend:c});return c.disposeIntermediateTensorInfo(g),c.disposeIntermediateTensorInfo(y),x}let p=a||Hn(l.dtype,u.dtype);if((l.dtype==="string"||u.dtype==="string"||c.shouldExecuteOnCPU([l,u]))&&r!=null){let f=c.texData.get(l.dataId).values,m=c.texData.get(u.dataId).values,g=l.dtype==="string"?T.fromUint8ToStringArray(f):f,y=l.dtype==="string"?T.fromUint8ToStringArray(m):m,[x,A]=r(l.shape,u.shape,g,y,p),b=c.makeTensorInfo(A,p),w=c.texData.get(b.dataId);return w.values=x,b}let d=H().getBool("WEBGL_PACK_BINARY_OPERATIONS")&&t!=null,h;return d?h=new jh(t,l.shape,u.shape,n):h=new Ic(e,l.shape,u.shape),c.runWebGLProgram(h,[l,u],p)}}function zp(e,t=!1){if(e==="linear")return t?Jne:qne;if(e==="relu")return t?ese:Kne;if(e==="elu")return t?Qne:Xne;if(e==="relu6")return t?tse:Zne;if(e==="prelu")return t?L9:z9;if(e==="leakyrelu")return t?M9:O9;if(e==="sigmoid")return t?nse:Yne;throw new Error(`Activation ${e} has not been implemented for the WebGL backend.`)}var B9=class{constructor(e,t,n,s=!1,r=!1,a=!1,o=null,i=!1,l=!1){this.variableNames=["matrixA","matrixB"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=n,this.enableShapeUniforms=fs(this.outputShape.length);let u=s?e[1]:e[2],c=Math.ceil(u/2),p=s?"i * 2, rc.y":"rc.y, i * 2",d=r?"rc.z, i * 2":"i * 2, rc.z",h=s?["a.xxyy","a.zzww"]:["a.xxzz","a.yyww"],f=r?["b.xzxz","b.ywyw"]:["b.xyxy","b.zwzw"],m="",g="";o&&(i?m=`vec4 activation(vec4 a) { +`;function Qne(e){let{inputs:t,backend:n}=e,{x:s,alpha:r}=t,a=U().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new _h(k9,s.shape,r.shape):new hc(w9,s.shape,r.shape);return n.runWebGLProgram(a,[s,r],"float32")}var ese={kernelName:Xo,backendName:"webgl",kernelFunc:Qne},id="if (isnan(x)) return x;";function pt({opSnippet:e,packedOpSnippet:t,cpuKernelImpl:n,dtype:s}){return({inputs:r,backend:a})=>{let{x:o}=r,i=a,l=s||o.dtype;if(i.shouldExecuteOnCPU([o])&&n!=null){let p=i.texData.get(o.dataId),d=n(p.values,l);return i.makeTensorInfo(o.shape,l,d)}let u=U().getBool("WEBGL_PACK_UNARY_OPERATIONS")&&t!=null,c;return u?c=new ji(o.shape,t):c=new xa(o.shape,e),i.runWebGLProgram(c,[o],l)}}function Wn({opSnippet:e,packedOpSnippet:t,checkOutOfBounds:n=!1,supportsComplex:s=!1,cpuKernelImpl:r,dtype:a}){return({inputs:o,backend:i})=>{let{a:l,b:u}=o,c=i;if(s&&l.dtype==="complex64"){let f=c.texData.get(l.dataId),m=c.texData.get(u.dataId),[g,y]=[[f.complexTensorInfos.real,m.complexTensorInfos.real],[f.complexTensorInfos.imag,m.complexTensorInfos.imag]].map(A=>{let[b,w]=A,k={dataId:b.dataId,dtype:b.dtype,shape:l.shape},C={dataId:w.dataId,dtype:w.dtype,shape:u.shape},N=new hc(e,l.shape,u.shape);return c.runWebGLProgram(N,[k,C],jn(b.dtype,w.dtype))}),x=gi({inputs:{real:g,imag:y},backend:c});return c.disposeIntermediateTensorInfo(g),c.disposeIntermediateTensorInfo(y),x}let p=a||jn(l.dtype,u.dtype);if((l.dtype==="string"||u.dtype==="string"||c.shouldExecuteOnCPU([l,u]))&&r!=null){let f=c.texData.get(l.dataId).values,m=c.texData.get(u.dataId).values,g=l.dtype==="string"?T.fromUint8ToStringArray(f):f,y=l.dtype==="string"?T.fromUint8ToStringArray(m):m,[x,A]=r(l.shape,u.shape,g,y,p),b=c.makeTensorInfo(A,p),w=c.texData.get(b.dataId);return w.values=x,b}let d=U().getBool("WEBGL_PACK_BINARY_OPERATIONS")&&t!=null,h;return d?h=new _h(t,l.shape,u.shape,n):h=new hc(e,l.shape,u.shape),c.runWebGLProgram(h,[l,u],p)}}function vp(e,t=!1){if(e==="linear")return t?$ne:Nne;if(e==="relu")return t?Fne:Rne;if(e==="elu")return t?Pne:Ene;if(e==="relu6")return t?One:_ne;if(e==="prelu")return t?k9:w9;if(e==="leakyrelu")return t?v9:b9;if(e==="sigmoid")return t?Mne:Dne;throw new Error(`Activation ${e} has not been implemented for the WebGL backend.`)}var S9=class{constructor(e,t,n,s=!1,r=!1,a=!1,o=null,i=!1,l=!1){this.variableNames=["matrixA","matrixB"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=n,this.enableShapeUniforms=ds(this.outputShape.length);let u=s?e[1]:e[2],c=Math.ceil(u/2),p=s?"i * 2, rc.y":"rc.y, i * 2",d=r?"rc.z, i * 2":"i * 2, rc.z",h=s?["a.xxyy","a.zzww"]:["a.xxzz","a.yyww"],f=r?["b.xzxz","b.ywyw"]:["b.xyxy","b.zwzw"],m="",g="";o&&(i?m=`vec4 activation(vec4 a) { vec4 b = getPreluActivationWeightsAtOutCoords(); ${o} }`:l?m=`vec4 activation(vec4 a) { @@ -1358,7 +1350,7 @@ vec2 packedUVfrom3D(int texNumR, int texNumC, setOutput(result); } - `}},B7={REAL:"return areal * breal - aimag * bimag;",IMAG:"return areal * bimag + aimag * breal;"},W7=class{constructor(e,t,n){this.variableNames=["AReal","AImag","BReal","BImag"],this.outputShape=T.assertAndGetBroadcastShape(t,n),this.userCode=` + `}},x7={REAL:"return areal * breal - aimag * bimag;",IMAG:"return areal * bimag + aimag * breal;"},b7=class{constructor(e,t,n){this.variableNames=["AReal","AImag","BReal","BImag"],this.outputShape=T.assertAndGetBroadcastShape(t,n),this.userCode=` float binaryOpComplex( float areal, float aimag, float breal, float bimag) { ${e} @@ -1371,7 +1363,7 @@ vec2 packedUVfrom3D(int texNumR, int texNumC, float bimag = getBImagAtOutCoords(); setOutput(binaryOpComplex(areal, aimag, breal, bimag)); } - `}},V7="return a * b;";function gb(e){let{inputs:t,backend:n}=e,{a:s,b:r}=t,a=T.upcastType(s.dtype,r.dtype);if(s.dtype==="complex64"){let i=n.texData.get(s.dataId),l=n.texData.get(r.dataId),u=new W7(B7.REAL,s.shape,r.shape),c=new W7(B7.IMAG,s.shape,r.shape),p=[{dataId:i.complexTensorInfos.real.dataId,dtype:i.complexTensorInfos.real.dtype,shape:s.shape},{dataId:i.complexTensorInfos.imag.dataId,dtype:i.complexTensorInfos.imag.dtype,shape:s.shape},{dataId:l.complexTensorInfos.real.dataId,dtype:l.complexTensorInfos.real.dtype,shape:r.shape},{dataId:l.complexTensorInfos.imag.dataId,dtype:l.complexTensorInfos.imag.dtype,shape:r.shape}],d=n.runWebGLProgram(u,p,"float32"),h=n.runWebGLProgram(c,p,"float32"),f=xi({inputs:{real:d,imag:h},backend:n});return n.disposeIntermediateTensorInfo(d),n.disposeIntermediateTensorInfo(h),f}if(n.shouldExecuteOnCPU([s,r])){let i=n.texData.get(s.dataId),l=n.texData.get(r.dataId),[u,c]=xne(s.shape,r.shape,i.values,l.values,a),p=n.makeTensorInfo(c,a),d=n.texData.get(p.dataId);return d.values=u,p}let o;return H().getBool("WEBGL_PACK_BINARY_OPERATIONS")?o=new jh(V7,s.shape,r.shape):o=new Ic(V7,s.shape,r.shape),n.runWebGLProgram(o,[s,r],a)}var wse={kernelName:Xo,backendName:"webgl",kernelFunc:gb};function kse(e,t,n){let s=[ml(e.shape),...gl(e.shape)],r={dtype:e.dtype,shape:s,dataId:e.dataId},a=[ml(t),...gl(t)],o=new $9(a,s),i=!0,l=[s],u=n.runWebGLProgram(o,[r],e.dtype,l,i);return{dataId:u.dataId,shape:t,dtype:u.dtype}}function we(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{shape:a}=s,o=n,i=v.sizeFromShape(r.shape),l=v.inferFromImplicitShape(a,i),u=v.sizeFromShape(l);v.assert(i===u,()=>`The new shape (${l}) has ${u} elements and the old shape (${r.shape}) has ${i} elements. The new shape and old shape must have the same number of elements.`);let c=o.texData.get(r.dataId);return c.isPacked&&!Mp(r.shape,l)&&!(c.texture!==null&&Mp(c.shape,l))?kse(r,l,o):(o.incRef(r.dataId),{dataId:r.dataId,shape:l,dtype:r.dtype})}var Sse={kernelName:jl,backendName:"webgl",kernelFunc:we},U7=class{constructor(e,t){this.variableNames=["x"];let{windowSize:n,batchSize:s,inSize:r,outSize:a}=e;this.outputShape=[s,a];let o=Math.floor(n/4)*4,i=n%4,l="sumValue += dot(values, ones);";if(t!=null){let c=1/t;l=`sumValue += dot(values * ${v.isInt(c)?c.toPrecision(2):c}, ones);`}let u="";r%n>0&&(u=` + `}},v7="return a * b;";function Yx(e){let{inputs:t,backend:n}=e,{a:s,b:r}=t,a=T.upcastType(s.dtype,r.dtype);if(s.dtype==="complex64"){let i=n.texData.get(s.dataId),l=n.texData.get(r.dataId),u=new b7(x7.REAL,s.shape,r.shape),c=new b7(x7.IMAG,s.shape,r.shape),p=[{dataId:i.complexTensorInfos.real.dataId,dtype:i.complexTensorInfos.real.dtype,shape:s.shape},{dataId:i.complexTensorInfos.imag.dataId,dtype:i.complexTensorInfos.imag.dtype,shape:s.shape},{dataId:l.complexTensorInfos.real.dataId,dtype:l.complexTensorInfos.real.dtype,shape:r.shape},{dataId:l.complexTensorInfos.imag.dataId,dtype:l.complexTensorInfos.imag.dtype,shape:r.shape}],d=n.runWebGLProgram(u,p,"float32"),h=n.runWebGLProgram(c,p,"float32"),f=gi({inputs:{real:d,imag:h},backend:n});return n.disposeIntermediateTensorInfo(d),n.disposeIntermediateTensorInfo(h),f}if(n.shouldExecuteOnCPU([s,r])){let i=n.texData.get(s.dataId),l=n.texData.get(r.dataId),[u,c]=Qte(s.shape,r.shape,i.values,l.values,a),p=n.makeTensorInfo(c,a),d=n.texData.get(p.dataId);return d.values=u,p}let o;return U().getBool("WEBGL_PACK_BINARY_OPERATIONS")?o=new _h(v7,s.shape,r.shape):o=new hc(v7,s.shape,r.shape),n.runWebGLProgram(o,[s,r],a)}var tse={kernelName:Ho,backendName:"webgl",kernelFunc:Yx};function nse(e,t,n){let s=[il(e.shape),...ll(e.shape)],r={dtype:e.dtype,shape:s,dataId:e.dataId},a=[il(t),...ll(t)],o=new A9(a,s),i=!0,l=[s],u=n.runWebGLProgram(o,[r],e.dtype,l,i);return{dataId:u.dataId,shape:t,dtype:u.dtype}}function be(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{shape:a}=s,o=n,i=v.sizeFromShape(r.shape),l=v.inferFromImplicitShape(a,i),u=v.sizeFromShape(l);v.assert(i===u,()=>`The new shape (${l}) has ${u} elements and the old shape (${r.shape}) has ${i} elements. The new shape and old shape must have the same number of elements.`);let c=o.texData.get(r.dataId);return c.isPacked&&!bp(r.shape,l)&&!(c.texture!==null&&bp(c.shape,l))?nse(r,l,o):(o.incRef(r.dataId),{dataId:r.dataId,shape:l,dtype:r.dtype})}var sse={kernelName:zl,backendName:"webgl",kernelFunc:be},w7=class{constructor(e,t){this.variableNames=["x"];let{windowSize:n,batchSize:s,inSize:r,outSize:a}=e;this.outputShape=[s,a];let o=Math.floor(n/4)*4,i=n%4,l="sumValue += dot(values, ones);";if(t!=null){let c=1/t;l=`sumValue += dot(values * ${v.isInt(c)?c.toPrecision(2):c}, ones);`}let u="";r%n>0&&(u=` if (inIdx < 0 || inIdx >= ${r}) { return 0.0; } @@ -1424,7 +1416,7 @@ vec2 packedUVfrom3D(int texNumR, int texNumC, } setOutput(sumValue); } - `}},Ise=class{constructor(e,t){this.variableNames=["x"];let{windowSize:n,batchSize:s,inSize:r,outSize:a}=e;this.outputShape=[s,a];let o="0.0",i="";t==="prod"?o="1.0":t==="min"?(o="1.0 / 1e-20",i="min"):t==="max"&&(o="-1.0 / 1e-20",i="max");let l=`${t}(${t}(${t}(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])`;t==="sum"?l="sumValue":t==="prod"?l="prodValue":t==="all"?l="allValue":t==="any"&&(l="anyValue");let u=Math.floor(n/4)*4,c=n%4,p=` + `}},rse=class{constructor(e,t){this.variableNames=["x"];let{windowSize:n,batchSize:s,inSize:r,outSize:a}=e;this.outputShape=[s,a];let o="0.0",i="";t==="prod"?o="1.0":t==="min"?(o="1.0 / 1e-20",i="min"):t==="max"&&(o="-1.0 / 1e-20",i="max");let l=`${t}(${t}(${t}(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])`;t==="sum"?l="sumValue":t==="prod"?l="prodValue":t==="all"?l="allValue":t==="any"&&(l="anyValue");let u=Math.floor(n/4)*4,c=n%4,p=` if (${t==="sum"}) { sumValue += dot(values, ones); } else if (${t==="prod"}) { @@ -1516,12 +1508,12 @@ vec2 packedUVfrom3D(int texNumR, int texNumC, } setOutput(${l}); } - `}};function Cse(e){let t=[];for(;t.length===0||t[t.length-1].outSize!==1;){let n=t.length?t[t.length-1].outSize:e[1],s=T.computeOptimalWindowSize(n);t.push({inSize:n,windowSize:s,outSize:Math.ceil(n/s)})}return t}function bu(e,t,n,s){let r=Cse(e.shape),a=e;for(let o=0;o6)throw Error(`Transpose for rank ${t} is not yet supported`);let n=["resRC.x","resRC.y","resRC.z","resRC.w","resRC.u","resRC.v"],s=new Array(t);for(let r=0;r6)throw Error(`Packed transpose for rank ${this.rank} is not yet supported.`);let s=kt(this.rank),r=D9("rc",this.rank),a=new Array(this.rank);for(let u=0;u6)throw Error(`Transpose for rank ${t} is not yet supported`);let n=["resRC.x","resRC.y","resRC.z","resRC.w","resRC.u","resRC.v"],s=new Array(t);for(let r=0;r6)throw Error(`Packed transpose for rank ${this.rank} is not yet supported.`);let s=Tt(this.rank),r=y9("rc",this.rank),a=new Array(this.rank);for(let u=0;u`Error in matMul: inner shapes (${p}) and (${d}) of Tensors with shapes ${e.shape} and ${t.shape} and transposeA=${n} and transposeB=${s} must match.`);let w=n?[y,p,h]:[y,h,p],k=s?[x,f,d]:[x,d,f],C=we({inputs:{x:e},backend:r,attrs:{shape:w}}),E=we({inputs:{x:t},backend:r,attrs:{shape:k}}),_=[C,E],$=Math.max(y,x),R=n?C.shape[1]:C.shape[2],P=a!=null,S=o!=null,M=l==="leakyrelu",L=l!=null?zp(l,!0):null,U=P||S||M||L!=null,K;if((h===1||f===1)&&R>W9&&U===!1){let Z=C,J=E;n&&(Z=cs({inputs:{x:C},backend:r,attrs:{perm:[0,2,1]}}),_.push(Z)),s&&(J=cs({inputs:{x:E},backend:r,attrs:{perm:[0,2,1]}}),_.push(J));let te=f!==1,le=f===1,ae=Z;te&&(ae=we({inputs:{x:Z},backend:r,attrs:{shape:[$,R,1]}}),_.push(ae));let pe=f===1?2:1,ce=J;le&&(ce=we({inputs:{x:J},backend:r,attrs:{shape:[$,1,R]}}),_.push(ce));let xe=gb({inputs:{a:ae,b:ce},backend:r});K=O2({inputs:{x:xe},backend:r,attrs:{axis:pe,keepDims:!0}}),_.push(xe)}else{let Z=Hn(e.dtype,t.dtype),J=new B9(w,k,[$,h,f],n,s,P,L,S,M),te=[C,E];if(a!=null&&te.push(a),S&&te.push(o),M){let le=r.makeTensorInfo([],"float32",v.createScalarValue(i,"float32"));te.push(le),_.push(le)}K=r.runWebGLProgram(J,te,Z)}let q=we({inputs:{x:K},backend:r,attrs:{shape:b}});_.push(K);for(let Z of _)r.disposeIntermediateTensorInfo(Z);return q}function $se(e){let{inputs:t,backend:n,attrs:s}=e,{a:r,b:a,bias:o,preluActivationWeights:i}=t,{transposeA:l,transposeB:u,activation:c,leakyreluAlpha:p}=s;return qm({a:r,b:a,transposeA:l,transposeB:u,backend:n,bias:o,preluActivationWeights:i,leakyreluAlpha:p,activation:c})}var Pse={kernelName:ao,backendName:"webgl",kernelFunc:$se},G7="return abs(x);";function Fse(e){let{inputs:t,backend:n}=e,{x:s}=t;if(n.shouldExecuteOnCPU([s])&&s.dtype!=="complex64"){let a=n.texData.get(s.dataId),o=R9(a.values);return n.makeTensorInfo(s.shape,s.dtype,o)}let r;return H().getBool("WEBGL_PACK_UNARY_OPERATIONS")?r=new el(s.shape,G7):r=new Sa(s.shape,G7),n.runWebGLProgram(r,[s],s.dtype)}var Ose={kernelName:xl,backendName:"webgl",kernelFunc:Fse},Mse=br+` + `}};function c2(e,t,n){let s=U().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new lse(e.shape,t):new ose(e.shape,t);return n.runWebGLProgram(s,[e],e.dtype)}function use(e,t,n,s){let r=t,a=e.shape.length,o=v.parseAxisParam(r,e.shape),i=o,l=T.getAxesPermutation(i,a),u=l!=null,c=e;u&&(c=c2(e,l,s),i=T.getInnerMostAxes(i.length,a)),T.assertAxesAreInnerMostDims("sum",i,a);let[p,d]=T.computeOutAndReduceShapes(c.shape,i),h=p;n&&(h=T.expandShapeToKeepDim(p,o));let f=v.sizeFromShape(d),g=v.sizeFromShape(e.shape)/f,y=be({inputs:{x:c},attrs:{shape:[g,f]},backend:s}),x=qp(e.dtype),A=pu(y,x,"sum",s),b=be({inputs:{x:A},attrs:{shape:h},backend:s});return s.disposeIntermediateTensorInfo(y),s.disposeIntermediateTensorInfo(A),u&&s.disposeIntermediateTensorInfo(c),b}function d2(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{axis:a,keepDims:o}=s;return use(r,a,o,n)}var cse={kernelName:ri,backendName:"webgl",kernelFunc:d2};function is(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{perm:a}=s,o=n,i=r.shape.length,l=new Array(i);for(let c=0;c`Error in matMul: inner shapes (${p}) and (${d}) of Tensors with shapes ${e.shape} and ${t.shape} and transposeA=${n} and transposeB=${s} must match.`);let w=n?[y,p,h]:[y,h,p],k=s?[x,f,d]:[x,d,f],C=be({inputs:{x:e},backend:r,attrs:{shape:w}}),N=be({inputs:{x:t},backend:r,attrs:{shape:k}}),R=[C,N],D=Math.max(y,x),E=n?C.shape[1]:C.shape[2],$=a!=null,S=o!=null,F=l==="leakyrelu",z=l!=null?vp(l,!0):null,V=$||S||F||z!=null,j;if((h===1||f===1)&&E>I9&&V===!1){let q=C,K=N;n&&(q=is({inputs:{x:C},backend:r,attrs:{perm:[0,2,1]}}),R.push(q)),s&&(K=is({inputs:{x:N},backend:r,attrs:{perm:[0,2,1]}}),R.push(K));let ne=f!==1,ae=f===1,re=q;ne&&(re=be({inputs:{x:q},backend:r,attrs:{shape:[D,E,1]}}),R.push(re));let ue=f===1?2:1,oe=K;ae&&(oe=be({inputs:{x:K},backend:r,attrs:{shape:[D,1,E]}}),R.push(oe));let Ae=Yx({inputs:{a:re,b:oe},backend:r});j=d2({inputs:{x:Ae},backend:r,attrs:{axis:ue,keepDims:!0}}),R.push(Ae)}else{let q=jn(e.dtype,t.dtype),K=new S9(w,k,[D,h,f],n,s,$,z,S,F),ne=[C,N];if(a!=null&&ne.push(a),S&&ne.push(o),F){let ae=r.makeTensorInfo([],"float32",v.createScalarValue(i,"float32"));ne.push(ae),R.push(ae)}j=r.runWebGLProgram(K,ne,q)}let G=be({inputs:{x:j},backend:r,attrs:{shape:b}});R.push(j);for(let q of R)r.disposeIntermediateTensorInfo(q);return G}function pse(e){let{inputs:t,backend:n,attrs:s}=e,{a:r,b:a,bias:o,preluActivationWeights:i}=t,{transposeA:l,transposeB:u,activation:c,leakyreluAlpha:p}=s;return Sm({a:r,b:a,transposeA:l,transposeB:u,backend:n,bias:o,preluActivationWeights:i,leakyreluAlpha:p,activation:c})}var hse={kernelName:no,backendName:"webgl",kernelFunc:pse},k7="return abs(x);";function fse(e){let{inputs:t,backend:n}=e,{x:s}=t;if(n.shouldExecuteOnCPU([s])&&s.dtype!=="complex64"){let a=n.texData.get(s.dataId),o=m9(a.values);return n.makeTensorInfo(s.shape,s.dtype,o)}let r;return U().getBool("WEBGL_PACK_UNARY_OPERATIONS")?r=new ji(s.shape,k7):r=new xa(s.shape,k7),n.runWebGLProgram(r,[s],s.dtype)}var mse={kernelName:dl,backendName:"webgl",kernelFunc:fse},gse=br+` if (abs(x) > 1.) { return NAN; } return acos(x); -`,zse=ht({opSnippet:Mse}),Lse={kernelName:Nc,backendName:"webgl",kernelFunc:zse},Bse=br+` +`,yse=pt({opSnippet:gse}),Ase={kernelName:gc,backendName:"webgl",kernelFunc:yse},xse=br+` if (x < 1.0) return NAN; -return log(x + sqrt(x * x - 1.0));`,Wse=ht({opSnippet:Bse}),Vse={kernelName:Ec,backendName:"webgl",kernelFunc:Wse},H7="return a + b;",Use=Bn({opSnippet:H7,packedOpSnippet:H7,supportsComplex:!0,cpuKernelImpl:Qte}),Gse={kernelName:Da,backendName:"webgl",kernelFunc:Use},Hse=class{constructor(e,t){this.outputShape=[],this.outputShape=e,this.variableNames=t.map((r,a)=>`T${a}`);let n=[];this.variableNames.forEach(r=>{n.push(`float v${r} = get${r}AtOutCoords();`)});let s=this.variableNames.map(r=>`v${r}`).join(" + ");this.userCode=` +return log(x + sqrt(x * x - 1.0));`,bse=pt({opSnippet:xse}),vse={kernelName:yc,backendName:"webgl",kernelFunc:bse},S7="return a + b;",wse=Wn({opSnippet:S7,packedOpSnippet:S7,supportsComplex:!0,cpuKernelImpl:$te}),kse={kernelName:Ta,backendName:"webgl",kernelFunc:wse},Sse=class{constructor(e,t){this.outputShape=[],this.outputShape=e,this.variableNames=t.map((r,a)=>`T${a}`);let n=[];this.variableNames.forEach(r=>{n.push(`float v${r} = get${r}AtOutCoords();`)});let s=this.variableNames.map(r=>`v${r}`).join(" + ");this.userCode=` void main() { ${n.join(` `)} @@ -1553,7 +1545,7 @@ return log(x + sqrt(x * x - 1.0));`,Wse=ht({opSnippet:Bse}),Vse={kernelName:Ec,b float result = ${s}; setOutput(result); } - `}},jse=class{constructor(e,t){this.outputShape=[],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=e,this.variableNames=t.map((r,a)=>`T${a}`);let n=[];this.variableNames.forEach(r=>{n.push(`vec4 v${r} = get${r}AtOutCoords();`)});let s=this.variableNames.map(r=>`v${r}`).join(" + ");this.userCode=` + `}},Ise=class{constructor(e,t){this.outputShape=[],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=e,this.variableNames=t.map((r,a)=>`T${a}`);let n=[];this.variableNames.forEach(r=>{n.push(`vec4 v${r} = get${r}AtOutCoords();`)});let s=this.variableNames.map(r=>`v${r}`).join(" + ");this.userCode=` void main() { ${n.join(` `)} @@ -1561,7 +1553,7 @@ return log(x + sqrt(x * x - 1.0));`,Wse=ht({opSnippet:Bse}),Vse={kernelName:Ec,b vec4 result = ${s}; setOutput(result); } - `}};function xm(e){let{inputs:t,backend:n}=e,s=t;if(s.length===1)return Vs({inputs:{x:s[0]},backend:n});if(s.length>H().get("WEBGL_MAX_TEXTURES_IN_SHADER")){let l=Math.floor(s.length/2),u=xm({inputs:s.slice(0,l),backend:n}),c=xm({inputs:s.slice(l),backend:n});return xm({inputs:[u,c],backend:n})}let r=s.map(l=>l.dtype).reduce((l,u)=>Hn(l,u)),a=s.map(l=>l.shape),i=H().getBool("WEBGL_PACK")?new jse(s[0].shape,a):new Hse(s[0].shape,a);return n.runWebGLProgram(i,s,r)}var qse={kernelName:xo,backendName:"webgl",kernelFunc:xm};function Xse(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{axis:a,keepDims:o}=s,i=r.shape.length,l=v.parseAxisParam(a,r.shape),u=l,c=T.getAxesPermutation(u,i),p=r;c!=null&&(p=cs({inputs:{x:r},backend:n,attrs:{perm:c}}),u=T.getInnerMostAxes(u.length,i)),T.assertAxesAreInnerMostDims("all",u,i);let[d,h]=T.computeOutAndReduceShapes(p.shape,u),f=v.sizeFromShape(h),m=we({inputs:{x:p},backend:n,attrs:{shape:[-1,f]}}),g=bu(m,m.dtype,"all",n),y;if(o){let x=T.expandShapeToKeepDim(d,l);y=we({inputs:{x:g},backend:n,attrs:{shape:x}})}else y=we({inputs:{x:g},backend:n,attrs:{shape:d}});return n.disposeIntermediateTensorInfo(m),n.disposeIntermediateTensorInfo(g),c!=null&&n.disposeIntermediateTensorInfo(p),y}var Kse={kernelName:Rc,backendName:"webgl",kernelFunc:Xse};function Zse(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{axis:a,keepDims:o}=s,i=r.shape.length,l=v.parseAxisParam(a,r.shape),u=l,c=T.getAxesPermutation(u,i),p=r;c!=null&&(p=cs({inputs:{x:r},backend:n,attrs:{perm:c}}),u=T.getInnerMostAxes(u.length,i)),T.assertAxesAreInnerMostDims("any",u,i);let[d,h]=T.computeOutAndReduceShapes(p.shape,u),f=v.sizeFromShape(h),m=we({inputs:{x:p},backend:n,attrs:{shape:[-1,f]}}),g=bu(m,m.dtype,"any",n),y;if(o){let x=T.expandShapeToKeepDim(d,l);y=we({inputs:{x:g},backend:n,attrs:{shape:x}})}else y=we({inputs:{x:g},backend:n,attrs:{shape:d}});return n.disposeIntermediateTensorInfo(m),n.disposeIntermediateTensorInfo(g),c!=null&&n.disposeIntermediateTensorInfo(p),y}var Yse={kernelName:_c,backendName:"webgl",kernelFunc:Zse},Jse=class{constructor(e,t,n){this.variableNames=["A"];let{windowSize:s,batchSize:r,outSize:a}=e;n||this.variableNames.push("bestIndicesA"),this.outputShape=[r,a];let o=t==="max"?">":"<",i=n?"inOffset + i;":"round(getBestIndicesA(batch, inOffset + i));";this.userCode=` + `}};function Zf(e){let{inputs:t,backend:n}=e,s=t;if(s.length===1)return Ls({inputs:{x:s[0]},backend:n});if(s.length>U().get("WEBGL_MAX_TEXTURES_IN_SHADER")){let l=Math.floor(s.length/2),u=Zf({inputs:s.slice(0,l),backend:n}),c=Zf({inputs:s.slice(l),backend:n});return Zf({inputs:[u,c],backend:n})}let r=s.map(l=>l.dtype).reduce((l,u)=>jn(l,u)),a=s.map(l=>l.shape),i=U().getBool("WEBGL_PACK")?new Ise(s[0].shape,a):new Sse(s[0].shape,a);return n.runWebGLProgram(i,s,r)}var Cse={kernelName:go,backendName:"webgl",kernelFunc:Zf};function Tse(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{axis:a,keepDims:o}=s,i=r.shape.length,l=v.parseAxisParam(a,r.shape),u=l,c=T.getAxesPermutation(u,i),p=r;c!=null&&(p=is({inputs:{x:r},backend:n,attrs:{perm:c}}),u=T.getInnerMostAxes(u.length,i)),T.assertAxesAreInnerMostDims("all",u,i);let[d,h]=T.computeOutAndReduceShapes(p.shape,u),f=v.sizeFromShape(h),m=be({inputs:{x:p},backend:n,attrs:{shape:[-1,f]}}),g=pu(m,m.dtype,"all",n),y;if(o){let x=T.expandShapeToKeepDim(d,l);y=be({inputs:{x:g},backend:n,attrs:{shape:x}})}else y=be({inputs:{x:g},backend:n,attrs:{shape:d}});return n.disposeIntermediateTensorInfo(m),n.disposeIntermediateTensorInfo(g),c!=null&&n.disposeIntermediateTensorInfo(p),y}var Nse={kernelName:Ac,backendName:"webgl",kernelFunc:Tse};function Ese(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{axis:a,keepDims:o}=s,i=r.shape.length,l=v.parseAxisParam(a,r.shape),u=l,c=T.getAxesPermutation(u,i),p=r;c!=null&&(p=is({inputs:{x:r},backend:n,attrs:{perm:c}}),u=T.getInnerMostAxes(u.length,i)),T.assertAxesAreInnerMostDims("any",u,i);let[d,h]=T.computeOutAndReduceShapes(p.shape,u),f=v.sizeFromShape(h),m=be({inputs:{x:p},backend:n,attrs:{shape:[-1,f]}}),g=pu(m,m.dtype,"any",n),y;if(o){let x=T.expandShapeToKeepDim(d,l);y=be({inputs:{x:g},backend:n,attrs:{shape:x}})}else y=be({inputs:{x:g},backend:n,attrs:{shape:d}});return n.disposeIntermediateTensorInfo(m),n.disposeIntermediateTensorInfo(g),c!=null&&n.disposeIntermediateTensorInfo(p),y}var Rse={kernelName:xc,backendName:"webgl",kernelFunc:Ese},_se=class{constructor(e,t,n){this.variableNames=["A"];let{windowSize:s,batchSize:r,outSize:a}=e;n||this.variableNames.push("bestIndicesA"),this.outputShape=[r,a];let o=t==="max"?">":"<",i=n?"inOffset + i;":"round(getBestIndicesA(batch, inOffset + i));";this.userCode=` void main() { ivec2 coords = getOutputCoords(); int batch = coords[0]; @@ -1581,7 +1573,7 @@ return log(x + sqrt(x * x - 1.0));`,Wse=ht({opSnippet:Bse}),Vse={kernelName:Ec,b } setOutput(float(bestIndex)); } - `}},Qse=class{constructor(e,t,n,s){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,v.assert(e.length>2,()=>`Packed arg${n.charAt(0).toUpperCase()+n.slice(1)} supports only inputs with rank above 2.`);let r=e[e.length-1],a=Math.ceil(r/t);this.outputShape=e.slice(0,-1),a>1&&this.outputShape.push(a),s||this.variableNames.push("bestIndicesA");let o=this.outputShape,i=o.length,l=kt(i),u=us("coords",i),c,p;if(a===1){p=i+1;let C=kt(p);c=` + `}},Dse=class{constructor(e,t,n,s){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,v.assert(e.length>2,()=>`Packed arg${n.charAt(0).toUpperCase()+n.slice(1)} supports only inputs with rank above 2.`);let r=e[e.length-1],a=Math.ceil(r/t);this.outputShape=e.slice(0,-1),a>1&&this.outputShape.push(a),s||this.variableNames.push("bestIndicesA");let o=this.outputShape,i=o.length,l=Tt(i),u=os("coords",i),c,p;if(a===1){p=i+1;let C=Tt(p);c=` ${C} sourceLocR = ${C}(${u.join()}, 0); ++${u[i-1]}; ${C} sourceLocG = ${C}(${u.join()}, 0); @@ -1597,7 +1589,7 @@ return log(x + sqrt(x * x - 1.0));`,Wse=ht({opSnippet:Bse}),Vse={kernelName:Ec,b ${l} sourceLocA = coords; --${u[i-1]}; ${l} sourceLocB = coords; - --${u[i-2]};`;let d=["x","y","z","w","u","v"].slice(0,p),h="."+d[p-1],f=d.map(C=>"int "+C),m=us("sourceLocR",p-1).concat("inIdx.r"),g=us("sourceLocG",p-1).concat("inIdx.g"),y=us("sourceLocB",p-1).concat("inIdx.b"),x=us("sourceLocA",p-1).concat("inIdx.a"),A=n==="max"?"greaterThan":"lessThan",b=s?"":` + --${u[i-2]};`;let d=["x","y","z","w","u","v"].slice(0,p),h="."+d[p-1],f=d.map(C=>"int "+C),m=os("sourceLocR",p-1).concat("inIdx.r"),g=os("sourceLocG",p-1).concat("inIdx.g"),y=os("sourceLocB",p-1).concat("inIdx.b"),x=os("sourceLocA",p-1).concat("inIdx.a"),A=n==="max"?"greaterThan":"lessThan",b=s?"":` inIdx = round(vec4(getBestIndicesAChannel(${m.join()}), getBestIndicesAChannel(${g.join()}), getBestIndicesAChannel(${y.join()}), @@ -1643,23 +1635,25 @@ return log(x + sqrt(x * x - 1.0));`,Wse=ht({opSnippet:Bse}),Vse={kernelName:Ec,b } setOutput(bestIndex); } - `}};function V9(e,t,n,s=null){let r=t.shape[0],a=t.shape[1];s!=null&&(r=s.shape[0],a=s.shape[1]);let o=T.computeOptimalWindowSize(a),i={windowSize:o,inSize:a,batchSize:r,outSize:Math.ceil(a/o)},l=new Jse(i,n,s==null),u=[t];s!=null&&u.push(s);let c=e.runWebGLProgram(l,u,"int32");if(c.shape[1]===1)return c;let p=V9(e,t,n,c);return e.disposeIntermediateTensorInfo(c),p}function U9(e,t,n,s=null){let r=s!=null?s.shape:t.shape,a=r[r.length-1],o=T.computeOptimalWindowSize(a),i=new Qse(r,o,n,s==null),l=s==null?[t]:[t,s],u=e.runWebGLProgram(i,l,"int32");if(u.shape.length===t.shape.length){let c=U9(e,t,n,u);return e.disposeIntermediateTensorInfo(u),c}return u}function G9(e,t,n,s){let r=[n];if(T.assertAxesAreInnerMostDims("arg"+s.charAt(0).toUpperCase()+s.slice(1),r,t.shape.length),!H().getBool("WEBGL_PACK_REDUCE")||t.shape.length<=2){let a=[],o=e.texData.get(t.dataId),i=o!==null&&o.isPacked,l=t;i&&(l=e.unpackTensor(t),a.push(l));let[u,c]=T.computeOutAndReduceShapes(l.shape,r),p=v.sizeFromShape(c),d=we({inputs:{x:l},backend:e,attrs:{shape:[-1,p]}});a.push(d);let h=V9(e,d,s);a.push(h);let f=we({inputs:{x:h},backend:e,attrs:{shape:u}});return a.forEach(m=>e.disposeIntermediateTensorInfo(m)),f}return U9(e,t,s)}function ere(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{axis:a}=s,o=v.parseAxisParam(a,r.shape),i=T.getAxesPermutation(o,r.shape.length),l=r,u=[];i!=null&&(l=cs({inputs:{x:r},backend:n,attrs:{perm:i}}),u.push(l),o=T.getInnerMostAxes(o.length,l.shape.length)),T.assertAxesAreInnerMostDims("argMax",[o[0]],l.shape.length);let c=G9(n,l,o[0],"max");return u.forEach(p=>n.disposeIntermediateTensorInfo(p)),c}var tre={kernelName:bo,backendName:"webgl",kernelFunc:ere};function nre(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{axis:a}=s,o=v.parseAxisParam(a,r.shape),i=T.getAxesPermutation(o,r.shape.length),l=r,u=[];i!=null&&(l=cs({inputs:{x:r},backend:n,attrs:{perm:i}}),u.push(l),o=T.getInnerMostAxes(o.length,l.shape.length)),T.assertAxesAreInnerMostDims("argMin",[o[0]],l.shape.length);let c=G9(n,l,o[0],"min");return u.forEach(p=>n.disposeIntermediateTensorInfo(p)),c}var sre={kernelName:Dc,backendName:"webgl",kernelFunc:nre},rre=br+` + `}};function C9(e,t,n,s=null){let r=t.shape[0],a=t.shape[1];s!=null&&(r=s.shape[0],a=s.shape[1]);let o=T.computeOptimalWindowSize(a),i={windowSize:o,inSize:a,batchSize:r,outSize:Math.ceil(a/o)},l=new _se(i,n,s==null),u=[t];s!=null&&u.push(s);let c=e.runWebGLProgram(l,u,"int32");if(c.shape[1]===1)return c;let p=C9(e,t,n,c);return e.disposeIntermediateTensorInfo(c),p}function T9(e,t,n,s=null){let r=s!=null?s.shape:t.shape,a=r[r.length-1],o=T.computeOptimalWindowSize(a),i=new Dse(r,o,n,s==null),l=s==null?[t]:[t,s],u=e.runWebGLProgram(i,l,"int32");if(u.shape.length===t.shape.length){let c=T9(e,t,n,u);return e.disposeIntermediateTensorInfo(u),c}return u}function N9(e,t,n,s){let r=[n];if(T.assertAxesAreInnerMostDims("arg"+s.charAt(0).toUpperCase()+s.slice(1),r,t.shape.length),!U().getBool("WEBGL_PACK_REDUCE")||t.shape.length<=2){let a=[],o=e.texData.get(t.dataId),i=o!==null&&o.isPacked,l=t;i&&(l=e.unpackTensor(t),a.push(l));let[u,c]=T.computeOutAndReduceShapes(l.shape,r),p=v.sizeFromShape(c),d=be({inputs:{x:l},backend:e,attrs:{shape:[-1,p]}});a.push(d);let h=C9(e,d,s);a.push(h);let f=be({inputs:{x:h},backend:e,attrs:{shape:u}});return a.forEach(m=>e.disposeIntermediateTensorInfo(m)),f}return T9(e,t,s)}function $se(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{axis:a}=s,o=v.parseAxisParam(a,r.shape),i=T.getAxesPermutation(o,r.shape.length),l=r,u=[];i!=null&&(l=is({inputs:{x:r},backend:n,attrs:{perm:i}}),u.push(l),o=T.getInnerMostAxes(o.length,l.shape.length)),T.assertAxesAreInnerMostDims("argMax",[o[0]],l.shape.length);let c=N9(n,l,o[0],"max");return u.forEach(p=>n.disposeIntermediateTensorInfo(p)),c}var Pse={kernelName:yo,backendName:"webgl",kernelFunc:$se};function Fse(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{axis:a}=s,o=v.parseAxisParam(a,r.shape),i=T.getAxesPermutation(o,r.shape.length),l=r,u=[];i!=null&&(l=is({inputs:{x:r},backend:n,attrs:{perm:i}}),u.push(l),o=T.getInnerMostAxes(o.length,l.shape.length)),T.assertAxesAreInnerMostDims("argMin",[o[0]],l.shape.length);let c=N9(n,l,o[0],"min");return u.forEach(p=>n.disposeIntermediateTensorInfo(p)),c}var Ose={kernelName:bc,backendName:"webgl",kernelFunc:Fse},Mse=br+` if (abs(x) > 1.) { return NAN; } return asin(x); -`,are=ht({opSnippet:rre}),ore={kernelName:$c,backendName:"webgl",kernelFunc:are},ire=br+"return log(x + sqrt(x * x + 1.0));",lre=ht({opSnippet:ire}),ure={kernelName:Pc,backendName:"webgl",kernelFunc:lre},cre=br+` +`,zse=pt({opSnippet:Mse}),Lse={kernelName:vc,backendName:"webgl",kernelFunc:zse},Bse=br+"return log(x + sqrt(x * x + 1.0));",Wse=pt({opSnippet:Bse}),Vse={kernelName:wc,backendName:"webgl",kernelFunc:Wse},Use=br+` return atan(x); -`,dre=ht({opSnippet:cre}),pre={kernelName:Fc,backendName:"webgl",kernelFunc:dre},hre=bse+` +`,Gse=pt({opSnippet:Use}),Hse={kernelName:kc,backendName:"webgl",kernelFunc:Gse},jse=Zx+` return atan(a, b); -`,fre=` +`,qse=` vec4 result = atan(a, b); - vec4 isNaN = min(vec4(isnan(a)) + vec4(isnan(b)), vec4(1.0)); - `+vse+` + bvec4 isNaNA = isnan(a); + bvec4 isNaNB = isnan(b); + bvec4 isNaN = bvec4(isNaNA.x || isNaNB.x, isNaNA.y || isNaNB.y, isNaNA.z || isNaNB.z, isNaNA.w || isNaNB.w); + `+Rh+` return result; -`,mre=Bn({opSnippet:hre,packedOpSnippet:fre}),gre={kernelName:bl,backendName:"webgl",kernelFunc:mre},yre=br+` +`,Xse=Wn({opSnippet:jse,packedOpSnippet:qse}),Kse={kernelName:pl,backendName:"webgl",kernelFunc:Xse},Zse=br+` if ((x < -1.0) || (x > 1.0)) return NAN; -return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernelName:Oc,backendName:"webgl",kernelFunc:Are},Lp=class{constructor(e,t,n,s=!1,r=!1){if(this.variableNames=["x"],t==="avg"&&n)throw new Error("Cannot compute positions for average pool.");let a=e.filterWidth,o=e.strideHeight,i=e.strideWidth,l=e.dilationHeight,u=e.dilationWidth,c=e.effectiveFilterHeight,p=e.effectiveFilterWidth,d=e.padInfo.top,h=e.padInfo.left;this.outputShape=e.outShape;let f=t==="avg",m=`((batch * ${e.inHeight} + xR) * ${e.inWidth} + xC) * ${e.inChannels} + d`,g=`(xR * ${e.inWidth} + xC) * ${e.inChannels} + d`,y="0.0";if(f||(y="-1.0 / 1e-20"),n){let C=">=";this.userCode=` +return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Yse=pt({opSnippet:Zse}),Jse={kernelName:Sc,backendName:"webgl",kernelFunc:Yse},wp=class{constructor(e,t,n,s=!1,r=!1){if(this.variableNames=["x"],t==="avg"&&n)throw new Error("Cannot compute positions for average pool.");let a=e.filterWidth,o=e.strideHeight,i=e.strideWidth,l=e.dilationHeight,u=e.dilationWidth,c=e.effectiveFilterHeight,p=e.effectiveFilterWidth,d=e.padInfo.top,h=e.padInfo.left;this.outputShape=e.outShape;let f=t==="avg",m=`((batch * ${e.inHeight} + xR) * ${e.inWidth} + xC) * ${e.inChannels} + d`,g=`(xR * ${e.inWidth} + xC) * ${e.inChannels} + d`,y="0.0";if(f||(y="-1.0 / 1e-20"),n){let C=">=";this.userCode=` const ivec2 strides = ivec2(${o}, ${i}); const ivec2 pads = ivec2(${d}, ${h}); @@ -1800,7 +1794,7 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel } setOutput(${A}); } - `}},yb=class{constructor(e,t,n,s=!1,r=!1){if(this.variableNames=["x"],t==="avg"&&n)throw new Error("Cannot compute positions for average pool.");let a=e.filterWidth,o=e.strideDepth,i=e.strideHeight,l=e.strideWidth,u=e.dilationDepth,c=e.dilationHeight,p=e.dilationWidth,d=e.effectiveFilterDepth,h=e.effectiveFilterHeight,f=e.effectiveFilterWidth,m=e.padInfo.front,g=e.padInfo.top,y=e.padInfo.left;this.outputShape=e.outShape;let x=t==="avg",A="0.0";if(x||(A="-1.0 / 1e-20"),n){let _=">=";this.userCode=` + `}},Jx=class{constructor(e,t,n,s=!1,r=!1){if(this.variableNames=["x"],t==="avg"&&n)throw new Error("Cannot compute positions for average pool.");let a=e.filterWidth,o=e.strideDepth,i=e.strideHeight,l=e.strideWidth,u=e.dilationDepth,c=e.dilationHeight,p=e.dilationWidth,d=e.effectiveFilterDepth,h=e.effectiveFilterHeight,f=e.effectiveFilterWidth,m=e.padInfo.front,g=e.padInfo.top,y=e.padInfo.left;this.outputShape=e.outShape;let x=t==="avg",A="0.0";if(x||(A="-1.0 / 1e-20"),n){let R=">=";this.userCode=` const ivec3 strides = ivec3(${o}, ${i}, ${l}); const ivec3 pads = ivec3(${m}, ${g}, ${y}); @@ -1851,7 +1845,7 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel // use the current value. float currMinMaxValue = mix( value, minMaxValue, minMaxValueFound); - if (value ${_} currMinMaxValue) { + if (value ${R} currMinMaxValue) { minMaxValue = value; minMaxValueFound = 1.0; minMaxPosition = ${s?r?`(((batch * ${e.inDepth} + xD) * ${e.inHeight} + xR) * ${e.inWidth} + xC) * ${e.inChannels} + ch`:`((xD * ${e.inHeight} + xR) * ${e.inWidth} + xC) * ${e.inChannels} + ch`:`wD * ${h} * ${f} + @@ -1862,7 +1856,7 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel } setOutput(float(minMaxPosition)); } - `;return}let b="max",w=`${t}(${t}(${t}(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])`;t==="avg"&&(w="avgValue / count");let k=Math.floor(a/4)*4,C=a%4,E=` + `;return}let b="max",w=`${t}(${t}(${t}(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])`;t==="avg"&&(w="avgValue / count");let k=Math.floor(a/4)*4,C=a%4,N=` if (${x}) { avgValue += dot(values, ones); } else { @@ -1927,7 +1921,7 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel getValue(batch, xD, xR, xC + 3 * ${p}, ch) ); - ${E} + ${N} } int xC = xCCorner + ${k}; @@ -1939,7 +1933,7 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel initializationValue ); - ${E} + ${N} } else if (${C===2}) { vec4 values = vec4( getValue(batch, xD, xR, xC, ch), @@ -1948,7 +1942,7 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel initializationValue ); - ${E} + ${N} } else if (${C===3}) { vec4 values = vec4( getValue(batch, xD, xR, xC, ch), @@ -1957,13 +1951,13 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel initializationValue ); - ${E} + ${N} } } setOutput(${w}); } } - `}};function bre(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t;hd(r,"avgPool");let{filterSize:a,strides:o,pad:i,dimRoundingMode:l}=s,u=1;v.assert(T.eitherStridesOrDilationsAreOne(o,u),()=>`Error in avgPool: Either strides or dilations must be 1. Got strides ${o} and dilations '${u}'`);let c=T.computePool2DInfo(r.shape,a,o,u,i,l);if(c.filterWidth===1&&c.filterHeight===1&&v.arraysEqual(c.inShape,c.outShape))return Vs({inputs:{x:r},backend:n});let p=new Lp(c,"avg",!1);return n.runWebGLProgram(p,[r],"float32")}var vre={kernelName:vo,backendName:"webgl",kernelFunc:bre};function wre(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{filterSize:a,strides:o,pad:i,dimRoundingMode:l,dataFormat:u}=s,c=[1,1,1],p=T.computePool3DInfo(r.shape,a,o,c,i,l,u),d=new yb(p,"avg",!1);return n.runWebGLProgram(d,[r],"float32")}var kre={kernelName:Hp,backendName:"webgl",kernelFunc:wre},Sre=class{constructor(e){this.variableNames=["dy"],this.outputShape=e.inShape;let t=e.filterHeight,n=e.filterWidth,s=e.strideHeight,r=e.strideWidth,a=e.dilationHeight,o=e.dilationWidth,i=e.effectiveFilterHeight,l=e.effectiveFilterWidth,u=i-1-e.padInfo.top,c=l-1-e.padInfo.left,p=1/(t*n);this.userCode=` + `}};function Qse(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t;td(r,"avgPool");let{filterSize:a,strides:o,pad:i,dimRoundingMode:l}=s,u=1;v.assert(T.eitherStridesOrDilationsAreOne(o,u),()=>`Error in avgPool: Either strides or dilations must be 1. Got strides ${o} and dilations '${u}'`);let c=T.computePool2DInfo(r.shape,a,o,u,i,l);if(c.filterWidth===1&&c.filterHeight===1&&v.arraysEqual(c.inShape,c.outShape))return Ls({inputs:{x:r},backend:n});let p=new wp(c,"avg",!1);return n.runWebGLProgram(p,[r],"float32")}var ere={kernelName:Ao,backendName:"webgl",kernelFunc:Qse};function tre(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{filterSize:a,strides:o,pad:i,dimRoundingMode:l,dataFormat:u}=s,c=[1,1,1],p=T.computePool3DInfo(r.shape,a,o,c,i,l,u),d=new Jx(p,"avg",!1);return n.runWebGLProgram(d,[r],"float32")}var nre={kernelName:Np,backendName:"webgl",kernelFunc:tre},sre=class{constructor(e){this.variableNames=["dy"],this.outputShape=e.inShape;let t=e.filterHeight,n=e.filterWidth,s=e.strideHeight,r=e.strideWidth,a=e.dilationHeight,o=e.dilationWidth,i=e.effectiveFilterHeight,l=e.effectiveFilterWidth,u=i-1-e.padInfo.top,c=l-1-e.padInfo.left,p=1/(t*n);this.userCode=` const ivec2 pads = ivec2(${u}, ${c}); const float avgMultiplier = float(${p}); @@ -2005,7 +1999,7 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel } setOutput(dotProd); } - `}},Ire=class{constructor(e){this.variableNames=["dy"],this.outputShape=e.inShape;let t=e.filterDepth,n=e.filterHeight,s=e.filterWidth,r=e.strideDepth,a=e.strideHeight,o=e.strideWidth,i=e.dilationDepth,l=e.dilationHeight,u=e.dilationWidth,c=e.effectiveFilterDepth,p=e.effectiveFilterHeight,d=e.effectiveFilterWidth,h=c-1-e.padInfo.front,f=p-1-e.padInfo.top,m=d-1-e.padInfo.left,g=1/(t*n*s);this.userCode=` + `}},rre=class{constructor(e){this.variableNames=["dy"],this.outputShape=e.inShape;let t=e.filterDepth,n=e.filterHeight,s=e.filterWidth,r=e.strideDepth,a=e.strideHeight,o=e.strideWidth,i=e.dilationDepth,l=e.dilationHeight,u=e.dilationWidth,c=e.effectiveFilterDepth,p=e.effectiveFilterHeight,d=e.effectiveFilterWidth,h=c-1-e.padInfo.front,f=p-1-e.padInfo.top,m=d-1-e.padInfo.left,g=1/(t*n*s);this.userCode=` const ivec3 pads = ivec3(${h}, ${f}, ${m}); const float avgMultiplier = float(${g}); @@ -2061,7 +2055,7 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel } setOutput(dotProd); } - `}};function Cre(e){let{inputs:t,backend:n,attrs:s}=e,{dy:r,input:a}=t,o=a,{filterSize:i,strides:l,pad:u,dimRoundingMode:c}=s,p=[1,1,1],d=T.computePool3DInfo(o.shape,i,l,p,u,c),h=new Ire(d);return n.runWebGLProgram(h,[r],o.dtype)}var Tre={kernelName:s0,backendName:"webgl",kernelFunc:Cre};function Nre(e){let{inputs:t,backend:n,attrs:s}=e,{dy:r,input:a}=t,o=a;hd([r,a],"avgPoolGrad");let{filterSize:i,strides:l,pad:u}=s,c=T.computePool2DInfo(o.shape,i,l,1,u),p=new Sre(c);return n.runWebGLProgram(p,[r],o.dtype)}var Ere={kernelName:n0,backendName:"webgl",kernelFunc:Nre};function Rre(e){let{inputs:t,backend:n,attrs:s}=e,{a:r,b:a}=t,{transposeA:o,transposeB:i}=s;return qm({a:r,b:a,transposeA:o,transposeB:i,backend:n})}var _re={kernelName:wo,backendName:"webgl",kernelFunc:Rre},Dre=class{constructor(e,t,n,s,r,a){this.outputShape=[],this.variableNames=["x","mean","variance"],T.assertAndGetBroadcastShape(e,t),T.assertAndGetBroadcastShape(e,n);let o="0.0";s!=null&&(T.assertAndGetBroadcastShape(e,s),this.variableNames.push("offset"),o="getOffsetAtOutCoords()");let i="1.0";r!=null&&(T.assertAndGetBroadcastShape(e,r),this.variableNames.push("scale"),i="getScaleAtOutCoords()"),this.outputShape=e,this.userCode=` + `}};function are(e){let{inputs:t,backend:n,attrs:s}=e,{dy:r,input:a}=t,o=a,{filterSize:i,strides:l,pad:u,dimRoundingMode:c}=s,p=[1,1,1],d=T.computePool3DInfo(o.shape,i,l,p,u,c),h=new rre(d);return n.runWebGLProgram(h,[r],o.dtype)}var ore={kernelName:$m,backendName:"webgl",kernelFunc:are};function ire(e){let{inputs:t,backend:n,attrs:s}=e,{dy:r,input:a}=t,o=a;td([r,a],"avgPoolGrad");let{filterSize:i,strides:l,pad:u}=s,c=T.computePool2DInfo(o.shape,i,l,1,u),p=new sre(c);return n.runWebGLProgram(p,[r],o.dtype)}var lre={kernelName:Dm,backendName:"webgl",kernelFunc:ire};function ure(e){let{inputs:t,backend:n,attrs:s}=e,{a:r,b:a}=t,{transposeA:o,transposeB:i}=s;return Sm({a:r,b:a,transposeA:o,transposeB:i,backend:n})}var cre={kernelName:xo,backendName:"webgl",kernelFunc:ure},dre=class{constructor(e,t,n,s,r,a){this.outputShape=[],this.variableNames=["x","mean","variance"],T.assertAndGetBroadcastShape(e,t),T.assertAndGetBroadcastShape(e,n);let o="0.0";s!=null&&(T.assertAndGetBroadcastShape(e,s),this.variableNames.push("offset"),o="getOffsetAtOutCoords()");let i="1.0";r!=null&&(T.assertAndGetBroadcastShape(e,r),this.variableNames.push("scale"),i="getScaleAtOutCoords()"),this.outputShape=e,this.userCode=` void main() { float x = getXAtOutCoords(); float mean = getMeanAtOutCoords(); @@ -2071,7 +2065,7 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel float inv = scale * inversesqrt(variance + float(${a})); setOutput(dot(vec3(x, -mean, offset), vec3(inv, inv, 1))); } - `}},$re=class{constructor(e,t,n,s,r,a){this.packedInputs=!0,this.packedOutput=!0,this.variableNames=["x","mean","variance"],T.assertAndGetBroadcastShape(e,t),T.assertAndGetBroadcastShape(e,n);let o="vec4(0.0)";s!=null&&(T.assertAndGetBroadcastShape(e,s),this.variableNames.push("offset"),o="getOffsetAtOutCoords()");let i="vec4(1.0)";r!=null&&(T.assertAndGetBroadcastShape(e,r),this.variableNames.push("scale"),i="getScaleAtOutCoords()"),this.outputShape=e,this.userCode=` + `}},pre=class{constructor(e,t,n,s,r,a){this.packedInputs=!0,this.packedOutput=!0,this.variableNames=["x","mean","variance"],T.assertAndGetBroadcastShape(e,t),T.assertAndGetBroadcastShape(e,n);let o="vec4(0.0)";s!=null&&(T.assertAndGetBroadcastShape(e,s),this.variableNames.push("offset"),o="getOffsetAtOutCoords()");let i="vec4(1.0)";r!=null&&(T.assertAndGetBroadcastShape(e,r),this.variableNames.push("scale"),i="getScaleAtOutCoords()"),this.outputShape=e,this.userCode=` void main() { vec4 offset = ${o}; vec4 scale = ${i}; @@ -2084,7 +2078,7 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel setOutput((x - mean) * inv + offset); } - `}},Pre=({inputs:e,backend:t,attrs:n})=>{let{x:s,mean:r,variance:a,offset:o,scale:i}=e;v.assert(r.shape.length===a.shape.length,()=>"Batch normalization gradient requires mean and variance to have equal ranks."),v.assert(o==null||r.shape.length===o.shape.length,()=>"Batch normalization gradient requires mean and offset to have equal ranks."),v.assert(i==null||r.shape.length===i.shape.length,()=>"Batch normalization gradient requires mean and scale to have equal ranks.");let{varianceEpsilon:l}=n;l==null&&(l=.001);let u=[s,r,a],c=null;o!=null&&(c=o.shape,u.push(o));let p=null;i!=null&&(p=i.shape,u.push(i));let d=H().getBool("WEBGL_PACK_NORMALIZATION")?new $re(s.shape,r.shape,a.shape,c,p,l):new Dre(s.shape,r.shape,a.shape,c,p,l);return t.runWebGLProgram(d,u,u[0].dtype)},Fre={kernelName:Oo,backendName:"webgl",kernelFunc:Pre},Ore=class{constructor(e){this.variableNames=["source"],this.outputShape=e,this.rank=e.length;let t=kt(this.rank);this.customUniforms=[{name:"start",arrayIndex:this.rank,type:"int"}];let n=Mre(this.rank),s,r=e.map((a,o)=>`sourceLoc.${Sy[o]} = start[${o}] + coords.${Sy[o]};`);s=` + `}},hre=({inputs:e,backend:t,attrs:n})=>{let{x:s,mean:r,variance:a,offset:o,scale:i}=e;v.assert(r.shape.length===a.shape.length,()=>"Batch normalization gradient requires mean and variance to have equal ranks."),v.assert(o==null||r.shape.length===o.shape.length,()=>"Batch normalization gradient requires mean and offset to have equal ranks."),v.assert(i==null||r.shape.length===i.shape.length,()=>"Batch normalization gradient requires mean and scale to have equal ranks.");let{varianceEpsilon:l}=n;l==null&&(l=.001);let u=[s,r,a],c=null;o!=null&&(c=o.shape,u.push(o));let p=null;i!=null&&(p=i.shape,u.push(i));let d=U().getBool("WEBGL_PACK_NORMALIZATION")?new pre(s.shape,r.shape,a.shape,c,p,l):new dre(s.shape,r.shape,a.shape,c,p,l);return t.runWebGLProgram(d,u,u[0].dtype)},fre={kernelName:$o,backendName:"webgl",kernelFunc:hre},mre=class{constructor(e){this.variableNames=["source"],this.outputShape=e,this.rank=e.length;let t=Tt(this.rank);this.customUniforms=[{name:"start",arrayIndex:this.rank,type:"int"}];let n=gre(this.rank),s,r=e.map((a,o)=>`sourceLoc.${sy[o]} = start[${o}] + coords.${sy[o]};`);s=` ${t} sourceLoc; ${t} coords = getOutputCoords(); ${r.join(` @@ -2094,7 +2088,7 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel ${s} setOutput(getSource(${n})); } - `}},Sy=["x","y","z","w","u","v"];function Mre(e){if(e===1)return"sourceLoc";if(e<=6)return Sy.slice(0,e).map(t=>"sourceLoc."+t).join(",");throw Error(`Slicing for rank ${e} is not yet supported`)}var zre=class{constructor(e){this.variableNames=["source"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=e,this.rank=e.length,this.customUniforms=[{name:"start",arrayIndex:this.rank,type:"int"}];let t=kt(this.rank),n=us("coords",this.rank),s=us("sourceLoc",this.rank),r=this.rank===1?"sourceLoc":`vec2(${s.slice(-2).join()})`,a=`getChannel(getSource(${s.join()}), ${r})`,o=` + `}},sy=["x","y","z","w","u","v"];function gre(e){if(e===1)return"sourceLoc";if(e<=6)return sy.slice(0,e).map(t=>"sourceLoc."+t).join(",");throw Error(`Slicing for rank ${e} is not yet supported`)}var yre=class{constructor(e){this.variableNames=["source"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=e,this.rank=e.length,this.customUniforms=[{name:"start",arrayIndex:this.rank,type:"int"}];let t=Tt(this.rank),n=os("coords",this.rank),s=os("sourceLoc",this.rank),r=this.rank===1?"sourceLoc":`vec2(${s.slice(-2).join()})`,a=`getChannel(getSource(${s.join()}), ${r})`,o=` result.x = ${a}; if (++${n[this.rank-1]} < ${e[this.rank-1]}) { ++${s[this.rank-1]}; @@ -2123,7 +2117,7 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel ${i} setOutput(result); } - `}};function Lre(e,t,n,s){let r=s.texData.get(e.dataId),a=s.makeTensorInfo(n,e.dtype),o=s.texData.get(a.dataId);Object.assign(o,r),o.refCount=1,o.shape=n,o.dtype=e.dtype;let i=jt.computeFlatOffset(t,v.computeStrides(e.shape));r.slice&&(i+=r.slice.flatOffset),o.slice={flatOffset:i,origDataId:r.slice&&r.slice.origDataId||e.dataId};let l=s.dataRefCount.get(o.slice.origDataId)||1;return s.dataRefCount.set(o.slice.origDataId,l+1),a}function bd(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{begin:a,size:o}=s,[i,l]=jt.parseSliceParams(r,a,o);if(jt.assertParamsValid(r,i,l),v.sizeFromShape(l)===0)return n.makeTensorInfo(l,r.dtype,[]);if(n.shouldExecuteOnCPU([r])||r.dtype==="string"){let p=n.texData.get(r.dataId),d=Nne(p.values,i,l,r.shape,r.dtype);return n.makeTensorInfo(l,r.dtype,d)}let{isPacked:u}=n.texData.get(r.dataId),c=jt.isSliceContinous(r.shape,i,l);if(u||!c){let p=H().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new zre(l):new Ore(l),d=[i];return n.runWebGLProgram(p,[r],r.dtype,d)}return n.uploadToGPU(r.dataId),Lre(r,i,l,n)}var Bre={kernelName:Yl,backendName:"webgl",kernelFunc:bd},Wre=e=>{let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{blockShape:a,crops:o}=s;v.assert(r.shape.length<=4,()=>"batchToSpaceND for rank > 4 with a WebGL backend not implemented yet");let i=a.reduce((x,A)=>x*A),l=T.getReshaped(r.shape,a,i),u=T.getPermuted(l.length,a.length),c=T.getReshapedPermuted(r.shape,a,i),p=T.getSliceBeginCoords(o,a.length),d=T.getSliceSize(c,o,a.length),h=[],f=we({inputs:{x:r},backend:n,attrs:{shape:l}}),m=cs({inputs:{x:f},backend:n,attrs:{perm:u}}),g=we({inputs:{x:m},backend:n,attrs:{shape:c}}),y=bd({inputs:{x:g},backend:n,attrs:{begin:p,size:d}});return h.push(f),h.push(m),h.push(g),h.forEach(x=>n.disposeIntermediateTensorInfo(x)),y},Vre={kernelName:vl,backendName:"webgl",kernelFunc:Wre};function Ure(e){let{inputs:t,backend:n,attrs:s}=e,{x:r,weights:a}=t,{size:o}=s,i=n.readSync(r.dataId),l=n.readSync(a.dataId),u=E9(i,l,a.dtype,a.shape,o);return n.makeTensorInfo([o],a.dtype,u)}var Gre={kernelName:r0,backendName:"webgl",kernelFunc:Ure};function Hre(e){let{inputs:t,backend:n}=e,{s0:s,s1:r}=t,a=n.readSync(s.dataId),o=n.readSync(r.dataId),i=T.assertAndGetBroadcastShape(Array.from(a),Array.from(o));return n.makeTensorInfo([i.length],"int32",Int32Array.from(i))}var jre={kernelName:a0,backendName:"webgl",kernelFunc:Hre},qre="return float(a != b);",H9=Bn({opSnippet:qre,cpuKernelImpl:vne,dtype:"bool"}),Xre={kernelName:Ll,backendName:"webgl",kernelFunc:H9};function qh(e){let{inputs:t,backend:n}=e,{input:s}=t,r=n.texData.get(s.dataId);return Vs({inputs:{x:r.complexTensorInfos.real},backend:n})}var Kre={kernelName:eh,backendName:"webgl",kernelFunc:qh},Zre="return float(int(x));";function Yre(e,t){let n=new Sa(e.shape,Zre),s=t.runWebGLProgram(n,[e],"int32");return{dataId:s.dataId,shape:s.shape,dtype:s.dtype}}function Iy(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{dtype:a}=s;if(a==="complex64"){if(r.dtype==="complex64")return Vs({inputs:{x:r},backend:n});let o=Gt(r.shape),i=Iy({inputs:{x:r},backend:n,attrs:{dtype:"float32"}}),l=xi({inputs:{real:i,imag:o},backend:n});return o.dispose(),n.disposeIntermediateTensorInfo(i),l}if(r.dtype==="complex64"){let o=qh({inputs:{input:r},backend:n}),i=Iy({inputs:{x:o},backend:n,attrs:{dtype:a}});return n.disposeIntermediateTensorInfo(o),i}if(!v.hasEncodingLoss(r.dtype,a)){let o=Vs({inputs:{x:r},backend:n});return{dataId:o.dataId,shape:o.shape,dtype:a}}if(n.shouldExecuteOnCPU([r])){let o=n.texData.get(r.dataId).values,[i,l,u]=tne(o,r.shape,r.dtype,a);return n.makeTensorInfo(i,l,u)}if(a==="int32")return Yre(r,n);if(a==="bool"){let o=n.makeTensorInfo([],"bool",v.getTypedArrayFromDType("bool",1)),l=H9({inputs:{a:r,b:o},backend:n});return n.disposeIntermediateTensorInfo(o),l}throw new Error(`Error in Cast: failed to cast ${r.dtype} to ${a}`)}var Jre={kernelName:ko,backendName:"webgl",kernelFunc:Iy},j7="return ceil(x);",Qre=ht({opSnippet:j7,packedOpSnippet:j7,cpuKernelImpl:nne}),eae={kernelName:So,backendName:"webgl",kernelFunc:Qre},tae=class{constructor(e){this.variableNames=["A"],this.customUniforms=[{name:"minVal",type:"float"},{name:"maxVal",type:"float"}],this.outputShape=e,this.userCode=` + `}};function Are(e,t,n,s){let r=s.texData.get(e.dataId),a=s.makeTensorInfo(n,e.dtype),o=s.texData.get(a.dataId);Object.assign(o,r),o.refCount=1,o.shape=n,o.dtype=e.dtype;let i=Gt.computeFlatOffset(t,v.computeStrides(e.shape));r.slice&&(i+=r.slice.flatOffset),o.slice={flatOffset:i,origDataId:r.slice&&r.slice.origDataId||e.dataId};let l=s.dataRefCount.get(o.slice.origDataId)||1;return s.dataRefCount.set(o.slice.origDataId,l+1),a}function ld(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{begin:a,size:o}=s,[i,l]=Gt.parseSliceParams(r,a,o);if(Gt.assertParamsValid(r,i,l),v.sizeFromShape(l)===0)return n.makeTensorInfo(l,r.dtype,[]);if(n.shouldExecuteOnCPU([r])||r.dtype==="string"){let p=n.texData.get(r.dataId),d=une(p.values,i,l,r.shape,r.dtype);return n.makeTensorInfo(l,r.dtype,d)}let{isPacked:u}=n.texData.get(r.dataId),c=Gt.isSliceContinous(r.shape,i,l);if(u||!c){let p=U().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new yre(l):new mre(l),d=[i];return n.runWebGLProgram(p,[r],r.dtype,d)}return n.uploadToGPU(r.dataId),Are(r,i,l,n)}var xre={kernelName:Ul,backendName:"webgl",kernelFunc:ld},bre=e=>{let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{blockShape:a,crops:o}=s;v.assert(r.shape.length<=4,()=>"batchToSpaceND for rank > 4 with a WebGL backend not implemented yet");let i=a.reduce((x,A)=>x*A),l=T.getReshaped(r.shape,a,i),u=T.getPermuted(l.length,a.length),c=T.getReshapedPermuted(r.shape,a,i),p=T.getSliceBeginCoords(o,a.length),d=T.getSliceSize(c,o,a.length),h=[],f=be({inputs:{x:r},backend:n,attrs:{shape:l}}),m=is({inputs:{x:f},backend:n,attrs:{perm:u}}),g=be({inputs:{x:m},backend:n,attrs:{shape:c}}),y=ld({inputs:{x:g},backend:n,attrs:{begin:p,size:d}});return h.push(f),h.push(m),h.push(g),h.forEach(x=>n.disposeIntermediateTensorInfo(x)),y},vre={kernelName:hl,backendName:"webgl",kernelFunc:bre};function wre(e){let{inputs:t,backend:n,attrs:s}=e,{x:r,weights:a}=t,{size:o}=s,i=n.readSync(r.dataId),l=n.readSync(a.dataId),u=f9(i,l,a.dtype,a.shape,o);return n.makeTensorInfo([o],a.dtype,u)}var kre={kernelName:Pm,backendName:"webgl",kernelFunc:wre};function Sre(e){let{inputs:t,backend:n}=e,{s0:s,s1:r}=t,a=n.readSync(s.dataId),o=n.readSync(r.dataId),i=T.assertAndGetBroadcastShape(Array.from(a),Array.from(o));return n.makeTensorInfo([i.length],"int32",Int32Array.from(i))}var Ire={kernelName:Fm,backendName:"webgl",kernelFunc:Sre},Cre="return float(a != b);",E9=Wn({opSnippet:Cre,cpuKernelImpl:tne,dtype:"bool"}),Tre={kernelName:_l,backendName:"webgl",kernelFunc:E9};function Dh(e){let{inputs:t,backend:n}=e,{input:s}=t,r=n.texData.get(s.dataId);return Ls({inputs:{x:r.complexTensorInfos.real},backend:n})}var Nre={kernelName:Mp,backendName:"webgl",kernelFunc:Dh},Ere="return float(int(x));";function Rre(e,t){let n=new xa(e.shape,Ere),s=t.runWebGLProgram(n,[e],"int32");return{dataId:s.dataId,shape:s.shape,dtype:s.dtype}}function ry(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{dtype:a}=s;if(a==="complex64"){if(r.dtype==="complex64")return Ls({inputs:{x:r},backend:n});let o=Vt(r.shape),i=ry({inputs:{x:r},backend:n,attrs:{dtype:"float32"}}),l=gi({inputs:{real:i,imag:o},backend:n});return o.dispose(),n.disposeIntermediateTensorInfo(i),l}if(r.dtype==="complex64"){let o=Dh({inputs:{input:r},backend:n}),i=ry({inputs:{x:o},backend:n,attrs:{dtype:a}});return n.disposeIntermediateTensorInfo(o),i}if(!v.hasEncodingLoss(r.dtype,a)){let o=Ls({inputs:{x:r},backend:n});return{dataId:o.dataId,shape:o.shape,dtype:a}}if(n.shouldExecuteOnCPU([r])){let o=n.texData.get(r.dataId).values,[i,l,u]=Fte(o,r.shape,r.dtype,a);return n.makeTensorInfo(i,l,u)}if(a==="int32")return Rre(r,n);if(a==="bool"){let o=n.makeTensorInfo([],"bool",v.getTypedArrayFromDType("bool",1)),l=E9({inputs:{a:r,b:o},backend:n});return n.disposeIntermediateTensorInfo(o),l}throw new Error(`Error in Cast: failed to cast ${r.dtype} to ${a}`)}var _re={kernelName:bo,backendName:"webgl",kernelFunc:ry},I7="return ceil(x);",Dre=pt({opSnippet:I7,packedOpSnippet:I7,cpuKernelImpl:Ote}),$re={kernelName:vo,backendName:"webgl",kernelFunc:Dre},Pre=class{constructor(e){this.variableNames=["A"],this.customUniforms=[{name:"minVal",type:"float"},{name:"maxVal",type:"float"}],this.outputShape=e,this.userCode=` void main() { float value = getAAtOutCoords(); @@ -2134,7 +2128,7 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel setOutput(clamp(value, minVal, maxVal)); } - `}},nae=class{constructor(e){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.customUniforms=[{name:"minVal",type:"float"},{name:"maxVal",type:"float"}],this.outputShape=e,this.userCode=` + `}},Fre=class{constructor(e){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.customUniforms=[{name:"minVal",type:"float"},{name:"maxVal",type:"float"}],this.outputShape=e,this.userCode=` void main() { vec4 value = getAAtOutCoords(); @@ -2145,7 +2139,7 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel setOutput(clamp(value, vec4(minVal), vec4(maxVal))); } - `}};function sae(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{clipValueMin:a,clipValueMax:o}=s,i;H().getBool("WEBGL_PACK_CLIP")?i=new nae(r.shape):i=new tae(r.shape);let l=[[a],[o]];return n.runWebGLProgram(i,[r],r.dtype,l)}var rae={kernelName:$a,backendName:"webgl",kernelFunc:sae},aae=class{constructor(e){this.variableNames=["real","imag"],this.outputShape=e,this.userCode=` + `}};function Ore(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{clipValueMin:a,clipValueMax:o}=s,i;U().getBool("WEBGL_PACK_CLIP")?i=new Fre(r.shape):i=new Pre(r.shape);let l=[[a],[o]];return n.runWebGLProgram(i,[r],r.dtype,l)}var Mre={kernelName:Na,backendName:"webgl",kernelFunc:Ore},zre=class{constructor(e){this.variableNames=["real","imag"],this.outputShape=e,this.userCode=` void main() { float re = abs(getRealAtOutCoords()); float im = abs(getImagAtOutCoords()); @@ -2158,7 +2152,7 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel mx == 0.0 ? 0.0 : mx * length(vec2(1, min(re, im)/mx)) ); } - `}};function q7(e,t){return{dataId:t.dataId,dtype:t.dtype,shape:e.shape}}function oae(e){let{inputs:t,backend:n}=e,{x:s}=t,r=n.texData.get(s.dataId),a=new aae(s.shape),o=[q7(s,r.complexTensorInfos.real),q7(s,r.complexTensorInfos.imag)];return n.runWebGLProgram(a,o,o[0].dtype)}var iae={kernelName:qp,backendName:"webgl",kernelFunc:oae},lae=class{constructor(e){this.outputShape=[],this.outputShape=T.computeOutShape(e,1),this.variableNames=e.map((a,o)=>`T${o}`);let t=new Array(e.length-1);t[0]=e[0][1];for(let a=1;a`T${o}`);let t=new Array(e.length-1);t[0]=e[0][1];for(let a=1;a`T${m}`);let i=new Array(e.length-1);i[0]=e[0][t];for(let f=1;f`T${m}`);let i=new Array(e.length-1);i[0]=e[0][t];for(let f=1;f= ${i[f-1]}) { return getChannel( - getT${f}(${um(o,l,m)}), - vec2(${um(u,l,m)})); + getT${f}(${Bf(o,l,m)}), + vec2(${Bf(u,l,m)})); }`}let d=i.length,h=i[i.length-1];p+=` return getChannel( - getT${d}(${um(o,l,h)}), - vec2(${um(u,l,h)}));`,this.userCode=` + getT${d}(${Bf(o,l,h)}), + vec2(${Bf(u,l,h)}));`,this.userCode=` float getValue(${o.map(f=>"int "+f)}) { ${p} } @@ -2204,7 +2198,7 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel } setOutput(result); } - `}};function um(e,t,n){let s=e.indexOf(t);return e.map((a,o)=>o===s?`${a} - ${n}`:a).join()}function M2(e){let{inputs:t,backend:n}=e,{input:s}=t,r=n.texData.get(s.dataId);return Vs({inputs:{x:r.complexTensorInfos.imag},backend:n})}var cae={kernelName:Yp,backendName:"webgl",kernelFunc:M2};function gp(e,t,n){let s=e[0].dtype;if(s==="complex64"){let p=e.map(g=>qh({inputs:{input:g},backend:n})),d=e.map(g=>M2({inputs:{input:g},backend:n})),h=gp(p,t,n),f=gp(d,t,n),m=xi({inputs:{real:h,imag:f},backend:n});return p.forEach(g=>n.disposeIntermediateTensorInfo(g)),d.forEach(g=>n.disposeIntermediateTensorInfo(g)),n.disposeIntermediateTensorInfo(h),n.disposeIntermediateTensorInfo(f),m}let r=n.shouldExecuteOnCPU(e);if(s==="string"&&(r=!0),r){let p=e.map(x=>{let A=v.sizeFromShape(x.shape.slice(t));return we({inputs:{x},backend:n,attrs:{shape:[-1,A]}})}),d=p.map(x=>({vals:n.readSync(x.dataId),shape:x.shape})),h=T.computeOutShape(p.map(x=>x.shape),1),f=p[0].shape[0]===1,m=sne(d,h,s,f),g=T.computeOutShape(e.map(x=>x.shape),t),y=n.makeTensorInfo(g,s,m);return p.forEach(x=>n.disposeIntermediateTensorInfo(x)),y}let a=H().getNumber("WEBGL_MAX_TEXTURES_IN_SHADER");if(e.length>a){let p=[];for(let h=0;h1){let p=new uae(e.map(d=>d.shape),t);return n.runWebGLProgram(p,e,s)}let{tensors2D:o,outShape:i}=dae(e,t,n),l=new lae(o.map(p=>p.shape)),u=n.runWebGLProgram(l,o,s);o.forEach(p=>n.disposeIntermediateTensorInfo(p));let c=we({inputs:{x:u},attrs:{shape:i},backend:n});return n.disposeIntermediateTensorInfo(u),c}function dae(e,t,n){let s=T.computeOutShape(e.map(a=>a.shape),t);return{tensors2D:e.map(a=>we({inputs:{x:a},attrs:{shape:[-1,v.sizeFromShape(a.shape.slice(t))]},backend:n})),outShape:s}}function j9(e){let{inputs:t,backend:n,attrs:s}=e,{axis:r}=s,a=v.parseAxisParam(r,t[0].shape)[0],o=T.computeOutShape(t.map(u=>u.shape),a);if(v.sizeFromShape(o)===0)return n.makeTensorInfo(o,t[0].dtype,[]);let i=t.filter(u=>v.sizeFromShape(u.shape)>0);if(i.length===1)return Vs({inputs:{x:i[0]},backend:n});let l=i.map(u=>u.shape);return T.assertParamsConsistent(l,a),gp(i,a,n)}var pae={kernelName:wl,backendName:"webgl",kernelFunc:j9},q9=class{constructor(e,t=!1,n=null,s=!1,r=!1){this.variableNames=["x","W"],this.outputShape=e.outShape;let a=e.padInfo.top,o=e.padInfo.left,i=e.strideHeight,l=e.strideWidth,u=e.dilationHeight,c=e.dilationWidth,p=e.filterHeight,d=e.filterWidth,h=Math.floor(e.inChannels/4)*4,f=e.inChannels%4,m=e.dataFormat==="channelsLast",g=m?1:2,y=m?2:3,x=m?3:1,A="",b="";n&&(s?A=`float activation(float a) { + `}};function Bf(e,t,n){let s=e.indexOf(t);return e.map((a,o)=>o===s?`${a} - ${n}`:a).join()}function p2(e){let{inputs:t,backend:n}=e,{input:s}=t,r=n.texData.get(s.dataId);return Ls({inputs:{x:r.complexTensorInfos.imag},backend:n})}var Ure={kernelName:Pp,backendName:"webgl",kernelFunc:p2};function Qd(e,t,n){let s=e[0].dtype;if(s==="complex64"){let p=e.map(g=>Dh({inputs:{input:g},backend:n})),d=e.map(g=>p2({inputs:{input:g},backend:n})),h=Qd(p,t,n),f=Qd(d,t,n),m=gi({inputs:{real:h,imag:f},backend:n});return p.forEach(g=>n.disposeIntermediateTensorInfo(g)),d.forEach(g=>n.disposeIntermediateTensorInfo(g)),n.disposeIntermediateTensorInfo(h),n.disposeIntermediateTensorInfo(f),m}let r=n.shouldExecuteOnCPU(e);if(s==="string"&&(r=!0),r){let p=e.map(x=>{let A=v.sizeFromShape(x.shape.slice(t));return be({inputs:{x},backend:n,attrs:{shape:[-1,A]}})}),d=p.map(x=>({vals:n.readSync(x.dataId),shape:x.shape})),h=T.computeOutShape(p.map(x=>x.shape),1),f=p[0].shape[0]===1,m=Mte(d,h,s,f),g=T.computeOutShape(e.map(x=>x.shape),t),y=n.makeTensorInfo(g,s,m);return p.forEach(x=>n.disposeIntermediateTensorInfo(x)),y}let a=U().getNumber("WEBGL_MAX_TEXTURES_IN_SHADER");if(e.length>a){let p=[];for(let h=0;h1){let p=new Vre(e.map(d=>d.shape),t);return n.runWebGLProgram(p,e,s)}let{tensors2D:o,outShape:i}=Gre(e,t,n),l=new Wre(o.map(p=>p.shape)),u=n.runWebGLProgram(l,o,s);o.forEach(p=>n.disposeIntermediateTensorInfo(p));let c=be({inputs:{x:u},attrs:{shape:i},backend:n});return n.disposeIntermediateTensorInfo(u),c}function Gre(e,t,n){let s=T.computeOutShape(e.map(a=>a.shape),t);return{tensors2D:e.map(a=>be({inputs:{x:a},attrs:{shape:[-1,v.sizeFromShape(a.shape.slice(t))]},backend:n})),outShape:s}}function R9(e){let{inputs:t,backend:n,attrs:s}=e,{axis:r}=s,a=v.parseAxisParam(r,t[0].shape)[0],o=t.map(u=>u.shape);T.assertParamsConsistent(o,a);let i=T.computeOutShape(t.map(u=>u.shape),a);if(v.sizeFromShape(i)===0)return n.makeTensorInfo(i,t[0].dtype,[]);let l=t.filter(u=>v.sizeFromShape(u.shape)>0);return l.length===1?Ls({inputs:{x:l[0]},backend:n}):Qd(l,a,n)}var Hre={kernelName:fl,backendName:"webgl",kernelFunc:R9},_9=class{constructor(e,t=!1,n=null,s=!1,r=!1){this.variableNames=["x","W"],this.outputShape=e.outShape;let a=e.padInfo.top,o=e.padInfo.left,i=e.strideHeight,l=e.strideWidth,u=e.dilationHeight,c=e.dilationWidth,p=e.filterHeight,d=e.filterWidth,h=Math.floor(e.inChannels/4)*4,f=e.inChannels%4,m=e.dataFormat==="channelsLast",g=m?1:2,y=m?2:3,x=m?3:1,A="",b="";n&&(s?A=`float activation(float a) { float b = getPreluActivationWeightsAtOutCoords(); ${n} }`:r?A=`float activation(float a) { @@ -2338,7 +2332,7 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel ${b} setOutput(result); } - `}},hae=class{constructor(e){this.variableNames=["x","W"],this.outputShape=e.outShape;let t=e.padInfo.front,n=e.padInfo.top,s=e.padInfo.left,r=e.strideDepth,a=e.strideHeight,o=e.strideWidth,i=e.dilationDepth,l=e.dilationHeight,u=e.dilationWidth,c=e.filterDepth,p=e.filterHeight,d=e.filterWidth,h=Math.floor(e.inChannels/4)*4,f=e.inChannels%4;this.userCode=` + `}},jre=class{constructor(e){this.variableNames=["x","W"],this.outputShape=e.outShape;let t=e.padInfo.front,n=e.padInfo.top,s=e.padInfo.left,r=e.strideDepth,a=e.strideHeight,o=e.strideWidth,i=e.dilationDepth,l=e.dilationHeight,u=e.dilationWidth,c=e.filterDepth,p=e.filterHeight,d=e.filterWidth,h=Math.floor(e.inChannels/4)*4,f=e.inChannels%4;this.userCode=` const ivec3 strides = ivec3(${r}, ${a}, ${o}); const ivec3 pads = ivec3(${t}, ${n}, ${s}); @@ -2426,7 +2420,7 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel } setOutput(dotProd); } - `}},X9=class{constructor(e,t=!1,n=null,s=!1,r=!1){this.variableNames=["x","W"],this.packedInputs=!0,this.packedOutput=!0,this.customUniforms=[{name:"pads",type:"ivec2"},{name:"strides",type:"ivec2"},{name:"dilations",type:"ivec2"},{name:"inDims",type:"ivec2"}],this.outputShape=e.outShape,this.enableShapeUniforms=fs(this.outputShape.length);let a=e.padInfo.left,o=e.strideWidth,i=e.dilationWidth,l=e.filterHeight,u=e.filterWidth,c=u,p=` + `}},D9=class{constructor(e,t=!1,n=null,s=!1,r=!1){this.variableNames=["x","W"],this.packedInputs=!0,this.packedOutput=!0,this.customUniforms=[{name:"pads",type:"ivec2"},{name:"strides",type:"ivec2"},{name:"dilations",type:"ivec2"},{name:"inDims",type:"ivec2"}],this.outputShape=e.outShape,this.enableShapeUniforms=ds(this.outputShape.length);let a=e.padInfo.left,o=e.strideWidth,i=e.dilationWidth,l=e.filterHeight,u=e.filterWidth,c=u,p=` int xR; int xC; int xCOffset; vec4 wTexel; vec4 previous; vec4 final;`;for(let m=0;m=3?t?[...e.slice(0,-3),e[n-3]*e[n-2],e[n-1]]:[...e.slice(0,-3),e[n-3],e[n-2]*e[n-1]]:!t&&n===1&&e[0]>1?[e[0],1]:null}function K9({x:e,filter:t,convInfo:n,backend:s,bias:r=null,preluActivationWeights:a=null,leakyreluAlpha:o=0,activation:i=null}){let l=e.shape,u=s.texData.get(e.dataId),c=n.inChannels,p=l[0]*l[1]*l[2],d=n.outChannels,h=n.dataFormat==="channelsLast",f=!1,m=!1,g,y=[];if(a!=null){let b=Xm(a.shape,h);b!=null&&(a=we({inputs:{x:a},backend:s,attrs:{shape:b}}),y.push(a))}if(r!=null){let b=Xm(r.shape,h);b!=null&&(r=we({inputs:{x:r},backend:s,attrs:{shape:b}}),y.push(r))}if(!((p===1||d===1)&&c>W9)&&u.isPacked&&h&&u.texture!=null&&l[2]%2!==0&&v.arraysEqual(u.shape.slice(-3),l.slice(-3))){let b=l[0]*l[1]*(l[2]+1),w={dataId:e.dataId,shape:[1,b,n.inChannels],dtype:e.dtype},k=u.shape;u.shape=u.shape.slice(),u.shape[u.shape.length-2]++,v.assert(Mp(u.shape,w.shape),()=>`packed reshape ${u.shape} to ${w.shape} isn't free`);let C=we({inputs:{x:t},backend:s,attrs:{shape:[1,n.inChannels,n.outChannels]}});y.push(C);let E=qm({a:w,b:C,backend:s,transposeA:f,transposeB:m,bias:r,activation:i,preluActivationWeights:a,leakyreluAlpha:o}),_=s.texData.get(E.dataId);v.assert(_.isPacked,()=>"batchMatMul result is expected to be packed"),u.shape=k,_.shape=n.outShape,g=Vs({inputs:{x:E},backend:s}),g.shape=n.outShape,y.push(E)}else{let b=n.outHeight*n.outWidth,w=we({inputs:{x:e},backend:s,attrs:{shape:h?[n.batchSize,b,n.inChannels]:[n.batchSize,n.inChannels,b]}}),k=we({inputs:{x:t},backend:s,attrs:{shape:[1,n.inChannels,n.outChannels]}}),C=qm({a:h?w:k,b:h?k:w,transposeA:!h,transposeB:m,backend:s,bias:r,activation:i,preluActivationWeights:a,leakyreluAlpha:o});g=we({inputs:{x:C},backend:s,attrs:{shape:n.outShape}}),y.push(w),y.push(k),y.push(C)}for(let b of y)s.disposeIntermediateTensorInfo(b);return g}function Z9({x:e,filter:t,convInfo:n,backend:s,bias:r=null,preluActivationWeights:a=null,leakyreluAlpha:o=0,activation:i=null}){let{filterWidth:l,filterHeight:u,inChannels:c,outWidth:p,outHeight:d,dataFormat:h}=n,f=h==="channelsLast",m=l*u*c,g=d*p,y=[n.batchSize,m,g],x=!0,A=!1,b=[];if(a!=null){let q=Xm(a.shape,f);q!=null&&(a=we({inputs:{x:a},backend:s,attrs:{shape:q}}),b.push(a))}if(r!=null){let q=Xm(r.shape,f);q!=null&&(r=we({inputs:{x:r},backend:s,attrs:{shape:q}}),b.push(r))}let w=we({inputs:{x:t},backend:s,attrs:{shape:[1,m,v.sizeFromShape(t.shape)/m]}});b.push(w);let k=new fae(y,n),C=[e.shape,[n.padInfo.top,n.padInfo.left],[n.strideHeight,n.strideWidth],[n.dilationHeight,n.dilationWidth],[n.inChannels],[n.filterWidth*n.inChannels],[n.outWidth]],E=s.runWebGLProgram(k,[e],"float32",C),_=we({inputs:{x:E},backend:s,attrs:{shape:y}});b.push(E),b.push(_);let $=r!=null,R=a!=null,P=i==="leakyrelu",S=i?zp(i,!0):null,M=new B9(f?_.shape:w.shape,f?w.shape:_.shape,f?[n.batchSize,g,n.outChannels]:[n.batchSize,n.outChannels,g],x,A,$,S,R,P),L=f?[_,w]:[w,_];if(r&&L.push(r),R&&L.push(a),P){let q=s.makeTensorInfo([],"float32",v.createScalarValue(o,"float32"));L.push(q),b.push(q)}let U=s.runWebGLProgram(M,L,"float32"),K=we({inputs:{x:U},backend:s,attrs:{shape:n.outShape}});b.push(U);for(let q of b)s.disposeIntermediateTensorInfo(q);return K}function mae(e){let{inputs:t,backend:n,attrs:s}=e,{x:r,filter:a}=t,{strides:o,pad:i,dataFormat:l,dilations:u,dimRoundingMode:c}=s,p=T.convertConv2DDataFormat(l),d=T.computeConv2DInfo(r.shape,a.shape,o,u,i,c,!1,p),h;if(d.filterHeight===1&&d.filterWidth===1&&d.dilationHeight===1&&d.dilationWidth===1&&d.strideHeight===1&&d.strideWidth===1&&(d.padInfo.type==="SAME"||d.padInfo.type==="VALID"))h=K9({x:r,filter:a,convInfo:d,backend:n});else if(d.strideWidth<=2&&p==="channelsLast"&&H().getBool("WEBGL_EXP_CONV")){let m=new X9(d),g=[[d.padInfo.top,d.padInfo.left],[d.strideHeight,d.strideWidth],[d.dilationHeight,d.dilationWidth],[d.inHeight,d.inWidth]];h=n.runWebGLProgram(m,[r,a],"float32",g)}else if(H().getBool("WEBGL_CONV_IM2COL"))h=Z9({x:r,filter:a,convInfo:d,backend:n});else{let m=new q9(d);h=n.runWebGLProgram(m,[r,a],"float32")}let f=we({inputs:{x:h},backend:n,attrs:{shape:d.outShape}});return n.disposeIntermediateTensorInfo(h),f}var gae={kernelName:Io,backendName:"webgl",kernelFunc:mae},yae=class{constructor(e){this.variableNames=["x","dy"],this.outputShape=e.filterShape;let t=e.strideHeight,n=e.strideWidth,s=e.padInfo.top,r=e.padInfo.left,a=e.dataFormat==="channelsLast";this.userCode=` + `}};function Im(e,t){let n=e.length;return n>=3?t?[...e.slice(0,-3),e[n-3]*e[n-2],e[n-1]]:[...e.slice(0,-3),e[n-3],e[n-2]*e[n-1]]:!t&&n===1&&e[0]>1?[e[0],1]:null}function $9({x:e,filter:t,convInfo:n,backend:s,bias:r=null,preluActivationWeights:a=null,leakyreluAlpha:o=0,activation:i=null}){let l=e.shape,u=s.texData.get(e.dataId),c=n.inChannels,p=l[0]*l[1]*l[2],d=n.outChannels,h=n.dataFormat==="channelsLast",f=!1,m=!1,g,y=[];if(a!=null){let b=Im(a.shape,h);b!=null&&(a=be({inputs:{x:a},backend:s,attrs:{shape:b}}),y.push(a))}if(r!=null){let b=Im(r.shape,h);b!=null&&(r=be({inputs:{x:r},backend:s,attrs:{shape:b}}),y.push(r))}if(!((p===1||d===1)&&c>I9)&&u.isPacked&&h&&u.texture!=null&&l[2]%2!==0&&v.arraysEqual(u.shape.slice(-3),l.slice(-3))){let b=l[0]*l[1]*(l[2]+1),w={dataId:e.dataId,shape:[1,b,n.inChannels],dtype:e.dtype},k=u.shape;u.shape=u.shape.slice(),u.shape[u.shape.length-2]++,v.assert(bp(u.shape,w.shape),()=>`packed reshape ${u.shape} to ${w.shape} isn't free`);let C=be({inputs:{x:t},backend:s,attrs:{shape:[1,n.inChannels,n.outChannels]}});y.push(C);let N=Sm({a:w,b:C,backend:s,transposeA:f,transposeB:m,bias:r,activation:i,preluActivationWeights:a,leakyreluAlpha:o}),R=s.texData.get(N.dataId);v.assert(R.isPacked,()=>"batchMatMul result is expected to be packed"),u.shape=k,R.shape=n.outShape,g=Ls({inputs:{x:N},backend:s}),g.shape=n.outShape,y.push(N)}else{let b=n.outHeight*n.outWidth,w=be({inputs:{x:e},backend:s,attrs:{shape:h?[n.batchSize,b,n.inChannels]:[n.batchSize,n.inChannels,b]}}),k=be({inputs:{x:t},backend:s,attrs:{shape:[1,n.inChannels,n.outChannels]}}),C=Sm({a:h?w:k,b:h?k:w,transposeA:!h,transposeB:m,backend:s,bias:r,activation:i,preluActivationWeights:a,leakyreluAlpha:o});g=be({inputs:{x:C},backend:s,attrs:{shape:n.outShape}}),y.push(w),y.push(k),y.push(C)}for(let b of y)s.disposeIntermediateTensorInfo(b);return g}function P9({x:e,filter:t,convInfo:n,backend:s,bias:r=null,preluActivationWeights:a=null,leakyreluAlpha:o=0,activation:i=null}){let{filterWidth:l,filterHeight:u,inChannels:c,outWidth:p,outHeight:d,dataFormat:h}=n,f=h==="channelsLast",m=l*u*c,g=d*p,y=[n.batchSize,m,g],x=!0,A=!1,b=[];if(a!=null){let G=Im(a.shape,f);G!=null&&(a=be({inputs:{x:a},backend:s,attrs:{shape:G}}),b.push(a))}if(r!=null){let G=Im(r.shape,f);G!=null&&(r=be({inputs:{x:r},backend:s,attrs:{shape:G}}),b.push(r))}let w=be({inputs:{x:t},backend:s,attrs:{shape:[1,m,v.sizeFromShape(t.shape)/m]}});b.push(w);let k=new qre(y,n),C=[e.shape,[n.padInfo.top,n.padInfo.left],[n.strideHeight,n.strideWidth],[n.dilationHeight,n.dilationWidth],[n.inChannels],[n.filterWidth*n.inChannels],[n.outWidth]],N=s.runWebGLProgram(k,[e],"float32",C),R=be({inputs:{x:N},backend:s,attrs:{shape:y}});b.push(N),b.push(R);let D=r!=null,E=a!=null,$=i==="leakyrelu",S=i?vp(i,!0):null,F=new S9(f?R.shape:w.shape,f?w.shape:R.shape,f?[n.batchSize,g,n.outChannels]:[n.batchSize,n.outChannels,g],x,A,D,S,E,$),z=f?[R,w]:[w,R];if(r&&z.push(r),E&&z.push(a),$){let G=s.makeTensorInfo([],"float32",v.createScalarValue(o,"float32"));z.push(G),b.push(G)}let V=s.runWebGLProgram(F,z,"float32"),j=be({inputs:{x:V},backend:s,attrs:{shape:n.outShape}});b.push(V);for(let G of b)s.disposeIntermediateTensorInfo(G);return j}function Xre(e){let{inputs:t,backend:n,attrs:s}=e,{x:r,filter:a}=t,{strides:o,pad:i,dataFormat:l,dilations:u,dimRoundingMode:c}=s,p=T.convertConv2DDataFormat(l),d=T.computeConv2DInfo(r.shape,a.shape,o,u,i,c,!1,p),h;if(d.filterHeight===1&&d.filterWidth===1&&d.dilationHeight===1&&d.dilationWidth===1&&d.strideHeight===1&&d.strideWidth===1&&(d.padInfo.type==="SAME"||d.padInfo.type==="VALID"))h=$9({x:r,filter:a,convInfo:d,backend:n});else if(d.strideWidth<=2&&p==="channelsLast"&&U().getBool("WEBGL_EXP_CONV")){let m=new D9(d),g=[[d.padInfo.top,d.padInfo.left],[d.strideHeight,d.strideWidth],[d.dilationHeight,d.dilationWidth],[d.inHeight,d.inWidth]];h=n.runWebGLProgram(m,[r,a],"float32",g)}else if(U().getBool("WEBGL_CONV_IM2COL"))h=P9({x:r,filter:a,convInfo:d,backend:n});else{let m=new _9(d);h=n.runWebGLProgram(m,[r,a],"float32")}let f=be({inputs:{x:h},backend:n,attrs:{shape:d.outShape}});return n.disposeIntermediateTensorInfo(h),f}var Kre={kernelName:wo,backendName:"webgl",kernelFunc:Xre},Zre=class{constructor(e){this.variableNames=["x","dy"],this.outputShape=e.filterShape;let t=e.strideHeight,n=e.strideWidth,s=e.padInfo.top,r=e.padInfo.left,a=e.dataFormat==="channelsLast";this.userCode=` void main() { ivec4 coords = getOutputCoords(); int wR = coords.x; @@ -2711,7 +2705,7 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel } setOutput(dotProd); } - `}},Aae=class{constructor(e){this.variableNames=["dy","W"],this.outputShape=e.inShape;let t=e.filterHeight,n=e.filterWidth,s=e.strideHeight,r=e.strideWidth,a=e.dataFormat==="channelsLast",o=t-1-e.padInfo.top,i=n-1-e.padInfo.left,l=a?1:2,u=a?2:3,c=a?3:1;this.userCode=` + `}},Yre=class{constructor(e){this.variableNames=["dy","W"],this.outputShape=e.inShape;let t=e.filterHeight,n=e.filterWidth,s=e.strideHeight,r=e.strideWidth,a=e.dataFormat==="channelsLast",o=t-1-e.padInfo.top,i=n-1-e.padInfo.left,l=a?1:2,u=a?2:3,c=a?3:1;this.userCode=` const ivec2 pads = ivec2(${o}, ${i}); void main() { @@ -2764,7 +2758,7 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel } setOutput(dotProd); } - `}},xae=class{constructor(e){this.variableNames=["x","dy"],this.outputShape=e.filterShape;let t=e.strideDepth,n=e.strideHeight,s=e.strideWidth,r=e.padInfo.front,a=e.padInfo.top,o=e.padInfo.left;this.userCode=` + `}},Jre=class{constructor(e){this.variableNames=["x","dy"],this.outputShape=e.filterShape;let t=e.strideDepth,n=e.strideHeight,s=e.strideWidth,r=e.padInfo.front,a=e.padInfo.top,o=e.padInfo.left;this.userCode=` void main() { ivec5 coords = getOutputCoords(); int wF = coords.x; @@ -2806,7 +2800,7 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel } setOutput(dotProd); } - `}},bae=class{constructor(e){this.variableNames=["dy","W"],this.outputShape=e.inShape;let t=e.filterDepth,n=e.filterHeight,s=e.filterWidth,r=e.strideDepth,a=e.strideHeight,o=e.strideWidth,i=t-1-e.padInfo.front,l=n-1-e.padInfo.top,u=s-1-e.padInfo.left;this.userCode=` + `}},Qre=class{constructor(e){this.variableNames=["dy","W"],this.outputShape=e.inShape;let t=e.filterDepth,n=e.filterHeight,s=e.filterWidth,r=e.strideDepth,a=e.strideHeight,o=e.strideWidth,i=t-1-e.padInfo.front,l=n-1-e.padInfo.top,u=s-1-e.padInfo.left;this.userCode=` const ivec3 pads = ivec3(${i}, ${l}, ${u}); void main() { @@ -2863,12 +2857,12 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel } setOutput(dotProd); } - `}};function vae(e){let{inputs:t,backend:n,attrs:s}=e,{x:r,dy:a}=t,{strides:o,pad:i,dataFormat:l,dimRoundingMode:u,filterShape:c}=s,p=T.convertConv2DDataFormat(l),d=T.computeConv2DInfo(r.shape,c,o,1,i,u,!1,p),h=new yae(d);return n.runWebGLProgram(h,[r,a],"float32")}var wae={kernelName:o0,backendName:"webgl",kernelFunc:vae};function kae(e){let{inputs:t,backend:n,attrs:s}=e,{dy:r,filter:a}=t,{inputShape:o,strides:i,pad:l,dataFormat:u,dimRoundingMode:c}=s,p=T.convertConv2DDataFormat(u),d=T.computeConv2DInfo(o,a.shape,i,1,l,c,!1,p),h=new Aae(d);return n.runWebGLProgram(h,[r,a],"float32")}var Sae={kernelName:Co,backendName:"webgl",kernelFunc:kae};function Iae(e){let{inputs:t,backend:n,attrs:s}=e,{x:r,filter:a}=t,{strides:o,pad:i,dilations:l}=s,u=T.computeConv3DInfo(r.shape,a.shape,o,l,i),c=new hae(u);return n.runWebGLProgram(c,[r,a],"float32")}var Cae={kernelName:Xp,backendName:"webgl",kernelFunc:Iae};function Tae(e){let{inputs:t,backend:n,attrs:s}=e,{x:r,dy:a}=t,{strides:o,pad:i,filterShape:l}=s,u=T.computeConv3DInfo(r.shape,l,o,1,i),c=new xae(u);return n.runWebGLProgram(c,[r,a],"float32")}var Nae={kernelName:i0,backendName:"webgl",kernelFunc:Tae};function Eae(e){let{inputs:t,backend:n,attrs:s}=e,{dy:r,filter:a}=t,{pad:o,strides:i,inputShape:l}=s,u=T.computeConv3DInfo(l,a.shape,i,1,o),c=new bae(u);return n.runWebGLProgram(c,[r,a],"float32")}var Rae={kernelName:l0,backendName:"webgl",kernelFunc:Eae},_ae=xd+` + `}};function eae(e){let{inputs:t,backend:n,attrs:s}=e,{x:r,dy:a}=t,{strides:o,pad:i,dataFormat:l,dimRoundingMode:u,filterShape:c}=s,p=T.convertConv2DDataFormat(l),d=T.computeConv2DInfo(r.shape,c,o,1,i,u,!1,p),h=new Zre(d);return n.runWebGLProgram(h,[r,a],"float32")}var tae={kernelName:Om,backendName:"webgl",kernelFunc:eae};function nae(e){let{inputs:t,backend:n,attrs:s}=e,{dy:r,filter:a}=t,{inputShape:o,strides:i,pad:l,dataFormat:u,dimRoundingMode:c}=s,p=T.convertConv2DDataFormat(u),d=T.computeConv2DInfo(o,a.shape,i,1,l,c,!1,p),h=new Yre(d);return n.runWebGLProgram(h,[r,a],"float32")}var sae={kernelName:ko,backendName:"webgl",kernelFunc:nae};function rae(e){let{inputs:t,backend:n,attrs:s}=e,{x:r,filter:a}=t,{strides:o,pad:i,dilations:l}=s,u=T.computeConv3DInfo(r.shape,a.shape,o,l,i),c=new jre(u);return n.runWebGLProgram(c,[r,a],"float32")}var aae={kernelName:_p,backendName:"webgl",kernelFunc:rae};function oae(e){let{inputs:t,backend:n,attrs:s}=e,{x:r,dy:a}=t,{strides:o,pad:i,filterShape:l}=s,u=T.computeConv3DInfo(r.shape,l,o,1,i),c=new Jre(u);return n.runWebGLProgram(c,[r,a],"float32")}var iae={kernelName:Mm,backendName:"webgl",kernelFunc:oae};function lae(e){let{inputs:t,backend:n,attrs:s}=e,{dy:r,filter:a}=t,{pad:o,strides:i,inputShape:l}=s,u=T.computeConv3DInfo(l,a.shape,i,1,o),c=new Qre(u);return n.runWebGLProgram(c,[r,a],"float32")}var uae={kernelName:zm,backendName:"webgl",kernelFunc:lae},cae=id+` return cos(x); -`,Dae=ht({opSnippet:_ae}),$ae={kernelName:To,backendName:"webgl",kernelFunc:Dae},Pae=` +`,dae=pt({opSnippet:cae}),pae={kernelName:So,backendName:"webgl",kernelFunc:dae},hae=` float e2x = exp(-x); return (e2x + 1.0 / e2x) / 2.0; -`,Fae=ht({opSnippet:Pae}),Oae={kernelName:No,backendName:"webgl",kernelFunc:Fae},Mae=class{constructor(e,t,n,s,r){this.variableNames=["Image","Boxes","BoxInd"],this.outputShape=[];let[a,o,i,l]=e,[u]=t,[c,p]=n;this.outputShape=[u,c,p,l];let d=s==="bilinear"?1:0,[h,f]=[`${o-1}.0`,`${i-1}.0`],[m,g,y]=c>1?[`${(o-1)/(c-1)}`,"(y2-y1) * height_ratio",`y1*${h} + float(y)*(height_scale)`]:["0.0","0.0",`0.5 * (y1+y2) * ${h}`],[x,A,b]=p>1?[`${(i-1)/(p-1)}`,"(x2-x1) * width_ratio",`x1*${f} + float(x)*(width_scale)`]:["0.0","0.0",`0.5 * (x1+x2) * ${f}`];this.userCode=` +`,fae=pt({opSnippet:hae}),mae={kernelName:Io,backendName:"webgl",kernelFunc:fae},gae=class{constructor(e,t,n,s,r){this.variableNames=["Image","Boxes","BoxInd"],this.outputShape=[];let[a,o,i,l]=e,[u]=t,[c,p]=n;this.outputShape=[u,c,p,l];let d=s==="bilinear"?1:0,[h,f]=[`${o-1}.0`,`${i-1}.0`],[m,g,y]=c>1?[`${(o-1)/(c-1)}`,"(y2-y1) * height_ratio",`y1*${h} + float(y)*(height_scale)`]:["0.0","0.0",`0.5 * (y1+y2) * ${h}`],[x,A,b]=p>1?[`${(i-1)/(p-1)}`,"(x2-x1) * width_ratio",`x1*${f} + float(x)*(width_scale)`]:["0.0","0.0",`0.5 * (x1+x2) * ${f}`];this.userCode=` const float height_ratio = float(${m}); const float width_ratio = float(${x}); void main() { @@ -2929,20 +2923,20 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel setOutput(newValue); } } - `}},zae=e=>{let{inputs:t,backend:n,attrs:s}=e,{image:r,boxes:a,boxInd:o}=t,{cropSize:i,method:l,extrapolationValue:u}=s,c=new Mae(r.shape,a.shape,i,l,u);return n.runWebGLProgram(c,[r,a,o],"float32")},Lae={kernelName:Sl,backendName:"webgl",kernelFunc:zae},Bp;(function(e){e.Prod="*",e.Sum="+"})(Bp||(Bp={}));var X7=class{constructor(e,t,n,s){this.op=e,this.outputShape=t,this.variableNames=["x"],this.customUniforms=[{name:"index",type:"float"}];let r=this.outputShape.length,a=this.op===Bp.Prod?"1.0":"0.0",o=n?a:`getX(${K7(r,"coords",this.op)})`,i=this.outputShape[this.outputShape.length-1],l="",u="";n?(l=s?`end != ${i-1}`:"end != 0",u=s?"end + 1":"end - 1"):(l=s?`end + pow2 < ${i}`:"end >= pow2",u=s?"end + pow2":"end - pow2"),this.userCode=` + `}},yae=e=>{let{inputs:t,backend:n,attrs:s}=e,{image:r,boxes:a,boxInd:o}=t,{cropSize:i,method:l,extrapolationValue:u}=s,c=new gae(r.shape,a.shape,i,l,u);return n.runWebGLProgram(c,[r,a,o],"float32")},Aae={kernelName:gl,backendName:"webgl",kernelFunc:yae},kp;(function(e){e.Prod="*",e.Sum="+"})(kp||(kp={}));var T7=class{constructor(e,t,n,s){this.op=e,this.outputShape=t,this.variableNames=["x"],this.customUniforms=[{name:"index",type:"float"}];let r=this.outputShape.length,a=this.op===kp.Prod?"1.0":"0.0",o=n?a:`getX(${N7(r,"coords",this.op)})`,i=this.outputShape[this.outputShape.length-1],l="",u="";n?(l=s?`end != ${i-1}`:"end != 0",u=s?"end + 1":"end - 1"):(l=s?`end + pow2 < ${i}`:"end >= pow2",u=s?"end + pow2":"end - pow2"),this.userCode=` void main() { - ${kt(r)} coords = getOutputCoords(); - int end = ${Z7(r,"coords",this.op)}; + ${Tt(r)} coords = getOutputCoords(); + int end = ${E7(r,"coords",this.op)}; float val = ${o}; int pow2 = int(pow(2.0, index)); if (${l}) { int idx = ${u}; - ${Z7(r,"coords",this.op)} = idx; - val ${this.op}= getX(${K7(r,"coords",this.op)}); + ${E7(r,"coords",this.op)} = idx; + val ${this.op}= getX(${N7(r,"coords",this.op)}); } setOutput(val); } - `}};function K7(e,t,n){if(e===1)return`${t}`;if(e===2)return`${t}.x, ${t}.y`;if(e===3)return`${t}.x, ${t}.y, ${t}.z`;if(e===4)return`${t}.x, ${t}.y, ${t}.z, ${t}.w`;throw new Error(`Cumulative ${n} for rank ${e} is not yet supported`)}function Z7(e,t,n){if(e===1)return`${t}`;if(e===2)return`${t}.y`;if(e===3)return`${t}.z`;if(e===4)return`${t}.w`;throw new Error(`Cumulative ${n} for rank ${e} is not yet supported`)}function Y9(e,t,n,s,r,a){let o=t.shape.length,i=T.getAxesPermutation([s],o),l=t;i!=null&&(l=cs({inputs:{x:t},backend:n,attrs:{perm:i}}));let u=T.getInnerMostAxes(1,o)[0];if(u!==o-1)throw new Error(`WebGL cumprod shader expects an inner-most axis=${t.shape.length-1} but got axis=${s}`);let c=l.shape[u],p=Vs({inputs:{x:l},backend:n});for(let d=0;d<=Math.ceil(Math.log2(c))-1;d++){let h=new X7(e,l.shape,!1,a),f=[[d]],m=p;p=n.runWebGLProgram(h,[p],p.dtype,f),n.disposeIntermediateTensorInfo(m)}if(r){let d=new X7(e,l.shape,r,a),h=p;p=n.runWebGLProgram(d,[p],p.dtype),n.disposeIntermediateTensorInfo(h)}if(i!=null){let d=T.getUndoAxesPermutation(i),h=cs({inputs:{x:p},backend:n,attrs:{perm:d}});return n.disposeIntermediateTensorInfo(p),n.disposeIntermediateTensorInfo(l),h}return p}function Bae(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{axis:a,exclusive:o,reverse:i}=s;return Y9(Bp.Prod,r,n,a,o,i)}var Wae={kernelName:kl,backendName:"webgl",kernelFunc:Bae};function Vae(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{axis:a,exclusive:o,reverse:i}=s;return Y9(Bp.Sum,r,n,a,o,i)}var Uae={kernelName:Eo,backendName:"webgl",kernelFunc:Vae};function Gae(e){let{inputs:t,backend:n,attrs:s}=e,{x:r,weights:a}=t,{size:o,binaryOutput:i}=s;if(r.shape.length===1){let l=n.readSync(r.dataId),u=n.readSync(a.dataId),c=E9(l,u,a.dtype,a.shape,o);return n.makeTensorInfo([o],a.dtype,c)}else if(r.shape.length===2){let l=n.bufferSync(r),u=n.bufferSync(a),c=ene(l,u,o,i);return n.makeTensorInfo(c.shape,a.dtype,c.values)}throw new Error(`Error in denseBincount: input must be at most rank 2, but got rank${r.shape.length}.`)}var Hae={kernelName:u0,backendName:"webgl",kernelFunc:Gae},jae=class{constructor(e,t,n){this.variableNames=["x"],this.outputShape=[],this.outputShape=e,this.blockSize=t,this.dataFormat=n,this.userCode=` + `}};function N7(e,t,n){if(e===1)return`${t}`;if(e===2)return`${t}.x, ${t}.y`;if(e===3)return`${t}.x, ${t}.y, ${t}.z`;if(e===4)return`${t}.x, ${t}.y, ${t}.z, ${t}.w`;throw new Error(`Cumulative ${n} for rank ${e} is not yet supported`)}function E7(e,t,n){if(e===1)return`${t}`;if(e===2)return`${t}.y`;if(e===3)return`${t}.z`;if(e===4)return`${t}.w`;throw new Error(`Cumulative ${n} for rank ${e} is not yet supported`)}function F9(e,t,n,s,r,a){let o=t.shape.length,i=T.getAxesPermutation([s],o),l=t;i!=null&&(l=is({inputs:{x:t},backend:n,attrs:{perm:i}}));let u=T.getInnerMostAxes(1,o)[0];if(u!==o-1)throw new Error(`WebGL cumprod shader expects an inner-most axis=${t.shape.length-1} but got axis=${s}`);let c=l.shape[u],p=Ls({inputs:{x:l},backend:n});for(let d=0;d<=Math.ceil(Math.log2(c))-1;d++){let h=new T7(e,l.shape,!1,a),f=[[d]],m=p;p=n.runWebGLProgram(h,[p],p.dtype,f),n.disposeIntermediateTensorInfo(m)}if(r){let d=new T7(e,l.shape,r,a),h=p;p=n.runWebGLProgram(d,[p],p.dtype),n.disposeIntermediateTensorInfo(h)}if(i!=null){let d=T.getUndoAxesPermutation(i),h=is({inputs:{x:p},backend:n,attrs:{perm:d}});return n.disposeIntermediateTensorInfo(p),n.disposeIntermediateTensorInfo(l),h}return p}function xae(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{axis:a,exclusive:o,reverse:i}=s;return F9(kp.Prod,r,n,a,o,i)}var bae={kernelName:ml,backendName:"webgl",kernelFunc:xae};function vae(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{axis:a,exclusive:o,reverse:i}=s;return F9(kp.Sum,r,n,a,o,i)}var wae={kernelName:Co,backendName:"webgl",kernelFunc:vae};function kae(e){let{inputs:t,backend:n,attrs:s}=e,{x:r,weights:a}=t,{size:o,binaryOutput:i}=s;if(r.shape.length===1){let l=n.readSync(r.dataId),u=n.readSync(a.dataId),c=f9(l,u,a.dtype,a.shape,o);return n.makeTensorInfo([o],a.dtype,c)}else if(r.shape.length===2){let l=n.bufferSync(r),u=n.bufferSync(a),c=Pte(l,u,o,i);return n.makeTensorInfo(c.shape,a.dtype,c.values)}throw new Error(`Error in denseBincount: input must be at most rank 2, but got rank${r.shape.length}.`)}var Sae={kernelName:Lm,backendName:"webgl",kernelFunc:kae},Iae=class{constructor(e,t,n){this.variableNames=["x"],this.outputShape=[],this.outputShape=e,this.blockSize=t,this.dataFormat=n,this.userCode=` void main() { ivec4 coords = getOutputCoords(); int b = coords[0]; @@ -2961,7 +2955,7 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel float result = ${this.getInputSamplingString()}; setOutput(result); } - `}getHeightCoordString(){return this.dataFormat==="NHWC"?"coords[1]":"coords[2]"}getWidthCoordString(){return this.dataFormat==="NHWC"?"coords[2]":"coords[3]"}getDepthCoordString(){return this.dataFormat==="NHWC"?"coords[3]":"coords[1]"}getOutputDepthSize(){return this.dataFormat==="NHWC"?this.outputShape[3]:this.outputShape[1]}getInputSamplingString(){return this.dataFormat==="NHWC"?"getX(b, in_h, in_w, in_d)":"getX(b, in_d, in_h, in_w)"}};function qae(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{blockSize:a,dataFormat:o}=s,i=r.shape[0],l=o==="NHWC"?r.shape[1]:r.shape[2],u=o==="NHWC"?r.shape[2]:r.shape[3],c=o==="NHWC"?r.shape[3]:r.shape[1],p=l*a,d=u*a,h=c/(a*a),f=o==="NHWC"?[i,p,d,h]:[i,h,p,d],m=new jae(f,a,o);return n.runWebGLProgram(m,[r],r.dtype)}var Xae={kernelName:Il,backendName:"webgl",kernelFunc:qae},J9=class{constructor(e,t=!1,n=null,s=!1,r=!1){this.variableNames=["x","W"],this.customUniforms=[{name:"pads",type:"ivec2"},{name:"strides",type:"ivec2"},{name:"dilations",type:"ivec2"},{name:"inDims",type:"ivec2"}],this.outputShape=e.outShape,this.enableShapeUniforms=fs(this.outputShape.length);let a=e.filterHeight,o=e.filterWidth,i=e.outChannels/e.inChannels,l="",u="";n&&(s?l=`float activation(float a) { + `}getHeightCoordString(){return this.dataFormat==="NHWC"?"coords[1]":"coords[2]"}getWidthCoordString(){return this.dataFormat==="NHWC"?"coords[2]":"coords[3]"}getDepthCoordString(){return this.dataFormat==="NHWC"?"coords[3]":"coords[1]"}getOutputDepthSize(){return this.dataFormat==="NHWC"?this.outputShape[3]:this.outputShape[1]}getInputSamplingString(){return this.dataFormat==="NHWC"?"getX(b, in_h, in_w, in_d)":"getX(b, in_d, in_h, in_w)"}};function Cae(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{blockSize:a,dataFormat:o}=s,i=r.shape[0],l=o==="NHWC"?r.shape[1]:r.shape[2],u=o==="NHWC"?r.shape[2]:r.shape[3],c=o==="NHWC"?r.shape[3]:r.shape[1],p=l*a,d=u*a,h=c/(a*a),f=o==="NHWC"?[i,p,d,h]:[i,h,p,d],m=new Iae(f,a,o);return n.runWebGLProgram(m,[r],r.dtype)}var Tae={kernelName:yl,backendName:"webgl",kernelFunc:Cae},O9=class{constructor(e,t=!1,n=null,s=!1,r=!1){this.variableNames=["x","W"],this.customUniforms=[{name:"pads",type:"ivec2"},{name:"strides",type:"ivec2"},{name:"dilations",type:"ivec2"},{name:"inDims",type:"ivec2"}],this.outputShape=e.outShape,this.enableShapeUniforms=ds(this.outputShape.length);let a=e.filterHeight,o=e.filterWidth,i=e.outChannels/e.inChannels,l="",u="";n&&(s?l=`float activation(float a) { float b = getPreluActivationWeightsAtOutCoords(); ${n} }`:r?l=`float activation(float a) { @@ -3014,7 +3008,7 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel ${u} setOutput(result); } - `}},Q9=class{constructor(e,t=!1,n=null,s=!1,r=!1){this.variableNames=["x","W"],this.packedInputs=!0,this.packedOutput=!0,this.customUniforms=[{name:"pads",type:"ivec2"},{name:"strides",type:"ivec2"},{name:"dilations",type:"ivec2"},{name:"inDims",type:"ivec2"}],this.outputShape=e.outShape,this.enableShapeUniforms=fs(this.outputShape.length);let a=e.outChannels/e.inChannels,o=e.padInfo.left,i=e.strideWidth,l=e.dilationWidth,u=e.filterHeight,c=e.filterWidth,p=c,d=` + `}},M9=class{constructor(e,t=!1,n=null,s=!1,r=!1){this.variableNames=["x","W"],this.packedInputs=!0,this.packedOutput=!0,this.customUniforms=[{name:"pads",type:"ivec2"},{name:"strides",type:"ivec2"},{name:"dilations",type:"ivec2"},{name:"inDims",type:"ivec2"}],this.outputShape=e.outShape,this.enableShapeUniforms=ds(this.outputShape.length);let a=e.outChannels/e.inChannels,o=e.padInfo.left,i=e.strideWidth,l=e.dilationWidth,u=e.filterHeight,c=e.filterWidth,p=c,d=` int xR; int xC; int xCOffset; vec4 wTexel; vec4 previous; vec4 final;`;for(let g=0;g`Error in depthwiseConv2d: Either strides or dilations must be 1. Got strides ${o} and dilations '${c}'`);let p=T.computeConv2DInfo(r.shape,a.shape,o,c,i,u,!0),d;H().getBool("WEBGL_PACK_DEPTHWISECONV")&&p.strideWidth<=2&&p.outChannels/p.inChannels===1?d=new Q9(p):d=new J9(p);let h=[[p.padInfo.top,p.padInfo.left],[p.strideHeight,p.strideWidth],[p.dilationHeight,p.dilationWidth],[p.inHeight,p.inWidth]];return n.runWebGLProgram(d,[r,a],"float32",h)}var Zae={kernelName:Ro,backendName:"webgl",kernelFunc:Kae},Yae=class{constructor(e){this.variableNames=["x","dy"],this.outputShape=e.filterShape;let t=e.strideHeight,n=e.strideWidth,s=e.padInfo.top,r=e.padInfo.left,a=e.outChannels/e.inChannels;this.userCode=` + `}};function Nae(e){let{inputs:t,backend:n,attrs:s}=e,{x:r,filter:a}=t,{strides:o,pad:i,dilations:l,dimRoundingMode:u}=s,c=l;c==null&&(c=[1,1]),v.assert(T.eitherStridesOrDilationsAreOne(o,c),()=>`Error in depthwiseConv2d: Either strides or dilations must be 1. Got strides ${o} and dilations '${c}'`);let p=T.computeConv2DInfo(r.shape,a.shape,o,c,i,u,!0),d;U().getBool("WEBGL_PACK_DEPTHWISECONV")&&p.strideWidth<=2&&p.outChannels/p.inChannels===1?d=new M9(p):d=new O9(p);let h=[[p.padInfo.top,p.padInfo.left],[p.strideHeight,p.strideWidth],[p.dilationHeight,p.dilationWidth],[p.inHeight,p.inWidth]];return n.runWebGLProgram(d,[r,a],"float32",h)}var Eae={kernelName:To,backendName:"webgl",kernelFunc:Nae},Rae=class{constructor(e){this.variableNames=["x","dy"],this.outputShape=e.filterShape;let t=e.strideHeight,n=e.strideWidth,s=e.padInfo.top,r=e.padInfo.left,a=e.outChannels/e.inChannels;this.userCode=` void main() { ivec4 coords = getOutputCoords(); int wR = coords.x; @@ -3238,7 +3232,7 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel } setOutput(dotProd); } - `}},Jae=class{constructor(e){this.variableNames=["dy","W"],this.outputShape=e.inShape;let t=e.filterHeight,n=e.filterWidth,s=e.strideHeight,r=e.strideWidth,a=t-1-e.padInfo.top,o=n-1-e.padInfo.left,i=e.outChannels/e.inChannels;this.userCode=` + `}},_ae=class{constructor(e){this.variableNames=["dy","W"],this.outputShape=e.inShape;let t=e.filterHeight,n=e.filterWidth,s=e.strideHeight,r=e.strideWidth,a=t-1-e.padInfo.top,o=n-1-e.padInfo.left,i=e.outChannels/e.inChannels;this.userCode=` const ivec2 pads = ivec2(${a}, ${o}); void main() { @@ -3283,13 +3277,13 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel } setOutput(dotProd); } - `}};function Qae(e){let{inputs:t,backend:n,attrs:s}=e,{x:r,dy:a}=t,{strides:o,dilations:i,pad:l,dimRoundingMode:u,filterShape:c}=s,p=T.computeConv2DInfo(r.shape,c,o,i,l,u,!0),d=new Yae(p);return n.runWebGLProgram(d,[r,a],"float32")}var eoe={kernelName:c0,backendName:"webgl",kernelFunc:Qae};function toe(e){let{inputs:t,backend:n,attrs:s}=e,{dy:r,filter:a}=t,{strides:o,dilations:i,pad:l,dimRoundingMode:u,inputShape:c}=s,p=T.computeConv2DInfo(c,a.shape,o,i,l,u,!0),d=new Jae(p);return n.runWebGLProgram(d,[r,a],"float32")}var noe={kernelName:d0,backendName:"webgl",kernelFunc:toe},soe=class{constructor(e){this.variableNames=["X"],this.outputShape=[e,e],this.userCode=` + `}};function Dae(e){let{inputs:t,backend:n,attrs:s}=e,{x:r,dy:a}=t,{strides:o,dilations:i,pad:l,dimRoundingMode:u,filterShape:c}=s,p=T.computeConv2DInfo(r.shape,c,o,i,l,u,!0),d=new Rae(p);return n.runWebGLProgram(d,[r,a],"float32")}var $ae={kernelName:Bm,backendName:"webgl",kernelFunc:Dae};function Pae(e){let{inputs:t,backend:n,attrs:s}=e,{dy:r,filter:a}=t,{strides:o,dilations:i,pad:l,dimRoundingMode:u,inputShape:c}=s,p=T.computeConv2DInfo(c,a.shape,o,i,l,u,!0),d=new _ae(p);return n.runWebGLProgram(d,[r,a],"float32")}var Fae={kernelName:Wm,backendName:"webgl",kernelFunc:Pae},Oae=class{constructor(e){this.variableNames=["X"],this.outputShape=[e,e],this.userCode=` void main() { ivec2 coords = getOutputCoords(); float val = coords[0] == coords[1] ? getX(coords[0]) : 0.0; setOutput(val); } - `}};function roe(e){let{inputs:t,backend:n}=e,{x:s}=t,r=[...s.shape,...s.shape],a=v.sizeFromShape(s.shape),o=we({inputs:{x:s},backend:n,attrs:{shape:[a]}}),i=new soe(a),l=n.runWebGLProgram(i,[o],o.dtype),u=we({inputs:{x:l},backend:n,attrs:{shape:r}});return n.disposeIntermediateTensorInfo(o),n.disposeIntermediateTensorInfo(l),u}var aoe={kernelName:p0,backendName:"webgl",kernelFunc:roe},ooe=class{constructor(e){this.variableNames=["x","W"],this.outputShape=e.outShape;let{inHeight:t,inWidth:n,padInfo:s,strideHeight:r,strideWidth:a,filterHeight:o,filterWidth:i,dilationHeight:l,dilationWidth:u}=e,{top:c,left:p}=s;this.userCode=` + `}};function Mae(e){let{inputs:t,backend:n}=e,{x:s}=t,r=[...s.shape,...s.shape],a=v.sizeFromShape(s.shape),o=be({inputs:{x:s},backend:n,attrs:{shape:[a]}}),i=new Oae(a),l=n.runWebGLProgram(i,[o],o.dtype),u=be({inputs:{x:l},backend:n,attrs:{shape:r}});return n.disposeIntermediateTensorInfo(o),n.disposeIntermediateTensorInfo(l),u}var zae={kernelName:Vm,backendName:"webgl",kernelFunc:Mae},Lae=class{constructor(e){this.variableNames=["x","W"],this.outputShape=e.outShape;let{inHeight:t,inWidth:n,padInfo:s,strideHeight:r,strideWidth:a,filterHeight:o,filterWidth:i,dilationHeight:l,dilationWidth:u}=e,{top:c,left:p}=s;this.userCode=` const ivec2 strides = ivec2(${r}, ${a}); const ivec2 pads = ivec2(${c}, ${p}); const float neg_infinity = -3.4e38; @@ -3327,7 +3321,7 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel float result = curVal; setOutput(result); } - `}};function ioe(e){let{inputs:t,backend:n,attrs:s}=e,{x:r,filter:a}=t,{strides:o,pad:i,dilations:l}=s,u=T.computeDilation2DInfo(r.shape,a.shape,o,i,"NHWC",l),c,p=new ooe(u);c=n.runWebGLProgram(p,[r,a],"float32");let d=we({inputs:{x:c},backend:n,attrs:{shape:u.outShape}});return n.disposeIntermediateTensorInfo(c),d}var loe={kernelName:Kp,backendName:"webgl",kernelFunc:ioe};function uoe(e){let{inputs:t,backend:n,attrs:s}=e,{equation:r}=s,a=t,{allDims:o,summedDims:i,idDims:l}=T.decodeEinsumEquation(r,a.length);T.checkEinsumDimSizes(o.length,l,a);let{path:u,steps:c}=T.getEinsumComputePath(i,l),p=c.length,d=null,h=o.length,f=[];for(let m=0;m=0&&(d=O2({inputs:{x:d},backend:n,attrs:{axis:u[m]-(o.length-h),keepDims:!1}}),f.push(d)),h--)}for(let m of f)m!==d&&n.disposeIntermediateTensorInfo(m);return d}var coe={kernelName:Zp,backendName:"webgl",kernelFunc:uoe},doe="return (x >= 0.0) ? x : (exp(x) - 1.0);",poe=` + `}};function Bae(e){let{inputs:t,backend:n,attrs:s}=e,{x:r,filter:a}=t,{strides:o,pad:i,dilations:l}=s,u=T.computeDilation2DInfo(r.shape,a.shape,o,i,"NHWC",l),c,p=new Lae(u);c=n.runWebGLProgram(p,[r,a],"float32");let d=be({inputs:{x:c},backend:n,attrs:{shape:u.outShape}});return n.disposeIntermediateTensorInfo(c),d}var Wae={kernelName:Dp,backendName:"webgl",kernelFunc:Bae};function Vae(e){let{inputs:t,backend:n,attrs:s}=e,{equation:r}=s,a=t,{allDims:o,summedDims:i,idDims:l}=T.decodeEinsumEquation(r,a.length);T.checkEinsumDimSizes(o.length,l,a);let{path:u,steps:c}=T.getEinsumComputePath(i,l),p=c.length,d=null,h=o.length,f=[];for(let m=0;m=0&&(d=d2({inputs:{x:d},backend:n,attrs:{axis:u[m]-(o.length-h),keepDims:!1}}),f.push(d)),h--)}for(let m of f)m!==d&&n.disposeIntermediateTensorInfo(m);return d}var Uae={kernelName:$p,backendName:"webgl",kernelFunc:Vae},Gae="return (x >= 0.0) ? x : (exp(x) - 1.0);",Hae=` vec4 result; result.r = (x.r >= 0.0) ? x.r : (exp(x.r) - 1.0); @@ -3336,12 +3330,12 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel result.a = (x.a >= 0.0) ? x.a : (exp(x.a) - 1.0); return result; -`,hoe=ht({opSnippet:doe,packedOpSnippet:poe}),foe={kernelName:Do,backendName:"webgl",kernelFunc:hoe},moe="return (b >= 1.0) ? a : a * (b + 1.0);",goe=` +`,jae=pt({opSnippet:Gae,packedOpSnippet:Hae}),qae={kernelName:Eo,backendName:"webgl",kernelFunc:jae},Xae="return (b >= 1.0) ? a : a * (b + 1.0);",Kae=` vec4 bGTEZero = vec4(greaterThanEqual(b, vec4(0.))); return (bGTEZero * a) + ((vec4(1.0) - bGTEZero) * (a * (b + vec4(1.0)))); -`,yoe=e=>{let{inputs:t,backend:n}=e,{dy:s,y:r}=t,a=H().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new jh(goe,s.shape,r.shape):new Ic(moe,s.shape,r.shape);return n.runWebGLProgram(a,[s,r],s.dtype)},Aoe={kernelName:h0,backendName:"webgl",kernelFunc:yoe},xoe=` +`,Zae=e=>{let{inputs:t,backend:n}=e,{dy:s,y:r}=t,a=U().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new _h(Kae,s.shape,r.shape):new hc(Xae,s.shape,r.shape);return n.runWebGLProgram(a,[s,r],s.dtype)},Yae={kernelName:Um,backendName:"webgl",kernelFunc:Zae},Jae=` return vec4(equal(a, b)); -`,boe="return float(a == b);",voe=Bn({opSnippet:boe,packedOpSnippet:xoe,dtype:"bool",cpuKernelImpl:rne}),woe={kernelName:Cl,backendName:"webgl",kernelFunc:voe},koe=` +`,Qae="return float(a == b);",eoe=Wn({opSnippet:Qae,packedOpSnippet:Jae,dtype:"bool",cpuKernelImpl:zte}),toe={kernelName:Al,backendName:"webgl",kernelFunc:eoe},noe=` // Error function is calculated approximately with elementary function. // See "Handbook of Mathematical Functions with Formulas, // Graphs, and Mathematical Tables", Abramowitz and Stegun. @@ -3356,9 +3350,9 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel x = abs(x); float t = 1.0 / (1.0 + p * x); return sign * (1.0 - (((((a5*t + a4)*t) + a3)*t + a2)*t + a1)*t*exp(-x*x)); -`,Soe=ht({opSnippet:koe}),Ioe={kernelName:Mc,backendName:"webgl",kernelFunc:Soe},Coe=xd+` +`,soe=pt({opSnippet:noe}),roe={kernelName:Ic,backendName:"webgl",kernelFunc:soe},aoe=id+` return exp(x); -`,Toe=` +`,ooe=` vec4 result = exp(x); bvec4 isNaN = isnan(x); result.r = isNaN.r ? x.r : result.r; @@ -3367,7 +3361,7 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel result.a = isNaN.a ? x.a : result.a; return result; -`,eC=ht({opSnippet:Coe,packedOpSnippet:Toe,cpuKernelImpl:ane,dtype:"float32"}),Noe={kernelName:$o,backendName:"webgl",kernelFunc:eC};function Cy(e){let{inputs:t,attrs:n,backend:s}=e,{dim:r}=n,{input:a}=t,o=a.shape.length,i=a.shape.slice(),l=r;return r<0&&(v.assert(-(o+1)<=r,()=>`Axis must be in the interval [${-(o+1)}, ${o}]`),l=o+r+1),i.splice(l,0,1),we({inputs:{x:a},backend:s,attrs:{shape:i}})}var Eoe={kernelName:Tl,backendName:"webgl",kernelFunc:Cy},Y7="return exp(x) - 1.0;",Roe=ht({opSnippet:Y7,packedOpSnippet:Y7,cpuKernelImpl:one}),_oe={kernelName:Nl,backendName:"webgl",kernelFunc:Roe},J7=class{constructor(e,t,n){this.variableNames=["real","imag"];let s=t[1];this.outputShape=t;let r=n?`2.0 * ${Math.PI}`:`-2.0 * ${Math.PI}`,a=n?`${s}.0`:"1.0",o;if(e==="real")o="return real * expR - imag * expI;";else if(e==="imag")o="return real * expI + imag * expR;";else throw new Error(`FFT component must be either "real" or "imag", got ${e}.`);this.userCode=` +`,z9=pt({opSnippet:aoe,packedOpSnippet:ooe,cpuKernelImpl:Lte,dtype:"float32"}),ioe={kernelName:Ro,backendName:"webgl",kernelFunc:z9};function ay(e){let{inputs:t,attrs:n,backend:s}=e,{dim:r}=n,{input:a}=t,o=a.shape.length,i=a.shape.slice(),l=r;return r<0&&(v.assert(-(o+1)<=r,()=>`Axis must be in the interval [${-(o+1)}, ${o}]`),l=o+r+1),i.splice(l,0,1),be({inputs:{x:a},backend:s,attrs:{shape:i}})}var loe={kernelName:xl,backendName:"webgl",kernelFunc:ay},R7="return exp(x) - 1.0;",uoe=pt({opSnippet:R7,packedOpSnippet:R7,cpuKernelImpl:Bte}),coe={kernelName:bl,backendName:"webgl",kernelFunc:uoe},_7=class{constructor(e,t,n){this.variableNames=["real","imag"];let s=t[1];this.outputShape=t;let r=n?`2.0 * ${Math.PI}`:`-2.0 * ${Math.PI}`,a=n?`${s}.0`:"1.0",o;if(e==="real")o="return real * expR - imag * expI;";else if(e==="imag")o="return real * expI + imag * expR;";else throw new Error(`FFT component must be either "real" or "imag", got ${e}.`);this.userCode=` const float exponentMultiplier = ${r}; float unaryOpComplex(float real, float expR, float imag, float expI) { @@ -3400,12 +3394,12 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel ivec2 coords = getOutputCoords(); setOutput(mulMatDFT(coords[0], coords[1])); } - `}};function tC(e,t,n){let s=n.texData.get(e.dataId),r=v.sizeFromShape(e.shape),a=e.shape[e.shape.length-1],o=r/a,i=we({inputs:{x:e},backend:n,attrs:{shape:[o,a]}}),l=i.shape,u=new J7("real",l,t),c=new J7("imag",l,t),p=[{dataId:s.complexTensorInfos.real.dataId,dtype:s.complexTensorInfos.real.dtype,shape:l},{dataId:s.complexTensorInfos.imag.dataId,dtype:s.complexTensorInfos.imag.dtype,shape:l}],d=n.runWebGLProgram(u,p,"float32"),h=n.runWebGLProgram(c,p,"float32"),f=xi({inputs:{real:d,imag:h},backend:n});n.disposeIntermediateTensorInfo(d),n.disposeIntermediateTensorInfo(h);let m=we({inputs:{x:f},backend:n,attrs:{shape:e.shape}});return n.disposeIntermediateTensorInfo(i),n.disposeIntermediateTensorInfo(f),m}function Doe(e){let{inputs:t,backend:n}=e,{input:s}=t;return tC(s,!1,n)}var $oe={kernelName:f0,backendName:"webgl",kernelFunc:Doe},Poe=class{constructor(e,t){this.outputShape=[],this.customUniforms=[{name:"value",type:"float"}],this.variableNames=["x"],this.outputShape=e,this.userCode=` + `}};function L9(e,t,n){let s=n.texData.get(e.dataId),r=v.sizeFromShape(e.shape),a=e.shape[e.shape.length-1],o=r/a,i=be({inputs:{x:e},backend:n,attrs:{shape:[o,a]}}),l=i.shape,u=new _7("real",l,t),c=new _7("imag",l,t),p=[{dataId:s.complexTensorInfos.real.dataId,dtype:s.complexTensorInfos.real.dtype,shape:l},{dataId:s.complexTensorInfos.imag.dataId,dtype:s.complexTensorInfos.imag.dtype,shape:l}],d=n.runWebGLProgram(u,p,"float32"),h=n.runWebGLProgram(c,p,"float32"),f=gi({inputs:{real:d,imag:h},backend:n});n.disposeIntermediateTensorInfo(d),n.disposeIntermediateTensorInfo(h);let m=be({inputs:{x:f},backend:n,attrs:{shape:e.shape}});return n.disposeIntermediateTensorInfo(i),n.disposeIntermediateTensorInfo(f),m}function doe(e){let{inputs:t,backend:n}=e,{input:s}=t;return L9(s,!1,n)}var poe={kernelName:Gm,backendName:"webgl",kernelFunc:doe},hoe=class{constructor(e,t){this.outputShape=[],this.customUniforms=[{name:"value",type:"float"}],this.variableNames=["x"],this.outputShape=e,this.userCode=` void main() { // Input can be obtained from uniform value. setOutput(value); } - `}};function Xh(e){let{backend:t,attrs:n}=e,{shape:s,value:r}=n,{dtype:a}=n;if(a=a||v.inferDtype(r),a==="string"){let o=v.getArrayFromDType(a,v.sizeFromShape(s));return o.fill(r),t.makeTensorInfo(s,a,o)}else{let o=new Poe(s,r),i=[[r]];return t.runWebGLProgram(o,[],a,i)}}var Foe={kernelName:zc,backendName:"webgl",kernelFunc:Xh},Ooe=class{constructor(e){this.variableNames=["Image"],this.outputShape=[];let t=e[2];this.outputShape=e,this.userCode=` + `}};function $h(e){let{backend:t,attrs:n}=e,{shape:s,value:r}=n,{dtype:a}=n;if(a=a||v.inferDtype(r),a==="string"){let o=v.getArrayFromDType(a,v.sizeFromShape(s));return o.fill(r),t.makeTensorInfo(s,a,o)}else{let o=new hoe(s,r),i=[[r]];return t.runWebGLProgram(o,[],a,i)}}var foe={kernelName:Cc,backendName:"webgl",kernelFunc:$h},moe=class{constructor(e){this.variableNames=["Image"],this.outputShape=[];let t=e[2];this.outputShape=e,this.userCode=` void main() { ivec4 coords = getOutputCoords(); int x = coords[2]; @@ -3419,7 +3413,7 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel } setOutput(outputValue); } - `}},Moe={kernelName:El,backendName:"webgl",kernelFunc:({inputs:e,backend:t})=>{let{image:n}=e,s=t,r=new Ooe(n.shape);return s.runWebGLProgram(r,[n],n.dtype)}},Q7="return floor(x);",zoe=ht({opSnippet:Q7,packedOpSnippet:Q7,cpuKernelImpl:ine}),Loe={kernelName:Po,backendName:"webgl",kernelFunc:zoe},Boe=` + `}},goe={kernelName:vl,backendName:"webgl",kernelFunc:({inputs:e,backend:t})=>{let{image:n}=e,s=t,r=new moe(n.shape);return s.runWebGLProgram(r,[n],n.dtype)}},D7="return floor(x);",yoe=pt({opSnippet:D7,packedOpSnippet:D7,cpuKernelImpl:Wte}),Aoe={kernelName:_o,backendName:"webgl",kernelFunc:yoe},xoe=` float s = sign(a) * sign(b); int ia = round(a); int ib = round(b); @@ -3429,7 +3423,7 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel } else { return NAN; } -`,Woe=` +`,boe=` ivec4 ia = round(a); ivec4 ib = round(b); bvec4 cond = notEqual(ib, ivec4(0)); @@ -3450,7 +3444,7 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel result[3] = idiv(ia[3], ib[3], s[3]); } return vec4(result); -`,Voe=Bn({opSnippet:Boe,packedOpSnippet:Woe,dtype:"int32"}),Uoe={kernelName:Fo,backendName:"webgl",kernelFunc:Voe},Goe=class{constructor(e){this.variableNames=["A"];let t=hs(),[n,s]=e;this.outputShape=e,this.userCode=` +`,voe=Wn({opSnippet:xoe,packedOpSnippet:boe,dtype:"int32"}),woe={kernelName:Do,backendName:"webgl",kernelFunc:voe},koe=class{constructor(e){this.variableNames=["A"];let t=cs(),[n,s]=e;this.outputShape=e,this.userCode=` void main() { ivec3 coords = getOutputCoords(); int texR = coords[0]; @@ -3472,7 +3466,7 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel setOutput(floor(value * 255.0 + 0.5)); } - `}},Hoe=class{constructor(e){this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0;let t=hs(),[n,s]=e;this.outputShape=e,this.userCode=` + `}},Soe=class{constructor(e){this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0;let t=cs(),[n,s]=e;this.outputShape=e,this.userCode=` void main() { ivec3 coords = getOutputCoords(); int texR = coords[0]; @@ -3506,39 +3500,39 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel ${t.output} = result; } - `}},joe={kernelName:Ip,backendName:"webgl",kernelFunc:qoe},Ju,E3=H().getBool("CANVAS2D_WILL_READ_FREQUENTLY_FOR_GPU");function qoe(e){let{inputs:t,backend:n,attrs:s}=e,{pixels:r}=t,{numChannels:a}=s,o=typeof HTMLVideoElement!="undefined"&&r instanceof HTMLVideoElement,i=typeof HTMLImageElement!="undefined"&&r instanceof HTMLImageElement,[l,u]=o?[r.videoWidth,r.videoHeight]:[r.width,r.height],c=[u,l],p=[u,l,a];if(i||o){let m=H().getBool("CANVAS2D_WILL_READ_FREQUENTLY_FOR_GPU");(Ju==null||m!==E3)&&(E3=m,Ju=document.createElement("canvas").getContext("2d",{willReadFrequently:E3})),Ju.canvas.width=l,Ju.canvas.height=u,Ju.drawImage(r,0,0,l,u),r=Ju.canvas}let d=n.makeTensorInfo(c,"int32");n.texData.get(d.dataId).usage=Qs.PIXELS,n.gpgpu.uploadPixelDataToTexture(n.getTexture(d.dataId),r);let h=H().getBool("WEBGL_PACK")?new Hoe(p):new Goe(p),f=n.runWebGLProgram(h,[d],"int32");return n.disposeData(d.dataId),f}function Xoe(e){let{inputs:t,backend:n,attrs:s}=e,{x:r,filter:a,bias:o,preluActivationWeights:i}=t,{strides:l,pad:u,dataFormat:c,dilations:p,dimRoundingMode:d,activation:h,leakyreluAlpha:f}=s,m=T.convertConv2DDataFormat(c),g=T.computeConv2DInfo(r.shape,a.shape,l,p,u,d,!1,m),y,x=[],A=o!=null,b=i!=null,w=h==="leakyrelu",k=()=>{let E=[r,a],_=($,R)=>{if(R==="NCHW"&&$.shape.length===1&&$.shape[0]!==1){let P=we({inputs:{x:$},backend:n,attrs:{shape:[$.shape[0],1,1]}});return x.push(P),P}return $};if(A&&E.push(_(o,c)),b&&E.push(_(i,c)),w){let $=n.makeTensorInfo([],"float32",v.createScalarValue(f,"float32"));E.push($),x.push($)}return E};if(g.filterHeight===1&&g.filterWidth===1&&g.dilationHeight===1&&g.dilationWidth===1&&g.strideHeight===1&&g.strideWidth===1&&(g.padInfo.type==="SAME"||g.padInfo.type==="VALID"))y=K9({x:r,filter:a,convInfo:g,backend:n,bias:o,activation:h,preluActivationWeights:i,leakyreluAlpha:f});else if(g.strideWidth<=2&&m==="channelsLast"&&H().getBool("WEBGL_EXP_CONV")){let E=h?zp(h,!0):null,_=new X9(g,A,E,b,w),$=[[g.padInfo.top,g.padInfo.left],[g.strideHeight,g.strideWidth],[g.dilationHeight,g.dilationWidth],[g.inHeight,g.inWidth]],R=k();y=n.runWebGLProgram(_,R,"float32",$)}else if(H().getBool("WEBGL_CONV_IM2COL"))y=Z9({x:r,filter:a,convInfo:g,backend:n,bias:o,activation:h,preluActivationWeights:i,leakyreluAlpha:f});else{let E=h?zp(h,!1):null,_=new q9(g,A,E,b,w),$=k();y=n.runWebGLProgram(_,$,"float32")}let C=we({inputs:{x:y},backend:n,attrs:{shape:g.outShape}});return x.push(y),x.forEach(E=>n.disposeIntermediateTensorInfo(E)),C}var Koe={kernelName:oo,backendName:"webgl",kernelFunc:Xoe};function Zoe(e){let{inputs:t,backend:n,attrs:s}=e,{x:r,filter:a,bias:o,preluActivationWeights:i}=t,{strides:l,pad:u,dilations:c,dimRoundingMode:p,activation:d,leakyreluAlpha:h}=s,f=[],m=c;m==null&&(m=[1,1]),v.assert(T.eitherStridesOrDilationsAreOne(l,m),()=>`Error in depthwiseConv2d: Either strides or dilations must be 1. Got strides ${l} and dilations '${m}'`);let g=T.computeConv2DInfo(r.shape,a.shape,l,m,u,p,!0),y=H().getBool("WEBGL_PACK_DEPTHWISECONV")&&g.strideWidth<=2&&g.outChannels/g.inChannels===1,x=d?zp(d,y):null,A=[r,a],b=o!=null,w=i!=null,k=d==="leakyrelu";if(b&&A.push(o),w&&A.push(i),k){let $=n.makeTensorInfo([],"float32",v.createScalarValue(h,"float32"));A.push($),f.push($)}let C;y?C=new Q9(g,b,x,w,k):C=new J9(g,b,x,w,k);let E=[[g.padInfo.top,g.padInfo.left],[g.strideHeight,g.strideWidth],[g.dilationHeight,g.dilationWidth],[g.inHeight,g.inWidth]],_=n.runWebGLProgram(C,A,"float32",E);return f.forEach($=>n.disposeIntermediateTensorInfo($)),_}var Yoe={kernelName:io,backendName:"webgl",kernelFunc:Zoe},Joe=class{constructor(e,t,n,s){this.sliceDim=e,this.strides=t,this.paramsShape=s,this.variableNames=["x","indices"],this.outputShape=n;let r=kt(t.length),a=kt(n.length),o=this.sliceDim>1?"strides[j]":"strides",i=kt(s.length),l=s.length>1?"paramsShape[j]":"paramsShape";this.userCode=` - ${r} strides = ${r}(${this.strides}); - ${i} paramsShape = ${i}(${this.paramsShape}); + `}},Ioe={kernelName:lp,backendName:"webgl",kernelFunc:Coe},Bu,l3=U().getBool("CANVAS2D_WILL_READ_FREQUENTLY_FOR_GPU");function Coe(e){let{inputs:t,backend:n,attrs:s}=e,{pixels:r}=t,{numChannels:a}=s,o=typeof HTMLVideoElement!="undefined"&&r instanceof HTMLVideoElement,i=typeof HTMLImageElement!="undefined"&&r instanceof HTMLImageElement,[l,u]=o?[r.videoWidth,r.videoHeight]:[r.width,r.height],c=[u,l],p=[u,l,a];if(i||o){let m=U().getBool("CANVAS2D_WILL_READ_FREQUENTLY_FOR_GPU");(Bu==null||m!==l3)&&(l3=m,Bu=document.createElement("canvas").getContext("2d",{willReadFrequently:l3})),Bu.canvas.width=l,Bu.canvas.height=u,Bu.drawImage(r,0,0,l,u),r=Bu.canvas}let d=n.makeTensorInfo(c,"int32");n.texData.get(d.dataId).usage=Zs.PIXELS,n.gpgpu.uploadPixelDataToTexture(n.getTexture(d.dataId),r);let h=U().getBool("WEBGL_PACK")?new Soe(p):new koe(p),f=n.runWebGLProgram(h,[d],"int32");return n.disposeData(d.dataId),f}function Toe(e){let{inputs:t,backend:n,attrs:s}=e,{x:r,filter:a,bias:o,preluActivationWeights:i}=t,{strides:l,pad:u,dataFormat:c,dilations:p,dimRoundingMode:d,activation:h,leakyreluAlpha:f}=s,m=T.convertConv2DDataFormat(c),g=T.computeConv2DInfo(r.shape,a.shape,l,p,u,d,!1,m),y,x=[],A=o!=null,b=i!=null,w=h==="leakyrelu",k=()=>{let N=[r,a],R=(D,E)=>{if(E==="NCHW"&&D.shape.length===1&&D.shape[0]!==1){let $=be({inputs:{x:D},backend:n,attrs:{shape:[D.shape[0],1,1]}});return x.push($),$}return D};if(A&&N.push(R(o,c)),b&&N.push(R(i,c)),w){let D=n.makeTensorInfo([],"float32",v.createScalarValue(f,"float32"));N.push(D),x.push(D)}return N};if(g.filterHeight===1&&g.filterWidth===1&&g.dilationHeight===1&&g.dilationWidth===1&&g.strideHeight===1&&g.strideWidth===1&&(g.padInfo.type==="SAME"||g.padInfo.type==="VALID"))y=$9({x:r,filter:a,convInfo:g,backend:n,bias:o,activation:h,preluActivationWeights:i,leakyreluAlpha:f});else if(g.strideWidth<=2&&m==="channelsLast"&&U().getBool("WEBGL_EXP_CONV")){let N=h?vp(h,!0):null,R=new D9(g,A,N,b,w),D=[[g.padInfo.top,g.padInfo.left],[g.strideHeight,g.strideWidth],[g.dilationHeight,g.dilationWidth],[g.inHeight,g.inWidth]],E=k();y=n.runWebGLProgram(R,E,"float32",D)}else if(U().getBool("WEBGL_CONV_IM2COL"))y=P9({x:r,filter:a,convInfo:g,backend:n,bias:o,activation:h,preluActivationWeights:i,leakyreluAlpha:f});else{let N=h?vp(h,!1):null,R=new _9(g,A,N,b,w),D=k();y=n.runWebGLProgram(R,D,"float32")}let C=be({inputs:{x:y},backend:n,attrs:{shape:g.outShape}});return x.push(y),x.forEach(N=>n.disposeIntermediateTensorInfo(N)),C}var Noe={kernelName:so,backendName:"webgl",kernelFunc:Toe};function Eoe(e){let{inputs:t,backend:n,attrs:s}=e,{x:r,filter:a,bias:o,preluActivationWeights:i}=t,{strides:l,pad:u,dilations:c,dimRoundingMode:p,activation:d,leakyreluAlpha:h}=s,f=[],m=c;m==null&&(m=[1,1]),v.assert(T.eitherStridesOrDilationsAreOne(l,m),()=>`Error in depthwiseConv2d: Either strides or dilations must be 1. Got strides ${l} and dilations '${m}'`);let g=T.computeConv2DInfo(r.shape,a.shape,l,m,u,p,!0),y=U().getBool("WEBGL_PACK_DEPTHWISECONV")&&g.strideWidth<=2&&g.outChannels/g.inChannels===1,x=d?vp(d,y):null,A=[r,a],b=o!=null,w=i!=null,k=d==="leakyrelu";if(b&&A.push(o),w&&A.push(i),k){let D=n.makeTensorInfo([],"float32",v.createScalarValue(h,"float32"));A.push(D),f.push(D)}let C;y?C=new M9(g,b,x,w,k):C=new O9(g,b,x,w,k);let N=[[g.padInfo.top,g.padInfo.left],[g.strideHeight,g.strideWidth],[g.dilationHeight,g.dilationWidth],[g.inHeight,g.inWidth]],R=n.runWebGLProgram(C,A,"float32",N);return f.forEach(D=>n.disposeIntermediateTensorInfo(D)),R}var Roe={kernelName:ro,backendName:"webgl",kernelFunc:Eoe},_oe=class{constructor(e,t,n,s){this.sliceDim=e,this.strides=t,this.paramsShape=s,this.variableNames=["x","indices"],this.outputShape=n;let r=Tt(n.length),a=` + int index;`;for(let o=0;o= ${this.paramsShape[o]}; + flattenIndex += index * ${this.strides[o]};`;this.userCode=` void main() { - ${a} coords = getOutputCoords(); + ${r} coords = getOutputCoords(); int flattenIndex = 0; bool out_of_bounds = false; - for (int j = 0; j < ${this.sliceDim}; j++) { - int index = round(getIndices(coords[0], j)); - out_of_bounds = out_of_bounds || index < 0; - out_of_bounds = out_of_bounds || index >= ${l}; - flattenIndex += index * ${o}; - } + + ${a} + setOutput(out_of_bounds ? 0.0 : getX(flattenIndex, coords[1])); } - `}};function Qoe(e){let{inputs:t,backend:n}=e,{params:s,indices:r}=t,a=r.shape,o=a[a.length-1],i=v.sizeFromShape(s.shape),[l,u,c,p]=T.prepareAndValidate(s,r),d=we({inputs:{x:r},backend:n,attrs:{shape:[u,o]}}),h=we({inputs:{x:s},backend:n,attrs:{shape:[v.sizeFromShape(s.shape)/c,c]}});if(n.shouldExecuteOnCPU([s,r])||s.dtype==="string"){let y=n.readSync(r.dataId),x=n.bufferSync(s),A=lne(y,x,s.dtype,u,o,c,p,s.shape,i);return n.makeTensorInfo(l,s.dtype,A.values)}let f=new Joe(o,p,[u,c],s.shape),m=n.runWebGLProgram(f,[h,d],h.dtype),g=we({inputs:{x:m},backend:n,attrs:{shape:l}});return n.disposeIntermediateTensorInfo(d),n.disposeIntermediateTensorInfo(h),n.disposeIntermediateTensorInfo(m),g}var eie={kernelName:_l,backendName:"webgl",kernelFunc:Qoe},tie=class{constructor(e,t){this.variableNames=["A","indices"],this.outputShape=t,this.rank=t.length;let n=kt(this.rank),s=nie(e,2);this.userCode=` + `}};function Doe(e){let{inputs:t,backend:n}=e,{params:s,indices:r}=t,a=r.shape,o=a[a.length-1],i=v.sizeFromShape(s.shape),[l,u,c,p]=T.prepareAndValidate(s,r),d=be({inputs:{x:r},backend:n,attrs:{shape:[u,o]}}),h=be({inputs:{x:s},backend:n,attrs:{shape:[v.sizeFromShape(s.shape)/c,c]}});if(n.shouldExecuteOnCPU([s,r])||s.dtype==="string"){let y=n.readSync(r.dataId),x=n.bufferSync(s),A=Vte(y,x,s.dtype,u,o,c,p,s.shape,i);return n.makeTensorInfo(l,s.dtype,A.values)}let f=new _oe(o,p,[u,c],s.shape),m=n.runWebGLProgram(f,[h,d],h.dtype),g=be({inputs:{x:m},backend:n,attrs:{shape:l}});return n.disposeIntermediateTensorInfo(d),n.disposeIntermediateTensorInfo(h),n.disposeIntermediateTensorInfo(m),g}var $oe={kernelName:kl,backendName:"webgl",kernelFunc:Doe},Poe=class{constructor(e,t){this.variableNames=["A","indices"],this.outputShape=t,this.rank=t.length;let n=Tt(this.rank),s=Foe(e,2);this.userCode=` void main() { ${n} resRC = getOutputCoords(); int index = int(getIndices(resRC.x, resRC.z)); float inBounds = (index >= 0) && (index < ${e[2]}) ? 1.0 : 0.0; setOutput(inBounds * getA(${s})); } - `}};function nie(e,t){let n=["resRC.x","resRC.y","resRC.z","resRC.w"],s=[];for(let r=0;r=0,()=>`GatherV2: the index value ${w} is not in [0, ${A-1}]`)}}let u=T.segment_util.collectGatherOpShapeInfo(r,a,l,i),c=v.sizeFromShape(a.shape),p=[],d=we({inputs:{x:r},backend:n,attrs:{shape:[u.batchSize,u.outerSize,u.dimSize,u.sliceSize]}}),h=we({inputs:{x:a},backend:n,attrs:{shape:[u.batchSize,c/u.batchSize]}});p.push(d),p.push(h);let f=[u.batchSize,u.outerSize,c/u.batchSize,u.sliceSize];if(n.shouldExecuteOnCPU([r,a])||r.dtype==="string"){let x=n.bufferSync(h),A=n.bufferSync(d),b=une(A,x,f);return p.forEach(w=>n.disposeIntermediateTensorInfo(w)),n.makeTensorInfo(u.outputShape,b.dtype,b.values)}let m=new tie(d.shape,f),g=n.runWebGLProgram(m,[d,h],d.dtype);p.push(g);let y=we({inputs:{x:g},backend:n,attrs:{shape:u.outputShape}});return p.forEach(x=>n.disposeIntermediateTensorInfo(x)),y}var sie={kernelName:Rl,backendName:"webgl",kernelFunc:nC},rie="return float(a > b);",aie=` + `}};function Foe(e,t){let n=["resRC.x","resRC.y","resRC.z","resRC.w"],s=[];for(let r=0;r=0,()=>`GatherV2: the index value ${w} is not in [0, ${A-1}]`)}}let u=T.segment_util.collectGatherOpShapeInfo(r,a,l,i),c=v.sizeFromShape(a.shape),p=[],d=be({inputs:{x:r},backend:n,attrs:{shape:[u.batchSize,u.outerSize,u.dimSize,u.sliceSize]}}),h=be({inputs:{x:a},backend:n,attrs:{shape:[u.batchSize,c/u.batchSize]}});p.push(d),p.push(h);let f=[u.batchSize,u.outerSize,c/u.batchSize,u.sliceSize];if(n.shouldExecuteOnCPU([r,a])||r.dtype==="string"){let x=n.bufferSync(h),A=n.bufferSync(d),b=Ute(A,x,f);return p.forEach(w=>n.disposeIntermediateTensorInfo(w)),n.makeTensorInfo(u.outputShape,b.dtype,b.values)}let m=new Poe(d.shape,f),g=n.runWebGLProgram(m,[d,h],d.dtype);p.push(g);let y=be({inputs:{x:g},backend:n,attrs:{shape:u.outputShape}});return p.forEach(x=>n.disposeIntermediateTensorInfo(x)),y}var Ooe={kernelName:wl,backendName:"webgl",kernelFunc:B9},Moe="return float(a > b);",zoe=` return vec4(greaterThan(a, b)); -`,oie=Bn({opSnippet:rie,packedOpSnippet:aie,cpuKernelImpl:cne,dtype:"bool"}),iie={kernelName:Dl,backendName:"webgl",kernelFunc:oie},lie="return float(a >= b);",uie=` +`,Loe=Wn({opSnippet:Moe,packedOpSnippet:zoe,cpuKernelImpl:Gte,dtype:"bool"}),Boe={kernelName:Sl,backendName:"webgl",kernelFunc:Loe},Woe="return float(a >= b);",Voe=` return vec4(greaterThanEqual(a, b)); -`,cie=Bn({opSnippet:lie,packedOpSnippet:uie,dtype:"bool",cpuKernelImpl:dne}),die={kernelName:Mo,backendName:"webgl",kernelFunc:cie};function pie(e){let{inputs:t,backend:n}=e,{input:s}=t;return tC(s,!0,n)}var hie={kernelName:m0,backendName:"webgl",kernelFunc:pie},fie="return float(!isnan(x) && !isinf(x));",mie=ht({opSnippet:fie,dtype:"bool"}),gie={kernelName:Lc,backendName:"webgl",kernelFunc:mie},yie="return float(isinf(x));",Aie=ht({opSnippet:yie,dtype:"bool"}),xie={kernelName:Bc,backendName:"webgl",kernelFunc:Aie},bie="return float(isnan(x));",vie=ht({opSnippet:bie,dtype:"bool"}),wie={kernelName:$l,backendName:"webgl",kernelFunc:vie},kie="return float(a < b);",Sie=` +`,Uoe=Wn({opSnippet:Woe,packedOpSnippet:Voe,dtype:"bool",cpuKernelImpl:Hte}),Goe={kernelName:Po,backendName:"webgl",kernelFunc:Uoe};function Hoe(e){let{inputs:t,backend:n}=e,{input:s}=t;return L9(s,!0,n)}var joe={kernelName:Hm,backendName:"webgl",kernelFunc:Hoe},qoe="return float(!isnan(x) && !isinf(x));",Xoe=pt({opSnippet:qoe,dtype:"bool"}),Koe={kernelName:Tc,backendName:"webgl",kernelFunc:Xoe},Zoe="return float(isinf(x));",Yoe=pt({opSnippet:Zoe,dtype:"bool"}),Joe={kernelName:Nc,backendName:"webgl",kernelFunc:Yoe},Qoe="return float(isnan(x));",eie=pt({opSnippet:Qoe,dtype:"bool"}),tie={kernelName:Il,backendName:"webgl",kernelFunc:eie},nie="return float(a < b);",sie=` return vec4(lessThan(a, b)); -`,Iie=Bn({opSnippet:kie,packedOpSnippet:Sie,cpuKernelImpl:pne,dtype:"bool"}),Cie={kernelName:Pl,backendName:"webgl",kernelFunc:Iie},Tie="return float(a <= b);",Nie=` +`,rie=Wn({opSnippet:nie,packedOpSnippet:sie,cpuKernelImpl:jte,dtype:"bool"}),aie={kernelName:Cl,backendName:"webgl",kernelFunc:rie},oie="return float(a <= b);",iie=` return vec4(lessThanEqual(a, b)); -`,Eie=Bn({opSnippet:Tie,packedOpSnippet:Nie,cpuKernelImpl:hne,dtype:"bool"}),Rie={kernelName:Fl,backendName:"webgl",kernelFunc:Eie};function _ie(e){let{backend:t,attrs:n}=e,{start:s,stop:r,num:a}=n,o=fne(s,r,a);return t.makeTensorInfo([o.length],"float32",o)}var Die={kernelName:g0,backendName:"webgl",kernelFunc:_ie},$ie=xd+` +`,lie=Wn({opSnippet:oie,packedOpSnippet:iie,cpuKernelImpl:qte,dtype:"bool"}),uie={kernelName:Tl,backendName:"webgl",kernelFunc:lie};function cie(e){let{backend:t,attrs:n}=e,{start:s,stop:r,num:a}=n,o=Xte(s,r,a);return t.makeTensorInfo([o.length],"float32",o)}var die={kernelName:jm,backendName:"webgl",kernelFunc:cie},pie=id+` return x < 0.0 ? 0./0. : log(x); -`,Pie=` +`,hie=` vec4 result = log(x); bvec4 isNaN = isnan(x); result.r = isNaN.r ? x.r : (x.r < 0.0 ? 0./0. : result.r); @@ -3546,18 +3540,18 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel result.b = isNaN.b ? x.b : (x.b < 0.0 ? 0./0. : result.b); result.a = isNaN.a ? x.a : (x.a < 0.0 ? 0./0. : result.a); return result; -`,Fie=ht({opSnippet:$ie,packedOpSnippet:Pie,cpuKernelImpl:mne}),Oie={kernelName:Bo,backendName:"webgl",kernelFunc:Fie},Mie=xd+` +`,fie=pt({opSnippet:pie,packedOpSnippet:hie,cpuKernelImpl:Kte}),mie={kernelName:Mo,backendName:"webgl",kernelFunc:fie},gie=id+` return log(1.0 + x); -`,zie=ht({opSnippet:Mie}),Lie={kernelName:Wc,backendName:"webgl",kernelFunc:zie},Bie="return float(a >= 1.0 && b >= 1.0);",Wie=` +`,yie=pt({opSnippet:gie}),Aie={kernelName:Ec,backendName:"webgl",kernelFunc:yie},xie="return float(a >= 1.0 && b >= 1.0);",bie=` return vec4( vec4(greaterThanEqual(a, vec4(1.0))) * vec4(greaterThanEqual(b, vec4(1.0)))); -`,Vie=Bn({opSnippet:Bie,packedOpSnippet:Wie,dtype:"bool"}),Uie={kernelName:Ol,backendName:"webgl",kernelFunc:Vie},Gie="return float(!(x >= 1.0));",Hie=ht({opSnippet:Gie}),jie={kernelName:Ml,backendName:"webgl",kernelFunc:Hie},qie="return float(a >= 1.0 || b >= 1.0);",Xie=` +`,vie=Wn({opSnippet:xie,packedOpSnippet:bie,dtype:"bool"}),wie={kernelName:Nl,backendName:"webgl",kernelFunc:vie},kie="return float(!(x >= 1.0));",Sie=pt({opSnippet:kie}),Iie={kernelName:El,backendName:"webgl",kernelFunc:Sie},Cie="return float(a >= 1.0 || b >= 1.0);",Tie=` return min( vec4(greaterThanEqual(a, vec4(1.0))) + vec4(greaterThanEqual(b, vec4(1.0))), vec4(1.0)); -`,Kie=Bn({opSnippet:qie,packedOpSnippet:Xie,dtype:"bool"}),Zie={kernelName:Vc,backendName:"webgl",kernelFunc:Kie},Yie=class{constructor(e,t,n,s,r){this.variableNames=["x"],this.outputShape=[];let a=t,o=e[3]-1;this.outputShape=e;let i,l=`float(${n}) + float(${s}) * sum`;r===.5?i=`inversesqrt(${l})`:r===1?i=`1.0/(${l})`:i=`exp(log(${l}) * float(-${r}));`,this.userCode=` +`,Nie=Wn({opSnippet:Cie,packedOpSnippet:Tie,dtype:"bool"}),Eie={kernelName:Rc,backendName:"webgl",kernelFunc:Nie},Rie=class{constructor(e,t,n,s,r){this.variableNames=["x"],this.outputShape=[];let a=t,o=e[3]-1;this.outputShape=e;let i,l=`float(${n}) + float(${s}) * sum`;r===.5?i=`inversesqrt(${l})`:r===1?i=`1.0/(${l})`:i=`exp(log(${l}) * float(-${r}));`,this.userCode=` void main() { ivec4 coords = getOutputCoords(); int b = coords[0]; @@ -3576,7 +3570,7 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel float val = x * ${i}; setOutput(val); } - `}},Jie=class{constructor(e,t,n,s,r){this.variableNames=["x"],this.outputShape=[],this.packedInputs=!0,this.packedOutput=!0;let a=t,o=e[3]-1;this.outputShape=e;let i,l=`float(${n}) + float(${s}) * sum`;r===.5?i=`inversesqrt(${l})`:r===1?i=`1.0/(${l})`:i=`exp(log(${l}) * float(-${r}));`,this.userCode=` + `}},_ie=class{constructor(e,t,n,s,r){this.variableNames=["x"],this.outputShape=[],this.packedInputs=!0,this.packedOutput=!0;let a=t,o=e[3]-1;this.outputShape=e;let i,l=`float(${n}) + float(${s}) * sum`;r===.5?i=`inversesqrt(${l})`:r===1?i=`1.0/(${l})`:i=`exp(log(${l}) * float(-${r}));`,this.userCode=` void main() { ivec4 coords = getOutputCoords(); int b = coords.x; @@ -3638,7 +3632,7 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel vec4 result = xAtOutputCoords * ${i}; setOutput(result); } - `}},Qie=e=>{let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{depthRadius:a,bias:o,alpha:i,beta:l}=s,u=H().getBool("WEBGL_PACK_NORMALIZATION")?new Jie(r.shape,a,o,i,l):new Yie(r.shape,a,o,i,l);return n.runWebGLProgram(u,[r],r.dtype)},ele={kernelName:Jp,backendName:"webgl",kernelFunc:Qie},tle=class{constructor(e,t,n,s,r){this.variableNames=["inputImage","outputImage","dy"],this.outputShape=[],this.outputShape=e,this.depth=e[3],this.depthRadius=t,this.bias=n,this.alpha=s,this.beta=r,this.userCode=` + `}},Die=e=>{let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{depthRadius:a,bias:o,alpha:i,beta:l}=s,u=U().getBool("WEBGL_PACK_NORMALIZATION")?new _ie(r.shape,a,o,i,l):new Rie(r.shape,a,o,i,l);return n.runWebGLProgram(u,[r],r.dtype)},$ie={kernelName:Fp,backendName:"webgl",kernelFunc:Die},Pie=class{constructor(e,t,n,s,r){this.variableNames=["inputImage","outputImage","dy"],this.outputShape=[],this.outputShape=e,this.depth=e[3],this.depthRadius=t,this.bias=n,this.alpha=s,this.beta=r,this.userCode=` void main() { ivec4 coords = getOutputCoords(); int b = coords[0]; @@ -3693,14 +3687,16 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel } setOutput(result); } - `}},nle=e=>{let{inputs:t,backend:n,attrs:s}=e,{x:r,y:a,dy:o}=t,{depthRadius:i,bias:l,alpha:u,beta:c}=s,p=new tle(r.shape,i,l,u,c);return n.runWebGLProgram(p,[r,a,o],r.dtype)},sle={kernelName:y0,backendName:"webgl",kernelFunc:nle};function rle(e,t,n,s){let r=v.sizeFromShape(t),o=v.sizeFromShape(e.shape)/r,i=we({inputs:{x:e},attrs:{shape:[o,r]},backend:s}),l=bu(i,e.dtype,"max",s),u=we({inputs:{x:l},attrs:{shape:n},backend:s});return s.disposeIntermediateTensorInfo(i),s.disposeIntermediateTensorInfo(l),u}function sC(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{reductionIndices:a,keepDims:o}=s,i=r.shape.length,l=v.parseAxisParam(a,r.shape),u=l,c=T.getAxesPermutation(u,i),p=c!=null,d=n.shouldExecuteOnCPU([r]),h=r;if(p){if(d){let A=n.texData.get(h.dataId).values,b=new Array(i);for(let C=0;C{let{inputs:t,backend:n,attrs:s}=e,{x:r,y:a,dy:o}=t,{depthRadius:i,bias:l,alpha:u,beta:c}=s,p=new Pie(r.shape,i,l,u,c);return n.runWebGLProgram(p,[r,a,o],r.dtype)},Oie={kernelName:qm,backendName:"webgl",kernelFunc:Fie};function Mie(e,t,n,s){let r=v.sizeFromShape(t),o=v.sizeFromShape(e.shape)/r,i=be({inputs:{x:e},attrs:{shape:[o,r]},backend:s}),l=pu(i,e.dtype,"max",s),u=be({inputs:{x:l},attrs:{shape:n},backend:s});return s.disposeIntermediateTensorInfo(i),s.disposeIntermediateTensorInfo(l),u}function W9(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{reductionIndices:a,keepDims:o}=s,i=r.shape.length,l=v.parseAxisParam(a,r.shape),u=l,c=T.getAxesPermutation(u,i),p=c!=null,d=n.shouldExecuteOnCPU([r]),h=r;if(p){if(d){let A=n.texData.get(h.dataId).values,b=new Array(i);for(let C=0;C`Error in maxPool: Either strides or dilations must be 1. Got strides ${o} and dilations '${u}'`);let c=T.computePool2DInfo(r.shape,a,o,u,i,l);if(c.filterWidth===1&&c.filterHeight===1&&v.arraysEqual(c.inShape,c.outShape))return Vs({inputs:{x:r},backend:n});let p=new Lp(c,"max",!1);return n.runWebGLProgram(p,[r],r.dtype)}var dle={kernelName:Uo,backendName:"webgl",kernelFunc:cle};function ple(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{filterSize:a,strides:o,pad:i,dataFormat:l,dimRoundingMode:u}=s,c=[1,1,1],p=T.computePool3DInfo(r.shape,a,o,c,i,u,l),d=new yb(p,"max",!1);return n.runWebGLProgram(d,[r],r.dtype)}var hle={kernelName:Qp,backendName:"webgl",kernelFunc:ple},fle=class{constructor(e){this.variableNames=["dy","maxPos"],this.outputShape=e.inShape;let t=e.strideHeight,n=e.strideWidth,s=e.dilationHeight,r=e.effectiveFilterHeight,a=e.effectiveFilterWidth,o=r-1-e.padInfo.top,i=a-1-e.padInfo.left,l=r*a-1;this.userCode=` +`,Wie=Wn({opSnippet:Lie,packedOpSnippet:Bie,cpuKernelImpl:Yte}),Vie={kernelName:Lo,backendName:"webgl",kernelFunc:Wie};function Uie(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t;td(r,"maxPool");let{filterSize:a,strides:o,pad:i,dimRoundingMode:l}=s,u=1;v.assert(T.eitherStridesOrDilationsAreOne(o,u),()=>`Error in maxPool: Either strides or dilations must be 1. Got strides ${o} and dilations '${u}'`);let c=T.computePool2DInfo(r.shape,a,o,u,i,l);if(c.filterWidth===1&&c.filterHeight===1&&v.arraysEqual(c.inShape,c.outShape))return Ls({inputs:{x:r},backend:n});let p=new wp(c,"max",!1);return n.runWebGLProgram(p,[r],r.dtype)}var Gie={kernelName:Bo,backendName:"webgl",kernelFunc:Uie};function Hie(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{filterSize:a,strides:o,pad:i,dataFormat:l,dimRoundingMode:u}=s,c=[1,1,1],p=T.computePool3DInfo(r.shape,a,o,c,i,u,l),d=new Jx(p,"max",!1);return n.runWebGLProgram(d,[r],r.dtype)}var jie={kernelName:Op,backendName:"webgl",kernelFunc:Hie},qie=class{constructor(e){this.variableNames=["dy","maxPos"],this.outputShape=e.inShape;let t=e.strideHeight,n=e.strideWidth,s=e.dilationHeight,r=e.effectiveFilterHeight,a=e.effectiveFilterWidth,o=r-1-e.padInfo.top,i=a-1-e.padInfo.left,l=r*a-1;this.userCode=` const ivec2 pads = ivec2(${o}, ${i}); void main() { @@ -3746,7 +3742,7 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel } setOutput(dotProd); } - `}},mle=class{constructor(e){this.variableNames=["dy","maxPos"],this.outputShape=e.inShape;let t=e.strideDepth,n=e.strideHeight,s=e.strideWidth,r=e.dilationDepth,a=e.dilationHeight,o=e.dilationWidth,i=e.effectiveFilterDepth,l=e.effectiveFilterHeight,u=e.effectiveFilterWidth,c=i-1-e.padInfo.front,p=l-1-e.padInfo.top,d=u-1-e.padInfo.left,h=i*l*u-1;this.userCode=` + `}},Xie=class{constructor(e){this.variableNames=["dy","maxPos"],this.outputShape=e.inShape;let t=e.strideDepth,n=e.strideHeight,s=e.strideWidth,r=e.dilationDepth,a=e.dilationHeight,o=e.dilationWidth,i=e.effectiveFilterDepth,l=e.effectiveFilterHeight,u=e.effectiveFilterWidth,c=i-1-e.padInfo.front,p=l-1-e.padInfo.top,d=u-1-e.padInfo.left,h=i*l*u-1;this.userCode=` const ivec3 pads = ivec3(${c}, ${p}, ${d}); void main() { @@ -3810,14 +3806,16 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel } setOutput(dotProd); } - `}};function gle(e){let{inputs:t,backend:n,attrs:s}=e,{dy:r,input:a}=t,o=a,{filterSize:i,strides:l,pad:u,dimRoundingMode:c}=s,p=[1,1,1],d=T.computePool3DInfo(o.shape,i,l,p,u,c),h=new yb(d,"max",!0),f=n.runWebGLProgram(h,[o],o.dtype),m=new mle(d),g=n.runWebGLProgram(m,[r,f],o.dtype);return n.disposeIntermediateTensorInfo(f),g}var yle={kernelName:x0,backendName:"webgl",kernelFunc:gle};function Ale(e){let{inputs:t,backend:n,attrs:s}=e,{dy:r,input:a,output:o}=t,i=a;hd([a,o],"maxPoolGrad");let{filterSize:l,strides:u,pad:c,dimRoundingMode:p}=s,d=T.computePool2DInfo(i.shape,l,u,1,c,p),h=!0,f=new Lp(d,"max",h),m=n.runWebGLProgram(f,[i],i.dtype),g=new fle(d),y=n.runWebGLProgram(g,[r,m],i.dtype);return n.disposeIntermediateTensorInfo(m),y}var xle={kernelName:A0,backendName:"webgl",kernelFunc:Ale};function ble(e,t,n,s){let r=new Lp(n,"max",!1),a=s.runWebGLProgram(r,[e],"float32");r=new Lp(n,"max",!0,!0,t);let o=s.runWebGLProgram(r,[e],"float32");return[a,o]}var vle={kernelName:b0,backendName:"webgl",kernelFunc:({inputs:e,attrs:t,backend:n})=>{let{x:s}=e,{filterSize:r,strides:a,pad:o,includeBatchInIndex:i}=t,l=n;v.assert(s.shape.length===4,()=>`Error in maxPool: input must be rank 4 but got rank ${s.shape.length}.`);let u=[1,1];v.assert(T.eitherStridesOrDilationsAreOne(a,u),()=>`Error in maxPool: Either strides or dilations must be 1. Got strides ${a} and dilations '${u}'`);let c=T.computePool2DInfo(s.shape,r,a,u,o),[p,d]=ble(s,i,c,l);return[p,d]}};function wle(e,t,n,s){let r=v.sizeFromShape(t),o=v.sizeFromShape(e.shape)/r,i=we({inputs:{x:e},attrs:{shape:[o,r]},backend:s}),l=bu(i,"float32","mean",s),u=we({inputs:{x:l},attrs:{shape:n},backend:s});return s.disposeIntermediateTensorInfo(i),s.disposeIntermediateTensorInfo(l),u}var kle={kernelName:Go,backendName:"webgl",kernelFunc:({inputs:e,attrs:t,backend:n})=>{let{x:s}=e,{keepDims:r,axis:a}=t,o=n,i=s.shape.length,l=v.parseAxisParam(a,s.shape),u=l,c=T.getAxesPermutation(u,i),p=c!=null,d=o.shouldExecuteOnCPU([s]),h=[],f=s;if(p){if(d){let b=o.texData.get(f.dataId).values,w=new Array(i);for(let E=0;E{let{x:s}=e,{filterSize:r,strides:a,pad:o,includeBatchInIndex:i}=t,l=n;v.assert(s.shape.length===4,()=>`Error in maxPool: input must be rank 4 but got rank ${s.shape.length}.`);let u=[1,1];v.assert(T.eitherStridesOrDilationsAreOne(a,u),()=>`Error in maxPool: Either strides or dilations must be 1. Got strides ${a} and dilations '${u}'`);let c=T.computePool2DInfo(s.shape,r,a,u,o),[p,d]=Qie(s,i,c,l);return[p,d]}};function tle(e,t,n,s){let r=v.sizeFromShape(t),o=v.sizeFromShape(e.shape)/r,i=be({inputs:{x:e},attrs:{shape:[o,r]},backend:s}),l=pu(i,"float32","mean",s),u=be({inputs:{x:l},attrs:{shape:n},backend:s});return s.disposeIntermediateTensorInfo(i),s.disposeIntermediateTensorInfo(l),u}var nle={kernelName:Wo,backendName:"webgl",kernelFunc:({inputs:e,attrs:t,backend:n})=>{let{x:s}=e,{keepDims:r,axis:a}=t,o=n,i=s.shape.length,l=v.parseAxisParam(a,s.shape),u=l,c=T.getAxesPermutation(u,i),p=c!=null,d=o.shouldExecuteOnCPU([s]),h=[],f=s;if(p){if(d){let b=o.texData.get(f.dataId).values,w=new Array(i);for(let N=0;Nu[0]+e[c]+u[1]);let s=e.length,r=kt(s),a=t.map(u=>u[0]).join(","),o=t.map((u,c)=>u[0]+e[c]).join(","),i=["coords[0]","coords[1]","coords[2]","coords[3]"].slice(0,s),l=n==="reflect"?0:1;if(s===1){this.userCode=` +`,ile=Wn({opSnippet:ale,packedOpSnippet:ole,cpuKernelImpl:Jte}),lle={kernelName:Uo,backendName:"webgl",kernelFunc:ile},ule=class{constructor(e,t,n){this.variableNames=["x"],this.outputShape=t.map((u,c)=>u[0]+e[c]+u[1]);let s=e.length,r=Tt(s),a=t.map(u=>u[0]).join(","),o=t.map((u,c)=>u[0]+e[c]).join(","),i=["coords[0]","coords[1]","coords[2]","coords[3]"].slice(0,s),l=n==="reflect"?0:1;if(s===1){this.userCode=` int start = ${a}; int end = ${o}; @@ -3846,7 +3844,7 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel ${r} coords = outC - start; setOutput(getX(${i})); } - `}},_le=class{constructor(e,t,n){this.variableNames=["x"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=t.map((h,f)=>h[0]+e[f]+h[1]);let s=e.length,r=kt(s),a=t.map(h=>h[0]).join(","),o=t.map((h,f)=>h[0]+e[f]).join(","),i=us("rc",s),l=us("source",s),u=`${i[s-1]} < ${this.outputShape[s-1]}`,c=s===1?"source":`vec2(${l.slice(-2).join()})`,p=n==="reflect"?0:1,d="";if(s===1){let h=` + `}},cle=class{constructor(e,t,n){this.variableNames=["x"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=t.map((h,f)=>h[0]+e[f]+h[1]);let s=e.length,r=Tt(s),a=t.map(h=>h[0]).join(","),o=t.map((h,f)=>h[0]+e[f]).join(","),i=os("rc",s),l=os("source",s),u=`${i[s-1]} < ${this.outputShape[s-1]}`,c=s===1?"source":`vec2(${l.slice(-2).join()})`,p=n==="reflect"?0:1,d="";if(s===1){let h=` ${r} source = rc; if (source < start) { source = start * 2 - source - ${p}; @@ -3902,13 +3900,13 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel ${d} setOutput(result); } - `}},Dle=({inputs:e,backend:t,attrs:n})=>{let{x:s}=e,{paddings:r,mode:a}=n,o=H().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new _le(s.shape,r,a):new Rle(s.shape,r,a);return t.runWebGLProgram(o,[s],s.dtype)},$le={kernelName:qo,backendName:"webgl",kernelFunc:Dle},Ple=`if (b == 0.0) return NAN; - return mod(a, b);`,Fle=` + `}},dle=({inputs:e,backend:t,attrs:n})=>{let{x:s}=e,{paddings:r,mode:a}=n,o=U().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new cle(s.shape,r,a):new ule(s.shape,r,a);return t.runWebGLProgram(o,[s],s.dtype)},ple={kernelName:Go,backendName:"webgl",kernelFunc:dle},hle=`if (b == 0.0) return NAN; + return mod(a, b);`,fle=` vec4 result = mod(a, b); - vec4 isNaN = vec4(equal(b, vec4(0.0))); - `+P2+` + bvec4 isNaN = equal(b, vec4(0.0)); + `+Rh+` return result; -`,Ole=Bn({opSnippet:Ple,packedOpSnippet:Fle}),Mle={kernelName:Uc,backendName:"webgl",kernelFunc:Ole},zle=class{constructor(e,t,n){this.variableNames=["probs"],this.customUniforms=[{name:"seed",type:"float"}],this.outputShape=[e,n],this.userCode=` +`,mle=Wn({opSnippet:hle,packedOpSnippet:fle}),gle={kernelName:_c,backendName:"webgl",kernelFunc:mle},yle=class{constructor(e,t,n){this.variableNames=["probs"],this.customUniforms=[{name:"seed",type:"float"}],this.outputShape=[e,n],this.userCode=` void main() { ivec2 coords = getOutputCoords(); int batch = coords[0]; @@ -3928,11 +3926,11 @@ return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Are=ht({opSnippet:yre}),xre={kernel // If no other event happened, last event happened. setOutput(float(${t-1})); } - `}},Lle=` + `}},Ale=` if (a == b) { return 1.0; }; -return a / b;`,Ble=` +return a / b;`,xle=` // vec4 one = vec4(equal(a, b)); // return one + (vec4(1.0) - one) * a / b; vec4 result = a / b; @@ -3950,9 +3948,9 @@ return a / b;`,Ble=` } return result; -`,rC=Bn({opSnippet:Lle,packedOpSnippet:Ble,checkOutOfBounds:!0}),Wle={kernelName:_o,backendName:"webgl",kernelFunc:rC},e6="return a - b;",aC=Bn({opSnippet:e6,packedOpSnippet:e6,supportsComplex:!0,cpuKernelImpl:One}),Vle={kernelName:ci,backendName:"webgl",kernelFunc:aC};function oC(e){let{inputs:t,backend:n,attrs:s}=e,{logits:r}=t,{dim:a}=s,o=v.parseAxisParam([a],r.shape),i=sC({inputs:{x:r},backend:n,attrs:{reductionIndices:o,keepDims:!1}}),l=T.expandShapeToKeepDim(i.shape,o),u=we({inputs:{x:i},backend:n,attrs:{shape:l}}),c=aC({inputs:{a:r,b:u},backend:n}),p=eC({inputs:{x:c},backend:n}),d=O2({inputs:{x:p},backend:n,attrs:{axis:o,keepDims:!1}}),h=we({inputs:{x:d},backend:n,attrs:{shape:l}}),f=rC({inputs:{a:p,b:h},backend:n});return n.disposeIntermediateTensorInfo(i),n.disposeIntermediateTensorInfo(u),n.disposeIntermediateTensorInfo(c),n.disposeIntermediateTensorInfo(p),n.disposeIntermediateTensorInfo(d),n.disposeIntermediateTensorInfo(h),f}var Ule={kernelName:li,backendName:"webgl",kernelFunc:oC};function Gle(e){let{inputs:t,backend:n,attrs:s}=e,{logits:r}=t,{numSamples:a,seed:o,normalized:i}=s,l=i?r:oC({inputs:{logits:r},backend:n,attrs:{dim:r.shape.length-1}}),u=l.shape[0],c=l.shape[1],p=new zle(u,c,a),d=[[o]],h=n.runWebGLProgram(p,[l],"int32",d);return i||n.disposeIntermediateTensorInfo(l),h}var Hle={kernelName:v0,backendName:"webgl",kernelFunc:Gle},jle=br+` +`,V9=Wn({opSnippet:Ale,packedOpSnippet:xle,checkOutOfBounds:!0}),ble={kernelName:No,backendName:"webgl",kernelFunc:V9},$7="return a - b;",U9=Wn({opSnippet:$7,packedOpSnippet:$7,supportsComplex:!0,cpuKernelImpl:yne}),vle={kernelName:ii,backendName:"webgl",kernelFunc:U9};function G9(e){let{inputs:t,backend:n,attrs:s}=e,{logits:r}=t,{dim:a}=s,o=v.parseAxisParam([a],r.shape),i=W9({inputs:{x:r},backend:n,attrs:{reductionIndices:o,keepDims:!1}}),l=T.expandShapeToKeepDim(i.shape,o),u=be({inputs:{x:i},backend:n,attrs:{shape:l}}),c=U9({inputs:{a:r,b:u},backend:n}),p=z9({inputs:{x:c},backend:n}),d=d2({inputs:{x:p},backend:n,attrs:{axis:o,keepDims:!1}}),h=be({inputs:{x:d},backend:n,attrs:{shape:l}}),f=V9({inputs:{a:p,b:h},backend:n});return n.disposeIntermediateTensorInfo(i),n.disposeIntermediateTensorInfo(u),n.disposeIntermediateTensorInfo(c),n.disposeIntermediateTensorInfo(p),n.disposeIntermediateTensorInfo(d),n.disposeIntermediateTensorInfo(h),f}var wle={kernelName:ai,backendName:"webgl",kernelFunc:G9};function kle(e){let{inputs:t,backend:n,attrs:s}=e,{logits:r}=t,{numSamples:a,seed:o,normalized:i}=s,l=i?r:G9({inputs:{logits:r},backend:n,attrs:{dim:r.shape.length-1}}),u=l.shape[0],c=l.shape[1],p=new yle(u,c,a),d=[[o]],h=n.runWebGLProgram(p,[l],"int32",d);return i||n.disposeIntermediateTensorInfo(l),h}var Sle={kernelName:Ym,backendName:"webgl",kernelFunc:kle},Ile=br+` return -x; -`,qle=` +`,Cle=` vec4 result = -x; bvec4 isNaN = isnan(x); @@ -3962,14 +3960,14 @@ return a / b;`,Ble=` result.a = isNaN.a ? x.a : result.a; return result; -`;function Xle(e){let{inputs:t,backend:n}=e,{x:s}=t;if(n.shouldExecuteOnCPU([s])){let a=n.texData.get(s.dataId),[o,i]=bne(a.values,s.shape,s.dtype);return n.makeTensorInfo(i,s.dtype,o)}let r;return H().getBool("WEBGL_PACK_UNARY_OPERATIONS")?r=new el(s.shape,qle):r=new Sa(s.shape,jle),n.runWebGLProgram(r,[s],s.dtype)}var Kle={kernelName:zl,backendName:"webgl",kernelFunc:Xle},Zle=Ar.nonMaxSuppressionV3Impl;function Yle(e){T.warn("tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead");let{inputs:t,backend:n,attrs:s}=e,{boxes:r,scores:a}=t,{maxOutputSize:o,iouThreshold:i,scoreThreshold:l}=s,u=n.readSync(r.dataId),c=n.readSync(a.dataId),{selectedIndices:p}=Zle(u,c,o,i,l);return n.makeTensorInfo([p.length],"int32",new Int32Array(p))}var Jle={kernelName:Bl,backendName:"webgl",kernelFunc:Yle},Qle=Ar.nonMaxSuppressionV4Impl;function eue(e){T.warn("tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead");let{inputs:t,backend:n,attrs:s}=e,{boxes:r,scores:a}=t,{maxOutputSize:o,iouThreshold:i,scoreThreshold:l,padToMaxOutputSize:u}=s,c=n.readSync(r.dataId),p=n.readSync(a.dataId),{selectedIndices:d,validOutputs:h}=Qle(c,p,o,i,l,u);return[n.makeTensorInfo([d.length],"int32",new Int32Array(d)),n.makeTensorInfo([],"int32",new Int32Array([h]))]}var tue={kernelName:Gc,backendName:"webgl",kernelFunc:eue},nue=Ar.nonMaxSuppressionV5Impl;function sue(e){T.warn("tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead");let{inputs:t,backend:n,attrs:s}=e,{boxes:r,scores:a}=t,{maxOutputSize:o,iouThreshold:i,scoreThreshold:l,softNmsSigma:u}=s,c=n.readSync(r.dataId),p=n.readSync(a.dataId),d=o,h=i,f=l,m=u,{selectedIndices:g,selectedScores:y}=nue(c,p,d,h,f,m);return[n.makeTensorInfo([g.length],"int32",new Int32Array(g)),n.makeTensorInfo([y.length],"float32",new Float32Array(y))]}var rue={kernelName:Wl,backendName:"webgl",kernelFunc:sue},aue=class{constructor(e,t,n,s){this.variableNames=["indices"],this.outputShape=[e,t],this.userCode=` +`;function Tle(e){let{inputs:t,backend:n}=e,{x:s}=t;if(n.shouldExecuteOnCPU([s])){let a=n.texData.get(s.dataId),[o,i]=ene(a.values,s.shape,s.dtype);return n.makeTensorInfo(i,s.dtype,o)}let r;return U().getBool("WEBGL_PACK_UNARY_OPERATIONS")?r=new ji(s.shape,Cle):r=new xa(s.shape,Ile),n.runWebGLProgram(r,[s],s.dtype)}var Nle={kernelName:Rl,backendName:"webgl",kernelFunc:Tle},Ele=Ar.nonMaxSuppressionV3Impl;function Rle(e){T.warn("tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead");let{inputs:t,backend:n,attrs:s}=e,{boxes:r,scores:a}=t,{maxOutputSize:o,iouThreshold:i,scoreThreshold:l}=s,u=n.readSync(r.dataId),c=n.readSync(a.dataId),{selectedIndices:p}=Ele(u,c,o,i,l);return n.makeTensorInfo([p.length],"int32",new Int32Array(p))}var _le={kernelName:Dl,backendName:"webgl",kernelFunc:Rle},Dle=Ar.nonMaxSuppressionV4Impl;function $le(e){T.warn("tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead");let{inputs:t,backend:n,attrs:s}=e,{boxes:r,scores:a}=t,{maxOutputSize:o,iouThreshold:i,scoreThreshold:l,padToMaxOutputSize:u}=s,c=n.readSync(r.dataId),p=n.readSync(a.dataId),{selectedIndices:d,validOutputs:h}=Dle(c,p,o,i,l,u);return[n.makeTensorInfo([d.length],"int32",new Int32Array(d)),n.makeTensorInfo([],"int32",new Int32Array([h]))]}var Ple={kernelName:Dc,backendName:"webgl",kernelFunc:$le},Fle=Ar.nonMaxSuppressionV5Impl;function Ole(e){T.warn("tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead");let{inputs:t,backend:n,attrs:s}=e,{boxes:r,scores:a}=t,{maxOutputSize:o,iouThreshold:i,scoreThreshold:l,softNmsSigma:u}=s,c=n.readSync(r.dataId),p=n.readSync(a.dataId),d=o,h=i,f=l,m=u,{selectedIndices:g,selectedScores:y}=Fle(c,p,d,h,f,m);return[n.makeTensorInfo([g.length],"int32",new Int32Array(g)),n.makeTensorInfo([y.length],"float32",new Float32Array(y))]}var Mle={kernelName:$l,backendName:"webgl",kernelFunc:Ole},zle=class{constructor(e,t,n,s){this.variableNames=["indices"],this.outputShape=[e,t],this.userCode=` void main() { ivec2 coords = getOutputCoords(); int index = round(getIndices(coords.x)); setOutput(mix(float(${s}), float(${n}), float(index == coords.y))); } - `}},oue=e=>{let{inputs:t,backend:n,attrs:s}=e,{indices:r}=t,{dtype:a,depth:o,onValue:i,offValue:l}=s,u=v.sizeFromShape(r.shape),c=new aue(u,o,i,l),p=we({inputs:{x:r},backend:n,attrs:{shape:[u]}}),d=n.runWebGLProgram(c,[p],a);n.disposeIntermediateTensorInfo(p);let h=[...r.shape,o],f=we({inputs:{x:d},backend:n,attrs:{shape:h}});return n.disposeIntermediateTensorInfo(d),f},iue={kernelName:Ul,backendName:"webgl",kernelFunc:oue};function Km(e){let{inputs:t,backend:n}=e,{x:s}=t;if(s.dtype==="complex64"){let r=qh({inputs:{input:s},backend:n}),a=Km({inputs:{x:r},backend:n}),o=M2({inputs:{input:s},backend:n}),i=Km({inputs:{x:o},backend:n}),l=xi({inputs:{real:a,imag:i},backend:n});return n.disposeIntermediateTensorInfo(r),n.disposeIntermediateTensorInfo(a),n.disposeIntermediateTensorInfo(o),n.disposeIntermediateTensorInfo(i),l}else return Xh({attrs:{shape:s.shape,dtype:s.dtype,value:s.dtype==="string"?"":0},backend:n})}var lue={kernelName:ou,backendName:"webgl",kernelFunc:Km};function iC(e){let{inputs:t,backend:n}=e,{x:s}=t;if(s.dtype==="string")throw new Error("onesLike is not supported under string dtype");if(s.dtype==="complex64"){let r=qh({inputs:{input:s},backend:n}),a=iC({inputs:{x:r},backend:n}),o=M2({inputs:{input:s},backend:n}),i=Km({inputs:{x:o},backend:n}),l=xi({inputs:{real:a,imag:i},backend:n});return n.disposeIntermediateTensorInfo(r),n.disposeIntermediateTensorInfo(a),n.disposeIntermediateTensorInfo(o),n.disposeIntermediateTensorInfo(i),l}else return Xh({attrs:{shape:s.shape,dtype:s.dtype,value:1},backend:n})}var uue={kernelName:Vl,backendName:"webgl",kernelFunc:iC};function cue(e){let{inputs:t,backend:n,attrs:s}=e,{axis:r}=s;if(t.length===1)return Cy({inputs:{input:t[0]},backend:n,attrs:{dim:r}});let a=t[0].shape,o=t[0].dtype;t.forEach(c=>{v.assertShapesMatch(a,c.shape,"All tensors passed to stack must have matching shapes"),v.assert(o===c.dtype,()=>"All tensors passed to stack must have matching dtypes")});let i=[],l=t.map(c=>{let p=Cy({inputs:{input:c},backend:n,attrs:{dim:r}});return i.push(p),p}),u=j9({inputs:l,backend:n,attrs:{axis:r}});return i.forEach(c=>n.disposeIntermediateTensorInfo(c)),u}var due={kernelName:Gl,backendName:"webgl",kernelFunc:cue},pue=class{constructor(e,t,n){this.variableNames=["x"],this.customUniforms=[{name:"value",type:"float"}],this.outputShape=t.map((l,u)=>l[0]+e[u]+l[1]);let s=e.length,r=kt(s),a=t.map(l=>l[0]).join(","),o=t.map((l,u)=>l[0]+e[u]).join(","),i=["coords[0]","coords[1]","coords[2]","coords[3]"].slice(0,s);if(s===1){this.userCode=` + `}},Lle=e=>{let{inputs:t,backend:n,attrs:s}=e,{indices:r}=t,{dtype:a,depth:o,onValue:i,offValue:l}=s,u=v.sizeFromShape(r.shape),c=new zle(u,o,i,l),p=be({inputs:{x:r},backend:n,attrs:{shape:[u]}}),d=n.runWebGLProgram(c,[p],a);n.disposeIntermediateTensorInfo(p);let h=[...r.shape,o],f=be({inputs:{x:d},backend:n,attrs:{shape:h}});return n.disposeIntermediateTensorInfo(d),f},Ble={kernelName:Fl,backendName:"webgl",kernelFunc:Lle};function Cm(e){let{inputs:t,backend:n}=e,{x:s}=t;if(s.dtype==="complex64"){let r=Dh({inputs:{input:s},backend:n}),a=Cm({inputs:{x:r},backend:n}),o=p2({inputs:{input:s},backend:n}),i=Cm({inputs:{x:o},backend:n}),l=gi({inputs:{real:a,imag:i},backend:n});return n.disposeIntermediateTensorInfo(r),n.disposeIntermediateTensorInfo(a),n.disposeIntermediateTensorInfo(o),n.disposeIntermediateTensorInfo(i),l}else return $h({attrs:{shape:s.shape,dtype:s.dtype,value:s.dtype==="string"?"":0},backend:n})}var Wle={kernelName:Jl,backendName:"webgl",kernelFunc:Cm};function H9(e){let{inputs:t,backend:n}=e,{x:s}=t;if(s.dtype==="string")throw new Error("onesLike is not supported under string dtype");if(s.dtype==="complex64"){let r=Dh({inputs:{input:s},backend:n}),a=H9({inputs:{x:r},backend:n}),o=p2({inputs:{input:s},backend:n}),i=Cm({inputs:{x:o},backend:n}),l=gi({inputs:{real:a,imag:i},backend:n});return n.disposeIntermediateTensorInfo(r),n.disposeIntermediateTensorInfo(a),n.disposeIntermediateTensorInfo(o),n.disposeIntermediateTensorInfo(i),l}else return $h({attrs:{shape:s.shape,dtype:s.dtype,value:1},backend:n})}var Vle={kernelName:Pl,backendName:"webgl",kernelFunc:H9};function Ule(e){let{inputs:t,backend:n,attrs:s}=e,{axis:r}=s;if(t.length===1)return ay({inputs:{input:t[0]},backend:n,attrs:{dim:r}});let a=t[0].shape,o=t[0].dtype;t.forEach(c=>{v.assertShapesMatch(a,c.shape,"All tensors passed to stack must have matching shapes"),v.assert(o===c.dtype,()=>"All tensors passed to stack must have matching dtypes")});let i=[],l=t.map(c=>{let p=ay({inputs:{input:c},backend:n,attrs:{dim:r}});return i.push(p),p}),u=R9({inputs:l,backend:n,attrs:{axis:r}});return i.forEach(c=>n.disposeIntermediateTensorInfo(c)),u}var Gle={kernelName:Ol,backendName:"webgl",kernelFunc:Ule},Hle=class{constructor(e,t,n){this.variableNames=["x"],this.customUniforms=[{name:"value",type:"float"}],this.outputShape=t.map((l,u)=>l[0]+e[u]+l[1]);let s=e.length,r=Tt(s),a=t.map(l=>l[0]).join(","),o=t.map((l,u)=>l[0]+e[u]).join(","),i=["coords[0]","coords[1]","coords[2]","coords[3]"].slice(0,s);if(s===1){this.userCode=` int start = ${a}; int end = ${o}; @@ -3994,7 +3992,7 @@ return a / b;`,Ble=` setOutput(getX(${i})); } } - `}},hue=class{constructor(e,t,n){this.variableNames=["x"],this.packedInputs=!0,this.packedOutput=!0,this.customUniforms=[{name:"value",type:"float"}],this.outputShape=t.map((f,m)=>f[0]+e[m]+f[1]);let s=e.length,r=kt(s),a=t.map(f=>f[0]).join(","),o=t.map((f,m)=>f[0]+e[m]).join(","),i=us("rc",s),l=us("source",s),u=`${i[s-1]} < ${this.outputShape[s-1]}`,c=s===1?"source":`vec2(${l.slice(-2).join()})`,p=[`${r} rc = outputLoc;`,`${i[s-1]} += 1; + `}},jle=class{constructor(e,t,n){this.variableNames=["x"],this.packedInputs=!0,this.packedOutput=!0,this.customUniforms=[{name:"value",type:"float"}],this.outputShape=t.map((f,m)=>f[0]+e[m]+f[1]);let s=e.length,r=Tt(s),a=t.map(f=>f[0]).join(","),o=t.map((f,m)=>f[0]+e[m]).join(","),i=os("rc",s),l=os("source",s),u=`${i[s-1]} < ${this.outputShape[s-1]}`,c=s===1?"source":`vec2(${l.slice(-2).join()})`,p=[`${r} rc = outputLoc;`,`${i[s-1]} += 1; if(${u}) { `,s===1?"":`} rc = outputLoc; @@ -4018,7 +4016,7 @@ return a / b;`,Ble=` ${h} setOutput(result); } - `}},lC=e=>{let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{paddings:a,constantValue:o}=s;if(v.sizeFromShape(r.shape)===0){let u=a.map((c,p)=>c[0]+r.shape[p]+c[1]);return Xh({backend:n,attrs:{shape:u,value:o,dtype:r.dtype}})}let i=H().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new hue(r.shape,a,o):new pue(r.shape,a,o),l=[[o]];return n.runWebGLProgram(i,[r],r.dtype,l)},fue={kernelName:Ko,backendName:"webgl",kernelFunc:lC},mue=` + `}},j9=e=>{let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{paddings:a,constantValue:o}=s;if(v.sizeFromShape(r.shape)===0){let u=a.map((c,p)=>c[0]+r.shape[p]+c[1]);return $h({backend:n,attrs:{shape:u,value:o,dtype:r.dtype}})}let i=U().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new jle(r.shape,a,o):new Hle(r.shape,a,o),l=[[o]];return n.runWebGLProgram(i,[r],r.dtype,l)},qle={kernelName:jo,backendName:"webgl",kernelFunc:j9},Xle=` if(a < 0.0 && floor(b) < b){ return NAN; } @@ -4027,7 +4025,7 @@ return a / b;`,Ble=` } return (round(mod(b, 2.0)) != 1) ? pow(abs(a), b) : sign(a) * pow(abs(a), b); -`,gue=` +`,Kle=` // isModRound1 has 1 for components with round(mod(b, 2.0)) == 1, 0 otherwise. vec4 isModRound1 = vec4(equal(round(mod(b, 2.0)), ivec4(1))); vec4 multiplier = sign(a) * isModRound1 + (vec4(1.0) - isModRound1); @@ -4040,12 +4038,14 @@ return a / b;`,Ble=` result.b = isExpZero.b ? 1.0 : result.b; result.a = isExpZero.a ? 1.0 : result.a; - vec4 isNaN = vec4(lessThan(a, vec4(0.0))) * vec4(lessThan(floor(b), b)); - `+P2+` + bvec4 isNaN1 = lessThan(a, vec4(0.0)); + bvec4 isNaN2 = lessThan(floor(b), b); + bvec4 isNaN = bvec4(isNaN1.x && isNaN2.x, isNaN1.y && isNaN2.y, isNaN1.z && isNaN2.z, isNaN1.w && isNaN2.w); + `+Rh+` return result; -`,yue=Bn({opSnippet:mue,packedOpSnippet:gue}),Aue={kernelName:Zo,backendName:"webgl",kernelFunc:yue};function xue(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{axis:a,keepDims:o}=s,i=r.shape.length,l=[],u=v.parseAxisParam(a,r.shape),c=u,p=T.getAxesPermutation(c,i),d=r;p!=null&&(d=cs({inputs:{x:r},backend:n,attrs:{perm:p}}),c=T.getInnerMostAxes(c.length,i),l.push(d)),T.assertAxesAreInnerMostDims("prod",c,i);let h;if(n.shouldExecuteOnCPU([d])){let f=n.texData.get(d.dataId).values,{outVals:m,outShape:g,outDtype:y}=wne(d.shape,d.dtype,f,c);h=n.makeTensorInfo(g,y,m)}else{let[f,m]=T.computeOutAndReduceShapes(d.shape,c),g=v.sizeFromShape(m),y=we({inputs:{x:d},backend:n,attrs:{shape:[-1,g]}}),x=ch(r.dtype),A=bu(y,x,"prod",n);h=we({inputs:{x:A},backend:n,attrs:{shape:f}}),l.push(y),l.push(A)}if(o){l.push(h);let f=T.expandShapeToKeepDim(h.shape,u);h=we({inputs:{x:h},backend:n,attrs:{shape:f}})}return l.forEach(f=>n.disposeIntermediateTensorInfo(f)),h}var bue={kernelName:Jo,backendName:"webgl",kernelFunc:xue};function vue(e){let{inputs:t,backend:n,attrs:s}=e,{shape:r,values:a,defaultValue:o,rowPartitionTensors:i}=t,{rowPartitionTypes:l}=s,u=n.readSync(r.dataId),c=n.readSync(a.dataId),p=n.readSync(o.dataId),d=i.map(g=>n.readSync(g.dataId)),h=i.map(g=>g.shape),[f,m]=kne(u,r.shape,c,a.shape,a.dtype,p,o.shape,d,h,l);return n.makeTensorInfo(f,a.dtype,m)}var wue={kernelName:w0,backendName:"webgl",kernelFunc:vue},uC=e=>{let{backend:t,attrs:n}=e,{start:s,stop:r,step:a,dtype:o}=n,i=Sne(s,r,a,o);return t.makeTensorInfo([i.length],o,i)},kue={kernelName:Hc,backendName:"webgl",kernelFunc:uC},Sue="return 1.0 / x;",Iue=ht({opSnippet:Sue}),Cue={kernelName:Hl,backendName:"webgl",kernelFunc:Iue},Tue=br+` +`,Zle=Wn({opSnippet:Xle,packedOpSnippet:Kle}),Yle={kernelName:qo,backendName:"webgl",kernelFunc:Zle};function Jle(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{axis:a,keepDims:o}=s,i=r.shape.length,l=[],u=v.parseAxisParam(a,r.shape),c=u,p=T.getAxesPermutation(c,i),d=r;p!=null&&(d=is({inputs:{x:r},backend:n,attrs:{perm:p}}),c=T.getInnerMostAxes(c.length,i),l.push(d)),T.assertAxesAreInnerMostDims("prod",c,i);let h;if(n.shouldExecuteOnCPU([d])){let f=n.texData.get(d.dataId).values,{outVals:m,outShape:g,outDtype:y}=nne(d.shape,d.dtype,f,c);h=n.makeTensorInfo(g,y,m)}else{let[f,m]=T.computeOutAndReduceShapes(d.shape,c),g=v.sizeFromShape(m),y=be({inputs:{x:d},backend:n,attrs:{shape:[-1,g]}}),x=qp(r.dtype),A=pu(y,x,"prod",n);h=be({inputs:{x:A},backend:n,attrs:{shape:f}}),l.push(y),l.push(A)}if(o){l.push(h);let f=T.expandShapeToKeepDim(h.shape,u);h=be({inputs:{x:h},backend:n,attrs:{shape:f}})}return l.forEach(f=>n.disposeIntermediateTensorInfo(f)),h}var Qle={kernelName:Ko,backendName:"webgl",kernelFunc:Jle};function eue(e){let{inputs:t,backend:n,attrs:s}=e,{paramsNestedSplits:r,paramsDenseValues:a,indices:o}=t,{outputRaggedRank:i}=s,l=r.map(y=>n.readSync(y.dataId)),u=r.map(y=>y.shape),c=n.readSync(a.dataId),p=n.readSync(o.dataId),[d,h,f]=sne(l,u,c,a.shape,a.dtype,p,o.shape,i),m=d.map(y=>n.makeTensorInfo([y.length],"int32",y)),g=n.makeTensorInfo(f,a.dtype,h);return m.concat([g])}var tue={kernelName:Jm,backendName:"webgl",kernelFunc:eue};function nue(e){let{inputs:t,backend:n,attrs:s}=e,{shape:r,values:a,defaultValue:o,rowPartitionTensors:i}=t,{rowPartitionTypes:l}=s,u=n.readSync(r.dataId),c=n.readSync(a.dataId),p=n.readSync(o.dataId),d=i.map(g=>n.readSync(g.dataId)),h=i.map(g=>g.shape),[f,m]=rne(u,r.shape,c,a.shape,a.dtype,p,o.shape,d,h,l);return n.makeTensorInfo(f,a.dtype,m)}var sue={kernelName:Qm,backendName:"webgl",kernelFunc:nue},q9=e=>{let{backend:t,attrs:n}=e,{start:s,stop:r,step:a,dtype:o}=n,i=ane(s,r,a,o);return t.makeTensorInfo([i.length],o,i)},rue={kernelName:$c,backendName:"webgl",kernelFunc:q9},aue="return 1.0 / x;",oue=pt({opSnippet:aue}),iue={kernelName:Ml,backendName:"webgl",kernelFunc:oue},lue=br+` return (x < 0.0) ? 0.0 : x; -`,Nue=` +`,uue=` vec4 result = x * vec4(greaterThanEqual(x, vec4(0.0))); bvec4 isNaN = isnan(x); @@ -4055,9 +4055,9 @@ return a / b;`,Ble=` result.a = isNaN.a ? x.a : result.a; return result; -`,Eue=ht({opSnippet:Tue,packedOpSnippet:Nue}),Rue={kernelName:Qo,backendName:"webgl",kernelFunc:Eue},_ue=br+` +`,cue=pt({opSnippet:lue,packedOpSnippet:uue}),due={kernelName:Zo,backendName:"webgl",kernelFunc:cue},pue=br+` return (x < 0.0) ? 0.0 : min(6.0, x); -`,Due=` +`,hue=` vec4 result = min(x, vec4(6.)) * vec4(greaterThanEqual(x, vec4(0.0))); bvec4 isNaN = isnan(x); @@ -4067,7 +4067,7 @@ return a / b;`,Ble=` result.a = isNaN.a ? x.a : result.a; return result; -`,$ue=ht({opSnippet:_ue,packedOpSnippet:Due}),Pue={kernelName:ni,backendName:"webgl",kernelFunc:$ue},Fue=class{constructor(e,t,n,s,r){this.variableNames=["A"],this.outputShape=[];let[a,o,i,l]=e;this.outputShape=[a,t,n,l];let u=[s&&t>1?o-1:o,s&&n>1?i-1:i],c=[s&&t>1?t-1:t,s&&n>1?n-1:n],p;r?p="(vec2(yRC) + vec2(0.5)) * effectiveInputOverOutputRatioRC - vec2(0.5)":p="vec2(yRC) * effectiveInputOverOutputRatioRC",this.userCode=` +`,fue=pt({opSnippet:pue,packedOpSnippet:hue}),mue={kernelName:Qo,backendName:"webgl",kernelFunc:fue},gue=class{constructor(e,t,n,s,r){this.variableNames=["A"],this.outputShape=[];let[a,o,i,l]=e;this.outputShape=[a,t,n,l];let u=[s&&t>1?o-1:o,s&&n>1?i-1:i],c=[s&&t>1?t-1:t,s&&n>1?n-1:n],p;r?p="(vec2(yRC) + vec2(0.5)) * effectiveInputOverOutputRatioRC - vec2(0.5)":p="vec2(yRC) * effectiveInputOverOutputRatioRC",this.userCode=` const vec2 effectiveInputOverOutputRatioRC = vec2( ${u[0]/c[0]}, ${u[1]/c[1]}); @@ -4100,7 +4100,7 @@ return a / b;`,Ble=` setOutput(newValue); } - `}},Oue=class{constructor(e,t,n,s,r){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=[];let[a,o,i,l]=e;this.outputShape=[a,t,n,l];let u=[s&&t>1?o-1:o,s&&n>1?i-1:i],c=[s&&t>1?t-1:t,s&&n>1?n-1:n],p;r?p="(vec3(yRC) + vec3(0.5)) * effectiveInputOverOutputRatioRC - vec3(0.5)":p="vec3(yRC) * effectiveInputOverOutputRatioRC",this.userCode=` + `}},yue=class{constructor(e,t,n,s,r){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=[];let[a,o,i,l]=e;this.outputShape=[a,t,n,l];let u=[s&&t>1?o-1:o,s&&n>1?i-1:i],c=[s&&t>1?t-1:t,s&&n>1?n-1:n],p;r?p="(vec3(yRC) + vec3(0.5)) * effectiveInputOverOutputRatioRC - vec3(0.5)":p="vec3(yRC) * effectiveInputOverOutputRatioRC",this.userCode=` const vec3 effectiveInputOverOutputRatioRC = vec3( ${u[0]/c[0]}, ${u[1]/c[1]}, @@ -4177,7 +4177,7 @@ return a / b;`,Ble=` setOutput(newValue); } - `}};function Mue(e){let{inputs:t,backend:n,attrs:s}=e,{images:r}=t,{alignCorners:a,halfPixelCenters:o,size:i}=s,[l,u]=i,c=H().getBool("WEBGL_PACK_IMAGE_OPERATIONS")?new Oue(r.shape,l,u,a,o):new Fue(r.shape,l,u,a,o);return n.runWebGLProgram(c,[r],"float32")}var zue={kernelName:ti,backendName:"webgl",kernelFunc:Mue},Lue=class{constructor(e,t,n){this.variableNames=["dy"],this.outputShape=[],this.outputShape=t;let[,s,r]=t,[,a,o]=e,i=[n&&a>1?s-1:s,n&&o>1?r-1:r],l=[n&&a>1?a-1:a,n&&o>1?o-1:o],u=i[0]/l[0],c=i[1]/l[1],p=1/u,d=1/c,h=Math.ceil(p)*2+2,f=Math.ceil(d)*2+2;this.userCode=` + `}};function Aue(e){let{inputs:t,backend:n,attrs:s}=e,{images:r}=t,{alignCorners:a,halfPixelCenters:o,size:i}=s,[l,u]=i,c=U().getBool("WEBGL_PACK_IMAGE_OPERATIONS")?new yue(r.shape,l,u,a,o):new gue(r.shape,l,u,a,o);return n.runWebGLProgram(c,[r],"float32")}var xue={kernelName:Jo,backendName:"webgl",kernelFunc:Aue},bue=class{constructor(e,t,n){this.variableNames=["dy"],this.outputShape=[],this.outputShape=t;let[,s,r]=t,[,a,o]=e,i=[n&&a>1?s-1:s,n&&o>1?r-1:r],l=[n&&a>1?a-1:a,n&&o>1?o-1:o],u=i[0]/l[0],c=i[1]/l[1],p=1/u,d=1/c,h=Math.ceil(p)*2+2,f=Math.ceil(d)*2+2;this.userCode=` void main() { ivec4 coords = getOutputCoords(); int b = coords[0]; @@ -4258,7 +4258,7 @@ return a / b;`,Ble=` setOutput(accumulator); } - `}};function Bue(e){let{inputs:t,backend:n,attrs:s}=e,{images:r,dy:a}=t,{alignCorners:o}=s,i=new Lue(a.shape,r.shape,o);return n.runWebGLProgram(i,[a],a.dtype)}var Wue={kernelName:S0,backendName:"webgl",kernelFunc:Bue},Vue=class{constructor(e,t,n,s,r){this.variableNames=["A"],this.outputShape=[];let[a,o,i,l]=e;this.outputShape=[a,t,n,l];let u=[s&&t>1?o-1:o,s&&n>1?i-1:i],c=[s&&t>1?t-1:t,s&&n>1?n-1:n],p=s?"0.5":"0.0",d;r?d="max((vec2(yRC) + vec2(0.5)) * effectiveInputOverOutputRatioRC, vec2(0.0))":d="vec2(yRC) * effectiveInputOverOutputRatioRC",this.userCode=` + `}};function vue(e){let{inputs:t,backend:n,attrs:s}=e,{images:r,dy:a}=t,{alignCorners:o}=s,i=new bue(a.shape,r.shape,o);return n.runWebGLProgram(i,[a],a.dtype)}var wue={kernelName:t0,backendName:"webgl",kernelFunc:vue},kue=class{constructor(e,t,n,s,r){this.variableNames=["A"],this.outputShape=[];let[a,o,i,l]=e;this.outputShape=[a,t,n,l];let u=[s&&t>1?o-1:o,s&&n>1?i-1:i],c=[s&&t>1?t-1:t,s&&n>1?n-1:n],p=s?"0.5":"0.0",d;r?d="max((vec2(yRC) + vec2(0.5)) * effectiveInputOverOutputRatioRC, vec2(0.0))":d="vec2(yRC) * effectiveInputOverOutputRatioRC",this.userCode=` const vec2 effectiveInputOverOutputRatioRC = vec2( ${u[0]/c[0]}, ${u[1]/c[1]}); @@ -4280,7 +4280,7 @@ return a / b;`,Ble=` setOutput(newValue); } - `}},Uue=class{constructor(e,t,n,s,r){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=[];let[a,o,i,l]=e;this.outputShape=[a,t,n,l];let u=[s&&t>1?o-1:o,s&&n>1?i-1:i],c=[s&&t>1?t-1:t,s&&n>1?n-1:n],p=s?"0.5":"0.0",d;r?d="max((vec3(yRC) + vec3(0.5)) * effectiveInputOverOutputRatioRC, vec3(0.0))":d="vec3(yRC) * effectiveInputOverOutputRatioRC",this.userCode=` + `}},Sue=class{constructor(e,t,n,s,r){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=[];let[a,o,i,l]=e;this.outputShape=[a,t,n,l];let u=[s&&t>1?o-1:o,s&&n>1?i-1:i],c=[s&&t>1?t-1:t,s&&n>1?n-1:n],p=s?"0.5":"0.0",d;r?d="max((vec3(yRC) + vec3(0.5)) * effectiveInputOverOutputRatioRC, vec3(0.0))":d="vec3(yRC) * effectiveInputOverOutputRatioRC",this.userCode=` const vec3 effectiveInputOverOutputRatioRC = vec3( ${u[0]/c[0]}, ${u[1]/c[1]}, @@ -4321,7 +4321,7 @@ return a / b;`,Ble=` setOutput(newValue); } - `}};function Gue(e){let{inputs:t,backend:n,attrs:s}=e,{images:r}=t,{alignCorners:a,halfPixelCenters:o,size:i}=s,[l,u]=i,c=H().getBool("WEBGL_PACK_IMAGE_OPERATIONS")?new Uue(r.shape,l,u,a,o):new Vue(r.shape,l,u,a,o);return n.runWebGLProgram(c,[r],r.dtype)}var Hue={kernelName:ei,backendName:"webgl",kernelFunc:Gue},jue=class{constructor(e,t,n){this.variableNames=["dy"],this.outputShape=[],this.outputShape=t;let[,s,r]=t,[,a,o]=e,i=[n&&a>1?s-1:s,n&&o>1?r-1:r],l=[n&&a>1?a-1:a,n&&o>1?o-1:o],u=i[0]/l[0],c=i[1]/l[1],p=1/u,d=1/c,h=Math.ceil(p)*2+2,f=Math.ceil(d)*2+2;this.userCode=` + `}};function Iue(e){let{inputs:t,backend:n,attrs:s}=e,{images:r}=t,{alignCorners:a,halfPixelCenters:o,size:i}=s,[l,u]=i,c=U().getBool("WEBGL_PACK_IMAGE_OPERATIONS")?new Sue(r.shape,l,u,a,o):new kue(r.shape,l,u,a,o);return n.runWebGLProgram(c,[r],r.dtype)}var Cue={kernelName:Yo,backendName:"webgl",kernelFunc:Iue},Tue=class{constructor(e,t,n){this.variableNames=["dy"],this.outputShape=[],this.outputShape=t;let[,s,r]=t,[,a,o]=e,i=[n&&a>1?s-1:s,n&&o>1?r-1:r],l=[n&&a>1?a-1:a,n&&o>1?o-1:o],u=i[0]/l[0],c=i[1]/l[1],p=1/u,d=1/c,h=Math.ceil(p)*2+2,f=Math.ceil(d)*2+2;this.userCode=` void main() { ivec4 coords = getOutputCoords(); int b = coords[0]; @@ -4391,17 +4391,17 @@ return a / b;`,Ble=` setOutput(accumulator); } - `}};function que(e){let{inputs:t,backend:n,attrs:s}=e,{images:r,dy:a}=t,{alignCorners:o}=s,i=new jue(a.shape,r.shape,o);return n.runWebGLProgram(i,[a],a.dtype)}var Xue={kernelName:k0,backendName:"webgl",kernelFunc:que},Kue=class{constructor(e,t){this.variableNames=["x"];let n=e.length;if(n>4)throw new Error(`WebGL backend: Reverse of rank-${n} tensor is not yet supported`);if(this.outputShape=e,n===1){this.userCode=` + `}};function Nue(e){let{inputs:t,backend:n,attrs:s}=e,{images:r,dy:a}=t,{alignCorners:o}=s,i=new Tue(a.shape,r.shape,o);return n.runWebGLProgram(i,[a],a.dtype)}var Eue={kernelName:e0,backendName:"webgl",kernelFunc:Nue},Rue=class{constructor(e,t){this.variableNames=["x"];let n=e.length;if(n>4)throw new Error(`WebGL backend: Reverse of rank-${n} tensor is not yet supported`);if(this.outputShape=e,n===1){this.userCode=` void main() { int coord = getOutputCoords(); setOutput(getX(${e[0]} - coord - 1)); } - `;return}let s=o=>t.indexOf(o)!==-1&&e[o]!==1?`${e[o]} - coords[${o}] - 1`:`coords[${o}]`,r=e.map((o,i)=>s(i)).join(","),a=kt(n);this.userCode=` + `;return}let s=o=>t.indexOf(o)!==-1&&e[o]!==1?`${e[o]} - coords[${o}] - 1`:`coords[${o}]`,r=e.map((o,i)=>s(i)).join(","),a=Tt(n);this.userCode=` void main() { ${a} coords = getOutputCoords(); setOutput(getX(${r})); } - `}},Zue=class{constructor(e,t){this.variableNames=["x"],this.packedInputs=!0,this.packedOutput=!0;let n=e.length;if(n>4)throw new Error(`WebGL backend: Reverse of rank-${n} tensor is not yet supported`);this.outputShape=e;let s=us("rc",n),r=`${s[n-1]} + 1 < ${this.outputShape[n-1]}`,a=`${s[n-2]} + 1 < ${this.outputShape[n-2]}`,o=kt(n);n===1?this.userCode=` + `}},_ue=class{constructor(e,t){this.variableNames=["x"],this.packedInputs=!0,this.packedOutput=!0;let n=e.length;if(n>4)throw new Error(`WebGL backend: Reverse of rank-${n} tensor is not yet supported`);this.outputShape=e;let s=os("rc",n),r=`${s[n-1]} + 1 < ${this.outputShape[n-1]}`,a=`${s[n-2]} + 1 < ${this.outputShape[n-2]}`,o=Tt(n);n===1?this.userCode=` void main(){ int rc = getOutputCoords(); vec4 result = vec4(0.); @@ -4429,7 +4429,7 @@ return a / b;`,Ble=` } setOutput(result); } - `;function i(h){return p(h)}function l(h){return h[n-1]="("+h[n-1]+" + 1)",p(h)}function u(h){return h[n-2]="("+h[n-2]+" + 1)",p(h)}function c(h){return h[n-1]="("+h[n-1]+" + 1)",h[n-2]="("+h[n-2]+" + 1)",p(h)}function p(h){let f=e.map((y,x)=>d(x,h)),m=f.join(","),g=f.slice(-2).join(",");return`getChannel(getX(${m}), vec2(${g}))`}function d(h,f){return t.indexOf(h)!==-1&&e[h]!==1?`${e[h]} - ${f[h]} - 1`:`${f[h]}`}}};function Yue(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{dims:a}=s,o=r.shape.length,i=v.parseAxisParam(a,r.shape);if(o===0)return Vs({inputs:{x:r},backend:n});let l=H().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new Zue(r.shape,i):new Kue(r.shape,i);return n.runWebGLProgram(l,[r],r.dtype)}var Jue={kernelName:ql,backendName:"webgl",kernelFunc:Yue},Que=class{constructor(e,t){this.variableNames=["Image"],this.outputShape=[],this.customUniforms=[{name:"params",type:"vec4"}];let n=e[1],s=e[2];this.outputShape=e;let r="";typeof t=="number"?r=`float outputValue = ${t.toFixed(2)};`:r=` + `;function i(h){return p(h)}function l(h){return h[n-1]="("+h[n-1]+" + 1)",p(h)}function u(h){return h[n-2]="("+h[n-2]+" + 1)",p(h)}function c(h){return h[n-1]="("+h[n-1]+" + 1)",h[n-2]="("+h[n-2]+" + 1)",p(h)}function p(h){let f=e.map((y,x)=>d(x,h)),m=f.join(","),g=f.slice(-2).join(",");return`getChannel(getX(${m}), vec2(${g}))`}function d(h,f){return t.indexOf(h)!==-1&&e[h]!==1?`${e[h]} - ${f[h]} - 1`:`${f[h]}`}}};function Due(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{dims:a}=s,o=r.shape.length,i=v.parseAxisParam(a,r.shape);if(o===0)return Ls({inputs:{x:r},backend:n});let l=U().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new _ue(r.shape,i):new Rue(r.shape,i);return n.runWebGLProgram(l,[r],r.dtype)}var $ue={kernelName:Ll,backendName:"webgl",kernelFunc:Due},Pue=class{constructor(e,t){this.variableNames=["Image"],this.outputShape=[],this.customUniforms=[{name:"params",type:"vec4"}];let n=e[1],s=e[2];this.outputShape=e;let r="";typeof t=="number"?r=`float outputValue = ${t.toFixed(2)};`:r=` vec3 fill = vec3(${t.join(",")}); float outputValue = fill[coords[3]];`,this.userCode=` void main() { @@ -4448,7 +4448,7 @@ return a / b;`,Ble=` } setOutput(outputValue); } - `}},ece={kernelName:iu,backendName:"webgl",kernelFunc:({inputs:e,attrs:t,backend:n})=>{let{image:s}=e,{radians:r,fillValue:a,center:o}=t,i=n,l=new Que(s.shape,a),[u,c]=T.getImageCenter(o,s.shape[1],s.shape[2]),p=[[u,c,Math.sin(r),Math.cos(r)]];return i.runWebGLProgram(l,[s],s.dtype,p)}},tce=` + `}},Fue={kernelName:Ql,backendName:"webgl",kernelFunc:({inputs:e,attrs:t,backend:n})=>{let{image:s}=e,{radians:r,fillValue:a,center:o}=t,i=n,l=new Pue(s.shape,a),[u,c]=T.getImageCenter(o,s.shape[1],s.shape[2]),p=[[u,c,Math.sin(r),Math.cos(r)]];return i.runWebGLProgram(l,[s],s.dtype,p)}},Oue=` // OpenGL ES does not support round function. // The algorithm is based on banker's rounding. float base = floor(x); @@ -4463,7 +4463,7 @@ return a / b;`,Ble=` return base + 1.0; } } -`,nce=ht({opSnippet:tce}),sce={kernelName:Xl,backendName:"webgl",kernelFunc:nce},rce="return inversesqrt(x);",ace=ht({opSnippet:rce,cpuKernelImpl:Ine}),oce={kernelName:si,backendName:"webgl",kernelFunc:ace},cC=class{constructor(e,t,n,s,r,a,o=!0){this.variableNames=["updates","indices","defaultValue"],this.outputShape=a;let i=kt(r.length),l=kt(a.length),u="";n===1?u="i":n===2&&(u="i, j");let c=`getIndices(${u})`,p="";s===1?p="i":s===2&&(p="i, coords[1]");let d=`getUpdates(${p})`,h=t>1?"strides[j]":"strides";this.userCode=` +`,Mue=pt({opSnippet:Oue}),zue={kernelName:Bl,backendName:"webgl",kernelFunc:Mue},Lue="return inversesqrt(x);",Bue=pt({opSnippet:Lue,cpuKernelImpl:one}),Wue={kernelName:ei,backendName:"webgl",kernelFunc:Bue},X9=class{constructor(e,t,n,s,r,a,o=!0){this.variableNames=["updates","indices","defaultValue"],this.outputShape=a;let i=Tt(r.length),l=Tt(a.length),u="";n===1?u="i":n===2&&(u="i, j");let c=`getIndices(${u})`,p="";s===1?p="i":s===2&&(p="i, coords[1]");let d=`getUpdates(${p})`,h=t>1?"strides[j]":"strides";this.userCode=` ${i} strides = ${i}(${r}); void main() { @@ -4483,7 +4483,7 @@ return a / b;`,Ble=` } setOutput(mix(getDefaultValue(), sum, float(found))); } - `}};function ice(e){let{inputs:t,backend:n,attrs:s}=e,{indices:r,updates:a}=t,{shape:o}=s,{sliceRank:i,numUpdates:l,sliceSize:u,strides:c,outputSize:p}=T.calculateShapes(a,r,o),d=[p/u,u];if(p===0)return n.makeTensorInfo(o,r.dtype);let h=we({inputs:{x:r},backend:n,attrs:{shape:[l,i]}}),f=we({inputs:{x:a},backend:n,attrs:{shape:[l,u]}}),m=n.makeTensorInfo([],"float32",new Float32Array([0])),g=new cC(l,i,h.shape.length,f.shape.length,c,d),y=n.runWebGLProgram(g,[f,h,m],f.dtype),x=we({inputs:{x:y},backend:n,attrs:{shape:o}});return n.disposeIntermediateTensorInfo(h),n.disposeIntermediateTensorInfo(f),n.disposeIntermediateTensorInfo(y),n.disposeIntermediateTensorInfo(m),x}var lce={kernelName:Kl,backendName:"webgl",kernelFunc:ice},uce=class{constructor(e,t,n,s){this.variableNames=["sortedSequence","values"],this.customUniforms=[{name:"numInputs",type:"int"}],this.outputShape=[e,n];let r="while (left < right) {",a=`for (int i = 0; i < ${Math.ceil(Math.log2(t+1))}; ++i) { if (left >= right) break;`,o=H().getNumber("WEBGL_VERSION")===2?r:a,i=s==="left"?"<":"<=";this.userCode=` + `}};function Vue(e){let{inputs:t,backend:n,attrs:s}=e,{indices:r,updates:a}=t,{shape:o}=s,{sliceRank:i,numUpdates:l,sliceSize:u,strides:c,outputSize:p}=T.calculateShapes(a,r,o),d=[p/u,u];if(p===0)return n.makeTensorInfo(o,r.dtype);let h=be({inputs:{x:r},backend:n,attrs:{shape:[l,i]}}),f=be({inputs:{x:a},backend:n,attrs:{shape:[l,u]}}),m=n.makeTensorInfo([],"float32",new Float32Array([0])),g=new X9(l,i,h.shape.length,f.shape.length,c,d),y=n.runWebGLProgram(g,[f,h,m],f.dtype),x=be({inputs:{x:y},backend:n,attrs:{shape:o}});return n.disposeIntermediateTensorInfo(h),n.disposeIntermediateTensorInfo(f),n.disposeIntermediateTensorInfo(y),n.disposeIntermediateTensorInfo(m),x}var Uue={kernelName:Wl,backendName:"webgl",kernelFunc:Vue},Gue=class{constructor(e,t,n,s){this.variableNames=["sortedSequence","values"],this.customUniforms=[{name:"numInputs",type:"int"}],this.outputShape=[e,n];let r="while (left < right) {",a=`for (int i = 0; i < ${Math.ceil(Math.log2(t+1))}; ++i) { if (left >= right) break;`,o=U().getNumber("WEBGL_VERSION")===2?r:a,i=s==="left"?"<":"<=";this.userCode=` int findBound(int batch, float value) { int left = 0; int right = numInputs; @@ -4508,7 +4508,7 @@ return a / b;`,Ble=` setOutput(float(findBound(batch, value))); } - `}};function cce(e){let{inputs:t,backend:n,attrs:s}=e,{sortedSequence:r,values:a}=t,{side:o}=s,i=new uce(r.shape[0],r.shape[1],a.shape[1],o),l=[[r.shape[1]]];return n.runWebGLProgram(i,[r,a],"int32",l)}var dce={kernelName:I0,backendName:"webgl",kernelFunc:cce},pce=class{constructor(e,t,n){this.variableNames=["c","a","b"],this.outputShape=t;let s,r;if(n>4)throw Error(`Where for rank ${n} is not yet supported`);if(n===1)r="resRC",s="resRC";else{let o=["resRC.x","resRC.y","resRC.z","resRC.w"],i=[],l=[];for(let u=0;u4)throw Error(`Where for rank ${n} is not yet supported`);if(n===1)r="resRC",s="resRC";else{let o=["resRC.x","resRC.y","resRC.z","resRC.w"],i=[],l=[];for(let u=0;u= 0.0) ? scale * x : scaleAlpha * (exp(x) - 1.0); -`,gce=ht({opSnippet:mce}),yce={kernelName:jc,backendName:"webgl",kernelFunc:gce},Ace=xd+` +`,Yue=pt({opSnippet:Zue}),Jue={kernelName:Pc,backendName:"webgl",kernelFunc:Yue},Que=id+` return 1.0 / (1.0 + exp(-1.0 * x)); -`,xce=` +`,ece=` vec4 result = 1.0 / (1.0 + exp(-1.0 * x)); bvec4 isNaN = isnan(x); @@ -4536,15 +4536,15 @@ return a / b;`,Ble=` result.a = isNaN.a ? x.a : result.a; return result; -`,bce=ht({opSnippet:Ace,packedOpSnippet:xce,cpuKernelImpl:Tne}),vce={kernelName:ai,backendName:"webgl",kernelFunc:bce},wce=` +`,tce=pt({opSnippet:Que,packedOpSnippet:ece,cpuKernelImpl:lne}),nce={kernelName:ni,backendName:"webgl",kernelFunc:tce},sce=` if (isnan(x)) { return 0.0; } return sign(x); -`,kce=ht({opSnippet:wce}),Sce={kernelName:qc,backendName:"webgl",kernelFunc:kce},Ice=xd+` +`,rce=pt({opSnippet:sce}),ace={kernelName:Fc,backendName:"webgl",kernelFunc:rce},oce=id+` return sin(x); -`,Cce=ht({opSnippet:Ice}),Tce={kernelName:ri,backendName:"webgl",kernelFunc:Cce},Nce=` +`,ice=pt({opSnippet:oce}),lce={kernelName:ti,backendName:"webgl",kernelFunc:ice},uce=` float e2x = exp(x); return (e2x - 1.0 / e2x) / 2.0; -`,Ece=ht({opSnippet:Nce}),Rce={kernelName:Jl,backendName:"webgl",kernelFunc:Ece},_ce=` +`,cce=pt({opSnippet:uce}),dce={kernelName:Gl,backendName:"webgl",kernelFunc:cce},pce=` float epsilon = 1.1920928955078125e-7; float threshold = log(epsilon) + 2.0; @@ -4564,17 +4564,17 @@ return a / b;`,Ble=` result = log(exp_x + 1.0); } return result; -`,Dce=ht({opSnippet:_ce}),$ce={kernelName:Xc,backendName:"webgl",kernelFunc:Dce},Pce=e=>{let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{blockShape:a,paddings:o}=s;v.assert(r.shape.length<=4,()=>"spaceToBatchND for rank > 4 with a WebGL backend not implemented yet");let i=a.reduce((y,x)=>y*x),l=[[0,0]];l.push(...o);for(let y=1+a.length;yn.disposeIntermediateTensorInfo(y)),g},Fce={kernelName:Ql,backendName:"webgl",kernelFunc:Pce};function Oce(e){let{inputs:t,backend:n}=e,{indices:s,values:r,denseShape:a,defaultValue:o}=t;if(a.shape.length!==1)throw new Error(`Dense shape must be a vector, saw: +`,hce=pt({opSnippet:pce}),fce={kernelName:Oc,backendName:"webgl",kernelFunc:hce},mce=e=>{let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{blockShape:a,paddings:o}=s;v.assert(r.shape.length<=4,()=>"spaceToBatchND for rank > 4 with a WebGL backend not implemented yet");let i=a.reduce((y,x)=>y*x),l=[[0,0]];l.push(...o);for(let y=1+a.length;yn.disposeIntermediateTensorInfo(y)),g},gce={kernelName:Hl,backendName:"webgl",kernelFunc:mce};function yce(e){let{inputs:t,backend:n}=e,{indices:s,values:r,denseShape:a,defaultValue:o}=t;if(a.shape.length!==1)throw new Error(`Dense shape must be a vector, saw: ${a.shape}`);if(s.shape.length!==2)throw new Error(`Indices must be a matrix, saw: ${s.shape}`);if(r.shape.length!==1)throw new Error(`Values must be a vector, saw: ${r.shape}`);if(o.shape.length!==0)throw new Error(`Default value must be a scalar, saw: - ${o.shape}`);let i=n.readSync(s.dataId),l=n.readSync(r.dataId),u=n.readSync(a.dataId),c=n.readSync(o.dataId)[0],[p,d,h,f,m]=Ene(i,s.shape,s.dtype,l,r.dtype,u,c);return[n.makeTensorInfo(d,s.dtype,p),n.makeTensorInfo([d[0]],r.dtype,h),n.makeTensorInfo([f.length],"bool",new Uint8Array(f.map(g=>Number(g)))),n.makeTensorInfo([m.length],s.dtype,new Int32Array(m))]}var Mce={kernelName:th,backendName:"webgl",kernelFunc:Oce};function zce(e){let{inputs:t,backend:n}=e,{inputIndices:s,inputShape:r,newShape:a}=t;if(s.shape.length!==2)throw new Error(`Input indices should be a matrix but received shape ${s.shape}`);if(r.shape.length!==1)throw new Error(`Input shape should be a vector but received shape ${r.shape}`);if(a.shape.length!==1)throw new Error(`Target shape should be a vector but received shape ${a.shape}`);let o=Array.from(n.readSync(r.dataId)),i=n.readSync(s.dataId),l=Array.from(n.readSync(a.dataId)),[u,c,p]=Rne(i,s.shape,s.dtype,o,l);return[n.makeTensorInfo(c,s.dtype,u),n.makeTensorInfo([p.length],a.dtype,new Int32Array(p))]}var Lce={kernelName:Kc,backendName:"webgl",kernelFunc:zce};function Bce(e){let{inputs:t,backend:n}=e,{data:s,indices:r,segmentIds:a}=t;if(s.shape.length<1)throw new Error("Data should be at least 1 dimensional but received scalar");if(r.shape.length!==1)throw new Error(`Indices should be a vector but received shape + ${o.shape}`);let i=n.readSync(s.dataId),l=n.readSync(r.dataId),u=n.readSync(a.dataId),c=n.readSync(o.dataId)[0],[p,d,h,f,m]=cne(i,s.shape,s.dtype,l,r.dtype,u,c);return[n.makeTensorInfo(d,s.dtype,p),n.makeTensorInfo([d[0]],r.dtype,h),n.makeTensorInfo([f.length],"bool",new Uint8Array(f.map(g=>Number(g)))),n.makeTensorInfo([m.length],s.dtype,new Int32Array(m))]}var Ace={kernelName:zp,backendName:"webgl",kernelFunc:yce};function xce(e){let{inputs:t,backend:n}=e,{inputIndices:s,inputShape:r,newShape:a}=t;if(s.shape.length!==2)throw new Error(`Input indices should be a matrix but received shape ${s.shape}`);if(r.shape.length!==1)throw new Error(`Input shape should be a vector but received shape ${r.shape}`);if(a.shape.length!==1)throw new Error(`Target shape should be a vector but received shape ${a.shape}`);let o=Array.from(n.readSync(r.dataId)),i=n.readSync(s.dataId),l=Array.from(n.readSync(a.dataId)),[u,c,p]=dne(i,s.shape,s.dtype,o,l);return[n.makeTensorInfo(c,s.dtype,u),n.makeTensorInfo([p.length],a.dtype,new Int32Array(p))]}var bce={kernelName:Mc,backendName:"webgl",kernelFunc:xce};function vce(e){let{inputs:t,backend:n}=e,{data:s,indices:r,segmentIds:a}=t;if(s.shape.length<1)throw new Error("Data should be at least 1 dimensional but received scalar");if(r.shape.length!==1)throw new Error(`Indices should be a vector but received shape ${r.shape}`);if(a.shape.length!==1)throw new Error(`Segment ids should be a vector but received shape - ${a.shape}`);let o=n.readSync(s.dataId),i=n.readSync(r.dataId),l=n.readSync(a.dataId),[u,c]=_9(o,s.shape,s.dtype,i,l,!0);return n.makeTensorInfo(c,s.dtype,u)}var Wce={kernelName:nh,backendName:"webgl",kernelFunc:Bce};function Vce(e){let{inputs:t,backend:n}=e,{data:s,indices:r,segmentIds:a}=t;if(s.shape.length<1)throw new Error("Data should be at least 1 dimensional but received scalar");if(r.shape.length!==1)throw new Error(`Indices should be a vector but received shape + ${a.shape}`);let o=n.readSync(s.dataId),i=n.readSync(r.dataId),l=n.readSync(a.dataId),[u,c]=g9(o,s.shape,s.dtype,i,l,!0);return n.makeTensorInfo(c,s.dtype,u)}var wce={kernelName:Lp,backendName:"webgl",kernelFunc:vce};function kce(e){let{inputs:t,backend:n}=e,{data:s,indices:r,segmentIds:a}=t;if(s.shape.length<1)throw new Error("Data should be at least 1 dimensional but received scalar");if(r.shape.length!==1)throw new Error(`Indices should be a vector but received shape ${r.shape}`);if(a.shape.length!==1)throw new Error(`Segment ids should be a vector but received shape - ${a.shape}`);let o=n.readSync(s.dataId),i=n.readSync(r.dataId),l=n.readSync(a.dataId),[u,c]=_9(o,s.shape,s.dtype,i,l);return n.makeTensorInfo(c,s.dtype,u)}var Uce={kernelName:sh,backendName:"webgl",kernelFunc:Vce};function Gce(e){let{inputs:t,backend:n,attrs:s}=e,{sparseIndices:r,sparseValues:a,defaultValue:o}=t,{outputShape:i}=s,{sliceRank:l,numUpdates:u,sliceSize:c,strides:p,outputSize:d}=T.calculateShapes(a,r,i),h=!1;if(a.dtype==="string"){let y=n.bufferSync(r),x=n.bufferSync(a),A=v.decodeString(n.readSync(o.dataId)[0]),b=Cne(y,x,i,d,c,u,l,p,A,h);return n.makeTensorInfo(i,b.dtype,b.values)}let f=new cC(u,l,r.shape.length,a.shape.length,p,[d,1],h),m=n.runWebGLProgram(f,[a,r,o],a.dtype),g=we({inputs:{x:m},backend:n,attrs:{shape:i}});return n.disposeIntermediateTensorInfo(m),g}var Hce={kernelName:rh,backendName:"webgl",kernelFunc:Gce};function jce(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{numOrSizeSplits:a,axis:o}=s,i=v.parseAxisParam(o,r.shape)[0],l=T.prepareSplitSize(r,a,i),u=r.shape.length,c=new Array(u).fill(0),p=r.shape.slice();return l.map(d=>{let h=[...p];h[i]=d;let f=bd({inputs:{x:r},backend:n,attrs:{begin:c,size:h}});return c[i]+=d,f})}var qce={kernelName:eu,backendName:"webgl",kernelFunc:jce},t6="return sqrt(x);",Xce=ht({opSnippet:t6,packedOpSnippet:t6,cpuKernelImpl:_ne}),Kce={kernelName:oi,backendName:"webgl",kernelFunc:Xce},Zce="return x * x;",Yce=ht({opSnippet:Zce}),Jce={kernelName:Zc,backendName:"webgl",kernelFunc:Yce},n6="return (a - b) * (a - b);",Qce=Bn({opSnippet:n6,packedOpSnippet:n6}),ede={kernelName:ui,backendName:"webgl",kernelFunc:Qce};function tde({inputs:e,attrs:t,backend:n}){let{x:s}=e,r=br+` + ${a.shape}`);let o=n.readSync(s.dataId),i=n.readSync(r.dataId),l=n.readSync(a.dataId),[u,c]=g9(o,s.shape,s.dtype,i,l);return n.makeTensorInfo(c,s.dtype,u)}var Sce={kernelName:Bp,backendName:"webgl",kernelFunc:kce};function Ice(e){let{inputs:t,backend:n,attrs:s}=e,{sparseIndices:r,sparseValues:a,defaultValue:o}=t,{outputShape:i}=s,{sliceRank:l,numUpdates:u,sliceSize:c,strides:p,outputSize:d}=T.calculateShapes(a,r,i),h=!1;if(a.dtype==="string"){let y=n.bufferSync(r),x=n.bufferSync(a),A=v.decodeString(n.readSync(o.dataId)[0]),b=ine(y,x,i,d,c,u,l,p,A,h);return n.makeTensorInfo(i,b.dtype,b.values)}let f=new X9(u,l,r.shape.length,a.shape.length,p,[d,1],h),m=n.runWebGLProgram(f,[a,r,o],a.dtype),g=be({inputs:{x:m},backend:n,attrs:{shape:i}});return n.disposeIntermediateTensorInfo(m),g}var Cce={kernelName:Wp,backendName:"webgl",kernelFunc:Ice};function Tce(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{numOrSizeSplits:a,axis:o}=s,i=v.parseAxisParam(o,r.shape)[0],l=T.prepareSplitSize(r,a,i),u=r.shape.length,c=new Array(u).fill(0),p=r.shape.slice();return l.map(d=>{let h=[...p];h[i]=d;let f=ld({inputs:{x:r},backend:n,attrs:{begin:c,size:h}});return c[i]+=d,f})}var Nce={kernelName:jl,backendName:"webgl",kernelFunc:Tce},P7="return sqrt(x);",Ece=pt({opSnippet:P7,packedOpSnippet:P7,cpuKernelImpl:pne}),Rce={kernelName:si,backendName:"webgl",kernelFunc:Ece},_ce="return x * x;",Dce=pt({opSnippet:_ce}),$ce={kernelName:zc,backendName:"webgl",kernelFunc:Dce},F7="return (a - b) * (a - b);",Pce=Wn({opSnippet:F7,packedOpSnippet:F7}),Fce={kernelName:oi,backendName:"webgl",kernelFunc:Pce};function Oce({inputs:e,attrs:t,backend:n}){let{x:s}=e,r=br+` return x > 0.0 ? 1.0 : float(${t.alpha}); - `,a=new Sa(s.shape,r);return n.runWebGLProgram(a,[s],s.dtype)}var nde={kernelName:pi,backendName:"webgl",kernelFunc:tde},sde=class{constructor(e,t,n){this.variableNames=["x"],this.outputShape=n;let s=n.length,r=kt(n.length),a=kt(n.length),o="";if(s===1)o="coords * strides + begin";else{let i=0;o=n.map((l,u)=>(i++,n.length===1?`coords * strides[${u}] + begin[${u}]`:`coords[${i-1}] * strides[${u}] + begin[${u}]`)).join(",")}this.userCode=` + `,a=new xa(s.shape,r);return n.runWebGLProgram(a,[s],s.dtype)}var Mce={kernelName:ui,backendName:"webgl",kernelFunc:Oce},zce=class{constructor(e,t,n){this.variableNames=["x"],this.outputShape=n;let s=n.length,r=Tt(n.length),a=Tt(n.length),o="";if(s===1)o="coords * strides + begin";else{let i=0;o=n.map((l,u)=>(i++,n.length===1?`coords * strides[${u}] + begin[${u}]`:`coords[${i-1}] * strides[${u}] + begin[${u}]`)).join(",")}this.userCode=` ${r} begin = ${r}(${e}); ${r} strides = ${r}(${t}); @@ -4582,15 +4582,15 @@ return a / b;`,Ble=` ${a} coords = getOutputCoords(); setOutput(getX(${o})); } - `}};function rde(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{begin:a,end:o,strides:i,beginMask:l,endMask:u,ellipsisMask:c,newAxisMask:p,shrinkAxisMask:d}=s,{finalShapeSparse:h,finalShape:f,isIdentity:m,sliceDim0:g,isSimpleSlice:y,begin:x,end:A,strides:b}=jt.sliceInfo(r.shape,a,o,i,l,u,c,p,d),w;if(m)w=we({inputs:{x:r},backend:n,attrs:{shape:f}});else if(g||y){v.assert(r.shape.length>=1,()=>`Input must have rank at least 1, got: ${r.shape.length}`);let C=jt.computeOutShape(x,A,b),E=bd({inputs:{x:r},backend:n,attrs:{begin:x,size:C}});w=we({inputs:{x:E},backend:n,attrs:{shape:f}}),n.disposeIntermediateTensorInfo(E)}else if(n.shouldExecuteOnCPU([r])){let E=n.readSync(r.dataId),_=Ue(r.shape,r.dtype,E),$=Dne(h,_,b,x);w=n.makeTensorInfo(f,r.dtype,$.values)}else{let E=new sde(x,b,h);w=n.runWebGLProgram(E,[r],r.dtype)}let k=we({inputs:{x:w},backend:n,attrs:{shape:f}});return n.disposeIntermediateTensorInfo(w),k}var ade={kernelName:tu,backendName:"webgl",kernelFunc:rde};function ode(e){let{inputs:t,backend:n,attrs:s}=e,{separator:r,nGramWidths:a,leftPad:o,rightPad:i,padWidth:l,preserveShortSequences:u}=s,{data:c,dataSplits:p}=t,d=n.readSync(c.dataId),h=n.readSync(p.dataId),[f,m]=$ne(d,h,r,a,o,i,l,u);return[n.makeTensorInfo([f.length],"string",f),n.makeTensorInfo(p.shape,"int32",m)]}var ide={kernelName:Yc,backendName:"webgl",kernelFunc:ode};function lde(e){let{inputs:t,backend:n,attrs:s}=e,{skipEmpty:r}=s,{input:a,delimiter:o}=t;if(a.dtype!=="string")throw new Error("Input must be of datatype string");if(a.shape.length!==1)throw new Error(`Input must be a vector, got shape: ${a.shape}`);if(o.shape.length!==0)throw new Error(`Delimiter must be a scalar, got shape: ${o.shape}`);let i=n.readSync(a.dataId),l=n.readSync(o.dataId)[0],[u,c,p]=Pne(i,l,r),d=c.length;return[n.makeTensorInfo([d,2],"int32",u),n.makeTensorInfo([d],"string",c),n.makeTensorInfo([2],"int32",new Int32Array(p))]}var ude={kernelName:ah,backendName:"webgl",kernelFunc:lde};function cde(e){let{inputs:t,backend:n,attrs:s}=e,{numBuckets:r}=s,{input:a}=t;if(a.dtype!=="string")throw new Error("Input must be of datatype string");if(r<=0)throw new Error("Number of buckets must be at least 1");let o=n.readSync(a.dataId),i=Fne(o,r);return n.makeTensorInfo(a.shape,"int32",i)}var dde={kernelName:oh,backendName:"webgl",kernelFunc:cde},pde="return tan(x);",hde=ht({opSnippet:pde}),fde={kernelName:nu,backendName:"webgl",kernelFunc:hde},mde=` + `}};function Lce(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{begin:a,end:o,strides:i,beginMask:l,endMask:u,ellipsisMask:c,newAxisMask:p,shrinkAxisMask:d}=s,{finalShapeSparse:h,finalShape:f,isIdentity:m,sliceDim0:g,isSimpleSlice:y,begin:x,end:A,strides:b}=Gt.sliceInfo(r.shape,a,o,i,l,u,c,p,d),w;if(m)w=be({inputs:{x:r},backend:n,attrs:{shape:f}});else if(g||y){v.assert(r.shape.length>=1,()=>`Input must have rank at least 1, got: ${r.shape.length}`);let C=Gt.computeOutShape(x,A,b),N=ld({inputs:{x:r},backend:n,attrs:{begin:x,size:C}});w=be({inputs:{x:N},backend:n,attrs:{shape:f}}),n.disposeIntermediateTensorInfo(N)}else if(n.shouldExecuteOnCPU([r])){let N=n.readSync(r.dataId),R=ze(r.shape,r.dtype,N),D=hne(h,R,b,x);w=n.makeTensorInfo(f,r.dtype,D.values)}else{let N=new zce(x,b,h);w=n.runWebGLProgram(N,[r],r.dtype)}let k=be({inputs:{x:w},backend:n,attrs:{shape:f}});return n.disposeIntermediateTensorInfo(w),k}var Bce={kernelName:ql,backendName:"webgl",kernelFunc:Lce};function Wce(e){let{inputs:t,backend:n,attrs:s}=e,{separator:r,nGramWidths:a,leftPad:o,rightPad:i,padWidth:l,preserveShortSequences:u}=s,{data:c,dataSplits:p}=t,d=n.readSync(c.dataId),h=n.readSync(p.dataId),[f,m]=fne(d,h,r,a,o,i,l,u);return[n.makeTensorInfo([f.length],"string",f),n.makeTensorInfo(p.shape,"int32",m)]}var Vce={kernelName:Lc,backendName:"webgl",kernelFunc:Wce};function Uce(e){let{inputs:t,backend:n,attrs:s}=e,{skipEmpty:r}=s,{input:a,delimiter:o}=t;if(a.dtype!=="string")throw new Error("Input must be of datatype string");if(a.shape.length!==1)throw new Error(`Input must be a vector, got shape: ${a.shape}`);if(o.shape.length!==0)throw new Error(`Delimiter must be a scalar, got shape: ${o.shape}`);let i=n.readSync(a.dataId),l=n.readSync(o.dataId)[0],[u,c,p]=mne(i,l,r),d=c.length;return[n.makeTensorInfo([d,2],"int32",u),n.makeTensorInfo([d],"string",c),n.makeTensorInfo([2],"int32",new Int32Array(p))]}var Gce={kernelName:Vp,backendName:"webgl",kernelFunc:Uce};function Hce(e){let{inputs:t,backend:n,attrs:s}=e,{numBuckets:r}=s,{input:a}=t;if(a.dtype!=="string")throw new Error("Input must be of datatype string");if(r<=0)throw new Error("Number of buckets must be at least 1");let o=n.readSync(a.dataId),i=gne(o,r);return n.makeTensorInfo(a.shape,"int32",i)}var jce={kernelName:Up,backendName:"webgl",kernelFunc:Hce},qce="return tan(x);",Xce=pt({opSnippet:qce}),Kce={kernelName:Xl,backendName:"webgl",kernelFunc:Xce},Zce=` float e2x = exp(-2.0 * abs(x)); return sign(x) * (1.0 - e2x) / (1.0 + e2x); -`,gde=ht({opSnippet:mde}),yde={kernelName:di,backendName:"webgl",kernelFunc:gde},Ade=class{constructor(e,t){this.variableNames=["A"];let n=new Array(e.length);for(let a=0;a5)throw Error(`Tile for rank ${t} is not yet supported`);if(t===1)return`imod(resRC, ${e[0]})`;let n=["resRC.x","resRC.y","resRC.z","resRC.w","resRC.u"],s=[];for(let r=0;r5){let l=n.readSync(r.dataId),u=r.dtype==="string"?l.map(d=>v.decodeString(d)):l,c=Ue(r.shape,r.dtype,u),p=Mne(c,a);return n.makeTensorInfo(p.shape,p.dtype,p.values)}let o=new Ade(r.shape,a);return n.runWebGLProgram(o,[r],r.dtype)}var bde={kernelName:Pa,backendName:"webgl",kernelFunc:dC},vde=class{constructor(e){this.variableNames=["x","indices"],this.customUniforms=[{name:"n",type:"int"},{name:"firstPass",type:"int"},{name:"negativeInf",type:"float"},{name:"dir",type:"int"},{name:"inc",type:"int"}],this.outputShape=e,this.userCode=` + `}};function ede(e){let t=e.length;if(t>5)throw Error(`Tile for rank ${t} is not yet supported`);if(t===1)return`imod(resRC, ${e[0]})`;let n=["resRC.x","resRC.y","resRC.z","resRC.w","resRC.u"],s=[];for(let r=0;r5){let l=n.readSync(r.dataId),u=r.dtype==="string"?l.map(d=>v.decodeString(d)):l,c=ze(r.shape,r.dtype,u),p=Ane(c,a);return n.makeTensorInfo(p.shape,p.dtype,p.values)}let o=new Qce(r.shape,a);return n.runWebGLProgram(o,[r],r.dtype)}var tde={kernelName:Ea,backendName:"webgl",kernelFunc:K9},nde=class{constructor(e){this.variableNames=["x","indices"],this.customUniforms=[{name:"n",type:"int"},{name:"firstPass",type:"int"},{name:"negativeInf",type:"float"},{name:"dir",type:"int"},{name:"inc",type:"int"}],this.outputShape=e,this.userCode=` void main() { ivec2 coords = getOutputCoords(); int batch = coords[0]; @@ -4630,7 +4630,7 @@ return a / b;`,Ble=` setOutput(float(i1)); } } - `}},wde=class{constructor(e){this.variableNames=["x","indices"],this.customUniforms=[{name:"n",type:"int"},{name:"firstPass",type:"int"},{name:"k",type:"int"}],this.outputShape=e,this.userCode=` + `}},sde=class{constructor(e){this.variableNames=["x","indices"],this.customUniforms=[{name:"n",type:"int"},{name:"firstPass",type:"int"},{name:"k",type:"int"}],this.outputShape=e,this.userCode=` void main() { // Takes max of indices (0, k), (1, k + 1), (2, k + 2) ... ivec2 coords = getOutputCoords(); @@ -4664,7 +4664,7 @@ return a / b;`,Ble=` setOutput(x0 >= x1 ? float(i0) : float(i1)); } - `}};function Gi(e,t){t!==null&&e.disposeIntermediateTensorInfo(t)}function s6(e){let t=1;for(;tl){let $=n.readSync(r.dataId),[R,P]=zne($,u,r.dtype,a,o);return[n.makeTensorInfo(R.shape,R.dtype,R.values),n.makeTensorInfo(P.shape,P.dtype,P.values)]}if(a===0)return u[u.length-1]=0,[n.makeTensorInfo(u,r.dtype,[]),n.makeTensorInfo(u,"int32",[])];if(c===1)return[r,Xh({attrs:{shape:u,dtype:"int32",value:0},backend:n})];let p=n.texData.get(r.dataId),d=p!==null&&p.isPacked,h=d?n.unpackTensor(r):r,m=v.sizeFromShape(u)/c,g=we({inputs:{x:h},attrs:{shape:[m,c]},backend:n});d&&Gi(n,h);let y=s6(a),x=s6(c),A=null,b=()=>A===null?[g,g]:[g,A],w=($,R,P)=>{let S=b(),M=new vde(P),U=[[c],[A===null?1:0],[Number.NEGATIVE_INFINITY],[$],[R]],K=A;A=n.runWebGLProgram(M,S,"int32",U),Gi(n,K)};for(let $=1;$=1;P/=2)w(R,P,[m,x])}for(let $=x;$>y;$/=2){let R=b(),P=new wde([m,$/2]),M=[[c],[A===null?1:0],[y]],L=A;A=n.runWebGLProgram(P,R,"int32",M),Gi(n,L);let U=y/2,K=U*2;for(let q=U;q>=1;q/=2)w(K,q,A.shape)}let k=A;A=bd({inputs:{x:A},backend:n,attrs:{begin:0,size:[m,a]}}),Gi(n,k);let C=nC({inputs:{x:g,indices:A},backend:n,attrs:{axis:1,batchDims:1}});Gi(n,g);let E=u.slice(0,-1);E.push(a),k=A,A=we({inputs:{x:A},attrs:{shape:E},backend:n}),Gi(n,k);let _=C;return C=we({inputs:{x:C},attrs:{shape:E},backend:n}),Gi(n,_),[C,A]}var Sde={kernelName:su,backendName:"webgl",kernelFunc:kde},Ide=class{constructor(e,t,n,s,r,a){this.variableNames=["Image","Transforms"],this.outputShape=a;let o=n==="nearest"?1:2,i;switch(s){case"constant":i=1;break;case"reflect":i=2;break;case"wrap":i=3;break;case"nearest":i=4;break;default:i=1;break}this.userCode=` + `}};function Oi(e,t){t!==null&&e.disposeIntermediateTensorInfo(t)}function O7(e){let t=1;for(;tl){let D=n.readSync(r.dataId),[E,$]=xne(D,u,r.dtype,a,o);return[n.makeTensorInfo(E.shape,E.dtype,E.values),n.makeTensorInfo($.shape,$.dtype,$.values)]}if(a===0)return u[u.length-1]=0,[n.makeTensorInfo(u,r.dtype,[]),n.makeTensorInfo(u,"int32",[])];if(c===1)return[r,$h({attrs:{shape:u,dtype:"int32",value:0},backend:n})];let p=n.texData.get(r.dataId),d=p!==null&&p.isPacked,h=d?n.unpackTensor(r):r,m=v.sizeFromShape(u)/c,g=be({inputs:{x:h},attrs:{shape:[m,c]},backend:n});d&&Oi(n,h);let y=O7(a),x=O7(c),A=null,b=()=>A===null?[g,g]:[g,A],w=(D,E,$)=>{let S=b(),F=new nde($),V=[[c],[A===null?1:0],[Number.NEGATIVE_INFINITY],[D],[E]],j=A;A=n.runWebGLProgram(F,S,"int32",V),Oi(n,j)};for(let D=1;D=1;$/=2)w(E,$,[m,x])}for(let D=x;D>y;D/=2){let E=b(),$=new sde([m,D/2]),F=[[c],[A===null?1:0],[y]],z=A;A=n.runWebGLProgram($,E,"int32",F),Oi(n,z);let V=y/2,j=V*2;for(let G=V;G>=1;G/=2)w(j,G,A.shape)}let k=A;A=ld({inputs:{x:A},backend:n,attrs:{begin:0,size:[m,a]}}),Oi(n,k);let C=B9({inputs:{x:g,indices:A},backend:n,attrs:{axis:1,batchDims:1}});Oi(n,g);let N=u.slice(0,-1);N.push(a),k=A,A=be({inputs:{x:A},attrs:{shape:N},backend:n}),Oi(n,k);let R=C;return C=be({inputs:{x:C},attrs:{shape:N},backend:n}),Oi(n,R),[C,A]}var ade={kernelName:Kl,backendName:"webgl",kernelFunc:rde},ode=class{constructor(e,t,n,s,r,a){this.variableNames=["Image","Transforms"],this.outputShape=a;let o=n==="nearest"?1:2,i;switch(s){case"constant":i=1;break;case"reflect":i=2;break;case"wrap":i=3;break;case"nearest":i=4;break;default:i=1;break}this.userCode=` float mapCoord(float outCoord, float len) { float inCoord = outCoord; if(${i} == 2) { @@ -4776,7 +4776,7 @@ return a / b;`,Ble=` } setOutput(outputValue); } - `}};function Cde(e){let{inputs:t,backend:n,attrs:s}=e,{image:r,transforms:a}=t,{interpolation:o,fillMode:i,fillValue:l,outputShape:u}=s,[c,p,d,h]=r.shape,[f,m]=u!=null?u:[p,d],g=[c,f,m,h],y=new Ide(p,d,o,i,l,g);return n.runWebGLProgram(y,[r,a],"float32")}var Tde={kernelName:ru,backendName:"webgl",kernelFunc:Cde};function Nde(e){let{inputs:t,attrs:n,backend:s}=e,{axis:r}=n,{x:a}=t;hd(a,"unique"),console.warn("WARNING: ","UI might be locked temporarily as data is being downloaded");let o=s.readSync(a.dataId),{outputValues:i,outputShape:l,indices:u}=Lne(o,r,a.shape,a.dtype);return[s.makeTensorInfo(l,a.dtype,i),s.makeTensorInfo([u.length],"int32",u)]}var Ede={kernelName:C0,backendName:"webgl",kernelFunc:Nde};function Rde(e){let{inputs:t,backend:n,attrs:s}=e,{value:r}=t,{axis:a}=s;a<0&&(a+=r.shape.length);let o=r,i=o.shape.length,l=r.shape[a],u=new Array(i-1),c=0;for(let m=0;mn.disposeIntermediateTensorInfo(m)),f}var _de={kernelName:au,backendName:"webgl",kernelFunc:Rde},Dde=class{constructor(e,t){this.variableNames=["x","segmentIds"];let n=e.windowSize,s=e.batchSize,r=e.inSize,a=e.numSegments,o=a*Math.ceil(r/n);this.outputShape=[s,o];let i="0.0",l="sumValue",u=Math.floor(n/4)*4,c=n%4,p=` + `}};function ide(e){let{inputs:t,backend:n,attrs:s}=e,{image:r,transforms:a}=t,{interpolation:o,fillMode:i,fillValue:l,outputShape:u}=s,[c,p,d,h]=r.shape,[f,m]=u!=null?u:[p,d],g=[c,f,m,h],y=new ode(p,d,o,i,l,g);return n.runWebGLProgram(y,[r,a],"float32")}var lde={kernelName:Zl,backendName:"webgl",kernelFunc:ide};function ude(e){let{inputs:t,attrs:n,backend:s}=e,{axis:r}=n,{x:a}=t;td(a,"unique"),console.warn("WARNING: ","UI might be locked temporarily as data is being downloaded");let o=s.readSync(a.dataId),{outputValues:i,outputShape:l,indices:u}=bne(o,r,a.shape,a.dtype);return[s.makeTensorInfo(l,a.dtype,i),s.makeTensorInfo([u.length],"int32",u)]}var cde={kernelName:s0,backendName:"webgl",kernelFunc:ude};function dde(e){let{inputs:t,backend:n,attrs:s}=e,{value:r}=t,{axis:a}=s;a<0&&(a+=r.shape.length);let o=r,i=o.shape.length,l=r.shape[a],u=new Array(i-1),c=0;for(let m=0;mn.disposeIntermediateTensorInfo(m)),f}var pde={kernelName:Yl,backendName:"webgl",kernelFunc:dde},hde=class{constructor(e,t){this.variableNames=["x","segmentIds"];let n=e.windowSize,s=e.batchSize,r=e.inSize,a=e.numSegments,o=a*Math.ceil(r/n);this.outputShape=[s,o];let i="0.0",l="sumValue",u=Math.floor(n/4)*4,c=n%4,p=` sumValue += dot(values, segFilter); `,d="";r%n>0&&(d=` if (inIdx < 0 || inIdx >= ${r}) { @@ -4882,10 +4882,10 @@ return a / b;`,Ble=` } setOutput(${l}); } - `}};function $de(e){let{inputs:t,backend:n,attrs:s}=e,{x:r,segmentIds:a}=t,{numSegments:o}=s,i=r.shape.length,l=[],u=0,c=T.getAxesPermutation([u],i),p=r;c!=null&&(p=cs({inputs:{x:r},backend:n,attrs:{perm:c}}),l.push(p),u=T.getInnerMostAxes(1,i)[0]);let d=T.segment_util.computeOutShape(p.shape,u,o),h=v.sizeFromShape([p.shape[u]]),f=we({inputs:{x:p},backend:n,attrs:{shape:[-1,h]}});l.push(f);let m=ch(r.dtype),g=(b,w,k,C,E)=>{let _=b.shape[0],$=b.shape[1],R=T.segment_util.segOpComputeOptimalWindowSize($,E),P={windowSize:R,inSize:$,batchSize:_,numSegments:E},S=new Dde(P,w),M=n.compileAndRun(S,[b,k],C);if(l.push(M),M.shape[1]===E)return M;let L=uC({backend:n,attrs:{start:0,stop:E,step:1,dtype:"float32"}}),U=dC({inputs:{x:L},backend:n,attrs:{reps:[$/R]}});return l.push(L),l.push(U),g(M,w,U,C,E)},y=g(f,"unsortedSegmentSum",a,m,o),x=we({inputs:{x:y},backend:n,attrs:{shape:d}}),A=x;if(c!=null){l.push(x);let b=T.getUndoAxesPermutation(c);A=cs({inputs:{x:A},backend:n,attrs:{perm:b}})}return l.forEach(b=>n.disposeIntermediateTensorInfo(b)),A}var Pde={kernelName:ih,backendName:"webgl",kernelFunc:$de},Fde=[Pse,Ose,Lse,Vse,Gse,qse,Kse,Yse,tre,sre,ore,ure,pre,gre,xre,vre,kre,Tre,Ere,_re,Fre,Vre,Gre,jre,Jre,eae,rae,mse,iae,pae,gae,wae,Sae,Cae,Nae,Rae,$ae,Oae,Lae,Wae,Uae,Hae,Xae,Zae,eoe,noe,aoe,loe,coe,foe,Aoe,woe,Ioe,Noe,Eoe,_oe,$oe,Foe,Moe,Loe,Uoe,joe,Koe,Yoe,eie,sie,iie,die,fse,hie,cae,gie,xie,wie,yse,Cie,Rie,Die,Oie,Lie,Uie,jie,Zie,ele,sle,ale,ule,dle,hle,yle,xle,vle,kle,Ile,Ele,$le,Mle,Hle,wse,Kle,Jle,tue,rue,Xre,iue,uue,due,fue,Aue,xse,bue,wue,kue,Kre,Wle,Cue,Rue,Pue,Sse,zue,Wue,Hue,Xue,Jue,ece,sce,oce,lce,dce,fce,yce,vce,Sce,Tce,Rce,Bre,Ule,$ce,Fce,Mce,Lce,Wce,Uce,Hce,qce,Kce,Jce,ede,nde,ade,ide,ude,dde,Vle,_se,fde,yde,bde,Sde,Tde,Dse,Ede,_de,Pde,lue];for(let e of Fde)rr(e);var Kt;(function(e){e[e.float32=0]="float32",e[e.int32=1]="int32",e[e.bool=2]="bool",e[e.string=3]="string",e[e.complex64=4]="complex64"})(Kt||(Kt={}));var Wp;(function(e){e[e.linear=0]="linear",e[e.relu=1]="relu",e[e.relu6=2]="relu6",e[e.prelu=3]="prelu",e[e.leakyrelu=4]="leakyrelu",e[e.sigmoid=5]="sigmoid",e[e.elu=6]="elu"})(Wp||(Wp={}));var pC;function Ode(e){pC=e.wasm.cwrap(ao,null,["number","array","number","number","array","number","number","number","number","number","number","number","number"])}function Mde(e){let{inputs:t,backend:n,attrs:s}=e,{a:r,b:a,bias:o,preluActivationWeights:i}=t;if(r.dtype!=="float32"||a.dtype!=="float32")throw new Error("_FusedMatMul for non non-float32 tensors not yet supported.");let{transposeA:l,transposeB:u,activation:c,leakyreluAlpha:p}=s,d=n.dataIdMap.get(r.dataId).id,h=n.dataIdMap.get(a.dataId).id,f=0;if(o!=null){let E=n.dataIdMap.get(o.dataId);if(E.shape.length!==1)throw new Error(`_FusedMatMul only supports rank-1 bias but got rank ${E.shape.length}.`);f=E.id}let m=i==null?0:n.dataIdMap.get(i.dataId).id,g=Wp[c];if(g==null)throw new Error(`${c} activation not yet supported for FusedConv2D in the wasm backend.`);let y=l?r.shape[2]:r.shape[1],x=u?a.shape[1]:a.shape[2],A=uu.assertAndGetBroadcastShape(r.shape.slice(0,-2),a.shape.slice(0,-2)),b=n.makeOutput([...A,y,x],r.dtype),w=n.dataIdMap.get(b.dataId).id,k=new Uint8Array(new Int32Array(r.shape).buffer),C=new Uint8Array(new Int32Array(a.shape).buffer);return pC(d,k,r.shape.length,h,C,a.shape.length,l,u,g,f,m,p||0,w),b}var zde={kernelName:ao,backendName:"wasm",setupFunc:Ode,kernelFunc:Mde};function _n(e,t){let n;function s(a){n=a.wasm.cwrap(e,null,["number","number","number"])}function r(a){let{backend:o,inputs:{x:i}}=a,l=o.dataIdMap.get(i.dataId).id,u=o.makeOutput(i.shape,t||i.dtype),c=o.dataIdMap.get(u.dataId).id;return v.sizeFromShape(u.shape)===0||n(l,Kt[i.dtype],c),u}return{kernelName:e,backendName:"wasm",setupFunc:s,kernelFunc:r}}var Lde=_n(xl);function Wn(e,t,n){let s;function r(o){s=o.wasm.cwrap(e,null,["number","array","number","number","array","number","number","number"])}function a(o){let{backend:i,inputs:l}=o,{a:u,b:c}=l,p=i.dataIdMap.get(u.dataId).id,d=i.dataIdMap.get(c.dataId).id,h=n!=null?n:u.dtype,f=T.assertAndGetBroadcastShape(u.shape,c.shape),m=i.makeOutput(f,h);if(v.sizeFromShape(f)===0)return m;let g=new Uint8Array(new Int32Array(u.shape).buffer),y=new Uint8Array(new Int32Array(c.shape).buffer),x=i.dataIdMap.get(m.dataId).id;return(()=>s(p,g,u.shape.length,d,y,c.shape.length,Kt[u.dtype],x))(),m}return{kernelName:e,backendName:"wasm",setupFunc:r,kernelFunc:a}}var Bde=!0,Wde=Wn(Da,Bde),hC;function Vde(e){hC=e.wasm.cwrap(xo,null,["array","number","number","number"])}function Ude(e){let{inputs:t,backend:n}=e,s=n.makeOutput(t[0].shape,t[0].dtype);if(v.sizeFromShape(s.shape)===0)return s;let r=t.map(i=>n.dataIdMap.get(i.dataId).id),a=new Uint8Array(new Int32Array(r).buffer),o=n.dataIdMap.get(s.dataId).id;return hC(a,r.length,Kt[s.dtype],o),s}var Gde={kernelName:xo,backendName:"wasm",setupFunc:Vde,kernelFunc:Ude};function z2(e){let{inputs:{x:t},backend:n}=e,s=n.makeOutput(t.shape,t.dtype),r=n.typedArrayFromHeap(t);return n.typedArrayFromHeap(s).set(r),s}var Hde={kernelName:zo,backendName:"wasm",kernelFunc:z2},fC;function jde(e){fC=e.wasm.cwrap(na,null,["number","array","number","number","number","array","number"])}function go(e){let{inputs:t,backend:n,attrs:s}=e,[r,a]=Xde(t.x.shape,s.perm),o=!0;for(let f=0;f=r&&(a===-1||s[a]>s[o])&&(a=o);s[a]=r}return[n,s]}var Kde={kernelName:na,backendName:"wasm",kernelFunc:go,setupFunc:jde};function bi(e,t,n){let s=e.shape,r=e.shape.length,a=v.parseAxisParam(t,s),o=a,i=T.getAxesPermutation(o,r),l=null,u=!1;if(i!=null){let c=new Array(r);for(let h=0;h`new shape: ${o}, old shape: ${s.shape}. New shape and old shape must have the same number of elements.`),e.backend.incRef(s.dataId),{dataId:s.dataId,shape:o,dtype:s.dtype}}var lpe={kernelName:jl,backendName:"wasm",kernelFunc:vs},xC;function upe(e){xC=e.wasm.cwrap(wo,null,["number","array","number","number","array","number","number","number","number"])}function cpe(e){let{inputs:t,backend:n,attrs:s}=e,{a:r,b:a}=t,{transposeA:o,transposeB:i}=s;if(r.dtype!=="float32"||a.dtype!=="float32")throw new Error("BatchMatMul for non non-float32 tensors not yet supported.");let l=r.shape.length,u=a.shape.length,c=o?r.shape[l-2]:r.shape[l-1],p=i?a.shape[u-1]:a.shape[u-2],d=o?r.shape[l-1]:r.shape[l-2],h=i?a.shape[u-2]:a.shape[u-1],f=r.shape.slice(0,-2),m=a.shape.slice(0,-2),g=v.sizeFromShape(f),y=v.sizeFromShape(m),A=uu.assertAndGetBroadcastShape(r.shape.slice(0,-2),a.shape.slice(0,-2)).concat([d,h]);v.assert(c===p,()=>`Error in matMul: inner shapes (${c}) and (${p}) of Tensors with shapes ${r.shape} and ${a.shape} and transposeA=${o} and transposeB=${i} must match.`);let b=o?[g,c,d]:[g,d,c],w=i?[y,h,p]:[y,p,h],k=vs({inputs:{x:r},backend:n,attrs:{shape:b}}),C=vs({inputs:{x:a},backend:n,attrs:{shape:w}}),E=n.dataIdMap.get(k.dataId).id,_=n.dataIdMap.get(C.dataId).id,$=o?k.shape[2]:k.shape[1],R=i?C.shape[1]:C.shape[2],P=Math.max(g,y),S=n.makeOutput([P,$,R],k.dtype),M=n.dataIdMap.get(S.dataId).id,L=new Uint8Array(new Int32Array(k.shape).buffer),U=new Uint8Array(new Int32Array(C.shape).buffer);return xC(E,L,k.shape.length,_,U,C.shape.length,o,i,M),n.disposeData(k.dataId),n.disposeData(C.dataId),S.shape=A,S}var dpe={kernelName:wo,backendName:"wasm",setupFunc:upe,kernelFunc:cpe};function yl(e){let{inputs:{x:t},attrs:{begin:n,size:s},backend:r}=e,[a,o]=jt.parseSliceParams(t,n,s),i=jt.isSliceContinous(t.shape,a,o),l=r.readSync(t.dataId),u=r.makeOutput(o,t.dtype),c=v.computeStrides(t.shape),p=r.dataIdMap.get(u.dataId);if(i){let f=jt.computeFlatOffset(a,c);return t.dtype==="string"?p.stringBytes=l.slice(f,f+v.sizeFromShape(o)):r.typedArrayFromHeap(u).set(l.subarray(f,f+v.sizeFromShape(o))),u}if(t.dtype==="string"){let f=Um(l,a,o,t.shape,t.dtype);return p.stringBytes=f,u}let d=r.typedArrayFromHeap(u),h=t.shape.length;if(h===2)ppe(l,c[0],d,a,o);else if(h===3)hpe(l,c[0],c[1],d,a,o);else if(h===4)fpe(l,c[0],c[1],c[2],d,a,o);else{let f=Um(l,a,o,t.shape,t.dtype);d.set(f)}return u}function ppe(e,t,n,s,r){let a=0,o=s[0],i=s[1],l=o+r[0];for(let u=o;uy*x),l=T.getReshaped(r.shape,a,i),u=T.getPermuted(l.length,a.length),c=T.getReshapedPermuted(r.shape,a,i),p=T.getSliceBeginCoords(o,a.length),d=T.getSliceSize(c,o,a.length),h=vs({inputs:{x:r},backend:n,attrs:{shape:l}}),f=go({inputs:{x:h},backend:n,attrs:{perm:u}}),m=vs({inputs:{x:f},backend:n,attrs:{shape:c}}),g=yl({inputs:{x:m},backend:n,attrs:{begin:p,size:d}});return n.disposeData(h.dataId),n.disposeData(f.dataId),n.disposeData(h.dataId),g}var ype={kernelName:vl,backendName:"wasm",kernelFunc:gpe};function vd(e){let{inputs:{x:t},attrs:{dtype:n},backend:s}=e,r=s.makeOutput(t.shape,n),a=s.typedArrayFromHeap(t);return s.typedArrayFromHeap(r).set(a),r}var Ape={kernelName:ko,backendName:"wasm",kernelFunc:vd},xpe=_n(So),bC;function bpe(e){bC=e.wasm.cwrap($a,null,["number","number","number","number"])}function vpe(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{clipValueMin:a,clipValueMax:o}=s,i=n.dataIdMap.get(r.dataId).id,l=n.makeOutput(r.shape,r.dtype),u=n.dataIdMap.get(l.dataId).id;return bC(i,a,o,u),l}var wpe={kernelName:$a,backendName:"wasm",setupFunc:bpe,kernelFunc:vpe};function vC(e){let{inputs:t,backend:n}=e,s=v.parseAxisParam(e.attrs.axis,t[0].shape)[0],r=T.computeOutShape(t.map(h=>h.shape),s),a=t.filter(h=>v.sizeFromShape(h.shape)>0);if(a.length===1)return z2({inputs:{x:a[0]},backend:n});let o=n.makeOutput(r,t[0].dtype);if(v.sizeFromShape(r)===0)return o;let i=a.map(h=>h.shape);if(T.assertParamsConsistent(i,s),a[0].dtype==="string"){let h=a.map(A=>{let b=v.sizeFromShape(A.shape.slice(s));return vs({inputs:{x:A},backend:n,attrs:{shape:[-1,b]}})}),f=h.map(A=>({vals:n.readSync(A.dataId),shape:A.shape}));r=T.computeOutShape(h.map(A=>A.shape),1);let m=h[0].shape[0]===1,g=qx(f,r,t[0].dtype,m),y=T.computeOutShape(a.map(A=>A.shape),s);o.shape=y;let x=n.dataIdMap.get(o.dataId);return x.stringBytes=T.fromStringArrayToUint8(g),h.forEach(A=>n.disposeData(A.dataId)),o}let l=v.sizeFromShape(a[0].shape.slice(0,s)),u=0,c=a.map(h=>{let f=v.sizeFromShape(h.shape.slice(s));return u+=f,f}),p=a.map(h=>n.typedArrayFromHeap(h)),d=n.typedArrayFromHeap(o);for(let h=0;h`cumprod does not support ${r.dtype} tensors in the WASM backend`);let u=T.getAxesPermutation([a],l),c=r;u!==null&&(c=go({inputs:{x:r},attrs:{perm:u},backend:n}));let p=T.getInnerMostAxes(1,l)[0];T.assertAxesAreInnerMostDims("cumprod",[p],l);let d=n.makeOutput(c.shape,c.dtype),h=c.shape[p],f=n.dataIdMap.get(c.dataId).id,m=n.dataIdMap.get(d.dataId).id;IC(f,o?1:0,i?1:0,h,m,Kt[r.dtype]);let g=d;if(u!==null){let y=T.getUndoAxesPermutation(u);g=go({inputs:{x:d},attrs:{perm:y},backend:n}),n.disposeData(c.dataId),n.disposeData(d.dataId)}return g}var Mpe={kernelName:kl,backendName:"wasm",setupFunc:Fpe,kernelFunc:Ope},CC;function zpe(e){CC=e.wasm.cwrap(Eo,null,["number","number","number","number","number","number"])}function Lpe(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{axis:a,exclusive:o,reverse:i}=s,l=r.shape.length;v.assert(r.dtype==="float32"||r.dtype==="int32",()=>`cumsum does not support ${r.dtype} tensors in the WASM backend`);let u=T.getAxesPermutation([a],l),c=r;u!==null&&(c=go({inputs:{x:r},attrs:{perm:u},backend:n}));let p=T.getInnerMostAxes(1,l)[0];T.assertAxesAreInnerMostDims("cumsum",[p],l);let d=n.makeOutput(c.shape,c.dtype),h=c.shape[p],f=n.dataIdMap.get(c.dataId).id,m=n.dataIdMap.get(d.dataId).id;CC(f,o?1:0,i?1:0,h,m,Kt[r.dtype]);let g=d;if(u!==null){let y=T.getUndoAxesPermutation(u);g=go({inputs:{x:d},attrs:{perm:y},backend:n}),n.disposeData(c.dataId),n.disposeData(d.dataId)}return g}var Bpe={kernelName:Eo,backendName:"wasm",setupFunc:zpe,kernelFunc:Lpe},TC;function Wpe(e){TC=e.wasm.cwrap(Il,null,["number","number","number","array","number","array","array","number","number"])}function Vpe(e){let{backend:t,inputs:n,attrs:s}=e,{x:r}=n,{blockSize:a,dataFormat:o}=s,i=r.shape[0],l=o==="NHWC"?r.shape[1]:r.shape[2],u=o==="NHWC"?r.shape[2]:r.shape[3],c=o==="NHWC"?r.shape[3]:r.shape[1],p=l*a,d=u*a,h=c/(a*a),f=o==="NHWC"?[i,p,d,h]:[i,h,p,d],m=t.makeOutput(f,"float32"),y=t.dataIdMap.get(r.dataId).id,x=new Uint8Array(new Int32Array(v.computeStrides(r.shape)).buffer),A=new Uint8Array(new Int32Array(f).buffer),b=new Uint8Array(new Int32Array(v.computeStrides(f)).buffer),w=t.dataIdMap.get(m.dataId).id;return TC(y,a,o==="NHWC"?1:0,x,r.shape.length-1,A,b,f.length,w),m}var Upe={kernelName:Il,backendName:"wasm",setupFunc:Wpe,kernelFunc:Vpe},NC;function Gpe(e){NC=e.wasm.cwrap(Ro,null,["number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number"])}function Hpe(e){let{inputs:t,attrs:n,backend:s}=e,{x:r,filter:a}=t,o=s.dataIdMap.get(r.dataId).id,i=s.dataIdMap.get(a.dataId).id,{strides:l,dilations:u,pad:c,dimRoundingMode:p}=n,d=u==null?[1,1]:u,h=T.computeConv2DInfo(r.shape,a.shape,l,d,c,p,!0),f=h.filterHeight,m=h.filterWidth,g=h.padInfo.top,y=h.padInfo.right,x=h.padInfo.bottom,A=h.padInfo.left,b=h.dilationHeight,w=h.dilationWidth,k=h.strideHeight,C=h.strideWidth,E=h.inChannels,_=h.outChannels,$=h.padInfo.type==="SAME"?1:0;if(h.dataFormat!=="channelsLast")throw new Error(`wasm backend DepthwiseConv2dNative does not support dataFormat:'${h.dataFormat}'. Please use 'channelsLast'.`);let R=s.makeOutput(h.outShape,"float32"),P=s.dataIdMap.get(R.dataId).id;return NC(o,r.shape[0],r.shape[1],r.shape[2],i,f,m,g,y,x,A,$,b,w,k,C,E,_,P),R}var jpe={kernelName:Ro,backendName:"wasm",setupFunc:Gpe,kernelFunc:Hpe},qpe=_n(Do),Xpe=!1,Kpe=Wn(Cl,Xpe,"bool"),Zpe=_n($o,"float32");function Ny(e){let{inputs:t,attrs:n,backend:s}=e,{input:r}=t,{dim:a}=n,o=r.shape.length,i=r.shape.slice(),l=a;return a<0&&(v.assert(-(o+1)<=a,()=>`Axis must be in the interval [${-(o+1)}, ${o}]`),l=o+a+1),i.splice(l,0,1),vs({inputs:{x:r},backend:s,attrs:{shape:i}})}var Ype={kernelName:Tl,backendName:"wasm",kernelFunc:Ny};function EC(e){let{attrs:{shape:t,value:n,dtype:s},backend:r}=e,a=r.makeOutput(t,s);return r.typedArrayFromHeap(a).fill(n),a}var Jpe={kernelName:zc,backendName:"wasm",kernelFunc:EC},RC;function Qpe(e){RC=e.wasm.cwrap(El,null,["number","number","number","number","number","number"])}function ehe(e){let{inputs:t,backend:n}=e,{image:s}=t,r=n.makeOutput(s.shape,s.dtype),a=n.dataIdMap.get(s.dataId).id,o=n.dataIdMap.get(r.dataId).id,[i,l,u,c]=s.shape;return RC(a,i,l,u,c,o),r}var the={kernelName:El,backendName:"wasm",kernelFunc:ehe,setupFunc:Qpe},nhe=_n(Po),she=!1,rhe=Wn(Fo,she),_C;function ahe(e){_C=e.wasm.cwrap(Oo,null,["number","number","number","number","number","number","number"])}function ohe(e){let{backend:t,inputs:n,attrs:s}=e,{varianceEpsilon:r}=s,{x:a,mean:o,variance:i,offset:l,scale:u}=n,c=t.dataIdMap.get(a.dataId).id,p=t.dataIdMap.get(o.dataId).id,d=t.dataIdMap.get(i.dataId).id,h=l!=null?t.dataIdMap.get(l.dataId).id:0,f=u!=null?t.dataIdMap.get(u.dataId).id:0,m=t.makeOutput(a.shape,a.dtype);if(v.sizeFromShape(a.shape)===0)return m;let g=t.dataIdMap.get(m.dataId).id;return _C(c,p,d,h,f,r,g),m}var ihe={kernelName:Oo,backendName:"wasm",setupFunc:ahe,kernelFunc:ohe},DC;function lhe(e){DC=e.wasm.cwrap(oo,null,["number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number"])}function uhe(e){let{inputs:t,attrs:n,backend:s}=e,{x:r,filter:a,bias:o,preluActivationWeights:i}=t,{strides:l,pad:u,dilations:c,dataFormat:p,dimRoundingMode:d,activation:h,leakyreluAlpha:f}=n,m=T.computeConv2DInfo(r.shape,a.shape,l,c,u,d),g=Wp[h];if(g==null)throw new Error(`${h} activation not yet supported for FusedConv2D in the wasm backend.`);let y=s.dataIdMap.get(r.dataId).id,x=s.dataIdMap.get(a.dataId).id,A=m.outChannels,b=0;if(o!=null){let ae=s.dataIdMap.get(o.dataId);if(ae.shape.length!==1)throw new Error(`FusedConv2D only supports rank-1 bias but got rank ${ae.shape.length}.`);if(ae.shape[0]!==A)throw new Error(`FusedConv2D bias shape (${ae.shape}) does not match the number of output channels (${A})`);b=ae.id}let w=m.filterHeight,k=m.filterWidth,C=m.padInfo.top,E=m.padInfo.right,_=m.padInfo.bottom,$=m.padInfo.left,R=m.dilationHeight,P=m.dilationWidth,S=m.strideHeight,M=m.strideWidth,L=m.inChannels,U=m.padInfo.type==="SAME"?1:0,K=m.batchSize,q=m.inHeight,Z=m.inWidth;if(p!=="NHWC")throw new Error(`wasm backend FusedConv2D does not support dataFormat:'${p}'. Please use 'NHWC'.`);let J=s.makeOutput(m.outShape,"float32"),te=s.dataIdMap.get(J.dataId).id,le=i==null?0:s.dataIdMap.get(i.dataId).id;return DC(y,K,q,Z,x,w,k,b,C,E,_,$,U,R,P,S,M,L,A,g,le,f||0,te),J}var che={kernelName:oo,backendName:"wasm",setupFunc:lhe,kernelFunc:uhe},$C;function dhe(e){$C=e.wasm.cwrap(io,null,["number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number"])}function phe(e){let{inputs:t,attrs:n,backend:s}=e,{x:r,filter:a,bias:o,preluActivationWeights:i}=t,{strides:l,pad:u,dilations:c,dataFormat:p,dimRoundingMode:d,activation:h,leakyreluAlpha:f}=n,m=T.computeConv2DInfo(r.shape,a.shape,l,c,u,d,!0),g=Wp[h];if(g==null)throw new Error(`${h} activation not yet supported for FusedDepthwiseConv2D in the wasm backend.`);let y=s.dataIdMap.get(r.dataId).id,x=s.dataIdMap.get(a.dataId).id,A=m.outChannels,b=0;if(o!=null){let ae=s.dataIdMap.get(o.dataId);if(ae.shape.length!==1)throw new Error(`FusedDepthwiseConv2D only supports rank-1 bias but got rank ${ae.shape.length}.`);if(ae.shape[0]!==A)throw new Error(`FusedDepthwiseConv2D bias shape (${ae.shape}) does not match the number of output channels (${A})`);b=ae.id}let w=m.filterHeight,k=m.filterWidth,C=m.padInfo.top,E=m.padInfo.right,_=m.padInfo.bottom,$=m.padInfo.left,R=m.dilationHeight,P=m.dilationWidth,S=m.strideHeight,M=m.strideWidth,L=m.inChannels,U=m.padInfo.type==="SAME"?1:0,K=m.batchSize,q=m.inHeight,Z=m.inWidth;if(p!=="NHWC")throw new Error(`wasm backend FusedDepthwiseConv2D does not support dataFormat:'${p}'. Please use 'NHWC'.`);let J=s.makeOutput(m.outShape,"float32"),te=s.dataIdMap.get(J.dataId).id,le=i==null?0:s.dataIdMap.get(i.dataId).id;return $C(y,K,q,Z,x,w,k,b,C,E,_,$,U,R,P,S,M,L,A,g,le,f||0,te),J}var hhe={kernelName:io,backendName:"wasm",setupFunc:dhe,kernelFunc:phe},PC;function fhe(e){PC=e.wasm.cwrap(_l,null,["number","number","number","number","number","number","array","number"])}function mhe(e){let{backend:t,inputs:n}=e,{params:s,indices:r}=n,[a,o,i,l]=nA.prepareAndValidate(s,r),u=t.makeOutput(a,s.dtype);if(o===0)return u;let c=r.shape,p=c[c.length-1],h=t.dataIdMap.get(s.dataId).id,m=t.dataIdMap.get(r.dataId).id,g=new Uint8Array(new Int32Array(l).buffer),y=t.dataIdMap.get(u.dataId).id;return PC(h,Kt[s.dtype],m,o,p,i,g,y),u}var ghe={kernelName:_l,backendName:"wasm",setupFunc:fhe,kernelFunc:mhe},FC;function yhe(e){FC=e.wasm.cwrap("Gather",null,["number","number","array","number","number","number","array","number"])}function Ahe(e){let{backend:t,inputs:n,attrs:s}=e,{x:r,indices:a}=n,{axis:o,batchDims:i}=s,l=v.parseAxisParam(o,r.shape)[0],u=t.readSync(a.dataId),c=r.shape[l];for(let _=0;_=0,()=>`GatherV2: the index value ${$} is not in [0, ${c-1}]`)}let p=T.segment_util.collectGatherOpShapeInfo(r,a,l,i),d=vs({inputs:{x:r},attrs:{shape:[p.batchSize,p.outerSize,p.dimSize,p.sliceSize]},backend:t}),h=v.sizeFromShape(a.shape),f=vs({inputs:{x:a},attrs:{shape:[p.batchSize,h/p.batchSize]},backend:t}),m=[p.batchSize,p.outerSize,h/p.batchSize,p.sliceSize],g=t.makeOutput(m,r.dtype);if(v.sizeFromShape(r.shape)===0)return g;let y=d.shape.length-1,A=t.dataIdMap.get(d.dataId).id,w=t.dataIdMap.get(f.dataId).id,k=t.dataIdMap.get(g.dataId).id,C=new Uint8Array(new Int32Array(v.computeStrides(d.shape)).buffer),E=new Uint8Array(new Int32Array(v.computeStrides(m)).buffer);return FC(A,Kt[r.dtype],C,y,w,p.batchSize,E,k),t.disposeData(d.dataId),t.disposeData(f.dataId),g.shape=p.outputShape,g}var xhe={kernelName:Rl,backendName:"wasm",setupFunc:yhe,kernelFunc:Ahe},bhe=!1,vhe=Wn(Dl,bhe,"bool"),whe=!1,khe=Wn(Mo,whe,"bool"),OC;function She(e){OC=e.wasm.cwrap(Lo,null,["number","number","number","number"])}function Ihe(e){let{inputs:{x:t},attrs:{alpha:n},backend:s}=e,r=s.dataIdMap.get(t.dataId).id,a=s.makeOutput(t.shape,"float32");if(v.sizeFromShape(t.shape)!==0){let o=s.dataIdMap.get(a.dataId).id;OC(r,Kt[t.dtype],n,o)}return a}var Che={kernelName:Lo,backendName:"wasm",setupFunc:She,kernelFunc:Ihe},The=!1,Nhe=Wn(Pl,The,"bool"),Ehe=!1,Rhe=Wn(Fl,Ehe,"bool"),_he=_n(Bo),Dhe=!1,$he=Wn(Ol,Dhe,"bool"),Phe=_n(Ml),Fhe=!1,Ohe=Wn(Vc,Fhe,"bool"),Mhe=!1,zhe=Wn(F6,Mhe,"bool"),MC;function Lhe(e){MC=e.wasm.cwrap(Wo,null,["number","number","number","number"])}function Bhe(e){let{backend:t,inputs:n,attrs:s}=e,{reductionIndices:r,keepDims:a}=s,{x:o}=n,l=t.dataIdMap.get(o.dataId).id,u=o,{transposed:c,axes:p,originalAxes:d,inputWasTransposed:h}=bi(o,r,t);if(h){let A=t.dataIdMap.get(c.dataId).id;u=c,l=A}let f=u.shape.length;T.assertAxesAreInnerMostDims("max",p,f);let[m,g]=T.computeOutAndReduceShapes(u.shape,p),y=v.sizeFromShape(g),x=t.makeOutput(m,o.dtype);if(v.sizeFromShape(u.shape)!==0){let A=t.dataIdMap.get(x.dataId).id;MC(l,Kt[o.dtype],y,A)}if(h&&t.disposeData(c.dataId),a){let A=T.expandShapeToKeepDim(x.shape,d);x.shape=A}return x}var Whe={kernelName:Wo,backendName:"wasm",setupFunc:Lhe,kernelFunc:Bhe},Vhe=!1,Uhe=Wn(Vo,Vhe),zC;function Ghe(e){zC=e.wasm.cwrap(Uo,null,["number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number"])}function Hhe(e){let{inputs:t,attrs:n,backend:s}=e,r=t.x,a=s.dataIdMap.get(r.dataId).id;v.assert(r.dtype==="float32",()=>`Error in MaxPool: only float32 input is supported. Got ${r.dtype}.`);let{filterSize:o,strides:i,pad:l,dimRoundingMode:u}=n,c=T.computePool2DInfo(r.shape,o,i,1,l,u),p=c.filterHeight,d=c.filterWidth,h=c.padInfo.top,f=c.padInfo.right,m=c.padInfo.bottom,g=c.padInfo.left,y=c.dilationHeight,x=c.dilationWidth,A=c.strideHeight,b=c.strideWidth,w=c.inChannels,k=c.outChannels;if(c.dataFormat!=="channelsLast")throw new Error(`wasm backend does not support dataFormat:'${c.dataFormat}'. Please use 'channelsLast'.`);let C=s.makeOutput(c.outShape,"float32"),E=s.dataIdMap.get(C.dataId).id;return zC(a,r.shape[0],r.shape[1],r.shape[2],p,d,h,f,m,g,y,x,A,b,w,k,E),C}var jhe={kernelName:Uo,backendName:"wasm",setupFunc:Ghe,kernelFunc:Hhe},LC;function qhe(e){LC=e.wasm.cwrap(Go,null,["number, number, number"])}function Xhe(e){let{backend:t,inputs:n,attrs:s}=e,{axis:r,keepDims:a}=s,{x:o}=n,i=t.dataIdMap.get(o.dataId).id,l=i,u=o,{transposed:c,axes:p,originalAxes:d,inputWasTransposed:h}=bi(o,r,t),f=p;if(h){let b=t.dataIdMap.get(c.dataId).id;b!==i&&(u=c,l=b,f=T.getInnerMostAxes(f.length,u.shape.length))}T.assertAxesAreInnerMostDims("mean",f,u.shape.length);let[m,g]=T.computeOutAndReduceShapes(u.shape,f),y=v.sizeFromShape(g),x=u;u.dtype!=="float32"&&(x=vd({backend:t,inputs:{x:u},attrs:{dtype:"float32"}}),l=t.dataIdMap.get(x.dataId).id);let A=t.makeOutput(m,"float32");if(v.sizeFromShape(u.shape)!==0){let b=t.dataIdMap.get(A.dataId).id;LC(l,y,b)}if(h&&t.disposeData(c.dataId),a){let b=T.expandShapeToKeepDim(A.shape,d);A.shape=b}return u.dtype!=="float32"&&t.disposeData(x.dataId),A}var Khe={kernelName:Go,backendName:"wasm",setupFunc:qhe,kernelFunc:Xhe},BC;function Zhe(e){BC=e.wasm.cwrap(Ho,null,["number","number","number","number"])}function Yhe(e){let{backend:t,inputs:n,attrs:s}=e,{axis:r,keepDims:a}=s,{x:o}=n,i=t.dataIdMap.get(o.dataId).id,l=i,u=o,{transposed:c,axes:p,originalAxes:d,inputWasTransposed:h}=bi(o,r,t);if(h){let A=t.dataIdMap.get(c.dataId).id;A!==i&&(u=c,l=A)}let f=u.shape.length;T.assertAxesAreInnerMostDims("min",p,f);let[m,g]=T.computeOutAndReduceShapes(u.shape,p),y=v.sizeFromShape(g),x=t.makeOutput(m,u.dtype);if(v.sizeFromShape(u.shape)!==0){let A=t.dataIdMap.get(x.dataId).id;BC(l,Kt[o.dtype],y,A)}if(h&&t.disposeData(c.dataId),a){let A=T.expandShapeToKeepDim(x.shape,d);x.shape=A}return x}var Jhe={kernelName:Ho,backendName:"wasm",setupFunc:Zhe,kernelFunc:Yhe},Qhe=!1,efe=Wn(jo,Qhe),Ey;(function(e){e[e.reflect=0]="reflect",e[e.symmetric=1]="symmetric"})(Ey||(Ey={}));var WC;function tfe(e){WC=e.wasm.cwrap(qo,null,["number","array","number","number","array","array","number","number"])}function nfe(e){let{inputs:{x:t},backend:n,attrs:{paddings:s,mode:r}}=e,a=s.map((f,m)=>f[0]+t.shape[m]+f[1]),o=n.dataIdMap.get(t.dataId).id,i=n.makeOutput(a,t.dtype),l=n.dataIdMap.get(i.dataId).id,u=new Uint8Array(new Int32Array(t.shape).buffer),c=s.map(f=>f[0]),p=s.map(f=>f[1]),d=new Uint8Array(new Int32Array(c).buffer),h=new Uint8Array(new Int32Array(p).buffer);return WC(o,u,t.shape.length,Kt[t.dtype],d,h,Ey[r],l),i}var sfe={kernelName:qo,backendName:"wasm",kernelFunc:nfe,setupFunc:tfe},rfe=!0,afe=Wn(Xo,rfe),ofe=_n(zl);function Ab(e,t){let n=new Int32Array(e.wasm.HEAPU8.buffer,t,4),s=n[0],r=n[1],a=n[2],o=n[3];return e.wasm._free(t),{pSelectedIndices:s,selectedSize:r,pSelectedScores:a,pValidOutputs:o}}var VC;function ife(e){VC=e.wasm.cwrap(Bl,"number",["number","number","number","number","number"])}function lfe(e){let{backend:t,inputs:n,attrs:s}=e,{iouThreshold:r,maxOutputSize:a,scoreThreshold:o}=s,{boxes:i,scores:l}=n,u=t.dataIdMap.get(i.dataId).id,c=t.dataIdMap.get(l.dataId).id,p=VC(u,c,a,r,o),{pSelectedIndices:d,selectedSize:h,pSelectedScores:f,pValidOutputs:m}=Ab(t,p);return t.wasm._free(f),t.wasm._free(m),t.makeOutput([h],"int32",d)}var ufe={kernelName:Bl,backendName:"wasm",setupFunc:ife,kernelFunc:lfe},UC;function cfe(e){UC=e.wasm.cwrap(Gc,"number",["number","number","number","number","number","bool"])}function dfe(e){let{backend:t,inputs:n,attrs:s}=e,{iouThreshold:r,maxOutputSize:a,scoreThreshold:o,padToMaxOutputSize:i}=s,{boxes:l,scores:u}=n,c=t.dataIdMap.get(l.dataId).id,p=t.dataIdMap.get(u.dataId).id,d=UC(c,p,a,r,o,i),{pSelectedIndices:h,selectedSize:f,pSelectedScores:m,pValidOutputs:g}=Ab(t,d);t.wasm._free(m);let y=t.makeOutput([f],"int32",h),x=t.makeOutput([],"int32",g);return[y,x]}var pfe={kernelName:Gc,backendName:"wasm",setupFunc:cfe,kernelFunc:dfe},GC;function hfe(e){GC=e.wasm.cwrap(Wl,"number",["number","number","number","number","number","number"])}function ffe(e){let{backend:t,inputs:n,attrs:s}=e,{iouThreshold:r,maxOutputSize:a,scoreThreshold:o,softNmsSigma:i}=s,{boxes:l,scores:u}=n,c=t.dataIdMap.get(l.dataId).id,p=t.dataIdMap.get(u.dataId).id,d=GC(c,p,a,r,o,i),{pSelectedIndices:h,selectedSize:f,pSelectedScores:m,pValidOutputs:g}=Ab(t,d);t.wasm._free(g);let y=t.makeOutput([f],"int32",h),x=t.makeOutput([f],"float32",m);return[y,x]}var mfe={kernelName:Wl,backendName:"wasm",setupFunc:hfe,kernelFunc:ffe},gfe=!1,yfe=Wn(Ll,gfe,"bool"),HC;function Afe(e){HC=e.wasm.cwrap(Ul,null,["number","number","number","number","number"])}function xfe(e){let{inputs:t,backend:n,attrs:s}=e,{indices:r}=t,{dtype:a,depth:o,onValue:i,offValue:l}=s,u=n.makeOutput([...r.shape,o],a),c=n.dataIdMap.get(u.dataId).id,d=n.dataIdMap.get(r.dataId).id;return HC(d,o,i,l,c),u}var bfe={kernelName:Ul,backendName:"wasm",setupFunc:Afe,kernelFunc:xfe};function vfe(e){let{inputs:{x:t},backend:n}=e,s=n.makeOutput(t.shape,t.dtype);return n.typedArrayFromHeap(s).fill(1),s}var wfe={kernelName:Vl,backendName:"wasm",kernelFunc:vfe};function kfe(e){let{inputs:t,backend:n,attrs:s}=e,{axis:r}=s;if(t.length===1)return Ny({inputs:{input:t[0]},backend:n,attrs:{dim:r}});let a=t[0].shape,o=t[0].dtype;t.forEach(c=>{v.assertShapesMatch(a,c.shape,"All tensors passed to stack must have matching shapes"),v.assert(o===c.dtype,()=>"All tensors passed to stack must have matching dtypes")});let i=[],l=t.map(c=>{let p=Ny({inputs:{input:c},backend:n,attrs:{dim:r}});return i.push(p),p}),u=vC({inputs:l,backend:n,attrs:{axis:r}});return i.forEach(c=>n.disposeData(c.dataId)),u}var Sfe={kernelName:Gl,backendName:"wasm",kernelFunc:kfe},jC;function Ife(e){jC=e.wasm.cwrap(Ko,null,["number","array","number","number","array","array","number","number"])}function Cfe(e){let{inputs:{x:t},backend:n,attrs:{paddings:s,constantValue:r}}=e,a=s.map((m,g)=>m[0]+t.shape[g]+m[1]);if(v.sizeFromShape(t.shape)===0)return EC({backend:n,attrs:{shape:a,value:r,dtype:t.dtype}});let o=n.dataIdMap.get(t.dataId).id,i=n.makeOutput(a,t.dtype),u=n.dataIdMap.get(i.dataId).id,c=new Uint8Array(new Int32Array(t.shape).buffer),p=s.map(m=>m[0]),d=s.map(m=>m[1]),h=new Uint8Array(new Int32Array(p).buffer),f=new Uint8Array(new Int32Array(d).buffer);return jC(o,c,t.shape.length,Kt[t.dtype],h,f,r,u),i}var qC={kernelName:Ko,backendName:"wasm",kernelFunc:Cfe,setupFunc:Ife},Tfe=!1,Nfe=Wn(Zo,Tfe),XC;function Efe(e){XC=e.wasm.cwrap(Yo,null,["number","number","number"])}function Rfe(e){let{inputs:t,backend:n}=e,{x:s,alpha:r}=t,a=n.dataIdMap.get(s.dataId).id,o=n.dataIdMap.get(r.dataId).id,i=a,l=s,u=l;l.dtype!=="float32"&&(u=vd({backend:n,inputs:{x:s},attrs:{dtype:"float32"}}),i=n.dataIdMap.get(u.dataId).id);let c=n.makeOutput(s.shape,"float32"),p=n.dataIdMap.get(c.dataId).id;return XC(i,o,p),l.dtype!=="float32"&&n.disposeData(u.dataId),c}var _fe={kernelName:Yo,backendName:"wasm",setupFunc:Efe,kernelFunc:Rfe},KC;function Dfe(e){KC=e.wasm.cwrap(Jo,null,["number","number","number","number"])}function $fe(e){let{backend:t,inputs:n,attrs:s}=e,{axis:r,keepDims:a}=s,{x:o}=n,i=t.dataIdMap.get(o.dataId).id,l=i,u=o,{transposed:c,axes:p,originalAxes:d,inputWasTransposed:h}=bi(o,r,t),f=p;if(h){let A=t.dataIdMap.get(c.dataId).id;A!==i&&(u=c,l=A,f=T.getInnerMostAxes(f.length,u.shape.length))}T.assertAxesAreInnerMostDims("prod",f,u.shape.length);let[m,g]=T.computeOutAndReduceShapes(u.shape,f),y=v.sizeFromShape(g),x=t.makeOutput(m,u.dtype);if(v.sizeFromShape(u.shape)!==0){let A=t.dataIdMap.get(x.dataId).id;KC(l,y,Kt[x.dtype],A)}if(h&&t.disposeData(c.dataId),a){let A=T.expandShapeToKeepDim(x.shape,d);x.shape=A}return x}var Pfe={kernelName:Jo,backendName:"wasm",setupFunc:Dfe,kernelFunc:$fe},Ffe=e=>{let{backend:t,attrs:n}=e,{start:s,stop:r,step:a,dtype:o}=n,i=Zx(s,r,a,o),l=t.makeOutput([i.length],o);return t.typedArrayFromHeap(l).set(i),l},Ofe={kernelName:Hc,backendName:"wasm",kernelFunc:Ffe},Mfe=!0,zfe=Wn(_o,Mfe),Lfe=_n(Qo),Bfe=_n(ni),ZC;function Wfe(e){ZC=e.wasm.cwrap(ti,null,["number","number","number","number","number","number","number","number","number","number"])}function Vfe(e){let{backend:t,inputs:n,attrs:s}=e,{images:r}=n,{alignCorners:a,halfPixelCenters:o,size:i}=s,[l,u]=i,[c,p,d,h]=r.shape,f=[c,l,u,h],m=t.dataIdMap.get(r.dataId),g;m.dtype!=="float32"&&(g=vd({backend:t,inputs:{x:r},attrs:{dtype:"float32"}}),m=t.dataIdMap.get(g.dataId));let y=m.id,x=t.makeOutput(f,"float32");if(v.sizeFromShape(r.shape)===0)return x;let A=t.dataIdMap.get(x.dataId).id;return ZC(y,c,p,d,h,l,u,a?1:0,o?1:0,A),g!=null&&t.disposeData(g.dataId),x}var Ufe={kernelName:ti,backendName:"wasm",setupFunc:Wfe,kernelFunc:Vfe},YC;function Gfe(e){YC=e.wasm.cwrap(ei,null,["number","number","number","number","number","number","number","number","number","number"])}function Hfe(e){let{backend:t,inputs:n,attrs:s}=e,{images:r}=n,{alignCorners:a,halfPixelCenters:o,size:i}=s,[l,u]=i,[c,p,d,h]=r.shape,f=[c,l,u,h],m=t.makeOutput(f,"float32");if(v.sizeFromShape(r.shape)===0)return m;let g=t.dataIdMap.get(r.dataId),y;g.dtype!=="float32"&&(y=vd({backend:t,inputs:{x:r},attrs:{dtype:"float32"}}),g=t.dataIdMap.get(y.dataId));let x=g.id,A=t.dataIdMap.get(m.dataId).id;return YC(x,c,p,d,h,l,u,a?1:0,o?1:0,A),y!=null&&t.disposeData(y.dataId),m}var jfe={kernelName:ei,backendName:"wasm",setupFunc:Gfe,kernelFunc:Hfe},JC;function qfe(e){JC=e.wasm.cwrap(ql,null,["number","array","number","array","number","number"])}function Xfe(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{dims:a}=s,o=v.parseAxisParam(a,r.shape);if(r.shape.length===0)return z2({inputs:{x:r},backend:n});let i=n.makeOutput(r.shape,r.dtype),l=n.dataIdMap.get(r.dataId).id,u=n.dataIdMap.get(i.dataId).id,c=new Uint8Array(new Int32Array(o).buffer),p=new Uint8Array(new Int32Array(r.shape).buffer);JC(l,c,o.length,p,r.shape.length,u);let d=vs({inputs:{x:i},attrs:{shape:r.shape},backend:n});return n.disposeData(i.dataId),d}var Kfe={kernelName:ql,backendName:"wasm",kernelFunc:Xfe,setupFunc:qfe},QC;function Zfe(e){QC=e.wasm.cwrap(iu,null,["number","number","number","number","number","number","number","number","array","number","number"])}function Yfe(e){let{inputs:t,backend:n,attrs:s}=e,{image:r}=t,{radians:a,fillValue:o,center:i}=s,l=n.makeOutput(r.shape,r.dtype),u=n.dataIdMap.get(r.dataId).id,c=n.dataIdMap.get(l.dataId).id,[p,d,h,f]=r.shape,[m,g]=T.getImageCenter(i,d,h),y=o===0,x=255,A=typeof o=="number"?[o,o,o,y?0:x]:[...o,x],b=new Uint8Array(new Int32Array(A).buffer);return QC(u,p,d,h,f,a,m,g,b,A.length,c),l}var Jfe={kernelName:iu,backendName:"wasm",kernelFunc:Yfe,setupFunc:Zfe},Qfe=_n(Xl),eme=_n(si),eT;function tme(e){eT=e.wasm.cwrap(Kl,null,["number","number","number","number","number","number","array","number","number"])}function nme(e){let{backend:t,inputs:n,attrs:s}=e,{indices:r,updates:a}=n,{shape:o}=s,i=t.makeOutput(o,a.dtype);if(v.sizeFromShape(o)===0)return i;let{sliceRank:l,numUpdates:u,sliceSize:c,strides:p,outputSize:d}=sA.calculateShapes(a,r,o),f=t.dataIdMap.get(r.dataId).id,g=t.dataIdMap.get(a.dataId).id,y=new Uint8Array(new Int32Array(p).buffer),x=t.dataIdMap.get(i.dataId).id;return eT(f,g,Kt[a.dtype],l,u,c,y,d,x),i}var sme={kernelName:Kl,backendName:"wasm",setupFunc:tme,kernelFunc:nme},tT;function rme(e){tT=e.wasm.cwrap("SelectV2",null,["number","number","number","number","number"])}function ame(e){let{inputs:t,backend:n}=e,{condition:s,t:r,e:a}=t,o=n.dataIdMap.get(s.dataId).id,i=n.dataIdMap.get(r.dataId).id,l=n.dataIdMap.get(a.dataId).id,u=n.makeOutput(r.shape,r.dtype),c=n.dataIdMap.get(u.dataId).id,p=s.shape.length,d=r.shape.length,h=p===0||p>1||d===1?1:v.sizeFromShape(r.shape.slice(1));return tT(o,i,l,h,c),u}var ome={kernelName:Zl,backendName:"wasm",kernelFunc:ame,setupFunc:rme},nT;function ime(e){nT=e.wasm.cwrap(ai,null,["number","number"])}function lme(e){let{backend:t,inputs:{x:n}}=e,s=t.dataIdMap.get(n.dataId).id,r=t.makeOutput(n.shape,n.dtype),a=t.dataIdMap.get(r.dataId).id;return v.sizeFromShape(r.shape)===0||nT(s,a),r}var ume={kernelName:"Sigmoid",backendName:"wasm",setupFunc:ime,kernelFunc:lme},cme=_n(ri),sT;function dme(e){sT=e.wasm.cwrap(li,null,["number","number","number","number"])}function pme(e){let{backend:t,inputs:{logits:n},attrs:{dim:s}}=e,r=t.dataIdMap.get(n.dataId).id,a=t.makeOutput(n.shape,n.dtype),o=t.dataIdMap.get(a.dataId).id,i=n.shape[s],l=v.sizeFromShape(n.shape)/i;return v.sizeFromShape(a.shape)===0||sT(r,o,i,l),a}var hme={kernelName:li,backendName:"wasm",setupFunc:dme,kernelFunc:pme};function fme(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{blockShape:a,paddings:o}=s,i=v.sizeFromShape(a),l=[[0,0]];l.push(...o);for(let k=1+a.length;k{let R=b.shape[0],D=b.shape[1],E=T.segment_util.segOpComputeOptimalWindowSize(D,N),$={windowSize:E,inSize:D,batchSize:R,numSegments:N},S=new hde($,w),F=n.compileAndRun(S,[b,k],C);if(l.push(F),F.shape[1]===N)return F;let z=q9({backend:n,attrs:{start:0,stop:N,step:1,dtype:"float32"}}),V=K9({inputs:{x:z},backend:n,attrs:{reps:[D/E]}});return l.push(z),l.push(V),g(F,w,V,C,N)},y=g(f,"unsortedSegmentSum",a,m,o),x=be({inputs:{x:y},backend:n,attrs:{shape:d}}),A=x;if(c!=null){l.push(x);let b=T.getUndoAxesPermutation(c);A=is({inputs:{x:A},backend:n,attrs:{perm:b}})}return l.forEach(b=>n.disposeIntermediateTensorInfo(b)),A}var mde={kernelName:Gp,backendName:"webgl",kernelFunc:fde},gde=[hse,mse,Ase,vse,kse,Cse,Nse,Rse,Pse,Ose,Lse,Vse,Hse,Kse,Jse,ere,nre,ore,lre,cre,fre,vre,kre,Ire,_re,$re,Mre,Zne,Bre,Hre,Kre,tae,sae,aae,iae,uae,pae,mae,Aae,bae,wae,Sae,Tae,Eae,$ae,Fae,zae,Wae,Uae,qae,Yae,toe,roe,ioe,loe,coe,poe,foe,goe,Aoe,woe,Ioe,Noe,Roe,$oe,Ooe,Boe,Goe,Kne,joe,Ure,Koe,Joe,tie,Jne,aie,uie,die,mie,Aie,wie,Iie,Eie,$ie,Oie,zie,Vie,Gie,jie,Zie,Jie,ele,nle,rle,lle,ple,gle,Sle,tse,Nle,_le,Ple,Mle,Tre,Ble,Vle,Gle,qle,Yle,ese,Qle,tue,sue,rue,Nre,ble,iue,due,mue,sse,xue,wue,Cue,Eue,$ue,Fue,zue,Wue,Uue,jue,Kue,Jue,nce,ace,lce,dce,xre,wle,fce,gce,Ace,bce,wce,Sce,Cce,Nce,Rce,$ce,Fce,Mce,Bce,Vce,Gce,jce,vle,cse,Kce,Jce,tde,ade,lde,dse,cde,pde,mde,Wle];for(let e of gde)er(e);var qt;(function(e){e[e.float32=0]="float32",e[e.int32=1]="int32",e[e.bool=2]="bool",e[e.string=3]="string",e[e.complex64=4]="complex64"})(qt||(qt={}));var Sp;(function(e){e[e.linear=0]="linear",e[e.relu=1]="relu",e[e.relu6=2]="relu6",e[e.prelu=3]="prelu",e[e.leakyrelu=4]="leakyrelu",e[e.sigmoid=5]="sigmoid",e[e.elu=6]="elu"})(Sp||(Sp={}));var Z9;function yde(e){Z9=e.wasm.cwrap(no,null,["number","array","number","number","array","number","number","number","number","number","number","number","number"])}function Ade(e){let{inputs:t,backend:n,attrs:s}=e,{a:r,b:a,bias:o,preluActivationWeights:i}=t;if(r.dtype!=="float32"||a.dtype!=="float32")throw new Error("_FusedMatMul for non non-float32 tensors not yet supported.");let{transposeA:l,transposeB:u,activation:c,leakyreluAlpha:p}=s,d=n.dataIdMap.get(r.dataId).id,h=n.dataIdMap.get(a.dataId).id,f=0;if(o!=null){let N=n.dataIdMap.get(o.dataId);if(N.shape.length!==1)throw new Error(`_FusedMatMul only supports rank-1 bias but got rank ${N.shape.length}.`);f=N.id}let m=i==null?0:n.dataIdMap.get(i.dataId).id,g=Sp[c];if(g==null)throw new Error(`${c} activation not yet supported for FusedConv2D in the wasm backend.`);let y=l?r.shape[2]:r.shape[1],x=u?a.shape[1]:a.shape[2],A=tu.assertAndGetBroadcastShape(r.shape.slice(0,-2),a.shape.slice(0,-2)),b=n.makeOutput([...A,y,x],r.dtype),w=n.dataIdMap.get(b.dataId).id,k=new Uint8Array(new Int32Array(r.shape).buffer),C=new Uint8Array(new Int32Array(a.shape).buffer);return Z9(d,k,r.shape.length,h,C,a.shape.length,l,u,g,f,m,p||0,w),b}var xde={kernelName:no,backendName:"wasm",setupFunc:yde,kernelFunc:Ade};function Rn(e,t){let n;function s(a){n=a.wasm.cwrap(e,null,["number","number","number"])}function r(a){let{backend:o,inputs:{x:i}}=a,l=o.dataIdMap.get(i.dataId).id,u=o.makeOutput(i.shape,t||i.dtype),c=o.dataIdMap.get(u.dataId).id;return v.sizeFromShape(u.shape)===0||n(l,qt[i.dtype],c),u}return{kernelName:e,backendName:"wasm",setupFunc:s,kernelFunc:r}}var bde=Rn(dl);function Vn(e,t,n){let s;function r(o){s=o.wasm.cwrap(e,null,["number","array","number","number","array","number","number","number"])}function a(o){let{backend:i,inputs:l}=o,{a:u,b:c}=l,p=i.dataIdMap.get(u.dataId).id,d=i.dataIdMap.get(c.dataId).id,h=n!=null?n:u.dtype,f=T.assertAndGetBroadcastShape(u.shape,c.shape),m=i.makeOutput(f,h);if(v.sizeFromShape(f)===0)return m;let g=new Uint8Array(new Int32Array(u.shape).buffer),y=new Uint8Array(new Int32Array(c.shape).buffer),x=i.dataIdMap.get(m.dataId).id;return(()=>s(p,g,u.shape.length,d,y,c.shape.length,qt[u.dtype],x))(),m}return{kernelName:e,backendName:"wasm",setupFunc:r,kernelFunc:a}}var vde=!0,wde=Vn(Ta,vde),Y9;function kde(e){Y9=e.wasm.cwrap(go,null,["array","number","number","number"])}function Sde(e){let{inputs:t,backend:n}=e,s=n.makeOutput(t[0].shape,t[0].dtype);if(v.sizeFromShape(s.shape)===0)return s;let r=t.map(i=>n.dataIdMap.get(i.dataId).id),a=new Uint8Array(new Int32Array(r).buffer),o=n.dataIdMap.get(s.dataId).id;return Y9(a,r.length,qt[s.dtype],o),s}var Ide={kernelName:go,backendName:"wasm",setupFunc:kde,kernelFunc:Sde};function h2(e){let{inputs:{x:t},backend:n}=e,s=n.makeOutput(t.shape,t.dtype),r=n.typedArrayFromHeap(t);return n.typedArrayFromHeap(s).set(r),s}var Cde={kernelName:Fo,backendName:"wasm",kernelFunc:h2},J9;function Tde(e){J9=e.wasm.cwrap(Jr,null,["number","array","number","number","number","array","number"])}function ho(e){let{inputs:t,backend:n,attrs:s}=e,[r,a]=Ede(t.x.shape,s.perm),o=!0;for(let f=0;f=r&&(a===-1||s[a]>s[o])&&(a=o);s[a]=r}return[n,s]}var Rde={kernelName:Jr,backendName:"wasm",kernelFunc:ho,setupFunc:Tde};function yi(e,t,n){let s=e.shape,r=e.shape.length,a=v.parseAxisParam(t,s),o=a,i=T.getAxesPermutation(o,r),l=null,u=!1;if(i!=null){let c=new Array(r);for(let h=0;h`new shape: ${o}, old shape: ${s.shape}. New shape and old shape must have the same number of elements.`),e.backend.incRef(s.dataId),{dataId:s.dataId,shape:o,dtype:s.dtype}}var Ude={kernelName:zl,backendName:"wasm",kernelFunc:xs},sC;function Gde(e){sC=e.wasm.cwrap(xo,null,["number","array","number","number","array","number","number","number","number"])}function Hde(e){let{inputs:t,backend:n,attrs:s}=e,{a:r,b:a}=t,{transposeA:o,transposeB:i}=s;if(r.dtype!=="float32"||a.dtype!=="float32")throw new Error("BatchMatMul for non non-float32 tensors not yet supported.");let l=r.shape.length,u=a.shape.length,c=o?r.shape[l-2]:r.shape[l-1],p=i?a.shape[u-1]:a.shape[u-2],d=o?r.shape[l-1]:r.shape[l-2],h=i?a.shape[u-2]:a.shape[u-1],f=r.shape.slice(0,-2),m=a.shape.slice(0,-2),g=v.sizeFromShape(f),y=v.sizeFromShape(m),A=tu.assertAndGetBroadcastShape(r.shape.slice(0,-2),a.shape.slice(0,-2)).concat([d,h]);v.assert(c===p,()=>`Error in matMul: inner shapes (${c}) and (${p}) of Tensors with shapes ${r.shape} and ${a.shape} and transposeA=${o} and transposeB=${i} must match.`);let b=o?[g,c,d]:[g,d,c],w=i?[y,h,p]:[y,p,h],k=xs({inputs:{x:r},backend:n,attrs:{shape:b}}),C=xs({inputs:{x:a},backend:n,attrs:{shape:w}}),N=n.dataIdMap.get(k.dataId).id,R=n.dataIdMap.get(C.dataId).id,D=o?k.shape[2]:k.shape[1],E=i?C.shape[1]:C.shape[2],$=Math.max(g,y),S=n.makeOutput([$,D,E],k.dtype),F=n.dataIdMap.get(S.dataId).id,z=new Uint8Array(new Int32Array(k.shape).buffer),V=new Uint8Array(new Int32Array(C.shape).buffer);return sC(N,z,k.shape.length,R,V,C.shape.length,o,i,F),n.disposeData(k.dataId),n.disposeData(C.dataId),S.shape=A,S}var jde={kernelName:xo,backendName:"wasm",setupFunc:Gde,kernelFunc:Hde};function ul(e){let{inputs:{x:t},attrs:{begin:n,size:s},backend:r}=e,[a,o]=Gt.parseSliceParams(t,n,s),i=Gt.isSliceContinous(t.shape,a,o),l=r.readSync(t.dataId),u=r.makeOutput(o,t.dtype),c=v.computeStrides(t.shape),p=r.dataIdMap.get(u.dataId);if(i){let f=Gt.computeFlatOffset(a,c);return t.dtype==="string"?p.stringBytes=l.slice(f,f+v.sizeFromShape(o)):r.typedArrayFromHeap(u).set(l.subarray(f,f+v.sizeFromShape(o))),u}if(t.dtype==="string"){let f=bm(l,a,o,t.shape,t.dtype);return p.stringBytes=f,u}let d=r.typedArrayFromHeap(u),h=t.shape.length;if(h===2)qde(l,c[0],d,a,o);else if(h===3)Xde(l,c[0],c[1],d,a,o);else if(h===4)Kde(l,c[0],c[1],c[2],d,a,o);else{let f=bm(l,a,o,t.shape,t.dtype);d.set(f)}return u}function qde(e,t,n,s,r){let a=0,o=s[0],i=s[1],l=o+r[0];for(let u=o;uy*x),l=T.getReshaped(r.shape,a,i),u=T.getPermuted(l.length,a.length),c=T.getReshapedPermuted(r.shape,a,i),p=T.getSliceBeginCoords(o,a.length),d=T.getSliceSize(c,o,a.length),h=xs({inputs:{x:r},backend:n,attrs:{shape:l}}),f=ho({inputs:{x:h},backend:n,attrs:{perm:u}}),m=xs({inputs:{x:f},backend:n,attrs:{shape:c}}),g=ul({inputs:{x:m},backend:n,attrs:{begin:p,size:d}});return n.disposeData(h.dataId),n.disposeData(f.dataId),n.disposeData(h.dataId),g}var Jde={kernelName:hl,backendName:"wasm",kernelFunc:Yde};function ud(e){let{inputs:{x:t},attrs:{dtype:n},backend:s}=e,r=s.makeOutput(t.shape,n),a=s.typedArrayFromHeap(t);return s.typedArrayFromHeap(r).set(a),r}var Qde={kernelName:bo,backendName:"wasm",kernelFunc:ud},epe=Rn(vo),rC;function tpe(e){rC=e.wasm.cwrap(Na,null,["number","number","number","number"])}function npe(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{clipValueMin:a,clipValueMax:o}=s,i=n.dataIdMap.get(r.dataId).id,l=n.makeOutput(r.shape,r.dtype),u=n.dataIdMap.get(l.dataId).id;return rC(i,a,o,u),l}var spe={kernelName:Na,backendName:"wasm",setupFunc:tpe,kernelFunc:npe};function aC(e){let{inputs:t,backend:n}=e,s=v.parseAxisParam(e.attrs.axis,t[0].shape)[0],r=t.map(h=>h.shape);T.assertParamsConsistent(r,s);let a=T.computeOutShape(t.map(h=>h.shape),s),o=t.filter(h=>v.sizeFromShape(h.shape)>0);if(o.length===1)return h2({inputs:{x:o[0]},backend:n});let i=n.makeOutput(a,t[0].dtype);if(v.sizeFromShape(a)===0)return i;if(o[0].dtype==="string"){let h=o.map(A=>{let b=v.sizeFromShape(A.shape.slice(s));return xs({inputs:{x:A},backend:n,attrs:{shape:[-1,b]}})}),f=h.map(A=>({vals:n.readSync(A.dataId),shape:A.shape}));a=T.computeOutShape(h.map(A=>A.shape),1);let m=h[0].shape[0]===1,g=Tx(f,a,t[0].dtype,m),y=T.computeOutShape(o.map(A=>A.shape),s);i.shape=y;let x=n.dataIdMap.get(i.dataId);return x.stringBytes=T.fromStringArrayToUint8(g),h.forEach(A=>n.disposeData(A.dataId)),i}let l=v.sizeFromShape(o[0].shape.slice(0,s)),u=0,c=o.map(h=>{let f=v.sizeFromShape(h.shape.slice(s));return u+=f,f}),p=o.map(h=>n.typedArrayFromHeap(h)),d=n.typedArrayFromHeap(i);for(let h=0;h`cumprod does not support ${r.dtype} tensors in the WASM backend`);let u=T.getAxesPermutation([a],l),c=r;u!==null&&(c=ho({inputs:{x:r},attrs:{perm:u},backend:n}));let p=T.getInnerMostAxes(1,l)[0];T.assertAxesAreInnerMostDims("cumprod",[p],l);let d=n.makeOutput(c.shape,c.dtype),h=c.shape[p],f=n.dataIdMap.get(c.dataId).id,m=n.dataIdMap.get(d.dataId).id;uC(f,o?1:0,i?1:0,h,m,qt[r.dtype]);let g=d;if(u!==null){let y=T.getUndoAxesPermutation(u);g=ho({inputs:{x:d},attrs:{perm:y},backend:n}),n.disposeData(c.dataId),n.disposeData(d.dataId)}return g}var Ape={kernelName:ml,backendName:"wasm",setupFunc:gpe,kernelFunc:ype},cC;function xpe(e){cC=e.wasm.cwrap(Co,null,["number","number","number","number","number","number"])}function bpe(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{axis:a,exclusive:o,reverse:i}=s,l=r.shape.length;v.assert(r.dtype==="float32"||r.dtype==="int32",()=>`cumsum does not support ${r.dtype} tensors in the WASM backend`);let u=T.getAxesPermutation([a],l),c=r;u!==null&&(c=ho({inputs:{x:r},attrs:{perm:u},backend:n}));let p=T.getInnerMostAxes(1,l)[0];T.assertAxesAreInnerMostDims("cumsum",[p],l);let d=n.makeOutput(c.shape,c.dtype),h=c.shape[p],f=n.dataIdMap.get(c.dataId).id,m=n.dataIdMap.get(d.dataId).id;cC(f,o?1:0,i?1:0,h,m,qt[r.dtype]);let g=d;if(u!==null){let y=T.getUndoAxesPermutation(u);g=ho({inputs:{x:d},attrs:{perm:y},backend:n}),n.disposeData(c.dataId),n.disposeData(d.dataId)}return g}var vpe={kernelName:Co,backendName:"wasm",setupFunc:xpe,kernelFunc:bpe},dC;function wpe(e){dC=e.wasm.cwrap(yl,null,["number","number","number","array","number","array","array","number","number"])}function kpe(e){let{backend:t,inputs:n,attrs:s}=e,{x:r}=n,{blockSize:a,dataFormat:o}=s,i=r.shape[0],l=o==="NHWC"?r.shape[1]:r.shape[2],u=o==="NHWC"?r.shape[2]:r.shape[3],c=o==="NHWC"?r.shape[3]:r.shape[1],p=l*a,d=u*a,h=c/(a*a),f=o==="NHWC"?[i,p,d,h]:[i,h,p,d],m=t.makeOutput(f,"float32"),y=t.dataIdMap.get(r.dataId).id,x=new Uint8Array(new Int32Array(v.computeStrides(r.shape)).buffer),A=new Uint8Array(new Int32Array(f).buffer),b=new Uint8Array(new Int32Array(v.computeStrides(f)).buffer),w=t.dataIdMap.get(m.dataId).id;return dC(y,a,o==="NHWC"?1:0,x,r.shape.length-1,A,b,f.length,w),m}var Spe={kernelName:yl,backendName:"wasm",setupFunc:wpe,kernelFunc:kpe},pC;function Ipe(e){pC=e.wasm.cwrap(To,null,["number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number"])}function Cpe(e){let{inputs:t,attrs:n,backend:s}=e,{x:r,filter:a}=t,o=s.dataIdMap.get(r.dataId).id,i=s.dataIdMap.get(a.dataId).id,{strides:l,dilations:u,pad:c,dimRoundingMode:p}=n,d=u==null?[1,1]:u,h=T.computeConv2DInfo(r.shape,a.shape,l,d,c,p,!0),f=h.filterHeight,m=h.filterWidth,g=h.padInfo.top,y=h.padInfo.right,x=h.padInfo.bottom,A=h.padInfo.left,b=h.dilationHeight,w=h.dilationWidth,k=h.strideHeight,C=h.strideWidth,N=h.inChannels,R=h.outChannels,D=h.padInfo.type==="SAME"?1:0;if(h.dataFormat!=="channelsLast")throw new Error(`wasm backend DepthwiseConv2dNative does not support dataFormat:'${h.dataFormat}'. Please use 'channelsLast'.`);let E=s.makeOutput(h.outShape,"float32"),$=s.dataIdMap.get(E.dataId).id;return pC(o,r.shape[0],r.shape[1],r.shape[2],i,f,m,g,y,x,A,D,b,w,k,C,N,R,$),E}var Tpe={kernelName:To,backendName:"wasm",setupFunc:Ipe,kernelFunc:Cpe},Npe=Rn(Eo),Epe=!1,Rpe=Vn(Al,Epe,"bool"),_pe=Rn(Ro,"float32");function iy(e){let{inputs:t,attrs:n,backend:s}=e,{input:r}=t,{dim:a}=n,o=r.shape.length,i=r.shape.slice(),l=a;return a<0&&(v.assert(-(o+1)<=a,()=>`Axis must be in the interval [${-(o+1)}, ${o}]`),l=o+a+1),i.splice(l,0,1),xs({inputs:{x:r},backend:s,attrs:{shape:i}})}var Dpe={kernelName:xl,backendName:"wasm",kernelFunc:iy};function hC(e){let{attrs:{shape:t,value:n,dtype:s},backend:r}=e,a=r.makeOutput(t,s);return r.typedArrayFromHeap(a).fill(n),a}var $pe={kernelName:Cc,backendName:"wasm",kernelFunc:hC},fC;function Ppe(e){fC=e.wasm.cwrap(vl,null,["number","number","number","number","number","number"])}function Fpe(e){let{inputs:t,backend:n}=e,{image:s}=t,r=n.makeOutput(s.shape,s.dtype),a=n.dataIdMap.get(s.dataId).id,o=n.dataIdMap.get(r.dataId).id,[i,l,u,c]=s.shape;return fC(a,i,l,u,c,o),r}var Ope={kernelName:vl,backendName:"wasm",kernelFunc:Fpe,setupFunc:Ppe},Mpe=Rn(_o),zpe=!1,Lpe=Vn(Do,zpe),mC;function Bpe(e){mC=e.wasm.cwrap($o,null,["number","number","number","number","number","number","number"])}function Wpe(e){let{backend:t,inputs:n,attrs:s}=e,{varianceEpsilon:r}=s,{x:a,mean:o,variance:i,offset:l,scale:u}=n,c=t.dataIdMap.get(a.dataId).id,p=t.dataIdMap.get(o.dataId).id,d=t.dataIdMap.get(i.dataId).id,h=l!=null?t.dataIdMap.get(l.dataId).id:0,f=u!=null?t.dataIdMap.get(u.dataId).id:0,m=t.makeOutput(a.shape,a.dtype);if(v.sizeFromShape(a.shape)===0)return m;let g=t.dataIdMap.get(m.dataId).id;return mC(c,p,d,h,f,r,g),m}var Vpe={kernelName:$o,backendName:"wasm",setupFunc:Bpe,kernelFunc:Wpe},gC;function Upe(e){gC=e.wasm.cwrap(so,null,["number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number"])}function Gpe(e){let{inputs:t,attrs:n,backend:s}=e,{x:r,filter:a,bias:o,preluActivationWeights:i}=t,{strides:l,pad:u,dilations:c,dataFormat:p,dimRoundingMode:d,activation:h,leakyreluAlpha:f}=n,m=T.computeConv2DInfo(r.shape,a.shape,l,c,u,d),g=Sp[h];if(g==null)throw new Error(`${h} activation not yet supported for FusedConv2D in the wasm backend.`);let y=s.dataIdMap.get(r.dataId).id,x=s.dataIdMap.get(a.dataId).id,A=m.outChannels,b=0;if(o!=null){let re=s.dataIdMap.get(o.dataId);if(re.shape.length!==1)throw new Error(`FusedConv2D only supports rank-1 bias but got rank ${re.shape.length}.`);if(re.shape[0]!==A)throw new Error(`FusedConv2D bias shape (${re.shape}) does not match the number of output channels (${A})`);b=re.id}let w=m.filterHeight,k=m.filterWidth,C=m.padInfo.top,N=m.padInfo.right,R=m.padInfo.bottom,D=m.padInfo.left,E=m.dilationHeight,$=m.dilationWidth,S=m.strideHeight,F=m.strideWidth,z=m.inChannels,V=m.padInfo.type==="SAME"?1:0,j=m.batchSize,G=m.inHeight,q=m.inWidth;if(p!=="NHWC")throw new Error(`wasm backend FusedConv2D does not support dataFormat:'${p}'. Please use 'NHWC'.`);let K=s.makeOutput(m.outShape,"float32"),ne=s.dataIdMap.get(K.dataId).id,ae=i==null?0:s.dataIdMap.get(i.dataId).id;return gC(y,j,G,q,x,w,k,b,C,N,R,D,V,E,$,S,F,z,A,g,ae,f||0,ne),K}var Hpe={kernelName:so,backendName:"wasm",setupFunc:Upe,kernelFunc:Gpe},yC;function jpe(e){yC=e.wasm.cwrap(ro,null,["number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number"])}function qpe(e){let{inputs:t,attrs:n,backend:s}=e,{x:r,filter:a,bias:o,preluActivationWeights:i}=t,{strides:l,pad:u,dilations:c,dataFormat:p,dimRoundingMode:d,activation:h,leakyreluAlpha:f}=n,m=T.computeConv2DInfo(r.shape,a.shape,l,c,u,d,!0),g=Sp[h];if(g==null)throw new Error(`${h} activation not yet supported for FusedDepthwiseConv2D in the wasm backend.`);let y=s.dataIdMap.get(r.dataId).id,x=s.dataIdMap.get(a.dataId).id,A=m.outChannels,b=0;if(o!=null){let re=s.dataIdMap.get(o.dataId);if(re.shape.length!==1)throw new Error(`FusedDepthwiseConv2D only supports rank-1 bias but got rank ${re.shape.length}.`);if(re.shape[0]!==A)throw new Error(`FusedDepthwiseConv2D bias shape (${re.shape}) does not match the number of output channels (${A})`);b=re.id}let w=m.filterHeight,k=m.filterWidth,C=m.padInfo.top,N=m.padInfo.right,R=m.padInfo.bottom,D=m.padInfo.left,E=m.dilationHeight,$=m.dilationWidth,S=m.strideHeight,F=m.strideWidth,z=m.inChannels,V=m.padInfo.type==="SAME"?1:0,j=m.batchSize,G=m.inHeight,q=m.inWidth;if(p!=="NHWC")throw new Error(`wasm backend FusedDepthwiseConv2D does not support dataFormat:'${p}'. Please use 'NHWC'.`);let K=s.makeOutput(m.outShape,"float32"),ne=s.dataIdMap.get(K.dataId).id,ae=i==null?0:s.dataIdMap.get(i.dataId).id;return yC(y,j,G,q,x,w,k,b,C,N,R,D,V,E,$,S,F,z,A,g,ae,f||0,ne),K}var Xpe={kernelName:ro,backendName:"wasm",setupFunc:jpe,kernelFunc:qpe},AC;function Kpe(e){AC=e.wasm.cwrap(kl,null,["number","number","number","number","number","number","array","number"])}function Zpe(e){let{backend:t,inputs:n}=e,{params:s,indices:r}=n,[a,o,i,l]=Fy.prepareAndValidate(s,r),u=t.makeOutput(a,s.dtype);if(o===0)return u;let c=r.shape,p=c[c.length-1],h=t.dataIdMap.get(s.dataId).id,m=t.dataIdMap.get(r.dataId).id,g=new Uint8Array(new Int32Array(l).buffer),y=t.dataIdMap.get(u.dataId).id;return AC(h,qt[s.dtype],m,o,p,i,g,y),u}var Ype={kernelName:kl,backendName:"wasm",setupFunc:Kpe,kernelFunc:Zpe},xC;function Jpe(e){xC=e.wasm.cwrap("Gather",null,["number","number","array","number","number","number","array","number"])}function Qpe(e){let{backend:t,inputs:n,attrs:s}=e,{x:r,indices:a}=n,{axis:o,batchDims:i}=s,l=v.parseAxisParam(o,r.shape)[0],u=t.readSync(a.dataId),c=r.shape[l];for(let R=0;R=0,()=>`GatherV2: the index value ${D} is not in [0, ${c-1}]`)}let p=T.segment_util.collectGatherOpShapeInfo(r,a,l,i),d=xs({inputs:{x:r},attrs:{shape:[p.batchSize,p.outerSize,p.dimSize,p.sliceSize]},backend:t}),h=v.sizeFromShape(a.shape),f=xs({inputs:{x:a},attrs:{shape:[p.batchSize,h/p.batchSize]},backend:t}),m=[p.batchSize,p.outerSize,h/p.batchSize,p.sliceSize],g=t.makeOutput(m,r.dtype);if(v.sizeFromShape(r.shape)===0)return g;let y=d.shape.length-1,A=t.dataIdMap.get(d.dataId).id,w=t.dataIdMap.get(f.dataId).id,k=t.dataIdMap.get(g.dataId).id,C=new Uint8Array(new Int32Array(v.computeStrides(d.shape)).buffer),N=new Uint8Array(new Int32Array(v.computeStrides(m)).buffer);return xC(A,qt[r.dtype],C,y,w,p.batchSize,N,k),t.disposeData(d.dataId),t.disposeData(f.dataId),g.shape=p.outputShape,g}var ehe={kernelName:wl,backendName:"wasm",setupFunc:Jpe,kernelFunc:Qpe},the=!1,nhe=Vn(Sl,the,"bool"),she=!1,rhe=Vn(Po,she,"bool"),bC;function ahe(e){bC=e.wasm.cwrap(Oo,null,["number","number","number","number"])}function ohe(e){let{inputs:{x:t},attrs:{alpha:n},backend:s}=e,r=s.dataIdMap.get(t.dataId).id,a=s.makeOutput(t.shape,"float32");if(v.sizeFromShape(t.shape)!==0){let o=s.dataIdMap.get(a.dataId).id;bC(r,qt[t.dtype],n,o)}return a}var ihe={kernelName:Oo,backendName:"wasm",setupFunc:ahe,kernelFunc:ohe},lhe=!1,uhe=Vn(Cl,lhe,"bool"),che=!1,dhe=Vn(Tl,che,"bool"),phe=Rn(Mo),hhe=!1,fhe=Vn(Nl,hhe,"bool"),mhe=Rn(El),ghe=!1,yhe=Vn(Rc,ghe,"bool"),Ahe=!1,xhe=Vn(gw,Ahe,"bool"),vC;function bhe(e){vC=e.wasm.cwrap(zo,null,["number","number","number","number"])}function vhe(e){let{backend:t,inputs:n,attrs:s}=e,{reductionIndices:r,keepDims:a}=s,{x:o}=n,l=t.dataIdMap.get(o.dataId).id,u=o,{transposed:c,axes:p,originalAxes:d,inputWasTransposed:h}=yi(o,r,t);if(h){let A=t.dataIdMap.get(c.dataId).id;u=c,l=A}let f=u.shape.length;T.assertAxesAreInnerMostDims("max",p,f);let[m,g]=T.computeOutAndReduceShapes(u.shape,p),y=v.sizeFromShape(g),x=t.makeOutput(m,o.dtype);if(v.sizeFromShape(u.shape)!==0){let A=t.dataIdMap.get(x.dataId).id;vC(l,qt[o.dtype],y,A)}if(h&&t.disposeData(c.dataId),a){let A=T.expandShapeToKeepDim(x.shape,d);x.shape=A}return x}var whe={kernelName:zo,backendName:"wasm",setupFunc:bhe,kernelFunc:vhe},khe=!1,She=Vn(Lo,khe),wC;function Ihe(e){wC=e.wasm.cwrap(Bo,null,["number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number"])}function Che(e){let{inputs:t,attrs:n,backend:s}=e,r=t.x,a=s.dataIdMap.get(r.dataId).id;v.assert(r.dtype==="float32",()=>`Error in MaxPool: only float32 input is supported. Got ${r.dtype}.`);let{filterSize:o,strides:i,pad:l,dimRoundingMode:u}=n,c=T.computePool2DInfo(r.shape,o,i,1,l,u),p=c.filterHeight,d=c.filterWidth,h=c.padInfo.top,f=c.padInfo.right,m=c.padInfo.bottom,g=c.padInfo.left,y=c.dilationHeight,x=c.dilationWidth,A=c.strideHeight,b=c.strideWidth,w=c.inChannels,k=c.outChannels;if(c.dataFormat!=="channelsLast")throw new Error(`wasm backend does not support dataFormat:'${c.dataFormat}'. Please use 'channelsLast'.`);let C=s.makeOutput(c.outShape,"float32"),N=s.dataIdMap.get(C.dataId).id;return wC(a,r.shape[0],r.shape[1],r.shape[2],p,d,h,f,m,g,y,x,A,b,w,k,N),C}var The={kernelName:Bo,backendName:"wasm",setupFunc:Ihe,kernelFunc:Che},kC;function Nhe(e){kC=e.wasm.cwrap(Wo,null,["number, number, number"])}function Ehe(e){let{backend:t,inputs:n,attrs:s}=e,{axis:r,keepDims:a}=s,{x:o}=n,i=t.dataIdMap.get(o.dataId).id,l=i,u=o,{transposed:c,axes:p,originalAxes:d,inputWasTransposed:h}=yi(o,r,t),f=p;if(h){let b=t.dataIdMap.get(c.dataId).id;b!==i&&(u=c,l=b,f=T.getInnerMostAxes(f.length,u.shape.length))}T.assertAxesAreInnerMostDims("mean",f,u.shape.length);let[m,g]=T.computeOutAndReduceShapes(u.shape,f),y=v.sizeFromShape(g),x=u;u.dtype!=="float32"&&(x=ud({backend:t,inputs:{x:u},attrs:{dtype:"float32"}}),l=t.dataIdMap.get(x.dataId).id);let A=t.makeOutput(m,"float32");if(v.sizeFromShape(u.shape)!==0){let b=t.dataIdMap.get(A.dataId).id;kC(l,y,b)}if(h&&t.disposeData(c.dataId),a){let b=T.expandShapeToKeepDim(A.shape,d);A.shape=b}return u.dtype!=="float32"&&t.disposeData(x.dataId),A}var Rhe={kernelName:Wo,backendName:"wasm",setupFunc:Nhe,kernelFunc:Ehe},SC;function _he(e){SC=e.wasm.cwrap(Vo,null,["number","number","number","number"])}function Dhe(e){let{backend:t,inputs:n,attrs:s}=e,{axis:r,keepDims:a}=s,{x:o}=n,i=t.dataIdMap.get(o.dataId).id,l=i,u=o,{transposed:c,axes:p,originalAxes:d,inputWasTransposed:h}=yi(o,r,t);if(h){let A=t.dataIdMap.get(c.dataId).id;A!==i&&(u=c,l=A)}let f=u.shape.length;T.assertAxesAreInnerMostDims("min",p,f);let[m,g]=T.computeOutAndReduceShapes(u.shape,p),y=v.sizeFromShape(g),x=t.makeOutput(m,u.dtype);if(v.sizeFromShape(u.shape)!==0){let A=t.dataIdMap.get(x.dataId).id;SC(l,qt[o.dtype],y,A)}if(h&&t.disposeData(c.dataId),a){let A=T.expandShapeToKeepDim(x.shape,d);x.shape=A}return x}var $he={kernelName:Vo,backendName:"wasm",setupFunc:_he,kernelFunc:Dhe},Phe=!1,Fhe=Vn(Uo,Phe),ly;(function(e){e[e.reflect=0]="reflect",e[e.symmetric=1]="symmetric"})(ly||(ly={}));var IC;function Ohe(e){IC=e.wasm.cwrap(Go,null,["number","array","number","number","array","array","number","number"])}function Mhe(e){let{inputs:{x:t},backend:n,attrs:{paddings:s,mode:r}}=e,a=s.map((f,m)=>f[0]+t.shape[m]+f[1]),o=n.dataIdMap.get(t.dataId).id,i=n.makeOutput(a,t.dtype),l=n.dataIdMap.get(i.dataId).id,u=new Uint8Array(new Int32Array(t.shape).buffer),c=s.map(f=>f[0]),p=s.map(f=>f[1]),d=new Uint8Array(new Int32Array(c).buffer),h=new Uint8Array(new Int32Array(p).buffer);return IC(o,u,t.shape.length,qt[t.dtype],d,h,ly[r],l),i}var zhe={kernelName:Go,backendName:"wasm",kernelFunc:Mhe,setupFunc:Ohe},Lhe=!0,Bhe=Vn(Ho,Lhe),Whe=Rn(Rl);function Qx(e,t){let n=new Int32Array(e.wasm.HEAPU8.buffer,t,4),s=n[0],r=n[1],a=n[2],o=n[3];return e.wasm._free(t),{pSelectedIndices:s,selectedSize:r,pSelectedScores:a,pValidOutputs:o}}var CC;function Vhe(e){CC=e.wasm.cwrap(Dl,"number",["number","number","number","number","number"])}function Uhe(e){let{backend:t,inputs:n,attrs:s}=e,{iouThreshold:r,maxOutputSize:a,scoreThreshold:o}=s,{boxes:i,scores:l}=n,u=t.dataIdMap.get(i.dataId).id,c=t.dataIdMap.get(l.dataId).id,p=CC(u,c,a,r,o),{pSelectedIndices:d,selectedSize:h,pSelectedScores:f,pValidOutputs:m}=Qx(t,p);return t.wasm._free(f),t.wasm._free(m),t.makeOutput([h],"int32",d)}var Ghe={kernelName:Dl,backendName:"wasm",setupFunc:Vhe,kernelFunc:Uhe},TC;function Hhe(e){TC=e.wasm.cwrap(Dc,"number",["number","number","number","number","number","bool"])}function jhe(e){let{backend:t,inputs:n,attrs:s}=e,{iouThreshold:r,maxOutputSize:a,scoreThreshold:o,padToMaxOutputSize:i}=s,{boxes:l,scores:u}=n,c=t.dataIdMap.get(l.dataId).id,p=t.dataIdMap.get(u.dataId).id,d=TC(c,p,a,r,o,i),{pSelectedIndices:h,selectedSize:f,pSelectedScores:m,pValidOutputs:g}=Qx(t,d);t.wasm._free(m);let y=t.makeOutput([f],"int32",h),x=t.makeOutput([],"int32",g);return[y,x]}var qhe={kernelName:Dc,backendName:"wasm",setupFunc:Hhe,kernelFunc:jhe},NC;function Xhe(e){NC=e.wasm.cwrap($l,"number",["number","number","number","number","number","number"])}function Khe(e){let{backend:t,inputs:n,attrs:s}=e,{iouThreshold:r,maxOutputSize:a,scoreThreshold:o,softNmsSigma:i}=s,{boxes:l,scores:u}=n,c=t.dataIdMap.get(l.dataId).id,p=t.dataIdMap.get(u.dataId).id,d=NC(c,p,a,r,o,i),{pSelectedIndices:h,selectedSize:f,pSelectedScores:m,pValidOutputs:g}=Qx(t,d);t.wasm._free(g);let y=t.makeOutput([f],"int32",h),x=t.makeOutput([f],"float32",m);return[y,x]}var Zhe={kernelName:$l,backendName:"wasm",setupFunc:Xhe,kernelFunc:Khe},Yhe=!1,Jhe=Vn(_l,Yhe,"bool"),EC;function Qhe(e){EC=e.wasm.cwrap(Fl,null,["number","number","number","number","number"])}function efe(e){let{inputs:t,backend:n,attrs:s}=e,{indices:r}=t,{dtype:a,depth:o,onValue:i,offValue:l}=s,u=n.makeOutput([...r.shape,o],a),c=n.dataIdMap.get(u.dataId).id,d=n.dataIdMap.get(r.dataId).id;return EC(d,o,i,l,c),u}var tfe={kernelName:Fl,backendName:"wasm",setupFunc:Qhe,kernelFunc:efe};function nfe(e){let{inputs:{x:t},backend:n}=e,s=n.makeOutput(t.shape,t.dtype);return n.typedArrayFromHeap(s).fill(1),s}var sfe={kernelName:Pl,backendName:"wasm",kernelFunc:nfe};function rfe(e){let{inputs:t,backend:n,attrs:s}=e,{axis:r}=s;if(t.length===1)return iy({inputs:{input:t[0]},backend:n,attrs:{dim:r}});let a=t[0].shape,o=t[0].dtype;t.forEach(c=>{v.assertShapesMatch(a,c.shape,"All tensors passed to stack must have matching shapes"),v.assert(o===c.dtype,()=>"All tensors passed to stack must have matching dtypes")});let i=[],l=t.map(c=>{let p=iy({inputs:{input:c},backend:n,attrs:{dim:r}});return i.push(p),p}),u=aC({inputs:l,backend:n,attrs:{axis:r}});return i.forEach(c=>n.disposeData(c.dataId)),u}var afe={kernelName:Ol,backendName:"wasm",kernelFunc:rfe},RC;function ofe(e){RC=e.wasm.cwrap(jo,null,["number","array","number","number","array","array","number","number"])}function ife(e){let{inputs:{x:t},backend:n,attrs:{paddings:s,constantValue:r}}=e,a=s.map((m,g)=>m[0]+t.shape[g]+m[1]);if(v.sizeFromShape(t.shape)===0)return hC({backend:n,attrs:{shape:a,value:r,dtype:t.dtype}});let o=n.dataIdMap.get(t.dataId).id,i=n.makeOutput(a,t.dtype),u=n.dataIdMap.get(i.dataId).id,c=new Uint8Array(new Int32Array(t.shape).buffer),p=s.map(m=>m[0]),d=s.map(m=>m[1]),h=new Uint8Array(new Int32Array(p).buffer),f=new Uint8Array(new Int32Array(d).buffer);return RC(o,c,t.shape.length,qt[t.dtype],h,f,r,u),i}var _C={kernelName:jo,backendName:"wasm",kernelFunc:ife,setupFunc:ofe},lfe=!1,ufe=Vn(qo,lfe),DC;function cfe(e){DC=e.wasm.cwrap(Xo,null,["number","number","number"])}function dfe(e){let{inputs:t,backend:n}=e,{x:s,alpha:r}=t,a=n.dataIdMap.get(s.dataId).id,o=n.dataIdMap.get(r.dataId).id,i=a,l=s,u=l;l.dtype!=="float32"&&(u=ud({backend:n,inputs:{x:s},attrs:{dtype:"float32"}}),i=n.dataIdMap.get(u.dataId).id);let c=n.makeOutput(s.shape,"float32"),p=n.dataIdMap.get(c.dataId).id;return DC(i,o,p),l.dtype!=="float32"&&n.disposeData(u.dataId),c}var pfe={kernelName:Xo,backendName:"wasm",setupFunc:cfe,kernelFunc:dfe},$C;function hfe(e){$C=e.wasm.cwrap(Ko,null,["number","number","number","number"])}function ffe(e){let{backend:t,inputs:n,attrs:s}=e,{axis:r,keepDims:a}=s,{x:o}=n,i=t.dataIdMap.get(o.dataId).id,l=i,u=o,{transposed:c,axes:p,originalAxes:d,inputWasTransposed:h}=yi(o,r,t),f=p;if(h){let A=t.dataIdMap.get(c.dataId).id;A!==i&&(u=c,l=A,f=T.getInnerMostAxes(f.length,u.shape.length))}T.assertAxesAreInnerMostDims("prod",f,u.shape.length);let[m,g]=T.computeOutAndReduceShapes(u.shape,f),y=v.sizeFromShape(g),x=t.makeOutput(m,u.dtype);if(v.sizeFromShape(u.shape)!==0){let A=t.dataIdMap.get(x.dataId).id;$C(l,y,qt[x.dtype],A)}if(h&&t.disposeData(c.dataId),a){let A=T.expandShapeToKeepDim(x.shape,d);x.shape=A}return x}var mfe={kernelName:Ko,backendName:"wasm",setupFunc:hfe,kernelFunc:ffe},gfe=e=>{let{backend:t,attrs:n}=e,{start:s,stop:r,step:a,dtype:o}=n,i=Rx(s,r,a,o),l=t.makeOutput([i.length],o);return t.typedArrayFromHeap(l).set(i),l},yfe={kernelName:$c,backendName:"wasm",kernelFunc:gfe},Afe=!0,xfe=Vn(No,Afe),bfe=Rn(Zo),vfe=Rn(Qo),PC;function wfe(e){PC=e.wasm.cwrap(Jo,null,["number","number","number","number","number","number","number","number","number","number"])}function kfe(e){let{backend:t,inputs:n,attrs:s}=e,{images:r}=n,{alignCorners:a,halfPixelCenters:o,size:i}=s,[l,u]=i,[c,p,d,h]=r.shape,f=[c,l,u,h],m=t.dataIdMap.get(r.dataId),g;m.dtype!=="float32"&&(g=ud({backend:t,inputs:{x:r},attrs:{dtype:"float32"}}),m=t.dataIdMap.get(g.dataId));let y=m.id,x=t.makeOutput(f,"float32");if(v.sizeFromShape(r.shape)===0)return x;let A=t.dataIdMap.get(x.dataId).id;return PC(y,c,p,d,h,l,u,a?1:0,o?1:0,A),g!=null&&t.disposeData(g.dataId),x}var Sfe={kernelName:Jo,backendName:"wasm",setupFunc:wfe,kernelFunc:kfe},FC;function Ife(e){FC=e.wasm.cwrap(Yo,null,["number","number","number","number","number","number","number","number","number","number"])}function Cfe(e){let{backend:t,inputs:n,attrs:s}=e,{images:r}=n,{alignCorners:a,halfPixelCenters:o,size:i}=s,[l,u]=i,[c,p,d,h]=r.shape,f=[c,l,u,h],m=t.makeOutput(f,"float32");if(v.sizeFromShape(r.shape)===0)return m;let g=t.dataIdMap.get(r.dataId),y;g.dtype!=="float32"&&(y=ud({backend:t,inputs:{x:r},attrs:{dtype:"float32"}}),g=t.dataIdMap.get(y.dataId));let x=g.id,A=t.dataIdMap.get(m.dataId).id;return FC(x,c,p,d,h,l,u,a?1:0,o?1:0,A),y!=null&&t.disposeData(y.dataId),m}var Tfe={kernelName:Yo,backendName:"wasm",setupFunc:Ife,kernelFunc:Cfe},OC;function Nfe(e){OC=e.wasm.cwrap(Ll,null,["number","array","number","array","number","number"])}function Efe(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{dims:a}=s,o=v.parseAxisParam(a,r.shape);if(r.shape.length===0)return h2({inputs:{x:r},backend:n});let i=n.makeOutput(r.shape,r.dtype),l=n.dataIdMap.get(r.dataId).id,u=n.dataIdMap.get(i.dataId).id,c=new Uint8Array(new Int32Array(o).buffer),p=new Uint8Array(new Int32Array(r.shape).buffer);OC(l,c,o.length,p,r.shape.length,u);let d=xs({inputs:{x:i},attrs:{shape:r.shape},backend:n});return n.disposeData(i.dataId),d}var Rfe={kernelName:Ll,backendName:"wasm",kernelFunc:Efe,setupFunc:Nfe},MC;function _fe(e){MC=e.wasm.cwrap(Ql,null,["number","number","number","number","number","number","number","number","array","number","number"])}function Dfe(e){let{inputs:t,backend:n,attrs:s}=e,{image:r}=t,{radians:a,fillValue:o,center:i}=s,l=n.makeOutput(r.shape,r.dtype),u=n.dataIdMap.get(r.dataId).id,c=n.dataIdMap.get(l.dataId).id,[p,d,h,f]=r.shape,[m,g]=T.getImageCenter(i,d,h),y=o===0,x=255,A=typeof o=="number"?[o,o,o,y?0:x]:[...o,x],b=new Uint8Array(new Int32Array(A).buffer);return MC(u,p,d,h,f,a,m,g,b,A.length,c),l}var $fe={kernelName:Ql,backendName:"wasm",kernelFunc:Dfe,setupFunc:_fe},Pfe=Rn(Bl),Ffe=Rn(ei),zC;function Ofe(e){zC=e.wasm.cwrap(Wl,null,["number","number","number","number","number","number","array","number","number"])}function Mfe(e){let{backend:t,inputs:n,attrs:s}=e,{indices:r,updates:a}=n,{shape:o}=s,i=t.makeOutput(o,a.dtype);if(v.sizeFromShape(o)===0)return i;let{sliceRank:l,numUpdates:u,sliceSize:c,strides:p,outputSize:d}=Oy.calculateShapes(a,r,o),f=t.dataIdMap.get(r.dataId).id,g=t.dataIdMap.get(a.dataId).id,y=new Uint8Array(new Int32Array(p).buffer),x=t.dataIdMap.get(i.dataId).id;return zC(f,g,qt[a.dtype],l,u,c,y,d,x),i}var zfe={kernelName:Wl,backendName:"wasm",setupFunc:Ofe,kernelFunc:Mfe},LC;function Lfe(e){LC=e.wasm.cwrap("SelectV2",null,["number","number","number","number","number"])}function Bfe(e){let{inputs:t,backend:n}=e,{condition:s,t:r,e:a}=t,o=n.dataIdMap.get(s.dataId).id,i=n.dataIdMap.get(r.dataId).id,l=n.dataIdMap.get(a.dataId).id,u=n.makeOutput(r.shape,r.dtype),c=n.dataIdMap.get(u.dataId).id,p=s.shape.length,d=r.shape.length,h=p===0||p>1||d===1?1:v.sizeFromShape(r.shape.slice(1));return LC(o,i,l,h,c),u}var Wfe={kernelName:Vl,backendName:"wasm",kernelFunc:Bfe,setupFunc:Lfe},BC;function Vfe(e){BC=e.wasm.cwrap(ni,null,["number","number"])}function Ufe(e){let{backend:t,inputs:{x:n}}=e,s=t.dataIdMap.get(n.dataId).id,r=t.makeOutput(n.shape,n.dtype),a=t.dataIdMap.get(r.dataId).id;return v.sizeFromShape(r.shape)===0||BC(s,a),r}var Gfe={kernelName:"Sigmoid",backendName:"wasm",setupFunc:Vfe,kernelFunc:Ufe},Hfe=Rn(ti),WC;function jfe(e){WC=e.wasm.cwrap(ai,null,["number","number","number","number"])}function qfe(e){let{backend:t,inputs:{logits:n},attrs:{dim:s}}=e,r=t.dataIdMap.get(n.dataId).id,a=t.makeOutput(n.shape,n.dtype),o=t.dataIdMap.get(a.dataId).id,i=n.shape[s],l=v.sizeFromShape(n.shape)/i;return v.sizeFromShape(a.shape)===0||WC(r,o,i,l),a}var Xfe={kernelName:ai,backendName:"wasm",setupFunc:jfe,kernelFunc:qfe};function Kfe(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{blockShape:a,paddings:o}=s,i=v.sizeFromShape(a),l=[[0,0]];l.push(...o);for(let k=1+a.length;k0?l+1:0;if(c<0)throw new Error(T.getSparseSegmentReductionNegativeSegmentIdsErrorMessage());let p=r.shape.slice();p[0]=c;let d=n.dataIdMap.get(r.dataId).id,h=n.dataIdMap.get(a.dataId).id,f=n.dataIdMap.get(o.dataId).id,m=n.makeOutput(p,r.dtype),g=n.dataIdMap.get(m.dataId).id,y=n.makeOutput([4],"int32"),x=n.dataIdMap.get(y.dataId).id;oT(d,Kt[r.dtype],r.shape[0],h,f,g,x,t,0);let A=n.readSync(y.dataId),b;switch(A[0]){case 0:{b=T.getSparseSegmentReductionNegativeSegmentIdsErrorMessage();break}case 1:{b=T.getSparseSegmentReductionNonIncreasingSegmentIdsErrorMessage();break}case 2:b=T.getSparseSegmentReductionSegmentIdOutOfRangeErrorMessage(A[1],A[2]);break;case 3:b=T.getSparseSegmentReductionIndicesOutOfRangeErrorMessage(A[1],A[2],A[3]);break;default:b=""}if(n.disposeData(y.dataId),b)throw n.disposeData(m.dataId),new Error(b);return m}function wme(e){return lT(e,!0)}var kme={kernelName:nh,backendName:"wasm",setupFunc:iT,kernelFunc:wme};function Sme(e){return lT(e,!1)}var Ime={kernelName:sh,backendName:"wasm",setupFunc:iT,kernelFunc:Sme};function Cme(e){let{inputs:t,attrs:n,backend:s}=e,{x:r}=t,{numOrSizeSplits:a,axis:o}=n,i=v.parseAxisParam(o,r.shape)[0],l=T.prepareSplitSize(r,a,i),u=new Array(r.shape.length).fill(0),c=r.shape.slice();return l.map(p=>{let d=[...c];d[i]=p;let h=yl({inputs:{x:r},attrs:{begin:u,size:d},backend:s});return u[i]+=p,h})}var Tme={kernelName:eu,backendName:"wasm",kernelFunc:Cme},Nme=_n(oi),Eme=_n(Zc),Rme=!0,_me=Wn(ui,Rme),uT;function Dme(e){uT=e.wasm.cwrap(pi,null,["number","number","number","number"])}function $me(e){let{backend:t,inputs:n,attrs:s}=e,{alpha:r}=s,{x:a}=n,o=t.dataIdMap.get(a.dataId).id,i=t.makeOutput(a.shape,a.dtype),l=t.dataIdMap.get(i.dataId).id;return uT(o,r,Kt[a.dtype],l),i}var Pme={kernelName:pi,backendName:"wasm",setupFunc:Dme,kernelFunc:$me},cT;function Fme(e){cT=e.wasm.cwrap(tu,null,["number","array","number","array","array","array","array","array","number","number"])}function Ome(e){let{backend:t,inputs:n,attrs:s}=e,{x:r}=n,{begin:a,end:o,strides:i,beginMask:l,endMask:u,ellipsisMask:c,newAxisMask:p,shrinkAxisMask:d}=s,{finalShapeSparse:h,finalShape:f,isIdentity:m,sliceDim0:g,isSimpleSlice:y,begin:x,end:A,strides:b}=jt.sliceInfo(r.shape,a,o,i,l,u,c,p,d),w;if(m)w=vs({inputs:{x:r},backend:t,attrs:{shape:f}});else if(g||y){v.assert(r.shape.length>=1,()=>`Input must have rank at least 1, got: ${r.shape.length}`);let k=jt.computeOutShape(x,A,b),C=yl({inputs:{x:r},backend:t,attrs:{begin:x,size:k}});w=vs({inputs:{x:C},backend:t,attrs:{shape:f}}),t.disposeData(C.dataId)}else{let k=t.makeOutput(h,"float32"),C=t.dataIdMap.get(r.dataId).id,E=new Uint8Array(new Int32Array(v.computeStrides(r.shape)).buffer),_=new Uint8Array(new Int32Array(x).buffer),$=new Uint8Array(new Int32Array(A).buffer),R=new Uint8Array(new Int32Array(b).buffer),P=new Uint8Array(new Int32Array(h).buffer),S=new Uint8Array(new Int32Array(v.computeStrides(h)).buffer),M=t.dataIdMap.get(k.dataId).id;cT(C,E,r.shape.length,_,$,R,P,S,h.length,M),w=vs({inputs:{x:k},backend:t,attrs:{shape:f}}),t.disposeData(k.dataId)}return w}var Mme={kernelName:tu,backendName:"wasm",setupFunc:Fme,kernelFunc:Ome};function zme(e){let{backend:t,inputs:n,attrs:s}=e,{data:r,dataSplits:a}=n,{separator:o,nGramWidths:i,leftPad:l,rightPad:u,padWidth:c,preserveShortSequences:p}=s,d=t.readSync(r.dataId),h=t.readSync(a.dataId),[f,m]=Jx(d,h,o,i,l,u,c,p),g=t.makeOutput([f.length],"string"),y=t.dataIdMap.get(g.dataId);y.stringBytes=f;let x=t.makeOutput(a.shape,"int32");return t.typedArrayFromHeap(x).set(m),[g,x]}var Lme={kernelName:Yc,backendName:"wasm",kernelFunc:zme};function Bme(e){let{backend:t,inputs:n,attrs:s}=e,{input:r,delimiter:a}=n,{skipEmpty:o}=s,i=t.readSync(r.dataId),l=t.readSync(a.dataId),[u,c,p]=Qx(i,l[0],o),d=c.length,h=t.makeOutput([d,2],"int32");t.typedArrayFromHeap(h).set(u);let m=t.makeOutput([d],"string"),g=t.dataIdMap.get(m.dataId);g.stringBytes=c;let y=t.makeOutput([2],"int32");return t.typedArrayFromHeap(y).set(p),[h,m,y]}var Wme={kernelName:ah,backendName:"wasm",kernelFunc:Bme};function Vme(e){let{backend:t,inputs:n,attrs:s}=e,{input:r}=n,{numBuckets:a}=s,o=t.readSync(r.dataId),i=eb(o,a),l=t.makeOutput(r.shape,"int32");return t.typedArrayFromHeap(l).set(i),l}var Ume={kernelName:oh,backendName:"wasm",kernelFunc:Vme},Gme=!0,Hme=Wn(ci,Gme),dT;function jme(e){dT=e.wasm.cwrap(ii,null,["number","number","number","number"])}function qme(e){let{backend:t,inputs:n,attrs:s}=e,{axis:r,keepDims:a}=s,{x:o}=n,i=t.dataIdMap.get(o.dataId).id,l=i,u=o,{transposed:c,axes:p,originalAxes:d,inputWasTransposed:h}=bi(o,r,t),f=p;if(h){let A=t.dataIdMap.get(c.dataId).id;A!==i&&(u=c,l=A,f=T.getInnerMostAxes(f.length,u.shape.length))}T.assertAxesAreInnerMostDims("sum",f,u.shape.length);let[m,g]=T.computeOutAndReduceShapes(u.shape,f),y=v.sizeFromShape(g),x=t.makeOutput(m,u.dtype);if(v.sizeFromShape(u.shape)!==0){let A=t.dataIdMap.get(x.dataId).id;dT(l,y,Kt[x.dtype],A)}if(h&&t.disposeData(c.dataId),a){let A=T.expandShapeToKeepDim(x.shape,d);x.shape=A}return x}var Xme={kernelName:ii,backendName:"wasm",setupFunc:jme,kernelFunc:qme},Kme=_n(nu),Zme=_n(di),pT;function Yme(e){pT=e.wasm.cwrap(Pa,null,["number","array","number","array","number","number"])}function Jme(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,a=n.dataIdMap.get(r.dataId).id,{reps:o}=s,i=new Array(r.shape.length);for(let d=0;d{let{x:s}=e,{k:r,sorted:a}=n,o=t.dataIdMap.get(s.dataId).id,i=new Uint8Array(new Int32Array(s.shape).buffer),l=s.shape.slice();l[l.length-1]=r;let u=t.makeOutput(l,s.dtype),c=t.dataIdMap.get(u.dataId).id,p=t.makeOutput(l,"int32"),d=t.dataIdMap.get(p.dataId).id;return hT(o,i,s.shape.length,Kt[s.dtype],r,a,c,d),[u,p]},n0e={kernelName:su,backendName:"wasm",setupFunc:e0e,kernelFunc:t0e},fT;function s0e(e){fT=e.wasm.cwrap(ru,null,["number","number","bool","number","number","number","number","number","number","array","number","array","number","number","number","number","number"])}function r0e(e){let{backend:t,inputs:n,attrs:s}=e,{image:r,transforms:a}=n,{interpolation:o,fillMode:i,fillValue:l,outputShape:u}=s,[c,p,d,h]=r.shape,[f,m]=u!=null?u:[p,d],g=[c,f,m,h],y=new Uint8Array(new Int32Array(v.computeStrides(r.shape)).buffer),x=new Uint8Array(new Int32Array(v.computeStrides(g)).buffer),A=t.makeOutput(g,r.dtype),b=t.dataIdMap.get(A.dataId).id,k=t.dataIdMap.get(r.dataId).id,E=t.dataIdMap.get(a.dataId).id,_=o==="nearest"?1:2,$;switch(i){case"constant":$=1;break;case"reflect":$=2;break;case"wrap":$=3;break;case"nearest":$=4;break;default:$=1;break}return fT(k,E,a.shape[0]>1,c,f,m,h,d,p,y,r.shape.length-1,x,g.length-1,_,$,l,b),A}var a0e={kernelName:ru,backendName:"wasm",setupFunc:s0e,kernelFunc:r0e};function o0e(e){let{inputs:t,backend:n,attrs:s}=e,{value:r}=t,{axis:a}=s;a<0&&(a+=r.shape.length);let o=r.shape[a],i=r.shape.length,l=new Array(i-1),u=0;for(let h=0;h({dataId:h,dtype:f,shape:l}))}var i0e={kernelName:au,backendName:"wasm",kernelFunc:o0e};function l0e(e){let{inputs:{x:t},backend:n}=e,s=n.makeOutput(t.shape,t.dtype);return n.typedArrayFromHeap(s).fill(0),s}var u0e={kernelName:ou,backendName:"wasm",kernelFunc:l0e},c0e=[zde,Lde,Wde,Gde,Jde,tpe,rpe,ipe,dpe,ype,Ape,xpe,wpe,kpe,Cpe,Epe,Rpe,_pe,Ppe,Mpe,Bpe,Upe,jpe,qpe,Kpe,Zpe,Ype,Jpe,the,nhe,rhe,ihe,che,hhe,ghe,xhe,vhe,khe,Hde,Che,Nhe,Rhe,_he,$he,Phe,Ohe,zhe,Whe,Uhe,jhe,Khe,Jhe,efe,sfe,afe,ofe,ufe,pfe,mfe,yfe,bfe,wfe,Sfe,qC,Nfe,_fe,Pfe,Ofe,zfe,Lfe,Bfe,lpe,Ufe,jfe,Kfe,Jfe,Qfe,eme,sme,ome,ume,cme,mpe,hme,mme,Ame,vme,kme,Ime,Tme,Nme,Eme,_me,Pme,Mme,Lme,Wme,Ume,Hme,Xme,Kme,Zme,Qme,n0e,a0e,Kde,i0e,u0e];for(let e of c0e)rr(e);var Ry=H();Ry.registerFlag("WASM_HAS_SIMD_SUPPORT",async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,65,0,253,15,26,11])));Ry.registerFlag("WASM_HAS_MULTITHREAD_SUPPORT",async()=>{if(Ry.get("IS_NODE"))return!1;try{return new MessageChannel().port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]))}catch(e){return!1}});var r6=yo(tD()),d0e=yo(nD()),a6=yo(sD()),o6=r6.default||r6,p0e=a6.default||a6,mT=class extends Cc{constructor(e){super(),this.wasm=e,this.dataIdNextNumber=1,this.wasm.tfjs.initWithThreadsCount(gT),_y=this.wasm.tfjs.getThreadsCount(),this.dataIdMap=new Gp(this,Qt())}write(e,t,n){let s={id:this.dataIdNextNumber++};return this.move(s,e,t,n,1),s}numDataIds(){return this.dataIdMap.numDataIds()}async time(e){let t=v.now();return e(),{kernelMs:v.now()-t}}move(e,t,n,s,r){let a=this.dataIdNextNumber++;if(s==="string"){let u=t;this.dataIdMap.set(e,{id:a,stringBytes:u,shape:n,dtype:s,memoryOffset:null,refCount:r});return}let o=v.sizeFromShape(n),i=o*v.bytesPerElement(s),l=this.wasm._malloc(i);this.dataIdMap.set(e,{id:a,memoryOffset:l,shape:n,dtype:s,refCount:r}),this.wasm.tfjs.registerTensor(a,o,l),t!=null&&this.wasm.HEAPU8.set(new Uint8Array(t.buffer,t.byteOffset,i),l)}async read(e){return this.readSync(e)}readSync(e,t,n){let{memoryOffset:s,dtype:r,shape:a,stringBytes:o}=this.dataIdMap.get(e);if(r==="string")return(t==null||t===0)&&(n==null||n>=o.length)?o:o.slice(t,n);t=t||0,n=n||v.sizeFromShape(a);let i=v.bytesPerElement(r),l=this.wasm.HEAPU8.slice(s+t*i,s+n*i);return m0e(l.buffer,r)}disposeData(e,t=!1){if(this.dataIdMap.has(e)){let n=this.dataIdMap.get(e);if(n.refCount--,!t&&n.refCount>0)return!1;this.wasm._free(n.memoryOffset),this.wasm.tfjs.disposeData(n.id),this.dataIdMap.delete(e)}return!0}refCount(e){return this.dataIdMap.has(e)?this.dataIdMap.get(e).refCount:0}incRef(e){let t=this.dataIdMap.get(e);t!=null&&t.refCount++}floatPrecision(){return 32}getMemoryOffset(e){return this.dataIdMap.get(e).memoryOffset}dispose(){this.wasm.tfjs.dispose(),"PThread"in this.wasm&&this.wasm.PThread.terminateAllThreads(),this.wasm=null}memory(){return{unreliable:!1}}makeOutput(e,t,n){let s;if(n==null)s=this.write(null,e,t);else{let r=this.dataIdNextNumber++;s={id:r},this.dataIdMap.set(s,{id:r,memoryOffset:n,shape:e,dtype:t,refCount:1});let a=v.sizeFromShape(e);this.wasm.tfjs.registerTensor(r,a,n)}return{dataId:s,shape:e,dtype:t}}typedArrayFromHeap({shape:e,dtype:t,dataId:n}){let s=this.wasm.HEAPU8.buffer,{memoryOffset:r}=this.dataIdMap.get(n),a=v.sizeFromShape(e);switch(t){case"float32":return new Float32Array(s,r,a);case"int32":return new Int32Array(s,r,a);case"bool":return new Uint8Array(s,r,a);default:throw new Error(`Unknown dtype ${t}`)}}};function h0e(e){return(t,n)=>(v.fetch(e,{credentials:"same-origin"}).then(s=>{s.ok||t.env.a(`failed to load wasm binary file at '${e}'`),s.arrayBuffer().then(r=>{WebAssembly.instantiate(r,t).then(a=>{n(a.instance,a.module)})})}),{})}function i6(e,t,n){if(Zm!=null)return Zm;let s="tfjs-backend-wasm.wasm";return e&&t?s="tfjs-backend-wasm-threaded-simd.wasm":e&&(s="tfjs-backend-wasm-simd.wasm"),vp!=null&&vp[s]!=null?vp[s]:n+s}async function f0e(){let[e,t]=await Promise.all([H().getAsync("WASM_HAS_SIMD_SUPPORT"),H().getAsync("WASM_HAS_MULTITHREAD_SUPPORT")]);return new Promise((n,s)=>{let r={};r.locateFile=(i,l)=>{if(i.endsWith(".worker.js")){let u=d0e.wasmWorkerContents.replace(/\n/g,"\\n"),c=new Blob([u],{type:"application/javascript"});return URL.createObjectURL(c)}return i.endsWith(".wasm")?i6(e,t,yp!=null?yp:l):l+i},xb&&(r.instantiateWasm=h0e(i6(e,t,yp!=null?yp:"")));let a=!1;r.onAbort=()=>{if(a||wp)return;wp=!0,s({message:"Make sure the server can serve the `.wasm` file relative to the bundled js file. For more details see https://github.com/tensorflow/tfjs/blob/master/tfjs-backend-wasm/README.md#using-bundlers"})};let o;t&&e&&Zm==null?(r.mainScriptUrlOrBlob=new Blob(["var WasmBackendModuleThreadedSimd = "+o6.toString()],{type:"text/javascript"}),o=o6(r)):o=p0e(r),o.then(i=>{a=!0,wp=!1;let l=null;i.tfjs={init:i.cwrap("init",null,[]),initWithThreadsCount:i.cwrap("init_with_threads_count",null,["number"]),getThreadsCount:i.cwrap("get_threads_count","number",[]),registerTensor:i.cwrap("register_tensor",null,["number","number","number"]),disposeData:i.cwrap("dispose_data",l,["number"]),dispose:i.cwrap("dispose",l,[])},n({wasm:i})}).catch(s)})}function m0e(e,t){switch(t){case"float32":return new Float32Array(e);case"int32":return new Int32Array(e);case"bool":return new Uint8Array(e);default:throw new Error(`Unknown dtype ${t}`)}}var g0e=["tfjs-backend-wasm.wasm","tfjs-backend-wasm-simd.wasm","tfjs-backend-wasm-threaded-simd.wasm"],Zm=null,yp=null,vp={},wp=!1,xb=!1;function y0e(e,t=!1){if(Qy("setWasmPath has been deprecated in favor of setWasmPaths and will be removed in a future release."),wp)throw new Error("The WASM backend was already initialized. Make sure you call `setWasmPath()` before you call `tf.setBackend()` or `tf.ready()`");Zm=e,xb=t}function L2(e,t=!1){if(wp)throw new Error("The WASM backend was already initialized. Make sure you call `setWasmPaths()` before you call `tf.setBackend()` or `tf.ready()`");if(typeof e=="string")yp=e;else{vp=e;let n=g0e.filter(s=>vp[s]==null);if(n.length>0)throw new Error(`There were no entries found for the following binaries: ${n.join(",")}. Please either call setWasmPaths with a map providing a path for each binary, or with a string indicating the directory where all the binaries can be found.`)}xb=t}var gT=-1,_y=-1;function A0e(e){gT=e}function x0e(){if(_y===-1)throw new Error("WASM backend not initialized.");return _y}var b0e="3.20.0",v0e=2;lu("wasm",async()=>{let{wasm:e}=await f0e();return new mT(e)},v0e);var vi=H();vi.registerFlag("WEBGPU_DEFERRED_SUBMIT_BATCH_SIZE",()=>15);vi.registerFlag("WEBGPU_CPU_FORWARD",()=>!0);vi.registerFlag("WEBGPU_MATMUL_PROGRAM_TYPE",()=>-1);vi.registerFlag("WEBGPU_USE_NAIVE_CONV2D_TRANSPOSE",()=>!1);vi.registerFlag("WEBGPU_USE_LOW_POWER_GPU",()=>!1);vi.registerFlag("WEBGPU_CPU_HANDOFF_SIZE_THRESHOLD",()=>1e3);vi.registerFlag("WEBGPU_USE_PROFILE_TOOL",()=>!1);vi.registerFlag("WEBGPU_IMPORT_EXTERNAL_TEXTURE",()=>!0);var w0e=class{constructor(e){this.device=e,this.numUsedBuffers=0,this.numFreeBuffers=0,this.freeBuffers=new Map,this.usedBuffers=new Map,this.numBytesUsed=0,this.numBytesAllocated=0}acquireUploadBuffer(e,t){return this.acquireBuffer(e,t,!0)}acquireBuffer(e,t,n=!1){let s=l6(e,t);if(this.freeBuffers.has(s)||this.freeBuffers.set(s,[]),this.usedBuffers.has(s)||this.usedBuffers.set(s,[]),this.numBytesUsed+=e,this.numUsedBuffers++,this.freeBuffers.get(s).length>0){this.numFreeBuffers--;let a=this.freeBuffers.get(s).shift();return this.usedBuffers.get(s).push(a),a}this.numBytesAllocated+=e;let r=this.device.createBuffer({size:e,usage:t,mappedAtCreation:n});return this.usedBuffers.get(s).push(r),r}releaseBuffer(e,t,n){if(this.freeBuffers.size===0)return;let s=l6(t,n);this.freeBuffers.has(s)||this.freeBuffers.set(s,[]),this.freeBuffers.get(s).push(e),this.numFreeBuffers++,this.numUsedBuffers--;let r=this.usedBuffers.get(s),a=r.indexOf(e);if(a<0)throw new Error("Cannot release a buffer that was never provided by this buffer manager");r.splice(a,1),this.numBytesUsed-=t}releaseUploadBuffer(e,t,n){e.mapAsync(GPUMapMode.WRITE).then(()=>{this.releaseBuffer(e,t,n)},s=>{})}getNumUsedBuffers(){return this.numUsedBuffers}getNumFreeBuffers(){return this.numFreeBuffers}dispose(){this.freeBuffers.forEach((e,t)=>{e.forEach(n=>{n.destroy()})}),this.usedBuffers.forEach((e,t)=>{e.forEach(n=>{n.destroy()})}),this.freeBuffers=new Map,this.usedBuffers=new Map,this.numUsedBuffers=0,this.numFreeBuffers=0,this.numBytesUsed=0,this.numBytesAllocated=0}};function l6(e,t){return`${e}_${t}`}var k0e=class{constructor(e){this.device=e,this.numUsedTextures=0,this.numFreeTextures=0,this.freeTextures=new Map,this.usedTextures=new Map,this.numBytesUsed=0,this.numBytesAllocated=0}acquireTexture(e,t,n,s){let r=c6(n),a=e*t*r,o=u6(e,t,n,s);if(this.freeTextures.has(o)||this.freeTextures.set(o,[]),this.usedTextures.has(o)||this.usedTextures.set(o,[]),this.numBytesUsed+=a,this.numUsedTextures++,this.freeTextures.get(o).length>0){this.numFreeTextures--;let l=this.freeTextures.get(o).shift();return this.usedTextures.get(o).push(l),l}this.numBytesAllocated+=a;let i=this.device.createTexture({size:[e,t],format:n,usage:s});return this.usedTextures.get(o).push(i),i}releaseTexture(e,t,n,s,r){if(this.freeTextures.size===0)return;let a=u6(t,n,s,r);this.freeTextures.has(a)||this.freeTextures.set(a,[]),this.freeTextures.get(a).push(e),this.numFreeTextures++,this.numUsedTextures--;let o=this.usedTextures.get(a),i=o.indexOf(e);if(i<0)throw new Error("Cannot release a texture that was never provided by this texture manager");o.splice(i,1);let l=c6(s),u=t*n*l;this.numBytesUsed-=u}getNumUsedTextures(){return this.numUsedTextures}getNumFreeTextures(){return this.numFreeTextures}dispose(){this.freeTextures.forEach((e,t)=>{e.forEach(n=>{n.destroy()})}),this.usedTextures.forEach((e,t)=>{e.forEach(n=>{n.destroy()})}),this.freeTextures=new Map,this.usedTextures=new Map,this.numUsedTextures=0,this.numFreeTextures=0,this.numBytesUsed=0,this.numBytesAllocated=0}};function u6(e,t,n,s){return`${e}_${t}_${n}_${s}`}function c6(e){if(e==="rgba8unorm")return 16;throw new Error(`${e} is not supported!`)}function S0e(e,t){if(Math.max(...e)>3)throw new Error("Cannot symbolically compute strides for rank > 4 tensor.");let n=e.length,s=e.map(a=>`${t}[${a}]`),r=new Array(n-1);r[n-2]=s[n-1];for(let a=n-3;a>=0;--a)r[a]=`(${r[a+1]} * ${s[a+1]})`;return r}var I0e=(e,t,n,s)=>{let r={dtype:s.dtype,shape:s.shape},a=C0e(n,r,t),o=e.createShaderModule({code:a,label:t.constructor.name});return e.createComputePipeline({compute:{module:o,entryPoint:"_start"},label:t.constructor.name,layout:"auto"})};function Mn(e){if(e<=1)return"i32";if(e===2)return"vec2";if(e===3)return"vec3";if(e===4)return"vec4";if(e===5)return"vec5";if(e===6)return"vec6";throw Error(`GPU for rank ${e} is not yet supported`)}function Ca(e){if(e===0)return"x";if(e===1)return"y";if(e===2)return"z";if(e===3)return"w";if(e===4)return"u";if(e===5)return"v";throw Error(`Index ${e} is not yet supported`)}function nt(...e){let t;switch(e.length){case 0:t=` - ${Vp()} + ${r.shape}`);if(a.shape.length!==1)throw new Error(`Target shape should be a vector but received shape ${a.shape}`);let o=t.dataIdMap.get(s.dataId).id,i=t.dataIdMap.get(r.dataId).id,l=t.dataIdMap.get(a.dataId).id,u=s.shape[0],c=v.sizeFromShape(a.shape),p=t.makeOutput([u,c],s.dtype),d=t.dataIdMap.get(p.dataId).id,h=t.makeOutput([c],a.dtype),f=t.dataIdMap.get(h.dataId).id,m=t.makeOutput([3],"int32"),g=t.dataIdMap.get(m.dataId).id;UC(o,i,l,u,d,f,g);let y=t.readSync(m.dataId),x;switch(y[0]){case 0:{x=T.getSparseReshapeMultipleNegativeOneOutputDimErrorMessage(y[1],y[2]);break}case 1:{x=T.getSparseReshapeNegativeOutputDimErrorMessage(y[1],y[2]);break}case 2:x=T.getSparseReshapeEmptyTensorZeroOutputDimErrorMessage();break;case 3:{let A=Array.from(t.readSync(r.dataId)),b=Array.from(t.readSync(h.dataId));x=T.getSparseReshapeInputOutputMultipleErrorMessage(A,b);break}case 4:{let A=Array.from(t.readSync(r.dataId)),b=Array.from(t.readSync(h.dataId));x=T.getSparseReshapeInputOutputMismatchErrorMessage(A,b);break}default:x=""}if(t.disposeData(m.dataId),x)throw t.disposeData(p.dataId),t.disposeData(h.dataId),new Error(x);return[p,h]}var nme={kernelName:Mc,backendName:"wasm",setupFunc:eme,kernelFunc:tme},GC;function HC(e){GC=e.wasm.cwrap("SparseSegmentReduction",null,["number","number","number","number","number","number","number","number","number"])}function jC(e,t){let{backend:n,inputs:s}=e,{data:r,indices:a,segmentIds:o}=s,i=a.shape[0],l=n.readSync(o.dataId,i-1,i)[0],c=i>0?l+1:0;if(c<0)throw new Error(T.getSparseSegmentReductionNegativeSegmentIdsErrorMessage());let p=r.shape.slice();p[0]=c;let d=n.dataIdMap.get(r.dataId).id,h=n.dataIdMap.get(a.dataId).id,f=n.dataIdMap.get(o.dataId).id,m=n.makeOutput(p,r.dtype),g=n.dataIdMap.get(m.dataId).id,y=n.makeOutput([4],"int32"),x=n.dataIdMap.get(y.dataId).id;GC(d,qt[r.dtype],r.shape[0],h,f,g,x,t,0);let A=n.readSync(y.dataId),b;switch(A[0]){case 0:{b=T.getSparseSegmentReductionNegativeSegmentIdsErrorMessage();break}case 1:{b=T.getSparseSegmentReductionNonIncreasingSegmentIdsErrorMessage();break}case 2:b=T.getSparseSegmentReductionSegmentIdOutOfRangeErrorMessage(A[1],A[2]);break;case 3:b=T.getSparseSegmentReductionIndicesOutOfRangeErrorMessage(A[1],A[2],A[3]);break;default:b=""}if(n.disposeData(y.dataId),b)throw n.disposeData(m.dataId),new Error(b);return m}function sme(e){return jC(e,!0)}var rme={kernelName:Lp,backendName:"wasm",setupFunc:HC,kernelFunc:sme};function ame(e){return jC(e,!1)}var ome={kernelName:Bp,backendName:"wasm",setupFunc:HC,kernelFunc:ame};function ime(e){let{inputs:t,attrs:n,backend:s}=e,{x:r}=t,{numOrSizeSplits:a,axis:o}=n,i=v.parseAxisParam(o,r.shape)[0],l=T.prepareSplitSize(r,a,i),u=new Array(r.shape.length).fill(0),c=r.shape.slice();return l.map(p=>{let d=[...c];d[i]=p;let h=ul({inputs:{x:r},attrs:{begin:u,size:d},backend:s});return u[i]+=p,h})}var lme={kernelName:jl,backendName:"wasm",kernelFunc:ime},ume=Rn(si),cme=Rn(zc),dme=!0,pme=Vn(oi,dme),qC;function hme(e){qC=e.wasm.cwrap(ui,null,["number","number","number","number"])}function fme(e){let{backend:t,inputs:n,attrs:s}=e,{alpha:r}=s,{x:a}=n,o=t.dataIdMap.get(a.dataId).id,i=t.makeOutput(a.shape,a.dtype),l=t.dataIdMap.get(i.dataId).id;return qC(o,r,qt[a.dtype],l),i}var mme={kernelName:ui,backendName:"wasm",setupFunc:hme,kernelFunc:fme},XC;function gme(e){XC=e.wasm.cwrap(ql,null,["number","array","number","array","array","array","array","array","number","number"])}function yme(e){let{backend:t,inputs:n,attrs:s}=e,{x:r}=n,{begin:a,end:o,strides:i,beginMask:l,endMask:u,ellipsisMask:c,newAxisMask:p,shrinkAxisMask:d}=s,{finalShapeSparse:h,finalShape:f,isIdentity:m,sliceDim0:g,isSimpleSlice:y,begin:x,end:A,strides:b}=Gt.sliceInfo(r.shape,a,o,i,l,u,c,p,d),w;if(m)w=xs({inputs:{x:r},backend:t,attrs:{shape:f}});else if(g||y){v.assert(r.shape.length>=1,()=>`Input must have rank at least 1, got: ${r.shape.length}`);let k=Gt.computeOutShape(x,A,b),C=ul({inputs:{x:r},backend:t,attrs:{begin:x,size:k}});w=xs({inputs:{x:C},backend:t,attrs:{shape:f}}),t.disposeData(C.dataId)}else{let k=t.makeOutput(h,"float32"),C=t.dataIdMap.get(r.dataId).id,N=new Uint8Array(new Int32Array(v.computeStrides(r.shape)).buffer),R=new Uint8Array(new Int32Array(x).buffer),D=new Uint8Array(new Int32Array(A).buffer),E=new Uint8Array(new Int32Array(b).buffer),$=new Uint8Array(new Int32Array(h).buffer),S=new Uint8Array(new Int32Array(v.computeStrides(h)).buffer),F=t.dataIdMap.get(k.dataId).id;XC(C,N,r.shape.length,R,D,E,$,S,h.length,F),w=xs({inputs:{x:k},backend:t,attrs:{shape:f}}),t.disposeData(k.dataId)}return w}var Ame={kernelName:ql,backendName:"wasm",setupFunc:gme,kernelFunc:yme};function xme(e){let{backend:t,inputs:n,attrs:s}=e,{data:r,dataSplits:a}=n,{separator:o,nGramWidths:i,leftPad:l,rightPad:u,padWidth:c,preserveShortSequences:p}=s,d=t.readSync(r.dataId),h=t.readSync(a.dataId),[f,m]=Dx(d,h,o,i,l,u,c,p),g=t.makeOutput([f.length],"string"),y=t.dataIdMap.get(g.dataId);y.stringBytes=f;let x=t.makeOutput(a.shape,"int32");return t.typedArrayFromHeap(x).set(m),[g,x]}var bme={kernelName:Lc,backendName:"wasm",kernelFunc:xme};function vme(e){let{backend:t,inputs:n,attrs:s}=e,{input:r,delimiter:a}=n,{skipEmpty:o}=s,i=t.readSync(r.dataId),l=t.readSync(a.dataId),[u,c,p]=$x(i,l[0],o),d=c.length,h=t.makeOutput([d,2],"int32");t.typedArrayFromHeap(h).set(u);let m=t.makeOutput([d],"string"),g=t.dataIdMap.get(m.dataId);g.stringBytes=c;let y=t.makeOutput([2],"int32");return t.typedArrayFromHeap(y).set(p),[h,m,y]}var wme={kernelName:Vp,backendName:"wasm",kernelFunc:vme};function kme(e){let{backend:t,inputs:n,attrs:s}=e,{input:r}=n,{numBuckets:a}=s,o=t.readSync(r.dataId),i=Px(o,a),l=t.makeOutput(r.shape,"int32");return t.typedArrayFromHeap(l).set(i),l}var Sme={kernelName:Up,backendName:"wasm",kernelFunc:kme},Ime=!0,Cme=Vn(ii,Ime),KC;function Tme(e){KC=e.wasm.cwrap(ri,null,["number","number","number","number"])}function Nme(e){let{backend:t,inputs:n,attrs:s}=e,{axis:r,keepDims:a}=s,{x:o}=n,i=t.dataIdMap.get(o.dataId).id,l=i,u=o,{transposed:c,axes:p,originalAxes:d,inputWasTransposed:h}=yi(o,r,t),f=p;if(h){let A=t.dataIdMap.get(c.dataId).id;A!==i&&(u=c,l=A,f=T.getInnerMostAxes(f.length,u.shape.length))}T.assertAxesAreInnerMostDims("sum",f,u.shape.length);let[m,g]=T.computeOutAndReduceShapes(u.shape,f),y=v.sizeFromShape(g),x=t.makeOutput(m,u.dtype);if(v.sizeFromShape(u.shape)!==0){let A=t.dataIdMap.get(x.dataId).id;KC(l,y,qt[x.dtype],A)}if(h&&t.disposeData(c.dataId),a){let A=T.expandShapeToKeepDim(x.shape,d);x.shape=A}return x}var Eme={kernelName:ri,backendName:"wasm",setupFunc:Tme,kernelFunc:Nme},Rme=Rn(Xl),_me=Rn(li),ZC;function Dme(e){ZC=e.wasm.cwrap(Ea,null,["number","array","number","array","number","number"])}function $me(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,a=n.dataIdMap.get(r.dataId).id,{reps:o}=s,i=new Array(r.shape.length);for(let d=0;d{let{x:s}=e,{k:r,sorted:a}=n,o=t.dataIdMap.get(s.dataId).id,i=new Uint8Array(new Int32Array(s.shape).buffer),l=s.shape.slice();l[l.length-1]=r;let u=t.makeOutput(l,s.dtype),c=t.dataIdMap.get(u.dataId).id,p=t.makeOutput(l,"int32"),d=t.dataIdMap.get(p.dataId).id;return YC(o,i,s.shape.length,qt[s.dtype],r,a,c,d),[u,p]},Mme={kernelName:Kl,backendName:"wasm",setupFunc:Fme,kernelFunc:Ome},JC;function zme(e){JC=e.wasm.cwrap(Zl,null,["number","number","bool","number","number","number","number","number","number","array","number","array","number","number","number","number","number"])}function Lme(e){let{backend:t,inputs:n,attrs:s}=e,{image:r,transforms:a}=n,{interpolation:o,fillMode:i,fillValue:l,outputShape:u}=s,[c,p,d,h]=r.shape,[f,m]=u!=null?u:[p,d],g=[c,f,m,h],y=new Uint8Array(new Int32Array(v.computeStrides(r.shape)).buffer),x=new Uint8Array(new Int32Array(v.computeStrides(g)).buffer),A=t.makeOutput(g,r.dtype),b=t.dataIdMap.get(A.dataId).id,k=t.dataIdMap.get(r.dataId).id,N=t.dataIdMap.get(a.dataId).id,R=o==="nearest"?1:2,D;switch(i){case"constant":D=1;break;case"reflect":D=2;break;case"wrap":D=3;break;case"nearest":D=4;break;default:D=1;break}return JC(k,N,a.shape[0]>1,c,f,m,h,d,p,y,r.shape.length-1,x,g.length-1,R,D,l,b),A}var Bme={kernelName:Zl,backendName:"wasm",setupFunc:zme,kernelFunc:Lme};function Wme(e){let{inputs:t,backend:n,attrs:s}=e,{value:r}=t,{axis:a}=s;a<0&&(a+=r.shape.length);let o=r.shape[a],i=r.shape.length,l=new Array(i-1),u=0;for(let h=0;h({dataId:h,dtype:f,shape:l}))}var Vme={kernelName:Yl,backendName:"wasm",kernelFunc:Wme};function Ume(e){let{inputs:{x:t},backend:n}=e,s=n.makeOutput(t.shape,t.dtype);return n.typedArrayFromHeap(s).fill(0),s}var Gme={kernelName:Jl,backendName:"wasm",kernelFunc:Ume},Hme=[xde,bde,wde,Ide,$de,Ode,Lde,Vde,jde,Jde,Qde,epe,spe,rpe,ipe,cpe,dpe,ppe,mpe,Ape,vpe,Spe,Tpe,Npe,Rpe,_pe,Dpe,$pe,Ope,Mpe,Lpe,Vpe,Hpe,Xpe,Ype,ehe,nhe,rhe,Cde,ihe,uhe,dhe,phe,fhe,mhe,yhe,xhe,whe,She,The,Rhe,$he,Fhe,zhe,Bhe,Whe,Ghe,qhe,Zhe,Jhe,tfe,sfe,afe,_C,ufe,pfe,mfe,yfe,xfe,bfe,vfe,Ude,Sfe,Tfe,Rfe,$fe,Pfe,Ffe,zfe,Wfe,Gfe,Hfe,Zde,Xfe,Zfe,Qfe,nme,rme,ome,lme,ume,cme,pme,mme,Ame,bme,wme,Sme,Cme,Eme,Rme,_me,Pme,Mme,Bme,Rde,Vme,Gme];for(let e of Hme)er(e);var uy=U();uy.registerFlag("WASM_HAS_SIMD_SUPPORT",async()=>{try{return WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,65,0,253,15,26,11]))}catch(e){return!1}});uy.registerFlag("WASM_HAS_MULTITHREAD_SUPPORT",async()=>{if(uy.get("IS_NODE"))return!1;try{return new MessageChannel().port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]))}catch(e){return!1}});var M7=fo(I_()),jme=fo(C_()),z7=fo(T_()),L7=M7.default||M7,qme=z7.default||z7,QC=class extends fc{constructor(e){super(),this.wasm=e,this.dataIdNextNumber=1,this.wasm.tfjs.initWithThreadsCount(eT),cy=this.wasm.tfjs.getThreadsCount(),this.dataIdMap=new Tp(this,Jt())}write(e,t,n){let s={id:this.dataIdNextNumber++};return this.move(s,e,t,n,1),s}numDataIds(){return this.dataIdMap.numDataIds()}async time(e){let t=v.now();return e(),{kernelMs:v.now()-t}}move(e,t,n,s,r){let a=this.dataIdNextNumber++;if(s==="string"){let u=t;this.dataIdMap.set(e,{id:a,stringBytes:u,shape:n,dtype:s,memoryOffset:null,refCount:r});return}let o=v.sizeFromShape(n),i=o*v.bytesPerElement(s),l=this.wasm._malloc(i);this.dataIdMap.set(e,{id:a,memoryOffset:l,shape:n,dtype:s,refCount:r}),this.wasm.tfjs.registerTensor(a,o,l),t!=null&&this.wasm.HEAPU8.set(new Uint8Array(t.buffer,t.byteOffset,i),l)}async read(e){return this.readSync(e)}readSync(e,t,n){let{memoryOffset:s,dtype:r,shape:a,stringBytes:o}=this.dataIdMap.get(e);if(r==="string")return(t==null||t===0)&&(n==null||n>=o.length)?o:o.slice(t,n);t=t||0,n=n||v.sizeFromShape(a);let i=v.bytesPerElement(r),l=this.wasm.HEAPU8.slice(s+t*i,s+n*i);return Zme(l.buffer,r)}disposeData(e,t=!1){if(this.dataIdMap.has(e)){let n=this.dataIdMap.get(e);if(n.refCount--,!t&&n.refCount>0)return!1;this.wasm._free(n.memoryOffset),this.wasm.tfjs.disposeData(n.id),this.dataIdMap.delete(e)}return!0}refCount(e){return this.dataIdMap.has(e)?this.dataIdMap.get(e).refCount:0}incRef(e){let t=this.dataIdMap.get(e);t!=null&&t.refCount++}floatPrecision(){return 32}getMemoryOffset(e){return this.dataIdMap.get(e).memoryOffset}dispose(){this.wasm.tfjs.dispose(),"PThread"in this.wasm&&this.wasm.PThread.terminateAllThreads(),this.wasm=null}memory(){return{unreliable:!1}}makeOutput(e,t,n){let s;if(n==null)s=this.write(null,e,t);else{let r=this.dataIdNextNumber++;s={id:r},this.dataIdMap.set(s,{id:r,memoryOffset:n,shape:e,dtype:t,refCount:1});let a=v.sizeFromShape(e);this.wasm.tfjs.registerTensor(r,a,n)}return{dataId:s,shape:e,dtype:t}}typedArrayFromHeap({shape:e,dtype:t,dataId:n}){let s=this.wasm.HEAPU8.buffer,{memoryOffset:r}=this.dataIdMap.get(n),a=v.sizeFromShape(e);switch(t){case"float32":return new Float32Array(s,r,a);case"int32":return new Int32Array(s,r,a);case"bool":return new Uint8Array(s,r,a);default:throw new Error(`Unknown dtype ${t}`)}}};function Xme(e){return(t,n)=>(v.fetch(e,{credentials:"same-origin"}).then(s=>{s.ok||t.env.a(`failed to load wasm binary file at '${e}'`),s.arrayBuffer().then(r=>{WebAssembly.instantiate(r,t).then(a=>{n(a.instance,a.module)})})}),{})}function B7(e,t,n){if(Tm!=null)return Tm;let s="tfjs-backend-wasm.wasm";return e&&t?s="tfjs-backend-wasm-threaded-simd.wasm":e&&(s="tfjs-backend-wasm-simd.wasm"),rp!=null&&rp[s]!=null?rp[s]:n+s}async function Kme(){let[e,t]=await Promise.all([U().getAsync("WASM_HAS_SIMD_SUPPORT"),U().getAsync("WASM_HAS_MULTITHREAD_SUPPORT")]);return new Promise((n,s)=>{let r={};r.locateFile=(i,l)=>{if(i.endsWith(".worker.js")){let u=jme.wasmWorkerContents.replace(/\n/g,"\\n"),c=new Blob([u],{type:"application/javascript"});return URL.createObjectURL(c)}return i.endsWith(".wasm")?B7(e,t,ep!=null?ep:l):l+i},eb&&(r.instantiateWasm=Xme(B7(e,t,ep!=null?ep:"")));let a=!1;r.onAbort=()=>{if(a||ap)return;ap=!0,s({message:"Make sure the server can serve the `.wasm` file relative to the bundled js file. For more details see https://github.com/tensorflow/tfjs/blob/master/tfjs-backend-wasm/README.md#using-bundlers"})};let o;t&&e&&Tm==null?(r.mainScriptUrlOrBlob=new Blob(["var WasmBackendModuleThreadedSimd = "+L7.toString()],{type:"text/javascript"}),o=L7(r)):o=qme(r),o.then(i=>{a=!0,ap=!1;let l=null;i.tfjs={init:i.cwrap("init",null,[]),initWithThreadsCount:i.cwrap("init_with_threads_count",null,["number"]),getThreadsCount:i.cwrap("get_threads_count","number",[]),registerTensor:i.cwrap("register_tensor",null,["number","number","number"]),disposeData:i.cwrap("dispose_data",l,["number"]),dispose:i.cwrap("dispose",l,[])},n({wasm:i})}).catch(s)})}function Zme(e,t){switch(t){case"float32":return new Float32Array(e);case"int32":return new Int32Array(e);case"bool":return new Uint8Array(e);default:throw new Error(`Unknown dtype ${t}`)}}var Yme=["tfjs-backend-wasm.wasm","tfjs-backend-wasm-simd.wasm","tfjs-backend-wasm-threaded-simd.wasm"],Tm=null,ep=null,rp={},ap=!1,eb=!1;function Jme(e,t=!1){if(Dy("setWasmPath has been deprecated in favor of setWasmPaths and will be removed in a future release."),ap)throw new Error("The WASM backend was already initialized. Make sure you call `setWasmPath()` before you call `tf.setBackend()` or `tf.ready()`");Tm=e,eb=t}function f2(e,t=!1){if(ap)throw new Error("The WASM backend was already initialized. Make sure you call `setWasmPaths()` before you call `tf.setBackend()` or `tf.ready()`");if(typeof e=="string")ep=e;else{rp=e;let n=Yme.filter(s=>rp[s]==null);if(n.length>0)throw new Error(`There were no entries found for the following binaries: ${n.join(",")}. Please either call setWasmPaths with a map providing a path for each binary, or with a string indicating the directory where all the binaries can be found.`)}eb=t}var eT=-1,cy=-1;function Qme(e){eT=e}function e0e(){if(cy===-1)throw new Error("WASM backend not initialized.");return cy}var t0e="3.21.0",n0e=2;eu("wasm",async()=>{let{wasm:e}=await Kme();return new QC(e)},n0e);var $a=U();$a.registerFlag("WEBGPU_DEFERRED_SUBMIT_BATCH_SIZE",()=>15);$a.registerFlag("WEBGPU_CPU_FORWARD",()=>!0);$a.registerFlag("WEBGPU_MATMUL_PROGRAM_TYPE",()=>-1);$a.registerFlag("WEBGPU_USE_NAIVE_CONV2D_TRANSPOSE",()=>!1);$a.registerFlag("WEBGPU_USE_LOW_POWER_GPU",()=>!1);$a.registerFlag("WEBGPU_CPU_HANDOFF_SIZE_THRESHOLD",()=>1e3);$a.registerFlag("WEBGPU_USE_PROFILE_TOOL",()=>!1);$a.registerFlag("WEBGPU_IMPORT_EXTERNAL_TEXTURE",()=>!0);$a.registerFlag("WEBGPU_USE_NAIVE_CONV2D_DEBUG",()=>!1);var s0e=class{constructor(e){e&&(this.vendor=e.vendor)}isIntel(){return this.vendor==="intel"}},r0e=class{constructor(e){this.device=e,this.numUsedBuffers=0,this.numFreeBuffers=0,this.freeBuffers=new Map,this.usedBuffers=new Map,this.numBytesUsed=0,this.numBytesAllocated=0}acquireUploadBuffer(e,t){return this.acquireBuffer(e,t,!0)}acquireBuffer(e,t,n=!1){let s=W7(e,t);if(this.freeBuffers.has(s)||this.freeBuffers.set(s,[]),this.usedBuffers.has(s)||this.usedBuffers.set(s,[]),this.numBytesUsed+=e,this.numUsedBuffers++,this.freeBuffers.get(s).length>0){this.numFreeBuffers--;let a=this.freeBuffers.get(s).shift();return this.usedBuffers.get(s).push(a),a}this.numBytesAllocated+=e;let r=this.device.createBuffer({size:e,usage:t,mappedAtCreation:n});return this.usedBuffers.get(s).push(r),r}releaseBuffer(e,t,n){if(this.freeBuffers.size===0)return;let s=W7(t,n);this.freeBuffers.has(s)||this.freeBuffers.set(s,[]),this.freeBuffers.get(s).push(e),this.numFreeBuffers++,this.numUsedBuffers--;let r=this.usedBuffers.get(s),a=r.indexOf(e);if(a<0)throw new Error("Cannot release a buffer that was never provided by this buffer manager");r.splice(a,1),this.numBytesUsed-=t}releaseUploadBuffer(e,t,n){e.mapAsync(GPUMapMode.WRITE).then(()=>{this.releaseBuffer(e,t,n)},s=>{})}getNumUsedBuffers(){return this.numUsedBuffers}getNumFreeBuffers(){return this.numFreeBuffers}dispose(){this.freeBuffers.forEach((e,t)=>{e.forEach(n=>{n.destroy()})}),this.usedBuffers.forEach((e,t)=>{e.forEach(n=>{n.destroy()})}),this.freeBuffers=new Map,this.usedBuffers=new Map,this.numUsedBuffers=0,this.numFreeBuffers=0,this.numBytesUsed=0,this.numBytesAllocated=0}};function W7(e,t){return`${e}_${t}`}var a0e=class{constructor(e){this.device=e,this.numUsedTextures=0,this.numFreeTextures=0,this.freeTextures=new Map,this.usedTextures=new Map,this.numBytesUsed=0,this.numBytesAllocated=0}acquireTexture(e,t,n,s){let r=U7(n),a=e*t*r,o=V7(e,t,n,s);if(this.freeTextures.has(o)||this.freeTextures.set(o,[]),this.usedTextures.has(o)||this.usedTextures.set(o,[]),this.numBytesUsed+=a,this.numUsedTextures++,this.freeTextures.get(o).length>0){this.numFreeTextures--;let l=this.freeTextures.get(o).shift();return this.usedTextures.get(o).push(l),l}this.numBytesAllocated+=a;let i=this.device.createTexture({size:[e,t],format:n,usage:s});return this.usedTextures.get(o).push(i),i}releaseTexture(e,t,n,s,r){if(this.freeTextures.size===0)return;let a=V7(t,n,s,r);this.freeTextures.has(a)||this.freeTextures.set(a,[]),this.freeTextures.get(a).push(e),this.numFreeTextures++,this.numUsedTextures--;let o=this.usedTextures.get(a),i=o.indexOf(e);if(i<0)throw new Error("Cannot release a texture that was never provided by this texture manager");o.splice(i,1);let l=U7(s),u=t*n*l;this.numBytesUsed-=u}getNumUsedTextures(){return this.numUsedTextures}getNumFreeTextures(){return this.numFreeTextures}dispose(){this.freeTextures.forEach((e,t)=>{e.forEach(n=>{n.destroy()})}),this.usedTextures.forEach((e,t)=>{e.forEach(n=>{n.destroy()})}),this.freeTextures=new Map,this.usedTextures=new Map,this.numUsedTextures=0,this.numFreeTextures=0,this.numBytesUsed=0,this.numBytesAllocated=0}};function V7(e,t,n,s){return`${e}_${t}_${n}_${s}`}function U7(e){if(e==="rgba8unorm")return 16;throw new Error(`${e} is not supported!`)}function o0e(e,t){if(Math.max(...e)>3)throw new Error("Cannot symbolically compute strides for rank > 4 tensor.");let n=e.length,s=e.map(a=>`${t}[${a}]`),r=new Array(n-1);r[n-2]=s[n-1];for(let a=n-3;a>=0;--a)r[a]=`(${r[a+1]} * ${s[a+1]})`;return r}var i0e=(e,t,n,s)=>{let r={dtype:s.dtype,shape:s.shape},a=l0e(n,r,t),o=e.createShaderModule({code:a,label:t.constructor.name});return e.createComputePipeline({compute:{module:o,entryPoint:"_start"},label:t.constructor.name,layout:"auto"})};function zn(e){if(e<=1)return"i32";if(e===2)return"vec2";if(e===3)return"vec3";if(e===4)return"vec4";if(e===5)return"vec5";if(e===6)return"vec6";throw Error(`GPU for rank ${e} is not yet supported`)}function va(e){if(e===0)return"x";if(e===1)return"y";if(e===2)return"z";if(e===3)return"w";if(e===4)return"u";if(e===5)return"v";throw Error(`Index ${e} is not yet supported`)}function Je(...e){let t;switch(e.length){case 0:t=` + ${Ip()} fn _start(@builtin(local_invocation_id) LocalId : vec3, @builtin(global_invocation_id) GlobalId : vec3, @builtin(num_workgroups) NumWorkgroups : vec3) { @@ -4897,7 +4897,7 @@ return a / b;`,Ble=` fn main() `;break;case 1:t=` - ${Vp()} + ${Ip()} fn _start(@builtin(local_invocation_id) LocalId : vec3, @builtin(global_invocation_id) GlobalId : vec3, @builtin(num_workgroups) NumWorkgroups : vec3) { @@ -4908,9 +4908,9 @@ return a / b;`,Ble=` } fn main(${e[0]} : i32) - `;break;default:throw Error("Unreachable")}return t}function Vp(){return` + `;break;default:throw Error("Unreachable")}return t}function Ip(){return` @compute @workgroup_size(workGroupSizeX, workGroupSizeY, workGroupSizeZ) -`}function C0e(e,t,n){let s=[];if(s.push(` +`}function l0e(e,t,n){let s=[];if(s.push(` const workGroupSizeX = ${n.workGroupSize[0]}u; const workGroupSizeY = ${n.workGroupSize[1]}u; const workGroupSizeZ = ${n.workGroupSize[2]}u; @@ -4921,7 +4921,7 @@ return a / b;`,Ble=` // Only used when the y/z dimension of workgroup size is 1. fn getGlobalIndex() -> i32 { - ${yT(n)?" return i32(globalId.x);":` let localInvocationIndex = localId.z * workGroupSizeX * workGroupSizeY + + ${tT(n)?" return i32(globalId.x);":` let localInvocationIndex = localId.z * workGroupSizeX * workGroupSizeY + localId.y * workGroupSizeX + localId.x; let workGroupID = (globalId - localId)/vec3( workGroupSizeX, workGroupSizeY, workGroupSizeZ); @@ -4939,23 +4939,23 @@ return a / b;`,Ble=` outShapeStrides : vec2, }; - @group(0) @binding(0) var result: array<${kp(t.dtype,n.isVec4)}>; + @group(0) @binding(0) var result: array<${op(t.dtype,n.isVec4)}>; @group(0) @binding(2) var uniforms: Uniform; - `),[d6,s.join(` -`),p6(t.shape),n.getUserCode()].join(` -`);let r="struct Uniforms { NAN : f32, ";n.variableNames.forEach((d,h)=>{let f=Mn(e[h].shape.length);r+=`${d.charAt(0).toLowerCase()+d.slice(1)}Shape : ${f}, `}),r+=`outShape : ${Mn(t.shape.length)}, `;let o=t.shape.length-1;r+=` - outShapeStrides: ${Mn(o)}, `,n.size&&(r+="size : i32, "),n.uniforms&&(r+=n.uniforms),r+="};",r=P0e(r),s.push(r),n.atomic?s.push(` + `),[G7,s.join(` +`),H7(t.shape),n.getUserCode()].join(` +`);let r="struct Uniforms { NAN : f32, ";n.variableNames.forEach((d,h)=>{let f=zn(e[h].shape.length);r+=`${d.charAt(0).toLowerCase()+d.slice(1)}Shape : ${f}, `}),r+=`outShape : ${zn(t.shape.length)}, `;let o=t.shape.length-1;r+=` + outShapeStrides: ${zn(o)}, `,n.size&&(r+="size : i32, "),n.uniforms&&(r+=n.uniforms),r+="};",r=g0e(r),s.push(r),n.atomic?s.push(` @group(0) @binding(0) var result: array>; `):s.push(` - @group(0) @binding(0) var result: array<${kp(t.dtype,n.isVec4)}>; + @group(0) @binding(0) var result: array<${op(t.dtype,n.isVec4)}>; `),n.variableNames.forEach((d,h)=>{s.push(` - @group(0) @binding(${1+h}) var ${d}: array<${n.variableTypes?n.variableTypes[h]:kp(e[h].dtype,n.isVec4)}>; + @group(0) @binding(${1+h}) var ${d}: array<${n.variableTypes?n.variableTypes[h]:op(e[h].dtype,n.isVec4)}>; `)}),r!==""&&s.push(` @group(0) @binding(${1+n.variableNames.length}) var uniforms: Uniforms; - `);let l=_0e(t.shape,n.dispatchLayout),u=[d6,s.join(` -`),p6(t.shape),l,D0e(t.shape.length)];n.atomic||u.push($0e(t.shape,t.dtype,n.isVec4));let c=e.map((d,h)=>R0e(d,t.shape,n.variableTypes?n.variableTypes[h]==="vec4":n.isVec4,n.dispatchLayout.x.length===t.shape.length)).join(` + `);let l=h0e(t.shape,n.dispatchLayout),u=[G7,s.join(` +`),H7(t.shape),l,f0e(t.shape.length)];n.atomic||u.push(m0e(t.shape,t.dtype,n.isVec4));let c=e.map((d,h)=>p0e(d,t.shape,n.variableTypes?n.variableTypes[h]==="vec4":n.isVec4,n.dispatchLayout.x.length===t.shape.length)).join(` `);return u.push(c),u.push(n.getUserCode()),u.join(` -`)}function T0e(e,t,n,s){let r=e.shaderKey;if(e.isFromPixels)return r;let a=n.map(c=>c.dtype).concat(s.dtype),o=n.map(c=>T.getBroadcastDims(c.shape,s.shape)),i=n.map(c=>v.arraysEqual(c.shape,s.shape)).join("_"),l=o.map(c=>c.join("_")).join(";"),u=yT(e)?"flatDispatch":"";return r+="_"+(e.workGroupSize?e.workGroupSize.join(","):"")+t.map(c=>c.length).join(",")+a.join(",")+e.variableNames.join(",")+l+i+u,r}var d6=` +`)}function u0e(e,t,n,s){let r=e.shaderKey;if(e.isFromPixels)return r;let a=n.map(c=>c.dtype).concat(s.dtype),o=n.map(c=>T.getBroadcastDims(c.shape,s.shape)),i=n.map(c=>v.arraysEqual(c.shape,s.shape)).join("_"),l=o.map(c=>c.join("_")).join(";"),u=tT(e)?"flatDispatch":"";return r+="_"+(e.workGroupSize?e.workGroupSize.join(","):"")+t.map(c=>c.length).join(",")+a.join(",")+e.variableNames.join(",")+l+i+u,r}var G7=` struct vec5 {x: i32, y: i32, z: i32, w: i32, u: i32}; struct vec6 {x: i32, y: i32, z: i32, w: i32, u: i32, v: i32}; @@ -5013,15 +5013,15 @@ return a / b;`,Ble=` fn isnanVec4(val : vec4) -> vec4 { return vec4(isnan(val[0]), isnan(val[1]), isnan(val[2]), isnan(val[3])); } -`;function p6(e){let t=e.length;if(t<=1)return"fn getCoordsFromIndex(index : i32) -> i32 { return index; }";let n=v.computeStrides(e),s=Mn(t),r=[];for(let o=0;o vec2 { +`;function H7(e){let t=e.length;if(t<=1)return"fn getCoordsFromIndex(index : i32) -> i32 { return index; }";let n=v.computeStrides(e),s=zn(t),r=[];for(let o=0;o vec2 { let d0 = index / uniforms.outShapeStrides; let d1 = index - d0 * uniforms.outShapeStrides; return vec2(d0, d1); - }`;let a;return a="var index2 = index;"+n.map((o,i)=>{let l=`let ${r[i]} = index2 / uniforms.outShapeStrides.${Ca(i)}`,u=i===n.length-1?`let ${r[i+1]} = index2 - ${r[i]} * uniforms.outShapeStrides.${Ca(i)}`:`index2 = index2 - ${r[i]} * uniforms.outShapeStrides.${Ca(i)}`;return`${l}; ${u};`}).join(""),` + }`;let a;return a="var index2 = index;"+n.map((o,i)=>{let l=`let ${r[i]} = index2 / uniforms.outShapeStrides.${va(i)}`,u=i===n.length-1?`let ${r[i+1]} = index2 - ${r[i]} * uniforms.outShapeStrides.${va(i)}`:`index2 = index2 - ${r[i]} * uniforms.outShapeStrides.${va(i)}`;return`${l}; ${u};`}).join(""),` fn getCoordsFromIndex(index : i32) -> ${s} { ${a} return ${s}(${r.join(",")}); } - `}function N0e(e,t){let n=e.name,s=e.shape.length,r=Mn(s),a="get"+n.charAt(0).toUpperCase()+n.slice(1),o=["d0","d1","d2","d3","d4","d5"].slice(0,s),i=o.map(c=>`${c} : i32`).join(", ");if(s<1)return t?` + `}function c0e(e,t){let n=e.name,s=e.shape.length,r=zn(s),a="get"+n.charAt(0).toUpperCase()+n.slice(1),o=["d0","d1","d2","d3","d4","d5"].slice(0,s),i=o.map(c=>`${c} : i32`).join(", ");if(s<1)return t?` fn ${a}() -> vec4 { return vec4(${n}[0]); } @@ -5039,7 +5039,7 @@ return a / b;`,Ble=` return f32(${n}[getIndexFromCoords${u}(${r}(${o.join(",")}), ${l})]); } - `}function E0e(e,t,n,s){let r=e.name,a=r.charAt(0).toUpperCase()+r.slice(1),o="get"+a+"ByOutput",i=e.shape.length,l=t.length,u=Mn(l);if(v.arraysEqual(e.shape,t)&&s)return n?` + `}function d0e(e,t,n,s){let r=e.name,a=r.charAt(0).toUpperCase()+r.slice(1),o="get"+a+"ByOutput",i=e.shape.length,l=t.length,u=zn(l);if(v.arraysEqual(e.shape,t)&&s)return n?` fn ${o}Index(globalIndex : i32) -> vec4 { return vec4(${r}[globalIndex]); } @@ -5071,8 +5071,8 @@ return a / b;`,Ble=` fn ${o}Coords(coords : ${u}) -> f32{ return get${a}(); } - `;l<2&&c.length>=1?d="coords = 0;":d=c.map(g=>`coords.${Ca(g+p)} = 0;`).join(` -`);let h="";if(l<2&&i>0)h="coords";else if(l>1){let g=Mn(i),y=e.shape.map((x,A)=>`coords.${Ca(A+p)}`).join(", ");h=`${g}(${y})`}else h="coords";let f=`uniforms.${r.charAt(0).toLowerCase()+r.slice(1)}Shape`,m=`${i}D`;return n?` + `;l<2&&c.length>=1?d="coords = 0;":d=c.map(g=>`coords.${va(g+p)} = 0;`).join(` +`);let h="";if(l<2&&i>0)h="coords";else if(l>1){let g=zn(i),y=e.shape.map((x,A)=>`coords.${va(A+p)}`).join(", ");h=`${g}(${y})`}else h="coords";let f=`uniforms.${r.charAt(0).toLowerCase()+r.slice(1)}Shape`,m=`${i}D`;return n?` fn ${o}Index(globalIndex : i32) -> vec4 { var coords = getCoordsFromIndex(globalIndex); ${d} @@ -5096,13 +5096,13 @@ return a / b;`,Ble=` ${d} return f32(${r}[getIndexFromCoords${m}(${h}, ${f})]); } -`}function R0e(e,t,n,s){let r=N0e(e,n);return e.shape.length<=t.length&&(r+=E0e(e,t,n,s)),r}function _0e(e,t){let{x:n,y:s=[],z:r=[]}=t,a=e.length;if(n.length===a)return`fn getOutputCoords() -> ${Mn(a)}{ +`}function p0e(e,t,n,s){let r=c0e(e,n);return e.shape.length<=t.length&&(r+=d0e(e,t,n,s)),r}function h0e(e,t){let{x:n,y:s=[],z:r=[]}=t,a=e.length,o=n.length+s.length+r.length;if(o!==a)return"";if(n.length===a)return`fn getOutputCoords() -> ${zn(a)}{ let globalIndex = getGlobalIndex(); return getCoordsFromIndex(globalIndex); } - `;let o="",i=[n,s,r],l=0;for(let d=0;d ${c} { - ${o} -`;return u.length===0?p+=`return ${c}(0); }`:p+=`return ${c}(${u.join(",")}); }`,p}function D0e(e){let t="";switch(e){case 0:case 1:t+=` + `;let i="",l=[n,s,r];for(let d=0;d ${c} { + ${i} +`;return u.length===0?p+=`return ${c}(0); }`:p+=`return ${c}(${u.join(",")}); }`,p}function f0e(e){let t="";switch(e){case 0:case 1:t+=` fn getOutputIndexFromCoords(coords : i32) -> i32 { return coords; } @@ -5136,7 +5136,7 @@ return a / b;`,Ble=` coords.u * uniforms.outShapeStrides.u + coords.v; } - `;break;default:v.assert(!1,()=>`Unsupported ${e}D shape`);break}return t}function yT(e){return e.dispatch[1]===1&&e.dispatch[2]===1}function kp(e,t){return e==="float32"?t?"vec4":"f32":e==="int32"||e==="bool"?t?"vec4":"i32":e}function $0e(e,t,n){let s=e.length,r=kp(t,n),a;if(n?a=`fn setOutputAtIndex(flatIndex : i32, value : vec4) { + `;break;default:v.assert(!1,()=>`Unsupported ${e}D shape`);break}return t}function tT(e){return e.dispatch[1]===1&&e.dispatch[2]===1}function op(e,t){return e==="float32"?t?"vec4":"f32":e==="int32"||e==="bool"?t?"vec4":"i32":e}function m0e(e,t,n){let s=e.length,r=op(t,n),a;if(n?a=`fn setOutputAtIndex(flatIndex : i32, value : vec4) { result[flatIndex] = ${r}(value); } fn setOutputAtIndexI32(flatIndex : i32, value : vec4) { @@ -5146,7 +5146,7 @@ return a / b;`,Ble=` } fn setOutputAtIndexI32(flatIndex : i32, value : i32) { result[flatIndex] = ${r}(value); - }`,s>=2){let o=["d0","d1","d2","d3","d4","d5"].slice(0,s),i=Mn(s);n?a+=` + }`,s>=2){let o=["d0","d1","d2","d3","d4","d5"].slice(0,s),i=zn(s);n?a+=` fn setOutputAtCoords(${o.map(l=>`${l} : i32`).join(", ")}, value : vec4) { let flatIndex = getOutputIndexFromCoords(${i}(${o.join(", ")})); setOutputAtIndex(flatIndex / 4, value); @@ -5164,10 +5164,10 @@ return a / b;`,Ble=` let flatIndex = getOutputIndexFromCoords(${i}(${o.join(", ")})); setOutputAtIndexI32(flatIndex, value); } - `}return a}function P0e(e){let t=/(\w+)\s*:\s*vec(5|6)/g;e=e.replace(t,s=>"@align(16) "+s);let n=/vec(5|6)\s*,\s*(\w+)/g;return e=e.replace(n,(s,r,a)=>`vec${r}, @align(16) ${a}`),e}var AT={};qe(AT,{ArrayBufferToTypedArray:()=>vT,GPUBytesPerElement:()=>bT,MatMulProgramType:()=>$r,computeDispatch:()=>je,computeWorkGroupInfoForMatMul:()=>xT,computeWorkGroupSizeForConv2d:()=>bb,computeWorkPerThreadForConv2d:()=>vb,flatDispatchLayout:()=>lt,isWebGPUSupported:()=>wb,tilesFitEvenlyIntoShape:()=>F0e});var al=e=>{let t=1;for(let n=0;nn%e[s]===0)}function je(e,t,n=[1,1,1],s=[1,1,1]){let[r,a,o]=[Math.ceil(al(e.x.map(i=>t[i]))/(n[0]*s[0])),e.y?Math.ceil(al(e.y.map(i=>t[i]))/(n[1]*s[1])):1,e.z?Math.ceil(al(e.z.map(i=>t[i]))/(n[2]*s[2])):1];return[r,a,o]}function xT(e,t,n,s=!1){let r=[8,8,1],a=[4,4,1];return s||(e<=8&&(a[1]=1),t<=16&&n<=16&&(r[0]=4)),{workGroupSize:r,elementsPerThread:a}}function bb(e,t,n=!1){if(n)return[8,8,1];let s=al(e.x.map(a=>t[a])),r=al(e.y.map(a=>t[a]));return s<=4?[4,16,1]:r<=4?[16,4,1]:[16,16,1]}function vb(e,t,n=!1){if(n)return[4,4,1];let s=al(e.x.map(a=>t[a])),r=al(e.y.map(a=>t[a]));return s<=4?[1,2,1]:r<=4?[2,1,1]:[2,2,1]}function lt(e){return{x:e.map((t,n)=>n)}}function bT(e){if(e==="float32"||e==="int32"||e==="bool"||e==="string")return 4;if(e==="complex64")return 8;throw new Error(`Unknown dtype ${e}`)}function vT(e,t){if(t==="float32")return new Float32Array(e);if(t==="int32")return new Int32Array(e);if(t==="bool"||t==="string")return Uint8Array.from(new Int32Array(e));throw new Error(`Unknown dtype ${t}`)}function wb(){return(typeof window!="undefined"||typeof WorkerGlobalScope!="undefined")&&!!navigator.gpu}var $r;(function(e){e[e.MatMulReduceProgram=0]="MatMulReduceProgram",e[e.MatMulSplitKProgram=1]="MatMulSplitKProgram",e[e.MatMulSmallOutputSizeProgram=2]="MatMulSmallOutputSizeProgram",e[e.MatMulPackedProgram=3]="MatMulPackedProgram",e[e.MatMulMax=4]="MatMulMax"})($r||($r={}));var O0e=H().getNumber("WEBGPU_CPU_HANDOFF_SIZE_THRESHOLD"),M0e=(e,t)=>{let n=e.limits.maxComputeWorkgroupsPerDimension,s=t.dispatchLayout,r=t.dispatch;if(r.every(o=>o<=n))return r;v.assert(r[0]>n&&s.y===void 0&&s.z===void 0,()=>"Dispatch size exceeds WebGPU limits in Y or Z dimension.");let a=Math.ceil(Math.sqrt(r[0]));return a>n?(a=Math.ceil(Math.cbrt(r[0])),v.assert(a<=n,()=>"Total dispatch size exceeds WebGPU maximum."),[a,a,a]):[a,a,1]},B2=class extends Cc{constructor(e){if(super(),this.commandQueueOwnedIds=new WeakSet,this.dispatchNumberInEncoder=0,this.disposed=!1,this.downloadWaitMs=0,this.tensorDataPendingDisposal=[],this.stagingPendingDisposal=[],this.uniformPendingDisposal=[],this.uploadWaitMs=0,!wb())throw new Error("WebGPU is not supported on this device");this.pipelineCache={},this.device=e,this.queue=e.queue,this.currentCommandEncoder=null,this.currentComputePass=null,this.supportTimeQuery=e.features.has("timestamp-query"),this.bufferManager=new w0e(this.device),this.textureManager=new k0e(this.device),this.tensorMap=new Gp(this,Qt()),this.supportTimeQuery&&(this.querySet=this.device.createQuerySet({type:"timestamp",count:2})),H().getBool("WEBGPU_USE_PROFILE_TOOL")&&(this.dummyCanvas=document.createElement("canvas"),this.dummyCanvas.width=1,this.dummyCanvas.height=1,this.dummyContext=this.dummyCanvas.getContext("webgpu"),this.dummyContext.configure({device:e,format:"bgra8unorm"}),document.body.appendChild(this.dummyCanvas))}nextDataId(){return B2.nextDataId++}floatPrecision(){return 32}defaultGpuBufferUsage(){return GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_SRC|GPUBufferUsage.COPY_DST}disposeData(e,t=!1){if(this.tensorDataPendingDisposal.indexOf(e)>=0)return!1;if(!this.tensorMap.has(e))return!0;let n=this.tensorMap.get(e);if(this.decRef(e),!t&&n.refCount>0)return!1;if(this.commandQueueOwnedIds.has(e))return this.tensorDataPendingDisposal.push(e),!1;let{complexTensorInfos:s}=this.tensorMap.get(e);return s!=null&&(this.disposeData(s.real.dataId,t),this.disposeData(s.imag.dataId,t)),this.releaseResource(e),this.tensorMap.delete(e),!0}memory(){return{numBytesInGPU:this.bufferManager.numBytesUsed,numBytesAllocatedInGPU:this.bufferManager.numBytesAllocated,unreliable:!1}}releaseResource(e){let t=this.tensorMap.get(e);if(!(!t||!t.resourceInfo)){if("texture"in t.resourceInfo){let n=t.resourceInfo;n.texture instanceof GPUTexture&&this.textureManager.releaseTexture(n.texture,n.width,n.height,n.format,n.usage),n.texture=null}else{let n=t.resourceInfo;this.bufferManager.releaseBuffer(n.buffer,n.size,n.usage),n.buffer=null}t.resourceInfo=null}}refCount(e){return this.tensorMap.has(e)?this.tensorMap.get(e).refCount:0}incRef(e){let t=this.tensorMap.get(e);t.refCount++}decRef(e){if(this.tensorMap.has(e)){let t=this.tensorMap.get(e);t.refCount--}}write(e,t,n){if(n==="complex64"&&e!=null)throw new Error("Cannot write to a complex64 dtype. Please use tf.complex(real, imag).");let s={id:this.nextDataId()};return this.tensorMap.set(s,{dtype:n,shape:t,values:e,refCount:1}),s}move(e,t,n,s,r){if(s==="complex64")throw new Error("Cannot write to a complex64 dtype. Please use tf.complex(real, imag).");this.tensorMap.set(e,{dtype:s,shape:n,values:t,refCount:r})}submitQueue(){this.ensureComputePassEnded(),this.queue.submit([this.currentCommandEncoder.finish()]),this.currentCommandEncoder=null,this.dispatchNumberInEncoder=0,this.commandQueueOwnedIds=new WeakSet,this.tensorDataPendingDisposal.forEach(e=>{this.releaseResource(e),this.tensorMap.delete(e)}),this.uniformPendingDisposal.forEach(e=>this.bufferManager.releaseBuffer(e.buffer,e.size,e.usage)),this.stagingPendingDisposal.forEach(e=>this.bufferManager.releaseUploadBuffer(e.buffer,e.size,e.usage)),this.tensorDataPendingDisposal=[],this.uniformPendingDisposal=[],this.stagingPendingDisposal=[]}ensureCommandEncoderReady(){this.currentCommandEncoder||(this.currentCommandEncoder=this.device.createCommandEncoder())}ensureComputePassEnded(){this.currentComputePass&&(this.currentComputePass.end(),this.currentComputePass=null)}getComputePass(){return this.currentComputePass||(this.currentComputePass=this.currentCommandEncoder.beginComputePass()),this.currentComputePass}async getBufferData(e,t){let n=this.bufferManager.acquireBuffer(t,GPUBufferUsage.COPY_DST|GPUBufferUsage.MAP_READ);this.ensureCommandEncoderReady(),this.ensureComputePassEnded(),this.currentCommandEncoder.copyBufferToBuffer(e,0,n,0,t),this.submitQueue(),await n.mapAsync(GPUMapMode.READ);let s=n.getMappedRange().slice(0);return n.unmap(),n!=null&&this.bufferManager.releaseBuffer(n,t,GPUBufferUsage.COPY_DST|GPUBufferUsage.MAP_READ),H().getBool("WEBGPU_USE_PROFILE_TOOL")&&(v.assert(this.dummyContext!==void 0,()=>"Fail to get context for profiling tool"),this.dummyContext.getCurrentTexture()),s}convertAndCacheOnCPU(e,t){let n=this.tensorMap.get(e);return this.releaseResource(e),n.values=t,n.values}readSync(e){let t=this.tensorMap.get(e),{values:n}=t;if(n==null)throw new Error("WebGPU readSync is only available for CPU-resident tensors.");return n}async read(e){if(!this.tensorMap.has(e))throw new Error(`Tensor ${e} was not registered!`);let t=this.tensorMap.get(e),{values:n}=t;if(n!=null)return this.convertAndCacheOnCPU(e,n);let s;if(t.dtype==="complex64"){let r=await Promise.all([this.read(t.complexTensorInfos.real.dataId),this.read(t.complexTensorInfos.imag.dataId)]),a=r[0],o=r[1];s=T.mergeRealAndImagArrays(a,o)}else{let r=t.resourceInfo,a=await this.getBufferData(r.buffer,r.size);s=vT(a,t.dtype)}return this.convertAndCacheOnCPU(e,s),s}readToGPU(e){let t=this.tensorMap.get(e),{values:n,dtype:s,shape:r,resourceInfo:a}=t;if(s==="complex64")throw new Error("Does not support reading buffer for complex64 dtype.");if(a==null)throw n!=null?new Error("Data is not on GPU but on CPU."):new Error("There is no data on GPU or CPU.");let o=a.size,i=this.bufferManager.acquireBuffer(o,a.usage);this.ensureCommandEncoderReady(),this.ensureComputePassEnded(),this.currentCommandEncoder.copyBufferToBuffer(a.buffer,0,i,0,o),this.submitQueue();let l=this.makeTensorInfo(r,s),u=Qt().makeTensorFromTensorInfo(l),c=this.tensorMap.get(l.dataId);return c.resourceInfo={size:o,usage:this.defaultGpuBufferUsage(),buffer:i},{tensorRef:u,buffer:i,bufSize:o}}bufferSync(e){let t=this.readSync(e.dataId);if(e.dtype==="string")try{let n=t.map(s=>v.decodeString(s));return Ue(e.shape,e.dtype,n)}catch(n){throw new Error("Failed to decode encoded string bytes into utf-8")}return Ue(e.shape,e.dtype,t)}async time(e){this.supportTimeQuery||console.warn("This device doesn't support timestamp-query extension. Start Chrome browser with flag --disable-dawn-features=disallow_unsafe_apis then try again. Otherwise, zero will be shown for the kernel time when profiling mode is enabled. Using performance.now is not workable for webgpu since it doesn't support synchronous data read from GPU.");let t=this.activeTimers,n=[],s=!1;this.programTimersStack==null?(this.programTimersStack=n,s=!0):this.activeTimers.push(n),this.activeTimers=n,e();let r=v.flatten(this.activeTimers.map(l=>l.query)).filter(l=>l!=null),a=v.flatten(this.activeTimers.map(l=>l.name)).filter(l=>l!=null);this.activeTimers=t,s&&(this.programTimersStack=null);let o={uploadWaitMs:this.uploadWaitMs,downloadWaitMs:this.downloadWaitMs,kernelMs:null,wallMs:null},i=await Promise.all(r);return o.kernelMs=v.sum(i),o.getExtraProfileInfo=()=>i.map((l,u)=>({name:a[u],ms:l})).map(l=>`${l.name}: ${l.ms}`).join(", "),this.uploadWaitMs=0,this.downloadWaitMs=0,o}makeTensorInfo(e,t,n){return t==="string"&&n!=null&&n.length>0&&v.isString(n[0])&&(n=n.map(r=>v.encodeString(r))),{dataId:this.write(n,e,t),shape:e,dtype:t}}tensorToBinding(e){if(!e)return null;let t=this.tensorMap.get(e.dataId);if("texture"in t.resourceInfo){let s=t.resourceInfo;return s.texture instanceof GPUExternalTexture?s.texture:s.texture.createView()}let n=t.resourceInfo;return{offset:0,size:n.size,buffer:n.buffer}}async getQueryTime(e){return this.supportTimeQuery?this.getTimeFromQuerySet(e):0}uploadToGPU(e){let t=this.tensorMap.get(e);if(t.resourceInfo)return;let n=bT(t.dtype)*v.sizeFromShape(t.shape),s=this.bufferManager.acquireBuffer(n,this.defaultGpuBufferUsage());if(t.resourceInfo={size:n,usage:this.defaultGpuBufferUsage(),buffer:s},t.values){let r=this.bufferManager.acquireUploadBuffer(n,GPUBufferUsage.MAP_WRITE|GPUBufferUsage.COPY_SRC),a=r.getMappedRange();t.dtype==="int32"||t.dtype==="bool"?new Int32Array(a).set(t.values):new Float32Array(a).set(t.values),r.unmap(),this.ensureCommandEncoderReady(),this.ensureComputePassEnded(),this.currentCommandEncoder.copyBufferToBuffer(r,0,s,0,n);let o={size:n,usage:GPUBufferUsage.MAP_WRITE|GPUBufferUsage.COPY_SRC,buffer:r};this.stagingPendingDisposal.push(o)}}makeUniforms(e){let t=0,n=0,s=[];e.forEach(i=>{i.data.length===0&&(i.data=[1]);let l;switch(i.data.length){case 1:l=4;break;case 2:l=8;break;case 3:l=16;break;case 4:l=16;break;case 5:l=16;break;case 6:l=16;break;default:v.assert(!1,()=>`Unsupported ${i.data.length}D shape`)}(n===5||n===6)&&(l=16),t=Math.ceil(t/l)*l,n=i.data.length,s.push(t),t+=i.data.length*4});let r=new ArrayBuffer(t);e.forEach((i,l)=>{let u=s[l];i.type==="int32"?new Int32Array(r,u,i.data.length).set(i.data):i.type==="uint32"?new Uint32Array(r,u,i.data.length).set(i.data):new Float32Array(r,u,i.data.length).set(i.data)});let a=this.bufferManager.acquireBuffer(t,GPUBufferUsage.COPY_DST|GPUBufferUsage.UNIFORM);this.queue.writeBuffer(a,0,r,0,t);let o={size:t,usage:GPUBufferUsage.COPY_DST|GPUBufferUsage.UNIFORM,buffer:a};return this.uniformPendingDisposal.push(o),{offset:0,size:t,buffer:a}}runWebGPUProgram(e,t,n,s,r){if(r||(r=this.makeTensorInfo(e.outputShape,n)),v.sizeFromShape(r.shape)===0)return this.tensorMap.get(r.dataId).values=v.getTypedArrayFromDType(r.dtype,0),r;this.uploadToGPU(r.dataId),e.dispatch=M0e(this.device,e);let a=[],o=[];if(!e.isFromPixels){a.push({type:"float32",data:[NaN]}),o=t.concat(r).map(g=>g.shape);let f="int32";o.map(g=>{a.push({type:f,data:g})});let m=v.computeStrides(r.shape);if(a.push({type:f,data:m}),e.size){let g=v.sizeFromShape(e.outputShape);a.push({type:f,data:[e.isVec4?g/4:g]})}}let i=t.map((f,m)=>{if(f.dtype==="complex64")throw new Error("GPGPUProgram does not support complex64 input. For complex64 dtypes, please separate the program into real and imaginary parts.");return this.uploadToGPU(f.dataId),{dtype:this.tensorMap.get(f.dataId).dtype,shape:f.shape,name:e.variableNames[m]}}),l=T0e(e,o,i,r),u;l in this.pipelineCache?u=this.pipelineCache[l]:(u=I0e(this.device,e,i,r),this.pipelineCache[l]=u),s&&(a=[...a,...s]);let c=[this.tensorToBinding(r),...t.map(f=>this.tensorToBinding(f)),this.makeUniforms(a)],p=this.device.createBindGroup({layout:u.getBindGroupLayout(0),entries:c.map((f,m)=>({binding:m,resource:f}))});this.ensureCommandEncoderReady();let d=this.getComputePass(),h=this.activeTimers!=null;return h&&this.supportTimeQuery&&d.writeTimestamp(this.querySet,0),d.setPipeline(u),d.setBindGroup(0,p),d.dispatchWorkgroups(e.dispatch[0],e.dispatch[1],e.dispatch[2]),h&&this.supportTimeQuery&&d.writeTimestamp(this.querySet,1),this.dispatchNumberInEncoder++,t.forEach(f=>{this.commandQueueOwnedIds.add(f.dataId)}),this.commandQueueOwnedIds.add(r.dataId),H().get("WEBGPU_DEFERRED_SUBMIT_BATCH_SIZE")<=this.dispatchNumberInEncoder&&this.submitQueue(),h&&this.activeTimers.push({name:e.constructor.name,query:this.getQueryTime(this.querySet)}),r}async getTimeFromQuerySet(e){let t=this.bufferManager.acquireBuffer(16,GPUBufferUsage.COPY_SRC|GPUBufferUsage.QUERY_RESOLVE),n=this.bufferManager.acquireBuffer(16,GPUBufferUsage.MAP_READ|GPUBufferUsage.COPY_DST);this.ensureCommandEncoderReady(),this.ensureComputePassEnded(),this.currentCommandEncoder.resolveQuerySet(e,0,2,t,0),this.currentCommandEncoder.copyBufferToBuffer(t,0,n,0,16),this.submitQueue(),await n.mapAsync(GPUMapMode.READ);let s=new BigUint64Array(n.getMappedRange()),r=Number(s[1]-s[0]);return n.unmap(),this.bufferManager.releaseBuffer(n,16,GPUBufferUsage.MAP_READ|GPUBufferUsage.COPY_DST),this.bufferManager.releaseBuffer(t,16,GPUBufferUsage.COPY_SRC|GPUBufferUsage.QUERY_RESOLVE),r/1e6}shouldExecuteOnCPU(e,t=O0e){return H().getBool("WEBGPU_CPU_FORWARD")&&e.every(n=>this.tensorMap.get(n.dataId).resourceInfo==null&&v.sizeFromShape(n.shape){H().set("CHECK_COMPUTATION_FOR_ERRORS",!1);let e={powerPreference:H().get("WEBGPU_USE_LOW_POWER_GPU")?"low-power":"high-performance"},t=await navigator.gpu.requestAdapter(e),n=t.limits,s={},r=t.features.has("timestamp-query");s.requiredLimits={maxComputeWorkgroupStorageSize:n.maxComputeWorkgroupStorageSize,maxComputeWorkgroupsPerDimension:n.maxComputeWorkgroupsPerDimension,maxStorageBufferBindingSize:n.maxStorageBufferBindingSize},r&&(s.requiredFeatures=["timestamp-query"]);let a=await t.requestDevice(s);return new B2(a)},3);var Ye;(function(e){e[e.MUL=0]="MUL",e[e.ADD=1]="ADD",e[e.ATAN2=2]="ATAN2",e[e.SUB=3]="SUB",e[e.DIV=4]="DIV",e[e.EQUAL=5]="EQUAL",e[e.GREATER=6]="GREATER",e[e.GREATER_EQUAL=7]="GREATER_EQUAL",e[e.LESS=8]="LESS",e[e.LESS_EQUAL=9]="LESS_EQUAL",e[e.LOGICAL_AND=10]="LOGICAL_AND",e[e.NOT_EQUAL=11]="NOT_EQUAL",e[e.SQUARED_DIFFERENCE=12]="SQUARED_DIFFERENCE",e[e.INT_DIV=13]="INT_DIV",e[e.POW=14]="POW",e[e.PRELU=15]="PRELU",e[e.MAX=16]="MAX",e[e.MIN=17]="MIN",e[e.COMPLEX_MULTIPLY_REAL=18]="COMPLEX_MULTIPLY_REAL",e[e.COMPLEX_MULTIPLY_IMAG=19]="COMPLEX_MULTIPLY_IMAG"})(Ye||(Ye={}));var z0e=` + `}return a}function g0e(e){let t=/(\w+)\s*:\s*vec(5|6)/g;e=e.replace(t,s=>"@align(16) "+s);let n=/vec(5|6)\s*,\s*(\w+)/g;return e=e.replace(n,(s,r,a)=>`vec${r}, @align(16) ${a}`),e}var nT={};We(nT,{ArrayBufferToTypedArray:()=>aT,GPUBytesPerElement:()=>rT,MatMulProgramType:()=>Tr,computeDispatch:()=>Be,computeWorkGroupInfoForMatMul:()=>sT,computeWorkGroupSizeForConv2d:()=>tb,computeWorkPerThreadForConv2d:()=>nb,flatDispatchLayout:()=>it,isWebGPUSupported:()=>sb,tilesFitEvenlyIntoShape:()=>y0e});var Yi=e=>{let t=1;for(let n=0;nn%e[s]===0)}function Be(e,t,n=[1,1,1],s=[1,1,1]){let[r,a,o]=[Math.ceil(Yi(e.x.map(i=>t[i]))/(n[0]*s[0])),e.y?Math.ceil(Yi(e.y.map(i=>t[i]))/(n[1]*s[1])):1,e.z?Math.ceil(Yi(e.z.map(i=>t[i]))/(n[2]*s[2])):1];return[r,a,o]}function sT(e,t,n,s=!1){let r=[8,8,1],a=[4,4,1];return s||(e<=8&&(a[1]=1),t<=16&&n<=16&&(r[0]=4)),{workGroupSize:r,elementsPerThread:a}}function tb(e,t,n=!1){if(n)return[8,8,1];let s=Yi(e.x.map(a=>t[a])),r=Yi(e.y.map(a=>t[a]));return s<=4?[4,16,1]:r<=4?[16,4,1]:[16,16,1]}function nb(e,t,n=!1){if(n)return[4,4,1];let s=Yi(e.x.map(a=>t[a])),r=Yi(e.y.map(a=>t[a]));return s<=4?[1,2,1]:r<=4?[2,1,1]:[2,2,1]}function it(e){return{x:e.map((t,n)=>n)}}function rT(e){if(e==="float32"||e==="int32"||e==="bool"||e==="string")return 4;if(e==="complex64")return 8;throw new Error(`Unknown dtype ${e}`)}function aT(e,t){if(t==="float32")return new Float32Array(e);if(t==="int32")return new Int32Array(e);if(t==="bool"||t==="string")return Uint8Array.from(new Int32Array(e));throw new Error(`Unknown dtype ${t}`)}function sb(){return(typeof window!="undefined"||typeof WorkerGlobalScope!="undefined")&&!!navigator.gpu}var Tr;(function(e){e[e.MatMulReduceProgram=0]="MatMulReduceProgram",e[e.MatMulSplitKProgram=1]="MatMulSplitKProgram",e[e.MatMulSmallOutputSizeProgram=2]="MatMulSmallOutputSizeProgram",e[e.MatMulPackedProgram=3]="MatMulPackedProgram",e[e.MatMulMax=4]="MatMulMax"})(Tr||(Tr={}));var A0e=U().getNumber("WEBGPU_CPU_HANDOFF_SIZE_THRESHOLD"),x0e=(e,t)=>{let n=e.limits.maxComputeWorkgroupsPerDimension,s=t.dispatchLayout,r=t.dispatch;if(r.every(o=>o<=n))return r;v.assert(r[0]>n&&s.y===void 0&&s.z===void 0,()=>"Dispatch size exceeds WebGPU limits in Y or Z dimension.");let a=Math.ceil(Math.sqrt(r[0]));return a>n?(a=Math.ceil(Math.cbrt(r[0])),v.assert(a<=n,()=>"Total dispatch size exceeds WebGPU maximum."),[a,a,a]):[a,a,1]},m2=class extends fc{constructor(e,t){if(super(),this.commandQueueOwnedIds=new WeakSet,this.dispatchNumberInEncoder=0,this.disposed=!1,this.downloadWaitMs=0,this.tensorDataPendingDisposal=[],this.stagingPendingDisposal=[],this.uniformPendingDisposal=[],this.uploadWaitMs=0,!sb())throw new Error("WebGPU is not supported on this device");this.pipelineCache={},this.device=e,this.queue=e.queue,this.currentCommandEncoder=null,this.currentComputePass=null,this.supportTimeQuery=e.features.has("timestamp-query"),this.adapterInfo=new s0e(t),this.bufferManager=new r0e(this.device),this.textureManager=new a0e(this.device),this.tensorMap=new Tp(this,Jt()),this.supportTimeQuery&&(this.querySet=this.device.createQuerySet({type:"timestamp",count:2})),U().getBool("WEBGPU_USE_PROFILE_TOOL")&&(this.dummyCanvas=document.createElement("canvas"),this.dummyCanvas.width=1,this.dummyCanvas.height=1,this.dummyContext=this.dummyCanvas.getContext("webgpu"),this.dummyContext.configure({device:e,format:"bgra8unorm"}),document.body.appendChild(this.dummyCanvas))}nextDataId(){return m2.nextDataId++}floatPrecision(){return 32}defaultGpuBufferUsage(){return GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_SRC|GPUBufferUsage.COPY_DST}disposeData(e,t=!1){if(this.tensorDataPendingDisposal.indexOf(e)>=0)return!1;if(!this.tensorMap.has(e))return!0;let n=this.tensorMap.get(e);if(this.decRef(e),!t&&n.refCount>0)return!1;if(this.commandQueueOwnedIds.has(e))return this.tensorDataPendingDisposal.push(e),!1;let{complexTensorInfos:s}=this.tensorMap.get(e);return s!=null&&(this.disposeData(s.real.dataId,t),this.disposeData(s.imag.dataId,t)),this.releaseResource(e),this.tensorMap.delete(e),!0}memory(){return{numBytesInGPU:this.bufferManager.numBytesUsed,numBytesAllocatedInGPU:this.bufferManager.numBytesAllocated,unreliable:!1}}releaseResource(e){let t=this.tensorMap.get(e);if(!(!t||!t.resourceInfo)){if("texture"in t.resourceInfo){let n=t.resourceInfo;n.texture instanceof GPUTexture&&this.textureManager.releaseTexture(n.texture,n.width,n.height,n.format,n.usage),n.texture=null}else{let n=t.resourceInfo;this.bufferManager.releaseBuffer(n.buffer,n.size,n.usage),n.buffer=null}t.resourceInfo=null}}refCount(e){return this.tensorMap.has(e)?this.tensorMap.get(e).refCount:0}incRef(e){let t=this.tensorMap.get(e);t.refCount++}decRef(e){if(this.tensorMap.has(e)){let t=this.tensorMap.get(e);t.refCount--}}write(e,t,n){if(n==="complex64"&&e!=null)throw new Error("Cannot write to a complex64 dtype. Please use tf.complex(real, imag).");let s={id:this.nextDataId()};return this.tensorMap.set(s,{dtype:n,shape:t,values:e,refCount:1}),s}move(e,t,n,s,r){if(s==="complex64")throw new Error("Cannot write to a complex64 dtype. Please use tf.complex(real, imag).");this.tensorMap.set(e,{dtype:s,shape:n,values:t,refCount:r})}submitQueue(){this.ensureComputePassEnded(),this.queue.submit([this.currentCommandEncoder.finish()]),this.currentCommandEncoder=null,this.dispatchNumberInEncoder=0,this.commandQueueOwnedIds=new WeakSet,this.tensorDataPendingDisposal.forEach(e=>{this.releaseResource(e),this.tensorMap.delete(e)}),this.uniformPendingDisposal.forEach(e=>this.bufferManager.releaseBuffer(e.buffer,e.size,e.usage)),this.stagingPendingDisposal.forEach(e=>this.bufferManager.releaseUploadBuffer(e.buffer,e.size,e.usage)),this.tensorDataPendingDisposal=[],this.uniformPendingDisposal=[],this.stagingPendingDisposal=[]}ensureCommandEncoderReady(){this.currentCommandEncoder||(this.currentCommandEncoder=this.device.createCommandEncoder())}ensureComputePassEnded(){this.currentComputePass&&(this.currentComputePass.end(),this.currentComputePass=null)}getComputePass(){return this.currentComputePass||(this.currentComputePass=this.currentCommandEncoder.beginComputePass()),this.currentComputePass}async getBufferData(e,t){let n=this.bufferManager.acquireBuffer(t,GPUBufferUsage.COPY_DST|GPUBufferUsage.MAP_READ);this.ensureCommandEncoderReady(),this.ensureComputePassEnded(),this.currentCommandEncoder.copyBufferToBuffer(e,0,n,0,t),this.submitQueue(),await n.mapAsync(GPUMapMode.READ);let s=n.getMappedRange().slice(0);return n.unmap(),n!=null&&this.bufferManager.releaseBuffer(n,t,GPUBufferUsage.COPY_DST|GPUBufferUsage.MAP_READ),U().getBool("WEBGPU_USE_PROFILE_TOOL")&&(v.assert(this.dummyContext!==void 0,()=>"Fail to get context for profiling tool"),this.dummyContext.getCurrentTexture()),s}convertAndCacheOnCPU(e,t){let n=this.tensorMap.get(e);return this.releaseResource(e),n.values=t,n.values}readSync(e){let t=this.tensorMap.get(e),{values:n}=t;if(n==null)throw new Error("WebGPU readSync is only available for CPU-resident tensors.");return n}async read(e){if(!this.tensorMap.has(e))throw new Error(`Tensor ${e} was not registered!`);let t=this.tensorMap.get(e),{values:n}=t;if(n!=null)return this.convertAndCacheOnCPU(e,n);let s;if(t.dtype==="complex64"){let r=await Promise.all([this.read(t.complexTensorInfos.real.dataId),this.read(t.complexTensorInfos.imag.dataId)]),a=r[0],o=r[1];s=T.mergeRealAndImagArrays(a,o)}else{let r=t.resourceInfo,a=await this.getBufferData(r.buffer,r.size);s=aT(a,t.dtype)}return this.convertAndCacheOnCPU(e,s),s}readToGPU(e){let t=this.tensorMap.get(e),{values:n,dtype:s,shape:r,resourceInfo:a}=t;if(s==="complex64")throw new Error("Does not support reading buffer for complex64 dtype.");if(a==null)throw n!=null?new Error("Data is not on GPU but on CPU."):new Error("There is no data on GPU or CPU.");let o=a.size,i=this.bufferManager.acquireBuffer(o,a.usage);this.ensureCommandEncoderReady(),this.ensureComputePassEnded(),this.currentCommandEncoder.copyBufferToBuffer(a.buffer,0,i,0,o),this.submitQueue();let l=this.makeTensorInfo(r,s),u=Jt().makeTensorFromTensorInfo(l),c=this.tensorMap.get(l.dataId);return c.resourceInfo={size:o,usage:this.defaultGpuBufferUsage(),buffer:i},{tensorRef:u,buffer:i,bufSize:o}}bufferSync(e){let t=this.readSync(e.dataId);if(e.dtype==="string")try{let n=t.map(s=>v.decodeString(s));return ze(e.shape,e.dtype,n)}catch(n){throw new Error("Failed to decode encoded string bytes into utf-8")}return ze(e.shape,e.dtype,t)}async time(e){this.supportTimeQuery||console.warn("This device doesn't support timestamp-query extension. Start Chrome browser with flag --disable-dawn-features=disallow_unsafe_apis then try again. Otherwise, zero will be shown for the kernel time when profiling mode is enabled. Using performance.now is not workable for webgpu since it doesn't support synchronous data read from GPU.");let t=this.activeTimers,n=[],s=!1;this.programTimersStack==null?(this.programTimersStack=n,s=!0):this.activeTimers.push(n),this.activeTimers=n,e();let r=v.flatten(this.activeTimers.map(l=>l.query)).filter(l=>l!=null),a=v.flatten(this.activeTimers.map(l=>l.name)).filter(l=>l!=null);this.activeTimers=t,s&&(this.programTimersStack=null);let o={uploadWaitMs:this.uploadWaitMs,downloadWaitMs:this.downloadWaitMs,kernelMs:null,wallMs:null},i=await Promise.all(r);return o.kernelMs=v.sum(i),o.getExtraProfileInfo=()=>i.map((l,u)=>({name:a[u],ms:l})).map(l=>`${l.name}: ${l.ms}`).join(", "),this.uploadWaitMs=0,this.downloadWaitMs=0,o}makeTensorInfo(e,t,n){return t==="string"&&n!=null&&n.length>0&&v.isString(n[0])&&(n=n.map(r=>v.encodeString(r))),{dataId:this.write(n,e,t),shape:e,dtype:t}}tensorToBinding(e){if(!e)return null;let t=this.tensorMap.get(e.dataId);if("texture"in t.resourceInfo){let s=t.resourceInfo;return s.texture instanceof GPUExternalTexture?s.texture:s.texture.createView()}let n=t.resourceInfo;return{offset:0,size:n.size,buffer:n.buffer}}async getQueryTime(e){return this.supportTimeQuery?this.getTimeFromQuerySet(e):0}uploadToGPU(e){let t=this.tensorMap.get(e);if(t.resourceInfo)return;let n=rT(t.dtype)*v.sizeFromShape(t.shape),s=this.bufferManager.acquireBuffer(n,this.defaultGpuBufferUsage());if(t.resourceInfo={size:n,usage:this.defaultGpuBufferUsage(),buffer:s},t.values){let r=this.bufferManager.acquireUploadBuffer(n,GPUBufferUsage.MAP_WRITE|GPUBufferUsage.COPY_SRC),a=r.getMappedRange();t.dtype==="int32"||t.dtype==="bool"?new Int32Array(a).set(t.values):new Float32Array(a).set(t.values),r.unmap(),this.ensureCommandEncoderReady(),this.ensureComputePassEnded(),this.currentCommandEncoder.copyBufferToBuffer(r,0,s,0,n);let o={size:n,usage:GPUBufferUsage.MAP_WRITE|GPUBufferUsage.COPY_SRC,buffer:r};this.stagingPendingDisposal.push(o)}}makeUniforms(e){let t=0,n=0,s=[];e.forEach(i=>{i.data.length===0&&(i.data=[1]);let l;switch(i.data.length){case 1:l=4;break;case 2:l=8;break;case 3:l=16;break;case 4:l=16;break;case 5:l=16;break;case 6:l=16;break;default:v.assert(!1,()=>`Unsupported ${i.data.length}D shape`)}(n===5||n===6)&&(l=16),t=Math.ceil(t/l)*l,n=i.data.length,s.push(t),t+=i.data.length*4});let r=new ArrayBuffer(t);e.forEach((i,l)=>{let u=s[l];i.type==="int32"?new Int32Array(r,u,i.data.length).set(i.data):i.type==="uint32"?new Uint32Array(r,u,i.data.length).set(i.data):new Float32Array(r,u,i.data.length).set(i.data)});let a=this.bufferManager.acquireBuffer(t,GPUBufferUsage.COPY_DST|GPUBufferUsage.UNIFORM);this.queue.writeBuffer(a,0,r,0,t);let o={size:t,usage:GPUBufferUsage.COPY_DST|GPUBufferUsage.UNIFORM,buffer:a};return this.uniformPendingDisposal.push(o),{offset:0,size:t,buffer:a}}runWebGPUProgram(e,t,n,s,r){if(r||(r=this.makeTensorInfo(e.outputShape,n)),v.sizeFromShape(r.shape)===0)return this.tensorMap.get(r.dataId).values=v.getTypedArrayFromDType(r.dtype,0),r;this.uploadToGPU(r.dataId),e.dispatch=x0e(this.device,e);let a=[],o=[];if(!e.isFromPixels){a.push({type:"float32",data:[NaN]}),o=t.concat(r).map(g=>g.shape);let f="int32";o.map(g=>{a.push({type:f,data:g})});let m=v.computeStrides(r.shape);if(a.push({type:f,data:m}),e.size){let g=v.sizeFromShape(e.outputShape);a.push({type:f,data:[e.isVec4?g/4:g]})}}let i=t.map((f,m)=>{if(f.dtype==="complex64")throw new Error("GPGPUProgram does not support complex64 input. For complex64 dtypes, please separate the program into real and imaginary parts.");return this.uploadToGPU(f.dataId),{dtype:this.tensorMap.get(f.dataId).dtype,shape:f.shape,name:e.variableNames[m]}}),l=u0e(e,o,i,r),u;l in this.pipelineCache?u=this.pipelineCache[l]:(u=i0e(this.device,e,i,r),this.pipelineCache[l]=u),s&&(a=[...a,...s]);let c=[this.tensorToBinding(r),...t.map(f=>this.tensorToBinding(f)),this.makeUniforms(a)],p=this.device.createBindGroup({layout:u.getBindGroupLayout(0),entries:c.map((f,m)=>({binding:m,resource:f}))});this.ensureCommandEncoderReady();let d=this.getComputePass(),h=this.activeTimers!=null;return h&&this.supportTimeQuery&&d.writeTimestamp(this.querySet,0),d.setPipeline(u),d.setBindGroup(0,p),d.dispatchWorkgroups(e.dispatch[0],e.dispatch[1],e.dispatch[2]),h&&this.supportTimeQuery&&d.writeTimestamp(this.querySet,1),this.dispatchNumberInEncoder++,t.forEach(f=>{this.commandQueueOwnedIds.add(f.dataId)}),this.commandQueueOwnedIds.add(r.dataId),U().get("WEBGPU_DEFERRED_SUBMIT_BATCH_SIZE")<=this.dispatchNumberInEncoder&&this.submitQueue(),h&&this.activeTimers.push({name:e.constructor.name,query:this.getQueryTime(this.querySet)}),r}async getTimeFromQuerySet(e){let t=this.bufferManager.acquireBuffer(16,GPUBufferUsage.COPY_SRC|GPUBufferUsage.QUERY_RESOLVE),n=this.bufferManager.acquireBuffer(16,GPUBufferUsage.MAP_READ|GPUBufferUsage.COPY_DST);this.ensureCommandEncoderReady(),this.ensureComputePassEnded(),this.currentCommandEncoder.resolveQuerySet(e,0,2,t,0),this.currentCommandEncoder.copyBufferToBuffer(t,0,n,0,16),this.submitQueue(),await n.mapAsync(GPUMapMode.READ);let s=new BigUint64Array(n.getMappedRange()),r=Number(s[1]-s[0]);return n.unmap(),this.bufferManager.releaseBuffer(n,16,GPUBufferUsage.MAP_READ|GPUBufferUsage.COPY_DST),this.bufferManager.releaseBuffer(t,16,GPUBufferUsage.COPY_SRC|GPUBufferUsage.QUERY_RESOLVE),r/1e6}shouldExecuteOnCPU(e,t=A0e){return U().getBool("WEBGPU_CPU_FORWARD")&&e.every(n=>this.tensorMap.get(n.dataId).resourceInfo==null&&v.sizeFromShape(n.shape){U().set("CHECK_COMPUTATION_FOR_ERRORS",!1);let e={powerPreference:U().get("WEBGPU_USE_LOW_POWER_GPU")?"low-power":"high-performance"},t=await navigator.gpu.requestAdapter(e),n=t.limits,s={},r=t.features.has("timestamp-query");s.requiredLimits={maxComputeWorkgroupStorageSize:n.maxComputeWorkgroupStorageSize,maxComputeWorkgroupsPerDimension:n.maxComputeWorkgroupsPerDimension,maxStorageBufferBindingSize:n.maxStorageBufferBindingSize},r&&(s.requiredFeatures=["timestamp-query"]);let a=await t.requestDevice(s),o=await t.requestAdapterInfo();return new m2(a,o)},3);var Xe;(function(e){e[e.MUL=0]="MUL",e[e.ADD=1]="ADD",e[e.ATAN2=2]="ATAN2",e[e.SUB=3]="SUB",e[e.DIV=4]="DIV",e[e.EQUAL=5]="EQUAL",e[e.GREATER=6]="GREATER",e[e.GREATER_EQUAL=7]="GREATER_EQUAL",e[e.LESS=8]="LESS",e[e.LESS_EQUAL=9]="LESS_EQUAL",e[e.LOGICAL_AND=10]="LOGICAL_AND",e[e.NOT_EQUAL=11]="NOT_EQUAL",e[e.SQUARED_DIFFERENCE=12]="SQUARED_DIFFERENCE",e[e.INT_DIV=13]="INT_DIV",e[e.POW=14]="POW",e[e.PRELU=15]="PRELU",e[e.MAX=16]="MAX",e[e.MIN=17]="MIN",e[e.COMPLEX_MULTIPLY_REAL=18]="COMPLEX_MULTIPLY_REAL",e[e.COMPLEX_MULTIPLY_IMAG=19]="COMPLEX_MULTIPLY_IMAG"})(Xe||(Xe={}));var b0e=` if (isnan(a)) { return a; } if (isnan(b)) { return b; } - `,wT=` + `,oT=` if (isNaN.r) { resultTemp.r = valueForNaN; } @@ -5180,16 +5180,16 @@ return a / b;`,Ble=` if (isNaN.a) { resultTemp.a = valueForNaN; } - `,kT=` + `,iT=` let isNaN = isnanVec4(a) | isnanVec4(b); - ${wT} - `,L0e="return a + b;",B0e="return areal * breal - aimag * bimag;",W0e="return areal * bimag + aimag * breal;",V0e="return a / b;",U0e="return a * b;",G0e="return (a - b) * (a - b);",H0e="return a - b;",j0e="return f32(a == b);",q0e="return vec4(a == b);",X0e="return f32(a > b);",K0e="return vec4(a > b);",Z0e="return f32(a >= b);",Y0e="return vec4(a >= b);",J0e="return f32(a < b);",Q0e="return vec4(a < b);",e2e="return f32(a <= b);",t2e="return vec4(a <= b);",n2e="return f32(f32(a) >= 1.0 && f32(b) >= 1.0);",s2e=`return (vec4(a >= vec4(1.0)) * - vec4(b >= vec4(1.0)));`,r2e=` + ${oT} + `,v0e="return a + b;",w0e="return areal * breal - aimag * bimag;",k0e="return areal * bimag + aimag * breal;",S0e="return a / b;",I0e="return a * b;",C0e="return (a - b) * (a - b);",T0e="return a - b;",N0e="return f32(a == b);",E0e="return vec4(a == b);",R0e="return f32(a > b);",_0e="return vec4(a > b);",D0e="return f32(a >= b);",$0e="return vec4(a >= b);",P0e="return f32(a < b);",F0e="return vec4(a < b);",O0e="return f32(a <= b);",M0e="return vec4(a <= b);",z0e="return f32(f32(a) >= 1.0 && f32(b) >= 1.0);",L0e=`return (vec4(a >= vec4(1.0)) * + vec4(b >= vec4(1.0)));`,B0e=` let s = sign(a) * sign(b); let ia = i32(round(a)); let ib = i32(round(b)); return f32(idiv(ia, ib, s)); - `,a2e=` + `,W0e=` let ia = vec4(round(a)); let ib = vec4(round(b)); let cond = ib != vec4(0); @@ -5210,18 +5210,18 @@ return a / b;`,Ble=` resultTemp[3] = idiv(ia[3], ib[3], s[3]); } return vec4(resultTemp); - `,o2e=` + `,V0e=` if (isnan(a) || isnan(b)) { return 1.0; } return f32(a != b); -`,i2e=` +`,U0e=` var resultTemp = vec4(a != b); let valueForNaN = 1.0; - ${kT} + ${iT} return resultTemp; -`,l2e=` +`,G0e=` if(a < 0.0 && floor(b) < b) { return uniforms.NAN; } @@ -5232,7 +5232,7 @@ return a / b;`,Ble=` return pow(abs(a), b); } return sign(a) * pow(abs(a), b); - `,u2e=` + `,H0e=` let isModRound1Bool = vec4(round(abs(b) % vec4(2.0))) == vec4(1); let isModRound1 = vec4(isModRound1Bool); let multiplier = sign(a) * isModRound1 + (vec4(1.0) - isModRound1); @@ -5252,24 +5252,24 @@ return a / b;`,Ble=` if (isExpZero.a) { resultTemp.a = 1.0; } - let isNaN = a < vec4(0.0) & floor(b) < b; + let isNaN = (a < vec4(0.0)) & (floor(b) < b); let valueForNaN = uniforms.NAN; - ${wT} + ${oT} return resultTemp; - `,c2e="if (a < 0.0) { return b * a; } return a;",d2e=` + `,j0e="if (a < 0.0) { return b * a; } return a;",q0e=` let aLessThanZero = vec4(a < vec4(0.0)); return (aLessThanZero * (b * a)) + ((vec4(1.0) - aLessThanZero) * a); - `;function R3(e,t,n="uniforms.NAN"){let s=t?kT:z0e;return t?` + `;function u3(e,t,n="uniforms.NAN"){let s=t?iT:b0e;return t?` let valueForNaN = ${n}; var resultTemp = vec4(${e}(a, b)); `+s+` return resultTemp; `:s+` return ${e}(a, b); - `}function Ym(e,t){switch(e){case Ye.MUL:return U0e;case Ye.ADD:return L0e;case Ye.ATAN2:return R3("atan2",t);case Ye.SUB:return H0e;case Ye.DIV:return V0e;case Ye.EQUAL:return t?q0e:j0e;case Ye.GREATER:return t?K0e:X0e;case Ye.GREATER_EQUAL:return t?Y0e:Z0e;case Ye.LESS:return t?Q0e:J0e;case Ye.LESS_EQUAL:return t?t2e:e2e;case Ye.LOGICAL_AND:return t?s2e:n2e;case Ye.NOT_EQUAL:return t?i2e:o2e;case Ye.SQUARED_DIFFERENCE:return G0e;case Ye.INT_DIV:return t?a2e:r2e;case Ye.PRELU:return t?d2e:c2e;case Ye.MAX:return R3("max",t);case Ye.MIN:return R3("min",t);case Ye.POW:return t?u2e:l2e;case Ye.COMPLEX_MULTIPLY_REAL:return B0e;case Ye.COMPLEX_MULTIPLY_IMAG:return W0e;default:throw new Error(`BinaryType ${e} is not implemented!`)}}var Oe;(function(e){e[e.ABS=0]="ABS",e[e.CEIL=1]="CEIL",e[e.COS=2]="COS",e[e.COSH=3]="COSH",e[e.ELU=4]="ELU",e[e.EXP=5]="EXP",e[e.EXPM1=6]="EXPM1",e[e.FLOOR=7]="FLOOR",e[e.IS_NAN=8]="IS_NAN",e[e.LINEAR=9]="LINEAR",e[e.LOG=10]="LOG",e[e.LOGICAL_NOT=11]="LOGICAL_NOT",e[e.NEG=12]="NEG",e[e.RELU=13]="RELU",e[e.RELU6=14]="RELU6",e[e.LEAKYRELU=15]="LEAKYRELU",e[e.RECIPROCAL=16]="RECIPROCAL",e[e.RSQRT=17]="RSQRT",e[e.SIN=18]="SIN",e[e.SINH=19]="SINH",e[e.SIGMOID=20]="SIGMOID",e[e.SQRT=21]="SQRT",e[e.SQUARE=22]="SQUARE",e[e.TANH=23]="TANH",e[e.TO_INT=24]="TO_INT"})(Oe||(Oe={}));var p2e="return abs(a);",h2e="return ceil(a);",f2e="return cos(a);",m2e=` + `}function rb(e,t){switch(e){case Xe.MUL:return I0e;case Xe.ADD:return v0e;case Xe.ATAN2:return u3("atan2",t);case Xe.SUB:return T0e;case Xe.DIV:return S0e;case Xe.EQUAL:return t?E0e:N0e;case Xe.GREATER:return t?_0e:R0e;case Xe.GREATER_EQUAL:return t?$0e:D0e;case Xe.LESS:return t?F0e:P0e;case Xe.LESS_EQUAL:return t?M0e:O0e;case Xe.LOGICAL_AND:return t?L0e:z0e;case Xe.NOT_EQUAL:return t?U0e:V0e;case Xe.SQUARED_DIFFERENCE:return C0e;case Xe.INT_DIV:return t?W0e:B0e;case Xe.PRELU:return t?q0e:j0e;case Xe.MAX:return u3("max",t);case Xe.MIN:return u3("min",t);case Xe.POW:return t?H0e:G0e;case Xe.COMPLEX_MULTIPLY_REAL:return w0e;case Xe.COMPLEX_MULTIPLY_IMAG:return k0e;default:throw new Error(`BinaryType ${e} is not implemented!`)}}var De;(function(e){e[e.ABS=0]="ABS",e[e.CEIL=1]="CEIL",e[e.COS=2]="COS",e[e.COSH=3]="COSH",e[e.ELU=4]="ELU",e[e.EXP=5]="EXP",e[e.EXPM1=6]="EXPM1",e[e.FLOOR=7]="FLOOR",e[e.IS_NAN=8]="IS_NAN",e[e.LINEAR=9]="LINEAR",e[e.LOG=10]="LOG",e[e.LOGICAL_NOT=11]="LOGICAL_NOT",e[e.NEG=12]="NEG",e[e.RELU=13]="RELU",e[e.RELU6=14]="RELU6",e[e.LEAKYRELU=15]="LEAKYRELU",e[e.RECIPROCAL=16]="RECIPROCAL",e[e.RSQRT=17]="RSQRT",e[e.SIN=18]="SIN",e[e.SINH=19]="SINH",e[e.SIGMOID=20]="SIGMOID",e[e.SQRT=21]="SQRT",e[e.SQUARE=22]="SQUARE",e[e.TANH=23]="TANH",e[e.TO_INT=24]="TO_INT"})(De||(De={}));var X0e="return abs(a);",K0e="return ceil(a);",Z0e="return cos(a);",Y0e=` let e2x = exp(-a); return (e2x + 1.0 / e2x) / 2.0; -`,g2e="return exp(a) - 1.0;",y2e="if (a >= 0.0) { return a; } return (exp(a) - 1.0);",A2e=` +`,J0e="return exp(a) - 1.0;",Q0e="if (a >= 0.0) { return a; } return (exp(a) - 1.0);",e2e=` var resFloat = exp(a) - vec4(1.0); if (a.r >= 0.0) { resFloat.r = a.r; @@ -5284,36 +5284,35 @@ return a / b;`,Ble=` resFloat.a = a.a; } return resFloat; -`,x2e="return exp(a);",b2e="return floor(a);",v2e="return f32(isnan(a));",w2e="return a;",k2e=`if (a < 0.0) { return 1.0/0.0; } - return log(a);`,S2e="return f32(!(a >= 1.0));",I2e="return -a;",C2e="if (a < 0.0) { return uniforms.alpha * a; } return a;",T2e=` +`,t2e="return exp(a);",n2e="return floor(a);",s2e="return f32(isnan(a));",r2e="return a;",a2e=`if (a < 0.0) { return uniforms.NAN; } + return log(a);`,o2e="return f32(!(a >= 1.0));",i2e="return -a;",l2e="if (a < 0.0) { return uniforms.alpha * a; } return a;",u2e=` let aLessThanZero = vec4(a < vec4(0.0)); return (aLessThanZero * (uniforms.alpha * a)) + ((vec4(1.0) - aLessThanZero) * a); -`,N2e="return 1.0 / a;",E2e="return select(a, 0.0, a < 0.0);",R2e="return clamp(a, 0.0, 6.0);",_2e="return clamp(a, vec4(0.0, 0.0, 0.0, 0.0), vec4(6.0, 6.0, 6.0, 6.0));",D2e=` +`,c2e="return 1.0 / a;",d2e="return select(a, 0.0, a < 0.0);",p2e="return clamp(a, 0.0, 6.0);",h2e="return clamp(a, vec4(0.0, 0.0, 0.0, 0.0), vec4(6.0, 6.0, 6.0, 6.0));",f2e=` return select(a, vec4(0.0), a < vec4(0.0)); -`,$2e="return 1.0/sqrt(a);",P2e="return 1.0 / (1.0 + exp(-1.0 * a));",F2e="return sin(a);",O2e=` +`,m2e="return 1.0/sqrt(a);",g2e="return 1.0 / (1.0 + exp(-1.0 * a));",y2e="return sin(a);",A2e=` let e2x = exp(a); return (e2x - 1.0 / e2x) / 2.0; -`,M2e="return sqrt(a);",z2e="return a * a;",L2e=` +`,x2e="return sqrt(a);",b2e="return a * a;",v2e=` let e2x = exp(-2.0 * abs(a)); return sign(a) * (1.0 - e2x) / (1.0 + e2x); -`,B2e="return f32(i32((a)));";function qi(e,t){switch(e){case Oe.ABS:return p2e;case Oe.COS:return f2e;case Oe.COSH:return m2e;case Oe.CEIL:return h2e;case Oe.ELU:return t?A2e:y2e;case Oe.EXP:return x2e;case Oe.EXPM1:return g2e;case Oe.FLOOR:return b2e;case Oe.IS_NAN:return v2e;case Oe.LINEAR:return w2e;case Oe.LOG:return k2e;case Oe.LOGICAL_NOT:return S2e;case Oe.NEG:return I2e;case Oe.LEAKYRELU:return t?T2e:C2e;case Oe.RECIPROCAL:return N2e;case Oe.RELU:return t?D2e:E2e;case Oe.RELU6:return t?_2e:R2e;case Oe.RSQRT:return $2e;case Oe.SIGMOID:return P2e;case Oe.SIN:return F2e;case Oe.SINH:return O2e;case Oe.SQRT:return M2e;case Oe.SQUARE:return z2e;case Oe.TANH:return L2e;case Oe.TO_INT:return B2e;default:throw new Error(`BinaryType ${e} is not implemented!`)}}var Jt=e=>{switch(e){case 1:return"f32";case 2:return"vec2";case 3:return"vec3";case 4:return"vec4";default:throw new Error(`${e}-component is not supported.`)}};function wi(e,t=!1,n=!1,s=3){if(e===null)return"";let r="";if(e==="linear")r=qi(Oe.LINEAR);else if(e==="relu")r=qi(Oe.RELU,n);else if(e==="elu")r=qi(Oe.ELU,n);else if(e==="relu6")r=qi(Oe.RELU6,n);else if(e==="prelu")r=Ym(Ye.PRELU,n);else if(e==="sigmoid")r=qi(Oe.SIGMOID,n);else if(e==="leakyrelu")r=qi(Oe.LEAKYRELU,n);else throw new Error(`Activation ${e} has not been implemented for the WebGPU backend.`);let o=Jt(n?4:1),i="";return t?i=` +`,w2e="return f32(i32((a)));";function Li(e,t){switch(e){case De.ABS:return X0e;case De.COS:return Z0e;case De.COSH:return Y0e;case De.CEIL:return K0e;case De.ELU:return t?e2e:Q0e;case De.EXP:return t2e;case De.EXPM1:return J0e;case De.FLOOR:return n2e;case De.IS_NAN:return s2e;case De.LINEAR:return r2e;case De.LOG:return a2e;case De.LOGICAL_NOT:return o2e;case De.NEG:return i2e;case De.LEAKYRELU:return t?u2e:l2e;case De.RECIPROCAL:return c2e;case De.RELU:return t?f2e:d2e;case De.RELU6:return t?h2e:p2e;case De.RSQRT:return m2e;case De.SIGMOID:return g2e;case De.SIN:return y2e;case De.SINH:return A2e;case De.SQRT:return x2e;case De.SQUARE:return b2e;case De.TANH:return v2e;case De.TO_INT:return w2e;default:throw new Error(`BinaryType ${e} is not implemented!`)}}var Yt=e=>{switch(e){case 1:return"f32";case 2:return"vec2";case 3:return"vec3";case 4:return"vec4";default:throw new Error(`${e}-component is not supported.`)}};function Pa(e,t=!1,n=!1,s=3){if(e===null)return"";let r="";if(e==="linear")r=Li(De.LINEAR);else if(e==="relu")r=Li(De.RELU,n);else if(e==="elu")r=Li(De.ELU,n);else if(e==="relu6")r=Li(De.RELU6,n);else if(e==="prelu")r=rb(Xe.PRELU,n);else if(e==="sigmoid")r=Li(De.SIGMOID,n);else if(e==="leakyrelu")r=Li(De.LEAKYRELU,n);else throw new Error(`Activation ${e} has not been implemented for the WebGPU backend.`);let o=Yt(n?4:1),i="";return t?i=` fn activation(a : ${o}, coords : vec${s}) -> ${o} { let b = getPreluActivationWeightsByOutputCoords(coords); ${r} }`:i=` fn activation(a : ${o}, coords : vec${s}) -> ${o} { ${r} - }`,i}function wd(e,t){return` + }`,i}function hu(e,t){return` ${e?"value = value + getBiasByOutputCoords(coords);":""} ${t?"value = activation(value, coords);":""} - `}function ST(e,t,n,s,r=!1,a=!1,o=!1,i=1){v.assert(n&&i===1||!n,()=>`transposeA ${n} is not compatible with component size ${i}`);let l=` + `}function lT(e,t,n,s,r=!1,a=!1,o=!1,i=1){v.assert(n&&i===1||!n,()=>`transposeA ${n} is not compatible with component size ${i}`);let l=` let batch = ${e?"0":"batchIn"}; - let batchASize = uniforms.aShape[1] * uniforms.aShape[2]; - ${n?`value = A[(batch * batchASize + col * uniforms.aShape[2] + row) / ${i}];`:`value = A[(batch * batchASize + row * uniforms.aShape[2] + col) / ${i}];`} + ${n?"value = getA(batch, col, row);":"value = getA(batch, row, col);"} - `,u;return s===!1?u=`value = B[(batch * batchBSize + row * uniforms.bShape[2] + col) / ${i}];`:u=`value = B[(batch * batchBSize + col * uniforms.bShape[2] + row) / ${i}];`,` - fn mm_readA(batchIn: i32, row: i32, colIn: i32) -> ${Jt(i)} { - var value = ${Jt(i)}(0.0); + `,u=s?"value = getB(batch, col, row);":"value = getB(batch, row, col);";return` + fn mm_readA(batchIn: i32, row: i32, colIn: i32) -> ${Yt(i)} { + var value = ${Yt(i)}(0.0); let col = colIn * ${i}; ${r&&o?l:` ${n?"if(row < uniforms.dimAOuter && col < uniforms.dimInner)":"if(row < uniforms.aShape[1] && col < uniforms.aShape[2])"} @@ -5324,27 +5323,26 @@ return a / b;`,Ble=` return value; } - fn mm_readB(batchIn: i32, row: i32, colIn: i32) -> ${Jt(i)} { + fn mm_readB(batchIn: i32, row: i32, colIn: i32) -> ${Yt(i)} { let col = colIn * ${i}; let batch = ${t?"0":"batchIn"}; - let batchBSize = uniforms.bShape[1] * uniforms.bShape[2]; - var value = ${Jt(i)}(0.0); + var value = ${Yt(i)}(0.0); ${u} return value; } - `}function kb(e,t,n,s,r,a,o=!1,i=!1,l=!1,u=1){return` - ${ST(n,s,r,a,o,i,l,u)} - fn mm_write(batch: i32, row: i32, colIn: i32, valueIn: ${Jt(u)}) { + `}function ab(e,t,n,s,r,a,o=!1,i=!1,l=!1,u=1){return` + ${lT(n,s,r,a,o,i,l,u)} + fn mm_write(batch: i32, row: i32, colIn: i32, valueIn: ${Yt(u)}) { let col = colIn * ${u}; ${o&&i?"":"if (row < uniforms.dimAOuter && col < uniforms.dimBOuter)"} { var value = valueIn; let coords = vec3(batch, row, col); - ${wd(e,t)} + ${hu(e,t)} setOutputAtCoords(coords[0], coords[1], coords[2], value); } } - `}var W2e=e=>e?` + `}var k2e=e=>e?` mm_Asub[inputRow][inputCol] = mm_readA(batch, kStart + inputRow, globalRowStart / InnerElementSize + inputCol); @@ -5352,7 +5350,7 @@ return a / b;`,Ble=` mm_Asub[inputRow][inputCol] = mm_readA(batch, globalRow + innerRow, kStart / InnerElementSize + inputCol); - `,V2e=(e,t)=>e?` + `,S2e=(e,t)=>e?` let ACached0 = mm_Asub[k * InnerElementSize][localRow]; let ACached1 = mm_Asub[k * InnerElementSize + 1][localRow]; let ACached2 = mm_Asub[k * InnerElementSize + 2][localRow]; @@ -5369,7 +5367,7 @@ return a / b;`,Ble=` acc[i] = BCached1 * ACached.y + acc[i]; acc[i] = BCached2 * ACached.z + acc[i]; ${t===3?"":"acc[i] = BCached3 * ACached.w + acc[i];"} - }`;function W2(e,t,n=!1,s=32,r=!1,a=32,o=!1){let i=t[1]*e[1],l=t[0]*e[0],u=n?i:s,c=n?s:i,p=u/t[0],d=s/t[1];return v.assert((n&&p===4&&e[1]===4||!n&&(p===3||p===4))&&u%t[0]===0&&s%t[1]===0&&e[0]===4,()=>`If transposeA ${n} is true, innerElementSize ${p} and workPerThread[1] ${e[1]} must be 4. + }`;function g2(e,t,n=!1,s=32,r=!1,a=32,o=!1){let i=t[1]*e[1],l=t[0]*e[0],u=n?i:s,c=n?s:i,p=u/t[0],d=s/t[1];return v.assert((n&&p===4&&e[1]===4||!n&&(p===3||p===4))&&u%t[0]===0&&s%t[1]===0&&e[0]===4,()=>`If transposeA ${n} is true, innerElementSize ${p} and workPerThread[1] ${e[1]} must be 4. Otherwise, innerElementSize ${p} must be 3 or 4. tileAWidth ${u} must be divisible by workGroupSize[0]${t[0]}. tileInner ${s} must be divisible by workGroupSize[1] ${t[1]}. ColPerThread ${e[0]} must be 4.`),` var mm_Asub : array, ${u/p}>, ${c}>; @@ -5410,7 +5408,7 @@ return a / b;`,Ble=` for (var innerRow = 0; innerRow < RowPerThread; innerRow = innerRow + 1) { let inputRow = tileRow + innerRow; let inputCol = tileCol; - ${W2e(n)} + ${k2e(n)} } // Load one tile of B into local memory. @@ -5429,7 +5427,7 @@ return a / b;`,Ble=` let BCached2 = mm_Bsub[k * InnerElementSize + 2][tileCol]; ${p===3?"":"let BCached3 = mm_Bsub[k * InnerElementSize + 3][tileCol];"} - ${V2e(n,p)} + ${S2e(n,p)} } workgroupBarrier(); @@ -5438,7 +5436,7 @@ return a / b;`,Ble=` for (var innerRow = 0; innerRow < RowPerThread; innerRow = innerRow + 1) { mm_write(batch, globalRow + innerRow, globalCol, acc[innerRow]); } - }`}var U2e=e=>e?` + }`}var j7=e=>e?` mm_Asub[inputRow][inputCol] = mm_readA(batch, kStart + inputRow, globalRowStart + inputCol); @@ -5446,64 +5444,26 @@ return a / b;`,Ble=` mm_Asub[inputRow][inputCol] = mm_readA(batch, globalRowStart + inputRow, kStart + inputCol); - `,G2e=e=>e?"let ACached = mm_Asub[k][tileRow + innerRow];":"let ACached = mm_Asub[tileRow + innerRow][k];";function V2(e,t,n=!1,s=32,r=!1,a=32){let o=e[1]*t[1],i=e[0]*t[0],l=n?o:s,u=n?s:o;v.assert(u%t[1]===0&&l%t[0]===0&&s%t[1]===0,()=>`tileAHight ${u} must be divisible by workGroupSize[1]${t[1]}, tileAWidth ${l} must be divisible by workGroupSize[0]${t[0]}, tileInner ${s} must be divisible by workGroupSize[1]${t[1]}`);let c=u/t[1],p=l/t[0],d=s/t[1];return` - var mm_Asub : array, ${u}>; - var mm_Bsub : array, ${s}>; - const RowPerThread = ${e[1]}; - const ColPerThread = ${e[0]}; - const TileInner = ${s}; + `,I2e=e=>e?"let ACached = mm_Asub[k][tileRow + innerRow];":"let ACached = mm_Asub[tileRow + innerRow][k];";function y2(e,t,n=!1,s=32,r=!1,a=32,o=!1){let i=e[1]*t[1],l=e[0]*t[0],u=n?i:s,c=n?s:i;v.assert(c%t[1]===0&&u%t[0]===0&&s%t[1]===0,()=>`tileAHight ${c} must be divisible by workGroupSize[1]${t[1]}, tileAWidth ${u} must be divisible by workGroupSize[0]${t[0]}, tileInner ${s} must be divisible by workGroupSize[1]${t[1]}`);let p=c/t[1],d=u/t[0],h=s/t[1],f=o?` + let localRow = i32(localId.y); + let localCol = i32(localId.x); + let globalRowStart = i32(workgroupId.y) * ${i}; + let globalColStart = i32(workgroupId.x) * ${l}; - @compute @workgroup_size(workGroupSizeX, workGroupSizeY, workGroupSizeZ) - fn _start(@builtin(local_invocation_id) LocalId : vec3, - @builtin(global_invocation_id) GlobalId : vec3, - @builtin(num_workgroups) NumWorkgroups: vec3, - @builtin(workgroup_id) workgroupId: vec3) { - localId = LocalId; - globalId = GlobalId; - numWorkgroups = NumWorkgroups; - - let tileRow = i32(localId.y) * RowPerThread; - let tileCol = i32(localId.x) * ColPerThread; - - let globalRow = i32(globalId.y) * RowPerThread; - let globalCol = i32(globalId.x) * ColPerThread; - let batch = ${r?"0":"i32(globalId.z)"}; - let globalRowStart = i32(workgroupId.y) * ${o}; - - let numTiles = ${r?`${Math.ceil(a/s)}`:"(uniforms.dimInner - 1) / TileInner + 1"}; - var kStart = ${r?`i32(globalId.z) * ${a}`:"0"}; - - var acc : array, RowPerThread>; - - // Without this initialization strange values show up in acc. - for (var innerRow = 0; innerRow < RowPerThread; innerRow = innerRow + 1) { - for (var innerCol = 0; innerCol < ColPerThread; innerCol = innerCol + 1) { - acc[innerRow][innerCol] = 0.0; - } - } - - let tileRowA = i32(localId.y) * ${c}; - let tileColA = i32(localId.x) * ${p}; - let tileRowB = i32(localId.y) * ${d}; // Loop over shared dimension. for (var t = 0; t < numTiles; t = t + 1) { // Load one tile of A into local memory. - for (var innerRow = 0; innerRow < ${c}; innerRow = innerRow + 1) { - for (var innerCol = 0; innerCol < ${p}; innerCol = innerCol + 1) { - let inputRow = tileRowA + innerRow; - let inputCol = tileColA + innerCol; - ${U2e(n)} + for (var inputRow = localRow; inputRow < ${c}; inputRow = inputRow + ${t[1]}) { + for (var inputCol = localCol; inputCol < ${u}; inputCol = inputCol + ${t[0]}) { + ${j7(n)} } } - // Load one tile of B into local memory. - for (var innerRow = 0; innerRow < ${d}; innerRow = innerRow + 1) { - for (var innerCol = 0; innerCol < ColPerThread; innerCol = innerCol + 1) { - let inputRow = tileRowB + innerRow; - let inputCol = tileCol + innerCol; + for (var inputRow = localRow; inputRow < ${s}; inputRow = inputRow + ${t[1]}) { + for (var inputCol = localCol; inputCol < ${l}; inputCol = inputCol + ${t[0]}) { mm_Bsub[inputRow][inputCol] = mm_readB(batch, kStart + inputRow, - globalCol + innerCol); + globalColStart + inputCol); } } kStart = kStart + TileInner; @@ -5513,28 +5473,115 @@ return a / b;`,Ble=` var BCached : array; for (var k = 0; k < TileInner; k = k + 1) { for (var inner = 0; inner < ColPerThread; inner = inner + 1) { - BCached[inner] = mm_Bsub[k][tileCol + inner]; + BCached[inner] = mm_Bsub[k][localCol + inner * ${t[0]}]; } - for (var innerRow = 0; innerRow < RowPerThread; innerRow = innerRow + 1) { - ${G2e(n)} + let ACached = ${n?`mm_Asub[k][localRow + innerRow * ${t[1]}];`:`mm_Asub[localRow + innerRow * ${t[1]}][k];`} for (var innerCol = 0; innerCol < ColPerThread; innerCol = innerCol + 1) { - acc[innerRow][innerCol] = acc[innerRow][innerCol] + ACached * BCached[innerCol]; + acc[innerRow][innerCol] = acc[innerRow][innerCol] + + ACached * BCached[innerCol]; } } } - workgroupBarrier(); } + for (var innerRow = 0; innerRow < RowPerThread; innerRow = innerRow + 1) { + let gRow = globalRowStart + localRow + innerRow * ${t[1]}; + for (var innerCol = 0; innerCol < ColPerThread; innerCol = innerCol + 1) { + let gCol = globalColStart + localCol + innerCol * ${t[0]}; + mm_write(batch, gRow, gCol, acc[innerRow][innerCol]); + } + } + `:` + let tileRow = i32(localId.y) * RowPerThread; + let tileCol = i32(localId.x) * ColPerThread; + + let globalRow = i32(globalId.y) * RowPerThread; + let globalCol = i32(globalId.x) * ColPerThread; + let globalRowStart = i32(workgroupId.y) * ${i}; + + let tileRowA = i32(localId.y) * ${p}; + let tileColA = i32(localId.x) * ${d}; + let tileRowB = i32(localId.y) * ${h}; + // Loop over shared dimension. + for (var t = 0; t < numTiles; t = t + 1) { + // Load one tile of A into local memory. + for (var innerRow = 0; innerRow < ${p}; innerRow = innerRow + 1) { + for (var innerCol = 0; innerCol < ${d}; innerCol = innerCol + 1) { + let inputRow = tileRowA + innerRow; + let inputCol = tileColA + innerCol; + ${j7(n)} + } + } + + // Load one tile of B into local memory. + for (var innerRow = 0; innerRow < ${h}; innerRow = innerRow + 1) { + for (var innerCol = 0; innerCol < ColPerThread; innerCol = innerCol + 1) { + let inputRow = tileRowB + innerRow; + let inputCol = tileCol + innerCol; + mm_Bsub[inputRow][inputCol] = mm_readB(batch, + kStart + inputRow, + globalCol + innerCol); + } + } + kStart = kStart + TileInner; + workgroupBarrier(); + + // Compute acc values for a single thread. + var BCached : array; + for (var k = 0; k < TileInner; k = k + 1) { + for (var inner = 0; inner < ColPerThread; inner = inner + 1) { + BCached[inner] = mm_Bsub[k][tileCol + inner]; + } for (var innerRow = 0; innerRow < RowPerThread; innerRow = innerRow + 1) { + ${I2e(n)} for (var innerCol = 0; innerCol < ColPerThread; innerCol = innerCol + 1) { - mm_write(batch, globalRow + innerRow, globalCol + innerCol, - acc[innerRow][innerCol]); + acc[innerRow][innerCol] = acc[innerRow][innerCol] + ACached * BCached[innerCol]; } } } - `}var H2e=e=>e?` + + workgroupBarrier(); + } + + for (var innerRow = 0; innerRow < RowPerThread; innerRow = innerRow + 1) { + for (var innerCol = 0; innerCol < ColPerThread; innerCol = innerCol + 1) { + mm_write(batch, globalRow + innerRow, globalCol + innerCol, + acc[innerRow][innerCol]); + } + } + `;return` + var mm_Asub : array, ${c}>; + var mm_Bsub : array, ${s}>; + const RowPerThread = ${e[1]}; + const ColPerThread = ${e[0]}; + const TileInner = ${s}; + + @compute @workgroup_size(workGroupSizeX, workGroupSizeY, workGroupSizeZ) + fn _start(@builtin(local_invocation_id) LocalId : vec3, + @builtin(global_invocation_id) GlobalId : vec3, + @builtin(num_workgroups) NumWorkgroups: vec3, + @builtin(workgroup_id) workgroupId: vec3) { + localId = LocalId; + globalId = GlobalId; + numWorkgroups = NumWorkgroups; + + let batch = ${r?"0":"i32(globalId.z)"}; + let numTiles = ${r?`${Math.ceil(a/s)}`:"(uniforms.dimInner - 1) / TileInner + 1"}; + var kStart = ${r?`i32(globalId.z) * ${a}`:"0"}; + + var acc : array, RowPerThread>; + + // Without this initialization strange values show up in acc. + for (var innerRow = 0; innerRow < RowPerThread; innerRow = innerRow + 1) { + for (var innerCol = 0; innerCol < ColPerThread; innerCol = innerCol + 1) { + acc[innerRow][innerCol] = 0.0; + } + } + ${f} + } + `}var C2e=e=>e?` mm_readA(batch, colA, globalRow), mm_readA(batch, colA + 1, globalRow), mm_readA(batch, colA + 2, globalRow), @@ -5544,11 +5591,11 @@ return a / b;`,Ble=` mm_readA(batch, globalRow, colA + 1), mm_readA(batch, globalRow, colA + 2), mm_readA(batch, globalRow, colA + 3) - `;function j2e(e,t=!1){return v.assert(e[1]===1&&e[2]===1,()=>`A linear work group size is required. But got ${e}.`),` + `;function T2e(e,t=!1){return v.assert(e[1]===1&&e[2]===1,()=>`A linear work group size is required. But got ${e}.`),` const TileSize = ${e[0]*4}; var mm_Asub : array, ${e[0]}>; - ${nt()} { + ${Je()} { let tileCol = i32(localId.x); let globalCol = i32(globalId.x); let globalRow = i32(globalId.y); @@ -5562,7 +5609,7 @@ return a / b;`,Ble=` for (var t = 0; t < numTiles; t = t + 1) { // Load one tile of A into local memory. let colA = t * TileSize + tileCol * 4; - mm_Asub[tileCol] = vec4(${H2e(t)}); + mm_Asub[tileCol] = vec4(${C2e(t)}); workgroupBarrier(); // Compute acc values for a single thread. @@ -5582,13 +5629,13 @@ return a / b;`,Ble=` mm_write(batch, globalRow, globalCol, acc); } - `}var q2e=class{constructor(e,t,n,s,r=!1,a=!1,o=null,i=null,l=null){this.variableNames=["A","B"],this.uniforms="dimAOuter : i32, dimBOuter : i32, dimInner : i32,",this.outputShape=t,this.dispatchLayout={x:[2],y:[1],z:[0]};let u=r?e[1]:e[2];if(this.isVec4=(u%4===0&&!r||t[1]%4===0&&r)&&t[2]%4===0&&!a,this.isVectorA=t[1]===1&&!r,!this.isVec4&&this.isVectorA)this.elementsPerThread=[1,1,1],this.workGroupSize=[32,1,1];else{let d=xT(t[1],u,t[2],r);this.workGroupSize=d.workGroupSize,this.elementsPerThread=d.elementsPerThread}this.dispatch=je(this.dispatchLayout,this.outputShape,this.workGroupSize,this.elementsPerThread);let c=o!=null,p=l!=null;c&&this.variableNames.push("bias"),p&&this.variableNames.push("preluActivationWeights"),this.transposeA=r,this.transposeB=a,this.addBias=c,this.activation=i,this.hasPreluActivationWeights=p,this.batchAEqualOne=n,this.batchBEqualOne=s,[this.fitAOuter,this.fitBOuter,this.fitInner]=this.getShapeFit(t[1],t[2],u),this.shaderKey=`matMulPacked_${this.elementsPerThread}_${r}_${a}_${this.activation}_${this.fitAOuter}_${this.fitBOuter}_${this.fitInner}_${this.isVec4}_${this.isVectorA}_${this.batchAEqualOne}_${this.batchBEqualOne}`}getShapeFit(e,t,n){let s=this.workGroupSize[1]*this.elementsPerThread[1],r=this.workGroupSize[0]*this.elementsPerThread[0];!this.isVec4&&this.isVectorA?this.tileInner=this.workGroupSize[0]*4:this.tileInner=r;let a=e%s===0,o=t%r===0,i=n%this.tileInner===0;return[a,o,i]}getUserCode(){return` - ${wi(this.activation,this.hasPreluActivationWeights,this.isVec4)} - ${kb(this.addBias,this.activation,this.batchAEqualOne,this.batchBEqualOne,!1,this.transposeB,this.fitAOuter,this.fitBOuter,this.fitInner,this.isVec4?4:1)} - ${this.isVec4?W2(this.elementsPerThread,this.workGroupSize,this.transposeA,this.tileInner,!1,null,this.isVectorA):this.isVectorA?j2e(this.workGroupSize,this.transposeA):V2(this.elementsPerThread,this.workGroupSize,this.transposeA,this.tileInner)} - `}};function X2e(){return` + `}var N2e=class{constructor(e,t,n,s,r=!1,a=!1,o=null,i=null,l=null,u=!1){this.variableNames=["A","B"],this.uniforms="dimAOuter : i32, dimBOuter : i32, dimInner : i32,",this.outputShape=t,this.dispatchLayout={x:[2],y:[1],z:[0]};let c=r?e[1]:e[2];if(this.isVec4=(c%4===0&&!r||t[1]%4===0&&r)&&t[2]%4===0&&!a,this.isVectorA=t[1]===1&&!r,!this.isVec4&&this.isVectorA)this.elementsPerThread=[1,1,1],this.workGroupSize=[32,1,1];else{let h=sT(t[1],c,t[2],r);this.workGroupSize=h.workGroupSize,this.elementsPerThread=h.elementsPerThread}this.dispatch=Be(this.dispatchLayout,this.outputShape,this.workGroupSize,this.elementsPerThread);let p=o!=null,d=l!=null;p&&this.variableNames.push("bias"),d&&this.variableNames.push("preluActivationWeights"),this.sequentialAccessByThreads=u,this.transposeA=r,this.transposeB=a,this.addBias=p,this.activation=i,this.hasPreluActivationWeights=d,this.batchAEqualOne=n,this.batchBEqualOne=s,[this.fitAOuter,this.fitBOuter,this.fitInner]=this.getShapeFit(t[1],t[2],c),this.shaderKey=`matMulPacked_${this.elementsPerThread}_${r}_${a}_${this.activation}_${this.fitAOuter}_${this.fitBOuter}_${this.fitInner}_${this.isVec4}_${this.isVectorA}_${this.batchAEqualOne}_${this.batchBEqualOne}_${this.sequentialAccessByThreads}`}getShapeFit(e,t,n){let s=this.workGroupSize[1]*this.elementsPerThread[1],r=this.workGroupSize[0]*this.elementsPerThread[0];!this.isVec4&&this.isVectorA?this.tileInner=this.workGroupSize[0]*4:this.tileInner=r;let a=e%s===0,o=t%r===0,i=n%this.tileInner===0;return[a,o,i]}getUserCode(){return` + ${Pa(this.activation,this.hasPreluActivationWeights,this.isVec4)} + ${ab(this.addBias,this.activation,this.batchAEqualOne,this.batchBEqualOne,!1,this.transposeB,this.fitAOuter,this.fitBOuter,this.fitInner,this.isVec4?4:1)} + ${this.isVec4?g2(this.elementsPerThread,this.workGroupSize,this.transposeA,this.tileInner,!1,null,this.isVectorA):this.isVectorA?T2e(this.workGroupSize,this.transposeA):y2(this.elementsPerThread,this.workGroupSize,this.transposeA,this.tileInner,!1,null,this.sequentialAccessByThreads)} + `}};function E2e(){return` var sumValues : array; - ${nt()} { + ${Je()} { let coords = getOutputCoords(); let batch = coords[0]; let row = coords[1]; @@ -5617,11 +5664,11 @@ return a / b;`,Ble=` mm_write(batch, row, col, sum); } } - `}var K2e=class{constructor(e,t,n,s=!1,r=!1,a=null,o=null,i=null){this.variableNames=["A","B"],this.uniforms="dimAOuter : i32, dimBOuter : i32, dimInner : i32,",this.workGroupSize=[256,1,1],this.outputShape=e,this.dispatchLayout={x:[],y:[1,2],z:[0]},this.dispatch=je(this.dispatchLayout,this.outputShape,this.workGroupSize);let l=a!=null,u=i!=null;l&&this.variableNames.push("bias"),u&&this.variableNames.push("preluActivationWeights"),this.transposeA=s,this.transposeB=r,this.addBias=l,this.activation=o,this.hasPreluActivationWeights=u,this.batchAEqualOne=t,this.batchBEqualOne=n,this.shaderKey=`matMulReduce_${this.activation}_${s}_${r}_${this.batchAEqualOne}_${this.batchBEqualOne}`}getUserCode(){return` - ${wi(this.activation,this.hasPreluActivationWeights)} - ${kb(this.addBias,this.activation,this.batchAEqualOne,this.batchBEqualOne,this.transposeA,this.transposeB)} - ${X2e()} - `}};function Z2e(e){let t=e[1],n=e[0],s=t>n?t:n;return` + `}var R2e=class{constructor(e,t,n,s=!1,r=!1,a=null,o=null,i=null){this.variableNames=["A","B"],this.uniforms="dimAOuter : i32, dimBOuter : i32, dimInner : i32,",this.workGroupSize=[256,1,1],this.outputShape=e,this.dispatchLayout={x:[],y:[1,2],z:[0]},this.dispatch=Be(this.dispatchLayout,this.outputShape,this.workGroupSize);let l=a!=null,u=i!=null;l&&this.variableNames.push("bias"),u&&this.variableNames.push("preluActivationWeights"),this.transposeA=s,this.transposeB=r,this.addBias=l,this.activation=o,this.hasPreluActivationWeights=u,this.batchAEqualOne=t,this.batchBEqualOne=n,this.shaderKey=`matMulReduce_${this.activation}_${s}_${r}_${this.batchAEqualOne}_${this.batchBEqualOne}`}getUserCode(){return` + ${Pa(this.activation,this.hasPreluActivationWeights)} + ${ab(this.addBias,this.activation,this.batchAEqualOne,this.batchBEqualOne,this.transposeA,this.transposeB)} + ${E2e()} + `}};function _2e(e){let t=e[1],n=e[0],s=t>n?t:n;return` var mm_Asub : array, ${t}>; var mm_Bsub : array, ${s}>; @@ -5631,7 +5678,7 @@ return a / b;`,Ble=` // shared memory, so it is instruction-Level parallelism for arithmetic // operations and others handle IO operations between barrier api, makes ALU // and load/store units work simultaneously, could improves the performance. - ${nt()} { + ${Je()} { let tileRow = i32(localId.y); let tileCol = i32(localId.x); let globalRow = i32(globalId.y); @@ -5671,11 +5718,11 @@ return a / b;`,Ble=` mm_write(batch, globalRow, globalCol, acc); } - `}var Y2e=class{constructor(e,t,n,s=!1,r=!1,a=null,o=null,i=null){this.variableNames=["A","B"],this.uniforms="dimAOuter : i32, dimBOuter : i32, dimInner : i32,",this.workGroupSize=[16,8,1],this.outputShape=n,this.dispatchLayout={x:[2],y:[1],z:[0]},this.dispatch=[Math.ceil(n[2]/this.workGroupSize[0]),Math.ceil(n[1]/this.workGroupSize[1]),n[0]];let l=a!=null;l&&this.variableNames.push("bias");let u=i!=null;u&&this.variableNames.push("preluActivationWeights"),this.transposeA=s,this.transposeB=r,this.addBias=l,this.activation=o,this.hasPreluActivationWeights=u,this.batchAEqualOne=e[0]===1,this.batchBEqualOne=t[0]===1,this.shaderKey=`matMulSmallOutputSize_${this.activation}_${s}_${r}_${this.batchAEqualOne}_${this.batchBEqualOne}`}getUserCode(){return` - ${wi(this.activation,this.hasPreluActivationWeights)} - ${kb(this.addBias,this.activation,this.batchAEqualOne,this.batchBEqualOne,this.transposeA,this.transposeB)} - ${Z2e(this.workGroupSize)} - `}},J2e=class{constructor(e,t,n,s,r=!1,a=!1){this.variableNames=["A","B"],this.uniforms="dimAOuter : i32, dimBOuter : i32, dimInner : i32,",this.workGroupSize=[8,8,1],this.atomic=!0,this.isVec4=!1,this.splitedDimInner=128,v.assert(e[0]===1,()=>"MatMulSplitKProgram only supports batch = 1."),this.outputShape=e,this.dispatchLayout={x:[2],y:[1],z:[0,3]},this.isVec4=(r&&this.outputShape[1]%4===0||!r&&t%4===0)&&this.outputShape[2]%4===0,this.elementsPerThread=[4,4,this.splitedDimInner],this.isVec4||(this.outputShape[1]<16&&(this.elementsPerThread[1]=1),this.outputShape[2]<16&&(this.elementsPerThread[0]=1)),this.dispatch=je(this.dispatchLayout,[this.outputShape[0],this.outputShape[1],this.outputShape[2],t],this.workGroupSize,this.elementsPerThread),this.transposeA=r,this.transposeB=a,this.batchAEqualOne=n,this.batchBEqualOne=s,this.shaderKey=`matMulSplitK_${r}_${a}_${n}_${s}_${this.elementsPerThread}_${this.isVec4}`}getUserCode(){let e=s=>` + `}var D2e=class{constructor(e,t,n,s=!1,r=!1,a=null,o=null,i=null){this.variableNames=["A","B"],this.uniforms="dimAOuter : i32, dimBOuter : i32, dimInner : i32,",this.workGroupSize=[16,8,1],this.outputShape=n,this.dispatchLayout={x:[2],y:[1],z:[0]},this.dispatch=[Math.ceil(n[2]/this.workGroupSize[0]),Math.ceil(n[1]/this.workGroupSize[1]),n[0]];let l=a!=null;l&&this.variableNames.push("bias");let u=i!=null;u&&this.variableNames.push("preluActivationWeights"),this.transposeA=s,this.transposeB=r,this.addBias=l,this.activation=o,this.hasPreluActivationWeights=u,this.batchAEqualOne=e[0]===1,this.batchBEqualOne=t[0]===1,this.shaderKey=`matMulSmallOutputSize_${this.activation}_${s}_${r}_${this.batchAEqualOne}_${this.batchBEqualOne}`}getUserCode(){return` + ${Pa(this.activation,this.hasPreluActivationWeights)} + ${ab(this.addBias,this.activation,this.batchAEqualOne,this.batchBEqualOne,this.transposeA,this.transposeB)} + ${_2e(this.workGroupSize)} + `}},$2e=class{constructor(e,t,n,s,r=!1,a=!1){this.variableNames=["A","B"],this.uniforms="dimAOuter : i32, dimBOuter : i32, dimInner : i32,",this.workGroupSize=[8,8,1],this.atomic=!0,this.isVec4=!1,this.splitedDimInner=128,v.assert(e[0]===1,()=>"MatMulSplitKProgram only supports batch = 1."),this.outputShape=e,this.dispatchLayout={x:[2],y:[1],z:[0,3]},this.isVec4=(r&&this.outputShape[1]%4===0||!r&&t%4===0)&&this.outputShape[2]%4===0,this.elementsPerThread=[4,4,this.splitedDimInner],this.isVec4||(this.outputShape[1]<16&&(this.elementsPerThread[1]=1),this.outputShape[2]<16&&(this.elementsPerThread[0]=1)),this.dispatch=Be(this.dispatchLayout,[this.outputShape[0],this.outputShape[1],this.outputShape[2],t],this.workGroupSize,this.elementsPerThread),this.transposeA=r,this.transposeB=a,this.batchAEqualOne=n,this.batchBEqualOne=s,this.shaderKey=`matMulSplitK_${r}_${a}_${n}_${s}_${this.elementsPerThread}_${this.isVec4}`}getUserCode(){let e=s=>` for (var i = 0; i < ${s}; i = i + 1) { var oldValue = atomicLoad(&(result[flatIndex + i])); @@ -5689,8 +5736,8 @@ return a / b;`,Ble=` } } `,t=this.isVec4?4:1;return` - ${ST(this.batchAEqualOne,this.batchBEqualOne,!1,this.transposeB,!1,!1,!1,t)} - fn mm_write(batch: i32, row : i32, colIn : i32, value : ${Jt(t)}) { + ${lT(this.batchAEqualOne,this.batchBEqualOne,!1,this.transposeB,!1,!1,!1,t)} + fn mm_write(batch: i32, row : i32, colIn : i32, value : ${Yt(t)}) { let col = colIn * ${t}; if (row < uniforms.dimAOuter && col < uniforms.dimBOuter) { let coords = vec3(batch, row, col); @@ -5700,30 +5747,30 @@ return a / b;`,Ble=` ${e(t)} } } - ${this.isVec4?W2(this.elementsPerThread,this.workGroupSize,this.transposeA,32,!0,this.splitedDimInner):V2(this.elementsPerThread,this.workGroupSize,this.transposeA,32,!0,this.splitedDimInner)} - `}},Q2e=class{constructor(e,t=null,n=null,s=null){this.uniforms="",this.variableNames=["x"],this.workGroupSize=[64,1,1],this.size=!0,this.outputShape=e,this.dispatchLayout=lt(this.outputShape),this.dispatch=je(this.dispatchLayout,this.outputShape,this.workGroupSize),this.addBias=t!=null,this.hasPreluActivationWeights=s!=null,this.activation=n,this.addBias&&this.variableNames.push("bias"),this.hasPreluActivationWeights&&this.variableNames.push("preluActivationWeights"),this.shaderKey=`biasActivation_${n}`}getUserCode(){return` - ${wi(this.activation,this.hasPreluActivationWeights)} - ${nt("index")} { + ${this.isVec4?g2(this.elementsPerThread,this.workGroupSize,this.transposeA,32,!0,this.splitedDimInner):y2(this.elementsPerThread,this.workGroupSize,this.transposeA,32,!0,this.splitedDimInner)} + `}},P2e=class{constructor(e,t=null,n=null,s=null){this.uniforms="",this.variableNames=["x"],this.workGroupSize=[64,1,1],this.size=!0,this.outputShape=e,this.dispatchLayout=it(this.outputShape),this.dispatch=Be(this.dispatchLayout,this.outputShape,this.workGroupSize),this.addBias=t!=null,this.hasPreluActivationWeights=s!=null,this.activation=n,this.addBias&&this.variableNames.push("bias"),this.hasPreluActivationWeights&&this.variableNames.push("preluActivationWeights"),this.shaderKey=`biasActivation_${n}`}getUserCode(){return` + ${Pa(this.activation,this.hasPreluActivationWeights)} + ${Je("index")} { if (index < uniforms.size) { let coords = getCoordsFromIndex(index); var value = getXByOutputIndex(index); - ${wd(this.addBias,this.activation)} + ${hu(this.addBias,this.activation)} setOutputAtIndex(index, value); } } - `}},e1e=class{constructor(e){this.variableNames=[],this.outputShape=[],this.uniforms="value : f32,",this.workGroupSize=[64,1,1],this.size=!0,this.outputShape=e,this.dispatchLayout=lt(this.outputShape),this.dispatch=je(this.dispatchLayout,this.outputShape,this.workGroupSize),this.shaderKey="fill"}getUserCode(){return` - ${nt("index")} { + `}},F2e=class{constructor(e){this.variableNames=[],this.outputShape=[],this.uniforms="value : f32,",this.workGroupSize=[64,1,1],this.size=!0,this.outputShape=e,this.dispatchLayout=it(this.outputShape),this.dispatch=Be(this.dispatchLayout,this.outputShape,this.workGroupSize),this.shaderKey="fill"}getUserCode(){return` + ${Je("index")} { if (index < uniforms.size) { setOutputAtIndex(index, uniforms.value); } } - `}};function vu(e){let{backend:t,attrs:n}=e,{shape:s,value:r}=n,{dtype:a}=n;if(a=a||v.inferDtype(r),a==="string"){let o=v.getArrayFromDType(a,v.sizeFromShape(s));return o.fill(r),t.makeTensorInfo(s,a,o)}else{let o=new e1e(s),i=[{type:"float32",data:[r]}];return t.runWebGPUProgram(o,[],a,i)}}var t1e={kernelName:zc,backendName:"webgpu",kernelFunc:vu};function He(e){let{inputs:t,attrs:n}=e,{x:s}=t,{shape:r}=n,a=v.sizeFromShape(s.shape),o=v.inferFromImplicitShape(r,a),i=v.sizeFromShape(o);return v.assert(a===i,()=>`The new shape (${o}) has ${i} elements and the old shape (${s.shape}) has ${a} elements. The new shape and old shape must have the same number of elements.`),e.backend.incRef(s.dataId),{dataId:s.dataId,shape:o,dtype:s.dtype}}var n1e={kernelName:jl,backendName:"webgpu",kernelFunc:He};function Sb({a:e,b:t,transposeA:n,transposeB:s,backend:r,bias:a=null,preluActivationWeights:o=null,leakyreluAlpha:i=0,activation:l=null}){let u=e.shape.length,c=t.shape.length,p=n?e.shape[u-2]:e.shape[u-1],d=s?t.shape[c-1]:t.shape[c-2],h=n?e.shape[u-1]:e.shape[u-2],f=s?t.shape[c-2]:t.shape[c-1],m=e.shape.slice(0,-2),g=t.shape.slice(0,-2),y=v.sizeFromShape(m),x=v.sizeFromShape(g),b=uu.assertAndGetBroadcastShape(e.shape.slice(0,-2),t.shape.slice(0,-2)).concat([h,f]);v.assert(p===d,()=>`Error in matMul: inner shapes (${p}) and (${d}) of Tensors with shapes ${e.shape} and ${t.shape} and transposeA=${n} and transposeB=${s} must match.`);let w=n?[y,p,h]:[y,h,p],k=s?[x,f,d]:[x,d,f],C=He({inputs:{x:e},backend:r,attrs:{shape:w}}),E=He({inputs:{x:t},backend:r,attrs:{shape:k}}),_=[C,E],$=Math.max(y,x),R=y===1,P=x===1,S=[C,E],M=[{type:"int32",data:[h]},{type:"int32",data:[f]},{type:"int32",data:[p]}],L,U,K=[$,h,f],q=H().get("WEBGPU_MATMUL_PROGRAM_TYPE");switch(q<0&&(h*f<=128?q=$r.MatMulReduceProgram:$===1&&h<=128&&f<=48&&d>=2e3?q=$r.MatMulSplitKProgram:h<=16&&(f<=512||d>=2*f)||f<=16&&(h<=512||p>=2*h)?q=$r.MatMulSmallOutputSizeProgram:q=$r.MatMulPackedProgram),q){case $r.MatMulReduceProgram:L=new K2e(K,R,P,n,s,a,l,o);break;case $r.MatMulSplitKProgram:{if(U=vu({backend:r,attrs:{shape:K,value:0,dtype:e.dtype}}),L=new J2e(K,d,R,P,n,s),a||l){U=r.runWebGPUProgram(L,S,e.dtype,M,U);let J=new Q2e(U.shape,a,l,o),te=null,le=[U];a&&le.push(a),o&&le.push(o),l==="leakyrelu"&&(te=[{type:"float32",data:[i]}],J.uniforms+=" alpha : f32,");let ae=r.runWebGPUProgram(J,le,U.dtype,te);_.push(U);let pe=He({inputs:{x:ae},backend:r,attrs:{shape:b}});_.push(ae);for(let ce of _)r.disposeData(ce.dataId);return pe}break}case $r.MatMulSmallOutputSizeProgram:L=new Y2e(w,k,K,n,s,a,l,o);break;case $r.MatMulPackedProgram:L=new q2e(w,K,R,P,n,s,a,l,o);break;default:throw new Error(`Unsupported MatMulProgramType ${q}.`)}a&&S.push(a),o&&S.push(o),l==="leakyrelu"&&(M.push({type:"float32",data:[i]}),L.uniforms+=" alpha : f32,"),U=r.runWebGPUProgram(L,S,e.dtype,M,U);let Z=He({inputs:{x:U},backend:r,attrs:{shape:b}});_.push(U);for(let J of _)r.disposeData(J.dataId);return Z}function s1e(e){let{inputs:t,backend:n,attrs:s}=e,{a:r,b:a,bias:o,preluActivationWeights:i}=t,{transposeA:l,transposeB:u,activation:c,leakyreluAlpha:p}=s;return Sb({a:r,b:a,transposeA:l,transposeB:u,backend:n,bias:o,preluActivationWeights:i,leakyreluAlpha:p,activation:c})}var r1e={kernelName:ao,backendName:"webgpu",kernelFunc:s1e},h6=class{constructor(e,t,n){this.variableNames=["AReal","AImag","BReal","BImag"],this.workGroupSize=[128,1,1],this.size=!0,this.outputShape=T.assertAndGetBroadcastShape(t,n),this.dispatchLayout=lt(this.outputShape),this.dispatch=je(this.dispatchLayout,this.outputShape,this.workGroupSize),this.shaderKey=`binaryOpComplex_${e}`,this.op=e}getUserCode(){return` + `}};function fu(e){let{backend:t,attrs:n}=e,{shape:s,value:r}=n,{dtype:a}=n;if(a=a||v.inferDtype(r),a==="string"){let o=v.getArrayFromDType(a,v.sizeFromShape(s));return o.fill(r),t.makeTensorInfo(s,a,o)}else{let o=new F2e(s),i=[{type:"float32",data:[r]}];return t.runWebGPUProgram(o,[],a,i)}}var O2e={kernelName:Cc,backendName:"webgpu",kernelFunc:fu};function Le(e){let{inputs:t,attrs:n}=e,{x:s}=t,{shape:r}=n,a=v.sizeFromShape(s.shape),o=v.inferFromImplicitShape(r,a),i=v.sizeFromShape(o);return v.assert(a===i,()=>`The new shape (${o}) has ${i} elements and the old shape (${s.shape}) has ${a} elements. The new shape and old shape must have the same number of elements.`),e.backend.incRef(s.dataId),{dataId:s.dataId,shape:o,dtype:s.dtype}}var M2e={kernelName:zl,backendName:"webgpu",kernelFunc:Le};function ob({a:e,b:t,transposeA:n,transposeB:s,backend:r,bias:a=null,preluActivationWeights:o=null,leakyreluAlpha:i=0,activation:l=null}){let u=e.shape.length,c=t.shape.length,p=n?e.shape[u-2]:e.shape[u-1],d=s?t.shape[c-1]:t.shape[c-2],h=n?e.shape[u-1]:e.shape[u-2],f=s?t.shape[c-2]:t.shape[c-1],m=e.shape.slice(0,-2),g=t.shape.slice(0,-2),y=v.sizeFromShape(m),x=v.sizeFromShape(g),b=tu.assertAndGetBroadcastShape(e.shape.slice(0,-2),t.shape.slice(0,-2)).concat([h,f]);v.assert(p===d,()=>`Error in matMul: inner shapes (${p}) and (${d}) of Tensors with shapes ${e.shape} and ${t.shape} and transposeA=${n} and transposeB=${s} must match.`);let w=n?[y,p,h]:[y,h,p],k=s?[x,f,d]:[x,d,f],C=Le({inputs:{x:e},backend:r,attrs:{shape:w}}),N=Le({inputs:{x:t},backend:r,attrs:{shape:k}}),R=[C,N],D=Math.max(y,x),E=y===1,$=x===1,S=[C,N],F=[{type:"int32",data:[h]},{type:"int32",data:[f]},{type:"int32",data:[p]}],z,V,j=[D,h,f],G=U().get("WEBGPU_MATMUL_PROGRAM_TYPE");switch(G<0&&(h*f<=128?G=Tr.MatMulReduceProgram:D===1&&h<=128&&f<=48&&d>=2e3?G=Tr.MatMulSplitKProgram:h<=16&&(f<=512||d>=2*f)||f<=16&&(h<=512||p>=2*h)?G=Tr.MatMulSmallOutputSizeProgram:G=Tr.MatMulPackedProgram),G){case Tr.MatMulReduceProgram:z=new R2e(j,E,$,n,s,a,l,o);break;case Tr.MatMulSplitKProgram:{if(V=fu({backend:r,attrs:{shape:j,value:0,dtype:e.dtype}}),z=new $2e(j,d,E,$,n,s),a||l){V=r.runWebGPUProgram(z,S,e.dtype,F,V);let ne=new P2e(V.shape,a,l,o),ae=null,re=[V];a&&re.push(a),o&&re.push(o),l==="leakyrelu"&&(ae=[{type:"float32",data:[i]}],ne.uniforms+=" alpha : f32,");let ue=r.runWebGPUProgram(ne,re,V.dtype,ae);R.push(V);let oe=Le({inputs:{x:ue},backend:r,attrs:{shape:b}});R.push(ue);for(let Ae of R)r.disposeData(Ae.dataId);return oe}break}case Tr.MatMulSmallOutputSizeProgram:z=new D2e(w,k,j,n,s,a,l,o);break;case Tr.MatMulPackedProgram:let K=r.adapterInfo.isIntel();z=new N2e(w,j,E,$,n,s,a,l,o,K);break;default:throw new Error(`Unsupported MatMulProgramType ${G}.`)}a&&S.push(a),o&&S.push(o),l==="leakyrelu"&&(F.push({type:"float32",data:[i]}),z.uniforms+=" alpha : f32,"),V=r.runWebGPUProgram(z,S,e.dtype,F,V);let q=Le({inputs:{x:V},backend:r,attrs:{shape:b}});R.push(V);for(let K of R)r.disposeData(K.dataId);return q}function z2e(e){let{inputs:t,backend:n,attrs:s}=e,{a:r,b:a,bias:o,preluActivationWeights:i}=t,{transposeA:l,transposeB:u,activation:c,leakyreluAlpha:p}=s;return ob({a:r,b:a,transposeA:l,transposeB:u,backend:n,bias:o,preluActivationWeights:i,leakyreluAlpha:p,activation:c})}var L2e={kernelName:no,backendName:"webgpu",kernelFunc:z2e},q7=class{constructor(e,t,n){this.variableNames=["AReal","AImag","BReal","BImag"],this.workGroupSize=[128,1,1],this.size=!0,this.outputShape=T.assertAndGetBroadcastShape(t,n),this.dispatchLayout=it(this.outputShape),this.dispatch=Be(this.dispatchLayout,this.outputShape,this.workGroupSize),this.shaderKey=`binaryOpComplex_${e}`,this.op=e}getUserCode(){return` fn binaryOpComplex( areal : f32, aimag : f32, breal : f32, bimag : f32) -> f32 { - ${Ym(this.op,!1)} + ${rb(this.op,!1)} } - ${nt("index")} { + ${Je("index")} { if(index < uniforms.size) { let areal = getARealByOutputIndex(index); let aimag = getAImagByOutputIndex(index); @@ -5732,55 +5779,50 @@ return a / b;`,Ble=` setOutputAtIndex(index, binaryOpComplex(areal, aimag, breal, bimag)); } } - `}},Dy=class{constructor(e,t,n){this.size=!0,this.variableNames=["A","B"],this.outputShape=T.assertAndGetBroadcastShape(t,n),this.dispatchLayout=lt(this.outputShape),this.op=e,this.useSharedMemoryWithA=t.length===1&&n.length>1&&t[0]<1024,this.useSharedMemoryWithB=n.length===1&&t.length>1&&n[0]<1024,this.useSharedMemoryWithA||this.useSharedMemoryWithB?(this.isVec4=!1,this.lastDimensionSize=this.useSharedMemoryWithB?n[0]:t[0],this.shaderKey=`binary_${this.type}_${e}_${this.lastDimensionSize}_${this.useSharedMemoryWithB}`,this.type="shared",this.workGroupSize=[256,1,1],this.lastDimensionSize<256?this.workPerThread=1:this.lastDimensionSize<512?this.workPerThread=2:this.workPerThread=4):(v.arraysEqual(t,n)&&v.sizeFromShape(t)%4===0?(this.isVec4=!0,this.type="vec4",this.workPerThread=4):(this.isVec4=!1,this.type="plain",this.workPerThread=1),this.shaderKey=`binary_${this.type}_${e}`,this.workGroupSize=[128,1,1]),this.dispatch=je(this.dispatchLayout,this.outputShape,this.workGroupSize,[this.workPerThread,1,1])}getUserCode(){let e;if(this.type==="shared"){let t=this.lastDimensionSize>1?`coords[${this.outputShape.length-1}]`:"0",n=this.useSharedMemoryWithB?`let a = getAByOutputCoords(coords); - let b = sharedBuf[${t}];`:`let a = sharedBuf[${t}]; - let b = getBByOutputCoords(coords);`;e=` - fn binaryOperation(a : f32, b : f32) -> f32 { - ${Ym(this.op,this.isVec4)} - } + `}},dy=class{constructor(e,t,n){this.size=!0,this.variableNames=["A","B"],this.outputShape=T.assertAndGetBroadcastShape(t,n),this.dispatchLayout=it(this.outputShape),this.op=e,this.useSharedMemoryWithA=t.length<=1&&n.length>1&&t[0]<128,this.useSharedMemoryWithB=n.length<=1&&t.length>1&&n[0]<128,this.useSharedMemoryWithA||this.useSharedMemoryWithB?(this.isVec4=!1,this.lastDimensionSize=this.useSharedMemoryWithB?n[0]:t[0],this.shaderKey=`binary_${this.type}_${e}_${this.lastDimensionSize}_${this.useSharedMemoryWithB}`,this.type="shared",this.workGroupSize=[256,1,1],this.workPerThread=1):(v.arraysEqual(t,n)&&v.sizeFromShape(t)%4===0?(this.isVec4=!0,this.type="vec4",this.workPerThread=4):(this.isVec4=!1,this.type="plain",this.workPerThread=1),this.shaderKey=`binary_${this.type}_${e}`,this.workGroupSize=[128,1,1]),this.dispatch=Be(this.dispatchLayout,this.outputShape,this.workGroupSize,[this.workPerThread,1,1])}getUserCode(){let e,t=this.isVec4?"vec4":"f32",n=` + fn binaryOperation(a : ${t}, b : ${t}) -> ${t} { + ${rb(this.op,this.isVec4)} + }; + `;if(this.type==="shared"){let s=this.lastDimensionSize>1?`coords[${this.outputShape.length-1}]`:"0",r=this.useSharedMemoryWithB?`let a = getAByOutputIndex(index); + let b = sharedBuf[${s}];`:`let a = sharedBuf[${s}]; + let b = getBByOutputIndex(index);`;e=` + ${n} var sharedBuf : array; - ${nt("index")} { - // Fill in the shared memory buffer. Here we need a loop to make sure - // that all data in A|B are uploaded when |sharedMemorySize| is larger - // than work group size. - for(var localIndex = i32(localId.x); localIndex < ${this.lastDimensionSize}; localIndex = localIndex + ${this.workGroupSize[0]}) { + ${Je("index")} { + // Fill in the shared memory buffer. + let localIndex = i32(localId.x); + if(localIndex < ${this.lastDimensionSize}) { sharedBuf[localIndex] = f32(${this.useSharedMemoryWithB?"B":"A"}[localIndex]); } workgroupBarrier(); - for(var i = 0; i < ${this.workPerThread}; i = i + 1) { - let flatIndex = index * ${this.workPerThread} + i; - if(flatIndex < uniforms.size) { - let coords = getCoordsFromIndex(flatIndex); - - ${n} - setOutputAtIndex(flatIndex, binaryOperation(a, b)); - } + if(index < uniforms.size) { + let coords = getCoordsFromIndex(index); + ${r} + setOutputAtIndex(index, binaryOperation(a, b)); } } - `}else{let t=this.type==="vec4"?"vec4":"f32",n=Ym(this.op,this.isVec4);e=` - fn binaryOperation(a : ${t}, b : ${t}) -> ${t} { - ${n} - } - ${nt("index")} { + `}else e=` + ${n} + ${Je("index")} { if (index < uniforms.size) { let a = getAByOutputIndex(index); let b = getBByOutputIndex(index); setOutputAtIndex(index, binaryOperation(a, b)); } } - `}return e}};function sr(e){let{inputs:t}=e,{x:n}=t;return e.backend.incRef(n.dataId),{dataId:n.dataId,shape:n.shape,dtype:n.dtype}}var a1e={kernelName:zo,backendName:"webgpu",kernelFunc:sr};function kd(e){let{inputs:t,backend:n}=e,{real:s,imag:r}=t,a=n.makeTensorInfo(s.shape,"complex64"),o=n.tensorMap.get(a.dataId),i=sr({inputs:{x:s},backend:n}),l=sr({inputs:{x:r},backend:n});return o.complexTensorInfos={real:i,imag:l},a}var o1e={kernelName:jp,backendName:"webgpu",kernelFunc:kd},Kh=class{constructor(e,t){this.variableNames=["A"],this.size=!0;let n=128;this.workGroupSize=[n,1,1],this.outputShape=e,this.dispatchLayout=lt(this.outputShape),this.dispatch=je(this.dispatchLayout,this.outputShape,this.workGroupSize),this.op=t,this.shaderKey=`unary_${t}`}getUserCode(){return` + `;return e}};function Qs(e){let{inputs:t}=e,{x:n}=t;return e.backend.incRef(n.dataId),{dataId:n.dataId,shape:n.shape,dtype:n.dtype}}var B2e={kernelName:Fo,backendName:"webgpu",kernelFunc:Qs};function cd(e){let{inputs:t,backend:n}=e,{real:s,imag:r}=t,a=n.makeTensorInfo(s.shape,"complex64"),o=n.tensorMap.get(a.dataId),i=Qs({inputs:{x:s},backend:n}),l=Qs({inputs:{x:r},backend:n});return o.complexTensorInfos={real:i,imag:l},a}var W2e={kernelName:Ep,backendName:"webgpu",kernelFunc:cd},Ph=class{constructor(e,t){this.variableNames=["A"],this.size=!0;let n=128;this.workGroupSize=[n,1,1],this.outputShape=e,this.dispatchLayout=it(this.outputShape),this.dispatch=Be(this.dispatchLayout,this.outputShape,this.workGroupSize),this.op=t,this.shaderKey=`unary_${t}`}getUserCode(){return` fn unaryOperation(a : f32) -> f32 { - ${qi(this.op,!1)} + ${Li(this.op,!1)} } - ${nt("index")} { + ${Je("index")} { if (index < uniforms.size) { let a = getAByOutputIndex(index); setOutputAtIndex(index, unaryOperation(a)); } } - `}};function kn({opType:e,cpuKernelImpl:t,dtype:n}){return({inputs:s,backend:r})=>{let{x:a}=s,o=r,i=n||a.dtype;if(o.shouldExecuteOnCPU([a])&&t!=null){let u=o.tensorMap.get(a.dataId),c=t(u.values,i);return o.makeTensorInfo(a.shape,i,c)}let l=new Kh(a.shape,e);return o.runWebGPUProgram(l,[a],i)}}function qn({opType:e,cpuKernelImpl:t,supportsComplex:n=!1,dtype:s}){return({inputs:r,backend:a})=>{let{a:o,b:i}=r,l=a;if(n&&o.dtype==="complex64"){let p=l.tensorMap.get(o.dataId),d=l.tensorMap.get(i.dataId),h,f;if(e!==Ye.MUL)[h,f]=[[p.complexTensorInfos.real,d.complexTensorInfos.real],[p.complexTensorInfos.imag,d.complexTensorInfos.imag]].map(g=>{let[y,x]=g,A={dataId:y.dataId,dtype:y.dtype,shape:o.shape},b={dataId:x.dataId,dtype:x.dtype,shape:i.shape},w=new Dy(e,o.shape,i.shape);return l.runWebGPUProgram(w,[A,b],Hn(y.dtype,x.dtype))});else{let g=new h6(Ye.COMPLEX_MULTIPLY_REAL,o.shape,i.shape),y=new h6(Ye.COMPLEX_MULTIPLY_IMAG,o.shape,i.shape),x=[{dataId:p.complexTensorInfos.real.dataId,dtype:p.complexTensorInfos.real.dtype,shape:o.shape},{dataId:p.complexTensorInfos.imag.dataId,dtype:p.complexTensorInfos.imag.dtype,shape:o.shape},{dataId:d.complexTensorInfos.real.dataId,dtype:d.complexTensorInfos.real.dtype,shape:i.shape},{dataId:d.complexTensorInfos.imag.dataId,dtype:d.complexTensorInfos.imag.dtype,shape:i.shape}];h=l.runWebGPUProgram(g,x,"float32"),f=l.runWebGPUProgram(y,x,"float32")}let m=kd({inputs:{real:h,imag:f},backend:l});return l.disposeData(h.dataId),l.disposeData(f.dataId),m}let u=s||Hn(o.dtype,i.dtype);if((o.dtype==="string"||i.dtype==="string"||l.shouldExecuteOnCPU([o,i]))&&t!=null){let p=l.tensorMap.get(o.dataId).values,d=l.tensorMap.get(i.dataId).values,h=o.dtype==="string"?T.fromUint8ToStringArray(p):p,f=o.dtype==="string"?T.fromUint8ToStringArray(d):d,[m,g]=t(o.shape,i.shape,h,f,u);return l.makeTensorInfo(g,u,m)}let c=new Dy(e,o.shape,i.shape);return l.runWebGPUProgram(c,[o,i],u)}}var{addImpl:i1e,castImpl:l1e,ceilImpl:u1e,concatImpl:c1e,equalImpl:d1e,expImpl:p1e,expm1Impl:h1e,floorImpl:f1e,gatherNdImpl:m1e,gatherV2Impl:g1e,greaterEqualImpl:y1e,greaterImpl:A1e,lessEqualImpl:x1e,lessImpl:b1e,logImpl:v1e,maxImpl:w1e,maximumImpl:k1e,minimumImpl:S1e,multiplyImpl:I1e,negImpl:C1e,notEqualImpl:T1e,prodImpl:N1e,rangeImpl:E1e,rsqrtImpl:R1e,scatterImpl:_1e,simpleAbsImpl:D1e,sliceImpl:$1e,stridedSliceImpl:P1e,stringNGramsImpl:F1e,subImpl:O1e,tileImpl:M1e,topKImpl:z1e,transposeImpl:L1e,uniqueImpl:r4e}=Gx,B1e=kn({opType:Oe.ABS,cpuKernelImpl:D1e}),W1e={kernelName:xl,backendName:"webgpu",kernelFunc:B1e},V1e=qn({opType:Ye.ADD,cpuKernelImpl:i1e,supportsComplex:!0}),U1e={kernelName:Da,backendName:"webgpu",kernelFunc:V1e},G1e=class{constructor(e){this.workPerThread=4,this.workGroupSize=[64,1,1],this.size=!0,this.outputShape=e[0],this.variableNames=e.map((t,n)=>`T${n}`),this.dispatchLayout=lt(this.outputShape),this.dispatch=je(this.dispatchLayout,this.outputShape,this.workGroupSize,[this.workPerThread,1,1]),this.shaderKey="addN"}getUserCode(){let e=[];this.variableNames.forEach(s=>{e.push(`let v${s} = get${s}ByOutputCoords(coords);`)});let t=this.variableNames.map(s=>`v${s}`).join(" + ");return` - ${nt("index")} { + `}};function vn({opType:e,cpuKernelImpl:t,dtype:n}){return({inputs:s,backend:r})=>{let{x:a}=s,o=r,i=n||a.dtype;if(o.shouldExecuteOnCPU([a])&&t!=null){let u=o.tensorMap.get(a.dataId),c=t(u.values,i);return o.makeTensorInfo(a.shape,i,c)}let l=new Ph(a.shape,e);return o.runWebGPUProgram(l,[a],i)}}function Xn({opType:e,cpuKernelImpl:t,supportsComplex:n=!1,dtype:s}){return({inputs:r,backend:a})=>{let{a:o,b:i}=r,l=a;if(n&&o.dtype==="complex64"){let p=l.tensorMap.get(o.dataId),d=l.tensorMap.get(i.dataId),h,f;if(e!==Xe.MUL)[h,f]=[[p.complexTensorInfos.real,d.complexTensorInfos.real],[p.complexTensorInfos.imag,d.complexTensorInfos.imag]].map(g=>{let[y,x]=g,A={dataId:y.dataId,dtype:y.dtype,shape:o.shape},b={dataId:x.dataId,dtype:x.dtype,shape:i.shape},w=new dy(e,o.shape,i.shape);return l.runWebGPUProgram(w,[A,b],jn(y.dtype,x.dtype))});else{let g=new q7(Xe.COMPLEX_MULTIPLY_REAL,o.shape,i.shape),y=new q7(Xe.COMPLEX_MULTIPLY_IMAG,o.shape,i.shape),x=[{dataId:p.complexTensorInfos.real.dataId,dtype:p.complexTensorInfos.real.dtype,shape:o.shape},{dataId:p.complexTensorInfos.imag.dataId,dtype:p.complexTensorInfos.imag.dtype,shape:o.shape},{dataId:d.complexTensorInfos.real.dataId,dtype:d.complexTensorInfos.real.dtype,shape:i.shape},{dataId:d.complexTensorInfos.imag.dataId,dtype:d.complexTensorInfos.imag.dtype,shape:i.shape}];h=l.runWebGPUProgram(g,x,"float32"),f=l.runWebGPUProgram(y,x,"float32")}let m=cd({inputs:{real:h,imag:f},backend:l});return l.disposeData(h.dataId),l.disposeData(f.dataId),m}let u=s||jn(o.dtype,i.dtype);if((o.dtype==="string"||i.dtype==="string"||l.shouldExecuteOnCPU([o,i]))&&t!=null){let p=l.tensorMap.get(o.dataId).values,d=l.tensorMap.get(i.dataId).values,h=o.dtype==="string"?T.fromUint8ToStringArray(p):p,f=o.dtype==="string"?T.fromUint8ToStringArray(d):d,[m,g]=t(o.shape,i.shape,h,f,u);return l.makeTensorInfo(g,u,m)}let c=new dy(e,o.shape,i.shape);return l.runWebGPUProgram(c,[o,i],u)}}var{addImpl:V2e,castImpl:U2e,ceilImpl:G2e,concatImpl:H2e,equalImpl:j2e,expImpl:q2e,expm1Impl:X2e,floorImpl:K2e,gatherNdImpl:Z2e,gatherV2Impl:Y2e,greaterEqualImpl:J2e,greaterImpl:Q2e,lessEqualImpl:e1e,lessImpl:t1e,logImpl:n1e,maxImpl:s1e,maximumImpl:r1e,minimumImpl:a1e,multiplyImpl:o1e,negImpl:i1e,notEqualImpl:l1e,prodImpl:u1e,rangeImpl:c1e,rsqrtImpl:d1e,scatterImpl:p1e,simpleAbsImpl:h1e,sliceImpl:f1e,stridedSliceImpl:m1e,stringNGramsImpl:g1e,subImpl:y1e,tileImpl:A1e,topKImpl:x1e,transposeImpl:b1e,uniqueImpl:Wbe}=Sx,v1e=vn({opType:De.ABS,cpuKernelImpl:h1e}),w1e={kernelName:dl,backendName:"webgpu",kernelFunc:v1e},k1e=Xn({opType:Xe.ADD,cpuKernelImpl:V2e,supportsComplex:!0}),S1e={kernelName:Ta,backendName:"webgpu",kernelFunc:k1e},I1e=class{constructor(e){this.workPerThread=1,this.workGroupSize=[64,1,1],this.size=!0,this.outputShape=e[0],this.variableNames=e.map((t,n)=>`T${n}`),this.dispatchLayout=it(this.outputShape),this.dispatch=Be(this.dispatchLayout,this.outputShape,this.workGroupSize,[this.workPerThread,1,1]),this.shaderKey="addN"}getUserCode(){let e=[];this.variableNames.forEach(s=>{e.push(`let v${s} = get${s}ByOutputCoords(coords);`)});let t=this.variableNames.map(s=>`v${s}`).join(" + ");return` + ${Je("index")} { for (var i = 0; i < ${this.workPerThread}; i = i + 1) { let flatIndex = index * ${this.workPerThread} + i; if (flatIndex < uniforms.size) { @@ -5791,7 +5833,7 @@ return a / b;`,Ble=` } } } - `}};function H1e(e){let{inputs:t,backend:n}=e,s=t;if(s.length===1)return sr({inputs:{x:s[0]},backend:n});let r=s.map(i=>i.dtype).reduce((i,l)=>Hn(i,l)),a=s.map(i=>i.shape),o=new G1e(a);return n.runWebGPUProgram(o,s,r)}var j1e={kernelName:xo,backendName:"webgpu",kernelFunc:H1e},IT=class{constructor(e,t,n){this.workGroupSize=[64,1,1],this.variableNames=["x"],this.uniforms="infinityValue : f32,",this.size=!0;let s=[t];this.op=n==="min"?"<":">";let[r,a]=T.computeOutAndReduceShapes(e,s);this.outputShape=r.length===0?[1]:r,this.dispatchLayout=lt(this.outputShape),v.sizeFromShape(a)<32||v.sizeFromShape(r)>1e3?(this.type="plain",this.dispatch=je(this.dispatchLayout,this.outputShape,this.workGroupSize)):(this.type="shared",this.dispatch=je(this.dispatchLayout,this.outputShape,[1,1,1])),this.inputShape=e,this.shaderKey=`argMinMax_${this.op}_${this.type}`}getUserCode(){let e=()=>this.inputShape.length===1?"uniforms.xShape":`uniforms.xShape.${Ca(this.inputShape.length-1)}`,t=()=>{let n="";if(this.outputShape.length===1)this.inputShape.length!==1&&(n+="outputCoords,");else for(let s=0;si.dtype).reduce((i,l)=>jn(i,l)),a=s.map(i=>i.shape),o=new I1e(a);return n.runWebGPUProgram(o,s,r)}var T1e={kernelName:go,backendName:"webgpu",kernelFunc:C1e},uT=class{constructor(e,t,n){this.workGroupSize=[64,1,1],this.variableNames=["x"],this.uniforms="infinityValue : f32,",this.size=!0;let s=[t];this.op=n==="min"?"<":">";let[r,a]=T.computeOutAndReduceShapes(e,s);this.outputShape=r.length===0?[1]:r,this.dispatchLayout=it(this.outputShape),v.sizeFromShape(a)<32||v.sizeFromShape(r)>1e3?(this.type="plain",this.dispatch=Be(this.dispatchLayout,this.outputShape,this.workGroupSize)):(this.type="shared",this.dispatch=Be(this.dispatchLayout,this.outputShape,[1,1,1])),this.inputShape=e,this.shaderKey=`argMinMax_${this.op}_${this.type}`}getUserCode(){let e=()=>this.inputShape.length===1?"uniforms.xShape":`uniforms.xShape.${va(this.inputShape.length-1)}`,t=()=>{let n="";if(this.outputShape.length===1)this.inputShape.length!==1&&(n+="outputCoords,");else for(let s=0;s u32 { return ((a - 1u) / b + 1u); } @@ -5801,7 +5843,7 @@ return a / b;`,Ble=` var xBestValues : array; `} - ${nt("index")} { + ${Je("index")} { let outputIndex = index / i32(workGroupSizeX); let reduceLength = ${e()}; @@ -5841,7 +5883,7 @@ return a / b;`,Ble=` } } `:` - ${nt("index")} { + ${Je("index")} { if (index < uniforms.size) { let outputCoords = getCoordsFromIndex(index); var bestIndex = 0; @@ -5857,10 +5899,10 @@ return a / b;`,Ble=` setOutputAtIndexI32(index, bestIndex); } } - `}},q1e=class{constructor(e,t){this.variableNames=["A"],this.workGroupSize=[16,16,1];let n=new Array(e.length);for(let s=0;s tile : array, ${this.workGroupSize[0]}>; - ${Vp()} + ${Ip()} fn _start(@builtin(local_invocation_id) localId : vec3, @builtin(workgroup_id) workgroupId : vec3) { var x = i32(workgroupId.x) * TILE_DIM + i32(localId.x); @@ -5879,8 +5921,8 @@ return a / b;`,Ble=` [localId.y]); } } - `}},X1e=class{constructor(e,t){this.variableNames=["A"],this.workPerThread=4,this.workGroupSize=[64,1,1],this.size=!0;let n=new Array(e.length);for(let s=0;s6)throw Error(`Transpose for rank ${t} is not yet supported`);let n=new Array(t);for(let s=0;sn.disposeData(h.dataId)),d}var J1e={kernelName:bo,backendName:"webgpu",kernelFunc:Y1e};function Q1e(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{axis:a}=s,o=v.parseAxisParam(a,r.shape),i=T.getAxesPermutation(o,r.shape.length),l=r,u=[];i!=null&&(l=_a({inputs:{x:r},backend:n,attrs:{perm:i}}),u.push(l),o=T.getInnerMostAxes(o.length,l.shape.length)),T.assertAxesAreInnerMostDims("argMin",[o[0]],l.shape.length);let c=new IT(l.shape,o[0],"min"),p=[{type:"float32",data:[Number.POSITIVE_INFINITY]}],d=n.runWebGPUProgram(c,[l],"int32",p);return u.forEach(h=>n.disposeData(h.dataId)),d}var ege={kernelName:Dc,backendName:"webgpu",kernelFunc:Q1e},tge=qn({opType:Ye.ATAN2}),nge={kernelName:bl,backendName:"webgpu",kernelFunc:tge},f6=class{constructor(e,t){this.variableNames=["x"],this.uniforms="stride : vec2, pad : vec2, dilation : vec2, convDims : vec2, filterDims : vec2,",this.workGroupSize=[128,1,1],this.size=!0,this.outputShape=e.outShape,this.dispatchLayout=lt(this.outputShape),this.dispatch=je(this.dispatchLayout,this.outputShape,this.workGroupSize),this.shaderKey=`pool2D_${t}`,this.poolType=t}getUserCode(){let e="resultValue = max(value, resultValue);";this.poolType==="avg"&&(e="resultValue = resultValue + value; count = count + 1.0;");let t="resultValue";return this.poolType==="avg"&&(t="resultValue / count"),` - ${nt("index")} { + `}};function R1e(e){let t=e.length;if(t>6)throw Error(`Transpose for rank ${t} is not yet supported`);let n=new Array(t);for(let s=0;sn.disposeData(h.dataId)),d}var $1e={kernelName:yo,backendName:"webgpu",kernelFunc:D1e};function P1e(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{axis:a}=s,o=v.parseAxisParam(a,r.shape),i=T.getAxesPermutation(o,r.shape.length),l=r,u=[];i!=null&&(l=Ca({inputs:{x:r},backend:n,attrs:{perm:i}}),u.push(l),o=T.getInnerMostAxes(o.length,l.shape.length)),T.assertAxesAreInnerMostDims("argMin",[o[0]],l.shape.length);let c=new uT(l.shape,o[0],"min"),p=[{type:"float32",data:[Number.POSITIVE_INFINITY]}],d=n.runWebGPUProgram(c,[l],"int32",p);return u.forEach(h=>n.disposeData(h.dataId)),d}var F1e={kernelName:bc,backendName:"webgpu",kernelFunc:P1e},O1e=Xn({opType:Xe.ATAN2}),M1e={kernelName:pl,backendName:"webgpu",kernelFunc:O1e},X7=class{constructor(e,t){this.variableNames=["x"],this.uniforms="stride : vec2, pad : vec2, dilation : vec2, convDims : vec2, filterDims : vec2,",this.workGroupSize=[128,1,1],this.size=!0,this.outputShape=e.outShape,this.dispatchLayout=it(this.outputShape),this.dispatch=Be(this.dispatchLayout,this.outputShape,this.workGroupSize),this.shaderKey=`pool2D_${t}`,this.poolType=t}getUserCode(){let e="resultValue = max(value, resultValue);";this.poolType==="avg"&&(e="resultValue = resultValue + value; count = count + 1.0;");let t="resultValue";return this.poolType==="avg"&&(t="resultValue / count"),` + ${Je("index")} { if (index < uniforms.size) { let coords = getCoordsFromIndex(index); let batch = coords[0]; @@ -5923,8 +5965,8 @@ return a / b;`,Ble=` setOutputAtIndex(index, ${t}); } } - `}},sge=class{constructor(e){this.variableNames=["x"],this.uniforms="stride : vec2,",this.workGroupSize=[256,1,1],this.size=!0,this.outputShape=e.outShape,this.dispatchLayout=lt(this.outputShape),this.dispatch=je(this.dispatchLayout,this.outputShape,this.workGroupSize),this.shaderKey="poolWithFilterSizeEqualsOne"}getUserCode(){return` - ${nt("index")} { + `}},z1e=class{constructor(e){this.variableNames=["x"],this.uniforms="stride : vec2,",this.workGroupSize=[256,1,1],this.size=!0,this.outputShape=e.outShape,this.dispatchLayout=it(this.outputShape),this.dispatch=Be(this.dispatchLayout,this.outputShape,this.workGroupSize),this.shaderKey="poolWithFilterSizeEqualsOne"}getUserCode(){return` + ${Je("index")} { if (index < uniforms.size) { let coords = getCoordsFromIndex(index); let batch = coords[0]; @@ -5938,7 +5980,7 @@ return a / b;`,Ble=` setOutputAtIndex(index, value); } } - `}},rge=class{constructor(e,t){this.workGroupSize=[64,1,1],this.variableNames=["x"],this.uniforms="reduceSize : i32,",this.size=!0,this.inputShape=[e.batchSize,e.inSize];let[n]=T.computeOutAndReduceShapes(this.inputShape,[1]);this.outputShape=n.length===0?[1]:n,this.dispatchLayout=lt(this.outputShape),this.dispatch=je(this.dispatchLayout,this.outputShape,[1,1,1]),this.reduceType=t,this.shaderKey=`reduce_${t}`}getUserCode(){let e="",t="0.0";this.reduceType==="min"||this.reduceType==="max"?(e=` + `}},L1e=class{constructor(e,t){this.workGroupSize=[64,1,1],this.variableNames=["x"],this.uniforms="reduceSize : i32,",this.size=!0,this.inputShape=[e.batchSize,e.inSize];let[n]=T.computeOutAndReduceShapes(this.inputShape,[1]);this.outputShape=n.length===0?[1]:n,this.dispatchLayout=it(this.outputShape),this.dispatch=Be(this.dispatchLayout,this.outputShape,[1,1,1]),this.reduceType=t,this.shaderKey=`reduce_${t}`}getUserCode(){let e="",t="0.0";this.reduceType==="min"||this.reduceType==="max"?(e=` if (isnan(candidate)) { bestValue = uniforms.NAN; } else if (!isnan(bestValue) && candidate ${this.reduceType==="min"?"<":">"} bestValue) @@ -5955,7 +5997,7 @@ return a / b;`,Ble=` let offset = ${this.outputShape.length===1?"outputCoords":"outputCoords[0]"} * uniforms.reduceSize; return offset; } - ${nt("index")} { + ${Je("index")} { let outputIndex = index / i32(workGroupSizeX); let offset = getOffset(outputIndex); var bestValue = ${t}; @@ -5986,8 +6028,8 @@ return a / b;`,Ble=` ${n} } } - `}};function Zh(e,t,n,s,r){let a=e.shape.length,o=[],i=v.parseAxisParam(t,e.shape),l=i,u=T.getAxesPermutation(l,a),c=e;u!=null&&(c=_a({inputs:{x:e},attrs:{perm:u},backend:r}),l=T.getInnerMostAxes(l.length,a),o.push(c)),T.assertAxesAreInnerMostDims(s,l,a);let[p,d]=T.computeOutAndReduceShapes(c.shape,l),h=p;n&&(h=T.expandShapeToKeepDim(p,i));let f;if((s==="max"||s==="prod")&&r.shouldExecuteOnCPU([c])){let m=r.tensorMap.get(c.dataId).values;switch(s){case"max":let g=w1e(m,v.sizeFromShape(d),h,e.dtype);f=r.makeTensorInfo(h,e.dtype,g);break;case"prod":let{outVals:y,outShape:x,outDtype:A}=N1e(c.shape,c.dtype,m,l);f=r.makeTensorInfo(x,A,y);break;default:throw new Error(`${s} CPU implementation is not yet supported.`)}}else{let m=v.sizeFromShape(d),y=v.sizeFromShape(c.shape)/m,x={windowSize:m,inSize:m,batchSize:y,outSize:1},A=s==="mean"?"float32":ch(e.dtype),b=[{type:"int32",data:[m]}],w=new rge(x,s),k=r.runWebGPUProgram(w,[c],A,b);o.push(k),f=He({inputs:{x:k},attrs:{shape:h},backend:r})}return o.forEach(m=>r.disposeData(m.dataId)),f}function Ib(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{reductionIndices:a,keepDims:o}=s;return Zh(r,a,o,"max",n)}var age={kernelName:Wo,backendName:"webgpu",kernelFunc:Ib};function CT(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{keepDims:a,axis:o}=s;return Zh(r,o,a,"mean",n)}var oge={kernelName:Go,backendName:"webgpu",kernelFunc:CT};function TT(e,t,n,s){if(t.filterWidth===1&&t.filterHeight===1&&v.arraysEqual(t.inShape,t.outShape))return sr({inputs:{x:e},backend:s});if(t.filterWidth===t.inWidth&&t.filterHeight===t.inHeight&&t.batchSize===1&&t.padInfo.type==="VALID"){let o=e.shape.length,i=He({inputs:{x:e},backend:s,attrs:{shape:[e.shape[o-3]*e.shape[o-2],e.shape[o-1]]}}),l;n==="avg"?l=CT({inputs:{x:i},backend:s,attrs:{axis:0,keepDims:!1}}):(v.assert(n==="max",()=>`Invalid pool type ${n}`),l=Ib({inputs:{x:i},backend:s,attrs:{reductionIndices:0,keepDims:!1}}));let u=He({inputs:{x:l},backend:s,attrs:{shape:t.outShape}});return s.disposeData(i.dataId),s.disposeData(l.dataId),u}let r,a=[{type:"int32",data:[t.strideHeight,t.strideWidth]}];return t.filterHeight===1&&t.filterWidth===1?r=new sge(t):(n==="avg"?r=new f6(t,"avg"):(v.assert(n==="max",()=>`Invalid pool type ${n}`),r=new f6(t,"max")),a.push({type:"int32",data:[t.padInfo.top,t.padInfo.left]},{type:"int32",data:[t.dilationHeight,t.dilationWidth]},{type:"int32",data:[t.inHeight,t.inWidth]},{type:"int32",data:[t.effectiveFilterHeight,t.effectiveFilterWidth]})),s.runWebGPUProgram(r,[e],e.dtype,a)}function ige(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{filterSize:a,strides:o,pad:i,dimRoundingMode:l}=s,u=1,c=T.computePool2DInfo(r.shape,a,o,u,i,l);return TT(r,c,"avg",n)}var lge={kernelName:vo,backendName:"webgpu",kernelFunc:ige};function uge(e){let{inputs:t,backend:n,attrs:s}=e,{a:r,b:a}=t,{transposeA:o,transposeB:i}=s;return Sb({a:r,b:a,transposeA:o,transposeB:i,backend:n})}var cge={kernelName:wo,backendName:"webgpu",kernelFunc:uge},dge=class{constructor(e,t){this.variableNames=["source"],this.workPerThread=1,this.workGroupSize=[64,1,1],this.size=!0,this.outputShape=t,this.rank=t.length,this.dispatchLayout=lt(this.outputShape),this.dispatch=je(this.dispatchLayout,this.outputShape,this.workGroupSize,[this.workPerThread,1,1]),this.start=e,this.uniforms=`start : ${Mn(e.length)}, `,this.shaderKey="slice"}getUserCode(){let e=Mn(this.rank),t=pge(this.rank),n;return this.start.length===1?n=this.outputShape.map((r,a)=>"sourceLoc = uniforms.start + coords;"):n=this.outputShape.map((r,a)=>`sourceLoc.${$y[a]} = uniforms.start.${Ca(a)} + coords.${$y[a]};`),` - ${nt("index")} { + `}};function Fh(e,t,n,s,r){let a=e.shape.length,o=[],i=v.parseAxisParam(t,e.shape),l=i,u=T.getAxesPermutation(l,a),c=e;u!=null&&(c=Ca({inputs:{x:e},attrs:{perm:u},backend:r}),l=T.getInnerMostAxes(l.length,a),o.push(c)),T.assertAxesAreInnerMostDims(s,l,a);let[p,d]=T.computeOutAndReduceShapes(c.shape,l),h=p;n&&(h=T.expandShapeToKeepDim(p,i));let f;if((s==="max"||s==="prod")&&r.shouldExecuteOnCPU([c])){let m=r.tensorMap.get(c.dataId).values;switch(s){case"max":let g=s1e(m,v.sizeFromShape(d),h,e.dtype);f=r.makeTensorInfo(h,e.dtype,g);break;case"prod":let{outVals:y,outShape:x,outDtype:A}=u1e(c.shape,c.dtype,m,l);f=r.makeTensorInfo(x,A,y);break;default:throw new Error(`${s} CPU implementation is not yet supported.`)}}else{let m=v.sizeFromShape(d),y=v.sizeFromShape(c.shape)/m,x={windowSize:m,inSize:m,batchSize:y,outSize:1},A=s==="mean"?"float32":qp(e.dtype),b=[{type:"int32",data:[m]}],w=new L1e(x,s),k=r.runWebGPUProgram(w,[c],A,b);o.push(k),f=Le({inputs:{x:k},attrs:{shape:h},backend:r})}return o.forEach(m=>r.disposeData(m.dataId)),f}function ib(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{reductionIndices:a,keepDims:o}=s;return Fh(r,a,o,"max",n)}var B1e={kernelName:zo,backendName:"webgpu",kernelFunc:ib};function cT(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{keepDims:a,axis:o}=s;return Fh(r,o,a,"mean",n)}var W1e={kernelName:Wo,backendName:"webgpu",kernelFunc:cT};function dT(e,t,n,s){if(t.filterWidth===1&&t.filterHeight===1&&v.arraysEqual(t.inShape,t.outShape))return Qs({inputs:{x:e},backend:s});if(t.filterWidth===t.inWidth&&t.filterHeight===t.inHeight&&t.batchSize===1&&t.padInfo.type==="VALID"){let o=e.shape.length,i=Le({inputs:{x:e},backend:s,attrs:{shape:[e.shape[o-3]*e.shape[o-2],e.shape[o-1]]}}),l;n==="avg"?l=cT({inputs:{x:i},backend:s,attrs:{axis:0,keepDims:!1}}):(v.assert(n==="max",()=>`Invalid pool type ${n}`),l=ib({inputs:{x:i},backend:s,attrs:{reductionIndices:0,keepDims:!1}}));let u=Le({inputs:{x:l},backend:s,attrs:{shape:t.outShape}});return s.disposeData(i.dataId),s.disposeData(l.dataId),u}let r,a=[{type:"int32",data:[t.strideHeight,t.strideWidth]}];return t.filterHeight===1&&t.filterWidth===1?r=new z1e(t):(n==="avg"?r=new X7(t,"avg"):(v.assert(n==="max",()=>`Invalid pool type ${n}`),r=new X7(t,"max")),a.push({type:"int32",data:[t.padInfo.top,t.padInfo.left]},{type:"int32",data:[t.dilationHeight,t.dilationWidth]},{type:"int32",data:[t.inHeight,t.inWidth]},{type:"int32",data:[t.effectiveFilterHeight,t.effectiveFilterWidth]})),s.runWebGPUProgram(r,[e],e.dtype,a)}function V1e(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{filterSize:a,strides:o,pad:i,dimRoundingMode:l}=s,u=1,c=T.computePool2DInfo(r.shape,a,o,u,i,l);return dT(r,c,"avg",n)}var U1e={kernelName:Ao,backendName:"webgpu",kernelFunc:V1e};function G1e(e){let{inputs:t,backend:n,attrs:s}=e,{a:r,b:a}=t,{transposeA:o,transposeB:i}=s;return ob({a:r,b:a,transposeA:o,transposeB:i,backend:n})}var H1e={kernelName:xo,backendName:"webgpu",kernelFunc:G1e},j1e=class{constructor(e,t){this.variableNames=["source"],this.workPerThread=1,this.workGroupSize=[64,1,1],this.size=!0,this.outputShape=t,this.rank=t.length,this.dispatchLayout=it(this.outputShape),this.dispatch=Be(this.dispatchLayout,this.outputShape,this.workGroupSize,[this.workPerThread,1,1]),this.start=e,this.uniforms=`start : ${zn(e.length)}, `,this.shaderKey="slice"}getUserCode(){let e=zn(this.rank),t=q1e(this.rank),n;return this.start.length===1?n=this.outputShape.map((r,a)=>"sourceLoc = uniforms.start + coords;"):n=this.outputShape.map((r,a)=>`sourceLoc.${py[a]} = uniforms.start.${va(a)} + coords.${py[a]};`),` + ${Je("index")} { if (index < uniforms.size) { var sourceLoc : ${e}; let coords = getCoordsFromIndex(index); @@ -5996,8 +6038,8 @@ return a / b;`,Ble=` setOutputAtIndex(index, getSource(${t})); } } - `}},$y=["x","y","z","w","u","v"];function pge(e){if(e===1)return"sourceLoc";if(e<=6)return $y.slice(0,e).map(t=>`sourceLoc.${t}`).join(",");throw Error(`Slicing for rank ${e} is not yet supported`)}function Sd(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{begin:a,size:o}=s,[i,l]=jt.parseSliceParams(r,a,o);if(jt.assertParamsValid(r,i,l),n.shouldExecuteOnCPU([r])||r.dtype==="string"){let p=n.tensorMap.get(r.dataId),d=$1e(p.values,i,l,r.shape,r.dtype);return n.makeTensorInfo(l,r.dtype,d)}if(v.sizeFromShape(l)===0)return n.makeTensorInfo(l,r.dtype,[]);let u=new dge(i,l),c=[{type:"int32",data:i}];return n.runWebGPUProgram(u,[r],r.dtype,c)}var hge={kernelName:Yl,backendName:"webgpu",kernelFunc:Sd},fge=e=>{let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{blockShape:a,crops:o}=s;v.assert(r.shape.length<=4,()=>"batchToSpaceND for rank > 4 with a WebGPU backend not implemented yet");let i=a.reduce((x,A)=>x*A),l=T.getReshaped(r.shape,a,i),u=T.getPermuted(l.length,a.length),c=T.getReshapedPermuted(r.shape,a,i),p=T.getSliceBeginCoords(o,a.length),d=T.getSliceSize(c,o,a.length),h=[],f=He({inputs:{x:r},backend:n,attrs:{shape:l}}),m=_a({inputs:{x:f},backend:n,attrs:{perm:u}}),g=He({inputs:{x:m},backend:n,attrs:{shape:c}}),y=Sd({inputs:{x:g},backend:n,attrs:{begin:p,size:d}});return h.push(f),h.push(m),h.push(g),h.forEach(x=>n.disposeData(x.dataId)),y},mge={kernelName:vl,backendName:"webgpu",kernelFunc:fge},NT=qn({opType:Ye.NOT_EQUAL,dtype:"bool",cpuKernelImpl:T1e}),gge={kernelName:Ll,backendName:"webgpu",kernelFunc:NT};function Yh(e){let{inputs:t,backend:n}=e,{input:s}=t,r=n.tensorMap.get(s.dataId);return sr({inputs:{x:r.complexTensorInfos.real},backend:n})}var yge={kernelName:eh,backendName:"webgpu",kernelFunc:Yh};function Age(e,t){let n=new Kh(e.shape,Oe.TO_INT),s=t.runWebGPUProgram(n,[e],"int32");return{dataId:s.dataId,shape:s.shape,dtype:s.dtype}}function Py(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{dtype:a}=s;if(a==="complex64"){if(r.dtype==="complex64")return sr({inputs:{x:r},backend:n});let o=Gt(r.shape),i=Py({inputs:{x:r},backend:n,attrs:{dtype:"float32"}}),l=kd({inputs:{real:i,imag:o},backend:n});return o.dispose(),n.disposeData(i.dataId),l}if(r.dtype==="complex64"){let o=Yh({inputs:{input:r},backend:n}),i=Py({inputs:{x:o},backend:n,attrs:{dtype:a}});return n.disposeData(o.dataId),i}if(!v.hasEncodingLoss(r.dtype,a)){let o=sr({inputs:{x:r},backend:n});return{dataId:o.dataId,shape:o.shape,dtype:a}}if(n.shouldExecuteOnCPU([r])){let o=n.tensorMap.get(r.dataId).values,[i,l,u]=l1e(o,r.shape,r.dtype,a);return n.makeTensorInfo(i,l,u)}if(a==="int32")return Age(r,n);if(a==="bool"){let o=n.makeTensorInfo([],"bool",v.getTypedArrayFromDType("bool",1)),l=NT({inputs:{a:r,b:o},backend:n});return n.disposeData(o.dataId),l}throw new Error(`Error in Cast: failed to cast ${r.dtype} to ${a}`)}var xge={kernelName:ko,backendName:"webgpu",kernelFunc:Py},bge=kn({opType:Oe.CEIL,cpuKernelImpl:u1e}),vge={kernelName:So,backendName:"webgpu",kernelFunc:bge},wge=class{constructor(e){this.variableNames=["A"],this.uniforms="minVal : f32, maxVal : f32,",this.workPerThread=4,this.workGroupSize=[64,1,1],this.isVec4=!0,this.size=!0,this.outputShape=e,this.dispatchLayout=lt(this.outputShape),this.dispatch=je(this.dispatchLayout,this.outputShape,this.workGroupSize,[this.workPerThread,1,1]),this.shaderKey="clipVec4"}getUserCode(){return` - ${nt("index")} { + `}},py=["x","y","z","w","u","v"];function q1e(e){if(e===1)return"sourceLoc";if(e<=6)return py.slice(0,e).map(t=>`sourceLoc.${t}`).join(",");throw Error(`Slicing for rank ${e} is not yet supported`)}function dd(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{begin:a,size:o}=s,[i,l]=Gt.parseSliceParams(r,a,o);if(Gt.assertParamsValid(r,i,l),n.shouldExecuteOnCPU([r])||r.dtype==="string"){let p=n.tensorMap.get(r.dataId),d=f1e(p.values,i,l,r.shape,r.dtype);return n.makeTensorInfo(l,r.dtype,d)}if(v.sizeFromShape(l)===0)return n.makeTensorInfo(l,r.dtype,[]);let u=new j1e(i,l),c=[{type:"int32",data:i}];return n.runWebGPUProgram(u,[r],r.dtype,c)}var X1e={kernelName:Ul,backendName:"webgpu",kernelFunc:dd},K1e=e=>{let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{blockShape:a,crops:o}=s;v.assert(r.shape.length<=4,()=>"batchToSpaceND for rank > 4 with a WebGPU backend not implemented yet");let i=a.reduce((x,A)=>x*A),l=T.getReshaped(r.shape,a,i),u=T.getPermuted(l.length,a.length),c=T.getReshapedPermuted(r.shape,a,i),p=T.getSliceBeginCoords(o,a.length),d=T.getSliceSize(c,o,a.length),h=[],f=Le({inputs:{x:r},backend:n,attrs:{shape:l}}),m=Ca({inputs:{x:f},backend:n,attrs:{perm:u}}),g=Le({inputs:{x:m},backend:n,attrs:{shape:c}}),y=dd({inputs:{x:g},backend:n,attrs:{begin:p,size:d}});return h.push(f),h.push(m),h.push(g),h.forEach(x=>n.disposeData(x.dataId)),y},Z1e={kernelName:hl,backendName:"webgpu",kernelFunc:K1e},pT=Xn({opType:Xe.NOT_EQUAL,dtype:"bool",cpuKernelImpl:l1e}),Y1e={kernelName:_l,backendName:"webgpu",kernelFunc:pT};function Oh(e){let{inputs:t,backend:n}=e,{input:s}=t,r=n.tensorMap.get(s.dataId);return Qs({inputs:{x:r.complexTensorInfos.real},backend:n})}var J1e={kernelName:Mp,backendName:"webgpu",kernelFunc:Oh};function Q1e(e,t){let n=new Ph(e.shape,De.TO_INT),s=t.runWebGPUProgram(n,[e],"int32");return{dataId:s.dataId,shape:s.shape,dtype:s.dtype}}function hy(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{dtype:a}=s;if(a==="complex64"){if(r.dtype==="complex64")return Qs({inputs:{x:r},backend:n});let o=Vt(r.shape),i=hy({inputs:{x:r},backend:n,attrs:{dtype:"float32"}}),l=cd({inputs:{real:i,imag:o},backend:n});return o.dispose(),n.disposeData(i.dataId),l}if(r.dtype==="complex64"){let o=Oh({inputs:{input:r},backend:n}),i=hy({inputs:{x:o},backend:n,attrs:{dtype:a}});return n.disposeData(o.dataId),i}if(!v.hasEncodingLoss(r.dtype,a)){let o=Qs({inputs:{x:r},backend:n});return{dataId:o.dataId,shape:o.shape,dtype:a}}if(n.shouldExecuteOnCPU([r])){let o=n.tensorMap.get(r.dataId).values,[i,l,u]=U2e(o,r.shape,r.dtype,a);return n.makeTensorInfo(i,l,u)}if(a==="int32")return Q1e(r,n);if(a==="bool"){let o=n.makeTensorInfo([],"bool",v.getTypedArrayFromDType("bool",1)),l=pT({inputs:{a:r,b:o},backend:n});return n.disposeData(o.dataId),l}throw new Error(`Error in Cast: failed to cast ${r.dtype} to ${a}`)}var ege={kernelName:bo,backendName:"webgpu",kernelFunc:hy},tge=vn({opType:De.CEIL,cpuKernelImpl:G2e}),nge={kernelName:vo,backendName:"webgpu",kernelFunc:tge},sge=class{constructor(e){this.variableNames=["A"],this.uniforms="minVal : f32, maxVal : f32,",this.workPerThread=4,this.workGroupSize=[64,1,1],this.isVec4=!0,this.size=!0,this.outputShape=e,this.dispatchLayout=it(this.outputShape),this.dispatch=Be(this.dispatchLayout,this.outputShape,this.workGroupSize,[this.workPerThread,1,1]),this.shaderKey="clipVec4"}getUserCode(){return` + ${Je("index")} { if(index < uniforms.size) { let value = getAByOutputIndex(index); var clampedValue : vec4; @@ -6012,8 +6054,8 @@ return a / b;`,Ble=` setOutputAtIndex(index, clampedValue); } } - `}},kge=class{constructor(e){this.variableNames=["A"],this.uniforms="minVal : f32, maxVal : f32,",this.workGroupSize=[64,1,1],this.size=!0,this.outputShape=e,this.dispatchLayout=lt(this.outputShape),this.dispatch=je(this.dispatchLayout,this.outputShape,this.workGroupSize),this.shaderKey="clip"}getUserCode(){return` - ${nt("index")} { + `}},rge=class{constructor(e){this.variableNames=["A"],this.uniforms="minVal : f32, maxVal : f32,",this.workGroupSize=[64,1,1],this.size=!0,this.outputShape=e,this.dispatchLayout=it(this.outputShape),this.dispatch=Be(this.dispatchLayout,this.outputShape,this.workGroupSize),this.shaderKey="clip"}getUserCode(){return` + ${Je("index")} { if(index < uniforms.size) { let value = getAByOutputIndex(index); if (isnan(value)) { @@ -6023,8 +6065,8 @@ return a / b;`,Ble=` setOutputAtIndex(index, clamp(value, uniforms.minVal, uniforms.maxVal)); } } - `}};function Sge(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{clipValueMin:a,clipValueMax:o}=s,i,l=[{type:"float32",data:[a]},{type:"float32",data:[o]}];return v.sizeFromShape(r.shape)%4===0?i=new wge(r.shape):i=new kge(r.shape),n.runWebGPUProgram(i,[r],r.dtype,l)}var Ige={kernelName:$a,backendName:"webgpu",kernelFunc:Sge},Cge=class{constructor(e){this.uniforms="",this.workPerThread=4,this.workGroupSize=[64,1,1],this.size=!0,this.outputShape=T.computeOutShape(e,1),this.variableNames=e.map((t,n)=>`T${n}`),this.dispatchLayout=lt(this.outputShape),this.dispatch=je(this.dispatchLayout,this.outputShape,this.workGroupSize,[this.workPerThread,1,1]),this.offsetLength=e.length-1;for(let t=0;t0){e.push("if (yC < uniforms.offset0){ setOutputAtCoords(coords.x, coords.y, getT0(yR, yC)); }");for(let r=1;r`T${n}`),this.dispatchLayout=it(this.outputShape),this.dispatch=Be(this.dispatchLayout,this.outputShape,this.workGroupSize,[this.workPerThread,1,1]),this.offsetLength=e.length-1;for(let t=0;t0){e.push("if (yC < uniforms.offset0){ setOutputAtCoords(coords.x, coords.y, getT0(yR, yC)); }");for(let r=1;rYh({inputs:{input:A},backend:n})),m=e.map(A=>U2({inputs:{input:A},backend:n})),g=Ap(f,t,n),y=Ap(m,t,n),x=kd({inputs:{real:g,imag:y},backend:n});return f.forEach(A=>n.disposeData(A.dataId)),m.forEach(A=>n.disposeData(A.dataId)),n.disposeData(g.dataId),n.disposeData(y.dataId),x}let r=n.shouldExecuteOnCPU(e);if(s==="string"&&(r=!0),r){let f=e.map(w=>{let k=v.sizeFromShape(w.shape.slice(t));return He({inputs:{x:w},backend:n,attrs:{shape:[-1,k]}})}),m=f.map(w=>({vals:n.readSync(w.dataId),shape:w.shape})),g=T.computeOutShape(f.map(w=>w.shape),1),y=f[0].shape[0]===1,x=c1e(m,g,s,y),A=T.computeOutShape(e.map(w=>w.shape),t),b=n.makeTensorInfo(A,s,x);return f.forEach(w=>n.disposeData(w.dataId)),b}let a=n.device.limits.maxStorageBuffersPerShaderStage-1;if(e.length>a){let f=[];for(let g=0;gf.shape),u=new Cge(l),c=[],p=new Array(l.length-1);if(p.length>0){p[0]=l[0][1],c.push({type:"int32",data:[p[0]]});for(let f=1;fn.disposeData(f.dataId));let h=He({inputs:{x:d},backend:n,attrs:{shape:i}});return n.disposeData(d.dataId),h}function Nge(e,t,n){let s=T.computeOutShape(e.map(a=>a.shape),t);return{tensors2D:e.map(a=>He({inputs:{x:a},backend:n,attrs:{shape:[v.sizeFromShape(a.shape.slice(0,t)),v.sizeFromShape(a.shape.slice(t))]}})),outShape:s}}function ET(e){let{inputs:t,backend:n,attrs:s}=e,{axis:r}=s,a=v.parseAxisParam(r,t[0].shape)[0],o=T.computeOutShape(t.map(u=>u.shape),a);if(v.sizeFromShape(o)===0)return n.makeTensorInfo(o,t[0].dtype,[]);let i=t.filter(u=>v.sizeFromShape(u.shape)>0);if(i.length===1)return sr({inputs:{x:i[0]},backend:n});let l=i.map(u=>u.shape);return T.assertParamsConsistent(l,a),Ap(i,a,n)}var Ege={kernelName:wl,backendName:"webgpu",kernelFunc:ET};function Rge(e,t,n,s,r=!1,a=null,o=!1,i=4,l=4,u=4){let c=_=>{switch(_){case 1:return"resData = x[xIndex];";case 3:return"resData = vec3(x[xIndex], x[xIndex + 1], x[xIndex + 2]);";case 4:return"resData = x[xIndex / 4];";default:throw new Error(`innerElementSize ${_} is not supported.`)}},p=_=>{switch(_){case 1:return"return W[row * uniforms.wShape[3] + colIn];";case 4:return"return W[row * uniforms.wShape[3] / 4 + colIn];";default:throw new Error(`innerElementSize ${_} is not supported.`)}},d=e?` + `}};function A2(e){let{inputs:t,backend:n}=e,{input:s}=t,r=n.tensorMap.get(s.dataId);return Qs({inputs:{x:r.complexTensorInfos.imag},backend:n})}var lge={kernelName:Pp,backendName:"webgpu",kernelFunc:A2};function tp(e,t,n){let s=e[0].dtype;if(s==="complex64"){let f=e.map(A=>Oh({inputs:{input:A},backend:n})),m=e.map(A=>A2({inputs:{input:A},backend:n})),g=tp(f,t,n),y=tp(m,t,n),x=cd({inputs:{real:g,imag:y},backend:n});return f.forEach(A=>n.disposeData(A.dataId)),m.forEach(A=>n.disposeData(A.dataId)),n.disposeData(g.dataId),n.disposeData(y.dataId),x}let r=n.shouldExecuteOnCPU(e);if(s==="string"&&(r=!0),r){let f=e.map(w=>{let k=v.sizeFromShape(w.shape.slice(t));return Le({inputs:{x:w},backend:n,attrs:{shape:[-1,k]}})}),m=f.map(w=>({vals:n.readSync(w.dataId),shape:w.shape})),g=T.computeOutShape(f.map(w=>w.shape),1),y=f[0].shape[0]===1,x=H2e(m,g,s,y),A=T.computeOutShape(e.map(w=>w.shape),t),b=n.makeTensorInfo(A,s,x);return f.forEach(w=>n.disposeData(w.dataId)),b}let a=n.device.limits.maxStorageBuffersPerShaderStage-1;if(e.length>a){let f=[];for(let g=0;gf.shape),u=new ige(l),c=[],p=new Array(l.length-1);if(p.length>0){p[0]=l[0][1],c.push({type:"int32",data:[p[0]]});for(let f=1;fn.disposeData(f.dataId));let h=Le({inputs:{x:d},backend:n,attrs:{shape:i}});return n.disposeData(d.dataId),h}function uge(e,t,n){let s=T.computeOutShape(e.map(a=>a.shape),t);return{tensors2D:e.map(a=>Le({inputs:{x:a},backend:n,attrs:{shape:[v.sizeFromShape(a.shape.slice(0,t)),v.sizeFromShape(a.shape.slice(t))]}})),outShape:s}}function hT(e){let{inputs:t,backend:n,attrs:s}=e,{axis:r}=s,a=v.parseAxisParam(r,t[0].shape)[0],o=t.map(u=>u.shape);T.assertParamsConsistent(o,a);let i=T.computeOutShape(t.map(u=>u.shape),a);if(v.sizeFromShape(i)===0)return n.makeTensorInfo(i,t[0].dtype,[]);let l=t.filter(u=>v.sizeFromShape(u.shape)>0);return l.length===1?Qs({inputs:{x:l[0]},backend:n}):tp(l,a,n)}var cge={kernelName:fl,backendName:"webgpu",kernelFunc:hT};function dge(e,t,n,s,r=!1,a=null,o=!1,i=4,l=4,u=4){let c=R=>{switch(R){case 1:return"resData = x[xIndex];";case 3:return"resData = vec3(x[xIndex], x[xIndex + 1], x[xIndex + 2]);";case 4:return"resData = x[xIndex / 4];";default:throw new Error(`innerElementSize ${R} is not supported.`)}},p=R=>{switch(R){case 1:return"return W[row * uniforms.wShape[3] + colIn];";case 4:return"return W[row * uniforms.wShape[3] / 4 + colIn];";default:throw new Error(`innerElementSize ${R} is not supported.`)}},d=e?` let coord = vec4(batch, xRow, xCol, xCh); `:` let coord = vec4(batch, xCh, xRow, xCol); @@ -6064,7 +6106,7 @@ return a / b;`,Ble=` let xRow = outRow * uniforms.stride[0] + uniforms.dilation[0] * WRow - uniforms.pad[0]; let xCol = outCol * uniforms.stride[1] + uniforms.dilation[1] * WCol - uniforms.pad[1]; let xCh = ${y} % inChannels; - var resData = ${Jt(i)}(0.0); + var resData = ${Yt(i)}(0.0); // The bounds checking is always needed since we use it to pad zero for // the 'same' padding type. if (xRow >= 0 && xRow < ${f} && xCol >= 0 && xCol < ${m}) { @@ -6079,15 +6121,15 @@ return a / b;`,Ble=` if (row < uniforms.dimAOuter && col < uniforms.dimInner) { ${x} } - return ${Jt(i)}(0.0);`:s&&n?` + return ${Yt(i)}(0.0);`:s&&n?` let col = colIn * ${i}; ${x}`:` let col = colIn * ${i}; if (row < uniforms.dimInner && col < uniforms.dimBOuter) { ${x} } - return ${Jt(i)}(0.0);`,b=`${p(l)}`,w=Jt(u),k=Jt(e?i:l),C=Jt(e?l:i);return` - ${wi(a,o,u===4,4)} + return ${Yt(i)}(0.0);`,b=`${p(l)}`,w=Yt(u),k=Yt(e?i:l),C=Yt(e?l:i);return` + ${Pa(a,o,u===4,4)} fn mm_readA(batch: i32, row : i32, colIn : i32) -> ${k} { ${e?A:b} } @@ -6103,13 +6145,59 @@ return a / b;`,Ble=` var value = valueIn; let outWidth = ${e?"uniforms.outShape[2]":"uniforms.outShape[3]"}; ${h} - ${wd(r,a)} + ${hu(r,a)} setOutputAtCoords(coords[0], coords[1], coords[2], coords[3], value); } - }`}var _ge=class{constructor(e,t,n,s,r=!1,a=null,o=!1){this.variableNames=["x","W"],this.uniforms="filterDims : vec2, pad : vec2, stride : vec2, dilation : vec2, dimAOuter : i32, dimBOuter : i32, dimInner : i32,",this.outputShape=e.outShape,this.isChannelsLast=e.dataFormat==="channelsLast",this.isVec4=((e.inChannels%4===0||e.inChannels%3===0)&&this.isChannelsLast||e.outWidth%4===0&&!this.isChannelsLast)&&e.outChannels%4===0,this.dispatchLayout=this.isChannelsLast?{x:[3],y:[1,2],z:[0]}:{x:[2,3],y:[1],z:[0]},this.workGroupSize=bb(this.dispatchLayout,this.outputShape,this.isVec4),this.elementsPerThread=vb(this.dispatchLayout,this.outputShape,this.isVec4),this.dispatch=je(this.dispatchLayout,this.outputShape,this.workGroupSize,this.elementsPerThread),this.isVec4?(this.isChannelsLast&&e.inChannels%4!==0?(this.innerElementSize=3,this.variableTypes=["f32","vec4"]):(this.innerElementSize=4,this.variableTypes=["vec4","vec4"]),r&&(this.variableNames.push("bias"),this.variableTypes.push("vec4")),o&&(this.variableNames.push("preluActivationWeights"),this.variableTypes.push("vec4"))):(this.innerElementSize=this.elementsPerThread[0],r&&this.variableNames.push("bias"),o&&this.variableNames.push("preluActivationWeights")),this.addBias=r,this.activation=a,this.hasPreluActivationWeights=o,this.tileAOuter=this.workGroupSize[1]*this.elementsPerThread[1],this.tileBOuter=this.workGroupSize[0]*this.elementsPerThread[0],this.tileInner=Math.max(this.workGroupSize[0]*this.innerElementSize,this.workGroupSize[1]),this.fitAOuter=t%this.tileAOuter===0,this.fitBOuter=n%this.tileBOuter===0,this.fitInner=s%this.tileInner===0,this.shaderKey=`conv2DMM_${this.elementsPerThread}_${this.activation}}_${this.fitAOuter}_${this.fitBOuter}_${this.fitInner}_${this.isVec4}_${this.innerElementSize}_${this.isChannelsLast}`}getUserCode(){let e=this.isVec4?W2(this.elementsPerThread,this.workGroupSize,!this.isChannelsLast,this.tileInner):V2(this.elementsPerThread,this.workGroupSize,!this.isChannelsLast,this.tileInner),t=this.isVec4?[this.innerElementSize,4,4]:[1,1,1];return` - ${Rge(this.isChannelsLast,this.fitAOuter,this.fitBOuter,this.fitInner,this.addBias,this.activation,this.hasPreluActivationWeights,t[0],t[1],t[2])} + }`}var pge=class{constructor(e,t,n,s,r=!1,a=null,o=!1,i=!1){this.variableNames=["x","W"],this.uniforms="filterDims : vec2, pad : vec2, stride : vec2, dilation : vec2, dimAOuter : i32, dimBOuter : i32, dimInner : i32,",this.outputShape=e.outShape,this.isChannelsLast=e.dataFormat==="channelsLast",this.isVec4=((e.inChannels%4===0||e.inChannels%3===0)&&this.isChannelsLast||e.outWidth%4===0&&!this.isChannelsLast)&&e.outChannels%4===0,this.dispatchLayout=this.isChannelsLast?{x:[3],y:[1,2],z:[0]}:{x:[2,3],y:[1],z:[0]},this.workGroupSize=tb(this.dispatchLayout,this.outputShape,this.isVec4),this.elementsPerThread=nb(this.dispatchLayout,this.outputShape,this.isVec4),this.dispatch=Be(this.dispatchLayout,this.outputShape,this.workGroupSize,this.elementsPerThread),this.isVec4?(this.isChannelsLast&&e.inChannels%4!==0?(this.innerElementSize=3,this.variableTypes=["f32","vec4"]):(this.innerElementSize=4,this.variableTypes=["vec4","vec4"]),r&&(this.variableNames.push("bias"),this.variableTypes.push("vec4")),o&&(this.variableNames.push("preluActivationWeights"),this.variableTypes.push("vec4"))):(this.innerElementSize=this.elementsPerThread[0],r&&this.variableNames.push("bias"),o&&this.variableNames.push("preluActivationWeights")),this.sequentialAccessByThreads=i,this.addBias=r,this.activation=a,this.hasPreluActivationWeights=o,this.tileAOuter=this.workGroupSize[1]*this.elementsPerThread[1],this.tileBOuter=this.workGroupSize[0]*this.elementsPerThread[0],this.tileInner=Math.max(this.workGroupSize[0]*this.innerElementSize,this.workGroupSize[1]),this.fitAOuter=t%this.tileAOuter===0,this.fitBOuter=n%this.tileBOuter===0,this.fitInner=s%this.tileInner===0,this.shaderKey=`conv2DMM_${this.elementsPerThread}_${this.activation}}_${this.fitAOuter}_${this.fitBOuter}_${this.fitInner}_${this.isVec4}_${this.innerElementSize}_${this.isChannelsLast}_${this.sequentialAccessByThreads}`}getUserCode(){let e=this.isVec4?g2(this.elementsPerThread,this.workGroupSize,!this.isChannelsLast,this.tileInner):y2(this.elementsPerThread,this.workGroupSize,!this.isChannelsLast,this.tileInner,!1,null,this.sequentialAccessByThreads),t=this.isVec4?[this.innerElementSize,4,4]:[1,1,1];return` + ${dge(this.isChannelsLast,this.fitAOuter,this.fitBOuter,this.fitInner,this.addBias,this.activation,this.hasPreluActivationWeights,t[0],t[1],t[2])} ${e} - `}};function m6(e,t){let n=e.length;return n>=3?t?[...e.slice(0,-3),e[n-3]*e[n-2],e[n-1]]:[...e.slice(0,-3),e[n-3],e[n-2]*e[n-1]]:!t&&n===1&&e[0]>1?[e[0],1]:null}function Dge({x:e,filter:t,convInfo:n,backend:s,bias:r=null,preluActivationWeights:a=null,leakyreluAlpha:o=0,activation:i=null}){let l=n.dataFormat==="channelsLast",u=!l,c=!1,p=l&&n.filterHeight===n.inHeight&&n.filterWidth===n.inWidth&&n.padInfo.type==="VALID",d=[],h,f;if(p){let y=n.inHeight*n.inWidth*n.inChannels;h=He({inputs:{x:e},backend:s,attrs:{shape:[1,n.batchSize,y]}}),f=He({inputs:{x:t},backend:s,attrs:{shape:[1,y,n.outChannels]}})}else h=He({inputs:{x:e},backend:s,attrs:{shape:l?[n.batchSize,n.inHeight*n.inWidth,n.inChannels]:[n.batchSize,n.inChannels,n.inHeight*n.inWidth]}}),f=He({inputs:{x:t},backend:s,attrs:{shape:[1,n.inChannels,n.outChannels]}});if(d.push(h),d.push(f),a!=null){let y=m6(a.shape,l);y!=null&&(a=He({inputs:{x:a},backend:s,attrs:{shape:y}}),d.push(a))}if(r!=null){let y=m6(r.shape,l);y!=null&&(r=He({inputs:{x:r},backend:s,attrs:{shape:y}}),d.push(r))}let m=Sb({a:l?h:f,b:l?f:h,transposeA:u,transposeB:c,backend:s,bias:r,activation:i,preluActivationWeights:a,leakyreluAlpha:o}),g=He({inputs:{x:m},backend:s,attrs:{shape:n.outShape}});d.push(m);for(let y of d)s.disposeData(y.dataId);return g}function RT({x:e,filter:t,convInfo:n,backend:s,bias:r=null,preluActivationWeights:a=null,leakyreluAlpha:o=0,activation:i=null}){let l=r!=null,u=a!=null,c=n.dataFormat==="channelsLast";if(c&&n.filterHeight===n.inHeight&&n.filterWidth===n.inWidth&&n.padInfo.type==="VALID"||n.filterHeight===1&&n.filterWidth===1&&n.dilationHeight===1&&n.dilationWidth===1&&n.strideHeight===1&&n.strideWidth===1&&(n.padInfo.type==="SAME"||n.padInfo.type==="VALID"))return Dge({x:e,filter:t,convInfo:n,backend:s,bias:r,activation:i,preluActivationWeights:a,leakyreluAlpha:o});let d=c?n.outHeight*n.outWidth:n.outChannels,h=c?n.outChannels:n.outHeight*n.outWidth,f=n.filterHeight*n.filterWidth*n.inChannels,m=[n.padInfo.top,n.padInfo.left],g=[{type:"int32",data:[n.filterHeight,n.filterWidth]},{type:"int32",data:[...m]},{type:"int32",data:[n.strideHeight,n.strideWidth]},{type:"int32",data:[n.dilationHeight,n.dilationWidth]},{type:"int32",data:[d]},{type:"int32",data:[h]},{type:"int32",data:[f]}],y=new _ge(n,d,h,f,l,i,u),x=[],A=[e,t];l&&(!c&&r.shape.length===1&&(r=He({inputs:{x:r},backend:s,attrs:{shape:[r.shape[0],1,1]}}),x.push(r)),A.push(r)),u&&(!c&&a.shape.length===1&&(a=He({inputs:{x:a},backend:s,attrs:{shape:[a.shape[0],1,1]}}),x.push(a)),A.push(a)),i==="leakyrelu"&&(g.push({type:"float32",data:[o]}),y.uniforms+=" alpha : f32,");let b=s.runWebGPUProgram(y,A,e.dtype,g);for(let w of x)s.disposeData(w.dataId);return b}function $ge(e){let{inputs:t,attrs:n,backend:s}=e,{x:r,filter:a}=t,{strides:o,pad:i,dataFormat:l,dilations:u,dimRoundingMode:c}=n,p=T.convertConv2DDataFormat(l),d=T.computeConv2DInfo(r.shape,a.shape,o,u,i,c,!1,p);return RT({x:r,filter:a,convInfo:d,backend:s})}var Pge={kernelName:Io,backendName:"webgpu",kernelFunc:$ge};function Fge(e=4){let t=a=>{switch(a){case 1:return"return W[getIndexFromCoords4D(coord, uniforms.wShape)];";case 4:return` + `}},hge=class{constructor(e,t=!1,n=null,s=!1){this.variableNames=["x","W"],this.uniforms="filterDims: vec2, pad: vec2, stride: vec2, dilation: vec2,",this.workGroupSize=[4,4,8],this.outputShape=e.outShape,this.isChannelsLast=e.dataFormat==="channelsLast",this.dispatchLayout=this.isChannelsLast?{x:[2],y:[1],z:[0,3]}:{x:[3],y:[2],z:[0,1]},this.dispatch=Be(this.dispatchLayout,this.outputShape,this.workGroupSize),this.addBias=t,this.activation=n,this.hasPreluActivationWeights=s,t&&this.variableNames.push("bias"),s&&this.variableNames.push("preluActivationWeights"),this.shaderKey=`conv2dnaive_${this.activation}_${this.isChannelsLast}`}getUserCode(){return` + ${Pa(this.activation,this.hasPreluActivationWeights,!1,4)} + fn readInp(batch : i32, row : i32, col : i32, chan : i32) -> f32{ + let coords = vec4(batch, row, col, chan); + if (coordsInBounds4D(coords, uniforms.xShape)) { + return getX(batch, row, col, chan); + } else { + return 0.0; + } + } + fn readFilt(row : i32, col : i32, xChannel : i32, outChannel : i32) -> f32{ + let coords = vec4(row, col, xChannel, outChannel); + if(coordsInBounds4D(coords, uniforms.wShape)) { + return getW(row, col, xChannel, outChannel); + } else { + return 0.0; + } + } + fn writeResult(batch : i32, row : i32, col : i32, chan : i32, valueIn : f32) { + let coords = ${this.isChannelsLast?"vec4(batch, row, col, chan);":"vec4(batch, chan, row, col);"} + if (coordsInBounds4D(coords, uniforms.outShape)) { + var value = valueIn; + ${hu(this.addBias,this.activation)} + setOutputAtCoords(coords.x, coords.y, coords.z, coords.w, value); + } + } + ${Je("index")} { + let coords = getOutputCoords(); + let batch = coords[0]; + let outChannel = ${this.isChannelsLast?"coords[3];":"coords[1];"} + let outRow = ${this.isChannelsLast?"coords[1];":"coords[2];"} + let outCol = ${this.isChannelsLast?"coords[2];":"coords[3];"} + var acc : f32 = 0.0; + for (var row = 0; row < uniforms.filterDims[0]; row = row + 1) { + for (var col = 0; col < uniforms.filterDims[1]; col = col + 1) { + let xRow = outRow * uniforms.stride[0] + uniforms.dilation[0] * row - uniforms.pad[0]; + let xCol = outCol * uniforms.stride[1] + uniforms.dilation[1] * col - uniforms.pad[1]; + for (var xChannel = 0; xChannel < ${this.isChannelsLast?"uniforms.xShape[3];":"uniforms.xShape[1];"} xChannel = xChannel + 1) { + ${this.isChannelsLast?"let v = readInp(batch, xRow, xCol, xChannel);":"let v = readInp(batch, xChannel, xRow, xCol);"} + let f = readFilt(row, col, xChannel, outChannel); + acc = acc + v * f; + } + } + } + writeResult(batch, outRow, outCol, outChannel, acc); + } + `}};function K7(e,t){let n=e.length;return n>=3?t?[...e.slice(0,-3),e[n-3]*e[n-2],e[n-1]]:[...e.slice(0,-3),e[n-3],e[n-2]*e[n-1]]:!t&&n===1&&e[0]>1?[e[0],1]:null}function fge({x:e,filter:t,convInfo:n,backend:s,bias:r=null,preluActivationWeights:a=null,leakyreluAlpha:o=0,activation:i=null}){let l=n.dataFormat==="channelsLast",u=!l,c=!1,p=l&&n.filterHeight===n.inHeight&&n.filterWidth===n.inWidth&&n.padInfo.type==="VALID",d=[],h,f;if(p){let y=n.inHeight*n.inWidth*n.inChannels;h=Le({inputs:{x:e},backend:s,attrs:{shape:[1,n.batchSize,y]}}),f=Le({inputs:{x:t},backend:s,attrs:{shape:[1,y,n.outChannels]}})}else h=Le({inputs:{x:e},backend:s,attrs:{shape:l?[n.batchSize,n.inHeight*n.inWidth,n.inChannels]:[n.batchSize,n.inChannels,n.inHeight*n.inWidth]}}),f=Le({inputs:{x:t},backend:s,attrs:{shape:[1,n.inChannels,n.outChannels]}});if(d.push(h),d.push(f),a!=null){let y=K7(a.shape,l);y!=null&&(a=Le({inputs:{x:a},backend:s,attrs:{shape:y}}),d.push(a))}if(r!=null){let y=K7(r.shape,l);y!=null&&(r=Le({inputs:{x:r},backend:s,attrs:{shape:y}}),d.push(r))}let m=ob({a:l?h:f,b:l?f:h,transposeA:u,transposeB:c,backend:s,bias:r,activation:i,preluActivationWeights:a,leakyreluAlpha:o}),g=Le({inputs:{x:m},backend:s,attrs:{shape:n.outShape}});d.push(m);for(let y of d)s.disposeData(y.dataId);return g}function fT({x:e,filter:t,convInfo:n,backend:s,bias:r=null,preluActivationWeights:a=null,leakyreluAlpha:o=0,activation:i=null}){let l=r!=null,u=a!=null,c=n.dataFormat==="channelsLast",p=c&&n.filterHeight===n.inHeight&&n.filterWidth===n.inWidth&&n.padInfo.type==="VALID",d=U().getBool("WEBGPU_USE_NAIVE_CONV2D_DEBUG");if(!d&&(p||n.filterHeight===1&&n.filterWidth===1&&n.dilationHeight===1&&n.dilationWidth===1&&n.strideHeight===1&&n.strideWidth===1&&(n.padInfo.type==="SAME"||n.padInfo.type==="VALID")))return fge({x:e,filter:t,convInfo:n,backend:s,bias:r,activation:i,preluActivationWeights:a,leakyreluAlpha:o});let h,f=[n.padInfo.top,n.padInfo.left],m=[{type:"int32",data:[n.filterHeight,n.filterWidth]},{type:"int32",data:[...f]},{type:"int32",data:[n.strideHeight,n.strideWidth]},{type:"int32",data:[n.dilationHeight,n.dilationWidth]}];if(d)h=new hge(n,l,i,u);else{let A=c?n.outHeight*n.outWidth:n.outChannels,b=c?n.outChannels:n.outHeight*n.outWidth,w=n.filterHeight*n.filterWidth*n.inChannels;m.push({type:"int32",data:[A]},{type:"int32",data:[b]},{type:"int32",data:[w]});let k=s.adapterInfo.isIntel();h=new pge(n,A,b,w,l,i,u,k)}let g=[],y=[e,t];l&&(!c&&r.shape.length===1&&(r=Le({inputs:{x:r},backend:s,attrs:{shape:[r.shape[0],1,1]}}),g.push(r)),y.push(r)),u&&(!c&&a.shape.length===1&&(a=Le({inputs:{x:a},backend:s,attrs:{shape:[a.shape[0],1,1]}}),g.push(a)),y.push(a)),i==="leakyrelu"&&(m.push({type:"float32",data:[o]}),h.uniforms+=" alpha : f32,");let x=s.runWebGPUProgram(h,y,e.dtype,m);for(let A of g)s.disposeData(A.dataId);return x}function mge(e){let{inputs:t,attrs:n,backend:s}=e,{x:r,filter:a}=t,{strides:o,pad:i,dataFormat:l,dilations:u,dimRoundingMode:c}=n,p=T.convertConv2DDataFormat(l),d=T.computeConv2DInfo(r.shape,a.shape,o,u,i,c,!1,p);return fT({x:r,filter:a,convInfo:d,backend:s})}var gge={kernelName:wo,backendName:"webgpu",kernelFunc:mge};function yge(e=4){let t=a=>{switch(a){case 1:return"return W[getIndexFromCoords4D(coord, uniforms.wShape)];";case 4:return` let coord1 = vec4(coordX, coordY, col + 1, rowInner); let coord2 = vec4(coordX, coordY, col + 2, rowInner); let coord3 = vec4(coordX, coordY, col + 3, rowInner); @@ -6128,10 +6216,10 @@ return a / b;`,Ble=` let xR = f32(outRow - uniforms.pads[0] + WRow) / f32(uniforms.stride[0]); let xC = f32(outCol - uniforms.pads[1] + WCol) / f32(uniforms.stride[1]); if (xR < 0.0 || xR >= f32(uniforms.outBackprop[1]) || fract(xR) > 0.0) { - return ${Jt(e)}(0.0); + return ${Yt(e)}(0.0); } if (xC < 0.0 || xC >= f32(uniforms.outBackprop[2]) || fract(xC) > 0.0) { - return ${Jt(e)}(0.0); + return ${Yt(e)}(0.0); } let coord = vec4( batch, @@ -6140,13 +6228,13 @@ return a / b;`,Ble=` col % uniforms.outBackprop[3]); return x[getIndexFromCoords4D(coord, uniforms.xShape)/${e}];`} } - return ${Jt(e)}(0.0);`;return` - fn mm_readA(batch: i32, row : i32, colIn : i32) -> ${Jt(e)} { + return ${Yt(e)}(0.0);`;return` + fn mm_readA(batch: i32, row : i32, colIn : i32) -> ${Yt(e)} { let col = colIn * ${e}; ${s} } - fn mm_readB(batch: i32, row : i32, colIn : i32) -> ${Jt(e)} { + fn mm_readB(batch: i32, row : i32, colIn : i32) -> ${Yt(e)} { let col = colIn * ${e}; let coordX = uniforms.filterDims.x - 1 - row / (uniforms.filterDims[1] * uniforms.outBackprop[3]); @@ -6158,10 +6246,10 @@ return a / b;`,Ble=` let coord = vec4(coordX, coordY, col, rowInner); ${t(e)} } - return ${Jt(e)}(0.0); + return ${Yt(e)}(0.0); } - fn mm_write(batch: i32, row : i32, colIn : i32, valueInput : ${Jt(e)}) { + fn mm_write(batch: i32, row : i32, colIn : i32, valueInput : ${Yt(e)}) { let col = colIn * ${e}; if (row < uniforms.dimAOuter && (col + ${e-1}) < uniforms.dimBOuter) { var value = valueInput; @@ -6172,17 +6260,17 @@ return a / b;`,Ble=` col); result[getIndexFromCoords4D(outCoord, uniforms.outShape)/${e}] = value; } - }`}var Oge=class{constructor(e){this.variableNames=["x","W"],this.uniforms="filterDims : vec2, pads : vec2, stride : vec2, outBackprop : vec4, dimAOuter : i32, dimBOuter : i32, dimInner : i32,",this.outputShape=e.inShape,v.assert(e.dataFormat==="channelsLast",()=>"TODO: NCHW is unimplemented"),this.isVec4=e.inChannels%4===0&&e.outChannels%4===0,this.dispatchLayout={x:[3],y:[1,2],z:[0]},this.workGroupSize=bb(this.dispatchLayout,this.outputShape,this.isVec4),this.elementsPerThread=vb(this.dispatchLayout,this.outputShape,this.isVec4),this.dispatch=je(this.dispatchLayout,this.outputShape,this.workGroupSize,this.elementsPerThread),this.isVec4&&(this.variableTypes=["vec4","f32"]),this.shaderKey=`conv2DDerInputMM_${this.isVec4}_${this.elementsPerThread}`}getUserCode(){let e=this.isVec4?W2(this.elementsPerThread,this.workGroupSize):V2(this.elementsPerThread,this.workGroupSize);return` - ${Fge(this.isVec4?4:1)} + }`}var Age=class{constructor(e){this.variableNames=["x","W"],this.uniforms="filterDims : vec2, pads : vec2, stride : vec2, outBackprop : vec4, dimAOuter : i32, dimBOuter : i32, dimInner : i32,",this.outputShape=e.inShape,v.assert(e.dataFormat==="channelsLast",()=>"TODO: NCHW is unimplemented"),this.isVec4=e.inChannels%4===0&&e.outChannels%4===0,this.dispatchLayout={x:[3],y:[1,2],z:[0]},this.workGroupSize=tb(this.dispatchLayout,this.outputShape,this.isVec4),this.elementsPerThread=nb(this.dispatchLayout,this.outputShape,this.isVec4),this.dispatch=Be(this.dispatchLayout,this.outputShape,this.workGroupSize,this.elementsPerThread),this.isVec4&&(this.variableTypes=["vec4","f32"]),this.shaderKey=`conv2DDerInputMM_${this.isVec4}_${this.elementsPerThread}`}getUserCode(){let e=this.isVec4?g2(this.elementsPerThread,this.workGroupSize):y2(this.elementsPerThread,this.workGroupSize);return` + ${yge(this.isVec4?4:1)} ${e} - `}},Mge=class{constructor(e){this.variableNames=["dy","W"],this.uniforms="filterDims : vec2, pads : vec2, stride : vec2, outBackprop : vec4,",this.workGroupSize=[64,1,1],this.size=!0,this.outputShape=e.inShape,this.dispatchLayout=lt(this.outputShape),this.dispatch=je(this.dispatchLayout,this.outputShape,this.workGroupSize),this.isChannelsLast=e.dataFormat==="channelsLast",this.shaderKey=`conv2DDerInput_${this.isChannelsLast}`}getUserCode(){let e=this.isChannelsLast?1:2,t=this.isChannelsLast?2:3,n=this.isChannelsLast?3:1;return` - ${nt("index")} { + `}},xge=class{constructor(e){this.variableNames=["dy","W"],this.uniforms="filterDims : vec2, pads : vec2, stride : vec2, outBackprop : vec4,",this.workGroupSize=[64,1,1],this.size=!0,this.outputShape=e.inShape,this.dispatchLayout=it(this.outputShape),this.dispatch=Be(this.dispatchLayout,this.outputShape,this.workGroupSize),this.isChannelsLast=e.dataFormat==="channelsLast",this.shaderKey=`conv2DDerInput_${this.isChannelsLast}`}getUserCode(){let e=this.isChannelsLast?1:2,t=this.isChannelsLast?2:3,n=this.isChannelsLast?3:1;return` + ${Je("index")} { if(index < uniforms.size) { let coords = getCoordsFromIndex(index); let batch = coords[0]; let d1 = coords[${n}]; - let dyCorner = vec2(coords[${e}]), coords[${t}]) - uniforms.pads; + let dyCorner = vec2(coords[${e}], coords[${t}]) - uniforms.pads; let dyRCorner = dyCorner.x; let dyCCorner = dyCorner.y; @@ -6196,7 +6284,7 @@ return a / b;`,Ble=` wRPerm < 0) { continue; } - let idyR = dyR; + let idyR = i32(dyR); for (var wC = 0; wC < uniforms.filterDims.y; wC = wC + 1) { let dyC = (f32(dyCCorner) + f32(wC)) / f32(uniforms.stride.y); @@ -6205,7 +6293,7 @@ return a / b;`,Ble=` fract(dyC) > 0.0 || wCPerm < 0) { continue; } - let idyC = dyC; + let idyC = i32(dyC); for (var d2 = 0; d2 < uniforms.outBackprop[3]; d2 = d2 + 1) { if (${this.isChannelsLast}) { @@ -6224,8 +6312,8 @@ return a / b;`,Ble=` setOutputAtIndex(index, dotProd); } } - `}};function zge(e){let{inputs:t,backend:n,attrs:s}=e,{dy:r,filter:a}=t,{inputShape:o,strides:i,pad:l,dataFormat:u,dimRoundingMode:c}=s,p=T.convertConv2DDataFormat(u),d=T.computeConv2DInfo(o,a.shape,i,1,l,c,!1,p),h=[{type:"int32",data:[d.filterHeight,d.filterWidth]},{type:"int32",data:[d.filterHeight-1-d.padInfo.top,d.filterWidth-1-d.padInfo.left]},{type:"int32",data:[d.strideHeight,d.strideWidth]},{type:"int32",data:[d.batchSize,d.outHeight,d.outWidth,d.outChannels]}],f;if(H().getBool("WEBGPU_USE_NAIVE_CONV2D_TRANSPOSE"))f=new Mge(d);else{f=new Oge(d);let m=d.inShape[1]*d.inShape[2],g=d.inShape[3],y=d.filterHeight*d.filterWidth*d.outChannels;h.push({type:"uint32",data:[m]},{type:"uint32",data:[g]},{type:"uint32",data:[y]})}return n.runWebGPUProgram(f,[r,a],"float32",h)}var Lge={kernelName:Co,backendName:"webgpu",kernelFunc:zge},Bge=kn({opType:Oe.COS}),Wge={kernelName:To,backendName:"webgpu",kernelFunc:Bge},Vge=kn({opType:Oe.COSH}),Uge={kernelName:No,backendName:"webgpu",kernelFunc:Vge},Gge=class{constructor(e,t,n,s){this.variableNames=["Image","Boxes","BoxInd"],this.uniforms="extrapolationValue : f32,",this.workGroupSize=[64,1,1],this.size=!0;let[r]=t;this.outputShape=[r,n[0],n[1],e],this.dispatchLayout=lt(this.outputShape),this.dispatch=je(this.dispatchLayout,this.outputShape,this.workGroupSize),this.methodId=s==="bilinear"?1:0,this.cropHeightBiggerThan1=this.outputShape[1]>1,this.cropWidthBiggerThan1=this.outputShape[2]>1,this.shaderKey=`cropAndResize_${this.methodId}_${this.cropHeightBiggerThan1}_${this.cropWidthBiggerThan1}`}getUserCode(){let[e,t]=["f32(uniforms.imageShape[1] - 1)","f32(uniforms.imageShape[2] - 1)"],[n,s,r]=this.cropHeightBiggerThan1?[`(${e} / f32(uniforms.outShape[1] - 1))`,"(y2-y1) * height_ratio",`y1*${e} + f32(y)*(height_scale)`]:["0.0","0.0",`0.5 * (y1+y2) * ${e}`],[a,o,i]=this.cropWidthBiggerThan1?[`(${t} / f32(uniforms.outShape[2] - 1))`,"(x2-x1) * width_ratio",`x1*${t} + f32(x)*(width_scale)`]:["0.0","0.0",`0.5 * (x1+x2) * ${t}`];return` - ${nt("index")} { + `}};function bge(e){let{inputs:t,backend:n,attrs:s}=e,{dy:r,filter:a}=t,{inputShape:o,strides:i,pad:l,dataFormat:u,dimRoundingMode:c}=s,p=T.convertConv2DDataFormat(u),d=T.computeConv2DInfo(o,a.shape,i,1,l,c,!1,p),h=[{type:"int32",data:[d.filterHeight,d.filterWidth]},{type:"int32",data:[d.filterHeight-1-d.padInfo.top,d.filterWidth-1-d.padInfo.left]},{type:"int32",data:[d.strideHeight,d.strideWidth]},{type:"int32",data:[d.batchSize,d.outHeight,d.outWidth,d.outChannels]}],f;if(U().getBool("WEBGPU_USE_NAIVE_CONV2D_TRANSPOSE")||d.filterHeight<=2&&d.filterWidth<=2&&d.outChannels<=16&&d.inChannels===1)f=new xge(d);else{f=new Age(d);let m=d.inHeight*d.inWidth,g=d.inChannels,y=d.filterHeight*d.filterWidth*d.outChannels;h.push({type:"uint32",data:[m]},{type:"uint32",data:[g]},{type:"uint32",data:[y]})}return n.runWebGPUProgram(f,[r,a],"float32",h)}var vge={kernelName:ko,backendName:"webgpu",kernelFunc:bge},wge=vn({opType:De.COS}),kge={kernelName:So,backendName:"webgpu",kernelFunc:wge},Sge=vn({opType:De.COSH}),Ige={kernelName:Io,backendName:"webgpu",kernelFunc:Sge},Cge=class{constructor(e,t,n,s){this.variableNames=["Image","Boxes","BoxInd"],this.uniforms="extrapolationValue : f32,",this.workGroupSize=[64,1,1],this.size=!0;let[r]=t;this.outputShape=[r,n[0],n[1],e],this.dispatchLayout=it(this.outputShape),this.dispatch=Be(this.dispatchLayout,this.outputShape,this.workGroupSize),this.methodId=s==="bilinear"?1:0,this.cropHeightBiggerThan1=this.outputShape[1]>1,this.cropWidthBiggerThan1=this.outputShape[2]>1,this.shaderKey=`cropAndResize_${this.methodId}_${this.cropHeightBiggerThan1}_${this.cropWidthBiggerThan1}`}getUserCode(){let[e,t]=["f32(uniforms.imageShape[1] - 1)","f32(uniforms.imageShape[2] - 1)"],[n,s,r]=this.cropHeightBiggerThan1?[`(${e} / f32(uniforms.outShape[1] - 1))`,"(y2-y1) * height_ratio",`y1*${e} + f32(y)*(height_scale)`]:["0.0","0.0",`0.5 * (y1+y2) * ${e}`],[a,o,i]=this.cropWidthBiggerThan1?[`(${t} / f32(uniforms.outShape[2] - 1))`,"(x2-x1) * width_ratio",`x1*${t} + f32(x)*(width_scale)`]:["0.0","0.0",`0.5 * (x1+x2) * ${t}`];return` + ${Je("index")} { if (index < uniforms.size) { let coords = getCoordsFromIndex(index); let height_ratio = f32(${n}); @@ -6280,24 +6368,24 @@ return a / b;`,Ble=` } } } - `}},Hge=e=>{let{inputs:t,backend:n,attrs:s}=e,{image:r,boxes:a,boxInd:o}=t,{cropSize:i,method:l,extrapolationValue:u}=s,c=new Gge(r.shape[3],a.shape,i,l),p=[{type:"float32",data:[u]}];return n.runWebGPUProgram(c,[r,a,o],"float32",p)},jge={kernelName:Sl,backendName:"webgpu",kernelFunc:Hge},Up;(function(e){e.Prod="*",e.Sum="+"})(Up||(Up={}));var g6=class{constructor(e,t,n,s){this.variableNames=["x"],this.uniforms="index : f32,",this.size=!0;let r=128;this.workGroupSize=[r,1,1],this.outputShape=t,this.dispatchLayout=lt(this.outputShape),this.dispatch=je(this.dispatchLayout,this.outputShape,this.workGroupSize),this.exclusive=n,this.reverse=s,this.op=e,this.shaderKey=`cum_${this.op}_${this.exclusive}_${this.reverse}`}getUserCode(){let e=this.outputShape.length,t=this.op===Up.Prod?"1.0":"0.0",n=this.exclusive?t:`getX(${y6(e,"coords",this.op)})`,s=this.outputShape[this.outputShape.length-1],r="",a="";return this.exclusive?(r=this.reverse?`end != ${s-1}`:"end != 0",a=this.reverse?"end + 1":"end - 1"):(r=this.reverse?`end + pow2 < ${s}`:"end >= pow2",a=this.reverse?"end + pow2":"end - pow2"),` - ${nt("index")} { + `}},Tge=e=>{let{inputs:t,backend:n,attrs:s}=e,{image:r,boxes:a,boxInd:o}=t,{cropSize:i,method:l,extrapolationValue:u}=s,c=new Cge(r.shape[3],a.shape,i,l),p=[{type:"float32",data:[u]}];return n.runWebGPUProgram(c,[r,a,o],"float32",p)},Nge={kernelName:gl,backendName:"webgpu",kernelFunc:Tge},Cp;(function(e){e.Prod="*",e.Sum="+"})(Cp||(Cp={}));var Z7=class{constructor(e,t,n,s){this.variableNames=["x"],this.uniforms="index : f32,",this.size=!0;let r=128;this.workGroupSize=[r,1,1],this.outputShape=t,this.dispatchLayout=it(this.outputShape),this.dispatch=Be(this.dispatchLayout,this.outputShape,this.workGroupSize),this.exclusive=n,this.reverse=s,this.op=e,this.shaderKey=`cum_${this.op}_${this.exclusive}_${this.reverse}`}getUserCode(){let e=this.outputShape.length,t=this.op===Cp.Prod?"1.0":"0.0",n=this.exclusive?t:`getX(${Y7(e,"coords",this.op)})`,s=this.outputShape[this.outputShape.length-1],r="",a="";return this.exclusive?(r=this.reverse?`end != ${s-1}`:"end != 0",a=this.reverse?"end + 1":"end - 1"):(r=this.reverse?`end + pow2 < ${s}`:"end >= pow2",a=this.reverse?"end + pow2":"end - pow2"),` + ${Je("index")} { if (index < uniforms.size) { var coords = getCoordsFromIndex(index); - let end = ${A6(e,"coords",this.op)}; + let end = ${J7(e,"coords",this.op)}; var val = ${n}; let pow2 = i32(pow(2.0, uniforms.index)); if (${r}) { let idx = ${a}; - ${A6(e,"coords",this.op)} = idx; - val ${this.op}= getX(${y6(e,"coords",this.op)}); + ${J7(e,"coords",this.op)} = idx; + val ${this.op}= getX(${Y7(e,"coords",this.op)}); } setOutputAtIndex(index, val); } } - `}};function y6(e,t,n){if(e===1)return`${t}`;if(e===2)return`${t}.x, ${t}.y`;if(e===3)return`${t}.x, ${t}.y, ${t}.z`;if(e===4)return`${t}.x, ${t}.y, ${t}.z, ${t}.w`;throw Error(`Cumulative ${n} for rank ${e} is not yet supported`)}function A6(e,t,n){if(e===1)return`${t}`;if(e===2)return`${t}.y`;if(e===3)return`${t}.z`;if(e===4)return`${t}.w`;throw Error(`Cumulative ${n} for rank ${e} is not yet supported`)}function _T(e,t,n,s,r,a){let o=t.shape.length,i=T.getAxesPermutation([s],o),l=t;i!=null&&(l=_a({inputs:{x:t},backend:n,attrs:{perm:i}}));let u=T.getInnerMostAxes(1,o)[0];if(u!==o-1)throw new Error(`WebGPU cumprod shader expects an inner-most axis=${t.shape.length-1} but got axis=${s}`);let c=l.shape[u],p=sr({inputs:{x:l},backend:n});for(let d=0;d<=Math.ceil(Math.log2(c))-1;d++){let h=new g6(e,l.shape,!1,a),f=p,m=[{type:"float32",data:[d]}];p=n.runWebGPUProgram(h,[p],p.dtype,m),n.disposeData(f.dataId)}if(r){let d=new g6(e,l.shape,r,a),h=p,f=[{type:"float32",data:[0]}];p=n.runWebGPUProgram(d,[p],p.dtype,f),n.disposeData(h.dataId)}if(i!=null){let d=T.getUndoAxesPermutation(i),h=_a({inputs:{x:p},backend:n,attrs:{perm:d}});return n.disposeData(p.dataId),n.disposeData(l.dataId),h}return p}function qge(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{axis:a,exclusive:o,reverse:i}=s;return _T(Up.Prod,r,n,a,o,i)}var Xge={kernelName:kl,backendName:"webgpu",kernelFunc:qge};function Kge(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{axis:a,exclusive:o,reverse:i}=s;return _T(Up.Sum,r,n,a,o,i)}var Zge={kernelName:Eo,backendName:"webgpu",kernelFunc:Kge},Yge=class{constructor(e,t){this.variableNames=["x"],this.workGroupSize=[64,1,1],this.size=!0,this.uniforms="blockSize : i32,",this.outputShape=e,this.dispatchLayout=lt(this.outputShape),this.dispatch=je(this.dispatchLayout,this.outputShape,this.workGroupSize),this.shaderKey=`depthToSpace_${t}`,this.dataFormat=t}getUserCode(){return` - ${nt("index")} { + `}};function Y7(e,t,n){if(e===1)return`${t}`;if(e===2)return`${t}.x, ${t}.y`;if(e===3)return`${t}.x, ${t}.y, ${t}.z`;if(e===4)return`${t}.x, ${t}.y, ${t}.z, ${t}.w`;throw Error(`Cumulative ${n} for rank ${e} is not yet supported`)}function J7(e,t,n){if(e===1)return`${t}`;if(e===2)return`${t}.y`;if(e===3)return`${t}.z`;if(e===4)return`${t}.w`;throw Error(`Cumulative ${n} for rank ${e} is not yet supported`)}function mT(e,t,n,s,r,a){let o=t.shape.length,i=T.getAxesPermutation([s],o),l=t;i!=null&&(l=Ca({inputs:{x:t},backend:n,attrs:{perm:i}}));let u=T.getInnerMostAxes(1,o)[0];if(u!==o-1)throw new Error(`WebGPU cumprod shader expects an inner-most axis=${t.shape.length-1} but got axis=${s}`);let c=l.shape[u],p=Qs({inputs:{x:l},backend:n});for(let d=0;d<=Math.ceil(Math.log2(c))-1;d++){let h=new Z7(e,l.shape,!1,a),f=p,m=[{type:"float32",data:[d]}];p=n.runWebGPUProgram(h,[p],p.dtype,m),n.disposeData(f.dataId)}if(r){let d=new Z7(e,l.shape,r,a),h=p,f=[{type:"float32",data:[0]}];p=n.runWebGPUProgram(d,[p],p.dtype,f),n.disposeData(h.dataId)}if(i!=null){let d=T.getUndoAxesPermutation(i),h=Ca({inputs:{x:p},backend:n,attrs:{perm:d}});return n.disposeData(p.dataId),n.disposeData(l.dataId),h}return p}function Ege(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{axis:a,exclusive:o,reverse:i}=s;return mT(Cp.Prod,r,n,a,o,i)}var Rge={kernelName:ml,backendName:"webgpu",kernelFunc:Ege};function _ge(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{axis:a,exclusive:o,reverse:i}=s;return mT(Cp.Sum,r,n,a,o,i)}var Dge={kernelName:Co,backendName:"webgpu",kernelFunc:_ge},$ge=class{constructor(e,t){this.variableNames=["x"],this.workGroupSize=[64,1,1],this.size=!0,this.uniforms="blockSize : i32,",this.outputShape=e,this.dispatchLayout=it(this.outputShape),this.dispatch=Be(this.dispatchLayout,this.outputShape,this.workGroupSize),this.shaderKey=`depthToSpace_${t}`,this.dataFormat=t}getUserCode(){return` + ${Je("index")} { if (index < uniforms.size) { let coords = getCoordsFromIndex(index); let b = coords[0]; @@ -6316,8 +6404,8 @@ return a / b;`,Ble=` let rlt = ${this.getInputSamplingString()}; setOutputAtIndex(index, rlt); } - }`}getHeightCoordString(){return this.dataFormat==="NHWC"?"coords[1]":"coords[2]"}getWidthCoordString(){return this.dataFormat==="NHWC"?"coords[2]":"coords[3]"}getDepthCoordString(){return this.dataFormat==="NHWC"?"coords[3]":"coords[1]"}getOutputDepthSize(){return this.dataFormat==="NHWC"?"uniforms.outShape[3]":"uniforms.outShape[1]"}getInputSamplingString(){return this.dataFormat==="NHWC"?"getX(b, in_h, in_w, in_d)":"getX(b, in_d, in_h, in_w)"}};function Jge(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{blockSize:a,dataFormat:o}=s,i=r.shape[0],l=o==="NHWC"?r.shape[1]:r.shape[2],u=o==="NHWC"?r.shape[2]:r.shape[3],c=o==="NHWC"?r.shape[3]:r.shape[1],p=l*a,d=u*a,h=c/(a*a),f=o==="NHWC"?[i,p,d,h]:[i,h,p,d],m=[{type:"int32",data:[a]}],g=new Yge(f,o);return n.runWebGPUProgram(g,[r],r.dtype,m)}var Qge={kernelName:Il,backendName:"webgpu",kernelFunc:Jge},e3e=class{constructor(e,t,n,s=!1,r=null,a=!1){this.variableNames=["x","W"],this.uniforms="pad : vec2, inDims : vec2,",this.workGroupSize=[16,16,1],this.outputShape=e,this.dispatchLayout={x:[3],y:[2],z:[0,1]},this.dispatch=je(this.dispatchLayout,this.outputShape,this.workGroupSize),s&&this.variableNames.push("bias"),a&&this.variableNames.push("preluActivationWeights"),this.addBias=s,this.activation=r,this.hasPreluActivation=a,this.filterHeight=t,this.filterWidth=n,this.shaderKey=`depthwiseNCHW_${this.activation}_${this.filterHeight}_${this.filterWidth}`}getUserCode(){let e=this.filterWidth*this.filterHeight,t=this.workGroupSize[0]*this.workGroupSize[1]*this.workGroupSize[2],n=this.workGroupSize[1]+this.filterHeight-1,s=this.workGroupSize[0]+this.filterWidth-1;return` - ${wi(this.activation,this.hasPreluActivation,!1,4)} + }`}getHeightCoordString(){return this.dataFormat==="NHWC"?"coords[1]":"coords[2]"}getWidthCoordString(){return this.dataFormat==="NHWC"?"coords[2]":"coords[3]"}getDepthCoordString(){return this.dataFormat==="NHWC"?"coords[3]":"coords[1]"}getOutputDepthSize(){return this.dataFormat==="NHWC"?"uniforms.outShape[3]":"uniforms.outShape[1]"}getInputSamplingString(){return this.dataFormat==="NHWC"?"getX(b, in_h, in_w, in_d)":"getX(b, in_d, in_h, in_w)"}};function Pge(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{blockSize:a,dataFormat:o}=s,i=r.shape[0],l=o==="NHWC"?r.shape[1]:r.shape[2],u=o==="NHWC"?r.shape[2]:r.shape[3],c=o==="NHWC"?r.shape[3]:r.shape[1],p=l*a,d=u*a,h=c/(a*a),f=o==="NHWC"?[i,p,d,h]:[i,h,p,d],m=[{type:"int32",data:[a]}],g=new $ge(f,o);return n.runWebGPUProgram(g,[r],r.dtype,m)}var Fge={kernelName:yl,backendName:"webgpu",kernelFunc:Pge},Oge=class{constructor(e,t,n,s=!1,r=null,a=!1){this.variableNames=["x","W"],this.uniforms="pad : vec2, inDims : vec2,",this.workGroupSize=[16,16,1],this.outputShape=e,this.dispatchLayout={x:[3],y:[2],z:[0,1]},this.dispatch=Be(this.dispatchLayout,this.outputShape,this.workGroupSize),s&&this.variableNames.push("bias"),a&&this.variableNames.push("preluActivationWeights"),this.addBias=s,this.activation=r,this.hasPreluActivation=a,this.filterHeight=t,this.filterWidth=n,this.shaderKey=`depthwiseNCHW_${this.activation}_${this.filterHeight}_${this.filterWidth}`}getUserCode(){let e=this.filterWidth*this.filterHeight,t=this.workGroupSize[0]*this.workGroupSize[1]*this.workGroupSize[2],n=this.workGroupSize[1]+this.filterHeight-1,s=this.workGroupSize[0]+this.filterWidth-1;return` + ${Pa(this.activation,this.hasPreluActivation,!1,4)} var mm_Asub : array, ${n}>; var mm_Bsub : array, ${this.filterHeight}>; @@ -6330,7 +6418,7 @@ return a / b;`,Ble=` return value; } - ${Vp()} + ${Ip()} fn _start(@builtin(local_invocation_id) LocalId : vec3, @builtin(global_invocation_id) GlobalId : vec3, @builtin(local_invocation_index) LocalIndex: u32, @@ -6381,68 +6469,69 @@ return a / b;`,Ble=` value = fma(xVal, wVal, value); } } - ${wd(this.addBias,this.activation)} + ${hu(this.addBias,this.activation)} if (coordsInBounds4D(coords, uniforms.outShape)) { setOutputAtCoords(coords[0], coords[1], coords[2], coords[3], value); } } - `}},DT=class{constructor(e,t=!1,n=null,s=!1){this.variableNames=["x","W"],this.uniforms="pad : vec2, inDims : vec2,",this.workGroupSize=[4,4,4],this.isVec4=!0,this.outputShape=e.outShape,this.dispatchLayout={x:[3],y:[2],z:[0,1]},this.dispatch=je(this.dispatchLayout,this.outputShape,this.workGroupSize,[4,4,1]),v.assert(e.dataFormat==="channelsLast",()=>"TODO: NCHW is unimplemented"),t&&this.variableNames.push("bias"),s&&this.variableNames.push("preluActivationWeights"),this.convInfo=e,this.addBias=t,this.activation=n,this.hasPreluActivation=s,this.shaderKey=`depthwiseVec4_${n}_${this.convInfo.filterHeight}_${this.convInfo.filterWidth}`}getUserCode(){let e=4+this.convInfo.filterWidth-1;return` - ${wi(this.activation,this.hasPreluActivation,!0,4)} + `}},gT=class{constructor(e,t=!1,n=null,s=!1){this.variableNames=["x","W"],this.uniforms="pad : vec2, inDims : vec2,",this.workGroupSize=[4,4,4],this.workPerThread=4,this.isVec4=!0,this.outputShape=e.outShape,this.dispatchLayout={x:[3],y:[2],z:[0,1]},this.dispatch=Be(this.dispatchLayout,this.outputShape,this.workGroupSize,[4,this.workPerThread,1]),v.assert(e.dataFormat==="channelsLast",()=>"TODO: NCHW is unimplemented"),t&&this.variableNames.push("bias"),s&&this.variableNames.push("preluActivationWeights"),this.convInfo=e,this.addBias=t,this.activation=n,this.hasPreluActivation=s,this.shaderKey=`depthwiseVec4_${n}_${this.convInfo.filterHeight}_${this.convInfo.filterWidth}_${this.convInfo.strideHeight}_${this.convInfo.strideWidth}_${this.workPerThread}`}getUserCode(){let e=(this.workPerThread-1)*this.convInfo.strideWidth+this.convInfo.filterWidth;return` + ${Pa(this.activation,this.hasPreluActivation,!0,4)} fn readX(batch : i32, row : i32, col : i32, channel : i32) -> vec4 { var value = vec4(0.0); - if (row >=0 && row < uniforms.inDims[0] && col >=0 && col < uniforms.inDims[1]) - { + if (col >=0 && col < uniforms.inDims[1]) { value = getX(batch, row, col, channel); } return value; } - ${Vp()} + + const strideHeight = ${this.convInfo.strideHeight}; + const strideWidth = ${this.convInfo.strideWidth}; + ${Ip()} fn _start(@builtin(global_invocation_id) globalId: vec3) { let batch = i32(globalId.z) / uniforms.outShape[1]; let r = i32(globalId.z) % uniforms.outShape[1]; - let c = i32(globalId.y) * 4; + let c = i32(globalId.y) * ${this.workPerThread}; let d1 = i32(globalId.x) * 4; - let xRCCorner = vec2(r, c) - uniforms.pad; + let xRCCorner = vec2(r, c) * vec2(strideHeight, strideWidth) - uniforms.pad; let xRCorner = xRCCorner.x; let xCCorner = xRCCorner.y; var xVals : array, ${e}>; - var dotProd : array, 4>; - dotProd[0] = vec4(0.0); - dotProd[1] = vec4(0.0); - dotProd[2] = vec4(0.0); - dotProd[3] = vec4(0.0); + var dotProd : array, ${this.workPerThread}>; + for (var i = 0; i < ${this.workPerThread}; i++) { + dotProd[i] = vec4(0.0); + } // Use constant instead of uniform can give better performance. for (var wR = 0; wR < ${this.convInfo.filterHeight}; wR = wR + 1) { let xR = xRCorner + wR; - for (var i = 0; i < ${e}; i++) - { - xVals[i] = readX(batch, xR, xCCorner + i, d1); - } - for (var wC = 0; wC < ${this.convInfo.filterWidth}; wC = wC + 1) { - let wValue = getW(wR, wC, d1, 0); - dotProd[0] = dotProd[0] + xVals[0 + wC] * wValue; - dotProd[1] = dotProd[1] + xVals[1 + wC] * wValue; - dotProd[2] = dotProd[2] + xVals[2 + wC] * wValue; - dotProd[3] = dotProd[3] + xVals[3 + wC] * wValue; + if (xR >=0 && xR < uniforms.inDims[0]) { + for (var i = 0; i < ${e}; i++) { + xVals[i] = readX(batch, xR, xCCorner + i, d1); + } + for (var wC = 0; wC < ${this.convInfo.filterWidth}; wC = wC + 1) { + let wValue = getW(wR, wC, d1, 0); + for (var i = 0; i < ${this.workPerThread}; i++) { + dotProd[i] = fma(xVals[i * strideWidth + wC], wValue, dotProd[i]); + } + } } } - for (var i = 0; i < 4; i = i + 1) { + for (var i = 0; i < ${this.workPerThread}; i = i + 1) { let coords = vec4(batch, r, c + i, d1); if (coordsInBounds4D(coords, uniforms.outShape)) { var value = dotProd[i]; - ${wd(this.addBias,this.activation)} + ${hu(this.addBias,this.activation)} setOutputAtCoords(coords[0], coords[1], coords[2], coords[3], value); } } } - `}},$T=class{constructor(e,t=!1,n=null,s=!1){this.variableNames=["x","W"],this.uniforms=`pad : vec2, inDims : vec2, filterHeight : i32, - filterWidth : i32, stride : vec2, dilation : vec2,`,this.workGroupSize=[256,1,1],this.outputShape=e.outShape,this.dispatchLayout=lt(this.outputShape),this.dispatch=je(this.dispatchLayout,this.outputShape,this.workGroupSize),this.isChannelsLast=e.dataFormat==="channelsLast",t&&this.variableNames.push("bias"),s&&this.variableNames.push("preluActivationWeights"),this.convInfo=e,this.addBias=t,this.activation=n,this.hasPreluActivation=s,this.shaderKey=`depthwise_${this.activation}_${this.isChannelsLast}`}getUserCode(){let e=this.isChannelsLast?"getX(batch, xR, xC, d1);":"getX(batch, d1, xR, xC);";return` - ${wi(this.activation,this.hasPreluActivation,!1,4)} + `}},yT=class{constructor(e,t=!1,n=null,s=!1){this.variableNames=["x","W"],this.uniforms=`pad : vec2, inDims : vec2, filterHeight : i32, + filterWidth : i32, stride : vec2, dilation : vec2,`,this.workGroupSize=[256,1,1],this.outputShape=e.outShape,this.dispatchLayout=it(this.outputShape),this.dispatch=Be(this.dispatchLayout,this.outputShape,this.workGroupSize),this.isChannelsLast=e.dataFormat==="channelsLast",t&&this.variableNames.push("bias"),s&&this.variableNames.push("preluActivationWeights"),this.convInfo=e,this.addBias=t,this.activation=n,this.hasPreluActivation=s,this.shaderKey=`depthwise_${this.activation}_${this.isChannelsLast}`}getUserCode(){let e=this.isChannelsLast?"getX(batch, xR, xC, d1);":"getX(batch, d1, xR, xC);";return` + ${Pa(this.activation,this.hasPreluActivation,!1,4)} - ${nt()} { + ${Je()} { let coords = getOutputCoords(); let batch = coords[0]; let xRCCorner = vec2(coords.${this.isChannelsLast?"yz":"zw"}) * uniforms.stride - uniforms.pad; @@ -6500,13 +6589,13 @@ return a / b;`,Ble=` } } } - ${wd(this.addBias,this.activation)} + ${hu(this.addBias,this.activation)} if (coordsInBounds4D(coords, uniforms.outShape)) { setOutputAtCoords(coords[0], coords[1], coords[2], coords[3], value); } } - `}};function t3e(e){let{inputs:t,backend:n,attrs:s}=e,{x:r,filter:a}=t,{strides:o,pad:i,dataFormat:l,dilations:u,dimRoundingMode:c}=s,p=T.convertConv2DDataFormat(l),d=u;d==null&&(d=[1,1]);let h=T.computeConv2DInfo(r.shape,a.shape,o,d,i,c,!0,p),f=[{type:"int32",data:[h.padInfo.top,h.padInfo.left]},{type:"int32",data:[h.inHeight,h.inWidth]}],m=h.dataFormat==="channelsLast",g;return!m&&h.inHeight>16&&h.inWidth>16&&h.strideHeight===1&&h.strideWidth===1&&h.dilationWidth===1&&h.dilationHeight===1&&h.inChannels===h.outChannels?g=new e3e(h.outShape,h.filterHeight,h.filterWidth):m&&h.inHeight>4&&h.inWidth>4&&h.strideHeight===1&&h.strideWidth===1&&h.inChannels===h.outChannels&&h.dilationHeight===1&&h.dilationWidth===1&&h.inChannels%4===0?g=new DT(h):(g=new $T(h),f.push({type:"int32",data:[h.filterHeight]},{type:"int32",data:[h.filterWidth]},{type:"int32",data:[h.strideHeight,h.strideWidth]},{type:"int32",data:[h.dilationHeight,h.dilationWidth]})),n.runWebGPUProgram(g,[r,a],r.dtype,f)}var n3e={kernelName:Ro,backendName:"webgpu",kernelFunc:t3e},PT=qn({opType:Ye.MUL,cpuKernelImpl:I1e,supportsComplex:!0}),s3e={kernelName:Xo,backendName:"webgpu",kernelFunc:PT};function Cb(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{axis:a,keepDims:o}=s;return Zh(r,a,o,"sum",n)}var r3e={kernelName:ii,backendName:"webgpu",kernelFunc:Cb};function a3e(e){let{inputs:t,backend:n,attrs:s}=e,{equation:r}=s,a=t,{allDims:o,summedDims:i,idDims:l}=T.decodeEinsumEquation(r,a.length);T.checkEinsumDimSizes(o.length,l,a);let{path:u,steps:c}=T.getEinsumComputePath(i,l),p=c.length,d=null,h=o.length,f=[];for(let m=0;m=0&&(d=Cb({inputs:{x:d},backend:n,attrs:{axis:u[m]-(o.length-h),keepDims:!1}}),f.push(d)),h--)}for(let m of f)m!==d&&n.disposeData(m.dataId);return d}var o3e={kernelName:Zp,backendName:"webgpu",kernelFunc:a3e},i3e=kn({opType:Oe.ELU}),l3e={kernelName:Do,backendName:"webgpu",kernelFunc:i3e},u3e=qn({opType:Ye.EQUAL,dtype:"bool",cpuKernelImpl:d1e}),c3e={kernelName:Cl,backendName:"webgpu",kernelFunc:u3e},FT=kn({opType:Oe.EXP,cpuKernelImpl:p1e,dtype:"float32"}),d3e={kernelName:$o,backendName:"webgpu",kernelFunc:FT};function Fy(e){let{inputs:t,attrs:n,backend:s}=e,{dim:r}=n,{input:a}=t,o=a.shape.length,i=a.shape.slice(),l=r;return r<0&&(v.assert(-(o+1)<=r,()=>`Axis must be in the interval [${-(o+1)}, ${o}]`),l=o+r+1),i.splice(l,0,1),He({inputs:{x:a},backend:s,attrs:{shape:i}})}var p3e={kernelName:Tl,backendName:"webgpu",kernelFunc:Fy},h3e=kn({opType:Oe.EXPM1,cpuKernelImpl:h1e}),f3e={kernelName:Nl,backendName:"webgpu",kernelFunc:h3e},m3e=class{constructor(e){this.outputShape=[],this.variableNames=["x"],this.workGroupSize=[64,1,1],this.size=!0,this.outputShape=e,this.dispatchLayout=lt(this.outputShape),this.dispatch=je(this.dispatchLayout,this.outputShape,this.workGroupSize),this.shaderKey="flipLeftRight"}getUserCode(){return` - ${nt("index")} { + `}};function Mge(e){let{inputs:t,backend:n,attrs:s}=e,{x:r,filter:a}=t,{strides:o,pad:i,dataFormat:l,dilations:u,dimRoundingMode:c}=s,p=T.convertConv2DDataFormat(l),d=u;d==null&&(d=[1,1]);let h=T.computeConv2DInfo(r.shape,a.shape,o,d,i,c,!0,p),f=[{type:"int32",data:[h.padInfo.top,h.padInfo.left]},{type:"int32",data:[h.inHeight,h.inWidth]}],m=h.dataFormat==="channelsLast",g;return!m&&h.inHeight>16&&h.inWidth>16&&h.strideHeight===1&&h.strideWidth===1&&h.dilationWidth===1&&h.dilationHeight===1&&h.inChannels===h.outChannels?g=new Oge(h.outShape,h.filterHeight,h.filterWidth):m&&h.inHeight>4&&h.inWidth>4&&h.strideWidth<=2&&h.inChannels===h.outChannels&&h.dilationHeight===1&&h.dilationWidth===1&&h.inChannels%4===0?g=new gT(h):(g=new yT(h),f.push({type:"int32",data:[h.filterHeight]},{type:"int32",data:[h.filterWidth]},{type:"int32",data:[h.strideHeight,h.strideWidth]},{type:"int32",data:[h.dilationHeight,h.dilationWidth]})),n.runWebGPUProgram(g,[r,a],r.dtype,f)}var zge={kernelName:To,backendName:"webgpu",kernelFunc:Mge},AT=Xn({opType:Xe.MUL,cpuKernelImpl:o1e,supportsComplex:!0}),Lge={kernelName:Ho,backendName:"webgpu",kernelFunc:AT};function lb(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{axis:a,keepDims:o}=s;return Fh(r,a,o,"sum",n)}var Bge={kernelName:ri,backendName:"webgpu",kernelFunc:lb};function Wge(e){let{inputs:t,backend:n,attrs:s}=e,{equation:r}=s,a=t,{allDims:o,summedDims:i,idDims:l}=T.decodeEinsumEquation(r,a.length);T.checkEinsumDimSizes(o.length,l,a);let{path:u,steps:c}=T.getEinsumComputePath(i,l),p=c.length,d=null,h=o.length,f=[];for(let m=0;m=0&&(d=lb({inputs:{x:d},backend:n,attrs:{axis:u[m]-(o.length-h),keepDims:!1}}),f.push(d)),h--)}for(let m of f)m!==d&&n.disposeData(m.dataId);return d}var Vge={kernelName:$p,backendName:"webgpu",kernelFunc:Wge},Uge=vn({opType:De.ELU}),Gge={kernelName:Eo,backendName:"webgpu",kernelFunc:Uge},Hge=Xn({opType:Xe.EQUAL,dtype:"bool",cpuKernelImpl:j2e}),jge={kernelName:Al,backendName:"webgpu",kernelFunc:Hge},xT=vn({opType:De.EXP,cpuKernelImpl:q2e,dtype:"float32"}),qge={kernelName:Ro,backendName:"webgpu",kernelFunc:xT};function fy(e){let{inputs:t,attrs:n,backend:s}=e,{dim:r}=n,{input:a}=t,o=a.shape.length,i=a.shape.slice(),l=r;return r<0&&(v.assert(-(o+1)<=r,()=>`Axis must be in the interval [${-(o+1)}, ${o}]`),l=o+r+1),i.splice(l,0,1),Le({inputs:{x:a},backend:s,attrs:{shape:i}})}var Xge={kernelName:xl,backendName:"webgpu",kernelFunc:fy},Kge=vn({opType:De.EXPM1,cpuKernelImpl:X2e}),Zge={kernelName:bl,backendName:"webgpu",kernelFunc:Kge},Yge=class{constructor(e){this.outputShape=[],this.variableNames=["x"],this.workGroupSize=[64,1,1],this.size=!0,this.outputShape=e,this.dispatchLayout=it(this.outputShape),this.dispatch=Be(this.dispatchLayout,this.outputShape,this.workGroupSize),this.shaderKey="flipLeftRight"}getUserCode(){return` + ${Je("index")} { if (index < uniforms.size) { let coords = getCoordsFromIndex(index); let coordX = uniforms.xShape[2] - coords[2] - 1; @@ -6514,9 +6603,9 @@ return a / b;`,Ble=` setOutputAtIndex(index, outputValue); } } - `}},g3e={kernelName:El,backendName:"webgpu",kernelFunc:({inputs:e,backend:t})=>{let{image:n}=e,s=t,r=new m3e(n.shape);return s.runWebGPUProgram(r,[n],n.dtype)}},y3e=kn({opType:Oe.FLOOR,cpuKernelImpl:f1e}),A3e={kernelName:Po,backendName:"webgpu",kernelFunc:y3e},x3e=qn({opType:Ye.INT_DIV,dtype:"int32"}),b3e={kernelName:Fo,backendName:"webgpu",kernelFunc:x3e},v3e=class{constructor(e,t,n=!1){this.isFromPixels=!0,this.outputShape=[0],this.variableNames=[],this.workGroupSize=[256,1,1],this.outputShape=e,this.dispatchLayout=lt(this.outputShape),this.dispatch=je(this.dispatchLayout,this.outputShape,this.workGroupSize,[t,1,1]),this.importVideo=n,this.shaderKey=`fromPixels_${this.importVideo}`}getUserCode(){let e=this.importVideo?"textureLoad(src, vec2(coords.yx));":"textureLoad(src, vec2(coords.yx), 0)";return` + `}},Jge={kernelName:vl,backendName:"webgpu",kernelFunc:({inputs:e,backend:t})=>{let{image:n}=e,s=t,r=new Yge(n.shape);return s.runWebGPUProgram(r,[n],n.dtype)}},Qge=vn({opType:De.FLOOR,cpuKernelImpl:K2e}),e3e={kernelName:_o,backendName:"webgpu",kernelFunc:Qge},t3e=Xn({opType:Xe.INT_DIV,dtype:"int32"}),n3e={kernelName:Do,backendName:"webgpu",kernelFunc:t3e},s3e=class{constructor(e,t,n=!1){this.isFromPixels=!0,this.outputShape=[0],this.variableNames=[],this.workGroupSize=[256,1,1],this.outputShape=e,this.dispatchLayout=it(this.outputShape),this.dispatch=Be(this.dispatchLayout,this.outputShape,this.workGroupSize,[t,1,1]),this.importVideo=n,this.shaderKey=`fromPixels_${this.importVideo}`}getUserCode(){let e=this.importVideo?"textureLoad(src, vec2(coords.yx));":"textureLoad(src, vec2(coords.yx), 0)";return` @binding(1) @group(0) var src: ${this.importVideo?"texture_external":"texture_2d"}; - ${nt("index")} { + ${Je("index")} { let flatIndex = index * uniforms.numChannels; if (flatIndex < uniforms.size) { let coords = getCoordsFromIndex(flatIndex); @@ -6526,8 +6615,8 @@ return a / b;`,Ble=` } } } - `}},w3e={kernelName:Ip,backendName:"webgpu",kernelFunc:k3e},Qu,_3=H().getBool("CANVAS2D_WILL_READ_FREQUENTLY_FOR_GPU"),cm=new Map;function k3e(e){let{inputs:t,backend:n,attrs:s}=e,{pixels:r}=t,{numChannels:a}=s;if(r==null)throw new Error("pixels passed to tf.browser.fromPixels() can not be null");let o=typeof HTMLVideoElement!="undefined"&&r instanceof HTMLVideoElement,i=typeof HTMLImageElement!="undefined"&&r instanceof HTMLImageElement,l=typeof HTMLCanvasElement!="undefined"&&r instanceof HTMLCanvasElement||typeof OffscreenCanvas!="undefined"&&r instanceof OffscreenCanvas,u=typeof ImageBitmap!="undefined"&&r instanceof ImageBitmap,[c,p]=o?[r.videoWidth,r.videoHeight]:[r.width,r.height],d=[p,c,a],h=H().getBool("WEBGPU_IMPORT_EXTERNAL_TEXTURE")&&o,f=o||i;if(u||l||f){let x;if(h){let $=r;if(!cm.has($)||cm.get($).expired){let R={source:$};cm.set($,n.device.importExternalTexture(R))}x={width:c,height:p,format:null,usage:null,texture:cm.get($)}}else{if(f){let S=H().getBool("CANVAS2D_WILL_READ_FREQUENTLY_FOR_GPU");(Qu==null||S!==_3)&&(_3=S,Qu=document.createElement("canvas").getContext("2d",{willReadFrequently:_3})),Qu.canvas.width=c,Qu.canvas.height=p,Qu.drawImage(r,0,0,c,p),r=Qu.canvas}let $=GPUTextureUsage.COPY_DST|GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.TEXTURE_BINDING,R="rgba8unorm",P=n.textureManager.acquireTexture(d[1],d[0],R,$);n.queue.copyExternalImageToTexture({source:r},{texture:P},[d[1],d[0]]),x={width:c,height:p,format:R,usage:$,texture:P}}let A=v.sizeFromShape(d),b=v.computeStrides(d),w=new v3e(d,a,h),k=[{type:"uint32",data:[A]},{type:"uint32",data:[a]},{type:"uint32",data:[...b]}],C=n.makeTensorInfo([p,c],"int32"),E=n.tensorMap.get(C.dataId);E.resourceInfo=x;let _=n.runWebGPUProgram(w,[C],"int32",k);return n.disposeData(C.dataId),_}let m=r.data,g=m;if(a!=null&&a!==4){g=new Uint8Array(r.width*r.height*a);let x=m.length,A=0;for(let b=0;b(xValue, -meanValue, offsetValue), vec3(inv, inv, 1.0))); } } - `}},I3e={kernelName:Oo,backendName:"webgpu",kernelFunc:({inputs:e,attrs:t,backend:n})=>{let{x:s,scale:r,offset:a,mean:o,variance:i}=e,{varianceEpsilon:l}=t,u=n,c=[s,o,i],p=null;a!=null&&(p=a.shape,c.push(a));let d=null;r!=null&&(d=r.shape,c.push(r));let h=new S3e(s.shape,o.shape,i.shape,p,d),f=[{type:"float32",data:[l]}];return u.runWebGPUProgram(h,c,s.dtype,f)}};function C3e(e){let{inputs:t,backend:n,attrs:s}=e,{x:r,filter:a,bias:o,preluActivationWeights:i}=t,{strides:l,pad:u,dataFormat:c,dilations:p,dimRoundingMode:d,activation:h,leakyreluAlpha:f}=s,m=T.convertConv2DDataFormat(c),g=T.computeConv2DInfo(r.shape,a.shape,l,p,u,d,!1,m);return RT({x:r,filter:a,convInfo:g,backend:n,bias:o,preluActivationWeights:i,leakyreluAlpha:f,activation:h})}var T3e={kernelName:oo,backendName:"webgpu",kernelFunc:C3e};function N3e(e){let{inputs:t,backend:n,attrs:s}=e,{x:r,filter:a,bias:o,preluActivationWeights:i}=t,{strides:l,pad:u,dilations:c,dimRoundingMode:p,activation:d,leakyreluAlpha:h}=s,f=c;f==null&&(f=[1,1]),v.assert(T.eitherStridesOrDilationsAreOne(l,f),()=>`Error in depthwiseConv2d: Either strides or dilations must be 1. Got strides ${l} and dilations '${f}'`);let m=T.computeConv2DInfo(r.shape,a.shape,l,f,u,p,!0),g=[r,a],y=o!=null,x=i!=null;y&&g.push(o),x&&g.push(i);let A=[{type:"int32",data:[m.padInfo.top,m.padInfo.left]},{type:"int32",data:[m.inHeight,m.inWidth]}],b;return m.inHeight>4&&m.inWidth>4&&m.strideHeight===1&&m.strideWidth===1&&m.inChannels===m.outChannels&&m.dilationHeight===1&&m.dilationWidth===1&&m.inChannels%4===0?b=new DT(m,y,d,x):(b=new $T(m,y,d,x),A.push({type:"int32",data:[m.filterHeight]},{type:"int32",data:[m.filterWidth]},{type:"int32",data:[m.strideHeight,m.strideWidth]},{type:"int32",data:[m.dilationHeight,m.dilationWidth]})),d==="leakyrelu"&&(A.push({type:"float32",data:[h]}),b.uniforms+=" alpha : f32,"),n.runWebGPUProgram(b,g,"float32",A)}var E3e={kernelName:io,backendName:"webgpu",kernelFunc:N3e},R3e=class{constructor(e,t){this.variableNames=["A","indices"],this.workGroupSize=[64,1,1],this.size=!0,this.outputShape=t,this.dispatchLayout=lt(this.outputShape),this.dispatch=je(this.dispatchLayout,this.outputShape,this.workGroupSize),this.shaderKey=`gathernd_${e}`,this.sliceDim=e,this.uniforms=`sliceDim : i32, strides : ${Mn(e)},`}getUserCode(){let e;return this.sliceDim>1?e="uniforms.strides[j]":e="uniforms.strides",` - ${nt("index")} { + `}},i3e={kernelName:$o,backendName:"webgpu",kernelFunc:({inputs:e,attrs:t,backend:n})=>{let{x:s,scale:r,offset:a,mean:o,variance:i}=e,{varianceEpsilon:l}=t,u=n,c=[s,o,i],p=null;a!=null&&(p=a.shape,c.push(a));let d=null;r!=null&&(d=r.shape,c.push(r));let h=new o3e(s.shape,o.shape,i.shape,p,d),f=[{type:"float32",data:[l]}];return u.runWebGPUProgram(h,c,s.dtype,f)}};function l3e(e){let{inputs:t,backend:n,attrs:s}=e,{x:r,filter:a,bias:o,preluActivationWeights:i}=t,{strides:l,pad:u,dataFormat:c,dilations:p,dimRoundingMode:d,activation:h,leakyreluAlpha:f}=s,m=T.convertConv2DDataFormat(c),g=T.computeConv2DInfo(r.shape,a.shape,l,p,u,d,!1,m);return fT({x:r,filter:a,convInfo:g,backend:n,bias:o,preluActivationWeights:i,leakyreluAlpha:f,activation:h})}var u3e={kernelName:so,backendName:"webgpu",kernelFunc:l3e};function c3e(e){let{inputs:t,backend:n,attrs:s}=e,{x:r,filter:a,bias:o,preluActivationWeights:i}=t,{strides:l,pad:u,dilations:c,dimRoundingMode:p,activation:d,leakyreluAlpha:h}=s,f=c;f==null&&(f=[1,1]),v.assert(T.eitherStridesOrDilationsAreOne(l,f),()=>`Error in depthwiseConv2d: Either strides or dilations must be 1. Got strides ${l} and dilations '${f}'`);let m=T.computeConv2DInfo(r.shape,a.shape,l,f,u,p,!0),g=[r,a],y=o!=null,x=i!=null;y&&g.push(o),x&&g.push(i);let A=[{type:"int32",data:[m.padInfo.top,m.padInfo.left]},{type:"int32",data:[m.inHeight,m.inWidth]}],b;return m.inHeight>4&&m.inWidth>4&&m.strideWidth<=2&&m.inChannels===m.outChannels&&m.dilationHeight===1&&m.dilationWidth===1&&m.inChannels%4===0?b=new gT(m,y,d,x):(b=new yT(m,y,d,x),A.push({type:"int32",data:[m.filterHeight]},{type:"int32",data:[m.filterWidth]},{type:"int32",data:[m.strideHeight,m.strideWidth]},{type:"int32",data:[m.dilationHeight,m.dilationWidth]})),d==="leakyrelu"&&(A.push({type:"float32",data:[h]}),b.uniforms+=" alpha : f32,"),n.runWebGPUProgram(b,g,"float32",A)}var d3e={kernelName:ro,backendName:"webgpu",kernelFunc:c3e},p3e=class{constructor(e,t){this.variableNames=["A","indices"],this.workGroupSize=[64,1,1],this.size=!0,this.outputShape=t,this.dispatchLayout=it(this.outputShape),this.dispatch=Be(this.dispatchLayout,this.outputShape,this.workGroupSize),this.shaderKey=`gathernd_${e}`,this.sliceDim=e,this.uniforms=`sliceDim : i32, strides : ${zn(e)},`}getUserCode(){let e;return this.sliceDim>1?e="uniforms.strides[j]":e="uniforms.strides",` + ${Je("index")} { if (index < uniforms.size) { let coords = getCoordsFromIndex(index); var flattenIndex = 0; @@ -6553,8 +6642,8 @@ return a / b;`,Ble=` setOutputAtIndex(index, getA(flattenIndex, coords[1])); } } - `}};function _3e(e){let{inputs:t,backend:n}=e,{params:s,indices:r}=t,a=r.shape,o=a[a.length-1],i=v.sizeFromShape(s.shape),[l,u,c,p]=T.prepareAndValidate(s,r),d=He({inputs:{x:r},backend:n,attrs:{shape:[u,o]}}),h=He({inputs:{x:s},backend:n,attrs:{shape:[v.sizeFromShape(s.shape)/c,c]}});if(n.shouldExecuteOnCPU([s,r])||s.dtype==="string"){let x=n.readSync(r.dataId),A=n.bufferSync(s),b=m1e(x,A,s.dtype,u,o,c,p,s.shape,i);return n.makeTensorInfo(l,s.dtype,b.values)}let f=new R3e(o,[u,c]),m=[{type:"int32",data:[o]},{type:"int32",data:p}],g=n.runWebGPUProgram(f,[h,d],h.dtype,m),y=He({inputs:{x:g},backend:n,attrs:{shape:l}});return n.disposeData(d.dataId),n.disposeData(h.dataId),n.disposeData(g.dataId),y}var D3e={kernelName:_l,backendName:"webgpu",kernelFunc:_3e},$3e=class{constructor(e,t){this.variableNames=["A","indices"],this.workGroupSize=[64,1,1],this.size=!0,this.outputShape=e.slice(),this.aShape=e,this.outputShape=t,this.dispatchLayout=lt(this.outputShape),this.dispatch=je(this.dispatchLayout,this.outputShape,this.workGroupSize),this.shaderKey="gather"}getUserCode(){let e=P3e(this.aShape);return` - ${nt("index")} { + `}};function h3e(e){let{inputs:t,backend:n}=e,{params:s,indices:r}=t,a=r.shape,o=a[a.length-1],i=v.sizeFromShape(s.shape),[l,u,c,p]=T.prepareAndValidate(s,r),d=Le({inputs:{x:r},backend:n,attrs:{shape:[u,o]}}),h=Le({inputs:{x:s},backend:n,attrs:{shape:[v.sizeFromShape(s.shape)/c,c]}});if(n.shouldExecuteOnCPU([s,r])||s.dtype==="string"){let x=n.readSync(r.dataId),A=n.bufferSync(s),b=Z2e(x,A,s.dtype,u,o,c,p,s.shape,i);return n.makeTensorInfo(l,s.dtype,b.values)}let f=new p3e(o,[u,c]),m=[{type:"int32",data:[o]},{type:"int32",data:p}],g=n.runWebGPUProgram(f,[h,d],h.dtype,m),y=Le({inputs:{x:g},backend:n,attrs:{shape:l}});return n.disposeData(d.dataId),n.disposeData(h.dataId),n.disposeData(g.dataId),y}var f3e={kernelName:kl,backendName:"webgpu",kernelFunc:h3e},m3e=class{constructor(e,t){this.variableNames=["A","indices"],this.workGroupSize=[64,1,1],this.size=!0,this.outputShape=e.slice(),this.aShape=e,this.outputShape=t,this.dispatchLayout=it(this.outputShape),this.dispatch=Be(this.dispatchLayout,this.outputShape,this.workGroupSize),this.shaderKey="gather"}getUserCode(){let e=g3e(this.aShape);return` + ${Je("index")} { if (index < uniforms.size) { let resRC = getCoordsFromIndex(index); let indexZ = i32(getIndices(resRC.x, resRC.z)); @@ -6562,8 +6651,8 @@ return a / b;`,Ble=` setOutputAtIndex(index, inBounds * getA(${e})); } } - `}};function P3e(e){let t=["resRC.x","resRC.y","resRC.z","resRC.w"],n=[];for(let s=0;sn.disposeData(_.dataId)),n.makeTensorInfo(u.outputShape,E.dtype,E.values)}let m=new $3e(d.shape,f),g=n.runWebGPUProgram(m,[d,h],d.dtype);p.push(g);let y=He({inputs:{x:g},backend:n,attrs:{shape:u.outputShape}});return p.forEach(x=>n.disposeData(x.dataId)),y}var F3e={kernelName:Rl,backendName:"webgpu",kernelFunc:OT},O3e=qn({opType:Ye.GREATER,cpuKernelImpl:A1e,dtype:"bool"}),M3e={kernelName:Dl,backendName:"webgpu",kernelFunc:O3e},z3e=qn({opType:Ye.GREATER_EQUAL,dtype:"bool",cpuKernelImpl:y1e}),L3e={kernelName:Mo,backendName:"webgpu",kernelFunc:z3e},B3e=kn({opType:Oe.IS_NAN,dtype:"bool"}),W3e={kernelName:$l,backendName:"webgpu",kernelFunc:B3e};function V3e(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{alpha:a}=s,o=[{type:"float32",data:[a]}],i=new Kh(r.shape,Oe.LEAKYRELU);return i.uniforms="alpha : f32,",n.runWebGPUProgram(i,[r],"float32",o)}var U3e={kernelName:Lo,backendName:"webgpu",kernelFunc:V3e},G3e=qn({opType:Ye.LESS,dtype:"bool",cpuKernelImpl:b1e}),H3e={kernelName:Pl,backendName:"webgpu",kernelFunc:G3e},j3e=qn({opType:Ye.LESS_EQUAL,dtype:"bool",cpuKernelImpl:x1e}),q3e={kernelName:Fl,backendName:"webgpu",kernelFunc:j3e},X3e=kn({opType:Oe.LOG,cpuKernelImpl:v1e}),K3e={kernelName:Bo,backendName:"webgpu",kernelFunc:X3e},Z3e=qn({opType:Ye.LOGICAL_AND,dtype:"bool"}),Y3e={kernelName:Ol,backendName:"webgpu",kernelFunc:Z3e},J3e=kn({opType:Oe.LOGICAL_NOT}),Q3e={kernelName:Ml,backendName:"webgpu",kernelFunc:J3e},eye=qn({opType:Ye.MAX,cpuKernelImpl:k1e}),tye={kernelName:Vo,backendName:"webgpu",kernelFunc:eye};function nye(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{filterSize:a,strides:o,pad:i,dimRoundingMode:l}=s,u=1,c=T.computePool2DInfo(r.shape,a,o,u,i,l);return TT(r,c,"max",n)}var sye={kernelName:Uo,backendName:"webgpu",kernelFunc:nye};function rye(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{axis:a,keepDims:o}=s;return Zh(r,a,o,"min",n)}var aye={kernelName:Ho,backendName:"webgpu",kernelFunc:rye},oye=qn({opType:Ye.MIN,cpuKernelImpl:S1e}),iye={kernelName:jo,backendName:"webgpu",kernelFunc:oye},lye=class{constructor(e,t,n){this.uniforms="",this.variableNames=["x"],this.workGroupSize=[64,1,1],this.size=!0,this.outputShape=t.map((s,r)=>s[0]+e[r]+s[1]),this.dispatchLayout=lt(this.outputShape),this.dispatch=je(this.dispatchLayout,this.outputShape,this.workGroupSize),this.xShape=e,t.map((s,r)=>{this.uniforms+=` pad${r} : vec2,`}),this.offset=n==="reflect"?0:1,this.shaderKey=`mirrorPad_${n}`}getUserCode(){let e=this.xShape.length,t=this.xShape.map((l,u)=>`uniforms.pad${u}[0]`).join(","),n=this.xShape.map((l,u)=>`uniforms.pad${u}[0] + uniforms.xShape${e>1?`[${u}]`:""}`).join(","),s=e===1?"start":"start[i]",r=e===1?"end":"end[i]",a=e===1?"outC":"outC[i]",o=Mn(e),i=e>1?["coords[0]","coords[1]","coords[2]","coords[3]"].slice(0,e):"coords";return` - ${nt("index")} { + `}};function g3e(e){let t=["resRC.x","resRC.y","resRC.z","resRC.w"],n=[];for(let s=0;sn.disposeData(R.dataId)),n.makeTensorInfo(u.outputShape,N.dtype,N.values)}let m=new m3e(d.shape,f),g=n.runWebGPUProgram(m,[d,h],d.dtype);p.push(g);let y=Le({inputs:{x:g},backend:n,attrs:{shape:u.outputShape}});return p.forEach(x=>n.disposeData(x.dataId)),y}var y3e={kernelName:wl,backendName:"webgpu",kernelFunc:bT},A3e=Xn({opType:Xe.GREATER,cpuKernelImpl:Q2e,dtype:"bool"}),x3e={kernelName:Sl,backendName:"webgpu",kernelFunc:A3e},b3e=Xn({opType:Xe.GREATER_EQUAL,dtype:"bool",cpuKernelImpl:J2e}),v3e={kernelName:Po,backendName:"webgpu",kernelFunc:b3e},w3e=vn({opType:De.IS_NAN,dtype:"bool"}),k3e={kernelName:Il,backendName:"webgpu",kernelFunc:w3e};function S3e(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{alpha:a}=s,o=[{type:"float32",data:[a]}],i=new Ph(r.shape,De.LEAKYRELU);return i.uniforms="alpha : f32,",n.runWebGPUProgram(i,[r],"float32",o)}var I3e={kernelName:Oo,backendName:"webgpu",kernelFunc:S3e},C3e=Xn({opType:Xe.LESS,dtype:"bool",cpuKernelImpl:t1e}),T3e={kernelName:Cl,backendName:"webgpu",kernelFunc:C3e},N3e=Xn({opType:Xe.LESS_EQUAL,dtype:"bool",cpuKernelImpl:e1e}),E3e={kernelName:Tl,backendName:"webgpu",kernelFunc:N3e},R3e=vn({opType:De.LOG,cpuKernelImpl:n1e}),_3e={kernelName:Mo,backendName:"webgpu",kernelFunc:R3e},D3e=Xn({opType:Xe.LOGICAL_AND,dtype:"bool"}),$3e={kernelName:Nl,backendName:"webgpu",kernelFunc:D3e},P3e=vn({opType:De.LOGICAL_NOT}),F3e={kernelName:El,backendName:"webgpu",kernelFunc:P3e},O3e=Xn({opType:Xe.MAX,cpuKernelImpl:r1e}),M3e={kernelName:Lo,backendName:"webgpu",kernelFunc:O3e};function z3e(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{filterSize:a,strides:o,pad:i,dimRoundingMode:l}=s,u=1,c=T.computePool2DInfo(r.shape,a,o,u,i,l);return dT(r,c,"max",n)}var L3e={kernelName:Bo,backendName:"webgpu",kernelFunc:z3e};function B3e(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{axis:a,keepDims:o}=s;return Fh(r,a,o,"min",n)}var W3e={kernelName:Vo,backendName:"webgpu",kernelFunc:B3e},V3e=Xn({opType:Xe.MIN,cpuKernelImpl:a1e}),U3e={kernelName:Uo,backendName:"webgpu",kernelFunc:V3e},G3e=class{constructor(e,t,n){this.uniforms="",this.variableNames=["x"],this.workGroupSize=[64,1,1],this.size=!0,this.outputShape=t.map((s,r)=>s[0]+e[r]+s[1]),this.dispatchLayout=it(this.outputShape),this.dispatch=Be(this.dispatchLayout,this.outputShape,this.workGroupSize),this.xShape=e,t.map((s,r)=>{this.uniforms+=` pad${r} : vec2,`}),this.offset=n==="reflect"?0:1,this.shaderKey=`mirrorPad_${n}`}getUserCode(){let e=this.xShape.length,t=this.xShape.map((l,u)=>`uniforms.pad${u}[0]`).join(","),n=this.xShape.map((l,u)=>`uniforms.pad${u}[0] + uniforms.xShape${e>1?`[${u}]`:""}`).join(","),s=e===1?"start":"start[i]",r=e===1?"end":"end[i]",a=e===1?"outC":"outC[i]",o=zn(e),i=e>1?["coords[0]","coords[1]","coords[2]","coords[3]"].slice(0,e):"coords";return` + ${Je("index")} { if (index < uniforms.size) { let start = ${o}(${t}); let end = ${o}(${n}); @@ -6579,8 +6668,8 @@ return a / b;`,Ble=` setOutputAtIndex(index, getX(${i})); } } - `}},uye={kernelName:qo,backendName:"webgpu",kernelFunc:({inputs:e,attrs:t,backend:n})=>{let{x:s}=e,{paddings:r,mode:a}=t,o=n,i=r.map(c=>({type:"int32",data:[c[0],c[1]]})),l=new lye(s.shape,r,a);return o.runWebGPUProgram(l,[s],s.dtype,i)}};function cye(e){let{inputs:t,backend:n}=e,{x:s}=t;if(n.shouldExecuteOnCPU([s])){let a=n.tensorMap.get(s.dataId),[o,i]=C1e(a.values,s.shape,s.dtype);return n.makeTensorInfo(i,s.dtype,o)}let r=new Kh(s.shape,Oe.NEG);return n.runWebGPUProgram(r,[s],s.dtype)}var dye={kernelName:zl,backendName:"webgpu",kernelFunc:cye};function pye(e){console.warn("tf.nonMaxSuppression() in webgpu locks the UI thread. Call tf.nonMaxSuppressionAsync() instead");let{inputs:t,backend:n,attrs:s}=e,{boxes:r,scores:a}=t,{maxOutputSize:o,iouThreshold:i,scoreThreshold:l}=s,u=n.readSync(r.dataId),c=n.readSync(a.dataId),{selectedIndices:p}=Ar.nonMaxSuppressionV3Impl(u,c,o,i,l);return n.makeTensorInfo([p.length],"int32",new Int32Array(p))}var hye={kernelName:Bl,backendName:"webgpu",kernelFunc:pye};function fye(e){console.warn("tf.nonMaxSuppression() in webgpu locks the UI thread. Call tf.nonMaxSuppressionAsync() instead");let{inputs:t,backend:n,attrs:s}=e,{boxes:r,scores:a}=t,{maxOutputSize:o,iouThreshold:i,scoreThreshold:l,softNmsSigma:u}=s,c=n.readSync(r.dataId),p=n.readSync(a.dataId),d=o,h=i,f=l,m=u,{selectedIndices:g,selectedScores:y}=Ar.nonMaxSuppressionV5Impl(c,p,d,h,f,m);return[n.makeTensorInfo([g.length],"int32",new Int32Array(g)),n.makeTensorInfo([y.length],"float32",new Float32Array(y))]}var mye={kernelName:Wl,backendName:"webgpu",kernelFunc:fye};function Jm(e){let{inputs:t,backend:n}=e,{x:s}=t;if(s.dtype==="complex64"){let r=Yh({inputs:{input:s},backend:n}),a=Jm({inputs:{x:r},backend:n}),o=U2({inputs:{input:s},backend:n}),i=Jm({inputs:{x:o},backend:n}),l=kd({inputs:{real:a,imag:i},backend:n});return n.disposeData(r.dataId),n.disposeData(a.dataId),n.disposeData(o.dataId),n.disposeData(i.dataId),l}else return vu({attrs:{shape:s.shape,dtype:s.dtype,value:s.dtype==="string"?"":0},backend:n})}var gye={kernelName:ou,backendName:"webgpu",kernelFunc:Jm};function MT(e){let{inputs:t,backend:n}=e,{x:s}=t;if(s.dtype==="string")throw new Error("onesLike is not supported under string dtype");if(s.dtype==="complex64"){let r=Yh({inputs:{input:s},backend:n}),a=MT({inputs:{x:r},backend:n}),o=U2({inputs:{input:s},backend:n}),i=Jm({inputs:{x:o},backend:n}),l=kd({inputs:{real:a,imag:i},backend:n});return n.disposeData(r.dataId),n.disposeData(a.dataId),n.disposeData(o.dataId),n.disposeData(i.dataId),l}else return vu({attrs:{shape:s.shape,dtype:s.dtype,value:1},backend:n})}var yye={kernelName:Vl,backendName:"webgpu",kernelFunc:MT};function Aye(e){let{inputs:t,backend:n,attrs:s}=e,{axis:r}=s;if(t.length===1)return Fy({inputs:{input:t[0]},backend:n,attrs:{dim:r}});let a=t[0].shape,o=t[0].dtype;t.forEach(c=>{v.assertShapesMatch(a,c.shape,"All tensors passed to stack must have matching shapes"),v.assert(o===c.dtype,()=>"All tensors passed to stack must have matching dtypes")});let i=[],l=t.map(c=>{let p=Fy({inputs:{input:c},backend:n,attrs:{dim:r}});return i.push(p),p}),u=ET({inputs:l,backend:n,attrs:{axis:r}});return i.forEach(c=>n.disposeData(c.dataId)),u}var xye={kernelName:Gl,backendName:"webgpu",kernelFunc:Aye},bye=class{constructor(e,t){this.variableNames=["x"],this.uniforms="constantValue : f32,",this.workGroupSize=[64,1,1],this.size=!0,this.outputShape=t.map((n,s)=>n[0]+e[s]+n[1]),this.dispatchLayout=lt(this.outputShape),this.dispatch=je(this.dispatchLayout,this.outputShape,this.workGroupSize),t.map((n,s)=>{this.uniforms+=` pad${s} : vec2,`}),this.xShape=e,this.shaderKey="pad"}getUserCode(){let e=this.xShape.length,t=Mn(e),n=this.xShape.map((c,p)=>`uniforms.pad${p}[0]`).join(","),s=this.xShape.map((c,p)=>`uniforms.pad${p}[0] + uniforms.xShape${e>1?`[${p}]`:""}`).join(","),r=e>1?`${t}(${n})`:`${n}`,a=e>1?`${t}(${s})`:`${s}`,o=e>1?"any(outC < start)":"outC < start",i=e>1?"any(outC >= end)":"outC >= end",l=e>1?["coords[0]","coords[1]","coords[2]","coords[3]"].slice(0,e):"coords";return` - ${nt("index")} { + `}},H3e={kernelName:Go,backendName:"webgpu",kernelFunc:({inputs:e,attrs:t,backend:n})=>{let{x:s}=e,{paddings:r,mode:a}=t,o=n,i=r.map(c=>({type:"int32",data:[c[0],c[1]]})),l=new G3e(s.shape,r,a);return o.runWebGPUProgram(l,[s],s.dtype,i)}};function j3e(e){let{inputs:t,backend:n}=e,{x:s}=t;if(n.shouldExecuteOnCPU([s])){let a=n.tensorMap.get(s.dataId),[o,i]=i1e(a.values,s.shape,s.dtype);return n.makeTensorInfo(i,s.dtype,o)}let r=new Ph(s.shape,De.NEG);return n.runWebGPUProgram(r,[s],s.dtype)}var q3e={kernelName:Rl,backendName:"webgpu",kernelFunc:j3e};function X3e(e){console.warn("tf.nonMaxSuppression() in webgpu locks the UI thread. Call tf.nonMaxSuppressionAsync() instead");let{inputs:t,backend:n,attrs:s}=e,{boxes:r,scores:a}=t,{maxOutputSize:o,iouThreshold:i,scoreThreshold:l}=s,u=n.readSync(r.dataId),c=n.readSync(a.dataId),{selectedIndices:p}=Ar.nonMaxSuppressionV3Impl(u,c,o,i,l);return n.makeTensorInfo([p.length],"int32",new Int32Array(p))}var K3e={kernelName:Dl,backendName:"webgpu",kernelFunc:X3e};function Z3e(e){console.warn("tf.nonMaxSuppression() in webgpu locks the UI thread. Call tf.nonMaxSuppressionAsync() instead");let{inputs:t,backend:n,attrs:s}=e,{boxes:r,scores:a}=t,{maxOutputSize:o,iouThreshold:i,scoreThreshold:l,softNmsSigma:u}=s,c=n.readSync(r.dataId),p=n.readSync(a.dataId),d=o,h=i,f=l,m=u,{selectedIndices:g,selectedScores:y}=Ar.nonMaxSuppressionV5Impl(c,p,d,h,f,m);return[n.makeTensorInfo([g.length],"int32",new Int32Array(g)),n.makeTensorInfo([y.length],"float32",new Float32Array(y))]}var Y3e={kernelName:$l,backendName:"webgpu",kernelFunc:Z3e};function Nm(e){let{inputs:t,backend:n}=e,{x:s}=t;if(s.dtype==="complex64"){let r=Oh({inputs:{input:s},backend:n}),a=Nm({inputs:{x:r},backend:n}),o=A2({inputs:{input:s},backend:n}),i=Nm({inputs:{x:o},backend:n}),l=cd({inputs:{real:a,imag:i},backend:n});return n.disposeData(r.dataId),n.disposeData(a.dataId),n.disposeData(o.dataId),n.disposeData(i.dataId),l}else return fu({attrs:{shape:s.shape,dtype:s.dtype,value:s.dtype==="string"?"":0},backend:n})}var J3e={kernelName:Jl,backendName:"webgpu",kernelFunc:Nm};function vT(e){let{inputs:t,backend:n}=e,{x:s}=t;if(s.dtype==="string")throw new Error("onesLike is not supported under string dtype");if(s.dtype==="complex64"){let r=Oh({inputs:{input:s},backend:n}),a=vT({inputs:{x:r},backend:n}),o=A2({inputs:{input:s},backend:n}),i=Nm({inputs:{x:o},backend:n}),l=cd({inputs:{real:a,imag:i},backend:n});return n.disposeData(r.dataId),n.disposeData(a.dataId),n.disposeData(o.dataId),n.disposeData(i.dataId),l}else return fu({attrs:{shape:s.shape,dtype:s.dtype,value:1},backend:n})}var Q3e={kernelName:Pl,backendName:"webgpu",kernelFunc:vT};function eye(e){let{inputs:t,backend:n,attrs:s}=e,{axis:r}=s;if(t.length===1)return fy({inputs:{input:t[0]},backend:n,attrs:{dim:r}});let a=t[0].shape,o=t[0].dtype;t.forEach(c=>{v.assertShapesMatch(a,c.shape,"All tensors passed to stack must have matching shapes"),v.assert(o===c.dtype,()=>"All tensors passed to stack must have matching dtypes")});let i=[],l=t.map(c=>{let p=fy({inputs:{input:c},backend:n,attrs:{dim:r}});return i.push(p),p}),u=hT({inputs:l,backend:n,attrs:{axis:r}});return i.forEach(c=>n.disposeData(c.dataId)),u}var tye={kernelName:Ol,backendName:"webgpu",kernelFunc:eye},nye=class{constructor(e,t){this.variableNames=["x"],this.uniforms="constantValue : f32,",this.workGroupSize=[64,1,1],this.size=!0,this.outputShape=t.map((n,s)=>n[0]+e[s]+n[1]),this.dispatchLayout=it(this.outputShape),this.dispatch=Be(this.dispatchLayout,this.outputShape,this.workGroupSize),t.map((n,s)=>{this.uniforms+=` pad${s} : vec2,`}),this.xShape=e,this.shaderKey="pad"}getUserCode(){let e=this.xShape.length,t=zn(e),n=this.xShape.map((c,p)=>`uniforms.pad${p}[0]`).join(","),s=this.xShape.map((c,p)=>`uniforms.pad${p}[0] + uniforms.xShape${e>1?`[${p}]`:""}`).join(","),r=e>1?`${t}(${n})`:`${n}`,a=e>1?`${t}(${s})`:`${s}`,o=e>1?"any(outC < start)":"outC < start",i=e>1?"any(outC >= end)":"outC >= end",l=e>1?["coords[0]","coords[1]","coords[2]","coords[3]"].slice(0,e):"coords";return` + ${Je("index")} { if (index < uniforms.size) { let start = ${r}; let end = ${a}; @@ -6594,8 +6683,8 @@ return a / b;`,Ble=` } } } - `}},zT=e=>{let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{paddings:a,constantValue:o}=s;if(a.every(u=>v.arraysEqual(u,[0,0])))return sr({inputs:{x:r},backend:n});if(v.sizeFromShape(r.shape)===0){let u=a.map((c,p)=>c[0]+r.shape[p]+c[1]);return vu({backend:n,attrs:{shape:u,value:o,dtype:r.dtype}})}let i=[{type:"float32",data:[o]}];a.map(u=>i.push({type:"int32",data:[u[0],u[1]]}));let l=new bye(r.shape,a);return n.runWebGPUProgram(l,[r],r.dtype,i)},vye={kernelName:Ko,backendName:"webgpu",kernelFunc:zT},wye=qn({opType:Ye.POW}),kye={kernelName:Zo,backendName:"webgpu",kernelFunc:wye};function Sye(e){let{inputs:t,backend:n}=e,{x:s,alpha:r}=t,a=new Dy(Ye.PRELU,s.shape,r.shape);return n.runWebGPUProgram(a,[s,r],"float32")}var Iye={kernelName:Yo,backendName:"webgpu",kernelFunc:Sye};function Cye(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{axis:a,keepDims:o}=s;return Zh(r,a,o,"prod",n)}var Tye={kernelName:Jo,backendName:"webgpu",kernelFunc:Cye},Nye=e=>{let{backend:t,attrs:n}=e,{start:s,stop:r,step:a,dtype:o}=n,i=E1e(s,r,a,o);return t.makeTensorInfo([i.length],o,i)},Eye={kernelName:Hc,backendName:"webgpu",kernelFunc:Nye},LT=qn({opType:Ye.DIV}),Rye={kernelName:_o,backendName:"webgpu",kernelFunc:LT},_ye=kn({opType:Oe.RECIPROCAL}),Dye={kernelName:Hl,backendName:"webgpu",kernelFunc:_ye},$ye=kn({opType:Oe.RELU}),Pye={kernelName:Qo,backendName:"webgpu",kernelFunc:$ye},Fye=kn({opType:Oe.RELU6}),Oye={kernelName:ni,backendName:"webgpu",kernelFunc:Fye},Mye=class{constructor(e,t,n){this.variableNames=["x"],this.uniforms="adjustHeightWidth : vec2, halfPixelCenters : f32,",this.workGroupSize=[64,1,1],this.size=!0,this.outputShape=[e[0],t,n,e[3]],this.dispatchLayout=lt(this.outputShape),this.dispatch=je(this.dispatchLayout,this.outputShape,this.workGroupSize),this.shaderKey="resizeBilinear"}getUserCode(){return` - ${nt("index")} { + `}},wT=e=>{let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{paddings:a,constantValue:o}=s;if(a.every(u=>v.arraysEqual(u,[0,0])))return Qs({inputs:{x:r},backend:n});if(v.sizeFromShape(r.shape)===0){let u=a.map((c,p)=>c[0]+r.shape[p]+c[1]);return fu({backend:n,attrs:{shape:u,value:o,dtype:r.dtype}})}let i=[{type:"float32",data:[o]}];a.map(u=>i.push({type:"int32",data:[u[0],u[1]]}));let l=new nye(r.shape,a);return n.runWebGPUProgram(l,[r],r.dtype,i)},sye={kernelName:jo,backendName:"webgpu",kernelFunc:wT},rye=Xn({opType:Xe.POW}),aye={kernelName:qo,backendName:"webgpu",kernelFunc:rye};function oye(e){let{inputs:t,backend:n}=e,{x:s,alpha:r}=t,a=new dy(Xe.PRELU,s.shape,r.shape);return n.runWebGPUProgram(a,[s,r],"float32")}var iye={kernelName:Xo,backendName:"webgpu",kernelFunc:oye};function lye(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{axis:a,keepDims:o}=s;return Fh(r,a,o,"prod",n)}var uye={kernelName:Ko,backendName:"webgpu",kernelFunc:lye},cye=e=>{let{backend:t,attrs:n}=e,{start:s,stop:r,step:a,dtype:o}=n,i=c1e(s,r,a,o);return t.makeTensorInfo([i.length],o,i)},dye={kernelName:$c,backendName:"webgpu",kernelFunc:cye},kT=Xn({opType:Xe.DIV}),pye={kernelName:No,backendName:"webgpu",kernelFunc:kT},hye=vn({opType:De.RECIPROCAL}),fye={kernelName:Ml,backendName:"webgpu",kernelFunc:hye},mye=vn({opType:De.RELU}),gye={kernelName:Zo,backendName:"webgpu",kernelFunc:mye},yye=vn({opType:De.RELU6}),Aye={kernelName:Qo,backendName:"webgpu",kernelFunc:yye},xye=class{constructor(e,t,n){this.variableNames=["x"],this.uniforms="adjustHeightWidth : vec2, halfPixelCenters : f32,",this.workGroupSize=[64,1,1],this.size=!0,this.outputShape=[e[0],t,n,e[3]],this.dispatchLayout=it(this.outputShape),this.dispatch=Be(this.dispatchLayout,this.outputShape,this.workGroupSize),this.shaderKey="resizeBilinear"}getUserCode(){return` + ${Je("index")} { if (index < uniforms.size) { let coords = getCoordsFromIndex(index); let b = coords[0]; @@ -6637,8 +6726,8 @@ return a / b;`,Ble=` setOutputAtIndex(index, newValue); } } - `}};function zye(e){let{inputs:t,backend:n,attrs:s}=e,{images:r}=t,{alignCorners:a,size:o,halfPixelCenters:i}=s,[l,u]=o,c=a&&l>1?1:0,p=a&&u>1?1:0,h=[{type:"float32",data:[c,p]},{type:"float32",data:[i?.5:0]}],f=new Mye(r.shape,l,u);return n.runWebGPUProgram(f,[r],"float32",h)}var Lye={kernelName:ti,backendName:"webgpu",kernelFunc:zye},Bye=class{constructor(e,t,n,s){this.variableNames=["x"],this.uniforms="adjustHeightWidth : vec2, roundBase : f32,",this.workGroupSize=[64,1,1],this.size=!0,this.outputShape=[e[0],t,n,e[3]],this.dispatchLayout=lt(this.outputShape),this.dispatch=je(this.dispatchLayout,this.outputShape,this.workGroupSize),this.halfPixelCenters=s,this.shaderKey=`resizeNearest_${s}`}getUserCode(){let e;return this.halfPixelCenters?e="max((vec2(rc) + vec2(0.5)) * effectiveInputOverOutputRatioRC, vec2(0.0))":e="vec2(rc) * effectiveInputOverOutputRatioRC",` - ${nt("index")} { + `}};function bye(e){let{inputs:t,backend:n,attrs:s}=e,{images:r}=t,{alignCorners:a,size:o,halfPixelCenters:i}=s,[l,u]=o,c=a&&l>1?1:0,p=a&&u>1?1:0,h=[{type:"float32",data:[c,p]},{type:"float32",data:[i?.5:0]}],f=new xye(r.shape,l,u);return n.runWebGPUProgram(f,[r],"float32",h)}var vye={kernelName:Jo,backendName:"webgpu",kernelFunc:bye},wye=class{constructor(e,t,n,s){this.variableNames=["x"],this.uniforms="adjustHeightWidth : vec2, roundBase : f32,",this.workGroupSize=[64,1,1],this.size=!0,this.outputShape=[e[0],t,n,e[3]],this.dispatchLayout=it(this.outputShape),this.dispatch=Be(this.dispatchLayout,this.outputShape,this.workGroupSize),this.halfPixelCenters=s,this.shaderKey=`resizeNearest_${s}`}getUserCode(){let e;return this.halfPixelCenters?e="max((vec2(rc) + vec2(0.5)) * effectiveInputOverOutputRatioRC, vec2(0.0))":e="vec2(rc) * effectiveInputOverOutputRatioRC",` + ${Je("index")} { if (index < uniforms.size) { let coords = getCoordsFromIndex(index); let b = coords[0]; @@ -6668,9 +6757,9 @@ return a / b;`,Ble=` setOutputAtIndex(index, newValue); } } - `}};function Wye(e){let{inputs:t,backend:n,attrs:s}=e,{images:r}=t,{alignCorners:a,halfPixelCenters:o,size:i}=s,[l,u]=i,c=a&&l>1?1:0,p=a&&u>1?1:0,h=[{type:"float32",data:[c,p]},{type:"float32",data:[a?.5:0]}],f=new Bye(r.shape,l,u,o);return n.runWebGPUProgram(f,[r],r.dtype,h)}var Vye={kernelName:ei,backendName:"webgpu",kernelFunc:Wye},Uye=class{constructor(e,t){this.outputShape=[],this.variableNames=["x"],this.workGroupSize=[64,1,1],this.size=!0,this.outputShape=e,this.dispatchLayout=lt(this.outputShape),this.dispatch=je(this.dispatchLayout,this.outputShape,this.workGroupSize),this.uniforms=`centerX : f32, centerY : f32, sinRadians : f32, + `}};function kye(e){let{inputs:t,backend:n,attrs:s}=e,{images:r}=t,{alignCorners:a,halfPixelCenters:o,size:i}=s,[l,u]=i,c=a&&l>1?1:0,p=a&&u>1?1:0,h=[{type:"float32",data:[c,p]},{type:"float32",data:[a?.5:0]}],f=new wye(r.shape,l,u,o);return n.runWebGPUProgram(f,[r],r.dtype,h)}var Sye={kernelName:Yo,backendName:"webgpu",kernelFunc:kye},Iye=class{constructor(e,t){this.outputShape=[],this.variableNames=["x"],this.workGroupSize=[64,1,1],this.size=!0,this.outputShape=e,this.dispatchLayout=it(this.outputShape),this.dispatch=Be(this.dispatchLayout,this.outputShape,this.workGroupSize),this.uniforms=`centerX : f32, centerY : f32, sinRadians : f32, cosRadians : f32,`,this.shaderKey="rotate",this.outputShape=e,typeof t=="number"?(this.uniforms+=" fillValue : f32,",this.fillSnippet="var outputValue = uniforms.fillValue;",this.shaderKey+="_float"):(this.uniforms+=" fillValue : vec3,",this.fillSnippet="var outputValue = uniforms.fillValue[coords[3]];",this.shaderKey+="_vec3")}getUserCode(){return` - ${nt("index")} { + ${Je("index")} { if (index < uniforms.size) { let coords = getCoordsFromIndex(index); let coordXFloat = (f32(coords[2]) - uniforms.centerX) * @@ -6689,7 +6778,7 @@ return a / b;`,Ble=` setOutputAtIndex(index, outputValue); } } - `}},Gye={kernelName:iu,backendName:"webgpu",kernelFunc:({inputs:e,attrs:t,backend:n})=>{let{image:s}=e,{radians:r,fillValue:a,center:o}=t,i=n,l=new Uye(s.shape,a),[u,c]=T.getImageCenter(o,s.shape[1],s.shape[2]),p=[{type:"float32",data:[u]},{type:"float32",data:[c]},{type:"float32",data:[Math.sin(r)]},{type:"float32",data:[Math.cos(r)]}];return typeof a=="number"?p.push({type:"float32",data:[Number.parseFloat(a.toFixed(2))]}):p.push({type:"float32",data:a}),i.runWebGPUProgram(l,[s],s.dtype,p)}},Hye=kn({opType:Oe.RSQRT,cpuKernelImpl:R1e}),jye={kernelName:si,backendName:"webgpu",kernelFunc:Hye},bm=class{constructor(e,t,n,s,r,a,o,i=!0){this.variableNames=["updates","indices"],this.workGroupSize=[64,1,1],this.atomic=!0,this.outputShape=a,this.type=o,this.sumDupeIndices=i,this.dispatchLayout=lt(e),this.dispatch=je(this.dispatchLayout,e,this.workGroupSize),this.sliceDimGreaterThanOne=t>1,this.shaderKey=`scatter_${n}_${s}_${this.sliceDimGreaterThanOne}_${o}_${i}`;let l=Mn(r.length);this.uniforms=`sliceDim : i32, strides: ${l}, size: i32,`,this.updatesRank=s,this.indicesRank=n}getUserCode(){let e="";this.indicesRank===1?e="coords[0]":this.indicesRank===2&&(e="coords[0], j");let t=`getIndices(${e})`,n=this.sliceDimGreaterThanOne?"uniforms.strides[j]":"uniforms.strides",s="",r="";this.dispatchLayout.x.length===1?(s="flattenedIndex",r=` + `}},Cye={kernelName:Ql,backendName:"webgpu",kernelFunc:({inputs:e,attrs:t,backend:n})=>{let{image:s}=e,{radians:r,fillValue:a,center:o}=t,i=n,l=new Iye(s.shape,a),[u,c]=T.getImageCenter(o,s.shape[1],s.shape[2]),p=[{type:"float32",data:[u]},{type:"float32",data:[c]},{type:"float32",data:[Math.sin(r)]},{type:"float32",data:[Math.cos(r)]}];return typeof a=="number"?p.push({type:"float32",data:[Number.parseFloat(a.toFixed(2))]}):p.push({type:"float32",data:a}),i.runWebGPUProgram(l,[s],s.dtype,p)}},Tye=vn({opType:De.RSQRT,cpuKernelImpl:d1e}),Nye={kernelName:ei,backendName:"webgpu",kernelFunc:Tye},Yf=class{constructor(e,t,n,s,r,a,o,i=!0){this.variableNames=["updates","indices"],this.workGroupSize=[64,1,1],this.atomic=!0,this.outputShape=a,this.type=o,this.sumDupeIndices=i,this.dispatchLayout=it(e),this.dispatch=Be(this.dispatchLayout,e,this.workGroupSize),this.sliceDimGreaterThanOne=t>1,this.shaderKey=`scatter_${n}_${s}_${this.sliceDimGreaterThanOne}_${o}_${i}`;let l=zn(r.length);this.uniforms=`sliceDim : i32, strides: ${l}, size: i32,`,this.updatesRank=s,this.indicesRank=n}getUserCode(){let e="";this.indicesRank===1?e="coords[0]":this.indicesRank===2&&(e="coords[0], j");let t=`getIndices(${e})`,n=this.sliceDimGreaterThanOne?"uniforms.strides[j]":"uniforms.strides",s="",r="";this.dispatchLayout.x.length===1?(s="flattenedIndex",r=` fn getUpdatesCoordsFromFlatIndex(index : i32) -> i32 { return index; } @@ -6722,7 +6811,7 @@ return a / b;`,Ble=` `);let d=`atomicStore(${u}, bitcast(${c}));`;return this.sumDupeIndices?p:d};return` ${r} - ${nt("index")} { + ${Je("index")} { if (index < uniforms.size) { let coords = getUpdatesCoordsFromFlatIndex(index); var flattenedIndex = 0; @@ -6731,13 +6820,13 @@ return a / b;`,Ble=` flattenedIndex = flattenedIndex + indexInside * ${n}; } let updateValue = - ${kp(this.type,!1)}(${o}); + ${op(this.type,!1)}(${o}); let flatIndex = getOutputIndexFromCoords(${s}); ${i("&result[flatIndex]","updateValue")}; } - }`}};function qye(e){let{inputs:t,backend:n,attrs:s}=e,{indices:r,updates:a}=t,{shape:o}=s,{sliceRank:i,numUpdates:l,sliceSize:u,strides:c,outputSize:p}=T.calculateShapes(a,r,o),d=[p/u,u];if(p===0)return n.makeTensorInfo(o,r.dtype);let h=He({inputs:{x:r},backend:n,attrs:{shape:[l,i]}}),f=He({inputs:{x:a},backend:n,attrs:{shape:[l,u]}}),m=f.dtype,g=vu({backend:n,attrs:{shape:d,value:0,dtype:m}}),y=v.sizeFromShape(f.shape),x=[{type:"int32",data:[i]},{type:"int32",data:c},{type:"int32",data:[y]}],A=new bm(f.shape,i,h.shape.length,f.shape.length,c,d,m),b=n.runWebGPUProgram(A,[f,h],m,x,g),w=He({inputs:{x:b},backend:n,attrs:{shape:o}});return n.disposeData(h.dataId),n.disposeData(f.dataId),n.disposeData(b.dataId),w}var Xye={kernelName:Kl,backendName:"webgpu",kernelFunc:qye},Kye=class{constructor(e,t,n){this.variableNames=["c","a","b"],this.workGroupSize=[64,1,1],this.size=!0,this.outputShape=t,this.dispatchLayout=lt(this.outputShape),this.dispatch=je(this.dispatchLayout,this.outputShape,this.workGroupSize),this.cRank=e,this.rank=n,this.shaderKey="select"}getUserCode(){let e,t;if(this.rank>4)throw Error(`Where for rank ${this.rank} is not yet supported`);if(this.rank===1)t="resRC",e="resRC";else{let s=["resRC.x","resRC.y","resRC.z","resRC.w"],r=[],a=[];for(let o=0;o4)throw Error(`Where for rank ${this.rank} is not yet supported`);if(this.rank===1)t="resRC",e="resRC";else{let s=["resRC.x","resRC.y","resRC.z","resRC.w"],r=[],a=[];for(let o=0;o{let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{blockShape:a,paddings:o}=s;v.assert(r.shape.length<=4,()=>"spaceToBatchND for rank > 4 with a WebGPU backend not implemented yet");let i=a.reduce((y,x)=>y*x),l=[[0,0]];l.push(...o);for(let y=1+a.length;yn.disposeData(y.dataId)),g},lAe={kernelName:Ql,backendName:"webgpu",kernelFunc:iAe},uAe=class{constructor(e,t){this.variableNames=["A"],this.workGroupSize=[64,1,1],this.size=!0;let n=new Array(e.length);for(let s=0;s{let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{blockShape:a,paddings:o}=s;v.assert(r.shape.length<=4,()=>"spaceToBatchND for rank > 4 with a WebGPU backend not implemented yet");let i=a.reduce((y,x)=>y*x),l=[[0,0]];l.push(...o);for(let y=1+a.length;yn.disposeData(y.dataId)),g},Gye={kernelName:Hl,backendName:"webgpu",kernelFunc:Uye},Hye=class{constructor(e,t){this.variableNames=["A"],this.workGroupSize=[64,1,1],this.size=!0;let n=new Array(e.length);for(let s=0;s=5)throw Error(`Tile for rank ${e} is not yet supported`);if(e===1)return`(resRC % ${t}aShape)`;let n=["resRC.x","resRC.y","resRC.z","resRC.w"],s=[];for(let r=0;r=5){let l=n.readSync(r.dataId),u=r.dtype==="string"?l.map(d=>v.decodeString(d)):l,c=Ue(r.shape,r.dtype,u),p=M1e(c,a);return n.makeTensorInfo(p.shape,p.dtype,p.values)}let o=new uAe(r.shape,a);return n.runWebGPUProgram(o,[r],r.dtype)}var dAe={kernelName:Pa,backendName:"webgpu",kernelFunc:WT};function pAe(e){let{inputs:t,backend:n,attrs:s}=e,{sparseIndices:r,sparseValues:a,defaultValue:o}=t,{outputShape:i}=s,{sliceRank:l,numUpdates:u,sliceSize:c,strides:p,outputSize:d}=T.calculateShapes(a,r,i),h=!1;if(a.dtype==="string"){let E=n.bufferSync(r),_=n.bufferSync(a),$=v.decodeString(n.readSync(o.dataId)[0]),R=_1e(E,_,i,d,c,u,l,p,$,h);return n.makeTensorInfo(i,R.dtype,R.values)}let f=[d/c,c],m=He({inputs:{x:r},backend:n,attrs:{shape:[u,l]}}),g=a.shape.length?He({inputs:{x:a},backend:n,attrs:{shape:[u,c]}}):sr({inputs:{x:a},backend:n}),y=g.dtype,x=n.makeTensorInfo([],y,v.makeZerosTypedArray(1,y)),A=He({inputs:{x:o},backend:n,attrs:{shape:Array(f.length).fill(1)}}),b=WT({inputs:{x:A},backend:n,attrs:{reps:f}}),w=v.sizeFromShape([u,c]),k=[{type:"int32",data:[l]},{type:"int32",data:p},{type:"int32",data:[w]}];switch(u){case 0:break;case 1:{let E=new bm([u,c],l,m.shape.length,g.shape.length,p,f,y,h);n.runWebGPUProgram(E,[g,m],y,k,b)}break;default:{let E=new bm([u,c],l,m.shape.length,x.shape.length,p,f,y,h);n.runWebGPUProgram(E,[x,m],y,k,b)}{let E=new bm([u,c],l,m.shape.length,g.shape.length,p,f,y);n.runWebGPUProgram(E,[g,m],y,k,b)}}let C=He({inputs:{x:b},backend:n,attrs:{shape:i}});return n.disposeData(m.dataId),n.disposeData(g.dataId),n.disposeData(A.dataId),n.disposeData(x.dataId),n.disposeData(b.dataId),C}var hAe={kernelName:rh,backendName:"webgpu",kernelFunc:pAe};function fAe(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{numOrSizeSplits:a,axis:o}=s,i=v.parseAxisParam(o,r.shape)[0],l=T.prepareSplitSize(r,a,i),u=r.shape.length,c=new Array(u).fill(0),p=r.shape.slice();return l.map(d=>{let h=[...p];h[i]=d;let f=Sd({inputs:{x:r},backend:n,attrs:{begin:c,size:h}});return c[i]+=d,f})}var mAe={kernelName:eu,backendName:"webgpu",kernelFunc:fAe},gAe=kn({opType:Oe.SQRT}),yAe={kernelName:oi,backendName:"webgpu",kernelFunc:gAe},AAe={kernelName:Zc,backendName:"webgpu",kernelFunc:({inputs:e,backend:t})=>{let{x:n}=e,s=t,r=new Kh(n.shape,Oe.SQUARE);return s.runWebGPUProgram(r,[n],n.dtype)}},xAe=qn({opType:Ye.SQUARED_DIFFERENCE}),bAe={kernelName:ui,backendName:"webgpu",kernelFunc:xAe},vAe=class{constructor(e){this.variableNames=["x"],this.workPerThread=1,this.workGroupSize=[64,1,1],this.size=!0,this.outputShape=e,this.dispatchLayout=lt(this.outputShape),this.dispatch=je(this.dispatchLayout,this.outputShape,this.workGroupSize,[this.workPerThread,1,1]);let t=Mn(this.outputShape.length);this.uniforms=`begin : ${t}, strides : ${t}, `,this.shaderKey="stridedSlice"}getUserCode(){let e=this.outputShape.length,t="";if(e===1)t="coords * uniforms.strides + uniforms.begin";else{let s=0;t=this.outputShape.map((r,a)=>(s++,this.outputShape.length===1?`coords * uniforms.strides[${a}] + uniforms.begin[${a}]`:`coords[${s-1}] * uniforms.strides[${a}] + uniforms.begin[${a}]`)).join(",")}return` - ${nt("index")} { + `}};function jye(e,t=""){if(e>=5)throw Error(`Tile for rank ${e} is not yet supported`);if(e===1)return`(resRC % ${t}aShape)`;let n=["resRC.x","resRC.y","resRC.z","resRC.w"],s=[];for(let r=0;r=5){let l=n.readSync(r.dataId),u=r.dtype==="string"?l.map(d=>v.decodeString(d)):l,c=ze(r.shape,r.dtype,u),p=A1e(c,a);return n.makeTensorInfo(p.shape,p.dtype,p.values)}let o=new Hye(r.shape,a);return n.runWebGPUProgram(o,[r],r.dtype)}var qye={kernelName:Ea,backendName:"webgpu",kernelFunc:IT};function Xye(e){let{inputs:t,backend:n,attrs:s}=e,{sparseIndices:r,sparseValues:a,defaultValue:o}=t,{outputShape:i}=s,{sliceRank:l,numUpdates:u,sliceSize:c,strides:p,outputSize:d}=T.calculateShapes(a,r,i),h=!1;if(a.dtype==="string"){let N=n.bufferSync(r),R=n.bufferSync(a),D=v.decodeString(n.readSync(o.dataId)[0]),E=p1e(N,R,i,d,c,u,l,p,D,h);return n.makeTensorInfo(i,E.dtype,E.values)}let f=[d/c,c],m=Le({inputs:{x:r},backend:n,attrs:{shape:[u,l]}}),g=a.shape.length?Le({inputs:{x:a},backend:n,attrs:{shape:[u,c]}}):Qs({inputs:{x:a},backend:n}),y=g.dtype,x=n.makeTensorInfo([],y,v.makeZerosTypedArray(1,y)),A=Le({inputs:{x:o},backend:n,attrs:{shape:Array(f.length).fill(1)}}),b=IT({inputs:{x:A},backend:n,attrs:{reps:f}}),w=v.sizeFromShape([u,c]),k=[{type:"int32",data:[l]},{type:"int32",data:p},{type:"int32",data:[w]}];switch(u){case 0:break;case 1:{let N=new Yf([u,c],l,m.shape.length,g.shape.length,p,f,y,h);n.runWebGPUProgram(N,[g,m],y,k,b)}break;default:{let N=new Yf([u,c],l,m.shape.length,x.shape.length,p,f,y,h);n.runWebGPUProgram(N,[x,m],y,k,b)}{let N=new Yf([u,c],l,m.shape.length,g.shape.length,p,f,y);n.runWebGPUProgram(N,[g,m],y,k,b)}}let C=Le({inputs:{x:b},backend:n,attrs:{shape:i}});return n.disposeData(m.dataId),n.disposeData(g.dataId),n.disposeData(A.dataId),n.disposeData(x.dataId),n.disposeData(b.dataId),C}var Kye={kernelName:Wp,backendName:"webgpu",kernelFunc:Xye};function Zye(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{numOrSizeSplits:a,axis:o}=s,i=v.parseAxisParam(o,r.shape)[0],l=T.prepareSplitSize(r,a,i),u=r.shape.length,c=new Array(u).fill(0),p=r.shape.slice();return l.map(d=>{let h=[...p];h[i]=d;let f=dd({inputs:{x:r},backend:n,attrs:{begin:c,size:h}});return c[i]+=d,f})}var Yye={kernelName:jl,backendName:"webgpu",kernelFunc:Zye},Jye=vn({opType:De.SQRT}),Qye={kernelName:si,backendName:"webgpu",kernelFunc:Jye},eAe={kernelName:zc,backendName:"webgpu",kernelFunc:({inputs:e,backend:t})=>{let{x:n}=e,s=t,r=new Ph(n.shape,De.SQUARE);return s.runWebGPUProgram(r,[n],n.dtype)}},tAe=Xn({opType:Xe.SQUARED_DIFFERENCE}),nAe={kernelName:oi,backendName:"webgpu",kernelFunc:tAe},sAe=class{constructor(e){this.variableNames=["x"],this.workPerThread=1,this.workGroupSize=[64,1,1],this.size=!0,this.outputShape=e,this.dispatchLayout=it(this.outputShape),this.dispatch=Be(this.dispatchLayout,this.outputShape,this.workGroupSize,[this.workPerThread,1,1]);let t=zn(this.outputShape.length);this.uniforms=`begin : ${t}, strides : ${t}, `,this.shaderKey="stridedSlice"}getUserCode(){let e=this.outputShape.length,t="";if(e===1)t="coords * uniforms.strides + uniforms.begin";else{let s=0;t=this.outputShape.map((r,a)=>(s++,this.outputShape.length===1?`coords * uniforms.strides[${a}] + uniforms.begin[${a}]`:`coords[${s-1}] * uniforms.strides[${a}] + uniforms.begin[${a}]`)).join(",")}return` + ${Je("index")} { if (index < uniforms.size) { let coords = getCoordsFromIndex(index); setOutputAtIndex(index, getX(${t})); } } - `}};function wAe(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{begin:a,end:o,strides:i,beginMask:l,endMask:u,ellipsisMask:c,newAxisMask:p,shrinkAxisMask:d}=s,{finalShapeSparse:h,finalShape:f,isIdentity:m,sliceDim0:g,isSimpleSlice:y,begin:x,end:A,strides:b}=jt.sliceInfo(r.shape,a,o,i,l,u,c,p,d),w;if(m)w=He({inputs:{x:r},backend:n,attrs:{shape:f}});else if(g||y){v.assert(r.shape.length>=1,()=>`Input must have rank at least 1, got: ${r.shape.length}`);let k=jt.computeOutShape(x,A,b),C=Sd({inputs:{x:r},backend:n,attrs:{begin:x,size:k}});w=He({inputs:{x:C},backend:n,attrs:{shape:f}}),n.disposeData(C.dataId)}else if(n.shouldExecuteOnCPU([r])){let C=n.readSync(r.dataId),E=Ue(r.shape,r.dtype,C),_=P1e(h,E,b,x);w=n.makeTensorInfo(f,r.dtype,_.values)}else{let C=new vAe(h),E=[{type:"int32",data:x},{type:"int32",data:b}],_=n.runWebGPUProgram(C,[r],r.dtype,E);w=He({inputs:{x:_},backend:n,attrs:{shape:f}}),n.disposeData(_.dataId)}return w}var kAe={kernelName:tu,backendName:"webgpu",kernelFunc:wAe};function SAe(e){let{inputs:t,backend:n,attrs:s}=e,{separator:r,nGramWidths:a,leftPad:o,rightPad:i,padWidth:l,preserveShortSequences:u}=s,{data:c,dataSplits:p}=t,d=n.readSync(c.dataId),h=n.readSync(p.dataId),[f,m]=F1e(d,h,r,a,o,i,l,u);return[n.makeTensorInfo([f.length],"string",f),n.makeTensorInfo(p.shape,"int32",m)]}var IAe={kernelName:Yc,backendName:"webgpu",kernelFunc:SAe},CAe=kn({opType:Oe.TANH}),TAe={kernelName:di,backendName:"webgpu",kernelFunc:CAe},NAe=class{constructor(e){this.variableNames=["x","indices"],this.workGroupSize=[256,1,1],this.size=!0,this.outputShape=e,this.dispatchLayout=lt(this.outputShape),this.dispatch=je(this.dispatchLayout,this.outputShape,this.workGroupSize),this.uniforms=`inputSize : i32, firstPass : i32, negativeInf : f32, + `}};function rAe(e){let{inputs:t,backend:n,attrs:s}=e,{x:r}=t,{begin:a,end:o,strides:i,beginMask:l,endMask:u,ellipsisMask:c,newAxisMask:p,shrinkAxisMask:d}=s,{finalShapeSparse:h,finalShape:f,isIdentity:m,sliceDim0:g,isSimpleSlice:y,begin:x,end:A,strides:b}=Gt.sliceInfo(r.shape,a,o,i,l,u,c,p,d),w;if(m)w=Le({inputs:{x:r},backend:n,attrs:{shape:f}});else if(g||y){v.assert(r.shape.length>=1,()=>`Input must have rank at least 1, got: ${r.shape.length}`);let k=Gt.computeOutShape(x,A,b),C=dd({inputs:{x:r},backend:n,attrs:{begin:x,size:k}});w=Le({inputs:{x:C},backend:n,attrs:{shape:f}}),n.disposeData(C.dataId)}else if(n.shouldExecuteOnCPU([r])){let C=n.readSync(r.dataId),N=ze(r.shape,r.dtype,C),R=m1e(h,N,b,x);w=n.makeTensorInfo(f,r.dtype,R.values)}else{let C=new sAe(h),N=[{type:"int32",data:x},{type:"int32",data:b}],R=n.runWebGPUProgram(C,[r],r.dtype,N);w=Le({inputs:{x:R},backend:n,attrs:{shape:f}}),n.disposeData(R.dataId)}return w}var aAe={kernelName:ql,backendName:"webgpu",kernelFunc:rAe};function oAe(e){let{inputs:t,backend:n,attrs:s}=e,{separator:r,nGramWidths:a,leftPad:o,rightPad:i,padWidth:l,preserveShortSequences:u}=s,{data:c,dataSplits:p}=t,d=n.readSync(c.dataId),h=n.readSync(p.dataId),[f,m]=g1e(d,h,r,a,o,i,l,u);return[n.makeTensorInfo([f.length],"string",f),n.makeTensorInfo(p.shape,"int32",m)]}var iAe={kernelName:Lc,backendName:"webgpu",kernelFunc:oAe},lAe=vn({opType:De.TANH}),uAe={kernelName:li,backendName:"webgpu",kernelFunc:lAe},cAe=class{constructor(e){this.variableNames=["x","indices"],this.workGroupSize=[256,1,1],this.size=!0,this.outputShape=e,this.dispatchLayout=it(this.outputShape),this.dispatch=Be(this.dispatchLayout,this.outputShape,this.workGroupSize),this.uniforms=`inputSize : i32, firstPass : i32, negativeInf : f32, dir : i32, inc : i32,`,this.shaderKey="swap"}getUserCode(){return` - ${nt("index")} { + ${Je("index")} { if (index < uniforms.size) { let outC = getCoordsFromIndex(index); let batch = outC[0]; @@ -6830,8 +6919,8 @@ return a / b;`,Ble=` } } } - `}},EAe=class{constructor(e){this.variableNames=["x","indices"],this.workGroupSize=[256,1,1],this.size=!0,this.outputShape=e,this.dispatchLayout=lt(this.outputShape),this.dispatch=je(this.dispatchLayout,this.outputShape,this.workGroupSize),this.uniforms="inputSize : i32, firstPass : i32, k : i32,",this.shaderKey="merge"}getUserCode(){return` - ${nt("index")} { + `}},dAe=class{constructor(e){this.variableNames=["x","indices"],this.workGroupSize=[256,1,1],this.size=!0,this.outputShape=e,this.dispatchLayout=it(this.outputShape),this.dispatch=Be(this.dispatchLayout,this.outputShape,this.workGroupSize),this.uniforms="inputSize : i32, firstPass : i32, k : i32,",this.shaderKey="merge"}getUserCode(){return` + ${Je("index")} { if (index < uniforms.size) { let outC = getCoordsFromIndex(index); let batch = outC[0]; @@ -6889,7 +6978,7 @@ return a / b;`,Ble=` } } } - `}};function ec(e,t){t!==null&&e.disposeData(t.dataId)}function x6(e){let t=1;for(;tf===null?[p,p]:[p,f],g=(w,k,C)=>{let E=m(),_=new NAe(C),R=[{type:"int32",data:[l]},{type:"int32",data:[f===null?1:0]},{type:"float32",data:[Number.NEGATIVE_INFINITY]},{type:"int32",data:[w]},{type:"int32",data:[k]}],P=f;f=n.runWebGPUProgram(_,E,"int32",R),ec(n,P)};for(let w=1;w=1;C/=2)g(k,C,[c,h])}for(let w=h;w>d;w/=2){let k=m(),C=new EAe([c,w/2]),_=[{type:"int32",data:[l]},{type:"int32",data:[f===null?1:0]},{type:"int32",data:[d]}],$=f;f=n.runWebGPUProgram(C,k,"int32",_),ec(n,$);let R=d/2,P=R*2;for(let S=R;S>=1;S/=2)g(P,S,f.shape)}let y=f;f=Sd({inputs:{x:f},backend:n,attrs:{begin:0,size:[c,a]}}),ec(n,y);let x=OT({inputs:{x:p,indices:f},backend:n,attrs:{axis:1,batchDims:1}});ec(n,p);let A=i.slice(0,-1);A.push(a),y=f,f=He({inputs:{x:f},attrs:{shape:A},backend:n}),ec(n,y);let b=x;return x=He({inputs:{x},attrs:{shape:A},backend:n}),ec(n,b),[x,f]}var _Ae={kernelName:su,backendName:"webgpu",kernelFunc:RAe},DAe=class{constructor(e){this.variableNames=["Image","Transforms"],this.uniforms="interpolationModeId : i32, fillModeId : i32, fillValue : f32,",this.workGroupSize=[64,1,1],this.size=!0,this.outputShape=e,this.dispatchLayout=lt(this.outputShape),this.dispatch=je(this.dispatchLayout,this.outputShape,this.workGroupSize),this.shaderKey="transform"}getUserCode(){return` + `}};function Vu(e,t){t!==null&&e.disposeData(t.dataId)}function Q7(e){let t=1;for(;tf===null?[p,p]:[p,f],g=(w,k,C)=>{let N=m(),R=new cAe(C),E=[{type:"int32",data:[l]},{type:"int32",data:[f===null?1:0]},{type:"float32",data:[Number.NEGATIVE_INFINITY]},{type:"int32",data:[w]},{type:"int32",data:[k]}],$=f;f=n.runWebGPUProgram(R,N,"int32",E),Vu(n,$)};for(let w=1;w=1;C/=2)g(k,C,[c,h])}for(let w=h;w>d;w/=2){let k=m(),C=new dAe([c,w/2]),R=[{type:"int32",data:[l]},{type:"int32",data:[f===null?1:0]},{type:"int32",data:[d]}],D=f;f=n.runWebGPUProgram(C,k,"int32",R),Vu(n,D);let E=d/2,$=E*2;for(let S=E;S>=1;S/=2)g($,S,f.shape)}let y=f;f=dd({inputs:{x:f},backend:n,attrs:{begin:0,size:[c,a]}}),Vu(n,y);let x=bT({inputs:{x:p,indices:f},backend:n,attrs:{axis:1,batchDims:1}});Vu(n,p);let A=i.slice(0,-1);A.push(a),y=f,f=Le({inputs:{x:f},attrs:{shape:A},backend:n}),Vu(n,y);let b=x;return x=Le({inputs:{x},attrs:{shape:A},backend:n}),Vu(n,b),[x,f]}var hAe={kernelName:Kl,backendName:"webgpu",kernelFunc:pAe},fAe=class{constructor(e){this.variableNames=["Image","Transforms"],this.uniforms="interpolationModeId : i32, fillModeId : i32, fillValue : f32,",this.workGroupSize=[64,1,1],this.size=!0,this.outputShape=e,this.dispatchLayout=it(this.outputShape),this.dispatch=Be(this.dispatchLayout,this.outputShape,this.workGroupSize),this.shaderKey="transform"}getUserCode(){return` fn mapCoord(outCoord : f32, len : f32) -> f32{ var inCoord = outCoord; if(uniforms.fillModeId == 2) { @@ -6953,7 +7042,7 @@ return a / b;`,Ble=` return outputValue; } - ${nt("index")} { + ${Je("index")} { if (index < uniforms.size) { let coords = getCoordsFromIndex(index); var outputValue : f32; @@ -7005,7 +7094,7 @@ return a / b;`,Ble=` setOutputAtIndex(index, outputValue); } } - `}};function $Ae(e){let{inputs:t,backend:n,attrs:s}=e,{image:r,transforms:a}=t,{interpolation:o,fillMode:i,fillValue:l,outputShape:u}=s,[c,p,d,h]=r.shape,[f,m]=u!=null?u:[p,d],g=[c,f,m,h],y=new DAe(g),x=o==="nearest"?1:2,A;switch(i){case"constant":A=1;break;case"reflect":A=2;break;case"wrap":A=3;break;case"nearest":A=4;break;default:A=1;break}let b=[{type:"int32",data:[x]},{type:"int32",data:[A]},{type:"float32",data:[l]}];return n.runWebGPUProgram(y,[r,a],"float32",b)}var PAe={kernelName:ru,backendName:"webgpu",kernelFunc:$Ae};function FAe(e){let{inputs:t,backend:n,attrs:s}=e,{value:r}=t,{axis:a}=s;a<0&&(a+=r.shape.length);let o=r,i=o.shape.length,l=r.shape[a],u=new Array(i-1),c=0;for(let m=0;mn.disposeData(m.dataId)),f}var OAe={kernelName:au,backendName:"webgpu",kernelFunc:FAe},MAe=[r1e,W1e,U1e,j1e,J1e,ege,nge,lge,cge,mge,xge,vge,Ige,o1e,Ege,Pge,Lge,Wge,Uge,jge,Xge,Zge,Qge,n3e,o3e,l3e,c3e,d3e,p3e,f3e,t1e,g3e,w3e,A3e,b3e,I3e,T3e,E3e,D3e,F3e,M3e,L3e,a1e,Tge,W3e,U3e,H3e,q3e,K3e,Y3e,Q3e,age,tye,sye,oge,aye,iye,uye,s3e,dye,hye,mye,gge,yye,xye,vye,kye,Iye,Tye,Eye,yge,Rye,Dye,Pye,Oye,n1e,Lye,Vye,Gye,jye,Xye,Yye,Qye,tAe,sAe,hge,kAe,IAe,oAe,lAe,hAe,mAe,yAe,AAe,bAe,rAe,r3e,TAe,dAe,_Ae,PAe,Z1e,OAe,gye];for(let e of MAe)rr(e);var zAe="3.20.0",LAe="3.20.0",BAe="3.20.0",WAe="3.20.0",VAe="3.20.0",UAe="3.20.0",GAe="3.20.0",Jh={tfjs:zAe,"tfjs-core":LAe,"tfjs-data":BAe,"tfjs-layers":WAe,"tfjs-converter":VAe,"tfjs-backend-webgl":UAe,"tfjs-backend-wasm":GAe};var VT=` + `}};function mAe(e){let{inputs:t,backend:n,attrs:s}=e,{image:r,transforms:a}=t,{interpolation:o,fillMode:i,fillValue:l,outputShape:u}=s,[c,p,d,h]=r.shape,[f,m]=u!=null?u:[p,d],g=[c,f,m,h],y=new fAe(g),x=o==="nearest"?1:2,A;switch(i){case"constant":A=1;break;case"reflect":A=2;break;case"wrap":A=3;break;case"nearest":A=4;break;default:A=1;break}let b=[{type:"int32",data:[x]},{type:"int32",data:[A]},{type:"float32",data:[l]}];return n.runWebGPUProgram(y,[r,a],"float32",b)}var gAe={kernelName:Zl,backendName:"webgpu",kernelFunc:mAe};function yAe(e){let{inputs:t,backend:n,attrs:s}=e,{value:r}=t,{axis:a}=s;a<0&&(a+=r.shape.length);let o=r,i=o.shape.length,l=r.shape[a],u=new Array(i-1),c=0;for(let m=0;mn.disposeData(m.dataId)),f}var AAe={kernelName:Yl,backendName:"webgpu",kernelFunc:yAe},xAe=[L2e,w1e,S1e,T1e,$1e,F1e,M1e,U1e,H1e,Z1e,ege,nge,oge,W2e,cge,gge,vge,kge,Ige,Nge,Rge,Dge,Fge,zge,Vge,Gge,jge,qge,Xge,Zge,O2e,Jge,r3e,e3e,n3e,i3e,u3e,d3e,f3e,y3e,x3e,v3e,B2e,lge,k3e,I3e,T3e,E3e,_3e,$3e,F3e,B1e,M3e,L3e,W1e,W3e,U3e,H3e,Lge,q3e,K3e,Y3e,Y1e,Q3e,tye,sye,aye,iye,uye,dye,J1e,pye,fye,gye,Aye,M2e,vye,Sye,Cye,Nye,Rye,$ye,Fye,Mye,Lye,X1e,aAe,iAe,Vye,Gye,Kye,Yye,Qye,eAe,nAe,Bye,Bge,uAe,qye,hAe,gAe,_1e,AAe,J3e];for(let e of xAe)er(e);var bAe="3.21.0",vAe="3.21.0",wAe="3.21.0",kAe="3.21.0",SAe="3.21.0",IAe="3.21.0",CAe="3.21.0",Mh={tfjs:bAe,"tfjs-core":vAe,"tfjs-data":wAe,"tfjs-layers":kAe,"tfjs-converter":SAe,"tfjs-backend-webgl":IAe,"tfjs-backend-wasm":CAe};var CT=` precision highp float; attribute vec2 pos; attribute vec2 uv; @@ -7015,7 +7104,7 @@ return a / b;`,Ble=` vUv = uv; gl_Position = vec4(pos.x, pos.y*flipY, 0.0, 1.); } -`;var UT=` +`;var TT=` precision highp float; varying vec2 vUv; uniform sampler2D texture; @@ -7027,7 +7116,7 @@ return a / b;`,Ble=` gl_FragColor.b = m[10] * c.r + m[11] * c.g + m[12] * c.b + m[13] * c.a + m[14]; gl_FragColor.a = m[15] * c.r + m[16] * c.g + m[17] * c.b + m[18] * c.a + m[19]; } -`,GT=` +`,NT=` precision highp float; varying vec2 vUv; uniform sampler2D texture; @@ -7039,7 +7128,7 @@ return a / b;`,Ble=` gl_FragColor.b = m[10] * c.r + m[11] * c.g + m[12] * c.b + m[14]; gl_FragColor.a = c.a; } -`,HT=` +`,ET=` precision highp float; varying vec2 vUv; uniform vec2 size; @@ -7052,7 +7141,7 @@ return a / b;`,Ble=` vec2 coord = pixelate(vUv, size); gl_FragColor += texture2D(texture, coord); } -`,jT=` +`,RT=` precision highp float; varying vec2 vUv; uniform sampler2D texture; @@ -7075,7 +7164,7 @@ return a / b;`,Ble=` gl_FragColor += texture2D(texture, vUv + vec2( 6.0*px.x, 6.0*px.y))*0.00895781211794; gl_FragColor += texture2D(texture, vUv + vec2( 7.0*px.x, 7.0*px.y))*0.0044299121055113265; } -`,qT=` +`,_T=` precision highp float; varying vec2 vUv; uniform sampler2D texture; @@ -7097,7 +7186,7 @@ return a / b;`,Ble=` c31 * m[6] + c32 * m[7] + c33 * m[8]; gl_FragColor.a = c22.a; } -`;var Tb=(e,t,n)=>{let s=new RegExp("\\b"+t+" \\w+ (\\w+)","ig");e.replace(s,(r,a)=>(n[a]=0,r))},Nb=class{constructor(t,n,s){fe(this,"uniform",{});fe(this,"attribute",{});fe(this,"gl");fe(this,"id");fe(this,"compile",(t,n)=>{let s=this.gl.createShader(n);return s?(this.gl.shaderSource(s,t),this.gl.compileShader(s),this.gl.getShaderParameter(s,this.gl.COMPILE_STATUS)?s:(ne(`filter: gl compile failed: ${this.gl.getShaderInfoLog(s)||"unknown"}`),null)):(ne("filter: could not create shader"),null)});this.gl=t;let r=this.compile(n,this.gl.VERTEX_SHADER),a=this.compile(s,this.gl.FRAGMENT_SHADER);if(this.id=this.gl.createProgram(),!(!r||!a)){if(!this.id){ne("filter: could not create webgl program");return}if(this.gl.attachShader(this.id,r),this.gl.attachShader(this.id,a),this.gl.linkProgram(this.id),!this.gl.getProgramParameter(this.id,this.gl.LINK_STATUS)){ne(`filter: gl link failed: ${this.gl.getProgramInfoLog(this.id)||"unknown"}`);return}this.gl.useProgram(this.id),Tb(n,"attribute",this.attribute);for(let o in this.attribute)this.attribute[o]=this.gl.getAttribLocation(this.id,o);Tb(n,"uniform",this.uniform),Tb(s,"uniform",this.uniform);for(let o in this.uniform)this.uniform[o]=this.gl.getUniformLocation(this.id,o)}}};function XT(){let e=0,t=null,n=!1,s=-1,r=[null,null],a=[],o=null,i=null,l=vr(100,100),u={},c={INTERMEDIATE:1},p=l.getContext("webgl");if(!p){ne("filter: cannot get webgl context");return}this.gl=p;function d(x,A){if(!(x===l.width&&A===l.height)){if(l.width=x,l.height=A,!o){let b=new Float32Array([-1,-1,0,1,1,-1,1,1,-1,1,0,0,-1,1,0,0,1,-1,1,1,1,1,1,0]);o=p.createBuffer(),p.bindBuffer(p.ARRAY_BUFFER,o),p.bufferData(p.ARRAY_BUFFER,b,p.STATIC_DRAW),p.pixelStorei(p.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0)}p.viewport(0,0,l.width,l.height),r=[null,null]}}function h(x,A){let b=p.createFramebuffer();p.bindFramebuffer(p.FRAMEBUFFER,b);let w=p.createRenderbuffer();p.bindRenderbuffer(p.RENDERBUFFER,w);let k=p.createTexture();return p.bindTexture(p.TEXTURE_2D,k),p.texImage2D(p.TEXTURE_2D,0,p.RGBA,x,A,0,p.RGBA,p.UNSIGNED_BYTE,null),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MAG_FILTER,p.LINEAR),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MIN_FILTER,p.LINEAR),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_S,p.CLAMP_TO_EDGE),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_T,p.CLAMP_TO_EDGE),p.framebufferTexture2D(p.FRAMEBUFFER,p.COLOR_ATTACHMENT0,p.TEXTURE_2D,k,0),p.bindTexture(p.TEXTURE_2D,null),p.bindFramebuffer(p.FRAMEBUFFER,null),{fbo:b,texture:k}}function f(x){return r[x]=r[x]||h(l.width,l.height),r[x]}function m(x=0){if(!i)return;let A=null,b=null,w=!1;e===0?A=t:A=f(s).texture||null,e++,n&&!(x&c.INTERMEDIATE)?(b=null,w=e%2===0):(s=(s+1)%2,b=f(s).fbo||null),p.bindTexture(p.TEXTURE_2D,A),p.bindFramebuffer(p.FRAMEBUFFER,b),p.uniform1f(i.uniform.flipY,w?-1:1),p.drawArrays(p.TRIANGLES,0,6)}function g(x){if(u[x])return i=u[x],p.useProgram((i?i.id:null)||null),i;if(i=new Nb(p,VT,x),!i)return ne("filter: could not get webgl program"),null;let A=Float32Array.BYTES_PER_ELEMENT,b=4*A;return p.enableVertexAttribArray(i.attribute.pos),p.vertexAttribPointer(i.attribute.pos,2,p.FLOAT,!1,b,0*A),p.enableVertexAttribArray(i.attribute.uv),p.vertexAttribPointer(i.attribute.uv,2,p.FLOAT,!1,b,2*A),u[x]=i,i}let y={colorMatrix:x=>{let A=new Float32Array(x);A[4]/=255,A[9]/=255,A[14]/=255,A[19]/=255;let b=A[18]===1&&A[3]===0&&A[8]===0&&A[13]===0&&A[15]===0&&A[16]===0&&A[17]===0&&A[19]===0?GT:UT,w=g(b);!w||(p.uniform1fv(w.uniform.m,A),m())},brightness:x=>{let A=(x||0)+1;y.colorMatrix([A,0,0,0,0,0,A,0,0,0,0,0,A,0,0,0,0,0,1,0])},saturation:x=>{let A=(x||0)*2/3+1,b=(A-1)*-.5;y.colorMatrix([A,b,b,0,0,b,A,b,0,0,b,b,A,0,0,0,0,0,1,0])},desaturate:()=>{y.saturation(-1)},contrast:x=>{let A=(x||0)+1,b=-128*(A-1);y.colorMatrix([A,0,0,0,b,0,A,0,0,b,0,0,A,0,b,0,0,0,1,0])},negative:()=>{y.contrast(-2)},hue:x=>{x=(x||0)/180*Math.PI;let A=Math.cos(x),b=Math.sin(x),w=.213,k=.715,C=.072;y.colorMatrix([w+A*(1-w)+b*-w,k+A*-k+b*-k,C+A*-C+b*(1-C),0,0,w+A*-w+b*.143,k+A*(1-k)+b*.14,C+A*-C+b*-.283,0,0,w+A*-w+b*-(1-w),k+A*-k+b*k,C+A*(1-C)+b*C,0,0,0,0,0,1,0])},desaturateLuminance:()=>{y.colorMatrix([.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,0,0,0,1,0])},sepia:()=>{y.colorMatrix([.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0])},brownie:()=>{y.colorMatrix([.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0])},vintagePinhole:()=>{y.colorMatrix([.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0])},kodachrome:()=>{y.colorMatrix([1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0])},technicolor:()=>{y.colorMatrix([1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0])},polaroid:()=>{y.colorMatrix([1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0])},shiftToBGR:()=>{y.colorMatrix([0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0])},convolution:x=>{let A=new Float32Array(x),b=1/l.width,w=1/l.height,k=g(qT);!k||(p.uniform1fv(k.uniform.m,A),p.uniform2f(k.uniform.px,b,w),m())},detectEdges:()=>{y.convolution.call(this,[0,1,0,1,-4,1,0,1,0])},sobelX:()=>{y.convolution.call(this,[-1,0,1,-2,0,2,-1,0,1])},sobelY:()=>{y.convolution.call(this,[-1,-2,-1,0,0,0,1,2,1])},sharpen:x=>{let A=x||1;y.convolution.call(this,[0,-1*A,0,-1*A,1+4*A,-1*A,0,-1*A,0])},emboss:x=>{let A=x||1;y.convolution.call(this,[-2*A,-1*A,0,-1*A,1,1*A,0,1*A,2*A])},blur:x=>{let A=x/7/l.width,b=x/7/l.height,w=g(jT);!w||(p.uniform2f(w.uniform.px,0,b),m(c.INTERMEDIATE),p.uniform2f(w.uniform.px,A,0),m())},pixelate:x=>{let A=x/l.width,b=x/l.height,w=g(HT);!w||(p.uniform2f(w.uniform.size,A,b),m())}};this.add=function(x){let A=Array.prototype.slice.call(arguments,1),b=y[x];a.push({func:b,args:A})},this.reset=function(){a=[]},this.get=function(){return a},this.apply=function(x){d(x.width,x.height),e=0,t||(t=p.createTexture()),p.bindTexture(p.TEXTURE_2D,t),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_S,p.CLAMP_TO_EDGE),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_T,p.CLAMP_TO_EDGE),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MIN_FILTER,p.NEAREST),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MAG_FILTER,p.NEAREST),p.texImage2D(p.TEXTURE_2D,0,p.RGBA,p.RGBA,p.UNSIGNED_BYTE,x);for(let A=0;Ah.data())),o=.99*Math.max(a[0][0],a[1][0],a[2][0]),i=[Ae(n[0],s[0]),Ae(n[1],s[1]),Ae(n[2],s[2])],l=[Ae(r[0],s[0]),Ae(r[1],s[1]),Ae(r[2],s[2])],u=[ye(o,l[0]),ye(o,l[1]),ye(o,l[2])],c=[z(i[0],u[0]),z(i[1],u[1]),z(i[2],u[2])],p=un([c[0],c[1],c[2]],2),d=V(p,[1,t.shape[0],t.shape[1],3]);return Q([...n,...s,...r,...i,...l,...u,...c,p,t]),d}var H2=3840,Dn=null,$n=null,Id=null,_t,ir={inputSum:0,cacheDiff:1,sumMethod:0,inputTensor:void 0};function Eb(){ir.inputSum=0,ir.cacheDiff=1,ir.sumMethod=0,ir.inputTensor=void 0}function vr(e,t){let n;if(me.browser)if(me.worker){if(typeof OffscreenCanvas=="undefined")throw new Error("canvas error: attempted to run in web worker but OffscreenCanvas is not supported");n=new OffscreenCanvas(e,t)}else{if(typeof document=="undefined")throw new Error("canvas error: attempted to run in browser but DOM is not defined");n=document.createElement("canvas"),n.width=e,n.height=t}else typeof me.Canvas!="undefined"?n=new me.Canvas(e,t):typeof globalThis.Canvas!="undefined"&&(n=new globalThis.Canvas(e,t));return n}function j2(e,t){let n=t||vr(e.width,e.height);return n.getContext("2d").drawImage(e,0,0),n}async function q2(e,t,n=!0){var d,h;if(!e)return t.debug&&ne("input error: input is missing"),{tensor:null,canvas:null};if(!(e instanceof it)&&!(typeof Image!="undefined"&&e instanceof Image)&&!(typeof me.Canvas!="undefined"&&e instanceof me.Canvas)&&!(typeof globalThis.Canvas!="undefined"&&e instanceof globalThis.Canvas)&&!(typeof ImageData!="undefined"&&e instanceof ImageData)&&!(typeof ImageBitmap!="undefined"&&e instanceof ImageBitmap)&&!(typeof HTMLImageElement!="undefined"&&e instanceof HTMLImageElement)&&!(typeof HTMLMediaElement!="undefined"&&e instanceof HTMLMediaElement)&&!(typeof HTMLVideoElement!="undefined"&&e instanceof HTMLVideoElement)&&!(typeof HTMLCanvasElement!="undefined"&&e instanceof HTMLCanvasElement)&&!(typeof OffscreenCanvas!="undefined"&&e instanceof OffscreenCanvas))throw new Error("input error: type is not recognized");if(e instanceof it){let f=null;if(e.isDisposedInternal)throw new Error("input error: attempted to use tensor but it is disposed");if(!e.shape)throw new Error("input error: attempted to use tensor without a shape");if(e.shape.length===3){if(e.shape[2]===3)f=Ft(e,0);else if(e.shape[2]===4){let m=yi(e,[0,0,0],[-1,-1,3]);f=Ft(m,0),Q(m)}}else e.shape.length===4&&(e.shape[3]===3?f=Gn(e):e.shape[3]===4&&(f=uo(e,[0,0,0,0],[-1,-1,-1,3])));if(f==null||f.shape.length!==4||f.shape[0]!==1||f.shape[3]!==3)throw new Error(`input error: attempted to use tensor with unrecognized shape: ${e.shape.toString()}`);if(f.dtype==="int32"){let m=ge(f,"float32");Q(f),f=m}return{tensor:f,canvas:t.filter.return?$n:null}}if(typeof e.readyState!="undefined"&&e.readyState<=2)return t.debug&&ne("input stream is not ready"),{tensor:null,canvas:Dn};let s=e.naturalWidth||e.videoWidth||e.width||e.shape&&e.shape[1]>0,r=e.naturalHeight||e.videoHeight||e.height||e.shape&&e.shape[2]>0;if(!s||!r)return t.debug&&ne("cannot determine input dimensions"),{tensor:null,canvas:Dn};let a=s,o=r;if(a>H2&&(a=H2,o=Math.trunc(a*r/s)),o>H2&&(o=H2,a=Math.trunc(o*s/r)),(((d=t.filter)==null?void 0:d.width)||0)>0?a=t.filter.width:(((h=t.filter)==null?void 0:h.height)||0)>0&&(a=s*((t.filter.height||0)/r)),(t.filter.height||0)>0?o=t.filter.height:(t.filter.width||0)>0&&(o=r*((t.filter.width||0)/s)),!a||!o)throw new Error("input error: cannot determine dimension");(!Dn||Dn.width!==a||Dn.height!==o)&&(Dn=vr(a,o));let i=Dn.getContext("2d");if(typeof ImageData!="undefined"&&e instanceof ImageData?i.putImageData(e,0,0):t.filter.flip&&typeof i.translate!="undefined"?(i.translate(s,0),i.scale(-1,1),i.drawImage(e,0,0,s,r,0,0,Dn.width,Dn.height),i.setTransform(1,0,0,1,0,0)):i.drawImage(e,0,0,s,r,0,0,Dn.width,Dn.height),(!$n||Dn.width!==$n.width||Dn.height!==$n.height)&&($n=vr(Dn.width,Dn.height)),t.filter.enabled&&me.webgl.supported?(_t||(_t=me.browser?new XT:null),me.filter=!!_t,_t!=null&&_t.add?(_t.reset(),t.filter.brightness!==0&&_t.add("brightness",t.filter.brightness),t.filter.contrast!==0&&_t.add("contrast",t.filter.contrast),t.filter.sharpness!==0&&_t.add("sharpen",t.filter.sharpness),t.filter.blur!==0&&_t.add("blur",t.filter.blur),t.filter.saturation!==0&&_t.add("saturation",t.filter.saturation),t.filter.hue!==0&&_t.add("hue",t.filter.hue),t.filter.negative&&_t.add("negative"),t.filter.sepia&&_t.add("sepia"),t.filter.vintage&&_t.add("brownie"),t.filter.sepia&&_t.add("sepia"),t.filter.kodachrome&&_t.add("kodachrome"),t.filter.technicolor&&_t.add("technicolor"),t.filter.polaroid&&_t.add("polaroid"),t.filter.pixelate!==0&&_t.add("pixelate",t.filter.pixelate),_t.get()>0?$n=_t.apply(Dn):$n=_t.draw(Dn)):(t.debug&&ne("input process error: cannot initialize filters"),me.webgl.supported=!1,t.filter.enabled=!1,j2(Dn,$n))):(j2(Dn,$n),_t&&(_t=null),me.filter=!!_t),!n)return{tensor:null,canvas:$n};if(!$n)throw new Error("canvas error: cannot create output");let l,u=3;if(typeof ImageData!="undefined"&&e instanceof ImageData||e.data&&e.width&&e.height)if(me.browser&&la)l=la?la.fromPixels(e):null;else{u=e.data.length/e.height/e.width;let f=new Uint8Array(e.data.buffer);l=Xe(f,[e.height,e.width,u],"int32")}else if((!Id||$n.width!==Id.width||$n.height!==Id.height)&&(Id=vr($n.width,$n.height)),la&&me.browser)t.backend==="webgl"||t.backend==="humangl"||t.backend==="webgpu"?l=la.fromPixels($n):(Id=j2($n),l=la.fromPixels(Id));else{let g=j2($n).getContext("2d").getImageData(0,0,a,o);u=g.data.length/a/o;let y=new Uint8Array(g.data.buffer);l=Xe(y,[a,o,u])}if(u===4){let f=yi(l,[0,0,0],[-1,-1,3]);Q(l),l=f}if(!l)throw new Error("input error: cannot create tensor");let c=ge(l,"float32"),p=t.filter.equalization?await G2(c):Ft(c,0);return Q([l,c]),{tensor:p,canvas:t.filter.return?$n:null}}async function KT(e,t){let n=!1;if(e.cacheSensitivity===0||!t.shape||t.shape.length!==4||t.shape[1]>2048||t.shape[2]>2048)return n;if(!ir.inputTensor)ir.inputTensor=Gn(t);else if(ir.inputTensor.shape[1]!==t.shape[1]||ir.inputTensor.shape[2]!==t.shape[2])Q(ir.inputTensor),ir.inputTensor=Gn(t);else{let s={};s.diff=Ae(t,ir.inputTensor),s.squared=z(s.diff,s.diff),s.sum=Se(s.squared);let a=(await s.sum.data())[0]/(t.shape[1]||1)/(t.shape[2]||1)/255/3;Q([ir.inputTensor,s.diff,s.squared,s.sum]),ir.inputTensor=Gn(t),n=a<=(e.cacheSensitivity||0)}return n}async function ZT(e,t,n){let s={};if(!t||!n||t.shape.length!==4||t.shape.length!==n.shape.length)return e.debug||ne("invalid input tensor or tensor shapes do not match:",t.shape,n.shape),0;if(t.shape[0]!==1||n.shape[0]!==1||t.shape[3]!==3||n.shape[3]!==3)return e.debug||ne("input tensors must be of shape [1, height, width, 3]:",t.shape,n.shape),0;s.input1=Gn(t),s.input2=t.shape[1]!==n.shape[1]||t.shape[2]!==n.shape[2]?Ce.resizeBilinear(n,[t.shape[1],t.shape[2]]):Gn(n),s.diff=Ae(s.input1,s.input2),s.squared=z(s.diff,s.diff),s.sum=Se(s.squared);let a=(await s.sum.data())[0]/(t.shape[1]||1)/(t.shape[2]||1)/255/3;return Q([s.input1,s.input2,s.diff,s.squared,s.sum]),a}var Qh=class{constructor(){fe(this,"browser");fe(this,"node");fe(this,"worker");fe(this,"platform","");fe(this,"agent","");fe(this,"backends",[]);fe(this,"initial");fe(this,"filter");fe(this,"tfjs");fe(this,"offscreen");fe(this,"perfadd",!1);fe(this,"tensorflow",{version:void 0,gpu:void 0});fe(this,"wasm",{supported:void 0,backend:void 0,simd:void 0,multithread:void 0});fe(this,"webgl",{supported:void 0,backend:void 0,version:void 0,renderer:void 0});fe(this,"webgpu",{supported:void 0,backend:void 0,adapter:void 0});fe(this,"cpu",{model:void 0,flags:[]});fe(this,"kernels",[]);fe(this,"Canvas");fe(this,"Image");fe(this,"ImageData");if(this.browser=typeof navigator!="undefined",this.node=typeof process!="undefined"&&typeof process.versions!="undefined"&&typeof process.versions.node!="undefined",this.tfjs={version:Jh["tfjs-core"]},this.offscreen=typeof OffscreenCanvas!="undefined",this.initial=!0,this.worker=this.browser&&this.offscreen?typeof WorkerGlobalScope!="undefined":void 0,typeof navigator!="undefined"){let t=navigator.userAgent.match(/\(([^()]+)\)/g);if(t!=null&&t[0]){let n=t[0].match(/\(([^()]+)\)/g);this.platform=n!=null&&n[0]?n[0].replace(/\(|\)/g,""):"",this.agent=navigator.userAgent.replace(t[0],""),this.platform[1]&&(this.agent=this.agent.replace(t[1],"")),this.agent=this.agent.replace(/ /g," ")}}else typeof process!="undefined"&&(this.platform=`${process.platform} ${process.arch}`,this.agent=`NodeJS ${process.version}`)}async updateBackend(){this.backends=Object.keys(Qt().registryFactory),this.tensorflow={version:Us().binding?Us().binding.TF_Version:void 0,gpu:Us().binding?Us().binding.isUsingGpuDevice():void 0},this.wasm.supported=typeof WebAssembly!="undefined",this.wasm.backend=this.backends.includes("wasm"),this.wasm.supported&&this.wasm.backend&&dn()==="wasm"&&(this.wasm.simd=H().get("WASM_HAS_SIMD_SUPPORT"),this.wasm.multithread=H().get("WASM_HAS_MULTITHREAD_SUPPORT"));let t=vr(100,100),n=t?t.getContext("webgl2"):void 0;if(this.webgl.supported=typeof n!="undefined",this.webgl.backend=this.backends.includes("webgl"),this.webgl.supported&&this.webgl.backend&&(dn()==="webgl"||dn()==="humangl")){let s=Us().gpgpu!=="undefined"?await Us().getGPGPUContext().gl:null;s&&(this.webgl.version=s.getParameter(s.VERSION),this.webgl.renderer=s.getParameter(s.RENDERER))}this.webgpu.supported=this.browser&&typeof navigator.gpu!="undefined",this.webgpu.backend=this.backends.includes("webgpu");try{if(this.webgpu.supported){let s=await navigator.gpu.requestAdapter();this.webgpu.adapter=s?s.name:void 0}}catch(s){this.webgpu.supported=!1}try{this.kernels=ra(dn()).map(s=>s.kernelName.toLowerCase())}catch(s){}}updateCPU(){let t={model:"",flags:[]};this.node&&this.platform.startsWith("linux"),this.cpu?this.cpu=t:Object.defineProperty(this,"cpu",{value:t})}},me=new Qh;var K2=class{constructor(){fe(this,"config");fe(this,"element");fe(this,"stream");fe(this,"start",async t=>{if(t!=null&&t.debug&&(this.config.debug=t==null?void 0:t.debug),t!=null&&t.crop&&(this.config.crop=t==null?void 0:t.crop),t!=null&&t.mode&&(this.config.mode=t==null?void 0:t.mode),t!=null&&t.width&&(this.config.width=t==null?void 0:t.width),t!=null&&t.height&&(this.config.height=t==null?void 0:t.height),t!=null&&t.element)if(typeof t.element=="string"){let r=document.getElementById(t.element);if(r&&r instanceof HTMLVideoElement)this.element=r;else{this.config.debug&&ne("webcam","cannot get dom element",t.element);return}}else if(t.element instanceof HTMLVideoElement)this.element=t.element;else{this.config.debug&&ne("webcam","unknown dom element",t.element);return}else this.element=document.createElement("video");let n={audio:!1,video:{facingMode:this.config.mode==="front"?"user":"environment",resizeMode:this.config.crop?"crop-and-scale":"none",width:{ideal:this.config.width>0?this.config.width:window.innerWidth},height:{ideal:this.config.height>0?this.config.height:window.innerHeight}}};if(this.element.addEventListener("play",()=>{this.config.debug&&ne("webcam","play")}),this.element.addEventListener("pause",()=>{this.config.debug&&ne("webcam","pause")}),this.element.addEventListener("click",async()=>{!this.element||!this.stream||(this.element.paused?await this.element.play():this.element.pause())}),!(navigator!=null&&navigator.mediaDevices)){this.config.debug&&ne("webcam","no devices");return}try{this.stream=await navigator.mediaDevices.getUserMedia(n)}catch(r){ne("webcam",r);return}if(!this.stream){this.config.debug&&ne("webcam","no stream");return}this.element.srcObject=this.stream,await new Promise(r=>{this.element?this.element.onloadeddata=()=>r(!0):r(!1)}),await this.element.play(),this.config.debug&&ne("webcam",{width:this.width,height:this.height,label:this.label,stream:this.stream,track:this.track,settings:this.settings,constraints:this.constraints,capabilities:this.capabilities})});fe(this,"pause",()=>{this.element&&this.element.pause()});fe(this,"play",async()=>{this.element&&await this.element.play()});fe(this,"stop",()=>{this.config.debug&&ne("webcam","stop"),this.track&&this.track.stop()});this.config={element:void 0,debug:!0,mode:"front",crop:!1,width:0,height:0}}get track(){if(!!this.stream)return this.stream.getVideoTracks()[0]}get capabilities(){if(!!this.track)return this.track.getCapabilities?this.track.getCapabilities():void 0}get constraints(){if(!!this.track)return this.track.getConstraints?this.track.getConstraints():void 0}get settings(){if(!this.stream)return;let t=this.stream.getVideoTracks()[0];return t.getSettings?t.getSettings():void 0}get label(){return this.track?this.track.label:""}get paused(){var t;return((t=this.element)==null?void 0:t.paused)||!1}get width(){var t;return((t=this.element)==null?void 0:t.videoWidth)||0}get height(){var t;return((t=this.element)==null?void 0:t.videoHeight)||0}};var Rb={};xa(Rb,{age:()=>i5e,"anti-spoofing":()=>z5e,antispoof:()=>XAe,blazeface:()=>KAe,"blazeface-back":()=>l5e,"blazeface-front":()=>u5e,"blazepose-detect":()=>M5e,"blazepose-detector2d":()=>c5e,"blazepose-detector3d":()=>d5e,"blazepose-full":()=>p5e,"blazepose-heavy":()=>h5e,"blazepose-lite":()=>f5e,default:()=>Y5e,efficientpose:()=>m5e,"efficientpose-i-lite":()=>L5e,"efficientpose-ii-lite":()=>B5e,"efficientpose-iv":()=>W5e,emotion:()=>ZAe,faceboxes:()=>g5e,facemesh:()=>YAe,"facemesh-attention":()=>A5e,"facemesh-attention-alt":()=>y5e,"facemesh-detection-full":()=>x5e,"facemesh-detection-short":()=>b5e,"facemesh-orig":()=>v5e,faceres:()=>JAe,"faceres-deep":()=>w5e,gear:()=>k5e,gender:()=>I5e,"gender-ssrnet-imdb":()=>S5e,handdetect:()=>C5e,"handlandmark-full":()=>QAe,"handlandmark-lite":()=>T5e,"handlandmark-sparse":()=>N5e,handskeleton:()=>E5e,handtrack:()=>e5e,"insightface-efficientnet-b0":()=>V5e,"insightface-ghostnet-strides1":()=>U5e,"insightface-ghostnet-strides2":()=>G5e,"insightface-mobilenet-emore":()=>H5e,"insightface-mobilenet-swish":()=>j5e,iris:()=>t5e,liveness:()=>n5e,"mb3-centernet":()=>s5e,meet:()=>R5e,mobileface:()=>_5e,mobilefacenet:()=>D5e,models:()=>r5e,"movenet-lightning":()=>a5e,"movenet-multipose":()=>$5e,"movenet-thunder":()=>P5e,nanodet:()=>F5e,"nanodet-e":()=>q5e,"nanodet-g":()=>X5e,"nanodet-m":()=>K5e,"nanodet-t":()=>Z5e,posenet:()=>O5e,selfie:()=>o5e});var XAe=853098,KAe=538928,ZAe=820516,YAe=1477958,JAe=6978814,QAe=5431368,e5e=2964837,t5e=2599092,n5e=592976,s5e=4030290,r5e=0,a5e=4650216,o5e=212886,i5e=161240,l5e=538928,u5e=402048,c5e=7499400,d5e=5928856,p5e=6338290,h5e=27501554,f5e=2725490,m5e=5651240,g5e=2013002,y5e=2387598,A5e=2382414,x5e=1026192,b5e=201268,v5e=2955780,w5e=13957620,k5e=1498916,S5e=161236,I5e=201808,C5e=3515612,T5e=2023432,N5e=5286322,E5e=5502280,R5e=372228,_5e=2183192,D5e=5171976,$5e=9448838,P5e=12477112,F5e=7574558,O5e=5032780,M5e=5928804,z5e=853098,L5e=2269064,B5e=5651240,W5e=25643252,V5e=13013224,U5e=8093408,G5e=8049584,H5e=6938536,j5e=12168584,q5e=12319156,X5e=7574558,K5e=1887474,Z5e=5294216,Y5e={antispoof:XAe,blazeface:KAe,emotion:ZAe,facemesh:YAe,faceres:JAe,"handlandmark-full":QAe,handtrack:e5e,iris:t5e,liveness:n5e,"mb3-centernet":s5e,models:r5e,"movenet-lightning":a5e,selfie:o5e,age:i5e,"blazeface-back":l5e,"blazeface-front":u5e,"blazepose-detector2d":c5e,"blazepose-detector3d":d5e,"blazepose-full":p5e,"blazepose-heavy":h5e,"blazepose-lite":f5e,efficientpose:m5e,faceboxes:g5e,"facemesh-attention-alt":y5e,"facemesh-attention":A5e,"facemesh-detection-full":x5e,"facemesh-detection-short":b5e,"facemesh-orig":v5e,"faceres-deep":w5e,gear:k5e,"gender-ssrnet-imdb":S5e,gender:I5e,handdetect:C5e,"handlandmark-lite":T5e,"handlandmark-sparse":N5e,handskeleton:E5e,meet:R5e,mobileface:_5e,mobilefacenet:D5e,"movenet-multipose":$5e,"movenet-thunder":P5e,nanodet:F5e,posenet:O5e,"blazepose-detect":M5e,"anti-spoofing":z5e,"efficientpose-i-lite":L5e,"efficientpose-ii-lite":B5e,"efficientpose-iv":W5e,"insightface-efficientnet-b0":V5e,"insightface-ghostnet-strides1":U5e,"insightface-ghostnet-strides2":G5e,"insightface-mobilenet-emore":H5e,"insightface-mobilenet-swish":j5e,"nanodet-e":q5e,"nanodet-g":X5e,"nanodet-m":K5e,"nanodet-t":Z5e};var ms={cacheModels:!0,cacheSupported:!0,verbose:!0,debug:!1,modelBasePath:""},wr={};async function J5e(e,t){return ms.debug&&ne("load model fetch:",e,t),fetch(e,t)}function YT(e){ms.cacheModels=e.cacheModels,ms.verbose=e.debug,ms.modelBasePath=e.modelBasePath}async function Ve(e){var u,c,p,d;let t=_v(ms.modelBasePath,e||"");t.toLowerCase().endsWith(".json")||(t+=".json");let n=t.includes("/")?t.split("/"):t.split("\\"),s=n[n.length-1].replace(".json",""),r="indexeddb://"+s;wr[s]={name:s,sizeFromManifest:0,sizeLoadedWeights:0,sizeDesired:Rb[s],inCache:!1},ms.cacheSupported=typeof indexedDB!="undefined";let a={};try{a=ms.cacheSupported&&ms.cacheModels?await Fs.listModels():{}}catch(h){ms.cacheSupported=!1}wr[s].inCache=ms.cacheSupported&&ms.cacheModels&&Object.keys(a).includes(r);let o=typeof fetch=="undefined"?{}:{fetchFunc:(h,f)=>J5e(h,f)},i=new Vh(wr[s].inCache?r:t,o),l=!1;try{i.findIOHandler(),ms.debug&&ne("model load handler:",i.handler)}catch(h){ne("error finding model i/o handler:",t,h)}try{let h=await((u=i.handler)==null?void 0:u.load())||null;wr[s].sizeFromManifest=((c=h==null?void 0:h.weightData)==null?void 0:c.byteLength)||0,h?i.loadSync(h):i=await Lx(wr[s].inCache?r:t,o),wr[s].sizeLoadedWeights=((d=(p=i.artifacts)==null?void 0:p.weightData)==null?void 0:d.byteLength)||0,ms.verbose&&ne("load:",{model:s,url:i.modelUrl,bytes:wr[s].sizeLoadedWeights}),l=!0}catch(h){ne("error loading model:",t,h)}if(l&&ms.cacheModels&&ms.cacheSupported&&!wr[s].inCache)try{let h=await i.save(r);ms.debug&&ne("model saved:",r,h)}catch(h){ne("error saving model:",t,h)}return i}var _b="2.11.0";var Od={};xa(Od,{Models:()=>cf,getModelStats:()=>q4,load:()=>X4,reset:()=>E1,validate:()=>_1,validateModel:()=>R1});var Sn,Z2=[],Db=Number.MAX_SAFE_INTEGER,JT=0,QT=0;async function eN(e){var t;return me.initial&&(Sn=null),Sn?e.debug&&ne("cached model:",Sn.modelUrl):Sn=await Ve((t=e.face.antispoof)==null?void 0:t.modelPath),Sn}async function $b(e,t,n,s){var o,i;if(!Sn||!(Sn!=null&&Sn.executor))return 0;let r=(((o=t.face.antispoof)==null?void 0:o.skipTime)||0)>ue()-QT,a=Db<(((i=t.face.antispoof)==null?void 0:i.skipFrames)||0);return t.skipAllowed&&r&&a&&JT===s&&Z2[n]?(Db++,Z2[n]):(Db=0,new Promise(async l=>{let u=Ce.resizeBilinear(e,[Sn!=null&&Sn.inputs[0].shape?Sn.inputs[0].shape[2]:0,Sn!=null&&Sn.inputs[0].shape?Sn.inputs[0].shape[1]:0],!1),c=Sn==null?void 0:Sn.execute(u),p=(await c.data())[0];Z2[n]=Math.round(100*p)/100,JT=s,QT=ue(),Q([u,c]),l(Z2[n])}))}var kr={silhouette:[10,338,297,332,284,251,389,356,454,323,361,288,397,365,379,378,400,377,152,148,176,149,150,136,172,58,132,93,234,127,162,21,54,103,67,109],lipsUpperOuter:[185,40,39,37,0,267,269,270,409],lipsLowerOuter:[61,146,91,181,84,17,314,405,321,375,291],lipsUpperInner:[191,80,81,82,13,312,311,310,415],lipsLowerInner:[78,95,88,178,87,14,317,402,318,324,308],lipsLowerSemiOuter:[76,77,90,180,85,16,315,404,320,307,306],lipsUpperSemiOuter:[184,74,73,72,11,302,303,304,408],lipsLowerSemiInner:[62,96,89,179,86,15,316,403,319,325,292],lipsUpperSemiInner:[183,42,41,38,12,268,271,272,407],rightEyeUpper0:[246,161,160,159,158,157,173],rightEyeLower0:[33,7,163,144,145,153,154,155,133],rightEyeUpper1:[247,30,29,27,28,56,190],rightEyeLower1:[130,25,110,24,23,22,26,112,243],rightEyeUpper2:[113,225,224,223,222,221,189],rightEyeLower2:[226,31,228,229,230,231,232,233,244],rightEyeLower3:[143,111,117,118,119,120,121,128,245],rightEyebrowUpper:[156,70,63,105,66,107,55,193],rightEyebrowLower:[35,124,46,53,52,65],rightEyeIris:[473,474,475,476,477],leftEyeUpper0:[466,388,387,386,385,384,398],leftEyeLower0:[263,249,390,373,374,380,381,382,362],leftEyeUpper1:[467,260,259,257,258,286,414],leftEyeLower1:[359,255,339,254,253,252,256,341,463],leftEyeUpper2:[342,445,444,443,442,441,413],leftEyeLower2:[446,261,448,449,450,451,452,453,464],leftEyeLower3:[372,340,346,347,348,349,350,357,465],leftEyebrowUpper:[383,300,293,334,296,336,285,417],leftEyebrowLower:[265,353,276,283,282,295],leftEyeIris:[468,469,470,471,472],midwayBetweenEyes:[168],noseTip:[1],noseBottom:[2],noseRightCorner:[98],noseLeftCorner:[327],rightCheek:[205],leftCheek:[425]},Pb={count:468,mouth:13,symmetryLine:[13,kr.midwayBetweenEyes[0]]},wu={leftEye:0,rightEye:1,nose:2,mouth:3,leftEar:4,rightEar:5,symmetryLine:[3,2]},Fb=[{key:"EyeUpper0",indices:[9,10,11,12,13,14,15]},{key:"EyeUpper1",indices:[25,26,27,28,29,30,31]},{key:"EyeUpper2",indices:[41,42,43,44,45,46,47]},{key:"EyeLower0",indices:[0,1,2,3,4,5,6,7,8]},{key:"EyeLower1",indices:[16,17,18,19,20,21,22,23,24]},{key:"EyeLower2",indices:[32,33,34,35,36,37,38,39,40]},{key:"EyeLower3",indices:[54,55,56,57,58,59,60,61,62]},{key:"EyebrowUpper",indices:[63,64,65,66,67,68,69,70]},{key:"EyebrowLower",indices:[48,49,50,51,52,53]}],ef=[[.499976992607117,.652534008026123],[.500025987625122,.547487020492554],[.499974012374878,.602371990680695],[.482113003730774,.471979022026062],[.500150978565216,.527155995368958],[.499909996986389,.498252987861633],[.499523013830185,.40106201171875],[.289712011814117,.380764007568359],[.499954998493195,.312398016452789],[.499987006187439,.269918978214264],[.500023007392883,.107050001621246],[.500023007392883,.666234016418457],[.5000159740448,.679224014282227],[.500023007392883,.692348003387451],[.499976992607117,.695277988910675],[.499976992607117,.70593398809433],[.499976992607117,.719385027885437],[.499976992607117,.737019002437592],[.499967992305756,.781370997428894],[.499816000461578,.562981009483337],[.473773002624512,.573909997940063],[.104906998574734,.254140973091125],[.365929991006851,.409575998783112],[.338757991790771,.41302502155304],[.311120003461838,.409460008144379],[.274657994508743,.389131009578705],[.393361985683441,.403706014156342],[.345234006643295,.344011008739471],[.370094001293182,.346076011657715],[.319321990013123,.347265005111694],[.297903001308441,.353591024875641],[.24779200553894,.410809993743896],[.396889001131058,.842755019664764],[.280097991228104,.375599980354309],[.106310002505779,.399955987930298],[.2099249958992,.391353011131287],[.355807989835739,.534406006336212],[.471751004457474,.65040397644043],[.474155008792877,.680191993713379],[.439785003662109,.657229006290436],[.414617002010345,.66654098033905],[.450374007225037,.680860996246338],[.428770989179611,.682690978050232],[.374971002340317,.727805018424988],[.486716985702515,.547628998756409],[.485300987958908,.527395009994507],[.257764995098114,.314490020275116],[.401223003864288,.455172002315521],[.429818987846375,.548614978790283],[.421351999044418,.533740997314453],[.276895999908447,.532056987285614],[.483370006084442,.499586999416351],[.33721199631691,.282882988452911],[.296391993761063,.293242990970612],[.169294998049736,.193813979625702],[.447580009698868,.302609980106354],[.392390012741089,.353887975215912],[.354490011930466,.696784019470215],[.067304998636246,.730105042457581],[.442739009857178,.572826027870178],[.457098007202148,.584792017936707],[.381974011659622,.694710969924927],[.392388999462128,.694203019142151],[.277076005935669,.271932005882263],[.422551989555359,.563233017921448],[.385919004678726,.281364023685455],[.383103013038635,.255840003490448],[.331431001424789,.119714021682739],[.229923993349075,.232002973556519],[.364500999450684,.189113974571228],[.229622006416321,.299540996551514],[.173287004232407,.278747975826263],[.472878992557526,.666198015213013],[.446828007698059,.668527007102966],[.422762006521225,.673889994621277],[.445307999849319,.580065965652466],[.388103008270264,.693961024284363],[.403039008378983,.706539988517761],[.403629004955292,.693953037261963],[.460041999816895,.557139039039612],[.431158006191254,.692366003990173],[.452181994915009,.692366003990173],[.475387006998062,.692366003990173],[.465828001499176,.779190003871918],[.472328990697861,.736225962638855],[.473087012767792,.717857003211975],[.473122000694275,.704625964164734],[.473033010959625,.695277988910675],[.427942007780075,.695277988910675],[.426479011774063,.703539967536926],[.423162013292313,.711845993995667],[.4183090031147,.720062971115112],[.390094995498657,.639572978019714],[.013953999616206,.560034036636353],[.499913990497589,.58014702796936],[.413199990987778,.69539999961853],[.409626007080078,.701822996139526],[.468080013990402,.601534962654114],[.422728985548019,.585985004901886],[.463079988956451,.593783974647522],[.37211999297142,.47341400384903],[.334562003612518,.496073007583618],[.411671012639999,.546965003013611],[.242175996303558,.14767599105835],[.290776997804642,.201445996761322],[.327338010072708,.256527006626129],[.399509996175766,.748921036720276],[.441727995872498,.261676013469696],[.429764986038208,.187834024429321],[.412198007106781,.108901023864746],[.288955003023148,.398952007293701],[.218936994671822,.435410976409912],[.41278201341629,.398970007896423],[.257135003805161,.355440020561218],[.427684992551804,.437960982322693],[.448339998722076,.536936044692993],[.178560003638268,.45755398273468],[.247308000922203,.457193970680237],[.286267012357712,.467674970626831],[.332827985286713,.460712015628815],[.368755996227264,.447206974029541],[.398963987827301,.432654976844788],[.476410001516342,.405806005001068],[.189241006970406,.523923993110657],[.228962004184723,.348950982093811],[.490725994110107,.562400996685028],[.404670000076294,.485132992267609],[.019469000399113,.401564002037048],[.426243007183075,.420431017875671],[.396993011236191,.548797011375427],[.266469985246658,.376977026462555],[.439121007919312,.51895797252655],[.032313998788595,.644356966018677],[.419054001569748,.387154996395111],[.462783008813858,.505746960639954],[.238978996872902,.779744982719421],[.198220998048782,.831938028335571],[.107550002634525,.540755033493042],[.183610007166862,.740257024765015],[.134409993886948,.333683013916016],[.385764002799988,.883153975009918],[.490967005491257,.579378008842468],[.382384985685349,.508572995662689],[.174399003386497,.397670984268188],[.318785011768341,.39623498916626],[.343364000320435,.400596976280212],[.396100014448166,.710216999053955],[.187885001301765,.588537991046906],[.430987000465393,.944064974784851],[.318993002176285,.898285031318665],[.266247987747192,.869701027870178],[.500023007392883,.190576016902924],[.499976992607117,.954452991485596],[.366169989109039,.398822009563446],[.393207013607025,.39553701877594],[.410373002290726,.391080021858215],[.194993004202843,.342101991176605],[.388664990663528,.362284004688263],[.365961998701096,.355970978736877],[.343364000320435,.355356991291046],[.318785011768341,.35834002494812],[.301414996385574,.363156020641327],[.058132998645306,.319076001644135],[.301414996385574,.387449026107788],[.499987989664078,.618434011936188],[.415838003158569,.624195992946625],[.445681989192963,.566076993942261],[.465844005346298,.620640993118286],[.49992299079895,.351523995399475],[.288718998432159,.819945991039276],[.335278987884521,.852819979190826],[.440512001514435,.902418971061707],[.128294005990028,.791940987110138],[.408771991729736,.373893976211548],[.455606997013092,.451801002025604],[.499877005815506,.908990025520325],[.375436991453171,.924192011356354],[.11421000212431,.615022003650665],[.448662012815475,.695277988910675],[.4480200111866,.704632043838501],[.447111994028091,.715808033943176],[.444831997156143,.730794012546539],[.430011987686157,.766808986663818],[.406787008047104,.685672998428345],[.400738000869751,.681069016456604],[.392399996519089,.677703022956848],[.367855995893478,.663918972015381],[.247923001646996,.601333022117615],[.452769994735718,.420849978923798],[.43639200925827,.359887003898621],[.416164010763168,.368713974952698],[.413385987281799,.692366003990173],[.228018000721931,.683571994304657],[.468268007040024,.352671027183533],[.411361992359161,.804327011108398],[.499989002943039,.469825029373169],[.479153990745544,.442654013633728],[.499974012374878,.439637005329132],[.432112008333206,.493588984012604],[.499886006116867,.866917014122009],[.49991300702095,.821729004383087],[.456548988819122,.819200992584229],[.344549000263214,.745438992977142],[.37890899181366,.574010014533997],[.374292999505997,.780184984207153],[.319687992334366,.570737957954407],[.357154995203018,.604269981384277],[.295284003019333,.621580958366394],[.447750002145767,.862477004528046],[.410986006259918,.508723020553589],[.31395098567009,.775308012962341],[.354128003120422,.812552988529205],[.324548006057739,.703992962837219],[.189096003770828,.646299958229065],[.279776990413666,.71465802192688],[.1338230073452,.682700991630554],[.336768001317978,.644733011722565],[.429883986711502,.466521978378296],[.455527991056442,.548622965812683],[.437114000320435,.558896005153656],[.467287987470627,.529924988746643],[.414712011814117,.335219979286194],[.37704598903656,.322777986526489],[.344107985496521,.320150971412659],[.312875986099243,.32233202457428],[.283526003360748,.333190023899078],[.241245999932289,.382785975933075],[.102986000478268,.468762993812561],[.267612010240555,.424560010433197],[.297879010438919,.433175981044769],[.333433985710144,.433878004550934],[.366427004337311,.426115989685059],[.396012008190155,.416696012020111],[.420121014118195,.41022801399231],[.007561000064015,.480777025222778],[.432949006557465,.569517970085144],[.458638995885849,.479089021682739],[.473466008901596,.545744001865387],[.476087987422943,.563830018043518],[.468472003936768,.555056989192963],[.433990985155106,.582361996173859],[.483518004417419,.562983989715576],[.482482999563217,.57784903049469],[.42645001411438,.389798998832703],[.438998997211456,.39649498462677],[.450067013502121,.400434017181396],[.289712011814117,.368252992630005],[.276670008897781,.363372981548309],[.517862021923065,.471948027610779],[.710287988185883,.380764007568359],[.526226997375488,.573909997940063],[.895093023777008,.254140973091125],[.634069979190826,.409575998783112],[.661242008209229,.41302502155304],[.688880026340485,.409460008144379],[.725341975688934,.389131009578705],[.606630027294159,.40370500087738],[.654766023159027,.344011008739471],[.629905998706818,.346076011657715],[.680678009986877,.347265005111694],[.702096998691559,.353591024875641],[.75221198797226,.410804986953735],[.602918028831482,.842862963676453],[.719901978969574,.375599980354309],[.893692970275879,.399959981441498],[.790081977844238,.391354024410248],[.643998026847839,.534487962722778],[.528249025344849,.65040397644043],[.525849997997284,.680191040039062],[.560214996337891,.657229006290436],[.585384011268616,.66654098033905],[.549625992774963,.680860996246338],[.57122802734375,.682691991329193],[.624852001667023,.72809898853302],[.513050019741058,.547281980514526],[.51509702205658,.527251958847046],[.742246985435486,.314507007598877],[.598631024360657,.454979002475739],[.570338010787964,.548575043678284],[.578631997108459,.533622980117798],[.723087012767792,.532054007053375],[.516445994377136,.499638974666595],[.662801027297974,.282917976379395],[.70362401008606,.293271005153656],[.830704987049103,.193813979625702],[.552385985851288,.302568018436432],[.607609987258911,.353887975215912],[.645429015159607,.696707010269165],[.932694971561432,.730105042457581],[.557260990142822,.572826027870178],[.542901992797852,.584792017936707],[.6180260181427,.694710969924927],[.607590973377228,.694203019142151],[.722943007946014,.271963000297546],[.577413976192474,.563166975975037],[.614082992076874,.281386971473694],[.616907000541687,.255886018276215],[.668509006500244,.119913995265961],[.770092010498047,.232020974159241],[.635536015033722,.189248979091644],[.77039098739624,.299556016921997],[.826722025871277,.278755009174347],[.527121007442474,.666198015213013],[.553171992301941,.668527007102966],[.577238023281097,.673889994621277],[.554691970348358,.580065965652466],[.611896991729736,.693961024284363],[.59696102142334,.706539988517761],[.596370995044708,.693953037261963],[.539958000183105,.557139039039612],[.568841993808746,.692366003990173],[.547818005084991,.692366003990173],[.52461302280426,.692366003990173],[.534089982509613,.779141008853912],[.527670979499817,.736225962638855],[.526912987232208,.717857003211975],[.526877999305725,.704625964164734],[.526966989040375,.695277988910675],[.572058022022247,.695277988910675],[.573521018028259,.703539967536926],[.57683801651001,.711845993995667],[.581691026687622,.720062971115112],[.609944999217987,.639909982681274],[.986046016216278,.560034036636353],[.5867999792099,.69539999961853],[.590372025966644,.701822996139526],[.531915009021759,.601536989212036],[.577268004417419,.585934996604919],[.536915004253387,.593786001205444],[.627542972564697,.473352015018463],[.665585994720459,.495950996875763],[.588353991508484,.546862006187439],[.757824003696442,.14767599105835],[.709249973297119,.201507985591888],[.672684013843536,.256581008434296],[.600408971309662,.74900496006012],[.55826598405838,.261672019958496],[.570303976535797,.187870979309082],[.588165998458862,.109044015407562],[.711045026779175,.398952007293701],[.781069993972778,.435405015945435],[.587247014045715,.398931980133057],[.742869973182678,.355445981025696],[.572156012058258,.437651991844177],[.55186802148819,.536570012569427],[.821442008018494,.457556009292603],[.752701997756958,.457181990146637],[.71375697851181,.467626988887787],[.66711300611496,.460672974586487],[.631101012229919,.447153985500336],[.6008620262146,.432473003864288],[.523481011390686,.405627012252808],[.810747981071472,.523926019668579],[.771045982837677,.348959028720856],[.509127020835876,.562718033790588],[.595292985439301,.485023975372314],[.980530977249146,.401564002037048],[.573499977588654,.420000016689301],[.602994978427887,.548687994480133],[.733529984951019,.376977026462555],[.560611009597778,.519016981124878],[.967685997486115,.644356966018677],[.580985009670258,.387160003185272],[.537728011608124,.505385041236877],[.760966002941132,.779752969741821],[.801778972148895,.831938028335571],[.892440974712372,.54076099395752],[.816350996494293,.740260004997253],[.865594983100891,.333687007427216],[.614073991775513,.883246004581451],[.508952975273132,.579437971115112],[.617941975593567,.508316040039062],[.825608015060425,.397674977779388],[.681214988231659,.39623498916626],[.656635999679565,.400596976280212],[.603900015354156,.710216999053955],[.81208598613739,.588539004325867],[.56801301240921,.944564998149872],[.681007981300354,.898285031318665],[.733752012252808,.869701027870178],[.633830010890961,.398822009563446],[.606792986392975,.39553701877594],[.589659988880157,.391062021255493],[.805015981197357,.342108011245728],[.611334979534149,.362284004688263],[.634037971496582,.355970978736877],[.656635999679565,.355356991291046],[.681214988231659,.35834002494812],[.698584973812103,.363156020641327],[.941866993904114,.319076001644135],[.698584973812103,.387449026107788],[.584177017211914,.624107003211975],[.554318010807037,.566076993942261],[.534153997898102,.62064003944397],[.711217999458313,.819975018501282],[.664629995822906,.852871000766754],[.559099972248077,.902631998062134],[.871706008911133,.791940987110138],[.591234028339386,.373893976211548],[.544341027736664,.451583981513977],[.624562978744507,.924192011356354],[.88577002286911,.615028977394104],[.551338016986847,.695277988910675],[.551980018615723,.704632043838501],[.552887976169586,.715808033943176],[.555167973041534,.730794012546539],[.569944024085999,.767035007476807],[.593203008174896,.685675978660583],[.599261999130249,.681069016456604],[.607599973678589,.677703022956848],[.631937980651855,.663500010967255],[.752032995223999,.601315021514893],[.547226011753082,.420395016670227],[.563543975353241,.359827995300293],[.583841025829315,.368713974952698],[.586614012718201,.692366003990173],[.771915018558502,.683578014373779],[.531597018241882,.352482974529266],[.588370978832245,.804440975189209],[.52079701423645,.442565023899078],[.567984998226166,.493479013442993],[.543282985687256,.819254994392395],[.655317008495331,.745514988899231],[.621008992195129,.574018001556396],[.625559985637665,.78031200170517],[.680198013782501,.570719003677368],[.64276397228241,.604337990283966],[.704662978649139,.621529996395111],[.552012026309967,.862591981887817],[.589071989059448,.508637011051178],[.685944974422455,.775357007980347],[.645735025405884,.812640011310577],[.675342977046967,.703978002071381],[.810858011245728,.646304965019226],[.72012197971344,.714666962623596],[.866151988506317,.682704985141754],[.663187026977539,.644596993923187],[.570082008838654,.466325998306274],[.544561982154846,.548375964164734],[.562758982181549,.558784961700439],[.531987011432648,.530140042304993],[.585271000862122,.335177004337311],[.622952997684479,.32277899980545],[.655896008014679,.320163011550903],[.687132000923157,.322345972061157],[.716481983661652,.333200991153717],[.758756995201111,.382786989212036],[.897013008594513,.468769013881683],[.732392013072968,.424547016620636],[.70211398601532,.433162987232208],[.66652500629425,.433866024017334],[.633504986763,.426087975502014],[.603875994682312,.416586995124817],[.579657971858978,.409945011138916],[.992439985275269,.480777025222778],[.567192018032074,.569419980049133],[.54136598110199,.478899002075195],[.526564002037048,.546118021011353],[.523913025856018,.563830018043518],[.531529009342194,.555056989192963],[.566035985946655,.582329034805298],[.51631098985672,.563053965568542],[.5174720287323,.577877044677734],[.573594987392426,.389806985855103],[.560697972774506,.395331978797913],[.549755990505219,.399751007556915],[.710287988185883,.368252992630005],[.723330020904541,.363372981548309]],ku=[127,34,139,11,0,37,232,231,120,72,37,39,128,121,47,232,121,128,104,69,67,175,171,148,157,154,155,118,50,101,73,39,40,9,151,108,48,115,131,194,204,211,74,40,185,80,42,183,40,92,186,230,229,118,202,212,214,83,18,17,76,61,146,160,29,30,56,157,173,106,204,194,135,214,192,203,165,98,21,71,68,51,45,4,144,24,23,77,146,91,205,50,187,201,200,18,91,106,182,90,91,181,85,84,17,206,203,36,148,171,140,92,40,39,193,189,244,159,158,28,247,246,161,236,3,196,54,68,104,193,168,8,117,228,31,189,193,55,98,97,99,126,47,100,166,79,218,155,154,26,209,49,131,135,136,150,47,126,217,223,52,53,45,51,134,211,170,140,67,69,108,43,106,91,230,119,120,226,130,247,63,53,52,238,20,242,46,70,156,78,62,96,46,53,63,143,34,227,173,155,133,123,117,111,44,125,19,236,134,51,216,206,205,154,153,22,39,37,167,200,201,208,36,142,100,57,212,202,20,60,99,28,158,157,35,226,113,160,159,27,204,202,210,113,225,46,43,202,204,62,76,77,137,123,116,41,38,72,203,129,142,64,98,240,49,102,64,41,73,74,212,216,207,42,74,184,169,170,211,170,149,176,105,66,69,122,6,168,123,147,187,96,77,90,65,55,107,89,90,180,101,100,120,63,105,104,93,137,227,15,86,85,129,102,49,14,87,86,55,8,9,100,47,121,145,23,22,88,89,179,6,122,196,88,95,96,138,172,136,215,58,172,115,48,219,42,80,81,195,3,51,43,146,61,171,175,199,81,82,38,53,46,225,144,163,110,246,33,7,52,65,66,229,228,117,34,127,234,107,108,69,109,108,151,48,64,235,62,78,191,129,209,126,111,35,143,163,161,246,117,123,50,222,65,52,19,125,141,221,55,65,3,195,197,25,7,33,220,237,44,70,71,139,122,193,245,247,130,33,71,21,162,153,158,159,170,169,150,188,174,196,216,186,92,144,160,161,2,97,167,141,125,241,164,167,37,72,38,12,145,159,160,38,82,13,63,68,71,226,35,111,158,153,154,101,50,205,206,92,165,209,198,217,165,167,97,220,115,218,133,112,243,239,238,241,214,135,169,190,173,133,171,208,32,125,44,237,86,87,178,85,86,179,84,85,180,83,84,181,201,83,182,137,93,132,76,62,183,61,76,184,57,61,185,212,57,186,214,207,187,34,143,156,79,239,237,123,137,177,44,1,4,201,194,32,64,102,129,213,215,138,59,166,219,242,99,97,2,94,141,75,59,235,24,110,228,25,130,226,23,24,229,22,23,230,26,22,231,112,26,232,189,190,243,221,56,190,28,56,221,27,28,222,29,27,223,30,29,224,247,30,225,238,79,20,166,59,75,60,75,240,147,177,215,20,79,166,187,147,213,112,233,244,233,128,245,128,114,188,114,217,174,131,115,220,217,198,236,198,131,134,177,132,58,143,35,124,110,163,7,228,110,25,356,389,368,11,302,267,452,350,349,302,303,269,357,343,277,452,453,357,333,332,297,175,152,377,384,398,382,347,348,330,303,304,270,9,336,337,278,279,360,418,262,431,304,408,409,310,415,407,270,409,410,450,348,347,422,430,434,313,314,17,306,307,375,387,388,260,286,414,398,335,406,418,364,367,416,423,358,327,251,284,298,281,5,4,373,374,253,307,320,321,425,427,411,421,313,18,321,405,406,320,404,405,315,16,17,426,425,266,377,400,369,322,391,269,417,465,464,386,257,258,466,260,388,456,399,419,284,332,333,417,285,8,346,340,261,413,441,285,327,460,328,355,371,329,392,439,438,382,341,256,429,420,360,364,394,379,277,343,437,443,444,283,275,440,363,431,262,369,297,338,337,273,375,321,450,451,349,446,342,467,293,334,282,458,461,462,276,353,383,308,324,325,276,300,293,372,345,447,382,398,362,352,345,340,274,1,19,456,248,281,436,427,425,381,256,252,269,391,393,200,199,428,266,330,329,287,273,422,250,462,328,258,286,384,265,353,342,387,259,257,424,431,430,342,353,276,273,335,424,292,325,307,366,447,345,271,303,302,423,266,371,294,455,460,279,278,294,271,272,304,432,434,427,272,407,408,394,430,431,395,369,400,334,333,299,351,417,168,352,280,411,325,319,320,295,296,336,319,403,404,330,348,349,293,298,333,323,454,447,15,16,315,358,429,279,14,15,316,285,336,9,329,349,350,374,380,252,318,402,403,6,197,419,318,319,325,367,364,365,435,367,397,344,438,439,272,271,311,195,5,281,273,287,291,396,428,199,311,271,268,283,444,445,373,254,339,263,466,249,282,334,296,449,347,346,264,447,454,336,296,299,338,10,151,278,439,455,292,407,415,358,371,355,340,345,372,390,249,466,346,347,280,442,443,282,19,94,370,441,442,295,248,419,197,263,255,359,440,275,274,300,383,368,351,412,465,263,467,466,301,368,389,380,374,386,395,378,379,412,351,419,436,426,322,373,390,388,2,164,393,370,462,461,164,0,267,302,11,12,374,373,387,268,12,13,293,300,301,446,261,340,385,384,381,330,266,425,426,423,391,429,355,437,391,327,326,440,457,438,341,382,362,459,457,461,434,430,394,414,463,362,396,369,262,354,461,457,316,403,402,315,404,403,314,405,404,313,406,405,421,418,406,366,401,361,306,408,407,291,409,408,287,410,409,432,436,410,434,416,411,264,368,383,309,438,457,352,376,401,274,275,4,421,428,262,294,327,358,433,416,367,289,455,439,462,370,326,2,326,370,305,460,455,254,449,448,255,261,446,253,450,449,252,451,450,256,452,451,341,453,452,413,464,463,441,413,414,258,442,441,257,443,442,259,444,443,260,445,444,467,342,445,459,458,250,289,392,290,290,328,460,376,433,435,250,290,392,411,416,433,341,463,464,453,464,465,357,465,412,343,412,399,360,363,440,437,399,456,420,456,363,401,435,288,372,383,353,339,255,249,448,261,255,133,243,190,133,155,112,33,246,247,33,130,25,398,384,286,362,398,414,362,463,341,263,359,467,263,249,255,466,467,260,75,60,166,238,239,79,162,127,139,72,11,37,121,232,120,73,72,39,114,128,47,233,232,128,103,104,67,152,175,148,173,157,155,119,118,101,74,73,40,107,9,108,49,48,131,32,194,211,184,74,185,191,80,183,185,40,186,119,230,118,210,202,214,84,83,17,77,76,146,161,160,30,190,56,173,182,106,194,138,135,192,129,203,98,54,21,68,5,51,4,145,144,23,90,77,91,207,205,187,83,201,18,181,91,182,180,90,181,16,85,17,205,206,36,176,148,140,165,92,39,245,193,244,27,159,28,30,247,161,174,236,196,103,54,104,55,193,8,111,117,31,221,189,55,240,98,99,142,126,100,219,166,218,112,155,26,198,209,131,169,135,150,114,47,217,224,223,53,220,45,134,32,211,140,109,67,108,146,43,91,231,230,120,113,226,247,105,63,52,241,238,242,124,46,156,95,78,96,70,46,63,116,143,227,116,123,111,1,44,19,3,236,51,207,216,205,26,154,22,165,39,167,199,200,208,101,36,100,43,57,202,242,20,99,56,28,157,124,35,113,29,160,27,211,204,210,124,113,46,106,43,204,96,62,77,227,137,116,73,41,72,36,203,142,235,64,240,48,49,64,42,41,74,214,212,207,183,42,184,210,169,211,140,170,176,104,105,69,193,122,168,50,123,187,89,96,90,66,65,107,179,89,180,119,101,120,68,63,104,234,93,227,16,15,85,209,129,49,15,14,86,107,55,9,120,100,121,153,145,22,178,88,179,197,6,196,89,88,96,135,138,136,138,215,172,218,115,219,41,42,81,5,195,51,57,43,61,208,171,199,41,81,38,224,53,225,24,144,110,105,52,66,118,229,117,227,34,234,66,107,69,10,109,151,219,48,235,183,62,191,142,129,126,116,111,143,7,163,246,118,117,50,223,222,52,94,19,141,222,221,65,196,3,197,45,220,44,156,70,139,188,122,245,139,71,162,145,153,159,149,170,150,122,188,196,206,216,92,163,144,161,164,2,167,242,141,241,0,164,37,11,72,12,144,145,160,12,38,13,70,63,71,31,226,111,157,158,154,36,101,205,203,206,165,126,209,217,98,165,97,237,220,218,237,239,241,210,214,169,140,171,32,241,125,237,179,86,178,180,85,179,181,84,180,182,83,181,194,201,182,177,137,132,184,76,183,185,61,184,186,57,185,216,212,186,192,214,187,139,34,156,218,79,237,147,123,177,45,44,4,208,201,32,98,64,129,192,213,138,235,59,219,141,242,97,97,2,141,240,75,235,229,24,228,31,25,226,230,23,229,231,22,230,232,26,231,233,112,232,244,189,243,189,221,190,222,28,221,223,27,222,224,29,223,225,30,224,113,247,225,99,60,240,213,147,215,60,20,166,192,187,213,243,112,244,244,233,245,245,128,188,188,114,174,134,131,220,174,217,236,236,198,134,215,177,58,156,143,124,25,110,7,31,228,25,264,356,368,0,11,267,451,452,349,267,302,269,350,357,277,350,452,357,299,333,297,396,175,377,381,384,382,280,347,330,269,303,270,151,9,337,344,278,360,424,418,431,270,304,409,272,310,407,322,270,410,449,450,347,432,422,434,18,313,17,291,306,375,259,387,260,424,335,418,434,364,416,391,423,327,301,251,298,275,281,4,254,373,253,375,307,321,280,425,411,200,421,18,335,321,406,321,320,405,314,315,17,423,426,266,396,377,369,270,322,269,413,417,464,385,386,258,248,456,419,298,284,333,168,417,8,448,346,261,417,413,285,326,327,328,277,355,329,309,392,438,381,382,256,279,429,360,365,364,379,355,277,437,282,443,283,281,275,363,395,431,369,299,297,337,335,273,321,348,450,349,359,446,467,283,293,282,250,458,462,300,276,383,292,308,325,283,276,293,264,372,447,346,352,340,354,274,19,363,456,281,426,436,425,380,381,252,267,269,393,421,200,428,371,266,329,432,287,422,290,250,328,385,258,384,446,265,342,386,387,257,422,424,430,445,342,276,422,273,424,306,292,307,352,366,345,268,271,302,358,423,371,327,294,460,331,279,294,303,271,304,436,432,427,304,272,408,395,394,431,378,395,400,296,334,299,6,351,168,376,352,411,307,325,320,285,295,336,320,319,404,329,330,349,334,293,333,366,323,447,316,15,315,331,358,279,317,14,316,8,285,9,277,329,350,253,374,252,319,318,403,351,6,419,324,318,325,397,367,365,288,435,397,278,344,439,310,272,311,248,195,281,375,273,291,175,396,199,312,311,268,276,283,445,390,373,339,295,282,296,448,449,346,356,264,454,337,336,299,337,338,151,294,278,455,308,292,415,429,358,355,265,340,372,388,390,466,352,346,280,295,442,282,354,19,370,285,441,295,195,248,197,457,440,274,301,300,368,417,351,465,251,301,389,385,380,386,394,395,379,399,412,419,410,436,322,387,373,388,326,2,393,354,370,461,393,164,267,268,302,12,386,374,387,312,268,13,298,293,301,265,446,340,380,385,381,280,330,425,322,426,391,420,429,437,393,391,326,344,440,438,458,459,461,364,434,394,428,396,262,274,354,457,317,316,402,316,315,403,315,314,404,314,313,405,313,421,406,323,366,361,292,306,407,306,291,408,291,287,409,287,432,410,427,434,411,372,264,383,459,309,457,366,352,401,1,274,4,418,421,262,331,294,358,435,433,367,392,289,439,328,462,326,94,2,370,289,305,455,339,254,448,359,255,446,254,253,449,253,252,450,252,256,451,256,341,452,414,413,463,286,441,414,286,258,441,258,257,442,257,259,443,259,260,444,260,467,445,309,459,250,305,289,290,305,290,460,401,376,435,309,250,392,376,411,433,453,341,464,357,453,465,343,357,412,437,343,399,344,360,440,420,437,456,360,420,363,361,401,288,265,372,353,390,339,249,339,448,255];var txe=[127,234,132,58,172,150,149,148,152,377,378,379,397,288,361,454,356,70,63,105,66,107,336,296,334,293,300,168,6,195,4,98,97,2,326,327,33,160,158,133,153,144,362,385,387,263,373,380,57,40,37,0,267,270,287,321,314,17,84,91,78,81,13,311,308,402,14,178],nxe=[33,133,362,263,1,62,308,159,145,386,374,6,102,331,2,13,14,70,105,107,336,334,300,54,10,284,50,280,234,454,58,288,152],sxe=[33,133,362,263,1,78,308],rSe=txe.map(e=>ef[e]),aSe=nxe.map(e=>ef[e]),oSe=sxe.map(e=>ef[e]);function ki(e){let t=e.map(n=>n[0]);return t.push(e[e.length-1][1]),t}var rxe=[[61,146],[146,91],[91,181],[181,84],[84,17],[17,314],[314,405],[405,321],[321,375],[375,291],[61,185],[185,40],[40,39],[39,37],[37,0],[0,267],[267,269],[269,270],[270,409],[409,291],[78,95],[95,88],[88,178],[178,87],[87,14],[14,317],[317,402],[402,318],[318,324],[324,308],[78,191],[191,80],[80,81],[81,82],[82,13],[13,312],[312,311],[311,310],[310,415],[415,308]],axe=[[263,249],[249,390],[390,373],[373,374],[374,380],[380,381],[381,382],[382,362],[263,466],[466,388],[388,387],[387,386],[386,385],[385,384],[384,398],[398,362]],oxe=[[276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]],ixe=[[474,475],[475,476],[476,477],[477,474]],lxe=[[33,7],[7,163],[163,144],[144,145],[145,153],[153,154],[154,155],[155,133],[33,246],[246,161],[161,160],[160,159],[159,158],[158,157],[157,173],[173,133]],uxe=[[46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]],cxe=[[469,470],[470,471],[471,472],[472,469]],dxe=[[10,338],[338,297],[297,332],[332,284],[284,251],[251,389],[389,356],[356,454],[454,323],[323,361],[361,288],[288,397],[397,365],[365,379],[379,378],[378,400],[400,377],[377,152],[152,148],[148,176],[176,149],[149,150],[150,136],[136,172],[172,58],[58,132],[132,93],[93,234],[234,127],[127,162],[162,21],[21,54],[54,103],[103,67],[67,109],[109,10]],iSe={lips:ki(rxe),leftEye:ki(axe),leftEyebrow:ki(oxe),leftIris:ki(ixe),rightEye:ki(lxe),rightEyebrow:ki(uxe),rightIris:ki(cxe),faceOval:ki(dxe)};var Ze={tf255:255,tf1:1,tf2:2,tf05:.5,tf127:127.5,rgb:[.2989,.587,.114]};function nN(){Ze.tf255=Te(255,"float32"),Ze.tf1=Te(1,"float32"),Ze.tf2=Te(2,"float32"),Ze.tf05=Te(.5,"float32"),Ze.tf127=Te(127.5,"float32"),Ze.rgb=Ot([.2989,.587,.114],"float32")}var Cd=e=>[Math.abs(e.endPoint[0]-e.startPoint[0]),Math.abs(e.endPoint[1]-e.startPoint[1])],Y2=e=>[e.startPoint[0]+(e.endPoint[0]-e.startPoint[0])/2,e.startPoint[1]+(e.endPoint[1]-e.startPoint[1])/2,1],J2=(e,t)=>e?[Math.trunc(Math.max(0,e.startPoint[0])),Math.trunc(Math.max(0,e.startPoint[1])),Math.trunc(Math.min(t.shape[2]||0,e.endPoint[0])-Math.max(0,e.startPoint[0])),Math.trunc(Math.min(t.shape[1]||0,e.endPoint[1])-Math.max(0,e.startPoint[1]))]:[0,0,0,0],Q2=(e,t)=>e?[e.startPoint[0]/(t.shape[2]||0),e.startPoint[1]/(t.shape[1]||0),(e.endPoint[0]-e.startPoint[0])/(t.shape[2]||0),(e.endPoint[1]-e.startPoint[1])/(t.shape[1]||0)]:[0,0,0,0],aN=(e,t)=>{let n=[e.startPoint[0]*t[0],e.startPoint[1]*t[1]],s=[e.endPoint[0]*t[0],e.endPoint[1]*t[1]];return{startPoint:n,endPoint:s,landmarks:e.landmarks,confidence:e.confidence}},Mb=(e,t,n)=>{let s=t.shape[1],r=t.shape[2],a=[e.startPoint[1]/s,e.startPoint[0]/r,e.endPoint[1]/s,e.endPoint[0]/r],o=Ce.cropAndResize(t,[a],[0],n),i=ye(o,Ze.tf255);return Q(o),i},e1=(e,t)=>{let n=Y2(e),s=Cd(e),r=[t*s[0]/2,t*s[1]/2];return{startPoint:[n[0]-r[0],n[1]-r[1]],endPoint:[n[0]+r[0],n[1]+r[1]],landmarks:e.landmarks,confidence:e.confidence}},t1=e=>{let t=Y2(e),n=Cd(e),s=Math.max(...n)/2;return{startPoint:[Math.round(t[0]-s),Math.round(t[1]-s)],endPoint:[Math.round(t[0]+s),Math.round(t[1]+s)],landmarks:e.landmarks,confidence:e.confidence}},oN=e=>{let t=e.map(s=>s[0]),n=e.map(s=>s[1]);return{startPoint:[Math.min(...t),Math.min(...n)],endPoint:[Math.max(...t),Math.max(...n)],landmarks:e}},zb=[[1,0,0],[0,1,0],[0,0,1]],hxe=e=>e-2*Math.PI*Math.floor((e+Math.PI)/(2*Math.PI)),fxe=(e,t)=>hxe(Math.PI/2-Math.atan2(-(t[1]-e[1]),t[0]-e[0]));var sN=(e,t)=>[[1,0,e],[0,1,t],[0,0,1]],Su=(e,t)=>{let n=0;for(let s=0;s{let n=[];for(let s=0;s{let n=[],s=e.length;for(let r=0;r{let n=Math.cos(e),s=Math.sin(e),r=[[n,-s,0],[s,n,0],[0,0,1]],a=sN(t[0],t[1]),o=rN(a,r),i=sN(-t[0],-t[1]);return rN(o,i)},gxe=e=>{let t=[[e[0][0],e[1][0]],[e[0][1],e[1][1]]],n=[e[0][2],e[1][2]],s=[-Su(t[0],n),-Su(t[1],n)];return[t[0].concat(s[0]),t[1].concat(s[1]),[0,0,1]]},yxe=(e,t)=>[Su(e,t[0]),Su(e,t[1])];function lN(e){let t=e===192?{strides:[4],anchors:[1]}:{strides:[e/16,e/8],anchors:[2,6]},n=[];for(let s=0;s[a[0]/r*(h[0]-r/2),a[1]/r*(h[1]-r/2),h[2]||0]),i=n&&n!==0&&Math.abs(n)>.2,l=i?iN(n,[0,0]):zb,u=i?o.map(h=>[...yxe(h,l),h[2]]):o,c=i?gxe(s):zb,p=Y2(t),d=[Su(p,c[0]),Su(p,c[1])];return u.map(h=>[Math.trunc(h[0]+d[0]),Math.trunc(h[1]+d[1]),Math.trunc(h[2]||0)])}function cN(e,t,n,s){let r=t.landmarks.length>=Pb.count?Pb.symmetryLine:wu.symmetryLine,a=0,o=zb,i;if(e&&me.kernels.includes("rotatewithoffset"))if(a=fxe(t.landmarks[r[0]],t.landmarks[r[1]]),a&&a!==0&&Math.abs(a)>.2){let u=Y2(t),c=[u[0]/n.shape[2],u[1]/n.shape[1]],p=Ce.rotateWithOffset(n,a,0,c);o=iN(-a,u),i=Mb(t,p,[s,s]),Q(p)}else i=Mb(t,n,[s,s]);else i=Mb(t,n,[s,s]);return[a,o,i]}var Axe=e=>{let t=e.map(s=>s[0]),n=e.map(s=>s[1]);return[Math.min(...t)+(Math.max(...t)-Math.min(...t))/2,Math.min(...n)+(Math.max(...n)-Math.min(...n))/2]},dN=(e,t)=>{let n=Axe(e),s=Cd(t);return{startPoint:[n[0]-s[0]/2,n[1]-s[1]/2],endPoint:[n[0]+s[0]/2,n[1]+s[1]/2]}};var pN=6,xxe=1.4,jr,hN=null,Si=0,tf=null,Td=()=>Si;async function fN(e){var t;return me.initial&&(jr=null),jr?e.debug&&ne("cached model:",jr.modelUrl):jr=await Ve((t=e.face.detector)==null?void 0:t.modelPath),Si=jr.executor&&jr.inputs[0].shape?jr.inputs[0].shape[2]:256,tf=Te(Si,"int32"),hN=mr(lN(Si)),jr}function bxe(e){let t={};t.boxStarts=Le(e,[0,1],[-1,2]),t.centers=de(t.boxStarts,hN),t.boxSizes=Le(e,[0,3],[-1,2]),t.boxSizesNormalized=ye(t.boxSizes,tf),t.centersNormalized=ye(t.centers,tf),t.halfBoxSize=ye(t.boxSizesNormalized,Ze.tf2),t.starts=Ae(t.centersNormalized,t.halfBoxSize),t.ends=de(t.centersNormalized,t.halfBoxSize),t.startNormalized=z(t.starts,tf),t.endNormalized=z(t.ends,tf);let n=cu([t.startNormalized,t.endNormalized],1);return Object.keys(t).forEach(s=>Q(t[s])),n}async function mN(e,t){var i,l,u,c;if(!e||e.isDisposedInternal||e.shape.length!==4||e.shape[1]<1||e.shape[2]<1)return[];let n={};n.resized=Ce.resizeBilinear(e,[Si,Si]),n.div=ye(n.resized,Ze.tf127),n.normalized=Ae(n.div,Ze.tf05);let s=jr==null?void 0:jr.execute(n.normalized);if(Array.isArray(s)&&s.length>2){let p=s.sort((d,h)=>d.size-h.size);n.concat384=ct([p[0],p[2]],2),n.concat512=ct([p[1],p[3]],2),n.concat=ct([n.concat512,n.concat384],1),n.batch=Ke(n.concat,0)}else Array.isArray(s)?n.batch=Ke(s[0]):n.batch=Ke(s);Q(s),n.boxes=bxe(n.batch),n.logits=Le(n.batch,[0,0],[-1,1]),n.sigmoid=On(n.logits),n.scores=Ke(n.sigmoid),n.nms=await Ce.nonMaxSuppressionAsync(n.boxes,n.scores,((i=t.face.detector)==null?void 0:i.maxDetected)||0,((l=t.face.detector)==null?void 0:l.iouThreshold)||0,((u=t.face.detector)==null?void 0:u.minConfidence)||0);let r=await n.nms.array(),a=[],o=await n.scores.data();for(let p=0;p(((c=t.face.detector)==null?void 0:c.minConfidence)||0)){let h={};h.bbox=Le(n.boxes,[r[p],0],[1,-1]),h.slice=Le(n.batch,[r[p],pN-1],[1,-1]),h.squeeze=Ke(h.slice),h.landmarks=V(h.squeeze,[pN,-1]);let f=await h.bbox.data(),m={startPoint:[f[0],f[1]],endPoint:[f[2],f[3]],landmarks:await h.landmarks.array(),confidence:d},g=aN(m,[(e.shape[2]||0)/Si,(e.shape[1]||0)/Si]),y=e1(g,t.face.scale||xxe),x=t1(y);a.push(x),Object.keys(h).forEach(A=>Q(h[A]))}}return Object.keys(n).forEach(p=>Q(n[p])),a}var n1={};xa(n1,{connected:()=>Wb,kpt:()=>Bb});var Bb=["nose","leftEyeInside","leftEye","leftEyeOutside","rightEyeInside","rightEye","rightEyeOutside","leftEar","rightEar","leftMouth","rightMouth","leftShoulder","rightShoulder","leftElbow","rightElbow","leftWrist","rightWrist","leftPinky","rightPinky","leftIndex","rightIndex","leftThumb","rightThumb","leftHip","rightHip","leftKnee","rightKnee","leftAnkle","rightAnkle","leftHeel","rightHeel","leftFoot","rightFoot","bodyCenter","bodyTop","leftPalm","leftHand","rightPalm","rightHand"],Wb={shoulders:["leftShoulder","rightShoulder"],hips:["rightHip","leftHip"],mouth:["leftMouth","rightMouth"],leftLegUpper:["leftHip","leftKnee"],leftLegLower:["leftKnee","leftAnkle"],leftFoot:["leftAnkle","leftHeel","leftFoot"],leftTorso:["leftShoulder","leftHip"],leftArmUpper:["leftShoulder","leftElbow"],leftArmLower:["leftElbow","leftWrist"],leftHand:["leftWrist","leftPalm"],leftHandPinky:["leftPalm","leftPinky"],leftHandIndex:["leftPalm","leftIndex"],leftHandThumb:["leftPalm","leftThumb"],leftEyeOutline:["leftEyeInside","leftEyeOutside"],rightLegUpper:["rightHip","rightKnee"],rightLegLower:["rightKnee","rightAnkle"],rightFoot:["rightAnkle","rightHeel","rightFoot"],rightTorso:["rightShoulder","rightHip"],rightArmUpper:["rightShoulder","rightElbow"],rightArmLower:["rightElbow","rightWrist"],rightHand:["rightWrist","rightPalm"],rightHandPinky:["rightPalm","rightPinky"],rightHandIndex:["rightPalm","rightIndex"],rightHandThumb:["rightPalm","rightThumb"],rightEyeOutline:["rightEyeInside","rightEyeOutside"]};var yN=224,vxe,wxe=5,s1=[8,16,32,32,32];function AN(){let e=[],t=0;for(;tn.x)),y:Ot(e.map(n=>n.y))}}function za(e,t=[1,1]){let n=[e.map(i=>i[0]),e.map(i=>i[1])],s=[Math.min(...n[0]),Math.min(...n[1])],r=[Math.max(...n[0]),Math.max(...n[1])],a=[s[0],s[1],r[0]-s[0],r[1]-s[1]],o=[a[0]/t[0],a[1]/t[1],a[2]/t[0],a[3]/t[1]];return{box:a,boxRaw:o}}function xN(e,t=[1,1]){let n=[e.map(u=>u[0]),e.map(u=>u[1])],s=[Math.min(...n[0]),Math.min(...n[1])],r=[Math.max(...n[0]),Math.max(...n[1])],a=[(s[0]+r[0])/2,(s[1]+r[1])/2],o=Math.max(a[0]-s[0],a[1]-s[1],-a[0]+r[0],-a[1]+r[1]),i=[Math.trunc(a[0]-o),Math.trunc(a[1]-o),Math.trunc(2*o),Math.trunc(2*o)],l=[i[0]/t[0],i[1]/t[1],i[2]/t[0],i[3]/t[1]];return{box:i,boxRaw:l}}function r1(e,t){let n=[e[2]*t,e[3]*t];return[e[0]-(n[0]-e[2])/2,e[1]-(n[1]-e[3])/2,n[0],n[1]]}var wN={initial:!0},Xn={detector:null,landmarks:null},Nd={detector:[224,224],landmarks:[256,256]},Vb=Number.MAX_SAFE_INTEGER,Sxe={landmarks:["ld_3d","activation_segmentation","activation_heatmap","world_3d","output_poseflag"],detector:[]},o1=null,nf,Ii=[[0,0],[0,0],[0,0],[0,0]],bN=0,vN=e=>1-1/(1+Math.exp(e));async function kN(e){var t;if(wN.initial&&(Xn.detector=null),!Xn.detector&&e.body.detector&&e.body.detector.modelPath){Xn.detector=await Ve(e.body.detector.modelPath);let n=(t=Xn.detector)!=null&&t.executor?Object.values(Xn.detector.modelSignature.inputs):void 0;Nd.detector[0]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[1].size):0,Nd.detector[1]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[2].size):0}else e.debug&&Xn.detector&&ne("cached model:",Xn.detector.modelUrl);return AN(),Xn.detector}async function SN(e){var t;if(wN.initial&&(Xn.landmarks=null),Xn.landmarks)e.debug&&ne("cached model:",Xn.landmarks.modelUrl);else{Xn.landmarks=await Ve(e.body.modelPath);let n=(t=Xn.landmarks)!=null&&t.executor?Object.values(Xn.landmarks.modelSignature.inputs):void 0;Nd.landmarks[0]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[1].size):0,Nd.landmarks[1]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[2].size):0}return Xn.landmarks}function Ixe(e,t){var r,a;let n={};if(!((r=e==null?void 0:e.shape)!=null&&r[1])||!((a=e==null?void 0:e.shape)!=null&&a[2]))return e;let s;if(nf&&(n.cropped=Ce.cropAndResize(e,[nf],[0],[e.shape[1],e.shape[2]])),e.shape[1]!==e.shape[2]){let o=[e.shape[2]>e.shape[1]?Math.trunc((e.shape[2]-e.shape[1])/2):0,e.shape[2]>e.shape[1]?Math.trunc((e.shape[2]-e.shape[1])/2):0],i=[e.shape[1]>e.shape[2]?Math.trunc((e.shape[1]-e.shape[2])/2):0,e.shape[1]>e.shape[2]?Math.trunc((e.shape[1]-e.shape[2])/2):0];Ii=[[0,0],o,i,[0,0]],n.pad=ar(n.cropped||e,Ii),n.resize=Ce.resizeBilinear(n.pad,[t,t]),s=ye(n.resize,Ze.tf255)}else e.shape[1]!==t?(n.resize=Ce.resizeBilinear(n.cropped||e,[t,t]),s=ye(n.resize,Ze.tf255)):s=ye(n.cropped||e,Ze.tf255);return Object.keys(n).forEach(o=>Q(n[o])),s}function Cxe(e,t){for(let n of e)n.position=[Math.trunc(n.position[0]*(t[0]+Ii[2][0]+Ii[2][1])/t[0]-Ii[2][0]),Math.trunc(n.position[1]*(t[1]+Ii[1][0]+Ii[1][1])/t[1]-Ii[1][0]),n.position[2]],n.positionRaw=[n.position[0]/t[0],n.position[1]/t[1],2*n.position[2]/(t[0]+t[1])];if(nf)for(let n of e)n.positionRaw=[n.positionRaw[0]+nf[1],n.positionRaw[1]+nf[0],n.positionRaw[2]],n.position=[Math.trunc(n.positionRaw[0]*t[0]),Math.trunc(n.positionRaw[1]*t[1]),n.positionRaw[2]];return e}function Txe(e){let t=e.find(i=>i.part==="leftPalm"),n=e.find(i=>i.part==="leftWrist"),s=e.find(i=>i.part==="leftIndex");t.position[2]=((n.position[2]||0)+(s.position[2]||0))/2;let r=e.find(i=>i.part==="rightPalm"),a=e.find(i=>i.part==="rightWrist"),o=e.find(i=>i.part==="rightIndex");r.position[2]=((a.position[2]||0)+(o.position[2]||0))/2}async function Nxe(e,t,n){var f,m;if(!((f=Xn.landmarks)!=null&&f.executor))return null;let s={};[s.ld,s.segmentation,s.heatmap,s.world,s.poseflag]=(m=Xn.landmarks)==null?void 0:m.execute(e,Sxe.landmarks);let r=(await s.poseflag.data())[0],a=await s.ld.data(),o=await s.world.data();Object.keys(s).forEach(g=>Q(s[g]));let i=[],l=5;for(let g=0;gg.position),p=za(c,[n[0],n[1]]),d={};for(let[g,y]of Object.entries(Wb)){let x=[];for(let A=0;Ak.part===y[A]),w=u.find(k=>k.part===y[A+1]);b&&w&&x.push([b.position,w.position])}d[g]=x}return{id:0,score:Math.trunc(100*r)/100,box:p.box,boxRaw:p.boxRaw,keypoints:u,annotations:d}}async function Ub(e,t){let n=[e.shape[2]||0,e.shape[1]||0],s=(t.body.skipTime||0)>ue()-bN,r=Vb<(t.body.skipFrames||0);if(t.skipAllowed&&s&&r&&o1!==null)Vb++;else{let a={};a.landmarks=Ixe(e,256),o1=await Nxe(a.landmarks,t,n),Object.keys(a).forEach(o=>Q(a[o])),bN=ue(),Vb=0}return o1?[o1]:[]}var Ed=[{class:1,label:"person"},{class:2,label:"bicycle"},{class:3,label:"car"},{class:4,label:"motorcycle"},{class:5,label:"airplane"},{class:6,label:"bus"},{class:7,label:"train"},{class:8,label:"truck"},{class:9,label:"boat"},{class:10,label:"traffic light"},{class:11,label:"fire hydrant"},{class:12,label:"stop sign"},{class:13,label:"parking meter"},{class:14,label:"bench"},{class:15,label:"bird"},{class:16,label:"cat"},{class:17,label:"dog"},{class:18,label:"horse"},{class:19,label:"sheep"},{class:20,label:"cow"},{class:21,label:"elephant"},{class:22,label:"bear"},{class:23,label:"zebra"},{class:24,label:"giraffe"},{class:25,label:"backpack"},{class:26,label:"umbrella"},{class:27,label:"handbag"},{class:28,label:"tie"},{class:29,label:"suitcase"},{class:30,label:"frisbee"},{class:31,label:"skis"},{class:32,label:"snowboard"},{class:33,label:"sports ball"},{class:34,label:"kite"},{class:35,label:"baseball bat"},{class:36,label:"baseball glove"},{class:37,label:"skateboard"},{class:38,label:"surfboard"},{class:39,label:"tennis racket"},{class:40,label:"bottle"},{class:41,label:"wine glass"},{class:42,label:"cup"},{class:43,label:"fork"},{class:44,label:"knife"},{class:45,label:"spoon"},{class:46,label:"bowl"},{class:47,label:"banana"},{class:48,label:"apple"},{class:49,label:"sandwich"},{class:50,label:"orange"},{class:51,label:"broccoli"},{class:52,label:"carrot"},{class:53,label:"hot dog"},{class:54,label:"pizza"},{class:55,label:"donut"},{class:56,label:"cake"},{class:57,label:"chair"},{class:58,label:"couch"},{class:59,label:"potted plant"},{class:60,label:"bed"},{class:61,label:"dining table"},{class:62,label:"toilet"},{class:63,label:"tv"},{class:64,label:"laptop"},{class:65,label:"mouse"},{class:66,label:"remote"},{class:67,label:"keyboard"},{class:68,label:"cell phone"},{class:69,label:"microwave"},{class:70,label:"oven"},{class:71,label:"toaster"},{class:72,label:"sink"},{class:73,label:"refrigerator"},{class:74,label:"book"},{class:75,label:"clock"},{class:76,label:"vase"},{class:77,label:"scissors"},{class:78,label:"teddy bear"},{class:79,label:"hair drier"},{class:80,label:"toothbrush"}];var Ts,Iu=0,Gb=[],CN=0,Hb=Number.MAX_SAFE_INTEGER;async function TN(e){if(me.initial&&(Ts=null),Ts)e.debug&&ne("cached model:",Ts.modelUrl);else{Ts=await Ve(e.object.modelPath);let t=Ts!=null&&Ts.executor?Object.values(Ts.modelSignature.inputs):void 0;Iu=Array.isArray(t)?parseInt(t[0].tensorShape.dim[2].size):0}return Ts}async function Exe(e,t,n){if(!e)return[];let s={},r=[],a=await e.array();s.squeeze=Ke(e);let o=qt(s.squeeze,6,1);s.stack=un([o[1],o[0],o[3],o[2]],1),s.boxes=Ke(s.stack),s.scores=Ke(o[4]),s.classes=Ke(o[5]),Q([e,...o]),s.nms=await Ce.nonMaxSuppressionAsync(s.boxes,s.scores,n.object.maxDetected,n.object.iouThreshold,n.object.minConfidence||0);let i=await s.nms.data(),l=0;for(let u of Array.from(i)){let c=Math.trunc(100*a[0][u][4])/100,p=a[0][u][5];if(Number.isNaN(p))continue;let d=Ed[p].label,[h,f]=[a[0][u][0]/Iu,a[0][u][1]/Iu],m=[h,f,a[0][u][2]/Iu-h,a[0][u][3]/Iu-f],g=[Math.trunc(m[0]*t[0]),Math.trunc(m[1]*t[1]),Math.trunc(m[2]*t[0]),Math.trunc(m[3]*t[1])];r.push({id:l++,score:c,class:p,label:d,box:g,boxRaw:m})}return Object.keys(s).forEach(u=>Q(s[u])),r}async function jb(e,t){if(!(Ts!=null&&Ts.executor))return[];let n=(t.object.skipTime||0)>ue()-CN,s=Hb<(t.object.skipFrames||0);return t.skipAllowed&&n&&s&&Gb.length>0?(Hb++,Gb):(Hb=0,new Promise(async r=>{let a=[e.shape[2]||0,e.shape[1]||0],o=Ce.resizeBilinear(e,[Iu,Iu]),i=t.object.enabled?Ts==null?void 0:Ts.execute(o,["tower_0/detections"]):null;CN=ue(),Q(o);let l=await Exe(i,a,t);Gb=l,r(l)}))}var i1={};xa(i1,{connected:()=>Xb,kpt:()=>qb});var qb=["head","neck","rightShoulder","rightElbow","rightWrist","chest","leftShoulder","leftElbow","leftWrist","bodyCenter","rightHip","rightKnee","rightAnkle","leftHip","leftKnee","leftAnkle"],Xb={leftLeg:["leftHip","leftKnee","leftAnkle"],rightLeg:["rightHip","rightKnee","rightAnkle"],torso:["leftShoulder","rightShoulder","rightHip","leftHip","leftShoulder"],leftArm:["leftShoulder","leftElbow","leftWrist"],rightArm:["rightShoulder","rightElbow","rightWrist"],head:[]};var In,EN=0,gs={id:0,keypoints:[],box:[0,0,0,0],boxRaw:[0,0,0,0],score:0,annotations:{}},Kb=Number.MAX_SAFE_INTEGER;async function RN(e){return me.initial&&(In=null),In?e.debug&&ne("cached model:",In.modelUrl):In=await Ve(e.body.modelPath),In}async function Rxe(e,t){let[n,s]=e.shape,r=V(e,[s*n]),a=xn(r,0),o=(await a.data())[0];if(o>t){let i=Ms(r,0),l=pu(i,n),u=(await l.data())[0],c=ye(i,n),p=(await c.data())[0];return Q([r,a,i,l,c]),[u,p,o]}return Q([r,a]),[0,0,o]}async function Zb(e,t){if(!(In!=null&&In.executor))return[];let n=(t.body.skipTime||0)>ue()-EN,s=Kb<(t.body.skipFrames||0);return t.skipAllowed&&n&&s&&Object.keys(gs.keypoints).length>0?(Kb++,[gs]):(Kb=0,new Promise(async r=>{let a=Y(()=>{if(!(In!=null&&In.inputs[0].shape))return null;let p=Ce.resizeBilinear(e,[In.inputs[0].shape[2],In.inputs[0].shape[1]],!1),d=z(p,Ze.tf2);return Ae(d,Ze.tf1)}),o;if(t.body.enabled&&(o=In==null?void 0:In.execute(a)),EN=ue(),Q(a),o){gs.keypoints.length=0;let p=Ke(o);Q(o);let d=wn(p,2);Q(p);for(let h=0;h(t.body.minConfidence||0)&&gs.keypoints.push({score:Math.round(100*g)/100,part:qb[h],positionRaw:[f/In.inputs[0].shape[2],m/In.inputs[0].shape[1]],position:[Math.round(e.shape[2]*f/In.inputs[0].shape[2]),Math.round(e.shape[1]*m/In.inputs[0].shape[1])]})}d.forEach(h=>Q(h))}gs.score=gs.keypoints.reduce((p,d)=>d.score>p?d.score:p,0);let i=gs.keypoints.map(p=>p.position[0]),l=gs.keypoints.map(p=>p.position[1]);gs.box=[Math.min(...i),Math.min(...l),Math.max(...i)-Math.min(...i),Math.max(...l)-Math.min(...l)];let u=gs.keypoints.map(p=>p.positionRaw[0]),c=gs.keypoints.map(p=>p.positionRaw[1]);gs.boxRaw=[Math.min(...u),Math.min(...c),Math.max(...u)-Math.min(...u),Math.max(...c)-Math.min(...c)];for(let[p,d]of Object.entries(Xb)){let h=[];for(let f=0;fy.part===d[f]),g=gs.keypoints.find(y=>y.part===d[f+1]);m&&g&&m.score>(t.body.minConfidence||0)&&g.score>(t.body.minConfidence||0)&&h.push([m.position,g.position])}gs.annotations[p]=h}r([gs])}))}var _xe=["angry","disgust","fear","happy","sad","surprise","neutral"],lr,l1=[],DN=0,$N=0,Yb=Number.MAX_SAFE_INTEGER;async function PN(e){var t;return me.initial&&(lr=null),lr?e.debug&&ne("cached model:",lr.modelUrl):lr=await Ve((t=e.face.emotion)==null?void 0:t.modelPath),lr}async function Jb(e,t,n,s){var o,i;if(!lr)return[];let r=Yb<(((o=t.face.emotion)==null?void 0:o.skipFrames)||0),a=(((i=t.face.emotion)==null?void 0:i.skipTime)||0)>ue()-$N;return t.skipAllowed&&a&&r&&DN===s&&l1[n]&&l1[n].length>0?(Yb++,l1[n]):(Yb=0,new Promise(async l=>{var c;let u=[];if((c=t.face.emotion)!=null&&c.enabled){let p={},d=lr!=null&&lr.inputs[0].shape?lr.inputs[0].shape[2]:0;p.resize=Ce.resizeBilinear(e,[d,d],!1),p.channels=z(p.resize,Ze.rgb),p.grayscale=Se(p.channels,3,!0),p.grayscaleSub=Ae(p.grayscale,Ze.tf05),p.grayscaleMul=z(p.grayscaleSub,Ze.tf2),p.emotion=lr==null?void 0:lr.execute(p.grayscaleMul),$N=ue();let h=await p.emotion.data();for(let f=0;f(t.face.emotion.minConfidence||0)&&u.push({score:Math.min(.99,Math.trunc(100*h[f])/100),emotion:_xe[f]});u.sort((f,m)=>m.score-f.score),Object.keys(p).forEach(f=>Q(p[f]))}l1[n]=u,DN=s,l(u)}))}var Gs,Ci=0,Dxe=2.3,Qb=kr.leftEyeLower0,e4=kr.rightEyeLower0,Rd={leftBounds:[Qb[0],Qb[Qb.length-1]],rightBounds:[e4[0],e4[e4.length-1]]},_d={upperCenter:3,lowerCenter:4,index:71,numCoordinates:76};async function LN(e){var t,n;return me.initial&&(Gs=null),Gs?e.debug&&ne("cached model:",Gs.modelUrl):Gs=await Ve((t=e.face.iris)==null?void 0:t.modelPath),Ci=(Gs==null?void 0:Gs.executor)&&((n=Gs.inputs)==null?void 0:n[0].shape)?Gs.inputs[0].shape[2]:0,Ci===-1&&(Ci=64),Gs}function u1(e,t,n,s){for(let r=0;r{let t=e[Rd.leftBounds[0]][2],n=e[Rd.rightBounds[0]][2];return t-n},ON=(e,t,n,s,r,a=!1)=>{let o=t1(e1(oN([e[n],e[s]]),Dxe)),i=Cd(o),l=Ce.cropAndResize(t,[[o.startPoint[1]/r,o.startPoint[0]/r,o.endPoint[1]/r,o.endPoint[0]/r]],[0],[Ci,Ci]);if(a&&me.kernels.includes("flipleftright")){let u=Ce.flipLeftRight(l);Q(l),l=u}return{box:o,boxSize:i,crop:l}},MN=(e,t,n,s=!1)=>{let r=[];for(let a=0;a<_d.numCoordinates;a++){let o=e[a*3],i=e[a*3+1],l=e[a*3+2];r.push([(s?1-o/Ci:o/Ci)*n[0]+t.startPoint[0],i/Ci*n[1]+t.startPoint[1],l])}return{rawCoords:r,iris:r.slice(_d.index)}},zN=(e,t,n)=>{let s=e[kr[`${n}EyeUpper0`][_d.upperCenter]][2],r=e[kr[`${n}EyeLower0`][_d.lowerCenter]][2],a=(s+r)/2;return t.map((o,i)=>{let l=a;return i===2?l=s:i===4&&(l=r),[o[0],o[1],l]})};async function BN(e,t,n){if(!(Gs!=null&&Gs.executor))return e;let{box:s,boxSize:r,crop:a}=ON(e,t,Rd.leftBounds[0],Rd.leftBounds[1],n,!0),{box:o,boxSize:i,crop:l}=ON(e,t,Rd.rightBounds[0],Rd.rightBounds[1],n,!0),u=ct([a,l]);Q(a),Q(l);let c=Gs.execute(u);Q(u);let p=await c.data();Q(c);let d=p.slice(0,_d.numCoordinates*3),{rawCoords:h,iris:f}=MN(d,s,r,!0),m=p.slice(_d.numCoordinates*3),{rawCoords:g,iris:y}=MN(m,o,i,!1),x=$xe(e);Math.abs(x)<30?(u1(e,h,"left",null),u1(e,g,"right",null)):x<1?u1(e,h,"left",["EyeUpper0","EyeLower0"]):u1(e,g,"right",["EyeUpper0","EyeLower0"]);let A=zN(e,f,"left"),b=zN(e,y,"right");return e.concat(A).concat(b)}var Pxe=[[61,146],[146,91],[91,181],[181,84],[84,17],[17,314],[314,405],[405,321],[321,375],[375,291],[61,185],[185,40],[40,39],[39,37],[37,0],[0,267],[267,269],[269,270],[270,409],[409,291],[78,95],[95,88],[88,178],[178,87],[87,14],[14,317],[317,402],[402,318],[318,324],[324,308],[78,191],[191,80],[80,81],[81,82],[82,13],[13,312],[312,311],[311,310],[310,415],[415,308]],Fxe=[[263,249],[249,390],[390,373],[373,374],[374,380],[380,381],[381,382],[382,362],[263,466],[466,388],[388,387],[387,386],[386,385],[385,384],[384,398],[398,362]],Oxe=[[276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]],Mxe=[[474,475],[475,476],[476,477],[477,474]],zxe=[[33,7],[7,163],[163,144],[144,145],[145,153],[153,154],[154,155],[155,133],[33,246],[246,161],[161,160],[160,159],[159,158],[158,157],[157,173],[173,133]],Lxe=[[46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]],Bxe=[[469,470],[470,471],[471,472],[472,469]],Wxe=[[10,338],[338,297],[297,332],[332,284],[284,251],[251,389],[389,356],[356,454],[454,323],[323,361],[361,288],[288,397],[397,365],[365,379],[379,378],[378,400],[400,377],[377,152],[152,148],[148,176],[176,149],[149,150],[150,136],[136,172],[172,58],[58,132],[132,93],[93,234],[234,127],[127,162],[162,21],[21,54],[54,103],[103,67],[67,109],[109,10]];function Ti(e){let t=e.map(n=>n[0]);return t.push(e[e.length-1][1]),t}var Vxe={lips:Ti(Pxe),leftEye:Ti(Fxe),leftEyebrow:Ti(Oxe),leftIris:Ti(Mxe),rightEye:Ti(zxe),rightEyebrow:Ti(Lxe),rightIris:Ti(Bxe),faceOval:Ti(Wxe)},Uxe=Object.entries(Vxe).map(([e,t])=>t.map(n=>[n,e])).flat(),$Se=new Map(Uxe),sf=[61,146,91,181,84,17,314,405,321,375,291,185,40,39,37,0,267,269,270,409,78,95,88,178,87,14,317,402,318,324,308,191,80,81,82,13,312,311,310,415,76,77,90,180,85,16,315,404,320,307,306,184,74,73,72,11,302,303,304,408,62,96,89,179,86,15,316,403,319,325,292,183,42,41,38,12,268,271,272,407],Cu=[33,7,163,144,145,153,154,155,133,246,161,160,159,158,157,173,130,25,110,24,23,22,26,112,243,247,30,29,27,28,56,190,226,31,228,229,230,231,232,233,244,113,225,224,223,222,221,189,35,124,46,53,52,65,143,111,117,118,119,120,121,128,245,156,70,63,105,66,107,55,193],Tu=[263,249,390,373,374,380,381,382,362,466,388,387,386,385,384,398,359,255,339,254,253,252,256,341,463,467,260,259,257,258,286,414,446,261,448,449,450,451,452,453,464,342,445,444,443,442,441,413,265,353,276,283,282,295,372,340,346,347,348,349,350,357,465,383,300,293,334,296,336,285,417];async function UN(e,t){var a,o,i,l,u,c,p,d,h,f;let n={lips:await((o=(a=t.filter(m=>m.size===160))==null?void 0:a[0])==null?void 0:o.data()),irisL:await((l=(i=t.filter(m=>m.size===10))==null?void 0:i[0])==null?void 0:l.data()),eyeL:await((c=(u=t.filter(m=>m.size===142))==null?void 0:u[0])==null?void 0:c.data()),irisR:await((d=(p=t.filter(m=>m.size===10))==null?void 0:p[1])==null?void 0:d.data()),eyeR:await((f=(h=t.filter(m=>m.size===142))==null?void 0:h[1])==null?void 0:f.data())};for(let m of Object.values(n))if(!m)return e;let s=Cu.reduce((m,g)=>m+=e[g][2],0)/Cu.length;for(let m=0;mm+=e[g][2],0)/Tu.length;for(let m=0;mue()-ha.timestamp,s=ha.skipped<(((u=t.face.detector)==null?void 0:u.skipFrames)||0);!t.skipAllowed||!n||!s||ha.boxes.length===0?(ha.boxes=await mN(e,t),ha.timestamp=ue(),ha.skipped=0):ha.skipped++;let r=[],a=[],o=0,i=rf;for(let x=0;x$.shape[$.shape.length-1]===1).data();if(k.faceScore=Math.round(100*_[0])/100,k.faceScore<(((f=t.face.detector)==null?void 0:f.minConfidence)||1)){if(A.confidence=k.faceScore,t.face.mesh.keepInvalid){k.box=J2(A,e),k.boxRaw=Q2(A,e),k.score=k.boxScore,k.mesh=A.landmarks.map($=>[(A.startPoint[0]+A.endPoint[0])/2+(A.endPoint[0]+A.startPoint[0])*$[0]/Td(),(A.startPoint[1]+A.endPoint[1])/2+(A.endPoint[1]+A.startPoint[1])*$[1]/Td()]),k.meshRaw=k.mesh.map($=>[$[0]/(e.shape[2]||1),$[1]/(e.shape[1]||1),($[2]||0)/i]);for(let $ of Object.keys(wu))k.annotations[$]=[k.mesh[wu[$]]]}}else{let $=C.find(M=>M.shape[M.shape.length-1]===1404),R=V($,[-1,3]),P=await R.array();Q(R),(m=t.face.attention)!=null&&m.enabled?P=await UN(P,C):(g=t.face.iris)!=null&&g.enabled&&(P=await BN(P,k.tensor,rf)),k.mesh=uN(P,A,b,w,rf),k.meshRaw=k.mesh.map(M=>[M[0]/(e.shape[2]||0),M[1]/(e.shape[1]||0),(M[2]||0)/i]);for(let M of Object.keys(kr))k.annotations[M]=kr[M].map(L=>k.mesh[L]);k.score=k.faceScore;let S={...dN(k.mesh,A),confidence:A.confidence,landmarks:A.landmarks};k.box=J2(S,e),k.boxRaw=Q2(S,e),a.push(S)}Q(C)}else{k.box=J2(A,e),k.boxRaw=Q2(A,e),k.score=k.boxScore,k.mesh=A.landmarks.map(C=>[(A.startPoint[0]+A.endPoint[0])/2+(A.endPoint[0]+A.startPoint[0])*C[0]/Td(),(A.startPoint[1]+A.endPoint[1])/2+(A.endPoint[1]+A.startPoint[1])*C[1]/Td()]),k.meshRaw=k.mesh.map(C=>[C[0]/(e.shape[2]||0),C[1]/(e.shape[1]||0),(C[2]||0)/i]);for(let C of Object.keys(wu))k.annotations[C]=[k.mesh[wu[C]]]}k.score>(((y=t.face.detector)==null?void 0:y.minConfidence)||1)?r.push(k):Q(k.tensor)}return ha.boxes=a,r}async function HN(e){var t,n,s,r,a,o;return me.initial&&(Lt=null),((t=e.face.attention)==null?void 0:t.enabled)&&(Lt==null?void 0:Lt.signature)&&Object.keys(((n=Lt==null?void 0:Lt.signature)==null?void 0:n.outputs)||{}).length<6&&(Lt=null),Lt?e.debug&&ne("cached model:",Lt.modelUrl):(s=e.face.attention)!=null&&s.enabled?Lt=await Ve(e.face.attention.modelPath):Lt=await Ve((r=e.face.mesh)==null?void 0:r.modelPath),rf=Lt.executor&&((a=Lt==null?void 0:Lt.inputs)==null?void 0:a[0].shape)?(o=Lt==null?void 0:Lt.inputs)==null?void 0:o[0].shape[2]:256,Lt}var jN=ku,qN=ef;var Kn,Ni=[],XN=0,KN=0,n4=Number.MAX_SAFE_INTEGER;async function ZN(e){var t;return me.initial&&(Kn=null),Kn?e.debug&&ne("cached model:",Kn.modelUrl):Kn=await Ve((t=e.face.description)==null?void 0:t.modelPath),Kn}function s4(e){let t=e.image||e.tensor||e;if(!(Kn!=null&&Kn.inputs[0].shape))return t;let n=Ce.resizeBilinear(t,[Kn.inputs[0].shape[2],Kn.inputs[0].shape[1]],!1),s=z(n,Ze.tf255);return Q(n),s}async function r4(e,t,n,s){var i,l,u,c;let r={age:0,gender:"unknown",genderScore:0,descriptor:[]};if(!(Kn!=null&&Kn.executor))return r;let a=n4<(((i=t.face.description)==null?void 0:i.skipFrames)||0),o=(((l=t.face.description)==null?void 0:l.skipTime)||0)>ue()-XN;return t.skipAllowed&&a&&o&&KN===s&&((u=Ni==null?void 0:Ni[n])==null?void 0:u.age)>0&&((c=Ni==null?void 0:Ni[n])==null?void 0:c.genderScore)>0?(n4++,Ni[n]):(n4=0,new Promise(async p=>{var d;if((d=t.face.description)!=null&&d.enabled){let h=s4(e),f=Kn==null?void 0:Kn.execute(h);XN=ue(),Q(h);let g=await f.find(E=>E.shape[1]===1).data(),y=Math.trunc(200*Math.abs(g[0]-.5))/100;y>(t.face.description.minConfidence||0)&&(r.gender=g[0]<=.5?"female":"male",r.genderScore=Math.min(.99,y));let x=Ms(f.find(E=>E.shape[1]===100),1),A=(await x.data())[0];Q(x);let w=await f.find(E=>E.shape[1]===100).data();r.age=Math.round(w[A-1]>w[A+1]?10*A-100*w[A-1]:10*A+100*w[A+1])/10,(Number.isNaN(g[0])||Number.isNaN(w[0]))&&ne("faceres error:",{model:Kn,result:f});let k=f.find(E=>E.shape[1]===1024),C=k?await k.data():[];r.descriptor=Array.from(C),f.forEach(E=>Q(E))}Ni[n]=r,KN=s,p(r)}))}var Sr,o4=[],Hxe=["white","black","asian","indian","other"],jxe=[15,23,28,35.5,45.5,55.5,65],YN=0,JN=0,i4=Number.MAX_SAFE_INTEGER;async function QN(e){var t;return me.initial&&(Sr=null),Sr?e.debug&&ne("cached model:",Sr.modelUrl):Sr=await Ve((t=e.face.gear)==null?void 0:t.modelPath),Sr}async function l4(e,t,n,s){var o,i;if(!Sr)return{age:0,gender:"unknown",genderScore:0,race:[]};let r=i4<(((o=t.face.gear)==null?void 0:o.skipFrames)||0),a=(((i=t.face.gear)==null?void 0:i.skipTime)||0)>ue()-JN;return t.skipAllowed&&a&&r&&YN===s&&o4[n]?(i4++,o4[n]):(i4=0,new Promise(async l=>{var y,x;if(!(Sr!=null&&Sr.inputs[0].shape))return;let u={},c=[[0,.1,.9,.9]];u.resize=Ce.cropAndResize(e,c,[0],[Sr.inputs[0].shape[2],Sr.inputs[0].shape[1]]);let p={age:0,gender:"unknown",genderScore:0,race:[]};(y=t.face.gear)!=null&&y.enabled&&([u.age,u.gender,u.race]=Sr.execute(u.resize,["age_output","gender_output","race_output"]));let d=await u.gender.data();p.gender=d[0]>d[1]?"male":"female",p.genderScore=Math.round(100*(d[0]>d[1]?d[0]:d[1]))/100;let h=await u.race.data();for(let A=0;A(((x=t.face.gear)==null?void 0:x.minConfidence)||.2)&&p.race.push({score:Math.round(100*h[A])/100,race:Hxe[A]});p.race.sort((A,b)=>b.score-A.score);let m=Array.from(await u.age.data()).map((A,b)=>[jxe[b],A]).sort((A,b)=>b[1]-A[1]),g=m[0][0];for(let A=1;AQ(u[A])),o4[n]=p,YN=s,JN=ue(),l(p)}))}function c1(e){return[Math.abs(e.endPoint[0]-e.startPoint[0]),Math.abs(e.endPoint[1]-e.startPoint[1])]}function af(e){return[e.startPoint[0]+(e.endPoint[0]-e.startPoint[0])/2,e.startPoint[1]+(e.endPoint[1]-e.startPoint[1])/2]}function sE(e,t,n){let s=t.shape[1],r=t.shape[2],a=[[e.startPoint[1]/s,e.startPoint[0]/r,e.endPoint[1]/s,e.endPoint[0]/r]];return Ce.cropAndResize(t,a,[0],n)}function rE(e,t){let n=[e.startPoint[0]*t[0],e.startPoint[1]*t[1]],s=[e.endPoint[0]*t[0],e.endPoint[1]*t[1]],r=e.palmLandmarks.map(a=>[a[0]*t[0],a[1]*t[1]]);return{startPoint:n,endPoint:s,palmLandmarks:r,confidence:e.confidence}}function d1(e,t=1.5){let n=af(e),s=c1(e),r=[t*s[0]/2,t*s[1]/2],a=[n[0]-r[0],n[1]-r[1]],o=[n[0]+r[0],n[1]+r[1]];return{startPoint:a,endPoint:o,palmLandmarks:e.palmLandmarks}}function p1(e){let t=af(e),n=c1(e),r=Math.max(...n)/2,a=[t[0]-r,t[1]-r],o=[t[0]+r,t[1]+r];return{startPoint:a,endPoint:o,palmLandmarks:e.palmLandmarks}}function qxe(e){return e-2*Math.PI*Math.floor((e+Math.PI)/(2*Math.PI))}function aE(e,t){let n=Math.PI/2-Math.atan2(-(t[1]-e[1]),t[0]-e[0]);return qxe(n)}var tE=(e,t)=>[[1,0,e],[0,1,t],[0,0,1]];function Ei(e,t){let n=0;for(let s=0;s[o.x,o.y]),this.anchorsTensor=mr(this.anchors),this.inputSize=((a=(r=(s=(n=this==null?void 0:this.model)==null?void 0:n.inputs)==null?void 0:s[0])==null?void 0:r.shape)==null?void 0:a[2])||0,this.inputSizeTensor=Ot([this.inputSize,this.inputSize]),this.doubleInputSizeTensor=Ot([this.inputSize*2,this.inputSize*2])}normalizeBoxes(t){let n={};n.boxOffsets=Le(t,[0,0],[-1,2]),n.boxSizes=Le(t,[0,2],[-1,2]),n.div=ye(n.boxOffsets,this.inputSizeTensor),n.boxCenterPoints=de(n.div,this.anchorsTensor),n.halfBoxSizes=ye(n.boxSizes,this.doubleInputSizeTensor),n.sub=Ae(n.boxCenterPoints,n.halfBoxSizes),n.startPoints=z(n.sub,this.inputSizeTensor),n.add=de(n.boxCenterPoints,n.halfBoxSizes),n.endPoints=z(n.add,this.inputSizeTensor);let s=cu([n.startPoints,n.endPoints],1);return Object.keys(n).forEach(r=>Q(n[r])),s}normalizeLandmarks(t,n){let s={};s.reshape=V(t,[-1,7,2]),s.div=ye(s.reshape,this.inputSizeTensor),s.landmarks=de(s.div,this.anchors[n]?this.anchors[n]:0);let r=z(s.landmarks,this.inputSizeTensor);return Object.keys(s).forEach(a=>Q(s[a])),r}async predict(t,n){var i;let s={};s.resize=Ce.resizeBilinear(t,[this.inputSize,this.inputSize]),s.div=ye(s.resize,Ze.tf127),s.image=Ae(s.div,Ze.tf1),s.batched=this.model.execute(s.image),s.predictions=Ke(s.batched),s.slice=Le(s.predictions,[0,0],[-1,1]),s.sigmoid=On(s.slice),s.scores=Ke(s.sigmoid);let r=await s.scores.data();s.boxes=Le(s.predictions,[0,1],[-1,4]),s.norm=this.normalizeBoxes(s.boxes),s.nms=await Ce.nonMaxSuppressionAsync(s.norm,s.scores,3*(((i=n.hand)==null?void 0:i.maxDetected)||1),n.hand.iouThreshold,n.hand.minConfidence);let a=await s.nms.array(),o=[];for(let l of a){let u={};u.box=Le(s.norm,[l,0],[1,-1]),u.slice=Le(s.predictions,[l,5],[1,14]),u.norm=this.normalizeLandmarks(u.slice,l),u.palmLandmarks=V(u.norm,[-1,2]);let c=await u.box.data(),p=c.slice(0,2),d=c.slice(2,4),h=await u.palmLandmarks.array(),f={startPoint:p,endPoint:d,palmLandmarks:h,confidence:r[l]},m=rE(f,[(t.shape[2]||1)/this.inputSize,(t.shape[1]||0)/this.inputSize]);o.push(m),Object.keys(u).forEach(g=>Q(u[g]))}return Object.keys(s).forEach(l=>Q(s[l])),o}};var Yxe=5,uE=1.65,cE=[0,5,9,13,17,1,2],Jxe=0,Qxe=2,dE=0,f1=class{constructor(t,n){fe(this,"handDetector");fe(this,"handPoseModel");fe(this,"inputSize");fe(this,"storedBoxes");fe(this,"skipped");fe(this,"detectedHands");var s,r,a;this.handDetector=t,this.handPoseModel=n,this.inputSize=((a=(r=(s=this.handPoseModel)==null?void 0:s.inputs)==null?void 0:r[0].shape)==null?void 0:a[2])||0,this.storedBoxes=[],this.skipped=Number.MAX_SAFE_INTEGER,this.detectedHands=0}calculateLandmarksBoundingBox(t){let n=t.map(o=>o[0]),s=t.map(o=>o[1]),r=[Math.min(...n),Math.min(...s)],a=[Math.max(...n),Math.max(...s)];return{startPoint:r,endPoint:a}}getBoxForPalmLandmarks(t,n){let s=t.map(a=>c4([...a,1],n)),r=this.calculateLandmarksBoundingBox(s);return d1(p1(r),Yxe)}getBoxForHandLandmarks(t){let n=this.calculateLandmarksBoundingBox(t),s=d1(p1(n),uE);s.palmLandmarks=[];for(let r=0;r[o[0]*(h[0]-this.inputSize/2),o[1]*(h[1]-this.inputSize/2),o[2]*h[2]]),l=u4(s,[0,0]),u=i.map(h=>[...c4(h,l),h[2]]),c=oE(r),p=[...af(n),1],d=[Ei(p,c[0]),Ei(p,c[1])];return u.map(h=>[Math.trunc(h[0]+d[0]),Math.trunc(h[1]+d[1]),Math.trunc(h[2])])}async estimateHands(t,n){let s=!1,r,a=(n.hand.skipTime||0)>ue()-dE,o=this.skipped<(n.hand.skipFrames||0);n.skipAllowed&&a&&o&&(r=await this.handDetector.predict(t,n),this.skipped=0),n.skipAllowed&&this.skipped++,r&&r.length>0&&(r.length!==this.detectedHands&&this.detectedHands!==n.hand.maxDetected||!n.hand.landmarks)&&(this.detectedHands=0,this.storedBoxes=[...r],this.storedBoxes.length>0&&(s=!0));let i=[];for(let l=0;l=n.hand.minConfidence/4){let w=V(A,[-1,3]),k=await w.array();Q(A),Q(w);let C=this.transformRawCoords(k,m,c,f),E=this.getBoxForHandLandmarks(C);this.storedBoxes[l]={...E,confidence:b};let _={landmarks:C,confidence:b,boxConfidence:u.confidence,fingerConfidence:b,box:{topLeft:E.startPoint,bottomRight:E.endPoint}};i.push(_)}else this.storedBoxes[l]=null;Q(A)}else{let c=d1(p1(u),uE),p={confidence:u.confidence,boxConfidence:u.confidence,fingerConfidence:0,box:{topLeft:c.startPoint,bottomRight:c.endPoint},landmarks:[]};i.push(p)}}return this.storedBoxes=this.storedBoxes.filter(l=>l!==null),this.detectedHands=i.length,i.length>n.hand.maxDetected&&(i.length=n.hand.maxDetected),i}};var ys={thumb:0,index:1,middle:2,ring:3,pinky:4,all:[0,1,2,3,4],nameMapping:{0:"thumb",1:"index",2:"middle",3:"ring",4:"pinky"},pointsMapping:{0:[[0,1],[1,2],[2,3],[3,4]],1:[[0,5],[5,6],[6,7],[7,8]],2:[[0,9],[9,10],[10,11],[11,12]],3:[[0,13],[13,14],[14,15],[15,16]],4:[[0,17],[17,18],[18,19],[19,20]]},getName:e=>ys.nameMapping[e],getPoints:e=>ys.pointsMapping[e]},_i={none:0,half:1,full:2,nameMapping:{0:"none",1:"half",2:"full"},getName:e=>_i.nameMapping[e]},Zt={verticalUp:0,verticalDown:1,horizontalLeft:2,horizontalRight:3,diagonalUpRight:4,diagonalUpLeft:5,diagonalDownRight:6,diagonalDownLeft:7,nameMapping:{0:"verticalUp",1:"verticalDown",2:"horizontalLeft",3:"horizontalRight",4:"diagonalUpRight",5:"diagonalUpLeft",6:"diagonalDownRight",7:"diagonalDownLeft"},getName:e=>Zt.nameMapping[e]},Ri=class{constructor(t){fe(this,"name");fe(this,"curls");fe(this,"directions");fe(this,"weights");fe(this,"weightsRelative");this.name=t,this.curls={},this.directions={},this.weights=[1,1,1,1,1],this.weightsRelative=[1,1,1,1,1]}curl(t,n,s){typeof this.curls[t]=="undefined"&&(this.curls[t]=[]),this.curls[t].push([n,s])}direction(t,n,s){this.directions[t]||(this.directions[t]=[]),this.directions[t].push([n,s])}weight(t,n){this.weights[t]=n;let s=this.weights.reduce((r,a)=>r+a,0);this.weightsRelative=this.weights.map(r=>r*5/s)}matchAgainst(t,n){let s=0;for(let r in t){let a=t[r],o=this.curls[r];if(typeof o=="undefined"){s+=this.weightsRelative[r];continue}for(let[i,l]of o)if(a===i){s+=l*this.weightsRelative[r];break}}for(let r in n){let a=n[r],o=this.directions[r];if(typeof o=="undefined"){s+=this.weightsRelative[r];continue}for(let[i,l]of o)if(a===i){s+=l*this.weightsRelative[r];break}}return s/10}};var{thumb:qr,index:La,middle:Ba,ring:Nu,pinky:Eu}=ys,{none:Xr,half:tbe,full:Kr}=_i,{verticalUp:Dd,verticalDown:eIe,horizontalLeft:d4,horizontalRight:nbe,diagonalUpRight:sbe,diagonalUpLeft:$d,diagonalDownRight:tIe,diagonalDownLeft:nIe}=Zt,Di=new Ri("thumbs up");Di.curl(qr,Xr,1);Di.direction(qr,Dd,1);Di.direction(qr,$d,.25);Di.direction(qr,sbe,.25);for(let e of[ys.index,ys.middle,ys.ring,ys.pinky])Di.curl(e,Kr,1),Di.direction(e,d4,1),Di.direction(e,nbe,1);var hn=new Ri("victory");hn.curl(qr,tbe,.5);hn.curl(qr,Xr,.5);hn.direction(qr,Dd,1);hn.direction(qr,$d,1);hn.curl(La,Xr,1);hn.direction(La,Dd,.75);hn.direction(La,$d,1);hn.curl(Ba,Xr,1);hn.direction(Ba,Dd,1);hn.direction(Ba,$d,.75);hn.curl(Nu,Kr,1);hn.direction(Nu,Dd,.2);hn.direction(Nu,$d,1);hn.direction(Nu,d4,.2);hn.curl(Eu,Kr,1);hn.direction(Eu,Dd,.2);hn.direction(Eu,$d,1);hn.direction(Eu,d4,.2);hn.weight(La,2);hn.weight(Ba,2);var $i=new Ri("point");$i.curl(qr,Kr,1);$i.curl(La,Xr,.5);$i.curl(Ba,Kr,.5);$i.curl(Nu,Kr,.5);$i.curl(Eu,Kr,.5);$i.weight(La,2);$i.weight(Ba,2);var Pi=new Ri("middle finger");Pi.curl(qr,Xr,1);Pi.curl(La,Kr,.5);Pi.curl(Ba,Kr,.5);Pi.curl(Nu,Kr,.5);Pi.curl(Eu,Kr,.5);Pi.weight(La,2);Pi.weight(Ba,2);var Pd=new Ri("open palm");Pd.curl(qr,Xr,.75);Pd.curl(La,Xr,.75);Pd.curl(Ba,Xr,.75);Pd.curl(Nu,Xr,.75);Pd.curl(Eu,Xr,.75);var pE=[Di,hn,$i,Pi,Pd];var rbe=.7,Ru={HALF_CURL_START_LIMIT:60,NO_CURL_START_LIMIT:130,DISTANCE_VOTE_POWER:1.1,SINGLE_ANGLE_VOTE_POWER:.9,TOTAL_ANGLE_VOTE_POWER:1.6};function hE(e,t,n,s){let r=(t-s)/(e-n),a=Math.atan(r)*180/Math.PI;return a<=0?a=-a:a>0&&(a=180-a),a}function mE(e,t){if(!e||!t)return[0,0];let n=hE(e[0],e[1],t[0],t[1]);if(e.length===2)return n;let s=hE(e[1],e[2],t[1],t[2]);return[n,s]}function fE(e,t=1){let n=0,s=0,r=0;return e>=75&&e<=105?n=1*t:e>=25&&e<=155?s=1*t:r=1*t,[n,s,r]}function abe(e,t,n){let s=e[0]-t[0],r=e[0]-n[0],a=t[0]-n[0],o=e[1]-t[1],i=e[1]-n[1],l=t[1]-n[1],u=e[2]-t[2],c=e[2]-n[2],p=t[2]-n[2],d=Math.sqrt(s*s+o*o+u*u),h=Math.sqrt(r*r+i*i+c*c),f=Math.sqrt(a*a+l*l+p*p),m=(f*f+d*d-h*h)/(2*f*d);m>1?m=1:m<-1&&(m=-1);let g=Math.acos(m);g=57.2958*g%180;let y;return g>Ru.NO_CURL_START_LIMIT?y=_i.none:g>Ru.HALF_CURL_START_LIMIT?y=_i.half:y=_i.full,y}function gE(e,t,n,s){let r;return s===Math.abs(e)?e>0?r=Zt.horizontalLeft:r=Zt.horizontalRight:s===Math.abs(t)?t>0?r=Zt.horizontalLeft:r=Zt.horizontalRight:n>0?r=Zt.horizontalLeft:r=Zt.horizontalRight,r}function yE(e,t,n,s){let r;return s===Math.abs(e)?e<0?r=Zt.verticalDown:r=Zt.verticalUp:s===Math.abs(t)?t<0?r=Zt.verticalDown:r=Zt.verticalUp:n<0?r=Zt.verticalDown:r=Zt.verticalUp,r}function obe(e,t,n,s,r,a,o,i){let l,u=yE(e,t,n,s),c=gE(r,a,o,i);return u===Zt.verticalUp?c===Zt.horizontalLeft?l=Zt.diagonalUpLeft:l=Zt.diagonalUpRight:c===Zt.horizontalLeft?l=Zt.diagonalDownLeft:l=Zt.diagonalDownRight,l}function ibe(e,t,n,s){let r=e[0]-t[0],a=e[0]-n[0],o=t[0]-n[0],i=e[1]-t[1],l=e[1]-n[1],u=t[1]-n[1],c=Math.max(Math.abs(r),Math.abs(a),Math.abs(o)),p=Math.max(Math.abs(i),Math.abs(l),Math.abs(u)),d=0,h=0,f=0,m=p/(c+1e-5);m>1.5?d+=Ru.DISTANCE_VOTE_POWER:m>.66?h+=Ru.DISTANCE_VOTE_POWER:f+=Ru.DISTANCE_VOTE_POWER;let g=Math.sqrt(r*r+i*i),y=Math.sqrt(a*a+l*l),x=Math.sqrt(o*o+u*u),A=Math.max(g,y,x),b=e[0],w=e[1],k=n[0],C=n[1];A===g?(k=n[0],C=n[1]):A===x&&(b=t[0],w=t[1]);let $=mE([b,w],[k,C]),R=fE($,Ru.TOTAL_ANGLE_VOTE_POWER);d+=R[0],h+=R[1],f+=R[2];for(let S of s){let M=fE(S,Ru.SINGLE_ANGLE_VOTE_POWER);d+=M[0],h+=M[1],f+=M[2]}let P;return d===Math.max(d,h,f)?P=yE(l,i,u,p):f===Math.max(h,f)?P=gE(a,r,o,c):P=obe(l,i,u,p,a,r,o,c),P}function AE(e){let t=[],n=[],s=[],r=[];if(!e)return{curls:s,directions:r};for(let a of ys.all){let o=ys.getPoints(a),i=[],l=[];for(let u of o){let c=e[u[0]],p=e[u[1]],d=mE(c,p),h=d[0],f=d[1];i.push(h),l.push(f)}t.push(i),n.push(l)}for(let a of ys.all){let o=a===ys.thumb?1:0,i=ys.getPoints(a),l=e[i[o][0]],u=e[i[o+1][1]],c=e[i[3][1]],p=abe(l,u,c),d=ibe(l,u,c,t[a].slice(o));s[a]=p,r[a]=d}return{curls:s,directions:r}}function m1(e){if(!e||e.length===0)return null;let t=AE(e),n={};for(let s of ys.all)n[ys.getName(s)]={curl:_i.getName(t.curls[s]),direction:Zt.getName(t.directions[s])};return n}function xE(e){let t=[];if(!e||e.length===0)return t;let n=AE(e);for(let s of pE){let r=s.matchAgainst(n.curls,n.directions);r>=rbe&&t.push({name:s.name,confidence:r})}return t}var bE={thumb:[1,2,3,4],index:[5,6,7,8],middle:[9,10,11,12],ring:[13,14,15,16],pinky:[17,18,19,20],palm:[0]},_u,Du,vE;async function h4(e,t){let n=await vE.estimateHands(e,t);if(!n)return[];let s=[];for(let r=0;rn[r].landmarks[p]);let o=n[r].landmarks,i=[Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,0,0],l=[0,0,0,0];if(o&&o.length>0){for(let c of o)c[0]i[2]&&(i[2]=c[0]),c[1]>i[3]&&(i[3]=c[1]);i[2]-=i[0],i[3]-=i[1],l=[i[0]/(e.shape[2]||0),i[1]/(e.shape[1]||0),i[2]/(e.shape[2]||0),i[3]/(e.shape[1]||0)]}else i=n[r].box?[Math.trunc(Math.max(0,n[r].box.topLeft[0])),Math.trunc(Math.max(0,n[r].box.topLeft[1])),Math.trunc(Math.min(e.shape[2]||0,n[r].box.bottomRight[0])-Math.max(0,n[r].box.topLeft[0])),Math.trunc(Math.min(e.shape[1]||0,n[r].box.bottomRight[1])-Math.max(0,n[r].box.topLeft[1]))]:[0,0,0,0],l=[n[r].box.topLeft[0]/(e.shape[2]||0),n[r].box.topLeft[1]/(e.shape[1]||0),(n[r].box.bottomRight[0]-n[r].box.topLeft[0])/(e.shape[2]||0),(n[r].box.bottomRight[1]-n[r].box.topLeft[1])/(e.shape[1]||0)];let u=m1(o);s.push({id:r,score:Math.round(100*n[r].confidence)/100,boxScore:Math.round(100*n[r].boxConfidence)/100,fingerScore:Math.round(100*n[r].fingerConfidence)/100,label:"hand",box:i,boxRaw:l,keypoints:o,annotations:a,landmarks:u})}return s}async function f4(e){var n,s;me.initial&&(_u=null,Du=null),!_u||!Du?[_u,Du]=await Promise.all([e.hand.enabled?Ve((n=e.hand.detector)==null?void 0:n.modelPath):null,e.hand.landmarks?Ve((s=e.hand.skeleton)==null?void 0:s.modelPath):null]):(e.debug&&ne("cached model:",_u.modelUrl),e.debug&&ne("cached model:",Du.modelUrl));let t=_u?new h1(_u):void 0;return t&&Du&&(vE=new f1(t,Du)),[_u,Du]}var nn=[null,null],lbe=["StatefulPartitionedCall/Postprocessor/Slice","StatefulPartitionedCall/Postprocessor/ExpandDims_1"],Fi=[[0,0],[0,0]],ube=["hand","fist","pinch","point","face","tip","pinchtip"],kE=4,SE=1.6,cbe=512,dbe=1.4,g1=Number.MAX_SAFE_INTEGER,m4=0,Wa=[0,0],tn={boxes:[],hands:[]},IE={thumb:[1,2,3,4],index:[5,6,7,8],middle:[9,10,11,12],ring:[13,14,15,16],pinky:[17,18,19,20],base:[0],palm:[0,17,13,9,5,1,0]};async function CE(e){var t;if(me.initial&&(nn[0]=null),nn[0])e.debug&&ne("cached model:",nn[0].modelUrl);else{y1(["tensorlistreserve","enter","tensorlistfromtensor","merge","loopcond","switch","exit","tensorliststack","nextiteration","tensorlistsetitem","tensorlistgetitem","reciprocal","shape","split","where"],e),nn[0]=await Ve((t=e.hand.detector)==null?void 0:t.modelPath);let n=nn[0].executor?Object.values(nn[0].modelSignature.inputs):void 0;Fi[0][0]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[1].size):0,Fi[0][1]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[2].size):0}return nn[0]}async function TE(e){var t;if(me.initial&&(nn[1]=null),nn[1])e.debug&&ne("cached model:",nn[1].modelUrl);else{nn[1]=await Ve((t=e.hand.skeleton)==null?void 0:t.modelPath);let n=nn[1].executor?Object.values(nn[1].modelSignature.inputs):void 0;Fi[1][0]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[1].size):0,Fi[1][1]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[2].size):0}return nn[1]}async function pbe(e,t){let n=[];if(!e||!nn[0])return n;let s={},r=(e.shape[2]||1)/(e.shape[1]||1),a=Math.min(Math.round((e.shape[1]||0)/8)*8,cbe),o=Math.round(a*r/8)*8;s.resize=Ce.resizeBilinear(e,[a,o]),s.cast=ge(s.resize,"int32"),[s.rawScores,s.rawBoxes]=await nn[0].executeAsync(s.cast,lbe),s.boxes=Ke(s.rawBoxes,[0,2]),s.scores=Ke(s.rawScores,[0]);let i=wn(s.scores,1);Q(i[kE]),i.splice(kE,1),s.filtered=un(i,1),Q(i),s.max=xn(s.filtered,1),s.argmax=Ms(s.filtered,1);let l=0;s.nms=await Ce.nonMaxSuppressionAsync(s.boxes,s.max,(t.hand.maxDetected||0)+1,t.hand.iouThreshold||0,t.hand.minConfidence||1);let u=await s.nms.data(),c=await s.max.data(),p=await s.argmax.data();for(let d of Array.from(u)){let h=Le(s.boxes,d,1),f=await h.data();Q(h);let m=[f[1],f[0],f[3]-f[1],f[2]-f[0]],g=r1(m,dbe),y=[Math.trunc(m[0]*Wa[0]),Math.trunc(m[1]*Wa[1]),Math.trunc(m[2]*Wa[0]),Math.trunc(m[3]*Wa[1])],x=c[d],A=ube[p[d]],b={id:l++,score:x,box:y,boxRaw:g,label:A};n.push(b)}return Object.keys(s).forEach(d=>Q(s[d])),n.sort((d,h)=>h.score-d.score),n.length>(t.hand.maxDetected||1)&&(n.length=t.hand.maxDetected||1),n}async function g4(e,t,n){let s={id:t.id,score:Math.round(100*t.score)/100,boxScore:Math.round(100*t.score)/100,fingerScore:0,box:t.box,boxRaw:t.boxRaw,label:t.label,keypoints:[],landmarks:{},annotations:{}};if(e&&nn[1]&&n.hand.landmarks&&t.score>(n.hand.minConfidence||0)){let r={},a=[t.boxRaw[1],t.boxRaw[0],t.boxRaw[3]+t.boxRaw[1],t.boxRaw[2]+t.boxRaw[0]];r.crop=Ce.cropAndResize(e,[a],[0],[Fi[1][0],Fi[1][1]],"bilinear"),r.div=ye(r.crop,Ze.tf255),[r.score,r.keypoints]=nn[1].execute(r.div,["Identity_1","Identity"]);let o=(await r.score.data())[0],i=(100-Math.trunc(100/(1+Math.exp(o))))/100;if(i>=(n.hand.minConfidence||0)){s.fingerScore=i,r.reshaped=V(r.keypoints,[-1,3]);let c=(await r.reshaped.array()).map(p=>[p[0]/Fi[1][1],p[1]/Fi[1][0],p[2]||0]).map(p=>[p[0]*t.boxRaw[2],p[1]*t.boxRaw[3],p[2]||0]);s.keypoints=c.map(p=>[Wa[0]*(p[0]+t.boxRaw[0]),Wa[1]*(p[1]+t.boxRaw[1]),p[2]||0]),s.landmarks=m1(s.keypoints);for(let p of Object.keys(IE))s.annotations[p]=IE[p].map(d=>s.landmarks&&s.keypoints[d]?s.keypoints[d]:null)}Object.keys(r).forEach(l=>Q(r[l]))}return s}async function y4(e,t){var r,a;if(!((r=nn[0])!=null&&r.executor)||!((a=nn[1])!=null&&a.executor)||!nn[0].inputs[0].shape||!nn[1].inputs[0].shape)return[];Wa=[e.shape[2]||0,e.shape[1]||0],g1++;let n=(t.hand.skipTime||0)>ue()-m4,s=g1<(t.hand.skipFrames||0);return t.skipAllowed&&n&&s?tn.hands:new Promise(async o=>{let i=3*(t.hand.skipTime||0)>ue()-m4,l=g1<3*(t.hand.skipFrames||0);t.skipAllowed&&tn.hands.length===t.hand.maxDetected?tn.hands=await Promise.all(tn.boxes.map(c=>g4(e,c,t))):t.skipAllowed&&i&&l&&tn.hands.length>0?tn.hands=await Promise.all(tn.boxes.map(c=>g4(e,c,t))):(tn.boxes=await pbe(e,t),m4=ue(),tn.hands=await Promise.all(tn.boxes.map(c=>g4(e,c,t))),g1=0);let u=[...tn.boxes];if(tn.boxes.length=0,t.cacheSensitivity>0)for(let c=0;c.05&&p.box[3]/(e.shape[1]||1)>.05&&tn.hands[c].fingerScore&&tn.hands[c].fingerScore>(t.hand.minConfidence||0)){let d=r1(p.box,SE),h=r1(p.boxRaw,SE);tn.boxes.push({...u[c],box:d,boxRaw:h})}}for(let c=0;cue()-RE;return t.skipAllowed&&a&&r&&EE===s&&A4[n]?(_E++,A4[n]):new Promise(async l=>{var c;let u=[];if(((c=t.face.insightface)==null?void 0:c.enabled)&&(Hs==null?void 0:Hs.inputs[0].shape)){let p={};p.crop=Ce.resizeBilinear(e,[Hs.inputs[0].shape[2],Hs.inputs[0].shape[1]],!1),p.data=Hs.execute(p.crop);let d=await p.data.data();u=Array.from(d),Object.keys(p).forEach(h=>Q(p[h]))}A4[n]=u,EE=s,RE=ue(),l(u)})}var Pn,A1=[],b4=Number.MAX_SAFE_INTEGER,PE=0,FE=0;async function OE(e){var t;return me.initial&&(Pn=null),Pn?e.debug&&ne("cached model:",Pn.modelUrl):Pn=await Ve((t=e.face.liveness)==null?void 0:t.modelPath),Pn}async function v4(e,t,n,s){var o,i;if(!(Pn!=null&&Pn.executor))return 0;let r=(((o=t.face.liveness)==null?void 0:o.skipTime)||0)>ue()-FE,a=b4<(((i=t.face.liveness)==null?void 0:i.skipFrames)||0);return t.skipAllowed&&r&&a&&PE===s&&A1[n]?(b4++,A1[n]):(b4=0,new Promise(async l=>{let u=Ce.resizeBilinear(e,[Pn!=null&&Pn.inputs[0].shape?Pn.inputs[0].shape[2]:0,Pn!=null&&Pn.inputs[0].shape?Pn.inputs[0].shape[1]:0],!1),c=Pn==null?void 0:Pn.execute(u),p=(await c.data())[0];A1[n]=Math.round(100*p)/100,PE=s,FE=ue(),Q([u,c]),l(A1[n])}))}var Zn;async function w4(e){return!Zn||me.initial?Zn=await Ve(e.segmentation.modelPath):e.debug&&ne("cached model:",Zn.modelUrl),Zn}async function zE(e,t){var r;if(Zn||(Zn=await w4(t)),!(Zn!=null&&Zn.executor)||!((r=Zn==null?void 0:Zn.inputs)!=null&&r[0].shape))return null;let n={};n.resize=Ce.resizeBilinear(e,[Zn.inputs[0].shape?Zn.inputs[0].shape[1]:0,Zn.inputs[0].shape?Zn.inputs[0].shape[2]:0],!1),n.norm=ye(n.resize,Ze.tf255),n.res=Zn.execute(n.norm),n.squeeze=Ke(n.res,0),[n.bgRaw,n.fgRaw]=wn(n.squeeze,2),n.fg=hu(n.fgRaw),n.mul=z(n.fg,Ze.tf255),n.expand=Ft(n.mul,2),n.output=Ce.resizeBilinear(n.expand,[e.shape[1],e.shape[2]]);let s;switch(t.segmentation.mode||"default"){case"default":n.input=Ke(e),n.concat=ct([n.input,n.output],-1),s=ge(n.concat,"int32");break;case"alpha":s=ge(n.output,"int32");break;default:s=Xe(0)}return Object.keys(n).forEach(a=>Q(n[a])),s}var js,k4=[],BE=0,WE=0,VE=Number.MAX_SAFE_INTEGER;async function UE(e){var t;return me.initial&&(js=null),js?e.debug&&ne("cached model:",js.modelUrl):js=await Ve((t=e.face.mobilefacenet)==null?void 0:t.modelPath),js}async function S4(e,t,n,s){var o,i;if(!(js!=null&&js.executor))return[];let r=VE<(((o=t.face.mobilefacenet)==null?void 0:o.skipFrames)||0),a=(((i=t.face.mobilefacenet)==null?void 0:i.skipTime)||0)>ue()-WE;return t.skipAllowed&&a&&r&&BE===s&&k4[n]?(VE++,k4[n]):new Promise(async l=>{var c;let u=[];if(((c=t.face.mobilefacenet)==null?void 0:c.enabled)&&(js==null?void 0:js.inputs[0].shape)){let p={};p.crop=Ce.resizeBilinear(e,[js.inputs[0].shape[2],js.inputs[0].shape[1]],!1),p.data=js.execute(p.crop);let d=await p.data.data();u=Array.from(d),Object.keys(p).forEach(h=>Q(p[h]))}k4[n]=u,BE=s,WE=ue(),l(u)})}var of={};xa(of,{connected:()=>b1,horizontal:()=>I4,kpt:()=>x1,relative:()=>T4,vertical:()=>C4});var x1=["nose","leftEye","rightEye","leftEar","rightEar","leftShoulder","rightShoulder","leftElbow","rightElbow","leftWrist","rightWrist","leftHip","rightHip","leftKnee","rightKnee","leftAnkle","rightAnkle"],I4=[["leftEye","rightEye"],["leftEar","rightEar"],["leftShoulder","rightShoulder"],["leftElbow","rightElbow"],["leftWrist","rightWrist"],["leftHip","rightHip"],["leftKnee","rightKnee"],["leftAnkle","rightAnkle"]],C4=[["leftKnee","leftShoulder"],["rightKnee","rightShoulder"],["leftAnkle","leftKnee"],["rightAnkle","rightKnee"]],T4=[[["leftHip","rightHip"],["leftShoulder","rightShoulder"]],[["leftElbow","rightElbow"],["leftShoulder","rightShoulder"]]],b1={leftLeg:["leftHip","leftKnee","leftAnkle"],rightLeg:["rightHip","rightKnee","rightAnkle"],torso:["leftShoulder","rightShoulder","rightHip","leftHip","leftShoulder"],leftArm:["leftShoulder","leftElbow","leftWrist"],rightArm:["rightShoulder","rightElbow","rightWrist"],head:[]};var HE=.005,qs={keypoints:[],padding:[[0,0],[0,0],[0,0],[0,0]]};function N4(e){for(let t of I4){let n=e.keypoints.findIndex(r=>r.part===t[0]),s=e.keypoints.findIndex(r=>r.part===t[1]);if(e.keypoints[n]&&e.keypoints[s]&&e.keypoints[n].position[0]r&&r.part===t[0]),s=e.keypoints.findIndex(r=>r&&r.part===t[1]);e.keypoints[n]&&e.keypoints[s]&&e.keypoints[n].position[1]u&&u.part===t[0]),r=e.keypoints.findIndex(u=>u&&u.part===t[1]),a=e.keypoints.findIndex(u=>u&&u.part===n[0]),o=e.keypoints.findIndex(u=>u&&u.part===n[1]);if(!e.keypoints[a]||!e.keypoints[o])continue;let i=e.keypoints[s]?[Math.abs(e.keypoints[a].position[0]-e.keypoints[s].position[0]),Math.abs(e.keypoints[o].position[0]-e.keypoints[s].position[0])]:[0,0],l=e.keypoints[r]?[Math.abs(e.keypoints[o].position[0]-e.keypoints[r].position[0]),Math.abs(e.keypoints[a].position[0]-e.keypoints[r].position[0])]:[0,0];if(i[0]>i[1]||l[0]>l[1]){let u=e.keypoints[s];e.keypoints[s]=e.keypoints[r],e.keypoints[r]=u}}}function jE(e){for(let t=0;te.shape[1]?Math.trunc((e.shape[2]-e.shape[1])/2):0,e.shape[2]>e.shape[1]?Math.trunc((e.shape[2]-e.shape[1])/2):0],[e.shape[1]>e.shape[2]?Math.trunc((e.shape[1]-e.shape[2])/2):0,e.shape[1]>e.shape[2]?Math.trunc((e.shape[1]-e.shape[2])/2):0],[0,0]],n.pad=ar(e,qs.padding),n.resize=Ce.resizeBilinear(n.pad,[t,t]);let s=ge(n.resize,"int32");return Object.keys(n).forEach(o=>Q(n[o])),s}function XE(e,t){e.keypoints=e.keypoints.filter(s=>s==null?void 0:s.position);for(let s of e.keypoints)s.position=[s.position[0]*(t[0]+qs.padding[2][0]+qs.padding[2][1])/t[0]-qs.padding[2][0],s.position[1]*(t[1]+qs.padding[1][0]+qs.padding[1][1])/t[1]-qs.padding[1][0]],s.positionRaw=[s.position[0]/t[0],s.position[1]/t[1]];let n=za(e.keypoints.map(s=>s.position),t);return e.box=n.box,e.boxRaw=n.boxRaw,e}var fn,v1=0,E4=Number.MAX_SAFE_INTEGER,$u={boxes:[],bodies:[],last:0};async function KE(e){var t;return me.initial&&(fn=null),fn?e.debug&&ne("cached model:",fn.modelUrl):(y1(["size"],e),fn=await Ve(e.body.modelPath)),v1=(fn==null?void 0:fn.executor)&&((t=fn==null?void 0:fn.inputs)==null?void 0:t[0].shape)?fn.inputs[0].shape[2]:0,v1<64&&(v1=256),fn}function fbe(e,t,n){let s=e[0][0],r=[],a=0;for(let c=0;ct.body.minConfidence){let p=[s[c][1],s[c][0]];r.push({score:Math.round(100*a)/100,part:x1[c],positionRaw:p,position:[Math.round((n.shape[2]||0)*p[0]),Math.round((n.shape[1]||0)*p[1])]})}a=r.reduce((c,p)=>p.score>c?p.score:c,0);let o=[],i=za(r.map(c=>c.position),[n.shape[2],n.shape[1]]),l={};for(let[c,p]of Object.entries(b1)){let d=[];for(let h=0;hg.part===p[h]),m=r.find(g=>g.part===p[h+1]);f&&m&&f.score>(t.body.minConfidence||0)&&m.score>(t.body.minConfidence||0)&&d.push([f.position,m.position])}l[c]=d}let u={id:0,score:a,box:i.box,boxRaw:i.boxRaw,keypoints:r,annotations:l};return N4(u),o.push(u),o}function mbe(e,t,n){let s=[];for(let r=0;rt.body.minConfidence){let i=[];for(let p=0;p<17;p++){let d=a[3*p+2];if(d>t.body.minConfidence){let h=[a[3*p+1],a[3*p+0]];i.push({part:x1[p],score:Math.round(100*d)/100,positionRaw:h,position:[Math.round((n.shape[2]||0)*h[0]),Math.round((n.shape[1]||0)*h[1])]})}}let l=za(i.map(p=>p.position),[n.shape[2],n.shape[1]]),u={};for(let[p,d]of Object.entries(b1)){let h=[];for(let f=0;fy.part===d[f]),g=i.find(y=>y.part===d[f+1]);m&&g&&m.score>(t.body.minConfidence||0)&&g.score>(t.body.minConfidence||0)&&h.push([m.position,g.position])}u[p]=h}let c={id:r,score:o,box:l.box,boxRaw:l.boxRaw,keypoints:[...i],annotations:u};N4(c),s.push(c)}}return s.sort((r,a)=>a.score-r.score),s.length>t.body.maxDetected&&(s.length=t.body.maxDetected),s}async function R4(e,t){var r;if(!(fn!=null&&fn.executor)||!((r=fn==null?void 0:fn.inputs)!=null&&r[0].shape))return[];t.skipAllowed||($u.boxes.length=0),E4++;let n=(t.body.skipTime||0)>ue()-$u.last,s=E4<(t.body.skipFrames||0);return t.skipAllowed&&n&&s?$u.bodies:new Promise(async a=>{let o={};E4=0,o.input=qE(e,v1),o.res=fn==null?void 0:fn.execute(o.input),$u.last=ue();let i=await o.res.array();$u.bodies=o.res.shape[2]===17?fbe(i,t,e):mbe(i,t,e);for(let l of $u.bodies)XE(l,[e.shape[2]||1,e.shape[1]||1]),jE(l.keypoints);Object.keys(o).forEach(l=>Q(o[l])),a($u.bodies)})}var Ir,w1=[],YE=0,_4=Number.MAX_SAFE_INTEGER,S1=0,k1=2.5;async function JE(e){if(!Ir||me.initial){Ir=await Ve(e.object.modelPath);let t=Ir!=null&&Ir.executor?Object.values(Ir.modelSignature.inputs):void 0;S1=Array.isArray(t)?parseInt(t[0].tensorShape.dim[2].size):416}else e.debug&&ne("cached model:",Ir.modelUrl);return Ir}async function gbe(e,t,n){let s=0,r=[],a=S1;for(let u of[1,2,4]){let c=u*13,p=Ke(e.find(y=>y.shape[1]===c**2&&(y.shape[2]||0)===Ed.length)),d=await p.array(),h=Ke(e.find(y=>y.shape[1]===c**2&&(y.shape[2]||0)(n.object.minConfidence||0)&&x!==61){let b=(.5+Math.trunc(y%c))/c,w=(.5+Math.trunc(y/c))/c,k=g[y].map(M=>M*(c/u/a)),[C,E]=[b-k1/u*k[0],w-k1/u*k[1]],[_,$]=[b+k1/u*k[2]-C,w+k1/u*k[3]-E],R=[C,E,_,$];R=R.map(M=>Math.max(0,Math.min(M,1)));let P=[R[0]*t[0],R[1]*t[1],R[2]*t[0],R[3]*t[1]],S={id:s++,score:Math.round(100*A)/100,class:x+1,label:Ed[x].label,box:P.map(M=>Math.trunc(M)),boxRaw:R};r.push(S)}}Q([p,h,f,m])}let o=r.map(u=>[u.boxRaw[1],u.boxRaw[0],u.boxRaw[3],u.boxRaw[2]]),i=r.map(u=>u.score),l=[];if(o&&o.length>0){let u=await Ce.nonMaxSuppressionAsync(o,i,n.object.maxDetected,n.object.iouThreshold,n.object.minConfidence);l=await u.data(),Q(u)}return r=r.filter((u,c)=>l.includes(c)).sort((u,c)=>c.score-u.score),r}async function D4(e,t){if(!(Ir!=null&&Ir.executor))return[];let n=(t.object.skipTime||0)>ue()-YE,s=_4<(t.object.skipFrames||0);return t.skipAllowed&&n&&s&&w1.length>0?(_4++,w1):(_4=0,!me.kernels.includes("mod")||!me.kernels.includes("sparsetodense")?w1:new Promise(async r=>{let a=[e.shape[2]||0,e.shape[1]||0],o=Ce.resizeBilinear(e,[S1,S1],!1),i=ye(o,Ze.tf255),l=at(i,[0,3,1,2]),u;t.object.enabled&&(u=Ir.execute(l)),YE=ue();let c=await gbe(u,a,t);w1=c,Q([o,i,l,...u]),r(c)}))}var uf=["nose","leftEye","rightEye","leftEar","rightEar","leftShoulder","rightShoulder","leftElbow","rightElbow","leftWrist","rightWrist","leftHip","rightHip","leftKnee","rightKnee","leftAnkle","rightAnkle"],ybe=uf.length,lf=uf.reduce((e,t,n)=>(e[t]=n,e),{}),Abe=[["leftHip","leftShoulder"],["leftElbow","leftShoulder"],["leftElbow","leftWrist"],["leftHip","leftKnee"],["leftKnee","leftAnkle"],["rightHip","rightShoulder"],["rightElbow","rightShoulder"],["rightElbow","rightWrist"],["rightHip","rightKnee"],["rightKnee","rightAnkle"],["leftShoulder","rightShoulder"],["leftHip","rightHip"]],OIe=Abe.map(([e,t])=>[lf[e],lf[t]]),eR=[["nose","leftEye"],["leftEye","leftEar"],["nose","rightEye"],["rightEye","rightEar"],["nose","leftShoulder"],["leftShoulder","leftElbow"],["leftElbow","leftWrist"],["leftShoulder","leftHip"],["leftHip","leftKnee"],["leftKnee","leftAnkle"],["nose","rightShoulder"],["rightShoulder","rightElbow"],["rightElbow","rightWrist"],["rightShoulder","rightHip"],["rightHip","rightKnee"],["rightKnee","rightAnkle"]];function tR(e){let t=e.reduce(({maxX:n,maxY:s,minX:r,minY:a},{position:{x:o,y:i}})=>({maxX:Math.max(n,o),maxY:Math.max(s,i),minX:Math.min(r,o),minY:Math.min(a,i)}),{maxX:Number.NEGATIVE_INFINITY,maxY:Number.NEGATIVE_INFINITY,minX:Number.POSITIVE_INFINITY,minY:Number.POSITIVE_INFINITY});return[t.minX,t.minY,t.maxX-t.minX,t.maxY-t.minY]}function nR(e,[t,n],[s,r]){let a=t/s,o=n/r,i=(u,c)=>({id:c,score:u.score,boxRaw:[u.box[0]/r,u.box[1]/s,u.box[2]/r,u.box[3]/s],box:[Math.trunc(u.box[0]*o),Math.trunc(u.box[1]*a),Math.trunc(u.box[2]*o),Math.trunc(u.box[3]*a)],keypoints:u.keypoints.map(({score:p,part:d,position:h})=>({score:p,part:d,position:[Math.trunc(h.x*o),Math.trunc(h.y*a)],positionRaw:[h.x/s,h.y/s]})),annotations:{}});return e.map((u,c)=>i(u,c))}var I1=class{constructor(t,n){fe(this,"priorityQueue");fe(this,"numberOfElements");fe(this,"getElementValue");this.priorityQueue=new Array(t),this.numberOfElements=-1,this.getElementValue=n}enqueue(t){this.priorityQueue[++this.numberOfElements]=t,this.swim(this.numberOfElements)}dequeue(){let t=this.priorityQueue[0];return this.exchange(0,this.numberOfElements--),this.sink(0),this.priorityQueue[this.numberOfElements+1]=null,t}empty(){return this.numberOfElements===-1}size(){return this.numberOfElements+1}all(){return this.priorityQueue.slice(0,this.numberOfElements+1)}max(){return this.priorityQueue[0]}swim(t){for(;t>0&&this.less(Math.floor(t/2),t);)this.exchange(t,Math.floor(t/2)),t=Math.floor(t/2)}sink(t){for(;2*t<=this.numberOfElements;){let n=2*t;if(nn?n:e}function sR(e,t,n,s){let r=n-e,a=s-t;return r*r+a*a}function O4(e,t){return{x:e.x+t.x,y:e.y+t.y}}var Xs,bbe=["MobilenetV1/offset_2/BiasAdd","MobilenetV1/heatmap_2/BiasAdd","MobilenetV1/displacement_fwd_2/BiasAdd","MobilenetV1/displacement_bwd_2/BiasAdd"],C1=1,Fd=16,vbe=50**2;function rR(e,t,n,s,r,a,o=2){let i=y=>({y:a.get(y.y,y.x,e),x:a.get(y.y,y.x,a.shape[2]/2+e)}),l=(y,x,A)=>({y:F4(Math.round(y.y/Fd),0,x-1),x:F4(Math.round(y.x/Fd),0,A-1)}),[u,c]=s.shape,p=l(t.position,u,c),d=i(p),f=O4(t.position,d);for(let y=0;y[lf[d],lf[h]]),o=a.map(([,d])=>d),i=a.map(([d])=>d),l=t.shape[2],u=o.length,c=new Array(l),p=P4(e.part,Fd,n);c[e.part.id]={score:e.score,part:uf[e.part.id],position:p};for(let d=u-1;d>=0;--d){let h=o[d],f=i[d];c[h]&&!c[f]&&(c[f]=rR(d,c[h],f,t,n,r))}for(let d=0;dt){i=!1;break}if(!i)break}return i}function Sbe(e,t){let[n,s,r]=t.shape,a=new I1(n*s*r,({score:o})=>o);for(let o=0;o{var o;let a=(o=r[s])==null?void 0:o.position;return a?sR(n,t,a.y,a.x)<=vbe:!1})}function Ibe(e,t){return t.reduce((s,{position:r,score:a},o)=>(aR(e,r,o)||(s+=a),s),0)/t.length}function Cbe(e,t,n,s,r,a){let o=[],i=Sbe(a,t);for(;o.lengthh.score>a);let p=Ibe(o,c),d=tR(c);p>a&&o.push({keypoints:c,box:d,score:Math.round(100*p)/100})}return o}async function M4(e,t){if(!(Xs!=null&&Xs.executor))return[];let n=Y(()=>{if(!Xs.inputs[0].shape)return[];let o=Ce.resizeBilinear(e,[Xs.inputs[0].shape[2],Xs.inputs[0].shape[1]]),i=Ae(ye(ge(o,"float32"),127.5),1),u=Xs.execute(i,bbe).map(c=>Ke(c,[0]));return u[1]=On(u[1]),u}),s=await Promise.all(n.map(o=>o.buffer()));for(let o of n)Q(o);let r=Cbe(s[0],s[1],s[2],s[3],t.body.maxDetected,t.body.minConfidence);return Xs.inputs[0].shape?nR(r,[e.shape[1],e.shape[2]],[Xs.inputs[0].shape[2],Xs.inputs[0].shape[1]]):[]}async function oR(e){return!Xs||me.initial?Xs=await Ve(e.body.modelPath):e.debug&&ne("cached model:",Xs.modelUrl),Xs}var fa,Tbe=["fgr","pha","r1o","r2o","r3o","r4o"],mn={},L4=0;function uR(e){Q([mn.r1i,mn.r2i,mn.r3i,mn.r4i,mn.downsample_ratio]),mn.r1i=Xe(0),mn.r2i=Xe(0),mn.r3i=Xe(0),mn.r4i=Xe(0),L4=e.segmentation.ratio||.5,mn.downsample_ratio=Xe(L4)}async function B4(e){return!fa||me.initial?fa=await Ve(e.segmentation.modelPath):e.debug&&ne("cached model:",fa.modelUrl),uR(e),fa}var lR=e=>Y(()=>{let t=Ke(e,[0]),n=z(t,Ze.tf255);return ge(n,"int32")});function z4(e,t){let n=e?lR(e):ca([t.shape[1]||0,t.shape[2]||0,3],255,"int32"),s=t?lR(t):ca([e.shape[1]||0,e.shape[2]||0,1],255,"int32"),r=ct([n,s],-1);return Q([n,s]),r}function Nbe(e){return Y(()=>{let t={};return t.unstack=wn(e,-1),t.concat=ct(t.unstack,1),t.split=qt(t.concat,4,1),t.stack=ct(t.split,2),t.squeeze=Ke(t.stack,[0]),t.expand=Ft(t.squeeze,-1),t.add=de(t.expand,1),t.mul=z(t.add,127.5),t.cast=ge(t.mul,"int32"),t.tile=bs(t.cast,[1,1,3]),t.alpha=ca([t.tile.shape[0]||0,t.tile.shape[1]||0,1],255,"int32"),ct([t.tile,t.alpha],-1)})}async function cR(e,t){if(fa||(fa=await B4(t)),!(fa!=null&&fa.executor))return null;mn.src=ye(e,255),L4!==t.segmentation.ratio&&uR(t);let[n,s,r,a,o,i]=await fa.executeAsync(mn,Tbe),l;switch(t.segmentation.mode||"default"){case"default":l=z4(n,s);break;case"alpha":l=z4(null,s);break;case"foreground":l=z4(n,null);break;case"state":l=Nbe(r);break;default:l=Xe(0)}return Q([mn.src,n,s,mn.r1i,mn.r2i,mn.r3i,mn.r4i]),[mn.r1i,mn.r2i,mn.r3i,mn.r4i]=[r,a,o,i],l}var Yn;async function W4(e){return!Yn||me.initial?Yn=await Ve(e.segmentation.modelPath):e.debug&&ne("cached model:",Yn.modelUrl),Yn}async function pR(e,t){var r;if(Yn||(Yn=await W4(t)),!(Yn!=null&&Yn.executor)||!((r=Yn==null?void 0:Yn.inputs)!=null&&r[0].shape))return null;let n={};n.resize=Ce.resizeBilinear(e,[Yn.inputs[0].shape?Yn.inputs[0].shape[1]:0,Yn.inputs[0].shape?Yn.inputs[0].shape[2]:0],!1),n.norm=ye(n.resize,Ze.tf255),n.res=Yn.execute(n.norm),n.squeeze=Ke(n.res,0),n.alpha=Ce.resizeBilinear(n.squeeze,[e.shape[1],e.shape[2]]),n.mul=z(n.alpha,Ze.tf255);let s;switch(t.segmentation.mode||"default"){case"default":n.input=Ke(e),n.concat=ct([n.input,n.mul],-1),s=ge(n.concat,"int32");break;case"alpha":s=ge(n.mul,"int32");break;default:s=Xe(0)}return Object.keys(n).forEach(a=>Q(n[a])),s}var Ks,T1=[],fR=0,mR=0,V4=Number.MAX_SAFE_INTEGER;async function gR(e){return me.initial&&(Ks=null),Ks?e.debug&&ne("cached model:",Ks.modelUrl):Ks=await Ve(e.face.ssrnet.modelPathAge),Ks}async function U4(e,t,n,s){var o,i,l,u;if(!Ks)return{age:0};let r=V4<(((o=t.face.ssrnet)==null?void 0:o.skipFrames)||0),a=(((i=t.face.ssrnet)==null?void 0:i.skipTime)||0)>ue()-mR;return t.skipAllowed&&r&&a&&fR===s&&((l=T1[n])==null?void 0:l.age)&&((u=T1[n])==null?void 0:u.age)>0?(V4++,T1[n]):(V4=0,new Promise(async c=>{var h;if(!(Ks!=null&&Ks.inputs)||!Ks.inputs[0]||!Ks.inputs[0].shape)return;let p={};p.resize=Ce.resizeBilinear(e,[Ks.inputs[0].shape[2],Ks.inputs[0].shape[1]],!1),p.enhance=z(p.resize,Ze.tf255);let d={age:0};if((h=t.face.ssrnet)!=null&&h.enabled&&(p.age=Ks.execute(p.enhance)),p.age){let f=await p.age.data();d.age=Math.trunc(10*f[0])/10}Object.keys(p).forEach(f=>Q(p[f])),T1[n]=d,fR=s,mR=ue(),c(d)}))}var Cr,N1=[],AR=0,xR=0,G4=Number.MAX_SAFE_INTEGER,H4=[.2989,.587,.114];async function bR(e){var t;return me.initial&&(Cr=null),Cr?e.debug&&ne("cached model:",Cr.modelUrl):Cr=await Ve((t=e.face.ssrnet)==null?void 0:t.modelPathGender),Cr}async function j4(e,t,n,s){var o,i,l,u;if(!Cr)return{gender:"unknown",genderScore:0};let r=G4<(((o=t.face.ssrnet)==null?void 0:o.skipFrames)||0),a=(((i=t.face.ssrnet)==null?void 0:i.skipTime)||0)>ue()-xR;return t.skipAllowed&&r&&a&&AR===s&&((l=N1[n])==null?void 0:l.gender)&&((u=N1[n])==null?void 0:u.genderScore)>0?(G4++,N1[n]):(G4=0,new Promise(async c=>{var f;if(!(Cr!=null&&Cr.inputs[0].shape))return;let p={};p.resize=Ce.resizeBilinear(e,[Cr.inputs[0].shape[2],Cr.inputs[0].shape[1]],!1),p.enhance=Y(()=>{let[m,g,y]=qt(p.resize,3,3),x=z(m,H4[0]),A=z(g,H4[1]),b=z(y,H4[2]),w=N0([x,A,b]);return z(Ae(w,Ze.tf05),2)});let d={gender:"unknown",genderScore:0};(f=t.face.ssrnet)!=null&&f.enabled&&(p.gender=Cr.execute(p.enhance));let h=await p.gender.data();d.gender=h[0]>h[1]?"female":"male",d.genderScore=h[0]>h[1]?Math.trunc(100*h[0])/100:Math.trunc(100*h[1])/100,Object.keys(p).forEach(m=>Q(p[m])),N1[n]=d,AR=s,xR=ue(),c(d)}))}var cf=class{constructor(){fe(this,"ssrnetage",null);fe(this,"gear",null);fe(this,"blazeposedetect",null);fe(this,"blazepose",null);fe(this,"centernet",null);fe(this,"efficientpose",null);fe(this,"mobilefacenet",null);fe(this,"insightface",null);fe(this,"emotion",null);fe(this,"facedetect",null);fe(this,"faceiris",null);fe(this,"facemesh",null);fe(this,"faceres",null);fe(this,"ssrnetgender",null);fe(this,"handpose",null);fe(this,"handskeleton",null);fe(this,"handtrack",null);fe(this,"liveness",null);fe(this,"meet",null);fe(this,"movenet",null);fe(this,"nanodet",null);fe(this,"posenet",null);fe(this,"selfie",null);fe(this,"rvm",null);fe(this,"antispoof",null)}},ee,q4=e=>{e&&(ee=e),ee||ne("instance not registred");let t=0,n=0,s=0;for(let a of Object.values(wr))t+=a.sizeFromManifest,n+=a.sizeLoadedWeights,s+=a.sizeDesired;let r=s>0?n/s:0;return{numLoadedModels:Object.values(wr).length,numDefinedModels:Object.keys(ee.models).length,percentageLoaded:r,totalSizeFromManifest:t,totalSizeWeights:n,totalSizeLoading:s,totalSizeEnabled:void 0,modelStats:Object.values(wr)}};function E1(e){e&&(ee=e);for(let t of Object.keys(ee.models))ee.models[t]=null}async function X4(e){var t,n,s,r,a,o,i,l,u,c,p,d,h,f,m,g,y,x,A,b,w,k,C,E,_,$,R,P,S;e&&(ee=e),ee||ne("instance not registred"),me.initial&&E1(ee),ee.config.hand.enabled&&(!ee.models.handpose&&((n=(t=ee.config.hand.detector)==null?void 0:t.modelPath)==null?void 0:n.includes("handdetect"))&&([ee.models.handpose,ee.models.handskeleton]=await f4(ee.config)),!ee.models.handskeleton&&ee.config.hand.landmarks&&((r=(s=ee.config.hand.detector)==null?void 0:s.modelPath)==null?void 0:r.includes("handdetect"))&&([ee.models.handpose,ee.models.handskeleton]=await f4(ee.config))),ee.config.body.enabled&&!ee.models.blazepose&&((a=ee.config.body.modelPath)==null?void 0:a.includes("blazepose"))&&(ee.models.blazepose=SN(ee.config)),ee.config.body.enabled&&!ee.models.blazeposedetect&&ee.config.body.detector&&ee.config.body.detector.modelPath&&(ee.models.blazeposedetect=kN(ee.config)),ee.config.body.enabled&&!ee.models.efficientpose&&((o=ee.config.body.modelPath)==null?void 0:o.includes("efficientpose"))&&(ee.models.efficientpose=RN(ee.config)),ee.config.body.enabled&&!ee.models.movenet&&((i=ee.config.body.modelPath)==null?void 0:i.includes("movenet"))&&(ee.models.movenet=KE(ee.config)),ee.config.body.enabled&&!ee.models.posenet&&((l=ee.config.body.modelPath)==null?void 0:l.includes("posenet"))&&(ee.models.posenet=oR(ee.config)),ee.config.face.enabled&&!ee.models.facedetect&&(ee.models.facedetect=fN(ee.config)),ee.config.face.enabled&&((u=ee.config.face.antispoof)==null?void 0:u.enabled)&&!ee.models.antispoof&&(ee.models.antispoof=eN(ee.config)),ee.config.face.enabled&&((c=ee.config.face.liveness)==null?void 0:c.enabled)&&!ee.models.liveness&&(ee.models.liveness=OE(ee.config)),ee.config.face.enabled&&((p=ee.config.face.description)==null?void 0:p.enabled)&&!ee.models.faceres&&(ee.models.faceres=ZN(ee.config)),ee.config.face.enabled&&((d=ee.config.face.emotion)==null?void 0:d.enabled)&&!ee.models.emotion&&(ee.models.emotion=PN(ee.config)),ee.config.face.enabled&&((h=ee.config.face.iris)==null?void 0:h.enabled)&&!((f=ee.config.face.attention)!=null&&f.enabled)&&!ee.models.faceiris&&(ee.models.faceiris=LN(ee.config)),ee.config.face.enabled&&((m=ee.config.face.mesh)==null?void 0:m.enabled)&&!ee.models.facemesh&&(ee.models.facemesh=HN(ee.config)),ee.config.face.enabled&&((g=ee.config.face.gear)==null?void 0:g.enabled)&&!ee.models.gear&&(ee.models.gear=QN(ee.config)),ee.config.face.enabled&&((y=ee.config.face.ssrnet)==null?void 0:y.enabled)&&!ee.models.ssrnetage&&(ee.models.ssrnetage=gR(ee.config)),ee.config.face.enabled&&((x=ee.config.face.ssrnet)==null?void 0:x.enabled)&&!ee.models.ssrnetgender&&(ee.models.ssrnetgender=bR(ee.config)),ee.config.face.enabled&&((A=ee.config.face.mobilefacenet)==null?void 0:A.enabled)&&!ee.models.mobilefacenet&&(ee.models.mobilefacenet=UE(ee.config)),ee.config.face.enabled&&((b=ee.config.face.insightface)==null?void 0:b.enabled)&&!ee.models.insightface&&(ee.models.insightface=DE(ee.config)),ee.config.hand.enabled&&!ee.models.handtrack&&((k=(w=ee.config.hand.detector)==null?void 0:w.modelPath)==null?void 0:k.includes("handtrack"))&&(ee.models.handtrack=CE(ee.config)),ee.config.hand.enabled&&ee.config.hand.landmarks&&!ee.models.handskeleton&&((E=(C=ee.config.hand.detector)==null?void 0:C.modelPath)==null?void 0:E.includes("handtrack"))&&(ee.models.handskeleton=TE(ee.config)),ee.config.object.enabled&&!ee.models.centernet&&((_=ee.config.object.modelPath)==null?void 0:_.includes("centernet"))&&(ee.models.centernet=TN(ee.config)),ee.config.object.enabled&&!ee.models.nanodet&&(($=ee.config.object.modelPath)==null?void 0:$.includes("nanodet"))&&(ee.models.nanodet=JE(ee.config)),ee.config.segmentation.enabled&&!ee.models.selfie&&((R=ee.config.segmentation.modelPath)==null?void 0:R.includes("selfie"))&&(ee.models.selfie=W4(ee.config)),ee.config.segmentation.enabled&&!ee.models.meet&&((P=ee.config.segmentation.modelPath)==null?void 0:P.includes("meet"))&&(ee.models.meet=w4(ee.config)),ee.config.segmentation.enabled&&!ee.models.rvm&&((S=ee.config.segmentation.modelPath)==null?void 0:S.includes("rvm"))&&(ee.models.rvm=B4(ee.config));for await(let M of Object.keys(ee.models))ee.models[M]&&typeof ee.models[M]!="undefined"&&(ee.models[M]=await ee.models[M])}function R1(e,t,n){var u,c;if(!t||(e&&(ee=e),ee||ne("instance not registred"),!((u=ee==null?void 0:ee.config)!=null&&u.validateModels)))return null;let s=["const","placeholder","noop","pad","squeeze","add","sub","mul","div"],r=["biasadd","fusedbatchnormv3","matmul","switch","shape","merge","split","broadcastto"],a=[],o=[],i=t.modelUrl,l=t.executor;if((c=l==null?void 0:l.graph)!=null&&c.nodes)for(let p of Object.values(l.graph.nodes)){let d=p.op.toLowerCase();a.includes(d)||a.push(d)}else!l&&ee.config.debug&&ne("model not loaded",n);for(let p of a)!s.includes(p)&&!r.includes(p)&&!ee.env.kernels.includes(p)&&!ee.env.kernels.includes(p.replace("_",""))&&!ee.env.kernels.includes(p.replace("native",""))&&!ee.env.kernels.includes(p.replace("v2",""))&&o.push(p);return ee.config.debug&&o.length>0&&ne("model validation failed:",n,o),o.length>0?{name:n,missing:o,ops:a,url:i}:null}function _1(e){e&&(ee=e),ee||ne("instance not registred");let t=[];for(let n of Object.keys(e.models)){let s=e.models[n];if(!s)continue;let r=R1(e,s,n);r&&t.push(r)}return t}var Dt={name:"humangl",priority:999,canvas:null,gl:null,extensions:[],webGLattr:{alpha:!1,antialias:!1,premultipliedAlpha:!1,preserveDrawingBuffer:!1,depth:!1,stencil:!1,failIfMajorPerformanceCaveat:!1,desynchronized:!0}};function Ebe(){let e=Dt.gl;!e||(Dt.extensions=e.getSupportedExtensions())}function wR(e){var t;if(e.config.backend==="humangl"&&(Dt.name in Qt().registry&&!((t=Dt==null?void 0:Dt.gl)!=null&&t.getParameter(Dt.gl.VERSION))&&(ne("humangl error: backend invalid context"),E1(e)),!eA(Dt.name))){try{Dt.canvas=vr(100,100)}catch(s){ne("humangl error: cannot create canvas:",s);return}try{if(Dt.gl=Dt.canvas.getContext("webgl2",Dt.webGLattr),!Dt.gl){ne("humangl error: cannot get webgl context");return}if(!Dt.gl.getParameter(Dt.gl.VERSION).includes("2.0")){ne("backend override: using fallback webgl backend as webgl 2.0 is not detected"),e.config.backend="webgl";return}Dt.canvas&&(Dt.canvas.addEventListener("webglcontextlost",r=>{throw ne("humangl error:",r.type),ne("possible browser memory leak using webgl or conflict with multiple backend registrations"),e.emit("error"),new Error("backend error: webgl context lost")}),Dt.canvas.addEventListener("webglcontextrestored",r=>{ne("humangl error: context restored:",r)}),Dt.canvas.addEventListener("webglcontextcreationerror",r=>{ne("humangl error: context create:",r)}))}catch(s){ne("humangl error: cannot get webgl context:",s);return}try{D2(2,Dt.gl)}catch(s){ne("humangl error: cannot set webgl context:",s);return}try{let s=new lc(Dt.gl);lu(Dt.name,()=>new Ad(s),Dt.priority)}catch(s){ne("humangl error: cannot register webgl backend:",s);return}try{ra("webgl").forEach(r=>{let a={...r,backendName:Dt.name};rr(a)})}catch(s){ne("humangl error: cannot update webgl backend registration:",s);return}try{H().flagRegistry.WEBGL_VERSION&&H().set("WEBGL_VERSION",2)}catch(s){ne("humangl error: cannot set WebGL backend flags:",s);return}Ebe();let n=Us().getGPGPUContext?Us().getGPGPUContext().gl:null;n?e.config.debug&&ne("humangl backend registered:",{webgl:n.getParameter(n.VERSION),renderer:n.getParameter(n.RENDERER)}):ne("humangl error: no current gl context:",n,Dt.gl)}}function Rbe(e){let t=[];if(!me.kernels.includes("mod")){let n={kernelName:"Mod",backendName:dn(),kernelFunc:s=>Y(()=>Ae(s.inputs.a,z(ye(s.inputs.a,s.inputs.b),s.inputs.b)))};rr(n),me.kernels.push("mod"),t.push("mod")}if(!me.kernels.includes("floormod")){let n={kernelName:"FloorMod",backendName:dn(),kernelFunc:s=>Y(()=>de(z(Jc(s.inputs.a/s.inputs.b),s.inputs.b),pu(s.inputs.a,s.inputs.b)))};rr(n),me.kernels.push("floormod"),t.push("floormod")}if(!me.kernels.includes("rotatewithoffset")&&e.softwareKernels){let n={kernelName:"RotateWithOffset",backendName:dn(),kernelFunc:s=>Y(()=>{let r=dn();hh("cpu");let a=Ce.rotateWithOffset(s.inputs.image,s.attrs.radians,s.attrs.fillValue,s.attrs.center);return hh(r),a})};rr(n),me.kernels.push("rotatewithoffset"),t.push("rotatewithoffset")}t.length>0&&e.debug&&ne("registered kernels:",t)}var SR={};async function df(e,t=!1){if(e.state="backend",t||me.initial||e.config.backend&&e.config.backend.length>0&&dn()!==e.config.backend){let n=ue();if(e.config.backend&&e.config.backend.length>0){if(typeof window=="undefined"&&typeof WorkerGlobalScope!="undefined"&&e.config.debug&&e.config.debug&&ne("running inside web worker"),me.browser&&e.config.backend==="tensorflow"&&(e.config.debug&&ne("override: backend set to tensorflow while running in browser"),e.config.backend="webgl"),me.node&&(e.config.backend==="webgl"||e.config.backend==="humangl")&&(e.config.debug&&ne(`override: backend set to ${e.config.backend} while running in nodejs`),e.config.backend="tensorflow"),me.browser&&e.config.backend==="webgpu")if(typeof navigator=="undefined"||typeof navigator.gpu=="undefined")ne("override: backend set to webgpu but browser does not support webgpu"),e.config.backend="webgl";else{let r=await navigator.gpu.requestAdapter();if(e.config.debug&&ne("enumerated webgpu adapter:",r),!r)ne("override: backend set to webgpu but browser reports no available gpu"),e.config.backend="webgl";else{let a="requestAdapterInfo"in r?await r.requestAdapterInfo():void 0;ne("webgpu adapter info:",a)}}let s=Object.keys(Qt().registryFactory);if(e.config.backend==="humangl"&&!s.includes("humangl")&&(wR(e),s=Object.keys(Qt().registryFactory)),e.config.debug&&ne("available backends:",s),s.includes(e.config.backend)||(ne(`error: backend ${e.config.backend} not found in registry`),e.config.backend=me.node?"tensorflow":"webgl",e.config.debug&&ne(`override: setting backend ${e.config.backend}`)),e.config.debug&&ne("setting backend:",[e.config.backend]),e.config.backend==="wasm"){if(H().flagRegistry.CANVAS2D_WILL_READ_FREQUENTLY&&H().set("CANVAS2D_WILL_READ_FREQUENTLY",!0),e.config.debug&&ne("wasm path:",e.config.wasmPath),typeof L2!="undefined")L2(e.config.wasmPath,e.config.wasmPlatformFetch);else throw new Error("backend error: attempting to use wasm backend but wasm path is not set");let r=!1,a=!1;try{r=await H().getAsync("WASM_HAS_MULTITHREAD_SUPPORT"),a=await H().getAsync("WASM_HAS_SIMD_SUPPORT"),e.config.debug&&ne(`wasm execution: ${a?"simd":"no simd"} ${r?"multithreaded":"singlethreaded"}`),e.config.debug&&!a&&ne("warning: wasm simd support is not enabled")}catch(o){ne("wasm detection failed")}}try{await hh(e.config.backend),await fh()}catch(r){return ne("error: cannot set backend:",e.config.backend,r),!1}e.config.debug&&(SR=JSON.parse(JSON.stringify(H().flags)))}if((dn()==="humangl"||dn()==="webgl")&&(H().flagRegistry.WEBGL_USE_SHAPES_UNIFORMS&&H().set("WEBGL_USE_SHAPES_UNIFORMS",!0),H().flagRegistry.WEBGL_EXP_CONV&&H().set("WEBGL_EXP_CONV",!0),e.config.debug&&typeof e.config.deallocate!="undefined"&&e.config.deallocate&&(ne("changing webgl: WEBGL_DELETE_TEXTURE_THRESHOLD:",!0),H().set("WEBGL_DELETE_TEXTURE_THRESHOLD",0))),dn(),e.config.debug){let s=H().flags,r={};for(let a of Object.keys(s))SR[a]!==s[a]&&(r[a]=s[a]);e.config.debug&&Object.keys(r).length>0&&ne("backend:",dn(),"flags:",r)}if(e.config.flags&&Object.keys(e.config.flags).length>0){e.config.debug&&ne("flags:",e.config.flags);for(let[s,r]of Object.entries(e.config.flags))H().set(s,r)}Jy(),nN(),e.performance.initBackend=Math.trunc(ue()-n),e.config.backend=dn(),await me.updateBackend(),Rbe(e.config),me.initial=!1}return!0}function y1(e,t){for(let n of e){let s={kernelName:n,backendName:t.backend,kernelFunc:()=>{t.debug&&ne("kernelFunc",n,t.backend)}};rr(s)}me.kernels=ra(dn()).map(n=>n.kernelName.toLowerCase())}var tv={};xa(tv,{all:()=>ev,body:()=>zd,canvas:()=>Q4,face:()=>Md,gesture:()=>Wd,hand:()=>Ld,object:()=>Bd,options:()=>Jn,person:()=>J4});var ur=e=>{if(!e)ne("draw error: invalid canvas");else if(!e.getContext)ne("draw error: canvas context not defined");else{let t=e.getContext("2d");if(!t)ne("draw error: cannot get canvas context");else return t}return null},Pu=e=>Math.round(e*180/Math.PI),Va=(e,t)=>{if(!t.useDepth||typeof e=="undefined")return t.color;let n=Uint8ClampedArray.from([127+2*e,127-2*e,255]);return`rgba(${n[0]}, ${n[1]}, ${n[2]}, ${t.alpha})`};function Ua(e,t,n,s,r){e.fillStyle=Va(s,r),e.beginPath(),e.arc(t,n,r.pointSize,0,2*Math.PI),e.fill()}function ma(e,t,n,s,r,a){if(e.beginPath(),e.lineWidth=a.lineWidth,a.useCurves){let o=(t+t+s)/2,i=(n+n+r)/2;e.ellipse(o,i,s/2,r/2,0,0,2*Math.PI)}else e.moveTo(t+a.roundRect,n),e.lineTo(t+s-a.roundRect,n),e.quadraticCurveTo(t+s,n,t+s,n+a.roundRect),e.lineTo(t+s,n+r-a.roundRect),e.quadraticCurveTo(t+s,n+r,t+s-a.roundRect,n+r),e.lineTo(t+a.roundRect,n+r),e.quadraticCurveTo(t,n+r,t,n+r-a.roundRect),e.lineTo(t,n+a.roundRect),e.quadraticCurveTo(t,n,t+a.roundRect,n),e.closePath();e.stroke()}function K4(e,t,n){if(!(t.length<2)){e.beginPath(),e.moveTo(t[0][0],t[0][1]);for(let s of t)e.strokeStyle=Va(s[2]||0,n),e.lineTo(Math.trunc(s[0]),Math.trunc(s[1]));e.stroke(),n.fillPolygons&&(e.closePath(),e.fill())}}function CR(e,t,n){if(!(t.length<2)){if(e.lineWidth=n.lineWidth,!n.useCurves||t.length<=2){K4(e,t,n);return}e.moveTo(t[0][0],t[0][1]);for(let s=0;s0){let a=e.emotion.map(o=>`${Math.trunc(100*o.score)}% ${o.emotion}`);a.length>3&&(a.length=3),r.push(a.join(" "))}((n=e.rotation)==null?void 0:n.angle)&&((s=e.rotation)==null?void 0:s.gaze)&&(e.rotation.angle.roll&&r.push(`roll: ${Pu(e.rotation.angle.roll)}\xB0 yaw:${Pu(e.rotation.angle.yaw)}\xB0 pitch:${Pu(e.rotation.angle.pitch)}\xB0`),e.rotation.gaze.bearing&&r.push(`gaze: ${Pu(e.rotation.gaze.bearing)}\xB0`)),r.length===0&&r.push("face"),t.fillStyle=gt.color;for(let a=r.length-1;a>=0;a--){let o=Math.max(e.box[0],0),i=a*gt.lineHeight+e.box[1];gt.shadowColor&>.shadowColor!==""&&(t.fillStyle=gt.shadowColor,t.fillText(r[a],o+5,i+16)),t.fillStyle=gt.labelColor,t.fillText(r[a],o+4,i+15)}}}function Dbe(e,t){var n,s,r,a;if(((n=e.annotations)==null?void 0:n.leftEyeIris)&&((s=e.annotations)==null?void 0:s.leftEyeIris[0])){t.strokeStyle=gt.useDepth?"rgba(255, 200, 255, 0.3)":gt.color,t.beginPath();let o=Math.abs(e.annotations.leftEyeIris[3][0]-e.annotations.leftEyeIris[1][0])/2,i=Math.abs(e.annotations.leftEyeIris[4][1]-e.annotations.leftEyeIris[2][1])/2;t.ellipse(e.annotations.leftEyeIris[0][0],e.annotations.leftEyeIris[0][1],o,i,0,0,2*Math.PI),t.stroke(),gt.fillPolygons&&(t.fillStyle=gt.useDepth?"rgba(255, 255, 200, 0.3)":gt.color,t.fill())}if(((r=e.annotations)==null?void 0:r.rightEyeIris)&&((a=e.annotations)==null?void 0:a.rightEyeIris[0])){t.strokeStyle=gt.useDepth?"rgba(255, 200, 255, 0.3)":gt.color,t.beginPath();let o=Math.abs(e.annotations.rightEyeIris[3][0]-e.annotations.rightEyeIris[1][0])/2,i=Math.abs(e.annotations.rightEyeIris[4][1]-e.annotations.rightEyeIris[2][1])/2;t.ellipse(e.annotations.rightEyeIris[0][0],e.annotations.rightEyeIris[0][1],o,i,0,0,2*Math.PI),t.stroke(),gt.fillPolygons&&(t.fillStyle=gt.useDepth?"rgba(255, 255, 200, 0.3)":gt.color,t.fill())}}function $be(e,t){var n;if(gt.drawGaze&&((n=e.rotation)==null?void 0:n.angle)&&typeof Path2D!="undefined"){t.strokeStyle="pink";let s=e.box[0]+e.box[2]/2-e.box[3]*Pu(e.rotation.angle.yaw)/90,r=e.box[1]+e.box[3]/2+e.box[2]*Pu(e.rotation.angle.pitch)/90,a=new Path2D(` +`;var ub=(e,t,n)=>{let s=new RegExp("\\b"+t+" \\w+ (\\w+)","ig");e.replace(s,(r,a)=>(n[a]=0,r))},cb=class{constructor(t,n,s){de(this,"uniform",{});de(this,"attribute",{});de(this,"gl");de(this,"id");de(this,"compile",(t,n)=>{let s=this.gl.createShader(n);return s?(this.gl.shaderSource(s,t),this.gl.compileShader(s),this.gl.getShaderParameter(s,this.gl.COMPILE_STATUS)?s:(ee(`filter: gl compile failed: ${this.gl.getShaderInfoLog(s)||"unknown"}`),null)):(ee("filter: could not create shader"),null)});this.gl=t;let r=this.compile(n,this.gl.VERTEX_SHADER),a=this.compile(s,this.gl.FRAGMENT_SHADER);if(this.id=this.gl.createProgram(),!(!r||!a)){if(!this.id){ee("filter: could not create webgl program");return}if(this.gl.attachShader(this.id,r),this.gl.attachShader(this.id,a),this.gl.linkProgram(this.id),!this.gl.getProgramParameter(this.id,this.gl.LINK_STATUS)){ee(`filter: gl link failed: ${this.gl.getProgramInfoLog(this.id)||"unknown"}`);return}this.gl.useProgram(this.id),ub(n,"attribute",this.attribute);for(let o in this.attribute)this.attribute[o]=this.gl.getAttribLocation(this.id,o);ub(n,"uniform",this.uniform),ub(s,"uniform",this.uniform);for(let o in this.uniform)this.uniform[o]=this.gl.getUniformLocation(this.id,o)}}};function DT(){let e=0,t=null,n=!1,s=-1,r=[null,null],a=[],o=null,i=null,l=vr(100,100),u={},c={INTERMEDIATE:1},p=l.getContext("webgl");if(!p){ee("filter: cannot get webgl context");return}this.gl=p;function d(x,A){if(!(x===l.width&&A===l.height)){if(l.width=x,l.height=A,!o){let b=new Float32Array([-1,-1,0,1,1,-1,1,1,-1,1,0,0,-1,1,0,0,1,-1,1,1,1,1,1,0]);o=p.createBuffer(),p.bindBuffer(p.ARRAY_BUFFER,o),p.bufferData(p.ARRAY_BUFFER,b,p.STATIC_DRAW),p.pixelStorei(p.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0)}p.viewport(0,0,l.width,l.height),r=[null,null]}}function h(x,A){let b=p.createFramebuffer();p.bindFramebuffer(p.FRAMEBUFFER,b);let w=p.createRenderbuffer();p.bindRenderbuffer(p.RENDERBUFFER,w);let k=p.createTexture();return p.bindTexture(p.TEXTURE_2D,k),p.texImage2D(p.TEXTURE_2D,0,p.RGBA,x,A,0,p.RGBA,p.UNSIGNED_BYTE,null),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MAG_FILTER,p.LINEAR),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MIN_FILTER,p.LINEAR),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_S,p.CLAMP_TO_EDGE),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_T,p.CLAMP_TO_EDGE),p.framebufferTexture2D(p.FRAMEBUFFER,p.COLOR_ATTACHMENT0,p.TEXTURE_2D,k,0),p.bindTexture(p.TEXTURE_2D,null),p.bindFramebuffer(p.FRAMEBUFFER,null),{fbo:b,texture:k}}function f(x){return r[x]=r[x]||h(l.width,l.height),r[x]}function m(x=0){if(!i)return;let A=null,b=null,w=!1;e===0?A=t:A=f(s).texture||null,e++,n&&!(x&c.INTERMEDIATE)?(b=null,w=e%2===0):(s=(s+1)%2,b=f(s).fbo||null),p.bindTexture(p.TEXTURE_2D,A),p.bindFramebuffer(p.FRAMEBUFFER,b),p.uniform1f(i.uniform.flipY,w?-1:1),p.drawArrays(p.TRIANGLES,0,6)}function g(x){if(u[x])return i=u[x],p.useProgram((i?i.id:null)||null),i;if(i=new cb(p,CT,x),!i)return ee("filter: could not get webgl program"),null;let A=Float32Array.BYTES_PER_ELEMENT,b=4*A;return p.enableVertexAttribArray(i.attribute.pos),p.vertexAttribPointer(i.attribute.pos,2,p.FLOAT,!1,b,0*A),p.enableVertexAttribArray(i.attribute.uv),p.vertexAttribPointer(i.attribute.uv,2,p.FLOAT,!1,b,2*A),u[x]=i,i}let y={colorMatrix:x=>{let A=new Float32Array(x);A[4]/=255,A[9]/=255,A[14]/=255,A[19]/=255;let b=A[18]===1&&A[3]===0&&A[8]===0&&A[13]===0&&A[15]===0&&A[16]===0&&A[17]===0&&A[19]===0?NT:TT,w=g(b);!w||(p.uniform1fv(w.uniform.m,A),m())},brightness:x=>{let A=(x||0)+1;y.colorMatrix([A,0,0,0,0,0,A,0,0,0,0,0,A,0,0,0,0,0,1,0])},saturation:x=>{let A=(x||0)*2/3+1,b=(A-1)*-.5;y.colorMatrix([A,b,b,0,0,b,A,b,0,0,b,b,A,0,0,0,0,0,1,0])},desaturate:()=>{y.saturation(-1)},contrast:x=>{let A=(x||0)+1,b=-128*(A-1);y.colorMatrix([A,0,0,0,b,0,A,0,0,b,0,0,A,0,b,0,0,0,1,0])},negative:()=>{y.contrast(-2)},hue:x=>{x=(x||0)/180*Math.PI;let A=Math.cos(x),b=Math.sin(x),w=.213,k=.715,C=.072;y.colorMatrix([w+A*(1-w)+b*-w,k+A*-k+b*-k,C+A*-C+b*(1-C),0,0,w+A*-w+b*.143,k+A*(1-k)+b*.14,C+A*-C+b*-.283,0,0,w+A*-w+b*-(1-w),k+A*-k+b*k,C+A*(1-C)+b*C,0,0,0,0,0,1,0])},desaturateLuminance:()=>{y.colorMatrix([.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,0,0,0,1,0])},sepia:()=>{y.colorMatrix([.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0])},brownie:()=>{y.colorMatrix([.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0])},vintagePinhole:()=>{y.colorMatrix([.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0])},kodachrome:()=>{y.colorMatrix([1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0])},technicolor:()=>{y.colorMatrix([1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0])},polaroid:()=>{y.colorMatrix([1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0])},shiftToBGR:()=>{y.colorMatrix([0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0])},convolution:x=>{let A=new Float32Array(x),b=1/l.width,w=1/l.height,k=g(_T);!k||(p.uniform1fv(k.uniform.m,A),p.uniform2f(k.uniform.px,b,w),m())},detectEdges:()=>{y.convolution.call(this,[0,1,0,1,-4,1,0,1,0])},sobelX:()=>{y.convolution.call(this,[-1,0,1,-2,0,2,-1,0,1])},sobelY:()=>{y.convolution.call(this,[-1,-2,-1,0,0,0,1,2,1])},sharpen:x=>{let A=x||1;y.convolution.call(this,[0,-1*A,0,-1*A,1+4*A,-1*A,0,-1*A,0])},emboss:x=>{let A=x||1;y.convolution.call(this,[-2*A,-1*A,0,-1*A,1,1*A,0,1*A,2*A])},blur:x=>{let A=x/7/l.width,b=x/7/l.height,w=g(RT);!w||(p.uniform2f(w.uniform.px,0,b),m(c.INTERMEDIATE),p.uniform2f(w.uniform.px,A,0),m())},pixelate:x=>{let A=x/l.width,b=x/l.height,w=g(ET);!w||(p.uniform2f(w.uniform.size,A,b),m())}};this.add=function(x){let A=Array.prototype.slice.call(arguments,1),b=y[x];a.push({func:b,args:A})},this.reset=function(){a=[]},this.get=function(){return a},this.apply=function(x){d(x.width,x.height),e=0,t||(t=p.createTexture()),p.bindTexture(p.TEXTURE_2D,t),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_S,p.CLAMP_TO_EDGE),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_T,p.CLAMP_TO_EDGE),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MIN_FILTER,p.NEAREST),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MAG_FILTER,p.NEAREST),p.texImage2D(p.TEXTURE_2D,0,p.RGBA,p.RGBA,p.UNSIGNED_BYTE,x);for(let A=0;Ah.data())),o=.99*Math.max(a[0][0],a[1][0],a[2][0]),i=[ye(n[0],s[0]),ye(n[1],s[1]),ye(n[2],s[2])],l=[ye(r[0],s[0]),ye(r[1],s[1]),ye(r[2],s[2])],u=[ge(o,l[0]),ge(o,l[1]),ge(o,l[2])],c=[M(i[0],u[0]),M(i[1],u[1]),M(i[2],u[2])],p=ln([c[0],c[1],c[2]],2),d=W(p,[1,t.shape[0],t.shape[1],3]);return Y([...n,...s,...r,...i,...l,...u,...c,p,t]),d}var b2=3840,_n=null,Dn=null,pd=null,Nt,sr={inputSum:0,cacheDiff:1,sumMethod:0,inputTensor:void 0};function db(){sr.inputSum=0,sr.cacheDiff=1,sr.sumMethod=0,sr.inputTensor=void 0}function vr(e,t){let n;if(pe.browser)if(pe.worker){if(typeof OffscreenCanvas=="undefined")throw new Error("canvas error: attempted to run in web worker but OffscreenCanvas is not supported");n=new OffscreenCanvas(e,t)}else{if(typeof document=="undefined")throw new Error("canvas error: attempted to run in browser but DOM is not defined");n=document.createElement("canvas"),n.width=e,n.height=t}else typeof pe.Canvas!="undefined"?n=new pe.Canvas(e,t):typeof globalThis.Canvas!="undefined"&&(n=new globalThis.Canvas(e,t));return n}function v2(e,t){let n=t||vr(e.width,e.height);return n.getContext("2d").drawImage(e,0,0),n}async function w2(e,t,n=!0){var d,h;if(!e)return t.debug&&ee("input error: input is missing"),{tensor:null,canvas:null};if(!(e instanceof st)&&!(typeof Image!="undefined"&&e instanceof Image)&&!(typeof pe.Canvas!="undefined"&&e instanceof pe.Canvas)&&!(typeof globalThis.Canvas!="undefined"&&e instanceof globalThis.Canvas)&&!(typeof ImageData!="undefined"&&e instanceof ImageData)&&!(typeof ImageBitmap!="undefined"&&e instanceof ImageBitmap)&&!(typeof HTMLImageElement!="undefined"&&e instanceof HTMLImageElement)&&!(typeof HTMLMediaElement!="undefined"&&e instanceof HTMLMediaElement)&&!(typeof HTMLVideoElement!="undefined"&&e instanceof HTMLVideoElement)&&!(typeof HTMLCanvasElement!="undefined"&&e instanceof HTMLCanvasElement)&&!(typeof OffscreenCanvas!="undefined"&&e instanceof OffscreenCanvas))throw new Error("input error: type is not recognized");if(e instanceof st){let f=null;if(e.isDisposedInternal)throw new Error("input error: attempted to use tensor but it is disposed");if(!e.shape)throw new Error("input error: attempted to use tensor without a shape");if(e.shape.length===3){if(e.shape[2]===3)f=Ft(e,0);else if(e.shape[2]===4){let m=fi(e,[0,0,0],[-1,-1,3]);f=Ft(m,0),Y(m)}}else e.shape.length===4&&(e.shape[3]===3?f=Hn(e):e.shape[3]===4&&(f=oo(e,[0,0,0,0],[-1,-1,-1,3])));if(f==null||f.shape.length!==4||f.shape[0]!==1||f.shape[3]!==3)throw new Error(`input error: attempted to use tensor with unrecognized shape: ${e.shape.toString()}`);if(f.dtype==="int32"){let m=me(f,"float32");Y(f),f=m}return{tensor:f,canvas:t.filter.return?Dn:null}}if(typeof e.readyState!="undefined"&&e.readyState<=2)return t.debug&&ee("input stream is not ready"),{tensor:null,canvas:_n};let s=e.naturalWidth||e.videoWidth||e.width||e.shape&&e.shape[1]>0,r=e.naturalHeight||e.videoHeight||e.height||e.shape&&e.shape[2]>0;if(!s||!r)return t.debug&&ee("cannot determine input dimensions"),{tensor:null,canvas:_n};let a=s,o=r;if(a>b2&&(a=b2,o=Math.trunc(a*r/s)),o>b2&&(o=b2,a=Math.trunc(o*s/r)),(((d=t.filter)==null?void 0:d.width)||0)>0?a=t.filter.width:(((h=t.filter)==null?void 0:h.height)||0)>0&&(a=s*((t.filter.height||0)/r)),(t.filter.height||0)>0?o=t.filter.height:(t.filter.width||0)>0&&(o=r*((t.filter.width||0)/s)),!a||!o)throw new Error("input error: cannot determine dimension");(!_n||_n.width!==a||_n.height!==o)&&(_n=vr(a,o));let i=_n.getContext("2d");if(typeof ImageData!="undefined"&&e instanceof ImageData?i.putImageData(e,0,0):t.filter.flip&&typeof i.translate!="undefined"?(i.translate(s,0),i.scale(-1,1),i.drawImage(e,0,0,s,r,0,0,_n.width,_n.height),i.setTransform(1,0,0,1,0,0)):i.drawImage(e,0,0,s,r,0,0,_n.width,_n.height),(!Dn||_n.width!==Dn.width||_n.height!==Dn.height)&&(Dn=vr(_n.width,_n.height)),t.filter.enabled&&pe.webgl.supported?(Nt||(Nt=pe.browser?new DT:null),pe.filter=!!Nt,Nt!=null&&Nt.add?(Nt.reset(),t.filter.brightness!==0&&Nt.add("brightness",t.filter.brightness),t.filter.contrast!==0&&Nt.add("contrast",t.filter.contrast),t.filter.sharpness!==0&&Nt.add("sharpen",t.filter.sharpness),t.filter.blur!==0&&Nt.add("blur",t.filter.blur),t.filter.saturation!==0&&Nt.add("saturation",t.filter.saturation),t.filter.hue!==0&&Nt.add("hue",t.filter.hue),t.filter.negative&&Nt.add("negative"),t.filter.sepia&&Nt.add("sepia"),t.filter.vintage&&Nt.add("brownie"),t.filter.sepia&&Nt.add("sepia"),t.filter.kodachrome&&Nt.add("kodachrome"),t.filter.technicolor&&Nt.add("technicolor"),t.filter.polaroid&&Nt.add("polaroid"),t.filter.pixelate!==0&&Nt.add("pixelate",t.filter.pixelate),Nt.get()>0?Dn=Nt.apply(_n):Dn=Nt.draw(_n)):(t.debug&&ee("input process error: cannot initialize filters"),pe.webgl.supported=!1,t.filter.enabled=!1,v2(_n,Dn))):(v2(_n,Dn),Nt&&(Nt=null),pe.filter=!!Nt),!n)return{tensor:null,canvas:Dn};if(!Dn)throw new Error("canvas error: cannot create output");let l,u=3;if(typeof ImageData!="undefined"&&e instanceof ImageData||e.data&&e.width&&e.height)if(pe.browser&&ra)l=ra?ra.fromPixels(e):null;else{u=e.data.length/e.height/e.width;let f=new Uint8Array(e.data.buffer);l=Ue(f,[e.height,e.width,u],"int32")}else if((!pd||Dn.width!==pd.width||Dn.height!==pd.height)&&(pd=vr(Dn.width,Dn.height)),ra&&pe.browser)t.backend==="webgl"||t.backend==="humangl"||t.backend==="webgpu"?l=ra.fromPixels(Dn):(pd=v2(Dn),l=ra.fromPixels(pd));else{let g=v2(Dn).getContext("2d").getImageData(0,0,a,o);u=g.data.length/a/o;let y=new Uint8Array(g.data.buffer);l=Ue(y,[a,o,u])}if(u===4){let f=fi(l,[0,0,0],[-1,-1,3]);Y(l),l=f}if(!l)throw new Error("input error: cannot create tensor");let c=me(l,"float32"),p=t.filter.equalization?await x2(c):Ft(c,0);return Y([l,c]),{tensor:p,canvas:t.filter.return?Dn:null}}async function $T(e,t){let n=!1;if(e.cacheSensitivity===0||!t.shape||t.shape.length!==4||t.shape[1]>2048||t.shape[2]>2048)return n;if(!sr.inputTensor)sr.inputTensor=Hn(t);else if(sr.inputTensor.shape[1]!==t.shape[1]||sr.inputTensor.shape[2]!==t.shape[2])Y(sr.inputTensor),sr.inputTensor=Hn(t);else{let s={};s.diff=ye(t,sr.inputTensor),s.squared=M(s.diff,s.diff),s.sum=ve(s.squared);let a=(await s.sum.data())[0]/(t.shape[1]||1)/(t.shape[2]||1)/255/3;Y([sr.inputTensor,s.diff,s.squared,s.sum]),sr.inputTensor=Hn(t),n=a<=(e.cacheSensitivity||0)}return n}async function PT(e,t,n){let s={};if(!t||!n||t.shape.length!==4||t.shape.length!==n.shape.length)return e.debug||ee("invalid input tensor or tensor shapes do not match:",t.shape,n.shape),0;if(t.shape[0]!==1||n.shape[0]!==1||t.shape[3]!==3||n.shape[3]!==3)return e.debug||ee("input tensors must be of shape [1, height, width, 3]:",t.shape,n.shape),0;s.input1=Hn(t),s.input2=t.shape[1]!==n.shape[1]||t.shape[2]!==n.shape[2]?ke.resizeBilinear(n,[t.shape[1],t.shape[2]]):Hn(n),s.diff=ye(s.input1,s.input2),s.squared=M(s.diff,s.diff),s.sum=ve(s.squared);let a=(await s.sum.data())[0]/(t.shape[1]||1)/(t.shape[2]||1)/255/3;return Y([s.input1,s.input2,s.diff,s.squared,s.sum]),a}var zh=class{constructor(){de(this,"browser");de(this,"node");de(this,"worker");de(this,"platform","");de(this,"agent","");de(this,"backends",[]);de(this,"initial");de(this,"filter");de(this,"tfjs");de(this,"offscreen");de(this,"perfadd",!1);de(this,"tensorflow",{version:void 0,gpu:void 0});de(this,"wasm",{supported:void 0,backend:void 0,simd:void 0,multithread:void 0});de(this,"webgl",{supported:void 0,backend:void 0,version:void 0,renderer:void 0});de(this,"webgpu",{supported:void 0,backend:void 0,adapter:void 0});de(this,"cpu",{model:void 0,flags:[]});de(this,"kernels",[]);de(this,"Canvas");de(this,"Image");de(this,"ImageData");if(this.browser=typeof navigator!="undefined",this.node=typeof process!="undefined"&&typeof process.versions!="undefined"&&typeof process.versions.node!="undefined",this.tfjs={version:Mh["tfjs-core"]},this.offscreen=typeof OffscreenCanvas!="undefined",this.initial=!0,this.worker=this.browser&&this.offscreen?typeof WorkerGlobalScope!="undefined":void 0,typeof navigator!="undefined"){let t=navigator.userAgent.match(/\(([^()]+)\)/g);if(t!=null&&t[0]){let n=t[0].match(/\(([^()]+)\)/g);this.platform=n!=null&&n[0]?n[0].replace(/\(|\)/g,""):"",this.agent=navigator.userAgent.replace(t[0],""),this.platform[1]&&(this.agent=this.agent.replace(t[1],"")),this.agent=this.agent.replace(/ /g," ")}}else typeof process!="undefined"&&(this.platform=`${process.platform} ${process.arch}`,this.agent=`NodeJS ${process.version}`)}async updateBackend(){this.backends=Object.keys(Jt().registryFactory),this.tensorflow={version:Bs().binding?Bs().binding.TF_Version:void 0,gpu:Bs().binding?Bs().binding.isUsingGpuDevice():void 0},this.wasm.supported=typeof WebAssembly!="undefined",this.wasm.backend=this.backends.includes("wasm"),this.wasm.supported&&this.wasm.backend&&cn()==="wasm"&&(this.wasm.simd=U().get("WASM_HAS_SIMD_SUPPORT"),this.wasm.multithread=U().get("WASM_HAS_MULTITHREAD_SUPPORT"));let t=vr(100,100),n=t?t.getContext("webgl2"):void 0;if(this.webgl.supported=typeof n!="undefined",this.webgl.backend=this.backends.includes("webgl"),this.webgl.supported&&this.webgl.backend&&(cn()==="webgl"||cn()==="humangl")){let s=Bs().gpgpu!=="undefined"?await Bs().getGPGPUContext().gl:null;s&&(this.webgl.version=s.getParameter(s.VERSION),this.webgl.renderer=s.getParameter(s.RENDERER))}this.webgpu.supported=this.browser&&typeof navigator.gpu!="undefined",this.webgpu.backend=this.backends.includes("webgpu");try{if(this.webgpu.supported){let s=await navigator.gpu.requestAdapter();this.webgpu.adapter=s?s.name:void 0}}catch(s){this.webgpu.supported=!1}try{this.kernels=ea(cn()).map(s=>s.kernelName.toLowerCase())}catch(s){}}updateCPU(){let t={model:"",flags:[]};this.node&&this.platform.startsWith("linux"),this.cpu?this.cpu=t:Object.defineProperty(this,"cpu",{value:t})}},pe=new zh;var S2=class{constructor(){de(this,"config");de(this,"element");de(this,"stream");de(this,"start",async t=>{if(t!=null&&t.debug&&(this.config.debug=t==null?void 0:t.debug),t!=null&&t.crop&&(this.config.crop=t==null?void 0:t.crop),t!=null&&t.mode&&(this.config.mode=t==null?void 0:t.mode),t!=null&&t.width&&(this.config.width=t==null?void 0:t.width),t!=null&&t.height&&(this.config.height=t==null?void 0:t.height),t!=null&&t.element)if(typeof t.element=="string"){let r=document.getElementById(t.element);if(r&&r instanceof HTMLVideoElement)this.element=r;else{this.config.debug&&ee("webcam","cannot get dom element",t.element);return}}else if(t.element instanceof HTMLVideoElement)this.element=t.element;else{this.config.debug&&ee("webcam","unknown dom element",t.element);return}else this.element=document.createElement("video");let n={audio:!1,video:{facingMode:this.config.mode==="front"?"user":"environment",resizeMode:this.config.crop?"crop-and-scale":"none",width:{ideal:this.config.width>0?this.config.width:window.innerWidth},height:{ideal:this.config.height>0?this.config.height:window.innerHeight}}};if(this.element.addEventListener("play",()=>{this.config.debug&&ee("webcam","play")}),this.element.addEventListener("pause",()=>{this.config.debug&&ee("webcam","pause")}),this.element.addEventListener("click",async()=>{!this.element||!this.stream||(this.element.paused?await this.element.play():this.element.pause())}),!(navigator!=null&&navigator.mediaDevices)){this.config.debug&&ee("webcam","no devices");return}try{this.stream=await navigator.mediaDevices.getUserMedia(n)}catch(r){ee("webcam",r);return}if(!this.stream){this.config.debug&&ee("webcam","no stream");return}this.element.srcObject=this.stream,await new Promise(r=>{this.element?this.element.onloadeddata=()=>r(!0):r(!1)}),await this.element.play(),this.config.debug&&ee("webcam",{width:this.width,height:this.height,label:this.label,stream:this.stream,track:this.track,settings:this.settings,constraints:this.constraints,capabilities:this.capabilities})});de(this,"pause",()=>{this.element&&this.element.pause()});de(this,"play",async()=>{this.element&&await this.element.play()});de(this,"stop",()=>{this.config.debug&&ee("webcam","stop"),this.track&&this.track.stop()});this.config={element:void 0,debug:!0,mode:"front",crop:!1,width:0,height:0}}get track(){if(!!this.stream)return this.stream.getVideoTracks()[0]}get capabilities(){if(!!this.track)return this.track.getCapabilities?this.track.getCapabilities():void 0}get constraints(){if(!!this.track)return this.track.getConstraints?this.track.getConstraints():void 0}get settings(){if(!this.stream)return;let t=this.stream.getVideoTracks()[0];return t.getSettings?t.getSettings():void 0}get label(){return this.track?this.track.label:""}get paused(){var t;return((t=this.element)==null?void 0:t.paused)||!1}get width(){var t;return((t=this.element)==null?void 0:t.videoWidth)||0}get height(){var t;return((t=this.element)==null?void 0:t.videoHeight)||0}};var pb={};fa(pb,{age:()=>VAe,"anti-spoofing":()=>v5e,antispoof:()=>RAe,blazeface:()=>_Ae,"blazeface-back":()=>UAe,"blazeface-front":()=>GAe,"blazepose-detect":()=>b5e,"blazepose-detector2d":()=>HAe,"blazepose-detector3d":()=>jAe,"blazepose-full":()=>qAe,"blazepose-heavy":()=>XAe,"blazepose-lite":()=>KAe,default:()=>P5e,efficientpose:()=>ZAe,"efficientpose-i-lite":()=>w5e,"efficientpose-ii-lite":()=>k5e,"efficientpose-iv":()=>S5e,emotion:()=>DAe,faceboxes:()=>YAe,facemesh:()=>$Ae,"facemesh-attention":()=>QAe,"facemesh-attention-alt":()=>JAe,"facemesh-detection-full":()=>e5e,"facemesh-detection-short":()=>t5e,"facemesh-orig":()=>n5e,faceres:()=>PAe,"faceres-deep":()=>s5e,gear:()=>r5e,gender:()=>o5e,"gender-ssrnet-imdb":()=>a5e,handdetect:()=>i5e,"handlandmark-full":()=>FAe,"handlandmark-lite":()=>l5e,"handlandmark-sparse":()=>u5e,handskeleton:()=>c5e,handtrack:()=>OAe,"insightface-efficientnet-b0":()=>I5e,"insightface-ghostnet-strides1":()=>C5e,"insightface-ghostnet-strides2":()=>T5e,"insightface-mobilenet-emore":()=>N5e,"insightface-mobilenet-swish":()=>E5e,iris:()=>MAe,liveness:()=>zAe,"mb3-centernet":()=>LAe,meet:()=>d5e,mobileface:()=>p5e,mobilefacenet:()=>h5e,models:()=>BAe,"movenet-lightning":()=>WAe,"movenet-multipose":()=>f5e,"movenet-thunder":()=>m5e,nanodet:()=>g5e,"nanodet-e":()=>R5e,"nanodet-g":()=>_5e,"nanodet-m":()=>D5e,"nanodet-t":()=>$5e,posenet:()=>y5e,rvm:()=>A5e,selfie:()=>x5e});var RAe=853098,_Ae=538928,DAe=820516,$Ae=1477958,PAe=6978814,FAe=5431368,OAe=2964837,MAe=2599092,zAe=592976,LAe=4030290,BAe=0,WAe=4650216,VAe=161240,UAe=538928,GAe=402048,HAe=7499400,jAe=5928856,qAe=6338290,XAe=27501554,KAe=2725490,ZAe=5651240,YAe=2013002,JAe=2387598,QAe=2382414,e5e=1026192,t5e=201268,n5e=2955780,s5e=13957620,r5e=1498916,a5e=161236,o5e=201808,i5e=3515612,l5e=2023432,u5e=5286322,c5e=5502280,d5e=372228,p5e=2183192,h5e=5171976,f5e=9448838,m5e=12477112,g5e=7574558,y5e=5032780,A5e=3739355,x5e=212886,b5e=5928804,v5e=853098,w5e=2269064,k5e=5651240,S5e=25643252,I5e=13013224,C5e=8093408,T5e=8049584,N5e=6938536,E5e=12168584,R5e=12319156,_5e=7574558,D5e=1887474,$5e=5294216,P5e={antispoof:RAe,blazeface:_Ae,emotion:DAe,facemesh:$Ae,faceres:PAe,"handlandmark-full":FAe,handtrack:OAe,iris:MAe,liveness:zAe,"mb3-centernet":LAe,models:BAe,"movenet-lightning":WAe,age:VAe,"blazeface-back":UAe,"blazeface-front":GAe,"blazepose-detector2d":HAe,"blazepose-detector3d":jAe,"blazepose-full":qAe,"blazepose-heavy":XAe,"blazepose-lite":KAe,efficientpose:ZAe,faceboxes:YAe,"facemesh-attention-alt":JAe,"facemesh-attention":QAe,"facemesh-detection-full":e5e,"facemesh-detection-short":t5e,"facemesh-orig":n5e,"faceres-deep":s5e,gear:r5e,"gender-ssrnet-imdb":a5e,gender:o5e,handdetect:i5e,"handlandmark-lite":l5e,"handlandmark-sparse":u5e,handskeleton:c5e,meet:d5e,mobileface:p5e,mobilefacenet:h5e,"movenet-multipose":f5e,"movenet-thunder":m5e,nanodet:g5e,posenet:y5e,rvm:A5e,selfie:x5e,"blazepose-detect":b5e,"anti-spoofing":v5e,"efficientpose-i-lite":w5e,"efficientpose-ii-lite":k5e,"efficientpose-iv":S5e,"insightface-efficientnet-b0":I5e,"insightface-ghostnet-strides1":C5e,"insightface-ghostnet-strides2":T5e,"insightface-mobilenet-emore":N5e,"insightface-mobilenet-swish":E5e,"nanodet-e":R5e,"nanodet-g":_5e,"nanodet-m":D5e,"nanodet-t":$5e};var ps={cacheModels:!0,cacheSupported:!0,verbose:!0,debug:!1,modelBasePath:""},wr={};async function F5e(e,t){return ps.debug&&ee("load model fetch:",e,t),fetch(e,t)}function FT(e){ps.cacheModels=e.cacheModels,ps.verbose=e.debug,ps.modelBasePath=e.modelBasePath}async function Me(e){var u,c,p,d;let t=uv(ps.modelBasePath,e||"");t.toLowerCase().endsWith(".json")||(t+=".json");let n=t.includes("/")?t.split("/"):t.split("\\"),s=n[n.length-1].replace(".json",""),r="indexeddb://"+s;wr[s]={name:s,sizeFromManifest:0,sizeLoadedWeights:0,sizeDesired:pb[s],inCache:!1},ps.cacheSupported=typeof indexedDB!="undefined";let a={};try{a=ps.cacheSupported&&ps.cacheModels?await On.listModels():{}}catch(h){ps.cacheSupported=!1}wr[s].inCache=ps.cacheSupported&&ps.cacheModels&&Object.keys(a).includes(r);let o=typeof fetch=="undefined"?{}:{fetchFunc:(h,f)=>F5e(h,f)},i=new Ch(wr[s].inCache?r:t,o),l=!1;try{i.findIOHandler(),ps.debug&&ee("model load handler:",i.handler)}catch(h){ee("error finding model i/o handler:",t,h)}try{let h=await((u=i.handler)==null?void 0:u.load())||null;wr[s].sizeFromManifest=((c=h==null?void 0:h.weightData)==null?void 0:c.byteLength)||0,h?i.loadSync(h):i=await xx(wr[s].inCache?r:t,o),wr[s].sizeLoadedWeights=((d=(p=i.artifacts)==null?void 0:p.weightData)==null?void 0:d.byteLength)||0,ps.verbose&&ee("load:",{model:s,url:i.modelUrl,bytes:wr[s].sizeLoadedWeights}),l=!0}catch(h){ee("error loading model:",t,h)}if(l&&ps.cacheModels&&ps.cacheSupported&&!wr[s].inCache)try{let h=await i.save(r);ps.debug&&ee("model saved:",r,h)}catch(h){ee("error saving model:",t,h)}return i}var hb="2.11.1";var kd={};fa(kd,{Models:()=>Xh,getModelStats:()=>E4,load:()=>R4,reset:()=>r1,validate:()=>o1,validateModel:()=>a1});var wn,I2=[],fb=Number.MAX_SAFE_INTEGER,OT=0,MT=0;async function zT(e){var t;return pe.initial&&(wn=null),wn?e.debug&&ee("cached model:",wn.modelUrl):wn=await Me((t=e.face.antispoof)==null?void 0:t.modelPath),wn}async function mb(e,t,n,s){var o,i;if(!wn||!(wn!=null&&wn.executor))return 0;let r=(((o=t.face.antispoof)==null?void 0:o.skipTime)||0)>ie()-MT,a=fb<(((i=t.face.antispoof)==null?void 0:i.skipFrames)||0);return t.skipAllowed&&r&&a&&OT===s&&I2[n]?(fb++,I2[n]):(fb=0,new Promise(async l=>{let u=ke.resizeBilinear(e,[wn!=null&&wn.inputs[0].shape?wn.inputs[0].shape[2]:0,wn!=null&&wn.inputs[0].shape?wn.inputs[0].shape[1]:0],!1),c=wn==null?void 0:wn.execute(u),p=(await c.data())[0];I2[n]=Math.round(100*p)/100,OT=s,MT=ie(),Y([u,c]),l(I2[n])}))}var kr={silhouette:[10,338,297,332,284,251,389,356,454,323,361,288,397,365,379,378,400,377,152,148,176,149,150,136,172,58,132,93,234,127,162,21,54,103,67,109],lipsUpperOuter:[185,40,39,37,0,267,269,270,409],lipsLowerOuter:[61,146,91,181,84,17,314,405,321,375,291],lipsUpperInner:[191,80,81,82,13,312,311,310,415],lipsLowerInner:[78,95,88,178,87,14,317,402,318,324,308],lipsLowerSemiOuter:[76,77,90,180,85,16,315,404,320,307,306],lipsUpperSemiOuter:[184,74,73,72,11,302,303,304,408],lipsLowerSemiInner:[62,96,89,179,86,15,316,403,319,325,292],lipsUpperSemiInner:[183,42,41,38,12,268,271,272,407],rightEyeUpper0:[246,161,160,159,158,157,173],rightEyeLower0:[33,7,163,144,145,153,154,155,133],rightEyeUpper1:[247,30,29,27,28,56,190],rightEyeLower1:[130,25,110,24,23,22,26,112,243],rightEyeUpper2:[113,225,224,223,222,221,189],rightEyeLower2:[226,31,228,229,230,231,232,233,244],rightEyeLower3:[143,111,117,118,119,120,121,128,245],rightEyebrowUpper:[156,70,63,105,66,107,55,193],rightEyebrowLower:[35,124,46,53,52,65],rightEyeIris:[473,474,475,476,477],leftEyeUpper0:[466,388,387,386,385,384,398],leftEyeLower0:[263,249,390,373,374,380,381,382,362],leftEyeUpper1:[467,260,259,257,258,286,414],leftEyeLower1:[359,255,339,254,253,252,256,341,463],leftEyeUpper2:[342,445,444,443,442,441,413],leftEyeLower2:[446,261,448,449,450,451,452,453,464],leftEyeLower3:[372,340,346,347,348,349,350,357,465],leftEyebrowUpper:[383,300,293,334,296,336,285,417],leftEyebrowLower:[265,353,276,283,282,295],leftEyeIris:[468,469,470,471,472],midwayBetweenEyes:[168],noseTip:[1],noseBottom:[2],noseRightCorner:[98],noseLeftCorner:[327],rightCheek:[205],leftCheek:[425]},gb={count:468,mouth:13,symmetryLine:[13,kr.midwayBetweenEyes[0]]},mu={leftEye:0,rightEye:1,nose:2,mouth:3,leftEar:4,rightEar:5,symmetryLine:[3,2]},yb=[{key:"EyeUpper0",indices:[9,10,11,12,13,14,15]},{key:"EyeUpper1",indices:[25,26,27,28,29,30,31]},{key:"EyeUpper2",indices:[41,42,43,44,45,46,47]},{key:"EyeLower0",indices:[0,1,2,3,4,5,6,7,8]},{key:"EyeLower1",indices:[16,17,18,19,20,21,22,23,24]},{key:"EyeLower2",indices:[32,33,34,35,36,37,38,39,40]},{key:"EyeLower3",indices:[54,55,56,57,58,59,60,61,62]},{key:"EyebrowUpper",indices:[63,64,65,66,67,68,69,70]},{key:"EyebrowLower",indices:[48,49,50,51,52,53]}],Lh=[[.499976992607117,.652534008026123],[.500025987625122,.547487020492554],[.499974012374878,.602371990680695],[.482113003730774,.471979022026062],[.500150978565216,.527155995368958],[.499909996986389,.498252987861633],[.499523013830185,.40106201171875],[.289712011814117,.380764007568359],[.499954998493195,.312398016452789],[.499987006187439,.269918978214264],[.500023007392883,.107050001621246],[.500023007392883,.666234016418457],[.5000159740448,.679224014282227],[.500023007392883,.692348003387451],[.499976992607117,.695277988910675],[.499976992607117,.70593398809433],[.499976992607117,.719385027885437],[.499976992607117,.737019002437592],[.499967992305756,.781370997428894],[.499816000461578,.562981009483337],[.473773002624512,.573909997940063],[.104906998574734,.254140973091125],[.365929991006851,.409575998783112],[.338757991790771,.41302502155304],[.311120003461838,.409460008144379],[.274657994508743,.389131009578705],[.393361985683441,.403706014156342],[.345234006643295,.344011008739471],[.370094001293182,.346076011657715],[.319321990013123,.347265005111694],[.297903001308441,.353591024875641],[.24779200553894,.410809993743896],[.396889001131058,.842755019664764],[.280097991228104,.375599980354309],[.106310002505779,.399955987930298],[.2099249958992,.391353011131287],[.355807989835739,.534406006336212],[.471751004457474,.65040397644043],[.474155008792877,.680191993713379],[.439785003662109,.657229006290436],[.414617002010345,.66654098033905],[.450374007225037,.680860996246338],[.428770989179611,.682690978050232],[.374971002340317,.727805018424988],[.486716985702515,.547628998756409],[.485300987958908,.527395009994507],[.257764995098114,.314490020275116],[.401223003864288,.455172002315521],[.429818987846375,.548614978790283],[.421351999044418,.533740997314453],[.276895999908447,.532056987285614],[.483370006084442,.499586999416351],[.33721199631691,.282882988452911],[.296391993761063,.293242990970612],[.169294998049736,.193813979625702],[.447580009698868,.302609980106354],[.392390012741089,.353887975215912],[.354490011930466,.696784019470215],[.067304998636246,.730105042457581],[.442739009857178,.572826027870178],[.457098007202148,.584792017936707],[.381974011659622,.694710969924927],[.392388999462128,.694203019142151],[.277076005935669,.271932005882263],[.422551989555359,.563233017921448],[.385919004678726,.281364023685455],[.383103013038635,.255840003490448],[.331431001424789,.119714021682739],[.229923993349075,.232002973556519],[.364500999450684,.189113974571228],[.229622006416321,.299540996551514],[.173287004232407,.278747975826263],[.472878992557526,.666198015213013],[.446828007698059,.668527007102966],[.422762006521225,.673889994621277],[.445307999849319,.580065965652466],[.388103008270264,.693961024284363],[.403039008378983,.706539988517761],[.403629004955292,.693953037261963],[.460041999816895,.557139039039612],[.431158006191254,.692366003990173],[.452181994915009,.692366003990173],[.475387006998062,.692366003990173],[.465828001499176,.779190003871918],[.472328990697861,.736225962638855],[.473087012767792,.717857003211975],[.473122000694275,.704625964164734],[.473033010959625,.695277988910675],[.427942007780075,.695277988910675],[.426479011774063,.703539967536926],[.423162013292313,.711845993995667],[.4183090031147,.720062971115112],[.390094995498657,.639572978019714],[.013953999616206,.560034036636353],[.499913990497589,.58014702796936],[.413199990987778,.69539999961853],[.409626007080078,.701822996139526],[.468080013990402,.601534962654114],[.422728985548019,.585985004901886],[.463079988956451,.593783974647522],[.37211999297142,.47341400384903],[.334562003612518,.496073007583618],[.411671012639999,.546965003013611],[.242175996303558,.14767599105835],[.290776997804642,.201445996761322],[.327338010072708,.256527006626129],[.399509996175766,.748921036720276],[.441727995872498,.261676013469696],[.429764986038208,.187834024429321],[.412198007106781,.108901023864746],[.288955003023148,.398952007293701],[.218936994671822,.435410976409912],[.41278201341629,.398970007896423],[.257135003805161,.355440020561218],[.427684992551804,.437960982322693],[.448339998722076,.536936044692993],[.178560003638268,.45755398273468],[.247308000922203,.457193970680237],[.286267012357712,.467674970626831],[.332827985286713,.460712015628815],[.368755996227264,.447206974029541],[.398963987827301,.432654976844788],[.476410001516342,.405806005001068],[.189241006970406,.523923993110657],[.228962004184723,.348950982093811],[.490725994110107,.562400996685028],[.404670000076294,.485132992267609],[.019469000399113,.401564002037048],[.426243007183075,.420431017875671],[.396993011236191,.548797011375427],[.266469985246658,.376977026462555],[.439121007919312,.51895797252655],[.032313998788595,.644356966018677],[.419054001569748,.387154996395111],[.462783008813858,.505746960639954],[.238978996872902,.779744982719421],[.198220998048782,.831938028335571],[.107550002634525,.540755033493042],[.183610007166862,.740257024765015],[.134409993886948,.333683013916016],[.385764002799988,.883153975009918],[.490967005491257,.579378008842468],[.382384985685349,.508572995662689],[.174399003386497,.397670984268188],[.318785011768341,.39623498916626],[.343364000320435,.400596976280212],[.396100014448166,.710216999053955],[.187885001301765,.588537991046906],[.430987000465393,.944064974784851],[.318993002176285,.898285031318665],[.266247987747192,.869701027870178],[.500023007392883,.190576016902924],[.499976992607117,.954452991485596],[.366169989109039,.398822009563446],[.393207013607025,.39553701877594],[.410373002290726,.391080021858215],[.194993004202843,.342101991176605],[.388664990663528,.362284004688263],[.365961998701096,.355970978736877],[.343364000320435,.355356991291046],[.318785011768341,.35834002494812],[.301414996385574,.363156020641327],[.058132998645306,.319076001644135],[.301414996385574,.387449026107788],[.499987989664078,.618434011936188],[.415838003158569,.624195992946625],[.445681989192963,.566076993942261],[.465844005346298,.620640993118286],[.49992299079895,.351523995399475],[.288718998432159,.819945991039276],[.335278987884521,.852819979190826],[.440512001514435,.902418971061707],[.128294005990028,.791940987110138],[.408771991729736,.373893976211548],[.455606997013092,.451801002025604],[.499877005815506,.908990025520325],[.375436991453171,.924192011356354],[.11421000212431,.615022003650665],[.448662012815475,.695277988910675],[.4480200111866,.704632043838501],[.447111994028091,.715808033943176],[.444831997156143,.730794012546539],[.430011987686157,.766808986663818],[.406787008047104,.685672998428345],[.400738000869751,.681069016456604],[.392399996519089,.677703022956848],[.367855995893478,.663918972015381],[.247923001646996,.601333022117615],[.452769994735718,.420849978923798],[.43639200925827,.359887003898621],[.416164010763168,.368713974952698],[.413385987281799,.692366003990173],[.228018000721931,.683571994304657],[.468268007040024,.352671027183533],[.411361992359161,.804327011108398],[.499989002943039,.469825029373169],[.479153990745544,.442654013633728],[.499974012374878,.439637005329132],[.432112008333206,.493588984012604],[.499886006116867,.866917014122009],[.49991300702095,.821729004383087],[.456548988819122,.819200992584229],[.344549000263214,.745438992977142],[.37890899181366,.574010014533997],[.374292999505997,.780184984207153],[.319687992334366,.570737957954407],[.357154995203018,.604269981384277],[.295284003019333,.621580958366394],[.447750002145767,.862477004528046],[.410986006259918,.508723020553589],[.31395098567009,.775308012962341],[.354128003120422,.812552988529205],[.324548006057739,.703992962837219],[.189096003770828,.646299958229065],[.279776990413666,.71465802192688],[.1338230073452,.682700991630554],[.336768001317978,.644733011722565],[.429883986711502,.466521978378296],[.455527991056442,.548622965812683],[.437114000320435,.558896005153656],[.467287987470627,.529924988746643],[.414712011814117,.335219979286194],[.37704598903656,.322777986526489],[.344107985496521,.320150971412659],[.312875986099243,.32233202457428],[.283526003360748,.333190023899078],[.241245999932289,.382785975933075],[.102986000478268,.468762993812561],[.267612010240555,.424560010433197],[.297879010438919,.433175981044769],[.333433985710144,.433878004550934],[.366427004337311,.426115989685059],[.396012008190155,.416696012020111],[.420121014118195,.41022801399231],[.007561000064015,.480777025222778],[.432949006557465,.569517970085144],[.458638995885849,.479089021682739],[.473466008901596,.545744001865387],[.476087987422943,.563830018043518],[.468472003936768,.555056989192963],[.433990985155106,.582361996173859],[.483518004417419,.562983989715576],[.482482999563217,.57784903049469],[.42645001411438,.389798998832703],[.438998997211456,.39649498462677],[.450067013502121,.400434017181396],[.289712011814117,.368252992630005],[.276670008897781,.363372981548309],[.517862021923065,.471948027610779],[.710287988185883,.380764007568359],[.526226997375488,.573909997940063],[.895093023777008,.254140973091125],[.634069979190826,.409575998783112],[.661242008209229,.41302502155304],[.688880026340485,.409460008144379],[.725341975688934,.389131009578705],[.606630027294159,.40370500087738],[.654766023159027,.344011008739471],[.629905998706818,.346076011657715],[.680678009986877,.347265005111694],[.702096998691559,.353591024875641],[.75221198797226,.410804986953735],[.602918028831482,.842862963676453],[.719901978969574,.375599980354309],[.893692970275879,.399959981441498],[.790081977844238,.391354024410248],[.643998026847839,.534487962722778],[.528249025344849,.65040397644043],[.525849997997284,.680191040039062],[.560214996337891,.657229006290436],[.585384011268616,.66654098033905],[.549625992774963,.680860996246338],[.57122802734375,.682691991329193],[.624852001667023,.72809898853302],[.513050019741058,.547281980514526],[.51509702205658,.527251958847046],[.742246985435486,.314507007598877],[.598631024360657,.454979002475739],[.570338010787964,.548575043678284],[.578631997108459,.533622980117798],[.723087012767792,.532054007053375],[.516445994377136,.499638974666595],[.662801027297974,.282917976379395],[.70362401008606,.293271005153656],[.830704987049103,.193813979625702],[.552385985851288,.302568018436432],[.607609987258911,.353887975215912],[.645429015159607,.696707010269165],[.932694971561432,.730105042457581],[.557260990142822,.572826027870178],[.542901992797852,.584792017936707],[.6180260181427,.694710969924927],[.607590973377228,.694203019142151],[.722943007946014,.271963000297546],[.577413976192474,.563166975975037],[.614082992076874,.281386971473694],[.616907000541687,.255886018276215],[.668509006500244,.119913995265961],[.770092010498047,.232020974159241],[.635536015033722,.189248979091644],[.77039098739624,.299556016921997],[.826722025871277,.278755009174347],[.527121007442474,.666198015213013],[.553171992301941,.668527007102966],[.577238023281097,.673889994621277],[.554691970348358,.580065965652466],[.611896991729736,.693961024284363],[.59696102142334,.706539988517761],[.596370995044708,.693953037261963],[.539958000183105,.557139039039612],[.568841993808746,.692366003990173],[.547818005084991,.692366003990173],[.52461302280426,.692366003990173],[.534089982509613,.779141008853912],[.527670979499817,.736225962638855],[.526912987232208,.717857003211975],[.526877999305725,.704625964164734],[.526966989040375,.695277988910675],[.572058022022247,.695277988910675],[.573521018028259,.703539967536926],[.57683801651001,.711845993995667],[.581691026687622,.720062971115112],[.609944999217987,.639909982681274],[.986046016216278,.560034036636353],[.5867999792099,.69539999961853],[.590372025966644,.701822996139526],[.531915009021759,.601536989212036],[.577268004417419,.585934996604919],[.536915004253387,.593786001205444],[.627542972564697,.473352015018463],[.665585994720459,.495950996875763],[.588353991508484,.546862006187439],[.757824003696442,.14767599105835],[.709249973297119,.201507985591888],[.672684013843536,.256581008434296],[.600408971309662,.74900496006012],[.55826598405838,.261672019958496],[.570303976535797,.187870979309082],[.588165998458862,.109044015407562],[.711045026779175,.398952007293701],[.781069993972778,.435405015945435],[.587247014045715,.398931980133057],[.742869973182678,.355445981025696],[.572156012058258,.437651991844177],[.55186802148819,.536570012569427],[.821442008018494,.457556009292603],[.752701997756958,.457181990146637],[.71375697851181,.467626988887787],[.66711300611496,.460672974586487],[.631101012229919,.447153985500336],[.6008620262146,.432473003864288],[.523481011390686,.405627012252808],[.810747981071472,.523926019668579],[.771045982837677,.348959028720856],[.509127020835876,.562718033790588],[.595292985439301,.485023975372314],[.980530977249146,.401564002037048],[.573499977588654,.420000016689301],[.602994978427887,.548687994480133],[.733529984951019,.376977026462555],[.560611009597778,.519016981124878],[.967685997486115,.644356966018677],[.580985009670258,.387160003185272],[.537728011608124,.505385041236877],[.760966002941132,.779752969741821],[.801778972148895,.831938028335571],[.892440974712372,.54076099395752],[.816350996494293,.740260004997253],[.865594983100891,.333687007427216],[.614073991775513,.883246004581451],[.508952975273132,.579437971115112],[.617941975593567,.508316040039062],[.825608015060425,.397674977779388],[.681214988231659,.39623498916626],[.656635999679565,.400596976280212],[.603900015354156,.710216999053955],[.81208598613739,.588539004325867],[.56801301240921,.944564998149872],[.681007981300354,.898285031318665],[.733752012252808,.869701027870178],[.633830010890961,.398822009563446],[.606792986392975,.39553701877594],[.589659988880157,.391062021255493],[.805015981197357,.342108011245728],[.611334979534149,.362284004688263],[.634037971496582,.355970978736877],[.656635999679565,.355356991291046],[.681214988231659,.35834002494812],[.698584973812103,.363156020641327],[.941866993904114,.319076001644135],[.698584973812103,.387449026107788],[.584177017211914,.624107003211975],[.554318010807037,.566076993942261],[.534153997898102,.62064003944397],[.711217999458313,.819975018501282],[.664629995822906,.852871000766754],[.559099972248077,.902631998062134],[.871706008911133,.791940987110138],[.591234028339386,.373893976211548],[.544341027736664,.451583981513977],[.624562978744507,.924192011356354],[.88577002286911,.615028977394104],[.551338016986847,.695277988910675],[.551980018615723,.704632043838501],[.552887976169586,.715808033943176],[.555167973041534,.730794012546539],[.569944024085999,.767035007476807],[.593203008174896,.685675978660583],[.599261999130249,.681069016456604],[.607599973678589,.677703022956848],[.631937980651855,.663500010967255],[.752032995223999,.601315021514893],[.547226011753082,.420395016670227],[.563543975353241,.359827995300293],[.583841025829315,.368713974952698],[.586614012718201,.692366003990173],[.771915018558502,.683578014373779],[.531597018241882,.352482974529266],[.588370978832245,.804440975189209],[.52079701423645,.442565023899078],[.567984998226166,.493479013442993],[.543282985687256,.819254994392395],[.655317008495331,.745514988899231],[.621008992195129,.574018001556396],[.625559985637665,.78031200170517],[.680198013782501,.570719003677368],[.64276397228241,.604337990283966],[.704662978649139,.621529996395111],[.552012026309967,.862591981887817],[.589071989059448,.508637011051178],[.685944974422455,.775357007980347],[.645735025405884,.812640011310577],[.675342977046967,.703978002071381],[.810858011245728,.646304965019226],[.72012197971344,.714666962623596],[.866151988506317,.682704985141754],[.663187026977539,.644596993923187],[.570082008838654,.466325998306274],[.544561982154846,.548375964164734],[.562758982181549,.558784961700439],[.531987011432648,.530140042304993],[.585271000862122,.335177004337311],[.622952997684479,.32277899980545],[.655896008014679,.320163011550903],[.687132000923157,.322345972061157],[.716481983661652,.333200991153717],[.758756995201111,.382786989212036],[.897013008594513,.468769013881683],[.732392013072968,.424547016620636],[.70211398601532,.433162987232208],[.66652500629425,.433866024017334],[.633504986763,.426087975502014],[.603875994682312,.416586995124817],[.579657971858978,.409945011138916],[.992439985275269,.480777025222778],[.567192018032074,.569419980049133],[.54136598110199,.478899002075195],[.526564002037048,.546118021011353],[.523913025856018,.563830018043518],[.531529009342194,.555056989192963],[.566035985946655,.582329034805298],[.51631098985672,.563053965568542],[.5174720287323,.577877044677734],[.573594987392426,.389806985855103],[.560697972774506,.395331978797913],[.549755990505219,.399751007556915],[.710287988185883,.368252992630005],[.723330020904541,.363372981548309]],gu=[127,34,139,11,0,37,232,231,120,72,37,39,128,121,47,232,121,128,104,69,67,175,171,148,157,154,155,118,50,101,73,39,40,9,151,108,48,115,131,194,204,211,74,40,185,80,42,183,40,92,186,230,229,118,202,212,214,83,18,17,76,61,146,160,29,30,56,157,173,106,204,194,135,214,192,203,165,98,21,71,68,51,45,4,144,24,23,77,146,91,205,50,187,201,200,18,91,106,182,90,91,181,85,84,17,206,203,36,148,171,140,92,40,39,193,189,244,159,158,28,247,246,161,236,3,196,54,68,104,193,168,8,117,228,31,189,193,55,98,97,99,126,47,100,166,79,218,155,154,26,209,49,131,135,136,150,47,126,217,223,52,53,45,51,134,211,170,140,67,69,108,43,106,91,230,119,120,226,130,247,63,53,52,238,20,242,46,70,156,78,62,96,46,53,63,143,34,227,173,155,133,123,117,111,44,125,19,236,134,51,216,206,205,154,153,22,39,37,167,200,201,208,36,142,100,57,212,202,20,60,99,28,158,157,35,226,113,160,159,27,204,202,210,113,225,46,43,202,204,62,76,77,137,123,116,41,38,72,203,129,142,64,98,240,49,102,64,41,73,74,212,216,207,42,74,184,169,170,211,170,149,176,105,66,69,122,6,168,123,147,187,96,77,90,65,55,107,89,90,180,101,100,120,63,105,104,93,137,227,15,86,85,129,102,49,14,87,86,55,8,9,100,47,121,145,23,22,88,89,179,6,122,196,88,95,96,138,172,136,215,58,172,115,48,219,42,80,81,195,3,51,43,146,61,171,175,199,81,82,38,53,46,225,144,163,110,246,33,7,52,65,66,229,228,117,34,127,234,107,108,69,109,108,151,48,64,235,62,78,191,129,209,126,111,35,143,163,161,246,117,123,50,222,65,52,19,125,141,221,55,65,3,195,197,25,7,33,220,237,44,70,71,139,122,193,245,247,130,33,71,21,162,153,158,159,170,169,150,188,174,196,216,186,92,144,160,161,2,97,167,141,125,241,164,167,37,72,38,12,145,159,160,38,82,13,63,68,71,226,35,111,158,153,154,101,50,205,206,92,165,209,198,217,165,167,97,220,115,218,133,112,243,239,238,241,214,135,169,190,173,133,171,208,32,125,44,237,86,87,178,85,86,179,84,85,180,83,84,181,201,83,182,137,93,132,76,62,183,61,76,184,57,61,185,212,57,186,214,207,187,34,143,156,79,239,237,123,137,177,44,1,4,201,194,32,64,102,129,213,215,138,59,166,219,242,99,97,2,94,141,75,59,235,24,110,228,25,130,226,23,24,229,22,23,230,26,22,231,112,26,232,189,190,243,221,56,190,28,56,221,27,28,222,29,27,223,30,29,224,247,30,225,238,79,20,166,59,75,60,75,240,147,177,215,20,79,166,187,147,213,112,233,244,233,128,245,128,114,188,114,217,174,131,115,220,217,198,236,198,131,134,177,132,58,143,35,124,110,163,7,228,110,25,356,389,368,11,302,267,452,350,349,302,303,269,357,343,277,452,453,357,333,332,297,175,152,377,384,398,382,347,348,330,303,304,270,9,336,337,278,279,360,418,262,431,304,408,409,310,415,407,270,409,410,450,348,347,422,430,434,313,314,17,306,307,375,387,388,260,286,414,398,335,406,418,364,367,416,423,358,327,251,284,298,281,5,4,373,374,253,307,320,321,425,427,411,421,313,18,321,405,406,320,404,405,315,16,17,426,425,266,377,400,369,322,391,269,417,465,464,386,257,258,466,260,388,456,399,419,284,332,333,417,285,8,346,340,261,413,441,285,327,460,328,355,371,329,392,439,438,382,341,256,429,420,360,364,394,379,277,343,437,443,444,283,275,440,363,431,262,369,297,338,337,273,375,321,450,451,349,446,342,467,293,334,282,458,461,462,276,353,383,308,324,325,276,300,293,372,345,447,382,398,362,352,345,340,274,1,19,456,248,281,436,427,425,381,256,252,269,391,393,200,199,428,266,330,329,287,273,422,250,462,328,258,286,384,265,353,342,387,259,257,424,431,430,342,353,276,273,335,424,292,325,307,366,447,345,271,303,302,423,266,371,294,455,460,279,278,294,271,272,304,432,434,427,272,407,408,394,430,431,395,369,400,334,333,299,351,417,168,352,280,411,325,319,320,295,296,336,319,403,404,330,348,349,293,298,333,323,454,447,15,16,315,358,429,279,14,15,316,285,336,9,329,349,350,374,380,252,318,402,403,6,197,419,318,319,325,367,364,365,435,367,397,344,438,439,272,271,311,195,5,281,273,287,291,396,428,199,311,271,268,283,444,445,373,254,339,263,466,249,282,334,296,449,347,346,264,447,454,336,296,299,338,10,151,278,439,455,292,407,415,358,371,355,340,345,372,390,249,466,346,347,280,442,443,282,19,94,370,441,442,295,248,419,197,263,255,359,440,275,274,300,383,368,351,412,465,263,467,466,301,368,389,380,374,386,395,378,379,412,351,419,436,426,322,373,390,388,2,164,393,370,462,461,164,0,267,302,11,12,374,373,387,268,12,13,293,300,301,446,261,340,385,384,381,330,266,425,426,423,391,429,355,437,391,327,326,440,457,438,341,382,362,459,457,461,434,430,394,414,463,362,396,369,262,354,461,457,316,403,402,315,404,403,314,405,404,313,406,405,421,418,406,366,401,361,306,408,407,291,409,408,287,410,409,432,436,410,434,416,411,264,368,383,309,438,457,352,376,401,274,275,4,421,428,262,294,327,358,433,416,367,289,455,439,462,370,326,2,326,370,305,460,455,254,449,448,255,261,446,253,450,449,252,451,450,256,452,451,341,453,452,413,464,463,441,413,414,258,442,441,257,443,442,259,444,443,260,445,444,467,342,445,459,458,250,289,392,290,290,328,460,376,433,435,250,290,392,411,416,433,341,463,464,453,464,465,357,465,412,343,412,399,360,363,440,437,399,456,420,456,363,401,435,288,372,383,353,339,255,249,448,261,255,133,243,190,133,155,112,33,246,247,33,130,25,398,384,286,362,398,414,362,463,341,263,359,467,263,249,255,466,467,260,75,60,166,238,239,79,162,127,139,72,11,37,121,232,120,73,72,39,114,128,47,233,232,128,103,104,67,152,175,148,173,157,155,119,118,101,74,73,40,107,9,108,49,48,131,32,194,211,184,74,185,191,80,183,185,40,186,119,230,118,210,202,214,84,83,17,77,76,146,161,160,30,190,56,173,182,106,194,138,135,192,129,203,98,54,21,68,5,51,4,145,144,23,90,77,91,207,205,187,83,201,18,181,91,182,180,90,181,16,85,17,205,206,36,176,148,140,165,92,39,245,193,244,27,159,28,30,247,161,174,236,196,103,54,104,55,193,8,111,117,31,221,189,55,240,98,99,142,126,100,219,166,218,112,155,26,198,209,131,169,135,150,114,47,217,224,223,53,220,45,134,32,211,140,109,67,108,146,43,91,231,230,120,113,226,247,105,63,52,241,238,242,124,46,156,95,78,96,70,46,63,116,143,227,116,123,111,1,44,19,3,236,51,207,216,205,26,154,22,165,39,167,199,200,208,101,36,100,43,57,202,242,20,99,56,28,157,124,35,113,29,160,27,211,204,210,124,113,46,106,43,204,96,62,77,227,137,116,73,41,72,36,203,142,235,64,240,48,49,64,42,41,74,214,212,207,183,42,184,210,169,211,140,170,176,104,105,69,193,122,168,50,123,187,89,96,90,66,65,107,179,89,180,119,101,120,68,63,104,234,93,227,16,15,85,209,129,49,15,14,86,107,55,9,120,100,121,153,145,22,178,88,179,197,6,196,89,88,96,135,138,136,138,215,172,218,115,219,41,42,81,5,195,51,57,43,61,208,171,199,41,81,38,224,53,225,24,144,110,105,52,66,118,229,117,227,34,234,66,107,69,10,109,151,219,48,235,183,62,191,142,129,126,116,111,143,7,163,246,118,117,50,223,222,52,94,19,141,222,221,65,196,3,197,45,220,44,156,70,139,188,122,245,139,71,162,145,153,159,149,170,150,122,188,196,206,216,92,163,144,161,164,2,167,242,141,241,0,164,37,11,72,12,144,145,160,12,38,13,70,63,71,31,226,111,157,158,154,36,101,205,203,206,165,126,209,217,98,165,97,237,220,218,237,239,241,210,214,169,140,171,32,241,125,237,179,86,178,180,85,179,181,84,180,182,83,181,194,201,182,177,137,132,184,76,183,185,61,184,186,57,185,216,212,186,192,214,187,139,34,156,218,79,237,147,123,177,45,44,4,208,201,32,98,64,129,192,213,138,235,59,219,141,242,97,97,2,141,240,75,235,229,24,228,31,25,226,230,23,229,231,22,230,232,26,231,233,112,232,244,189,243,189,221,190,222,28,221,223,27,222,224,29,223,225,30,224,113,247,225,99,60,240,213,147,215,60,20,166,192,187,213,243,112,244,244,233,245,245,128,188,188,114,174,134,131,220,174,217,236,236,198,134,215,177,58,156,143,124,25,110,7,31,228,25,264,356,368,0,11,267,451,452,349,267,302,269,350,357,277,350,452,357,299,333,297,396,175,377,381,384,382,280,347,330,269,303,270,151,9,337,344,278,360,424,418,431,270,304,409,272,310,407,322,270,410,449,450,347,432,422,434,18,313,17,291,306,375,259,387,260,424,335,418,434,364,416,391,423,327,301,251,298,275,281,4,254,373,253,375,307,321,280,425,411,200,421,18,335,321,406,321,320,405,314,315,17,423,426,266,396,377,369,270,322,269,413,417,464,385,386,258,248,456,419,298,284,333,168,417,8,448,346,261,417,413,285,326,327,328,277,355,329,309,392,438,381,382,256,279,429,360,365,364,379,355,277,437,282,443,283,281,275,363,395,431,369,299,297,337,335,273,321,348,450,349,359,446,467,283,293,282,250,458,462,300,276,383,292,308,325,283,276,293,264,372,447,346,352,340,354,274,19,363,456,281,426,436,425,380,381,252,267,269,393,421,200,428,371,266,329,432,287,422,290,250,328,385,258,384,446,265,342,386,387,257,422,424,430,445,342,276,422,273,424,306,292,307,352,366,345,268,271,302,358,423,371,327,294,460,331,279,294,303,271,304,436,432,427,304,272,408,395,394,431,378,395,400,296,334,299,6,351,168,376,352,411,307,325,320,285,295,336,320,319,404,329,330,349,334,293,333,366,323,447,316,15,315,331,358,279,317,14,316,8,285,9,277,329,350,253,374,252,319,318,403,351,6,419,324,318,325,397,367,365,288,435,397,278,344,439,310,272,311,248,195,281,375,273,291,175,396,199,312,311,268,276,283,445,390,373,339,295,282,296,448,449,346,356,264,454,337,336,299,337,338,151,294,278,455,308,292,415,429,358,355,265,340,372,388,390,466,352,346,280,295,442,282,354,19,370,285,441,295,195,248,197,457,440,274,301,300,368,417,351,465,251,301,389,385,380,386,394,395,379,399,412,419,410,436,322,387,373,388,326,2,393,354,370,461,393,164,267,268,302,12,386,374,387,312,268,13,298,293,301,265,446,340,380,385,381,280,330,425,322,426,391,420,429,437,393,391,326,344,440,438,458,459,461,364,434,394,428,396,262,274,354,457,317,316,402,316,315,403,315,314,404,314,313,405,313,421,406,323,366,361,292,306,407,306,291,408,291,287,409,287,432,410,427,434,411,372,264,383,459,309,457,366,352,401,1,274,4,418,421,262,331,294,358,435,433,367,392,289,439,328,462,326,94,2,370,289,305,455,339,254,448,359,255,446,254,253,449,253,252,450,252,256,451,256,341,452,414,413,463,286,441,414,286,258,441,258,257,442,257,259,443,259,260,444,260,467,445,309,459,250,305,289,290,305,290,460,401,376,435,309,250,392,376,411,433,453,341,464,357,453,465,343,357,412,437,343,399,344,360,440,420,437,456,360,420,363,361,401,288,265,372,353,390,339,249,339,448,255];var z5e=[127,234,132,58,172,150,149,148,152,377,378,379,397,288,361,454,356,70,63,105,66,107,336,296,334,293,300,168,6,195,4,98,97,2,326,327,33,160,158,133,153,144,362,385,387,263,373,380,57,40,37,0,267,270,287,321,314,17,84,91,78,81,13,311,308,402,14,178],L5e=[33,133,362,263,1,62,308,159,145,386,374,6,102,331,2,13,14,70,105,107,336,334,300,54,10,284,50,280,234,454,58,288,152],B5e=[33,133,362,263,1,78,308],H8e=z5e.map(e=>Lh[e]),j8e=L5e.map(e=>Lh[e]),q8e=B5e.map(e=>Lh[e]);function Ai(e){let t=e.map(n=>n[0]);return t.push(e[e.length-1][1]),t}var W5e=[[61,146],[146,91],[91,181],[181,84],[84,17],[17,314],[314,405],[405,321],[321,375],[375,291],[61,185],[185,40],[40,39],[39,37],[37,0],[0,267],[267,269],[269,270],[270,409],[409,291],[78,95],[95,88],[88,178],[178,87],[87,14],[14,317],[317,402],[402,318],[318,324],[324,308],[78,191],[191,80],[80,81],[81,82],[82,13],[13,312],[312,311],[311,310],[310,415],[415,308]],V5e=[[263,249],[249,390],[390,373],[373,374],[374,380],[380,381],[381,382],[382,362],[263,466],[466,388],[388,387],[387,386],[386,385],[385,384],[384,398],[398,362]],U5e=[[276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]],G5e=[[474,475],[475,476],[476,477],[477,474]],H5e=[[33,7],[7,163],[163,144],[144,145],[145,153],[153,154],[154,155],[155,133],[33,246],[246,161],[161,160],[160,159],[159,158],[158,157],[157,173],[173,133]],j5e=[[46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]],q5e=[[469,470],[470,471],[471,472],[472,469]],X5e=[[10,338],[338,297],[297,332],[332,284],[284,251],[251,389],[389,356],[356,454],[454,323],[323,361],[361,288],[288,397],[397,365],[365,379],[379,378],[378,400],[400,377],[377,152],[152,148],[148,176],[176,149],[149,150],[150,136],[136,172],[172,58],[58,132],[132,93],[93,234],[234,127],[127,162],[162,21],[21,54],[54,103],[103,67],[67,109],[109,10]],X8e={lips:Ai(W5e),leftEye:Ai(V5e),leftEyebrow:Ai(U5e),leftIris:Ai(G5e),rightEye:Ai(H5e),rightEyebrow:Ai(j5e),rightIris:Ai(q5e),faceOval:Ai(X5e)};var He={tf255:255,tf1:1,tf2:2,tf05:.5,tf127:127.5,rgb:[.2989,.587,.114]};function BT(){He.tf255=Ce(255,"float32"),He.tf1=Ce(1,"float32"),He.tf2=Ce(2,"float32"),He.tf05=Ce(.5,"float32"),He.tf127=Ce(127.5,"float32"),He.rgb=Ot([.2989,.587,.114],"float32")}var hd=e=>[Math.abs(e.endPoint[0]-e.startPoint[0]),Math.abs(e.endPoint[1]-e.startPoint[1])],C2=e=>[e.startPoint[0]+(e.endPoint[0]-e.startPoint[0])/2,e.startPoint[1]+(e.endPoint[1]-e.startPoint[1])/2,1],T2=(e,t)=>e?[Math.trunc(Math.max(0,e.startPoint[0])),Math.trunc(Math.max(0,e.startPoint[1])),Math.trunc(Math.min(t.shape[2]||0,e.endPoint[0])-Math.max(0,e.startPoint[0])),Math.trunc(Math.min(t.shape[1]||0,e.endPoint[1])-Math.max(0,e.startPoint[1]))]:[0,0,0,0],N2=(e,t)=>e?[e.startPoint[0]/(t.shape[2]||0),e.startPoint[1]/(t.shape[1]||0),(e.endPoint[0]-e.startPoint[0])/(t.shape[2]||0),(e.endPoint[1]-e.startPoint[1])/(t.shape[1]||0)]:[0,0,0,0],UT=(e,t)=>{let n=[e.startPoint[0]*t[0],e.startPoint[1]*t[1]],s=[e.endPoint[0]*t[0],e.endPoint[1]*t[1]];return{startPoint:n,endPoint:s,landmarks:e.landmarks,confidence:e.confidence}},xb=(e,t,n)=>{let s=t.shape[1],r=t.shape[2],a=[e.startPoint[1]/s,e.startPoint[0]/r,e.endPoint[1]/s,e.endPoint[0]/r],o=ke.cropAndResize(t,[a],[0],n),i=ge(o,He.tf255);return Y(o),i},E2=(e,t)=>{let n=C2(e),s=hd(e),r=[t*s[0]/2,t*s[1]/2];return{startPoint:[n[0]-r[0],n[1]-r[1]],endPoint:[n[0]+r[0],n[1]+r[1]],landmarks:e.landmarks,confidence:e.confidence}},R2=e=>{let t=C2(e),n=hd(e),s=Math.max(...n)/2;return{startPoint:[Math.round(t[0]-s),Math.round(t[1]-s)],endPoint:[Math.round(t[0]+s),Math.round(t[1]+s)],landmarks:e.landmarks,confidence:e.confidence}},GT=e=>{let t=e.map(s=>s[0]),n=e.map(s=>s[1]);return{startPoint:[Math.min(...t),Math.min(...n)],endPoint:[Math.max(...t),Math.max(...n)],landmarks:e}},bb=[[1,0,0],[0,1,0],[0,0,1]],Z5e=e=>e-2*Math.PI*Math.floor((e+Math.PI)/(2*Math.PI)),Y5e=(e,t)=>Z5e(Math.PI/2-Math.atan2(-(t[1]-e[1]),t[0]-e[0]));var WT=(e,t)=>[[1,0,e],[0,1,t],[0,0,1]],yu=(e,t)=>{let n=0;for(let s=0;s{let n=[];for(let s=0;s{let n=[],s=e.length;for(let r=0;r{let n=Math.cos(e),s=Math.sin(e),r=[[n,-s,0],[s,n,0],[0,0,1]],a=WT(t[0],t[1]),o=VT(a,r),i=WT(-t[0],-t[1]);return VT(o,i)},Q5e=e=>{let t=[[e[0][0],e[1][0]],[e[0][1],e[1][1]]],n=[e[0][2],e[1][2]],s=[-yu(t[0],n),-yu(t[1],n)];return[t[0].concat(s[0]),t[1].concat(s[1]),[0,0,1]]},exe=(e,t)=>[yu(e,t[0]),yu(e,t[1])];function jT(e){let t=e===192?{strides:[4],anchors:[1]}:{strides:[e/16,e/8],anchors:[2,6]},n=[];for(let s=0;s[a[0]/r*(h[0]-r/2),a[1]/r*(h[1]-r/2),h[2]||0]),i=n&&n!==0&&Math.abs(n)>.2,l=i?HT(n,[0,0]):bb,u=i?o.map(h=>[...exe(h,l),h[2]]):o,c=i?Q5e(s):bb,p=C2(t),d=[yu(p,c[0]),yu(p,c[1])];return u.map(h=>[Math.trunc(h[0]+d[0]),Math.trunc(h[1]+d[1]),Math.trunc(h[2]||0)])}function XT(e,t,n,s){let r=t.landmarks.length>=gb.count?gb.symmetryLine:mu.symmetryLine,a=0,o=bb,i;if(e&&pe.kernels.includes("rotatewithoffset"))if(a=Y5e(t.landmarks[r[0]],t.landmarks[r[1]]),a&&a!==0&&Math.abs(a)>.2){let u=C2(t),c=[u[0]/n.shape[2],u[1]/n.shape[1]],p=ke.rotateWithOffset(n,a,0,c);o=HT(-a,u),i=xb(t,p,[s,s]),Y(p)}else i=xb(t,n,[s,s]);else i=xb(t,n,[s,s]);return[a,o,i]}var txe=e=>{let t=e.map(s=>s[0]),n=e.map(s=>s[1]);return[Math.min(...t)+(Math.max(...t)-Math.min(...t))/2,Math.min(...n)+(Math.max(...n)-Math.min(...n))/2]},KT=(e,t)=>{let n=txe(e),s=hd(t);return{startPoint:[n[0]-s[0]/2,n[1]-s[1]/2],endPoint:[n[0]+s[0]/2,n[1]+s[1]/2]}};var ZT=6,nxe=1.4,Wr,YT=null,xi=0,Bh=null,fd=()=>xi;async function JT(e){var t;return pe.initial&&(Wr=null),Wr?e.debug&&ee("cached model:",Wr.modelUrl):Wr=await Me((t=e.face.detector)==null?void 0:t.modelPath),xi=Wr.executor&&Wr.inputs[0].shape?Wr.inputs[0].shape[2]:256,Bh=Ce(xi,"int32"),YT=mr(jT(xi)),Wr}function sxe(e){let t={};t.boxStarts=Oe(e,[0,1],[-1,2]),t.centers=le(t.boxStarts,YT),t.boxSizes=Oe(e,[0,3],[-1,2]),t.boxSizesNormalized=ge(t.boxSizes,Bh),t.centersNormalized=ge(t.centers,Bh),t.halfBoxSize=ge(t.boxSizesNormalized,He.tf2),t.starts=ye(t.centersNormalized,t.halfBoxSize),t.ends=le(t.centersNormalized,t.halfBoxSize),t.startNormalized=M(t.starts,Bh),t.endNormalized=M(t.ends,Bh);let n=nu([t.startNormalized,t.endNormalized],1);return Object.keys(t).forEach(s=>Y(t[s])),n}async function QT(e,t){var i,l,u,c;if(!e||e.isDisposedInternal||e.shape.length!==4||e.shape[1]<1||e.shape[2]<1)return[];let n={};n.resized=ke.resizeBilinear(e,[xi,xi]),n.div=ge(n.resized,He.tf127),n.normalized=ye(n.div,He.tf05);let s=Wr==null?void 0:Wr.execute(n.normalized);if(Array.isArray(s)&&s.length>2){let p=s.sort((d,h)=>d.size-h.size);n.concat384=ut([p[0],p[2]],2),n.concat512=ut([p[1],p[3]],2),n.concat=ut([n.concat512,n.concat384],1),n.batch=Ge(n.concat,0)}else Array.isArray(s)?n.batch=Ge(s[0]):n.batch=Ge(s);Y(s),n.boxes=sxe(n.batch),n.logits=Oe(n.batch,[0,0],[-1,1]),n.sigmoid=Mn(n.logits),n.scores=Ge(n.sigmoid),n.nms=await ke.nonMaxSuppressionAsync(n.boxes,n.scores,((i=t.face.detector)==null?void 0:i.maxDetected)||0,((l=t.face.detector)==null?void 0:l.iouThreshold)||0,((u=t.face.detector)==null?void 0:u.minConfidence)||0);let r=await n.nms.array(),a=[],o=await n.scores.data();for(let p=0;p(((c=t.face.detector)==null?void 0:c.minConfidence)||0)){let h={};h.bbox=Oe(n.boxes,[r[p],0],[1,-1]),h.slice=Oe(n.batch,[r[p],ZT-1],[1,-1]),h.squeeze=Ge(h.slice),h.landmarks=W(h.squeeze,[ZT,-1]);let f=await h.bbox.data(),m={startPoint:[f[0],f[1]],endPoint:[f[2],f[3]],landmarks:await h.landmarks.array(),confidence:d},g=UT(m,[(e.shape[2]||0)/xi,(e.shape[1]||0)/xi]),y=E2(g,t.face.scale||nxe),x=R2(y);a.push(x),Object.keys(h).forEach(A=>Y(h[A]))}}return Object.keys(n).forEach(p=>Y(n[p])),a}var _2={};fa(_2,{connected:()=>kb,kpt:()=>wb});var wb=["nose","leftEyeInside","leftEye","leftEyeOutside","rightEyeInside","rightEye","rightEyeOutside","leftEar","rightEar","leftMouth","rightMouth","leftShoulder","rightShoulder","leftElbow","rightElbow","leftWrist","rightWrist","leftPinky","rightPinky","leftIndex","rightIndex","leftThumb","rightThumb","leftHip","rightHip","leftKnee","rightKnee","leftAnkle","rightAnkle","leftHeel","rightHeel","leftFoot","rightFoot","bodyCenter","bodyTop","leftPalm","leftHand","rightPalm","rightHand"],kb={shoulders:["leftShoulder","rightShoulder"],hips:["rightHip","leftHip"],mouth:["leftMouth","rightMouth"],leftLegUpper:["leftHip","leftKnee"],leftLegLower:["leftKnee","leftAnkle"],leftFoot:["leftAnkle","leftHeel","leftFoot"],leftTorso:["leftShoulder","leftHip"],leftArmUpper:["leftShoulder","leftElbow"],leftArmLower:["leftElbow","leftWrist"],leftHand:["leftWrist","leftPalm"],leftHandPinky:["leftPalm","leftPinky"],leftHandIndex:["leftPalm","leftIndex"],leftHandThumb:["leftPalm","leftThumb"],leftEyeOutline:["leftEyeInside","leftEyeOutside"],rightLegUpper:["rightHip","rightKnee"],rightLegLower:["rightKnee","rightAnkle"],rightFoot:["rightAnkle","rightHeel","rightFoot"],rightTorso:["rightShoulder","rightHip"],rightArmUpper:["rightShoulder","rightElbow"],rightArmLower:["rightElbow","rightWrist"],rightHand:["rightWrist","rightPalm"],rightHandPinky:["rightPalm","rightPinky"],rightHandIndex:["rightPalm","rightIndex"],rightHandThumb:["rightPalm","rightThumb"],rightEyeOutline:["rightEyeInside","rightEyeOutside"]};var tN=224,rxe,axe=5,D2=[8,16,32,32,32];function nN(){let e=[],t=0;for(;tn.x)),y:Ot(e.map(n=>n.y))}}function Fa(e,t=[1,1]){let n=[e.map(i=>i[0]),e.map(i=>i[1])],s=[Math.min(...n[0]),Math.min(...n[1])],r=[Math.max(...n[0]),Math.max(...n[1])],a=[s[0],s[1],r[0]-s[0],r[1]-s[1]],o=[a[0]/t[0],a[1]/t[1],a[2]/t[0],a[3]/t[1]];return{box:a,boxRaw:o}}function sN(e,t=[1,1]){let n=[e.map(u=>u[0]),e.map(u=>u[1])],s=[Math.min(...n[0]),Math.min(...n[1])],r=[Math.max(...n[0]),Math.max(...n[1])],a=[(s[0]+r[0])/2,(s[1]+r[1])/2],o=Math.max(a[0]-s[0],a[1]-s[1],-a[0]+r[0],-a[1]+r[1]),i=[Math.trunc(a[0]-o),Math.trunc(a[1]-o),Math.trunc(2*o),Math.trunc(2*o)],l=[i[0]/t[0],i[1]/t[1],i[2]/t[0],i[3]/t[1]];return{box:i,boxRaw:l}}function $2(e,t){let n=[e[2]*t,e[3]*t];return[e[0]-(n[0]-e[2])/2,e[1]-(n[1]-e[3])/2,n[0],n[1]]}var oN={initial:!0},Kn={detector:null,landmarks:null},md={detector:[224,224],landmarks:[256,256]},Sb=Number.MAX_SAFE_INTEGER,ixe={landmarks:["ld_3d","activation_segmentation","activation_heatmap","world_3d","output_poseflag"],detector:[]},F2=null,Wh,bi=[[0,0],[0,0],[0,0],[0,0]],rN=0,aN=e=>1-1/(1+Math.exp(e));async function iN(e){var t;if(oN.initial&&(Kn.detector=null),!Kn.detector&&e.body.detector&&e.body.detector.modelPath){Kn.detector=await Me(e.body.detector.modelPath);let n=(t=Kn.detector)!=null&&t.executor?Object.values(Kn.detector.modelSignature.inputs):void 0;md.detector[0]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[1].size):0,md.detector[1]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[2].size):0}else e.debug&&Kn.detector&&ee("cached model:",Kn.detector.modelUrl);return nN(),Kn.detector}async function lN(e){var t;if(oN.initial&&(Kn.landmarks=null),Kn.landmarks)e.debug&&ee("cached model:",Kn.landmarks.modelUrl);else{Kn.landmarks=await Me(e.body.modelPath);let n=(t=Kn.landmarks)!=null&&t.executor?Object.values(Kn.landmarks.modelSignature.inputs):void 0;md.landmarks[0]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[1].size):0,md.landmarks[1]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[2].size):0}return Kn.landmarks}function lxe(e,t){var r,a;let n={};if(!((r=e==null?void 0:e.shape)!=null&&r[1])||!((a=e==null?void 0:e.shape)!=null&&a[2]))return e;let s;if(Wh&&(n.cropped=ke.cropAndResize(e,[Wh],[0],[e.shape[1],e.shape[2]])),e.shape[1]!==e.shape[2]){let o=[e.shape[2]>e.shape[1]?Math.trunc((e.shape[2]-e.shape[1])/2):0,e.shape[2]>e.shape[1]?Math.trunc((e.shape[2]-e.shape[1])/2):0],i=[e.shape[1]>e.shape[2]?Math.trunc((e.shape[1]-e.shape[2])/2):0,e.shape[1]>e.shape[2]?Math.trunc((e.shape[1]-e.shape[2])/2):0];bi=[[0,0],o,i,[0,0]],n.pad=tr(n.cropped||e,bi),n.resize=ke.resizeBilinear(n.pad,[t,t]),s=ge(n.resize,He.tf255)}else e.shape[1]!==t?(n.resize=ke.resizeBilinear(n.cropped||e,[t,t]),s=ge(n.resize,He.tf255)):s=ge(n.cropped||e,He.tf255);return Object.keys(n).forEach(o=>Y(n[o])),s}function uxe(e,t){for(let n of e)n.position=[Math.trunc(n.position[0]*(t[0]+bi[2][0]+bi[2][1])/t[0]-bi[2][0]),Math.trunc(n.position[1]*(t[1]+bi[1][0]+bi[1][1])/t[1]-bi[1][0]),n.position[2]],n.positionRaw=[n.position[0]/t[0],n.position[1]/t[1],2*n.position[2]/(t[0]+t[1])];if(Wh)for(let n of e)n.positionRaw=[n.positionRaw[0]+Wh[1],n.positionRaw[1]+Wh[0],n.positionRaw[2]],n.position=[Math.trunc(n.positionRaw[0]*t[0]),Math.trunc(n.positionRaw[1]*t[1]),n.positionRaw[2]];return e}function cxe(e){let t=e.find(i=>i.part==="leftPalm"),n=e.find(i=>i.part==="leftWrist"),s=e.find(i=>i.part==="leftIndex");t.position[2]=((n.position[2]||0)+(s.position[2]||0))/2;let r=e.find(i=>i.part==="rightPalm"),a=e.find(i=>i.part==="rightWrist"),o=e.find(i=>i.part==="rightIndex");r.position[2]=((a.position[2]||0)+(o.position[2]||0))/2}async function dxe(e,t,n){var f,m;if(!((f=Kn.landmarks)!=null&&f.executor))return null;let s={};[s.ld,s.segmentation,s.heatmap,s.world,s.poseflag]=(m=Kn.landmarks)==null?void 0:m.execute(e,ixe.landmarks);let r=(await s.poseflag.data())[0],a=await s.ld.data(),o=await s.world.data();Object.keys(s).forEach(g=>Y(s[g]));let i=[],l=5;for(let g=0;gg.position),p=Fa(c,[n[0],n[1]]),d={};for(let[g,y]of Object.entries(kb)){let x=[];for(let A=0;Ak.part===y[A]),w=u.find(k=>k.part===y[A+1]);b&&w&&x.push([b.position,w.position])}d[g]=x}return{id:0,score:Math.trunc(100*r)/100,box:p.box,boxRaw:p.boxRaw,keypoints:u,annotations:d}}async function Ib(e,t){let n=[e.shape[2]||0,e.shape[1]||0],s=(t.body.skipTime||0)>ie()-rN,r=Sb<(t.body.skipFrames||0);if(t.skipAllowed&&s&&r&&F2!==null)Sb++;else{let a={};a.landmarks=lxe(e,256),F2=await dxe(a.landmarks,t,n),Object.keys(a).forEach(o=>Y(a[o])),rN=ie(),Sb=0}return F2?[F2]:[]}var gd=[{class:1,label:"person"},{class:2,label:"bicycle"},{class:3,label:"car"},{class:4,label:"motorcycle"},{class:5,label:"airplane"},{class:6,label:"bus"},{class:7,label:"train"},{class:8,label:"truck"},{class:9,label:"boat"},{class:10,label:"traffic light"},{class:11,label:"fire hydrant"},{class:12,label:"stop sign"},{class:13,label:"parking meter"},{class:14,label:"bench"},{class:15,label:"bird"},{class:16,label:"cat"},{class:17,label:"dog"},{class:18,label:"horse"},{class:19,label:"sheep"},{class:20,label:"cow"},{class:21,label:"elephant"},{class:22,label:"bear"},{class:23,label:"zebra"},{class:24,label:"giraffe"},{class:25,label:"backpack"},{class:26,label:"umbrella"},{class:27,label:"handbag"},{class:28,label:"tie"},{class:29,label:"suitcase"},{class:30,label:"frisbee"},{class:31,label:"skis"},{class:32,label:"snowboard"},{class:33,label:"sports ball"},{class:34,label:"kite"},{class:35,label:"baseball bat"},{class:36,label:"baseball glove"},{class:37,label:"skateboard"},{class:38,label:"surfboard"},{class:39,label:"tennis racket"},{class:40,label:"bottle"},{class:41,label:"wine glass"},{class:42,label:"cup"},{class:43,label:"fork"},{class:44,label:"knife"},{class:45,label:"spoon"},{class:46,label:"bowl"},{class:47,label:"banana"},{class:48,label:"apple"},{class:49,label:"sandwich"},{class:50,label:"orange"},{class:51,label:"broccoli"},{class:52,label:"carrot"},{class:53,label:"hot dog"},{class:54,label:"pizza"},{class:55,label:"donut"},{class:56,label:"cake"},{class:57,label:"chair"},{class:58,label:"couch"},{class:59,label:"potted plant"},{class:60,label:"bed"},{class:61,label:"dining table"},{class:62,label:"toilet"},{class:63,label:"tv"},{class:64,label:"laptop"},{class:65,label:"mouse"},{class:66,label:"remote"},{class:67,label:"keyboard"},{class:68,label:"cell phone"},{class:69,label:"microwave"},{class:70,label:"oven"},{class:71,label:"toaster"},{class:72,label:"sink"},{class:73,label:"refrigerator"},{class:74,label:"book"},{class:75,label:"clock"},{class:76,label:"vase"},{class:77,label:"scissors"},{class:78,label:"teddy bear"},{class:79,label:"hair drier"},{class:80,label:"toothbrush"}];var Is,Au=0,Cb=[],cN=0,Tb=Number.MAX_SAFE_INTEGER;async function dN(e){if(pe.initial&&(Is=null),Is)e.debug&&ee("cached model:",Is.modelUrl);else{Is=await Me(e.object.modelPath);let t=Is!=null&&Is.executor?Object.values(Is.modelSignature.inputs):void 0;Au=Array.isArray(t)?parseInt(t[0].tensorShape.dim[2].size):0}return Is}async function pxe(e,t,n){if(!e)return[];let s={},r=[],a=await e.array();s.squeeze=Ge(e);let o=Ht(s.squeeze,6,1);s.stack=ln([o[1],o[0],o[3],o[2]],1),s.boxes=Ge(s.stack),s.scores=Ge(o[4]),s.classes=Ge(o[5]),Y([e,...o]),s.nms=await ke.nonMaxSuppressionAsync(s.boxes,s.scores,n.object.maxDetected,n.object.iouThreshold,n.object.minConfidence||0);let i=await s.nms.data(),l=0;for(let u of Array.from(i)){let c=Math.trunc(100*a[0][u][4])/100,p=a[0][u][5];if(Number.isNaN(p))continue;let d=gd[p].label,[h,f]=[a[0][u][0]/Au,a[0][u][1]/Au],m=[h,f,a[0][u][2]/Au-h,a[0][u][3]/Au-f],g=[Math.trunc(m[0]*t[0]),Math.trunc(m[1]*t[1]),Math.trunc(m[2]*t[0]),Math.trunc(m[3]*t[1])];r.push({id:l++,score:c,class:p,label:d,box:g,boxRaw:m})}return Object.keys(s).forEach(u=>Y(s[u])),r}async function Nb(e,t){if(!(Is!=null&&Is.executor))return[];let n=(t.object.skipTime||0)>ie()-cN,s=Tb<(t.object.skipFrames||0);return t.skipAllowed&&n&&s&&Cb.length>0?(Tb++,Cb):(Tb=0,new Promise(async r=>{let a=[e.shape[2]||0,e.shape[1]||0],o=ke.resizeBilinear(e,[Au,Au]),i=t.object.enabled?Is==null?void 0:Is.execute(o,["tower_0/detections"]):null;cN=ie(),Y(o);let l=await pxe(i,a,t);Cb=l,r(l)}))}var O2={};fa(O2,{connected:()=>Rb,kpt:()=>Eb});var Eb=["head","neck","rightShoulder","rightElbow","rightWrist","chest","leftShoulder","leftElbow","leftWrist","bodyCenter","rightHip","rightKnee","rightAnkle","leftHip","leftKnee","leftAnkle"],Rb={leftLeg:["leftHip","leftKnee","leftAnkle"],rightLeg:["rightHip","rightKnee","rightAnkle"],torso:["leftShoulder","rightShoulder","rightHip","leftHip","leftShoulder"],leftArm:["leftShoulder","leftElbow","leftWrist"],rightArm:["rightShoulder","rightElbow","rightWrist"],head:[]};var kn,hN=0,hs={id:0,keypoints:[],box:[0,0,0,0],boxRaw:[0,0,0,0],score:0,annotations:{}},_b=Number.MAX_SAFE_INTEGER;async function fN(e){return pe.initial&&(kn=null),kn?e.debug&&ee("cached model:",kn.modelUrl):kn=await Me(e.body.modelPath),kn}async function hxe(e,t){let[n,s]=e.shape,r=W(e,[s*n]),a=yn(r,0),o=(await a.data())[0];if(o>t){let i=Ps(r,0),l=ru(i,n),u=(await l.data())[0],c=ge(i,n),p=(await c.data())[0];return Y([r,a,i,l,c]),[u,p,o]}return Y([r,a]),[0,0,o]}async function Db(e,t){if(!(kn!=null&&kn.executor))return[];let n=(t.body.skipTime||0)>ie()-hN,s=_b<(t.body.skipFrames||0);return t.skipAllowed&&n&&s&&Object.keys(hs.keypoints).length>0?(_b++,[hs]):(_b=0,new Promise(async r=>{let a=X(()=>{if(!(kn!=null&&kn.inputs[0].shape))return null;let p=ke.resizeBilinear(e,[kn.inputs[0].shape[2],kn.inputs[0].shape[1]],!1),d=M(p,He.tf2);return ye(d,He.tf1)}),o;if(t.body.enabled&&(o=kn==null?void 0:kn.execute(a)),hN=ie(),Y(a),o){hs.keypoints.length=0;let p=Ge(o);Y(o);let d=bn(p,2);Y(p);for(let h=0;h(t.body.minConfidence||0)&&hs.keypoints.push({score:Math.round(100*g)/100,part:Eb[h],positionRaw:[f/kn.inputs[0].shape[2],m/kn.inputs[0].shape[1]],position:[Math.round(e.shape[2]*f/kn.inputs[0].shape[2]),Math.round(e.shape[1]*m/kn.inputs[0].shape[1])]})}d.forEach(h=>Y(h))}hs.score=hs.keypoints.reduce((p,d)=>d.score>p?d.score:p,0);let i=hs.keypoints.map(p=>p.position[0]),l=hs.keypoints.map(p=>p.position[1]);hs.box=[Math.min(...i),Math.min(...l),Math.max(...i)-Math.min(...i),Math.max(...l)-Math.min(...l)];let u=hs.keypoints.map(p=>p.positionRaw[0]),c=hs.keypoints.map(p=>p.positionRaw[1]);hs.boxRaw=[Math.min(...u),Math.min(...c),Math.max(...u)-Math.min(...u),Math.max(...c)-Math.min(...c)];for(let[p,d]of Object.entries(Rb)){let h=[];for(let f=0;fy.part===d[f]),g=hs.keypoints.find(y=>y.part===d[f+1]);m&&g&&m.score>(t.body.minConfidence||0)&&g.score>(t.body.minConfidence||0)&&h.push([m.position,g.position])}hs.annotations[p]=h}r([hs])}))}var fxe=["angry","disgust","fear","happy","sad","surprise","neutral"],rr,M2=[],gN=0,yN=0,$b=Number.MAX_SAFE_INTEGER;async function AN(e){var t;return pe.initial&&(rr=null),rr?e.debug&&ee("cached model:",rr.modelUrl):rr=await Me((t=e.face.emotion)==null?void 0:t.modelPath),rr}async function Pb(e,t,n,s){var o,i;if(!rr)return[];let r=$b<(((o=t.face.emotion)==null?void 0:o.skipFrames)||0),a=(((i=t.face.emotion)==null?void 0:i.skipTime)||0)>ie()-yN;return t.skipAllowed&&a&&r&&gN===s&&M2[n]&&M2[n].length>0?($b++,M2[n]):($b=0,new Promise(async l=>{var c;let u=[];if((c=t.face.emotion)!=null&&c.enabled){let p={},d=rr!=null&&rr.inputs[0].shape?rr.inputs[0].shape[2]:0;p.resize=ke.resizeBilinear(e,[d,d],!1),p.channels=M(p.resize,He.rgb),p.grayscale=ve(p.channels,3,!0),p.grayscaleSub=ye(p.grayscale,He.tf05),p.grayscaleMul=M(p.grayscaleSub,He.tf2),p.emotion=rr==null?void 0:rr.execute(p.grayscaleMul),yN=ie();let h=await p.emotion.data();for(let f=0;f(t.face.emotion.minConfidence||0)&&u.push({score:Math.min(.99,Math.trunc(100*h[f])/100),emotion:fxe[f]});u.sort((f,m)=>m.score-f.score),Object.keys(p).forEach(f=>Y(p[f]))}M2[n]=u,gN=s,l(u)}))}var Ws,vi=0,mxe=2.3,Fb=kr.leftEyeLower0,Ob=kr.rightEyeLower0,yd={leftBounds:[Fb[0],Fb[Fb.length-1]],rightBounds:[Ob[0],Ob[Ob.length-1]]},Ad={upperCenter:3,lowerCenter:4,index:71,numCoordinates:76};async function kN(e){var t,n;return pe.initial&&(Ws=null),Ws?e.debug&&ee("cached model:",Ws.modelUrl):Ws=await Me((t=e.face.iris)==null?void 0:t.modelPath),vi=(Ws==null?void 0:Ws.executor)&&((n=Ws.inputs)==null?void 0:n[0].shape)?Ws.inputs[0].shape[2]:0,vi===-1&&(vi=64),Ws}function z2(e,t,n,s){for(let r=0;r{let t=e[yd.leftBounds[0]][2],n=e[yd.rightBounds[0]][2];return t-n},bN=(e,t,n,s,r,a=!1)=>{let o=R2(E2(GT([e[n],e[s]]),mxe)),i=hd(o),l=ke.cropAndResize(t,[[o.startPoint[1]/r,o.startPoint[0]/r,o.endPoint[1]/r,o.endPoint[0]/r]],[0],[vi,vi]);if(a&&pe.kernels.includes("flipleftright")){let u=ke.flipLeftRight(l);Y(l),l=u}return{box:o,boxSize:i,crop:l}},vN=(e,t,n,s=!1)=>{let r=[];for(let a=0;a{let s=e[kr[`${n}EyeUpper0`][Ad.upperCenter]][2],r=e[kr[`${n}EyeLower0`][Ad.lowerCenter]][2],a=(s+r)/2;return t.map((o,i)=>{let l=a;return i===2?l=s:i===4&&(l=r),[o[0],o[1],l]})};async function SN(e,t,n){if(!(Ws!=null&&Ws.executor))return e;let{box:s,boxSize:r,crop:a}=bN(e,t,yd.leftBounds[0],yd.leftBounds[1],n,!0),{box:o,boxSize:i,crop:l}=bN(e,t,yd.rightBounds[0],yd.rightBounds[1],n,!0),u=ut([a,l]);Y(a),Y(l);let c=Ws.execute(u);Y(u);let p=await c.data();Y(c);let d=p.slice(0,Ad.numCoordinates*3),{rawCoords:h,iris:f}=vN(d,s,r,!0),m=p.slice(Ad.numCoordinates*3),{rawCoords:g,iris:y}=vN(m,o,i,!1),x=gxe(e);Math.abs(x)<30?(z2(e,h,"left",null),z2(e,g,"right",null)):x<1?z2(e,h,"left",["EyeUpper0","EyeLower0"]):z2(e,g,"right",["EyeUpper0","EyeLower0"]);let A=wN(e,f,"left"),b=wN(e,y,"right");return e.concat(A).concat(b)}var yxe=[[61,146],[146,91],[91,181],[181,84],[84,17],[17,314],[314,405],[405,321],[321,375],[375,291],[61,185],[185,40],[40,39],[39,37],[37,0],[0,267],[267,269],[269,270],[270,409],[409,291],[78,95],[95,88],[88,178],[178,87],[87,14],[14,317],[317,402],[402,318],[318,324],[324,308],[78,191],[191,80],[80,81],[81,82],[82,13],[13,312],[312,311],[311,310],[310,415],[415,308]],Axe=[[263,249],[249,390],[390,373],[373,374],[374,380],[380,381],[381,382],[382,362],[263,466],[466,388],[388,387],[387,386],[386,385],[385,384],[384,398],[398,362]],xxe=[[276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]],bxe=[[474,475],[475,476],[476,477],[477,474]],vxe=[[33,7],[7,163],[163,144],[144,145],[145,153],[153,154],[154,155],[155,133],[33,246],[246,161],[161,160],[160,159],[159,158],[158,157],[157,173],[173,133]],wxe=[[46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]],kxe=[[469,470],[470,471],[471,472],[472,469]],Sxe=[[10,338],[338,297],[297,332],[332,284],[284,251],[251,389],[389,356],[356,454],[454,323],[323,361],[361,288],[288,397],[397,365],[365,379],[379,378],[378,400],[400,377],[377,152],[152,148],[148,176],[176,149],[149,150],[150,136],[136,172],[172,58],[58,132],[132,93],[93,234],[234,127],[127,162],[162,21],[21,54],[54,103],[103,67],[67,109],[109,10]];function wi(e){let t=e.map(n=>n[0]);return t.push(e[e.length-1][1]),t}var Ixe={lips:wi(yxe),leftEye:wi(Axe),leftEyebrow:wi(xxe),leftIris:wi(bxe),rightEye:wi(vxe),rightEyebrow:wi(wxe),rightIris:wi(kxe),faceOval:wi(Sxe)},Cxe=Object.entries(Ixe).map(([e,t])=>t.map(n=>[n,e])).flat(),bSe=new Map(Cxe),Vh=[61,146,91,181,84,17,314,405,321,375,291,185,40,39,37,0,267,269,270,409,78,95,88,178,87,14,317,402,318,324,308,191,80,81,82,13,312,311,310,415,76,77,90,180,85,16,315,404,320,307,306,184,74,73,72,11,302,303,304,408,62,96,89,179,86,15,316,403,319,325,292,183,42,41,38,12,268,271,272,407],xu=[33,7,163,144,145,153,154,155,133,246,161,160,159,158,157,173,130,25,110,24,23,22,26,112,243,247,30,29,27,28,56,190,226,31,228,229,230,231,232,233,244,113,225,224,223,222,221,189,35,124,46,53,52,65,143,111,117,118,119,120,121,128,245,156,70,63,105,66,107,55,193],bu=[263,249,390,373,374,380,381,382,362,466,388,387,386,385,384,398,359,255,339,254,253,252,256,341,463,467,260,259,257,258,286,414,446,261,448,449,450,451,452,453,464,342,445,444,443,442,441,413,265,353,276,283,282,295,372,340,346,347,348,349,350,357,465,383,300,293,334,296,336,285,417];async function TN(e,t){var a,o,i,l,u,c,p,d,h,f;let n={lips:await((o=(a=t.filter(m=>m.size===160))==null?void 0:a[0])==null?void 0:o.data()),irisL:await((l=(i=t.filter(m=>m.size===10))==null?void 0:i[0])==null?void 0:l.data()),eyeL:await((c=(u=t.filter(m=>m.size===142))==null?void 0:u[0])==null?void 0:c.data()),irisR:await((d=(p=t.filter(m=>m.size===10))==null?void 0:p[1])==null?void 0:d.data()),eyeR:await((f=(h=t.filter(m=>m.size===142))==null?void 0:h[1])==null?void 0:f.data())};for(let m of Object.values(n))if(!m)return e;let s=xu.reduce((m,g)=>m+=e[g][2],0)/xu.length;for(let m=0;mm+=e[g][2],0)/bu.length;for(let m=0;mie()-la.timestamp,s=la.skipped<(((u=t.face.detector)==null?void 0:u.skipFrames)||0);!t.skipAllowed||!n||!s||la.boxes.length===0?(la.boxes=await QT(e,t),la.timestamp=ie(),la.skipped=0):la.skipped++;let r=[],a=[],o=0,i=Uh;for(let x=0;xD.shape[D.shape.length-1]===1).data();if(k.faceScore=Math.round(100*R[0])/100,k.faceScore<(((f=t.face.detector)==null?void 0:f.minConfidence)||1)){if(A.confidence=k.faceScore,t.face.mesh.keepInvalid){k.box=T2(A,e),k.boxRaw=N2(A,e),k.score=k.boxScore,k.mesh=A.landmarks.map(D=>[(A.startPoint[0]+A.endPoint[0])/2+(A.endPoint[0]+A.startPoint[0])*D[0]/fd(),(A.startPoint[1]+A.endPoint[1])/2+(A.endPoint[1]+A.startPoint[1])*D[1]/fd()]),k.meshRaw=k.mesh.map(D=>[D[0]/(e.shape[2]||1),D[1]/(e.shape[1]||1),(D[2]||0)/i]);for(let D of Object.keys(mu))k.annotations[D]=[k.mesh[mu[D]]]}}else{let D=C.find(F=>F.shape[F.shape.length-1]===1404),E=W(D,[-1,3]),$=await E.array();Y(E),(m=t.face.attention)!=null&&m.enabled?$=await TN($,C):(g=t.face.iris)!=null&&g.enabled&&($=await SN($,k.tensor,Uh)),k.mesh=qT($,A,b,w,Uh),k.meshRaw=k.mesh.map(F=>[F[0]/(e.shape[2]||0),F[1]/(e.shape[1]||0),(F[2]||0)/i]);for(let F of Object.keys(kr))k.annotations[F]=kr[F].map(z=>k.mesh[z]);k.score=k.faceScore;let S={...KT(k.mesh,A),confidence:A.confidence,landmarks:A.landmarks};k.box=T2(S,e),k.boxRaw=N2(S,e),a.push(S)}Y(C)}else{k.box=T2(A,e),k.boxRaw=N2(A,e),k.score=k.boxScore,k.mesh=A.landmarks.map(C=>[(A.startPoint[0]+A.endPoint[0])/2+(A.endPoint[0]+A.startPoint[0])*C[0]/fd(),(A.startPoint[1]+A.endPoint[1])/2+(A.endPoint[1]+A.startPoint[1])*C[1]/fd()]),k.meshRaw=k.mesh.map(C=>[C[0]/(e.shape[2]||0),C[1]/(e.shape[1]||0),(C[2]||0)/i]);for(let C of Object.keys(mu))k.annotations[C]=[k.mesh[mu[C]]]}k.score>(((y=t.face.detector)==null?void 0:y.minConfidence)||1)?r.push(k):Y(k.tensor)}return la.boxes=a,r}async function EN(e){var t,n,s,r,a,o;return pe.initial&&(Lt=null),((t=e.face.attention)==null?void 0:t.enabled)&&(Lt==null?void 0:Lt.signature)&&Object.keys(((n=Lt==null?void 0:Lt.signature)==null?void 0:n.outputs)||{}).length<6&&(Lt=null),Lt?e.debug&&ee("cached model:",Lt.modelUrl):(s=e.face.attention)!=null&&s.enabled?Lt=await Me(e.face.attention.modelPath):Lt=await Me((r=e.face.mesh)==null?void 0:r.modelPath),Uh=Lt.executor&&((a=Lt==null?void 0:Lt.inputs)==null?void 0:a[0].shape)?(o=Lt==null?void 0:Lt.inputs)==null?void 0:o[0].shape[2]:256,Lt}var RN=gu,_N=Lh;var Zn,ki=[],DN=0,$N=0,zb=Number.MAX_SAFE_INTEGER;async function PN(e){var t;return pe.initial&&(Zn=null),Zn?e.debug&&ee("cached model:",Zn.modelUrl):Zn=await Me((t=e.face.description)==null?void 0:t.modelPath),Zn}function Lb(e){let t=e.image||e.tensor||e;if(!(Zn!=null&&Zn.inputs[0].shape))return t;let n=ke.resizeBilinear(t,[Zn.inputs[0].shape[2],Zn.inputs[0].shape[1]],!1),s=M(n,He.tf255);return Y(n),s}async function Bb(e,t,n,s){var i,l,u,c;let r={age:0,gender:"unknown",genderScore:0,descriptor:[]};if(!(Zn!=null&&Zn.executor))return r;let a=zb<(((i=t.face.description)==null?void 0:i.skipFrames)||0),o=(((l=t.face.description)==null?void 0:l.skipTime)||0)>ie()-DN;return t.skipAllowed&&a&&o&&$N===s&&((u=ki==null?void 0:ki[n])==null?void 0:u.age)>0&&((c=ki==null?void 0:ki[n])==null?void 0:c.genderScore)>0?(zb++,ki[n]):(zb=0,new Promise(async p=>{var d;if((d=t.face.description)!=null&&d.enabled){let h=Lb(e),f=Zn==null?void 0:Zn.execute(h);DN=ie(),Y(h);let g=await f.find(N=>N.shape[1]===1).data(),y=Math.trunc(200*Math.abs(g[0]-.5))/100;y>(t.face.description.minConfidence||0)&&(r.gender=g[0]<=.5?"female":"male",r.genderScore=Math.min(.99,y));let x=Ps(f.find(N=>N.shape[1]===100),1),A=(await x.data())[0];Y(x);let w=await f.find(N=>N.shape[1]===100).data();r.age=Math.round(w[A-1]>w[A+1]?10*A-100*w[A-1]:10*A+100*w[A+1])/10,(Number.isNaN(g[0])||Number.isNaN(w[0]))&&ee("faceres error:",{model:Zn,result:f});let k=f.find(N=>N.shape[1]===1024),C=k?await k.data():[];r.descriptor=Array.from(C),f.forEach(N=>Y(N))}ki[n]=r,$N=s,p(r)}))}var Sr,Vb=[],Nxe=["white","black","asian","indian","other"],Exe=[15,23,28,35.5,45.5,55.5,65],FN=0,ON=0,Ub=Number.MAX_SAFE_INTEGER;async function MN(e){var t;return pe.initial&&(Sr=null),Sr?e.debug&&ee("cached model:",Sr.modelUrl):Sr=await Me((t=e.face.gear)==null?void 0:t.modelPath),Sr}async function Gb(e,t,n,s){var o,i;if(!Sr)return{age:0,gender:"unknown",genderScore:0,race:[]};let r=Ub<(((o=t.face.gear)==null?void 0:o.skipFrames)||0),a=(((i=t.face.gear)==null?void 0:i.skipTime)||0)>ie()-ON;return t.skipAllowed&&a&&r&&FN===s&&Vb[n]?(Ub++,Vb[n]):(Ub=0,new Promise(async l=>{var y,x;if(!(Sr!=null&&Sr.inputs[0].shape))return;let u={},c=[[0,.1,.9,.9]];u.resize=ke.cropAndResize(e,c,[0],[Sr.inputs[0].shape[2],Sr.inputs[0].shape[1]]);let p={age:0,gender:"unknown",genderScore:0,race:[]};(y=t.face.gear)!=null&&y.enabled&&([u.age,u.gender,u.race]=Sr.execute(u.resize,["age_output","gender_output","race_output"]));let d=await u.gender.data();p.gender=d[0]>d[1]?"male":"female",p.genderScore=Math.round(100*(d[0]>d[1]?d[0]:d[1]))/100;let h=await u.race.data();for(let A=0;A(((x=t.face.gear)==null?void 0:x.minConfidence)||.2)&&p.race.push({score:Math.round(100*h[A])/100,race:Nxe[A]});p.race.sort((A,b)=>b.score-A.score);let m=Array.from(await u.age.data()).map((A,b)=>[Exe[b],A]).sort((A,b)=>b[1]-A[1]),g=m[0][0];for(let A=1;AY(u[A])),Vb[n]=p,FN=s,ON=ie(),l(p)}))}function L2(e){return[Math.abs(e.endPoint[0]-e.startPoint[0]),Math.abs(e.endPoint[1]-e.startPoint[1])]}function Gh(e){return[e.startPoint[0]+(e.endPoint[0]-e.startPoint[0])/2,e.startPoint[1]+(e.endPoint[1]-e.startPoint[1])/2]}function WN(e,t,n){let s=t.shape[1],r=t.shape[2],a=[[e.startPoint[1]/s,e.startPoint[0]/r,e.endPoint[1]/s,e.endPoint[0]/r]];return ke.cropAndResize(t,a,[0],n)}function VN(e,t){let n=[e.startPoint[0]*t[0],e.startPoint[1]*t[1]],s=[e.endPoint[0]*t[0],e.endPoint[1]*t[1]],r=e.palmLandmarks.map(a=>[a[0]*t[0],a[1]*t[1]]);return{startPoint:n,endPoint:s,palmLandmarks:r,confidence:e.confidence}}function B2(e,t=1.5){let n=Gh(e),s=L2(e),r=[t*s[0]/2,t*s[1]/2],a=[n[0]-r[0],n[1]-r[1]],o=[n[0]+r[0],n[1]+r[1]];return{startPoint:a,endPoint:o,palmLandmarks:e.palmLandmarks}}function W2(e){let t=Gh(e),n=L2(e),r=Math.max(...n)/2,a=[t[0]-r,t[1]-r],o=[t[0]+r,t[1]+r];return{startPoint:a,endPoint:o,palmLandmarks:e.palmLandmarks}}function Rxe(e){return e-2*Math.PI*Math.floor((e+Math.PI)/(2*Math.PI))}function UN(e,t){let n=Math.PI/2-Math.atan2(-(t[1]-e[1]),t[0]-e[0]);return Rxe(n)}var LN=(e,t)=>[[1,0,e],[0,1,t],[0,0,1]];function Si(e,t){let n=0;for(let s=0;s[o.x,o.y]),this.anchorsTensor=mr(this.anchors),this.inputSize=((a=(r=(s=(n=this==null?void 0:this.model)==null?void 0:n.inputs)==null?void 0:s[0])==null?void 0:r.shape)==null?void 0:a[2])||0,this.inputSizeTensor=Ot([this.inputSize,this.inputSize]),this.doubleInputSizeTensor=Ot([this.inputSize*2,this.inputSize*2])}normalizeBoxes(t){let n={};n.boxOffsets=Oe(t,[0,0],[-1,2]),n.boxSizes=Oe(t,[0,2],[-1,2]),n.div=ge(n.boxOffsets,this.inputSizeTensor),n.boxCenterPoints=le(n.div,this.anchorsTensor),n.halfBoxSizes=ge(n.boxSizes,this.doubleInputSizeTensor),n.sub=ye(n.boxCenterPoints,n.halfBoxSizes),n.startPoints=M(n.sub,this.inputSizeTensor),n.add=le(n.boxCenterPoints,n.halfBoxSizes),n.endPoints=M(n.add,this.inputSizeTensor);let s=nu([n.startPoints,n.endPoints],1);return Object.keys(n).forEach(r=>Y(n[r])),s}normalizeLandmarks(t,n){let s={};s.reshape=W(t,[-1,7,2]),s.div=ge(s.reshape,this.inputSizeTensor),s.landmarks=le(s.div,this.anchors[n]?this.anchors[n]:0);let r=M(s.landmarks,this.inputSizeTensor);return Object.keys(s).forEach(a=>Y(s[a])),r}async predict(t,n){var i;let s={};s.resize=ke.resizeBilinear(t,[this.inputSize,this.inputSize]),s.div=ge(s.resize,He.tf127),s.image=ye(s.div,He.tf1),s.batched=this.model.execute(s.image),s.predictions=Ge(s.batched),s.slice=Oe(s.predictions,[0,0],[-1,1]),s.sigmoid=Mn(s.slice),s.scores=Ge(s.sigmoid);let r=await s.scores.data();s.boxes=Oe(s.predictions,[0,1],[-1,4]),s.norm=this.normalizeBoxes(s.boxes),s.nms=await ke.nonMaxSuppressionAsync(s.norm,s.scores,3*(((i=n.hand)==null?void 0:i.maxDetected)||1),n.hand.iouThreshold,n.hand.minConfidence);let a=await s.nms.array(),o=[];for(let l of a){let u={};u.box=Oe(s.norm,[l,0],[1,-1]),u.slice=Oe(s.predictions,[l,5],[1,14]),u.norm=this.normalizeLandmarks(u.slice,l),u.palmLandmarks=W(u.norm,[-1,2]);let c=await u.box.data(),p=c.slice(0,2),d=c.slice(2,4),h=await u.palmLandmarks.array(),f={startPoint:p,endPoint:d,palmLandmarks:h,confidence:r[l]},m=VN(f,[(t.shape[2]||1)/this.inputSize,(t.shape[1]||0)/this.inputSize]);o.push(m),Object.keys(u).forEach(g=>Y(u[g]))}return Object.keys(s).forEach(l=>Y(s[l])),o}};var Pxe=5,qN=1.65,XN=[0,5,9,13,17,1,2],Fxe=0,Oxe=2,KN=0,U2=class{constructor(t,n){de(this,"handDetector");de(this,"handPoseModel");de(this,"inputSize");de(this,"storedBoxes");de(this,"skipped");de(this,"detectedHands");var s,r,a;this.handDetector=t,this.handPoseModel=n,this.inputSize=((a=(r=(s=this.handPoseModel)==null?void 0:s.inputs)==null?void 0:r[0].shape)==null?void 0:a[2])||0,this.storedBoxes=[],this.skipped=Number.MAX_SAFE_INTEGER,this.detectedHands=0}calculateLandmarksBoundingBox(t){let n=t.map(o=>o[0]),s=t.map(o=>o[1]),r=[Math.min(...n),Math.min(...s)],a=[Math.max(...n),Math.max(...s)];return{startPoint:r,endPoint:a}}getBoxForPalmLandmarks(t,n){let s=t.map(a=>jb([...a,1],n)),r=this.calculateLandmarksBoundingBox(s);return B2(W2(r),Pxe)}getBoxForHandLandmarks(t){let n=this.calculateLandmarksBoundingBox(t),s=B2(W2(n),qN);s.palmLandmarks=[];for(let r=0;r[o[0]*(h[0]-this.inputSize/2),o[1]*(h[1]-this.inputSize/2),o[2]*h[2]]),l=Hb(s,[0,0]),u=i.map(h=>[...jb(h,l),h[2]]),c=GN(r),p=[...Gh(n),1],d=[Si(p,c[0]),Si(p,c[1])];return u.map(h=>[Math.trunc(h[0]+d[0]),Math.trunc(h[1]+d[1]),Math.trunc(h[2])])}async estimateHands(t,n){let s=!1,r,a=(n.hand.skipTime||0)>ie()-KN,o=this.skipped<(n.hand.skipFrames||0);n.skipAllowed&&a&&o&&(r=await this.handDetector.predict(t,n),this.skipped=0),n.skipAllowed&&this.skipped++,r&&r.length>0&&(r.length!==this.detectedHands&&this.detectedHands!==n.hand.maxDetected||!n.hand.landmarks)&&(this.detectedHands=0,this.storedBoxes=[...r],this.storedBoxes.length>0&&(s=!0));let i=[];for(let l=0;l=n.hand.minConfidence/4){let w=W(A,[-1,3]),k=await w.array();Y(A),Y(w);let C=this.transformRawCoords(k,m,c,f),N=this.getBoxForHandLandmarks(C);this.storedBoxes[l]={...N,confidence:b};let R={landmarks:C,confidence:b,boxConfidence:u.confidence,fingerConfidence:b,box:{topLeft:N.startPoint,bottomRight:N.endPoint}};i.push(R)}else this.storedBoxes[l]=null;Y(A)}else{let c=B2(W2(u),qN),p={confidence:u.confidence,boxConfidence:u.confidence,fingerConfidence:0,box:{topLeft:c.startPoint,bottomRight:c.endPoint},landmarks:[]};i.push(p)}}return this.storedBoxes=this.storedBoxes.filter(l=>l!==null),this.detectedHands=i.length,i.length>n.hand.maxDetected&&(i.length=n.hand.maxDetected),i}};var fs={thumb:0,index:1,middle:2,ring:3,pinky:4,all:[0,1,2,3,4],nameMapping:{0:"thumb",1:"index",2:"middle",3:"ring",4:"pinky"},pointsMapping:{0:[[0,1],[1,2],[2,3],[3,4]],1:[[0,5],[5,6],[6,7],[7,8]],2:[[0,9],[9,10],[10,11],[11,12]],3:[[0,13],[13,14],[14,15],[15,16]],4:[[0,17],[17,18],[18,19],[19,20]]},getName:e=>fs.nameMapping[e],getPoints:e=>fs.pointsMapping[e]},Ci={none:0,half:1,full:2,nameMapping:{0:"none",1:"half",2:"full"},getName:e=>Ci.nameMapping[e]},Xt={verticalUp:0,verticalDown:1,horizontalLeft:2,horizontalRight:3,diagonalUpRight:4,diagonalUpLeft:5,diagonalDownRight:6,diagonalDownLeft:7,nameMapping:{0:"verticalUp",1:"verticalDown",2:"horizontalLeft",3:"horizontalRight",4:"diagonalUpRight",5:"diagonalUpLeft",6:"diagonalDownRight",7:"diagonalDownLeft"},getName:e=>Xt.nameMapping[e]},Ii=class{constructor(t){de(this,"name");de(this,"curls");de(this,"directions");de(this,"weights");de(this,"weightsRelative");this.name=t,this.curls={},this.directions={},this.weights=[1,1,1,1,1],this.weightsRelative=[1,1,1,1,1]}curl(t,n,s){typeof this.curls[t]=="undefined"&&(this.curls[t]=[]),this.curls[t].push([n,s])}direction(t,n,s){this.directions[t]||(this.directions[t]=[]),this.directions[t].push([n,s])}weight(t,n){this.weights[t]=n;let s=this.weights.reduce((r,a)=>r+a,0);this.weightsRelative=this.weights.map(r=>r*5/s)}matchAgainst(t,n){let s=0;for(let r in t){let a=t[r],o=this.curls[r];if(typeof o=="undefined"){s+=this.weightsRelative[r];continue}for(let[i,l]of o)if(a===i){s+=l*this.weightsRelative[r];break}}for(let r in n){let a=n[r],o=this.directions[r];if(typeof o=="undefined"){s+=this.weightsRelative[r];continue}for(let[i,l]of o)if(a===i){s+=l*this.weightsRelative[r];break}}return s/10}};var{thumb:Vr,index:Oa,middle:Ma,ring:vu,pinky:wu}=fs,{none:Ur,half:zxe,full:Gr}=Ci,{verticalUp:xd,verticalDown:WSe,horizontalLeft:qb,horizontalRight:Lxe,diagonalUpRight:Bxe,diagonalUpLeft:bd,diagonalDownRight:VSe,diagonalDownLeft:USe}=Xt,Ti=new Ii("thumbs up");Ti.curl(Vr,Ur,1);Ti.direction(Vr,xd,1);Ti.direction(Vr,bd,.25);Ti.direction(Vr,Bxe,.25);for(let e of[fs.index,fs.middle,fs.ring,fs.pinky])Ti.curl(e,Gr,1),Ti.direction(e,qb,1),Ti.direction(e,Lxe,1);var pn=new Ii("victory");pn.curl(Vr,zxe,.5);pn.curl(Vr,Ur,.5);pn.direction(Vr,xd,1);pn.direction(Vr,bd,1);pn.curl(Oa,Ur,1);pn.direction(Oa,xd,.75);pn.direction(Oa,bd,1);pn.curl(Ma,Ur,1);pn.direction(Ma,xd,1);pn.direction(Ma,bd,.75);pn.curl(vu,Gr,1);pn.direction(vu,xd,.2);pn.direction(vu,bd,1);pn.direction(vu,qb,.2);pn.curl(wu,Gr,1);pn.direction(wu,xd,.2);pn.direction(wu,bd,1);pn.direction(wu,qb,.2);pn.weight(Oa,2);pn.weight(Ma,2);var Ni=new Ii("point");Ni.curl(Vr,Gr,1);Ni.curl(Oa,Ur,.5);Ni.curl(Ma,Gr,.5);Ni.curl(vu,Gr,.5);Ni.curl(wu,Gr,.5);Ni.weight(Oa,2);Ni.weight(Ma,2);var Ei=new Ii("middle finger");Ei.curl(Vr,Ur,1);Ei.curl(Oa,Gr,.5);Ei.curl(Ma,Gr,.5);Ei.curl(vu,Gr,.5);Ei.curl(wu,Gr,.5);Ei.weight(Oa,2);Ei.weight(Ma,2);var vd=new Ii("open palm");vd.curl(Vr,Ur,.75);vd.curl(Oa,Ur,.75);vd.curl(Ma,Ur,.75);vd.curl(vu,Ur,.75);vd.curl(wu,Ur,.75);var ZN=[Ti,pn,Ni,Ei,vd];var Wxe=.7,ku={HALF_CURL_START_LIMIT:60,NO_CURL_START_LIMIT:130,DISTANCE_VOTE_POWER:1.1,SINGLE_ANGLE_VOTE_POWER:.9,TOTAL_ANGLE_VOTE_POWER:1.6};function YN(e,t,n,s){let r=(t-s)/(e-n),a=Math.atan(r)*180/Math.PI;return a<=0?a=-a:a>0&&(a=180-a),a}function QN(e,t){if(!e||!t)return[0,0];let n=YN(e[0],e[1],t[0],t[1]);if(e.length===2)return n;let s=YN(e[1],e[2],t[1],t[2]);return[n,s]}function JN(e,t=1){let n=0,s=0,r=0;return e>=75&&e<=105?n=1*t:e>=25&&e<=155?s=1*t:r=1*t,[n,s,r]}function Vxe(e,t,n){let s=e[0]-t[0],r=e[0]-n[0],a=t[0]-n[0],o=e[1]-t[1],i=e[1]-n[1],l=t[1]-n[1],u=e[2]-t[2],c=e[2]-n[2],p=t[2]-n[2],d=Math.sqrt(s*s+o*o+u*u),h=Math.sqrt(r*r+i*i+c*c),f=Math.sqrt(a*a+l*l+p*p),m=(f*f+d*d-h*h)/(2*f*d);m>1?m=1:m<-1&&(m=-1);let g=Math.acos(m);g=57.2958*g%180;let y;return g>ku.NO_CURL_START_LIMIT?y=Ci.none:g>ku.HALF_CURL_START_LIMIT?y=Ci.half:y=Ci.full,y}function eE(e,t,n,s){let r;return s===Math.abs(e)?e>0?r=Xt.horizontalLeft:r=Xt.horizontalRight:s===Math.abs(t)?t>0?r=Xt.horizontalLeft:r=Xt.horizontalRight:n>0?r=Xt.horizontalLeft:r=Xt.horizontalRight,r}function tE(e,t,n,s){let r;return s===Math.abs(e)?e<0?r=Xt.verticalDown:r=Xt.verticalUp:s===Math.abs(t)?t<0?r=Xt.verticalDown:r=Xt.verticalUp:n<0?r=Xt.verticalDown:r=Xt.verticalUp,r}function Uxe(e,t,n,s,r,a,o,i){let l,u=tE(e,t,n,s),c=eE(r,a,o,i);return u===Xt.verticalUp?c===Xt.horizontalLeft?l=Xt.diagonalUpLeft:l=Xt.diagonalUpRight:c===Xt.horizontalLeft?l=Xt.diagonalDownLeft:l=Xt.diagonalDownRight,l}function Gxe(e,t,n,s){let r=e[0]-t[0],a=e[0]-n[0],o=t[0]-n[0],i=e[1]-t[1],l=e[1]-n[1],u=t[1]-n[1],c=Math.max(Math.abs(r),Math.abs(a),Math.abs(o)),p=Math.max(Math.abs(i),Math.abs(l),Math.abs(u)),d=0,h=0,f=0,m=p/(c+1e-5);m>1.5?d+=ku.DISTANCE_VOTE_POWER:m>.66?h+=ku.DISTANCE_VOTE_POWER:f+=ku.DISTANCE_VOTE_POWER;let g=Math.sqrt(r*r+i*i),y=Math.sqrt(a*a+l*l),x=Math.sqrt(o*o+u*u),A=Math.max(g,y,x),b=e[0],w=e[1],k=n[0],C=n[1];A===g?(k=n[0],C=n[1]):A===x&&(b=t[0],w=t[1]);let D=QN([b,w],[k,C]),E=JN(D,ku.TOTAL_ANGLE_VOTE_POWER);d+=E[0],h+=E[1],f+=E[2];for(let S of s){let F=JN(S,ku.SINGLE_ANGLE_VOTE_POWER);d+=F[0],h+=F[1],f+=F[2]}let $;return d===Math.max(d,h,f)?$=tE(l,i,u,p):f===Math.max(h,f)?$=eE(a,r,o,c):$=Uxe(l,i,u,p,a,r,o,c),$}function nE(e){let t=[],n=[],s=[],r=[];if(!e)return{curls:s,directions:r};for(let a of fs.all){let o=fs.getPoints(a),i=[],l=[];for(let u of o){let c=e[u[0]],p=e[u[1]],d=QN(c,p),h=d[0],f=d[1];i.push(h),l.push(f)}t.push(i),n.push(l)}for(let a of fs.all){let o=a===fs.thumb?1:0,i=fs.getPoints(a),l=e[i[o][0]],u=e[i[o+1][1]],c=e[i[3][1]],p=Vxe(l,u,c),d=Gxe(l,u,c,t[a].slice(o));s[a]=p,r[a]=d}return{curls:s,directions:r}}function G2(e){if(!e||e.length===0)return null;let t=nE(e),n={};for(let s of fs.all)n[fs.getName(s)]={curl:Ci.getName(t.curls[s]),direction:Xt.getName(t.directions[s])};return n}function sE(e){let t=[];if(!e||e.length===0)return t;let n=nE(e);for(let s of ZN){let r=s.matchAgainst(n.curls,n.directions);r>=Wxe&&t.push({name:s.name,confidence:r})}return t}var rE={thumb:[1,2,3,4],index:[5,6,7,8],middle:[9,10,11,12],ring:[13,14,15,16],pinky:[17,18,19,20],palm:[0]},Su,Iu,aE;async function Kb(e,t){let n=await aE.estimateHands(e,t);if(!n)return[];let s=[];for(let r=0;rn[r].landmarks[p]);let o=n[r].landmarks,i=[Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,0,0],l=[0,0,0,0];if(o&&o.length>0){for(let c of o)c[0]i[2]&&(i[2]=c[0]),c[1]>i[3]&&(i[3]=c[1]);i[2]-=i[0],i[3]-=i[1],l=[i[0]/(e.shape[2]||0),i[1]/(e.shape[1]||0),i[2]/(e.shape[2]||0),i[3]/(e.shape[1]||0)]}else i=n[r].box?[Math.trunc(Math.max(0,n[r].box.topLeft[0])),Math.trunc(Math.max(0,n[r].box.topLeft[1])),Math.trunc(Math.min(e.shape[2]||0,n[r].box.bottomRight[0])-Math.max(0,n[r].box.topLeft[0])),Math.trunc(Math.min(e.shape[1]||0,n[r].box.bottomRight[1])-Math.max(0,n[r].box.topLeft[1]))]:[0,0,0,0],l=[n[r].box.topLeft[0]/(e.shape[2]||0),n[r].box.topLeft[1]/(e.shape[1]||0),(n[r].box.bottomRight[0]-n[r].box.topLeft[0])/(e.shape[2]||0),(n[r].box.bottomRight[1]-n[r].box.topLeft[1])/(e.shape[1]||0)];let u=G2(o);s.push({id:r,score:Math.round(100*n[r].confidence)/100,boxScore:Math.round(100*n[r].boxConfidence)/100,fingerScore:Math.round(100*n[r].fingerConfidence)/100,label:"hand",box:i,boxRaw:l,keypoints:o,annotations:a,landmarks:u})}return s}async function Zb(e){var n,s;pe.initial&&(Su=null,Iu=null),!Su||!Iu?[Su,Iu]=await Promise.all([e.hand.enabled?Me((n=e.hand.detector)==null?void 0:n.modelPath):null,e.hand.landmarks?Me((s=e.hand.skeleton)==null?void 0:s.modelPath):null]):(e.debug&&ee("cached model:",Su.modelUrl),e.debug&&ee("cached model:",Iu.modelUrl));let t=Su?new V2(Su):void 0;return t&&Iu&&(aE=new U2(t,Iu)),[Su,Iu]}var tn=[null,null],Hxe=["StatefulPartitionedCall/Postprocessor/Slice","StatefulPartitionedCall/Postprocessor/ExpandDims_1"],Ri=[[0,0],[0,0]],jxe=["hand","fist","pinch","point","face","tip","pinchtip"],iE=4,lE=1.6,qxe=512,Xxe=1.4,H2=Number.MAX_SAFE_INTEGER,Yb=0,za=[0,0],en={boxes:[],hands:[]},uE={thumb:[1,2,3,4],index:[5,6,7,8],middle:[9,10,11,12],ring:[13,14,15,16],pinky:[17,18,19,20],base:[0],palm:[0,17,13,9,5,1,0]};async function cE(e){var t;if(pe.initial&&(tn[0]=null),tn[0])e.debug&&ee("cached model:",tn[0].modelUrl);else{j2(["tensorlistreserve","enter","tensorlistfromtensor","merge","loopcond","switch","exit","tensorliststack","nextiteration","tensorlistsetitem","tensorlistgetitem","reciprocal","shape","split","where"],e),tn[0]=await Me((t=e.hand.detector)==null?void 0:t.modelPath);let n=tn[0].executor?Object.values(tn[0].modelSignature.inputs):void 0;Ri[0][0]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[1].size):0,Ri[0][1]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[2].size):0}return tn[0]}async function dE(e){var t;if(pe.initial&&(tn[1]=null),tn[1])e.debug&&ee("cached model:",tn[1].modelUrl);else{tn[1]=await Me((t=e.hand.skeleton)==null?void 0:t.modelPath);let n=tn[1].executor?Object.values(tn[1].modelSignature.inputs):void 0;Ri[1][0]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[1].size):0,Ri[1][1]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[2].size):0}return tn[1]}async function Kxe(e,t){let n=[];if(!e||!tn[0])return n;let s={},r=(e.shape[2]||1)/(e.shape[1]||1),a=Math.min(Math.round((e.shape[1]||0)/8)*8,qxe),o=Math.round(a*r/8)*8;s.resize=ke.resizeBilinear(e,[a,o]),s.cast=me(s.resize,"int32"),[s.rawScores,s.rawBoxes]=await tn[0].executeAsync(s.cast,Hxe),s.boxes=Ge(s.rawBoxes,[0,2]),s.scores=Ge(s.rawScores,[0]);let i=bn(s.scores,1);Y(i[iE]),i.splice(iE,1),s.filtered=ln(i,1),Y(i),s.max=yn(s.filtered,1),s.argmax=Ps(s.filtered,1);let l=0;s.nms=await ke.nonMaxSuppressionAsync(s.boxes,s.max,(t.hand.maxDetected||0)+1,t.hand.iouThreshold||0,t.hand.minConfidence||1);let u=await s.nms.data(),c=await s.max.data(),p=await s.argmax.data();for(let d of Array.from(u)){let h=Oe(s.boxes,d,1),f=await h.data();Y(h);let m=[f[1],f[0],f[3]-f[1],f[2]-f[0]],g=$2(m,Xxe),y=[Math.trunc(m[0]*za[0]),Math.trunc(m[1]*za[1]),Math.trunc(m[2]*za[0]),Math.trunc(m[3]*za[1])],x=c[d],A=jxe[p[d]],b={id:l++,score:x,box:y,boxRaw:g,label:A};n.push(b)}return Object.keys(s).forEach(d=>Y(s[d])),n.sort((d,h)=>h.score-d.score),n.length>(t.hand.maxDetected||1)&&(n.length=t.hand.maxDetected||1),n}async function Jb(e,t,n){let s={id:t.id,score:Math.round(100*t.score)/100,boxScore:Math.round(100*t.score)/100,fingerScore:0,box:t.box,boxRaw:t.boxRaw,label:t.label,keypoints:[],landmarks:{},annotations:{}};if(e&&tn[1]&&n.hand.landmarks&&t.score>(n.hand.minConfidence||0)){let r={},a=[t.boxRaw[1],t.boxRaw[0],t.boxRaw[3]+t.boxRaw[1],t.boxRaw[2]+t.boxRaw[0]];r.crop=ke.cropAndResize(e,[a],[0],[Ri[1][0],Ri[1][1]],"bilinear"),r.div=ge(r.crop,He.tf255),[r.score,r.keypoints]=tn[1].execute(r.div,["Identity_1","Identity"]);let o=(await r.score.data())[0],i=(100-Math.trunc(100/(1+Math.exp(o))))/100;if(i>=(n.hand.minConfidence||0)){s.fingerScore=i,r.reshaped=W(r.keypoints,[-1,3]);let c=(await r.reshaped.array()).map(p=>[p[0]/Ri[1][1],p[1]/Ri[1][0],p[2]||0]).map(p=>[p[0]*t.boxRaw[2],p[1]*t.boxRaw[3],p[2]||0]);s.keypoints=c.map(p=>[za[0]*(p[0]+t.boxRaw[0]),za[1]*(p[1]+t.boxRaw[1]),p[2]||0]),s.landmarks=G2(s.keypoints);for(let p of Object.keys(uE))s.annotations[p]=uE[p].map(d=>s.landmarks&&s.keypoints[d]?s.keypoints[d]:null)}Object.keys(r).forEach(l=>Y(r[l]))}return s}async function Qb(e,t){var r,a;if(!((r=tn[0])!=null&&r.executor)||!((a=tn[1])!=null&&a.executor)||!tn[0].inputs[0].shape||!tn[1].inputs[0].shape)return[];za=[e.shape[2]||0,e.shape[1]||0],H2++;let n=(t.hand.skipTime||0)>ie()-Yb,s=H2<(t.hand.skipFrames||0);return t.skipAllowed&&n&&s?en.hands:new Promise(async o=>{let i=3*(t.hand.skipTime||0)>ie()-Yb,l=H2<3*(t.hand.skipFrames||0);t.skipAllowed&&en.hands.length===t.hand.maxDetected?en.hands=await Promise.all(en.boxes.map(c=>Jb(e,c,t))):t.skipAllowed&&i&&l&&en.hands.length>0?en.hands=await Promise.all(en.boxes.map(c=>Jb(e,c,t))):(en.boxes=await Kxe(e,t),Yb=ie(),en.hands=await Promise.all(en.boxes.map(c=>Jb(e,c,t))),H2=0);let u=[...en.boxes];if(en.boxes.length=0,t.cacheSensitivity>0)for(let c=0;c.05&&p.box[3]/(e.shape[1]||1)>.05&&en.hands[c].fingerScore&&en.hands[c].fingerScore>(t.hand.minConfidence||0)){let d=$2(p.box,lE),h=$2(p.boxRaw,lE);en.boxes.push({...u[c],box:d,boxRaw:h})}}for(let c=0;cie()-fE;return t.skipAllowed&&a&&r&&hE===s&&e4[n]?(mE++,e4[n]):new Promise(async l=>{var c;let u=[];if(((c=t.face.insightface)==null?void 0:c.enabled)&&(Vs==null?void 0:Vs.inputs[0].shape)){let p={};p.crop=ke.resizeBilinear(e,[Vs.inputs[0].shape[2],Vs.inputs[0].shape[1]],!1),p.data=Vs.execute(p.crop);let d=await p.data.data();u=Array.from(d),Object.keys(p).forEach(h=>Y(p[h]))}e4[n]=u,hE=s,fE=ie(),l(u)})}var $n,q2=[],n4=Number.MAX_SAFE_INTEGER,AE=0,xE=0;async function bE(e){var t;return pe.initial&&($n=null),$n?e.debug&&ee("cached model:",$n.modelUrl):$n=await Me((t=e.face.liveness)==null?void 0:t.modelPath),$n}async function s4(e,t,n,s){var o,i;if(!($n!=null&&$n.executor))return 0;let r=(((o=t.face.liveness)==null?void 0:o.skipTime)||0)>ie()-xE,a=n4<(((i=t.face.liveness)==null?void 0:i.skipFrames)||0);return t.skipAllowed&&r&&a&&AE===s&&q2[n]?(n4++,q2[n]):(n4=0,new Promise(async l=>{let u=ke.resizeBilinear(e,[$n!=null&&$n.inputs[0].shape?$n.inputs[0].shape[2]:0,$n!=null&&$n.inputs[0].shape?$n.inputs[0].shape[1]:0],!1),c=$n==null?void 0:$n.execute(u),p=(await c.data())[0];q2[n]=Math.round(100*p)/100,AE=s,xE=ie(),Y([u,c]),l(q2[n])}))}var Yn;async function r4(e){return!Yn||pe.initial?Yn=await Me(e.segmentation.modelPath):e.debug&&ee("cached model:",Yn.modelUrl),Yn}async function wE(e,t){var r;if(Yn||(Yn=await r4(t)),!(Yn!=null&&Yn.executor)||!((r=Yn==null?void 0:Yn.inputs)!=null&&r[0].shape))return null;let n={};n.resize=ke.resizeBilinear(e,[Yn.inputs[0].shape?Yn.inputs[0].shape[1]:0,Yn.inputs[0].shape?Yn.inputs[0].shape[2]:0],!1),n.norm=ge(n.resize,He.tf255),n.res=Yn.execute(n.norm),n.squeeze=Ge(n.res,0),[n.bgRaw,n.fgRaw]=bn(n.squeeze,2),n.fg=au(n.fgRaw),n.mul=M(n.fg,He.tf255),n.expand=Ft(n.mul,2),n.output=ke.resizeBilinear(n.expand,[e.shape[1],e.shape[2]]);let s;switch(t.segmentation.mode||"default"){case"default":n.input=Ge(e),n.concat=ut([n.input,n.output],-1),s=me(n.concat,"int32");break;case"alpha":s=me(n.output,"int32");break;default:s=Ue(0)}return Object.keys(n).forEach(a=>Y(n[a])),s}var Us,a4=[],SE=0,IE=0,CE=Number.MAX_SAFE_INTEGER;async function TE(e){var t;return pe.initial&&(Us=null),Us?e.debug&&ee("cached model:",Us.modelUrl):Us=await Me((t=e.face.mobilefacenet)==null?void 0:t.modelPath),Us}async function o4(e,t,n,s){var o,i;if(!(Us!=null&&Us.executor))return[];let r=CE<(((o=t.face.mobilefacenet)==null?void 0:o.skipFrames)||0),a=(((i=t.face.mobilefacenet)==null?void 0:i.skipTime)||0)>ie()-IE;return t.skipAllowed&&a&&r&&SE===s&&a4[n]?(CE++,a4[n]):new Promise(async l=>{var c;let u=[];if(((c=t.face.mobilefacenet)==null?void 0:c.enabled)&&(Us==null?void 0:Us.inputs[0].shape)){let p={};p.crop=ke.resizeBilinear(e,[Us.inputs[0].shape[2],Us.inputs[0].shape[1]],!1),p.data=Us.execute(p.crop);let d=await p.data.data();u=Array.from(d),Object.keys(p).forEach(h=>Y(p[h]))}a4[n]=u,SE=s,IE=ie(),l(u)})}var Hh={};fa(Hh,{connected:()=>K2,horizontal:()=>i4,kpt:()=>X2,relative:()=>u4,vertical:()=>l4});var X2=["nose","leftEye","rightEye","leftEar","rightEar","leftShoulder","rightShoulder","leftElbow","rightElbow","leftWrist","rightWrist","leftHip","rightHip","leftKnee","rightKnee","leftAnkle","rightAnkle"],i4=[["leftEye","rightEye"],["leftEar","rightEar"],["leftShoulder","rightShoulder"],["leftElbow","rightElbow"],["leftWrist","rightWrist"],["leftHip","rightHip"],["leftKnee","rightKnee"],["leftAnkle","rightAnkle"]],l4=[["leftKnee","leftShoulder"],["rightKnee","rightShoulder"],["leftAnkle","leftKnee"],["rightAnkle","rightKnee"]],u4=[[["leftHip","rightHip"],["leftShoulder","rightShoulder"]],[["leftElbow","rightElbow"],["leftShoulder","rightShoulder"]]],K2={leftLeg:["leftHip","leftKnee","leftAnkle"],rightLeg:["rightHip","rightKnee","rightAnkle"],torso:["leftShoulder","rightShoulder","rightHip","leftHip","leftShoulder"],leftArm:["leftShoulder","leftElbow","leftWrist"],rightArm:["rightShoulder","rightElbow","rightWrist"],head:[]};var EE=.005,Gs={keypoints:[],padding:[[0,0],[0,0],[0,0],[0,0]]};function c4(e){for(let t of i4){let n=e.keypoints.findIndex(r=>r.part===t[0]),s=e.keypoints.findIndex(r=>r.part===t[1]);if(e.keypoints[n]&&e.keypoints[s]&&e.keypoints[n].position[0]r&&r.part===t[0]),s=e.keypoints.findIndex(r=>r&&r.part===t[1]);e.keypoints[n]&&e.keypoints[s]&&e.keypoints[n].position[1]u&&u.part===t[0]),r=e.keypoints.findIndex(u=>u&&u.part===t[1]),a=e.keypoints.findIndex(u=>u&&u.part===n[0]),o=e.keypoints.findIndex(u=>u&&u.part===n[1]);if(!e.keypoints[a]||!e.keypoints[o])continue;let i=e.keypoints[s]?[Math.abs(e.keypoints[a].position[0]-e.keypoints[s].position[0]),Math.abs(e.keypoints[o].position[0]-e.keypoints[s].position[0])]:[0,0],l=e.keypoints[r]?[Math.abs(e.keypoints[o].position[0]-e.keypoints[r].position[0]),Math.abs(e.keypoints[a].position[0]-e.keypoints[r].position[0])]:[0,0];if(i[0]>i[1]||l[0]>l[1]){let u=e.keypoints[s];e.keypoints[s]=e.keypoints[r],e.keypoints[r]=u}}}function RE(e){for(let t=0;te.shape[1]?Math.trunc((e.shape[2]-e.shape[1])/2):0,e.shape[2]>e.shape[1]?Math.trunc((e.shape[2]-e.shape[1])/2):0],[e.shape[1]>e.shape[2]?Math.trunc((e.shape[1]-e.shape[2])/2):0,e.shape[1]>e.shape[2]?Math.trunc((e.shape[1]-e.shape[2])/2):0],[0,0]],n.pad=tr(e,Gs.padding),n.resize=ke.resizeBilinear(n.pad,[t,t]);let s=me(n.resize,"int32");return Object.keys(n).forEach(o=>Y(n[o])),s}function DE(e,t){e.keypoints=e.keypoints.filter(s=>s==null?void 0:s.position);for(let s of e.keypoints)s.position=[s.position[0]*(t[0]+Gs.padding[2][0]+Gs.padding[2][1])/t[0]-Gs.padding[2][0],s.position[1]*(t[1]+Gs.padding[1][0]+Gs.padding[1][1])/t[1]-Gs.padding[1][0]],s.positionRaw=[s.position[0]/t[0],s.position[1]/t[1]];let n=Fa(e.keypoints.map(s=>s.position),t);return e.box=n.box,e.boxRaw=n.boxRaw,e}var hn,Z2=0,d4=Number.MAX_SAFE_INTEGER,Cu={boxes:[],bodies:[],last:0};async function $E(e){var t;return pe.initial&&(hn=null),hn?e.debug&&ee("cached model:",hn.modelUrl):(j2(["size"],e),hn=await Me(e.body.modelPath)),Z2=(hn==null?void 0:hn.executor)&&((t=hn==null?void 0:hn.inputs)==null?void 0:t[0].shape)?hn.inputs[0].shape[2]:0,Z2<64&&(Z2=256),hn}function Yxe(e,t,n){let s=e[0][0],r=[],a=0;for(let c=0;ct.body.minConfidence){let p=[s[c][1],s[c][0]];r.push({score:Math.round(100*a)/100,part:X2[c],positionRaw:p,position:[Math.round((n.shape[2]||0)*p[0]),Math.round((n.shape[1]||0)*p[1])]})}a=r.reduce((c,p)=>p.score>c?p.score:c,0);let o=[],i=Fa(r.map(c=>c.position),[n.shape[2],n.shape[1]]),l={};for(let[c,p]of Object.entries(K2)){let d=[];for(let h=0;hg.part===p[h]),m=r.find(g=>g.part===p[h+1]);f&&m&&f.score>(t.body.minConfidence||0)&&m.score>(t.body.minConfidence||0)&&d.push([f.position,m.position])}l[c]=d}let u={id:0,score:a,box:i.box,boxRaw:i.boxRaw,keypoints:r,annotations:l};return c4(u),o.push(u),o}function Jxe(e,t,n){let s=[];for(let r=0;rt.body.minConfidence){let i=[];for(let p=0;p<17;p++){let d=a[3*p+2];if(d>t.body.minConfidence){let h=[a[3*p+1],a[3*p+0]];i.push({part:X2[p],score:Math.round(100*d)/100,positionRaw:h,position:[Math.round((n.shape[2]||0)*h[0]),Math.round((n.shape[1]||0)*h[1])]})}}let l=Fa(i.map(p=>p.position),[n.shape[2],n.shape[1]]),u={};for(let[p,d]of Object.entries(K2)){let h=[];for(let f=0;fy.part===d[f]),g=i.find(y=>y.part===d[f+1]);m&&g&&m.score>(t.body.minConfidence||0)&&g.score>(t.body.minConfidence||0)&&h.push([m.position,g.position])}u[p]=h}let c={id:r,score:o,box:l.box,boxRaw:l.boxRaw,keypoints:[...i],annotations:u};c4(c),s.push(c)}}return s.sort((r,a)=>a.score-r.score),s.length>t.body.maxDetected&&(s.length=t.body.maxDetected),s}async function p4(e,t){var r;if(!(hn!=null&&hn.executor)||!((r=hn==null?void 0:hn.inputs)!=null&&r[0].shape))return[];t.skipAllowed||(Cu.boxes.length=0),d4++;let n=(t.body.skipTime||0)>ie()-Cu.last,s=d4<(t.body.skipFrames||0);return t.skipAllowed&&n&&s?Cu.bodies:new Promise(async a=>{let o={};d4=0,o.input=_E(e,Z2),o.res=hn==null?void 0:hn.execute(o.input),Cu.last=ie();let i=await o.res.array();Cu.bodies=o.res.shape[2]===17?Yxe(i,t,e):Jxe(i,t,e);for(let l of Cu.bodies)DE(l,[e.shape[2]||1,e.shape[1]||1]),RE(l.keypoints);Object.keys(o).forEach(l=>Y(o[l])),a(Cu.bodies)})}var Ir,Y2=[],FE=0,h4=Number.MAX_SAFE_INTEGER,Q2=0,J2=2.5;async function OE(e){if(!Ir||pe.initial){Ir=await Me(e.object.modelPath);let t=Ir!=null&&Ir.executor?Object.values(Ir.modelSignature.inputs):void 0;Q2=Array.isArray(t)?parseInt(t[0].tensorShape.dim[2].size):416}else e.debug&&ee("cached model:",Ir.modelUrl);return Ir}async function Qxe(e,t,n){let s=0,r=[],a=Q2;for(let u of[1,2,4]){let c=u*13,p=Ge(e.find(y=>y.shape[1]===c**2&&(y.shape[2]||0)===gd.length)),d=await p.array(),h=Ge(e.find(y=>y.shape[1]===c**2&&(y.shape[2]||0)(n.object.minConfidence||0)&&x!==61){let b=(.5+Math.trunc(y%c))/c,w=(.5+Math.trunc(y/c))/c,k=g[y].map(F=>F*(c/u/a)),[C,N]=[b-J2/u*k[0],w-J2/u*k[1]],[R,D]=[b+J2/u*k[2]-C,w+J2/u*k[3]-N],E=[C,N,R,D];E=E.map(F=>Math.max(0,Math.min(F,1)));let $=[E[0]*t[0],E[1]*t[1],E[2]*t[0],E[3]*t[1]],S={id:s++,score:Math.round(100*A)/100,class:x+1,label:gd[x].label,box:$.map(F=>Math.trunc(F)),boxRaw:E};r.push(S)}}Y([p,h,f,m])}let o=r.map(u=>[u.boxRaw[1],u.boxRaw[0],u.boxRaw[3],u.boxRaw[2]]),i=r.map(u=>u.score),l=[];if(o&&o.length>0){let u=await ke.nonMaxSuppressionAsync(o,i,n.object.maxDetected,n.object.iouThreshold,n.object.minConfidence);l=await u.data(),Y(u)}return r=r.filter((u,c)=>l.includes(c)).sort((u,c)=>c.score-u.score),r}async function f4(e,t){if(!(Ir!=null&&Ir.executor))return[];let n=(t.object.skipTime||0)>ie()-FE,s=h4<(t.object.skipFrames||0);return t.skipAllowed&&n&&s&&Y2.length>0?(h4++,Y2):(h4=0,!pe.kernels.includes("mod")||!pe.kernels.includes("sparsetodense")?Y2:new Promise(async r=>{let a=[e.shape[2]||0,e.shape[1]||0],o=ke.resizeBilinear(e,[Q2,Q2],!1),i=ge(o,He.tf255),l=tt(i,[0,3,1,2]),u;t.object.enabled&&(u=Ir.execute(l)),FE=ie();let c=await Qxe(u,a,t);Y2=c,Y([o,i,l,...u]),r(c)}))}var qh=["nose","leftEye","rightEye","leftEar","rightEar","leftShoulder","rightShoulder","leftElbow","rightElbow","leftWrist","rightWrist","leftHip","rightHip","leftKnee","rightKnee","leftAnkle","rightAnkle"],ebe=qh.length,jh=qh.reduce((e,t,n)=>(e[t]=n,e),{}),tbe=[["leftHip","leftShoulder"],["leftElbow","leftShoulder"],["leftElbow","leftWrist"],["leftHip","leftKnee"],["leftKnee","leftAnkle"],["rightHip","rightShoulder"],["rightElbow","rightShoulder"],["rightElbow","rightWrist"],["rightHip","rightKnee"],["rightKnee","rightAnkle"],["leftShoulder","rightShoulder"],["leftHip","rightHip"]],kIe=tbe.map(([e,t])=>[jh[e],jh[t]]),zE=[["nose","leftEye"],["leftEye","leftEar"],["nose","rightEye"],["rightEye","rightEar"],["nose","leftShoulder"],["leftShoulder","leftElbow"],["leftElbow","leftWrist"],["leftShoulder","leftHip"],["leftHip","leftKnee"],["leftKnee","leftAnkle"],["nose","rightShoulder"],["rightShoulder","rightElbow"],["rightElbow","rightWrist"],["rightShoulder","rightHip"],["rightHip","rightKnee"],["rightKnee","rightAnkle"]];function LE(e){let t=e.reduce(({maxX:n,maxY:s,minX:r,minY:a},{position:{x:o,y:i}})=>({maxX:Math.max(n,o),maxY:Math.max(s,i),minX:Math.min(r,o),minY:Math.min(a,i)}),{maxX:Number.NEGATIVE_INFINITY,maxY:Number.NEGATIVE_INFINITY,minX:Number.POSITIVE_INFINITY,minY:Number.POSITIVE_INFINITY});return[t.minX,t.minY,t.maxX-t.minX,t.maxY-t.minY]}function BE(e,[t,n],[s,r]){let a=t/s,o=n/r,i=(u,c)=>({id:c,score:u.score,boxRaw:[u.box[0]/r,u.box[1]/s,u.box[2]/r,u.box[3]/s],box:[Math.trunc(u.box[0]*o),Math.trunc(u.box[1]*a),Math.trunc(u.box[2]*o),Math.trunc(u.box[3]*a)],keypoints:u.keypoints.map(({score:p,part:d,position:h})=>({score:p,part:d,position:[Math.trunc(h.x*o),Math.trunc(h.y*a)],positionRaw:[h.x/s,h.y/s]})),annotations:{}});return e.map((u,c)=>i(u,c))}var e1=class{constructor(t,n){de(this,"priorityQueue");de(this,"numberOfElements");de(this,"getElementValue");this.priorityQueue=new Array(t),this.numberOfElements=-1,this.getElementValue=n}enqueue(t){this.priorityQueue[++this.numberOfElements]=t,this.swim(this.numberOfElements)}dequeue(){let t=this.priorityQueue[0];return this.exchange(0,this.numberOfElements--),this.sink(0),this.priorityQueue[this.numberOfElements+1]=null,t}empty(){return this.numberOfElements===-1}size(){return this.numberOfElements+1}all(){return this.priorityQueue.slice(0,this.numberOfElements+1)}max(){return this.priorityQueue[0]}swim(t){for(;t>0&&this.less(Math.floor(t/2),t);)this.exchange(t,Math.floor(t/2)),t=Math.floor(t/2)}sink(t){for(;2*t<=this.numberOfElements;){let n=2*t;if(nn?n:e}function WE(e,t,n,s){let r=n-e,a=s-t;return r*r+a*a}function A4(e,t){return{x:e.x+t.x,y:e.y+t.y}}var Hs,sbe=["MobilenetV1/offset_2/BiasAdd","MobilenetV1/heatmap_2/BiasAdd","MobilenetV1/displacement_fwd_2/BiasAdd","MobilenetV1/displacement_bwd_2/BiasAdd"],t1=1,wd=16,rbe=50**2;function VE(e,t,n,s,r,a,o=2){let i=y=>({y:a.get(y.y,y.x,e),x:a.get(y.y,y.x,a.shape[2]/2+e)}),l=(y,x,A)=>({y:y4(Math.round(y.y/wd),0,x-1),x:y4(Math.round(y.x/wd),0,A-1)}),[u,c]=s.shape,p=l(t.position,u,c),d=i(p),f=A4(t.position,d);for(let y=0;y[jh[d],jh[h]]),o=a.map(([,d])=>d),i=a.map(([d])=>d),l=t.shape[2],u=o.length,c=new Array(l),p=g4(e.part,wd,n);c[e.part.id]={score:e.score,part:qh[e.part.id],position:p};for(let d=u-1;d>=0;--d){let h=o[d],f=i[d];c[h]&&!c[f]&&(c[f]=VE(d,c[h],f,t,n,r))}for(let d=0;dt){i=!1;break}if(!i)break}return i}function ibe(e,t){let[n,s,r]=t.shape,a=new e1(n*s*r,({score:o})=>o);for(let o=0;o{var o;let a=(o=r[s])==null?void 0:o.position;return a?WE(n,t,a.y,a.x)<=rbe:!1})}function lbe(e,t){return t.reduce((s,{position:r,score:a},o)=>(UE(e,r,o)||(s+=a),s),0)/t.length}function ube(e,t,n,s,r,a){let o=[],i=ibe(a,t);for(;o.lengthh.score>a);let p=lbe(o,c),d=LE(c);p>a&&o.push({keypoints:c,box:d,score:Math.round(100*p)/100})}return o}async function x4(e,t){if(!(Hs!=null&&Hs.executor))return[];let n=X(()=>{if(!Hs.inputs[0].shape)return[];let o=ke.resizeBilinear(e,[Hs.inputs[0].shape[2],Hs.inputs[0].shape[1]]),i=ye(ge(me(o,"float32"),127.5),1),u=Hs.execute(i,sbe).map(c=>Ge(c,[0]));return u[1]=Mn(u[1]),u}),s=await Promise.all(n.map(o=>o.buffer()));for(let o of n)Y(o);let r=ube(s[0],s[1],s[2],s[3],t.body.maxDetected,t.body.minConfidence);return Hs.inputs[0].shape?BE(r,[e.shape[1],e.shape[2]],[Hs.inputs[0].shape[2],Hs.inputs[0].shape[1]]):[]}async function GE(e){return!Hs||pe.initial?Hs=await Me(e.body.modelPath):e.debug&&ee("cached model:",Hs.modelUrl),Hs}var ua,cbe=["fgr","pha","r1o","r2o","r3o","r4o"],fn={},v4=0;function qE(e){Y([fn.r1i,fn.r2i,fn.r3i,fn.r4i,fn.downsample_ratio]),fn.r1i=Ue(0),fn.r2i=Ue(0),fn.r3i=Ue(0),fn.r4i=Ue(0),v4=e.segmentation.ratio||.5,fn.downsample_ratio=Ue(v4)}async function w4(e){return!ua||pe.initial?ua=await Me(e.segmentation.modelPath):e.debug&&ee("cached model:",ua.modelUrl),qE(e),ua}var jE=e=>X(()=>{let t=Ge(e,[0]),n=M(t,He.tf255);return me(n,"int32")});function b4(e,t){let n=e?jE(e):zr([t.shape[1]||0,t.shape[2]||0,3],255,"int32"),s=t?jE(t):zr([e.shape[1]||0,e.shape[2]||0,1],255,"int32"),r=ut([n,s],-1);return Y([n,s]),r}function dbe(e){return X(()=>{let t={};return t.unstack=bn(e,-1),t.concat=ut(t.unstack,1),t.split=Ht(t.concat,4,1),t.stack=ut(t.split,2),t.squeeze=Ge(t.stack,[0]),t.expand=Ft(t.squeeze,-1),t.add=le(t.expand,1),t.mul=M(t.add,127.5),t.cast=me(t.mul,"int32"),t.tile=As(t.cast,[1,1,3]),t.alpha=zr([t.tile.shape[0]||0,t.tile.shape[1]||0,1],255,"int32"),ut([t.tile,t.alpha],-1)})}async function XE(e,t){if(ua||(ua=await w4(t)),!(ua!=null&&ua.executor))return null;fn.src=ge(e,255),v4!==t.segmentation.ratio&&qE(t);let[n,s,r,a,o,i]=await ua.executeAsync(fn,cbe),l;switch(t.segmentation.mode||"default"){case"default":l=b4(n,s);break;case"alpha":l=b4(null,s);break;case"foreground":l=b4(n,null);break;case"state":l=dbe(r);break;default:l=Ue(0)}return Y([fn.src,n,s,fn.r1i,fn.r2i,fn.r3i,fn.r4i]),[fn.r1i,fn.r2i,fn.r3i,fn.r4i]=[r,a,o,i],l}var Jn;async function k4(e){return!Jn||pe.initial?Jn=await Me(e.segmentation.modelPath):e.debug&&ee("cached model:",Jn.modelUrl),Jn}async function ZE(e,t){var r;if(Jn||(Jn=await k4(t)),!(Jn!=null&&Jn.executor)||!((r=Jn==null?void 0:Jn.inputs)!=null&&r[0].shape))return null;let n={};n.resize=ke.resizeBilinear(e,[Jn.inputs[0].shape?Jn.inputs[0].shape[1]:0,Jn.inputs[0].shape?Jn.inputs[0].shape[2]:0],!1),n.norm=ge(n.resize,He.tf255),n.res=Jn.execute(n.norm),n.squeeze=Ge(n.res,0),n.alpha=ke.resizeBilinear(n.squeeze,[e.shape[1],e.shape[2]]),n.mul=M(n.alpha,He.tf255);let s;switch(t.segmentation.mode||"default"){case"default":n.input=Ge(e),n.concat=ut([n.input,n.mul],-1),s=me(n.concat,"int32");break;case"alpha":s=me(n.mul,"int32");break;default:s=Ue(0)}return Object.keys(n).forEach(a=>Y(n[a])),s}var js,n1=[],JE=0,QE=0,S4=Number.MAX_SAFE_INTEGER;async function eR(e){return pe.initial&&(js=null),js?e.debug&&ee("cached model:",js.modelUrl):js=await Me(e.face.ssrnet.modelPathAge),js}async function I4(e,t,n,s){var o,i,l,u;if(!js)return{age:0};let r=S4<(((o=t.face.ssrnet)==null?void 0:o.skipFrames)||0),a=(((i=t.face.ssrnet)==null?void 0:i.skipTime)||0)>ie()-QE;return t.skipAllowed&&r&&a&&JE===s&&((l=n1[n])==null?void 0:l.age)&&((u=n1[n])==null?void 0:u.age)>0?(S4++,n1[n]):(S4=0,new Promise(async c=>{var h;if(!(js!=null&&js.inputs)||!js.inputs[0]||!js.inputs[0].shape)return;let p={};p.resize=ke.resizeBilinear(e,[js.inputs[0].shape[2],js.inputs[0].shape[1]],!1),p.enhance=M(p.resize,He.tf255);let d={age:0};if((h=t.face.ssrnet)!=null&&h.enabled&&(p.age=js.execute(p.enhance)),p.age){let f=await p.age.data();d.age=Math.trunc(10*f[0])/10}Object.keys(p).forEach(f=>Y(p[f])),n1[n]=d,JE=s,QE=ie(),c(d)}))}var Cr,s1=[],nR=0,sR=0,C4=Number.MAX_SAFE_INTEGER,T4=[.2989,.587,.114];async function rR(e){var t;return pe.initial&&(Cr=null),Cr?e.debug&&ee("cached model:",Cr.modelUrl):Cr=await Me((t=e.face.ssrnet)==null?void 0:t.modelPathGender),Cr}async function N4(e,t,n,s){var o,i,l,u;if(!Cr)return{gender:"unknown",genderScore:0};let r=C4<(((o=t.face.ssrnet)==null?void 0:o.skipFrames)||0),a=(((i=t.face.ssrnet)==null?void 0:i.skipTime)||0)>ie()-sR;return t.skipAllowed&&r&&a&&nR===s&&((l=s1[n])==null?void 0:l.gender)&&((u=s1[n])==null?void 0:u.genderScore)>0?(C4++,s1[n]):(C4=0,new Promise(async c=>{var f;if(!(Cr!=null&&Cr.inputs[0].shape))return;let p={};p.resize=ke.resizeBilinear(e,[Cr.inputs[0].shape[2],Cr.inputs[0].shape[1]],!1),p.enhance=X(()=>{let[m,g,y]=Ht(p.resize,3,3),x=M(m,T4[0]),A=M(g,T4[1]),b=M(y,T4[2]),w=a0([x,A,b]);return M(ye(w,He.tf05),2)});let d={gender:"unknown",genderScore:0};(f=t.face.ssrnet)!=null&&f.enabled&&(p.gender=Cr.execute(p.enhance));let h=await p.gender.data();d.gender=h[0]>h[1]?"female":"male",d.genderScore=h[0]>h[1]?Math.trunc(100*h[0])/100:Math.trunc(100*h[1])/100,Object.keys(p).forEach(m=>Y(p[m])),s1[n]=d,nR=s,sR=ie(),c(d)}))}var Xh=class{constructor(){de(this,"ssrnetage",null);de(this,"gear",null);de(this,"blazeposedetect",null);de(this,"blazepose",null);de(this,"centernet",null);de(this,"efficientpose",null);de(this,"mobilefacenet",null);de(this,"insightface",null);de(this,"emotion",null);de(this,"facedetect",null);de(this,"faceiris",null);de(this,"facemesh",null);de(this,"faceres",null);de(this,"ssrnetgender",null);de(this,"handpose",null);de(this,"handskeleton",null);de(this,"handtrack",null);de(this,"liveness",null);de(this,"meet",null);de(this,"movenet",null);de(this,"nanodet",null);de(this,"posenet",null);de(this,"selfie",null);de(this,"rvm",null);de(this,"antispoof",null)}},J,E4=e=>{e&&(J=e),J||ee("instance not registred");let t=0,n=0,s=0;for(let a of Object.values(wr))t+=a.sizeFromManifest,n+=a.sizeLoadedWeights,s+=a.sizeDesired;let r=s>0?n/s:0;return{numLoadedModels:Object.values(wr).length,numDefinedModels:Object.keys(J.models).length,percentageLoaded:r,totalSizeFromManifest:t,totalSizeWeights:n,totalSizeLoading:s,totalSizeEnabled:void 0,modelStats:Object.values(wr)}};function r1(e){e&&(J=e);for(let t of Object.keys(J.models))J.models[t]=null}async function R4(e){var t,n,s,r,a,o,i,l,u,c,p,d,h,f,m,g,y,x,A,b,w,k,C,N,R,D,E,$,S;e&&(J=e),J||ee("instance not registred"),pe.initial&&r1(J),J.config.hand.enabled&&(!J.models.handpose&&((n=(t=J.config.hand.detector)==null?void 0:t.modelPath)==null?void 0:n.includes("handdetect"))&&([J.models.handpose,J.models.handskeleton]=await Zb(J.config)),!J.models.handskeleton&&J.config.hand.landmarks&&((r=(s=J.config.hand.detector)==null?void 0:s.modelPath)==null?void 0:r.includes("handdetect"))&&([J.models.handpose,J.models.handskeleton]=await Zb(J.config))),J.config.body.enabled&&!J.models.blazepose&&((a=J.config.body.modelPath)==null?void 0:a.includes("blazepose"))&&(J.models.blazepose=lN(J.config)),J.config.body.enabled&&!J.models.blazeposedetect&&J.config.body.detector&&J.config.body.detector.modelPath&&(J.models.blazeposedetect=iN(J.config)),J.config.body.enabled&&!J.models.efficientpose&&((o=J.config.body.modelPath)==null?void 0:o.includes("efficientpose"))&&(J.models.efficientpose=fN(J.config)),J.config.body.enabled&&!J.models.movenet&&((i=J.config.body.modelPath)==null?void 0:i.includes("movenet"))&&(J.models.movenet=$E(J.config)),J.config.body.enabled&&!J.models.posenet&&((l=J.config.body.modelPath)==null?void 0:l.includes("posenet"))&&(J.models.posenet=GE(J.config)),J.config.face.enabled&&!J.models.facedetect&&(J.models.facedetect=JT(J.config)),J.config.face.enabled&&((u=J.config.face.antispoof)==null?void 0:u.enabled)&&!J.models.antispoof&&(J.models.antispoof=zT(J.config)),J.config.face.enabled&&((c=J.config.face.liveness)==null?void 0:c.enabled)&&!J.models.liveness&&(J.models.liveness=bE(J.config)),J.config.face.enabled&&((p=J.config.face.description)==null?void 0:p.enabled)&&!J.models.faceres&&(J.models.faceres=PN(J.config)),J.config.face.enabled&&((d=J.config.face.emotion)==null?void 0:d.enabled)&&!J.models.emotion&&(J.models.emotion=AN(J.config)),J.config.face.enabled&&((h=J.config.face.iris)==null?void 0:h.enabled)&&!((f=J.config.face.attention)!=null&&f.enabled)&&!J.models.faceiris&&(J.models.faceiris=kN(J.config)),J.config.face.enabled&&((m=J.config.face.mesh)==null?void 0:m.enabled)&&!J.models.facemesh&&(J.models.facemesh=EN(J.config)),J.config.face.enabled&&((g=J.config.face.gear)==null?void 0:g.enabled)&&!J.models.gear&&(J.models.gear=MN(J.config)),J.config.face.enabled&&((y=J.config.face.ssrnet)==null?void 0:y.enabled)&&!J.models.ssrnetage&&(J.models.ssrnetage=eR(J.config)),J.config.face.enabled&&((x=J.config.face.ssrnet)==null?void 0:x.enabled)&&!J.models.ssrnetgender&&(J.models.ssrnetgender=rR(J.config)),J.config.face.enabled&&((A=J.config.face.mobilefacenet)==null?void 0:A.enabled)&&!J.models.mobilefacenet&&(J.models.mobilefacenet=TE(J.config)),J.config.face.enabled&&((b=J.config.face.insightface)==null?void 0:b.enabled)&&!J.models.insightface&&(J.models.insightface=gE(J.config)),J.config.hand.enabled&&!J.models.handtrack&&((k=(w=J.config.hand.detector)==null?void 0:w.modelPath)==null?void 0:k.includes("handtrack"))&&(J.models.handtrack=cE(J.config)),J.config.hand.enabled&&J.config.hand.landmarks&&!J.models.handskeleton&&((N=(C=J.config.hand.detector)==null?void 0:C.modelPath)==null?void 0:N.includes("handtrack"))&&(J.models.handskeleton=dE(J.config)),J.config.object.enabled&&!J.models.centernet&&((R=J.config.object.modelPath)==null?void 0:R.includes("centernet"))&&(J.models.centernet=dN(J.config)),J.config.object.enabled&&!J.models.nanodet&&((D=J.config.object.modelPath)==null?void 0:D.includes("nanodet"))&&(J.models.nanodet=OE(J.config)),J.config.segmentation.enabled&&!J.models.selfie&&((E=J.config.segmentation.modelPath)==null?void 0:E.includes("selfie"))&&(J.models.selfie=k4(J.config)),J.config.segmentation.enabled&&!J.models.meet&&(($=J.config.segmentation.modelPath)==null?void 0:$.includes("meet"))&&(J.models.meet=r4(J.config)),J.config.segmentation.enabled&&!J.models.rvm&&((S=J.config.segmentation.modelPath)==null?void 0:S.includes("rvm"))&&(J.models.rvm=w4(J.config));for await(let F of Object.keys(J.models))J.models[F]&&typeof J.models[F]!="undefined"&&(J.models[F]=await J.models[F])}function a1(e,t,n){var u,c;if(!t||(e&&(J=e),J||ee("instance not registred"),!((u=J==null?void 0:J.config)!=null&&u.validateModels)))return null;let s=["const","placeholder","noop","pad","squeeze","add","sub","mul","div"],r=["biasadd","fusedbatchnormv3","matmul","switch","shape","merge","split","broadcastto"],a=[],o=[],i=t.modelUrl,l=t.executor;if((c=l==null?void 0:l.graph)!=null&&c.nodes)for(let p of Object.values(l.graph.nodes)){let d=p.op.toLowerCase();a.includes(d)||a.push(d)}else!l&&J.config.debug&&ee("model not loaded",n);for(let p of a)!s.includes(p)&&!r.includes(p)&&!J.env.kernels.includes(p)&&!J.env.kernels.includes(p.replace("_",""))&&!J.env.kernels.includes(p.replace("native",""))&&!J.env.kernels.includes(p.replace("v2",""))&&o.push(p);return J.config.debug&&o.length>0&&ee("model validation failed:",n,o),o.length>0?{name:n,missing:o,ops:a,url:i}:null}function o1(e){e&&(J=e),J||ee("instance not registred");let t=[];for(let n of Object.keys(e.models)){let s=e.models[n];if(!s)continue;let r=a1(e,s,n);r&&t.push(r)}return t}var Et={name:"humangl",priority:999,canvas:null,gl:null,extensions:[],webGLattr:{alpha:!1,antialias:!1,premultipliedAlpha:!1,preserveDrawingBuffer:!1,depth:!1,stencil:!1,failIfMajorPerformanceCaveat:!1,desynchronized:!0}};function pbe(){let e=Et.gl;!e||(Et.extensions=e.getSupportedExtensions())}function oR(e){var t;if(e.config.backend==="humangl"&&(Et.name in Jt().registry&&!((t=Et==null?void 0:Et.gl)!=null&&t.getParameter(Et.gl.VERSION))&&(ee("humangl error: backend invalid context"),r1(e)),!$y(Et.name))){try{Et.canvas=vr(100,100)}catch(s){ee("humangl error: cannot create canvas:",s);return}try{if(Et.gl=Et.canvas.getContext("webgl2",Et.webGLattr),!Et.gl){ee("humangl error: cannot get webgl context");return}if(!Et.gl.getParameter(Et.gl.VERSION).includes("2.0")){ee("backend override: using fallback webgl backend as webgl 2.0 is not detected"),e.config.backend="webgl";return}Et.canvas&&(Et.canvas.addEventListener("webglcontextlost",r=>{throw ee("humangl error:",r.type),ee("possible browser memory leak using webgl or conflict with multiple backend registrations"),e.emit("error"),new Error("backend error: webgl context lost")}),Et.canvas.addEventListener("webglcontextrestored",r=>{ee("humangl error: context restored:",r)}),Et.canvas.addEventListener("webglcontextcreationerror",r=>{ee("humangl error: context create:",r)}))}catch(s){ee("humangl error: cannot get webgl context:",s);return}try{l2(2,Et.gl)}catch(s){ee("humangl error: cannot set webgl context:",s);return}try{let s=new Zu(Et.gl);eu(Et.name,()=>new od(s),Et.priority)}catch(s){ee("humangl error: cannot register webgl backend:",s);return}try{ea("webgl").forEach(r=>{let a={...r,backendName:Et.name};er(a)})}catch(s){ee("humangl error: cannot update webgl backend registration:",s);return}try{U().flagRegistry.WEBGL_VERSION&&U().set("WEBGL_VERSION",2)}catch(s){ee("humangl error: cannot set WebGL backend flags:",s);return}pbe();let n=Bs().getGPGPUContext?Bs().getGPGPUContext().gl:null;n?e.config.debug&&ee("humangl backend registered:",{webgl:n.getParameter(n.VERSION),renderer:n.getParameter(n.RENDERER)}):ee("humangl error: no current gl context:",n,Et.gl)}}function hbe(e){let t=[];if(!pe.kernels.includes("mod")){let n={kernelName:"Mod",backendName:cn(),kernelFunc:s=>X(()=>ye(s.inputs.a,M(ge(s.inputs.a,s.inputs.b),s.inputs.b)))};er(n),pe.kernels.push("mod"),t.push("mod")}if(!pe.kernels.includes("floormod")){let n={kernelName:"FloorMod",backendName:cn(),kernelFunc:s=>X(()=>le(M(Bc(s.inputs.a/s.inputs.b),s.inputs.b),ru(s.inputs.a,s.inputs.b)))};er(n),pe.kernels.push("floormod"),t.push("floormod")}if(!pe.kernels.includes("rotatewithoffset")&&e.softwareKernels){let n={kernelName:"RotateWithOffset",backendName:cn(),kernelFunc:s=>X(()=>{let r=cn();Zp("cpu");let a=ke.rotateWithOffset(s.inputs.image,s.attrs.radians,s.attrs.fillValue,s.attrs.center);return Zp(r),a})};er(n),pe.kernels.push("rotatewithoffset"),t.push("rotatewithoffset")}t.length>0&&e.debug&&ee("registered kernels:",t)}var lR={};async function Kh(e,t=!1){if(e.state="backend",t||pe.initial||e.config.backend&&e.config.backend.length>0&&cn()!==e.config.backend){let n=ie();if(e.config.backend&&e.config.backend.length>0){if(typeof window=="undefined"&&typeof WorkerGlobalScope!="undefined"&&e.config.debug&&e.config.debug&&ee("running inside web worker"),pe.browser&&e.config.backend==="tensorflow"&&(e.config.debug&&ee("override: backend set to tensorflow while running in browser"),e.config.backend="webgl"),pe.node&&(e.config.backend==="webgl"||e.config.backend==="humangl")&&(e.config.debug&&ee(`override: backend set to ${e.config.backend} while running in nodejs`),e.config.backend="tensorflow"),pe.browser&&e.config.backend==="webgpu")if(typeof navigator=="undefined"||typeof navigator.gpu=="undefined")ee("override: backend set to webgpu but browser does not support webgpu"),e.config.backend="webgl";else{let r=await navigator.gpu.requestAdapter();if(e.config.debug&&ee("enumerated webgpu adapter:",r),!r)ee("override: backend set to webgpu but browser reports no available gpu"),e.config.backend="webgl";else{let a="requestAdapterInfo"in r?await r.requestAdapterInfo():void 0;ee("webgpu adapter info:",a)}}let s=Object.keys(Jt().registryFactory);if(e.config.backend==="humangl"&&!s.includes("humangl")&&(oR(e),s=Object.keys(Jt().registryFactory)),e.config.debug&&ee("available backends:",s),s.includes(e.config.backend)||(ee(`error: backend ${e.config.backend} not found in registry`),e.config.backend=pe.node?"tensorflow":"webgl",e.config.debug&&ee(`override: setting backend ${e.config.backend}`)),e.config.debug&&ee("setting backend:",[e.config.backend]),e.config.backend==="wasm"){if(U().flagRegistry.CANVAS2D_WILL_READ_FREQUENTLY&&U().set("CANVAS2D_WILL_READ_FREQUENTLY",!0),e.config.debug&&ee("wasm path:",e.config.wasmPath),typeof f2!="undefined")f2(e.config.wasmPath,e.config.wasmPlatformFetch);else throw new Error("backend error: attempting to use wasm backend but wasm path is not set");let r=!1,a=!1;try{r=await U().getAsync("WASM_HAS_MULTITHREAD_SUPPORT"),a=await U().getAsync("WASM_HAS_SIMD_SUPPORT"),e.config.debug&&ee(`wasm execution: ${a?"simd":"no simd"} ${r?"multithreaded":"singlethreaded"}`),e.config.debug&&!a&&ee("warning: wasm simd support is not enabled")}catch(o){ee("wasm detection failed")}}try{await Zp(e.config.backend),await Yp()}catch(r){return ee("error: cannot set backend:",e.config.backend,r),!1}e.config.debug&&(lR=JSON.parse(JSON.stringify(U().flags)))}if((cn()==="humangl"||cn()==="webgl")&&(U().flagRegistry.WEBGL_USE_SHAPES_UNIFORMS&&U().set("WEBGL_USE_SHAPES_UNIFORMS",!0),U().flagRegistry.WEBGL_EXP_CONV&&U().set("WEBGL_EXP_CONV",!0),e.config.debug&&typeof e.config.deallocate!="undefined"&&e.config.deallocate&&(ee("changing webgl: WEBGL_DELETE_TEXTURE_THRESHOLD:",!0),U().set("WEBGL_DELETE_TEXTURE_THRESHOLD",0))),cn(),e.config.debug){let s=U().flags,r={};for(let a of Object.keys(s))lR[a]!==s[a]&&(r[a]=s[a]);e.config.debug&&Object.keys(r).length>0&&ee("backend:",cn(),"flags:",r)}if(e.config.flags&&Object.keys(e.config.flags).length>0){e.config.debug&&ee("flags:",e.config.flags);for(let[s,r]of Object.entries(e.config.flags))U().set(s,r)}_y(),BT(),e.performance.initBackend=Math.trunc(ie()-n),e.config.backend=cn(),await pe.updateBackend(),hbe(e.config),pe.initial=!1}return!0}function j2(e,t){for(let n of e){let s={kernelName:n,backendName:t.backend,kernelFunc:()=>{t.debug&&ee("kernelFunc",n,t.backend)}};er(s)}pe.kernels=ea(cn()).map(n=>n.kernelName.toLowerCase())}var M4={};fa(M4,{all:()=>O4,body:()=>Id,canvas:()=>F4,face:()=>Sd,gesture:()=>Nd,hand:()=>Cd,object:()=>Td,options:()=>Qn,person:()=>P4});var ar=e=>{if(!e)ee("draw error: invalid canvas");else if(!e.getContext)ee("draw error: canvas context not defined");else{let t=e.getContext("2d");if(!t)ee("draw error: cannot get canvas context");else return t}return null},Tu=e=>Math.round(e*180/Math.PI),La=(e,t)=>{if(!t.useDepth||typeof e=="undefined")return t.color;let n=Uint8ClampedArray.from([127+2*e,127-2*e,255]);return`rgba(${n[0]}, ${n[1]}, ${n[2]}, ${t.alpha})`};function Ba(e,t,n,s,r){e.fillStyle=La(s,r),e.beginPath(),e.arc(t,n,r.pointSize,0,2*Math.PI),e.fill()}function ca(e,t,n,s,r,a){if(e.beginPath(),e.lineWidth=a.lineWidth,a.useCurves){let o=(t+t+s)/2,i=(n+n+r)/2;e.ellipse(o,i,s/2,r/2,0,0,2*Math.PI)}else e.moveTo(t+a.roundRect,n),e.lineTo(t+s-a.roundRect,n),e.quadraticCurveTo(t+s,n,t+s,n+a.roundRect),e.lineTo(t+s,n+r-a.roundRect),e.quadraticCurveTo(t+s,n+r,t+s-a.roundRect,n+r),e.lineTo(t+a.roundRect,n+r),e.quadraticCurveTo(t,n+r,t,n+r-a.roundRect),e.lineTo(t,n+a.roundRect),e.quadraticCurveTo(t,n,t+a.roundRect,n),e.closePath();e.stroke()}function _4(e,t,n){if(!(t.length<2)){e.beginPath(),e.moveTo(t[0][0],t[0][1]);for(let s of t)e.strokeStyle=La(s[2]||0,n),e.lineTo(Math.trunc(s[0]),Math.trunc(s[1]));e.stroke(),n.fillPolygons&&(e.closePath(),e.fill())}}function cR(e,t,n){if(!(t.length<2)){if(e.lineWidth=n.lineWidth,!n.useCurves||t.length<=2){_4(e,t,n);return}e.moveTo(t[0][0],t[0][1]);for(let s=0;s0){let a=e.emotion.map(o=>`${Math.trunc(100*o.score)}% ${o.emotion}`);a.length>3&&(a.length=3),r.push(a.join(" "))}((n=e.rotation)==null?void 0:n.angle)&&((s=e.rotation)==null?void 0:s.gaze)&&(e.rotation.angle.roll&&r.push(`roll: ${Tu(e.rotation.angle.roll)}\xB0 yaw:${Tu(e.rotation.angle.yaw)}\xB0 pitch:${Tu(e.rotation.angle.pitch)}\xB0`),e.rotation.gaze.bearing&&r.push(`gaze: ${Tu(e.rotation.gaze.bearing)}\xB0`)),r.length===0&&r.push("face"),t.fillStyle=ft.color;for(let a=r.length-1;a>=0;a--){let o=Math.max(e.box[0],0),i=a*ft.lineHeight+e.box[1];ft.shadowColor&&ft.shadowColor!==""&&(t.fillStyle=ft.shadowColor,t.fillText(r[a],o+5,i+16)),t.fillStyle=ft.labelColor,t.fillText(r[a],o+4,i+15)}}}function mbe(e,t){var n,s,r,a;if(((n=e.annotations)==null?void 0:n.leftEyeIris)&&((s=e.annotations)==null?void 0:s.leftEyeIris[0])){t.strokeStyle=ft.useDepth?"rgba(255, 200, 255, 0.3)":ft.color,t.beginPath();let o=Math.abs(e.annotations.leftEyeIris[3][0]-e.annotations.leftEyeIris[1][0])/2,i=Math.abs(e.annotations.leftEyeIris[4][1]-e.annotations.leftEyeIris[2][1])/2;t.ellipse(e.annotations.leftEyeIris[0][0],e.annotations.leftEyeIris[0][1],o,i,0,0,2*Math.PI),t.stroke(),ft.fillPolygons&&(t.fillStyle=ft.useDepth?"rgba(255, 255, 200, 0.3)":ft.color,t.fill())}if(((r=e.annotations)==null?void 0:r.rightEyeIris)&&((a=e.annotations)==null?void 0:a.rightEyeIris[0])){t.strokeStyle=ft.useDepth?"rgba(255, 200, 255, 0.3)":ft.color,t.beginPath();let o=Math.abs(e.annotations.rightEyeIris[3][0]-e.annotations.rightEyeIris[1][0])/2,i=Math.abs(e.annotations.rightEyeIris[4][1]-e.annotations.rightEyeIris[2][1])/2;t.ellipse(e.annotations.rightEyeIris[0][0],e.annotations.rightEyeIris[0][1],o,i,0,0,2*Math.PI),t.stroke(),ft.fillPolygons&&(t.fillStyle=ft.useDepth?"rgba(255, 255, 200, 0.3)":ft.color,t.fill())}}function gbe(e,t){var n;if(ft.drawGaze&&((n=e.rotation)==null?void 0:n.angle)&&typeof Path2D!="undefined"){t.strokeStyle="pink";let s=e.box[0]+e.box[2]/2-e.box[3]*Tu(e.rotation.angle.yaw)/90,r=e.box[1]+e.box[3]/2+e.box[2]*Tu(e.rotation.angle.pitch)/90,a=new Path2D(` M ${e.box[0]+e.box[2]/2} ${e.box[1]} C ${s} ${e.box[1]}, @@ -7109,7 +7198,7 @@ return a / b;`,Ble=` ${e.box[0]} ${r}, ${e.box[0]+e.box[2]} ${r}, ${e.box[0]+e.box[2]} ${e.box[1]+e.box[3]/2} - `);t.stroke(o),t.stroke(a)}}function Pbe(e,t){var n;if(gt.drawGaze&&((n=e.rotation)==null?void 0:n.gaze.strength)&&e.rotation.gaze.bearing&&e.annotations.leftEyeIris&&e.annotations.rightEyeIris&&e.annotations.leftEyeIris[0]&&e.annotations.rightEyeIris[0]){t.strokeStyle="pink",t.fillStyle="pink";let s=[e.annotations.leftEyeIris[0][0]+Math.sin(e.rotation.gaze.bearing)*e.rotation.gaze.strength*e.box[3],e.annotations.leftEyeIris[0][1]+Math.cos(e.rotation.gaze.bearing)*e.rotation.gaze.strength*e.box[2]];Z4(t,[e.annotations.leftEyeIris[0][0],e.annotations.leftEyeIris[0][1]],[s[0],s[1]],4);let r=[e.annotations.rightEyeIris[0][0]+Math.sin(e.rotation.gaze.bearing)*e.rotation.gaze.strength*e.box[3],e.annotations.rightEyeIris[0][1]+Math.cos(e.rotation.gaze.bearing)*e.rotation.gaze.strength*e.box[2]];Z4(t,[e.annotations.rightEyeIris[0][0],e.annotations.rightEyeIris[0][1]],[r[0],r[1]],4)}}function Fbe(e,t){if(gt.drawPolygons&&e.mesh.length>=468){t.lineWidth=1;for(let n=0;ne.mesh[r]);K4(t,s,gt)}Dbe(e,t)}}function Obe(e,t){if(gt.drawPoints&&e.mesh.length>=468)for(let n=0;n0&&(Obe(r,s),Fbe(r,s),$be(r,s),Pbe(r,s))}}function zd(e,t,n){let s=Vt(Jn,n);if(!t||!e)return;let r=ur(e);if(!!r){r.lineJoin="round";for(let a=0;a0)for(let o of a.keypoints)r.fillStyle=Va(o[2],s),Ua(r,o[0],o[1],0,s);if(s.drawLabels&&a.annotations){let o=(i,l)=>{if(!i||i.length===0||!i[0])return;let u=i[i.length-1][2]||-256;r.fillStyle=Va(u,s),r.fillText(l,i[i.length-1][0]+4,i[i.length-1][1]+4)};r.font=s.font,o(a.annotations.index,"index"),o(a.annotations.middle,"middle"),o(a.annotations.ring,"ring"),o(a.annotations.pinky,"pinky"),o(a.annotations.thumb,"thumb"),o(a.annotations.palm,"palm")}if(s.drawPolygons&&a.annotations){let o=i=>{if(!(!i||i.length===0||!i[0]))for(let l=0;l0?l-1:0][0],i[l>0?l-1:0][1]),r.lineTo(i[l][0],i[l][1]),r.stroke()}};r.lineWidth=s.lineWidth,o(a.annotations.index),o(a.annotations.middle),o(a.annotations.ring),o(a.annotations.pinky),o(a.annotations.thumb)}}}}function Bd(e,t,n){let s=Vt(Jn,n);if(!t||!e)return;let r=ur(e);if(!!r){r.lineJoin="round",r.font=s.font;for(let a of t)if(s.drawBoxes){if(r.strokeStyle=s.color,r.fillStyle=s.color,ma(r,a.box[0],a.box[1],a.box[2],a.box[3],s),s.drawLabels){let o=`${a.label} ${Math.round(100*a.score)}%`;s.shadowColor&&s.shadowColor!==""&&(r.fillStyle=s.shadowColor,r.fillText(o,a.box[0]+3,1+a.box[1]+s.lineHeight,a.box[2])),r.fillStyle=s.labelColor,r.fillText(o,a.box[0]+2,0+a.box[1]+s.lineHeight,a.box[2])}r.stroke()}}}function Wd(e,t,n){let s=Vt(Jn,n);if(!(!t||!e)&&s.drawGestures){let r=ur(e);if(!r)return;r.font=s.font,r.fillStyle=s.color;let a=1;for(let o=0;o1&&l[1].length>0){let u=i[1]>0?`#${i[1]}`:"",c=`${i[0]} ${u}: ${l[1]}`;s.shadowColor&&s.shadowColor!==""&&(r.fillStyle=s.shadowColor,r.fillText(c,8,2+a*s.lineHeight)),r.fillStyle=s.labelColor,r.fillText(c,6,0+a*s.lineHeight),a+=1}}}}var Y4=0;function J4(e,t,n){let s=Vt(Jn,n);if(!t||!e)return;let r=ur(e);if(!!r){r.lineJoin="round",r.font=s.font;for(let a=0;at!=n[r].y>t&&e<(n[r].x-n[a].x)*(t-n[a].y)/(n[r].y-n[a].y)+n[a].x&&(s=!s);return s}async function TR(e){if(!e.tensor||!e.mesh||e.mesh.length<100)return e.tensor;let t=e.tensor.shape[2]||0,n=e.tensor.shape[1]||0,s=await e.tensor.buffer(),r=[];for(let o of kr.silhouette)r.push({x:(e.mesh[o][0]-e.box[0])/e.box[2],y:(e.mesh[o][1]-e.box[1])/e.box[3]});Vd&&Vd>0&&(r=r.map(o=>({x:o.x>.5?o.x+Vd:o.x-Vd,y:o.y>.5?o.y+Vd:o.y-Vd})));for(let o=0;o{let t=(p,d)=>Math.atan2(p[1]-d[1],p[0]-d[0]);if(!e.annotations.rightEyeIris||!e.annotations.leftEyeIris)return{bearing:0,strength:0};let n=[0,-.1],s=1,r=(e.mesh[33][2]||0)>(e.mesh[263][2]||0),a=r?e.mesh[473]:e.mesh[468],o=r?[(e.mesh[133][0]+e.mesh[33][0])/2,(e.mesh[133][1]+e.mesh[33][1])/2]:[(e.mesh[263][0]+e.mesh[362][0])/2,(e.mesh[263][1]+e.mesh[362][1])/2],i=r?[e.mesh[133][0]-e.mesh[33][0],e.mesh[23][1]-e.mesh[27][1]]:[e.mesh[263][0]-e.mesh[362][0],e.mesh[253][1]-e.mesh[257][1]],l=[(o[0]-a[0])/i[0]-n[0],s*(a[1]-o[1])/i[1]-n[1]],u=Math.sqrt(l[0]*l[0]+l[1]*l[1]);return u=Math.min(u,e.boxRaw[2]/2,e.boxRaw[3]/2),{bearing:(t([0,0],l)+Math.PI/2)%Math.PI,strength:u}},NR=(e,t)=>{let n=m=>{let g=Math.sqrt(m[0]*m[0]+m[1]*m[1]+m[2]*m[2]);return m[0]/=g,m[1]/=g,m[2]/=g,m},s=(m,g)=>{let y=m[0]-g[0],x=m[1]-g[1],A=m[2]-g[2];return[y,x,A]},r=(m,g)=>{let y=m[1]*g[2]-m[2]*g[1],x=m[2]*g[0]-m[0]*g[2],A=m[0]*g[1]-m[1]*g[0];return[y,x,A]},a=m=>{let[g,y,x,A,b,w,k,C,E]=m,_,$,R;return A<1?A>-1?(R=Math.asin(A),$=Math.atan2(-k,g),_=Math.atan2(-w,b)):(R=-Math.PI/2,$=-Math.atan2(C,E),_=0):(R=Math.PI/2,$=Math.atan2(C,E),_=0),Number.isNaN(_)&&(_=0),Number.isNaN($)&&($=0),Number.isNaN(R)&&(R=0),{pitch:2*-_,yaw:2*-$,roll:2*-R}},o=e.meshRaw;if(!o||o.length<300)return{angle:{pitch:0,yaw:0,roll:0},matrix:[1,0,0,0,1,0,0,0,1],gaze:{bearing:0,strength:0}};let i=Math.max(e.boxRaw[2]*t[0],e.boxRaw[3]*t[1])/1.5,l=[o[10],o[152],o[234],o[454]].map(m=>[m[0]*t[0]/i,m[1]*t[1]/i,m[2]]),u=n(s(l[1],l[0])),c=n(s(l[3],l[2])),p=n(r(c,u));c=r(u,p);let d=[c[0],c[1],c[2],u[0],u[1],u[2],p[0],p[1],p[2]],h=a(d),f=o.length===478?Bbe(e):{bearing:0,strength:0};return{angle:h,matrix:d,gaze:f}};var sv=async(e,t)=>{var f,m,g,y,x,A,b,w,k,C,E,_,$,R,P,S,M,L,U,K,q,Z,J,te,le,ae,pe,ce,xe;let n=ue(),s,r,a,o,i,l,u,c,p,d=[];e.state="run:face";let h=await GN(t,e.config);if(e.performance.face=me.perfadd?(e.performance.face||0)+Math.trunc(ue()-n):Math.trunc(ue()-n),!t.shape||t.shape.length!==4)return[];if(!h)return[];for(let ie=0;ie200?NR(h[ie],[t.shape[2],t.shape[1]]):null;e.analyze("Start Emotion:"),e.config.async?o=(m=e.config.face.emotion)!=null&&m.enabled?Jb(h[ie].tensor||Xe([]),e.config,ie,h.length):[]:(e.state="run:emotion",n=ue(),o=(g=e.config.face.emotion)!=null&&g.enabled?await Jb(h[ie].tensor||Xe([]),e.config,ie,h.length):[],e.performance.emotion=me.perfadd?(e.performance.emotion||0)+Math.trunc(ue()-n):Math.trunc(ue()-n)),e.analyze("End Emotion:"),e.analyze("Start AntiSpoof:"),e.config.async?u=(y=e.config.face.antispoof)!=null&&y.enabled?$b(h[ie].tensor||Xe([]),e.config,ie,h.length):0:(e.state="run:antispoof",n=ue(),u=(x=e.config.face.antispoof)!=null&&x.enabled?await $b(h[ie].tensor||Xe([]),e.config,ie,h.length):0,e.performance.antispoof=me.perfadd?(e.performance.antispoof||0)+Math.trunc(ue()-n):Math.trunc(ue()-n)),e.analyze("End AntiSpoof:"),e.analyze("Start Liveness:"),e.config.async?c=(A=e.config.face.liveness)!=null&&A.enabled?v4(h[ie].tensor||Xe([]),e.config,ie,h.length):0:(e.state="run:liveness",n=ue(),c=(b=e.config.face.liveness)!=null&&b.enabled?await v4(h[ie].tensor||Xe([]),e.config,ie,h.length):0,e.performance.liveness=me.perfadd?(e.performance.antispoof||0)+Math.trunc(ue()-n):Math.trunc(ue()-n)),e.analyze("End Liveness:"),e.analyze("Start GEAR:"),e.config.async?r=(w=e.config.face.gear)!=null&&w.enabled?l4(h[ie].tensor||Xe([]),e.config,ie,h.length):null:(e.state="run:gear",n=ue(),r=(k=e.config.face.gear)!=null&&k.enabled?await l4(h[ie].tensor||Xe([]),e.config,ie,h.length):null,e.performance.gear=Math.trunc(ue()-n)),e.analyze("End GEAR:"),e.analyze("Start SSRNet:"),e.config.async?(s=(C=e.config.face.ssrnet)!=null&&C.enabled?U4(h[ie].tensor||Xe([]),e.config,ie,h.length):null,a=(E=e.config.face.ssrnet)!=null&&E.enabled?j4(h[ie].tensor||Xe([]),e.config,ie,h.length):null):(e.state="run:ssrnet",n=ue(),s=(_=e.config.face.ssrnet)!=null&&_.enabled?await U4(h[ie].tensor||Xe([]),e.config,ie,h.length):null,a=($=e.config.face.ssrnet)!=null&&$.enabled?await j4(h[ie].tensor||Xe([]),e.config,ie,h.length):null,e.performance.ssrnet=Math.trunc(ue()-n)),e.analyze("End SSRNet:"),e.analyze("Start MobileFaceNet:"),e.config.async?i=(R=e.config.face.mobilefacenet)!=null&&R.enabled?S4(h[ie].tensor||Xe([]),e.config,ie,h.length):null:(e.state="run:mobilefacenet",n=ue(),i=(P=e.config.face.mobilefacenet)!=null&&P.enabled?await S4(h[ie].tensor||Xe([]),e.config,ie,h.length):null,e.performance.mobilefacenet=Math.trunc(ue()-n)),e.analyze("End MobileFaceNet:"),e.analyze("Start InsightFace:"),e.config.async?l=(S=e.config.face.insightface)!=null&&S.enabled?x4(h[ie].tensor||Xe([]),e.config,ie,h.length):null:(e.state="run:mobilefacenet",n=ue(),l=(M=e.config.face.insightface)!=null&&M.enabled?await x4(h[ie].tensor||Xe([]),e.config,ie,h.length):null,e.performance.mobilefacenet=Math.trunc(ue()-n)),e.analyze("End InsightFace:"),e.analyze("Start Description:"),e.config.async?p=r4(h[ie].tensor||Xe([]),e.config,ie,h.length):(e.state="run:description",n=ue(),p=await r4(h[ie].tensor||Xe([]),e.config,ie,h.length),e.performance.description=me.perfadd?(e.performance.description||0)+Math.trunc(ue()-n):Math.trunc(ue()-n)),e.analyze("End Description:"),e.config.async&&([s,a,o,i,l,p,r,u,c]=await Promise.all([s,a,o,i,l,p,r,u,c])),e.analyze("Finish Face:"),((L=e.config.face.ssrnet)==null?void 0:L.enabled)&&s&&a&&(p={...p,age:s.age,gender:a.gender,genderScore:a.genderScore}),((U=e.config.face.gear)==null?void 0:U.enabled)&&r&&(p={...p,age:r.age,gender:r.gender,genderScore:r.genderScore,race:r.race}),((K=e.config.face.mobilefacenet)==null?void 0:K.enabled)&&i&&(p.descriptor=i),((q=e.config.face.insightface)==null?void 0:q.enabled)&&l&&(p.descriptor=l),(Z=e.config.face.iris)!=null&&Z.enabled;let De=((le=(te=(J=h[ie])==null?void 0:J.annotations)==null?void 0:te.leftEyeIris)==null?void 0:le[0])&&((ce=(pe=(ae=h[ie])==null?void 0:ae.annotations)==null?void 0:pe.rightEyeIris)==null?void 0:ce[0])&&h[ie].annotations.leftEyeIris.length>0&&h[ie].annotations.rightEyeIris.length>0&&h[ie].annotations.leftEyeIris[0]!==null&&h[ie].annotations.rightEyeIris[0]!==null?Math.max(Math.abs(h[ie].annotations.leftEyeIris[3][0]-h[ie].annotations.leftEyeIris[1][0]),Math.abs(h[ie].annotations.rightEyeIris[4][1]-h[ie].annotations.rightEyeIris[2][1]))/t.shape[2]:0,Ge=(xe=e.config.face.detector)!=null&&xe.return?Ke(h[ie].tensor):null;Q(h[ie].tensor),h[ie].tensor&&delete h[ie].tensor;let ze={...h[ie],id:ie};p.age&&(ze.age=p.age),p.gender&&(ze.gender=p.gender),p.genderScore&&(ze.genderScore=p.genderScore),p.descriptor&&(ze.embedding=p.descriptor),p.race&&(ze.race=p.race),o&&(ze.emotion=o),u&&(ze.real=u),c&&(ze.live=c),De&&De!==0&&(ze.iris=Math.trunc(500/De/11.7)/100),_e&&(ze.rotation=_e),Ge&&(ze.tensor=Ge),d.push(ze),e.analyze("End Face")}return e.analyze("End FaceMesh:"),e.config.async&&(e.performance.face&&delete e.performance.face,e.performance.age&&delete e.performance.age,e.performance.gender&&delete e.performance.gender,e.performance.emotion&&delete e.performance.emotion),d};var ER=e=>{if(!e)return[];let t=[];for(let n=0;nl.part==="leftWrist"),r=e[n].keypoints.find(l=>l.part==="rightWrist"),a=e[n].keypoints.find(l=>l.part==="nose");a&&s&&r&&s.position[1]l.part==="leftShoulder"),i=e[n].keypoints.find(l=>l.part==="rightShoulder");o&&i&&Math.abs(o.positionRaw[1]-i.positionRaw[1])>.1&&t.push({body:n,gesture:`leaning ${o.position[1]>i.position[1]?"left":"right"}`})}return t},RR=e=>{if(!e)return[];let t=[];for(let n=0;n450){let s=(e[n].mesh[33][2]||0)-(e[n].mesh[263][2]||0),r=e[n].mesh[33][0]-e[n].mesh[263][0];Math.abs(s/r)<=.15?t.push({face:n,gesture:"facing center"}):t.push({face:n,gesture:`facing ${s<0?"left":"right"}`}),Math.abs(e[n].mesh[374][1]-e[n].mesh[386][1])/Math.abs(e[n].mesh[443][1]-e[n].mesh[450][1])<.2&&t.push({face:n,gesture:"blink left eye"}),Math.abs(e[n].mesh[145][1]-e[n].mesh[159][1])/Math.abs(e[n].mesh[223][1]-e[n].mesh[230][1])<.2&&t.push({face:n,gesture:"blink right eye"});let i=Math.min(100,500*Math.abs(e[n].mesh[13][1]-e[n].mesh[14][1])/Math.abs(e[n].mesh[10][1]-e[n].mesh[152][1]));i>10&&t.push({face:n,gesture:`mouth ${Math.trunc(i)}% open`});let l=e[n].mesh[152][2]||0;Math.abs(l)>10&&t.push({face:n,gesture:`head ${l<0?"up":"down"}`})}return t},_R=e=>{var n,s,r,a;if(!e)return[];let t=[];for(let o=0;o.06||g>.06)&&(h=!1),m>g?m>.05&&t.push({iris:o,gesture:"looking right"}):g>.05&&t.push({iris:o,gesture:"looking left"});let y=Math.abs(e[o].mesh[145][1]-e[o].annotations.rightEyeIris[0][1])/e[o].box[3],x=Math.abs(e[o].mesh[374][1]-e[o].annotations.leftEyeIris[0][1])/e[o].box[3];(x<.01||y<.01||x>.022||y>.022)&&(h=!1),(x<.01||y<.01)&&t.push({iris:o,gesture:"looking down"}),(x>.022||y>.022)&&t.push({iris:o,gesture:"looking up"}),h&&t.push({iris:o,gesture:"looking center"})}return t},DR=e=>{if(!e)return[];let t=[];for(let n=0;n0){let r=s.reduce((o,i)=>(o.position[2]||0)<(i.position[2]||0)?o:i);t.push({hand:n,gesture:`${r.name} forward`});let a=s.reduce((o,i)=>o.position[1]((r-1)*Re.body[S].box[J]+Z)/r),L=e.body[S].boxRaw.map((Z,J)=>((r-1)*Re.body[S].boxRaw[J]+Z)/r),U=e.body[S].keypoints.map((Z,J)=>{var te,le,ae,pe,ce,xe,ie,_e,De;return{score:Z.score,part:Z.part,position:[Re.body[S].keypoints[J]?((r-1)*(Re.body[S].keypoints[J].position[0]||0)+(Z.position[0]||0))/r:Z.position[0],Re.body[S].keypoints[J]?((r-1)*(Re.body[S].keypoints[J].position[1]||0)+(Z.position[1]||0))/r:Z.position[1],Re.body[S].keypoints[J]?((r-1)*(Re.body[S].keypoints[J].position[2]||0)+(Z.position[2]||0))/r:Z.position[2]],positionRaw:[Re.body[S].keypoints[J]?((r-1)*(Re.body[S].keypoints[J].positionRaw[0]||0)+(Z.positionRaw[0]||0))/r:Z.positionRaw[0],Re.body[S].keypoints[J]?((r-1)*(Re.body[S].keypoints[J].positionRaw[1]||0)+(Z.positionRaw[1]||0))/r:Z.positionRaw[1],Re.body[S].keypoints[J]?((r-1)*(Re.body[S].keypoints[J].positionRaw[2]||0)+(Z.positionRaw[2]||0))/r:Z.positionRaw[2]],distance:[Re.body[S].keypoints[J]?((r-1)*(((te=Re.body[S].keypoints[J].distance)==null?void 0:te[0])||0)+(((le=Z.distance)==null?void 0:le[0])||0))/r:(ae=Z.distance)==null?void 0:ae[0],Re.body[S].keypoints[J]?((r-1)*(((pe=Re.body[S].keypoints[J].distance)==null?void 0:pe[1])||0)+(((ce=Z.distance)==null?void 0:ce[1])||0))/r:(xe=Z.distance)==null?void 0:xe[1],Re.body[S].keypoints[J]?((r-1)*(((ie=Re.body[S].keypoints[J].distance)==null?void 0:ie[2])||0)+(((_e=Z.distance)==null?void 0:_e[2])||0))/r:(De=Z.distance)==null?void 0:De[2]]}}),K={},q={connected:{}};(o=t.body.modelPath)!=null&&o.includes("efficientpose")?q=i1:(i=t.body.modelPath)!=null&&i.includes("blazepose")?q=n1:(l=t.body.modelPath)!=null&&l.includes("movenet")&&(q=of);for(let[Z,J]of Object.entries(q.connected)){let te=[];for(let le=0;lece.part===J[le]),pe=U.find(ce=>ce.part===J[le+1]);ae&&pe&&te.push([ae.position,pe.position])}K[Z]=te}Re.body[S]={...e.body[S],box:M,boxRaw:L,keypoints:U,annotations:K}}if(!Re.hand||e.hand.length!==Re.hand.length)Re.hand=JSON.parse(JSON.stringify(e.hand));else for(let S=0;S((r-1)*Re.hand[S].box[Z]+q)/r),L=e.hand[S].boxRaw.map((q,Z)=>((r-1)*Re.hand[S].boxRaw[Z]+q)/r);Re.hand[S].keypoints.length!==e.hand[S].keypoints.length&&(Re.hand[S].keypoints=e.hand[S].keypoints);let U=e.hand[S].keypoints&&e.hand[S].keypoints.length>0?e.hand[S].keypoints.map((q,Z)=>q.map((J,te)=>((r-1)*(Re.hand[S].keypoints[Z][te]||1)+(J||0))/r)):[],K={};if(Object.keys(Re.hand[S].annotations).length!==Object.keys(e.hand[S].annotations).length)Re.hand[S].annotations=e.hand[S].annotations,K=Re.hand[S].annotations;else if(e.hand[S].annotations)for(let q of Object.keys(e.hand[S].annotations))K[q]=(p=(c=(u=e.hand[S])==null?void 0:u.annotations)==null?void 0:c[q])!=null&&p[0]?e.hand[S].annotations[q].map((Z,J)=>Z.map((te,le)=>((r-1)*Re.hand[S].annotations[q][J][le]+te)/r)):null;Re.hand[S]={...e.hand[S],box:M,boxRaw:L,keypoints:U,annotations:K}}if(!Re.face||e.face.length!==Re.face.length)Re.face=JSON.parse(JSON.stringify(e.face));else for(let S=0;S((r-1)*Re.face[S].box[K]+U)/r),L=e.face[S].boxRaw.map((U,K)=>((r-1)*Re.face[S].boxRaw[K]+U)/r);if(e.face[S].rotation){let U={matrix:[0,0,0,0,0,0,0,0,0],angle:{roll:0,yaw:0,pitch:0},gaze:{bearing:0,strength:0}};U.matrix=(d=e.face[S].rotation)==null?void 0:d.matrix,U.angle={roll:((r-1)*(((f=(h=Re.face[S].rotation)==null?void 0:h.angle)==null?void 0:f.roll)||0)+(((g=(m=e.face[S].rotation)==null?void 0:m.angle)==null?void 0:g.roll)||0))/r,yaw:((r-1)*(((x=(y=Re.face[S].rotation)==null?void 0:y.angle)==null?void 0:x.yaw)||0)+(((b=(A=e.face[S].rotation)==null?void 0:A.angle)==null?void 0:b.yaw)||0))/r,pitch:((r-1)*(((k=(w=Re.face[S].rotation)==null?void 0:w.angle)==null?void 0:k.pitch)||0)+(((E=(C=e.face[S].rotation)==null?void 0:C.angle)==null?void 0:E.pitch)||0))/r},U.gaze={bearing:((r-1)*(((_=Re.face[S].rotation)==null?void 0:_.gaze.bearing)||0)+((($=e.face[S].rotation)==null?void 0:$.gaze.bearing)||0))/r,strength:((r-1)*(((R=Re.face[S].rotation)==null?void 0:R.gaze.strength)||0)+(((P=e.face[S].rotation)==null?void 0:P.gaze.strength)||0))/r},Re.face[S]={...e.face[S],rotation:U,box:M,boxRaw:L}}else Re.face[S]={...e.face[S],box:M,boxRaw:L}}if(!Re.object||e.object.length!==Re.object.length)Re.object=JSON.parse(JSON.stringify(e.object));else for(let S=0;S((r-1)*Re.object[S].box[K]+U)/r),L=e.object[S].boxRaw.map((U,K)=>((r-1)*Re.object[S].boxRaw[K]+U)/r);Re.object[S]={...e.object[S],box:M,boxRaw:L}}if(e.persons){let S=e.persons;if(!Re.persons||S.length!==Re.persons.length)Re.persons=JSON.parse(JSON.stringify(S));else for(let M=0;M((r-1)*Re.persons[M].box[U]+L)/r)}e.gesture&&(Re.gesture=e.gesture);let a=ue();return rv=me.perfadd?rv+Math.round(a-n):Math.round(a-n),e.performance&&(Re.performance={...e.performance,interpolate:rv}),Re}var iv={};xa(iv,{distance:()=>pf,match:()=>ov,similarity:()=>av});function pf(e,t,n={order:2,multiplier:25}){if(!e||!e)return Number.MAX_SAFE_INTEGER;let s=0;for(let r=0;r{if(e===0)return 1;let r=t===2?Math.sqrt(e):e**(1/t),a=(1-r/100-n)/(s-n);return Math.max(Math.min(a,1),0)};function av(e,t,n={order:2,multiplier:25,min:.2,max:.8}){let s=pf(e,t,n);return PR(s,n.order||2,n.min||0,n.max||1)}function ov(e,t,n={order:2,multiplier:25,threshold:0,min:.2,max:.8}){if(!Array.isArray(e)||!Array.isArray(t)||e.length<64||t.length===0)return{index:-1,distance:Number.POSITIVE_INFINITY,similarity:0};let s=Number.MAX_SAFE_INTEGER,r=-1;for(let o=0;ob.box[0]&&h.box[0]b.box[1]&&h.box[1]+h.box[3]f.body.box[0]&&b.box[0]+b.box[2]f.body.box[1]&&b.box[1]+b.box[3]f.body.box[0]&&b.box[1]+b.box[3]>f.body.box[1]&&b.box[1]+b.box[3]{b&&b.length===4&&(m.push(b[0],b[0]+b[2]),g.push(b[1],b[1]+b[3]))};y(f.face.box),y((c=f.body)==null?void 0:c.box),y((p=f.hands.left)==null?void 0:p.box),y((d=f.hands.right)==null?void 0:d.box);let x=Math.min(...m),A=Math.min(...g);f.box=[x,A,Math.max(...m)-x,Math.max(...g)-A],(r==null?void 0:r[1])&&(r==null?void 0:r[2])&&(f.boxRaw=[f.box[0]/r[2],f.box[1]/r[1],f.box[2]/r[2],f.box[3]/r[1]]),o.push(f)}return o}var D1=` + `);t.stroke(o),t.stroke(a)}}function ybe(e,t){var n;if(ft.drawGaze&&((n=e.rotation)==null?void 0:n.gaze.strength)&&e.rotation.gaze.bearing&&e.annotations.leftEyeIris&&e.annotations.rightEyeIris&&e.annotations.leftEyeIris[0]&&e.annotations.rightEyeIris[0]){t.strokeStyle="pink",t.fillStyle="pink";let s=[e.annotations.leftEyeIris[0][0]+Math.sin(e.rotation.gaze.bearing)*e.rotation.gaze.strength*e.box[3],e.annotations.leftEyeIris[0][1]+Math.cos(e.rotation.gaze.bearing)*e.rotation.gaze.strength*e.box[2]];D4(t,[e.annotations.leftEyeIris[0][0],e.annotations.leftEyeIris[0][1]],[s[0],s[1]],4);let r=[e.annotations.rightEyeIris[0][0]+Math.sin(e.rotation.gaze.bearing)*e.rotation.gaze.strength*e.box[3],e.annotations.rightEyeIris[0][1]+Math.cos(e.rotation.gaze.bearing)*e.rotation.gaze.strength*e.box[2]];D4(t,[e.annotations.rightEyeIris[0][0],e.annotations.rightEyeIris[0][1]],[r[0],r[1]],4)}}function Abe(e,t){if(ft.drawPolygons&&e.mesh.length>=468){t.lineWidth=1;for(let n=0;ne.mesh[r]);_4(t,s,ft)}mbe(e,t)}}function xbe(e,t){if(ft.drawPoints&&e.mesh.length>=468)for(let n=0;n0&&(xbe(r,s),Abe(r,s),gbe(r,s),ybe(r,s))}}function Id(e,t,n){let s=Bt(Qn,n);if(!t||!e)return;let r=ar(e);if(!!r){r.lineJoin="round";for(let a=0;a0)for(let o of a.keypoints)r.fillStyle=La(o[2],s),Ba(r,o[0],o[1],0,s);if(s.drawLabels&&a.annotations){let o=(i,l)=>{if(!i||i.length===0||!i[0])return;let u=i[i.length-1][2]||-256;r.fillStyle=La(u,s),r.fillText(l,i[i.length-1][0]+4,i[i.length-1][1]+4)};r.font=s.font,o(a.annotations.index,"index"),o(a.annotations.middle,"middle"),o(a.annotations.ring,"ring"),o(a.annotations.pinky,"pinky"),o(a.annotations.thumb,"thumb"),o(a.annotations.palm,"palm")}if(s.drawPolygons&&a.annotations){let o=i=>{if(!(!i||i.length===0||!i[0]))for(let l=0;l0?l-1:0][0],i[l>0?l-1:0][1]),r.lineTo(i[l][0],i[l][1]),r.stroke()}};r.lineWidth=s.lineWidth,o(a.annotations.index),o(a.annotations.middle),o(a.annotations.ring),o(a.annotations.pinky),o(a.annotations.thumb)}}}}function Td(e,t,n){let s=Bt(Qn,n);if(!t||!e)return;let r=ar(e);if(!!r){r.lineJoin="round",r.font=s.font;for(let a of t)if(s.drawBoxes){if(r.strokeStyle=s.color,r.fillStyle=s.color,ca(r,a.box[0],a.box[1],a.box[2],a.box[3],s),s.drawLabels){let o=`${a.label} ${Math.round(100*a.score)}%`;s.shadowColor&&s.shadowColor!==""&&(r.fillStyle=s.shadowColor,r.fillText(o,a.box[0]+3,1+a.box[1]+s.lineHeight,a.box[2])),r.fillStyle=s.labelColor,r.fillText(o,a.box[0]+2,0+a.box[1]+s.lineHeight,a.box[2])}r.stroke()}}}function Nd(e,t,n){let s=Bt(Qn,n);if(!(!t||!e)&&s.drawGestures){let r=ar(e);if(!r)return;r.font=s.font,r.fillStyle=s.color;let a=1;for(let o=0;o1&&l[1].length>0){let u=i[1]>0?`#${i[1]}`:"",c=`${i[0]} ${u}: ${l[1]}`;s.shadowColor&&s.shadowColor!==""&&(r.fillStyle=s.shadowColor,r.fillText(c,8,2+a*s.lineHeight)),r.fillStyle=s.labelColor,r.fillText(c,6,0+a*s.lineHeight),a+=1}}}}var $4=0;function P4(e,t,n){let s=Bt(Qn,n);if(!t||!e)return;let r=ar(e);if(!!r){r.lineJoin="round",r.font=s.font;for(let a=0;at!=n[r].y>t&&e<(n[r].x-n[a].x)*(t-n[a].y)/(n[r].y-n[a].y)+n[a].x&&(s=!s);return s}async function dR(e){if(!e.tensor||!e.mesh||e.mesh.length<100)return e.tensor;let t=e.tensor.shape[2]||0,n=e.tensor.shape[1]||0,s=await e.tensor.buffer(),r=[];for(let o of kr.silhouette)r.push({x:(e.mesh[o][0]-e.box[0])/e.box[2],y:(e.mesh[o][1]-e.box[1])/e.box[3]});Ed&&Ed>0&&(r=r.map(o=>({x:o.x>.5?o.x+Ed:o.x-Ed,y:o.y>.5?o.y+Ed:o.y-Ed})));for(let o=0;o{let t=(p,d)=>Math.atan2(p[1]-d[1],p[0]-d[0]);if(!e.annotations.rightEyeIris||!e.annotations.leftEyeIris)return{bearing:0,strength:0};let n=[0,-.1],s=1,r=(e.mesh[33][2]||0)>(e.mesh[263][2]||0),a=r?e.mesh[473]:e.mesh[468],o=r?[(e.mesh[133][0]+e.mesh[33][0])/2,(e.mesh[133][1]+e.mesh[33][1])/2]:[(e.mesh[263][0]+e.mesh[362][0])/2,(e.mesh[263][1]+e.mesh[362][1])/2],i=r?[e.mesh[133][0]-e.mesh[33][0],e.mesh[23][1]-e.mesh[27][1]]:[e.mesh[263][0]-e.mesh[362][0],e.mesh[253][1]-e.mesh[257][1]],l=[(o[0]-a[0])/i[0]-n[0],s*(a[1]-o[1])/i[1]-n[1]],u=Math.sqrt(l[0]*l[0]+l[1]*l[1]);return u=Math.min(u,e.boxRaw[2]/2,e.boxRaw[3]/2),{bearing:(t([0,0],l)+Math.PI/2)%Math.PI,strength:u}},pR=(e,t)=>{let n=m=>{let g=Math.sqrt(m[0]*m[0]+m[1]*m[1]+m[2]*m[2]);return m[0]/=g,m[1]/=g,m[2]/=g,m},s=(m,g)=>{let y=m[0]-g[0],x=m[1]-g[1],A=m[2]-g[2];return[y,x,A]},r=(m,g)=>{let y=m[1]*g[2]-m[2]*g[1],x=m[2]*g[0]-m[0]*g[2],A=m[0]*g[1]-m[1]*g[0];return[y,x,A]},a=m=>{let[g,y,x,A,b,w,k,C,N]=m,R,D,E;return A<1?A>-1?(E=Math.asin(A),D=Math.atan2(-k,g),R=Math.atan2(-w,b)):(E=-Math.PI/2,D=-Math.atan2(C,N),R=0):(E=Math.PI/2,D=Math.atan2(C,N),R=0),Number.isNaN(R)&&(R=0),Number.isNaN(D)&&(D=0),Number.isNaN(E)&&(E=0),{pitch:2*-R,yaw:2*-D,roll:2*-E}},o=e.meshRaw;if(!o||o.length<300)return{angle:{pitch:0,yaw:0,roll:0},matrix:[1,0,0,0,1,0,0,0,1],gaze:{bearing:0,strength:0}};let i=Math.max(e.boxRaw[2]*t[0],e.boxRaw[3]*t[1])/1.5,l=[o[10],o[152],o[234],o[454]].map(m=>[m[0]*t[0]/i,m[1]*t[1]/i,m[2]]),u=n(s(l[1],l[0])),c=n(s(l[3],l[2])),p=n(r(c,u));c=r(u,p);let d=[c[0],c[1],c[2],u[0],u[1],u[2],p[0],p[1],p[2]],h=a(d),f=o.length===478?kbe(e):{bearing:0,strength:0};return{angle:h,matrix:d,gaze:f}};var L4=async(e,t)=>{var f,m,g,y,x,A,b,w,k,C,N,R,D,E,$,S,F,z,V,j,G,q,K,ne,ae,re,ue,oe,Ae;let n=ie(),s,r,a,o,i,l,u,c,p,d=[];e.state="run:face";let h=await NN(t,e.config);if(e.performance.face=pe.perfadd?(e.performance.face||0)+Math.trunc(ie()-n):Math.trunc(ie()-n),!t.shape||t.shape.length!==4)return[];if(!h)return[];for(let Q=0;Q200?pR(h[Q],[t.shape[2],t.shape[1]]):null;e.analyze("Start Emotion:"),e.config.async?o=(m=e.config.face.emotion)!=null&&m.enabled?Pb(h[Q].tensor||Ue([]),e.config,Q,h.length):[]:(e.state="run:emotion",n=ie(),o=(g=e.config.face.emotion)!=null&&g.enabled?await Pb(h[Q].tensor||Ue([]),e.config,Q,h.length):[],e.performance.emotion=pe.perfadd?(e.performance.emotion||0)+Math.trunc(ie()-n):Math.trunc(ie()-n)),e.analyze("End Emotion:"),e.analyze("Start AntiSpoof:"),e.config.async?u=(y=e.config.face.antispoof)!=null&&y.enabled?mb(h[Q].tensor||Ue([]),e.config,Q,h.length):0:(e.state="run:antispoof",n=ie(),u=(x=e.config.face.antispoof)!=null&&x.enabled?await mb(h[Q].tensor||Ue([]),e.config,Q,h.length):0,e.performance.antispoof=pe.perfadd?(e.performance.antispoof||0)+Math.trunc(ie()-n):Math.trunc(ie()-n)),e.analyze("End AntiSpoof:"),e.analyze("Start Liveness:"),e.config.async?c=(A=e.config.face.liveness)!=null&&A.enabled?s4(h[Q].tensor||Ue([]),e.config,Q,h.length):0:(e.state="run:liveness",n=ie(),c=(b=e.config.face.liveness)!=null&&b.enabled?await s4(h[Q].tensor||Ue([]),e.config,Q,h.length):0,e.performance.liveness=pe.perfadd?(e.performance.antispoof||0)+Math.trunc(ie()-n):Math.trunc(ie()-n)),e.analyze("End Liveness:"),e.analyze("Start GEAR:"),e.config.async?r=(w=e.config.face.gear)!=null&&w.enabled?Gb(h[Q].tensor||Ue([]),e.config,Q,h.length):null:(e.state="run:gear",n=ie(),r=(k=e.config.face.gear)!=null&&k.enabled?await Gb(h[Q].tensor||Ue([]),e.config,Q,h.length):null,e.performance.gear=Math.trunc(ie()-n)),e.analyze("End GEAR:"),e.analyze("Start SSRNet:"),e.config.async?(s=(C=e.config.face.ssrnet)!=null&&C.enabled?I4(h[Q].tensor||Ue([]),e.config,Q,h.length):null,a=(N=e.config.face.ssrnet)!=null&&N.enabled?N4(h[Q].tensor||Ue([]),e.config,Q,h.length):null):(e.state="run:ssrnet",n=ie(),s=(R=e.config.face.ssrnet)!=null&&R.enabled?await I4(h[Q].tensor||Ue([]),e.config,Q,h.length):null,a=(D=e.config.face.ssrnet)!=null&&D.enabled?await N4(h[Q].tensor||Ue([]),e.config,Q,h.length):null,e.performance.ssrnet=Math.trunc(ie()-n)),e.analyze("End SSRNet:"),e.analyze("Start MobileFaceNet:"),e.config.async?i=(E=e.config.face.mobilefacenet)!=null&&E.enabled?o4(h[Q].tensor||Ue([]),e.config,Q,h.length):null:(e.state="run:mobilefacenet",n=ie(),i=($=e.config.face.mobilefacenet)!=null&&$.enabled?await o4(h[Q].tensor||Ue([]),e.config,Q,h.length):null,e.performance.mobilefacenet=Math.trunc(ie()-n)),e.analyze("End MobileFaceNet:"),e.analyze("Start InsightFace:"),e.config.async?l=(S=e.config.face.insightface)!=null&&S.enabled?t4(h[Q].tensor||Ue([]),e.config,Q,h.length):null:(e.state="run:mobilefacenet",n=ie(),l=(F=e.config.face.insightface)!=null&&F.enabled?await t4(h[Q].tensor||Ue([]),e.config,Q,h.length):null,e.performance.mobilefacenet=Math.trunc(ie()-n)),e.analyze("End InsightFace:"),e.analyze("Start Description:"),e.config.async?p=Bb(h[Q].tensor||Ue([]),e.config,Q,h.length):(e.state="run:description",n=ie(),p=await Bb(h[Q].tensor||Ue([]),e.config,Q,h.length),e.performance.description=pe.perfadd?(e.performance.description||0)+Math.trunc(ie()-n):Math.trunc(ie()-n)),e.analyze("End Description:"),e.config.async&&([s,a,o,i,l,p,r,u,c]=await Promise.all([s,a,o,i,l,p,r,u,c])),e.analyze("Finish Face:"),((z=e.config.face.ssrnet)==null?void 0:z.enabled)&&s&&a&&(p={...p,age:s.age,gender:a.gender,genderScore:a.genderScore}),((V=e.config.face.gear)==null?void 0:V.enabled)&&r&&(p={...p,age:r.age,gender:r.gender,genderScore:r.genderScore,race:r.race}),((j=e.config.face.mobilefacenet)==null?void 0:j.enabled)&&i&&(p.descriptor=i),((G=e.config.face.insightface)==null?void 0:G.enabled)&&l&&(p.descriptor=l),(q=e.config.face.iris)!=null&&q.enabled;let Se=((ae=(ne=(K=h[Q])==null?void 0:K.annotations)==null?void 0:ne.leftEyeIris)==null?void 0:ae[0])&&((oe=(ue=(re=h[Q])==null?void 0:re.annotations)==null?void 0:ue.rightEyeIris)==null?void 0:oe[0])&&h[Q].annotations.leftEyeIris.length>0&&h[Q].annotations.rightEyeIris.length>0&&h[Q].annotations.leftEyeIris[0]!==null&&h[Q].annotations.rightEyeIris[0]!==null?Math.max(Math.abs(h[Q].annotations.leftEyeIris[3][0]-h[Q].annotations.leftEyeIris[1][0]),Math.abs(h[Q].annotations.rightEyeIris[4][1]-h[Q].annotations.rightEyeIris[2][1]))/t.shape[2]:0,Fe=(Ae=e.config.face.detector)!=null&&Ae.return?Ge(h[Q].tensor):null;Y(h[Q].tensor),h[Q].tensor&&delete h[Q].tensor;let $e={...h[Q],id:Q};p.age&&($e.age=p.age),p.gender&&($e.gender=p.gender),p.genderScore&&($e.genderScore=p.genderScore),p.descriptor&&($e.embedding=p.descriptor),p.race&&($e.race=p.race),o&&($e.emotion=o),u&&($e.real=u),c&&($e.live=c),Se&&Se!==0&&($e.iris=Math.trunc(500/Se/11.7)/100),Ie&&($e.rotation=Ie),Fe&&($e.tensor=Fe),d.push($e),e.analyze("End Face")}return e.analyze("End FaceMesh:"),e.config.async&&(e.performance.face&&delete e.performance.face,e.performance.age&&delete e.performance.age,e.performance.gender&&delete e.performance.gender,e.performance.emotion&&delete e.performance.emotion),d};var hR=e=>{if(!e)return[];let t=[];for(let n=0;nl.part==="leftWrist"),r=e[n].keypoints.find(l=>l.part==="rightWrist"),a=e[n].keypoints.find(l=>l.part==="nose");a&&s&&r&&s.position[1]l.part==="leftShoulder"),i=e[n].keypoints.find(l=>l.part==="rightShoulder");o&&i&&Math.abs(o.positionRaw[1]-i.positionRaw[1])>.1&&t.push({body:n,gesture:`leaning ${o.position[1]>i.position[1]?"left":"right"}`})}return t},fR=e=>{if(!e)return[];let t=[];for(let n=0;n450){let s=(e[n].mesh[33][2]||0)-(e[n].mesh[263][2]||0),r=e[n].mesh[33][0]-e[n].mesh[263][0];Math.abs(s/r)<=.15?t.push({face:n,gesture:"facing center"}):t.push({face:n,gesture:`facing ${s<0?"left":"right"}`}),Math.abs(e[n].mesh[374][1]-e[n].mesh[386][1])/Math.abs(e[n].mesh[443][1]-e[n].mesh[450][1])<.2&&t.push({face:n,gesture:"blink left eye"}),Math.abs(e[n].mesh[145][1]-e[n].mesh[159][1])/Math.abs(e[n].mesh[223][1]-e[n].mesh[230][1])<.2&&t.push({face:n,gesture:"blink right eye"});let i=Math.min(100,500*Math.abs(e[n].mesh[13][1]-e[n].mesh[14][1])/Math.abs(e[n].mesh[10][1]-e[n].mesh[152][1]));i>10&&t.push({face:n,gesture:`mouth ${Math.trunc(i)}% open`});let l=e[n].mesh[152][2]||0;Math.abs(l)>10&&t.push({face:n,gesture:`head ${l<0?"up":"down"}`})}return t},mR=e=>{var n,s,r,a;if(!e)return[];let t=[];for(let o=0;o.06||g>.06)&&(h=!1),m>g?m>.05&&t.push({iris:o,gesture:"looking right"}):g>.05&&t.push({iris:o,gesture:"looking left"});let y=Math.abs(e[o].mesh[145][1]-e[o].annotations.rightEyeIris[0][1])/e[o].box[3],x=Math.abs(e[o].mesh[374][1]-e[o].annotations.leftEyeIris[0][1])/e[o].box[3];(x<.01||y<.01||x>.022||y>.022)&&(h=!1),(x<.01||y<.01)&&t.push({iris:o,gesture:"looking down"}),(x>.022||y>.022)&&t.push({iris:o,gesture:"looking up"}),h&&t.push({iris:o,gesture:"looking center"})}return t},gR=e=>{if(!e)return[];let t=[];for(let n=0;n0){let r=s.reduce((o,i)=>(o.position[2]||0)<(i.position[2]||0)?o:i);t.push({hand:n,gesture:`${r.name} forward`});let a=s.reduce((o,i)=>o.position[1]((r-1)*Ne.body[S].box[K]+q)/r),z=e.body[S].boxRaw.map((q,K)=>((r-1)*Ne.body[S].boxRaw[K]+q)/r),V=e.body[S].keypoints.map((q,K)=>{var ne,ae,re,ue,oe,Ae,Q,Ie,Se;return{score:q.score,part:q.part,position:[Ne.body[S].keypoints[K]?((r-1)*(Ne.body[S].keypoints[K].position[0]||0)+(q.position[0]||0))/r:q.position[0],Ne.body[S].keypoints[K]?((r-1)*(Ne.body[S].keypoints[K].position[1]||0)+(q.position[1]||0))/r:q.position[1],Ne.body[S].keypoints[K]?((r-1)*(Ne.body[S].keypoints[K].position[2]||0)+(q.position[2]||0))/r:q.position[2]],positionRaw:[Ne.body[S].keypoints[K]?((r-1)*(Ne.body[S].keypoints[K].positionRaw[0]||0)+(q.positionRaw[0]||0))/r:q.positionRaw[0],Ne.body[S].keypoints[K]?((r-1)*(Ne.body[S].keypoints[K].positionRaw[1]||0)+(q.positionRaw[1]||0))/r:q.positionRaw[1],Ne.body[S].keypoints[K]?((r-1)*(Ne.body[S].keypoints[K].positionRaw[2]||0)+(q.positionRaw[2]||0))/r:q.positionRaw[2]],distance:[Ne.body[S].keypoints[K]?((r-1)*(((ne=Ne.body[S].keypoints[K].distance)==null?void 0:ne[0])||0)+(((ae=q.distance)==null?void 0:ae[0])||0))/r:(re=q.distance)==null?void 0:re[0],Ne.body[S].keypoints[K]?((r-1)*(((ue=Ne.body[S].keypoints[K].distance)==null?void 0:ue[1])||0)+(((oe=q.distance)==null?void 0:oe[1])||0))/r:(Ae=q.distance)==null?void 0:Ae[1],Ne.body[S].keypoints[K]?((r-1)*(((Q=Ne.body[S].keypoints[K].distance)==null?void 0:Q[2])||0)+(((Ie=q.distance)==null?void 0:Ie[2])||0))/r:(Se=q.distance)==null?void 0:Se[2]]}}),j={},G={connected:{}};(o=t.body.modelPath)!=null&&o.includes("efficientpose")?G=O2:(i=t.body.modelPath)!=null&&i.includes("blazepose")?G=_2:(l=t.body.modelPath)!=null&&l.includes("movenet")&&(G=Hh);for(let[q,K]of Object.entries(G.connected)){let ne=[];for(let ae=0;aeoe.part===K[ae]),ue=V.find(oe=>oe.part===K[ae+1]);re&&ue&&ne.push([re.position,ue.position])}j[q]=ne}Ne.body[S]={...e.body[S],box:F,boxRaw:z,keypoints:V,annotations:j}}if(!Ne.hand||e.hand.length!==Ne.hand.length)Ne.hand=JSON.parse(JSON.stringify(e.hand));else for(let S=0;S((r-1)*Ne.hand[S].box[q]+G)/r),z=e.hand[S].boxRaw.map((G,q)=>((r-1)*Ne.hand[S].boxRaw[q]+G)/r);Ne.hand[S].keypoints.length!==e.hand[S].keypoints.length&&(Ne.hand[S].keypoints=e.hand[S].keypoints);let V=e.hand[S].keypoints&&e.hand[S].keypoints.length>0?e.hand[S].keypoints.map((G,q)=>G.map((K,ne)=>((r-1)*(Ne.hand[S].keypoints[q][ne]||1)+(K||0))/r)):[],j={};if(Object.keys(Ne.hand[S].annotations).length!==Object.keys(e.hand[S].annotations).length)Ne.hand[S].annotations=e.hand[S].annotations,j=Ne.hand[S].annotations;else if(e.hand[S].annotations)for(let G of Object.keys(e.hand[S].annotations))j[G]=(p=(c=(u=e.hand[S])==null?void 0:u.annotations)==null?void 0:c[G])!=null&&p[0]?e.hand[S].annotations[G].map((q,K)=>q.map((ne,ae)=>((r-1)*Ne.hand[S].annotations[G][K][ae]+ne)/r)):null;Ne.hand[S]={...e.hand[S],box:F,boxRaw:z,keypoints:V,annotations:j}}if(!Ne.face||e.face.length!==Ne.face.length)Ne.face=JSON.parse(JSON.stringify(e.face));else for(let S=0;S((r-1)*Ne.face[S].box[j]+V)/r),z=e.face[S].boxRaw.map((V,j)=>((r-1)*Ne.face[S].boxRaw[j]+V)/r);if(e.face[S].rotation){let V={matrix:[0,0,0,0,0,0,0,0,0],angle:{roll:0,yaw:0,pitch:0},gaze:{bearing:0,strength:0}};V.matrix=(d=e.face[S].rotation)==null?void 0:d.matrix,V.angle={roll:((r-1)*(((f=(h=Ne.face[S].rotation)==null?void 0:h.angle)==null?void 0:f.roll)||0)+(((g=(m=e.face[S].rotation)==null?void 0:m.angle)==null?void 0:g.roll)||0))/r,yaw:((r-1)*(((x=(y=Ne.face[S].rotation)==null?void 0:y.angle)==null?void 0:x.yaw)||0)+(((b=(A=e.face[S].rotation)==null?void 0:A.angle)==null?void 0:b.yaw)||0))/r,pitch:((r-1)*(((k=(w=Ne.face[S].rotation)==null?void 0:w.angle)==null?void 0:k.pitch)||0)+(((N=(C=e.face[S].rotation)==null?void 0:C.angle)==null?void 0:N.pitch)||0))/r},V.gaze={bearing:((r-1)*(((R=Ne.face[S].rotation)==null?void 0:R.gaze.bearing)||0)+(((D=e.face[S].rotation)==null?void 0:D.gaze.bearing)||0))/r,strength:((r-1)*(((E=Ne.face[S].rotation)==null?void 0:E.gaze.strength)||0)+((($=e.face[S].rotation)==null?void 0:$.gaze.strength)||0))/r},Ne.face[S]={...e.face[S],rotation:V,box:F,boxRaw:z}}else Ne.face[S]={...e.face[S],box:F,boxRaw:z}}if(!Ne.object||e.object.length!==Ne.object.length)Ne.object=JSON.parse(JSON.stringify(e.object));else for(let S=0;S((r-1)*Ne.object[S].box[j]+V)/r),z=e.object[S].boxRaw.map((V,j)=>((r-1)*Ne.object[S].boxRaw[j]+V)/r);Ne.object[S]={...e.object[S],box:F,boxRaw:z}}if(e.persons){let S=e.persons;if(!Ne.persons||S.length!==Ne.persons.length)Ne.persons=JSON.parse(JSON.stringify(S));else for(let F=0;F((r-1)*Ne.persons[F].box[V]+z)/r)}e.gesture&&(Ne.gesture=e.gesture);let a=ie();return B4=pe.perfadd?B4+Math.round(a-n):Math.round(a-n),e.performance&&(Ne.performance={...e.performance,interpolate:B4}),Ne}var U4={};fa(U4,{distance:()=>Zh,match:()=>V4,similarity:()=>W4});function Zh(e,t,n={order:2,multiplier:25}){if(!e||!e)return Number.MAX_SAFE_INTEGER;let s=0;for(let r=0;r{if(e===0)return 1;let r=t===2?Math.sqrt(e):e**(1/t),a=(1-r/100-n)/(s-n);return Math.max(Math.min(a,1),0)};function W4(e,t,n={order:2,multiplier:25,min:.2,max:.8}){let s=Zh(e,t,n);return AR(s,n.order||2,n.min||0,n.max||1)}function V4(e,t,n={order:2,multiplier:25,threshold:0,min:.2,max:.8}){if(!Array.isArray(e)||!Array.isArray(t)||e.length<64||t.length===0)return{index:-1,distance:Number.POSITIVE_INFINITY,similarity:0};let s=Number.MAX_SAFE_INTEGER,r=-1;for(let o=0;ob.box[0]&&h.box[0]b.box[1]&&h.box[1]+h.box[3]f.body.box[0]&&b.box[0]+b.box[2]f.body.box[1]&&b.box[1]+b.box[3]f.body.box[0]&&b.box[1]+b.box[3]>f.body.box[1]&&b.box[1]+b.box[3]{b&&b.length===4&&(m.push(b[0],b[0]+b[2]),g.push(b[1],b[1]+b[3]))};y(f.face.box),y((c=f.body)==null?void 0:c.box),y((p=f.hands.left)==null?void 0:p.box),y((d=f.hands.right)==null?void 0:d.box);let x=Math.min(...m),A=Math.min(...g);f.box=[x,A,Math.max(...m)-x,Math.max(...g)-A],(r==null?void 0:r[1])&&(r==null?void 0:r[2])&&(f.boxRaw=[f.box[0]/r[2],f.box[1]/r[1],f.box[2]/r[2],f.box[3]/r[1]]),o.push(f)}return o}var i1=` /9j/4AAQSkZJRgABAQEAYABgAAD/4QBoRXhpZgAATU0AKgAAAAgABAEaAAUAAAABAAAAPgEbAAUA AAABAAAARgEoAAMAAAABAAIAAAExAAIAAAARAAAATgAAAAAAAABgAAAAAQAAAGAAAAABcGFpbnQu bmV0IDQuMi4xMwAA/9sAQwAGBAUGBQQGBgUGBwcGCAoQCgoJCQoUDg8MEBcUGBgXFBYWGh0lHxob @@ -7260,7 +7349,7 @@ PQ4GJ+ashuK0MhWaoWcA0AaOmASMK7jRNPWYBmHyiuepO2x10qfcv6vYxCzYqoGK4HVYVTJrmb5l c6oaM5TUJ8EgGsG4kLNUHT0M64OaqMMikSRsuKbnFMRLG3zVehOaGNE445NNlnVFpDMu6uie9Vo1 8z5mOAOST2pDK91cNN+5tsrH3PrW54a06KxT7fdrlh/q1Pc+tJ6IUdZGvHPLezMcnBOWbsPap5r3 ylFtbdT1xUWNWzU0/Zbwlgfmx8zGsHWtRHmMqE59aAMyNifvHPc1f0gtPdqkY5JosJHeNci2tktY -euPnNY+oXWZEVJNrZ9aun8SIq/CzodHuriIokhDIR1ronbKZr0o6o8ipoz//2Q==`,$1=` +euPnNY+oXWZEVJNrZ9aun8SIq/CzodHuriIokhDIR1ronbKZr0o6o8ipoz//2Q==`,l1=` /9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAsICAoIBwsKCQoNDAsNERwSEQ8PESIZGhQcKSQrKigk JyctMkA3LTA9MCcnOEw5PUNFSElIKzZPVU5GVEBHSEX/2wBDAQwNDREPESESEiFFLicuRUVFRUVF RUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUX/wAARCASwBLADASIA @@ -7828,4 +7917,4 @@ AAAAAAJAAAAAAAAAAAAAABAJEAAAAAAAAAAAAAAAIEoBKAAAAAAAAAAAAAAABAlAAAAAAAIAAAAA BAkBAkBAkBAlACEgMZjdjbFW8bWrEx8YWANb6Fp+bfwab+vLDKMFK9qxH5L0bAr8OPRPKz2AY7J2 SbAjYZAI2E7AIEgIEgIEgMdkSy2NgY7MdlmyNoBXsxmFuyNgVTVjNV3KjlBRNTlXTVHKCrlIqt5T lBhEMohlFerLlBjEMohMVTEARDKCITsAk2AEgAAAkAAAAAAAAAAAAAAAAAAAAAAAASAAAAAAAAD/ -2Q==`;async function jbe(e){let t=(r,a="application/octet-stream")=>fetch(`data:${a};base64,${r}`).then(o=>o.blob()),n,s;switch(e.config.warmup){case"face":n=await t(D1);break;case"body":case"full":n=await t($1);break;default:n=null}if(n){let r=await createImageBitmap(n);s=await e.detect(r,e.config),r.close()}return s}async function qbe(e){return new Promise(t=>{let n;switch(e.config.warmup){case"face":n="data:image/jpeg;base64,"+D1;break;case"full":case"body":n="data:image/jpeg;base64,"+$1;break;default:n=""}let s;if(typeof Image!="undefined")s=new Image;else if(me.Image)s=new me.Image;else return;s.onload=async()=>{let r=vr(s.naturalWidth,s.naturalHeight);if(!r)ne("Warmup: Canvas not found"),t(void 0);else{let a=r.getContext("2d");a&&a.drawImage(s,0,0);let o=await e.image(r),i=o.tensor?await e.detect(o.tensor,e.config):void 0;t(i)}},n?s.src=n:t(void 0)})}async function Xbe(e){let t=r=>Buffer.from(r,"base64"),n;e.config.warmup==="face"?n=t(D1):n=t($1);let s;if("node"in Qe&&dn()==="tensorflow"){let r=(void 0).decodeJpeg(n),a=Ft(r,0);e.tf.dispose(r),s=await e.detect(a,e.config),e.tf.dispose(a)}else e.config.debug&&ne("Warmup tfjs-node not loaded");return s}async function Kbe(e){let t;return typeof createImageBitmap=="function"?t=await jbe(e):typeof Image!="undefined"||me.Canvas!==void 0?t=await qbe(e):t=await Xbe(e),t}async function Zbe(e){var i,l,u,c;if(!H().flagRegistry.ENGINE_COMPILE_ONLY)return;let t=dn(),n=Us();if(t!=="webgl"&&t!=="humangl"||!(n!=null&&n.checkCompileCompletion))return;H().set("ENGINE_COMPILE_ONLY",!0);let s=Qt().state.numTensors,r=[];for(let[p,d]of Object.entries(e.models).filter(([h,f])=>h!==null&&f!==null)){let h=(l=(i=d.inputs)==null?void 0:i[0])!=null&&l.shape?[...d.inputs[0].shape]:[1,64,64,3],f=(c=(u=d.inputs)==null?void 0:u[0])!=null&&c.dtype?d.inputs[0].dtype:"float32";for(let g=0;gQ(y)):Q(g)}catch(g){e.config.debug&&ne("compile fail model:",p)}Q(m)}let a=await n.checkCompileCompletionAsync();n.getUniformLocations(),e.config.debug&&ne("compile pass:",{models:r,kernels:a.length}),H().set("ENGINE_COMPILE_ONLY",!1);let o=Qt().state.numTensors;o-s>0&&ne("tensor leak:",o-s)}async function OR(e,t){await df(e,!1);let n=ue();return e.state="warmup",t&&(e.config=Vt(e.config,t)),!e.config.warmup||e.config.warmup.length===0||e.config.warmup==="none"?{face:[],body:[],hand:[],gesture:[],object:[],performance:e.performance,timestamp:ue(),persons:[],error:null}:new Promise(async s=>{await Od.load(e),await Zbe(e);let r=await Kbe(e),a=ue();e.config.debug&&ne("warmup",e.config.warmup,Math.round(a-n),"ms"),e.emit("warmup"),s(r)})}var Ud,hf,ff,P1,Oi,lv=class{constructor(t){fe(this,"version");fe(this,"config");fe(this,"result");fe(this,"state");fe(this,"process");fe(this,"tf");fe(this,"env");fe(this,"draw");fe(this,"models");fe(this,"events");fe(this,"faceTriangulation");fe(this,"faceUVMap");fe(this,"performance");Ku(this,Ud,void 0);Ku(this,hf,void 0);Ku(this,ff,void 0);fe(this,"gl");fe(this,"analyze",(...t)=>{if(!Zr(this,hf))return;let n=this.tf.engine().state.numTensors,s=Zr(this,Ud);sp(this,Ud,n);let r=n-s;r!==0&&ne(...t,r)});Ku(this,P1,t=>{if(!Zr(this,ff))return null;if(!t)return"input is not defined";if(this.env.node&&!(t instanceof it))return"input must be a tensor";try{this.tf.getBackend()}catch(n){return"backend not loaded"}return null});fe(this,"similarity",av);fe(this,"distance",pf);fe(this,"match",ov);fe(this,"webcam",new K2);fe(this,"emit",t=>{var n;(n=this.events)!=null&&n.dispatchEvent&&this.events.dispatchEvent(new Event(t))});Ku(this,Oi,{});this.env=me;let n=(Jh.tfjs||lA).replace(/-(.*)/,"");Xa.wasmPath=`https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm@${n}/dist/`,Xa.modelBasePath=me.browser?"../models/":"file://models/",Xa.backend=me.browser?"webgl":"tensorflow",this.version=_b,Object.defineProperty(this,"version",{value:_b}),this.config=JSON.parse(JSON.stringify(Xa)),Object.seal(this.config),this.config.cacheModels=typeof indexedDB!="undefined",t&&(this.config=Vt(this.config,t)),YT(this.config),this.tf=Qe,this.state="idle",sp(this,Ud,0),sp(this,hf,!1),sp(this,ff,!1),this.performance={},this.events=typeof EventTarget!="undefined"?new EventTarget:void 0,this.models=new cf,this.draw={options:Jn,canvas:(r,a)=>Q4(r,a),face:(r,a,o)=>Md(r,a,o),body:(r,a,o)=>zd(r,a,o),hand:(r,a,o)=>Ld(r,a,o),gesture:(r,a,o)=>Wd(r,a,o),object:(r,a,o)=>Bd(r,a,o),person:(r,a,o)=>J4(r,a,o),all:(r,a,o)=>ev(r,a,o)},this.result={face:[],body:[],hand:[],gesture:[],object:[],performance:{},timestamp:0,persons:[],error:null},this.process={tensor:null,canvas:null},this.faceTriangulation=jN,this.faceUVMap=qN,this.gl=Dt,R1(this,null,""),this.emit("create"),(this.config.debug||this.env.browser)&&ne(`version: ${this.version}`),this.config.debug&&ne(`tfjs version: ${this.tf.version["tfjs-core"]}`);let s=JSON.parse(JSON.stringify(this.env));delete s.kernels,delete s.initial,delete s.perfadd,this.config.debug&&ne("environment:",s)}reset(){let t=this.config.backend;this.config=JSON.parse(JSON.stringify(Xa)),this.config.backend=t,Eb(),me.initial=!0}validate(t){let n=g3(Xa,t||this.config);return n.length===0&&(this.config=Vt(this.config,t)),n}check(){return _1(this)}now(){return ue()}image(t,n=!0){return q2(t,this.config,n)}async segmentation(t,n){var a,o,i;if(n&&(this.config=Vt(this.config,n)),!this.config.segmentation.enabled)return null;let s=await q2(t,this.config);if(!s.tensor)return null;let r=null;return(a=this.config.segmentation.modelPath)!=null&&a.includes("rvm")&&(r=await cR(s.tensor,this.config)),(o=this.config.segmentation.modelPath)!=null&&o.includes("meet")&&(r=await zE(s.tensor,this.config)),(i=this.config.segmentation.modelPath)!=null&&i.includes("selfie")&&(r=await pR(s.tensor,this.config)),Q(s.tensor),r}enhance(t){return s4(t)}compare(t,n){return ZT(this.config,t,n)}async init(){await df(this,!0),await this.tf.ready(),Eb()}async load(t){this.state="load";let n=ue(),s=Object.values(this.models).filter(o=>o).length;t&&(this.config=Vt(this.config,t)),this.env.initial&&(await df(this,!1)||ne("error: backend check failed"),await fh(),this.env.browser&&(this.config.debug&&ne("configuration:",this.config),this.config.debug&&ne("tf flags:",this.tf.ENV.flags))),await X4(this),this.env.initial&&this.config.debug&&ne("tf engine state:",this.tf.engine().state.numBytes,"bytes",this.tf.engine().state.numTensors,"tensors"),this.env.initial=!1,Object.values(this.models).filter(o=>o).length!==s&&(_1(this),this.emit("load"));let a=Math.trunc(ue()-n);a>(this.performance.loadModels||0)&&(this.performance.loadModels=this.env.perfadd?(this.performance.loadModels||0)+a:a)}next(t=this.result){return $R(t,this.config)}getModelStats(){return q4(this)}async warmup(t){let n=ue(),s=await OR(this,t),r=ue();return this.performance.warmup=Math.trunc(r-n),s}async profile(t,n){let s=await this.tf.profile(()=>this.detect(t,n)),r={},a=0;for(let i of s.kernels)r[i.name]?r[i.name]+=i.kernelTimeMs:r[i.name]=i.kernelTimeMs,a+=i.kernelTimeMs;let o=[];Object.entries(r).forEach(i=>o.push({kernel:i[0],time:i[1],perc:0}));for(let i of o)i.perc=Math.round(1e3*i.time/a)/1e3,i.time=Math.round(1e3*i.time)/1e3;return o.sort((i,l)=>l.time-i.time),o.length=20,o}async detect(t,n){return this.state="detect",new Promise(async s=>{var g,y,x,A,b,w,k,C,E,_,$,R,P,S,M,L,U,K,q,Z,J;this.state="config";let r;this.config=Vt(this.config,n),this.state="check";let a=Zr(this,P1).call(this,t);a&&(ne(a,t),this.emit("error"),s({face:[],body:[],hand:[],gesture:[],object:[],performance:this.performance,timestamp:ue(),persons:[],error:a}));let o=ue();await this.load(),r=ue(),this.state="image";let i=await q2(t,this.config);if(this.process=i,this.performance.inputProcess=this.env.perfadd?(this.performance.inputProcess||0)+Math.trunc(ue()-r):Math.trunc(ue()-r),this.analyze("Get Image:"),!i.tensor){this.config.debug&&ne("could not convert input to tensor"),this.emit("error"),s({face:[],body:[],hand:[],gesture:[],object:[],performance:this.performance,timestamp:ue(),persons:[],error:"could not convert input to tensor"});return}this.emit("image"),r=ue(),this.config.skipAllowed=await KT(this.config,i.tensor),this.performance.totalFrames||(this.performance.totalFrames=0),this.performance.cachedFrames||(this.performance.cachedFrames=0),this.performance.totalFrames++,this.config.skipAllowed&&this.performance.cachedFrames++,this.performance.cacheCheck=this.env.perfadd?(this.performance.cacheCheck||0)+Math.trunc(ue()-r):Math.trunc(ue()-r),this.analyze("Check Changed:");let l=[],u=[],c=[],p=[];this.state="detect:face",this.config.async?(l=this.config.face.enabled?sv(this,i.tensor):[],this.performance.face&&delete this.performance.face):(r=ue(),l=this.config.face.enabled?await sv(this,i.tensor):[],this.performance.face=this.env.perfadd?(this.performance.face||0)+Math.trunc(ue()-r):Math.trunc(ue()-r)),this.config.async&&(this.config.body.maxDetected===-1||this.config.hand.maxDetected===-1)&&(l=await l),this.analyze("Start Body:"),this.state="detect:body";let d=this.config.body.maxDetected===-1?Vt(this.config,{body:{maxDetected:this.config.face.enabled?1*l.length:1}}):this.config;this.config.async?((g=this.config.body.modelPath)!=null&&g.includes("posenet")?u=this.config.body.enabled?M4(i.tensor,d):[]:(y=this.config.body.modelPath)!=null&&y.includes("blazepose")?u=this.config.body.enabled?Ub(i.tensor,d):[]:(x=this.config.body.modelPath)!=null&&x.includes("efficientpose")?u=this.config.body.enabled?Zb(i.tensor,d):[]:(A=this.config.body.modelPath)!=null&&A.includes("movenet")&&(u=this.config.body.enabled?R4(i.tensor,d):[]),this.performance.body&&delete this.performance.body):(r=ue(),(b=this.config.body.modelPath)!=null&&b.includes("posenet")?u=this.config.body.enabled?await M4(i.tensor,d):[]:(w=this.config.body.modelPath)!=null&&w.includes("blazepose")?u=this.config.body.enabled?await Ub(i.tensor,d):[]:(k=this.config.body.modelPath)!=null&&k.includes("efficientpose")?u=this.config.body.enabled?await Zb(i.tensor,d):[]:(C=this.config.body.modelPath)!=null&&C.includes("movenet")&&(u=this.config.body.enabled?await R4(i.tensor,d):[]),this.performance.body=this.env.perfadd?(this.performance.body||0)+Math.trunc(ue()-r):Math.trunc(ue()-r)),this.analyze("End Body:"),this.analyze("Start Hand:"),this.state="detect:hand";let h=this.config.hand.maxDetected===-1?Vt(this.config,{hand:{maxDetected:this.config.face.enabled?2*l.length:1}}):this.config;this.config.async?((_=(E=this.config.hand.detector)==null?void 0:E.modelPath)!=null&&_.includes("handdetect")?c=this.config.hand.enabled?h4(i.tensor,h):[]:(R=($=this.config.hand.detector)==null?void 0:$.modelPath)!=null&&R.includes("handtrack")&&(c=this.config.hand.enabled?y4(i.tensor,h):[]),this.performance.hand&&delete this.performance.hand):(r=ue(),(S=(P=this.config.hand.detector)==null?void 0:P.modelPath)!=null&&S.includes("handdetect")?c=this.config.hand.enabled?await h4(i.tensor,h):[]:(L=(M=this.config.hand.detector)==null?void 0:M.modelPath)!=null&&L.includes("handtrack")&&(c=this.config.hand.enabled?await y4(i.tensor,h):[]),this.performance.hand=this.env.perfadd?(this.performance.hand||0)+Math.trunc(ue()-r):Math.trunc(ue()-r)),this.analyze("End Hand:"),this.analyze("Start Object:"),this.state="detect:object",this.config.async?((U=this.config.object.modelPath)!=null&&U.includes("nanodet")?p=this.config.object.enabled?D4(i.tensor,this.config):[]:(K=this.config.object.modelPath)!=null&&K.includes("centernet")&&(p=this.config.object.enabled?jb(i.tensor,this.config):[]),this.performance.object&&delete this.performance.object):(r=ue(),(q=this.config.object.modelPath)!=null&&q.includes("nanodet")?p=this.config.object.enabled?await D4(i.tensor,this.config):[]:(Z=this.config.object.modelPath)!=null&&Z.includes("centernet")&&(p=this.config.object.enabled?await jb(i.tensor,this.config):[]),this.performance.object=this.env.perfadd?(this.performance.object||0)+Math.trunc(ue()-r):Math.trunc(ue()-r)),this.analyze("End Object:"),this.state="detect:await",this.config.async&&([l,u,c,p]=await Promise.all([l,u,c,p])),this.state="detect:gesture";let f=[];this.config.gesture.enabled&&(r=ue(),f=[...RR(l),...ER(u),...DR(c),..._R(l)],this.config.async?this.performance.gesture&&delete this.performance.gesture:this.performance.gesture=this.env.perfadd?(this.performance.gesture||0)+Math.trunc(ue()-r):Math.trunc(ue()-r)),this.performance.total=this.env.perfadd?(this.performance.total||0)+Math.trunc(ue()-o):Math.trunc(ue()-o);let m=((J=this.process.tensor)==null?void 0:J.shape)||[];this.result={face:l,body:u,hand:c,gesture:f,object:p,performance:this.performance,canvas:this.process.canvas,timestamp:Date.now(),error:null,get persons(){return FR(l,u,c,f,m)}},Q(i.tensor),this.emit("detect"),this.state="idle",s(this.result)})}async sleep(t){return new Promise(n=>{setTimeout(n,t)})}async video(t,n=!0,s=0){n?(Zr(this,Oi)[t.id]||(this.config.debug&&ne("video start",t.id),Zr(this,Oi)[t.id]=!0),!t.paused&&Zr(this,Oi)[t.id]&&t.readyState>=2&&await this.detect(t),s>0&&await this.sleep(s),Zr(this,Oi)[t.id]&&requestAnimationFrame(()=>this.video(t,n,s))):(this.config.debug&&ne("video stop",t.id),Zr(this,Oi)[t.id]=!1)}};Ud=new WeakMap,hf=new WeakMap,ff=new WeakMap,P1=new WeakMap,Oi=new WeakMap;return F_(Jbe);})(); +2Q==`;async function Ebe(e){let t=(r,a="application/octet-stream")=>fetch(`data:${a};base64,${r}`).then(o=>o.blob()),n,s;switch(e.config.warmup){case"face":n=await t(i1);break;case"body":case"full":n=await t(l1);break;default:n=null}if(n){let r=await createImageBitmap(n);s=await e.detect(r,e.config),r.close()}return s}async function Rbe(e){return new Promise(t=>{let n;switch(e.config.warmup){case"face":n="data:image/jpeg;base64,"+i1;break;case"full":case"body":n="data:image/jpeg;base64,"+l1;break;default:n=""}let s;if(typeof Image!="undefined")s=new Image;else if(pe.Image)s=new pe.Image;else return;s.onload=async()=>{let r=vr(s.naturalWidth,s.naturalHeight);if(!r)ee("Warmup: Canvas not found"),t(void 0);else{let a=r.getContext("2d");a&&a.drawImage(s,0,0);let o=await e.image(r),i=o.tensor?await e.detect(o.tensor,e.config):void 0;t(i)}},n?s.src=n:t(void 0)})}async function _be(e){let t=r=>Buffer.from(r,"base64"),n;e.config.warmup==="face"?n=t(i1):n=t(l1);let s;if("node"in Ye&&cn()==="tensorflow"){let r=(void 0).decodeJpeg(n),a=Ft(r,0);e.tf.dispose(r),s=await e.detect(a,e.config),e.tf.dispose(a)}else e.config.debug&&ee("Warmup tfjs-node not loaded");return s}async function Dbe(e){let t;return typeof createImageBitmap=="function"?t=await Ebe(e):typeof Image!="undefined"||pe.Canvas!==void 0?t=await Rbe(e):t=await _be(e),t}async function $be(e){var i,l,u,c;if(!U().flagRegistry.ENGINE_COMPILE_ONLY)return;let t=cn(),n=Bs();if(t!=="webgl"&&t!=="humangl"||!(n!=null&&n.checkCompileCompletion))return;U().set("ENGINE_COMPILE_ONLY",!0);let s=Jt().state.numTensors,r=[];for(let[p,d]of Object.entries(e.models).filter(([h,f])=>h!==null&&f!==null)){let h=(l=(i=d.inputs)==null?void 0:i[0])!=null&&l.shape?[...d.inputs[0].shape]:[1,64,64,3],f=(c=(u=d.inputs)==null?void 0:u[0])!=null&&c.dtype?d.inputs[0].dtype:"float32";for(let g=0;gY(y)):Y(g)}catch(g){e.config.debug&&ee("compile fail model:",p)}Y(m)}let a=await n.checkCompileCompletionAsync();n.getUniformLocations(),e.config.debug&&ee("compile pass:",{models:r,kernels:a.length}),U().set("ENGINE_COMPILE_ONLY",!1);let o=Jt().state.numTensors;o-s>0&&ee("tensor leak:",o-s)}async function bR(e,t){await Kh(e,!1);let n=ie();return e.state="warmup",t&&(e.config=Bt(e.config,t)),!e.config.warmup||e.config.warmup.length===0||e.config.warmup==="none"?{face:[],body:[],hand:[],gesture:[],object:[],performance:e.performance,timestamp:ie(),persons:[],error:null}:new Promise(async s=>{await kd.load(e),await $be(e);let r=await Dbe(e),a=ie();e.config.debug&&ee("warmup",e.config.warmup,Math.round(a-n),"ms"),e.emit("warmup"),s(r)})}var Rd,Yh,Jh,u1,_i,G4=class{constructor(t){de(this,"version");de(this,"config");de(this,"result");de(this,"state");de(this,"process");de(this,"tf");de(this,"env");de(this,"draw");de(this,"models");de(this,"events");de(this,"faceTriangulation");de(this,"faceUVMap");de(this,"performance");Mu(this,Rd,void 0);Mu(this,Yh,void 0);Mu(this,Jh,void 0);de(this,"gl");de(this,"analyze",(...t)=>{if(!jr(this,Yh))return;let n=this.tf.engine().state.numTensors,s=jr(this,Rd);Bd(this,Rd,n);let r=n-s;r!==0&&ee(...t,r)});Mu(this,u1,t=>{if(!jr(this,Jh))return null;if(!t)return"input is not defined";if(this.env.node&&!(t instanceof st))return"input must be a tensor";try{this.tf.getBackend()}catch(n){return"backend not loaded"}return null});de(this,"similarity",W4);de(this,"distance",Zh);de(this,"match",V4);de(this,"webcam",new S2);de(this,"emit",t=>{var n;(n=this.events)!=null&&n.dispatchEvent&&this.events.dispatchEvent(new Event(t))});Mu(this,_i,{});this.env=pe;let n=(Mh.tfjs||Wy).replace(/-(.*)/,"");Ha.wasmPath=`https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm@${n}/dist/`,Ha.modelBasePath=pe.browser?"../models/":"file://models/",Ha.backend=pe.browser?"webgl":"tensorflow",this.version=hb,Object.defineProperty(this,"version",{value:hb}),this.config=JSON.parse(JSON.stringify(Ha)),Object.seal(this.config),this.config.cacheModels=typeof indexedDB!="undefined",t&&(this.config=Bt(this.config,t)),FT(this.config),this.tf=Ye,this.state="idle",Bd(this,Rd,0),Bd(this,Yh,!1),Bd(this,Jh,!1),this.performance={},this.events=typeof EventTarget!="undefined"?new EventTarget:void 0,this.models=new Xh,this.draw={options:Qn,canvas:(r,a)=>F4(r,a),face:(r,a,o)=>Sd(r,a,o),body:(r,a,o)=>Id(r,a,o),hand:(r,a,o)=>Cd(r,a,o),gesture:(r,a,o)=>Nd(r,a,o),object:(r,a,o)=>Td(r,a,o),person:(r,a,o)=>P4(r,a,o),all:(r,a,o)=>O4(r,a,o)},this.result={face:[],body:[],hand:[],gesture:[],object:[],performance:{},timestamp:0,persons:[],error:null},this.process={tensor:null,canvas:null},this.faceTriangulation=RN,this.faceUVMap=_N,this.gl=Et,a1(this,null,""),this.emit("create"),(this.config.debug||this.env.browser)&&ee(`version: ${this.version}`),this.config.debug&&ee(`tfjs version: ${this.tf.version["tfjs-core"]}`);let s=JSON.parse(JSON.stringify(this.env));delete s.kernels,delete s.initial,delete s.perfadd,this.config.debug&&ee("environment:",s)}reset(){let t=this.config.backend;this.config=JSON.parse(JSON.stringify(Ha)),this.config.backend=t,db(),pe.initial=!0}validate(t){let n=Kg(Ha,t||this.config);return n.length===0&&(this.config=Bt(this.config,t)),n}check(){return o1(this)}now(){return ie()}image(t,n=!0){return w2(t,this.config,n)}async segmentation(t,n){var a,o,i;if(n&&(this.config=Bt(this.config,n)),!this.config.segmentation.enabled)return null;let s=await w2(t,this.config);if(!s.tensor)return null;let r=null;return(a=this.config.segmentation.modelPath)!=null&&a.includes("rvm")&&(r=await XE(s.tensor,this.config)),(o=this.config.segmentation.modelPath)!=null&&o.includes("meet")&&(r=await wE(s.tensor,this.config)),(i=this.config.segmentation.modelPath)!=null&&i.includes("selfie")&&(r=await ZE(s.tensor,this.config)),Y(s.tensor),r}enhance(t){return Lb(t)}compare(t,n){return PT(this.config,t,n)}async init(){await Kh(this,!0),await this.tf.ready(),db()}async load(t){this.state="load";let n=ie(),s=Object.values(this.models).filter(o=>o).length;t&&(this.config=Bt(this.config,t)),this.env.initial&&(await Kh(this,!1)||ee("error: backend check failed"),await Yp(),this.env.browser&&(this.config.debug&&ee("configuration:",this.config),this.config.debug&&ee("tf flags:",this.tf.ENV.flags))),await R4(this),this.env.initial&&this.config.debug&&ee("tf engine state:",this.tf.engine().state.numBytes,"bytes",this.tf.engine().state.numTensors,"tensors"),this.env.initial=!1,Object.values(this.models).filter(o=>o).length!==s&&(o1(this),this.emit("load"));let a=Math.trunc(ie()-n);a>(this.performance.loadModels||0)&&(this.performance.loadModels=this.env.perfadd?(this.performance.loadModels||0)+a:a)}next(t=this.result){return yR(t,this.config)}getModelStats(){return E4(this)}async warmup(t){let n=ie(),s=await bR(this,t),r=ie();return this.performance.warmup=Math.trunc(r-n),s}async profile(t,n){let s=await this.tf.profile(()=>this.detect(t,n)),r={},a=0;for(let i of s.kernels)r[i.name]?r[i.name]+=i.kernelTimeMs:r[i.name]=i.kernelTimeMs,a+=i.kernelTimeMs;let o=[];Object.entries(r).forEach(i=>o.push({kernel:i[0],time:i[1],perc:0}));for(let i of o)i.perc=Math.round(1e3*i.time/a)/1e3,i.time=Math.round(1e3*i.time)/1e3;return o.sort((i,l)=>l.time-i.time),o.length=20,o}async detect(t,n){return this.state="detect",new Promise(async s=>{var g,y,x,A,b,w,k,C,N,R,D,E,$,S,F,z,V,j,G,q,K;this.state="config";let r;this.config=Bt(this.config,n),this.state="check";let a=jr(this,u1).call(this,t);a&&(ee(a,t),this.emit("error"),s({face:[],body:[],hand:[],gesture:[],object:[],performance:this.performance,timestamp:ie(),persons:[],error:a}));let o=ie();await this.load(),r=ie(),this.state="image";let i=await w2(t,this.config);if(this.process=i,this.performance.inputProcess=this.env.perfadd?(this.performance.inputProcess||0)+Math.trunc(ie()-r):Math.trunc(ie()-r),this.analyze("Get Image:"),!i.tensor){this.config.debug&&ee("could not convert input to tensor"),this.emit("error"),s({face:[],body:[],hand:[],gesture:[],object:[],performance:this.performance,timestamp:ie(),persons:[],error:"could not convert input to tensor"});return}this.emit("image"),r=ie(),this.config.skipAllowed=await $T(this.config,i.tensor),this.performance.totalFrames||(this.performance.totalFrames=0),this.performance.cachedFrames||(this.performance.cachedFrames=0),this.performance.totalFrames++,this.config.skipAllowed&&this.performance.cachedFrames++,this.performance.cacheCheck=this.env.perfadd?(this.performance.cacheCheck||0)+Math.trunc(ie()-r):Math.trunc(ie()-r),this.analyze("Check Changed:");let l=[],u=[],c=[],p=[];this.state="detect:face",this.config.async?(l=this.config.face.enabled?L4(this,i.tensor):[],this.performance.face&&delete this.performance.face):(r=ie(),l=this.config.face.enabled?await L4(this,i.tensor):[],this.performance.face=this.env.perfadd?(this.performance.face||0)+Math.trunc(ie()-r):Math.trunc(ie()-r)),this.config.async&&(this.config.body.maxDetected===-1||this.config.hand.maxDetected===-1)&&(l=await l),this.analyze("Start Body:"),this.state="detect:body";let d=this.config.body.maxDetected===-1?Bt(this.config,{body:{maxDetected:this.config.face.enabled?1*l.length:1}}):this.config;this.config.async?((g=this.config.body.modelPath)!=null&&g.includes("posenet")?u=this.config.body.enabled?x4(i.tensor,d):[]:(y=this.config.body.modelPath)!=null&&y.includes("blazepose")?u=this.config.body.enabled?Ib(i.tensor,d):[]:(x=this.config.body.modelPath)!=null&&x.includes("efficientpose")?u=this.config.body.enabled?Db(i.tensor,d):[]:(A=this.config.body.modelPath)!=null&&A.includes("movenet")&&(u=this.config.body.enabled?p4(i.tensor,d):[]),this.performance.body&&delete this.performance.body):(r=ie(),(b=this.config.body.modelPath)!=null&&b.includes("posenet")?u=this.config.body.enabled?await x4(i.tensor,d):[]:(w=this.config.body.modelPath)!=null&&w.includes("blazepose")?u=this.config.body.enabled?await Ib(i.tensor,d):[]:(k=this.config.body.modelPath)!=null&&k.includes("efficientpose")?u=this.config.body.enabled?await Db(i.tensor,d):[]:(C=this.config.body.modelPath)!=null&&C.includes("movenet")&&(u=this.config.body.enabled?await p4(i.tensor,d):[]),this.performance.body=this.env.perfadd?(this.performance.body||0)+Math.trunc(ie()-r):Math.trunc(ie()-r)),this.analyze("End Body:"),this.analyze("Start Hand:"),this.state="detect:hand";let h=this.config.hand.maxDetected===-1?Bt(this.config,{hand:{maxDetected:this.config.face.enabled?2*l.length:1}}):this.config;this.config.async?((R=(N=this.config.hand.detector)==null?void 0:N.modelPath)!=null&&R.includes("handdetect")?c=this.config.hand.enabled?Kb(i.tensor,h):[]:(E=(D=this.config.hand.detector)==null?void 0:D.modelPath)!=null&&E.includes("handtrack")&&(c=this.config.hand.enabled?Qb(i.tensor,h):[]),this.performance.hand&&delete this.performance.hand):(r=ie(),(S=($=this.config.hand.detector)==null?void 0:$.modelPath)!=null&&S.includes("handdetect")?c=this.config.hand.enabled?await Kb(i.tensor,h):[]:(z=(F=this.config.hand.detector)==null?void 0:F.modelPath)!=null&&z.includes("handtrack")&&(c=this.config.hand.enabled?await Qb(i.tensor,h):[]),this.performance.hand=this.env.perfadd?(this.performance.hand||0)+Math.trunc(ie()-r):Math.trunc(ie()-r)),this.analyze("End Hand:"),this.analyze("Start Object:"),this.state="detect:object",this.config.async?((V=this.config.object.modelPath)!=null&&V.includes("nanodet")?p=this.config.object.enabled?f4(i.tensor,this.config):[]:(j=this.config.object.modelPath)!=null&&j.includes("centernet")&&(p=this.config.object.enabled?Nb(i.tensor,this.config):[]),this.performance.object&&delete this.performance.object):(r=ie(),(G=this.config.object.modelPath)!=null&&G.includes("nanodet")?p=this.config.object.enabled?await f4(i.tensor,this.config):[]:(q=this.config.object.modelPath)!=null&&q.includes("centernet")&&(p=this.config.object.enabled?await Nb(i.tensor,this.config):[]),this.performance.object=this.env.perfadd?(this.performance.object||0)+Math.trunc(ie()-r):Math.trunc(ie()-r)),this.analyze("End Object:"),this.state="detect:await",this.config.async&&([l,u,c,p]=await Promise.all([l,u,c,p])),this.state="detect:gesture";let f=[];this.config.gesture.enabled&&(r=ie(),f=[...fR(l),...hR(u),...gR(c),...mR(l)],this.config.async?this.performance.gesture&&delete this.performance.gesture:this.performance.gesture=this.env.perfadd?(this.performance.gesture||0)+Math.trunc(ie()-r):Math.trunc(ie()-r)),this.performance.total=this.env.perfadd?(this.performance.total||0)+Math.trunc(ie()-o):Math.trunc(ie()-o);let m=((K=this.process.tensor)==null?void 0:K.shape)||[];this.result={face:l,body:u,hand:c,gesture:f,object:p,performance:this.performance,canvas:this.process.canvas,timestamp:Date.now(),error:null,get persons(){return xR(l,u,c,f,m)}},Y(i.tensor),this.emit("detect"),this.state="idle",s(this.result)})}async sleep(t){return new Promise(n=>{setTimeout(n,t)})}async video(t,n=!0,s=0){n?(jr(this,_i)[t.id]||(this.config.debug&&ee("video start",t.id),jr(this,_i)[t.id]=!0),!t.paused&&jr(this,_i)[t.id]&&t.readyState>=2&&await this.detect(t),s>0&&await this.sleep(s),jr(this,_i)[t.id]&&requestAnimationFrame(()=>this.video(t,n,s))):(this.config.debug&&ee("video stop",t.id),jr(this,_i)[t.id]=!1)}};Rd=new WeakMap,Yh=new WeakMap,Jh=new WeakMap,u1=new WeakMap,_i=new WeakMap;return a_(Fbe);})(); diff --git a/dist/human.node-gpu.js b/dist/human.node-gpu.js index a44cc7722..77b4abb55 100644 --- a/dist/human.node-gpu.js +++ b/dist/human.node-gpu.js @@ -4,291 +4,7 @@ author: ' */ -"use strict"; -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; -var __commonJS = (cb, mod3) => function __require() { - return mod3 || (0, cb[__getOwnPropNames(cb)[0]])((mod3 = { exports: {} }).exports, mod3), mod3.exports; -}; -var __export = (target, all2) => { - for (var name in all2) - __defProp(target, name, { get: all2[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod3, isNodeMode, target) => (target = mod3 != null ? __create(__getProtoOf(mod3)) : {}, __copyProps( - isNodeMode || !mod3 || !mod3.__esModule ? __defProp(target, "default", { value: mod3, enumerable: true }) : target, - mod3 -)); -var __toCommonJS = (mod3) => __copyProps(__defProp({}, "__esModule", { value: true }), mod3); -var __publicField = (obj, key, value) => { - __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); - return value; -}; -var __accessCheck = (obj, member, msg) => { - if (!member.has(obj)) - throw TypeError("Cannot " + msg); -}; -var __privateGet = (obj, member, getter) => { - __accessCheck(obj, member, "read from private field"); - return getter ? getter.call(obj) : member.get(obj); -}; -var __privateAdd = (obj, member, value) => { - if (member.has(obj)) - throw TypeError("Cannot add the same private member more than once"); - member instanceof WeakSet ? member.add(obj) : member.set(obj, value); -}; -var __privateSet = (obj, member, value, setter) => { - __accessCheck(obj, member, "write to private field"); - setter ? setter.call(obj, value) : member.set(obj, value); - return value; -}; - -// dist/tfjs.esm.js -var require_tfjs_esm = __commonJS({ - "dist/tfjs.esm.js"(exports, module2) { - "use strict"; - var __defProp2 = Object.defineProperty; - var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; - var __getOwnPropNames2 = Object.getOwnPropertyNames; - var __hasOwnProp2 = Object.prototype.hasOwnProperty; - var __copyProps2 = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames2(from)) - if (!__hasOwnProp2.call(to, key) && key !== except) - __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); - } - return to; - }; - var __reExport = (target, mod3, secondTarget) => (__copyProps2(target, mod3, "default"), secondTarget && __copyProps2(secondTarget, mod3, "default")); - var __toCommonJS2 = (mod3) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod3); - var tf_node_gpu_exports = {}; - module2.exports = __toCommonJS2(tf_node_gpu_exports); - __reExport(tf_node_gpu_exports, require("@tensorflow/tfjs-node-gpu"), module2.exports); - } -}); - -// src/human.ts -var human_exports = {}; -__export(human_exports, { - Env: () => Env, - Human: () => Human2, - default: () => Human2, - defaults: () => config, - draw: () => draw_exports, - env: () => env, - match: () => match_exports, - models: () => models_exports2 -}); -module.exports = __toCommonJS(human_exports); - -// src/util/util.ts -function log(...msg) { - const dt = new Date(); - const ts = `${dt.getHours().toString().padStart(2, "0")}:${dt.getMinutes().toString().padStart(2, "0")}:${dt.getSeconds().toString().padStart(2, "0")}.${dt.getMilliseconds().toString().padStart(3, "0")}`; - if (msg) - console.log(ts, "Human:", ...msg); -} -function join(folder, file) { - const separator = folder.endsWith("/") ? "" : "/"; - const skipJoin = file.startsWith(".") || file.startsWith("/") || file.startsWith("http:") || file.startsWith("https:") || file.startsWith("file:"); - const path = skipJoin ? `${file}` : `${folder}${separator}${file}`; - if (!path.toLocaleLowerCase().includes(".json")) - throw new Error(`modelpath error: expecting json file: ${path}`); - return path; -} -var now = () => { - if (typeof performance !== "undefined") - return performance.now(); - return parseInt((Number(process.hrtime.bigint()) / 1e3 / 1e3).toString()); -}; -function validate(defaults, config3, parent = "config", msgs = []) { - for (const key of Object.keys(config3)) { - if (typeof config3[key] === "object") { - validate(defaults[key], config3[key], key, msgs); - } else { - const defined = defaults && typeof defaults[key] !== "undefined"; - if (!defined) - msgs.push({ reason: "unknown property", where: `${parent}.${key} = ${config3[key]}` }); - const same = defaults && typeof defaults[key] === typeof config3[key]; - if (defined && !same) - msgs.push({ reason: "property type mismatch", where: `${parent}.${key} = ${config3[key]}`, expected: typeof defaults[key] }); - } - } - if (config3.debug && parent === "config" && msgs.length > 0) - log("invalid configuration", msgs); - return msgs; -} -function mergeDeep(...objects) { - const isObject = (obj) => obj && typeof obj === "object"; - return objects.reduce((prev, obj) => { - Object.keys(obj || {}).forEach((key) => { - const pVal = prev[key]; - const oVal = obj[key]; - if (Array.isArray(pVal) && Array.isArray(oVal)) - prev[key] = pVal.concat(...oVal); - else if (isObject(pVal) && isObject(oVal)) - prev[key] = mergeDeep(pVal, oVal); - else - prev[key] = oVal; - }); - return prev; - }, {}); -} - -// src/config.ts -var config = { - backend: "", - modelBasePath: "", - cacheModels: true, - validateModels: true, - wasmPath: "", - wasmPlatformFetch: false, - debug: false, - async: true, - warmup: "full", - cacheSensitivity: 0.7, - skipAllowed: false, - deallocate: false, - flags: {}, - softwareKernels: false, - filter: { - enabled: true, - equalization: false, - width: 0, - height: 0, - flip: false, - return: true, - brightness: 0, - contrast: 0, - sharpness: 0, - blur: 0, - saturation: 0, - hue: 0, - negative: false, - sepia: false, - vintage: false, - kodachrome: false, - technicolor: false, - polaroid: false, - pixelate: 0 - }, - gesture: { - enabled: true - }, - face: { - enabled: true, - detector: { - modelPath: "blazeface.json", - rotation: true, - maxDetected: 1, - skipFrames: 99, - skipTime: 2500, - minConfidence: 0.2, - iouThreshold: 0.1, - mask: false, - return: false - }, - mesh: { - enabled: true, - modelPath: "facemesh.json", - keepInvalid: false - }, - attention: { - enabled: false, - modelPath: "facemesh-attention.json" - }, - iris: { - enabled: true, - modelPath: "iris.json" - }, - emotion: { - enabled: true, - minConfidence: 0.1, - skipFrames: 99, - skipTime: 1500, - modelPath: "emotion.json" - }, - description: { - enabled: true, - modelPath: "faceres.json", - skipFrames: 99, - skipTime: 3e3, - minConfidence: 0.1 - }, - antispoof: { - enabled: false, - skipFrames: 99, - skipTime: 4e3, - modelPath: "antispoof.json" - }, - liveness: { - enabled: false, - skipFrames: 99, - skipTime: 4e3, - modelPath: "liveness.json" - } - }, - body: { - enabled: true, - modelPath: "movenet-lightning.json", - maxDetected: -1, - minConfidence: 0.3, - skipFrames: 1, - skipTime: 200 - }, - hand: { - enabled: true, - rotation: true, - skipFrames: 99, - skipTime: 1e3, - minConfidence: 0.5, - iouThreshold: 0.2, - maxDetected: -1, - landmarks: true, - detector: { - modelPath: "handtrack.json" - }, - skeleton: { - modelPath: "handlandmark-full.json" - } - }, - object: { - enabled: false, - modelPath: "mb3-centernet.json", - minConfidence: 0.2, - iouThreshold: 0.4, - maxDetected: 10, - skipFrames: 99, - skipTime: 2e3 - }, - segmentation: { - enabled: false, - modelPath: "rvm.json", - ratio: 0.5, - mode: "default" - } -}; - -// src/util/env.ts -var tf3 = __toESM(require_tfjs_esm()); - -// src/image/image.ts -var tf2 = __toESM(require_tfjs_esm()); - -// src/image/imagefxshaders.ts -var vertexIdentity = ` +"use strict";var Co=Object.create;var S2=Object.defineProperty;var Lo=Object.getOwnPropertyDescriptor;var Wo=Object.getOwnPropertyNames;var Fo=Object.getPrototypeOf,Go=Object.prototype.hasOwnProperty;var Bo=(e,t,n)=>t in e?S2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ho=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),we=(e,t)=>{for(var n in t)S2(e,n,{get:t[n],enumerable:!0})},S1=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Wo(t))!Go.call(e,r)&&r!==n&&S2(e,r,{get:()=>t[r],enumerable:!(o=Lo(t,r))||o.enumerable});return e};var D=(e,t,n)=>(n=e!=null?Co(Fo(e)):{},S1(t||!e||!e.__esModule?S2(n,"default",{value:e,enumerable:!0}):n,e)),Vo=e=>S1(S2({},"__esModule",{value:!0}),e);var R=(e,t,n)=>(Bo(e,typeof t!="symbol"?t+"":t,n),n),j1=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var ye=(e,t,n)=>(j1(e,t,"read from private field"),n?n.call(e):t.get(e)),A2=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},j2=(e,t,n,o)=>(j1(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n);var V=Ho((Aa,Xt)=>{"use strict";var O1=Object.defineProperty,Do=Object.getOwnPropertyDescriptor,Zo=Object.getOwnPropertyNames,Xo=Object.prototype.hasOwnProperty,Zt=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Zo(t))!Xo.call(e,r)&&r!==n&&O1(e,r,{get:()=>t[r],enumerable:!(o=Do(t,r))||o.enumerable});return e},qo=(e,t,n)=>(Zt(e,t,"default"),n&&Zt(n,t,"default")),Uo=e=>Zt(O1({},"__esModule",{value:!0}),e),I1={};Xt.exports=Uo(I1);qo(I1,require("@tensorflow/tfjs-node-gpu"),Xt.exports)});var na={};we(na,{Env:()=>N2,Human:()=>w1,default:()=>w1,defaults:()=>Ee,draw:()=>g1,env:()=>k,match:()=>k1,models:()=>g2});module.exports=Vo(na);function h(...e){let t=new Date,n=`${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}:${t.getSeconds().toString().padStart(2,"0")}.${t.getMilliseconds().toString().padStart(3,"0")}`;e&&console.log(n,"Human:",...e)}function N1(e,t){let n=e.endsWith("/")?"":"/",r=t.startsWith(".")||t.startsWith("/")||t.startsWith("http:")||t.startsWith("https:")||t.startsWith("file:")?`${t}`:`${e}${n}${t}`;if(!r.toLocaleLowerCase().includes(".json"))throw new Error(`modelpath error: expecting json file: ${r}`);return r}var M=()=>typeof performance!="undefined"?performance.now():parseInt((Number(process.hrtime.bigint())/1e3/1e3).toString());function Dt(e,t,n="config",o=[]){for(let r of Object.keys(t))if(typeof t[r]=="object")Dt(e[r],t[r],r,o);else{let s=e&&typeof e[r]!="undefined";s||o.push({reason:"unknown property",where:`${n}.${r} = ${t[r]}`});let A=e&&typeof e[r]==typeof t[r];s&&!A&&o.push({reason:"property type mismatch",where:`${n}.${r} = ${t[r]}`,expected:typeof e[r]})}return t.debug&&n==="config"&&o.length>0&&h("invalid configuration",o),o}function s0(...e){let t=n=>n&&typeof n=="object";return e.reduce((n,o)=>(Object.keys(o||{}).forEach(r=>{let s=n[r],A=o[r];Array.isArray(s)&&Array.isArray(A)?n[r]=s.concat(...A):t(s)&&t(A)?n[r]=s0(s,A):n[r]=A}),n),{})}var Ee={backend:"",modelBasePath:"",cacheModels:!0,validateModels:!0,wasmPath:"",wasmPlatformFetch:!1,debug:!1,async:!0,warmup:"full",cacheSensitivity:.7,skipAllowed:!1,deallocate:!1,flags:{},softwareKernels:!1,filter:{enabled:!0,equalization:!1,width:0,height:0,flip:!1,return:!0,brightness:0,contrast:0,sharpness:0,blur:0,saturation:0,hue:0,negative:!1,sepia:!1,vintage:!1,kodachrome:!1,technicolor:!1,polaroid:!1,pixelate:0},gesture:{enabled:!0},face:{enabled:!0,detector:{modelPath:"blazeface.json",rotation:!0,maxDetected:1,skipFrames:99,skipTime:2500,minConfidence:.2,iouThreshold:.1,mask:!1,return:!1},mesh:{enabled:!0,modelPath:"facemesh.json",keepInvalid:!1},attention:{enabled:!1,modelPath:"facemesh-attention.json"},iris:{enabled:!0,modelPath:"iris.json"},emotion:{enabled:!0,minConfidence:.1,skipFrames:99,skipTime:1500,modelPath:"emotion.json"},description:{enabled:!0,modelPath:"faceres.json",skipFrames:99,skipTime:3e3,minConfidence:.1},antispoof:{enabled:!1,skipFrames:99,skipTime:4e3,modelPath:"antispoof.json"},liveness:{enabled:!1,skipFrames:99,skipTime:4e3,modelPath:"liveness.json"}},body:{enabled:!0,modelPath:"movenet-lightning.json",maxDetected:-1,minConfidence:.3,skipFrames:1,skipTime:200},hand:{enabled:!0,rotation:!0,skipFrames:99,skipTime:1e3,minConfidence:.5,iouThreshold:.2,maxDetected:-1,landmarks:!0,detector:{modelPath:"handtrack.json"},skeleton:{modelPath:"handlandmark-full.json"}},object:{enabled:!1,modelPath:"mb3-centernet.json",minConfidence:.2,iouThreshold:.4,maxDetected:10,skipFrames:99,skipTime:2e3},segmentation:{enabled:!1,modelPath:"rvm.json",ratio:.5,mode:"default"}};var y0=D(V());var I=D(V());var C1=` precision highp float; attribute vec2 pos; attribute vec2 uv; @@ -298,8 +14,7 @@ var vertexIdentity = ` vUv = uv; gl_Position = vec4(pos.x, pos.y*flipY, 0.0, 1.); } -`; -var colorMatrixWithAlpha = ` +`;var L1=` precision highp float; varying vec2 vUv; uniform sampler2D texture; @@ -311,8 +26,7 @@ var colorMatrixWithAlpha = ` gl_FragColor.b = m[10] * c.r + m[11] * c.g + m[12] * c.b + m[13] * c.a + m[14]; gl_FragColor.a = m[15] * c.r + m[16] * c.g + m[17] * c.b + m[18] * c.a + m[19]; } -`; -var colorMatrixWithoutAlpha = ` +`,W1=` precision highp float; varying vec2 vUv; uniform sampler2D texture; @@ -324,8 +38,7 @@ var colorMatrixWithoutAlpha = ` gl_FragColor.b = m[10] * c.r + m[11] * c.g + m[12] * c.b + m[14]; gl_FragColor.a = c.a; } -`; -var pixelate = ` +`,F1=` precision highp float; varying vec2 vUv; uniform vec2 size; @@ -338,8 +51,7 @@ var pixelate = ` vec2 coord = pixelate(vUv, size); gl_FragColor += texture2D(texture, coord); } -`; -var blur = ` +`,G1=` precision highp float; varying vec2 vUv; uniform sampler2D texture; @@ -362,8 +74,7 @@ var blur = ` gl_FragColor += texture2D(texture, vUv + vec2( 6.0*px.x, 6.0*px.y))*0.00895781211794; gl_FragColor += texture2D(texture, vUv + vec2( 7.0*px.x, 7.0*px.y))*0.0044299121055113265; } -`; -var convolution = ` +`,B1=` precision highp float; varying vec2 vUv; uniform sampler2D texture; @@ -385,13456 +96,19 @@ var convolution = ` c31 * m[6] + c32 * m[7] + c33 * m[8]; gl_FragColor.a = c22.a; } -`; - -// src/image/imagefx.ts -var collect = (source, prefix, collection) => { - const r = new RegExp("\\b" + prefix + " \\w+ (\\w+)", "ig"); - source.replace(r, (match3, name) => { - collection[name] = 0; - return match3; - }); -}; -var GLProgram = class { - constructor(gl, vertexSource, fragmentSource) { - __publicField(this, "uniform", {}); - __publicField(this, "attribute", {}); - __publicField(this, "gl"); - __publicField(this, "id"); - __publicField(this, "compile", (source, type) => { - const shader = this.gl.createShader(type); - if (!shader) { - log("filter: could not create shader"); - return null; - } - this.gl.shaderSource(shader, source); - this.gl.compileShader(shader); - if (!this.gl.getShaderParameter(shader, this.gl.COMPILE_STATUS)) { - log(`filter: gl compile failed: ${this.gl.getShaderInfoLog(shader) || "unknown"}`); - return null; - } - return shader; - }); - this.gl = gl; - const vertexShader = this.compile(vertexSource, this.gl.VERTEX_SHADER); - const fragmentShader = this.compile(fragmentSource, this.gl.FRAGMENT_SHADER); - this.id = this.gl.createProgram(); - if (!vertexShader || !fragmentShader) - return; - if (!this.id) { - log("filter: could not create webgl program"); - return; - } - this.gl.attachShader(this.id, vertexShader); - this.gl.attachShader(this.id, fragmentShader); - this.gl.linkProgram(this.id); - if (!this.gl.getProgramParameter(this.id, this.gl.LINK_STATUS)) { - log(`filter: gl link failed: ${this.gl.getProgramInfoLog(this.id) || "unknown"}`); - return; - } - this.gl.useProgram(this.id); - collect(vertexSource, "attribute", this.attribute); - for (const a in this.attribute) - this.attribute[a] = this.gl.getAttribLocation(this.id, a); - collect(vertexSource, "uniform", this.uniform); - collect(fragmentSource, "uniform", this.uniform); - for (const u in this.uniform) - this.uniform[u] = this.gl.getUniformLocation(this.id, u); - } -}; -function GLImageFilter() { - let drawCount = 0; - let sourceTexture = null; - let lastInChain = false; - let currentFramebufferIndex = -1; - let tempFramebuffers = [null, null]; - let filterChain = []; - let vertexBuffer = null; - let currentProgram = null; - const fxcanvas = canvas(100, 100); - const shaderProgramCache = {}; - const DRAW = { INTERMEDIATE: 1 }; - const gl = fxcanvas.getContext("webgl"); - if (!gl) { - log("filter: cannot get webgl context"); - return; - } - this.gl = gl; - function resize(width, height) { - if (width === fxcanvas.width && height === fxcanvas.height) - return; - fxcanvas.width = width; - fxcanvas.height = height; - if (!vertexBuffer) { - const vertices = new Float32Array([-1, -1, 0, 1, 1, -1, 1, 1, -1, 1, 0, 0, -1, 1, 0, 0, 1, -1, 1, 1, 1, 1, 1, 0]); - vertexBuffer = gl.createBuffer(); - gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer); - gl.bufferData(gl.ARRAY_BUFFER, vertices, gl.STATIC_DRAW); - gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true); - } - gl.viewport(0, 0, fxcanvas.width, fxcanvas.height); - tempFramebuffers = [null, null]; - } - function createFramebufferTexture(width, height) { - const fbo = gl.createFramebuffer(); - gl.bindFramebuffer(gl.FRAMEBUFFER, fbo); - const renderbuffer = gl.createRenderbuffer(); - gl.bindRenderbuffer(gl.RENDERBUFFER, renderbuffer); - const texture = gl.createTexture(); - gl.bindTexture(gl.TEXTURE_2D, texture); - gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE); - gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0); - gl.bindTexture(gl.TEXTURE_2D, null); - gl.bindFramebuffer(gl.FRAMEBUFFER, null); - return { fbo, texture }; - } - function getTempFramebuffer(index2) { - tempFramebuffers[index2] = tempFramebuffers[index2] || createFramebufferTexture(fxcanvas.width, fxcanvas.height); - return tempFramebuffers[index2]; - } - function draw(flags = 0) { - if (!currentProgram) - return; - let source = null; - let target = null; - let flipY = false; - if (drawCount === 0) - source = sourceTexture; - else - source = getTempFramebuffer(currentFramebufferIndex).texture || null; - drawCount++; - if (lastInChain && !(flags & DRAW.INTERMEDIATE)) { - target = null; - flipY = drawCount % 2 === 0; - } else { - currentFramebufferIndex = (currentFramebufferIndex + 1) % 2; - target = getTempFramebuffer(currentFramebufferIndex).fbo || null; - } - gl.bindTexture(gl.TEXTURE_2D, source); - gl.bindFramebuffer(gl.FRAMEBUFFER, target); - gl.uniform1f(currentProgram.uniform["flipY"], flipY ? -1 : 1); - gl.drawArrays(gl.TRIANGLES, 0, 6); - } - function compileShader(fragmentSource) { - if (shaderProgramCache[fragmentSource]) { - currentProgram = shaderProgramCache[fragmentSource]; - gl.useProgram((currentProgram ? currentProgram.id : null) || null); - return currentProgram; - } - currentProgram = new GLProgram(gl, vertexIdentity, fragmentSource); - if (!currentProgram) { - log("filter: could not get webgl program"); - return null; - } - const floatSize = Float32Array.BYTES_PER_ELEMENT; - const vertSize = 4 * floatSize; - gl.enableVertexAttribArray(currentProgram.attribute["pos"]); - gl.vertexAttribPointer(currentProgram.attribute["pos"], 2, gl.FLOAT, false, vertSize, 0 * floatSize); - gl.enableVertexAttribArray(currentProgram.attribute["uv"]); - gl.vertexAttribPointer(currentProgram.attribute["uv"], 2, gl.FLOAT, false, vertSize, 2 * floatSize); - shaderProgramCache[fragmentSource] = currentProgram; - return currentProgram; - } - const filter = { - colorMatrix: (matrix) => { - const m = new Float32Array(matrix); - m[4] /= 255; - m[9] /= 255; - m[14] /= 255; - m[19] /= 255; - const shader = m[18] === 1 && m[3] === 0 && m[8] === 0 && m[13] === 0 && m[15] === 0 && m[16] === 0 && m[17] === 0 && m[19] === 0 ? colorMatrixWithoutAlpha : colorMatrixWithAlpha; - const program = compileShader(shader); - if (!program) - return; - gl.uniform1fv(program.uniform["m"], m); - draw(); - }, - brightness: (brightness) => { - const b = (brightness || 0) + 1; - filter.colorMatrix([ - b, - 0, - 0, - 0, - 0, - 0, - b, - 0, - 0, - 0, - 0, - 0, - b, - 0, - 0, - 0, - 0, - 0, - 1, - 0 - ]); - }, - saturation: (amount) => { - const x = (amount || 0) * 2 / 3 + 1; - const y = (x - 1) * -0.5; - filter.colorMatrix([ - x, - y, - y, - 0, - 0, - y, - x, - y, - 0, - 0, - y, - y, - x, - 0, - 0, - 0, - 0, - 0, - 1, - 0 - ]); - }, - desaturate: () => { - filter.saturation(-1); - }, - contrast: (amount) => { - const v = (amount || 0) + 1; - const o = -128 * (v - 1); - filter.colorMatrix([ - v, - 0, - 0, - 0, - o, - 0, - v, - 0, - 0, - o, - 0, - 0, - v, - 0, - o, - 0, - 0, - 0, - 1, - 0 - ]); - }, - negative: () => { - filter.contrast(-2); - }, - hue: (rotation) => { - rotation = (rotation || 0) / 180 * Math.PI; - const cos = Math.cos(rotation); - const sin = Math.sin(rotation); - const lumR = 0.213; - const lumG = 0.715; - const lumB = 0.072; - filter.colorMatrix([ - lumR + cos * (1 - lumR) + sin * -lumR, - lumG + cos * -lumG + sin * -lumG, - lumB + cos * -lumB + sin * (1 - lumB), - 0, - 0, - lumR + cos * -lumR + sin * 0.143, - lumG + cos * (1 - lumG) + sin * 0.14, - lumB + cos * -lumB + sin * -0.283, - 0, - 0, - lumR + cos * -lumR + sin * -(1 - lumR), - lumG + cos * -lumG + sin * lumG, - lumB + cos * (1 - lumB) + sin * lumB, - 0, - 0, - 0, - 0, - 0, - 1, - 0 - ]); - }, - desaturateLuminance: () => { - filter.colorMatrix([ - 0.2764723, - 0.929708, - 0.0938197, - 0, - -37.1, - 0.2764723, - 0.929708, - 0.0938197, - 0, - -37.1, - 0.2764723, - 0.929708, - 0.0938197, - 0, - -37.1, - 0, - 0, - 0, - 1, - 0 - ]); - }, - sepia: () => { - filter.colorMatrix([ - 0.393, - 0.7689999, - 0.18899999, - 0, - 0, - 0.349, - 0.6859999, - 0.16799999, - 0, - 0, - 0.272, - 0.5339999, - 0.13099999, - 0, - 0, - 0, - 0, - 0, - 1, - 0 - ]); - }, - brownie: () => { - filter.colorMatrix([ - 0.5997023498159715, - 0.34553243048391263, - -0.2708298674538042, - 0, - 47.43192855600873, - -0.037703249837783157, - 0.8609577587992641, - 0.15059552388459913, - 0, - -36.96841498319127, - 0.24113635128153335, - -0.07441037908422492, - 0.44972182064877153, - 0, - -7.562075277591283, - 0, - 0, - 0, - 1, - 0 - ]); - }, - vintagePinhole: () => { - filter.colorMatrix([ - 0.6279345635605994, - 0.3202183420819367, - -0.03965408211312453, - 0, - 9.651285835294123, - 0.02578397704808868, - 0.6441188644374771, - 0.03259127616149294, - 0, - 7.462829176470591, - 0.0466055556782719, - -0.0851232987247891, - 0.5241648018700465, - 0, - 5.159190588235296, - 0, - 0, - 0, - 1, - 0 - ]); - }, - kodachrome: () => { - filter.colorMatrix([ - 1.1285582396593525, - -0.3967382283601348, - -0.03992559172921793, - 0, - 63.72958762196502, - -0.16404339962244616, - 1.0835251566291304, - -0.05498805115633132, - 0, - 24.732407896706203, - -0.16786010706155763, - -0.5603416277695248, - 1.6014850761964943, - 0, - 35.62982807460946, - 0, - 0, - 0, - 1, - 0 - ]); - }, - technicolor: () => { - filter.colorMatrix([ - 1.9125277891456083, - -0.8545344976951645, - -0.09155508482755585, - 0, - 11.793603434377337, - -0.3087833385928097, - 1.7658908555458428, - -0.10601743074722245, - 0, - -70.35205161461398, - -0.231103377548616, - -0.7501899197440212, - 1.847597816108189, - 0, - 30.950940869491138, - 0, - 0, - 0, - 1, - 0 - ]); - }, - polaroid: () => { - filter.colorMatrix([ - 1.438, - -0.062, - -0.062, - 0, - 0, - -0.122, - 1.378, - -0.122, - 0, - 0, - -0.016, - -0.016, - 1.483, - 0, - 0, - 0, - 0, - 0, - 1, - 0 - ]); - }, - shiftToBGR: () => { - filter.colorMatrix([ - 0, - 0, - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 0 - ]); - }, - convolution: (matrix) => { - const m = new Float32Array(matrix); - const pixelSizeX = 1 / fxcanvas.width; - const pixelSizeY = 1 / fxcanvas.height; - const program = compileShader(convolution); - if (!program) - return; - gl.uniform1fv(program.uniform["m"], m); - gl.uniform2f(program.uniform["px"], pixelSizeX, pixelSizeY); - draw(); - }, - detectEdges: () => { - filter.convolution.call(this, [ - 0, - 1, - 0, - 1, - -4, - 1, - 0, - 1, - 0 - ]); - }, - sobelX: () => { - filter.convolution.call(this, [ - -1, - 0, - 1, - -2, - 0, - 2, - -1, - 0, - 1 - ]); - }, - sobelY: () => { - filter.convolution.call(this, [ - -1, - -2, - -1, - 0, - 0, - 0, - 1, - 2, - 1 - ]); - }, - sharpen: (amount) => { - const a = amount || 1; - filter.convolution.call(this, [ - 0, - -1 * a, - 0, - -1 * a, - 1 + 4 * a, - -1 * a, - 0, - -1 * a, - 0 - ]); - }, - emboss: (size2) => { - const s = size2 || 1; - filter.convolution.call(this, [ - -2 * s, - -1 * s, - 0, - -1 * s, - 1, - 1 * s, - 0, - 1 * s, - 2 * s - ]); - }, - blur: (size2) => { - const blurSizeX = size2 / 7 / fxcanvas.width; - const blurSizeY = size2 / 7 / fxcanvas.height; - const program = compileShader(blur); - if (!program) - return; - gl.uniform2f(program.uniform["px"], 0, blurSizeY); - draw(DRAW.INTERMEDIATE); - gl.uniform2f(program.uniform["px"], blurSizeX, 0); - draw(); - }, - pixelate: (size2) => { - const blurSizeX = size2 / fxcanvas.width; - const blurSizeY = size2 / fxcanvas.height; - const program = compileShader(pixelate); - if (!program) - return; - gl.uniform2f(program.uniform["size"], blurSizeX, blurSizeY); - draw(); - } - }; - this.add = function(name) { - const args = Array.prototype.slice.call(arguments, 1); - const func = filter[name]; - filterChain.push({ func, args }); - }; - this.reset = function() { - filterChain = []; - }; - this.get = function() { - return filterChain; - }; - this.apply = function(image27) { - resize(image27.width, image27.height); - drawCount = 0; - if (!sourceTexture) - sourceTexture = gl.createTexture(); - gl.bindTexture(gl.TEXTURE_2D, sourceTexture); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST); - gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image27); - for (let i = 0; i < filterChain.length; i++) { - lastInChain = i === filterChain.length - 1; - const f = filterChain[i]; - f.func.apply(this, f.args || []); - } - return fxcanvas; - }; - this.draw = function(image27) { - this.add("brightness", 0); - return this.apply(image27); - }; -} - -// src/image/enhance.ts -var tf = __toESM(require_tfjs_esm()); -async function histogramEqualization(inputImage) { - const squeeze14 = inputImage.shape.length === 4 ? tf.squeeze(inputImage) : inputImage; - const channels = tf.split(squeeze14, 3, 2); - const min2 = [tf.min(channels[0]), tf.min(channels[1]), tf.min(channels[2])]; - const max4 = [tf.max(channels[0]), tf.max(channels[1]), tf.max(channels[2])]; - const absMax = await Promise.all(max4.map((channel) => channel.data())); - const maxValue = 0.99 * Math.max(absMax[0][0], absMax[1][0], absMax[2][0]); - const sub11 = [tf.sub(channels[0], min2[0]), tf.sub(channels[1], min2[1]), tf.sub(channels[2], min2[2])]; - const range = [tf.sub(max4[0], min2[0]), tf.sub(max4[1], min2[1]), tf.sub(max4[2], min2[2])]; - const fact = [tf.div(maxValue, range[0]), tf.div(maxValue, range[1]), tf.div(maxValue, range[2])]; - const enh = [tf.mul(sub11[0], fact[0]), tf.mul(sub11[1], fact[1]), tf.mul(sub11[2], fact[2])]; - const rgb2 = tf.stack([enh[0], enh[1], enh[2]], 2); - const reshape8 = tf.reshape(rgb2, [1, squeeze14.shape[0], squeeze14.shape[1], 3]); - tf.dispose([...channels, ...min2, ...max4, ...sub11, ...range, ...fact, ...enh, rgb2, squeeze14]); - return reshape8; -} - -// src/image/image.ts -var maxSize = 3840; -var inCanvas = null; -var outCanvas = null; -var tmpCanvas = null; -var fx; -var last = { - inputSum: 0, - cacheDiff: 1, - sumMethod: 0, - inputTensor: void 0 -}; -function reset() { - last.inputSum = 0; - last.cacheDiff = 1; - last.sumMethod = 0; - last.inputTensor = void 0; -} -function canvas(width, height) { - let c; - if (env.browser) { - if (env.worker) { - if (typeof OffscreenCanvas === "undefined") - throw new Error("canvas error: attempted to run in web worker but OffscreenCanvas is not supported"); - c = new OffscreenCanvas(width, height); - } else { - if (typeof document === "undefined") - throw new Error("canvas error: attempted to run in browser but DOM is not defined"); - c = document.createElement("canvas"); - c.width = width; - c.height = height; - } - } else { - if (typeof env.Canvas !== "undefined") - c = new env.Canvas(width, height); - else if (typeof globalThis.Canvas !== "undefined") - c = new globalThis.Canvas(width, height); - } - return c; -} -function copy(input, output) { - const outputCanvas = output || canvas(input.width, input.height); - const ctx = outputCanvas.getContext("2d"); - ctx.drawImage(input, 0, 0); - return outputCanvas; -} -async function process2(input, config3, getTensor = true) { - var _a, _b; - if (!input) { - if (config3.debug) - log("input error: input is missing"); - return { tensor: null, canvas: null }; - } - if (!(input instanceof tf2.Tensor) && !(typeof Image !== "undefined" && input instanceof Image) && !(typeof env.Canvas !== "undefined" && input instanceof env.Canvas) && !(typeof globalThis.Canvas !== "undefined" && input instanceof globalThis.Canvas) && !(typeof ImageData !== "undefined" && input instanceof ImageData) && !(typeof ImageBitmap !== "undefined" && input instanceof ImageBitmap) && !(typeof HTMLImageElement !== "undefined" && input instanceof HTMLImageElement) && !(typeof HTMLMediaElement !== "undefined" && input instanceof HTMLMediaElement) && !(typeof HTMLVideoElement !== "undefined" && input instanceof HTMLVideoElement) && !(typeof HTMLCanvasElement !== "undefined" && input instanceof HTMLCanvasElement) && !(typeof OffscreenCanvas !== "undefined" && input instanceof OffscreenCanvas)) { - throw new Error("input error: type is not recognized"); - } - if (input instanceof tf2.Tensor) { - let tensor7 = null; - if (input["isDisposedInternal"]) - throw new Error("input error: attempted to use tensor but it is disposed"); - if (!input.shape) - throw new Error("input error: attempted to use tensor without a shape"); - if (input.shape.length === 3) { - if (input.shape[2] === 3) { - tensor7 = tf2.expandDims(input, 0); - } else if (input.shape[2] === 4) { - const rgb2 = tf2.slice3d(input, [0, 0, 0], [-1, -1, 3]); - tensor7 = tf2.expandDims(rgb2, 0); - tf2.dispose(rgb2); - } - } else if (input.shape.length === 4) { - if (input.shape[3] === 3) { - tensor7 = tf2.clone(input); - } else if (input.shape[3] === 4) { - tensor7 = tf2.slice4d(input, [0, 0, 0, 0], [-1, -1, -1, 3]); - } - } - if (tensor7 == null || tensor7.shape.length !== 4 || tensor7.shape[0] !== 1 || tensor7.shape[3] !== 3) - throw new Error(`input error: attempted to use tensor with unrecognized shape: ${input.shape.toString()}`); - if (tensor7.dtype === "int32") { - const cast8 = tf2.cast(tensor7, "float32"); - tf2.dispose(tensor7); - tensor7 = cast8; - } - return { tensor: tensor7, canvas: config3.filter.return ? outCanvas : null }; - } - if (typeof input["readyState"] !== "undefined" && input.readyState <= 2) { - if (config3.debug) - log("input stream is not ready"); - return { tensor: null, canvas: inCanvas }; - } - const originalWidth = input["naturalWidth"] || input["videoWidth"] || input["width"] || input["shape"] && input["shape"][1] > 0; - const originalHeight = input["naturalHeight"] || input["videoHeight"] || input["height"] || input["shape"] && input["shape"][2] > 0; - if (!originalWidth || !originalHeight) { - if (config3.debug) - log("cannot determine input dimensions"); - return { tensor: null, canvas: inCanvas }; - } - let targetWidth = originalWidth; - let targetHeight = originalHeight; - if (targetWidth > maxSize) { - targetWidth = maxSize; - targetHeight = Math.trunc(targetWidth * originalHeight / originalWidth); - } - if (targetHeight > maxSize) { - targetHeight = maxSize; - targetWidth = Math.trunc(targetHeight * originalWidth / originalHeight); - } - if ((((_a = config3.filter) == null ? void 0 : _a.width) || 0) > 0) - targetWidth = config3.filter.width; - else if ((((_b = config3.filter) == null ? void 0 : _b.height) || 0) > 0) - targetWidth = originalWidth * ((config3.filter.height || 0) / originalHeight); - if ((config3.filter.height || 0) > 0) - targetHeight = config3.filter.height; - else if ((config3.filter.width || 0) > 0) - targetHeight = originalHeight * ((config3.filter.width || 0) / originalWidth); - if (!targetWidth || !targetHeight) - throw new Error("input error: cannot determine dimension"); - if (!inCanvas || inCanvas.width !== targetWidth || inCanvas.height !== targetHeight) - inCanvas = canvas(targetWidth, targetHeight); - const inCtx = inCanvas.getContext("2d"); - if (typeof ImageData !== "undefined" && input instanceof ImageData) { - inCtx.putImageData(input, 0, 0); - } else { - if (config3.filter.flip && typeof inCtx.translate !== "undefined") { - inCtx.translate(originalWidth, 0); - inCtx.scale(-1, 1); - inCtx.drawImage(input, 0, 0, originalWidth, originalHeight, 0, 0, inCanvas.width, inCanvas.height); - inCtx.setTransform(1, 0, 0, 1, 0, 0); - } else { - inCtx.drawImage(input, 0, 0, originalWidth, originalHeight, 0, 0, inCanvas.width, inCanvas.height); - } - } - if (!outCanvas || inCanvas.width !== outCanvas.width || inCanvas.height !== outCanvas.height) - outCanvas = canvas(inCanvas.width, inCanvas.height); - if (config3.filter.enabled && env.webgl.supported) { - if (!fx) - fx = env.browser ? new GLImageFilter() : null; - env.filter = !!fx; - if (!(fx == null ? void 0 : fx.add)) { - if (config3.debug) - log("input process error: cannot initialize filters"); - env.webgl.supported = false; - config3.filter.enabled = false; - copy(inCanvas, outCanvas); - } else { - fx.reset(); - if (config3.filter.brightness !== 0) - fx.add("brightness", config3.filter.brightness); - if (config3.filter.contrast !== 0) - fx.add("contrast", config3.filter.contrast); - if (config3.filter.sharpness !== 0) - fx.add("sharpen", config3.filter.sharpness); - if (config3.filter.blur !== 0) - fx.add("blur", config3.filter.blur); - if (config3.filter.saturation !== 0) - fx.add("saturation", config3.filter.saturation); - if (config3.filter.hue !== 0) - fx.add("hue", config3.filter.hue); - if (config3.filter.negative) - fx.add("negative"); - if (config3.filter.sepia) - fx.add("sepia"); - if (config3.filter.vintage) - fx.add("brownie"); - if (config3.filter.sepia) - fx.add("sepia"); - if (config3.filter.kodachrome) - fx.add("kodachrome"); - if (config3.filter.technicolor) - fx.add("technicolor"); - if (config3.filter.polaroid) - fx.add("polaroid"); - if (config3.filter.pixelate !== 0) - fx.add("pixelate", config3.filter.pixelate); - if (fx.get() > 0) - outCanvas = fx.apply(inCanvas); - else - outCanvas = fx.draw(inCanvas); - } - } else { - copy(inCanvas, outCanvas); - if (fx) - fx = null; - env.filter = !!fx; - } - if (!getTensor) - return { tensor: null, canvas: outCanvas }; - if (!outCanvas) - throw new Error("canvas error: cannot create output"); - let pixels; - let depth = 3; - if (typeof ImageData !== "undefined" && input instanceof ImageData || input.data && input.width && input.height) { - if (env.browser && tf2.browser) { - pixels = tf2.browser ? tf2.browser.fromPixels(input) : null; - } else { - depth = input.data.length / input.height / input.width; - const arr = new Uint8Array(input.data.buffer); - pixels = tf2.tensor(arr, [input.height, input.width, depth], "int32"); - } - } else { - if (!tmpCanvas || outCanvas.width !== tmpCanvas.width || outCanvas.height !== tmpCanvas.height) - tmpCanvas = canvas(outCanvas.width, outCanvas.height); - if (tf2.browser && env.browser) { - if (config3.backend === "webgl" || config3.backend === "humangl" || config3.backend === "webgpu") { - pixels = tf2.browser.fromPixels(outCanvas); - } else { - tmpCanvas = copy(outCanvas); - pixels = tf2.browser.fromPixels(tmpCanvas); - } - } else { - const tempCanvas = copy(outCanvas); - const tempCtx = tempCanvas.getContext("2d"); - const tempData = tempCtx.getImageData(0, 0, targetWidth, targetHeight); - depth = tempData.data.length / targetWidth / targetHeight; - const arr = new Uint8Array(tempData.data.buffer); - pixels = tf2.tensor(arr, [targetWidth, targetHeight, depth]); - } - } - if (depth === 4) { - const rgb2 = tf2.slice3d(pixels, [0, 0, 0], [-1, -1, 3]); - tf2.dispose(pixels); - pixels = rgb2; - } - if (!pixels) - throw new Error("input error: cannot create tensor"); - const casted = tf2.cast(pixels, "float32"); - const tensor6 = config3.filter.equalization ? await histogramEqualization(casted) : tf2.expandDims(casted, 0); - tf2.dispose([pixels, casted]); - return { tensor: tensor6, canvas: config3.filter.return ? outCanvas : null }; -} -async function skip(config3, input) { - let skipFrame = false; - if (config3.cacheSensitivity === 0 || !input.shape || input.shape.length !== 4 || input.shape[1] > 2048 || input.shape[2] > 2048) - return skipFrame; - if (!last.inputTensor) { - last.inputTensor = tf2.clone(input); - } else if (last.inputTensor.shape[1] !== input.shape[1] || last.inputTensor.shape[2] !== input.shape[2]) { - tf2.dispose(last.inputTensor); - last.inputTensor = tf2.clone(input); - } else { - const t2 = {}; - t2.diff = tf2.sub(input, last.inputTensor); - t2.squared = tf2.mul(t2.diff, t2.diff); - t2.sum = tf2.sum(t2.squared); - const diffSum = await t2.sum.data(); - const diffRelative = diffSum[0] / (input.shape[1] || 1) / (input.shape[2] || 1) / 255 / 3; - tf2.dispose([last.inputTensor, t2.diff, t2.squared, t2.sum]); - last.inputTensor = tf2.clone(input); - skipFrame = diffRelative <= (config3.cacheSensitivity || 0); - } - return skipFrame; -} -async function compare(config3, input1, input2) { - const t2 = {}; - if (!input1 || !input2 || input1.shape.length !== 4 || input1.shape.length !== input2.shape.length) { - if (!config3.debug) - log("invalid input tensor or tensor shapes do not match:", input1.shape, input2.shape); - return 0; - } - if (input1.shape[0] !== 1 || input2.shape[0] !== 1 || input1.shape[3] !== 3 || input2.shape[3] !== 3) { - if (!config3.debug) - log("input tensors must be of shape [1, height, width, 3]:", input1.shape, input2.shape); - return 0; - } - t2.input1 = tf2.clone(input1); - t2.input2 = input1.shape[1] !== input2.shape[1] || input1.shape[2] !== input2.shape[2] ? tf2.image.resizeBilinear(input2, [input1.shape[1], input1.shape[2]]) : tf2.clone(input2); - t2.diff = tf2.sub(t2.input1, t2.input2); - t2.squared = tf2.mul(t2.diff, t2.diff); - t2.sum = tf2.sum(t2.squared); - const diffSum = await t2.sum.data(); - const diffRelative = diffSum[0] / (input1.shape[1] || 1) / (input1.shape[2] || 1) / 255 / 3; - tf2.dispose([t2.input1, t2.input2, t2.diff, t2.squared, t2.sum]); - return diffRelative; -} - -// src/util/env.ts -var Env = class { - constructor() { - __publicField(this, "browser"); - __publicField(this, "node"); - __publicField(this, "worker"); - __publicField(this, "platform", ""); - __publicField(this, "agent", ""); - __publicField(this, "backends", []); - __publicField(this, "initial"); - __publicField(this, "filter"); - __publicField(this, "tfjs"); - __publicField(this, "offscreen"); - __publicField(this, "perfadd", false); - __publicField(this, "tensorflow", { - version: void 0, - gpu: void 0 - }); - __publicField(this, "wasm", { - supported: void 0, - backend: void 0, - simd: void 0, - multithread: void 0 - }); - __publicField(this, "webgl", { - supported: void 0, - backend: void 0, - version: void 0, - renderer: void 0 - }); - __publicField(this, "webgpu", { - supported: void 0, - backend: void 0, - adapter: void 0 - }); - __publicField(this, "cpu", { - model: void 0, - flags: [] - }); - __publicField(this, "kernels", []); - __publicField(this, "Canvas"); - __publicField(this, "Image"); - __publicField(this, "ImageData"); - this.browser = typeof navigator !== "undefined"; - this.node = typeof process !== "undefined" && typeof process.versions !== "undefined" && typeof process.versions.node !== "undefined"; - this.tfjs = { version: tf3.version["tfjs-core"] }; - this.offscreen = typeof OffscreenCanvas !== "undefined"; - this.initial = true; - this.worker = this.browser && this.offscreen ? typeof WorkerGlobalScope !== "undefined" : void 0; - if (typeof navigator !== "undefined") { - const raw = navigator.userAgent.match(/\(([^()]+)\)/g); - if (raw == null ? void 0 : raw[0]) { - const platformMatch = raw[0].match(/\(([^()]+)\)/g); - this.platform = (platformMatch == null ? void 0 : platformMatch[0]) ? platformMatch[0].replace(/\(|\)/g, "") : ""; - this.agent = navigator.userAgent.replace(raw[0], ""); - if (this.platform[1]) - this.agent = this.agent.replace(raw[1], ""); - this.agent = this.agent.replace(/ /g, " "); - } - } else if (typeof process !== "undefined") { - this.platform = `${process.platform} ${process.arch}`; - this.agent = `NodeJS ${process.version}`; - } - } - async updateBackend() { - this.backends = Object.keys(tf3.engine().registryFactory); - this.tensorflow = { - version: tf3.backend().binding ? tf3.backend().binding.TF_Version : void 0, - gpu: tf3.backend().binding ? tf3.backend().binding.isUsingGpuDevice() : void 0 - }; - this.wasm.supported = typeof WebAssembly !== "undefined"; - this.wasm.backend = this.backends.includes("wasm"); - if (this.wasm.supported && this.wasm.backend && tf3.getBackend() === "wasm") { - this.wasm.simd = tf3.env().get("WASM_HAS_SIMD_SUPPORT"); - this.wasm.multithread = tf3.env().get("WASM_HAS_MULTITHREAD_SUPPORT"); - } - const c = canvas(100, 100); - const ctx = c ? c.getContext("webgl2") : void 0; - this.webgl.supported = typeof ctx !== "undefined"; - this.webgl.backend = this.backends.includes("webgl"); - if (this.webgl.supported && this.webgl.backend && (tf3.getBackend() === "webgl" || tf3.getBackend() === "humangl")) { - const gl = tf3.backend().gpgpu !== "undefined" ? await tf3.backend().getGPGPUContext().gl : null; - if (gl) { - this.webgl.version = gl.getParameter(gl.VERSION); - this.webgl.renderer = gl.getParameter(gl.RENDERER); - } - } - this.webgpu.supported = this.browser && typeof navigator.gpu !== "undefined"; - this.webgpu.backend = this.backends.includes("webgpu"); - try { - if (this.webgpu.supported) { - const adapter = await navigator.gpu.requestAdapter(); - this.webgpu.adapter = adapter ? adapter.name : void 0; - } - } catch (e) { - this.webgpu.supported = false; - } - try { - this.kernels = tf3.getKernelsForBackend(tf3.getBackend()).map((kernel) => kernel.kernelName.toLowerCase()); - } catch (e) { - } - } - updateCPU() { - const cpu = { model: "", flags: [] }; - if (this.node && this.platform.startsWith("linux")) { - } - if (!this.cpu) - Object.defineProperty(this, "cpu", { value: cpu }); - else - this.cpu = cpu; - } -}; -var env = new Env(); - -// src/util/webcam.ts -var WebCam = class { - constructor() { - __publicField(this, "config"); - __publicField(this, "element"); - __publicField(this, "stream"); - __publicField(this, "start", async (webcamConfig) => { - if (webcamConfig == null ? void 0 : webcamConfig.debug) - this.config.debug = webcamConfig == null ? void 0 : webcamConfig.debug; - if (webcamConfig == null ? void 0 : webcamConfig.crop) - this.config.crop = webcamConfig == null ? void 0 : webcamConfig.crop; - if (webcamConfig == null ? void 0 : webcamConfig.mode) - this.config.mode = webcamConfig == null ? void 0 : webcamConfig.mode; - if (webcamConfig == null ? void 0 : webcamConfig.width) - this.config.width = webcamConfig == null ? void 0 : webcamConfig.width; - if (webcamConfig == null ? void 0 : webcamConfig.height) - this.config.height = webcamConfig == null ? void 0 : webcamConfig.height; - if (webcamConfig == null ? void 0 : webcamConfig.element) { - if (typeof webcamConfig.element === "string") { - const el = document.getElementById(webcamConfig.element); - if (el && el instanceof HTMLVideoElement) { - this.element = el; - } else { - if (this.config.debug) - log("webcam", "cannot get dom element", webcamConfig.element); - return; - } - } else if (webcamConfig.element instanceof HTMLVideoElement) { - this.element = webcamConfig.element; - } else { - if (this.config.debug) - log("webcam", "unknown dom element", webcamConfig.element); - return; - } - } else { - this.element = document.createElement("video"); - } - const requestedConstraints = { - audio: false, - video: { - facingMode: this.config.mode === "front" ? "user" : "environment", - resizeMode: this.config.crop ? "crop-and-scale" : "none", - width: { ideal: this.config.width > 0 ? this.config.width : window.innerWidth }, - height: { ideal: this.config.height > 0 ? this.config.height : window.innerHeight } - } - }; - this.element.addEventListener("play", () => { - if (this.config.debug) - log("webcam", "play"); - }); - this.element.addEventListener("pause", () => { - if (this.config.debug) - log("webcam", "pause"); - }); - this.element.addEventListener("click", async () => { - if (!this.element || !this.stream) - return; - if (this.element.paused) - await this.element.play(); - else - this.element.pause(); - }); - if (!(navigator == null ? void 0 : navigator.mediaDevices)) { - if (this.config.debug) - log("webcam", "no devices"); - return; - } - try { - this.stream = await navigator.mediaDevices.getUserMedia(requestedConstraints); - } catch (err) { - log("webcam", err); - return; - } - if (!this.stream) { - if (this.config.debug) - log("webcam", "no stream"); - return; - } - this.element.srcObject = this.stream; - const ready3 = new Promise((resolve) => { - if (!this.element) - resolve(false); - else - this.element.onloadeddata = () => resolve(true); - }); - await ready3; - await this.element.play(); - if (this.config.debug) { - log("webcam", { - width: this.width, - height: this.height, - label: this.label, - stream: this.stream, - track: this.track, - settings: this.settings, - constraints: this.constraints, - capabilities: this.capabilities - }); - } - }); - __publicField(this, "pause", () => { - if (this.element) - this.element.pause(); - }); - __publicField(this, "play", async () => { - if (this.element) - await this.element.play(); - }); - __publicField(this, "stop", () => { - if (this.config.debug) - log("webcam", "stop"); - if (this.track) - this.track.stop(); - }); - this.config = { - element: void 0, - debug: true, - mode: "front", - crop: false, - width: 0, - height: 0 - }; - } - get track() { - if (!this.stream) - return void 0; - return this.stream.getVideoTracks()[0]; - } - get capabilities() { - if (!this.track) - return void 0; - return this.track.getCapabilities ? this.track.getCapabilities() : void 0; - } - get constraints() { - if (!this.track) - return void 0; - return this.track.getConstraints ? this.track.getConstraints() : void 0; - } - get settings() { - if (!this.stream) - return void 0; - const track = this.stream.getVideoTracks()[0]; - return track.getSettings ? track.getSettings() : void 0; - } - get label() { - if (!this.track) - return ""; - return this.track.label; - } - get paused() { - var _a; - return ((_a = this.element) == null ? void 0 : _a.paused) || false; - } - get width() { - var _a; - return ((_a = this.element) == null ? void 0 : _a.videoWidth) || 0; - } - get height() { - var _a; - return ((_a = this.element) == null ? void 0 : _a.videoHeight) || 0; - } -}; - -// src/tfjs/load.ts -var tf4 = __toESM(require_tfjs_esm()); - -// models/models.json -var models_exports = {}; -__export(models_exports, { - age: () => age, - "anti-spoofing": () => anti_spoofing, - antispoof: () => antispoof, - blazeface: () => blazeface, - "blazeface-back": () => blazeface_back, - "blazeface-front": () => blazeface_front, - "blazepose-detect": () => blazepose_detect, - "blazepose-detector2d": () => blazepose_detector2d, - "blazepose-detector3d": () => blazepose_detector3d, - "blazepose-full": () => blazepose_full, - "blazepose-heavy": () => blazepose_heavy, - "blazepose-lite": () => blazepose_lite, - default: () => models_default, - efficientpose: () => efficientpose, - "efficientpose-i-lite": () => efficientpose_i_lite, - "efficientpose-ii-lite": () => efficientpose_ii_lite, - "efficientpose-iv": () => efficientpose_iv, - emotion: () => emotion, - faceboxes: () => faceboxes, - facemesh: () => facemesh, - "facemesh-attention": () => facemesh_attention, - "facemesh-attention-alt": () => facemesh_attention_alt, - "facemesh-detection-full": () => facemesh_detection_full, - "facemesh-detection-short": () => facemesh_detection_short, - "facemesh-orig": () => facemesh_orig, - faceres: () => faceres, - "faceres-deep": () => faceres_deep, - gear: () => gear, - gender: () => gender, - "gender-ssrnet-imdb": () => gender_ssrnet_imdb, - handdetect: () => handdetect, - "handlandmark-full": () => handlandmark_full, - "handlandmark-lite": () => handlandmark_lite, - "handlandmark-sparse": () => handlandmark_sparse, - handskeleton: () => handskeleton, - handtrack: () => handtrack, - "insightface-efficientnet-b0": () => insightface_efficientnet_b0, - "insightface-ghostnet-strides1": () => insightface_ghostnet_strides1, - "insightface-ghostnet-strides2": () => insightface_ghostnet_strides2, - "insightface-mobilenet-emore": () => insightface_mobilenet_emore, - "insightface-mobilenet-swish": () => insightface_mobilenet_swish, - iris: () => iris, - liveness: () => liveness, - "mb3-centernet": () => mb3_centernet, - meet: () => meet, - mobileface: () => mobileface, - mobilefacenet: () => mobilefacenet, - models: () => models, - "movenet-lightning": () => movenet_lightning, - "movenet-multipose": () => movenet_multipose, - "movenet-thunder": () => movenet_thunder, - nanodet: () => nanodet, - "nanodet-e": () => nanodet_e, - "nanodet-g": () => nanodet_g, - "nanodet-m": () => nanodet_m, - "nanodet-t": () => nanodet_t, - posenet: () => posenet, - selfie: () => selfie -}); -var antispoof = 853098; -var blazeface = 538928; -var emotion = 820516; -var facemesh = 1477958; -var faceres = 6978814; -var handlandmark_full = 5431368; -var handtrack = 2964837; -var iris = 2599092; -var liveness = 592976; -var mb3_centernet = 4030290; -var models = 0; -var movenet_lightning = 4650216; -var selfie = 212886; -var age = 161240; -var blazeface_back = 538928; -var blazeface_front = 402048; -var blazepose_detector2d = 7499400; -var blazepose_detector3d = 5928856; -var blazepose_full = 6338290; -var blazepose_heavy = 27501554; -var blazepose_lite = 2725490; -var efficientpose = 5651240; -var faceboxes = 2013002; -var facemesh_attention_alt = 2387598; -var facemesh_attention = 2382414; -var facemesh_detection_full = 1026192; -var facemesh_detection_short = 201268; -var facemesh_orig = 2955780; -var faceres_deep = 13957620; -var gear = 1498916; -var gender_ssrnet_imdb = 161236; -var gender = 201808; -var handdetect = 3515612; -var handlandmark_lite = 2023432; -var handlandmark_sparse = 5286322; -var handskeleton = 5502280; -var meet = 372228; -var mobileface = 2183192; -var mobilefacenet = 5171976; -var movenet_multipose = 9448838; -var movenet_thunder = 12477112; -var nanodet = 7574558; -var posenet = 5032780; -var blazepose_detect = 5928804; -var anti_spoofing = 853098; -var efficientpose_i_lite = 2269064; -var efficientpose_ii_lite = 5651240; -var efficientpose_iv = 25643252; -var insightface_efficientnet_b0 = 13013224; -var insightface_ghostnet_strides1 = 8093408; -var insightface_ghostnet_strides2 = 8049584; -var insightface_mobilenet_emore = 6938536; -var insightface_mobilenet_swish = 12168584; -var nanodet_e = 12319156; -var nanodet_g = 7574558; -var nanodet_m = 1887474; -var nanodet_t = 5294216; -var models_default = { - antispoof, - blazeface, - emotion, - facemesh, - faceres, - "handlandmark-full": handlandmark_full, - handtrack, - iris, - liveness, - "mb3-centernet": mb3_centernet, - models, - "movenet-lightning": movenet_lightning, - selfie, - age, - "blazeface-back": blazeface_back, - "blazeface-front": blazeface_front, - "blazepose-detector2d": blazepose_detector2d, - "blazepose-detector3d": blazepose_detector3d, - "blazepose-full": blazepose_full, - "blazepose-heavy": blazepose_heavy, - "blazepose-lite": blazepose_lite, - efficientpose, - faceboxes, - "facemesh-attention-alt": facemesh_attention_alt, - "facemesh-attention": facemesh_attention, - "facemesh-detection-full": facemesh_detection_full, - "facemesh-detection-short": facemesh_detection_short, - "facemesh-orig": facemesh_orig, - "faceres-deep": faceres_deep, - gear, - "gender-ssrnet-imdb": gender_ssrnet_imdb, - gender, - handdetect, - "handlandmark-lite": handlandmark_lite, - "handlandmark-sparse": handlandmark_sparse, - handskeleton, - meet, - mobileface, - mobilefacenet, - "movenet-multipose": movenet_multipose, - "movenet-thunder": movenet_thunder, - nanodet, - posenet, - "blazepose-detect": blazepose_detect, - "anti-spoofing": anti_spoofing, - "efficientpose-i-lite": efficientpose_i_lite, - "efficientpose-ii-lite": efficientpose_ii_lite, - "efficientpose-iv": efficientpose_iv, - "insightface-efficientnet-b0": insightface_efficientnet_b0, - "insightface-ghostnet-strides1": insightface_ghostnet_strides1, - "insightface-ghostnet-strides2": insightface_ghostnet_strides2, - "insightface-mobilenet-emore": insightface_mobilenet_emore, - "insightface-mobilenet-swish": insightface_mobilenet_swish, - "nanodet-e": nanodet_e, - "nanodet-g": nanodet_g, - "nanodet-m": nanodet_m, - "nanodet-t": nanodet_t -}; - -// src/tfjs/load.ts -var options = { - cacheModels: true, - cacheSupported: true, - verbose: true, - debug: false, - modelBasePath: "" -}; -var modelStats = {}; -async function httpHandler(url, init3) { - if (options.debug) - log("load model fetch:", url, init3); - return fetch(url, init3); -} -function setModelLoadOptions(config3) { - options.cacheModels = config3.cacheModels; - options.verbose = config3.debug; - options.modelBasePath = config3.modelBasePath; -} -async function loadModel(modelPath) { - var _a, _b, _c, _d; - let modelUrl = join(options.modelBasePath, modelPath || ""); - if (!modelUrl.toLowerCase().endsWith(".json")) - modelUrl += ".json"; - const modelPathSegments = modelUrl.includes("/") ? modelUrl.split("/") : modelUrl.split("\\"); - const shortModelName = modelPathSegments[modelPathSegments.length - 1].replace(".json", ""); - const cachedModelName = "indexeddb://" + shortModelName; - modelStats[shortModelName] = { - name: shortModelName, - sizeFromManifest: 0, - sizeLoadedWeights: 0, - sizeDesired: models_exports[shortModelName], - inCache: false - }; - options.cacheSupported = typeof indexedDB !== "undefined"; - let cachedModels = {}; - try { - cachedModels = options.cacheSupported && options.cacheModels ? await tf4.io.listModels() : {}; - } catch (e) { - options.cacheSupported = false; - } - modelStats[shortModelName].inCache = options.cacheSupported && options.cacheModels && Object.keys(cachedModels).includes(cachedModelName); - const tfLoadOptions = typeof fetch === "undefined" ? {} : { fetchFunc: (url, init3) => httpHandler(url, init3) }; - let model21 = new tf4.GraphModel(modelStats[shortModelName].inCache ? cachedModelName : modelUrl, tfLoadOptions); - let loaded = false; - try { - model21.findIOHandler(); - if (options.debug) - log("model load handler:", model21["handler"]); - } catch (err) { - log("error finding model i/o handler:", modelUrl, err); - } - try { - const artifacts = await ((_a = model21.handler) == null ? void 0 : _a.load()) || null; - modelStats[shortModelName].sizeFromManifest = ((_b = artifacts == null ? void 0 : artifacts.weightData) == null ? void 0 : _b.byteLength) || 0; - if (artifacts) - model21.loadSync(artifacts); - else - model21 = await tf4.loadGraphModel(modelStats[shortModelName].inCache ? cachedModelName : modelUrl, tfLoadOptions); - modelStats[shortModelName].sizeLoadedWeights = ((_d = (_c = model21.artifacts) == null ? void 0 : _c.weightData) == null ? void 0 : _d.byteLength) || 0; - if (options.verbose) - log("load:", { model: shortModelName, url: model21["modelUrl"], bytes: modelStats[shortModelName].sizeLoadedWeights }); - loaded = true; - } catch (err) { - log("error loading model:", modelUrl, err); - } - if (loaded && options.cacheModels && options.cacheSupported && !modelStats[shortModelName].inCache) { - try { - const saveResult = await model21.save(cachedModelName); - if (options.debug) - log("model saved:", cachedModelName, saveResult); - } catch (err) { - log("error saving model:", modelUrl, err); - } - } - return model21; -} - -// src/human.ts -var tf39 = __toESM(require_tfjs_esm()); - -// package.json -var version2 = "2.11.0"; - -// src/tfjs/humangl.ts -var tf34 = __toESM(require_tfjs_esm()); - -// src/models.ts -var models_exports2 = {}; -__export(models_exports2, { - Models: () => Models, - getModelStats: () => getModelStats, - load: () => load22, - reset: () => reset2, - validate: () => validate2, - validateModel: () => validateModel -}); - -// src/face/antispoof.ts -var tf5 = __toESM(require_tfjs_esm()); -var model; -var cached = []; -var skipped = Number.MAX_SAFE_INTEGER; -var lastCount = 0; -var lastTime = 0; -async function load(config3) { - var _a; - if (env.initial) - model = null; - if (!model) - model = await loadModel((_a = config3.face.antispoof) == null ? void 0 : _a.modelPath); - else if (config3.debug) - log("cached model:", model["modelUrl"]); - return model; -} -async function predict(image27, config3, idx, count2) { - var _a, _b; - if (!model || !(model == null ? void 0 : model["executor"])) - return 0; - const skipTime = (((_a = config3.face.antispoof) == null ? void 0 : _a.skipTime) || 0) > now() - lastTime; - const skipFrame = skipped < (((_b = config3.face.antispoof) == null ? void 0 : _b.skipFrames) || 0); - if (config3.skipAllowed && skipTime && skipFrame && lastCount === count2 && cached[idx]) { - skipped++; - return cached[idx]; - } - skipped = 0; - return new Promise(async (resolve) => { - const resize = tf5.image.resizeBilinear(image27, [(model == null ? void 0 : model.inputs[0].shape) ? model.inputs[0].shape[2] : 0, (model == null ? void 0 : model.inputs[0].shape) ? model.inputs[0].shape[1] : 0], false); - const res = model == null ? void 0 : model.execute(resize); - const num = (await res.data())[0]; - cached[idx] = Math.round(100 * num) / 100; - lastCount = count2; - lastTime = now(); - tf5.dispose([resize, res]); - resolve(cached[idx]); - }); -} - -// src/face/blazeface.ts -var tf8 = __toESM(require_tfjs_esm()); - -// src/face/facemeshutil.ts -var tf7 = __toESM(require_tfjs_esm()); - -// src/face/facemeshcoords.ts -var meshAnnotations = { - silhouette: [ - 10, - 338, - 297, - 332, - 284, - 251, - 389, - 356, - 454, - 323, - 361, - 288, - 397, - 365, - 379, - 378, - 400, - 377, - 152, - 148, - 176, - 149, - 150, - 136, - 172, - 58, - 132, - 93, - 234, - 127, - 162, - 21, - 54, - 103, - 67, - 109 - ], - lipsUpperOuter: [185, 40, 39, 37, 0, 267, 269, 270, 409], - lipsLowerOuter: [61, 146, 91, 181, 84, 17, 314, 405, 321, 375, 291], - lipsUpperInner: [191, 80, 81, 82, 13, 312, 311, 310, 415], - lipsLowerInner: [78, 95, 88, 178, 87, 14, 317, 402, 318, 324, 308], - lipsLowerSemiOuter: [76, 77, 90, 180, 85, 16, 315, 404, 320, 307, 306], - lipsUpperSemiOuter: [184, 74, 73, 72, 11, 302, 303, 304, 408], - lipsLowerSemiInner: [62, 96, 89, 179, 86, 15, 316, 403, 319, 325, 292], - lipsUpperSemiInner: [183, 42, 41, 38, 12, 268, 271, 272, 407], - rightEyeUpper0: [246, 161, 160, 159, 158, 157, 173], - rightEyeLower0: [33, 7, 163, 144, 145, 153, 154, 155, 133], - rightEyeUpper1: [247, 30, 29, 27, 28, 56, 190], - rightEyeLower1: [130, 25, 110, 24, 23, 22, 26, 112, 243], - rightEyeUpper2: [113, 225, 224, 223, 222, 221, 189], - rightEyeLower2: [226, 31, 228, 229, 230, 231, 232, 233, 244], - rightEyeLower3: [143, 111, 117, 118, 119, 120, 121, 128, 245], - rightEyebrowUpper: [156, 70, 63, 105, 66, 107, 55, 193], - rightEyebrowLower: [35, 124, 46, 53, 52, 65], - rightEyeIris: [473, 474, 475, 476, 477], - leftEyeUpper0: [466, 388, 387, 386, 385, 384, 398], - leftEyeLower0: [263, 249, 390, 373, 374, 380, 381, 382, 362], - leftEyeUpper1: [467, 260, 259, 257, 258, 286, 414], - leftEyeLower1: [359, 255, 339, 254, 253, 252, 256, 341, 463], - leftEyeUpper2: [342, 445, 444, 443, 442, 441, 413], - leftEyeLower2: [446, 261, 448, 449, 450, 451, 452, 453, 464], - leftEyeLower3: [372, 340, 346, 347, 348, 349, 350, 357, 465], - leftEyebrowUpper: [383, 300, 293, 334, 296, 336, 285, 417], - leftEyebrowLower: [265, 353, 276, 283, 282, 295], - leftEyeIris: [468, 469, 470, 471, 472], - midwayBetweenEyes: [168], - noseTip: [1], - noseBottom: [2], - noseRightCorner: [98], - noseLeftCorner: [327], - rightCheek: [205], - leftCheek: [425] -}; -var meshLandmarks = { - count: 468, - mouth: 13, - symmetryLine: [13, meshAnnotations.midwayBetweenEyes[0]] -}; -var blazeFaceLandmarks = { - leftEye: 0, - rightEye: 1, - nose: 2, - mouth: 3, - leftEar: 4, - rightEar: 5, - symmetryLine: [3, 2] -}; -var irisIndices = [ - { key: "EyeUpper0", indices: [9, 10, 11, 12, 13, 14, 15] }, - { key: "EyeUpper1", indices: [25, 26, 27, 28, 29, 30, 31] }, - { key: "EyeUpper2", indices: [41, 42, 43, 44, 45, 46, 47] }, - { key: "EyeLower0", indices: [0, 1, 2, 3, 4, 5, 6, 7, 8] }, - { key: "EyeLower1", indices: [16, 17, 18, 19, 20, 21, 22, 23, 24] }, - { key: "EyeLower2", indices: [32, 33, 34, 35, 36, 37, 38, 39, 40] }, - { key: "EyeLower3", indices: [54, 55, 56, 57, 58, 59, 60, 61, 62] }, - { key: "EyebrowUpper", indices: [63, 64, 65, 66, 67, 68, 69, 70] }, - { key: "EyebrowLower", indices: [48, 49, 50, 51, 52, 53] } -]; -var UV468 = [ - [0.499976992607117, 0.652534008026123], - [0.500025987625122, 0.547487020492554], - [0.499974012374878, 0.602371990680695], - [0.482113003730774, 0.471979022026062], - [0.500150978565216, 0.527155995368958], - [0.499909996986389, 0.498252987861633], - [0.499523013830185, 0.40106201171875], - [0.289712011814117, 0.380764007568359], - [0.499954998493195, 0.312398016452789], - [0.499987006187439, 0.269918978214264], - [0.500023007392883, 0.107050001621246], - [0.500023007392883, 0.666234016418457], - [0.5000159740448, 0.679224014282227], - [0.500023007392883, 0.692348003387451], - [0.499976992607117, 0.695277988910675], - [0.499976992607117, 0.70593398809433], - [0.499976992607117, 0.719385027885437], - [0.499976992607117, 0.737019002437592], - [0.499967992305756, 0.781370997428894], - [0.499816000461578, 0.562981009483337], - [0.473773002624512, 0.573909997940063], - [0.104906998574734, 0.254140973091125], - [0.365929991006851, 0.409575998783112], - [0.338757991790771, 0.41302502155304], - [0.311120003461838, 0.409460008144379], - [0.274657994508743, 0.389131009578705], - [0.393361985683441, 0.403706014156342], - [0.345234006643295, 0.344011008739471], - [0.370094001293182, 0.346076011657715], - [0.319321990013123, 0.347265005111694], - [0.297903001308441, 0.353591024875641], - [0.24779200553894, 0.410809993743896], - [0.396889001131058, 0.842755019664764], - [0.280097991228104, 0.375599980354309], - [0.106310002505779, 0.399955987930298], - [0.2099249958992, 0.391353011131287], - [0.355807989835739, 0.534406006336212], - [0.471751004457474, 0.65040397644043], - [0.474155008792877, 0.680191993713379], - [0.439785003662109, 0.657229006290436], - [0.414617002010345, 0.66654098033905], - [0.450374007225037, 0.680860996246338], - [0.428770989179611, 0.682690978050232], - [0.374971002340317, 0.727805018424988], - [0.486716985702515, 0.547628998756409], - [0.485300987958908, 0.527395009994507], - [0.257764995098114, 0.314490020275116], - [0.401223003864288, 0.455172002315521], - [0.429818987846375, 0.548614978790283], - [0.421351999044418, 0.533740997314453], - [0.276895999908447, 0.532056987285614], - [0.483370006084442, 0.499586999416351], - [0.33721199631691, 0.282882988452911], - [0.296391993761063, 0.293242990970612], - [0.169294998049736, 0.193813979625702], - [0.447580009698868, 0.302609980106354], - [0.392390012741089, 0.353887975215912], - [0.354490011930466, 0.696784019470215], - [0.067304998636246, 0.730105042457581], - [0.442739009857178, 0.572826027870178], - [0.457098007202148, 0.584792017936707], - [0.381974011659622, 0.694710969924927], - [0.392388999462128, 0.694203019142151], - [0.277076005935669, 0.271932005882263], - [0.422551989555359, 0.563233017921448], - [0.385919004678726, 0.281364023685455], - [0.383103013038635, 0.255840003490448], - [0.331431001424789, 0.119714021682739], - [0.229923993349075, 0.232002973556519], - [0.364500999450684, 0.189113974571228], - [0.229622006416321, 0.299540996551514], - [0.173287004232407, 0.278747975826263], - [0.472878992557526, 0.666198015213013], - [0.446828007698059, 0.668527007102966], - [0.422762006521225, 0.673889994621277], - [0.445307999849319, 0.580065965652466], - [0.388103008270264, 0.693961024284363], - [0.403039008378983, 0.706539988517761], - [0.403629004955292, 0.693953037261963], - [0.460041999816895, 0.557139039039612], - [0.431158006191254, 0.692366003990173], - [0.452181994915009, 0.692366003990173], - [0.475387006998062, 0.692366003990173], - [0.465828001499176, 0.779190003871918], - [0.472328990697861, 0.736225962638855], - [0.473087012767792, 0.717857003211975], - [0.473122000694275, 0.704625964164734], - [0.473033010959625, 0.695277988910675], - [0.427942007780075, 0.695277988910675], - [0.426479011774063, 0.703539967536926], - [0.423162013292313, 0.711845993995667], - [0.4183090031147, 0.720062971115112], - [0.390094995498657, 0.639572978019714], - [0.013953999616206, 0.560034036636353], - [0.499913990497589, 0.58014702796936], - [0.413199990987778, 0.69539999961853], - [0.409626007080078, 0.701822996139526], - [0.468080013990402, 0.601534962654114], - [0.422728985548019, 0.585985004901886], - [0.463079988956451, 0.593783974647522], - [0.37211999297142, 0.47341400384903], - [0.334562003612518, 0.496073007583618], - [0.411671012639999, 0.546965003013611], - [0.242175996303558, 0.14767599105835], - [0.290776997804642, 0.201445996761322], - [0.327338010072708, 0.256527006626129], - [0.399509996175766, 0.748921036720276], - [0.441727995872498, 0.261676013469696], - [0.429764986038208, 0.187834024429321], - [0.412198007106781, 0.108901023864746], - [0.288955003023148, 0.398952007293701], - [0.218936994671822, 0.435410976409912], - [0.41278201341629, 0.398970007896423], - [0.257135003805161, 0.355440020561218], - [0.427684992551804, 0.437960982322693], - [0.448339998722076, 0.536936044692993], - [0.178560003638268, 0.45755398273468], - [0.247308000922203, 0.457193970680237], - [0.286267012357712, 0.467674970626831], - [0.332827985286713, 0.460712015628815], - [0.368755996227264, 0.447206974029541], - [0.398963987827301, 0.432654976844788], - [0.476410001516342, 0.405806005001068], - [0.189241006970406, 0.523923993110657], - [0.228962004184723, 0.348950982093811], - [0.490725994110107, 0.562400996685028], - [0.404670000076294, 0.485132992267609], - [0.019469000399113, 0.401564002037048], - [0.426243007183075, 0.420431017875671], - [0.396993011236191, 0.548797011375427], - [0.266469985246658, 0.376977026462555], - [0.439121007919312, 0.51895797252655], - [0.032313998788595, 0.644356966018677], - [0.419054001569748, 0.387154996395111], - [0.462783008813858, 0.505746960639954], - [0.238978996872902, 0.779744982719421], - [0.198220998048782, 0.831938028335571], - [0.107550002634525, 0.540755033493042], - [0.183610007166862, 0.740257024765015], - [0.134409993886948, 0.333683013916016], - [0.385764002799988, 0.883153975009918], - [0.490967005491257, 0.579378008842468], - [0.382384985685349, 0.508572995662689], - [0.174399003386497, 0.397670984268188], - [0.318785011768341, 0.39623498916626], - [0.343364000320435, 0.400596976280212], - [0.396100014448166, 0.710216999053955], - [0.187885001301765, 0.588537991046906], - [0.430987000465393, 0.944064974784851], - [0.318993002176285, 0.898285031318665], - [0.266247987747192, 0.869701027870178], - [0.500023007392883, 0.190576016902924], - [0.499976992607117, 0.954452991485596], - [0.366169989109039, 0.398822009563446], - [0.393207013607025, 0.39553701877594], - [0.410373002290726, 0.391080021858215], - [0.194993004202843, 0.342101991176605], - [0.388664990663528, 0.362284004688263], - [0.365961998701096, 0.355970978736877], - [0.343364000320435, 0.355356991291046], - [0.318785011768341, 0.35834002494812], - [0.301414996385574, 0.363156020641327], - [0.058132998645306, 0.319076001644135], - [0.301414996385574, 0.387449026107788], - [0.499987989664078, 0.618434011936188], - [0.415838003158569, 0.624195992946625], - [0.445681989192963, 0.566076993942261], - [0.465844005346298, 0.620640993118286], - [0.49992299079895, 0.351523995399475], - [0.288718998432159, 0.819945991039276], - [0.335278987884521, 0.852819979190826], - [0.440512001514435, 0.902418971061707], - [0.128294005990028, 0.791940987110138], - [0.408771991729736, 0.373893976211548], - [0.455606997013092, 0.451801002025604], - [0.499877005815506, 0.908990025520325], - [0.375436991453171, 0.924192011356354], - [0.11421000212431, 0.615022003650665], - [0.448662012815475, 0.695277988910675], - [0.4480200111866, 0.704632043838501], - [0.447111994028091, 0.715808033943176], - [0.444831997156143, 0.730794012546539], - [0.430011987686157, 0.766808986663818], - [0.406787008047104, 0.685672998428345], - [0.400738000869751, 0.681069016456604], - [0.392399996519089, 0.677703022956848], - [0.367855995893478, 0.663918972015381], - [0.247923001646996, 0.601333022117615], - [0.452769994735718, 0.420849978923798], - [0.43639200925827, 0.359887003898621], - [0.416164010763168, 0.368713974952698], - [0.413385987281799, 0.692366003990173], - [0.228018000721931, 0.683571994304657], - [0.468268007040024, 0.352671027183533], - [0.411361992359161, 0.804327011108398], - [0.499989002943039, 0.469825029373169], - [0.479153990745544, 0.442654013633728], - [0.499974012374878, 0.439637005329132], - [0.432112008333206, 0.493588984012604], - [0.499886006116867, 0.866917014122009], - [0.49991300702095, 0.821729004383087], - [0.456548988819122, 0.819200992584229], - [0.344549000263214, 0.745438992977142], - [0.37890899181366, 0.574010014533997], - [0.374292999505997, 0.780184984207153], - [0.319687992334366, 0.570737957954407], - [0.357154995203018, 0.604269981384277], - [0.295284003019333, 0.621580958366394], - [0.447750002145767, 0.862477004528046], - [0.410986006259918, 0.508723020553589], - [0.31395098567009, 0.775308012962341], - [0.354128003120422, 0.812552988529205], - [0.324548006057739, 0.703992962837219], - [0.189096003770828, 0.646299958229065], - [0.279776990413666, 0.71465802192688], - [0.1338230073452, 0.682700991630554], - [0.336768001317978, 0.644733011722565], - [0.429883986711502, 0.466521978378296], - [0.455527991056442, 0.548622965812683], - [0.437114000320435, 0.558896005153656], - [0.467287987470627, 0.529924988746643], - [0.414712011814117, 0.335219979286194], - [0.37704598903656, 0.322777986526489], - [0.344107985496521, 0.320150971412659], - [0.312875986099243, 0.32233202457428], - [0.283526003360748, 0.333190023899078], - [0.241245999932289, 0.382785975933075], - [0.102986000478268, 0.468762993812561], - [0.267612010240555, 0.424560010433197], - [0.297879010438919, 0.433175981044769], - [0.333433985710144, 0.433878004550934], - [0.366427004337311, 0.426115989685059], - [0.396012008190155, 0.416696012020111], - [0.420121014118195, 0.41022801399231], - [0.007561000064015, 0.480777025222778], - [0.432949006557465, 0.569517970085144], - [0.458638995885849, 0.479089021682739], - [0.473466008901596, 0.545744001865387], - [0.476087987422943, 0.563830018043518], - [0.468472003936768, 0.555056989192963], - [0.433990985155106, 0.582361996173859], - [0.483518004417419, 0.562983989715576], - [0.482482999563217, 0.57784903049469], - [0.42645001411438, 0.389798998832703], - [0.438998997211456, 0.39649498462677], - [0.450067013502121, 0.400434017181396], - [0.289712011814117, 0.368252992630005], - [0.276670008897781, 0.363372981548309], - [0.517862021923065, 0.471948027610779], - [0.710287988185883, 0.380764007568359], - [0.526226997375488, 0.573909997940063], - [0.895093023777008, 0.254140973091125], - [0.634069979190826, 0.409575998783112], - [0.661242008209229, 0.41302502155304], - [0.688880026340485, 0.409460008144379], - [0.725341975688934, 0.389131009578705], - [0.606630027294159, 0.40370500087738], - [0.654766023159027, 0.344011008739471], - [0.629905998706818, 0.346076011657715], - [0.680678009986877, 0.347265005111694], - [0.702096998691559, 0.353591024875641], - [0.75221198797226, 0.410804986953735], - [0.602918028831482, 0.842862963676453], - [0.719901978969574, 0.375599980354309], - [0.893692970275879, 0.399959981441498], - [0.790081977844238, 0.391354024410248], - [0.643998026847839, 0.534487962722778], - [0.528249025344849, 0.65040397644043], - [0.525849997997284, 0.680191040039062], - [0.560214996337891, 0.657229006290436], - [0.585384011268616, 0.66654098033905], - [0.549625992774963, 0.680860996246338], - [0.57122802734375, 0.682691991329193], - [0.624852001667023, 0.72809898853302], - [0.513050019741058, 0.547281980514526], - [0.51509702205658, 0.527251958847046], - [0.742246985435486, 0.314507007598877], - [0.598631024360657, 0.454979002475739], - [0.570338010787964, 0.548575043678284], - [0.578631997108459, 0.533622980117798], - [0.723087012767792, 0.532054007053375], - [0.516445994377136, 0.499638974666595], - [0.662801027297974, 0.282917976379395], - [0.70362401008606, 0.293271005153656], - [0.830704987049103, 0.193813979625702], - [0.552385985851288, 0.302568018436432], - [0.607609987258911, 0.353887975215912], - [0.645429015159607, 0.696707010269165], - [0.932694971561432, 0.730105042457581], - [0.557260990142822, 0.572826027870178], - [0.542901992797852, 0.584792017936707], - [0.6180260181427, 0.694710969924927], - [0.607590973377228, 0.694203019142151], - [0.722943007946014, 0.271963000297546], - [0.577413976192474, 0.563166975975037], - [0.614082992076874, 0.281386971473694], - [0.616907000541687, 0.255886018276215], - [0.668509006500244, 0.119913995265961], - [0.770092010498047, 0.232020974159241], - [0.635536015033722, 0.189248979091644], - [0.77039098739624, 0.299556016921997], - [0.826722025871277, 0.278755009174347], - [0.527121007442474, 0.666198015213013], - [0.553171992301941, 0.668527007102966], - [0.577238023281097, 0.673889994621277], - [0.554691970348358, 0.580065965652466], - [0.611896991729736, 0.693961024284363], - [0.59696102142334, 0.706539988517761], - [0.596370995044708, 0.693953037261963], - [0.539958000183105, 0.557139039039612], - [0.568841993808746, 0.692366003990173], - [0.547818005084991, 0.692366003990173], - [0.52461302280426, 0.692366003990173], - [0.534089982509613, 0.779141008853912], - [0.527670979499817, 0.736225962638855], - [0.526912987232208, 0.717857003211975], - [0.526877999305725, 0.704625964164734], - [0.526966989040375, 0.695277988910675], - [0.572058022022247, 0.695277988910675], - [0.573521018028259, 0.703539967536926], - [0.57683801651001, 0.711845993995667], - [0.581691026687622, 0.720062971115112], - [0.609944999217987, 0.639909982681274], - [0.986046016216278, 0.560034036636353], - [0.5867999792099, 0.69539999961853], - [0.590372025966644, 0.701822996139526], - [0.531915009021759, 0.601536989212036], - [0.577268004417419, 0.585934996604919], - [0.536915004253387, 0.593786001205444], - [0.627542972564697, 0.473352015018463], - [0.665585994720459, 0.495950996875763], - [0.588353991508484, 0.546862006187439], - [0.757824003696442, 0.14767599105835], - [0.709249973297119, 0.201507985591888], - [0.672684013843536, 0.256581008434296], - [0.600408971309662, 0.74900496006012], - [0.55826598405838, 0.261672019958496], - [0.570303976535797, 0.187870979309082], - [0.588165998458862, 0.109044015407562], - [0.711045026779175, 0.398952007293701], - [0.781069993972778, 0.435405015945435], - [0.587247014045715, 0.398931980133057], - [0.742869973182678, 0.355445981025696], - [0.572156012058258, 0.437651991844177], - [0.55186802148819, 0.536570012569427], - [0.821442008018494, 0.457556009292603], - [0.752701997756958, 0.457181990146637], - [0.71375697851181, 0.467626988887787], - [0.66711300611496, 0.460672974586487], - [0.631101012229919, 0.447153985500336], - [0.6008620262146, 0.432473003864288], - [0.523481011390686, 0.405627012252808], - [0.810747981071472, 0.523926019668579], - [0.771045982837677, 0.348959028720856], - [0.509127020835876, 0.562718033790588], - [0.595292985439301, 0.485023975372314], - [0.980530977249146, 0.401564002037048], - [0.573499977588654, 0.420000016689301], - [0.602994978427887, 0.548687994480133], - [0.733529984951019, 0.376977026462555], - [0.560611009597778, 0.519016981124878], - [0.967685997486115, 0.644356966018677], - [0.580985009670258, 0.387160003185272], - [0.537728011608124, 0.505385041236877], - [0.760966002941132, 0.779752969741821], - [0.801778972148895, 0.831938028335571], - [0.892440974712372, 0.54076099395752], - [0.816350996494293, 0.740260004997253], - [0.865594983100891, 0.333687007427216], - [0.614073991775513, 0.883246004581451], - [0.508952975273132, 0.579437971115112], - [0.617941975593567, 0.508316040039062], - [0.825608015060425, 0.397674977779388], - [0.681214988231659, 0.39623498916626], - [0.656635999679565, 0.400596976280212], - [0.603900015354156, 0.710216999053955], - [0.81208598613739, 0.588539004325867], - [0.56801301240921, 0.944564998149872], - [0.681007981300354, 0.898285031318665], - [0.733752012252808, 0.869701027870178], - [0.633830010890961, 0.398822009563446], - [0.606792986392975, 0.39553701877594], - [0.589659988880157, 0.391062021255493], - [0.805015981197357, 0.342108011245728], - [0.611334979534149, 0.362284004688263], - [0.634037971496582, 0.355970978736877], - [0.656635999679565, 0.355356991291046], - [0.681214988231659, 0.35834002494812], - [0.698584973812103, 0.363156020641327], - [0.941866993904114, 0.319076001644135], - [0.698584973812103, 0.387449026107788], - [0.584177017211914, 0.624107003211975], - [0.554318010807037, 0.566076993942261], - [0.534153997898102, 0.62064003944397], - [0.711217999458313, 0.819975018501282], - [0.664629995822906, 0.852871000766754], - [0.559099972248077, 0.902631998062134], - [0.871706008911133, 0.791940987110138], - [0.591234028339386, 0.373893976211548], - [0.544341027736664, 0.451583981513977], - [0.624562978744507, 0.924192011356354], - [0.88577002286911, 0.615028977394104], - [0.551338016986847, 0.695277988910675], - [0.551980018615723, 0.704632043838501], - [0.552887976169586, 0.715808033943176], - [0.555167973041534, 0.730794012546539], - [0.569944024085999, 0.767035007476807], - [0.593203008174896, 0.685675978660583], - [0.599261999130249, 0.681069016456604], - [0.607599973678589, 0.677703022956848], - [0.631937980651855, 0.663500010967255], - [0.752032995223999, 0.601315021514893], - [0.547226011753082, 0.420395016670227], - [0.563543975353241, 0.359827995300293], - [0.583841025829315, 0.368713974952698], - [0.586614012718201, 0.692366003990173], - [0.771915018558502, 0.683578014373779], - [0.531597018241882, 0.352482974529266], - [0.588370978832245, 0.804440975189209], - [0.52079701423645, 0.442565023899078], - [0.567984998226166, 0.493479013442993], - [0.543282985687256, 0.819254994392395], - [0.655317008495331, 0.745514988899231], - [0.621008992195129, 0.574018001556396], - [0.625559985637665, 0.78031200170517], - [0.680198013782501, 0.570719003677368], - [0.64276397228241, 0.604337990283966], - [0.704662978649139, 0.621529996395111], - [0.552012026309967, 0.862591981887817], - [0.589071989059448, 0.508637011051178], - [0.685944974422455, 0.775357007980347], - [0.645735025405884, 0.812640011310577], - [0.675342977046967, 0.703978002071381], - [0.810858011245728, 0.646304965019226], - [0.72012197971344, 0.714666962623596], - [0.866151988506317, 0.682704985141754], - [0.663187026977539, 0.644596993923187], - [0.570082008838654, 0.466325998306274], - [0.544561982154846, 0.548375964164734], - [0.562758982181549, 0.558784961700439], - [0.531987011432648, 0.530140042304993], - [0.585271000862122, 0.335177004337311], - [0.622952997684479, 0.32277899980545], - [0.655896008014679, 0.320163011550903], - [0.687132000923157, 0.322345972061157], - [0.716481983661652, 0.333200991153717], - [0.758756995201111, 0.382786989212036], - [0.897013008594513, 0.468769013881683], - [0.732392013072968, 0.424547016620636], - [0.70211398601532, 0.433162987232208], - [0.66652500629425, 0.433866024017334], - [0.633504986763, 0.426087975502014], - [0.603875994682312, 0.416586995124817], - [0.579657971858978, 0.409945011138916], - [0.992439985275269, 0.480777025222778], - [0.567192018032074, 0.569419980049133], - [0.54136598110199, 0.478899002075195], - [0.526564002037048, 0.546118021011353], - [0.523913025856018, 0.563830018043518], - [0.531529009342194, 0.555056989192963], - [0.566035985946655, 0.582329034805298], - [0.51631098985672, 0.563053965568542], - [0.5174720287323, 0.577877044677734], - [0.573594987392426, 0.389806985855103], - [0.560697972774506, 0.395331978797913], - [0.549755990505219, 0.399751007556915], - [0.710287988185883, 0.368252992630005], - [0.723330020904541, 0.363372981548309] -]; -var TRI468 = [ - 127, - 34, - 139, - 11, - 0, - 37, - 232, - 231, - 120, - 72, - 37, - 39, - 128, - 121, - 47, - 232, - 121, - 128, - 104, - 69, - 67, - 175, - 171, - 148, - 157, - 154, - 155, - 118, - 50, - 101, - 73, - 39, - 40, - 9, - 151, - 108, - 48, - 115, - 131, - 194, - 204, - 211, - 74, - 40, - 185, - 80, - 42, - 183, - 40, - 92, - 186, - 230, - 229, - 118, - 202, - 212, - 214, - 83, - 18, - 17, - 76, - 61, - 146, - 160, - 29, - 30, - 56, - 157, - 173, - 106, - 204, - 194, - 135, - 214, - 192, - 203, - 165, - 98, - 21, - 71, - 68, - 51, - 45, - 4, - 144, - 24, - 23, - 77, - 146, - 91, - 205, - 50, - 187, - 201, - 200, - 18, - 91, - 106, - 182, - 90, - 91, - 181, - 85, - 84, - 17, - 206, - 203, - 36, - 148, - 171, - 140, - 92, - 40, - 39, - 193, - 189, - 244, - 159, - 158, - 28, - 247, - 246, - 161, - 236, - 3, - 196, - 54, - 68, - 104, - 193, - 168, - 8, - 117, - 228, - 31, - 189, - 193, - 55, - 98, - 97, - 99, - 126, - 47, - 100, - 166, - 79, - 218, - 155, - 154, - 26, - 209, - 49, - 131, - 135, - 136, - 150, - 47, - 126, - 217, - 223, - 52, - 53, - 45, - 51, - 134, - 211, - 170, - 140, - 67, - 69, - 108, - 43, - 106, - 91, - 230, - 119, - 120, - 226, - 130, - 247, - 63, - 53, - 52, - 238, - 20, - 242, - 46, - 70, - 156, - 78, - 62, - 96, - 46, - 53, - 63, - 143, - 34, - 227, - 173, - 155, - 133, - 123, - 117, - 111, - 44, - 125, - 19, - 236, - 134, - 51, - 216, - 206, - 205, - 154, - 153, - 22, - 39, - 37, - 167, - 200, - 201, - 208, - 36, - 142, - 100, - 57, - 212, - 202, - 20, - 60, - 99, - 28, - 158, - 157, - 35, - 226, - 113, - 160, - 159, - 27, - 204, - 202, - 210, - 113, - 225, - 46, - 43, - 202, - 204, - 62, - 76, - 77, - 137, - 123, - 116, - 41, - 38, - 72, - 203, - 129, - 142, - 64, - 98, - 240, - 49, - 102, - 64, - 41, - 73, - 74, - 212, - 216, - 207, - 42, - 74, - 184, - 169, - 170, - 211, - 170, - 149, - 176, - 105, - 66, - 69, - 122, - 6, - 168, - 123, - 147, - 187, - 96, - 77, - 90, - 65, - 55, - 107, - 89, - 90, - 180, - 101, - 100, - 120, - 63, - 105, - 104, - 93, - 137, - 227, - 15, - 86, - 85, - 129, - 102, - 49, - 14, - 87, - 86, - 55, - 8, - 9, - 100, - 47, - 121, - 145, - 23, - 22, - 88, - 89, - 179, - 6, - 122, - 196, - 88, - 95, - 96, - 138, - 172, - 136, - 215, - 58, - 172, - 115, - 48, - 219, - 42, - 80, - 81, - 195, - 3, - 51, - 43, - 146, - 61, - 171, - 175, - 199, - 81, - 82, - 38, - 53, - 46, - 225, - 144, - 163, - 110, - 246, - 33, - 7, - 52, - 65, - 66, - 229, - 228, - 117, - 34, - 127, - 234, - 107, - 108, - 69, - 109, - 108, - 151, - 48, - 64, - 235, - 62, - 78, - 191, - 129, - 209, - 126, - 111, - 35, - 143, - 163, - 161, - 246, - 117, - 123, - 50, - 222, - 65, - 52, - 19, - 125, - 141, - 221, - 55, - 65, - 3, - 195, - 197, - 25, - 7, - 33, - 220, - 237, - 44, - 70, - 71, - 139, - 122, - 193, - 245, - 247, - 130, - 33, - 71, - 21, - 162, - 153, - 158, - 159, - 170, - 169, - 150, - 188, - 174, - 196, - 216, - 186, - 92, - 144, - 160, - 161, - 2, - 97, - 167, - 141, - 125, - 241, - 164, - 167, - 37, - 72, - 38, - 12, - 145, - 159, - 160, - 38, - 82, - 13, - 63, - 68, - 71, - 226, - 35, - 111, - 158, - 153, - 154, - 101, - 50, - 205, - 206, - 92, - 165, - 209, - 198, - 217, - 165, - 167, - 97, - 220, - 115, - 218, - 133, - 112, - 243, - 239, - 238, - 241, - 214, - 135, - 169, - 190, - 173, - 133, - 171, - 208, - 32, - 125, - 44, - 237, - 86, - 87, - 178, - 85, - 86, - 179, - 84, - 85, - 180, - 83, - 84, - 181, - 201, - 83, - 182, - 137, - 93, - 132, - 76, - 62, - 183, - 61, - 76, - 184, - 57, - 61, - 185, - 212, - 57, - 186, - 214, - 207, - 187, - 34, - 143, - 156, - 79, - 239, - 237, - 123, - 137, - 177, - 44, - 1, - 4, - 201, - 194, - 32, - 64, - 102, - 129, - 213, - 215, - 138, - 59, - 166, - 219, - 242, - 99, - 97, - 2, - 94, - 141, - 75, - 59, - 235, - 24, - 110, - 228, - 25, - 130, - 226, - 23, - 24, - 229, - 22, - 23, - 230, - 26, - 22, - 231, - 112, - 26, - 232, - 189, - 190, - 243, - 221, - 56, - 190, - 28, - 56, - 221, - 27, - 28, - 222, - 29, - 27, - 223, - 30, - 29, - 224, - 247, - 30, - 225, - 238, - 79, - 20, - 166, - 59, - 75, - 60, - 75, - 240, - 147, - 177, - 215, - 20, - 79, - 166, - 187, - 147, - 213, - 112, - 233, - 244, - 233, - 128, - 245, - 128, - 114, - 188, - 114, - 217, - 174, - 131, - 115, - 220, - 217, - 198, - 236, - 198, - 131, - 134, - 177, - 132, - 58, - 143, - 35, - 124, - 110, - 163, - 7, - 228, - 110, - 25, - 356, - 389, - 368, - 11, - 302, - 267, - 452, - 350, - 349, - 302, - 303, - 269, - 357, - 343, - 277, - 452, - 453, - 357, - 333, - 332, - 297, - 175, - 152, - 377, - 384, - 398, - 382, - 347, - 348, - 330, - 303, - 304, - 270, - 9, - 336, - 337, - 278, - 279, - 360, - 418, - 262, - 431, - 304, - 408, - 409, - 310, - 415, - 407, - 270, - 409, - 410, - 450, - 348, - 347, - 422, - 430, - 434, - 313, - 314, - 17, - 306, - 307, - 375, - 387, - 388, - 260, - 286, - 414, - 398, - 335, - 406, - 418, - 364, - 367, - 416, - 423, - 358, - 327, - 251, - 284, - 298, - 281, - 5, - 4, - 373, - 374, - 253, - 307, - 320, - 321, - 425, - 427, - 411, - 421, - 313, - 18, - 321, - 405, - 406, - 320, - 404, - 405, - 315, - 16, - 17, - 426, - 425, - 266, - 377, - 400, - 369, - 322, - 391, - 269, - 417, - 465, - 464, - 386, - 257, - 258, - 466, - 260, - 388, - 456, - 399, - 419, - 284, - 332, - 333, - 417, - 285, - 8, - 346, - 340, - 261, - 413, - 441, - 285, - 327, - 460, - 328, - 355, - 371, - 329, - 392, - 439, - 438, - 382, - 341, - 256, - 429, - 420, - 360, - 364, - 394, - 379, - 277, - 343, - 437, - 443, - 444, - 283, - 275, - 440, - 363, - 431, - 262, - 369, - 297, - 338, - 337, - 273, - 375, - 321, - 450, - 451, - 349, - 446, - 342, - 467, - 293, - 334, - 282, - 458, - 461, - 462, - 276, - 353, - 383, - 308, - 324, - 325, - 276, - 300, - 293, - 372, - 345, - 447, - 382, - 398, - 362, - 352, - 345, - 340, - 274, - 1, - 19, - 456, - 248, - 281, - 436, - 427, - 425, - 381, - 256, - 252, - 269, - 391, - 393, - 200, - 199, - 428, - 266, - 330, - 329, - 287, - 273, - 422, - 250, - 462, - 328, - 258, - 286, - 384, - 265, - 353, - 342, - 387, - 259, - 257, - 424, - 431, - 430, - 342, - 353, - 276, - 273, - 335, - 424, - 292, - 325, - 307, - 366, - 447, - 345, - 271, - 303, - 302, - 423, - 266, - 371, - 294, - 455, - 460, - 279, - 278, - 294, - 271, - 272, - 304, - 432, - 434, - 427, - 272, - 407, - 408, - 394, - 430, - 431, - 395, - 369, - 400, - 334, - 333, - 299, - 351, - 417, - 168, - 352, - 280, - 411, - 325, - 319, - 320, - 295, - 296, - 336, - 319, - 403, - 404, - 330, - 348, - 349, - 293, - 298, - 333, - 323, - 454, - 447, - 15, - 16, - 315, - 358, - 429, - 279, - 14, - 15, - 316, - 285, - 336, - 9, - 329, - 349, - 350, - 374, - 380, - 252, - 318, - 402, - 403, - 6, - 197, - 419, - 318, - 319, - 325, - 367, - 364, - 365, - 435, - 367, - 397, - 344, - 438, - 439, - 272, - 271, - 311, - 195, - 5, - 281, - 273, - 287, - 291, - 396, - 428, - 199, - 311, - 271, - 268, - 283, - 444, - 445, - 373, - 254, - 339, - 263, - 466, - 249, - 282, - 334, - 296, - 449, - 347, - 346, - 264, - 447, - 454, - 336, - 296, - 299, - 338, - 10, - 151, - 278, - 439, - 455, - 292, - 407, - 415, - 358, - 371, - 355, - 340, - 345, - 372, - 390, - 249, - 466, - 346, - 347, - 280, - 442, - 443, - 282, - 19, - 94, - 370, - 441, - 442, - 295, - 248, - 419, - 197, - 263, - 255, - 359, - 440, - 275, - 274, - 300, - 383, - 368, - 351, - 412, - 465, - 263, - 467, - 466, - 301, - 368, - 389, - 380, - 374, - 386, - 395, - 378, - 379, - 412, - 351, - 419, - 436, - 426, - 322, - 373, - 390, - 388, - 2, - 164, - 393, - 370, - 462, - 461, - 164, - 0, - 267, - 302, - 11, - 12, - 374, - 373, - 387, - 268, - 12, - 13, - 293, - 300, - 301, - 446, - 261, - 340, - 385, - 384, - 381, - 330, - 266, - 425, - 426, - 423, - 391, - 429, - 355, - 437, - 391, - 327, - 326, - 440, - 457, - 438, - 341, - 382, - 362, - 459, - 457, - 461, - 434, - 430, - 394, - 414, - 463, - 362, - 396, - 369, - 262, - 354, - 461, - 457, - 316, - 403, - 402, - 315, - 404, - 403, - 314, - 405, - 404, - 313, - 406, - 405, - 421, - 418, - 406, - 366, - 401, - 361, - 306, - 408, - 407, - 291, - 409, - 408, - 287, - 410, - 409, - 432, - 436, - 410, - 434, - 416, - 411, - 264, - 368, - 383, - 309, - 438, - 457, - 352, - 376, - 401, - 274, - 275, - 4, - 421, - 428, - 262, - 294, - 327, - 358, - 433, - 416, - 367, - 289, - 455, - 439, - 462, - 370, - 326, - 2, - 326, - 370, - 305, - 460, - 455, - 254, - 449, - 448, - 255, - 261, - 446, - 253, - 450, - 449, - 252, - 451, - 450, - 256, - 452, - 451, - 341, - 453, - 452, - 413, - 464, - 463, - 441, - 413, - 414, - 258, - 442, - 441, - 257, - 443, - 442, - 259, - 444, - 443, - 260, - 445, - 444, - 467, - 342, - 445, - 459, - 458, - 250, - 289, - 392, - 290, - 290, - 328, - 460, - 376, - 433, - 435, - 250, - 290, - 392, - 411, - 416, - 433, - 341, - 463, - 464, - 453, - 464, - 465, - 357, - 465, - 412, - 343, - 412, - 399, - 360, - 363, - 440, - 437, - 399, - 456, - 420, - 456, - 363, - 401, - 435, - 288, - 372, - 383, - 353, - 339, - 255, - 249, - 448, - 261, - 255, - 133, - 243, - 190, - 133, - 155, - 112, - 33, - 246, - 247, - 33, - 130, - 25, - 398, - 384, - 286, - 362, - 398, - 414, - 362, - 463, - 341, - 263, - 359, - 467, - 263, - 249, - 255, - 466, - 467, - 260, - 75, - 60, - 166, - 238, - 239, - 79, - 162, - 127, - 139, - 72, - 11, - 37, - 121, - 232, - 120, - 73, - 72, - 39, - 114, - 128, - 47, - 233, - 232, - 128, - 103, - 104, - 67, - 152, - 175, - 148, - 173, - 157, - 155, - 119, - 118, - 101, - 74, - 73, - 40, - 107, - 9, - 108, - 49, - 48, - 131, - 32, - 194, - 211, - 184, - 74, - 185, - 191, - 80, - 183, - 185, - 40, - 186, - 119, - 230, - 118, - 210, - 202, - 214, - 84, - 83, - 17, - 77, - 76, - 146, - 161, - 160, - 30, - 190, - 56, - 173, - 182, - 106, - 194, - 138, - 135, - 192, - 129, - 203, - 98, - 54, - 21, - 68, - 5, - 51, - 4, - 145, - 144, - 23, - 90, - 77, - 91, - 207, - 205, - 187, - 83, - 201, - 18, - 181, - 91, - 182, - 180, - 90, - 181, - 16, - 85, - 17, - 205, - 206, - 36, - 176, - 148, - 140, - 165, - 92, - 39, - 245, - 193, - 244, - 27, - 159, - 28, - 30, - 247, - 161, - 174, - 236, - 196, - 103, - 54, - 104, - 55, - 193, - 8, - 111, - 117, - 31, - 221, - 189, - 55, - 240, - 98, - 99, - 142, - 126, - 100, - 219, - 166, - 218, - 112, - 155, - 26, - 198, - 209, - 131, - 169, - 135, - 150, - 114, - 47, - 217, - 224, - 223, - 53, - 220, - 45, - 134, - 32, - 211, - 140, - 109, - 67, - 108, - 146, - 43, - 91, - 231, - 230, - 120, - 113, - 226, - 247, - 105, - 63, - 52, - 241, - 238, - 242, - 124, - 46, - 156, - 95, - 78, - 96, - 70, - 46, - 63, - 116, - 143, - 227, - 116, - 123, - 111, - 1, - 44, - 19, - 3, - 236, - 51, - 207, - 216, - 205, - 26, - 154, - 22, - 165, - 39, - 167, - 199, - 200, - 208, - 101, - 36, - 100, - 43, - 57, - 202, - 242, - 20, - 99, - 56, - 28, - 157, - 124, - 35, - 113, - 29, - 160, - 27, - 211, - 204, - 210, - 124, - 113, - 46, - 106, - 43, - 204, - 96, - 62, - 77, - 227, - 137, - 116, - 73, - 41, - 72, - 36, - 203, - 142, - 235, - 64, - 240, - 48, - 49, - 64, - 42, - 41, - 74, - 214, - 212, - 207, - 183, - 42, - 184, - 210, - 169, - 211, - 140, - 170, - 176, - 104, - 105, - 69, - 193, - 122, - 168, - 50, - 123, - 187, - 89, - 96, - 90, - 66, - 65, - 107, - 179, - 89, - 180, - 119, - 101, - 120, - 68, - 63, - 104, - 234, - 93, - 227, - 16, - 15, - 85, - 209, - 129, - 49, - 15, - 14, - 86, - 107, - 55, - 9, - 120, - 100, - 121, - 153, - 145, - 22, - 178, - 88, - 179, - 197, - 6, - 196, - 89, - 88, - 96, - 135, - 138, - 136, - 138, - 215, - 172, - 218, - 115, - 219, - 41, - 42, - 81, - 5, - 195, - 51, - 57, - 43, - 61, - 208, - 171, - 199, - 41, - 81, - 38, - 224, - 53, - 225, - 24, - 144, - 110, - 105, - 52, - 66, - 118, - 229, - 117, - 227, - 34, - 234, - 66, - 107, - 69, - 10, - 109, - 151, - 219, - 48, - 235, - 183, - 62, - 191, - 142, - 129, - 126, - 116, - 111, - 143, - 7, - 163, - 246, - 118, - 117, - 50, - 223, - 222, - 52, - 94, - 19, - 141, - 222, - 221, - 65, - 196, - 3, - 197, - 45, - 220, - 44, - 156, - 70, - 139, - 188, - 122, - 245, - 139, - 71, - 162, - 145, - 153, - 159, - 149, - 170, - 150, - 122, - 188, - 196, - 206, - 216, - 92, - 163, - 144, - 161, - 164, - 2, - 167, - 242, - 141, - 241, - 0, - 164, - 37, - 11, - 72, - 12, - 144, - 145, - 160, - 12, - 38, - 13, - 70, - 63, - 71, - 31, - 226, - 111, - 157, - 158, - 154, - 36, - 101, - 205, - 203, - 206, - 165, - 126, - 209, - 217, - 98, - 165, - 97, - 237, - 220, - 218, - 237, - 239, - 241, - 210, - 214, - 169, - 140, - 171, - 32, - 241, - 125, - 237, - 179, - 86, - 178, - 180, - 85, - 179, - 181, - 84, - 180, - 182, - 83, - 181, - 194, - 201, - 182, - 177, - 137, - 132, - 184, - 76, - 183, - 185, - 61, - 184, - 186, - 57, - 185, - 216, - 212, - 186, - 192, - 214, - 187, - 139, - 34, - 156, - 218, - 79, - 237, - 147, - 123, - 177, - 45, - 44, - 4, - 208, - 201, - 32, - 98, - 64, - 129, - 192, - 213, - 138, - 235, - 59, - 219, - 141, - 242, - 97, - 97, - 2, - 141, - 240, - 75, - 235, - 229, - 24, - 228, - 31, - 25, - 226, - 230, - 23, - 229, - 231, - 22, - 230, - 232, - 26, - 231, - 233, - 112, - 232, - 244, - 189, - 243, - 189, - 221, - 190, - 222, - 28, - 221, - 223, - 27, - 222, - 224, - 29, - 223, - 225, - 30, - 224, - 113, - 247, - 225, - 99, - 60, - 240, - 213, - 147, - 215, - 60, - 20, - 166, - 192, - 187, - 213, - 243, - 112, - 244, - 244, - 233, - 245, - 245, - 128, - 188, - 188, - 114, - 174, - 134, - 131, - 220, - 174, - 217, - 236, - 236, - 198, - 134, - 215, - 177, - 58, - 156, - 143, - 124, - 25, - 110, - 7, - 31, - 228, - 25, - 264, - 356, - 368, - 0, - 11, - 267, - 451, - 452, - 349, - 267, - 302, - 269, - 350, - 357, - 277, - 350, - 452, - 357, - 299, - 333, - 297, - 396, - 175, - 377, - 381, - 384, - 382, - 280, - 347, - 330, - 269, - 303, - 270, - 151, - 9, - 337, - 344, - 278, - 360, - 424, - 418, - 431, - 270, - 304, - 409, - 272, - 310, - 407, - 322, - 270, - 410, - 449, - 450, - 347, - 432, - 422, - 434, - 18, - 313, - 17, - 291, - 306, - 375, - 259, - 387, - 260, - 424, - 335, - 418, - 434, - 364, - 416, - 391, - 423, - 327, - 301, - 251, - 298, - 275, - 281, - 4, - 254, - 373, - 253, - 375, - 307, - 321, - 280, - 425, - 411, - 200, - 421, - 18, - 335, - 321, - 406, - 321, - 320, - 405, - 314, - 315, - 17, - 423, - 426, - 266, - 396, - 377, - 369, - 270, - 322, - 269, - 413, - 417, - 464, - 385, - 386, - 258, - 248, - 456, - 419, - 298, - 284, - 333, - 168, - 417, - 8, - 448, - 346, - 261, - 417, - 413, - 285, - 326, - 327, - 328, - 277, - 355, - 329, - 309, - 392, - 438, - 381, - 382, - 256, - 279, - 429, - 360, - 365, - 364, - 379, - 355, - 277, - 437, - 282, - 443, - 283, - 281, - 275, - 363, - 395, - 431, - 369, - 299, - 297, - 337, - 335, - 273, - 321, - 348, - 450, - 349, - 359, - 446, - 467, - 283, - 293, - 282, - 250, - 458, - 462, - 300, - 276, - 383, - 292, - 308, - 325, - 283, - 276, - 293, - 264, - 372, - 447, - 346, - 352, - 340, - 354, - 274, - 19, - 363, - 456, - 281, - 426, - 436, - 425, - 380, - 381, - 252, - 267, - 269, - 393, - 421, - 200, - 428, - 371, - 266, - 329, - 432, - 287, - 422, - 290, - 250, - 328, - 385, - 258, - 384, - 446, - 265, - 342, - 386, - 387, - 257, - 422, - 424, - 430, - 445, - 342, - 276, - 422, - 273, - 424, - 306, - 292, - 307, - 352, - 366, - 345, - 268, - 271, - 302, - 358, - 423, - 371, - 327, - 294, - 460, - 331, - 279, - 294, - 303, - 271, - 304, - 436, - 432, - 427, - 304, - 272, - 408, - 395, - 394, - 431, - 378, - 395, - 400, - 296, - 334, - 299, - 6, - 351, - 168, - 376, - 352, - 411, - 307, - 325, - 320, - 285, - 295, - 336, - 320, - 319, - 404, - 329, - 330, - 349, - 334, - 293, - 333, - 366, - 323, - 447, - 316, - 15, - 315, - 331, - 358, - 279, - 317, - 14, - 316, - 8, - 285, - 9, - 277, - 329, - 350, - 253, - 374, - 252, - 319, - 318, - 403, - 351, - 6, - 419, - 324, - 318, - 325, - 397, - 367, - 365, - 288, - 435, - 397, - 278, - 344, - 439, - 310, - 272, - 311, - 248, - 195, - 281, - 375, - 273, - 291, - 175, - 396, - 199, - 312, - 311, - 268, - 276, - 283, - 445, - 390, - 373, - 339, - 295, - 282, - 296, - 448, - 449, - 346, - 356, - 264, - 454, - 337, - 336, - 299, - 337, - 338, - 151, - 294, - 278, - 455, - 308, - 292, - 415, - 429, - 358, - 355, - 265, - 340, - 372, - 388, - 390, - 466, - 352, - 346, - 280, - 295, - 442, - 282, - 354, - 19, - 370, - 285, - 441, - 295, - 195, - 248, - 197, - 457, - 440, - 274, - 301, - 300, - 368, - 417, - 351, - 465, - 251, - 301, - 389, - 385, - 380, - 386, - 394, - 395, - 379, - 399, - 412, - 419, - 410, - 436, - 322, - 387, - 373, - 388, - 326, - 2, - 393, - 354, - 370, - 461, - 393, - 164, - 267, - 268, - 302, - 12, - 386, - 374, - 387, - 312, - 268, - 13, - 298, - 293, - 301, - 265, - 446, - 340, - 380, - 385, - 381, - 280, - 330, - 425, - 322, - 426, - 391, - 420, - 429, - 437, - 393, - 391, - 326, - 344, - 440, - 438, - 458, - 459, - 461, - 364, - 434, - 394, - 428, - 396, - 262, - 274, - 354, - 457, - 317, - 316, - 402, - 316, - 315, - 403, - 315, - 314, - 404, - 314, - 313, - 405, - 313, - 421, - 406, - 323, - 366, - 361, - 292, - 306, - 407, - 306, - 291, - 408, - 291, - 287, - 409, - 287, - 432, - 410, - 427, - 434, - 411, - 372, - 264, - 383, - 459, - 309, - 457, - 366, - 352, - 401, - 1, - 274, - 4, - 418, - 421, - 262, - 331, - 294, - 358, - 435, - 433, - 367, - 392, - 289, - 439, - 328, - 462, - 326, - 94, - 2, - 370, - 289, - 305, - 455, - 339, - 254, - 448, - 359, - 255, - 446, - 254, - 253, - 449, - 253, - 252, - 450, - 252, - 256, - 451, - 256, - 341, - 452, - 414, - 413, - 463, - 286, - 441, - 414, - 286, - 258, - 441, - 258, - 257, - 442, - 257, - 259, - 443, - 259, - 260, - 444, - 260, - 467, - 445, - 309, - 459, - 250, - 305, - 289, - 290, - 305, - 290, - 460, - 401, - 376, - 435, - 309, - 250, - 392, - 376, - 411, - 433, - 453, - 341, - 464, - 357, - 453, - 465, - 343, - 357, - 412, - 437, - 343, - 399, - 344, - 360, - 440, - 420, - 437, - 456, - 360, - 420, - 363, - 361, - 401, - 288, - 265, - 372, - 353, - 390, - 339, - 249, - 339, - 448, - 255 -]; -var VTX68 = [ - 127, - 234, - 132, - 58, - 172, - 150, - 149, - 148, - 152, - 377, - 378, - 379, - 397, - 288, - 361, - 454, - 356, - 70, - 63, - 105, - 66, - 107, - 336, - 296, - 334, - 293, - 300, - 168, - 6, - 195, - 4, - 98, - 97, - 2, - 326, - 327, - 33, - 160, - 158, - 133, - 153, - 144, - 362, - 385, - 387, - 263, - 373, - 380, - 57, - 40, - 37, - 0, - 267, - 270, - 287, - 321, - 314, - 17, - 84, - 91, - 78, - 81, - 13, - 311, - 308, - 402, - 14, - 178 -]; -var VTX33 = [33, 133, 362, 263, 1, 62, 308, 159, 145, 386, 374, 6, 102, 331, 2, 13, 14, 70, 105, 107, 336, 334, 300, 54, 10, 284, 50, 280, 234, 454, 58, 288, 152]; -var VTX7 = [33, 133, 362, 263, 1, 78, 308]; -var UV68 = VTX68.map((x) => UV468[x]); -var UV33 = VTX33.map((x) => UV468[x]); -var UV7 = VTX7.map((x) => UV468[x]); -function connectionsToIndices(connections) { - const indices = connections.map((connection) => connection[0]); - indices.push(connections[connections.length - 1][1]); - return indices; -} -var pairsLips = [ - [61, 146], - [146, 91], - [91, 181], - [181, 84], - [84, 17], - [17, 314], - [314, 405], - [405, 321], - [321, 375], - [375, 291], - [61, 185], - [185, 40], - [40, 39], - [39, 37], - [37, 0], - [0, 267], - [267, 269], - [269, 270], - [270, 409], - [409, 291], - [78, 95], - [95, 88], - [88, 178], - [178, 87], - [87, 14], - [14, 317], - [317, 402], - [402, 318], - [318, 324], - [324, 308], - [78, 191], - [191, 80], - [80, 81], - [81, 82], - [82, 13], - [13, 312], - [312, 311], - [311, 310], - [310, 415], - [415, 308] -]; -var pairsLeftEye = [[263, 249], [249, 390], [390, 373], [373, 374], [374, 380], [380, 381], [381, 382], [382, 362], [263, 466], [466, 388], [388, 387], [387, 386], [386, 385], [385, 384], [384, 398], [398, 362]]; -var pairsLeftEyebrow = [[276, 283], [283, 282], [282, 295], [295, 285], [300, 293], [293, 334], [334, 296], [296, 336]]; -var pairsLeftIris = [[474, 475], [475, 476], [476, 477], [477, 474]]; -var pairsRightEye = [[33, 7], [7, 163], [163, 144], [144, 145], [145, 153], [153, 154], [154, 155], [155, 133], [33, 246], [246, 161], [161, 160], [160, 159], [159, 158], [158, 157], [157, 173], [173, 133]]; -var pairsRightEyebrow = [[46, 53], [53, 52], [52, 65], [65, 55], [70, 63], [63, 105], [105, 66], [66, 107]]; -var pairsRightIris = [[469, 470], [470, 471], [471, 472], [472, 469]]; -var pairsFaceContour = [ - [10, 338], - [338, 297], - [297, 332], - [332, 284], - [284, 251], - [251, 389], - [389, 356], - [356, 454], - [454, 323], - [323, 361], - [361, 288], - [288, 397], - [397, 365], - [365, 379], - [379, 378], - [378, 400], - [400, 377], - [377, 152], - [152, 148], - [148, 176], - [176, 149], - [149, 150], - [150, 136], - [136, 172], - [172, 58], - [58, 132], - [132, 93], - [93, 234], - [234, 127], - [127, 162], - [162, 21], - [21, 54], - [54, 103], - [103, 67], - [67, 109], - [109, 10] -]; -var contourKeypoints = { - lips: connectionsToIndices(pairsLips), - leftEye: connectionsToIndices(pairsLeftEye), - leftEyebrow: connectionsToIndices(pairsLeftEyebrow), - leftIris: connectionsToIndices(pairsLeftIris), - rightEye: connectionsToIndices(pairsRightEye), - rightEyebrow: connectionsToIndices(pairsRightEyebrow), - rightIris: connectionsToIndices(pairsRightIris), - faceOval: connectionsToIndices(pairsFaceContour) -}; - -// src/tfjs/constants.ts -var tf6 = __toESM(require_tfjs_esm()); -var constants = { - tf255: 255, - tf1: 1, - tf2: 2, - tf05: 0.5, - tf127: 127.5, - rgb: [0.2989, 0.587, 0.114] -}; -function init() { - constants.tf255 = tf6.scalar(255, "float32"); - constants.tf1 = tf6.scalar(1, "float32"); - constants.tf2 = tf6.scalar(2, "float32"); - constants.tf05 = tf6.scalar(0.5, "float32"); - constants.tf127 = tf6.scalar(127.5, "float32"); - constants.rgb = tf6.tensor1d([0.2989, 0.587, 0.114], "float32"); -} - -// src/face/facemeshutil.ts -var getBoxSize = (box) => [Math.abs(box.endPoint[0] - box.startPoint[0]), Math.abs(box.endPoint[1] - box.startPoint[1])]; -var getBoxCenter = (box) => [box.startPoint[0] + (box.endPoint[0] - box.startPoint[0]) / 2, box.startPoint[1] + (box.endPoint[1] - box.startPoint[1]) / 2, 1]; -var clampBox = (box, input) => box ? [ - Math.trunc(Math.max(0, box.startPoint[0])), - Math.trunc(Math.max(0, box.startPoint[1])), - Math.trunc(Math.min(input.shape[2] || 0, box.endPoint[0]) - Math.max(0, box.startPoint[0])), - Math.trunc(Math.min(input.shape[1] || 0, box.endPoint[1]) - Math.max(0, box.startPoint[1])) -] : [0, 0, 0, 0]; -var getRawBox = (box, input) => box ? [ - box.startPoint[0] / (input.shape[2] || 0), - box.startPoint[1] / (input.shape[1] || 0), - (box.endPoint[0] - box.startPoint[0]) / (input.shape[2] || 0), - (box.endPoint[1] - box.startPoint[1]) / (input.shape[1] || 0) -] : [0, 0, 0, 0]; -var scaleBoxCoordinates = (box, factor) => { - const startPoint = [box.startPoint[0] * factor[0], box.startPoint[1] * factor[1]]; - const endPoint = [box.endPoint[0] * factor[0], box.endPoint[1] * factor[1]]; - return { startPoint, endPoint, landmarks: box.landmarks, confidence: box.confidence }; -}; -var cutAndResize = (box, image27, cropSize) => { - const h = image27.shape[1]; - const w = image27.shape[2]; - const cutBox = [box.startPoint[1] / h, box.startPoint[0] / w, box.endPoint[1] / h, box.endPoint[0] / w]; - const crop = tf7.image.cropAndResize(image27, [cutBox], [0], cropSize); - const norm = tf7.div(crop, constants.tf255); - tf7.dispose(crop); - return norm; -}; -var enlargeBox = (box, factor) => { - const center = getBoxCenter(box); - const size2 = getBoxSize(box); - const halfSize = [factor * size2[0] / 2, factor * size2[1] / 2]; - return { startPoint: [center[0] - halfSize[0], center[1] - halfSize[1]], endPoint: [center[0] + halfSize[0], center[1] + halfSize[1]], landmarks: box.landmarks, confidence: box.confidence }; -}; -var squarifyBox = (box) => { - const centers = getBoxCenter(box); - const size2 = getBoxSize(box); - const halfSize = Math.max(...size2) / 2; - return { startPoint: [Math.round(centers[0] - halfSize), Math.round(centers[1] - halfSize)], endPoint: [Math.round(centers[0] + halfSize), Math.round(centers[1] + halfSize)], landmarks: box.landmarks, confidence: box.confidence }; -}; -var calculateLandmarksBoundingBox = (landmarks) => { - const x = landmarks.map((d) => d[0]); - const y = landmarks.map((d) => d[1]); - return { startPoint: [Math.min(...x), Math.min(...y)], endPoint: [Math.max(...x), Math.max(...y)], landmarks }; -}; -var fixedRotationMatrix = [[1, 0, 0], [0, 1, 0], [0, 0, 1]]; -var normalizeRadians = (angle) => angle - 2 * Math.PI * Math.floor((angle + Math.PI) / (2 * Math.PI)); -var computeRotation = (point1, point2) => normalizeRadians(Math.PI / 2 - Math.atan2(-(point2[1] - point1[1]), point2[0] - point1[0])); -var buildTranslationMatrix = (x, y) => [[1, 0, x], [0, 1, y], [0, 0, 1]]; -var dot = (v1, v2) => { - let product = 0; - for (let i = 0; i < v1.length; i++) - product += v1[i] * v2[i]; - return product; -}; -var getColumnFrom2DArr = (arr, columnIndex) => { - const column = []; - for (let i = 0; i < arr.length; i++) - column.push(arr[i][columnIndex]); - return column; -}; -var multiplyTransformMatrices = (mat1, mat2) => { - const product = []; - const size2 = mat1.length; - for (let row = 0; row < size2; row++) { - product.push([]); - for (let col = 0; col < size2; col++) - product[row].push(dot(mat1[row], getColumnFrom2DArr(mat2, col))); - } - return product; -}; -var buildRotationMatrix = (rotation, center) => { - const cosA = Math.cos(rotation); - const sinA = Math.sin(rotation); - const rotationMatrix = [[cosA, -sinA, 0], [sinA, cosA, 0], [0, 0, 1]]; - const translationMatrix = buildTranslationMatrix(center[0], center[1]); - const translationTimesRotation = multiplyTransformMatrices(translationMatrix, rotationMatrix); - const negativeTranslationMatrix = buildTranslationMatrix(-center[0], -center[1]); - return multiplyTransformMatrices(translationTimesRotation, negativeTranslationMatrix); -}; -var invertTransformMatrix = (matrix) => { - const rotationComponent = [[matrix[0][0], matrix[1][0]], [matrix[0][1], matrix[1][1]]]; - const translationComponent = [matrix[0][2], matrix[1][2]]; - const invertedTranslation = [-dot(rotationComponent[0], translationComponent), -dot(rotationComponent[1], translationComponent)]; - return [rotationComponent[0].concat(invertedTranslation[0]), rotationComponent[1].concat(invertedTranslation[1]), [0, 0, 1]]; -}; -var rotatePoint = (homogeneousCoordinate, rotationMatrix) => [dot(homogeneousCoordinate, rotationMatrix[0]), dot(homogeneousCoordinate, rotationMatrix[1])]; -function generateAnchors(inputSize10) { - const spec = inputSize10 === 192 ? { strides: [4], anchors: [1] } : { strides: [inputSize10 / 16, inputSize10 / 8], anchors: [2, 6] }; - const anchors3 = []; - for (let i = 0; i < spec.strides.length; i++) { - const stride = spec.strides[i]; - const gridRows = Math.floor((inputSize10 + stride - 1) / stride); - const gridCols = Math.floor((inputSize10 + stride - 1) / stride); - const anchorsNum = spec.anchors[i]; - for (let gridY = 0; gridY < gridRows; gridY++) { - const anchorY = stride * (gridY + 0.5); - for (let gridX = 0; gridX < gridCols; gridX++) { - const anchorX = stride * (gridX + 0.5); - for (let n = 0; n < anchorsNum; n++) - anchors3.push([anchorX, anchorY]); - } - } - } - return anchors3; -} -function transformRawCoords(coordsRaw, box, angle, rotationMatrix, inputSize10) { - const boxSize = getBoxSize(box); - const coordsScaled = coordsRaw.map((coord) => [ - boxSize[0] / inputSize10 * (coord[0] - inputSize10 / 2), - boxSize[1] / inputSize10 * (coord[1] - inputSize10 / 2), - coord[2] || 0 - ]); - const largeAngle = angle && angle !== 0 && Math.abs(angle) > 0.2; - const coordsRotationMatrix = largeAngle ? buildRotationMatrix(angle, [0, 0]) : fixedRotationMatrix; - const coordsRotated = largeAngle ? coordsScaled.map((coord) => [...rotatePoint(coord, coordsRotationMatrix), coord[2]]) : coordsScaled; - const inverseRotationMatrix = largeAngle ? invertTransformMatrix(rotationMatrix) : fixedRotationMatrix; - const boxCenter = getBoxCenter(box); - const offsets = [dot(boxCenter, inverseRotationMatrix[0]), dot(boxCenter, inverseRotationMatrix[1])]; - return coordsRotated.map((coord) => [ - Math.trunc(coord[0] + offsets[0]), - Math.trunc(coord[1] + offsets[1]), - Math.trunc(coord[2] || 0) - ]); -} -function correctFaceRotation(rotate, box, input, inputSize10) { - const symmetryLine = box.landmarks.length >= meshLandmarks.count ? meshLandmarks.symmetryLine : blazeFaceLandmarks.symmetryLine; - let angle = 0; - let rotationMatrix = fixedRotationMatrix; - let face4; - if (rotate && env.kernels.includes("rotatewithoffset")) { - angle = computeRotation(box.landmarks[symmetryLine[0]], box.landmarks[symmetryLine[1]]); - const largeAngle = angle && angle !== 0 && Math.abs(angle) > 0.2; - if (largeAngle) { - const center = getBoxCenter(box); - const centerRaw = [center[0] / input.shape[2], center[1] / input.shape[1]]; - const rotated = tf7.image.rotateWithOffset(input, angle, 0, centerRaw); - rotationMatrix = buildRotationMatrix(-angle, center); - face4 = cutAndResize(box, rotated, [inputSize10, inputSize10]); - tf7.dispose(rotated); - } else { - face4 = cutAndResize(box, input, [inputSize10, inputSize10]); - } - } else { - face4 = cutAndResize(box, input, [inputSize10, inputSize10]); - } - return [angle, rotationMatrix, face4]; -} -var findFaceCenter = (mesh) => { - const x = mesh.map((m) => m[0]); - const y = mesh.map((m) => m[1]); - return [Math.min(...x) + (Math.max(...x) - Math.min(...x)) / 2, Math.min(...y) + (Math.max(...y) - Math.min(...y)) / 2]; -}; -var calculateFaceBox = (mesh, previousBox) => { - const center = findFaceCenter(mesh); - const boxSize = getBoxSize(previousBox); - const calculatedBox = { - startPoint: [center[0] - boxSize[0] / 2, center[1] - boxSize[1] / 2], - endPoint: [center[0] + boxSize[0] / 2, center[1] + boxSize[1] / 2] - }; - return calculatedBox; -}; - -// src/face/blazeface.ts -var keypointsCount = 6; -var faceBoxScaleFactor = 1.4; -var model2; -var anchors = null; -var inputSize = 0; -var inputSizeT = null; -var size = () => inputSize; -async function load2(config3) { - var _a; - if (env.initial) - model2 = null; - if (!model2) - model2 = await loadModel((_a = config3.face.detector) == null ? void 0 : _a.modelPath); - else if (config3.debug) - log("cached model:", model2["modelUrl"]); - inputSize = model2["executor"] && model2.inputs[0].shape ? model2.inputs[0].shape[2] : 256; - inputSizeT = tf8.scalar(inputSize, "int32"); - anchors = tf8.tensor2d(generateAnchors(inputSize)); - return model2; -} -function decodeBoxes(boxOutputs) { - const t2 = {}; - t2.boxStarts = tf8.slice(boxOutputs, [0, 1], [-1, 2]); - t2.centers = tf8.add(t2.boxStarts, anchors); - t2.boxSizes = tf8.slice(boxOutputs, [0, 3], [-1, 2]); - t2.boxSizesNormalized = tf8.div(t2.boxSizes, inputSizeT); - t2.centersNormalized = tf8.div(t2.centers, inputSizeT); - t2.halfBoxSize = tf8.div(t2.boxSizesNormalized, constants.tf2); - t2.starts = tf8.sub(t2.centersNormalized, t2.halfBoxSize); - t2.ends = tf8.add(t2.centersNormalized, t2.halfBoxSize); - t2.startNormalized = tf8.mul(t2.starts, inputSizeT); - t2.endNormalized = tf8.mul(t2.ends, inputSizeT); - const boxes = tf8.concat2d([t2.startNormalized, t2.endNormalized], 1); - Object.keys(t2).forEach((tensor6) => tf8.dispose(t2[tensor6])); - return boxes; -} -async function getBoxes(inputImage, config3) { - var _a, _b, _c, _d; - if (!inputImage || inputImage["isDisposedInternal"] || inputImage.shape.length !== 4 || inputImage.shape[1] < 1 || inputImage.shape[2] < 1) - return []; - const t2 = {}; - t2.resized = tf8.image.resizeBilinear(inputImage, [inputSize, inputSize]); - t2.div = tf8.div(t2.resized, constants.tf127); - t2.normalized = tf8.sub(t2.div, constants.tf05); - const res = model2 == null ? void 0 : model2.execute(t2.normalized); - if (Array.isArray(res) && res.length > 2) { - const sorted = res.sort((a, b) => a.size - b.size); - t2.concat384 = tf8.concat([sorted[0], sorted[2]], 2); - t2.concat512 = tf8.concat([sorted[1], sorted[3]], 2); - t2.concat = tf8.concat([t2.concat512, t2.concat384], 1); - t2.batch = tf8.squeeze(t2.concat, 0); - } else if (Array.isArray(res)) { - t2.batch = tf8.squeeze(res[0]); - } else { - t2.batch = tf8.squeeze(res); - } - tf8.dispose(res); - t2.boxes = decodeBoxes(t2.batch); - t2.logits = tf8.slice(t2.batch, [0, 0], [-1, 1]); - t2.sigmoid = tf8.sigmoid(t2.logits); - t2.scores = tf8.squeeze(t2.sigmoid); - t2.nms = await tf8.image.nonMaxSuppressionAsync(t2.boxes, t2.scores, ((_a = config3.face.detector) == null ? void 0 : _a.maxDetected) || 0, ((_b = config3.face.detector) == null ? void 0 : _b.iouThreshold) || 0, ((_c = config3.face.detector) == null ? void 0 : _c.minConfidence) || 0); - const nms = await t2.nms.array(); - const boxes = []; - const scores = await t2.scores.data(); - for (let i = 0; i < nms.length; i++) { - const confidence = scores[nms[i]]; - if (confidence > (((_d = config3.face.detector) == null ? void 0 : _d.minConfidence) || 0)) { - const b = {}; - b.bbox = tf8.slice(t2.boxes, [nms[i], 0], [1, -1]); - b.slice = tf8.slice(t2.batch, [nms[i], keypointsCount - 1], [1, -1]); - b.squeeze = tf8.squeeze(b.slice); - b.landmarks = tf8.reshape(b.squeeze, [keypointsCount, -1]); - const points = await b.bbox.data(); - const rawBox = { - startPoint: [points[0], points[1]], - endPoint: [points[2], points[3]], - landmarks: await b.landmarks.array(), - confidence - }; - const scaledBox = scaleBoxCoordinates(rawBox, [(inputImage.shape[2] || 0) / inputSize, (inputImage.shape[1] || 0) / inputSize]); - const enlargedBox = enlargeBox(scaledBox, config3.face["scale"] || faceBoxScaleFactor); - const squaredBox = squarifyBox(enlargedBox); - boxes.push(squaredBox); - Object.keys(b).forEach((tensor6) => tf8.dispose(b[tensor6])); - } - } - Object.keys(t2).forEach((tensor6) => tf8.dispose(t2[tensor6])); - return boxes; -} - -// src/body/blazepose.ts -var tf10 = __toESM(require_tfjs_esm()); - -// src/body/blazeposecoords.ts -var blazeposecoords_exports = {}; -__export(blazeposecoords_exports, { - connected: () => connected, - kpt: () => kpt -}); -var kpt = [ - "nose", - "leftEyeInside", - "leftEye", - "leftEyeOutside", - "rightEyeInside", - "rightEye", - "rightEyeOutside", - "leftEar", - "rightEar", - "leftMouth", - "rightMouth", - "leftShoulder", - "rightShoulder", - "leftElbow", - "rightElbow", - "leftWrist", - "rightWrist", - "leftPinky", - "rightPinky", - "leftIndex", - "rightIndex", - "leftThumb", - "rightThumb", - "leftHip", - "rightHip", - "leftKnee", - "rightKnee", - "leftAnkle", - "rightAnkle", - "leftHeel", - "rightHeel", - "leftFoot", - "rightFoot", - "bodyCenter", - "bodyTop", - "leftPalm", - "leftHand", - "rightPalm", - "rightHand" -]; -var connected = { - shoulders: ["leftShoulder", "rightShoulder"], - hips: ["rightHip", "leftHip"], - mouth: ["leftMouth", "rightMouth"], - leftLegUpper: ["leftHip", "leftKnee"], - leftLegLower: ["leftKnee", "leftAnkle"], - leftFoot: ["leftAnkle", "leftHeel", "leftFoot"], - leftTorso: ["leftShoulder", "leftHip"], - leftArmUpper: ["leftShoulder", "leftElbow"], - leftArmLower: ["leftElbow", "leftWrist"], - leftHand: ["leftWrist", "leftPalm"], - leftHandPinky: ["leftPalm", "leftPinky"], - leftHandIndex: ["leftPalm", "leftIndex"], - leftHandThumb: ["leftPalm", "leftThumb"], - leftEyeOutline: ["leftEyeInside", "leftEyeOutside"], - rightLegUpper: ["rightHip", "rightKnee"], - rightLegLower: ["rightKnee", "rightAnkle"], - rightFoot: ["rightAnkle", "rightHeel", "rightFoot"], - rightTorso: ["rightShoulder", "rightHip"], - rightArmUpper: ["rightShoulder", "rightElbow"], - rightArmLower: ["rightElbow", "rightWrist"], - rightHand: ["rightWrist", "rightPalm"], - rightHandPinky: ["rightPalm", "rightPinky"], - rightHandIndex: ["rightPalm", "rightIndex"], - rightHandThumb: ["rightPalm", "rightThumb"], - rightEyeOutline: ["rightEyeInside", "rightEyeOutside"] -}; - -// src/body/blazeposedetector.ts -var tf9 = __toESM(require_tfjs_esm()); -var inputSize2 = 224; -var anchorTensor; -var numLayers = 5; -var strides = [8, 16, 32, 32, 32]; -function createAnchors() { - const anchors3 = []; - let layerId = 0; - while (layerId < numLayers) { - let anchorCount = 0; - let lastSameStrideLayer = layerId; - while (lastSameStrideLayer < strides.length && strides[lastSameStrideLayer] === strides[layerId]) { - anchorCount += 2; - lastSameStrideLayer++; - } - const stride = strides[layerId]; - const featureMapHeight = Math.ceil(inputSize2 / stride); - const featureMapWidth = Math.ceil(inputSize2 / stride); - for (let y = 0; y < featureMapHeight; ++y) { - for (let x = 0; x < featureMapWidth; ++x) { - for (let anchorId = 0; anchorId < anchorCount; ++anchorId) { - anchors3.push({ x: (x + 0.5) / featureMapWidth, y: (y + 0.5) / featureMapHeight }); - } - } - } - layerId = lastSameStrideLayer; - } - anchorTensor = { x: tf9.tensor1d(anchors3.map((a) => a.x)), y: tf9.tensor1d(anchors3.map((a) => a.y)) }; -} - -// src/util/box.ts -function calc(keypoints, outputSize2 = [1, 1]) { - const coords = [keypoints.map((pt) => pt[0]), keypoints.map((pt) => pt[1])]; - const min2 = [Math.min(...coords[0]), Math.min(...coords[1])]; - const max4 = [Math.max(...coords[0]), Math.max(...coords[1])]; - const box = [min2[0], min2[1], max4[0] - min2[0], max4[1] - min2[1]]; - const boxRaw = [box[0] / outputSize2[0], box[1] / outputSize2[1], box[2] / outputSize2[0], box[3] / outputSize2[1]]; - return { box, boxRaw }; -} -function square(keypoints, outputSize2 = [1, 1]) { - const coords = [keypoints.map((pt) => pt[0]), keypoints.map((pt) => pt[1])]; - const min2 = [Math.min(...coords[0]), Math.min(...coords[1])]; - const max4 = [Math.max(...coords[0]), Math.max(...coords[1])]; - const center = [(min2[0] + max4[0]) / 2, (min2[1] + max4[1]) / 2]; - const dist = Math.max(center[0] - min2[0], center[1] - min2[1], -center[0] + max4[0], -center[1] + max4[1]); - const box = [Math.trunc(center[0] - dist), Math.trunc(center[1] - dist), Math.trunc(2 * dist), Math.trunc(2 * dist)]; - const boxRaw = [box[0] / outputSize2[0], box[1] / outputSize2[1], box[2] / outputSize2[0], box[3] / outputSize2[1]]; - return { box, boxRaw }; -} -function scale(box, scaleFact) { - const dist = [box[2] * scaleFact, box[3] * scaleFact]; - const newBox = [ - box[0] - (dist[0] - box[2]) / 2, - box[1] - (dist[1] - box[3]) / 2, - dist[0], - dist[1] - ]; - return newBox; -} - -// src/body/blazepose.ts -var env3 = { initial: true }; -var models2 = { detector: null, landmarks: null }; -var inputSize3 = { detector: [224, 224], landmarks: [256, 256] }; -var skipped2 = Number.MAX_SAFE_INTEGER; -var outputNodes = { - landmarks: ["ld_3d", "activation_segmentation", "activation_heatmap", "world_3d", "output_poseflag"], - detector: [] -}; -var cache = null; -var cropBox; -var padding = [[0, 0], [0, 0], [0, 0], [0, 0]]; -var lastTime2 = 0; -var sigmoid3 = (x) => 1 - 1 / (1 + Math.exp(x)); -async function loadDetect(config3) { - var _a; - if (env3.initial) - models2.detector = null; - if (!models2.detector && config3.body["detector"] && config3.body["detector"].modelPath || "") { - models2.detector = await loadModel(config3.body["detector"].modelPath); - const inputs = ((_a = models2.detector) == null ? void 0 : _a["executor"]) ? Object.values(models2.detector.modelSignature["inputs"]) : void 0; - inputSize3.detector[0] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[1].size) : 0; - inputSize3.detector[1] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : 0; - } else if (config3.debug && models2.detector) - log("cached model:", models2.detector["modelUrl"]); - createAnchors(); - return models2.detector; -} -async function loadPose(config3) { - var _a; - if (env3.initial) - models2.landmarks = null; - if (!models2.landmarks) { - models2.landmarks = await loadModel(config3.body.modelPath); - const inputs = ((_a = models2.landmarks) == null ? void 0 : _a["executor"]) ? Object.values(models2.landmarks.modelSignature["inputs"]) : void 0; - inputSize3.landmarks[0] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[1].size) : 0; - inputSize3.landmarks[1] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : 0; - } else if (config3.debug) - log("cached model:", models2.landmarks["modelUrl"]); - return models2.landmarks; -} -function prepareImage(input, size2) { - var _a, _b; - const t2 = {}; - if (!((_a = input == null ? void 0 : input.shape) == null ? void 0 : _a[1]) || !((_b = input == null ? void 0 : input.shape) == null ? void 0 : _b[2])) - return input; - let final; - if (cropBox) { - t2.cropped = tf10.image.cropAndResize(input, [cropBox], [0], [input.shape[1], input.shape[2]]); - } - if (input.shape[1] !== input.shape[2]) { - const height = [ - input.shape[2] > input.shape[1] ? Math.trunc((input.shape[2] - input.shape[1]) / 2) : 0, - input.shape[2] > input.shape[1] ? Math.trunc((input.shape[2] - input.shape[1]) / 2) : 0 - ]; - const width = [ - input.shape[1] > input.shape[2] ? Math.trunc((input.shape[1] - input.shape[2]) / 2) : 0, - input.shape[1] > input.shape[2] ? Math.trunc((input.shape[1] - input.shape[2]) / 2) : 0 - ]; - padding = [ - [0, 0], - height, - width, - [0, 0] - ]; - t2.pad = tf10.pad(t2.cropped || input, padding); - t2.resize = tf10.image.resizeBilinear(t2.pad, [size2, size2]); - final = tf10.div(t2.resize, constants.tf255); - } else if (input.shape[1] !== size2) { - t2.resize = tf10.image.resizeBilinear(t2.cropped || input, [size2, size2]); - final = tf10.div(t2.resize, constants.tf255); - } else { - final = tf10.div(t2.cropped || input, constants.tf255); - } - Object.keys(t2).forEach((tensor6) => tf10.dispose(t2[tensor6])); - return final; -} -function rescaleKeypoints(keypoints, outputSize2) { - for (const kpt4 of keypoints) { - kpt4.position = [ - Math.trunc(kpt4.position[0] * (outputSize2[0] + padding[2][0] + padding[2][1]) / outputSize2[0] - padding[2][0]), - Math.trunc(kpt4.position[1] * (outputSize2[1] + padding[1][0] + padding[1][1]) / outputSize2[1] - padding[1][0]), - kpt4.position[2] - ]; - kpt4.positionRaw = [kpt4.position[0] / outputSize2[0], kpt4.position[1] / outputSize2[1], 2 * kpt4.position[2] / (outputSize2[0] + outputSize2[1])]; - } - if (cropBox) { - for (const kpt4 of keypoints) { - kpt4.positionRaw = [ - kpt4.positionRaw[0] + cropBox[1], - kpt4.positionRaw[1] + cropBox[0], - kpt4.positionRaw[2] - ]; - kpt4.position = [ - Math.trunc(kpt4.positionRaw[0] * outputSize2[0]), - Math.trunc(kpt4.positionRaw[1] * outputSize2[1]), - kpt4.positionRaw[2] - ]; - } - } - return keypoints; -} -function fixKeypoints(keypoints) { - const leftPalm = keypoints.find((k) => k.part === "leftPalm"); - const leftWrist = keypoints.find((k) => k.part === "leftWrist"); - const leftIndex = keypoints.find((k) => k.part === "leftIndex"); - leftPalm.position[2] = ((leftWrist.position[2] || 0) + (leftIndex.position[2] || 0)) / 2; - const rightPalm = keypoints.find((k) => k.part === "rightPalm"); - const rightWrist = keypoints.find((k) => k.part === "rightWrist"); - const rightIndex = keypoints.find((k) => k.part === "rightIndex"); - rightPalm.position[2] = ((rightWrist.position[2] || 0) + (rightIndex.position[2] || 0)) / 2; -} -async function detectLandmarks(input, config3, outputSize2) { - var _a, _b; - if (!((_a = models2.landmarks) == null ? void 0 : _a["executor"])) - return null; - const t2 = {}; - [t2.ld, t2.segmentation, t2.heatmap, t2.world, t2.poseflag] = (_b = models2.landmarks) == null ? void 0 : _b.execute(input, outputNodes.landmarks); - const poseScore = (await t2.poseflag.data())[0]; - const points = await t2.ld.data(); - const distances = await t2.world.data(); - Object.keys(t2).forEach((tensor6) => tf10.dispose(t2[tensor6])); - const keypointsRelative = []; - const depth = 5; - for (let i = 0; i < points.length / depth; i++) { - const score = sigmoid3(points[depth * i + 3]); - const presence = sigmoid3(points[depth * i + 4]); - const adjScore = Math.trunc(100 * score * presence * poseScore) / 100; - const positionRaw = [points[depth * i + 0] / inputSize3.landmarks[0], points[depth * i + 1] / inputSize3.landmarks[1], points[depth * i + 2] + 0]; - const position = [Math.trunc(outputSize2[0] * positionRaw[0]), Math.trunc(outputSize2[1] * positionRaw[1]), positionRaw[2]]; - const distance2 = [distances[depth * i + 0], distances[depth * i + 1], distances[depth * i + 2] + 0]; - keypointsRelative.push({ part: kpt[i], positionRaw, position, distance: distance2, score: adjScore }); - } - if (poseScore < (config3.body.minConfidence || 0)) - return null; - fixKeypoints(keypointsRelative); - const keypoints = rescaleKeypoints(keypointsRelative, outputSize2); - const kpts = keypoints.map((k) => k.position); - const boxes = calc(kpts, [outputSize2[0], outputSize2[1]]); - const annotations2 = {}; - for (const [name, indexes] of Object.entries(connected)) { - const pt = []; - for (let i = 0; i < indexes.length - 1; i++) { - const pt0 = keypoints.find((kpt4) => kpt4.part === indexes[i]); - const pt1 = keypoints.find((kpt4) => kpt4.part === indexes[i + 1]); - if (pt0 && pt1) - pt.push([pt0.position, pt1.position]); - } - annotations2[name] = pt; - } - const body4 = { id: 0, score: Math.trunc(100 * poseScore) / 100, box: boxes.box, boxRaw: boxes.boxRaw, keypoints, annotations: annotations2 }; - return body4; -} -async function predict2(input, config3) { - const outputSize2 = [input.shape[2] || 0, input.shape[1] || 0]; - const skipTime = (config3.body.skipTime || 0) > now() - lastTime2; - const skipFrame = skipped2 < (config3.body.skipFrames || 0); - if (config3.skipAllowed && skipTime && skipFrame && cache !== null) { - skipped2++; - } else { - const t2 = {}; - t2.landmarks = prepareImage(input, 256); - cache = await detectLandmarks(t2.landmarks, config3, outputSize2); - Object.keys(t2).forEach((tensor6) => tf10.dispose(t2[tensor6])); - lastTime2 = now(); - skipped2 = 0; - } - return cache ? [cache] : []; -} - -// src/object/centernet.ts -var tf11 = __toESM(require_tfjs_esm()); - -// src/object/labels.ts -var labels = [ - { class: 1, label: "person" }, - { class: 2, label: "bicycle" }, - { class: 3, label: "car" }, - { class: 4, label: "motorcycle" }, - { class: 5, label: "airplane" }, - { class: 6, label: "bus" }, - { class: 7, label: "train" }, - { class: 8, label: "truck" }, - { class: 9, label: "boat" }, - { class: 10, label: "traffic light" }, - { class: 11, label: "fire hydrant" }, - { class: 12, label: "stop sign" }, - { class: 13, label: "parking meter" }, - { class: 14, label: "bench" }, - { class: 15, label: "bird" }, - { class: 16, label: "cat" }, - { class: 17, label: "dog" }, - { class: 18, label: "horse" }, - { class: 19, label: "sheep" }, - { class: 20, label: "cow" }, - { class: 21, label: "elephant" }, - { class: 22, label: "bear" }, - { class: 23, label: "zebra" }, - { class: 24, label: "giraffe" }, - { class: 25, label: "backpack" }, - { class: 26, label: "umbrella" }, - { class: 27, label: "handbag" }, - { class: 28, label: "tie" }, - { class: 29, label: "suitcase" }, - { class: 30, label: "frisbee" }, - { class: 31, label: "skis" }, - { class: 32, label: "snowboard" }, - { class: 33, label: "sports ball" }, - { class: 34, label: "kite" }, - { class: 35, label: "baseball bat" }, - { class: 36, label: "baseball glove" }, - { class: 37, label: "skateboard" }, - { class: 38, label: "surfboard" }, - { class: 39, label: "tennis racket" }, - { class: 40, label: "bottle" }, - { class: 41, label: "wine glass" }, - { class: 42, label: "cup" }, - { class: 43, label: "fork" }, - { class: 44, label: "knife" }, - { class: 45, label: "spoon" }, - { class: 46, label: "bowl" }, - { class: 47, label: "banana" }, - { class: 48, label: "apple" }, - { class: 49, label: "sandwich" }, - { class: 50, label: "orange" }, - { class: 51, label: "broccoli" }, - { class: 52, label: "carrot" }, - { class: 53, label: "hot dog" }, - { class: 54, label: "pizza" }, - { class: 55, label: "donut" }, - { class: 56, label: "cake" }, - { class: 57, label: "chair" }, - { class: 58, label: "couch" }, - { class: 59, label: "potted plant" }, - { class: 60, label: "bed" }, - { class: 61, label: "dining table" }, - { class: 62, label: "toilet" }, - { class: 63, label: "tv" }, - { class: 64, label: "laptop" }, - { class: 65, label: "mouse" }, - { class: 66, label: "remote" }, - { class: 67, label: "keyboard" }, - { class: 68, label: "cell phone" }, - { class: 69, label: "microwave" }, - { class: 70, label: "oven" }, - { class: 71, label: "toaster" }, - { class: 72, label: "sink" }, - { class: 73, label: "refrigerator" }, - { class: 74, label: "book" }, - { class: 75, label: "clock" }, - { class: 76, label: "vase" }, - { class: 77, label: "scissors" }, - { class: 78, label: "teddy bear" }, - { class: 79, label: "hair drier" }, - { class: 80, label: "toothbrush" } -]; - -// src/object/centernet.ts -var model3; -var inputSize4 = 0; -var last2 = []; -var lastTime3 = 0; -var skipped3 = Number.MAX_SAFE_INTEGER; -async function load3(config3) { - if (env.initial) - model3 = null; - if (!model3) { - model3 = await loadModel(config3.object.modelPath); - const inputs = (model3 == null ? void 0 : model3["executor"]) ? Object.values(model3.modelSignature["inputs"]) : void 0; - inputSize4 = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : 0; - } else if (config3.debug) - log("cached model:", model3["modelUrl"]); - return model3; -} -async function process3(res, outputShape, config3) { - if (!res) - return []; - const t2 = {}; - const results = []; - const detections = await res.array(); - t2.squeeze = tf11.squeeze(res); - const arr = tf11.split(t2.squeeze, 6, 1); - t2.stack = tf11.stack([arr[1], arr[0], arr[3], arr[2]], 1); - t2.boxes = tf11.squeeze(t2.stack); - t2.scores = tf11.squeeze(arr[4]); - t2.classes = tf11.squeeze(arr[5]); - tf11.dispose([res, ...arr]); - t2.nms = await tf11.image.nonMaxSuppressionAsync(t2.boxes, t2.scores, config3.object.maxDetected, config3.object.iouThreshold, config3.object.minConfidence || 0); - const nms = await t2.nms.data(); - let i = 0; - for (const id of Array.from(nms)) { - const score = Math.trunc(100 * detections[0][id][4]) / 100; - const classVal = detections[0][id][5]; - if (Number.isNaN(classVal)) - continue; - const label = labels[classVal].label; - const [x, y] = [ - detections[0][id][0] / inputSize4, - detections[0][id][1] / inputSize4 - ]; - const boxRaw = [ - x, - y, - detections[0][id][2] / inputSize4 - x, - detections[0][id][3] / inputSize4 - y - ]; - const box = [ - Math.trunc(boxRaw[0] * outputShape[0]), - Math.trunc(boxRaw[1] * outputShape[1]), - Math.trunc(boxRaw[2] * outputShape[0]), - Math.trunc(boxRaw[3] * outputShape[1]) - ]; - results.push({ id: i++, score, class: classVal, label, box, boxRaw }); - } - Object.keys(t2).forEach((tensor6) => tf11.dispose(t2[tensor6])); - return results; -} -async function predict3(input, config3) { - if (!(model3 == null ? void 0 : model3["executor"])) - return []; - const skipTime = (config3.object.skipTime || 0) > now() - lastTime3; - const skipFrame = skipped3 < (config3.object.skipFrames || 0); - if (config3.skipAllowed && skipTime && skipFrame && last2.length > 0) { - skipped3++; - return last2; - } - skipped3 = 0; - return new Promise(async (resolve) => { - const outputSize2 = [input.shape[2] || 0, input.shape[1] || 0]; - const resize = tf11.image.resizeBilinear(input, [inputSize4, inputSize4]); - const objectT = config3.object.enabled ? model3 == null ? void 0 : model3.execute(resize, ["tower_0/detections"]) : null; - lastTime3 = now(); - tf11.dispose(resize); - const obj = await process3(objectT, outputSize2, config3); - last2 = obj; - resolve(obj); - }); -} - -// src/body/efficientpose.ts -var tf12 = __toESM(require_tfjs_esm()); - -// src/body/efficientposecoords.ts -var efficientposecoords_exports = {}; -__export(efficientposecoords_exports, { - connected: () => connected2, - kpt: () => kpt2 -}); -var kpt2 = [ - "head", - "neck", - "rightShoulder", - "rightElbow", - "rightWrist", - "chest", - "leftShoulder", - "leftElbow", - "leftWrist", - "bodyCenter", - "rightHip", - "rightKnee", - "rightAnkle", - "leftHip", - "leftKnee", - "leftAnkle" -]; -var connected2 = { - leftLeg: ["leftHip", "leftKnee", "leftAnkle"], - rightLeg: ["rightHip", "rightKnee", "rightAnkle"], - torso: ["leftShoulder", "rightShoulder", "rightHip", "leftHip", "leftShoulder"], - leftArm: ["leftShoulder", "leftElbow", "leftWrist"], - rightArm: ["rightShoulder", "rightElbow", "rightWrist"], - head: [] -}; - -// src/body/efficientpose.ts -var model4; -var lastTime4 = 0; -var cache2 = { id: 0, keypoints: [], box: [0, 0, 0, 0], boxRaw: [0, 0, 0, 0], score: 0, annotations: {} }; -var skipped4 = Number.MAX_SAFE_INTEGER; -async function load4(config3) { - if (env.initial) - model4 = null; - if (!model4) - model4 = await loadModel(config3.body.modelPath); - else if (config3.debug) - log("cached model:", model4["modelUrl"]); - return model4; -} -async function max2d(inputs, minScore) { - const [width, height] = inputs.shape; - const reshaped = tf12.reshape(inputs, [height * width]); - const max4 = tf12.max(reshaped, 0); - const newScore = (await max4.data())[0]; - if (newScore > minScore) { - const coordinates = tf12.argMax(reshaped, 0); - const mod3 = tf12.mod(coordinates, width); - const x = (await mod3.data())[0]; - const div16 = tf12.div(coordinates, width); - const y = (await div16.data())[0]; - tf12.dispose([reshaped, max4, coordinates, mod3, div16]); - return [x, y, newScore]; - } - tf12.dispose([reshaped, max4]); - return [0, 0, newScore]; -} -async function predict4(image27, config3) { - if (!(model4 == null ? void 0 : model4["executor"])) - return []; - const skipTime = (config3.body.skipTime || 0) > now() - lastTime4; - const skipFrame = skipped4 < (config3.body.skipFrames || 0); - if (config3.skipAllowed && skipTime && skipFrame && Object.keys(cache2.keypoints).length > 0) { - skipped4++; - return [cache2]; - } - skipped4 = 0; - return new Promise(async (resolve) => { - const tensor6 = tf12.tidy(() => { - if (!(model4 == null ? void 0 : model4.inputs[0].shape)) - return null; - const resize = tf12.image.resizeBilinear(image27, [model4.inputs[0].shape[2], model4.inputs[0].shape[1]], false); - const enhance2 = tf12.mul(resize, constants.tf2); - const norm = tf12.sub(enhance2, constants.tf1); - return norm; - }); - let resT; - if (config3.body.enabled) - resT = model4 == null ? void 0 : model4.execute(tensor6); - lastTime4 = now(); - tf12.dispose(tensor6); - if (resT) { - cache2.keypoints.length = 0; - const squeeze14 = tf12.squeeze(resT); - tf12.dispose(resT); - const stack5 = tf12.unstack(squeeze14, 2); - tf12.dispose(squeeze14); - for (let id = 0; id < stack5.length; id++) { - const [x2, y2, partScore] = await max2d(stack5[id], config3.body.minConfidence); - if (partScore > (config3.body.minConfidence || 0)) { - cache2.keypoints.push({ - score: Math.round(100 * partScore) / 100, - part: kpt2[id], - positionRaw: [ - x2 / model4.inputs[0].shape[2], - y2 / model4.inputs[0].shape[1] - ], - position: [ - Math.round(image27.shape[2] * x2 / model4.inputs[0].shape[2]), - Math.round(image27.shape[1] * y2 / model4.inputs[0].shape[1]) - ] - }); - } - } - stack5.forEach((s) => tf12.dispose(s)); - } - cache2.score = cache2.keypoints.reduce((prev, curr) => curr.score > prev ? curr.score : prev, 0); - const x = cache2.keypoints.map((a) => a.position[0]); - const y = cache2.keypoints.map((a) => a.position[1]); - cache2.box = [ - Math.min(...x), - Math.min(...y), - Math.max(...x) - Math.min(...x), - Math.max(...y) - Math.min(...y) - ]; - const xRaw = cache2.keypoints.map((a) => a.positionRaw[0]); - const yRaw = cache2.keypoints.map((a) => a.positionRaw[1]); - cache2.boxRaw = [ - Math.min(...xRaw), - Math.min(...yRaw), - Math.max(...xRaw) - Math.min(...xRaw), - Math.max(...yRaw) - Math.min(...yRaw) - ]; - for (const [name, indexes] of Object.entries(connected2)) { - const pt = []; - for (let i = 0; i < indexes.length - 1; i++) { - const pt0 = cache2.keypoints.find((kpt4) => kpt4.part === indexes[i]); - const pt1 = cache2.keypoints.find((kpt4) => kpt4.part === indexes[i + 1]); - if (pt0 && pt1 && pt0.score > (config3.body.minConfidence || 0) && pt1.score > (config3.body.minConfidence || 0)) - pt.push([pt0.position, pt1.position]); - } - cache2.annotations[name] = pt; - } - resolve([cache2]); - }); -} - -// src/gear/emotion.ts -var tf13 = __toESM(require_tfjs_esm()); -var annotations = ["angry", "disgust", "fear", "happy", "sad", "surprise", "neutral"]; -var model5; -var last3 = []; -var lastCount2 = 0; -var lastTime5 = 0; -var skipped5 = Number.MAX_SAFE_INTEGER; -async function load5(config3) { - var _a; - if (env.initial) - model5 = null; - if (!model5) - model5 = await loadModel((_a = config3.face.emotion) == null ? void 0 : _a.modelPath); - else if (config3.debug) - log("cached model:", model5["modelUrl"]); - return model5; -} -async function predict5(image27, config3, idx, count2) { - var _a, _b; - if (!model5) - return []; - const skipFrame = skipped5 < (((_a = config3.face.emotion) == null ? void 0 : _a.skipFrames) || 0); - const skipTime = (((_b = config3.face.emotion) == null ? void 0 : _b.skipTime) || 0) > now() - lastTime5; - if (config3.skipAllowed && skipTime && skipFrame && lastCount2 === count2 && last3[idx] && last3[idx].length > 0) { - skipped5++; - return last3[idx]; - } - skipped5 = 0; - return new Promise(async (resolve) => { - var _a2; - const obj = []; - if ((_a2 = config3.face.emotion) == null ? void 0 : _a2.enabled) { - const t2 = {}; - const inputSize10 = (model5 == null ? void 0 : model5.inputs[0].shape) ? model5.inputs[0].shape[2] : 0; - t2.resize = tf13.image.resizeBilinear(image27, [inputSize10, inputSize10], false); - t2.channels = tf13.mul(t2.resize, constants.rgb); - t2.grayscale = tf13.sum(t2.channels, 3, true); - t2.grayscaleSub = tf13.sub(t2.grayscale, constants.tf05); - t2.grayscaleMul = tf13.mul(t2.grayscaleSub, constants.tf2); - t2.emotion = model5 == null ? void 0 : model5.execute(t2.grayscaleMul); - lastTime5 = now(); - const data = await t2.emotion.data(); - for (let i = 0; i < data.length; i++) { - if (data[i] > (config3.face.emotion.minConfidence || 0)) - obj.push({ score: Math.min(0.99, Math.trunc(100 * data[i]) / 100), emotion: annotations[i] }); - } - obj.sort((a, b) => b.score - a.score); - Object.keys(t2).forEach((tensor6) => tf13.dispose(t2[tensor6])); - } - last3[idx] = obj; - lastCount2 = count2; - resolve(obj); - }); -} - -// src/face/facemesh.ts -var tf15 = __toESM(require_tfjs_esm()); - -// src/face/iris.ts -var tf14 = __toESM(require_tfjs_esm()); -var model6; -var inputSize5 = 0; -var irisEnlarge = 2.3; -var leftOutline = meshAnnotations.leftEyeLower0; -var rightOutline = meshAnnotations.rightEyeLower0; -var eyeLandmarks = { - leftBounds: [leftOutline[0], leftOutline[leftOutline.length - 1]], - rightBounds: [rightOutline[0], rightOutline[rightOutline.length - 1]] -}; -var irisLandmarks = { - upperCenter: 3, - lowerCenter: 4, - index: 71, - numCoordinates: 76 -}; -async function load6(config3) { - var _a, _b; - if (env.initial) - model6 = null; - if (!model6) - model6 = await loadModel((_a = config3.face.iris) == null ? void 0 : _a.modelPath); - else if (config3.debug) - log("cached model:", model6["modelUrl"]); - inputSize5 = (model6 == null ? void 0 : model6["executor"]) && ((_b = model6.inputs) == null ? void 0 : _b[0].shape) ? model6.inputs[0].shape[2] : 0; - if (inputSize5 === -1) - inputSize5 = 64; - return model6; -} -function replaceIrisCoords(rawCoords, newCoords, prefix, keys) { - for (let i = 0; i < irisIndices.length; i++) { - const { key, indices } = irisIndices[i]; - const originalIndices = meshAnnotations[`${prefix}${key}`]; - if (!keys || keys.includes(key)) { - for (let j = 0; j < indices.length; j++) { - const index2 = indices[j]; - rawCoords[originalIndices[j]] = [ - newCoords[index2][0], - newCoords[index2][1], - (newCoords[index2][2] + rawCoords[originalIndices[j]][2]) / 2 - ]; - } - } - } -} -var getLeftToRightEyeDepthDifference = (rawCoords) => { - const leftEyeZ = rawCoords[eyeLandmarks.leftBounds[0]][2]; - const rightEyeZ = rawCoords[eyeLandmarks.rightBounds[0]][2]; - return leftEyeZ - rightEyeZ; -}; -var getEyeBox = (rawCoords, face4, eyeInnerCornerIndex, eyeOuterCornerIndex, meshSize, flip = false) => { - const box = squarifyBox(enlargeBox(calculateLandmarksBoundingBox([rawCoords[eyeInnerCornerIndex], rawCoords[eyeOuterCornerIndex]]), irisEnlarge)); - const boxSize = getBoxSize(box); - let crop = tf14.image.cropAndResize(face4, [[ - box.startPoint[1] / meshSize, - box.startPoint[0] / meshSize, - box.endPoint[1] / meshSize, - box.endPoint[0] / meshSize - ]], [0], [inputSize5, inputSize5]); - if (flip && env.kernels.includes("flipleftright")) { - const flipped = tf14.image.flipLeftRight(crop); - tf14.dispose(crop); - crop = flipped; - } - return { box, boxSize, crop }; -}; -var getEyeCoords = (eyeData, eyeBox, eyeBoxSize, flip = false) => { - const eyeRawCoords = []; - for (let i = 0; i < irisLandmarks.numCoordinates; i++) { - const x = eyeData[i * 3]; - const y = eyeData[i * 3 + 1]; - const z = eyeData[i * 3 + 2]; - eyeRawCoords.push([ - (flip ? 1 - x / inputSize5 : x / inputSize5) * eyeBoxSize[0] + eyeBox.startPoint[0], - y / inputSize5 * eyeBoxSize[1] + eyeBox.startPoint[1], - z - ]); - } - return { rawCoords: eyeRawCoords, iris: eyeRawCoords.slice(irisLandmarks.index) }; -}; -var getAdjustedIrisCoords = (rawCoords, irisCoords, direction) => { - const upperCenterZ = rawCoords[meshAnnotations[`${direction}EyeUpper0`][irisLandmarks.upperCenter]][2]; - const lowerCenterZ = rawCoords[meshAnnotations[`${direction}EyeLower0`][irisLandmarks.lowerCenter]][2]; - const averageZ = (upperCenterZ + lowerCenterZ) / 2; - return irisCoords.map((coord, i) => { - let z = averageZ; - if (i === 2) { - z = upperCenterZ; - } else if (i === 4) { - z = lowerCenterZ; - } - return [coord[0], coord[1], z]; - }); -}; -async function augmentIris(rawCoords, face4, meshSize) { - if (!(model6 == null ? void 0 : model6["executor"])) - return rawCoords; - const { box: leftEyeBox, boxSize: leftEyeBoxSize, crop: leftEyeCrop } = getEyeBox(rawCoords, face4, eyeLandmarks.leftBounds[0], eyeLandmarks.leftBounds[1], meshSize, true); - const { box: rightEyeBox, boxSize: rightEyeBoxSize, crop: rightEyeCrop } = getEyeBox(rawCoords, face4, eyeLandmarks.rightBounds[0], eyeLandmarks.rightBounds[1], meshSize, true); - const combined = tf14.concat([leftEyeCrop, rightEyeCrop]); - tf14.dispose(leftEyeCrop); - tf14.dispose(rightEyeCrop); - const eyePredictions = model6.execute(combined); - tf14.dispose(combined); - const eyePredictionsData = await eyePredictions.data(); - tf14.dispose(eyePredictions); - const leftEyeData = eyePredictionsData.slice(0, irisLandmarks.numCoordinates * 3); - const { rawCoords: leftEyeRawCoords, iris: leftIrisRawCoords } = getEyeCoords(leftEyeData, leftEyeBox, leftEyeBoxSize, true); - const rightEyeData = eyePredictionsData.slice(irisLandmarks.numCoordinates * 3); - const { rawCoords: rightEyeRawCoords, iris: rightIrisRawCoords } = getEyeCoords(rightEyeData, rightEyeBox, rightEyeBoxSize, false); - const leftToRightEyeDepthDifference = getLeftToRightEyeDepthDifference(rawCoords); - if (Math.abs(leftToRightEyeDepthDifference) < 30) { - replaceIrisCoords(rawCoords, leftEyeRawCoords, "left", null); - replaceIrisCoords(rawCoords, rightEyeRawCoords, "right", null); - } else if (leftToRightEyeDepthDifference < 1) { - replaceIrisCoords(rawCoords, leftEyeRawCoords, "left", ["EyeUpper0", "EyeLower0"]); - } else { - replaceIrisCoords(rawCoords, rightEyeRawCoords, "right", ["EyeUpper0", "EyeLower0"]); - } - const adjustedLeftIrisCoords = getAdjustedIrisCoords(rawCoords, leftIrisRawCoords, "left"); - const adjustedRightIrisCoords = getAdjustedIrisCoords(rawCoords, rightIrisRawCoords, "right"); - const newCoords = rawCoords.concat(adjustedLeftIrisCoords).concat(adjustedRightIrisCoords); - return newCoords; -} - -// src/face/constants.ts -var LIPS_CONNECTIONS = [ - [61, 146], - [146, 91], - [91, 181], - [181, 84], - [84, 17], - [17, 314], - [314, 405], - [405, 321], - [321, 375], - [375, 291], - [61, 185], - [185, 40], - [40, 39], - [39, 37], - [37, 0], - [0, 267], - [267, 269], - [269, 270], - [270, 409], - [409, 291], - [78, 95], - [95, 88], - [88, 178], - [178, 87], - [87, 14], - [14, 317], - [317, 402], - [402, 318], - [318, 324], - [324, 308], - [78, 191], - [191, 80], - [80, 81], - [81, 82], - [82, 13], - [13, 312], - [312, 311], - [311, 310], - [310, 415], - [415, 308] -]; -var LEFT_EYE_CONNECTIONS = [[263, 249], [249, 390], [390, 373], [373, 374], [374, 380], [380, 381], [381, 382], [382, 362], [263, 466], [466, 388], [388, 387], [387, 386], [386, 385], [385, 384], [384, 398], [398, 362]]; -var LEFT_EYEBROW_CONNECTIONS = [[276, 283], [283, 282], [282, 295], [295, 285], [300, 293], [293, 334], [334, 296], [296, 336]]; -var LEFT_IRIS_CONNECTIONS = [[474, 475], [475, 476], [476, 477], [477, 474]]; -var RIGHT_EYE_CONNECTIONS = [[33, 7], [7, 163], [163, 144], [144, 145], [145, 153], [153, 154], [154, 155], [155, 133], [33, 246], [246, 161], [161, 160], [160, 159], [159, 158], [158, 157], [157, 173], [173, 133]]; -var RIGHT_EYEBROW_CONNECTIONS = [[46, 53], [53, 52], [52, 65], [65, 55], [70, 63], [63, 105], [105, 66], [66, 107]]; -var RIGHT_IRIS_CONNECTIONS = [[469, 470], [470, 471], [471, 472], [472, 469]]; -var FACE_OVAL_CONNECTIONS = [ - [10, 338], - [338, 297], - [297, 332], - [332, 284], - [284, 251], - [251, 389], - [389, 356], - [356, 454], - [454, 323], - [323, 361], - [361, 288], - [288, 397], - [397, 365], - [365, 379], - [379, 378], - [378, 400], - [400, 377], - [377, 152], - [152, 148], - [148, 176], - [176, 149], - [149, 150], - [150, 136], - [136, 172], - [172, 58], - [58, 132], - [132, 93], - [93, 234], - [234, 127], - [127, 162], - [162, 21], - [21, 54], - [54, 103], - [103, 67], - [67, 109], - [109, 10] -]; -function connectionsToIndices2(connections) { - const indices = connections.map((connection) => connection[0]); - indices.push(connections[connections.length - 1][1]); - return indices; -} -var MEDIAPIPE_FACE_MESH_KEYPOINTS_BY_CONTOUR = { - lips: connectionsToIndices2(LIPS_CONNECTIONS), - leftEye: connectionsToIndices2(LEFT_EYE_CONNECTIONS), - leftEyebrow: connectionsToIndices2(LEFT_EYEBROW_CONNECTIONS), - leftIris: connectionsToIndices2(LEFT_IRIS_CONNECTIONS), - rightEye: connectionsToIndices2(RIGHT_EYE_CONNECTIONS), - rightEyebrow: connectionsToIndices2(RIGHT_EYEBROW_CONNECTIONS), - rightIris: connectionsToIndices2(RIGHT_IRIS_CONNECTIONS), - faceOval: connectionsToIndices2(FACE_OVAL_CONNECTIONS) -}; -var indexLabelPairs = Object.entries(MEDIAPIPE_FACE_MESH_KEYPOINTS_BY_CONTOUR).map(([label, indices]) => indices.map((index2) => [index2, label])).flat(); -var MEDIAPIPE_FACE_MESH_KEYPOINTS = new Map(indexLabelPairs); -var LANDMARKS_REFINEMENT_LIPS_CONFIG = [ - 61, - 146, - 91, - 181, - 84, - 17, - 314, - 405, - 321, - 375, - 291, - 185, - 40, - 39, - 37, - 0, - 267, - 269, - 270, - 409, - 78, - 95, - 88, - 178, - 87, - 14, - 317, - 402, - 318, - 324, - 308, - 191, - 80, - 81, - 82, - 13, - 312, - 311, - 310, - 415, - 76, - 77, - 90, - 180, - 85, - 16, - 315, - 404, - 320, - 307, - 306, - 184, - 74, - 73, - 72, - 11, - 302, - 303, - 304, - 408, - 62, - 96, - 89, - 179, - 86, - 15, - 316, - 403, - 319, - 325, - 292, - 183, - 42, - 41, - 38, - 12, - 268, - 271, - 272, - 407 -]; -var LANDMARKS_REFINEMENT_LEFT_EYE_CONFIG = [ - 33, - 7, - 163, - 144, - 145, - 153, - 154, - 155, - 133, - 246, - 161, - 160, - 159, - 158, - 157, - 173, - 130, - 25, - 110, - 24, - 23, - 22, - 26, - 112, - 243, - 247, - 30, - 29, - 27, - 28, - 56, - 190, - 226, - 31, - 228, - 229, - 230, - 231, - 232, - 233, - 244, - 113, - 225, - 224, - 223, - 222, - 221, - 189, - 35, - 124, - 46, - 53, - 52, - 65, - 143, - 111, - 117, - 118, - 119, - 120, - 121, - 128, - 245, - 156, - 70, - 63, - 105, - 66, - 107, - 55, - 193 -]; -var LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG = [ - 263, - 249, - 390, - 373, - 374, - 380, - 381, - 382, - 362, - 466, - 388, - 387, - 386, - 385, - 384, - 398, - 359, - 255, - 339, - 254, - 253, - 252, - 256, - 341, - 463, - 467, - 260, - 259, - 257, - 258, - 286, - 414, - 446, - 261, - 448, - 449, - 450, - 451, - 452, - 453, - 464, - 342, - 445, - 444, - 443, - 442, - 441, - 413, - 265, - 353, - 276, - 283, - 282, - 295, - 372, - 340, - 346, - 347, - 348, - 349, - 350, - 357, - 465, - 383, - 300, - 293, - 334, - 296, - 336, - 285, - 417 -]; - -// src/face/attention.ts -async function augment(rawCoords, results) { - var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j; - const t2 = { - lips: await ((_b = (_a = results.filter((r) => r.size === 160)) == null ? void 0 : _a[0]) == null ? void 0 : _b.data()), - irisL: await ((_d = (_c = results.filter((r) => r.size === 10)) == null ? void 0 : _c[0]) == null ? void 0 : _d.data()), - eyeL: await ((_f = (_e = results.filter((r) => r.size === 142)) == null ? void 0 : _e[0]) == null ? void 0 : _f.data()), - irisR: await ((_h = (_g = results.filter((r) => r.size === 10)) == null ? void 0 : _g[1]) == null ? void 0 : _h.data()), - eyeR: await ((_j = (_i = results.filter((r) => r.size === 142)) == null ? void 0 : _i[1]) == null ? void 0 : _j.data()) - }; - for (const val of Object.values(t2)) { - if (!val) - return rawCoords; - } - const irisLDepth = LANDMARKS_REFINEMENT_LEFT_EYE_CONFIG.reduce((prev, curr) => prev += rawCoords[curr][2], 0) / LANDMARKS_REFINEMENT_LEFT_EYE_CONFIG.length; - for (let i = 0; i < t2.irisL.length / 2; i++) - rawCoords.push([t2.irisL[2 * i + 0], t2.irisL[2 * i + 1], irisLDepth]); - const irisRDepth = LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG.reduce((prev, curr) => prev += rawCoords[curr][2], 0) / LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG.length; - for (let i = 0; i < t2.irisR.length / 2; i++) - rawCoords.push([t2.irisR[2 * i + 0], t2.irisR[2 * i + 1], irisRDepth]); - for (let i = 0; i < t2.eyeL.length / 2; i++) - rawCoords[LANDMARKS_REFINEMENT_LEFT_EYE_CONFIG[i]] = [t2.eyeL[2 * i + 0], t2.eyeL[2 * i + 1], rawCoords[LANDMARKS_REFINEMENT_LEFT_EYE_CONFIG[i]][2]]; - for (let i = 0; i < t2.eyeR.length / 2; i++) - rawCoords[LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG[i]] = [t2.eyeR[2 * i + 0], t2.eyeR[2 * i + 1], rawCoords[LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG[i]][2]]; - for (let i = 0; i < t2.lips.length / 2; i++) - rawCoords[LANDMARKS_REFINEMENT_LIPS_CONFIG[i]] = [t2.lips[2 * i + 0], t2.lips[2 * i + 1], rawCoords[LANDMARKS_REFINEMENT_LIPS_CONFIG[i]][2]]; - return rawCoords; -} - -// src/face/facemesh.ts -var cache3 = { - boxes: [], - skipped: Number.MAX_SAFE_INTEGER, - timestamp: 0 -}; -var model7 = null; -var inputSize6 = 0; -async function predict6(input, config3) { - var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j; - if (!(model7 == null ? void 0 : model7["executor"])) - return []; - const skipTime = (((_a = config3.face.detector) == null ? void 0 : _a.skipTime) || 0) > now() - cache3.timestamp; - const skipFrame = cache3.skipped < (((_b = config3.face.detector) == null ? void 0 : _b.skipFrames) || 0); - if (!config3.skipAllowed || !skipTime || !skipFrame || cache3.boxes.length === 0) { - cache3.boxes = await getBoxes(input, config3); - cache3.timestamp = now(); - cache3.skipped = 0; - } else { - cache3.skipped++; - } - const faces = []; - const newCache = []; - let id = 0; - const size2 = inputSize6; - for (let i = 0; i < cache3.boxes.length; i++) { - const box = cache3.boxes[i]; - let angle = 0; - let rotationMatrix; - const face4 = { - id: id++, - mesh: [], - meshRaw: [], - box: [0, 0, 0, 0], - boxRaw: [0, 0, 0, 0], - score: 0, - boxScore: 0, - faceScore: 0, - annotations: {} - }; - [angle, rotationMatrix, face4.tensor] = correctFaceRotation((_c = config3.face.detector) == null ? void 0 : _c.rotation, box, input, ((_d = config3.face.mesh) == null ? void 0 : _d.enabled) ? inputSize6 : size()); - if (config3.filter.equalization) { - const equilized = face4.tensor ? await histogramEqualization(face4.tensor) : void 0; - tf15.dispose(face4.tensor); - if (equilized) - face4.tensor = equilized; - } - face4.boxScore = Math.round(100 * box.confidence) / 100; - if (!((_e = config3.face.mesh) == null ? void 0 : _e.enabled)) { - face4.box = clampBox(box, input); - face4.boxRaw = getRawBox(box, input); - face4.score = face4.boxScore; - face4.mesh = box.landmarks.map((pt) => [ - (box.startPoint[0] + box.endPoint[0]) / 2 + (box.endPoint[0] + box.startPoint[0]) * pt[0] / size(), - (box.startPoint[1] + box.endPoint[1]) / 2 + (box.endPoint[1] + box.startPoint[1]) * pt[1] / size() - ]); - face4.meshRaw = face4.mesh.map((pt) => [pt[0] / (input.shape[2] || 0), pt[1] / (input.shape[1] || 0), (pt[2] || 0) / size2]); - for (const key of Object.keys(blazeFaceLandmarks)) { - face4.annotations[key] = [face4.mesh[blazeFaceLandmarks[key]]]; - } - } else if (!model7) { - if (config3.debug) - log("face mesh detection requested, but model is not loaded"); - } else { - if (((_f = config3.face.attention) == null ? void 0 : _f.enabled) && !env.kernels.includes("atan2")) { - config3.face.attention.enabled = false; - tf15.dispose(face4.tensor); - return faces; - } - const results = model7.execute(face4.tensor); - const confidenceT = results.find((t2) => t2.shape[t2.shape.length - 1] === 1); - const faceConfidence = await confidenceT.data(); - face4.faceScore = Math.round(100 * faceConfidence[0]) / 100; - if (face4.faceScore < (((_g = config3.face.detector) == null ? void 0 : _g.minConfidence) || 1)) { - box.confidence = face4.faceScore; - if (config3.face.mesh.keepInvalid) { - face4.box = clampBox(box, input); - face4.boxRaw = getRawBox(box, input); - face4.score = face4.boxScore; - face4.mesh = box.landmarks.map((pt) => [ - (box.startPoint[0] + box.endPoint[0]) / 2 + (box.endPoint[0] + box.startPoint[0]) * pt[0] / size(), - (box.startPoint[1] + box.endPoint[1]) / 2 + (box.endPoint[1] + box.startPoint[1]) * pt[1] / size() - ]); - face4.meshRaw = face4.mesh.map((pt) => [pt[0] / (input.shape[2] || 1), pt[1] / (input.shape[1] || 1), (pt[2] || 0) / size2]); - for (const key of Object.keys(blazeFaceLandmarks)) { - face4.annotations[key] = [face4.mesh[blazeFaceLandmarks[key]]]; - } - } - } else { - const meshT = results.find((t2) => t2.shape[t2.shape.length - 1] === 1404); - const coordsReshaped = tf15.reshape(meshT, [-1, 3]); - let rawCoords = await coordsReshaped.array(); - tf15.dispose(coordsReshaped); - if ((_h = config3.face.attention) == null ? void 0 : _h.enabled) { - rawCoords = await augment(rawCoords, results); - } else if ((_i = config3.face.iris) == null ? void 0 : _i.enabled) { - rawCoords = await augmentIris(rawCoords, face4.tensor, inputSize6); - } - face4.mesh = transformRawCoords(rawCoords, box, angle, rotationMatrix, inputSize6); - face4.meshRaw = face4.mesh.map((pt) => [pt[0] / (input.shape[2] || 0), pt[1] / (input.shape[1] || 0), (pt[2] || 0) / size2]); - for (const key of Object.keys(meshAnnotations)) - face4.annotations[key] = meshAnnotations[key].map((index2) => face4.mesh[index2]); - face4.score = face4.faceScore; - const calculatedBox = { ...calculateFaceBox(face4.mesh, box), confidence: box.confidence, landmarks: box.landmarks }; - face4.box = clampBox(calculatedBox, input); - face4.boxRaw = getRawBox(calculatedBox, input); - newCache.push(calculatedBox); - } - tf15.dispose(results); - } - if (face4.score > (((_j = config3.face.detector) == null ? void 0 : _j.minConfidence) || 1)) - faces.push(face4); - else - tf15.dispose(face4.tensor); - } - cache3.boxes = newCache; - return faces; -} -async function load7(config3) { - var _a, _b, _c, _d, _e, _f; - if (env.initial) - model7 = null; - if (((_a = config3.face.attention) == null ? void 0 : _a.enabled) && (model7 == null ? void 0 : model7["signature"])) { - if (Object.keys(((_b = model7 == null ? void 0 : model7["signature"]) == null ? void 0 : _b.outputs) || {}).length < 6) - model7 = null; - } - if (!model7) { - if ((_c = config3.face.attention) == null ? void 0 : _c.enabled) - model7 = await loadModel(config3.face.attention.modelPath); - else - model7 = await loadModel((_d = config3.face.mesh) == null ? void 0 : _d.modelPath); - } else if (config3.debug) { - log("cached model:", model7["modelUrl"]); - } - inputSize6 = model7["executor"] && ((_e = model7 == null ? void 0 : model7.inputs) == null ? void 0 : _e[0].shape) ? (_f = model7 == null ? void 0 : model7.inputs) == null ? void 0 : _f[0].shape[2] : 256; - return model7; -} -var triangulation = TRI468; -var uvmap = UV468; - -// src/face/faceres.ts -var tf16 = __toESM(require_tfjs_esm()); -var model8; -var last4 = []; -var lastTime6 = 0; -var lastCount3 = 0; -var skipped6 = Number.MAX_SAFE_INTEGER; -async function load8(config3) { - var _a; - if (env.initial) - model8 = null; - if (!model8) - model8 = await loadModel((_a = config3.face.description) == null ? void 0 : _a.modelPath); - else if (config3.debug) - log("cached model:", model8["modelUrl"]); - return model8; -} -function enhance(input) { - const tensor6 = input.image || input.tensor || input; - if (!(model8 == null ? void 0 : model8.inputs[0].shape)) - return tensor6; - const crop = tf16.image.resizeBilinear(tensor6, [model8.inputs[0].shape[2], model8.inputs[0].shape[1]], false); - const norm = tf16.mul(crop, constants.tf255); - tf16.dispose(crop); - return norm; -} -async function predict7(image27, config3, idx, count2) { - var _a, _b, _c, _d; - const obj = { - age: 0, - gender: "unknown", - genderScore: 0, - descriptor: [] - }; - if (!(model8 == null ? void 0 : model8["executor"])) - return obj; - const skipFrame = skipped6 < (((_a = config3.face.description) == null ? void 0 : _a.skipFrames) || 0); - const skipTime = (((_b = config3.face.description) == null ? void 0 : _b.skipTime) || 0) > now() - lastTime6; - if (config3.skipAllowed && skipFrame && skipTime && lastCount3 === count2 && ((_c = last4 == null ? void 0 : last4[idx]) == null ? void 0 : _c.age) > 0 && ((_d = last4 == null ? void 0 : last4[idx]) == null ? void 0 : _d.genderScore) > 0) { - skipped6++; - return last4[idx]; - } - skipped6 = 0; - return new Promise(async (resolve) => { - var _a2; - if ((_a2 = config3.face.description) == null ? void 0 : _a2.enabled) { - const enhanced = enhance(image27); - const resT = model8 == null ? void 0 : model8.execute(enhanced); - lastTime6 = now(); - tf16.dispose(enhanced); - const genderT = resT.find((t2) => t2.shape[1] === 1); - const gender2 = await genderT.data(); - const confidence = Math.trunc(200 * Math.abs(gender2[0] - 0.5)) / 100; - if (confidence > (config3.face.description.minConfidence || 0)) { - obj.gender = gender2[0] <= 0.5 ? "female" : "male"; - obj.genderScore = Math.min(0.99, confidence); - } - const argmax = tf16.argMax(resT.find((t2) => t2.shape[1] === 100), 1); - const ageIdx = (await argmax.data())[0]; - tf16.dispose(argmax); - const ageT = resT.find((t2) => t2.shape[1] === 100); - const all2 = await ageT.data(); - obj.age = Math.round(all2[ageIdx - 1] > all2[ageIdx + 1] ? 10 * ageIdx - 100 * all2[ageIdx - 1] : 10 * ageIdx + 100 * all2[ageIdx + 1]) / 10; - if (Number.isNaN(gender2[0]) || Number.isNaN(all2[0])) - log("faceres error:", { model: model8, result: resT }); - const desc = resT.find((t2) => t2.shape[1] === 1024); - const descriptor = desc ? await desc.data() : []; - obj.descriptor = Array.from(descriptor); - resT.forEach((t2) => tf16.dispose(t2)); - } - last4[idx] = obj; - lastCount3 = count2; - resolve(obj); - }); -} - -// src/gear/gear.ts -var tf17 = __toESM(require_tfjs_esm()); -var model9; -var last5 = []; -var raceNames = ["white", "black", "asian", "indian", "other"]; -var ageWeights = [15, 23, 28, 35.5, 45.5, 55.5, 65]; -var lastCount4 = 0; -var lastTime7 = 0; -var skipped7 = Number.MAX_SAFE_INTEGER; -async function load9(config3) { - var _a; - if (env.initial) - model9 = null; - if (!model9) - model9 = await loadModel((_a = config3.face.gear) == null ? void 0 : _a.modelPath); - else if (config3.debug) - log("cached model:", model9["modelUrl"]); - return model9; -} -async function predict8(image27, config3, idx, count2) { - var _a, _b; - if (!model9) - return { age: 0, gender: "unknown", genderScore: 0, race: [] }; - const skipFrame = skipped7 < (((_a = config3.face.gear) == null ? void 0 : _a.skipFrames) || 0); - const skipTime = (((_b = config3.face.gear) == null ? void 0 : _b.skipTime) || 0) > now() - lastTime7; - if (config3.skipAllowed && skipTime && skipFrame && lastCount4 === count2 && last5[idx]) { - skipped7++; - return last5[idx]; - } - skipped7 = 0; - return new Promise(async (resolve) => { - var _a2, _b2; - if (!(model9 == null ? void 0 : model9.inputs[0].shape)) - return; - const t2 = {}; - const box = [[0, 0.1, 0.9, 0.9]]; - t2.resize = tf17.image.cropAndResize(image27, box, [0], [model9.inputs[0].shape[2], model9.inputs[0].shape[1]]); - const obj = { age: 0, gender: "unknown", genderScore: 0, race: [] }; - if ((_a2 = config3.face.gear) == null ? void 0 : _a2.enabled) - [t2.age, t2.gender, t2.race] = model9.execute(t2.resize, ["age_output", "gender_output", "race_output"]); - const gender2 = await t2.gender.data(); - obj.gender = gender2[0] > gender2[1] ? "male" : "female"; - obj.genderScore = Math.round(100 * (gender2[0] > gender2[1] ? gender2[0] : gender2[1])) / 100; - const race = await t2.race.data(); - for (let i = 0; i < race.length; i++) { - if (race[i] > (((_b2 = config3.face.gear) == null ? void 0 : _b2.minConfidence) || 0.2)) - obj.race.push({ score: Math.round(100 * race[i]) / 100, race: raceNames[i] }); - } - obj.race.sort((a, b) => b.score - a.score); - const ageDistribution = Array.from(await t2.age.data()); - const ageSorted = ageDistribution.map((a, i) => [ageWeights[i], a]).sort((a, b) => b[1] - a[1]); - let age2 = ageSorted[0][0]; - for (let i = 1; i < ageSorted.length; i++) - age2 += ageSorted[i][1] * (ageSorted[i][0] - age2); - obj.age = Math.round(10 * age2) / 10; - Object.keys(t2).forEach((tensor6) => tf17.dispose(t2[tensor6])); - last5[idx] = obj; - lastCount4 = count2; - lastTime7 = now(); - resolve(obj); - }); -} - -// src/hand/handposedetector.ts -var tf19 = __toESM(require_tfjs_esm()); - -// src/hand/handposeutil.ts -var tf18 = __toESM(require_tfjs_esm()); -function getBoxSize2(box) { - return [ - Math.abs(box.endPoint[0] - box.startPoint[0]), - Math.abs(box.endPoint[1] - box.startPoint[1]) - ]; -} -function getBoxCenter2(box) { - return [ - box.startPoint[0] + (box.endPoint[0] - box.startPoint[0]) / 2, - box.startPoint[1] + (box.endPoint[1] - box.startPoint[1]) / 2 - ]; -} -function cutBoxFromImageAndResize(box, image27, cropSize) { - const h = image27.shape[1]; - const w = image27.shape[2]; - const boxes = [[ - box.startPoint[1] / h, - box.startPoint[0] / w, - box.endPoint[1] / h, - box.endPoint[0] / w - ]]; - return tf18.image.cropAndResize(image27, boxes, [0], cropSize); -} -function scaleBoxCoordinates2(box, factor) { - const startPoint = [box.startPoint[0] * factor[0], box.startPoint[1] * factor[1]]; - const endPoint = [box.endPoint[0] * factor[0], box.endPoint[1] * factor[1]]; - const palmLandmarks = box.palmLandmarks.map((coord) => { - const scaledCoord = [coord[0] * factor[0], coord[1] * factor[1]]; - return scaledCoord; - }); - return { startPoint, endPoint, palmLandmarks, confidence: box.confidence }; -} -function enlargeBox2(box, factor = 1.5) { - const center = getBoxCenter2(box); - const size2 = getBoxSize2(box); - const newHalfSize = [factor * size2[0] / 2, factor * size2[1] / 2]; - const startPoint = [center[0] - newHalfSize[0], center[1] - newHalfSize[1]]; - const endPoint = [center[0] + newHalfSize[0], center[1] + newHalfSize[1]]; - return { startPoint, endPoint, palmLandmarks: box.palmLandmarks }; -} -function squarifyBox2(box) { - const centers = getBoxCenter2(box); - const size2 = getBoxSize2(box); - const maxEdge = Math.max(...size2); - const halfSize = maxEdge / 2; - const startPoint = [centers[0] - halfSize, centers[1] - halfSize]; - const endPoint = [centers[0] + halfSize, centers[1] + halfSize]; - return { startPoint, endPoint, palmLandmarks: box.palmLandmarks }; -} -function normalizeRadians2(angle) { - return angle - 2 * Math.PI * Math.floor((angle + Math.PI) / (2 * Math.PI)); -} -function computeRotation2(point1, point2) { - const radians = Math.PI / 2 - Math.atan2(-(point2[1] - point1[1]), point2[0] - point1[0]); - return normalizeRadians2(radians); -} -var buildTranslationMatrix2 = (x, y) => [[1, 0, x], [0, 1, y], [0, 0, 1]]; -function dot2(v1, v2) { - let product = 0; - for (let i = 0; i < v1.length; i++) { - product += v1[i] * v2[i]; - } - return product; -} -function getColumnFrom2DArr2(arr, columnIndex) { - const column = []; - for (let i = 0; i < arr.length; i++) { - column.push(arr[i][columnIndex]); - } - return column; -} -function multiplyTransformMatrices2(mat1, mat2) { - const product = []; - const size2 = mat1.length; - for (let row = 0; row < size2; row++) { - product.push([]); - for (let col = 0; col < size2; col++) { - product[row].push(dot2(mat1[row], getColumnFrom2DArr2(mat2, col))); - } - } - return product; -} -function buildRotationMatrix2(rotation, center) { - const cosA = Math.cos(rotation); - const sinA = Math.sin(rotation); - const rotationMatrix = [[cosA, -sinA, 0], [sinA, cosA, 0], [0, 0, 1]]; - const translationMatrix = buildTranslationMatrix2(center[0], center[1]); - const translationTimesRotation = multiplyTransformMatrices2(translationMatrix, rotationMatrix); - const negativeTranslationMatrix = buildTranslationMatrix2(-center[0], -center[1]); - return multiplyTransformMatrices2(translationTimesRotation, negativeTranslationMatrix); -} -function invertTransformMatrix2(matrix) { - const rotationComponent = [[matrix[0][0], matrix[1][0]], [matrix[0][1], matrix[1][1]]]; - const translationComponent = [matrix[0][2], matrix[1][2]]; - const invertedTranslation = [ - -dot2(rotationComponent[0], translationComponent), - -dot2(rotationComponent[1], translationComponent) - ]; - return [ - rotationComponent[0].concat(invertedTranslation[0]), - rotationComponent[1].concat(invertedTranslation[1]), - [0, 0, 1] - ]; -} -function rotatePoint2(homogeneousCoordinate, rotationMatrix) { - return [ - dot2(homogeneousCoordinate, rotationMatrix[0]), - dot2(homogeneousCoordinate, rotationMatrix[1]) - ]; -} - -// src/hand/handposeanchors.ts -var anchors2 = [ - { x: 0.015625, y: 0.015625 }, - { x: 0.015625, y: 0.015625 }, - { x: 0.046875, y: 0.015625 }, - { x: 0.046875, y: 0.015625 }, - { x: 0.078125, y: 0.015625 }, - { x: 0.078125, y: 0.015625 }, - { x: 0.109375, y: 0.015625 }, - { x: 0.109375, y: 0.015625 }, - { x: 0.140625, y: 0.015625 }, - { x: 0.140625, y: 0.015625 }, - { x: 0.171875, y: 0.015625 }, - { x: 0.171875, y: 0.015625 }, - { x: 0.203125, y: 0.015625 }, - { x: 0.203125, y: 0.015625 }, - { x: 0.234375, y: 0.015625 }, - { x: 0.234375, y: 0.015625 }, - { x: 0.265625, y: 0.015625 }, - { x: 0.265625, y: 0.015625 }, - { x: 0.296875, y: 0.015625 }, - { x: 0.296875, y: 0.015625 }, - { x: 0.328125, y: 0.015625 }, - { x: 0.328125, y: 0.015625 }, - { x: 0.359375, y: 0.015625 }, - { x: 0.359375, y: 0.015625 }, - { x: 0.390625, y: 0.015625 }, - { x: 0.390625, y: 0.015625 }, - { x: 0.421875, y: 0.015625 }, - { x: 0.421875, y: 0.015625 }, - { x: 0.453125, y: 0.015625 }, - { x: 0.453125, y: 0.015625 }, - { x: 0.484375, y: 0.015625 }, - { x: 0.484375, y: 0.015625 }, - { x: 0.515625, y: 0.015625 }, - { x: 0.515625, y: 0.015625 }, - { x: 0.546875, y: 0.015625 }, - { x: 0.546875, y: 0.015625 }, - { x: 0.578125, y: 0.015625 }, - { x: 0.578125, y: 0.015625 }, - { x: 0.609375, y: 0.015625 }, - { x: 0.609375, y: 0.015625 }, - { x: 0.640625, y: 0.015625 }, - { x: 0.640625, y: 0.015625 }, - { x: 0.671875, y: 0.015625 }, - { x: 0.671875, y: 0.015625 }, - { x: 0.703125, y: 0.015625 }, - { x: 0.703125, y: 0.015625 }, - { x: 0.734375, y: 0.015625 }, - { x: 0.734375, y: 0.015625 }, - { x: 0.765625, y: 0.015625 }, - { x: 0.765625, y: 0.015625 }, - { x: 0.796875, y: 0.015625 }, - { x: 0.796875, y: 0.015625 }, - { x: 0.828125, y: 0.015625 }, - { x: 0.828125, y: 0.015625 }, - { x: 0.859375, y: 0.015625 }, - { x: 0.859375, y: 0.015625 }, - { x: 0.890625, y: 0.015625 }, - { x: 0.890625, y: 0.015625 }, - { x: 0.921875, y: 0.015625 }, - { x: 0.921875, y: 0.015625 }, - { x: 0.953125, y: 0.015625 }, - { x: 0.953125, y: 0.015625 }, - { x: 0.984375, y: 0.015625 }, - { x: 0.984375, y: 0.015625 }, - { x: 0.015625, y: 0.046875 }, - { x: 0.015625, y: 0.046875 }, - { x: 0.046875, y: 0.046875 }, - { x: 0.046875, y: 0.046875 }, - { x: 0.078125, y: 0.046875 }, - { x: 0.078125, y: 0.046875 }, - { x: 0.109375, y: 0.046875 }, - { x: 0.109375, y: 0.046875 }, - { x: 0.140625, y: 0.046875 }, - { x: 0.140625, y: 0.046875 }, - { x: 0.171875, y: 0.046875 }, - { x: 0.171875, y: 0.046875 }, - { x: 0.203125, y: 0.046875 }, - { x: 0.203125, y: 0.046875 }, - { x: 0.234375, y: 0.046875 }, - { x: 0.234375, y: 0.046875 }, - { x: 0.265625, y: 0.046875 }, - { x: 0.265625, y: 0.046875 }, - { x: 0.296875, y: 0.046875 }, - { x: 0.296875, y: 0.046875 }, - { x: 0.328125, y: 0.046875 }, - { x: 0.328125, y: 0.046875 }, - { x: 0.359375, y: 0.046875 }, - { x: 0.359375, y: 0.046875 }, - { x: 0.390625, y: 0.046875 }, - { x: 0.390625, y: 0.046875 }, - { x: 0.421875, y: 0.046875 }, - { x: 0.421875, y: 0.046875 }, - { x: 0.453125, y: 0.046875 }, - { x: 0.453125, y: 0.046875 }, - { x: 0.484375, y: 0.046875 }, - { x: 0.484375, y: 0.046875 }, - { x: 0.515625, y: 0.046875 }, - { x: 0.515625, y: 0.046875 }, - { x: 0.546875, y: 0.046875 }, - { x: 0.546875, y: 0.046875 }, - { x: 0.578125, y: 0.046875 }, - { x: 0.578125, y: 0.046875 }, - { x: 0.609375, y: 0.046875 }, - { x: 0.609375, y: 0.046875 }, - { x: 0.640625, y: 0.046875 }, - { x: 0.640625, y: 0.046875 }, - { x: 0.671875, y: 0.046875 }, - { x: 0.671875, y: 0.046875 }, - { x: 0.703125, y: 0.046875 }, - { x: 0.703125, y: 0.046875 }, - { x: 0.734375, y: 0.046875 }, - { x: 0.734375, y: 0.046875 }, - { x: 0.765625, y: 0.046875 }, - { x: 0.765625, y: 0.046875 }, - { x: 0.796875, y: 0.046875 }, - { x: 0.796875, y: 0.046875 }, - { x: 0.828125, y: 0.046875 }, - { x: 0.828125, y: 0.046875 }, - { x: 0.859375, y: 0.046875 }, - { x: 0.859375, y: 0.046875 }, - { x: 0.890625, y: 0.046875 }, - { x: 0.890625, y: 0.046875 }, - { x: 0.921875, y: 0.046875 }, - { x: 0.921875, y: 0.046875 }, - { x: 0.953125, y: 0.046875 }, - { x: 0.953125, y: 0.046875 }, - { x: 0.984375, y: 0.046875 }, - { x: 0.984375, y: 0.046875 }, - { x: 0.015625, y: 0.078125 }, - { x: 0.015625, y: 0.078125 }, - { x: 0.046875, y: 0.078125 }, - { x: 0.046875, y: 0.078125 }, - { x: 0.078125, y: 0.078125 }, - { x: 0.078125, y: 0.078125 }, - { x: 0.109375, y: 0.078125 }, - { x: 0.109375, y: 0.078125 }, - { x: 0.140625, y: 0.078125 }, - { x: 0.140625, y: 0.078125 }, - { x: 0.171875, y: 0.078125 }, - { x: 0.171875, y: 0.078125 }, - { x: 0.203125, y: 0.078125 }, - { x: 0.203125, y: 0.078125 }, - { x: 0.234375, y: 0.078125 }, - { x: 0.234375, y: 0.078125 }, - { x: 0.265625, y: 0.078125 }, - { x: 0.265625, y: 0.078125 }, - { x: 0.296875, y: 0.078125 }, - { x: 0.296875, y: 0.078125 }, - { x: 0.328125, y: 0.078125 }, - { x: 0.328125, y: 0.078125 }, - { x: 0.359375, y: 0.078125 }, - { x: 0.359375, y: 0.078125 }, - { x: 0.390625, y: 0.078125 }, - { x: 0.390625, y: 0.078125 }, - { x: 0.421875, y: 0.078125 }, - { x: 0.421875, y: 0.078125 }, - { x: 0.453125, y: 0.078125 }, - { x: 0.453125, y: 0.078125 }, - { x: 0.484375, y: 0.078125 }, - { x: 0.484375, y: 0.078125 }, - { x: 0.515625, y: 0.078125 }, - { x: 0.515625, y: 0.078125 }, - { x: 0.546875, y: 0.078125 }, - { x: 0.546875, y: 0.078125 }, - { x: 0.578125, y: 0.078125 }, - { x: 0.578125, y: 0.078125 }, - { x: 0.609375, y: 0.078125 }, - { x: 0.609375, y: 0.078125 }, - { x: 0.640625, y: 0.078125 }, - { x: 0.640625, y: 0.078125 }, - { x: 0.671875, y: 0.078125 }, - { x: 0.671875, y: 0.078125 }, - { x: 0.703125, y: 0.078125 }, - { x: 0.703125, y: 0.078125 }, - { x: 0.734375, y: 0.078125 }, - { x: 0.734375, y: 0.078125 }, - { x: 0.765625, y: 0.078125 }, - { x: 0.765625, y: 0.078125 }, - { x: 0.796875, y: 0.078125 }, - { x: 0.796875, y: 0.078125 }, - { x: 0.828125, y: 0.078125 }, - { x: 0.828125, y: 0.078125 }, - { x: 0.859375, y: 0.078125 }, - { x: 0.859375, y: 0.078125 }, - { x: 0.890625, y: 0.078125 }, - { x: 0.890625, y: 0.078125 }, - { x: 0.921875, y: 0.078125 }, - { x: 0.921875, y: 0.078125 }, - { x: 0.953125, y: 0.078125 }, - { x: 0.953125, y: 0.078125 }, - { x: 0.984375, y: 0.078125 }, - { x: 0.984375, y: 0.078125 }, - { x: 0.015625, y: 0.109375 }, - { x: 0.015625, y: 0.109375 }, - { x: 0.046875, y: 0.109375 }, - { x: 0.046875, y: 0.109375 }, - { x: 0.078125, y: 0.109375 }, - { x: 0.078125, y: 0.109375 }, - { x: 0.109375, y: 0.109375 }, - { x: 0.109375, y: 0.109375 }, - { x: 0.140625, y: 0.109375 }, - { x: 0.140625, y: 0.109375 }, - { x: 0.171875, y: 0.109375 }, - { x: 0.171875, y: 0.109375 }, - { x: 0.203125, y: 0.109375 }, - { x: 0.203125, y: 0.109375 }, - { x: 0.234375, y: 0.109375 }, - { x: 0.234375, y: 0.109375 }, - { x: 0.265625, y: 0.109375 }, - { x: 0.265625, y: 0.109375 }, - { x: 0.296875, y: 0.109375 }, - { x: 0.296875, y: 0.109375 }, - { x: 0.328125, y: 0.109375 }, - { x: 0.328125, y: 0.109375 }, - { x: 0.359375, y: 0.109375 }, - { x: 0.359375, y: 0.109375 }, - { x: 0.390625, y: 0.109375 }, - { x: 0.390625, y: 0.109375 }, - { x: 0.421875, y: 0.109375 }, - { x: 0.421875, y: 0.109375 }, - { x: 0.453125, y: 0.109375 }, - { x: 0.453125, y: 0.109375 }, - { x: 0.484375, y: 0.109375 }, - { x: 0.484375, y: 0.109375 }, - { x: 0.515625, y: 0.109375 }, - { x: 0.515625, y: 0.109375 }, - { x: 0.546875, y: 0.109375 }, - { x: 0.546875, y: 0.109375 }, - { x: 0.578125, y: 0.109375 }, - { x: 0.578125, y: 0.109375 }, - { x: 0.609375, y: 0.109375 }, - { x: 0.609375, y: 0.109375 }, - { x: 0.640625, y: 0.109375 }, - { x: 0.640625, y: 0.109375 }, - { x: 0.671875, y: 0.109375 }, - { x: 0.671875, y: 0.109375 }, - { x: 0.703125, y: 0.109375 }, - { x: 0.703125, y: 0.109375 }, - { x: 0.734375, y: 0.109375 }, - { x: 0.734375, y: 0.109375 }, - { x: 0.765625, y: 0.109375 }, - { x: 0.765625, y: 0.109375 }, - { x: 0.796875, y: 0.109375 }, - { x: 0.796875, y: 0.109375 }, - { x: 0.828125, y: 0.109375 }, - { x: 0.828125, y: 0.109375 }, - { x: 0.859375, y: 0.109375 }, - { x: 0.859375, y: 0.109375 }, - { x: 0.890625, y: 0.109375 }, - { x: 0.890625, y: 0.109375 }, - { x: 0.921875, y: 0.109375 }, - { x: 0.921875, y: 0.109375 }, - { x: 0.953125, y: 0.109375 }, - { x: 0.953125, y: 0.109375 }, - { x: 0.984375, y: 0.109375 }, - { x: 0.984375, y: 0.109375 }, - { x: 0.015625, y: 0.140625 }, - { x: 0.015625, y: 0.140625 }, - { x: 0.046875, y: 0.140625 }, - { x: 0.046875, y: 0.140625 }, - { x: 0.078125, y: 0.140625 }, - { x: 0.078125, y: 0.140625 }, - { x: 0.109375, y: 0.140625 }, - { x: 0.109375, y: 0.140625 }, - { x: 0.140625, y: 0.140625 }, - { x: 0.140625, y: 0.140625 }, - { x: 0.171875, y: 0.140625 }, - { x: 0.171875, y: 0.140625 }, - { x: 0.203125, y: 0.140625 }, - { x: 0.203125, y: 0.140625 }, - { x: 0.234375, y: 0.140625 }, - { x: 0.234375, y: 0.140625 }, - { x: 0.265625, y: 0.140625 }, - { x: 0.265625, y: 0.140625 }, - { x: 0.296875, y: 0.140625 }, - { x: 0.296875, y: 0.140625 }, - { x: 0.328125, y: 0.140625 }, - { x: 0.328125, y: 0.140625 }, - { x: 0.359375, y: 0.140625 }, - { x: 0.359375, y: 0.140625 }, - { x: 0.390625, y: 0.140625 }, - { x: 0.390625, y: 0.140625 }, - { x: 0.421875, y: 0.140625 }, - { x: 0.421875, y: 0.140625 }, - { x: 0.453125, y: 0.140625 }, - { x: 0.453125, y: 0.140625 }, - { x: 0.484375, y: 0.140625 }, - { x: 0.484375, y: 0.140625 }, - { x: 0.515625, y: 0.140625 }, - { x: 0.515625, y: 0.140625 }, - { x: 0.546875, y: 0.140625 }, - { x: 0.546875, y: 0.140625 }, - { x: 0.578125, y: 0.140625 }, - { x: 0.578125, y: 0.140625 }, - { x: 0.609375, y: 0.140625 }, - { x: 0.609375, y: 0.140625 }, - { x: 0.640625, y: 0.140625 }, - { x: 0.640625, y: 0.140625 }, - { x: 0.671875, y: 0.140625 }, - { x: 0.671875, y: 0.140625 }, - { x: 0.703125, y: 0.140625 }, - { x: 0.703125, y: 0.140625 }, - { x: 0.734375, y: 0.140625 }, - { x: 0.734375, y: 0.140625 }, - { x: 0.765625, y: 0.140625 }, - { x: 0.765625, y: 0.140625 }, - { x: 0.796875, y: 0.140625 }, - { x: 0.796875, y: 0.140625 }, - { x: 0.828125, y: 0.140625 }, - { x: 0.828125, y: 0.140625 }, - { x: 0.859375, y: 0.140625 }, - { x: 0.859375, y: 0.140625 }, - { x: 0.890625, y: 0.140625 }, - { x: 0.890625, y: 0.140625 }, - { x: 0.921875, y: 0.140625 }, - { x: 0.921875, y: 0.140625 }, - { x: 0.953125, y: 0.140625 }, - { x: 0.953125, y: 0.140625 }, - { x: 0.984375, y: 0.140625 }, - { x: 0.984375, y: 0.140625 }, - { x: 0.015625, y: 0.171875 }, - { x: 0.015625, y: 0.171875 }, - { x: 0.046875, y: 0.171875 }, - { x: 0.046875, y: 0.171875 }, - { x: 0.078125, y: 0.171875 }, - { x: 0.078125, y: 0.171875 }, - { x: 0.109375, y: 0.171875 }, - { x: 0.109375, y: 0.171875 }, - { x: 0.140625, y: 0.171875 }, - { x: 0.140625, y: 0.171875 }, - { x: 0.171875, y: 0.171875 }, - { x: 0.171875, y: 0.171875 }, - { x: 0.203125, y: 0.171875 }, - { x: 0.203125, y: 0.171875 }, - { x: 0.234375, y: 0.171875 }, - { x: 0.234375, y: 0.171875 }, - { x: 0.265625, y: 0.171875 }, - { x: 0.265625, y: 0.171875 }, - { x: 0.296875, y: 0.171875 }, - { x: 0.296875, y: 0.171875 }, - { x: 0.328125, y: 0.171875 }, - { x: 0.328125, y: 0.171875 }, - { x: 0.359375, y: 0.171875 }, - { x: 0.359375, y: 0.171875 }, - { x: 0.390625, y: 0.171875 }, - { x: 0.390625, y: 0.171875 }, - { x: 0.421875, y: 0.171875 }, - { x: 0.421875, y: 0.171875 }, - { x: 0.453125, y: 0.171875 }, - { x: 0.453125, y: 0.171875 }, - { x: 0.484375, y: 0.171875 }, - { x: 0.484375, y: 0.171875 }, - { x: 0.515625, y: 0.171875 }, - { x: 0.515625, y: 0.171875 }, - { x: 0.546875, y: 0.171875 }, - { x: 0.546875, y: 0.171875 }, - { x: 0.578125, y: 0.171875 }, - { x: 0.578125, y: 0.171875 }, - { x: 0.609375, y: 0.171875 }, - { x: 0.609375, y: 0.171875 }, - { x: 0.640625, y: 0.171875 }, - { x: 0.640625, y: 0.171875 }, - { x: 0.671875, y: 0.171875 }, - { x: 0.671875, y: 0.171875 }, - { x: 0.703125, y: 0.171875 }, - { x: 0.703125, y: 0.171875 }, - { x: 0.734375, y: 0.171875 }, - { x: 0.734375, y: 0.171875 }, - { x: 0.765625, y: 0.171875 }, - { x: 0.765625, y: 0.171875 }, - { x: 0.796875, y: 0.171875 }, - { x: 0.796875, y: 0.171875 }, - { x: 0.828125, y: 0.171875 }, - { x: 0.828125, y: 0.171875 }, - { x: 0.859375, y: 0.171875 }, - { x: 0.859375, y: 0.171875 }, - { x: 0.890625, y: 0.171875 }, - { x: 0.890625, y: 0.171875 }, - { x: 0.921875, y: 0.171875 }, - { x: 0.921875, y: 0.171875 }, - { x: 0.953125, y: 0.171875 }, - { x: 0.953125, y: 0.171875 }, - { x: 0.984375, y: 0.171875 }, - { x: 0.984375, y: 0.171875 }, - { x: 0.015625, y: 0.203125 }, - { x: 0.015625, y: 0.203125 }, - { x: 0.046875, y: 0.203125 }, - { x: 0.046875, y: 0.203125 }, - { x: 0.078125, y: 0.203125 }, - { x: 0.078125, y: 0.203125 }, - { x: 0.109375, y: 0.203125 }, - { x: 0.109375, y: 0.203125 }, - { x: 0.140625, y: 0.203125 }, - { x: 0.140625, y: 0.203125 }, - { x: 0.171875, y: 0.203125 }, - { x: 0.171875, y: 0.203125 }, - { x: 0.203125, y: 0.203125 }, - { x: 0.203125, y: 0.203125 }, - { x: 0.234375, y: 0.203125 }, - { x: 0.234375, y: 0.203125 }, - { x: 0.265625, y: 0.203125 }, - { x: 0.265625, y: 0.203125 }, - { x: 0.296875, y: 0.203125 }, - { x: 0.296875, y: 0.203125 }, - { x: 0.328125, y: 0.203125 }, - { x: 0.328125, y: 0.203125 }, - { x: 0.359375, y: 0.203125 }, - { x: 0.359375, y: 0.203125 }, - { x: 0.390625, y: 0.203125 }, - { x: 0.390625, y: 0.203125 }, - { x: 0.421875, y: 0.203125 }, - { x: 0.421875, y: 0.203125 }, - { x: 0.453125, y: 0.203125 }, - { x: 0.453125, y: 0.203125 }, - { x: 0.484375, y: 0.203125 }, - { x: 0.484375, y: 0.203125 }, - { x: 0.515625, y: 0.203125 }, - { x: 0.515625, y: 0.203125 }, - { x: 0.546875, y: 0.203125 }, - { x: 0.546875, y: 0.203125 }, - { x: 0.578125, y: 0.203125 }, - { x: 0.578125, y: 0.203125 }, - { x: 0.609375, y: 0.203125 }, - { x: 0.609375, y: 0.203125 }, - { x: 0.640625, y: 0.203125 }, - { x: 0.640625, y: 0.203125 }, - { x: 0.671875, y: 0.203125 }, - { x: 0.671875, y: 0.203125 }, - { x: 0.703125, y: 0.203125 }, - { x: 0.703125, y: 0.203125 }, - { x: 0.734375, y: 0.203125 }, - { x: 0.734375, y: 0.203125 }, - { x: 0.765625, y: 0.203125 }, - { x: 0.765625, y: 0.203125 }, - { x: 0.796875, y: 0.203125 }, - { x: 0.796875, y: 0.203125 }, - { x: 0.828125, y: 0.203125 }, - { x: 0.828125, y: 0.203125 }, - { x: 0.859375, y: 0.203125 }, - { x: 0.859375, y: 0.203125 }, - { x: 0.890625, y: 0.203125 }, - { x: 0.890625, y: 0.203125 }, - { x: 0.921875, y: 0.203125 }, - { x: 0.921875, y: 0.203125 }, - { x: 0.953125, y: 0.203125 }, - { x: 0.953125, y: 0.203125 }, - { x: 0.984375, y: 0.203125 }, - { x: 0.984375, y: 0.203125 }, - { x: 0.015625, y: 0.234375 }, - { x: 0.015625, y: 0.234375 }, - { x: 0.046875, y: 0.234375 }, - { x: 0.046875, y: 0.234375 }, - { x: 0.078125, y: 0.234375 }, - { x: 0.078125, y: 0.234375 }, - { x: 0.109375, y: 0.234375 }, - { x: 0.109375, y: 0.234375 }, - { x: 0.140625, y: 0.234375 }, - { x: 0.140625, y: 0.234375 }, - { x: 0.171875, y: 0.234375 }, - { x: 0.171875, y: 0.234375 }, - { x: 0.203125, y: 0.234375 }, - { x: 0.203125, y: 0.234375 }, - { x: 0.234375, y: 0.234375 }, - { x: 0.234375, y: 0.234375 }, - { x: 0.265625, y: 0.234375 }, - { x: 0.265625, y: 0.234375 }, - { x: 0.296875, y: 0.234375 }, - { x: 0.296875, y: 0.234375 }, - { x: 0.328125, y: 0.234375 }, - { x: 0.328125, y: 0.234375 }, - { x: 0.359375, y: 0.234375 }, - { x: 0.359375, y: 0.234375 }, - { x: 0.390625, y: 0.234375 }, - { x: 0.390625, y: 0.234375 }, - { x: 0.421875, y: 0.234375 }, - { x: 0.421875, y: 0.234375 }, - { x: 0.453125, y: 0.234375 }, - { x: 0.453125, y: 0.234375 }, - { x: 0.484375, y: 0.234375 }, - { x: 0.484375, y: 0.234375 }, - { x: 0.515625, y: 0.234375 }, - { x: 0.515625, y: 0.234375 }, - { x: 0.546875, y: 0.234375 }, - { x: 0.546875, y: 0.234375 }, - { x: 0.578125, y: 0.234375 }, - { x: 0.578125, y: 0.234375 }, - { x: 0.609375, y: 0.234375 }, - { x: 0.609375, y: 0.234375 }, - { x: 0.640625, y: 0.234375 }, - { x: 0.640625, y: 0.234375 }, - { x: 0.671875, y: 0.234375 }, - { x: 0.671875, y: 0.234375 }, - { x: 0.703125, y: 0.234375 }, - { x: 0.703125, y: 0.234375 }, - { x: 0.734375, y: 0.234375 }, - { x: 0.734375, y: 0.234375 }, - { x: 0.765625, y: 0.234375 }, - { x: 0.765625, y: 0.234375 }, - { x: 0.796875, y: 0.234375 }, - { x: 0.796875, y: 0.234375 }, - { x: 0.828125, y: 0.234375 }, - { x: 0.828125, y: 0.234375 }, - { x: 0.859375, y: 0.234375 }, - { x: 0.859375, y: 0.234375 }, - { x: 0.890625, y: 0.234375 }, - { x: 0.890625, y: 0.234375 }, - { x: 0.921875, y: 0.234375 }, - { x: 0.921875, y: 0.234375 }, - { x: 0.953125, y: 0.234375 }, - { x: 0.953125, y: 0.234375 }, - { x: 0.984375, y: 0.234375 }, - { x: 0.984375, y: 0.234375 }, - { x: 0.015625, y: 0.265625 }, - { x: 0.015625, y: 0.265625 }, - { x: 0.046875, y: 0.265625 }, - { x: 0.046875, y: 0.265625 }, - { x: 0.078125, y: 0.265625 }, - { x: 0.078125, y: 0.265625 }, - { x: 0.109375, y: 0.265625 }, - { x: 0.109375, y: 0.265625 }, - { x: 0.140625, y: 0.265625 }, - { x: 0.140625, y: 0.265625 }, - { x: 0.171875, y: 0.265625 }, - { x: 0.171875, y: 0.265625 }, - { x: 0.203125, y: 0.265625 }, - { x: 0.203125, y: 0.265625 }, - { x: 0.234375, y: 0.265625 }, - { x: 0.234375, y: 0.265625 }, - { x: 0.265625, y: 0.265625 }, - { x: 0.265625, y: 0.265625 }, - { x: 0.296875, y: 0.265625 }, - { x: 0.296875, y: 0.265625 }, - { x: 0.328125, y: 0.265625 }, - { x: 0.328125, y: 0.265625 }, - { x: 0.359375, y: 0.265625 }, - { x: 0.359375, y: 0.265625 }, - { x: 0.390625, y: 0.265625 }, - { x: 0.390625, y: 0.265625 }, - { x: 0.421875, y: 0.265625 }, - { x: 0.421875, y: 0.265625 }, - { x: 0.453125, y: 0.265625 }, - { x: 0.453125, y: 0.265625 }, - { x: 0.484375, y: 0.265625 }, - { x: 0.484375, y: 0.265625 }, - { x: 0.515625, y: 0.265625 }, - { x: 0.515625, y: 0.265625 }, - { x: 0.546875, y: 0.265625 }, - { x: 0.546875, y: 0.265625 }, - { x: 0.578125, y: 0.265625 }, - { x: 0.578125, y: 0.265625 }, - { x: 0.609375, y: 0.265625 }, - { x: 0.609375, y: 0.265625 }, - { x: 0.640625, y: 0.265625 }, - { x: 0.640625, y: 0.265625 }, - { x: 0.671875, y: 0.265625 }, - { x: 0.671875, y: 0.265625 }, - { x: 0.703125, y: 0.265625 }, - { x: 0.703125, y: 0.265625 }, - { x: 0.734375, y: 0.265625 }, - { x: 0.734375, y: 0.265625 }, - { x: 0.765625, y: 0.265625 }, - { x: 0.765625, y: 0.265625 }, - { x: 0.796875, y: 0.265625 }, - { x: 0.796875, y: 0.265625 }, - { x: 0.828125, y: 0.265625 }, - { x: 0.828125, y: 0.265625 }, - { x: 0.859375, y: 0.265625 }, - { x: 0.859375, y: 0.265625 }, - { x: 0.890625, y: 0.265625 }, - { x: 0.890625, y: 0.265625 }, - { x: 0.921875, y: 0.265625 }, - { x: 0.921875, y: 0.265625 }, - { x: 0.953125, y: 0.265625 }, - { x: 0.953125, y: 0.265625 }, - { x: 0.984375, y: 0.265625 }, - { x: 0.984375, y: 0.265625 }, - { x: 0.015625, y: 0.296875 }, - { x: 0.015625, y: 0.296875 }, - { x: 0.046875, y: 0.296875 }, - { x: 0.046875, y: 0.296875 }, - { x: 0.078125, y: 0.296875 }, - { x: 0.078125, y: 0.296875 }, - { x: 0.109375, y: 0.296875 }, - { x: 0.109375, y: 0.296875 }, - { x: 0.140625, y: 0.296875 }, - { x: 0.140625, y: 0.296875 }, - { x: 0.171875, y: 0.296875 }, - { x: 0.171875, y: 0.296875 }, - { x: 0.203125, y: 0.296875 }, - { x: 0.203125, y: 0.296875 }, - { x: 0.234375, y: 0.296875 }, - { x: 0.234375, y: 0.296875 }, - { x: 0.265625, y: 0.296875 }, - { x: 0.265625, y: 0.296875 }, - { x: 0.296875, y: 0.296875 }, - { x: 0.296875, y: 0.296875 }, - { x: 0.328125, y: 0.296875 }, - { x: 0.328125, y: 0.296875 }, - { x: 0.359375, y: 0.296875 }, - { x: 0.359375, y: 0.296875 }, - { x: 0.390625, y: 0.296875 }, - { x: 0.390625, y: 0.296875 }, - { x: 0.421875, y: 0.296875 }, - { x: 0.421875, y: 0.296875 }, - { x: 0.453125, y: 0.296875 }, - { x: 0.453125, y: 0.296875 }, - { x: 0.484375, y: 0.296875 }, - { x: 0.484375, y: 0.296875 }, - { x: 0.515625, y: 0.296875 }, - { x: 0.515625, y: 0.296875 }, - { x: 0.546875, y: 0.296875 }, - { x: 0.546875, y: 0.296875 }, - { x: 0.578125, y: 0.296875 }, - { x: 0.578125, y: 0.296875 }, - { x: 0.609375, y: 0.296875 }, - { x: 0.609375, y: 0.296875 }, - { x: 0.640625, y: 0.296875 }, - { x: 0.640625, y: 0.296875 }, - { x: 0.671875, y: 0.296875 }, - { x: 0.671875, y: 0.296875 }, - { x: 0.703125, y: 0.296875 }, - { x: 0.703125, y: 0.296875 }, - { x: 0.734375, y: 0.296875 }, - { x: 0.734375, y: 0.296875 }, - { x: 0.765625, y: 0.296875 }, - { x: 0.765625, y: 0.296875 }, - { x: 0.796875, y: 0.296875 }, - { x: 0.796875, y: 0.296875 }, - { x: 0.828125, y: 0.296875 }, - { x: 0.828125, y: 0.296875 }, - { x: 0.859375, y: 0.296875 }, - { x: 0.859375, y: 0.296875 }, - { x: 0.890625, y: 0.296875 }, - { x: 0.890625, y: 0.296875 }, - { x: 0.921875, y: 0.296875 }, - { x: 0.921875, y: 0.296875 }, - { x: 0.953125, y: 0.296875 }, - { x: 0.953125, y: 0.296875 }, - { x: 0.984375, y: 0.296875 }, - { x: 0.984375, y: 0.296875 }, - { x: 0.015625, y: 0.328125 }, - { x: 0.015625, y: 0.328125 }, - { x: 0.046875, y: 0.328125 }, - { x: 0.046875, y: 0.328125 }, - { x: 0.078125, y: 0.328125 }, - { x: 0.078125, y: 0.328125 }, - { x: 0.109375, y: 0.328125 }, - { x: 0.109375, y: 0.328125 }, - { x: 0.140625, y: 0.328125 }, - { x: 0.140625, y: 0.328125 }, - { x: 0.171875, y: 0.328125 }, - { x: 0.171875, y: 0.328125 }, - { x: 0.203125, y: 0.328125 }, - { x: 0.203125, y: 0.328125 }, - { x: 0.234375, y: 0.328125 }, - { x: 0.234375, y: 0.328125 }, - { x: 0.265625, y: 0.328125 }, - { x: 0.265625, y: 0.328125 }, - { x: 0.296875, y: 0.328125 }, - { x: 0.296875, y: 0.328125 }, - { x: 0.328125, y: 0.328125 }, - { x: 0.328125, y: 0.328125 }, - { x: 0.359375, y: 0.328125 }, - { x: 0.359375, y: 0.328125 }, - { x: 0.390625, y: 0.328125 }, - { x: 0.390625, y: 0.328125 }, - { x: 0.421875, y: 0.328125 }, - { x: 0.421875, y: 0.328125 }, - { x: 0.453125, y: 0.328125 }, - { x: 0.453125, y: 0.328125 }, - { x: 0.484375, y: 0.328125 }, - { x: 0.484375, y: 0.328125 }, - { x: 0.515625, y: 0.328125 }, - { x: 0.515625, y: 0.328125 }, - { x: 0.546875, y: 0.328125 }, - { x: 0.546875, y: 0.328125 }, - { x: 0.578125, y: 0.328125 }, - { x: 0.578125, y: 0.328125 }, - { x: 0.609375, y: 0.328125 }, - { x: 0.609375, y: 0.328125 }, - { x: 0.640625, y: 0.328125 }, - { x: 0.640625, y: 0.328125 }, - { x: 0.671875, y: 0.328125 }, - { x: 0.671875, y: 0.328125 }, - { x: 0.703125, y: 0.328125 }, - { x: 0.703125, y: 0.328125 }, - { x: 0.734375, y: 0.328125 }, - { x: 0.734375, y: 0.328125 }, - { x: 0.765625, y: 0.328125 }, - { x: 0.765625, y: 0.328125 }, - { x: 0.796875, y: 0.328125 }, - { x: 0.796875, y: 0.328125 }, - { x: 0.828125, y: 0.328125 }, - { x: 0.828125, y: 0.328125 }, - { x: 0.859375, y: 0.328125 }, - { x: 0.859375, y: 0.328125 }, - { x: 0.890625, y: 0.328125 }, - { x: 0.890625, y: 0.328125 }, - { x: 0.921875, y: 0.328125 }, - { x: 0.921875, y: 0.328125 }, - { x: 0.953125, y: 0.328125 }, - { x: 0.953125, y: 0.328125 }, - { x: 0.984375, y: 0.328125 }, - { x: 0.984375, y: 0.328125 }, - { x: 0.015625, y: 0.359375 }, - { x: 0.015625, y: 0.359375 }, - { x: 0.046875, y: 0.359375 }, - { x: 0.046875, y: 0.359375 }, - { x: 0.078125, y: 0.359375 }, - { x: 0.078125, y: 0.359375 }, - { x: 0.109375, y: 0.359375 }, - { x: 0.109375, y: 0.359375 }, - { x: 0.140625, y: 0.359375 }, - { x: 0.140625, y: 0.359375 }, - { x: 0.171875, y: 0.359375 }, - { x: 0.171875, y: 0.359375 }, - { x: 0.203125, y: 0.359375 }, - { x: 0.203125, y: 0.359375 }, - { x: 0.234375, y: 0.359375 }, - { x: 0.234375, y: 0.359375 }, - { x: 0.265625, y: 0.359375 }, - { x: 0.265625, y: 0.359375 }, - { x: 0.296875, y: 0.359375 }, - { x: 0.296875, y: 0.359375 }, - { x: 0.328125, y: 0.359375 }, - { x: 0.328125, y: 0.359375 }, - { x: 0.359375, y: 0.359375 }, - { x: 0.359375, y: 0.359375 }, - { x: 0.390625, y: 0.359375 }, - { x: 0.390625, y: 0.359375 }, - { x: 0.421875, y: 0.359375 }, - { x: 0.421875, y: 0.359375 }, - { x: 0.453125, y: 0.359375 }, - { x: 0.453125, y: 0.359375 }, - { x: 0.484375, y: 0.359375 }, - { x: 0.484375, y: 0.359375 }, - { x: 0.515625, y: 0.359375 }, - { x: 0.515625, y: 0.359375 }, - { x: 0.546875, y: 0.359375 }, - { x: 0.546875, y: 0.359375 }, - { x: 0.578125, y: 0.359375 }, - { x: 0.578125, y: 0.359375 }, - { x: 0.609375, y: 0.359375 }, - { x: 0.609375, y: 0.359375 }, - { x: 0.640625, y: 0.359375 }, - { x: 0.640625, y: 0.359375 }, - { x: 0.671875, y: 0.359375 }, - { x: 0.671875, y: 0.359375 }, - { x: 0.703125, y: 0.359375 }, - { x: 0.703125, y: 0.359375 }, - { x: 0.734375, y: 0.359375 }, - { x: 0.734375, y: 0.359375 }, - { x: 0.765625, y: 0.359375 }, - { x: 0.765625, y: 0.359375 }, - { x: 0.796875, y: 0.359375 }, - { x: 0.796875, y: 0.359375 }, - { x: 0.828125, y: 0.359375 }, - { x: 0.828125, y: 0.359375 }, - { x: 0.859375, y: 0.359375 }, - { x: 0.859375, y: 0.359375 }, - { x: 0.890625, y: 0.359375 }, - { x: 0.890625, y: 0.359375 }, - { x: 0.921875, y: 0.359375 }, - { x: 0.921875, y: 0.359375 }, - { x: 0.953125, y: 0.359375 }, - { x: 0.953125, y: 0.359375 }, - { x: 0.984375, y: 0.359375 }, - { x: 0.984375, y: 0.359375 }, - { x: 0.015625, y: 0.390625 }, - { x: 0.015625, y: 0.390625 }, - { x: 0.046875, y: 0.390625 }, - { x: 0.046875, y: 0.390625 }, - { x: 0.078125, y: 0.390625 }, - { x: 0.078125, y: 0.390625 }, - { x: 0.109375, y: 0.390625 }, - { x: 0.109375, y: 0.390625 }, - { x: 0.140625, y: 0.390625 }, - { x: 0.140625, y: 0.390625 }, - { x: 0.171875, y: 0.390625 }, - { x: 0.171875, y: 0.390625 }, - { x: 0.203125, y: 0.390625 }, - { x: 0.203125, y: 0.390625 }, - { x: 0.234375, y: 0.390625 }, - { x: 0.234375, y: 0.390625 }, - { x: 0.265625, y: 0.390625 }, - { x: 0.265625, y: 0.390625 }, - { x: 0.296875, y: 0.390625 }, - { x: 0.296875, y: 0.390625 }, - { x: 0.328125, y: 0.390625 }, - { x: 0.328125, y: 0.390625 }, - { x: 0.359375, y: 0.390625 }, - { x: 0.359375, y: 0.390625 }, - { x: 0.390625, y: 0.390625 }, - { x: 0.390625, y: 0.390625 }, - { x: 0.421875, y: 0.390625 }, - { x: 0.421875, y: 0.390625 }, - { x: 0.453125, y: 0.390625 }, - { x: 0.453125, y: 0.390625 }, - { x: 0.484375, y: 0.390625 }, - { x: 0.484375, y: 0.390625 }, - { x: 0.515625, y: 0.390625 }, - { x: 0.515625, y: 0.390625 }, - { x: 0.546875, y: 0.390625 }, - { x: 0.546875, y: 0.390625 }, - { x: 0.578125, y: 0.390625 }, - { x: 0.578125, y: 0.390625 }, - { x: 0.609375, y: 0.390625 }, - { x: 0.609375, y: 0.390625 }, - { x: 0.640625, y: 0.390625 }, - { x: 0.640625, y: 0.390625 }, - { x: 0.671875, y: 0.390625 }, - { x: 0.671875, y: 0.390625 }, - { x: 0.703125, y: 0.390625 }, - { x: 0.703125, y: 0.390625 }, - { x: 0.734375, y: 0.390625 }, - { x: 0.734375, y: 0.390625 }, - { x: 0.765625, y: 0.390625 }, - { x: 0.765625, y: 0.390625 }, - { x: 0.796875, y: 0.390625 }, - { x: 0.796875, y: 0.390625 }, - { x: 0.828125, y: 0.390625 }, - { x: 0.828125, y: 0.390625 }, - { x: 0.859375, y: 0.390625 }, - { x: 0.859375, y: 0.390625 }, - { x: 0.890625, y: 0.390625 }, - { x: 0.890625, y: 0.390625 }, - { x: 0.921875, y: 0.390625 }, - { x: 0.921875, y: 0.390625 }, - { x: 0.953125, y: 0.390625 }, - { x: 0.953125, y: 0.390625 }, - { x: 0.984375, y: 0.390625 }, - { x: 0.984375, y: 0.390625 }, - { x: 0.015625, y: 0.421875 }, - { x: 0.015625, y: 0.421875 }, - { x: 0.046875, y: 0.421875 }, - { x: 0.046875, y: 0.421875 }, - { x: 0.078125, y: 0.421875 }, - { x: 0.078125, y: 0.421875 }, - { x: 0.109375, y: 0.421875 }, - { x: 0.109375, y: 0.421875 }, - { x: 0.140625, y: 0.421875 }, - { x: 0.140625, y: 0.421875 }, - { x: 0.171875, y: 0.421875 }, - { x: 0.171875, y: 0.421875 }, - { x: 0.203125, y: 0.421875 }, - { x: 0.203125, y: 0.421875 }, - { x: 0.234375, y: 0.421875 }, - { x: 0.234375, y: 0.421875 }, - { x: 0.265625, y: 0.421875 }, - { x: 0.265625, y: 0.421875 }, - { x: 0.296875, y: 0.421875 }, - { x: 0.296875, y: 0.421875 }, - { x: 0.328125, y: 0.421875 }, - { x: 0.328125, y: 0.421875 }, - { x: 0.359375, y: 0.421875 }, - { x: 0.359375, y: 0.421875 }, - { x: 0.390625, y: 0.421875 }, - { x: 0.390625, y: 0.421875 }, - { x: 0.421875, y: 0.421875 }, - { x: 0.421875, y: 0.421875 }, - { x: 0.453125, y: 0.421875 }, - { x: 0.453125, y: 0.421875 }, - { x: 0.484375, y: 0.421875 }, - { x: 0.484375, y: 0.421875 }, - { x: 0.515625, y: 0.421875 }, - { x: 0.515625, y: 0.421875 }, - { x: 0.546875, y: 0.421875 }, - { x: 0.546875, y: 0.421875 }, - { x: 0.578125, y: 0.421875 }, - { x: 0.578125, y: 0.421875 }, - { x: 0.609375, y: 0.421875 }, - { x: 0.609375, y: 0.421875 }, - { x: 0.640625, y: 0.421875 }, - { x: 0.640625, y: 0.421875 }, - { x: 0.671875, y: 0.421875 }, - { x: 0.671875, y: 0.421875 }, - { x: 0.703125, y: 0.421875 }, - { x: 0.703125, y: 0.421875 }, - { x: 0.734375, y: 0.421875 }, - { x: 0.734375, y: 0.421875 }, - { x: 0.765625, y: 0.421875 }, - { x: 0.765625, y: 0.421875 }, - { x: 0.796875, y: 0.421875 }, - { x: 0.796875, y: 0.421875 }, - { x: 0.828125, y: 0.421875 }, - { x: 0.828125, y: 0.421875 }, - { x: 0.859375, y: 0.421875 }, - { x: 0.859375, y: 0.421875 }, - { x: 0.890625, y: 0.421875 }, - { x: 0.890625, y: 0.421875 }, - { x: 0.921875, y: 0.421875 }, - { x: 0.921875, y: 0.421875 }, - { x: 0.953125, y: 0.421875 }, - { x: 0.953125, y: 0.421875 }, - { x: 0.984375, y: 0.421875 }, - { x: 0.984375, y: 0.421875 }, - { x: 0.015625, y: 0.453125 }, - { x: 0.015625, y: 0.453125 }, - { x: 0.046875, y: 0.453125 }, - { x: 0.046875, y: 0.453125 }, - { x: 0.078125, y: 0.453125 }, - { x: 0.078125, y: 0.453125 }, - { x: 0.109375, y: 0.453125 }, - { x: 0.109375, y: 0.453125 }, - { x: 0.140625, y: 0.453125 }, - { x: 0.140625, y: 0.453125 }, - { x: 0.171875, y: 0.453125 }, - { x: 0.171875, y: 0.453125 }, - { x: 0.203125, y: 0.453125 }, - { x: 0.203125, y: 0.453125 }, - { x: 0.234375, y: 0.453125 }, - { x: 0.234375, y: 0.453125 }, - { x: 0.265625, y: 0.453125 }, - { x: 0.265625, y: 0.453125 }, - { x: 0.296875, y: 0.453125 }, - { x: 0.296875, y: 0.453125 }, - { x: 0.328125, y: 0.453125 }, - { x: 0.328125, y: 0.453125 }, - { x: 0.359375, y: 0.453125 }, - { x: 0.359375, y: 0.453125 }, - { x: 0.390625, y: 0.453125 }, - { x: 0.390625, y: 0.453125 }, - { x: 0.421875, y: 0.453125 }, - { x: 0.421875, y: 0.453125 }, - { x: 0.453125, y: 0.453125 }, - { x: 0.453125, y: 0.453125 }, - { x: 0.484375, y: 0.453125 }, - { x: 0.484375, y: 0.453125 }, - { x: 0.515625, y: 0.453125 }, - { x: 0.515625, y: 0.453125 }, - { x: 0.546875, y: 0.453125 }, - { x: 0.546875, y: 0.453125 }, - { x: 0.578125, y: 0.453125 }, - { x: 0.578125, y: 0.453125 }, - { x: 0.609375, y: 0.453125 }, - { x: 0.609375, y: 0.453125 }, - { x: 0.640625, y: 0.453125 }, - { x: 0.640625, y: 0.453125 }, - { x: 0.671875, y: 0.453125 }, - { x: 0.671875, y: 0.453125 }, - { x: 0.703125, y: 0.453125 }, - { x: 0.703125, y: 0.453125 }, - { x: 0.734375, y: 0.453125 }, - { x: 0.734375, y: 0.453125 }, - { x: 0.765625, y: 0.453125 }, - { x: 0.765625, y: 0.453125 }, - { x: 0.796875, y: 0.453125 }, - { x: 0.796875, y: 0.453125 }, - { x: 0.828125, y: 0.453125 }, - { x: 0.828125, y: 0.453125 }, - { x: 0.859375, y: 0.453125 }, - { x: 0.859375, y: 0.453125 }, - { x: 0.890625, y: 0.453125 }, - { x: 0.890625, y: 0.453125 }, - { x: 0.921875, y: 0.453125 }, - { x: 0.921875, y: 0.453125 }, - { x: 0.953125, y: 0.453125 }, - { x: 0.953125, y: 0.453125 }, - { x: 0.984375, y: 0.453125 }, - { x: 0.984375, y: 0.453125 }, - { x: 0.015625, y: 0.484375 }, - { x: 0.015625, y: 0.484375 }, - { x: 0.046875, y: 0.484375 }, - { x: 0.046875, y: 0.484375 }, - { x: 0.078125, y: 0.484375 }, - { x: 0.078125, y: 0.484375 }, - { x: 0.109375, y: 0.484375 }, - { x: 0.109375, y: 0.484375 }, - { x: 0.140625, y: 0.484375 }, - { x: 0.140625, y: 0.484375 }, - { x: 0.171875, y: 0.484375 }, - { x: 0.171875, y: 0.484375 }, - { x: 0.203125, y: 0.484375 }, - { x: 0.203125, y: 0.484375 }, - { x: 0.234375, y: 0.484375 }, - { x: 0.234375, y: 0.484375 }, - { x: 0.265625, y: 0.484375 }, - { x: 0.265625, y: 0.484375 }, - { x: 0.296875, y: 0.484375 }, - { x: 0.296875, y: 0.484375 }, - { x: 0.328125, y: 0.484375 }, - { x: 0.328125, y: 0.484375 }, - { x: 0.359375, y: 0.484375 }, - { x: 0.359375, y: 0.484375 }, - { x: 0.390625, y: 0.484375 }, - { x: 0.390625, y: 0.484375 }, - { x: 0.421875, y: 0.484375 }, - { x: 0.421875, y: 0.484375 }, - { x: 0.453125, y: 0.484375 }, - { x: 0.453125, y: 0.484375 }, - { x: 0.484375, y: 0.484375 }, - { x: 0.484375, y: 0.484375 }, - { x: 0.515625, y: 0.484375 }, - { x: 0.515625, y: 0.484375 }, - { x: 0.546875, y: 0.484375 }, - { x: 0.546875, y: 0.484375 }, - { x: 0.578125, y: 0.484375 }, - { x: 0.578125, y: 0.484375 }, - { x: 0.609375, y: 0.484375 }, - { x: 0.609375, y: 0.484375 }, - { x: 0.640625, y: 0.484375 }, - { x: 0.640625, y: 0.484375 }, - { x: 0.671875, y: 0.484375 }, - { x: 0.671875, y: 0.484375 }, - { x: 0.703125, y: 0.484375 }, - { x: 0.703125, y: 0.484375 }, - { x: 0.734375, y: 0.484375 }, - { x: 0.734375, y: 0.484375 }, - { x: 0.765625, y: 0.484375 }, - { x: 0.765625, y: 0.484375 }, - { x: 0.796875, y: 0.484375 }, - { x: 0.796875, y: 0.484375 }, - { x: 0.828125, y: 0.484375 }, - { x: 0.828125, y: 0.484375 }, - { x: 0.859375, y: 0.484375 }, - { x: 0.859375, y: 0.484375 }, - { x: 0.890625, y: 0.484375 }, - { x: 0.890625, y: 0.484375 }, - { x: 0.921875, y: 0.484375 }, - { x: 0.921875, y: 0.484375 }, - { x: 0.953125, y: 0.484375 }, - { x: 0.953125, y: 0.484375 }, - { x: 0.984375, y: 0.484375 }, - { x: 0.984375, y: 0.484375 }, - { x: 0.015625, y: 0.515625 }, - { x: 0.015625, y: 0.515625 }, - { x: 0.046875, y: 0.515625 }, - { x: 0.046875, y: 0.515625 }, - { x: 0.078125, y: 0.515625 }, - { x: 0.078125, y: 0.515625 }, - { x: 0.109375, y: 0.515625 }, - { x: 0.109375, y: 0.515625 }, - { x: 0.140625, y: 0.515625 }, - { x: 0.140625, y: 0.515625 }, - { x: 0.171875, y: 0.515625 }, - { x: 0.171875, y: 0.515625 }, - { x: 0.203125, y: 0.515625 }, - { x: 0.203125, y: 0.515625 }, - { x: 0.234375, y: 0.515625 }, - { x: 0.234375, y: 0.515625 }, - { x: 0.265625, y: 0.515625 }, - { x: 0.265625, y: 0.515625 }, - { x: 0.296875, y: 0.515625 }, - { x: 0.296875, y: 0.515625 }, - { x: 0.328125, y: 0.515625 }, - { x: 0.328125, y: 0.515625 }, - { x: 0.359375, y: 0.515625 }, - { x: 0.359375, y: 0.515625 }, - { x: 0.390625, y: 0.515625 }, - { x: 0.390625, y: 0.515625 }, - { x: 0.421875, y: 0.515625 }, - { x: 0.421875, y: 0.515625 }, - { x: 0.453125, y: 0.515625 }, - { x: 0.453125, y: 0.515625 }, - { x: 0.484375, y: 0.515625 }, - { x: 0.484375, y: 0.515625 }, - { x: 0.515625, y: 0.515625 }, - { x: 0.515625, y: 0.515625 }, - { x: 0.546875, y: 0.515625 }, - { x: 0.546875, y: 0.515625 }, - { x: 0.578125, y: 0.515625 }, - { x: 0.578125, y: 0.515625 }, - { x: 0.609375, y: 0.515625 }, - { x: 0.609375, y: 0.515625 }, - { x: 0.640625, y: 0.515625 }, - { x: 0.640625, y: 0.515625 }, - { x: 0.671875, y: 0.515625 }, - { x: 0.671875, y: 0.515625 }, - { x: 0.703125, y: 0.515625 }, - { x: 0.703125, y: 0.515625 }, - { x: 0.734375, y: 0.515625 }, - { x: 0.734375, y: 0.515625 }, - { x: 0.765625, y: 0.515625 }, - { x: 0.765625, y: 0.515625 }, - { x: 0.796875, y: 0.515625 }, - { x: 0.796875, y: 0.515625 }, - { x: 0.828125, y: 0.515625 }, - { x: 0.828125, y: 0.515625 }, - { x: 0.859375, y: 0.515625 }, - { x: 0.859375, y: 0.515625 }, - { x: 0.890625, y: 0.515625 }, - { x: 0.890625, y: 0.515625 }, - { x: 0.921875, y: 0.515625 }, - { x: 0.921875, y: 0.515625 }, - { x: 0.953125, y: 0.515625 }, - { x: 0.953125, y: 0.515625 }, - { x: 0.984375, y: 0.515625 }, - { x: 0.984375, y: 0.515625 }, - { x: 0.015625, y: 0.546875 }, - { x: 0.015625, y: 0.546875 }, - { x: 0.046875, y: 0.546875 }, - { x: 0.046875, y: 0.546875 }, - { x: 0.078125, y: 0.546875 }, - { x: 0.078125, y: 0.546875 }, - { x: 0.109375, y: 0.546875 }, - { x: 0.109375, y: 0.546875 }, - { x: 0.140625, y: 0.546875 }, - { x: 0.140625, y: 0.546875 }, - { x: 0.171875, y: 0.546875 }, - { x: 0.171875, y: 0.546875 }, - { x: 0.203125, y: 0.546875 }, - { x: 0.203125, y: 0.546875 }, - { x: 0.234375, y: 0.546875 }, - { x: 0.234375, y: 0.546875 }, - { x: 0.265625, y: 0.546875 }, - { x: 0.265625, y: 0.546875 }, - { x: 0.296875, y: 0.546875 }, - { x: 0.296875, y: 0.546875 }, - { x: 0.328125, y: 0.546875 }, - { x: 0.328125, y: 0.546875 }, - { x: 0.359375, y: 0.546875 }, - { x: 0.359375, y: 0.546875 }, - { x: 0.390625, y: 0.546875 }, - { x: 0.390625, y: 0.546875 }, - { x: 0.421875, y: 0.546875 }, - { x: 0.421875, y: 0.546875 }, - { x: 0.453125, y: 0.546875 }, - { x: 0.453125, y: 0.546875 }, - { x: 0.484375, y: 0.546875 }, - { x: 0.484375, y: 0.546875 }, - { x: 0.515625, y: 0.546875 }, - { x: 0.515625, y: 0.546875 }, - { x: 0.546875, y: 0.546875 }, - { x: 0.546875, y: 0.546875 }, - { x: 0.578125, y: 0.546875 }, - { x: 0.578125, y: 0.546875 }, - { x: 0.609375, y: 0.546875 }, - { x: 0.609375, y: 0.546875 }, - { x: 0.640625, y: 0.546875 }, - { x: 0.640625, y: 0.546875 }, - { x: 0.671875, y: 0.546875 }, - { x: 0.671875, y: 0.546875 }, - { x: 0.703125, y: 0.546875 }, - { x: 0.703125, y: 0.546875 }, - { x: 0.734375, y: 0.546875 }, - { x: 0.734375, y: 0.546875 }, - { x: 0.765625, y: 0.546875 }, - { x: 0.765625, y: 0.546875 }, - { x: 0.796875, y: 0.546875 }, - { x: 0.796875, y: 0.546875 }, - { x: 0.828125, y: 0.546875 }, - { x: 0.828125, y: 0.546875 }, - { x: 0.859375, y: 0.546875 }, - { x: 0.859375, y: 0.546875 }, - { x: 0.890625, y: 0.546875 }, - { x: 0.890625, y: 0.546875 }, - { x: 0.921875, y: 0.546875 }, - { x: 0.921875, y: 0.546875 }, - { x: 0.953125, y: 0.546875 }, - { x: 0.953125, y: 0.546875 }, - { x: 0.984375, y: 0.546875 }, - { x: 0.984375, y: 0.546875 }, - { x: 0.015625, y: 0.578125 }, - { x: 0.015625, y: 0.578125 }, - { x: 0.046875, y: 0.578125 }, - { x: 0.046875, y: 0.578125 }, - { x: 0.078125, y: 0.578125 }, - { x: 0.078125, y: 0.578125 }, - { x: 0.109375, y: 0.578125 }, - { x: 0.109375, y: 0.578125 }, - { x: 0.140625, y: 0.578125 }, - { x: 0.140625, y: 0.578125 }, - { x: 0.171875, y: 0.578125 }, - { x: 0.171875, y: 0.578125 }, - { x: 0.203125, y: 0.578125 }, - { x: 0.203125, y: 0.578125 }, - { x: 0.234375, y: 0.578125 }, - { x: 0.234375, y: 0.578125 }, - { x: 0.265625, y: 0.578125 }, - { x: 0.265625, y: 0.578125 }, - { x: 0.296875, y: 0.578125 }, - { x: 0.296875, y: 0.578125 }, - { x: 0.328125, y: 0.578125 }, - { x: 0.328125, y: 0.578125 }, - { x: 0.359375, y: 0.578125 }, - { x: 0.359375, y: 0.578125 }, - { x: 0.390625, y: 0.578125 }, - { x: 0.390625, y: 0.578125 }, - { x: 0.421875, y: 0.578125 }, - { x: 0.421875, y: 0.578125 }, - { x: 0.453125, y: 0.578125 }, - { x: 0.453125, y: 0.578125 }, - { x: 0.484375, y: 0.578125 }, - { x: 0.484375, y: 0.578125 }, - { x: 0.515625, y: 0.578125 }, - { x: 0.515625, y: 0.578125 }, - { x: 0.546875, y: 0.578125 }, - { x: 0.546875, y: 0.578125 }, - { x: 0.578125, y: 0.578125 }, - { x: 0.578125, y: 0.578125 }, - { x: 0.609375, y: 0.578125 }, - { x: 0.609375, y: 0.578125 }, - { x: 0.640625, y: 0.578125 }, - { x: 0.640625, y: 0.578125 }, - { x: 0.671875, y: 0.578125 }, - { x: 0.671875, y: 0.578125 }, - { x: 0.703125, y: 0.578125 }, - { x: 0.703125, y: 0.578125 }, - { x: 0.734375, y: 0.578125 }, - { x: 0.734375, y: 0.578125 }, - { x: 0.765625, y: 0.578125 }, - { x: 0.765625, y: 0.578125 }, - { x: 0.796875, y: 0.578125 }, - { x: 0.796875, y: 0.578125 }, - { x: 0.828125, y: 0.578125 }, - { x: 0.828125, y: 0.578125 }, - { x: 0.859375, y: 0.578125 }, - { x: 0.859375, y: 0.578125 }, - { x: 0.890625, y: 0.578125 }, - { x: 0.890625, y: 0.578125 }, - { x: 0.921875, y: 0.578125 }, - { x: 0.921875, y: 0.578125 }, - { x: 0.953125, y: 0.578125 }, - { x: 0.953125, y: 0.578125 }, - { x: 0.984375, y: 0.578125 }, - { x: 0.984375, y: 0.578125 }, - { x: 0.015625, y: 0.609375 }, - { x: 0.015625, y: 0.609375 }, - { x: 0.046875, y: 0.609375 }, - { x: 0.046875, y: 0.609375 }, - { x: 0.078125, y: 0.609375 }, - { x: 0.078125, y: 0.609375 }, - { x: 0.109375, y: 0.609375 }, - { x: 0.109375, y: 0.609375 }, - { x: 0.140625, y: 0.609375 }, - { x: 0.140625, y: 0.609375 }, - { x: 0.171875, y: 0.609375 }, - { x: 0.171875, y: 0.609375 }, - { x: 0.203125, y: 0.609375 }, - { x: 0.203125, y: 0.609375 }, - { x: 0.234375, y: 0.609375 }, - { x: 0.234375, y: 0.609375 }, - { x: 0.265625, y: 0.609375 }, - { x: 0.265625, y: 0.609375 }, - { x: 0.296875, y: 0.609375 }, - { x: 0.296875, y: 0.609375 }, - { x: 0.328125, y: 0.609375 }, - { x: 0.328125, y: 0.609375 }, - { x: 0.359375, y: 0.609375 }, - { x: 0.359375, y: 0.609375 }, - { x: 0.390625, y: 0.609375 }, - { x: 0.390625, y: 0.609375 }, - { x: 0.421875, y: 0.609375 }, - { x: 0.421875, y: 0.609375 }, - { x: 0.453125, y: 0.609375 }, - { x: 0.453125, y: 0.609375 }, - { x: 0.484375, y: 0.609375 }, - { x: 0.484375, y: 0.609375 }, - { x: 0.515625, y: 0.609375 }, - { x: 0.515625, y: 0.609375 }, - { x: 0.546875, y: 0.609375 }, - { x: 0.546875, y: 0.609375 }, - { x: 0.578125, y: 0.609375 }, - { x: 0.578125, y: 0.609375 }, - { x: 0.609375, y: 0.609375 }, - { x: 0.609375, y: 0.609375 }, - { x: 0.640625, y: 0.609375 }, - { x: 0.640625, y: 0.609375 }, - { x: 0.671875, y: 0.609375 }, - { x: 0.671875, y: 0.609375 }, - { x: 0.703125, y: 0.609375 }, - { x: 0.703125, y: 0.609375 }, - { x: 0.734375, y: 0.609375 }, - { x: 0.734375, y: 0.609375 }, - { x: 0.765625, y: 0.609375 }, - { x: 0.765625, y: 0.609375 }, - { x: 0.796875, y: 0.609375 }, - { x: 0.796875, y: 0.609375 }, - { x: 0.828125, y: 0.609375 }, - { x: 0.828125, y: 0.609375 }, - { x: 0.859375, y: 0.609375 }, - { x: 0.859375, y: 0.609375 }, - { x: 0.890625, y: 0.609375 }, - { x: 0.890625, y: 0.609375 }, - { x: 0.921875, y: 0.609375 }, - { x: 0.921875, y: 0.609375 }, - { x: 0.953125, y: 0.609375 }, - { x: 0.953125, y: 0.609375 }, - { x: 0.984375, y: 0.609375 }, - { x: 0.984375, y: 0.609375 }, - { x: 0.015625, y: 0.640625 }, - { x: 0.015625, y: 0.640625 }, - { x: 0.046875, y: 0.640625 }, - { x: 0.046875, y: 0.640625 }, - { x: 0.078125, y: 0.640625 }, - { x: 0.078125, y: 0.640625 }, - { x: 0.109375, y: 0.640625 }, - { x: 0.109375, y: 0.640625 }, - { x: 0.140625, y: 0.640625 }, - { x: 0.140625, y: 0.640625 }, - { x: 0.171875, y: 0.640625 }, - { x: 0.171875, y: 0.640625 }, - { x: 0.203125, y: 0.640625 }, - { x: 0.203125, y: 0.640625 }, - { x: 0.234375, y: 0.640625 }, - { x: 0.234375, y: 0.640625 }, - { x: 0.265625, y: 0.640625 }, - { x: 0.265625, y: 0.640625 }, - { x: 0.296875, y: 0.640625 }, - { x: 0.296875, y: 0.640625 }, - { x: 0.328125, y: 0.640625 }, - { x: 0.328125, y: 0.640625 }, - { x: 0.359375, y: 0.640625 }, - { x: 0.359375, y: 0.640625 }, - { x: 0.390625, y: 0.640625 }, - { x: 0.390625, y: 0.640625 }, - { x: 0.421875, y: 0.640625 }, - { x: 0.421875, y: 0.640625 }, - { x: 0.453125, y: 0.640625 }, - { x: 0.453125, y: 0.640625 }, - { x: 0.484375, y: 0.640625 }, - { x: 0.484375, y: 0.640625 }, - { x: 0.515625, y: 0.640625 }, - { x: 0.515625, y: 0.640625 }, - { x: 0.546875, y: 0.640625 }, - { x: 0.546875, y: 0.640625 }, - { x: 0.578125, y: 0.640625 }, - { x: 0.578125, y: 0.640625 }, - { x: 0.609375, y: 0.640625 }, - { x: 0.609375, y: 0.640625 }, - { x: 0.640625, y: 0.640625 }, - { x: 0.640625, y: 0.640625 }, - { x: 0.671875, y: 0.640625 }, - { x: 0.671875, y: 0.640625 }, - { x: 0.703125, y: 0.640625 }, - { x: 0.703125, y: 0.640625 }, - { x: 0.734375, y: 0.640625 }, - { x: 0.734375, y: 0.640625 }, - { x: 0.765625, y: 0.640625 }, - { x: 0.765625, y: 0.640625 }, - { x: 0.796875, y: 0.640625 }, - { x: 0.796875, y: 0.640625 }, - { x: 0.828125, y: 0.640625 }, - { x: 0.828125, y: 0.640625 }, - { x: 0.859375, y: 0.640625 }, - { x: 0.859375, y: 0.640625 }, - { x: 0.890625, y: 0.640625 }, - { x: 0.890625, y: 0.640625 }, - { x: 0.921875, y: 0.640625 }, - { x: 0.921875, y: 0.640625 }, - { x: 0.953125, y: 0.640625 }, - { x: 0.953125, y: 0.640625 }, - { x: 0.984375, y: 0.640625 }, - { x: 0.984375, y: 0.640625 }, - { x: 0.015625, y: 0.671875 }, - { x: 0.015625, y: 0.671875 }, - { x: 0.046875, y: 0.671875 }, - { x: 0.046875, y: 0.671875 }, - { x: 0.078125, y: 0.671875 }, - { x: 0.078125, y: 0.671875 }, - { x: 0.109375, y: 0.671875 }, - { x: 0.109375, y: 0.671875 }, - { x: 0.140625, y: 0.671875 }, - { x: 0.140625, y: 0.671875 }, - { x: 0.171875, y: 0.671875 }, - { x: 0.171875, y: 0.671875 }, - { x: 0.203125, y: 0.671875 }, - { x: 0.203125, y: 0.671875 }, - { x: 0.234375, y: 0.671875 }, - { x: 0.234375, y: 0.671875 }, - { x: 0.265625, y: 0.671875 }, - { x: 0.265625, y: 0.671875 }, - { x: 0.296875, y: 0.671875 }, - { x: 0.296875, y: 0.671875 }, - { x: 0.328125, y: 0.671875 }, - { x: 0.328125, y: 0.671875 }, - { x: 0.359375, y: 0.671875 }, - { x: 0.359375, y: 0.671875 }, - { x: 0.390625, y: 0.671875 }, - { x: 0.390625, y: 0.671875 }, - { x: 0.421875, y: 0.671875 }, - { x: 0.421875, y: 0.671875 }, - { x: 0.453125, y: 0.671875 }, - { x: 0.453125, y: 0.671875 }, - { x: 0.484375, y: 0.671875 }, - { x: 0.484375, y: 0.671875 }, - { x: 0.515625, y: 0.671875 }, - { x: 0.515625, y: 0.671875 }, - { x: 0.546875, y: 0.671875 }, - { x: 0.546875, y: 0.671875 }, - { x: 0.578125, y: 0.671875 }, - { x: 0.578125, y: 0.671875 }, - { x: 0.609375, y: 0.671875 }, - { x: 0.609375, y: 0.671875 }, - { x: 0.640625, y: 0.671875 }, - { x: 0.640625, y: 0.671875 }, - { x: 0.671875, y: 0.671875 }, - { x: 0.671875, y: 0.671875 }, - { x: 0.703125, y: 0.671875 }, - { x: 0.703125, y: 0.671875 }, - { x: 0.734375, y: 0.671875 }, - { x: 0.734375, y: 0.671875 }, - { x: 0.765625, y: 0.671875 }, - { x: 0.765625, y: 0.671875 }, - { x: 0.796875, y: 0.671875 }, - { x: 0.796875, y: 0.671875 }, - { x: 0.828125, y: 0.671875 }, - { x: 0.828125, y: 0.671875 }, - { x: 0.859375, y: 0.671875 }, - { x: 0.859375, y: 0.671875 }, - { x: 0.890625, y: 0.671875 }, - { x: 0.890625, y: 0.671875 }, - { x: 0.921875, y: 0.671875 }, - { x: 0.921875, y: 0.671875 }, - { x: 0.953125, y: 0.671875 }, - { x: 0.953125, y: 0.671875 }, - { x: 0.984375, y: 0.671875 }, - { x: 0.984375, y: 0.671875 }, - { x: 0.015625, y: 0.703125 }, - { x: 0.015625, y: 0.703125 }, - { x: 0.046875, y: 0.703125 }, - { x: 0.046875, y: 0.703125 }, - { x: 0.078125, y: 0.703125 }, - { x: 0.078125, y: 0.703125 }, - { x: 0.109375, y: 0.703125 }, - { x: 0.109375, y: 0.703125 }, - { x: 0.140625, y: 0.703125 }, - { x: 0.140625, y: 0.703125 }, - { x: 0.171875, y: 0.703125 }, - { x: 0.171875, y: 0.703125 }, - { x: 0.203125, y: 0.703125 }, - { x: 0.203125, y: 0.703125 }, - { x: 0.234375, y: 0.703125 }, - { x: 0.234375, y: 0.703125 }, - { x: 0.265625, y: 0.703125 }, - { x: 0.265625, y: 0.703125 }, - { x: 0.296875, y: 0.703125 }, - { x: 0.296875, y: 0.703125 }, - { x: 0.328125, y: 0.703125 }, - { x: 0.328125, y: 0.703125 }, - { x: 0.359375, y: 0.703125 }, - { x: 0.359375, y: 0.703125 }, - { x: 0.390625, y: 0.703125 }, - { x: 0.390625, y: 0.703125 }, - { x: 0.421875, y: 0.703125 }, - { x: 0.421875, y: 0.703125 }, - { x: 0.453125, y: 0.703125 }, - { x: 0.453125, y: 0.703125 }, - { x: 0.484375, y: 0.703125 }, - { x: 0.484375, y: 0.703125 }, - { x: 0.515625, y: 0.703125 }, - { x: 0.515625, y: 0.703125 }, - { x: 0.546875, y: 0.703125 }, - { x: 0.546875, y: 0.703125 }, - { x: 0.578125, y: 0.703125 }, - { x: 0.578125, y: 0.703125 }, - { x: 0.609375, y: 0.703125 }, - { x: 0.609375, y: 0.703125 }, - { x: 0.640625, y: 0.703125 }, - { x: 0.640625, y: 0.703125 }, - { x: 0.671875, y: 0.703125 }, - { x: 0.671875, y: 0.703125 }, - { x: 0.703125, y: 0.703125 }, - { x: 0.703125, y: 0.703125 }, - { x: 0.734375, y: 0.703125 }, - { x: 0.734375, y: 0.703125 }, - { x: 0.765625, y: 0.703125 }, - { x: 0.765625, y: 0.703125 }, - { x: 0.796875, y: 0.703125 }, - { x: 0.796875, y: 0.703125 }, - { x: 0.828125, y: 0.703125 }, - { x: 0.828125, y: 0.703125 }, - { x: 0.859375, y: 0.703125 }, - { x: 0.859375, y: 0.703125 }, - { x: 0.890625, y: 0.703125 }, - { x: 0.890625, y: 0.703125 }, - { x: 0.921875, y: 0.703125 }, - { x: 0.921875, y: 0.703125 }, - { x: 0.953125, y: 0.703125 }, - { x: 0.953125, y: 0.703125 }, - { x: 0.984375, y: 0.703125 }, - { x: 0.984375, y: 0.703125 }, - { x: 0.015625, y: 0.734375 }, - { x: 0.015625, y: 0.734375 }, - { x: 0.046875, y: 0.734375 }, - { x: 0.046875, y: 0.734375 }, - { x: 0.078125, y: 0.734375 }, - { x: 0.078125, y: 0.734375 }, - { x: 0.109375, y: 0.734375 }, - { x: 0.109375, y: 0.734375 }, - { x: 0.140625, y: 0.734375 }, - { x: 0.140625, y: 0.734375 }, - { x: 0.171875, y: 0.734375 }, - { x: 0.171875, y: 0.734375 }, - { x: 0.203125, y: 0.734375 }, - { x: 0.203125, y: 0.734375 }, - { x: 0.234375, y: 0.734375 }, - { x: 0.234375, y: 0.734375 }, - { x: 0.265625, y: 0.734375 }, - { x: 0.265625, y: 0.734375 }, - { x: 0.296875, y: 0.734375 }, - { x: 0.296875, y: 0.734375 }, - { x: 0.328125, y: 0.734375 }, - { x: 0.328125, y: 0.734375 }, - { x: 0.359375, y: 0.734375 }, - { x: 0.359375, y: 0.734375 }, - { x: 0.390625, y: 0.734375 }, - { x: 0.390625, y: 0.734375 }, - { x: 0.421875, y: 0.734375 }, - { x: 0.421875, y: 0.734375 }, - { x: 0.453125, y: 0.734375 }, - { x: 0.453125, y: 0.734375 }, - { x: 0.484375, y: 0.734375 }, - { x: 0.484375, y: 0.734375 }, - { x: 0.515625, y: 0.734375 }, - { x: 0.515625, y: 0.734375 }, - { x: 0.546875, y: 0.734375 }, - { x: 0.546875, y: 0.734375 }, - { x: 0.578125, y: 0.734375 }, - { x: 0.578125, y: 0.734375 }, - { x: 0.609375, y: 0.734375 }, - { x: 0.609375, y: 0.734375 }, - { x: 0.640625, y: 0.734375 }, - { x: 0.640625, y: 0.734375 }, - { x: 0.671875, y: 0.734375 }, - { x: 0.671875, y: 0.734375 }, - { x: 0.703125, y: 0.734375 }, - { x: 0.703125, y: 0.734375 }, - { x: 0.734375, y: 0.734375 }, - { x: 0.734375, y: 0.734375 }, - { x: 0.765625, y: 0.734375 }, - { x: 0.765625, y: 0.734375 }, - { x: 0.796875, y: 0.734375 }, - { x: 0.796875, y: 0.734375 }, - { x: 0.828125, y: 0.734375 }, - { x: 0.828125, y: 0.734375 }, - { x: 0.859375, y: 0.734375 }, - { x: 0.859375, y: 0.734375 }, - { x: 0.890625, y: 0.734375 }, - { x: 0.890625, y: 0.734375 }, - { x: 0.921875, y: 0.734375 }, - { x: 0.921875, y: 0.734375 }, - { x: 0.953125, y: 0.734375 }, - { x: 0.953125, y: 0.734375 }, - { x: 0.984375, y: 0.734375 }, - { x: 0.984375, y: 0.734375 }, - { x: 0.015625, y: 0.765625 }, - { x: 0.015625, y: 0.765625 }, - { x: 0.046875, y: 0.765625 }, - { x: 0.046875, y: 0.765625 }, - { x: 0.078125, y: 0.765625 }, - { x: 0.078125, y: 0.765625 }, - { x: 0.109375, y: 0.765625 }, - { x: 0.109375, y: 0.765625 }, - { x: 0.140625, y: 0.765625 }, - { x: 0.140625, y: 0.765625 }, - { x: 0.171875, y: 0.765625 }, - { x: 0.171875, y: 0.765625 }, - { x: 0.203125, y: 0.765625 }, - { x: 0.203125, y: 0.765625 }, - { x: 0.234375, y: 0.765625 }, - { x: 0.234375, y: 0.765625 }, - { x: 0.265625, y: 0.765625 }, - { x: 0.265625, y: 0.765625 }, - { x: 0.296875, y: 0.765625 }, - { x: 0.296875, y: 0.765625 }, - { x: 0.328125, y: 0.765625 }, - { x: 0.328125, y: 0.765625 }, - { x: 0.359375, y: 0.765625 }, - { x: 0.359375, y: 0.765625 }, - { x: 0.390625, y: 0.765625 }, - { x: 0.390625, y: 0.765625 }, - { x: 0.421875, y: 0.765625 }, - { x: 0.421875, y: 0.765625 }, - { x: 0.453125, y: 0.765625 }, - { x: 0.453125, y: 0.765625 }, - { x: 0.484375, y: 0.765625 }, - { x: 0.484375, y: 0.765625 }, - { x: 0.515625, y: 0.765625 }, - { x: 0.515625, y: 0.765625 }, - { x: 0.546875, y: 0.765625 }, - { x: 0.546875, y: 0.765625 }, - { x: 0.578125, y: 0.765625 }, - { x: 0.578125, y: 0.765625 }, - { x: 0.609375, y: 0.765625 }, - { x: 0.609375, y: 0.765625 }, - { x: 0.640625, y: 0.765625 }, - { x: 0.640625, y: 0.765625 }, - { x: 0.671875, y: 0.765625 }, - { x: 0.671875, y: 0.765625 }, - { x: 0.703125, y: 0.765625 }, - { x: 0.703125, y: 0.765625 }, - { x: 0.734375, y: 0.765625 }, - { x: 0.734375, y: 0.765625 }, - { x: 0.765625, y: 0.765625 }, - { x: 0.765625, y: 0.765625 }, - { x: 0.796875, y: 0.765625 }, - { x: 0.796875, y: 0.765625 }, - { x: 0.828125, y: 0.765625 }, - { x: 0.828125, y: 0.765625 }, - { x: 0.859375, y: 0.765625 }, - { x: 0.859375, y: 0.765625 }, - { x: 0.890625, y: 0.765625 }, - { x: 0.890625, y: 0.765625 }, - { x: 0.921875, y: 0.765625 }, - { x: 0.921875, y: 0.765625 }, - { x: 0.953125, y: 0.765625 }, - { x: 0.953125, y: 0.765625 }, - { x: 0.984375, y: 0.765625 }, - { x: 0.984375, y: 0.765625 }, - { x: 0.015625, y: 0.796875 }, - { x: 0.015625, y: 0.796875 }, - { x: 0.046875, y: 0.796875 }, - { x: 0.046875, y: 0.796875 }, - { x: 0.078125, y: 0.796875 }, - { x: 0.078125, y: 0.796875 }, - { x: 0.109375, y: 0.796875 }, - { x: 0.109375, y: 0.796875 }, - { x: 0.140625, y: 0.796875 }, - { x: 0.140625, y: 0.796875 }, - { x: 0.171875, y: 0.796875 }, - { x: 0.171875, y: 0.796875 }, - { x: 0.203125, y: 0.796875 }, - { x: 0.203125, y: 0.796875 }, - { x: 0.234375, y: 0.796875 }, - { x: 0.234375, y: 0.796875 }, - { x: 0.265625, y: 0.796875 }, - { x: 0.265625, y: 0.796875 }, - { x: 0.296875, y: 0.796875 }, - { x: 0.296875, y: 0.796875 }, - { x: 0.328125, y: 0.796875 }, - { x: 0.328125, y: 0.796875 }, - { x: 0.359375, y: 0.796875 }, - { x: 0.359375, y: 0.796875 }, - { x: 0.390625, y: 0.796875 }, - { x: 0.390625, y: 0.796875 }, - { x: 0.421875, y: 0.796875 }, - { x: 0.421875, y: 0.796875 }, - { x: 0.453125, y: 0.796875 }, - { x: 0.453125, y: 0.796875 }, - { x: 0.484375, y: 0.796875 }, - { x: 0.484375, y: 0.796875 }, - { x: 0.515625, y: 0.796875 }, - { x: 0.515625, y: 0.796875 }, - { x: 0.546875, y: 0.796875 }, - { x: 0.546875, y: 0.796875 }, - { x: 0.578125, y: 0.796875 }, - { x: 0.578125, y: 0.796875 }, - { x: 0.609375, y: 0.796875 }, - { x: 0.609375, y: 0.796875 }, - { x: 0.640625, y: 0.796875 }, - { x: 0.640625, y: 0.796875 }, - { x: 0.671875, y: 0.796875 }, - { x: 0.671875, y: 0.796875 }, - { x: 0.703125, y: 0.796875 }, - { x: 0.703125, y: 0.796875 }, - { x: 0.734375, y: 0.796875 }, - { x: 0.734375, y: 0.796875 }, - { x: 0.765625, y: 0.796875 }, - { x: 0.765625, y: 0.796875 }, - { x: 0.796875, y: 0.796875 }, - { x: 0.796875, y: 0.796875 }, - { x: 0.828125, y: 0.796875 }, - { x: 0.828125, y: 0.796875 }, - { x: 0.859375, y: 0.796875 }, - { x: 0.859375, y: 0.796875 }, - { x: 0.890625, y: 0.796875 }, - { x: 0.890625, y: 0.796875 }, - { x: 0.921875, y: 0.796875 }, - { x: 0.921875, y: 0.796875 }, - { x: 0.953125, y: 0.796875 }, - { x: 0.953125, y: 0.796875 }, - { x: 0.984375, y: 0.796875 }, - { x: 0.984375, y: 0.796875 }, - { x: 0.015625, y: 0.828125 }, - { x: 0.015625, y: 0.828125 }, - { x: 0.046875, y: 0.828125 }, - { x: 0.046875, y: 0.828125 }, - { x: 0.078125, y: 0.828125 }, - { x: 0.078125, y: 0.828125 }, - { x: 0.109375, y: 0.828125 }, - { x: 0.109375, y: 0.828125 }, - { x: 0.140625, y: 0.828125 }, - { x: 0.140625, y: 0.828125 }, - { x: 0.171875, y: 0.828125 }, - { x: 0.171875, y: 0.828125 }, - { x: 0.203125, y: 0.828125 }, - { x: 0.203125, y: 0.828125 }, - { x: 0.234375, y: 0.828125 }, - { x: 0.234375, y: 0.828125 }, - { x: 0.265625, y: 0.828125 }, - { x: 0.265625, y: 0.828125 }, - { x: 0.296875, y: 0.828125 }, - { x: 0.296875, y: 0.828125 }, - { x: 0.328125, y: 0.828125 }, - { x: 0.328125, y: 0.828125 }, - { x: 0.359375, y: 0.828125 }, - { x: 0.359375, y: 0.828125 }, - { x: 0.390625, y: 0.828125 }, - { x: 0.390625, y: 0.828125 }, - { x: 0.421875, y: 0.828125 }, - { x: 0.421875, y: 0.828125 }, - { x: 0.453125, y: 0.828125 }, - { x: 0.453125, y: 0.828125 }, - { x: 0.484375, y: 0.828125 }, - { x: 0.484375, y: 0.828125 }, - { x: 0.515625, y: 0.828125 }, - { x: 0.515625, y: 0.828125 }, - { x: 0.546875, y: 0.828125 }, - { x: 0.546875, y: 0.828125 }, - { x: 0.578125, y: 0.828125 }, - { x: 0.578125, y: 0.828125 }, - { x: 0.609375, y: 0.828125 }, - { x: 0.609375, y: 0.828125 }, - { x: 0.640625, y: 0.828125 }, - { x: 0.640625, y: 0.828125 }, - { x: 0.671875, y: 0.828125 }, - { x: 0.671875, y: 0.828125 }, - { x: 0.703125, y: 0.828125 }, - { x: 0.703125, y: 0.828125 }, - { x: 0.734375, y: 0.828125 }, - { x: 0.734375, y: 0.828125 }, - { x: 0.765625, y: 0.828125 }, - { x: 0.765625, y: 0.828125 }, - { x: 0.796875, y: 0.828125 }, - { x: 0.796875, y: 0.828125 }, - { x: 0.828125, y: 0.828125 }, - { x: 0.828125, y: 0.828125 }, - { x: 0.859375, y: 0.828125 }, - { x: 0.859375, y: 0.828125 }, - { x: 0.890625, y: 0.828125 }, - { x: 0.890625, y: 0.828125 }, - { x: 0.921875, y: 0.828125 }, - { x: 0.921875, y: 0.828125 }, - { x: 0.953125, y: 0.828125 }, - { x: 0.953125, y: 0.828125 }, - { x: 0.984375, y: 0.828125 }, - { x: 0.984375, y: 0.828125 }, - { x: 0.015625, y: 0.859375 }, - { x: 0.015625, y: 0.859375 }, - { x: 0.046875, y: 0.859375 }, - { x: 0.046875, y: 0.859375 }, - { x: 0.078125, y: 0.859375 }, - { x: 0.078125, y: 0.859375 }, - { x: 0.109375, y: 0.859375 }, - { x: 0.109375, y: 0.859375 }, - { x: 0.140625, y: 0.859375 }, - { x: 0.140625, y: 0.859375 }, - { x: 0.171875, y: 0.859375 }, - { x: 0.171875, y: 0.859375 }, - { x: 0.203125, y: 0.859375 }, - { x: 0.203125, y: 0.859375 }, - { x: 0.234375, y: 0.859375 }, - { x: 0.234375, y: 0.859375 }, - { x: 0.265625, y: 0.859375 }, - { x: 0.265625, y: 0.859375 }, - { x: 0.296875, y: 0.859375 }, - { x: 0.296875, y: 0.859375 }, - { x: 0.328125, y: 0.859375 }, - { x: 0.328125, y: 0.859375 }, - { x: 0.359375, y: 0.859375 }, - { x: 0.359375, y: 0.859375 }, - { x: 0.390625, y: 0.859375 }, - { x: 0.390625, y: 0.859375 }, - { x: 0.421875, y: 0.859375 }, - { x: 0.421875, y: 0.859375 }, - { x: 0.453125, y: 0.859375 }, - { x: 0.453125, y: 0.859375 }, - { x: 0.484375, y: 0.859375 }, - { x: 0.484375, y: 0.859375 }, - { x: 0.515625, y: 0.859375 }, - { x: 0.515625, y: 0.859375 }, - { x: 0.546875, y: 0.859375 }, - { x: 0.546875, y: 0.859375 }, - { x: 0.578125, y: 0.859375 }, - { x: 0.578125, y: 0.859375 }, - { x: 0.609375, y: 0.859375 }, - { x: 0.609375, y: 0.859375 }, - { x: 0.640625, y: 0.859375 }, - { x: 0.640625, y: 0.859375 }, - { x: 0.671875, y: 0.859375 }, - { x: 0.671875, y: 0.859375 }, - { x: 0.703125, y: 0.859375 }, - { x: 0.703125, y: 0.859375 }, - { x: 0.734375, y: 0.859375 }, - { x: 0.734375, y: 0.859375 }, - { x: 0.765625, y: 0.859375 }, - { x: 0.765625, y: 0.859375 }, - { x: 0.796875, y: 0.859375 }, - { x: 0.796875, y: 0.859375 }, - { x: 0.828125, y: 0.859375 }, - { x: 0.828125, y: 0.859375 }, - { x: 0.859375, y: 0.859375 }, - { x: 0.859375, y: 0.859375 }, - { x: 0.890625, y: 0.859375 }, - { x: 0.890625, y: 0.859375 }, - { x: 0.921875, y: 0.859375 }, - { x: 0.921875, y: 0.859375 }, - { x: 0.953125, y: 0.859375 }, - { x: 0.953125, y: 0.859375 }, - { x: 0.984375, y: 0.859375 }, - { x: 0.984375, y: 0.859375 }, - { x: 0.015625, y: 0.890625 }, - { x: 0.015625, y: 0.890625 }, - { x: 0.046875, y: 0.890625 }, - { x: 0.046875, y: 0.890625 }, - { x: 0.078125, y: 0.890625 }, - { x: 0.078125, y: 0.890625 }, - { x: 0.109375, y: 0.890625 }, - { x: 0.109375, y: 0.890625 }, - { x: 0.140625, y: 0.890625 }, - { x: 0.140625, y: 0.890625 }, - { x: 0.171875, y: 0.890625 }, - { x: 0.171875, y: 0.890625 }, - { x: 0.203125, y: 0.890625 }, - { x: 0.203125, y: 0.890625 }, - { x: 0.234375, y: 0.890625 }, - { x: 0.234375, y: 0.890625 }, - { x: 0.265625, y: 0.890625 }, - { x: 0.265625, y: 0.890625 }, - { x: 0.296875, y: 0.890625 }, - { x: 0.296875, y: 0.890625 }, - { x: 0.328125, y: 0.890625 }, - { x: 0.328125, y: 0.890625 }, - { x: 0.359375, y: 0.890625 }, - { x: 0.359375, y: 0.890625 }, - { x: 0.390625, y: 0.890625 }, - { x: 0.390625, y: 0.890625 }, - { x: 0.421875, y: 0.890625 }, - { x: 0.421875, y: 0.890625 }, - { x: 0.453125, y: 0.890625 }, - { x: 0.453125, y: 0.890625 }, - { x: 0.484375, y: 0.890625 }, - { x: 0.484375, y: 0.890625 }, - { x: 0.515625, y: 0.890625 }, - { x: 0.515625, y: 0.890625 }, - { x: 0.546875, y: 0.890625 }, - { x: 0.546875, y: 0.890625 }, - { x: 0.578125, y: 0.890625 }, - { x: 0.578125, y: 0.890625 }, - { x: 0.609375, y: 0.890625 }, - { x: 0.609375, y: 0.890625 }, - { x: 0.640625, y: 0.890625 }, - { x: 0.640625, y: 0.890625 }, - { x: 0.671875, y: 0.890625 }, - { x: 0.671875, y: 0.890625 }, - { x: 0.703125, y: 0.890625 }, - { x: 0.703125, y: 0.890625 }, - { x: 0.734375, y: 0.890625 }, - { x: 0.734375, y: 0.890625 }, - { x: 0.765625, y: 0.890625 }, - { x: 0.765625, y: 0.890625 }, - { x: 0.796875, y: 0.890625 }, - { x: 0.796875, y: 0.890625 }, - { x: 0.828125, y: 0.890625 }, - { x: 0.828125, y: 0.890625 }, - { x: 0.859375, y: 0.890625 }, - { x: 0.859375, y: 0.890625 }, - { x: 0.890625, y: 0.890625 }, - { x: 0.890625, y: 0.890625 }, - { x: 0.921875, y: 0.890625 }, - { x: 0.921875, y: 0.890625 }, - { x: 0.953125, y: 0.890625 }, - { x: 0.953125, y: 0.890625 }, - { x: 0.984375, y: 0.890625 }, - { x: 0.984375, y: 0.890625 }, - { x: 0.015625, y: 0.921875 }, - { x: 0.015625, y: 0.921875 }, - { x: 0.046875, y: 0.921875 }, - { x: 0.046875, y: 0.921875 }, - { x: 0.078125, y: 0.921875 }, - { x: 0.078125, y: 0.921875 }, - { x: 0.109375, y: 0.921875 }, - { x: 0.109375, y: 0.921875 }, - { x: 0.140625, y: 0.921875 }, - { x: 0.140625, y: 0.921875 }, - { x: 0.171875, y: 0.921875 }, - { x: 0.171875, y: 0.921875 }, - { x: 0.203125, y: 0.921875 }, - { x: 0.203125, y: 0.921875 }, - { x: 0.234375, y: 0.921875 }, - { x: 0.234375, y: 0.921875 }, - { x: 0.265625, y: 0.921875 }, - { x: 0.265625, y: 0.921875 }, - { x: 0.296875, y: 0.921875 }, - { x: 0.296875, y: 0.921875 }, - { x: 0.328125, y: 0.921875 }, - { x: 0.328125, y: 0.921875 }, - { x: 0.359375, y: 0.921875 }, - { x: 0.359375, y: 0.921875 }, - { x: 0.390625, y: 0.921875 }, - { x: 0.390625, y: 0.921875 }, - { x: 0.421875, y: 0.921875 }, - { x: 0.421875, y: 0.921875 }, - { x: 0.453125, y: 0.921875 }, - { x: 0.453125, y: 0.921875 }, - { x: 0.484375, y: 0.921875 }, - { x: 0.484375, y: 0.921875 }, - { x: 0.515625, y: 0.921875 }, - { x: 0.515625, y: 0.921875 }, - { x: 0.546875, y: 0.921875 }, - { x: 0.546875, y: 0.921875 }, - { x: 0.578125, y: 0.921875 }, - { x: 0.578125, y: 0.921875 }, - { x: 0.609375, y: 0.921875 }, - { x: 0.609375, y: 0.921875 }, - { x: 0.640625, y: 0.921875 }, - { x: 0.640625, y: 0.921875 }, - { x: 0.671875, y: 0.921875 }, - { x: 0.671875, y: 0.921875 }, - { x: 0.703125, y: 0.921875 }, - { x: 0.703125, y: 0.921875 }, - { x: 0.734375, y: 0.921875 }, - { x: 0.734375, y: 0.921875 }, - { x: 0.765625, y: 0.921875 }, - { x: 0.765625, y: 0.921875 }, - { x: 0.796875, y: 0.921875 }, - { x: 0.796875, y: 0.921875 }, - { x: 0.828125, y: 0.921875 }, - { x: 0.828125, y: 0.921875 }, - { x: 0.859375, y: 0.921875 }, - { x: 0.859375, y: 0.921875 }, - { x: 0.890625, y: 0.921875 }, - { x: 0.890625, y: 0.921875 }, - { x: 0.921875, y: 0.921875 }, - { x: 0.921875, y: 0.921875 }, - { x: 0.953125, y: 0.921875 }, - { x: 0.953125, y: 0.921875 }, - { x: 0.984375, y: 0.921875 }, - { x: 0.984375, y: 0.921875 }, - { x: 0.015625, y: 0.953125 }, - { x: 0.015625, y: 0.953125 }, - { x: 0.046875, y: 0.953125 }, - { x: 0.046875, y: 0.953125 }, - { x: 0.078125, y: 0.953125 }, - { x: 0.078125, y: 0.953125 }, - { x: 0.109375, y: 0.953125 }, - { x: 0.109375, y: 0.953125 }, - { x: 0.140625, y: 0.953125 }, - { x: 0.140625, y: 0.953125 }, - { x: 0.171875, y: 0.953125 }, - { x: 0.171875, y: 0.953125 }, - { x: 0.203125, y: 0.953125 }, - { x: 0.203125, y: 0.953125 }, - { x: 0.234375, y: 0.953125 }, - { x: 0.234375, y: 0.953125 }, - { x: 0.265625, y: 0.953125 }, - { x: 0.265625, y: 0.953125 }, - { x: 0.296875, y: 0.953125 }, - { x: 0.296875, y: 0.953125 }, - { x: 0.328125, y: 0.953125 }, - { x: 0.328125, y: 0.953125 }, - { x: 0.359375, y: 0.953125 }, - { x: 0.359375, y: 0.953125 }, - { x: 0.390625, y: 0.953125 }, - { x: 0.390625, y: 0.953125 }, - { x: 0.421875, y: 0.953125 }, - { x: 0.421875, y: 0.953125 }, - { x: 0.453125, y: 0.953125 }, - { x: 0.453125, y: 0.953125 }, - { x: 0.484375, y: 0.953125 }, - { x: 0.484375, y: 0.953125 }, - { x: 0.515625, y: 0.953125 }, - { x: 0.515625, y: 0.953125 }, - { x: 0.546875, y: 0.953125 }, - { x: 0.546875, y: 0.953125 }, - { x: 0.578125, y: 0.953125 }, - { x: 0.578125, y: 0.953125 }, - { x: 0.609375, y: 0.953125 }, - { x: 0.609375, y: 0.953125 }, - { x: 0.640625, y: 0.953125 }, - { x: 0.640625, y: 0.953125 }, - { x: 0.671875, y: 0.953125 }, - { x: 0.671875, y: 0.953125 }, - { x: 0.703125, y: 0.953125 }, - { x: 0.703125, y: 0.953125 }, - { x: 0.734375, y: 0.953125 }, - { x: 0.734375, y: 0.953125 }, - { x: 0.765625, y: 0.953125 }, - { x: 0.765625, y: 0.953125 }, - { x: 0.796875, y: 0.953125 }, - { x: 0.796875, y: 0.953125 }, - { x: 0.828125, y: 0.953125 }, - { x: 0.828125, y: 0.953125 }, - { x: 0.859375, y: 0.953125 }, - { x: 0.859375, y: 0.953125 }, - { x: 0.890625, y: 0.953125 }, - { x: 0.890625, y: 0.953125 }, - { x: 0.921875, y: 0.953125 }, - { x: 0.921875, y: 0.953125 }, - { x: 0.953125, y: 0.953125 }, - { x: 0.953125, y: 0.953125 }, - { x: 0.984375, y: 0.953125 }, - { x: 0.984375, y: 0.953125 }, - { x: 0.015625, y: 0.984375 }, - { x: 0.015625, y: 0.984375 }, - { x: 0.046875, y: 0.984375 }, - { x: 0.046875, y: 0.984375 }, - { x: 0.078125, y: 0.984375 }, - { x: 0.078125, y: 0.984375 }, - { x: 0.109375, y: 0.984375 }, - { x: 0.109375, y: 0.984375 }, - { x: 0.140625, y: 0.984375 }, - { x: 0.140625, y: 0.984375 }, - { x: 0.171875, y: 0.984375 }, - { x: 0.171875, y: 0.984375 }, - { x: 0.203125, y: 0.984375 }, - { x: 0.203125, y: 0.984375 }, - { x: 0.234375, y: 0.984375 }, - { x: 0.234375, y: 0.984375 }, - { x: 0.265625, y: 0.984375 }, - { x: 0.265625, y: 0.984375 }, - { x: 0.296875, y: 0.984375 }, - { x: 0.296875, y: 0.984375 }, - { x: 0.328125, y: 0.984375 }, - { x: 0.328125, y: 0.984375 }, - { x: 0.359375, y: 0.984375 }, - { x: 0.359375, y: 0.984375 }, - { x: 0.390625, y: 0.984375 }, - { x: 0.390625, y: 0.984375 }, - { x: 0.421875, y: 0.984375 }, - { x: 0.421875, y: 0.984375 }, - { x: 0.453125, y: 0.984375 }, - { x: 0.453125, y: 0.984375 }, - { x: 0.484375, y: 0.984375 }, - { x: 0.484375, y: 0.984375 }, - { x: 0.515625, y: 0.984375 }, - { x: 0.515625, y: 0.984375 }, - { x: 0.546875, y: 0.984375 }, - { x: 0.546875, y: 0.984375 }, - { x: 0.578125, y: 0.984375 }, - { x: 0.578125, y: 0.984375 }, - { x: 0.609375, y: 0.984375 }, - { x: 0.609375, y: 0.984375 }, - { x: 0.640625, y: 0.984375 }, - { x: 0.640625, y: 0.984375 }, - { x: 0.671875, y: 0.984375 }, - { x: 0.671875, y: 0.984375 }, - { x: 0.703125, y: 0.984375 }, - { x: 0.703125, y: 0.984375 }, - { x: 0.734375, y: 0.984375 }, - { x: 0.734375, y: 0.984375 }, - { x: 0.765625, y: 0.984375 }, - { x: 0.765625, y: 0.984375 }, - { x: 0.796875, y: 0.984375 }, - { x: 0.796875, y: 0.984375 }, - { x: 0.828125, y: 0.984375 }, - { x: 0.828125, y: 0.984375 }, - { x: 0.859375, y: 0.984375 }, - { x: 0.859375, y: 0.984375 }, - { x: 0.890625, y: 0.984375 }, - { x: 0.890625, y: 0.984375 }, - { x: 0.921875, y: 0.984375 }, - { x: 0.921875, y: 0.984375 }, - { x: 0.953125, y: 0.984375 }, - { x: 0.953125, y: 0.984375 }, - { x: 0.984375, y: 0.984375 }, - { x: 0.984375, y: 0.984375 }, - { x: 0.03125, y: 0.03125 }, - { x: 0.03125, y: 0.03125 }, - { x: 0.09375, y: 0.03125 }, - { x: 0.09375, y: 0.03125 }, - { x: 0.15625, y: 0.03125 }, - { x: 0.15625, y: 0.03125 }, - { x: 0.21875, y: 0.03125 }, - { x: 0.21875, y: 0.03125 }, - { x: 0.28125, y: 0.03125 }, - { x: 0.28125, y: 0.03125 }, - { x: 0.34375, y: 0.03125 }, - { x: 0.34375, y: 0.03125 }, - { x: 0.40625, y: 0.03125 }, - { x: 0.40625, y: 0.03125 }, - { x: 0.46875, y: 0.03125 }, - { x: 0.46875, y: 0.03125 }, - { x: 0.53125, y: 0.03125 }, - { x: 0.53125, y: 0.03125 }, - { x: 0.59375, y: 0.03125 }, - { x: 0.59375, y: 0.03125 }, - { x: 0.65625, y: 0.03125 }, - { x: 0.65625, y: 0.03125 }, - { x: 0.71875, y: 0.03125 }, - { x: 0.71875, y: 0.03125 }, - { x: 0.78125, y: 0.03125 }, - { x: 0.78125, y: 0.03125 }, - { x: 0.84375, y: 0.03125 }, - { x: 0.84375, y: 0.03125 }, - { x: 0.90625, y: 0.03125 }, - { x: 0.90625, y: 0.03125 }, - { x: 0.96875, y: 0.03125 }, - { x: 0.96875, y: 0.03125 }, - { x: 0.03125, y: 0.09375 }, - { x: 0.03125, y: 0.09375 }, - { x: 0.09375, y: 0.09375 }, - { x: 0.09375, y: 0.09375 }, - { x: 0.15625, y: 0.09375 }, - { x: 0.15625, y: 0.09375 }, - { x: 0.21875, y: 0.09375 }, - { x: 0.21875, y: 0.09375 }, - { x: 0.28125, y: 0.09375 }, - { x: 0.28125, y: 0.09375 }, - { x: 0.34375, y: 0.09375 }, - { x: 0.34375, y: 0.09375 }, - { x: 0.40625, y: 0.09375 }, - { x: 0.40625, y: 0.09375 }, - { x: 0.46875, y: 0.09375 }, - { x: 0.46875, y: 0.09375 }, - { x: 0.53125, y: 0.09375 }, - { x: 0.53125, y: 0.09375 }, - { x: 0.59375, y: 0.09375 }, - { x: 0.59375, y: 0.09375 }, - { x: 0.65625, y: 0.09375 }, - { x: 0.65625, y: 0.09375 }, - { x: 0.71875, y: 0.09375 }, - { x: 0.71875, y: 0.09375 }, - { x: 0.78125, y: 0.09375 }, - { x: 0.78125, y: 0.09375 }, - { x: 0.84375, y: 0.09375 }, - { x: 0.84375, y: 0.09375 }, - { x: 0.90625, y: 0.09375 }, - { x: 0.90625, y: 0.09375 }, - { x: 0.96875, y: 0.09375 }, - { x: 0.96875, y: 0.09375 }, - { x: 0.03125, y: 0.15625 }, - { x: 0.03125, y: 0.15625 }, - { x: 0.09375, y: 0.15625 }, - { x: 0.09375, y: 0.15625 }, - { x: 0.15625, y: 0.15625 }, - { x: 0.15625, y: 0.15625 }, - { x: 0.21875, y: 0.15625 }, - { x: 0.21875, y: 0.15625 }, - { x: 0.28125, y: 0.15625 }, - { x: 0.28125, y: 0.15625 }, - { x: 0.34375, y: 0.15625 }, - { x: 0.34375, y: 0.15625 }, - { x: 0.40625, y: 0.15625 }, - { x: 0.40625, y: 0.15625 }, - { x: 0.46875, y: 0.15625 }, - { x: 0.46875, y: 0.15625 }, - { x: 0.53125, y: 0.15625 }, - { x: 0.53125, y: 0.15625 }, - { x: 0.59375, y: 0.15625 }, - { x: 0.59375, y: 0.15625 }, - { x: 0.65625, y: 0.15625 }, - { x: 0.65625, y: 0.15625 }, - { x: 0.71875, y: 0.15625 }, - { x: 0.71875, y: 0.15625 }, - { x: 0.78125, y: 0.15625 }, - { x: 0.78125, y: 0.15625 }, - { x: 0.84375, y: 0.15625 }, - { x: 0.84375, y: 0.15625 }, - { x: 0.90625, y: 0.15625 }, - { x: 0.90625, y: 0.15625 }, - { x: 0.96875, y: 0.15625 }, - { x: 0.96875, y: 0.15625 }, - { x: 0.03125, y: 0.21875 }, - { x: 0.03125, y: 0.21875 }, - { x: 0.09375, y: 0.21875 }, - { x: 0.09375, y: 0.21875 }, - { x: 0.15625, y: 0.21875 }, - { x: 0.15625, y: 0.21875 }, - { x: 0.21875, y: 0.21875 }, - { x: 0.21875, y: 0.21875 }, - { x: 0.28125, y: 0.21875 }, - { x: 0.28125, y: 0.21875 }, - { x: 0.34375, y: 0.21875 }, - { x: 0.34375, y: 0.21875 }, - { x: 0.40625, y: 0.21875 }, - { x: 0.40625, y: 0.21875 }, - { x: 0.46875, y: 0.21875 }, - { x: 0.46875, y: 0.21875 }, - { x: 0.53125, y: 0.21875 }, - { x: 0.53125, y: 0.21875 }, - { x: 0.59375, y: 0.21875 }, - { x: 0.59375, y: 0.21875 }, - { x: 0.65625, y: 0.21875 }, - { x: 0.65625, y: 0.21875 }, - { x: 0.71875, y: 0.21875 }, - { x: 0.71875, y: 0.21875 }, - { x: 0.78125, y: 0.21875 }, - { x: 0.78125, y: 0.21875 }, - { x: 0.84375, y: 0.21875 }, - { x: 0.84375, y: 0.21875 }, - { x: 0.90625, y: 0.21875 }, - { x: 0.90625, y: 0.21875 }, - { x: 0.96875, y: 0.21875 }, - { x: 0.96875, y: 0.21875 }, - { x: 0.03125, y: 0.28125 }, - { x: 0.03125, y: 0.28125 }, - { x: 0.09375, y: 0.28125 }, - { x: 0.09375, y: 0.28125 }, - { x: 0.15625, y: 0.28125 }, - { x: 0.15625, y: 0.28125 }, - { x: 0.21875, y: 0.28125 }, - { x: 0.21875, y: 0.28125 }, - { x: 0.28125, y: 0.28125 }, - { x: 0.28125, y: 0.28125 }, - { x: 0.34375, y: 0.28125 }, - { x: 0.34375, y: 0.28125 }, - { x: 0.40625, y: 0.28125 }, - { x: 0.40625, y: 0.28125 }, - { x: 0.46875, y: 0.28125 }, - { x: 0.46875, y: 0.28125 }, - { x: 0.53125, y: 0.28125 }, - { x: 0.53125, y: 0.28125 }, - { x: 0.59375, y: 0.28125 }, - { x: 0.59375, y: 0.28125 }, - { x: 0.65625, y: 0.28125 }, - { x: 0.65625, y: 0.28125 }, - { x: 0.71875, y: 0.28125 }, - { x: 0.71875, y: 0.28125 }, - { x: 0.78125, y: 0.28125 }, - { x: 0.78125, y: 0.28125 }, - { x: 0.84375, y: 0.28125 }, - { x: 0.84375, y: 0.28125 }, - { x: 0.90625, y: 0.28125 }, - { x: 0.90625, y: 0.28125 }, - { x: 0.96875, y: 0.28125 }, - { x: 0.96875, y: 0.28125 }, - { x: 0.03125, y: 0.34375 }, - { x: 0.03125, y: 0.34375 }, - { x: 0.09375, y: 0.34375 }, - { x: 0.09375, y: 0.34375 }, - { x: 0.15625, y: 0.34375 }, - { x: 0.15625, y: 0.34375 }, - { x: 0.21875, y: 0.34375 }, - { x: 0.21875, y: 0.34375 }, - { x: 0.28125, y: 0.34375 }, - { x: 0.28125, y: 0.34375 }, - { x: 0.34375, y: 0.34375 }, - { x: 0.34375, y: 0.34375 }, - { x: 0.40625, y: 0.34375 }, - { x: 0.40625, y: 0.34375 }, - { x: 0.46875, y: 0.34375 }, - { x: 0.46875, y: 0.34375 }, - { x: 0.53125, y: 0.34375 }, - { x: 0.53125, y: 0.34375 }, - { x: 0.59375, y: 0.34375 }, - { x: 0.59375, y: 0.34375 }, - { x: 0.65625, y: 0.34375 }, - { x: 0.65625, y: 0.34375 }, - { x: 0.71875, y: 0.34375 }, - { x: 0.71875, y: 0.34375 }, - { x: 0.78125, y: 0.34375 }, - { x: 0.78125, y: 0.34375 }, - { x: 0.84375, y: 0.34375 }, - { x: 0.84375, y: 0.34375 }, - { x: 0.90625, y: 0.34375 }, - { x: 0.90625, y: 0.34375 }, - { x: 0.96875, y: 0.34375 }, - { x: 0.96875, y: 0.34375 }, - { x: 0.03125, y: 0.40625 }, - { x: 0.03125, y: 0.40625 }, - { x: 0.09375, y: 0.40625 }, - { x: 0.09375, y: 0.40625 }, - { x: 0.15625, y: 0.40625 }, - { x: 0.15625, y: 0.40625 }, - { x: 0.21875, y: 0.40625 }, - { x: 0.21875, y: 0.40625 }, - { x: 0.28125, y: 0.40625 }, - { x: 0.28125, y: 0.40625 }, - { x: 0.34375, y: 0.40625 }, - { x: 0.34375, y: 0.40625 }, - { x: 0.40625, y: 0.40625 }, - { x: 0.40625, y: 0.40625 }, - { x: 0.46875, y: 0.40625 }, - { x: 0.46875, y: 0.40625 }, - { x: 0.53125, y: 0.40625 }, - { x: 0.53125, y: 0.40625 }, - { x: 0.59375, y: 0.40625 }, - { x: 0.59375, y: 0.40625 }, - { x: 0.65625, y: 0.40625 }, - { x: 0.65625, y: 0.40625 }, - { x: 0.71875, y: 0.40625 }, - { x: 0.71875, y: 0.40625 }, - { x: 0.78125, y: 0.40625 }, - { x: 0.78125, y: 0.40625 }, - { x: 0.84375, y: 0.40625 }, - { x: 0.84375, y: 0.40625 }, - { x: 0.90625, y: 0.40625 }, - { x: 0.90625, y: 0.40625 }, - { x: 0.96875, y: 0.40625 }, - { x: 0.96875, y: 0.40625 }, - { x: 0.03125, y: 0.46875 }, - { x: 0.03125, y: 0.46875 }, - { x: 0.09375, y: 0.46875 }, - { x: 0.09375, y: 0.46875 }, - { x: 0.15625, y: 0.46875 }, - { x: 0.15625, y: 0.46875 }, - { x: 0.21875, y: 0.46875 }, - { x: 0.21875, y: 0.46875 }, - { x: 0.28125, y: 0.46875 }, - { x: 0.28125, y: 0.46875 }, - { x: 0.34375, y: 0.46875 }, - { x: 0.34375, y: 0.46875 }, - { x: 0.40625, y: 0.46875 }, - { x: 0.40625, y: 0.46875 }, - { x: 0.46875, y: 0.46875 }, - { x: 0.46875, y: 0.46875 }, - { x: 0.53125, y: 0.46875 }, - { x: 0.53125, y: 0.46875 }, - { x: 0.59375, y: 0.46875 }, - { x: 0.59375, y: 0.46875 }, - { x: 0.65625, y: 0.46875 }, - { x: 0.65625, y: 0.46875 }, - { x: 0.71875, y: 0.46875 }, - { x: 0.71875, y: 0.46875 }, - { x: 0.78125, y: 0.46875 }, - { x: 0.78125, y: 0.46875 }, - { x: 0.84375, y: 0.46875 }, - { x: 0.84375, y: 0.46875 }, - { x: 0.90625, y: 0.46875 }, - { x: 0.90625, y: 0.46875 }, - { x: 0.96875, y: 0.46875 }, - { x: 0.96875, y: 0.46875 }, - { x: 0.03125, y: 0.53125 }, - { x: 0.03125, y: 0.53125 }, - { x: 0.09375, y: 0.53125 }, - { x: 0.09375, y: 0.53125 }, - { x: 0.15625, y: 0.53125 }, - { x: 0.15625, y: 0.53125 }, - { x: 0.21875, y: 0.53125 }, - { x: 0.21875, y: 0.53125 }, - { x: 0.28125, y: 0.53125 }, - { x: 0.28125, y: 0.53125 }, - { x: 0.34375, y: 0.53125 }, - { x: 0.34375, y: 0.53125 }, - { x: 0.40625, y: 0.53125 }, - { x: 0.40625, y: 0.53125 }, - { x: 0.46875, y: 0.53125 }, - { x: 0.46875, y: 0.53125 }, - { x: 0.53125, y: 0.53125 }, - { x: 0.53125, y: 0.53125 }, - { x: 0.59375, y: 0.53125 }, - { x: 0.59375, y: 0.53125 }, - { x: 0.65625, y: 0.53125 }, - { x: 0.65625, y: 0.53125 }, - { x: 0.71875, y: 0.53125 }, - { x: 0.71875, y: 0.53125 }, - { x: 0.78125, y: 0.53125 }, - { x: 0.78125, y: 0.53125 }, - { x: 0.84375, y: 0.53125 }, - { x: 0.84375, y: 0.53125 }, - { x: 0.90625, y: 0.53125 }, - { x: 0.90625, y: 0.53125 }, - { x: 0.96875, y: 0.53125 }, - { x: 0.96875, y: 0.53125 }, - { x: 0.03125, y: 0.59375 }, - { x: 0.03125, y: 0.59375 }, - { x: 0.09375, y: 0.59375 }, - { x: 0.09375, y: 0.59375 }, - { x: 0.15625, y: 0.59375 }, - { x: 0.15625, y: 0.59375 }, - { x: 0.21875, y: 0.59375 }, - { x: 0.21875, y: 0.59375 }, - { x: 0.28125, y: 0.59375 }, - { x: 0.28125, y: 0.59375 }, - { x: 0.34375, y: 0.59375 }, - { x: 0.34375, y: 0.59375 }, - { x: 0.40625, y: 0.59375 }, - { x: 0.40625, y: 0.59375 }, - { x: 0.46875, y: 0.59375 }, - { x: 0.46875, y: 0.59375 }, - { x: 0.53125, y: 0.59375 }, - { x: 0.53125, y: 0.59375 }, - { x: 0.59375, y: 0.59375 }, - { x: 0.59375, y: 0.59375 }, - { x: 0.65625, y: 0.59375 }, - { x: 0.65625, y: 0.59375 }, - { x: 0.71875, y: 0.59375 }, - { x: 0.71875, y: 0.59375 }, - { x: 0.78125, y: 0.59375 }, - { x: 0.78125, y: 0.59375 }, - { x: 0.84375, y: 0.59375 }, - { x: 0.84375, y: 0.59375 }, - { x: 0.90625, y: 0.59375 }, - { x: 0.90625, y: 0.59375 }, - { x: 0.96875, y: 0.59375 }, - { x: 0.96875, y: 0.59375 }, - { x: 0.03125, y: 0.65625 }, - { x: 0.03125, y: 0.65625 }, - { x: 0.09375, y: 0.65625 }, - { x: 0.09375, y: 0.65625 }, - { x: 0.15625, y: 0.65625 }, - { x: 0.15625, y: 0.65625 }, - { x: 0.21875, y: 0.65625 }, - { x: 0.21875, y: 0.65625 }, - { x: 0.28125, y: 0.65625 }, - { x: 0.28125, y: 0.65625 }, - { x: 0.34375, y: 0.65625 }, - { x: 0.34375, y: 0.65625 }, - { x: 0.40625, y: 0.65625 }, - { x: 0.40625, y: 0.65625 }, - { x: 0.46875, y: 0.65625 }, - { x: 0.46875, y: 0.65625 }, - { x: 0.53125, y: 0.65625 }, - { x: 0.53125, y: 0.65625 }, - { x: 0.59375, y: 0.65625 }, - { x: 0.59375, y: 0.65625 }, - { x: 0.65625, y: 0.65625 }, - { x: 0.65625, y: 0.65625 }, - { x: 0.71875, y: 0.65625 }, - { x: 0.71875, y: 0.65625 }, - { x: 0.78125, y: 0.65625 }, - { x: 0.78125, y: 0.65625 }, - { x: 0.84375, y: 0.65625 }, - { x: 0.84375, y: 0.65625 }, - { x: 0.90625, y: 0.65625 }, - { x: 0.90625, y: 0.65625 }, - { x: 0.96875, y: 0.65625 }, - { x: 0.96875, y: 0.65625 }, - { x: 0.03125, y: 0.71875 }, - { x: 0.03125, y: 0.71875 }, - { x: 0.09375, y: 0.71875 }, - { x: 0.09375, y: 0.71875 }, - { x: 0.15625, y: 0.71875 }, - { x: 0.15625, y: 0.71875 }, - { x: 0.21875, y: 0.71875 }, - { x: 0.21875, y: 0.71875 }, - { x: 0.28125, y: 0.71875 }, - { x: 0.28125, y: 0.71875 }, - { x: 0.34375, y: 0.71875 }, - { x: 0.34375, y: 0.71875 }, - { x: 0.40625, y: 0.71875 }, - { x: 0.40625, y: 0.71875 }, - { x: 0.46875, y: 0.71875 }, - { x: 0.46875, y: 0.71875 }, - { x: 0.53125, y: 0.71875 }, - { x: 0.53125, y: 0.71875 }, - { x: 0.59375, y: 0.71875 }, - { x: 0.59375, y: 0.71875 }, - { x: 0.65625, y: 0.71875 }, - { x: 0.65625, y: 0.71875 }, - { x: 0.71875, y: 0.71875 }, - { x: 0.71875, y: 0.71875 }, - { x: 0.78125, y: 0.71875 }, - { x: 0.78125, y: 0.71875 }, - { x: 0.84375, y: 0.71875 }, - { x: 0.84375, y: 0.71875 }, - { x: 0.90625, y: 0.71875 }, - { x: 0.90625, y: 0.71875 }, - { x: 0.96875, y: 0.71875 }, - { x: 0.96875, y: 0.71875 }, - { x: 0.03125, y: 0.78125 }, - { x: 0.03125, y: 0.78125 }, - { x: 0.09375, y: 0.78125 }, - { x: 0.09375, y: 0.78125 }, - { x: 0.15625, y: 0.78125 }, - { x: 0.15625, y: 0.78125 }, - { x: 0.21875, y: 0.78125 }, - { x: 0.21875, y: 0.78125 }, - { x: 0.28125, y: 0.78125 }, - { x: 0.28125, y: 0.78125 }, - { x: 0.34375, y: 0.78125 }, - { x: 0.34375, y: 0.78125 }, - { x: 0.40625, y: 0.78125 }, - { x: 0.40625, y: 0.78125 }, - { x: 0.46875, y: 0.78125 }, - { x: 0.46875, y: 0.78125 }, - { x: 0.53125, y: 0.78125 }, - { x: 0.53125, y: 0.78125 }, - { x: 0.59375, y: 0.78125 }, - { x: 0.59375, y: 0.78125 }, - { x: 0.65625, y: 0.78125 }, - { x: 0.65625, y: 0.78125 }, - { x: 0.71875, y: 0.78125 }, - { x: 0.71875, y: 0.78125 }, - { x: 0.78125, y: 0.78125 }, - { x: 0.78125, y: 0.78125 }, - { x: 0.84375, y: 0.78125 }, - { x: 0.84375, y: 0.78125 }, - { x: 0.90625, y: 0.78125 }, - { x: 0.90625, y: 0.78125 }, - { x: 0.96875, y: 0.78125 }, - { x: 0.96875, y: 0.78125 }, - { x: 0.03125, y: 0.84375 }, - { x: 0.03125, y: 0.84375 }, - { x: 0.09375, y: 0.84375 }, - { x: 0.09375, y: 0.84375 }, - { x: 0.15625, y: 0.84375 }, - { x: 0.15625, y: 0.84375 }, - { x: 0.21875, y: 0.84375 }, - { x: 0.21875, y: 0.84375 }, - { x: 0.28125, y: 0.84375 }, - { x: 0.28125, y: 0.84375 }, - { x: 0.34375, y: 0.84375 }, - { x: 0.34375, y: 0.84375 }, - { x: 0.40625, y: 0.84375 }, - { x: 0.40625, y: 0.84375 }, - { x: 0.46875, y: 0.84375 }, - { x: 0.46875, y: 0.84375 }, - { x: 0.53125, y: 0.84375 }, - { x: 0.53125, y: 0.84375 }, - { x: 0.59375, y: 0.84375 }, - { x: 0.59375, y: 0.84375 }, - { x: 0.65625, y: 0.84375 }, - { x: 0.65625, y: 0.84375 }, - { x: 0.71875, y: 0.84375 }, - { x: 0.71875, y: 0.84375 }, - { x: 0.78125, y: 0.84375 }, - { x: 0.78125, y: 0.84375 }, - { x: 0.84375, y: 0.84375 }, - { x: 0.84375, y: 0.84375 }, - { x: 0.90625, y: 0.84375 }, - { x: 0.90625, y: 0.84375 }, - { x: 0.96875, y: 0.84375 }, - { x: 0.96875, y: 0.84375 }, - { x: 0.03125, y: 0.90625 }, - { x: 0.03125, y: 0.90625 }, - { x: 0.09375, y: 0.90625 }, - { x: 0.09375, y: 0.90625 }, - { x: 0.15625, y: 0.90625 }, - { x: 0.15625, y: 0.90625 }, - { x: 0.21875, y: 0.90625 }, - { x: 0.21875, y: 0.90625 }, - { x: 0.28125, y: 0.90625 }, - { x: 0.28125, y: 0.90625 }, - { x: 0.34375, y: 0.90625 }, - { x: 0.34375, y: 0.90625 }, - { x: 0.40625, y: 0.90625 }, - { x: 0.40625, y: 0.90625 }, - { x: 0.46875, y: 0.90625 }, - { x: 0.46875, y: 0.90625 }, - { x: 0.53125, y: 0.90625 }, - { x: 0.53125, y: 0.90625 }, - { x: 0.59375, y: 0.90625 }, - { x: 0.59375, y: 0.90625 }, - { x: 0.65625, y: 0.90625 }, - { x: 0.65625, y: 0.90625 }, - { x: 0.71875, y: 0.90625 }, - { x: 0.71875, y: 0.90625 }, - { x: 0.78125, y: 0.90625 }, - { x: 0.78125, y: 0.90625 }, - { x: 0.84375, y: 0.90625 }, - { x: 0.84375, y: 0.90625 }, - { x: 0.90625, y: 0.90625 }, - { x: 0.90625, y: 0.90625 }, - { x: 0.96875, y: 0.90625 }, - { x: 0.96875, y: 0.90625 }, - { x: 0.03125, y: 0.96875 }, - { x: 0.03125, y: 0.96875 }, - { x: 0.09375, y: 0.96875 }, - { x: 0.09375, y: 0.96875 }, - { x: 0.15625, y: 0.96875 }, - { x: 0.15625, y: 0.96875 }, - { x: 0.21875, y: 0.96875 }, - { x: 0.21875, y: 0.96875 }, - { x: 0.28125, y: 0.96875 }, - { x: 0.28125, y: 0.96875 }, - { x: 0.34375, y: 0.96875 }, - { x: 0.34375, y: 0.96875 }, - { x: 0.40625, y: 0.96875 }, - { x: 0.40625, y: 0.96875 }, - { x: 0.46875, y: 0.96875 }, - { x: 0.46875, y: 0.96875 }, - { x: 0.53125, y: 0.96875 }, - { x: 0.53125, y: 0.96875 }, - { x: 0.59375, y: 0.96875 }, - { x: 0.59375, y: 0.96875 }, - { x: 0.65625, y: 0.96875 }, - { x: 0.65625, y: 0.96875 }, - { x: 0.71875, y: 0.96875 }, - { x: 0.71875, y: 0.96875 }, - { x: 0.78125, y: 0.96875 }, - { x: 0.78125, y: 0.96875 }, - { x: 0.84375, y: 0.96875 }, - { x: 0.84375, y: 0.96875 }, - { x: 0.90625, y: 0.96875 }, - { x: 0.90625, y: 0.96875 }, - { x: 0.96875, y: 0.96875 }, - { x: 0.96875, y: 0.96875 }, - { x: 0.0625, y: 0.0625 }, - { x: 0.0625, y: 0.0625 }, - { x: 0.0625, y: 0.0625 }, - { x: 0.0625, y: 0.0625 }, - { x: 0.0625, y: 0.0625 }, - { x: 0.0625, y: 0.0625 }, - { x: 0.1875, y: 0.0625 }, - { x: 0.1875, y: 0.0625 }, - { x: 0.1875, y: 0.0625 }, - { x: 0.1875, y: 0.0625 }, - { x: 0.1875, y: 0.0625 }, - { x: 0.1875, y: 0.0625 }, - { x: 0.3125, y: 0.0625 }, - { x: 0.3125, y: 0.0625 }, - { x: 0.3125, y: 0.0625 }, - { x: 0.3125, y: 0.0625 }, - { x: 0.3125, y: 0.0625 }, - { x: 0.3125, y: 0.0625 }, - { x: 0.4375, y: 0.0625 }, - { x: 0.4375, y: 0.0625 }, - { x: 0.4375, y: 0.0625 }, - { x: 0.4375, y: 0.0625 }, - { x: 0.4375, y: 0.0625 }, - { x: 0.4375, y: 0.0625 }, - { x: 0.5625, y: 0.0625 }, - { x: 0.5625, y: 0.0625 }, - { x: 0.5625, y: 0.0625 }, - { x: 0.5625, y: 0.0625 }, - { x: 0.5625, y: 0.0625 }, - { x: 0.5625, y: 0.0625 }, - { x: 0.6875, y: 0.0625 }, - { x: 0.6875, y: 0.0625 }, - { x: 0.6875, y: 0.0625 }, - { x: 0.6875, y: 0.0625 }, - { x: 0.6875, y: 0.0625 }, - { x: 0.6875, y: 0.0625 }, - { x: 0.8125, y: 0.0625 }, - { x: 0.8125, y: 0.0625 }, - { x: 0.8125, y: 0.0625 }, - { x: 0.8125, y: 0.0625 }, - { x: 0.8125, y: 0.0625 }, - { x: 0.8125, y: 0.0625 }, - { x: 0.9375, y: 0.0625 }, - { x: 0.9375, y: 0.0625 }, - { x: 0.9375, y: 0.0625 }, - { x: 0.9375, y: 0.0625 }, - { x: 0.9375, y: 0.0625 }, - { x: 0.9375, y: 0.0625 }, - { x: 0.0625, y: 0.1875 }, - { x: 0.0625, y: 0.1875 }, - { x: 0.0625, y: 0.1875 }, - { x: 0.0625, y: 0.1875 }, - { x: 0.0625, y: 0.1875 }, - { x: 0.0625, y: 0.1875 }, - { x: 0.1875, y: 0.1875 }, - { x: 0.1875, y: 0.1875 }, - { x: 0.1875, y: 0.1875 }, - { x: 0.1875, y: 0.1875 }, - { x: 0.1875, y: 0.1875 }, - { x: 0.1875, y: 0.1875 }, - { x: 0.3125, y: 0.1875 }, - { x: 0.3125, y: 0.1875 }, - { x: 0.3125, y: 0.1875 }, - { x: 0.3125, y: 0.1875 }, - { x: 0.3125, y: 0.1875 }, - { x: 0.3125, y: 0.1875 }, - { x: 0.4375, y: 0.1875 }, - { x: 0.4375, y: 0.1875 }, - { x: 0.4375, y: 0.1875 }, - { x: 0.4375, y: 0.1875 }, - { x: 0.4375, y: 0.1875 }, - { x: 0.4375, y: 0.1875 }, - { x: 0.5625, y: 0.1875 }, - { x: 0.5625, y: 0.1875 }, - { x: 0.5625, y: 0.1875 }, - { x: 0.5625, y: 0.1875 }, - { x: 0.5625, y: 0.1875 }, - { x: 0.5625, y: 0.1875 }, - { x: 0.6875, y: 0.1875 }, - { x: 0.6875, y: 0.1875 }, - { x: 0.6875, y: 0.1875 }, - { x: 0.6875, y: 0.1875 }, - { x: 0.6875, y: 0.1875 }, - { x: 0.6875, y: 0.1875 }, - { x: 0.8125, y: 0.1875 }, - { x: 0.8125, y: 0.1875 }, - { x: 0.8125, y: 0.1875 }, - { x: 0.8125, y: 0.1875 }, - { x: 0.8125, y: 0.1875 }, - { x: 0.8125, y: 0.1875 }, - { x: 0.9375, y: 0.1875 }, - { x: 0.9375, y: 0.1875 }, - { x: 0.9375, y: 0.1875 }, - { x: 0.9375, y: 0.1875 }, - { x: 0.9375, y: 0.1875 }, - { x: 0.9375, y: 0.1875 }, - { x: 0.0625, y: 0.3125 }, - { x: 0.0625, y: 0.3125 }, - { x: 0.0625, y: 0.3125 }, - { x: 0.0625, y: 0.3125 }, - { x: 0.0625, y: 0.3125 }, - { x: 0.0625, y: 0.3125 }, - { x: 0.1875, y: 0.3125 }, - { x: 0.1875, y: 0.3125 }, - { x: 0.1875, y: 0.3125 }, - { x: 0.1875, y: 0.3125 }, - { x: 0.1875, y: 0.3125 }, - { x: 0.1875, y: 0.3125 }, - { x: 0.3125, y: 0.3125 }, - { x: 0.3125, y: 0.3125 }, - { x: 0.3125, y: 0.3125 }, - { x: 0.3125, y: 0.3125 }, - { x: 0.3125, y: 0.3125 }, - { x: 0.3125, y: 0.3125 }, - { x: 0.4375, y: 0.3125 }, - { x: 0.4375, y: 0.3125 }, - { x: 0.4375, y: 0.3125 }, - { x: 0.4375, y: 0.3125 }, - { x: 0.4375, y: 0.3125 }, - { x: 0.4375, y: 0.3125 }, - { x: 0.5625, y: 0.3125 }, - { x: 0.5625, y: 0.3125 }, - { x: 0.5625, y: 0.3125 }, - { x: 0.5625, y: 0.3125 }, - { x: 0.5625, y: 0.3125 }, - { x: 0.5625, y: 0.3125 }, - { x: 0.6875, y: 0.3125 }, - { x: 0.6875, y: 0.3125 }, - { x: 0.6875, y: 0.3125 }, - { x: 0.6875, y: 0.3125 }, - { x: 0.6875, y: 0.3125 }, - { x: 0.6875, y: 0.3125 }, - { x: 0.8125, y: 0.3125 }, - { x: 0.8125, y: 0.3125 }, - { x: 0.8125, y: 0.3125 }, - { x: 0.8125, y: 0.3125 }, - { x: 0.8125, y: 0.3125 }, - { x: 0.8125, y: 0.3125 }, - { x: 0.9375, y: 0.3125 }, - { x: 0.9375, y: 0.3125 }, - { x: 0.9375, y: 0.3125 }, - { x: 0.9375, y: 0.3125 }, - { x: 0.9375, y: 0.3125 }, - { x: 0.9375, y: 0.3125 }, - { x: 0.0625, y: 0.4375 }, - { x: 0.0625, y: 0.4375 }, - { x: 0.0625, y: 0.4375 }, - { x: 0.0625, y: 0.4375 }, - { x: 0.0625, y: 0.4375 }, - { x: 0.0625, y: 0.4375 }, - { x: 0.1875, y: 0.4375 }, - { x: 0.1875, y: 0.4375 }, - { x: 0.1875, y: 0.4375 }, - { x: 0.1875, y: 0.4375 }, - { x: 0.1875, y: 0.4375 }, - { x: 0.1875, y: 0.4375 }, - { x: 0.3125, y: 0.4375 }, - { x: 0.3125, y: 0.4375 }, - { x: 0.3125, y: 0.4375 }, - { x: 0.3125, y: 0.4375 }, - { x: 0.3125, y: 0.4375 }, - { x: 0.3125, y: 0.4375 }, - { x: 0.4375, y: 0.4375 }, - { x: 0.4375, y: 0.4375 }, - { x: 0.4375, y: 0.4375 }, - { x: 0.4375, y: 0.4375 }, - { x: 0.4375, y: 0.4375 }, - { x: 0.4375, y: 0.4375 }, - { x: 0.5625, y: 0.4375 }, - { x: 0.5625, y: 0.4375 }, - { x: 0.5625, y: 0.4375 }, - { x: 0.5625, y: 0.4375 }, - { x: 0.5625, y: 0.4375 }, - { x: 0.5625, y: 0.4375 }, - { x: 0.6875, y: 0.4375 }, - { x: 0.6875, y: 0.4375 }, - { x: 0.6875, y: 0.4375 }, - { x: 0.6875, y: 0.4375 }, - { x: 0.6875, y: 0.4375 }, - { x: 0.6875, y: 0.4375 }, - { x: 0.8125, y: 0.4375 }, - { x: 0.8125, y: 0.4375 }, - { x: 0.8125, y: 0.4375 }, - { x: 0.8125, y: 0.4375 }, - { x: 0.8125, y: 0.4375 }, - { x: 0.8125, y: 0.4375 }, - { x: 0.9375, y: 0.4375 }, - { x: 0.9375, y: 0.4375 }, - { x: 0.9375, y: 0.4375 }, - { x: 0.9375, y: 0.4375 }, - { x: 0.9375, y: 0.4375 }, - { x: 0.9375, y: 0.4375 }, - { x: 0.0625, y: 0.5625 }, - { x: 0.0625, y: 0.5625 }, - { x: 0.0625, y: 0.5625 }, - { x: 0.0625, y: 0.5625 }, - { x: 0.0625, y: 0.5625 }, - { x: 0.0625, y: 0.5625 }, - { x: 0.1875, y: 0.5625 }, - { x: 0.1875, y: 0.5625 }, - { x: 0.1875, y: 0.5625 }, - { x: 0.1875, y: 0.5625 }, - { x: 0.1875, y: 0.5625 }, - { x: 0.1875, y: 0.5625 }, - { x: 0.3125, y: 0.5625 }, - { x: 0.3125, y: 0.5625 }, - { x: 0.3125, y: 0.5625 }, - { x: 0.3125, y: 0.5625 }, - { x: 0.3125, y: 0.5625 }, - { x: 0.3125, y: 0.5625 }, - { x: 0.4375, y: 0.5625 }, - { x: 0.4375, y: 0.5625 }, - { x: 0.4375, y: 0.5625 }, - { x: 0.4375, y: 0.5625 }, - { x: 0.4375, y: 0.5625 }, - { x: 0.4375, y: 0.5625 }, - { x: 0.5625, y: 0.5625 }, - { x: 0.5625, y: 0.5625 }, - { x: 0.5625, y: 0.5625 }, - { x: 0.5625, y: 0.5625 }, - { x: 0.5625, y: 0.5625 }, - { x: 0.5625, y: 0.5625 }, - { x: 0.6875, y: 0.5625 }, - { x: 0.6875, y: 0.5625 }, - { x: 0.6875, y: 0.5625 }, - { x: 0.6875, y: 0.5625 }, - { x: 0.6875, y: 0.5625 }, - { x: 0.6875, y: 0.5625 }, - { x: 0.8125, y: 0.5625 }, - { x: 0.8125, y: 0.5625 }, - { x: 0.8125, y: 0.5625 }, - { x: 0.8125, y: 0.5625 }, - { x: 0.8125, y: 0.5625 }, - { x: 0.8125, y: 0.5625 }, - { x: 0.9375, y: 0.5625 }, - { x: 0.9375, y: 0.5625 }, - { x: 0.9375, y: 0.5625 }, - { x: 0.9375, y: 0.5625 }, - { x: 0.9375, y: 0.5625 }, - { x: 0.9375, y: 0.5625 }, - { x: 0.0625, y: 0.6875 }, - { x: 0.0625, y: 0.6875 }, - { x: 0.0625, y: 0.6875 }, - { x: 0.0625, y: 0.6875 }, - { x: 0.0625, y: 0.6875 }, - { x: 0.0625, y: 0.6875 }, - { x: 0.1875, y: 0.6875 }, - { x: 0.1875, y: 0.6875 }, - { x: 0.1875, y: 0.6875 }, - { x: 0.1875, y: 0.6875 }, - { x: 0.1875, y: 0.6875 }, - { x: 0.1875, y: 0.6875 }, - { x: 0.3125, y: 0.6875 }, - { x: 0.3125, y: 0.6875 }, - { x: 0.3125, y: 0.6875 }, - { x: 0.3125, y: 0.6875 }, - { x: 0.3125, y: 0.6875 }, - { x: 0.3125, y: 0.6875 }, - { x: 0.4375, y: 0.6875 }, - { x: 0.4375, y: 0.6875 }, - { x: 0.4375, y: 0.6875 }, - { x: 0.4375, y: 0.6875 }, - { x: 0.4375, y: 0.6875 }, - { x: 0.4375, y: 0.6875 }, - { x: 0.5625, y: 0.6875 }, - { x: 0.5625, y: 0.6875 }, - { x: 0.5625, y: 0.6875 }, - { x: 0.5625, y: 0.6875 }, - { x: 0.5625, y: 0.6875 }, - { x: 0.5625, y: 0.6875 }, - { x: 0.6875, y: 0.6875 }, - { x: 0.6875, y: 0.6875 }, - { x: 0.6875, y: 0.6875 }, - { x: 0.6875, y: 0.6875 }, - { x: 0.6875, y: 0.6875 }, - { x: 0.6875, y: 0.6875 }, - { x: 0.8125, y: 0.6875 }, - { x: 0.8125, y: 0.6875 }, - { x: 0.8125, y: 0.6875 }, - { x: 0.8125, y: 0.6875 }, - { x: 0.8125, y: 0.6875 }, - { x: 0.8125, y: 0.6875 }, - { x: 0.9375, y: 0.6875 }, - { x: 0.9375, y: 0.6875 }, - { x: 0.9375, y: 0.6875 }, - { x: 0.9375, y: 0.6875 }, - { x: 0.9375, y: 0.6875 }, - { x: 0.9375, y: 0.6875 }, - { x: 0.0625, y: 0.8125 }, - { x: 0.0625, y: 0.8125 }, - { x: 0.0625, y: 0.8125 }, - { x: 0.0625, y: 0.8125 }, - { x: 0.0625, y: 0.8125 }, - { x: 0.0625, y: 0.8125 }, - { x: 0.1875, y: 0.8125 }, - { x: 0.1875, y: 0.8125 }, - { x: 0.1875, y: 0.8125 }, - { x: 0.1875, y: 0.8125 }, - { x: 0.1875, y: 0.8125 }, - { x: 0.1875, y: 0.8125 }, - { x: 0.3125, y: 0.8125 }, - { x: 0.3125, y: 0.8125 }, - { x: 0.3125, y: 0.8125 }, - { x: 0.3125, y: 0.8125 }, - { x: 0.3125, y: 0.8125 }, - { x: 0.3125, y: 0.8125 }, - { x: 0.4375, y: 0.8125 }, - { x: 0.4375, y: 0.8125 }, - { x: 0.4375, y: 0.8125 }, - { x: 0.4375, y: 0.8125 }, - { x: 0.4375, y: 0.8125 }, - { x: 0.4375, y: 0.8125 }, - { x: 0.5625, y: 0.8125 }, - { x: 0.5625, y: 0.8125 }, - { x: 0.5625, y: 0.8125 }, - { x: 0.5625, y: 0.8125 }, - { x: 0.5625, y: 0.8125 }, - { x: 0.5625, y: 0.8125 }, - { x: 0.6875, y: 0.8125 }, - { x: 0.6875, y: 0.8125 }, - { x: 0.6875, y: 0.8125 }, - { x: 0.6875, y: 0.8125 }, - { x: 0.6875, y: 0.8125 }, - { x: 0.6875, y: 0.8125 }, - { x: 0.8125, y: 0.8125 }, - { x: 0.8125, y: 0.8125 }, - { x: 0.8125, y: 0.8125 }, - { x: 0.8125, y: 0.8125 }, - { x: 0.8125, y: 0.8125 }, - { x: 0.8125, y: 0.8125 }, - { x: 0.9375, y: 0.8125 }, - { x: 0.9375, y: 0.8125 }, - { x: 0.9375, y: 0.8125 }, - { x: 0.9375, y: 0.8125 }, - { x: 0.9375, y: 0.8125 }, - { x: 0.9375, y: 0.8125 }, - { x: 0.0625, y: 0.9375 }, - { x: 0.0625, y: 0.9375 }, - { x: 0.0625, y: 0.9375 }, - { x: 0.0625, y: 0.9375 }, - { x: 0.0625, y: 0.9375 }, - { x: 0.0625, y: 0.9375 }, - { x: 0.1875, y: 0.9375 }, - { x: 0.1875, y: 0.9375 }, - { x: 0.1875, y: 0.9375 }, - { x: 0.1875, y: 0.9375 }, - { x: 0.1875, y: 0.9375 }, - { x: 0.1875, y: 0.9375 }, - { x: 0.3125, y: 0.9375 }, - { x: 0.3125, y: 0.9375 }, - { x: 0.3125, y: 0.9375 }, - { x: 0.3125, y: 0.9375 }, - { x: 0.3125, y: 0.9375 }, - { x: 0.3125, y: 0.9375 }, - { x: 0.4375, y: 0.9375 }, - { x: 0.4375, y: 0.9375 }, - { x: 0.4375, y: 0.9375 }, - { x: 0.4375, y: 0.9375 }, - { x: 0.4375, y: 0.9375 }, - { x: 0.4375, y: 0.9375 }, - { x: 0.5625, y: 0.9375 }, - { x: 0.5625, y: 0.9375 }, - { x: 0.5625, y: 0.9375 }, - { x: 0.5625, y: 0.9375 }, - { x: 0.5625, y: 0.9375 }, - { x: 0.5625, y: 0.9375 }, - { x: 0.6875, y: 0.9375 }, - { x: 0.6875, y: 0.9375 }, - { x: 0.6875, y: 0.9375 }, - { x: 0.6875, y: 0.9375 }, - { x: 0.6875, y: 0.9375 }, - { x: 0.6875, y: 0.9375 }, - { x: 0.8125, y: 0.9375 }, - { x: 0.8125, y: 0.9375 }, - { x: 0.8125, y: 0.9375 }, - { x: 0.8125, y: 0.9375 }, - { x: 0.8125, y: 0.9375 }, - { x: 0.8125, y: 0.9375 }, - { x: 0.9375, y: 0.9375 }, - { x: 0.9375, y: 0.9375 }, - { x: 0.9375, y: 0.9375 }, - { x: 0.9375, y: 0.9375 }, - { x: 0.9375, y: 0.9375 }, - { x: 0.9375, y: 0.9375 } -]; - -// src/hand/handposedetector.ts -var HandDetector = class { - constructor(model21) { - __publicField(this, "model"); - __publicField(this, "anchors"); - __publicField(this, "anchorsTensor"); - __publicField(this, "inputSize"); - __publicField(this, "inputSizeTensor"); - __publicField(this, "doubleInputSizeTensor"); - var _a, _b, _c, _d; - this.model = model21; - this.anchors = anchors2.map((anchor) => [anchor.x, anchor.y]); - this.anchorsTensor = tf19.tensor2d(this.anchors); - this.inputSize = ((_d = (_c = (_b = (_a = this == null ? void 0 : this.model) == null ? void 0 : _a.inputs) == null ? void 0 : _b[0]) == null ? void 0 : _c.shape) == null ? void 0 : _d[2]) || 0; - this.inputSizeTensor = tf19.tensor1d([this.inputSize, this.inputSize]); - this.doubleInputSizeTensor = tf19.tensor1d([this.inputSize * 2, this.inputSize * 2]); - } - normalizeBoxes(boxes) { - const t2 = {}; - t2.boxOffsets = tf19.slice(boxes, [0, 0], [-1, 2]); - t2.boxSizes = tf19.slice(boxes, [0, 2], [-1, 2]); - t2.div = tf19.div(t2.boxOffsets, this.inputSizeTensor); - t2.boxCenterPoints = tf19.add(t2.div, this.anchorsTensor); - t2.halfBoxSizes = tf19.div(t2.boxSizes, this.doubleInputSizeTensor); - t2.sub = tf19.sub(t2.boxCenterPoints, t2.halfBoxSizes); - t2.startPoints = tf19.mul(t2.sub, this.inputSizeTensor); - t2.add = tf19.add(t2.boxCenterPoints, t2.halfBoxSizes); - t2.endPoints = tf19.mul(t2.add, this.inputSizeTensor); - const res = tf19.concat2d([t2.startPoints, t2.endPoints], 1); - Object.keys(t2).forEach((tensor6) => tf19.dispose(t2[tensor6])); - return res; - } - normalizeLandmarks(rawPalmLandmarks, index2) { - const t2 = {}; - t2.reshape = tf19.reshape(rawPalmLandmarks, [-1, 7, 2]); - t2.div = tf19.div(t2.reshape, this.inputSizeTensor); - t2.landmarks = tf19.add(t2.div, this.anchors[index2] ? this.anchors[index2] : 0); - const res = tf19.mul(t2.landmarks, this.inputSizeTensor); - Object.keys(t2).forEach((tensor6) => tf19.dispose(t2[tensor6])); - return res; - } - async predict(input, config3) { - var _a; - const t2 = {}; - t2.resize = tf19.image.resizeBilinear(input, [this.inputSize, this.inputSize]); - t2.div = tf19.div(t2.resize, constants.tf127); - t2.image = tf19.sub(t2.div, constants.tf1); - t2.batched = this.model.execute(t2.image); - t2.predictions = tf19.squeeze(t2.batched); - t2.slice = tf19.slice(t2.predictions, [0, 0], [-1, 1]); - t2.sigmoid = tf19.sigmoid(t2.slice); - t2.scores = tf19.squeeze(t2.sigmoid); - const scores = await t2.scores.data(); - t2.boxes = tf19.slice(t2.predictions, [0, 1], [-1, 4]); - t2.norm = this.normalizeBoxes(t2.boxes); - t2.nms = await tf19.image.nonMaxSuppressionAsync(t2.norm, t2.scores, 3 * (((_a = config3.hand) == null ? void 0 : _a.maxDetected) || 1), config3.hand.iouThreshold, config3.hand.minConfidence); - const nms = await t2.nms.array(); - const hands = []; - for (const index2 of nms) { - const p = {}; - p.box = tf19.slice(t2.norm, [index2, 0], [1, -1]); - p.slice = tf19.slice(t2.predictions, [index2, 5], [1, 14]); - p.norm = this.normalizeLandmarks(p.slice, index2); - p.palmLandmarks = tf19.reshape(p.norm, [-1, 2]); - const box = await p.box.data(); - const startPoint = box.slice(0, 2); - const endPoint = box.slice(2, 4); - const palmLandmarks = await p.palmLandmarks.array(); - const hand3 = { startPoint, endPoint, palmLandmarks, confidence: scores[index2] }; - const scaled = scaleBoxCoordinates2(hand3, [(input.shape[2] || 1) / this.inputSize, (input.shape[1] || 0) / this.inputSize]); - hands.push(scaled); - Object.keys(p).forEach((tensor6) => tf19.dispose(p[tensor6])); - } - Object.keys(t2).forEach((tensor6) => tf19.dispose(t2[tensor6])); - return hands; - } -}; - -// src/hand/handposepipeline.ts -var tf20 = __toESM(require_tfjs_esm()); -var palmBoxEnlargeFactor = 5; -var handBoxEnlargeFactor = 1.65; -var palmLandmarkIds = [0, 5, 9, 13, 17, 1, 2]; -var palmLandmarksPalmBase = 0; -var palmLandmarksMiddleFingerBase = 2; -var lastTime8 = 0; -var HandPipeline = class { - constructor(handDetector, handPoseModel2) { - __publicField(this, "handDetector"); - __publicField(this, "handPoseModel"); - __publicField(this, "inputSize"); - __publicField(this, "storedBoxes"); - __publicField(this, "skipped"); - __publicField(this, "detectedHands"); - var _a, _b, _c; - this.handDetector = handDetector; - this.handPoseModel = handPoseModel2; - this.inputSize = ((_c = (_b = (_a = this.handPoseModel) == null ? void 0 : _a.inputs) == null ? void 0 : _b[0].shape) == null ? void 0 : _c[2]) || 0; - this.storedBoxes = []; - this.skipped = Number.MAX_SAFE_INTEGER; - this.detectedHands = 0; - } - calculateLandmarksBoundingBox(landmarks) { - const xs = landmarks.map((d) => d[0]); - const ys = landmarks.map((d) => d[1]); - const startPoint = [Math.min(...xs), Math.min(...ys)]; - const endPoint = [Math.max(...xs), Math.max(...ys)]; - return { startPoint, endPoint }; - } - getBoxForPalmLandmarks(palmLandmarks, rotationMatrix) { - const rotatedPalmLandmarks = palmLandmarks.map((coord) => rotatePoint2([...coord, 1], rotationMatrix)); - const boxAroundPalm = this.calculateLandmarksBoundingBox(rotatedPalmLandmarks); - return enlargeBox2(squarifyBox2(boxAroundPalm), palmBoxEnlargeFactor); - } - getBoxForHandLandmarks(landmarks) { - const boundingBox = this.calculateLandmarksBoundingBox(landmarks); - const boxAroundHand = enlargeBox2(squarifyBox2(boundingBox), handBoxEnlargeFactor); - boxAroundHand.palmLandmarks = []; - for (let i = 0; i < palmLandmarkIds.length; i++) { - boxAroundHand.palmLandmarks.push(landmarks[palmLandmarkIds[i]].slice(0, 2)); - } - return boxAroundHand; - } - transformRawCoords(rawCoords, box2, angle, rotationMatrix) { - const boxSize = getBoxSize2(box2); - const scaleFactor = [boxSize[0] / this.inputSize, boxSize[1] / this.inputSize, (boxSize[0] + boxSize[1]) / this.inputSize / 2]; - const coordsScaled = rawCoords.map((coord) => [ - scaleFactor[0] * (coord[0] - this.inputSize / 2), - scaleFactor[1] * (coord[1] - this.inputSize / 2), - scaleFactor[2] * coord[2] - ]); - const coordsRotationMatrix = buildRotationMatrix2(angle, [0, 0]); - const coordsRotated = coordsScaled.map((coord) => { - const rotated = rotatePoint2(coord, coordsRotationMatrix); - return [...rotated, coord[2]]; - }); - const inverseRotationMatrix = invertTransformMatrix2(rotationMatrix); - const boxCenter = [...getBoxCenter2(box2), 1]; - const originalBoxCenter = [ - dot2(boxCenter, inverseRotationMatrix[0]), - dot2(boxCenter, inverseRotationMatrix[1]) - ]; - return coordsRotated.map((coord) => [ - Math.trunc(coord[0] + originalBoxCenter[0]), - Math.trunc(coord[1] + originalBoxCenter[1]), - Math.trunc(coord[2]) - ]); - } - async estimateHands(image27, config3) { - let useFreshBox = false; - let boxes; - const skipTime = (config3.hand.skipTime || 0) > now() - lastTime8; - const skipFrame = this.skipped < (config3.hand.skipFrames || 0); - if (config3.skipAllowed && skipTime && skipFrame) { - boxes = await this.handDetector.predict(image27, config3); - this.skipped = 0; - } - if (config3.skipAllowed) - this.skipped++; - if (boxes && boxes.length > 0 && (boxes.length !== this.detectedHands && this.detectedHands !== config3.hand.maxDetected || !config3.hand.landmarks)) { - this.detectedHands = 0; - this.storedBoxes = [...boxes]; - if (this.storedBoxes.length > 0) - useFreshBox = true; - } - const hands = []; - for (let i = 0; i < this.storedBoxes.length; i++) { - const currentBox = this.storedBoxes[i]; - if (!currentBox) - continue; - if (config3.hand.landmarks) { - const angle = config3.hand.rotation ? computeRotation2(currentBox.palmLandmarks[palmLandmarksPalmBase], currentBox.palmLandmarks[palmLandmarksMiddleFingerBase]) : 0; - const palmCenter = getBoxCenter2(currentBox); - const palmCenterNormalized = [palmCenter[0] / image27.shape[2], palmCenter[1] / image27.shape[1]]; - const rotatedImage = config3.hand.rotation && env.kernels.includes("rotatewithoffset") ? tf20.image.rotateWithOffset(image27, angle, 0, palmCenterNormalized) : image27.clone(); - const rotationMatrix = buildRotationMatrix2(-angle, palmCenter); - const newBox = useFreshBox ? this.getBoxForPalmLandmarks(currentBox.palmLandmarks, rotationMatrix) : currentBox; - const croppedInput = cutBoxFromImageAndResize(newBox, rotatedImage, [this.inputSize, this.inputSize]); - const handImage = tf20.div(croppedInput, constants.tf255); - tf20.dispose(croppedInput); - tf20.dispose(rotatedImage); - const [confidenceT, keypoints] = this.handPoseModel.execute(handImage); - lastTime8 = now(); - tf20.dispose(handImage); - const confidence = (await confidenceT.data())[0]; - tf20.dispose(confidenceT); - if (confidence >= config3.hand.minConfidence / 4) { - const keypointsReshaped = tf20.reshape(keypoints, [-1, 3]); - const rawCoords = await keypointsReshaped.array(); - tf20.dispose(keypoints); - tf20.dispose(keypointsReshaped); - const coords = this.transformRawCoords(rawCoords, newBox, angle, rotationMatrix); - const nextBoundingBox = this.getBoxForHandLandmarks(coords); - this.storedBoxes[i] = { ...nextBoundingBox, confidence }; - const result = { - landmarks: coords, - confidence, - boxConfidence: currentBox.confidence, - fingerConfidence: confidence, - box: { topLeft: nextBoundingBox.startPoint, bottomRight: nextBoundingBox.endPoint } - }; - hands.push(result); - } else { - this.storedBoxes[i] = null; - } - tf20.dispose(keypoints); - } else { - const enlarged = enlargeBox2(squarifyBox2(currentBox), handBoxEnlargeFactor); - const result = { - confidence: currentBox.confidence, - boxConfidence: currentBox.confidence, - fingerConfidence: 0, - box: { topLeft: enlarged.startPoint, bottomRight: enlarged.endPoint }, - landmarks: [] - }; - hands.push(result); - } - } - this.storedBoxes = this.storedBoxes.filter((a) => a !== null); - this.detectedHands = hands.length; - if (hands.length > config3.hand.maxDetected) - hands.length = config3.hand.maxDetected; - return hands; - } -}; - -// src/hand/fingerdef.ts -var Finger = { - thumb: 0, - index: 1, - middle: 2, - ring: 3, - pinky: 4, - all: [0, 1, 2, 3, 4], - nameMapping: { 0: "thumb", 1: "index", 2: "middle", 3: "ring", 4: "pinky" }, - pointsMapping: { - 0: [[0, 1], [1, 2], [2, 3], [3, 4]], - 1: [[0, 5], [5, 6], [6, 7], [7, 8]], - 2: [[0, 9], [9, 10], [10, 11], [11, 12]], - 3: [[0, 13], [13, 14], [14, 15], [15, 16]], - 4: [[0, 17], [17, 18], [18, 19], [19, 20]] - }, - getName: (value) => Finger.nameMapping[value], - getPoints: (value) => Finger.pointsMapping[value] -}; -var FingerCurl = { - none: 0, - half: 1, - full: 2, - nameMapping: { 0: "none", 1: "half", 2: "full" }, - getName: (value) => FingerCurl.nameMapping[value] -}; -var FingerDirection = { - verticalUp: 0, - verticalDown: 1, - horizontalLeft: 2, - horizontalRight: 3, - diagonalUpRight: 4, - diagonalUpLeft: 5, - diagonalDownRight: 6, - diagonalDownLeft: 7, - nameMapping: { 0: "verticalUp", 1: "verticalDown", 2: "horizontalLeft", 3: "horizontalRight", 4: "diagonalUpRight", 5: "diagonalUpLeft", 6: "diagonalDownRight", 7: "diagonalDownLeft" }, - getName: (value) => FingerDirection.nameMapping[value] -}; -var FingerGesture = class { - constructor(name) { - __publicField(this, "name"); - __publicField(this, "curls"); - __publicField(this, "directions"); - __publicField(this, "weights"); - __publicField(this, "weightsRelative"); - this.name = name; - this.curls = {}; - this.directions = {}; - this.weights = [1, 1, 1, 1, 1]; - this.weightsRelative = [1, 1, 1, 1, 1]; - } - curl(finger, curl, confidence) { - if (typeof this.curls[finger] === "undefined") - this.curls[finger] = []; - this.curls[finger].push([curl, confidence]); - } - direction(finger, position, confidence) { - if (!this.directions[finger]) - this.directions[finger] = []; - this.directions[finger].push([position, confidence]); - } - weight(finger, weight) { - this.weights[finger] = weight; - const total = this.weights.reduce((a, b) => a + b, 0); - this.weightsRelative = this.weights.map((el) => el * 5 / total); - } - matchAgainst(detectedCurls, detectedDirections) { - let confidence = 0; - for (const fingerIdx in detectedCurls) { - const detectedCurl = detectedCurls[fingerIdx]; - const expectedCurls = this.curls[fingerIdx]; - if (typeof expectedCurls === "undefined") { - confidence += this.weightsRelative[fingerIdx]; - continue; - } - for (const [expectedCurl, score] of expectedCurls) { - if (detectedCurl === expectedCurl) { - confidence += score * this.weightsRelative[fingerIdx]; - break; - } - } - } - for (const fingerIdx in detectedDirections) { - const detectedDirection = detectedDirections[fingerIdx]; - const expectedDirections = this.directions[fingerIdx]; - if (typeof expectedDirections === "undefined") { - confidence += this.weightsRelative[fingerIdx]; - continue; - } - for (const [expectedDirection, score] of expectedDirections) { - if (detectedDirection === expectedDirection) { - confidence += score * this.weightsRelative[fingerIdx]; - break; - } - } - } - return confidence / 10; - } -}; - -// src/hand/fingergesture.ts -var { thumb, index, middle, ring, pinky } = Finger; -var { none, half, full } = FingerCurl; -var { verticalUp, verticalDown, horizontalLeft, horizontalRight, diagonalUpRight, diagonalUpLeft, diagonalDownRight, diagonalDownLeft } = FingerDirection; -var ThumbsUp = new FingerGesture("thumbs up"); -ThumbsUp.curl(thumb, none, 1); -ThumbsUp.direction(thumb, verticalUp, 1); -ThumbsUp.direction(thumb, diagonalUpLeft, 0.25); -ThumbsUp.direction(thumb, diagonalUpRight, 0.25); -for (const finger of [Finger.index, Finger.middle, Finger.ring, Finger.pinky]) { - ThumbsUp.curl(finger, full, 1); - ThumbsUp.direction(finger, horizontalLeft, 1); - ThumbsUp.direction(finger, horizontalRight, 1); -} -var Victory = new FingerGesture("victory"); -Victory.curl(thumb, half, 0.5); -Victory.curl(thumb, none, 0.5); -Victory.direction(thumb, verticalUp, 1); -Victory.direction(thumb, diagonalUpLeft, 1); -Victory.curl(index, none, 1); -Victory.direction(index, verticalUp, 0.75); -Victory.direction(index, diagonalUpLeft, 1); -Victory.curl(middle, none, 1); -Victory.direction(middle, verticalUp, 1); -Victory.direction(middle, diagonalUpLeft, 0.75); -Victory.curl(ring, full, 1); -Victory.direction(ring, verticalUp, 0.2); -Victory.direction(ring, diagonalUpLeft, 1); -Victory.direction(ring, horizontalLeft, 0.2); -Victory.curl(pinky, full, 1); -Victory.direction(pinky, verticalUp, 0.2); -Victory.direction(pinky, diagonalUpLeft, 1); -Victory.direction(pinky, horizontalLeft, 0.2); -Victory.weight(index, 2); -Victory.weight(middle, 2); -var Point = new FingerGesture("point"); -Point.curl(thumb, full, 1); -Point.curl(index, none, 0.5); -Point.curl(middle, full, 0.5); -Point.curl(ring, full, 0.5); -Point.curl(pinky, full, 0.5); -Point.weight(index, 2); -Point.weight(middle, 2); -var MiddleFinger = new FingerGesture("middle finger"); -MiddleFinger.curl(thumb, none, 1); -MiddleFinger.curl(index, full, 0.5); -MiddleFinger.curl(middle, full, 0.5); -MiddleFinger.curl(ring, full, 0.5); -MiddleFinger.curl(pinky, full, 0.5); -MiddleFinger.weight(index, 2); -MiddleFinger.weight(middle, 2); -var OpenPalm = new FingerGesture("open palm"); -OpenPalm.curl(thumb, none, 0.75); -OpenPalm.curl(index, none, 0.75); -OpenPalm.curl(middle, none, 0.75); -OpenPalm.curl(ring, none, 0.75); -OpenPalm.curl(pinky, none, 0.75); -var fingergesture_default = [ThumbsUp, Victory, Point, MiddleFinger, OpenPalm]; - -// src/hand/fingerpose.ts -var minConfidence = 0.7; -var options2 = { - HALF_CURL_START_LIMIT: 60, - NO_CURL_START_LIMIT: 130, - DISTANCE_VOTE_POWER: 1.1, - SINGLE_ANGLE_VOTE_POWER: 0.9, - TOTAL_ANGLE_VOTE_POWER: 1.6 -}; -function calculateSlope(point1x, point1y, point2x, point2y) { - const value = (point1y - point2y) / (point1x - point2x); - let slope = Math.atan(value) * 180 / Math.PI; - if (slope <= 0) - slope = -slope; - else if (slope > 0) - slope = 180 - slope; - return slope; -} -function getSlopes(point1, point2) { - if (!point1 || !point2) - return [0, 0]; - const slopeXY = calculateSlope(point1[0], point1[1], point2[0], point2[1]); - if (point1.length === 2) - return slopeXY; - const slopeYZ = calculateSlope(point1[1], point1[2], point2[1], point2[2]); - return [slopeXY, slopeYZ]; -} -function angleOrientationAt(angle, weightageAt = 1) { - let isVertical = 0; - let isDiagonal = 0; - let isHorizontal = 0; - if (angle >= 75 && angle <= 105) - isVertical = 1 * weightageAt; - else if (angle >= 25 && angle <= 155) - isDiagonal = 1 * weightageAt; - else - isHorizontal = 1 * weightageAt; - return [isVertical, isDiagonal, isHorizontal]; -} -function estimateFingerCurl(startPoint, midPoint, endPoint) { - const start_mid_x_dist = startPoint[0] - midPoint[0]; - const start_end_x_dist = startPoint[0] - endPoint[0]; - const mid_end_x_dist = midPoint[0] - endPoint[0]; - const start_mid_y_dist = startPoint[1] - midPoint[1]; - const start_end_y_dist = startPoint[1] - endPoint[1]; - const mid_end_y_dist = midPoint[1] - endPoint[1]; - const start_mid_z_dist = startPoint[2] - midPoint[2]; - const start_end_z_dist = startPoint[2] - endPoint[2]; - const mid_end_z_dist = midPoint[2] - endPoint[2]; - const start_mid_dist = Math.sqrt(start_mid_x_dist * start_mid_x_dist + start_mid_y_dist * start_mid_y_dist + start_mid_z_dist * start_mid_z_dist); - const start_end_dist = Math.sqrt(start_end_x_dist * start_end_x_dist + start_end_y_dist * start_end_y_dist + start_end_z_dist * start_end_z_dist); - const mid_end_dist = Math.sqrt(mid_end_x_dist * mid_end_x_dist + mid_end_y_dist * mid_end_y_dist + mid_end_z_dist * mid_end_z_dist); - let cos_in = (mid_end_dist * mid_end_dist + start_mid_dist * start_mid_dist - start_end_dist * start_end_dist) / (2 * mid_end_dist * start_mid_dist); - if (cos_in > 1) - cos_in = 1; - else if (cos_in < -1) - cos_in = -1; - let angleOfCurve = Math.acos(cos_in); - angleOfCurve = 57.2958 * angleOfCurve % 180; - let fingerCurl; - if (angleOfCurve > options2.NO_CURL_START_LIMIT) - fingerCurl = FingerCurl.none; - else if (angleOfCurve > options2.HALF_CURL_START_LIMIT) - fingerCurl = FingerCurl.half; - else - fingerCurl = FingerCurl.full; - return fingerCurl; -} -function estimateHorizontalDirection(start_end_x_dist, start_mid_x_dist, mid_end_x_dist, max_dist_x) { - let estimatedDirection; - if (max_dist_x === Math.abs(start_end_x_dist)) { - if (start_end_x_dist > 0) - estimatedDirection = FingerDirection.horizontalLeft; - else - estimatedDirection = FingerDirection.horizontalRight; - } else if (max_dist_x === Math.abs(start_mid_x_dist)) { - if (start_mid_x_dist > 0) - estimatedDirection = FingerDirection.horizontalLeft; - else - estimatedDirection = FingerDirection.horizontalRight; - } else { - if (mid_end_x_dist > 0) - estimatedDirection = FingerDirection.horizontalLeft; - else - estimatedDirection = FingerDirection.horizontalRight; - } - return estimatedDirection; -} -function estimateVerticalDirection(start_end_y_dist, start_mid_y_dist, mid_end_y_dist, max_dist_y) { - let estimatedDirection; - if (max_dist_y === Math.abs(start_end_y_dist)) { - if (start_end_y_dist < 0) - estimatedDirection = FingerDirection.verticalDown; - else - estimatedDirection = FingerDirection.verticalUp; - } else if (max_dist_y === Math.abs(start_mid_y_dist)) { - if (start_mid_y_dist < 0) - estimatedDirection = FingerDirection.verticalDown; - else - estimatedDirection = FingerDirection.verticalUp; - } else { - if (mid_end_y_dist < 0) - estimatedDirection = FingerDirection.verticalDown; - else - estimatedDirection = FingerDirection.verticalUp; - } - return estimatedDirection; -} -function estimateDiagonalDirection(start_end_y_dist, start_mid_y_dist, mid_end_y_dist, max_dist_y, start_end_x_dist, start_mid_x_dist, mid_end_x_dist, max_dist_x) { - let estimatedDirection; - const reqd_vertical_direction = estimateVerticalDirection(start_end_y_dist, start_mid_y_dist, mid_end_y_dist, max_dist_y); - const reqd_horizontal_direction = estimateHorizontalDirection(start_end_x_dist, start_mid_x_dist, mid_end_x_dist, max_dist_x); - if (reqd_vertical_direction === FingerDirection.verticalUp) { - if (reqd_horizontal_direction === FingerDirection.horizontalLeft) - estimatedDirection = FingerDirection.diagonalUpLeft; - else - estimatedDirection = FingerDirection.diagonalUpRight; - } else { - if (reqd_horizontal_direction === FingerDirection.horizontalLeft) - estimatedDirection = FingerDirection.diagonalDownLeft; - else - estimatedDirection = FingerDirection.diagonalDownRight; - } - return estimatedDirection; -} -function calculateFingerDirection(startPoint, midPoint, endPoint, fingerSlopes) { - const start_mid_x_dist = startPoint[0] - midPoint[0]; - const start_end_x_dist = startPoint[0] - endPoint[0]; - const mid_end_x_dist = midPoint[0] - endPoint[0]; - const start_mid_y_dist = startPoint[1] - midPoint[1]; - const start_end_y_dist = startPoint[1] - endPoint[1]; - const mid_end_y_dist = midPoint[1] - endPoint[1]; - const max_dist_x = Math.max(Math.abs(start_mid_x_dist), Math.abs(start_end_x_dist), Math.abs(mid_end_x_dist)); - const max_dist_y = Math.max(Math.abs(start_mid_y_dist), Math.abs(start_end_y_dist), Math.abs(mid_end_y_dist)); - let voteVertical = 0; - let voteDiagonal = 0; - let voteHorizontal = 0; - const start_end_x_y_dist_ratio = max_dist_y / (max_dist_x + 1e-5); - if (start_end_x_y_dist_ratio > 1.5) - voteVertical += options2.DISTANCE_VOTE_POWER; - else if (start_end_x_y_dist_ratio > 0.66) - voteDiagonal += options2.DISTANCE_VOTE_POWER; - else - voteHorizontal += options2.DISTANCE_VOTE_POWER; - const start_mid_dist = Math.sqrt(start_mid_x_dist * start_mid_x_dist + start_mid_y_dist * start_mid_y_dist); - const start_end_dist = Math.sqrt(start_end_x_dist * start_end_x_dist + start_end_y_dist * start_end_y_dist); - const mid_end_dist = Math.sqrt(mid_end_x_dist * mid_end_x_dist + mid_end_y_dist * mid_end_y_dist); - const max_dist = Math.max(start_mid_dist, start_end_dist, mid_end_dist); - let calc_start_point_x = startPoint[0]; - let calc_start_point_y = startPoint[1]; - let calc_end_point_x = endPoint[0]; - let calc_end_point_y = endPoint[1]; - if (max_dist === start_mid_dist) { - calc_end_point_x = endPoint[0]; - calc_end_point_y = endPoint[1]; - } else if (max_dist === mid_end_dist) { - calc_start_point_x = midPoint[0]; - calc_start_point_y = midPoint[1]; - } - const calcStartPoint = [calc_start_point_x, calc_start_point_y]; - const calcEndPoint = [calc_end_point_x, calc_end_point_y]; - const totalAngle = getSlopes(calcStartPoint, calcEndPoint); - const votes = angleOrientationAt(totalAngle, options2.TOTAL_ANGLE_VOTE_POWER); - voteVertical += votes[0]; - voteDiagonal += votes[1]; - voteHorizontal += votes[2]; - for (const fingerSlope of fingerSlopes) { - const fingerVotes = angleOrientationAt(fingerSlope, options2.SINGLE_ANGLE_VOTE_POWER); - voteVertical += fingerVotes[0]; - voteDiagonal += fingerVotes[1]; - voteHorizontal += fingerVotes[2]; - } - let estimatedDirection; - if (voteVertical === Math.max(voteVertical, voteDiagonal, voteHorizontal)) { - estimatedDirection = estimateVerticalDirection(start_end_y_dist, start_mid_y_dist, mid_end_y_dist, max_dist_y); - } else if (voteHorizontal === Math.max(voteDiagonal, voteHorizontal)) { - estimatedDirection = estimateHorizontalDirection(start_end_x_dist, start_mid_x_dist, mid_end_x_dist, max_dist_x); - } else { - estimatedDirection = estimateDiagonalDirection(start_end_y_dist, start_mid_y_dist, mid_end_y_dist, max_dist_y, start_end_x_dist, start_mid_x_dist, mid_end_x_dist, max_dist_x); - } - return estimatedDirection; -} -function estimate(landmarks) { - const slopesXY = []; - const slopesYZ = []; - const fingerCurls = []; - const fingerDirections = []; - if (!landmarks) - return { curls: fingerCurls, directions: fingerDirections }; - for (const finger of Finger.all) { - const points = Finger.getPoints(finger); - const slopeAtXY = []; - const slopeAtYZ = []; - for (const point2 of points) { - const point1 = landmarks[point2[0]]; - const point22 = landmarks[point2[1]]; - const slopes = getSlopes(point1, point22); - const slopeXY = slopes[0]; - const slopeYZ = slopes[1]; - slopeAtXY.push(slopeXY); - slopeAtYZ.push(slopeYZ); - } - slopesXY.push(slopeAtXY); - slopesYZ.push(slopeAtYZ); - } - for (const finger of Finger.all) { - const pointIndexAt = finger === Finger.thumb ? 1 : 0; - const fingerPointsAt = Finger.getPoints(finger); - const startPoint = landmarks[fingerPointsAt[pointIndexAt][0]]; - const midPoint = landmarks[fingerPointsAt[pointIndexAt + 1][1]]; - const endPoint = landmarks[fingerPointsAt[3][1]]; - const fingerCurled = estimateFingerCurl(startPoint, midPoint, endPoint); - const fingerPosition = calculateFingerDirection(startPoint, midPoint, endPoint, slopesXY[finger].slice(pointIndexAt)); - fingerCurls[finger] = fingerCurled; - fingerDirections[finger] = fingerPosition; - } - return { curls: fingerCurls, directions: fingerDirections }; -} -function analyze(keypoints) { - if (!keypoints || keypoints.length === 0) - return null; - const estimatorRes = estimate(keypoints); - const landmarks = {}; - for (const fingerIdx of Finger.all) { - landmarks[Finger.getName(fingerIdx)] = { - curl: FingerCurl.getName(estimatorRes.curls[fingerIdx]), - direction: FingerDirection.getName(estimatorRes.directions[fingerIdx]) - }; - } - return landmarks; -} -function match(keypoints) { - const poses = []; - if (!keypoints || keypoints.length === 0) - return poses; - const estimatorRes = estimate(keypoints); - for (const gesture2 of fingergesture_default) { - const confidence = gesture2.matchAgainst(estimatorRes.curls, estimatorRes.directions); - if (confidence >= minConfidence) - poses.push({ name: gesture2.name, confidence }); - } - return poses; -} - -// src/hand/handpose.ts -var meshAnnotations2 = { - thumb: [1, 2, 3, 4], - index: [5, 6, 7, 8], - middle: [9, 10, 11, 12], - ring: [13, 14, 15, 16], - pinky: [17, 18, 19, 20], - palm: [0] -}; -var handDetectorModel; -var handPoseModel; -var handPipeline; -async function predict9(input, config3) { - const predictions = await handPipeline.estimateHands(input, config3); - if (!predictions) - return []; - const hands = []; - for (let i = 0; i < predictions.length; i++) { - const annotations2 = {}; - if (predictions[i].landmarks) { - for (const key of Object.keys(meshAnnotations2)) { - annotations2[key] = meshAnnotations2[key].map((index2) => predictions[i].landmarks[index2]); - } - } - const keypoints = predictions[i].landmarks; - let box = [Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER, 0, 0]; - let boxRaw = [0, 0, 0, 0]; - if (keypoints && keypoints.length > 0) { - for (const pt of keypoints) { - if (pt[0] < box[0]) - box[0] = pt[0]; - if (pt[1] < box[1]) - box[1] = pt[1]; - if (pt[0] > box[2]) - box[2] = pt[0]; - if (pt[1] > box[3]) - box[3] = pt[1]; - } - box[2] -= box[0]; - box[3] -= box[1]; - boxRaw = [box[0] / (input.shape[2] || 0), box[1] / (input.shape[1] || 0), box[2] / (input.shape[2] || 0), box[3] / (input.shape[1] || 0)]; - } else { - box = predictions[i].box ? [ - Math.trunc(Math.max(0, predictions[i].box.topLeft[0])), - Math.trunc(Math.max(0, predictions[i].box.topLeft[1])), - Math.trunc(Math.min(input.shape[2] || 0, predictions[i].box.bottomRight[0]) - Math.max(0, predictions[i].box.topLeft[0])), - Math.trunc(Math.min(input.shape[1] || 0, predictions[i].box.bottomRight[1]) - Math.max(0, predictions[i].box.topLeft[1])) - ] : [0, 0, 0, 0]; - boxRaw = [ - predictions[i].box.topLeft[0] / (input.shape[2] || 0), - predictions[i].box.topLeft[1] / (input.shape[1] || 0), - (predictions[i].box.bottomRight[0] - predictions[i].box.topLeft[0]) / (input.shape[2] || 0), - (predictions[i].box.bottomRight[1] - predictions[i].box.topLeft[1]) / (input.shape[1] || 0) - ]; - } - const landmarks = analyze(keypoints); - hands.push({ - id: i, - score: Math.round(100 * predictions[i].confidence) / 100, - boxScore: Math.round(100 * predictions[i].boxConfidence) / 100, - fingerScore: Math.round(100 * predictions[i].fingerConfidence) / 100, - label: "hand", - box, - boxRaw, - keypoints, - annotations: annotations2, - landmarks - }); - } - return hands; -} -async function load10(config3) { - var _a, _b; - if (env.initial) { - handDetectorModel = null; - handPoseModel = null; - } - if (!handDetectorModel || !handPoseModel) { - [handDetectorModel, handPoseModel] = await Promise.all([ - config3.hand.enabled ? loadModel((_a = config3.hand.detector) == null ? void 0 : _a.modelPath) : null, - config3.hand.landmarks ? loadModel((_b = config3.hand.skeleton) == null ? void 0 : _b.modelPath) : null - ]); - } else { - if (config3.debug) - log("cached model:", handDetectorModel["modelUrl"]); - if (config3.debug) - log("cached model:", handPoseModel["modelUrl"]); - } - const handDetector = handDetectorModel ? new HandDetector(handDetectorModel) : void 0; - if (handDetector && handPoseModel) - handPipeline = new HandPipeline(handDetector, handPoseModel); - return [handDetectorModel, handPoseModel]; -} - -// src/hand/handtrack.ts -var tf21 = __toESM(require_tfjs_esm()); -var models3 = [null, null]; -var modelOutputNodes = ["StatefulPartitionedCall/Postprocessor/Slice", "StatefulPartitionedCall/Postprocessor/ExpandDims_1"]; -var inputSize7 = [[0, 0], [0, 0]]; -var classes = ["hand", "fist", "pinch", "point", "face", "tip", "pinchtip"]; -var faceIndex = 4; -var boxExpandFact = 1.6; -var maxDetectorResolution = 512; -var detectorExpandFact = 1.4; -var skipped8 = Number.MAX_SAFE_INTEGER; -var lastTime9 = 0; -var outputSize = [0, 0]; -var cache4 = { - boxes: [], - hands: [] -}; -var fingerMap = { - thumb: [1, 2, 3, 4], - index: [5, 6, 7, 8], - middle: [9, 10, 11, 12], - ring: [13, 14, 15, 16], - pinky: [17, 18, 19, 20], - base: [0], - palm: [0, 17, 13, 9, 5, 1, 0] -}; -async function loadDetect2(config3) { - var _a; - if (env.initial) - models3[0] = null; - if (!models3[0]) { - fakeOps(["tensorlistreserve", "enter", "tensorlistfromtensor", "merge", "loopcond", "switch", "exit", "tensorliststack", "nextiteration", "tensorlistsetitem", "tensorlistgetitem", "reciprocal", "shape", "split", "where"], config3); - models3[0] = await loadModel((_a = config3.hand.detector) == null ? void 0 : _a.modelPath); - const inputs = models3[0]["executor"] ? Object.values(models3[0].modelSignature["inputs"]) : void 0; - inputSize7[0][0] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[1].size) : 0; - inputSize7[0][1] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : 0; - } else if (config3.debug) - log("cached model:", models3[0]["modelUrl"]); - return models3[0]; -} -async function loadSkeleton(config3) { - var _a; - if (env.initial) - models3[1] = null; - if (!models3[1]) { - models3[1] = await loadModel((_a = config3.hand.skeleton) == null ? void 0 : _a.modelPath); - const inputs = models3[1]["executor"] ? Object.values(models3[1].modelSignature["inputs"]) : void 0; - inputSize7[1][0] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[1].size) : 0; - inputSize7[1][1] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : 0; - } else if (config3.debug) - log("cached model:", models3[1]["modelUrl"]); - return models3[1]; -} -async function detectHands(input, config3) { - const hands = []; - if (!input || !models3[0]) - return hands; - const t2 = {}; - const ratio2 = (input.shape[2] || 1) / (input.shape[1] || 1); - const height = Math.min(Math.round((input.shape[1] || 0) / 8) * 8, maxDetectorResolution); - const width = Math.round(height * ratio2 / 8) * 8; - t2.resize = tf21.image.resizeBilinear(input, [height, width]); - t2.cast = tf21.cast(t2.resize, "int32"); - [t2.rawScores, t2.rawBoxes] = await models3[0].executeAsync(t2.cast, modelOutputNodes); - t2.boxes = tf21.squeeze(t2.rawBoxes, [0, 2]); - t2.scores = tf21.squeeze(t2.rawScores, [0]); - const classScores = tf21.unstack(t2.scores, 1); - tf21.dispose(classScores[faceIndex]); - classScores.splice(faceIndex, 1); - t2.filtered = tf21.stack(classScores, 1); - tf21.dispose(classScores); - t2.max = tf21.max(t2.filtered, 1); - t2.argmax = tf21.argMax(t2.filtered, 1); - let id = 0; - t2.nms = await tf21.image.nonMaxSuppressionAsync(t2.boxes, t2.max, (config3.hand.maxDetected || 0) + 1, config3.hand.iouThreshold || 0, config3.hand.minConfidence || 1); - const nms = await t2.nms.data(); - const scores = await t2.max.data(); - const classNum = await t2.argmax.data(); - for (const nmsIndex of Array.from(nms)) { - const boxSlice = tf21.slice(t2.boxes, nmsIndex, 1); - const boxYX = await boxSlice.data(); - tf21.dispose(boxSlice); - const boxData = [boxYX[1], boxYX[0], boxYX[3] - boxYX[1], boxYX[2] - boxYX[0]]; - const boxRaw = scale(boxData, detectorExpandFact); - const boxFull = [Math.trunc(boxData[0] * outputSize[0]), Math.trunc(boxData[1] * outputSize[1]), Math.trunc(boxData[2] * outputSize[0]), Math.trunc(boxData[3] * outputSize[1])]; - const score = scores[nmsIndex]; - const label = classes[classNum[nmsIndex]]; - const hand3 = { id: id++, score, box: boxFull, boxRaw, label }; - hands.push(hand3); - } - Object.keys(t2).forEach((tensor6) => tf21.dispose(t2[tensor6])); - hands.sort((a, b) => b.score - a.score); - if (hands.length > (config3.hand.maxDetected || 1)) - hands.length = config3.hand.maxDetected || 1; - return hands; -} -async function detectFingers(input, h, config3) { - const hand3 = { - id: h.id, - score: Math.round(100 * h.score) / 100, - boxScore: Math.round(100 * h.score) / 100, - fingerScore: 0, - box: h.box, - boxRaw: h.boxRaw, - label: h.label, - keypoints: [], - landmarks: {}, - annotations: {} - }; - if (input && models3[1] && config3.hand.landmarks && h.score > (config3.hand.minConfidence || 0)) { - const t2 = {}; - const boxCrop = [h.boxRaw[1], h.boxRaw[0], h.boxRaw[3] + h.boxRaw[1], h.boxRaw[2] + h.boxRaw[0]]; - t2.crop = tf21.image.cropAndResize(input, [boxCrop], [0], [inputSize7[1][0], inputSize7[1][1]], "bilinear"); - t2.div = tf21.div(t2.crop, constants.tf255); - [t2.score, t2.keypoints] = models3[1].execute(t2.div, ["Identity_1", "Identity"]); - const rawScore = (await t2.score.data())[0]; - const score = (100 - Math.trunc(100 / (1 + Math.exp(rawScore)))) / 100; - if (score >= (config3.hand.minConfidence || 0)) { - hand3.fingerScore = score; - t2.reshaped = tf21.reshape(t2.keypoints, [-1, 3]); - const coordsData = await t2.reshaped.array(); - const coordsRaw = coordsData.map((kpt4) => [kpt4[0] / inputSize7[1][1], kpt4[1] / inputSize7[1][0], kpt4[2] || 0]); - const coordsNorm = coordsRaw.map((kpt4) => [kpt4[0] * h.boxRaw[2], kpt4[1] * h.boxRaw[3], kpt4[2] || 0]); - hand3.keypoints = coordsNorm.map((kpt4) => [outputSize[0] * (kpt4[0] + h.boxRaw[0]), outputSize[1] * (kpt4[1] + h.boxRaw[1]), kpt4[2] || 0]); - hand3.landmarks = analyze(hand3.keypoints); - for (const key of Object.keys(fingerMap)) { - hand3.annotations[key] = fingerMap[key].map((index2) => hand3.landmarks && hand3.keypoints[index2] ? hand3.keypoints[index2] : null); - } - } - Object.keys(t2).forEach((tensor6) => tf21.dispose(t2[tensor6])); - } - return hand3; -} -async function predict10(input, config3) { - var _a, _b; - if (!((_a = models3[0]) == null ? void 0 : _a["executor"]) || !((_b = models3[1]) == null ? void 0 : _b["executor"]) || !models3[0].inputs[0].shape || !models3[1].inputs[0].shape) - return []; - outputSize = [input.shape[2] || 0, input.shape[1] || 0]; - skipped8++; - const skipTime = (config3.hand.skipTime || 0) > now() - lastTime9; - const skipFrame = skipped8 < (config3.hand.skipFrames || 0); - if (config3.skipAllowed && skipTime && skipFrame) { - return cache4.hands; - } - return new Promise(async (resolve) => { - const skipTimeExtended = 3 * (config3.hand.skipTime || 0) > now() - lastTime9; - const skipFrameExtended = skipped8 < 3 * (config3.hand.skipFrames || 0); - if (config3.skipAllowed && cache4.hands.length === config3.hand.maxDetected) { - cache4.hands = await Promise.all(cache4.boxes.map((handBox) => detectFingers(input, handBox, config3))); - } else if (config3.skipAllowed && skipTimeExtended && skipFrameExtended && cache4.hands.length > 0) { - cache4.hands = await Promise.all(cache4.boxes.map((handBox) => detectFingers(input, handBox, config3))); - } else { - cache4.boxes = await detectHands(input, config3); - lastTime9 = now(); - cache4.hands = await Promise.all(cache4.boxes.map((handBox) => detectFingers(input, handBox, config3))); - skipped8 = 0; - } - const oldCache = [...cache4.boxes]; - cache4.boxes.length = 0; - if (config3.cacheSensitivity > 0) { - for (let i = 0; i < cache4.hands.length; i++) { - const boxKpt = square(cache4.hands[i].keypoints, outputSize); - if (boxKpt.box[2] / (input.shape[2] || 1) > 0.05 && boxKpt.box[3] / (input.shape[1] || 1) > 0.05 && cache4.hands[i].fingerScore && cache4.hands[i].fingerScore > (config3.hand.minConfidence || 0)) { - const boxScale = scale(boxKpt.box, boxExpandFact); - const boxScaleRaw = scale(boxKpt.boxRaw, boxExpandFact); - cache4.boxes.push({ ...oldCache[i], box: boxScale, boxRaw: boxScaleRaw }); - } - } - } - for (let i = 0; i < cache4.hands.length; i++) { - const bbox = calc(cache4.hands[i].keypoints, outputSize); - cache4.hands[i].box = bbox.box; - cache4.hands[i].boxRaw = bbox.boxRaw; - } - resolve(cache4.hands); - }); -} - -// src/face/insightface.ts -var tf22 = __toESM(require_tfjs_esm()); -var model10; -var last6 = []; -var lastCount5 = 0; -var lastTime10 = 0; -var skipped9 = Number.MAX_SAFE_INTEGER; -async function load11(config3) { - if (env.initial) - model10 = null; - if (!model10) - model10 = await loadModel(config3.face["insightface"].modelPath); - else if (config3.debug) - log("cached model:", model10["modelUrl"]); - return model10; -} -async function predict11(input, config3, idx, count2) { - var _a, _b; - if (!(model10 == null ? void 0 : model10["executor"])) - return []; - const skipFrame = skipped9 < (((_a = config3.face["insightface"]) == null ? void 0 : _a.skipFrames) || 0); - const skipTime = (((_b = config3.face["insightface"]) == null ? void 0 : _b.skipTime) || 0) > now() - lastTime10; - if (config3.skipAllowed && skipTime && skipFrame && lastCount5 === count2 && last6[idx]) { - skipped9++; - return last6[idx]; - } - return new Promise(async (resolve) => { - var _a2; - let data = []; - if (((_a2 = config3.face["insightface"]) == null ? void 0 : _a2.enabled) && (model10 == null ? void 0 : model10.inputs[0].shape)) { - const t2 = {}; - t2.crop = tf22.image.resizeBilinear(input, [model10.inputs[0].shape[2], model10.inputs[0].shape[1]], false); - t2.data = model10.execute(t2.crop); - const output = await t2.data.data(); - data = Array.from(output); - Object.keys(t2).forEach((tensor6) => tf22.dispose(t2[tensor6])); - } - last6[idx] = data; - lastCount5 = count2; - lastTime10 = now(); - resolve(data); - }); -} - -// src/face/liveness.ts -var tf23 = __toESM(require_tfjs_esm()); -var model11; -var cached2 = []; -var skipped10 = Number.MAX_SAFE_INTEGER; -var lastCount6 = 0; -var lastTime11 = 0; -async function load12(config3) { - var _a; - if (env.initial) - model11 = null; - if (!model11) - model11 = await loadModel((_a = config3.face.liveness) == null ? void 0 : _a.modelPath); - else if (config3.debug) - log("cached model:", model11["modelUrl"]); - return model11; -} -async function predict12(image27, config3, idx, count2) { - var _a, _b; - if (!(model11 == null ? void 0 : model11["executor"])) - return 0; - const skipTime = (((_a = config3.face.liveness) == null ? void 0 : _a.skipTime) || 0) > now() - lastTime11; - const skipFrame = skipped10 < (((_b = config3.face.liveness) == null ? void 0 : _b.skipFrames) || 0); - if (config3.skipAllowed && skipTime && skipFrame && lastCount6 === count2 && cached2[idx]) { - skipped10++; - return cached2[idx]; - } - skipped10 = 0; - return new Promise(async (resolve) => { - const resize = tf23.image.resizeBilinear(image27, [(model11 == null ? void 0 : model11.inputs[0].shape) ? model11.inputs[0].shape[2] : 0, (model11 == null ? void 0 : model11.inputs[0].shape) ? model11.inputs[0].shape[1] : 0], false); - const res = model11 == null ? void 0 : model11.execute(resize); - const num = (await res.data())[0]; - cached2[idx] = Math.round(100 * num) / 100; - lastCount6 = count2; - lastTime11 = now(); - tf23.dispose([resize, res]); - resolve(cached2[idx]); - }); -} - -// src/segmentation/meet.ts -var tf24 = __toESM(require_tfjs_esm()); -var model12; -async function load13(config3) { - if (!model12 || env.initial) - model12 = await loadModel(config3.segmentation.modelPath); - else if (config3.debug) - log("cached model:", model12["modelUrl"]); - return model12; -} -async function predict13(input, config3) { - var _a; - if (!model12) - model12 = await load13(config3); - if (!(model12 == null ? void 0 : model12["executor"]) || !((_a = model12 == null ? void 0 : model12.inputs) == null ? void 0 : _a[0].shape)) - return null; - const t2 = {}; - t2.resize = tf24.image.resizeBilinear(input, [model12.inputs[0].shape ? model12.inputs[0].shape[1] : 0, model12.inputs[0].shape ? model12.inputs[0].shape[2] : 0], false); - t2.norm = tf24.div(t2.resize, constants.tf255); - t2.res = model12.execute(t2.norm); - t2.squeeze = tf24.squeeze(t2.res, 0); - [t2.bgRaw, t2.fgRaw] = tf24.unstack(t2.squeeze, 2); - t2.fg = tf24.softmax(t2.fgRaw); - t2.mul = tf24.mul(t2.fg, constants.tf255); - t2.expand = tf24.expandDims(t2.mul, 2); - t2.output = tf24.image.resizeBilinear(t2.expand, [input.shape[1], input.shape[2]]); - let rgba; - switch (config3.segmentation.mode || "default") { - case "default": - t2.input = tf24.squeeze(input); - t2.concat = tf24.concat([t2.input, t2.output], -1); - rgba = tf24.cast(t2.concat, "int32"); - break; - case "alpha": - rgba = tf24.cast(t2.output, "int32"); - break; - default: - rgba = tf24.tensor(0); - } - Object.keys(t2).forEach((tensor6) => tf24.dispose(t2[tensor6])); - return rgba; -} - -// src/face/mobilefacenet.ts -var tf25 = __toESM(require_tfjs_esm()); -var model13; -var last7 = []; -var lastCount7 = 0; -var lastTime12 = 0; -var skipped11 = Number.MAX_SAFE_INTEGER; -async function load14(config3) { - var _a; - if (env.initial) - model13 = null; - if (!model13) - model13 = await loadModel((_a = config3.face["mobilefacenet"]) == null ? void 0 : _a.modelPath); - else if (config3.debug) - log("cached model:", model13["modelUrl"]); - return model13; -} -async function predict14(input, config3, idx, count2) { - var _a, _b; - if (!(model13 == null ? void 0 : model13["executor"])) - return []; - const skipFrame = skipped11 < (((_a = config3.face["mobilefacenet"]) == null ? void 0 : _a.skipFrames) || 0); - const skipTime = (((_b = config3.face["mobilefacenet"]) == null ? void 0 : _b.skipTime) || 0) > now() - lastTime12; - if (config3.skipAllowed && skipTime && skipFrame && lastCount7 === count2 && last7[idx]) { - skipped11++; - return last7[idx]; - } - return new Promise(async (resolve) => { - var _a2; - let data = []; - if (((_a2 = config3.face["mobilefacenet"]) == null ? void 0 : _a2.enabled) && (model13 == null ? void 0 : model13.inputs[0].shape)) { - const t2 = {}; - t2.crop = tf25.image.resizeBilinear(input, [model13.inputs[0].shape[2], model13.inputs[0].shape[1]], false); - t2.data = model13.execute(t2.crop); - const output = await t2.data.data(); - data = Array.from(output); - Object.keys(t2).forEach((tensor6) => tf25.dispose(t2[tensor6])); - } - last7[idx] = data; - lastCount7 = count2; - lastTime12 = now(); - resolve(data); - }); -} - -// src/body/movenet.ts -var tf27 = __toESM(require_tfjs_esm()); - -// src/body/movenetcoords.ts -var movenetcoords_exports = {}; -__export(movenetcoords_exports, { - connected: () => connected3, - horizontal: () => horizontal, - kpt: () => kpt3, - relative: () => relative, - vertical: () => vertical -}); -var kpt3 = [ - "nose", - "leftEye", - "rightEye", - "leftEar", - "rightEar", - "leftShoulder", - "rightShoulder", - "leftElbow", - "rightElbow", - "leftWrist", - "rightWrist", - "leftHip", - "rightHip", - "leftKnee", - "rightKnee", - "leftAnkle", - "rightAnkle" -]; -var horizontal = [ - ["leftEye", "rightEye"], - ["leftEar", "rightEar"], - ["leftShoulder", "rightShoulder"], - ["leftElbow", "rightElbow"], - ["leftWrist", "rightWrist"], - ["leftHip", "rightHip"], - ["leftKnee", "rightKnee"], - ["leftAnkle", "rightAnkle"] -]; -var vertical = [ - ["leftKnee", "leftShoulder"], - ["rightKnee", "rightShoulder"], - ["leftAnkle", "leftKnee"], - ["rightAnkle", "rightKnee"] -]; -var relative = [ - [["leftHip", "rightHip"], ["leftShoulder", "rightShoulder"]], - [["leftElbow", "rightElbow"], ["leftShoulder", "rightShoulder"]] -]; -var connected3 = { - leftLeg: ["leftHip", "leftKnee", "leftAnkle"], - rightLeg: ["rightHip", "rightKnee", "rightAnkle"], - torso: ["leftShoulder", "rightShoulder", "rightHip", "leftHip", "leftShoulder"], - leftArm: ["leftShoulder", "leftElbow", "leftWrist"], - rightArm: ["rightShoulder", "rightElbow", "rightWrist"], - head: [] -}; - -// src/body/movenetfix.ts -var tf26 = __toESM(require_tfjs_esm()); -var maxJitter = 5e-3; -var cache5 = { - keypoints: [], - padding: [[0, 0], [0, 0], [0, 0], [0, 0]] -}; -function bodyParts(body4) { - for (const pair of horizontal) { - const left = body4.keypoints.findIndex((kp) => kp.part === pair[0]); - const right = body4.keypoints.findIndex((kp) => kp.part === pair[1]); - if (body4.keypoints[left] && body4.keypoints[right]) { - if (body4.keypoints[left].position[0] < body4.keypoints[right].position[0]) { - const tmp = body4.keypoints[left]; - body4.keypoints[left] = body4.keypoints[right]; - body4.keypoints[right] = tmp; - } - } - } - for (const pair of vertical) { - const lower = body4.keypoints.findIndex((kp) => kp && kp.part === pair[0]); - const higher = body4.keypoints.findIndex((kp) => kp && kp.part === pair[1]); - if (body4.keypoints[lower] && body4.keypoints[higher]) { - if (body4.keypoints[lower].position[1] < body4.keypoints[higher].position[1]) { - body4.keypoints.splice(lower, 1); - } - } - } - for (const [pair, compare2] of relative) { - const left = body4.keypoints.findIndex((kp) => kp && kp.part === pair[0]); - const right = body4.keypoints.findIndex((kp) => kp && kp.part === pair[1]); - const leftTo = body4.keypoints.findIndex((kp) => kp && kp.part === compare2[0]); - const rightTo = body4.keypoints.findIndex((kp) => kp && kp.part === compare2[1]); - if (!body4.keypoints[leftTo] || !body4.keypoints[rightTo]) - continue; - const distanceLeft = body4.keypoints[left] ? [ - Math.abs(body4.keypoints[leftTo].position[0] - body4.keypoints[left].position[0]), - Math.abs(body4.keypoints[rightTo].position[0] - body4.keypoints[left].position[0]) - ] : [0, 0]; - const distanceRight = body4.keypoints[right] ? [ - Math.abs(body4.keypoints[rightTo].position[0] - body4.keypoints[right].position[0]), - Math.abs(body4.keypoints[leftTo].position[0] - body4.keypoints[right].position[0]) - ] : [0, 0]; - if (distanceLeft[0] > distanceLeft[1] || distanceRight[0] > distanceRight[1]) { - const tmp = body4.keypoints[left]; - body4.keypoints[left] = body4.keypoints[right]; - body4.keypoints[right] = tmp; - } - } -} -function jitter(keypoints) { - for (let i = 0; i < keypoints.length; i++) { - if (keypoints[i] && cache5.keypoints[i]) { - const diff = [Math.abs(keypoints[i].positionRaw[0] - cache5.keypoints[i].positionRaw[0]), Math.abs(keypoints[i].positionRaw[1] - cache5.keypoints[i].positionRaw[1])]; - if (diff[0] < maxJitter && diff[1] < maxJitter) { - keypoints[i] = cache5.keypoints[i]; - } else { - cache5.keypoints[i] = keypoints[i]; - } - } else { - cache5.keypoints[i] = keypoints[i]; - } - } - return keypoints; -} -function padInput(input, inputSize10) { - var _a, _b; - const t2 = {}; - if (!((_a = input == null ? void 0 : input.shape) == null ? void 0 : _a[1]) || !((_b = input == null ? void 0 : input.shape) == null ? void 0 : _b[2])) - return input; - cache5.padding = [ - [0, 0], - [input.shape[2] > input.shape[1] ? Math.trunc((input.shape[2] - input.shape[1]) / 2) : 0, input.shape[2] > input.shape[1] ? Math.trunc((input.shape[2] - input.shape[1]) / 2) : 0], - [input.shape[1] > input.shape[2] ? Math.trunc((input.shape[1] - input.shape[2]) / 2) : 0, input.shape[1] > input.shape[2] ? Math.trunc((input.shape[1] - input.shape[2]) / 2) : 0], - [0, 0] - ]; - t2.pad = tf26.pad(input, cache5.padding); - t2.resize = tf26.image.resizeBilinear(t2.pad, [inputSize10, inputSize10]); - const final = tf26.cast(t2.resize, "int32"); - Object.keys(t2).forEach((tensor6) => tf26.dispose(t2[tensor6])); - return final; -} -function rescaleBody(body4, outputSize2) { - body4.keypoints = body4.keypoints.filter((kpt4) => kpt4 == null ? void 0 : kpt4.position); - for (const kpt4 of body4.keypoints) { - kpt4.position = [ - kpt4.position[0] * (outputSize2[0] + cache5.padding[2][0] + cache5.padding[2][1]) / outputSize2[0] - cache5.padding[2][0], - kpt4.position[1] * (outputSize2[1] + cache5.padding[1][0] + cache5.padding[1][1]) / outputSize2[1] - cache5.padding[1][0] - ]; - kpt4.positionRaw = [ - kpt4.position[0] / outputSize2[0], - kpt4.position[1] / outputSize2[1] - ]; - } - const rescaledBoxes = calc(body4.keypoints.map((pt) => pt.position), outputSize2); - body4.box = rescaledBoxes.box; - body4.boxRaw = rescaledBoxes.boxRaw; - return body4; -} - -// src/body/movenet.ts -var model14; -var inputSize8 = 0; -var skipped12 = Number.MAX_SAFE_INTEGER; -var cache6 = { - boxes: [], - bodies: [], - last: 0 -}; -async function load15(config3) { - var _a; - if (env.initial) - model14 = null; - if (!model14) { - fakeOps(["size"], config3); - model14 = await loadModel(config3.body.modelPath); - } else if (config3.debug) - log("cached model:", model14["modelUrl"]); - inputSize8 = (model14 == null ? void 0 : model14["executor"]) && ((_a = model14 == null ? void 0 : model14.inputs) == null ? void 0 : _a[0].shape) ? model14.inputs[0].shape[2] : 0; - if (inputSize8 < 64) - inputSize8 = 256; - return model14; -} -function parseSinglePose(res, config3, image27) { - const kpt4 = res[0][0]; - const keypoints = []; - let score = 0; - for (let id = 0; id < kpt4.length; id++) { - score = kpt4[id][2]; - if (score > config3.body.minConfidence) { - const positionRaw = [kpt4[id][1], kpt4[id][0]]; - keypoints.push({ - score: Math.round(100 * score) / 100, - part: kpt3[id], - positionRaw, - position: [ - Math.round((image27.shape[2] || 0) * positionRaw[0]), - Math.round((image27.shape[1] || 0) * positionRaw[1]) - ] - }); - } - } - score = keypoints.reduce((prev, curr) => curr.score > prev ? curr.score : prev, 0); - const bodies = []; - const newBox = calc(keypoints.map((pt) => pt.position), [image27.shape[2], image27.shape[1]]); - const annotations2 = {}; - for (const [name, indexes] of Object.entries(connected3)) { - const pt = []; - for (let i = 0; i < indexes.length - 1; i++) { - const pt0 = keypoints.find((kp) => kp.part === indexes[i]); - const pt1 = keypoints.find((kp) => kp.part === indexes[i + 1]); - if (pt0 && pt1 && pt0.score > (config3.body.minConfidence || 0) && pt1.score > (config3.body.minConfidence || 0)) - pt.push([pt0.position, pt1.position]); - } - annotations2[name] = pt; - } - const body4 = { id: 0, score, box: newBox.box, boxRaw: newBox.boxRaw, keypoints, annotations: annotations2 }; - bodyParts(body4); - bodies.push(body4); - return bodies; -} -function parseMultiPose(res, config3, image27) { - const bodies = []; - for (let id = 0; id < res[0].length; id++) { - const kpt4 = res[0][id]; - const totalScore = Math.round(100 * kpt4[51 + 4]) / 100; - if (totalScore > config3.body.minConfidence) { - const keypoints = []; - for (let i = 0; i < 17; i++) { - const score = kpt4[3 * i + 2]; - if (score > config3.body.minConfidence) { - const positionRaw = [kpt4[3 * i + 1], kpt4[3 * i + 0]]; - keypoints.push({ - part: kpt3[i], - score: Math.round(100 * score) / 100, - positionRaw, - position: [Math.round((image27.shape[2] || 0) * positionRaw[0]), Math.round((image27.shape[1] || 0) * positionRaw[1])] - }); - } - } - const newBox = calc(keypoints.map((pt) => pt.position), [image27.shape[2], image27.shape[1]]); - const annotations2 = {}; - for (const [name, indexes] of Object.entries(connected3)) { - const pt = []; - for (let i = 0; i < indexes.length - 1; i++) { - const pt0 = keypoints.find((kp) => kp.part === indexes[i]); - const pt1 = keypoints.find((kp) => kp.part === indexes[i + 1]); - if (pt0 && pt1 && pt0.score > (config3.body.minConfidence || 0) && pt1.score > (config3.body.minConfidence || 0)) - pt.push([pt0.position, pt1.position]); - } - annotations2[name] = pt; - } - const body4 = { id, score: totalScore, box: newBox.box, boxRaw: newBox.boxRaw, keypoints: [...keypoints], annotations: annotations2 }; - bodyParts(body4); - bodies.push(body4); - } - } - bodies.sort((a, b) => b.score - a.score); - if (bodies.length > config3.body.maxDetected) - bodies.length = config3.body.maxDetected; - return bodies; -} -async function predict15(input, config3) { - var _a; - if (!(model14 == null ? void 0 : model14["executor"]) || !((_a = model14 == null ? void 0 : model14.inputs) == null ? void 0 : _a[0].shape)) - return []; - if (!config3.skipAllowed) - cache6.boxes.length = 0; - skipped12++; - const skipTime = (config3.body.skipTime || 0) > now() - cache6.last; - const skipFrame = skipped12 < (config3.body.skipFrames || 0); - if (config3.skipAllowed && skipTime && skipFrame) { - return cache6.bodies; - } - return new Promise(async (resolve) => { - const t2 = {}; - skipped12 = 0; - t2.input = padInput(input, inputSize8); - t2.res = model14 == null ? void 0 : model14.execute(t2.input); - cache6.last = now(); - const res = await t2.res.array(); - cache6.bodies = t2.res.shape[2] === 17 ? parseSinglePose(res, config3, input) : parseMultiPose(res, config3, input); - for (const body4 of cache6.bodies) { - rescaleBody(body4, [input.shape[2] || 1, input.shape[1] || 1]); - jitter(body4.keypoints); - } - Object.keys(t2).forEach((tensor6) => tf27.dispose(t2[tensor6])); - resolve(cache6.bodies); - }); -} - -// src/object/nanodet.ts -var tf28 = __toESM(require_tfjs_esm()); -var model15; -var last8 = []; -var lastTime13 = 0; -var skipped13 = Number.MAX_SAFE_INTEGER; -var inputSize9 = 0; -var scaleBox = 2.5; -async function load16(config3) { - if (!model15 || env.initial) { - model15 = await loadModel(config3.object.modelPath); - const inputs = (model15 == null ? void 0 : model15["executor"]) ? Object.values(model15.modelSignature["inputs"]) : void 0; - inputSize9 = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : 416; - } else if (config3.debug) - log("cached model:", model15["modelUrl"]); - return model15; -} -async function process4(res, outputShape, config3) { - let id = 0; - let results = []; - const size2 = inputSize9; - for (const strideSize of [1, 2, 4]) { - const baseSize = strideSize * 13; - const scoresT = tf28.squeeze(res.find((a) => a.shape[1] === baseSize ** 2 && (a.shape[2] || 0) === labels.length)); - const scores = await scoresT.array(); - const featuresT = tf28.squeeze(res.find((a) => a.shape[1] === baseSize ** 2 && (a.shape[2] || 0) < labels.length)); - const boxesMaxT = featuresT.reshape([-1, 4, featuresT.shape[1] / 4]); - const boxIdxT = boxesMaxT.argMax(2); - const boxIdx = await boxIdxT.array(); - for (let i = 0; i < scoresT.shape[0]; i++) { - for (let j = 0; j < scoresT.shape[1]; j++) { - const score = scores[i][j]; - if (score > (config3.object.minConfidence || 0) && j !== 61) { - const cx = (0.5 + Math.trunc(i % baseSize)) / baseSize; - const cy = (0.5 + Math.trunc(i / baseSize)) / baseSize; - const boxOffset = boxIdx[i].map((a) => a * (baseSize / strideSize / size2)); - const [x, y] = [ - cx - scaleBox / strideSize * boxOffset[0], - cy - scaleBox / strideSize * boxOffset[1] - ]; - const [w, h] = [ - cx + scaleBox / strideSize * boxOffset[2] - x, - cy + scaleBox / strideSize * boxOffset[3] - y - ]; - let boxRaw = [x, y, w, h]; - boxRaw = boxRaw.map((a) => Math.max(0, Math.min(a, 1))); - const box = [ - boxRaw[0] * outputShape[0], - boxRaw[1] * outputShape[1], - boxRaw[2] * outputShape[0], - boxRaw[3] * outputShape[1] - ]; - const result = { - id: id++, - score: Math.round(100 * score) / 100, - class: j + 1, - label: labels[j].label, - box: box.map((a) => Math.trunc(a)), - boxRaw - }; - results.push(result); - } - } - } - tf28.dispose([scoresT, featuresT, boxesMaxT, boxIdxT]); - } - const nmsBoxes = results.map((a) => [a.boxRaw[1], a.boxRaw[0], a.boxRaw[3], a.boxRaw[2]]); - const nmsScores = results.map((a) => a.score); - let nmsIdx = []; - if (nmsBoxes && nmsBoxes.length > 0) { - const nms = await tf28.image.nonMaxSuppressionAsync(nmsBoxes, nmsScores, config3.object.maxDetected, config3.object.iouThreshold, config3.object.minConfidence); - nmsIdx = await nms.data(); - tf28.dispose(nms); - } - results = results.filter((_val, idx) => nmsIdx.includes(idx)).sort((a, b) => b.score - a.score); - return results; -} -async function predict16(image27, config3) { - if (!(model15 == null ? void 0 : model15["executor"])) - return []; - const skipTime = (config3.object.skipTime || 0) > now() - lastTime13; - const skipFrame = skipped13 < (config3.object.skipFrames || 0); - if (config3.skipAllowed && skipTime && skipFrame && last8.length > 0) { - skipped13++; - return last8; - } - skipped13 = 0; - if (!env.kernels.includes("mod") || !env.kernels.includes("sparsetodense")) - return last8; - return new Promise(async (resolve) => { - const outputSize2 = [image27.shape[2] || 0, image27.shape[1] || 0]; - const resizeT = tf28.image.resizeBilinear(image27, [inputSize9, inputSize9], false); - const normT = tf28.div(resizeT, constants.tf255); - const transposeT = tf28.transpose(normT, [0, 3, 1, 2]); - let objectT; - if (config3.object.enabled) - objectT = model15.execute(transposeT); - lastTime13 = now(); - const obj = await process4(objectT, outputSize2, config3); - last8 = obj; - tf28.dispose([resizeT, normT, transposeT, ...objectT]); - resolve(obj); - }); -} - -// src/body/posenet.ts -var tf29 = __toESM(require_tfjs_esm()); - -// src/body/posenetutils.ts -var partNames = [ - "nose", - "leftEye", - "rightEye", - "leftEar", - "rightEar", - "leftShoulder", - "rightShoulder", - "leftElbow", - "rightElbow", - "leftWrist", - "rightWrist", - "leftHip", - "rightHip", - "leftKnee", - "rightKnee", - "leftAnkle", - "rightAnkle" -]; -var count = partNames.length; -var partIds = partNames.reduce((result, jointName, i) => { - result[jointName] = i; - return result; -}, {}); -var connectedPartNames = [ - ["leftHip", "leftShoulder"], - ["leftElbow", "leftShoulder"], - ["leftElbow", "leftWrist"], - ["leftHip", "leftKnee"], - ["leftKnee", "leftAnkle"], - ["rightHip", "rightShoulder"], - ["rightElbow", "rightShoulder"], - ["rightElbow", "rightWrist"], - ["rightHip", "rightKnee"], - ["rightKnee", "rightAnkle"], - ["leftShoulder", "rightShoulder"], - ["leftHip", "rightHip"] -]; -var connectedPartIndices = connectedPartNames.map(([jointNameA, jointNameB]) => [partIds[jointNameA], partIds[jointNameB]]); -var poseChain = [ - ["nose", "leftEye"], - ["leftEye", "leftEar"], - ["nose", "rightEye"], - ["rightEye", "rightEar"], - ["nose", "leftShoulder"], - ["leftShoulder", "leftElbow"], - ["leftElbow", "leftWrist"], - ["leftShoulder", "leftHip"], - ["leftHip", "leftKnee"], - ["leftKnee", "leftAnkle"], - ["nose", "rightShoulder"], - ["rightShoulder", "rightElbow"], - ["rightElbow", "rightWrist"], - ["rightShoulder", "rightHip"], - ["rightHip", "rightKnee"], - ["rightKnee", "rightAnkle"] -]; -function getBoundingBox(keypoints) { - const coord = keypoints.reduce(({ maxX, maxY, minX, minY }, { position: { x, y } }) => ({ - maxX: Math.max(maxX, x), - maxY: Math.max(maxY, y), - minX: Math.min(minX, x), - minY: Math.min(minY, y) - }), { - maxX: Number.NEGATIVE_INFINITY, - maxY: Number.NEGATIVE_INFINITY, - minX: Number.POSITIVE_INFINITY, - minY: Number.POSITIVE_INFINITY - }); - return [coord.minX, coord.minY, coord.maxX - coord.minX, coord.maxY - coord.minY]; -} -function scalePoses(poses, [height, width], [inputResolutionHeight, inputResolutionWidth]) { - const scaleY = height / inputResolutionHeight; - const scaleX = width / inputResolutionWidth; - const scalePose = (pose, i) => ({ - id: i, - score: pose.score, - boxRaw: [pose.box[0] / inputResolutionWidth, pose.box[1] / inputResolutionHeight, pose.box[2] / inputResolutionWidth, pose.box[3] / inputResolutionHeight], - box: [Math.trunc(pose.box[0] * scaleX), Math.trunc(pose.box[1] * scaleY), Math.trunc(pose.box[2] * scaleX), Math.trunc(pose.box[3] * scaleY)], - keypoints: pose.keypoints.map(({ score, part, position }) => ({ - score, - part, - position: [Math.trunc(position.x * scaleX), Math.trunc(position.y * scaleY)], - positionRaw: [position.x / inputResolutionHeight, position.y / inputResolutionHeight] - })), - annotations: {} - }); - const scaledPoses = poses.map((pose, i) => scalePose(pose, i)); - return scaledPoses; -} -var MaxHeap = class { - constructor(maxSize2, getElementValue) { - __publicField(this, "priorityQueue"); - __publicField(this, "numberOfElements"); - __publicField(this, "getElementValue"); - this.priorityQueue = new Array(maxSize2); - this.numberOfElements = -1; - this.getElementValue = getElementValue; - } - enqueue(x) { - this.priorityQueue[++this.numberOfElements] = x; - this.swim(this.numberOfElements); - } - dequeue() { - const max4 = this.priorityQueue[0]; - this.exchange(0, this.numberOfElements--); - this.sink(0); - this.priorityQueue[this.numberOfElements + 1] = null; - return max4; - } - empty() { - return this.numberOfElements === -1; - } - size() { - return this.numberOfElements + 1; - } - all() { - return this.priorityQueue.slice(0, this.numberOfElements + 1); - } - max() { - return this.priorityQueue[0]; - } - swim(k) { - while (k > 0 && this.less(Math.floor(k / 2), k)) { - this.exchange(k, Math.floor(k / 2)); - k = Math.floor(k / 2); - } - } - sink(k) { - while (2 * k <= this.numberOfElements) { - let j = 2 * k; - if (j < this.numberOfElements && this.less(j, j + 1)) - j++; - if (!this.less(k, j)) - break; - this.exchange(k, j); - k = j; - } - } - getValueAt(i) { - return this.getElementValue(this.priorityQueue[i]); - } - less(i, j) { - return this.getValueAt(i) < this.getValueAt(j); - } - exchange(i, j) { - const t2 = this.priorityQueue[i]; - this.priorityQueue[i] = this.priorityQueue[j]; - this.priorityQueue[j] = t2; - } -}; -function getOffsetPoint(y, x, keypoint, offsets) { - return { - y: offsets.get(y, x, keypoint), - x: offsets.get(y, x, keypoint + count) - }; -} -function getImageCoords(part, outputStride2, offsets) { - const { heatmapY, heatmapX, id: keypoint } = part; - const { y, x } = getOffsetPoint(heatmapY, heatmapX, keypoint, offsets); - return { - x: part.heatmapX * outputStride2 + x, - y: part.heatmapY * outputStride2 + y - }; -} -function clamp(a, min2, max4) { - if (a < min2) - return min2; - if (a > max4) - return max4; - return a; -} -function squaredDistance(y1, x1, y2, x2) { - const dy = y2 - y1; - const dx = x2 - x1; - return dy * dy + dx * dx; -} -function addVectors(a, b) { - return { x: a.x + b.x, y: a.y + b.y }; -} - -// src/body/posenet.ts -var model16; -var poseNetOutputs = ["MobilenetV1/offset_2/BiasAdd", "MobilenetV1/heatmap_2/BiasAdd", "MobilenetV1/displacement_fwd_2/BiasAdd", "MobilenetV1/displacement_bwd_2/BiasAdd"]; -var localMaximumRadius = 1; -var outputStride = 16; -var squaredNmsRadius = 50 ** 2; -function traverse(edgeId, sourceKeypoint, targetId, scores, offsets, displacements, offsetRefineStep = 2) { - const getDisplacement = (point2) => ({ - y: displacements.get(point2.y, point2.x, edgeId), - x: displacements.get(point2.y, point2.x, displacements.shape[2] / 2 + edgeId) - }); - const getStridedIndexNearPoint = (point2, height2, width2) => ({ - y: clamp(Math.round(point2.y / outputStride), 0, height2 - 1), - x: clamp(Math.round(point2.x / outputStride), 0, width2 - 1) - }); - const [height, width] = scores.shape; - const sourceKeypointIndices = getStridedIndexNearPoint(sourceKeypoint.position, height, width); - const displacement = getDisplacement(sourceKeypointIndices); - const displacedPoint = addVectors(sourceKeypoint.position, displacement); - let targetKeypoint = displacedPoint; - for (let i = 0; i < offsetRefineStep; i++) { - const targetKeypointIndices = getStridedIndexNearPoint(targetKeypoint, height, width); - const offsetPoint = getOffsetPoint(targetKeypointIndices.y, targetKeypointIndices.x, targetId, offsets); - targetKeypoint = addVectors( - { x: targetKeypointIndices.x * outputStride, y: targetKeypointIndices.y * outputStride }, - { x: offsetPoint.x, y: offsetPoint.y } - ); - } - const targetKeyPointIndices = getStridedIndexNearPoint(targetKeypoint, height, width); - const score = scores.get(targetKeyPointIndices.y, targetKeyPointIndices.x, targetId); - return { position: targetKeypoint, part: partNames[targetId], score }; -} -function decodePose(root, scores, offsets, displacementsFwd, displacementsBwd) { - const tuples = poseChain.map(([parentJoinName, childJoinName]) => [partIds[parentJoinName], partIds[childJoinName]]); - const edgesFwd = tuples.map(([, childJointId]) => childJointId); - const edgesBwd = tuples.map(([parentJointId]) => parentJointId); - const numParts = scores.shape[2]; - const numEdges = edgesFwd.length; - const keypoints = new Array(numParts); - const rootPoint = getImageCoords(root.part, outputStride, offsets); - keypoints[root.part.id] = { - score: root.score, - part: partNames[root.part.id], - position: rootPoint - }; - for (let edge = numEdges - 1; edge >= 0; --edge) { - const sourceId = edgesFwd[edge]; - const targetId = edgesBwd[edge]; - if (keypoints[sourceId] && !keypoints[targetId]) { - keypoints[targetId] = traverse(edge, keypoints[sourceId], targetId, scores, offsets, displacementsBwd); - } - } - for (let edge = 0; edge < numEdges; ++edge) { - const sourceId = edgesBwd[edge]; - const targetId = edgesFwd[edge]; - if (keypoints[sourceId] && !keypoints[targetId]) { - keypoints[targetId] = traverse(edge, keypoints[sourceId], targetId, scores, offsets, displacementsFwd); - } - } - return keypoints; -} -function scoreIsMaximumInLocalWindow(keypointId, score, heatmapY, heatmapX, scores) { - const [height, width] = scores.shape; - let localMaximum = true; - const yStart = Math.max(heatmapY - localMaximumRadius, 0); - const yEnd = Math.min(heatmapY + localMaximumRadius + 1, height); - for (let yCurrent = yStart; yCurrent < yEnd; ++yCurrent) { - const xStart = Math.max(heatmapX - localMaximumRadius, 0); - const xEnd = Math.min(heatmapX + localMaximumRadius + 1, width); - for (let xCurrent = xStart; xCurrent < xEnd; ++xCurrent) { - if (scores.get(yCurrent, xCurrent, keypointId) > score) { - localMaximum = false; - break; - } - } - if (!localMaximum) - break; - } - return localMaximum; -} -function buildPartWithScoreQueue(minConfidence2, scores) { - const [height, width, numKeypoints] = scores.shape; - const queue = new MaxHeap(height * width * numKeypoints, ({ score }) => score); - for (let heatmapY = 0; heatmapY < height; ++heatmapY) { - for (let heatmapX = 0; heatmapX < width; ++heatmapX) { - for (let keypointId = 0; keypointId < numKeypoints; ++keypointId) { - const score = scores.get(heatmapY, heatmapX, keypointId); - if (score < minConfidence2) - continue; - if (scoreIsMaximumInLocalWindow(keypointId, score, heatmapY, heatmapX, scores)) - queue.enqueue({ score, part: { heatmapY, heatmapX, id: keypointId } }); - } - } - } - return queue; -} -function withinRadius(poses, { x, y }, keypointId) { - return poses.some(({ keypoints }) => { - var _a; - const correspondingKeypoint = (_a = keypoints[keypointId]) == null ? void 0 : _a.position; - if (!correspondingKeypoint) - return false; - return squaredDistance(y, x, correspondingKeypoint.y, correspondingKeypoint.x) <= squaredNmsRadius; - }); -} -function getInstanceScore(existingPoses, keypoints) { - const notOverlappedKeypointScores = keypoints.reduce((result, { position, score }, keypointId) => { - if (!withinRadius(existingPoses, position, keypointId)) - result += score; - return result; - }, 0); - return notOverlappedKeypointScores / keypoints.length; -} -function decode(offsets, scores, displacementsFwd, displacementsBwd, maxDetected, minConfidence2) { - const poses = []; - const queue = buildPartWithScoreQueue(minConfidence2, scores); - while (poses.length < maxDetected && !queue.empty()) { - const root = queue.dequeue(); - const rootImageCoords = getImageCoords(root.part, outputStride, offsets); - if (withinRadius(poses, rootImageCoords, root.part.id)) - continue; - let keypoints = decodePose(root, scores, offsets, displacementsFwd, displacementsBwd); - keypoints = keypoints.filter((a) => a.score > minConfidence2); - const score = getInstanceScore(poses, keypoints); - const box = getBoundingBox(keypoints); - if (score > minConfidence2) - poses.push({ keypoints, box, score: Math.round(100 * score) / 100 }); - } - return poses; -} -async function predict17(input, config3) { - if (!(model16 == null ? void 0 : model16["executor"])) - return []; - const res = tf29.tidy(() => { - if (!model16.inputs[0].shape) - return []; - const resized = tf29.image.resizeBilinear(input, [model16.inputs[0].shape[2], model16.inputs[0].shape[1]]); - const normalized = tf29.sub(tf29.div(tf29.cast(resized, "float32"), 127.5), 1); - const results = model16.execute(normalized, poseNetOutputs); - const results3d = results.map((y) => tf29.squeeze(y, [0])); - results3d[1] = tf29.sigmoid(results3d[1]); - return results3d; - }); - const buffers = await Promise.all(res.map((tensor6) => tensor6.buffer())); - for (const t2 of res) - tf29.dispose(t2); - const decoded = decode(buffers[0], buffers[1], buffers[2], buffers[3], config3.body.maxDetected, config3.body.minConfidence); - if (!model16.inputs[0].shape) - return []; - const scaled = scalePoses(decoded, [input.shape[1], input.shape[2]], [model16.inputs[0].shape[2], model16.inputs[0].shape[1]]); - return scaled; -} -async function load17(config3) { - if (!model16 || env.initial) - model16 = await loadModel(config3.body.modelPath); - else if (config3.debug) - log("cached model:", model16["modelUrl"]); - return model16; -} - -// src/segmentation/rvm.ts -var tf30 = __toESM(require_tfjs_esm()); -var model17; -var outputNodes2 = ["fgr", "pha", "r1o", "r2o", "r3o", "r4o"]; -var t = {}; -var ratio = 0; -function init2(config3) { - tf30.dispose([t.r1i, t.r2i, t.r3i, t.r4i, t.downsample_ratio]); - t.r1i = tf30.tensor(0); - t.r2i = tf30.tensor(0); - t.r3i = tf30.tensor(0); - t.r4i = tf30.tensor(0); - ratio = config3.segmentation.ratio || 0.5; - t.downsample_ratio = tf30.tensor(ratio); -} -async function load18(config3) { - if (!model17 || env.initial) - model17 = await loadModel(config3.segmentation.modelPath); - else if (config3.debug) - log("cached model:", model17["modelUrl"]); - init2(config3); - return model17; -} -var normalize = (r) => tf30.tidy(() => { - const squeeze14 = tf30.squeeze(r, [0]); - const mul15 = tf30.mul(squeeze14, constants.tf255); - const cast8 = tf30.cast(mul15, "int32"); - return cast8; -}); -function getRGBA(fgr, pha) { - const rgb2 = fgr ? normalize(fgr) : tf30.fill([pha.shape[1] || 0, pha.shape[2] || 0, 3], 255, "int32"); - const a = pha ? normalize(pha) : tf30.fill([fgr.shape[1] || 0, fgr.shape[2] || 0, 1], 255, "int32"); - const rgba = tf30.concat([rgb2, a], -1); - tf30.dispose([rgb2, a]); - return rgba; -} -function getState(state) { - return tf30.tidy(() => { - const r = {}; - r.unstack = tf30.unstack(state, -1); - r.concat = tf30.concat(r.unstack, 1); - r.split = tf30.split(r.concat, 4, 1); - r.stack = tf30.concat(r.split, 2); - r.squeeze = tf30.squeeze(r.stack, [0]); - r.expand = tf30.expandDims(r.squeeze, -1); - r.add = tf30.add(r.expand, 1); - r.mul = tf30.mul(r.add, 127.5); - r.cast = tf30.cast(r.mul, "int32"); - r.tile = tf30.tile(r.cast, [1, 1, 3]); - r.alpha = tf30.fill([r.tile.shape[0] || 0, r.tile.shape[1] || 0, 1], 255, "int32"); - return tf30.concat([r.tile, r.alpha], -1); - }); -} -async function predict18(input, config3) { - if (!model17) - model17 = await load18(config3); - if (!(model17 == null ? void 0 : model17["executor"])) - return null; - t.src = tf30.div(input, 255); - if (ratio !== config3.segmentation.ratio) - init2(config3); - const [fgr, pha, r1o, r2o, r3o, r4o] = await model17.executeAsync(t, outputNodes2); - let rgba; - switch (config3.segmentation.mode || "default") { - case "default": - rgba = getRGBA(fgr, pha); - break; - case "alpha": - rgba = getRGBA(null, pha); - break; - case "foreground": - rgba = getRGBA(fgr, null); - break; - case "state": - rgba = getState(r1o); - break; - default: - rgba = tf30.tensor(0); - } - tf30.dispose([t.src, fgr, pha, t.r1i, t.r2i, t.r3i, t.r4i]); - [t.r1i, t.r2i, t.r3i, t.r4i] = [r1o, r2o, r3o, r4o]; - return rgba; -} - -// src/segmentation/selfie.ts -var tf31 = __toESM(require_tfjs_esm()); -var model18; -async function load19(config3) { - if (!model18 || env.initial) - model18 = await loadModel(config3.segmentation.modelPath); - else if (config3.debug) - log("cached model:", model18["modelUrl"]); - return model18; -} -async function predict19(input, config3) { - var _a; - if (!model18) - model18 = await load19(config3); - if (!(model18 == null ? void 0 : model18["executor"]) || !((_a = model18 == null ? void 0 : model18.inputs) == null ? void 0 : _a[0].shape)) - return null; - const t2 = {}; - t2.resize = tf31.image.resizeBilinear(input, [model18.inputs[0].shape ? model18.inputs[0].shape[1] : 0, model18.inputs[0].shape ? model18.inputs[0].shape[2] : 0], false); - t2.norm = tf31.div(t2.resize, constants.tf255); - t2.res = model18.execute(t2.norm); - t2.squeeze = tf31.squeeze(t2.res, 0); - t2.alpha = tf31.image.resizeBilinear(t2.squeeze, [input.shape[1], input.shape[2]]); - t2.mul = tf31.mul(t2.alpha, constants.tf255); - let rgba; - switch (config3.segmentation.mode || "default") { - case "default": - t2.input = tf31.squeeze(input); - t2.concat = tf31.concat([t2.input, t2.mul], -1); - rgba = tf31.cast(t2.concat, "int32"); - break; - case "alpha": - rgba = tf31.cast(t2.mul, "int32"); - break; - default: - rgba = tf31.tensor(0); - } - Object.keys(t2).forEach((tensor6) => tf31.dispose(t2[tensor6])); - return rgba; -} - -// src/gear/ssrnet-age.ts -var tf32 = __toESM(require_tfjs_esm()); -var model19; -var last9 = []; -var lastCount8 = 0; -var lastTime14 = 0; -var skipped14 = Number.MAX_SAFE_INTEGER; -async function load20(config3) { - if (env.initial) - model19 = null; - if (!model19) - model19 = await loadModel(config3.face["ssrnet"].modelPathAge); - else if (config3.debug) - log("cached model:", model19["modelUrl"]); - return model19; -} -async function predict20(image27, config3, idx, count2) { - var _a, _b, _c, _d; - if (!model19) - return { age: 0 }; - const skipFrame = skipped14 < (((_a = config3.face["ssrnet"]) == null ? void 0 : _a.skipFrames) || 0); - const skipTime = (((_b = config3.face["ssrnet"]) == null ? void 0 : _b.skipTime) || 0) > now() - lastTime14; - if (config3.skipAllowed && skipFrame && skipTime && lastCount8 === count2 && ((_c = last9[idx]) == null ? void 0 : _c.age) && ((_d = last9[idx]) == null ? void 0 : _d.age) > 0) { - skipped14++; - return last9[idx]; - } - skipped14 = 0; - return new Promise(async (resolve) => { - var _a2; - if (!(model19 == null ? void 0 : model19.inputs) || !model19.inputs[0] || !model19.inputs[0].shape) - return; - const t2 = {}; - t2.resize = tf32.image.resizeBilinear(image27, [model19.inputs[0].shape[2], model19.inputs[0].shape[1]], false); - t2.enhance = tf32.mul(t2.resize, constants.tf255); - const obj = { age: 0 }; - if ((_a2 = config3.face["ssrnet"]) == null ? void 0 : _a2.enabled) - t2.age = model19.execute(t2.enhance); - if (t2.age) { - const data = await t2.age.data(); - obj.age = Math.trunc(10 * data[0]) / 10; - } - Object.keys(t2).forEach((tensor6) => tf32.dispose(t2[tensor6])); - last9[idx] = obj; - lastCount8 = count2; - lastTime14 = now(); - resolve(obj); - }); -} - -// src/gear/ssrnet-gender.ts -var tf33 = __toESM(require_tfjs_esm()); -var model20; -var last10 = []; -var lastCount9 = 0; -var lastTime15 = 0; -var skipped15 = Number.MAX_SAFE_INTEGER; -var rgb = [0.2989, 0.587, 0.114]; -async function load21(config3) { - var _a; - if (env.initial) - model20 = null; - if (!model20) - model20 = await loadModel((_a = config3.face["ssrnet"]) == null ? void 0 : _a.modelPathGender); - else if (config3.debug) - log("cached model:", model20["modelUrl"]); - return model20; -} -async function predict21(image27, config3, idx, count2) { - var _a, _b, _c, _d; - if (!model20) - return { gender: "unknown", genderScore: 0 }; - const skipFrame = skipped15 < (((_a = config3.face["ssrnet"]) == null ? void 0 : _a.skipFrames) || 0); - const skipTime = (((_b = config3.face["ssrnet"]) == null ? void 0 : _b.skipTime) || 0) > now() - lastTime15; - if (config3.skipAllowed && skipFrame && skipTime && lastCount9 === count2 && ((_c = last10[idx]) == null ? void 0 : _c.gender) && ((_d = last10[idx]) == null ? void 0 : _d.genderScore) > 0) { - skipped15++; - return last10[idx]; - } - skipped15 = 0; - return new Promise(async (resolve) => { - var _a2; - if (!(model20 == null ? void 0 : model20.inputs[0].shape)) - return; - const t2 = {}; - t2.resize = tf33.image.resizeBilinear(image27, [model20.inputs[0].shape[2], model20.inputs[0].shape[1]], false); - t2.enhance = tf33.tidy(() => { - const [red, green, blue] = tf33.split(t2.resize, 3, 3); - const redNorm = tf33.mul(red, rgb[0]); - const greenNorm = tf33.mul(green, rgb[1]); - const blueNorm = tf33.mul(blue, rgb[2]); - const grayscale = tf33.addN([redNorm, greenNorm, blueNorm]); - const normalize2 = tf33.mul(tf33.sub(grayscale, constants.tf05), 2); - return normalize2; - }); - const obj = { gender: "unknown", genderScore: 0 }; - if ((_a2 = config3.face["ssrnet"]) == null ? void 0 : _a2.enabled) - t2.gender = model20.execute(t2.enhance); - const data = await t2.gender.data(); - obj.gender = data[0] > data[1] ? "female" : "male"; - obj.genderScore = data[0] > data[1] ? Math.trunc(100 * data[0]) / 100 : Math.trunc(100 * data[1]) / 100; - Object.keys(t2).forEach((tensor6) => tf33.dispose(t2[tensor6])); - last10[idx] = obj; - lastCount9 = count2; - lastTime15 = now(); - resolve(obj); - }); -} - -// src/models.ts -var Models = class { - constructor() { - __publicField(this, "ssrnetage", null); - __publicField(this, "gear", null); - __publicField(this, "blazeposedetect", null); - __publicField(this, "blazepose", null); - __publicField(this, "centernet", null); - __publicField(this, "efficientpose", null); - __publicField(this, "mobilefacenet", null); - __publicField(this, "insightface", null); - __publicField(this, "emotion", null); - __publicField(this, "facedetect", null); - __publicField(this, "faceiris", null); - __publicField(this, "facemesh", null); - __publicField(this, "faceres", null); - __publicField(this, "ssrnetgender", null); - __publicField(this, "handpose", null); - __publicField(this, "handskeleton", null); - __publicField(this, "handtrack", null); - __publicField(this, "liveness", null); - __publicField(this, "meet", null); - __publicField(this, "movenet", null); - __publicField(this, "nanodet", null); - __publicField(this, "posenet", null); - __publicField(this, "selfie", null); - __publicField(this, "rvm", null); - __publicField(this, "antispoof", null); - } -}; -var instance; -var getModelStats = (currentInstance) => { - if (currentInstance) - instance = currentInstance; - if (!instance) - log("instance not registred"); - let totalSizeFromManifest = 0; - let totalSizeWeights = 0; - let totalSizeLoading = 0; - for (const m of Object.values(modelStats)) { - totalSizeFromManifest += m.sizeFromManifest; - totalSizeWeights += m.sizeLoadedWeights; - totalSizeLoading += m.sizeDesired; - } - const percentageLoaded = totalSizeLoading > 0 ? totalSizeWeights / totalSizeLoading : 0; - return { - numLoadedModels: Object.values(modelStats).length, - numDefinedModels: Object.keys(instance.models).length, - percentageLoaded, - totalSizeFromManifest, - totalSizeWeights, - totalSizeLoading, - totalSizeEnabled: void 0, - modelStats: Object.values(modelStats) - }; -}; -function reset2(currentInstance) { - if (currentInstance) - instance = currentInstance; - for (const model21 of Object.keys(instance.models)) - instance.models[model21] = null; -} -async function load22(currentInstance) { - var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C; - if (currentInstance) - instance = currentInstance; - if (!instance) - log("instance not registred"); - if (env.initial) - reset2(instance); - if (instance.config.hand.enabled) { - if (!instance.models.handpose && ((_b = (_a = instance.config.hand.detector) == null ? void 0 : _a.modelPath) == null ? void 0 : _b.includes("handdetect"))) { - [instance.models.handpose, instance.models.handskeleton] = await load10(instance.config); - } - if (!instance.models.handskeleton && instance.config.hand.landmarks && ((_d = (_c = instance.config.hand.detector) == null ? void 0 : _c.modelPath) == null ? void 0 : _d.includes("handdetect"))) { - [instance.models.handpose, instance.models.handskeleton] = await load10(instance.config); - } - } - if (instance.config.body.enabled && !instance.models.blazepose && ((_e = instance.config.body.modelPath) == null ? void 0 : _e.includes("blazepose"))) - instance.models.blazepose = loadPose(instance.config); - if (instance.config.body.enabled && !instance.models.blazeposedetect && instance.config.body["detector"] && instance.config.body["detector"].modelPath) - instance.models.blazeposedetect = loadDetect(instance.config); - if (instance.config.body.enabled && !instance.models.efficientpose && ((_f = instance.config.body.modelPath) == null ? void 0 : _f.includes("efficientpose"))) - instance.models.efficientpose = load4(instance.config); - if (instance.config.body.enabled && !instance.models.movenet && ((_g = instance.config.body.modelPath) == null ? void 0 : _g.includes("movenet"))) - instance.models.movenet = load15(instance.config); - if (instance.config.body.enabled && !instance.models.posenet && ((_h = instance.config.body.modelPath) == null ? void 0 : _h.includes("posenet"))) - instance.models.posenet = load17(instance.config); - if (instance.config.face.enabled && !instance.models.facedetect) - instance.models.facedetect = load2(instance.config); - if (instance.config.face.enabled && ((_i = instance.config.face.antispoof) == null ? void 0 : _i.enabled) && !instance.models.antispoof) - instance.models.antispoof = load(instance.config); - if (instance.config.face.enabled && ((_j = instance.config.face.liveness) == null ? void 0 : _j.enabled) && !instance.models.liveness) - instance.models.liveness = load12(instance.config); - if (instance.config.face.enabled && ((_k = instance.config.face.description) == null ? void 0 : _k.enabled) && !instance.models.faceres) - instance.models.faceres = load8(instance.config); - if (instance.config.face.enabled && ((_l = instance.config.face.emotion) == null ? void 0 : _l.enabled) && !instance.models.emotion) - instance.models.emotion = load5(instance.config); - if (instance.config.face.enabled && ((_m = instance.config.face.iris) == null ? void 0 : _m.enabled) && !((_n = instance.config.face.attention) == null ? void 0 : _n.enabled) && !instance.models.faceiris) - instance.models.faceiris = load6(instance.config); - if (instance.config.face.enabled && ((_o = instance.config.face.mesh) == null ? void 0 : _o.enabled) && !instance.models.facemesh) - instance.models.facemesh = load7(instance.config); - if (instance.config.face.enabled && ((_p = instance.config.face["gear"]) == null ? void 0 : _p.enabled) && !instance.models.gear) - instance.models.gear = load9(instance.config); - if (instance.config.face.enabled && ((_q = instance.config.face["ssrnet"]) == null ? void 0 : _q.enabled) && !instance.models.ssrnetage) - instance.models.ssrnetage = load20(instance.config); - if (instance.config.face.enabled && ((_r = instance.config.face["ssrnet"]) == null ? void 0 : _r.enabled) && !instance.models.ssrnetgender) - instance.models.ssrnetgender = load21(instance.config); - if (instance.config.face.enabled && ((_s = instance.config.face["mobilefacenet"]) == null ? void 0 : _s.enabled) && !instance.models.mobilefacenet) - instance.models.mobilefacenet = load14(instance.config); - if (instance.config.face.enabled && ((_t = instance.config.face["insightface"]) == null ? void 0 : _t.enabled) && !instance.models.insightface) - instance.models.insightface = load11(instance.config); - if (instance.config.hand.enabled && !instance.models.handtrack && ((_v = (_u = instance.config.hand.detector) == null ? void 0 : _u.modelPath) == null ? void 0 : _v.includes("handtrack"))) - instance.models.handtrack = loadDetect2(instance.config); - if (instance.config.hand.enabled && instance.config.hand.landmarks && !instance.models.handskeleton && ((_x = (_w = instance.config.hand.detector) == null ? void 0 : _w.modelPath) == null ? void 0 : _x.includes("handtrack"))) - instance.models.handskeleton = loadSkeleton(instance.config); - if (instance.config.object.enabled && !instance.models.centernet && ((_y = instance.config.object.modelPath) == null ? void 0 : _y.includes("centernet"))) - instance.models.centernet = load3(instance.config); - if (instance.config.object.enabled && !instance.models.nanodet && ((_z = instance.config.object.modelPath) == null ? void 0 : _z.includes("nanodet"))) - instance.models.nanodet = load16(instance.config); - if (instance.config.segmentation.enabled && !instance.models.selfie && ((_A = instance.config.segmentation.modelPath) == null ? void 0 : _A.includes("selfie"))) - instance.models.selfie = load19(instance.config); - if (instance.config.segmentation.enabled && !instance.models.meet && ((_B = instance.config.segmentation.modelPath) == null ? void 0 : _B.includes("meet"))) - instance.models.meet = load13(instance.config); - if (instance.config.segmentation.enabled && !instance.models.rvm && ((_C = instance.config.segmentation.modelPath) == null ? void 0 : _C.includes("rvm"))) - instance.models.rvm = load18(instance.config); - for await (const model21 of Object.keys(instance.models)) { - if (instance.models[model21] && typeof instance.models[model21] !== "undefined") { - instance.models[model21] = await instance.models[model21]; - } - } -} -function validateModel(currentInstance, model21, name) { - var _a, _b; - if (!model21) - return null; - if (currentInstance) - instance = currentInstance; - if (!instance) - log("instance not registred"); - if (!((_a = instance == null ? void 0 : instance.config) == null ? void 0 : _a.validateModels)) - return null; - const simpleOps = ["const", "placeholder", "noop", "pad", "squeeze", "add", "sub", "mul", "div"]; - const ignoreOps = ["biasadd", "fusedbatchnormv3", "matmul", "switch", "shape", "merge", "split", "broadcastto"]; - const ops = []; - const missing = []; - const url = model21["modelUrl"]; - const executor = model21["executor"]; - if ((_b = executor == null ? void 0 : executor.graph) == null ? void 0 : _b.nodes) { - for (const kernel of Object.values(executor.graph.nodes)) { - const op = kernel.op.toLowerCase(); - if (!ops.includes(op)) - ops.push(op); - } - } else { - if (!executor && instance.config.debug) { - log("model not loaded", name); - } - } - for (const op of ops) { - if (!simpleOps.includes(op) && !ignoreOps.includes(op) && !instance.env.kernels.includes(op) && !instance.env.kernels.includes(op.replace("_", "")) && !instance.env.kernels.includes(op.replace("native", "")) && !instance.env.kernels.includes(op.replace("v2", ""))) { - missing.push(op); - } - } - if (instance.config.debug && missing.length > 0) - log("model validation failed:", name, missing); - return missing.length > 0 ? { name, missing, ops, url } : null; -} -function validate2(currentInstance) { - if (currentInstance) - instance = currentInstance; - if (!instance) - log("instance not registred"); - const missing = []; - for (const defined of Object.keys(currentInstance.models)) { - const model21 = currentInstance.models[defined]; - if (!model21) - continue; - const res = validateModel(currentInstance, model21, defined); - if (res) - missing.push(res); - } - return missing; -} - -// src/tfjs/humangl.ts -var config2 = { - name: "humangl", - priority: 999, - canvas: null, - gl: null, - extensions: [], - webGLattr: { - alpha: false, - antialias: false, - premultipliedAlpha: false, - preserveDrawingBuffer: false, - depth: false, - stencil: false, - failIfMajorPerformanceCaveat: false, - desynchronized: true - } -}; -function extensions() { - const gl = config2.gl; - if (!gl) - return; - config2.extensions = gl.getSupportedExtensions(); -} -function register(instance2) { - var _a; - if (instance2.config.backend !== "humangl") - return; - if (config2.name in tf34.engine().registry && !((_a = config2 == null ? void 0 : config2.gl) == null ? void 0 : _a.getParameter(config2.gl.VERSION))) { - log("humangl error: backend invalid context"); - reset2(instance2); - } - if (!tf34.findBackend(config2.name)) { - try { - config2.canvas = canvas(100, 100); - } catch (err) { - log("humangl error: cannot create canvas:", err); - return; - } - try { - config2.gl = config2.canvas.getContext("webgl2", config2.webGLattr); - if (!config2.gl) { - log("humangl error: cannot get webgl context"); - return; - } - const glv2 = config2.gl.getParameter(config2.gl.VERSION).includes("2.0"); - if (!glv2) { - log("backend override: using fallback webgl backend as webgl 2.0 is not detected"); - instance2.config.backend = "webgl"; - return; - } - if (config2.canvas) { - config2.canvas.addEventListener("webglcontextlost", (e) => { - log("humangl error:", e.type); - log("possible browser memory leak using webgl or conflict with multiple backend registrations"); - instance2.emit("error"); - throw new Error("backend error: webgl context lost"); - }); - config2.canvas.addEventListener("webglcontextrestored", (e) => { - log("humangl error: context restored:", e); - }); - config2.canvas.addEventListener("webglcontextcreationerror", (e) => { - log("humangl error: context create:", e); - }); - } - } catch (err) { - log("humangl error: cannot get webgl context:", err); - return; - } - try { - tf34.setWebGLContext(2, config2.gl); - } catch (err) { - log("humangl error: cannot set webgl context:", err); - return; - } - try { - const ctx = new tf34.GPGPUContext(config2.gl); - tf34.registerBackend(config2.name, () => new tf34.MathBackendWebGL(ctx), config2.priority); - } catch (err) { - log("humangl error: cannot register webgl backend:", err); - return; - } - try { - const kernels = tf34.getKernelsForBackend("webgl"); - kernels.forEach((kernelConfig) => { - const newKernelConfig = { ...kernelConfig, backendName: config2.name }; - tf34.registerKernel(newKernelConfig); - }); - } catch (err) { - log("humangl error: cannot update webgl backend registration:", err); - return; - } - try { - if (tf34.env().flagRegistry.WEBGL_VERSION) - tf34.env().set("WEBGL_VERSION", 2); - } catch (err) { - log("humangl error: cannot set WebGL backend flags:", err); - return; - } - extensions(); - const current = tf34.backend().getGPGPUContext ? tf34.backend().getGPGPUContext().gl : null; - if (current) { - if (instance2.config.debug) - log("humangl backend registered:", { webgl: current.getParameter(current.VERSION), renderer: current.getParameter(current.RENDERER) }); - } else { - log("humangl error: no current gl context:", current, config2.gl); - } - } -} - -// src/tfjs/backend.ts -var tf35 = __toESM(require_tfjs_esm()); -function registerCustomOps(config3) { - const newKernels = []; - if (!env.kernels.includes("mod")) { - const kernelMod = { - kernelName: "Mod", - backendName: tf35.getBackend(), - kernelFunc: (op) => tf35.tidy(() => tf35.sub(op.inputs.a, tf35.mul(tf35.div(op.inputs.a, op.inputs.b), op.inputs.b))) - }; - tf35.registerKernel(kernelMod); - env.kernels.push("mod"); - newKernels.push("mod"); - } - if (!env.kernels.includes("floormod")) { - const kernelFloorMod = { - kernelName: "FloorMod", - backendName: tf35.getBackend(), - kernelFunc: (op) => tf35.tidy(() => tf35.add(tf35.mul(tf35.floorDiv(op.inputs.a / op.inputs.b), op.inputs.b), tf35.mod(op.inputs.a, op.inputs.b))) - }; - tf35.registerKernel(kernelFloorMod); - env.kernels.push("floormod"); - newKernels.push("floormod"); - } - if (!env.kernels.includes("rotatewithoffset") && config3.softwareKernels) { - const kernelRotateWithOffset = { - kernelName: "RotateWithOffset", - backendName: tf35.getBackend(), - kernelFunc: (op) => tf35.tidy(() => { - const backend4 = tf35.getBackend(); - tf35.setBackend("cpu"); - const t2 = tf35.image.rotateWithOffset(op.inputs.image, op.attrs.radians, op.attrs.fillValue, op.attrs.center); - tf35.setBackend(backend4); - return t2; - }) - }; - tf35.registerKernel(kernelRotateWithOffset); - env.kernels.push("rotatewithoffset"); - newKernels.push("rotatewithoffset"); - } - if (newKernels.length > 0 && config3.debug) - log("registered kernels:", newKernels); -} -var defaultFlags = {}; -async function check(instance2, force = false) { - instance2.state = "backend"; - if (force || env.initial || instance2.config.backend && instance2.config.backend.length > 0 && tf35.getBackend() !== instance2.config.backend) { - const timeStamp = now(); - if (instance2.config.backend && instance2.config.backend.length > 0) { - if (typeof window === "undefined" && typeof WorkerGlobalScope !== "undefined" && instance2.config.debug) { - if (instance2.config.debug) - log("running inside web worker"); - } - if (env.browser && instance2.config.backend === "tensorflow") { - if (instance2.config.debug) - log("override: backend set to tensorflow while running in browser"); - instance2.config.backend = "webgl"; - } - if (env.node && (instance2.config.backend === "webgl" || instance2.config.backend === "humangl")) { - if (instance2.config.debug) - log(`override: backend set to ${instance2.config.backend} while running in nodejs`); - instance2.config.backend = "tensorflow"; - } - if (env.browser && instance2.config.backend === "webgpu") { - if (typeof navigator === "undefined" || typeof navigator.gpu === "undefined") { - log("override: backend set to webgpu but browser does not support webgpu"); - instance2.config.backend = "webgl"; - } else { - const adapter = await navigator.gpu.requestAdapter(); - if (instance2.config.debug) - log("enumerated webgpu adapter:", adapter); - if (!adapter) { - log("override: backend set to webgpu but browser reports no available gpu"); - instance2.config.backend = "webgl"; - } else { - const adapterInfo = "requestAdapterInfo" in adapter ? await adapter.requestAdapterInfo() : void 0; - log("webgpu adapter info:", adapterInfo); - } - } - } - let available = Object.keys(tf35.engine().registryFactory); - if (instance2.config.backend === "humangl" && !available.includes("humangl")) { - register(instance2); - available = Object.keys(tf35.engine().registryFactory); - } - if (instance2.config.debug) - log("available backends:", available); - if (!available.includes(instance2.config.backend)) { - log(`error: backend ${instance2.config.backend} not found in registry`); - instance2.config.backend = env.node ? "tensorflow" : "webgl"; - if (instance2.config.debug) - log(`override: setting backend ${instance2.config.backend}`); - } - if (instance2.config.debug) - log("setting backend:", [instance2.config.backend]); - if (instance2.config.backend === "wasm") { - if (tf35.env().flagRegistry.CANVAS2D_WILL_READ_FREQUENTLY) - tf35.env().set("CANVAS2D_WILL_READ_FREQUENTLY", true); - if (instance2.config.debug) - log("wasm path:", instance2.config.wasmPath); - if (typeof tf35.setWasmPaths !== "undefined") - tf35.setWasmPaths(instance2.config.wasmPath, instance2.config.wasmPlatformFetch); - else - throw new Error("backend error: attempting to use wasm backend but wasm path is not set"); - let mt = false; - let simd = false; - try { - mt = await tf35.env().getAsync("WASM_HAS_MULTITHREAD_SUPPORT"); - simd = await tf35.env().getAsync("WASM_HAS_SIMD_SUPPORT"); - if (instance2.config.debug) - log(`wasm execution: ${simd ? "simd" : "no simd"} ${mt ? "multithreaded" : "singlethreaded"}`); - if (instance2.config.debug && !simd) - log("warning: wasm simd support is not enabled"); - } catch (e) { - log("wasm detection failed"); - } - } - try { - await tf35.setBackend(instance2.config.backend); - await tf35.ready(); - } catch (err) { - log("error: cannot set backend:", instance2.config.backend, err); - return false; - } - if (instance2.config.debug) - defaultFlags = JSON.parse(JSON.stringify(tf35.env().flags)); - } - if (tf35.getBackend() === "humangl" || tf35.getBackend() === "webgl") { - if (tf35.env().flagRegistry.WEBGL_USE_SHAPES_UNIFORMS) - tf35.env().set("WEBGL_USE_SHAPES_UNIFORMS", true); - if (tf35.env().flagRegistry.WEBGL_EXP_CONV) - tf35.env().set("WEBGL_EXP_CONV", true); - if (instance2.config.debug && typeof instance2.config.deallocate !== "undefined" && instance2.config.deallocate) { - log("changing webgl: WEBGL_DELETE_TEXTURE_THRESHOLD:", true); - tf35.env().set("WEBGL_DELETE_TEXTURE_THRESHOLD", 0); - } - } - if (tf35.getBackend() === "webgpu") { - } - if (instance2.config.debug) { - const newFlags = tf35.env().flags; - const updatedFlags = {}; - for (const key of Object.keys(newFlags)) { - if (defaultFlags[key] === newFlags[key]) - continue; - updatedFlags[key] = newFlags[key]; - } - if (instance2.config.debug && Object.keys(updatedFlags).length > 0) - log("backend:", tf35.getBackend(), "flags:", updatedFlags); - } - if (instance2.config.flags && Object.keys(instance2.config.flags).length > 0) { - if (instance2.config.debug) - log("flags:", instance2.config["flags"]); - for (const [key, val] of Object.entries(instance2.config.flags)) { - tf35.env().set(key, val); - } - } - tf35.enableProdMode(); - init(); - instance2.performance.initBackend = Math.trunc(now() - timeStamp); - instance2.config.backend = tf35.getBackend(); - await env.updateBackend(); - registerCustomOps(instance2.config); - env.initial = false; - } - return true; -} -function fakeOps(kernelNames, config3) { - for (const kernelName of kernelNames) { - const kernelConfig = { - kernelName, - backendName: config3.backend, - kernelFunc: () => { - if (config3.debug) - log("kernelFunc", kernelName, config3.backend); - } - }; - tf35.registerKernel(kernelConfig); - } - env.kernels = tf35.getKernelsForBackend(tf35.getBackend()).map((kernel) => kernel.kernelName.toLowerCase()); -} - -// src/draw/draw.ts -var draw_exports = {}; -__export(draw_exports, { - all: () => all, - body: () => body, - canvas: () => canvas2, - face: () => face, - gesture: () => gesture, - hand: () => hand, - object: () => object, - options: () => options3, - person: () => person -}); - -// src/draw/primitives.ts -var getCanvasContext = (input) => { - if (!input) - log("draw error: invalid canvas"); - else if (!input.getContext) - log("draw error: canvas context not defined"); - else { - const ctx = input.getContext("2d"); - if (!ctx) - log("draw error: cannot get canvas context"); - else - return ctx; - } - return null; -}; -var rad2deg = (theta) => Math.round(theta * 180 / Math.PI); -var colorDepth = (z, opt2) => { - if (!opt2.useDepth || typeof z === "undefined") - return opt2.color; - const rgb2 = Uint8ClampedArray.from([127 + 2 * z, 127 - 2 * z, 255]); - return `rgba(${rgb2[0]}, ${rgb2[1]}, ${rgb2[2]}, ${opt2.alpha})`; -}; -function point(ctx, x, y, z, localOptions) { - ctx.fillStyle = colorDepth(z, localOptions); - ctx.beginPath(); - ctx.arc(x, y, localOptions.pointSize, 0, 2 * Math.PI); - ctx.fill(); -} -function rect(ctx, x, y, width, height, localOptions) { - ctx.beginPath(); - ctx.lineWidth = localOptions.lineWidth; - if (localOptions.useCurves) { - const cx = (x + x + width) / 2; - const cy = (y + y + height) / 2; - ctx.ellipse(cx, cy, width / 2, height / 2, 0, 0, 2 * Math.PI); - } else { - ctx.moveTo(x + localOptions.roundRect, y); - ctx.lineTo(x + width - localOptions.roundRect, y); - ctx.quadraticCurveTo(x + width, y, x + width, y + localOptions.roundRect); - ctx.lineTo(x + width, y + height - localOptions.roundRect); - ctx.quadraticCurveTo(x + width, y + height, x + width - localOptions.roundRect, y + height); - ctx.lineTo(x + localOptions.roundRect, y + height); - ctx.quadraticCurveTo(x, y + height, x, y + height - localOptions.roundRect); - ctx.lineTo(x, y + localOptions.roundRect); - ctx.quadraticCurveTo(x, y, x + localOptions.roundRect, y); - ctx.closePath(); - } - ctx.stroke(); -} -function lines(ctx, points, localOptions) { - if (points.length < 2) - return; - ctx.beginPath(); - ctx.moveTo(points[0][0], points[0][1]); - for (const pt of points) { - ctx.strokeStyle = colorDepth(pt[2] || 0, localOptions); - ctx.lineTo(Math.trunc(pt[0]), Math.trunc(pt[1])); - } - ctx.stroke(); - if (localOptions.fillPolygons) { - ctx.closePath(); - ctx.fill(); - } -} -function curves(ctx, points, localOptions) { - if (points.length < 2) - return; - ctx.lineWidth = localOptions.lineWidth; - if (!localOptions.useCurves || points.length <= 2) { - lines(ctx, points, localOptions); - return; - } - ctx.moveTo(points[0][0], points[0][1]); - for (let i = 0; i < points.length - 2; i++) { - const xc = (points[i][0] + points[i + 1][0]) / 2; - const yc = (points[i][1] + points[i + 1][1]) / 2; - ctx.quadraticCurveTo(points[i][0], points[i][1], xc, yc); - } - ctx.quadraticCurveTo(points[points.length - 2][0], points[points.length - 2][1], points[points.length - 1][0], points[points.length - 1][1]); - ctx.stroke(); - if (localOptions.fillPolygons) { - ctx.closePath(); - ctx.fill(); - } -} -function arrow(ctx, from, to, radius = 5) { - let angle; - let x; - let y; - ctx.beginPath(); - ctx.moveTo(from[0], from[1]); - ctx.lineTo(to[0], to[1]); - angle = Math.atan2(to[1] - from[1], to[0] - from[0]); - x = radius * Math.cos(angle) + to[0]; - y = radius * Math.sin(angle) + to[1]; - ctx.moveTo(x, y); - angle += 1 / 3 * (2 * Math.PI); - x = radius * Math.cos(angle) + to[0]; - y = radius * Math.sin(angle) + to[1]; - ctx.lineTo(x, y); - angle += 1 / 3 * (2 * Math.PI); - x = radius * Math.cos(angle) + to[0]; - y = radius * Math.sin(angle) + to[1]; - ctx.lineTo(x, y); - ctx.closePath(); - ctx.stroke(); - ctx.fill(); -} - -// src/draw/options.ts -var options3 = { - color: "rgba(173, 216, 230, 0.6)", - labelColor: "rgba(173, 216, 230, 1)", - shadowColor: "black", - alpha: 0.5, - font: 'small-caps 16px "Segoe UI"', - lineHeight: 18, - lineWidth: 4, - pointSize: 2, - roundRect: 8, - drawPoints: false, - drawLabels: true, - drawBoxes: true, - drawAttention: true, - drawGestures: true, - drawPolygons: true, - drawGaze: true, - fillPolygons: false, - useDepth: true, - useCurves: false -}; - -// src/draw/face.ts -var opt; -function drawLabels(f, ctx) { - var _a, _b; - if (opt.drawLabels) { - const labels2 = []; - labels2.push(`face: ${Math.trunc(100 * f.score)}%`); - if (f.genderScore) - labels2.push(`${f.gender || ""} ${Math.trunc(100 * f.genderScore)}%`); - if (f.age) - labels2.push(`age: ${f.age || ""}`); - if (f.iris) - labels2.push(`distance: ${f.iris}`); - if (f.real) - labels2.push(`real: ${Math.trunc(100 * f.real)}%`); - if (f.live) - labels2.push(`live: ${Math.trunc(100 * f.live)}%`); - if (f.emotion && f.emotion.length > 0) { - const emotion2 = f.emotion.map((a) => `${Math.trunc(100 * a.score)}% ${a.emotion}`); - if (emotion2.length > 3) - emotion2.length = 3; - labels2.push(emotion2.join(" ")); - } - if (((_a = f.rotation) == null ? void 0 : _a.angle) && ((_b = f.rotation) == null ? void 0 : _b.gaze)) { - if (f.rotation.angle.roll) - labels2.push(`roll: ${rad2deg(f.rotation.angle.roll)}\xB0 yaw:${rad2deg(f.rotation.angle.yaw)}\xB0 pitch:${rad2deg(f.rotation.angle.pitch)}\xB0`); - if (f.rotation.gaze.bearing) - labels2.push(`gaze: ${rad2deg(f.rotation.gaze.bearing)}\xB0`); - } - if (labels2.length === 0) - labels2.push("face"); - ctx.fillStyle = opt.color; - for (let i = labels2.length - 1; i >= 0; i--) { - const x = Math.max(f.box[0], 0); - const y = i * opt.lineHeight + f.box[1]; - if (opt.shadowColor && opt.shadowColor !== "") { - ctx.fillStyle = opt.shadowColor; - ctx.fillText(labels2[i], x + 5, y + 16); - } - ctx.fillStyle = opt.labelColor; - ctx.fillText(labels2[i], x + 4, y + 15); - } - } -} -function drawIrisElipse(f, ctx) { - var _a, _b, _c, _d; - if (((_a = f.annotations) == null ? void 0 : _a.leftEyeIris) && ((_b = f.annotations) == null ? void 0 : _b.leftEyeIris[0])) { - ctx.strokeStyle = opt.useDepth ? "rgba(255, 200, 255, 0.3)" : opt.color; - ctx.beginPath(); - const sizeX = Math.abs(f.annotations.leftEyeIris[3][0] - f.annotations.leftEyeIris[1][0]) / 2; - const sizeY = Math.abs(f.annotations.leftEyeIris[4][1] - f.annotations.leftEyeIris[2][1]) / 2; - ctx.ellipse(f.annotations.leftEyeIris[0][0], f.annotations.leftEyeIris[0][1], sizeX, sizeY, 0, 0, 2 * Math.PI); - ctx.stroke(); - if (opt.fillPolygons) { - ctx.fillStyle = opt.useDepth ? "rgba(255, 255, 200, 0.3)" : opt.color; - ctx.fill(); - } - } - if (((_c = f.annotations) == null ? void 0 : _c.rightEyeIris) && ((_d = f.annotations) == null ? void 0 : _d.rightEyeIris[0])) { - ctx.strokeStyle = opt.useDepth ? "rgba(255, 200, 255, 0.3)" : opt.color; - ctx.beginPath(); - const sizeX = Math.abs(f.annotations.rightEyeIris[3][0] - f.annotations.rightEyeIris[1][0]) / 2; - const sizeY = Math.abs(f.annotations.rightEyeIris[4][1] - f.annotations.rightEyeIris[2][1]) / 2; - ctx.ellipse(f.annotations.rightEyeIris[0][0], f.annotations.rightEyeIris[0][1], sizeX, sizeY, 0, 0, 2 * Math.PI); - ctx.stroke(); - if (opt.fillPolygons) { - ctx.fillStyle = opt.useDepth ? "rgba(255, 255, 200, 0.3)" : opt.color; - ctx.fill(); - } - } -} -function drawGazeSpheres(f, ctx) { - var _a; - if (opt.drawGaze && ((_a = f.rotation) == null ? void 0 : _a.angle) && typeof Path2D !== "undefined") { - ctx.strokeStyle = "pink"; - const valX = f.box[0] + f.box[2] / 2 - f.box[3] * rad2deg(f.rotation.angle.yaw) / 90; - const valY = f.box[1] + f.box[3] / 2 + f.box[2] * rad2deg(f.rotation.angle.pitch) / 90; - const pathV = new Path2D(` - M ${f.box[0] + f.box[2] / 2} ${f.box[1]} +`;var qt=(e,t,n)=>{let o=new RegExp("\\b"+t+" \\w+ (\\w+)","ig");e.replace(o,(r,s)=>(n[s]=0,r))},Ut=class{constructor(t,n,o){R(this,"uniform",{});R(this,"attribute",{});R(this,"gl");R(this,"id");R(this,"compile",(t,n)=>{let o=this.gl.createShader(n);return o?(this.gl.shaderSource(o,t),this.gl.compileShader(o),this.gl.getShaderParameter(o,this.gl.COMPILE_STATUS)?o:(h(`filter: gl compile failed: ${this.gl.getShaderInfoLog(o)||"unknown"}`),null)):(h("filter: could not create shader"),null)});this.gl=t;let r=this.compile(n,this.gl.VERTEX_SHADER),s=this.compile(o,this.gl.FRAGMENT_SHADER);if(this.id=this.gl.createProgram(),!(!r||!s)){if(!this.id){h("filter: could not create webgl program");return}if(this.gl.attachShader(this.id,r),this.gl.attachShader(this.id,s),this.gl.linkProgram(this.id),!this.gl.getProgramParameter(this.id,this.gl.LINK_STATUS)){h(`filter: gl link failed: ${this.gl.getProgramInfoLog(this.id)||"unknown"}`);return}this.gl.useProgram(this.id),qt(n,"attribute",this.attribute);for(let A in this.attribute)this.attribute[A]=this.gl.getAttribLocation(this.id,A);qt(n,"uniform",this.uniform),qt(o,"uniform",this.uniform);for(let A in this.uniform)this.uniform[A]=this.gl.getUniformLocation(this.id,A)}}};function H1(){let e=0,t=null,n=!1,o=-1,r=[null,null],s=[],A=null,a=null,l=$0(100,100),c={},x={INTERMEDIATE:1},i=l.getContext("webgl");if(!i){h("filter: cannot get webgl context");return}this.gl=i;function f(T,y){if(!(T===l.width&&y===l.height)){if(l.width=T,l.height=y,!A){let b=new Float32Array([-1,-1,0,1,1,-1,1,1,-1,1,0,0,-1,1,0,0,1,-1,1,1,1,1,1,0]);A=i.createBuffer(),i.bindBuffer(i.ARRAY_BUFFER,A),i.bufferData(i.ARRAY_BUFFER,b,i.STATIC_DRAW),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0)}i.viewport(0,0,l.width,l.height),r=[null,null]}}function d(T,y){let b=i.createFramebuffer();i.bindFramebuffer(i.FRAMEBUFFER,b);let z=i.createRenderbuffer();i.bindRenderbuffer(i.RENDERBUFFER,z);let w=i.createTexture();return i.bindTexture(i.TEXTURE_2D,w),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,T,y,0,i.RGBA,i.UNSIGNED_BYTE,null),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),i.framebufferTexture2D(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,w,0),i.bindTexture(i.TEXTURE_2D,null),i.bindFramebuffer(i.FRAMEBUFFER,null),{fbo:b,texture:w}}function m(T){return r[T]=r[T]||d(l.width,l.height),r[T]}function p(T=0){if(!a)return;let y=null,b=null,z=!1;e===0?y=t:y=m(o).texture||null,e++,n&&!(T&x.INTERMEDIATE)?(b=null,z=e%2===0):(o=(o+1)%2,b=m(o).fbo||null),i.bindTexture(i.TEXTURE_2D,y),i.bindFramebuffer(i.FRAMEBUFFER,b),i.uniform1f(a.uniform.flipY,z?-1:1),i.drawArrays(i.TRIANGLES,0,6)}function g(T){if(c[T])return a=c[T],i.useProgram((a?a.id:null)||null),a;if(a=new Ut(i,C1,T),!a)return h("filter: could not get webgl program"),null;let y=Float32Array.BYTES_PER_ELEMENT,b=4*y;return i.enableVertexAttribArray(a.attribute.pos),i.vertexAttribPointer(a.attribute.pos,2,i.FLOAT,!1,b,0*y),i.enableVertexAttribArray(a.attribute.uv),i.vertexAttribPointer(a.attribute.uv,2,i.FLOAT,!1,b,2*y),c[T]=a,a}let v={colorMatrix:T=>{let y=new Float32Array(T);y[4]/=255,y[9]/=255,y[14]/=255,y[19]/=255;let b=y[18]===1&&y[3]===0&&y[8]===0&&y[13]===0&&y[15]===0&&y[16]===0&&y[17]===0&&y[19]===0?W1:L1,z=g(b);!z||(i.uniform1fv(z.uniform.m,y),p())},brightness:T=>{let y=(T||0)+1;v.colorMatrix([y,0,0,0,0,0,y,0,0,0,0,0,y,0,0,0,0,0,1,0])},saturation:T=>{let y=(T||0)*2/3+1,b=(y-1)*-.5;v.colorMatrix([y,b,b,0,0,b,y,b,0,0,b,b,y,0,0,0,0,0,1,0])},desaturate:()=>{v.saturation(-1)},contrast:T=>{let y=(T||0)+1,b=-128*(y-1);v.colorMatrix([y,0,0,0,b,0,y,0,0,b,0,0,y,0,b,0,0,0,1,0])},negative:()=>{v.contrast(-2)},hue:T=>{T=(T||0)/180*Math.PI;let y=Math.cos(T),b=Math.sin(T),z=.213,w=.715,O=.072;v.colorMatrix([z+y*(1-z)+b*-z,w+y*-w+b*-w,O+y*-O+b*(1-O),0,0,z+y*-z+b*.143,w+y*(1-w)+b*.14,O+y*-O+b*-.283,0,0,z+y*-z+b*-(1-z),w+y*-w+b*w,O+y*(1-O)+b*O,0,0,0,0,0,1,0])},desaturateLuminance:()=>{v.colorMatrix([.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,0,0,0,1,0])},sepia:()=>{v.colorMatrix([.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0])},brownie:()=>{v.colorMatrix([.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0])},vintagePinhole:()=>{v.colorMatrix([.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0])},kodachrome:()=>{v.colorMatrix([1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0])},technicolor:()=>{v.colorMatrix([1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0])},polaroid:()=>{v.colorMatrix([1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0])},shiftToBGR:()=>{v.colorMatrix([0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0])},convolution:T=>{let y=new Float32Array(T),b=1/l.width,z=1/l.height,w=g(B1);!w||(i.uniform1fv(w.uniform.m,y),i.uniform2f(w.uniform.px,b,z),p())},detectEdges:()=>{v.convolution.call(this,[0,1,0,1,-4,1,0,1,0])},sobelX:()=>{v.convolution.call(this,[-1,0,1,-2,0,2,-1,0,1])},sobelY:()=>{v.convolution.call(this,[-1,-2,-1,0,0,0,1,2,1])},sharpen:T=>{let y=T||1;v.convolution.call(this,[0,-1*y,0,-1*y,1+4*y,-1*y,0,-1*y,0])},emboss:T=>{let y=T||1;v.convolution.call(this,[-2*y,-1*y,0,-1*y,1,1*y,0,1*y,2*y])},blur:T=>{let y=T/7/l.width,b=T/7/l.height,z=g(G1);!z||(i.uniform2f(z.uniform.px,0,b),p(x.INTERMEDIATE),i.uniform2f(z.uniform.px,y,0),p())},pixelate:T=>{let y=T/l.width,b=T/l.height,z=g(F1);!z||(i.uniform2f(z.uniform.size,y,b),p())}};this.add=function(T){let y=Array.prototype.slice.call(arguments,1),b=v[T];s.push({func:b,args:y})},this.reset=function(){s=[]},this.get=function(){return s},this.apply=function(T){f(T.width,T.height),e=0,t||(t=i.createTexture()),i.bindTexture(i.TEXTURE_2D,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.NEAREST),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,T);for(let y=0;yd.data())),A=.99*Math.max(s[0][0],s[1][0],s[2][0]),a=[Y.sub(n[0],o[0]),Y.sub(n[1],o[1]),Y.sub(n[2],o[2])],l=[Y.sub(r[0],o[0]),Y.sub(r[1],o[1]),Y.sub(r[2],o[2])],c=[Y.div(A,l[0]),Y.div(A,l[1]),Y.div(A,l[2])],x=[Y.mul(a[0],c[0]),Y.mul(a[1],c[1]),Y.mul(a[2],c[2])],i=Y.stack([x[0],x[1],x[2]],2),f=Y.reshape(i,[1,t.shape[0],t.shape[1],3]);return Y.dispose([...n,...o,...r,...a,...l,...c,...x,i,t]),f}var Y2=3840,g0=null,M0=null,a2=null,_,U0={inputSum:0,cacheDiff:1,sumMethod:0,inputTensor:void 0};function Yt(){U0.inputSum=0,U0.cacheDiff=1,U0.sumMethod=0,U0.inputTensor=void 0}function $0(e,t){let n;if(k.browser)if(k.worker){if(typeof OffscreenCanvas=="undefined")throw new Error("canvas error: attempted to run in web worker but OffscreenCanvas is not supported");n=new OffscreenCanvas(e,t)}else{if(typeof document=="undefined")throw new Error("canvas error: attempted to run in browser but DOM is not defined");n=document.createElement("canvas"),n.width=e,n.height=t}else typeof k.Canvas!="undefined"?n=new k.Canvas(e,t):typeof globalThis.Canvas!="undefined"&&(n=new globalThis.Canvas(e,t));return n}function K2(e,t){let n=t||$0(e.width,e.height);return n.getContext("2d").drawImage(e,0,0),n}async function J2(e,t,n=!0){var f,d;if(!e)return t.debug&&h("input error: input is missing"),{tensor:null,canvas:null};if(!(e instanceof I.Tensor)&&!(typeof Image!="undefined"&&e instanceof Image)&&!(typeof k.Canvas!="undefined"&&e instanceof k.Canvas)&&!(typeof globalThis.Canvas!="undefined"&&e instanceof globalThis.Canvas)&&!(typeof ImageData!="undefined"&&e instanceof ImageData)&&!(typeof ImageBitmap!="undefined"&&e instanceof ImageBitmap)&&!(typeof HTMLImageElement!="undefined"&&e instanceof HTMLImageElement)&&!(typeof HTMLMediaElement!="undefined"&&e instanceof HTMLMediaElement)&&!(typeof HTMLVideoElement!="undefined"&&e instanceof HTMLVideoElement)&&!(typeof HTMLCanvasElement!="undefined"&&e instanceof HTMLCanvasElement)&&!(typeof OffscreenCanvas!="undefined"&&e instanceof OffscreenCanvas))throw new Error("input error: type is not recognized");if(e instanceof I.Tensor){let m=null;if(e.isDisposedInternal)throw new Error("input error: attempted to use tensor but it is disposed");if(!e.shape)throw new Error("input error: attempted to use tensor without a shape");if(e.shape.length===3){if(e.shape[2]===3)m=I.expandDims(e,0);else if(e.shape[2]===4){let p=I.slice3d(e,[0,0,0],[-1,-1,3]);m=I.expandDims(p,0),I.dispose(p)}}else e.shape.length===4&&(e.shape[3]===3?m=I.clone(e):e.shape[3]===4&&(m=I.slice4d(e,[0,0,0,0],[-1,-1,-1,3])));if(m==null||m.shape.length!==4||m.shape[0]!==1||m.shape[3]!==3)throw new Error(`input error: attempted to use tensor with unrecognized shape: ${e.shape.toString()}`);if(m.dtype==="int32"){let p=I.cast(m,"float32");I.dispose(m),m=p}return{tensor:m,canvas:t.filter.return?M0:null}}if(typeof e.readyState!="undefined"&&e.readyState<=2)return t.debug&&h("input stream is not ready"),{tensor:null,canvas:g0};let o=e.naturalWidth||e.videoWidth||e.width||e.shape&&e.shape[1]>0,r=e.naturalHeight||e.videoHeight||e.height||e.shape&&e.shape[2]>0;if(!o||!r)return t.debug&&h("cannot determine input dimensions"),{tensor:null,canvas:g0};let s=o,A=r;if(s>Y2&&(s=Y2,A=Math.trunc(s*r/o)),A>Y2&&(A=Y2,s=Math.trunc(A*o/r)),(((f=t.filter)==null?void 0:f.width)||0)>0?s=t.filter.width:(((d=t.filter)==null?void 0:d.height)||0)>0&&(s=o*((t.filter.height||0)/r)),(t.filter.height||0)>0?A=t.filter.height:(t.filter.width||0)>0&&(A=r*((t.filter.width||0)/o)),!s||!A)throw new Error("input error: cannot determine dimension");(!g0||g0.width!==s||g0.height!==A)&&(g0=$0(s,A));let a=g0.getContext("2d");if(typeof ImageData!="undefined"&&e instanceof ImageData?a.putImageData(e,0,0):t.filter.flip&&typeof a.translate!="undefined"?(a.translate(o,0),a.scale(-1,1),a.drawImage(e,0,0,o,r,0,0,g0.width,g0.height),a.setTransform(1,0,0,1,0,0)):a.drawImage(e,0,0,o,r,0,0,g0.width,g0.height),(!M0||g0.width!==M0.width||g0.height!==M0.height)&&(M0=$0(g0.width,g0.height)),t.filter.enabled&&k.webgl.supported?(_||(_=k.browser?new H1:null),k.filter=!!_,_!=null&&_.add?(_.reset(),t.filter.brightness!==0&&_.add("brightness",t.filter.brightness),t.filter.contrast!==0&&_.add("contrast",t.filter.contrast),t.filter.sharpness!==0&&_.add("sharpen",t.filter.sharpness),t.filter.blur!==0&&_.add("blur",t.filter.blur),t.filter.saturation!==0&&_.add("saturation",t.filter.saturation),t.filter.hue!==0&&_.add("hue",t.filter.hue),t.filter.negative&&_.add("negative"),t.filter.sepia&&_.add("sepia"),t.filter.vintage&&_.add("brownie"),t.filter.sepia&&_.add("sepia"),t.filter.kodachrome&&_.add("kodachrome"),t.filter.technicolor&&_.add("technicolor"),t.filter.polaroid&&_.add("polaroid"),t.filter.pixelate!==0&&_.add("pixelate",t.filter.pixelate),_.get()>0?M0=_.apply(g0):M0=_.draw(g0)):(t.debug&&h("input process error: cannot initialize filters"),k.webgl.supported=!1,t.filter.enabled=!1,K2(g0,M0))):(K2(g0,M0),_&&(_=null),k.filter=!!_),!n)return{tensor:null,canvas:M0};if(!M0)throw new Error("canvas error: cannot create output");let l,c=3;if(typeof ImageData!="undefined"&&e instanceof ImageData||e.data&&e.width&&e.height)if(k.browser&&I.browser)l=I.browser?I.browser.fromPixels(e):null;else{c=e.data.length/e.height/e.width;let m=new Uint8Array(e.data.buffer);l=I.tensor(m,[e.height,e.width,c],"int32")}else if((!a2||M0.width!==a2.width||M0.height!==a2.height)&&(a2=$0(M0.width,M0.height)),I.browser&&k.browser)t.backend==="webgl"||t.backend==="humangl"||t.backend==="webgpu"?l=I.browser.fromPixels(M0):(a2=K2(M0),l=I.browser.fromPixels(a2));else{let g=K2(M0).getContext("2d").getImageData(0,0,s,A);c=g.data.length/s/A;let v=new Uint8Array(g.data.buffer);l=I.tensor(v,[s,A,c])}if(c===4){let m=I.slice3d(l,[0,0,0],[-1,-1,3]);I.dispose(l),l=m}if(!l)throw new Error("input error: cannot create tensor");let x=I.cast(l,"float32"),i=t.filter.equalization?await U2(x):I.expandDims(x,0);return I.dispose([l,x]),{tensor:i,canvas:t.filter.return?M0:null}}async function V1(e,t){let n=!1;if(e.cacheSensitivity===0||!t.shape||t.shape.length!==4||t.shape[1]>2048||t.shape[2]>2048)return n;if(!U0.inputTensor)U0.inputTensor=I.clone(t);else if(U0.inputTensor.shape[1]!==t.shape[1]||U0.inputTensor.shape[2]!==t.shape[2])I.dispose(U0.inputTensor),U0.inputTensor=I.clone(t);else{let o={};o.diff=I.sub(t,U0.inputTensor),o.squared=I.mul(o.diff,o.diff),o.sum=I.sum(o.squared);let s=(await o.sum.data())[0]/(t.shape[1]||1)/(t.shape[2]||1)/255/3;I.dispose([U0.inputTensor,o.diff,o.squared,o.sum]),U0.inputTensor=I.clone(t),n=s<=(e.cacheSensitivity||0)}return n}async function D1(e,t,n){let o={};if(!t||!n||t.shape.length!==4||t.shape.length!==n.shape.length)return e.debug||h("invalid input tensor or tensor shapes do not match:",t.shape,n.shape),0;if(t.shape[0]!==1||n.shape[0]!==1||t.shape[3]!==3||n.shape[3]!==3)return e.debug||h("input tensors must be of shape [1, height, width, 3]:",t.shape,n.shape),0;o.input1=I.clone(t),o.input2=t.shape[1]!==n.shape[1]||t.shape[2]!==n.shape[2]?I.image.resizeBilinear(n,[t.shape[1],t.shape[2]]):I.clone(n),o.diff=I.sub(o.input1,o.input2),o.squared=I.mul(o.diff,o.diff),o.sum=I.sum(o.squared);let s=(await o.sum.data())[0]/(t.shape[1]||1)/(t.shape[2]||1)/255/3;return I.dispose([o.input1,o.input2,o.diff,o.squared,o.sum]),s}var N2=class{constructor(){R(this,"browser");R(this,"node");R(this,"worker");R(this,"platform","");R(this,"agent","");R(this,"backends",[]);R(this,"initial");R(this,"filter");R(this,"tfjs");R(this,"offscreen");R(this,"perfadd",!1);R(this,"tensorflow",{version:void 0,gpu:void 0});R(this,"wasm",{supported:void 0,backend:void 0,simd:void 0,multithread:void 0});R(this,"webgl",{supported:void 0,backend:void 0,version:void 0,renderer:void 0});R(this,"webgpu",{supported:void 0,backend:void 0,adapter:void 0});R(this,"cpu",{model:void 0,flags:[]});R(this,"kernels",[]);R(this,"Canvas");R(this,"Image");R(this,"ImageData");if(this.browser=typeof navigator!="undefined",this.node=typeof process!="undefined"&&typeof process.versions!="undefined"&&typeof process.versions.node!="undefined",this.tfjs={version:y0.version["tfjs-core"]},this.offscreen=typeof OffscreenCanvas!="undefined",this.initial=!0,this.worker=this.browser&&this.offscreen?typeof WorkerGlobalScope!="undefined":void 0,typeof navigator!="undefined"){let t=navigator.userAgent.match(/\(([^()]+)\)/g);if(t!=null&&t[0]){let n=t[0].match(/\(([^()]+)\)/g);this.platform=n!=null&&n[0]?n[0].replace(/\(|\)/g,""):"",this.agent=navigator.userAgent.replace(t[0],""),this.platform[1]&&(this.agent=this.agent.replace(t[1],"")),this.agent=this.agent.replace(/ /g," ")}}else typeof process!="undefined"&&(this.platform=`${process.platform} ${process.arch}`,this.agent=`NodeJS ${process.version}`)}async updateBackend(){this.backends=Object.keys(y0.engine().registryFactory),this.tensorflow={version:y0.backend().binding?y0.backend().binding.TF_Version:void 0,gpu:y0.backend().binding?y0.backend().binding.isUsingGpuDevice():void 0},this.wasm.supported=typeof WebAssembly!="undefined",this.wasm.backend=this.backends.includes("wasm"),this.wasm.supported&&this.wasm.backend&&y0.getBackend()==="wasm"&&(this.wasm.simd=y0.env().get("WASM_HAS_SIMD_SUPPORT"),this.wasm.multithread=y0.env().get("WASM_HAS_MULTITHREAD_SUPPORT"));let t=$0(100,100),n=t?t.getContext("webgl2"):void 0;if(this.webgl.supported=typeof n!="undefined",this.webgl.backend=this.backends.includes("webgl"),this.webgl.supported&&this.webgl.backend&&(y0.getBackend()==="webgl"||y0.getBackend()==="humangl")){let o=y0.backend().gpgpu!=="undefined"?await y0.backend().getGPGPUContext().gl:null;o&&(this.webgl.version=o.getParameter(o.VERSION),this.webgl.renderer=o.getParameter(o.RENDERER))}this.webgpu.supported=this.browser&&typeof navigator.gpu!="undefined",this.webgpu.backend=this.backends.includes("webgpu");try{if(this.webgpu.supported){let o=await navigator.gpu.requestAdapter();this.webgpu.adapter=o?o.name:void 0}}catch(o){this.webgpu.supported=!1}try{this.kernels=y0.getKernelsForBackend(y0.getBackend()).map(o=>o.kernelName.toLowerCase())}catch(o){}}updateCPU(){let t={model:"",flags:[]};this.node&&this.platform.startsWith("linux"),this.cpu?this.cpu=t:Object.defineProperty(this,"cpu",{value:t})}},k=new N2;var _2=class{constructor(){R(this,"config");R(this,"element");R(this,"stream");R(this,"start",async t=>{if(t!=null&&t.debug&&(this.config.debug=t==null?void 0:t.debug),t!=null&&t.crop&&(this.config.crop=t==null?void 0:t.crop),t!=null&&t.mode&&(this.config.mode=t==null?void 0:t.mode),t!=null&&t.width&&(this.config.width=t==null?void 0:t.width),t!=null&&t.height&&(this.config.height=t==null?void 0:t.height),t!=null&&t.element)if(typeof t.element=="string"){let r=document.getElementById(t.element);if(r&&r instanceof HTMLVideoElement)this.element=r;else{this.config.debug&&h("webcam","cannot get dom element",t.element);return}}else if(t.element instanceof HTMLVideoElement)this.element=t.element;else{this.config.debug&&h("webcam","unknown dom element",t.element);return}else this.element=document.createElement("video");let n={audio:!1,video:{facingMode:this.config.mode==="front"?"user":"environment",resizeMode:this.config.crop?"crop-and-scale":"none",width:{ideal:this.config.width>0?this.config.width:window.innerWidth},height:{ideal:this.config.height>0?this.config.height:window.innerHeight}}};if(this.element.addEventListener("play",()=>{this.config.debug&&h("webcam","play")}),this.element.addEventListener("pause",()=>{this.config.debug&&h("webcam","pause")}),this.element.addEventListener("click",async()=>{!this.element||!this.stream||(this.element.paused?await this.element.play():this.element.pause())}),!(navigator!=null&&navigator.mediaDevices)){this.config.debug&&h("webcam","no devices");return}try{this.stream=await navigator.mediaDevices.getUserMedia(n)}catch(r){h("webcam",r);return}if(!this.stream){this.config.debug&&h("webcam","no stream");return}this.element.srcObject=this.stream,await new Promise(r=>{this.element?this.element.onloadeddata=()=>r(!0):r(!1)}),await this.element.play(),this.config.debug&&h("webcam",{width:this.width,height:this.height,label:this.label,stream:this.stream,track:this.track,settings:this.settings,constraints:this.constraints,capabilities:this.capabilities})});R(this,"pause",()=>{this.element&&this.element.pause()});R(this,"play",async()=>{this.element&&await this.element.play()});R(this,"stop",()=>{this.config.debug&&h("webcam","stop"),this.track&&this.track.stop()});this.config={element:void 0,debug:!0,mode:"front",crop:!1,width:0,height:0}}get track(){if(!!this.stream)return this.stream.getVideoTracks()[0]}get capabilities(){if(!!this.track)return this.track.getCapabilities?this.track.getCapabilities():void 0}get constraints(){if(!!this.track)return this.track.getConstraints?this.track.getConstraints():void 0}get settings(){if(!this.stream)return;let t=this.stream.getVideoTracks()[0];return t.getSettings?t.getSettings():void 0}get label(){return this.track?this.track.label:""}get paused(){var t;return((t=this.element)==null?void 0:t.paused)||!1}get width(){var t;return((t=this.element)==null?void 0:t.videoWidth)||0}get height(){var t;return((t=this.element)==null?void 0:t.videoHeight)||0}};var i2=D(V());var Kt={};we(Kt,{age:()=>lr,"anti-spoofing":()=>Vr,antispoof:()=>Qo,blazeface:()=>_o,"blazeface-back":()=>cr,"blazeface-front":()=>dr,"blazepose-detect":()=>Hr,"blazepose-detector2d":()=>xr,"blazepose-detector3d":()=>yr,"blazepose-full":()=>fr,"blazepose-heavy":()=>mr,"blazepose-lite":()=>pr,default:()=>ts,efficientpose:()=>ur,"efficientpose-i-lite":()=>Dr,"efficientpose-ii-lite":()=>Zr,"efficientpose-iv":()=>Xr,emotion:()=>$o,faceboxes:()=>hr,facemesh:()=>er,"facemesh-attention":()=>gr,"facemesh-attention-alt":()=>br,"facemesh-detection-full":()=>Mr,"facemesh-detection-short":()=>Tr,"facemesh-orig":()=>vr,faceres:()=>tr,"faceres-deep":()=>Pr,gear:()=>Rr,gender:()=>wr,"gender-ssrnet-imdb":()=>kr,handdetect:()=>Er,"handlandmark-full":()=>nr,"handlandmark-lite":()=>zr,"handlandmark-sparse":()=>Sr,handskeleton:()=>jr,handtrack:()=>or,"insightface-efficientnet-b0":()=>qr,"insightface-ghostnet-strides1":()=>Ur,"insightface-ghostnet-strides2":()=>Yr,"insightface-mobilenet-emore":()=>Kr,"insightface-mobilenet-swish":()=>Jr,iris:()=>rr,liveness:()=>sr,"mb3-centernet":()=>Ar,meet:()=>Nr,mobileface:()=>Or,mobilefacenet:()=>Ir,models:()=>ar,"movenet-lightning":()=>ir,"movenet-multipose":()=>Cr,"movenet-thunder":()=>Lr,nanodet:()=>Wr,"nanodet-e":()=>Qr,"nanodet-g":()=>_r,"nanodet-m":()=>$r,"nanodet-t":()=>es,posenet:()=>Fr,rvm:()=>Gr,selfie:()=>Br});var Qo=853098,_o=538928,$o=820516,er=1477958,tr=6978814,nr=5431368,or=2964837,rr=2599092,sr=592976,Ar=4030290,ar=0,ir=4650216,lr=161240,cr=538928,dr=402048,xr=7499400,yr=5928856,fr=6338290,mr=27501554,pr=2725490,ur=5651240,hr=2013002,br=2387598,gr=2382414,Mr=1026192,Tr=201268,vr=2955780,Pr=13957620,Rr=1498916,kr=161236,wr=201808,Er=3515612,zr=2023432,Sr=5286322,jr=5502280,Nr=372228,Or=2183192,Ir=5171976,Cr=9448838,Lr=12477112,Wr=7574558,Fr=5032780,Gr=3739355,Br=212886,Hr=5928804,Vr=853098,Dr=2269064,Zr=5651240,Xr=25643252,qr=13013224,Ur=8093408,Yr=8049584,Kr=6938536,Jr=12168584,Qr=12319156,_r=7574558,$r=1887474,es=5294216,ts={antispoof:Qo,blazeface:_o,emotion:$o,facemesh:er,faceres:tr,"handlandmark-full":nr,handtrack:or,iris:rr,liveness:sr,"mb3-centernet":Ar,models:ar,"movenet-lightning":ir,age:lr,"blazeface-back":cr,"blazeface-front":dr,"blazepose-detector2d":xr,"blazepose-detector3d":yr,"blazepose-full":fr,"blazepose-heavy":mr,"blazepose-lite":pr,efficientpose:ur,faceboxes:hr,"facemesh-attention-alt":br,"facemesh-attention":gr,"facemesh-detection-full":Mr,"facemesh-detection-short":Tr,"facemesh-orig":vr,"faceres-deep":Pr,gear:Rr,"gender-ssrnet-imdb":kr,gender:wr,handdetect:Er,"handlandmark-lite":zr,"handlandmark-sparse":Sr,handskeleton:jr,meet:Nr,mobileface:Or,mobilefacenet:Ir,"movenet-multipose":Cr,"movenet-thunder":Lr,nanodet:Wr,posenet:Fr,rvm:Gr,selfie:Br,"blazepose-detect":Hr,"anti-spoofing":Vr,"efficientpose-i-lite":Dr,"efficientpose-ii-lite":Zr,"efficientpose-iv":Xr,"insightface-efficientnet-b0":qr,"insightface-ghostnet-strides1":Ur,"insightface-ghostnet-strides2":Yr,"insightface-mobilenet-emore":Kr,"insightface-mobilenet-swish":Jr,"nanodet-e":Qr,"nanodet-g":_r,"nanodet-m":$r,"nanodet-t":es};var j0={cacheModels:!0,cacheSupported:!0,verbose:!0,debug:!1,modelBasePath:""},ee={};async function ns(e,t){return j0.debug&&h("load model fetch:",e,t),fetch(e,t)}function Z1(e){j0.cacheModels=e.cacheModels,j0.verbose=e.debug,j0.modelBasePath=e.modelBasePath}async function C(e){var c,x,i,f;let t=N1(j0.modelBasePath,e||"");t.toLowerCase().endsWith(".json")||(t+=".json");let n=t.includes("/")?t.split("/"):t.split("\\"),o=n[n.length-1].replace(".json",""),r="indexeddb://"+o;ee[o]={name:o,sizeFromManifest:0,sizeLoadedWeights:0,sizeDesired:Kt[o],inCache:!1},j0.cacheSupported=typeof indexedDB!="undefined";let s={};try{s=j0.cacheSupported&&j0.cacheModels?await i2.io.listModels():{}}catch(d){j0.cacheSupported=!1}ee[o].inCache=j0.cacheSupported&&j0.cacheModels&&Object.keys(s).includes(r);let A=typeof fetch=="undefined"?{}:{fetchFunc:(d,m)=>ns(d,m)},a=new i2.GraphModel(ee[o].inCache?r:t,A),l=!1;try{a.findIOHandler(),j0.debug&&h("model load handler:",a.handler)}catch(d){h("error finding model i/o handler:",t,d)}try{let d=await((c=a.handler)==null?void 0:c.load())||null;ee[o].sizeFromManifest=((x=d==null?void 0:d.weightData)==null?void 0:x.byteLength)||0,d?a.loadSync(d):a=await i2.loadGraphModel(ee[o].inCache?r:t,A),ee[o].sizeLoadedWeights=((f=(i=a.artifacts)==null?void 0:i.weightData)==null?void 0:f.byteLength)||0,j0.verbose&&h("load:",{model:o,url:a.modelUrl,bytes:ee[o].sizeLoadedWeights}),l=!0}catch(d){h("error loading model:",t,d)}if(l&&j0.cacheModels&&j0.cacheSupported&&!ee[o].inCache)try{let d=await a.save(r);j0.debug&&h("model saved:",r,d)}catch(d){h("error saving model:",t,d)}return a}var se=D(V());var Jt="2.11.1";var d0=D(V());var g2={};we(g2,{Models:()=>V2,getModelStats:()=>x1,load:()=>y1,reset:()=>Wt,validate:()=>Gt,validateModel:()=>Ft});var et=D(V());var h0,$2=[],Qt=Number.MAX_SAFE_INTEGER,X1=0,q1=0;async function U1(e){var t;return k.initial&&(h0=null),h0?e.debug&&h("cached model:",h0.modelUrl):h0=await C((t=e.face.antispoof)==null?void 0:t.modelPath),h0}async function _t(e,t,n,o){var A,a;if(!h0||!(h0!=null&&h0.executor))return 0;let r=(((A=t.face.antispoof)==null?void 0:A.skipTime)||0)>M()-q1,s=Qt<(((a=t.face.antispoof)==null?void 0:a.skipFrames)||0);return t.skipAllowed&&r&&s&&X1===o&&$2[n]?(Qt++,$2[n]):(Qt=0,new Promise(async l=>{let c=et.image.resizeBilinear(e,[h0!=null&&h0.inputs[0].shape?h0.inputs[0].shape[2]:0,h0!=null&&h0.inputs[0].shape?h0.inputs[0].shape[1]:0],!1),x=h0==null?void 0:h0.execute(c),i=(await x.data())[0];$2[n]=Math.round(100*i)/100,X1=o,q1=M(),et.dispose([c,x]),l($2[n])}))}var L=D(V());var he=D(V());var te={silhouette:[10,338,297,332,284,251,389,356,454,323,361,288,397,365,379,378,400,377,152,148,176,149,150,136,172,58,132,93,234,127,162,21,54,103,67,109],lipsUpperOuter:[185,40,39,37,0,267,269,270,409],lipsLowerOuter:[61,146,91,181,84,17,314,405,321,375,291],lipsUpperInner:[191,80,81,82,13,312,311,310,415],lipsLowerInner:[78,95,88,178,87,14,317,402,318,324,308],lipsLowerSemiOuter:[76,77,90,180,85,16,315,404,320,307,306],lipsUpperSemiOuter:[184,74,73,72,11,302,303,304,408],lipsLowerSemiInner:[62,96,89,179,86,15,316,403,319,325,292],lipsUpperSemiInner:[183,42,41,38,12,268,271,272,407],rightEyeUpper0:[246,161,160,159,158,157,173],rightEyeLower0:[33,7,163,144,145,153,154,155,133],rightEyeUpper1:[247,30,29,27,28,56,190],rightEyeLower1:[130,25,110,24,23,22,26,112,243],rightEyeUpper2:[113,225,224,223,222,221,189],rightEyeLower2:[226,31,228,229,230,231,232,233,244],rightEyeLower3:[143,111,117,118,119,120,121,128,245],rightEyebrowUpper:[156,70,63,105,66,107,55,193],rightEyebrowLower:[35,124,46,53,52,65],rightEyeIris:[473,474,475,476,477],leftEyeUpper0:[466,388,387,386,385,384,398],leftEyeLower0:[263,249,390,373,374,380,381,382,362],leftEyeUpper1:[467,260,259,257,258,286,414],leftEyeLower1:[359,255,339,254,253,252,256,341,463],leftEyeUpper2:[342,445,444,443,442,441,413],leftEyeLower2:[446,261,448,449,450,451,452,453,464],leftEyeLower3:[372,340,346,347,348,349,350,357,465],leftEyebrowUpper:[383,300,293,334,296,336,285,417],leftEyebrowLower:[265,353,276,283,282,295],leftEyeIris:[468,469,470,471,472],midwayBetweenEyes:[168],noseTip:[1],noseBottom:[2],noseRightCorner:[98],noseLeftCorner:[327],rightCheek:[205],leftCheek:[425]},$t={count:468,mouth:13,symmetryLine:[13,te.midwayBetweenEyes[0]]},qe={leftEye:0,rightEye:1,nose:2,mouth:3,leftEar:4,rightEar:5,symmetryLine:[3,2]},e5=[{key:"EyeUpper0",indices:[9,10,11,12,13,14,15]},{key:"EyeUpper1",indices:[25,26,27,28,29,30,31]},{key:"EyeUpper2",indices:[41,42,43,44,45,46,47]},{key:"EyeLower0",indices:[0,1,2,3,4,5,6,7,8]},{key:"EyeLower1",indices:[16,17,18,19,20,21,22,23,24]},{key:"EyeLower2",indices:[32,33,34,35,36,37,38,39,40]},{key:"EyeLower3",indices:[54,55,56,57,58,59,60,61,62]},{key:"EyebrowUpper",indices:[63,64,65,66,67,68,69,70]},{key:"EyebrowLower",indices:[48,49,50,51,52,53]}],O2=[[.499976992607117,.652534008026123],[.500025987625122,.547487020492554],[.499974012374878,.602371990680695],[.482113003730774,.471979022026062],[.500150978565216,.527155995368958],[.499909996986389,.498252987861633],[.499523013830185,.40106201171875],[.289712011814117,.380764007568359],[.499954998493195,.312398016452789],[.499987006187439,.269918978214264],[.500023007392883,.107050001621246],[.500023007392883,.666234016418457],[.5000159740448,.679224014282227],[.500023007392883,.692348003387451],[.499976992607117,.695277988910675],[.499976992607117,.70593398809433],[.499976992607117,.719385027885437],[.499976992607117,.737019002437592],[.499967992305756,.781370997428894],[.499816000461578,.562981009483337],[.473773002624512,.573909997940063],[.104906998574734,.254140973091125],[.365929991006851,.409575998783112],[.338757991790771,.41302502155304],[.311120003461838,.409460008144379],[.274657994508743,.389131009578705],[.393361985683441,.403706014156342],[.345234006643295,.344011008739471],[.370094001293182,.346076011657715],[.319321990013123,.347265005111694],[.297903001308441,.353591024875641],[.24779200553894,.410809993743896],[.396889001131058,.842755019664764],[.280097991228104,.375599980354309],[.106310002505779,.399955987930298],[.2099249958992,.391353011131287],[.355807989835739,.534406006336212],[.471751004457474,.65040397644043],[.474155008792877,.680191993713379],[.439785003662109,.657229006290436],[.414617002010345,.66654098033905],[.450374007225037,.680860996246338],[.428770989179611,.682690978050232],[.374971002340317,.727805018424988],[.486716985702515,.547628998756409],[.485300987958908,.527395009994507],[.257764995098114,.314490020275116],[.401223003864288,.455172002315521],[.429818987846375,.548614978790283],[.421351999044418,.533740997314453],[.276895999908447,.532056987285614],[.483370006084442,.499586999416351],[.33721199631691,.282882988452911],[.296391993761063,.293242990970612],[.169294998049736,.193813979625702],[.447580009698868,.302609980106354],[.392390012741089,.353887975215912],[.354490011930466,.696784019470215],[.067304998636246,.730105042457581],[.442739009857178,.572826027870178],[.457098007202148,.584792017936707],[.381974011659622,.694710969924927],[.392388999462128,.694203019142151],[.277076005935669,.271932005882263],[.422551989555359,.563233017921448],[.385919004678726,.281364023685455],[.383103013038635,.255840003490448],[.331431001424789,.119714021682739],[.229923993349075,.232002973556519],[.364500999450684,.189113974571228],[.229622006416321,.299540996551514],[.173287004232407,.278747975826263],[.472878992557526,.666198015213013],[.446828007698059,.668527007102966],[.422762006521225,.673889994621277],[.445307999849319,.580065965652466],[.388103008270264,.693961024284363],[.403039008378983,.706539988517761],[.403629004955292,.693953037261963],[.460041999816895,.557139039039612],[.431158006191254,.692366003990173],[.452181994915009,.692366003990173],[.475387006998062,.692366003990173],[.465828001499176,.779190003871918],[.472328990697861,.736225962638855],[.473087012767792,.717857003211975],[.473122000694275,.704625964164734],[.473033010959625,.695277988910675],[.427942007780075,.695277988910675],[.426479011774063,.703539967536926],[.423162013292313,.711845993995667],[.4183090031147,.720062971115112],[.390094995498657,.639572978019714],[.013953999616206,.560034036636353],[.499913990497589,.58014702796936],[.413199990987778,.69539999961853],[.409626007080078,.701822996139526],[.468080013990402,.601534962654114],[.422728985548019,.585985004901886],[.463079988956451,.593783974647522],[.37211999297142,.47341400384903],[.334562003612518,.496073007583618],[.411671012639999,.546965003013611],[.242175996303558,.14767599105835],[.290776997804642,.201445996761322],[.327338010072708,.256527006626129],[.399509996175766,.748921036720276],[.441727995872498,.261676013469696],[.429764986038208,.187834024429321],[.412198007106781,.108901023864746],[.288955003023148,.398952007293701],[.218936994671822,.435410976409912],[.41278201341629,.398970007896423],[.257135003805161,.355440020561218],[.427684992551804,.437960982322693],[.448339998722076,.536936044692993],[.178560003638268,.45755398273468],[.247308000922203,.457193970680237],[.286267012357712,.467674970626831],[.332827985286713,.460712015628815],[.368755996227264,.447206974029541],[.398963987827301,.432654976844788],[.476410001516342,.405806005001068],[.189241006970406,.523923993110657],[.228962004184723,.348950982093811],[.490725994110107,.562400996685028],[.404670000076294,.485132992267609],[.019469000399113,.401564002037048],[.426243007183075,.420431017875671],[.396993011236191,.548797011375427],[.266469985246658,.376977026462555],[.439121007919312,.51895797252655],[.032313998788595,.644356966018677],[.419054001569748,.387154996395111],[.462783008813858,.505746960639954],[.238978996872902,.779744982719421],[.198220998048782,.831938028335571],[.107550002634525,.540755033493042],[.183610007166862,.740257024765015],[.134409993886948,.333683013916016],[.385764002799988,.883153975009918],[.490967005491257,.579378008842468],[.382384985685349,.508572995662689],[.174399003386497,.397670984268188],[.318785011768341,.39623498916626],[.343364000320435,.400596976280212],[.396100014448166,.710216999053955],[.187885001301765,.588537991046906],[.430987000465393,.944064974784851],[.318993002176285,.898285031318665],[.266247987747192,.869701027870178],[.500023007392883,.190576016902924],[.499976992607117,.954452991485596],[.366169989109039,.398822009563446],[.393207013607025,.39553701877594],[.410373002290726,.391080021858215],[.194993004202843,.342101991176605],[.388664990663528,.362284004688263],[.365961998701096,.355970978736877],[.343364000320435,.355356991291046],[.318785011768341,.35834002494812],[.301414996385574,.363156020641327],[.058132998645306,.319076001644135],[.301414996385574,.387449026107788],[.499987989664078,.618434011936188],[.415838003158569,.624195992946625],[.445681989192963,.566076993942261],[.465844005346298,.620640993118286],[.49992299079895,.351523995399475],[.288718998432159,.819945991039276],[.335278987884521,.852819979190826],[.440512001514435,.902418971061707],[.128294005990028,.791940987110138],[.408771991729736,.373893976211548],[.455606997013092,.451801002025604],[.499877005815506,.908990025520325],[.375436991453171,.924192011356354],[.11421000212431,.615022003650665],[.448662012815475,.695277988910675],[.4480200111866,.704632043838501],[.447111994028091,.715808033943176],[.444831997156143,.730794012546539],[.430011987686157,.766808986663818],[.406787008047104,.685672998428345],[.400738000869751,.681069016456604],[.392399996519089,.677703022956848],[.367855995893478,.663918972015381],[.247923001646996,.601333022117615],[.452769994735718,.420849978923798],[.43639200925827,.359887003898621],[.416164010763168,.368713974952698],[.413385987281799,.692366003990173],[.228018000721931,.683571994304657],[.468268007040024,.352671027183533],[.411361992359161,.804327011108398],[.499989002943039,.469825029373169],[.479153990745544,.442654013633728],[.499974012374878,.439637005329132],[.432112008333206,.493588984012604],[.499886006116867,.866917014122009],[.49991300702095,.821729004383087],[.456548988819122,.819200992584229],[.344549000263214,.745438992977142],[.37890899181366,.574010014533997],[.374292999505997,.780184984207153],[.319687992334366,.570737957954407],[.357154995203018,.604269981384277],[.295284003019333,.621580958366394],[.447750002145767,.862477004528046],[.410986006259918,.508723020553589],[.31395098567009,.775308012962341],[.354128003120422,.812552988529205],[.324548006057739,.703992962837219],[.189096003770828,.646299958229065],[.279776990413666,.71465802192688],[.1338230073452,.682700991630554],[.336768001317978,.644733011722565],[.429883986711502,.466521978378296],[.455527991056442,.548622965812683],[.437114000320435,.558896005153656],[.467287987470627,.529924988746643],[.414712011814117,.335219979286194],[.37704598903656,.322777986526489],[.344107985496521,.320150971412659],[.312875986099243,.32233202457428],[.283526003360748,.333190023899078],[.241245999932289,.382785975933075],[.102986000478268,.468762993812561],[.267612010240555,.424560010433197],[.297879010438919,.433175981044769],[.333433985710144,.433878004550934],[.366427004337311,.426115989685059],[.396012008190155,.416696012020111],[.420121014118195,.41022801399231],[.007561000064015,.480777025222778],[.432949006557465,.569517970085144],[.458638995885849,.479089021682739],[.473466008901596,.545744001865387],[.476087987422943,.563830018043518],[.468472003936768,.555056989192963],[.433990985155106,.582361996173859],[.483518004417419,.562983989715576],[.482482999563217,.57784903049469],[.42645001411438,.389798998832703],[.438998997211456,.39649498462677],[.450067013502121,.400434017181396],[.289712011814117,.368252992630005],[.276670008897781,.363372981548309],[.517862021923065,.471948027610779],[.710287988185883,.380764007568359],[.526226997375488,.573909997940063],[.895093023777008,.254140973091125],[.634069979190826,.409575998783112],[.661242008209229,.41302502155304],[.688880026340485,.409460008144379],[.725341975688934,.389131009578705],[.606630027294159,.40370500087738],[.654766023159027,.344011008739471],[.629905998706818,.346076011657715],[.680678009986877,.347265005111694],[.702096998691559,.353591024875641],[.75221198797226,.410804986953735],[.602918028831482,.842862963676453],[.719901978969574,.375599980354309],[.893692970275879,.399959981441498],[.790081977844238,.391354024410248],[.643998026847839,.534487962722778],[.528249025344849,.65040397644043],[.525849997997284,.680191040039062],[.560214996337891,.657229006290436],[.585384011268616,.66654098033905],[.549625992774963,.680860996246338],[.57122802734375,.682691991329193],[.624852001667023,.72809898853302],[.513050019741058,.547281980514526],[.51509702205658,.527251958847046],[.742246985435486,.314507007598877],[.598631024360657,.454979002475739],[.570338010787964,.548575043678284],[.578631997108459,.533622980117798],[.723087012767792,.532054007053375],[.516445994377136,.499638974666595],[.662801027297974,.282917976379395],[.70362401008606,.293271005153656],[.830704987049103,.193813979625702],[.552385985851288,.302568018436432],[.607609987258911,.353887975215912],[.645429015159607,.696707010269165],[.932694971561432,.730105042457581],[.557260990142822,.572826027870178],[.542901992797852,.584792017936707],[.6180260181427,.694710969924927],[.607590973377228,.694203019142151],[.722943007946014,.271963000297546],[.577413976192474,.563166975975037],[.614082992076874,.281386971473694],[.616907000541687,.255886018276215],[.668509006500244,.119913995265961],[.770092010498047,.232020974159241],[.635536015033722,.189248979091644],[.77039098739624,.299556016921997],[.826722025871277,.278755009174347],[.527121007442474,.666198015213013],[.553171992301941,.668527007102966],[.577238023281097,.673889994621277],[.554691970348358,.580065965652466],[.611896991729736,.693961024284363],[.59696102142334,.706539988517761],[.596370995044708,.693953037261963],[.539958000183105,.557139039039612],[.568841993808746,.692366003990173],[.547818005084991,.692366003990173],[.52461302280426,.692366003990173],[.534089982509613,.779141008853912],[.527670979499817,.736225962638855],[.526912987232208,.717857003211975],[.526877999305725,.704625964164734],[.526966989040375,.695277988910675],[.572058022022247,.695277988910675],[.573521018028259,.703539967536926],[.57683801651001,.711845993995667],[.581691026687622,.720062971115112],[.609944999217987,.639909982681274],[.986046016216278,.560034036636353],[.5867999792099,.69539999961853],[.590372025966644,.701822996139526],[.531915009021759,.601536989212036],[.577268004417419,.585934996604919],[.536915004253387,.593786001205444],[.627542972564697,.473352015018463],[.665585994720459,.495950996875763],[.588353991508484,.546862006187439],[.757824003696442,.14767599105835],[.709249973297119,.201507985591888],[.672684013843536,.256581008434296],[.600408971309662,.74900496006012],[.55826598405838,.261672019958496],[.570303976535797,.187870979309082],[.588165998458862,.109044015407562],[.711045026779175,.398952007293701],[.781069993972778,.435405015945435],[.587247014045715,.398931980133057],[.742869973182678,.355445981025696],[.572156012058258,.437651991844177],[.55186802148819,.536570012569427],[.821442008018494,.457556009292603],[.752701997756958,.457181990146637],[.71375697851181,.467626988887787],[.66711300611496,.460672974586487],[.631101012229919,.447153985500336],[.6008620262146,.432473003864288],[.523481011390686,.405627012252808],[.810747981071472,.523926019668579],[.771045982837677,.348959028720856],[.509127020835876,.562718033790588],[.595292985439301,.485023975372314],[.980530977249146,.401564002037048],[.573499977588654,.420000016689301],[.602994978427887,.548687994480133],[.733529984951019,.376977026462555],[.560611009597778,.519016981124878],[.967685997486115,.644356966018677],[.580985009670258,.387160003185272],[.537728011608124,.505385041236877],[.760966002941132,.779752969741821],[.801778972148895,.831938028335571],[.892440974712372,.54076099395752],[.816350996494293,.740260004997253],[.865594983100891,.333687007427216],[.614073991775513,.883246004581451],[.508952975273132,.579437971115112],[.617941975593567,.508316040039062],[.825608015060425,.397674977779388],[.681214988231659,.39623498916626],[.656635999679565,.400596976280212],[.603900015354156,.710216999053955],[.81208598613739,.588539004325867],[.56801301240921,.944564998149872],[.681007981300354,.898285031318665],[.733752012252808,.869701027870178],[.633830010890961,.398822009563446],[.606792986392975,.39553701877594],[.589659988880157,.391062021255493],[.805015981197357,.342108011245728],[.611334979534149,.362284004688263],[.634037971496582,.355970978736877],[.656635999679565,.355356991291046],[.681214988231659,.35834002494812],[.698584973812103,.363156020641327],[.941866993904114,.319076001644135],[.698584973812103,.387449026107788],[.584177017211914,.624107003211975],[.554318010807037,.566076993942261],[.534153997898102,.62064003944397],[.711217999458313,.819975018501282],[.664629995822906,.852871000766754],[.559099972248077,.902631998062134],[.871706008911133,.791940987110138],[.591234028339386,.373893976211548],[.544341027736664,.451583981513977],[.624562978744507,.924192011356354],[.88577002286911,.615028977394104],[.551338016986847,.695277988910675],[.551980018615723,.704632043838501],[.552887976169586,.715808033943176],[.555167973041534,.730794012546539],[.569944024085999,.767035007476807],[.593203008174896,.685675978660583],[.599261999130249,.681069016456604],[.607599973678589,.677703022956848],[.631937980651855,.663500010967255],[.752032995223999,.601315021514893],[.547226011753082,.420395016670227],[.563543975353241,.359827995300293],[.583841025829315,.368713974952698],[.586614012718201,.692366003990173],[.771915018558502,.683578014373779],[.531597018241882,.352482974529266],[.588370978832245,.804440975189209],[.52079701423645,.442565023899078],[.567984998226166,.493479013442993],[.543282985687256,.819254994392395],[.655317008495331,.745514988899231],[.621008992195129,.574018001556396],[.625559985637665,.78031200170517],[.680198013782501,.570719003677368],[.64276397228241,.604337990283966],[.704662978649139,.621529996395111],[.552012026309967,.862591981887817],[.589071989059448,.508637011051178],[.685944974422455,.775357007980347],[.645735025405884,.812640011310577],[.675342977046967,.703978002071381],[.810858011245728,.646304965019226],[.72012197971344,.714666962623596],[.866151988506317,.682704985141754],[.663187026977539,.644596993923187],[.570082008838654,.466325998306274],[.544561982154846,.548375964164734],[.562758982181549,.558784961700439],[.531987011432648,.530140042304993],[.585271000862122,.335177004337311],[.622952997684479,.32277899980545],[.655896008014679,.320163011550903],[.687132000923157,.322345972061157],[.716481983661652,.333200991153717],[.758756995201111,.382786989212036],[.897013008594513,.468769013881683],[.732392013072968,.424547016620636],[.70211398601532,.433162987232208],[.66652500629425,.433866024017334],[.633504986763,.426087975502014],[.603875994682312,.416586995124817],[.579657971858978,.409945011138916],[.992439985275269,.480777025222778],[.567192018032074,.569419980049133],[.54136598110199,.478899002075195],[.526564002037048,.546118021011353],[.523913025856018,.563830018043518],[.531529009342194,.555056989192963],[.566035985946655,.582329034805298],[.51631098985672,.563053965568542],[.5174720287323,.577877044677734],[.573594987392426,.389806985855103],[.560697972774506,.395331978797913],[.549755990505219,.399751007556915],[.710287988185883,.368252992630005],[.723330020904541,.363372981548309]],Ue=[127,34,139,11,0,37,232,231,120,72,37,39,128,121,47,232,121,128,104,69,67,175,171,148,157,154,155,118,50,101,73,39,40,9,151,108,48,115,131,194,204,211,74,40,185,80,42,183,40,92,186,230,229,118,202,212,214,83,18,17,76,61,146,160,29,30,56,157,173,106,204,194,135,214,192,203,165,98,21,71,68,51,45,4,144,24,23,77,146,91,205,50,187,201,200,18,91,106,182,90,91,181,85,84,17,206,203,36,148,171,140,92,40,39,193,189,244,159,158,28,247,246,161,236,3,196,54,68,104,193,168,8,117,228,31,189,193,55,98,97,99,126,47,100,166,79,218,155,154,26,209,49,131,135,136,150,47,126,217,223,52,53,45,51,134,211,170,140,67,69,108,43,106,91,230,119,120,226,130,247,63,53,52,238,20,242,46,70,156,78,62,96,46,53,63,143,34,227,173,155,133,123,117,111,44,125,19,236,134,51,216,206,205,154,153,22,39,37,167,200,201,208,36,142,100,57,212,202,20,60,99,28,158,157,35,226,113,160,159,27,204,202,210,113,225,46,43,202,204,62,76,77,137,123,116,41,38,72,203,129,142,64,98,240,49,102,64,41,73,74,212,216,207,42,74,184,169,170,211,170,149,176,105,66,69,122,6,168,123,147,187,96,77,90,65,55,107,89,90,180,101,100,120,63,105,104,93,137,227,15,86,85,129,102,49,14,87,86,55,8,9,100,47,121,145,23,22,88,89,179,6,122,196,88,95,96,138,172,136,215,58,172,115,48,219,42,80,81,195,3,51,43,146,61,171,175,199,81,82,38,53,46,225,144,163,110,246,33,7,52,65,66,229,228,117,34,127,234,107,108,69,109,108,151,48,64,235,62,78,191,129,209,126,111,35,143,163,161,246,117,123,50,222,65,52,19,125,141,221,55,65,3,195,197,25,7,33,220,237,44,70,71,139,122,193,245,247,130,33,71,21,162,153,158,159,170,169,150,188,174,196,216,186,92,144,160,161,2,97,167,141,125,241,164,167,37,72,38,12,145,159,160,38,82,13,63,68,71,226,35,111,158,153,154,101,50,205,206,92,165,209,198,217,165,167,97,220,115,218,133,112,243,239,238,241,214,135,169,190,173,133,171,208,32,125,44,237,86,87,178,85,86,179,84,85,180,83,84,181,201,83,182,137,93,132,76,62,183,61,76,184,57,61,185,212,57,186,214,207,187,34,143,156,79,239,237,123,137,177,44,1,4,201,194,32,64,102,129,213,215,138,59,166,219,242,99,97,2,94,141,75,59,235,24,110,228,25,130,226,23,24,229,22,23,230,26,22,231,112,26,232,189,190,243,221,56,190,28,56,221,27,28,222,29,27,223,30,29,224,247,30,225,238,79,20,166,59,75,60,75,240,147,177,215,20,79,166,187,147,213,112,233,244,233,128,245,128,114,188,114,217,174,131,115,220,217,198,236,198,131,134,177,132,58,143,35,124,110,163,7,228,110,25,356,389,368,11,302,267,452,350,349,302,303,269,357,343,277,452,453,357,333,332,297,175,152,377,384,398,382,347,348,330,303,304,270,9,336,337,278,279,360,418,262,431,304,408,409,310,415,407,270,409,410,450,348,347,422,430,434,313,314,17,306,307,375,387,388,260,286,414,398,335,406,418,364,367,416,423,358,327,251,284,298,281,5,4,373,374,253,307,320,321,425,427,411,421,313,18,321,405,406,320,404,405,315,16,17,426,425,266,377,400,369,322,391,269,417,465,464,386,257,258,466,260,388,456,399,419,284,332,333,417,285,8,346,340,261,413,441,285,327,460,328,355,371,329,392,439,438,382,341,256,429,420,360,364,394,379,277,343,437,443,444,283,275,440,363,431,262,369,297,338,337,273,375,321,450,451,349,446,342,467,293,334,282,458,461,462,276,353,383,308,324,325,276,300,293,372,345,447,382,398,362,352,345,340,274,1,19,456,248,281,436,427,425,381,256,252,269,391,393,200,199,428,266,330,329,287,273,422,250,462,328,258,286,384,265,353,342,387,259,257,424,431,430,342,353,276,273,335,424,292,325,307,366,447,345,271,303,302,423,266,371,294,455,460,279,278,294,271,272,304,432,434,427,272,407,408,394,430,431,395,369,400,334,333,299,351,417,168,352,280,411,325,319,320,295,296,336,319,403,404,330,348,349,293,298,333,323,454,447,15,16,315,358,429,279,14,15,316,285,336,9,329,349,350,374,380,252,318,402,403,6,197,419,318,319,325,367,364,365,435,367,397,344,438,439,272,271,311,195,5,281,273,287,291,396,428,199,311,271,268,283,444,445,373,254,339,263,466,249,282,334,296,449,347,346,264,447,454,336,296,299,338,10,151,278,439,455,292,407,415,358,371,355,340,345,372,390,249,466,346,347,280,442,443,282,19,94,370,441,442,295,248,419,197,263,255,359,440,275,274,300,383,368,351,412,465,263,467,466,301,368,389,380,374,386,395,378,379,412,351,419,436,426,322,373,390,388,2,164,393,370,462,461,164,0,267,302,11,12,374,373,387,268,12,13,293,300,301,446,261,340,385,384,381,330,266,425,426,423,391,429,355,437,391,327,326,440,457,438,341,382,362,459,457,461,434,430,394,414,463,362,396,369,262,354,461,457,316,403,402,315,404,403,314,405,404,313,406,405,421,418,406,366,401,361,306,408,407,291,409,408,287,410,409,432,436,410,434,416,411,264,368,383,309,438,457,352,376,401,274,275,4,421,428,262,294,327,358,433,416,367,289,455,439,462,370,326,2,326,370,305,460,455,254,449,448,255,261,446,253,450,449,252,451,450,256,452,451,341,453,452,413,464,463,441,413,414,258,442,441,257,443,442,259,444,443,260,445,444,467,342,445,459,458,250,289,392,290,290,328,460,376,433,435,250,290,392,411,416,433,341,463,464,453,464,465,357,465,412,343,412,399,360,363,440,437,399,456,420,456,363,401,435,288,372,383,353,339,255,249,448,261,255,133,243,190,133,155,112,33,246,247,33,130,25,398,384,286,362,398,414,362,463,341,263,359,467,263,249,255,466,467,260,75,60,166,238,239,79,162,127,139,72,11,37,121,232,120,73,72,39,114,128,47,233,232,128,103,104,67,152,175,148,173,157,155,119,118,101,74,73,40,107,9,108,49,48,131,32,194,211,184,74,185,191,80,183,185,40,186,119,230,118,210,202,214,84,83,17,77,76,146,161,160,30,190,56,173,182,106,194,138,135,192,129,203,98,54,21,68,5,51,4,145,144,23,90,77,91,207,205,187,83,201,18,181,91,182,180,90,181,16,85,17,205,206,36,176,148,140,165,92,39,245,193,244,27,159,28,30,247,161,174,236,196,103,54,104,55,193,8,111,117,31,221,189,55,240,98,99,142,126,100,219,166,218,112,155,26,198,209,131,169,135,150,114,47,217,224,223,53,220,45,134,32,211,140,109,67,108,146,43,91,231,230,120,113,226,247,105,63,52,241,238,242,124,46,156,95,78,96,70,46,63,116,143,227,116,123,111,1,44,19,3,236,51,207,216,205,26,154,22,165,39,167,199,200,208,101,36,100,43,57,202,242,20,99,56,28,157,124,35,113,29,160,27,211,204,210,124,113,46,106,43,204,96,62,77,227,137,116,73,41,72,36,203,142,235,64,240,48,49,64,42,41,74,214,212,207,183,42,184,210,169,211,140,170,176,104,105,69,193,122,168,50,123,187,89,96,90,66,65,107,179,89,180,119,101,120,68,63,104,234,93,227,16,15,85,209,129,49,15,14,86,107,55,9,120,100,121,153,145,22,178,88,179,197,6,196,89,88,96,135,138,136,138,215,172,218,115,219,41,42,81,5,195,51,57,43,61,208,171,199,41,81,38,224,53,225,24,144,110,105,52,66,118,229,117,227,34,234,66,107,69,10,109,151,219,48,235,183,62,191,142,129,126,116,111,143,7,163,246,118,117,50,223,222,52,94,19,141,222,221,65,196,3,197,45,220,44,156,70,139,188,122,245,139,71,162,145,153,159,149,170,150,122,188,196,206,216,92,163,144,161,164,2,167,242,141,241,0,164,37,11,72,12,144,145,160,12,38,13,70,63,71,31,226,111,157,158,154,36,101,205,203,206,165,126,209,217,98,165,97,237,220,218,237,239,241,210,214,169,140,171,32,241,125,237,179,86,178,180,85,179,181,84,180,182,83,181,194,201,182,177,137,132,184,76,183,185,61,184,186,57,185,216,212,186,192,214,187,139,34,156,218,79,237,147,123,177,45,44,4,208,201,32,98,64,129,192,213,138,235,59,219,141,242,97,97,2,141,240,75,235,229,24,228,31,25,226,230,23,229,231,22,230,232,26,231,233,112,232,244,189,243,189,221,190,222,28,221,223,27,222,224,29,223,225,30,224,113,247,225,99,60,240,213,147,215,60,20,166,192,187,213,243,112,244,244,233,245,245,128,188,188,114,174,134,131,220,174,217,236,236,198,134,215,177,58,156,143,124,25,110,7,31,228,25,264,356,368,0,11,267,451,452,349,267,302,269,350,357,277,350,452,357,299,333,297,396,175,377,381,384,382,280,347,330,269,303,270,151,9,337,344,278,360,424,418,431,270,304,409,272,310,407,322,270,410,449,450,347,432,422,434,18,313,17,291,306,375,259,387,260,424,335,418,434,364,416,391,423,327,301,251,298,275,281,4,254,373,253,375,307,321,280,425,411,200,421,18,335,321,406,321,320,405,314,315,17,423,426,266,396,377,369,270,322,269,413,417,464,385,386,258,248,456,419,298,284,333,168,417,8,448,346,261,417,413,285,326,327,328,277,355,329,309,392,438,381,382,256,279,429,360,365,364,379,355,277,437,282,443,283,281,275,363,395,431,369,299,297,337,335,273,321,348,450,349,359,446,467,283,293,282,250,458,462,300,276,383,292,308,325,283,276,293,264,372,447,346,352,340,354,274,19,363,456,281,426,436,425,380,381,252,267,269,393,421,200,428,371,266,329,432,287,422,290,250,328,385,258,384,446,265,342,386,387,257,422,424,430,445,342,276,422,273,424,306,292,307,352,366,345,268,271,302,358,423,371,327,294,460,331,279,294,303,271,304,436,432,427,304,272,408,395,394,431,378,395,400,296,334,299,6,351,168,376,352,411,307,325,320,285,295,336,320,319,404,329,330,349,334,293,333,366,323,447,316,15,315,331,358,279,317,14,316,8,285,9,277,329,350,253,374,252,319,318,403,351,6,419,324,318,325,397,367,365,288,435,397,278,344,439,310,272,311,248,195,281,375,273,291,175,396,199,312,311,268,276,283,445,390,373,339,295,282,296,448,449,346,356,264,454,337,336,299,337,338,151,294,278,455,308,292,415,429,358,355,265,340,372,388,390,466,352,346,280,295,442,282,354,19,370,285,441,295,195,248,197,457,440,274,301,300,368,417,351,465,251,301,389,385,380,386,394,395,379,399,412,419,410,436,322,387,373,388,326,2,393,354,370,461,393,164,267,268,302,12,386,374,387,312,268,13,298,293,301,265,446,340,380,385,381,280,330,425,322,426,391,420,429,437,393,391,326,344,440,438,458,459,461,364,434,394,428,396,262,274,354,457,317,316,402,316,315,403,315,314,404,314,313,405,313,421,406,323,366,361,292,306,407,306,291,408,291,287,409,287,432,410,427,434,411,372,264,383,459,309,457,366,352,401,1,274,4,418,421,262,331,294,358,435,433,367,392,289,439,328,462,326,94,2,370,289,305,455,339,254,448,359,255,446,254,253,449,253,252,450,252,256,451,256,341,452,414,413,463,286,441,414,286,258,441,258,257,442,257,259,443,259,260,444,260,467,445,309,459,250,305,289,290,305,290,460,401,376,435,309,250,392,376,411,433,453,341,464,357,453,465,343,357,412,437,343,399,344,360,440,420,437,456,360,420,363,361,401,288,265,372,353,390,339,249,339,448,255];var ss=[127,234,132,58,172,150,149,148,152,377,378,379,397,288,361,454,356,70,63,105,66,107,336,296,334,293,300,168,6,195,4,98,97,2,326,327,33,160,158,133,153,144,362,385,387,263,373,380,57,40,37,0,267,270,287,321,314,17,84,91,78,81,13,311,308,402,14,178],As=[33,133,362,263,1,62,308,159,145,386,374,6,102,331,2,13,14,70,105,107,336,334,300,54,10,284,50,280,234,454,58,288,152],as=[33,133,362,263,1,78,308],Ta=ss.map(e=>O2[e]),va=As.map(e=>O2[e]),Pa=as.map(e=>O2[e]);function ze(e){let t=e.map(n=>n[0]);return t.push(e[e.length-1][1]),t}var is=[[61,146],[146,91],[91,181],[181,84],[84,17],[17,314],[314,405],[405,321],[321,375],[375,291],[61,185],[185,40],[40,39],[39,37],[37,0],[0,267],[267,269],[269,270],[270,409],[409,291],[78,95],[95,88],[88,178],[178,87],[87,14],[14,317],[317,402],[402,318],[318,324],[324,308],[78,191],[191,80],[80,81],[81,82],[82,13],[13,312],[312,311],[311,310],[310,415],[415,308]],ls=[[263,249],[249,390],[390,373],[373,374],[374,380],[380,381],[381,382],[382,362],[263,466],[466,388],[388,387],[387,386],[386,385],[385,384],[384,398],[398,362]],cs=[[276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]],ds=[[474,475],[475,476],[476,477],[477,474]],xs=[[33,7],[7,163],[163,144],[144,145],[145,153],[153,154],[154,155],[155,133],[33,246],[246,161],[161,160],[160,159],[159,158],[158,157],[157,173],[173,133]],ys=[[46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]],fs=[[469,470],[470,471],[471,472],[472,469]],ms=[[10,338],[338,297],[297,332],[332,284],[284,251],[251,389],[389,356],[356,454],[454,323],[323,361],[361,288],[288,397],[397,365],[365,379],[379,378],[378,400],[400,377],[377,152],[152,148],[148,176],[176,149],[149,150],[150,136],[136,172],[172,58],[58,132],[132,93],[93,234],[234,127],[127,162],[162,21],[21,54],[54,103],[103,67],[67,109],[109,10]],Ra={lips:ze(is),leftEye:ze(ls),leftEyebrow:ze(cs),leftIris:ze(ds),rightEye:ze(xs),rightEyebrow:ze(ys),rightIris:ze(fs),faceOval:ze(ms)};var Se=D(V()),W={tf255:255,tf1:1,tf2:2,tf05:.5,tf127:127.5,rgb:[.2989,.587,.114]};function K1(){W.tf255=Se.scalar(255,"float32"),W.tf1=Se.scalar(1,"float32"),W.tf2=Se.scalar(2,"float32"),W.tf05=Se.scalar(.5,"float32"),W.tf127=Se.scalar(127.5,"float32"),W.rgb=Se.tensor1d([.2989,.587,.114],"float32")}var l2=e=>[Math.abs(e.endPoint[0]-e.startPoint[0]),Math.abs(e.endPoint[1]-e.startPoint[1])],tt=e=>[e.startPoint[0]+(e.endPoint[0]-e.startPoint[0])/2,e.startPoint[1]+(e.endPoint[1]-e.startPoint[1])/2,1],nt=(e,t)=>e?[Math.trunc(Math.max(0,e.startPoint[0])),Math.trunc(Math.max(0,e.startPoint[1])),Math.trunc(Math.min(t.shape[2]||0,e.endPoint[0])-Math.max(0,e.startPoint[0])),Math.trunc(Math.min(t.shape[1]||0,e.endPoint[1])-Math.max(0,e.startPoint[1]))]:[0,0,0,0],ot=(e,t)=>e?[e.startPoint[0]/(t.shape[2]||0),e.startPoint[1]/(t.shape[1]||0),(e.endPoint[0]-e.startPoint[0])/(t.shape[2]||0),(e.endPoint[1]-e.startPoint[1])/(t.shape[1]||0)]:[0,0,0,0],_1=(e,t)=>{let n=[e.startPoint[0]*t[0],e.startPoint[1]*t[1]],o=[e.endPoint[0]*t[0],e.endPoint[1]*t[1]];return{startPoint:n,endPoint:o,landmarks:e.landmarks,confidence:e.confidence}},n5=(e,t,n)=>{let o=t.shape[1],r=t.shape[2],s=[e.startPoint[1]/o,e.startPoint[0]/r,e.endPoint[1]/o,e.endPoint[0]/r],A=he.image.cropAndResize(t,[s],[0],n),a=he.div(A,W.tf255);return he.dispose(A),a},rt=(e,t)=>{let n=tt(e),o=l2(e),r=[t*o[0]/2,t*o[1]/2];return{startPoint:[n[0]-r[0],n[1]-r[1]],endPoint:[n[0]+r[0],n[1]+r[1]],landmarks:e.landmarks,confidence:e.confidence}},st=e=>{let t=tt(e),n=l2(e),o=Math.max(...n)/2;return{startPoint:[Math.round(t[0]-o),Math.round(t[1]-o)],endPoint:[Math.round(t[0]+o),Math.round(t[1]+o)],landmarks:e.landmarks,confidence:e.confidence}},$1=e=>{let t=e.map(o=>o[0]),n=e.map(o=>o[1]);return{startPoint:[Math.min(...t),Math.min(...n)],endPoint:[Math.max(...t),Math.max(...n)],landmarks:e}},o5=[[1,0,0],[0,1,0],[0,0,1]],us=e=>e-2*Math.PI*Math.floor((e+Math.PI)/(2*Math.PI)),hs=(e,t)=>us(Math.PI/2-Math.atan2(-(t[1]-e[1]),t[0]-e[0]));var J1=(e,t)=>[[1,0,e],[0,1,t],[0,0,1]],Ye=(e,t)=>{let n=0;for(let o=0;o{let n=[];for(let o=0;o{let n=[],o=e.length;for(let r=0;r{let n=Math.cos(e),o=Math.sin(e),r=[[n,-o,0],[o,n,0],[0,0,1]],s=J1(t[0],t[1]),A=Q1(s,r),a=J1(-t[0],-t[1]);return Q1(A,a)},gs=e=>{let t=[[e[0][0],e[1][0]],[e[0][1],e[1][1]]],n=[e[0][2],e[1][2]],o=[-Ye(t[0],n),-Ye(t[1],n)];return[t[0].concat(o[0]),t[1].concat(o[1]),[0,0,1]]},Ms=(e,t)=>[Ye(e,t[0]),Ye(e,t[1])];function t3(e){let t=e===192?{strides:[4],anchors:[1]}:{strides:[e/16,e/8],anchors:[2,6]},n=[];for(let o=0;o[s[0]/r*(d[0]-r/2),s[1]/r*(d[1]-r/2),d[2]||0]),a=n&&n!==0&&Math.abs(n)>.2,l=a?e3(n,[0,0]):o5,c=a?A.map(d=>[...Ms(d,l),d[2]]):A,x=a?gs(o):o5,i=tt(t),f=[Ye(i,x[0]),Ye(i,x[1])];return c.map(d=>[Math.trunc(d[0]+f[0]),Math.trunc(d[1]+f[1]),Math.trunc(d[2]||0)])}function o3(e,t,n,o){let r=t.landmarks.length>=$t.count?$t.symmetryLine:qe.symmetryLine,s=0,A=o5,a;if(e&&k.kernels.includes("rotatewithoffset"))if(s=hs(t.landmarks[r[0]],t.landmarks[r[1]]),s&&s!==0&&Math.abs(s)>.2){let c=tt(t),x=[c[0]/n.shape[2],c[1]/n.shape[1]],i=he.image.rotateWithOffset(n,s,0,x);A=e3(-s,c),a=n5(t,i,[o,o]),he.dispose(i)}else a=n5(t,n,[o,o]);else a=n5(t,n,[o,o]);return[s,A,a]}var Ts=e=>{let t=e.map(o=>o[0]),n=e.map(o=>o[1]);return[Math.min(...t)+(Math.max(...t)-Math.min(...t))/2,Math.min(...n)+(Math.max(...n)-Math.min(...n))/2]},r3=(e,t)=>{let n=Ts(e),o=l2(t);return{startPoint:[n[0]-o[0]/2,n[1]-o[1]/2],endPoint:[n[0]+o[0]/2,n[1]+o[1]/2]}};var s3=6,vs=1.4,Ae,A3=null,je=0,I2=null,c2=()=>je;async function a3(e){var t;return k.initial&&(Ae=null),Ae?e.debug&&h("cached model:",Ae.modelUrl):Ae=await C((t=e.face.detector)==null?void 0:t.modelPath),je=Ae.executor&&Ae.inputs[0].shape?Ae.inputs[0].shape[2]:256,I2=L.scalar(je,"int32"),A3=L.tensor2d(t3(je)),Ae}function Ps(e){let t={};t.boxStarts=L.slice(e,[0,1],[-1,2]),t.centers=L.add(t.boxStarts,A3),t.boxSizes=L.slice(e,[0,3],[-1,2]),t.boxSizesNormalized=L.div(t.boxSizes,I2),t.centersNormalized=L.div(t.centers,I2),t.halfBoxSize=L.div(t.boxSizesNormalized,W.tf2),t.starts=L.sub(t.centersNormalized,t.halfBoxSize),t.ends=L.add(t.centersNormalized,t.halfBoxSize),t.startNormalized=L.mul(t.starts,I2),t.endNormalized=L.mul(t.ends,I2);let n=L.concat2d([t.startNormalized,t.endNormalized],1);return Object.keys(t).forEach(o=>L.dispose(t[o])),n}async function i3(e,t){var a,l,c,x;if(!e||e.isDisposedInternal||e.shape.length!==4||e.shape[1]<1||e.shape[2]<1)return[];let n={};n.resized=L.image.resizeBilinear(e,[je,je]),n.div=L.div(n.resized,W.tf127),n.normalized=L.sub(n.div,W.tf05);let o=Ae==null?void 0:Ae.execute(n.normalized);if(Array.isArray(o)&&o.length>2){let i=o.sort((f,d)=>f.size-d.size);n.concat384=L.concat([i[0],i[2]],2),n.concat512=L.concat([i[1],i[3]],2),n.concat=L.concat([n.concat512,n.concat384],1),n.batch=L.squeeze(n.concat,0)}else Array.isArray(o)?n.batch=L.squeeze(o[0]):n.batch=L.squeeze(o);L.dispose(o),n.boxes=Ps(n.batch),n.logits=L.slice(n.batch,[0,0],[-1,1]),n.sigmoid=L.sigmoid(n.logits),n.scores=L.squeeze(n.sigmoid),n.nms=await L.image.nonMaxSuppressionAsync(n.boxes,n.scores,((a=t.face.detector)==null?void 0:a.maxDetected)||0,((l=t.face.detector)==null?void 0:l.iouThreshold)||0,((c=t.face.detector)==null?void 0:c.minConfidence)||0);let r=await n.nms.array(),s=[],A=await n.scores.data();for(let i=0;i(((x=t.face.detector)==null?void 0:x.minConfidence)||0)){let d={};d.bbox=L.slice(n.boxes,[r[i],0],[1,-1]),d.slice=L.slice(n.batch,[r[i],s3-1],[1,-1]),d.squeeze=L.squeeze(d.slice),d.landmarks=L.reshape(d.squeeze,[s3,-1]);let m=await d.bbox.data(),p={startPoint:[m[0],m[1]],endPoint:[m[2],m[3]],landmarks:await d.landmarks.array(),confidence:f},g=_1(p,[(e.shape[2]||0)/je,(e.shape[1]||0)/je]),v=rt(g,t.face.scale||vs),T=st(v);s.push(T),Object.keys(d).forEach(y=>L.dispose(d[y]))}}return Object.keys(n).forEach(i=>L.dispose(n[i])),s}var F0=D(V());var At={};we(At,{connected:()=>A5,kpt:()=>s5});var s5=["nose","leftEyeInside","leftEye","leftEyeOutside","rightEyeInside","rightEye","rightEyeOutside","leftEar","rightEar","leftMouth","rightMouth","leftShoulder","rightShoulder","leftElbow","rightElbow","leftWrist","rightWrist","leftPinky","rightPinky","leftIndex","rightIndex","leftThumb","rightThumb","leftHip","rightHip","leftKnee","rightKnee","leftAnkle","rightAnkle","leftHeel","rightHeel","leftFoot","rightFoot","bodyCenter","bodyTop","leftPalm","leftHand","rightPalm","rightHand"],A5={shoulders:["leftShoulder","rightShoulder"],hips:["rightHip","leftHip"],mouth:["leftMouth","rightMouth"],leftLegUpper:["leftHip","leftKnee"],leftLegLower:["leftKnee","leftAnkle"],leftFoot:["leftAnkle","leftHeel","leftFoot"],leftTorso:["leftShoulder","leftHip"],leftArmUpper:["leftShoulder","leftElbow"],leftArmLower:["leftElbow","leftWrist"],leftHand:["leftWrist","leftPalm"],leftHandPinky:["leftPalm","leftPinky"],leftHandIndex:["leftPalm","leftIndex"],leftHandThumb:["leftPalm","leftThumb"],leftEyeOutline:["leftEyeInside","leftEyeOutside"],rightLegUpper:["rightHip","rightKnee"],rightLegLower:["rightKnee","rightAnkle"],rightFoot:["rightAnkle","rightHeel","rightFoot"],rightTorso:["rightShoulder","rightHip"],rightArmUpper:["rightShoulder","rightElbow"],rightArmLower:["rightElbow","rightWrist"],rightHand:["rightWrist","rightPalm"],rightHandPinky:["rightPalm","rightPinky"],rightHandIndex:["rightPalm","rightIndex"],rightHandThumb:["rightPalm","rightThumb"],rightEyeOutline:["rightEyeInside","rightEyeOutside"]};var W0=D(V()),c3=224,Rs,ks=5,at=[8,16,32,32,32];function d3(){let e=[],t=0;for(;tn.x)),y:W0.tensor1d(e.map(n=>n.y))}}function be(e,t=[1,1]){let n=[e.map(a=>a[0]),e.map(a=>a[1])],o=[Math.min(...n[0]),Math.min(...n[1])],r=[Math.max(...n[0]),Math.max(...n[1])],s=[o[0],o[1],r[0]-o[0],r[1]-o[1]],A=[s[0]/t[0],s[1]/t[1],s[2]/t[0],s[3]/t[1]];return{box:s,boxRaw:A}}function x3(e,t=[1,1]){let n=[e.map(c=>c[0]),e.map(c=>c[1])],o=[Math.min(...n[0]),Math.min(...n[1])],r=[Math.max(...n[0]),Math.max(...n[1])],s=[(o[0]+r[0])/2,(o[1]+r[1])/2],A=Math.max(s[0]-o[0],s[1]-o[1],-s[0]+r[0],-s[1]+r[1]),a=[Math.trunc(s[0]-A),Math.trunc(s[1]-A),Math.trunc(2*A),Math.trunc(2*A)],l=[a[0]/t[0],a[1]/t[1],a[2]/t[0],a[3]/t[1]];return{box:a,boxRaw:l}}function it(e,t){let n=[e[2]*t,e[3]*t];return[e[0]-(n[0]-e[2])/2,e[1]-(n[1]-e[3])/2,n[0],n[1]]}var m3={initial:!0},R0={detector:null,landmarks:null},d2={detector:[224,224],landmarks:[256,256]},a5=Number.MAX_SAFE_INTEGER,Es={landmarks:["ld_3d","activation_segmentation","activation_heatmap","world_3d","output_poseflag"],detector:[]},ct=null,C2,Ne=[[0,0],[0,0],[0,0],[0,0]],y3=0,f3=e=>1-1/(1+Math.exp(e));async function p3(e){var t;if(m3.initial&&(R0.detector=null),!R0.detector&&e.body.detector&&e.body.detector.modelPath){R0.detector=await C(e.body.detector.modelPath);let n=(t=R0.detector)!=null&&t.executor?Object.values(R0.detector.modelSignature.inputs):void 0;d2.detector[0]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[1].size):0,d2.detector[1]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[2].size):0}else e.debug&&R0.detector&&h("cached model:",R0.detector.modelUrl);return d3(),R0.detector}async function u3(e){var t;if(m3.initial&&(R0.landmarks=null),R0.landmarks)e.debug&&h("cached model:",R0.landmarks.modelUrl);else{R0.landmarks=await C(e.body.modelPath);let n=(t=R0.landmarks)!=null&&t.executor?Object.values(R0.landmarks.modelSignature.inputs):void 0;d2.landmarks[0]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[1].size):0,d2.landmarks[1]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[2].size):0}return R0.landmarks}function zs(e,t){var r,s;let n={};if(!((r=e==null?void 0:e.shape)!=null&&r[1])||!((s=e==null?void 0:e.shape)!=null&&s[2]))return e;let o;if(C2&&(n.cropped=F0.image.cropAndResize(e,[C2],[0],[e.shape[1],e.shape[2]])),e.shape[1]!==e.shape[2]){let A=[e.shape[2]>e.shape[1]?Math.trunc((e.shape[2]-e.shape[1])/2):0,e.shape[2]>e.shape[1]?Math.trunc((e.shape[2]-e.shape[1])/2):0],a=[e.shape[1]>e.shape[2]?Math.trunc((e.shape[1]-e.shape[2])/2):0,e.shape[1]>e.shape[2]?Math.trunc((e.shape[1]-e.shape[2])/2):0];Ne=[[0,0],A,a,[0,0]],n.pad=F0.pad(n.cropped||e,Ne),n.resize=F0.image.resizeBilinear(n.pad,[t,t]),o=F0.div(n.resize,W.tf255)}else e.shape[1]!==t?(n.resize=F0.image.resizeBilinear(n.cropped||e,[t,t]),o=F0.div(n.resize,W.tf255)):o=F0.div(n.cropped||e,W.tf255);return Object.keys(n).forEach(A=>F0.dispose(n[A])),o}function Ss(e,t){for(let n of e)n.position=[Math.trunc(n.position[0]*(t[0]+Ne[2][0]+Ne[2][1])/t[0]-Ne[2][0]),Math.trunc(n.position[1]*(t[1]+Ne[1][0]+Ne[1][1])/t[1]-Ne[1][0]),n.position[2]],n.positionRaw=[n.position[0]/t[0],n.position[1]/t[1],2*n.position[2]/(t[0]+t[1])];if(C2)for(let n of e)n.positionRaw=[n.positionRaw[0]+C2[1],n.positionRaw[1]+C2[0],n.positionRaw[2]],n.position=[Math.trunc(n.positionRaw[0]*t[0]),Math.trunc(n.positionRaw[1]*t[1]),n.positionRaw[2]];return e}function js(e){let t=e.find(a=>a.part==="leftPalm"),n=e.find(a=>a.part==="leftWrist"),o=e.find(a=>a.part==="leftIndex");t.position[2]=((n.position[2]||0)+(o.position[2]||0))/2;let r=e.find(a=>a.part==="rightPalm"),s=e.find(a=>a.part==="rightWrist"),A=e.find(a=>a.part==="rightIndex");r.position[2]=((s.position[2]||0)+(A.position[2]||0))/2}async function Ns(e,t,n){var m,p;if(!((m=R0.landmarks)!=null&&m.executor))return null;let o={};[o.ld,o.segmentation,o.heatmap,o.world,o.poseflag]=(p=R0.landmarks)==null?void 0:p.execute(e,Es.landmarks);let r=(await o.poseflag.data())[0],s=await o.ld.data(),A=await o.world.data();Object.keys(o).forEach(g=>F0.dispose(o[g]));let a=[],l=5;for(let g=0;gg.position),i=be(x,[n[0],n[1]]),f={};for(let[g,v]of Object.entries(A5)){let T=[];for(let y=0;yw.part===v[y]),z=c.find(w=>w.part===v[y+1]);b&&z&&T.push([b.position,z.position])}f[g]=T}return{id:0,score:Math.trunc(100*r)/100,box:i.box,boxRaw:i.boxRaw,keypoints:c,annotations:f}}async function i5(e,t){let n=[e.shape[2]||0,e.shape[1]||0],o=(t.body.skipTime||0)>M()-y3,r=a5<(t.body.skipFrames||0);if(t.skipAllowed&&o&&r&&ct!==null)a5++;else{let s={};s.landmarks=zs(e,256),ct=await Ns(s.landmarks,t,n),Object.keys(s).forEach(A=>F0.dispose(s[A])),y3=M(),a5=0}return ct?[ct]:[]}var N0=D(V());var x2=[{class:1,label:"person"},{class:2,label:"bicycle"},{class:3,label:"car"},{class:4,label:"motorcycle"},{class:5,label:"airplane"},{class:6,label:"bus"},{class:7,label:"train"},{class:8,label:"truck"},{class:9,label:"boat"},{class:10,label:"traffic light"},{class:11,label:"fire hydrant"},{class:12,label:"stop sign"},{class:13,label:"parking meter"},{class:14,label:"bench"},{class:15,label:"bird"},{class:16,label:"cat"},{class:17,label:"dog"},{class:18,label:"horse"},{class:19,label:"sheep"},{class:20,label:"cow"},{class:21,label:"elephant"},{class:22,label:"bear"},{class:23,label:"zebra"},{class:24,label:"giraffe"},{class:25,label:"backpack"},{class:26,label:"umbrella"},{class:27,label:"handbag"},{class:28,label:"tie"},{class:29,label:"suitcase"},{class:30,label:"frisbee"},{class:31,label:"skis"},{class:32,label:"snowboard"},{class:33,label:"sports ball"},{class:34,label:"kite"},{class:35,label:"baseball bat"},{class:36,label:"baseball glove"},{class:37,label:"skateboard"},{class:38,label:"surfboard"},{class:39,label:"tennis racket"},{class:40,label:"bottle"},{class:41,label:"wine glass"},{class:42,label:"cup"},{class:43,label:"fork"},{class:44,label:"knife"},{class:45,label:"spoon"},{class:46,label:"bowl"},{class:47,label:"banana"},{class:48,label:"apple"},{class:49,label:"sandwich"},{class:50,label:"orange"},{class:51,label:"broccoli"},{class:52,label:"carrot"},{class:53,label:"hot dog"},{class:54,label:"pizza"},{class:55,label:"donut"},{class:56,label:"cake"},{class:57,label:"chair"},{class:58,label:"couch"},{class:59,label:"potted plant"},{class:60,label:"bed"},{class:61,label:"dining table"},{class:62,label:"toilet"},{class:63,label:"tv"},{class:64,label:"laptop"},{class:65,label:"mouse"},{class:66,label:"remote"},{class:67,label:"keyboard"},{class:68,label:"cell phone"},{class:69,label:"microwave"},{class:70,label:"oven"},{class:71,label:"toaster"},{class:72,label:"sink"},{class:73,label:"refrigerator"},{class:74,label:"book"},{class:75,label:"clock"},{class:76,label:"vase"},{class:77,label:"scissors"},{class:78,label:"teddy bear"},{class:79,label:"hair drier"},{class:80,label:"toothbrush"}];var L0,Ke=0,l5=[],b3=0,c5=Number.MAX_SAFE_INTEGER;async function g3(e){if(k.initial&&(L0=null),L0)e.debug&&h("cached model:",L0.modelUrl);else{L0=await C(e.object.modelPath);let t=L0!=null&&L0.executor?Object.values(L0.modelSignature.inputs):void 0;Ke=Array.isArray(t)?parseInt(t[0].tensorShape.dim[2].size):0}return L0}async function Os(e,t,n){if(!e)return[];let o={},r=[],s=await e.array();o.squeeze=N0.squeeze(e);let A=N0.split(o.squeeze,6,1);o.stack=N0.stack([A[1],A[0],A[3],A[2]],1),o.boxes=N0.squeeze(o.stack),o.scores=N0.squeeze(A[4]),o.classes=N0.squeeze(A[5]),N0.dispose([e,...A]),o.nms=await N0.image.nonMaxSuppressionAsync(o.boxes,o.scores,n.object.maxDetected,n.object.iouThreshold,n.object.minConfidence||0);let a=await o.nms.data(),l=0;for(let c of Array.from(a)){let x=Math.trunc(100*s[0][c][4])/100,i=s[0][c][5];if(Number.isNaN(i))continue;let f=x2[i].label,[d,m]=[s[0][c][0]/Ke,s[0][c][1]/Ke],p=[d,m,s[0][c][2]/Ke-d,s[0][c][3]/Ke-m],g=[Math.trunc(p[0]*t[0]),Math.trunc(p[1]*t[1]),Math.trunc(p[2]*t[0]),Math.trunc(p[3]*t[1])];r.push({id:l++,score:x,class:i,label:f,box:g,boxRaw:p})}return Object.keys(o).forEach(c=>N0.dispose(o[c])),r}async function d5(e,t){if(!(L0!=null&&L0.executor))return[];let n=(t.object.skipTime||0)>M()-b3,o=c5<(t.object.skipFrames||0);return t.skipAllowed&&n&&o&&l5.length>0?(c5++,l5):(c5=0,new Promise(async r=>{let s=[e.shape[2]||0,e.shape[1]||0],A=N0.image.resizeBilinear(e,[Ke,Ke]),a=t.object.enabled?L0==null?void 0:L0.execute(A,["tower_0/detections"]):null;b3=M(),N0.dispose(A);let l=await Os(a,s,t);l5=l,r(l)}))}var J=D(V());var dt={};we(dt,{connected:()=>y5,kpt:()=>x5});var x5=["head","neck","rightShoulder","rightElbow","rightWrist","chest","leftShoulder","leftElbow","leftWrist","bodyCenter","rightHip","rightKnee","rightAnkle","leftHip","leftKnee","leftAnkle"],y5={leftLeg:["leftHip","leftKnee","leftAnkle"],rightLeg:["rightHip","rightKnee","rightAnkle"],torso:["leftShoulder","rightShoulder","rightHip","leftHip","leftShoulder"],leftArm:["leftShoulder","leftElbow","leftWrist"],rightArm:["rightShoulder","rightElbow","rightWrist"],head:[]};var b0,T3=0,O0={id:0,keypoints:[],box:[0,0,0,0],boxRaw:[0,0,0,0],score:0,annotations:{}},f5=Number.MAX_SAFE_INTEGER;async function v3(e){return k.initial&&(b0=null),b0?e.debug&&h("cached model:",b0.modelUrl):b0=await C(e.body.modelPath),b0}async function Is(e,t){let[n,o]=e.shape,r=J.reshape(e,[o*n]),s=J.max(r,0),A=(await s.data())[0];if(A>t){let a=J.argMax(r,0),l=J.mod(a,n),c=(await l.data())[0],x=J.div(a,n),i=(await x.data())[0];return J.dispose([r,s,a,l,x]),[c,i,A]}return J.dispose([r,s]),[0,0,A]}async function m5(e,t){if(!(b0!=null&&b0.executor))return[];let n=(t.body.skipTime||0)>M()-T3,o=f5<(t.body.skipFrames||0);return t.skipAllowed&&n&&o&&Object.keys(O0.keypoints).length>0?(f5++,[O0]):(f5=0,new Promise(async r=>{let s=J.tidy(()=>{if(!(b0!=null&&b0.inputs[0].shape))return null;let i=J.image.resizeBilinear(e,[b0.inputs[0].shape[2],b0.inputs[0].shape[1]],!1),f=J.mul(i,W.tf2);return J.sub(f,W.tf1)}),A;if(t.body.enabled&&(A=b0==null?void 0:b0.execute(s)),T3=M(),J.dispose(s),A){O0.keypoints.length=0;let i=J.squeeze(A);J.dispose(A);let f=J.unstack(i,2);J.dispose(i);for(let d=0;d(t.body.minConfidence||0)&&O0.keypoints.push({score:Math.round(100*g)/100,part:x5[d],positionRaw:[m/b0.inputs[0].shape[2],p/b0.inputs[0].shape[1]],position:[Math.round(e.shape[2]*m/b0.inputs[0].shape[2]),Math.round(e.shape[1]*p/b0.inputs[0].shape[1])]})}f.forEach(d=>J.dispose(d))}O0.score=O0.keypoints.reduce((i,f)=>f.score>i?f.score:i,0);let a=O0.keypoints.map(i=>i.position[0]),l=O0.keypoints.map(i=>i.position[1]);O0.box=[Math.min(...a),Math.min(...l),Math.max(...a)-Math.min(...a),Math.max(...l)-Math.min(...l)];let c=O0.keypoints.map(i=>i.positionRaw[0]),x=O0.keypoints.map(i=>i.positionRaw[1]);O0.boxRaw=[Math.min(...c),Math.min(...x),Math.max(...c)-Math.min(...c),Math.max(...x)-Math.min(...x)];for(let[i,f]of Object.entries(y5)){let d=[];for(let m=0;mv.part===f[m]),g=O0.keypoints.find(v=>v.part===f[m+1]);p&&g&&p.score>(t.body.minConfidence||0)&&g.score>(t.body.minConfidence||0)&&d.push([p.position,g.position])}O0.annotations[i]=d}r([O0])}))}var ae=D(V());var Cs=["angry","disgust","fear","happy","sad","surprise","neutral"],Y0,xt=[],R3=0,k3=0,p5=Number.MAX_SAFE_INTEGER;async function w3(e){var t;return k.initial&&(Y0=null),Y0?e.debug&&h("cached model:",Y0.modelUrl):Y0=await C((t=e.face.emotion)==null?void 0:t.modelPath),Y0}async function u5(e,t,n,o){var A,a;if(!Y0)return[];let r=p5<(((A=t.face.emotion)==null?void 0:A.skipFrames)||0),s=(((a=t.face.emotion)==null?void 0:a.skipTime)||0)>M()-k3;return t.skipAllowed&&s&&r&&R3===o&&xt[n]&&xt[n].length>0?(p5++,xt[n]):(p5=0,new Promise(async l=>{var x;let c=[];if((x=t.face.emotion)!=null&&x.enabled){let i={},f=Y0!=null&&Y0.inputs[0].shape?Y0.inputs[0].shape[2]:0;i.resize=ae.image.resizeBilinear(e,[f,f],!1),i.channels=ae.mul(i.resize,W.rgb),i.grayscale=ae.sum(i.channels,3,!0),i.grayscaleSub=ae.sub(i.grayscale,W.tf05),i.grayscaleMul=ae.mul(i.grayscaleSub,W.tf2),i.emotion=Y0==null?void 0:Y0.execute(i.grayscaleMul),k3=M();let d=await i.emotion.data();for(let m=0;m(t.face.emotion.minConfidence||0)&&c.push({score:Math.min(.99,Math.trunc(100*d[m])/100),emotion:Cs[m]});c.sort((m,p)=>p.score-m.score),Object.keys(i).forEach(m=>ae.dispose(i[m]))}xt[n]=c,R3=o,l(c)}))}var Ce=D(V());var ie=D(V());var G0,Oe=0,Ls=2.3,h5=te.leftEyeLower0,b5=te.rightEyeLower0,y2={leftBounds:[h5[0],h5[h5.length-1]],rightBounds:[b5[0],b5[b5.length-1]]},f2={upperCenter:3,lowerCenter:4,index:71,numCoordinates:76};async function N3(e){var t,n;return k.initial&&(G0=null),G0?e.debug&&h("cached model:",G0.modelUrl):G0=await C((t=e.face.iris)==null?void 0:t.modelPath),Oe=(G0==null?void 0:G0.executor)&&((n=G0.inputs)==null?void 0:n[0].shape)?G0.inputs[0].shape[2]:0,Oe===-1&&(Oe=64),G0}function yt(e,t,n,o){for(let r=0;r{let t=e[y2.leftBounds[0]][2],n=e[y2.rightBounds[0]][2];return t-n},z3=(e,t,n,o,r,s=!1)=>{let A=st(rt($1([e[n],e[o]]),Ls)),a=l2(A),l=ie.image.cropAndResize(t,[[A.startPoint[1]/r,A.startPoint[0]/r,A.endPoint[1]/r,A.endPoint[0]/r]],[0],[Oe,Oe]);if(s&&k.kernels.includes("flipleftright")){let c=ie.image.flipLeftRight(l);ie.dispose(l),l=c}return{box:A,boxSize:a,crop:l}},S3=(e,t,n,o=!1)=>{let r=[];for(let s=0;s{let o=e[te[`${n}EyeUpper0`][f2.upperCenter]][2],r=e[te[`${n}EyeLower0`][f2.lowerCenter]][2],s=(o+r)/2;return t.map((A,a)=>{let l=s;return a===2?l=o:a===4&&(l=r),[A[0],A[1],l]})};async function O3(e,t,n){if(!(G0!=null&&G0.executor))return e;let{box:o,boxSize:r,crop:s}=z3(e,t,y2.leftBounds[0],y2.leftBounds[1],n,!0),{box:A,boxSize:a,crop:l}=z3(e,t,y2.rightBounds[0],y2.rightBounds[1],n,!0),c=ie.concat([s,l]);ie.dispose(s),ie.dispose(l);let x=G0.execute(c);ie.dispose(c);let i=await x.data();ie.dispose(x);let f=i.slice(0,f2.numCoordinates*3),{rawCoords:d,iris:m}=S3(f,o,r,!0),p=i.slice(f2.numCoordinates*3),{rawCoords:g,iris:v}=S3(p,A,a,!1),T=Ws(e);Math.abs(T)<30?(yt(e,d,"left",null),yt(e,g,"right",null)):T<1?yt(e,d,"left",["EyeUpper0","EyeLower0"]):yt(e,g,"right",["EyeUpper0","EyeLower0"]);let y=j3(e,m,"left"),b=j3(e,v,"right");return e.concat(y).concat(b)}var Fs=[[61,146],[146,91],[91,181],[181,84],[84,17],[17,314],[314,405],[405,321],[321,375],[375,291],[61,185],[185,40],[40,39],[39,37],[37,0],[0,267],[267,269],[269,270],[270,409],[409,291],[78,95],[95,88],[88,178],[178,87],[87,14],[14,317],[317,402],[402,318],[318,324],[324,308],[78,191],[191,80],[80,81],[81,82],[82,13],[13,312],[312,311],[311,310],[310,415],[415,308]],Gs=[[263,249],[249,390],[390,373],[373,374],[374,380],[380,381],[381,382],[382,362],[263,466],[466,388],[388,387],[387,386],[386,385],[385,384],[384,398],[398,362]],Bs=[[276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]],Hs=[[474,475],[475,476],[476,477],[477,474]],Vs=[[33,7],[7,163],[163,144],[144,145],[145,153],[153,154],[154,155],[155,133],[33,246],[246,161],[161,160],[160,159],[159,158],[158,157],[157,173],[173,133]],Ds=[[46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]],Zs=[[469,470],[470,471],[471,472],[472,469]],Xs=[[10,338],[338,297],[297,332],[332,284],[284,251],[251,389],[389,356],[356,454],[454,323],[323,361],[361,288],[288,397],[397,365],[365,379],[379,378],[378,400],[400,377],[377,152],[152,148],[148,176],[176,149],[149,150],[150,136],[136,172],[172,58],[58,132],[132,93],[93,234],[234,127],[127,162],[162,21],[21,54],[54,103],[103,67],[67,109],[109,10]];function Ie(e){let t=e.map(n=>n[0]);return t.push(e[e.length-1][1]),t}var qs={lips:Ie(Fs),leftEye:Ie(Gs),leftEyebrow:Ie(Bs),leftIris:Ie(Hs),rightEye:Ie(Vs),rightEyebrow:Ie(Ds),rightIris:Ie(Zs),faceOval:Ie(Xs)},Us=Object.entries(qs).map(([e,t])=>t.map(n=>[n,e])).flat(),Qa=new Map(Us),L2=[61,146,91,181,84,17,314,405,321,375,291,185,40,39,37,0,267,269,270,409,78,95,88,178,87,14,317,402,318,324,308,191,80,81,82,13,312,311,310,415,76,77,90,180,85,16,315,404,320,307,306,184,74,73,72,11,302,303,304,408,62,96,89,179,86,15,316,403,319,325,292,183,42,41,38,12,268,271,272,407],Je=[33,7,163,144,145,153,154,155,133,246,161,160,159,158,157,173,130,25,110,24,23,22,26,112,243,247,30,29,27,28,56,190,226,31,228,229,230,231,232,233,244,113,225,224,223,222,221,189,35,124,46,53,52,65,143,111,117,118,119,120,121,128,245,156,70,63,105,66,107,55,193],Qe=[263,249,390,373,374,380,381,382,362,466,388,387,386,385,384,398,359,255,339,254,253,252,256,341,463,467,260,259,257,258,286,414,446,261,448,449,450,451,452,453,464,342,445,444,443,442,441,413,265,353,276,283,282,295,372,340,346,347,348,349,350,357,465,383,300,293,334,296,336,285,417];async function L3(e,t){var s,A,a,l,c,x,i,f,d,m;let n={lips:await((A=(s=t.filter(p=>p.size===160))==null?void 0:s[0])==null?void 0:A.data()),irisL:await((l=(a=t.filter(p=>p.size===10))==null?void 0:a[0])==null?void 0:l.data()),eyeL:await((x=(c=t.filter(p=>p.size===142))==null?void 0:c[0])==null?void 0:x.data()),irisR:await((f=(i=t.filter(p=>p.size===10))==null?void 0:i[1])==null?void 0:f.data()),eyeR:await((m=(d=t.filter(p=>p.size===142))==null?void 0:d[1])==null?void 0:m.data())};for(let p of Object.values(n))if(!p)return e;let o=Je.reduce((p,g)=>p+=e[g][2],0)/Je.length;for(let p=0;pp+=e[g][2],0)/Qe.length;for(let p=0;pM()-fe.timestamp,o=fe.skipped<(((c=t.face.detector)==null?void 0:c.skipFrames)||0);!t.skipAllowed||!n||!o||fe.boxes.length===0?(fe.boxes=await i3(e,t),fe.timestamp=M(),fe.skipped=0):fe.skipped++;let r=[],s=[],A=0,a=W2;for(let T=0;TZ.shape[Z.shape.length-1]===1).data();if(w.faceScore=Math.round(100*t0[0])/100,w.faceScore<(((m=t.face.detector)==null?void 0:m.minConfidence)||1)){if(y.confidence=w.faceScore,t.face.mesh.keepInvalid){w.box=nt(y,e),w.boxRaw=ot(y,e),w.score=w.boxScore,w.mesh=y.landmarks.map(Z=>[(y.startPoint[0]+y.endPoint[0])/2+(y.endPoint[0]+y.startPoint[0])*Z[0]/c2(),(y.startPoint[1]+y.endPoint[1])/2+(y.endPoint[1]+y.startPoint[1])*Z[1]/c2()]),w.meshRaw=w.mesh.map(Z=>[Z[0]/(e.shape[2]||1),Z[1]/(e.shape[1]||1),(Z[2]||0)/a]);for(let Z of Object.keys(qe))w.annotations[Z]=[w.mesh[qe[Z]]]}}else{let Z=O.find(G=>G.shape[G.shape.length-1]===1404),U=Ce.reshape(Z,[-1,3]),r0=await U.array();Ce.dispose(U),(p=t.face.attention)!=null&&p.enabled?r0=await L3(r0,O):(g=t.face.iris)!=null&&g.enabled&&(r0=await O3(r0,w.tensor,W2)),w.mesh=n3(r0,y,b,z,W2),w.meshRaw=w.mesh.map(G=>[G[0]/(e.shape[2]||0),G[1]/(e.shape[1]||0),(G[2]||0)/a]);for(let G of Object.keys(te))w.annotations[G]=te[G].map(P0=>w.mesh[P0]);w.score=w.faceScore;let P={...r3(w.mesh,y),confidence:y.confidence,landmarks:y.landmarks};w.box=nt(P,e),w.boxRaw=ot(P,e),s.push(P)}Ce.dispose(O)}else{w.box=nt(y,e),w.boxRaw=ot(y,e),w.score=w.boxScore,w.mesh=y.landmarks.map(O=>[(y.startPoint[0]+y.endPoint[0])/2+(y.endPoint[0]+y.startPoint[0])*O[0]/c2(),(y.startPoint[1]+y.endPoint[1])/2+(y.endPoint[1]+y.startPoint[1])*O[1]/c2()]),w.meshRaw=w.mesh.map(O=>[O[0]/(e.shape[2]||0),O[1]/(e.shape[1]||0),(O[2]||0)/a]);for(let O of Object.keys(qe))w.annotations[O]=[w.mesh[qe[O]]]}w.score>(((v=t.face.detector)==null?void 0:v.minConfidence)||1)?r.push(w):Ce.dispose(w.tensor)}return fe.boxes=s,r}async function F3(e){var t,n,o,r,s,A;return k.initial&&(n0=null),((t=e.face.attention)==null?void 0:t.enabled)&&(n0==null?void 0:n0.signature)&&Object.keys(((n=n0==null?void 0:n0.signature)==null?void 0:n.outputs)||{}).length<6&&(n0=null),n0?e.debug&&h("cached model:",n0.modelUrl):(o=e.face.attention)!=null&&o.enabled?n0=await C(e.face.attention.modelPath):n0=await C((r=e.face.mesh)==null?void 0:r.modelPath),W2=n0.executor&&((s=n0==null?void 0:n0.inputs)==null?void 0:s[0].shape)?(A=n0==null?void 0:n0.inputs)==null?void 0:A[0].shape[2]:256,n0}var G3=Ue,B3=O2;var le=D(V());var k0,Le=[],H3=0,V3=0,M5=Number.MAX_SAFE_INTEGER;async function D3(e){var t;return k.initial&&(k0=null),k0?e.debug&&h("cached model:",k0.modelUrl):k0=await C((t=e.face.description)==null?void 0:t.modelPath),k0}function T5(e){let t=e.image||e.tensor||e;if(!(k0!=null&&k0.inputs[0].shape))return t;let n=le.image.resizeBilinear(t,[k0.inputs[0].shape[2],k0.inputs[0].shape[1]],!1),o=le.mul(n,W.tf255);return le.dispose(n),o}async function v5(e,t,n,o){var a,l,c,x;let r={age:0,gender:"unknown",genderScore:0,descriptor:[]};if(!(k0!=null&&k0.executor))return r;let s=M5<(((a=t.face.description)==null?void 0:a.skipFrames)||0),A=(((l=t.face.description)==null?void 0:l.skipTime)||0)>M()-H3;return t.skipAllowed&&s&&A&&V3===o&&((c=Le==null?void 0:Le[n])==null?void 0:c.age)>0&&((x=Le==null?void 0:Le[n])==null?void 0:x.genderScore)>0?(M5++,Le[n]):(M5=0,new Promise(async i=>{var f;if((f=t.face.description)!=null&&f.enabled){let d=T5(e),m=k0==null?void 0:k0.execute(d);H3=M(),le.dispose(d);let g=await m.find(q=>q.shape[1]===1).data(),v=Math.trunc(200*Math.abs(g[0]-.5))/100;v>(t.face.description.minConfidence||0)&&(r.gender=g[0]<=.5?"female":"male",r.genderScore=Math.min(.99,v));let T=le.argMax(m.find(q=>q.shape[1]===100),1),y=(await T.data())[0];le.dispose(T);let z=await m.find(q=>q.shape[1]===100).data();r.age=Math.round(z[y-1]>z[y+1]?10*y-100*z[y-1]:10*y+100*z[y+1])/10,(Number.isNaN(g[0])||Number.isNaN(z[0]))&&h("faceres error:",{model:k0,result:m});let w=m.find(q=>q.shape[1]===1024),O=w?await w.data():[];r.descriptor=Array.from(O),m.forEach(q=>le.dispose(q))}Le[n]=r,V3=o,i(r)}))}var ft=D(V());var ne,R5=[],Ks=["white","black","asian","indian","other"],Js=[15,23,28,35.5,45.5,55.5,65],Z3=0,X3=0,k5=Number.MAX_SAFE_INTEGER;async function q3(e){var t;return k.initial&&(ne=null),ne?e.debug&&h("cached model:",ne.modelUrl):ne=await C((t=e.face.gear)==null?void 0:t.modelPath),ne}async function w5(e,t,n,o){var A,a;if(!ne)return{age:0,gender:"unknown",genderScore:0,race:[]};let r=k5<(((A=t.face.gear)==null?void 0:A.skipFrames)||0),s=(((a=t.face.gear)==null?void 0:a.skipTime)||0)>M()-X3;return t.skipAllowed&&s&&r&&Z3===o&&R5[n]?(k5++,R5[n]):(k5=0,new Promise(async l=>{var v,T;if(!(ne!=null&&ne.inputs[0].shape))return;let c={},x=[[0,.1,.9,.9]];c.resize=ft.image.cropAndResize(e,x,[0],[ne.inputs[0].shape[2],ne.inputs[0].shape[1]]);let i={age:0,gender:"unknown",genderScore:0,race:[]};(v=t.face.gear)!=null&&v.enabled&&([c.age,c.gender,c.race]=ne.execute(c.resize,["age_output","gender_output","race_output"]));let f=await c.gender.data();i.gender=f[0]>f[1]?"male":"female",i.genderScore=Math.round(100*(f[0]>f[1]?f[0]:f[1]))/100;let d=await c.race.data();for(let y=0;y(((T=t.face.gear)==null?void 0:T.minConfidence)||.2)&&i.race.push({score:Math.round(100*d[y])/100,race:Ks[y]});i.race.sort((y,b)=>b.score-y.score);let p=Array.from(await c.age.data()).map((y,b)=>[Js[b],y]).sort((y,b)=>b[1]-y[1]),g=p[0][0];for(let y=1;yft.dispose(c[y])),R5[n]=i,Z3=o,X3=M(),l(i)}))}var F=D(V());var J3=D(V());function mt(e){return[Math.abs(e.endPoint[0]-e.startPoint[0]),Math.abs(e.endPoint[1]-e.startPoint[1])]}function F2(e){return[e.startPoint[0]+(e.endPoint[0]-e.startPoint[0])/2,e.startPoint[1]+(e.endPoint[1]-e.startPoint[1])/2]}function Q3(e,t,n){let o=t.shape[1],r=t.shape[2],s=[[e.startPoint[1]/o,e.startPoint[0]/r,e.endPoint[1]/o,e.endPoint[0]/r]];return J3.image.cropAndResize(t,s,[0],n)}function _3(e,t){let n=[e.startPoint[0]*t[0],e.startPoint[1]*t[1]],o=[e.endPoint[0]*t[0],e.endPoint[1]*t[1]],r=e.palmLandmarks.map(s=>[s[0]*t[0],s[1]*t[1]]);return{startPoint:n,endPoint:o,palmLandmarks:r,confidence:e.confidence}}function pt(e,t=1.5){let n=F2(e),o=mt(e),r=[t*o[0]/2,t*o[1]/2],s=[n[0]-r[0],n[1]-r[1]],A=[n[0]+r[0],n[1]+r[1]];return{startPoint:s,endPoint:A,palmLandmarks:e.palmLandmarks}}function ut(e){let t=F2(e),n=mt(e),r=Math.max(...n)/2,s=[t[0]-r,t[1]-r],A=[t[0]+r,t[1]+r];return{startPoint:s,endPoint:A,palmLandmarks:e.palmLandmarks}}function Qs(e){return e-2*Math.PI*Math.floor((e+Math.PI)/(2*Math.PI))}function $3(e,t){let n=Math.PI/2-Math.atan2(-(t[1]-e[1]),t[0]-e[0]);return Qs(n)}var Y3=(e,t)=>[[1,0,e],[0,1,t],[0,0,1]];function We(e,t){let n=0;for(let o=0;o[A.x,A.y]),this.anchorsTensor=F.tensor2d(this.anchors),this.inputSize=((s=(r=(o=(n=this==null?void 0:this.model)==null?void 0:n.inputs)==null?void 0:o[0])==null?void 0:r.shape)==null?void 0:s[2])||0,this.inputSizeTensor=F.tensor1d([this.inputSize,this.inputSize]),this.doubleInputSizeTensor=F.tensor1d([this.inputSize*2,this.inputSize*2])}normalizeBoxes(t){let n={};n.boxOffsets=F.slice(t,[0,0],[-1,2]),n.boxSizes=F.slice(t,[0,2],[-1,2]),n.div=F.div(n.boxOffsets,this.inputSizeTensor),n.boxCenterPoints=F.add(n.div,this.anchorsTensor),n.halfBoxSizes=F.div(n.boxSizes,this.doubleInputSizeTensor),n.sub=F.sub(n.boxCenterPoints,n.halfBoxSizes),n.startPoints=F.mul(n.sub,this.inputSizeTensor),n.add=F.add(n.boxCenterPoints,n.halfBoxSizes),n.endPoints=F.mul(n.add,this.inputSizeTensor);let o=F.concat2d([n.startPoints,n.endPoints],1);return Object.keys(n).forEach(r=>F.dispose(n[r])),o}normalizeLandmarks(t,n){let o={};o.reshape=F.reshape(t,[-1,7,2]),o.div=F.div(o.reshape,this.inputSizeTensor),o.landmarks=F.add(o.div,this.anchors[n]?this.anchors[n]:0);let r=F.mul(o.landmarks,this.inputSizeTensor);return Object.keys(o).forEach(s=>F.dispose(o[s])),r}async predict(t,n){var a;let o={};o.resize=F.image.resizeBilinear(t,[this.inputSize,this.inputSize]),o.div=F.div(o.resize,W.tf127),o.image=F.sub(o.div,W.tf1),o.batched=this.model.execute(o.image),o.predictions=F.squeeze(o.batched),o.slice=F.slice(o.predictions,[0,0],[-1,1]),o.sigmoid=F.sigmoid(o.slice),o.scores=F.squeeze(o.sigmoid);let r=await o.scores.data();o.boxes=F.slice(o.predictions,[0,1],[-1,4]),o.norm=this.normalizeBoxes(o.boxes),o.nms=await F.image.nonMaxSuppressionAsync(o.norm,o.scores,3*(((a=n.hand)==null?void 0:a.maxDetected)||1),n.hand.iouThreshold,n.hand.minConfidence);let s=await o.nms.array(),A=[];for(let l of s){let c={};c.box=F.slice(o.norm,[l,0],[1,-1]),c.slice=F.slice(o.predictions,[l,5],[1,14]),c.norm=this.normalizeLandmarks(c.slice,l),c.palmLandmarks=F.reshape(c.norm,[-1,2]);let x=await c.box.data(),i=x.slice(0,2),f=x.slice(2,4),d=await c.palmLandmarks.array(),m={startPoint:i,endPoint:f,palmLandmarks:d,confidence:r[l]},p=_3(m,[(t.shape[2]||1)/this.inputSize,(t.shape[1]||0)/this.inputSize]);A.push(p),Object.keys(c).forEach(g=>F.dispose(c[g]))}return Object.keys(o).forEach(l=>F.dispose(o[l])),A}};var B0=D(V());var tA=5,on=1.65,rn=[0,5,9,13,17,1,2],nA=0,oA=2,sn=0,bt=class{constructor(t,n){R(this,"handDetector");R(this,"handPoseModel");R(this,"inputSize");R(this,"storedBoxes");R(this,"skipped");R(this,"detectedHands");var o,r,s;this.handDetector=t,this.handPoseModel=n,this.inputSize=((s=(r=(o=this.handPoseModel)==null?void 0:o.inputs)==null?void 0:r[0].shape)==null?void 0:s[2])||0,this.storedBoxes=[],this.skipped=Number.MAX_SAFE_INTEGER,this.detectedHands=0}calculateLandmarksBoundingBox(t){let n=t.map(A=>A[0]),o=t.map(A=>A[1]),r=[Math.min(...n),Math.min(...o)],s=[Math.max(...n),Math.max(...o)];return{startPoint:r,endPoint:s}}getBoxForPalmLandmarks(t,n){let o=t.map(s=>z5([...s,1],n)),r=this.calculateLandmarksBoundingBox(o);return pt(ut(r),tA)}getBoxForHandLandmarks(t){let n=this.calculateLandmarksBoundingBox(t),o=pt(ut(n),on);o.palmLandmarks=[];for(let r=0;r[A[0]*(d[0]-this.inputSize/2),A[1]*(d[1]-this.inputSize/2),A[2]*d[2]]),l=E5(o,[0,0]),c=a.map(d=>[...z5(d,l),d[2]]),x=en(r),i=[...F2(n),1],f=[We(i,x[0]),We(i,x[1])];return c.map(d=>[Math.trunc(d[0]+f[0]),Math.trunc(d[1]+f[1]),Math.trunc(d[2])])}async estimateHands(t,n){let o=!1,r,s=(n.hand.skipTime||0)>M()-sn,A=this.skipped<(n.hand.skipFrames||0);n.skipAllowed&&s&&A&&(r=await this.handDetector.predict(t,n),this.skipped=0),n.skipAllowed&&this.skipped++,r&&r.length>0&&(r.length!==this.detectedHands&&this.detectedHands!==n.hand.maxDetected||!n.hand.landmarks)&&(this.detectedHands=0,this.storedBoxes=[...r],this.storedBoxes.length>0&&(o=!0));let a=[];for(let l=0;l=n.hand.minConfidence/4){let z=B0.reshape(y,[-1,3]),w=await z.array();B0.dispose(y),B0.dispose(z);let O=this.transformRawCoords(w,p,x,m),q=this.getBoxForHandLandmarks(O);this.storedBoxes[l]={...q,confidence:b};let t0={landmarks:O,confidence:b,boxConfidence:c.confidence,fingerConfidence:b,box:{topLeft:q.startPoint,bottomRight:q.endPoint}};a.push(t0)}else this.storedBoxes[l]=null;B0.dispose(y)}else{let x=pt(ut(c),on),i={confidence:c.confidence,boxConfidence:c.confidence,fingerConfidence:0,box:{topLeft:x.startPoint,bottomRight:x.endPoint},landmarks:[]};a.push(i)}}return this.storedBoxes=this.storedBoxes.filter(l=>l!==null),this.detectedHands=a.length,a.length>n.hand.maxDetected&&(a.length=n.hand.maxDetected),a}};var I0={thumb:0,index:1,middle:2,ring:3,pinky:4,all:[0,1,2,3,4],nameMapping:{0:"thumb",1:"index",2:"middle",3:"ring",4:"pinky"},pointsMapping:{0:[[0,1],[1,2],[2,3],[3,4]],1:[[0,5],[5,6],[6,7],[7,8]],2:[[0,9],[9,10],[10,11],[11,12]],3:[[0,13],[13,14],[14,15],[15,16]],4:[[0,17],[17,18],[18,19],[19,20]]},getName:e=>I0.nameMapping[e],getPoints:e=>I0.pointsMapping[e]},Ge={none:0,half:1,full:2,nameMapping:{0:"none",1:"half",2:"full"},getName:e=>Ge.nameMapping[e]},A0={verticalUp:0,verticalDown:1,horizontalLeft:2,horizontalRight:3,diagonalUpRight:4,diagonalUpLeft:5,diagonalDownRight:6,diagonalDownLeft:7,nameMapping:{0:"verticalUp",1:"verticalDown",2:"horizontalLeft",3:"horizontalRight",4:"diagonalUpRight",5:"diagonalUpLeft",6:"diagonalDownRight",7:"diagonalDownLeft"},getName:e=>A0.nameMapping[e]},Fe=class{constructor(t){R(this,"name");R(this,"curls");R(this,"directions");R(this,"weights");R(this,"weightsRelative");this.name=t,this.curls={},this.directions={},this.weights=[1,1,1,1,1],this.weightsRelative=[1,1,1,1,1]}curl(t,n,o){typeof this.curls[t]=="undefined"&&(this.curls[t]=[]),this.curls[t].push([n,o])}direction(t,n,o){this.directions[t]||(this.directions[t]=[]),this.directions[t].push([n,o])}weight(t,n){this.weights[t]=n;let o=this.weights.reduce((r,s)=>r+s,0);this.weightsRelative=this.weights.map(r=>r*5/o)}matchAgainst(t,n){let o=0;for(let r in t){let s=t[r],A=this.curls[r];if(typeof A=="undefined"){o+=this.weightsRelative[r];continue}for(let[a,l]of A)if(s===a){o+=l*this.weightsRelative[r];break}}for(let r in n){let s=n[r],A=this.directions[r];if(typeof A=="undefined"){o+=this.weightsRelative[r];continue}for(let[a,l]of A)if(s===a){o+=l*this.weightsRelative[r];break}}return o/10}};var{thumb:ce,index:ge,middle:Me,ring:_e,pinky:$e}=I0,{none:de,half:sA,full:xe}=Ge,{verticalUp:m2,verticalDown:h7,horizontalLeft:S5,horizontalRight:AA,diagonalUpRight:aA,diagonalUpLeft:p2,diagonalDownRight:b7,diagonalDownLeft:g7}=A0,Be=new Fe("thumbs up");Be.curl(ce,de,1);Be.direction(ce,m2,1);Be.direction(ce,p2,.25);Be.direction(ce,aA,.25);for(let e of[I0.index,I0.middle,I0.ring,I0.pinky])Be.curl(e,xe,1),Be.direction(e,S5,1),Be.direction(e,AA,1);var f0=new Fe("victory");f0.curl(ce,sA,.5);f0.curl(ce,de,.5);f0.direction(ce,m2,1);f0.direction(ce,p2,1);f0.curl(ge,de,1);f0.direction(ge,m2,.75);f0.direction(ge,p2,1);f0.curl(Me,de,1);f0.direction(Me,m2,1);f0.direction(Me,p2,.75);f0.curl(_e,xe,1);f0.direction(_e,m2,.2);f0.direction(_e,p2,1);f0.direction(_e,S5,.2);f0.curl($e,xe,1);f0.direction($e,m2,.2);f0.direction($e,p2,1);f0.direction($e,S5,.2);f0.weight(ge,2);f0.weight(Me,2);var He=new Fe("point");He.curl(ce,xe,1);He.curl(ge,de,.5);He.curl(Me,xe,.5);He.curl(_e,xe,.5);He.curl($e,xe,.5);He.weight(ge,2);He.weight(Me,2);var Ve=new Fe("middle finger");Ve.curl(ce,de,1);Ve.curl(ge,xe,.5);Ve.curl(Me,xe,.5);Ve.curl(_e,xe,.5);Ve.curl($e,xe,.5);Ve.weight(ge,2);Ve.weight(Me,2);var u2=new Fe("open palm");u2.curl(ce,de,.75);u2.curl(ge,de,.75);u2.curl(Me,de,.75);u2.curl(_e,de,.75);u2.curl($e,de,.75);var An=[Be,f0,He,Ve,u2];var iA=.7,e2={HALF_CURL_START_LIMIT:60,NO_CURL_START_LIMIT:130,DISTANCE_VOTE_POWER:1.1,SINGLE_ANGLE_VOTE_POWER:.9,TOTAL_ANGLE_VOTE_POWER:1.6};function an(e,t,n,o){let r=(t-o)/(e-n),s=Math.atan(r)*180/Math.PI;return s<=0?s=-s:s>0&&(s=180-s),s}function cn(e,t){if(!e||!t)return[0,0];let n=an(e[0],e[1],t[0],t[1]);if(e.length===2)return n;let o=an(e[1],e[2],t[1],t[2]);return[n,o]}function ln(e,t=1){let n=0,o=0,r=0;return e>=75&&e<=105?n=1*t:e>=25&&e<=155?o=1*t:r=1*t,[n,o,r]}function lA(e,t,n){let o=e[0]-t[0],r=e[0]-n[0],s=t[0]-n[0],A=e[1]-t[1],a=e[1]-n[1],l=t[1]-n[1],c=e[2]-t[2],x=e[2]-n[2],i=t[2]-n[2],f=Math.sqrt(o*o+A*A+c*c),d=Math.sqrt(r*r+a*a+x*x),m=Math.sqrt(s*s+l*l+i*i),p=(m*m+f*f-d*d)/(2*m*f);p>1?p=1:p<-1&&(p=-1);let g=Math.acos(p);g=57.2958*g%180;let v;return g>e2.NO_CURL_START_LIMIT?v=Ge.none:g>e2.HALF_CURL_START_LIMIT?v=Ge.half:v=Ge.full,v}function dn(e,t,n,o){let r;return o===Math.abs(e)?e>0?r=A0.horizontalLeft:r=A0.horizontalRight:o===Math.abs(t)?t>0?r=A0.horizontalLeft:r=A0.horizontalRight:n>0?r=A0.horizontalLeft:r=A0.horizontalRight,r}function xn(e,t,n,o){let r;return o===Math.abs(e)?e<0?r=A0.verticalDown:r=A0.verticalUp:o===Math.abs(t)?t<0?r=A0.verticalDown:r=A0.verticalUp:n<0?r=A0.verticalDown:r=A0.verticalUp,r}function cA(e,t,n,o,r,s,A,a){let l,c=xn(e,t,n,o),x=dn(r,s,A,a);return c===A0.verticalUp?x===A0.horizontalLeft?l=A0.diagonalUpLeft:l=A0.diagonalUpRight:x===A0.horizontalLeft?l=A0.diagonalDownLeft:l=A0.diagonalDownRight,l}function dA(e,t,n,o){let r=e[0]-t[0],s=e[0]-n[0],A=t[0]-n[0],a=e[1]-t[1],l=e[1]-n[1],c=t[1]-n[1],x=Math.max(Math.abs(r),Math.abs(s),Math.abs(A)),i=Math.max(Math.abs(a),Math.abs(l),Math.abs(c)),f=0,d=0,m=0,p=i/(x+1e-5);p>1.5?f+=e2.DISTANCE_VOTE_POWER:p>.66?d+=e2.DISTANCE_VOTE_POWER:m+=e2.DISTANCE_VOTE_POWER;let g=Math.sqrt(r*r+a*a),v=Math.sqrt(s*s+l*l),T=Math.sqrt(A*A+c*c),y=Math.max(g,v,T),b=e[0],z=e[1],w=n[0],O=n[1];y===g?(w=n[0],O=n[1]):y===T&&(b=t[0],z=t[1]);let Z=cn([b,z],[w,O]),U=ln(Z,e2.TOTAL_ANGLE_VOTE_POWER);f+=U[0],d+=U[1],m+=U[2];for(let P of o){let G=ln(P,e2.SINGLE_ANGLE_VOTE_POWER);f+=G[0],d+=G[1],m+=G[2]}let r0;return f===Math.max(f,d,m)?r0=xn(l,a,c,i):m===Math.max(d,m)?r0=dn(s,r,A,x):r0=cA(l,a,c,i,s,r,A,x),r0}function yn(e){let t=[],n=[],o=[],r=[];if(!e)return{curls:o,directions:r};for(let s of I0.all){let A=I0.getPoints(s),a=[],l=[];for(let c of A){let x=e[c[0]],i=e[c[1]],f=cn(x,i),d=f[0],m=f[1];a.push(d),l.push(m)}t.push(a),n.push(l)}for(let s of I0.all){let A=s===I0.thumb?1:0,a=I0.getPoints(s),l=e[a[A][0]],c=e[a[A+1][1]],x=e[a[3][1]],i=lA(l,c,x),f=dA(l,c,x,t[s].slice(A));o[s]=i,r[s]=f}return{curls:o,directions:r}}function gt(e){if(!e||e.length===0)return null;let t=yn(e),n={};for(let o of I0.all)n[I0.getName(o)]={curl:Ge.getName(t.curls[o]),direction:A0.getName(t.directions[o])};return n}function fn(e){let t=[];if(!e||e.length===0)return t;let n=yn(e);for(let o of An){let r=o.matchAgainst(n.curls,n.directions);r>=iA&&t.push({name:o.name,confidence:r})}return t}var mn={thumb:[1,2,3,4],index:[5,6,7,8],middle:[9,10,11,12],ring:[13,14,15,16],pinky:[17,18,19,20],palm:[0]},t2,n2,pn;async function N5(e,t){let n=await pn.estimateHands(e,t);if(!n)return[];let o=[];for(let r=0;rn[r].landmarks[i]);let A=n[r].landmarks,a=[Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,0,0],l=[0,0,0,0];if(A&&A.length>0){for(let x of A)x[0]a[2]&&(a[2]=x[0]),x[1]>a[3]&&(a[3]=x[1]);a[2]-=a[0],a[3]-=a[1],l=[a[0]/(e.shape[2]||0),a[1]/(e.shape[1]||0),a[2]/(e.shape[2]||0),a[3]/(e.shape[1]||0)]}else a=n[r].box?[Math.trunc(Math.max(0,n[r].box.topLeft[0])),Math.trunc(Math.max(0,n[r].box.topLeft[1])),Math.trunc(Math.min(e.shape[2]||0,n[r].box.bottomRight[0])-Math.max(0,n[r].box.topLeft[0])),Math.trunc(Math.min(e.shape[1]||0,n[r].box.bottomRight[1])-Math.max(0,n[r].box.topLeft[1]))]:[0,0,0,0],l=[n[r].box.topLeft[0]/(e.shape[2]||0),n[r].box.topLeft[1]/(e.shape[1]||0),(n[r].box.bottomRight[0]-n[r].box.topLeft[0])/(e.shape[2]||0),(n[r].box.bottomRight[1]-n[r].box.topLeft[1])/(e.shape[1]||0)];let c=gt(A);o.push({id:r,score:Math.round(100*n[r].confidence)/100,boxScore:Math.round(100*n[r].boxConfidence)/100,fingerScore:Math.round(100*n[r].fingerConfidence)/100,label:"hand",box:a,boxRaw:l,keypoints:A,annotations:s,landmarks:c})}return o}async function O5(e){var n,o;k.initial&&(t2=null,n2=null),!t2||!n2?[t2,n2]=await Promise.all([e.hand.enabled?C((n=e.hand.detector)==null?void 0:n.modelPath):null,e.hand.landmarks?C((o=e.hand.skeleton)==null?void 0:o.modelPath):null]):(e.debug&&h("cached model:",t2.modelUrl),e.debug&&h("cached model:",n2.modelUrl));let t=t2?new ht(t2):void 0;return t&&n2&&(pn=new bt(t,n2)),[t2,n2]}var Q=D(V());var c0=[null,null],xA=["StatefulPartitionedCall/Postprocessor/Slice","StatefulPartitionedCall/Postprocessor/ExpandDims_1"],De=[[0,0],[0,0]],yA=["hand","fist","pinch","point","face","tip","pinchtip"],hn=4,bn=1.6,fA=512,mA=1.4,Mt=Number.MAX_SAFE_INTEGER,I5=0,Te=[0,0],l0={boxes:[],hands:[]},gn={thumb:[1,2,3,4],index:[5,6,7,8],middle:[9,10,11,12],ring:[13,14,15,16],pinky:[17,18,19,20],base:[0],palm:[0,17,13,9,5,1,0]};async function Mn(e){var t;if(k.initial&&(c0[0]=null),c0[0])e.debug&&h("cached model:",c0[0].modelUrl);else{Tt(["tensorlistreserve","enter","tensorlistfromtensor","merge","loopcond","switch","exit","tensorliststack","nextiteration","tensorlistsetitem","tensorlistgetitem","reciprocal","shape","split","where"],e),c0[0]=await C((t=e.hand.detector)==null?void 0:t.modelPath);let n=c0[0].executor?Object.values(c0[0].modelSignature.inputs):void 0;De[0][0]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[1].size):0,De[0][1]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[2].size):0}return c0[0]}async function Tn(e){var t;if(k.initial&&(c0[1]=null),c0[1])e.debug&&h("cached model:",c0[1].modelUrl);else{c0[1]=await C((t=e.hand.skeleton)==null?void 0:t.modelPath);let n=c0[1].executor?Object.values(c0[1].modelSignature.inputs):void 0;De[1][0]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[1].size):0,De[1][1]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[2].size):0}return c0[1]}async function pA(e,t){let n=[];if(!e||!c0[0])return n;let o={},r=(e.shape[2]||1)/(e.shape[1]||1),s=Math.min(Math.round((e.shape[1]||0)/8)*8,fA),A=Math.round(s*r/8)*8;o.resize=Q.image.resizeBilinear(e,[s,A]),o.cast=Q.cast(o.resize,"int32"),[o.rawScores,o.rawBoxes]=await c0[0].executeAsync(o.cast,xA),o.boxes=Q.squeeze(o.rawBoxes,[0,2]),o.scores=Q.squeeze(o.rawScores,[0]);let a=Q.unstack(o.scores,1);Q.dispose(a[hn]),a.splice(hn,1),o.filtered=Q.stack(a,1),Q.dispose(a),o.max=Q.max(o.filtered,1),o.argmax=Q.argMax(o.filtered,1);let l=0;o.nms=await Q.image.nonMaxSuppressionAsync(o.boxes,o.max,(t.hand.maxDetected||0)+1,t.hand.iouThreshold||0,t.hand.minConfidence||1);let c=await o.nms.data(),x=await o.max.data(),i=await o.argmax.data();for(let f of Array.from(c)){let d=Q.slice(o.boxes,f,1),m=await d.data();Q.dispose(d);let p=[m[1],m[0],m[3]-m[1],m[2]-m[0]],g=it(p,mA),v=[Math.trunc(p[0]*Te[0]),Math.trunc(p[1]*Te[1]),Math.trunc(p[2]*Te[0]),Math.trunc(p[3]*Te[1])],T=x[f],y=yA[i[f]],b={id:l++,score:T,box:v,boxRaw:g,label:y};n.push(b)}return Object.keys(o).forEach(f=>Q.dispose(o[f])),n.sort((f,d)=>d.score-f.score),n.length>(t.hand.maxDetected||1)&&(n.length=t.hand.maxDetected||1),n}async function C5(e,t,n){let o={id:t.id,score:Math.round(100*t.score)/100,boxScore:Math.round(100*t.score)/100,fingerScore:0,box:t.box,boxRaw:t.boxRaw,label:t.label,keypoints:[],landmarks:{},annotations:{}};if(e&&c0[1]&&n.hand.landmarks&&t.score>(n.hand.minConfidence||0)){let r={},s=[t.boxRaw[1],t.boxRaw[0],t.boxRaw[3]+t.boxRaw[1],t.boxRaw[2]+t.boxRaw[0]];r.crop=Q.image.cropAndResize(e,[s],[0],[De[1][0],De[1][1]],"bilinear"),r.div=Q.div(r.crop,W.tf255),[r.score,r.keypoints]=c0[1].execute(r.div,["Identity_1","Identity"]);let A=(await r.score.data())[0],a=(100-Math.trunc(100/(1+Math.exp(A))))/100;if(a>=(n.hand.minConfidence||0)){o.fingerScore=a,r.reshaped=Q.reshape(r.keypoints,[-1,3]);let x=(await r.reshaped.array()).map(i=>[i[0]/De[1][1],i[1]/De[1][0],i[2]||0]).map(i=>[i[0]*t.boxRaw[2],i[1]*t.boxRaw[3],i[2]||0]);o.keypoints=x.map(i=>[Te[0]*(i[0]+t.boxRaw[0]),Te[1]*(i[1]+t.boxRaw[1]),i[2]||0]),o.landmarks=gt(o.keypoints);for(let i of Object.keys(gn))o.annotations[i]=gn[i].map(f=>o.landmarks&&o.keypoints[f]?o.keypoints[f]:null)}Object.keys(r).forEach(l=>Q.dispose(r[l]))}return o}async function L5(e,t){var r,s;if(!((r=c0[0])!=null&&r.executor)||!((s=c0[1])!=null&&s.executor)||!c0[0].inputs[0].shape||!c0[1].inputs[0].shape)return[];Te=[e.shape[2]||0,e.shape[1]||0],Mt++;let n=(t.hand.skipTime||0)>M()-I5,o=Mt<(t.hand.skipFrames||0);return t.skipAllowed&&n&&o?l0.hands:new Promise(async A=>{let a=3*(t.hand.skipTime||0)>M()-I5,l=Mt<3*(t.hand.skipFrames||0);t.skipAllowed&&l0.hands.length===t.hand.maxDetected?l0.hands=await Promise.all(l0.boxes.map(x=>C5(e,x,t))):t.skipAllowed&&a&&l&&l0.hands.length>0?l0.hands=await Promise.all(l0.boxes.map(x=>C5(e,x,t))):(l0.boxes=await pA(e,t),I5=M(),l0.hands=await Promise.all(l0.boxes.map(x=>C5(e,x,t))),Mt=0);let c=[...l0.boxes];if(l0.boxes.length=0,t.cacheSensitivity>0)for(let x=0;x.05&&i.box[3]/(e.shape[1]||1)>.05&&l0.hands[x].fingerScore&&l0.hands[x].fingerScore>(t.hand.minConfidence||0)){let f=it(i.box,bn),d=it(i.boxRaw,bn);l0.boxes.push({...c[x],box:f,boxRaw:d})}}for(let x=0;xM()-Rn;return t.skipAllowed&&s&&r&&Pn===o&&W5[n]?(kn++,W5[n]):new Promise(async l=>{var x;let c=[];if(((x=t.face.insightface)==null?void 0:x.enabled)&&(H0==null?void 0:H0.inputs[0].shape)){let i={};i.crop=vt.image.resizeBilinear(e,[H0.inputs[0].shape[2],H0.inputs[0].shape[1]],!1),i.data=H0.execute(i.crop);let f=await i.data.data();c=Array.from(f),Object.keys(i).forEach(d=>vt.dispose(i[d]))}W5[n]=c,Pn=o,Rn=M(),l(c)})}var Rt=D(V());var T0,Pt=[],G5=Number.MAX_SAFE_INTEGER,zn=0,Sn=0;async function jn(e){var t;return k.initial&&(T0=null),T0?e.debug&&h("cached model:",T0.modelUrl):T0=await C((t=e.face.liveness)==null?void 0:t.modelPath),T0}async function B5(e,t,n,o){var A,a;if(!(T0!=null&&T0.executor))return 0;let r=(((A=t.face.liveness)==null?void 0:A.skipTime)||0)>M()-Sn,s=G5<(((a=t.face.liveness)==null?void 0:a.skipFrames)||0);return t.skipAllowed&&r&&s&&zn===o&&Pt[n]?(G5++,Pt[n]):(G5=0,new Promise(async l=>{let c=Rt.image.resizeBilinear(e,[T0!=null&&T0.inputs[0].shape?T0.inputs[0].shape[2]:0,T0!=null&&T0.inputs[0].shape?T0.inputs[0].shape[1]:0],!1),x=T0==null?void 0:T0.execute(c),i=(await x.data())[0];Pt[n]=Math.round(100*i)/100,zn=o,Sn=M(),Rt.dispose([c,x]),l(Pt[n])}))}var o0=D(V());var w0;async function H5(e){return!w0||k.initial?w0=await C(e.segmentation.modelPath):e.debug&&h("cached model:",w0.modelUrl),w0}async function On(e,t){var r;if(w0||(w0=await H5(t)),!(w0!=null&&w0.executor)||!((r=w0==null?void 0:w0.inputs)!=null&&r[0].shape))return null;let n={};n.resize=o0.image.resizeBilinear(e,[w0.inputs[0].shape?w0.inputs[0].shape[1]:0,w0.inputs[0].shape?w0.inputs[0].shape[2]:0],!1),n.norm=o0.div(n.resize,W.tf255),n.res=w0.execute(n.norm),n.squeeze=o0.squeeze(n.res,0),[n.bgRaw,n.fgRaw]=o0.unstack(n.squeeze,2),n.fg=o0.softmax(n.fgRaw),n.mul=o0.mul(n.fg,W.tf255),n.expand=o0.expandDims(n.mul,2),n.output=o0.image.resizeBilinear(n.expand,[e.shape[1],e.shape[2]]);let o;switch(t.segmentation.mode||"default"){case"default":n.input=o0.squeeze(e),n.concat=o0.concat([n.input,n.output],-1),o=o0.cast(n.concat,"int32");break;case"alpha":o=o0.cast(n.output,"int32");break;default:o=o0.tensor(0)}return Object.keys(n).forEach(s=>o0.dispose(n[s])),o}var kt=D(V());var V0,V5=[],Cn=0,Ln=0,Wn=Number.MAX_SAFE_INTEGER;async function Fn(e){var t;return k.initial&&(V0=null),V0?e.debug&&h("cached model:",V0.modelUrl):V0=await C((t=e.face.mobilefacenet)==null?void 0:t.modelPath),V0}async function D5(e,t,n,o){var A,a;if(!(V0!=null&&V0.executor))return[];let r=Wn<(((A=t.face.mobilefacenet)==null?void 0:A.skipFrames)||0),s=(((a=t.face.mobilefacenet)==null?void 0:a.skipTime)||0)>M()-Ln;return t.skipAllowed&&s&&r&&Cn===o&&V5[n]?(Wn++,V5[n]):new Promise(async l=>{var x;let c=[];if(((x=t.face.mobilefacenet)==null?void 0:x.enabled)&&(V0==null?void 0:V0.inputs[0].shape)){let i={};i.crop=kt.image.resizeBilinear(e,[V0.inputs[0].shape[2],V0.inputs[0].shape[1]],!1),i.data=V0.execute(i.crop);let f=await i.data.data();c=Array.from(f),Object.keys(i).forEach(d=>kt.dispose(i[d]))}V5[n]=c,Cn=o,Ln=M(),l(c)})}var Zn=D(V());var G2={};we(G2,{connected:()=>Et,horizontal:()=>Z5,kpt:()=>wt,relative:()=>q5,vertical:()=>X5});var wt=["nose","leftEye","rightEye","leftEar","rightEar","leftShoulder","rightShoulder","leftElbow","rightElbow","leftWrist","rightWrist","leftHip","rightHip","leftKnee","rightKnee","leftAnkle","rightAnkle"],Z5=[["leftEye","rightEye"],["leftEar","rightEar"],["leftShoulder","rightShoulder"],["leftElbow","rightElbow"],["leftWrist","rightWrist"],["leftHip","rightHip"],["leftKnee","rightKnee"],["leftAnkle","rightAnkle"]],X5=[["leftKnee","leftShoulder"],["rightKnee","rightShoulder"],["leftAnkle","leftKnee"],["rightAnkle","rightKnee"]],q5=[[["leftHip","rightHip"],["leftShoulder","rightShoulder"]],[["leftElbow","rightElbow"],["leftShoulder","rightShoulder"]]],Et={leftLeg:["leftHip","leftKnee","leftAnkle"],rightLeg:["rightHip","rightKnee","rightAnkle"],torso:["leftShoulder","rightShoulder","rightHip","leftHip","leftShoulder"],leftArm:["leftShoulder","leftElbow","leftWrist"],rightArm:["rightShoulder","rightElbow","rightWrist"],head:[]};var Ze=D(V()),Bn=.005,D0={keypoints:[],padding:[[0,0],[0,0],[0,0],[0,0]]};function U5(e){for(let t of Z5){let n=e.keypoints.findIndex(r=>r.part===t[0]),o=e.keypoints.findIndex(r=>r.part===t[1]);if(e.keypoints[n]&&e.keypoints[o]&&e.keypoints[n].position[0]r&&r.part===t[0]),o=e.keypoints.findIndex(r=>r&&r.part===t[1]);e.keypoints[n]&&e.keypoints[o]&&e.keypoints[n].position[1]c&&c.part===t[0]),r=e.keypoints.findIndex(c=>c&&c.part===t[1]),s=e.keypoints.findIndex(c=>c&&c.part===n[0]),A=e.keypoints.findIndex(c=>c&&c.part===n[1]);if(!e.keypoints[s]||!e.keypoints[A])continue;let a=e.keypoints[o]?[Math.abs(e.keypoints[s].position[0]-e.keypoints[o].position[0]),Math.abs(e.keypoints[A].position[0]-e.keypoints[o].position[0])]:[0,0],l=e.keypoints[r]?[Math.abs(e.keypoints[A].position[0]-e.keypoints[r].position[0]),Math.abs(e.keypoints[s].position[0]-e.keypoints[r].position[0])]:[0,0];if(a[0]>a[1]||l[0]>l[1]){let c=e.keypoints[o];e.keypoints[o]=e.keypoints[r],e.keypoints[r]=c}}}function Hn(e){for(let t=0;te.shape[1]?Math.trunc((e.shape[2]-e.shape[1])/2):0,e.shape[2]>e.shape[1]?Math.trunc((e.shape[2]-e.shape[1])/2):0],[e.shape[1]>e.shape[2]?Math.trunc((e.shape[1]-e.shape[2])/2):0,e.shape[1]>e.shape[2]?Math.trunc((e.shape[1]-e.shape[2])/2):0],[0,0]],n.pad=Ze.pad(e,D0.padding),n.resize=Ze.image.resizeBilinear(n.pad,[t,t]);let o=Ze.cast(n.resize,"int32");return Object.keys(n).forEach(A=>Ze.dispose(n[A])),o}function Dn(e,t){e.keypoints=e.keypoints.filter(o=>o==null?void 0:o.position);for(let o of e.keypoints)o.position=[o.position[0]*(t[0]+D0.padding[2][0]+D0.padding[2][1])/t[0]-D0.padding[2][0],o.position[1]*(t[1]+D0.padding[1][0]+D0.padding[1][1])/t[1]-D0.padding[1][0]],o.positionRaw=[o.position[0]/t[0],o.position[1]/t[1]];let n=be(e.keypoints.map(o=>o.position),t);return e.box=n.box,e.boxRaw=n.boxRaw,e}var m0,zt=0,Y5=Number.MAX_SAFE_INTEGER,o2={boxes:[],bodies:[],last:0};async function Xn(e){var t;return k.initial&&(m0=null),m0?e.debug&&h("cached model:",m0.modelUrl):(Tt(["size"],e),m0=await C(e.body.modelPath)),zt=(m0==null?void 0:m0.executor)&&((t=m0==null?void 0:m0.inputs)==null?void 0:t[0].shape)?m0.inputs[0].shape[2]:0,zt<64&&(zt=256),m0}function hA(e,t,n){let o=e[0][0],r=[],s=0;for(let x=0;xt.body.minConfidence){let i=[o[x][1],o[x][0]];r.push({score:Math.round(100*s)/100,part:wt[x],positionRaw:i,position:[Math.round((n.shape[2]||0)*i[0]),Math.round((n.shape[1]||0)*i[1])]})}s=r.reduce((x,i)=>i.score>x?i.score:x,0);let A=[],a=be(r.map(x=>x.position),[n.shape[2],n.shape[1]]),l={};for(let[x,i]of Object.entries(Et)){let f=[];for(let d=0;dg.part===i[d]),p=r.find(g=>g.part===i[d+1]);m&&p&&m.score>(t.body.minConfidence||0)&&p.score>(t.body.minConfidence||0)&&f.push([m.position,p.position])}l[x]=f}let c={id:0,score:s,box:a.box,boxRaw:a.boxRaw,keypoints:r,annotations:l};return U5(c),A.push(c),A}function bA(e,t,n){let o=[];for(let r=0;rt.body.minConfidence){let a=[];for(let i=0;i<17;i++){let f=s[3*i+2];if(f>t.body.minConfidence){let d=[s[3*i+1],s[3*i+0]];a.push({part:wt[i],score:Math.round(100*f)/100,positionRaw:d,position:[Math.round((n.shape[2]||0)*d[0]),Math.round((n.shape[1]||0)*d[1])]})}}let l=be(a.map(i=>i.position),[n.shape[2],n.shape[1]]),c={};for(let[i,f]of Object.entries(Et)){let d=[];for(let m=0;mv.part===f[m]),g=a.find(v=>v.part===f[m+1]);p&&g&&p.score>(t.body.minConfidence||0)&&g.score>(t.body.minConfidence||0)&&d.push([p.position,g.position])}c[i]=d}let x={id:r,score:A,box:l.box,boxRaw:l.boxRaw,keypoints:[...a],annotations:c};U5(x),o.push(x)}}return o.sort((r,s)=>s.score-r.score),o.length>t.body.maxDetected&&(o.length=t.body.maxDetected),o}async function K5(e,t){var r;if(!(m0!=null&&m0.executor)||!((r=m0==null?void 0:m0.inputs)!=null&&r[0].shape))return[];t.skipAllowed||(o2.boxes.length=0),Y5++;let n=(t.body.skipTime||0)>M()-o2.last,o=Y5<(t.body.skipFrames||0);return t.skipAllowed&&n&&o?o2.bodies:new Promise(async s=>{let A={};Y5=0,A.input=Vn(e,zt),A.res=m0==null?void 0:m0.execute(A.input),o2.last=M();let a=await A.res.array();o2.bodies=A.res.shape[2]===17?hA(a,t,e):bA(a,t,e);for(let l of o2.bodies)Dn(l,[e.shape[2]||1,e.shape[1]||1]),Hn(l.keypoints);Object.keys(A).forEach(l=>Zn.dispose(A[l])),s(o2.bodies)})}var Z0=D(V());var oe,St=[],Un=0,J5=Number.MAX_SAFE_INTEGER,Nt=0,jt=2.5;async function Yn(e){if(!oe||k.initial){oe=await C(e.object.modelPath);let t=oe!=null&&oe.executor?Object.values(oe.modelSignature.inputs):void 0;Nt=Array.isArray(t)?parseInt(t[0].tensorShape.dim[2].size):416}else e.debug&&h("cached model:",oe.modelUrl);return oe}async function gA(e,t,n){let o=0,r=[],s=Nt;for(let c of[1,2,4]){let x=c*13,i=Z0.squeeze(e.find(v=>v.shape[1]===x**2&&(v.shape[2]||0)===x2.length)),f=await i.array(),d=Z0.squeeze(e.find(v=>v.shape[1]===x**2&&(v.shape[2]||0)(n.object.minConfidence||0)&&T!==61){let b=(.5+Math.trunc(v%x))/x,z=(.5+Math.trunc(v/x))/x,w=g[v].map(G=>G*(x/c/s)),[O,q]=[b-jt/c*w[0],z-jt/c*w[1]],[t0,Z]=[b+jt/c*w[2]-O,z+jt/c*w[3]-q],U=[O,q,t0,Z];U=U.map(G=>Math.max(0,Math.min(G,1)));let r0=[U[0]*t[0],U[1]*t[1],U[2]*t[0],U[3]*t[1]],P={id:o++,score:Math.round(100*y)/100,class:T+1,label:x2[T].label,box:r0.map(G=>Math.trunc(G)),boxRaw:U};r.push(P)}}Z0.dispose([i,d,m,p])}let A=r.map(c=>[c.boxRaw[1],c.boxRaw[0],c.boxRaw[3],c.boxRaw[2]]),a=r.map(c=>c.score),l=[];if(A&&A.length>0){let c=await Z0.image.nonMaxSuppressionAsync(A,a,n.object.maxDetected,n.object.iouThreshold,n.object.minConfidence);l=await c.data(),Z0.dispose(c)}return r=r.filter((c,x)=>l.includes(x)).sort((c,x)=>x.score-c.score),r}async function Q5(e,t){if(!(oe!=null&&oe.executor))return[];let n=(t.object.skipTime||0)>M()-Un,o=J5<(t.object.skipFrames||0);return t.skipAllowed&&n&&o&&St.length>0?(J5++,St):(J5=0,!k.kernels.includes("mod")||!k.kernels.includes("sparsetodense")?St:new Promise(async r=>{let s=[e.shape[2]||0,e.shape[1]||0],A=Z0.image.resizeBilinear(e,[Nt,Nt],!1),a=Z0.div(A,W.tf255),l=Z0.transpose(a,[0,3,1,2]),c;t.object.enabled&&(c=oe.execute(l)),Un=M();let x=await gA(c,s,t);St=x,Z0.dispose([A,a,l,...c]),r(x)}))}var C0=D(V());var H2=["nose","leftEye","rightEye","leftEar","rightEar","leftShoulder","rightShoulder","leftElbow","rightElbow","leftWrist","rightWrist","leftHip","rightHip","leftKnee","rightKnee","leftAnkle","rightAnkle"],MA=H2.length,B2=H2.reduce((e,t,n)=>(e[t]=n,e),{}),TA=[["leftHip","leftShoulder"],["leftElbow","leftShoulder"],["leftElbow","leftWrist"],["leftHip","leftKnee"],["leftKnee","leftAnkle"],["rightHip","rightShoulder"],["rightElbow","rightShoulder"],["rightElbow","rightWrist"],["rightHip","rightKnee"],["rightKnee","rightAnkle"],["leftShoulder","rightShoulder"],["leftHip","rightHip"]],e4=TA.map(([e,t])=>[B2[e],B2[t]]),Jn=[["nose","leftEye"],["leftEye","leftEar"],["nose","rightEye"],["rightEye","rightEar"],["nose","leftShoulder"],["leftShoulder","leftElbow"],["leftElbow","leftWrist"],["leftShoulder","leftHip"],["leftHip","leftKnee"],["leftKnee","leftAnkle"],["nose","rightShoulder"],["rightShoulder","rightElbow"],["rightElbow","rightWrist"],["rightShoulder","rightHip"],["rightHip","rightKnee"],["rightKnee","rightAnkle"]];function Qn(e){let t=e.reduce(({maxX:n,maxY:o,minX:r,minY:s},{position:{x:A,y:a}})=>({maxX:Math.max(n,A),maxY:Math.max(o,a),minX:Math.min(r,A),minY:Math.min(s,a)}),{maxX:Number.NEGATIVE_INFINITY,maxY:Number.NEGATIVE_INFINITY,minX:Number.POSITIVE_INFINITY,minY:Number.POSITIVE_INFINITY});return[t.minX,t.minY,t.maxX-t.minX,t.maxY-t.minY]}function _n(e,[t,n],[o,r]){let s=t/o,A=n/r,a=(c,x)=>({id:x,score:c.score,boxRaw:[c.box[0]/r,c.box[1]/o,c.box[2]/r,c.box[3]/o],box:[Math.trunc(c.box[0]*A),Math.trunc(c.box[1]*s),Math.trunc(c.box[2]*A),Math.trunc(c.box[3]*s)],keypoints:c.keypoints.map(({score:i,part:f,position:d})=>({score:i,part:f,position:[Math.trunc(d.x*A),Math.trunc(d.y*s)],positionRaw:[d.x/o,d.y/o]})),annotations:{}});return e.map((c,x)=>a(c,x))}var Ot=class{constructor(t,n){R(this,"priorityQueue");R(this,"numberOfElements");R(this,"getElementValue");this.priorityQueue=new Array(t),this.numberOfElements=-1,this.getElementValue=n}enqueue(t){this.priorityQueue[++this.numberOfElements]=t,this.swim(this.numberOfElements)}dequeue(){let t=this.priorityQueue[0];return this.exchange(0,this.numberOfElements--),this.sink(0),this.priorityQueue[this.numberOfElements+1]=null,t}empty(){return this.numberOfElements===-1}size(){return this.numberOfElements+1}all(){return this.priorityQueue.slice(0,this.numberOfElements+1)}max(){return this.priorityQueue[0]}swim(t){for(;t>0&&this.less(Math.floor(t/2),t);)this.exchange(t,Math.floor(t/2)),t=Math.floor(t/2)}sink(t){for(;2*t<=this.numberOfElements;){let n=2*t;if(nn?n:e}function $n(e,t,n,o){let r=n-e,s=o-t;return r*r+s*s}function t1(e,t){return{x:e.x+t.x,y:e.y+t.y}}var X0,PA=["MobilenetV1/offset_2/BiasAdd","MobilenetV1/heatmap_2/BiasAdd","MobilenetV1/displacement_fwd_2/BiasAdd","MobilenetV1/displacement_bwd_2/BiasAdd"],It=1,h2=16,RA=50**2;function eo(e,t,n,o,r,s,A=2){let a=v=>({y:s.get(v.y,v.x,e),x:s.get(v.y,v.x,s.shape[2]/2+e)}),l=(v,T,y)=>({y:e1(Math.round(v.y/h2),0,T-1),x:e1(Math.round(v.x/h2),0,y-1)}),[c,x]=o.shape,i=l(t.position,c,x),f=a(i),m=t1(t.position,f);for(let v=0;v[B2[f],B2[d]]),A=s.map(([,f])=>f),a=s.map(([f])=>f),l=t.shape[2],c=A.length,x=new Array(l),i=$5(e.part,h2,n);x[e.part.id]={score:e.score,part:H2[e.part.id],position:i};for(let f=c-1;f>=0;--f){let d=A[f],m=a[f];x[d]&&!x[m]&&(x[m]=eo(f,x[d],m,t,n,r))}for(let f=0;ft){a=!1;break}if(!a)break}return a}function EA(e,t){let[n,o,r]=t.shape,s=new Ot(n*o*r,({score:A})=>A);for(let A=0;A{var A;let s=(A=r[o])==null?void 0:A.position;return s?$n(n,t,s.y,s.x)<=RA:!1})}function zA(e,t){return t.reduce((o,{position:r,score:s},A)=>(to(e,r,A)||(o+=s),o),0)/t.length}function SA(e,t,n,o,r,s){let A=[],a=EA(s,t);for(;A.lengthd.score>s);let i=zA(A,x),f=Qn(x);i>s&&A.push({keypoints:x,box:f,score:Math.round(100*i)/100})}return A}async function n1(e,t){if(!(X0!=null&&X0.executor))return[];let n=C0.tidy(()=>{if(!X0.inputs[0].shape)return[];let A=C0.image.resizeBilinear(e,[X0.inputs[0].shape[2],X0.inputs[0].shape[1]]),a=C0.sub(C0.div(C0.cast(A,"float32"),127.5),1),c=X0.execute(a,PA).map(x=>C0.squeeze(x,[0]));return c[1]=C0.sigmoid(c[1]),c}),o=await Promise.all(n.map(A=>A.buffer()));for(let A of n)C0.dispose(A);let r=SA(o[0],o[1],o[2],o[3],t.body.maxDetected,t.body.minConfidence);return X0.inputs[0].shape?_n(r,[e.shape[1],e.shape[2]],[X0.inputs[0].shape[2],X0.inputs[0].shape[1]]):[]}async function no(e){return!X0||k.initial?X0=await C(e.body.modelPath):e.debug&&h("cached model:",X0.modelUrl),X0}var B=D(V());var me,jA=["fgr","pha","r1o","r2o","r3o","r4o"],p0={},r1=0;function so(e){B.dispose([p0.r1i,p0.r2i,p0.r3i,p0.r4i,p0.downsample_ratio]),p0.r1i=B.tensor(0),p0.r2i=B.tensor(0),p0.r3i=B.tensor(0),p0.r4i=B.tensor(0),r1=e.segmentation.ratio||.5,p0.downsample_ratio=B.tensor(r1)}async function s1(e){return!me||k.initial?me=await C(e.segmentation.modelPath):e.debug&&h("cached model:",me.modelUrl),so(e),me}var ro=e=>B.tidy(()=>{let t=B.squeeze(e,[0]),n=B.mul(t,W.tf255);return B.cast(n,"int32")});function o1(e,t){let n=e?ro(e):B.fill([t.shape[1]||0,t.shape[2]||0,3],255,"int32"),o=t?ro(t):B.fill([e.shape[1]||0,e.shape[2]||0,1],255,"int32"),r=B.concat([n,o],-1);return B.dispose([n,o]),r}function NA(e){return B.tidy(()=>{let t={};return t.unstack=B.unstack(e,-1),t.concat=B.concat(t.unstack,1),t.split=B.split(t.concat,4,1),t.stack=B.concat(t.split,2),t.squeeze=B.squeeze(t.stack,[0]),t.expand=B.expandDims(t.squeeze,-1),t.add=B.add(t.expand,1),t.mul=B.mul(t.add,127.5),t.cast=B.cast(t.mul,"int32"),t.tile=B.tile(t.cast,[1,1,3]),t.alpha=B.fill([t.tile.shape[0]||0,t.tile.shape[1]||0,1],255,"int32"),B.concat([t.tile,t.alpha],-1)})}async function Ao(e,t){if(me||(me=await s1(t)),!(me!=null&&me.executor))return null;p0.src=B.div(e,255),r1!==t.segmentation.ratio&&so(t);let[n,o,r,s,A,a]=await me.executeAsync(p0,jA),l;switch(t.segmentation.mode||"default"){case"default":l=o1(n,o);break;case"alpha":l=o1(null,o);break;case"foreground":l=o1(n,null);break;case"state":l=NA(r);break;default:l=B.tensor(0)}return B.dispose([p0.src,n,o,p0.r1i,p0.r2i,p0.r3i,p0.r4i]),[p0.r1i,p0.r2i,p0.r3i,p0.r4i]=[r,s,A,a],l}var v0=D(V());var E0;async function A1(e){return!E0||k.initial?E0=await C(e.segmentation.modelPath):e.debug&&h("cached model:",E0.modelUrl),E0}async function io(e,t){var r;if(E0||(E0=await A1(t)),!(E0!=null&&E0.executor)||!((r=E0==null?void 0:E0.inputs)!=null&&r[0].shape))return null;let n={};n.resize=v0.image.resizeBilinear(e,[E0.inputs[0].shape?E0.inputs[0].shape[1]:0,E0.inputs[0].shape?E0.inputs[0].shape[2]:0],!1),n.norm=v0.div(n.resize,W.tf255),n.res=E0.execute(n.norm),n.squeeze=v0.squeeze(n.res,0),n.alpha=v0.image.resizeBilinear(n.squeeze,[e.shape[1],e.shape[2]]),n.mul=v0.mul(n.alpha,W.tf255);let o;switch(t.segmentation.mode||"default"){case"default":n.input=v0.squeeze(e),n.concat=v0.concat([n.input,n.mul],-1),o=v0.cast(n.concat,"int32");break;case"alpha":o=v0.cast(n.mul,"int32");break;default:o=v0.tensor(0)}return Object.keys(n).forEach(s=>v0.dispose(n[s])),o}var b2=D(V());var q0,Ct=[],co=0,xo=0,a1=Number.MAX_SAFE_INTEGER;async function yo(e){return k.initial&&(q0=null),q0?e.debug&&h("cached model:",q0.modelUrl):q0=await C(e.face.ssrnet.modelPathAge),q0}async function i1(e,t,n,o){var A,a,l,c;if(!q0)return{age:0};let r=a1<(((A=t.face.ssrnet)==null?void 0:A.skipFrames)||0),s=(((a=t.face.ssrnet)==null?void 0:a.skipTime)||0)>M()-xo;return t.skipAllowed&&r&&s&&co===o&&((l=Ct[n])==null?void 0:l.age)&&((c=Ct[n])==null?void 0:c.age)>0?(a1++,Ct[n]):(a1=0,new Promise(async x=>{var d;if(!(q0!=null&&q0.inputs)||!q0.inputs[0]||!q0.inputs[0].shape)return;let i={};i.resize=b2.image.resizeBilinear(e,[q0.inputs[0].shape[2],q0.inputs[0].shape[1]],!1),i.enhance=b2.mul(i.resize,W.tf255);let f={age:0};if((d=t.face.ssrnet)!=null&&d.enabled&&(i.age=q0.execute(i.enhance)),i.age){let m=await i.age.data();f.age=Math.trunc(10*m[0])/10}Object.keys(i).forEach(m=>b2.dispose(i[m])),Ct[n]=f,co=o,xo=M(),x(f)}))}var z0=D(V());var re,Lt=[],mo=0,po=0,l1=Number.MAX_SAFE_INTEGER,c1=[.2989,.587,.114];async function uo(e){var t;return k.initial&&(re=null),re?e.debug&&h("cached model:",re.modelUrl):re=await C((t=e.face.ssrnet)==null?void 0:t.modelPathGender),re}async function d1(e,t,n,o){var A,a,l,c;if(!re)return{gender:"unknown",genderScore:0};let r=l1<(((A=t.face.ssrnet)==null?void 0:A.skipFrames)||0),s=(((a=t.face.ssrnet)==null?void 0:a.skipTime)||0)>M()-po;return t.skipAllowed&&r&&s&&mo===o&&((l=Lt[n])==null?void 0:l.gender)&&((c=Lt[n])==null?void 0:c.genderScore)>0?(l1++,Lt[n]):(l1=0,new Promise(async x=>{var m;if(!(re!=null&&re.inputs[0].shape))return;let i={};i.resize=z0.image.resizeBilinear(e,[re.inputs[0].shape[2],re.inputs[0].shape[1]],!1),i.enhance=z0.tidy(()=>{let[p,g,v]=z0.split(i.resize,3,3),T=z0.mul(p,c1[0]),y=z0.mul(g,c1[1]),b=z0.mul(v,c1[2]),z=z0.addN([T,y,b]);return z0.mul(z0.sub(z,W.tf05),2)});let f={gender:"unknown",genderScore:0};(m=t.face.ssrnet)!=null&&m.enabled&&(i.gender=re.execute(i.enhance));let d=await i.gender.data();f.gender=d[0]>d[1]?"female":"male",f.genderScore=d[0]>d[1]?Math.trunc(100*d[0])/100:Math.trunc(100*d[1])/100,Object.keys(i).forEach(p=>z0.dispose(i[p])),Lt[n]=f,mo=o,po=M(),x(f)}))}var V2=class{constructor(){R(this,"ssrnetage",null);R(this,"gear",null);R(this,"blazeposedetect",null);R(this,"blazepose",null);R(this,"centernet",null);R(this,"efficientpose",null);R(this,"mobilefacenet",null);R(this,"insightface",null);R(this,"emotion",null);R(this,"facedetect",null);R(this,"faceiris",null);R(this,"facemesh",null);R(this,"faceres",null);R(this,"ssrnetgender",null);R(this,"handpose",null);R(this,"handskeleton",null);R(this,"handtrack",null);R(this,"liveness",null);R(this,"meet",null);R(this,"movenet",null);R(this,"nanodet",null);R(this,"posenet",null);R(this,"selfie",null);R(this,"rvm",null);R(this,"antispoof",null)}},u,x1=e=>{e&&(u=e),u||h("instance not registred");let t=0,n=0,o=0;for(let s of Object.values(ee))t+=s.sizeFromManifest,n+=s.sizeLoadedWeights,o+=s.sizeDesired;let r=o>0?n/o:0;return{numLoadedModels:Object.values(ee).length,numDefinedModels:Object.keys(u.models).length,percentageLoaded:r,totalSizeFromManifest:t,totalSizeWeights:n,totalSizeLoading:o,totalSizeEnabled:void 0,modelStats:Object.values(ee)}};function Wt(e){e&&(u=e);for(let t of Object.keys(u.models))u.models[t]=null}async function y1(e){var t,n,o,r,s,A,a,l,c,x,i,f,d,m,p,g,v,T,y,b,z,w,O,q,t0,Z,U,r0,P;e&&(u=e),u||h("instance not registred"),k.initial&&Wt(u),u.config.hand.enabled&&(!u.models.handpose&&((n=(t=u.config.hand.detector)==null?void 0:t.modelPath)==null?void 0:n.includes("handdetect"))&&([u.models.handpose,u.models.handskeleton]=await O5(u.config)),!u.models.handskeleton&&u.config.hand.landmarks&&((r=(o=u.config.hand.detector)==null?void 0:o.modelPath)==null?void 0:r.includes("handdetect"))&&([u.models.handpose,u.models.handskeleton]=await O5(u.config))),u.config.body.enabled&&!u.models.blazepose&&((s=u.config.body.modelPath)==null?void 0:s.includes("blazepose"))&&(u.models.blazepose=u3(u.config)),u.config.body.enabled&&!u.models.blazeposedetect&&u.config.body.detector&&u.config.body.detector.modelPath&&(u.models.blazeposedetect=p3(u.config)),u.config.body.enabled&&!u.models.efficientpose&&((A=u.config.body.modelPath)==null?void 0:A.includes("efficientpose"))&&(u.models.efficientpose=v3(u.config)),u.config.body.enabled&&!u.models.movenet&&((a=u.config.body.modelPath)==null?void 0:a.includes("movenet"))&&(u.models.movenet=Xn(u.config)),u.config.body.enabled&&!u.models.posenet&&((l=u.config.body.modelPath)==null?void 0:l.includes("posenet"))&&(u.models.posenet=no(u.config)),u.config.face.enabled&&!u.models.facedetect&&(u.models.facedetect=a3(u.config)),u.config.face.enabled&&((c=u.config.face.antispoof)==null?void 0:c.enabled)&&!u.models.antispoof&&(u.models.antispoof=U1(u.config)),u.config.face.enabled&&((x=u.config.face.liveness)==null?void 0:x.enabled)&&!u.models.liveness&&(u.models.liveness=jn(u.config)),u.config.face.enabled&&((i=u.config.face.description)==null?void 0:i.enabled)&&!u.models.faceres&&(u.models.faceres=D3(u.config)),u.config.face.enabled&&((f=u.config.face.emotion)==null?void 0:f.enabled)&&!u.models.emotion&&(u.models.emotion=w3(u.config)),u.config.face.enabled&&((d=u.config.face.iris)==null?void 0:d.enabled)&&!((m=u.config.face.attention)!=null&&m.enabled)&&!u.models.faceiris&&(u.models.faceiris=N3(u.config)),u.config.face.enabled&&((p=u.config.face.mesh)==null?void 0:p.enabled)&&!u.models.facemesh&&(u.models.facemesh=F3(u.config)),u.config.face.enabled&&((g=u.config.face.gear)==null?void 0:g.enabled)&&!u.models.gear&&(u.models.gear=q3(u.config)),u.config.face.enabled&&((v=u.config.face.ssrnet)==null?void 0:v.enabled)&&!u.models.ssrnetage&&(u.models.ssrnetage=yo(u.config)),u.config.face.enabled&&((T=u.config.face.ssrnet)==null?void 0:T.enabled)&&!u.models.ssrnetgender&&(u.models.ssrnetgender=uo(u.config)),u.config.face.enabled&&((y=u.config.face.mobilefacenet)==null?void 0:y.enabled)&&!u.models.mobilefacenet&&(u.models.mobilefacenet=Fn(u.config)),u.config.face.enabled&&((b=u.config.face.insightface)==null?void 0:b.enabled)&&!u.models.insightface&&(u.models.insightface=wn(u.config)),u.config.hand.enabled&&!u.models.handtrack&&((w=(z=u.config.hand.detector)==null?void 0:z.modelPath)==null?void 0:w.includes("handtrack"))&&(u.models.handtrack=Mn(u.config)),u.config.hand.enabled&&u.config.hand.landmarks&&!u.models.handskeleton&&((q=(O=u.config.hand.detector)==null?void 0:O.modelPath)==null?void 0:q.includes("handtrack"))&&(u.models.handskeleton=Tn(u.config)),u.config.object.enabled&&!u.models.centernet&&((t0=u.config.object.modelPath)==null?void 0:t0.includes("centernet"))&&(u.models.centernet=g3(u.config)),u.config.object.enabled&&!u.models.nanodet&&((Z=u.config.object.modelPath)==null?void 0:Z.includes("nanodet"))&&(u.models.nanodet=Yn(u.config)),u.config.segmentation.enabled&&!u.models.selfie&&((U=u.config.segmentation.modelPath)==null?void 0:U.includes("selfie"))&&(u.models.selfie=A1(u.config)),u.config.segmentation.enabled&&!u.models.meet&&((r0=u.config.segmentation.modelPath)==null?void 0:r0.includes("meet"))&&(u.models.meet=H5(u.config)),u.config.segmentation.enabled&&!u.models.rvm&&((P=u.config.segmentation.modelPath)==null?void 0:P.includes("rvm"))&&(u.models.rvm=s1(u.config));for await(let G of Object.keys(u.models))u.models[G]&&typeof u.models[G]!="undefined"&&(u.models[G]=await u.models[G])}function Ft(e,t,n){var c,x;if(!t||(e&&(u=e),u||h("instance not registred"),!((c=u==null?void 0:u.config)!=null&&c.validateModels)))return null;let o=["const","placeholder","noop","pad","squeeze","add","sub","mul","div"],r=["biasadd","fusedbatchnormv3","matmul","switch","shape","merge","split","broadcastto"],s=[],A=[],a=t.modelUrl,l=t.executor;if((x=l==null?void 0:l.graph)!=null&&x.nodes)for(let i of Object.values(l.graph.nodes)){let f=i.op.toLowerCase();s.includes(f)||s.push(f)}else!l&&u.config.debug&&h("model not loaded",n);for(let i of s)!o.includes(i)&&!r.includes(i)&&!u.env.kernels.includes(i)&&!u.env.kernels.includes(i.replace("_",""))&&!u.env.kernels.includes(i.replace("native",""))&&!u.env.kernels.includes(i.replace("v2",""))&&A.push(i);return u.config.debug&&A.length>0&&h("model validation failed:",n,A),A.length>0?{name:n,missing:A,ops:s,url:a}:null}function Gt(e){e&&(u=e),u||h("instance not registred");let t=[];for(let n of Object.keys(e.models)){let o=e.models[n];if(!o)continue;let r=Ft(e,o,n);r&&t.push(r)}return t}var $={name:"humangl",priority:999,canvas:null,gl:null,extensions:[],webGLattr:{alpha:!1,antialias:!1,premultipliedAlpha:!1,preserveDrawingBuffer:!1,depth:!1,stencil:!1,failIfMajorPerformanceCaveat:!1,desynchronized:!0}};function OA(){let e=$.gl;!e||($.extensions=e.getSupportedExtensions())}function bo(e){var t;if(e.config.backend==="humangl"&&($.name in d0.engine().registry&&!((t=$==null?void 0:$.gl)!=null&&t.getParameter($.gl.VERSION))&&(h("humangl error: backend invalid context"),Wt(e)),!d0.findBackend($.name))){try{$.canvas=$0(100,100)}catch(o){h("humangl error: cannot create canvas:",o);return}try{if($.gl=$.canvas.getContext("webgl2",$.webGLattr),!$.gl){h("humangl error: cannot get webgl context");return}if(!$.gl.getParameter($.gl.VERSION).includes("2.0")){h("backend override: using fallback webgl backend as webgl 2.0 is not detected"),e.config.backend="webgl";return}$.canvas&&($.canvas.addEventListener("webglcontextlost",r=>{throw h("humangl error:",r.type),h("possible browser memory leak using webgl or conflict with multiple backend registrations"),e.emit("error"),new Error("backend error: webgl context lost")}),$.canvas.addEventListener("webglcontextrestored",r=>{h("humangl error: context restored:",r)}),$.canvas.addEventListener("webglcontextcreationerror",r=>{h("humangl error: context create:",r)}))}catch(o){h("humangl error: cannot get webgl context:",o);return}try{d0.setWebGLContext(2,$.gl)}catch(o){h("humangl error: cannot set webgl context:",o);return}try{let o=new d0.GPGPUContext($.gl);d0.registerBackend($.name,()=>new d0.MathBackendWebGL(o),$.priority)}catch(o){h("humangl error: cannot register webgl backend:",o);return}try{d0.getKernelsForBackend("webgl").forEach(r=>{let s={...r,backendName:$.name};d0.registerKernel(s)})}catch(o){h("humangl error: cannot update webgl backend registration:",o);return}try{d0.env().flagRegistry.WEBGL_VERSION&&d0.env().set("WEBGL_VERSION",2)}catch(o){h("humangl error: cannot set WebGL backend flags:",o);return}OA();let n=d0.backend().getGPGPUContext?d0.backend().getGPGPUContext().gl:null;n?e.config.debug&&h("humangl backend registered:",{webgl:n.getParameter(n.VERSION),renderer:n.getParameter(n.RENDERER)}):h("humangl error: no current gl context:",n,$.gl)}}var S=D(V());function IA(e){let t=[];if(!k.kernels.includes("mod")){let n={kernelName:"Mod",backendName:S.getBackend(),kernelFunc:o=>S.tidy(()=>S.sub(o.inputs.a,S.mul(S.div(o.inputs.a,o.inputs.b),o.inputs.b)))};S.registerKernel(n),k.kernels.push("mod"),t.push("mod")}if(!k.kernels.includes("floormod")){let n={kernelName:"FloorMod",backendName:S.getBackend(),kernelFunc:o=>S.tidy(()=>S.add(S.mul(S.floorDiv(o.inputs.a/o.inputs.b),o.inputs.b),S.mod(o.inputs.a,o.inputs.b)))};S.registerKernel(n),k.kernels.push("floormod"),t.push("floormod")}if(!k.kernels.includes("rotatewithoffset")&&e.softwareKernels){let n={kernelName:"RotateWithOffset",backendName:S.getBackend(),kernelFunc:o=>S.tidy(()=>{let r=S.getBackend();S.setBackend("cpu");let s=S.image.rotateWithOffset(o.inputs.image,o.attrs.radians,o.attrs.fillValue,o.attrs.center);return S.setBackend(r),s})};S.registerKernel(n),k.kernels.push("rotatewithoffset"),t.push("rotatewithoffset")}t.length>0&&e.debug&&h("registered kernels:",t)}var Mo={};async function D2(e,t=!1){if(e.state="backend",t||k.initial||e.config.backend&&e.config.backend.length>0&&S.getBackend()!==e.config.backend){let n=M();if(e.config.backend&&e.config.backend.length>0){if(typeof window=="undefined"&&typeof WorkerGlobalScope!="undefined"&&e.config.debug&&e.config.debug&&h("running inside web worker"),k.browser&&e.config.backend==="tensorflow"&&(e.config.debug&&h("override: backend set to tensorflow while running in browser"),e.config.backend="webgl"),k.node&&(e.config.backend==="webgl"||e.config.backend==="humangl")&&(e.config.debug&&h(`override: backend set to ${e.config.backend} while running in nodejs`),e.config.backend="tensorflow"),k.browser&&e.config.backend==="webgpu")if(typeof navigator=="undefined"||typeof navigator.gpu=="undefined")h("override: backend set to webgpu but browser does not support webgpu"),e.config.backend="webgl";else{let r=await navigator.gpu.requestAdapter();if(e.config.debug&&h("enumerated webgpu adapter:",r),!r)h("override: backend set to webgpu but browser reports no available gpu"),e.config.backend="webgl";else{let s="requestAdapterInfo"in r?await r.requestAdapterInfo():void 0;h("webgpu adapter info:",s)}}let o=Object.keys(S.engine().registryFactory);if(e.config.backend==="humangl"&&!o.includes("humangl")&&(bo(e),o=Object.keys(S.engine().registryFactory)),e.config.debug&&h("available backends:",o),o.includes(e.config.backend)||(h(`error: backend ${e.config.backend} not found in registry`),e.config.backend=k.node?"tensorflow":"webgl",e.config.debug&&h(`override: setting backend ${e.config.backend}`)),e.config.debug&&h("setting backend:",[e.config.backend]),e.config.backend==="wasm"){if(S.env().flagRegistry.CANVAS2D_WILL_READ_FREQUENTLY&&S.env().set("CANVAS2D_WILL_READ_FREQUENTLY",!0),e.config.debug&&h("wasm path:",e.config.wasmPath),typeof S.setWasmPaths!="undefined")S.setWasmPaths(e.config.wasmPath,e.config.wasmPlatformFetch);else throw new Error("backend error: attempting to use wasm backend but wasm path is not set");let r=!1,s=!1;try{r=await S.env().getAsync("WASM_HAS_MULTITHREAD_SUPPORT"),s=await S.env().getAsync("WASM_HAS_SIMD_SUPPORT"),e.config.debug&&h(`wasm execution: ${s?"simd":"no simd"} ${r?"multithreaded":"singlethreaded"}`),e.config.debug&&!s&&h("warning: wasm simd support is not enabled")}catch(A){h("wasm detection failed")}}try{await S.setBackend(e.config.backend),await S.ready()}catch(r){return h("error: cannot set backend:",e.config.backend,r),!1}e.config.debug&&(Mo=JSON.parse(JSON.stringify(S.env().flags)))}if((S.getBackend()==="humangl"||S.getBackend()==="webgl")&&(S.env().flagRegistry.WEBGL_USE_SHAPES_UNIFORMS&&S.env().set("WEBGL_USE_SHAPES_UNIFORMS",!0),S.env().flagRegistry.WEBGL_EXP_CONV&&S.env().set("WEBGL_EXP_CONV",!0),e.config.debug&&typeof e.config.deallocate!="undefined"&&e.config.deallocate&&(h("changing webgl: WEBGL_DELETE_TEXTURE_THRESHOLD:",!0),S.env().set("WEBGL_DELETE_TEXTURE_THRESHOLD",0))),S.getBackend(),e.config.debug){let o=S.env().flags,r={};for(let s of Object.keys(o))Mo[s]!==o[s]&&(r[s]=o[s]);e.config.debug&&Object.keys(r).length>0&&h("backend:",S.getBackend(),"flags:",r)}if(e.config.flags&&Object.keys(e.config.flags).length>0){e.config.debug&&h("flags:",e.config.flags);for(let[o,r]of Object.entries(e.config.flags))S.env().set(o,r)}S.enableProdMode(),K1(),e.performance.initBackend=Math.trunc(M()-n),e.config.backend=S.getBackend(),await k.updateBackend(),IA(e.config),k.initial=!1}return!0}function Tt(e,t){for(let n of e){let o={kernelName:n,backendName:t.backend,kernelFunc:()=>{t.debug&&h("kernelFunc",n,t.backend)}};S.registerKernel(o)}k.kernels=S.getKernelsForBackend(S.getBackend()).map(n=>n.kernelName.toLowerCase())}var g1={};we(g1,{all:()=>b1,body:()=>T2,canvas:()=>h1,face:()=>M2,gesture:()=>R2,hand:()=>v2,object:()=>P2,options:()=>S0,person:()=>u1});var K0=e=>{if(!e)h("draw error: invalid canvas");else if(!e.getContext)h("draw error: canvas context not defined");else{let t=e.getContext("2d");if(!t)h("draw error: cannot get canvas context");else return t}return null},r2=e=>Math.round(e*180/Math.PI),ve=(e,t)=>{if(!t.useDepth||typeof e=="undefined")return t.color;let n=Uint8ClampedArray.from([127+2*e,127-2*e,255]);return`rgba(${n[0]}, ${n[1]}, ${n[2]}, ${t.alpha})`};function Pe(e,t,n,o,r){e.fillStyle=ve(o,r),e.beginPath(),e.arc(t,n,r.pointSize,0,2*Math.PI),e.fill()}function pe(e,t,n,o,r,s){if(e.beginPath(),e.lineWidth=s.lineWidth,s.useCurves){let A=(t+t+o)/2,a=(n+n+r)/2;e.ellipse(A,a,o/2,r/2,0,0,2*Math.PI)}else e.moveTo(t+s.roundRect,n),e.lineTo(t+o-s.roundRect,n),e.quadraticCurveTo(t+o,n,t+o,n+s.roundRect),e.lineTo(t+o,n+r-s.roundRect),e.quadraticCurveTo(t+o,n+r,t+o-s.roundRect,n+r),e.lineTo(t+s.roundRect,n+r),e.quadraticCurveTo(t,n+r,t,n+r-s.roundRect),e.lineTo(t,n+s.roundRect),e.quadraticCurveTo(t,n,t+s.roundRect,n),e.closePath();e.stroke()}function f1(e,t,n){if(!(t.length<2)){e.beginPath(),e.moveTo(t[0][0],t[0][1]);for(let o of t)e.strokeStyle=ve(o[2]||0,n),e.lineTo(Math.trunc(o[0]),Math.trunc(o[1]));e.stroke(),n.fillPolygons&&(e.closePath(),e.fill())}}function vo(e,t,n){if(!(t.length<2)){if(e.lineWidth=n.lineWidth,!n.useCurves||t.length<=2){f1(e,t,n);return}e.moveTo(t[0][0],t[0][1]);for(let o=0;o0){let s=e.emotion.map(A=>`${Math.trunc(100*A.score)}% ${A.emotion}`);s.length>3&&(s.length=3),r.push(s.join(" "))}((n=e.rotation)==null?void 0:n.angle)&&((o=e.rotation)==null?void 0:o.gaze)&&(e.rotation.angle.roll&&r.push(`roll: ${r2(e.rotation.angle.roll)}\xB0 yaw:${r2(e.rotation.angle.yaw)}\xB0 pitch:${r2(e.rotation.angle.pitch)}\xB0`),e.rotation.gaze.bearing&&r.push(`gaze: ${r2(e.rotation.gaze.bearing)}\xB0`)),r.length===0&&r.push("face"),t.fillStyle=K.color;for(let s=r.length-1;s>=0;s--){let A=Math.max(e.box[0],0),a=s*K.lineHeight+e.box[1];K.shadowColor&&K.shadowColor!==""&&(t.fillStyle=K.shadowColor,t.fillText(r[s],A+5,a+16)),t.fillStyle=K.labelColor,t.fillText(r[s],A+4,a+15)}}}function LA(e,t){var n,o,r,s;if(((n=e.annotations)==null?void 0:n.leftEyeIris)&&((o=e.annotations)==null?void 0:o.leftEyeIris[0])){t.strokeStyle=K.useDepth?"rgba(255, 200, 255, 0.3)":K.color,t.beginPath();let A=Math.abs(e.annotations.leftEyeIris[3][0]-e.annotations.leftEyeIris[1][0])/2,a=Math.abs(e.annotations.leftEyeIris[4][1]-e.annotations.leftEyeIris[2][1])/2;t.ellipse(e.annotations.leftEyeIris[0][0],e.annotations.leftEyeIris[0][1],A,a,0,0,2*Math.PI),t.stroke(),K.fillPolygons&&(t.fillStyle=K.useDepth?"rgba(255, 255, 200, 0.3)":K.color,t.fill())}if(((r=e.annotations)==null?void 0:r.rightEyeIris)&&((s=e.annotations)==null?void 0:s.rightEyeIris[0])){t.strokeStyle=K.useDepth?"rgba(255, 200, 255, 0.3)":K.color,t.beginPath();let A=Math.abs(e.annotations.rightEyeIris[3][0]-e.annotations.rightEyeIris[1][0])/2,a=Math.abs(e.annotations.rightEyeIris[4][1]-e.annotations.rightEyeIris[2][1])/2;t.ellipse(e.annotations.rightEyeIris[0][0],e.annotations.rightEyeIris[0][1],A,a,0,0,2*Math.PI),t.stroke(),K.fillPolygons&&(t.fillStyle=K.useDepth?"rgba(255, 255, 200, 0.3)":K.color,t.fill())}}function WA(e,t){var n;if(K.drawGaze&&((n=e.rotation)==null?void 0:n.angle)&&typeof Path2D!="undefined"){t.strokeStyle="pink";let o=e.box[0]+e.box[2]/2-e.box[3]*r2(e.rotation.angle.yaw)/90,r=e.box[1]+e.box[3]/2+e.box[2]*r2(e.rotation.angle.pitch)/90,s=new Path2D(` + M ${e.box[0]+e.box[2]/2} ${e.box[1]} C - ${valX} ${f.box[1]}, - ${valX} ${f.box[1] + f.box[3]}, - ${f.box[0] + f.box[2] / 2} ${f.box[1] + f.box[3]} - `); - const pathH = new Path2D(` - M ${f.box[0]} ${f.box[1] + f.box[3] / 2} + ${o} ${e.box[1]}, + ${o} ${e.box[1]+e.box[3]}, + ${e.box[0]+e.box[2]/2} ${e.box[1]+e.box[3]} + `),A=new Path2D(` + M ${e.box[0]} ${e.box[1]+e.box[3]/2} C - ${f.box[0]} ${valY}, - ${f.box[0] + f.box[2]} ${valY}, - ${f.box[0] + f.box[2]} ${f.box[1] + f.box[3] / 2} - `); - ctx.stroke(pathH); - ctx.stroke(pathV); - } -} -function drawGazeArrows(f, ctx) { - var _a; - if (opt.drawGaze && ((_a = f.rotation) == null ? void 0 : _a.gaze.strength) && f.rotation.gaze.bearing && f.annotations.leftEyeIris && f.annotations.rightEyeIris && f.annotations.leftEyeIris[0] && f.annotations.rightEyeIris[0]) { - ctx.strokeStyle = "pink"; - ctx.fillStyle = "pink"; - const leftGaze = [ - f.annotations.leftEyeIris[0][0] + Math.sin(f.rotation.gaze.bearing) * f.rotation.gaze.strength * f.box[3], - f.annotations.leftEyeIris[0][1] + Math.cos(f.rotation.gaze.bearing) * f.rotation.gaze.strength * f.box[2] - ]; - arrow(ctx, [f.annotations.leftEyeIris[0][0], f.annotations.leftEyeIris[0][1]], [leftGaze[0], leftGaze[1]], 4); - const rightGaze = [ - f.annotations.rightEyeIris[0][0] + Math.sin(f.rotation.gaze.bearing) * f.rotation.gaze.strength * f.box[3], - f.annotations.rightEyeIris[0][1] + Math.cos(f.rotation.gaze.bearing) * f.rotation.gaze.strength * f.box[2] - ]; - arrow(ctx, [f.annotations.rightEyeIris[0][0], f.annotations.rightEyeIris[0][1]], [rightGaze[0], rightGaze[1]], 4); - } -} -function drawFacePolygons(f, ctx) { - if (opt.drawPolygons && f.mesh.length >= 468) { - ctx.lineWidth = 1; - for (let i = 0; i < TRI468.length / 3; i++) { - const points = [TRI468[i * 3 + 0], TRI468[i * 3 + 1], TRI468[i * 3 + 2]].map((index2) => f.mesh[index2]); - lines(ctx, points, opt); - } - drawIrisElipse(f, ctx); - } -} -function drawFacePoints(f, ctx) { - if (opt.drawPoints && f.mesh.length >= 468) { - for (let i = 0; i < f.mesh.length; i++) { - point(ctx, f.mesh[i][0], f.mesh[i][1], f.mesh[i][2], opt); - if (opt.drawAttention) { - if (LANDMARKS_REFINEMENT_LIPS_CONFIG.includes(i)) - point(ctx, f.mesh[i][0], f.mesh[i][1], f.mesh[i][2] + 127, opt); - if (LANDMARKS_REFINEMENT_LEFT_EYE_CONFIG.includes(i)) - point(ctx, f.mesh[i][0], f.mesh[i][1], f.mesh[i][2] - 127, opt); - if (LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG.includes(i)) - point(ctx, f.mesh[i][0], f.mesh[i][1], f.mesh[i][2] - 127, opt); - } - } - } -} -function drawFaceBoxes(f, ctx) { - if (opt.drawBoxes) { - rect(ctx, f.box[0], f.box[1], f.box[2], f.box[3], opt); - } -} -function face(inCanvas2, result, drawOptions) { - opt = mergeDeep(options3, drawOptions); - if (!result || !inCanvas2) - return; - const ctx = getCanvasContext(inCanvas2); - if (!ctx) - return; - ctx.font = opt.font; - ctx.strokeStyle = opt.color; - ctx.fillStyle = opt.color; - for (const f of result) { - drawFaceBoxes(f, ctx); - drawLabels(f, ctx); - if (f.mesh && f.mesh.length > 0) { - drawFacePoints(f, ctx); - drawFacePolygons(f, ctx); - drawGazeSpheres(f, ctx); - drawGazeArrows(f, ctx); - } - } -} - -// src/draw/body.ts -function body(inCanvas2, result, drawOptions) { - const localOptions = mergeDeep(options3, drawOptions); - if (!result || !inCanvas2) - return; - const ctx = getCanvasContext(inCanvas2); - if (!ctx) - return; - ctx.lineJoin = "round"; - for (let i = 0; i < result.length; i++) { - ctx.strokeStyle = localOptions.color; - ctx.fillStyle = localOptions.color; - ctx.lineWidth = localOptions.lineWidth; - ctx.font = localOptions.font; - if (localOptions.drawBoxes && result[i].box && result[i].box.length === 4) { - rect(ctx, result[i].box[0], result[i].box[1], result[i].box[2], result[i].box[3], localOptions); - if (localOptions.drawLabels) { - if (localOptions.shadowColor && localOptions.shadowColor !== "") { - ctx.fillStyle = localOptions.shadowColor; - ctx.fillText(`body ${100 * result[i].score}%`, result[i].box[0] + 3, 1 + result[i].box[1] + localOptions.lineHeight, result[i].box[2]); - } - ctx.fillStyle = localOptions.labelColor; - ctx.fillText(`body ${100 * result[i].score}%`, result[i].box[0] + 2, 0 + result[i].box[1] + localOptions.lineHeight, result[i].box[2]); - } - } - if (localOptions.drawPoints && result[i].keypoints) { - for (let pt = 0; pt < result[i].keypoints.length; pt++) { - if (!result[i].keypoints[pt].score || result[i].keypoints[pt].score === 0) - continue; - ctx.fillStyle = colorDepth(result[i].keypoints[pt].position[2], localOptions); - point(ctx, result[i].keypoints[pt].position[0], result[i].keypoints[pt].position[1], 0, localOptions); - } - } - if (localOptions.drawLabels && result[i].keypoints) { - ctx.font = localOptions.font; - for (const pt of result[i].keypoints) { - if (!pt.score || pt.score === 0) - continue; - ctx.fillStyle = colorDepth(pt.position[2], localOptions); - ctx.fillText(`${pt.part} ${Math.trunc(100 * pt.score)}%`, pt.position[0] + 4, pt.position[1] + 4); - } - } - if (localOptions.drawPolygons && result[i].keypoints && result[i].annotations) { - for (const part of Object.values(result[i].annotations)) { - for (const connected4 of part) - curves(ctx, connected4, localOptions); - } - } - } -} - -// src/draw/hand.ts -function hand(inCanvas2, result, drawOptions) { - const localOptions = mergeDeep(options3, drawOptions); - if (!result || !inCanvas2) - return; - const ctx = getCanvasContext(inCanvas2); - if (!ctx) - return; - ctx.lineJoin = "round"; - ctx.font = localOptions.font; - for (const h of result) { - if (localOptions.drawBoxes) { - ctx.strokeStyle = localOptions.color; - ctx.fillStyle = localOptions.color; - rect(ctx, h.box[0], h.box[1], h.box[2], h.box[3], localOptions); - if (localOptions.drawLabels) { - if (localOptions.shadowColor && localOptions.shadowColor !== "") { - ctx.fillStyle = localOptions.shadowColor; - ctx.fillText(`hand:${Math.trunc(100 * h.score)}%`, h.box[0] + 3, 1 + h.box[1] + localOptions.lineHeight, h.box[2]); - } - ctx.fillStyle = localOptions.labelColor; - ctx.fillText(`hand:${Math.trunc(100 * h.score)}%`, h.box[0] + 2, 0 + h.box[1] + localOptions.lineHeight, h.box[2]); - } - ctx.stroke(); - } - if (localOptions.drawPoints) { - if (h.keypoints && h.keypoints.length > 0) { - for (const pt of h.keypoints) { - ctx.fillStyle = colorDepth(pt[2], localOptions); - point(ctx, pt[0], pt[1], 0, localOptions); - } - } - } - if (localOptions.drawLabels && h.annotations) { - const addHandLabel = (part, title) => { - if (!part || part.length === 0 || !part[0]) - return; - const z = part[part.length - 1][2] || -256; - ctx.fillStyle = colorDepth(z, localOptions); - ctx.fillText(title, part[part.length - 1][0] + 4, part[part.length - 1][1] + 4); - }; - ctx.font = localOptions.font; - addHandLabel(h.annotations.index, "index"); - addHandLabel(h.annotations.middle, "middle"); - addHandLabel(h.annotations.ring, "ring"); - addHandLabel(h.annotations.pinky, "pinky"); - addHandLabel(h.annotations.thumb, "thumb"); - addHandLabel(h.annotations.palm, "palm"); - } - if (localOptions.drawPolygons && h.annotations) { - const addHandLine = (part) => { - if (!part || part.length === 0 || !part[0]) - return; - for (let i = 0; i < part.length; i++) { - ctx.beginPath(); - const z = part[i][2] || 0; - ctx.strokeStyle = colorDepth(i * z, localOptions); - ctx.moveTo(part[i > 0 ? i - 1 : 0][0], part[i > 0 ? i - 1 : 0][1]); - ctx.lineTo(part[i][0], part[i][1]); - ctx.stroke(); - } - }; - ctx.lineWidth = localOptions.lineWidth; - addHandLine(h.annotations.index); - addHandLine(h.annotations.middle); - addHandLine(h.annotations.ring); - addHandLine(h.annotations.pinky); - addHandLine(h.annotations.thumb); - } - } -} - -// src/draw/object.ts -function object(inCanvas2, result, drawOptions) { - const localOptions = mergeDeep(options3, drawOptions); - if (!result || !inCanvas2) - return; - const ctx = getCanvasContext(inCanvas2); - if (!ctx) - return; - ctx.lineJoin = "round"; - ctx.font = localOptions.font; - for (const h of result) { - if (localOptions.drawBoxes) { - ctx.strokeStyle = localOptions.color; - ctx.fillStyle = localOptions.color; - rect(ctx, h.box[0], h.box[1], h.box[2], h.box[3], localOptions); - if (localOptions.drawLabels) { - const label = `${h.label} ${Math.round(100 * h.score)}%`; - if (localOptions.shadowColor && localOptions.shadowColor !== "") { - ctx.fillStyle = localOptions.shadowColor; - ctx.fillText(label, h.box[0] + 3, 1 + h.box[1] + localOptions.lineHeight, h.box[2]); - } - ctx.fillStyle = localOptions.labelColor; - ctx.fillText(label, h.box[0] + 2, 0 + h.box[1] + localOptions.lineHeight, h.box[2]); - } - ctx.stroke(); - } - } -} - -// src/draw/gesture.ts -function gesture(inCanvas2, result, drawOptions) { - const localOptions = mergeDeep(options3, drawOptions); - if (!result || !inCanvas2) - return; - if (localOptions.drawGestures) { - const ctx = getCanvasContext(inCanvas2); - if (!ctx) - return; - ctx.font = localOptions.font; - ctx.fillStyle = localOptions.color; - let i = 1; - for (let j = 0; j < result.length; j++) { - let where = []; - let what = []; - [where, what] = Object.entries(result[j]); - if (what.length > 1 && what[1].length > 0) { - const who = where[1] > 0 ? `#${where[1]}` : ""; - const label = `${where[0]} ${who}: ${what[1]}`; - if (localOptions.shadowColor && localOptions.shadowColor !== "") { - ctx.fillStyle = localOptions.shadowColor; - ctx.fillText(label, 8, 2 + i * localOptions.lineHeight); - } - ctx.fillStyle = localOptions.labelColor; - ctx.fillText(label, 6, 0 + i * localOptions.lineHeight); - i += 1; - } - } - } -} - -// src/draw/draw.ts -var drawTime = 0; -function person(inCanvas2, result, drawOptions) { - const localOptions = mergeDeep(options3, drawOptions); - if (!result || !inCanvas2) - return; - const ctx = getCanvasContext(inCanvas2); - if (!ctx) - return; - ctx.lineJoin = "round"; - ctx.font = localOptions.font; - for (let i = 0; i < result.length; i++) { - if (localOptions.drawBoxes) { - ctx.strokeStyle = localOptions.color; - ctx.fillStyle = localOptions.color; - rect(ctx, result[i].box[0], result[i].box[1], result[i].box[2], result[i].box[3], localOptions); - if (localOptions.drawLabels) { - const label = `person #${i}`; - if (localOptions.shadowColor && localOptions.shadowColor !== "") { - ctx.fillStyle = localOptions.shadowColor; - ctx.fillText(label, result[i].box[0] + 3, 1 + result[i].box[1] + localOptions.lineHeight, result[i].box[2]); - } - ctx.fillStyle = localOptions.labelColor; - ctx.fillText(label, result[i].box[0] + 2, 0 + result[i].box[1] + localOptions.lineHeight, result[i].box[2]); - } - ctx.stroke(); - } - } -} -function canvas2(input, output) { - if (!input || !output) - return; - const ctx = getCanvasContext(output); - if (!ctx) - return; - ctx.drawImage(input, 0, 0); -} -async function all(inCanvas2, result, drawOptions) { - if (!(result == null ? void 0 : result.performance) || !inCanvas2) - return null; - const timeStamp = now(); - const localOptions = mergeDeep(options3, drawOptions); - const promise = Promise.all([ - face(inCanvas2, result.face, localOptions), - body(inCanvas2, result.body, localOptions), - hand(inCanvas2, result.hand, localOptions), - object(inCanvas2, result.object, localOptions), - gesture(inCanvas2, result.gesture, localOptions) - ]); - drawTime = env.perfadd ? drawTime + Math.round(now() - timeStamp) : Math.round(now() - timeStamp); - result.performance.draw = drawTime; - return promise; -} - -// src/face/face.ts -var tf37 = __toESM(require_tfjs_esm()); - -// src/face/mask.ts -var tf36 = __toESM(require_tfjs_esm()); -var expandFact = 0.1; -var alpha = 0.5; -function insidePoly(x, y, polygon) { - let inside = false; - let j = polygon.length - 1; - for (let i = 0; i < polygon.length; j = i++) { - if (polygon[i].y > y !== polygon[j].y > y && x < (polygon[j].x - polygon[i].x) * (y - polygon[i].y) / (polygon[j].y - polygon[i].y) + polygon[i].x) - inside = !inside; - } - return inside; -} -async function mask(face4) { - if (!face4.tensor) - return face4.tensor; - if (!face4.mesh || face4.mesh.length < 100) - return face4.tensor; - const width = face4.tensor.shape[2] || 0; - const height = face4.tensor.shape[1] || 0; - const buffer = await face4.tensor.buffer(); - let silhouette = []; - for (const pt of meshAnnotations.silhouette) - silhouette.push({ x: (face4.mesh[pt][0] - face4.box[0]) / face4.box[2], y: (face4.mesh[pt][1] - face4.box[1]) / face4.box[3] }); - if (expandFact && expandFact > 0) - silhouette = silhouette.map((pt) => ({ x: pt.x > 0.5 ? pt.x + expandFact : pt.x - expandFact, y: pt.y > 0.5 ? pt.y + expandFact : pt.y - expandFact })); - for (let x = 0; x < width; x++) { - for (let y = 0; y < height; y++) { - const inside = insidePoly(x / width, y / width, silhouette); - if (!inside) { - buffer.set(alpha * buffer.get(0, y, x, 0), 0, y, x, 0); - buffer.set(alpha * buffer.get(0, y, x, 1), 0, y, x, 1); - buffer.set(alpha * buffer.get(0, y, x, 2), 0, y, x, 2); - } - } - } - const output = buffer.toTensor(); - tf36.dispose(buffer); - return output; -} - -// src/face/angles.ts -var calculateGaze = (face4) => { - const radians = (pt1, pt2) => Math.atan2(pt1[1] - pt2[1], pt1[0] - pt2[0]); - if (!face4.annotations.rightEyeIris || !face4.annotations.leftEyeIris) - return { bearing: 0, strength: 0 }; - const offsetIris = [0, -0.1]; - const eyeRatio = 1; - const left = (face4.mesh[33][2] || 0) > (face4.mesh[263][2] || 0); - const irisCenter = left ? face4.mesh[473] : face4.mesh[468]; - const eyeCenter = left ? [(face4.mesh[133][0] + face4.mesh[33][0]) / 2, (face4.mesh[133][1] + face4.mesh[33][1]) / 2] : [(face4.mesh[263][0] + face4.mesh[362][0]) / 2, (face4.mesh[263][1] + face4.mesh[362][1]) / 2]; - const eyeSize = left ? [face4.mesh[133][0] - face4.mesh[33][0], face4.mesh[23][1] - face4.mesh[27][1]] : [face4.mesh[263][0] - face4.mesh[362][0], face4.mesh[253][1] - face4.mesh[257][1]]; - const eyeDiff = [ - (eyeCenter[0] - irisCenter[0]) / eyeSize[0] - offsetIris[0], - eyeRatio * (irisCenter[1] - eyeCenter[1]) / eyeSize[1] - offsetIris[1] - ]; - let strength = Math.sqrt(eyeDiff[0] * eyeDiff[0] + eyeDiff[1] * eyeDiff[1]); - strength = Math.min(strength, face4.boxRaw[2] / 2, face4.boxRaw[3] / 2); - const bearing = (radians([0, 0], eyeDiff) + Math.PI / 2) % Math.PI; - return { bearing, strength }; -}; -var calculateFaceAngle = (face4, imageSize) => { - const normalize2 = (v) => { - const length = Math.sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]); - v[0] /= length; - v[1] /= length; - v[2] /= length; - return v; - }; - const subVectors = (a, b) => { - const x = a[0] - b[0]; - const y = a[1] - b[1]; - const z = a[2] - b[2]; - return [x, y, z]; - }; - const crossVectors = (a, b) => { - const x = a[1] * b[2] - a[2] * b[1]; - const y = a[2] * b[0] - a[0] * b[2]; - const z = a[0] * b[1] - a[1] * b[0]; - return [x, y, z]; - }; - const rotationMatrixToEulerAngle = (r) => { - const [r00, _r01, _r02, r10, r11, r12, r20, r21, r22] = r; - let thetaX; - let thetaY; - let thetaZ; - if (r10 < 1) { - if (r10 > -1) { - thetaZ = Math.asin(r10); - thetaY = Math.atan2(-r20, r00); - thetaX = Math.atan2(-r12, r11); - } else { - thetaZ = -Math.PI / 2; - thetaY = -Math.atan2(r21, r22); - thetaX = 0; - } - } else { - thetaZ = Math.PI / 2; - thetaY = Math.atan2(r21, r22); - thetaX = 0; - } - if (Number.isNaN(thetaX)) - thetaX = 0; - if (Number.isNaN(thetaY)) - thetaY = 0; - if (Number.isNaN(thetaZ)) - thetaZ = 0; - return { pitch: 2 * -thetaX, yaw: 2 * -thetaY, roll: 2 * -thetaZ }; - }; - const mesh = face4.meshRaw; - if (!mesh || mesh.length < 300) - return { angle: { pitch: 0, yaw: 0, roll: 0 }, matrix: [1, 0, 0, 0, 1, 0, 0, 0, 1], gaze: { bearing: 0, strength: 0 } }; - const size2 = Math.max(face4.boxRaw[2] * imageSize[0], face4.boxRaw[3] * imageSize[1]) / 1.5; - const pts = [mesh[10], mesh[152], mesh[234], mesh[454]].map((pt) => [pt[0] * imageSize[0] / size2, pt[1] * imageSize[1] / size2, pt[2]]); - const yAxis = normalize2(subVectors(pts[1], pts[0])); - let xAxis = normalize2(subVectors(pts[3], pts[2])); - const zAxis = normalize2(crossVectors(xAxis, yAxis)); - xAxis = crossVectors(yAxis, zAxis); - const matrix = [ - xAxis[0], - xAxis[1], - xAxis[2], - yAxis[0], - yAxis[1], - yAxis[2], - zAxis[0], - zAxis[1], - zAxis[2] - ]; - const angle = rotationMatrixToEulerAngle(matrix); - const gaze = mesh.length === 478 ? calculateGaze(face4) : { bearing: 0, strength: 0 }; - return { angle, matrix, gaze }; -}; - -// src/face/face.ts -var detectFace = async (instance2, input) => { - var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C; - let timeStamp = now(); - let ageRes; - let gearRes; - let genderRes; - let emotionRes; - let mobilefacenetRes; - let insightfaceRes; - let antispoofRes; - let livenessRes; - let descRes; - const faceRes = []; - instance2.state = "run:face"; - const faces = await predict6(input, instance2.config); - instance2.performance.face = env.perfadd ? (instance2.performance.face || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - if (!input.shape || input.shape.length !== 4) - return []; - if (!faces) - return []; - for (let i = 0; i < faces.length; i++) { - instance2.analyze("Get Face"); - if (!faces[i].tensor || faces[i].tensor.isDisposedInternal) { - log("Face object is disposed:", faces[i].tensor); - continue; - } - if ((_a = instance2.config.face.detector) == null ? void 0 : _a.mask) { - const masked = await mask(faces[i]); - tf37.dispose(faces[i].tensor); - if (masked) - faces[i].tensor = masked; - } - const rotation = faces[i].mesh && faces[i].mesh.length > 200 ? calculateFaceAngle(faces[i], [input.shape[2], input.shape[1]]) : null; - instance2.analyze("Start Emotion:"); - if (instance2.config.async) { - emotionRes = ((_b = instance2.config.face.emotion) == null ? void 0 : _b.enabled) ? predict5(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : []; - } else { - instance2.state = "run:emotion"; - timeStamp = now(); - emotionRes = ((_c = instance2.config.face.emotion) == null ? void 0 : _c.enabled) ? await predict5(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : []; - instance2.performance.emotion = env.perfadd ? (instance2.performance.emotion || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - } - instance2.analyze("End Emotion:"); - instance2.analyze("Start AntiSpoof:"); - if (instance2.config.async) { - antispoofRes = ((_d = instance2.config.face.antispoof) == null ? void 0 : _d.enabled) ? predict(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : 0; - } else { - instance2.state = "run:antispoof"; - timeStamp = now(); - antispoofRes = ((_e = instance2.config.face.antispoof) == null ? void 0 : _e.enabled) ? await predict(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : 0; - instance2.performance.antispoof = env.perfadd ? (instance2.performance.antispoof || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - } - instance2.analyze("End AntiSpoof:"); - instance2.analyze("Start Liveness:"); - if (instance2.config.async) { - livenessRes = ((_f = instance2.config.face.liveness) == null ? void 0 : _f.enabled) ? predict12(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : 0; - } else { - instance2.state = "run:liveness"; - timeStamp = now(); - livenessRes = ((_g = instance2.config.face.liveness) == null ? void 0 : _g.enabled) ? await predict12(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : 0; - instance2.performance.liveness = env.perfadd ? (instance2.performance.antispoof || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - } - instance2.analyze("End Liveness:"); - instance2.analyze("Start GEAR:"); - if (instance2.config.async) { - gearRes = ((_h = instance2.config.face.gear) == null ? void 0 : _h.enabled) ? predict8(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : null; - } else { - instance2.state = "run:gear"; - timeStamp = now(); - gearRes = ((_i = instance2.config.face.gear) == null ? void 0 : _i.enabled) ? await predict8(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : null; - instance2.performance.gear = Math.trunc(now() - timeStamp); - } - instance2.analyze("End GEAR:"); - instance2.analyze("Start SSRNet:"); - if (instance2.config.async) { - ageRes = ((_j = instance2.config.face["ssrnet"]) == null ? void 0 : _j.enabled) ? predict20(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : null; - genderRes = ((_k = instance2.config.face["ssrnet"]) == null ? void 0 : _k.enabled) ? predict21(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : null; - } else { - instance2.state = "run:ssrnet"; - timeStamp = now(); - ageRes = ((_l = instance2.config.face["ssrnet"]) == null ? void 0 : _l.enabled) ? await predict20(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : null; - genderRes = ((_m = instance2.config.face["ssrnet"]) == null ? void 0 : _m.enabled) ? await predict21(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : null; - instance2.performance.ssrnet = Math.trunc(now() - timeStamp); - } - instance2.analyze("End SSRNet:"); - instance2.analyze("Start MobileFaceNet:"); - if (instance2.config.async) { - mobilefacenetRes = ((_n = instance2.config.face["mobilefacenet"]) == null ? void 0 : _n.enabled) ? predict14(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : null; - } else { - instance2.state = "run:mobilefacenet"; - timeStamp = now(); - mobilefacenetRes = ((_o = instance2.config.face["mobilefacenet"]) == null ? void 0 : _o.enabled) ? await predict14(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : null; - instance2.performance.mobilefacenet = Math.trunc(now() - timeStamp); - } - instance2.analyze("End MobileFaceNet:"); - instance2.analyze("Start InsightFace:"); - if (instance2.config.async) { - insightfaceRes = ((_p = instance2.config.face["insightface"]) == null ? void 0 : _p.enabled) ? predict11(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : null; - } else { - instance2.state = "run:mobilefacenet"; - timeStamp = now(); - insightfaceRes = ((_q = instance2.config.face["insightface"]) == null ? void 0 : _q.enabled) ? await predict11(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : null; - instance2.performance.mobilefacenet = Math.trunc(now() - timeStamp); - } - instance2.analyze("End InsightFace:"); - instance2.analyze("Start Description:"); - if (instance2.config.async) { - descRes = predict7(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length); - } else { - instance2.state = "run:description"; - timeStamp = now(); - descRes = await predict7(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length); - instance2.performance.description = env.perfadd ? (instance2.performance.description || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - } - instance2.analyze("End Description:"); - if (instance2.config.async) { - [ageRes, genderRes, emotionRes, mobilefacenetRes, insightfaceRes, descRes, gearRes, antispoofRes, livenessRes] = await Promise.all([ageRes, genderRes, emotionRes, mobilefacenetRes, insightfaceRes, descRes, gearRes, antispoofRes, livenessRes]); - } - instance2.analyze("Finish Face:"); - if (((_r = instance2.config.face["ssrnet"]) == null ? void 0 : _r.enabled) && ageRes && genderRes) { - descRes = { - ...descRes, - age: ageRes.age, - gender: genderRes.gender, - genderScore: genderRes.genderScore - }; - } - if (((_s = instance2.config.face.gear) == null ? void 0 : _s.enabled) && gearRes) { - descRes = { - ...descRes, - age: gearRes.age, - gender: gearRes.gender, - genderScore: gearRes.genderScore, - race: gearRes.race - }; - } - if (((_t = instance2.config.face["mobilefacenet"]) == null ? void 0 : _t.enabled) && mobilefacenetRes) { - descRes.descriptor = mobilefacenetRes; - } - if (((_u = instance2.config.face["insightface"]) == null ? void 0 : _u.enabled) && insightfaceRes) { - descRes.descriptor = insightfaceRes; - } - if (!((_v = instance2.config.face.iris) == null ? void 0 : _v.enabled)) { - } - const irisSize = ((_y = (_x = (_w = faces[i]) == null ? void 0 : _w.annotations) == null ? void 0 : _x.leftEyeIris) == null ? void 0 : _y[0]) && ((_B = (_A = (_z = faces[i]) == null ? void 0 : _z.annotations) == null ? void 0 : _A.rightEyeIris) == null ? void 0 : _B[0]) && faces[i].annotations.leftEyeIris.length > 0 && faces[i].annotations.rightEyeIris.length > 0 && faces[i].annotations.leftEyeIris[0] !== null && faces[i].annotations.rightEyeIris[0] !== null ? Math.max(Math.abs(faces[i].annotations.leftEyeIris[3][0] - faces[i].annotations.leftEyeIris[1][0]), Math.abs(faces[i].annotations.rightEyeIris[4][1] - faces[i].annotations.rightEyeIris[2][1])) / input.shape[2] : 0; - const tensor6 = ((_C = instance2.config.face.detector) == null ? void 0 : _C.return) ? tf37.squeeze(faces[i].tensor) : null; - tf37.dispose(faces[i].tensor); - if (faces[i].tensor) - delete faces[i].tensor; - const res = { - ...faces[i], - id: i - }; - if (descRes.age) - res.age = descRes.age; - if (descRes.gender) - res.gender = descRes.gender; - if (descRes.genderScore) - res.genderScore = descRes.genderScore; - if (descRes.descriptor) - res.embedding = descRes.descriptor; - if (descRes.race) - res.race = descRes.race; - if (emotionRes) - res.emotion = emotionRes; - if (antispoofRes) - res.real = antispoofRes; - if (livenessRes) - res.live = livenessRes; - if (irisSize && irisSize !== 0) - res.iris = Math.trunc(500 / irisSize / 11.7) / 100; - if (rotation) - res.rotation = rotation; - if (tensor6) - res.tensor = tensor6; - faceRes.push(res); - instance2.analyze("End Face"); - } - instance2.analyze("End FaceMesh:"); - if (instance2.config.async) { - if (instance2.performance.face) - delete instance2.performance.face; - if (instance2.performance.age) - delete instance2.performance.age; - if (instance2.performance.gender) - delete instance2.performance.gender; - if (instance2.performance.emotion) - delete instance2.performance.emotion; - } - return faceRes; -}; - -// src/gesture/gesture.ts -var body2 = (res) => { - if (!res) - return []; - const gestures = []; - for (let i = 0; i < res.length; i++) { - const leftWrist = res[i].keypoints.find((a) => a.part === "leftWrist"); - const rightWrist = res[i].keypoints.find((a) => a.part === "rightWrist"); - const nose = res[i].keypoints.find((a) => a.part === "nose"); - if (nose && leftWrist && rightWrist && leftWrist.position[1] < nose.position[1] && rightWrist.position[1] < nose.position[1]) - gestures.push({ body: i, gesture: "i give up" }); - else if (nose && leftWrist && leftWrist.position[1] < nose.position[1]) - gestures.push({ body: i, gesture: "raise left hand" }); - else if (nose && rightWrist && rightWrist.position[1] < nose.position[1]) - gestures.push({ body: i, gesture: "raise right hand" }); - const leftShoulder = res[i].keypoints.find((a) => a.part === "leftShoulder"); - const rightShoulder = res[i].keypoints.find((a) => a.part === "rightShoulder"); - if (leftShoulder && rightShoulder && Math.abs(leftShoulder.positionRaw[1] - rightShoulder.positionRaw[1]) > 0.1) { - gestures.push({ body: i, gesture: `leaning ${leftShoulder.position[1] > rightShoulder.position[1] ? "left" : "right"}` }); - } - } - return gestures; -}; -var face2 = (res) => { - if (!res) - return []; - const gestures = []; - for (let i = 0; i < res.length; i++) { - if (res[i].mesh && res[i].mesh.length > 450) { - const zDiff = (res[i].mesh[33][2] || 0) - (res[i].mesh[263][2] || 0); - const xDiff = res[i].mesh[33][0] - res[i].mesh[263][0]; - if (Math.abs(zDiff / xDiff) <= 0.15) - gestures.push({ face: i, gesture: "facing center" }); - else - gestures.push({ face: i, gesture: `facing ${zDiff < 0 ? "left" : "right"}` }); - const openLeft = Math.abs(res[i].mesh[374][1] - res[i].mesh[386][1]) / Math.abs(res[i].mesh[443][1] - res[i].mesh[450][1]); - if (openLeft < 0.2) - gestures.push({ face: i, gesture: "blink left eye" }); - const openRight = Math.abs(res[i].mesh[145][1] - res[i].mesh[159][1]) / Math.abs(res[i].mesh[223][1] - res[i].mesh[230][1]); - if (openRight < 0.2) - gestures.push({ face: i, gesture: "blink right eye" }); - const mouthOpen = Math.min(100, 500 * Math.abs(res[i].mesh[13][1] - res[i].mesh[14][1]) / Math.abs(res[i].mesh[10][1] - res[i].mesh[152][1])); - if (mouthOpen > 10) - gestures.push({ face: i, gesture: `mouth ${Math.trunc(mouthOpen)}% open` }); - const chinDepth = res[i].mesh[152][2] || 0; - if (Math.abs(chinDepth) > 10) - gestures.push({ face: i, gesture: `head ${chinDepth < 0 ? "up" : "down"}` }); - } - } - return gestures; -}; -var iris2 = (res) => { - var _a, _b, _c, _d; - if (!res) - return []; - const gestures = []; - for (let i = 0; i < res.length; i++) { - if (!((_b = (_a = res[i].annotations) == null ? void 0 : _a.leftEyeIris) == null ? void 0 : _b[0]) || !((_d = (_c = res[i].annotations) == null ? void 0 : _c.rightEyeIris) == null ? void 0 : _d[0])) - continue; - const sizeXLeft = res[i].annotations.leftEyeIris[3][0] - res[i].annotations.leftEyeIris[1][0]; - const sizeYLeft = res[i].annotations.leftEyeIris[4][1] - res[i].annotations.leftEyeIris[2][1]; - const areaLeft = Math.abs(sizeXLeft * sizeYLeft); - const sizeXRight = res[i].annotations.rightEyeIris[3][0] - res[i].annotations.rightEyeIris[1][0]; - const sizeYRight = res[i].annotations.rightEyeIris[4][1] - res[i].annotations.rightEyeIris[2][1]; - const areaRight = Math.abs(sizeXRight * sizeYRight); - let center = false; - const difference = Math.abs(areaLeft - areaRight) / Math.max(areaLeft, areaRight); - if (difference < 0.25) { - center = true; - gestures.push({ iris: i, gesture: "facing center" }); - } - const leftIrisCenterX = Math.abs(res[i].mesh[263][0] - res[i].annotations.leftEyeIris[0][0]) / res[i].box[2]; - const rightIrisCenterX = Math.abs(res[i].mesh[33][0] - res[i].annotations.rightEyeIris[0][0]) / res[i].box[2]; - if (leftIrisCenterX > 0.06 || rightIrisCenterX > 0.06) - center = false; - if (leftIrisCenterX > rightIrisCenterX) { - if (leftIrisCenterX > 0.05) - gestures.push({ iris: i, gesture: "looking right" }); - } else { - if (rightIrisCenterX > 0.05) - gestures.push({ iris: i, gesture: "looking left" }); - } - const rightIrisCenterY = Math.abs(res[i].mesh[145][1] - res[i].annotations.rightEyeIris[0][1]) / res[i].box[3]; - const leftIrisCenterY = Math.abs(res[i].mesh[374][1] - res[i].annotations.leftEyeIris[0][1]) / res[i].box[3]; - if (leftIrisCenterY < 0.01 || rightIrisCenterY < 0.01 || leftIrisCenterY > 0.022 || rightIrisCenterY > 0.022) - center = false; - if (leftIrisCenterY < 0.01 || rightIrisCenterY < 0.01) - gestures.push({ iris: i, gesture: "looking down" }); - if (leftIrisCenterY > 0.022 || rightIrisCenterY > 0.022) - gestures.push({ iris: i, gesture: "looking up" }); - if (center) - gestures.push({ iris: i, gesture: "looking center" }); - } - return gestures; -}; -var hand2 = (res) => { - if (!res) - return []; - const gestures = []; - for (let i = 0; i < res.length; i++) { - const fingers = []; - if (res[i].annotations) { - for (const [finger, pos] of Object.entries(res[i].annotations)) { - if (finger !== "palmBase" && Array.isArray(pos) && pos[0]) - fingers.push({ name: finger.toLowerCase(), position: pos[0] }); - } - } - if (fingers && fingers.length > 0) { - const closest = fingers.reduce((best, a) => (best.position[2] || 0) < (a.position[2] || 0) ? best : a); - gestures.push({ hand: i, gesture: `${closest.name} forward` }); - const highest = fingers.reduce((best, a) => best.position[1] < a.position[1] ? best : a); - gestures.push({ hand: i, gesture: `${highest.name} up` }); - } - if (res[i].keypoints) { - const poses = match(res[i].keypoints); - for (const pose of poses) - gestures.push({ hand: i, gesture: pose.name }); - } - } - return gestures; -}; - -// src/util/interpolate.ts -var bufferedResult = { face: [], body: [], hand: [], gesture: [], object: [], persons: [], performance: {}, timestamp: 0, error: null }; -var interpolateTime = 0; -function calc2(newResult, config3) { - var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w; - const t0 = now(); - if (!newResult) - return { face: [], body: [], hand: [], gesture: [], object: [], persons: [], performance: {}, timestamp: 0, error: null }; - const elapsed = Date.now() - newResult.timestamp; - const bufferedFactor = elapsed < 1e3 ? 8 - Math.log(elapsed + 1) : 1; - if (newResult.canvas) - bufferedResult.canvas = newResult.canvas; - if (newResult.error) - bufferedResult.error = newResult.error; - if (!bufferedResult.body || newResult.body.length !== bufferedResult.body.length) { - bufferedResult.body = JSON.parse(JSON.stringify(newResult.body)); - } else { - for (let i = 0; i < newResult.body.length; i++) { - const box = newResult.body[i].box.map((newBoxCoord, j) => ((bufferedFactor - 1) * bufferedResult.body[i].box[j] + newBoxCoord) / bufferedFactor); - const boxRaw = newResult.body[i].boxRaw.map((newBoxCoord, j) => ((bufferedFactor - 1) * bufferedResult.body[i].boxRaw[j] + newBoxCoord) / bufferedFactor); - const keypoints = newResult.body[i].keypoints.map((newKpt, j) => { - var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2; - return { - score: newKpt.score, - part: newKpt.part, - position: [ - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].position[0] || 0) + (newKpt.position[0] || 0)) / bufferedFactor : newKpt.position[0], - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].position[1] || 0) + (newKpt.position[1] || 0)) / bufferedFactor : newKpt.position[1], - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].position[2] || 0) + (newKpt.position[2] || 0)) / bufferedFactor : newKpt.position[2] - ], - positionRaw: [ - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].positionRaw[0] || 0) + (newKpt.positionRaw[0] || 0)) / bufferedFactor : newKpt.positionRaw[0], - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].positionRaw[1] || 0) + (newKpt.positionRaw[1] || 0)) / bufferedFactor : newKpt.positionRaw[1], - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].positionRaw[2] || 0) + (newKpt.positionRaw[2] || 0)) / bufferedFactor : newKpt.positionRaw[2] - ], - distance: [ - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (((_a2 = bufferedResult.body[i].keypoints[j].distance) == null ? void 0 : _a2[0]) || 0) + (((_b2 = newKpt.distance) == null ? void 0 : _b2[0]) || 0)) / bufferedFactor : (_c2 = newKpt.distance) == null ? void 0 : _c2[0], - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (((_d2 = bufferedResult.body[i].keypoints[j].distance) == null ? void 0 : _d2[1]) || 0) + (((_e2 = newKpt.distance) == null ? void 0 : _e2[1]) || 0)) / bufferedFactor : (_f2 = newKpt.distance) == null ? void 0 : _f2[1], - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (((_g2 = bufferedResult.body[i].keypoints[j].distance) == null ? void 0 : _g2[2]) || 0) + (((_h2 = newKpt.distance) == null ? void 0 : _h2[2]) || 0)) / bufferedFactor : (_i2 = newKpt.distance) == null ? void 0 : _i2[2] - ] - }; - }); - const annotations2 = {}; - let coords = { connected: {} }; - if ((_a = config3.body.modelPath) == null ? void 0 : _a.includes("efficientpose")) - coords = efficientposecoords_exports; - else if ((_b = config3.body.modelPath) == null ? void 0 : _b.includes("blazepose")) - coords = blazeposecoords_exports; - else if ((_c = config3.body.modelPath) == null ? void 0 : _c.includes("movenet")) - coords = movenetcoords_exports; - for (const [name, indexes] of Object.entries(coords.connected)) { - const pt = []; - for (let j = 0; j < indexes.length - 1; j++) { - const pt0 = keypoints.find((kp) => kp.part === indexes[j]); - const pt1 = keypoints.find((kp) => kp.part === indexes[j + 1]); - if (pt0 && pt1) - pt.push([pt0.position, pt1.position]); - } - annotations2[name] = pt; - } - bufferedResult.body[i] = { ...newResult.body[i], box, boxRaw, keypoints, annotations: annotations2 }; - } - } - if (!bufferedResult.hand || newResult.hand.length !== bufferedResult.hand.length) { - bufferedResult.hand = JSON.parse(JSON.stringify(newResult.hand)); - } else { - for (let i = 0; i < newResult.hand.length; i++) { - const box = newResult.hand[i].box.map((b, j) => ((bufferedFactor - 1) * bufferedResult.hand[i].box[j] + b) / bufferedFactor); - const boxRaw = newResult.hand[i].boxRaw.map((b, j) => ((bufferedFactor - 1) * bufferedResult.hand[i].boxRaw[j] + b) / bufferedFactor); - if (bufferedResult.hand[i].keypoints.length !== newResult.hand[i].keypoints.length) - bufferedResult.hand[i].keypoints = newResult.hand[i].keypoints; - const keypoints = newResult.hand[i].keypoints && newResult.hand[i].keypoints.length > 0 ? newResult.hand[i].keypoints.map((landmark, j) => landmark.map((coord, k) => ((bufferedFactor - 1) * (bufferedResult.hand[i].keypoints[j][k] || 1) + (coord || 0)) / bufferedFactor)) : []; - let annotations2 = {}; - if (Object.keys(bufferedResult.hand[i].annotations).length !== Object.keys(newResult.hand[i].annotations).length) { - bufferedResult.hand[i].annotations = newResult.hand[i].annotations; - annotations2 = bufferedResult.hand[i].annotations; - } else if (newResult.hand[i].annotations) { - for (const key of Object.keys(newResult.hand[i].annotations)) { - annotations2[key] = ((_f = (_e = (_d = newResult.hand[i]) == null ? void 0 : _d.annotations) == null ? void 0 : _e[key]) == null ? void 0 : _f[0]) ? newResult.hand[i].annotations[key].map((val, j) => val.map((coord, k) => ((bufferedFactor - 1) * bufferedResult.hand[i].annotations[key][j][k] + coord) / bufferedFactor)) : null; - } - } - bufferedResult.hand[i] = { ...newResult.hand[i], box, boxRaw, keypoints, annotations: annotations2 }; - } - } - if (!bufferedResult.face || newResult.face.length !== bufferedResult.face.length) { - bufferedResult.face = JSON.parse(JSON.stringify(newResult.face)); - } else { - for (let i = 0; i < newResult.face.length; i++) { - const box = newResult.face[i].box.map((b, j) => ((bufferedFactor - 1) * bufferedResult.face[i].box[j] + b) / bufferedFactor); - const boxRaw = newResult.face[i].boxRaw.map((b, j) => ((bufferedFactor - 1) * bufferedResult.face[i].boxRaw[j] + b) / bufferedFactor); - if (newResult.face[i].rotation) { - const rotation = { matrix: [0, 0, 0, 0, 0, 0, 0, 0, 0], angle: { roll: 0, yaw: 0, pitch: 0 }, gaze: { bearing: 0, strength: 0 } }; - rotation.matrix = (_g = newResult.face[i].rotation) == null ? void 0 : _g.matrix; - rotation.angle = { - roll: ((bufferedFactor - 1) * (((_i = (_h = bufferedResult.face[i].rotation) == null ? void 0 : _h.angle) == null ? void 0 : _i.roll) || 0) + (((_k = (_j = newResult.face[i].rotation) == null ? void 0 : _j.angle) == null ? void 0 : _k.roll) || 0)) / bufferedFactor, - yaw: ((bufferedFactor - 1) * (((_m = (_l = bufferedResult.face[i].rotation) == null ? void 0 : _l.angle) == null ? void 0 : _m.yaw) || 0) + (((_o = (_n = newResult.face[i].rotation) == null ? void 0 : _n.angle) == null ? void 0 : _o.yaw) || 0)) / bufferedFactor, - pitch: ((bufferedFactor - 1) * (((_q = (_p = bufferedResult.face[i].rotation) == null ? void 0 : _p.angle) == null ? void 0 : _q.pitch) || 0) + (((_s = (_r = newResult.face[i].rotation) == null ? void 0 : _r.angle) == null ? void 0 : _s.pitch) || 0)) / bufferedFactor - }; - rotation.gaze = { - bearing: ((bufferedFactor - 1) * (((_t = bufferedResult.face[i].rotation) == null ? void 0 : _t.gaze.bearing) || 0) + (((_u = newResult.face[i].rotation) == null ? void 0 : _u.gaze.bearing) || 0)) / bufferedFactor, - strength: ((bufferedFactor - 1) * (((_v = bufferedResult.face[i].rotation) == null ? void 0 : _v.gaze.strength) || 0) + (((_w = newResult.face[i].rotation) == null ? void 0 : _w.gaze.strength) || 0)) / bufferedFactor - }; - bufferedResult.face[i] = { ...newResult.face[i], rotation, box, boxRaw }; - } else { - bufferedResult.face[i] = { ...newResult.face[i], box, boxRaw }; - } - } - } - if (!bufferedResult.object || newResult.object.length !== bufferedResult.object.length) { - bufferedResult.object = JSON.parse(JSON.stringify(newResult.object)); - } else { - for (let i = 0; i < newResult.object.length; i++) { - const box = newResult.object[i].box.map((b, j) => ((bufferedFactor - 1) * bufferedResult.object[i].box[j] + b) / bufferedFactor); - const boxRaw = newResult.object[i].boxRaw.map((b, j) => ((bufferedFactor - 1) * bufferedResult.object[i].boxRaw[j] + b) / bufferedFactor); - bufferedResult.object[i] = { ...newResult.object[i], box, boxRaw }; - } - } - if (newResult.persons) { - const newPersons = newResult.persons; - if (!bufferedResult.persons || newPersons.length !== bufferedResult.persons.length) { - bufferedResult.persons = JSON.parse(JSON.stringify(newPersons)); - } else { - for (let i = 0; i < newPersons.length; i++) { - bufferedResult.persons[i].box = newPersons[i].box.map((box, j) => ((bufferedFactor - 1) * bufferedResult.persons[i].box[j] + box) / bufferedFactor); - } - } - } - if (newResult.gesture) - bufferedResult.gesture = newResult.gesture; - const t1 = now(); - interpolateTime = env.perfadd ? interpolateTime + Math.round(t1 - t0) : Math.round(t1 - t0); - if (newResult.performance) - bufferedResult.performance = { ...newResult.performance, interpolate: interpolateTime }; - return bufferedResult; -} - -// src/face/match.ts -var match_exports = {}; -__export(match_exports, { - distance: () => distance, - match: () => match2, - similarity: () => similarity -}); -function distance(descriptor1, descriptor2, options4 = { order: 2, multiplier: 25 }) { - if (!descriptor1 || !descriptor1) - return Number.MAX_SAFE_INTEGER; - let sum3 = 0; - for (let i = 0; i < descriptor1.length; i++) { - const diff = !options4.order || options4.order === 2 ? descriptor1[i] - descriptor2[i] : Math.abs(descriptor1[i] - descriptor2[i]); - sum3 += !options4.order || options4.order === 2 ? diff * diff : diff ** options4.order; - } - return (options4.multiplier || 20) * sum3; -} -var normalizeDistance = (dist, order, min2, max4) => { - if (dist === 0) - return 1; - const root = order === 2 ? Math.sqrt(dist) : dist ** (1 / order); - const norm = (1 - root / 100 - min2) / (max4 - min2); - const clamp2 = Math.max(Math.min(norm, 1), 0); - return clamp2; -}; -function similarity(descriptor1, descriptor2, options4 = { order: 2, multiplier: 25, min: 0.2, max: 0.8 }) { - const dist = distance(descriptor1, descriptor2, options4); - return normalizeDistance(dist, options4.order || 2, options4.min || 0, options4.max || 1); -} -function match2(descriptor, descriptors, options4 = { order: 2, multiplier: 25, threshold: 0, min: 0.2, max: 0.8 }) { - if (!Array.isArray(descriptor) || !Array.isArray(descriptors) || descriptor.length < 64 || descriptors.length === 0) { - return { index: -1, distance: Number.POSITIVE_INFINITY, similarity: 0 }; - } - let lowestDistance = Number.MAX_SAFE_INTEGER; - let index2 = -1; - for (let i = 0; i < descriptors.length; i++) { - const res = descriptors[i].length === descriptor.length ? distance(descriptor, descriptors[i], options4) : Number.MAX_SAFE_INTEGER; - if (res < lowestDistance) { - lowestDistance = res; - index2 = i; - } - if (lowestDistance < (options4.threshold || 0)) - break; - } - const normalizedSimilarity = normalizeDistance(lowestDistance, options4.order || 2, options4.min || 0, options4.max || 1); - return { index: index2, distance: lowestDistance, similarity: normalizedSimilarity }; -} - -// src/util/persons.ts -function join2(faces, bodies, hands, gestures, shape) { - var _a, _b, _c, _d, _e, _f; - let id = 0; - const persons = []; - for (const face4 of faces) { - const person2 = { id: id++, face: face4, body: null, hands: { left: null, right: null }, gestures: [], box: [0, 0, 0, 0] }; - for (const body4 of bodies) { - if (face4.box[0] > body4.box[0] && face4.box[0] < body4.box[0] + body4.box[2] && face4.box[1] + face4.box[3] > body4.box[1] && face4.box[1] + face4.box[3] < body4.box[1] + body4.box[3]) { - person2.body = body4; - } - } - if (person2.body) { - for (const hand3 of hands) { - if (hand3.box[0] + hand3.box[2] > person2.body.box[0] && hand3.box[0] + hand3.box[2] < person2.body.box[0] + person2.body.box[2] && hand3.box[1] + hand3.box[3] > person2.body.box[1] && hand3.box[1] + hand3.box[3] < person2.body.box[1] + person2.body.box[3]) { - if (person2.hands) - person2.hands.left = hand3; - } - if (hand3.box[0] < person2.body.box[0] + person2.body.box[2] && hand3.box[0] > person2.body.box[0] && hand3.box[1] + hand3.box[3] > person2.body.box[1] && hand3.box[1] + hand3.box[3] < person2.body.box[1] + person2.body.box[3]) { - if (person2.hands) - person2.hands.right = hand3; - } - } - } - for (const gesture2 of gestures) { - if (gesture2["face"] !== void 0 && gesture2["face"] === face4.id) - person2.gestures.push(gesture2); - else if (gesture2["iris"] !== void 0 && gesture2["iris"] === face4.id) - person2.gestures.push(gesture2); - else if (gesture2["body"] !== void 0 && gesture2["body"] === ((_a = person2.body) == null ? void 0 : _a.id)) - person2.gestures.push(gesture2); - else if (gesture2["hand"] !== void 0 && gesture2["hand"] === ((_b = person2.hands.left) == null ? void 0 : _b.id)) - person2.gestures.push(gesture2); - else if (gesture2["hand"] !== void 0 && gesture2["hand"] === ((_c = person2.hands.right) == null ? void 0 : _c.id)) - person2.gestures.push(gesture2); - } - const x = []; - const y = []; - const extractXY = (box) => { - if (box && box.length === 4) { - x.push(box[0], box[0] + box[2]); - y.push(box[1], box[1] + box[3]); - } - }; - extractXY(person2.face.box); - extractXY((_d = person2.body) == null ? void 0 : _d.box); - extractXY((_e = person2.hands.left) == null ? void 0 : _e.box); - extractXY((_f = person2.hands.right) == null ? void 0 : _f.box); - const minX = Math.min(...x); - const minY = Math.min(...y); - person2.box = [minX, minY, Math.max(...x) - minX, Math.max(...y) - minY]; - if ((shape == null ? void 0 : shape[1]) && (shape == null ? void 0 : shape[2])) - person2.boxRaw = [person2.box[0] / shape[2], person2.box[1] / shape[1], person2.box[2] / shape[2], person2.box[3] / shape[1]]; - persons.push(person2); - } - return persons; -} - -// src/sample.ts -var face3 = ` + ${e.box[0]} ${r}, + ${e.box[0]+e.box[2]} ${r}, + ${e.box[0]+e.box[2]} ${e.box[1]+e.box[3]/2} + `);t.stroke(A),t.stroke(s)}}function FA(e,t){var n;if(K.drawGaze&&((n=e.rotation)==null?void 0:n.gaze.strength)&&e.rotation.gaze.bearing&&e.annotations.leftEyeIris&&e.annotations.rightEyeIris&&e.annotations.leftEyeIris[0]&&e.annotations.rightEyeIris[0]){t.strokeStyle="pink",t.fillStyle="pink";let o=[e.annotations.leftEyeIris[0][0]+Math.sin(e.rotation.gaze.bearing)*e.rotation.gaze.strength*e.box[3],e.annotations.leftEyeIris[0][1]+Math.cos(e.rotation.gaze.bearing)*e.rotation.gaze.strength*e.box[2]];m1(t,[e.annotations.leftEyeIris[0][0],e.annotations.leftEyeIris[0][1]],[o[0],o[1]],4);let r=[e.annotations.rightEyeIris[0][0]+Math.sin(e.rotation.gaze.bearing)*e.rotation.gaze.strength*e.box[3],e.annotations.rightEyeIris[0][1]+Math.cos(e.rotation.gaze.bearing)*e.rotation.gaze.strength*e.box[2]];m1(t,[e.annotations.rightEyeIris[0][0],e.annotations.rightEyeIris[0][1]],[r[0],r[1]],4)}}function GA(e,t){if(K.drawPolygons&&e.mesh.length>=468){t.lineWidth=1;for(let n=0;ne.mesh[r]);f1(t,o,K)}LA(e,t)}}function BA(e,t){if(K.drawPoints&&e.mesh.length>=468)for(let n=0;n0&&(BA(r,o),GA(r,o),WA(r,o),FA(r,o))}}function T2(e,t,n){let o=s0(S0,n);if(!t||!e)return;let r=K0(e);if(!!r){r.lineJoin="round";for(let s=0;s0)for(let A of s.keypoints)r.fillStyle=ve(A[2],o),Pe(r,A[0],A[1],0,o);if(o.drawLabels&&s.annotations){let A=(a,l)=>{if(!a||a.length===0||!a[0])return;let c=a[a.length-1][2]||-256;r.fillStyle=ve(c,o),r.fillText(l,a[a.length-1][0]+4,a[a.length-1][1]+4)};r.font=o.font,A(s.annotations.index,"index"),A(s.annotations.middle,"middle"),A(s.annotations.ring,"ring"),A(s.annotations.pinky,"pinky"),A(s.annotations.thumb,"thumb"),A(s.annotations.palm,"palm")}if(o.drawPolygons&&s.annotations){let A=a=>{if(!(!a||a.length===0||!a[0]))for(let l=0;l0?l-1:0][0],a[l>0?l-1:0][1]),r.lineTo(a[l][0],a[l][1]),r.stroke()}};r.lineWidth=o.lineWidth,A(s.annotations.index),A(s.annotations.middle),A(s.annotations.ring),A(s.annotations.pinky),A(s.annotations.thumb)}}}}function P2(e,t,n){let o=s0(S0,n);if(!t||!e)return;let r=K0(e);if(!!r){r.lineJoin="round",r.font=o.font;for(let s of t)if(o.drawBoxes){if(r.strokeStyle=o.color,r.fillStyle=o.color,pe(r,s.box[0],s.box[1],s.box[2],s.box[3],o),o.drawLabels){let A=`${s.label} ${Math.round(100*s.score)}%`;o.shadowColor&&o.shadowColor!==""&&(r.fillStyle=o.shadowColor,r.fillText(A,s.box[0]+3,1+s.box[1]+o.lineHeight,s.box[2])),r.fillStyle=o.labelColor,r.fillText(A,s.box[0]+2,0+s.box[1]+o.lineHeight,s.box[2])}r.stroke()}}}function R2(e,t,n){let o=s0(S0,n);if(!(!t||!e)&&o.drawGestures){let r=K0(e);if(!r)return;r.font=o.font,r.fillStyle=o.color;let s=1;for(let A=0;A1&&l[1].length>0){let c=a[1]>0?`#${a[1]}`:"",x=`${a[0]} ${c}: ${l[1]}`;o.shadowColor&&o.shadowColor!==""&&(r.fillStyle=o.shadowColor,r.fillText(x,8,2+s*o.lineHeight)),r.fillStyle=o.labelColor,r.fillText(x,6,0+s*o.lineHeight),s+=1}}}}var p1=0;function u1(e,t,n){let o=s0(S0,n);if(!t||!e)return;let r=K0(e);if(!!r){r.lineJoin="round",r.font=o.font;for(let s=0;st!=n[r].y>t&&e<(n[r].x-n[s].x)*(t-n[s].y)/(n[r].y-n[s].y)+n[s].x&&(o=!o);return o}async function Ro(e){if(!e.tensor||!e.mesh||e.mesh.length<100)return e.tensor;let t=e.tensor.shape[2]||0,n=e.tensor.shape[1]||0,o=await e.tensor.buffer(),r=[];for(let A of te.silhouette)r.push({x:(e.mesh[A][0]-e.box[0])/e.box[2],y:(e.mesh[A][1]-e.box[1])/e.box[3]});k2&&k2>0&&(r=r.map(A=>({x:A.x>.5?A.x+k2:A.x-k2,y:A.y>.5?A.y+k2:A.y-k2})));for(let A=0;A{let t=(i,f)=>Math.atan2(i[1]-f[1],i[0]-f[0]);if(!e.annotations.rightEyeIris||!e.annotations.leftEyeIris)return{bearing:0,strength:0};let n=[0,-.1],o=1,r=(e.mesh[33][2]||0)>(e.mesh[263][2]||0),s=r?e.mesh[473]:e.mesh[468],A=r?[(e.mesh[133][0]+e.mesh[33][0])/2,(e.mesh[133][1]+e.mesh[33][1])/2]:[(e.mesh[263][0]+e.mesh[362][0])/2,(e.mesh[263][1]+e.mesh[362][1])/2],a=r?[e.mesh[133][0]-e.mesh[33][0],e.mesh[23][1]-e.mesh[27][1]]:[e.mesh[263][0]-e.mesh[362][0],e.mesh[253][1]-e.mesh[257][1]],l=[(A[0]-s[0])/a[0]-n[0],o*(s[1]-A[1])/a[1]-n[1]],c=Math.sqrt(l[0]*l[0]+l[1]*l[1]);return c=Math.min(c,e.boxRaw[2]/2,e.boxRaw[3]/2),{bearing:(t([0,0],l)+Math.PI/2)%Math.PI,strength:c}},ko=(e,t)=>{let n=p=>{let g=Math.sqrt(p[0]*p[0]+p[1]*p[1]+p[2]*p[2]);return p[0]/=g,p[1]/=g,p[2]/=g,p},o=(p,g)=>{let v=p[0]-g[0],T=p[1]-g[1],y=p[2]-g[2];return[v,T,y]},r=(p,g)=>{let v=p[1]*g[2]-p[2]*g[1],T=p[2]*g[0]-p[0]*g[2],y=p[0]*g[1]-p[1]*g[0];return[v,T,y]},s=p=>{let[g,v,T,y,b,z,w,O,q]=p,t0,Z,U;return y<1?y>-1?(U=Math.asin(y),Z=Math.atan2(-w,g),t0=Math.atan2(-z,b)):(U=-Math.PI/2,Z=-Math.atan2(O,q),t0=0):(U=Math.PI/2,Z=Math.atan2(O,q),t0=0),Number.isNaN(t0)&&(t0=0),Number.isNaN(Z)&&(Z=0),Number.isNaN(U)&&(U=0),{pitch:2*-t0,yaw:2*-Z,roll:2*-U}},A=e.meshRaw;if(!A||A.length<300)return{angle:{pitch:0,yaw:0,roll:0},matrix:[1,0,0,0,1,0,0,0,1],gaze:{bearing:0,strength:0}};let a=Math.max(e.boxRaw[2]*t[0],e.boxRaw[3]*t[1])/1.5,l=[A[10],A[152],A[234],A[454]].map(p=>[p[0]*t[0]/a,p[1]*t[1]/a,p[2]]),c=n(o(l[1],l[0])),x=n(o(l[3],l[2])),i=n(r(x,c));x=r(c,i);let f=[x[0],x[1],x[2],c[0],c[1],c[2],i[0],i[1],i[2]],d=s(f),m=A.length===478?ZA(e):{bearing:0,strength:0};return{angle:d,matrix:f,gaze:m}};var T1=async(e,t)=>{var m,p,g,v,T,y,b,z,w,O,q,t0,Z,U,r0,P,G,P0,e0,u0,x0,H,X,J0,Q0,Re,ke,ue,E2;let n=M(),o,r,s,A,a,l,c,x,i,f=[];e.state="run:face";let d=await W3(t,e.config);if(e.performance.face=k.perfadd?(e.performance.face||0)+Math.trunc(M()-n):Math.trunc(M()-n),!t.shape||t.shape.length!==4)return[];if(!d)return[];for(let E=0;E200?ko(d[E],[t.shape[2],t.shape[1]]):null;e.analyze("Start Emotion:"),e.config.async?A=(p=e.config.face.emotion)!=null&&p.enabled?u5(d[E].tensor||a0.tensor([]),e.config,E,d.length):[]:(e.state="run:emotion",n=M(),A=(g=e.config.face.emotion)!=null&&g.enabled?await u5(d[E].tensor||a0.tensor([]),e.config,E,d.length):[],e.performance.emotion=k.perfadd?(e.performance.emotion||0)+Math.trunc(M()-n):Math.trunc(M()-n)),e.analyze("End Emotion:"),e.analyze("Start AntiSpoof:"),e.config.async?c=(v=e.config.face.antispoof)!=null&&v.enabled?_t(d[E].tensor||a0.tensor([]),e.config,E,d.length):0:(e.state="run:antispoof",n=M(),c=(T=e.config.face.antispoof)!=null&&T.enabled?await _t(d[E].tensor||a0.tensor([]),e.config,E,d.length):0,e.performance.antispoof=k.perfadd?(e.performance.antispoof||0)+Math.trunc(M()-n):Math.trunc(M()-n)),e.analyze("End AntiSpoof:"),e.analyze("Start Liveness:"),e.config.async?x=(y=e.config.face.liveness)!=null&&y.enabled?B5(d[E].tensor||a0.tensor([]),e.config,E,d.length):0:(e.state="run:liveness",n=M(),x=(b=e.config.face.liveness)!=null&&b.enabled?await B5(d[E].tensor||a0.tensor([]),e.config,E,d.length):0,e.performance.liveness=k.perfadd?(e.performance.antispoof||0)+Math.trunc(M()-n):Math.trunc(M()-n)),e.analyze("End Liveness:"),e.analyze("Start GEAR:"),e.config.async?r=(z=e.config.face.gear)!=null&&z.enabled?w5(d[E].tensor||a0.tensor([]),e.config,E,d.length):null:(e.state="run:gear",n=M(),r=(w=e.config.face.gear)!=null&&w.enabled?await w5(d[E].tensor||a0.tensor([]),e.config,E,d.length):null,e.performance.gear=Math.trunc(M()-n)),e.analyze("End GEAR:"),e.analyze("Start SSRNet:"),e.config.async?(o=(O=e.config.face.ssrnet)!=null&&O.enabled?i1(d[E].tensor||a0.tensor([]),e.config,E,d.length):null,s=(q=e.config.face.ssrnet)!=null&&q.enabled?d1(d[E].tensor||a0.tensor([]),e.config,E,d.length):null):(e.state="run:ssrnet",n=M(),o=(t0=e.config.face.ssrnet)!=null&&t0.enabled?await i1(d[E].tensor||a0.tensor([]),e.config,E,d.length):null,s=(Z=e.config.face.ssrnet)!=null&&Z.enabled?await d1(d[E].tensor||a0.tensor([]),e.config,E,d.length):null,e.performance.ssrnet=Math.trunc(M()-n)),e.analyze("End SSRNet:"),e.analyze("Start MobileFaceNet:"),e.config.async?a=(U=e.config.face.mobilefacenet)!=null&&U.enabled?D5(d[E].tensor||a0.tensor([]),e.config,E,d.length):null:(e.state="run:mobilefacenet",n=M(),a=(r0=e.config.face.mobilefacenet)!=null&&r0.enabled?await D5(d[E].tensor||a0.tensor([]),e.config,E,d.length):null,e.performance.mobilefacenet=Math.trunc(M()-n)),e.analyze("End MobileFaceNet:"),e.analyze("Start InsightFace:"),e.config.async?l=(P=e.config.face.insightface)!=null&&P.enabled?F5(d[E].tensor||a0.tensor([]),e.config,E,d.length):null:(e.state="run:mobilefacenet",n=M(),l=(G=e.config.face.insightface)!=null&&G.enabled?await F5(d[E].tensor||a0.tensor([]),e.config,E,d.length):null,e.performance.mobilefacenet=Math.trunc(M()-n)),e.analyze("End InsightFace:"),e.analyze("Start Description:"),e.config.async?i=v5(d[E].tensor||a0.tensor([]),e.config,E,d.length):(e.state="run:description",n=M(),i=await v5(d[E].tensor||a0.tensor([]),e.config,E,d.length),e.performance.description=k.perfadd?(e.performance.description||0)+Math.trunc(M()-n):Math.trunc(M()-n)),e.analyze("End Description:"),e.config.async&&([o,s,A,a,l,i,r,c,x]=await Promise.all([o,s,A,a,l,i,r,c,x])),e.analyze("Finish Face:"),((P0=e.config.face.ssrnet)==null?void 0:P0.enabled)&&o&&s&&(i={...i,age:o.age,gender:s.gender,genderScore:s.genderScore}),((e0=e.config.face.gear)==null?void 0:e0.enabled)&&r&&(i={...i,age:r.age,gender:r.gender,genderScore:r.genderScore,race:r.race}),((u0=e.config.face.mobilefacenet)==null?void 0:u0.enabled)&&a&&(i.descriptor=a),((x0=e.config.face.insightface)==null?void 0:x0.enabled)&&l&&(i.descriptor=l),(H=e.config.face.iris)!=null&&H.enabled;let s2=((Q0=(J0=(X=d[E])==null?void 0:X.annotations)==null?void 0:J0.leftEyeIris)==null?void 0:Q0[0])&&((ue=(ke=(Re=d[E])==null?void 0:Re.annotations)==null?void 0:ke.rightEyeIris)==null?void 0:ue[0])&&d[E].annotations.leftEyeIris.length>0&&d[E].annotations.rightEyeIris.length>0&&d[E].annotations.leftEyeIris[0]!==null&&d[E].annotations.rightEyeIris[0]!==null?Math.max(Math.abs(d[E].annotations.leftEyeIris[3][0]-d[E].annotations.leftEyeIris[1][0]),Math.abs(d[E].annotations.rightEyeIris[4][1]-d[E].annotations.rightEyeIris[2][1]))/t.shape[2]:0,E1=(E2=e.config.face.detector)!=null&&E2.return?a0.squeeze(d[E].tensor):null;a0.dispose(d[E].tensor),d[E].tensor&&delete d[E].tensor;let _0={...d[E],id:E};i.age&&(_0.age=i.age),i.gender&&(_0.gender=i.gender),i.genderScore&&(_0.genderScore=i.genderScore),i.descriptor&&(_0.embedding=i.descriptor),i.race&&(_0.race=i.race),A&&(_0.emotion=A),c&&(_0.real=c),x&&(_0.live=x),s2&&s2!==0&&(_0.iris=Math.trunc(500/s2/11.7)/100),z2&&(_0.rotation=z2),E1&&(_0.tensor=E1),f.push(_0),e.analyze("End Face")}return e.analyze("End FaceMesh:"),e.config.async&&(e.performance.face&&delete e.performance.face,e.performance.age&&delete e.performance.age,e.performance.gender&&delete e.performance.gender,e.performance.emotion&&delete e.performance.emotion),f};var wo=e=>{if(!e)return[];let t=[];for(let n=0;nl.part==="leftWrist"),r=e[n].keypoints.find(l=>l.part==="rightWrist"),s=e[n].keypoints.find(l=>l.part==="nose");s&&o&&r&&o.position[1]l.part==="leftShoulder"),a=e[n].keypoints.find(l=>l.part==="rightShoulder");A&&a&&Math.abs(A.positionRaw[1]-a.positionRaw[1])>.1&&t.push({body:n,gesture:`leaning ${A.position[1]>a.position[1]?"left":"right"}`})}return t},Eo=e=>{if(!e)return[];let t=[];for(let n=0;n450){let o=(e[n].mesh[33][2]||0)-(e[n].mesh[263][2]||0),r=e[n].mesh[33][0]-e[n].mesh[263][0];Math.abs(o/r)<=.15?t.push({face:n,gesture:"facing center"}):t.push({face:n,gesture:`facing ${o<0?"left":"right"}`}),Math.abs(e[n].mesh[374][1]-e[n].mesh[386][1])/Math.abs(e[n].mesh[443][1]-e[n].mesh[450][1])<.2&&t.push({face:n,gesture:"blink left eye"}),Math.abs(e[n].mesh[145][1]-e[n].mesh[159][1])/Math.abs(e[n].mesh[223][1]-e[n].mesh[230][1])<.2&&t.push({face:n,gesture:"blink right eye"});let a=Math.min(100,500*Math.abs(e[n].mesh[13][1]-e[n].mesh[14][1])/Math.abs(e[n].mesh[10][1]-e[n].mesh[152][1]));a>10&&t.push({face:n,gesture:`mouth ${Math.trunc(a)}% open`});let l=e[n].mesh[152][2]||0;Math.abs(l)>10&&t.push({face:n,gesture:`head ${l<0?"up":"down"}`})}return t},zo=e=>{var n,o,r,s;if(!e)return[];let t=[];for(let A=0;A.06||g>.06)&&(d=!1),p>g?p>.05&&t.push({iris:A,gesture:"looking right"}):g>.05&&t.push({iris:A,gesture:"looking left"});let v=Math.abs(e[A].mesh[145][1]-e[A].annotations.rightEyeIris[0][1])/e[A].box[3],T=Math.abs(e[A].mesh[374][1]-e[A].annotations.leftEyeIris[0][1])/e[A].box[3];(T<.01||v<.01||T>.022||v>.022)&&(d=!1),(T<.01||v<.01)&&t.push({iris:A,gesture:"looking down"}),(T>.022||v>.022)&&t.push({iris:A,gesture:"looking up"}),d&&t.push({iris:A,gesture:"looking center"})}return t},So=e=>{if(!e)return[];let t=[];for(let n=0;n0){let r=o.reduce((A,a)=>(A.position[2]||0)<(a.position[2]||0)?A:a);t.push({hand:n,gesture:`${r.name} forward`});let s=o.reduce((A,a)=>A.position[1]((r-1)*j.body[P].box[X]+H)/r),P0=e.body[P].boxRaw.map((H,X)=>((r-1)*j.body[P].boxRaw[X]+H)/r),e0=e.body[P].keypoints.map((H,X)=>{var J0,Q0,Re,ke,ue,E2,E,z2,s2;return{score:H.score,part:H.part,position:[j.body[P].keypoints[X]?((r-1)*(j.body[P].keypoints[X].position[0]||0)+(H.position[0]||0))/r:H.position[0],j.body[P].keypoints[X]?((r-1)*(j.body[P].keypoints[X].position[1]||0)+(H.position[1]||0))/r:H.position[1],j.body[P].keypoints[X]?((r-1)*(j.body[P].keypoints[X].position[2]||0)+(H.position[2]||0))/r:H.position[2]],positionRaw:[j.body[P].keypoints[X]?((r-1)*(j.body[P].keypoints[X].positionRaw[0]||0)+(H.positionRaw[0]||0))/r:H.positionRaw[0],j.body[P].keypoints[X]?((r-1)*(j.body[P].keypoints[X].positionRaw[1]||0)+(H.positionRaw[1]||0))/r:H.positionRaw[1],j.body[P].keypoints[X]?((r-1)*(j.body[P].keypoints[X].positionRaw[2]||0)+(H.positionRaw[2]||0))/r:H.positionRaw[2]],distance:[j.body[P].keypoints[X]?((r-1)*(((J0=j.body[P].keypoints[X].distance)==null?void 0:J0[0])||0)+(((Q0=H.distance)==null?void 0:Q0[0])||0))/r:(Re=H.distance)==null?void 0:Re[0],j.body[P].keypoints[X]?((r-1)*(((ke=j.body[P].keypoints[X].distance)==null?void 0:ke[1])||0)+(((ue=H.distance)==null?void 0:ue[1])||0))/r:(E2=H.distance)==null?void 0:E2[1],j.body[P].keypoints[X]?((r-1)*(((E=j.body[P].keypoints[X].distance)==null?void 0:E[2])||0)+(((z2=H.distance)==null?void 0:z2[2])||0))/r:(s2=H.distance)==null?void 0:s2[2]]}}),u0={},x0={connected:{}};(A=t.body.modelPath)!=null&&A.includes("efficientpose")?x0=dt:(a=t.body.modelPath)!=null&&a.includes("blazepose")?x0=At:(l=t.body.modelPath)!=null&&l.includes("movenet")&&(x0=G2);for(let[H,X]of Object.entries(x0.connected)){let J0=[];for(let Q0=0;Q0ue.part===X[Q0]),ke=e0.find(ue=>ue.part===X[Q0+1]);Re&&ke&&J0.push([Re.position,ke.position])}u0[H]=J0}j.body[P]={...e.body[P],box:G,boxRaw:P0,keypoints:e0,annotations:u0}}if(!j.hand||e.hand.length!==j.hand.length)j.hand=JSON.parse(JSON.stringify(e.hand));else for(let P=0;P((r-1)*j.hand[P].box[H]+x0)/r),P0=e.hand[P].boxRaw.map((x0,H)=>((r-1)*j.hand[P].boxRaw[H]+x0)/r);j.hand[P].keypoints.length!==e.hand[P].keypoints.length&&(j.hand[P].keypoints=e.hand[P].keypoints);let e0=e.hand[P].keypoints&&e.hand[P].keypoints.length>0?e.hand[P].keypoints.map((x0,H)=>x0.map((X,J0)=>((r-1)*(j.hand[P].keypoints[H][J0]||1)+(X||0))/r)):[],u0={};if(Object.keys(j.hand[P].annotations).length!==Object.keys(e.hand[P].annotations).length)j.hand[P].annotations=e.hand[P].annotations,u0=j.hand[P].annotations;else if(e.hand[P].annotations)for(let x0 of Object.keys(e.hand[P].annotations))u0[x0]=(i=(x=(c=e.hand[P])==null?void 0:c.annotations)==null?void 0:x[x0])!=null&&i[0]?e.hand[P].annotations[x0].map((H,X)=>H.map((J0,Q0)=>((r-1)*j.hand[P].annotations[x0][X][Q0]+J0)/r)):null;j.hand[P]={...e.hand[P],box:G,boxRaw:P0,keypoints:e0,annotations:u0}}if(!j.face||e.face.length!==j.face.length)j.face=JSON.parse(JSON.stringify(e.face));else for(let P=0;P((r-1)*j.face[P].box[u0]+e0)/r),P0=e.face[P].boxRaw.map((e0,u0)=>((r-1)*j.face[P].boxRaw[u0]+e0)/r);if(e.face[P].rotation){let e0={matrix:[0,0,0,0,0,0,0,0,0],angle:{roll:0,yaw:0,pitch:0},gaze:{bearing:0,strength:0}};e0.matrix=(f=e.face[P].rotation)==null?void 0:f.matrix,e0.angle={roll:((r-1)*(((m=(d=j.face[P].rotation)==null?void 0:d.angle)==null?void 0:m.roll)||0)+(((g=(p=e.face[P].rotation)==null?void 0:p.angle)==null?void 0:g.roll)||0))/r,yaw:((r-1)*(((T=(v=j.face[P].rotation)==null?void 0:v.angle)==null?void 0:T.yaw)||0)+(((b=(y=e.face[P].rotation)==null?void 0:y.angle)==null?void 0:b.yaw)||0))/r,pitch:((r-1)*(((w=(z=j.face[P].rotation)==null?void 0:z.angle)==null?void 0:w.pitch)||0)+(((q=(O=e.face[P].rotation)==null?void 0:O.angle)==null?void 0:q.pitch)||0))/r},e0.gaze={bearing:((r-1)*(((t0=j.face[P].rotation)==null?void 0:t0.gaze.bearing)||0)+(((Z=e.face[P].rotation)==null?void 0:Z.gaze.bearing)||0))/r,strength:((r-1)*(((U=j.face[P].rotation)==null?void 0:U.gaze.strength)||0)+(((r0=e.face[P].rotation)==null?void 0:r0.gaze.strength)||0))/r},j.face[P]={...e.face[P],rotation:e0,box:G,boxRaw:P0}}else j.face[P]={...e.face[P],box:G,boxRaw:P0}}if(!j.object||e.object.length!==j.object.length)j.object=JSON.parse(JSON.stringify(e.object));else for(let P=0;P((r-1)*j.object[P].box[u0]+e0)/r),P0=e.object[P].boxRaw.map((e0,u0)=>((r-1)*j.object[P].boxRaw[u0]+e0)/r);j.object[P]={...e.object[P],box:G,boxRaw:P0}}if(e.persons){let P=e.persons;if(!j.persons||P.length!==j.persons.length)j.persons=JSON.parse(JSON.stringify(P));else for(let G=0;G((r-1)*j.persons[G].box[e0]+P0)/r)}e.gesture&&(j.gesture=e.gesture);let s=M();return v1=k.perfadd?v1+Math.round(s-n):Math.round(s-n),e.performance&&(j.performance={...e.performance,interpolate:v1}),j}var k1={};we(k1,{distance:()=>Z2,match:()=>R1,similarity:()=>P1});function Z2(e,t,n={order:2,multiplier:25}){if(!e||!e)return Number.MAX_SAFE_INTEGER;let o=0;for(let r=0;r{if(e===0)return 1;let r=t===2?Math.sqrt(e):e**(1/t),s=(1-r/100-n)/(o-n);return Math.max(Math.min(s,1),0)};function P1(e,t,n={order:2,multiplier:25,min:.2,max:.8}){let o=Z2(e,t,n);return No(o,n.order||2,n.min||0,n.max||1)}function R1(e,t,n={order:2,multiplier:25,threshold:0,min:.2,max:.8}){if(!Array.isArray(e)||!Array.isArray(t)||e.length<64||t.length===0)return{index:-1,distance:Number.POSITIVE_INFINITY,similarity:0};let o=Number.MAX_SAFE_INTEGER,r=-1;for(let A=0;Ab.box[0]&&d.box[0]b.box[1]&&d.box[1]+d.box[3]m.body.box[0]&&b.box[0]+b.box[2]m.body.box[1]&&b.box[1]+b.box[3]m.body.box[0]&&b.box[1]+b.box[3]>m.body.box[1]&&b.box[1]+b.box[3]{b&&b.length===4&&(p.push(b[0],b[0]+b[2]),g.push(b[1],b[1]+b[3]))};v(m.face.box),v((x=m.body)==null?void 0:x.box),v((i=m.hands.left)==null?void 0:i.box),v((f=m.hands.right)==null?void 0:f.box);let T=Math.min(...p),y=Math.min(...g);m.box=[T,y,Math.max(...p)-T,Math.max(...g)-y],(r==null?void 0:r[1])&&(r==null?void 0:r[2])&&(m.boxRaw=[m.box[0]/r[2],m.box[1]/r[1],m.box[2]/r[2],m.box[3]/r[1]]),A.push(m)}return A}var Bt=` /9j/4AAQSkZJRgABAQEAYABgAAD/4QBoRXhpZgAATU0AKgAAA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lmyNoBXsxmFuyNgVTVjNV3KjlBRNTlXTVHKCrlIqt5T lBhEMohlFerLlBjEMohMVTEARDKCITsAk2AEgAAAkAAAAAAAAAAAAAAAAAAAAAAAASAAAAAAAAD/ -2Q==`; - -// src/warmup.ts -var tf38 = __toESM(require_tfjs_esm()); -async function warmupBitmap(instance2) { - const b64toBlob = (base64, type = "application/octet-stream") => fetch(`data:${type};base64,${base64}`).then((res2) => res2.blob()); - let blob; - let res; - switch (instance2.config.warmup) { - case "face": - blob = await b64toBlob(face3); - break; - case "body": - case "full": - blob = await b64toBlob(body3); - break; - default: - blob = null; - } - if (blob) { - const bitmap = await createImageBitmap(blob); - res = await instance2.detect(bitmap, instance2.config); - bitmap.close(); - } - return res; -} -async function warmupCanvas(instance2) { - return new Promise((resolve) => { - let src; - switch (instance2.config.warmup) { - case "face": - src = "data:image/jpeg;base64," + face3; - break; - case "full": - case "body": - src = "data:image/jpeg;base64," + body3; - break; - default: - src = ""; - } - let img; - if (typeof Image !== "undefined") - img = new Image(); - else if (env.Image) - img = new env.Image(); - else - return; - img.onload = async () => { - const canvas3 = canvas(img.naturalWidth, img.naturalHeight); - if (!canvas3) { - log("Warmup: Canvas not found"); - resolve(void 0); - } else { - const ctx = canvas3.getContext("2d"); - if (ctx) - ctx.drawImage(img, 0, 0); - const tensor6 = await instance2.image(canvas3); - const res = tensor6.tensor ? await instance2.detect(tensor6.tensor, instance2.config) : void 0; - resolve(res); - } - }; - if (src) - img.src = src; - else - resolve(void 0); - }); -} -async function warmupNode(instance2) { - const atob = (str) => Buffer.from(str, "base64"); - let img; - if (instance2.config.warmup === "face") - img = atob(face3); - else - img = atob(body3); - let res; - if ("node" in tf38 && tf38.getBackend() === "tensorflow") { - const data = tf38["node"].decodeJpeg(img); - const expanded = tf38.expandDims(data, 0); - instance2.tf.dispose(data); - res = await instance2.detect(expanded, instance2.config); - instance2.tf.dispose(expanded); - } else { - if (instance2.config.debug) - log("Warmup tfjs-node not loaded"); - } - return res; -} -async function runInference(instance2) { - let res; - if (typeof createImageBitmap === "function") - res = await warmupBitmap(instance2); - else if (typeof Image !== "undefined" || env.Canvas !== void 0) - res = await warmupCanvas(instance2); - else - res = await warmupNode(instance2); - return res; -} -async function runCompile(instance2) { - var _a, _b, _c, _d; - if (!tf38.env().flagRegistry.ENGINE_COMPILE_ONLY) - return; - const backendType = tf38.getBackend(); - const webGLBackend = tf38.backend(); - if (backendType !== "webgl" && backendType !== "humangl" || !(webGLBackend == null ? void 0 : webGLBackend.checkCompileCompletion)) { - return; - } - tf38.env().set("ENGINE_COMPILE_ONLY", true); - const numTensorsStart = tf38.engine().state.numTensors; - const compiledModels = []; - for (const [modelName, model21] of Object.entries(instance2.models).filter(([key, val]) => key !== null && val !== null)) { - const shape = ((_b = (_a = model21.inputs) == null ? void 0 : _a[0]) == null ? void 0 : _b.shape) ? [...model21.inputs[0].shape] : [1, 64, 64, 3]; - const dtype = ((_d = (_c = model21.inputs) == null ? void 0 : _c[0]) == null ? void 0 : _d.dtype) ? model21.inputs[0].dtype : "float32"; - for (let dim = 0; dim < shape.length; dim++) { - if (shape[dim] === -1) - shape[dim] = dim === 0 ? 1 : 64; - } - const tensor6 = tf38.zeros(shape, dtype); - try { - const res = model21.execute(tensor6); - compiledModels.push(modelName); - if (Array.isArray(res)) - res.forEach((t2) => tf38.dispose(t2)); - else - tf38.dispose(res); - } catch (e) { - if (instance2.config.debug) - log("compile fail model:", modelName); - } - tf38.dispose(tensor6); - } - const kernels = await webGLBackend.checkCompileCompletionAsync(); - webGLBackend.getUniformLocations(); - if (instance2.config.debug) - log("compile pass:", { models: compiledModels, kernels: kernels.length }); - tf38.env().set("ENGINE_COMPILE_ONLY", false); - const numTensorsEnd = tf38.engine().state.numTensors; - if (numTensorsEnd - numTensorsStart > 0) - log("tensor leak:", numTensorsEnd - numTensorsStart); -} -async function warmup(instance2, userConfig) { - await check(instance2, false); - const t0 = now(); - instance2.state = "warmup"; - if (userConfig) - instance2.config = mergeDeep(instance2.config, userConfig); - if (!instance2.config.warmup || instance2.config.warmup.length === 0 || instance2.config.warmup === "none") { - return { face: [], body: [], hand: [], gesture: [], object: [], performance: instance2.performance, timestamp: now(), persons: [], error: null }; - } - return new Promise(async (resolve) => { - await models_exports2.load(instance2); - await runCompile(instance2); - const res = await runInference(instance2); - const t1 = now(); - if (instance2.config.debug) - log("warmup", instance2.config.warmup, Math.round(t1 - t0), "ms"); - instance2.emit("warmup"); - resolve(res); - }); -} - -// src/human.ts -var _numTensors, _analyzeMemoryLeaks, _checkSanity, _sanity, _loops; -var Human2 = class { - constructor(userConfig) { - __publicField(this, "version"); - __publicField(this, "config"); - __publicField(this, "result"); - __publicField(this, "state"); - __publicField(this, "process"); - __publicField(this, "tf"); - __publicField(this, "env"); - __publicField(this, "draw"); - __publicField(this, "models"); - __publicField(this, "events"); - __publicField(this, "faceTriangulation"); - __publicField(this, "faceUVMap"); - __publicField(this, "performance"); - __privateAdd(this, _numTensors, void 0); - __privateAdd(this, _analyzeMemoryLeaks, void 0); - __privateAdd(this, _checkSanity, void 0); - __publicField(this, "gl"); - __publicField(this, "analyze", (...msg) => { - if (!__privateGet(this, _analyzeMemoryLeaks)) - return; - const currentTensors = this.tf.engine().state.numTensors; - const previousTensors = __privateGet(this, _numTensors); - __privateSet(this, _numTensors, currentTensors); - const leaked = currentTensors - previousTensors; - if (leaked !== 0) - log(...msg, leaked); - }); - __privateAdd(this, _sanity, (input) => { - if (!__privateGet(this, _checkSanity)) - return null; - if (!input) - return "input is not defined"; - if (this.env.node && !(input instanceof tf39.Tensor)) - return "input must be a tensor"; - try { - this.tf.getBackend(); - } catch (e) { - return "backend not loaded"; - } - return null; - }); - __publicField(this, "similarity", similarity); - __publicField(this, "distance", distance); - __publicField(this, "match", match2); - __publicField(this, "webcam", new WebCam()); - __publicField(this, "emit", (event) => { - var _a; - if ((_a = this.events) == null ? void 0 : _a.dispatchEvent) - this.events.dispatchEvent(new Event(event)); - }); - __privateAdd(this, _loops, {}); - this.env = env; - const tfVersion = (tf39.version.tfjs || tf39.version_core).replace(/-(.*)/, ""); - config.wasmPath = `https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm@${tfVersion}/dist/`; - config.modelBasePath = env.browser ? "../models/" : "file://models/"; - config.backend = env.browser ? "webgl" : "tensorflow"; - this.version = version2; - Object.defineProperty(this, "version", { value: version2 }); - this.config = JSON.parse(JSON.stringify(config)); - Object.seal(this.config); - this.config.cacheModels = typeof indexedDB !== "undefined"; - if (userConfig) - this.config = mergeDeep(this.config, userConfig); - setModelLoadOptions(this.config); - this.tf = tf39; - this.state = "idle"; - __privateSet(this, _numTensors, 0); - __privateSet(this, _analyzeMemoryLeaks, false); - __privateSet(this, _checkSanity, false); - this.performance = {}; - this.events = typeof EventTarget !== "undefined" ? new EventTarget() : void 0; - this.models = new Models(); - this.draw = { - options: options3, - canvas: (input, output) => canvas2(input, output), - face: (output, result, options4) => face(output, result, options4), - body: (output, result, options4) => body(output, result, options4), - hand: (output, result, options4) => hand(output, result, options4), - gesture: (output, result, options4) => gesture(output, result, options4), - object: (output, result, options4) => object(output, result, options4), - person: (output, result, options4) => person(output, result, options4), - all: (output, result, options4) => all(output, result, options4) - }; - this.result = { face: [], body: [], hand: [], gesture: [], object: [], performance: {}, timestamp: 0, persons: [], error: null }; - this.process = { tensor: null, canvas: null }; - this.faceTriangulation = triangulation; - this.faceUVMap = uvmap; - this.gl = config2; - validateModel(this, null, ""); - this.emit("create"); - if (this.config.debug || this.env.browser) - log(`version: ${this.version}`); - if (this.config.debug) - log(`tfjs version: ${this.tf.version["tfjs-core"]}`); - const envTemp = JSON.parse(JSON.stringify(this.env)); - delete envTemp.kernels; - delete envTemp.initial; - delete envTemp.perfadd; - if (this.config.debug) - log("environment:", envTemp); - } - reset() { - const currentBackend = this.config.backend; - this.config = JSON.parse(JSON.stringify(config)); - this.config.backend = currentBackend; - reset(); - env.initial = true; - } - validate(userConfig) { - const msgs = validate(config, userConfig || this.config); - if (msgs.length === 0) - this.config = mergeDeep(this.config, userConfig); - return msgs; - } - check() { - return validate2(this); - } - now() { - return now(); - } - image(input, getTensor = true) { - return process2(input, this.config, getTensor); - } - async segmentation(input, userConfig) { - var _a, _b, _c; - if (userConfig) - this.config = mergeDeep(this.config, userConfig); - if (!this.config.segmentation.enabled) - return null; - const processed = await process2(input, this.config); - if (!processed.tensor) - return null; - let tensor6 = null; - if ((_a = this.config.segmentation.modelPath) == null ? void 0 : _a.includes("rvm")) - tensor6 = await predict18(processed.tensor, this.config); - if ((_b = this.config.segmentation.modelPath) == null ? void 0 : _b.includes("meet")) - tensor6 = await predict13(processed.tensor, this.config); - if ((_c = this.config.segmentation.modelPath) == null ? void 0 : _c.includes("selfie")) - tensor6 = await predict19(processed.tensor, this.config); - tf39.dispose(processed.tensor); - return tensor6; - } - enhance(input) { - return enhance(input); - } - compare(firstImageTensor, secondImageTensor) { - return compare(this.config, firstImageTensor, secondImageTensor); - } - async init() { - await check(this, true); - await this.tf.ready(); - reset(); - } - async load(userConfig) { - this.state = "load"; - const timeStamp = now(); - const count2 = Object.values(this.models).filter((model21) => model21).length; - if (userConfig) - this.config = mergeDeep(this.config, userConfig); - if (this.env.initial) { - if (!await check(this, false)) - log("error: backend check failed"); - await tf39.ready(); - if (this.env.browser) { - if (this.config.debug) - log("configuration:", this.config); - if (this.config.debug) - log("tf flags:", this.tf.ENV.flags); - } - } - await load22(this); - if (this.env.initial && this.config.debug) - log("tf engine state:", this.tf.engine().state.numBytes, "bytes", this.tf.engine().state.numTensors, "tensors"); - this.env.initial = false; - const loaded = Object.values(this.models).filter((model21) => model21).length; - if (loaded !== count2) { - validate2(this); - this.emit("load"); - } - const current = Math.trunc(now() - timeStamp); - if (current > (this.performance.loadModels || 0)) - this.performance.loadModels = this.env.perfadd ? (this.performance.loadModels || 0) + current : current; - } - next(result = this.result) { - return calc2(result, this.config); - } - getModelStats() { - return getModelStats(this); - } - async warmup(userConfig) { - const t0 = now(); - const res = await warmup(this, userConfig); - const t1 = now(); - this.performance.warmup = Math.trunc(t1 - t0); - return res; - } - async profile(input, userConfig) { - const profile = await this.tf.profile(() => this.detect(input, userConfig)); - const kernels = {}; - let total = 0; - for (const kernel of profile.kernels) { - if (kernels[kernel.name]) - kernels[kernel.name] += kernel.kernelTimeMs; - else - kernels[kernel.name] = kernel.kernelTimeMs; - total += kernel.kernelTimeMs; - } - const kernelArr = []; - Object.entries(kernels).forEach((key) => kernelArr.push({ kernel: key[0], time: key[1], perc: 0 })); - for (const kernel of kernelArr) { - kernel.perc = Math.round(1e3 * kernel.time / total) / 1e3; - kernel.time = Math.round(1e3 * kernel.time) / 1e3; - } - kernelArr.sort((a, b) => b.time - a.time); - kernelArr.length = 20; - return kernelArr; - } - async detect(input, userConfig) { - this.state = "detect"; - return new Promise(async (resolve) => { - var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u; - this.state = "config"; - let timeStamp; - this.config = mergeDeep(this.config, userConfig); - this.state = "check"; - const error = __privateGet(this, _sanity).call(this, input); - if (error) { - log(error, input); - this.emit("error"); - resolve({ face: [], body: [], hand: [], gesture: [], object: [], performance: this.performance, timestamp: now(), persons: [], error }); - } - const timeStart = now(); - await this.load(); - timeStamp = now(); - this.state = "image"; - const img = await process2(input, this.config); - this.process = img; - this.performance.inputProcess = this.env.perfadd ? (this.performance.inputProcess || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - this.analyze("Get Image:"); - if (!img.tensor) { - if (this.config.debug) - log("could not convert input to tensor"); - this.emit("error"); - resolve({ face: [], body: [], hand: [], gesture: [], object: [], performance: this.performance, timestamp: now(), persons: [], error: "could not convert input to tensor" }); - return; - } - this.emit("image"); - timeStamp = now(); - this.config.skipAllowed = await skip(this.config, img.tensor); - if (!this.performance.totalFrames) - this.performance.totalFrames = 0; - if (!this.performance.cachedFrames) - this.performance.cachedFrames = 0; - this.performance.totalFrames++; - if (this.config.skipAllowed) - this.performance.cachedFrames++; - this.performance.cacheCheck = this.env.perfadd ? (this.performance.cacheCheck || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - this.analyze("Check Changed:"); - let faceRes = []; - let bodyRes = []; - let handRes = []; - let objectRes = []; - this.state = "detect:face"; - if (this.config.async) { - faceRes = this.config.face.enabled ? detectFace(this, img.tensor) : []; - if (this.performance.face) - delete this.performance.face; - } else { - timeStamp = now(); - faceRes = this.config.face.enabled ? await detectFace(this, img.tensor) : []; - this.performance.face = this.env.perfadd ? (this.performance.face || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - } - if (this.config.async && (this.config.body.maxDetected === -1 || this.config.hand.maxDetected === -1)) - faceRes = await faceRes; - this.analyze("Start Body:"); - this.state = "detect:body"; - const bodyConfig = this.config.body.maxDetected === -1 ? mergeDeep(this.config, { body: { maxDetected: this.config.face.enabled ? 1 * faceRes.length : 1 } }) : this.config; - if (this.config.async) { - if ((_a = this.config.body.modelPath) == null ? void 0 : _a.includes("posenet")) - bodyRes = this.config.body.enabled ? predict17(img.tensor, bodyConfig) : []; - else if ((_b = this.config.body.modelPath) == null ? void 0 : _b.includes("blazepose")) - bodyRes = this.config.body.enabled ? predict2(img.tensor, bodyConfig) : []; - else if ((_c = this.config.body.modelPath) == null ? void 0 : _c.includes("efficientpose")) - bodyRes = this.config.body.enabled ? predict4(img.tensor, bodyConfig) : []; - else if ((_d = this.config.body.modelPath) == null ? void 0 : _d.includes("movenet")) - bodyRes = this.config.body.enabled ? predict15(img.tensor, bodyConfig) : []; - if (this.performance.body) - delete this.performance.body; - } else { - timeStamp = now(); - if ((_e = this.config.body.modelPath) == null ? void 0 : _e.includes("posenet")) - bodyRes = this.config.body.enabled ? await predict17(img.tensor, bodyConfig) : []; - else if ((_f = this.config.body.modelPath) == null ? void 0 : _f.includes("blazepose")) - bodyRes = this.config.body.enabled ? await predict2(img.tensor, bodyConfig) : []; - else if ((_g = this.config.body.modelPath) == null ? void 0 : _g.includes("efficientpose")) - bodyRes = this.config.body.enabled ? await predict4(img.tensor, bodyConfig) : []; - else if ((_h = this.config.body.modelPath) == null ? void 0 : _h.includes("movenet")) - bodyRes = this.config.body.enabled ? await predict15(img.tensor, bodyConfig) : []; - this.performance.body = this.env.perfadd ? (this.performance.body || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - } - this.analyze("End Body:"); - this.analyze("Start Hand:"); - this.state = "detect:hand"; - const handConfig = this.config.hand.maxDetected === -1 ? mergeDeep(this.config, { hand: { maxDetected: this.config.face.enabled ? 2 * faceRes.length : 1 } }) : this.config; - if (this.config.async) { - if ((_j = (_i = this.config.hand.detector) == null ? void 0 : _i.modelPath) == null ? void 0 : _j.includes("handdetect")) - handRes = this.config.hand.enabled ? predict9(img.tensor, handConfig) : []; - else if ((_l = (_k = this.config.hand.detector) == null ? void 0 : _k.modelPath) == null ? void 0 : _l.includes("handtrack")) - handRes = this.config.hand.enabled ? predict10(img.tensor, handConfig) : []; - if (this.performance.hand) - delete this.performance.hand; - } else { - timeStamp = now(); - if ((_n = (_m = this.config.hand.detector) == null ? void 0 : _m.modelPath) == null ? void 0 : _n.includes("handdetect")) - handRes = this.config.hand.enabled ? await predict9(img.tensor, handConfig) : []; - else if ((_p = (_o = this.config.hand.detector) == null ? void 0 : _o.modelPath) == null ? void 0 : _p.includes("handtrack")) - handRes = this.config.hand.enabled ? await predict10(img.tensor, handConfig) : []; - this.performance.hand = this.env.perfadd ? (this.performance.hand || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - } - this.analyze("End Hand:"); - this.analyze("Start Object:"); - this.state = "detect:object"; - if (this.config.async) { - if ((_q = this.config.object.modelPath) == null ? void 0 : _q.includes("nanodet")) - objectRes = this.config.object.enabled ? predict16(img.tensor, this.config) : []; - else if ((_r = this.config.object.modelPath) == null ? void 0 : _r.includes("centernet")) - objectRes = this.config.object.enabled ? predict3(img.tensor, this.config) : []; - if (this.performance.object) - delete this.performance.object; - } else { - timeStamp = now(); - if ((_s = this.config.object.modelPath) == null ? void 0 : _s.includes("nanodet")) - objectRes = this.config.object.enabled ? await predict16(img.tensor, this.config) : []; - else if ((_t = this.config.object.modelPath) == null ? void 0 : _t.includes("centernet")) - objectRes = this.config.object.enabled ? await predict3(img.tensor, this.config) : []; - this.performance.object = this.env.perfadd ? (this.performance.object || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - } - this.analyze("End Object:"); - this.state = "detect:await"; - if (this.config.async) - [faceRes, bodyRes, handRes, objectRes] = await Promise.all([faceRes, bodyRes, handRes, objectRes]); - this.state = "detect:gesture"; - let gestureRes = []; - if (this.config.gesture.enabled) { - timeStamp = now(); - gestureRes = [...face2(faceRes), ...body2(bodyRes), ...hand2(handRes), ...iris2(faceRes)]; - if (!this.config.async) - this.performance.gesture = this.env.perfadd ? (this.performance.gesture || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - else if (this.performance.gesture) - delete this.performance.gesture; - } - this.performance.total = this.env.perfadd ? (this.performance.total || 0) + Math.trunc(now() - timeStart) : Math.trunc(now() - timeStart); - const shape = ((_u = this.process.tensor) == null ? void 0 : _u.shape) || []; - this.result = { - face: faceRes, - body: bodyRes, - hand: handRes, - gesture: gestureRes, - object: objectRes, - performance: this.performance, - canvas: this.process.canvas, - timestamp: Date.now(), - error: null, - get persons() { - return join2(faceRes, bodyRes, handRes, gestureRes, shape); - } - }; - tf39.dispose(img.tensor); - this.emit("detect"); - this.state = "idle"; - resolve(this.result); - }); - } - async sleep(ms) { - return new Promise((resolve) => { - setTimeout(resolve, ms); - }); - } - async video(element, run = true, delay = 0) { - if (run) { - if (!__privateGet(this, _loops)[element.id]) { - if (this.config.debug) - log("video start", element.id); - __privateGet(this, _loops)[element.id] = true; - } - if (!element.paused && __privateGet(this, _loops)[element.id] && element.readyState >= 2) - await this.detect(element); - if (delay > 0) - await this.sleep(delay); - if (__privateGet(this, _loops)[element.id]) - requestAnimationFrame(() => this.video(element, run, delay)); - } else { - if (this.config.debug) - log("video stop", element.id); - __privateGet(this, _loops)[element.id] = false; - } - } -}; -_numTensors = new WeakMap(); -_analyzeMemoryLeaks = new WeakMap(); -_checkSanity = new WeakMap(); -_sanity = new WeakMap(); -_loops = new WeakMap(); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Env, - Human, - defaults, - draw, - env, - match, - models -}); +2Q==`;var i0=D(V());async function JA(e){let t=(r,s="application/octet-stream")=>fetch(`data:${s};base64,${r}`).then(A=>A.blob()),n,o;switch(e.config.warmup){case"face":n=await t(Bt);break;case"body":case"full":n=await t(Ht);break;default:n=null}if(n){let r=await createImageBitmap(n);o=await e.detect(r,e.config),r.close()}return o}async function QA(e){return new Promise(t=>{let n;switch(e.config.warmup){case"face":n="data:image/jpeg;base64,"+Bt;break;case"full":case"body":n="data:image/jpeg;base64,"+Ht;break;default:n=""}let o;if(typeof Image!="undefined")o=new Image;else if(k.Image)o=new k.Image;else return;o.onload=async()=>{let r=$0(o.naturalWidth,o.naturalHeight);if(!r)h("Warmup: Canvas not found"),t(void 0);else{let s=r.getContext("2d");s&&s.drawImage(o,0,0);let A=await e.image(r),a=A.tensor?await e.detect(A.tensor,e.config):void 0;t(a)}},n?o.src=n:t(void 0)})}async function _A(e){let t=r=>Buffer.from(r,"base64"),n;e.config.warmup==="face"?n=t(Bt):n=t(Ht);let o;if("node"in i0&&i0.getBackend()==="tensorflow"){let r=i0.node.decodeJpeg(n),s=i0.expandDims(r,0);e.tf.dispose(r),o=await e.detect(s,e.config),e.tf.dispose(s)}else e.config.debug&&h("Warmup tfjs-node not loaded");return o}async function $A(e){let t;return typeof createImageBitmap=="function"?t=await JA(e):typeof Image!="undefined"||k.Canvas!==void 0?t=await QA(e):t=await _A(e),t}async function ea(e){var a,l,c,x;if(!i0.env().flagRegistry.ENGINE_COMPILE_ONLY)return;let t=i0.getBackend(),n=i0.backend();if(t!=="webgl"&&t!=="humangl"||!(n!=null&&n.checkCompileCompletion))return;i0.env().set("ENGINE_COMPILE_ONLY",!0);let o=i0.engine().state.numTensors,r=[];for(let[i,f]of Object.entries(e.models).filter(([d,m])=>d!==null&&m!==null)){let d=(l=(a=f.inputs)==null?void 0:a[0])!=null&&l.shape?[...f.inputs[0].shape]:[1,64,64,3],m=(x=(c=f.inputs)==null?void 0:c[0])!=null&&x.dtype?f.inputs[0].dtype:"float32";for(let g=0;gi0.dispose(v)):i0.dispose(g)}catch(g){e.config.debug&&h("compile fail model:",i)}i0.dispose(p)}let s=await n.checkCompileCompletionAsync();n.getUniformLocations(),e.config.debug&&h("compile pass:",{models:r,kernels:s.length}),i0.env().set("ENGINE_COMPILE_ONLY",!1);let A=i0.engine().state.numTensors;A-o>0&&h("tensor leak:",A-o)}async function Io(e,t){await D2(e,!1);let n=M();return e.state="warmup",t&&(e.config=s0(e.config,t)),!e.config.warmup||e.config.warmup.length===0||e.config.warmup==="none"?{face:[],body:[],hand:[],gesture:[],object:[],performance:e.performance,timestamp:M(),persons:[],error:null}:new Promise(async o=>{await g2.load(e),await ea(e);let r=await $A(e),s=M();e.config.debug&&h("warmup",e.config.warmup,Math.round(s-n),"ms"),e.emit("warmup"),o(r)})}var w2,X2,q2,Vt,Xe,w1=class{constructor(t){R(this,"version");R(this,"config");R(this,"result");R(this,"state");R(this,"process");R(this,"tf");R(this,"env");R(this,"draw");R(this,"models");R(this,"events");R(this,"faceTriangulation");R(this,"faceUVMap");R(this,"performance");A2(this,w2,void 0);A2(this,X2,void 0);A2(this,q2,void 0);R(this,"gl");R(this,"analyze",(...t)=>{if(!ye(this,X2))return;let n=this.tf.engine().state.numTensors,o=ye(this,w2);j2(this,w2,n);let r=n-o;r!==0&&h(...t,r)});A2(this,Vt,t=>{if(!ye(this,q2))return null;if(!t)return"input is not defined";if(this.env.node&&!(t instanceof se.Tensor))return"input must be a tensor";try{this.tf.getBackend()}catch(n){return"backend not loaded"}return null});R(this,"similarity",P1);R(this,"distance",Z2);R(this,"match",R1);R(this,"webcam",new _2);R(this,"emit",t=>{var n;(n=this.events)!=null&&n.dispatchEvent&&this.events.dispatchEvent(new Event(t))});A2(this,Xe,{});this.env=k;let n=(se.version.tfjs||se.version_core).replace(/-(.*)/,"");Ee.wasmPath=`https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm@${n}/dist/`,Ee.modelBasePath=k.browser?"../models/":"file://models/",Ee.backend=k.browser?"webgl":"tensorflow",this.version=Jt,Object.defineProperty(this,"version",{value:Jt}),this.config=JSON.parse(JSON.stringify(Ee)),Object.seal(this.config),this.config.cacheModels=typeof indexedDB!="undefined",t&&(this.config=s0(this.config,t)),Z1(this.config),this.tf=se,this.state="idle",j2(this,w2,0),j2(this,X2,!1),j2(this,q2,!1),this.performance={},this.events=typeof EventTarget!="undefined"?new EventTarget:void 0,this.models=new V2,this.draw={options:S0,canvas:(r,s)=>h1(r,s),face:(r,s,A)=>M2(r,s,A),body:(r,s,A)=>T2(r,s,A),hand:(r,s,A)=>v2(r,s,A),gesture:(r,s,A)=>R2(r,s,A),object:(r,s,A)=>P2(r,s,A),person:(r,s,A)=>u1(r,s,A),all:(r,s,A)=>b1(r,s,A)},this.result={face:[],body:[],hand:[],gesture:[],object:[],performance:{},timestamp:0,persons:[],error:null},this.process={tensor:null,canvas:null},this.faceTriangulation=G3,this.faceUVMap=B3,this.gl=$,Ft(this,null,""),this.emit("create"),(this.config.debug||this.env.browser)&&h(`version: ${this.version}`),this.config.debug&&h(`tfjs version: ${this.tf.version["tfjs-core"]}`);let o=JSON.parse(JSON.stringify(this.env));delete o.kernels,delete o.initial,delete o.perfadd,this.config.debug&&h("environment:",o)}reset(){let t=this.config.backend;this.config=JSON.parse(JSON.stringify(Ee)),this.config.backend=t,Yt(),k.initial=!0}validate(t){let n=Dt(Ee,t||this.config);return n.length===0&&(this.config=s0(this.config,t)),n}check(){return Gt(this)}now(){return M()}image(t,n=!0){return J2(t,this.config,n)}async segmentation(t,n){var s,A,a;if(n&&(this.config=s0(this.config,n)),!this.config.segmentation.enabled)return null;let o=await J2(t,this.config);if(!o.tensor)return null;let r=null;return(s=this.config.segmentation.modelPath)!=null&&s.includes("rvm")&&(r=await Ao(o.tensor,this.config)),(A=this.config.segmentation.modelPath)!=null&&A.includes("meet")&&(r=await On(o.tensor,this.config)),(a=this.config.segmentation.modelPath)!=null&&a.includes("selfie")&&(r=await io(o.tensor,this.config)),se.dispose(o.tensor),r}enhance(t){return T5(t)}compare(t,n){return D1(this.config,t,n)}async init(){await D2(this,!0),await this.tf.ready(),Yt()}async load(t){this.state="load";let n=M(),o=Object.values(this.models).filter(A=>A).length;t&&(this.config=s0(this.config,t)),this.env.initial&&(await D2(this,!1)||h("error: backend check failed"),await se.ready(),this.env.browser&&(this.config.debug&&h("configuration:",this.config),this.config.debug&&h("tf flags:",this.tf.ENV.flags))),await y1(this),this.env.initial&&this.config.debug&&h("tf engine state:",this.tf.engine().state.numBytes,"bytes",this.tf.engine().state.numTensors,"tensors"),this.env.initial=!1,Object.values(this.models).filter(A=>A).length!==o&&(Gt(this),this.emit("load"));let s=Math.trunc(M()-n);s>(this.performance.loadModels||0)&&(this.performance.loadModels=this.env.perfadd?(this.performance.loadModels||0)+s:s)}next(t=this.result){return jo(t,this.config)}getModelStats(){return x1(this)}async warmup(t){let n=M(),o=await Io(this,t),r=M();return this.performance.warmup=Math.trunc(r-n),o}async profile(t,n){let o=await this.tf.profile(()=>this.detect(t,n)),r={},s=0;for(let a of o.kernels)r[a.name]?r[a.name]+=a.kernelTimeMs:r[a.name]=a.kernelTimeMs,s+=a.kernelTimeMs;let A=[];Object.entries(r).forEach(a=>A.push({kernel:a[0],time:a[1],perc:0}));for(let a of A)a.perc=Math.round(1e3*a.time/s)/1e3,a.time=Math.round(1e3*a.time)/1e3;return A.sort((a,l)=>l.time-a.time),A.length=20,A}async detect(t,n){return this.state="detect",new Promise(async o=>{var g,v,T,y,b,z,w,O,q,t0,Z,U,r0,P,G,P0,e0,u0,x0,H,X;this.state="config";let r;this.config=s0(this.config,n),this.state="check";let s=ye(this,Vt).call(this,t);s&&(h(s,t),this.emit("error"),o({face:[],body:[],hand:[],gesture:[],object:[],performance:this.performance,timestamp:M(),persons:[],error:s}));let A=M();await this.load(),r=M(),this.state="image";let a=await J2(t,this.config);if(this.process=a,this.performance.inputProcess=this.env.perfadd?(this.performance.inputProcess||0)+Math.trunc(M()-r):Math.trunc(M()-r),this.analyze("Get Image:"),!a.tensor){this.config.debug&&h("could not convert input to tensor"),this.emit("error"),o({face:[],body:[],hand:[],gesture:[],object:[],performance:this.performance,timestamp:M(),persons:[],error:"could not convert input to tensor"});return}this.emit("image"),r=M(),this.config.skipAllowed=await V1(this.config,a.tensor),this.performance.totalFrames||(this.performance.totalFrames=0),this.performance.cachedFrames||(this.performance.cachedFrames=0),this.performance.totalFrames++,this.config.skipAllowed&&this.performance.cachedFrames++,this.performance.cacheCheck=this.env.perfadd?(this.performance.cacheCheck||0)+Math.trunc(M()-r):Math.trunc(M()-r),this.analyze("Check Changed:");let l=[],c=[],x=[],i=[];this.state="detect:face",this.config.async?(l=this.config.face.enabled?T1(this,a.tensor):[],this.performance.face&&delete this.performance.face):(r=M(),l=this.config.face.enabled?await T1(this,a.tensor):[],this.performance.face=this.env.perfadd?(this.performance.face||0)+Math.trunc(M()-r):Math.trunc(M()-r)),this.config.async&&(this.config.body.maxDetected===-1||this.config.hand.maxDetected===-1)&&(l=await l),this.analyze("Start Body:"),this.state="detect:body";let f=this.config.body.maxDetected===-1?s0(this.config,{body:{maxDetected:this.config.face.enabled?1*l.length:1}}):this.config;this.config.async?((g=this.config.body.modelPath)!=null&&g.includes("posenet")?c=this.config.body.enabled?n1(a.tensor,f):[]:(v=this.config.body.modelPath)!=null&&v.includes("blazepose")?c=this.config.body.enabled?i5(a.tensor,f):[]:(T=this.config.body.modelPath)!=null&&T.includes("efficientpose")?c=this.config.body.enabled?m5(a.tensor,f):[]:(y=this.config.body.modelPath)!=null&&y.includes("movenet")&&(c=this.config.body.enabled?K5(a.tensor,f):[]),this.performance.body&&delete this.performance.body):(r=M(),(b=this.config.body.modelPath)!=null&&b.includes("posenet")?c=this.config.body.enabled?await n1(a.tensor,f):[]:(z=this.config.body.modelPath)!=null&&z.includes("blazepose")?c=this.config.body.enabled?await i5(a.tensor,f):[]:(w=this.config.body.modelPath)!=null&&w.includes("efficientpose")?c=this.config.body.enabled?await m5(a.tensor,f):[]:(O=this.config.body.modelPath)!=null&&O.includes("movenet")&&(c=this.config.body.enabled?await K5(a.tensor,f):[]),this.performance.body=this.env.perfadd?(this.performance.body||0)+Math.trunc(M()-r):Math.trunc(M()-r)),this.analyze("End Body:"),this.analyze("Start Hand:"),this.state="detect:hand";let d=this.config.hand.maxDetected===-1?s0(this.config,{hand:{maxDetected:this.config.face.enabled?2*l.length:1}}):this.config;this.config.async?((t0=(q=this.config.hand.detector)==null?void 0:q.modelPath)!=null&&t0.includes("handdetect")?x=this.config.hand.enabled?N5(a.tensor,d):[]:(U=(Z=this.config.hand.detector)==null?void 0:Z.modelPath)!=null&&U.includes("handtrack")&&(x=this.config.hand.enabled?L5(a.tensor,d):[]),this.performance.hand&&delete this.performance.hand):(r=M(),(P=(r0=this.config.hand.detector)==null?void 0:r0.modelPath)!=null&&P.includes("handdetect")?x=this.config.hand.enabled?await N5(a.tensor,d):[]:(P0=(G=this.config.hand.detector)==null?void 0:G.modelPath)!=null&&P0.includes("handtrack")&&(x=this.config.hand.enabled?await L5(a.tensor,d):[]),this.performance.hand=this.env.perfadd?(this.performance.hand||0)+Math.trunc(M()-r):Math.trunc(M()-r)),this.analyze("End Hand:"),this.analyze("Start Object:"),this.state="detect:object",this.config.async?((e0=this.config.object.modelPath)!=null&&e0.includes("nanodet")?i=this.config.object.enabled?Q5(a.tensor,this.config):[]:(u0=this.config.object.modelPath)!=null&&u0.includes("centernet")&&(i=this.config.object.enabled?d5(a.tensor,this.config):[]),this.performance.object&&delete this.performance.object):(r=M(),(x0=this.config.object.modelPath)!=null&&x0.includes("nanodet")?i=this.config.object.enabled?await Q5(a.tensor,this.config):[]:(H=this.config.object.modelPath)!=null&&H.includes("centernet")&&(i=this.config.object.enabled?await d5(a.tensor,this.config):[]),this.performance.object=this.env.perfadd?(this.performance.object||0)+Math.trunc(M()-r):Math.trunc(M()-r)),this.analyze("End Object:"),this.state="detect:await",this.config.async&&([l,c,x,i]=await Promise.all([l,c,x,i])),this.state="detect:gesture";let m=[];this.config.gesture.enabled&&(r=M(),m=[...Eo(l),...wo(c),...So(x),...zo(l)],this.config.async?this.performance.gesture&&delete this.performance.gesture:this.performance.gesture=this.env.perfadd?(this.performance.gesture||0)+Math.trunc(M()-r):Math.trunc(M()-r)),this.performance.total=this.env.perfadd?(this.performance.total||0)+Math.trunc(M()-A):Math.trunc(M()-A);let p=((X=this.process.tensor)==null?void 0:X.shape)||[];this.result={face:l,body:c,hand:x,gesture:m,object:i,performance:this.performance,canvas:this.process.canvas,timestamp:Date.now(),error:null,get persons(){return Oo(l,c,x,m,p)}},se.dispose(a.tensor),this.emit("detect"),this.state="idle",o(this.result)})}async sleep(t){return new Promise(n=>{setTimeout(n,t)})}async video(t,n=!0,o=0){n?(ye(this,Xe)[t.id]||(this.config.debug&&h("video start",t.id),ye(this,Xe)[t.id]=!0),!t.paused&&ye(this,Xe)[t.id]&&t.readyState>=2&&await this.detect(t),o>0&&await this.sleep(o),ye(this,Xe)[t.id]&&requestAnimationFrame(()=>this.video(t,n,o))):(this.config.debug&&h("video stop",t.id),ye(this,Xe)[t.id]=!1)}};w2=new WeakMap,X2=new WeakMap,q2=new WeakMap,Vt=new WeakMap,Xe=new WeakMap;0&&(module.exports={Env,Human,defaults,draw,env,match,models}); diff --git a/dist/human.node-wasm.js b/dist/human.node-wasm.js index b78a6a174..579d59182 100644 --- a/dist/human.node-wasm.js +++ b/dist/human.node-wasm.js @@ -4,292 +4,7 @@ author: ' */ -"use strict"; -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; -var __commonJS = (cb, mod3) => function __require() { - return mod3 || (0, cb[__getOwnPropNames(cb)[0]])((mod3 = { exports: {} }).exports, mod3), mod3.exports; -}; -var __export = (target, all2) => { - for (var name in all2) - __defProp(target, name, { get: all2[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod3, isNodeMode, target) => (target = mod3 != null ? __create(__getProtoOf(mod3)) : {}, __copyProps( - isNodeMode || !mod3 || !mod3.__esModule ? __defProp(target, "default", { value: mod3, enumerable: true }) : target, - mod3 -)); -var __toCommonJS = (mod3) => __copyProps(__defProp({}, "__esModule", { value: true }), mod3); -var __publicField = (obj, key, value) => { - __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); - return value; -}; -var __accessCheck = (obj, member, msg) => { - if (!member.has(obj)) - throw TypeError("Cannot " + msg); -}; -var __privateGet = (obj, member, getter) => { - __accessCheck(obj, member, "read from private field"); - return getter ? getter.call(obj) : member.get(obj); -}; -var __privateAdd = (obj, member, value) => { - if (member.has(obj)) - throw TypeError("Cannot add the same private member more than once"); - member instanceof WeakSet ? member.add(obj) : member.set(obj, value); -}; -var __privateSet = (obj, member, value, setter) => { - __accessCheck(obj, member, "write to private field"); - setter ? setter.call(obj, value) : member.set(obj, value); - return value; -}; - -// dist/tfjs.esm.js -var require_tfjs_esm = __commonJS({ - "dist/tfjs.esm.js"(exports, module2) { - "use strict"; - var __defProp2 = Object.defineProperty; - var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; - var __getOwnPropNames2 = Object.getOwnPropertyNames; - var __hasOwnProp2 = Object.prototype.hasOwnProperty; - var __copyProps2 = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames2(from)) - if (!__hasOwnProp2.call(to, key) && key !== except) - __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); - } - return to; - }; - var __reExport = (target, mod3, secondTarget) => (__copyProps2(target, mod3, "default"), secondTarget && __copyProps2(secondTarget, mod3, "default")); - var __toCommonJS2 = (mod3) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod3); - var tf_node_wasm_exports = {}; - module2.exports = __toCommonJS2(tf_node_wasm_exports); - __reExport(tf_node_wasm_exports, require("@tensorflow/tfjs"), module2.exports); - __reExport(tf_node_wasm_exports, require("@tensorflow/tfjs-backend-wasm"), module2.exports); - } -}); - -// src/human.ts -var human_exports = {}; -__export(human_exports, { - Env: () => Env, - Human: () => Human2, - default: () => Human2, - defaults: () => config, - draw: () => draw_exports, - env: () => env, - match: () => match_exports, - models: () => models_exports2 -}); -module.exports = __toCommonJS(human_exports); - -// src/util/util.ts -function log(...msg) { - const dt = new Date(); - const ts = `${dt.getHours().toString().padStart(2, "0")}:${dt.getMinutes().toString().padStart(2, "0")}:${dt.getSeconds().toString().padStart(2, "0")}.${dt.getMilliseconds().toString().padStart(3, "0")}`; - if (msg) - console.log(ts, "Human:", ...msg); -} -function join(folder, file) { - const separator = folder.endsWith("/") ? "" : "/"; - const skipJoin = file.startsWith(".") || file.startsWith("/") || file.startsWith("http:") || file.startsWith("https:") || file.startsWith("file:"); - const path = skipJoin ? `${file}` : `${folder}${separator}${file}`; - if (!path.toLocaleLowerCase().includes(".json")) - throw new Error(`modelpath error: expecting json file: ${path}`); - return path; -} -var now = () => { - if (typeof performance !== "undefined") - return performance.now(); - return parseInt((Number(process.hrtime.bigint()) / 1e3 / 1e3).toString()); -}; -function validate(defaults, config3, parent = "config", msgs = []) { - for (const key of Object.keys(config3)) { - if (typeof config3[key] === "object") { - validate(defaults[key], config3[key], key, msgs); - } else { - const defined = defaults && typeof defaults[key] !== "undefined"; - if (!defined) - msgs.push({ reason: "unknown property", where: `${parent}.${key} = ${config3[key]}` }); - const same = defaults && typeof defaults[key] === typeof config3[key]; - if (defined && !same) - msgs.push({ reason: "property type mismatch", where: `${parent}.${key} = ${config3[key]}`, expected: typeof defaults[key] }); - } - } - if (config3.debug && parent === "config" && msgs.length > 0) - log("invalid configuration", msgs); - return msgs; -} -function mergeDeep(...objects) { - const isObject = (obj) => obj && typeof obj === "object"; - return objects.reduce((prev, obj) => { - Object.keys(obj || {}).forEach((key) => { - const pVal = prev[key]; - const oVal = obj[key]; - if (Array.isArray(pVal) && Array.isArray(oVal)) - prev[key] = pVal.concat(...oVal); - else if (isObject(pVal) && isObject(oVal)) - prev[key] = mergeDeep(pVal, oVal); - else - prev[key] = oVal; - }); - return prev; - }, {}); -} - -// src/config.ts -var config = { - backend: "", - modelBasePath: "", - cacheModels: true, - validateModels: true, - wasmPath: "", - wasmPlatformFetch: false, - debug: false, - async: true, - warmup: "full", - cacheSensitivity: 0.7, - skipAllowed: false, - deallocate: false, - flags: {}, - softwareKernels: false, - filter: { - enabled: true, - equalization: false, - width: 0, - height: 0, - flip: false, - return: true, - brightness: 0, - contrast: 0, - sharpness: 0, - blur: 0, - saturation: 0, - hue: 0, - negative: false, - sepia: false, - vintage: false, - kodachrome: false, - technicolor: false, - polaroid: false, - pixelate: 0 - }, - gesture: { - enabled: true - }, - face: { - enabled: true, - detector: { - modelPath: "blazeface.json", - rotation: true, - maxDetected: 1, - skipFrames: 99, - skipTime: 2500, - minConfidence: 0.2, - iouThreshold: 0.1, - mask: false, - return: false - }, - mesh: { - enabled: true, - modelPath: "facemesh.json", - keepInvalid: false - }, - attention: { - enabled: false, - modelPath: "facemesh-attention.json" - }, - iris: { - enabled: true, - modelPath: "iris.json" - }, - emotion: { - enabled: true, - minConfidence: 0.1, - skipFrames: 99, - skipTime: 1500, - modelPath: "emotion.json" - }, - description: { - enabled: true, - modelPath: "faceres.json", - skipFrames: 99, - skipTime: 3e3, - minConfidence: 0.1 - }, - antispoof: { - enabled: false, - skipFrames: 99, - skipTime: 4e3, - modelPath: "antispoof.json" - }, - liveness: { - enabled: false, - skipFrames: 99, - skipTime: 4e3, - modelPath: "liveness.json" - } - }, - body: { - enabled: true, - modelPath: "movenet-lightning.json", - maxDetected: -1, - minConfidence: 0.3, - skipFrames: 1, - skipTime: 200 - }, - hand: { - enabled: true, - rotation: true, - skipFrames: 99, - skipTime: 1e3, - minConfidence: 0.5, - iouThreshold: 0.2, - maxDetected: -1, - landmarks: true, - detector: { - modelPath: "handtrack.json" - }, - skeleton: { - modelPath: "handlandmark-full.json" - } - }, - object: { - enabled: false, - modelPath: "mb3-centernet.json", - minConfidence: 0.2, - iouThreshold: 0.4, - maxDetected: 10, - skipFrames: 99, - skipTime: 2e3 - }, - segmentation: { - enabled: false, - modelPath: "rvm.json", - ratio: 0.5, - mode: "default" - } -}; - -// src/util/env.ts -var tf3 = __toESM(require_tfjs_esm()); - -// src/image/image.ts -var tf2 = __toESM(require_tfjs_esm()); - -// src/image/imagefxshaders.ts -var vertexIdentity = ` +"use strict";var Lo=Object.create;var S2=Object.defineProperty;var Wo=Object.getOwnPropertyDescriptor;var Fo=Object.getOwnPropertyNames;var Go=Object.getPrototypeOf,Bo=Object.prototype.hasOwnProperty;var Ho=(e,t,n)=>t in e?S2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Vo=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),we=(e,t)=>{for(var n in t)S2(e,n,{get:t[n],enumerable:!0})},j1=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Fo(t))!Bo.call(e,r)&&r!==n&&S2(e,r,{get:()=>t[r],enumerable:!(o=Wo(t,r))||o.enumerable});return e};var D=(e,t,n)=>(n=e!=null?Lo(Go(e)):{},j1(t||!e||!e.__esModule?S2(n,"default",{value:e,enumerable:!0}):n,e)),Do=e=>j1(S2({},"__esModule",{value:!0}),e);var R=(e,t,n)=>(Ho(e,typeof t!="symbol"?t+"":t,n),n),N1=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var ye=(e,t,n)=>(N1(e,t,"read from private field"),n?n.call(e):t.get(e)),A2=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},j2=(e,t,n,o)=>(N1(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n);var V=Vo((Aa,U2)=>{"use strict";var I1=Object.defineProperty,Zo=Object.getOwnPropertyDescriptor,Xo=Object.getOwnPropertyNames,qo=Object.prototype.hasOwnProperty,Xt=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Xo(t))!qo.call(e,r)&&r!==n&&I1(e,r,{get:()=>t[r],enumerable:!(o=Zo(t,r))||o.enumerable});return e},C1=(e,t,n)=>(Xt(e,t,"default"),n&&Xt(n,t,"default")),Uo=e=>Xt(I1({},"__esModule",{value:!0}),e),qt={};U2.exports=Uo(qt);C1(qt,require("@tensorflow/tfjs"),U2.exports);C1(qt,require("@tensorflow/tfjs-backend-wasm"),U2.exports)});var na={};we(na,{Env:()=>N2,Human:()=>E1,default:()=>E1,defaults:()=>Ee,draw:()=>M1,env:()=>k,match:()=>w1,models:()=>g2});module.exports=Do(na);function h(...e){let t=new Date,n=`${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}:${t.getSeconds().toString().padStart(2,"0")}.${t.getMilliseconds().toString().padStart(3,"0")}`;e&&console.log(n,"Human:",...e)}function O1(e,t){let n=e.endsWith("/")?"":"/",r=t.startsWith(".")||t.startsWith("/")||t.startsWith("http:")||t.startsWith("https:")||t.startsWith("file:")?`${t}`:`${e}${n}${t}`;if(!r.toLocaleLowerCase().includes(".json"))throw new Error(`modelpath error: expecting json file: ${r}`);return r}var M=()=>typeof performance!="undefined"?performance.now():parseInt((Number(process.hrtime.bigint())/1e3/1e3).toString());function Zt(e,t,n="config",o=[]){for(let r of Object.keys(t))if(typeof t[r]=="object")Zt(e[r],t[r],r,o);else{let s=e&&typeof e[r]!="undefined";s||o.push({reason:"unknown property",where:`${n}.${r} = ${t[r]}`});let A=e&&typeof e[r]==typeof t[r];s&&!A&&o.push({reason:"property type mismatch",where:`${n}.${r} = ${t[r]}`,expected:typeof e[r]})}return t.debug&&n==="config"&&o.length>0&&h("invalid configuration",o),o}function s0(...e){let t=n=>n&&typeof n=="object";return e.reduce((n,o)=>(Object.keys(o||{}).forEach(r=>{let s=n[r],A=o[r];Array.isArray(s)&&Array.isArray(A)?n[r]=s.concat(...A):t(s)&&t(A)?n[r]=s0(s,A):n[r]=A}),n),{})}var Ee={backend:"",modelBasePath:"",cacheModels:!0,validateModels:!0,wasmPath:"",wasmPlatformFetch:!1,debug:!1,async:!0,warmup:"full",cacheSensitivity:.7,skipAllowed:!1,deallocate:!1,flags:{},softwareKernels:!1,filter:{enabled:!0,equalization:!1,width:0,height:0,flip:!1,return:!0,brightness:0,contrast:0,sharpness:0,blur:0,saturation:0,hue:0,negative:!1,sepia:!1,vintage:!1,kodachrome:!1,technicolor:!1,polaroid:!1,pixelate:0},gesture:{enabled:!0},face:{enabled:!0,detector:{modelPath:"blazeface.json",rotation:!0,maxDetected:1,skipFrames:99,skipTime:2500,minConfidence:.2,iouThreshold:.1,mask:!1,return:!1},mesh:{enabled:!0,modelPath:"facemesh.json",keepInvalid:!1},attention:{enabled:!1,modelPath:"facemesh-attention.json"},iris:{enabled:!0,modelPath:"iris.json"},emotion:{enabled:!0,minConfidence:.1,skipFrames:99,skipTime:1500,modelPath:"emotion.json"},description:{enabled:!0,modelPath:"faceres.json",skipFrames:99,skipTime:3e3,minConfidence:.1},antispoof:{enabled:!1,skipFrames:99,skipTime:4e3,modelPath:"antispoof.json"},liveness:{enabled:!1,skipFrames:99,skipTime:4e3,modelPath:"liveness.json"}},body:{enabled:!0,modelPath:"movenet-lightning.json",maxDetected:-1,minConfidence:.3,skipFrames:1,skipTime:200},hand:{enabled:!0,rotation:!0,skipFrames:99,skipTime:1e3,minConfidence:.5,iouThreshold:.2,maxDetected:-1,landmarks:!0,detector:{modelPath:"handtrack.json"},skeleton:{modelPath:"handlandmark-full.json"}},object:{enabled:!1,modelPath:"mb3-centernet.json",minConfidence:.2,iouThreshold:.4,maxDetected:10,skipFrames:99,skipTime:2e3},segmentation:{enabled:!1,modelPath:"rvm.json",ratio:.5,mode:"default"}};var y0=D(V());var I=D(V());var L1=` precision highp float; attribute vec2 pos; attribute vec2 uv; @@ -299,8 +14,7 @@ var vertexIdentity = ` vUv = uv; gl_Position = vec4(pos.x, pos.y*flipY, 0.0, 1.); } -`; -var colorMatrixWithAlpha = ` +`;var W1=` precision highp float; varying vec2 vUv; uniform sampler2D texture; @@ -312,8 +26,7 @@ var colorMatrixWithAlpha = ` gl_FragColor.b = m[10] * c.r + m[11] * c.g + m[12] * c.b + m[13] * c.a + m[14]; gl_FragColor.a = m[15] * c.r + m[16] * c.g + m[17] * c.b + m[18] * c.a + m[19]; } -`; -var colorMatrixWithoutAlpha = ` +`,F1=` precision highp float; varying vec2 vUv; uniform sampler2D texture; @@ -325,8 +38,7 @@ var colorMatrixWithoutAlpha = ` gl_FragColor.b = m[10] * c.r + m[11] * c.g + m[12] * c.b + m[14]; gl_FragColor.a = c.a; } -`; -var pixelate = ` +`,G1=` precision highp float; varying vec2 vUv; uniform vec2 size; @@ -339,8 +51,7 @@ var pixelate = ` vec2 coord = pixelate(vUv, size); gl_FragColor += texture2D(texture, coord); } -`; -var blur = ` +`,B1=` precision highp float; varying vec2 vUv; uniform sampler2D texture; @@ -363,8 +74,7 @@ var blur = ` gl_FragColor += texture2D(texture, vUv + vec2( 6.0*px.x, 6.0*px.y))*0.00895781211794; gl_FragColor += texture2D(texture, vUv + vec2( 7.0*px.x, 7.0*px.y))*0.0044299121055113265; } -`; -var convolution = ` +`,H1=` precision highp float; varying vec2 vUv; uniform sampler2D texture; @@ -386,13456 +96,19 @@ var convolution = ` c31 * m[6] + c32 * m[7] + c33 * m[8]; gl_FragColor.a = c22.a; } -`; - -// src/image/imagefx.ts -var collect = (source, prefix, collection) => { - const r = new RegExp("\\b" + prefix + " \\w+ (\\w+)", "ig"); - source.replace(r, (match3, name) => { - collection[name] = 0; - return match3; - }); -}; -var GLProgram = class { - constructor(gl, vertexSource, fragmentSource) { - __publicField(this, "uniform", {}); - __publicField(this, "attribute", {}); - __publicField(this, "gl"); - __publicField(this, "id"); - __publicField(this, "compile", (source, type) => { - const shader = this.gl.createShader(type); - if (!shader) { - log("filter: could not create shader"); - return null; - } - this.gl.shaderSource(shader, source); - this.gl.compileShader(shader); - if (!this.gl.getShaderParameter(shader, this.gl.COMPILE_STATUS)) { - log(`filter: gl compile failed: ${this.gl.getShaderInfoLog(shader) || "unknown"}`); - return null; - } - return shader; - }); - this.gl = gl; - const vertexShader = this.compile(vertexSource, this.gl.VERTEX_SHADER); - const fragmentShader = this.compile(fragmentSource, this.gl.FRAGMENT_SHADER); - this.id = this.gl.createProgram(); - if (!vertexShader || !fragmentShader) - return; - if (!this.id) { - log("filter: could not create webgl program"); - return; - } - this.gl.attachShader(this.id, vertexShader); - this.gl.attachShader(this.id, fragmentShader); - this.gl.linkProgram(this.id); - if (!this.gl.getProgramParameter(this.id, this.gl.LINK_STATUS)) { - log(`filter: gl link failed: ${this.gl.getProgramInfoLog(this.id) || "unknown"}`); - return; - } - this.gl.useProgram(this.id); - collect(vertexSource, "attribute", this.attribute); - for (const a in this.attribute) - this.attribute[a] = this.gl.getAttribLocation(this.id, a); - collect(vertexSource, "uniform", this.uniform); - collect(fragmentSource, "uniform", this.uniform); - for (const u in this.uniform) - this.uniform[u] = this.gl.getUniformLocation(this.id, u); - } -}; -function GLImageFilter() { - let drawCount = 0; - let sourceTexture = null; - let lastInChain = false; - let currentFramebufferIndex = -1; - let tempFramebuffers = [null, null]; - let filterChain = []; - let vertexBuffer = null; - let currentProgram = null; - const fxcanvas = canvas(100, 100); - const shaderProgramCache = {}; - const DRAW = { INTERMEDIATE: 1 }; - const gl = fxcanvas.getContext("webgl"); - if (!gl) { - log("filter: cannot get webgl context"); - return; - } - this.gl = gl; - function resize(width, height) { - if (width === fxcanvas.width && height === fxcanvas.height) - return; - fxcanvas.width = width; - fxcanvas.height = height; - if (!vertexBuffer) { - const vertices = new Float32Array([-1, -1, 0, 1, 1, -1, 1, 1, -1, 1, 0, 0, -1, 1, 0, 0, 1, -1, 1, 1, 1, 1, 1, 0]); - vertexBuffer = gl.createBuffer(); - gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer); - gl.bufferData(gl.ARRAY_BUFFER, vertices, gl.STATIC_DRAW); - gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true); - } - gl.viewport(0, 0, fxcanvas.width, fxcanvas.height); - tempFramebuffers = [null, null]; - } - function createFramebufferTexture(width, height) { - const fbo = gl.createFramebuffer(); - gl.bindFramebuffer(gl.FRAMEBUFFER, fbo); - const renderbuffer = gl.createRenderbuffer(); - gl.bindRenderbuffer(gl.RENDERBUFFER, renderbuffer); - const texture = gl.createTexture(); - gl.bindTexture(gl.TEXTURE_2D, texture); - gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE); - gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0); - gl.bindTexture(gl.TEXTURE_2D, null); - gl.bindFramebuffer(gl.FRAMEBUFFER, null); - return { fbo, texture }; - } - function getTempFramebuffer(index2) { - tempFramebuffers[index2] = tempFramebuffers[index2] || createFramebufferTexture(fxcanvas.width, fxcanvas.height); - return tempFramebuffers[index2]; - } - function draw(flags = 0) { - if (!currentProgram) - return; - let source = null; - let target = null; - let flipY = false; - if (drawCount === 0) - source = sourceTexture; - else - source = getTempFramebuffer(currentFramebufferIndex).texture || null; - drawCount++; - if (lastInChain && !(flags & DRAW.INTERMEDIATE)) { - target = null; - flipY = drawCount % 2 === 0; - } else { - currentFramebufferIndex = (currentFramebufferIndex + 1) % 2; - target = getTempFramebuffer(currentFramebufferIndex).fbo || null; - } - gl.bindTexture(gl.TEXTURE_2D, source); - gl.bindFramebuffer(gl.FRAMEBUFFER, target); - gl.uniform1f(currentProgram.uniform["flipY"], flipY ? -1 : 1); - gl.drawArrays(gl.TRIANGLES, 0, 6); - } - function compileShader(fragmentSource) { - if (shaderProgramCache[fragmentSource]) { - currentProgram = shaderProgramCache[fragmentSource]; - gl.useProgram((currentProgram ? currentProgram.id : null) || null); - return currentProgram; - } - currentProgram = new GLProgram(gl, vertexIdentity, fragmentSource); - if (!currentProgram) { - log("filter: could not get webgl program"); - return null; - } - const floatSize = Float32Array.BYTES_PER_ELEMENT; - const vertSize = 4 * floatSize; - gl.enableVertexAttribArray(currentProgram.attribute["pos"]); - gl.vertexAttribPointer(currentProgram.attribute["pos"], 2, gl.FLOAT, false, vertSize, 0 * floatSize); - gl.enableVertexAttribArray(currentProgram.attribute["uv"]); - gl.vertexAttribPointer(currentProgram.attribute["uv"], 2, gl.FLOAT, false, vertSize, 2 * floatSize); - shaderProgramCache[fragmentSource] = currentProgram; - return currentProgram; - } - const filter = { - colorMatrix: (matrix) => { - const m = new Float32Array(matrix); - m[4] /= 255; - m[9] /= 255; - m[14] /= 255; - m[19] /= 255; - const shader = m[18] === 1 && m[3] === 0 && m[8] === 0 && m[13] === 0 && m[15] === 0 && m[16] === 0 && m[17] === 0 && m[19] === 0 ? colorMatrixWithoutAlpha : colorMatrixWithAlpha; - const program = compileShader(shader); - if (!program) - return; - gl.uniform1fv(program.uniform["m"], m); - draw(); - }, - brightness: (brightness) => { - const b = (brightness || 0) + 1; - filter.colorMatrix([ - b, - 0, - 0, - 0, - 0, - 0, - b, - 0, - 0, - 0, - 0, - 0, - b, - 0, - 0, - 0, - 0, - 0, - 1, - 0 - ]); - }, - saturation: (amount) => { - const x = (amount || 0) * 2 / 3 + 1; - const y = (x - 1) * -0.5; - filter.colorMatrix([ - x, - y, - y, - 0, - 0, - y, - x, - y, - 0, - 0, - y, - y, - x, - 0, - 0, - 0, - 0, - 0, - 1, - 0 - ]); - }, - desaturate: () => { - filter.saturation(-1); - }, - contrast: (amount) => { - const v = (amount || 0) + 1; - const o = -128 * (v - 1); - filter.colorMatrix([ - v, - 0, - 0, - 0, - o, - 0, - v, - 0, - 0, - o, - 0, - 0, - v, - 0, - o, - 0, - 0, - 0, - 1, - 0 - ]); - }, - negative: () => { - filter.contrast(-2); - }, - hue: (rotation) => { - rotation = (rotation || 0) / 180 * Math.PI; - const cos = Math.cos(rotation); - const sin = Math.sin(rotation); - const lumR = 0.213; - const lumG = 0.715; - const lumB = 0.072; - filter.colorMatrix([ - lumR + cos * (1 - lumR) + sin * -lumR, - lumG + cos * -lumG + sin * -lumG, - lumB + cos * -lumB + sin * (1 - lumB), - 0, - 0, - lumR + cos * -lumR + sin * 0.143, - lumG + cos * (1 - lumG) + sin * 0.14, - lumB + cos * -lumB + sin * -0.283, - 0, - 0, - lumR + cos * -lumR + sin * -(1 - lumR), - lumG + cos * -lumG + sin * lumG, - lumB + cos * (1 - lumB) + sin * lumB, - 0, - 0, - 0, - 0, - 0, - 1, - 0 - ]); - }, - desaturateLuminance: () => { - filter.colorMatrix([ - 0.2764723, - 0.929708, - 0.0938197, - 0, - -37.1, - 0.2764723, - 0.929708, - 0.0938197, - 0, - -37.1, - 0.2764723, - 0.929708, - 0.0938197, - 0, - -37.1, - 0, - 0, - 0, - 1, - 0 - ]); - }, - sepia: () => { - filter.colorMatrix([ - 0.393, - 0.7689999, - 0.18899999, - 0, - 0, - 0.349, - 0.6859999, - 0.16799999, - 0, - 0, - 0.272, - 0.5339999, - 0.13099999, - 0, - 0, - 0, - 0, - 0, - 1, - 0 - ]); - }, - brownie: () => { - filter.colorMatrix([ - 0.5997023498159715, - 0.34553243048391263, - -0.2708298674538042, - 0, - 47.43192855600873, - -0.037703249837783157, - 0.8609577587992641, - 0.15059552388459913, - 0, - -36.96841498319127, - 0.24113635128153335, - -0.07441037908422492, - 0.44972182064877153, - 0, - -7.562075277591283, - 0, - 0, - 0, - 1, - 0 - ]); - }, - vintagePinhole: () => { - filter.colorMatrix([ - 0.6279345635605994, - 0.3202183420819367, - -0.03965408211312453, - 0, - 9.651285835294123, - 0.02578397704808868, - 0.6441188644374771, - 0.03259127616149294, - 0, - 7.462829176470591, - 0.0466055556782719, - -0.0851232987247891, - 0.5241648018700465, - 0, - 5.159190588235296, - 0, - 0, - 0, - 1, - 0 - ]); - }, - kodachrome: () => { - filter.colorMatrix([ - 1.1285582396593525, - -0.3967382283601348, - -0.03992559172921793, - 0, - 63.72958762196502, - -0.16404339962244616, - 1.0835251566291304, - -0.05498805115633132, - 0, - 24.732407896706203, - -0.16786010706155763, - -0.5603416277695248, - 1.6014850761964943, - 0, - 35.62982807460946, - 0, - 0, - 0, - 1, - 0 - ]); - }, - technicolor: () => { - filter.colorMatrix([ - 1.9125277891456083, - -0.8545344976951645, - -0.09155508482755585, - 0, - 11.793603434377337, - -0.3087833385928097, - 1.7658908555458428, - -0.10601743074722245, - 0, - -70.35205161461398, - -0.231103377548616, - -0.7501899197440212, - 1.847597816108189, - 0, - 30.950940869491138, - 0, - 0, - 0, - 1, - 0 - ]); - }, - polaroid: () => { - filter.colorMatrix([ - 1.438, - -0.062, - -0.062, - 0, - 0, - -0.122, - 1.378, - -0.122, - 0, - 0, - -0.016, - -0.016, - 1.483, - 0, - 0, - 0, - 0, - 0, - 1, - 0 - ]); - }, - shiftToBGR: () => { - filter.colorMatrix([ - 0, - 0, - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 0 - ]); - }, - convolution: (matrix) => { - const m = new Float32Array(matrix); - const pixelSizeX = 1 / fxcanvas.width; - const pixelSizeY = 1 / fxcanvas.height; - const program = compileShader(convolution); - if (!program) - return; - gl.uniform1fv(program.uniform["m"], m); - gl.uniform2f(program.uniform["px"], pixelSizeX, pixelSizeY); - draw(); - }, - detectEdges: () => { - filter.convolution.call(this, [ - 0, - 1, - 0, - 1, - -4, - 1, - 0, - 1, - 0 - ]); - }, - sobelX: () => { - filter.convolution.call(this, [ - -1, - 0, - 1, - -2, - 0, - 2, - -1, - 0, - 1 - ]); - }, - sobelY: () => { - filter.convolution.call(this, [ - -1, - -2, - -1, - 0, - 0, - 0, - 1, - 2, - 1 - ]); - }, - sharpen: (amount) => { - const a = amount || 1; - filter.convolution.call(this, [ - 0, - -1 * a, - 0, - -1 * a, - 1 + 4 * a, - -1 * a, - 0, - -1 * a, - 0 - ]); - }, - emboss: (size2) => { - const s = size2 || 1; - filter.convolution.call(this, [ - -2 * s, - -1 * s, - 0, - -1 * s, - 1, - 1 * s, - 0, - 1 * s, - 2 * s - ]); - }, - blur: (size2) => { - const blurSizeX = size2 / 7 / fxcanvas.width; - const blurSizeY = size2 / 7 / fxcanvas.height; - const program = compileShader(blur); - if (!program) - return; - gl.uniform2f(program.uniform["px"], 0, blurSizeY); - draw(DRAW.INTERMEDIATE); - gl.uniform2f(program.uniform["px"], blurSizeX, 0); - draw(); - }, - pixelate: (size2) => { - const blurSizeX = size2 / fxcanvas.width; - const blurSizeY = size2 / fxcanvas.height; - const program = compileShader(pixelate); - if (!program) - return; - gl.uniform2f(program.uniform["size"], blurSizeX, blurSizeY); - draw(); - } - }; - this.add = function(name) { - const args = Array.prototype.slice.call(arguments, 1); - const func = filter[name]; - filterChain.push({ func, args }); - }; - this.reset = function() { - filterChain = []; - }; - this.get = function() { - return filterChain; - }; - this.apply = function(image27) { - resize(image27.width, image27.height); - drawCount = 0; - if (!sourceTexture) - sourceTexture = gl.createTexture(); - gl.bindTexture(gl.TEXTURE_2D, sourceTexture); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST); - gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image27); - for (let i = 0; i < filterChain.length; i++) { - lastInChain = i === filterChain.length - 1; - const f = filterChain[i]; - f.func.apply(this, f.args || []); - } - return fxcanvas; - }; - this.draw = function(image27) { - this.add("brightness", 0); - return this.apply(image27); - }; -} - -// src/image/enhance.ts -var tf = __toESM(require_tfjs_esm()); -async function histogramEqualization(inputImage) { - const squeeze14 = inputImage.shape.length === 4 ? tf.squeeze(inputImage) : inputImage; - const channels = tf.split(squeeze14, 3, 2); - const min2 = [tf.min(channels[0]), tf.min(channels[1]), tf.min(channels[2])]; - const max4 = [tf.max(channels[0]), tf.max(channels[1]), tf.max(channels[2])]; - const absMax = await Promise.all(max4.map((channel) => channel.data())); - const maxValue = 0.99 * Math.max(absMax[0][0], absMax[1][0], absMax[2][0]); - const sub11 = [tf.sub(channels[0], min2[0]), tf.sub(channels[1], min2[1]), tf.sub(channels[2], min2[2])]; - const range = [tf.sub(max4[0], min2[0]), tf.sub(max4[1], min2[1]), tf.sub(max4[2], min2[2])]; - const fact = [tf.div(maxValue, range[0]), tf.div(maxValue, range[1]), tf.div(maxValue, range[2])]; - const enh = [tf.mul(sub11[0], fact[0]), tf.mul(sub11[1], fact[1]), tf.mul(sub11[2], fact[2])]; - const rgb2 = tf.stack([enh[0], enh[1], enh[2]], 2); - const reshape8 = tf.reshape(rgb2, [1, squeeze14.shape[0], squeeze14.shape[1], 3]); - tf.dispose([...channels, ...min2, ...max4, ...sub11, ...range, ...fact, ...enh, rgb2, squeeze14]); - return reshape8; -} - -// src/image/image.ts -var maxSize = 3840; -var inCanvas = null; -var outCanvas = null; -var tmpCanvas = null; -var fx; -var last = { - inputSum: 0, - cacheDiff: 1, - sumMethod: 0, - inputTensor: void 0 -}; -function reset() { - last.inputSum = 0; - last.cacheDiff = 1; - last.sumMethod = 0; - last.inputTensor = void 0; -} -function canvas(width, height) { - let c; - if (env.browser) { - if (env.worker) { - if (typeof OffscreenCanvas === "undefined") - throw new Error("canvas error: attempted to run in web worker but OffscreenCanvas is not supported"); - c = new OffscreenCanvas(width, height); - } else { - if (typeof document === "undefined") - throw new Error("canvas error: attempted to run in browser but DOM is not defined"); - c = document.createElement("canvas"); - c.width = width; - c.height = height; - } - } else { - if (typeof env.Canvas !== "undefined") - c = new env.Canvas(width, height); - else if (typeof globalThis.Canvas !== "undefined") - c = new globalThis.Canvas(width, height); - } - return c; -} -function copy(input, output) { - const outputCanvas = output || canvas(input.width, input.height); - const ctx = outputCanvas.getContext("2d"); - ctx.drawImage(input, 0, 0); - return outputCanvas; -} -async function process2(input, config3, getTensor = true) { - var _a, _b; - if (!input) { - if (config3.debug) - log("input error: input is missing"); - return { tensor: null, canvas: null }; - } - if (!(input instanceof tf2.Tensor) && !(typeof Image !== "undefined" && input instanceof Image) && !(typeof env.Canvas !== "undefined" && input instanceof env.Canvas) && !(typeof globalThis.Canvas !== "undefined" && input instanceof globalThis.Canvas) && !(typeof ImageData !== "undefined" && input instanceof ImageData) && !(typeof ImageBitmap !== "undefined" && input instanceof ImageBitmap) && !(typeof HTMLImageElement !== "undefined" && input instanceof HTMLImageElement) && !(typeof HTMLMediaElement !== "undefined" && input instanceof HTMLMediaElement) && !(typeof HTMLVideoElement !== "undefined" && input instanceof HTMLVideoElement) && !(typeof HTMLCanvasElement !== "undefined" && input instanceof HTMLCanvasElement) && !(typeof OffscreenCanvas !== "undefined" && input instanceof OffscreenCanvas)) { - throw new Error("input error: type is not recognized"); - } - if (input instanceof tf2.Tensor) { - let tensor7 = null; - if (input["isDisposedInternal"]) - throw new Error("input error: attempted to use tensor but it is disposed"); - if (!input.shape) - throw new Error("input error: attempted to use tensor without a shape"); - if (input.shape.length === 3) { - if (input.shape[2] === 3) { - tensor7 = tf2.expandDims(input, 0); - } else if (input.shape[2] === 4) { - const rgb2 = tf2.slice3d(input, [0, 0, 0], [-1, -1, 3]); - tensor7 = tf2.expandDims(rgb2, 0); - tf2.dispose(rgb2); - } - } else if (input.shape.length === 4) { - if (input.shape[3] === 3) { - tensor7 = tf2.clone(input); - } else if (input.shape[3] === 4) { - tensor7 = tf2.slice4d(input, [0, 0, 0, 0], [-1, -1, -1, 3]); - } - } - if (tensor7 == null || tensor7.shape.length !== 4 || tensor7.shape[0] !== 1 || tensor7.shape[3] !== 3) - throw new Error(`input error: attempted to use tensor with unrecognized shape: ${input.shape.toString()}`); - if (tensor7.dtype === "int32") { - const cast8 = tf2.cast(tensor7, "float32"); - tf2.dispose(tensor7); - tensor7 = cast8; - } - return { tensor: tensor7, canvas: config3.filter.return ? outCanvas : null }; - } - if (typeof input["readyState"] !== "undefined" && input.readyState <= 2) { - if (config3.debug) - log("input stream is not ready"); - return { tensor: null, canvas: inCanvas }; - } - const originalWidth = input["naturalWidth"] || input["videoWidth"] || input["width"] || input["shape"] && input["shape"][1] > 0; - const originalHeight = input["naturalHeight"] || input["videoHeight"] || input["height"] || input["shape"] && input["shape"][2] > 0; - if (!originalWidth || !originalHeight) { - if (config3.debug) - log("cannot determine input dimensions"); - return { tensor: null, canvas: inCanvas }; - } - let targetWidth = originalWidth; - let targetHeight = originalHeight; - if (targetWidth > maxSize) { - targetWidth = maxSize; - targetHeight = Math.trunc(targetWidth * originalHeight / originalWidth); - } - if (targetHeight > maxSize) { - targetHeight = maxSize; - targetWidth = Math.trunc(targetHeight * originalWidth / originalHeight); - } - if ((((_a = config3.filter) == null ? void 0 : _a.width) || 0) > 0) - targetWidth = config3.filter.width; - else if ((((_b = config3.filter) == null ? void 0 : _b.height) || 0) > 0) - targetWidth = originalWidth * ((config3.filter.height || 0) / originalHeight); - if ((config3.filter.height || 0) > 0) - targetHeight = config3.filter.height; - else if ((config3.filter.width || 0) > 0) - targetHeight = originalHeight * ((config3.filter.width || 0) / originalWidth); - if (!targetWidth || !targetHeight) - throw new Error("input error: cannot determine dimension"); - if (!inCanvas || inCanvas.width !== targetWidth || inCanvas.height !== targetHeight) - inCanvas = canvas(targetWidth, targetHeight); - const inCtx = inCanvas.getContext("2d"); - if (typeof ImageData !== "undefined" && input instanceof ImageData) { - inCtx.putImageData(input, 0, 0); - } else { - if (config3.filter.flip && typeof inCtx.translate !== "undefined") { - inCtx.translate(originalWidth, 0); - inCtx.scale(-1, 1); - inCtx.drawImage(input, 0, 0, originalWidth, originalHeight, 0, 0, inCanvas.width, inCanvas.height); - inCtx.setTransform(1, 0, 0, 1, 0, 0); - } else { - inCtx.drawImage(input, 0, 0, originalWidth, originalHeight, 0, 0, inCanvas.width, inCanvas.height); - } - } - if (!outCanvas || inCanvas.width !== outCanvas.width || inCanvas.height !== outCanvas.height) - outCanvas = canvas(inCanvas.width, inCanvas.height); - if (config3.filter.enabled && env.webgl.supported) { - if (!fx) - fx = env.browser ? new GLImageFilter() : null; - env.filter = !!fx; - if (!(fx == null ? void 0 : fx.add)) { - if (config3.debug) - log("input process error: cannot initialize filters"); - env.webgl.supported = false; - config3.filter.enabled = false; - copy(inCanvas, outCanvas); - } else { - fx.reset(); - if (config3.filter.brightness !== 0) - fx.add("brightness", config3.filter.brightness); - if (config3.filter.contrast !== 0) - fx.add("contrast", config3.filter.contrast); - if (config3.filter.sharpness !== 0) - fx.add("sharpen", config3.filter.sharpness); - if (config3.filter.blur !== 0) - fx.add("blur", config3.filter.blur); - if (config3.filter.saturation !== 0) - fx.add("saturation", config3.filter.saturation); - if (config3.filter.hue !== 0) - fx.add("hue", config3.filter.hue); - if (config3.filter.negative) - fx.add("negative"); - if (config3.filter.sepia) - fx.add("sepia"); - if (config3.filter.vintage) - fx.add("brownie"); - if (config3.filter.sepia) - fx.add("sepia"); - if (config3.filter.kodachrome) - fx.add("kodachrome"); - if (config3.filter.technicolor) - fx.add("technicolor"); - if (config3.filter.polaroid) - fx.add("polaroid"); - if (config3.filter.pixelate !== 0) - fx.add("pixelate", config3.filter.pixelate); - if (fx.get() > 0) - outCanvas = fx.apply(inCanvas); - else - outCanvas = fx.draw(inCanvas); - } - } else { - copy(inCanvas, outCanvas); - if (fx) - fx = null; - env.filter = !!fx; - } - if (!getTensor) - return { tensor: null, canvas: outCanvas }; - if (!outCanvas) - throw new Error("canvas error: cannot create output"); - let pixels; - let depth = 3; - if (typeof ImageData !== "undefined" && input instanceof ImageData || input.data && input.width && input.height) { - if (env.browser && tf2.browser) { - pixels = tf2.browser ? tf2.browser.fromPixels(input) : null; - } else { - depth = input.data.length / input.height / input.width; - const arr = new Uint8Array(input.data.buffer); - pixels = tf2.tensor(arr, [input.height, input.width, depth], "int32"); - } - } else { - if (!tmpCanvas || outCanvas.width !== tmpCanvas.width || outCanvas.height !== tmpCanvas.height) - tmpCanvas = canvas(outCanvas.width, outCanvas.height); - if (tf2.browser && env.browser) { - if (config3.backend === "webgl" || config3.backend === "humangl" || config3.backend === "webgpu") { - pixels = tf2.browser.fromPixels(outCanvas); - } else { - tmpCanvas = copy(outCanvas); - pixels = tf2.browser.fromPixels(tmpCanvas); - } - } else { - const tempCanvas = copy(outCanvas); - const tempCtx = tempCanvas.getContext("2d"); - const tempData = tempCtx.getImageData(0, 0, targetWidth, targetHeight); - depth = tempData.data.length / targetWidth / targetHeight; - const arr = new Uint8Array(tempData.data.buffer); - pixels = tf2.tensor(arr, [targetWidth, targetHeight, depth]); - } - } - if (depth === 4) { - const rgb2 = tf2.slice3d(pixels, [0, 0, 0], [-1, -1, 3]); - tf2.dispose(pixels); - pixels = rgb2; - } - if (!pixels) - throw new Error("input error: cannot create tensor"); - const casted = tf2.cast(pixels, "float32"); - const tensor6 = config3.filter.equalization ? await histogramEqualization(casted) : tf2.expandDims(casted, 0); - tf2.dispose([pixels, casted]); - return { tensor: tensor6, canvas: config3.filter.return ? outCanvas : null }; -} -async function skip(config3, input) { - let skipFrame = false; - if (config3.cacheSensitivity === 0 || !input.shape || input.shape.length !== 4 || input.shape[1] > 2048 || input.shape[2] > 2048) - return skipFrame; - if (!last.inputTensor) { - last.inputTensor = tf2.clone(input); - } else if (last.inputTensor.shape[1] !== input.shape[1] || last.inputTensor.shape[2] !== input.shape[2]) { - tf2.dispose(last.inputTensor); - last.inputTensor = tf2.clone(input); - } else { - const t2 = {}; - t2.diff = tf2.sub(input, last.inputTensor); - t2.squared = tf2.mul(t2.diff, t2.diff); - t2.sum = tf2.sum(t2.squared); - const diffSum = await t2.sum.data(); - const diffRelative = diffSum[0] / (input.shape[1] || 1) / (input.shape[2] || 1) / 255 / 3; - tf2.dispose([last.inputTensor, t2.diff, t2.squared, t2.sum]); - last.inputTensor = tf2.clone(input); - skipFrame = diffRelative <= (config3.cacheSensitivity || 0); - } - return skipFrame; -} -async function compare(config3, input1, input2) { - const t2 = {}; - if (!input1 || !input2 || input1.shape.length !== 4 || input1.shape.length !== input2.shape.length) { - if (!config3.debug) - log("invalid input tensor or tensor shapes do not match:", input1.shape, input2.shape); - return 0; - } - if (input1.shape[0] !== 1 || input2.shape[0] !== 1 || input1.shape[3] !== 3 || input2.shape[3] !== 3) { - if (!config3.debug) - log("input tensors must be of shape [1, height, width, 3]:", input1.shape, input2.shape); - return 0; - } - t2.input1 = tf2.clone(input1); - t2.input2 = input1.shape[1] !== input2.shape[1] || input1.shape[2] !== input2.shape[2] ? tf2.image.resizeBilinear(input2, [input1.shape[1], input1.shape[2]]) : tf2.clone(input2); - t2.diff = tf2.sub(t2.input1, t2.input2); - t2.squared = tf2.mul(t2.diff, t2.diff); - t2.sum = tf2.sum(t2.squared); - const diffSum = await t2.sum.data(); - const diffRelative = diffSum[0] / (input1.shape[1] || 1) / (input1.shape[2] || 1) / 255 / 3; - tf2.dispose([t2.input1, t2.input2, t2.diff, t2.squared, t2.sum]); - return diffRelative; -} - -// src/util/env.ts -var Env = class { - constructor() { - __publicField(this, "browser"); - __publicField(this, "node"); - __publicField(this, "worker"); - __publicField(this, "platform", ""); - __publicField(this, "agent", ""); - __publicField(this, "backends", []); - __publicField(this, "initial"); - __publicField(this, "filter"); - __publicField(this, "tfjs"); - __publicField(this, "offscreen"); - __publicField(this, "perfadd", false); - __publicField(this, "tensorflow", { - version: void 0, - gpu: void 0 - }); - __publicField(this, "wasm", { - supported: void 0, - backend: void 0, - simd: void 0, - multithread: void 0 - }); - __publicField(this, "webgl", { - supported: void 0, - backend: void 0, - version: void 0, - renderer: void 0 - }); - __publicField(this, "webgpu", { - supported: void 0, - backend: void 0, - adapter: void 0 - }); - __publicField(this, "cpu", { - model: void 0, - flags: [] - }); - __publicField(this, "kernels", []); - __publicField(this, "Canvas"); - __publicField(this, "Image"); - __publicField(this, "ImageData"); - this.browser = typeof navigator !== "undefined"; - this.node = typeof process !== "undefined" && typeof process.versions !== "undefined" && typeof process.versions.node !== "undefined"; - this.tfjs = { version: tf3.version["tfjs-core"] }; - this.offscreen = typeof OffscreenCanvas !== "undefined"; - this.initial = true; - this.worker = this.browser && this.offscreen ? typeof WorkerGlobalScope !== "undefined" : void 0; - if (typeof navigator !== "undefined") { - const raw = navigator.userAgent.match(/\(([^()]+)\)/g); - if (raw == null ? void 0 : raw[0]) { - const platformMatch = raw[0].match(/\(([^()]+)\)/g); - this.platform = (platformMatch == null ? void 0 : platformMatch[0]) ? platformMatch[0].replace(/\(|\)/g, "") : ""; - this.agent = navigator.userAgent.replace(raw[0], ""); - if (this.platform[1]) - this.agent = this.agent.replace(raw[1], ""); - this.agent = this.agent.replace(/ /g, " "); - } - } else if (typeof process !== "undefined") { - this.platform = `${process.platform} ${process.arch}`; - this.agent = `NodeJS ${process.version}`; - } - } - async updateBackend() { - this.backends = Object.keys(tf3.engine().registryFactory); - this.tensorflow = { - version: tf3.backend().binding ? tf3.backend().binding.TF_Version : void 0, - gpu: tf3.backend().binding ? tf3.backend().binding.isUsingGpuDevice() : void 0 - }; - this.wasm.supported = typeof WebAssembly !== "undefined"; - this.wasm.backend = this.backends.includes("wasm"); - if (this.wasm.supported && this.wasm.backend && tf3.getBackend() === "wasm") { - this.wasm.simd = tf3.env().get("WASM_HAS_SIMD_SUPPORT"); - this.wasm.multithread = tf3.env().get("WASM_HAS_MULTITHREAD_SUPPORT"); - } - const c = canvas(100, 100); - const ctx = c ? c.getContext("webgl2") : void 0; - this.webgl.supported = typeof ctx !== "undefined"; - this.webgl.backend = this.backends.includes("webgl"); - if (this.webgl.supported && this.webgl.backend && (tf3.getBackend() === "webgl" || tf3.getBackend() === "humangl")) { - const gl = tf3.backend().gpgpu !== "undefined" ? await tf3.backend().getGPGPUContext().gl : null; - if (gl) { - this.webgl.version = gl.getParameter(gl.VERSION); - this.webgl.renderer = gl.getParameter(gl.RENDERER); - } - } - this.webgpu.supported = this.browser && typeof navigator.gpu !== "undefined"; - this.webgpu.backend = this.backends.includes("webgpu"); - try { - if (this.webgpu.supported) { - const adapter = await navigator.gpu.requestAdapter(); - this.webgpu.adapter = adapter ? adapter.name : void 0; - } - } catch (e) { - this.webgpu.supported = false; - } - try { - this.kernels = tf3.getKernelsForBackend(tf3.getBackend()).map((kernel) => kernel.kernelName.toLowerCase()); - } catch (e) { - } - } - updateCPU() { - const cpu = { model: "", flags: [] }; - if (this.node && this.platform.startsWith("linux")) { - } - if (!this.cpu) - Object.defineProperty(this, "cpu", { value: cpu }); - else - this.cpu = cpu; - } -}; -var env = new Env(); - -// src/util/webcam.ts -var WebCam = class { - constructor() { - __publicField(this, "config"); - __publicField(this, "element"); - __publicField(this, "stream"); - __publicField(this, "start", async (webcamConfig) => { - if (webcamConfig == null ? void 0 : webcamConfig.debug) - this.config.debug = webcamConfig == null ? void 0 : webcamConfig.debug; - if (webcamConfig == null ? void 0 : webcamConfig.crop) - this.config.crop = webcamConfig == null ? void 0 : webcamConfig.crop; - if (webcamConfig == null ? void 0 : webcamConfig.mode) - this.config.mode = webcamConfig == null ? void 0 : webcamConfig.mode; - if (webcamConfig == null ? void 0 : webcamConfig.width) - this.config.width = webcamConfig == null ? void 0 : webcamConfig.width; - if (webcamConfig == null ? void 0 : webcamConfig.height) - this.config.height = webcamConfig == null ? void 0 : webcamConfig.height; - if (webcamConfig == null ? void 0 : webcamConfig.element) { - if (typeof webcamConfig.element === "string") { - const el = document.getElementById(webcamConfig.element); - if (el && el instanceof HTMLVideoElement) { - this.element = el; - } else { - if (this.config.debug) - log("webcam", "cannot get dom element", webcamConfig.element); - return; - } - } else if (webcamConfig.element instanceof HTMLVideoElement) { - this.element = webcamConfig.element; - } else { - if (this.config.debug) - log("webcam", "unknown dom element", webcamConfig.element); - return; - } - } else { - this.element = document.createElement("video"); - } - const requestedConstraints = { - audio: false, - video: { - facingMode: this.config.mode === "front" ? "user" : "environment", - resizeMode: this.config.crop ? "crop-and-scale" : "none", - width: { ideal: this.config.width > 0 ? this.config.width : window.innerWidth }, - height: { ideal: this.config.height > 0 ? this.config.height : window.innerHeight } - } - }; - this.element.addEventListener("play", () => { - if (this.config.debug) - log("webcam", "play"); - }); - this.element.addEventListener("pause", () => { - if (this.config.debug) - log("webcam", "pause"); - }); - this.element.addEventListener("click", async () => { - if (!this.element || !this.stream) - return; - if (this.element.paused) - await this.element.play(); - else - this.element.pause(); - }); - if (!(navigator == null ? void 0 : navigator.mediaDevices)) { - if (this.config.debug) - log("webcam", "no devices"); - return; - } - try { - this.stream = await navigator.mediaDevices.getUserMedia(requestedConstraints); - } catch (err) { - log("webcam", err); - return; - } - if (!this.stream) { - if (this.config.debug) - log("webcam", "no stream"); - return; - } - this.element.srcObject = this.stream; - const ready3 = new Promise((resolve) => { - if (!this.element) - resolve(false); - else - this.element.onloadeddata = () => resolve(true); - }); - await ready3; - await this.element.play(); - if (this.config.debug) { - log("webcam", { - width: this.width, - height: this.height, - label: this.label, - stream: this.stream, - track: this.track, - settings: this.settings, - constraints: this.constraints, - capabilities: this.capabilities - }); - } - }); - __publicField(this, "pause", () => { - if (this.element) - this.element.pause(); - }); - __publicField(this, "play", async () => { - if (this.element) - await this.element.play(); - }); - __publicField(this, "stop", () => { - if (this.config.debug) - log("webcam", "stop"); - if (this.track) - this.track.stop(); - }); - this.config = { - element: void 0, - debug: true, - mode: "front", - crop: false, - width: 0, - height: 0 - }; - } - get track() { - if (!this.stream) - return void 0; - return this.stream.getVideoTracks()[0]; - } - get capabilities() { - if (!this.track) - return void 0; - return this.track.getCapabilities ? this.track.getCapabilities() : void 0; - } - get constraints() { - if (!this.track) - return void 0; - return this.track.getConstraints ? this.track.getConstraints() : void 0; - } - get settings() { - if (!this.stream) - return void 0; - const track = this.stream.getVideoTracks()[0]; - return track.getSettings ? track.getSettings() : void 0; - } - get label() { - if (!this.track) - return ""; - return this.track.label; - } - get paused() { - var _a; - return ((_a = this.element) == null ? void 0 : _a.paused) || false; - } - get width() { - var _a; - return ((_a = this.element) == null ? void 0 : _a.videoWidth) || 0; - } - get height() { - var _a; - return ((_a = this.element) == null ? void 0 : _a.videoHeight) || 0; - } -}; - -// src/tfjs/load.ts -var tf4 = __toESM(require_tfjs_esm()); - -// models/models.json -var models_exports = {}; -__export(models_exports, { - age: () => age, - "anti-spoofing": () => anti_spoofing, - antispoof: () => antispoof, - blazeface: () => blazeface, - "blazeface-back": () => blazeface_back, - "blazeface-front": () => blazeface_front, - "blazepose-detect": () => blazepose_detect, - "blazepose-detector2d": () => blazepose_detector2d, - "blazepose-detector3d": () => blazepose_detector3d, - "blazepose-full": () => blazepose_full, - "blazepose-heavy": () => blazepose_heavy, - "blazepose-lite": () => blazepose_lite, - default: () => models_default, - efficientpose: () => efficientpose, - "efficientpose-i-lite": () => efficientpose_i_lite, - "efficientpose-ii-lite": () => efficientpose_ii_lite, - "efficientpose-iv": () => efficientpose_iv, - emotion: () => emotion, - faceboxes: () => faceboxes, - facemesh: () => facemesh, - "facemesh-attention": () => facemesh_attention, - "facemesh-attention-alt": () => facemesh_attention_alt, - "facemesh-detection-full": () => facemesh_detection_full, - "facemesh-detection-short": () => facemesh_detection_short, - "facemesh-orig": () => facemesh_orig, - faceres: () => faceres, - "faceres-deep": () => faceres_deep, - gear: () => gear, - gender: () => gender, - "gender-ssrnet-imdb": () => gender_ssrnet_imdb, - handdetect: () => handdetect, - "handlandmark-full": () => handlandmark_full, - "handlandmark-lite": () => handlandmark_lite, - "handlandmark-sparse": () => handlandmark_sparse, - handskeleton: () => handskeleton, - handtrack: () => handtrack, - "insightface-efficientnet-b0": () => insightface_efficientnet_b0, - "insightface-ghostnet-strides1": () => insightface_ghostnet_strides1, - "insightface-ghostnet-strides2": () => insightface_ghostnet_strides2, - "insightface-mobilenet-emore": () => insightface_mobilenet_emore, - "insightface-mobilenet-swish": () => insightface_mobilenet_swish, - iris: () => iris, - liveness: () => liveness, - "mb3-centernet": () => mb3_centernet, - meet: () => meet, - mobileface: () => mobileface, - mobilefacenet: () => mobilefacenet, - models: () => models, - "movenet-lightning": () => movenet_lightning, - "movenet-multipose": () => movenet_multipose, - "movenet-thunder": () => movenet_thunder, - nanodet: () => nanodet, - "nanodet-e": () => nanodet_e, - "nanodet-g": () => nanodet_g, - "nanodet-m": () => nanodet_m, - "nanodet-t": () => nanodet_t, - posenet: () => posenet, - selfie: () => selfie -}); -var antispoof = 853098; -var blazeface = 538928; -var emotion = 820516; -var facemesh = 1477958; -var faceres = 6978814; -var handlandmark_full = 5431368; -var handtrack = 2964837; -var iris = 2599092; -var liveness = 592976; -var mb3_centernet = 4030290; -var models = 0; -var movenet_lightning = 4650216; -var selfie = 212886; -var age = 161240; -var blazeface_back = 538928; -var blazeface_front = 402048; -var blazepose_detector2d = 7499400; -var blazepose_detector3d = 5928856; -var blazepose_full = 6338290; -var blazepose_heavy = 27501554; -var blazepose_lite = 2725490; -var efficientpose = 5651240; -var faceboxes = 2013002; -var facemesh_attention_alt = 2387598; -var facemesh_attention = 2382414; -var facemesh_detection_full = 1026192; -var facemesh_detection_short = 201268; -var facemesh_orig = 2955780; -var faceres_deep = 13957620; -var gear = 1498916; -var gender_ssrnet_imdb = 161236; -var gender = 201808; -var handdetect = 3515612; -var handlandmark_lite = 2023432; -var handlandmark_sparse = 5286322; -var handskeleton = 5502280; -var meet = 372228; -var mobileface = 2183192; -var mobilefacenet = 5171976; -var movenet_multipose = 9448838; -var movenet_thunder = 12477112; -var nanodet = 7574558; -var posenet = 5032780; -var blazepose_detect = 5928804; -var anti_spoofing = 853098; -var efficientpose_i_lite = 2269064; -var efficientpose_ii_lite = 5651240; -var efficientpose_iv = 25643252; -var insightface_efficientnet_b0 = 13013224; -var insightface_ghostnet_strides1 = 8093408; -var insightface_ghostnet_strides2 = 8049584; -var insightface_mobilenet_emore = 6938536; -var insightface_mobilenet_swish = 12168584; -var nanodet_e = 12319156; -var nanodet_g = 7574558; -var nanodet_m = 1887474; -var nanodet_t = 5294216; -var models_default = { - antispoof, - blazeface, - emotion, - facemesh, - faceres, - "handlandmark-full": handlandmark_full, - handtrack, - iris, - liveness, - "mb3-centernet": mb3_centernet, - models, - "movenet-lightning": movenet_lightning, - selfie, - age, - "blazeface-back": blazeface_back, - "blazeface-front": blazeface_front, - "blazepose-detector2d": blazepose_detector2d, - "blazepose-detector3d": blazepose_detector3d, - "blazepose-full": blazepose_full, - "blazepose-heavy": blazepose_heavy, - "blazepose-lite": blazepose_lite, - efficientpose, - faceboxes, - "facemesh-attention-alt": facemesh_attention_alt, - "facemesh-attention": facemesh_attention, - "facemesh-detection-full": facemesh_detection_full, - "facemesh-detection-short": facemesh_detection_short, - "facemesh-orig": facemesh_orig, - "faceres-deep": faceres_deep, - gear, - "gender-ssrnet-imdb": gender_ssrnet_imdb, - gender, - handdetect, - "handlandmark-lite": handlandmark_lite, - "handlandmark-sparse": handlandmark_sparse, - handskeleton, - meet, - mobileface, - mobilefacenet, - "movenet-multipose": movenet_multipose, - "movenet-thunder": movenet_thunder, - nanodet, - posenet, - "blazepose-detect": blazepose_detect, - "anti-spoofing": anti_spoofing, - "efficientpose-i-lite": efficientpose_i_lite, - "efficientpose-ii-lite": efficientpose_ii_lite, - "efficientpose-iv": efficientpose_iv, - "insightface-efficientnet-b0": insightface_efficientnet_b0, - "insightface-ghostnet-strides1": insightface_ghostnet_strides1, - "insightface-ghostnet-strides2": insightface_ghostnet_strides2, - "insightface-mobilenet-emore": insightface_mobilenet_emore, - "insightface-mobilenet-swish": insightface_mobilenet_swish, - "nanodet-e": nanodet_e, - "nanodet-g": nanodet_g, - "nanodet-m": nanodet_m, - "nanodet-t": nanodet_t -}; - -// src/tfjs/load.ts -var options = { - cacheModels: true, - cacheSupported: true, - verbose: true, - debug: false, - modelBasePath: "" -}; -var modelStats = {}; -async function httpHandler(url, init3) { - if (options.debug) - log("load model fetch:", url, init3); - return fetch(url, init3); -} -function setModelLoadOptions(config3) { - options.cacheModels = config3.cacheModels; - options.verbose = config3.debug; - options.modelBasePath = config3.modelBasePath; -} -async function loadModel(modelPath) { - var _a, _b, _c, _d; - let modelUrl = join(options.modelBasePath, modelPath || ""); - if (!modelUrl.toLowerCase().endsWith(".json")) - modelUrl += ".json"; - const modelPathSegments = modelUrl.includes("/") ? modelUrl.split("/") : modelUrl.split("\\"); - const shortModelName = modelPathSegments[modelPathSegments.length - 1].replace(".json", ""); - const cachedModelName = "indexeddb://" + shortModelName; - modelStats[shortModelName] = { - name: shortModelName, - sizeFromManifest: 0, - sizeLoadedWeights: 0, - sizeDesired: models_exports[shortModelName], - inCache: false - }; - options.cacheSupported = typeof indexedDB !== "undefined"; - let cachedModels = {}; - try { - cachedModels = options.cacheSupported && options.cacheModels ? await tf4.io.listModels() : {}; - } catch (e) { - options.cacheSupported = false; - } - modelStats[shortModelName].inCache = options.cacheSupported && options.cacheModels && Object.keys(cachedModels).includes(cachedModelName); - const tfLoadOptions = typeof fetch === "undefined" ? {} : { fetchFunc: (url, init3) => httpHandler(url, init3) }; - let model21 = new tf4.GraphModel(modelStats[shortModelName].inCache ? cachedModelName : modelUrl, tfLoadOptions); - let loaded = false; - try { - model21.findIOHandler(); - if (options.debug) - log("model load handler:", model21["handler"]); - } catch (err) { - log("error finding model i/o handler:", modelUrl, err); - } - try { - const artifacts = await ((_a = model21.handler) == null ? void 0 : _a.load()) || null; - modelStats[shortModelName].sizeFromManifest = ((_b = artifacts == null ? void 0 : artifacts.weightData) == null ? void 0 : _b.byteLength) || 0; - if (artifacts) - model21.loadSync(artifacts); - else - model21 = await tf4.loadGraphModel(modelStats[shortModelName].inCache ? cachedModelName : modelUrl, tfLoadOptions); - modelStats[shortModelName].sizeLoadedWeights = ((_d = (_c = model21.artifacts) == null ? void 0 : _c.weightData) == null ? void 0 : _d.byteLength) || 0; - if (options.verbose) - log("load:", { model: shortModelName, url: model21["modelUrl"], bytes: modelStats[shortModelName].sizeLoadedWeights }); - loaded = true; - } catch (err) { - log("error loading model:", modelUrl, err); - } - if (loaded && options.cacheModels && options.cacheSupported && !modelStats[shortModelName].inCache) { - try { - const saveResult = await model21.save(cachedModelName); - if (options.debug) - log("model saved:", cachedModelName, saveResult); - } catch (err) { - log("error saving model:", modelUrl, err); - } - } - return model21; -} - -// src/human.ts -var tf39 = __toESM(require_tfjs_esm()); - -// package.json -var version2 = "2.11.0"; - -// src/tfjs/humangl.ts -var tf34 = __toESM(require_tfjs_esm()); - -// src/models.ts -var models_exports2 = {}; -__export(models_exports2, { - Models: () => Models, - getModelStats: () => getModelStats, - load: () => load22, - reset: () => reset2, - validate: () => validate2, - validateModel: () => validateModel -}); - -// src/face/antispoof.ts -var tf5 = __toESM(require_tfjs_esm()); -var model; -var cached = []; -var skipped = Number.MAX_SAFE_INTEGER; -var lastCount = 0; -var lastTime = 0; -async function load(config3) { - var _a; - if (env.initial) - model = null; - if (!model) - model = await loadModel((_a = config3.face.antispoof) == null ? void 0 : _a.modelPath); - else if (config3.debug) - log("cached model:", model["modelUrl"]); - return model; -} -async function predict(image27, config3, idx, count2) { - var _a, _b; - if (!model || !(model == null ? void 0 : model["executor"])) - return 0; - const skipTime = (((_a = config3.face.antispoof) == null ? void 0 : _a.skipTime) || 0) > now() - lastTime; - const skipFrame = skipped < (((_b = config3.face.antispoof) == null ? void 0 : _b.skipFrames) || 0); - if (config3.skipAllowed && skipTime && skipFrame && lastCount === count2 && cached[idx]) { - skipped++; - return cached[idx]; - } - skipped = 0; - return new Promise(async (resolve) => { - const resize = tf5.image.resizeBilinear(image27, [(model == null ? void 0 : model.inputs[0].shape) ? model.inputs[0].shape[2] : 0, (model == null ? void 0 : model.inputs[0].shape) ? model.inputs[0].shape[1] : 0], false); - const res = model == null ? void 0 : model.execute(resize); - const num = (await res.data())[0]; - cached[idx] = Math.round(100 * num) / 100; - lastCount = count2; - lastTime = now(); - tf5.dispose([resize, res]); - resolve(cached[idx]); - }); -} - -// src/face/blazeface.ts -var tf8 = __toESM(require_tfjs_esm()); - -// src/face/facemeshutil.ts -var tf7 = __toESM(require_tfjs_esm()); - -// src/face/facemeshcoords.ts -var meshAnnotations = { - silhouette: [ - 10, - 338, - 297, - 332, - 284, - 251, - 389, - 356, - 454, - 323, - 361, - 288, - 397, - 365, - 379, - 378, - 400, - 377, - 152, - 148, - 176, - 149, - 150, - 136, - 172, - 58, - 132, - 93, - 234, - 127, - 162, - 21, - 54, - 103, - 67, - 109 - ], - lipsUpperOuter: [185, 40, 39, 37, 0, 267, 269, 270, 409], - lipsLowerOuter: [61, 146, 91, 181, 84, 17, 314, 405, 321, 375, 291], - lipsUpperInner: [191, 80, 81, 82, 13, 312, 311, 310, 415], - lipsLowerInner: [78, 95, 88, 178, 87, 14, 317, 402, 318, 324, 308], - lipsLowerSemiOuter: [76, 77, 90, 180, 85, 16, 315, 404, 320, 307, 306], - lipsUpperSemiOuter: [184, 74, 73, 72, 11, 302, 303, 304, 408], - lipsLowerSemiInner: [62, 96, 89, 179, 86, 15, 316, 403, 319, 325, 292], - lipsUpperSemiInner: [183, 42, 41, 38, 12, 268, 271, 272, 407], - rightEyeUpper0: [246, 161, 160, 159, 158, 157, 173], - rightEyeLower0: [33, 7, 163, 144, 145, 153, 154, 155, 133], - rightEyeUpper1: [247, 30, 29, 27, 28, 56, 190], - rightEyeLower1: [130, 25, 110, 24, 23, 22, 26, 112, 243], - rightEyeUpper2: [113, 225, 224, 223, 222, 221, 189], - rightEyeLower2: [226, 31, 228, 229, 230, 231, 232, 233, 244], - rightEyeLower3: [143, 111, 117, 118, 119, 120, 121, 128, 245], - rightEyebrowUpper: [156, 70, 63, 105, 66, 107, 55, 193], - rightEyebrowLower: [35, 124, 46, 53, 52, 65], - rightEyeIris: [473, 474, 475, 476, 477], - leftEyeUpper0: [466, 388, 387, 386, 385, 384, 398], - leftEyeLower0: [263, 249, 390, 373, 374, 380, 381, 382, 362], - leftEyeUpper1: [467, 260, 259, 257, 258, 286, 414], - leftEyeLower1: [359, 255, 339, 254, 253, 252, 256, 341, 463], - leftEyeUpper2: [342, 445, 444, 443, 442, 441, 413], - leftEyeLower2: [446, 261, 448, 449, 450, 451, 452, 453, 464], - leftEyeLower3: [372, 340, 346, 347, 348, 349, 350, 357, 465], - leftEyebrowUpper: [383, 300, 293, 334, 296, 336, 285, 417], - leftEyebrowLower: [265, 353, 276, 283, 282, 295], - leftEyeIris: [468, 469, 470, 471, 472], - midwayBetweenEyes: [168], - noseTip: [1], - noseBottom: [2], - noseRightCorner: [98], - noseLeftCorner: [327], - rightCheek: [205], - leftCheek: [425] -}; -var meshLandmarks = { - count: 468, - mouth: 13, - symmetryLine: [13, meshAnnotations.midwayBetweenEyes[0]] -}; -var blazeFaceLandmarks = { - leftEye: 0, - rightEye: 1, - nose: 2, - mouth: 3, - leftEar: 4, - rightEar: 5, - symmetryLine: [3, 2] -}; -var irisIndices = [ - { key: "EyeUpper0", indices: [9, 10, 11, 12, 13, 14, 15] }, - { key: "EyeUpper1", indices: [25, 26, 27, 28, 29, 30, 31] }, - { key: "EyeUpper2", indices: [41, 42, 43, 44, 45, 46, 47] }, - { key: "EyeLower0", indices: [0, 1, 2, 3, 4, 5, 6, 7, 8] }, - { key: "EyeLower1", indices: [16, 17, 18, 19, 20, 21, 22, 23, 24] }, - { key: "EyeLower2", indices: [32, 33, 34, 35, 36, 37, 38, 39, 40] }, - { key: "EyeLower3", indices: [54, 55, 56, 57, 58, 59, 60, 61, 62] }, - { key: "EyebrowUpper", indices: [63, 64, 65, 66, 67, 68, 69, 70] }, - { key: "EyebrowLower", indices: [48, 49, 50, 51, 52, 53] } -]; -var UV468 = [ - [0.499976992607117, 0.652534008026123], - [0.500025987625122, 0.547487020492554], - [0.499974012374878, 0.602371990680695], - [0.482113003730774, 0.471979022026062], - [0.500150978565216, 0.527155995368958], - [0.499909996986389, 0.498252987861633], - [0.499523013830185, 0.40106201171875], - [0.289712011814117, 0.380764007568359], - [0.499954998493195, 0.312398016452789], - [0.499987006187439, 0.269918978214264], - [0.500023007392883, 0.107050001621246], - [0.500023007392883, 0.666234016418457], - [0.5000159740448, 0.679224014282227], - [0.500023007392883, 0.692348003387451], - [0.499976992607117, 0.695277988910675], - [0.499976992607117, 0.70593398809433], - [0.499976992607117, 0.719385027885437], - [0.499976992607117, 0.737019002437592], - [0.499967992305756, 0.781370997428894], - [0.499816000461578, 0.562981009483337], - [0.473773002624512, 0.573909997940063], - [0.104906998574734, 0.254140973091125], - [0.365929991006851, 0.409575998783112], - [0.338757991790771, 0.41302502155304], - [0.311120003461838, 0.409460008144379], - [0.274657994508743, 0.389131009578705], - [0.393361985683441, 0.403706014156342], - [0.345234006643295, 0.344011008739471], - [0.370094001293182, 0.346076011657715], - [0.319321990013123, 0.347265005111694], - [0.297903001308441, 0.353591024875641], - [0.24779200553894, 0.410809993743896], - [0.396889001131058, 0.842755019664764], - [0.280097991228104, 0.375599980354309], - [0.106310002505779, 0.399955987930298], - [0.2099249958992, 0.391353011131287], - [0.355807989835739, 0.534406006336212], - [0.471751004457474, 0.65040397644043], - [0.474155008792877, 0.680191993713379], - [0.439785003662109, 0.657229006290436], - [0.414617002010345, 0.66654098033905], - [0.450374007225037, 0.680860996246338], - [0.428770989179611, 0.682690978050232], - [0.374971002340317, 0.727805018424988], - [0.486716985702515, 0.547628998756409], - [0.485300987958908, 0.527395009994507], - [0.257764995098114, 0.314490020275116], - [0.401223003864288, 0.455172002315521], - [0.429818987846375, 0.548614978790283], - [0.421351999044418, 0.533740997314453], - [0.276895999908447, 0.532056987285614], - [0.483370006084442, 0.499586999416351], - [0.33721199631691, 0.282882988452911], - [0.296391993761063, 0.293242990970612], - [0.169294998049736, 0.193813979625702], - [0.447580009698868, 0.302609980106354], - [0.392390012741089, 0.353887975215912], - [0.354490011930466, 0.696784019470215], - [0.067304998636246, 0.730105042457581], - [0.442739009857178, 0.572826027870178], - [0.457098007202148, 0.584792017936707], - [0.381974011659622, 0.694710969924927], - [0.392388999462128, 0.694203019142151], - [0.277076005935669, 0.271932005882263], - [0.422551989555359, 0.563233017921448], - [0.385919004678726, 0.281364023685455], - [0.383103013038635, 0.255840003490448], - [0.331431001424789, 0.119714021682739], - [0.229923993349075, 0.232002973556519], - [0.364500999450684, 0.189113974571228], - [0.229622006416321, 0.299540996551514], - [0.173287004232407, 0.278747975826263], - [0.472878992557526, 0.666198015213013], - [0.446828007698059, 0.668527007102966], - [0.422762006521225, 0.673889994621277], - [0.445307999849319, 0.580065965652466], - [0.388103008270264, 0.693961024284363], - [0.403039008378983, 0.706539988517761], - [0.403629004955292, 0.693953037261963], - [0.460041999816895, 0.557139039039612], - [0.431158006191254, 0.692366003990173], - [0.452181994915009, 0.692366003990173], - [0.475387006998062, 0.692366003990173], - [0.465828001499176, 0.779190003871918], - [0.472328990697861, 0.736225962638855], - [0.473087012767792, 0.717857003211975], - [0.473122000694275, 0.704625964164734], - [0.473033010959625, 0.695277988910675], - [0.427942007780075, 0.695277988910675], - [0.426479011774063, 0.703539967536926], - [0.423162013292313, 0.711845993995667], - [0.4183090031147, 0.720062971115112], - [0.390094995498657, 0.639572978019714], - [0.013953999616206, 0.560034036636353], - [0.499913990497589, 0.58014702796936], - [0.413199990987778, 0.69539999961853], - [0.409626007080078, 0.701822996139526], - [0.468080013990402, 0.601534962654114], - [0.422728985548019, 0.585985004901886], - [0.463079988956451, 0.593783974647522], - [0.37211999297142, 0.47341400384903], - [0.334562003612518, 0.496073007583618], - [0.411671012639999, 0.546965003013611], - [0.242175996303558, 0.14767599105835], - [0.290776997804642, 0.201445996761322], - [0.327338010072708, 0.256527006626129], - [0.399509996175766, 0.748921036720276], - [0.441727995872498, 0.261676013469696], - [0.429764986038208, 0.187834024429321], - [0.412198007106781, 0.108901023864746], - [0.288955003023148, 0.398952007293701], - [0.218936994671822, 0.435410976409912], - [0.41278201341629, 0.398970007896423], - [0.257135003805161, 0.355440020561218], - [0.427684992551804, 0.437960982322693], - [0.448339998722076, 0.536936044692993], - [0.178560003638268, 0.45755398273468], - [0.247308000922203, 0.457193970680237], - [0.286267012357712, 0.467674970626831], - [0.332827985286713, 0.460712015628815], - [0.368755996227264, 0.447206974029541], - [0.398963987827301, 0.432654976844788], - [0.476410001516342, 0.405806005001068], - [0.189241006970406, 0.523923993110657], - [0.228962004184723, 0.348950982093811], - [0.490725994110107, 0.562400996685028], - [0.404670000076294, 0.485132992267609], - [0.019469000399113, 0.401564002037048], - [0.426243007183075, 0.420431017875671], - [0.396993011236191, 0.548797011375427], - [0.266469985246658, 0.376977026462555], - [0.439121007919312, 0.51895797252655], - [0.032313998788595, 0.644356966018677], - [0.419054001569748, 0.387154996395111], - [0.462783008813858, 0.505746960639954], - [0.238978996872902, 0.779744982719421], - [0.198220998048782, 0.831938028335571], - [0.107550002634525, 0.540755033493042], - [0.183610007166862, 0.740257024765015], - [0.134409993886948, 0.333683013916016], - [0.385764002799988, 0.883153975009918], - [0.490967005491257, 0.579378008842468], - [0.382384985685349, 0.508572995662689], - [0.174399003386497, 0.397670984268188], - [0.318785011768341, 0.39623498916626], - [0.343364000320435, 0.400596976280212], - [0.396100014448166, 0.710216999053955], - [0.187885001301765, 0.588537991046906], - [0.430987000465393, 0.944064974784851], - [0.318993002176285, 0.898285031318665], - [0.266247987747192, 0.869701027870178], - [0.500023007392883, 0.190576016902924], - [0.499976992607117, 0.954452991485596], - [0.366169989109039, 0.398822009563446], - [0.393207013607025, 0.39553701877594], - [0.410373002290726, 0.391080021858215], - [0.194993004202843, 0.342101991176605], - [0.388664990663528, 0.362284004688263], - [0.365961998701096, 0.355970978736877], - [0.343364000320435, 0.355356991291046], - [0.318785011768341, 0.35834002494812], - [0.301414996385574, 0.363156020641327], - [0.058132998645306, 0.319076001644135], - [0.301414996385574, 0.387449026107788], - [0.499987989664078, 0.618434011936188], - [0.415838003158569, 0.624195992946625], - [0.445681989192963, 0.566076993942261], - [0.465844005346298, 0.620640993118286], - [0.49992299079895, 0.351523995399475], - [0.288718998432159, 0.819945991039276], - [0.335278987884521, 0.852819979190826], - [0.440512001514435, 0.902418971061707], - [0.128294005990028, 0.791940987110138], - [0.408771991729736, 0.373893976211548], - [0.455606997013092, 0.451801002025604], - [0.499877005815506, 0.908990025520325], - [0.375436991453171, 0.924192011356354], - [0.11421000212431, 0.615022003650665], - [0.448662012815475, 0.695277988910675], - [0.4480200111866, 0.704632043838501], - [0.447111994028091, 0.715808033943176], - [0.444831997156143, 0.730794012546539], - [0.430011987686157, 0.766808986663818], - [0.406787008047104, 0.685672998428345], - [0.400738000869751, 0.681069016456604], - [0.392399996519089, 0.677703022956848], - [0.367855995893478, 0.663918972015381], - [0.247923001646996, 0.601333022117615], - [0.452769994735718, 0.420849978923798], - [0.43639200925827, 0.359887003898621], - [0.416164010763168, 0.368713974952698], - [0.413385987281799, 0.692366003990173], - [0.228018000721931, 0.683571994304657], - [0.468268007040024, 0.352671027183533], - [0.411361992359161, 0.804327011108398], - [0.499989002943039, 0.469825029373169], - [0.479153990745544, 0.442654013633728], - [0.499974012374878, 0.439637005329132], - [0.432112008333206, 0.493588984012604], - [0.499886006116867, 0.866917014122009], - [0.49991300702095, 0.821729004383087], - [0.456548988819122, 0.819200992584229], - [0.344549000263214, 0.745438992977142], - [0.37890899181366, 0.574010014533997], - [0.374292999505997, 0.780184984207153], - [0.319687992334366, 0.570737957954407], - [0.357154995203018, 0.604269981384277], - [0.295284003019333, 0.621580958366394], - [0.447750002145767, 0.862477004528046], - [0.410986006259918, 0.508723020553589], - [0.31395098567009, 0.775308012962341], - [0.354128003120422, 0.812552988529205], - [0.324548006057739, 0.703992962837219], - [0.189096003770828, 0.646299958229065], - [0.279776990413666, 0.71465802192688], - [0.1338230073452, 0.682700991630554], - [0.336768001317978, 0.644733011722565], - [0.429883986711502, 0.466521978378296], - [0.455527991056442, 0.548622965812683], - [0.437114000320435, 0.558896005153656], - [0.467287987470627, 0.529924988746643], - [0.414712011814117, 0.335219979286194], - [0.37704598903656, 0.322777986526489], - [0.344107985496521, 0.320150971412659], - [0.312875986099243, 0.32233202457428], - [0.283526003360748, 0.333190023899078], - [0.241245999932289, 0.382785975933075], - [0.102986000478268, 0.468762993812561], - [0.267612010240555, 0.424560010433197], - [0.297879010438919, 0.433175981044769], - [0.333433985710144, 0.433878004550934], - [0.366427004337311, 0.426115989685059], - [0.396012008190155, 0.416696012020111], - [0.420121014118195, 0.41022801399231], - [0.007561000064015, 0.480777025222778], - [0.432949006557465, 0.569517970085144], - [0.458638995885849, 0.479089021682739], - [0.473466008901596, 0.545744001865387], - [0.476087987422943, 0.563830018043518], - [0.468472003936768, 0.555056989192963], - [0.433990985155106, 0.582361996173859], - [0.483518004417419, 0.562983989715576], - [0.482482999563217, 0.57784903049469], - [0.42645001411438, 0.389798998832703], - [0.438998997211456, 0.39649498462677], - [0.450067013502121, 0.400434017181396], - [0.289712011814117, 0.368252992630005], - [0.276670008897781, 0.363372981548309], - [0.517862021923065, 0.471948027610779], - [0.710287988185883, 0.380764007568359], - [0.526226997375488, 0.573909997940063], - [0.895093023777008, 0.254140973091125], - [0.634069979190826, 0.409575998783112], - [0.661242008209229, 0.41302502155304], - [0.688880026340485, 0.409460008144379], - [0.725341975688934, 0.389131009578705], - [0.606630027294159, 0.40370500087738], - [0.654766023159027, 0.344011008739471], - [0.629905998706818, 0.346076011657715], - [0.680678009986877, 0.347265005111694], - [0.702096998691559, 0.353591024875641], - [0.75221198797226, 0.410804986953735], - [0.602918028831482, 0.842862963676453], - [0.719901978969574, 0.375599980354309], - [0.893692970275879, 0.399959981441498], - [0.790081977844238, 0.391354024410248], - [0.643998026847839, 0.534487962722778], - [0.528249025344849, 0.65040397644043], - [0.525849997997284, 0.680191040039062], - [0.560214996337891, 0.657229006290436], - [0.585384011268616, 0.66654098033905], - [0.549625992774963, 0.680860996246338], - [0.57122802734375, 0.682691991329193], - [0.624852001667023, 0.72809898853302], - [0.513050019741058, 0.547281980514526], - [0.51509702205658, 0.527251958847046], - [0.742246985435486, 0.314507007598877], - [0.598631024360657, 0.454979002475739], - [0.570338010787964, 0.548575043678284], - [0.578631997108459, 0.533622980117798], - [0.723087012767792, 0.532054007053375], - [0.516445994377136, 0.499638974666595], - [0.662801027297974, 0.282917976379395], - [0.70362401008606, 0.293271005153656], - [0.830704987049103, 0.193813979625702], - [0.552385985851288, 0.302568018436432], - [0.607609987258911, 0.353887975215912], - [0.645429015159607, 0.696707010269165], - [0.932694971561432, 0.730105042457581], - [0.557260990142822, 0.572826027870178], - [0.542901992797852, 0.584792017936707], - [0.6180260181427, 0.694710969924927], - [0.607590973377228, 0.694203019142151], - [0.722943007946014, 0.271963000297546], - [0.577413976192474, 0.563166975975037], - [0.614082992076874, 0.281386971473694], - [0.616907000541687, 0.255886018276215], - [0.668509006500244, 0.119913995265961], - [0.770092010498047, 0.232020974159241], - [0.635536015033722, 0.189248979091644], - [0.77039098739624, 0.299556016921997], - [0.826722025871277, 0.278755009174347], - [0.527121007442474, 0.666198015213013], - [0.553171992301941, 0.668527007102966], - [0.577238023281097, 0.673889994621277], - [0.554691970348358, 0.580065965652466], - [0.611896991729736, 0.693961024284363], - [0.59696102142334, 0.706539988517761], - [0.596370995044708, 0.693953037261963], - [0.539958000183105, 0.557139039039612], - [0.568841993808746, 0.692366003990173], - [0.547818005084991, 0.692366003990173], - [0.52461302280426, 0.692366003990173], - [0.534089982509613, 0.779141008853912], - [0.527670979499817, 0.736225962638855], - [0.526912987232208, 0.717857003211975], - [0.526877999305725, 0.704625964164734], - [0.526966989040375, 0.695277988910675], - [0.572058022022247, 0.695277988910675], - [0.573521018028259, 0.703539967536926], - [0.57683801651001, 0.711845993995667], - [0.581691026687622, 0.720062971115112], - [0.609944999217987, 0.639909982681274], - [0.986046016216278, 0.560034036636353], - [0.5867999792099, 0.69539999961853], - [0.590372025966644, 0.701822996139526], - [0.531915009021759, 0.601536989212036], - [0.577268004417419, 0.585934996604919], - [0.536915004253387, 0.593786001205444], - [0.627542972564697, 0.473352015018463], - [0.665585994720459, 0.495950996875763], - [0.588353991508484, 0.546862006187439], - [0.757824003696442, 0.14767599105835], - [0.709249973297119, 0.201507985591888], - [0.672684013843536, 0.256581008434296], - [0.600408971309662, 0.74900496006012], - [0.55826598405838, 0.261672019958496], - [0.570303976535797, 0.187870979309082], - [0.588165998458862, 0.109044015407562], - [0.711045026779175, 0.398952007293701], - [0.781069993972778, 0.435405015945435], - [0.587247014045715, 0.398931980133057], - [0.742869973182678, 0.355445981025696], - [0.572156012058258, 0.437651991844177], - [0.55186802148819, 0.536570012569427], - [0.821442008018494, 0.457556009292603], - [0.752701997756958, 0.457181990146637], - [0.71375697851181, 0.467626988887787], - [0.66711300611496, 0.460672974586487], - [0.631101012229919, 0.447153985500336], - [0.6008620262146, 0.432473003864288], - [0.523481011390686, 0.405627012252808], - [0.810747981071472, 0.523926019668579], - [0.771045982837677, 0.348959028720856], - [0.509127020835876, 0.562718033790588], - [0.595292985439301, 0.485023975372314], - [0.980530977249146, 0.401564002037048], - [0.573499977588654, 0.420000016689301], - [0.602994978427887, 0.548687994480133], - [0.733529984951019, 0.376977026462555], - [0.560611009597778, 0.519016981124878], - [0.967685997486115, 0.644356966018677], - [0.580985009670258, 0.387160003185272], - [0.537728011608124, 0.505385041236877], - [0.760966002941132, 0.779752969741821], - [0.801778972148895, 0.831938028335571], - [0.892440974712372, 0.54076099395752], - [0.816350996494293, 0.740260004997253], - [0.865594983100891, 0.333687007427216], - [0.614073991775513, 0.883246004581451], - [0.508952975273132, 0.579437971115112], - [0.617941975593567, 0.508316040039062], - [0.825608015060425, 0.397674977779388], - [0.681214988231659, 0.39623498916626], - [0.656635999679565, 0.400596976280212], - [0.603900015354156, 0.710216999053955], - [0.81208598613739, 0.588539004325867], - [0.56801301240921, 0.944564998149872], - [0.681007981300354, 0.898285031318665], - [0.733752012252808, 0.869701027870178], - [0.633830010890961, 0.398822009563446], - [0.606792986392975, 0.39553701877594], - [0.589659988880157, 0.391062021255493], - [0.805015981197357, 0.342108011245728], - [0.611334979534149, 0.362284004688263], - [0.634037971496582, 0.355970978736877], - [0.656635999679565, 0.355356991291046], - [0.681214988231659, 0.35834002494812], - [0.698584973812103, 0.363156020641327], - [0.941866993904114, 0.319076001644135], - [0.698584973812103, 0.387449026107788], - [0.584177017211914, 0.624107003211975], - [0.554318010807037, 0.566076993942261], - [0.534153997898102, 0.62064003944397], - [0.711217999458313, 0.819975018501282], - [0.664629995822906, 0.852871000766754], - [0.559099972248077, 0.902631998062134], - [0.871706008911133, 0.791940987110138], - [0.591234028339386, 0.373893976211548], - [0.544341027736664, 0.451583981513977], - [0.624562978744507, 0.924192011356354], - [0.88577002286911, 0.615028977394104], - [0.551338016986847, 0.695277988910675], - [0.551980018615723, 0.704632043838501], - [0.552887976169586, 0.715808033943176], - [0.555167973041534, 0.730794012546539], - [0.569944024085999, 0.767035007476807], - [0.593203008174896, 0.685675978660583], - [0.599261999130249, 0.681069016456604], - [0.607599973678589, 0.677703022956848], - [0.631937980651855, 0.663500010967255], - [0.752032995223999, 0.601315021514893], - [0.547226011753082, 0.420395016670227], - [0.563543975353241, 0.359827995300293], - [0.583841025829315, 0.368713974952698], - [0.586614012718201, 0.692366003990173], - [0.771915018558502, 0.683578014373779], - [0.531597018241882, 0.352482974529266], - [0.588370978832245, 0.804440975189209], - [0.52079701423645, 0.442565023899078], - [0.567984998226166, 0.493479013442993], - [0.543282985687256, 0.819254994392395], - [0.655317008495331, 0.745514988899231], - [0.621008992195129, 0.574018001556396], - [0.625559985637665, 0.78031200170517], - [0.680198013782501, 0.570719003677368], - [0.64276397228241, 0.604337990283966], - [0.704662978649139, 0.621529996395111], - [0.552012026309967, 0.862591981887817], - [0.589071989059448, 0.508637011051178], - [0.685944974422455, 0.775357007980347], - [0.645735025405884, 0.812640011310577], - [0.675342977046967, 0.703978002071381], - [0.810858011245728, 0.646304965019226], - [0.72012197971344, 0.714666962623596], - [0.866151988506317, 0.682704985141754], - [0.663187026977539, 0.644596993923187], - [0.570082008838654, 0.466325998306274], - [0.544561982154846, 0.548375964164734], - [0.562758982181549, 0.558784961700439], - [0.531987011432648, 0.530140042304993], - [0.585271000862122, 0.335177004337311], - [0.622952997684479, 0.32277899980545], - [0.655896008014679, 0.320163011550903], - [0.687132000923157, 0.322345972061157], - [0.716481983661652, 0.333200991153717], - [0.758756995201111, 0.382786989212036], - [0.897013008594513, 0.468769013881683], - [0.732392013072968, 0.424547016620636], - [0.70211398601532, 0.433162987232208], - [0.66652500629425, 0.433866024017334], - [0.633504986763, 0.426087975502014], - [0.603875994682312, 0.416586995124817], - [0.579657971858978, 0.409945011138916], - [0.992439985275269, 0.480777025222778], - [0.567192018032074, 0.569419980049133], - [0.54136598110199, 0.478899002075195], - [0.526564002037048, 0.546118021011353], - [0.523913025856018, 0.563830018043518], - [0.531529009342194, 0.555056989192963], - [0.566035985946655, 0.582329034805298], - [0.51631098985672, 0.563053965568542], - [0.5174720287323, 0.577877044677734], - [0.573594987392426, 0.389806985855103], - [0.560697972774506, 0.395331978797913], - [0.549755990505219, 0.399751007556915], - [0.710287988185883, 0.368252992630005], - [0.723330020904541, 0.363372981548309] -]; -var TRI468 = [ - 127, - 34, - 139, - 11, - 0, - 37, - 232, - 231, - 120, - 72, - 37, - 39, - 128, - 121, - 47, - 232, - 121, - 128, - 104, - 69, - 67, - 175, - 171, - 148, - 157, - 154, - 155, - 118, - 50, - 101, - 73, - 39, - 40, - 9, - 151, - 108, - 48, - 115, - 131, - 194, - 204, - 211, - 74, - 40, - 185, - 80, - 42, - 183, - 40, - 92, - 186, - 230, - 229, - 118, - 202, - 212, - 214, - 83, - 18, - 17, - 76, - 61, - 146, - 160, - 29, - 30, - 56, - 157, - 173, - 106, - 204, - 194, - 135, - 214, - 192, - 203, - 165, - 98, - 21, - 71, - 68, - 51, - 45, - 4, - 144, - 24, - 23, - 77, - 146, - 91, - 205, - 50, - 187, - 201, - 200, - 18, - 91, - 106, - 182, - 90, - 91, - 181, - 85, - 84, - 17, - 206, - 203, - 36, - 148, - 171, - 140, - 92, - 40, - 39, - 193, - 189, - 244, - 159, - 158, - 28, - 247, - 246, - 161, - 236, - 3, - 196, - 54, - 68, - 104, - 193, - 168, - 8, - 117, - 228, - 31, - 189, - 193, - 55, - 98, - 97, - 99, - 126, - 47, - 100, - 166, - 79, - 218, - 155, - 154, - 26, - 209, - 49, - 131, - 135, - 136, - 150, - 47, - 126, - 217, - 223, - 52, - 53, - 45, - 51, - 134, - 211, - 170, - 140, - 67, - 69, - 108, - 43, - 106, - 91, - 230, - 119, - 120, - 226, - 130, - 247, - 63, - 53, - 52, - 238, - 20, - 242, - 46, - 70, - 156, - 78, - 62, - 96, - 46, - 53, - 63, - 143, - 34, - 227, - 173, - 155, - 133, - 123, - 117, - 111, - 44, - 125, - 19, - 236, - 134, - 51, - 216, - 206, - 205, - 154, - 153, - 22, - 39, - 37, - 167, - 200, - 201, - 208, - 36, - 142, - 100, - 57, - 212, - 202, - 20, - 60, - 99, - 28, - 158, - 157, - 35, - 226, - 113, - 160, - 159, - 27, - 204, - 202, - 210, - 113, - 225, - 46, - 43, - 202, - 204, - 62, - 76, - 77, - 137, - 123, - 116, - 41, - 38, - 72, - 203, - 129, - 142, - 64, - 98, - 240, - 49, - 102, - 64, - 41, - 73, - 74, - 212, - 216, - 207, - 42, - 74, - 184, - 169, - 170, - 211, - 170, - 149, - 176, - 105, - 66, - 69, - 122, - 6, - 168, - 123, - 147, - 187, - 96, - 77, - 90, - 65, - 55, - 107, - 89, - 90, - 180, - 101, - 100, - 120, - 63, - 105, - 104, - 93, - 137, - 227, - 15, - 86, - 85, - 129, - 102, - 49, - 14, - 87, - 86, - 55, - 8, - 9, - 100, - 47, - 121, - 145, - 23, - 22, - 88, - 89, - 179, - 6, - 122, - 196, - 88, - 95, - 96, - 138, - 172, - 136, - 215, - 58, - 172, - 115, - 48, - 219, - 42, - 80, - 81, - 195, - 3, - 51, - 43, - 146, - 61, - 171, - 175, - 199, - 81, - 82, - 38, - 53, - 46, - 225, - 144, - 163, - 110, - 246, - 33, - 7, - 52, - 65, - 66, - 229, - 228, - 117, - 34, - 127, - 234, - 107, - 108, - 69, - 109, - 108, - 151, - 48, - 64, - 235, - 62, - 78, - 191, - 129, - 209, - 126, - 111, - 35, - 143, - 163, - 161, - 246, - 117, - 123, - 50, - 222, - 65, - 52, - 19, - 125, - 141, - 221, - 55, - 65, - 3, - 195, - 197, - 25, - 7, - 33, - 220, - 237, - 44, - 70, - 71, - 139, - 122, - 193, - 245, - 247, - 130, - 33, - 71, - 21, - 162, - 153, - 158, - 159, - 170, - 169, - 150, - 188, - 174, - 196, - 216, - 186, - 92, - 144, - 160, - 161, - 2, - 97, - 167, - 141, - 125, - 241, - 164, - 167, - 37, - 72, - 38, - 12, - 145, - 159, - 160, - 38, - 82, - 13, - 63, - 68, - 71, - 226, - 35, - 111, - 158, - 153, - 154, - 101, - 50, - 205, - 206, - 92, - 165, - 209, - 198, - 217, - 165, - 167, - 97, - 220, - 115, - 218, - 133, - 112, - 243, - 239, - 238, - 241, - 214, - 135, - 169, - 190, - 173, - 133, - 171, - 208, - 32, - 125, - 44, - 237, - 86, - 87, - 178, - 85, - 86, - 179, - 84, - 85, - 180, - 83, - 84, - 181, - 201, - 83, - 182, - 137, - 93, - 132, - 76, - 62, - 183, - 61, - 76, - 184, - 57, - 61, - 185, - 212, - 57, - 186, - 214, - 207, - 187, - 34, - 143, - 156, - 79, - 239, - 237, - 123, - 137, - 177, - 44, - 1, - 4, - 201, - 194, - 32, - 64, - 102, - 129, - 213, - 215, - 138, - 59, - 166, - 219, - 242, - 99, - 97, - 2, - 94, - 141, - 75, - 59, - 235, - 24, - 110, - 228, - 25, - 130, - 226, - 23, - 24, - 229, - 22, - 23, - 230, - 26, - 22, - 231, - 112, - 26, - 232, - 189, - 190, - 243, - 221, - 56, - 190, - 28, - 56, - 221, - 27, - 28, - 222, - 29, - 27, - 223, - 30, - 29, - 224, - 247, - 30, - 225, - 238, - 79, - 20, - 166, - 59, - 75, - 60, - 75, - 240, - 147, - 177, - 215, - 20, - 79, - 166, - 187, - 147, - 213, - 112, - 233, - 244, - 233, - 128, - 245, - 128, - 114, - 188, - 114, - 217, - 174, - 131, - 115, - 220, - 217, - 198, - 236, - 198, - 131, - 134, - 177, - 132, - 58, - 143, - 35, - 124, - 110, - 163, - 7, - 228, - 110, - 25, - 356, - 389, - 368, - 11, - 302, - 267, - 452, - 350, - 349, - 302, - 303, - 269, - 357, - 343, - 277, - 452, - 453, - 357, - 333, - 332, - 297, - 175, - 152, - 377, - 384, - 398, - 382, - 347, - 348, - 330, - 303, - 304, - 270, - 9, - 336, - 337, - 278, - 279, - 360, - 418, - 262, - 431, - 304, - 408, - 409, - 310, - 415, - 407, - 270, - 409, - 410, - 450, - 348, - 347, - 422, - 430, - 434, - 313, - 314, - 17, - 306, - 307, - 375, - 387, - 388, - 260, - 286, - 414, - 398, - 335, - 406, - 418, - 364, - 367, - 416, - 423, - 358, - 327, - 251, - 284, - 298, - 281, - 5, - 4, - 373, - 374, - 253, - 307, - 320, - 321, - 425, - 427, - 411, - 421, - 313, - 18, - 321, - 405, - 406, - 320, - 404, - 405, - 315, - 16, - 17, - 426, - 425, - 266, - 377, - 400, - 369, - 322, - 391, - 269, - 417, - 465, - 464, - 386, - 257, - 258, - 466, - 260, - 388, - 456, - 399, - 419, - 284, - 332, - 333, - 417, - 285, - 8, - 346, - 340, - 261, - 413, - 441, - 285, - 327, - 460, - 328, - 355, - 371, - 329, - 392, - 439, - 438, - 382, - 341, - 256, - 429, - 420, - 360, - 364, - 394, - 379, - 277, - 343, - 437, - 443, - 444, - 283, - 275, - 440, - 363, - 431, - 262, - 369, - 297, - 338, - 337, - 273, - 375, - 321, - 450, - 451, - 349, - 446, - 342, - 467, - 293, - 334, - 282, - 458, - 461, - 462, - 276, - 353, - 383, - 308, - 324, - 325, - 276, - 300, - 293, - 372, - 345, - 447, - 382, - 398, - 362, - 352, - 345, - 340, - 274, - 1, - 19, - 456, - 248, - 281, - 436, - 427, - 425, - 381, - 256, - 252, - 269, - 391, - 393, - 200, - 199, - 428, - 266, - 330, - 329, - 287, - 273, - 422, - 250, - 462, - 328, - 258, - 286, - 384, - 265, - 353, - 342, - 387, - 259, - 257, - 424, - 431, - 430, - 342, - 353, - 276, - 273, - 335, - 424, - 292, - 325, - 307, - 366, - 447, - 345, - 271, - 303, - 302, - 423, - 266, - 371, - 294, - 455, - 460, - 279, - 278, - 294, - 271, - 272, - 304, - 432, - 434, - 427, - 272, - 407, - 408, - 394, - 430, - 431, - 395, - 369, - 400, - 334, - 333, - 299, - 351, - 417, - 168, - 352, - 280, - 411, - 325, - 319, - 320, - 295, - 296, - 336, - 319, - 403, - 404, - 330, - 348, - 349, - 293, - 298, - 333, - 323, - 454, - 447, - 15, - 16, - 315, - 358, - 429, - 279, - 14, - 15, - 316, - 285, - 336, - 9, - 329, - 349, - 350, - 374, - 380, - 252, - 318, - 402, - 403, - 6, - 197, - 419, - 318, - 319, - 325, - 367, - 364, - 365, - 435, - 367, - 397, - 344, - 438, - 439, - 272, - 271, - 311, - 195, - 5, - 281, - 273, - 287, - 291, - 396, - 428, - 199, - 311, - 271, - 268, - 283, - 444, - 445, - 373, - 254, - 339, - 263, - 466, - 249, - 282, - 334, - 296, - 449, - 347, - 346, - 264, - 447, - 454, - 336, - 296, - 299, - 338, - 10, - 151, - 278, - 439, - 455, - 292, - 407, - 415, - 358, - 371, - 355, - 340, - 345, - 372, - 390, - 249, - 466, - 346, - 347, - 280, - 442, - 443, - 282, - 19, - 94, - 370, - 441, - 442, - 295, - 248, - 419, - 197, - 263, - 255, - 359, - 440, - 275, - 274, - 300, - 383, - 368, - 351, - 412, - 465, - 263, - 467, - 466, - 301, - 368, - 389, - 380, - 374, - 386, - 395, - 378, - 379, - 412, - 351, - 419, - 436, - 426, - 322, - 373, - 390, - 388, - 2, - 164, - 393, - 370, - 462, - 461, - 164, - 0, - 267, - 302, - 11, - 12, - 374, - 373, - 387, - 268, - 12, - 13, - 293, - 300, - 301, - 446, - 261, - 340, - 385, - 384, - 381, - 330, - 266, - 425, - 426, - 423, - 391, - 429, - 355, - 437, - 391, - 327, - 326, - 440, - 457, - 438, - 341, - 382, - 362, - 459, - 457, - 461, - 434, - 430, - 394, - 414, - 463, - 362, - 396, - 369, - 262, - 354, - 461, - 457, - 316, - 403, - 402, - 315, - 404, - 403, - 314, - 405, - 404, - 313, - 406, - 405, - 421, - 418, - 406, - 366, - 401, - 361, - 306, - 408, - 407, - 291, - 409, - 408, - 287, - 410, - 409, - 432, - 436, - 410, - 434, - 416, - 411, - 264, - 368, - 383, - 309, - 438, - 457, - 352, - 376, - 401, - 274, - 275, - 4, - 421, - 428, - 262, - 294, - 327, - 358, - 433, - 416, - 367, - 289, - 455, - 439, - 462, - 370, - 326, - 2, - 326, - 370, - 305, - 460, - 455, - 254, - 449, - 448, - 255, - 261, - 446, - 253, - 450, - 449, - 252, - 451, - 450, - 256, - 452, - 451, - 341, - 453, - 452, - 413, - 464, - 463, - 441, - 413, - 414, - 258, - 442, - 441, - 257, - 443, - 442, - 259, - 444, - 443, - 260, - 445, - 444, - 467, - 342, - 445, - 459, - 458, - 250, - 289, - 392, - 290, - 290, - 328, - 460, - 376, - 433, - 435, - 250, - 290, - 392, - 411, - 416, - 433, - 341, - 463, - 464, - 453, - 464, - 465, - 357, - 465, - 412, - 343, - 412, - 399, - 360, - 363, - 440, - 437, - 399, - 456, - 420, - 456, - 363, - 401, - 435, - 288, - 372, - 383, - 353, - 339, - 255, - 249, - 448, - 261, - 255, - 133, - 243, - 190, - 133, - 155, - 112, - 33, - 246, - 247, - 33, - 130, - 25, - 398, - 384, - 286, - 362, - 398, - 414, - 362, - 463, - 341, - 263, - 359, - 467, - 263, - 249, - 255, - 466, - 467, - 260, - 75, - 60, - 166, - 238, - 239, - 79, - 162, - 127, - 139, - 72, - 11, - 37, - 121, - 232, - 120, - 73, - 72, - 39, - 114, - 128, - 47, - 233, - 232, - 128, - 103, - 104, - 67, - 152, - 175, - 148, - 173, - 157, - 155, - 119, - 118, - 101, - 74, - 73, - 40, - 107, - 9, - 108, - 49, - 48, - 131, - 32, - 194, - 211, - 184, - 74, - 185, - 191, - 80, - 183, - 185, - 40, - 186, - 119, - 230, - 118, - 210, - 202, - 214, - 84, - 83, - 17, - 77, - 76, - 146, - 161, - 160, - 30, - 190, - 56, - 173, - 182, - 106, - 194, - 138, - 135, - 192, - 129, - 203, - 98, - 54, - 21, - 68, - 5, - 51, - 4, - 145, - 144, - 23, - 90, - 77, - 91, - 207, - 205, - 187, - 83, - 201, - 18, - 181, - 91, - 182, - 180, - 90, - 181, - 16, - 85, - 17, - 205, - 206, - 36, - 176, - 148, - 140, - 165, - 92, - 39, - 245, - 193, - 244, - 27, - 159, - 28, - 30, - 247, - 161, - 174, - 236, - 196, - 103, - 54, - 104, - 55, - 193, - 8, - 111, - 117, - 31, - 221, - 189, - 55, - 240, - 98, - 99, - 142, - 126, - 100, - 219, - 166, - 218, - 112, - 155, - 26, - 198, - 209, - 131, - 169, - 135, - 150, - 114, - 47, - 217, - 224, - 223, - 53, - 220, - 45, - 134, - 32, - 211, - 140, - 109, - 67, - 108, - 146, - 43, - 91, - 231, - 230, - 120, - 113, - 226, - 247, - 105, - 63, - 52, - 241, - 238, - 242, - 124, - 46, - 156, - 95, - 78, - 96, - 70, - 46, - 63, - 116, - 143, - 227, - 116, - 123, - 111, - 1, - 44, - 19, - 3, - 236, - 51, - 207, - 216, - 205, - 26, - 154, - 22, - 165, - 39, - 167, - 199, - 200, - 208, - 101, - 36, - 100, - 43, - 57, - 202, - 242, - 20, - 99, - 56, - 28, - 157, - 124, - 35, - 113, - 29, - 160, - 27, - 211, - 204, - 210, - 124, - 113, - 46, - 106, - 43, - 204, - 96, - 62, - 77, - 227, - 137, - 116, - 73, - 41, - 72, - 36, - 203, - 142, - 235, - 64, - 240, - 48, - 49, - 64, - 42, - 41, - 74, - 214, - 212, - 207, - 183, - 42, - 184, - 210, - 169, - 211, - 140, - 170, - 176, - 104, - 105, - 69, - 193, - 122, - 168, - 50, - 123, - 187, - 89, - 96, - 90, - 66, - 65, - 107, - 179, - 89, - 180, - 119, - 101, - 120, - 68, - 63, - 104, - 234, - 93, - 227, - 16, - 15, - 85, - 209, - 129, - 49, - 15, - 14, - 86, - 107, - 55, - 9, - 120, - 100, - 121, - 153, - 145, - 22, - 178, - 88, - 179, - 197, - 6, - 196, - 89, - 88, - 96, - 135, - 138, - 136, - 138, - 215, - 172, - 218, - 115, - 219, - 41, - 42, - 81, - 5, - 195, - 51, - 57, - 43, - 61, - 208, - 171, - 199, - 41, - 81, - 38, - 224, - 53, - 225, - 24, - 144, - 110, - 105, - 52, - 66, - 118, - 229, - 117, - 227, - 34, - 234, - 66, - 107, - 69, - 10, - 109, - 151, - 219, - 48, - 235, - 183, - 62, - 191, - 142, - 129, - 126, - 116, - 111, - 143, - 7, - 163, - 246, - 118, - 117, - 50, - 223, - 222, - 52, - 94, - 19, - 141, - 222, - 221, - 65, - 196, - 3, - 197, - 45, - 220, - 44, - 156, - 70, - 139, - 188, - 122, - 245, - 139, - 71, - 162, - 145, - 153, - 159, - 149, - 170, - 150, - 122, - 188, - 196, - 206, - 216, - 92, - 163, - 144, - 161, - 164, - 2, - 167, - 242, - 141, - 241, - 0, - 164, - 37, - 11, - 72, - 12, - 144, - 145, - 160, - 12, - 38, - 13, - 70, - 63, - 71, - 31, - 226, - 111, - 157, - 158, - 154, - 36, - 101, - 205, - 203, - 206, - 165, - 126, - 209, - 217, - 98, - 165, - 97, - 237, - 220, - 218, - 237, - 239, - 241, - 210, - 214, - 169, - 140, - 171, - 32, - 241, - 125, - 237, - 179, - 86, - 178, - 180, - 85, - 179, - 181, - 84, - 180, - 182, - 83, - 181, - 194, - 201, - 182, - 177, - 137, - 132, - 184, - 76, - 183, - 185, - 61, - 184, - 186, - 57, - 185, - 216, - 212, - 186, - 192, - 214, - 187, - 139, - 34, - 156, - 218, - 79, - 237, - 147, - 123, - 177, - 45, - 44, - 4, - 208, - 201, - 32, - 98, - 64, - 129, - 192, - 213, - 138, - 235, - 59, - 219, - 141, - 242, - 97, - 97, - 2, - 141, - 240, - 75, - 235, - 229, - 24, - 228, - 31, - 25, - 226, - 230, - 23, - 229, - 231, - 22, - 230, - 232, - 26, - 231, - 233, - 112, - 232, - 244, - 189, - 243, - 189, - 221, - 190, - 222, - 28, - 221, - 223, - 27, - 222, - 224, - 29, - 223, - 225, - 30, - 224, - 113, - 247, - 225, - 99, - 60, - 240, - 213, - 147, - 215, - 60, - 20, - 166, - 192, - 187, - 213, - 243, - 112, - 244, - 244, - 233, - 245, - 245, - 128, - 188, - 188, - 114, - 174, - 134, - 131, - 220, - 174, - 217, - 236, - 236, - 198, - 134, - 215, - 177, - 58, - 156, - 143, - 124, - 25, - 110, - 7, - 31, - 228, - 25, - 264, - 356, - 368, - 0, - 11, - 267, - 451, - 452, - 349, - 267, - 302, - 269, - 350, - 357, - 277, - 350, - 452, - 357, - 299, - 333, - 297, - 396, - 175, - 377, - 381, - 384, - 382, - 280, - 347, - 330, - 269, - 303, - 270, - 151, - 9, - 337, - 344, - 278, - 360, - 424, - 418, - 431, - 270, - 304, - 409, - 272, - 310, - 407, - 322, - 270, - 410, - 449, - 450, - 347, - 432, - 422, - 434, - 18, - 313, - 17, - 291, - 306, - 375, - 259, - 387, - 260, - 424, - 335, - 418, - 434, - 364, - 416, - 391, - 423, - 327, - 301, - 251, - 298, - 275, - 281, - 4, - 254, - 373, - 253, - 375, - 307, - 321, - 280, - 425, - 411, - 200, - 421, - 18, - 335, - 321, - 406, - 321, - 320, - 405, - 314, - 315, - 17, - 423, - 426, - 266, - 396, - 377, - 369, - 270, - 322, - 269, - 413, - 417, - 464, - 385, - 386, - 258, - 248, - 456, - 419, - 298, - 284, - 333, - 168, - 417, - 8, - 448, - 346, - 261, - 417, - 413, - 285, - 326, - 327, - 328, - 277, - 355, - 329, - 309, - 392, - 438, - 381, - 382, - 256, - 279, - 429, - 360, - 365, - 364, - 379, - 355, - 277, - 437, - 282, - 443, - 283, - 281, - 275, - 363, - 395, - 431, - 369, - 299, - 297, - 337, - 335, - 273, - 321, - 348, - 450, - 349, - 359, - 446, - 467, - 283, - 293, - 282, - 250, - 458, - 462, - 300, - 276, - 383, - 292, - 308, - 325, - 283, - 276, - 293, - 264, - 372, - 447, - 346, - 352, - 340, - 354, - 274, - 19, - 363, - 456, - 281, - 426, - 436, - 425, - 380, - 381, - 252, - 267, - 269, - 393, - 421, - 200, - 428, - 371, - 266, - 329, - 432, - 287, - 422, - 290, - 250, - 328, - 385, - 258, - 384, - 446, - 265, - 342, - 386, - 387, - 257, - 422, - 424, - 430, - 445, - 342, - 276, - 422, - 273, - 424, - 306, - 292, - 307, - 352, - 366, - 345, - 268, - 271, - 302, - 358, - 423, - 371, - 327, - 294, - 460, - 331, - 279, - 294, - 303, - 271, - 304, - 436, - 432, - 427, - 304, - 272, - 408, - 395, - 394, - 431, - 378, - 395, - 400, - 296, - 334, - 299, - 6, - 351, - 168, - 376, - 352, - 411, - 307, - 325, - 320, - 285, - 295, - 336, - 320, - 319, - 404, - 329, - 330, - 349, - 334, - 293, - 333, - 366, - 323, - 447, - 316, - 15, - 315, - 331, - 358, - 279, - 317, - 14, - 316, - 8, - 285, - 9, - 277, - 329, - 350, - 253, - 374, - 252, - 319, - 318, - 403, - 351, - 6, - 419, - 324, - 318, - 325, - 397, - 367, - 365, - 288, - 435, - 397, - 278, - 344, - 439, - 310, - 272, - 311, - 248, - 195, - 281, - 375, - 273, - 291, - 175, - 396, - 199, - 312, - 311, - 268, - 276, - 283, - 445, - 390, - 373, - 339, - 295, - 282, - 296, - 448, - 449, - 346, - 356, - 264, - 454, - 337, - 336, - 299, - 337, - 338, - 151, - 294, - 278, - 455, - 308, - 292, - 415, - 429, - 358, - 355, - 265, - 340, - 372, - 388, - 390, - 466, - 352, - 346, - 280, - 295, - 442, - 282, - 354, - 19, - 370, - 285, - 441, - 295, - 195, - 248, - 197, - 457, - 440, - 274, - 301, - 300, - 368, - 417, - 351, - 465, - 251, - 301, - 389, - 385, - 380, - 386, - 394, - 395, - 379, - 399, - 412, - 419, - 410, - 436, - 322, - 387, - 373, - 388, - 326, - 2, - 393, - 354, - 370, - 461, - 393, - 164, - 267, - 268, - 302, - 12, - 386, - 374, - 387, - 312, - 268, - 13, - 298, - 293, - 301, - 265, - 446, - 340, - 380, - 385, - 381, - 280, - 330, - 425, - 322, - 426, - 391, - 420, - 429, - 437, - 393, - 391, - 326, - 344, - 440, - 438, - 458, - 459, - 461, - 364, - 434, - 394, - 428, - 396, - 262, - 274, - 354, - 457, - 317, - 316, - 402, - 316, - 315, - 403, - 315, - 314, - 404, - 314, - 313, - 405, - 313, - 421, - 406, - 323, - 366, - 361, - 292, - 306, - 407, - 306, - 291, - 408, - 291, - 287, - 409, - 287, - 432, - 410, - 427, - 434, - 411, - 372, - 264, - 383, - 459, - 309, - 457, - 366, - 352, - 401, - 1, - 274, - 4, - 418, - 421, - 262, - 331, - 294, - 358, - 435, - 433, - 367, - 392, - 289, - 439, - 328, - 462, - 326, - 94, - 2, - 370, - 289, - 305, - 455, - 339, - 254, - 448, - 359, - 255, - 446, - 254, - 253, - 449, - 253, - 252, - 450, - 252, - 256, - 451, - 256, - 341, - 452, - 414, - 413, - 463, - 286, - 441, - 414, - 286, - 258, - 441, - 258, - 257, - 442, - 257, - 259, - 443, - 259, - 260, - 444, - 260, - 467, - 445, - 309, - 459, - 250, - 305, - 289, - 290, - 305, - 290, - 460, - 401, - 376, - 435, - 309, - 250, - 392, - 376, - 411, - 433, - 453, - 341, - 464, - 357, - 453, - 465, - 343, - 357, - 412, - 437, - 343, - 399, - 344, - 360, - 440, - 420, - 437, - 456, - 360, - 420, - 363, - 361, - 401, - 288, - 265, - 372, - 353, - 390, - 339, - 249, - 339, - 448, - 255 -]; -var VTX68 = [ - 127, - 234, - 132, - 58, - 172, - 150, - 149, - 148, - 152, - 377, - 378, - 379, - 397, - 288, - 361, - 454, - 356, - 70, - 63, - 105, - 66, - 107, - 336, - 296, - 334, - 293, - 300, - 168, - 6, - 195, - 4, - 98, - 97, - 2, - 326, - 327, - 33, - 160, - 158, - 133, - 153, - 144, - 362, - 385, - 387, - 263, - 373, - 380, - 57, - 40, - 37, - 0, - 267, - 270, - 287, - 321, - 314, - 17, - 84, - 91, - 78, - 81, - 13, - 311, - 308, - 402, - 14, - 178 -]; -var VTX33 = [33, 133, 362, 263, 1, 62, 308, 159, 145, 386, 374, 6, 102, 331, 2, 13, 14, 70, 105, 107, 336, 334, 300, 54, 10, 284, 50, 280, 234, 454, 58, 288, 152]; -var VTX7 = [33, 133, 362, 263, 1, 78, 308]; -var UV68 = VTX68.map((x) => UV468[x]); -var UV33 = VTX33.map((x) => UV468[x]); -var UV7 = VTX7.map((x) => UV468[x]); -function connectionsToIndices(connections) { - const indices = connections.map((connection) => connection[0]); - indices.push(connections[connections.length - 1][1]); - return indices; -} -var pairsLips = [ - [61, 146], - [146, 91], - [91, 181], - [181, 84], - [84, 17], - [17, 314], - [314, 405], - [405, 321], - [321, 375], - [375, 291], - [61, 185], - [185, 40], - [40, 39], - [39, 37], - [37, 0], - [0, 267], - [267, 269], - [269, 270], - [270, 409], - [409, 291], - [78, 95], - [95, 88], - [88, 178], - [178, 87], - [87, 14], - [14, 317], - [317, 402], - [402, 318], - [318, 324], - [324, 308], - [78, 191], - [191, 80], - [80, 81], - [81, 82], - [82, 13], - [13, 312], - [312, 311], - [311, 310], - [310, 415], - [415, 308] -]; -var pairsLeftEye = [[263, 249], [249, 390], [390, 373], [373, 374], [374, 380], [380, 381], [381, 382], [382, 362], [263, 466], [466, 388], [388, 387], [387, 386], [386, 385], [385, 384], [384, 398], [398, 362]]; -var pairsLeftEyebrow = [[276, 283], [283, 282], [282, 295], [295, 285], [300, 293], [293, 334], [334, 296], [296, 336]]; -var pairsLeftIris = [[474, 475], [475, 476], [476, 477], [477, 474]]; -var pairsRightEye = [[33, 7], [7, 163], [163, 144], [144, 145], [145, 153], [153, 154], [154, 155], [155, 133], [33, 246], [246, 161], [161, 160], [160, 159], [159, 158], [158, 157], [157, 173], [173, 133]]; -var pairsRightEyebrow = [[46, 53], [53, 52], [52, 65], [65, 55], [70, 63], [63, 105], [105, 66], [66, 107]]; -var pairsRightIris = [[469, 470], [470, 471], [471, 472], [472, 469]]; -var pairsFaceContour = [ - [10, 338], - [338, 297], - [297, 332], - [332, 284], - [284, 251], - [251, 389], - [389, 356], - [356, 454], - [454, 323], - [323, 361], - [361, 288], - [288, 397], - [397, 365], - [365, 379], - [379, 378], - [378, 400], - [400, 377], - [377, 152], - [152, 148], - [148, 176], - [176, 149], - [149, 150], - [150, 136], - [136, 172], - [172, 58], - [58, 132], - [132, 93], - [93, 234], - [234, 127], - [127, 162], - [162, 21], - [21, 54], - [54, 103], - [103, 67], - [67, 109], - [109, 10] -]; -var contourKeypoints = { - lips: connectionsToIndices(pairsLips), - leftEye: connectionsToIndices(pairsLeftEye), - leftEyebrow: connectionsToIndices(pairsLeftEyebrow), - leftIris: connectionsToIndices(pairsLeftIris), - rightEye: connectionsToIndices(pairsRightEye), - rightEyebrow: connectionsToIndices(pairsRightEyebrow), - rightIris: connectionsToIndices(pairsRightIris), - faceOval: connectionsToIndices(pairsFaceContour) -}; - -// src/tfjs/constants.ts -var tf6 = __toESM(require_tfjs_esm()); -var constants = { - tf255: 255, - tf1: 1, - tf2: 2, - tf05: 0.5, - tf127: 127.5, - rgb: [0.2989, 0.587, 0.114] -}; -function init() { - constants.tf255 = tf6.scalar(255, "float32"); - constants.tf1 = tf6.scalar(1, "float32"); - constants.tf2 = tf6.scalar(2, "float32"); - constants.tf05 = tf6.scalar(0.5, "float32"); - constants.tf127 = tf6.scalar(127.5, "float32"); - constants.rgb = tf6.tensor1d([0.2989, 0.587, 0.114], "float32"); -} - -// src/face/facemeshutil.ts -var getBoxSize = (box) => [Math.abs(box.endPoint[0] - box.startPoint[0]), Math.abs(box.endPoint[1] - box.startPoint[1])]; -var getBoxCenter = (box) => [box.startPoint[0] + (box.endPoint[0] - box.startPoint[0]) / 2, box.startPoint[1] + (box.endPoint[1] - box.startPoint[1]) / 2, 1]; -var clampBox = (box, input) => box ? [ - Math.trunc(Math.max(0, box.startPoint[0])), - Math.trunc(Math.max(0, box.startPoint[1])), - Math.trunc(Math.min(input.shape[2] || 0, box.endPoint[0]) - Math.max(0, box.startPoint[0])), - Math.trunc(Math.min(input.shape[1] || 0, box.endPoint[1]) - Math.max(0, box.startPoint[1])) -] : [0, 0, 0, 0]; -var getRawBox = (box, input) => box ? [ - box.startPoint[0] / (input.shape[2] || 0), - box.startPoint[1] / (input.shape[1] || 0), - (box.endPoint[0] - box.startPoint[0]) / (input.shape[2] || 0), - (box.endPoint[1] - box.startPoint[1]) / (input.shape[1] || 0) -] : [0, 0, 0, 0]; -var scaleBoxCoordinates = (box, factor) => { - const startPoint = [box.startPoint[0] * factor[0], box.startPoint[1] * factor[1]]; - const endPoint = [box.endPoint[0] * factor[0], box.endPoint[1] * factor[1]]; - return { startPoint, endPoint, landmarks: box.landmarks, confidence: box.confidence }; -}; -var cutAndResize = (box, image27, cropSize) => { - const h = image27.shape[1]; - const w = image27.shape[2]; - const cutBox = [box.startPoint[1] / h, box.startPoint[0] / w, box.endPoint[1] / h, box.endPoint[0] / w]; - const crop = tf7.image.cropAndResize(image27, [cutBox], [0], cropSize); - const norm = tf7.div(crop, constants.tf255); - tf7.dispose(crop); - return norm; -}; -var enlargeBox = (box, factor) => { - const center = getBoxCenter(box); - const size2 = getBoxSize(box); - const halfSize = [factor * size2[0] / 2, factor * size2[1] / 2]; - return { startPoint: [center[0] - halfSize[0], center[1] - halfSize[1]], endPoint: [center[0] + halfSize[0], center[1] + halfSize[1]], landmarks: box.landmarks, confidence: box.confidence }; -}; -var squarifyBox = (box) => { - const centers = getBoxCenter(box); - const size2 = getBoxSize(box); - const halfSize = Math.max(...size2) / 2; - return { startPoint: [Math.round(centers[0] - halfSize), Math.round(centers[1] - halfSize)], endPoint: [Math.round(centers[0] + halfSize), Math.round(centers[1] + halfSize)], landmarks: box.landmarks, confidence: box.confidence }; -}; -var calculateLandmarksBoundingBox = (landmarks) => { - const x = landmarks.map((d) => d[0]); - const y = landmarks.map((d) => d[1]); - return { startPoint: [Math.min(...x), Math.min(...y)], endPoint: [Math.max(...x), Math.max(...y)], landmarks }; -}; -var fixedRotationMatrix = [[1, 0, 0], [0, 1, 0], [0, 0, 1]]; -var normalizeRadians = (angle) => angle - 2 * Math.PI * Math.floor((angle + Math.PI) / (2 * Math.PI)); -var computeRotation = (point1, point2) => normalizeRadians(Math.PI / 2 - Math.atan2(-(point2[1] - point1[1]), point2[0] - point1[0])); -var buildTranslationMatrix = (x, y) => [[1, 0, x], [0, 1, y], [0, 0, 1]]; -var dot = (v1, v2) => { - let product = 0; - for (let i = 0; i < v1.length; i++) - product += v1[i] * v2[i]; - return product; -}; -var getColumnFrom2DArr = (arr, columnIndex) => { - const column = []; - for (let i = 0; i < arr.length; i++) - column.push(arr[i][columnIndex]); - return column; -}; -var multiplyTransformMatrices = (mat1, mat2) => { - const product = []; - const size2 = mat1.length; - for (let row = 0; row < size2; row++) { - product.push([]); - for (let col = 0; col < size2; col++) - product[row].push(dot(mat1[row], getColumnFrom2DArr(mat2, col))); - } - return product; -}; -var buildRotationMatrix = (rotation, center) => { - const cosA = Math.cos(rotation); - const sinA = Math.sin(rotation); - const rotationMatrix = [[cosA, -sinA, 0], [sinA, cosA, 0], [0, 0, 1]]; - const translationMatrix = buildTranslationMatrix(center[0], center[1]); - const translationTimesRotation = multiplyTransformMatrices(translationMatrix, rotationMatrix); - const negativeTranslationMatrix = buildTranslationMatrix(-center[0], -center[1]); - return multiplyTransformMatrices(translationTimesRotation, negativeTranslationMatrix); -}; -var invertTransformMatrix = (matrix) => { - const rotationComponent = [[matrix[0][0], matrix[1][0]], [matrix[0][1], matrix[1][1]]]; - const translationComponent = [matrix[0][2], matrix[1][2]]; - const invertedTranslation = [-dot(rotationComponent[0], translationComponent), -dot(rotationComponent[1], translationComponent)]; - return [rotationComponent[0].concat(invertedTranslation[0]), rotationComponent[1].concat(invertedTranslation[1]), [0, 0, 1]]; -}; -var rotatePoint = (homogeneousCoordinate, rotationMatrix) => [dot(homogeneousCoordinate, rotationMatrix[0]), dot(homogeneousCoordinate, rotationMatrix[1])]; -function generateAnchors(inputSize10) { - const spec = inputSize10 === 192 ? { strides: [4], anchors: [1] } : { strides: [inputSize10 / 16, inputSize10 / 8], anchors: [2, 6] }; - const anchors3 = []; - for (let i = 0; i < spec.strides.length; i++) { - const stride = spec.strides[i]; - const gridRows = Math.floor((inputSize10 + stride - 1) / stride); - const gridCols = Math.floor((inputSize10 + stride - 1) / stride); - const anchorsNum = spec.anchors[i]; - for (let gridY = 0; gridY < gridRows; gridY++) { - const anchorY = stride * (gridY + 0.5); - for (let gridX = 0; gridX < gridCols; gridX++) { - const anchorX = stride * (gridX + 0.5); - for (let n = 0; n < anchorsNum; n++) - anchors3.push([anchorX, anchorY]); - } - } - } - return anchors3; -} -function transformRawCoords(coordsRaw, box, angle, rotationMatrix, inputSize10) { - const boxSize = getBoxSize(box); - const coordsScaled = coordsRaw.map((coord) => [ - boxSize[0] / inputSize10 * (coord[0] - inputSize10 / 2), - boxSize[1] / inputSize10 * (coord[1] - inputSize10 / 2), - coord[2] || 0 - ]); - const largeAngle = angle && angle !== 0 && Math.abs(angle) > 0.2; - const coordsRotationMatrix = largeAngle ? buildRotationMatrix(angle, [0, 0]) : fixedRotationMatrix; - const coordsRotated = largeAngle ? coordsScaled.map((coord) => [...rotatePoint(coord, coordsRotationMatrix), coord[2]]) : coordsScaled; - const inverseRotationMatrix = largeAngle ? invertTransformMatrix(rotationMatrix) : fixedRotationMatrix; - const boxCenter = getBoxCenter(box); - const offsets = [dot(boxCenter, inverseRotationMatrix[0]), dot(boxCenter, inverseRotationMatrix[1])]; - return coordsRotated.map((coord) => [ - Math.trunc(coord[0] + offsets[0]), - Math.trunc(coord[1] + offsets[1]), - Math.trunc(coord[2] || 0) - ]); -} -function correctFaceRotation(rotate, box, input, inputSize10) { - const symmetryLine = box.landmarks.length >= meshLandmarks.count ? meshLandmarks.symmetryLine : blazeFaceLandmarks.symmetryLine; - let angle = 0; - let rotationMatrix = fixedRotationMatrix; - let face4; - if (rotate && env.kernels.includes("rotatewithoffset")) { - angle = computeRotation(box.landmarks[symmetryLine[0]], box.landmarks[symmetryLine[1]]); - const largeAngle = angle && angle !== 0 && Math.abs(angle) > 0.2; - if (largeAngle) { - const center = getBoxCenter(box); - const centerRaw = [center[0] / input.shape[2], center[1] / input.shape[1]]; - const rotated = tf7.image.rotateWithOffset(input, angle, 0, centerRaw); - rotationMatrix = buildRotationMatrix(-angle, center); - face4 = cutAndResize(box, rotated, [inputSize10, inputSize10]); - tf7.dispose(rotated); - } else { - face4 = cutAndResize(box, input, [inputSize10, inputSize10]); - } - } else { - face4 = cutAndResize(box, input, [inputSize10, inputSize10]); - } - return [angle, rotationMatrix, face4]; -} -var findFaceCenter = (mesh) => { - const x = mesh.map((m) => m[0]); - const y = mesh.map((m) => m[1]); - return [Math.min(...x) + (Math.max(...x) - Math.min(...x)) / 2, Math.min(...y) + (Math.max(...y) - Math.min(...y)) / 2]; -}; -var calculateFaceBox = (mesh, previousBox) => { - const center = findFaceCenter(mesh); - const boxSize = getBoxSize(previousBox); - const calculatedBox = { - startPoint: [center[0] - boxSize[0] / 2, center[1] - boxSize[1] / 2], - endPoint: [center[0] + boxSize[0] / 2, center[1] + boxSize[1] / 2] - }; - return calculatedBox; -}; - -// src/face/blazeface.ts -var keypointsCount = 6; -var faceBoxScaleFactor = 1.4; -var model2; -var anchors = null; -var inputSize = 0; -var inputSizeT = null; -var size = () => inputSize; -async function load2(config3) { - var _a; - if (env.initial) - model2 = null; - if (!model2) - model2 = await loadModel((_a = config3.face.detector) == null ? void 0 : _a.modelPath); - else if (config3.debug) - log("cached model:", model2["modelUrl"]); - inputSize = model2["executor"] && model2.inputs[0].shape ? model2.inputs[0].shape[2] : 256; - inputSizeT = tf8.scalar(inputSize, "int32"); - anchors = tf8.tensor2d(generateAnchors(inputSize)); - return model2; -} -function decodeBoxes(boxOutputs) { - const t2 = {}; - t2.boxStarts = tf8.slice(boxOutputs, [0, 1], [-1, 2]); - t2.centers = tf8.add(t2.boxStarts, anchors); - t2.boxSizes = tf8.slice(boxOutputs, [0, 3], [-1, 2]); - t2.boxSizesNormalized = tf8.div(t2.boxSizes, inputSizeT); - t2.centersNormalized = tf8.div(t2.centers, inputSizeT); - t2.halfBoxSize = tf8.div(t2.boxSizesNormalized, constants.tf2); - t2.starts = tf8.sub(t2.centersNormalized, t2.halfBoxSize); - t2.ends = tf8.add(t2.centersNormalized, t2.halfBoxSize); - t2.startNormalized = tf8.mul(t2.starts, inputSizeT); - t2.endNormalized = tf8.mul(t2.ends, inputSizeT); - const boxes = tf8.concat2d([t2.startNormalized, t2.endNormalized], 1); - Object.keys(t2).forEach((tensor6) => tf8.dispose(t2[tensor6])); - return boxes; -} -async function getBoxes(inputImage, config3) { - var _a, _b, _c, _d; - if (!inputImage || inputImage["isDisposedInternal"] || inputImage.shape.length !== 4 || inputImage.shape[1] < 1 || inputImage.shape[2] < 1) - return []; - const t2 = {}; - t2.resized = tf8.image.resizeBilinear(inputImage, [inputSize, inputSize]); - t2.div = tf8.div(t2.resized, constants.tf127); - t2.normalized = tf8.sub(t2.div, constants.tf05); - const res = model2 == null ? void 0 : model2.execute(t2.normalized); - if (Array.isArray(res) && res.length > 2) { - const sorted = res.sort((a, b) => a.size - b.size); - t2.concat384 = tf8.concat([sorted[0], sorted[2]], 2); - t2.concat512 = tf8.concat([sorted[1], sorted[3]], 2); - t2.concat = tf8.concat([t2.concat512, t2.concat384], 1); - t2.batch = tf8.squeeze(t2.concat, 0); - } else if (Array.isArray(res)) { - t2.batch = tf8.squeeze(res[0]); - } else { - t2.batch = tf8.squeeze(res); - } - tf8.dispose(res); - t2.boxes = decodeBoxes(t2.batch); - t2.logits = tf8.slice(t2.batch, [0, 0], [-1, 1]); - t2.sigmoid = tf8.sigmoid(t2.logits); - t2.scores = tf8.squeeze(t2.sigmoid); - t2.nms = await tf8.image.nonMaxSuppressionAsync(t2.boxes, t2.scores, ((_a = config3.face.detector) == null ? void 0 : _a.maxDetected) || 0, ((_b = config3.face.detector) == null ? void 0 : _b.iouThreshold) || 0, ((_c = config3.face.detector) == null ? void 0 : _c.minConfidence) || 0); - const nms = await t2.nms.array(); - const boxes = []; - const scores = await t2.scores.data(); - for (let i = 0; i < nms.length; i++) { - const confidence = scores[nms[i]]; - if (confidence > (((_d = config3.face.detector) == null ? void 0 : _d.minConfidence) || 0)) { - const b = {}; - b.bbox = tf8.slice(t2.boxes, [nms[i], 0], [1, -1]); - b.slice = tf8.slice(t2.batch, [nms[i], keypointsCount - 1], [1, -1]); - b.squeeze = tf8.squeeze(b.slice); - b.landmarks = tf8.reshape(b.squeeze, [keypointsCount, -1]); - const points = await b.bbox.data(); - const rawBox = { - startPoint: [points[0], points[1]], - endPoint: [points[2], points[3]], - landmarks: await b.landmarks.array(), - confidence - }; - const scaledBox = scaleBoxCoordinates(rawBox, [(inputImage.shape[2] || 0) / inputSize, (inputImage.shape[1] || 0) / inputSize]); - const enlargedBox = enlargeBox(scaledBox, config3.face["scale"] || faceBoxScaleFactor); - const squaredBox = squarifyBox(enlargedBox); - boxes.push(squaredBox); - Object.keys(b).forEach((tensor6) => tf8.dispose(b[tensor6])); - } - } - Object.keys(t2).forEach((tensor6) => tf8.dispose(t2[tensor6])); - return boxes; -} - -// src/body/blazepose.ts -var tf10 = __toESM(require_tfjs_esm()); - -// src/body/blazeposecoords.ts -var blazeposecoords_exports = {}; -__export(blazeposecoords_exports, { - connected: () => connected, - kpt: () => kpt -}); -var kpt = [ - "nose", - "leftEyeInside", - "leftEye", - "leftEyeOutside", - "rightEyeInside", - "rightEye", - "rightEyeOutside", - "leftEar", - "rightEar", - "leftMouth", - "rightMouth", - "leftShoulder", - "rightShoulder", - "leftElbow", - "rightElbow", - "leftWrist", - "rightWrist", - "leftPinky", - "rightPinky", - "leftIndex", - "rightIndex", - "leftThumb", - "rightThumb", - "leftHip", - "rightHip", - "leftKnee", - "rightKnee", - "leftAnkle", - "rightAnkle", - "leftHeel", - "rightHeel", - "leftFoot", - "rightFoot", - "bodyCenter", - "bodyTop", - "leftPalm", - "leftHand", - "rightPalm", - "rightHand" -]; -var connected = { - shoulders: ["leftShoulder", "rightShoulder"], - hips: ["rightHip", "leftHip"], - mouth: ["leftMouth", "rightMouth"], - leftLegUpper: ["leftHip", "leftKnee"], - leftLegLower: ["leftKnee", "leftAnkle"], - leftFoot: ["leftAnkle", "leftHeel", "leftFoot"], - leftTorso: ["leftShoulder", "leftHip"], - leftArmUpper: ["leftShoulder", "leftElbow"], - leftArmLower: ["leftElbow", "leftWrist"], - leftHand: ["leftWrist", "leftPalm"], - leftHandPinky: ["leftPalm", "leftPinky"], - leftHandIndex: ["leftPalm", "leftIndex"], - leftHandThumb: ["leftPalm", "leftThumb"], - leftEyeOutline: ["leftEyeInside", "leftEyeOutside"], - rightLegUpper: ["rightHip", "rightKnee"], - rightLegLower: ["rightKnee", "rightAnkle"], - rightFoot: ["rightAnkle", "rightHeel", "rightFoot"], - rightTorso: ["rightShoulder", "rightHip"], - rightArmUpper: ["rightShoulder", "rightElbow"], - rightArmLower: ["rightElbow", "rightWrist"], - rightHand: ["rightWrist", "rightPalm"], - rightHandPinky: ["rightPalm", "rightPinky"], - rightHandIndex: ["rightPalm", "rightIndex"], - rightHandThumb: ["rightPalm", "rightThumb"], - rightEyeOutline: ["rightEyeInside", "rightEyeOutside"] -}; - -// src/body/blazeposedetector.ts -var tf9 = __toESM(require_tfjs_esm()); -var inputSize2 = 224; -var anchorTensor; -var numLayers = 5; -var strides = [8, 16, 32, 32, 32]; -function createAnchors() { - const anchors3 = []; - let layerId = 0; - while (layerId < numLayers) { - let anchorCount = 0; - let lastSameStrideLayer = layerId; - while (lastSameStrideLayer < strides.length && strides[lastSameStrideLayer] === strides[layerId]) { - anchorCount += 2; - lastSameStrideLayer++; - } - const stride = strides[layerId]; - const featureMapHeight = Math.ceil(inputSize2 / stride); - const featureMapWidth = Math.ceil(inputSize2 / stride); - for (let y = 0; y < featureMapHeight; ++y) { - for (let x = 0; x < featureMapWidth; ++x) { - for (let anchorId = 0; anchorId < anchorCount; ++anchorId) { - anchors3.push({ x: (x + 0.5) / featureMapWidth, y: (y + 0.5) / featureMapHeight }); - } - } - } - layerId = lastSameStrideLayer; - } - anchorTensor = { x: tf9.tensor1d(anchors3.map((a) => a.x)), y: tf9.tensor1d(anchors3.map((a) => a.y)) }; -} - -// src/util/box.ts -function calc(keypoints, outputSize2 = [1, 1]) { - const coords = [keypoints.map((pt) => pt[0]), keypoints.map((pt) => pt[1])]; - const min2 = [Math.min(...coords[0]), Math.min(...coords[1])]; - const max4 = [Math.max(...coords[0]), Math.max(...coords[1])]; - const box = [min2[0], min2[1], max4[0] - min2[0], max4[1] - min2[1]]; - const boxRaw = [box[0] / outputSize2[0], box[1] / outputSize2[1], box[2] / outputSize2[0], box[3] / outputSize2[1]]; - return { box, boxRaw }; -} -function square(keypoints, outputSize2 = [1, 1]) { - const coords = [keypoints.map((pt) => pt[0]), keypoints.map((pt) => pt[1])]; - const min2 = [Math.min(...coords[0]), Math.min(...coords[1])]; - const max4 = [Math.max(...coords[0]), Math.max(...coords[1])]; - const center = [(min2[0] + max4[0]) / 2, (min2[1] + max4[1]) / 2]; - const dist = Math.max(center[0] - min2[0], center[1] - min2[1], -center[0] + max4[0], -center[1] + max4[1]); - const box = [Math.trunc(center[0] - dist), Math.trunc(center[1] - dist), Math.trunc(2 * dist), Math.trunc(2 * dist)]; - const boxRaw = [box[0] / outputSize2[0], box[1] / outputSize2[1], box[2] / outputSize2[0], box[3] / outputSize2[1]]; - return { box, boxRaw }; -} -function scale(box, scaleFact) { - const dist = [box[2] * scaleFact, box[3] * scaleFact]; - const newBox = [ - box[0] - (dist[0] - box[2]) / 2, - box[1] - (dist[1] - box[3]) / 2, - dist[0], - dist[1] - ]; - return newBox; -} - -// src/body/blazepose.ts -var env3 = { initial: true }; -var models2 = { detector: null, landmarks: null }; -var inputSize3 = { detector: [224, 224], landmarks: [256, 256] }; -var skipped2 = Number.MAX_SAFE_INTEGER; -var outputNodes = { - landmarks: ["ld_3d", "activation_segmentation", "activation_heatmap", "world_3d", "output_poseflag"], - detector: [] -}; -var cache = null; -var cropBox; -var padding = [[0, 0], [0, 0], [0, 0], [0, 0]]; -var lastTime2 = 0; -var sigmoid3 = (x) => 1 - 1 / (1 + Math.exp(x)); -async function loadDetect(config3) { - var _a; - if (env3.initial) - models2.detector = null; - if (!models2.detector && config3.body["detector"] && config3.body["detector"].modelPath || "") { - models2.detector = await loadModel(config3.body["detector"].modelPath); - const inputs = ((_a = models2.detector) == null ? void 0 : _a["executor"]) ? Object.values(models2.detector.modelSignature["inputs"]) : void 0; - inputSize3.detector[0] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[1].size) : 0; - inputSize3.detector[1] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : 0; - } else if (config3.debug && models2.detector) - log("cached model:", models2.detector["modelUrl"]); - createAnchors(); - return models2.detector; -} -async function loadPose(config3) { - var _a; - if (env3.initial) - models2.landmarks = null; - if (!models2.landmarks) { - models2.landmarks = await loadModel(config3.body.modelPath); - const inputs = ((_a = models2.landmarks) == null ? void 0 : _a["executor"]) ? Object.values(models2.landmarks.modelSignature["inputs"]) : void 0; - inputSize3.landmarks[0] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[1].size) : 0; - inputSize3.landmarks[1] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : 0; - } else if (config3.debug) - log("cached model:", models2.landmarks["modelUrl"]); - return models2.landmarks; -} -function prepareImage(input, size2) { - var _a, _b; - const t2 = {}; - if (!((_a = input == null ? void 0 : input.shape) == null ? void 0 : _a[1]) || !((_b = input == null ? void 0 : input.shape) == null ? void 0 : _b[2])) - return input; - let final; - if (cropBox) { - t2.cropped = tf10.image.cropAndResize(input, [cropBox], [0], [input.shape[1], input.shape[2]]); - } - if (input.shape[1] !== input.shape[2]) { - const height = [ - input.shape[2] > input.shape[1] ? Math.trunc((input.shape[2] - input.shape[1]) / 2) : 0, - input.shape[2] > input.shape[1] ? Math.trunc((input.shape[2] - input.shape[1]) / 2) : 0 - ]; - const width = [ - input.shape[1] > input.shape[2] ? Math.trunc((input.shape[1] - input.shape[2]) / 2) : 0, - input.shape[1] > input.shape[2] ? Math.trunc((input.shape[1] - input.shape[2]) / 2) : 0 - ]; - padding = [ - [0, 0], - height, - width, - [0, 0] - ]; - t2.pad = tf10.pad(t2.cropped || input, padding); - t2.resize = tf10.image.resizeBilinear(t2.pad, [size2, size2]); - final = tf10.div(t2.resize, constants.tf255); - } else if (input.shape[1] !== size2) { - t2.resize = tf10.image.resizeBilinear(t2.cropped || input, [size2, size2]); - final = tf10.div(t2.resize, constants.tf255); - } else { - final = tf10.div(t2.cropped || input, constants.tf255); - } - Object.keys(t2).forEach((tensor6) => tf10.dispose(t2[tensor6])); - return final; -} -function rescaleKeypoints(keypoints, outputSize2) { - for (const kpt4 of keypoints) { - kpt4.position = [ - Math.trunc(kpt4.position[0] * (outputSize2[0] + padding[2][0] + padding[2][1]) / outputSize2[0] - padding[2][0]), - Math.trunc(kpt4.position[1] * (outputSize2[1] + padding[1][0] + padding[1][1]) / outputSize2[1] - padding[1][0]), - kpt4.position[2] - ]; - kpt4.positionRaw = [kpt4.position[0] / outputSize2[0], kpt4.position[1] / outputSize2[1], 2 * kpt4.position[2] / (outputSize2[0] + outputSize2[1])]; - } - if (cropBox) { - for (const kpt4 of keypoints) { - kpt4.positionRaw = [ - kpt4.positionRaw[0] + cropBox[1], - kpt4.positionRaw[1] + cropBox[0], - kpt4.positionRaw[2] - ]; - kpt4.position = [ - Math.trunc(kpt4.positionRaw[0] * outputSize2[0]), - Math.trunc(kpt4.positionRaw[1] * outputSize2[1]), - kpt4.positionRaw[2] - ]; - } - } - return keypoints; -} -function fixKeypoints(keypoints) { - const leftPalm = keypoints.find((k) => k.part === "leftPalm"); - const leftWrist = keypoints.find((k) => k.part === "leftWrist"); - const leftIndex = keypoints.find((k) => k.part === "leftIndex"); - leftPalm.position[2] = ((leftWrist.position[2] || 0) + (leftIndex.position[2] || 0)) / 2; - const rightPalm = keypoints.find((k) => k.part === "rightPalm"); - const rightWrist = keypoints.find((k) => k.part === "rightWrist"); - const rightIndex = keypoints.find((k) => k.part === "rightIndex"); - rightPalm.position[2] = ((rightWrist.position[2] || 0) + (rightIndex.position[2] || 0)) / 2; -} -async function detectLandmarks(input, config3, outputSize2) { - var _a, _b; - if (!((_a = models2.landmarks) == null ? void 0 : _a["executor"])) - return null; - const t2 = {}; - [t2.ld, t2.segmentation, t2.heatmap, t2.world, t2.poseflag] = (_b = models2.landmarks) == null ? void 0 : _b.execute(input, outputNodes.landmarks); - const poseScore = (await t2.poseflag.data())[0]; - const points = await t2.ld.data(); - const distances = await t2.world.data(); - Object.keys(t2).forEach((tensor6) => tf10.dispose(t2[tensor6])); - const keypointsRelative = []; - const depth = 5; - for (let i = 0; i < points.length / depth; i++) { - const score = sigmoid3(points[depth * i + 3]); - const presence = sigmoid3(points[depth * i + 4]); - const adjScore = Math.trunc(100 * score * presence * poseScore) / 100; - const positionRaw = [points[depth * i + 0] / inputSize3.landmarks[0], points[depth * i + 1] / inputSize3.landmarks[1], points[depth * i + 2] + 0]; - const position = [Math.trunc(outputSize2[0] * positionRaw[0]), Math.trunc(outputSize2[1] * positionRaw[1]), positionRaw[2]]; - const distance2 = [distances[depth * i + 0], distances[depth * i + 1], distances[depth * i + 2] + 0]; - keypointsRelative.push({ part: kpt[i], positionRaw, position, distance: distance2, score: adjScore }); - } - if (poseScore < (config3.body.minConfidence || 0)) - return null; - fixKeypoints(keypointsRelative); - const keypoints = rescaleKeypoints(keypointsRelative, outputSize2); - const kpts = keypoints.map((k) => k.position); - const boxes = calc(kpts, [outputSize2[0], outputSize2[1]]); - const annotations2 = {}; - for (const [name, indexes] of Object.entries(connected)) { - const pt = []; - for (let i = 0; i < indexes.length - 1; i++) { - const pt0 = keypoints.find((kpt4) => kpt4.part === indexes[i]); - const pt1 = keypoints.find((kpt4) => kpt4.part === indexes[i + 1]); - if (pt0 && pt1) - pt.push([pt0.position, pt1.position]); - } - annotations2[name] = pt; - } - const body4 = { id: 0, score: Math.trunc(100 * poseScore) / 100, box: boxes.box, boxRaw: boxes.boxRaw, keypoints, annotations: annotations2 }; - return body4; -} -async function predict2(input, config3) { - const outputSize2 = [input.shape[2] || 0, input.shape[1] || 0]; - const skipTime = (config3.body.skipTime || 0) > now() - lastTime2; - const skipFrame = skipped2 < (config3.body.skipFrames || 0); - if (config3.skipAllowed && skipTime && skipFrame && cache !== null) { - skipped2++; - } else { - const t2 = {}; - t2.landmarks = prepareImage(input, 256); - cache = await detectLandmarks(t2.landmarks, config3, outputSize2); - Object.keys(t2).forEach((tensor6) => tf10.dispose(t2[tensor6])); - lastTime2 = now(); - skipped2 = 0; - } - return cache ? [cache] : []; -} - -// src/object/centernet.ts -var tf11 = __toESM(require_tfjs_esm()); - -// src/object/labels.ts -var labels = [ - { class: 1, label: "person" }, - { class: 2, label: "bicycle" }, - { class: 3, label: "car" }, - { class: 4, label: "motorcycle" }, - { class: 5, label: "airplane" }, - { class: 6, label: "bus" }, - { class: 7, label: "train" }, - { class: 8, label: "truck" }, - { class: 9, label: "boat" }, - { class: 10, label: "traffic light" }, - { class: 11, label: "fire hydrant" }, - { class: 12, label: "stop sign" }, - { class: 13, label: "parking meter" }, - { class: 14, label: "bench" }, - { class: 15, label: "bird" }, - { class: 16, label: "cat" }, - { class: 17, label: "dog" }, - { class: 18, label: "horse" }, - { class: 19, label: "sheep" }, - { class: 20, label: "cow" }, - { class: 21, label: "elephant" }, - { class: 22, label: "bear" }, - { class: 23, label: "zebra" }, - { class: 24, label: "giraffe" }, - { class: 25, label: "backpack" }, - { class: 26, label: "umbrella" }, - { class: 27, label: "handbag" }, - { class: 28, label: "tie" }, - { class: 29, label: "suitcase" }, - { class: 30, label: "frisbee" }, - { class: 31, label: "skis" }, - { class: 32, label: "snowboard" }, - { class: 33, label: "sports ball" }, - { class: 34, label: "kite" }, - { class: 35, label: "baseball bat" }, - { class: 36, label: "baseball glove" }, - { class: 37, label: "skateboard" }, - { class: 38, label: "surfboard" }, - { class: 39, label: "tennis racket" }, - { class: 40, label: "bottle" }, - { class: 41, label: "wine glass" }, - { class: 42, label: "cup" }, - { class: 43, label: "fork" }, - { class: 44, label: "knife" }, - { class: 45, label: "spoon" }, - { class: 46, label: "bowl" }, - { class: 47, label: "banana" }, - { class: 48, label: "apple" }, - { class: 49, label: "sandwich" }, - { class: 50, label: "orange" }, - { class: 51, label: "broccoli" }, - { class: 52, label: "carrot" }, - { class: 53, label: "hot dog" }, - { class: 54, label: "pizza" }, - { class: 55, label: "donut" }, - { class: 56, label: "cake" }, - { class: 57, label: "chair" }, - { class: 58, label: "couch" }, - { class: 59, label: "potted plant" }, - { class: 60, label: "bed" }, - { class: 61, label: "dining table" }, - { class: 62, label: "toilet" }, - { class: 63, label: "tv" }, - { class: 64, label: "laptop" }, - { class: 65, label: "mouse" }, - { class: 66, label: "remote" }, - { class: 67, label: "keyboard" }, - { class: 68, label: "cell phone" }, - { class: 69, label: "microwave" }, - { class: 70, label: "oven" }, - { class: 71, label: "toaster" }, - { class: 72, label: "sink" }, - { class: 73, label: "refrigerator" }, - { class: 74, label: "book" }, - { class: 75, label: "clock" }, - { class: 76, label: "vase" }, - { class: 77, label: "scissors" }, - { class: 78, label: "teddy bear" }, - { class: 79, label: "hair drier" }, - { class: 80, label: "toothbrush" } -]; - -// src/object/centernet.ts -var model3; -var inputSize4 = 0; -var last2 = []; -var lastTime3 = 0; -var skipped3 = Number.MAX_SAFE_INTEGER; -async function load3(config3) { - if (env.initial) - model3 = null; - if (!model3) { - model3 = await loadModel(config3.object.modelPath); - const inputs = (model3 == null ? void 0 : model3["executor"]) ? Object.values(model3.modelSignature["inputs"]) : void 0; - inputSize4 = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : 0; - } else if (config3.debug) - log("cached model:", model3["modelUrl"]); - return model3; -} -async function process3(res, outputShape, config3) { - if (!res) - return []; - const t2 = {}; - const results = []; - const detections = await res.array(); - t2.squeeze = tf11.squeeze(res); - const arr = tf11.split(t2.squeeze, 6, 1); - t2.stack = tf11.stack([arr[1], arr[0], arr[3], arr[2]], 1); - t2.boxes = tf11.squeeze(t2.stack); - t2.scores = tf11.squeeze(arr[4]); - t2.classes = tf11.squeeze(arr[5]); - tf11.dispose([res, ...arr]); - t2.nms = await tf11.image.nonMaxSuppressionAsync(t2.boxes, t2.scores, config3.object.maxDetected, config3.object.iouThreshold, config3.object.minConfidence || 0); - const nms = await t2.nms.data(); - let i = 0; - for (const id of Array.from(nms)) { - const score = Math.trunc(100 * detections[0][id][4]) / 100; - const classVal = detections[0][id][5]; - if (Number.isNaN(classVal)) - continue; - const label = labels[classVal].label; - const [x, y] = [ - detections[0][id][0] / inputSize4, - detections[0][id][1] / inputSize4 - ]; - const boxRaw = [ - x, - y, - detections[0][id][2] / inputSize4 - x, - detections[0][id][3] / inputSize4 - y - ]; - const box = [ - Math.trunc(boxRaw[0] * outputShape[0]), - Math.trunc(boxRaw[1] * outputShape[1]), - Math.trunc(boxRaw[2] * outputShape[0]), - Math.trunc(boxRaw[3] * outputShape[1]) - ]; - results.push({ id: i++, score, class: classVal, label, box, boxRaw }); - } - Object.keys(t2).forEach((tensor6) => tf11.dispose(t2[tensor6])); - return results; -} -async function predict3(input, config3) { - if (!(model3 == null ? void 0 : model3["executor"])) - return []; - const skipTime = (config3.object.skipTime || 0) > now() - lastTime3; - const skipFrame = skipped3 < (config3.object.skipFrames || 0); - if (config3.skipAllowed && skipTime && skipFrame && last2.length > 0) { - skipped3++; - return last2; - } - skipped3 = 0; - return new Promise(async (resolve) => { - const outputSize2 = [input.shape[2] || 0, input.shape[1] || 0]; - const resize = tf11.image.resizeBilinear(input, [inputSize4, inputSize4]); - const objectT = config3.object.enabled ? model3 == null ? void 0 : model3.execute(resize, ["tower_0/detections"]) : null; - lastTime3 = now(); - tf11.dispose(resize); - const obj = await process3(objectT, outputSize2, config3); - last2 = obj; - resolve(obj); - }); -} - -// src/body/efficientpose.ts -var tf12 = __toESM(require_tfjs_esm()); - -// src/body/efficientposecoords.ts -var efficientposecoords_exports = {}; -__export(efficientposecoords_exports, { - connected: () => connected2, - kpt: () => kpt2 -}); -var kpt2 = [ - "head", - "neck", - "rightShoulder", - "rightElbow", - "rightWrist", - "chest", - "leftShoulder", - "leftElbow", - "leftWrist", - "bodyCenter", - "rightHip", - "rightKnee", - "rightAnkle", - "leftHip", - "leftKnee", - "leftAnkle" -]; -var connected2 = { - leftLeg: ["leftHip", "leftKnee", "leftAnkle"], - rightLeg: ["rightHip", "rightKnee", "rightAnkle"], - torso: ["leftShoulder", "rightShoulder", "rightHip", "leftHip", "leftShoulder"], - leftArm: ["leftShoulder", "leftElbow", "leftWrist"], - rightArm: ["rightShoulder", "rightElbow", "rightWrist"], - head: [] -}; - -// src/body/efficientpose.ts -var model4; -var lastTime4 = 0; -var cache2 = { id: 0, keypoints: [], box: [0, 0, 0, 0], boxRaw: [0, 0, 0, 0], score: 0, annotations: {} }; -var skipped4 = Number.MAX_SAFE_INTEGER; -async function load4(config3) { - if (env.initial) - model4 = null; - if (!model4) - model4 = await loadModel(config3.body.modelPath); - else if (config3.debug) - log("cached model:", model4["modelUrl"]); - return model4; -} -async function max2d(inputs, minScore) { - const [width, height] = inputs.shape; - const reshaped = tf12.reshape(inputs, [height * width]); - const max4 = tf12.max(reshaped, 0); - const newScore = (await max4.data())[0]; - if (newScore > minScore) { - const coordinates = tf12.argMax(reshaped, 0); - const mod3 = tf12.mod(coordinates, width); - const x = (await mod3.data())[0]; - const div16 = tf12.div(coordinates, width); - const y = (await div16.data())[0]; - tf12.dispose([reshaped, max4, coordinates, mod3, div16]); - return [x, y, newScore]; - } - tf12.dispose([reshaped, max4]); - return [0, 0, newScore]; -} -async function predict4(image27, config3) { - if (!(model4 == null ? void 0 : model4["executor"])) - return []; - const skipTime = (config3.body.skipTime || 0) > now() - lastTime4; - const skipFrame = skipped4 < (config3.body.skipFrames || 0); - if (config3.skipAllowed && skipTime && skipFrame && Object.keys(cache2.keypoints).length > 0) { - skipped4++; - return [cache2]; - } - skipped4 = 0; - return new Promise(async (resolve) => { - const tensor6 = tf12.tidy(() => { - if (!(model4 == null ? void 0 : model4.inputs[0].shape)) - return null; - const resize = tf12.image.resizeBilinear(image27, [model4.inputs[0].shape[2], model4.inputs[0].shape[1]], false); - const enhance2 = tf12.mul(resize, constants.tf2); - const norm = tf12.sub(enhance2, constants.tf1); - return norm; - }); - let resT; - if (config3.body.enabled) - resT = model4 == null ? void 0 : model4.execute(tensor6); - lastTime4 = now(); - tf12.dispose(tensor6); - if (resT) { - cache2.keypoints.length = 0; - const squeeze14 = tf12.squeeze(resT); - tf12.dispose(resT); - const stack5 = tf12.unstack(squeeze14, 2); - tf12.dispose(squeeze14); - for (let id = 0; id < stack5.length; id++) { - const [x2, y2, partScore] = await max2d(stack5[id], config3.body.minConfidence); - if (partScore > (config3.body.minConfidence || 0)) { - cache2.keypoints.push({ - score: Math.round(100 * partScore) / 100, - part: kpt2[id], - positionRaw: [ - x2 / model4.inputs[0].shape[2], - y2 / model4.inputs[0].shape[1] - ], - position: [ - Math.round(image27.shape[2] * x2 / model4.inputs[0].shape[2]), - Math.round(image27.shape[1] * y2 / model4.inputs[0].shape[1]) - ] - }); - } - } - stack5.forEach((s) => tf12.dispose(s)); - } - cache2.score = cache2.keypoints.reduce((prev, curr) => curr.score > prev ? curr.score : prev, 0); - const x = cache2.keypoints.map((a) => a.position[0]); - const y = cache2.keypoints.map((a) => a.position[1]); - cache2.box = [ - Math.min(...x), - Math.min(...y), - Math.max(...x) - Math.min(...x), - Math.max(...y) - Math.min(...y) - ]; - const xRaw = cache2.keypoints.map((a) => a.positionRaw[0]); - const yRaw = cache2.keypoints.map((a) => a.positionRaw[1]); - cache2.boxRaw = [ - Math.min(...xRaw), - Math.min(...yRaw), - Math.max(...xRaw) - Math.min(...xRaw), - Math.max(...yRaw) - Math.min(...yRaw) - ]; - for (const [name, indexes] of Object.entries(connected2)) { - const pt = []; - for (let i = 0; i < indexes.length - 1; i++) { - const pt0 = cache2.keypoints.find((kpt4) => kpt4.part === indexes[i]); - const pt1 = cache2.keypoints.find((kpt4) => kpt4.part === indexes[i + 1]); - if (pt0 && pt1 && pt0.score > (config3.body.minConfidence || 0) && pt1.score > (config3.body.minConfidence || 0)) - pt.push([pt0.position, pt1.position]); - } - cache2.annotations[name] = pt; - } - resolve([cache2]); - }); -} - -// src/gear/emotion.ts -var tf13 = __toESM(require_tfjs_esm()); -var annotations = ["angry", "disgust", "fear", "happy", "sad", "surprise", "neutral"]; -var model5; -var last3 = []; -var lastCount2 = 0; -var lastTime5 = 0; -var skipped5 = Number.MAX_SAFE_INTEGER; -async function load5(config3) { - var _a; - if (env.initial) - model5 = null; - if (!model5) - model5 = await loadModel((_a = config3.face.emotion) == null ? void 0 : _a.modelPath); - else if (config3.debug) - log("cached model:", model5["modelUrl"]); - return model5; -} -async function predict5(image27, config3, idx, count2) { - var _a, _b; - if (!model5) - return []; - const skipFrame = skipped5 < (((_a = config3.face.emotion) == null ? void 0 : _a.skipFrames) || 0); - const skipTime = (((_b = config3.face.emotion) == null ? void 0 : _b.skipTime) || 0) > now() - lastTime5; - if (config3.skipAllowed && skipTime && skipFrame && lastCount2 === count2 && last3[idx] && last3[idx].length > 0) { - skipped5++; - return last3[idx]; - } - skipped5 = 0; - return new Promise(async (resolve) => { - var _a2; - const obj = []; - if ((_a2 = config3.face.emotion) == null ? void 0 : _a2.enabled) { - const t2 = {}; - const inputSize10 = (model5 == null ? void 0 : model5.inputs[0].shape) ? model5.inputs[0].shape[2] : 0; - t2.resize = tf13.image.resizeBilinear(image27, [inputSize10, inputSize10], false); - t2.channels = tf13.mul(t2.resize, constants.rgb); - t2.grayscale = tf13.sum(t2.channels, 3, true); - t2.grayscaleSub = tf13.sub(t2.grayscale, constants.tf05); - t2.grayscaleMul = tf13.mul(t2.grayscaleSub, constants.tf2); - t2.emotion = model5 == null ? void 0 : model5.execute(t2.grayscaleMul); - lastTime5 = now(); - const data = await t2.emotion.data(); - for (let i = 0; i < data.length; i++) { - if (data[i] > (config3.face.emotion.minConfidence || 0)) - obj.push({ score: Math.min(0.99, Math.trunc(100 * data[i]) / 100), emotion: annotations[i] }); - } - obj.sort((a, b) => b.score - a.score); - Object.keys(t2).forEach((tensor6) => tf13.dispose(t2[tensor6])); - } - last3[idx] = obj; - lastCount2 = count2; - resolve(obj); - }); -} - -// src/face/facemesh.ts -var tf15 = __toESM(require_tfjs_esm()); - -// src/face/iris.ts -var tf14 = __toESM(require_tfjs_esm()); -var model6; -var inputSize5 = 0; -var irisEnlarge = 2.3; -var leftOutline = meshAnnotations.leftEyeLower0; -var rightOutline = meshAnnotations.rightEyeLower0; -var eyeLandmarks = { - leftBounds: [leftOutline[0], leftOutline[leftOutline.length - 1]], - rightBounds: [rightOutline[0], rightOutline[rightOutline.length - 1]] -}; -var irisLandmarks = { - upperCenter: 3, - lowerCenter: 4, - index: 71, - numCoordinates: 76 -}; -async function load6(config3) { - var _a, _b; - if (env.initial) - model6 = null; - if (!model6) - model6 = await loadModel((_a = config3.face.iris) == null ? void 0 : _a.modelPath); - else if (config3.debug) - log("cached model:", model6["modelUrl"]); - inputSize5 = (model6 == null ? void 0 : model6["executor"]) && ((_b = model6.inputs) == null ? void 0 : _b[0].shape) ? model6.inputs[0].shape[2] : 0; - if (inputSize5 === -1) - inputSize5 = 64; - return model6; -} -function replaceIrisCoords(rawCoords, newCoords, prefix, keys) { - for (let i = 0; i < irisIndices.length; i++) { - const { key, indices } = irisIndices[i]; - const originalIndices = meshAnnotations[`${prefix}${key}`]; - if (!keys || keys.includes(key)) { - for (let j = 0; j < indices.length; j++) { - const index2 = indices[j]; - rawCoords[originalIndices[j]] = [ - newCoords[index2][0], - newCoords[index2][1], - (newCoords[index2][2] + rawCoords[originalIndices[j]][2]) / 2 - ]; - } - } - } -} -var getLeftToRightEyeDepthDifference = (rawCoords) => { - const leftEyeZ = rawCoords[eyeLandmarks.leftBounds[0]][2]; - const rightEyeZ = rawCoords[eyeLandmarks.rightBounds[0]][2]; - return leftEyeZ - rightEyeZ; -}; -var getEyeBox = (rawCoords, face4, eyeInnerCornerIndex, eyeOuterCornerIndex, meshSize, flip = false) => { - const box = squarifyBox(enlargeBox(calculateLandmarksBoundingBox([rawCoords[eyeInnerCornerIndex], rawCoords[eyeOuterCornerIndex]]), irisEnlarge)); - const boxSize = getBoxSize(box); - let crop = tf14.image.cropAndResize(face4, [[ - box.startPoint[1] / meshSize, - box.startPoint[0] / meshSize, - box.endPoint[1] / meshSize, - box.endPoint[0] / meshSize - ]], [0], [inputSize5, inputSize5]); - if (flip && env.kernels.includes("flipleftright")) { - const flipped = tf14.image.flipLeftRight(crop); - tf14.dispose(crop); - crop = flipped; - } - return { box, boxSize, crop }; -}; -var getEyeCoords = (eyeData, eyeBox, eyeBoxSize, flip = false) => { - const eyeRawCoords = []; - for (let i = 0; i < irisLandmarks.numCoordinates; i++) { - const x = eyeData[i * 3]; - const y = eyeData[i * 3 + 1]; - const z = eyeData[i * 3 + 2]; - eyeRawCoords.push([ - (flip ? 1 - x / inputSize5 : x / inputSize5) * eyeBoxSize[0] + eyeBox.startPoint[0], - y / inputSize5 * eyeBoxSize[1] + eyeBox.startPoint[1], - z - ]); - } - return { rawCoords: eyeRawCoords, iris: eyeRawCoords.slice(irisLandmarks.index) }; -}; -var getAdjustedIrisCoords = (rawCoords, irisCoords, direction) => { - const upperCenterZ = rawCoords[meshAnnotations[`${direction}EyeUpper0`][irisLandmarks.upperCenter]][2]; - const lowerCenterZ = rawCoords[meshAnnotations[`${direction}EyeLower0`][irisLandmarks.lowerCenter]][2]; - const averageZ = (upperCenterZ + lowerCenterZ) / 2; - return irisCoords.map((coord, i) => { - let z = averageZ; - if (i === 2) { - z = upperCenterZ; - } else if (i === 4) { - z = lowerCenterZ; - } - return [coord[0], coord[1], z]; - }); -}; -async function augmentIris(rawCoords, face4, meshSize) { - if (!(model6 == null ? void 0 : model6["executor"])) - return rawCoords; - const { box: leftEyeBox, boxSize: leftEyeBoxSize, crop: leftEyeCrop } = getEyeBox(rawCoords, face4, eyeLandmarks.leftBounds[0], eyeLandmarks.leftBounds[1], meshSize, true); - const { box: rightEyeBox, boxSize: rightEyeBoxSize, crop: rightEyeCrop } = getEyeBox(rawCoords, face4, eyeLandmarks.rightBounds[0], eyeLandmarks.rightBounds[1], meshSize, true); - const combined = tf14.concat([leftEyeCrop, rightEyeCrop]); - tf14.dispose(leftEyeCrop); - tf14.dispose(rightEyeCrop); - const eyePredictions = model6.execute(combined); - tf14.dispose(combined); - const eyePredictionsData = await eyePredictions.data(); - tf14.dispose(eyePredictions); - const leftEyeData = eyePredictionsData.slice(0, irisLandmarks.numCoordinates * 3); - const { rawCoords: leftEyeRawCoords, iris: leftIrisRawCoords } = getEyeCoords(leftEyeData, leftEyeBox, leftEyeBoxSize, true); - const rightEyeData = eyePredictionsData.slice(irisLandmarks.numCoordinates * 3); - const { rawCoords: rightEyeRawCoords, iris: rightIrisRawCoords } = getEyeCoords(rightEyeData, rightEyeBox, rightEyeBoxSize, false); - const leftToRightEyeDepthDifference = getLeftToRightEyeDepthDifference(rawCoords); - if (Math.abs(leftToRightEyeDepthDifference) < 30) { - replaceIrisCoords(rawCoords, leftEyeRawCoords, "left", null); - replaceIrisCoords(rawCoords, rightEyeRawCoords, "right", null); - } else if (leftToRightEyeDepthDifference < 1) { - replaceIrisCoords(rawCoords, leftEyeRawCoords, "left", ["EyeUpper0", "EyeLower0"]); - } else { - replaceIrisCoords(rawCoords, rightEyeRawCoords, "right", ["EyeUpper0", "EyeLower0"]); - } - const adjustedLeftIrisCoords = getAdjustedIrisCoords(rawCoords, leftIrisRawCoords, "left"); - const adjustedRightIrisCoords = getAdjustedIrisCoords(rawCoords, rightIrisRawCoords, "right"); - const newCoords = rawCoords.concat(adjustedLeftIrisCoords).concat(adjustedRightIrisCoords); - return newCoords; -} - -// src/face/constants.ts -var LIPS_CONNECTIONS = [ - [61, 146], - [146, 91], - [91, 181], - [181, 84], - [84, 17], - [17, 314], - [314, 405], - [405, 321], - [321, 375], - [375, 291], - [61, 185], - [185, 40], - [40, 39], - [39, 37], - [37, 0], - [0, 267], - [267, 269], - [269, 270], - [270, 409], - [409, 291], - [78, 95], - [95, 88], - [88, 178], - [178, 87], - [87, 14], - [14, 317], - [317, 402], - [402, 318], - [318, 324], - [324, 308], - [78, 191], - [191, 80], - [80, 81], - [81, 82], - [82, 13], - [13, 312], - [312, 311], - [311, 310], - [310, 415], - [415, 308] -]; -var LEFT_EYE_CONNECTIONS = [[263, 249], [249, 390], [390, 373], [373, 374], [374, 380], [380, 381], [381, 382], [382, 362], [263, 466], [466, 388], [388, 387], [387, 386], [386, 385], [385, 384], [384, 398], [398, 362]]; -var LEFT_EYEBROW_CONNECTIONS = [[276, 283], [283, 282], [282, 295], [295, 285], [300, 293], [293, 334], [334, 296], [296, 336]]; -var LEFT_IRIS_CONNECTIONS = [[474, 475], [475, 476], [476, 477], [477, 474]]; -var RIGHT_EYE_CONNECTIONS = [[33, 7], [7, 163], [163, 144], [144, 145], [145, 153], [153, 154], [154, 155], [155, 133], [33, 246], [246, 161], [161, 160], [160, 159], [159, 158], [158, 157], [157, 173], [173, 133]]; -var RIGHT_EYEBROW_CONNECTIONS = [[46, 53], [53, 52], [52, 65], [65, 55], [70, 63], [63, 105], [105, 66], [66, 107]]; -var RIGHT_IRIS_CONNECTIONS = [[469, 470], [470, 471], [471, 472], [472, 469]]; -var FACE_OVAL_CONNECTIONS = [ - [10, 338], - [338, 297], - [297, 332], - [332, 284], - [284, 251], - [251, 389], - [389, 356], - [356, 454], - [454, 323], - [323, 361], - [361, 288], - [288, 397], - [397, 365], - [365, 379], - [379, 378], - [378, 400], - [400, 377], - [377, 152], - [152, 148], - [148, 176], - [176, 149], - [149, 150], - [150, 136], - [136, 172], - [172, 58], - [58, 132], - [132, 93], - [93, 234], - [234, 127], - [127, 162], - [162, 21], - [21, 54], - [54, 103], - [103, 67], - [67, 109], - [109, 10] -]; -function connectionsToIndices2(connections) { - const indices = connections.map((connection) => connection[0]); - indices.push(connections[connections.length - 1][1]); - return indices; -} -var MEDIAPIPE_FACE_MESH_KEYPOINTS_BY_CONTOUR = { - lips: connectionsToIndices2(LIPS_CONNECTIONS), - leftEye: connectionsToIndices2(LEFT_EYE_CONNECTIONS), - leftEyebrow: connectionsToIndices2(LEFT_EYEBROW_CONNECTIONS), - leftIris: connectionsToIndices2(LEFT_IRIS_CONNECTIONS), - rightEye: connectionsToIndices2(RIGHT_EYE_CONNECTIONS), - rightEyebrow: connectionsToIndices2(RIGHT_EYEBROW_CONNECTIONS), - rightIris: connectionsToIndices2(RIGHT_IRIS_CONNECTIONS), - faceOval: connectionsToIndices2(FACE_OVAL_CONNECTIONS) -}; -var indexLabelPairs = Object.entries(MEDIAPIPE_FACE_MESH_KEYPOINTS_BY_CONTOUR).map(([label, indices]) => indices.map((index2) => [index2, label])).flat(); -var MEDIAPIPE_FACE_MESH_KEYPOINTS = new Map(indexLabelPairs); -var LANDMARKS_REFINEMENT_LIPS_CONFIG = [ - 61, - 146, - 91, - 181, - 84, - 17, - 314, - 405, - 321, - 375, - 291, - 185, - 40, - 39, - 37, - 0, - 267, - 269, - 270, - 409, - 78, - 95, - 88, - 178, - 87, - 14, - 317, - 402, - 318, - 324, - 308, - 191, - 80, - 81, - 82, - 13, - 312, - 311, - 310, - 415, - 76, - 77, - 90, - 180, - 85, - 16, - 315, - 404, - 320, - 307, - 306, - 184, - 74, - 73, - 72, - 11, - 302, - 303, - 304, - 408, - 62, - 96, - 89, - 179, - 86, - 15, - 316, - 403, - 319, - 325, - 292, - 183, - 42, - 41, - 38, - 12, - 268, - 271, - 272, - 407 -]; -var LANDMARKS_REFINEMENT_LEFT_EYE_CONFIG = [ - 33, - 7, - 163, - 144, - 145, - 153, - 154, - 155, - 133, - 246, - 161, - 160, - 159, - 158, - 157, - 173, - 130, - 25, - 110, - 24, - 23, - 22, - 26, - 112, - 243, - 247, - 30, - 29, - 27, - 28, - 56, - 190, - 226, - 31, - 228, - 229, - 230, - 231, - 232, - 233, - 244, - 113, - 225, - 224, - 223, - 222, - 221, - 189, - 35, - 124, - 46, - 53, - 52, - 65, - 143, - 111, - 117, - 118, - 119, - 120, - 121, - 128, - 245, - 156, - 70, - 63, - 105, - 66, - 107, - 55, - 193 -]; -var LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG = [ - 263, - 249, - 390, - 373, - 374, - 380, - 381, - 382, - 362, - 466, - 388, - 387, - 386, - 385, - 384, - 398, - 359, - 255, - 339, - 254, - 253, - 252, - 256, - 341, - 463, - 467, - 260, - 259, - 257, - 258, - 286, - 414, - 446, - 261, - 448, - 449, - 450, - 451, - 452, - 453, - 464, - 342, - 445, - 444, - 443, - 442, - 441, - 413, - 265, - 353, - 276, - 283, - 282, - 295, - 372, - 340, - 346, - 347, - 348, - 349, - 350, - 357, - 465, - 383, - 300, - 293, - 334, - 296, - 336, - 285, - 417 -]; - -// src/face/attention.ts -async function augment(rawCoords, results) { - var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j; - const t2 = { - lips: await ((_b = (_a = results.filter((r) => r.size === 160)) == null ? void 0 : _a[0]) == null ? void 0 : _b.data()), - irisL: await ((_d = (_c = results.filter((r) => r.size === 10)) == null ? void 0 : _c[0]) == null ? void 0 : _d.data()), - eyeL: await ((_f = (_e = results.filter((r) => r.size === 142)) == null ? void 0 : _e[0]) == null ? void 0 : _f.data()), - irisR: await ((_h = (_g = results.filter((r) => r.size === 10)) == null ? void 0 : _g[1]) == null ? void 0 : _h.data()), - eyeR: await ((_j = (_i = results.filter((r) => r.size === 142)) == null ? void 0 : _i[1]) == null ? void 0 : _j.data()) - }; - for (const val of Object.values(t2)) { - if (!val) - return rawCoords; - } - const irisLDepth = LANDMARKS_REFINEMENT_LEFT_EYE_CONFIG.reduce((prev, curr) => prev += rawCoords[curr][2], 0) / LANDMARKS_REFINEMENT_LEFT_EYE_CONFIG.length; - for (let i = 0; i < t2.irisL.length / 2; i++) - rawCoords.push([t2.irisL[2 * i + 0], t2.irisL[2 * i + 1], irisLDepth]); - const irisRDepth = LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG.reduce((prev, curr) => prev += rawCoords[curr][2], 0) / LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG.length; - for (let i = 0; i < t2.irisR.length / 2; i++) - rawCoords.push([t2.irisR[2 * i + 0], t2.irisR[2 * i + 1], irisRDepth]); - for (let i = 0; i < t2.eyeL.length / 2; i++) - rawCoords[LANDMARKS_REFINEMENT_LEFT_EYE_CONFIG[i]] = [t2.eyeL[2 * i + 0], t2.eyeL[2 * i + 1], rawCoords[LANDMARKS_REFINEMENT_LEFT_EYE_CONFIG[i]][2]]; - for (let i = 0; i < t2.eyeR.length / 2; i++) - rawCoords[LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG[i]] = [t2.eyeR[2 * i + 0], t2.eyeR[2 * i + 1], rawCoords[LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG[i]][2]]; - for (let i = 0; i < t2.lips.length / 2; i++) - rawCoords[LANDMARKS_REFINEMENT_LIPS_CONFIG[i]] = [t2.lips[2 * i + 0], t2.lips[2 * i + 1], rawCoords[LANDMARKS_REFINEMENT_LIPS_CONFIG[i]][2]]; - return rawCoords; -} - -// src/face/facemesh.ts -var cache3 = { - boxes: [], - skipped: Number.MAX_SAFE_INTEGER, - timestamp: 0 -}; -var model7 = null; -var inputSize6 = 0; -async function predict6(input, config3) { - var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j; - if (!(model7 == null ? void 0 : model7["executor"])) - return []; - const skipTime = (((_a = config3.face.detector) == null ? void 0 : _a.skipTime) || 0) > now() - cache3.timestamp; - const skipFrame = cache3.skipped < (((_b = config3.face.detector) == null ? void 0 : _b.skipFrames) || 0); - if (!config3.skipAllowed || !skipTime || !skipFrame || cache3.boxes.length === 0) { - cache3.boxes = await getBoxes(input, config3); - cache3.timestamp = now(); - cache3.skipped = 0; - } else { - cache3.skipped++; - } - const faces = []; - const newCache = []; - let id = 0; - const size2 = inputSize6; - for (let i = 0; i < cache3.boxes.length; i++) { - const box = cache3.boxes[i]; - let angle = 0; - let rotationMatrix; - const face4 = { - id: id++, - mesh: [], - meshRaw: [], - box: [0, 0, 0, 0], - boxRaw: [0, 0, 0, 0], - score: 0, - boxScore: 0, - faceScore: 0, - annotations: {} - }; - [angle, rotationMatrix, face4.tensor] = correctFaceRotation((_c = config3.face.detector) == null ? void 0 : _c.rotation, box, input, ((_d = config3.face.mesh) == null ? void 0 : _d.enabled) ? inputSize6 : size()); - if (config3.filter.equalization) { - const equilized = face4.tensor ? await histogramEqualization(face4.tensor) : void 0; - tf15.dispose(face4.tensor); - if (equilized) - face4.tensor = equilized; - } - face4.boxScore = Math.round(100 * box.confidence) / 100; - if (!((_e = config3.face.mesh) == null ? void 0 : _e.enabled)) { - face4.box = clampBox(box, input); - face4.boxRaw = getRawBox(box, input); - face4.score = face4.boxScore; - face4.mesh = box.landmarks.map((pt) => [ - (box.startPoint[0] + box.endPoint[0]) / 2 + (box.endPoint[0] + box.startPoint[0]) * pt[0] / size(), - (box.startPoint[1] + box.endPoint[1]) / 2 + (box.endPoint[1] + box.startPoint[1]) * pt[1] / size() - ]); - face4.meshRaw = face4.mesh.map((pt) => [pt[0] / (input.shape[2] || 0), pt[1] / (input.shape[1] || 0), (pt[2] || 0) / size2]); - for (const key of Object.keys(blazeFaceLandmarks)) { - face4.annotations[key] = [face4.mesh[blazeFaceLandmarks[key]]]; - } - } else if (!model7) { - if (config3.debug) - log("face mesh detection requested, but model is not loaded"); - } else { - if (((_f = config3.face.attention) == null ? void 0 : _f.enabled) && !env.kernels.includes("atan2")) { - config3.face.attention.enabled = false; - tf15.dispose(face4.tensor); - return faces; - } - const results = model7.execute(face4.tensor); - const confidenceT = results.find((t2) => t2.shape[t2.shape.length - 1] === 1); - const faceConfidence = await confidenceT.data(); - face4.faceScore = Math.round(100 * faceConfidence[0]) / 100; - if (face4.faceScore < (((_g = config3.face.detector) == null ? void 0 : _g.minConfidence) || 1)) { - box.confidence = face4.faceScore; - if (config3.face.mesh.keepInvalid) { - face4.box = clampBox(box, input); - face4.boxRaw = getRawBox(box, input); - face4.score = face4.boxScore; - face4.mesh = box.landmarks.map((pt) => [ - (box.startPoint[0] + box.endPoint[0]) / 2 + (box.endPoint[0] + box.startPoint[0]) * pt[0] / size(), - (box.startPoint[1] + box.endPoint[1]) / 2 + (box.endPoint[1] + box.startPoint[1]) * pt[1] / size() - ]); - face4.meshRaw = face4.mesh.map((pt) => [pt[0] / (input.shape[2] || 1), pt[1] / (input.shape[1] || 1), (pt[2] || 0) / size2]); - for (const key of Object.keys(blazeFaceLandmarks)) { - face4.annotations[key] = [face4.mesh[blazeFaceLandmarks[key]]]; - } - } - } else { - const meshT = results.find((t2) => t2.shape[t2.shape.length - 1] === 1404); - const coordsReshaped = tf15.reshape(meshT, [-1, 3]); - let rawCoords = await coordsReshaped.array(); - tf15.dispose(coordsReshaped); - if ((_h = config3.face.attention) == null ? void 0 : _h.enabled) { - rawCoords = await augment(rawCoords, results); - } else if ((_i = config3.face.iris) == null ? void 0 : _i.enabled) { - rawCoords = await augmentIris(rawCoords, face4.tensor, inputSize6); - } - face4.mesh = transformRawCoords(rawCoords, box, angle, rotationMatrix, inputSize6); - face4.meshRaw = face4.mesh.map((pt) => [pt[0] / (input.shape[2] || 0), pt[1] / (input.shape[1] || 0), (pt[2] || 0) / size2]); - for (const key of Object.keys(meshAnnotations)) - face4.annotations[key] = meshAnnotations[key].map((index2) => face4.mesh[index2]); - face4.score = face4.faceScore; - const calculatedBox = { ...calculateFaceBox(face4.mesh, box), confidence: box.confidence, landmarks: box.landmarks }; - face4.box = clampBox(calculatedBox, input); - face4.boxRaw = getRawBox(calculatedBox, input); - newCache.push(calculatedBox); - } - tf15.dispose(results); - } - if (face4.score > (((_j = config3.face.detector) == null ? void 0 : _j.minConfidence) || 1)) - faces.push(face4); - else - tf15.dispose(face4.tensor); - } - cache3.boxes = newCache; - return faces; -} -async function load7(config3) { - var _a, _b, _c, _d, _e, _f; - if (env.initial) - model7 = null; - if (((_a = config3.face.attention) == null ? void 0 : _a.enabled) && (model7 == null ? void 0 : model7["signature"])) { - if (Object.keys(((_b = model7 == null ? void 0 : model7["signature"]) == null ? void 0 : _b.outputs) || {}).length < 6) - model7 = null; - } - if (!model7) { - if ((_c = config3.face.attention) == null ? void 0 : _c.enabled) - model7 = await loadModel(config3.face.attention.modelPath); - else - model7 = await loadModel((_d = config3.face.mesh) == null ? void 0 : _d.modelPath); - } else if (config3.debug) { - log("cached model:", model7["modelUrl"]); - } - inputSize6 = model7["executor"] && ((_e = model7 == null ? void 0 : model7.inputs) == null ? void 0 : _e[0].shape) ? (_f = model7 == null ? void 0 : model7.inputs) == null ? void 0 : _f[0].shape[2] : 256; - return model7; -} -var triangulation = TRI468; -var uvmap = UV468; - -// src/face/faceres.ts -var tf16 = __toESM(require_tfjs_esm()); -var model8; -var last4 = []; -var lastTime6 = 0; -var lastCount3 = 0; -var skipped6 = Number.MAX_SAFE_INTEGER; -async function load8(config3) { - var _a; - if (env.initial) - model8 = null; - if (!model8) - model8 = await loadModel((_a = config3.face.description) == null ? void 0 : _a.modelPath); - else if (config3.debug) - log("cached model:", model8["modelUrl"]); - return model8; -} -function enhance(input) { - const tensor6 = input.image || input.tensor || input; - if (!(model8 == null ? void 0 : model8.inputs[0].shape)) - return tensor6; - const crop = tf16.image.resizeBilinear(tensor6, [model8.inputs[0].shape[2], model8.inputs[0].shape[1]], false); - const norm = tf16.mul(crop, constants.tf255); - tf16.dispose(crop); - return norm; -} -async function predict7(image27, config3, idx, count2) { - var _a, _b, _c, _d; - const obj = { - age: 0, - gender: "unknown", - genderScore: 0, - descriptor: [] - }; - if (!(model8 == null ? void 0 : model8["executor"])) - return obj; - const skipFrame = skipped6 < (((_a = config3.face.description) == null ? void 0 : _a.skipFrames) || 0); - const skipTime = (((_b = config3.face.description) == null ? void 0 : _b.skipTime) || 0) > now() - lastTime6; - if (config3.skipAllowed && skipFrame && skipTime && lastCount3 === count2 && ((_c = last4 == null ? void 0 : last4[idx]) == null ? void 0 : _c.age) > 0 && ((_d = last4 == null ? void 0 : last4[idx]) == null ? void 0 : _d.genderScore) > 0) { - skipped6++; - return last4[idx]; - } - skipped6 = 0; - return new Promise(async (resolve) => { - var _a2; - if ((_a2 = config3.face.description) == null ? void 0 : _a2.enabled) { - const enhanced = enhance(image27); - const resT = model8 == null ? void 0 : model8.execute(enhanced); - lastTime6 = now(); - tf16.dispose(enhanced); - const genderT = resT.find((t2) => t2.shape[1] === 1); - const gender2 = await genderT.data(); - const confidence = Math.trunc(200 * Math.abs(gender2[0] - 0.5)) / 100; - if (confidence > (config3.face.description.minConfidence || 0)) { - obj.gender = gender2[0] <= 0.5 ? "female" : "male"; - obj.genderScore = Math.min(0.99, confidence); - } - const argmax = tf16.argMax(resT.find((t2) => t2.shape[1] === 100), 1); - const ageIdx = (await argmax.data())[0]; - tf16.dispose(argmax); - const ageT = resT.find((t2) => t2.shape[1] === 100); - const all2 = await ageT.data(); - obj.age = Math.round(all2[ageIdx - 1] > all2[ageIdx + 1] ? 10 * ageIdx - 100 * all2[ageIdx - 1] : 10 * ageIdx + 100 * all2[ageIdx + 1]) / 10; - if (Number.isNaN(gender2[0]) || Number.isNaN(all2[0])) - log("faceres error:", { model: model8, result: resT }); - const desc = resT.find((t2) => t2.shape[1] === 1024); - const descriptor = desc ? await desc.data() : []; - obj.descriptor = Array.from(descriptor); - resT.forEach((t2) => tf16.dispose(t2)); - } - last4[idx] = obj; - lastCount3 = count2; - resolve(obj); - }); -} - -// src/gear/gear.ts -var tf17 = __toESM(require_tfjs_esm()); -var model9; -var last5 = []; -var raceNames = ["white", "black", "asian", "indian", "other"]; -var ageWeights = [15, 23, 28, 35.5, 45.5, 55.5, 65]; -var lastCount4 = 0; -var lastTime7 = 0; -var skipped7 = Number.MAX_SAFE_INTEGER; -async function load9(config3) { - var _a; - if (env.initial) - model9 = null; - if (!model9) - model9 = await loadModel((_a = config3.face.gear) == null ? void 0 : _a.modelPath); - else if (config3.debug) - log("cached model:", model9["modelUrl"]); - return model9; -} -async function predict8(image27, config3, idx, count2) { - var _a, _b; - if (!model9) - return { age: 0, gender: "unknown", genderScore: 0, race: [] }; - const skipFrame = skipped7 < (((_a = config3.face.gear) == null ? void 0 : _a.skipFrames) || 0); - const skipTime = (((_b = config3.face.gear) == null ? void 0 : _b.skipTime) || 0) > now() - lastTime7; - if (config3.skipAllowed && skipTime && skipFrame && lastCount4 === count2 && last5[idx]) { - skipped7++; - return last5[idx]; - } - skipped7 = 0; - return new Promise(async (resolve) => { - var _a2, _b2; - if (!(model9 == null ? void 0 : model9.inputs[0].shape)) - return; - const t2 = {}; - const box = [[0, 0.1, 0.9, 0.9]]; - t2.resize = tf17.image.cropAndResize(image27, box, [0], [model9.inputs[0].shape[2], model9.inputs[0].shape[1]]); - const obj = { age: 0, gender: "unknown", genderScore: 0, race: [] }; - if ((_a2 = config3.face.gear) == null ? void 0 : _a2.enabled) - [t2.age, t2.gender, t2.race] = model9.execute(t2.resize, ["age_output", "gender_output", "race_output"]); - const gender2 = await t2.gender.data(); - obj.gender = gender2[0] > gender2[1] ? "male" : "female"; - obj.genderScore = Math.round(100 * (gender2[0] > gender2[1] ? gender2[0] : gender2[1])) / 100; - const race = await t2.race.data(); - for (let i = 0; i < race.length; i++) { - if (race[i] > (((_b2 = config3.face.gear) == null ? void 0 : _b2.minConfidence) || 0.2)) - obj.race.push({ score: Math.round(100 * race[i]) / 100, race: raceNames[i] }); - } - obj.race.sort((a, b) => b.score - a.score); - const ageDistribution = Array.from(await t2.age.data()); - const ageSorted = ageDistribution.map((a, i) => [ageWeights[i], a]).sort((a, b) => b[1] - a[1]); - let age2 = ageSorted[0][0]; - for (let i = 1; i < ageSorted.length; i++) - age2 += ageSorted[i][1] * (ageSorted[i][0] - age2); - obj.age = Math.round(10 * age2) / 10; - Object.keys(t2).forEach((tensor6) => tf17.dispose(t2[tensor6])); - last5[idx] = obj; - lastCount4 = count2; - lastTime7 = now(); - resolve(obj); - }); -} - -// src/hand/handposedetector.ts -var tf19 = __toESM(require_tfjs_esm()); - -// src/hand/handposeutil.ts -var tf18 = __toESM(require_tfjs_esm()); -function getBoxSize2(box) { - return [ - Math.abs(box.endPoint[0] - box.startPoint[0]), - Math.abs(box.endPoint[1] - box.startPoint[1]) - ]; -} -function getBoxCenter2(box) { - return [ - box.startPoint[0] + (box.endPoint[0] - box.startPoint[0]) / 2, - box.startPoint[1] + (box.endPoint[1] - box.startPoint[1]) / 2 - ]; -} -function cutBoxFromImageAndResize(box, image27, cropSize) { - const h = image27.shape[1]; - const w = image27.shape[2]; - const boxes = [[ - box.startPoint[1] / h, - box.startPoint[0] / w, - box.endPoint[1] / h, - box.endPoint[0] / w - ]]; - return tf18.image.cropAndResize(image27, boxes, [0], cropSize); -} -function scaleBoxCoordinates2(box, factor) { - const startPoint = [box.startPoint[0] * factor[0], box.startPoint[1] * factor[1]]; - const endPoint = [box.endPoint[0] * factor[0], box.endPoint[1] * factor[1]]; - const palmLandmarks = box.palmLandmarks.map((coord) => { - const scaledCoord = [coord[0] * factor[0], coord[1] * factor[1]]; - return scaledCoord; - }); - return { startPoint, endPoint, palmLandmarks, confidence: box.confidence }; -} -function enlargeBox2(box, factor = 1.5) { - const center = getBoxCenter2(box); - const size2 = getBoxSize2(box); - const newHalfSize = [factor * size2[0] / 2, factor * size2[1] / 2]; - const startPoint = [center[0] - newHalfSize[0], center[1] - newHalfSize[1]]; - const endPoint = [center[0] + newHalfSize[0], center[1] + newHalfSize[1]]; - return { startPoint, endPoint, palmLandmarks: box.palmLandmarks }; -} -function squarifyBox2(box) { - const centers = getBoxCenter2(box); - const size2 = getBoxSize2(box); - const maxEdge = Math.max(...size2); - const halfSize = maxEdge / 2; - const startPoint = [centers[0] - halfSize, centers[1] - halfSize]; - const endPoint = [centers[0] + halfSize, centers[1] + halfSize]; - return { startPoint, endPoint, palmLandmarks: box.palmLandmarks }; -} -function normalizeRadians2(angle) { - return angle - 2 * Math.PI * Math.floor((angle + Math.PI) / (2 * Math.PI)); -} -function computeRotation2(point1, point2) { - const radians = Math.PI / 2 - Math.atan2(-(point2[1] - point1[1]), point2[0] - point1[0]); - return normalizeRadians2(radians); -} -var buildTranslationMatrix2 = (x, y) => [[1, 0, x], [0, 1, y], [0, 0, 1]]; -function dot2(v1, v2) { - let product = 0; - for (let i = 0; i < v1.length; i++) { - product += v1[i] * v2[i]; - } - return product; -} -function getColumnFrom2DArr2(arr, columnIndex) { - const column = []; - for (let i = 0; i < arr.length; i++) { - column.push(arr[i][columnIndex]); - } - return column; -} -function multiplyTransformMatrices2(mat1, mat2) { - const product = []; - const size2 = mat1.length; - for (let row = 0; row < size2; row++) { - product.push([]); - for (let col = 0; col < size2; col++) { - product[row].push(dot2(mat1[row], getColumnFrom2DArr2(mat2, col))); - } - } - return product; -} -function buildRotationMatrix2(rotation, center) { - const cosA = Math.cos(rotation); - const sinA = Math.sin(rotation); - const rotationMatrix = [[cosA, -sinA, 0], [sinA, cosA, 0], [0, 0, 1]]; - const translationMatrix = buildTranslationMatrix2(center[0], center[1]); - const translationTimesRotation = multiplyTransformMatrices2(translationMatrix, rotationMatrix); - const negativeTranslationMatrix = buildTranslationMatrix2(-center[0], -center[1]); - return multiplyTransformMatrices2(translationTimesRotation, negativeTranslationMatrix); -} -function invertTransformMatrix2(matrix) { - const rotationComponent = [[matrix[0][0], matrix[1][0]], [matrix[0][1], matrix[1][1]]]; - const translationComponent = [matrix[0][2], matrix[1][2]]; - const invertedTranslation = [ - -dot2(rotationComponent[0], translationComponent), - -dot2(rotationComponent[1], translationComponent) - ]; - return [ - rotationComponent[0].concat(invertedTranslation[0]), - rotationComponent[1].concat(invertedTranslation[1]), - [0, 0, 1] - ]; -} -function rotatePoint2(homogeneousCoordinate, rotationMatrix) { - return [ - dot2(homogeneousCoordinate, rotationMatrix[0]), - dot2(homogeneousCoordinate, rotationMatrix[1]) - ]; -} - -// src/hand/handposeanchors.ts -var anchors2 = [ - { x: 0.015625, y: 0.015625 }, - { x: 0.015625, y: 0.015625 }, - { x: 0.046875, y: 0.015625 }, - { x: 0.046875, y: 0.015625 }, - { x: 0.078125, y: 0.015625 }, - { x: 0.078125, y: 0.015625 }, - { x: 0.109375, y: 0.015625 }, - { x: 0.109375, y: 0.015625 }, - { x: 0.140625, y: 0.015625 }, - { x: 0.140625, y: 0.015625 }, - { x: 0.171875, y: 0.015625 }, - { x: 0.171875, y: 0.015625 }, - { x: 0.203125, y: 0.015625 }, - { x: 0.203125, y: 0.015625 }, - { x: 0.234375, y: 0.015625 }, - { x: 0.234375, y: 0.015625 }, - { x: 0.265625, y: 0.015625 }, - { x: 0.265625, y: 0.015625 }, - { x: 0.296875, y: 0.015625 }, - { x: 0.296875, y: 0.015625 }, - { x: 0.328125, y: 0.015625 }, - { x: 0.328125, y: 0.015625 }, - { x: 0.359375, y: 0.015625 }, - { x: 0.359375, y: 0.015625 }, - { x: 0.390625, y: 0.015625 }, - { x: 0.390625, y: 0.015625 }, - { x: 0.421875, y: 0.015625 }, - { x: 0.421875, y: 0.015625 }, - { x: 0.453125, y: 0.015625 }, - { x: 0.453125, y: 0.015625 }, - { x: 0.484375, y: 0.015625 }, - { x: 0.484375, y: 0.015625 }, - { x: 0.515625, y: 0.015625 }, - { x: 0.515625, y: 0.015625 }, - { x: 0.546875, y: 0.015625 }, - { x: 0.546875, y: 0.015625 }, - { x: 0.578125, y: 0.015625 }, - { x: 0.578125, y: 0.015625 }, - { x: 0.609375, y: 0.015625 }, - { x: 0.609375, y: 0.015625 }, - { x: 0.640625, y: 0.015625 }, - { x: 0.640625, y: 0.015625 }, - { x: 0.671875, y: 0.015625 }, - { x: 0.671875, y: 0.015625 }, - { x: 0.703125, y: 0.015625 }, - { x: 0.703125, y: 0.015625 }, - { x: 0.734375, y: 0.015625 }, - { x: 0.734375, y: 0.015625 }, - { x: 0.765625, y: 0.015625 }, - { x: 0.765625, y: 0.015625 }, - { x: 0.796875, y: 0.015625 }, - { x: 0.796875, y: 0.015625 }, - { x: 0.828125, y: 0.015625 }, - { x: 0.828125, y: 0.015625 }, - { x: 0.859375, y: 0.015625 }, - { x: 0.859375, y: 0.015625 }, - { x: 0.890625, y: 0.015625 }, - { x: 0.890625, y: 0.015625 }, - { x: 0.921875, y: 0.015625 }, - { x: 0.921875, y: 0.015625 }, - { x: 0.953125, y: 0.015625 }, - { x: 0.953125, y: 0.015625 }, - { x: 0.984375, y: 0.015625 }, - { x: 0.984375, y: 0.015625 }, - { x: 0.015625, y: 0.046875 }, - { x: 0.015625, y: 0.046875 }, - { x: 0.046875, y: 0.046875 }, - { x: 0.046875, y: 0.046875 }, - { x: 0.078125, y: 0.046875 }, - { x: 0.078125, y: 0.046875 }, - { x: 0.109375, y: 0.046875 }, - { x: 0.109375, y: 0.046875 }, - { x: 0.140625, y: 0.046875 }, - { x: 0.140625, y: 0.046875 }, - { x: 0.171875, y: 0.046875 }, - { x: 0.171875, y: 0.046875 }, - { x: 0.203125, y: 0.046875 }, - { x: 0.203125, y: 0.046875 }, - { x: 0.234375, y: 0.046875 }, - { x: 0.234375, y: 0.046875 }, - { x: 0.265625, y: 0.046875 }, - { x: 0.265625, y: 0.046875 }, - { x: 0.296875, y: 0.046875 }, - { x: 0.296875, y: 0.046875 }, - { x: 0.328125, y: 0.046875 }, - { x: 0.328125, y: 0.046875 }, - { x: 0.359375, y: 0.046875 }, - { x: 0.359375, y: 0.046875 }, - { x: 0.390625, y: 0.046875 }, - { x: 0.390625, y: 0.046875 }, - { x: 0.421875, y: 0.046875 }, - { x: 0.421875, y: 0.046875 }, - { x: 0.453125, y: 0.046875 }, - { x: 0.453125, y: 0.046875 }, - { x: 0.484375, y: 0.046875 }, - { x: 0.484375, y: 0.046875 }, - { x: 0.515625, y: 0.046875 }, - { x: 0.515625, y: 0.046875 }, - { x: 0.546875, y: 0.046875 }, - { x: 0.546875, y: 0.046875 }, - { x: 0.578125, y: 0.046875 }, - { x: 0.578125, y: 0.046875 }, - { x: 0.609375, y: 0.046875 }, - { x: 0.609375, y: 0.046875 }, - { x: 0.640625, y: 0.046875 }, - { x: 0.640625, y: 0.046875 }, - { x: 0.671875, y: 0.046875 }, - { x: 0.671875, y: 0.046875 }, - { x: 0.703125, y: 0.046875 }, - { x: 0.703125, y: 0.046875 }, - { x: 0.734375, y: 0.046875 }, - { x: 0.734375, y: 0.046875 }, - { x: 0.765625, y: 0.046875 }, - { x: 0.765625, y: 0.046875 }, - { x: 0.796875, y: 0.046875 }, - { x: 0.796875, y: 0.046875 }, - { x: 0.828125, y: 0.046875 }, - { x: 0.828125, y: 0.046875 }, - { x: 0.859375, y: 0.046875 }, - { x: 0.859375, y: 0.046875 }, - { x: 0.890625, y: 0.046875 }, - { x: 0.890625, y: 0.046875 }, - { x: 0.921875, y: 0.046875 }, - { x: 0.921875, y: 0.046875 }, - { x: 0.953125, y: 0.046875 }, - { x: 0.953125, y: 0.046875 }, - { x: 0.984375, y: 0.046875 }, - { x: 0.984375, y: 0.046875 }, - { x: 0.015625, y: 0.078125 }, - { x: 0.015625, y: 0.078125 }, - { x: 0.046875, y: 0.078125 }, - { x: 0.046875, y: 0.078125 }, - { x: 0.078125, y: 0.078125 }, - { x: 0.078125, y: 0.078125 }, - { x: 0.109375, y: 0.078125 }, - { x: 0.109375, y: 0.078125 }, - { x: 0.140625, y: 0.078125 }, - { x: 0.140625, y: 0.078125 }, - { x: 0.171875, y: 0.078125 }, - { x: 0.171875, y: 0.078125 }, - { x: 0.203125, y: 0.078125 }, - { x: 0.203125, y: 0.078125 }, - { x: 0.234375, y: 0.078125 }, - { x: 0.234375, y: 0.078125 }, - { x: 0.265625, y: 0.078125 }, - { x: 0.265625, y: 0.078125 }, - { x: 0.296875, y: 0.078125 }, - { x: 0.296875, y: 0.078125 }, - { x: 0.328125, y: 0.078125 }, - { x: 0.328125, y: 0.078125 }, - { x: 0.359375, y: 0.078125 }, - { x: 0.359375, y: 0.078125 }, - { x: 0.390625, y: 0.078125 }, - { x: 0.390625, y: 0.078125 }, - { x: 0.421875, y: 0.078125 }, - { x: 0.421875, y: 0.078125 }, - { x: 0.453125, y: 0.078125 }, - { x: 0.453125, y: 0.078125 }, - { x: 0.484375, y: 0.078125 }, - { x: 0.484375, y: 0.078125 }, - { x: 0.515625, y: 0.078125 }, - { x: 0.515625, y: 0.078125 }, - { x: 0.546875, y: 0.078125 }, - { x: 0.546875, y: 0.078125 }, - { x: 0.578125, y: 0.078125 }, - { x: 0.578125, y: 0.078125 }, - { x: 0.609375, y: 0.078125 }, - { x: 0.609375, y: 0.078125 }, - { x: 0.640625, y: 0.078125 }, - { x: 0.640625, y: 0.078125 }, - { x: 0.671875, y: 0.078125 }, - { x: 0.671875, y: 0.078125 }, - { x: 0.703125, y: 0.078125 }, - { x: 0.703125, y: 0.078125 }, - { x: 0.734375, y: 0.078125 }, - { x: 0.734375, y: 0.078125 }, - { x: 0.765625, y: 0.078125 }, - { x: 0.765625, y: 0.078125 }, - { x: 0.796875, y: 0.078125 }, - { x: 0.796875, y: 0.078125 }, - { x: 0.828125, y: 0.078125 }, - { x: 0.828125, y: 0.078125 }, - { x: 0.859375, y: 0.078125 }, - { x: 0.859375, y: 0.078125 }, - { x: 0.890625, y: 0.078125 }, - { x: 0.890625, y: 0.078125 }, - { x: 0.921875, y: 0.078125 }, - { x: 0.921875, y: 0.078125 }, - { x: 0.953125, y: 0.078125 }, - { x: 0.953125, y: 0.078125 }, - { x: 0.984375, y: 0.078125 }, - { x: 0.984375, y: 0.078125 }, - { x: 0.015625, y: 0.109375 }, - { x: 0.015625, y: 0.109375 }, - { x: 0.046875, y: 0.109375 }, - { x: 0.046875, y: 0.109375 }, - { x: 0.078125, y: 0.109375 }, - { x: 0.078125, y: 0.109375 }, - { x: 0.109375, y: 0.109375 }, - { x: 0.109375, y: 0.109375 }, - { x: 0.140625, y: 0.109375 }, - { x: 0.140625, y: 0.109375 }, - { x: 0.171875, y: 0.109375 }, - { x: 0.171875, y: 0.109375 }, - { x: 0.203125, y: 0.109375 }, - { x: 0.203125, y: 0.109375 }, - { x: 0.234375, y: 0.109375 }, - { x: 0.234375, y: 0.109375 }, - { x: 0.265625, y: 0.109375 }, - { x: 0.265625, y: 0.109375 }, - { x: 0.296875, y: 0.109375 }, - { x: 0.296875, y: 0.109375 }, - { x: 0.328125, y: 0.109375 }, - { x: 0.328125, y: 0.109375 }, - { x: 0.359375, y: 0.109375 }, - { x: 0.359375, y: 0.109375 }, - { x: 0.390625, y: 0.109375 }, - { x: 0.390625, y: 0.109375 }, - { x: 0.421875, y: 0.109375 }, - { x: 0.421875, y: 0.109375 }, - { x: 0.453125, y: 0.109375 }, - { x: 0.453125, y: 0.109375 }, - { x: 0.484375, y: 0.109375 }, - { x: 0.484375, y: 0.109375 }, - { x: 0.515625, y: 0.109375 }, - { x: 0.515625, y: 0.109375 }, - { x: 0.546875, y: 0.109375 }, - { x: 0.546875, y: 0.109375 }, - { x: 0.578125, y: 0.109375 }, - { x: 0.578125, y: 0.109375 }, - { x: 0.609375, y: 0.109375 }, - { x: 0.609375, y: 0.109375 }, - { x: 0.640625, y: 0.109375 }, - { x: 0.640625, y: 0.109375 }, - { x: 0.671875, y: 0.109375 }, - { x: 0.671875, y: 0.109375 }, - { x: 0.703125, y: 0.109375 }, - { x: 0.703125, y: 0.109375 }, - { x: 0.734375, y: 0.109375 }, - { x: 0.734375, y: 0.109375 }, - { x: 0.765625, y: 0.109375 }, - { x: 0.765625, y: 0.109375 }, - { x: 0.796875, y: 0.109375 }, - { x: 0.796875, y: 0.109375 }, - { x: 0.828125, y: 0.109375 }, - { x: 0.828125, y: 0.109375 }, - { x: 0.859375, y: 0.109375 }, - { x: 0.859375, y: 0.109375 }, - { x: 0.890625, y: 0.109375 }, - { x: 0.890625, y: 0.109375 }, - { x: 0.921875, y: 0.109375 }, - { x: 0.921875, y: 0.109375 }, - { x: 0.953125, y: 0.109375 }, - { x: 0.953125, y: 0.109375 }, - { x: 0.984375, y: 0.109375 }, - { x: 0.984375, y: 0.109375 }, - { x: 0.015625, y: 0.140625 }, - { x: 0.015625, y: 0.140625 }, - { x: 0.046875, y: 0.140625 }, - { x: 0.046875, y: 0.140625 }, - { x: 0.078125, y: 0.140625 }, - { x: 0.078125, y: 0.140625 }, - { x: 0.109375, y: 0.140625 }, - { x: 0.109375, y: 0.140625 }, - { x: 0.140625, y: 0.140625 }, - { x: 0.140625, y: 0.140625 }, - { x: 0.171875, y: 0.140625 }, - { x: 0.171875, y: 0.140625 }, - { x: 0.203125, y: 0.140625 }, - { x: 0.203125, y: 0.140625 }, - { x: 0.234375, y: 0.140625 }, - { x: 0.234375, y: 0.140625 }, - { x: 0.265625, y: 0.140625 }, - { x: 0.265625, y: 0.140625 }, - { x: 0.296875, y: 0.140625 }, - { x: 0.296875, y: 0.140625 }, - { x: 0.328125, y: 0.140625 }, - { x: 0.328125, y: 0.140625 }, - { x: 0.359375, y: 0.140625 }, - { x: 0.359375, y: 0.140625 }, - { x: 0.390625, y: 0.140625 }, - { x: 0.390625, y: 0.140625 }, - { x: 0.421875, y: 0.140625 }, - { x: 0.421875, y: 0.140625 }, - { x: 0.453125, y: 0.140625 }, - { x: 0.453125, y: 0.140625 }, - { x: 0.484375, y: 0.140625 }, - { x: 0.484375, y: 0.140625 }, - { x: 0.515625, y: 0.140625 }, - { x: 0.515625, y: 0.140625 }, - { x: 0.546875, y: 0.140625 }, - { x: 0.546875, y: 0.140625 }, - { x: 0.578125, y: 0.140625 }, - { x: 0.578125, y: 0.140625 }, - { x: 0.609375, y: 0.140625 }, - { x: 0.609375, y: 0.140625 }, - { x: 0.640625, y: 0.140625 }, - { x: 0.640625, y: 0.140625 }, - { x: 0.671875, y: 0.140625 }, - { x: 0.671875, y: 0.140625 }, - { x: 0.703125, y: 0.140625 }, - { x: 0.703125, y: 0.140625 }, - { x: 0.734375, y: 0.140625 }, - { x: 0.734375, y: 0.140625 }, - { x: 0.765625, y: 0.140625 }, - { x: 0.765625, y: 0.140625 }, - { x: 0.796875, y: 0.140625 }, - { x: 0.796875, y: 0.140625 }, - { x: 0.828125, y: 0.140625 }, - { x: 0.828125, y: 0.140625 }, - { x: 0.859375, y: 0.140625 }, - { x: 0.859375, y: 0.140625 }, - { x: 0.890625, y: 0.140625 }, - { x: 0.890625, y: 0.140625 }, - { x: 0.921875, y: 0.140625 }, - { x: 0.921875, y: 0.140625 }, - { x: 0.953125, y: 0.140625 }, - { x: 0.953125, y: 0.140625 }, - { x: 0.984375, y: 0.140625 }, - { x: 0.984375, y: 0.140625 }, - { x: 0.015625, y: 0.171875 }, - { x: 0.015625, y: 0.171875 }, - { x: 0.046875, y: 0.171875 }, - { x: 0.046875, y: 0.171875 }, - { x: 0.078125, y: 0.171875 }, - { x: 0.078125, y: 0.171875 }, - { x: 0.109375, y: 0.171875 }, - { x: 0.109375, y: 0.171875 }, - { x: 0.140625, y: 0.171875 }, - { x: 0.140625, y: 0.171875 }, - { x: 0.171875, y: 0.171875 }, - { x: 0.171875, y: 0.171875 }, - { x: 0.203125, y: 0.171875 }, - { x: 0.203125, y: 0.171875 }, - { x: 0.234375, y: 0.171875 }, - { x: 0.234375, y: 0.171875 }, - { x: 0.265625, y: 0.171875 }, - { x: 0.265625, y: 0.171875 }, - { x: 0.296875, y: 0.171875 }, - { x: 0.296875, y: 0.171875 }, - { x: 0.328125, y: 0.171875 }, - { x: 0.328125, y: 0.171875 }, - { x: 0.359375, y: 0.171875 }, - { x: 0.359375, y: 0.171875 }, - { x: 0.390625, y: 0.171875 }, - { x: 0.390625, y: 0.171875 }, - { x: 0.421875, y: 0.171875 }, - { x: 0.421875, y: 0.171875 }, - { x: 0.453125, y: 0.171875 }, - { x: 0.453125, y: 0.171875 }, - { x: 0.484375, y: 0.171875 }, - { x: 0.484375, y: 0.171875 }, - { x: 0.515625, y: 0.171875 }, - { x: 0.515625, y: 0.171875 }, - { x: 0.546875, y: 0.171875 }, - { x: 0.546875, y: 0.171875 }, - { x: 0.578125, y: 0.171875 }, - { x: 0.578125, y: 0.171875 }, - { x: 0.609375, y: 0.171875 }, - { x: 0.609375, y: 0.171875 }, - { x: 0.640625, y: 0.171875 }, - { x: 0.640625, y: 0.171875 }, - { x: 0.671875, y: 0.171875 }, - { x: 0.671875, y: 0.171875 }, - { x: 0.703125, y: 0.171875 }, - { x: 0.703125, y: 0.171875 }, - { x: 0.734375, y: 0.171875 }, - { x: 0.734375, y: 0.171875 }, - { x: 0.765625, y: 0.171875 }, - { x: 0.765625, y: 0.171875 }, - { x: 0.796875, y: 0.171875 }, - { x: 0.796875, y: 0.171875 }, - { x: 0.828125, y: 0.171875 }, - { x: 0.828125, y: 0.171875 }, - { x: 0.859375, y: 0.171875 }, - { x: 0.859375, y: 0.171875 }, - { x: 0.890625, y: 0.171875 }, - { x: 0.890625, y: 0.171875 }, - { x: 0.921875, y: 0.171875 }, - { x: 0.921875, y: 0.171875 }, - { x: 0.953125, y: 0.171875 }, - { x: 0.953125, y: 0.171875 }, - { x: 0.984375, y: 0.171875 }, - { x: 0.984375, y: 0.171875 }, - { x: 0.015625, y: 0.203125 }, - { x: 0.015625, y: 0.203125 }, - { x: 0.046875, y: 0.203125 }, - { x: 0.046875, y: 0.203125 }, - { x: 0.078125, y: 0.203125 }, - { x: 0.078125, y: 0.203125 }, - { x: 0.109375, y: 0.203125 }, - { x: 0.109375, y: 0.203125 }, - { x: 0.140625, y: 0.203125 }, - { x: 0.140625, y: 0.203125 }, - { x: 0.171875, y: 0.203125 }, - { x: 0.171875, y: 0.203125 }, - { x: 0.203125, y: 0.203125 }, - { x: 0.203125, y: 0.203125 }, - { x: 0.234375, y: 0.203125 }, - { x: 0.234375, y: 0.203125 }, - { x: 0.265625, y: 0.203125 }, - { x: 0.265625, y: 0.203125 }, - { x: 0.296875, y: 0.203125 }, - { x: 0.296875, y: 0.203125 }, - { x: 0.328125, y: 0.203125 }, - { x: 0.328125, y: 0.203125 }, - { x: 0.359375, y: 0.203125 }, - { x: 0.359375, y: 0.203125 }, - { x: 0.390625, y: 0.203125 }, - { x: 0.390625, y: 0.203125 }, - { x: 0.421875, y: 0.203125 }, - { x: 0.421875, y: 0.203125 }, - { x: 0.453125, y: 0.203125 }, - { x: 0.453125, y: 0.203125 }, - { x: 0.484375, y: 0.203125 }, - { x: 0.484375, y: 0.203125 }, - { x: 0.515625, y: 0.203125 }, - { x: 0.515625, y: 0.203125 }, - { x: 0.546875, y: 0.203125 }, - { x: 0.546875, y: 0.203125 }, - { x: 0.578125, y: 0.203125 }, - { x: 0.578125, y: 0.203125 }, - { x: 0.609375, y: 0.203125 }, - { x: 0.609375, y: 0.203125 }, - { x: 0.640625, y: 0.203125 }, - { x: 0.640625, y: 0.203125 }, - { x: 0.671875, y: 0.203125 }, - { x: 0.671875, y: 0.203125 }, - { x: 0.703125, y: 0.203125 }, - { x: 0.703125, y: 0.203125 }, - { x: 0.734375, y: 0.203125 }, - { x: 0.734375, y: 0.203125 }, - { x: 0.765625, y: 0.203125 }, - { x: 0.765625, y: 0.203125 }, - { x: 0.796875, y: 0.203125 }, - { x: 0.796875, y: 0.203125 }, - { x: 0.828125, y: 0.203125 }, - { x: 0.828125, y: 0.203125 }, - { x: 0.859375, y: 0.203125 }, - { x: 0.859375, y: 0.203125 }, - { x: 0.890625, y: 0.203125 }, - { x: 0.890625, y: 0.203125 }, - { x: 0.921875, y: 0.203125 }, - { x: 0.921875, y: 0.203125 }, - { x: 0.953125, y: 0.203125 }, - { x: 0.953125, y: 0.203125 }, - { x: 0.984375, y: 0.203125 }, - { x: 0.984375, y: 0.203125 }, - { x: 0.015625, y: 0.234375 }, - { x: 0.015625, y: 0.234375 }, - { x: 0.046875, y: 0.234375 }, - { x: 0.046875, y: 0.234375 }, - { x: 0.078125, y: 0.234375 }, - { x: 0.078125, y: 0.234375 }, - { x: 0.109375, y: 0.234375 }, - { x: 0.109375, y: 0.234375 }, - { x: 0.140625, y: 0.234375 }, - { x: 0.140625, y: 0.234375 }, - { x: 0.171875, y: 0.234375 }, - { x: 0.171875, y: 0.234375 }, - { x: 0.203125, y: 0.234375 }, - { x: 0.203125, y: 0.234375 }, - { x: 0.234375, y: 0.234375 }, - { x: 0.234375, y: 0.234375 }, - { x: 0.265625, y: 0.234375 }, - { x: 0.265625, y: 0.234375 }, - { x: 0.296875, y: 0.234375 }, - { x: 0.296875, y: 0.234375 }, - { x: 0.328125, y: 0.234375 }, - { x: 0.328125, y: 0.234375 }, - { x: 0.359375, y: 0.234375 }, - { x: 0.359375, y: 0.234375 }, - { x: 0.390625, y: 0.234375 }, - { x: 0.390625, y: 0.234375 }, - { x: 0.421875, y: 0.234375 }, - { x: 0.421875, y: 0.234375 }, - { x: 0.453125, y: 0.234375 }, - { x: 0.453125, y: 0.234375 }, - { x: 0.484375, y: 0.234375 }, - { x: 0.484375, y: 0.234375 }, - { x: 0.515625, y: 0.234375 }, - { x: 0.515625, y: 0.234375 }, - { x: 0.546875, y: 0.234375 }, - { x: 0.546875, y: 0.234375 }, - { x: 0.578125, y: 0.234375 }, - { x: 0.578125, y: 0.234375 }, - { x: 0.609375, y: 0.234375 }, - { x: 0.609375, y: 0.234375 }, - { x: 0.640625, y: 0.234375 }, - { x: 0.640625, y: 0.234375 }, - { x: 0.671875, y: 0.234375 }, - { x: 0.671875, y: 0.234375 }, - { x: 0.703125, y: 0.234375 }, - { x: 0.703125, y: 0.234375 }, - { x: 0.734375, y: 0.234375 }, - { x: 0.734375, y: 0.234375 }, - { x: 0.765625, y: 0.234375 }, - { x: 0.765625, y: 0.234375 }, - { x: 0.796875, y: 0.234375 }, - { x: 0.796875, y: 0.234375 }, - { x: 0.828125, y: 0.234375 }, - { x: 0.828125, y: 0.234375 }, - { x: 0.859375, y: 0.234375 }, - { x: 0.859375, y: 0.234375 }, - { x: 0.890625, y: 0.234375 }, - { x: 0.890625, y: 0.234375 }, - { x: 0.921875, y: 0.234375 }, - { x: 0.921875, y: 0.234375 }, - { x: 0.953125, y: 0.234375 }, - { x: 0.953125, y: 0.234375 }, - { x: 0.984375, y: 0.234375 }, - { x: 0.984375, y: 0.234375 }, - { x: 0.015625, y: 0.265625 }, - { x: 0.015625, y: 0.265625 }, - { x: 0.046875, y: 0.265625 }, - { x: 0.046875, y: 0.265625 }, - { x: 0.078125, y: 0.265625 }, - { x: 0.078125, y: 0.265625 }, - { x: 0.109375, y: 0.265625 }, - { x: 0.109375, y: 0.265625 }, - { x: 0.140625, y: 0.265625 }, - { x: 0.140625, y: 0.265625 }, - { x: 0.171875, y: 0.265625 }, - { x: 0.171875, y: 0.265625 }, - { x: 0.203125, y: 0.265625 }, - { x: 0.203125, y: 0.265625 }, - { x: 0.234375, y: 0.265625 }, - { x: 0.234375, y: 0.265625 }, - { x: 0.265625, y: 0.265625 }, - { x: 0.265625, y: 0.265625 }, - { x: 0.296875, y: 0.265625 }, - { x: 0.296875, y: 0.265625 }, - { x: 0.328125, y: 0.265625 }, - { x: 0.328125, y: 0.265625 }, - { x: 0.359375, y: 0.265625 }, - { x: 0.359375, y: 0.265625 }, - { x: 0.390625, y: 0.265625 }, - { x: 0.390625, y: 0.265625 }, - { x: 0.421875, y: 0.265625 }, - { x: 0.421875, y: 0.265625 }, - { x: 0.453125, y: 0.265625 }, - { x: 0.453125, y: 0.265625 }, - { x: 0.484375, y: 0.265625 }, - { x: 0.484375, y: 0.265625 }, - { x: 0.515625, y: 0.265625 }, - { x: 0.515625, y: 0.265625 }, - { x: 0.546875, y: 0.265625 }, - { x: 0.546875, y: 0.265625 }, - { x: 0.578125, y: 0.265625 }, - { x: 0.578125, y: 0.265625 }, - { x: 0.609375, y: 0.265625 }, - { x: 0.609375, y: 0.265625 }, - { x: 0.640625, y: 0.265625 }, - { x: 0.640625, y: 0.265625 }, - { x: 0.671875, y: 0.265625 }, - { x: 0.671875, y: 0.265625 }, - { x: 0.703125, y: 0.265625 }, - { x: 0.703125, y: 0.265625 }, - { x: 0.734375, y: 0.265625 }, - { x: 0.734375, y: 0.265625 }, - { x: 0.765625, y: 0.265625 }, - { x: 0.765625, y: 0.265625 }, - { x: 0.796875, y: 0.265625 }, - { x: 0.796875, y: 0.265625 }, - { x: 0.828125, y: 0.265625 }, - { x: 0.828125, y: 0.265625 }, - { x: 0.859375, y: 0.265625 }, - { x: 0.859375, y: 0.265625 }, - { x: 0.890625, y: 0.265625 }, - { x: 0.890625, y: 0.265625 }, - { x: 0.921875, y: 0.265625 }, - { x: 0.921875, y: 0.265625 }, - { x: 0.953125, y: 0.265625 }, - { x: 0.953125, y: 0.265625 }, - { x: 0.984375, y: 0.265625 }, - { x: 0.984375, y: 0.265625 }, - { x: 0.015625, y: 0.296875 }, - { x: 0.015625, y: 0.296875 }, - { x: 0.046875, y: 0.296875 }, - { x: 0.046875, y: 0.296875 }, - { x: 0.078125, y: 0.296875 }, - { x: 0.078125, y: 0.296875 }, - { x: 0.109375, y: 0.296875 }, - { x: 0.109375, y: 0.296875 }, - { x: 0.140625, y: 0.296875 }, - { x: 0.140625, y: 0.296875 }, - { x: 0.171875, y: 0.296875 }, - { x: 0.171875, y: 0.296875 }, - { x: 0.203125, y: 0.296875 }, - { x: 0.203125, y: 0.296875 }, - { x: 0.234375, y: 0.296875 }, - { x: 0.234375, y: 0.296875 }, - { x: 0.265625, y: 0.296875 }, - { x: 0.265625, y: 0.296875 }, - { x: 0.296875, y: 0.296875 }, - { x: 0.296875, y: 0.296875 }, - { x: 0.328125, y: 0.296875 }, - { x: 0.328125, y: 0.296875 }, - { x: 0.359375, y: 0.296875 }, - { x: 0.359375, y: 0.296875 }, - { x: 0.390625, y: 0.296875 }, - { x: 0.390625, y: 0.296875 }, - { x: 0.421875, y: 0.296875 }, - { x: 0.421875, y: 0.296875 }, - { x: 0.453125, y: 0.296875 }, - { x: 0.453125, y: 0.296875 }, - { x: 0.484375, y: 0.296875 }, - { x: 0.484375, y: 0.296875 }, - { x: 0.515625, y: 0.296875 }, - { x: 0.515625, y: 0.296875 }, - { x: 0.546875, y: 0.296875 }, - { x: 0.546875, y: 0.296875 }, - { x: 0.578125, y: 0.296875 }, - { x: 0.578125, y: 0.296875 }, - { x: 0.609375, y: 0.296875 }, - { x: 0.609375, y: 0.296875 }, - { x: 0.640625, y: 0.296875 }, - { x: 0.640625, y: 0.296875 }, - { x: 0.671875, y: 0.296875 }, - { x: 0.671875, y: 0.296875 }, - { x: 0.703125, y: 0.296875 }, - { x: 0.703125, y: 0.296875 }, - { x: 0.734375, y: 0.296875 }, - { x: 0.734375, y: 0.296875 }, - { x: 0.765625, y: 0.296875 }, - { x: 0.765625, y: 0.296875 }, - { x: 0.796875, y: 0.296875 }, - { x: 0.796875, y: 0.296875 }, - { x: 0.828125, y: 0.296875 }, - { x: 0.828125, y: 0.296875 }, - { x: 0.859375, y: 0.296875 }, - { x: 0.859375, y: 0.296875 }, - { x: 0.890625, y: 0.296875 }, - { x: 0.890625, y: 0.296875 }, - { x: 0.921875, y: 0.296875 }, - { x: 0.921875, y: 0.296875 }, - { x: 0.953125, y: 0.296875 }, - { x: 0.953125, y: 0.296875 }, - { x: 0.984375, y: 0.296875 }, - { x: 0.984375, y: 0.296875 }, - { x: 0.015625, y: 0.328125 }, - { x: 0.015625, y: 0.328125 }, - { x: 0.046875, y: 0.328125 }, - { x: 0.046875, y: 0.328125 }, - { x: 0.078125, y: 0.328125 }, - { x: 0.078125, y: 0.328125 }, - { x: 0.109375, y: 0.328125 }, - { x: 0.109375, y: 0.328125 }, - { x: 0.140625, y: 0.328125 }, - { x: 0.140625, y: 0.328125 }, - { x: 0.171875, y: 0.328125 }, - { x: 0.171875, y: 0.328125 }, - { x: 0.203125, y: 0.328125 }, - { x: 0.203125, y: 0.328125 }, - { x: 0.234375, y: 0.328125 }, - { x: 0.234375, y: 0.328125 }, - { x: 0.265625, y: 0.328125 }, - { x: 0.265625, y: 0.328125 }, - { x: 0.296875, y: 0.328125 }, - { x: 0.296875, y: 0.328125 }, - { x: 0.328125, y: 0.328125 }, - { x: 0.328125, y: 0.328125 }, - { x: 0.359375, y: 0.328125 }, - { x: 0.359375, y: 0.328125 }, - { x: 0.390625, y: 0.328125 }, - { x: 0.390625, y: 0.328125 }, - { x: 0.421875, y: 0.328125 }, - { x: 0.421875, y: 0.328125 }, - { x: 0.453125, y: 0.328125 }, - { x: 0.453125, y: 0.328125 }, - { x: 0.484375, y: 0.328125 }, - { x: 0.484375, y: 0.328125 }, - { x: 0.515625, y: 0.328125 }, - { x: 0.515625, y: 0.328125 }, - { x: 0.546875, y: 0.328125 }, - { x: 0.546875, y: 0.328125 }, - { x: 0.578125, y: 0.328125 }, - { x: 0.578125, y: 0.328125 }, - { x: 0.609375, y: 0.328125 }, - { x: 0.609375, y: 0.328125 }, - { x: 0.640625, y: 0.328125 }, - { x: 0.640625, y: 0.328125 }, - { x: 0.671875, y: 0.328125 }, - { x: 0.671875, y: 0.328125 }, - { x: 0.703125, y: 0.328125 }, - { x: 0.703125, y: 0.328125 }, - { x: 0.734375, y: 0.328125 }, - { x: 0.734375, y: 0.328125 }, - { x: 0.765625, y: 0.328125 }, - { x: 0.765625, y: 0.328125 }, - { x: 0.796875, y: 0.328125 }, - { x: 0.796875, y: 0.328125 }, - { x: 0.828125, y: 0.328125 }, - { x: 0.828125, y: 0.328125 }, - { x: 0.859375, y: 0.328125 }, - { x: 0.859375, y: 0.328125 }, - { x: 0.890625, y: 0.328125 }, - { x: 0.890625, y: 0.328125 }, - { x: 0.921875, y: 0.328125 }, - { x: 0.921875, y: 0.328125 }, - { x: 0.953125, y: 0.328125 }, - { x: 0.953125, y: 0.328125 }, - { x: 0.984375, y: 0.328125 }, - { x: 0.984375, y: 0.328125 }, - { x: 0.015625, y: 0.359375 }, - { x: 0.015625, y: 0.359375 }, - { x: 0.046875, y: 0.359375 }, - { x: 0.046875, y: 0.359375 }, - { x: 0.078125, y: 0.359375 }, - { x: 0.078125, y: 0.359375 }, - { x: 0.109375, y: 0.359375 }, - { x: 0.109375, y: 0.359375 }, - { x: 0.140625, y: 0.359375 }, - { x: 0.140625, y: 0.359375 }, - { x: 0.171875, y: 0.359375 }, - { x: 0.171875, y: 0.359375 }, - { x: 0.203125, y: 0.359375 }, - { x: 0.203125, y: 0.359375 }, - { x: 0.234375, y: 0.359375 }, - { x: 0.234375, y: 0.359375 }, - { x: 0.265625, y: 0.359375 }, - { x: 0.265625, y: 0.359375 }, - { x: 0.296875, y: 0.359375 }, - { x: 0.296875, y: 0.359375 }, - { x: 0.328125, y: 0.359375 }, - { x: 0.328125, y: 0.359375 }, - { x: 0.359375, y: 0.359375 }, - { x: 0.359375, y: 0.359375 }, - { x: 0.390625, y: 0.359375 }, - { x: 0.390625, y: 0.359375 }, - { x: 0.421875, y: 0.359375 }, - { x: 0.421875, y: 0.359375 }, - { x: 0.453125, y: 0.359375 }, - { x: 0.453125, y: 0.359375 }, - { x: 0.484375, y: 0.359375 }, - { x: 0.484375, y: 0.359375 }, - { x: 0.515625, y: 0.359375 }, - { x: 0.515625, y: 0.359375 }, - { x: 0.546875, y: 0.359375 }, - { x: 0.546875, y: 0.359375 }, - { x: 0.578125, y: 0.359375 }, - { x: 0.578125, y: 0.359375 }, - { x: 0.609375, y: 0.359375 }, - { x: 0.609375, y: 0.359375 }, - { x: 0.640625, y: 0.359375 }, - { x: 0.640625, y: 0.359375 }, - { x: 0.671875, y: 0.359375 }, - { x: 0.671875, y: 0.359375 }, - { x: 0.703125, y: 0.359375 }, - { x: 0.703125, y: 0.359375 }, - { x: 0.734375, y: 0.359375 }, - { x: 0.734375, y: 0.359375 }, - { x: 0.765625, y: 0.359375 }, - { x: 0.765625, y: 0.359375 }, - { x: 0.796875, y: 0.359375 }, - { x: 0.796875, y: 0.359375 }, - { x: 0.828125, y: 0.359375 }, - { x: 0.828125, y: 0.359375 }, - { x: 0.859375, y: 0.359375 }, - { x: 0.859375, y: 0.359375 }, - { x: 0.890625, y: 0.359375 }, - { x: 0.890625, y: 0.359375 }, - { x: 0.921875, y: 0.359375 }, - { x: 0.921875, y: 0.359375 }, - { x: 0.953125, y: 0.359375 }, - { x: 0.953125, y: 0.359375 }, - { x: 0.984375, y: 0.359375 }, - { x: 0.984375, y: 0.359375 }, - { x: 0.015625, y: 0.390625 }, - { x: 0.015625, y: 0.390625 }, - { x: 0.046875, y: 0.390625 }, - { x: 0.046875, y: 0.390625 }, - { x: 0.078125, y: 0.390625 }, - { x: 0.078125, y: 0.390625 }, - { x: 0.109375, y: 0.390625 }, - { x: 0.109375, y: 0.390625 }, - { x: 0.140625, y: 0.390625 }, - { x: 0.140625, y: 0.390625 }, - { x: 0.171875, y: 0.390625 }, - { x: 0.171875, y: 0.390625 }, - { x: 0.203125, y: 0.390625 }, - { x: 0.203125, y: 0.390625 }, - { x: 0.234375, y: 0.390625 }, - { x: 0.234375, y: 0.390625 }, - { x: 0.265625, y: 0.390625 }, - { x: 0.265625, y: 0.390625 }, - { x: 0.296875, y: 0.390625 }, - { x: 0.296875, y: 0.390625 }, - { x: 0.328125, y: 0.390625 }, - { x: 0.328125, y: 0.390625 }, - { x: 0.359375, y: 0.390625 }, - { x: 0.359375, y: 0.390625 }, - { x: 0.390625, y: 0.390625 }, - { x: 0.390625, y: 0.390625 }, - { x: 0.421875, y: 0.390625 }, - { x: 0.421875, y: 0.390625 }, - { x: 0.453125, y: 0.390625 }, - { x: 0.453125, y: 0.390625 }, - { x: 0.484375, y: 0.390625 }, - { x: 0.484375, y: 0.390625 }, - { x: 0.515625, y: 0.390625 }, - { x: 0.515625, y: 0.390625 }, - { x: 0.546875, y: 0.390625 }, - { x: 0.546875, y: 0.390625 }, - { x: 0.578125, y: 0.390625 }, - { x: 0.578125, y: 0.390625 }, - { x: 0.609375, y: 0.390625 }, - { x: 0.609375, y: 0.390625 }, - { x: 0.640625, y: 0.390625 }, - { x: 0.640625, y: 0.390625 }, - { x: 0.671875, y: 0.390625 }, - { x: 0.671875, y: 0.390625 }, - { x: 0.703125, y: 0.390625 }, - { x: 0.703125, y: 0.390625 }, - { x: 0.734375, y: 0.390625 }, - { x: 0.734375, y: 0.390625 }, - { x: 0.765625, y: 0.390625 }, - { x: 0.765625, y: 0.390625 }, - { x: 0.796875, y: 0.390625 }, - { x: 0.796875, y: 0.390625 }, - { x: 0.828125, y: 0.390625 }, - { x: 0.828125, y: 0.390625 }, - { x: 0.859375, y: 0.390625 }, - { x: 0.859375, y: 0.390625 }, - { x: 0.890625, y: 0.390625 }, - { x: 0.890625, y: 0.390625 }, - { x: 0.921875, y: 0.390625 }, - { x: 0.921875, y: 0.390625 }, - { x: 0.953125, y: 0.390625 }, - { x: 0.953125, y: 0.390625 }, - { x: 0.984375, y: 0.390625 }, - { x: 0.984375, y: 0.390625 }, - { x: 0.015625, y: 0.421875 }, - { x: 0.015625, y: 0.421875 }, - { x: 0.046875, y: 0.421875 }, - { x: 0.046875, y: 0.421875 }, - { x: 0.078125, y: 0.421875 }, - { x: 0.078125, y: 0.421875 }, - { x: 0.109375, y: 0.421875 }, - { x: 0.109375, y: 0.421875 }, - { x: 0.140625, y: 0.421875 }, - { x: 0.140625, y: 0.421875 }, - { x: 0.171875, y: 0.421875 }, - { x: 0.171875, y: 0.421875 }, - { x: 0.203125, y: 0.421875 }, - { x: 0.203125, y: 0.421875 }, - { x: 0.234375, y: 0.421875 }, - { x: 0.234375, y: 0.421875 }, - { x: 0.265625, y: 0.421875 }, - { x: 0.265625, y: 0.421875 }, - { x: 0.296875, y: 0.421875 }, - { x: 0.296875, y: 0.421875 }, - { x: 0.328125, y: 0.421875 }, - { x: 0.328125, y: 0.421875 }, - { x: 0.359375, y: 0.421875 }, - { x: 0.359375, y: 0.421875 }, - { x: 0.390625, y: 0.421875 }, - { x: 0.390625, y: 0.421875 }, - { x: 0.421875, y: 0.421875 }, - { x: 0.421875, y: 0.421875 }, - { x: 0.453125, y: 0.421875 }, - { x: 0.453125, y: 0.421875 }, - { x: 0.484375, y: 0.421875 }, - { x: 0.484375, y: 0.421875 }, - { x: 0.515625, y: 0.421875 }, - { x: 0.515625, y: 0.421875 }, - { x: 0.546875, y: 0.421875 }, - { x: 0.546875, y: 0.421875 }, - { x: 0.578125, y: 0.421875 }, - { x: 0.578125, y: 0.421875 }, - { x: 0.609375, y: 0.421875 }, - { x: 0.609375, y: 0.421875 }, - { x: 0.640625, y: 0.421875 }, - { x: 0.640625, y: 0.421875 }, - { x: 0.671875, y: 0.421875 }, - { x: 0.671875, y: 0.421875 }, - { x: 0.703125, y: 0.421875 }, - { x: 0.703125, y: 0.421875 }, - { x: 0.734375, y: 0.421875 }, - { x: 0.734375, y: 0.421875 }, - { x: 0.765625, y: 0.421875 }, - { x: 0.765625, y: 0.421875 }, - { x: 0.796875, y: 0.421875 }, - { x: 0.796875, y: 0.421875 }, - { x: 0.828125, y: 0.421875 }, - { x: 0.828125, y: 0.421875 }, - { x: 0.859375, y: 0.421875 }, - { x: 0.859375, y: 0.421875 }, - { x: 0.890625, y: 0.421875 }, - { x: 0.890625, y: 0.421875 }, - { x: 0.921875, y: 0.421875 }, - { x: 0.921875, y: 0.421875 }, - { x: 0.953125, y: 0.421875 }, - { x: 0.953125, y: 0.421875 }, - { x: 0.984375, y: 0.421875 }, - { x: 0.984375, y: 0.421875 }, - { x: 0.015625, y: 0.453125 }, - { x: 0.015625, y: 0.453125 }, - { x: 0.046875, y: 0.453125 }, - { x: 0.046875, y: 0.453125 }, - { x: 0.078125, y: 0.453125 }, - { x: 0.078125, y: 0.453125 }, - { x: 0.109375, y: 0.453125 }, - { x: 0.109375, y: 0.453125 }, - { x: 0.140625, y: 0.453125 }, - { x: 0.140625, y: 0.453125 }, - { x: 0.171875, y: 0.453125 }, - { x: 0.171875, y: 0.453125 }, - { x: 0.203125, y: 0.453125 }, - { x: 0.203125, y: 0.453125 }, - { x: 0.234375, y: 0.453125 }, - { x: 0.234375, y: 0.453125 }, - { x: 0.265625, y: 0.453125 }, - { x: 0.265625, y: 0.453125 }, - { x: 0.296875, y: 0.453125 }, - { x: 0.296875, y: 0.453125 }, - { x: 0.328125, y: 0.453125 }, - { x: 0.328125, y: 0.453125 }, - { x: 0.359375, y: 0.453125 }, - { x: 0.359375, y: 0.453125 }, - { x: 0.390625, y: 0.453125 }, - { x: 0.390625, y: 0.453125 }, - { x: 0.421875, y: 0.453125 }, - { x: 0.421875, y: 0.453125 }, - { x: 0.453125, y: 0.453125 }, - { x: 0.453125, y: 0.453125 }, - { x: 0.484375, y: 0.453125 }, - { x: 0.484375, y: 0.453125 }, - { x: 0.515625, y: 0.453125 }, - { x: 0.515625, y: 0.453125 }, - { x: 0.546875, y: 0.453125 }, - { x: 0.546875, y: 0.453125 }, - { x: 0.578125, y: 0.453125 }, - { x: 0.578125, y: 0.453125 }, - { x: 0.609375, y: 0.453125 }, - { x: 0.609375, y: 0.453125 }, - { x: 0.640625, y: 0.453125 }, - { x: 0.640625, y: 0.453125 }, - { x: 0.671875, y: 0.453125 }, - { x: 0.671875, y: 0.453125 }, - { x: 0.703125, y: 0.453125 }, - { x: 0.703125, y: 0.453125 }, - { x: 0.734375, y: 0.453125 }, - { x: 0.734375, y: 0.453125 }, - { x: 0.765625, y: 0.453125 }, - { x: 0.765625, y: 0.453125 }, - { x: 0.796875, y: 0.453125 }, - { x: 0.796875, y: 0.453125 }, - { x: 0.828125, y: 0.453125 }, - { x: 0.828125, y: 0.453125 }, - { x: 0.859375, y: 0.453125 }, - { x: 0.859375, y: 0.453125 }, - { x: 0.890625, y: 0.453125 }, - { x: 0.890625, y: 0.453125 }, - { x: 0.921875, y: 0.453125 }, - { x: 0.921875, y: 0.453125 }, - { x: 0.953125, y: 0.453125 }, - { x: 0.953125, y: 0.453125 }, - { x: 0.984375, y: 0.453125 }, - { x: 0.984375, y: 0.453125 }, - { x: 0.015625, y: 0.484375 }, - { x: 0.015625, y: 0.484375 }, - { x: 0.046875, y: 0.484375 }, - { x: 0.046875, y: 0.484375 }, - { x: 0.078125, y: 0.484375 }, - { x: 0.078125, y: 0.484375 }, - { x: 0.109375, y: 0.484375 }, - { x: 0.109375, y: 0.484375 }, - { x: 0.140625, y: 0.484375 }, - { x: 0.140625, y: 0.484375 }, - { x: 0.171875, y: 0.484375 }, - { x: 0.171875, y: 0.484375 }, - { x: 0.203125, y: 0.484375 }, - { x: 0.203125, y: 0.484375 }, - { x: 0.234375, y: 0.484375 }, - { x: 0.234375, y: 0.484375 }, - { x: 0.265625, y: 0.484375 }, - { x: 0.265625, y: 0.484375 }, - { x: 0.296875, y: 0.484375 }, - { x: 0.296875, y: 0.484375 }, - { x: 0.328125, y: 0.484375 }, - { x: 0.328125, y: 0.484375 }, - { x: 0.359375, y: 0.484375 }, - { x: 0.359375, y: 0.484375 }, - { x: 0.390625, y: 0.484375 }, - { x: 0.390625, y: 0.484375 }, - { x: 0.421875, y: 0.484375 }, - { x: 0.421875, y: 0.484375 }, - { x: 0.453125, y: 0.484375 }, - { x: 0.453125, y: 0.484375 }, - { x: 0.484375, y: 0.484375 }, - { x: 0.484375, y: 0.484375 }, - { x: 0.515625, y: 0.484375 }, - { x: 0.515625, y: 0.484375 }, - { x: 0.546875, y: 0.484375 }, - { x: 0.546875, y: 0.484375 }, - { x: 0.578125, y: 0.484375 }, - { x: 0.578125, y: 0.484375 }, - { x: 0.609375, y: 0.484375 }, - { x: 0.609375, y: 0.484375 }, - { x: 0.640625, y: 0.484375 }, - { x: 0.640625, y: 0.484375 }, - { x: 0.671875, y: 0.484375 }, - { x: 0.671875, y: 0.484375 }, - { x: 0.703125, y: 0.484375 }, - { x: 0.703125, y: 0.484375 }, - { x: 0.734375, y: 0.484375 }, - { x: 0.734375, y: 0.484375 }, - { x: 0.765625, y: 0.484375 }, - { x: 0.765625, y: 0.484375 }, - { x: 0.796875, y: 0.484375 }, - { x: 0.796875, y: 0.484375 }, - { x: 0.828125, y: 0.484375 }, - { x: 0.828125, y: 0.484375 }, - { x: 0.859375, y: 0.484375 }, - { x: 0.859375, y: 0.484375 }, - { x: 0.890625, y: 0.484375 }, - { x: 0.890625, y: 0.484375 }, - { x: 0.921875, y: 0.484375 }, - { x: 0.921875, y: 0.484375 }, - { x: 0.953125, y: 0.484375 }, - { x: 0.953125, y: 0.484375 }, - { x: 0.984375, y: 0.484375 }, - { x: 0.984375, y: 0.484375 }, - { x: 0.015625, y: 0.515625 }, - { x: 0.015625, y: 0.515625 }, - { x: 0.046875, y: 0.515625 }, - { x: 0.046875, y: 0.515625 }, - { x: 0.078125, y: 0.515625 }, - { x: 0.078125, y: 0.515625 }, - { x: 0.109375, y: 0.515625 }, - { x: 0.109375, y: 0.515625 }, - { x: 0.140625, y: 0.515625 }, - { x: 0.140625, y: 0.515625 }, - { x: 0.171875, y: 0.515625 }, - { x: 0.171875, y: 0.515625 }, - { x: 0.203125, y: 0.515625 }, - { x: 0.203125, y: 0.515625 }, - { x: 0.234375, y: 0.515625 }, - { x: 0.234375, y: 0.515625 }, - { x: 0.265625, y: 0.515625 }, - { x: 0.265625, y: 0.515625 }, - { x: 0.296875, y: 0.515625 }, - { x: 0.296875, y: 0.515625 }, - { x: 0.328125, y: 0.515625 }, - { x: 0.328125, y: 0.515625 }, - { x: 0.359375, y: 0.515625 }, - { x: 0.359375, y: 0.515625 }, - { x: 0.390625, y: 0.515625 }, - { x: 0.390625, y: 0.515625 }, - { x: 0.421875, y: 0.515625 }, - { x: 0.421875, y: 0.515625 }, - { x: 0.453125, y: 0.515625 }, - { x: 0.453125, y: 0.515625 }, - { x: 0.484375, y: 0.515625 }, - { x: 0.484375, y: 0.515625 }, - { x: 0.515625, y: 0.515625 }, - { x: 0.515625, y: 0.515625 }, - { x: 0.546875, y: 0.515625 }, - { x: 0.546875, y: 0.515625 }, - { x: 0.578125, y: 0.515625 }, - { x: 0.578125, y: 0.515625 }, - { x: 0.609375, y: 0.515625 }, - { x: 0.609375, y: 0.515625 }, - { x: 0.640625, y: 0.515625 }, - { x: 0.640625, y: 0.515625 }, - { x: 0.671875, y: 0.515625 }, - { x: 0.671875, y: 0.515625 }, - { x: 0.703125, y: 0.515625 }, - { x: 0.703125, y: 0.515625 }, - { x: 0.734375, y: 0.515625 }, - { x: 0.734375, y: 0.515625 }, - { x: 0.765625, y: 0.515625 }, - { x: 0.765625, y: 0.515625 }, - { x: 0.796875, y: 0.515625 }, - { x: 0.796875, y: 0.515625 }, - { x: 0.828125, y: 0.515625 }, - { x: 0.828125, y: 0.515625 }, - { x: 0.859375, y: 0.515625 }, - { x: 0.859375, y: 0.515625 }, - { x: 0.890625, y: 0.515625 }, - { x: 0.890625, y: 0.515625 }, - { x: 0.921875, y: 0.515625 }, - { x: 0.921875, y: 0.515625 }, - { x: 0.953125, y: 0.515625 }, - { x: 0.953125, y: 0.515625 }, - { x: 0.984375, y: 0.515625 }, - { x: 0.984375, y: 0.515625 }, - { x: 0.015625, y: 0.546875 }, - { x: 0.015625, y: 0.546875 }, - { x: 0.046875, y: 0.546875 }, - { x: 0.046875, y: 0.546875 }, - { x: 0.078125, y: 0.546875 }, - { x: 0.078125, y: 0.546875 }, - { x: 0.109375, y: 0.546875 }, - { x: 0.109375, y: 0.546875 }, - { x: 0.140625, y: 0.546875 }, - { x: 0.140625, y: 0.546875 }, - { x: 0.171875, y: 0.546875 }, - { x: 0.171875, y: 0.546875 }, - { x: 0.203125, y: 0.546875 }, - { x: 0.203125, y: 0.546875 }, - { x: 0.234375, y: 0.546875 }, - { x: 0.234375, y: 0.546875 }, - { x: 0.265625, y: 0.546875 }, - { x: 0.265625, y: 0.546875 }, - { x: 0.296875, y: 0.546875 }, - { x: 0.296875, y: 0.546875 }, - { x: 0.328125, y: 0.546875 }, - { x: 0.328125, y: 0.546875 }, - { x: 0.359375, y: 0.546875 }, - { x: 0.359375, y: 0.546875 }, - { x: 0.390625, y: 0.546875 }, - { x: 0.390625, y: 0.546875 }, - { x: 0.421875, y: 0.546875 }, - { x: 0.421875, y: 0.546875 }, - { x: 0.453125, y: 0.546875 }, - { x: 0.453125, y: 0.546875 }, - { x: 0.484375, y: 0.546875 }, - { x: 0.484375, y: 0.546875 }, - { x: 0.515625, y: 0.546875 }, - { x: 0.515625, y: 0.546875 }, - { x: 0.546875, y: 0.546875 }, - { x: 0.546875, y: 0.546875 }, - { x: 0.578125, y: 0.546875 }, - { x: 0.578125, y: 0.546875 }, - { x: 0.609375, y: 0.546875 }, - { x: 0.609375, y: 0.546875 }, - { x: 0.640625, y: 0.546875 }, - { x: 0.640625, y: 0.546875 }, - { x: 0.671875, y: 0.546875 }, - { x: 0.671875, y: 0.546875 }, - { x: 0.703125, y: 0.546875 }, - { x: 0.703125, y: 0.546875 }, - { x: 0.734375, y: 0.546875 }, - { x: 0.734375, y: 0.546875 }, - { x: 0.765625, y: 0.546875 }, - { x: 0.765625, y: 0.546875 }, - { x: 0.796875, y: 0.546875 }, - { x: 0.796875, y: 0.546875 }, - { x: 0.828125, y: 0.546875 }, - { x: 0.828125, y: 0.546875 }, - { x: 0.859375, y: 0.546875 }, - { x: 0.859375, y: 0.546875 }, - { x: 0.890625, y: 0.546875 }, - { x: 0.890625, y: 0.546875 }, - { x: 0.921875, y: 0.546875 }, - { x: 0.921875, y: 0.546875 }, - { x: 0.953125, y: 0.546875 }, - { x: 0.953125, y: 0.546875 }, - { x: 0.984375, y: 0.546875 }, - { x: 0.984375, y: 0.546875 }, - { x: 0.015625, y: 0.578125 }, - { x: 0.015625, y: 0.578125 }, - { x: 0.046875, y: 0.578125 }, - { x: 0.046875, y: 0.578125 }, - { x: 0.078125, y: 0.578125 }, - { x: 0.078125, y: 0.578125 }, - { x: 0.109375, y: 0.578125 }, - { x: 0.109375, y: 0.578125 }, - { x: 0.140625, y: 0.578125 }, - { x: 0.140625, y: 0.578125 }, - { x: 0.171875, y: 0.578125 }, - { x: 0.171875, y: 0.578125 }, - { x: 0.203125, y: 0.578125 }, - { x: 0.203125, y: 0.578125 }, - { x: 0.234375, y: 0.578125 }, - { x: 0.234375, y: 0.578125 }, - { x: 0.265625, y: 0.578125 }, - { x: 0.265625, y: 0.578125 }, - { x: 0.296875, y: 0.578125 }, - { x: 0.296875, y: 0.578125 }, - { x: 0.328125, y: 0.578125 }, - { x: 0.328125, y: 0.578125 }, - { x: 0.359375, y: 0.578125 }, - { x: 0.359375, y: 0.578125 }, - { x: 0.390625, y: 0.578125 }, - { x: 0.390625, y: 0.578125 }, - { x: 0.421875, y: 0.578125 }, - { x: 0.421875, y: 0.578125 }, - { x: 0.453125, y: 0.578125 }, - { x: 0.453125, y: 0.578125 }, - { x: 0.484375, y: 0.578125 }, - { x: 0.484375, y: 0.578125 }, - { x: 0.515625, y: 0.578125 }, - { x: 0.515625, y: 0.578125 }, - { x: 0.546875, y: 0.578125 }, - { x: 0.546875, y: 0.578125 }, - { x: 0.578125, y: 0.578125 }, - { x: 0.578125, y: 0.578125 }, - { x: 0.609375, y: 0.578125 }, - { x: 0.609375, y: 0.578125 }, - { x: 0.640625, y: 0.578125 }, - { x: 0.640625, y: 0.578125 }, - { x: 0.671875, y: 0.578125 }, - { x: 0.671875, y: 0.578125 }, - { x: 0.703125, y: 0.578125 }, - { x: 0.703125, y: 0.578125 }, - { x: 0.734375, y: 0.578125 }, - { x: 0.734375, y: 0.578125 }, - { x: 0.765625, y: 0.578125 }, - { x: 0.765625, y: 0.578125 }, - { x: 0.796875, y: 0.578125 }, - { x: 0.796875, y: 0.578125 }, - { x: 0.828125, y: 0.578125 }, - { x: 0.828125, y: 0.578125 }, - { x: 0.859375, y: 0.578125 }, - { x: 0.859375, y: 0.578125 }, - { x: 0.890625, y: 0.578125 }, - { x: 0.890625, y: 0.578125 }, - { x: 0.921875, y: 0.578125 }, - { x: 0.921875, y: 0.578125 }, - { x: 0.953125, y: 0.578125 }, - { x: 0.953125, y: 0.578125 }, - { x: 0.984375, y: 0.578125 }, - { x: 0.984375, y: 0.578125 }, - { x: 0.015625, y: 0.609375 }, - { x: 0.015625, y: 0.609375 }, - { x: 0.046875, y: 0.609375 }, - { x: 0.046875, y: 0.609375 }, - { x: 0.078125, y: 0.609375 }, - { x: 0.078125, y: 0.609375 }, - { x: 0.109375, y: 0.609375 }, - { x: 0.109375, y: 0.609375 }, - { x: 0.140625, y: 0.609375 }, - { x: 0.140625, y: 0.609375 }, - { x: 0.171875, y: 0.609375 }, - { x: 0.171875, y: 0.609375 }, - { x: 0.203125, y: 0.609375 }, - { x: 0.203125, y: 0.609375 }, - { x: 0.234375, y: 0.609375 }, - { x: 0.234375, y: 0.609375 }, - { x: 0.265625, y: 0.609375 }, - { x: 0.265625, y: 0.609375 }, - { x: 0.296875, y: 0.609375 }, - { x: 0.296875, y: 0.609375 }, - { x: 0.328125, y: 0.609375 }, - { x: 0.328125, y: 0.609375 }, - { x: 0.359375, y: 0.609375 }, - { x: 0.359375, y: 0.609375 }, - { x: 0.390625, y: 0.609375 }, - { x: 0.390625, y: 0.609375 }, - { x: 0.421875, y: 0.609375 }, - { x: 0.421875, y: 0.609375 }, - { x: 0.453125, y: 0.609375 }, - { x: 0.453125, y: 0.609375 }, - { x: 0.484375, y: 0.609375 }, - { x: 0.484375, y: 0.609375 }, - { x: 0.515625, y: 0.609375 }, - { x: 0.515625, y: 0.609375 }, - { x: 0.546875, y: 0.609375 }, - { x: 0.546875, y: 0.609375 }, - { x: 0.578125, y: 0.609375 }, - { x: 0.578125, y: 0.609375 }, - { x: 0.609375, y: 0.609375 }, - { x: 0.609375, y: 0.609375 }, - { x: 0.640625, y: 0.609375 }, - { x: 0.640625, y: 0.609375 }, - { x: 0.671875, y: 0.609375 }, - { x: 0.671875, y: 0.609375 }, - { x: 0.703125, y: 0.609375 }, - { x: 0.703125, y: 0.609375 }, - { x: 0.734375, y: 0.609375 }, - { x: 0.734375, y: 0.609375 }, - { x: 0.765625, y: 0.609375 }, - { x: 0.765625, y: 0.609375 }, - { x: 0.796875, y: 0.609375 }, - { x: 0.796875, y: 0.609375 }, - { x: 0.828125, y: 0.609375 }, - { x: 0.828125, y: 0.609375 }, - { x: 0.859375, y: 0.609375 }, - { x: 0.859375, y: 0.609375 }, - { x: 0.890625, y: 0.609375 }, - { x: 0.890625, y: 0.609375 }, - { x: 0.921875, y: 0.609375 }, - { x: 0.921875, y: 0.609375 }, - { x: 0.953125, y: 0.609375 }, - { x: 0.953125, y: 0.609375 }, - { x: 0.984375, y: 0.609375 }, - { x: 0.984375, y: 0.609375 }, - { x: 0.015625, y: 0.640625 }, - { x: 0.015625, y: 0.640625 }, - { x: 0.046875, y: 0.640625 }, - { x: 0.046875, y: 0.640625 }, - { x: 0.078125, y: 0.640625 }, - { x: 0.078125, y: 0.640625 }, - { x: 0.109375, y: 0.640625 }, - { x: 0.109375, y: 0.640625 }, - { x: 0.140625, y: 0.640625 }, - { x: 0.140625, y: 0.640625 }, - { x: 0.171875, y: 0.640625 }, - { x: 0.171875, y: 0.640625 }, - { x: 0.203125, y: 0.640625 }, - { x: 0.203125, y: 0.640625 }, - { x: 0.234375, y: 0.640625 }, - { x: 0.234375, y: 0.640625 }, - { x: 0.265625, y: 0.640625 }, - { x: 0.265625, y: 0.640625 }, - { x: 0.296875, y: 0.640625 }, - { x: 0.296875, y: 0.640625 }, - { x: 0.328125, y: 0.640625 }, - { x: 0.328125, y: 0.640625 }, - { x: 0.359375, y: 0.640625 }, - { x: 0.359375, y: 0.640625 }, - { x: 0.390625, y: 0.640625 }, - { x: 0.390625, y: 0.640625 }, - { x: 0.421875, y: 0.640625 }, - { x: 0.421875, y: 0.640625 }, - { x: 0.453125, y: 0.640625 }, - { x: 0.453125, y: 0.640625 }, - { x: 0.484375, y: 0.640625 }, - { x: 0.484375, y: 0.640625 }, - { x: 0.515625, y: 0.640625 }, - { x: 0.515625, y: 0.640625 }, - { x: 0.546875, y: 0.640625 }, - { x: 0.546875, y: 0.640625 }, - { x: 0.578125, y: 0.640625 }, - { x: 0.578125, y: 0.640625 }, - { x: 0.609375, y: 0.640625 }, - { x: 0.609375, y: 0.640625 }, - { x: 0.640625, y: 0.640625 }, - { x: 0.640625, y: 0.640625 }, - { x: 0.671875, y: 0.640625 }, - { x: 0.671875, y: 0.640625 }, - { x: 0.703125, y: 0.640625 }, - { x: 0.703125, y: 0.640625 }, - { x: 0.734375, y: 0.640625 }, - { x: 0.734375, y: 0.640625 }, - { x: 0.765625, y: 0.640625 }, - { x: 0.765625, y: 0.640625 }, - { x: 0.796875, y: 0.640625 }, - { x: 0.796875, y: 0.640625 }, - { x: 0.828125, y: 0.640625 }, - { x: 0.828125, y: 0.640625 }, - { x: 0.859375, y: 0.640625 }, - { x: 0.859375, y: 0.640625 }, - { x: 0.890625, y: 0.640625 }, - { x: 0.890625, y: 0.640625 }, - { x: 0.921875, y: 0.640625 }, - { x: 0.921875, y: 0.640625 }, - { x: 0.953125, y: 0.640625 }, - { x: 0.953125, y: 0.640625 }, - { x: 0.984375, y: 0.640625 }, - { x: 0.984375, y: 0.640625 }, - { x: 0.015625, y: 0.671875 }, - { x: 0.015625, y: 0.671875 }, - { x: 0.046875, y: 0.671875 }, - { x: 0.046875, y: 0.671875 }, - { x: 0.078125, y: 0.671875 }, - { x: 0.078125, y: 0.671875 }, - { x: 0.109375, y: 0.671875 }, - { x: 0.109375, y: 0.671875 }, - { x: 0.140625, y: 0.671875 }, - { x: 0.140625, y: 0.671875 }, - { x: 0.171875, y: 0.671875 }, - { x: 0.171875, y: 0.671875 }, - { x: 0.203125, y: 0.671875 }, - { x: 0.203125, y: 0.671875 }, - { x: 0.234375, y: 0.671875 }, - { x: 0.234375, y: 0.671875 }, - { x: 0.265625, y: 0.671875 }, - { x: 0.265625, y: 0.671875 }, - { x: 0.296875, y: 0.671875 }, - { x: 0.296875, y: 0.671875 }, - { x: 0.328125, y: 0.671875 }, - { x: 0.328125, y: 0.671875 }, - { x: 0.359375, y: 0.671875 }, - { x: 0.359375, y: 0.671875 }, - { x: 0.390625, y: 0.671875 }, - { x: 0.390625, y: 0.671875 }, - { x: 0.421875, y: 0.671875 }, - { x: 0.421875, y: 0.671875 }, - { x: 0.453125, y: 0.671875 }, - { x: 0.453125, y: 0.671875 }, - { x: 0.484375, y: 0.671875 }, - { x: 0.484375, y: 0.671875 }, - { x: 0.515625, y: 0.671875 }, - { x: 0.515625, y: 0.671875 }, - { x: 0.546875, y: 0.671875 }, - { x: 0.546875, y: 0.671875 }, - { x: 0.578125, y: 0.671875 }, - { x: 0.578125, y: 0.671875 }, - { x: 0.609375, y: 0.671875 }, - { x: 0.609375, y: 0.671875 }, - { x: 0.640625, y: 0.671875 }, - { x: 0.640625, y: 0.671875 }, - { x: 0.671875, y: 0.671875 }, - { x: 0.671875, y: 0.671875 }, - { x: 0.703125, y: 0.671875 }, - { x: 0.703125, y: 0.671875 }, - { x: 0.734375, y: 0.671875 }, - { x: 0.734375, y: 0.671875 }, - { x: 0.765625, y: 0.671875 }, - { x: 0.765625, y: 0.671875 }, - { x: 0.796875, y: 0.671875 }, - { x: 0.796875, y: 0.671875 }, - { x: 0.828125, y: 0.671875 }, - { x: 0.828125, y: 0.671875 }, - { x: 0.859375, y: 0.671875 }, - { x: 0.859375, y: 0.671875 }, - { x: 0.890625, y: 0.671875 }, - { x: 0.890625, y: 0.671875 }, - { x: 0.921875, y: 0.671875 }, - { x: 0.921875, y: 0.671875 }, - { x: 0.953125, y: 0.671875 }, - { x: 0.953125, y: 0.671875 }, - { x: 0.984375, y: 0.671875 }, - { x: 0.984375, y: 0.671875 }, - { x: 0.015625, y: 0.703125 }, - { x: 0.015625, y: 0.703125 }, - { x: 0.046875, y: 0.703125 }, - { x: 0.046875, y: 0.703125 }, - { x: 0.078125, y: 0.703125 }, - { x: 0.078125, y: 0.703125 }, - { x: 0.109375, y: 0.703125 }, - { x: 0.109375, y: 0.703125 }, - { x: 0.140625, y: 0.703125 }, - { x: 0.140625, y: 0.703125 }, - { x: 0.171875, y: 0.703125 }, - { x: 0.171875, y: 0.703125 }, - { x: 0.203125, y: 0.703125 }, - { x: 0.203125, y: 0.703125 }, - { x: 0.234375, y: 0.703125 }, - { x: 0.234375, y: 0.703125 }, - { x: 0.265625, y: 0.703125 }, - { x: 0.265625, y: 0.703125 }, - { x: 0.296875, y: 0.703125 }, - { x: 0.296875, y: 0.703125 }, - { x: 0.328125, y: 0.703125 }, - { x: 0.328125, y: 0.703125 }, - { x: 0.359375, y: 0.703125 }, - { x: 0.359375, y: 0.703125 }, - { x: 0.390625, y: 0.703125 }, - { x: 0.390625, y: 0.703125 }, - { x: 0.421875, y: 0.703125 }, - { x: 0.421875, y: 0.703125 }, - { x: 0.453125, y: 0.703125 }, - { x: 0.453125, y: 0.703125 }, - { x: 0.484375, y: 0.703125 }, - { x: 0.484375, y: 0.703125 }, - { x: 0.515625, y: 0.703125 }, - { x: 0.515625, y: 0.703125 }, - { x: 0.546875, y: 0.703125 }, - { x: 0.546875, y: 0.703125 }, - { x: 0.578125, y: 0.703125 }, - { x: 0.578125, y: 0.703125 }, - { x: 0.609375, y: 0.703125 }, - { x: 0.609375, y: 0.703125 }, - { x: 0.640625, y: 0.703125 }, - { x: 0.640625, y: 0.703125 }, - { x: 0.671875, y: 0.703125 }, - { x: 0.671875, y: 0.703125 }, - { x: 0.703125, y: 0.703125 }, - { x: 0.703125, y: 0.703125 }, - { x: 0.734375, y: 0.703125 }, - { x: 0.734375, y: 0.703125 }, - { x: 0.765625, y: 0.703125 }, - { x: 0.765625, y: 0.703125 }, - { x: 0.796875, y: 0.703125 }, - { x: 0.796875, y: 0.703125 }, - { x: 0.828125, y: 0.703125 }, - { x: 0.828125, y: 0.703125 }, - { x: 0.859375, y: 0.703125 }, - { x: 0.859375, y: 0.703125 }, - { x: 0.890625, y: 0.703125 }, - { x: 0.890625, y: 0.703125 }, - { x: 0.921875, y: 0.703125 }, - { x: 0.921875, y: 0.703125 }, - { x: 0.953125, y: 0.703125 }, - { x: 0.953125, y: 0.703125 }, - { x: 0.984375, y: 0.703125 }, - { x: 0.984375, y: 0.703125 }, - { x: 0.015625, y: 0.734375 }, - { x: 0.015625, y: 0.734375 }, - { x: 0.046875, y: 0.734375 }, - { x: 0.046875, y: 0.734375 }, - { x: 0.078125, y: 0.734375 }, - { x: 0.078125, y: 0.734375 }, - { x: 0.109375, y: 0.734375 }, - { x: 0.109375, y: 0.734375 }, - { x: 0.140625, y: 0.734375 }, - { x: 0.140625, y: 0.734375 }, - { x: 0.171875, y: 0.734375 }, - { x: 0.171875, y: 0.734375 }, - { x: 0.203125, y: 0.734375 }, - { x: 0.203125, y: 0.734375 }, - { x: 0.234375, y: 0.734375 }, - { x: 0.234375, y: 0.734375 }, - { x: 0.265625, y: 0.734375 }, - { x: 0.265625, y: 0.734375 }, - { x: 0.296875, y: 0.734375 }, - { x: 0.296875, y: 0.734375 }, - { x: 0.328125, y: 0.734375 }, - { x: 0.328125, y: 0.734375 }, - { x: 0.359375, y: 0.734375 }, - { x: 0.359375, y: 0.734375 }, - { x: 0.390625, y: 0.734375 }, - { x: 0.390625, y: 0.734375 }, - { x: 0.421875, y: 0.734375 }, - { x: 0.421875, y: 0.734375 }, - { x: 0.453125, y: 0.734375 }, - { x: 0.453125, y: 0.734375 }, - { x: 0.484375, y: 0.734375 }, - { x: 0.484375, y: 0.734375 }, - { x: 0.515625, y: 0.734375 }, - { x: 0.515625, y: 0.734375 }, - { x: 0.546875, y: 0.734375 }, - { x: 0.546875, y: 0.734375 }, - { x: 0.578125, y: 0.734375 }, - { x: 0.578125, y: 0.734375 }, - { x: 0.609375, y: 0.734375 }, - { x: 0.609375, y: 0.734375 }, - { x: 0.640625, y: 0.734375 }, - { x: 0.640625, y: 0.734375 }, - { x: 0.671875, y: 0.734375 }, - { x: 0.671875, y: 0.734375 }, - { x: 0.703125, y: 0.734375 }, - { x: 0.703125, y: 0.734375 }, - { x: 0.734375, y: 0.734375 }, - { x: 0.734375, y: 0.734375 }, - { x: 0.765625, y: 0.734375 }, - { x: 0.765625, y: 0.734375 }, - { x: 0.796875, y: 0.734375 }, - { x: 0.796875, y: 0.734375 }, - { x: 0.828125, y: 0.734375 }, - { x: 0.828125, y: 0.734375 }, - { x: 0.859375, y: 0.734375 }, - { x: 0.859375, y: 0.734375 }, - { x: 0.890625, y: 0.734375 }, - { x: 0.890625, y: 0.734375 }, - { x: 0.921875, y: 0.734375 }, - { x: 0.921875, y: 0.734375 }, - { x: 0.953125, y: 0.734375 }, - { x: 0.953125, y: 0.734375 }, - { x: 0.984375, y: 0.734375 }, - { x: 0.984375, y: 0.734375 }, - { x: 0.015625, y: 0.765625 }, - { x: 0.015625, y: 0.765625 }, - { x: 0.046875, y: 0.765625 }, - { x: 0.046875, y: 0.765625 }, - { x: 0.078125, y: 0.765625 }, - { x: 0.078125, y: 0.765625 }, - { x: 0.109375, y: 0.765625 }, - { x: 0.109375, y: 0.765625 }, - { x: 0.140625, y: 0.765625 }, - { x: 0.140625, y: 0.765625 }, - { x: 0.171875, y: 0.765625 }, - { x: 0.171875, y: 0.765625 }, - { x: 0.203125, y: 0.765625 }, - { x: 0.203125, y: 0.765625 }, - { x: 0.234375, y: 0.765625 }, - { x: 0.234375, y: 0.765625 }, - { x: 0.265625, y: 0.765625 }, - { x: 0.265625, y: 0.765625 }, - { x: 0.296875, y: 0.765625 }, - { x: 0.296875, y: 0.765625 }, - { x: 0.328125, y: 0.765625 }, - { x: 0.328125, y: 0.765625 }, - { x: 0.359375, y: 0.765625 }, - { x: 0.359375, y: 0.765625 }, - { x: 0.390625, y: 0.765625 }, - { x: 0.390625, y: 0.765625 }, - { x: 0.421875, y: 0.765625 }, - { x: 0.421875, y: 0.765625 }, - { x: 0.453125, y: 0.765625 }, - { x: 0.453125, y: 0.765625 }, - { x: 0.484375, y: 0.765625 }, - { x: 0.484375, y: 0.765625 }, - { x: 0.515625, y: 0.765625 }, - { x: 0.515625, y: 0.765625 }, - { x: 0.546875, y: 0.765625 }, - { x: 0.546875, y: 0.765625 }, - { x: 0.578125, y: 0.765625 }, - { x: 0.578125, y: 0.765625 }, - { x: 0.609375, y: 0.765625 }, - { x: 0.609375, y: 0.765625 }, - { x: 0.640625, y: 0.765625 }, - { x: 0.640625, y: 0.765625 }, - { x: 0.671875, y: 0.765625 }, - { x: 0.671875, y: 0.765625 }, - { x: 0.703125, y: 0.765625 }, - { x: 0.703125, y: 0.765625 }, - { x: 0.734375, y: 0.765625 }, - { x: 0.734375, y: 0.765625 }, - { x: 0.765625, y: 0.765625 }, - { x: 0.765625, y: 0.765625 }, - { x: 0.796875, y: 0.765625 }, - { x: 0.796875, y: 0.765625 }, - { x: 0.828125, y: 0.765625 }, - { x: 0.828125, y: 0.765625 }, - { x: 0.859375, y: 0.765625 }, - { x: 0.859375, y: 0.765625 }, - { x: 0.890625, y: 0.765625 }, - { x: 0.890625, y: 0.765625 }, - { x: 0.921875, y: 0.765625 }, - { x: 0.921875, y: 0.765625 }, - { x: 0.953125, y: 0.765625 }, - { x: 0.953125, y: 0.765625 }, - { x: 0.984375, y: 0.765625 }, - { x: 0.984375, y: 0.765625 }, - { x: 0.015625, y: 0.796875 }, - { x: 0.015625, y: 0.796875 }, - { x: 0.046875, y: 0.796875 }, - { x: 0.046875, y: 0.796875 }, - { x: 0.078125, y: 0.796875 }, - { x: 0.078125, y: 0.796875 }, - { x: 0.109375, y: 0.796875 }, - { x: 0.109375, y: 0.796875 }, - { x: 0.140625, y: 0.796875 }, - { x: 0.140625, y: 0.796875 }, - { x: 0.171875, y: 0.796875 }, - { x: 0.171875, y: 0.796875 }, - { x: 0.203125, y: 0.796875 }, - { x: 0.203125, y: 0.796875 }, - { x: 0.234375, y: 0.796875 }, - { x: 0.234375, y: 0.796875 }, - { x: 0.265625, y: 0.796875 }, - { x: 0.265625, y: 0.796875 }, - { x: 0.296875, y: 0.796875 }, - { x: 0.296875, y: 0.796875 }, - { x: 0.328125, y: 0.796875 }, - { x: 0.328125, y: 0.796875 }, - { x: 0.359375, y: 0.796875 }, - { x: 0.359375, y: 0.796875 }, - { x: 0.390625, y: 0.796875 }, - { x: 0.390625, y: 0.796875 }, - { x: 0.421875, y: 0.796875 }, - { x: 0.421875, y: 0.796875 }, - { x: 0.453125, y: 0.796875 }, - { x: 0.453125, y: 0.796875 }, - { x: 0.484375, y: 0.796875 }, - { x: 0.484375, y: 0.796875 }, - { x: 0.515625, y: 0.796875 }, - { x: 0.515625, y: 0.796875 }, - { x: 0.546875, y: 0.796875 }, - { x: 0.546875, y: 0.796875 }, - { x: 0.578125, y: 0.796875 }, - { x: 0.578125, y: 0.796875 }, - { x: 0.609375, y: 0.796875 }, - { x: 0.609375, y: 0.796875 }, - { x: 0.640625, y: 0.796875 }, - { x: 0.640625, y: 0.796875 }, - { x: 0.671875, y: 0.796875 }, - { x: 0.671875, y: 0.796875 }, - { x: 0.703125, y: 0.796875 }, - { x: 0.703125, y: 0.796875 }, - { x: 0.734375, y: 0.796875 }, - { x: 0.734375, y: 0.796875 }, - { x: 0.765625, y: 0.796875 }, - { x: 0.765625, y: 0.796875 }, - { x: 0.796875, y: 0.796875 }, - { x: 0.796875, y: 0.796875 }, - { x: 0.828125, y: 0.796875 }, - { x: 0.828125, y: 0.796875 }, - { x: 0.859375, y: 0.796875 }, - { x: 0.859375, y: 0.796875 }, - { x: 0.890625, y: 0.796875 }, - { x: 0.890625, y: 0.796875 }, - { x: 0.921875, y: 0.796875 }, - { x: 0.921875, y: 0.796875 }, - { x: 0.953125, y: 0.796875 }, - { x: 0.953125, y: 0.796875 }, - { x: 0.984375, y: 0.796875 }, - { x: 0.984375, y: 0.796875 }, - { x: 0.015625, y: 0.828125 }, - { x: 0.015625, y: 0.828125 }, - { x: 0.046875, y: 0.828125 }, - { x: 0.046875, y: 0.828125 }, - { x: 0.078125, y: 0.828125 }, - { x: 0.078125, y: 0.828125 }, - { x: 0.109375, y: 0.828125 }, - { x: 0.109375, y: 0.828125 }, - { x: 0.140625, y: 0.828125 }, - { x: 0.140625, y: 0.828125 }, - { x: 0.171875, y: 0.828125 }, - { x: 0.171875, y: 0.828125 }, - { x: 0.203125, y: 0.828125 }, - { x: 0.203125, y: 0.828125 }, - { x: 0.234375, y: 0.828125 }, - { x: 0.234375, y: 0.828125 }, - { x: 0.265625, y: 0.828125 }, - { x: 0.265625, y: 0.828125 }, - { x: 0.296875, y: 0.828125 }, - { x: 0.296875, y: 0.828125 }, - { x: 0.328125, y: 0.828125 }, - { x: 0.328125, y: 0.828125 }, - { x: 0.359375, y: 0.828125 }, - { x: 0.359375, y: 0.828125 }, - { x: 0.390625, y: 0.828125 }, - { x: 0.390625, y: 0.828125 }, - { x: 0.421875, y: 0.828125 }, - { x: 0.421875, y: 0.828125 }, - { x: 0.453125, y: 0.828125 }, - { x: 0.453125, y: 0.828125 }, - { x: 0.484375, y: 0.828125 }, - { x: 0.484375, y: 0.828125 }, - { x: 0.515625, y: 0.828125 }, - { x: 0.515625, y: 0.828125 }, - { x: 0.546875, y: 0.828125 }, - { x: 0.546875, y: 0.828125 }, - { x: 0.578125, y: 0.828125 }, - { x: 0.578125, y: 0.828125 }, - { x: 0.609375, y: 0.828125 }, - { x: 0.609375, y: 0.828125 }, - { x: 0.640625, y: 0.828125 }, - { x: 0.640625, y: 0.828125 }, - { x: 0.671875, y: 0.828125 }, - { x: 0.671875, y: 0.828125 }, - { x: 0.703125, y: 0.828125 }, - { x: 0.703125, y: 0.828125 }, - { x: 0.734375, y: 0.828125 }, - { x: 0.734375, y: 0.828125 }, - { x: 0.765625, y: 0.828125 }, - { x: 0.765625, y: 0.828125 }, - { x: 0.796875, y: 0.828125 }, - { x: 0.796875, y: 0.828125 }, - { x: 0.828125, y: 0.828125 }, - { x: 0.828125, y: 0.828125 }, - { x: 0.859375, y: 0.828125 }, - { x: 0.859375, y: 0.828125 }, - { x: 0.890625, y: 0.828125 }, - { x: 0.890625, y: 0.828125 }, - { x: 0.921875, y: 0.828125 }, - { x: 0.921875, y: 0.828125 }, - { x: 0.953125, y: 0.828125 }, - { x: 0.953125, y: 0.828125 }, - { x: 0.984375, y: 0.828125 }, - { x: 0.984375, y: 0.828125 }, - { x: 0.015625, y: 0.859375 }, - { x: 0.015625, y: 0.859375 }, - { x: 0.046875, y: 0.859375 }, - { x: 0.046875, y: 0.859375 }, - { x: 0.078125, y: 0.859375 }, - { x: 0.078125, y: 0.859375 }, - { x: 0.109375, y: 0.859375 }, - { x: 0.109375, y: 0.859375 }, - { x: 0.140625, y: 0.859375 }, - { x: 0.140625, y: 0.859375 }, - { x: 0.171875, y: 0.859375 }, - { x: 0.171875, y: 0.859375 }, - { x: 0.203125, y: 0.859375 }, - { x: 0.203125, y: 0.859375 }, - { x: 0.234375, y: 0.859375 }, - { x: 0.234375, y: 0.859375 }, - { x: 0.265625, y: 0.859375 }, - { x: 0.265625, y: 0.859375 }, - { x: 0.296875, y: 0.859375 }, - { x: 0.296875, y: 0.859375 }, - { x: 0.328125, y: 0.859375 }, - { x: 0.328125, y: 0.859375 }, - { x: 0.359375, y: 0.859375 }, - { x: 0.359375, y: 0.859375 }, - { x: 0.390625, y: 0.859375 }, - { x: 0.390625, y: 0.859375 }, - { x: 0.421875, y: 0.859375 }, - { x: 0.421875, y: 0.859375 }, - { x: 0.453125, y: 0.859375 }, - { x: 0.453125, y: 0.859375 }, - { x: 0.484375, y: 0.859375 }, - { x: 0.484375, y: 0.859375 }, - { x: 0.515625, y: 0.859375 }, - { x: 0.515625, y: 0.859375 }, - { x: 0.546875, y: 0.859375 }, - { x: 0.546875, y: 0.859375 }, - { x: 0.578125, y: 0.859375 }, - { x: 0.578125, y: 0.859375 }, - { x: 0.609375, y: 0.859375 }, - { x: 0.609375, y: 0.859375 }, - { x: 0.640625, y: 0.859375 }, - { x: 0.640625, y: 0.859375 }, - { x: 0.671875, y: 0.859375 }, - { x: 0.671875, y: 0.859375 }, - { x: 0.703125, y: 0.859375 }, - { x: 0.703125, y: 0.859375 }, - { x: 0.734375, y: 0.859375 }, - { x: 0.734375, y: 0.859375 }, - { x: 0.765625, y: 0.859375 }, - { x: 0.765625, y: 0.859375 }, - { x: 0.796875, y: 0.859375 }, - { x: 0.796875, y: 0.859375 }, - { x: 0.828125, y: 0.859375 }, - { x: 0.828125, y: 0.859375 }, - { x: 0.859375, y: 0.859375 }, - { x: 0.859375, y: 0.859375 }, - { x: 0.890625, y: 0.859375 }, - { x: 0.890625, y: 0.859375 }, - { x: 0.921875, y: 0.859375 }, - { x: 0.921875, y: 0.859375 }, - { x: 0.953125, y: 0.859375 }, - { x: 0.953125, y: 0.859375 }, - { x: 0.984375, y: 0.859375 }, - { x: 0.984375, y: 0.859375 }, - { x: 0.015625, y: 0.890625 }, - { x: 0.015625, y: 0.890625 }, - { x: 0.046875, y: 0.890625 }, - { x: 0.046875, y: 0.890625 }, - { x: 0.078125, y: 0.890625 }, - { x: 0.078125, y: 0.890625 }, - { x: 0.109375, y: 0.890625 }, - { x: 0.109375, y: 0.890625 }, - { x: 0.140625, y: 0.890625 }, - { x: 0.140625, y: 0.890625 }, - { x: 0.171875, y: 0.890625 }, - { x: 0.171875, y: 0.890625 }, - { x: 0.203125, y: 0.890625 }, - { x: 0.203125, y: 0.890625 }, - { x: 0.234375, y: 0.890625 }, - { x: 0.234375, y: 0.890625 }, - { x: 0.265625, y: 0.890625 }, - { x: 0.265625, y: 0.890625 }, - { x: 0.296875, y: 0.890625 }, - { x: 0.296875, y: 0.890625 }, - { x: 0.328125, y: 0.890625 }, - { x: 0.328125, y: 0.890625 }, - { x: 0.359375, y: 0.890625 }, - { x: 0.359375, y: 0.890625 }, - { x: 0.390625, y: 0.890625 }, - { x: 0.390625, y: 0.890625 }, - { x: 0.421875, y: 0.890625 }, - { x: 0.421875, y: 0.890625 }, - { x: 0.453125, y: 0.890625 }, - { x: 0.453125, y: 0.890625 }, - { x: 0.484375, y: 0.890625 }, - { x: 0.484375, y: 0.890625 }, - { x: 0.515625, y: 0.890625 }, - { x: 0.515625, y: 0.890625 }, - { x: 0.546875, y: 0.890625 }, - { x: 0.546875, y: 0.890625 }, - { x: 0.578125, y: 0.890625 }, - { x: 0.578125, y: 0.890625 }, - { x: 0.609375, y: 0.890625 }, - { x: 0.609375, y: 0.890625 }, - { x: 0.640625, y: 0.890625 }, - { x: 0.640625, y: 0.890625 }, - { x: 0.671875, y: 0.890625 }, - { x: 0.671875, y: 0.890625 }, - { x: 0.703125, y: 0.890625 }, - { x: 0.703125, y: 0.890625 }, - { x: 0.734375, y: 0.890625 }, - { x: 0.734375, y: 0.890625 }, - { x: 0.765625, y: 0.890625 }, - { x: 0.765625, y: 0.890625 }, - { x: 0.796875, y: 0.890625 }, - { x: 0.796875, y: 0.890625 }, - { x: 0.828125, y: 0.890625 }, - { x: 0.828125, y: 0.890625 }, - { x: 0.859375, y: 0.890625 }, - { x: 0.859375, y: 0.890625 }, - { x: 0.890625, y: 0.890625 }, - { x: 0.890625, y: 0.890625 }, - { x: 0.921875, y: 0.890625 }, - { x: 0.921875, y: 0.890625 }, - { x: 0.953125, y: 0.890625 }, - { x: 0.953125, y: 0.890625 }, - { x: 0.984375, y: 0.890625 }, - { x: 0.984375, y: 0.890625 }, - { x: 0.015625, y: 0.921875 }, - { x: 0.015625, y: 0.921875 }, - { x: 0.046875, y: 0.921875 }, - { x: 0.046875, y: 0.921875 }, - { x: 0.078125, y: 0.921875 }, - { x: 0.078125, y: 0.921875 }, - { x: 0.109375, y: 0.921875 }, - { x: 0.109375, y: 0.921875 }, - { x: 0.140625, y: 0.921875 }, - { x: 0.140625, y: 0.921875 }, - { x: 0.171875, y: 0.921875 }, - { x: 0.171875, y: 0.921875 }, - { x: 0.203125, y: 0.921875 }, - { x: 0.203125, y: 0.921875 }, - { x: 0.234375, y: 0.921875 }, - { x: 0.234375, y: 0.921875 }, - { x: 0.265625, y: 0.921875 }, - { x: 0.265625, y: 0.921875 }, - { x: 0.296875, y: 0.921875 }, - { x: 0.296875, y: 0.921875 }, - { x: 0.328125, y: 0.921875 }, - { x: 0.328125, y: 0.921875 }, - { x: 0.359375, y: 0.921875 }, - { x: 0.359375, y: 0.921875 }, - { x: 0.390625, y: 0.921875 }, - { x: 0.390625, y: 0.921875 }, - { x: 0.421875, y: 0.921875 }, - { x: 0.421875, y: 0.921875 }, - { x: 0.453125, y: 0.921875 }, - { x: 0.453125, y: 0.921875 }, - { x: 0.484375, y: 0.921875 }, - { x: 0.484375, y: 0.921875 }, - { x: 0.515625, y: 0.921875 }, - { x: 0.515625, y: 0.921875 }, - { x: 0.546875, y: 0.921875 }, - { x: 0.546875, y: 0.921875 }, - { x: 0.578125, y: 0.921875 }, - { x: 0.578125, y: 0.921875 }, - { x: 0.609375, y: 0.921875 }, - { x: 0.609375, y: 0.921875 }, - { x: 0.640625, y: 0.921875 }, - { x: 0.640625, y: 0.921875 }, - { x: 0.671875, y: 0.921875 }, - { x: 0.671875, y: 0.921875 }, - { x: 0.703125, y: 0.921875 }, - { x: 0.703125, y: 0.921875 }, - { x: 0.734375, y: 0.921875 }, - { x: 0.734375, y: 0.921875 }, - { x: 0.765625, y: 0.921875 }, - { x: 0.765625, y: 0.921875 }, - { x: 0.796875, y: 0.921875 }, - { x: 0.796875, y: 0.921875 }, - { x: 0.828125, y: 0.921875 }, - { x: 0.828125, y: 0.921875 }, - { x: 0.859375, y: 0.921875 }, - { x: 0.859375, y: 0.921875 }, - { x: 0.890625, y: 0.921875 }, - { x: 0.890625, y: 0.921875 }, - { x: 0.921875, y: 0.921875 }, - { x: 0.921875, y: 0.921875 }, - { x: 0.953125, y: 0.921875 }, - { x: 0.953125, y: 0.921875 }, - { x: 0.984375, y: 0.921875 }, - { x: 0.984375, y: 0.921875 }, - { x: 0.015625, y: 0.953125 }, - { x: 0.015625, y: 0.953125 }, - { x: 0.046875, y: 0.953125 }, - { x: 0.046875, y: 0.953125 }, - { x: 0.078125, y: 0.953125 }, - { x: 0.078125, y: 0.953125 }, - { x: 0.109375, y: 0.953125 }, - { x: 0.109375, y: 0.953125 }, - { x: 0.140625, y: 0.953125 }, - { x: 0.140625, y: 0.953125 }, - { x: 0.171875, y: 0.953125 }, - { x: 0.171875, y: 0.953125 }, - { x: 0.203125, y: 0.953125 }, - { x: 0.203125, y: 0.953125 }, - { x: 0.234375, y: 0.953125 }, - { x: 0.234375, y: 0.953125 }, - { x: 0.265625, y: 0.953125 }, - { x: 0.265625, y: 0.953125 }, - { x: 0.296875, y: 0.953125 }, - { x: 0.296875, y: 0.953125 }, - { x: 0.328125, y: 0.953125 }, - { x: 0.328125, y: 0.953125 }, - { x: 0.359375, y: 0.953125 }, - { x: 0.359375, y: 0.953125 }, - { x: 0.390625, y: 0.953125 }, - { x: 0.390625, y: 0.953125 }, - { x: 0.421875, y: 0.953125 }, - { x: 0.421875, y: 0.953125 }, - { x: 0.453125, y: 0.953125 }, - { x: 0.453125, y: 0.953125 }, - { x: 0.484375, y: 0.953125 }, - { x: 0.484375, y: 0.953125 }, - { x: 0.515625, y: 0.953125 }, - { x: 0.515625, y: 0.953125 }, - { x: 0.546875, y: 0.953125 }, - { x: 0.546875, y: 0.953125 }, - { x: 0.578125, y: 0.953125 }, - { x: 0.578125, y: 0.953125 }, - { x: 0.609375, y: 0.953125 }, - { x: 0.609375, y: 0.953125 }, - { x: 0.640625, y: 0.953125 }, - { x: 0.640625, y: 0.953125 }, - { x: 0.671875, y: 0.953125 }, - { x: 0.671875, y: 0.953125 }, - { x: 0.703125, y: 0.953125 }, - { x: 0.703125, y: 0.953125 }, - { x: 0.734375, y: 0.953125 }, - { x: 0.734375, y: 0.953125 }, - { x: 0.765625, y: 0.953125 }, - { x: 0.765625, y: 0.953125 }, - { x: 0.796875, y: 0.953125 }, - { x: 0.796875, y: 0.953125 }, - { x: 0.828125, y: 0.953125 }, - { x: 0.828125, y: 0.953125 }, - { x: 0.859375, y: 0.953125 }, - { x: 0.859375, y: 0.953125 }, - { x: 0.890625, y: 0.953125 }, - { x: 0.890625, y: 0.953125 }, - { x: 0.921875, y: 0.953125 }, - { x: 0.921875, y: 0.953125 }, - { x: 0.953125, y: 0.953125 }, - { x: 0.953125, y: 0.953125 }, - { x: 0.984375, y: 0.953125 }, - { x: 0.984375, y: 0.953125 }, - { x: 0.015625, y: 0.984375 }, - { x: 0.015625, y: 0.984375 }, - { x: 0.046875, y: 0.984375 }, - { x: 0.046875, y: 0.984375 }, - { x: 0.078125, y: 0.984375 }, - { x: 0.078125, y: 0.984375 }, - { x: 0.109375, y: 0.984375 }, - { x: 0.109375, y: 0.984375 }, - { x: 0.140625, y: 0.984375 }, - { x: 0.140625, y: 0.984375 }, - { x: 0.171875, y: 0.984375 }, - { x: 0.171875, y: 0.984375 }, - { x: 0.203125, y: 0.984375 }, - { x: 0.203125, y: 0.984375 }, - { x: 0.234375, y: 0.984375 }, - { x: 0.234375, y: 0.984375 }, - { x: 0.265625, y: 0.984375 }, - { x: 0.265625, y: 0.984375 }, - { x: 0.296875, y: 0.984375 }, - { x: 0.296875, y: 0.984375 }, - { x: 0.328125, y: 0.984375 }, - { x: 0.328125, y: 0.984375 }, - { x: 0.359375, y: 0.984375 }, - { x: 0.359375, y: 0.984375 }, - { x: 0.390625, y: 0.984375 }, - { x: 0.390625, y: 0.984375 }, - { x: 0.421875, y: 0.984375 }, - { x: 0.421875, y: 0.984375 }, - { x: 0.453125, y: 0.984375 }, - { x: 0.453125, y: 0.984375 }, - { x: 0.484375, y: 0.984375 }, - { x: 0.484375, y: 0.984375 }, - { x: 0.515625, y: 0.984375 }, - { x: 0.515625, y: 0.984375 }, - { x: 0.546875, y: 0.984375 }, - { x: 0.546875, y: 0.984375 }, - { x: 0.578125, y: 0.984375 }, - { x: 0.578125, y: 0.984375 }, - { x: 0.609375, y: 0.984375 }, - { x: 0.609375, y: 0.984375 }, - { x: 0.640625, y: 0.984375 }, - { x: 0.640625, y: 0.984375 }, - { x: 0.671875, y: 0.984375 }, - { x: 0.671875, y: 0.984375 }, - { x: 0.703125, y: 0.984375 }, - { x: 0.703125, y: 0.984375 }, - { x: 0.734375, y: 0.984375 }, - { x: 0.734375, y: 0.984375 }, - { x: 0.765625, y: 0.984375 }, - { x: 0.765625, y: 0.984375 }, - { x: 0.796875, y: 0.984375 }, - { x: 0.796875, y: 0.984375 }, - { x: 0.828125, y: 0.984375 }, - { x: 0.828125, y: 0.984375 }, - { x: 0.859375, y: 0.984375 }, - { x: 0.859375, y: 0.984375 }, - { x: 0.890625, y: 0.984375 }, - { x: 0.890625, y: 0.984375 }, - { x: 0.921875, y: 0.984375 }, - { x: 0.921875, y: 0.984375 }, - { x: 0.953125, y: 0.984375 }, - { x: 0.953125, y: 0.984375 }, - { x: 0.984375, y: 0.984375 }, - { x: 0.984375, y: 0.984375 }, - { x: 0.03125, y: 0.03125 }, - { x: 0.03125, y: 0.03125 }, - { x: 0.09375, y: 0.03125 }, - { x: 0.09375, y: 0.03125 }, - { x: 0.15625, y: 0.03125 }, - { x: 0.15625, y: 0.03125 }, - { x: 0.21875, y: 0.03125 }, - { x: 0.21875, y: 0.03125 }, - { x: 0.28125, y: 0.03125 }, - { x: 0.28125, y: 0.03125 }, - { x: 0.34375, y: 0.03125 }, - { x: 0.34375, y: 0.03125 }, - { x: 0.40625, y: 0.03125 }, - { x: 0.40625, y: 0.03125 }, - { x: 0.46875, y: 0.03125 }, - { x: 0.46875, y: 0.03125 }, - { x: 0.53125, y: 0.03125 }, - { x: 0.53125, y: 0.03125 }, - { x: 0.59375, y: 0.03125 }, - { x: 0.59375, y: 0.03125 }, - { x: 0.65625, y: 0.03125 }, - { x: 0.65625, y: 0.03125 }, - { x: 0.71875, y: 0.03125 }, - { x: 0.71875, y: 0.03125 }, - { x: 0.78125, y: 0.03125 }, - { x: 0.78125, y: 0.03125 }, - { x: 0.84375, y: 0.03125 }, - { x: 0.84375, y: 0.03125 }, - { x: 0.90625, y: 0.03125 }, - { x: 0.90625, y: 0.03125 }, - { x: 0.96875, y: 0.03125 }, - { x: 0.96875, y: 0.03125 }, - { x: 0.03125, y: 0.09375 }, - { x: 0.03125, y: 0.09375 }, - { x: 0.09375, y: 0.09375 }, - { x: 0.09375, y: 0.09375 }, - { x: 0.15625, y: 0.09375 }, - { x: 0.15625, y: 0.09375 }, - { x: 0.21875, y: 0.09375 }, - { x: 0.21875, y: 0.09375 }, - { x: 0.28125, y: 0.09375 }, - { x: 0.28125, y: 0.09375 }, - { x: 0.34375, y: 0.09375 }, - { x: 0.34375, y: 0.09375 }, - { x: 0.40625, y: 0.09375 }, - { x: 0.40625, y: 0.09375 }, - { x: 0.46875, y: 0.09375 }, - { x: 0.46875, y: 0.09375 }, - { x: 0.53125, y: 0.09375 }, - { x: 0.53125, y: 0.09375 }, - { x: 0.59375, y: 0.09375 }, - { x: 0.59375, y: 0.09375 }, - { x: 0.65625, y: 0.09375 }, - { x: 0.65625, y: 0.09375 }, - { x: 0.71875, y: 0.09375 }, - { x: 0.71875, y: 0.09375 }, - { x: 0.78125, y: 0.09375 }, - { x: 0.78125, y: 0.09375 }, - { x: 0.84375, y: 0.09375 }, - { x: 0.84375, y: 0.09375 }, - { x: 0.90625, y: 0.09375 }, - { x: 0.90625, y: 0.09375 }, - { x: 0.96875, y: 0.09375 }, - { x: 0.96875, y: 0.09375 }, - { x: 0.03125, y: 0.15625 }, - { x: 0.03125, y: 0.15625 }, - { x: 0.09375, y: 0.15625 }, - { x: 0.09375, y: 0.15625 }, - { x: 0.15625, y: 0.15625 }, - { x: 0.15625, y: 0.15625 }, - { x: 0.21875, y: 0.15625 }, - { x: 0.21875, y: 0.15625 }, - { x: 0.28125, y: 0.15625 }, - { x: 0.28125, y: 0.15625 }, - { x: 0.34375, y: 0.15625 }, - { x: 0.34375, y: 0.15625 }, - { x: 0.40625, y: 0.15625 }, - { x: 0.40625, y: 0.15625 }, - { x: 0.46875, y: 0.15625 }, - { x: 0.46875, y: 0.15625 }, - { x: 0.53125, y: 0.15625 }, - { x: 0.53125, y: 0.15625 }, - { x: 0.59375, y: 0.15625 }, - { x: 0.59375, y: 0.15625 }, - { x: 0.65625, y: 0.15625 }, - { x: 0.65625, y: 0.15625 }, - { x: 0.71875, y: 0.15625 }, - { x: 0.71875, y: 0.15625 }, - { x: 0.78125, y: 0.15625 }, - { x: 0.78125, y: 0.15625 }, - { x: 0.84375, y: 0.15625 }, - { x: 0.84375, y: 0.15625 }, - { x: 0.90625, y: 0.15625 }, - { x: 0.90625, y: 0.15625 }, - { x: 0.96875, y: 0.15625 }, - { x: 0.96875, y: 0.15625 }, - { x: 0.03125, y: 0.21875 }, - { x: 0.03125, y: 0.21875 }, - { x: 0.09375, y: 0.21875 }, - { x: 0.09375, y: 0.21875 }, - { x: 0.15625, y: 0.21875 }, - { x: 0.15625, y: 0.21875 }, - { x: 0.21875, y: 0.21875 }, - { x: 0.21875, y: 0.21875 }, - { x: 0.28125, y: 0.21875 }, - { x: 0.28125, y: 0.21875 }, - { x: 0.34375, y: 0.21875 }, - { x: 0.34375, y: 0.21875 }, - { x: 0.40625, y: 0.21875 }, - { x: 0.40625, y: 0.21875 }, - { x: 0.46875, y: 0.21875 }, - { x: 0.46875, y: 0.21875 }, - { x: 0.53125, y: 0.21875 }, - { x: 0.53125, y: 0.21875 }, - { x: 0.59375, y: 0.21875 }, - { x: 0.59375, y: 0.21875 }, - { x: 0.65625, y: 0.21875 }, - { x: 0.65625, y: 0.21875 }, - { x: 0.71875, y: 0.21875 }, - { x: 0.71875, y: 0.21875 }, - { x: 0.78125, y: 0.21875 }, - { x: 0.78125, y: 0.21875 }, - { x: 0.84375, y: 0.21875 }, - { x: 0.84375, y: 0.21875 }, - { x: 0.90625, y: 0.21875 }, - { x: 0.90625, y: 0.21875 }, - { x: 0.96875, y: 0.21875 }, - { x: 0.96875, y: 0.21875 }, - { x: 0.03125, y: 0.28125 }, - { x: 0.03125, y: 0.28125 }, - { x: 0.09375, y: 0.28125 }, - { x: 0.09375, y: 0.28125 }, - { x: 0.15625, y: 0.28125 }, - { x: 0.15625, y: 0.28125 }, - { x: 0.21875, y: 0.28125 }, - { x: 0.21875, y: 0.28125 }, - { x: 0.28125, y: 0.28125 }, - { x: 0.28125, y: 0.28125 }, - { x: 0.34375, y: 0.28125 }, - { x: 0.34375, y: 0.28125 }, - { x: 0.40625, y: 0.28125 }, - { x: 0.40625, y: 0.28125 }, - { x: 0.46875, y: 0.28125 }, - { x: 0.46875, y: 0.28125 }, - { x: 0.53125, y: 0.28125 }, - { x: 0.53125, y: 0.28125 }, - { x: 0.59375, y: 0.28125 }, - { x: 0.59375, y: 0.28125 }, - { x: 0.65625, y: 0.28125 }, - { x: 0.65625, y: 0.28125 }, - { x: 0.71875, y: 0.28125 }, - { x: 0.71875, y: 0.28125 }, - { x: 0.78125, y: 0.28125 }, - { x: 0.78125, y: 0.28125 }, - { x: 0.84375, y: 0.28125 }, - { x: 0.84375, y: 0.28125 }, - { x: 0.90625, y: 0.28125 }, - { x: 0.90625, y: 0.28125 }, - { x: 0.96875, y: 0.28125 }, - { x: 0.96875, y: 0.28125 }, - { x: 0.03125, y: 0.34375 }, - { x: 0.03125, y: 0.34375 }, - { x: 0.09375, y: 0.34375 }, - { x: 0.09375, y: 0.34375 }, - { x: 0.15625, y: 0.34375 }, - { x: 0.15625, y: 0.34375 }, - { x: 0.21875, y: 0.34375 }, - { x: 0.21875, y: 0.34375 }, - { x: 0.28125, y: 0.34375 }, - { x: 0.28125, y: 0.34375 }, - { x: 0.34375, y: 0.34375 }, - { x: 0.34375, y: 0.34375 }, - { x: 0.40625, y: 0.34375 }, - { x: 0.40625, y: 0.34375 }, - { x: 0.46875, y: 0.34375 }, - { x: 0.46875, y: 0.34375 }, - { x: 0.53125, y: 0.34375 }, - { x: 0.53125, y: 0.34375 }, - { x: 0.59375, y: 0.34375 }, - { x: 0.59375, y: 0.34375 }, - { x: 0.65625, y: 0.34375 }, - { x: 0.65625, y: 0.34375 }, - { x: 0.71875, y: 0.34375 }, - { x: 0.71875, y: 0.34375 }, - { x: 0.78125, y: 0.34375 }, - { x: 0.78125, y: 0.34375 }, - { x: 0.84375, y: 0.34375 }, - { x: 0.84375, y: 0.34375 }, - { x: 0.90625, y: 0.34375 }, - { x: 0.90625, y: 0.34375 }, - { x: 0.96875, y: 0.34375 }, - { x: 0.96875, y: 0.34375 }, - { x: 0.03125, y: 0.40625 }, - { x: 0.03125, y: 0.40625 }, - { x: 0.09375, y: 0.40625 }, - { x: 0.09375, y: 0.40625 }, - { x: 0.15625, y: 0.40625 }, - { x: 0.15625, y: 0.40625 }, - { x: 0.21875, y: 0.40625 }, - { x: 0.21875, y: 0.40625 }, - { x: 0.28125, y: 0.40625 }, - { x: 0.28125, y: 0.40625 }, - { x: 0.34375, y: 0.40625 }, - { x: 0.34375, y: 0.40625 }, - { x: 0.40625, y: 0.40625 }, - { x: 0.40625, y: 0.40625 }, - { x: 0.46875, y: 0.40625 }, - { x: 0.46875, y: 0.40625 }, - { x: 0.53125, y: 0.40625 }, - { x: 0.53125, y: 0.40625 }, - { x: 0.59375, y: 0.40625 }, - { x: 0.59375, y: 0.40625 }, - { x: 0.65625, y: 0.40625 }, - { x: 0.65625, y: 0.40625 }, - { x: 0.71875, y: 0.40625 }, - { x: 0.71875, y: 0.40625 }, - { x: 0.78125, y: 0.40625 }, - { x: 0.78125, y: 0.40625 }, - { x: 0.84375, y: 0.40625 }, - { x: 0.84375, y: 0.40625 }, - { x: 0.90625, y: 0.40625 }, - { x: 0.90625, y: 0.40625 }, - { x: 0.96875, y: 0.40625 }, - { x: 0.96875, y: 0.40625 }, - { x: 0.03125, y: 0.46875 }, - { x: 0.03125, y: 0.46875 }, - { x: 0.09375, y: 0.46875 }, - { x: 0.09375, y: 0.46875 }, - { x: 0.15625, y: 0.46875 }, - { x: 0.15625, y: 0.46875 }, - { x: 0.21875, y: 0.46875 }, - { x: 0.21875, y: 0.46875 }, - { x: 0.28125, y: 0.46875 }, - { x: 0.28125, y: 0.46875 }, - { x: 0.34375, y: 0.46875 }, - { x: 0.34375, y: 0.46875 }, - { x: 0.40625, y: 0.46875 }, - { x: 0.40625, y: 0.46875 }, - { x: 0.46875, y: 0.46875 }, - { x: 0.46875, y: 0.46875 }, - { x: 0.53125, y: 0.46875 }, - { x: 0.53125, y: 0.46875 }, - { x: 0.59375, y: 0.46875 }, - { x: 0.59375, y: 0.46875 }, - { x: 0.65625, y: 0.46875 }, - { x: 0.65625, y: 0.46875 }, - { x: 0.71875, y: 0.46875 }, - { x: 0.71875, y: 0.46875 }, - { x: 0.78125, y: 0.46875 }, - { x: 0.78125, y: 0.46875 }, - { x: 0.84375, y: 0.46875 }, - { x: 0.84375, y: 0.46875 }, - { x: 0.90625, y: 0.46875 }, - { x: 0.90625, y: 0.46875 }, - { x: 0.96875, y: 0.46875 }, - { x: 0.96875, y: 0.46875 }, - { x: 0.03125, y: 0.53125 }, - { x: 0.03125, y: 0.53125 }, - { x: 0.09375, y: 0.53125 }, - { x: 0.09375, y: 0.53125 }, - { x: 0.15625, y: 0.53125 }, - { x: 0.15625, y: 0.53125 }, - { x: 0.21875, y: 0.53125 }, - { x: 0.21875, y: 0.53125 }, - { x: 0.28125, y: 0.53125 }, - { x: 0.28125, y: 0.53125 }, - { x: 0.34375, y: 0.53125 }, - { x: 0.34375, y: 0.53125 }, - { x: 0.40625, y: 0.53125 }, - { x: 0.40625, y: 0.53125 }, - { x: 0.46875, y: 0.53125 }, - { x: 0.46875, y: 0.53125 }, - { x: 0.53125, y: 0.53125 }, - { x: 0.53125, y: 0.53125 }, - { x: 0.59375, y: 0.53125 }, - { x: 0.59375, y: 0.53125 }, - { x: 0.65625, y: 0.53125 }, - { x: 0.65625, y: 0.53125 }, - { x: 0.71875, y: 0.53125 }, - { x: 0.71875, y: 0.53125 }, - { x: 0.78125, y: 0.53125 }, - { x: 0.78125, y: 0.53125 }, - { x: 0.84375, y: 0.53125 }, - { x: 0.84375, y: 0.53125 }, - { x: 0.90625, y: 0.53125 }, - { x: 0.90625, y: 0.53125 }, - { x: 0.96875, y: 0.53125 }, - { x: 0.96875, y: 0.53125 }, - { x: 0.03125, y: 0.59375 }, - { x: 0.03125, y: 0.59375 }, - { x: 0.09375, y: 0.59375 }, - { x: 0.09375, y: 0.59375 }, - { x: 0.15625, y: 0.59375 }, - { x: 0.15625, y: 0.59375 }, - { x: 0.21875, y: 0.59375 }, - { x: 0.21875, y: 0.59375 }, - { x: 0.28125, y: 0.59375 }, - { x: 0.28125, y: 0.59375 }, - { x: 0.34375, y: 0.59375 }, - { x: 0.34375, y: 0.59375 }, - { x: 0.40625, y: 0.59375 }, - { x: 0.40625, y: 0.59375 }, - { x: 0.46875, y: 0.59375 }, - { x: 0.46875, y: 0.59375 }, - { x: 0.53125, y: 0.59375 }, - { x: 0.53125, y: 0.59375 }, - { x: 0.59375, y: 0.59375 }, - { x: 0.59375, y: 0.59375 }, - { x: 0.65625, y: 0.59375 }, - { x: 0.65625, y: 0.59375 }, - { x: 0.71875, y: 0.59375 }, - { x: 0.71875, y: 0.59375 }, - { x: 0.78125, y: 0.59375 }, - { x: 0.78125, y: 0.59375 }, - { x: 0.84375, y: 0.59375 }, - { x: 0.84375, y: 0.59375 }, - { x: 0.90625, y: 0.59375 }, - { x: 0.90625, y: 0.59375 }, - { x: 0.96875, y: 0.59375 }, - { x: 0.96875, y: 0.59375 }, - { x: 0.03125, y: 0.65625 }, - { x: 0.03125, y: 0.65625 }, - { x: 0.09375, y: 0.65625 }, - { x: 0.09375, y: 0.65625 }, - { x: 0.15625, y: 0.65625 }, - { x: 0.15625, y: 0.65625 }, - { x: 0.21875, y: 0.65625 }, - { x: 0.21875, y: 0.65625 }, - { x: 0.28125, y: 0.65625 }, - { x: 0.28125, y: 0.65625 }, - { x: 0.34375, y: 0.65625 }, - { x: 0.34375, y: 0.65625 }, - { x: 0.40625, y: 0.65625 }, - { x: 0.40625, y: 0.65625 }, - { x: 0.46875, y: 0.65625 }, - { x: 0.46875, y: 0.65625 }, - { x: 0.53125, y: 0.65625 }, - { x: 0.53125, y: 0.65625 }, - { x: 0.59375, y: 0.65625 }, - { x: 0.59375, y: 0.65625 }, - { x: 0.65625, y: 0.65625 }, - { x: 0.65625, y: 0.65625 }, - { x: 0.71875, y: 0.65625 }, - { x: 0.71875, y: 0.65625 }, - { x: 0.78125, y: 0.65625 }, - { x: 0.78125, y: 0.65625 }, - { x: 0.84375, y: 0.65625 }, - { x: 0.84375, y: 0.65625 }, - { x: 0.90625, y: 0.65625 }, - { x: 0.90625, y: 0.65625 }, - { x: 0.96875, y: 0.65625 }, - { x: 0.96875, y: 0.65625 }, - { x: 0.03125, y: 0.71875 }, - { x: 0.03125, y: 0.71875 }, - { x: 0.09375, y: 0.71875 }, - { x: 0.09375, y: 0.71875 }, - { x: 0.15625, y: 0.71875 }, - { x: 0.15625, y: 0.71875 }, - { x: 0.21875, y: 0.71875 }, - { x: 0.21875, y: 0.71875 }, - { x: 0.28125, y: 0.71875 }, - { x: 0.28125, y: 0.71875 }, - { x: 0.34375, y: 0.71875 }, - { x: 0.34375, y: 0.71875 }, - { x: 0.40625, y: 0.71875 }, - { x: 0.40625, y: 0.71875 }, - { x: 0.46875, y: 0.71875 }, - { x: 0.46875, y: 0.71875 }, - { x: 0.53125, y: 0.71875 }, - { x: 0.53125, y: 0.71875 }, - { x: 0.59375, y: 0.71875 }, - { x: 0.59375, y: 0.71875 }, - { x: 0.65625, y: 0.71875 }, - { x: 0.65625, y: 0.71875 }, - { x: 0.71875, y: 0.71875 }, - { x: 0.71875, y: 0.71875 }, - { x: 0.78125, y: 0.71875 }, - { x: 0.78125, y: 0.71875 }, - { x: 0.84375, y: 0.71875 }, - { x: 0.84375, y: 0.71875 }, - { x: 0.90625, y: 0.71875 }, - { x: 0.90625, y: 0.71875 }, - { x: 0.96875, y: 0.71875 }, - { x: 0.96875, y: 0.71875 }, - { x: 0.03125, y: 0.78125 }, - { x: 0.03125, y: 0.78125 }, - { x: 0.09375, y: 0.78125 }, - { x: 0.09375, y: 0.78125 }, - { x: 0.15625, y: 0.78125 }, - { x: 0.15625, y: 0.78125 }, - { x: 0.21875, y: 0.78125 }, - { x: 0.21875, y: 0.78125 }, - { x: 0.28125, y: 0.78125 }, - { x: 0.28125, y: 0.78125 }, - { x: 0.34375, y: 0.78125 }, - { x: 0.34375, y: 0.78125 }, - { x: 0.40625, y: 0.78125 }, - { x: 0.40625, y: 0.78125 }, - { x: 0.46875, y: 0.78125 }, - { x: 0.46875, y: 0.78125 }, - { x: 0.53125, y: 0.78125 }, - { x: 0.53125, y: 0.78125 }, - { x: 0.59375, y: 0.78125 }, - { x: 0.59375, y: 0.78125 }, - { x: 0.65625, y: 0.78125 }, - { x: 0.65625, y: 0.78125 }, - { x: 0.71875, y: 0.78125 }, - { x: 0.71875, y: 0.78125 }, - { x: 0.78125, y: 0.78125 }, - { x: 0.78125, y: 0.78125 }, - { x: 0.84375, y: 0.78125 }, - { x: 0.84375, y: 0.78125 }, - { x: 0.90625, y: 0.78125 }, - { x: 0.90625, y: 0.78125 }, - { x: 0.96875, y: 0.78125 }, - { x: 0.96875, y: 0.78125 }, - { x: 0.03125, y: 0.84375 }, - { x: 0.03125, y: 0.84375 }, - { x: 0.09375, y: 0.84375 }, - { x: 0.09375, y: 0.84375 }, - { x: 0.15625, y: 0.84375 }, - { x: 0.15625, y: 0.84375 }, - { x: 0.21875, y: 0.84375 }, - { x: 0.21875, y: 0.84375 }, - { x: 0.28125, y: 0.84375 }, - { x: 0.28125, y: 0.84375 }, - { x: 0.34375, y: 0.84375 }, - { x: 0.34375, y: 0.84375 }, - { x: 0.40625, y: 0.84375 }, - { x: 0.40625, y: 0.84375 }, - { x: 0.46875, y: 0.84375 }, - { x: 0.46875, y: 0.84375 }, - { x: 0.53125, y: 0.84375 }, - { x: 0.53125, y: 0.84375 }, - { x: 0.59375, y: 0.84375 }, - { x: 0.59375, y: 0.84375 }, - { x: 0.65625, y: 0.84375 }, - { x: 0.65625, y: 0.84375 }, - { x: 0.71875, y: 0.84375 }, - { x: 0.71875, y: 0.84375 }, - { x: 0.78125, y: 0.84375 }, - { x: 0.78125, y: 0.84375 }, - { x: 0.84375, y: 0.84375 }, - { x: 0.84375, y: 0.84375 }, - { x: 0.90625, y: 0.84375 }, - { x: 0.90625, y: 0.84375 }, - { x: 0.96875, y: 0.84375 }, - { x: 0.96875, y: 0.84375 }, - { x: 0.03125, y: 0.90625 }, - { x: 0.03125, y: 0.90625 }, - { x: 0.09375, y: 0.90625 }, - { x: 0.09375, y: 0.90625 }, - { x: 0.15625, y: 0.90625 }, - { x: 0.15625, y: 0.90625 }, - { x: 0.21875, y: 0.90625 }, - { x: 0.21875, y: 0.90625 }, - { x: 0.28125, y: 0.90625 }, - { x: 0.28125, y: 0.90625 }, - { x: 0.34375, y: 0.90625 }, - { x: 0.34375, y: 0.90625 }, - { x: 0.40625, y: 0.90625 }, - { x: 0.40625, y: 0.90625 }, - { x: 0.46875, y: 0.90625 }, - { x: 0.46875, y: 0.90625 }, - { x: 0.53125, y: 0.90625 }, - { x: 0.53125, y: 0.90625 }, - { x: 0.59375, y: 0.90625 }, - { x: 0.59375, y: 0.90625 }, - { x: 0.65625, y: 0.90625 }, - { x: 0.65625, y: 0.90625 }, - { x: 0.71875, y: 0.90625 }, - { x: 0.71875, y: 0.90625 }, - { x: 0.78125, y: 0.90625 }, - { x: 0.78125, y: 0.90625 }, - { x: 0.84375, y: 0.90625 }, - { x: 0.84375, y: 0.90625 }, - { x: 0.90625, y: 0.90625 }, - { x: 0.90625, y: 0.90625 }, - { x: 0.96875, y: 0.90625 }, - { x: 0.96875, y: 0.90625 }, - { x: 0.03125, y: 0.96875 }, - { x: 0.03125, y: 0.96875 }, - { x: 0.09375, y: 0.96875 }, - { x: 0.09375, y: 0.96875 }, - { x: 0.15625, y: 0.96875 }, - { x: 0.15625, y: 0.96875 }, - { x: 0.21875, y: 0.96875 }, - { x: 0.21875, y: 0.96875 }, - { x: 0.28125, y: 0.96875 }, - { x: 0.28125, y: 0.96875 }, - { x: 0.34375, y: 0.96875 }, - { x: 0.34375, y: 0.96875 }, - { x: 0.40625, y: 0.96875 }, - { x: 0.40625, y: 0.96875 }, - { x: 0.46875, y: 0.96875 }, - { x: 0.46875, y: 0.96875 }, - { x: 0.53125, y: 0.96875 }, - { x: 0.53125, y: 0.96875 }, - { x: 0.59375, y: 0.96875 }, - { x: 0.59375, y: 0.96875 }, - { x: 0.65625, y: 0.96875 }, - { x: 0.65625, y: 0.96875 }, - { x: 0.71875, y: 0.96875 }, - { x: 0.71875, y: 0.96875 }, - { x: 0.78125, y: 0.96875 }, - { x: 0.78125, y: 0.96875 }, - { x: 0.84375, y: 0.96875 }, - { x: 0.84375, y: 0.96875 }, - { x: 0.90625, y: 0.96875 }, - { x: 0.90625, y: 0.96875 }, - { x: 0.96875, y: 0.96875 }, - { x: 0.96875, y: 0.96875 }, - { x: 0.0625, y: 0.0625 }, - { x: 0.0625, y: 0.0625 }, - { x: 0.0625, y: 0.0625 }, - { x: 0.0625, y: 0.0625 }, - { x: 0.0625, y: 0.0625 }, - { x: 0.0625, y: 0.0625 }, - { x: 0.1875, y: 0.0625 }, - { x: 0.1875, y: 0.0625 }, - { x: 0.1875, y: 0.0625 }, - { x: 0.1875, y: 0.0625 }, - { x: 0.1875, y: 0.0625 }, - { x: 0.1875, y: 0.0625 }, - { x: 0.3125, y: 0.0625 }, - { x: 0.3125, y: 0.0625 }, - { x: 0.3125, y: 0.0625 }, - { x: 0.3125, y: 0.0625 }, - { x: 0.3125, y: 0.0625 }, - { x: 0.3125, y: 0.0625 }, - { x: 0.4375, y: 0.0625 }, - { x: 0.4375, y: 0.0625 }, - { x: 0.4375, y: 0.0625 }, - { x: 0.4375, y: 0.0625 }, - { x: 0.4375, y: 0.0625 }, - { x: 0.4375, y: 0.0625 }, - { x: 0.5625, y: 0.0625 }, - { x: 0.5625, y: 0.0625 }, - { x: 0.5625, y: 0.0625 }, - { x: 0.5625, y: 0.0625 }, - { x: 0.5625, y: 0.0625 }, - { x: 0.5625, y: 0.0625 }, - { x: 0.6875, y: 0.0625 }, - { x: 0.6875, y: 0.0625 }, - { x: 0.6875, y: 0.0625 }, - { x: 0.6875, y: 0.0625 }, - { x: 0.6875, y: 0.0625 }, - { x: 0.6875, y: 0.0625 }, - { x: 0.8125, y: 0.0625 }, - { x: 0.8125, y: 0.0625 }, - { x: 0.8125, y: 0.0625 }, - { x: 0.8125, y: 0.0625 }, - { x: 0.8125, y: 0.0625 }, - { x: 0.8125, y: 0.0625 }, - { x: 0.9375, y: 0.0625 }, - { x: 0.9375, y: 0.0625 }, - { x: 0.9375, y: 0.0625 }, - { x: 0.9375, y: 0.0625 }, - { x: 0.9375, y: 0.0625 }, - { x: 0.9375, y: 0.0625 }, - { x: 0.0625, y: 0.1875 }, - { x: 0.0625, y: 0.1875 }, - { x: 0.0625, y: 0.1875 }, - { x: 0.0625, y: 0.1875 }, - { x: 0.0625, y: 0.1875 }, - { x: 0.0625, y: 0.1875 }, - { x: 0.1875, y: 0.1875 }, - { x: 0.1875, y: 0.1875 }, - { x: 0.1875, y: 0.1875 }, - { x: 0.1875, y: 0.1875 }, - { x: 0.1875, y: 0.1875 }, - { x: 0.1875, y: 0.1875 }, - { x: 0.3125, y: 0.1875 }, - { x: 0.3125, y: 0.1875 }, - { x: 0.3125, y: 0.1875 }, - { x: 0.3125, y: 0.1875 }, - { x: 0.3125, y: 0.1875 }, - { x: 0.3125, y: 0.1875 }, - { x: 0.4375, y: 0.1875 }, - { x: 0.4375, y: 0.1875 }, - { x: 0.4375, y: 0.1875 }, - { x: 0.4375, y: 0.1875 }, - { x: 0.4375, y: 0.1875 }, - { x: 0.4375, y: 0.1875 }, - { x: 0.5625, y: 0.1875 }, - { x: 0.5625, y: 0.1875 }, - { x: 0.5625, y: 0.1875 }, - { x: 0.5625, y: 0.1875 }, - { x: 0.5625, y: 0.1875 }, - { x: 0.5625, y: 0.1875 }, - { x: 0.6875, y: 0.1875 }, - { x: 0.6875, y: 0.1875 }, - { x: 0.6875, y: 0.1875 }, - { x: 0.6875, y: 0.1875 }, - { x: 0.6875, y: 0.1875 }, - { x: 0.6875, y: 0.1875 }, - { x: 0.8125, y: 0.1875 }, - { x: 0.8125, y: 0.1875 }, - { x: 0.8125, y: 0.1875 }, - { x: 0.8125, y: 0.1875 }, - { x: 0.8125, y: 0.1875 }, - { x: 0.8125, y: 0.1875 }, - { x: 0.9375, y: 0.1875 }, - { x: 0.9375, y: 0.1875 }, - { x: 0.9375, y: 0.1875 }, - { x: 0.9375, y: 0.1875 }, - { x: 0.9375, y: 0.1875 }, - { x: 0.9375, y: 0.1875 }, - { x: 0.0625, y: 0.3125 }, - { x: 0.0625, y: 0.3125 }, - { x: 0.0625, y: 0.3125 }, - { x: 0.0625, y: 0.3125 }, - { x: 0.0625, y: 0.3125 }, - { x: 0.0625, y: 0.3125 }, - { x: 0.1875, y: 0.3125 }, - { x: 0.1875, y: 0.3125 }, - { x: 0.1875, y: 0.3125 }, - { x: 0.1875, y: 0.3125 }, - { x: 0.1875, y: 0.3125 }, - { x: 0.1875, y: 0.3125 }, - { x: 0.3125, y: 0.3125 }, - { x: 0.3125, y: 0.3125 }, - { x: 0.3125, y: 0.3125 }, - { x: 0.3125, y: 0.3125 }, - { x: 0.3125, y: 0.3125 }, - { x: 0.3125, y: 0.3125 }, - { x: 0.4375, y: 0.3125 }, - { x: 0.4375, y: 0.3125 }, - { x: 0.4375, y: 0.3125 }, - { x: 0.4375, y: 0.3125 }, - { x: 0.4375, y: 0.3125 }, - { x: 0.4375, y: 0.3125 }, - { x: 0.5625, y: 0.3125 }, - { x: 0.5625, y: 0.3125 }, - { x: 0.5625, y: 0.3125 }, - { x: 0.5625, y: 0.3125 }, - { x: 0.5625, y: 0.3125 }, - { x: 0.5625, y: 0.3125 }, - { x: 0.6875, y: 0.3125 }, - { x: 0.6875, y: 0.3125 }, - { x: 0.6875, y: 0.3125 }, - { x: 0.6875, y: 0.3125 }, - { x: 0.6875, y: 0.3125 }, - { x: 0.6875, y: 0.3125 }, - { x: 0.8125, y: 0.3125 }, - { x: 0.8125, y: 0.3125 }, - { x: 0.8125, y: 0.3125 }, - { x: 0.8125, y: 0.3125 }, - { x: 0.8125, y: 0.3125 }, - { x: 0.8125, y: 0.3125 }, - { x: 0.9375, y: 0.3125 }, - { x: 0.9375, y: 0.3125 }, - { x: 0.9375, y: 0.3125 }, - { x: 0.9375, y: 0.3125 }, - { x: 0.9375, y: 0.3125 }, - { x: 0.9375, y: 0.3125 }, - { x: 0.0625, y: 0.4375 }, - { x: 0.0625, y: 0.4375 }, - { x: 0.0625, y: 0.4375 }, - { x: 0.0625, y: 0.4375 }, - { x: 0.0625, y: 0.4375 }, - { x: 0.0625, y: 0.4375 }, - { x: 0.1875, y: 0.4375 }, - { x: 0.1875, y: 0.4375 }, - { x: 0.1875, y: 0.4375 }, - { x: 0.1875, y: 0.4375 }, - { x: 0.1875, y: 0.4375 }, - { x: 0.1875, y: 0.4375 }, - { x: 0.3125, y: 0.4375 }, - { x: 0.3125, y: 0.4375 }, - { x: 0.3125, y: 0.4375 }, - { x: 0.3125, y: 0.4375 }, - { x: 0.3125, y: 0.4375 }, - { x: 0.3125, y: 0.4375 }, - { x: 0.4375, y: 0.4375 }, - { x: 0.4375, y: 0.4375 }, - { x: 0.4375, y: 0.4375 }, - { x: 0.4375, y: 0.4375 }, - { x: 0.4375, y: 0.4375 }, - { x: 0.4375, y: 0.4375 }, - { x: 0.5625, y: 0.4375 }, - { x: 0.5625, y: 0.4375 }, - { x: 0.5625, y: 0.4375 }, - { x: 0.5625, y: 0.4375 }, - { x: 0.5625, y: 0.4375 }, - { x: 0.5625, y: 0.4375 }, - { x: 0.6875, y: 0.4375 }, - { x: 0.6875, y: 0.4375 }, - { x: 0.6875, y: 0.4375 }, - { x: 0.6875, y: 0.4375 }, - { x: 0.6875, y: 0.4375 }, - { x: 0.6875, y: 0.4375 }, - { x: 0.8125, y: 0.4375 }, - { x: 0.8125, y: 0.4375 }, - { x: 0.8125, y: 0.4375 }, - { x: 0.8125, y: 0.4375 }, - { x: 0.8125, y: 0.4375 }, - { x: 0.8125, y: 0.4375 }, - { x: 0.9375, y: 0.4375 }, - { x: 0.9375, y: 0.4375 }, - { x: 0.9375, y: 0.4375 }, - { x: 0.9375, y: 0.4375 }, - { x: 0.9375, y: 0.4375 }, - { x: 0.9375, y: 0.4375 }, - { x: 0.0625, y: 0.5625 }, - { x: 0.0625, y: 0.5625 }, - { x: 0.0625, y: 0.5625 }, - { x: 0.0625, y: 0.5625 }, - { x: 0.0625, y: 0.5625 }, - { x: 0.0625, y: 0.5625 }, - { x: 0.1875, y: 0.5625 }, - { x: 0.1875, y: 0.5625 }, - { x: 0.1875, y: 0.5625 }, - { x: 0.1875, y: 0.5625 }, - { x: 0.1875, y: 0.5625 }, - { x: 0.1875, y: 0.5625 }, - { x: 0.3125, y: 0.5625 }, - { x: 0.3125, y: 0.5625 }, - { x: 0.3125, y: 0.5625 }, - { x: 0.3125, y: 0.5625 }, - { x: 0.3125, y: 0.5625 }, - { x: 0.3125, y: 0.5625 }, - { x: 0.4375, y: 0.5625 }, - { x: 0.4375, y: 0.5625 }, - { x: 0.4375, y: 0.5625 }, - { x: 0.4375, y: 0.5625 }, - { x: 0.4375, y: 0.5625 }, - { x: 0.4375, y: 0.5625 }, - { x: 0.5625, y: 0.5625 }, - { x: 0.5625, y: 0.5625 }, - { x: 0.5625, y: 0.5625 }, - { x: 0.5625, y: 0.5625 }, - { x: 0.5625, y: 0.5625 }, - { x: 0.5625, y: 0.5625 }, - { x: 0.6875, y: 0.5625 }, - { x: 0.6875, y: 0.5625 }, - { x: 0.6875, y: 0.5625 }, - { x: 0.6875, y: 0.5625 }, - { x: 0.6875, y: 0.5625 }, - { x: 0.6875, y: 0.5625 }, - { x: 0.8125, y: 0.5625 }, - { x: 0.8125, y: 0.5625 }, - { x: 0.8125, y: 0.5625 }, - { x: 0.8125, y: 0.5625 }, - { x: 0.8125, y: 0.5625 }, - { x: 0.8125, y: 0.5625 }, - { x: 0.9375, y: 0.5625 }, - { x: 0.9375, y: 0.5625 }, - { x: 0.9375, y: 0.5625 }, - { x: 0.9375, y: 0.5625 }, - { x: 0.9375, y: 0.5625 }, - { x: 0.9375, y: 0.5625 }, - { x: 0.0625, y: 0.6875 }, - { x: 0.0625, y: 0.6875 }, - { x: 0.0625, y: 0.6875 }, - { x: 0.0625, y: 0.6875 }, - { x: 0.0625, y: 0.6875 }, - { x: 0.0625, y: 0.6875 }, - { x: 0.1875, y: 0.6875 }, - { x: 0.1875, y: 0.6875 }, - { x: 0.1875, y: 0.6875 }, - { x: 0.1875, y: 0.6875 }, - { x: 0.1875, y: 0.6875 }, - { x: 0.1875, y: 0.6875 }, - { x: 0.3125, y: 0.6875 }, - { x: 0.3125, y: 0.6875 }, - { x: 0.3125, y: 0.6875 }, - { x: 0.3125, y: 0.6875 }, - { x: 0.3125, y: 0.6875 }, - { x: 0.3125, y: 0.6875 }, - { x: 0.4375, y: 0.6875 }, - { x: 0.4375, y: 0.6875 }, - { x: 0.4375, y: 0.6875 }, - { x: 0.4375, y: 0.6875 }, - { x: 0.4375, y: 0.6875 }, - { x: 0.4375, y: 0.6875 }, - { x: 0.5625, y: 0.6875 }, - { x: 0.5625, y: 0.6875 }, - { x: 0.5625, y: 0.6875 }, - { x: 0.5625, y: 0.6875 }, - { x: 0.5625, y: 0.6875 }, - { x: 0.5625, y: 0.6875 }, - { x: 0.6875, y: 0.6875 }, - { x: 0.6875, y: 0.6875 }, - { x: 0.6875, y: 0.6875 }, - { x: 0.6875, y: 0.6875 }, - { x: 0.6875, y: 0.6875 }, - { x: 0.6875, y: 0.6875 }, - { x: 0.8125, y: 0.6875 }, - { x: 0.8125, y: 0.6875 }, - { x: 0.8125, y: 0.6875 }, - { x: 0.8125, y: 0.6875 }, - { x: 0.8125, y: 0.6875 }, - { x: 0.8125, y: 0.6875 }, - { x: 0.9375, y: 0.6875 }, - { x: 0.9375, y: 0.6875 }, - { x: 0.9375, y: 0.6875 }, - { x: 0.9375, y: 0.6875 }, - { x: 0.9375, y: 0.6875 }, - { x: 0.9375, y: 0.6875 }, - { x: 0.0625, y: 0.8125 }, - { x: 0.0625, y: 0.8125 }, - { x: 0.0625, y: 0.8125 }, - { x: 0.0625, y: 0.8125 }, - { x: 0.0625, y: 0.8125 }, - { x: 0.0625, y: 0.8125 }, - { x: 0.1875, y: 0.8125 }, - { x: 0.1875, y: 0.8125 }, - { x: 0.1875, y: 0.8125 }, - { x: 0.1875, y: 0.8125 }, - { x: 0.1875, y: 0.8125 }, - { x: 0.1875, y: 0.8125 }, - { x: 0.3125, y: 0.8125 }, - { x: 0.3125, y: 0.8125 }, - { x: 0.3125, y: 0.8125 }, - { x: 0.3125, y: 0.8125 }, - { x: 0.3125, y: 0.8125 }, - { x: 0.3125, y: 0.8125 }, - { x: 0.4375, y: 0.8125 }, - { x: 0.4375, y: 0.8125 }, - { x: 0.4375, y: 0.8125 }, - { x: 0.4375, y: 0.8125 }, - { x: 0.4375, y: 0.8125 }, - { x: 0.4375, y: 0.8125 }, - { x: 0.5625, y: 0.8125 }, - { x: 0.5625, y: 0.8125 }, - { x: 0.5625, y: 0.8125 }, - { x: 0.5625, y: 0.8125 }, - { x: 0.5625, y: 0.8125 }, - { x: 0.5625, y: 0.8125 }, - { x: 0.6875, y: 0.8125 }, - { x: 0.6875, y: 0.8125 }, - { x: 0.6875, y: 0.8125 }, - { x: 0.6875, y: 0.8125 }, - { x: 0.6875, y: 0.8125 }, - { x: 0.6875, y: 0.8125 }, - { x: 0.8125, y: 0.8125 }, - { x: 0.8125, y: 0.8125 }, - { x: 0.8125, y: 0.8125 }, - { x: 0.8125, y: 0.8125 }, - { x: 0.8125, y: 0.8125 }, - { x: 0.8125, y: 0.8125 }, - { x: 0.9375, y: 0.8125 }, - { x: 0.9375, y: 0.8125 }, - { x: 0.9375, y: 0.8125 }, - { x: 0.9375, y: 0.8125 }, - { x: 0.9375, y: 0.8125 }, - { x: 0.9375, y: 0.8125 }, - { x: 0.0625, y: 0.9375 }, - { x: 0.0625, y: 0.9375 }, - { x: 0.0625, y: 0.9375 }, - { x: 0.0625, y: 0.9375 }, - { x: 0.0625, y: 0.9375 }, - { x: 0.0625, y: 0.9375 }, - { x: 0.1875, y: 0.9375 }, - { x: 0.1875, y: 0.9375 }, - { x: 0.1875, y: 0.9375 }, - { x: 0.1875, y: 0.9375 }, - { x: 0.1875, y: 0.9375 }, - { x: 0.1875, y: 0.9375 }, - { x: 0.3125, y: 0.9375 }, - { x: 0.3125, y: 0.9375 }, - { x: 0.3125, y: 0.9375 }, - { x: 0.3125, y: 0.9375 }, - { x: 0.3125, y: 0.9375 }, - { x: 0.3125, y: 0.9375 }, - { x: 0.4375, y: 0.9375 }, - { x: 0.4375, y: 0.9375 }, - { x: 0.4375, y: 0.9375 }, - { x: 0.4375, y: 0.9375 }, - { x: 0.4375, y: 0.9375 }, - { x: 0.4375, y: 0.9375 }, - { x: 0.5625, y: 0.9375 }, - { x: 0.5625, y: 0.9375 }, - { x: 0.5625, y: 0.9375 }, - { x: 0.5625, y: 0.9375 }, - { x: 0.5625, y: 0.9375 }, - { x: 0.5625, y: 0.9375 }, - { x: 0.6875, y: 0.9375 }, - { x: 0.6875, y: 0.9375 }, - { x: 0.6875, y: 0.9375 }, - { x: 0.6875, y: 0.9375 }, - { x: 0.6875, y: 0.9375 }, - { x: 0.6875, y: 0.9375 }, - { x: 0.8125, y: 0.9375 }, - { x: 0.8125, y: 0.9375 }, - { x: 0.8125, y: 0.9375 }, - { x: 0.8125, y: 0.9375 }, - { x: 0.8125, y: 0.9375 }, - { x: 0.8125, y: 0.9375 }, - { x: 0.9375, y: 0.9375 }, - { x: 0.9375, y: 0.9375 }, - { x: 0.9375, y: 0.9375 }, - { x: 0.9375, y: 0.9375 }, - { x: 0.9375, y: 0.9375 }, - { x: 0.9375, y: 0.9375 } -]; - -// src/hand/handposedetector.ts -var HandDetector = class { - constructor(model21) { - __publicField(this, "model"); - __publicField(this, "anchors"); - __publicField(this, "anchorsTensor"); - __publicField(this, "inputSize"); - __publicField(this, "inputSizeTensor"); - __publicField(this, "doubleInputSizeTensor"); - var _a, _b, _c, _d; - this.model = model21; - this.anchors = anchors2.map((anchor) => [anchor.x, anchor.y]); - this.anchorsTensor = tf19.tensor2d(this.anchors); - this.inputSize = ((_d = (_c = (_b = (_a = this == null ? void 0 : this.model) == null ? void 0 : _a.inputs) == null ? void 0 : _b[0]) == null ? void 0 : _c.shape) == null ? void 0 : _d[2]) || 0; - this.inputSizeTensor = tf19.tensor1d([this.inputSize, this.inputSize]); - this.doubleInputSizeTensor = tf19.tensor1d([this.inputSize * 2, this.inputSize * 2]); - } - normalizeBoxes(boxes) { - const t2 = {}; - t2.boxOffsets = tf19.slice(boxes, [0, 0], [-1, 2]); - t2.boxSizes = tf19.slice(boxes, [0, 2], [-1, 2]); - t2.div = tf19.div(t2.boxOffsets, this.inputSizeTensor); - t2.boxCenterPoints = tf19.add(t2.div, this.anchorsTensor); - t2.halfBoxSizes = tf19.div(t2.boxSizes, this.doubleInputSizeTensor); - t2.sub = tf19.sub(t2.boxCenterPoints, t2.halfBoxSizes); - t2.startPoints = tf19.mul(t2.sub, this.inputSizeTensor); - t2.add = tf19.add(t2.boxCenterPoints, t2.halfBoxSizes); - t2.endPoints = tf19.mul(t2.add, this.inputSizeTensor); - const res = tf19.concat2d([t2.startPoints, t2.endPoints], 1); - Object.keys(t2).forEach((tensor6) => tf19.dispose(t2[tensor6])); - return res; - } - normalizeLandmarks(rawPalmLandmarks, index2) { - const t2 = {}; - t2.reshape = tf19.reshape(rawPalmLandmarks, [-1, 7, 2]); - t2.div = tf19.div(t2.reshape, this.inputSizeTensor); - t2.landmarks = tf19.add(t2.div, this.anchors[index2] ? this.anchors[index2] : 0); - const res = tf19.mul(t2.landmarks, this.inputSizeTensor); - Object.keys(t2).forEach((tensor6) => tf19.dispose(t2[tensor6])); - return res; - } - async predict(input, config3) { - var _a; - const t2 = {}; - t2.resize = tf19.image.resizeBilinear(input, [this.inputSize, this.inputSize]); - t2.div = tf19.div(t2.resize, constants.tf127); - t2.image = tf19.sub(t2.div, constants.tf1); - t2.batched = this.model.execute(t2.image); - t2.predictions = tf19.squeeze(t2.batched); - t2.slice = tf19.slice(t2.predictions, [0, 0], [-1, 1]); - t2.sigmoid = tf19.sigmoid(t2.slice); - t2.scores = tf19.squeeze(t2.sigmoid); - const scores = await t2.scores.data(); - t2.boxes = tf19.slice(t2.predictions, [0, 1], [-1, 4]); - t2.norm = this.normalizeBoxes(t2.boxes); - t2.nms = await tf19.image.nonMaxSuppressionAsync(t2.norm, t2.scores, 3 * (((_a = config3.hand) == null ? void 0 : _a.maxDetected) || 1), config3.hand.iouThreshold, config3.hand.minConfidence); - const nms = await t2.nms.array(); - const hands = []; - for (const index2 of nms) { - const p = {}; - p.box = tf19.slice(t2.norm, [index2, 0], [1, -1]); - p.slice = tf19.slice(t2.predictions, [index2, 5], [1, 14]); - p.norm = this.normalizeLandmarks(p.slice, index2); - p.palmLandmarks = tf19.reshape(p.norm, [-1, 2]); - const box = await p.box.data(); - const startPoint = box.slice(0, 2); - const endPoint = box.slice(2, 4); - const palmLandmarks = await p.palmLandmarks.array(); - const hand3 = { startPoint, endPoint, palmLandmarks, confidence: scores[index2] }; - const scaled = scaleBoxCoordinates2(hand3, [(input.shape[2] || 1) / this.inputSize, (input.shape[1] || 0) / this.inputSize]); - hands.push(scaled); - Object.keys(p).forEach((tensor6) => tf19.dispose(p[tensor6])); - } - Object.keys(t2).forEach((tensor6) => tf19.dispose(t2[tensor6])); - return hands; - } -}; - -// src/hand/handposepipeline.ts -var tf20 = __toESM(require_tfjs_esm()); -var palmBoxEnlargeFactor = 5; -var handBoxEnlargeFactor = 1.65; -var palmLandmarkIds = [0, 5, 9, 13, 17, 1, 2]; -var palmLandmarksPalmBase = 0; -var palmLandmarksMiddleFingerBase = 2; -var lastTime8 = 0; -var HandPipeline = class { - constructor(handDetector, handPoseModel2) { - __publicField(this, "handDetector"); - __publicField(this, "handPoseModel"); - __publicField(this, "inputSize"); - __publicField(this, "storedBoxes"); - __publicField(this, "skipped"); - __publicField(this, "detectedHands"); - var _a, _b, _c; - this.handDetector = handDetector; - this.handPoseModel = handPoseModel2; - this.inputSize = ((_c = (_b = (_a = this.handPoseModel) == null ? void 0 : _a.inputs) == null ? void 0 : _b[0].shape) == null ? void 0 : _c[2]) || 0; - this.storedBoxes = []; - this.skipped = Number.MAX_SAFE_INTEGER; - this.detectedHands = 0; - } - calculateLandmarksBoundingBox(landmarks) { - const xs = landmarks.map((d) => d[0]); - const ys = landmarks.map((d) => d[1]); - const startPoint = [Math.min(...xs), Math.min(...ys)]; - const endPoint = [Math.max(...xs), Math.max(...ys)]; - return { startPoint, endPoint }; - } - getBoxForPalmLandmarks(palmLandmarks, rotationMatrix) { - const rotatedPalmLandmarks = palmLandmarks.map((coord) => rotatePoint2([...coord, 1], rotationMatrix)); - const boxAroundPalm = this.calculateLandmarksBoundingBox(rotatedPalmLandmarks); - return enlargeBox2(squarifyBox2(boxAroundPalm), palmBoxEnlargeFactor); - } - getBoxForHandLandmarks(landmarks) { - const boundingBox = this.calculateLandmarksBoundingBox(landmarks); - const boxAroundHand = enlargeBox2(squarifyBox2(boundingBox), handBoxEnlargeFactor); - boxAroundHand.palmLandmarks = []; - for (let i = 0; i < palmLandmarkIds.length; i++) { - boxAroundHand.palmLandmarks.push(landmarks[palmLandmarkIds[i]].slice(0, 2)); - } - return boxAroundHand; - } - transformRawCoords(rawCoords, box2, angle, rotationMatrix) { - const boxSize = getBoxSize2(box2); - const scaleFactor = [boxSize[0] / this.inputSize, boxSize[1] / this.inputSize, (boxSize[0] + boxSize[1]) / this.inputSize / 2]; - const coordsScaled = rawCoords.map((coord) => [ - scaleFactor[0] * (coord[0] - this.inputSize / 2), - scaleFactor[1] * (coord[1] - this.inputSize / 2), - scaleFactor[2] * coord[2] - ]); - const coordsRotationMatrix = buildRotationMatrix2(angle, [0, 0]); - const coordsRotated = coordsScaled.map((coord) => { - const rotated = rotatePoint2(coord, coordsRotationMatrix); - return [...rotated, coord[2]]; - }); - const inverseRotationMatrix = invertTransformMatrix2(rotationMatrix); - const boxCenter = [...getBoxCenter2(box2), 1]; - const originalBoxCenter = [ - dot2(boxCenter, inverseRotationMatrix[0]), - dot2(boxCenter, inverseRotationMatrix[1]) - ]; - return coordsRotated.map((coord) => [ - Math.trunc(coord[0] + originalBoxCenter[0]), - Math.trunc(coord[1] + originalBoxCenter[1]), - Math.trunc(coord[2]) - ]); - } - async estimateHands(image27, config3) { - let useFreshBox = false; - let boxes; - const skipTime = (config3.hand.skipTime || 0) > now() - lastTime8; - const skipFrame = this.skipped < (config3.hand.skipFrames || 0); - if (config3.skipAllowed && skipTime && skipFrame) { - boxes = await this.handDetector.predict(image27, config3); - this.skipped = 0; - } - if (config3.skipAllowed) - this.skipped++; - if (boxes && boxes.length > 0 && (boxes.length !== this.detectedHands && this.detectedHands !== config3.hand.maxDetected || !config3.hand.landmarks)) { - this.detectedHands = 0; - this.storedBoxes = [...boxes]; - if (this.storedBoxes.length > 0) - useFreshBox = true; - } - const hands = []; - for (let i = 0; i < this.storedBoxes.length; i++) { - const currentBox = this.storedBoxes[i]; - if (!currentBox) - continue; - if (config3.hand.landmarks) { - const angle = config3.hand.rotation ? computeRotation2(currentBox.palmLandmarks[palmLandmarksPalmBase], currentBox.palmLandmarks[palmLandmarksMiddleFingerBase]) : 0; - const palmCenter = getBoxCenter2(currentBox); - const palmCenterNormalized = [palmCenter[0] / image27.shape[2], palmCenter[1] / image27.shape[1]]; - const rotatedImage = config3.hand.rotation && env.kernels.includes("rotatewithoffset") ? tf20.image.rotateWithOffset(image27, angle, 0, palmCenterNormalized) : image27.clone(); - const rotationMatrix = buildRotationMatrix2(-angle, palmCenter); - const newBox = useFreshBox ? this.getBoxForPalmLandmarks(currentBox.palmLandmarks, rotationMatrix) : currentBox; - const croppedInput = cutBoxFromImageAndResize(newBox, rotatedImage, [this.inputSize, this.inputSize]); - const handImage = tf20.div(croppedInput, constants.tf255); - tf20.dispose(croppedInput); - tf20.dispose(rotatedImage); - const [confidenceT, keypoints] = this.handPoseModel.execute(handImage); - lastTime8 = now(); - tf20.dispose(handImage); - const confidence = (await confidenceT.data())[0]; - tf20.dispose(confidenceT); - if (confidence >= config3.hand.minConfidence / 4) { - const keypointsReshaped = tf20.reshape(keypoints, [-1, 3]); - const rawCoords = await keypointsReshaped.array(); - tf20.dispose(keypoints); - tf20.dispose(keypointsReshaped); - const coords = this.transformRawCoords(rawCoords, newBox, angle, rotationMatrix); - const nextBoundingBox = this.getBoxForHandLandmarks(coords); - this.storedBoxes[i] = { ...nextBoundingBox, confidence }; - const result = { - landmarks: coords, - confidence, - boxConfidence: currentBox.confidence, - fingerConfidence: confidence, - box: { topLeft: nextBoundingBox.startPoint, bottomRight: nextBoundingBox.endPoint } - }; - hands.push(result); - } else { - this.storedBoxes[i] = null; - } - tf20.dispose(keypoints); - } else { - const enlarged = enlargeBox2(squarifyBox2(currentBox), handBoxEnlargeFactor); - const result = { - confidence: currentBox.confidence, - boxConfidence: currentBox.confidence, - fingerConfidence: 0, - box: { topLeft: enlarged.startPoint, bottomRight: enlarged.endPoint }, - landmarks: [] - }; - hands.push(result); - } - } - this.storedBoxes = this.storedBoxes.filter((a) => a !== null); - this.detectedHands = hands.length; - if (hands.length > config3.hand.maxDetected) - hands.length = config3.hand.maxDetected; - return hands; - } -}; - -// src/hand/fingerdef.ts -var Finger = { - thumb: 0, - index: 1, - middle: 2, - ring: 3, - pinky: 4, - all: [0, 1, 2, 3, 4], - nameMapping: { 0: "thumb", 1: "index", 2: "middle", 3: "ring", 4: "pinky" }, - pointsMapping: { - 0: [[0, 1], [1, 2], [2, 3], [3, 4]], - 1: [[0, 5], [5, 6], [6, 7], [7, 8]], - 2: [[0, 9], [9, 10], [10, 11], [11, 12]], - 3: [[0, 13], [13, 14], [14, 15], [15, 16]], - 4: [[0, 17], [17, 18], [18, 19], [19, 20]] - }, - getName: (value) => Finger.nameMapping[value], - getPoints: (value) => Finger.pointsMapping[value] -}; -var FingerCurl = { - none: 0, - half: 1, - full: 2, - nameMapping: { 0: "none", 1: "half", 2: "full" }, - getName: (value) => FingerCurl.nameMapping[value] -}; -var FingerDirection = { - verticalUp: 0, - verticalDown: 1, - horizontalLeft: 2, - horizontalRight: 3, - diagonalUpRight: 4, - diagonalUpLeft: 5, - diagonalDownRight: 6, - diagonalDownLeft: 7, - nameMapping: { 0: "verticalUp", 1: "verticalDown", 2: "horizontalLeft", 3: "horizontalRight", 4: "diagonalUpRight", 5: "diagonalUpLeft", 6: "diagonalDownRight", 7: "diagonalDownLeft" }, - getName: (value) => FingerDirection.nameMapping[value] -}; -var FingerGesture = class { - constructor(name) { - __publicField(this, "name"); - __publicField(this, "curls"); - __publicField(this, "directions"); - __publicField(this, "weights"); - __publicField(this, "weightsRelative"); - this.name = name; - this.curls = {}; - this.directions = {}; - this.weights = [1, 1, 1, 1, 1]; - this.weightsRelative = [1, 1, 1, 1, 1]; - } - curl(finger, curl, confidence) { - if (typeof this.curls[finger] === "undefined") - this.curls[finger] = []; - this.curls[finger].push([curl, confidence]); - } - direction(finger, position, confidence) { - if (!this.directions[finger]) - this.directions[finger] = []; - this.directions[finger].push([position, confidence]); - } - weight(finger, weight) { - this.weights[finger] = weight; - const total = this.weights.reduce((a, b) => a + b, 0); - this.weightsRelative = this.weights.map((el) => el * 5 / total); - } - matchAgainst(detectedCurls, detectedDirections) { - let confidence = 0; - for (const fingerIdx in detectedCurls) { - const detectedCurl = detectedCurls[fingerIdx]; - const expectedCurls = this.curls[fingerIdx]; - if (typeof expectedCurls === "undefined") { - confidence += this.weightsRelative[fingerIdx]; - continue; - } - for (const [expectedCurl, score] of expectedCurls) { - if (detectedCurl === expectedCurl) { - confidence += score * this.weightsRelative[fingerIdx]; - break; - } - } - } - for (const fingerIdx in detectedDirections) { - const detectedDirection = detectedDirections[fingerIdx]; - const expectedDirections = this.directions[fingerIdx]; - if (typeof expectedDirections === "undefined") { - confidence += this.weightsRelative[fingerIdx]; - continue; - } - for (const [expectedDirection, score] of expectedDirections) { - if (detectedDirection === expectedDirection) { - confidence += score * this.weightsRelative[fingerIdx]; - break; - } - } - } - return confidence / 10; - } -}; - -// src/hand/fingergesture.ts -var { thumb, index, middle, ring, pinky } = Finger; -var { none, half, full } = FingerCurl; -var { verticalUp, verticalDown, horizontalLeft, horizontalRight, diagonalUpRight, diagonalUpLeft, diagonalDownRight, diagonalDownLeft } = FingerDirection; -var ThumbsUp = new FingerGesture("thumbs up"); -ThumbsUp.curl(thumb, none, 1); -ThumbsUp.direction(thumb, verticalUp, 1); -ThumbsUp.direction(thumb, diagonalUpLeft, 0.25); -ThumbsUp.direction(thumb, diagonalUpRight, 0.25); -for (const finger of [Finger.index, Finger.middle, Finger.ring, Finger.pinky]) { - ThumbsUp.curl(finger, full, 1); - ThumbsUp.direction(finger, horizontalLeft, 1); - ThumbsUp.direction(finger, horizontalRight, 1); -} -var Victory = new FingerGesture("victory"); -Victory.curl(thumb, half, 0.5); -Victory.curl(thumb, none, 0.5); -Victory.direction(thumb, verticalUp, 1); -Victory.direction(thumb, diagonalUpLeft, 1); -Victory.curl(index, none, 1); -Victory.direction(index, verticalUp, 0.75); -Victory.direction(index, diagonalUpLeft, 1); -Victory.curl(middle, none, 1); -Victory.direction(middle, verticalUp, 1); -Victory.direction(middle, diagonalUpLeft, 0.75); -Victory.curl(ring, full, 1); -Victory.direction(ring, verticalUp, 0.2); -Victory.direction(ring, diagonalUpLeft, 1); -Victory.direction(ring, horizontalLeft, 0.2); -Victory.curl(pinky, full, 1); -Victory.direction(pinky, verticalUp, 0.2); -Victory.direction(pinky, diagonalUpLeft, 1); -Victory.direction(pinky, horizontalLeft, 0.2); -Victory.weight(index, 2); -Victory.weight(middle, 2); -var Point = new FingerGesture("point"); -Point.curl(thumb, full, 1); -Point.curl(index, none, 0.5); -Point.curl(middle, full, 0.5); -Point.curl(ring, full, 0.5); -Point.curl(pinky, full, 0.5); -Point.weight(index, 2); -Point.weight(middle, 2); -var MiddleFinger = new FingerGesture("middle finger"); -MiddleFinger.curl(thumb, none, 1); -MiddleFinger.curl(index, full, 0.5); -MiddleFinger.curl(middle, full, 0.5); -MiddleFinger.curl(ring, full, 0.5); -MiddleFinger.curl(pinky, full, 0.5); -MiddleFinger.weight(index, 2); -MiddleFinger.weight(middle, 2); -var OpenPalm = new FingerGesture("open palm"); -OpenPalm.curl(thumb, none, 0.75); -OpenPalm.curl(index, none, 0.75); -OpenPalm.curl(middle, none, 0.75); -OpenPalm.curl(ring, none, 0.75); -OpenPalm.curl(pinky, none, 0.75); -var fingergesture_default = [ThumbsUp, Victory, Point, MiddleFinger, OpenPalm]; - -// src/hand/fingerpose.ts -var minConfidence = 0.7; -var options2 = { - HALF_CURL_START_LIMIT: 60, - NO_CURL_START_LIMIT: 130, - DISTANCE_VOTE_POWER: 1.1, - SINGLE_ANGLE_VOTE_POWER: 0.9, - TOTAL_ANGLE_VOTE_POWER: 1.6 -}; -function calculateSlope(point1x, point1y, point2x, point2y) { - const value = (point1y - point2y) / (point1x - point2x); - let slope = Math.atan(value) * 180 / Math.PI; - if (slope <= 0) - slope = -slope; - else if (slope > 0) - slope = 180 - slope; - return slope; -} -function getSlopes(point1, point2) { - if (!point1 || !point2) - return [0, 0]; - const slopeXY = calculateSlope(point1[0], point1[1], point2[0], point2[1]); - if (point1.length === 2) - return slopeXY; - const slopeYZ = calculateSlope(point1[1], point1[2], point2[1], point2[2]); - return [slopeXY, slopeYZ]; -} -function angleOrientationAt(angle, weightageAt = 1) { - let isVertical = 0; - let isDiagonal = 0; - let isHorizontal = 0; - if (angle >= 75 && angle <= 105) - isVertical = 1 * weightageAt; - else if (angle >= 25 && angle <= 155) - isDiagonal = 1 * weightageAt; - else - isHorizontal = 1 * weightageAt; - return [isVertical, isDiagonal, isHorizontal]; -} -function estimateFingerCurl(startPoint, midPoint, endPoint) { - const start_mid_x_dist = startPoint[0] - midPoint[0]; - const start_end_x_dist = startPoint[0] - endPoint[0]; - const mid_end_x_dist = midPoint[0] - endPoint[0]; - const start_mid_y_dist = startPoint[1] - midPoint[1]; - const start_end_y_dist = startPoint[1] - endPoint[1]; - const mid_end_y_dist = midPoint[1] - endPoint[1]; - const start_mid_z_dist = startPoint[2] - midPoint[2]; - const start_end_z_dist = startPoint[2] - endPoint[2]; - const mid_end_z_dist = midPoint[2] - endPoint[2]; - const start_mid_dist = Math.sqrt(start_mid_x_dist * start_mid_x_dist + start_mid_y_dist * start_mid_y_dist + start_mid_z_dist * start_mid_z_dist); - const start_end_dist = Math.sqrt(start_end_x_dist * start_end_x_dist + start_end_y_dist * start_end_y_dist + start_end_z_dist * start_end_z_dist); - const mid_end_dist = Math.sqrt(mid_end_x_dist * mid_end_x_dist + mid_end_y_dist * mid_end_y_dist + mid_end_z_dist * mid_end_z_dist); - let cos_in = (mid_end_dist * mid_end_dist + start_mid_dist * start_mid_dist - start_end_dist * start_end_dist) / (2 * mid_end_dist * start_mid_dist); - if (cos_in > 1) - cos_in = 1; - else if (cos_in < -1) - cos_in = -1; - let angleOfCurve = Math.acos(cos_in); - angleOfCurve = 57.2958 * angleOfCurve % 180; - let fingerCurl; - if (angleOfCurve > options2.NO_CURL_START_LIMIT) - fingerCurl = FingerCurl.none; - else if (angleOfCurve > options2.HALF_CURL_START_LIMIT) - fingerCurl = FingerCurl.half; - else - fingerCurl = FingerCurl.full; - return fingerCurl; -} -function estimateHorizontalDirection(start_end_x_dist, start_mid_x_dist, mid_end_x_dist, max_dist_x) { - let estimatedDirection; - if (max_dist_x === Math.abs(start_end_x_dist)) { - if (start_end_x_dist > 0) - estimatedDirection = FingerDirection.horizontalLeft; - else - estimatedDirection = FingerDirection.horizontalRight; - } else if (max_dist_x === Math.abs(start_mid_x_dist)) { - if (start_mid_x_dist > 0) - estimatedDirection = FingerDirection.horizontalLeft; - else - estimatedDirection = FingerDirection.horizontalRight; - } else { - if (mid_end_x_dist > 0) - estimatedDirection = FingerDirection.horizontalLeft; - else - estimatedDirection = FingerDirection.horizontalRight; - } - return estimatedDirection; -} -function estimateVerticalDirection(start_end_y_dist, start_mid_y_dist, mid_end_y_dist, max_dist_y) { - let estimatedDirection; - if (max_dist_y === Math.abs(start_end_y_dist)) { - if (start_end_y_dist < 0) - estimatedDirection = FingerDirection.verticalDown; - else - estimatedDirection = FingerDirection.verticalUp; - } else if (max_dist_y === Math.abs(start_mid_y_dist)) { - if (start_mid_y_dist < 0) - estimatedDirection = FingerDirection.verticalDown; - else - estimatedDirection = FingerDirection.verticalUp; - } else { - if (mid_end_y_dist < 0) - estimatedDirection = FingerDirection.verticalDown; - else - estimatedDirection = FingerDirection.verticalUp; - } - return estimatedDirection; -} -function estimateDiagonalDirection(start_end_y_dist, start_mid_y_dist, mid_end_y_dist, max_dist_y, start_end_x_dist, start_mid_x_dist, mid_end_x_dist, max_dist_x) { - let estimatedDirection; - const reqd_vertical_direction = estimateVerticalDirection(start_end_y_dist, start_mid_y_dist, mid_end_y_dist, max_dist_y); - const reqd_horizontal_direction = estimateHorizontalDirection(start_end_x_dist, start_mid_x_dist, mid_end_x_dist, max_dist_x); - if (reqd_vertical_direction === FingerDirection.verticalUp) { - if (reqd_horizontal_direction === FingerDirection.horizontalLeft) - estimatedDirection = FingerDirection.diagonalUpLeft; - else - estimatedDirection = FingerDirection.diagonalUpRight; - } else { - if (reqd_horizontal_direction === FingerDirection.horizontalLeft) - estimatedDirection = FingerDirection.diagonalDownLeft; - else - estimatedDirection = FingerDirection.diagonalDownRight; - } - return estimatedDirection; -} -function calculateFingerDirection(startPoint, midPoint, endPoint, fingerSlopes) { - const start_mid_x_dist = startPoint[0] - midPoint[0]; - const start_end_x_dist = startPoint[0] - endPoint[0]; - const mid_end_x_dist = midPoint[0] - endPoint[0]; - const start_mid_y_dist = startPoint[1] - midPoint[1]; - const start_end_y_dist = startPoint[1] - endPoint[1]; - const mid_end_y_dist = midPoint[1] - endPoint[1]; - const max_dist_x = Math.max(Math.abs(start_mid_x_dist), Math.abs(start_end_x_dist), Math.abs(mid_end_x_dist)); - const max_dist_y = Math.max(Math.abs(start_mid_y_dist), Math.abs(start_end_y_dist), Math.abs(mid_end_y_dist)); - let voteVertical = 0; - let voteDiagonal = 0; - let voteHorizontal = 0; - const start_end_x_y_dist_ratio = max_dist_y / (max_dist_x + 1e-5); - if (start_end_x_y_dist_ratio > 1.5) - voteVertical += options2.DISTANCE_VOTE_POWER; - else if (start_end_x_y_dist_ratio > 0.66) - voteDiagonal += options2.DISTANCE_VOTE_POWER; - else - voteHorizontal += options2.DISTANCE_VOTE_POWER; - const start_mid_dist = Math.sqrt(start_mid_x_dist * start_mid_x_dist + start_mid_y_dist * start_mid_y_dist); - const start_end_dist = Math.sqrt(start_end_x_dist * start_end_x_dist + start_end_y_dist * start_end_y_dist); - const mid_end_dist = Math.sqrt(mid_end_x_dist * mid_end_x_dist + mid_end_y_dist * mid_end_y_dist); - const max_dist = Math.max(start_mid_dist, start_end_dist, mid_end_dist); - let calc_start_point_x = startPoint[0]; - let calc_start_point_y = startPoint[1]; - let calc_end_point_x = endPoint[0]; - let calc_end_point_y = endPoint[1]; - if (max_dist === start_mid_dist) { - calc_end_point_x = endPoint[0]; - calc_end_point_y = endPoint[1]; - } else if (max_dist === mid_end_dist) { - calc_start_point_x = midPoint[0]; - calc_start_point_y = midPoint[1]; - } - const calcStartPoint = [calc_start_point_x, calc_start_point_y]; - const calcEndPoint = [calc_end_point_x, calc_end_point_y]; - const totalAngle = getSlopes(calcStartPoint, calcEndPoint); - const votes = angleOrientationAt(totalAngle, options2.TOTAL_ANGLE_VOTE_POWER); - voteVertical += votes[0]; - voteDiagonal += votes[1]; - voteHorizontal += votes[2]; - for (const fingerSlope of fingerSlopes) { - const fingerVotes = angleOrientationAt(fingerSlope, options2.SINGLE_ANGLE_VOTE_POWER); - voteVertical += fingerVotes[0]; - voteDiagonal += fingerVotes[1]; - voteHorizontal += fingerVotes[2]; - } - let estimatedDirection; - if (voteVertical === Math.max(voteVertical, voteDiagonal, voteHorizontal)) { - estimatedDirection = estimateVerticalDirection(start_end_y_dist, start_mid_y_dist, mid_end_y_dist, max_dist_y); - } else if (voteHorizontal === Math.max(voteDiagonal, voteHorizontal)) { - estimatedDirection = estimateHorizontalDirection(start_end_x_dist, start_mid_x_dist, mid_end_x_dist, max_dist_x); - } else { - estimatedDirection = estimateDiagonalDirection(start_end_y_dist, start_mid_y_dist, mid_end_y_dist, max_dist_y, start_end_x_dist, start_mid_x_dist, mid_end_x_dist, max_dist_x); - } - return estimatedDirection; -} -function estimate(landmarks) { - const slopesXY = []; - const slopesYZ = []; - const fingerCurls = []; - const fingerDirections = []; - if (!landmarks) - return { curls: fingerCurls, directions: fingerDirections }; - for (const finger of Finger.all) { - const points = Finger.getPoints(finger); - const slopeAtXY = []; - const slopeAtYZ = []; - for (const point2 of points) { - const point1 = landmarks[point2[0]]; - const point22 = landmarks[point2[1]]; - const slopes = getSlopes(point1, point22); - const slopeXY = slopes[0]; - const slopeYZ = slopes[1]; - slopeAtXY.push(slopeXY); - slopeAtYZ.push(slopeYZ); - } - slopesXY.push(slopeAtXY); - slopesYZ.push(slopeAtYZ); - } - for (const finger of Finger.all) { - const pointIndexAt = finger === Finger.thumb ? 1 : 0; - const fingerPointsAt = Finger.getPoints(finger); - const startPoint = landmarks[fingerPointsAt[pointIndexAt][0]]; - const midPoint = landmarks[fingerPointsAt[pointIndexAt + 1][1]]; - const endPoint = landmarks[fingerPointsAt[3][1]]; - const fingerCurled = estimateFingerCurl(startPoint, midPoint, endPoint); - const fingerPosition = calculateFingerDirection(startPoint, midPoint, endPoint, slopesXY[finger].slice(pointIndexAt)); - fingerCurls[finger] = fingerCurled; - fingerDirections[finger] = fingerPosition; - } - return { curls: fingerCurls, directions: fingerDirections }; -} -function analyze(keypoints) { - if (!keypoints || keypoints.length === 0) - return null; - const estimatorRes = estimate(keypoints); - const landmarks = {}; - for (const fingerIdx of Finger.all) { - landmarks[Finger.getName(fingerIdx)] = { - curl: FingerCurl.getName(estimatorRes.curls[fingerIdx]), - direction: FingerDirection.getName(estimatorRes.directions[fingerIdx]) - }; - } - return landmarks; -} -function match(keypoints) { - const poses = []; - if (!keypoints || keypoints.length === 0) - return poses; - const estimatorRes = estimate(keypoints); - for (const gesture2 of fingergesture_default) { - const confidence = gesture2.matchAgainst(estimatorRes.curls, estimatorRes.directions); - if (confidence >= minConfidence) - poses.push({ name: gesture2.name, confidence }); - } - return poses; -} - -// src/hand/handpose.ts -var meshAnnotations2 = { - thumb: [1, 2, 3, 4], - index: [5, 6, 7, 8], - middle: [9, 10, 11, 12], - ring: [13, 14, 15, 16], - pinky: [17, 18, 19, 20], - palm: [0] -}; -var handDetectorModel; -var handPoseModel; -var handPipeline; -async function predict9(input, config3) { - const predictions = await handPipeline.estimateHands(input, config3); - if (!predictions) - return []; - const hands = []; - for (let i = 0; i < predictions.length; i++) { - const annotations2 = {}; - if (predictions[i].landmarks) { - for (const key of Object.keys(meshAnnotations2)) { - annotations2[key] = meshAnnotations2[key].map((index2) => predictions[i].landmarks[index2]); - } - } - const keypoints = predictions[i].landmarks; - let box = [Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER, 0, 0]; - let boxRaw = [0, 0, 0, 0]; - if (keypoints && keypoints.length > 0) { - for (const pt of keypoints) { - if (pt[0] < box[0]) - box[0] = pt[0]; - if (pt[1] < box[1]) - box[1] = pt[1]; - if (pt[0] > box[2]) - box[2] = pt[0]; - if (pt[1] > box[3]) - box[3] = pt[1]; - } - box[2] -= box[0]; - box[3] -= box[1]; - boxRaw = [box[0] / (input.shape[2] || 0), box[1] / (input.shape[1] || 0), box[2] / (input.shape[2] || 0), box[3] / (input.shape[1] || 0)]; - } else { - box = predictions[i].box ? [ - Math.trunc(Math.max(0, predictions[i].box.topLeft[0])), - Math.trunc(Math.max(0, predictions[i].box.topLeft[1])), - Math.trunc(Math.min(input.shape[2] || 0, predictions[i].box.bottomRight[0]) - Math.max(0, predictions[i].box.topLeft[0])), - Math.trunc(Math.min(input.shape[1] || 0, predictions[i].box.bottomRight[1]) - Math.max(0, predictions[i].box.topLeft[1])) - ] : [0, 0, 0, 0]; - boxRaw = [ - predictions[i].box.topLeft[0] / (input.shape[2] || 0), - predictions[i].box.topLeft[1] / (input.shape[1] || 0), - (predictions[i].box.bottomRight[0] - predictions[i].box.topLeft[0]) / (input.shape[2] || 0), - (predictions[i].box.bottomRight[1] - predictions[i].box.topLeft[1]) / (input.shape[1] || 0) - ]; - } - const landmarks = analyze(keypoints); - hands.push({ - id: i, - score: Math.round(100 * predictions[i].confidence) / 100, - boxScore: Math.round(100 * predictions[i].boxConfidence) / 100, - fingerScore: Math.round(100 * predictions[i].fingerConfidence) / 100, - label: "hand", - box, - boxRaw, - keypoints, - annotations: annotations2, - landmarks - }); - } - return hands; -} -async function load10(config3) { - var _a, _b; - if (env.initial) { - handDetectorModel = null; - handPoseModel = null; - } - if (!handDetectorModel || !handPoseModel) { - [handDetectorModel, handPoseModel] = await Promise.all([ - config3.hand.enabled ? loadModel((_a = config3.hand.detector) == null ? void 0 : _a.modelPath) : null, - config3.hand.landmarks ? loadModel((_b = config3.hand.skeleton) == null ? void 0 : _b.modelPath) : null - ]); - } else { - if (config3.debug) - log("cached model:", handDetectorModel["modelUrl"]); - if (config3.debug) - log("cached model:", handPoseModel["modelUrl"]); - } - const handDetector = handDetectorModel ? new HandDetector(handDetectorModel) : void 0; - if (handDetector && handPoseModel) - handPipeline = new HandPipeline(handDetector, handPoseModel); - return [handDetectorModel, handPoseModel]; -} - -// src/hand/handtrack.ts -var tf21 = __toESM(require_tfjs_esm()); -var models3 = [null, null]; -var modelOutputNodes = ["StatefulPartitionedCall/Postprocessor/Slice", "StatefulPartitionedCall/Postprocessor/ExpandDims_1"]; -var inputSize7 = [[0, 0], [0, 0]]; -var classes = ["hand", "fist", "pinch", "point", "face", "tip", "pinchtip"]; -var faceIndex = 4; -var boxExpandFact = 1.6; -var maxDetectorResolution = 512; -var detectorExpandFact = 1.4; -var skipped8 = Number.MAX_SAFE_INTEGER; -var lastTime9 = 0; -var outputSize = [0, 0]; -var cache4 = { - boxes: [], - hands: [] -}; -var fingerMap = { - thumb: [1, 2, 3, 4], - index: [5, 6, 7, 8], - middle: [9, 10, 11, 12], - ring: [13, 14, 15, 16], - pinky: [17, 18, 19, 20], - base: [0], - palm: [0, 17, 13, 9, 5, 1, 0] -}; -async function loadDetect2(config3) { - var _a; - if (env.initial) - models3[0] = null; - if (!models3[0]) { - fakeOps(["tensorlistreserve", "enter", "tensorlistfromtensor", "merge", "loopcond", "switch", "exit", "tensorliststack", "nextiteration", "tensorlistsetitem", "tensorlistgetitem", "reciprocal", "shape", "split", "where"], config3); - models3[0] = await loadModel((_a = config3.hand.detector) == null ? void 0 : _a.modelPath); - const inputs = models3[0]["executor"] ? Object.values(models3[0].modelSignature["inputs"]) : void 0; - inputSize7[0][0] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[1].size) : 0; - inputSize7[0][1] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : 0; - } else if (config3.debug) - log("cached model:", models3[0]["modelUrl"]); - return models3[0]; -} -async function loadSkeleton(config3) { - var _a; - if (env.initial) - models3[1] = null; - if (!models3[1]) { - models3[1] = await loadModel((_a = config3.hand.skeleton) == null ? void 0 : _a.modelPath); - const inputs = models3[1]["executor"] ? Object.values(models3[1].modelSignature["inputs"]) : void 0; - inputSize7[1][0] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[1].size) : 0; - inputSize7[1][1] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : 0; - } else if (config3.debug) - log("cached model:", models3[1]["modelUrl"]); - return models3[1]; -} -async function detectHands(input, config3) { - const hands = []; - if (!input || !models3[0]) - return hands; - const t2 = {}; - const ratio2 = (input.shape[2] || 1) / (input.shape[1] || 1); - const height = Math.min(Math.round((input.shape[1] || 0) / 8) * 8, maxDetectorResolution); - const width = Math.round(height * ratio2 / 8) * 8; - t2.resize = tf21.image.resizeBilinear(input, [height, width]); - t2.cast = tf21.cast(t2.resize, "int32"); - [t2.rawScores, t2.rawBoxes] = await models3[0].executeAsync(t2.cast, modelOutputNodes); - t2.boxes = tf21.squeeze(t2.rawBoxes, [0, 2]); - t2.scores = tf21.squeeze(t2.rawScores, [0]); - const classScores = tf21.unstack(t2.scores, 1); - tf21.dispose(classScores[faceIndex]); - classScores.splice(faceIndex, 1); - t2.filtered = tf21.stack(classScores, 1); - tf21.dispose(classScores); - t2.max = tf21.max(t2.filtered, 1); - t2.argmax = tf21.argMax(t2.filtered, 1); - let id = 0; - t2.nms = await tf21.image.nonMaxSuppressionAsync(t2.boxes, t2.max, (config3.hand.maxDetected || 0) + 1, config3.hand.iouThreshold || 0, config3.hand.minConfidence || 1); - const nms = await t2.nms.data(); - const scores = await t2.max.data(); - const classNum = await t2.argmax.data(); - for (const nmsIndex of Array.from(nms)) { - const boxSlice = tf21.slice(t2.boxes, nmsIndex, 1); - const boxYX = await boxSlice.data(); - tf21.dispose(boxSlice); - const boxData = [boxYX[1], boxYX[0], boxYX[3] - boxYX[1], boxYX[2] - boxYX[0]]; - const boxRaw = scale(boxData, detectorExpandFact); - const boxFull = [Math.trunc(boxData[0] * outputSize[0]), Math.trunc(boxData[1] * outputSize[1]), Math.trunc(boxData[2] * outputSize[0]), Math.trunc(boxData[3] * outputSize[1])]; - const score = scores[nmsIndex]; - const label = classes[classNum[nmsIndex]]; - const hand3 = { id: id++, score, box: boxFull, boxRaw, label }; - hands.push(hand3); - } - Object.keys(t2).forEach((tensor6) => tf21.dispose(t2[tensor6])); - hands.sort((a, b) => b.score - a.score); - if (hands.length > (config3.hand.maxDetected || 1)) - hands.length = config3.hand.maxDetected || 1; - return hands; -} -async function detectFingers(input, h, config3) { - const hand3 = { - id: h.id, - score: Math.round(100 * h.score) / 100, - boxScore: Math.round(100 * h.score) / 100, - fingerScore: 0, - box: h.box, - boxRaw: h.boxRaw, - label: h.label, - keypoints: [], - landmarks: {}, - annotations: {} - }; - if (input && models3[1] && config3.hand.landmarks && h.score > (config3.hand.minConfidence || 0)) { - const t2 = {}; - const boxCrop = [h.boxRaw[1], h.boxRaw[0], h.boxRaw[3] + h.boxRaw[1], h.boxRaw[2] + h.boxRaw[0]]; - t2.crop = tf21.image.cropAndResize(input, [boxCrop], [0], [inputSize7[1][0], inputSize7[1][1]], "bilinear"); - t2.div = tf21.div(t2.crop, constants.tf255); - [t2.score, t2.keypoints] = models3[1].execute(t2.div, ["Identity_1", "Identity"]); - const rawScore = (await t2.score.data())[0]; - const score = (100 - Math.trunc(100 / (1 + Math.exp(rawScore)))) / 100; - if (score >= (config3.hand.minConfidence || 0)) { - hand3.fingerScore = score; - t2.reshaped = tf21.reshape(t2.keypoints, [-1, 3]); - const coordsData = await t2.reshaped.array(); - const coordsRaw = coordsData.map((kpt4) => [kpt4[0] / inputSize7[1][1], kpt4[1] / inputSize7[1][0], kpt4[2] || 0]); - const coordsNorm = coordsRaw.map((kpt4) => [kpt4[0] * h.boxRaw[2], kpt4[1] * h.boxRaw[3], kpt4[2] || 0]); - hand3.keypoints = coordsNorm.map((kpt4) => [outputSize[0] * (kpt4[0] + h.boxRaw[0]), outputSize[1] * (kpt4[1] + h.boxRaw[1]), kpt4[2] || 0]); - hand3.landmarks = analyze(hand3.keypoints); - for (const key of Object.keys(fingerMap)) { - hand3.annotations[key] = fingerMap[key].map((index2) => hand3.landmarks && hand3.keypoints[index2] ? hand3.keypoints[index2] : null); - } - } - Object.keys(t2).forEach((tensor6) => tf21.dispose(t2[tensor6])); - } - return hand3; -} -async function predict10(input, config3) { - var _a, _b; - if (!((_a = models3[0]) == null ? void 0 : _a["executor"]) || !((_b = models3[1]) == null ? void 0 : _b["executor"]) || !models3[0].inputs[0].shape || !models3[1].inputs[0].shape) - return []; - outputSize = [input.shape[2] || 0, input.shape[1] || 0]; - skipped8++; - const skipTime = (config3.hand.skipTime || 0) > now() - lastTime9; - const skipFrame = skipped8 < (config3.hand.skipFrames || 0); - if (config3.skipAllowed && skipTime && skipFrame) { - return cache4.hands; - } - return new Promise(async (resolve) => { - const skipTimeExtended = 3 * (config3.hand.skipTime || 0) > now() - lastTime9; - const skipFrameExtended = skipped8 < 3 * (config3.hand.skipFrames || 0); - if (config3.skipAllowed && cache4.hands.length === config3.hand.maxDetected) { - cache4.hands = await Promise.all(cache4.boxes.map((handBox) => detectFingers(input, handBox, config3))); - } else if (config3.skipAllowed && skipTimeExtended && skipFrameExtended && cache4.hands.length > 0) { - cache4.hands = await Promise.all(cache4.boxes.map((handBox) => detectFingers(input, handBox, config3))); - } else { - cache4.boxes = await detectHands(input, config3); - lastTime9 = now(); - cache4.hands = await Promise.all(cache4.boxes.map((handBox) => detectFingers(input, handBox, config3))); - skipped8 = 0; - } - const oldCache = [...cache4.boxes]; - cache4.boxes.length = 0; - if (config3.cacheSensitivity > 0) { - for (let i = 0; i < cache4.hands.length; i++) { - const boxKpt = square(cache4.hands[i].keypoints, outputSize); - if (boxKpt.box[2] / (input.shape[2] || 1) > 0.05 && boxKpt.box[3] / (input.shape[1] || 1) > 0.05 && cache4.hands[i].fingerScore && cache4.hands[i].fingerScore > (config3.hand.minConfidence || 0)) { - const boxScale = scale(boxKpt.box, boxExpandFact); - const boxScaleRaw = scale(boxKpt.boxRaw, boxExpandFact); - cache4.boxes.push({ ...oldCache[i], box: boxScale, boxRaw: boxScaleRaw }); - } - } - } - for (let i = 0; i < cache4.hands.length; i++) { - const bbox = calc(cache4.hands[i].keypoints, outputSize); - cache4.hands[i].box = bbox.box; - cache4.hands[i].boxRaw = bbox.boxRaw; - } - resolve(cache4.hands); - }); -} - -// src/face/insightface.ts -var tf22 = __toESM(require_tfjs_esm()); -var model10; -var last6 = []; -var lastCount5 = 0; -var lastTime10 = 0; -var skipped9 = Number.MAX_SAFE_INTEGER; -async function load11(config3) { - if (env.initial) - model10 = null; - if (!model10) - model10 = await loadModel(config3.face["insightface"].modelPath); - else if (config3.debug) - log("cached model:", model10["modelUrl"]); - return model10; -} -async function predict11(input, config3, idx, count2) { - var _a, _b; - if (!(model10 == null ? void 0 : model10["executor"])) - return []; - const skipFrame = skipped9 < (((_a = config3.face["insightface"]) == null ? void 0 : _a.skipFrames) || 0); - const skipTime = (((_b = config3.face["insightface"]) == null ? void 0 : _b.skipTime) || 0) > now() - lastTime10; - if (config3.skipAllowed && skipTime && skipFrame && lastCount5 === count2 && last6[idx]) { - skipped9++; - return last6[idx]; - } - return new Promise(async (resolve) => { - var _a2; - let data = []; - if (((_a2 = config3.face["insightface"]) == null ? void 0 : _a2.enabled) && (model10 == null ? void 0 : model10.inputs[0].shape)) { - const t2 = {}; - t2.crop = tf22.image.resizeBilinear(input, [model10.inputs[0].shape[2], model10.inputs[0].shape[1]], false); - t2.data = model10.execute(t2.crop); - const output = await t2.data.data(); - data = Array.from(output); - Object.keys(t2).forEach((tensor6) => tf22.dispose(t2[tensor6])); - } - last6[idx] = data; - lastCount5 = count2; - lastTime10 = now(); - resolve(data); - }); -} - -// src/face/liveness.ts -var tf23 = __toESM(require_tfjs_esm()); -var model11; -var cached2 = []; -var skipped10 = Number.MAX_SAFE_INTEGER; -var lastCount6 = 0; -var lastTime11 = 0; -async function load12(config3) { - var _a; - if (env.initial) - model11 = null; - if (!model11) - model11 = await loadModel((_a = config3.face.liveness) == null ? void 0 : _a.modelPath); - else if (config3.debug) - log("cached model:", model11["modelUrl"]); - return model11; -} -async function predict12(image27, config3, idx, count2) { - var _a, _b; - if (!(model11 == null ? void 0 : model11["executor"])) - return 0; - const skipTime = (((_a = config3.face.liveness) == null ? void 0 : _a.skipTime) || 0) > now() - lastTime11; - const skipFrame = skipped10 < (((_b = config3.face.liveness) == null ? void 0 : _b.skipFrames) || 0); - if (config3.skipAllowed && skipTime && skipFrame && lastCount6 === count2 && cached2[idx]) { - skipped10++; - return cached2[idx]; - } - skipped10 = 0; - return new Promise(async (resolve) => { - const resize = tf23.image.resizeBilinear(image27, [(model11 == null ? void 0 : model11.inputs[0].shape) ? model11.inputs[0].shape[2] : 0, (model11 == null ? void 0 : model11.inputs[0].shape) ? model11.inputs[0].shape[1] : 0], false); - const res = model11 == null ? void 0 : model11.execute(resize); - const num = (await res.data())[0]; - cached2[idx] = Math.round(100 * num) / 100; - lastCount6 = count2; - lastTime11 = now(); - tf23.dispose([resize, res]); - resolve(cached2[idx]); - }); -} - -// src/segmentation/meet.ts -var tf24 = __toESM(require_tfjs_esm()); -var model12; -async function load13(config3) { - if (!model12 || env.initial) - model12 = await loadModel(config3.segmentation.modelPath); - else if (config3.debug) - log("cached model:", model12["modelUrl"]); - return model12; -} -async function predict13(input, config3) { - var _a; - if (!model12) - model12 = await load13(config3); - if (!(model12 == null ? void 0 : model12["executor"]) || !((_a = model12 == null ? void 0 : model12.inputs) == null ? void 0 : _a[0].shape)) - return null; - const t2 = {}; - t2.resize = tf24.image.resizeBilinear(input, [model12.inputs[0].shape ? model12.inputs[0].shape[1] : 0, model12.inputs[0].shape ? model12.inputs[0].shape[2] : 0], false); - t2.norm = tf24.div(t2.resize, constants.tf255); - t2.res = model12.execute(t2.norm); - t2.squeeze = tf24.squeeze(t2.res, 0); - [t2.bgRaw, t2.fgRaw] = tf24.unstack(t2.squeeze, 2); - t2.fg = tf24.softmax(t2.fgRaw); - t2.mul = tf24.mul(t2.fg, constants.tf255); - t2.expand = tf24.expandDims(t2.mul, 2); - t2.output = tf24.image.resizeBilinear(t2.expand, [input.shape[1], input.shape[2]]); - let rgba; - switch (config3.segmentation.mode || "default") { - case "default": - t2.input = tf24.squeeze(input); - t2.concat = tf24.concat([t2.input, t2.output], -1); - rgba = tf24.cast(t2.concat, "int32"); - break; - case "alpha": - rgba = tf24.cast(t2.output, "int32"); - break; - default: - rgba = tf24.tensor(0); - } - Object.keys(t2).forEach((tensor6) => tf24.dispose(t2[tensor6])); - return rgba; -} - -// src/face/mobilefacenet.ts -var tf25 = __toESM(require_tfjs_esm()); -var model13; -var last7 = []; -var lastCount7 = 0; -var lastTime12 = 0; -var skipped11 = Number.MAX_SAFE_INTEGER; -async function load14(config3) { - var _a; - if (env.initial) - model13 = null; - if (!model13) - model13 = await loadModel((_a = config3.face["mobilefacenet"]) == null ? void 0 : _a.modelPath); - else if (config3.debug) - log("cached model:", model13["modelUrl"]); - return model13; -} -async function predict14(input, config3, idx, count2) { - var _a, _b; - if (!(model13 == null ? void 0 : model13["executor"])) - return []; - const skipFrame = skipped11 < (((_a = config3.face["mobilefacenet"]) == null ? void 0 : _a.skipFrames) || 0); - const skipTime = (((_b = config3.face["mobilefacenet"]) == null ? void 0 : _b.skipTime) || 0) > now() - lastTime12; - if (config3.skipAllowed && skipTime && skipFrame && lastCount7 === count2 && last7[idx]) { - skipped11++; - return last7[idx]; - } - return new Promise(async (resolve) => { - var _a2; - let data = []; - if (((_a2 = config3.face["mobilefacenet"]) == null ? void 0 : _a2.enabled) && (model13 == null ? void 0 : model13.inputs[0].shape)) { - const t2 = {}; - t2.crop = tf25.image.resizeBilinear(input, [model13.inputs[0].shape[2], model13.inputs[0].shape[1]], false); - t2.data = model13.execute(t2.crop); - const output = await t2.data.data(); - data = Array.from(output); - Object.keys(t2).forEach((tensor6) => tf25.dispose(t2[tensor6])); - } - last7[idx] = data; - lastCount7 = count2; - lastTime12 = now(); - resolve(data); - }); -} - -// src/body/movenet.ts -var tf27 = __toESM(require_tfjs_esm()); - -// src/body/movenetcoords.ts -var movenetcoords_exports = {}; -__export(movenetcoords_exports, { - connected: () => connected3, - horizontal: () => horizontal, - kpt: () => kpt3, - relative: () => relative, - vertical: () => vertical -}); -var kpt3 = [ - "nose", - "leftEye", - "rightEye", - "leftEar", - "rightEar", - "leftShoulder", - "rightShoulder", - "leftElbow", - "rightElbow", - "leftWrist", - "rightWrist", - "leftHip", - "rightHip", - "leftKnee", - "rightKnee", - "leftAnkle", - "rightAnkle" -]; -var horizontal = [ - ["leftEye", "rightEye"], - ["leftEar", "rightEar"], - ["leftShoulder", "rightShoulder"], - ["leftElbow", "rightElbow"], - ["leftWrist", "rightWrist"], - ["leftHip", "rightHip"], - ["leftKnee", "rightKnee"], - ["leftAnkle", "rightAnkle"] -]; -var vertical = [ - ["leftKnee", "leftShoulder"], - ["rightKnee", "rightShoulder"], - ["leftAnkle", "leftKnee"], - ["rightAnkle", "rightKnee"] -]; -var relative = [ - [["leftHip", "rightHip"], ["leftShoulder", "rightShoulder"]], - [["leftElbow", "rightElbow"], ["leftShoulder", "rightShoulder"]] -]; -var connected3 = { - leftLeg: ["leftHip", "leftKnee", "leftAnkle"], - rightLeg: ["rightHip", "rightKnee", "rightAnkle"], - torso: ["leftShoulder", "rightShoulder", "rightHip", "leftHip", "leftShoulder"], - leftArm: ["leftShoulder", "leftElbow", "leftWrist"], - rightArm: ["rightShoulder", "rightElbow", "rightWrist"], - head: [] -}; - -// src/body/movenetfix.ts -var tf26 = __toESM(require_tfjs_esm()); -var maxJitter = 5e-3; -var cache5 = { - keypoints: [], - padding: [[0, 0], [0, 0], [0, 0], [0, 0]] -}; -function bodyParts(body4) { - for (const pair of horizontal) { - const left = body4.keypoints.findIndex((kp) => kp.part === pair[0]); - const right = body4.keypoints.findIndex((kp) => kp.part === pair[1]); - if (body4.keypoints[left] && body4.keypoints[right]) { - if (body4.keypoints[left].position[0] < body4.keypoints[right].position[0]) { - const tmp = body4.keypoints[left]; - body4.keypoints[left] = body4.keypoints[right]; - body4.keypoints[right] = tmp; - } - } - } - for (const pair of vertical) { - const lower = body4.keypoints.findIndex((kp) => kp && kp.part === pair[0]); - const higher = body4.keypoints.findIndex((kp) => kp && kp.part === pair[1]); - if (body4.keypoints[lower] && body4.keypoints[higher]) { - if (body4.keypoints[lower].position[1] < body4.keypoints[higher].position[1]) { - body4.keypoints.splice(lower, 1); - } - } - } - for (const [pair, compare2] of relative) { - const left = body4.keypoints.findIndex((kp) => kp && kp.part === pair[0]); - const right = body4.keypoints.findIndex((kp) => kp && kp.part === pair[1]); - const leftTo = body4.keypoints.findIndex((kp) => kp && kp.part === compare2[0]); - const rightTo = body4.keypoints.findIndex((kp) => kp && kp.part === compare2[1]); - if (!body4.keypoints[leftTo] || !body4.keypoints[rightTo]) - continue; - const distanceLeft = body4.keypoints[left] ? [ - Math.abs(body4.keypoints[leftTo].position[0] - body4.keypoints[left].position[0]), - Math.abs(body4.keypoints[rightTo].position[0] - body4.keypoints[left].position[0]) - ] : [0, 0]; - const distanceRight = body4.keypoints[right] ? [ - Math.abs(body4.keypoints[rightTo].position[0] - body4.keypoints[right].position[0]), - Math.abs(body4.keypoints[leftTo].position[0] - body4.keypoints[right].position[0]) - ] : [0, 0]; - if (distanceLeft[0] > distanceLeft[1] || distanceRight[0] > distanceRight[1]) { - const tmp = body4.keypoints[left]; - body4.keypoints[left] = body4.keypoints[right]; - body4.keypoints[right] = tmp; - } - } -} -function jitter(keypoints) { - for (let i = 0; i < keypoints.length; i++) { - if (keypoints[i] && cache5.keypoints[i]) { - const diff = [Math.abs(keypoints[i].positionRaw[0] - cache5.keypoints[i].positionRaw[0]), Math.abs(keypoints[i].positionRaw[1] - cache5.keypoints[i].positionRaw[1])]; - if (diff[0] < maxJitter && diff[1] < maxJitter) { - keypoints[i] = cache5.keypoints[i]; - } else { - cache5.keypoints[i] = keypoints[i]; - } - } else { - cache5.keypoints[i] = keypoints[i]; - } - } - return keypoints; -} -function padInput(input, inputSize10) { - var _a, _b; - const t2 = {}; - if (!((_a = input == null ? void 0 : input.shape) == null ? void 0 : _a[1]) || !((_b = input == null ? void 0 : input.shape) == null ? void 0 : _b[2])) - return input; - cache5.padding = [ - [0, 0], - [input.shape[2] > input.shape[1] ? Math.trunc((input.shape[2] - input.shape[1]) / 2) : 0, input.shape[2] > input.shape[1] ? Math.trunc((input.shape[2] - input.shape[1]) / 2) : 0], - [input.shape[1] > input.shape[2] ? Math.trunc((input.shape[1] - input.shape[2]) / 2) : 0, input.shape[1] > input.shape[2] ? Math.trunc((input.shape[1] - input.shape[2]) / 2) : 0], - [0, 0] - ]; - t2.pad = tf26.pad(input, cache5.padding); - t2.resize = tf26.image.resizeBilinear(t2.pad, [inputSize10, inputSize10]); - const final = tf26.cast(t2.resize, "int32"); - Object.keys(t2).forEach((tensor6) => tf26.dispose(t2[tensor6])); - return final; -} -function rescaleBody(body4, outputSize2) { - body4.keypoints = body4.keypoints.filter((kpt4) => kpt4 == null ? void 0 : kpt4.position); - for (const kpt4 of body4.keypoints) { - kpt4.position = [ - kpt4.position[0] * (outputSize2[0] + cache5.padding[2][0] + cache5.padding[2][1]) / outputSize2[0] - cache5.padding[2][0], - kpt4.position[1] * (outputSize2[1] + cache5.padding[1][0] + cache5.padding[1][1]) / outputSize2[1] - cache5.padding[1][0] - ]; - kpt4.positionRaw = [ - kpt4.position[0] / outputSize2[0], - kpt4.position[1] / outputSize2[1] - ]; - } - const rescaledBoxes = calc(body4.keypoints.map((pt) => pt.position), outputSize2); - body4.box = rescaledBoxes.box; - body4.boxRaw = rescaledBoxes.boxRaw; - return body4; -} - -// src/body/movenet.ts -var model14; -var inputSize8 = 0; -var skipped12 = Number.MAX_SAFE_INTEGER; -var cache6 = { - boxes: [], - bodies: [], - last: 0 -}; -async function load15(config3) { - var _a; - if (env.initial) - model14 = null; - if (!model14) { - fakeOps(["size"], config3); - model14 = await loadModel(config3.body.modelPath); - } else if (config3.debug) - log("cached model:", model14["modelUrl"]); - inputSize8 = (model14 == null ? void 0 : model14["executor"]) && ((_a = model14 == null ? void 0 : model14.inputs) == null ? void 0 : _a[0].shape) ? model14.inputs[0].shape[2] : 0; - if (inputSize8 < 64) - inputSize8 = 256; - return model14; -} -function parseSinglePose(res, config3, image27) { - const kpt4 = res[0][0]; - const keypoints = []; - let score = 0; - for (let id = 0; id < kpt4.length; id++) { - score = kpt4[id][2]; - if (score > config3.body.minConfidence) { - const positionRaw = [kpt4[id][1], kpt4[id][0]]; - keypoints.push({ - score: Math.round(100 * score) / 100, - part: kpt3[id], - positionRaw, - position: [ - Math.round((image27.shape[2] || 0) * positionRaw[0]), - Math.round((image27.shape[1] || 0) * positionRaw[1]) - ] - }); - } - } - score = keypoints.reduce((prev, curr) => curr.score > prev ? curr.score : prev, 0); - const bodies = []; - const newBox = calc(keypoints.map((pt) => pt.position), [image27.shape[2], image27.shape[1]]); - const annotations2 = {}; - for (const [name, indexes] of Object.entries(connected3)) { - const pt = []; - for (let i = 0; i < indexes.length - 1; i++) { - const pt0 = keypoints.find((kp) => kp.part === indexes[i]); - const pt1 = keypoints.find((kp) => kp.part === indexes[i + 1]); - if (pt0 && pt1 && pt0.score > (config3.body.minConfidence || 0) && pt1.score > (config3.body.minConfidence || 0)) - pt.push([pt0.position, pt1.position]); - } - annotations2[name] = pt; - } - const body4 = { id: 0, score, box: newBox.box, boxRaw: newBox.boxRaw, keypoints, annotations: annotations2 }; - bodyParts(body4); - bodies.push(body4); - return bodies; -} -function parseMultiPose(res, config3, image27) { - const bodies = []; - for (let id = 0; id < res[0].length; id++) { - const kpt4 = res[0][id]; - const totalScore = Math.round(100 * kpt4[51 + 4]) / 100; - if (totalScore > config3.body.minConfidence) { - const keypoints = []; - for (let i = 0; i < 17; i++) { - const score = kpt4[3 * i + 2]; - if (score > config3.body.minConfidence) { - const positionRaw = [kpt4[3 * i + 1], kpt4[3 * i + 0]]; - keypoints.push({ - part: kpt3[i], - score: Math.round(100 * score) / 100, - positionRaw, - position: [Math.round((image27.shape[2] || 0) * positionRaw[0]), Math.round((image27.shape[1] || 0) * positionRaw[1])] - }); - } - } - const newBox = calc(keypoints.map((pt) => pt.position), [image27.shape[2], image27.shape[1]]); - const annotations2 = {}; - for (const [name, indexes] of Object.entries(connected3)) { - const pt = []; - for (let i = 0; i < indexes.length - 1; i++) { - const pt0 = keypoints.find((kp) => kp.part === indexes[i]); - const pt1 = keypoints.find((kp) => kp.part === indexes[i + 1]); - if (pt0 && pt1 && pt0.score > (config3.body.minConfidence || 0) && pt1.score > (config3.body.minConfidence || 0)) - pt.push([pt0.position, pt1.position]); - } - annotations2[name] = pt; - } - const body4 = { id, score: totalScore, box: newBox.box, boxRaw: newBox.boxRaw, keypoints: [...keypoints], annotations: annotations2 }; - bodyParts(body4); - bodies.push(body4); - } - } - bodies.sort((a, b) => b.score - a.score); - if (bodies.length > config3.body.maxDetected) - bodies.length = config3.body.maxDetected; - return bodies; -} -async function predict15(input, config3) { - var _a; - if (!(model14 == null ? void 0 : model14["executor"]) || !((_a = model14 == null ? void 0 : model14.inputs) == null ? void 0 : _a[0].shape)) - return []; - if (!config3.skipAllowed) - cache6.boxes.length = 0; - skipped12++; - const skipTime = (config3.body.skipTime || 0) > now() - cache6.last; - const skipFrame = skipped12 < (config3.body.skipFrames || 0); - if (config3.skipAllowed && skipTime && skipFrame) { - return cache6.bodies; - } - return new Promise(async (resolve) => { - const t2 = {}; - skipped12 = 0; - t2.input = padInput(input, inputSize8); - t2.res = model14 == null ? void 0 : model14.execute(t2.input); - cache6.last = now(); - const res = await t2.res.array(); - cache6.bodies = t2.res.shape[2] === 17 ? parseSinglePose(res, config3, input) : parseMultiPose(res, config3, input); - for (const body4 of cache6.bodies) { - rescaleBody(body4, [input.shape[2] || 1, input.shape[1] || 1]); - jitter(body4.keypoints); - } - Object.keys(t2).forEach((tensor6) => tf27.dispose(t2[tensor6])); - resolve(cache6.bodies); - }); -} - -// src/object/nanodet.ts -var tf28 = __toESM(require_tfjs_esm()); -var model15; -var last8 = []; -var lastTime13 = 0; -var skipped13 = Number.MAX_SAFE_INTEGER; -var inputSize9 = 0; -var scaleBox = 2.5; -async function load16(config3) { - if (!model15 || env.initial) { - model15 = await loadModel(config3.object.modelPath); - const inputs = (model15 == null ? void 0 : model15["executor"]) ? Object.values(model15.modelSignature["inputs"]) : void 0; - inputSize9 = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : 416; - } else if (config3.debug) - log("cached model:", model15["modelUrl"]); - return model15; -} -async function process4(res, outputShape, config3) { - let id = 0; - let results = []; - const size2 = inputSize9; - for (const strideSize of [1, 2, 4]) { - const baseSize = strideSize * 13; - const scoresT = tf28.squeeze(res.find((a) => a.shape[1] === baseSize ** 2 && (a.shape[2] || 0) === labels.length)); - const scores = await scoresT.array(); - const featuresT = tf28.squeeze(res.find((a) => a.shape[1] === baseSize ** 2 && (a.shape[2] || 0) < labels.length)); - const boxesMaxT = featuresT.reshape([-1, 4, featuresT.shape[1] / 4]); - const boxIdxT = boxesMaxT.argMax(2); - const boxIdx = await boxIdxT.array(); - for (let i = 0; i < scoresT.shape[0]; i++) { - for (let j = 0; j < scoresT.shape[1]; j++) { - const score = scores[i][j]; - if (score > (config3.object.minConfidence || 0) && j !== 61) { - const cx = (0.5 + Math.trunc(i % baseSize)) / baseSize; - const cy = (0.5 + Math.trunc(i / baseSize)) / baseSize; - const boxOffset = boxIdx[i].map((a) => a * (baseSize / strideSize / size2)); - const [x, y] = [ - cx - scaleBox / strideSize * boxOffset[0], - cy - scaleBox / strideSize * boxOffset[1] - ]; - const [w, h] = [ - cx + scaleBox / strideSize * boxOffset[2] - x, - cy + scaleBox / strideSize * boxOffset[3] - y - ]; - let boxRaw = [x, y, w, h]; - boxRaw = boxRaw.map((a) => Math.max(0, Math.min(a, 1))); - const box = [ - boxRaw[0] * outputShape[0], - boxRaw[1] * outputShape[1], - boxRaw[2] * outputShape[0], - boxRaw[3] * outputShape[1] - ]; - const result = { - id: id++, - score: Math.round(100 * score) / 100, - class: j + 1, - label: labels[j].label, - box: box.map((a) => Math.trunc(a)), - boxRaw - }; - results.push(result); - } - } - } - tf28.dispose([scoresT, featuresT, boxesMaxT, boxIdxT]); - } - const nmsBoxes = results.map((a) => [a.boxRaw[1], a.boxRaw[0], a.boxRaw[3], a.boxRaw[2]]); - const nmsScores = results.map((a) => a.score); - let nmsIdx = []; - if (nmsBoxes && nmsBoxes.length > 0) { - const nms = await tf28.image.nonMaxSuppressionAsync(nmsBoxes, nmsScores, config3.object.maxDetected, config3.object.iouThreshold, config3.object.minConfidence); - nmsIdx = await nms.data(); - tf28.dispose(nms); - } - results = results.filter((_val, idx) => nmsIdx.includes(idx)).sort((a, b) => b.score - a.score); - return results; -} -async function predict16(image27, config3) { - if (!(model15 == null ? void 0 : model15["executor"])) - return []; - const skipTime = (config3.object.skipTime || 0) > now() - lastTime13; - const skipFrame = skipped13 < (config3.object.skipFrames || 0); - if (config3.skipAllowed && skipTime && skipFrame && last8.length > 0) { - skipped13++; - return last8; - } - skipped13 = 0; - if (!env.kernels.includes("mod") || !env.kernels.includes("sparsetodense")) - return last8; - return new Promise(async (resolve) => { - const outputSize2 = [image27.shape[2] || 0, image27.shape[1] || 0]; - const resizeT = tf28.image.resizeBilinear(image27, [inputSize9, inputSize9], false); - const normT = tf28.div(resizeT, constants.tf255); - const transposeT = tf28.transpose(normT, [0, 3, 1, 2]); - let objectT; - if (config3.object.enabled) - objectT = model15.execute(transposeT); - lastTime13 = now(); - const obj = await process4(objectT, outputSize2, config3); - last8 = obj; - tf28.dispose([resizeT, normT, transposeT, ...objectT]); - resolve(obj); - }); -} - -// src/body/posenet.ts -var tf29 = __toESM(require_tfjs_esm()); - -// src/body/posenetutils.ts -var partNames = [ - "nose", - "leftEye", - "rightEye", - "leftEar", - "rightEar", - "leftShoulder", - "rightShoulder", - "leftElbow", - "rightElbow", - "leftWrist", - "rightWrist", - "leftHip", - "rightHip", - "leftKnee", - "rightKnee", - "leftAnkle", - "rightAnkle" -]; -var count = partNames.length; -var partIds = partNames.reduce((result, jointName, i) => { - result[jointName] = i; - return result; -}, {}); -var connectedPartNames = [ - ["leftHip", "leftShoulder"], - ["leftElbow", "leftShoulder"], - ["leftElbow", "leftWrist"], - ["leftHip", "leftKnee"], - ["leftKnee", "leftAnkle"], - ["rightHip", "rightShoulder"], - ["rightElbow", "rightShoulder"], - ["rightElbow", "rightWrist"], - ["rightHip", "rightKnee"], - ["rightKnee", "rightAnkle"], - ["leftShoulder", "rightShoulder"], - ["leftHip", "rightHip"] -]; -var connectedPartIndices = connectedPartNames.map(([jointNameA, jointNameB]) => [partIds[jointNameA], partIds[jointNameB]]); -var poseChain = [ - ["nose", "leftEye"], - ["leftEye", "leftEar"], - ["nose", "rightEye"], - ["rightEye", "rightEar"], - ["nose", "leftShoulder"], - ["leftShoulder", "leftElbow"], - ["leftElbow", "leftWrist"], - ["leftShoulder", "leftHip"], - ["leftHip", "leftKnee"], - ["leftKnee", "leftAnkle"], - ["nose", "rightShoulder"], - ["rightShoulder", "rightElbow"], - ["rightElbow", "rightWrist"], - ["rightShoulder", "rightHip"], - ["rightHip", "rightKnee"], - ["rightKnee", "rightAnkle"] -]; -function getBoundingBox(keypoints) { - const coord = keypoints.reduce(({ maxX, maxY, minX, minY }, { position: { x, y } }) => ({ - maxX: Math.max(maxX, x), - maxY: Math.max(maxY, y), - minX: Math.min(minX, x), - minY: Math.min(minY, y) - }), { - maxX: Number.NEGATIVE_INFINITY, - maxY: Number.NEGATIVE_INFINITY, - minX: Number.POSITIVE_INFINITY, - minY: Number.POSITIVE_INFINITY - }); - return [coord.minX, coord.minY, coord.maxX - coord.minX, coord.maxY - coord.minY]; -} -function scalePoses(poses, [height, width], [inputResolutionHeight, inputResolutionWidth]) { - const scaleY = height / inputResolutionHeight; - const scaleX = width / inputResolutionWidth; - const scalePose = (pose, i) => ({ - id: i, - score: pose.score, - boxRaw: [pose.box[0] / inputResolutionWidth, pose.box[1] / inputResolutionHeight, pose.box[2] / inputResolutionWidth, pose.box[3] / inputResolutionHeight], - box: [Math.trunc(pose.box[0] * scaleX), Math.trunc(pose.box[1] * scaleY), Math.trunc(pose.box[2] * scaleX), Math.trunc(pose.box[3] * scaleY)], - keypoints: pose.keypoints.map(({ score, part, position }) => ({ - score, - part, - position: [Math.trunc(position.x * scaleX), Math.trunc(position.y * scaleY)], - positionRaw: [position.x / inputResolutionHeight, position.y / inputResolutionHeight] - })), - annotations: {} - }); - const scaledPoses = poses.map((pose, i) => scalePose(pose, i)); - return scaledPoses; -} -var MaxHeap = class { - constructor(maxSize2, getElementValue) { - __publicField(this, "priorityQueue"); - __publicField(this, "numberOfElements"); - __publicField(this, "getElementValue"); - this.priorityQueue = new Array(maxSize2); - this.numberOfElements = -1; - this.getElementValue = getElementValue; - } - enqueue(x) { - this.priorityQueue[++this.numberOfElements] = x; - this.swim(this.numberOfElements); - } - dequeue() { - const max4 = this.priorityQueue[0]; - this.exchange(0, this.numberOfElements--); - this.sink(0); - this.priorityQueue[this.numberOfElements + 1] = null; - return max4; - } - empty() { - return this.numberOfElements === -1; - } - size() { - return this.numberOfElements + 1; - } - all() { - return this.priorityQueue.slice(0, this.numberOfElements + 1); - } - max() { - return this.priorityQueue[0]; - } - swim(k) { - while (k > 0 && this.less(Math.floor(k / 2), k)) { - this.exchange(k, Math.floor(k / 2)); - k = Math.floor(k / 2); - } - } - sink(k) { - while (2 * k <= this.numberOfElements) { - let j = 2 * k; - if (j < this.numberOfElements && this.less(j, j + 1)) - j++; - if (!this.less(k, j)) - break; - this.exchange(k, j); - k = j; - } - } - getValueAt(i) { - return this.getElementValue(this.priorityQueue[i]); - } - less(i, j) { - return this.getValueAt(i) < this.getValueAt(j); - } - exchange(i, j) { - const t2 = this.priorityQueue[i]; - this.priorityQueue[i] = this.priorityQueue[j]; - this.priorityQueue[j] = t2; - } -}; -function getOffsetPoint(y, x, keypoint, offsets) { - return { - y: offsets.get(y, x, keypoint), - x: offsets.get(y, x, keypoint + count) - }; -} -function getImageCoords(part, outputStride2, offsets) { - const { heatmapY, heatmapX, id: keypoint } = part; - const { y, x } = getOffsetPoint(heatmapY, heatmapX, keypoint, offsets); - return { - x: part.heatmapX * outputStride2 + x, - y: part.heatmapY * outputStride2 + y - }; -} -function clamp(a, min2, max4) { - if (a < min2) - return min2; - if (a > max4) - return max4; - return a; -} -function squaredDistance(y1, x1, y2, x2) { - const dy = y2 - y1; - const dx = x2 - x1; - return dy * dy + dx * dx; -} -function addVectors(a, b) { - return { x: a.x + b.x, y: a.y + b.y }; -} - -// src/body/posenet.ts -var model16; -var poseNetOutputs = ["MobilenetV1/offset_2/BiasAdd", "MobilenetV1/heatmap_2/BiasAdd", "MobilenetV1/displacement_fwd_2/BiasAdd", "MobilenetV1/displacement_bwd_2/BiasAdd"]; -var localMaximumRadius = 1; -var outputStride = 16; -var squaredNmsRadius = 50 ** 2; -function traverse(edgeId, sourceKeypoint, targetId, scores, offsets, displacements, offsetRefineStep = 2) { - const getDisplacement = (point2) => ({ - y: displacements.get(point2.y, point2.x, edgeId), - x: displacements.get(point2.y, point2.x, displacements.shape[2] / 2 + edgeId) - }); - const getStridedIndexNearPoint = (point2, height2, width2) => ({ - y: clamp(Math.round(point2.y / outputStride), 0, height2 - 1), - x: clamp(Math.round(point2.x / outputStride), 0, width2 - 1) - }); - const [height, width] = scores.shape; - const sourceKeypointIndices = getStridedIndexNearPoint(sourceKeypoint.position, height, width); - const displacement = getDisplacement(sourceKeypointIndices); - const displacedPoint = addVectors(sourceKeypoint.position, displacement); - let targetKeypoint = displacedPoint; - for (let i = 0; i < offsetRefineStep; i++) { - const targetKeypointIndices = getStridedIndexNearPoint(targetKeypoint, height, width); - const offsetPoint = getOffsetPoint(targetKeypointIndices.y, targetKeypointIndices.x, targetId, offsets); - targetKeypoint = addVectors( - { x: targetKeypointIndices.x * outputStride, y: targetKeypointIndices.y * outputStride }, - { x: offsetPoint.x, y: offsetPoint.y } - ); - } - const targetKeyPointIndices = getStridedIndexNearPoint(targetKeypoint, height, width); - const score = scores.get(targetKeyPointIndices.y, targetKeyPointIndices.x, targetId); - return { position: targetKeypoint, part: partNames[targetId], score }; -} -function decodePose(root, scores, offsets, displacementsFwd, displacementsBwd) { - const tuples = poseChain.map(([parentJoinName, childJoinName]) => [partIds[parentJoinName], partIds[childJoinName]]); - const edgesFwd = tuples.map(([, childJointId]) => childJointId); - const edgesBwd = tuples.map(([parentJointId]) => parentJointId); - const numParts = scores.shape[2]; - const numEdges = edgesFwd.length; - const keypoints = new Array(numParts); - const rootPoint = getImageCoords(root.part, outputStride, offsets); - keypoints[root.part.id] = { - score: root.score, - part: partNames[root.part.id], - position: rootPoint - }; - for (let edge = numEdges - 1; edge >= 0; --edge) { - const sourceId = edgesFwd[edge]; - const targetId = edgesBwd[edge]; - if (keypoints[sourceId] && !keypoints[targetId]) { - keypoints[targetId] = traverse(edge, keypoints[sourceId], targetId, scores, offsets, displacementsBwd); - } - } - for (let edge = 0; edge < numEdges; ++edge) { - const sourceId = edgesBwd[edge]; - const targetId = edgesFwd[edge]; - if (keypoints[sourceId] && !keypoints[targetId]) { - keypoints[targetId] = traverse(edge, keypoints[sourceId], targetId, scores, offsets, displacementsFwd); - } - } - return keypoints; -} -function scoreIsMaximumInLocalWindow(keypointId, score, heatmapY, heatmapX, scores) { - const [height, width] = scores.shape; - let localMaximum = true; - const yStart = Math.max(heatmapY - localMaximumRadius, 0); - const yEnd = Math.min(heatmapY + localMaximumRadius + 1, height); - for (let yCurrent = yStart; yCurrent < yEnd; ++yCurrent) { - const xStart = Math.max(heatmapX - localMaximumRadius, 0); - const xEnd = Math.min(heatmapX + localMaximumRadius + 1, width); - for (let xCurrent = xStart; xCurrent < xEnd; ++xCurrent) { - if (scores.get(yCurrent, xCurrent, keypointId) > score) { - localMaximum = false; - break; - } - } - if (!localMaximum) - break; - } - return localMaximum; -} -function buildPartWithScoreQueue(minConfidence2, scores) { - const [height, width, numKeypoints] = scores.shape; - const queue = new MaxHeap(height * width * numKeypoints, ({ score }) => score); - for (let heatmapY = 0; heatmapY < height; ++heatmapY) { - for (let heatmapX = 0; heatmapX < width; ++heatmapX) { - for (let keypointId = 0; keypointId < numKeypoints; ++keypointId) { - const score = scores.get(heatmapY, heatmapX, keypointId); - if (score < minConfidence2) - continue; - if (scoreIsMaximumInLocalWindow(keypointId, score, heatmapY, heatmapX, scores)) - queue.enqueue({ score, part: { heatmapY, heatmapX, id: keypointId } }); - } - } - } - return queue; -} -function withinRadius(poses, { x, y }, keypointId) { - return poses.some(({ keypoints }) => { - var _a; - const correspondingKeypoint = (_a = keypoints[keypointId]) == null ? void 0 : _a.position; - if (!correspondingKeypoint) - return false; - return squaredDistance(y, x, correspondingKeypoint.y, correspondingKeypoint.x) <= squaredNmsRadius; - }); -} -function getInstanceScore(existingPoses, keypoints) { - const notOverlappedKeypointScores = keypoints.reduce((result, { position, score }, keypointId) => { - if (!withinRadius(existingPoses, position, keypointId)) - result += score; - return result; - }, 0); - return notOverlappedKeypointScores / keypoints.length; -} -function decode(offsets, scores, displacementsFwd, displacementsBwd, maxDetected, minConfidence2) { - const poses = []; - const queue = buildPartWithScoreQueue(minConfidence2, scores); - while (poses.length < maxDetected && !queue.empty()) { - const root = queue.dequeue(); - const rootImageCoords = getImageCoords(root.part, outputStride, offsets); - if (withinRadius(poses, rootImageCoords, root.part.id)) - continue; - let keypoints = decodePose(root, scores, offsets, displacementsFwd, displacementsBwd); - keypoints = keypoints.filter((a) => a.score > minConfidence2); - const score = getInstanceScore(poses, keypoints); - const box = getBoundingBox(keypoints); - if (score > minConfidence2) - poses.push({ keypoints, box, score: Math.round(100 * score) / 100 }); - } - return poses; -} -async function predict17(input, config3) { - if (!(model16 == null ? void 0 : model16["executor"])) - return []; - const res = tf29.tidy(() => { - if (!model16.inputs[0].shape) - return []; - const resized = tf29.image.resizeBilinear(input, [model16.inputs[0].shape[2], model16.inputs[0].shape[1]]); - const normalized = tf29.sub(tf29.div(tf29.cast(resized, "float32"), 127.5), 1); - const results = model16.execute(normalized, poseNetOutputs); - const results3d = results.map((y) => tf29.squeeze(y, [0])); - results3d[1] = tf29.sigmoid(results3d[1]); - return results3d; - }); - const buffers = await Promise.all(res.map((tensor6) => tensor6.buffer())); - for (const t2 of res) - tf29.dispose(t2); - const decoded = decode(buffers[0], buffers[1], buffers[2], buffers[3], config3.body.maxDetected, config3.body.minConfidence); - if (!model16.inputs[0].shape) - return []; - const scaled = scalePoses(decoded, [input.shape[1], input.shape[2]], [model16.inputs[0].shape[2], model16.inputs[0].shape[1]]); - return scaled; -} -async function load17(config3) { - if (!model16 || env.initial) - model16 = await loadModel(config3.body.modelPath); - else if (config3.debug) - log("cached model:", model16["modelUrl"]); - return model16; -} - -// src/segmentation/rvm.ts -var tf30 = __toESM(require_tfjs_esm()); -var model17; -var outputNodes2 = ["fgr", "pha", "r1o", "r2o", "r3o", "r4o"]; -var t = {}; -var ratio = 0; -function init2(config3) { - tf30.dispose([t.r1i, t.r2i, t.r3i, t.r4i, t.downsample_ratio]); - t.r1i = tf30.tensor(0); - t.r2i = tf30.tensor(0); - t.r3i = tf30.tensor(0); - t.r4i = tf30.tensor(0); - ratio = config3.segmentation.ratio || 0.5; - t.downsample_ratio = tf30.tensor(ratio); -} -async function load18(config3) { - if (!model17 || env.initial) - model17 = await loadModel(config3.segmentation.modelPath); - else if (config3.debug) - log("cached model:", model17["modelUrl"]); - init2(config3); - return model17; -} -var normalize = (r) => tf30.tidy(() => { - const squeeze14 = tf30.squeeze(r, [0]); - const mul15 = tf30.mul(squeeze14, constants.tf255); - const cast8 = tf30.cast(mul15, "int32"); - return cast8; -}); -function getRGBA(fgr, pha) { - const rgb2 = fgr ? normalize(fgr) : tf30.fill([pha.shape[1] || 0, pha.shape[2] || 0, 3], 255, "int32"); - const a = pha ? normalize(pha) : tf30.fill([fgr.shape[1] || 0, fgr.shape[2] || 0, 1], 255, "int32"); - const rgba = tf30.concat([rgb2, a], -1); - tf30.dispose([rgb2, a]); - return rgba; -} -function getState(state) { - return tf30.tidy(() => { - const r = {}; - r.unstack = tf30.unstack(state, -1); - r.concat = tf30.concat(r.unstack, 1); - r.split = tf30.split(r.concat, 4, 1); - r.stack = tf30.concat(r.split, 2); - r.squeeze = tf30.squeeze(r.stack, [0]); - r.expand = tf30.expandDims(r.squeeze, -1); - r.add = tf30.add(r.expand, 1); - r.mul = tf30.mul(r.add, 127.5); - r.cast = tf30.cast(r.mul, "int32"); - r.tile = tf30.tile(r.cast, [1, 1, 3]); - r.alpha = tf30.fill([r.tile.shape[0] || 0, r.tile.shape[1] || 0, 1], 255, "int32"); - return tf30.concat([r.tile, r.alpha], -1); - }); -} -async function predict18(input, config3) { - if (!model17) - model17 = await load18(config3); - if (!(model17 == null ? void 0 : model17["executor"])) - return null; - t.src = tf30.div(input, 255); - if (ratio !== config3.segmentation.ratio) - init2(config3); - const [fgr, pha, r1o, r2o, r3o, r4o] = await model17.executeAsync(t, outputNodes2); - let rgba; - switch (config3.segmentation.mode || "default") { - case "default": - rgba = getRGBA(fgr, pha); - break; - case "alpha": - rgba = getRGBA(null, pha); - break; - case "foreground": - rgba = getRGBA(fgr, null); - break; - case "state": - rgba = getState(r1o); - break; - default: - rgba = tf30.tensor(0); - } - tf30.dispose([t.src, fgr, pha, t.r1i, t.r2i, t.r3i, t.r4i]); - [t.r1i, t.r2i, t.r3i, t.r4i] = [r1o, r2o, r3o, r4o]; - return rgba; -} - -// src/segmentation/selfie.ts -var tf31 = __toESM(require_tfjs_esm()); -var model18; -async function load19(config3) { - if (!model18 || env.initial) - model18 = await loadModel(config3.segmentation.modelPath); - else if (config3.debug) - log("cached model:", model18["modelUrl"]); - return model18; -} -async function predict19(input, config3) { - var _a; - if (!model18) - model18 = await load19(config3); - if (!(model18 == null ? void 0 : model18["executor"]) || !((_a = model18 == null ? void 0 : model18.inputs) == null ? void 0 : _a[0].shape)) - return null; - const t2 = {}; - t2.resize = tf31.image.resizeBilinear(input, [model18.inputs[0].shape ? model18.inputs[0].shape[1] : 0, model18.inputs[0].shape ? model18.inputs[0].shape[2] : 0], false); - t2.norm = tf31.div(t2.resize, constants.tf255); - t2.res = model18.execute(t2.norm); - t2.squeeze = tf31.squeeze(t2.res, 0); - t2.alpha = tf31.image.resizeBilinear(t2.squeeze, [input.shape[1], input.shape[2]]); - t2.mul = tf31.mul(t2.alpha, constants.tf255); - let rgba; - switch (config3.segmentation.mode || "default") { - case "default": - t2.input = tf31.squeeze(input); - t2.concat = tf31.concat([t2.input, t2.mul], -1); - rgba = tf31.cast(t2.concat, "int32"); - break; - case "alpha": - rgba = tf31.cast(t2.mul, "int32"); - break; - default: - rgba = tf31.tensor(0); - } - Object.keys(t2).forEach((tensor6) => tf31.dispose(t2[tensor6])); - return rgba; -} - -// src/gear/ssrnet-age.ts -var tf32 = __toESM(require_tfjs_esm()); -var model19; -var last9 = []; -var lastCount8 = 0; -var lastTime14 = 0; -var skipped14 = Number.MAX_SAFE_INTEGER; -async function load20(config3) { - if (env.initial) - model19 = null; - if (!model19) - model19 = await loadModel(config3.face["ssrnet"].modelPathAge); - else if (config3.debug) - log("cached model:", model19["modelUrl"]); - return model19; -} -async function predict20(image27, config3, idx, count2) { - var _a, _b, _c, _d; - if (!model19) - return { age: 0 }; - const skipFrame = skipped14 < (((_a = config3.face["ssrnet"]) == null ? void 0 : _a.skipFrames) || 0); - const skipTime = (((_b = config3.face["ssrnet"]) == null ? void 0 : _b.skipTime) || 0) > now() - lastTime14; - if (config3.skipAllowed && skipFrame && skipTime && lastCount8 === count2 && ((_c = last9[idx]) == null ? void 0 : _c.age) && ((_d = last9[idx]) == null ? void 0 : _d.age) > 0) { - skipped14++; - return last9[idx]; - } - skipped14 = 0; - return new Promise(async (resolve) => { - var _a2; - if (!(model19 == null ? void 0 : model19.inputs) || !model19.inputs[0] || !model19.inputs[0].shape) - return; - const t2 = {}; - t2.resize = tf32.image.resizeBilinear(image27, [model19.inputs[0].shape[2], model19.inputs[0].shape[1]], false); - t2.enhance = tf32.mul(t2.resize, constants.tf255); - const obj = { age: 0 }; - if ((_a2 = config3.face["ssrnet"]) == null ? void 0 : _a2.enabled) - t2.age = model19.execute(t2.enhance); - if (t2.age) { - const data = await t2.age.data(); - obj.age = Math.trunc(10 * data[0]) / 10; - } - Object.keys(t2).forEach((tensor6) => tf32.dispose(t2[tensor6])); - last9[idx] = obj; - lastCount8 = count2; - lastTime14 = now(); - resolve(obj); - }); -} - -// src/gear/ssrnet-gender.ts -var tf33 = __toESM(require_tfjs_esm()); -var model20; -var last10 = []; -var lastCount9 = 0; -var lastTime15 = 0; -var skipped15 = Number.MAX_SAFE_INTEGER; -var rgb = [0.2989, 0.587, 0.114]; -async function load21(config3) { - var _a; - if (env.initial) - model20 = null; - if (!model20) - model20 = await loadModel((_a = config3.face["ssrnet"]) == null ? void 0 : _a.modelPathGender); - else if (config3.debug) - log("cached model:", model20["modelUrl"]); - return model20; -} -async function predict21(image27, config3, idx, count2) { - var _a, _b, _c, _d; - if (!model20) - return { gender: "unknown", genderScore: 0 }; - const skipFrame = skipped15 < (((_a = config3.face["ssrnet"]) == null ? void 0 : _a.skipFrames) || 0); - const skipTime = (((_b = config3.face["ssrnet"]) == null ? void 0 : _b.skipTime) || 0) > now() - lastTime15; - if (config3.skipAllowed && skipFrame && skipTime && lastCount9 === count2 && ((_c = last10[idx]) == null ? void 0 : _c.gender) && ((_d = last10[idx]) == null ? void 0 : _d.genderScore) > 0) { - skipped15++; - return last10[idx]; - } - skipped15 = 0; - return new Promise(async (resolve) => { - var _a2; - if (!(model20 == null ? void 0 : model20.inputs[0].shape)) - return; - const t2 = {}; - t2.resize = tf33.image.resizeBilinear(image27, [model20.inputs[0].shape[2], model20.inputs[0].shape[1]], false); - t2.enhance = tf33.tidy(() => { - const [red, green, blue] = tf33.split(t2.resize, 3, 3); - const redNorm = tf33.mul(red, rgb[0]); - const greenNorm = tf33.mul(green, rgb[1]); - const blueNorm = tf33.mul(blue, rgb[2]); - const grayscale = tf33.addN([redNorm, greenNorm, blueNorm]); - const normalize2 = tf33.mul(tf33.sub(grayscale, constants.tf05), 2); - return normalize2; - }); - const obj = { gender: "unknown", genderScore: 0 }; - if ((_a2 = config3.face["ssrnet"]) == null ? void 0 : _a2.enabled) - t2.gender = model20.execute(t2.enhance); - const data = await t2.gender.data(); - obj.gender = data[0] > data[1] ? "female" : "male"; - obj.genderScore = data[0] > data[1] ? Math.trunc(100 * data[0]) / 100 : Math.trunc(100 * data[1]) / 100; - Object.keys(t2).forEach((tensor6) => tf33.dispose(t2[tensor6])); - last10[idx] = obj; - lastCount9 = count2; - lastTime15 = now(); - resolve(obj); - }); -} - -// src/models.ts -var Models = class { - constructor() { - __publicField(this, "ssrnetage", null); - __publicField(this, "gear", null); - __publicField(this, "blazeposedetect", null); - __publicField(this, "blazepose", null); - __publicField(this, "centernet", null); - __publicField(this, "efficientpose", null); - __publicField(this, "mobilefacenet", null); - __publicField(this, "insightface", null); - __publicField(this, "emotion", null); - __publicField(this, "facedetect", null); - __publicField(this, "faceiris", null); - __publicField(this, "facemesh", null); - __publicField(this, "faceres", null); - __publicField(this, "ssrnetgender", null); - __publicField(this, "handpose", null); - __publicField(this, "handskeleton", null); - __publicField(this, "handtrack", null); - __publicField(this, "liveness", null); - __publicField(this, "meet", null); - __publicField(this, "movenet", null); - __publicField(this, "nanodet", null); - __publicField(this, "posenet", null); - __publicField(this, "selfie", null); - __publicField(this, "rvm", null); - __publicField(this, "antispoof", null); - } -}; -var instance; -var getModelStats = (currentInstance) => { - if (currentInstance) - instance = currentInstance; - if (!instance) - log("instance not registred"); - let totalSizeFromManifest = 0; - let totalSizeWeights = 0; - let totalSizeLoading = 0; - for (const m of Object.values(modelStats)) { - totalSizeFromManifest += m.sizeFromManifest; - totalSizeWeights += m.sizeLoadedWeights; - totalSizeLoading += m.sizeDesired; - } - const percentageLoaded = totalSizeLoading > 0 ? totalSizeWeights / totalSizeLoading : 0; - return { - numLoadedModels: Object.values(modelStats).length, - numDefinedModels: Object.keys(instance.models).length, - percentageLoaded, - totalSizeFromManifest, - totalSizeWeights, - totalSizeLoading, - totalSizeEnabled: void 0, - modelStats: Object.values(modelStats) - }; -}; -function reset2(currentInstance) { - if (currentInstance) - instance = currentInstance; - for (const model21 of Object.keys(instance.models)) - instance.models[model21] = null; -} -async function load22(currentInstance) { - var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C; - if (currentInstance) - instance = currentInstance; - if (!instance) - log("instance not registred"); - if (env.initial) - reset2(instance); - if (instance.config.hand.enabled) { - if (!instance.models.handpose && ((_b = (_a = instance.config.hand.detector) == null ? void 0 : _a.modelPath) == null ? void 0 : _b.includes("handdetect"))) { - [instance.models.handpose, instance.models.handskeleton] = await load10(instance.config); - } - if (!instance.models.handskeleton && instance.config.hand.landmarks && ((_d = (_c = instance.config.hand.detector) == null ? void 0 : _c.modelPath) == null ? void 0 : _d.includes("handdetect"))) { - [instance.models.handpose, instance.models.handskeleton] = await load10(instance.config); - } - } - if (instance.config.body.enabled && !instance.models.blazepose && ((_e = instance.config.body.modelPath) == null ? void 0 : _e.includes("blazepose"))) - instance.models.blazepose = loadPose(instance.config); - if (instance.config.body.enabled && !instance.models.blazeposedetect && instance.config.body["detector"] && instance.config.body["detector"].modelPath) - instance.models.blazeposedetect = loadDetect(instance.config); - if (instance.config.body.enabled && !instance.models.efficientpose && ((_f = instance.config.body.modelPath) == null ? void 0 : _f.includes("efficientpose"))) - instance.models.efficientpose = load4(instance.config); - if (instance.config.body.enabled && !instance.models.movenet && ((_g = instance.config.body.modelPath) == null ? void 0 : _g.includes("movenet"))) - instance.models.movenet = load15(instance.config); - if (instance.config.body.enabled && !instance.models.posenet && ((_h = instance.config.body.modelPath) == null ? void 0 : _h.includes("posenet"))) - instance.models.posenet = load17(instance.config); - if (instance.config.face.enabled && !instance.models.facedetect) - instance.models.facedetect = load2(instance.config); - if (instance.config.face.enabled && ((_i = instance.config.face.antispoof) == null ? void 0 : _i.enabled) && !instance.models.antispoof) - instance.models.antispoof = load(instance.config); - if (instance.config.face.enabled && ((_j = instance.config.face.liveness) == null ? void 0 : _j.enabled) && !instance.models.liveness) - instance.models.liveness = load12(instance.config); - if (instance.config.face.enabled && ((_k = instance.config.face.description) == null ? void 0 : _k.enabled) && !instance.models.faceres) - instance.models.faceres = load8(instance.config); - if (instance.config.face.enabled && ((_l = instance.config.face.emotion) == null ? void 0 : _l.enabled) && !instance.models.emotion) - instance.models.emotion = load5(instance.config); - if (instance.config.face.enabled && ((_m = instance.config.face.iris) == null ? void 0 : _m.enabled) && !((_n = instance.config.face.attention) == null ? void 0 : _n.enabled) && !instance.models.faceiris) - instance.models.faceiris = load6(instance.config); - if (instance.config.face.enabled && ((_o = instance.config.face.mesh) == null ? void 0 : _o.enabled) && !instance.models.facemesh) - instance.models.facemesh = load7(instance.config); - if (instance.config.face.enabled && ((_p = instance.config.face["gear"]) == null ? void 0 : _p.enabled) && !instance.models.gear) - instance.models.gear = load9(instance.config); - if (instance.config.face.enabled && ((_q = instance.config.face["ssrnet"]) == null ? void 0 : _q.enabled) && !instance.models.ssrnetage) - instance.models.ssrnetage = load20(instance.config); - if (instance.config.face.enabled && ((_r = instance.config.face["ssrnet"]) == null ? void 0 : _r.enabled) && !instance.models.ssrnetgender) - instance.models.ssrnetgender = load21(instance.config); - if (instance.config.face.enabled && ((_s = instance.config.face["mobilefacenet"]) == null ? void 0 : _s.enabled) && !instance.models.mobilefacenet) - instance.models.mobilefacenet = load14(instance.config); - if (instance.config.face.enabled && ((_t = instance.config.face["insightface"]) == null ? void 0 : _t.enabled) && !instance.models.insightface) - instance.models.insightface = load11(instance.config); - if (instance.config.hand.enabled && !instance.models.handtrack && ((_v = (_u = instance.config.hand.detector) == null ? void 0 : _u.modelPath) == null ? void 0 : _v.includes("handtrack"))) - instance.models.handtrack = loadDetect2(instance.config); - if (instance.config.hand.enabled && instance.config.hand.landmarks && !instance.models.handskeleton && ((_x = (_w = instance.config.hand.detector) == null ? void 0 : _w.modelPath) == null ? void 0 : _x.includes("handtrack"))) - instance.models.handskeleton = loadSkeleton(instance.config); - if (instance.config.object.enabled && !instance.models.centernet && ((_y = instance.config.object.modelPath) == null ? void 0 : _y.includes("centernet"))) - instance.models.centernet = load3(instance.config); - if (instance.config.object.enabled && !instance.models.nanodet && ((_z = instance.config.object.modelPath) == null ? void 0 : _z.includes("nanodet"))) - instance.models.nanodet = load16(instance.config); - if (instance.config.segmentation.enabled && !instance.models.selfie && ((_A = instance.config.segmentation.modelPath) == null ? void 0 : _A.includes("selfie"))) - instance.models.selfie = load19(instance.config); - if (instance.config.segmentation.enabled && !instance.models.meet && ((_B = instance.config.segmentation.modelPath) == null ? void 0 : _B.includes("meet"))) - instance.models.meet = load13(instance.config); - if (instance.config.segmentation.enabled && !instance.models.rvm && ((_C = instance.config.segmentation.modelPath) == null ? void 0 : _C.includes("rvm"))) - instance.models.rvm = load18(instance.config); - for await (const model21 of Object.keys(instance.models)) { - if (instance.models[model21] && typeof instance.models[model21] !== "undefined") { - instance.models[model21] = await instance.models[model21]; - } - } -} -function validateModel(currentInstance, model21, name) { - var _a, _b; - if (!model21) - return null; - if (currentInstance) - instance = currentInstance; - if (!instance) - log("instance not registred"); - if (!((_a = instance == null ? void 0 : instance.config) == null ? void 0 : _a.validateModels)) - return null; - const simpleOps = ["const", "placeholder", "noop", "pad", "squeeze", "add", "sub", "mul", "div"]; - const ignoreOps = ["biasadd", "fusedbatchnormv3", "matmul", "switch", "shape", "merge", "split", "broadcastto"]; - const ops = []; - const missing = []; - const url = model21["modelUrl"]; - const executor = model21["executor"]; - if ((_b = executor == null ? void 0 : executor.graph) == null ? void 0 : _b.nodes) { - for (const kernel of Object.values(executor.graph.nodes)) { - const op = kernel.op.toLowerCase(); - if (!ops.includes(op)) - ops.push(op); - } - } else { - if (!executor && instance.config.debug) { - log("model not loaded", name); - } - } - for (const op of ops) { - if (!simpleOps.includes(op) && !ignoreOps.includes(op) && !instance.env.kernels.includes(op) && !instance.env.kernels.includes(op.replace("_", "")) && !instance.env.kernels.includes(op.replace("native", "")) && !instance.env.kernels.includes(op.replace("v2", ""))) { - missing.push(op); - } - } - if (instance.config.debug && missing.length > 0) - log("model validation failed:", name, missing); - return missing.length > 0 ? { name, missing, ops, url } : null; -} -function validate2(currentInstance) { - if (currentInstance) - instance = currentInstance; - if (!instance) - log("instance not registred"); - const missing = []; - for (const defined of Object.keys(currentInstance.models)) { - const model21 = currentInstance.models[defined]; - if (!model21) - continue; - const res = validateModel(currentInstance, model21, defined); - if (res) - missing.push(res); - } - return missing; -} - -// src/tfjs/humangl.ts -var config2 = { - name: "humangl", - priority: 999, - canvas: null, - gl: null, - extensions: [], - webGLattr: { - alpha: false, - antialias: false, - premultipliedAlpha: false, - preserveDrawingBuffer: false, - depth: false, - stencil: false, - failIfMajorPerformanceCaveat: false, - desynchronized: true - } -}; -function extensions() { - const gl = config2.gl; - if (!gl) - return; - config2.extensions = gl.getSupportedExtensions(); -} -function register(instance2) { - var _a; - if (instance2.config.backend !== "humangl") - return; - if (config2.name in tf34.engine().registry && !((_a = config2 == null ? void 0 : config2.gl) == null ? void 0 : _a.getParameter(config2.gl.VERSION))) { - log("humangl error: backend invalid context"); - reset2(instance2); - } - if (!tf34.findBackend(config2.name)) { - try { - config2.canvas = canvas(100, 100); - } catch (err) { - log("humangl error: cannot create canvas:", err); - return; - } - try { - config2.gl = config2.canvas.getContext("webgl2", config2.webGLattr); - if (!config2.gl) { - log("humangl error: cannot get webgl context"); - return; - } - const glv2 = config2.gl.getParameter(config2.gl.VERSION).includes("2.0"); - if (!glv2) { - log("backend override: using fallback webgl backend as webgl 2.0 is not detected"); - instance2.config.backend = "webgl"; - return; - } - if (config2.canvas) { - config2.canvas.addEventListener("webglcontextlost", (e) => { - log("humangl error:", e.type); - log("possible browser memory leak using webgl or conflict with multiple backend registrations"); - instance2.emit("error"); - throw new Error("backend error: webgl context lost"); - }); - config2.canvas.addEventListener("webglcontextrestored", (e) => { - log("humangl error: context restored:", e); - }); - config2.canvas.addEventListener("webglcontextcreationerror", (e) => { - log("humangl error: context create:", e); - }); - } - } catch (err) { - log("humangl error: cannot get webgl context:", err); - return; - } - try { - tf34.setWebGLContext(2, config2.gl); - } catch (err) { - log("humangl error: cannot set webgl context:", err); - return; - } - try { - const ctx = new tf34.GPGPUContext(config2.gl); - tf34.registerBackend(config2.name, () => new tf34.MathBackendWebGL(ctx), config2.priority); - } catch (err) { - log("humangl error: cannot register webgl backend:", err); - return; - } - try { - const kernels = tf34.getKernelsForBackend("webgl"); - kernels.forEach((kernelConfig) => { - const newKernelConfig = { ...kernelConfig, backendName: config2.name }; - tf34.registerKernel(newKernelConfig); - }); - } catch (err) { - log("humangl error: cannot update webgl backend registration:", err); - return; - } - try { - if (tf34.env().flagRegistry.WEBGL_VERSION) - tf34.env().set("WEBGL_VERSION", 2); - } catch (err) { - log("humangl error: cannot set WebGL backend flags:", err); - return; - } - extensions(); - const current = tf34.backend().getGPGPUContext ? tf34.backend().getGPGPUContext().gl : null; - if (current) { - if (instance2.config.debug) - log("humangl backend registered:", { webgl: current.getParameter(current.VERSION), renderer: current.getParameter(current.RENDERER) }); - } else { - log("humangl error: no current gl context:", current, config2.gl); - } - } -} - -// src/tfjs/backend.ts -var tf35 = __toESM(require_tfjs_esm()); -function registerCustomOps(config3) { - const newKernels = []; - if (!env.kernels.includes("mod")) { - const kernelMod = { - kernelName: "Mod", - backendName: tf35.getBackend(), - kernelFunc: (op) => tf35.tidy(() => tf35.sub(op.inputs.a, tf35.mul(tf35.div(op.inputs.a, op.inputs.b), op.inputs.b))) - }; - tf35.registerKernel(kernelMod); - env.kernels.push("mod"); - newKernels.push("mod"); - } - if (!env.kernels.includes("floormod")) { - const kernelFloorMod = { - kernelName: "FloorMod", - backendName: tf35.getBackend(), - kernelFunc: (op) => tf35.tidy(() => tf35.add(tf35.mul(tf35.floorDiv(op.inputs.a / op.inputs.b), op.inputs.b), tf35.mod(op.inputs.a, op.inputs.b))) - }; - tf35.registerKernel(kernelFloorMod); - env.kernels.push("floormod"); - newKernels.push("floormod"); - } - if (!env.kernels.includes("rotatewithoffset") && config3.softwareKernels) { - const kernelRotateWithOffset = { - kernelName: "RotateWithOffset", - backendName: tf35.getBackend(), - kernelFunc: (op) => tf35.tidy(() => { - const backend4 = tf35.getBackend(); - tf35.setBackend("cpu"); - const t2 = tf35.image.rotateWithOffset(op.inputs.image, op.attrs.radians, op.attrs.fillValue, op.attrs.center); - tf35.setBackend(backend4); - return t2; - }) - }; - tf35.registerKernel(kernelRotateWithOffset); - env.kernels.push("rotatewithoffset"); - newKernels.push("rotatewithoffset"); - } - if (newKernels.length > 0 && config3.debug) - log("registered kernels:", newKernels); -} -var defaultFlags = {}; -async function check(instance2, force = false) { - instance2.state = "backend"; - if (force || env.initial || instance2.config.backend && instance2.config.backend.length > 0 && tf35.getBackend() !== instance2.config.backend) { - const timeStamp = now(); - if (instance2.config.backend && instance2.config.backend.length > 0) { - if (typeof window === "undefined" && typeof WorkerGlobalScope !== "undefined" && instance2.config.debug) { - if (instance2.config.debug) - log("running inside web worker"); - } - if (env.browser && instance2.config.backend === "tensorflow") { - if (instance2.config.debug) - log("override: backend set to tensorflow while running in browser"); - instance2.config.backend = "webgl"; - } - if (env.node && (instance2.config.backend === "webgl" || instance2.config.backend === "humangl")) { - if (instance2.config.debug) - log(`override: backend set to ${instance2.config.backend} while running in nodejs`); - instance2.config.backend = "tensorflow"; - } - if (env.browser && instance2.config.backend === "webgpu") { - if (typeof navigator === "undefined" || typeof navigator.gpu === "undefined") { - log("override: backend set to webgpu but browser does not support webgpu"); - instance2.config.backend = "webgl"; - } else { - const adapter = await navigator.gpu.requestAdapter(); - if (instance2.config.debug) - log("enumerated webgpu adapter:", adapter); - if (!adapter) { - log("override: backend set to webgpu but browser reports no available gpu"); - instance2.config.backend = "webgl"; - } else { - const adapterInfo = "requestAdapterInfo" in adapter ? await adapter.requestAdapterInfo() : void 0; - log("webgpu adapter info:", adapterInfo); - } - } - } - let available = Object.keys(tf35.engine().registryFactory); - if (instance2.config.backend === "humangl" && !available.includes("humangl")) { - register(instance2); - available = Object.keys(tf35.engine().registryFactory); - } - if (instance2.config.debug) - log("available backends:", available); - if (!available.includes(instance2.config.backend)) { - log(`error: backend ${instance2.config.backend} not found in registry`); - instance2.config.backend = env.node ? "tensorflow" : "webgl"; - if (instance2.config.debug) - log(`override: setting backend ${instance2.config.backend}`); - } - if (instance2.config.debug) - log("setting backend:", [instance2.config.backend]); - if (instance2.config.backend === "wasm") { - if (tf35.env().flagRegistry.CANVAS2D_WILL_READ_FREQUENTLY) - tf35.env().set("CANVAS2D_WILL_READ_FREQUENTLY", true); - if (instance2.config.debug) - log("wasm path:", instance2.config.wasmPath); - if (typeof tf35.setWasmPaths !== "undefined") - tf35.setWasmPaths(instance2.config.wasmPath, instance2.config.wasmPlatformFetch); - else - throw new Error("backend error: attempting to use wasm backend but wasm path is not set"); - let mt = false; - let simd = false; - try { - mt = await tf35.env().getAsync("WASM_HAS_MULTITHREAD_SUPPORT"); - simd = await tf35.env().getAsync("WASM_HAS_SIMD_SUPPORT"); - if (instance2.config.debug) - log(`wasm execution: ${simd ? "simd" : "no simd"} ${mt ? "multithreaded" : "singlethreaded"}`); - if (instance2.config.debug && !simd) - log("warning: wasm simd support is not enabled"); - } catch (e) { - log("wasm detection failed"); - } - } - try { - await tf35.setBackend(instance2.config.backend); - await tf35.ready(); - } catch (err) { - log("error: cannot set backend:", instance2.config.backend, err); - return false; - } - if (instance2.config.debug) - defaultFlags = JSON.parse(JSON.stringify(tf35.env().flags)); - } - if (tf35.getBackend() === "humangl" || tf35.getBackend() === "webgl") { - if (tf35.env().flagRegistry.WEBGL_USE_SHAPES_UNIFORMS) - tf35.env().set("WEBGL_USE_SHAPES_UNIFORMS", true); - if (tf35.env().flagRegistry.WEBGL_EXP_CONV) - tf35.env().set("WEBGL_EXP_CONV", true); - if (instance2.config.debug && typeof instance2.config.deallocate !== "undefined" && instance2.config.deallocate) { - log("changing webgl: WEBGL_DELETE_TEXTURE_THRESHOLD:", true); - tf35.env().set("WEBGL_DELETE_TEXTURE_THRESHOLD", 0); - } - } - if (tf35.getBackend() === "webgpu") { - } - if (instance2.config.debug) { - const newFlags = tf35.env().flags; - const updatedFlags = {}; - for (const key of Object.keys(newFlags)) { - if (defaultFlags[key] === newFlags[key]) - continue; - updatedFlags[key] = newFlags[key]; - } - if (instance2.config.debug && Object.keys(updatedFlags).length > 0) - log("backend:", tf35.getBackend(), "flags:", updatedFlags); - } - if (instance2.config.flags && Object.keys(instance2.config.flags).length > 0) { - if (instance2.config.debug) - log("flags:", instance2.config["flags"]); - for (const [key, val] of Object.entries(instance2.config.flags)) { - tf35.env().set(key, val); - } - } - tf35.enableProdMode(); - init(); - instance2.performance.initBackend = Math.trunc(now() - timeStamp); - instance2.config.backend = tf35.getBackend(); - await env.updateBackend(); - registerCustomOps(instance2.config); - env.initial = false; - } - return true; -} -function fakeOps(kernelNames, config3) { - for (const kernelName of kernelNames) { - const kernelConfig = { - kernelName, - backendName: config3.backend, - kernelFunc: () => { - if (config3.debug) - log("kernelFunc", kernelName, config3.backend); - } - }; - tf35.registerKernel(kernelConfig); - } - env.kernels = tf35.getKernelsForBackend(tf35.getBackend()).map((kernel) => kernel.kernelName.toLowerCase()); -} - -// src/draw/draw.ts -var draw_exports = {}; -__export(draw_exports, { - all: () => all, - body: () => body, - canvas: () => canvas2, - face: () => face, - gesture: () => gesture, - hand: () => hand, - object: () => object, - options: () => options3, - person: () => person -}); - -// src/draw/primitives.ts -var getCanvasContext = (input) => { - if (!input) - log("draw error: invalid canvas"); - else if (!input.getContext) - log("draw error: canvas context not defined"); - else { - const ctx = input.getContext("2d"); - if (!ctx) - log("draw error: cannot get canvas context"); - else - return ctx; - } - return null; -}; -var rad2deg = (theta) => Math.round(theta * 180 / Math.PI); -var colorDepth = (z, opt2) => { - if (!opt2.useDepth || typeof z === "undefined") - return opt2.color; - const rgb2 = Uint8ClampedArray.from([127 + 2 * z, 127 - 2 * z, 255]); - return `rgba(${rgb2[0]}, ${rgb2[1]}, ${rgb2[2]}, ${opt2.alpha})`; -}; -function point(ctx, x, y, z, localOptions) { - ctx.fillStyle = colorDepth(z, localOptions); - ctx.beginPath(); - ctx.arc(x, y, localOptions.pointSize, 0, 2 * Math.PI); - ctx.fill(); -} -function rect(ctx, x, y, width, height, localOptions) { - ctx.beginPath(); - ctx.lineWidth = localOptions.lineWidth; - if (localOptions.useCurves) { - const cx = (x + x + width) / 2; - const cy = (y + y + height) / 2; - ctx.ellipse(cx, cy, width / 2, height / 2, 0, 0, 2 * Math.PI); - } else { - ctx.moveTo(x + localOptions.roundRect, y); - ctx.lineTo(x + width - localOptions.roundRect, y); - ctx.quadraticCurveTo(x + width, y, x + width, y + localOptions.roundRect); - ctx.lineTo(x + width, y + height - localOptions.roundRect); - ctx.quadraticCurveTo(x + width, y + height, x + width - localOptions.roundRect, y + height); - ctx.lineTo(x + localOptions.roundRect, y + height); - ctx.quadraticCurveTo(x, y + height, x, y + height - localOptions.roundRect); - ctx.lineTo(x, y + localOptions.roundRect); - ctx.quadraticCurveTo(x, y, x + localOptions.roundRect, y); - ctx.closePath(); - } - ctx.stroke(); -} -function lines(ctx, points, localOptions) { - if (points.length < 2) - return; - ctx.beginPath(); - ctx.moveTo(points[0][0], points[0][1]); - for (const pt of points) { - ctx.strokeStyle = colorDepth(pt[2] || 0, localOptions); - ctx.lineTo(Math.trunc(pt[0]), Math.trunc(pt[1])); - } - ctx.stroke(); - if (localOptions.fillPolygons) { - ctx.closePath(); - ctx.fill(); - } -} -function curves(ctx, points, localOptions) { - if (points.length < 2) - return; - ctx.lineWidth = localOptions.lineWidth; - if (!localOptions.useCurves || points.length <= 2) { - lines(ctx, points, localOptions); - return; - } - ctx.moveTo(points[0][0], points[0][1]); - for (let i = 0; i < points.length - 2; i++) { - const xc = (points[i][0] + points[i + 1][0]) / 2; - const yc = (points[i][1] + points[i + 1][1]) / 2; - ctx.quadraticCurveTo(points[i][0], points[i][1], xc, yc); - } - ctx.quadraticCurveTo(points[points.length - 2][0], points[points.length - 2][1], points[points.length - 1][0], points[points.length - 1][1]); - ctx.stroke(); - if (localOptions.fillPolygons) { - ctx.closePath(); - ctx.fill(); - } -} -function arrow(ctx, from, to, radius = 5) { - let angle; - let x; - let y; - ctx.beginPath(); - ctx.moveTo(from[0], from[1]); - ctx.lineTo(to[0], to[1]); - angle = Math.atan2(to[1] - from[1], to[0] - from[0]); - x = radius * Math.cos(angle) + to[0]; - y = radius * Math.sin(angle) + to[1]; - ctx.moveTo(x, y); - angle += 1 / 3 * (2 * Math.PI); - x = radius * Math.cos(angle) + to[0]; - y = radius * Math.sin(angle) + to[1]; - ctx.lineTo(x, y); - angle += 1 / 3 * (2 * Math.PI); - x = radius * Math.cos(angle) + to[0]; - y = radius * Math.sin(angle) + to[1]; - ctx.lineTo(x, y); - ctx.closePath(); - ctx.stroke(); - ctx.fill(); -} - -// src/draw/options.ts -var options3 = { - color: "rgba(173, 216, 230, 0.6)", - labelColor: "rgba(173, 216, 230, 1)", - shadowColor: "black", - alpha: 0.5, - font: 'small-caps 16px "Segoe UI"', - lineHeight: 18, - lineWidth: 4, - pointSize: 2, - roundRect: 8, - drawPoints: false, - drawLabels: true, - drawBoxes: true, - drawAttention: true, - drawGestures: true, - drawPolygons: true, - drawGaze: true, - fillPolygons: false, - useDepth: true, - useCurves: false -}; - -// src/draw/face.ts -var opt; -function drawLabels(f, ctx) { - var _a, _b; - if (opt.drawLabels) { - const labels2 = []; - labels2.push(`face: ${Math.trunc(100 * f.score)}%`); - if (f.genderScore) - labels2.push(`${f.gender || ""} ${Math.trunc(100 * f.genderScore)}%`); - if (f.age) - labels2.push(`age: ${f.age || ""}`); - if (f.iris) - labels2.push(`distance: ${f.iris}`); - if (f.real) - labels2.push(`real: ${Math.trunc(100 * f.real)}%`); - if (f.live) - labels2.push(`live: ${Math.trunc(100 * f.live)}%`); - if (f.emotion && f.emotion.length > 0) { - const emotion2 = f.emotion.map((a) => `${Math.trunc(100 * a.score)}% ${a.emotion}`); - if (emotion2.length > 3) - emotion2.length = 3; - labels2.push(emotion2.join(" ")); - } - if (((_a = f.rotation) == null ? void 0 : _a.angle) && ((_b = f.rotation) == null ? void 0 : _b.gaze)) { - if (f.rotation.angle.roll) - labels2.push(`roll: ${rad2deg(f.rotation.angle.roll)}\xB0 yaw:${rad2deg(f.rotation.angle.yaw)}\xB0 pitch:${rad2deg(f.rotation.angle.pitch)}\xB0`); - if (f.rotation.gaze.bearing) - labels2.push(`gaze: ${rad2deg(f.rotation.gaze.bearing)}\xB0`); - } - if (labels2.length === 0) - labels2.push("face"); - ctx.fillStyle = opt.color; - for (let i = labels2.length - 1; i >= 0; i--) { - const x = Math.max(f.box[0], 0); - const y = i * opt.lineHeight + f.box[1]; - if (opt.shadowColor && opt.shadowColor !== "") { - ctx.fillStyle = opt.shadowColor; - ctx.fillText(labels2[i], x + 5, y + 16); - } - ctx.fillStyle = opt.labelColor; - ctx.fillText(labels2[i], x + 4, y + 15); - } - } -} -function drawIrisElipse(f, ctx) { - var _a, _b, _c, _d; - if (((_a = f.annotations) == null ? void 0 : _a.leftEyeIris) && ((_b = f.annotations) == null ? void 0 : _b.leftEyeIris[0])) { - ctx.strokeStyle = opt.useDepth ? "rgba(255, 200, 255, 0.3)" : opt.color; - ctx.beginPath(); - const sizeX = Math.abs(f.annotations.leftEyeIris[3][0] - f.annotations.leftEyeIris[1][0]) / 2; - const sizeY = Math.abs(f.annotations.leftEyeIris[4][1] - f.annotations.leftEyeIris[2][1]) / 2; - ctx.ellipse(f.annotations.leftEyeIris[0][0], f.annotations.leftEyeIris[0][1], sizeX, sizeY, 0, 0, 2 * Math.PI); - ctx.stroke(); - if (opt.fillPolygons) { - ctx.fillStyle = opt.useDepth ? "rgba(255, 255, 200, 0.3)" : opt.color; - ctx.fill(); - } - } - if (((_c = f.annotations) == null ? void 0 : _c.rightEyeIris) && ((_d = f.annotations) == null ? void 0 : _d.rightEyeIris[0])) { - ctx.strokeStyle = opt.useDepth ? "rgba(255, 200, 255, 0.3)" : opt.color; - ctx.beginPath(); - const sizeX = Math.abs(f.annotations.rightEyeIris[3][0] - f.annotations.rightEyeIris[1][0]) / 2; - const sizeY = Math.abs(f.annotations.rightEyeIris[4][1] - f.annotations.rightEyeIris[2][1]) / 2; - ctx.ellipse(f.annotations.rightEyeIris[0][0], f.annotations.rightEyeIris[0][1], sizeX, sizeY, 0, 0, 2 * Math.PI); - ctx.stroke(); - if (opt.fillPolygons) { - ctx.fillStyle = opt.useDepth ? "rgba(255, 255, 200, 0.3)" : opt.color; - ctx.fill(); - } - } -} -function drawGazeSpheres(f, ctx) { - var _a; - if (opt.drawGaze && ((_a = f.rotation) == null ? void 0 : _a.angle) && typeof Path2D !== "undefined") { - ctx.strokeStyle = "pink"; - const valX = f.box[0] + f.box[2] / 2 - f.box[3] * rad2deg(f.rotation.angle.yaw) / 90; - const valY = f.box[1] + f.box[3] / 2 + f.box[2] * rad2deg(f.rotation.angle.pitch) / 90; - const pathV = new Path2D(` - M ${f.box[0] + f.box[2] / 2} ${f.box[1]} +`;var Ut=(e,t,n)=>{let o=new RegExp("\\b"+t+" \\w+ (\\w+)","ig");e.replace(o,(r,s)=>(n[s]=0,r))},Yt=class{constructor(t,n,o){R(this,"uniform",{});R(this,"attribute",{});R(this,"gl");R(this,"id");R(this,"compile",(t,n)=>{let o=this.gl.createShader(n);return o?(this.gl.shaderSource(o,t),this.gl.compileShader(o),this.gl.getShaderParameter(o,this.gl.COMPILE_STATUS)?o:(h(`filter: gl compile failed: ${this.gl.getShaderInfoLog(o)||"unknown"}`),null)):(h("filter: could not create shader"),null)});this.gl=t;let r=this.compile(n,this.gl.VERTEX_SHADER),s=this.compile(o,this.gl.FRAGMENT_SHADER);if(this.id=this.gl.createProgram(),!(!r||!s)){if(!this.id){h("filter: could not create webgl program");return}if(this.gl.attachShader(this.id,r),this.gl.attachShader(this.id,s),this.gl.linkProgram(this.id),!this.gl.getProgramParameter(this.id,this.gl.LINK_STATUS)){h(`filter: gl link failed: ${this.gl.getProgramInfoLog(this.id)||"unknown"}`);return}this.gl.useProgram(this.id),Ut(n,"attribute",this.attribute);for(let A in this.attribute)this.attribute[A]=this.gl.getAttribLocation(this.id,A);Ut(n,"uniform",this.uniform),Ut(o,"uniform",this.uniform);for(let A in this.uniform)this.uniform[A]=this.gl.getUniformLocation(this.id,A)}}};function V1(){let e=0,t=null,n=!1,o=-1,r=[null,null],s=[],A=null,a=null,l=$0(100,100),c={},x={INTERMEDIATE:1},i=l.getContext("webgl");if(!i){h("filter: cannot get webgl context");return}this.gl=i;function f(T,y){if(!(T===l.width&&y===l.height)){if(l.width=T,l.height=y,!A){let b=new Float32Array([-1,-1,0,1,1,-1,1,1,-1,1,0,0,-1,1,0,0,1,-1,1,1,1,1,1,0]);A=i.createBuffer(),i.bindBuffer(i.ARRAY_BUFFER,A),i.bufferData(i.ARRAY_BUFFER,b,i.STATIC_DRAW),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0)}i.viewport(0,0,l.width,l.height),r=[null,null]}}function d(T,y){let b=i.createFramebuffer();i.bindFramebuffer(i.FRAMEBUFFER,b);let z=i.createRenderbuffer();i.bindRenderbuffer(i.RENDERBUFFER,z);let w=i.createTexture();return i.bindTexture(i.TEXTURE_2D,w),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,T,y,0,i.RGBA,i.UNSIGNED_BYTE,null),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),i.framebufferTexture2D(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,w,0),i.bindTexture(i.TEXTURE_2D,null),i.bindFramebuffer(i.FRAMEBUFFER,null),{fbo:b,texture:w}}function m(T){return r[T]=r[T]||d(l.width,l.height),r[T]}function p(T=0){if(!a)return;let y=null,b=null,z=!1;e===0?y=t:y=m(o).texture||null,e++,n&&!(T&x.INTERMEDIATE)?(b=null,z=e%2===0):(o=(o+1)%2,b=m(o).fbo||null),i.bindTexture(i.TEXTURE_2D,y),i.bindFramebuffer(i.FRAMEBUFFER,b),i.uniform1f(a.uniform.flipY,z?-1:1),i.drawArrays(i.TRIANGLES,0,6)}function g(T){if(c[T])return a=c[T],i.useProgram((a?a.id:null)||null),a;if(a=new Yt(i,L1,T),!a)return h("filter: could not get webgl program"),null;let y=Float32Array.BYTES_PER_ELEMENT,b=4*y;return i.enableVertexAttribArray(a.attribute.pos),i.vertexAttribPointer(a.attribute.pos,2,i.FLOAT,!1,b,0*y),i.enableVertexAttribArray(a.attribute.uv),i.vertexAttribPointer(a.attribute.uv,2,i.FLOAT,!1,b,2*y),c[T]=a,a}let v={colorMatrix:T=>{let y=new Float32Array(T);y[4]/=255,y[9]/=255,y[14]/=255,y[19]/=255;let b=y[18]===1&&y[3]===0&&y[8]===0&&y[13]===0&&y[15]===0&&y[16]===0&&y[17]===0&&y[19]===0?F1:W1,z=g(b);!z||(i.uniform1fv(z.uniform.m,y),p())},brightness:T=>{let y=(T||0)+1;v.colorMatrix([y,0,0,0,0,0,y,0,0,0,0,0,y,0,0,0,0,0,1,0])},saturation:T=>{let y=(T||0)*2/3+1,b=(y-1)*-.5;v.colorMatrix([y,b,b,0,0,b,y,b,0,0,b,b,y,0,0,0,0,0,1,0])},desaturate:()=>{v.saturation(-1)},contrast:T=>{let y=(T||0)+1,b=-128*(y-1);v.colorMatrix([y,0,0,0,b,0,y,0,0,b,0,0,y,0,b,0,0,0,1,0])},negative:()=>{v.contrast(-2)},hue:T=>{T=(T||0)/180*Math.PI;let y=Math.cos(T),b=Math.sin(T),z=.213,w=.715,O=.072;v.colorMatrix([z+y*(1-z)+b*-z,w+y*-w+b*-w,O+y*-O+b*(1-O),0,0,z+y*-z+b*.143,w+y*(1-w)+b*.14,O+y*-O+b*-.283,0,0,z+y*-z+b*-(1-z),w+y*-w+b*w,O+y*(1-O)+b*O,0,0,0,0,0,1,0])},desaturateLuminance:()=>{v.colorMatrix([.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,0,0,0,1,0])},sepia:()=>{v.colorMatrix([.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0])},brownie:()=>{v.colorMatrix([.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0])},vintagePinhole:()=>{v.colorMatrix([.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0])},kodachrome:()=>{v.colorMatrix([1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0])},technicolor:()=>{v.colorMatrix([1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0])},polaroid:()=>{v.colorMatrix([1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0])},shiftToBGR:()=>{v.colorMatrix([0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0])},convolution:T=>{let y=new Float32Array(T),b=1/l.width,z=1/l.height,w=g(H1);!w||(i.uniform1fv(w.uniform.m,y),i.uniform2f(w.uniform.px,b,z),p())},detectEdges:()=>{v.convolution.call(this,[0,1,0,1,-4,1,0,1,0])},sobelX:()=>{v.convolution.call(this,[-1,0,1,-2,0,2,-1,0,1])},sobelY:()=>{v.convolution.call(this,[-1,-2,-1,0,0,0,1,2,1])},sharpen:T=>{let y=T||1;v.convolution.call(this,[0,-1*y,0,-1*y,1+4*y,-1*y,0,-1*y,0])},emboss:T=>{let y=T||1;v.convolution.call(this,[-2*y,-1*y,0,-1*y,1,1*y,0,1*y,2*y])},blur:T=>{let y=T/7/l.width,b=T/7/l.height,z=g(B1);!z||(i.uniform2f(z.uniform.px,0,b),p(x.INTERMEDIATE),i.uniform2f(z.uniform.px,y,0),p())},pixelate:T=>{let y=T/l.width,b=T/l.height,z=g(G1);!z||(i.uniform2f(z.uniform.size,y,b),p())}};this.add=function(T){let y=Array.prototype.slice.call(arguments,1),b=v[T];s.push({func:b,args:y})},this.reset=function(){s=[]},this.get=function(){return s},this.apply=function(T){f(T.width,T.height),e=0,t||(t=i.createTexture()),i.bindTexture(i.TEXTURE_2D,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.NEAREST),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,T);for(let y=0;yd.data())),A=.99*Math.max(s[0][0],s[1][0],s[2][0]),a=[Y.sub(n[0],o[0]),Y.sub(n[1],o[1]),Y.sub(n[2],o[2])],l=[Y.sub(r[0],o[0]),Y.sub(r[1],o[1]),Y.sub(r[2],o[2])],c=[Y.div(A,l[0]),Y.div(A,l[1]),Y.div(A,l[2])],x=[Y.mul(a[0],c[0]),Y.mul(a[1],c[1]),Y.mul(a[2],c[2])],i=Y.stack([x[0],x[1],x[2]],2),f=Y.reshape(i,[1,t.shape[0],t.shape[1],3]);return Y.dispose([...n,...o,...r,...a,...l,...c,...x,i,t]),f}var K2=3840,g0=null,M0=null,a2=null,_,U0={inputSum:0,cacheDiff:1,sumMethod:0,inputTensor:void 0};function Kt(){U0.inputSum=0,U0.cacheDiff=1,U0.sumMethod=0,U0.inputTensor=void 0}function $0(e,t){let n;if(k.browser)if(k.worker){if(typeof OffscreenCanvas=="undefined")throw new Error("canvas error: attempted to run in web worker but OffscreenCanvas is not supported");n=new OffscreenCanvas(e,t)}else{if(typeof document=="undefined")throw new Error("canvas error: attempted to run in browser but DOM is not defined");n=document.createElement("canvas"),n.width=e,n.height=t}else typeof k.Canvas!="undefined"?n=new k.Canvas(e,t):typeof globalThis.Canvas!="undefined"&&(n=new globalThis.Canvas(e,t));return n}function J2(e,t){let n=t||$0(e.width,e.height);return n.getContext("2d").drawImage(e,0,0),n}async function Q2(e,t,n=!0){var f,d;if(!e)return t.debug&&h("input error: input is missing"),{tensor:null,canvas:null};if(!(e instanceof I.Tensor)&&!(typeof Image!="undefined"&&e instanceof Image)&&!(typeof k.Canvas!="undefined"&&e instanceof k.Canvas)&&!(typeof globalThis.Canvas!="undefined"&&e instanceof globalThis.Canvas)&&!(typeof ImageData!="undefined"&&e instanceof ImageData)&&!(typeof ImageBitmap!="undefined"&&e instanceof ImageBitmap)&&!(typeof HTMLImageElement!="undefined"&&e instanceof HTMLImageElement)&&!(typeof HTMLMediaElement!="undefined"&&e instanceof HTMLMediaElement)&&!(typeof HTMLVideoElement!="undefined"&&e instanceof HTMLVideoElement)&&!(typeof HTMLCanvasElement!="undefined"&&e instanceof HTMLCanvasElement)&&!(typeof OffscreenCanvas!="undefined"&&e instanceof OffscreenCanvas))throw new Error("input error: type is not recognized");if(e instanceof I.Tensor){let m=null;if(e.isDisposedInternal)throw new Error("input error: attempted to use tensor but it is disposed");if(!e.shape)throw new Error("input error: attempted to use tensor without a shape");if(e.shape.length===3){if(e.shape[2]===3)m=I.expandDims(e,0);else if(e.shape[2]===4){let p=I.slice3d(e,[0,0,0],[-1,-1,3]);m=I.expandDims(p,0),I.dispose(p)}}else e.shape.length===4&&(e.shape[3]===3?m=I.clone(e):e.shape[3]===4&&(m=I.slice4d(e,[0,0,0,0],[-1,-1,-1,3])));if(m==null||m.shape.length!==4||m.shape[0]!==1||m.shape[3]!==3)throw new Error(`input error: attempted to use tensor with unrecognized shape: ${e.shape.toString()}`);if(m.dtype==="int32"){let p=I.cast(m,"float32");I.dispose(m),m=p}return{tensor:m,canvas:t.filter.return?M0:null}}if(typeof e.readyState!="undefined"&&e.readyState<=2)return t.debug&&h("input stream is not ready"),{tensor:null,canvas:g0};let o=e.naturalWidth||e.videoWidth||e.width||e.shape&&e.shape[1]>0,r=e.naturalHeight||e.videoHeight||e.height||e.shape&&e.shape[2]>0;if(!o||!r)return t.debug&&h("cannot determine input dimensions"),{tensor:null,canvas:g0};let s=o,A=r;if(s>K2&&(s=K2,A=Math.trunc(s*r/o)),A>K2&&(A=K2,s=Math.trunc(A*o/r)),(((f=t.filter)==null?void 0:f.width)||0)>0?s=t.filter.width:(((d=t.filter)==null?void 0:d.height)||0)>0&&(s=o*((t.filter.height||0)/r)),(t.filter.height||0)>0?A=t.filter.height:(t.filter.width||0)>0&&(A=r*((t.filter.width||0)/o)),!s||!A)throw new Error("input error: cannot determine dimension");(!g0||g0.width!==s||g0.height!==A)&&(g0=$0(s,A));let a=g0.getContext("2d");if(typeof ImageData!="undefined"&&e instanceof ImageData?a.putImageData(e,0,0):t.filter.flip&&typeof a.translate!="undefined"?(a.translate(o,0),a.scale(-1,1),a.drawImage(e,0,0,o,r,0,0,g0.width,g0.height),a.setTransform(1,0,0,1,0,0)):a.drawImage(e,0,0,o,r,0,0,g0.width,g0.height),(!M0||g0.width!==M0.width||g0.height!==M0.height)&&(M0=$0(g0.width,g0.height)),t.filter.enabled&&k.webgl.supported?(_||(_=k.browser?new V1:null),k.filter=!!_,_!=null&&_.add?(_.reset(),t.filter.brightness!==0&&_.add("brightness",t.filter.brightness),t.filter.contrast!==0&&_.add("contrast",t.filter.contrast),t.filter.sharpness!==0&&_.add("sharpen",t.filter.sharpness),t.filter.blur!==0&&_.add("blur",t.filter.blur),t.filter.saturation!==0&&_.add("saturation",t.filter.saturation),t.filter.hue!==0&&_.add("hue",t.filter.hue),t.filter.negative&&_.add("negative"),t.filter.sepia&&_.add("sepia"),t.filter.vintage&&_.add("brownie"),t.filter.sepia&&_.add("sepia"),t.filter.kodachrome&&_.add("kodachrome"),t.filter.technicolor&&_.add("technicolor"),t.filter.polaroid&&_.add("polaroid"),t.filter.pixelate!==0&&_.add("pixelate",t.filter.pixelate),_.get()>0?M0=_.apply(g0):M0=_.draw(g0)):(t.debug&&h("input process error: cannot initialize filters"),k.webgl.supported=!1,t.filter.enabled=!1,J2(g0,M0))):(J2(g0,M0),_&&(_=null),k.filter=!!_),!n)return{tensor:null,canvas:M0};if(!M0)throw new Error("canvas error: cannot create output");let l,c=3;if(typeof ImageData!="undefined"&&e instanceof ImageData||e.data&&e.width&&e.height)if(k.browser&&I.browser)l=I.browser?I.browser.fromPixels(e):null;else{c=e.data.length/e.height/e.width;let m=new Uint8Array(e.data.buffer);l=I.tensor(m,[e.height,e.width,c],"int32")}else if((!a2||M0.width!==a2.width||M0.height!==a2.height)&&(a2=$0(M0.width,M0.height)),I.browser&&k.browser)t.backend==="webgl"||t.backend==="humangl"||t.backend==="webgpu"?l=I.browser.fromPixels(M0):(a2=J2(M0),l=I.browser.fromPixels(a2));else{let g=J2(M0).getContext("2d").getImageData(0,0,s,A);c=g.data.length/s/A;let v=new Uint8Array(g.data.buffer);l=I.tensor(v,[s,A,c])}if(c===4){let m=I.slice3d(l,[0,0,0],[-1,-1,3]);I.dispose(l),l=m}if(!l)throw new Error("input error: cannot create tensor");let x=I.cast(l,"float32"),i=t.filter.equalization?await Y2(x):I.expandDims(x,0);return I.dispose([l,x]),{tensor:i,canvas:t.filter.return?M0:null}}async function D1(e,t){let n=!1;if(e.cacheSensitivity===0||!t.shape||t.shape.length!==4||t.shape[1]>2048||t.shape[2]>2048)return n;if(!U0.inputTensor)U0.inputTensor=I.clone(t);else if(U0.inputTensor.shape[1]!==t.shape[1]||U0.inputTensor.shape[2]!==t.shape[2])I.dispose(U0.inputTensor),U0.inputTensor=I.clone(t);else{let o={};o.diff=I.sub(t,U0.inputTensor),o.squared=I.mul(o.diff,o.diff),o.sum=I.sum(o.squared);let s=(await o.sum.data())[0]/(t.shape[1]||1)/(t.shape[2]||1)/255/3;I.dispose([U0.inputTensor,o.diff,o.squared,o.sum]),U0.inputTensor=I.clone(t),n=s<=(e.cacheSensitivity||0)}return n}async function Z1(e,t,n){let o={};if(!t||!n||t.shape.length!==4||t.shape.length!==n.shape.length)return e.debug||h("invalid input tensor or tensor shapes do not match:",t.shape,n.shape),0;if(t.shape[0]!==1||n.shape[0]!==1||t.shape[3]!==3||n.shape[3]!==3)return e.debug||h("input tensors must be of shape [1, height, width, 3]:",t.shape,n.shape),0;o.input1=I.clone(t),o.input2=t.shape[1]!==n.shape[1]||t.shape[2]!==n.shape[2]?I.image.resizeBilinear(n,[t.shape[1],t.shape[2]]):I.clone(n),o.diff=I.sub(o.input1,o.input2),o.squared=I.mul(o.diff,o.diff),o.sum=I.sum(o.squared);let s=(await o.sum.data())[0]/(t.shape[1]||1)/(t.shape[2]||1)/255/3;return I.dispose([o.input1,o.input2,o.diff,o.squared,o.sum]),s}var N2=class{constructor(){R(this,"browser");R(this,"node");R(this,"worker");R(this,"platform","");R(this,"agent","");R(this,"backends",[]);R(this,"initial");R(this,"filter");R(this,"tfjs");R(this,"offscreen");R(this,"perfadd",!1);R(this,"tensorflow",{version:void 0,gpu:void 0});R(this,"wasm",{supported:void 0,backend:void 0,simd:void 0,multithread:void 0});R(this,"webgl",{supported:void 0,backend:void 0,version:void 0,renderer:void 0});R(this,"webgpu",{supported:void 0,backend:void 0,adapter:void 0});R(this,"cpu",{model:void 0,flags:[]});R(this,"kernels",[]);R(this,"Canvas");R(this,"Image");R(this,"ImageData");if(this.browser=typeof navigator!="undefined",this.node=typeof process!="undefined"&&typeof process.versions!="undefined"&&typeof process.versions.node!="undefined",this.tfjs={version:y0.version["tfjs-core"]},this.offscreen=typeof OffscreenCanvas!="undefined",this.initial=!0,this.worker=this.browser&&this.offscreen?typeof WorkerGlobalScope!="undefined":void 0,typeof navigator!="undefined"){let t=navigator.userAgent.match(/\(([^()]+)\)/g);if(t!=null&&t[0]){let n=t[0].match(/\(([^()]+)\)/g);this.platform=n!=null&&n[0]?n[0].replace(/\(|\)/g,""):"",this.agent=navigator.userAgent.replace(t[0],""),this.platform[1]&&(this.agent=this.agent.replace(t[1],"")),this.agent=this.agent.replace(/ /g," ")}}else typeof process!="undefined"&&(this.platform=`${process.platform} ${process.arch}`,this.agent=`NodeJS ${process.version}`)}async updateBackend(){this.backends=Object.keys(y0.engine().registryFactory),this.tensorflow={version:y0.backend().binding?y0.backend().binding.TF_Version:void 0,gpu:y0.backend().binding?y0.backend().binding.isUsingGpuDevice():void 0},this.wasm.supported=typeof WebAssembly!="undefined",this.wasm.backend=this.backends.includes("wasm"),this.wasm.supported&&this.wasm.backend&&y0.getBackend()==="wasm"&&(this.wasm.simd=y0.env().get("WASM_HAS_SIMD_SUPPORT"),this.wasm.multithread=y0.env().get("WASM_HAS_MULTITHREAD_SUPPORT"));let t=$0(100,100),n=t?t.getContext("webgl2"):void 0;if(this.webgl.supported=typeof n!="undefined",this.webgl.backend=this.backends.includes("webgl"),this.webgl.supported&&this.webgl.backend&&(y0.getBackend()==="webgl"||y0.getBackend()==="humangl")){let o=y0.backend().gpgpu!=="undefined"?await y0.backend().getGPGPUContext().gl:null;o&&(this.webgl.version=o.getParameter(o.VERSION),this.webgl.renderer=o.getParameter(o.RENDERER))}this.webgpu.supported=this.browser&&typeof navigator.gpu!="undefined",this.webgpu.backend=this.backends.includes("webgpu");try{if(this.webgpu.supported){let o=await navigator.gpu.requestAdapter();this.webgpu.adapter=o?o.name:void 0}}catch(o){this.webgpu.supported=!1}try{this.kernels=y0.getKernelsForBackend(y0.getBackend()).map(o=>o.kernelName.toLowerCase())}catch(o){}}updateCPU(){let t={model:"",flags:[]};this.node&&this.platform.startsWith("linux"),this.cpu?this.cpu=t:Object.defineProperty(this,"cpu",{value:t})}},k=new N2;var $2=class{constructor(){R(this,"config");R(this,"element");R(this,"stream");R(this,"start",async t=>{if(t!=null&&t.debug&&(this.config.debug=t==null?void 0:t.debug),t!=null&&t.crop&&(this.config.crop=t==null?void 0:t.crop),t!=null&&t.mode&&(this.config.mode=t==null?void 0:t.mode),t!=null&&t.width&&(this.config.width=t==null?void 0:t.width),t!=null&&t.height&&(this.config.height=t==null?void 0:t.height),t!=null&&t.element)if(typeof t.element=="string"){let r=document.getElementById(t.element);if(r&&r instanceof HTMLVideoElement)this.element=r;else{this.config.debug&&h("webcam","cannot get dom element",t.element);return}}else if(t.element instanceof HTMLVideoElement)this.element=t.element;else{this.config.debug&&h("webcam","unknown dom element",t.element);return}else this.element=document.createElement("video");let n={audio:!1,video:{facingMode:this.config.mode==="front"?"user":"environment",resizeMode:this.config.crop?"crop-and-scale":"none",width:{ideal:this.config.width>0?this.config.width:window.innerWidth},height:{ideal:this.config.height>0?this.config.height:window.innerHeight}}};if(this.element.addEventListener("play",()=>{this.config.debug&&h("webcam","play")}),this.element.addEventListener("pause",()=>{this.config.debug&&h("webcam","pause")}),this.element.addEventListener("click",async()=>{!this.element||!this.stream||(this.element.paused?await this.element.play():this.element.pause())}),!(navigator!=null&&navigator.mediaDevices)){this.config.debug&&h("webcam","no devices");return}try{this.stream=await navigator.mediaDevices.getUserMedia(n)}catch(r){h("webcam",r);return}if(!this.stream){this.config.debug&&h("webcam","no stream");return}this.element.srcObject=this.stream,await new Promise(r=>{this.element?this.element.onloadeddata=()=>r(!0):r(!1)}),await this.element.play(),this.config.debug&&h("webcam",{width:this.width,height:this.height,label:this.label,stream:this.stream,track:this.track,settings:this.settings,constraints:this.constraints,capabilities:this.capabilities})});R(this,"pause",()=>{this.element&&this.element.pause()});R(this,"play",async()=>{this.element&&await this.element.play()});R(this,"stop",()=>{this.config.debug&&h("webcam","stop"),this.track&&this.track.stop()});this.config={element:void 0,debug:!0,mode:"front",crop:!1,width:0,height:0}}get track(){if(!!this.stream)return this.stream.getVideoTracks()[0]}get capabilities(){if(!!this.track)return this.track.getCapabilities?this.track.getCapabilities():void 0}get constraints(){if(!!this.track)return this.track.getConstraints?this.track.getConstraints():void 0}get settings(){if(!this.stream)return;let t=this.stream.getVideoTracks()[0];return t.getSettings?t.getSettings():void 0}get label(){return this.track?this.track.label:""}get paused(){var t;return((t=this.element)==null?void 0:t.paused)||!1}get width(){var t;return((t=this.element)==null?void 0:t.videoWidth)||0}get height(){var t;return((t=this.element)==null?void 0:t.videoHeight)||0}};var i2=D(V());var Jt={};we(Jt,{age:()=>lr,"anti-spoofing":()=>Vr,antispoof:()=>Qo,blazeface:()=>_o,"blazeface-back":()=>cr,"blazeface-front":()=>dr,"blazepose-detect":()=>Hr,"blazepose-detector2d":()=>xr,"blazepose-detector3d":()=>yr,"blazepose-full":()=>fr,"blazepose-heavy":()=>mr,"blazepose-lite":()=>pr,default:()=>ts,efficientpose:()=>ur,"efficientpose-i-lite":()=>Dr,"efficientpose-ii-lite":()=>Zr,"efficientpose-iv":()=>Xr,emotion:()=>$o,faceboxes:()=>hr,facemesh:()=>er,"facemesh-attention":()=>gr,"facemesh-attention-alt":()=>br,"facemesh-detection-full":()=>Mr,"facemesh-detection-short":()=>Tr,"facemesh-orig":()=>vr,faceres:()=>tr,"faceres-deep":()=>Pr,gear:()=>Rr,gender:()=>wr,"gender-ssrnet-imdb":()=>kr,handdetect:()=>Er,"handlandmark-full":()=>nr,"handlandmark-lite":()=>zr,"handlandmark-sparse":()=>Sr,handskeleton:()=>jr,handtrack:()=>or,"insightface-efficientnet-b0":()=>qr,"insightface-ghostnet-strides1":()=>Ur,"insightface-ghostnet-strides2":()=>Yr,"insightface-mobilenet-emore":()=>Kr,"insightface-mobilenet-swish":()=>Jr,iris:()=>rr,liveness:()=>sr,"mb3-centernet":()=>Ar,meet:()=>Nr,mobileface:()=>Or,mobilefacenet:()=>Ir,models:()=>ar,"movenet-lightning":()=>ir,"movenet-multipose":()=>Cr,"movenet-thunder":()=>Lr,nanodet:()=>Wr,"nanodet-e":()=>Qr,"nanodet-g":()=>_r,"nanodet-m":()=>$r,"nanodet-t":()=>es,posenet:()=>Fr,rvm:()=>Gr,selfie:()=>Br});var Qo=853098,_o=538928,$o=820516,er=1477958,tr=6978814,nr=5431368,or=2964837,rr=2599092,sr=592976,Ar=4030290,ar=0,ir=4650216,lr=161240,cr=538928,dr=402048,xr=7499400,yr=5928856,fr=6338290,mr=27501554,pr=2725490,ur=5651240,hr=2013002,br=2387598,gr=2382414,Mr=1026192,Tr=201268,vr=2955780,Pr=13957620,Rr=1498916,kr=161236,wr=201808,Er=3515612,zr=2023432,Sr=5286322,jr=5502280,Nr=372228,Or=2183192,Ir=5171976,Cr=9448838,Lr=12477112,Wr=7574558,Fr=5032780,Gr=3739355,Br=212886,Hr=5928804,Vr=853098,Dr=2269064,Zr=5651240,Xr=25643252,qr=13013224,Ur=8093408,Yr=8049584,Kr=6938536,Jr=12168584,Qr=12319156,_r=7574558,$r=1887474,es=5294216,ts={antispoof:Qo,blazeface:_o,emotion:$o,facemesh:er,faceres:tr,"handlandmark-full":nr,handtrack:or,iris:rr,liveness:sr,"mb3-centernet":Ar,models:ar,"movenet-lightning":ir,age:lr,"blazeface-back":cr,"blazeface-front":dr,"blazepose-detector2d":xr,"blazepose-detector3d":yr,"blazepose-full":fr,"blazepose-heavy":mr,"blazepose-lite":pr,efficientpose:ur,faceboxes:hr,"facemesh-attention-alt":br,"facemesh-attention":gr,"facemesh-detection-full":Mr,"facemesh-detection-short":Tr,"facemesh-orig":vr,"faceres-deep":Pr,gear:Rr,"gender-ssrnet-imdb":kr,gender:wr,handdetect:Er,"handlandmark-lite":zr,"handlandmark-sparse":Sr,handskeleton:jr,meet:Nr,mobileface:Or,mobilefacenet:Ir,"movenet-multipose":Cr,"movenet-thunder":Lr,nanodet:Wr,posenet:Fr,rvm:Gr,selfie:Br,"blazepose-detect":Hr,"anti-spoofing":Vr,"efficientpose-i-lite":Dr,"efficientpose-ii-lite":Zr,"efficientpose-iv":Xr,"insightface-efficientnet-b0":qr,"insightface-ghostnet-strides1":Ur,"insightface-ghostnet-strides2":Yr,"insightface-mobilenet-emore":Kr,"insightface-mobilenet-swish":Jr,"nanodet-e":Qr,"nanodet-g":_r,"nanodet-m":$r,"nanodet-t":es};var j0={cacheModels:!0,cacheSupported:!0,verbose:!0,debug:!1,modelBasePath:""},ee={};async function ns(e,t){return j0.debug&&h("load model fetch:",e,t),fetch(e,t)}function X1(e){j0.cacheModels=e.cacheModels,j0.verbose=e.debug,j0.modelBasePath=e.modelBasePath}async function C(e){var c,x,i,f;let t=O1(j0.modelBasePath,e||"");t.toLowerCase().endsWith(".json")||(t+=".json");let n=t.includes("/")?t.split("/"):t.split("\\"),o=n[n.length-1].replace(".json",""),r="indexeddb://"+o;ee[o]={name:o,sizeFromManifest:0,sizeLoadedWeights:0,sizeDesired:Jt[o],inCache:!1},j0.cacheSupported=typeof indexedDB!="undefined";let s={};try{s=j0.cacheSupported&&j0.cacheModels?await i2.io.listModels():{}}catch(d){j0.cacheSupported=!1}ee[o].inCache=j0.cacheSupported&&j0.cacheModels&&Object.keys(s).includes(r);let A=typeof fetch=="undefined"?{}:{fetchFunc:(d,m)=>ns(d,m)},a=new i2.GraphModel(ee[o].inCache?r:t,A),l=!1;try{a.findIOHandler(),j0.debug&&h("model load handler:",a.handler)}catch(d){h("error finding model i/o handler:",t,d)}try{let d=await((c=a.handler)==null?void 0:c.load())||null;ee[o].sizeFromManifest=((x=d==null?void 0:d.weightData)==null?void 0:x.byteLength)||0,d?a.loadSync(d):a=await i2.loadGraphModel(ee[o].inCache?r:t,A),ee[o].sizeLoadedWeights=((f=(i=a.artifacts)==null?void 0:i.weightData)==null?void 0:f.byteLength)||0,j0.verbose&&h("load:",{model:o,url:a.modelUrl,bytes:ee[o].sizeLoadedWeights}),l=!0}catch(d){h("error loading model:",t,d)}if(l&&j0.cacheModels&&j0.cacheSupported&&!ee[o].inCache)try{let d=await a.save(r);j0.debug&&h("model saved:",r,d)}catch(d){h("error saving model:",t,d)}return a}var se=D(V());var Qt="2.11.1";var d0=D(V());var g2={};we(g2,{Models:()=>V2,getModelStats:()=>y1,load:()=>f1,reset:()=>Ft,validate:()=>Bt,validateModel:()=>Gt});var tt=D(V());var h0,et=[],_t=Number.MAX_SAFE_INTEGER,q1=0,U1=0;async function Y1(e){var t;return k.initial&&(h0=null),h0?e.debug&&h("cached model:",h0.modelUrl):h0=await C((t=e.face.antispoof)==null?void 0:t.modelPath),h0}async function $t(e,t,n,o){var A,a;if(!h0||!(h0!=null&&h0.executor))return 0;let r=(((A=t.face.antispoof)==null?void 0:A.skipTime)||0)>M()-U1,s=_t<(((a=t.face.antispoof)==null?void 0:a.skipFrames)||0);return t.skipAllowed&&r&&s&&q1===o&&et[n]?(_t++,et[n]):(_t=0,new Promise(async l=>{let c=tt.image.resizeBilinear(e,[h0!=null&&h0.inputs[0].shape?h0.inputs[0].shape[2]:0,h0!=null&&h0.inputs[0].shape?h0.inputs[0].shape[1]:0],!1),x=h0==null?void 0:h0.execute(c),i=(await x.data())[0];et[n]=Math.round(100*i)/100,q1=o,U1=M(),tt.dispose([c,x]),l(et[n])}))}var L=D(V());var he=D(V());var te={silhouette:[10,338,297,332,284,251,389,356,454,323,361,288,397,365,379,378,400,377,152,148,176,149,150,136,172,58,132,93,234,127,162,21,54,103,67,109],lipsUpperOuter:[185,40,39,37,0,267,269,270,409],lipsLowerOuter:[61,146,91,181,84,17,314,405,321,375,291],lipsUpperInner:[191,80,81,82,13,312,311,310,415],lipsLowerInner:[78,95,88,178,87,14,317,402,318,324,308],lipsLowerSemiOuter:[76,77,90,180,85,16,315,404,320,307,306],lipsUpperSemiOuter:[184,74,73,72,11,302,303,304,408],lipsLowerSemiInner:[62,96,89,179,86,15,316,403,319,325,292],lipsUpperSemiInner:[183,42,41,38,12,268,271,272,407],rightEyeUpper0:[246,161,160,159,158,157,173],rightEyeLower0:[33,7,163,144,145,153,154,155,133],rightEyeUpper1:[247,30,29,27,28,56,190],rightEyeLower1:[130,25,110,24,23,22,26,112,243],rightEyeUpper2:[113,225,224,223,222,221,189],rightEyeLower2:[226,31,228,229,230,231,232,233,244],rightEyeLower3:[143,111,117,118,119,120,121,128,245],rightEyebrowUpper:[156,70,63,105,66,107,55,193],rightEyebrowLower:[35,124,46,53,52,65],rightEyeIris:[473,474,475,476,477],leftEyeUpper0:[466,388,387,386,385,384,398],leftEyeLower0:[263,249,390,373,374,380,381,382,362],leftEyeUpper1:[467,260,259,257,258,286,414],leftEyeLower1:[359,255,339,254,253,252,256,341,463],leftEyeUpper2:[342,445,444,443,442,441,413],leftEyeLower2:[446,261,448,449,450,451,452,453,464],leftEyeLower3:[372,340,346,347,348,349,350,357,465],leftEyebrowUpper:[383,300,293,334,296,336,285,417],leftEyebrowLower:[265,353,276,283,282,295],leftEyeIris:[468,469,470,471,472],midwayBetweenEyes:[168],noseTip:[1],noseBottom:[2],noseRightCorner:[98],noseLeftCorner:[327],rightCheek:[205],leftCheek:[425]},e5={count:468,mouth:13,symmetryLine:[13,te.midwayBetweenEyes[0]]},qe={leftEye:0,rightEye:1,nose:2,mouth:3,leftEar:4,rightEar:5,symmetryLine:[3,2]},t5=[{key:"EyeUpper0",indices:[9,10,11,12,13,14,15]},{key:"EyeUpper1",indices:[25,26,27,28,29,30,31]},{key:"EyeUpper2",indices:[41,42,43,44,45,46,47]},{key:"EyeLower0",indices:[0,1,2,3,4,5,6,7,8]},{key:"EyeLower1",indices:[16,17,18,19,20,21,22,23,24]},{key:"EyeLower2",indices:[32,33,34,35,36,37,38,39,40]},{key:"EyeLower3",indices:[54,55,56,57,58,59,60,61,62]},{key:"EyebrowUpper",indices:[63,64,65,66,67,68,69,70]},{key:"EyebrowLower",indices:[48,49,50,51,52,53]}],O2=[[.499976992607117,.652534008026123],[.500025987625122,.547487020492554],[.499974012374878,.602371990680695],[.482113003730774,.471979022026062],[.500150978565216,.527155995368958],[.499909996986389,.498252987861633],[.499523013830185,.40106201171875],[.289712011814117,.380764007568359],[.499954998493195,.312398016452789],[.499987006187439,.269918978214264],[.500023007392883,.107050001621246],[.500023007392883,.666234016418457],[.5000159740448,.679224014282227],[.500023007392883,.692348003387451],[.499976992607117,.695277988910675],[.499976992607117,.70593398809433],[.499976992607117,.719385027885437],[.499976992607117,.737019002437592],[.499967992305756,.781370997428894],[.499816000461578,.562981009483337],[.473773002624512,.573909997940063],[.104906998574734,.254140973091125],[.365929991006851,.409575998783112],[.338757991790771,.41302502155304],[.311120003461838,.409460008144379],[.274657994508743,.389131009578705],[.393361985683441,.403706014156342],[.345234006643295,.344011008739471],[.370094001293182,.346076011657715],[.319321990013123,.347265005111694],[.297903001308441,.353591024875641],[.24779200553894,.410809993743896],[.396889001131058,.842755019664764],[.280097991228104,.375599980354309],[.106310002505779,.399955987930298],[.2099249958992,.391353011131287],[.355807989835739,.534406006336212],[.471751004457474,.65040397644043],[.474155008792877,.680191993713379],[.439785003662109,.657229006290436],[.414617002010345,.66654098033905],[.450374007225037,.680860996246338],[.428770989179611,.682690978050232],[.374971002340317,.727805018424988],[.486716985702515,.547628998756409],[.485300987958908,.527395009994507],[.257764995098114,.314490020275116],[.401223003864288,.455172002315521],[.429818987846375,.548614978790283],[.421351999044418,.533740997314453],[.276895999908447,.532056987285614],[.483370006084442,.499586999416351],[.33721199631691,.282882988452911],[.296391993761063,.293242990970612],[.169294998049736,.193813979625702],[.447580009698868,.302609980106354],[.392390012741089,.353887975215912],[.354490011930466,.696784019470215],[.067304998636246,.730105042457581],[.442739009857178,.572826027870178],[.457098007202148,.584792017936707],[.381974011659622,.694710969924927],[.392388999462128,.694203019142151],[.277076005935669,.271932005882263],[.422551989555359,.563233017921448],[.385919004678726,.281364023685455],[.383103013038635,.255840003490448],[.331431001424789,.119714021682739],[.229923993349075,.232002973556519],[.364500999450684,.189113974571228],[.229622006416321,.299540996551514],[.173287004232407,.278747975826263],[.472878992557526,.666198015213013],[.446828007698059,.668527007102966],[.422762006521225,.673889994621277],[.445307999849319,.580065965652466],[.388103008270264,.693961024284363],[.403039008378983,.706539988517761],[.403629004955292,.693953037261963],[.460041999816895,.557139039039612],[.431158006191254,.692366003990173],[.452181994915009,.692366003990173],[.475387006998062,.692366003990173],[.465828001499176,.779190003871918],[.472328990697861,.736225962638855],[.473087012767792,.717857003211975],[.473122000694275,.704625964164734],[.473033010959625,.695277988910675],[.427942007780075,.695277988910675],[.426479011774063,.703539967536926],[.423162013292313,.711845993995667],[.4183090031147,.720062971115112],[.390094995498657,.639572978019714],[.013953999616206,.560034036636353],[.499913990497589,.58014702796936],[.413199990987778,.69539999961853],[.409626007080078,.701822996139526],[.468080013990402,.601534962654114],[.422728985548019,.585985004901886],[.463079988956451,.593783974647522],[.37211999297142,.47341400384903],[.334562003612518,.496073007583618],[.411671012639999,.546965003013611],[.242175996303558,.14767599105835],[.290776997804642,.201445996761322],[.327338010072708,.256527006626129],[.399509996175766,.748921036720276],[.441727995872498,.261676013469696],[.429764986038208,.187834024429321],[.412198007106781,.108901023864746],[.288955003023148,.398952007293701],[.218936994671822,.435410976409912],[.41278201341629,.398970007896423],[.257135003805161,.355440020561218],[.427684992551804,.437960982322693],[.448339998722076,.536936044692993],[.178560003638268,.45755398273468],[.247308000922203,.457193970680237],[.286267012357712,.467674970626831],[.332827985286713,.460712015628815],[.368755996227264,.447206974029541],[.398963987827301,.432654976844788],[.476410001516342,.405806005001068],[.189241006970406,.523923993110657],[.228962004184723,.348950982093811],[.490725994110107,.562400996685028],[.404670000076294,.485132992267609],[.019469000399113,.401564002037048],[.426243007183075,.420431017875671],[.396993011236191,.548797011375427],[.266469985246658,.376977026462555],[.439121007919312,.51895797252655],[.032313998788595,.644356966018677],[.419054001569748,.387154996395111],[.462783008813858,.505746960639954],[.238978996872902,.779744982719421],[.198220998048782,.831938028335571],[.107550002634525,.540755033493042],[.183610007166862,.740257024765015],[.134409993886948,.333683013916016],[.385764002799988,.883153975009918],[.490967005491257,.579378008842468],[.382384985685349,.508572995662689],[.174399003386497,.397670984268188],[.318785011768341,.39623498916626],[.343364000320435,.400596976280212],[.396100014448166,.710216999053955],[.187885001301765,.588537991046906],[.430987000465393,.944064974784851],[.318993002176285,.898285031318665],[.266247987747192,.869701027870178],[.500023007392883,.190576016902924],[.499976992607117,.954452991485596],[.366169989109039,.398822009563446],[.393207013607025,.39553701877594],[.410373002290726,.391080021858215],[.194993004202843,.342101991176605],[.388664990663528,.362284004688263],[.365961998701096,.355970978736877],[.343364000320435,.355356991291046],[.318785011768341,.35834002494812],[.301414996385574,.363156020641327],[.058132998645306,.319076001644135],[.301414996385574,.387449026107788],[.499987989664078,.618434011936188],[.415838003158569,.624195992946625],[.445681989192963,.566076993942261],[.465844005346298,.620640993118286],[.49992299079895,.351523995399475],[.288718998432159,.819945991039276],[.335278987884521,.852819979190826],[.440512001514435,.902418971061707],[.128294005990028,.791940987110138],[.408771991729736,.373893976211548],[.455606997013092,.451801002025604],[.499877005815506,.908990025520325],[.375436991453171,.924192011356354],[.11421000212431,.615022003650665],[.448662012815475,.695277988910675],[.4480200111866,.704632043838501],[.447111994028091,.715808033943176],[.444831997156143,.730794012546539],[.430011987686157,.766808986663818],[.406787008047104,.685672998428345],[.400738000869751,.681069016456604],[.392399996519089,.677703022956848],[.367855995893478,.663918972015381],[.247923001646996,.601333022117615],[.452769994735718,.420849978923798],[.43639200925827,.359887003898621],[.416164010763168,.368713974952698],[.413385987281799,.692366003990173],[.228018000721931,.683571994304657],[.468268007040024,.352671027183533],[.411361992359161,.804327011108398],[.499989002943039,.469825029373169],[.479153990745544,.442654013633728],[.499974012374878,.439637005329132],[.432112008333206,.493588984012604],[.499886006116867,.866917014122009],[.49991300702095,.821729004383087],[.456548988819122,.819200992584229],[.344549000263214,.745438992977142],[.37890899181366,.574010014533997],[.374292999505997,.780184984207153],[.319687992334366,.570737957954407],[.357154995203018,.604269981384277],[.295284003019333,.621580958366394],[.447750002145767,.862477004528046],[.410986006259918,.508723020553589],[.31395098567009,.775308012962341],[.354128003120422,.812552988529205],[.324548006057739,.703992962837219],[.189096003770828,.646299958229065],[.279776990413666,.71465802192688],[.1338230073452,.682700991630554],[.336768001317978,.644733011722565],[.429883986711502,.466521978378296],[.455527991056442,.548622965812683],[.437114000320435,.558896005153656],[.467287987470627,.529924988746643],[.414712011814117,.335219979286194],[.37704598903656,.322777986526489],[.344107985496521,.320150971412659],[.312875986099243,.32233202457428],[.283526003360748,.333190023899078],[.241245999932289,.382785975933075],[.102986000478268,.468762993812561],[.267612010240555,.424560010433197],[.297879010438919,.433175981044769],[.333433985710144,.433878004550934],[.366427004337311,.426115989685059],[.396012008190155,.416696012020111],[.420121014118195,.41022801399231],[.007561000064015,.480777025222778],[.432949006557465,.569517970085144],[.458638995885849,.479089021682739],[.473466008901596,.545744001865387],[.476087987422943,.563830018043518],[.468472003936768,.555056989192963],[.433990985155106,.582361996173859],[.483518004417419,.562983989715576],[.482482999563217,.57784903049469],[.42645001411438,.389798998832703],[.438998997211456,.39649498462677],[.450067013502121,.400434017181396],[.289712011814117,.368252992630005],[.276670008897781,.363372981548309],[.517862021923065,.471948027610779],[.710287988185883,.380764007568359],[.526226997375488,.573909997940063],[.895093023777008,.254140973091125],[.634069979190826,.409575998783112],[.661242008209229,.41302502155304],[.688880026340485,.409460008144379],[.725341975688934,.389131009578705],[.606630027294159,.40370500087738],[.654766023159027,.344011008739471],[.629905998706818,.346076011657715],[.680678009986877,.347265005111694],[.702096998691559,.353591024875641],[.75221198797226,.410804986953735],[.602918028831482,.842862963676453],[.719901978969574,.375599980354309],[.893692970275879,.399959981441498],[.790081977844238,.391354024410248],[.643998026847839,.534487962722778],[.528249025344849,.65040397644043],[.525849997997284,.680191040039062],[.560214996337891,.657229006290436],[.585384011268616,.66654098033905],[.549625992774963,.680860996246338],[.57122802734375,.682691991329193],[.624852001667023,.72809898853302],[.513050019741058,.547281980514526],[.51509702205658,.527251958847046],[.742246985435486,.314507007598877],[.598631024360657,.454979002475739],[.570338010787964,.548575043678284],[.578631997108459,.533622980117798],[.723087012767792,.532054007053375],[.516445994377136,.499638974666595],[.662801027297974,.282917976379395],[.70362401008606,.293271005153656],[.830704987049103,.193813979625702],[.552385985851288,.302568018436432],[.607609987258911,.353887975215912],[.645429015159607,.696707010269165],[.932694971561432,.730105042457581],[.557260990142822,.572826027870178],[.542901992797852,.584792017936707],[.6180260181427,.694710969924927],[.607590973377228,.694203019142151],[.722943007946014,.271963000297546],[.577413976192474,.563166975975037],[.614082992076874,.281386971473694],[.616907000541687,.255886018276215],[.668509006500244,.119913995265961],[.770092010498047,.232020974159241],[.635536015033722,.189248979091644],[.77039098739624,.299556016921997],[.826722025871277,.278755009174347],[.527121007442474,.666198015213013],[.553171992301941,.668527007102966],[.577238023281097,.673889994621277],[.554691970348358,.580065965652466],[.611896991729736,.693961024284363],[.59696102142334,.706539988517761],[.596370995044708,.693953037261963],[.539958000183105,.557139039039612],[.568841993808746,.692366003990173],[.547818005084991,.692366003990173],[.52461302280426,.692366003990173],[.534089982509613,.779141008853912],[.527670979499817,.736225962638855],[.526912987232208,.717857003211975],[.526877999305725,.704625964164734],[.526966989040375,.695277988910675],[.572058022022247,.695277988910675],[.573521018028259,.703539967536926],[.57683801651001,.711845993995667],[.581691026687622,.720062971115112],[.609944999217987,.639909982681274],[.986046016216278,.560034036636353],[.5867999792099,.69539999961853],[.590372025966644,.701822996139526],[.531915009021759,.601536989212036],[.577268004417419,.585934996604919],[.536915004253387,.593786001205444],[.627542972564697,.473352015018463],[.665585994720459,.495950996875763],[.588353991508484,.546862006187439],[.757824003696442,.14767599105835],[.709249973297119,.201507985591888],[.672684013843536,.256581008434296],[.600408971309662,.74900496006012],[.55826598405838,.261672019958496],[.570303976535797,.187870979309082],[.588165998458862,.109044015407562],[.711045026779175,.398952007293701],[.781069993972778,.435405015945435],[.587247014045715,.398931980133057],[.742869973182678,.355445981025696],[.572156012058258,.437651991844177],[.55186802148819,.536570012569427],[.821442008018494,.457556009292603],[.752701997756958,.457181990146637],[.71375697851181,.467626988887787],[.66711300611496,.460672974586487],[.631101012229919,.447153985500336],[.6008620262146,.432473003864288],[.523481011390686,.405627012252808],[.810747981071472,.523926019668579],[.771045982837677,.348959028720856],[.509127020835876,.562718033790588],[.595292985439301,.485023975372314],[.980530977249146,.401564002037048],[.573499977588654,.420000016689301],[.602994978427887,.548687994480133],[.733529984951019,.376977026462555],[.560611009597778,.519016981124878],[.967685997486115,.644356966018677],[.580985009670258,.387160003185272],[.537728011608124,.505385041236877],[.760966002941132,.779752969741821],[.801778972148895,.831938028335571],[.892440974712372,.54076099395752],[.816350996494293,.740260004997253],[.865594983100891,.333687007427216],[.614073991775513,.883246004581451],[.508952975273132,.579437971115112],[.617941975593567,.508316040039062],[.825608015060425,.397674977779388],[.681214988231659,.39623498916626],[.656635999679565,.400596976280212],[.603900015354156,.710216999053955],[.81208598613739,.588539004325867],[.56801301240921,.944564998149872],[.681007981300354,.898285031318665],[.733752012252808,.869701027870178],[.633830010890961,.398822009563446],[.606792986392975,.39553701877594],[.589659988880157,.391062021255493],[.805015981197357,.342108011245728],[.611334979534149,.362284004688263],[.634037971496582,.355970978736877],[.656635999679565,.355356991291046],[.681214988231659,.35834002494812],[.698584973812103,.363156020641327],[.941866993904114,.319076001644135],[.698584973812103,.387449026107788],[.584177017211914,.624107003211975],[.554318010807037,.566076993942261],[.534153997898102,.62064003944397],[.711217999458313,.819975018501282],[.664629995822906,.852871000766754],[.559099972248077,.902631998062134],[.871706008911133,.791940987110138],[.591234028339386,.373893976211548],[.544341027736664,.451583981513977],[.624562978744507,.924192011356354],[.88577002286911,.615028977394104],[.551338016986847,.695277988910675],[.551980018615723,.704632043838501],[.552887976169586,.715808033943176],[.555167973041534,.730794012546539],[.569944024085999,.767035007476807],[.593203008174896,.685675978660583],[.599261999130249,.681069016456604],[.607599973678589,.677703022956848],[.631937980651855,.663500010967255],[.752032995223999,.601315021514893],[.547226011753082,.420395016670227],[.563543975353241,.359827995300293],[.583841025829315,.368713974952698],[.586614012718201,.692366003990173],[.771915018558502,.683578014373779],[.531597018241882,.352482974529266],[.588370978832245,.804440975189209],[.52079701423645,.442565023899078],[.567984998226166,.493479013442993],[.543282985687256,.819254994392395],[.655317008495331,.745514988899231],[.621008992195129,.574018001556396],[.625559985637665,.78031200170517],[.680198013782501,.570719003677368],[.64276397228241,.604337990283966],[.704662978649139,.621529996395111],[.552012026309967,.862591981887817],[.589071989059448,.508637011051178],[.685944974422455,.775357007980347],[.645735025405884,.812640011310577],[.675342977046967,.703978002071381],[.810858011245728,.646304965019226],[.72012197971344,.714666962623596],[.866151988506317,.682704985141754],[.663187026977539,.644596993923187],[.570082008838654,.466325998306274],[.544561982154846,.548375964164734],[.562758982181549,.558784961700439],[.531987011432648,.530140042304993],[.585271000862122,.335177004337311],[.622952997684479,.32277899980545],[.655896008014679,.320163011550903],[.687132000923157,.322345972061157],[.716481983661652,.333200991153717],[.758756995201111,.382786989212036],[.897013008594513,.468769013881683],[.732392013072968,.424547016620636],[.70211398601532,.433162987232208],[.66652500629425,.433866024017334],[.633504986763,.426087975502014],[.603875994682312,.416586995124817],[.579657971858978,.409945011138916],[.992439985275269,.480777025222778],[.567192018032074,.569419980049133],[.54136598110199,.478899002075195],[.526564002037048,.546118021011353],[.523913025856018,.563830018043518],[.531529009342194,.555056989192963],[.566035985946655,.582329034805298],[.51631098985672,.563053965568542],[.5174720287323,.577877044677734],[.573594987392426,.389806985855103],[.560697972774506,.395331978797913],[.549755990505219,.399751007556915],[.710287988185883,.368252992630005],[.723330020904541,.363372981548309]],Ue=[127,34,139,11,0,37,232,231,120,72,37,39,128,121,47,232,121,128,104,69,67,175,171,148,157,154,155,118,50,101,73,39,40,9,151,108,48,115,131,194,204,211,74,40,185,80,42,183,40,92,186,230,229,118,202,212,214,83,18,17,76,61,146,160,29,30,56,157,173,106,204,194,135,214,192,203,165,98,21,71,68,51,45,4,144,24,23,77,146,91,205,50,187,201,200,18,91,106,182,90,91,181,85,84,17,206,203,36,148,171,140,92,40,39,193,189,244,159,158,28,247,246,161,236,3,196,54,68,104,193,168,8,117,228,31,189,193,55,98,97,99,126,47,100,166,79,218,155,154,26,209,49,131,135,136,150,47,126,217,223,52,53,45,51,134,211,170,140,67,69,108,43,106,91,230,119,120,226,130,247,63,53,52,238,20,242,46,70,156,78,62,96,46,53,63,143,34,227,173,155,133,123,117,111,44,125,19,236,134,51,216,206,205,154,153,22,39,37,167,200,201,208,36,142,100,57,212,202,20,60,99,28,158,157,35,226,113,160,159,27,204,202,210,113,225,46,43,202,204,62,76,77,137,123,116,41,38,72,203,129,142,64,98,240,49,102,64,41,73,74,212,216,207,42,74,184,169,170,211,170,149,176,105,66,69,122,6,168,123,147,187,96,77,90,65,55,107,89,90,180,101,100,120,63,105,104,93,137,227,15,86,85,129,102,49,14,87,86,55,8,9,100,47,121,145,23,22,88,89,179,6,122,196,88,95,96,138,172,136,215,58,172,115,48,219,42,80,81,195,3,51,43,146,61,171,175,199,81,82,38,53,46,225,144,163,110,246,33,7,52,65,66,229,228,117,34,127,234,107,108,69,109,108,151,48,64,235,62,78,191,129,209,126,111,35,143,163,161,246,117,123,50,222,65,52,19,125,141,221,55,65,3,195,197,25,7,33,220,237,44,70,71,139,122,193,245,247,130,33,71,21,162,153,158,159,170,169,150,188,174,196,216,186,92,144,160,161,2,97,167,141,125,241,164,167,37,72,38,12,145,159,160,38,82,13,63,68,71,226,35,111,158,153,154,101,50,205,206,92,165,209,198,217,165,167,97,220,115,218,133,112,243,239,238,241,214,135,169,190,173,133,171,208,32,125,44,237,86,87,178,85,86,179,84,85,180,83,84,181,201,83,182,137,93,132,76,62,183,61,76,184,57,61,185,212,57,186,214,207,187,34,143,156,79,239,237,123,137,177,44,1,4,201,194,32,64,102,129,213,215,138,59,166,219,242,99,97,2,94,141,75,59,235,24,110,228,25,130,226,23,24,229,22,23,230,26,22,231,112,26,232,189,190,243,221,56,190,28,56,221,27,28,222,29,27,223,30,29,224,247,30,225,238,79,20,166,59,75,60,75,240,147,177,215,20,79,166,187,147,213,112,233,244,233,128,245,128,114,188,114,217,174,131,115,220,217,198,236,198,131,134,177,132,58,143,35,124,110,163,7,228,110,25,356,389,368,11,302,267,452,350,349,302,303,269,357,343,277,452,453,357,333,332,297,175,152,377,384,398,382,347,348,330,303,304,270,9,336,337,278,279,360,418,262,431,304,408,409,310,415,407,270,409,410,450,348,347,422,430,434,313,314,17,306,307,375,387,388,260,286,414,398,335,406,418,364,367,416,423,358,327,251,284,298,281,5,4,373,374,253,307,320,321,425,427,411,421,313,18,321,405,406,320,404,405,315,16,17,426,425,266,377,400,369,322,391,269,417,465,464,386,257,258,466,260,388,456,399,419,284,332,333,417,285,8,346,340,261,413,441,285,327,460,328,355,371,329,392,439,438,382,341,256,429,420,360,364,394,379,277,343,437,443,444,283,275,440,363,431,262,369,297,338,337,273,375,321,450,451,349,446,342,467,293,334,282,458,461,462,276,353,383,308,324,325,276,300,293,372,345,447,382,398,362,352,345,340,274,1,19,456,248,281,436,427,425,381,256,252,269,391,393,200,199,428,266,330,329,287,273,422,250,462,328,258,286,384,265,353,342,387,259,257,424,431,430,342,353,276,273,335,424,292,325,307,366,447,345,271,303,302,423,266,371,294,455,460,279,278,294,271,272,304,432,434,427,272,407,408,394,430,431,395,369,400,334,333,299,351,417,168,352,280,411,325,319,320,295,296,336,319,403,404,330,348,349,293,298,333,323,454,447,15,16,315,358,429,279,14,15,316,285,336,9,329,349,350,374,380,252,318,402,403,6,197,419,318,319,325,367,364,365,435,367,397,344,438,439,272,271,311,195,5,281,273,287,291,396,428,199,311,271,268,283,444,445,373,254,339,263,466,249,282,334,296,449,347,346,264,447,454,336,296,299,338,10,151,278,439,455,292,407,415,358,371,355,340,345,372,390,249,466,346,347,280,442,443,282,19,94,370,441,442,295,248,419,197,263,255,359,440,275,274,300,383,368,351,412,465,263,467,466,301,368,389,380,374,386,395,378,379,412,351,419,436,426,322,373,390,388,2,164,393,370,462,461,164,0,267,302,11,12,374,373,387,268,12,13,293,300,301,446,261,340,385,384,381,330,266,425,426,423,391,429,355,437,391,327,326,440,457,438,341,382,362,459,457,461,434,430,394,414,463,362,396,369,262,354,461,457,316,403,402,315,404,403,314,405,404,313,406,405,421,418,406,366,401,361,306,408,407,291,409,408,287,410,409,432,436,410,434,416,411,264,368,383,309,438,457,352,376,401,274,275,4,421,428,262,294,327,358,433,416,367,289,455,439,462,370,326,2,326,370,305,460,455,254,449,448,255,261,446,253,450,449,252,451,450,256,452,451,341,453,452,413,464,463,441,413,414,258,442,441,257,443,442,259,444,443,260,445,444,467,342,445,459,458,250,289,392,290,290,328,460,376,433,435,250,290,392,411,416,433,341,463,464,453,464,465,357,465,412,343,412,399,360,363,440,437,399,456,420,456,363,401,435,288,372,383,353,339,255,249,448,261,255,133,243,190,133,155,112,33,246,247,33,130,25,398,384,286,362,398,414,362,463,341,263,359,467,263,249,255,466,467,260,75,60,166,238,239,79,162,127,139,72,11,37,121,232,120,73,72,39,114,128,47,233,232,128,103,104,67,152,175,148,173,157,155,119,118,101,74,73,40,107,9,108,49,48,131,32,194,211,184,74,185,191,80,183,185,40,186,119,230,118,210,202,214,84,83,17,77,76,146,161,160,30,190,56,173,182,106,194,138,135,192,129,203,98,54,21,68,5,51,4,145,144,23,90,77,91,207,205,187,83,201,18,181,91,182,180,90,181,16,85,17,205,206,36,176,148,140,165,92,39,245,193,244,27,159,28,30,247,161,174,236,196,103,54,104,55,193,8,111,117,31,221,189,55,240,98,99,142,126,100,219,166,218,112,155,26,198,209,131,169,135,150,114,47,217,224,223,53,220,45,134,32,211,140,109,67,108,146,43,91,231,230,120,113,226,247,105,63,52,241,238,242,124,46,156,95,78,96,70,46,63,116,143,227,116,123,111,1,44,19,3,236,51,207,216,205,26,154,22,165,39,167,199,200,208,101,36,100,43,57,202,242,20,99,56,28,157,124,35,113,29,160,27,211,204,210,124,113,46,106,43,204,96,62,77,227,137,116,73,41,72,36,203,142,235,64,240,48,49,64,42,41,74,214,212,207,183,42,184,210,169,211,140,170,176,104,105,69,193,122,168,50,123,187,89,96,90,66,65,107,179,89,180,119,101,120,68,63,104,234,93,227,16,15,85,209,129,49,15,14,86,107,55,9,120,100,121,153,145,22,178,88,179,197,6,196,89,88,96,135,138,136,138,215,172,218,115,219,41,42,81,5,195,51,57,43,61,208,171,199,41,81,38,224,53,225,24,144,110,105,52,66,118,229,117,227,34,234,66,107,69,10,109,151,219,48,235,183,62,191,142,129,126,116,111,143,7,163,246,118,117,50,223,222,52,94,19,141,222,221,65,196,3,197,45,220,44,156,70,139,188,122,245,139,71,162,145,153,159,149,170,150,122,188,196,206,216,92,163,144,161,164,2,167,242,141,241,0,164,37,11,72,12,144,145,160,12,38,13,70,63,71,31,226,111,157,158,154,36,101,205,203,206,165,126,209,217,98,165,97,237,220,218,237,239,241,210,214,169,140,171,32,241,125,237,179,86,178,180,85,179,181,84,180,182,83,181,194,201,182,177,137,132,184,76,183,185,61,184,186,57,185,216,212,186,192,214,187,139,34,156,218,79,237,147,123,177,45,44,4,208,201,32,98,64,129,192,213,138,235,59,219,141,242,97,97,2,141,240,75,235,229,24,228,31,25,226,230,23,229,231,22,230,232,26,231,233,112,232,244,189,243,189,221,190,222,28,221,223,27,222,224,29,223,225,30,224,113,247,225,99,60,240,213,147,215,60,20,166,192,187,213,243,112,244,244,233,245,245,128,188,188,114,174,134,131,220,174,217,236,236,198,134,215,177,58,156,143,124,25,110,7,31,228,25,264,356,368,0,11,267,451,452,349,267,302,269,350,357,277,350,452,357,299,333,297,396,175,377,381,384,382,280,347,330,269,303,270,151,9,337,344,278,360,424,418,431,270,304,409,272,310,407,322,270,410,449,450,347,432,422,434,18,313,17,291,306,375,259,387,260,424,335,418,434,364,416,391,423,327,301,251,298,275,281,4,254,373,253,375,307,321,280,425,411,200,421,18,335,321,406,321,320,405,314,315,17,423,426,266,396,377,369,270,322,269,413,417,464,385,386,258,248,456,419,298,284,333,168,417,8,448,346,261,417,413,285,326,327,328,277,355,329,309,392,438,381,382,256,279,429,360,365,364,379,355,277,437,282,443,283,281,275,363,395,431,369,299,297,337,335,273,321,348,450,349,359,446,467,283,293,282,250,458,462,300,276,383,292,308,325,283,276,293,264,372,447,346,352,340,354,274,19,363,456,281,426,436,425,380,381,252,267,269,393,421,200,428,371,266,329,432,287,422,290,250,328,385,258,384,446,265,342,386,387,257,422,424,430,445,342,276,422,273,424,306,292,307,352,366,345,268,271,302,358,423,371,327,294,460,331,279,294,303,271,304,436,432,427,304,272,408,395,394,431,378,395,400,296,334,299,6,351,168,376,352,411,307,325,320,285,295,336,320,319,404,329,330,349,334,293,333,366,323,447,316,15,315,331,358,279,317,14,316,8,285,9,277,329,350,253,374,252,319,318,403,351,6,419,324,318,325,397,367,365,288,435,397,278,344,439,310,272,311,248,195,281,375,273,291,175,396,199,312,311,268,276,283,445,390,373,339,295,282,296,448,449,346,356,264,454,337,336,299,337,338,151,294,278,455,308,292,415,429,358,355,265,340,372,388,390,466,352,346,280,295,442,282,354,19,370,285,441,295,195,248,197,457,440,274,301,300,368,417,351,465,251,301,389,385,380,386,394,395,379,399,412,419,410,436,322,387,373,388,326,2,393,354,370,461,393,164,267,268,302,12,386,374,387,312,268,13,298,293,301,265,446,340,380,385,381,280,330,425,322,426,391,420,429,437,393,391,326,344,440,438,458,459,461,364,434,394,428,396,262,274,354,457,317,316,402,316,315,403,315,314,404,314,313,405,313,421,406,323,366,361,292,306,407,306,291,408,291,287,409,287,432,410,427,434,411,372,264,383,459,309,457,366,352,401,1,274,4,418,421,262,331,294,358,435,433,367,392,289,439,328,462,326,94,2,370,289,305,455,339,254,448,359,255,446,254,253,449,253,252,450,252,256,451,256,341,452,414,413,463,286,441,414,286,258,441,258,257,442,257,259,443,259,260,444,260,467,445,309,459,250,305,289,290,305,290,460,401,376,435,309,250,392,376,411,433,453,341,464,357,453,465,343,357,412,437,343,399,344,360,440,420,437,456,360,420,363,361,401,288,265,372,353,390,339,249,339,448,255];var ss=[127,234,132,58,172,150,149,148,152,377,378,379,397,288,361,454,356,70,63,105,66,107,336,296,334,293,300,168,6,195,4,98,97,2,326,327,33,160,158,133,153,144,362,385,387,263,373,380,57,40,37,0,267,270,287,321,314,17,84,91,78,81,13,311,308,402,14,178],As=[33,133,362,263,1,62,308,159,145,386,374,6,102,331,2,13,14,70,105,107,336,334,300,54,10,284,50,280,234,454,58,288,152],as=[33,133,362,263,1,78,308],Ta=ss.map(e=>O2[e]),va=As.map(e=>O2[e]),Pa=as.map(e=>O2[e]);function ze(e){let t=e.map(n=>n[0]);return t.push(e[e.length-1][1]),t}var is=[[61,146],[146,91],[91,181],[181,84],[84,17],[17,314],[314,405],[405,321],[321,375],[375,291],[61,185],[185,40],[40,39],[39,37],[37,0],[0,267],[267,269],[269,270],[270,409],[409,291],[78,95],[95,88],[88,178],[178,87],[87,14],[14,317],[317,402],[402,318],[318,324],[324,308],[78,191],[191,80],[80,81],[81,82],[82,13],[13,312],[312,311],[311,310],[310,415],[415,308]],ls=[[263,249],[249,390],[390,373],[373,374],[374,380],[380,381],[381,382],[382,362],[263,466],[466,388],[388,387],[387,386],[386,385],[385,384],[384,398],[398,362]],cs=[[276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]],ds=[[474,475],[475,476],[476,477],[477,474]],xs=[[33,7],[7,163],[163,144],[144,145],[145,153],[153,154],[154,155],[155,133],[33,246],[246,161],[161,160],[160,159],[159,158],[158,157],[157,173],[173,133]],ys=[[46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]],fs=[[469,470],[470,471],[471,472],[472,469]],ms=[[10,338],[338,297],[297,332],[332,284],[284,251],[251,389],[389,356],[356,454],[454,323],[323,361],[361,288],[288,397],[397,365],[365,379],[379,378],[378,400],[400,377],[377,152],[152,148],[148,176],[176,149],[149,150],[150,136],[136,172],[172,58],[58,132],[132,93],[93,234],[234,127],[127,162],[162,21],[21,54],[54,103],[103,67],[67,109],[109,10]],Ra={lips:ze(is),leftEye:ze(ls),leftEyebrow:ze(cs),leftIris:ze(ds),rightEye:ze(xs),rightEyebrow:ze(ys),rightIris:ze(fs),faceOval:ze(ms)};var Se=D(V()),W={tf255:255,tf1:1,tf2:2,tf05:.5,tf127:127.5,rgb:[.2989,.587,.114]};function J1(){W.tf255=Se.scalar(255,"float32"),W.tf1=Se.scalar(1,"float32"),W.tf2=Se.scalar(2,"float32"),W.tf05=Se.scalar(.5,"float32"),W.tf127=Se.scalar(127.5,"float32"),W.rgb=Se.tensor1d([.2989,.587,.114],"float32")}var l2=e=>[Math.abs(e.endPoint[0]-e.startPoint[0]),Math.abs(e.endPoint[1]-e.startPoint[1])],nt=e=>[e.startPoint[0]+(e.endPoint[0]-e.startPoint[0])/2,e.startPoint[1]+(e.endPoint[1]-e.startPoint[1])/2,1],ot=(e,t)=>e?[Math.trunc(Math.max(0,e.startPoint[0])),Math.trunc(Math.max(0,e.startPoint[1])),Math.trunc(Math.min(t.shape[2]||0,e.endPoint[0])-Math.max(0,e.startPoint[0])),Math.trunc(Math.min(t.shape[1]||0,e.endPoint[1])-Math.max(0,e.startPoint[1]))]:[0,0,0,0],rt=(e,t)=>e?[e.startPoint[0]/(t.shape[2]||0),e.startPoint[1]/(t.shape[1]||0),(e.endPoint[0]-e.startPoint[0])/(t.shape[2]||0),(e.endPoint[1]-e.startPoint[1])/(t.shape[1]||0)]:[0,0,0,0],$1=(e,t)=>{let n=[e.startPoint[0]*t[0],e.startPoint[1]*t[1]],o=[e.endPoint[0]*t[0],e.endPoint[1]*t[1]];return{startPoint:n,endPoint:o,landmarks:e.landmarks,confidence:e.confidence}},o5=(e,t,n)=>{let o=t.shape[1],r=t.shape[2],s=[e.startPoint[1]/o,e.startPoint[0]/r,e.endPoint[1]/o,e.endPoint[0]/r],A=he.image.cropAndResize(t,[s],[0],n),a=he.div(A,W.tf255);return he.dispose(A),a},st=(e,t)=>{let n=nt(e),o=l2(e),r=[t*o[0]/2,t*o[1]/2];return{startPoint:[n[0]-r[0],n[1]-r[1]],endPoint:[n[0]+r[0],n[1]+r[1]],landmarks:e.landmarks,confidence:e.confidence}},At=e=>{let t=nt(e),n=l2(e),o=Math.max(...n)/2;return{startPoint:[Math.round(t[0]-o),Math.round(t[1]-o)],endPoint:[Math.round(t[0]+o),Math.round(t[1]+o)],landmarks:e.landmarks,confidence:e.confidence}},e3=e=>{let t=e.map(o=>o[0]),n=e.map(o=>o[1]);return{startPoint:[Math.min(...t),Math.min(...n)],endPoint:[Math.max(...t),Math.max(...n)],landmarks:e}},r5=[[1,0,0],[0,1,0],[0,0,1]],us=e=>e-2*Math.PI*Math.floor((e+Math.PI)/(2*Math.PI)),hs=(e,t)=>us(Math.PI/2-Math.atan2(-(t[1]-e[1]),t[0]-e[0]));var Q1=(e,t)=>[[1,0,e],[0,1,t],[0,0,1]],Ye=(e,t)=>{let n=0;for(let o=0;o{let n=[];for(let o=0;o{let n=[],o=e.length;for(let r=0;r{let n=Math.cos(e),o=Math.sin(e),r=[[n,-o,0],[o,n,0],[0,0,1]],s=Q1(t[0],t[1]),A=_1(s,r),a=Q1(-t[0],-t[1]);return _1(A,a)},gs=e=>{let t=[[e[0][0],e[1][0]],[e[0][1],e[1][1]]],n=[e[0][2],e[1][2]],o=[-Ye(t[0],n),-Ye(t[1],n)];return[t[0].concat(o[0]),t[1].concat(o[1]),[0,0,1]]},Ms=(e,t)=>[Ye(e,t[0]),Ye(e,t[1])];function n3(e){let t=e===192?{strides:[4],anchors:[1]}:{strides:[e/16,e/8],anchors:[2,6]},n=[];for(let o=0;o[s[0]/r*(d[0]-r/2),s[1]/r*(d[1]-r/2),d[2]||0]),a=n&&n!==0&&Math.abs(n)>.2,l=a?t3(n,[0,0]):r5,c=a?A.map(d=>[...Ms(d,l),d[2]]):A,x=a?gs(o):r5,i=nt(t),f=[Ye(i,x[0]),Ye(i,x[1])];return c.map(d=>[Math.trunc(d[0]+f[0]),Math.trunc(d[1]+f[1]),Math.trunc(d[2]||0)])}function r3(e,t,n,o){let r=t.landmarks.length>=e5.count?e5.symmetryLine:qe.symmetryLine,s=0,A=r5,a;if(e&&k.kernels.includes("rotatewithoffset"))if(s=hs(t.landmarks[r[0]],t.landmarks[r[1]]),s&&s!==0&&Math.abs(s)>.2){let c=nt(t),x=[c[0]/n.shape[2],c[1]/n.shape[1]],i=he.image.rotateWithOffset(n,s,0,x);A=t3(-s,c),a=o5(t,i,[o,o]),he.dispose(i)}else a=o5(t,n,[o,o]);else a=o5(t,n,[o,o]);return[s,A,a]}var Ts=e=>{let t=e.map(o=>o[0]),n=e.map(o=>o[1]);return[Math.min(...t)+(Math.max(...t)-Math.min(...t))/2,Math.min(...n)+(Math.max(...n)-Math.min(...n))/2]},s3=(e,t)=>{let n=Ts(e),o=l2(t);return{startPoint:[n[0]-o[0]/2,n[1]-o[1]/2],endPoint:[n[0]+o[0]/2,n[1]+o[1]/2]}};var A3=6,vs=1.4,Ae,a3=null,je=0,I2=null,c2=()=>je;async function i3(e){var t;return k.initial&&(Ae=null),Ae?e.debug&&h("cached model:",Ae.modelUrl):Ae=await C((t=e.face.detector)==null?void 0:t.modelPath),je=Ae.executor&&Ae.inputs[0].shape?Ae.inputs[0].shape[2]:256,I2=L.scalar(je,"int32"),a3=L.tensor2d(n3(je)),Ae}function Ps(e){let t={};t.boxStarts=L.slice(e,[0,1],[-1,2]),t.centers=L.add(t.boxStarts,a3),t.boxSizes=L.slice(e,[0,3],[-1,2]),t.boxSizesNormalized=L.div(t.boxSizes,I2),t.centersNormalized=L.div(t.centers,I2),t.halfBoxSize=L.div(t.boxSizesNormalized,W.tf2),t.starts=L.sub(t.centersNormalized,t.halfBoxSize),t.ends=L.add(t.centersNormalized,t.halfBoxSize),t.startNormalized=L.mul(t.starts,I2),t.endNormalized=L.mul(t.ends,I2);let n=L.concat2d([t.startNormalized,t.endNormalized],1);return Object.keys(t).forEach(o=>L.dispose(t[o])),n}async function l3(e,t){var a,l,c,x;if(!e||e.isDisposedInternal||e.shape.length!==4||e.shape[1]<1||e.shape[2]<1)return[];let n={};n.resized=L.image.resizeBilinear(e,[je,je]),n.div=L.div(n.resized,W.tf127),n.normalized=L.sub(n.div,W.tf05);let o=Ae==null?void 0:Ae.execute(n.normalized);if(Array.isArray(o)&&o.length>2){let i=o.sort((f,d)=>f.size-d.size);n.concat384=L.concat([i[0],i[2]],2),n.concat512=L.concat([i[1],i[3]],2),n.concat=L.concat([n.concat512,n.concat384],1),n.batch=L.squeeze(n.concat,0)}else Array.isArray(o)?n.batch=L.squeeze(o[0]):n.batch=L.squeeze(o);L.dispose(o),n.boxes=Ps(n.batch),n.logits=L.slice(n.batch,[0,0],[-1,1]),n.sigmoid=L.sigmoid(n.logits),n.scores=L.squeeze(n.sigmoid),n.nms=await L.image.nonMaxSuppressionAsync(n.boxes,n.scores,((a=t.face.detector)==null?void 0:a.maxDetected)||0,((l=t.face.detector)==null?void 0:l.iouThreshold)||0,((c=t.face.detector)==null?void 0:c.minConfidence)||0);let r=await n.nms.array(),s=[],A=await n.scores.data();for(let i=0;i(((x=t.face.detector)==null?void 0:x.minConfidence)||0)){let d={};d.bbox=L.slice(n.boxes,[r[i],0],[1,-1]),d.slice=L.slice(n.batch,[r[i],A3-1],[1,-1]),d.squeeze=L.squeeze(d.slice),d.landmarks=L.reshape(d.squeeze,[A3,-1]);let m=await d.bbox.data(),p={startPoint:[m[0],m[1]],endPoint:[m[2],m[3]],landmarks:await d.landmarks.array(),confidence:f},g=$1(p,[(e.shape[2]||0)/je,(e.shape[1]||0)/je]),v=st(g,t.face.scale||vs),T=At(v);s.push(T),Object.keys(d).forEach(y=>L.dispose(d[y]))}}return Object.keys(n).forEach(i=>L.dispose(n[i])),s}var F0=D(V());var at={};we(at,{connected:()=>a5,kpt:()=>A5});var A5=["nose","leftEyeInside","leftEye","leftEyeOutside","rightEyeInside","rightEye","rightEyeOutside","leftEar","rightEar","leftMouth","rightMouth","leftShoulder","rightShoulder","leftElbow","rightElbow","leftWrist","rightWrist","leftPinky","rightPinky","leftIndex","rightIndex","leftThumb","rightThumb","leftHip","rightHip","leftKnee","rightKnee","leftAnkle","rightAnkle","leftHeel","rightHeel","leftFoot","rightFoot","bodyCenter","bodyTop","leftPalm","leftHand","rightPalm","rightHand"],a5={shoulders:["leftShoulder","rightShoulder"],hips:["rightHip","leftHip"],mouth:["leftMouth","rightMouth"],leftLegUpper:["leftHip","leftKnee"],leftLegLower:["leftKnee","leftAnkle"],leftFoot:["leftAnkle","leftHeel","leftFoot"],leftTorso:["leftShoulder","leftHip"],leftArmUpper:["leftShoulder","leftElbow"],leftArmLower:["leftElbow","leftWrist"],leftHand:["leftWrist","leftPalm"],leftHandPinky:["leftPalm","leftPinky"],leftHandIndex:["leftPalm","leftIndex"],leftHandThumb:["leftPalm","leftThumb"],leftEyeOutline:["leftEyeInside","leftEyeOutside"],rightLegUpper:["rightHip","rightKnee"],rightLegLower:["rightKnee","rightAnkle"],rightFoot:["rightAnkle","rightHeel","rightFoot"],rightTorso:["rightShoulder","rightHip"],rightArmUpper:["rightShoulder","rightElbow"],rightArmLower:["rightElbow","rightWrist"],rightHand:["rightWrist","rightPalm"],rightHandPinky:["rightPalm","rightPinky"],rightHandIndex:["rightPalm","rightIndex"],rightHandThumb:["rightPalm","rightThumb"],rightEyeOutline:["rightEyeInside","rightEyeOutside"]};var W0=D(V()),d3=224,Rs,ks=5,it=[8,16,32,32,32];function x3(){let e=[],t=0;for(;tn.x)),y:W0.tensor1d(e.map(n=>n.y))}}function be(e,t=[1,1]){let n=[e.map(a=>a[0]),e.map(a=>a[1])],o=[Math.min(...n[0]),Math.min(...n[1])],r=[Math.max(...n[0]),Math.max(...n[1])],s=[o[0],o[1],r[0]-o[0],r[1]-o[1]],A=[s[0]/t[0],s[1]/t[1],s[2]/t[0],s[3]/t[1]];return{box:s,boxRaw:A}}function y3(e,t=[1,1]){let n=[e.map(c=>c[0]),e.map(c=>c[1])],o=[Math.min(...n[0]),Math.min(...n[1])],r=[Math.max(...n[0]),Math.max(...n[1])],s=[(o[0]+r[0])/2,(o[1]+r[1])/2],A=Math.max(s[0]-o[0],s[1]-o[1],-s[0]+r[0],-s[1]+r[1]),a=[Math.trunc(s[0]-A),Math.trunc(s[1]-A),Math.trunc(2*A),Math.trunc(2*A)],l=[a[0]/t[0],a[1]/t[1],a[2]/t[0],a[3]/t[1]];return{box:a,boxRaw:l}}function lt(e,t){let n=[e[2]*t,e[3]*t];return[e[0]-(n[0]-e[2])/2,e[1]-(n[1]-e[3])/2,n[0],n[1]]}var p3={initial:!0},R0={detector:null,landmarks:null},d2={detector:[224,224],landmarks:[256,256]},i5=Number.MAX_SAFE_INTEGER,Es={landmarks:["ld_3d","activation_segmentation","activation_heatmap","world_3d","output_poseflag"],detector:[]},dt=null,C2,Ne=[[0,0],[0,0],[0,0],[0,0]],f3=0,m3=e=>1-1/(1+Math.exp(e));async function u3(e){var t;if(p3.initial&&(R0.detector=null),!R0.detector&&e.body.detector&&e.body.detector.modelPath){R0.detector=await C(e.body.detector.modelPath);let n=(t=R0.detector)!=null&&t.executor?Object.values(R0.detector.modelSignature.inputs):void 0;d2.detector[0]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[1].size):0,d2.detector[1]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[2].size):0}else e.debug&&R0.detector&&h("cached model:",R0.detector.modelUrl);return x3(),R0.detector}async function h3(e){var t;if(p3.initial&&(R0.landmarks=null),R0.landmarks)e.debug&&h("cached model:",R0.landmarks.modelUrl);else{R0.landmarks=await C(e.body.modelPath);let n=(t=R0.landmarks)!=null&&t.executor?Object.values(R0.landmarks.modelSignature.inputs):void 0;d2.landmarks[0]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[1].size):0,d2.landmarks[1]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[2].size):0}return R0.landmarks}function zs(e,t){var r,s;let n={};if(!((r=e==null?void 0:e.shape)!=null&&r[1])||!((s=e==null?void 0:e.shape)!=null&&s[2]))return e;let o;if(C2&&(n.cropped=F0.image.cropAndResize(e,[C2],[0],[e.shape[1],e.shape[2]])),e.shape[1]!==e.shape[2]){let A=[e.shape[2]>e.shape[1]?Math.trunc((e.shape[2]-e.shape[1])/2):0,e.shape[2]>e.shape[1]?Math.trunc((e.shape[2]-e.shape[1])/2):0],a=[e.shape[1]>e.shape[2]?Math.trunc((e.shape[1]-e.shape[2])/2):0,e.shape[1]>e.shape[2]?Math.trunc((e.shape[1]-e.shape[2])/2):0];Ne=[[0,0],A,a,[0,0]],n.pad=F0.pad(n.cropped||e,Ne),n.resize=F0.image.resizeBilinear(n.pad,[t,t]),o=F0.div(n.resize,W.tf255)}else e.shape[1]!==t?(n.resize=F0.image.resizeBilinear(n.cropped||e,[t,t]),o=F0.div(n.resize,W.tf255)):o=F0.div(n.cropped||e,W.tf255);return Object.keys(n).forEach(A=>F0.dispose(n[A])),o}function Ss(e,t){for(let n of e)n.position=[Math.trunc(n.position[0]*(t[0]+Ne[2][0]+Ne[2][1])/t[0]-Ne[2][0]),Math.trunc(n.position[1]*(t[1]+Ne[1][0]+Ne[1][1])/t[1]-Ne[1][0]),n.position[2]],n.positionRaw=[n.position[0]/t[0],n.position[1]/t[1],2*n.position[2]/(t[0]+t[1])];if(C2)for(let n of e)n.positionRaw=[n.positionRaw[0]+C2[1],n.positionRaw[1]+C2[0],n.positionRaw[2]],n.position=[Math.trunc(n.positionRaw[0]*t[0]),Math.trunc(n.positionRaw[1]*t[1]),n.positionRaw[2]];return e}function js(e){let t=e.find(a=>a.part==="leftPalm"),n=e.find(a=>a.part==="leftWrist"),o=e.find(a=>a.part==="leftIndex");t.position[2]=((n.position[2]||0)+(o.position[2]||0))/2;let r=e.find(a=>a.part==="rightPalm"),s=e.find(a=>a.part==="rightWrist"),A=e.find(a=>a.part==="rightIndex");r.position[2]=((s.position[2]||0)+(A.position[2]||0))/2}async function Ns(e,t,n){var m,p;if(!((m=R0.landmarks)!=null&&m.executor))return null;let o={};[o.ld,o.segmentation,o.heatmap,o.world,o.poseflag]=(p=R0.landmarks)==null?void 0:p.execute(e,Es.landmarks);let r=(await o.poseflag.data())[0],s=await o.ld.data(),A=await o.world.data();Object.keys(o).forEach(g=>F0.dispose(o[g]));let a=[],l=5;for(let g=0;gg.position),i=be(x,[n[0],n[1]]),f={};for(let[g,v]of Object.entries(a5)){let T=[];for(let y=0;yw.part===v[y]),z=c.find(w=>w.part===v[y+1]);b&&z&&T.push([b.position,z.position])}f[g]=T}return{id:0,score:Math.trunc(100*r)/100,box:i.box,boxRaw:i.boxRaw,keypoints:c,annotations:f}}async function l5(e,t){let n=[e.shape[2]||0,e.shape[1]||0],o=(t.body.skipTime||0)>M()-f3,r=i5<(t.body.skipFrames||0);if(t.skipAllowed&&o&&r&&dt!==null)i5++;else{let s={};s.landmarks=zs(e,256),dt=await Ns(s.landmarks,t,n),Object.keys(s).forEach(A=>F0.dispose(s[A])),f3=M(),i5=0}return dt?[dt]:[]}var N0=D(V());var x2=[{class:1,label:"person"},{class:2,label:"bicycle"},{class:3,label:"car"},{class:4,label:"motorcycle"},{class:5,label:"airplane"},{class:6,label:"bus"},{class:7,label:"train"},{class:8,label:"truck"},{class:9,label:"boat"},{class:10,label:"traffic light"},{class:11,label:"fire hydrant"},{class:12,label:"stop sign"},{class:13,label:"parking meter"},{class:14,label:"bench"},{class:15,label:"bird"},{class:16,label:"cat"},{class:17,label:"dog"},{class:18,label:"horse"},{class:19,label:"sheep"},{class:20,label:"cow"},{class:21,label:"elephant"},{class:22,label:"bear"},{class:23,label:"zebra"},{class:24,label:"giraffe"},{class:25,label:"backpack"},{class:26,label:"umbrella"},{class:27,label:"handbag"},{class:28,label:"tie"},{class:29,label:"suitcase"},{class:30,label:"frisbee"},{class:31,label:"skis"},{class:32,label:"snowboard"},{class:33,label:"sports ball"},{class:34,label:"kite"},{class:35,label:"baseball bat"},{class:36,label:"baseball glove"},{class:37,label:"skateboard"},{class:38,label:"surfboard"},{class:39,label:"tennis racket"},{class:40,label:"bottle"},{class:41,label:"wine glass"},{class:42,label:"cup"},{class:43,label:"fork"},{class:44,label:"knife"},{class:45,label:"spoon"},{class:46,label:"bowl"},{class:47,label:"banana"},{class:48,label:"apple"},{class:49,label:"sandwich"},{class:50,label:"orange"},{class:51,label:"broccoli"},{class:52,label:"carrot"},{class:53,label:"hot dog"},{class:54,label:"pizza"},{class:55,label:"donut"},{class:56,label:"cake"},{class:57,label:"chair"},{class:58,label:"couch"},{class:59,label:"potted plant"},{class:60,label:"bed"},{class:61,label:"dining table"},{class:62,label:"toilet"},{class:63,label:"tv"},{class:64,label:"laptop"},{class:65,label:"mouse"},{class:66,label:"remote"},{class:67,label:"keyboard"},{class:68,label:"cell phone"},{class:69,label:"microwave"},{class:70,label:"oven"},{class:71,label:"toaster"},{class:72,label:"sink"},{class:73,label:"refrigerator"},{class:74,label:"book"},{class:75,label:"clock"},{class:76,label:"vase"},{class:77,label:"scissors"},{class:78,label:"teddy bear"},{class:79,label:"hair drier"},{class:80,label:"toothbrush"}];var L0,Ke=0,c5=[],g3=0,d5=Number.MAX_SAFE_INTEGER;async function M3(e){if(k.initial&&(L0=null),L0)e.debug&&h("cached model:",L0.modelUrl);else{L0=await C(e.object.modelPath);let t=L0!=null&&L0.executor?Object.values(L0.modelSignature.inputs):void 0;Ke=Array.isArray(t)?parseInt(t[0].tensorShape.dim[2].size):0}return L0}async function Os(e,t,n){if(!e)return[];let o={},r=[],s=await e.array();o.squeeze=N0.squeeze(e);let A=N0.split(o.squeeze,6,1);o.stack=N0.stack([A[1],A[0],A[3],A[2]],1),o.boxes=N0.squeeze(o.stack),o.scores=N0.squeeze(A[4]),o.classes=N0.squeeze(A[5]),N0.dispose([e,...A]),o.nms=await N0.image.nonMaxSuppressionAsync(o.boxes,o.scores,n.object.maxDetected,n.object.iouThreshold,n.object.minConfidence||0);let a=await o.nms.data(),l=0;for(let c of Array.from(a)){let x=Math.trunc(100*s[0][c][4])/100,i=s[0][c][5];if(Number.isNaN(i))continue;let f=x2[i].label,[d,m]=[s[0][c][0]/Ke,s[0][c][1]/Ke],p=[d,m,s[0][c][2]/Ke-d,s[0][c][3]/Ke-m],g=[Math.trunc(p[0]*t[0]),Math.trunc(p[1]*t[1]),Math.trunc(p[2]*t[0]),Math.trunc(p[3]*t[1])];r.push({id:l++,score:x,class:i,label:f,box:g,boxRaw:p})}return Object.keys(o).forEach(c=>N0.dispose(o[c])),r}async function x5(e,t){if(!(L0!=null&&L0.executor))return[];let n=(t.object.skipTime||0)>M()-g3,o=d5<(t.object.skipFrames||0);return t.skipAllowed&&n&&o&&c5.length>0?(d5++,c5):(d5=0,new Promise(async r=>{let s=[e.shape[2]||0,e.shape[1]||0],A=N0.image.resizeBilinear(e,[Ke,Ke]),a=t.object.enabled?L0==null?void 0:L0.execute(A,["tower_0/detections"]):null;g3=M(),N0.dispose(A);let l=await Os(a,s,t);c5=l,r(l)}))}var J=D(V());var xt={};we(xt,{connected:()=>f5,kpt:()=>y5});var y5=["head","neck","rightShoulder","rightElbow","rightWrist","chest","leftShoulder","leftElbow","leftWrist","bodyCenter","rightHip","rightKnee","rightAnkle","leftHip","leftKnee","leftAnkle"],f5={leftLeg:["leftHip","leftKnee","leftAnkle"],rightLeg:["rightHip","rightKnee","rightAnkle"],torso:["leftShoulder","rightShoulder","rightHip","leftHip","leftShoulder"],leftArm:["leftShoulder","leftElbow","leftWrist"],rightArm:["rightShoulder","rightElbow","rightWrist"],head:[]};var b0,v3=0,O0={id:0,keypoints:[],box:[0,0,0,0],boxRaw:[0,0,0,0],score:0,annotations:{}},m5=Number.MAX_SAFE_INTEGER;async function P3(e){return k.initial&&(b0=null),b0?e.debug&&h("cached model:",b0.modelUrl):b0=await C(e.body.modelPath),b0}async function Is(e,t){let[n,o]=e.shape,r=J.reshape(e,[o*n]),s=J.max(r,0),A=(await s.data())[0];if(A>t){let a=J.argMax(r,0),l=J.mod(a,n),c=(await l.data())[0],x=J.div(a,n),i=(await x.data())[0];return J.dispose([r,s,a,l,x]),[c,i,A]}return J.dispose([r,s]),[0,0,A]}async function p5(e,t){if(!(b0!=null&&b0.executor))return[];let n=(t.body.skipTime||0)>M()-v3,o=m5<(t.body.skipFrames||0);return t.skipAllowed&&n&&o&&Object.keys(O0.keypoints).length>0?(m5++,[O0]):(m5=0,new Promise(async r=>{let s=J.tidy(()=>{if(!(b0!=null&&b0.inputs[0].shape))return null;let i=J.image.resizeBilinear(e,[b0.inputs[0].shape[2],b0.inputs[0].shape[1]],!1),f=J.mul(i,W.tf2);return J.sub(f,W.tf1)}),A;if(t.body.enabled&&(A=b0==null?void 0:b0.execute(s)),v3=M(),J.dispose(s),A){O0.keypoints.length=0;let i=J.squeeze(A);J.dispose(A);let f=J.unstack(i,2);J.dispose(i);for(let d=0;d(t.body.minConfidence||0)&&O0.keypoints.push({score:Math.round(100*g)/100,part:y5[d],positionRaw:[m/b0.inputs[0].shape[2],p/b0.inputs[0].shape[1]],position:[Math.round(e.shape[2]*m/b0.inputs[0].shape[2]),Math.round(e.shape[1]*p/b0.inputs[0].shape[1])]})}f.forEach(d=>J.dispose(d))}O0.score=O0.keypoints.reduce((i,f)=>f.score>i?f.score:i,0);let a=O0.keypoints.map(i=>i.position[0]),l=O0.keypoints.map(i=>i.position[1]);O0.box=[Math.min(...a),Math.min(...l),Math.max(...a)-Math.min(...a),Math.max(...l)-Math.min(...l)];let c=O0.keypoints.map(i=>i.positionRaw[0]),x=O0.keypoints.map(i=>i.positionRaw[1]);O0.boxRaw=[Math.min(...c),Math.min(...x),Math.max(...c)-Math.min(...c),Math.max(...x)-Math.min(...x)];for(let[i,f]of Object.entries(f5)){let d=[];for(let m=0;mv.part===f[m]),g=O0.keypoints.find(v=>v.part===f[m+1]);p&&g&&p.score>(t.body.minConfidence||0)&&g.score>(t.body.minConfidence||0)&&d.push([p.position,g.position])}O0.annotations[i]=d}r([O0])}))}var ae=D(V());var Cs=["angry","disgust","fear","happy","sad","surprise","neutral"],Y0,yt=[],k3=0,w3=0,u5=Number.MAX_SAFE_INTEGER;async function E3(e){var t;return k.initial&&(Y0=null),Y0?e.debug&&h("cached model:",Y0.modelUrl):Y0=await C((t=e.face.emotion)==null?void 0:t.modelPath),Y0}async function h5(e,t,n,o){var A,a;if(!Y0)return[];let r=u5<(((A=t.face.emotion)==null?void 0:A.skipFrames)||0),s=(((a=t.face.emotion)==null?void 0:a.skipTime)||0)>M()-w3;return t.skipAllowed&&s&&r&&k3===o&&yt[n]&&yt[n].length>0?(u5++,yt[n]):(u5=0,new Promise(async l=>{var x;let c=[];if((x=t.face.emotion)!=null&&x.enabled){let i={},f=Y0!=null&&Y0.inputs[0].shape?Y0.inputs[0].shape[2]:0;i.resize=ae.image.resizeBilinear(e,[f,f],!1),i.channels=ae.mul(i.resize,W.rgb),i.grayscale=ae.sum(i.channels,3,!0),i.grayscaleSub=ae.sub(i.grayscale,W.tf05),i.grayscaleMul=ae.mul(i.grayscaleSub,W.tf2),i.emotion=Y0==null?void 0:Y0.execute(i.grayscaleMul),w3=M();let d=await i.emotion.data();for(let m=0;m(t.face.emotion.minConfidence||0)&&c.push({score:Math.min(.99,Math.trunc(100*d[m])/100),emotion:Cs[m]});c.sort((m,p)=>p.score-m.score),Object.keys(i).forEach(m=>ae.dispose(i[m]))}yt[n]=c,k3=o,l(c)}))}var Ce=D(V());var ie=D(V());var G0,Oe=0,Ls=2.3,b5=te.leftEyeLower0,g5=te.rightEyeLower0,y2={leftBounds:[b5[0],b5[b5.length-1]],rightBounds:[g5[0],g5[g5.length-1]]},f2={upperCenter:3,lowerCenter:4,index:71,numCoordinates:76};async function O3(e){var t,n;return k.initial&&(G0=null),G0?e.debug&&h("cached model:",G0.modelUrl):G0=await C((t=e.face.iris)==null?void 0:t.modelPath),Oe=(G0==null?void 0:G0.executor)&&((n=G0.inputs)==null?void 0:n[0].shape)?G0.inputs[0].shape[2]:0,Oe===-1&&(Oe=64),G0}function ft(e,t,n,o){for(let r=0;r{let t=e[y2.leftBounds[0]][2],n=e[y2.rightBounds[0]][2];return t-n},S3=(e,t,n,o,r,s=!1)=>{let A=At(st(e3([e[n],e[o]]),Ls)),a=l2(A),l=ie.image.cropAndResize(t,[[A.startPoint[1]/r,A.startPoint[0]/r,A.endPoint[1]/r,A.endPoint[0]/r]],[0],[Oe,Oe]);if(s&&k.kernels.includes("flipleftright")){let c=ie.image.flipLeftRight(l);ie.dispose(l),l=c}return{box:A,boxSize:a,crop:l}},j3=(e,t,n,o=!1)=>{let r=[];for(let s=0;s{let o=e[te[`${n}EyeUpper0`][f2.upperCenter]][2],r=e[te[`${n}EyeLower0`][f2.lowerCenter]][2],s=(o+r)/2;return t.map((A,a)=>{let l=s;return a===2?l=o:a===4&&(l=r),[A[0],A[1],l]})};async function I3(e,t,n){if(!(G0!=null&&G0.executor))return e;let{box:o,boxSize:r,crop:s}=S3(e,t,y2.leftBounds[0],y2.leftBounds[1],n,!0),{box:A,boxSize:a,crop:l}=S3(e,t,y2.rightBounds[0],y2.rightBounds[1],n,!0),c=ie.concat([s,l]);ie.dispose(s),ie.dispose(l);let x=G0.execute(c);ie.dispose(c);let i=await x.data();ie.dispose(x);let f=i.slice(0,f2.numCoordinates*3),{rawCoords:d,iris:m}=j3(f,o,r,!0),p=i.slice(f2.numCoordinates*3),{rawCoords:g,iris:v}=j3(p,A,a,!1),T=Ws(e);Math.abs(T)<30?(ft(e,d,"left",null),ft(e,g,"right",null)):T<1?ft(e,d,"left",["EyeUpper0","EyeLower0"]):ft(e,g,"right",["EyeUpper0","EyeLower0"]);let y=N3(e,m,"left"),b=N3(e,v,"right");return e.concat(y).concat(b)}var Fs=[[61,146],[146,91],[91,181],[181,84],[84,17],[17,314],[314,405],[405,321],[321,375],[375,291],[61,185],[185,40],[40,39],[39,37],[37,0],[0,267],[267,269],[269,270],[270,409],[409,291],[78,95],[95,88],[88,178],[178,87],[87,14],[14,317],[317,402],[402,318],[318,324],[324,308],[78,191],[191,80],[80,81],[81,82],[82,13],[13,312],[312,311],[311,310],[310,415],[415,308]],Gs=[[263,249],[249,390],[390,373],[373,374],[374,380],[380,381],[381,382],[382,362],[263,466],[466,388],[388,387],[387,386],[386,385],[385,384],[384,398],[398,362]],Bs=[[276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]],Hs=[[474,475],[475,476],[476,477],[477,474]],Vs=[[33,7],[7,163],[163,144],[144,145],[145,153],[153,154],[154,155],[155,133],[33,246],[246,161],[161,160],[160,159],[159,158],[158,157],[157,173],[173,133]],Ds=[[46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]],Zs=[[469,470],[470,471],[471,472],[472,469]],Xs=[[10,338],[338,297],[297,332],[332,284],[284,251],[251,389],[389,356],[356,454],[454,323],[323,361],[361,288],[288,397],[397,365],[365,379],[379,378],[378,400],[400,377],[377,152],[152,148],[148,176],[176,149],[149,150],[150,136],[136,172],[172,58],[58,132],[132,93],[93,234],[234,127],[127,162],[162,21],[21,54],[54,103],[103,67],[67,109],[109,10]];function Ie(e){let t=e.map(n=>n[0]);return t.push(e[e.length-1][1]),t}var qs={lips:Ie(Fs),leftEye:Ie(Gs),leftEyebrow:Ie(Bs),leftIris:Ie(Hs),rightEye:Ie(Vs),rightEyebrow:Ie(Ds),rightIris:Ie(Zs),faceOval:Ie(Xs)},Us=Object.entries(qs).map(([e,t])=>t.map(n=>[n,e])).flat(),Qa=new Map(Us),L2=[61,146,91,181,84,17,314,405,321,375,291,185,40,39,37,0,267,269,270,409,78,95,88,178,87,14,317,402,318,324,308,191,80,81,82,13,312,311,310,415,76,77,90,180,85,16,315,404,320,307,306,184,74,73,72,11,302,303,304,408,62,96,89,179,86,15,316,403,319,325,292,183,42,41,38,12,268,271,272,407],Je=[33,7,163,144,145,153,154,155,133,246,161,160,159,158,157,173,130,25,110,24,23,22,26,112,243,247,30,29,27,28,56,190,226,31,228,229,230,231,232,233,244,113,225,224,223,222,221,189,35,124,46,53,52,65,143,111,117,118,119,120,121,128,245,156,70,63,105,66,107,55,193],Qe=[263,249,390,373,374,380,381,382,362,466,388,387,386,385,384,398,359,255,339,254,253,252,256,341,463,467,260,259,257,258,286,414,446,261,448,449,450,451,452,453,464,342,445,444,443,442,441,413,265,353,276,283,282,295,372,340,346,347,348,349,350,357,465,383,300,293,334,296,336,285,417];async function W3(e,t){var s,A,a,l,c,x,i,f,d,m;let n={lips:await((A=(s=t.filter(p=>p.size===160))==null?void 0:s[0])==null?void 0:A.data()),irisL:await((l=(a=t.filter(p=>p.size===10))==null?void 0:a[0])==null?void 0:l.data()),eyeL:await((x=(c=t.filter(p=>p.size===142))==null?void 0:c[0])==null?void 0:x.data()),irisR:await((f=(i=t.filter(p=>p.size===10))==null?void 0:i[1])==null?void 0:f.data()),eyeR:await((m=(d=t.filter(p=>p.size===142))==null?void 0:d[1])==null?void 0:m.data())};for(let p of Object.values(n))if(!p)return e;let o=Je.reduce((p,g)=>p+=e[g][2],0)/Je.length;for(let p=0;pp+=e[g][2],0)/Qe.length;for(let p=0;pM()-fe.timestamp,o=fe.skipped<(((c=t.face.detector)==null?void 0:c.skipFrames)||0);!t.skipAllowed||!n||!o||fe.boxes.length===0?(fe.boxes=await l3(e,t),fe.timestamp=M(),fe.skipped=0):fe.skipped++;let r=[],s=[],A=0,a=W2;for(let T=0;TZ.shape[Z.shape.length-1]===1).data();if(w.faceScore=Math.round(100*t0[0])/100,w.faceScore<(((m=t.face.detector)==null?void 0:m.minConfidence)||1)){if(y.confidence=w.faceScore,t.face.mesh.keepInvalid){w.box=ot(y,e),w.boxRaw=rt(y,e),w.score=w.boxScore,w.mesh=y.landmarks.map(Z=>[(y.startPoint[0]+y.endPoint[0])/2+(y.endPoint[0]+y.startPoint[0])*Z[0]/c2(),(y.startPoint[1]+y.endPoint[1])/2+(y.endPoint[1]+y.startPoint[1])*Z[1]/c2()]),w.meshRaw=w.mesh.map(Z=>[Z[0]/(e.shape[2]||1),Z[1]/(e.shape[1]||1),(Z[2]||0)/a]);for(let Z of Object.keys(qe))w.annotations[Z]=[w.mesh[qe[Z]]]}}else{let Z=O.find(G=>G.shape[G.shape.length-1]===1404),U=Ce.reshape(Z,[-1,3]),r0=await U.array();Ce.dispose(U),(p=t.face.attention)!=null&&p.enabled?r0=await W3(r0,O):(g=t.face.iris)!=null&&g.enabled&&(r0=await I3(r0,w.tensor,W2)),w.mesh=o3(r0,y,b,z,W2),w.meshRaw=w.mesh.map(G=>[G[0]/(e.shape[2]||0),G[1]/(e.shape[1]||0),(G[2]||0)/a]);for(let G of Object.keys(te))w.annotations[G]=te[G].map(P0=>w.mesh[P0]);w.score=w.faceScore;let P={...s3(w.mesh,y),confidence:y.confidence,landmarks:y.landmarks};w.box=ot(P,e),w.boxRaw=rt(P,e),s.push(P)}Ce.dispose(O)}else{w.box=ot(y,e),w.boxRaw=rt(y,e),w.score=w.boxScore,w.mesh=y.landmarks.map(O=>[(y.startPoint[0]+y.endPoint[0])/2+(y.endPoint[0]+y.startPoint[0])*O[0]/c2(),(y.startPoint[1]+y.endPoint[1])/2+(y.endPoint[1]+y.startPoint[1])*O[1]/c2()]),w.meshRaw=w.mesh.map(O=>[O[0]/(e.shape[2]||0),O[1]/(e.shape[1]||0),(O[2]||0)/a]);for(let O of Object.keys(qe))w.annotations[O]=[w.mesh[qe[O]]]}w.score>(((v=t.face.detector)==null?void 0:v.minConfidence)||1)?r.push(w):Ce.dispose(w.tensor)}return fe.boxes=s,r}async function G3(e){var t,n,o,r,s,A;return k.initial&&(n0=null),((t=e.face.attention)==null?void 0:t.enabled)&&(n0==null?void 0:n0.signature)&&Object.keys(((n=n0==null?void 0:n0.signature)==null?void 0:n.outputs)||{}).length<6&&(n0=null),n0?e.debug&&h("cached model:",n0.modelUrl):(o=e.face.attention)!=null&&o.enabled?n0=await C(e.face.attention.modelPath):n0=await C((r=e.face.mesh)==null?void 0:r.modelPath),W2=n0.executor&&((s=n0==null?void 0:n0.inputs)==null?void 0:s[0].shape)?(A=n0==null?void 0:n0.inputs)==null?void 0:A[0].shape[2]:256,n0}var B3=Ue,H3=O2;var le=D(V());var k0,Le=[],V3=0,D3=0,T5=Number.MAX_SAFE_INTEGER;async function Z3(e){var t;return k.initial&&(k0=null),k0?e.debug&&h("cached model:",k0.modelUrl):k0=await C((t=e.face.description)==null?void 0:t.modelPath),k0}function v5(e){let t=e.image||e.tensor||e;if(!(k0!=null&&k0.inputs[0].shape))return t;let n=le.image.resizeBilinear(t,[k0.inputs[0].shape[2],k0.inputs[0].shape[1]],!1),o=le.mul(n,W.tf255);return le.dispose(n),o}async function P5(e,t,n,o){var a,l,c,x;let r={age:0,gender:"unknown",genderScore:0,descriptor:[]};if(!(k0!=null&&k0.executor))return r;let s=T5<(((a=t.face.description)==null?void 0:a.skipFrames)||0),A=(((l=t.face.description)==null?void 0:l.skipTime)||0)>M()-V3;return t.skipAllowed&&s&&A&&D3===o&&((c=Le==null?void 0:Le[n])==null?void 0:c.age)>0&&((x=Le==null?void 0:Le[n])==null?void 0:x.genderScore)>0?(T5++,Le[n]):(T5=0,new Promise(async i=>{var f;if((f=t.face.description)!=null&&f.enabled){let d=v5(e),m=k0==null?void 0:k0.execute(d);V3=M(),le.dispose(d);let g=await m.find(q=>q.shape[1]===1).data(),v=Math.trunc(200*Math.abs(g[0]-.5))/100;v>(t.face.description.minConfidence||0)&&(r.gender=g[0]<=.5?"female":"male",r.genderScore=Math.min(.99,v));let T=le.argMax(m.find(q=>q.shape[1]===100),1),y=(await T.data())[0];le.dispose(T);let z=await m.find(q=>q.shape[1]===100).data();r.age=Math.round(z[y-1]>z[y+1]?10*y-100*z[y-1]:10*y+100*z[y+1])/10,(Number.isNaN(g[0])||Number.isNaN(z[0]))&&h("faceres error:",{model:k0,result:m});let w=m.find(q=>q.shape[1]===1024),O=w?await w.data():[];r.descriptor=Array.from(O),m.forEach(q=>le.dispose(q))}Le[n]=r,D3=o,i(r)}))}var mt=D(V());var ne,k5=[],Ks=["white","black","asian","indian","other"],Js=[15,23,28,35.5,45.5,55.5,65],X3=0,q3=0,w5=Number.MAX_SAFE_INTEGER;async function U3(e){var t;return k.initial&&(ne=null),ne?e.debug&&h("cached model:",ne.modelUrl):ne=await C((t=e.face.gear)==null?void 0:t.modelPath),ne}async function E5(e,t,n,o){var A,a;if(!ne)return{age:0,gender:"unknown",genderScore:0,race:[]};let r=w5<(((A=t.face.gear)==null?void 0:A.skipFrames)||0),s=(((a=t.face.gear)==null?void 0:a.skipTime)||0)>M()-q3;return t.skipAllowed&&s&&r&&X3===o&&k5[n]?(w5++,k5[n]):(w5=0,new Promise(async l=>{var v,T;if(!(ne!=null&&ne.inputs[0].shape))return;let c={},x=[[0,.1,.9,.9]];c.resize=mt.image.cropAndResize(e,x,[0],[ne.inputs[0].shape[2],ne.inputs[0].shape[1]]);let i={age:0,gender:"unknown",genderScore:0,race:[]};(v=t.face.gear)!=null&&v.enabled&&([c.age,c.gender,c.race]=ne.execute(c.resize,["age_output","gender_output","race_output"]));let f=await c.gender.data();i.gender=f[0]>f[1]?"male":"female",i.genderScore=Math.round(100*(f[0]>f[1]?f[0]:f[1]))/100;let d=await c.race.data();for(let y=0;y(((T=t.face.gear)==null?void 0:T.minConfidence)||.2)&&i.race.push({score:Math.round(100*d[y])/100,race:Ks[y]});i.race.sort((y,b)=>b.score-y.score);let p=Array.from(await c.age.data()).map((y,b)=>[Js[b],y]).sort((y,b)=>b[1]-y[1]),g=p[0][0];for(let y=1;ymt.dispose(c[y])),k5[n]=i,X3=o,q3=M(),l(i)}))}var F=D(V());var Q3=D(V());function pt(e){return[Math.abs(e.endPoint[0]-e.startPoint[0]),Math.abs(e.endPoint[1]-e.startPoint[1])]}function F2(e){return[e.startPoint[0]+(e.endPoint[0]-e.startPoint[0])/2,e.startPoint[1]+(e.endPoint[1]-e.startPoint[1])/2]}function _3(e,t,n){let o=t.shape[1],r=t.shape[2],s=[[e.startPoint[1]/o,e.startPoint[0]/r,e.endPoint[1]/o,e.endPoint[0]/r]];return Q3.image.cropAndResize(t,s,[0],n)}function $3(e,t){let n=[e.startPoint[0]*t[0],e.startPoint[1]*t[1]],o=[e.endPoint[0]*t[0],e.endPoint[1]*t[1]],r=e.palmLandmarks.map(s=>[s[0]*t[0],s[1]*t[1]]);return{startPoint:n,endPoint:o,palmLandmarks:r,confidence:e.confidence}}function ut(e,t=1.5){let n=F2(e),o=pt(e),r=[t*o[0]/2,t*o[1]/2],s=[n[0]-r[0],n[1]-r[1]],A=[n[0]+r[0],n[1]+r[1]];return{startPoint:s,endPoint:A,palmLandmarks:e.palmLandmarks}}function ht(e){let t=F2(e),n=pt(e),r=Math.max(...n)/2,s=[t[0]-r,t[1]-r],A=[t[0]+r,t[1]+r];return{startPoint:s,endPoint:A,palmLandmarks:e.palmLandmarks}}function Qs(e){return e-2*Math.PI*Math.floor((e+Math.PI)/(2*Math.PI))}function en(e,t){let n=Math.PI/2-Math.atan2(-(t[1]-e[1]),t[0]-e[0]);return Qs(n)}var K3=(e,t)=>[[1,0,e],[0,1,t],[0,0,1]];function We(e,t){let n=0;for(let o=0;o[A.x,A.y]),this.anchorsTensor=F.tensor2d(this.anchors),this.inputSize=((s=(r=(o=(n=this==null?void 0:this.model)==null?void 0:n.inputs)==null?void 0:o[0])==null?void 0:r.shape)==null?void 0:s[2])||0,this.inputSizeTensor=F.tensor1d([this.inputSize,this.inputSize]),this.doubleInputSizeTensor=F.tensor1d([this.inputSize*2,this.inputSize*2])}normalizeBoxes(t){let n={};n.boxOffsets=F.slice(t,[0,0],[-1,2]),n.boxSizes=F.slice(t,[0,2],[-1,2]),n.div=F.div(n.boxOffsets,this.inputSizeTensor),n.boxCenterPoints=F.add(n.div,this.anchorsTensor),n.halfBoxSizes=F.div(n.boxSizes,this.doubleInputSizeTensor),n.sub=F.sub(n.boxCenterPoints,n.halfBoxSizes),n.startPoints=F.mul(n.sub,this.inputSizeTensor),n.add=F.add(n.boxCenterPoints,n.halfBoxSizes),n.endPoints=F.mul(n.add,this.inputSizeTensor);let o=F.concat2d([n.startPoints,n.endPoints],1);return Object.keys(n).forEach(r=>F.dispose(n[r])),o}normalizeLandmarks(t,n){let o={};o.reshape=F.reshape(t,[-1,7,2]),o.div=F.div(o.reshape,this.inputSizeTensor),o.landmarks=F.add(o.div,this.anchors[n]?this.anchors[n]:0);let r=F.mul(o.landmarks,this.inputSizeTensor);return Object.keys(o).forEach(s=>F.dispose(o[s])),r}async predict(t,n){var a;let o={};o.resize=F.image.resizeBilinear(t,[this.inputSize,this.inputSize]),o.div=F.div(o.resize,W.tf127),o.image=F.sub(o.div,W.tf1),o.batched=this.model.execute(o.image),o.predictions=F.squeeze(o.batched),o.slice=F.slice(o.predictions,[0,0],[-1,1]),o.sigmoid=F.sigmoid(o.slice),o.scores=F.squeeze(o.sigmoid);let r=await o.scores.data();o.boxes=F.slice(o.predictions,[0,1],[-1,4]),o.norm=this.normalizeBoxes(o.boxes),o.nms=await F.image.nonMaxSuppressionAsync(o.norm,o.scores,3*(((a=n.hand)==null?void 0:a.maxDetected)||1),n.hand.iouThreshold,n.hand.minConfidence);let s=await o.nms.array(),A=[];for(let l of s){let c={};c.box=F.slice(o.norm,[l,0],[1,-1]),c.slice=F.slice(o.predictions,[l,5],[1,14]),c.norm=this.normalizeLandmarks(c.slice,l),c.palmLandmarks=F.reshape(c.norm,[-1,2]);let x=await c.box.data(),i=x.slice(0,2),f=x.slice(2,4),d=await c.palmLandmarks.array(),m={startPoint:i,endPoint:f,palmLandmarks:d,confidence:r[l]},p=$3(m,[(t.shape[2]||1)/this.inputSize,(t.shape[1]||0)/this.inputSize]);A.push(p),Object.keys(c).forEach(g=>F.dispose(c[g]))}return Object.keys(o).forEach(l=>F.dispose(o[l])),A}};var B0=D(V());var tA=5,rn=1.65,sn=[0,5,9,13,17,1,2],nA=0,oA=2,An=0,gt=class{constructor(t,n){R(this,"handDetector");R(this,"handPoseModel");R(this,"inputSize");R(this,"storedBoxes");R(this,"skipped");R(this,"detectedHands");var o,r,s;this.handDetector=t,this.handPoseModel=n,this.inputSize=((s=(r=(o=this.handPoseModel)==null?void 0:o.inputs)==null?void 0:r[0].shape)==null?void 0:s[2])||0,this.storedBoxes=[],this.skipped=Number.MAX_SAFE_INTEGER,this.detectedHands=0}calculateLandmarksBoundingBox(t){let n=t.map(A=>A[0]),o=t.map(A=>A[1]),r=[Math.min(...n),Math.min(...o)],s=[Math.max(...n),Math.max(...o)];return{startPoint:r,endPoint:s}}getBoxForPalmLandmarks(t,n){let o=t.map(s=>S5([...s,1],n)),r=this.calculateLandmarksBoundingBox(o);return ut(ht(r),tA)}getBoxForHandLandmarks(t){let n=this.calculateLandmarksBoundingBox(t),o=ut(ht(n),rn);o.palmLandmarks=[];for(let r=0;r[A[0]*(d[0]-this.inputSize/2),A[1]*(d[1]-this.inputSize/2),A[2]*d[2]]),l=z5(o,[0,0]),c=a.map(d=>[...S5(d,l),d[2]]),x=tn(r),i=[...F2(n),1],f=[We(i,x[0]),We(i,x[1])];return c.map(d=>[Math.trunc(d[0]+f[0]),Math.trunc(d[1]+f[1]),Math.trunc(d[2])])}async estimateHands(t,n){let o=!1,r,s=(n.hand.skipTime||0)>M()-An,A=this.skipped<(n.hand.skipFrames||0);n.skipAllowed&&s&&A&&(r=await this.handDetector.predict(t,n),this.skipped=0),n.skipAllowed&&this.skipped++,r&&r.length>0&&(r.length!==this.detectedHands&&this.detectedHands!==n.hand.maxDetected||!n.hand.landmarks)&&(this.detectedHands=0,this.storedBoxes=[...r],this.storedBoxes.length>0&&(o=!0));let a=[];for(let l=0;l=n.hand.minConfidence/4){let z=B0.reshape(y,[-1,3]),w=await z.array();B0.dispose(y),B0.dispose(z);let O=this.transformRawCoords(w,p,x,m),q=this.getBoxForHandLandmarks(O);this.storedBoxes[l]={...q,confidence:b};let t0={landmarks:O,confidence:b,boxConfidence:c.confidence,fingerConfidence:b,box:{topLeft:q.startPoint,bottomRight:q.endPoint}};a.push(t0)}else this.storedBoxes[l]=null;B0.dispose(y)}else{let x=ut(ht(c),rn),i={confidence:c.confidence,boxConfidence:c.confidence,fingerConfidence:0,box:{topLeft:x.startPoint,bottomRight:x.endPoint},landmarks:[]};a.push(i)}}return this.storedBoxes=this.storedBoxes.filter(l=>l!==null),this.detectedHands=a.length,a.length>n.hand.maxDetected&&(a.length=n.hand.maxDetected),a}};var I0={thumb:0,index:1,middle:2,ring:3,pinky:4,all:[0,1,2,3,4],nameMapping:{0:"thumb",1:"index",2:"middle",3:"ring",4:"pinky"},pointsMapping:{0:[[0,1],[1,2],[2,3],[3,4]],1:[[0,5],[5,6],[6,7],[7,8]],2:[[0,9],[9,10],[10,11],[11,12]],3:[[0,13],[13,14],[14,15],[15,16]],4:[[0,17],[17,18],[18,19],[19,20]]},getName:e=>I0.nameMapping[e],getPoints:e=>I0.pointsMapping[e]},Ge={none:0,half:1,full:2,nameMapping:{0:"none",1:"half",2:"full"},getName:e=>Ge.nameMapping[e]},A0={verticalUp:0,verticalDown:1,horizontalLeft:2,horizontalRight:3,diagonalUpRight:4,diagonalUpLeft:5,diagonalDownRight:6,diagonalDownLeft:7,nameMapping:{0:"verticalUp",1:"verticalDown",2:"horizontalLeft",3:"horizontalRight",4:"diagonalUpRight",5:"diagonalUpLeft",6:"diagonalDownRight",7:"diagonalDownLeft"},getName:e=>A0.nameMapping[e]},Fe=class{constructor(t){R(this,"name");R(this,"curls");R(this,"directions");R(this,"weights");R(this,"weightsRelative");this.name=t,this.curls={},this.directions={},this.weights=[1,1,1,1,1],this.weightsRelative=[1,1,1,1,1]}curl(t,n,o){typeof this.curls[t]=="undefined"&&(this.curls[t]=[]),this.curls[t].push([n,o])}direction(t,n,o){this.directions[t]||(this.directions[t]=[]),this.directions[t].push([n,o])}weight(t,n){this.weights[t]=n;let o=this.weights.reduce((r,s)=>r+s,0);this.weightsRelative=this.weights.map(r=>r*5/o)}matchAgainst(t,n){let o=0;for(let r in t){let s=t[r],A=this.curls[r];if(typeof A=="undefined"){o+=this.weightsRelative[r];continue}for(let[a,l]of A)if(s===a){o+=l*this.weightsRelative[r];break}}for(let r in n){let s=n[r],A=this.directions[r];if(typeof A=="undefined"){o+=this.weightsRelative[r];continue}for(let[a,l]of A)if(s===a){o+=l*this.weightsRelative[r];break}}return o/10}};var{thumb:ce,index:ge,middle:Me,ring:_e,pinky:$e}=I0,{none:de,half:sA,full:xe}=Ge,{verticalUp:m2,verticalDown:h7,horizontalLeft:j5,horizontalRight:AA,diagonalUpRight:aA,diagonalUpLeft:p2,diagonalDownRight:b7,diagonalDownLeft:g7}=A0,Be=new Fe("thumbs up");Be.curl(ce,de,1);Be.direction(ce,m2,1);Be.direction(ce,p2,.25);Be.direction(ce,aA,.25);for(let e of[I0.index,I0.middle,I0.ring,I0.pinky])Be.curl(e,xe,1),Be.direction(e,j5,1),Be.direction(e,AA,1);var f0=new Fe("victory");f0.curl(ce,sA,.5);f0.curl(ce,de,.5);f0.direction(ce,m2,1);f0.direction(ce,p2,1);f0.curl(ge,de,1);f0.direction(ge,m2,.75);f0.direction(ge,p2,1);f0.curl(Me,de,1);f0.direction(Me,m2,1);f0.direction(Me,p2,.75);f0.curl(_e,xe,1);f0.direction(_e,m2,.2);f0.direction(_e,p2,1);f0.direction(_e,j5,.2);f0.curl($e,xe,1);f0.direction($e,m2,.2);f0.direction($e,p2,1);f0.direction($e,j5,.2);f0.weight(ge,2);f0.weight(Me,2);var He=new Fe("point");He.curl(ce,xe,1);He.curl(ge,de,.5);He.curl(Me,xe,.5);He.curl(_e,xe,.5);He.curl($e,xe,.5);He.weight(ge,2);He.weight(Me,2);var Ve=new Fe("middle finger");Ve.curl(ce,de,1);Ve.curl(ge,xe,.5);Ve.curl(Me,xe,.5);Ve.curl(_e,xe,.5);Ve.curl($e,xe,.5);Ve.weight(ge,2);Ve.weight(Me,2);var u2=new Fe("open palm");u2.curl(ce,de,.75);u2.curl(ge,de,.75);u2.curl(Me,de,.75);u2.curl(_e,de,.75);u2.curl($e,de,.75);var an=[Be,f0,He,Ve,u2];var iA=.7,e2={HALF_CURL_START_LIMIT:60,NO_CURL_START_LIMIT:130,DISTANCE_VOTE_POWER:1.1,SINGLE_ANGLE_VOTE_POWER:.9,TOTAL_ANGLE_VOTE_POWER:1.6};function ln(e,t,n,o){let r=(t-o)/(e-n),s=Math.atan(r)*180/Math.PI;return s<=0?s=-s:s>0&&(s=180-s),s}function dn(e,t){if(!e||!t)return[0,0];let n=ln(e[0],e[1],t[0],t[1]);if(e.length===2)return n;let o=ln(e[1],e[2],t[1],t[2]);return[n,o]}function cn(e,t=1){let n=0,o=0,r=0;return e>=75&&e<=105?n=1*t:e>=25&&e<=155?o=1*t:r=1*t,[n,o,r]}function lA(e,t,n){let o=e[0]-t[0],r=e[0]-n[0],s=t[0]-n[0],A=e[1]-t[1],a=e[1]-n[1],l=t[1]-n[1],c=e[2]-t[2],x=e[2]-n[2],i=t[2]-n[2],f=Math.sqrt(o*o+A*A+c*c),d=Math.sqrt(r*r+a*a+x*x),m=Math.sqrt(s*s+l*l+i*i),p=(m*m+f*f-d*d)/(2*m*f);p>1?p=1:p<-1&&(p=-1);let g=Math.acos(p);g=57.2958*g%180;let v;return g>e2.NO_CURL_START_LIMIT?v=Ge.none:g>e2.HALF_CURL_START_LIMIT?v=Ge.half:v=Ge.full,v}function xn(e,t,n,o){let r;return o===Math.abs(e)?e>0?r=A0.horizontalLeft:r=A0.horizontalRight:o===Math.abs(t)?t>0?r=A0.horizontalLeft:r=A0.horizontalRight:n>0?r=A0.horizontalLeft:r=A0.horizontalRight,r}function yn(e,t,n,o){let r;return o===Math.abs(e)?e<0?r=A0.verticalDown:r=A0.verticalUp:o===Math.abs(t)?t<0?r=A0.verticalDown:r=A0.verticalUp:n<0?r=A0.verticalDown:r=A0.verticalUp,r}function cA(e,t,n,o,r,s,A,a){let l,c=yn(e,t,n,o),x=xn(r,s,A,a);return c===A0.verticalUp?x===A0.horizontalLeft?l=A0.diagonalUpLeft:l=A0.diagonalUpRight:x===A0.horizontalLeft?l=A0.diagonalDownLeft:l=A0.diagonalDownRight,l}function dA(e,t,n,o){let r=e[0]-t[0],s=e[0]-n[0],A=t[0]-n[0],a=e[1]-t[1],l=e[1]-n[1],c=t[1]-n[1],x=Math.max(Math.abs(r),Math.abs(s),Math.abs(A)),i=Math.max(Math.abs(a),Math.abs(l),Math.abs(c)),f=0,d=0,m=0,p=i/(x+1e-5);p>1.5?f+=e2.DISTANCE_VOTE_POWER:p>.66?d+=e2.DISTANCE_VOTE_POWER:m+=e2.DISTANCE_VOTE_POWER;let g=Math.sqrt(r*r+a*a),v=Math.sqrt(s*s+l*l),T=Math.sqrt(A*A+c*c),y=Math.max(g,v,T),b=e[0],z=e[1],w=n[0],O=n[1];y===g?(w=n[0],O=n[1]):y===T&&(b=t[0],z=t[1]);let Z=dn([b,z],[w,O]),U=cn(Z,e2.TOTAL_ANGLE_VOTE_POWER);f+=U[0],d+=U[1],m+=U[2];for(let P of o){let G=cn(P,e2.SINGLE_ANGLE_VOTE_POWER);f+=G[0],d+=G[1],m+=G[2]}let r0;return f===Math.max(f,d,m)?r0=yn(l,a,c,i):m===Math.max(d,m)?r0=xn(s,r,A,x):r0=cA(l,a,c,i,s,r,A,x),r0}function fn(e){let t=[],n=[],o=[],r=[];if(!e)return{curls:o,directions:r};for(let s of I0.all){let A=I0.getPoints(s),a=[],l=[];for(let c of A){let x=e[c[0]],i=e[c[1]],f=dn(x,i),d=f[0],m=f[1];a.push(d),l.push(m)}t.push(a),n.push(l)}for(let s of I0.all){let A=s===I0.thumb?1:0,a=I0.getPoints(s),l=e[a[A][0]],c=e[a[A+1][1]],x=e[a[3][1]],i=lA(l,c,x),f=dA(l,c,x,t[s].slice(A));o[s]=i,r[s]=f}return{curls:o,directions:r}}function Mt(e){if(!e||e.length===0)return null;let t=fn(e),n={};for(let o of I0.all)n[I0.getName(o)]={curl:Ge.getName(t.curls[o]),direction:A0.getName(t.directions[o])};return n}function mn(e){let t=[];if(!e||e.length===0)return t;let n=fn(e);for(let o of an){let r=o.matchAgainst(n.curls,n.directions);r>=iA&&t.push({name:o.name,confidence:r})}return t}var pn={thumb:[1,2,3,4],index:[5,6,7,8],middle:[9,10,11,12],ring:[13,14,15,16],pinky:[17,18,19,20],palm:[0]},t2,n2,un;async function O5(e,t){let n=await un.estimateHands(e,t);if(!n)return[];let o=[];for(let r=0;rn[r].landmarks[i]);let A=n[r].landmarks,a=[Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,0,0],l=[0,0,0,0];if(A&&A.length>0){for(let x of A)x[0]a[2]&&(a[2]=x[0]),x[1]>a[3]&&(a[3]=x[1]);a[2]-=a[0],a[3]-=a[1],l=[a[0]/(e.shape[2]||0),a[1]/(e.shape[1]||0),a[2]/(e.shape[2]||0),a[3]/(e.shape[1]||0)]}else a=n[r].box?[Math.trunc(Math.max(0,n[r].box.topLeft[0])),Math.trunc(Math.max(0,n[r].box.topLeft[1])),Math.trunc(Math.min(e.shape[2]||0,n[r].box.bottomRight[0])-Math.max(0,n[r].box.topLeft[0])),Math.trunc(Math.min(e.shape[1]||0,n[r].box.bottomRight[1])-Math.max(0,n[r].box.topLeft[1]))]:[0,0,0,0],l=[n[r].box.topLeft[0]/(e.shape[2]||0),n[r].box.topLeft[1]/(e.shape[1]||0),(n[r].box.bottomRight[0]-n[r].box.topLeft[0])/(e.shape[2]||0),(n[r].box.bottomRight[1]-n[r].box.topLeft[1])/(e.shape[1]||0)];let c=Mt(A);o.push({id:r,score:Math.round(100*n[r].confidence)/100,boxScore:Math.round(100*n[r].boxConfidence)/100,fingerScore:Math.round(100*n[r].fingerConfidence)/100,label:"hand",box:a,boxRaw:l,keypoints:A,annotations:s,landmarks:c})}return o}async function I5(e){var n,o;k.initial&&(t2=null,n2=null),!t2||!n2?[t2,n2]=await Promise.all([e.hand.enabled?C((n=e.hand.detector)==null?void 0:n.modelPath):null,e.hand.landmarks?C((o=e.hand.skeleton)==null?void 0:o.modelPath):null]):(e.debug&&h("cached model:",t2.modelUrl),e.debug&&h("cached model:",n2.modelUrl));let t=t2?new bt(t2):void 0;return t&&n2&&(un=new gt(t,n2)),[t2,n2]}var Q=D(V());var c0=[null,null],xA=["StatefulPartitionedCall/Postprocessor/Slice","StatefulPartitionedCall/Postprocessor/ExpandDims_1"],De=[[0,0],[0,0]],yA=["hand","fist","pinch","point","face","tip","pinchtip"],bn=4,gn=1.6,fA=512,mA=1.4,Tt=Number.MAX_SAFE_INTEGER,C5=0,Te=[0,0],l0={boxes:[],hands:[]},Mn={thumb:[1,2,3,4],index:[5,6,7,8],middle:[9,10,11,12],ring:[13,14,15,16],pinky:[17,18,19,20],base:[0],palm:[0,17,13,9,5,1,0]};async function Tn(e){var t;if(k.initial&&(c0[0]=null),c0[0])e.debug&&h("cached model:",c0[0].modelUrl);else{vt(["tensorlistreserve","enter","tensorlistfromtensor","merge","loopcond","switch","exit","tensorliststack","nextiteration","tensorlistsetitem","tensorlistgetitem","reciprocal","shape","split","where"],e),c0[0]=await C((t=e.hand.detector)==null?void 0:t.modelPath);let n=c0[0].executor?Object.values(c0[0].modelSignature.inputs):void 0;De[0][0]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[1].size):0,De[0][1]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[2].size):0}return c0[0]}async function vn(e){var t;if(k.initial&&(c0[1]=null),c0[1])e.debug&&h("cached model:",c0[1].modelUrl);else{c0[1]=await C((t=e.hand.skeleton)==null?void 0:t.modelPath);let n=c0[1].executor?Object.values(c0[1].modelSignature.inputs):void 0;De[1][0]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[1].size):0,De[1][1]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[2].size):0}return c0[1]}async function pA(e,t){let n=[];if(!e||!c0[0])return n;let o={},r=(e.shape[2]||1)/(e.shape[1]||1),s=Math.min(Math.round((e.shape[1]||0)/8)*8,fA),A=Math.round(s*r/8)*8;o.resize=Q.image.resizeBilinear(e,[s,A]),o.cast=Q.cast(o.resize,"int32"),[o.rawScores,o.rawBoxes]=await c0[0].executeAsync(o.cast,xA),o.boxes=Q.squeeze(o.rawBoxes,[0,2]),o.scores=Q.squeeze(o.rawScores,[0]);let a=Q.unstack(o.scores,1);Q.dispose(a[bn]),a.splice(bn,1),o.filtered=Q.stack(a,1),Q.dispose(a),o.max=Q.max(o.filtered,1),o.argmax=Q.argMax(o.filtered,1);let l=0;o.nms=await Q.image.nonMaxSuppressionAsync(o.boxes,o.max,(t.hand.maxDetected||0)+1,t.hand.iouThreshold||0,t.hand.minConfidence||1);let c=await o.nms.data(),x=await o.max.data(),i=await o.argmax.data();for(let f of Array.from(c)){let d=Q.slice(o.boxes,f,1),m=await d.data();Q.dispose(d);let p=[m[1],m[0],m[3]-m[1],m[2]-m[0]],g=lt(p,mA),v=[Math.trunc(p[0]*Te[0]),Math.trunc(p[1]*Te[1]),Math.trunc(p[2]*Te[0]),Math.trunc(p[3]*Te[1])],T=x[f],y=yA[i[f]],b={id:l++,score:T,box:v,boxRaw:g,label:y};n.push(b)}return Object.keys(o).forEach(f=>Q.dispose(o[f])),n.sort((f,d)=>d.score-f.score),n.length>(t.hand.maxDetected||1)&&(n.length=t.hand.maxDetected||1),n}async function L5(e,t,n){let o={id:t.id,score:Math.round(100*t.score)/100,boxScore:Math.round(100*t.score)/100,fingerScore:0,box:t.box,boxRaw:t.boxRaw,label:t.label,keypoints:[],landmarks:{},annotations:{}};if(e&&c0[1]&&n.hand.landmarks&&t.score>(n.hand.minConfidence||0)){let r={},s=[t.boxRaw[1],t.boxRaw[0],t.boxRaw[3]+t.boxRaw[1],t.boxRaw[2]+t.boxRaw[0]];r.crop=Q.image.cropAndResize(e,[s],[0],[De[1][0],De[1][1]],"bilinear"),r.div=Q.div(r.crop,W.tf255),[r.score,r.keypoints]=c0[1].execute(r.div,["Identity_1","Identity"]);let A=(await r.score.data())[0],a=(100-Math.trunc(100/(1+Math.exp(A))))/100;if(a>=(n.hand.minConfidence||0)){o.fingerScore=a,r.reshaped=Q.reshape(r.keypoints,[-1,3]);let x=(await r.reshaped.array()).map(i=>[i[0]/De[1][1],i[1]/De[1][0],i[2]||0]).map(i=>[i[0]*t.boxRaw[2],i[1]*t.boxRaw[3],i[2]||0]);o.keypoints=x.map(i=>[Te[0]*(i[0]+t.boxRaw[0]),Te[1]*(i[1]+t.boxRaw[1]),i[2]||0]),o.landmarks=Mt(o.keypoints);for(let i of Object.keys(Mn))o.annotations[i]=Mn[i].map(f=>o.landmarks&&o.keypoints[f]?o.keypoints[f]:null)}Object.keys(r).forEach(l=>Q.dispose(r[l]))}return o}async function W5(e,t){var r,s;if(!((r=c0[0])!=null&&r.executor)||!((s=c0[1])!=null&&s.executor)||!c0[0].inputs[0].shape||!c0[1].inputs[0].shape)return[];Te=[e.shape[2]||0,e.shape[1]||0],Tt++;let n=(t.hand.skipTime||0)>M()-C5,o=Tt<(t.hand.skipFrames||0);return t.skipAllowed&&n&&o?l0.hands:new Promise(async A=>{let a=3*(t.hand.skipTime||0)>M()-C5,l=Tt<3*(t.hand.skipFrames||0);t.skipAllowed&&l0.hands.length===t.hand.maxDetected?l0.hands=await Promise.all(l0.boxes.map(x=>L5(e,x,t))):t.skipAllowed&&a&&l&&l0.hands.length>0?l0.hands=await Promise.all(l0.boxes.map(x=>L5(e,x,t))):(l0.boxes=await pA(e,t),C5=M(),l0.hands=await Promise.all(l0.boxes.map(x=>L5(e,x,t))),Tt=0);let c=[...l0.boxes];if(l0.boxes.length=0,t.cacheSensitivity>0)for(let x=0;x.05&&i.box[3]/(e.shape[1]||1)>.05&&l0.hands[x].fingerScore&&l0.hands[x].fingerScore>(t.hand.minConfidence||0)){let f=lt(i.box,gn),d=lt(i.boxRaw,gn);l0.boxes.push({...c[x],box:f,boxRaw:d})}}for(let x=0;xM()-kn;return t.skipAllowed&&s&&r&&Rn===o&&F5[n]?(wn++,F5[n]):new Promise(async l=>{var x;let c=[];if(((x=t.face.insightface)==null?void 0:x.enabled)&&(H0==null?void 0:H0.inputs[0].shape)){let i={};i.crop=Pt.image.resizeBilinear(e,[H0.inputs[0].shape[2],H0.inputs[0].shape[1]],!1),i.data=H0.execute(i.crop);let f=await i.data.data();c=Array.from(f),Object.keys(i).forEach(d=>Pt.dispose(i[d]))}F5[n]=c,Rn=o,kn=M(),l(c)})}var kt=D(V());var T0,Rt=[],B5=Number.MAX_SAFE_INTEGER,Sn=0,jn=0;async function Nn(e){var t;return k.initial&&(T0=null),T0?e.debug&&h("cached model:",T0.modelUrl):T0=await C((t=e.face.liveness)==null?void 0:t.modelPath),T0}async function H5(e,t,n,o){var A,a;if(!(T0!=null&&T0.executor))return 0;let r=(((A=t.face.liveness)==null?void 0:A.skipTime)||0)>M()-jn,s=B5<(((a=t.face.liveness)==null?void 0:a.skipFrames)||0);return t.skipAllowed&&r&&s&&Sn===o&&Rt[n]?(B5++,Rt[n]):(B5=0,new Promise(async l=>{let c=kt.image.resizeBilinear(e,[T0!=null&&T0.inputs[0].shape?T0.inputs[0].shape[2]:0,T0!=null&&T0.inputs[0].shape?T0.inputs[0].shape[1]:0],!1),x=T0==null?void 0:T0.execute(c),i=(await x.data())[0];Rt[n]=Math.round(100*i)/100,Sn=o,jn=M(),kt.dispose([c,x]),l(Rt[n])}))}var o0=D(V());var w0;async function V5(e){return!w0||k.initial?w0=await C(e.segmentation.modelPath):e.debug&&h("cached model:",w0.modelUrl),w0}async function In(e,t){var r;if(w0||(w0=await V5(t)),!(w0!=null&&w0.executor)||!((r=w0==null?void 0:w0.inputs)!=null&&r[0].shape))return null;let n={};n.resize=o0.image.resizeBilinear(e,[w0.inputs[0].shape?w0.inputs[0].shape[1]:0,w0.inputs[0].shape?w0.inputs[0].shape[2]:0],!1),n.norm=o0.div(n.resize,W.tf255),n.res=w0.execute(n.norm),n.squeeze=o0.squeeze(n.res,0),[n.bgRaw,n.fgRaw]=o0.unstack(n.squeeze,2),n.fg=o0.softmax(n.fgRaw),n.mul=o0.mul(n.fg,W.tf255),n.expand=o0.expandDims(n.mul,2),n.output=o0.image.resizeBilinear(n.expand,[e.shape[1],e.shape[2]]);let o;switch(t.segmentation.mode||"default"){case"default":n.input=o0.squeeze(e),n.concat=o0.concat([n.input,n.output],-1),o=o0.cast(n.concat,"int32");break;case"alpha":o=o0.cast(n.output,"int32");break;default:o=o0.tensor(0)}return Object.keys(n).forEach(s=>o0.dispose(n[s])),o}var wt=D(V());var V0,D5=[],Ln=0,Wn=0,Fn=Number.MAX_SAFE_INTEGER;async function Gn(e){var t;return k.initial&&(V0=null),V0?e.debug&&h("cached model:",V0.modelUrl):V0=await C((t=e.face.mobilefacenet)==null?void 0:t.modelPath),V0}async function Z5(e,t,n,o){var A,a;if(!(V0!=null&&V0.executor))return[];let r=Fn<(((A=t.face.mobilefacenet)==null?void 0:A.skipFrames)||0),s=(((a=t.face.mobilefacenet)==null?void 0:a.skipTime)||0)>M()-Wn;return t.skipAllowed&&s&&r&&Ln===o&&D5[n]?(Fn++,D5[n]):new Promise(async l=>{var x;let c=[];if(((x=t.face.mobilefacenet)==null?void 0:x.enabled)&&(V0==null?void 0:V0.inputs[0].shape)){let i={};i.crop=wt.image.resizeBilinear(e,[V0.inputs[0].shape[2],V0.inputs[0].shape[1]],!1),i.data=V0.execute(i.crop);let f=await i.data.data();c=Array.from(f),Object.keys(i).forEach(d=>wt.dispose(i[d]))}D5[n]=c,Ln=o,Wn=M(),l(c)})}var Xn=D(V());var G2={};we(G2,{connected:()=>zt,horizontal:()=>X5,kpt:()=>Et,relative:()=>U5,vertical:()=>q5});var Et=["nose","leftEye","rightEye","leftEar","rightEar","leftShoulder","rightShoulder","leftElbow","rightElbow","leftWrist","rightWrist","leftHip","rightHip","leftKnee","rightKnee","leftAnkle","rightAnkle"],X5=[["leftEye","rightEye"],["leftEar","rightEar"],["leftShoulder","rightShoulder"],["leftElbow","rightElbow"],["leftWrist","rightWrist"],["leftHip","rightHip"],["leftKnee","rightKnee"],["leftAnkle","rightAnkle"]],q5=[["leftKnee","leftShoulder"],["rightKnee","rightShoulder"],["leftAnkle","leftKnee"],["rightAnkle","rightKnee"]],U5=[[["leftHip","rightHip"],["leftShoulder","rightShoulder"]],[["leftElbow","rightElbow"],["leftShoulder","rightShoulder"]]],zt={leftLeg:["leftHip","leftKnee","leftAnkle"],rightLeg:["rightHip","rightKnee","rightAnkle"],torso:["leftShoulder","rightShoulder","rightHip","leftHip","leftShoulder"],leftArm:["leftShoulder","leftElbow","leftWrist"],rightArm:["rightShoulder","rightElbow","rightWrist"],head:[]};var Ze=D(V()),Hn=.005,D0={keypoints:[],padding:[[0,0],[0,0],[0,0],[0,0]]};function Y5(e){for(let t of X5){let n=e.keypoints.findIndex(r=>r.part===t[0]),o=e.keypoints.findIndex(r=>r.part===t[1]);if(e.keypoints[n]&&e.keypoints[o]&&e.keypoints[n].position[0]r&&r.part===t[0]),o=e.keypoints.findIndex(r=>r&&r.part===t[1]);e.keypoints[n]&&e.keypoints[o]&&e.keypoints[n].position[1]c&&c.part===t[0]),r=e.keypoints.findIndex(c=>c&&c.part===t[1]),s=e.keypoints.findIndex(c=>c&&c.part===n[0]),A=e.keypoints.findIndex(c=>c&&c.part===n[1]);if(!e.keypoints[s]||!e.keypoints[A])continue;let a=e.keypoints[o]?[Math.abs(e.keypoints[s].position[0]-e.keypoints[o].position[0]),Math.abs(e.keypoints[A].position[0]-e.keypoints[o].position[0])]:[0,0],l=e.keypoints[r]?[Math.abs(e.keypoints[A].position[0]-e.keypoints[r].position[0]),Math.abs(e.keypoints[s].position[0]-e.keypoints[r].position[0])]:[0,0];if(a[0]>a[1]||l[0]>l[1]){let c=e.keypoints[o];e.keypoints[o]=e.keypoints[r],e.keypoints[r]=c}}}function Vn(e){for(let t=0;te.shape[1]?Math.trunc((e.shape[2]-e.shape[1])/2):0,e.shape[2]>e.shape[1]?Math.trunc((e.shape[2]-e.shape[1])/2):0],[e.shape[1]>e.shape[2]?Math.trunc((e.shape[1]-e.shape[2])/2):0,e.shape[1]>e.shape[2]?Math.trunc((e.shape[1]-e.shape[2])/2):0],[0,0]],n.pad=Ze.pad(e,D0.padding),n.resize=Ze.image.resizeBilinear(n.pad,[t,t]);let o=Ze.cast(n.resize,"int32");return Object.keys(n).forEach(A=>Ze.dispose(n[A])),o}function Zn(e,t){e.keypoints=e.keypoints.filter(o=>o==null?void 0:o.position);for(let o of e.keypoints)o.position=[o.position[0]*(t[0]+D0.padding[2][0]+D0.padding[2][1])/t[0]-D0.padding[2][0],o.position[1]*(t[1]+D0.padding[1][0]+D0.padding[1][1])/t[1]-D0.padding[1][0]],o.positionRaw=[o.position[0]/t[0],o.position[1]/t[1]];let n=be(e.keypoints.map(o=>o.position),t);return e.box=n.box,e.boxRaw=n.boxRaw,e}var m0,St=0,K5=Number.MAX_SAFE_INTEGER,o2={boxes:[],bodies:[],last:0};async function qn(e){var t;return k.initial&&(m0=null),m0?e.debug&&h("cached model:",m0.modelUrl):(vt(["size"],e),m0=await C(e.body.modelPath)),St=(m0==null?void 0:m0.executor)&&((t=m0==null?void 0:m0.inputs)==null?void 0:t[0].shape)?m0.inputs[0].shape[2]:0,St<64&&(St=256),m0}function hA(e,t,n){let o=e[0][0],r=[],s=0;for(let x=0;xt.body.minConfidence){let i=[o[x][1],o[x][0]];r.push({score:Math.round(100*s)/100,part:Et[x],positionRaw:i,position:[Math.round((n.shape[2]||0)*i[0]),Math.round((n.shape[1]||0)*i[1])]})}s=r.reduce((x,i)=>i.score>x?i.score:x,0);let A=[],a=be(r.map(x=>x.position),[n.shape[2],n.shape[1]]),l={};for(let[x,i]of Object.entries(zt)){let f=[];for(let d=0;dg.part===i[d]),p=r.find(g=>g.part===i[d+1]);m&&p&&m.score>(t.body.minConfidence||0)&&p.score>(t.body.minConfidence||0)&&f.push([m.position,p.position])}l[x]=f}let c={id:0,score:s,box:a.box,boxRaw:a.boxRaw,keypoints:r,annotations:l};return Y5(c),A.push(c),A}function bA(e,t,n){let o=[];for(let r=0;rt.body.minConfidence){let a=[];for(let i=0;i<17;i++){let f=s[3*i+2];if(f>t.body.minConfidence){let d=[s[3*i+1],s[3*i+0]];a.push({part:Et[i],score:Math.round(100*f)/100,positionRaw:d,position:[Math.round((n.shape[2]||0)*d[0]),Math.round((n.shape[1]||0)*d[1])]})}}let l=be(a.map(i=>i.position),[n.shape[2],n.shape[1]]),c={};for(let[i,f]of Object.entries(zt)){let d=[];for(let m=0;mv.part===f[m]),g=a.find(v=>v.part===f[m+1]);p&&g&&p.score>(t.body.minConfidence||0)&&g.score>(t.body.minConfidence||0)&&d.push([p.position,g.position])}c[i]=d}let x={id:r,score:A,box:l.box,boxRaw:l.boxRaw,keypoints:[...a],annotations:c};Y5(x),o.push(x)}}return o.sort((r,s)=>s.score-r.score),o.length>t.body.maxDetected&&(o.length=t.body.maxDetected),o}async function J5(e,t){var r;if(!(m0!=null&&m0.executor)||!((r=m0==null?void 0:m0.inputs)!=null&&r[0].shape))return[];t.skipAllowed||(o2.boxes.length=0),K5++;let n=(t.body.skipTime||0)>M()-o2.last,o=K5<(t.body.skipFrames||0);return t.skipAllowed&&n&&o?o2.bodies:new Promise(async s=>{let A={};K5=0,A.input=Dn(e,St),A.res=m0==null?void 0:m0.execute(A.input),o2.last=M();let a=await A.res.array();o2.bodies=A.res.shape[2]===17?hA(a,t,e):bA(a,t,e);for(let l of o2.bodies)Zn(l,[e.shape[2]||1,e.shape[1]||1]),Vn(l.keypoints);Object.keys(A).forEach(l=>Xn.dispose(A[l])),s(o2.bodies)})}var Z0=D(V());var oe,jt=[],Yn=0,Q5=Number.MAX_SAFE_INTEGER,Ot=0,Nt=2.5;async function Kn(e){if(!oe||k.initial){oe=await C(e.object.modelPath);let t=oe!=null&&oe.executor?Object.values(oe.modelSignature.inputs):void 0;Ot=Array.isArray(t)?parseInt(t[0].tensorShape.dim[2].size):416}else e.debug&&h("cached model:",oe.modelUrl);return oe}async function gA(e,t,n){let o=0,r=[],s=Ot;for(let c of[1,2,4]){let x=c*13,i=Z0.squeeze(e.find(v=>v.shape[1]===x**2&&(v.shape[2]||0)===x2.length)),f=await i.array(),d=Z0.squeeze(e.find(v=>v.shape[1]===x**2&&(v.shape[2]||0)(n.object.minConfidence||0)&&T!==61){let b=(.5+Math.trunc(v%x))/x,z=(.5+Math.trunc(v/x))/x,w=g[v].map(G=>G*(x/c/s)),[O,q]=[b-Nt/c*w[0],z-Nt/c*w[1]],[t0,Z]=[b+Nt/c*w[2]-O,z+Nt/c*w[3]-q],U=[O,q,t0,Z];U=U.map(G=>Math.max(0,Math.min(G,1)));let r0=[U[0]*t[0],U[1]*t[1],U[2]*t[0],U[3]*t[1]],P={id:o++,score:Math.round(100*y)/100,class:T+1,label:x2[T].label,box:r0.map(G=>Math.trunc(G)),boxRaw:U};r.push(P)}}Z0.dispose([i,d,m,p])}let A=r.map(c=>[c.boxRaw[1],c.boxRaw[0],c.boxRaw[3],c.boxRaw[2]]),a=r.map(c=>c.score),l=[];if(A&&A.length>0){let c=await Z0.image.nonMaxSuppressionAsync(A,a,n.object.maxDetected,n.object.iouThreshold,n.object.minConfidence);l=await c.data(),Z0.dispose(c)}return r=r.filter((c,x)=>l.includes(x)).sort((c,x)=>x.score-c.score),r}async function _5(e,t){if(!(oe!=null&&oe.executor))return[];let n=(t.object.skipTime||0)>M()-Yn,o=Q5<(t.object.skipFrames||0);return t.skipAllowed&&n&&o&&jt.length>0?(Q5++,jt):(Q5=0,!k.kernels.includes("mod")||!k.kernels.includes("sparsetodense")?jt:new Promise(async r=>{let s=[e.shape[2]||0,e.shape[1]||0],A=Z0.image.resizeBilinear(e,[Ot,Ot],!1),a=Z0.div(A,W.tf255),l=Z0.transpose(a,[0,3,1,2]),c;t.object.enabled&&(c=oe.execute(l)),Yn=M();let x=await gA(c,s,t);jt=x,Z0.dispose([A,a,l,...c]),r(x)}))}var C0=D(V());var H2=["nose","leftEye","rightEye","leftEar","rightEar","leftShoulder","rightShoulder","leftElbow","rightElbow","leftWrist","rightWrist","leftHip","rightHip","leftKnee","rightKnee","leftAnkle","rightAnkle"],MA=H2.length,B2=H2.reduce((e,t,n)=>(e[t]=n,e),{}),TA=[["leftHip","leftShoulder"],["leftElbow","leftShoulder"],["leftElbow","leftWrist"],["leftHip","leftKnee"],["leftKnee","leftAnkle"],["rightHip","rightShoulder"],["rightElbow","rightShoulder"],["rightElbow","rightWrist"],["rightHip","rightKnee"],["rightKnee","rightAnkle"],["leftShoulder","rightShoulder"],["leftHip","rightHip"]],e4=TA.map(([e,t])=>[B2[e],B2[t]]),Qn=[["nose","leftEye"],["leftEye","leftEar"],["nose","rightEye"],["rightEye","rightEar"],["nose","leftShoulder"],["leftShoulder","leftElbow"],["leftElbow","leftWrist"],["leftShoulder","leftHip"],["leftHip","leftKnee"],["leftKnee","leftAnkle"],["nose","rightShoulder"],["rightShoulder","rightElbow"],["rightElbow","rightWrist"],["rightShoulder","rightHip"],["rightHip","rightKnee"],["rightKnee","rightAnkle"]];function _n(e){let t=e.reduce(({maxX:n,maxY:o,minX:r,minY:s},{position:{x:A,y:a}})=>({maxX:Math.max(n,A),maxY:Math.max(o,a),minX:Math.min(r,A),minY:Math.min(s,a)}),{maxX:Number.NEGATIVE_INFINITY,maxY:Number.NEGATIVE_INFINITY,minX:Number.POSITIVE_INFINITY,minY:Number.POSITIVE_INFINITY});return[t.minX,t.minY,t.maxX-t.minX,t.maxY-t.minY]}function $n(e,[t,n],[o,r]){let s=t/o,A=n/r,a=(c,x)=>({id:x,score:c.score,boxRaw:[c.box[0]/r,c.box[1]/o,c.box[2]/r,c.box[3]/o],box:[Math.trunc(c.box[0]*A),Math.trunc(c.box[1]*s),Math.trunc(c.box[2]*A),Math.trunc(c.box[3]*s)],keypoints:c.keypoints.map(({score:i,part:f,position:d})=>({score:i,part:f,position:[Math.trunc(d.x*A),Math.trunc(d.y*s)],positionRaw:[d.x/o,d.y/o]})),annotations:{}});return e.map((c,x)=>a(c,x))}var It=class{constructor(t,n){R(this,"priorityQueue");R(this,"numberOfElements");R(this,"getElementValue");this.priorityQueue=new Array(t),this.numberOfElements=-1,this.getElementValue=n}enqueue(t){this.priorityQueue[++this.numberOfElements]=t,this.swim(this.numberOfElements)}dequeue(){let t=this.priorityQueue[0];return this.exchange(0,this.numberOfElements--),this.sink(0),this.priorityQueue[this.numberOfElements+1]=null,t}empty(){return this.numberOfElements===-1}size(){return this.numberOfElements+1}all(){return this.priorityQueue.slice(0,this.numberOfElements+1)}max(){return this.priorityQueue[0]}swim(t){for(;t>0&&this.less(Math.floor(t/2),t);)this.exchange(t,Math.floor(t/2)),t=Math.floor(t/2)}sink(t){for(;2*t<=this.numberOfElements;){let n=2*t;if(nn?n:e}function eo(e,t,n,o){let r=n-e,s=o-t;return r*r+s*s}function n1(e,t){return{x:e.x+t.x,y:e.y+t.y}}var X0,PA=["MobilenetV1/offset_2/BiasAdd","MobilenetV1/heatmap_2/BiasAdd","MobilenetV1/displacement_fwd_2/BiasAdd","MobilenetV1/displacement_bwd_2/BiasAdd"],Ct=1,h2=16,RA=50**2;function to(e,t,n,o,r,s,A=2){let a=v=>({y:s.get(v.y,v.x,e),x:s.get(v.y,v.x,s.shape[2]/2+e)}),l=(v,T,y)=>({y:t1(Math.round(v.y/h2),0,T-1),x:t1(Math.round(v.x/h2),0,y-1)}),[c,x]=o.shape,i=l(t.position,c,x),f=a(i),m=n1(t.position,f);for(let v=0;v[B2[f],B2[d]]),A=s.map(([,f])=>f),a=s.map(([f])=>f),l=t.shape[2],c=A.length,x=new Array(l),i=e1(e.part,h2,n);x[e.part.id]={score:e.score,part:H2[e.part.id],position:i};for(let f=c-1;f>=0;--f){let d=A[f],m=a[f];x[d]&&!x[m]&&(x[m]=to(f,x[d],m,t,n,r))}for(let f=0;ft){a=!1;break}if(!a)break}return a}function EA(e,t){let[n,o,r]=t.shape,s=new It(n*o*r,({score:A})=>A);for(let A=0;A{var A;let s=(A=r[o])==null?void 0:A.position;return s?eo(n,t,s.y,s.x)<=RA:!1})}function zA(e,t){return t.reduce((o,{position:r,score:s},A)=>(no(e,r,A)||(o+=s),o),0)/t.length}function SA(e,t,n,o,r,s){let A=[],a=EA(s,t);for(;A.lengthd.score>s);let i=zA(A,x),f=_n(x);i>s&&A.push({keypoints:x,box:f,score:Math.round(100*i)/100})}return A}async function o1(e,t){if(!(X0!=null&&X0.executor))return[];let n=C0.tidy(()=>{if(!X0.inputs[0].shape)return[];let A=C0.image.resizeBilinear(e,[X0.inputs[0].shape[2],X0.inputs[0].shape[1]]),a=C0.sub(C0.div(C0.cast(A,"float32"),127.5),1),c=X0.execute(a,PA).map(x=>C0.squeeze(x,[0]));return c[1]=C0.sigmoid(c[1]),c}),o=await Promise.all(n.map(A=>A.buffer()));for(let A of n)C0.dispose(A);let r=SA(o[0],o[1],o[2],o[3],t.body.maxDetected,t.body.minConfidence);return X0.inputs[0].shape?$n(r,[e.shape[1],e.shape[2]],[X0.inputs[0].shape[2],X0.inputs[0].shape[1]]):[]}async function oo(e){return!X0||k.initial?X0=await C(e.body.modelPath):e.debug&&h("cached model:",X0.modelUrl),X0}var B=D(V());var me,jA=["fgr","pha","r1o","r2o","r3o","r4o"],p0={},s1=0;function Ao(e){B.dispose([p0.r1i,p0.r2i,p0.r3i,p0.r4i,p0.downsample_ratio]),p0.r1i=B.tensor(0),p0.r2i=B.tensor(0),p0.r3i=B.tensor(0),p0.r4i=B.tensor(0),s1=e.segmentation.ratio||.5,p0.downsample_ratio=B.tensor(s1)}async function A1(e){return!me||k.initial?me=await C(e.segmentation.modelPath):e.debug&&h("cached model:",me.modelUrl),Ao(e),me}var so=e=>B.tidy(()=>{let t=B.squeeze(e,[0]),n=B.mul(t,W.tf255);return B.cast(n,"int32")});function r1(e,t){let n=e?so(e):B.fill([t.shape[1]||0,t.shape[2]||0,3],255,"int32"),o=t?so(t):B.fill([e.shape[1]||0,e.shape[2]||0,1],255,"int32"),r=B.concat([n,o],-1);return B.dispose([n,o]),r}function NA(e){return B.tidy(()=>{let t={};return t.unstack=B.unstack(e,-1),t.concat=B.concat(t.unstack,1),t.split=B.split(t.concat,4,1),t.stack=B.concat(t.split,2),t.squeeze=B.squeeze(t.stack,[0]),t.expand=B.expandDims(t.squeeze,-1),t.add=B.add(t.expand,1),t.mul=B.mul(t.add,127.5),t.cast=B.cast(t.mul,"int32"),t.tile=B.tile(t.cast,[1,1,3]),t.alpha=B.fill([t.tile.shape[0]||0,t.tile.shape[1]||0,1],255,"int32"),B.concat([t.tile,t.alpha],-1)})}async function ao(e,t){if(me||(me=await A1(t)),!(me!=null&&me.executor))return null;p0.src=B.div(e,255),s1!==t.segmentation.ratio&&Ao(t);let[n,o,r,s,A,a]=await me.executeAsync(p0,jA),l;switch(t.segmentation.mode||"default"){case"default":l=r1(n,o);break;case"alpha":l=r1(null,o);break;case"foreground":l=r1(n,null);break;case"state":l=NA(r);break;default:l=B.tensor(0)}return B.dispose([p0.src,n,o,p0.r1i,p0.r2i,p0.r3i,p0.r4i]),[p0.r1i,p0.r2i,p0.r3i,p0.r4i]=[r,s,A,a],l}var v0=D(V());var E0;async function a1(e){return!E0||k.initial?E0=await C(e.segmentation.modelPath):e.debug&&h("cached model:",E0.modelUrl),E0}async function lo(e,t){var r;if(E0||(E0=await a1(t)),!(E0!=null&&E0.executor)||!((r=E0==null?void 0:E0.inputs)!=null&&r[0].shape))return null;let n={};n.resize=v0.image.resizeBilinear(e,[E0.inputs[0].shape?E0.inputs[0].shape[1]:0,E0.inputs[0].shape?E0.inputs[0].shape[2]:0],!1),n.norm=v0.div(n.resize,W.tf255),n.res=E0.execute(n.norm),n.squeeze=v0.squeeze(n.res,0),n.alpha=v0.image.resizeBilinear(n.squeeze,[e.shape[1],e.shape[2]]),n.mul=v0.mul(n.alpha,W.tf255);let o;switch(t.segmentation.mode||"default"){case"default":n.input=v0.squeeze(e),n.concat=v0.concat([n.input,n.mul],-1),o=v0.cast(n.concat,"int32");break;case"alpha":o=v0.cast(n.mul,"int32");break;default:o=v0.tensor(0)}return Object.keys(n).forEach(s=>v0.dispose(n[s])),o}var b2=D(V());var q0,Lt=[],xo=0,yo=0,i1=Number.MAX_SAFE_INTEGER;async function fo(e){return k.initial&&(q0=null),q0?e.debug&&h("cached model:",q0.modelUrl):q0=await C(e.face.ssrnet.modelPathAge),q0}async function l1(e,t,n,o){var A,a,l,c;if(!q0)return{age:0};let r=i1<(((A=t.face.ssrnet)==null?void 0:A.skipFrames)||0),s=(((a=t.face.ssrnet)==null?void 0:a.skipTime)||0)>M()-yo;return t.skipAllowed&&r&&s&&xo===o&&((l=Lt[n])==null?void 0:l.age)&&((c=Lt[n])==null?void 0:c.age)>0?(i1++,Lt[n]):(i1=0,new Promise(async x=>{var d;if(!(q0!=null&&q0.inputs)||!q0.inputs[0]||!q0.inputs[0].shape)return;let i={};i.resize=b2.image.resizeBilinear(e,[q0.inputs[0].shape[2],q0.inputs[0].shape[1]],!1),i.enhance=b2.mul(i.resize,W.tf255);let f={age:0};if((d=t.face.ssrnet)!=null&&d.enabled&&(i.age=q0.execute(i.enhance)),i.age){let m=await i.age.data();f.age=Math.trunc(10*m[0])/10}Object.keys(i).forEach(m=>b2.dispose(i[m])),Lt[n]=f,xo=o,yo=M(),x(f)}))}var z0=D(V());var re,Wt=[],po=0,uo=0,c1=Number.MAX_SAFE_INTEGER,d1=[.2989,.587,.114];async function ho(e){var t;return k.initial&&(re=null),re?e.debug&&h("cached model:",re.modelUrl):re=await C((t=e.face.ssrnet)==null?void 0:t.modelPathGender),re}async function x1(e,t,n,o){var A,a,l,c;if(!re)return{gender:"unknown",genderScore:0};let r=c1<(((A=t.face.ssrnet)==null?void 0:A.skipFrames)||0),s=(((a=t.face.ssrnet)==null?void 0:a.skipTime)||0)>M()-uo;return t.skipAllowed&&r&&s&&po===o&&((l=Wt[n])==null?void 0:l.gender)&&((c=Wt[n])==null?void 0:c.genderScore)>0?(c1++,Wt[n]):(c1=0,new Promise(async x=>{var m;if(!(re!=null&&re.inputs[0].shape))return;let i={};i.resize=z0.image.resizeBilinear(e,[re.inputs[0].shape[2],re.inputs[0].shape[1]],!1),i.enhance=z0.tidy(()=>{let[p,g,v]=z0.split(i.resize,3,3),T=z0.mul(p,d1[0]),y=z0.mul(g,d1[1]),b=z0.mul(v,d1[2]),z=z0.addN([T,y,b]);return z0.mul(z0.sub(z,W.tf05),2)});let f={gender:"unknown",genderScore:0};(m=t.face.ssrnet)!=null&&m.enabled&&(i.gender=re.execute(i.enhance));let d=await i.gender.data();f.gender=d[0]>d[1]?"female":"male",f.genderScore=d[0]>d[1]?Math.trunc(100*d[0])/100:Math.trunc(100*d[1])/100,Object.keys(i).forEach(p=>z0.dispose(i[p])),Wt[n]=f,po=o,uo=M(),x(f)}))}var V2=class{constructor(){R(this,"ssrnetage",null);R(this,"gear",null);R(this,"blazeposedetect",null);R(this,"blazepose",null);R(this,"centernet",null);R(this,"efficientpose",null);R(this,"mobilefacenet",null);R(this,"insightface",null);R(this,"emotion",null);R(this,"facedetect",null);R(this,"faceiris",null);R(this,"facemesh",null);R(this,"faceres",null);R(this,"ssrnetgender",null);R(this,"handpose",null);R(this,"handskeleton",null);R(this,"handtrack",null);R(this,"liveness",null);R(this,"meet",null);R(this,"movenet",null);R(this,"nanodet",null);R(this,"posenet",null);R(this,"selfie",null);R(this,"rvm",null);R(this,"antispoof",null)}},u,y1=e=>{e&&(u=e),u||h("instance not registred");let t=0,n=0,o=0;for(let s of Object.values(ee))t+=s.sizeFromManifest,n+=s.sizeLoadedWeights,o+=s.sizeDesired;let r=o>0?n/o:0;return{numLoadedModels:Object.values(ee).length,numDefinedModels:Object.keys(u.models).length,percentageLoaded:r,totalSizeFromManifest:t,totalSizeWeights:n,totalSizeLoading:o,totalSizeEnabled:void 0,modelStats:Object.values(ee)}};function Ft(e){e&&(u=e);for(let t of Object.keys(u.models))u.models[t]=null}async function f1(e){var t,n,o,r,s,A,a,l,c,x,i,f,d,m,p,g,v,T,y,b,z,w,O,q,t0,Z,U,r0,P;e&&(u=e),u||h("instance not registred"),k.initial&&Ft(u),u.config.hand.enabled&&(!u.models.handpose&&((n=(t=u.config.hand.detector)==null?void 0:t.modelPath)==null?void 0:n.includes("handdetect"))&&([u.models.handpose,u.models.handskeleton]=await I5(u.config)),!u.models.handskeleton&&u.config.hand.landmarks&&((r=(o=u.config.hand.detector)==null?void 0:o.modelPath)==null?void 0:r.includes("handdetect"))&&([u.models.handpose,u.models.handskeleton]=await I5(u.config))),u.config.body.enabled&&!u.models.blazepose&&((s=u.config.body.modelPath)==null?void 0:s.includes("blazepose"))&&(u.models.blazepose=h3(u.config)),u.config.body.enabled&&!u.models.blazeposedetect&&u.config.body.detector&&u.config.body.detector.modelPath&&(u.models.blazeposedetect=u3(u.config)),u.config.body.enabled&&!u.models.efficientpose&&((A=u.config.body.modelPath)==null?void 0:A.includes("efficientpose"))&&(u.models.efficientpose=P3(u.config)),u.config.body.enabled&&!u.models.movenet&&((a=u.config.body.modelPath)==null?void 0:a.includes("movenet"))&&(u.models.movenet=qn(u.config)),u.config.body.enabled&&!u.models.posenet&&((l=u.config.body.modelPath)==null?void 0:l.includes("posenet"))&&(u.models.posenet=oo(u.config)),u.config.face.enabled&&!u.models.facedetect&&(u.models.facedetect=i3(u.config)),u.config.face.enabled&&((c=u.config.face.antispoof)==null?void 0:c.enabled)&&!u.models.antispoof&&(u.models.antispoof=Y1(u.config)),u.config.face.enabled&&((x=u.config.face.liveness)==null?void 0:x.enabled)&&!u.models.liveness&&(u.models.liveness=Nn(u.config)),u.config.face.enabled&&((i=u.config.face.description)==null?void 0:i.enabled)&&!u.models.faceres&&(u.models.faceres=Z3(u.config)),u.config.face.enabled&&((f=u.config.face.emotion)==null?void 0:f.enabled)&&!u.models.emotion&&(u.models.emotion=E3(u.config)),u.config.face.enabled&&((d=u.config.face.iris)==null?void 0:d.enabled)&&!((m=u.config.face.attention)!=null&&m.enabled)&&!u.models.faceiris&&(u.models.faceiris=O3(u.config)),u.config.face.enabled&&((p=u.config.face.mesh)==null?void 0:p.enabled)&&!u.models.facemesh&&(u.models.facemesh=G3(u.config)),u.config.face.enabled&&((g=u.config.face.gear)==null?void 0:g.enabled)&&!u.models.gear&&(u.models.gear=U3(u.config)),u.config.face.enabled&&((v=u.config.face.ssrnet)==null?void 0:v.enabled)&&!u.models.ssrnetage&&(u.models.ssrnetage=fo(u.config)),u.config.face.enabled&&((T=u.config.face.ssrnet)==null?void 0:T.enabled)&&!u.models.ssrnetgender&&(u.models.ssrnetgender=ho(u.config)),u.config.face.enabled&&((y=u.config.face.mobilefacenet)==null?void 0:y.enabled)&&!u.models.mobilefacenet&&(u.models.mobilefacenet=Gn(u.config)),u.config.face.enabled&&((b=u.config.face.insightface)==null?void 0:b.enabled)&&!u.models.insightface&&(u.models.insightface=En(u.config)),u.config.hand.enabled&&!u.models.handtrack&&((w=(z=u.config.hand.detector)==null?void 0:z.modelPath)==null?void 0:w.includes("handtrack"))&&(u.models.handtrack=Tn(u.config)),u.config.hand.enabled&&u.config.hand.landmarks&&!u.models.handskeleton&&((q=(O=u.config.hand.detector)==null?void 0:O.modelPath)==null?void 0:q.includes("handtrack"))&&(u.models.handskeleton=vn(u.config)),u.config.object.enabled&&!u.models.centernet&&((t0=u.config.object.modelPath)==null?void 0:t0.includes("centernet"))&&(u.models.centernet=M3(u.config)),u.config.object.enabled&&!u.models.nanodet&&((Z=u.config.object.modelPath)==null?void 0:Z.includes("nanodet"))&&(u.models.nanodet=Kn(u.config)),u.config.segmentation.enabled&&!u.models.selfie&&((U=u.config.segmentation.modelPath)==null?void 0:U.includes("selfie"))&&(u.models.selfie=a1(u.config)),u.config.segmentation.enabled&&!u.models.meet&&((r0=u.config.segmentation.modelPath)==null?void 0:r0.includes("meet"))&&(u.models.meet=V5(u.config)),u.config.segmentation.enabled&&!u.models.rvm&&((P=u.config.segmentation.modelPath)==null?void 0:P.includes("rvm"))&&(u.models.rvm=A1(u.config));for await(let G of Object.keys(u.models))u.models[G]&&typeof u.models[G]!="undefined"&&(u.models[G]=await u.models[G])}function Gt(e,t,n){var c,x;if(!t||(e&&(u=e),u||h("instance not registred"),!((c=u==null?void 0:u.config)!=null&&c.validateModels)))return null;let o=["const","placeholder","noop","pad","squeeze","add","sub","mul","div"],r=["biasadd","fusedbatchnormv3","matmul","switch","shape","merge","split","broadcastto"],s=[],A=[],a=t.modelUrl,l=t.executor;if((x=l==null?void 0:l.graph)!=null&&x.nodes)for(let i of Object.values(l.graph.nodes)){let f=i.op.toLowerCase();s.includes(f)||s.push(f)}else!l&&u.config.debug&&h("model not loaded",n);for(let i of s)!o.includes(i)&&!r.includes(i)&&!u.env.kernels.includes(i)&&!u.env.kernels.includes(i.replace("_",""))&&!u.env.kernels.includes(i.replace("native",""))&&!u.env.kernels.includes(i.replace("v2",""))&&A.push(i);return u.config.debug&&A.length>0&&h("model validation failed:",n,A),A.length>0?{name:n,missing:A,ops:s,url:a}:null}function Bt(e){e&&(u=e),u||h("instance not registred");let t=[];for(let n of Object.keys(e.models)){let o=e.models[n];if(!o)continue;let r=Gt(e,o,n);r&&t.push(r)}return t}var $={name:"humangl",priority:999,canvas:null,gl:null,extensions:[],webGLattr:{alpha:!1,antialias:!1,premultipliedAlpha:!1,preserveDrawingBuffer:!1,depth:!1,stencil:!1,failIfMajorPerformanceCaveat:!1,desynchronized:!0}};function OA(){let e=$.gl;!e||($.extensions=e.getSupportedExtensions())}function go(e){var t;if(e.config.backend==="humangl"&&($.name in d0.engine().registry&&!((t=$==null?void 0:$.gl)!=null&&t.getParameter($.gl.VERSION))&&(h("humangl error: backend invalid context"),Ft(e)),!d0.findBackend($.name))){try{$.canvas=$0(100,100)}catch(o){h("humangl error: cannot create canvas:",o);return}try{if($.gl=$.canvas.getContext("webgl2",$.webGLattr),!$.gl){h("humangl error: cannot get webgl context");return}if(!$.gl.getParameter($.gl.VERSION).includes("2.0")){h("backend override: using fallback webgl backend as webgl 2.0 is not detected"),e.config.backend="webgl";return}$.canvas&&($.canvas.addEventListener("webglcontextlost",r=>{throw h("humangl error:",r.type),h("possible browser memory leak using webgl or conflict with multiple backend registrations"),e.emit("error"),new Error("backend error: webgl context lost")}),$.canvas.addEventListener("webglcontextrestored",r=>{h("humangl error: context restored:",r)}),$.canvas.addEventListener("webglcontextcreationerror",r=>{h("humangl error: context create:",r)}))}catch(o){h("humangl error: cannot get webgl context:",o);return}try{d0.setWebGLContext(2,$.gl)}catch(o){h("humangl error: cannot set webgl context:",o);return}try{let o=new d0.GPGPUContext($.gl);d0.registerBackend($.name,()=>new d0.MathBackendWebGL(o),$.priority)}catch(o){h("humangl error: cannot register webgl backend:",o);return}try{d0.getKernelsForBackend("webgl").forEach(r=>{let s={...r,backendName:$.name};d0.registerKernel(s)})}catch(o){h("humangl error: cannot update webgl backend registration:",o);return}try{d0.env().flagRegistry.WEBGL_VERSION&&d0.env().set("WEBGL_VERSION",2)}catch(o){h("humangl error: cannot set WebGL backend flags:",o);return}OA();let n=d0.backend().getGPGPUContext?d0.backend().getGPGPUContext().gl:null;n?e.config.debug&&h("humangl backend registered:",{webgl:n.getParameter(n.VERSION),renderer:n.getParameter(n.RENDERER)}):h("humangl error: no current gl context:",n,$.gl)}}var S=D(V());function IA(e){let t=[];if(!k.kernels.includes("mod")){let n={kernelName:"Mod",backendName:S.getBackend(),kernelFunc:o=>S.tidy(()=>S.sub(o.inputs.a,S.mul(S.div(o.inputs.a,o.inputs.b),o.inputs.b)))};S.registerKernel(n),k.kernels.push("mod"),t.push("mod")}if(!k.kernels.includes("floormod")){let n={kernelName:"FloorMod",backendName:S.getBackend(),kernelFunc:o=>S.tidy(()=>S.add(S.mul(S.floorDiv(o.inputs.a/o.inputs.b),o.inputs.b),S.mod(o.inputs.a,o.inputs.b)))};S.registerKernel(n),k.kernels.push("floormod"),t.push("floormod")}if(!k.kernels.includes("rotatewithoffset")&&e.softwareKernels){let n={kernelName:"RotateWithOffset",backendName:S.getBackend(),kernelFunc:o=>S.tidy(()=>{let r=S.getBackend();S.setBackend("cpu");let s=S.image.rotateWithOffset(o.inputs.image,o.attrs.radians,o.attrs.fillValue,o.attrs.center);return S.setBackend(r),s})};S.registerKernel(n),k.kernels.push("rotatewithoffset"),t.push("rotatewithoffset")}t.length>0&&e.debug&&h("registered kernels:",t)}var To={};async function D2(e,t=!1){if(e.state="backend",t||k.initial||e.config.backend&&e.config.backend.length>0&&S.getBackend()!==e.config.backend){let n=M();if(e.config.backend&&e.config.backend.length>0){if(typeof window=="undefined"&&typeof WorkerGlobalScope!="undefined"&&e.config.debug&&e.config.debug&&h("running inside web worker"),k.browser&&e.config.backend==="tensorflow"&&(e.config.debug&&h("override: backend set to tensorflow while running in browser"),e.config.backend="webgl"),k.node&&(e.config.backend==="webgl"||e.config.backend==="humangl")&&(e.config.debug&&h(`override: backend set to ${e.config.backend} while running in nodejs`),e.config.backend="tensorflow"),k.browser&&e.config.backend==="webgpu")if(typeof navigator=="undefined"||typeof navigator.gpu=="undefined")h("override: backend set to webgpu but browser does not support webgpu"),e.config.backend="webgl";else{let r=await navigator.gpu.requestAdapter();if(e.config.debug&&h("enumerated webgpu adapter:",r),!r)h("override: backend set to webgpu but browser reports no available gpu"),e.config.backend="webgl";else{let s="requestAdapterInfo"in r?await r.requestAdapterInfo():void 0;h("webgpu adapter info:",s)}}let o=Object.keys(S.engine().registryFactory);if(e.config.backend==="humangl"&&!o.includes("humangl")&&(go(e),o=Object.keys(S.engine().registryFactory)),e.config.debug&&h("available backends:",o),o.includes(e.config.backend)||(h(`error: backend ${e.config.backend} not found in registry`),e.config.backend=k.node?"tensorflow":"webgl",e.config.debug&&h(`override: setting backend ${e.config.backend}`)),e.config.debug&&h("setting backend:",[e.config.backend]),e.config.backend==="wasm"){if(S.env().flagRegistry.CANVAS2D_WILL_READ_FREQUENTLY&&S.env().set("CANVAS2D_WILL_READ_FREQUENTLY",!0),e.config.debug&&h("wasm path:",e.config.wasmPath),typeof S.setWasmPaths!="undefined")S.setWasmPaths(e.config.wasmPath,e.config.wasmPlatformFetch);else throw new Error("backend error: attempting to use wasm backend but wasm path is not set");let r=!1,s=!1;try{r=await S.env().getAsync("WASM_HAS_MULTITHREAD_SUPPORT"),s=await S.env().getAsync("WASM_HAS_SIMD_SUPPORT"),e.config.debug&&h(`wasm execution: ${s?"simd":"no simd"} ${r?"multithreaded":"singlethreaded"}`),e.config.debug&&!s&&h("warning: wasm simd support is not enabled")}catch(A){h("wasm detection failed")}}try{await S.setBackend(e.config.backend),await S.ready()}catch(r){return h("error: cannot set backend:",e.config.backend,r),!1}e.config.debug&&(To=JSON.parse(JSON.stringify(S.env().flags)))}if((S.getBackend()==="humangl"||S.getBackend()==="webgl")&&(S.env().flagRegistry.WEBGL_USE_SHAPES_UNIFORMS&&S.env().set("WEBGL_USE_SHAPES_UNIFORMS",!0),S.env().flagRegistry.WEBGL_EXP_CONV&&S.env().set("WEBGL_EXP_CONV",!0),e.config.debug&&typeof e.config.deallocate!="undefined"&&e.config.deallocate&&(h("changing webgl: WEBGL_DELETE_TEXTURE_THRESHOLD:",!0),S.env().set("WEBGL_DELETE_TEXTURE_THRESHOLD",0))),S.getBackend(),e.config.debug){let o=S.env().flags,r={};for(let s of Object.keys(o))To[s]!==o[s]&&(r[s]=o[s]);e.config.debug&&Object.keys(r).length>0&&h("backend:",S.getBackend(),"flags:",r)}if(e.config.flags&&Object.keys(e.config.flags).length>0){e.config.debug&&h("flags:",e.config.flags);for(let[o,r]of Object.entries(e.config.flags))S.env().set(o,r)}S.enableProdMode(),J1(),e.performance.initBackend=Math.trunc(M()-n),e.config.backend=S.getBackend(),await k.updateBackend(),IA(e.config),k.initial=!1}return!0}function vt(e,t){for(let n of e){let o={kernelName:n,backendName:t.backend,kernelFunc:()=>{t.debug&&h("kernelFunc",n,t.backend)}};S.registerKernel(o)}k.kernels=S.getKernelsForBackend(S.getBackend()).map(n=>n.kernelName.toLowerCase())}var M1={};we(M1,{all:()=>g1,body:()=>T2,canvas:()=>b1,face:()=>M2,gesture:()=>R2,hand:()=>v2,object:()=>P2,options:()=>S0,person:()=>h1});var K0=e=>{if(!e)h("draw error: invalid canvas");else if(!e.getContext)h("draw error: canvas context not defined");else{let t=e.getContext("2d");if(!t)h("draw error: cannot get canvas context");else return t}return null},r2=e=>Math.round(e*180/Math.PI),ve=(e,t)=>{if(!t.useDepth||typeof e=="undefined")return t.color;let n=Uint8ClampedArray.from([127+2*e,127-2*e,255]);return`rgba(${n[0]}, ${n[1]}, ${n[2]}, ${t.alpha})`};function Pe(e,t,n,o,r){e.fillStyle=ve(o,r),e.beginPath(),e.arc(t,n,r.pointSize,0,2*Math.PI),e.fill()}function pe(e,t,n,o,r,s){if(e.beginPath(),e.lineWidth=s.lineWidth,s.useCurves){let A=(t+t+o)/2,a=(n+n+r)/2;e.ellipse(A,a,o/2,r/2,0,0,2*Math.PI)}else e.moveTo(t+s.roundRect,n),e.lineTo(t+o-s.roundRect,n),e.quadraticCurveTo(t+o,n,t+o,n+s.roundRect),e.lineTo(t+o,n+r-s.roundRect),e.quadraticCurveTo(t+o,n+r,t+o-s.roundRect,n+r),e.lineTo(t+s.roundRect,n+r),e.quadraticCurveTo(t,n+r,t,n+r-s.roundRect),e.lineTo(t,n+s.roundRect),e.quadraticCurveTo(t,n,t+s.roundRect,n),e.closePath();e.stroke()}function m1(e,t,n){if(!(t.length<2)){e.beginPath(),e.moveTo(t[0][0],t[0][1]);for(let o of t)e.strokeStyle=ve(o[2]||0,n),e.lineTo(Math.trunc(o[0]),Math.trunc(o[1]));e.stroke(),n.fillPolygons&&(e.closePath(),e.fill())}}function Po(e,t,n){if(!(t.length<2)){if(e.lineWidth=n.lineWidth,!n.useCurves||t.length<=2){m1(e,t,n);return}e.moveTo(t[0][0],t[0][1]);for(let o=0;o0){let s=e.emotion.map(A=>`${Math.trunc(100*A.score)}% ${A.emotion}`);s.length>3&&(s.length=3),r.push(s.join(" "))}((n=e.rotation)==null?void 0:n.angle)&&((o=e.rotation)==null?void 0:o.gaze)&&(e.rotation.angle.roll&&r.push(`roll: ${r2(e.rotation.angle.roll)}\xB0 yaw:${r2(e.rotation.angle.yaw)}\xB0 pitch:${r2(e.rotation.angle.pitch)}\xB0`),e.rotation.gaze.bearing&&r.push(`gaze: ${r2(e.rotation.gaze.bearing)}\xB0`)),r.length===0&&r.push("face"),t.fillStyle=K.color;for(let s=r.length-1;s>=0;s--){let A=Math.max(e.box[0],0),a=s*K.lineHeight+e.box[1];K.shadowColor&&K.shadowColor!==""&&(t.fillStyle=K.shadowColor,t.fillText(r[s],A+5,a+16)),t.fillStyle=K.labelColor,t.fillText(r[s],A+4,a+15)}}}function LA(e,t){var n,o,r,s;if(((n=e.annotations)==null?void 0:n.leftEyeIris)&&((o=e.annotations)==null?void 0:o.leftEyeIris[0])){t.strokeStyle=K.useDepth?"rgba(255, 200, 255, 0.3)":K.color,t.beginPath();let A=Math.abs(e.annotations.leftEyeIris[3][0]-e.annotations.leftEyeIris[1][0])/2,a=Math.abs(e.annotations.leftEyeIris[4][1]-e.annotations.leftEyeIris[2][1])/2;t.ellipse(e.annotations.leftEyeIris[0][0],e.annotations.leftEyeIris[0][1],A,a,0,0,2*Math.PI),t.stroke(),K.fillPolygons&&(t.fillStyle=K.useDepth?"rgba(255, 255, 200, 0.3)":K.color,t.fill())}if(((r=e.annotations)==null?void 0:r.rightEyeIris)&&((s=e.annotations)==null?void 0:s.rightEyeIris[0])){t.strokeStyle=K.useDepth?"rgba(255, 200, 255, 0.3)":K.color,t.beginPath();let A=Math.abs(e.annotations.rightEyeIris[3][0]-e.annotations.rightEyeIris[1][0])/2,a=Math.abs(e.annotations.rightEyeIris[4][1]-e.annotations.rightEyeIris[2][1])/2;t.ellipse(e.annotations.rightEyeIris[0][0],e.annotations.rightEyeIris[0][1],A,a,0,0,2*Math.PI),t.stroke(),K.fillPolygons&&(t.fillStyle=K.useDepth?"rgba(255, 255, 200, 0.3)":K.color,t.fill())}}function WA(e,t){var n;if(K.drawGaze&&((n=e.rotation)==null?void 0:n.angle)&&typeof Path2D!="undefined"){t.strokeStyle="pink";let o=e.box[0]+e.box[2]/2-e.box[3]*r2(e.rotation.angle.yaw)/90,r=e.box[1]+e.box[3]/2+e.box[2]*r2(e.rotation.angle.pitch)/90,s=new Path2D(` + M ${e.box[0]+e.box[2]/2} ${e.box[1]} C - ${valX} ${f.box[1]}, - ${valX} ${f.box[1] + f.box[3]}, - ${f.box[0] + f.box[2] / 2} ${f.box[1] + f.box[3]} - `); - const pathH = new Path2D(` - M ${f.box[0]} ${f.box[1] + f.box[3] / 2} + ${o} ${e.box[1]}, + ${o} ${e.box[1]+e.box[3]}, + ${e.box[0]+e.box[2]/2} ${e.box[1]+e.box[3]} + `),A=new Path2D(` + M ${e.box[0]} ${e.box[1]+e.box[3]/2} C - ${f.box[0]} ${valY}, - ${f.box[0] + f.box[2]} ${valY}, - ${f.box[0] + f.box[2]} ${f.box[1] + f.box[3] / 2} - `); - ctx.stroke(pathH); - ctx.stroke(pathV); - } -} -function drawGazeArrows(f, ctx) { - var _a; - if (opt.drawGaze && ((_a = f.rotation) == null ? void 0 : _a.gaze.strength) && f.rotation.gaze.bearing && f.annotations.leftEyeIris && f.annotations.rightEyeIris && f.annotations.leftEyeIris[0] && f.annotations.rightEyeIris[0]) { - ctx.strokeStyle = "pink"; - ctx.fillStyle = "pink"; - const leftGaze = [ - f.annotations.leftEyeIris[0][0] + Math.sin(f.rotation.gaze.bearing) * f.rotation.gaze.strength * f.box[3], - f.annotations.leftEyeIris[0][1] + Math.cos(f.rotation.gaze.bearing) * f.rotation.gaze.strength * f.box[2] - ]; - arrow(ctx, [f.annotations.leftEyeIris[0][0], f.annotations.leftEyeIris[0][1]], [leftGaze[0], leftGaze[1]], 4); - const rightGaze = [ - f.annotations.rightEyeIris[0][0] + Math.sin(f.rotation.gaze.bearing) * f.rotation.gaze.strength * f.box[3], - f.annotations.rightEyeIris[0][1] + Math.cos(f.rotation.gaze.bearing) * f.rotation.gaze.strength * f.box[2] - ]; - arrow(ctx, [f.annotations.rightEyeIris[0][0], f.annotations.rightEyeIris[0][1]], [rightGaze[0], rightGaze[1]], 4); - } -} -function drawFacePolygons(f, ctx) { - if (opt.drawPolygons && f.mesh.length >= 468) { - ctx.lineWidth = 1; - for (let i = 0; i < TRI468.length / 3; i++) { - const points = [TRI468[i * 3 + 0], TRI468[i * 3 + 1], TRI468[i * 3 + 2]].map((index2) => f.mesh[index2]); - lines(ctx, points, opt); - } - drawIrisElipse(f, ctx); - } -} -function drawFacePoints(f, ctx) { - if (opt.drawPoints && f.mesh.length >= 468) { - for (let i = 0; i < f.mesh.length; i++) { - point(ctx, f.mesh[i][0], f.mesh[i][1], f.mesh[i][2], opt); - if (opt.drawAttention) { - if (LANDMARKS_REFINEMENT_LIPS_CONFIG.includes(i)) - point(ctx, f.mesh[i][0], f.mesh[i][1], f.mesh[i][2] + 127, opt); - if (LANDMARKS_REFINEMENT_LEFT_EYE_CONFIG.includes(i)) - point(ctx, f.mesh[i][0], f.mesh[i][1], f.mesh[i][2] - 127, opt); - if (LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG.includes(i)) - point(ctx, f.mesh[i][0], f.mesh[i][1], f.mesh[i][2] - 127, opt); - } - } - } -} -function drawFaceBoxes(f, ctx) { - if (opt.drawBoxes) { - rect(ctx, f.box[0], f.box[1], f.box[2], f.box[3], opt); - } -} -function face(inCanvas2, result, drawOptions) { - opt = mergeDeep(options3, drawOptions); - if (!result || !inCanvas2) - return; - const ctx = getCanvasContext(inCanvas2); - if (!ctx) - return; - ctx.font = opt.font; - ctx.strokeStyle = opt.color; - ctx.fillStyle = opt.color; - for (const f of result) { - drawFaceBoxes(f, ctx); - drawLabels(f, ctx); - if (f.mesh && f.mesh.length > 0) { - drawFacePoints(f, ctx); - drawFacePolygons(f, ctx); - drawGazeSpheres(f, ctx); - drawGazeArrows(f, ctx); - } - } -} - -// src/draw/body.ts -function body(inCanvas2, result, drawOptions) { - const localOptions = mergeDeep(options3, drawOptions); - if (!result || !inCanvas2) - return; - const ctx = getCanvasContext(inCanvas2); - if (!ctx) - return; - ctx.lineJoin = "round"; - for (let i = 0; i < result.length; i++) { - ctx.strokeStyle = localOptions.color; - ctx.fillStyle = localOptions.color; - ctx.lineWidth = localOptions.lineWidth; - ctx.font = localOptions.font; - if (localOptions.drawBoxes && result[i].box && result[i].box.length === 4) { - rect(ctx, result[i].box[0], result[i].box[1], result[i].box[2], result[i].box[3], localOptions); - if (localOptions.drawLabels) { - if (localOptions.shadowColor && localOptions.shadowColor !== "") { - ctx.fillStyle = localOptions.shadowColor; - ctx.fillText(`body ${100 * result[i].score}%`, result[i].box[0] + 3, 1 + result[i].box[1] + localOptions.lineHeight, result[i].box[2]); - } - ctx.fillStyle = localOptions.labelColor; - ctx.fillText(`body ${100 * result[i].score}%`, result[i].box[0] + 2, 0 + result[i].box[1] + localOptions.lineHeight, result[i].box[2]); - } - } - if (localOptions.drawPoints && result[i].keypoints) { - for (let pt = 0; pt < result[i].keypoints.length; pt++) { - if (!result[i].keypoints[pt].score || result[i].keypoints[pt].score === 0) - continue; - ctx.fillStyle = colorDepth(result[i].keypoints[pt].position[2], localOptions); - point(ctx, result[i].keypoints[pt].position[0], result[i].keypoints[pt].position[1], 0, localOptions); - } - } - if (localOptions.drawLabels && result[i].keypoints) { - ctx.font = localOptions.font; - for (const pt of result[i].keypoints) { - if (!pt.score || pt.score === 0) - continue; - ctx.fillStyle = colorDepth(pt.position[2], localOptions); - ctx.fillText(`${pt.part} ${Math.trunc(100 * pt.score)}%`, pt.position[0] + 4, pt.position[1] + 4); - } - } - if (localOptions.drawPolygons && result[i].keypoints && result[i].annotations) { - for (const part of Object.values(result[i].annotations)) { - for (const connected4 of part) - curves(ctx, connected4, localOptions); - } - } - } -} - -// src/draw/hand.ts -function hand(inCanvas2, result, drawOptions) { - const localOptions = mergeDeep(options3, drawOptions); - if (!result || !inCanvas2) - return; - const ctx = getCanvasContext(inCanvas2); - if (!ctx) - return; - ctx.lineJoin = "round"; - ctx.font = localOptions.font; - for (const h of result) { - if (localOptions.drawBoxes) { - ctx.strokeStyle = localOptions.color; - ctx.fillStyle = localOptions.color; - rect(ctx, h.box[0], h.box[1], h.box[2], h.box[3], localOptions); - if (localOptions.drawLabels) { - if (localOptions.shadowColor && localOptions.shadowColor !== "") { - ctx.fillStyle = localOptions.shadowColor; - ctx.fillText(`hand:${Math.trunc(100 * h.score)}%`, h.box[0] + 3, 1 + h.box[1] + localOptions.lineHeight, h.box[2]); - } - ctx.fillStyle = localOptions.labelColor; - ctx.fillText(`hand:${Math.trunc(100 * h.score)}%`, h.box[0] + 2, 0 + h.box[1] + localOptions.lineHeight, h.box[2]); - } - ctx.stroke(); - } - if (localOptions.drawPoints) { - if (h.keypoints && h.keypoints.length > 0) { - for (const pt of h.keypoints) { - ctx.fillStyle = colorDepth(pt[2], localOptions); - point(ctx, pt[0], pt[1], 0, localOptions); - } - } - } - if (localOptions.drawLabels && h.annotations) { - const addHandLabel = (part, title) => { - if (!part || part.length === 0 || !part[0]) - return; - const z = part[part.length - 1][2] || -256; - ctx.fillStyle = colorDepth(z, localOptions); - ctx.fillText(title, part[part.length - 1][0] + 4, part[part.length - 1][1] + 4); - }; - ctx.font = localOptions.font; - addHandLabel(h.annotations.index, "index"); - addHandLabel(h.annotations.middle, "middle"); - addHandLabel(h.annotations.ring, "ring"); - addHandLabel(h.annotations.pinky, "pinky"); - addHandLabel(h.annotations.thumb, "thumb"); - addHandLabel(h.annotations.palm, "palm"); - } - if (localOptions.drawPolygons && h.annotations) { - const addHandLine = (part) => { - if (!part || part.length === 0 || !part[0]) - return; - for (let i = 0; i < part.length; i++) { - ctx.beginPath(); - const z = part[i][2] || 0; - ctx.strokeStyle = colorDepth(i * z, localOptions); - ctx.moveTo(part[i > 0 ? i - 1 : 0][0], part[i > 0 ? i - 1 : 0][1]); - ctx.lineTo(part[i][0], part[i][1]); - ctx.stroke(); - } - }; - ctx.lineWidth = localOptions.lineWidth; - addHandLine(h.annotations.index); - addHandLine(h.annotations.middle); - addHandLine(h.annotations.ring); - addHandLine(h.annotations.pinky); - addHandLine(h.annotations.thumb); - } - } -} - -// src/draw/object.ts -function object(inCanvas2, result, drawOptions) { - const localOptions = mergeDeep(options3, drawOptions); - if (!result || !inCanvas2) - return; - const ctx = getCanvasContext(inCanvas2); - if (!ctx) - return; - ctx.lineJoin = "round"; - ctx.font = localOptions.font; - for (const h of result) { - if (localOptions.drawBoxes) { - ctx.strokeStyle = localOptions.color; - ctx.fillStyle = localOptions.color; - rect(ctx, h.box[0], h.box[1], h.box[2], h.box[3], localOptions); - if (localOptions.drawLabels) { - const label = `${h.label} ${Math.round(100 * h.score)}%`; - if (localOptions.shadowColor && localOptions.shadowColor !== "") { - ctx.fillStyle = localOptions.shadowColor; - ctx.fillText(label, h.box[0] + 3, 1 + h.box[1] + localOptions.lineHeight, h.box[2]); - } - ctx.fillStyle = localOptions.labelColor; - ctx.fillText(label, h.box[0] + 2, 0 + h.box[1] + localOptions.lineHeight, h.box[2]); - } - ctx.stroke(); - } - } -} - -// src/draw/gesture.ts -function gesture(inCanvas2, result, drawOptions) { - const localOptions = mergeDeep(options3, drawOptions); - if (!result || !inCanvas2) - return; - if (localOptions.drawGestures) { - const ctx = getCanvasContext(inCanvas2); - if (!ctx) - return; - ctx.font = localOptions.font; - ctx.fillStyle = localOptions.color; - let i = 1; - for (let j = 0; j < result.length; j++) { - let where = []; - let what = []; - [where, what] = Object.entries(result[j]); - if (what.length > 1 && what[1].length > 0) { - const who = where[1] > 0 ? `#${where[1]}` : ""; - const label = `${where[0]} ${who}: ${what[1]}`; - if (localOptions.shadowColor && localOptions.shadowColor !== "") { - ctx.fillStyle = localOptions.shadowColor; - ctx.fillText(label, 8, 2 + i * localOptions.lineHeight); - } - ctx.fillStyle = localOptions.labelColor; - ctx.fillText(label, 6, 0 + i * localOptions.lineHeight); - i += 1; - } - } - } -} - -// src/draw/draw.ts -var drawTime = 0; -function person(inCanvas2, result, drawOptions) { - const localOptions = mergeDeep(options3, drawOptions); - if (!result || !inCanvas2) - return; - const ctx = getCanvasContext(inCanvas2); - if (!ctx) - return; - ctx.lineJoin = "round"; - ctx.font = localOptions.font; - for (let i = 0; i < result.length; i++) { - if (localOptions.drawBoxes) { - ctx.strokeStyle = localOptions.color; - ctx.fillStyle = localOptions.color; - rect(ctx, result[i].box[0], result[i].box[1], result[i].box[2], result[i].box[3], localOptions); - if (localOptions.drawLabels) { - const label = `person #${i}`; - if (localOptions.shadowColor && localOptions.shadowColor !== "") { - ctx.fillStyle = localOptions.shadowColor; - ctx.fillText(label, result[i].box[0] + 3, 1 + result[i].box[1] + localOptions.lineHeight, result[i].box[2]); - } - ctx.fillStyle = localOptions.labelColor; - ctx.fillText(label, result[i].box[0] + 2, 0 + result[i].box[1] + localOptions.lineHeight, result[i].box[2]); - } - ctx.stroke(); - } - } -} -function canvas2(input, output) { - if (!input || !output) - return; - const ctx = getCanvasContext(output); - if (!ctx) - return; - ctx.drawImage(input, 0, 0); -} -async function all(inCanvas2, result, drawOptions) { - if (!(result == null ? void 0 : result.performance) || !inCanvas2) - return null; - const timeStamp = now(); - const localOptions = mergeDeep(options3, drawOptions); - const promise = Promise.all([ - face(inCanvas2, result.face, localOptions), - body(inCanvas2, result.body, localOptions), - hand(inCanvas2, result.hand, localOptions), - object(inCanvas2, result.object, localOptions), - gesture(inCanvas2, result.gesture, localOptions) - ]); - drawTime = env.perfadd ? drawTime + Math.round(now() - timeStamp) : Math.round(now() - timeStamp); - result.performance.draw = drawTime; - return promise; -} - -// src/face/face.ts -var tf37 = __toESM(require_tfjs_esm()); - -// src/face/mask.ts -var tf36 = __toESM(require_tfjs_esm()); -var expandFact = 0.1; -var alpha = 0.5; -function insidePoly(x, y, polygon) { - let inside = false; - let j = polygon.length - 1; - for (let i = 0; i < polygon.length; j = i++) { - if (polygon[i].y > y !== polygon[j].y > y && x < (polygon[j].x - polygon[i].x) * (y - polygon[i].y) / (polygon[j].y - polygon[i].y) + polygon[i].x) - inside = !inside; - } - return inside; -} -async function mask(face4) { - if (!face4.tensor) - return face4.tensor; - if (!face4.mesh || face4.mesh.length < 100) - return face4.tensor; - const width = face4.tensor.shape[2] || 0; - const height = face4.tensor.shape[1] || 0; - const buffer = await face4.tensor.buffer(); - let silhouette = []; - for (const pt of meshAnnotations.silhouette) - silhouette.push({ x: (face4.mesh[pt][0] - face4.box[0]) / face4.box[2], y: (face4.mesh[pt][1] - face4.box[1]) / face4.box[3] }); - if (expandFact && expandFact > 0) - silhouette = silhouette.map((pt) => ({ x: pt.x > 0.5 ? pt.x + expandFact : pt.x - expandFact, y: pt.y > 0.5 ? pt.y + expandFact : pt.y - expandFact })); - for (let x = 0; x < width; x++) { - for (let y = 0; y < height; y++) { - const inside = insidePoly(x / width, y / width, silhouette); - if (!inside) { - buffer.set(alpha * buffer.get(0, y, x, 0), 0, y, x, 0); - buffer.set(alpha * buffer.get(0, y, x, 1), 0, y, x, 1); - buffer.set(alpha * buffer.get(0, y, x, 2), 0, y, x, 2); - } - } - } - const output = buffer.toTensor(); - tf36.dispose(buffer); - return output; -} - -// src/face/angles.ts -var calculateGaze = (face4) => { - const radians = (pt1, pt2) => Math.atan2(pt1[1] - pt2[1], pt1[0] - pt2[0]); - if (!face4.annotations.rightEyeIris || !face4.annotations.leftEyeIris) - return { bearing: 0, strength: 0 }; - const offsetIris = [0, -0.1]; - const eyeRatio = 1; - const left = (face4.mesh[33][2] || 0) > (face4.mesh[263][2] || 0); - const irisCenter = left ? face4.mesh[473] : face4.mesh[468]; - const eyeCenter = left ? [(face4.mesh[133][0] + face4.mesh[33][0]) / 2, (face4.mesh[133][1] + face4.mesh[33][1]) / 2] : [(face4.mesh[263][0] + face4.mesh[362][0]) / 2, (face4.mesh[263][1] + face4.mesh[362][1]) / 2]; - const eyeSize = left ? [face4.mesh[133][0] - face4.mesh[33][0], face4.mesh[23][1] - face4.mesh[27][1]] : [face4.mesh[263][0] - face4.mesh[362][0], face4.mesh[253][1] - face4.mesh[257][1]]; - const eyeDiff = [ - (eyeCenter[0] - irisCenter[0]) / eyeSize[0] - offsetIris[0], - eyeRatio * (irisCenter[1] - eyeCenter[1]) / eyeSize[1] - offsetIris[1] - ]; - let strength = Math.sqrt(eyeDiff[0] * eyeDiff[0] + eyeDiff[1] * eyeDiff[1]); - strength = Math.min(strength, face4.boxRaw[2] / 2, face4.boxRaw[3] / 2); - const bearing = (radians([0, 0], eyeDiff) + Math.PI / 2) % Math.PI; - return { bearing, strength }; -}; -var calculateFaceAngle = (face4, imageSize) => { - const normalize2 = (v) => { - const length = Math.sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]); - v[0] /= length; - v[1] /= length; - v[2] /= length; - return v; - }; - const subVectors = (a, b) => { - const x = a[0] - b[0]; - const y = a[1] - b[1]; - const z = a[2] - b[2]; - return [x, y, z]; - }; - const crossVectors = (a, b) => { - const x = a[1] * b[2] - a[2] * b[1]; - const y = a[2] * b[0] - a[0] * b[2]; - const z = a[0] * b[1] - a[1] * b[0]; - return [x, y, z]; - }; - const rotationMatrixToEulerAngle = (r) => { - const [r00, _r01, _r02, r10, r11, r12, r20, r21, r22] = r; - let thetaX; - let thetaY; - let thetaZ; - if (r10 < 1) { - if (r10 > -1) { - thetaZ = Math.asin(r10); - thetaY = Math.atan2(-r20, r00); - thetaX = Math.atan2(-r12, r11); - } else { - thetaZ = -Math.PI / 2; - thetaY = -Math.atan2(r21, r22); - thetaX = 0; - } - } else { - thetaZ = Math.PI / 2; - thetaY = Math.atan2(r21, r22); - thetaX = 0; - } - if (Number.isNaN(thetaX)) - thetaX = 0; - if (Number.isNaN(thetaY)) - thetaY = 0; - if (Number.isNaN(thetaZ)) - thetaZ = 0; - return { pitch: 2 * -thetaX, yaw: 2 * -thetaY, roll: 2 * -thetaZ }; - }; - const mesh = face4.meshRaw; - if (!mesh || mesh.length < 300) - return { angle: { pitch: 0, yaw: 0, roll: 0 }, matrix: [1, 0, 0, 0, 1, 0, 0, 0, 1], gaze: { bearing: 0, strength: 0 } }; - const size2 = Math.max(face4.boxRaw[2] * imageSize[0], face4.boxRaw[3] * imageSize[1]) / 1.5; - const pts = [mesh[10], mesh[152], mesh[234], mesh[454]].map((pt) => [pt[0] * imageSize[0] / size2, pt[1] * imageSize[1] / size2, pt[2]]); - const yAxis = normalize2(subVectors(pts[1], pts[0])); - let xAxis = normalize2(subVectors(pts[3], pts[2])); - const zAxis = normalize2(crossVectors(xAxis, yAxis)); - xAxis = crossVectors(yAxis, zAxis); - const matrix = [ - xAxis[0], - xAxis[1], - xAxis[2], - yAxis[0], - yAxis[1], - yAxis[2], - zAxis[0], - zAxis[1], - zAxis[2] - ]; - const angle = rotationMatrixToEulerAngle(matrix); - const gaze = mesh.length === 478 ? calculateGaze(face4) : { bearing: 0, strength: 0 }; - return { angle, matrix, gaze }; -}; - -// src/face/face.ts -var detectFace = async (instance2, input) => { - var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C; - let timeStamp = now(); - let ageRes; - let gearRes; - let genderRes; - let emotionRes; - let mobilefacenetRes; - let insightfaceRes; - let antispoofRes; - let livenessRes; - let descRes; - const faceRes = []; - instance2.state = "run:face"; - const faces = await predict6(input, instance2.config); - instance2.performance.face = env.perfadd ? (instance2.performance.face || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - if (!input.shape || input.shape.length !== 4) - return []; - if (!faces) - return []; - for (let i = 0; i < faces.length; i++) { - instance2.analyze("Get Face"); - if (!faces[i].tensor || faces[i].tensor.isDisposedInternal) { - log("Face object is disposed:", faces[i].tensor); - continue; - } - if ((_a = instance2.config.face.detector) == null ? void 0 : _a.mask) { - const masked = await mask(faces[i]); - tf37.dispose(faces[i].tensor); - if (masked) - faces[i].tensor = masked; - } - const rotation = faces[i].mesh && faces[i].mesh.length > 200 ? calculateFaceAngle(faces[i], [input.shape[2], input.shape[1]]) : null; - instance2.analyze("Start Emotion:"); - if (instance2.config.async) { - emotionRes = ((_b = instance2.config.face.emotion) == null ? void 0 : _b.enabled) ? predict5(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : []; - } else { - instance2.state = "run:emotion"; - timeStamp = now(); - emotionRes = ((_c = instance2.config.face.emotion) == null ? void 0 : _c.enabled) ? await predict5(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : []; - instance2.performance.emotion = env.perfadd ? (instance2.performance.emotion || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - } - instance2.analyze("End Emotion:"); - instance2.analyze("Start AntiSpoof:"); - if (instance2.config.async) { - antispoofRes = ((_d = instance2.config.face.antispoof) == null ? void 0 : _d.enabled) ? predict(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : 0; - } else { - instance2.state = "run:antispoof"; - timeStamp = now(); - antispoofRes = ((_e = instance2.config.face.antispoof) == null ? void 0 : _e.enabled) ? await predict(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : 0; - instance2.performance.antispoof = env.perfadd ? (instance2.performance.antispoof || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - } - instance2.analyze("End AntiSpoof:"); - instance2.analyze("Start Liveness:"); - if (instance2.config.async) { - livenessRes = ((_f = instance2.config.face.liveness) == null ? void 0 : _f.enabled) ? predict12(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : 0; - } else { - instance2.state = "run:liveness"; - timeStamp = now(); - livenessRes = ((_g = instance2.config.face.liveness) == null ? void 0 : _g.enabled) ? await predict12(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : 0; - instance2.performance.liveness = env.perfadd ? (instance2.performance.antispoof || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - } - instance2.analyze("End Liveness:"); - instance2.analyze("Start GEAR:"); - if (instance2.config.async) { - gearRes = ((_h = instance2.config.face.gear) == null ? void 0 : _h.enabled) ? predict8(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : null; - } else { - instance2.state = "run:gear"; - timeStamp = now(); - gearRes = ((_i = instance2.config.face.gear) == null ? void 0 : _i.enabled) ? await predict8(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : null; - instance2.performance.gear = Math.trunc(now() - timeStamp); - } - instance2.analyze("End GEAR:"); - instance2.analyze("Start SSRNet:"); - if (instance2.config.async) { - ageRes = ((_j = instance2.config.face["ssrnet"]) == null ? void 0 : _j.enabled) ? predict20(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : null; - genderRes = ((_k = instance2.config.face["ssrnet"]) == null ? void 0 : _k.enabled) ? predict21(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : null; - } else { - instance2.state = "run:ssrnet"; - timeStamp = now(); - ageRes = ((_l = instance2.config.face["ssrnet"]) == null ? void 0 : _l.enabled) ? await predict20(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : null; - genderRes = ((_m = instance2.config.face["ssrnet"]) == null ? void 0 : _m.enabled) ? await predict21(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : null; - instance2.performance.ssrnet = Math.trunc(now() - timeStamp); - } - instance2.analyze("End SSRNet:"); - instance2.analyze("Start MobileFaceNet:"); - if (instance2.config.async) { - mobilefacenetRes = ((_n = instance2.config.face["mobilefacenet"]) == null ? void 0 : _n.enabled) ? predict14(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : null; - } else { - instance2.state = "run:mobilefacenet"; - timeStamp = now(); - mobilefacenetRes = ((_o = instance2.config.face["mobilefacenet"]) == null ? void 0 : _o.enabled) ? await predict14(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : null; - instance2.performance.mobilefacenet = Math.trunc(now() - timeStamp); - } - instance2.analyze("End MobileFaceNet:"); - instance2.analyze("Start InsightFace:"); - if (instance2.config.async) { - insightfaceRes = ((_p = instance2.config.face["insightface"]) == null ? void 0 : _p.enabled) ? predict11(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : null; - } else { - instance2.state = "run:mobilefacenet"; - timeStamp = now(); - insightfaceRes = ((_q = instance2.config.face["insightface"]) == null ? void 0 : _q.enabled) ? await predict11(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : null; - instance2.performance.mobilefacenet = Math.trunc(now() - timeStamp); - } - instance2.analyze("End InsightFace:"); - instance2.analyze("Start Description:"); - if (instance2.config.async) { - descRes = predict7(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length); - } else { - instance2.state = "run:description"; - timeStamp = now(); - descRes = await predict7(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length); - instance2.performance.description = env.perfadd ? (instance2.performance.description || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - } - instance2.analyze("End Description:"); - if (instance2.config.async) { - [ageRes, genderRes, emotionRes, mobilefacenetRes, insightfaceRes, descRes, gearRes, antispoofRes, livenessRes] = await Promise.all([ageRes, genderRes, emotionRes, mobilefacenetRes, insightfaceRes, descRes, gearRes, antispoofRes, livenessRes]); - } - instance2.analyze("Finish Face:"); - if (((_r = instance2.config.face["ssrnet"]) == null ? void 0 : _r.enabled) && ageRes && genderRes) { - descRes = { - ...descRes, - age: ageRes.age, - gender: genderRes.gender, - genderScore: genderRes.genderScore - }; - } - if (((_s = instance2.config.face.gear) == null ? void 0 : _s.enabled) && gearRes) { - descRes = { - ...descRes, - age: gearRes.age, - gender: gearRes.gender, - genderScore: gearRes.genderScore, - race: gearRes.race - }; - } - if (((_t = instance2.config.face["mobilefacenet"]) == null ? void 0 : _t.enabled) && mobilefacenetRes) { - descRes.descriptor = mobilefacenetRes; - } - if (((_u = instance2.config.face["insightface"]) == null ? void 0 : _u.enabled) && insightfaceRes) { - descRes.descriptor = insightfaceRes; - } - if (!((_v = instance2.config.face.iris) == null ? void 0 : _v.enabled)) { - } - const irisSize = ((_y = (_x = (_w = faces[i]) == null ? void 0 : _w.annotations) == null ? void 0 : _x.leftEyeIris) == null ? void 0 : _y[0]) && ((_B = (_A = (_z = faces[i]) == null ? void 0 : _z.annotations) == null ? void 0 : _A.rightEyeIris) == null ? void 0 : _B[0]) && faces[i].annotations.leftEyeIris.length > 0 && faces[i].annotations.rightEyeIris.length > 0 && faces[i].annotations.leftEyeIris[0] !== null && faces[i].annotations.rightEyeIris[0] !== null ? Math.max(Math.abs(faces[i].annotations.leftEyeIris[3][0] - faces[i].annotations.leftEyeIris[1][0]), Math.abs(faces[i].annotations.rightEyeIris[4][1] - faces[i].annotations.rightEyeIris[2][1])) / input.shape[2] : 0; - const tensor6 = ((_C = instance2.config.face.detector) == null ? void 0 : _C.return) ? tf37.squeeze(faces[i].tensor) : null; - tf37.dispose(faces[i].tensor); - if (faces[i].tensor) - delete faces[i].tensor; - const res = { - ...faces[i], - id: i - }; - if (descRes.age) - res.age = descRes.age; - if (descRes.gender) - res.gender = descRes.gender; - if (descRes.genderScore) - res.genderScore = descRes.genderScore; - if (descRes.descriptor) - res.embedding = descRes.descriptor; - if (descRes.race) - res.race = descRes.race; - if (emotionRes) - res.emotion = emotionRes; - if (antispoofRes) - res.real = antispoofRes; - if (livenessRes) - res.live = livenessRes; - if (irisSize && irisSize !== 0) - res.iris = Math.trunc(500 / irisSize / 11.7) / 100; - if (rotation) - res.rotation = rotation; - if (tensor6) - res.tensor = tensor6; - faceRes.push(res); - instance2.analyze("End Face"); - } - instance2.analyze("End FaceMesh:"); - if (instance2.config.async) { - if (instance2.performance.face) - delete instance2.performance.face; - if (instance2.performance.age) - delete instance2.performance.age; - if (instance2.performance.gender) - delete instance2.performance.gender; - if (instance2.performance.emotion) - delete instance2.performance.emotion; - } - return faceRes; -}; - -// src/gesture/gesture.ts -var body2 = (res) => { - if (!res) - return []; - const gestures = []; - for (let i = 0; i < res.length; i++) { - const leftWrist = res[i].keypoints.find((a) => a.part === "leftWrist"); - const rightWrist = res[i].keypoints.find((a) => a.part === "rightWrist"); - const nose = res[i].keypoints.find((a) => a.part === "nose"); - if (nose && leftWrist && rightWrist && leftWrist.position[1] < nose.position[1] && rightWrist.position[1] < nose.position[1]) - gestures.push({ body: i, gesture: "i give up" }); - else if (nose && leftWrist && leftWrist.position[1] < nose.position[1]) - gestures.push({ body: i, gesture: "raise left hand" }); - else if (nose && rightWrist && rightWrist.position[1] < nose.position[1]) - gestures.push({ body: i, gesture: "raise right hand" }); - const leftShoulder = res[i].keypoints.find((a) => a.part === "leftShoulder"); - const rightShoulder = res[i].keypoints.find((a) => a.part === "rightShoulder"); - if (leftShoulder && rightShoulder && Math.abs(leftShoulder.positionRaw[1] - rightShoulder.positionRaw[1]) > 0.1) { - gestures.push({ body: i, gesture: `leaning ${leftShoulder.position[1] > rightShoulder.position[1] ? "left" : "right"}` }); - } - } - return gestures; -}; -var face2 = (res) => { - if (!res) - return []; - const gestures = []; - for (let i = 0; i < res.length; i++) { - if (res[i].mesh && res[i].mesh.length > 450) { - const zDiff = (res[i].mesh[33][2] || 0) - (res[i].mesh[263][2] || 0); - const xDiff = res[i].mesh[33][0] - res[i].mesh[263][0]; - if (Math.abs(zDiff / xDiff) <= 0.15) - gestures.push({ face: i, gesture: "facing center" }); - else - gestures.push({ face: i, gesture: `facing ${zDiff < 0 ? "left" : "right"}` }); - const openLeft = Math.abs(res[i].mesh[374][1] - res[i].mesh[386][1]) / Math.abs(res[i].mesh[443][1] - res[i].mesh[450][1]); - if (openLeft < 0.2) - gestures.push({ face: i, gesture: "blink left eye" }); - const openRight = Math.abs(res[i].mesh[145][1] - res[i].mesh[159][1]) / Math.abs(res[i].mesh[223][1] - res[i].mesh[230][1]); - if (openRight < 0.2) - gestures.push({ face: i, gesture: "blink right eye" }); - const mouthOpen = Math.min(100, 500 * Math.abs(res[i].mesh[13][1] - res[i].mesh[14][1]) / Math.abs(res[i].mesh[10][1] - res[i].mesh[152][1])); - if (mouthOpen > 10) - gestures.push({ face: i, gesture: `mouth ${Math.trunc(mouthOpen)}% open` }); - const chinDepth = res[i].mesh[152][2] || 0; - if (Math.abs(chinDepth) > 10) - gestures.push({ face: i, gesture: `head ${chinDepth < 0 ? "up" : "down"}` }); - } - } - return gestures; -}; -var iris2 = (res) => { - var _a, _b, _c, _d; - if (!res) - return []; - const gestures = []; - for (let i = 0; i < res.length; i++) { - if (!((_b = (_a = res[i].annotations) == null ? void 0 : _a.leftEyeIris) == null ? void 0 : _b[0]) || !((_d = (_c = res[i].annotations) == null ? void 0 : _c.rightEyeIris) == null ? void 0 : _d[0])) - continue; - const sizeXLeft = res[i].annotations.leftEyeIris[3][0] - res[i].annotations.leftEyeIris[1][0]; - const sizeYLeft = res[i].annotations.leftEyeIris[4][1] - res[i].annotations.leftEyeIris[2][1]; - const areaLeft = Math.abs(sizeXLeft * sizeYLeft); - const sizeXRight = res[i].annotations.rightEyeIris[3][0] - res[i].annotations.rightEyeIris[1][0]; - const sizeYRight = res[i].annotations.rightEyeIris[4][1] - res[i].annotations.rightEyeIris[2][1]; - const areaRight = Math.abs(sizeXRight * sizeYRight); - let center = false; - const difference = Math.abs(areaLeft - areaRight) / Math.max(areaLeft, areaRight); - if (difference < 0.25) { - center = true; - gestures.push({ iris: i, gesture: "facing center" }); - } - const leftIrisCenterX = Math.abs(res[i].mesh[263][0] - res[i].annotations.leftEyeIris[0][0]) / res[i].box[2]; - const rightIrisCenterX = Math.abs(res[i].mesh[33][0] - res[i].annotations.rightEyeIris[0][0]) / res[i].box[2]; - if (leftIrisCenterX > 0.06 || rightIrisCenterX > 0.06) - center = false; - if (leftIrisCenterX > rightIrisCenterX) { - if (leftIrisCenterX > 0.05) - gestures.push({ iris: i, gesture: "looking right" }); - } else { - if (rightIrisCenterX > 0.05) - gestures.push({ iris: i, gesture: "looking left" }); - } - const rightIrisCenterY = Math.abs(res[i].mesh[145][1] - res[i].annotations.rightEyeIris[0][1]) / res[i].box[3]; - const leftIrisCenterY = Math.abs(res[i].mesh[374][1] - res[i].annotations.leftEyeIris[0][1]) / res[i].box[3]; - if (leftIrisCenterY < 0.01 || rightIrisCenterY < 0.01 || leftIrisCenterY > 0.022 || rightIrisCenterY > 0.022) - center = false; - if (leftIrisCenterY < 0.01 || rightIrisCenterY < 0.01) - gestures.push({ iris: i, gesture: "looking down" }); - if (leftIrisCenterY > 0.022 || rightIrisCenterY > 0.022) - gestures.push({ iris: i, gesture: "looking up" }); - if (center) - gestures.push({ iris: i, gesture: "looking center" }); - } - return gestures; -}; -var hand2 = (res) => { - if (!res) - return []; - const gestures = []; - for (let i = 0; i < res.length; i++) { - const fingers = []; - if (res[i].annotations) { - for (const [finger, pos] of Object.entries(res[i].annotations)) { - if (finger !== "palmBase" && Array.isArray(pos) && pos[0]) - fingers.push({ name: finger.toLowerCase(), position: pos[0] }); - } - } - if (fingers && fingers.length > 0) { - const closest = fingers.reduce((best, a) => (best.position[2] || 0) < (a.position[2] || 0) ? best : a); - gestures.push({ hand: i, gesture: `${closest.name} forward` }); - const highest = fingers.reduce((best, a) => best.position[1] < a.position[1] ? best : a); - gestures.push({ hand: i, gesture: `${highest.name} up` }); - } - if (res[i].keypoints) { - const poses = match(res[i].keypoints); - for (const pose of poses) - gestures.push({ hand: i, gesture: pose.name }); - } - } - return gestures; -}; - -// src/util/interpolate.ts -var bufferedResult = { face: [], body: [], hand: [], gesture: [], object: [], persons: [], performance: {}, timestamp: 0, error: null }; -var interpolateTime = 0; -function calc2(newResult, config3) { - var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w; - const t0 = now(); - if (!newResult) - return { face: [], body: [], hand: [], gesture: [], object: [], persons: [], performance: {}, timestamp: 0, error: null }; - const elapsed = Date.now() - newResult.timestamp; - const bufferedFactor = elapsed < 1e3 ? 8 - Math.log(elapsed + 1) : 1; - if (newResult.canvas) - bufferedResult.canvas = newResult.canvas; - if (newResult.error) - bufferedResult.error = newResult.error; - if (!bufferedResult.body || newResult.body.length !== bufferedResult.body.length) { - bufferedResult.body = JSON.parse(JSON.stringify(newResult.body)); - } else { - for (let i = 0; i < newResult.body.length; i++) { - const box = newResult.body[i].box.map((newBoxCoord, j) => ((bufferedFactor - 1) * bufferedResult.body[i].box[j] + newBoxCoord) / bufferedFactor); - const boxRaw = newResult.body[i].boxRaw.map((newBoxCoord, j) => ((bufferedFactor - 1) * bufferedResult.body[i].boxRaw[j] + newBoxCoord) / bufferedFactor); - const keypoints = newResult.body[i].keypoints.map((newKpt, j) => { - var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2; - return { - score: newKpt.score, - part: newKpt.part, - position: [ - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].position[0] || 0) + (newKpt.position[0] || 0)) / bufferedFactor : newKpt.position[0], - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].position[1] || 0) + (newKpt.position[1] || 0)) / bufferedFactor : newKpt.position[1], - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].position[2] || 0) + (newKpt.position[2] || 0)) / bufferedFactor : newKpt.position[2] - ], - positionRaw: [ - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].positionRaw[0] || 0) + (newKpt.positionRaw[0] || 0)) / bufferedFactor : newKpt.positionRaw[0], - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].positionRaw[1] || 0) + (newKpt.positionRaw[1] || 0)) / bufferedFactor : newKpt.positionRaw[1], - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].positionRaw[2] || 0) + (newKpt.positionRaw[2] || 0)) / bufferedFactor : newKpt.positionRaw[2] - ], - distance: [ - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (((_a2 = bufferedResult.body[i].keypoints[j].distance) == null ? void 0 : _a2[0]) || 0) + (((_b2 = newKpt.distance) == null ? void 0 : _b2[0]) || 0)) / bufferedFactor : (_c2 = newKpt.distance) == null ? void 0 : _c2[0], - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (((_d2 = bufferedResult.body[i].keypoints[j].distance) == null ? void 0 : _d2[1]) || 0) + (((_e2 = newKpt.distance) == null ? void 0 : _e2[1]) || 0)) / bufferedFactor : (_f2 = newKpt.distance) == null ? void 0 : _f2[1], - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (((_g2 = bufferedResult.body[i].keypoints[j].distance) == null ? void 0 : _g2[2]) || 0) + (((_h2 = newKpt.distance) == null ? void 0 : _h2[2]) || 0)) / bufferedFactor : (_i2 = newKpt.distance) == null ? void 0 : _i2[2] - ] - }; - }); - const annotations2 = {}; - let coords = { connected: {} }; - if ((_a = config3.body.modelPath) == null ? void 0 : _a.includes("efficientpose")) - coords = efficientposecoords_exports; - else if ((_b = config3.body.modelPath) == null ? void 0 : _b.includes("blazepose")) - coords = blazeposecoords_exports; - else if ((_c = config3.body.modelPath) == null ? void 0 : _c.includes("movenet")) - coords = movenetcoords_exports; - for (const [name, indexes] of Object.entries(coords.connected)) { - const pt = []; - for (let j = 0; j < indexes.length - 1; j++) { - const pt0 = keypoints.find((kp) => kp.part === indexes[j]); - const pt1 = keypoints.find((kp) => kp.part === indexes[j + 1]); - if (pt0 && pt1) - pt.push([pt0.position, pt1.position]); - } - annotations2[name] = pt; - } - bufferedResult.body[i] = { ...newResult.body[i], box, boxRaw, keypoints, annotations: annotations2 }; - } - } - if (!bufferedResult.hand || newResult.hand.length !== bufferedResult.hand.length) { - bufferedResult.hand = JSON.parse(JSON.stringify(newResult.hand)); - } else { - for (let i = 0; i < newResult.hand.length; i++) { - const box = newResult.hand[i].box.map((b, j) => ((bufferedFactor - 1) * bufferedResult.hand[i].box[j] + b) / bufferedFactor); - const boxRaw = newResult.hand[i].boxRaw.map((b, j) => ((bufferedFactor - 1) * bufferedResult.hand[i].boxRaw[j] + b) / bufferedFactor); - if (bufferedResult.hand[i].keypoints.length !== newResult.hand[i].keypoints.length) - bufferedResult.hand[i].keypoints = newResult.hand[i].keypoints; - const keypoints = newResult.hand[i].keypoints && newResult.hand[i].keypoints.length > 0 ? newResult.hand[i].keypoints.map((landmark, j) => landmark.map((coord, k) => ((bufferedFactor - 1) * (bufferedResult.hand[i].keypoints[j][k] || 1) + (coord || 0)) / bufferedFactor)) : []; - let annotations2 = {}; - if (Object.keys(bufferedResult.hand[i].annotations).length !== Object.keys(newResult.hand[i].annotations).length) { - bufferedResult.hand[i].annotations = newResult.hand[i].annotations; - annotations2 = bufferedResult.hand[i].annotations; - } else if (newResult.hand[i].annotations) { - for (const key of Object.keys(newResult.hand[i].annotations)) { - annotations2[key] = ((_f = (_e = (_d = newResult.hand[i]) == null ? void 0 : _d.annotations) == null ? void 0 : _e[key]) == null ? void 0 : _f[0]) ? newResult.hand[i].annotations[key].map((val, j) => val.map((coord, k) => ((bufferedFactor - 1) * bufferedResult.hand[i].annotations[key][j][k] + coord) / bufferedFactor)) : null; - } - } - bufferedResult.hand[i] = { ...newResult.hand[i], box, boxRaw, keypoints, annotations: annotations2 }; - } - } - if (!bufferedResult.face || newResult.face.length !== bufferedResult.face.length) { - bufferedResult.face = JSON.parse(JSON.stringify(newResult.face)); - } else { - for (let i = 0; i < newResult.face.length; i++) { - const box = newResult.face[i].box.map((b, j) => ((bufferedFactor - 1) * bufferedResult.face[i].box[j] + b) / bufferedFactor); - const boxRaw = newResult.face[i].boxRaw.map((b, j) => ((bufferedFactor - 1) * bufferedResult.face[i].boxRaw[j] + b) / bufferedFactor); - if (newResult.face[i].rotation) { - const rotation = { matrix: [0, 0, 0, 0, 0, 0, 0, 0, 0], angle: { roll: 0, yaw: 0, pitch: 0 }, gaze: { bearing: 0, strength: 0 } }; - rotation.matrix = (_g = newResult.face[i].rotation) == null ? void 0 : _g.matrix; - rotation.angle = { - roll: ((bufferedFactor - 1) * (((_i = (_h = bufferedResult.face[i].rotation) == null ? void 0 : _h.angle) == null ? void 0 : _i.roll) || 0) + (((_k = (_j = newResult.face[i].rotation) == null ? void 0 : _j.angle) == null ? void 0 : _k.roll) || 0)) / bufferedFactor, - yaw: ((bufferedFactor - 1) * (((_m = (_l = bufferedResult.face[i].rotation) == null ? void 0 : _l.angle) == null ? void 0 : _m.yaw) || 0) + (((_o = (_n = newResult.face[i].rotation) == null ? void 0 : _n.angle) == null ? void 0 : _o.yaw) || 0)) / bufferedFactor, - pitch: ((bufferedFactor - 1) * (((_q = (_p = bufferedResult.face[i].rotation) == null ? void 0 : _p.angle) == null ? void 0 : _q.pitch) || 0) + (((_s = (_r = newResult.face[i].rotation) == null ? void 0 : _r.angle) == null ? void 0 : _s.pitch) || 0)) / bufferedFactor - }; - rotation.gaze = { - bearing: ((bufferedFactor - 1) * (((_t = bufferedResult.face[i].rotation) == null ? void 0 : _t.gaze.bearing) || 0) + (((_u = newResult.face[i].rotation) == null ? void 0 : _u.gaze.bearing) || 0)) / bufferedFactor, - strength: ((bufferedFactor - 1) * (((_v = bufferedResult.face[i].rotation) == null ? void 0 : _v.gaze.strength) || 0) + (((_w = newResult.face[i].rotation) == null ? void 0 : _w.gaze.strength) || 0)) / bufferedFactor - }; - bufferedResult.face[i] = { ...newResult.face[i], rotation, box, boxRaw }; - } else { - bufferedResult.face[i] = { ...newResult.face[i], box, boxRaw }; - } - } - } - if (!bufferedResult.object || newResult.object.length !== bufferedResult.object.length) { - bufferedResult.object = JSON.parse(JSON.stringify(newResult.object)); - } else { - for (let i = 0; i < newResult.object.length; i++) { - const box = newResult.object[i].box.map((b, j) => ((bufferedFactor - 1) * bufferedResult.object[i].box[j] + b) / bufferedFactor); - const boxRaw = newResult.object[i].boxRaw.map((b, j) => ((bufferedFactor - 1) * bufferedResult.object[i].boxRaw[j] + b) / bufferedFactor); - bufferedResult.object[i] = { ...newResult.object[i], box, boxRaw }; - } - } - if (newResult.persons) { - const newPersons = newResult.persons; - if (!bufferedResult.persons || newPersons.length !== bufferedResult.persons.length) { - bufferedResult.persons = JSON.parse(JSON.stringify(newPersons)); - } else { - for (let i = 0; i < newPersons.length; i++) { - bufferedResult.persons[i].box = newPersons[i].box.map((box, j) => ((bufferedFactor - 1) * bufferedResult.persons[i].box[j] + box) / bufferedFactor); - } - } - } - if (newResult.gesture) - bufferedResult.gesture = newResult.gesture; - const t1 = now(); - interpolateTime = env.perfadd ? interpolateTime + Math.round(t1 - t0) : Math.round(t1 - t0); - if (newResult.performance) - bufferedResult.performance = { ...newResult.performance, interpolate: interpolateTime }; - return bufferedResult; -} - -// src/face/match.ts -var match_exports = {}; -__export(match_exports, { - distance: () => distance, - match: () => match2, - similarity: () => similarity -}); -function distance(descriptor1, descriptor2, options4 = { order: 2, multiplier: 25 }) { - if (!descriptor1 || !descriptor1) - return Number.MAX_SAFE_INTEGER; - let sum3 = 0; - for (let i = 0; i < descriptor1.length; i++) { - const diff = !options4.order || options4.order === 2 ? descriptor1[i] - descriptor2[i] : Math.abs(descriptor1[i] - descriptor2[i]); - sum3 += !options4.order || options4.order === 2 ? diff * diff : diff ** options4.order; - } - return (options4.multiplier || 20) * sum3; -} -var normalizeDistance = (dist, order, min2, max4) => { - if (dist === 0) - return 1; - const root = order === 2 ? Math.sqrt(dist) : dist ** (1 / order); - const norm = (1 - root / 100 - min2) / (max4 - min2); - const clamp2 = Math.max(Math.min(norm, 1), 0); - return clamp2; -}; -function similarity(descriptor1, descriptor2, options4 = { order: 2, multiplier: 25, min: 0.2, max: 0.8 }) { - const dist = distance(descriptor1, descriptor2, options4); - return normalizeDistance(dist, options4.order || 2, options4.min || 0, options4.max || 1); -} -function match2(descriptor, descriptors, options4 = { order: 2, multiplier: 25, threshold: 0, min: 0.2, max: 0.8 }) { - if (!Array.isArray(descriptor) || !Array.isArray(descriptors) || descriptor.length < 64 || descriptors.length === 0) { - return { index: -1, distance: Number.POSITIVE_INFINITY, similarity: 0 }; - } - let lowestDistance = Number.MAX_SAFE_INTEGER; - let index2 = -1; - for (let i = 0; i < descriptors.length; i++) { - const res = descriptors[i].length === descriptor.length ? distance(descriptor, descriptors[i], options4) : Number.MAX_SAFE_INTEGER; - if (res < lowestDistance) { - lowestDistance = res; - index2 = i; - } - if (lowestDistance < (options4.threshold || 0)) - break; - } - const normalizedSimilarity = normalizeDistance(lowestDistance, options4.order || 2, options4.min || 0, options4.max || 1); - return { index: index2, distance: lowestDistance, similarity: normalizedSimilarity }; -} - -// src/util/persons.ts -function join2(faces, bodies, hands, gestures, shape) { - var _a, _b, _c, _d, _e, _f; - let id = 0; - const persons = []; - for (const face4 of faces) { - const person2 = { id: id++, face: face4, body: null, hands: { left: null, right: null }, gestures: [], box: [0, 0, 0, 0] }; - for (const body4 of bodies) { - if (face4.box[0] > body4.box[0] && face4.box[0] < body4.box[0] + body4.box[2] && face4.box[1] + face4.box[3] > body4.box[1] && face4.box[1] + face4.box[3] < body4.box[1] + body4.box[3]) { - person2.body = body4; - } - } - if (person2.body) { - for (const hand3 of hands) { - if (hand3.box[0] + hand3.box[2] > person2.body.box[0] && hand3.box[0] + hand3.box[2] < person2.body.box[0] + person2.body.box[2] && hand3.box[1] + hand3.box[3] > person2.body.box[1] && hand3.box[1] + hand3.box[3] < person2.body.box[1] + person2.body.box[3]) { - if (person2.hands) - person2.hands.left = hand3; - } - if (hand3.box[0] < person2.body.box[0] + person2.body.box[2] && hand3.box[0] > person2.body.box[0] && hand3.box[1] + hand3.box[3] > person2.body.box[1] && hand3.box[1] + hand3.box[3] < person2.body.box[1] + person2.body.box[3]) { - if (person2.hands) - person2.hands.right = hand3; - } - } - } - for (const gesture2 of gestures) { - if (gesture2["face"] !== void 0 && gesture2["face"] === face4.id) - person2.gestures.push(gesture2); - else if (gesture2["iris"] !== void 0 && gesture2["iris"] === face4.id) - person2.gestures.push(gesture2); - else if (gesture2["body"] !== void 0 && gesture2["body"] === ((_a = person2.body) == null ? void 0 : _a.id)) - person2.gestures.push(gesture2); - else if (gesture2["hand"] !== void 0 && gesture2["hand"] === ((_b = person2.hands.left) == null ? void 0 : _b.id)) - person2.gestures.push(gesture2); - else if (gesture2["hand"] !== void 0 && gesture2["hand"] === ((_c = person2.hands.right) == null ? void 0 : _c.id)) - person2.gestures.push(gesture2); - } - const x = []; - const y = []; - const extractXY = (box) => { - if (box && box.length === 4) { - x.push(box[0], box[0] + box[2]); - y.push(box[1], box[1] + box[3]); - } - }; - extractXY(person2.face.box); - extractXY((_d = person2.body) == null ? void 0 : _d.box); - extractXY((_e = person2.hands.left) == null ? void 0 : _e.box); - extractXY((_f = person2.hands.right) == null ? void 0 : _f.box); - const minX = Math.min(...x); - const minY = Math.min(...y); - person2.box = [minX, minY, Math.max(...x) - minX, Math.max(...y) - minY]; - if ((shape == null ? void 0 : shape[1]) && (shape == null ? void 0 : shape[2])) - person2.boxRaw = [person2.box[0] / shape[2], person2.box[1] / shape[1], person2.box[2] / shape[2], person2.box[3] / shape[1]]; - persons.push(person2); - } - return persons; -} - -// src/sample.ts -var face3 = ` + ${e.box[0]} ${r}, + ${e.box[0]+e.box[2]} ${r}, + ${e.box[0]+e.box[2]} ${e.box[1]+e.box[3]/2} + `);t.stroke(A),t.stroke(s)}}function FA(e,t){var n;if(K.drawGaze&&((n=e.rotation)==null?void 0:n.gaze.strength)&&e.rotation.gaze.bearing&&e.annotations.leftEyeIris&&e.annotations.rightEyeIris&&e.annotations.leftEyeIris[0]&&e.annotations.rightEyeIris[0]){t.strokeStyle="pink",t.fillStyle="pink";let o=[e.annotations.leftEyeIris[0][0]+Math.sin(e.rotation.gaze.bearing)*e.rotation.gaze.strength*e.box[3],e.annotations.leftEyeIris[0][1]+Math.cos(e.rotation.gaze.bearing)*e.rotation.gaze.strength*e.box[2]];p1(t,[e.annotations.leftEyeIris[0][0],e.annotations.leftEyeIris[0][1]],[o[0],o[1]],4);let r=[e.annotations.rightEyeIris[0][0]+Math.sin(e.rotation.gaze.bearing)*e.rotation.gaze.strength*e.box[3],e.annotations.rightEyeIris[0][1]+Math.cos(e.rotation.gaze.bearing)*e.rotation.gaze.strength*e.box[2]];p1(t,[e.annotations.rightEyeIris[0][0],e.annotations.rightEyeIris[0][1]],[r[0],r[1]],4)}}function GA(e,t){if(K.drawPolygons&&e.mesh.length>=468){t.lineWidth=1;for(let n=0;ne.mesh[r]);m1(t,o,K)}LA(e,t)}}function BA(e,t){if(K.drawPoints&&e.mesh.length>=468)for(let n=0;n0&&(BA(r,o),GA(r,o),WA(r,o),FA(r,o))}}function T2(e,t,n){let o=s0(S0,n);if(!t||!e)return;let r=K0(e);if(!!r){r.lineJoin="round";for(let s=0;s0)for(let A of s.keypoints)r.fillStyle=ve(A[2],o),Pe(r,A[0],A[1],0,o);if(o.drawLabels&&s.annotations){let A=(a,l)=>{if(!a||a.length===0||!a[0])return;let c=a[a.length-1][2]||-256;r.fillStyle=ve(c,o),r.fillText(l,a[a.length-1][0]+4,a[a.length-1][1]+4)};r.font=o.font,A(s.annotations.index,"index"),A(s.annotations.middle,"middle"),A(s.annotations.ring,"ring"),A(s.annotations.pinky,"pinky"),A(s.annotations.thumb,"thumb"),A(s.annotations.palm,"palm")}if(o.drawPolygons&&s.annotations){let A=a=>{if(!(!a||a.length===0||!a[0]))for(let l=0;l0?l-1:0][0],a[l>0?l-1:0][1]),r.lineTo(a[l][0],a[l][1]),r.stroke()}};r.lineWidth=o.lineWidth,A(s.annotations.index),A(s.annotations.middle),A(s.annotations.ring),A(s.annotations.pinky),A(s.annotations.thumb)}}}}function P2(e,t,n){let o=s0(S0,n);if(!t||!e)return;let r=K0(e);if(!!r){r.lineJoin="round",r.font=o.font;for(let s of t)if(o.drawBoxes){if(r.strokeStyle=o.color,r.fillStyle=o.color,pe(r,s.box[0],s.box[1],s.box[2],s.box[3],o),o.drawLabels){let A=`${s.label} ${Math.round(100*s.score)}%`;o.shadowColor&&o.shadowColor!==""&&(r.fillStyle=o.shadowColor,r.fillText(A,s.box[0]+3,1+s.box[1]+o.lineHeight,s.box[2])),r.fillStyle=o.labelColor,r.fillText(A,s.box[0]+2,0+s.box[1]+o.lineHeight,s.box[2])}r.stroke()}}}function R2(e,t,n){let o=s0(S0,n);if(!(!t||!e)&&o.drawGestures){let r=K0(e);if(!r)return;r.font=o.font,r.fillStyle=o.color;let s=1;for(let A=0;A1&&l[1].length>0){let c=a[1]>0?`#${a[1]}`:"",x=`${a[0]} ${c}: ${l[1]}`;o.shadowColor&&o.shadowColor!==""&&(r.fillStyle=o.shadowColor,r.fillText(x,8,2+s*o.lineHeight)),r.fillStyle=o.labelColor,r.fillText(x,6,0+s*o.lineHeight),s+=1}}}}var u1=0;function h1(e,t,n){let o=s0(S0,n);if(!t||!e)return;let r=K0(e);if(!!r){r.lineJoin="round",r.font=o.font;for(let s=0;st!=n[r].y>t&&e<(n[r].x-n[s].x)*(t-n[s].y)/(n[r].y-n[s].y)+n[s].x&&(o=!o);return o}async function ko(e){if(!e.tensor||!e.mesh||e.mesh.length<100)return e.tensor;let t=e.tensor.shape[2]||0,n=e.tensor.shape[1]||0,o=await e.tensor.buffer(),r=[];for(let A of te.silhouette)r.push({x:(e.mesh[A][0]-e.box[0])/e.box[2],y:(e.mesh[A][1]-e.box[1])/e.box[3]});k2&&k2>0&&(r=r.map(A=>({x:A.x>.5?A.x+k2:A.x-k2,y:A.y>.5?A.y+k2:A.y-k2})));for(let A=0;A{let t=(i,f)=>Math.atan2(i[1]-f[1],i[0]-f[0]);if(!e.annotations.rightEyeIris||!e.annotations.leftEyeIris)return{bearing:0,strength:0};let n=[0,-.1],o=1,r=(e.mesh[33][2]||0)>(e.mesh[263][2]||0),s=r?e.mesh[473]:e.mesh[468],A=r?[(e.mesh[133][0]+e.mesh[33][0])/2,(e.mesh[133][1]+e.mesh[33][1])/2]:[(e.mesh[263][0]+e.mesh[362][0])/2,(e.mesh[263][1]+e.mesh[362][1])/2],a=r?[e.mesh[133][0]-e.mesh[33][0],e.mesh[23][1]-e.mesh[27][1]]:[e.mesh[263][0]-e.mesh[362][0],e.mesh[253][1]-e.mesh[257][1]],l=[(A[0]-s[0])/a[0]-n[0],o*(s[1]-A[1])/a[1]-n[1]],c=Math.sqrt(l[0]*l[0]+l[1]*l[1]);return c=Math.min(c,e.boxRaw[2]/2,e.boxRaw[3]/2),{bearing:(t([0,0],l)+Math.PI/2)%Math.PI,strength:c}},wo=(e,t)=>{let n=p=>{let g=Math.sqrt(p[0]*p[0]+p[1]*p[1]+p[2]*p[2]);return p[0]/=g,p[1]/=g,p[2]/=g,p},o=(p,g)=>{let v=p[0]-g[0],T=p[1]-g[1],y=p[2]-g[2];return[v,T,y]},r=(p,g)=>{let v=p[1]*g[2]-p[2]*g[1],T=p[2]*g[0]-p[0]*g[2],y=p[0]*g[1]-p[1]*g[0];return[v,T,y]},s=p=>{let[g,v,T,y,b,z,w,O,q]=p,t0,Z,U;return y<1?y>-1?(U=Math.asin(y),Z=Math.atan2(-w,g),t0=Math.atan2(-z,b)):(U=-Math.PI/2,Z=-Math.atan2(O,q),t0=0):(U=Math.PI/2,Z=Math.atan2(O,q),t0=0),Number.isNaN(t0)&&(t0=0),Number.isNaN(Z)&&(Z=0),Number.isNaN(U)&&(U=0),{pitch:2*-t0,yaw:2*-Z,roll:2*-U}},A=e.meshRaw;if(!A||A.length<300)return{angle:{pitch:0,yaw:0,roll:0},matrix:[1,0,0,0,1,0,0,0,1],gaze:{bearing:0,strength:0}};let a=Math.max(e.boxRaw[2]*t[0],e.boxRaw[3]*t[1])/1.5,l=[A[10],A[152],A[234],A[454]].map(p=>[p[0]*t[0]/a,p[1]*t[1]/a,p[2]]),c=n(o(l[1],l[0])),x=n(o(l[3],l[2])),i=n(r(x,c));x=r(c,i);let f=[x[0],x[1],x[2],c[0],c[1],c[2],i[0],i[1],i[2]],d=s(f),m=A.length===478?ZA(e):{bearing:0,strength:0};return{angle:d,matrix:f,gaze:m}};var v1=async(e,t)=>{var m,p,g,v,T,y,b,z,w,O,q,t0,Z,U,r0,P,G,P0,e0,u0,x0,H,X,J0,Q0,Re,ke,ue,E2;let n=M(),o,r,s,A,a,l,c,x,i,f=[];e.state="run:face";let d=await F3(t,e.config);if(e.performance.face=k.perfadd?(e.performance.face||0)+Math.trunc(M()-n):Math.trunc(M()-n),!t.shape||t.shape.length!==4)return[];if(!d)return[];for(let E=0;E200?wo(d[E],[t.shape[2],t.shape[1]]):null;e.analyze("Start Emotion:"),e.config.async?A=(p=e.config.face.emotion)!=null&&p.enabled?h5(d[E].tensor||a0.tensor([]),e.config,E,d.length):[]:(e.state="run:emotion",n=M(),A=(g=e.config.face.emotion)!=null&&g.enabled?await h5(d[E].tensor||a0.tensor([]),e.config,E,d.length):[],e.performance.emotion=k.perfadd?(e.performance.emotion||0)+Math.trunc(M()-n):Math.trunc(M()-n)),e.analyze("End Emotion:"),e.analyze("Start AntiSpoof:"),e.config.async?c=(v=e.config.face.antispoof)!=null&&v.enabled?$t(d[E].tensor||a0.tensor([]),e.config,E,d.length):0:(e.state="run:antispoof",n=M(),c=(T=e.config.face.antispoof)!=null&&T.enabled?await $t(d[E].tensor||a0.tensor([]),e.config,E,d.length):0,e.performance.antispoof=k.perfadd?(e.performance.antispoof||0)+Math.trunc(M()-n):Math.trunc(M()-n)),e.analyze("End AntiSpoof:"),e.analyze("Start Liveness:"),e.config.async?x=(y=e.config.face.liveness)!=null&&y.enabled?H5(d[E].tensor||a0.tensor([]),e.config,E,d.length):0:(e.state="run:liveness",n=M(),x=(b=e.config.face.liveness)!=null&&b.enabled?await H5(d[E].tensor||a0.tensor([]),e.config,E,d.length):0,e.performance.liveness=k.perfadd?(e.performance.antispoof||0)+Math.trunc(M()-n):Math.trunc(M()-n)),e.analyze("End Liveness:"),e.analyze("Start GEAR:"),e.config.async?r=(z=e.config.face.gear)!=null&&z.enabled?E5(d[E].tensor||a0.tensor([]),e.config,E,d.length):null:(e.state="run:gear",n=M(),r=(w=e.config.face.gear)!=null&&w.enabled?await E5(d[E].tensor||a0.tensor([]),e.config,E,d.length):null,e.performance.gear=Math.trunc(M()-n)),e.analyze("End GEAR:"),e.analyze("Start SSRNet:"),e.config.async?(o=(O=e.config.face.ssrnet)!=null&&O.enabled?l1(d[E].tensor||a0.tensor([]),e.config,E,d.length):null,s=(q=e.config.face.ssrnet)!=null&&q.enabled?x1(d[E].tensor||a0.tensor([]),e.config,E,d.length):null):(e.state="run:ssrnet",n=M(),o=(t0=e.config.face.ssrnet)!=null&&t0.enabled?await l1(d[E].tensor||a0.tensor([]),e.config,E,d.length):null,s=(Z=e.config.face.ssrnet)!=null&&Z.enabled?await x1(d[E].tensor||a0.tensor([]),e.config,E,d.length):null,e.performance.ssrnet=Math.trunc(M()-n)),e.analyze("End SSRNet:"),e.analyze("Start MobileFaceNet:"),e.config.async?a=(U=e.config.face.mobilefacenet)!=null&&U.enabled?Z5(d[E].tensor||a0.tensor([]),e.config,E,d.length):null:(e.state="run:mobilefacenet",n=M(),a=(r0=e.config.face.mobilefacenet)!=null&&r0.enabled?await Z5(d[E].tensor||a0.tensor([]),e.config,E,d.length):null,e.performance.mobilefacenet=Math.trunc(M()-n)),e.analyze("End MobileFaceNet:"),e.analyze("Start InsightFace:"),e.config.async?l=(P=e.config.face.insightface)!=null&&P.enabled?G5(d[E].tensor||a0.tensor([]),e.config,E,d.length):null:(e.state="run:mobilefacenet",n=M(),l=(G=e.config.face.insightface)!=null&&G.enabled?await G5(d[E].tensor||a0.tensor([]),e.config,E,d.length):null,e.performance.mobilefacenet=Math.trunc(M()-n)),e.analyze("End InsightFace:"),e.analyze("Start Description:"),e.config.async?i=P5(d[E].tensor||a0.tensor([]),e.config,E,d.length):(e.state="run:description",n=M(),i=await P5(d[E].tensor||a0.tensor([]),e.config,E,d.length),e.performance.description=k.perfadd?(e.performance.description||0)+Math.trunc(M()-n):Math.trunc(M()-n)),e.analyze("End Description:"),e.config.async&&([o,s,A,a,l,i,r,c,x]=await Promise.all([o,s,A,a,l,i,r,c,x])),e.analyze("Finish Face:"),((P0=e.config.face.ssrnet)==null?void 0:P0.enabled)&&o&&s&&(i={...i,age:o.age,gender:s.gender,genderScore:s.genderScore}),((e0=e.config.face.gear)==null?void 0:e0.enabled)&&r&&(i={...i,age:r.age,gender:r.gender,genderScore:r.genderScore,race:r.race}),((u0=e.config.face.mobilefacenet)==null?void 0:u0.enabled)&&a&&(i.descriptor=a),((x0=e.config.face.insightface)==null?void 0:x0.enabled)&&l&&(i.descriptor=l),(H=e.config.face.iris)!=null&&H.enabled;let s2=((Q0=(J0=(X=d[E])==null?void 0:X.annotations)==null?void 0:J0.leftEyeIris)==null?void 0:Q0[0])&&((ue=(ke=(Re=d[E])==null?void 0:Re.annotations)==null?void 0:ke.rightEyeIris)==null?void 0:ue[0])&&d[E].annotations.leftEyeIris.length>0&&d[E].annotations.rightEyeIris.length>0&&d[E].annotations.leftEyeIris[0]!==null&&d[E].annotations.rightEyeIris[0]!==null?Math.max(Math.abs(d[E].annotations.leftEyeIris[3][0]-d[E].annotations.leftEyeIris[1][0]),Math.abs(d[E].annotations.rightEyeIris[4][1]-d[E].annotations.rightEyeIris[2][1]))/t.shape[2]:0,z1=(E2=e.config.face.detector)!=null&&E2.return?a0.squeeze(d[E].tensor):null;a0.dispose(d[E].tensor),d[E].tensor&&delete d[E].tensor;let _0={...d[E],id:E};i.age&&(_0.age=i.age),i.gender&&(_0.gender=i.gender),i.genderScore&&(_0.genderScore=i.genderScore),i.descriptor&&(_0.embedding=i.descriptor),i.race&&(_0.race=i.race),A&&(_0.emotion=A),c&&(_0.real=c),x&&(_0.live=x),s2&&s2!==0&&(_0.iris=Math.trunc(500/s2/11.7)/100),z2&&(_0.rotation=z2),z1&&(_0.tensor=z1),f.push(_0),e.analyze("End Face")}return e.analyze("End FaceMesh:"),e.config.async&&(e.performance.face&&delete e.performance.face,e.performance.age&&delete e.performance.age,e.performance.gender&&delete e.performance.gender,e.performance.emotion&&delete e.performance.emotion),f};var Eo=e=>{if(!e)return[];let t=[];for(let n=0;nl.part==="leftWrist"),r=e[n].keypoints.find(l=>l.part==="rightWrist"),s=e[n].keypoints.find(l=>l.part==="nose");s&&o&&r&&o.position[1]l.part==="leftShoulder"),a=e[n].keypoints.find(l=>l.part==="rightShoulder");A&&a&&Math.abs(A.positionRaw[1]-a.positionRaw[1])>.1&&t.push({body:n,gesture:`leaning ${A.position[1]>a.position[1]?"left":"right"}`})}return t},zo=e=>{if(!e)return[];let t=[];for(let n=0;n450){let o=(e[n].mesh[33][2]||0)-(e[n].mesh[263][2]||0),r=e[n].mesh[33][0]-e[n].mesh[263][0];Math.abs(o/r)<=.15?t.push({face:n,gesture:"facing center"}):t.push({face:n,gesture:`facing ${o<0?"left":"right"}`}),Math.abs(e[n].mesh[374][1]-e[n].mesh[386][1])/Math.abs(e[n].mesh[443][1]-e[n].mesh[450][1])<.2&&t.push({face:n,gesture:"blink left eye"}),Math.abs(e[n].mesh[145][1]-e[n].mesh[159][1])/Math.abs(e[n].mesh[223][1]-e[n].mesh[230][1])<.2&&t.push({face:n,gesture:"blink right eye"});let a=Math.min(100,500*Math.abs(e[n].mesh[13][1]-e[n].mesh[14][1])/Math.abs(e[n].mesh[10][1]-e[n].mesh[152][1]));a>10&&t.push({face:n,gesture:`mouth ${Math.trunc(a)}% open`});let l=e[n].mesh[152][2]||0;Math.abs(l)>10&&t.push({face:n,gesture:`head ${l<0?"up":"down"}`})}return t},So=e=>{var n,o,r,s;if(!e)return[];let t=[];for(let A=0;A.06||g>.06)&&(d=!1),p>g?p>.05&&t.push({iris:A,gesture:"looking right"}):g>.05&&t.push({iris:A,gesture:"looking left"});let v=Math.abs(e[A].mesh[145][1]-e[A].annotations.rightEyeIris[0][1])/e[A].box[3],T=Math.abs(e[A].mesh[374][1]-e[A].annotations.leftEyeIris[0][1])/e[A].box[3];(T<.01||v<.01||T>.022||v>.022)&&(d=!1),(T<.01||v<.01)&&t.push({iris:A,gesture:"looking down"}),(T>.022||v>.022)&&t.push({iris:A,gesture:"looking up"}),d&&t.push({iris:A,gesture:"looking center"})}return t},jo=e=>{if(!e)return[];let t=[];for(let n=0;n0){let r=o.reduce((A,a)=>(A.position[2]||0)<(a.position[2]||0)?A:a);t.push({hand:n,gesture:`${r.name} forward`});let s=o.reduce((A,a)=>A.position[1]((r-1)*j.body[P].box[X]+H)/r),P0=e.body[P].boxRaw.map((H,X)=>((r-1)*j.body[P].boxRaw[X]+H)/r),e0=e.body[P].keypoints.map((H,X)=>{var J0,Q0,Re,ke,ue,E2,E,z2,s2;return{score:H.score,part:H.part,position:[j.body[P].keypoints[X]?((r-1)*(j.body[P].keypoints[X].position[0]||0)+(H.position[0]||0))/r:H.position[0],j.body[P].keypoints[X]?((r-1)*(j.body[P].keypoints[X].position[1]||0)+(H.position[1]||0))/r:H.position[1],j.body[P].keypoints[X]?((r-1)*(j.body[P].keypoints[X].position[2]||0)+(H.position[2]||0))/r:H.position[2]],positionRaw:[j.body[P].keypoints[X]?((r-1)*(j.body[P].keypoints[X].positionRaw[0]||0)+(H.positionRaw[0]||0))/r:H.positionRaw[0],j.body[P].keypoints[X]?((r-1)*(j.body[P].keypoints[X].positionRaw[1]||0)+(H.positionRaw[1]||0))/r:H.positionRaw[1],j.body[P].keypoints[X]?((r-1)*(j.body[P].keypoints[X].positionRaw[2]||0)+(H.positionRaw[2]||0))/r:H.positionRaw[2]],distance:[j.body[P].keypoints[X]?((r-1)*(((J0=j.body[P].keypoints[X].distance)==null?void 0:J0[0])||0)+(((Q0=H.distance)==null?void 0:Q0[0])||0))/r:(Re=H.distance)==null?void 0:Re[0],j.body[P].keypoints[X]?((r-1)*(((ke=j.body[P].keypoints[X].distance)==null?void 0:ke[1])||0)+(((ue=H.distance)==null?void 0:ue[1])||0))/r:(E2=H.distance)==null?void 0:E2[1],j.body[P].keypoints[X]?((r-1)*(((E=j.body[P].keypoints[X].distance)==null?void 0:E[2])||0)+(((z2=H.distance)==null?void 0:z2[2])||0))/r:(s2=H.distance)==null?void 0:s2[2]]}}),u0={},x0={connected:{}};(A=t.body.modelPath)!=null&&A.includes("efficientpose")?x0=xt:(a=t.body.modelPath)!=null&&a.includes("blazepose")?x0=at:(l=t.body.modelPath)!=null&&l.includes("movenet")&&(x0=G2);for(let[H,X]of Object.entries(x0.connected)){let J0=[];for(let Q0=0;Q0ue.part===X[Q0]),ke=e0.find(ue=>ue.part===X[Q0+1]);Re&&ke&&J0.push([Re.position,ke.position])}u0[H]=J0}j.body[P]={...e.body[P],box:G,boxRaw:P0,keypoints:e0,annotations:u0}}if(!j.hand||e.hand.length!==j.hand.length)j.hand=JSON.parse(JSON.stringify(e.hand));else for(let P=0;P((r-1)*j.hand[P].box[H]+x0)/r),P0=e.hand[P].boxRaw.map((x0,H)=>((r-1)*j.hand[P].boxRaw[H]+x0)/r);j.hand[P].keypoints.length!==e.hand[P].keypoints.length&&(j.hand[P].keypoints=e.hand[P].keypoints);let e0=e.hand[P].keypoints&&e.hand[P].keypoints.length>0?e.hand[P].keypoints.map((x0,H)=>x0.map((X,J0)=>((r-1)*(j.hand[P].keypoints[H][J0]||1)+(X||0))/r)):[],u0={};if(Object.keys(j.hand[P].annotations).length!==Object.keys(e.hand[P].annotations).length)j.hand[P].annotations=e.hand[P].annotations,u0=j.hand[P].annotations;else if(e.hand[P].annotations)for(let x0 of Object.keys(e.hand[P].annotations))u0[x0]=(i=(x=(c=e.hand[P])==null?void 0:c.annotations)==null?void 0:x[x0])!=null&&i[0]?e.hand[P].annotations[x0].map((H,X)=>H.map((J0,Q0)=>((r-1)*j.hand[P].annotations[x0][X][Q0]+J0)/r)):null;j.hand[P]={...e.hand[P],box:G,boxRaw:P0,keypoints:e0,annotations:u0}}if(!j.face||e.face.length!==j.face.length)j.face=JSON.parse(JSON.stringify(e.face));else for(let P=0;P((r-1)*j.face[P].box[u0]+e0)/r),P0=e.face[P].boxRaw.map((e0,u0)=>((r-1)*j.face[P].boxRaw[u0]+e0)/r);if(e.face[P].rotation){let e0={matrix:[0,0,0,0,0,0,0,0,0],angle:{roll:0,yaw:0,pitch:0},gaze:{bearing:0,strength:0}};e0.matrix=(f=e.face[P].rotation)==null?void 0:f.matrix,e0.angle={roll:((r-1)*(((m=(d=j.face[P].rotation)==null?void 0:d.angle)==null?void 0:m.roll)||0)+(((g=(p=e.face[P].rotation)==null?void 0:p.angle)==null?void 0:g.roll)||0))/r,yaw:((r-1)*(((T=(v=j.face[P].rotation)==null?void 0:v.angle)==null?void 0:T.yaw)||0)+(((b=(y=e.face[P].rotation)==null?void 0:y.angle)==null?void 0:b.yaw)||0))/r,pitch:((r-1)*(((w=(z=j.face[P].rotation)==null?void 0:z.angle)==null?void 0:w.pitch)||0)+(((q=(O=e.face[P].rotation)==null?void 0:O.angle)==null?void 0:q.pitch)||0))/r},e0.gaze={bearing:((r-1)*(((t0=j.face[P].rotation)==null?void 0:t0.gaze.bearing)||0)+(((Z=e.face[P].rotation)==null?void 0:Z.gaze.bearing)||0))/r,strength:((r-1)*(((U=j.face[P].rotation)==null?void 0:U.gaze.strength)||0)+(((r0=e.face[P].rotation)==null?void 0:r0.gaze.strength)||0))/r},j.face[P]={...e.face[P],rotation:e0,box:G,boxRaw:P0}}else j.face[P]={...e.face[P],box:G,boxRaw:P0}}if(!j.object||e.object.length!==j.object.length)j.object=JSON.parse(JSON.stringify(e.object));else for(let P=0;P((r-1)*j.object[P].box[u0]+e0)/r),P0=e.object[P].boxRaw.map((e0,u0)=>((r-1)*j.object[P].boxRaw[u0]+e0)/r);j.object[P]={...e.object[P],box:G,boxRaw:P0}}if(e.persons){let P=e.persons;if(!j.persons||P.length!==j.persons.length)j.persons=JSON.parse(JSON.stringify(P));else for(let G=0;G((r-1)*j.persons[G].box[e0]+P0)/r)}e.gesture&&(j.gesture=e.gesture);let s=M();return P1=k.perfadd?P1+Math.round(s-n):Math.round(s-n),e.performance&&(j.performance={...e.performance,interpolate:P1}),j}var w1={};we(w1,{distance:()=>Z2,match:()=>k1,similarity:()=>R1});function Z2(e,t,n={order:2,multiplier:25}){if(!e||!e)return Number.MAX_SAFE_INTEGER;let o=0;for(let r=0;r{if(e===0)return 1;let r=t===2?Math.sqrt(e):e**(1/t),s=(1-r/100-n)/(o-n);return Math.max(Math.min(s,1),0)};function R1(e,t,n={order:2,multiplier:25,min:.2,max:.8}){let o=Z2(e,t,n);return Oo(o,n.order||2,n.min||0,n.max||1)}function k1(e,t,n={order:2,multiplier:25,threshold:0,min:.2,max:.8}){if(!Array.isArray(e)||!Array.isArray(t)||e.length<64||t.length===0)return{index:-1,distance:Number.POSITIVE_INFINITY,similarity:0};let o=Number.MAX_SAFE_INTEGER,r=-1;for(let A=0;Ab.box[0]&&d.box[0]b.box[1]&&d.box[1]+d.box[3]m.body.box[0]&&b.box[0]+b.box[2]m.body.box[1]&&b.box[1]+b.box[3]m.body.box[0]&&b.box[1]+b.box[3]>m.body.box[1]&&b.box[1]+b.box[3]{b&&b.length===4&&(p.push(b[0],b[0]+b[2]),g.push(b[1],b[1]+b[3]))};v(m.face.box),v((x=m.body)==null?void 0:x.box),v((i=m.hands.left)==null?void 0:i.box),v((f=m.hands.right)==null?void 0:f.box);let T=Math.min(...p),y=Math.min(...g);m.box=[T,y,Math.max(...p)-T,Math.max(...g)-y],(r==null?void 0:r[1])&&(r==null?void 0:r[2])&&(m.boxRaw=[m.box[0]/r[2],m.box[1]/r[1],m.box[2]/r[2],m.box[3]/r[1]]),A.push(m)}return A}var Ht=` /9j/4AAQSkZJRgABAQEAYABgAAD/4QBoRXhpZgAATU0AKgAAAAgABAEaAAUAAAABAAAAPgEbAAUA AAABAAAARgEoAAMAAAABAAIAAAExAAIAAAARAAAATgAAAAAAAABgAAAAAQAAAGAAAAABcGFpbnQu bmV0IDQuMi4xMwAA/9sAQwAGBAUGBQQGBgUGBwcGCAoQCgoJCQoUDg8MEBcUGBgXFBYWGh0lHxob @@ -13986,8 +259,7 @@ PQ4GJ+ashuK0MhWaoWcA0AaOmASMK7jRNPWYBmHyiuepO2x10qfcv6vYxCzYqoGK4HVYVTJrmb5l c6oaM5TUJ8EgGsG4kLNUHT0M64OaqMMikSRsuKbnFMRLG3zVehOaGNE445NNlnVFpDMu6uie9Vo1 8z5mOAOST2pDK91cNN+5tsrH3PrW54a06KxT7fdrlh/q1Pc+tJ6IUdZGvHPLezMcnBOWbsPap5r3 ylFtbdT1xUWNWzU0/Zbwlgfmx8zGsHWtRHmMqE59aAMyNifvHPc1f0gtPdqkY5JosJHeNci2tktY -euPnNY+oXWZEVJNrZ9aun8SIq/CzodHuriIokhDIR1ronbKZr0o6o8ipoz//2Q==`; -var body3 = ` +euPnNY+oXWZEVJNrZ9aun8SIq/CzodHuriIokhDIR1ronbKZr0o6o8ipoz//2Q==`,Vt=` /9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAsICAoIBwsKCQoNDAsNERwSEQ8PESIZGhQcKSQrKigk JyctMkA3LTA9MCcnOEw5PUNFSElIKzZPVU5GVEBHSEX/2wBDAQwNDREPESESEiFFLicuRUVFRUVF RUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUX/wAARCASwBLADASIA @@ -14555,580 +827,4 @@ AAAAAAJAAAAAAAAAAAAAABAJEAAAAAAAAAAAAAAAIEoBKAAAAAAAAAAAAAAABAlAAAAAAAIAAAAA BAkBAkBAkBAlACEgMZjdjbFW8bWrEx8YWANb6Fp+bfwab+vLDKMFK9qxH5L0bAr8OPRPKz2AY7J2 SbAjYZAI2E7AIEgIEgIEgMdkSy2NgY7MdlmyNoBXsxmFuyNgVTVjNV3KjlBRNTlXTVHKCrlIqt5T lBhEMohlFerLlBjEMohMVTEARDKCITsAk2AEgAAAkAAAAAAAAAAAAAAAAAAAAAAAASAAAAAAAAD/ -2Q==`; - -// src/warmup.ts -var tf38 = __toESM(require_tfjs_esm()); -async function warmupBitmap(instance2) { - const b64toBlob = (base64, type = "application/octet-stream") => fetch(`data:${type};base64,${base64}`).then((res2) => res2.blob()); - let blob; - let res; - switch (instance2.config.warmup) { - case "face": - blob = await b64toBlob(face3); - break; - case "body": - case "full": - blob = await b64toBlob(body3); - break; - default: - blob = null; - } - if (blob) { - const bitmap = await createImageBitmap(blob); - res = await instance2.detect(bitmap, instance2.config); - bitmap.close(); - } - return res; -} -async function warmupCanvas(instance2) { - return new Promise((resolve) => { - let src; - switch (instance2.config.warmup) { - case "face": - src = "data:image/jpeg;base64," + face3; - break; - case "full": - case "body": - src = "data:image/jpeg;base64," + body3; - break; - default: - src = ""; - } - let img; - if (typeof Image !== "undefined") - img = new Image(); - else if (env.Image) - img = new env.Image(); - else - return; - img.onload = async () => { - const canvas3 = canvas(img.naturalWidth, img.naturalHeight); - if (!canvas3) { - log("Warmup: Canvas not found"); - resolve(void 0); - } else { - const ctx = canvas3.getContext("2d"); - if (ctx) - ctx.drawImage(img, 0, 0); - const tensor6 = await instance2.image(canvas3); - const res = tensor6.tensor ? await instance2.detect(tensor6.tensor, instance2.config) : void 0; - resolve(res); - } - }; - if (src) - img.src = src; - else - resolve(void 0); - }); -} -async function warmupNode(instance2) { - const atob = (str) => Buffer.from(str, "base64"); - let img; - if (instance2.config.warmup === "face") - img = atob(face3); - else - img = atob(body3); - let res; - if ("node" in tf38 && tf38.getBackend() === "tensorflow") { - const data = tf38["node"].decodeJpeg(img); - const expanded = tf38.expandDims(data, 0); - instance2.tf.dispose(data); - res = await instance2.detect(expanded, instance2.config); - instance2.tf.dispose(expanded); - } else { - if (instance2.config.debug) - log("Warmup tfjs-node not loaded"); - } - return res; -} -async function runInference(instance2) { - let res; - if (typeof createImageBitmap === "function") - res = await warmupBitmap(instance2); - else if (typeof Image !== "undefined" || env.Canvas !== void 0) - res = await warmupCanvas(instance2); - else - res = await warmupNode(instance2); - return res; -} -async function runCompile(instance2) { - var _a, _b, _c, _d; - if (!tf38.env().flagRegistry.ENGINE_COMPILE_ONLY) - return; - const backendType = tf38.getBackend(); - const webGLBackend = tf38.backend(); - if (backendType !== "webgl" && backendType !== "humangl" || !(webGLBackend == null ? void 0 : webGLBackend.checkCompileCompletion)) { - return; - } - tf38.env().set("ENGINE_COMPILE_ONLY", true); - const numTensorsStart = tf38.engine().state.numTensors; - const compiledModels = []; - for (const [modelName, model21] of Object.entries(instance2.models).filter(([key, val]) => key !== null && val !== null)) { - const shape = ((_b = (_a = model21.inputs) == null ? void 0 : _a[0]) == null ? void 0 : _b.shape) ? [...model21.inputs[0].shape] : [1, 64, 64, 3]; - const dtype = ((_d = (_c = model21.inputs) == null ? void 0 : _c[0]) == null ? void 0 : _d.dtype) ? model21.inputs[0].dtype : "float32"; - for (let dim = 0; dim < shape.length; dim++) { - if (shape[dim] === -1) - shape[dim] = dim === 0 ? 1 : 64; - } - const tensor6 = tf38.zeros(shape, dtype); - try { - const res = model21.execute(tensor6); - compiledModels.push(modelName); - if (Array.isArray(res)) - res.forEach((t2) => tf38.dispose(t2)); - else - tf38.dispose(res); - } catch (e) { - if (instance2.config.debug) - log("compile fail model:", modelName); - } - tf38.dispose(tensor6); - } - const kernels = await webGLBackend.checkCompileCompletionAsync(); - webGLBackend.getUniformLocations(); - if (instance2.config.debug) - log("compile pass:", { models: compiledModels, kernels: kernels.length }); - tf38.env().set("ENGINE_COMPILE_ONLY", false); - const numTensorsEnd = tf38.engine().state.numTensors; - if (numTensorsEnd - numTensorsStart > 0) - log("tensor leak:", numTensorsEnd - numTensorsStart); -} -async function warmup(instance2, userConfig) { - await check(instance2, false); - const t0 = now(); - instance2.state = "warmup"; - if (userConfig) - instance2.config = mergeDeep(instance2.config, userConfig); - if (!instance2.config.warmup || instance2.config.warmup.length === 0 || instance2.config.warmup === "none") { - return { face: [], body: [], hand: [], gesture: [], object: [], performance: instance2.performance, timestamp: now(), persons: [], error: null }; - } - return new Promise(async (resolve) => { - await models_exports2.load(instance2); - await runCompile(instance2); - const res = await runInference(instance2); - const t1 = now(); - if (instance2.config.debug) - log("warmup", instance2.config.warmup, Math.round(t1 - t0), "ms"); - instance2.emit("warmup"); - resolve(res); - }); -} - -// src/human.ts -var _numTensors, _analyzeMemoryLeaks, _checkSanity, _sanity, _loops; -var Human2 = class { - constructor(userConfig) { - __publicField(this, "version"); - __publicField(this, "config"); - __publicField(this, "result"); - __publicField(this, "state"); - __publicField(this, "process"); - __publicField(this, "tf"); - __publicField(this, "env"); - __publicField(this, "draw"); - __publicField(this, "models"); - __publicField(this, "events"); - __publicField(this, "faceTriangulation"); - __publicField(this, "faceUVMap"); - __publicField(this, "performance"); - __privateAdd(this, _numTensors, void 0); - __privateAdd(this, _analyzeMemoryLeaks, void 0); - __privateAdd(this, _checkSanity, void 0); - __publicField(this, "gl"); - __publicField(this, "analyze", (...msg) => { - if (!__privateGet(this, _analyzeMemoryLeaks)) - return; - const currentTensors = this.tf.engine().state.numTensors; - const previousTensors = __privateGet(this, _numTensors); - __privateSet(this, _numTensors, currentTensors); - const leaked = currentTensors - previousTensors; - if (leaked !== 0) - log(...msg, leaked); - }); - __privateAdd(this, _sanity, (input) => { - if (!__privateGet(this, _checkSanity)) - return null; - if (!input) - return "input is not defined"; - if (this.env.node && !(input instanceof tf39.Tensor)) - return "input must be a tensor"; - try { - this.tf.getBackend(); - } catch (e) { - return "backend not loaded"; - } - return null; - }); - __publicField(this, "similarity", similarity); - __publicField(this, "distance", distance); - __publicField(this, "match", match2); - __publicField(this, "webcam", new WebCam()); - __publicField(this, "emit", (event) => { - var _a; - if ((_a = this.events) == null ? void 0 : _a.dispatchEvent) - this.events.dispatchEvent(new Event(event)); - }); - __privateAdd(this, _loops, {}); - this.env = env; - const tfVersion = (tf39.version.tfjs || tf39.version_core).replace(/-(.*)/, ""); - config.wasmPath = `https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm@${tfVersion}/dist/`; - config.modelBasePath = env.browser ? "../models/" : "file://models/"; - config.backend = env.browser ? "webgl" : "tensorflow"; - this.version = version2; - Object.defineProperty(this, "version", { value: version2 }); - this.config = JSON.parse(JSON.stringify(config)); - Object.seal(this.config); - this.config.cacheModels = typeof indexedDB !== "undefined"; - if (userConfig) - this.config = mergeDeep(this.config, userConfig); - setModelLoadOptions(this.config); - this.tf = tf39; - this.state = "idle"; - __privateSet(this, _numTensors, 0); - __privateSet(this, _analyzeMemoryLeaks, false); - __privateSet(this, _checkSanity, false); - this.performance = {}; - this.events = typeof EventTarget !== "undefined" ? new EventTarget() : void 0; - this.models = new Models(); - this.draw = { - options: options3, - canvas: (input, output) => canvas2(input, output), - face: (output, result, options4) => face(output, result, options4), - body: (output, result, options4) => body(output, result, options4), - hand: (output, result, options4) => hand(output, result, options4), - gesture: (output, result, options4) => gesture(output, result, options4), - object: (output, result, options4) => object(output, result, options4), - person: (output, result, options4) => person(output, result, options4), - all: (output, result, options4) => all(output, result, options4) - }; - this.result = { face: [], body: [], hand: [], gesture: [], object: [], performance: {}, timestamp: 0, persons: [], error: null }; - this.process = { tensor: null, canvas: null }; - this.faceTriangulation = triangulation; - this.faceUVMap = uvmap; - this.gl = config2; - validateModel(this, null, ""); - this.emit("create"); - if (this.config.debug || this.env.browser) - log(`version: ${this.version}`); - if (this.config.debug) - log(`tfjs version: ${this.tf.version["tfjs-core"]}`); - const envTemp = JSON.parse(JSON.stringify(this.env)); - delete envTemp.kernels; - delete envTemp.initial; - delete envTemp.perfadd; - if (this.config.debug) - log("environment:", envTemp); - } - reset() { - const currentBackend = this.config.backend; - this.config = JSON.parse(JSON.stringify(config)); - this.config.backend = currentBackend; - reset(); - env.initial = true; - } - validate(userConfig) { - const msgs = validate(config, userConfig || this.config); - if (msgs.length === 0) - this.config = mergeDeep(this.config, userConfig); - return msgs; - } - check() { - return validate2(this); - } - now() { - return now(); - } - image(input, getTensor = true) { - return process2(input, this.config, getTensor); - } - async segmentation(input, userConfig) { - var _a, _b, _c; - if (userConfig) - this.config = mergeDeep(this.config, userConfig); - if (!this.config.segmentation.enabled) - return null; - const processed = await process2(input, this.config); - if (!processed.tensor) - return null; - let tensor6 = null; - if ((_a = this.config.segmentation.modelPath) == null ? void 0 : _a.includes("rvm")) - tensor6 = await predict18(processed.tensor, this.config); - if ((_b = this.config.segmentation.modelPath) == null ? void 0 : _b.includes("meet")) - tensor6 = await predict13(processed.tensor, this.config); - if ((_c = this.config.segmentation.modelPath) == null ? void 0 : _c.includes("selfie")) - tensor6 = await predict19(processed.tensor, this.config); - tf39.dispose(processed.tensor); - return tensor6; - } - enhance(input) { - return enhance(input); - } - compare(firstImageTensor, secondImageTensor) { - return compare(this.config, firstImageTensor, secondImageTensor); - } - async init() { - await check(this, true); - await this.tf.ready(); - reset(); - } - async load(userConfig) { - this.state = "load"; - const timeStamp = now(); - const count2 = Object.values(this.models).filter((model21) => model21).length; - if (userConfig) - this.config = mergeDeep(this.config, userConfig); - if (this.env.initial) { - if (!await check(this, false)) - log("error: backend check failed"); - await tf39.ready(); - if (this.env.browser) { - if (this.config.debug) - log("configuration:", this.config); - if (this.config.debug) - log("tf flags:", this.tf.ENV.flags); - } - } - await load22(this); - if (this.env.initial && this.config.debug) - log("tf engine state:", this.tf.engine().state.numBytes, "bytes", this.tf.engine().state.numTensors, "tensors"); - this.env.initial = false; - const loaded = Object.values(this.models).filter((model21) => model21).length; - if (loaded !== count2) { - validate2(this); - this.emit("load"); - } - const current = Math.trunc(now() - timeStamp); - if (current > (this.performance.loadModels || 0)) - this.performance.loadModels = this.env.perfadd ? (this.performance.loadModels || 0) + current : current; - } - next(result = this.result) { - return calc2(result, this.config); - } - getModelStats() { - return getModelStats(this); - } - async warmup(userConfig) { - const t0 = now(); - const res = await warmup(this, userConfig); - const t1 = now(); - this.performance.warmup = Math.trunc(t1 - t0); - return res; - } - async profile(input, userConfig) { - const profile = await this.tf.profile(() => this.detect(input, userConfig)); - const kernels = {}; - let total = 0; - for (const kernel of profile.kernels) { - if (kernels[kernel.name]) - kernels[kernel.name] += kernel.kernelTimeMs; - else - kernels[kernel.name] = kernel.kernelTimeMs; - total += kernel.kernelTimeMs; - } - const kernelArr = []; - Object.entries(kernels).forEach((key) => kernelArr.push({ kernel: key[0], time: key[1], perc: 0 })); - for (const kernel of kernelArr) { - kernel.perc = Math.round(1e3 * kernel.time / total) / 1e3; - kernel.time = Math.round(1e3 * kernel.time) / 1e3; - } - kernelArr.sort((a, b) => b.time - a.time); - kernelArr.length = 20; - return kernelArr; - } - async detect(input, userConfig) { - this.state = "detect"; - return new Promise(async (resolve) => { - var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u; - this.state = "config"; - let timeStamp; - this.config = mergeDeep(this.config, userConfig); - this.state = "check"; - const error = __privateGet(this, _sanity).call(this, input); - if (error) { - log(error, input); - this.emit("error"); - resolve({ face: [], body: [], hand: [], gesture: [], object: [], performance: this.performance, timestamp: now(), persons: [], error }); - } - const timeStart = now(); - await this.load(); - timeStamp = now(); - this.state = "image"; - const img = await process2(input, this.config); - this.process = img; - this.performance.inputProcess = this.env.perfadd ? (this.performance.inputProcess || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - this.analyze("Get Image:"); - if (!img.tensor) { - if (this.config.debug) - log("could not convert input to tensor"); - this.emit("error"); - resolve({ face: [], body: [], hand: [], gesture: [], object: [], performance: this.performance, timestamp: now(), persons: [], error: "could not convert input to tensor" }); - return; - } - this.emit("image"); - timeStamp = now(); - this.config.skipAllowed = await skip(this.config, img.tensor); - if (!this.performance.totalFrames) - this.performance.totalFrames = 0; - if (!this.performance.cachedFrames) - this.performance.cachedFrames = 0; - this.performance.totalFrames++; - if (this.config.skipAllowed) - this.performance.cachedFrames++; - this.performance.cacheCheck = this.env.perfadd ? (this.performance.cacheCheck || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - this.analyze("Check Changed:"); - let faceRes = []; - let bodyRes = []; - let handRes = []; - let objectRes = []; - this.state = "detect:face"; - if (this.config.async) { - faceRes = this.config.face.enabled ? detectFace(this, img.tensor) : []; - if (this.performance.face) - delete this.performance.face; - } else { - timeStamp = now(); - faceRes = this.config.face.enabled ? await detectFace(this, img.tensor) : []; - this.performance.face = this.env.perfadd ? (this.performance.face || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - } - if (this.config.async && (this.config.body.maxDetected === -1 || this.config.hand.maxDetected === -1)) - faceRes = await faceRes; - this.analyze("Start Body:"); - this.state = "detect:body"; - const bodyConfig = this.config.body.maxDetected === -1 ? mergeDeep(this.config, { body: { maxDetected: this.config.face.enabled ? 1 * faceRes.length : 1 } }) : this.config; - if (this.config.async) { - if ((_a = this.config.body.modelPath) == null ? void 0 : _a.includes("posenet")) - bodyRes = this.config.body.enabled ? predict17(img.tensor, bodyConfig) : []; - else if ((_b = this.config.body.modelPath) == null ? void 0 : _b.includes("blazepose")) - bodyRes = this.config.body.enabled ? predict2(img.tensor, bodyConfig) : []; - else if ((_c = this.config.body.modelPath) == null ? void 0 : _c.includes("efficientpose")) - bodyRes = this.config.body.enabled ? predict4(img.tensor, bodyConfig) : []; - else if ((_d = this.config.body.modelPath) == null ? void 0 : _d.includes("movenet")) - bodyRes = this.config.body.enabled ? predict15(img.tensor, bodyConfig) : []; - if (this.performance.body) - delete this.performance.body; - } else { - timeStamp = now(); - if ((_e = this.config.body.modelPath) == null ? void 0 : _e.includes("posenet")) - bodyRes = this.config.body.enabled ? await predict17(img.tensor, bodyConfig) : []; - else if ((_f = this.config.body.modelPath) == null ? void 0 : _f.includes("blazepose")) - bodyRes = this.config.body.enabled ? await predict2(img.tensor, bodyConfig) : []; - else if ((_g = this.config.body.modelPath) == null ? void 0 : _g.includes("efficientpose")) - bodyRes = this.config.body.enabled ? await predict4(img.tensor, bodyConfig) : []; - else if ((_h = this.config.body.modelPath) == null ? void 0 : _h.includes("movenet")) - bodyRes = this.config.body.enabled ? await predict15(img.tensor, bodyConfig) : []; - this.performance.body = this.env.perfadd ? (this.performance.body || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - } - this.analyze("End Body:"); - this.analyze("Start Hand:"); - this.state = "detect:hand"; - const handConfig = this.config.hand.maxDetected === -1 ? mergeDeep(this.config, { hand: { maxDetected: this.config.face.enabled ? 2 * faceRes.length : 1 } }) : this.config; - if (this.config.async) { - if ((_j = (_i = this.config.hand.detector) == null ? void 0 : _i.modelPath) == null ? void 0 : _j.includes("handdetect")) - handRes = this.config.hand.enabled ? predict9(img.tensor, handConfig) : []; - else if ((_l = (_k = this.config.hand.detector) == null ? void 0 : _k.modelPath) == null ? void 0 : _l.includes("handtrack")) - handRes = this.config.hand.enabled ? predict10(img.tensor, handConfig) : []; - if (this.performance.hand) - delete this.performance.hand; - } else { - timeStamp = now(); - if ((_n = (_m = this.config.hand.detector) == null ? void 0 : _m.modelPath) == null ? void 0 : _n.includes("handdetect")) - handRes = this.config.hand.enabled ? await predict9(img.tensor, handConfig) : []; - else if ((_p = (_o = this.config.hand.detector) == null ? void 0 : _o.modelPath) == null ? void 0 : _p.includes("handtrack")) - handRes = this.config.hand.enabled ? await predict10(img.tensor, handConfig) : []; - this.performance.hand = this.env.perfadd ? (this.performance.hand || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - } - this.analyze("End Hand:"); - this.analyze("Start Object:"); - this.state = "detect:object"; - if (this.config.async) { - if ((_q = this.config.object.modelPath) == null ? void 0 : _q.includes("nanodet")) - objectRes = this.config.object.enabled ? predict16(img.tensor, this.config) : []; - else if ((_r = this.config.object.modelPath) == null ? void 0 : _r.includes("centernet")) - objectRes = this.config.object.enabled ? predict3(img.tensor, this.config) : []; - if (this.performance.object) - delete this.performance.object; - } else { - timeStamp = now(); - if ((_s = this.config.object.modelPath) == null ? void 0 : _s.includes("nanodet")) - objectRes = this.config.object.enabled ? await predict16(img.tensor, this.config) : []; - else if ((_t = this.config.object.modelPath) == null ? void 0 : _t.includes("centernet")) - objectRes = this.config.object.enabled ? await predict3(img.tensor, this.config) : []; - this.performance.object = this.env.perfadd ? (this.performance.object || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - } - this.analyze("End Object:"); - this.state = "detect:await"; - if (this.config.async) - [faceRes, bodyRes, handRes, objectRes] = await Promise.all([faceRes, bodyRes, handRes, objectRes]); - this.state = "detect:gesture"; - let gestureRes = []; - if (this.config.gesture.enabled) { - timeStamp = now(); - gestureRes = [...face2(faceRes), ...body2(bodyRes), ...hand2(handRes), ...iris2(faceRes)]; - if (!this.config.async) - this.performance.gesture = this.env.perfadd ? (this.performance.gesture || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - else if (this.performance.gesture) - delete this.performance.gesture; - } - this.performance.total = this.env.perfadd ? (this.performance.total || 0) + Math.trunc(now() - timeStart) : Math.trunc(now() - timeStart); - const shape = ((_u = this.process.tensor) == null ? void 0 : _u.shape) || []; - this.result = { - face: faceRes, - body: bodyRes, - hand: handRes, - gesture: gestureRes, - object: objectRes, - performance: this.performance, - canvas: this.process.canvas, - timestamp: Date.now(), - error: null, - get persons() { - return join2(faceRes, bodyRes, handRes, gestureRes, shape); - } - }; - tf39.dispose(img.tensor); - this.emit("detect"); - this.state = "idle"; - resolve(this.result); - }); - } - async sleep(ms) { - return new Promise((resolve) => { - setTimeout(resolve, ms); - }); - } - async video(element, run = true, delay = 0) { - if (run) { - if (!__privateGet(this, _loops)[element.id]) { - if (this.config.debug) - log("video start", element.id); - __privateGet(this, _loops)[element.id] = true; - } - if (!element.paused && __privateGet(this, _loops)[element.id] && element.readyState >= 2) - await this.detect(element); - if (delay > 0) - await this.sleep(delay); - if (__privateGet(this, _loops)[element.id]) - requestAnimationFrame(() => this.video(element, run, delay)); - } else { - if (this.config.debug) - log("video stop", element.id); - __privateGet(this, _loops)[element.id] = false; - } - } -}; -_numTensors = new WeakMap(); -_analyzeMemoryLeaks = new WeakMap(); -_checkSanity = new WeakMap(); -_sanity = new WeakMap(); -_loops = new WeakMap(); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Env, - Human, - defaults, - draw, - env, - match, - models -}); +2Q==`;var i0=D(V());async function JA(e){let t=(r,s="application/octet-stream")=>fetch(`data:${s};base64,${r}`).then(A=>A.blob()),n,o;switch(e.config.warmup){case"face":n=await t(Ht);break;case"body":case"full":n=await t(Vt);break;default:n=null}if(n){let r=await createImageBitmap(n);o=await e.detect(r,e.config),r.close()}return o}async function QA(e){return new Promise(t=>{let n;switch(e.config.warmup){case"face":n="data:image/jpeg;base64,"+Ht;break;case"full":case"body":n="data:image/jpeg;base64,"+Vt;break;default:n=""}let o;if(typeof Image!="undefined")o=new Image;else if(k.Image)o=new k.Image;else return;o.onload=async()=>{let r=$0(o.naturalWidth,o.naturalHeight);if(!r)h("Warmup: Canvas not found"),t(void 0);else{let s=r.getContext("2d");s&&s.drawImage(o,0,0);let A=await e.image(r),a=A.tensor?await e.detect(A.tensor,e.config):void 0;t(a)}},n?o.src=n:t(void 0)})}async function _A(e){let t=r=>Buffer.from(r,"base64"),n;e.config.warmup==="face"?n=t(Ht):n=t(Vt);let o;if("node"in i0&&i0.getBackend()==="tensorflow"){let r=i0.node.decodeJpeg(n),s=i0.expandDims(r,0);e.tf.dispose(r),o=await e.detect(s,e.config),e.tf.dispose(s)}else e.config.debug&&h("Warmup tfjs-node not loaded");return o}async function $A(e){let t;return typeof createImageBitmap=="function"?t=await JA(e):typeof Image!="undefined"||k.Canvas!==void 0?t=await QA(e):t=await _A(e),t}async function ea(e){var a,l,c,x;if(!i0.env().flagRegistry.ENGINE_COMPILE_ONLY)return;let t=i0.getBackend(),n=i0.backend();if(t!=="webgl"&&t!=="humangl"||!(n!=null&&n.checkCompileCompletion))return;i0.env().set("ENGINE_COMPILE_ONLY",!0);let o=i0.engine().state.numTensors,r=[];for(let[i,f]of Object.entries(e.models).filter(([d,m])=>d!==null&&m!==null)){let d=(l=(a=f.inputs)==null?void 0:a[0])!=null&&l.shape?[...f.inputs[0].shape]:[1,64,64,3],m=(x=(c=f.inputs)==null?void 0:c[0])!=null&&x.dtype?f.inputs[0].dtype:"float32";for(let g=0;gi0.dispose(v)):i0.dispose(g)}catch(g){e.config.debug&&h("compile fail model:",i)}i0.dispose(p)}let s=await n.checkCompileCompletionAsync();n.getUniformLocations(),e.config.debug&&h("compile pass:",{models:r,kernels:s.length}),i0.env().set("ENGINE_COMPILE_ONLY",!1);let A=i0.engine().state.numTensors;A-o>0&&h("tensor leak:",A-o)}async function Co(e,t){await D2(e,!1);let n=M();return e.state="warmup",t&&(e.config=s0(e.config,t)),!e.config.warmup||e.config.warmup.length===0||e.config.warmup==="none"?{face:[],body:[],hand:[],gesture:[],object:[],performance:e.performance,timestamp:M(),persons:[],error:null}:new Promise(async o=>{await g2.load(e),await ea(e);let r=await $A(e),s=M();e.config.debug&&h("warmup",e.config.warmup,Math.round(s-n),"ms"),e.emit("warmup"),o(r)})}var w2,X2,q2,Dt,Xe,E1=class{constructor(t){R(this,"version");R(this,"config");R(this,"result");R(this,"state");R(this,"process");R(this,"tf");R(this,"env");R(this,"draw");R(this,"models");R(this,"events");R(this,"faceTriangulation");R(this,"faceUVMap");R(this,"performance");A2(this,w2,void 0);A2(this,X2,void 0);A2(this,q2,void 0);R(this,"gl");R(this,"analyze",(...t)=>{if(!ye(this,X2))return;let n=this.tf.engine().state.numTensors,o=ye(this,w2);j2(this,w2,n);let r=n-o;r!==0&&h(...t,r)});A2(this,Dt,t=>{if(!ye(this,q2))return null;if(!t)return"input is not defined";if(this.env.node&&!(t instanceof se.Tensor))return"input must be a tensor";try{this.tf.getBackend()}catch(n){return"backend not loaded"}return null});R(this,"similarity",R1);R(this,"distance",Z2);R(this,"match",k1);R(this,"webcam",new $2);R(this,"emit",t=>{var n;(n=this.events)!=null&&n.dispatchEvent&&this.events.dispatchEvent(new Event(t))});A2(this,Xe,{});this.env=k;let n=(se.version.tfjs||se.version_core).replace(/-(.*)/,"");Ee.wasmPath=`https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm@${n}/dist/`,Ee.modelBasePath=k.browser?"../models/":"file://models/",Ee.backend=k.browser?"webgl":"tensorflow",this.version=Qt,Object.defineProperty(this,"version",{value:Qt}),this.config=JSON.parse(JSON.stringify(Ee)),Object.seal(this.config),this.config.cacheModels=typeof indexedDB!="undefined",t&&(this.config=s0(this.config,t)),X1(this.config),this.tf=se,this.state="idle",j2(this,w2,0),j2(this,X2,!1),j2(this,q2,!1),this.performance={},this.events=typeof EventTarget!="undefined"?new EventTarget:void 0,this.models=new V2,this.draw={options:S0,canvas:(r,s)=>b1(r,s),face:(r,s,A)=>M2(r,s,A),body:(r,s,A)=>T2(r,s,A),hand:(r,s,A)=>v2(r,s,A),gesture:(r,s,A)=>R2(r,s,A),object:(r,s,A)=>P2(r,s,A),person:(r,s,A)=>h1(r,s,A),all:(r,s,A)=>g1(r,s,A)},this.result={face:[],body:[],hand:[],gesture:[],object:[],performance:{},timestamp:0,persons:[],error:null},this.process={tensor:null,canvas:null},this.faceTriangulation=B3,this.faceUVMap=H3,this.gl=$,Gt(this,null,""),this.emit("create"),(this.config.debug||this.env.browser)&&h(`version: ${this.version}`),this.config.debug&&h(`tfjs version: ${this.tf.version["tfjs-core"]}`);let o=JSON.parse(JSON.stringify(this.env));delete o.kernels,delete o.initial,delete o.perfadd,this.config.debug&&h("environment:",o)}reset(){let t=this.config.backend;this.config=JSON.parse(JSON.stringify(Ee)),this.config.backend=t,Kt(),k.initial=!0}validate(t){let n=Zt(Ee,t||this.config);return n.length===0&&(this.config=s0(this.config,t)),n}check(){return Bt(this)}now(){return M()}image(t,n=!0){return Q2(t,this.config,n)}async segmentation(t,n){var s,A,a;if(n&&(this.config=s0(this.config,n)),!this.config.segmentation.enabled)return null;let o=await Q2(t,this.config);if(!o.tensor)return null;let r=null;return(s=this.config.segmentation.modelPath)!=null&&s.includes("rvm")&&(r=await ao(o.tensor,this.config)),(A=this.config.segmentation.modelPath)!=null&&A.includes("meet")&&(r=await In(o.tensor,this.config)),(a=this.config.segmentation.modelPath)!=null&&a.includes("selfie")&&(r=await lo(o.tensor,this.config)),se.dispose(o.tensor),r}enhance(t){return v5(t)}compare(t,n){return Z1(this.config,t,n)}async init(){await D2(this,!0),await this.tf.ready(),Kt()}async load(t){this.state="load";let n=M(),o=Object.values(this.models).filter(A=>A).length;t&&(this.config=s0(this.config,t)),this.env.initial&&(await D2(this,!1)||h("error: backend check failed"),await se.ready(),this.env.browser&&(this.config.debug&&h("configuration:",this.config),this.config.debug&&h("tf flags:",this.tf.ENV.flags))),await f1(this),this.env.initial&&this.config.debug&&h("tf engine state:",this.tf.engine().state.numBytes,"bytes",this.tf.engine().state.numTensors,"tensors"),this.env.initial=!1,Object.values(this.models).filter(A=>A).length!==o&&(Bt(this),this.emit("load"));let s=Math.trunc(M()-n);s>(this.performance.loadModels||0)&&(this.performance.loadModels=this.env.perfadd?(this.performance.loadModels||0)+s:s)}next(t=this.result){return No(t,this.config)}getModelStats(){return y1(this)}async warmup(t){let n=M(),o=await Co(this,t),r=M();return this.performance.warmup=Math.trunc(r-n),o}async profile(t,n){let o=await this.tf.profile(()=>this.detect(t,n)),r={},s=0;for(let a of o.kernels)r[a.name]?r[a.name]+=a.kernelTimeMs:r[a.name]=a.kernelTimeMs,s+=a.kernelTimeMs;let A=[];Object.entries(r).forEach(a=>A.push({kernel:a[0],time:a[1],perc:0}));for(let a of A)a.perc=Math.round(1e3*a.time/s)/1e3,a.time=Math.round(1e3*a.time)/1e3;return A.sort((a,l)=>l.time-a.time),A.length=20,A}async detect(t,n){return this.state="detect",new Promise(async o=>{var g,v,T,y,b,z,w,O,q,t0,Z,U,r0,P,G,P0,e0,u0,x0,H,X;this.state="config";let r;this.config=s0(this.config,n),this.state="check";let s=ye(this,Dt).call(this,t);s&&(h(s,t),this.emit("error"),o({face:[],body:[],hand:[],gesture:[],object:[],performance:this.performance,timestamp:M(),persons:[],error:s}));let A=M();await this.load(),r=M(),this.state="image";let a=await Q2(t,this.config);if(this.process=a,this.performance.inputProcess=this.env.perfadd?(this.performance.inputProcess||0)+Math.trunc(M()-r):Math.trunc(M()-r),this.analyze("Get Image:"),!a.tensor){this.config.debug&&h("could not convert input to tensor"),this.emit("error"),o({face:[],body:[],hand:[],gesture:[],object:[],performance:this.performance,timestamp:M(),persons:[],error:"could not convert input to tensor"});return}this.emit("image"),r=M(),this.config.skipAllowed=await D1(this.config,a.tensor),this.performance.totalFrames||(this.performance.totalFrames=0),this.performance.cachedFrames||(this.performance.cachedFrames=0),this.performance.totalFrames++,this.config.skipAllowed&&this.performance.cachedFrames++,this.performance.cacheCheck=this.env.perfadd?(this.performance.cacheCheck||0)+Math.trunc(M()-r):Math.trunc(M()-r),this.analyze("Check Changed:");let l=[],c=[],x=[],i=[];this.state="detect:face",this.config.async?(l=this.config.face.enabled?v1(this,a.tensor):[],this.performance.face&&delete this.performance.face):(r=M(),l=this.config.face.enabled?await v1(this,a.tensor):[],this.performance.face=this.env.perfadd?(this.performance.face||0)+Math.trunc(M()-r):Math.trunc(M()-r)),this.config.async&&(this.config.body.maxDetected===-1||this.config.hand.maxDetected===-1)&&(l=await l),this.analyze("Start Body:"),this.state="detect:body";let f=this.config.body.maxDetected===-1?s0(this.config,{body:{maxDetected:this.config.face.enabled?1*l.length:1}}):this.config;this.config.async?((g=this.config.body.modelPath)!=null&&g.includes("posenet")?c=this.config.body.enabled?o1(a.tensor,f):[]:(v=this.config.body.modelPath)!=null&&v.includes("blazepose")?c=this.config.body.enabled?l5(a.tensor,f):[]:(T=this.config.body.modelPath)!=null&&T.includes("efficientpose")?c=this.config.body.enabled?p5(a.tensor,f):[]:(y=this.config.body.modelPath)!=null&&y.includes("movenet")&&(c=this.config.body.enabled?J5(a.tensor,f):[]),this.performance.body&&delete this.performance.body):(r=M(),(b=this.config.body.modelPath)!=null&&b.includes("posenet")?c=this.config.body.enabled?await o1(a.tensor,f):[]:(z=this.config.body.modelPath)!=null&&z.includes("blazepose")?c=this.config.body.enabled?await l5(a.tensor,f):[]:(w=this.config.body.modelPath)!=null&&w.includes("efficientpose")?c=this.config.body.enabled?await p5(a.tensor,f):[]:(O=this.config.body.modelPath)!=null&&O.includes("movenet")&&(c=this.config.body.enabled?await J5(a.tensor,f):[]),this.performance.body=this.env.perfadd?(this.performance.body||0)+Math.trunc(M()-r):Math.trunc(M()-r)),this.analyze("End Body:"),this.analyze("Start Hand:"),this.state="detect:hand";let d=this.config.hand.maxDetected===-1?s0(this.config,{hand:{maxDetected:this.config.face.enabled?2*l.length:1}}):this.config;this.config.async?((t0=(q=this.config.hand.detector)==null?void 0:q.modelPath)!=null&&t0.includes("handdetect")?x=this.config.hand.enabled?O5(a.tensor,d):[]:(U=(Z=this.config.hand.detector)==null?void 0:Z.modelPath)!=null&&U.includes("handtrack")&&(x=this.config.hand.enabled?W5(a.tensor,d):[]),this.performance.hand&&delete this.performance.hand):(r=M(),(P=(r0=this.config.hand.detector)==null?void 0:r0.modelPath)!=null&&P.includes("handdetect")?x=this.config.hand.enabled?await O5(a.tensor,d):[]:(P0=(G=this.config.hand.detector)==null?void 0:G.modelPath)!=null&&P0.includes("handtrack")&&(x=this.config.hand.enabled?await W5(a.tensor,d):[]),this.performance.hand=this.env.perfadd?(this.performance.hand||0)+Math.trunc(M()-r):Math.trunc(M()-r)),this.analyze("End Hand:"),this.analyze("Start Object:"),this.state="detect:object",this.config.async?((e0=this.config.object.modelPath)!=null&&e0.includes("nanodet")?i=this.config.object.enabled?_5(a.tensor,this.config):[]:(u0=this.config.object.modelPath)!=null&&u0.includes("centernet")&&(i=this.config.object.enabled?x5(a.tensor,this.config):[]),this.performance.object&&delete this.performance.object):(r=M(),(x0=this.config.object.modelPath)!=null&&x0.includes("nanodet")?i=this.config.object.enabled?await _5(a.tensor,this.config):[]:(H=this.config.object.modelPath)!=null&&H.includes("centernet")&&(i=this.config.object.enabled?await x5(a.tensor,this.config):[]),this.performance.object=this.env.perfadd?(this.performance.object||0)+Math.trunc(M()-r):Math.trunc(M()-r)),this.analyze("End Object:"),this.state="detect:await",this.config.async&&([l,c,x,i]=await Promise.all([l,c,x,i])),this.state="detect:gesture";let m=[];this.config.gesture.enabled&&(r=M(),m=[...zo(l),...Eo(c),...jo(x),...So(l)],this.config.async?this.performance.gesture&&delete this.performance.gesture:this.performance.gesture=this.env.perfadd?(this.performance.gesture||0)+Math.trunc(M()-r):Math.trunc(M()-r)),this.performance.total=this.env.perfadd?(this.performance.total||0)+Math.trunc(M()-A):Math.trunc(M()-A);let p=((X=this.process.tensor)==null?void 0:X.shape)||[];this.result={face:l,body:c,hand:x,gesture:m,object:i,performance:this.performance,canvas:this.process.canvas,timestamp:Date.now(),error:null,get persons(){return Io(l,c,x,m,p)}},se.dispose(a.tensor),this.emit("detect"),this.state="idle",o(this.result)})}async sleep(t){return new Promise(n=>{setTimeout(n,t)})}async video(t,n=!0,o=0){n?(ye(this,Xe)[t.id]||(this.config.debug&&h("video start",t.id),ye(this,Xe)[t.id]=!0),!t.paused&&ye(this,Xe)[t.id]&&t.readyState>=2&&await this.detect(t),o>0&&await this.sleep(o),ye(this,Xe)[t.id]&&requestAnimationFrame(()=>this.video(t,n,o))):(this.config.debug&&h("video stop",t.id),ye(this,Xe)[t.id]=!1)}};w2=new WeakMap,X2=new WeakMap,q2=new WeakMap,Dt=new WeakMap,Xe=new WeakMap;0&&(module.exports={Env,Human,defaults,draw,env,match,models}); diff --git a/dist/human.node.js b/dist/human.node.js index 964a11cc4..b533bb284 100644 --- a/dist/human.node.js +++ b/dist/human.node.js @@ -4,291 +4,7 @@ author: ' */ -"use strict"; -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; -var __commonJS = (cb, mod3) => function __require() { - return mod3 || (0, cb[__getOwnPropNames(cb)[0]])((mod3 = { exports: {} }).exports, mod3), mod3.exports; -}; -var __export = (target, all2) => { - for (var name in all2) - __defProp(target, name, { get: all2[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod3, isNodeMode, target) => (target = mod3 != null ? __create(__getProtoOf(mod3)) : {}, __copyProps( - isNodeMode || !mod3 || !mod3.__esModule ? __defProp(target, "default", { value: mod3, enumerable: true }) : target, - mod3 -)); -var __toCommonJS = (mod3) => __copyProps(__defProp({}, "__esModule", { value: true }), mod3); -var __publicField = (obj, key, value) => { - __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); - return value; -}; -var __accessCheck = (obj, member, msg) => { - if (!member.has(obj)) - throw TypeError("Cannot " + msg); -}; -var __privateGet = (obj, member, getter) => { - __accessCheck(obj, member, "read from private field"); - return getter ? getter.call(obj) : member.get(obj); -}; -var __privateAdd = (obj, member, value) => { - if (member.has(obj)) - throw TypeError("Cannot add the same private member more than once"); - member instanceof WeakSet ? member.add(obj) : member.set(obj, value); -}; -var __privateSet = (obj, member, value, setter) => { - __accessCheck(obj, member, "write to private field"); - setter ? setter.call(obj, value) : member.set(obj, value); - return value; -}; - -// dist/tfjs.esm.js -var require_tfjs_esm = __commonJS({ - "dist/tfjs.esm.js"(exports, module2) { - "use strict"; - var __defProp2 = Object.defineProperty; - var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; - var __getOwnPropNames2 = Object.getOwnPropertyNames; - var __hasOwnProp2 = Object.prototype.hasOwnProperty; - var __copyProps2 = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames2(from)) - if (!__hasOwnProp2.call(to, key) && key !== except) - __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); - } - return to; - }; - var __reExport = (target, mod3, secondTarget) => (__copyProps2(target, mod3, "default"), secondTarget && __copyProps2(secondTarget, mod3, "default")); - var __toCommonJS2 = (mod3) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod3); - var tf_node_exports = {}; - module2.exports = __toCommonJS2(tf_node_exports); - __reExport(tf_node_exports, require("@tensorflow/tfjs-node"), module2.exports); - } -}); - -// src/human.ts -var human_exports = {}; -__export(human_exports, { - Env: () => Env, - Human: () => Human2, - default: () => Human2, - defaults: () => config, - draw: () => draw_exports, - env: () => env, - match: () => match_exports, - models: () => models_exports2 -}); -module.exports = __toCommonJS(human_exports); - -// src/util/util.ts -function log(...msg) { - const dt = new Date(); - const ts = `${dt.getHours().toString().padStart(2, "0")}:${dt.getMinutes().toString().padStart(2, "0")}:${dt.getSeconds().toString().padStart(2, "0")}.${dt.getMilliseconds().toString().padStart(3, "0")}`; - if (msg) - console.log(ts, "Human:", ...msg); -} -function join(folder, file) { - const separator = folder.endsWith("/") ? "" : "/"; - const skipJoin = file.startsWith(".") || file.startsWith("/") || file.startsWith("http:") || file.startsWith("https:") || file.startsWith("file:"); - const path = skipJoin ? `${file}` : `${folder}${separator}${file}`; - if (!path.toLocaleLowerCase().includes(".json")) - throw new Error(`modelpath error: expecting json file: ${path}`); - return path; -} -var now = () => { - if (typeof performance !== "undefined") - return performance.now(); - return parseInt((Number(process.hrtime.bigint()) / 1e3 / 1e3).toString()); -}; -function validate(defaults, config3, parent = "config", msgs = []) { - for (const key of Object.keys(config3)) { - if (typeof config3[key] === "object") { - validate(defaults[key], config3[key], key, msgs); - } else { - const defined = defaults && typeof defaults[key] !== "undefined"; - if (!defined) - msgs.push({ reason: "unknown property", where: `${parent}.${key} = ${config3[key]}` }); - const same = defaults && typeof defaults[key] === typeof config3[key]; - if (defined && !same) - msgs.push({ reason: "property type mismatch", where: `${parent}.${key} = ${config3[key]}`, expected: typeof defaults[key] }); - } - } - if (config3.debug && parent === "config" && msgs.length > 0) - log("invalid configuration", msgs); - return msgs; -} -function mergeDeep(...objects) { - const isObject = (obj) => obj && typeof obj === "object"; - return objects.reduce((prev, obj) => { - Object.keys(obj || {}).forEach((key) => { - const pVal = prev[key]; - const oVal = obj[key]; - if (Array.isArray(pVal) && Array.isArray(oVal)) - prev[key] = pVal.concat(...oVal); - else if (isObject(pVal) && isObject(oVal)) - prev[key] = mergeDeep(pVal, oVal); - else - prev[key] = oVal; - }); - return prev; - }, {}); -} - -// src/config.ts -var config = { - backend: "", - modelBasePath: "", - cacheModels: true, - validateModels: true, - wasmPath: "", - wasmPlatformFetch: false, - debug: false, - async: true, - warmup: "full", - cacheSensitivity: 0.7, - skipAllowed: false, - deallocate: false, - flags: {}, - softwareKernels: false, - filter: { - enabled: true, - equalization: false, - width: 0, - height: 0, - flip: false, - return: true, - brightness: 0, - contrast: 0, - sharpness: 0, - blur: 0, - saturation: 0, - hue: 0, - negative: false, - sepia: false, - vintage: false, - kodachrome: false, - technicolor: false, - polaroid: false, - pixelate: 0 - }, - gesture: { - enabled: true - }, - face: { - enabled: true, - detector: { - modelPath: "blazeface.json", - rotation: true, - maxDetected: 1, - skipFrames: 99, - skipTime: 2500, - minConfidence: 0.2, - iouThreshold: 0.1, - mask: false, - return: false - }, - mesh: { - enabled: true, - modelPath: "facemesh.json", - keepInvalid: false - }, - attention: { - enabled: false, - modelPath: "facemesh-attention.json" - }, - iris: { - enabled: true, - modelPath: "iris.json" - }, - emotion: { - enabled: true, - minConfidence: 0.1, - skipFrames: 99, - skipTime: 1500, - modelPath: "emotion.json" - }, - description: { - enabled: true, - modelPath: "faceres.json", - skipFrames: 99, - skipTime: 3e3, - minConfidence: 0.1 - }, - antispoof: { - enabled: false, - skipFrames: 99, - skipTime: 4e3, - modelPath: "antispoof.json" - }, - liveness: { - enabled: false, - skipFrames: 99, - skipTime: 4e3, - modelPath: "liveness.json" - } - }, - body: { - enabled: true, - modelPath: "movenet-lightning.json", - maxDetected: -1, - minConfidence: 0.3, - skipFrames: 1, - skipTime: 200 - }, - hand: { - enabled: true, - rotation: true, - skipFrames: 99, - skipTime: 1e3, - minConfidence: 0.5, - iouThreshold: 0.2, - maxDetected: -1, - landmarks: true, - detector: { - modelPath: "handtrack.json" - }, - skeleton: { - modelPath: "handlandmark-full.json" - } - }, - object: { - enabled: false, - modelPath: "mb3-centernet.json", - minConfidence: 0.2, - iouThreshold: 0.4, - maxDetected: 10, - skipFrames: 99, - skipTime: 2e3 - }, - segmentation: { - enabled: false, - modelPath: "rvm.json", - ratio: 0.5, - mode: "default" - } -}; - -// src/util/env.ts -var tf3 = __toESM(require_tfjs_esm()); - -// src/image/image.ts -var tf2 = __toESM(require_tfjs_esm()); - -// src/image/imagefxshaders.ts -var vertexIdentity = ` +"use strict";var Co=Object.create;var S2=Object.defineProperty;var Lo=Object.getOwnPropertyDescriptor;var Wo=Object.getOwnPropertyNames;var Fo=Object.getPrototypeOf,Go=Object.prototype.hasOwnProperty;var Bo=(e,t,n)=>t in e?S2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ho=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),we=(e,t)=>{for(var n in t)S2(e,n,{get:t[n],enumerable:!0})},S1=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Wo(t))!Go.call(e,r)&&r!==n&&S2(e,r,{get:()=>t[r],enumerable:!(o=Lo(t,r))||o.enumerable});return e};var D=(e,t,n)=>(n=e!=null?Co(Fo(e)):{},S1(t||!e||!e.__esModule?S2(n,"default",{value:e,enumerable:!0}):n,e)),Vo=e=>S1(S2({},"__esModule",{value:!0}),e);var R=(e,t,n)=>(Bo(e,typeof t!="symbol"?t+"":t,n),n),j1=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var ye=(e,t,n)=>(j1(e,t,"read from private field"),n?n.call(e):t.get(e)),A2=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},j2=(e,t,n,o)=>(j1(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n);var V=Ho((Aa,Xt)=>{"use strict";var O1=Object.defineProperty,Do=Object.getOwnPropertyDescriptor,Zo=Object.getOwnPropertyNames,Xo=Object.prototype.hasOwnProperty,Zt=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Zo(t))!Xo.call(e,r)&&r!==n&&O1(e,r,{get:()=>t[r],enumerable:!(o=Do(t,r))||o.enumerable});return e},qo=(e,t,n)=>(Zt(e,t,"default"),n&&Zt(n,t,"default")),Uo=e=>Zt(O1({},"__esModule",{value:!0}),e),I1={};Xt.exports=Uo(I1);qo(I1,require("@tensorflow/tfjs-node"),Xt.exports)});var na={};we(na,{Env:()=>N2,Human:()=>w1,default:()=>w1,defaults:()=>Ee,draw:()=>g1,env:()=>k,match:()=>k1,models:()=>g2});module.exports=Vo(na);function h(...e){let t=new Date,n=`${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}:${t.getSeconds().toString().padStart(2,"0")}.${t.getMilliseconds().toString().padStart(3,"0")}`;e&&console.log(n,"Human:",...e)}function N1(e,t){let n=e.endsWith("/")?"":"/",r=t.startsWith(".")||t.startsWith("/")||t.startsWith("http:")||t.startsWith("https:")||t.startsWith("file:")?`${t}`:`${e}${n}${t}`;if(!r.toLocaleLowerCase().includes(".json"))throw new Error(`modelpath error: expecting json file: ${r}`);return r}var M=()=>typeof performance!="undefined"?performance.now():parseInt((Number(process.hrtime.bigint())/1e3/1e3).toString());function Dt(e,t,n="config",o=[]){for(let r of Object.keys(t))if(typeof t[r]=="object")Dt(e[r],t[r],r,o);else{let s=e&&typeof e[r]!="undefined";s||o.push({reason:"unknown property",where:`${n}.${r} = ${t[r]}`});let A=e&&typeof e[r]==typeof t[r];s&&!A&&o.push({reason:"property type mismatch",where:`${n}.${r} = ${t[r]}`,expected:typeof e[r]})}return t.debug&&n==="config"&&o.length>0&&h("invalid configuration",o),o}function s0(...e){let t=n=>n&&typeof n=="object";return e.reduce((n,o)=>(Object.keys(o||{}).forEach(r=>{let s=n[r],A=o[r];Array.isArray(s)&&Array.isArray(A)?n[r]=s.concat(...A):t(s)&&t(A)?n[r]=s0(s,A):n[r]=A}),n),{})}var Ee={backend:"",modelBasePath:"",cacheModels:!0,validateModels:!0,wasmPath:"",wasmPlatformFetch:!1,debug:!1,async:!0,warmup:"full",cacheSensitivity:.7,skipAllowed:!1,deallocate:!1,flags:{},softwareKernels:!1,filter:{enabled:!0,equalization:!1,width:0,height:0,flip:!1,return:!0,brightness:0,contrast:0,sharpness:0,blur:0,saturation:0,hue:0,negative:!1,sepia:!1,vintage:!1,kodachrome:!1,technicolor:!1,polaroid:!1,pixelate:0},gesture:{enabled:!0},face:{enabled:!0,detector:{modelPath:"blazeface.json",rotation:!0,maxDetected:1,skipFrames:99,skipTime:2500,minConfidence:.2,iouThreshold:.1,mask:!1,return:!1},mesh:{enabled:!0,modelPath:"facemesh.json",keepInvalid:!1},attention:{enabled:!1,modelPath:"facemesh-attention.json"},iris:{enabled:!0,modelPath:"iris.json"},emotion:{enabled:!0,minConfidence:.1,skipFrames:99,skipTime:1500,modelPath:"emotion.json"},description:{enabled:!0,modelPath:"faceres.json",skipFrames:99,skipTime:3e3,minConfidence:.1},antispoof:{enabled:!1,skipFrames:99,skipTime:4e3,modelPath:"antispoof.json"},liveness:{enabled:!1,skipFrames:99,skipTime:4e3,modelPath:"liveness.json"}},body:{enabled:!0,modelPath:"movenet-lightning.json",maxDetected:-1,minConfidence:.3,skipFrames:1,skipTime:200},hand:{enabled:!0,rotation:!0,skipFrames:99,skipTime:1e3,minConfidence:.5,iouThreshold:.2,maxDetected:-1,landmarks:!0,detector:{modelPath:"handtrack.json"},skeleton:{modelPath:"handlandmark-full.json"}},object:{enabled:!1,modelPath:"mb3-centernet.json",minConfidence:.2,iouThreshold:.4,maxDetected:10,skipFrames:99,skipTime:2e3},segmentation:{enabled:!1,modelPath:"rvm.json",ratio:.5,mode:"default"}};var y0=D(V());var I=D(V());var C1=` precision highp float; attribute vec2 pos; attribute vec2 uv; @@ -298,8 +14,7 @@ var vertexIdentity = ` vUv = uv; gl_Position = vec4(pos.x, pos.y*flipY, 0.0, 1.); } -`; -var colorMatrixWithAlpha = ` +`;var L1=` precision highp float; varying vec2 vUv; uniform sampler2D texture; @@ -311,8 +26,7 @@ var colorMatrixWithAlpha = ` gl_FragColor.b = m[10] * c.r + m[11] * c.g + m[12] * c.b + m[13] * c.a + m[14]; gl_FragColor.a = m[15] * c.r + m[16] * c.g + m[17] * c.b + m[18] * c.a + m[19]; } -`; -var colorMatrixWithoutAlpha = ` +`,W1=` precision highp float; varying vec2 vUv; uniform sampler2D texture; @@ -324,8 +38,7 @@ var colorMatrixWithoutAlpha = ` gl_FragColor.b = m[10] * c.r + m[11] * c.g + m[12] * c.b + m[14]; gl_FragColor.a = c.a; } -`; -var pixelate = ` +`,F1=` precision highp float; varying vec2 vUv; uniform vec2 size; @@ -338,8 +51,7 @@ var pixelate = ` vec2 coord = pixelate(vUv, size); gl_FragColor += texture2D(texture, coord); } -`; -var blur = ` +`,G1=` precision highp float; varying vec2 vUv; uniform sampler2D texture; @@ -362,8 +74,7 @@ var blur = ` gl_FragColor += texture2D(texture, vUv + vec2( 6.0*px.x, 6.0*px.y))*0.00895781211794; gl_FragColor += texture2D(texture, vUv + vec2( 7.0*px.x, 7.0*px.y))*0.0044299121055113265; } -`; -var convolution = ` +`,B1=` precision highp float; varying vec2 vUv; uniform sampler2D texture; @@ -385,13456 +96,19 @@ var convolution = ` c31 * m[6] + c32 * m[7] + c33 * m[8]; gl_FragColor.a = c22.a; } -`; - -// src/image/imagefx.ts -var collect = (source, prefix, collection) => { - const r = new RegExp("\\b" + prefix + " \\w+ (\\w+)", "ig"); - source.replace(r, (match3, name) => { - collection[name] = 0; - return match3; - }); -}; -var GLProgram = class { - constructor(gl, vertexSource, fragmentSource) { - __publicField(this, "uniform", {}); - __publicField(this, "attribute", {}); - __publicField(this, "gl"); - __publicField(this, "id"); - __publicField(this, "compile", (source, type) => { - const shader = this.gl.createShader(type); - if (!shader) { - log("filter: could not create shader"); - return null; - } - this.gl.shaderSource(shader, source); - this.gl.compileShader(shader); - if (!this.gl.getShaderParameter(shader, this.gl.COMPILE_STATUS)) { - log(`filter: gl compile failed: ${this.gl.getShaderInfoLog(shader) || "unknown"}`); - return null; - } - return shader; - }); - this.gl = gl; - const vertexShader = this.compile(vertexSource, this.gl.VERTEX_SHADER); - const fragmentShader = this.compile(fragmentSource, this.gl.FRAGMENT_SHADER); - this.id = this.gl.createProgram(); - if (!vertexShader || !fragmentShader) - return; - if (!this.id) { - log("filter: could not create webgl program"); - return; - } - this.gl.attachShader(this.id, vertexShader); - this.gl.attachShader(this.id, fragmentShader); - this.gl.linkProgram(this.id); - if (!this.gl.getProgramParameter(this.id, this.gl.LINK_STATUS)) { - log(`filter: gl link failed: ${this.gl.getProgramInfoLog(this.id) || "unknown"}`); - return; - } - this.gl.useProgram(this.id); - collect(vertexSource, "attribute", this.attribute); - for (const a in this.attribute) - this.attribute[a] = this.gl.getAttribLocation(this.id, a); - collect(vertexSource, "uniform", this.uniform); - collect(fragmentSource, "uniform", this.uniform); - for (const u in this.uniform) - this.uniform[u] = this.gl.getUniformLocation(this.id, u); - } -}; -function GLImageFilter() { - let drawCount = 0; - let sourceTexture = null; - let lastInChain = false; - let currentFramebufferIndex = -1; - let tempFramebuffers = [null, null]; - let filterChain = []; - let vertexBuffer = null; - let currentProgram = null; - const fxcanvas = canvas(100, 100); - const shaderProgramCache = {}; - const DRAW = { INTERMEDIATE: 1 }; - const gl = fxcanvas.getContext("webgl"); - if (!gl) { - log("filter: cannot get webgl context"); - return; - } - this.gl = gl; - function resize(width, height) { - if (width === fxcanvas.width && height === fxcanvas.height) - return; - fxcanvas.width = width; - fxcanvas.height = height; - if (!vertexBuffer) { - const vertices = new Float32Array([-1, -1, 0, 1, 1, -1, 1, 1, -1, 1, 0, 0, -1, 1, 0, 0, 1, -1, 1, 1, 1, 1, 1, 0]); - vertexBuffer = gl.createBuffer(); - gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer); - gl.bufferData(gl.ARRAY_BUFFER, vertices, gl.STATIC_DRAW); - gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true); - } - gl.viewport(0, 0, fxcanvas.width, fxcanvas.height); - tempFramebuffers = [null, null]; - } - function createFramebufferTexture(width, height) { - const fbo = gl.createFramebuffer(); - gl.bindFramebuffer(gl.FRAMEBUFFER, fbo); - const renderbuffer = gl.createRenderbuffer(); - gl.bindRenderbuffer(gl.RENDERBUFFER, renderbuffer); - const texture = gl.createTexture(); - gl.bindTexture(gl.TEXTURE_2D, texture); - gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE); - gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0); - gl.bindTexture(gl.TEXTURE_2D, null); - gl.bindFramebuffer(gl.FRAMEBUFFER, null); - return { fbo, texture }; - } - function getTempFramebuffer(index2) { - tempFramebuffers[index2] = tempFramebuffers[index2] || createFramebufferTexture(fxcanvas.width, fxcanvas.height); - return tempFramebuffers[index2]; - } - function draw(flags = 0) { - if (!currentProgram) - return; - let source = null; - let target = null; - let flipY = false; - if (drawCount === 0) - source = sourceTexture; - else - source = getTempFramebuffer(currentFramebufferIndex).texture || null; - drawCount++; - if (lastInChain && !(flags & DRAW.INTERMEDIATE)) { - target = null; - flipY = drawCount % 2 === 0; - } else { - currentFramebufferIndex = (currentFramebufferIndex + 1) % 2; - target = getTempFramebuffer(currentFramebufferIndex).fbo || null; - } - gl.bindTexture(gl.TEXTURE_2D, source); - gl.bindFramebuffer(gl.FRAMEBUFFER, target); - gl.uniform1f(currentProgram.uniform["flipY"], flipY ? -1 : 1); - gl.drawArrays(gl.TRIANGLES, 0, 6); - } - function compileShader(fragmentSource) { - if (shaderProgramCache[fragmentSource]) { - currentProgram = shaderProgramCache[fragmentSource]; - gl.useProgram((currentProgram ? currentProgram.id : null) || null); - return currentProgram; - } - currentProgram = new GLProgram(gl, vertexIdentity, fragmentSource); - if (!currentProgram) { - log("filter: could not get webgl program"); - return null; - } - const floatSize = Float32Array.BYTES_PER_ELEMENT; - const vertSize = 4 * floatSize; - gl.enableVertexAttribArray(currentProgram.attribute["pos"]); - gl.vertexAttribPointer(currentProgram.attribute["pos"], 2, gl.FLOAT, false, vertSize, 0 * floatSize); - gl.enableVertexAttribArray(currentProgram.attribute["uv"]); - gl.vertexAttribPointer(currentProgram.attribute["uv"], 2, gl.FLOAT, false, vertSize, 2 * floatSize); - shaderProgramCache[fragmentSource] = currentProgram; - return currentProgram; - } - const filter = { - colorMatrix: (matrix) => { - const m = new Float32Array(matrix); - m[4] /= 255; - m[9] /= 255; - m[14] /= 255; - m[19] /= 255; - const shader = m[18] === 1 && m[3] === 0 && m[8] === 0 && m[13] === 0 && m[15] === 0 && m[16] === 0 && m[17] === 0 && m[19] === 0 ? colorMatrixWithoutAlpha : colorMatrixWithAlpha; - const program = compileShader(shader); - if (!program) - return; - gl.uniform1fv(program.uniform["m"], m); - draw(); - }, - brightness: (brightness) => { - const b = (brightness || 0) + 1; - filter.colorMatrix([ - b, - 0, - 0, - 0, - 0, - 0, - b, - 0, - 0, - 0, - 0, - 0, - b, - 0, - 0, - 0, - 0, - 0, - 1, - 0 - ]); - }, - saturation: (amount) => { - const x = (amount || 0) * 2 / 3 + 1; - const y = (x - 1) * -0.5; - filter.colorMatrix([ - x, - y, - y, - 0, - 0, - y, - x, - y, - 0, - 0, - y, - y, - x, - 0, - 0, - 0, - 0, - 0, - 1, - 0 - ]); - }, - desaturate: () => { - filter.saturation(-1); - }, - contrast: (amount) => { - const v = (amount || 0) + 1; - const o = -128 * (v - 1); - filter.colorMatrix([ - v, - 0, - 0, - 0, - o, - 0, - v, - 0, - 0, - o, - 0, - 0, - v, - 0, - o, - 0, - 0, - 0, - 1, - 0 - ]); - }, - negative: () => { - filter.contrast(-2); - }, - hue: (rotation) => { - rotation = (rotation || 0) / 180 * Math.PI; - const cos = Math.cos(rotation); - const sin = Math.sin(rotation); - const lumR = 0.213; - const lumG = 0.715; - const lumB = 0.072; - filter.colorMatrix([ - lumR + cos * (1 - lumR) + sin * -lumR, - lumG + cos * -lumG + sin * -lumG, - lumB + cos * -lumB + sin * (1 - lumB), - 0, - 0, - lumR + cos * -lumR + sin * 0.143, - lumG + cos * (1 - lumG) + sin * 0.14, - lumB + cos * -lumB + sin * -0.283, - 0, - 0, - lumR + cos * -lumR + sin * -(1 - lumR), - lumG + cos * -lumG + sin * lumG, - lumB + cos * (1 - lumB) + sin * lumB, - 0, - 0, - 0, - 0, - 0, - 1, - 0 - ]); - }, - desaturateLuminance: () => { - filter.colorMatrix([ - 0.2764723, - 0.929708, - 0.0938197, - 0, - -37.1, - 0.2764723, - 0.929708, - 0.0938197, - 0, - -37.1, - 0.2764723, - 0.929708, - 0.0938197, - 0, - -37.1, - 0, - 0, - 0, - 1, - 0 - ]); - }, - sepia: () => { - filter.colorMatrix([ - 0.393, - 0.7689999, - 0.18899999, - 0, - 0, - 0.349, - 0.6859999, - 0.16799999, - 0, - 0, - 0.272, - 0.5339999, - 0.13099999, - 0, - 0, - 0, - 0, - 0, - 1, - 0 - ]); - }, - brownie: () => { - filter.colorMatrix([ - 0.5997023498159715, - 0.34553243048391263, - -0.2708298674538042, - 0, - 47.43192855600873, - -0.037703249837783157, - 0.8609577587992641, - 0.15059552388459913, - 0, - -36.96841498319127, - 0.24113635128153335, - -0.07441037908422492, - 0.44972182064877153, - 0, - -7.562075277591283, - 0, - 0, - 0, - 1, - 0 - ]); - }, - vintagePinhole: () => { - filter.colorMatrix([ - 0.6279345635605994, - 0.3202183420819367, - -0.03965408211312453, - 0, - 9.651285835294123, - 0.02578397704808868, - 0.6441188644374771, - 0.03259127616149294, - 0, - 7.462829176470591, - 0.0466055556782719, - -0.0851232987247891, - 0.5241648018700465, - 0, - 5.159190588235296, - 0, - 0, - 0, - 1, - 0 - ]); - }, - kodachrome: () => { - filter.colorMatrix([ - 1.1285582396593525, - -0.3967382283601348, - -0.03992559172921793, - 0, - 63.72958762196502, - -0.16404339962244616, - 1.0835251566291304, - -0.05498805115633132, - 0, - 24.732407896706203, - -0.16786010706155763, - -0.5603416277695248, - 1.6014850761964943, - 0, - 35.62982807460946, - 0, - 0, - 0, - 1, - 0 - ]); - }, - technicolor: () => { - filter.colorMatrix([ - 1.9125277891456083, - -0.8545344976951645, - -0.09155508482755585, - 0, - 11.793603434377337, - -0.3087833385928097, - 1.7658908555458428, - -0.10601743074722245, - 0, - -70.35205161461398, - -0.231103377548616, - -0.7501899197440212, - 1.847597816108189, - 0, - 30.950940869491138, - 0, - 0, - 0, - 1, - 0 - ]); - }, - polaroid: () => { - filter.colorMatrix([ - 1.438, - -0.062, - -0.062, - 0, - 0, - -0.122, - 1.378, - -0.122, - 0, - 0, - -0.016, - -0.016, - 1.483, - 0, - 0, - 0, - 0, - 0, - 1, - 0 - ]); - }, - shiftToBGR: () => { - filter.colorMatrix([ - 0, - 0, - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 0 - ]); - }, - convolution: (matrix) => { - const m = new Float32Array(matrix); - const pixelSizeX = 1 / fxcanvas.width; - const pixelSizeY = 1 / fxcanvas.height; - const program = compileShader(convolution); - if (!program) - return; - gl.uniform1fv(program.uniform["m"], m); - gl.uniform2f(program.uniform["px"], pixelSizeX, pixelSizeY); - draw(); - }, - detectEdges: () => { - filter.convolution.call(this, [ - 0, - 1, - 0, - 1, - -4, - 1, - 0, - 1, - 0 - ]); - }, - sobelX: () => { - filter.convolution.call(this, [ - -1, - 0, - 1, - -2, - 0, - 2, - -1, - 0, - 1 - ]); - }, - sobelY: () => { - filter.convolution.call(this, [ - -1, - -2, - -1, - 0, - 0, - 0, - 1, - 2, - 1 - ]); - }, - sharpen: (amount) => { - const a = amount || 1; - filter.convolution.call(this, [ - 0, - -1 * a, - 0, - -1 * a, - 1 + 4 * a, - -1 * a, - 0, - -1 * a, - 0 - ]); - }, - emboss: (size2) => { - const s = size2 || 1; - filter.convolution.call(this, [ - -2 * s, - -1 * s, - 0, - -1 * s, - 1, - 1 * s, - 0, - 1 * s, - 2 * s - ]); - }, - blur: (size2) => { - const blurSizeX = size2 / 7 / fxcanvas.width; - const blurSizeY = size2 / 7 / fxcanvas.height; - const program = compileShader(blur); - if (!program) - return; - gl.uniform2f(program.uniform["px"], 0, blurSizeY); - draw(DRAW.INTERMEDIATE); - gl.uniform2f(program.uniform["px"], blurSizeX, 0); - draw(); - }, - pixelate: (size2) => { - const blurSizeX = size2 / fxcanvas.width; - const blurSizeY = size2 / fxcanvas.height; - const program = compileShader(pixelate); - if (!program) - return; - gl.uniform2f(program.uniform["size"], blurSizeX, blurSizeY); - draw(); - } - }; - this.add = function(name) { - const args = Array.prototype.slice.call(arguments, 1); - const func = filter[name]; - filterChain.push({ func, args }); - }; - this.reset = function() { - filterChain = []; - }; - this.get = function() { - return filterChain; - }; - this.apply = function(image27) { - resize(image27.width, image27.height); - drawCount = 0; - if (!sourceTexture) - sourceTexture = gl.createTexture(); - gl.bindTexture(gl.TEXTURE_2D, sourceTexture); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST); - gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image27); - for (let i = 0; i < filterChain.length; i++) { - lastInChain = i === filterChain.length - 1; - const f = filterChain[i]; - f.func.apply(this, f.args || []); - } - return fxcanvas; - }; - this.draw = function(image27) { - this.add("brightness", 0); - return this.apply(image27); - }; -} - -// src/image/enhance.ts -var tf = __toESM(require_tfjs_esm()); -async function histogramEqualization(inputImage) { - const squeeze14 = inputImage.shape.length === 4 ? tf.squeeze(inputImage) : inputImage; - const channels = tf.split(squeeze14, 3, 2); - const min2 = [tf.min(channels[0]), tf.min(channels[1]), tf.min(channels[2])]; - const max4 = [tf.max(channels[0]), tf.max(channels[1]), tf.max(channels[2])]; - const absMax = await Promise.all(max4.map((channel) => channel.data())); - const maxValue = 0.99 * Math.max(absMax[0][0], absMax[1][0], absMax[2][0]); - const sub11 = [tf.sub(channels[0], min2[0]), tf.sub(channels[1], min2[1]), tf.sub(channels[2], min2[2])]; - const range = [tf.sub(max4[0], min2[0]), tf.sub(max4[1], min2[1]), tf.sub(max4[2], min2[2])]; - const fact = [tf.div(maxValue, range[0]), tf.div(maxValue, range[1]), tf.div(maxValue, range[2])]; - const enh = [tf.mul(sub11[0], fact[0]), tf.mul(sub11[1], fact[1]), tf.mul(sub11[2], fact[2])]; - const rgb2 = tf.stack([enh[0], enh[1], enh[2]], 2); - const reshape8 = tf.reshape(rgb2, [1, squeeze14.shape[0], squeeze14.shape[1], 3]); - tf.dispose([...channels, ...min2, ...max4, ...sub11, ...range, ...fact, ...enh, rgb2, squeeze14]); - return reshape8; -} - -// src/image/image.ts -var maxSize = 3840; -var inCanvas = null; -var outCanvas = null; -var tmpCanvas = null; -var fx; -var last = { - inputSum: 0, - cacheDiff: 1, - sumMethod: 0, - inputTensor: void 0 -}; -function reset() { - last.inputSum = 0; - last.cacheDiff = 1; - last.sumMethod = 0; - last.inputTensor = void 0; -} -function canvas(width, height) { - let c; - if (env.browser) { - if (env.worker) { - if (typeof OffscreenCanvas === "undefined") - throw new Error("canvas error: attempted to run in web worker but OffscreenCanvas is not supported"); - c = new OffscreenCanvas(width, height); - } else { - if (typeof document === "undefined") - throw new Error("canvas error: attempted to run in browser but DOM is not defined"); - c = document.createElement("canvas"); - c.width = width; - c.height = height; - } - } else { - if (typeof env.Canvas !== "undefined") - c = new env.Canvas(width, height); - else if (typeof globalThis.Canvas !== "undefined") - c = new globalThis.Canvas(width, height); - } - return c; -} -function copy(input, output) { - const outputCanvas = output || canvas(input.width, input.height); - const ctx = outputCanvas.getContext("2d"); - ctx.drawImage(input, 0, 0); - return outputCanvas; -} -async function process2(input, config3, getTensor = true) { - var _a, _b; - if (!input) { - if (config3.debug) - log("input error: input is missing"); - return { tensor: null, canvas: null }; - } - if (!(input instanceof tf2.Tensor) && !(typeof Image !== "undefined" && input instanceof Image) && !(typeof env.Canvas !== "undefined" && input instanceof env.Canvas) && !(typeof globalThis.Canvas !== "undefined" && input instanceof globalThis.Canvas) && !(typeof ImageData !== "undefined" && input instanceof ImageData) && !(typeof ImageBitmap !== "undefined" && input instanceof ImageBitmap) && !(typeof HTMLImageElement !== "undefined" && input instanceof HTMLImageElement) && !(typeof HTMLMediaElement !== "undefined" && input instanceof HTMLMediaElement) && !(typeof HTMLVideoElement !== "undefined" && input instanceof HTMLVideoElement) && !(typeof HTMLCanvasElement !== "undefined" && input instanceof HTMLCanvasElement) && !(typeof OffscreenCanvas !== "undefined" && input instanceof OffscreenCanvas)) { - throw new Error("input error: type is not recognized"); - } - if (input instanceof tf2.Tensor) { - let tensor7 = null; - if (input["isDisposedInternal"]) - throw new Error("input error: attempted to use tensor but it is disposed"); - if (!input.shape) - throw new Error("input error: attempted to use tensor without a shape"); - if (input.shape.length === 3) { - if (input.shape[2] === 3) { - tensor7 = tf2.expandDims(input, 0); - } else if (input.shape[2] === 4) { - const rgb2 = tf2.slice3d(input, [0, 0, 0], [-1, -1, 3]); - tensor7 = tf2.expandDims(rgb2, 0); - tf2.dispose(rgb2); - } - } else if (input.shape.length === 4) { - if (input.shape[3] === 3) { - tensor7 = tf2.clone(input); - } else if (input.shape[3] === 4) { - tensor7 = tf2.slice4d(input, [0, 0, 0, 0], [-1, -1, -1, 3]); - } - } - if (tensor7 == null || tensor7.shape.length !== 4 || tensor7.shape[0] !== 1 || tensor7.shape[3] !== 3) - throw new Error(`input error: attempted to use tensor with unrecognized shape: ${input.shape.toString()}`); - if (tensor7.dtype === "int32") { - const cast8 = tf2.cast(tensor7, "float32"); - tf2.dispose(tensor7); - tensor7 = cast8; - } - return { tensor: tensor7, canvas: config3.filter.return ? outCanvas : null }; - } - if (typeof input["readyState"] !== "undefined" && input.readyState <= 2) { - if (config3.debug) - log("input stream is not ready"); - return { tensor: null, canvas: inCanvas }; - } - const originalWidth = input["naturalWidth"] || input["videoWidth"] || input["width"] || input["shape"] && input["shape"][1] > 0; - const originalHeight = input["naturalHeight"] || input["videoHeight"] || input["height"] || input["shape"] && input["shape"][2] > 0; - if (!originalWidth || !originalHeight) { - if (config3.debug) - log("cannot determine input dimensions"); - return { tensor: null, canvas: inCanvas }; - } - let targetWidth = originalWidth; - let targetHeight = originalHeight; - if (targetWidth > maxSize) { - targetWidth = maxSize; - targetHeight = Math.trunc(targetWidth * originalHeight / originalWidth); - } - if (targetHeight > maxSize) { - targetHeight = maxSize; - targetWidth = Math.trunc(targetHeight * originalWidth / originalHeight); - } - if ((((_a = config3.filter) == null ? void 0 : _a.width) || 0) > 0) - targetWidth = config3.filter.width; - else if ((((_b = config3.filter) == null ? void 0 : _b.height) || 0) > 0) - targetWidth = originalWidth * ((config3.filter.height || 0) / originalHeight); - if ((config3.filter.height || 0) > 0) - targetHeight = config3.filter.height; - else if ((config3.filter.width || 0) > 0) - targetHeight = originalHeight * ((config3.filter.width || 0) / originalWidth); - if (!targetWidth || !targetHeight) - throw new Error("input error: cannot determine dimension"); - if (!inCanvas || inCanvas.width !== targetWidth || inCanvas.height !== targetHeight) - inCanvas = canvas(targetWidth, targetHeight); - const inCtx = inCanvas.getContext("2d"); - if (typeof ImageData !== "undefined" && input instanceof ImageData) { - inCtx.putImageData(input, 0, 0); - } else { - if (config3.filter.flip && typeof inCtx.translate !== "undefined") { - inCtx.translate(originalWidth, 0); - inCtx.scale(-1, 1); - inCtx.drawImage(input, 0, 0, originalWidth, originalHeight, 0, 0, inCanvas.width, inCanvas.height); - inCtx.setTransform(1, 0, 0, 1, 0, 0); - } else { - inCtx.drawImage(input, 0, 0, originalWidth, originalHeight, 0, 0, inCanvas.width, inCanvas.height); - } - } - if (!outCanvas || inCanvas.width !== outCanvas.width || inCanvas.height !== outCanvas.height) - outCanvas = canvas(inCanvas.width, inCanvas.height); - if (config3.filter.enabled && env.webgl.supported) { - if (!fx) - fx = env.browser ? new GLImageFilter() : null; - env.filter = !!fx; - if (!(fx == null ? void 0 : fx.add)) { - if (config3.debug) - log("input process error: cannot initialize filters"); - env.webgl.supported = false; - config3.filter.enabled = false; - copy(inCanvas, outCanvas); - } else { - fx.reset(); - if (config3.filter.brightness !== 0) - fx.add("brightness", config3.filter.brightness); - if (config3.filter.contrast !== 0) - fx.add("contrast", config3.filter.contrast); - if (config3.filter.sharpness !== 0) - fx.add("sharpen", config3.filter.sharpness); - if (config3.filter.blur !== 0) - fx.add("blur", config3.filter.blur); - if (config3.filter.saturation !== 0) - fx.add("saturation", config3.filter.saturation); - if (config3.filter.hue !== 0) - fx.add("hue", config3.filter.hue); - if (config3.filter.negative) - fx.add("negative"); - if (config3.filter.sepia) - fx.add("sepia"); - if (config3.filter.vintage) - fx.add("brownie"); - if (config3.filter.sepia) - fx.add("sepia"); - if (config3.filter.kodachrome) - fx.add("kodachrome"); - if (config3.filter.technicolor) - fx.add("technicolor"); - if (config3.filter.polaroid) - fx.add("polaroid"); - if (config3.filter.pixelate !== 0) - fx.add("pixelate", config3.filter.pixelate); - if (fx.get() > 0) - outCanvas = fx.apply(inCanvas); - else - outCanvas = fx.draw(inCanvas); - } - } else { - copy(inCanvas, outCanvas); - if (fx) - fx = null; - env.filter = !!fx; - } - if (!getTensor) - return { tensor: null, canvas: outCanvas }; - if (!outCanvas) - throw new Error("canvas error: cannot create output"); - let pixels; - let depth = 3; - if (typeof ImageData !== "undefined" && input instanceof ImageData || input.data && input.width && input.height) { - if (env.browser && tf2.browser) { - pixels = tf2.browser ? tf2.browser.fromPixels(input) : null; - } else { - depth = input.data.length / input.height / input.width; - const arr = new Uint8Array(input.data.buffer); - pixels = tf2.tensor(arr, [input.height, input.width, depth], "int32"); - } - } else { - if (!tmpCanvas || outCanvas.width !== tmpCanvas.width || outCanvas.height !== tmpCanvas.height) - tmpCanvas = canvas(outCanvas.width, outCanvas.height); - if (tf2.browser && env.browser) { - if (config3.backend === "webgl" || config3.backend === "humangl" || config3.backend === "webgpu") { - pixels = tf2.browser.fromPixels(outCanvas); - } else { - tmpCanvas = copy(outCanvas); - pixels = tf2.browser.fromPixels(tmpCanvas); - } - } else { - const tempCanvas = copy(outCanvas); - const tempCtx = tempCanvas.getContext("2d"); - const tempData = tempCtx.getImageData(0, 0, targetWidth, targetHeight); - depth = tempData.data.length / targetWidth / targetHeight; - const arr = new Uint8Array(tempData.data.buffer); - pixels = tf2.tensor(arr, [targetWidth, targetHeight, depth]); - } - } - if (depth === 4) { - const rgb2 = tf2.slice3d(pixels, [0, 0, 0], [-1, -1, 3]); - tf2.dispose(pixels); - pixels = rgb2; - } - if (!pixels) - throw new Error("input error: cannot create tensor"); - const casted = tf2.cast(pixels, "float32"); - const tensor6 = config3.filter.equalization ? await histogramEqualization(casted) : tf2.expandDims(casted, 0); - tf2.dispose([pixels, casted]); - return { tensor: tensor6, canvas: config3.filter.return ? outCanvas : null }; -} -async function skip(config3, input) { - let skipFrame = false; - if (config3.cacheSensitivity === 0 || !input.shape || input.shape.length !== 4 || input.shape[1] > 2048 || input.shape[2] > 2048) - return skipFrame; - if (!last.inputTensor) { - last.inputTensor = tf2.clone(input); - } else if (last.inputTensor.shape[1] !== input.shape[1] || last.inputTensor.shape[2] !== input.shape[2]) { - tf2.dispose(last.inputTensor); - last.inputTensor = tf2.clone(input); - } else { - const t2 = {}; - t2.diff = tf2.sub(input, last.inputTensor); - t2.squared = tf2.mul(t2.diff, t2.diff); - t2.sum = tf2.sum(t2.squared); - const diffSum = await t2.sum.data(); - const diffRelative = diffSum[0] / (input.shape[1] || 1) / (input.shape[2] || 1) / 255 / 3; - tf2.dispose([last.inputTensor, t2.diff, t2.squared, t2.sum]); - last.inputTensor = tf2.clone(input); - skipFrame = diffRelative <= (config3.cacheSensitivity || 0); - } - return skipFrame; -} -async function compare(config3, input1, input2) { - const t2 = {}; - if (!input1 || !input2 || input1.shape.length !== 4 || input1.shape.length !== input2.shape.length) { - if (!config3.debug) - log("invalid input tensor or tensor shapes do not match:", input1.shape, input2.shape); - return 0; - } - if (input1.shape[0] !== 1 || input2.shape[0] !== 1 || input1.shape[3] !== 3 || input2.shape[3] !== 3) { - if (!config3.debug) - log("input tensors must be of shape [1, height, width, 3]:", input1.shape, input2.shape); - return 0; - } - t2.input1 = tf2.clone(input1); - t2.input2 = input1.shape[1] !== input2.shape[1] || input1.shape[2] !== input2.shape[2] ? tf2.image.resizeBilinear(input2, [input1.shape[1], input1.shape[2]]) : tf2.clone(input2); - t2.diff = tf2.sub(t2.input1, t2.input2); - t2.squared = tf2.mul(t2.diff, t2.diff); - t2.sum = tf2.sum(t2.squared); - const diffSum = await t2.sum.data(); - const diffRelative = diffSum[0] / (input1.shape[1] || 1) / (input1.shape[2] || 1) / 255 / 3; - tf2.dispose([t2.input1, t2.input2, t2.diff, t2.squared, t2.sum]); - return diffRelative; -} - -// src/util/env.ts -var Env = class { - constructor() { - __publicField(this, "browser"); - __publicField(this, "node"); - __publicField(this, "worker"); - __publicField(this, "platform", ""); - __publicField(this, "agent", ""); - __publicField(this, "backends", []); - __publicField(this, "initial"); - __publicField(this, "filter"); - __publicField(this, "tfjs"); - __publicField(this, "offscreen"); - __publicField(this, "perfadd", false); - __publicField(this, "tensorflow", { - version: void 0, - gpu: void 0 - }); - __publicField(this, "wasm", { - supported: void 0, - backend: void 0, - simd: void 0, - multithread: void 0 - }); - __publicField(this, "webgl", { - supported: void 0, - backend: void 0, - version: void 0, - renderer: void 0 - }); - __publicField(this, "webgpu", { - supported: void 0, - backend: void 0, - adapter: void 0 - }); - __publicField(this, "cpu", { - model: void 0, - flags: [] - }); - __publicField(this, "kernels", []); - __publicField(this, "Canvas"); - __publicField(this, "Image"); - __publicField(this, "ImageData"); - this.browser = typeof navigator !== "undefined"; - this.node = typeof process !== "undefined" && typeof process.versions !== "undefined" && typeof process.versions.node !== "undefined"; - this.tfjs = { version: tf3.version["tfjs-core"] }; - this.offscreen = typeof OffscreenCanvas !== "undefined"; - this.initial = true; - this.worker = this.browser && this.offscreen ? typeof WorkerGlobalScope !== "undefined" : void 0; - if (typeof navigator !== "undefined") { - const raw = navigator.userAgent.match(/\(([^()]+)\)/g); - if (raw == null ? void 0 : raw[0]) { - const platformMatch = raw[0].match(/\(([^()]+)\)/g); - this.platform = (platformMatch == null ? void 0 : platformMatch[0]) ? platformMatch[0].replace(/\(|\)/g, "") : ""; - this.agent = navigator.userAgent.replace(raw[0], ""); - if (this.platform[1]) - this.agent = this.agent.replace(raw[1], ""); - this.agent = this.agent.replace(/ /g, " "); - } - } else if (typeof process !== "undefined") { - this.platform = `${process.platform} ${process.arch}`; - this.agent = `NodeJS ${process.version}`; - } - } - async updateBackend() { - this.backends = Object.keys(tf3.engine().registryFactory); - this.tensorflow = { - version: tf3.backend().binding ? tf3.backend().binding.TF_Version : void 0, - gpu: tf3.backend().binding ? tf3.backend().binding.isUsingGpuDevice() : void 0 - }; - this.wasm.supported = typeof WebAssembly !== "undefined"; - this.wasm.backend = this.backends.includes("wasm"); - if (this.wasm.supported && this.wasm.backend && tf3.getBackend() === "wasm") { - this.wasm.simd = tf3.env().get("WASM_HAS_SIMD_SUPPORT"); - this.wasm.multithread = tf3.env().get("WASM_HAS_MULTITHREAD_SUPPORT"); - } - const c = canvas(100, 100); - const ctx = c ? c.getContext("webgl2") : void 0; - this.webgl.supported = typeof ctx !== "undefined"; - this.webgl.backend = this.backends.includes("webgl"); - if (this.webgl.supported && this.webgl.backend && (tf3.getBackend() === "webgl" || tf3.getBackend() === "humangl")) { - const gl = tf3.backend().gpgpu !== "undefined" ? await tf3.backend().getGPGPUContext().gl : null; - if (gl) { - this.webgl.version = gl.getParameter(gl.VERSION); - this.webgl.renderer = gl.getParameter(gl.RENDERER); - } - } - this.webgpu.supported = this.browser && typeof navigator.gpu !== "undefined"; - this.webgpu.backend = this.backends.includes("webgpu"); - try { - if (this.webgpu.supported) { - const adapter = await navigator.gpu.requestAdapter(); - this.webgpu.adapter = adapter ? adapter.name : void 0; - } - } catch (e) { - this.webgpu.supported = false; - } - try { - this.kernels = tf3.getKernelsForBackend(tf3.getBackend()).map((kernel) => kernel.kernelName.toLowerCase()); - } catch (e) { - } - } - updateCPU() { - const cpu = { model: "", flags: [] }; - if (this.node && this.platform.startsWith("linux")) { - } - if (!this.cpu) - Object.defineProperty(this, "cpu", { value: cpu }); - else - this.cpu = cpu; - } -}; -var env = new Env(); - -// src/util/webcam.ts -var WebCam = class { - constructor() { - __publicField(this, "config"); - __publicField(this, "element"); - __publicField(this, "stream"); - __publicField(this, "start", async (webcamConfig) => { - if (webcamConfig == null ? void 0 : webcamConfig.debug) - this.config.debug = webcamConfig == null ? void 0 : webcamConfig.debug; - if (webcamConfig == null ? void 0 : webcamConfig.crop) - this.config.crop = webcamConfig == null ? void 0 : webcamConfig.crop; - if (webcamConfig == null ? void 0 : webcamConfig.mode) - this.config.mode = webcamConfig == null ? void 0 : webcamConfig.mode; - if (webcamConfig == null ? void 0 : webcamConfig.width) - this.config.width = webcamConfig == null ? void 0 : webcamConfig.width; - if (webcamConfig == null ? void 0 : webcamConfig.height) - this.config.height = webcamConfig == null ? void 0 : webcamConfig.height; - if (webcamConfig == null ? void 0 : webcamConfig.element) { - if (typeof webcamConfig.element === "string") { - const el = document.getElementById(webcamConfig.element); - if (el && el instanceof HTMLVideoElement) { - this.element = el; - } else { - if (this.config.debug) - log("webcam", "cannot get dom element", webcamConfig.element); - return; - } - } else if (webcamConfig.element instanceof HTMLVideoElement) { - this.element = webcamConfig.element; - } else { - if (this.config.debug) - log("webcam", "unknown dom element", webcamConfig.element); - return; - } - } else { - this.element = document.createElement("video"); - } - const requestedConstraints = { - audio: false, - video: { - facingMode: this.config.mode === "front" ? "user" : "environment", - resizeMode: this.config.crop ? "crop-and-scale" : "none", - width: { ideal: this.config.width > 0 ? this.config.width : window.innerWidth }, - height: { ideal: this.config.height > 0 ? this.config.height : window.innerHeight } - } - }; - this.element.addEventListener("play", () => { - if (this.config.debug) - log("webcam", "play"); - }); - this.element.addEventListener("pause", () => { - if (this.config.debug) - log("webcam", "pause"); - }); - this.element.addEventListener("click", async () => { - if (!this.element || !this.stream) - return; - if (this.element.paused) - await this.element.play(); - else - this.element.pause(); - }); - if (!(navigator == null ? void 0 : navigator.mediaDevices)) { - if (this.config.debug) - log("webcam", "no devices"); - return; - } - try { - this.stream = await navigator.mediaDevices.getUserMedia(requestedConstraints); - } catch (err) { - log("webcam", err); - return; - } - if (!this.stream) { - if (this.config.debug) - log("webcam", "no stream"); - return; - } - this.element.srcObject = this.stream; - const ready3 = new Promise((resolve) => { - if (!this.element) - resolve(false); - else - this.element.onloadeddata = () => resolve(true); - }); - await ready3; - await this.element.play(); - if (this.config.debug) { - log("webcam", { - width: this.width, - height: this.height, - label: this.label, - stream: this.stream, - track: this.track, - settings: this.settings, - constraints: this.constraints, - capabilities: this.capabilities - }); - } - }); - __publicField(this, "pause", () => { - if (this.element) - this.element.pause(); - }); - __publicField(this, "play", async () => { - if (this.element) - await this.element.play(); - }); - __publicField(this, "stop", () => { - if (this.config.debug) - log("webcam", "stop"); - if (this.track) - this.track.stop(); - }); - this.config = { - element: void 0, - debug: true, - mode: "front", - crop: false, - width: 0, - height: 0 - }; - } - get track() { - if (!this.stream) - return void 0; - return this.stream.getVideoTracks()[0]; - } - get capabilities() { - if (!this.track) - return void 0; - return this.track.getCapabilities ? this.track.getCapabilities() : void 0; - } - get constraints() { - if (!this.track) - return void 0; - return this.track.getConstraints ? this.track.getConstraints() : void 0; - } - get settings() { - if (!this.stream) - return void 0; - const track = this.stream.getVideoTracks()[0]; - return track.getSettings ? track.getSettings() : void 0; - } - get label() { - if (!this.track) - return ""; - return this.track.label; - } - get paused() { - var _a; - return ((_a = this.element) == null ? void 0 : _a.paused) || false; - } - get width() { - var _a; - return ((_a = this.element) == null ? void 0 : _a.videoWidth) || 0; - } - get height() { - var _a; - return ((_a = this.element) == null ? void 0 : _a.videoHeight) || 0; - } -}; - -// src/tfjs/load.ts -var tf4 = __toESM(require_tfjs_esm()); - -// models/models.json -var models_exports = {}; -__export(models_exports, { - age: () => age, - "anti-spoofing": () => anti_spoofing, - antispoof: () => antispoof, - blazeface: () => blazeface, - "blazeface-back": () => blazeface_back, - "blazeface-front": () => blazeface_front, - "blazepose-detect": () => blazepose_detect, - "blazepose-detector2d": () => blazepose_detector2d, - "blazepose-detector3d": () => blazepose_detector3d, - "blazepose-full": () => blazepose_full, - "blazepose-heavy": () => blazepose_heavy, - "blazepose-lite": () => blazepose_lite, - default: () => models_default, - efficientpose: () => efficientpose, - "efficientpose-i-lite": () => efficientpose_i_lite, - "efficientpose-ii-lite": () => efficientpose_ii_lite, - "efficientpose-iv": () => efficientpose_iv, - emotion: () => emotion, - faceboxes: () => faceboxes, - facemesh: () => facemesh, - "facemesh-attention": () => facemesh_attention, - "facemesh-attention-alt": () => facemesh_attention_alt, - "facemesh-detection-full": () => facemesh_detection_full, - "facemesh-detection-short": () => facemesh_detection_short, - "facemesh-orig": () => facemesh_orig, - faceres: () => faceres, - "faceres-deep": () => faceres_deep, - gear: () => gear, - gender: () => gender, - "gender-ssrnet-imdb": () => gender_ssrnet_imdb, - handdetect: () => handdetect, - "handlandmark-full": () => handlandmark_full, - "handlandmark-lite": () => handlandmark_lite, - "handlandmark-sparse": () => handlandmark_sparse, - handskeleton: () => handskeleton, - handtrack: () => handtrack, - "insightface-efficientnet-b0": () => insightface_efficientnet_b0, - "insightface-ghostnet-strides1": () => insightface_ghostnet_strides1, - "insightface-ghostnet-strides2": () => insightface_ghostnet_strides2, - "insightface-mobilenet-emore": () => insightface_mobilenet_emore, - "insightface-mobilenet-swish": () => insightface_mobilenet_swish, - iris: () => iris, - liveness: () => liveness, - "mb3-centernet": () => mb3_centernet, - meet: () => meet, - mobileface: () => mobileface, - mobilefacenet: () => mobilefacenet, - models: () => models, - "movenet-lightning": () => movenet_lightning, - "movenet-multipose": () => movenet_multipose, - "movenet-thunder": () => movenet_thunder, - nanodet: () => nanodet, - "nanodet-e": () => nanodet_e, - "nanodet-g": () => nanodet_g, - "nanodet-m": () => nanodet_m, - "nanodet-t": () => nanodet_t, - posenet: () => posenet, - selfie: () => selfie -}); -var antispoof = 853098; -var blazeface = 538928; -var emotion = 820516; -var facemesh = 1477958; -var faceres = 6978814; -var handlandmark_full = 5431368; -var handtrack = 2964837; -var iris = 2599092; -var liveness = 592976; -var mb3_centernet = 4030290; -var models = 0; -var movenet_lightning = 4650216; -var selfie = 212886; -var age = 161240; -var blazeface_back = 538928; -var blazeface_front = 402048; -var blazepose_detector2d = 7499400; -var blazepose_detector3d = 5928856; -var blazepose_full = 6338290; -var blazepose_heavy = 27501554; -var blazepose_lite = 2725490; -var efficientpose = 5651240; -var faceboxes = 2013002; -var facemesh_attention_alt = 2387598; -var facemesh_attention = 2382414; -var facemesh_detection_full = 1026192; -var facemesh_detection_short = 201268; -var facemesh_orig = 2955780; -var faceres_deep = 13957620; -var gear = 1498916; -var gender_ssrnet_imdb = 161236; -var gender = 201808; -var handdetect = 3515612; -var handlandmark_lite = 2023432; -var handlandmark_sparse = 5286322; -var handskeleton = 5502280; -var meet = 372228; -var mobileface = 2183192; -var mobilefacenet = 5171976; -var movenet_multipose = 9448838; -var movenet_thunder = 12477112; -var nanodet = 7574558; -var posenet = 5032780; -var blazepose_detect = 5928804; -var anti_spoofing = 853098; -var efficientpose_i_lite = 2269064; -var efficientpose_ii_lite = 5651240; -var efficientpose_iv = 25643252; -var insightface_efficientnet_b0 = 13013224; -var insightface_ghostnet_strides1 = 8093408; -var insightface_ghostnet_strides2 = 8049584; -var insightface_mobilenet_emore = 6938536; -var insightface_mobilenet_swish = 12168584; -var nanodet_e = 12319156; -var nanodet_g = 7574558; -var nanodet_m = 1887474; -var nanodet_t = 5294216; -var models_default = { - antispoof, - blazeface, - emotion, - facemesh, - faceres, - "handlandmark-full": handlandmark_full, - handtrack, - iris, - liveness, - "mb3-centernet": mb3_centernet, - models, - "movenet-lightning": movenet_lightning, - selfie, - age, - "blazeface-back": blazeface_back, - "blazeface-front": blazeface_front, - "blazepose-detector2d": blazepose_detector2d, - "blazepose-detector3d": blazepose_detector3d, - "blazepose-full": blazepose_full, - "blazepose-heavy": blazepose_heavy, - "blazepose-lite": blazepose_lite, - efficientpose, - faceboxes, - "facemesh-attention-alt": facemesh_attention_alt, - "facemesh-attention": facemesh_attention, - "facemesh-detection-full": facemesh_detection_full, - "facemesh-detection-short": facemesh_detection_short, - "facemesh-orig": facemesh_orig, - "faceres-deep": faceres_deep, - gear, - "gender-ssrnet-imdb": gender_ssrnet_imdb, - gender, - handdetect, - "handlandmark-lite": handlandmark_lite, - "handlandmark-sparse": handlandmark_sparse, - handskeleton, - meet, - mobileface, - mobilefacenet, - "movenet-multipose": movenet_multipose, - "movenet-thunder": movenet_thunder, - nanodet, - posenet, - "blazepose-detect": blazepose_detect, - "anti-spoofing": anti_spoofing, - "efficientpose-i-lite": efficientpose_i_lite, - "efficientpose-ii-lite": efficientpose_ii_lite, - "efficientpose-iv": efficientpose_iv, - "insightface-efficientnet-b0": insightface_efficientnet_b0, - "insightface-ghostnet-strides1": insightface_ghostnet_strides1, - "insightface-ghostnet-strides2": insightface_ghostnet_strides2, - "insightface-mobilenet-emore": insightface_mobilenet_emore, - "insightface-mobilenet-swish": insightface_mobilenet_swish, - "nanodet-e": nanodet_e, - "nanodet-g": nanodet_g, - "nanodet-m": nanodet_m, - "nanodet-t": nanodet_t -}; - -// src/tfjs/load.ts -var options = { - cacheModels: true, - cacheSupported: true, - verbose: true, - debug: false, - modelBasePath: "" -}; -var modelStats = {}; -async function httpHandler(url, init3) { - if (options.debug) - log("load model fetch:", url, init3); - return fetch(url, init3); -} -function setModelLoadOptions(config3) { - options.cacheModels = config3.cacheModels; - options.verbose = config3.debug; - options.modelBasePath = config3.modelBasePath; -} -async function loadModel(modelPath) { - var _a, _b, _c, _d; - let modelUrl = join(options.modelBasePath, modelPath || ""); - if (!modelUrl.toLowerCase().endsWith(".json")) - modelUrl += ".json"; - const modelPathSegments = modelUrl.includes("/") ? modelUrl.split("/") : modelUrl.split("\\"); - const shortModelName = modelPathSegments[modelPathSegments.length - 1].replace(".json", ""); - const cachedModelName = "indexeddb://" + shortModelName; - modelStats[shortModelName] = { - name: shortModelName, - sizeFromManifest: 0, - sizeLoadedWeights: 0, - sizeDesired: models_exports[shortModelName], - inCache: false - }; - options.cacheSupported = typeof indexedDB !== "undefined"; - let cachedModels = {}; - try { - cachedModels = options.cacheSupported && options.cacheModels ? await tf4.io.listModels() : {}; - } catch (e) { - options.cacheSupported = false; - } - modelStats[shortModelName].inCache = options.cacheSupported && options.cacheModels && Object.keys(cachedModels).includes(cachedModelName); - const tfLoadOptions = typeof fetch === "undefined" ? {} : { fetchFunc: (url, init3) => httpHandler(url, init3) }; - let model21 = new tf4.GraphModel(modelStats[shortModelName].inCache ? cachedModelName : modelUrl, tfLoadOptions); - let loaded = false; - try { - model21.findIOHandler(); - if (options.debug) - log("model load handler:", model21["handler"]); - } catch (err) { - log("error finding model i/o handler:", modelUrl, err); - } - try { - const artifacts = await ((_a = model21.handler) == null ? void 0 : _a.load()) || null; - modelStats[shortModelName].sizeFromManifest = ((_b = artifacts == null ? void 0 : artifacts.weightData) == null ? void 0 : _b.byteLength) || 0; - if (artifacts) - model21.loadSync(artifacts); - else - model21 = await tf4.loadGraphModel(modelStats[shortModelName].inCache ? cachedModelName : modelUrl, tfLoadOptions); - modelStats[shortModelName].sizeLoadedWeights = ((_d = (_c = model21.artifacts) == null ? void 0 : _c.weightData) == null ? void 0 : _d.byteLength) || 0; - if (options.verbose) - log("load:", { model: shortModelName, url: model21["modelUrl"], bytes: modelStats[shortModelName].sizeLoadedWeights }); - loaded = true; - } catch (err) { - log("error loading model:", modelUrl, err); - } - if (loaded && options.cacheModels && options.cacheSupported && !modelStats[shortModelName].inCache) { - try { - const saveResult = await model21.save(cachedModelName); - if (options.debug) - log("model saved:", cachedModelName, saveResult); - } catch (err) { - log("error saving model:", modelUrl, err); - } - } - return model21; -} - -// src/human.ts -var tf39 = __toESM(require_tfjs_esm()); - -// package.json -var version2 = "2.11.0"; - -// src/tfjs/humangl.ts -var tf34 = __toESM(require_tfjs_esm()); - -// src/models.ts -var models_exports2 = {}; -__export(models_exports2, { - Models: () => Models, - getModelStats: () => getModelStats, - load: () => load22, - reset: () => reset2, - validate: () => validate2, - validateModel: () => validateModel -}); - -// src/face/antispoof.ts -var tf5 = __toESM(require_tfjs_esm()); -var model; -var cached = []; -var skipped = Number.MAX_SAFE_INTEGER; -var lastCount = 0; -var lastTime = 0; -async function load(config3) { - var _a; - if (env.initial) - model = null; - if (!model) - model = await loadModel((_a = config3.face.antispoof) == null ? void 0 : _a.modelPath); - else if (config3.debug) - log("cached model:", model["modelUrl"]); - return model; -} -async function predict(image27, config3, idx, count2) { - var _a, _b; - if (!model || !(model == null ? void 0 : model["executor"])) - return 0; - const skipTime = (((_a = config3.face.antispoof) == null ? void 0 : _a.skipTime) || 0) > now() - lastTime; - const skipFrame = skipped < (((_b = config3.face.antispoof) == null ? void 0 : _b.skipFrames) || 0); - if (config3.skipAllowed && skipTime && skipFrame && lastCount === count2 && cached[idx]) { - skipped++; - return cached[idx]; - } - skipped = 0; - return new Promise(async (resolve) => { - const resize = tf5.image.resizeBilinear(image27, [(model == null ? void 0 : model.inputs[0].shape) ? model.inputs[0].shape[2] : 0, (model == null ? void 0 : model.inputs[0].shape) ? model.inputs[0].shape[1] : 0], false); - const res = model == null ? void 0 : model.execute(resize); - const num = (await res.data())[0]; - cached[idx] = Math.round(100 * num) / 100; - lastCount = count2; - lastTime = now(); - tf5.dispose([resize, res]); - resolve(cached[idx]); - }); -} - -// src/face/blazeface.ts -var tf8 = __toESM(require_tfjs_esm()); - -// src/face/facemeshutil.ts -var tf7 = __toESM(require_tfjs_esm()); - -// src/face/facemeshcoords.ts -var meshAnnotations = { - silhouette: [ - 10, - 338, - 297, - 332, - 284, - 251, - 389, - 356, - 454, - 323, - 361, - 288, - 397, - 365, - 379, - 378, - 400, - 377, - 152, - 148, - 176, - 149, - 150, - 136, - 172, - 58, - 132, - 93, - 234, - 127, - 162, - 21, - 54, - 103, - 67, - 109 - ], - lipsUpperOuter: [185, 40, 39, 37, 0, 267, 269, 270, 409], - lipsLowerOuter: [61, 146, 91, 181, 84, 17, 314, 405, 321, 375, 291], - lipsUpperInner: [191, 80, 81, 82, 13, 312, 311, 310, 415], - lipsLowerInner: [78, 95, 88, 178, 87, 14, 317, 402, 318, 324, 308], - lipsLowerSemiOuter: [76, 77, 90, 180, 85, 16, 315, 404, 320, 307, 306], - lipsUpperSemiOuter: [184, 74, 73, 72, 11, 302, 303, 304, 408], - lipsLowerSemiInner: [62, 96, 89, 179, 86, 15, 316, 403, 319, 325, 292], - lipsUpperSemiInner: [183, 42, 41, 38, 12, 268, 271, 272, 407], - rightEyeUpper0: [246, 161, 160, 159, 158, 157, 173], - rightEyeLower0: [33, 7, 163, 144, 145, 153, 154, 155, 133], - rightEyeUpper1: [247, 30, 29, 27, 28, 56, 190], - rightEyeLower1: [130, 25, 110, 24, 23, 22, 26, 112, 243], - rightEyeUpper2: [113, 225, 224, 223, 222, 221, 189], - rightEyeLower2: [226, 31, 228, 229, 230, 231, 232, 233, 244], - rightEyeLower3: [143, 111, 117, 118, 119, 120, 121, 128, 245], - rightEyebrowUpper: [156, 70, 63, 105, 66, 107, 55, 193], - rightEyebrowLower: [35, 124, 46, 53, 52, 65], - rightEyeIris: [473, 474, 475, 476, 477], - leftEyeUpper0: [466, 388, 387, 386, 385, 384, 398], - leftEyeLower0: [263, 249, 390, 373, 374, 380, 381, 382, 362], - leftEyeUpper1: [467, 260, 259, 257, 258, 286, 414], - leftEyeLower1: [359, 255, 339, 254, 253, 252, 256, 341, 463], - leftEyeUpper2: [342, 445, 444, 443, 442, 441, 413], - leftEyeLower2: [446, 261, 448, 449, 450, 451, 452, 453, 464], - leftEyeLower3: [372, 340, 346, 347, 348, 349, 350, 357, 465], - leftEyebrowUpper: [383, 300, 293, 334, 296, 336, 285, 417], - leftEyebrowLower: [265, 353, 276, 283, 282, 295], - leftEyeIris: [468, 469, 470, 471, 472], - midwayBetweenEyes: [168], - noseTip: [1], - noseBottom: [2], - noseRightCorner: [98], - noseLeftCorner: [327], - rightCheek: [205], - leftCheek: [425] -}; -var meshLandmarks = { - count: 468, - mouth: 13, - symmetryLine: [13, meshAnnotations.midwayBetweenEyes[0]] -}; -var blazeFaceLandmarks = { - leftEye: 0, - rightEye: 1, - nose: 2, - mouth: 3, - leftEar: 4, - rightEar: 5, - symmetryLine: [3, 2] -}; -var irisIndices = [ - { key: "EyeUpper0", indices: [9, 10, 11, 12, 13, 14, 15] }, - { key: "EyeUpper1", indices: [25, 26, 27, 28, 29, 30, 31] }, - { key: "EyeUpper2", indices: [41, 42, 43, 44, 45, 46, 47] }, - { key: "EyeLower0", indices: [0, 1, 2, 3, 4, 5, 6, 7, 8] }, - { key: "EyeLower1", indices: [16, 17, 18, 19, 20, 21, 22, 23, 24] }, - { key: "EyeLower2", indices: [32, 33, 34, 35, 36, 37, 38, 39, 40] }, - { key: "EyeLower3", indices: [54, 55, 56, 57, 58, 59, 60, 61, 62] }, - { key: "EyebrowUpper", indices: [63, 64, 65, 66, 67, 68, 69, 70] }, - { key: "EyebrowLower", indices: [48, 49, 50, 51, 52, 53] } -]; -var UV468 = [ - [0.499976992607117, 0.652534008026123], - [0.500025987625122, 0.547487020492554], - [0.499974012374878, 0.602371990680695], - [0.482113003730774, 0.471979022026062], - [0.500150978565216, 0.527155995368958], - [0.499909996986389, 0.498252987861633], - [0.499523013830185, 0.40106201171875], - [0.289712011814117, 0.380764007568359], - [0.499954998493195, 0.312398016452789], - [0.499987006187439, 0.269918978214264], - [0.500023007392883, 0.107050001621246], - [0.500023007392883, 0.666234016418457], - [0.5000159740448, 0.679224014282227], - [0.500023007392883, 0.692348003387451], - [0.499976992607117, 0.695277988910675], - [0.499976992607117, 0.70593398809433], - [0.499976992607117, 0.719385027885437], - [0.499976992607117, 0.737019002437592], - [0.499967992305756, 0.781370997428894], - [0.499816000461578, 0.562981009483337], - [0.473773002624512, 0.573909997940063], - [0.104906998574734, 0.254140973091125], - [0.365929991006851, 0.409575998783112], - [0.338757991790771, 0.41302502155304], - [0.311120003461838, 0.409460008144379], - [0.274657994508743, 0.389131009578705], - [0.393361985683441, 0.403706014156342], - [0.345234006643295, 0.344011008739471], - [0.370094001293182, 0.346076011657715], - [0.319321990013123, 0.347265005111694], - [0.297903001308441, 0.353591024875641], - [0.24779200553894, 0.410809993743896], - [0.396889001131058, 0.842755019664764], - [0.280097991228104, 0.375599980354309], - [0.106310002505779, 0.399955987930298], - [0.2099249958992, 0.391353011131287], - [0.355807989835739, 0.534406006336212], - [0.471751004457474, 0.65040397644043], - [0.474155008792877, 0.680191993713379], - [0.439785003662109, 0.657229006290436], - [0.414617002010345, 0.66654098033905], - [0.450374007225037, 0.680860996246338], - [0.428770989179611, 0.682690978050232], - [0.374971002340317, 0.727805018424988], - [0.486716985702515, 0.547628998756409], - [0.485300987958908, 0.527395009994507], - [0.257764995098114, 0.314490020275116], - [0.401223003864288, 0.455172002315521], - [0.429818987846375, 0.548614978790283], - [0.421351999044418, 0.533740997314453], - [0.276895999908447, 0.532056987285614], - [0.483370006084442, 0.499586999416351], - [0.33721199631691, 0.282882988452911], - [0.296391993761063, 0.293242990970612], - [0.169294998049736, 0.193813979625702], - [0.447580009698868, 0.302609980106354], - [0.392390012741089, 0.353887975215912], - [0.354490011930466, 0.696784019470215], - [0.067304998636246, 0.730105042457581], - [0.442739009857178, 0.572826027870178], - [0.457098007202148, 0.584792017936707], - [0.381974011659622, 0.694710969924927], - [0.392388999462128, 0.694203019142151], - [0.277076005935669, 0.271932005882263], - [0.422551989555359, 0.563233017921448], - [0.385919004678726, 0.281364023685455], - [0.383103013038635, 0.255840003490448], - [0.331431001424789, 0.119714021682739], - [0.229923993349075, 0.232002973556519], - [0.364500999450684, 0.189113974571228], - [0.229622006416321, 0.299540996551514], - [0.173287004232407, 0.278747975826263], - [0.472878992557526, 0.666198015213013], - [0.446828007698059, 0.668527007102966], - [0.422762006521225, 0.673889994621277], - [0.445307999849319, 0.580065965652466], - [0.388103008270264, 0.693961024284363], - [0.403039008378983, 0.706539988517761], - [0.403629004955292, 0.693953037261963], - [0.460041999816895, 0.557139039039612], - [0.431158006191254, 0.692366003990173], - [0.452181994915009, 0.692366003990173], - [0.475387006998062, 0.692366003990173], - [0.465828001499176, 0.779190003871918], - [0.472328990697861, 0.736225962638855], - [0.473087012767792, 0.717857003211975], - [0.473122000694275, 0.704625964164734], - [0.473033010959625, 0.695277988910675], - [0.427942007780075, 0.695277988910675], - [0.426479011774063, 0.703539967536926], - [0.423162013292313, 0.711845993995667], - [0.4183090031147, 0.720062971115112], - [0.390094995498657, 0.639572978019714], - [0.013953999616206, 0.560034036636353], - [0.499913990497589, 0.58014702796936], - [0.413199990987778, 0.69539999961853], - [0.409626007080078, 0.701822996139526], - [0.468080013990402, 0.601534962654114], - [0.422728985548019, 0.585985004901886], - [0.463079988956451, 0.593783974647522], - [0.37211999297142, 0.47341400384903], - [0.334562003612518, 0.496073007583618], - [0.411671012639999, 0.546965003013611], - [0.242175996303558, 0.14767599105835], - [0.290776997804642, 0.201445996761322], - [0.327338010072708, 0.256527006626129], - [0.399509996175766, 0.748921036720276], - [0.441727995872498, 0.261676013469696], - [0.429764986038208, 0.187834024429321], - [0.412198007106781, 0.108901023864746], - [0.288955003023148, 0.398952007293701], - [0.218936994671822, 0.435410976409912], - [0.41278201341629, 0.398970007896423], - [0.257135003805161, 0.355440020561218], - [0.427684992551804, 0.437960982322693], - [0.448339998722076, 0.536936044692993], - [0.178560003638268, 0.45755398273468], - [0.247308000922203, 0.457193970680237], - [0.286267012357712, 0.467674970626831], - [0.332827985286713, 0.460712015628815], - [0.368755996227264, 0.447206974029541], - [0.398963987827301, 0.432654976844788], - [0.476410001516342, 0.405806005001068], - [0.189241006970406, 0.523923993110657], - [0.228962004184723, 0.348950982093811], - [0.490725994110107, 0.562400996685028], - [0.404670000076294, 0.485132992267609], - [0.019469000399113, 0.401564002037048], - [0.426243007183075, 0.420431017875671], - [0.396993011236191, 0.548797011375427], - [0.266469985246658, 0.376977026462555], - [0.439121007919312, 0.51895797252655], - [0.032313998788595, 0.644356966018677], - [0.419054001569748, 0.387154996395111], - [0.462783008813858, 0.505746960639954], - [0.238978996872902, 0.779744982719421], - [0.198220998048782, 0.831938028335571], - [0.107550002634525, 0.540755033493042], - [0.183610007166862, 0.740257024765015], - [0.134409993886948, 0.333683013916016], - [0.385764002799988, 0.883153975009918], - [0.490967005491257, 0.579378008842468], - [0.382384985685349, 0.508572995662689], - [0.174399003386497, 0.397670984268188], - [0.318785011768341, 0.39623498916626], - [0.343364000320435, 0.400596976280212], - [0.396100014448166, 0.710216999053955], - [0.187885001301765, 0.588537991046906], - [0.430987000465393, 0.944064974784851], - [0.318993002176285, 0.898285031318665], - [0.266247987747192, 0.869701027870178], - [0.500023007392883, 0.190576016902924], - [0.499976992607117, 0.954452991485596], - [0.366169989109039, 0.398822009563446], - [0.393207013607025, 0.39553701877594], - [0.410373002290726, 0.391080021858215], - [0.194993004202843, 0.342101991176605], - [0.388664990663528, 0.362284004688263], - [0.365961998701096, 0.355970978736877], - [0.343364000320435, 0.355356991291046], - [0.318785011768341, 0.35834002494812], - [0.301414996385574, 0.363156020641327], - [0.058132998645306, 0.319076001644135], - [0.301414996385574, 0.387449026107788], - [0.499987989664078, 0.618434011936188], - [0.415838003158569, 0.624195992946625], - [0.445681989192963, 0.566076993942261], - [0.465844005346298, 0.620640993118286], - [0.49992299079895, 0.351523995399475], - [0.288718998432159, 0.819945991039276], - [0.335278987884521, 0.852819979190826], - [0.440512001514435, 0.902418971061707], - [0.128294005990028, 0.791940987110138], - [0.408771991729736, 0.373893976211548], - [0.455606997013092, 0.451801002025604], - [0.499877005815506, 0.908990025520325], - [0.375436991453171, 0.924192011356354], - [0.11421000212431, 0.615022003650665], - [0.448662012815475, 0.695277988910675], - [0.4480200111866, 0.704632043838501], - [0.447111994028091, 0.715808033943176], - [0.444831997156143, 0.730794012546539], - [0.430011987686157, 0.766808986663818], - [0.406787008047104, 0.685672998428345], - [0.400738000869751, 0.681069016456604], - [0.392399996519089, 0.677703022956848], - [0.367855995893478, 0.663918972015381], - [0.247923001646996, 0.601333022117615], - [0.452769994735718, 0.420849978923798], - [0.43639200925827, 0.359887003898621], - [0.416164010763168, 0.368713974952698], - [0.413385987281799, 0.692366003990173], - [0.228018000721931, 0.683571994304657], - [0.468268007040024, 0.352671027183533], - [0.411361992359161, 0.804327011108398], - [0.499989002943039, 0.469825029373169], - [0.479153990745544, 0.442654013633728], - [0.499974012374878, 0.439637005329132], - [0.432112008333206, 0.493588984012604], - [0.499886006116867, 0.866917014122009], - [0.49991300702095, 0.821729004383087], - [0.456548988819122, 0.819200992584229], - [0.344549000263214, 0.745438992977142], - [0.37890899181366, 0.574010014533997], - [0.374292999505997, 0.780184984207153], - [0.319687992334366, 0.570737957954407], - [0.357154995203018, 0.604269981384277], - [0.295284003019333, 0.621580958366394], - [0.447750002145767, 0.862477004528046], - [0.410986006259918, 0.508723020553589], - [0.31395098567009, 0.775308012962341], - [0.354128003120422, 0.812552988529205], - [0.324548006057739, 0.703992962837219], - [0.189096003770828, 0.646299958229065], - [0.279776990413666, 0.71465802192688], - [0.1338230073452, 0.682700991630554], - [0.336768001317978, 0.644733011722565], - [0.429883986711502, 0.466521978378296], - [0.455527991056442, 0.548622965812683], - [0.437114000320435, 0.558896005153656], - [0.467287987470627, 0.529924988746643], - [0.414712011814117, 0.335219979286194], - [0.37704598903656, 0.322777986526489], - [0.344107985496521, 0.320150971412659], - [0.312875986099243, 0.32233202457428], - [0.283526003360748, 0.333190023899078], - [0.241245999932289, 0.382785975933075], - [0.102986000478268, 0.468762993812561], - [0.267612010240555, 0.424560010433197], - [0.297879010438919, 0.433175981044769], - [0.333433985710144, 0.433878004550934], - [0.366427004337311, 0.426115989685059], - [0.396012008190155, 0.416696012020111], - [0.420121014118195, 0.41022801399231], - [0.007561000064015, 0.480777025222778], - [0.432949006557465, 0.569517970085144], - [0.458638995885849, 0.479089021682739], - [0.473466008901596, 0.545744001865387], - [0.476087987422943, 0.563830018043518], - [0.468472003936768, 0.555056989192963], - [0.433990985155106, 0.582361996173859], - [0.483518004417419, 0.562983989715576], - [0.482482999563217, 0.57784903049469], - [0.42645001411438, 0.389798998832703], - [0.438998997211456, 0.39649498462677], - [0.450067013502121, 0.400434017181396], - [0.289712011814117, 0.368252992630005], - [0.276670008897781, 0.363372981548309], - [0.517862021923065, 0.471948027610779], - [0.710287988185883, 0.380764007568359], - [0.526226997375488, 0.573909997940063], - [0.895093023777008, 0.254140973091125], - [0.634069979190826, 0.409575998783112], - [0.661242008209229, 0.41302502155304], - [0.688880026340485, 0.409460008144379], - [0.725341975688934, 0.389131009578705], - [0.606630027294159, 0.40370500087738], - [0.654766023159027, 0.344011008739471], - [0.629905998706818, 0.346076011657715], - [0.680678009986877, 0.347265005111694], - [0.702096998691559, 0.353591024875641], - [0.75221198797226, 0.410804986953735], - [0.602918028831482, 0.842862963676453], - [0.719901978969574, 0.375599980354309], - [0.893692970275879, 0.399959981441498], - [0.790081977844238, 0.391354024410248], - [0.643998026847839, 0.534487962722778], - [0.528249025344849, 0.65040397644043], - [0.525849997997284, 0.680191040039062], - [0.560214996337891, 0.657229006290436], - [0.585384011268616, 0.66654098033905], - [0.549625992774963, 0.680860996246338], - [0.57122802734375, 0.682691991329193], - [0.624852001667023, 0.72809898853302], - [0.513050019741058, 0.547281980514526], - [0.51509702205658, 0.527251958847046], - [0.742246985435486, 0.314507007598877], - [0.598631024360657, 0.454979002475739], - [0.570338010787964, 0.548575043678284], - [0.578631997108459, 0.533622980117798], - [0.723087012767792, 0.532054007053375], - [0.516445994377136, 0.499638974666595], - [0.662801027297974, 0.282917976379395], - [0.70362401008606, 0.293271005153656], - [0.830704987049103, 0.193813979625702], - [0.552385985851288, 0.302568018436432], - [0.607609987258911, 0.353887975215912], - [0.645429015159607, 0.696707010269165], - [0.932694971561432, 0.730105042457581], - [0.557260990142822, 0.572826027870178], - [0.542901992797852, 0.584792017936707], - [0.6180260181427, 0.694710969924927], - [0.607590973377228, 0.694203019142151], - [0.722943007946014, 0.271963000297546], - [0.577413976192474, 0.563166975975037], - [0.614082992076874, 0.281386971473694], - [0.616907000541687, 0.255886018276215], - [0.668509006500244, 0.119913995265961], - [0.770092010498047, 0.232020974159241], - [0.635536015033722, 0.189248979091644], - [0.77039098739624, 0.299556016921997], - [0.826722025871277, 0.278755009174347], - [0.527121007442474, 0.666198015213013], - [0.553171992301941, 0.668527007102966], - [0.577238023281097, 0.673889994621277], - [0.554691970348358, 0.580065965652466], - [0.611896991729736, 0.693961024284363], - [0.59696102142334, 0.706539988517761], - [0.596370995044708, 0.693953037261963], - [0.539958000183105, 0.557139039039612], - [0.568841993808746, 0.692366003990173], - [0.547818005084991, 0.692366003990173], - [0.52461302280426, 0.692366003990173], - [0.534089982509613, 0.779141008853912], - [0.527670979499817, 0.736225962638855], - [0.526912987232208, 0.717857003211975], - [0.526877999305725, 0.704625964164734], - [0.526966989040375, 0.695277988910675], - [0.572058022022247, 0.695277988910675], - [0.573521018028259, 0.703539967536926], - [0.57683801651001, 0.711845993995667], - [0.581691026687622, 0.720062971115112], - [0.609944999217987, 0.639909982681274], - [0.986046016216278, 0.560034036636353], - [0.5867999792099, 0.69539999961853], - [0.590372025966644, 0.701822996139526], - [0.531915009021759, 0.601536989212036], - [0.577268004417419, 0.585934996604919], - [0.536915004253387, 0.593786001205444], - [0.627542972564697, 0.473352015018463], - [0.665585994720459, 0.495950996875763], - [0.588353991508484, 0.546862006187439], - [0.757824003696442, 0.14767599105835], - [0.709249973297119, 0.201507985591888], - [0.672684013843536, 0.256581008434296], - [0.600408971309662, 0.74900496006012], - [0.55826598405838, 0.261672019958496], - [0.570303976535797, 0.187870979309082], - [0.588165998458862, 0.109044015407562], - [0.711045026779175, 0.398952007293701], - [0.781069993972778, 0.435405015945435], - [0.587247014045715, 0.398931980133057], - [0.742869973182678, 0.355445981025696], - [0.572156012058258, 0.437651991844177], - [0.55186802148819, 0.536570012569427], - [0.821442008018494, 0.457556009292603], - [0.752701997756958, 0.457181990146637], - [0.71375697851181, 0.467626988887787], - [0.66711300611496, 0.460672974586487], - [0.631101012229919, 0.447153985500336], - [0.6008620262146, 0.432473003864288], - [0.523481011390686, 0.405627012252808], - [0.810747981071472, 0.523926019668579], - [0.771045982837677, 0.348959028720856], - [0.509127020835876, 0.562718033790588], - [0.595292985439301, 0.485023975372314], - [0.980530977249146, 0.401564002037048], - [0.573499977588654, 0.420000016689301], - [0.602994978427887, 0.548687994480133], - [0.733529984951019, 0.376977026462555], - [0.560611009597778, 0.519016981124878], - [0.967685997486115, 0.644356966018677], - [0.580985009670258, 0.387160003185272], - [0.537728011608124, 0.505385041236877], - [0.760966002941132, 0.779752969741821], - [0.801778972148895, 0.831938028335571], - [0.892440974712372, 0.54076099395752], - [0.816350996494293, 0.740260004997253], - [0.865594983100891, 0.333687007427216], - [0.614073991775513, 0.883246004581451], - [0.508952975273132, 0.579437971115112], - [0.617941975593567, 0.508316040039062], - [0.825608015060425, 0.397674977779388], - [0.681214988231659, 0.39623498916626], - [0.656635999679565, 0.400596976280212], - [0.603900015354156, 0.710216999053955], - [0.81208598613739, 0.588539004325867], - [0.56801301240921, 0.944564998149872], - [0.681007981300354, 0.898285031318665], - [0.733752012252808, 0.869701027870178], - [0.633830010890961, 0.398822009563446], - [0.606792986392975, 0.39553701877594], - [0.589659988880157, 0.391062021255493], - [0.805015981197357, 0.342108011245728], - [0.611334979534149, 0.362284004688263], - [0.634037971496582, 0.355970978736877], - [0.656635999679565, 0.355356991291046], - [0.681214988231659, 0.35834002494812], - [0.698584973812103, 0.363156020641327], - [0.941866993904114, 0.319076001644135], - [0.698584973812103, 0.387449026107788], - [0.584177017211914, 0.624107003211975], - [0.554318010807037, 0.566076993942261], - [0.534153997898102, 0.62064003944397], - [0.711217999458313, 0.819975018501282], - [0.664629995822906, 0.852871000766754], - [0.559099972248077, 0.902631998062134], - [0.871706008911133, 0.791940987110138], - [0.591234028339386, 0.373893976211548], - [0.544341027736664, 0.451583981513977], - [0.624562978744507, 0.924192011356354], - [0.88577002286911, 0.615028977394104], - [0.551338016986847, 0.695277988910675], - [0.551980018615723, 0.704632043838501], - [0.552887976169586, 0.715808033943176], - [0.555167973041534, 0.730794012546539], - [0.569944024085999, 0.767035007476807], - [0.593203008174896, 0.685675978660583], - [0.599261999130249, 0.681069016456604], - [0.607599973678589, 0.677703022956848], - [0.631937980651855, 0.663500010967255], - [0.752032995223999, 0.601315021514893], - [0.547226011753082, 0.420395016670227], - [0.563543975353241, 0.359827995300293], - [0.583841025829315, 0.368713974952698], - [0.586614012718201, 0.692366003990173], - [0.771915018558502, 0.683578014373779], - [0.531597018241882, 0.352482974529266], - [0.588370978832245, 0.804440975189209], - [0.52079701423645, 0.442565023899078], - [0.567984998226166, 0.493479013442993], - [0.543282985687256, 0.819254994392395], - [0.655317008495331, 0.745514988899231], - [0.621008992195129, 0.574018001556396], - [0.625559985637665, 0.78031200170517], - [0.680198013782501, 0.570719003677368], - [0.64276397228241, 0.604337990283966], - [0.704662978649139, 0.621529996395111], - [0.552012026309967, 0.862591981887817], - [0.589071989059448, 0.508637011051178], - [0.685944974422455, 0.775357007980347], - [0.645735025405884, 0.812640011310577], - [0.675342977046967, 0.703978002071381], - [0.810858011245728, 0.646304965019226], - [0.72012197971344, 0.714666962623596], - [0.866151988506317, 0.682704985141754], - [0.663187026977539, 0.644596993923187], - [0.570082008838654, 0.466325998306274], - [0.544561982154846, 0.548375964164734], - [0.562758982181549, 0.558784961700439], - [0.531987011432648, 0.530140042304993], - [0.585271000862122, 0.335177004337311], - [0.622952997684479, 0.32277899980545], - [0.655896008014679, 0.320163011550903], - [0.687132000923157, 0.322345972061157], - [0.716481983661652, 0.333200991153717], - [0.758756995201111, 0.382786989212036], - [0.897013008594513, 0.468769013881683], - [0.732392013072968, 0.424547016620636], - [0.70211398601532, 0.433162987232208], - [0.66652500629425, 0.433866024017334], - [0.633504986763, 0.426087975502014], - [0.603875994682312, 0.416586995124817], - [0.579657971858978, 0.409945011138916], - [0.992439985275269, 0.480777025222778], - [0.567192018032074, 0.569419980049133], - [0.54136598110199, 0.478899002075195], - [0.526564002037048, 0.546118021011353], - [0.523913025856018, 0.563830018043518], - [0.531529009342194, 0.555056989192963], - [0.566035985946655, 0.582329034805298], - [0.51631098985672, 0.563053965568542], - [0.5174720287323, 0.577877044677734], - [0.573594987392426, 0.389806985855103], - [0.560697972774506, 0.395331978797913], - [0.549755990505219, 0.399751007556915], - [0.710287988185883, 0.368252992630005], - [0.723330020904541, 0.363372981548309] -]; -var TRI468 = [ - 127, - 34, - 139, - 11, - 0, - 37, - 232, - 231, - 120, - 72, - 37, - 39, - 128, - 121, - 47, - 232, - 121, - 128, - 104, - 69, - 67, - 175, - 171, - 148, - 157, - 154, - 155, - 118, - 50, - 101, - 73, - 39, - 40, - 9, - 151, - 108, - 48, - 115, - 131, - 194, - 204, - 211, - 74, - 40, - 185, - 80, - 42, - 183, - 40, - 92, - 186, - 230, - 229, - 118, - 202, - 212, - 214, - 83, - 18, - 17, - 76, - 61, - 146, - 160, - 29, - 30, - 56, - 157, - 173, - 106, - 204, - 194, - 135, - 214, - 192, - 203, - 165, - 98, - 21, - 71, - 68, - 51, - 45, - 4, - 144, - 24, - 23, - 77, - 146, - 91, - 205, - 50, - 187, - 201, - 200, - 18, - 91, - 106, - 182, - 90, - 91, - 181, - 85, - 84, - 17, - 206, - 203, - 36, - 148, - 171, - 140, - 92, - 40, - 39, - 193, - 189, - 244, - 159, - 158, - 28, - 247, - 246, - 161, - 236, - 3, - 196, - 54, - 68, - 104, - 193, - 168, - 8, - 117, - 228, - 31, - 189, - 193, - 55, - 98, - 97, - 99, - 126, - 47, - 100, - 166, - 79, - 218, - 155, - 154, - 26, - 209, - 49, - 131, - 135, - 136, - 150, - 47, - 126, - 217, - 223, - 52, - 53, - 45, - 51, - 134, - 211, - 170, - 140, - 67, - 69, - 108, - 43, - 106, - 91, - 230, - 119, - 120, - 226, - 130, - 247, - 63, - 53, - 52, - 238, - 20, - 242, - 46, - 70, - 156, - 78, - 62, - 96, - 46, - 53, - 63, - 143, - 34, - 227, - 173, - 155, - 133, - 123, - 117, - 111, - 44, - 125, - 19, - 236, - 134, - 51, - 216, - 206, - 205, - 154, - 153, - 22, - 39, - 37, - 167, - 200, - 201, - 208, - 36, - 142, - 100, - 57, - 212, - 202, - 20, - 60, - 99, - 28, - 158, - 157, - 35, - 226, - 113, - 160, - 159, - 27, - 204, - 202, - 210, - 113, - 225, - 46, - 43, - 202, - 204, - 62, - 76, - 77, - 137, - 123, - 116, - 41, - 38, - 72, - 203, - 129, - 142, - 64, - 98, - 240, - 49, - 102, - 64, - 41, - 73, - 74, - 212, - 216, - 207, - 42, - 74, - 184, - 169, - 170, - 211, - 170, - 149, - 176, - 105, - 66, - 69, - 122, - 6, - 168, - 123, - 147, - 187, - 96, - 77, - 90, - 65, - 55, - 107, - 89, - 90, - 180, - 101, - 100, - 120, - 63, - 105, - 104, - 93, - 137, - 227, - 15, - 86, - 85, - 129, - 102, - 49, - 14, - 87, - 86, - 55, - 8, - 9, - 100, - 47, - 121, - 145, - 23, - 22, - 88, - 89, - 179, - 6, - 122, - 196, - 88, - 95, - 96, - 138, - 172, - 136, - 215, - 58, - 172, - 115, - 48, - 219, - 42, - 80, - 81, - 195, - 3, - 51, - 43, - 146, - 61, - 171, - 175, - 199, - 81, - 82, - 38, - 53, - 46, - 225, - 144, - 163, - 110, - 246, - 33, - 7, - 52, - 65, - 66, - 229, - 228, - 117, - 34, - 127, - 234, - 107, - 108, - 69, - 109, - 108, - 151, - 48, - 64, - 235, - 62, - 78, - 191, - 129, - 209, - 126, - 111, - 35, - 143, - 163, - 161, - 246, - 117, - 123, - 50, - 222, - 65, - 52, - 19, - 125, - 141, - 221, - 55, - 65, - 3, - 195, - 197, - 25, - 7, - 33, - 220, - 237, - 44, - 70, - 71, - 139, - 122, - 193, - 245, - 247, - 130, - 33, - 71, - 21, - 162, - 153, - 158, - 159, - 170, - 169, - 150, - 188, - 174, - 196, - 216, - 186, - 92, - 144, - 160, - 161, - 2, - 97, - 167, - 141, - 125, - 241, - 164, - 167, - 37, - 72, - 38, - 12, - 145, - 159, - 160, - 38, - 82, - 13, - 63, - 68, - 71, - 226, - 35, - 111, - 158, - 153, - 154, - 101, - 50, - 205, - 206, - 92, - 165, - 209, - 198, - 217, - 165, - 167, - 97, - 220, - 115, - 218, - 133, - 112, - 243, - 239, - 238, - 241, - 214, - 135, - 169, - 190, - 173, - 133, - 171, - 208, - 32, - 125, - 44, - 237, - 86, - 87, - 178, - 85, - 86, - 179, - 84, - 85, - 180, - 83, - 84, - 181, - 201, - 83, - 182, - 137, - 93, - 132, - 76, - 62, - 183, - 61, - 76, - 184, - 57, - 61, - 185, - 212, - 57, - 186, - 214, - 207, - 187, - 34, - 143, - 156, - 79, - 239, - 237, - 123, - 137, - 177, - 44, - 1, - 4, - 201, - 194, - 32, - 64, - 102, - 129, - 213, - 215, - 138, - 59, - 166, - 219, - 242, - 99, - 97, - 2, - 94, - 141, - 75, - 59, - 235, - 24, - 110, - 228, - 25, - 130, - 226, - 23, - 24, - 229, - 22, - 23, - 230, - 26, - 22, - 231, - 112, - 26, - 232, - 189, - 190, - 243, - 221, - 56, - 190, - 28, - 56, - 221, - 27, - 28, - 222, - 29, - 27, - 223, - 30, - 29, - 224, - 247, - 30, - 225, - 238, - 79, - 20, - 166, - 59, - 75, - 60, - 75, - 240, - 147, - 177, - 215, - 20, - 79, - 166, - 187, - 147, - 213, - 112, - 233, - 244, - 233, - 128, - 245, - 128, - 114, - 188, - 114, - 217, - 174, - 131, - 115, - 220, - 217, - 198, - 236, - 198, - 131, - 134, - 177, - 132, - 58, - 143, - 35, - 124, - 110, - 163, - 7, - 228, - 110, - 25, - 356, - 389, - 368, - 11, - 302, - 267, - 452, - 350, - 349, - 302, - 303, - 269, - 357, - 343, - 277, - 452, - 453, - 357, - 333, - 332, - 297, - 175, - 152, - 377, - 384, - 398, - 382, - 347, - 348, - 330, - 303, - 304, - 270, - 9, - 336, - 337, - 278, - 279, - 360, - 418, - 262, - 431, - 304, - 408, - 409, - 310, - 415, - 407, - 270, - 409, - 410, - 450, - 348, - 347, - 422, - 430, - 434, - 313, - 314, - 17, - 306, - 307, - 375, - 387, - 388, - 260, - 286, - 414, - 398, - 335, - 406, - 418, - 364, - 367, - 416, - 423, - 358, - 327, - 251, - 284, - 298, - 281, - 5, - 4, - 373, - 374, - 253, - 307, - 320, - 321, - 425, - 427, - 411, - 421, - 313, - 18, - 321, - 405, - 406, - 320, - 404, - 405, - 315, - 16, - 17, - 426, - 425, - 266, - 377, - 400, - 369, - 322, - 391, - 269, - 417, - 465, - 464, - 386, - 257, - 258, - 466, - 260, - 388, - 456, - 399, - 419, - 284, - 332, - 333, - 417, - 285, - 8, - 346, - 340, - 261, - 413, - 441, - 285, - 327, - 460, - 328, - 355, - 371, - 329, - 392, - 439, - 438, - 382, - 341, - 256, - 429, - 420, - 360, - 364, - 394, - 379, - 277, - 343, - 437, - 443, - 444, - 283, - 275, - 440, - 363, - 431, - 262, - 369, - 297, - 338, - 337, - 273, - 375, - 321, - 450, - 451, - 349, - 446, - 342, - 467, - 293, - 334, - 282, - 458, - 461, - 462, - 276, - 353, - 383, - 308, - 324, - 325, - 276, - 300, - 293, - 372, - 345, - 447, - 382, - 398, - 362, - 352, - 345, - 340, - 274, - 1, - 19, - 456, - 248, - 281, - 436, - 427, - 425, - 381, - 256, - 252, - 269, - 391, - 393, - 200, - 199, - 428, - 266, - 330, - 329, - 287, - 273, - 422, - 250, - 462, - 328, - 258, - 286, - 384, - 265, - 353, - 342, - 387, - 259, - 257, - 424, - 431, - 430, - 342, - 353, - 276, - 273, - 335, - 424, - 292, - 325, - 307, - 366, - 447, - 345, - 271, - 303, - 302, - 423, - 266, - 371, - 294, - 455, - 460, - 279, - 278, - 294, - 271, - 272, - 304, - 432, - 434, - 427, - 272, - 407, - 408, - 394, - 430, - 431, - 395, - 369, - 400, - 334, - 333, - 299, - 351, - 417, - 168, - 352, - 280, - 411, - 325, - 319, - 320, - 295, - 296, - 336, - 319, - 403, - 404, - 330, - 348, - 349, - 293, - 298, - 333, - 323, - 454, - 447, - 15, - 16, - 315, - 358, - 429, - 279, - 14, - 15, - 316, - 285, - 336, - 9, - 329, - 349, - 350, - 374, - 380, - 252, - 318, - 402, - 403, - 6, - 197, - 419, - 318, - 319, - 325, - 367, - 364, - 365, - 435, - 367, - 397, - 344, - 438, - 439, - 272, - 271, - 311, - 195, - 5, - 281, - 273, - 287, - 291, - 396, - 428, - 199, - 311, - 271, - 268, - 283, - 444, - 445, - 373, - 254, - 339, - 263, - 466, - 249, - 282, - 334, - 296, - 449, - 347, - 346, - 264, - 447, - 454, - 336, - 296, - 299, - 338, - 10, - 151, - 278, - 439, - 455, - 292, - 407, - 415, - 358, - 371, - 355, - 340, - 345, - 372, - 390, - 249, - 466, - 346, - 347, - 280, - 442, - 443, - 282, - 19, - 94, - 370, - 441, - 442, - 295, - 248, - 419, - 197, - 263, - 255, - 359, - 440, - 275, - 274, - 300, - 383, - 368, - 351, - 412, - 465, - 263, - 467, - 466, - 301, - 368, - 389, - 380, - 374, - 386, - 395, - 378, - 379, - 412, - 351, - 419, - 436, - 426, - 322, - 373, - 390, - 388, - 2, - 164, - 393, - 370, - 462, - 461, - 164, - 0, - 267, - 302, - 11, - 12, - 374, - 373, - 387, - 268, - 12, - 13, - 293, - 300, - 301, - 446, - 261, - 340, - 385, - 384, - 381, - 330, - 266, - 425, - 426, - 423, - 391, - 429, - 355, - 437, - 391, - 327, - 326, - 440, - 457, - 438, - 341, - 382, - 362, - 459, - 457, - 461, - 434, - 430, - 394, - 414, - 463, - 362, - 396, - 369, - 262, - 354, - 461, - 457, - 316, - 403, - 402, - 315, - 404, - 403, - 314, - 405, - 404, - 313, - 406, - 405, - 421, - 418, - 406, - 366, - 401, - 361, - 306, - 408, - 407, - 291, - 409, - 408, - 287, - 410, - 409, - 432, - 436, - 410, - 434, - 416, - 411, - 264, - 368, - 383, - 309, - 438, - 457, - 352, - 376, - 401, - 274, - 275, - 4, - 421, - 428, - 262, - 294, - 327, - 358, - 433, - 416, - 367, - 289, - 455, - 439, - 462, - 370, - 326, - 2, - 326, - 370, - 305, - 460, - 455, - 254, - 449, - 448, - 255, - 261, - 446, - 253, - 450, - 449, - 252, - 451, - 450, - 256, - 452, - 451, - 341, - 453, - 452, - 413, - 464, - 463, - 441, - 413, - 414, - 258, - 442, - 441, - 257, - 443, - 442, - 259, - 444, - 443, - 260, - 445, - 444, - 467, - 342, - 445, - 459, - 458, - 250, - 289, - 392, - 290, - 290, - 328, - 460, - 376, - 433, - 435, - 250, - 290, - 392, - 411, - 416, - 433, - 341, - 463, - 464, - 453, - 464, - 465, - 357, - 465, - 412, - 343, - 412, - 399, - 360, - 363, - 440, - 437, - 399, - 456, - 420, - 456, - 363, - 401, - 435, - 288, - 372, - 383, - 353, - 339, - 255, - 249, - 448, - 261, - 255, - 133, - 243, - 190, - 133, - 155, - 112, - 33, - 246, - 247, - 33, - 130, - 25, - 398, - 384, - 286, - 362, - 398, - 414, - 362, - 463, - 341, - 263, - 359, - 467, - 263, - 249, - 255, - 466, - 467, - 260, - 75, - 60, - 166, - 238, - 239, - 79, - 162, - 127, - 139, - 72, - 11, - 37, - 121, - 232, - 120, - 73, - 72, - 39, - 114, - 128, - 47, - 233, - 232, - 128, - 103, - 104, - 67, - 152, - 175, - 148, - 173, - 157, - 155, - 119, - 118, - 101, - 74, - 73, - 40, - 107, - 9, - 108, - 49, - 48, - 131, - 32, - 194, - 211, - 184, - 74, - 185, - 191, - 80, - 183, - 185, - 40, - 186, - 119, - 230, - 118, - 210, - 202, - 214, - 84, - 83, - 17, - 77, - 76, - 146, - 161, - 160, - 30, - 190, - 56, - 173, - 182, - 106, - 194, - 138, - 135, - 192, - 129, - 203, - 98, - 54, - 21, - 68, - 5, - 51, - 4, - 145, - 144, - 23, - 90, - 77, - 91, - 207, - 205, - 187, - 83, - 201, - 18, - 181, - 91, - 182, - 180, - 90, - 181, - 16, - 85, - 17, - 205, - 206, - 36, - 176, - 148, - 140, - 165, - 92, - 39, - 245, - 193, - 244, - 27, - 159, - 28, - 30, - 247, - 161, - 174, - 236, - 196, - 103, - 54, - 104, - 55, - 193, - 8, - 111, - 117, - 31, - 221, - 189, - 55, - 240, - 98, - 99, - 142, - 126, - 100, - 219, - 166, - 218, - 112, - 155, - 26, - 198, - 209, - 131, - 169, - 135, - 150, - 114, - 47, - 217, - 224, - 223, - 53, - 220, - 45, - 134, - 32, - 211, - 140, - 109, - 67, - 108, - 146, - 43, - 91, - 231, - 230, - 120, - 113, - 226, - 247, - 105, - 63, - 52, - 241, - 238, - 242, - 124, - 46, - 156, - 95, - 78, - 96, - 70, - 46, - 63, - 116, - 143, - 227, - 116, - 123, - 111, - 1, - 44, - 19, - 3, - 236, - 51, - 207, - 216, - 205, - 26, - 154, - 22, - 165, - 39, - 167, - 199, - 200, - 208, - 101, - 36, - 100, - 43, - 57, - 202, - 242, - 20, - 99, - 56, - 28, - 157, - 124, - 35, - 113, - 29, - 160, - 27, - 211, - 204, - 210, - 124, - 113, - 46, - 106, - 43, - 204, - 96, - 62, - 77, - 227, - 137, - 116, - 73, - 41, - 72, - 36, - 203, - 142, - 235, - 64, - 240, - 48, - 49, - 64, - 42, - 41, - 74, - 214, - 212, - 207, - 183, - 42, - 184, - 210, - 169, - 211, - 140, - 170, - 176, - 104, - 105, - 69, - 193, - 122, - 168, - 50, - 123, - 187, - 89, - 96, - 90, - 66, - 65, - 107, - 179, - 89, - 180, - 119, - 101, - 120, - 68, - 63, - 104, - 234, - 93, - 227, - 16, - 15, - 85, - 209, - 129, - 49, - 15, - 14, - 86, - 107, - 55, - 9, - 120, - 100, - 121, - 153, - 145, - 22, - 178, - 88, - 179, - 197, - 6, - 196, - 89, - 88, - 96, - 135, - 138, - 136, - 138, - 215, - 172, - 218, - 115, - 219, - 41, - 42, - 81, - 5, - 195, - 51, - 57, - 43, - 61, - 208, - 171, - 199, - 41, - 81, - 38, - 224, - 53, - 225, - 24, - 144, - 110, - 105, - 52, - 66, - 118, - 229, - 117, - 227, - 34, - 234, - 66, - 107, - 69, - 10, - 109, - 151, - 219, - 48, - 235, - 183, - 62, - 191, - 142, - 129, - 126, - 116, - 111, - 143, - 7, - 163, - 246, - 118, - 117, - 50, - 223, - 222, - 52, - 94, - 19, - 141, - 222, - 221, - 65, - 196, - 3, - 197, - 45, - 220, - 44, - 156, - 70, - 139, - 188, - 122, - 245, - 139, - 71, - 162, - 145, - 153, - 159, - 149, - 170, - 150, - 122, - 188, - 196, - 206, - 216, - 92, - 163, - 144, - 161, - 164, - 2, - 167, - 242, - 141, - 241, - 0, - 164, - 37, - 11, - 72, - 12, - 144, - 145, - 160, - 12, - 38, - 13, - 70, - 63, - 71, - 31, - 226, - 111, - 157, - 158, - 154, - 36, - 101, - 205, - 203, - 206, - 165, - 126, - 209, - 217, - 98, - 165, - 97, - 237, - 220, - 218, - 237, - 239, - 241, - 210, - 214, - 169, - 140, - 171, - 32, - 241, - 125, - 237, - 179, - 86, - 178, - 180, - 85, - 179, - 181, - 84, - 180, - 182, - 83, - 181, - 194, - 201, - 182, - 177, - 137, - 132, - 184, - 76, - 183, - 185, - 61, - 184, - 186, - 57, - 185, - 216, - 212, - 186, - 192, - 214, - 187, - 139, - 34, - 156, - 218, - 79, - 237, - 147, - 123, - 177, - 45, - 44, - 4, - 208, - 201, - 32, - 98, - 64, - 129, - 192, - 213, - 138, - 235, - 59, - 219, - 141, - 242, - 97, - 97, - 2, - 141, - 240, - 75, - 235, - 229, - 24, - 228, - 31, - 25, - 226, - 230, - 23, - 229, - 231, - 22, - 230, - 232, - 26, - 231, - 233, - 112, - 232, - 244, - 189, - 243, - 189, - 221, - 190, - 222, - 28, - 221, - 223, - 27, - 222, - 224, - 29, - 223, - 225, - 30, - 224, - 113, - 247, - 225, - 99, - 60, - 240, - 213, - 147, - 215, - 60, - 20, - 166, - 192, - 187, - 213, - 243, - 112, - 244, - 244, - 233, - 245, - 245, - 128, - 188, - 188, - 114, - 174, - 134, - 131, - 220, - 174, - 217, - 236, - 236, - 198, - 134, - 215, - 177, - 58, - 156, - 143, - 124, - 25, - 110, - 7, - 31, - 228, - 25, - 264, - 356, - 368, - 0, - 11, - 267, - 451, - 452, - 349, - 267, - 302, - 269, - 350, - 357, - 277, - 350, - 452, - 357, - 299, - 333, - 297, - 396, - 175, - 377, - 381, - 384, - 382, - 280, - 347, - 330, - 269, - 303, - 270, - 151, - 9, - 337, - 344, - 278, - 360, - 424, - 418, - 431, - 270, - 304, - 409, - 272, - 310, - 407, - 322, - 270, - 410, - 449, - 450, - 347, - 432, - 422, - 434, - 18, - 313, - 17, - 291, - 306, - 375, - 259, - 387, - 260, - 424, - 335, - 418, - 434, - 364, - 416, - 391, - 423, - 327, - 301, - 251, - 298, - 275, - 281, - 4, - 254, - 373, - 253, - 375, - 307, - 321, - 280, - 425, - 411, - 200, - 421, - 18, - 335, - 321, - 406, - 321, - 320, - 405, - 314, - 315, - 17, - 423, - 426, - 266, - 396, - 377, - 369, - 270, - 322, - 269, - 413, - 417, - 464, - 385, - 386, - 258, - 248, - 456, - 419, - 298, - 284, - 333, - 168, - 417, - 8, - 448, - 346, - 261, - 417, - 413, - 285, - 326, - 327, - 328, - 277, - 355, - 329, - 309, - 392, - 438, - 381, - 382, - 256, - 279, - 429, - 360, - 365, - 364, - 379, - 355, - 277, - 437, - 282, - 443, - 283, - 281, - 275, - 363, - 395, - 431, - 369, - 299, - 297, - 337, - 335, - 273, - 321, - 348, - 450, - 349, - 359, - 446, - 467, - 283, - 293, - 282, - 250, - 458, - 462, - 300, - 276, - 383, - 292, - 308, - 325, - 283, - 276, - 293, - 264, - 372, - 447, - 346, - 352, - 340, - 354, - 274, - 19, - 363, - 456, - 281, - 426, - 436, - 425, - 380, - 381, - 252, - 267, - 269, - 393, - 421, - 200, - 428, - 371, - 266, - 329, - 432, - 287, - 422, - 290, - 250, - 328, - 385, - 258, - 384, - 446, - 265, - 342, - 386, - 387, - 257, - 422, - 424, - 430, - 445, - 342, - 276, - 422, - 273, - 424, - 306, - 292, - 307, - 352, - 366, - 345, - 268, - 271, - 302, - 358, - 423, - 371, - 327, - 294, - 460, - 331, - 279, - 294, - 303, - 271, - 304, - 436, - 432, - 427, - 304, - 272, - 408, - 395, - 394, - 431, - 378, - 395, - 400, - 296, - 334, - 299, - 6, - 351, - 168, - 376, - 352, - 411, - 307, - 325, - 320, - 285, - 295, - 336, - 320, - 319, - 404, - 329, - 330, - 349, - 334, - 293, - 333, - 366, - 323, - 447, - 316, - 15, - 315, - 331, - 358, - 279, - 317, - 14, - 316, - 8, - 285, - 9, - 277, - 329, - 350, - 253, - 374, - 252, - 319, - 318, - 403, - 351, - 6, - 419, - 324, - 318, - 325, - 397, - 367, - 365, - 288, - 435, - 397, - 278, - 344, - 439, - 310, - 272, - 311, - 248, - 195, - 281, - 375, - 273, - 291, - 175, - 396, - 199, - 312, - 311, - 268, - 276, - 283, - 445, - 390, - 373, - 339, - 295, - 282, - 296, - 448, - 449, - 346, - 356, - 264, - 454, - 337, - 336, - 299, - 337, - 338, - 151, - 294, - 278, - 455, - 308, - 292, - 415, - 429, - 358, - 355, - 265, - 340, - 372, - 388, - 390, - 466, - 352, - 346, - 280, - 295, - 442, - 282, - 354, - 19, - 370, - 285, - 441, - 295, - 195, - 248, - 197, - 457, - 440, - 274, - 301, - 300, - 368, - 417, - 351, - 465, - 251, - 301, - 389, - 385, - 380, - 386, - 394, - 395, - 379, - 399, - 412, - 419, - 410, - 436, - 322, - 387, - 373, - 388, - 326, - 2, - 393, - 354, - 370, - 461, - 393, - 164, - 267, - 268, - 302, - 12, - 386, - 374, - 387, - 312, - 268, - 13, - 298, - 293, - 301, - 265, - 446, - 340, - 380, - 385, - 381, - 280, - 330, - 425, - 322, - 426, - 391, - 420, - 429, - 437, - 393, - 391, - 326, - 344, - 440, - 438, - 458, - 459, - 461, - 364, - 434, - 394, - 428, - 396, - 262, - 274, - 354, - 457, - 317, - 316, - 402, - 316, - 315, - 403, - 315, - 314, - 404, - 314, - 313, - 405, - 313, - 421, - 406, - 323, - 366, - 361, - 292, - 306, - 407, - 306, - 291, - 408, - 291, - 287, - 409, - 287, - 432, - 410, - 427, - 434, - 411, - 372, - 264, - 383, - 459, - 309, - 457, - 366, - 352, - 401, - 1, - 274, - 4, - 418, - 421, - 262, - 331, - 294, - 358, - 435, - 433, - 367, - 392, - 289, - 439, - 328, - 462, - 326, - 94, - 2, - 370, - 289, - 305, - 455, - 339, - 254, - 448, - 359, - 255, - 446, - 254, - 253, - 449, - 253, - 252, - 450, - 252, - 256, - 451, - 256, - 341, - 452, - 414, - 413, - 463, - 286, - 441, - 414, - 286, - 258, - 441, - 258, - 257, - 442, - 257, - 259, - 443, - 259, - 260, - 444, - 260, - 467, - 445, - 309, - 459, - 250, - 305, - 289, - 290, - 305, - 290, - 460, - 401, - 376, - 435, - 309, - 250, - 392, - 376, - 411, - 433, - 453, - 341, - 464, - 357, - 453, - 465, - 343, - 357, - 412, - 437, - 343, - 399, - 344, - 360, - 440, - 420, - 437, - 456, - 360, - 420, - 363, - 361, - 401, - 288, - 265, - 372, - 353, - 390, - 339, - 249, - 339, - 448, - 255 -]; -var VTX68 = [ - 127, - 234, - 132, - 58, - 172, - 150, - 149, - 148, - 152, - 377, - 378, - 379, - 397, - 288, - 361, - 454, - 356, - 70, - 63, - 105, - 66, - 107, - 336, - 296, - 334, - 293, - 300, - 168, - 6, - 195, - 4, - 98, - 97, - 2, - 326, - 327, - 33, - 160, - 158, - 133, - 153, - 144, - 362, - 385, - 387, - 263, - 373, - 380, - 57, - 40, - 37, - 0, - 267, - 270, - 287, - 321, - 314, - 17, - 84, - 91, - 78, - 81, - 13, - 311, - 308, - 402, - 14, - 178 -]; -var VTX33 = [33, 133, 362, 263, 1, 62, 308, 159, 145, 386, 374, 6, 102, 331, 2, 13, 14, 70, 105, 107, 336, 334, 300, 54, 10, 284, 50, 280, 234, 454, 58, 288, 152]; -var VTX7 = [33, 133, 362, 263, 1, 78, 308]; -var UV68 = VTX68.map((x) => UV468[x]); -var UV33 = VTX33.map((x) => UV468[x]); -var UV7 = VTX7.map((x) => UV468[x]); -function connectionsToIndices(connections) { - const indices = connections.map((connection) => connection[0]); - indices.push(connections[connections.length - 1][1]); - return indices; -} -var pairsLips = [ - [61, 146], - [146, 91], - [91, 181], - [181, 84], - [84, 17], - [17, 314], - [314, 405], - [405, 321], - [321, 375], - [375, 291], - [61, 185], - [185, 40], - [40, 39], - [39, 37], - [37, 0], - [0, 267], - [267, 269], - [269, 270], - [270, 409], - [409, 291], - [78, 95], - [95, 88], - [88, 178], - [178, 87], - [87, 14], - [14, 317], - [317, 402], - [402, 318], - [318, 324], - [324, 308], - [78, 191], - [191, 80], - [80, 81], - [81, 82], - [82, 13], - [13, 312], - [312, 311], - [311, 310], - [310, 415], - [415, 308] -]; -var pairsLeftEye = [[263, 249], [249, 390], [390, 373], [373, 374], [374, 380], [380, 381], [381, 382], [382, 362], [263, 466], [466, 388], [388, 387], [387, 386], [386, 385], [385, 384], [384, 398], [398, 362]]; -var pairsLeftEyebrow = [[276, 283], [283, 282], [282, 295], [295, 285], [300, 293], [293, 334], [334, 296], [296, 336]]; -var pairsLeftIris = [[474, 475], [475, 476], [476, 477], [477, 474]]; -var pairsRightEye = [[33, 7], [7, 163], [163, 144], [144, 145], [145, 153], [153, 154], [154, 155], [155, 133], [33, 246], [246, 161], [161, 160], [160, 159], [159, 158], [158, 157], [157, 173], [173, 133]]; -var pairsRightEyebrow = [[46, 53], [53, 52], [52, 65], [65, 55], [70, 63], [63, 105], [105, 66], [66, 107]]; -var pairsRightIris = [[469, 470], [470, 471], [471, 472], [472, 469]]; -var pairsFaceContour = [ - [10, 338], - [338, 297], - [297, 332], - [332, 284], - [284, 251], - [251, 389], - [389, 356], - [356, 454], - [454, 323], - [323, 361], - [361, 288], - [288, 397], - [397, 365], - [365, 379], - [379, 378], - [378, 400], - [400, 377], - [377, 152], - [152, 148], - [148, 176], - [176, 149], - [149, 150], - [150, 136], - [136, 172], - [172, 58], - [58, 132], - [132, 93], - [93, 234], - [234, 127], - [127, 162], - [162, 21], - [21, 54], - [54, 103], - [103, 67], - [67, 109], - [109, 10] -]; -var contourKeypoints = { - lips: connectionsToIndices(pairsLips), - leftEye: connectionsToIndices(pairsLeftEye), - leftEyebrow: connectionsToIndices(pairsLeftEyebrow), - leftIris: connectionsToIndices(pairsLeftIris), - rightEye: connectionsToIndices(pairsRightEye), - rightEyebrow: connectionsToIndices(pairsRightEyebrow), - rightIris: connectionsToIndices(pairsRightIris), - faceOval: connectionsToIndices(pairsFaceContour) -}; - -// src/tfjs/constants.ts -var tf6 = __toESM(require_tfjs_esm()); -var constants = { - tf255: 255, - tf1: 1, - tf2: 2, - tf05: 0.5, - tf127: 127.5, - rgb: [0.2989, 0.587, 0.114] -}; -function init() { - constants.tf255 = tf6.scalar(255, "float32"); - constants.tf1 = tf6.scalar(1, "float32"); - constants.tf2 = tf6.scalar(2, "float32"); - constants.tf05 = tf6.scalar(0.5, "float32"); - constants.tf127 = tf6.scalar(127.5, "float32"); - constants.rgb = tf6.tensor1d([0.2989, 0.587, 0.114], "float32"); -} - -// src/face/facemeshutil.ts -var getBoxSize = (box) => [Math.abs(box.endPoint[0] - box.startPoint[0]), Math.abs(box.endPoint[1] - box.startPoint[1])]; -var getBoxCenter = (box) => [box.startPoint[0] + (box.endPoint[0] - box.startPoint[0]) / 2, box.startPoint[1] + (box.endPoint[1] - box.startPoint[1]) / 2, 1]; -var clampBox = (box, input) => box ? [ - Math.trunc(Math.max(0, box.startPoint[0])), - Math.trunc(Math.max(0, box.startPoint[1])), - Math.trunc(Math.min(input.shape[2] || 0, box.endPoint[0]) - Math.max(0, box.startPoint[0])), - Math.trunc(Math.min(input.shape[1] || 0, box.endPoint[1]) - Math.max(0, box.startPoint[1])) -] : [0, 0, 0, 0]; -var getRawBox = (box, input) => box ? [ - box.startPoint[0] / (input.shape[2] || 0), - box.startPoint[1] / (input.shape[1] || 0), - (box.endPoint[0] - box.startPoint[0]) / (input.shape[2] || 0), - (box.endPoint[1] - box.startPoint[1]) / (input.shape[1] || 0) -] : [0, 0, 0, 0]; -var scaleBoxCoordinates = (box, factor) => { - const startPoint = [box.startPoint[0] * factor[0], box.startPoint[1] * factor[1]]; - const endPoint = [box.endPoint[0] * factor[0], box.endPoint[1] * factor[1]]; - return { startPoint, endPoint, landmarks: box.landmarks, confidence: box.confidence }; -}; -var cutAndResize = (box, image27, cropSize) => { - const h = image27.shape[1]; - const w = image27.shape[2]; - const cutBox = [box.startPoint[1] / h, box.startPoint[0] / w, box.endPoint[1] / h, box.endPoint[0] / w]; - const crop = tf7.image.cropAndResize(image27, [cutBox], [0], cropSize); - const norm = tf7.div(crop, constants.tf255); - tf7.dispose(crop); - return norm; -}; -var enlargeBox = (box, factor) => { - const center = getBoxCenter(box); - const size2 = getBoxSize(box); - const halfSize = [factor * size2[0] / 2, factor * size2[1] / 2]; - return { startPoint: [center[0] - halfSize[0], center[1] - halfSize[1]], endPoint: [center[0] + halfSize[0], center[1] + halfSize[1]], landmarks: box.landmarks, confidence: box.confidence }; -}; -var squarifyBox = (box) => { - const centers = getBoxCenter(box); - const size2 = getBoxSize(box); - const halfSize = Math.max(...size2) / 2; - return { startPoint: [Math.round(centers[0] - halfSize), Math.round(centers[1] - halfSize)], endPoint: [Math.round(centers[0] + halfSize), Math.round(centers[1] + halfSize)], landmarks: box.landmarks, confidence: box.confidence }; -}; -var calculateLandmarksBoundingBox = (landmarks) => { - const x = landmarks.map((d) => d[0]); - const y = landmarks.map((d) => d[1]); - return { startPoint: [Math.min(...x), Math.min(...y)], endPoint: [Math.max(...x), Math.max(...y)], landmarks }; -}; -var fixedRotationMatrix = [[1, 0, 0], [0, 1, 0], [0, 0, 1]]; -var normalizeRadians = (angle) => angle - 2 * Math.PI * Math.floor((angle + Math.PI) / (2 * Math.PI)); -var computeRotation = (point1, point2) => normalizeRadians(Math.PI / 2 - Math.atan2(-(point2[1] - point1[1]), point2[0] - point1[0])); -var buildTranslationMatrix = (x, y) => [[1, 0, x], [0, 1, y], [0, 0, 1]]; -var dot = (v1, v2) => { - let product = 0; - for (let i = 0; i < v1.length; i++) - product += v1[i] * v2[i]; - return product; -}; -var getColumnFrom2DArr = (arr, columnIndex) => { - const column = []; - for (let i = 0; i < arr.length; i++) - column.push(arr[i][columnIndex]); - return column; -}; -var multiplyTransformMatrices = (mat1, mat2) => { - const product = []; - const size2 = mat1.length; - for (let row = 0; row < size2; row++) { - product.push([]); - for (let col = 0; col < size2; col++) - product[row].push(dot(mat1[row], getColumnFrom2DArr(mat2, col))); - } - return product; -}; -var buildRotationMatrix = (rotation, center) => { - const cosA = Math.cos(rotation); - const sinA = Math.sin(rotation); - const rotationMatrix = [[cosA, -sinA, 0], [sinA, cosA, 0], [0, 0, 1]]; - const translationMatrix = buildTranslationMatrix(center[0], center[1]); - const translationTimesRotation = multiplyTransformMatrices(translationMatrix, rotationMatrix); - const negativeTranslationMatrix = buildTranslationMatrix(-center[0], -center[1]); - return multiplyTransformMatrices(translationTimesRotation, negativeTranslationMatrix); -}; -var invertTransformMatrix = (matrix) => { - const rotationComponent = [[matrix[0][0], matrix[1][0]], [matrix[0][1], matrix[1][1]]]; - const translationComponent = [matrix[0][2], matrix[1][2]]; - const invertedTranslation = [-dot(rotationComponent[0], translationComponent), -dot(rotationComponent[1], translationComponent)]; - return [rotationComponent[0].concat(invertedTranslation[0]), rotationComponent[1].concat(invertedTranslation[1]), [0, 0, 1]]; -}; -var rotatePoint = (homogeneousCoordinate, rotationMatrix) => [dot(homogeneousCoordinate, rotationMatrix[0]), dot(homogeneousCoordinate, rotationMatrix[1])]; -function generateAnchors(inputSize10) { - const spec = inputSize10 === 192 ? { strides: [4], anchors: [1] } : { strides: [inputSize10 / 16, inputSize10 / 8], anchors: [2, 6] }; - const anchors3 = []; - for (let i = 0; i < spec.strides.length; i++) { - const stride = spec.strides[i]; - const gridRows = Math.floor((inputSize10 + stride - 1) / stride); - const gridCols = Math.floor((inputSize10 + stride - 1) / stride); - const anchorsNum = spec.anchors[i]; - for (let gridY = 0; gridY < gridRows; gridY++) { - const anchorY = stride * (gridY + 0.5); - for (let gridX = 0; gridX < gridCols; gridX++) { - const anchorX = stride * (gridX + 0.5); - for (let n = 0; n < anchorsNum; n++) - anchors3.push([anchorX, anchorY]); - } - } - } - return anchors3; -} -function transformRawCoords(coordsRaw, box, angle, rotationMatrix, inputSize10) { - const boxSize = getBoxSize(box); - const coordsScaled = coordsRaw.map((coord) => [ - boxSize[0] / inputSize10 * (coord[0] - inputSize10 / 2), - boxSize[1] / inputSize10 * (coord[1] - inputSize10 / 2), - coord[2] || 0 - ]); - const largeAngle = angle && angle !== 0 && Math.abs(angle) > 0.2; - const coordsRotationMatrix = largeAngle ? buildRotationMatrix(angle, [0, 0]) : fixedRotationMatrix; - const coordsRotated = largeAngle ? coordsScaled.map((coord) => [...rotatePoint(coord, coordsRotationMatrix), coord[2]]) : coordsScaled; - const inverseRotationMatrix = largeAngle ? invertTransformMatrix(rotationMatrix) : fixedRotationMatrix; - const boxCenter = getBoxCenter(box); - const offsets = [dot(boxCenter, inverseRotationMatrix[0]), dot(boxCenter, inverseRotationMatrix[1])]; - return coordsRotated.map((coord) => [ - Math.trunc(coord[0] + offsets[0]), - Math.trunc(coord[1] + offsets[1]), - Math.trunc(coord[2] || 0) - ]); -} -function correctFaceRotation(rotate, box, input, inputSize10) { - const symmetryLine = box.landmarks.length >= meshLandmarks.count ? meshLandmarks.symmetryLine : blazeFaceLandmarks.symmetryLine; - let angle = 0; - let rotationMatrix = fixedRotationMatrix; - let face4; - if (rotate && env.kernels.includes("rotatewithoffset")) { - angle = computeRotation(box.landmarks[symmetryLine[0]], box.landmarks[symmetryLine[1]]); - const largeAngle = angle && angle !== 0 && Math.abs(angle) > 0.2; - if (largeAngle) { - const center = getBoxCenter(box); - const centerRaw = [center[0] / input.shape[2], center[1] / input.shape[1]]; - const rotated = tf7.image.rotateWithOffset(input, angle, 0, centerRaw); - rotationMatrix = buildRotationMatrix(-angle, center); - face4 = cutAndResize(box, rotated, [inputSize10, inputSize10]); - tf7.dispose(rotated); - } else { - face4 = cutAndResize(box, input, [inputSize10, inputSize10]); - } - } else { - face4 = cutAndResize(box, input, [inputSize10, inputSize10]); - } - return [angle, rotationMatrix, face4]; -} -var findFaceCenter = (mesh) => { - const x = mesh.map((m) => m[0]); - const y = mesh.map((m) => m[1]); - return [Math.min(...x) + (Math.max(...x) - Math.min(...x)) / 2, Math.min(...y) + (Math.max(...y) - Math.min(...y)) / 2]; -}; -var calculateFaceBox = (mesh, previousBox) => { - const center = findFaceCenter(mesh); - const boxSize = getBoxSize(previousBox); - const calculatedBox = { - startPoint: [center[0] - boxSize[0] / 2, center[1] - boxSize[1] / 2], - endPoint: [center[0] + boxSize[0] / 2, center[1] + boxSize[1] / 2] - }; - return calculatedBox; -}; - -// src/face/blazeface.ts -var keypointsCount = 6; -var faceBoxScaleFactor = 1.4; -var model2; -var anchors = null; -var inputSize = 0; -var inputSizeT = null; -var size = () => inputSize; -async function load2(config3) { - var _a; - if (env.initial) - model2 = null; - if (!model2) - model2 = await loadModel((_a = config3.face.detector) == null ? void 0 : _a.modelPath); - else if (config3.debug) - log("cached model:", model2["modelUrl"]); - inputSize = model2["executor"] && model2.inputs[0].shape ? model2.inputs[0].shape[2] : 256; - inputSizeT = tf8.scalar(inputSize, "int32"); - anchors = tf8.tensor2d(generateAnchors(inputSize)); - return model2; -} -function decodeBoxes(boxOutputs) { - const t2 = {}; - t2.boxStarts = tf8.slice(boxOutputs, [0, 1], [-1, 2]); - t2.centers = tf8.add(t2.boxStarts, anchors); - t2.boxSizes = tf8.slice(boxOutputs, [0, 3], [-1, 2]); - t2.boxSizesNormalized = tf8.div(t2.boxSizes, inputSizeT); - t2.centersNormalized = tf8.div(t2.centers, inputSizeT); - t2.halfBoxSize = tf8.div(t2.boxSizesNormalized, constants.tf2); - t2.starts = tf8.sub(t2.centersNormalized, t2.halfBoxSize); - t2.ends = tf8.add(t2.centersNormalized, t2.halfBoxSize); - t2.startNormalized = tf8.mul(t2.starts, inputSizeT); - t2.endNormalized = tf8.mul(t2.ends, inputSizeT); - const boxes = tf8.concat2d([t2.startNormalized, t2.endNormalized], 1); - Object.keys(t2).forEach((tensor6) => tf8.dispose(t2[tensor6])); - return boxes; -} -async function getBoxes(inputImage, config3) { - var _a, _b, _c, _d; - if (!inputImage || inputImage["isDisposedInternal"] || inputImage.shape.length !== 4 || inputImage.shape[1] < 1 || inputImage.shape[2] < 1) - return []; - const t2 = {}; - t2.resized = tf8.image.resizeBilinear(inputImage, [inputSize, inputSize]); - t2.div = tf8.div(t2.resized, constants.tf127); - t2.normalized = tf8.sub(t2.div, constants.tf05); - const res = model2 == null ? void 0 : model2.execute(t2.normalized); - if (Array.isArray(res) && res.length > 2) { - const sorted = res.sort((a, b) => a.size - b.size); - t2.concat384 = tf8.concat([sorted[0], sorted[2]], 2); - t2.concat512 = tf8.concat([sorted[1], sorted[3]], 2); - t2.concat = tf8.concat([t2.concat512, t2.concat384], 1); - t2.batch = tf8.squeeze(t2.concat, 0); - } else if (Array.isArray(res)) { - t2.batch = tf8.squeeze(res[0]); - } else { - t2.batch = tf8.squeeze(res); - } - tf8.dispose(res); - t2.boxes = decodeBoxes(t2.batch); - t2.logits = tf8.slice(t2.batch, [0, 0], [-1, 1]); - t2.sigmoid = tf8.sigmoid(t2.logits); - t2.scores = tf8.squeeze(t2.sigmoid); - t2.nms = await tf8.image.nonMaxSuppressionAsync(t2.boxes, t2.scores, ((_a = config3.face.detector) == null ? void 0 : _a.maxDetected) || 0, ((_b = config3.face.detector) == null ? void 0 : _b.iouThreshold) || 0, ((_c = config3.face.detector) == null ? void 0 : _c.minConfidence) || 0); - const nms = await t2.nms.array(); - const boxes = []; - const scores = await t2.scores.data(); - for (let i = 0; i < nms.length; i++) { - const confidence = scores[nms[i]]; - if (confidence > (((_d = config3.face.detector) == null ? void 0 : _d.minConfidence) || 0)) { - const b = {}; - b.bbox = tf8.slice(t2.boxes, [nms[i], 0], [1, -1]); - b.slice = tf8.slice(t2.batch, [nms[i], keypointsCount - 1], [1, -1]); - b.squeeze = tf8.squeeze(b.slice); - b.landmarks = tf8.reshape(b.squeeze, [keypointsCount, -1]); - const points = await b.bbox.data(); - const rawBox = { - startPoint: [points[0], points[1]], - endPoint: [points[2], points[3]], - landmarks: await b.landmarks.array(), - confidence - }; - const scaledBox = scaleBoxCoordinates(rawBox, [(inputImage.shape[2] || 0) / inputSize, (inputImage.shape[1] || 0) / inputSize]); - const enlargedBox = enlargeBox(scaledBox, config3.face["scale"] || faceBoxScaleFactor); - const squaredBox = squarifyBox(enlargedBox); - boxes.push(squaredBox); - Object.keys(b).forEach((tensor6) => tf8.dispose(b[tensor6])); - } - } - Object.keys(t2).forEach((tensor6) => tf8.dispose(t2[tensor6])); - return boxes; -} - -// src/body/blazepose.ts -var tf10 = __toESM(require_tfjs_esm()); - -// src/body/blazeposecoords.ts -var blazeposecoords_exports = {}; -__export(blazeposecoords_exports, { - connected: () => connected, - kpt: () => kpt -}); -var kpt = [ - "nose", - "leftEyeInside", - "leftEye", - "leftEyeOutside", - "rightEyeInside", - "rightEye", - "rightEyeOutside", - "leftEar", - "rightEar", - "leftMouth", - "rightMouth", - "leftShoulder", - "rightShoulder", - "leftElbow", - "rightElbow", - "leftWrist", - "rightWrist", - "leftPinky", - "rightPinky", - "leftIndex", - "rightIndex", - "leftThumb", - "rightThumb", - "leftHip", - "rightHip", - "leftKnee", - "rightKnee", - "leftAnkle", - "rightAnkle", - "leftHeel", - "rightHeel", - "leftFoot", - "rightFoot", - "bodyCenter", - "bodyTop", - "leftPalm", - "leftHand", - "rightPalm", - "rightHand" -]; -var connected = { - shoulders: ["leftShoulder", "rightShoulder"], - hips: ["rightHip", "leftHip"], - mouth: ["leftMouth", "rightMouth"], - leftLegUpper: ["leftHip", "leftKnee"], - leftLegLower: ["leftKnee", "leftAnkle"], - leftFoot: ["leftAnkle", "leftHeel", "leftFoot"], - leftTorso: ["leftShoulder", "leftHip"], - leftArmUpper: ["leftShoulder", "leftElbow"], - leftArmLower: ["leftElbow", "leftWrist"], - leftHand: ["leftWrist", "leftPalm"], - leftHandPinky: ["leftPalm", "leftPinky"], - leftHandIndex: ["leftPalm", "leftIndex"], - leftHandThumb: ["leftPalm", "leftThumb"], - leftEyeOutline: ["leftEyeInside", "leftEyeOutside"], - rightLegUpper: ["rightHip", "rightKnee"], - rightLegLower: ["rightKnee", "rightAnkle"], - rightFoot: ["rightAnkle", "rightHeel", "rightFoot"], - rightTorso: ["rightShoulder", "rightHip"], - rightArmUpper: ["rightShoulder", "rightElbow"], - rightArmLower: ["rightElbow", "rightWrist"], - rightHand: ["rightWrist", "rightPalm"], - rightHandPinky: ["rightPalm", "rightPinky"], - rightHandIndex: ["rightPalm", "rightIndex"], - rightHandThumb: ["rightPalm", "rightThumb"], - rightEyeOutline: ["rightEyeInside", "rightEyeOutside"] -}; - -// src/body/blazeposedetector.ts -var tf9 = __toESM(require_tfjs_esm()); -var inputSize2 = 224; -var anchorTensor; -var numLayers = 5; -var strides = [8, 16, 32, 32, 32]; -function createAnchors() { - const anchors3 = []; - let layerId = 0; - while (layerId < numLayers) { - let anchorCount = 0; - let lastSameStrideLayer = layerId; - while (lastSameStrideLayer < strides.length && strides[lastSameStrideLayer] === strides[layerId]) { - anchorCount += 2; - lastSameStrideLayer++; - } - const stride = strides[layerId]; - const featureMapHeight = Math.ceil(inputSize2 / stride); - const featureMapWidth = Math.ceil(inputSize2 / stride); - for (let y = 0; y < featureMapHeight; ++y) { - for (let x = 0; x < featureMapWidth; ++x) { - for (let anchorId = 0; anchorId < anchorCount; ++anchorId) { - anchors3.push({ x: (x + 0.5) / featureMapWidth, y: (y + 0.5) / featureMapHeight }); - } - } - } - layerId = lastSameStrideLayer; - } - anchorTensor = { x: tf9.tensor1d(anchors3.map((a) => a.x)), y: tf9.tensor1d(anchors3.map((a) => a.y)) }; -} - -// src/util/box.ts -function calc(keypoints, outputSize2 = [1, 1]) { - const coords = [keypoints.map((pt) => pt[0]), keypoints.map((pt) => pt[1])]; - const min2 = [Math.min(...coords[0]), Math.min(...coords[1])]; - const max4 = [Math.max(...coords[0]), Math.max(...coords[1])]; - const box = [min2[0], min2[1], max4[0] - min2[0], max4[1] - min2[1]]; - const boxRaw = [box[0] / outputSize2[0], box[1] / outputSize2[1], box[2] / outputSize2[0], box[3] / outputSize2[1]]; - return { box, boxRaw }; -} -function square(keypoints, outputSize2 = [1, 1]) { - const coords = [keypoints.map((pt) => pt[0]), keypoints.map((pt) => pt[1])]; - const min2 = [Math.min(...coords[0]), Math.min(...coords[1])]; - const max4 = [Math.max(...coords[0]), Math.max(...coords[1])]; - const center = [(min2[0] + max4[0]) / 2, (min2[1] + max4[1]) / 2]; - const dist = Math.max(center[0] - min2[0], center[1] - min2[1], -center[0] + max4[0], -center[1] + max4[1]); - const box = [Math.trunc(center[0] - dist), Math.trunc(center[1] - dist), Math.trunc(2 * dist), Math.trunc(2 * dist)]; - const boxRaw = [box[0] / outputSize2[0], box[1] / outputSize2[1], box[2] / outputSize2[0], box[3] / outputSize2[1]]; - return { box, boxRaw }; -} -function scale(box, scaleFact) { - const dist = [box[2] * scaleFact, box[3] * scaleFact]; - const newBox = [ - box[0] - (dist[0] - box[2]) / 2, - box[1] - (dist[1] - box[3]) / 2, - dist[0], - dist[1] - ]; - return newBox; -} - -// src/body/blazepose.ts -var env3 = { initial: true }; -var models2 = { detector: null, landmarks: null }; -var inputSize3 = { detector: [224, 224], landmarks: [256, 256] }; -var skipped2 = Number.MAX_SAFE_INTEGER; -var outputNodes = { - landmarks: ["ld_3d", "activation_segmentation", "activation_heatmap", "world_3d", "output_poseflag"], - detector: [] -}; -var cache = null; -var cropBox; -var padding = [[0, 0], [0, 0], [0, 0], [0, 0]]; -var lastTime2 = 0; -var sigmoid3 = (x) => 1 - 1 / (1 + Math.exp(x)); -async function loadDetect(config3) { - var _a; - if (env3.initial) - models2.detector = null; - if (!models2.detector && config3.body["detector"] && config3.body["detector"].modelPath || "") { - models2.detector = await loadModel(config3.body["detector"].modelPath); - const inputs = ((_a = models2.detector) == null ? void 0 : _a["executor"]) ? Object.values(models2.detector.modelSignature["inputs"]) : void 0; - inputSize3.detector[0] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[1].size) : 0; - inputSize3.detector[1] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : 0; - } else if (config3.debug && models2.detector) - log("cached model:", models2.detector["modelUrl"]); - createAnchors(); - return models2.detector; -} -async function loadPose(config3) { - var _a; - if (env3.initial) - models2.landmarks = null; - if (!models2.landmarks) { - models2.landmarks = await loadModel(config3.body.modelPath); - const inputs = ((_a = models2.landmarks) == null ? void 0 : _a["executor"]) ? Object.values(models2.landmarks.modelSignature["inputs"]) : void 0; - inputSize3.landmarks[0] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[1].size) : 0; - inputSize3.landmarks[1] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : 0; - } else if (config3.debug) - log("cached model:", models2.landmarks["modelUrl"]); - return models2.landmarks; -} -function prepareImage(input, size2) { - var _a, _b; - const t2 = {}; - if (!((_a = input == null ? void 0 : input.shape) == null ? void 0 : _a[1]) || !((_b = input == null ? void 0 : input.shape) == null ? void 0 : _b[2])) - return input; - let final; - if (cropBox) { - t2.cropped = tf10.image.cropAndResize(input, [cropBox], [0], [input.shape[1], input.shape[2]]); - } - if (input.shape[1] !== input.shape[2]) { - const height = [ - input.shape[2] > input.shape[1] ? Math.trunc((input.shape[2] - input.shape[1]) / 2) : 0, - input.shape[2] > input.shape[1] ? Math.trunc((input.shape[2] - input.shape[1]) / 2) : 0 - ]; - const width = [ - input.shape[1] > input.shape[2] ? Math.trunc((input.shape[1] - input.shape[2]) / 2) : 0, - input.shape[1] > input.shape[2] ? Math.trunc((input.shape[1] - input.shape[2]) / 2) : 0 - ]; - padding = [ - [0, 0], - height, - width, - [0, 0] - ]; - t2.pad = tf10.pad(t2.cropped || input, padding); - t2.resize = tf10.image.resizeBilinear(t2.pad, [size2, size2]); - final = tf10.div(t2.resize, constants.tf255); - } else if (input.shape[1] !== size2) { - t2.resize = tf10.image.resizeBilinear(t2.cropped || input, [size2, size2]); - final = tf10.div(t2.resize, constants.tf255); - } else { - final = tf10.div(t2.cropped || input, constants.tf255); - } - Object.keys(t2).forEach((tensor6) => tf10.dispose(t2[tensor6])); - return final; -} -function rescaleKeypoints(keypoints, outputSize2) { - for (const kpt4 of keypoints) { - kpt4.position = [ - Math.trunc(kpt4.position[0] * (outputSize2[0] + padding[2][0] + padding[2][1]) / outputSize2[0] - padding[2][0]), - Math.trunc(kpt4.position[1] * (outputSize2[1] + padding[1][0] + padding[1][1]) / outputSize2[1] - padding[1][0]), - kpt4.position[2] - ]; - kpt4.positionRaw = [kpt4.position[0] / outputSize2[0], kpt4.position[1] / outputSize2[1], 2 * kpt4.position[2] / (outputSize2[0] + outputSize2[1])]; - } - if (cropBox) { - for (const kpt4 of keypoints) { - kpt4.positionRaw = [ - kpt4.positionRaw[0] + cropBox[1], - kpt4.positionRaw[1] + cropBox[0], - kpt4.positionRaw[2] - ]; - kpt4.position = [ - Math.trunc(kpt4.positionRaw[0] * outputSize2[0]), - Math.trunc(kpt4.positionRaw[1] * outputSize2[1]), - kpt4.positionRaw[2] - ]; - } - } - return keypoints; -} -function fixKeypoints(keypoints) { - const leftPalm = keypoints.find((k) => k.part === "leftPalm"); - const leftWrist = keypoints.find((k) => k.part === "leftWrist"); - const leftIndex = keypoints.find((k) => k.part === "leftIndex"); - leftPalm.position[2] = ((leftWrist.position[2] || 0) + (leftIndex.position[2] || 0)) / 2; - const rightPalm = keypoints.find((k) => k.part === "rightPalm"); - const rightWrist = keypoints.find((k) => k.part === "rightWrist"); - const rightIndex = keypoints.find((k) => k.part === "rightIndex"); - rightPalm.position[2] = ((rightWrist.position[2] || 0) + (rightIndex.position[2] || 0)) / 2; -} -async function detectLandmarks(input, config3, outputSize2) { - var _a, _b; - if (!((_a = models2.landmarks) == null ? void 0 : _a["executor"])) - return null; - const t2 = {}; - [t2.ld, t2.segmentation, t2.heatmap, t2.world, t2.poseflag] = (_b = models2.landmarks) == null ? void 0 : _b.execute(input, outputNodes.landmarks); - const poseScore = (await t2.poseflag.data())[0]; - const points = await t2.ld.data(); - const distances = await t2.world.data(); - Object.keys(t2).forEach((tensor6) => tf10.dispose(t2[tensor6])); - const keypointsRelative = []; - const depth = 5; - for (let i = 0; i < points.length / depth; i++) { - const score = sigmoid3(points[depth * i + 3]); - const presence = sigmoid3(points[depth * i + 4]); - const adjScore = Math.trunc(100 * score * presence * poseScore) / 100; - const positionRaw = [points[depth * i + 0] / inputSize3.landmarks[0], points[depth * i + 1] / inputSize3.landmarks[1], points[depth * i + 2] + 0]; - const position = [Math.trunc(outputSize2[0] * positionRaw[0]), Math.trunc(outputSize2[1] * positionRaw[1]), positionRaw[2]]; - const distance2 = [distances[depth * i + 0], distances[depth * i + 1], distances[depth * i + 2] + 0]; - keypointsRelative.push({ part: kpt[i], positionRaw, position, distance: distance2, score: adjScore }); - } - if (poseScore < (config3.body.minConfidence || 0)) - return null; - fixKeypoints(keypointsRelative); - const keypoints = rescaleKeypoints(keypointsRelative, outputSize2); - const kpts = keypoints.map((k) => k.position); - const boxes = calc(kpts, [outputSize2[0], outputSize2[1]]); - const annotations2 = {}; - for (const [name, indexes] of Object.entries(connected)) { - const pt = []; - for (let i = 0; i < indexes.length - 1; i++) { - const pt0 = keypoints.find((kpt4) => kpt4.part === indexes[i]); - const pt1 = keypoints.find((kpt4) => kpt4.part === indexes[i + 1]); - if (pt0 && pt1) - pt.push([pt0.position, pt1.position]); - } - annotations2[name] = pt; - } - const body4 = { id: 0, score: Math.trunc(100 * poseScore) / 100, box: boxes.box, boxRaw: boxes.boxRaw, keypoints, annotations: annotations2 }; - return body4; -} -async function predict2(input, config3) { - const outputSize2 = [input.shape[2] || 0, input.shape[1] || 0]; - const skipTime = (config3.body.skipTime || 0) > now() - lastTime2; - const skipFrame = skipped2 < (config3.body.skipFrames || 0); - if (config3.skipAllowed && skipTime && skipFrame && cache !== null) { - skipped2++; - } else { - const t2 = {}; - t2.landmarks = prepareImage(input, 256); - cache = await detectLandmarks(t2.landmarks, config3, outputSize2); - Object.keys(t2).forEach((tensor6) => tf10.dispose(t2[tensor6])); - lastTime2 = now(); - skipped2 = 0; - } - return cache ? [cache] : []; -} - -// src/object/centernet.ts -var tf11 = __toESM(require_tfjs_esm()); - -// src/object/labels.ts -var labels = [ - { class: 1, label: "person" }, - { class: 2, label: "bicycle" }, - { class: 3, label: "car" }, - { class: 4, label: "motorcycle" }, - { class: 5, label: "airplane" }, - { class: 6, label: "bus" }, - { class: 7, label: "train" }, - { class: 8, label: "truck" }, - { class: 9, label: "boat" }, - { class: 10, label: "traffic light" }, - { class: 11, label: "fire hydrant" }, - { class: 12, label: "stop sign" }, - { class: 13, label: "parking meter" }, - { class: 14, label: "bench" }, - { class: 15, label: "bird" }, - { class: 16, label: "cat" }, - { class: 17, label: "dog" }, - { class: 18, label: "horse" }, - { class: 19, label: "sheep" }, - { class: 20, label: "cow" }, - { class: 21, label: "elephant" }, - { class: 22, label: "bear" }, - { class: 23, label: "zebra" }, - { class: 24, label: "giraffe" }, - { class: 25, label: "backpack" }, - { class: 26, label: "umbrella" }, - { class: 27, label: "handbag" }, - { class: 28, label: "tie" }, - { class: 29, label: "suitcase" }, - { class: 30, label: "frisbee" }, - { class: 31, label: "skis" }, - { class: 32, label: "snowboard" }, - { class: 33, label: "sports ball" }, - { class: 34, label: "kite" }, - { class: 35, label: "baseball bat" }, - { class: 36, label: "baseball glove" }, - { class: 37, label: "skateboard" }, - { class: 38, label: "surfboard" }, - { class: 39, label: "tennis racket" }, - { class: 40, label: "bottle" }, - { class: 41, label: "wine glass" }, - { class: 42, label: "cup" }, - { class: 43, label: "fork" }, - { class: 44, label: "knife" }, - { class: 45, label: "spoon" }, - { class: 46, label: "bowl" }, - { class: 47, label: "banana" }, - { class: 48, label: "apple" }, - { class: 49, label: "sandwich" }, - { class: 50, label: "orange" }, - { class: 51, label: "broccoli" }, - { class: 52, label: "carrot" }, - { class: 53, label: "hot dog" }, - { class: 54, label: "pizza" }, - { class: 55, label: "donut" }, - { class: 56, label: "cake" }, - { class: 57, label: "chair" }, - { class: 58, label: "couch" }, - { class: 59, label: "potted plant" }, - { class: 60, label: "bed" }, - { class: 61, label: "dining table" }, - { class: 62, label: "toilet" }, - { class: 63, label: "tv" }, - { class: 64, label: "laptop" }, - { class: 65, label: "mouse" }, - { class: 66, label: "remote" }, - { class: 67, label: "keyboard" }, - { class: 68, label: "cell phone" }, - { class: 69, label: "microwave" }, - { class: 70, label: "oven" }, - { class: 71, label: "toaster" }, - { class: 72, label: "sink" }, - { class: 73, label: "refrigerator" }, - { class: 74, label: "book" }, - { class: 75, label: "clock" }, - { class: 76, label: "vase" }, - { class: 77, label: "scissors" }, - { class: 78, label: "teddy bear" }, - { class: 79, label: "hair drier" }, - { class: 80, label: "toothbrush" } -]; - -// src/object/centernet.ts -var model3; -var inputSize4 = 0; -var last2 = []; -var lastTime3 = 0; -var skipped3 = Number.MAX_SAFE_INTEGER; -async function load3(config3) { - if (env.initial) - model3 = null; - if (!model3) { - model3 = await loadModel(config3.object.modelPath); - const inputs = (model3 == null ? void 0 : model3["executor"]) ? Object.values(model3.modelSignature["inputs"]) : void 0; - inputSize4 = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : 0; - } else if (config3.debug) - log("cached model:", model3["modelUrl"]); - return model3; -} -async function process3(res, outputShape, config3) { - if (!res) - return []; - const t2 = {}; - const results = []; - const detections = await res.array(); - t2.squeeze = tf11.squeeze(res); - const arr = tf11.split(t2.squeeze, 6, 1); - t2.stack = tf11.stack([arr[1], arr[0], arr[3], arr[2]], 1); - t2.boxes = tf11.squeeze(t2.stack); - t2.scores = tf11.squeeze(arr[4]); - t2.classes = tf11.squeeze(arr[5]); - tf11.dispose([res, ...arr]); - t2.nms = await tf11.image.nonMaxSuppressionAsync(t2.boxes, t2.scores, config3.object.maxDetected, config3.object.iouThreshold, config3.object.minConfidence || 0); - const nms = await t2.nms.data(); - let i = 0; - for (const id of Array.from(nms)) { - const score = Math.trunc(100 * detections[0][id][4]) / 100; - const classVal = detections[0][id][5]; - if (Number.isNaN(classVal)) - continue; - const label = labels[classVal].label; - const [x, y] = [ - detections[0][id][0] / inputSize4, - detections[0][id][1] / inputSize4 - ]; - const boxRaw = [ - x, - y, - detections[0][id][2] / inputSize4 - x, - detections[0][id][3] / inputSize4 - y - ]; - const box = [ - Math.trunc(boxRaw[0] * outputShape[0]), - Math.trunc(boxRaw[1] * outputShape[1]), - Math.trunc(boxRaw[2] * outputShape[0]), - Math.trunc(boxRaw[3] * outputShape[1]) - ]; - results.push({ id: i++, score, class: classVal, label, box, boxRaw }); - } - Object.keys(t2).forEach((tensor6) => tf11.dispose(t2[tensor6])); - return results; -} -async function predict3(input, config3) { - if (!(model3 == null ? void 0 : model3["executor"])) - return []; - const skipTime = (config3.object.skipTime || 0) > now() - lastTime3; - const skipFrame = skipped3 < (config3.object.skipFrames || 0); - if (config3.skipAllowed && skipTime && skipFrame && last2.length > 0) { - skipped3++; - return last2; - } - skipped3 = 0; - return new Promise(async (resolve) => { - const outputSize2 = [input.shape[2] || 0, input.shape[1] || 0]; - const resize = tf11.image.resizeBilinear(input, [inputSize4, inputSize4]); - const objectT = config3.object.enabled ? model3 == null ? void 0 : model3.execute(resize, ["tower_0/detections"]) : null; - lastTime3 = now(); - tf11.dispose(resize); - const obj = await process3(objectT, outputSize2, config3); - last2 = obj; - resolve(obj); - }); -} - -// src/body/efficientpose.ts -var tf12 = __toESM(require_tfjs_esm()); - -// src/body/efficientposecoords.ts -var efficientposecoords_exports = {}; -__export(efficientposecoords_exports, { - connected: () => connected2, - kpt: () => kpt2 -}); -var kpt2 = [ - "head", - "neck", - "rightShoulder", - "rightElbow", - "rightWrist", - "chest", - "leftShoulder", - "leftElbow", - "leftWrist", - "bodyCenter", - "rightHip", - "rightKnee", - "rightAnkle", - "leftHip", - "leftKnee", - "leftAnkle" -]; -var connected2 = { - leftLeg: ["leftHip", "leftKnee", "leftAnkle"], - rightLeg: ["rightHip", "rightKnee", "rightAnkle"], - torso: ["leftShoulder", "rightShoulder", "rightHip", "leftHip", "leftShoulder"], - leftArm: ["leftShoulder", "leftElbow", "leftWrist"], - rightArm: ["rightShoulder", "rightElbow", "rightWrist"], - head: [] -}; - -// src/body/efficientpose.ts -var model4; -var lastTime4 = 0; -var cache2 = { id: 0, keypoints: [], box: [0, 0, 0, 0], boxRaw: [0, 0, 0, 0], score: 0, annotations: {} }; -var skipped4 = Number.MAX_SAFE_INTEGER; -async function load4(config3) { - if (env.initial) - model4 = null; - if (!model4) - model4 = await loadModel(config3.body.modelPath); - else if (config3.debug) - log("cached model:", model4["modelUrl"]); - return model4; -} -async function max2d(inputs, minScore) { - const [width, height] = inputs.shape; - const reshaped = tf12.reshape(inputs, [height * width]); - const max4 = tf12.max(reshaped, 0); - const newScore = (await max4.data())[0]; - if (newScore > minScore) { - const coordinates = tf12.argMax(reshaped, 0); - const mod3 = tf12.mod(coordinates, width); - const x = (await mod3.data())[0]; - const div16 = tf12.div(coordinates, width); - const y = (await div16.data())[0]; - tf12.dispose([reshaped, max4, coordinates, mod3, div16]); - return [x, y, newScore]; - } - tf12.dispose([reshaped, max4]); - return [0, 0, newScore]; -} -async function predict4(image27, config3) { - if (!(model4 == null ? void 0 : model4["executor"])) - return []; - const skipTime = (config3.body.skipTime || 0) > now() - lastTime4; - const skipFrame = skipped4 < (config3.body.skipFrames || 0); - if (config3.skipAllowed && skipTime && skipFrame && Object.keys(cache2.keypoints).length > 0) { - skipped4++; - return [cache2]; - } - skipped4 = 0; - return new Promise(async (resolve) => { - const tensor6 = tf12.tidy(() => { - if (!(model4 == null ? void 0 : model4.inputs[0].shape)) - return null; - const resize = tf12.image.resizeBilinear(image27, [model4.inputs[0].shape[2], model4.inputs[0].shape[1]], false); - const enhance2 = tf12.mul(resize, constants.tf2); - const norm = tf12.sub(enhance2, constants.tf1); - return norm; - }); - let resT; - if (config3.body.enabled) - resT = model4 == null ? void 0 : model4.execute(tensor6); - lastTime4 = now(); - tf12.dispose(tensor6); - if (resT) { - cache2.keypoints.length = 0; - const squeeze14 = tf12.squeeze(resT); - tf12.dispose(resT); - const stack5 = tf12.unstack(squeeze14, 2); - tf12.dispose(squeeze14); - for (let id = 0; id < stack5.length; id++) { - const [x2, y2, partScore] = await max2d(stack5[id], config3.body.minConfidence); - if (partScore > (config3.body.minConfidence || 0)) { - cache2.keypoints.push({ - score: Math.round(100 * partScore) / 100, - part: kpt2[id], - positionRaw: [ - x2 / model4.inputs[0].shape[2], - y2 / model4.inputs[0].shape[1] - ], - position: [ - Math.round(image27.shape[2] * x2 / model4.inputs[0].shape[2]), - Math.round(image27.shape[1] * y2 / model4.inputs[0].shape[1]) - ] - }); - } - } - stack5.forEach((s) => tf12.dispose(s)); - } - cache2.score = cache2.keypoints.reduce((prev, curr) => curr.score > prev ? curr.score : prev, 0); - const x = cache2.keypoints.map((a) => a.position[0]); - const y = cache2.keypoints.map((a) => a.position[1]); - cache2.box = [ - Math.min(...x), - Math.min(...y), - Math.max(...x) - Math.min(...x), - Math.max(...y) - Math.min(...y) - ]; - const xRaw = cache2.keypoints.map((a) => a.positionRaw[0]); - const yRaw = cache2.keypoints.map((a) => a.positionRaw[1]); - cache2.boxRaw = [ - Math.min(...xRaw), - Math.min(...yRaw), - Math.max(...xRaw) - Math.min(...xRaw), - Math.max(...yRaw) - Math.min(...yRaw) - ]; - for (const [name, indexes] of Object.entries(connected2)) { - const pt = []; - for (let i = 0; i < indexes.length - 1; i++) { - const pt0 = cache2.keypoints.find((kpt4) => kpt4.part === indexes[i]); - const pt1 = cache2.keypoints.find((kpt4) => kpt4.part === indexes[i + 1]); - if (pt0 && pt1 && pt0.score > (config3.body.minConfidence || 0) && pt1.score > (config3.body.minConfidence || 0)) - pt.push([pt0.position, pt1.position]); - } - cache2.annotations[name] = pt; - } - resolve([cache2]); - }); -} - -// src/gear/emotion.ts -var tf13 = __toESM(require_tfjs_esm()); -var annotations = ["angry", "disgust", "fear", "happy", "sad", "surprise", "neutral"]; -var model5; -var last3 = []; -var lastCount2 = 0; -var lastTime5 = 0; -var skipped5 = Number.MAX_SAFE_INTEGER; -async function load5(config3) { - var _a; - if (env.initial) - model5 = null; - if (!model5) - model5 = await loadModel((_a = config3.face.emotion) == null ? void 0 : _a.modelPath); - else if (config3.debug) - log("cached model:", model5["modelUrl"]); - return model5; -} -async function predict5(image27, config3, idx, count2) { - var _a, _b; - if (!model5) - return []; - const skipFrame = skipped5 < (((_a = config3.face.emotion) == null ? void 0 : _a.skipFrames) || 0); - const skipTime = (((_b = config3.face.emotion) == null ? void 0 : _b.skipTime) || 0) > now() - lastTime5; - if (config3.skipAllowed && skipTime && skipFrame && lastCount2 === count2 && last3[idx] && last3[idx].length > 0) { - skipped5++; - return last3[idx]; - } - skipped5 = 0; - return new Promise(async (resolve) => { - var _a2; - const obj = []; - if ((_a2 = config3.face.emotion) == null ? void 0 : _a2.enabled) { - const t2 = {}; - const inputSize10 = (model5 == null ? void 0 : model5.inputs[0].shape) ? model5.inputs[0].shape[2] : 0; - t2.resize = tf13.image.resizeBilinear(image27, [inputSize10, inputSize10], false); - t2.channels = tf13.mul(t2.resize, constants.rgb); - t2.grayscale = tf13.sum(t2.channels, 3, true); - t2.grayscaleSub = tf13.sub(t2.grayscale, constants.tf05); - t2.grayscaleMul = tf13.mul(t2.grayscaleSub, constants.tf2); - t2.emotion = model5 == null ? void 0 : model5.execute(t2.grayscaleMul); - lastTime5 = now(); - const data = await t2.emotion.data(); - for (let i = 0; i < data.length; i++) { - if (data[i] > (config3.face.emotion.minConfidence || 0)) - obj.push({ score: Math.min(0.99, Math.trunc(100 * data[i]) / 100), emotion: annotations[i] }); - } - obj.sort((a, b) => b.score - a.score); - Object.keys(t2).forEach((tensor6) => tf13.dispose(t2[tensor6])); - } - last3[idx] = obj; - lastCount2 = count2; - resolve(obj); - }); -} - -// src/face/facemesh.ts -var tf15 = __toESM(require_tfjs_esm()); - -// src/face/iris.ts -var tf14 = __toESM(require_tfjs_esm()); -var model6; -var inputSize5 = 0; -var irisEnlarge = 2.3; -var leftOutline = meshAnnotations.leftEyeLower0; -var rightOutline = meshAnnotations.rightEyeLower0; -var eyeLandmarks = { - leftBounds: [leftOutline[0], leftOutline[leftOutline.length - 1]], - rightBounds: [rightOutline[0], rightOutline[rightOutline.length - 1]] -}; -var irisLandmarks = { - upperCenter: 3, - lowerCenter: 4, - index: 71, - numCoordinates: 76 -}; -async function load6(config3) { - var _a, _b; - if (env.initial) - model6 = null; - if (!model6) - model6 = await loadModel((_a = config3.face.iris) == null ? void 0 : _a.modelPath); - else if (config3.debug) - log("cached model:", model6["modelUrl"]); - inputSize5 = (model6 == null ? void 0 : model6["executor"]) && ((_b = model6.inputs) == null ? void 0 : _b[0].shape) ? model6.inputs[0].shape[2] : 0; - if (inputSize5 === -1) - inputSize5 = 64; - return model6; -} -function replaceIrisCoords(rawCoords, newCoords, prefix, keys) { - for (let i = 0; i < irisIndices.length; i++) { - const { key, indices } = irisIndices[i]; - const originalIndices = meshAnnotations[`${prefix}${key}`]; - if (!keys || keys.includes(key)) { - for (let j = 0; j < indices.length; j++) { - const index2 = indices[j]; - rawCoords[originalIndices[j]] = [ - newCoords[index2][0], - newCoords[index2][1], - (newCoords[index2][2] + rawCoords[originalIndices[j]][2]) / 2 - ]; - } - } - } -} -var getLeftToRightEyeDepthDifference = (rawCoords) => { - const leftEyeZ = rawCoords[eyeLandmarks.leftBounds[0]][2]; - const rightEyeZ = rawCoords[eyeLandmarks.rightBounds[0]][2]; - return leftEyeZ - rightEyeZ; -}; -var getEyeBox = (rawCoords, face4, eyeInnerCornerIndex, eyeOuterCornerIndex, meshSize, flip = false) => { - const box = squarifyBox(enlargeBox(calculateLandmarksBoundingBox([rawCoords[eyeInnerCornerIndex], rawCoords[eyeOuterCornerIndex]]), irisEnlarge)); - const boxSize = getBoxSize(box); - let crop = tf14.image.cropAndResize(face4, [[ - box.startPoint[1] / meshSize, - box.startPoint[0] / meshSize, - box.endPoint[1] / meshSize, - box.endPoint[0] / meshSize - ]], [0], [inputSize5, inputSize5]); - if (flip && env.kernels.includes("flipleftright")) { - const flipped = tf14.image.flipLeftRight(crop); - tf14.dispose(crop); - crop = flipped; - } - return { box, boxSize, crop }; -}; -var getEyeCoords = (eyeData, eyeBox, eyeBoxSize, flip = false) => { - const eyeRawCoords = []; - for (let i = 0; i < irisLandmarks.numCoordinates; i++) { - const x = eyeData[i * 3]; - const y = eyeData[i * 3 + 1]; - const z = eyeData[i * 3 + 2]; - eyeRawCoords.push([ - (flip ? 1 - x / inputSize5 : x / inputSize5) * eyeBoxSize[0] + eyeBox.startPoint[0], - y / inputSize5 * eyeBoxSize[1] + eyeBox.startPoint[1], - z - ]); - } - return { rawCoords: eyeRawCoords, iris: eyeRawCoords.slice(irisLandmarks.index) }; -}; -var getAdjustedIrisCoords = (rawCoords, irisCoords, direction) => { - const upperCenterZ = rawCoords[meshAnnotations[`${direction}EyeUpper0`][irisLandmarks.upperCenter]][2]; - const lowerCenterZ = rawCoords[meshAnnotations[`${direction}EyeLower0`][irisLandmarks.lowerCenter]][2]; - const averageZ = (upperCenterZ + lowerCenterZ) / 2; - return irisCoords.map((coord, i) => { - let z = averageZ; - if (i === 2) { - z = upperCenterZ; - } else if (i === 4) { - z = lowerCenterZ; - } - return [coord[0], coord[1], z]; - }); -}; -async function augmentIris(rawCoords, face4, meshSize) { - if (!(model6 == null ? void 0 : model6["executor"])) - return rawCoords; - const { box: leftEyeBox, boxSize: leftEyeBoxSize, crop: leftEyeCrop } = getEyeBox(rawCoords, face4, eyeLandmarks.leftBounds[0], eyeLandmarks.leftBounds[1], meshSize, true); - const { box: rightEyeBox, boxSize: rightEyeBoxSize, crop: rightEyeCrop } = getEyeBox(rawCoords, face4, eyeLandmarks.rightBounds[0], eyeLandmarks.rightBounds[1], meshSize, true); - const combined = tf14.concat([leftEyeCrop, rightEyeCrop]); - tf14.dispose(leftEyeCrop); - tf14.dispose(rightEyeCrop); - const eyePredictions = model6.execute(combined); - tf14.dispose(combined); - const eyePredictionsData = await eyePredictions.data(); - tf14.dispose(eyePredictions); - const leftEyeData = eyePredictionsData.slice(0, irisLandmarks.numCoordinates * 3); - const { rawCoords: leftEyeRawCoords, iris: leftIrisRawCoords } = getEyeCoords(leftEyeData, leftEyeBox, leftEyeBoxSize, true); - const rightEyeData = eyePredictionsData.slice(irisLandmarks.numCoordinates * 3); - const { rawCoords: rightEyeRawCoords, iris: rightIrisRawCoords } = getEyeCoords(rightEyeData, rightEyeBox, rightEyeBoxSize, false); - const leftToRightEyeDepthDifference = getLeftToRightEyeDepthDifference(rawCoords); - if (Math.abs(leftToRightEyeDepthDifference) < 30) { - replaceIrisCoords(rawCoords, leftEyeRawCoords, "left", null); - replaceIrisCoords(rawCoords, rightEyeRawCoords, "right", null); - } else if (leftToRightEyeDepthDifference < 1) { - replaceIrisCoords(rawCoords, leftEyeRawCoords, "left", ["EyeUpper0", "EyeLower0"]); - } else { - replaceIrisCoords(rawCoords, rightEyeRawCoords, "right", ["EyeUpper0", "EyeLower0"]); - } - const adjustedLeftIrisCoords = getAdjustedIrisCoords(rawCoords, leftIrisRawCoords, "left"); - const adjustedRightIrisCoords = getAdjustedIrisCoords(rawCoords, rightIrisRawCoords, "right"); - const newCoords = rawCoords.concat(adjustedLeftIrisCoords).concat(adjustedRightIrisCoords); - return newCoords; -} - -// src/face/constants.ts -var LIPS_CONNECTIONS = [ - [61, 146], - [146, 91], - [91, 181], - [181, 84], - [84, 17], - [17, 314], - [314, 405], - [405, 321], - [321, 375], - [375, 291], - [61, 185], - [185, 40], - [40, 39], - [39, 37], - [37, 0], - [0, 267], - [267, 269], - [269, 270], - [270, 409], - [409, 291], - [78, 95], - [95, 88], - [88, 178], - [178, 87], - [87, 14], - [14, 317], - [317, 402], - [402, 318], - [318, 324], - [324, 308], - [78, 191], - [191, 80], - [80, 81], - [81, 82], - [82, 13], - [13, 312], - [312, 311], - [311, 310], - [310, 415], - [415, 308] -]; -var LEFT_EYE_CONNECTIONS = [[263, 249], [249, 390], [390, 373], [373, 374], [374, 380], [380, 381], [381, 382], [382, 362], [263, 466], [466, 388], [388, 387], [387, 386], [386, 385], [385, 384], [384, 398], [398, 362]]; -var LEFT_EYEBROW_CONNECTIONS = [[276, 283], [283, 282], [282, 295], [295, 285], [300, 293], [293, 334], [334, 296], [296, 336]]; -var LEFT_IRIS_CONNECTIONS = [[474, 475], [475, 476], [476, 477], [477, 474]]; -var RIGHT_EYE_CONNECTIONS = [[33, 7], [7, 163], [163, 144], [144, 145], [145, 153], [153, 154], [154, 155], [155, 133], [33, 246], [246, 161], [161, 160], [160, 159], [159, 158], [158, 157], [157, 173], [173, 133]]; -var RIGHT_EYEBROW_CONNECTIONS = [[46, 53], [53, 52], [52, 65], [65, 55], [70, 63], [63, 105], [105, 66], [66, 107]]; -var RIGHT_IRIS_CONNECTIONS = [[469, 470], [470, 471], [471, 472], [472, 469]]; -var FACE_OVAL_CONNECTIONS = [ - [10, 338], - [338, 297], - [297, 332], - [332, 284], - [284, 251], - [251, 389], - [389, 356], - [356, 454], - [454, 323], - [323, 361], - [361, 288], - [288, 397], - [397, 365], - [365, 379], - [379, 378], - [378, 400], - [400, 377], - [377, 152], - [152, 148], - [148, 176], - [176, 149], - [149, 150], - [150, 136], - [136, 172], - [172, 58], - [58, 132], - [132, 93], - [93, 234], - [234, 127], - [127, 162], - [162, 21], - [21, 54], - [54, 103], - [103, 67], - [67, 109], - [109, 10] -]; -function connectionsToIndices2(connections) { - const indices = connections.map((connection) => connection[0]); - indices.push(connections[connections.length - 1][1]); - return indices; -} -var MEDIAPIPE_FACE_MESH_KEYPOINTS_BY_CONTOUR = { - lips: connectionsToIndices2(LIPS_CONNECTIONS), - leftEye: connectionsToIndices2(LEFT_EYE_CONNECTIONS), - leftEyebrow: connectionsToIndices2(LEFT_EYEBROW_CONNECTIONS), - leftIris: connectionsToIndices2(LEFT_IRIS_CONNECTIONS), - rightEye: connectionsToIndices2(RIGHT_EYE_CONNECTIONS), - rightEyebrow: connectionsToIndices2(RIGHT_EYEBROW_CONNECTIONS), - rightIris: connectionsToIndices2(RIGHT_IRIS_CONNECTIONS), - faceOval: connectionsToIndices2(FACE_OVAL_CONNECTIONS) -}; -var indexLabelPairs = Object.entries(MEDIAPIPE_FACE_MESH_KEYPOINTS_BY_CONTOUR).map(([label, indices]) => indices.map((index2) => [index2, label])).flat(); -var MEDIAPIPE_FACE_MESH_KEYPOINTS = new Map(indexLabelPairs); -var LANDMARKS_REFINEMENT_LIPS_CONFIG = [ - 61, - 146, - 91, - 181, - 84, - 17, - 314, - 405, - 321, - 375, - 291, - 185, - 40, - 39, - 37, - 0, - 267, - 269, - 270, - 409, - 78, - 95, - 88, - 178, - 87, - 14, - 317, - 402, - 318, - 324, - 308, - 191, - 80, - 81, - 82, - 13, - 312, - 311, - 310, - 415, - 76, - 77, - 90, - 180, - 85, - 16, - 315, - 404, - 320, - 307, - 306, - 184, - 74, - 73, - 72, - 11, - 302, - 303, - 304, - 408, - 62, - 96, - 89, - 179, - 86, - 15, - 316, - 403, - 319, - 325, - 292, - 183, - 42, - 41, - 38, - 12, - 268, - 271, - 272, - 407 -]; -var LANDMARKS_REFINEMENT_LEFT_EYE_CONFIG = [ - 33, - 7, - 163, - 144, - 145, - 153, - 154, - 155, - 133, - 246, - 161, - 160, - 159, - 158, - 157, - 173, - 130, - 25, - 110, - 24, - 23, - 22, - 26, - 112, - 243, - 247, - 30, - 29, - 27, - 28, - 56, - 190, - 226, - 31, - 228, - 229, - 230, - 231, - 232, - 233, - 244, - 113, - 225, - 224, - 223, - 222, - 221, - 189, - 35, - 124, - 46, - 53, - 52, - 65, - 143, - 111, - 117, - 118, - 119, - 120, - 121, - 128, - 245, - 156, - 70, - 63, - 105, - 66, - 107, - 55, - 193 -]; -var LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG = [ - 263, - 249, - 390, - 373, - 374, - 380, - 381, - 382, - 362, - 466, - 388, - 387, - 386, - 385, - 384, - 398, - 359, - 255, - 339, - 254, - 253, - 252, - 256, - 341, - 463, - 467, - 260, - 259, - 257, - 258, - 286, - 414, - 446, - 261, - 448, - 449, - 450, - 451, - 452, - 453, - 464, - 342, - 445, - 444, - 443, - 442, - 441, - 413, - 265, - 353, - 276, - 283, - 282, - 295, - 372, - 340, - 346, - 347, - 348, - 349, - 350, - 357, - 465, - 383, - 300, - 293, - 334, - 296, - 336, - 285, - 417 -]; - -// src/face/attention.ts -async function augment(rawCoords, results) { - var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j; - const t2 = { - lips: await ((_b = (_a = results.filter((r) => r.size === 160)) == null ? void 0 : _a[0]) == null ? void 0 : _b.data()), - irisL: await ((_d = (_c = results.filter((r) => r.size === 10)) == null ? void 0 : _c[0]) == null ? void 0 : _d.data()), - eyeL: await ((_f = (_e = results.filter((r) => r.size === 142)) == null ? void 0 : _e[0]) == null ? void 0 : _f.data()), - irisR: await ((_h = (_g = results.filter((r) => r.size === 10)) == null ? void 0 : _g[1]) == null ? void 0 : _h.data()), - eyeR: await ((_j = (_i = results.filter((r) => r.size === 142)) == null ? void 0 : _i[1]) == null ? void 0 : _j.data()) - }; - for (const val of Object.values(t2)) { - if (!val) - return rawCoords; - } - const irisLDepth = LANDMARKS_REFINEMENT_LEFT_EYE_CONFIG.reduce((prev, curr) => prev += rawCoords[curr][2], 0) / LANDMARKS_REFINEMENT_LEFT_EYE_CONFIG.length; - for (let i = 0; i < t2.irisL.length / 2; i++) - rawCoords.push([t2.irisL[2 * i + 0], t2.irisL[2 * i + 1], irisLDepth]); - const irisRDepth = LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG.reduce((prev, curr) => prev += rawCoords[curr][2], 0) / LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG.length; - for (let i = 0; i < t2.irisR.length / 2; i++) - rawCoords.push([t2.irisR[2 * i + 0], t2.irisR[2 * i + 1], irisRDepth]); - for (let i = 0; i < t2.eyeL.length / 2; i++) - rawCoords[LANDMARKS_REFINEMENT_LEFT_EYE_CONFIG[i]] = [t2.eyeL[2 * i + 0], t2.eyeL[2 * i + 1], rawCoords[LANDMARKS_REFINEMENT_LEFT_EYE_CONFIG[i]][2]]; - for (let i = 0; i < t2.eyeR.length / 2; i++) - rawCoords[LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG[i]] = [t2.eyeR[2 * i + 0], t2.eyeR[2 * i + 1], rawCoords[LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG[i]][2]]; - for (let i = 0; i < t2.lips.length / 2; i++) - rawCoords[LANDMARKS_REFINEMENT_LIPS_CONFIG[i]] = [t2.lips[2 * i + 0], t2.lips[2 * i + 1], rawCoords[LANDMARKS_REFINEMENT_LIPS_CONFIG[i]][2]]; - return rawCoords; -} - -// src/face/facemesh.ts -var cache3 = { - boxes: [], - skipped: Number.MAX_SAFE_INTEGER, - timestamp: 0 -}; -var model7 = null; -var inputSize6 = 0; -async function predict6(input, config3) { - var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j; - if (!(model7 == null ? void 0 : model7["executor"])) - return []; - const skipTime = (((_a = config3.face.detector) == null ? void 0 : _a.skipTime) || 0) > now() - cache3.timestamp; - const skipFrame = cache3.skipped < (((_b = config3.face.detector) == null ? void 0 : _b.skipFrames) || 0); - if (!config3.skipAllowed || !skipTime || !skipFrame || cache3.boxes.length === 0) { - cache3.boxes = await getBoxes(input, config3); - cache3.timestamp = now(); - cache3.skipped = 0; - } else { - cache3.skipped++; - } - const faces = []; - const newCache = []; - let id = 0; - const size2 = inputSize6; - for (let i = 0; i < cache3.boxes.length; i++) { - const box = cache3.boxes[i]; - let angle = 0; - let rotationMatrix; - const face4 = { - id: id++, - mesh: [], - meshRaw: [], - box: [0, 0, 0, 0], - boxRaw: [0, 0, 0, 0], - score: 0, - boxScore: 0, - faceScore: 0, - annotations: {} - }; - [angle, rotationMatrix, face4.tensor] = correctFaceRotation((_c = config3.face.detector) == null ? void 0 : _c.rotation, box, input, ((_d = config3.face.mesh) == null ? void 0 : _d.enabled) ? inputSize6 : size()); - if (config3.filter.equalization) { - const equilized = face4.tensor ? await histogramEqualization(face4.tensor) : void 0; - tf15.dispose(face4.tensor); - if (equilized) - face4.tensor = equilized; - } - face4.boxScore = Math.round(100 * box.confidence) / 100; - if (!((_e = config3.face.mesh) == null ? void 0 : _e.enabled)) { - face4.box = clampBox(box, input); - face4.boxRaw = getRawBox(box, input); - face4.score = face4.boxScore; - face4.mesh = box.landmarks.map((pt) => [ - (box.startPoint[0] + box.endPoint[0]) / 2 + (box.endPoint[0] + box.startPoint[0]) * pt[0] / size(), - (box.startPoint[1] + box.endPoint[1]) / 2 + (box.endPoint[1] + box.startPoint[1]) * pt[1] / size() - ]); - face4.meshRaw = face4.mesh.map((pt) => [pt[0] / (input.shape[2] || 0), pt[1] / (input.shape[1] || 0), (pt[2] || 0) / size2]); - for (const key of Object.keys(blazeFaceLandmarks)) { - face4.annotations[key] = [face4.mesh[blazeFaceLandmarks[key]]]; - } - } else if (!model7) { - if (config3.debug) - log("face mesh detection requested, but model is not loaded"); - } else { - if (((_f = config3.face.attention) == null ? void 0 : _f.enabled) && !env.kernels.includes("atan2")) { - config3.face.attention.enabled = false; - tf15.dispose(face4.tensor); - return faces; - } - const results = model7.execute(face4.tensor); - const confidenceT = results.find((t2) => t2.shape[t2.shape.length - 1] === 1); - const faceConfidence = await confidenceT.data(); - face4.faceScore = Math.round(100 * faceConfidence[0]) / 100; - if (face4.faceScore < (((_g = config3.face.detector) == null ? void 0 : _g.minConfidence) || 1)) { - box.confidence = face4.faceScore; - if (config3.face.mesh.keepInvalid) { - face4.box = clampBox(box, input); - face4.boxRaw = getRawBox(box, input); - face4.score = face4.boxScore; - face4.mesh = box.landmarks.map((pt) => [ - (box.startPoint[0] + box.endPoint[0]) / 2 + (box.endPoint[0] + box.startPoint[0]) * pt[0] / size(), - (box.startPoint[1] + box.endPoint[1]) / 2 + (box.endPoint[1] + box.startPoint[1]) * pt[1] / size() - ]); - face4.meshRaw = face4.mesh.map((pt) => [pt[0] / (input.shape[2] || 1), pt[1] / (input.shape[1] || 1), (pt[2] || 0) / size2]); - for (const key of Object.keys(blazeFaceLandmarks)) { - face4.annotations[key] = [face4.mesh[blazeFaceLandmarks[key]]]; - } - } - } else { - const meshT = results.find((t2) => t2.shape[t2.shape.length - 1] === 1404); - const coordsReshaped = tf15.reshape(meshT, [-1, 3]); - let rawCoords = await coordsReshaped.array(); - tf15.dispose(coordsReshaped); - if ((_h = config3.face.attention) == null ? void 0 : _h.enabled) { - rawCoords = await augment(rawCoords, results); - } else if ((_i = config3.face.iris) == null ? void 0 : _i.enabled) { - rawCoords = await augmentIris(rawCoords, face4.tensor, inputSize6); - } - face4.mesh = transformRawCoords(rawCoords, box, angle, rotationMatrix, inputSize6); - face4.meshRaw = face4.mesh.map((pt) => [pt[0] / (input.shape[2] || 0), pt[1] / (input.shape[1] || 0), (pt[2] || 0) / size2]); - for (const key of Object.keys(meshAnnotations)) - face4.annotations[key] = meshAnnotations[key].map((index2) => face4.mesh[index2]); - face4.score = face4.faceScore; - const calculatedBox = { ...calculateFaceBox(face4.mesh, box), confidence: box.confidence, landmarks: box.landmarks }; - face4.box = clampBox(calculatedBox, input); - face4.boxRaw = getRawBox(calculatedBox, input); - newCache.push(calculatedBox); - } - tf15.dispose(results); - } - if (face4.score > (((_j = config3.face.detector) == null ? void 0 : _j.minConfidence) || 1)) - faces.push(face4); - else - tf15.dispose(face4.tensor); - } - cache3.boxes = newCache; - return faces; -} -async function load7(config3) { - var _a, _b, _c, _d, _e, _f; - if (env.initial) - model7 = null; - if (((_a = config3.face.attention) == null ? void 0 : _a.enabled) && (model7 == null ? void 0 : model7["signature"])) { - if (Object.keys(((_b = model7 == null ? void 0 : model7["signature"]) == null ? void 0 : _b.outputs) || {}).length < 6) - model7 = null; - } - if (!model7) { - if ((_c = config3.face.attention) == null ? void 0 : _c.enabled) - model7 = await loadModel(config3.face.attention.modelPath); - else - model7 = await loadModel((_d = config3.face.mesh) == null ? void 0 : _d.modelPath); - } else if (config3.debug) { - log("cached model:", model7["modelUrl"]); - } - inputSize6 = model7["executor"] && ((_e = model7 == null ? void 0 : model7.inputs) == null ? void 0 : _e[0].shape) ? (_f = model7 == null ? void 0 : model7.inputs) == null ? void 0 : _f[0].shape[2] : 256; - return model7; -} -var triangulation = TRI468; -var uvmap = UV468; - -// src/face/faceres.ts -var tf16 = __toESM(require_tfjs_esm()); -var model8; -var last4 = []; -var lastTime6 = 0; -var lastCount3 = 0; -var skipped6 = Number.MAX_SAFE_INTEGER; -async function load8(config3) { - var _a; - if (env.initial) - model8 = null; - if (!model8) - model8 = await loadModel((_a = config3.face.description) == null ? void 0 : _a.modelPath); - else if (config3.debug) - log("cached model:", model8["modelUrl"]); - return model8; -} -function enhance(input) { - const tensor6 = input.image || input.tensor || input; - if (!(model8 == null ? void 0 : model8.inputs[0].shape)) - return tensor6; - const crop = tf16.image.resizeBilinear(tensor6, [model8.inputs[0].shape[2], model8.inputs[0].shape[1]], false); - const norm = tf16.mul(crop, constants.tf255); - tf16.dispose(crop); - return norm; -} -async function predict7(image27, config3, idx, count2) { - var _a, _b, _c, _d; - const obj = { - age: 0, - gender: "unknown", - genderScore: 0, - descriptor: [] - }; - if (!(model8 == null ? void 0 : model8["executor"])) - return obj; - const skipFrame = skipped6 < (((_a = config3.face.description) == null ? void 0 : _a.skipFrames) || 0); - const skipTime = (((_b = config3.face.description) == null ? void 0 : _b.skipTime) || 0) > now() - lastTime6; - if (config3.skipAllowed && skipFrame && skipTime && lastCount3 === count2 && ((_c = last4 == null ? void 0 : last4[idx]) == null ? void 0 : _c.age) > 0 && ((_d = last4 == null ? void 0 : last4[idx]) == null ? void 0 : _d.genderScore) > 0) { - skipped6++; - return last4[idx]; - } - skipped6 = 0; - return new Promise(async (resolve) => { - var _a2; - if ((_a2 = config3.face.description) == null ? void 0 : _a2.enabled) { - const enhanced = enhance(image27); - const resT = model8 == null ? void 0 : model8.execute(enhanced); - lastTime6 = now(); - tf16.dispose(enhanced); - const genderT = resT.find((t2) => t2.shape[1] === 1); - const gender2 = await genderT.data(); - const confidence = Math.trunc(200 * Math.abs(gender2[0] - 0.5)) / 100; - if (confidence > (config3.face.description.minConfidence || 0)) { - obj.gender = gender2[0] <= 0.5 ? "female" : "male"; - obj.genderScore = Math.min(0.99, confidence); - } - const argmax = tf16.argMax(resT.find((t2) => t2.shape[1] === 100), 1); - const ageIdx = (await argmax.data())[0]; - tf16.dispose(argmax); - const ageT = resT.find((t2) => t2.shape[1] === 100); - const all2 = await ageT.data(); - obj.age = Math.round(all2[ageIdx - 1] > all2[ageIdx + 1] ? 10 * ageIdx - 100 * all2[ageIdx - 1] : 10 * ageIdx + 100 * all2[ageIdx + 1]) / 10; - if (Number.isNaN(gender2[0]) || Number.isNaN(all2[0])) - log("faceres error:", { model: model8, result: resT }); - const desc = resT.find((t2) => t2.shape[1] === 1024); - const descriptor = desc ? await desc.data() : []; - obj.descriptor = Array.from(descriptor); - resT.forEach((t2) => tf16.dispose(t2)); - } - last4[idx] = obj; - lastCount3 = count2; - resolve(obj); - }); -} - -// src/gear/gear.ts -var tf17 = __toESM(require_tfjs_esm()); -var model9; -var last5 = []; -var raceNames = ["white", "black", "asian", "indian", "other"]; -var ageWeights = [15, 23, 28, 35.5, 45.5, 55.5, 65]; -var lastCount4 = 0; -var lastTime7 = 0; -var skipped7 = Number.MAX_SAFE_INTEGER; -async function load9(config3) { - var _a; - if (env.initial) - model9 = null; - if (!model9) - model9 = await loadModel((_a = config3.face.gear) == null ? void 0 : _a.modelPath); - else if (config3.debug) - log("cached model:", model9["modelUrl"]); - return model9; -} -async function predict8(image27, config3, idx, count2) { - var _a, _b; - if (!model9) - return { age: 0, gender: "unknown", genderScore: 0, race: [] }; - const skipFrame = skipped7 < (((_a = config3.face.gear) == null ? void 0 : _a.skipFrames) || 0); - const skipTime = (((_b = config3.face.gear) == null ? void 0 : _b.skipTime) || 0) > now() - lastTime7; - if (config3.skipAllowed && skipTime && skipFrame && lastCount4 === count2 && last5[idx]) { - skipped7++; - return last5[idx]; - } - skipped7 = 0; - return new Promise(async (resolve) => { - var _a2, _b2; - if (!(model9 == null ? void 0 : model9.inputs[0].shape)) - return; - const t2 = {}; - const box = [[0, 0.1, 0.9, 0.9]]; - t2.resize = tf17.image.cropAndResize(image27, box, [0], [model9.inputs[0].shape[2], model9.inputs[0].shape[1]]); - const obj = { age: 0, gender: "unknown", genderScore: 0, race: [] }; - if ((_a2 = config3.face.gear) == null ? void 0 : _a2.enabled) - [t2.age, t2.gender, t2.race] = model9.execute(t2.resize, ["age_output", "gender_output", "race_output"]); - const gender2 = await t2.gender.data(); - obj.gender = gender2[0] > gender2[1] ? "male" : "female"; - obj.genderScore = Math.round(100 * (gender2[0] > gender2[1] ? gender2[0] : gender2[1])) / 100; - const race = await t2.race.data(); - for (let i = 0; i < race.length; i++) { - if (race[i] > (((_b2 = config3.face.gear) == null ? void 0 : _b2.minConfidence) || 0.2)) - obj.race.push({ score: Math.round(100 * race[i]) / 100, race: raceNames[i] }); - } - obj.race.sort((a, b) => b.score - a.score); - const ageDistribution = Array.from(await t2.age.data()); - const ageSorted = ageDistribution.map((a, i) => [ageWeights[i], a]).sort((a, b) => b[1] - a[1]); - let age2 = ageSorted[0][0]; - for (let i = 1; i < ageSorted.length; i++) - age2 += ageSorted[i][1] * (ageSorted[i][0] - age2); - obj.age = Math.round(10 * age2) / 10; - Object.keys(t2).forEach((tensor6) => tf17.dispose(t2[tensor6])); - last5[idx] = obj; - lastCount4 = count2; - lastTime7 = now(); - resolve(obj); - }); -} - -// src/hand/handposedetector.ts -var tf19 = __toESM(require_tfjs_esm()); - -// src/hand/handposeutil.ts -var tf18 = __toESM(require_tfjs_esm()); -function getBoxSize2(box) { - return [ - Math.abs(box.endPoint[0] - box.startPoint[0]), - Math.abs(box.endPoint[1] - box.startPoint[1]) - ]; -} -function getBoxCenter2(box) { - return [ - box.startPoint[0] + (box.endPoint[0] - box.startPoint[0]) / 2, - box.startPoint[1] + (box.endPoint[1] - box.startPoint[1]) / 2 - ]; -} -function cutBoxFromImageAndResize(box, image27, cropSize) { - const h = image27.shape[1]; - const w = image27.shape[2]; - const boxes = [[ - box.startPoint[1] / h, - box.startPoint[0] / w, - box.endPoint[1] / h, - box.endPoint[0] / w - ]]; - return tf18.image.cropAndResize(image27, boxes, [0], cropSize); -} -function scaleBoxCoordinates2(box, factor) { - const startPoint = [box.startPoint[0] * factor[0], box.startPoint[1] * factor[1]]; - const endPoint = [box.endPoint[0] * factor[0], box.endPoint[1] * factor[1]]; - const palmLandmarks = box.palmLandmarks.map((coord) => { - const scaledCoord = [coord[0] * factor[0], coord[1] * factor[1]]; - return scaledCoord; - }); - return { startPoint, endPoint, palmLandmarks, confidence: box.confidence }; -} -function enlargeBox2(box, factor = 1.5) { - const center = getBoxCenter2(box); - const size2 = getBoxSize2(box); - const newHalfSize = [factor * size2[0] / 2, factor * size2[1] / 2]; - const startPoint = [center[0] - newHalfSize[0], center[1] - newHalfSize[1]]; - const endPoint = [center[0] + newHalfSize[0], center[1] + newHalfSize[1]]; - return { startPoint, endPoint, palmLandmarks: box.palmLandmarks }; -} -function squarifyBox2(box) { - const centers = getBoxCenter2(box); - const size2 = getBoxSize2(box); - const maxEdge = Math.max(...size2); - const halfSize = maxEdge / 2; - const startPoint = [centers[0] - halfSize, centers[1] - halfSize]; - const endPoint = [centers[0] + halfSize, centers[1] + halfSize]; - return { startPoint, endPoint, palmLandmarks: box.palmLandmarks }; -} -function normalizeRadians2(angle) { - return angle - 2 * Math.PI * Math.floor((angle + Math.PI) / (2 * Math.PI)); -} -function computeRotation2(point1, point2) { - const radians = Math.PI / 2 - Math.atan2(-(point2[1] - point1[1]), point2[0] - point1[0]); - return normalizeRadians2(radians); -} -var buildTranslationMatrix2 = (x, y) => [[1, 0, x], [0, 1, y], [0, 0, 1]]; -function dot2(v1, v2) { - let product = 0; - for (let i = 0; i < v1.length; i++) { - product += v1[i] * v2[i]; - } - return product; -} -function getColumnFrom2DArr2(arr, columnIndex) { - const column = []; - for (let i = 0; i < arr.length; i++) { - column.push(arr[i][columnIndex]); - } - return column; -} -function multiplyTransformMatrices2(mat1, mat2) { - const product = []; - const size2 = mat1.length; - for (let row = 0; row < size2; row++) { - product.push([]); - for (let col = 0; col < size2; col++) { - product[row].push(dot2(mat1[row], getColumnFrom2DArr2(mat2, col))); - } - } - return product; -} -function buildRotationMatrix2(rotation, center) { - const cosA = Math.cos(rotation); - const sinA = Math.sin(rotation); - const rotationMatrix = [[cosA, -sinA, 0], [sinA, cosA, 0], [0, 0, 1]]; - const translationMatrix = buildTranslationMatrix2(center[0], center[1]); - const translationTimesRotation = multiplyTransformMatrices2(translationMatrix, rotationMatrix); - const negativeTranslationMatrix = buildTranslationMatrix2(-center[0], -center[1]); - return multiplyTransformMatrices2(translationTimesRotation, negativeTranslationMatrix); -} -function invertTransformMatrix2(matrix) { - const rotationComponent = [[matrix[0][0], matrix[1][0]], [matrix[0][1], matrix[1][1]]]; - const translationComponent = [matrix[0][2], matrix[1][2]]; - const invertedTranslation = [ - -dot2(rotationComponent[0], translationComponent), - -dot2(rotationComponent[1], translationComponent) - ]; - return [ - rotationComponent[0].concat(invertedTranslation[0]), - rotationComponent[1].concat(invertedTranslation[1]), - [0, 0, 1] - ]; -} -function rotatePoint2(homogeneousCoordinate, rotationMatrix) { - return [ - dot2(homogeneousCoordinate, rotationMatrix[0]), - dot2(homogeneousCoordinate, rotationMatrix[1]) - ]; -} - -// src/hand/handposeanchors.ts -var anchors2 = [ - { x: 0.015625, y: 0.015625 }, - { x: 0.015625, y: 0.015625 }, - { x: 0.046875, y: 0.015625 }, - { x: 0.046875, y: 0.015625 }, - { x: 0.078125, y: 0.015625 }, - { x: 0.078125, y: 0.015625 }, - { x: 0.109375, y: 0.015625 }, - { x: 0.109375, y: 0.015625 }, - { x: 0.140625, y: 0.015625 }, - { x: 0.140625, y: 0.015625 }, - { x: 0.171875, y: 0.015625 }, - { x: 0.171875, y: 0.015625 }, - { x: 0.203125, y: 0.015625 }, - { x: 0.203125, y: 0.015625 }, - { x: 0.234375, y: 0.015625 }, - { x: 0.234375, y: 0.015625 }, - { x: 0.265625, y: 0.015625 }, - { x: 0.265625, y: 0.015625 }, - { x: 0.296875, y: 0.015625 }, - { x: 0.296875, y: 0.015625 }, - { x: 0.328125, y: 0.015625 }, - { x: 0.328125, y: 0.015625 }, - { x: 0.359375, y: 0.015625 }, - { x: 0.359375, y: 0.015625 }, - { x: 0.390625, y: 0.015625 }, - { x: 0.390625, y: 0.015625 }, - { x: 0.421875, y: 0.015625 }, - { x: 0.421875, y: 0.015625 }, - { x: 0.453125, y: 0.015625 }, - { x: 0.453125, y: 0.015625 }, - { x: 0.484375, y: 0.015625 }, - { x: 0.484375, y: 0.015625 }, - { x: 0.515625, y: 0.015625 }, - { x: 0.515625, y: 0.015625 }, - { x: 0.546875, y: 0.015625 }, - { x: 0.546875, y: 0.015625 }, - { x: 0.578125, y: 0.015625 }, - { x: 0.578125, y: 0.015625 }, - { x: 0.609375, y: 0.015625 }, - { x: 0.609375, y: 0.015625 }, - { x: 0.640625, y: 0.015625 }, - { x: 0.640625, y: 0.015625 }, - { x: 0.671875, y: 0.015625 }, - { x: 0.671875, y: 0.015625 }, - { x: 0.703125, y: 0.015625 }, - { x: 0.703125, y: 0.015625 }, - { x: 0.734375, y: 0.015625 }, - { x: 0.734375, y: 0.015625 }, - { x: 0.765625, y: 0.015625 }, - { x: 0.765625, y: 0.015625 }, - { x: 0.796875, y: 0.015625 }, - { x: 0.796875, y: 0.015625 }, - { x: 0.828125, y: 0.015625 }, - { x: 0.828125, y: 0.015625 }, - { x: 0.859375, y: 0.015625 }, - { x: 0.859375, y: 0.015625 }, - { x: 0.890625, y: 0.015625 }, - { x: 0.890625, y: 0.015625 }, - { x: 0.921875, y: 0.015625 }, - { x: 0.921875, y: 0.015625 }, - { x: 0.953125, y: 0.015625 }, - { x: 0.953125, y: 0.015625 }, - { x: 0.984375, y: 0.015625 }, - { x: 0.984375, y: 0.015625 }, - { x: 0.015625, y: 0.046875 }, - { x: 0.015625, y: 0.046875 }, - { x: 0.046875, y: 0.046875 }, - { x: 0.046875, y: 0.046875 }, - { x: 0.078125, y: 0.046875 }, - { x: 0.078125, y: 0.046875 }, - { x: 0.109375, y: 0.046875 }, - { x: 0.109375, y: 0.046875 }, - { x: 0.140625, y: 0.046875 }, - { x: 0.140625, y: 0.046875 }, - { x: 0.171875, y: 0.046875 }, - { x: 0.171875, y: 0.046875 }, - { x: 0.203125, y: 0.046875 }, - { x: 0.203125, y: 0.046875 }, - { x: 0.234375, y: 0.046875 }, - { x: 0.234375, y: 0.046875 }, - { x: 0.265625, y: 0.046875 }, - { x: 0.265625, y: 0.046875 }, - { x: 0.296875, y: 0.046875 }, - { x: 0.296875, y: 0.046875 }, - { x: 0.328125, y: 0.046875 }, - { x: 0.328125, y: 0.046875 }, - { x: 0.359375, y: 0.046875 }, - { x: 0.359375, y: 0.046875 }, - { x: 0.390625, y: 0.046875 }, - { x: 0.390625, y: 0.046875 }, - { x: 0.421875, y: 0.046875 }, - { x: 0.421875, y: 0.046875 }, - { x: 0.453125, y: 0.046875 }, - { x: 0.453125, y: 0.046875 }, - { x: 0.484375, y: 0.046875 }, - { x: 0.484375, y: 0.046875 }, - { x: 0.515625, y: 0.046875 }, - { x: 0.515625, y: 0.046875 }, - { x: 0.546875, y: 0.046875 }, - { x: 0.546875, y: 0.046875 }, - { x: 0.578125, y: 0.046875 }, - { x: 0.578125, y: 0.046875 }, - { x: 0.609375, y: 0.046875 }, - { x: 0.609375, y: 0.046875 }, - { x: 0.640625, y: 0.046875 }, - { x: 0.640625, y: 0.046875 }, - { x: 0.671875, y: 0.046875 }, - { x: 0.671875, y: 0.046875 }, - { x: 0.703125, y: 0.046875 }, - { x: 0.703125, y: 0.046875 }, - { x: 0.734375, y: 0.046875 }, - { x: 0.734375, y: 0.046875 }, - { x: 0.765625, y: 0.046875 }, - { x: 0.765625, y: 0.046875 }, - { x: 0.796875, y: 0.046875 }, - { x: 0.796875, y: 0.046875 }, - { x: 0.828125, y: 0.046875 }, - { x: 0.828125, y: 0.046875 }, - { x: 0.859375, y: 0.046875 }, - { x: 0.859375, y: 0.046875 }, - { x: 0.890625, y: 0.046875 }, - { x: 0.890625, y: 0.046875 }, - { x: 0.921875, y: 0.046875 }, - { x: 0.921875, y: 0.046875 }, - { x: 0.953125, y: 0.046875 }, - { x: 0.953125, y: 0.046875 }, - { x: 0.984375, y: 0.046875 }, - { x: 0.984375, y: 0.046875 }, - { x: 0.015625, y: 0.078125 }, - { x: 0.015625, y: 0.078125 }, - { x: 0.046875, y: 0.078125 }, - { x: 0.046875, y: 0.078125 }, - { x: 0.078125, y: 0.078125 }, - { x: 0.078125, y: 0.078125 }, - { x: 0.109375, y: 0.078125 }, - { x: 0.109375, y: 0.078125 }, - { x: 0.140625, y: 0.078125 }, - { x: 0.140625, y: 0.078125 }, - { x: 0.171875, y: 0.078125 }, - { x: 0.171875, y: 0.078125 }, - { x: 0.203125, y: 0.078125 }, - { x: 0.203125, y: 0.078125 }, - { x: 0.234375, y: 0.078125 }, - { x: 0.234375, y: 0.078125 }, - { x: 0.265625, y: 0.078125 }, - { x: 0.265625, y: 0.078125 }, - { x: 0.296875, y: 0.078125 }, - { x: 0.296875, y: 0.078125 }, - { x: 0.328125, y: 0.078125 }, - { x: 0.328125, y: 0.078125 }, - { x: 0.359375, y: 0.078125 }, - { x: 0.359375, y: 0.078125 }, - { x: 0.390625, y: 0.078125 }, - { x: 0.390625, y: 0.078125 }, - { x: 0.421875, y: 0.078125 }, - { x: 0.421875, y: 0.078125 }, - { x: 0.453125, y: 0.078125 }, - { x: 0.453125, y: 0.078125 }, - { x: 0.484375, y: 0.078125 }, - { x: 0.484375, y: 0.078125 }, - { x: 0.515625, y: 0.078125 }, - { x: 0.515625, y: 0.078125 }, - { x: 0.546875, y: 0.078125 }, - { x: 0.546875, y: 0.078125 }, - { x: 0.578125, y: 0.078125 }, - { x: 0.578125, y: 0.078125 }, - { x: 0.609375, y: 0.078125 }, - { x: 0.609375, y: 0.078125 }, - { x: 0.640625, y: 0.078125 }, - { x: 0.640625, y: 0.078125 }, - { x: 0.671875, y: 0.078125 }, - { x: 0.671875, y: 0.078125 }, - { x: 0.703125, y: 0.078125 }, - { x: 0.703125, y: 0.078125 }, - { x: 0.734375, y: 0.078125 }, - { x: 0.734375, y: 0.078125 }, - { x: 0.765625, y: 0.078125 }, - { x: 0.765625, y: 0.078125 }, - { x: 0.796875, y: 0.078125 }, - { x: 0.796875, y: 0.078125 }, - { x: 0.828125, y: 0.078125 }, - { x: 0.828125, y: 0.078125 }, - { x: 0.859375, y: 0.078125 }, - { x: 0.859375, y: 0.078125 }, - { x: 0.890625, y: 0.078125 }, - { x: 0.890625, y: 0.078125 }, - { x: 0.921875, y: 0.078125 }, - { x: 0.921875, y: 0.078125 }, - { x: 0.953125, y: 0.078125 }, - { x: 0.953125, y: 0.078125 }, - { x: 0.984375, y: 0.078125 }, - { x: 0.984375, y: 0.078125 }, - { x: 0.015625, y: 0.109375 }, - { x: 0.015625, y: 0.109375 }, - { x: 0.046875, y: 0.109375 }, - { x: 0.046875, y: 0.109375 }, - { x: 0.078125, y: 0.109375 }, - { x: 0.078125, y: 0.109375 }, - { x: 0.109375, y: 0.109375 }, - { x: 0.109375, y: 0.109375 }, - { x: 0.140625, y: 0.109375 }, - { x: 0.140625, y: 0.109375 }, - { x: 0.171875, y: 0.109375 }, - { x: 0.171875, y: 0.109375 }, - { x: 0.203125, y: 0.109375 }, - { x: 0.203125, y: 0.109375 }, - { x: 0.234375, y: 0.109375 }, - { x: 0.234375, y: 0.109375 }, - { x: 0.265625, y: 0.109375 }, - { x: 0.265625, y: 0.109375 }, - { x: 0.296875, y: 0.109375 }, - { x: 0.296875, y: 0.109375 }, - { x: 0.328125, y: 0.109375 }, - { x: 0.328125, y: 0.109375 }, - { x: 0.359375, y: 0.109375 }, - { x: 0.359375, y: 0.109375 }, - { x: 0.390625, y: 0.109375 }, - { x: 0.390625, y: 0.109375 }, - { x: 0.421875, y: 0.109375 }, - { x: 0.421875, y: 0.109375 }, - { x: 0.453125, y: 0.109375 }, - { x: 0.453125, y: 0.109375 }, - { x: 0.484375, y: 0.109375 }, - { x: 0.484375, y: 0.109375 }, - { x: 0.515625, y: 0.109375 }, - { x: 0.515625, y: 0.109375 }, - { x: 0.546875, y: 0.109375 }, - { x: 0.546875, y: 0.109375 }, - { x: 0.578125, y: 0.109375 }, - { x: 0.578125, y: 0.109375 }, - { x: 0.609375, y: 0.109375 }, - { x: 0.609375, y: 0.109375 }, - { x: 0.640625, y: 0.109375 }, - { x: 0.640625, y: 0.109375 }, - { x: 0.671875, y: 0.109375 }, - { x: 0.671875, y: 0.109375 }, - { x: 0.703125, y: 0.109375 }, - { x: 0.703125, y: 0.109375 }, - { x: 0.734375, y: 0.109375 }, - { x: 0.734375, y: 0.109375 }, - { x: 0.765625, y: 0.109375 }, - { x: 0.765625, y: 0.109375 }, - { x: 0.796875, y: 0.109375 }, - { x: 0.796875, y: 0.109375 }, - { x: 0.828125, y: 0.109375 }, - { x: 0.828125, y: 0.109375 }, - { x: 0.859375, y: 0.109375 }, - { x: 0.859375, y: 0.109375 }, - { x: 0.890625, y: 0.109375 }, - { x: 0.890625, y: 0.109375 }, - { x: 0.921875, y: 0.109375 }, - { x: 0.921875, y: 0.109375 }, - { x: 0.953125, y: 0.109375 }, - { x: 0.953125, y: 0.109375 }, - { x: 0.984375, y: 0.109375 }, - { x: 0.984375, y: 0.109375 }, - { x: 0.015625, y: 0.140625 }, - { x: 0.015625, y: 0.140625 }, - { x: 0.046875, y: 0.140625 }, - { x: 0.046875, y: 0.140625 }, - { x: 0.078125, y: 0.140625 }, - { x: 0.078125, y: 0.140625 }, - { x: 0.109375, y: 0.140625 }, - { x: 0.109375, y: 0.140625 }, - { x: 0.140625, y: 0.140625 }, - { x: 0.140625, y: 0.140625 }, - { x: 0.171875, y: 0.140625 }, - { x: 0.171875, y: 0.140625 }, - { x: 0.203125, y: 0.140625 }, - { x: 0.203125, y: 0.140625 }, - { x: 0.234375, y: 0.140625 }, - { x: 0.234375, y: 0.140625 }, - { x: 0.265625, y: 0.140625 }, - { x: 0.265625, y: 0.140625 }, - { x: 0.296875, y: 0.140625 }, - { x: 0.296875, y: 0.140625 }, - { x: 0.328125, y: 0.140625 }, - { x: 0.328125, y: 0.140625 }, - { x: 0.359375, y: 0.140625 }, - { x: 0.359375, y: 0.140625 }, - { x: 0.390625, y: 0.140625 }, - { x: 0.390625, y: 0.140625 }, - { x: 0.421875, y: 0.140625 }, - { x: 0.421875, y: 0.140625 }, - { x: 0.453125, y: 0.140625 }, - { x: 0.453125, y: 0.140625 }, - { x: 0.484375, y: 0.140625 }, - { x: 0.484375, y: 0.140625 }, - { x: 0.515625, y: 0.140625 }, - { x: 0.515625, y: 0.140625 }, - { x: 0.546875, y: 0.140625 }, - { x: 0.546875, y: 0.140625 }, - { x: 0.578125, y: 0.140625 }, - { x: 0.578125, y: 0.140625 }, - { x: 0.609375, y: 0.140625 }, - { x: 0.609375, y: 0.140625 }, - { x: 0.640625, y: 0.140625 }, - { x: 0.640625, y: 0.140625 }, - { x: 0.671875, y: 0.140625 }, - { x: 0.671875, y: 0.140625 }, - { x: 0.703125, y: 0.140625 }, - { x: 0.703125, y: 0.140625 }, - { x: 0.734375, y: 0.140625 }, - { x: 0.734375, y: 0.140625 }, - { x: 0.765625, y: 0.140625 }, - { x: 0.765625, y: 0.140625 }, - { x: 0.796875, y: 0.140625 }, - { x: 0.796875, y: 0.140625 }, - { x: 0.828125, y: 0.140625 }, - { x: 0.828125, y: 0.140625 }, - { x: 0.859375, y: 0.140625 }, - { x: 0.859375, y: 0.140625 }, - { x: 0.890625, y: 0.140625 }, - { x: 0.890625, y: 0.140625 }, - { x: 0.921875, y: 0.140625 }, - { x: 0.921875, y: 0.140625 }, - { x: 0.953125, y: 0.140625 }, - { x: 0.953125, y: 0.140625 }, - { x: 0.984375, y: 0.140625 }, - { x: 0.984375, y: 0.140625 }, - { x: 0.015625, y: 0.171875 }, - { x: 0.015625, y: 0.171875 }, - { x: 0.046875, y: 0.171875 }, - { x: 0.046875, y: 0.171875 }, - { x: 0.078125, y: 0.171875 }, - { x: 0.078125, y: 0.171875 }, - { x: 0.109375, y: 0.171875 }, - { x: 0.109375, y: 0.171875 }, - { x: 0.140625, y: 0.171875 }, - { x: 0.140625, y: 0.171875 }, - { x: 0.171875, y: 0.171875 }, - { x: 0.171875, y: 0.171875 }, - { x: 0.203125, y: 0.171875 }, - { x: 0.203125, y: 0.171875 }, - { x: 0.234375, y: 0.171875 }, - { x: 0.234375, y: 0.171875 }, - { x: 0.265625, y: 0.171875 }, - { x: 0.265625, y: 0.171875 }, - { x: 0.296875, y: 0.171875 }, - { x: 0.296875, y: 0.171875 }, - { x: 0.328125, y: 0.171875 }, - { x: 0.328125, y: 0.171875 }, - { x: 0.359375, y: 0.171875 }, - { x: 0.359375, y: 0.171875 }, - { x: 0.390625, y: 0.171875 }, - { x: 0.390625, y: 0.171875 }, - { x: 0.421875, y: 0.171875 }, - { x: 0.421875, y: 0.171875 }, - { x: 0.453125, y: 0.171875 }, - { x: 0.453125, y: 0.171875 }, - { x: 0.484375, y: 0.171875 }, - { x: 0.484375, y: 0.171875 }, - { x: 0.515625, y: 0.171875 }, - { x: 0.515625, y: 0.171875 }, - { x: 0.546875, y: 0.171875 }, - { x: 0.546875, y: 0.171875 }, - { x: 0.578125, y: 0.171875 }, - { x: 0.578125, y: 0.171875 }, - { x: 0.609375, y: 0.171875 }, - { x: 0.609375, y: 0.171875 }, - { x: 0.640625, y: 0.171875 }, - { x: 0.640625, y: 0.171875 }, - { x: 0.671875, y: 0.171875 }, - { x: 0.671875, y: 0.171875 }, - { x: 0.703125, y: 0.171875 }, - { x: 0.703125, y: 0.171875 }, - { x: 0.734375, y: 0.171875 }, - { x: 0.734375, y: 0.171875 }, - { x: 0.765625, y: 0.171875 }, - { x: 0.765625, y: 0.171875 }, - { x: 0.796875, y: 0.171875 }, - { x: 0.796875, y: 0.171875 }, - { x: 0.828125, y: 0.171875 }, - { x: 0.828125, y: 0.171875 }, - { x: 0.859375, y: 0.171875 }, - { x: 0.859375, y: 0.171875 }, - { x: 0.890625, y: 0.171875 }, - { x: 0.890625, y: 0.171875 }, - { x: 0.921875, y: 0.171875 }, - { x: 0.921875, y: 0.171875 }, - { x: 0.953125, y: 0.171875 }, - { x: 0.953125, y: 0.171875 }, - { x: 0.984375, y: 0.171875 }, - { x: 0.984375, y: 0.171875 }, - { x: 0.015625, y: 0.203125 }, - { x: 0.015625, y: 0.203125 }, - { x: 0.046875, y: 0.203125 }, - { x: 0.046875, y: 0.203125 }, - { x: 0.078125, y: 0.203125 }, - { x: 0.078125, y: 0.203125 }, - { x: 0.109375, y: 0.203125 }, - { x: 0.109375, y: 0.203125 }, - { x: 0.140625, y: 0.203125 }, - { x: 0.140625, y: 0.203125 }, - { x: 0.171875, y: 0.203125 }, - { x: 0.171875, y: 0.203125 }, - { x: 0.203125, y: 0.203125 }, - { x: 0.203125, y: 0.203125 }, - { x: 0.234375, y: 0.203125 }, - { x: 0.234375, y: 0.203125 }, - { x: 0.265625, y: 0.203125 }, - { x: 0.265625, y: 0.203125 }, - { x: 0.296875, y: 0.203125 }, - { x: 0.296875, y: 0.203125 }, - { x: 0.328125, y: 0.203125 }, - { x: 0.328125, y: 0.203125 }, - { x: 0.359375, y: 0.203125 }, - { x: 0.359375, y: 0.203125 }, - { x: 0.390625, y: 0.203125 }, - { x: 0.390625, y: 0.203125 }, - { x: 0.421875, y: 0.203125 }, - { x: 0.421875, y: 0.203125 }, - { x: 0.453125, y: 0.203125 }, - { x: 0.453125, y: 0.203125 }, - { x: 0.484375, y: 0.203125 }, - { x: 0.484375, y: 0.203125 }, - { x: 0.515625, y: 0.203125 }, - { x: 0.515625, y: 0.203125 }, - { x: 0.546875, y: 0.203125 }, - { x: 0.546875, y: 0.203125 }, - { x: 0.578125, y: 0.203125 }, - { x: 0.578125, y: 0.203125 }, - { x: 0.609375, y: 0.203125 }, - { x: 0.609375, y: 0.203125 }, - { x: 0.640625, y: 0.203125 }, - { x: 0.640625, y: 0.203125 }, - { x: 0.671875, y: 0.203125 }, - { x: 0.671875, y: 0.203125 }, - { x: 0.703125, y: 0.203125 }, - { x: 0.703125, y: 0.203125 }, - { x: 0.734375, y: 0.203125 }, - { x: 0.734375, y: 0.203125 }, - { x: 0.765625, y: 0.203125 }, - { x: 0.765625, y: 0.203125 }, - { x: 0.796875, y: 0.203125 }, - { x: 0.796875, y: 0.203125 }, - { x: 0.828125, y: 0.203125 }, - { x: 0.828125, y: 0.203125 }, - { x: 0.859375, y: 0.203125 }, - { x: 0.859375, y: 0.203125 }, - { x: 0.890625, y: 0.203125 }, - { x: 0.890625, y: 0.203125 }, - { x: 0.921875, y: 0.203125 }, - { x: 0.921875, y: 0.203125 }, - { x: 0.953125, y: 0.203125 }, - { x: 0.953125, y: 0.203125 }, - { x: 0.984375, y: 0.203125 }, - { x: 0.984375, y: 0.203125 }, - { x: 0.015625, y: 0.234375 }, - { x: 0.015625, y: 0.234375 }, - { x: 0.046875, y: 0.234375 }, - { x: 0.046875, y: 0.234375 }, - { x: 0.078125, y: 0.234375 }, - { x: 0.078125, y: 0.234375 }, - { x: 0.109375, y: 0.234375 }, - { x: 0.109375, y: 0.234375 }, - { x: 0.140625, y: 0.234375 }, - { x: 0.140625, y: 0.234375 }, - { x: 0.171875, y: 0.234375 }, - { x: 0.171875, y: 0.234375 }, - { x: 0.203125, y: 0.234375 }, - { x: 0.203125, y: 0.234375 }, - { x: 0.234375, y: 0.234375 }, - { x: 0.234375, y: 0.234375 }, - { x: 0.265625, y: 0.234375 }, - { x: 0.265625, y: 0.234375 }, - { x: 0.296875, y: 0.234375 }, - { x: 0.296875, y: 0.234375 }, - { x: 0.328125, y: 0.234375 }, - { x: 0.328125, y: 0.234375 }, - { x: 0.359375, y: 0.234375 }, - { x: 0.359375, y: 0.234375 }, - { x: 0.390625, y: 0.234375 }, - { x: 0.390625, y: 0.234375 }, - { x: 0.421875, y: 0.234375 }, - { x: 0.421875, y: 0.234375 }, - { x: 0.453125, y: 0.234375 }, - { x: 0.453125, y: 0.234375 }, - { x: 0.484375, y: 0.234375 }, - { x: 0.484375, y: 0.234375 }, - { x: 0.515625, y: 0.234375 }, - { x: 0.515625, y: 0.234375 }, - { x: 0.546875, y: 0.234375 }, - { x: 0.546875, y: 0.234375 }, - { x: 0.578125, y: 0.234375 }, - { x: 0.578125, y: 0.234375 }, - { x: 0.609375, y: 0.234375 }, - { x: 0.609375, y: 0.234375 }, - { x: 0.640625, y: 0.234375 }, - { x: 0.640625, y: 0.234375 }, - { x: 0.671875, y: 0.234375 }, - { x: 0.671875, y: 0.234375 }, - { x: 0.703125, y: 0.234375 }, - { x: 0.703125, y: 0.234375 }, - { x: 0.734375, y: 0.234375 }, - { x: 0.734375, y: 0.234375 }, - { x: 0.765625, y: 0.234375 }, - { x: 0.765625, y: 0.234375 }, - { x: 0.796875, y: 0.234375 }, - { x: 0.796875, y: 0.234375 }, - { x: 0.828125, y: 0.234375 }, - { x: 0.828125, y: 0.234375 }, - { x: 0.859375, y: 0.234375 }, - { x: 0.859375, y: 0.234375 }, - { x: 0.890625, y: 0.234375 }, - { x: 0.890625, y: 0.234375 }, - { x: 0.921875, y: 0.234375 }, - { x: 0.921875, y: 0.234375 }, - { x: 0.953125, y: 0.234375 }, - { x: 0.953125, y: 0.234375 }, - { x: 0.984375, y: 0.234375 }, - { x: 0.984375, y: 0.234375 }, - { x: 0.015625, y: 0.265625 }, - { x: 0.015625, y: 0.265625 }, - { x: 0.046875, y: 0.265625 }, - { x: 0.046875, y: 0.265625 }, - { x: 0.078125, y: 0.265625 }, - { x: 0.078125, y: 0.265625 }, - { x: 0.109375, y: 0.265625 }, - { x: 0.109375, y: 0.265625 }, - { x: 0.140625, y: 0.265625 }, - { x: 0.140625, y: 0.265625 }, - { x: 0.171875, y: 0.265625 }, - { x: 0.171875, y: 0.265625 }, - { x: 0.203125, y: 0.265625 }, - { x: 0.203125, y: 0.265625 }, - { x: 0.234375, y: 0.265625 }, - { x: 0.234375, y: 0.265625 }, - { x: 0.265625, y: 0.265625 }, - { x: 0.265625, y: 0.265625 }, - { x: 0.296875, y: 0.265625 }, - { x: 0.296875, y: 0.265625 }, - { x: 0.328125, y: 0.265625 }, - { x: 0.328125, y: 0.265625 }, - { x: 0.359375, y: 0.265625 }, - { x: 0.359375, y: 0.265625 }, - { x: 0.390625, y: 0.265625 }, - { x: 0.390625, y: 0.265625 }, - { x: 0.421875, y: 0.265625 }, - { x: 0.421875, y: 0.265625 }, - { x: 0.453125, y: 0.265625 }, - { x: 0.453125, y: 0.265625 }, - { x: 0.484375, y: 0.265625 }, - { x: 0.484375, y: 0.265625 }, - { x: 0.515625, y: 0.265625 }, - { x: 0.515625, y: 0.265625 }, - { x: 0.546875, y: 0.265625 }, - { x: 0.546875, y: 0.265625 }, - { x: 0.578125, y: 0.265625 }, - { x: 0.578125, y: 0.265625 }, - { x: 0.609375, y: 0.265625 }, - { x: 0.609375, y: 0.265625 }, - { x: 0.640625, y: 0.265625 }, - { x: 0.640625, y: 0.265625 }, - { x: 0.671875, y: 0.265625 }, - { x: 0.671875, y: 0.265625 }, - { x: 0.703125, y: 0.265625 }, - { x: 0.703125, y: 0.265625 }, - { x: 0.734375, y: 0.265625 }, - { x: 0.734375, y: 0.265625 }, - { x: 0.765625, y: 0.265625 }, - { x: 0.765625, y: 0.265625 }, - { x: 0.796875, y: 0.265625 }, - { x: 0.796875, y: 0.265625 }, - { x: 0.828125, y: 0.265625 }, - { x: 0.828125, y: 0.265625 }, - { x: 0.859375, y: 0.265625 }, - { x: 0.859375, y: 0.265625 }, - { x: 0.890625, y: 0.265625 }, - { x: 0.890625, y: 0.265625 }, - { x: 0.921875, y: 0.265625 }, - { x: 0.921875, y: 0.265625 }, - { x: 0.953125, y: 0.265625 }, - { x: 0.953125, y: 0.265625 }, - { x: 0.984375, y: 0.265625 }, - { x: 0.984375, y: 0.265625 }, - { x: 0.015625, y: 0.296875 }, - { x: 0.015625, y: 0.296875 }, - { x: 0.046875, y: 0.296875 }, - { x: 0.046875, y: 0.296875 }, - { x: 0.078125, y: 0.296875 }, - { x: 0.078125, y: 0.296875 }, - { x: 0.109375, y: 0.296875 }, - { x: 0.109375, y: 0.296875 }, - { x: 0.140625, y: 0.296875 }, - { x: 0.140625, y: 0.296875 }, - { x: 0.171875, y: 0.296875 }, - { x: 0.171875, y: 0.296875 }, - { x: 0.203125, y: 0.296875 }, - { x: 0.203125, y: 0.296875 }, - { x: 0.234375, y: 0.296875 }, - { x: 0.234375, y: 0.296875 }, - { x: 0.265625, y: 0.296875 }, - { x: 0.265625, y: 0.296875 }, - { x: 0.296875, y: 0.296875 }, - { x: 0.296875, y: 0.296875 }, - { x: 0.328125, y: 0.296875 }, - { x: 0.328125, y: 0.296875 }, - { x: 0.359375, y: 0.296875 }, - { x: 0.359375, y: 0.296875 }, - { x: 0.390625, y: 0.296875 }, - { x: 0.390625, y: 0.296875 }, - { x: 0.421875, y: 0.296875 }, - { x: 0.421875, y: 0.296875 }, - { x: 0.453125, y: 0.296875 }, - { x: 0.453125, y: 0.296875 }, - { x: 0.484375, y: 0.296875 }, - { x: 0.484375, y: 0.296875 }, - { x: 0.515625, y: 0.296875 }, - { x: 0.515625, y: 0.296875 }, - { x: 0.546875, y: 0.296875 }, - { x: 0.546875, y: 0.296875 }, - { x: 0.578125, y: 0.296875 }, - { x: 0.578125, y: 0.296875 }, - { x: 0.609375, y: 0.296875 }, - { x: 0.609375, y: 0.296875 }, - { x: 0.640625, y: 0.296875 }, - { x: 0.640625, y: 0.296875 }, - { x: 0.671875, y: 0.296875 }, - { x: 0.671875, y: 0.296875 }, - { x: 0.703125, y: 0.296875 }, - { x: 0.703125, y: 0.296875 }, - { x: 0.734375, y: 0.296875 }, - { x: 0.734375, y: 0.296875 }, - { x: 0.765625, y: 0.296875 }, - { x: 0.765625, y: 0.296875 }, - { x: 0.796875, y: 0.296875 }, - { x: 0.796875, y: 0.296875 }, - { x: 0.828125, y: 0.296875 }, - { x: 0.828125, y: 0.296875 }, - { x: 0.859375, y: 0.296875 }, - { x: 0.859375, y: 0.296875 }, - { x: 0.890625, y: 0.296875 }, - { x: 0.890625, y: 0.296875 }, - { x: 0.921875, y: 0.296875 }, - { x: 0.921875, y: 0.296875 }, - { x: 0.953125, y: 0.296875 }, - { x: 0.953125, y: 0.296875 }, - { x: 0.984375, y: 0.296875 }, - { x: 0.984375, y: 0.296875 }, - { x: 0.015625, y: 0.328125 }, - { x: 0.015625, y: 0.328125 }, - { x: 0.046875, y: 0.328125 }, - { x: 0.046875, y: 0.328125 }, - { x: 0.078125, y: 0.328125 }, - { x: 0.078125, y: 0.328125 }, - { x: 0.109375, y: 0.328125 }, - { x: 0.109375, y: 0.328125 }, - { x: 0.140625, y: 0.328125 }, - { x: 0.140625, y: 0.328125 }, - { x: 0.171875, y: 0.328125 }, - { x: 0.171875, y: 0.328125 }, - { x: 0.203125, y: 0.328125 }, - { x: 0.203125, y: 0.328125 }, - { x: 0.234375, y: 0.328125 }, - { x: 0.234375, y: 0.328125 }, - { x: 0.265625, y: 0.328125 }, - { x: 0.265625, y: 0.328125 }, - { x: 0.296875, y: 0.328125 }, - { x: 0.296875, y: 0.328125 }, - { x: 0.328125, y: 0.328125 }, - { x: 0.328125, y: 0.328125 }, - { x: 0.359375, y: 0.328125 }, - { x: 0.359375, y: 0.328125 }, - { x: 0.390625, y: 0.328125 }, - { x: 0.390625, y: 0.328125 }, - { x: 0.421875, y: 0.328125 }, - { x: 0.421875, y: 0.328125 }, - { x: 0.453125, y: 0.328125 }, - { x: 0.453125, y: 0.328125 }, - { x: 0.484375, y: 0.328125 }, - { x: 0.484375, y: 0.328125 }, - { x: 0.515625, y: 0.328125 }, - { x: 0.515625, y: 0.328125 }, - { x: 0.546875, y: 0.328125 }, - { x: 0.546875, y: 0.328125 }, - { x: 0.578125, y: 0.328125 }, - { x: 0.578125, y: 0.328125 }, - { x: 0.609375, y: 0.328125 }, - { x: 0.609375, y: 0.328125 }, - { x: 0.640625, y: 0.328125 }, - { x: 0.640625, y: 0.328125 }, - { x: 0.671875, y: 0.328125 }, - { x: 0.671875, y: 0.328125 }, - { x: 0.703125, y: 0.328125 }, - { x: 0.703125, y: 0.328125 }, - { x: 0.734375, y: 0.328125 }, - { x: 0.734375, y: 0.328125 }, - { x: 0.765625, y: 0.328125 }, - { x: 0.765625, y: 0.328125 }, - { x: 0.796875, y: 0.328125 }, - { x: 0.796875, y: 0.328125 }, - { x: 0.828125, y: 0.328125 }, - { x: 0.828125, y: 0.328125 }, - { x: 0.859375, y: 0.328125 }, - { x: 0.859375, y: 0.328125 }, - { x: 0.890625, y: 0.328125 }, - { x: 0.890625, y: 0.328125 }, - { x: 0.921875, y: 0.328125 }, - { x: 0.921875, y: 0.328125 }, - { x: 0.953125, y: 0.328125 }, - { x: 0.953125, y: 0.328125 }, - { x: 0.984375, y: 0.328125 }, - { x: 0.984375, y: 0.328125 }, - { x: 0.015625, y: 0.359375 }, - { x: 0.015625, y: 0.359375 }, - { x: 0.046875, y: 0.359375 }, - { x: 0.046875, y: 0.359375 }, - { x: 0.078125, y: 0.359375 }, - { x: 0.078125, y: 0.359375 }, - { x: 0.109375, y: 0.359375 }, - { x: 0.109375, y: 0.359375 }, - { x: 0.140625, y: 0.359375 }, - { x: 0.140625, y: 0.359375 }, - { x: 0.171875, y: 0.359375 }, - { x: 0.171875, y: 0.359375 }, - { x: 0.203125, y: 0.359375 }, - { x: 0.203125, y: 0.359375 }, - { x: 0.234375, y: 0.359375 }, - { x: 0.234375, y: 0.359375 }, - { x: 0.265625, y: 0.359375 }, - { x: 0.265625, y: 0.359375 }, - { x: 0.296875, y: 0.359375 }, - { x: 0.296875, y: 0.359375 }, - { x: 0.328125, y: 0.359375 }, - { x: 0.328125, y: 0.359375 }, - { x: 0.359375, y: 0.359375 }, - { x: 0.359375, y: 0.359375 }, - { x: 0.390625, y: 0.359375 }, - { x: 0.390625, y: 0.359375 }, - { x: 0.421875, y: 0.359375 }, - { x: 0.421875, y: 0.359375 }, - { x: 0.453125, y: 0.359375 }, - { x: 0.453125, y: 0.359375 }, - { x: 0.484375, y: 0.359375 }, - { x: 0.484375, y: 0.359375 }, - { x: 0.515625, y: 0.359375 }, - { x: 0.515625, y: 0.359375 }, - { x: 0.546875, y: 0.359375 }, - { x: 0.546875, y: 0.359375 }, - { x: 0.578125, y: 0.359375 }, - { x: 0.578125, y: 0.359375 }, - { x: 0.609375, y: 0.359375 }, - { x: 0.609375, y: 0.359375 }, - { x: 0.640625, y: 0.359375 }, - { x: 0.640625, y: 0.359375 }, - { x: 0.671875, y: 0.359375 }, - { x: 0.671875, y: 0.359375 }, - { x: 0.703125, y: 0.359375 }, - { x: 0.703125, y: 0.359375 }, - { x: 0.734375, y: 0.359375 }, - { x: 0.734375, y: 0.359375 }, - { x: 0.765625, y: 0.359375 }, - { x: 0.765625, y: 0.359375 }, - { x: 0.796875, y: 0.359375 }, - { x: 0.796875, y: 0.359375 }, - { x: 0.828125, y: 0.359375 }, - { x: 0.828125, y: 0.359375 }, - { x: 0.859375, y: 0.359375 }, - { x: 0.859375, y: 0.359375 }, - { x: 0.890625, y: 0.359375 }, - { x: 0.890625, y: 0.359375 }, - { x: 0.921875, y: 0.359375 }, - { x: 0.921875, y: 0.359375 }, - { x: 0.953125, y: 0.359375 }, - { x: 0.953125, y: 0.359375 }, - { x: 0.984375, y: 0.359375 }, - { x: 0.984375, y: 0.359375 }, - { x: 0.015625, y: 0.390625 }, - { x: 0.015625, y: 0.390625 }, - { x: 0.046875, y: 0.390625 }, - { x: 0.046875, y: 0.390625 }, - { x: 0.078125, y: 0.390625 }, - { x: 0.078125, y: 0.390625 }, - { x: 0.109375, y: 0.390625 }, - { x: 0.109375, y: 0.390625 }, - { x: 0.140625, y: 0.390625 }, - { x: 0.140625, y: 0.390625 }, - { x: 0.171875, y: 0.390625 }, - { x: 0.171875, y: 0.390625 }, - { x: 0.203125, y: 0.390625 }, - { x: 0.203125, y: 0.390625 }, - { x: 0.234375, y: 0.390625 }, - { x: 0.234375, y: 0.390625 }, - { x: 0.265625, y: 0.390625 }, - { x: 0.265625, y: 0.390625 }, - { x: 0.296875, y: 0.390625 }, - { x: 0.296875, y: 0.390625 }, - { x: 0.328125, y: 0.390625 }, - { x: 0.328125, y: 0.390625 }, - { x: 0.359375, y: 0.390625 }, - { x: 0.359375, y: 0.390625 }, - { x: 0.390625, y: 0.390625 }, - { x: 0.390625, y: 0.390625 }, - { x: 0.421875, y: 0.390625 }, - { x: 0.421875, y: 0.390625 }, - { x: 0.453125, y: 0.390625 }, - { x: 0.453125, y: 0.390625 }, - { x: 0.484375, y: 0.390625 }, - { x: 0.484375, y: 0.390625 }, - { x: 0.515625, y: 0.390625 }, - { x: 0.515625, y: 0.390625 }, - { x: 0.546875, y: 0.390625 }, - { x: 0.546875, y: 0.390625 }, - { x: 0.578125, y: 0.390625 }, - { x: 0.578125, y: 0.390625 }, - { x: 0.609375, y: 0.390625 }, - { x: 0.609375, y: 0.390625 }, - { x: 0.640625, y: 0.390625 }, - { x: 0.640625, y: 0.390625 }, - { x: 0.671875, y: 0.390625 }, - { x: 0.671875, y: 0.390625 }, - { x: 0.703125, y: 0.390625 }, - { x: 0.703125, y: 0.390625 }, - { x: 0.734375, y: 0.390625 }, - { x: 0.734375, y: 0.390625 }, - { x: 0.765625, y: 0.390625 }, - { x: 0.765625, y: 0.390625 }, - { x: 0.796875, y: 0.390625 }, - { x: 0.796875, y: 0.390625 }, - { x: 0.828125, y: 0.390625 }, - { x: 0.828125, y: 0.390625 }, - { x: 0.859375, y: 0.390625 }, - { x: 0.859375, y: 0.390625 }, - { x: 0.890625, y: 0.390625 }, - { x: 0.890625, y: 0.390625 }, - { x: 0.921875, y: 0.390625 }, - { x: 0.921875, y: 0.390625 }, - { x: 0.953125, y: 0.390625 }, - { x: 0.953125, y: 0.390625 }, - { x: 0.984375, y: 0.390625 }, - { x: 0.984375, y: 0.390625 }, - { x: 0.015625, y: 0.421875 }, - { x: 0.015625, y: 0.421875 }, - { x: 0.046875, y: 0.421875 }, - { x: 0.046875, y: 0.421875 }, - { x: 0.078125, y: 0.421875 }, - { x: 0.078125, y: 0.421875 }, - { x: 0.109375, y: 0.421875 }, - { x: 0.109375, y: 0.421875 }, - { x: 0.140625, y: 0.421875 }, - { x: 0.140625, y: 0.421875 }, - { x: 0.171875, y: 0.421875 }, - { x: 0.171875, y: 0.421875 }, - { x: 0.203125, y: 0.421875 }, - { x: 0.203125, y: 0.421875 }, - { x: 0.234375, y: 0.421875 }, - { x: 0.234375, y: 0.421875 }, - { x: 0.265625, y: 0.421875 }, - { x: 0.265625, y: 0.421875 }, - { x: 0.296875, y: 0.421875 }, - { x: 0.296875, y: 0.421875 }, - { x: 0.328125, y: 0.421875 }, - { x: 0.328125, y: 0.421875 }, - { x: 0.359375, y: 0.421875 }, - { x: 0.359375, y: 0.421875 }, - { x: 0.390625, y: 0.421875 }, - { x: 0.390625, y: 0.421875 }, - { x: 0.421875, y: 0.421875 }, - { x: 0.421875, y: 0.421875 }, - { x: 0.453125, y: 0.421875 }, - { x: 0.453125, y: 0.421875 }, - { x: 0.484375, y: 0.421875 }, - { x: 0.484375, y: 0.421875 }, - { x: 0.515625, y: 0.421875 }, - { x: 0.515625, y: 0.421875 }, - { x: 0.546875, y: 0.421875 }, - { x: 0.546875, y: 0.421875 }, - { x: 0.578125, y: 0.421875 }, - { x: 0.578125, y: 0.421875 }, - { x: 0.609375, y: 0.421875 }, - { x: 0.609375, y: 0.421875 }, - { x: 0.640625, y: 0.421875 }, - { x: 0.640625, y: 0.421875 }, - { x: 0.671875, y: 0.421875 }, - { x: 0.671875, y: 0.421875 }, - { x: 0.703125, y: 0.421875 }, - { x: 0.703125, y: 0.421875 }, - { x: 0.734375, y: 0.421875 }, - { x: 0.734375, y: 0.421875 }, - { x: 0.765625, y: 0.421875 }, - { x: 0.765625, y: 0.421875 }, - { x: 0.796875, y: 0.421875 }, - { x: 0.796875, y: 0.421875 }, - { x: 0.828125, y: 0.421875 }, - { x: 0.828125, y: 0.421875 }, - { x: 0.859375, y: 0.421875 }, - { x: 0.859375, y: 0.421875 }, - { x: 0.890625, y: 0.421875 }, - { x: 0.890625, y: 0.421875 }, - { x: 0.921875, y: 0.421875 }, - { x: 0.921875, y: 0.421875 }, - { x: 0.953125, y: 0.421875 }, - { x: 0.953125, y: 0.421875 }, - { x: 0.984375, y: 0.421875 }, - { x: 0.984375, y: 0.421875 }, - { x: 0.015625, y: 0.453125 }, - { x: 0.015625, y: 0.453125 }, - { x: 0.046875, y: 0.453125 }, - { x: 0.046875, y: 0.453125 }, - { x: 0.078125, y: 0.453125 }, - { x: 0.078125, y: 0.453125 }, - { x: 0.109375, y: 0.453125 }, - { x: 0.109375, y: 0.453125 }, - { x: 0.140625, y: 0.453125 }, - { x: 0.140625, y: 0.453125 }, - { x: 0.171875, y: 0.453125 }, - { x: 0.171875, y: 0.453125 }, - { x: 0.203125, y: 0.453125 }, - { x: 0.203125, y: 0.453125 }, - { x: 0.234375, y: 0.453125 }, - { x: 0.234375, y: 0.453125 }, - { x: 0.265625, y: 0.453125 }, - { x: 0.265625, y: 0.453125 }, - { x: 0.296875, y: 0.453125 }, - { x: 0.296875, y: 0.453125 }, - { x: 0.328125, y: 0.453125 }, - { x: 0.328125, y: 0.453125 }, - { x: 0.359375, y: 0.453125 }, - { x: 0.359375, y: 0.453125 }, - { x: 0.390625, y: 0.453125 }, - { x: 0.390625, y: 0.453125 }, - { x: 0.421875, y: 0.453125 }, - { x: 0.421875, y: 0.453125 }, - { x: 0.453125, y: 0.453125 }, - { x: 0.453125, y: 0.453125 }, - { x: 0.484375, y: 0.453125 }, - { x: 0.484375, y: 0.453125 }, - { x: 0.515625, y: 0.453125 }, - { x: 0.515625, y: 0.453125 }, - { x: 0.546875, y: 0.453125 }, - { x: 0.546875, y: 0.453125 }, - { x: 0.578125, y: 0.453125 }, - { x: 0.578125, y: 0.453125 }, - { x: 0.609375, y: 0.453125 }, - { x: 0.609375, y: 0.453125 }, - { x: 0.640625, y: 0.453125 }, - { x: 0.640625, y: 0.453125 }, - { x: 0.671875, y: 0.453125 }, - { x: 0.671875, y: 0.453125 }, - { x: 0.703125, y: 0.453125 }, - { x: 0.703125, y: 0.453125 }, - { x: 0.734375, y: 0.453125 }, - { x: 0.734375, y: 0.453125 }, - { x: 0.765625, y: 0.453125 }, - { x: 0.765625, y: 0.453125 }, - { x: 0.796875, y: 0.453125 }, - { x: 0.796875, y: 0.453125 }, - { x: 0.828125, y: 0.453125 }, - { x: 0.828125, y: 0.453125 }, - { x: 0.859375, y: 0.453125 }, - { x: 0.859375, y: 0.453125 }, - { x: 0.890625, y: 0.453125 }, - { x: 0.890625, y: 0.453125 }, - { x: 0.921875, y: 0.453125 }, - { x: 0.921875, y: 0.453125 }, - { x: 0.953125, y: 0.453125 }, - { x: 0.953125, y: 0.453125 }, - { x: 0.984375, y: 0.453125 }, - { x: 0.984375, y: 0.453125 }, - { x: 0.015625, y: 0.484375 }, - { x: 0.015625, y: 0.484375 }, - { x: 0.046875, y: 0.484375 }, - { x: 0.046875, y: 0.484375 }, - { x: 0.078125, y: 0.484375 }, - { x: 0.078125, y: 0.484375 }, - { x: 0.109375, y: 0.484375 }, - { x: 0.109375, y: 0.484375 }, - { x: 0.140625, y: 0.484375 }, - { x: 0.140625, y: 0.484375 }, - { x: 0.171875, y: 0.484375 }, - { x: 0.171875, y: 0.484375 }, - { x: 0.203125, y: 0.484375 }, - { x: 0.203125, y: 0.484375 }, - { x: 0.234375, y: 0.484375 }, - { x: 0.234375, y: 0.484375 }, - { x: 0.265625, y: 0.484375 }, - { x: 0.265625, y: 0.484375 }, - { x: 0.296875, y: 0.484375 }, - { x: 0.296875, y: 0.484375 }, - { x: 0.328125, y: 0.484375 }, - { x: 0.328125, y: 0.484375 }, - { x: 0.359375, y: 0.484375 }, - { x: 0.359375, y: 0.484375 }, - { x: 0.390625, y: 0.484375 }, - { x: 0.390625, y: 0.484375 }, - { x: 0.421875, y: 0.484375 }, - { x: 0.421875, y: 0.484375 }, - { x: 0.453125, y: 0.484375 }, - { x: 0.453125, y: 0.484375 }, - { x: 0.484375, y: 0.484375 }, - { x: 0.484375, y: 0.484375 }, - { x: 0.515625, y: 0.484375 }, - { x: 0.515625, y: 0.484375 }, - { x: 0.546875, y: 0.484375 }, - { x: 0.546875, y: 0.484375 }, - { x: 0.578125, y: 0.484375 }, - { x: 0.578125, y: 0.484375 }, - { x: 0.609375, y: 0.484375 }, - { x: 0.609375, y: 0.484375 }, - { x: 0.640625, y: 0.484375 }, - { x: 0.640625, y: 0.484375 }, - { x: 0.671875, y: 0.484375 }, - { x: 0.671875, y: 0.484375 }, - { x: 0.703125, y: 0.484375 }, - { x: 0.703125, y: 0.484375 }, - { x: 0.734375, y: 0.484375 }, - { x: 0.734375, y: 0.484375 }, - { x: 0.765625, y: 0.484375 }, - { x: 0.765625, y: 0.484375 }, - { x: 0.796875, y: 0.484375 }, - { x: 0.796875, y: 0.484375 }, - { x: 0.828125, y: 0.484375 }, - { x: 0.828125, y: 0.484375 }, - { x: 0.859375, y: 0.484375 }, - { x: 0.859375, y: 0.484375 }, - { x: 0.890625, y: 0.484375 }, - { x: 0.890625, y: 0.484375 }, - { x: 0.921875, y: 0.484375 }, - { x: 0.921875, y: 0.484375 }, - { x: 0.953125, y: 0.484375 }, - { x: 0.953125, y: 0.484375 }, - { x: 0.984375, y: 0.484375 }, - { x: 0.984375, y: 0.484375 }, - { x: 0.015625, y: 0.515625 }, - { x: 0.015625, y: 0.515625 }, - { x: 0.046875, y: 0.515625 }, - { x: 0.046875, y: 0.515625 }, - { x: 0.078125, y: 0.515625 }, - { x: 0.078125, y: 0.515625 }, - { x: 0.109375, y: 0.515625 }, - { x: 0.109375, y: 0.515625 }, - { x: 0.140625, y: 0.515625 }, - { x: 0.140625, y: 0.515625 }, - { x: 0.171875, y: 0.515625 }, - { x: 0.171875, y: 0.515625 }, - { x: 0.203125, y: 0.515625 }, - { x: 0.203125, y: 0.515625 }, - { x: 0.234375, y: 0.515625 }, - { x: 0.234375, y: 0.515625 }, - { x: 0.265625, y: 0.515625 }, - { x: 0.265625, y: 0.515625 }, - { x: 0.296875, y: 0.515625 }, - { x: 0.296875, y: 0.515625 }, - { x: 0.328125, y: 0.515625 }, - { x: 0.328125, y: 0.515625 }, - { x: 0.359375, y: 0.515625 }, - { x: 0.359375, y: 0.515625 }, - { x: 0.390625, y: 0.515625 }, - { x: 0.390625, y: 0.515625 }, - { x: 0.421875, y: 0.515625 }, - { x: 0.421875, y: 0.515625 }, - { x: 0.453125, y: 0.515625 }, - { x: 0.453125, y: 0.515625 }, - { x: 0.484375, y: 0.515625 }, - { x: 0.484375, y: 0.515625 }, - { x: 0.515625, y: 0.515625 }, - { x: 0.515625, y: 0.515625 }, - { x: 0.546875, y: 0.515625 }, - { x: 0.546875, y: 0.515625 }, - { x: 0.578125, y: 0.515625 }, - { x: 0.578125, y: 0.515625 }, - { x: 0.609375, y: 0.515625 }, - { x: 0.609375, y: 0.515625 }, - { x: 0.640625, y: 0.515625 }, - { x: 0.640625, y: 0.515625 }, - { x: 0.671875, y: 0.515625 }, - { x: 0.671875, y: 0.515625 }, - { x: 0.703125, y: 0.515625 }, - { x: 0.703125, y: 0.515625 }, - { x: 0.734375, y: 0.515625 }, - { x: 0.734375, y: 0.515625 }, - { x: 0.765625, y: 0.515625 }, - { x: 0.765625, y: 0.515625 }, - { x: 0.796875, y: 0.515625 }, - { x: 0.796875, y: 0.515625 }, - { x: 0.828125, y: 0.515625 }, - { x: 0.828125, y: 0.515625 }, - { x: 0.859375, y: 0.515625 }, - { x: 0.859375, y: 0.515625 }, - { x: 0.890625, y: 0.515625 }, - { x: 0.890625, y: 0.515625 }, - { x: 0.921875, y: 0.515625 }, - { x: 0.921875, y: 0.515625 }, - { x: 0.953125, y: 0.515625 }, - { x: 0.953125, y: 0.515625 }, - { x: 0.984375, y: 0.515625 }, - { x: 0.984375, y: 0.515625 }, - { x: 0.015625, y: 0.546875 }, - { x: 0.015625, y: 0.546875 }, - { x: 0.046875, y: 0.546875 }, - { x: 0.046875, y: 0.546875 }, - { x: 0.078125, y: 0.546875 }, - { x: 0.078125, y: 0.546875 }, - { x: 0.109375, y: 0.546875 }, - { x: 0.109375, y: 0.546875 }, - { x: 0.140625, y: 0.546875 }, - { x: 0.140625, y: 0.546875 }, - { x: 0.171875, y: 0.546875 }, - { x: 0.171875, y: 0.546875 }, - { x: 0.203125, y: 0.546875 }, - { x: 0.203125, y: 0.546875 }, - { x: 0.234375, y: 0.546875 }, - { x: 0.234375, y: 0.546875 }, - { x: 0.265625, y: 0.546875 }, - { x: 0.265625, y: 0.546875 }, - { x: 0.296875, y: 0.546875 }, - { x: 0.296875, y: 0.546875 }, - { x: 0.328125, y: 0.546875 }, - { x: 0.328125, y: 0.546875 }, - { x: 0.359375, y: 0.546875 }, - { x: 0.359375, y: 0.546875 }, - { x: 0.390625, y: 0.546875 }, - { x: 0.390625, y: 0.546875 }, - { x: 0.421875, y: 0.546875 }, - { x: 0.421875, y: 0.546875 }, - { x: 0.453125, y: 0.546875 }, - { x: 0.453125, y: 0.546875 }, - { x: 0.484375, y: 0.546875 }, - { x: 0.484375, y: 0.546875 }, - { x: 0.515625, y: 0.546875 }, - { x: 0.515625, y: 0.546875 }, - { x: 0.546875, y: 0.546875 }, - { x: 0.546875, y: 0.546875 }, - { x: 0.578125, y: 0.546875 }, - { x: 0.578125, y: 0.546875 }, - { x: 0.609375, y: 0.546875 }, - { x: 0.609375, y: 0.546875 }, - { x: 0.640625, y: 0.546875 }, - { x: 0.640625, y: 0.546875 }, - { x: 0.671875, y: 0.546875 }, - { x: 0.671875, y: 0.546875 }, - { x: 0.703125, y: 0.546875 }, - { x: 0.703125, y: 0.546875 }, - { x: 0.734375, y: 0.546875 }, - { x: 0.734375, y: 0.546875 }, - { x: 0.765625, y: 0.546875 }, - { x: 0.765625, y: 0.546875 }, - { x: 0.796875, y: 0.546875 }, - { x: 0.796875, y: 0.546875 }, - { x: 0.828125, y: 0.546875 }, - { x: 0.828125, y: 0.546875 }, - { x: 0.859375, y: 0.546875 }, - { x: 0.859375, y: 0.546875 }, - { x: 0.890625, y: 0.546875 }, - { x: 0.890625, y: 0.546875 }, - { x: 0.921875, y: 0.546875 }, - { x: 0.921875, y: 0.546875 }, - { x: 0.953125, y: 0.546875 }, - { x: 0.953125, y: 0.546875 }, - { x: 0.984375, y: 0.546875 }, - { x: 0.984375, y: 0.546875 }, - { x: 0.015625, y: 0.578125 }, - { x: 0.015625, y: 0.578125 }, - { x: 0.046875, y: 0.578125 }, - { x: 0.046875, y: 0.578125 }, - { x: 0.078125, y: 0.578125 }, - { x: 0.078125, y: 0.578125 }, - { x: 0.109375, y: 0.578125 }, - { x: 0.109375, y: 0.578125 }, - { x: 0.140625, y: 0.578125 }, - { x: 0.140625, y: 0.578125 }, - { x: 0.171875, y: 0.578125 }, - { x: 0.171875, y: 0.578125 }, - { x: 0.203125, y: 0.578125 }, - { x: 0.203125, y: 0.578125 }, - { x: 0.234375, y: 0.578125 }, - { x: 0.234375, y: 0.578125 }, - { x: 0.265625, y: 0.578125 }, - { x: 0.265625, y: 0.578125 }, - { x: 0.296875, y: 0.578125 }, - { x: 0.296875, y: 0.578125 }, - { x: 0.328125, y: 0.578125 }, - { x: 0.328125, y: 0.578125 }, - { x: 0.359375, y: 0.578125 }, - { x: 0.359375, y: 0.578125 }, - { x: 0.390625, y: 0.578125 }, - { x: 0.390625, y: 0.578125 }, - { x: 0.421875, y: 0.578125 }, - { x: 0.421875, y: 0.578125 }, - { x: 0.453125, y: 0.578125 }, - { x: 0.453125, y: 0.578125 }, - { x: 0.484375, y: 0.578125 }, - { x: 0.484375, y: 0.578125 }, - { x: 0.515625, y: 0.578125 }, - { x: 0.515625, y: 0.578125 }, - { x: 0.546875, y: 0.578125 }, - { x: 0.546875, y: 0.578125 }, - { x: 0.578125, y: 0.578125 }, - { x: 0.578125, y: 0.578125 }, - { x: 0.609375, y: 0.578125 }, - { x: 0.609375, y: 0.578125 }, - { x: 0.640625, y: 0.578125 }, - { x: 0.640625, y: 0.578125 }, - { x: 0.671875, y: 0.578125 }, - { x: 0.671875, y: 0.578125 }, - { x: 0.703125, y: 0.578125 }, - { x: 0.703125, y: 0.578125 }, - { x: 0.734375, y: 0.578125 }, - { x: 0.734375, y: 0.578125 }, - { x: 0.765625, y: 0.578125 }, - { x: 0.765625, y: 0.578125 }, - { x: 0.796875, y: 0.578125 }, - { x: 0.796875, y: 0.578125 }, - { x: 0.828125, y: 0.578125 }, - { x: 0.828125, y: 0.578125 }, - { x: 0.859375, y: 0.578125 }, - { x: 0.859375, y: 0.578125 }, - { x: 0.890625, y: 0.578125 }, - { x: 0.890625, y: 0.578125 }, - { x: 0.921875, y: 0.578125 }, - { x: 0.921875, y: 0.578125 }, - { x: 0.953125, y: 0.578125 }, - { x: 0.953125, y: 0.578125 }, - { x: 0.984375, y: 0.578125 }, - { x: 0.984375, y: 0.578125 }, - { x: 0.015625, y: 0.609375 }, - { x: 0.015625, y: 0.609375 }, - { x: 0.046875, y: 0.609375 }, - { x: 0.046875, y: 0.609375 }, - { x: 0.078125, y: 0.609375 }, - { x: 0.078125, y: 0.609375 }, - { x: 0.109375, y: 0.609375 }, - { x: 0.109375, y: 0.609375 }, - { x: 0.140625, y: 0.609375 }, - { x: 0.140625, y: 0.609375 }, - { x: 0.171875, y: 0.609375 }, - { x: 0.171875, y: 0.609375 }, - { x: 0.203125, y: 0.609375 }, - { x: 0.203125, y: 0.609375 }, - { x: 0.234375, y: 0.609375 }, - { x: 0.234375, y: 0.609375 }, - { x: 0.265625, y: 0.609375 }, - { x: 0.265625, y: 0.609375 }, - { x: 0.296875, y: 0.609375 }, - { x: 0.296875, y: 0.609375 }, - { x: 0.328125, y: 0.609375 }, - { x: 0.328125, y: 0.609375 }, - { x: 0.359375, y: 0.609375 }, - { x: 0.359375, y: 0.609375 }, - { x: 0.390625, y: 0.609375 }, - { x: 0.390625, y: 0.609375 }, - { x: 0.421875, y: 0.609375 }, - { x: 0.421875, y: 0.609375 }, - { x: 0.453125, y: 0.609375 }, - { x: 0.453125, y: 0.609375 }, - { x: 0.484375, y: 0.609375 }, - { x: 0.484375, y: 0.609375 }, - { x: 0.515625, y: 0.609375 }, - { x: 0.515625, y: 0.609375 }, - { x: 0.546875, y: 0.609375 }, - { x: 0.546875, y: 0.609375 }, - { x: 0.578125, y: 0.609375 }, - { x: 0.578125, y: 0.609375 }, - { x: 0.609375, y: 0.609375 }, - { x: 0.609375, y: 0.609375 }, - { x: 0.640625, y: 0.609375 }, - { x: 0.640625, y: 0.609375 }, - { x: 0.671875, y: 0.609375 }, - { x: 0.671875, y: 0.609375 }, - { x: 0.703125, y: 0.609375 }, - { x: 0.703125, y: 0.609375 }, - { x: 0.734375, y: 0.609375 }, - { x: 0.734375, y: 0.609375 }, - { x: 0.765625, y: 0.609375 }, - { x: 0.765625, y: 0.609375 }, - { x: 0.796875, y: 0.609375 }, - { x: 0.796875, y: 0.609375 }, - { x: 0.828125, y: 0.609375 }, - { x: 0.828125, y: 0.609375 }, - { x: 0.859375, y: 0.609375 }, - { x: 0.859375, y: 0.609375 }, - { x: 0.890625, y: 0.609375 }, - { x: 0.890625, y: 0.609375 }, - { x: 0.921875, y: 0.609375 }, - { x: 0.921875, y: 0.609375 }, - { x: 0.953125, y: 0.609375 }, - { x: 0.953125, y: 0.609375 }, - { x: 0.984375, y: 0.609375 }, - { x: 0.984375, y: 0.609375 }, - { x: 0.015625, y: 0.640625 }, - { x: 0.015625, y: 0.640625 }, - { x: 0.046875, y: 0.640625 }, - { x: 0.046875, y: 0.640625 }, - { x: 0.078125, y: 0.640625 }, - { x: 0.078125, y: 0.640625 }, - { x: 0.109375, y: 0.640625 }, - { x: 0.109375, y: 0.640625 }, - { x: 0.140625, y: 0.640625 }, - { x: 0.140625, y: 0.640625 }, - { x: 0.171875, y: 0.640625 }, - { x: 0.171875, y: 0.640625 }, - { x: 0.203125, y: 0.640625 }, - { x: 0.203125, y: 0.640625 }, - { x: 0.234375, y: 0.640625 }, - { x: 0.234375, y: 0.640625 }, - { x: 0.265625, y: 0.640625 }, - { x: 0.265625, y: 0.640625 }, - { x: 0.296875, y: 0.640625 }, - { x: 0.296875, y: 0.640625 }, - { x: 0.328125, y: 0.640625 }, - { x: 0.328125, y: 0.640625 }, - { x: 0.359375, y: 0.640625 }, - { x: 0.359375, y: 0.640625 }, - { x: 0.390625, y: 0.640625 }, - { x: 0.390625, y: 0.640625 }, - { x: 0.421875, y: 0.640625 }, - { x: 0.421875, y: 0.640625 }, - { x: 0.453125, y: 0.640625 }, - { x: 0.453125, y: 0.640625 }, - { x: 0.484375, y: 0.640625 }, - { x: 0.484375, y: 0.640625 }, - { x: 0.515625, y: 0.640625 }, - { x: 0.515625, y: 0.640625 }, - { x: 0.546875, y: 0.640625 }, - { x: 0.546875, y: 0.640625 }, - { x: 0.578125, y: 0.640625 }, - { x: 0.578125, y: 0.640625 }, - { x: 0.609375, y: 0.640625 }, - { x: 0.609375, y: 0.640625 }, - { x: 0.640625, y: 0.640625 }, - { x: 0.640625, y: 0.640625 }, - { x: 0.671875, y: 0.640625 }, - { x: 0.671875, y: 0.640625 }, - { x: 0.703125, y: 0.640625 }, - { x: 0.703125, y: 0.640625 }, - { x: 0.734375, y: 0.640625 }, - { x: 0.734375, y: 0.640625 }, - { x: 0.765625, y: 0.640625 }, - { x: 0.765625, y: 0.640625 }, - { x: 0.796875, y: 0.640625 }, - { x: 0.796875, y: 0.640625 }, - { x: 0.828125, y: 0.640625 }, - { x: 0.828125, y: 0.640625 }, - { x: 0.859375, y: 0.640625 }, - { x: 0.859375, y: 0.640625 }, - { x: 0.890625, y: 0.640625 }, - { x: 0.890625, y: 0.640625 }, - { x: 0.921875, y: 0.640625 }, - { x: 0.921875, y: 0.640625 }, - { x: 0.953125, y: 0.640625 }, - { x: 0.953125, y: 0.640625 }, - { x: 0.984375, y: 0.640625 }, - { x: 0.984375, y: 0.640625 }, - { x: 0.015625, y: 0.671875 }, - { x: 0.015625, y: 0.671875 }, - { x: 0.046875, y: 0.671875 }, - { x: 0.046875, y: 0.671875 }, - { x: 0.078125, y: 0.671875 }, - { x: 0.078125, y: 0.671875 }, - { x: 0.109375, y: 0.671875 }, - { x: 0.109375, y: 0.671875 }, - { x: 0.140625, y: 0.671875 }, - { x: 0.140625, y: 0.671875 }, - { x: 0.171875, y: 0.671875 }, - { x: 0.171875, y: 0.671875 }, - { x: 0.203125, y: 0.671875 }, - { x: 0.203125, y: 0.671875 }, - { x: 0.234375, y: 0.671875 }, - { x: 0.234375, y: 0.671875 }, - { x: 0.265625, y: 0.671875 }, - { x: 0.265625, y: 0.671875 }, - { x: 0.296875, y: 0.671875 }, - { x: 0.296875, y: 0.671875 }, - { x: 0.328125, y: 0.671875 }, - { x: 0.328125, y: 0.671875 }, - { x: 0.359375, y: 0.671875 }, - { x: 0.359375, y: 0.671875 }, - { x: 0.390625, y: 0.671875 }, - { x: 0.390625, y: 0.671875 }, - { x: 0.421875, y: 0.671875 }, - { x: 0.421875, y: 0.671875 }, - { x: 0.453125, y: 0.671875 }, - { x: 0.453125, y: 0.671875 }, - { x: 0.484375, y: 0.671875 }, - { x: 0.484375, y: 0.671875 }, - { x: 0.515625, y: 0.671875 }, - { x: 0.515625, y: 0.671875 }, - { x: 0.546875, y: 0.671875 }, - { x: 0.546875, y: 0.671875 }, - { x: 0.578125, y: 0.671875 }, - { x: 0.578125, y: 0.671875 }, - { x: 0.609375, y: 0.671875 }, - { x: 0.609375, y: 0.671875 }, - { x: 0.640625, y: 0.671875 }, - { x: 0.640625, y: 0.671875 }, - { x: 0.671875, y: 0.671875 }, - { x: 0.671875, y: 0.671875 }, - { x: 0.703125, y: 0.671875 }, - { x: 0.703125, y: 0.671875 }, - { x: 0.734375, y: 0.671875 }, - { x: 0.734375, y: 0.671875 }, - { x: 0.765625, y: 0.671875 }, - { x: 0.765625, y: 0.671875 }, - { x: 0.796875, y: 0.671875 }, - { x: 0.796875, y: 0.671875 }, - { x: 0.828125, y: 0.671875 }, - { x: 0.828125, y: 0.671875 }, - { x: 0.859375, y: 0.671875 }, - { x: 0.859375, y: 0.671875 }, - { x: 0.890625, y: 0.671875 }, - { x: 0.890625, y: 0.671875 }, - { x: 0.921875, y: 0.671875 }, - { x: 0.921875, y: 0.671875 }, - { x: 0.953125, y: 0.671875 }, - { x: 0.953125, y: 0.671875 }, - { x: 0.984375, y: 0.671875 }, - { x: 0.984375, y: 0.671875 }, - { x: 0.015625, y: 0.703125 }, - { x: 0.015625, y: 0.703125 }, - { x: 0.046875, y: 0.703125 }, - { x: 0.046875, y: 0.703125 }, - { x: 0.078125, y: 0.703125 }, - { x: 0.078125, y: 0.703125 }, - { x: 0.109375, y: 0.703125 }, - { x: 0.109375, y: 0.703125 }, - { x: 0.140625, y: 0.703125 }, - { x: 0.140625, y: 0.703125 }, - { x: 0.171875, y: 0.703125 }, - { x: 0.171875, y: 0.703125 }, - { x: 0.203125, y: 0.703125 }, - { x: 0.203125, y: 0.703125 }, - { x: 0.234375, y: 0.703125 }, - { x: 0.234375, y: 0.703125 }, - { x: 0.265625, y: 0.703125 }, - { x: 0.265625, y: 0.703125 }, - { x: 0.296875, y: 0.703125 }, - { x: 0.296875, y: 0.703125 }, - { x: 0.328125, y: 0.703125 }, - { x: 0.328125, y: 0.703125 }, - { x: 0.359375, y: 0.703125 }, - { x: 0.359375, y: 0.703125 }, - { x: 0.390625, y: 0.703125 }, - { x: 0.390625, y: 0.703125 }, - { x: 0.421875, y: 0.703125 }, - { x: 0.421875, y: 0.703125 }, - { x: 0.453125, y: 0.703125 }, - { x: 0.453125, y: 0.703125 }, - { x: 0.484375, y: 0.703125 }, - { x: 0.484375, y: 0.703125 }, - { x: 0.515625, y: 0.703125 }, - { x: 0.515625, y: 0.703125 }, - { x: 0.546875, y: 0.703125 }, - { x: 0.546875, y: 0.703125 }, - { x: 0.578125, y: 0.703125 }, - { x: 0.578125, y: 0.703125 }, - { x: 0.609375, y: 0.703125 }, - { x: 0.609375, y: 0.703125 }, - { x: 0.640625, y: 0.703125 }, - { x: 0.640625, y: 0.703125 }, - { x: 0.671875, y: 0.703125 }, - { x: 0.671875, y: 0.703125 }, - { x: 0.703125, y: 0.703125 }, - { x: 0.703125, y: 0.703125 }, - { x: 0.734375, y: 0.703125 }, - { x: 0.734375, y: 0.703125 }, - { x: 0.765625, y: 0.703125 }, - { x: 0.765625, y: 0.703125 }, - { x: 0.796875, y: 0.703125 }, - { x: 0.796875, y: 0.703125 }, - { x: 0.828125, y: 0.703125 }, - { x: 0.828125, y: 0.703125 }, - { x: 0.859375, y: 0.703125 }, - { x: 0.859375, y: 0.703125 }, - { x: 0.890625, y: 0.703125 }, - { x: 0.890625, y: 0.703125 }, - { x: 0.921875, y: 0.703125 }, - { x: 0.921875, y: 0.703125 }, - { x: 0.953125, y: 0.703125 }, - { x: 0.953125, y: 0.703125 }, - { x: 0.984375, y: 0.703125 }, - { x: 0.984375, y: 0.703125 }, - { x: 0.015625, y: 0.734375 }, - { x: 0.015625, y: 0.734375 }, - { x: 0.046875, y: 0.734375 }, - { x: 0.046875, y: 0.734375 }, - { x: 0.078125, y: 0.734375 }, - { x: 0.078125, y: 0.734375 }, - { x: 0.109375, y: 0.734375 }, - { x: 0.109375, y: 0.734375 }, - { x: 0.140625, y: 0.734375 }, - { x: 0.140625, y: 0.734375 }, - { x: 0.171875, y: 0.734375 }, - { x: 0.171875, y: 0.734375 }, - { x: 0.203125, y: 0.734375 }, - { x: 0.203125, y: 0.734375 }, - { x: 0.234375, y: 0.734375 }, - { x: 0.234375, y: 0.734375 }, - { x: 0.265625, y: 0.734375 }, - { x: 0.265625, y: 0.734375 }, - { x: 0.296875, y: 0.734375 }, - { x: 0.296875, y: 0.734375 }, - { x: 0.328125, y: 0.734375 }, - { x: 0.328125, y: 0.734375 }, - { x: 0.359375, y: 0.734375 }, - { x: 0.359375, y: 0.734375 }, - { x: 0.390625, y: 0.734375 }, - { x: 0.390625, y: 0.734375 }, - { x: 0.421875, y: 0.734375 }, - { x: 0.421875, y: 0.734375 }, - { x: 0.453125, y: 0.734375 }, - { x: 0.453125, y: 0.734375 }, - { x: 0.484375, y: 0.734375 }, - { x: 0.484375, y: 0.734375 }, - { x: 0.515625, y: 0.734375 }, - { x: 0.515625, y: 0.734375 }, - { x: 0.546875, y: 0.734375 }, - { x: 0.546875, y: 0.734375 }, - { x: 0.578125, y: 0.734375 }, - { x: 0.578125, y: 0.734375 }, - { x: 0.609375, y: 0.734375 }, - { x: 0.609375, y: 0.734375 }, - { x: 0.640625, y: 0.734375 }, - { x: 0.640625, y: 0.734375 }, - { x: 0.671875, y: 0.734375 }, - { x: 0.671875, y: 0.734375 }, - { x: 0.703125, y: 0.734375 }, - { x: 0.703125, y: 0.734375 }, - { x: 0.734375, y: 0.734375 }, - { x: 0.734375, y: 0.734375 }, - { x: 0.765625, y: 0.734375 }, - { x: 0.765625, y: 0.734375 }, - { x: 0.796875, y: 0.734375 }, - { x: 0.796875, y: 0.734375 }, - { x: 0.828125, y: 0.734375 }, - { x: 0.828125, y: 0.734375 }, - { x: 0.859375, y: 0.734375 }, - { x: 0.859375, y: 0.734375 }, - { x: 0.890625, y: 0.734375 }, - { x: 0.890625, y: 0.734375 }, - { x: 0.921875, y: 0.734375 }, - { x: 0.921875, y: 0.734375 }, - { x: 0.953125, y: 0.734375 }, - { x: 0.953125, y: 0.734375 }, - { x: 0.984375, y: 0.734375 }, - { x: 0.984375, y: 0.734375 }, - { x: 0.015625, y: 0.765625 }, - { x: 0.015625, y: 0.765625 }, - { x: 0.046875, y: 0.765625 }, - { x: 0.046875, y: 0.765625 }, - { x: 0.078125, y: 0.765625 }, - { x: 0.078125, y: 0.765625 }, - { x: 0.109375, y: 0.765625 }, - { x: 0.109375, y: 0.765625 }, - { x: 0.140625, y: 0.765625 }, - { x: 0.140625, y: 0.765625 }, - { x: 0.171875, y: 0.765625 }, - { x: 0.171875, y: 0.765625 }, - { x: 0.203125, y: 0.765625 }, - { x: 0.203125, y: 0.765625 }, - { x: 0.234375, y: 0.765625 }, - { x: 0.234375, y: 0.765625 }, - { x: 0.265625, y: 0.765625 }, - { x: 0.265625, y: 0.765625 }, - { x: 0.296875, y: 0.765625 }, - { x: 0.296875, y: 0.765625 }, - { x: 0.328125, y: 0.765625 }, - { x: 0.328125, y: 0.765625 }, - { x: 0.359375, y: 0.765625 }, - { x: 0.359375, y: 0.765625 }, - { x: 0.390625, y: 0.765625 }, - { x: 0.390625, y: 0.765625 }, - { x: 0.421875, y: 0.765625 }, - { x: 0.421875, y: 0.765625 }, - { x: 0.453125, y: 0.765625 }, - { x: 0.453125, y: 0.765625 }, - { x: 0.484375, y: 0.765625 }, - { x: 0.484375, y: 0.765625 }, - { x: 0.515625, y: 0.765625 }, - { x: 0.515625, y: 0.765625 }, - { x: 0.546875, y: 0.765625 }, - { x: 0.546875, y: 0.765625 }, - { x: 0.578125, y: 0.765625 }, - { x: 0.578125, y: 0.765625 }, - { x: 0.609375, y: 0.765625 }, - { x: 0.609375, y: 0.765625 }, - { x: 0.640625, y: 0.765625 }, - { x: 0.640625, y: 0.765625 }, - { x: 0.671875, y: 0.765625 }, - { x: 0.671875, y: 0.765625 }, - { x: 0.703125, y: 0.765625 }, - { x: 0.703125, y: 0.765625 }, - { x: 0.734375, y: 0.765625 }, - { x: 0.734375, y: 0.765625 }, - { x: 0.765625, y: 0.765625 }, - { x: 0.765625, y: 0.765625 }, - { x: 0.796875, y: 0.765625 }, - { x: 0.796875, y: 0.765625 }, - { x: 0.828125, y: 0.765625 }, - { x: 0.828125, y: 0.765625 }, - { x: 0.859375, y: 0.765625 }, - { x: 0.859375, y: 0.765625 }, - { x: 0.890625, y: 0.765625 }, - { x: 0.890625, y: 0.765625 }, - { x: 0.921875, y: 0.765625 }, - { x: 0.921875, y: 0.765625 }, - { x: 0.953125, y: 0.765625 }, - { x: 0.953125, y: 0.765625 }, - { x: 0.984375, y: 0.765625 }, - { x: 0.984375, y: 0.765625 }, - { x: 0.015625, y: 0.796875 }, - { x: 0.015625, y: 0.796875 }, - { x: 0.046875, y: 0.796875 }, - { x: 0.046875, y: 0.796875 }, - { x: 0.078125, y: 0.796875 }, - { x: 0.078125, y: 0.796875 }, - { x: 0.109375, y: 0.796875 }, - { x: 0.109375, y: 0.796875 }, - { x: 0.140625, y: 0.796875 }, - { x: 0.140625, y: 0.796875 }, - { x: 0.171875, y: 0.796875 }, - { x: 0.171875, y: 0.796875 }, - { x: 0.203125, y: 0.796875 }, - { x: 0.203125, y: 0.796875 }, - { x: 0.234375, y: 0.796875 }, - { x: 0.234375, y: 0.796875 }, - { x: 0.265625, y: 0.796875 }, - { x: 0.265625, y: 0.796875 }, - { x: 0.296875, y: 0.796875 }, - { x: 0.296875, y: 0.796875 }, - { x: 0.328125, y: 0.796875 }, - { x: 0.328125, y: 0.796875 }, - { x: 0.359375, y: 0.796875 }, - { x: 0.359375, y: 0.796875 }, - { x: 0.390625, y: 0.796875 }, - { x: 0.390625, y: 0.796875 }, - { x: 0.421875, y: 0.796875 }, - { x: 0.421875, y: 0.796875 }, - { x: 0.453125, y: 0.796875 }, - { x: 0.453125, y: 0.796875 }, - { x: 0.484375, y: 0.796875 }, - { x: 0.484375, y: 0.796875 }, - { x: 0.515625, y: 0.796875 }, - { x: 0.515625, y: 0.796875 }, - { x: 0.546875, y: 0.796875 }, - { x: 0.546875, y: 0.796875 }, - { x: 0.578125, y: 0.796875 }, - { x: 0.578125, y: 0.796875 }, - { x: 0.609375, y: 0.796875 }, - { x: 0.609375, y: 0.796875 }, - { x: 0.640625, y: 0.796875 }, - { x: 0.640625, y: 0.796875 }, - { x: 0.671875, y: 0.796875 }, - { x: 0.671875, y: 0.796875 }, - { x: 0.703125, y: 0.796875 }, - { x: 0.703125, y: 0.796875 }, - { x: 0.734375, y: 0.796875 }, - { x: 0.734375, y: 0.796875 }, - { x: 0.765625, y: 0.796875 }, - { x: 0.765625, y: 0.796875 }, - { x: 0.796875, y: 0.796875 }, - { x: 0.796875, y: 0.796875 }, - { x: 0.828125, y: 0.796875 }, - { x: 0.828125, y: 0.796875 }, - { x: 0.859375, y: 0.796875 }, - { x: 0.859375, y: 0.796875 }, - { x: 0.890625, y: 0.796875 }, - { x: 0.890625, y: 0.796875 }, - { x: 0.921875, y: 0.796875 }, - { x: 0.921875, y: 0.796875 }, - { x: 0.953125, y: 0.796875 }, - { x: 0.953125, y: 0.796875 }, - { x: 0.984375, y: 0.796875 }, - { x: 0.984375, y: 0.796875 }, - { x: 0.015625, y: 0.828125 }, - { x: 0.015625, y: 0.828125 }, - { x: 0.046875, y: 0.828125 }, - { x: 0.046875, y: 0.828125 }, - { x: 0.078125, y: 0.828125 }, - { x: 0.078125, y: 0.828125 }, - { x: 0.109375, y: 0.828125 }, - { x: 0.109375, y: 0.828125 }, - { x: 0.140625, y: 0.828125 }, - { x: 0.140625, y: 0.828125 }, - { x: 0.171875, y: 0.828125 }, - { x: 0.171875, y: 0.828125 }, - { x: 0.203125, y: 0.828125 }, - { x: 0.203125, y: 0.828125 }, - { x: 0.234375, y: 0.828125 }, - { x: 0.234375, y: 0.828125 }, - { x: 0.265625, y: 0.828125 }, - { x: 0.265625, y: 0.828125 }, - { x: 0.296875, y: 0.828125 }, - { x: 0.296875, y: 0.828125 }, - { x: 0.328125, y: 0.828125 }, - { x: 0.328125, y: 0.828125 }, - { x: 0.359375, y: 0.828125 }, - { x: 0.359375, y: 0.828125 }, - { x: 0.390625, y: 0.828125 }, - { x: 0.390625, y: 0.828125 }, - { x: 0.421875, y: 0.828125 }, - { x: 0.421875, y: 0.828125 }, - { x: 0.453125, y: 0.828125 }, - { x: 0.453125, y: 0.828125 }, - { x: 0.484375, y: 0.828125 }, - { x: 0.484375, y: 0.828125 }, - { x: 0.515625, y: 0.828125 }, - { x: 0.515625, y: 0.828125 }, - { x: 0.546875, y: 0.828125 }, - { x: 0.546875, y: 0.828125 }, - { x: 0.578125, y: 0.828125 }, - { x: 0.578125, y: 0.828125 }, - { x: 0.609375, y: 0.828125 }, - { x: 0.609375, y: 0.828125 }, - { x: 0.640625, y: 0.828125 }, - { x: 0.640625, y: 0.828125 }, - { x: 0.671875, y: 0.828125 }, - { x: 0.671875, y: 0.828125 }, - { x: 0.703125, y: 0.828125 }, - { x: 0.703125, y: 0.828125 }, - { x: 0.734375, y: 0.828125 }, - { x: 0.734375, y: 0.828125 }, - { x: 0.765625, y: 0.828125 }, - { x: 0.765625, y: 0.828125 }, - { x: 0.796875, y: 0.828125 }, - { x: 0.796875, y: 0.828125 }, - { x: 0.828125, y: 0.828125 }, - { x: 0.828125, y: 0.828125 }, - { x: 0.859375, y: 0.828125 }, - { x: 0.859375, y: 0.828125 }, - { x: 0.890625, y: 0.828125 }, - { x: 0.890625, y: 0.828125 }, - { x: 0.921875, y: 0.828125 }, - { x: 0.921875, y: 0.828125 }, - { x: 0.953125, y: 0.828125 }, - { x: 0.953125, y: 0.828125 }, - { x: 0.984375, y: 0.828125 }, - { x: 0.984375, y: 0.828125 }, - { x: 0.015625, y: 0.859375 }, - { x: 0.015625, y: 0.859375 }, - { x: 0.046875, y: 0.859375 }, - { x: 0.046875, y: 0.859375 }, - { x: 0.078125, y: 0.859375 }, - { x: 0.078125, y: 0.859375 }, - { x: 0.109375, y: 0.859375 }, - { x: 0.109375, y: 0.859375 }, - { x: 0.140625, y: 0.859375 }, - { x: 0.140625, y: 0.859375 }, - { x: 0.171875, y: 0.859375 }, - { x: 0.171875, y: 0.859375 }, - { x: 0.203125, y: 0.859375 }, - { x: 0.203125, y: 0.859375 }, - { x: 0.234375, y: 0.859375 }, - { x: 0.234375, y: 0.859375 }, - { x: 0.265625, y: 0.859375 }, - { x: 0.265625, y: 0.859375 }, - { x: 0.296875, y: 0.859375 }, - { x: 0.296875, y: 0.859375 }, - { x: 0.328125, y: 0.859375 }, - { x: 0.328125, y: 0.859375 }, - { x: 0.359375, y: 0.859375 }, - { x: 0.359375, y: 0.859375 }, - { x: 0.390625, y: 0.859375 }, - { x: 0.390625, y: 0.859375 }, - { x: 0.421875, y: 0.859375 }, - { x: 0.421875, y: 0.859375 }, - { x: 0.453125, y: 0.859375 }, - { x: 0.453125, y: 0.859375 }, - { x: 0.484375, y: 0.859375 }, - { x: 0.484375, y: 0.859375 }, - { x: 0.515625, y: 0.859375 }, - { x: 0.515625, y: 0.859375 }, - { x: 0.546875, y: 0.859375 }, - { x: 0.546875, y: 0.859375 }, - { x: 0.578125, y: 0.859375 }, - { x: 0.578125, y: 0.859375 }, - { x: 0.609375, y: 0.859375 }, - { x: 0.609375, y: 0.859375 }, - { x: 0.640625, y: 0.859375 }, - { x: 0.640625, y: 0.859375 }, - { x: 0.671875, y: 0.859375 }, - { x: 0.671875, y: 0.859375 }, - { x: 0.703125, y: 0.859375 }, - { x: 0.703125, y: 0.859375 }, - { x: 0.734375, y: 0.859375 }, - { x: 0.734375, y: 0.859375 }, - { x: 0.765625, y: 0.859375 }, - { x: 0.765625, y: 0.859375 }, - { x: 0.796875, y: 0.859375 }, - { x: 0.796875, y: 0.859375 }, - { x: 0.828125, y: 0.859375 }, - { x: 0.828125, y: 0.859375 }, - { x: 0.859375, y: 0.859375 }, - { x: 0.859375, y: 0.859375 }, - { x: 0.890625, y: 0.859375 }, - { x: 0.890625, y: 0.859375 }, - { x: 0.921875, y: 0.859375 }, - { x: 0.921875, y: 0.859375 }, - { x: 0.953125, y: 0.859375 }, - { x: 0.953125, y: 0.859375 }, - { x: 0.984375, y: 0.859375 }, - { x: 0.984375, y: 0.859375 }, - { x: 0.015625, y: 0.890625 }, - { x: 0.015625, y: 0.890625 }, - { x: 0.046875, y: 0.890625 }, - { x: 0.046875, y: 0.890625 }, - { x: 0.078125, y: 0.890625 }, - { x: 0.078125, y: 0.890625 }, - { x: 0.109375, y: 0.890625 }, - { x: 0.109375, y: 0.890625 }, - { x: 0.140625, y: 0.890625 }, - { x: 0.140625, y: 0.890625 }, - { x: 0.171875, y: 0.890625 }, - { x: 0.171875, y: 0.890625 }, - { x: 0.203125, y: 0.890625 }, - { x: 0.203125, y: 0.890625 }, - { x: 0.234375, y: 0.890625 }, - { x: 0.234375, y: 0.890625 }, - { x: 0.265625, y: 0.890625 }, - { x: 0.265625, y: 0.890625 }, - { x: 0.296875, y: 0.890625 }, - { x: 0.296875, y: 0.890625 }, - { x: 0.328125, y: 0.890625 }, - { x: 0.328125, y: 0.890625 }, - { x: 0.359375, y: 0.890625 }, - { x: 0.359375, y: 0.890625 }, - { x: 0.390625, y: 0.890625 }, - { x: 0.390625, y: 0.890625 }, - { x: 0.421875, y: 0.890625 }, - { x: 0.421875, y: 0.890625 }, - { x: 0.453125, y: 0.890625 }, - { x: 0.453125, y: 0.890625 }, - { x: 0.484375, y: 0.890625 }, - { x: 0.484375, y: 0.890625 }, - { x: 0.515625, y: 0.890625 }, - { x: 0.515625, y: 0.890625 }, - { x: 0.546875, y: 0.890625 }, - { x: 0.546875, y: 0.890625 }, - { x: 0.578125, y: 0.890625 }, - { x: 0.578125, y: 0.890625 }, - { x: 0.609375, y: 0.890625 }, - { x: 0.609375, y: 0.890625 }, - { x: 0.640625, y: 0.890625 }, - { x: 0.640625, y: 0.890625 }, - { x: 0.671875, y: 0.890625 }, - { x: 0.671875, y: 0.890625 }, - { x: 0.703125, y: 0.890625 }, - { x: 0.703125, y: 0.890625 }, - { x: 0.734375, y: 0.890625 }, - { x: 0.734375, y: 0.890625 }, - { x: 0.765625, y: 0.890625 }, - { x: 0.765625, y: 0.890625 }, - { x: 0.796875, y: 0.890625 }, - { x: 0.796875, y: 0.890625 }, - { x: 0.828125, y: 0.890625 }, - { x: 0.828125, y: 0.890625 }, - { x: 0.859375, y: 0.890625 }, - { x: 0.859375, y: 0.890625 }, - { x: 0.890625, y: 0.890625 }, - { x: 0.890625, y: 0.890625 }, - { x: 0.921875, y: 0.890625 }, - { x: 0.921875, y: 0.890625 }, - { x: 0.953125, y: 0.890625 }, - { x: 0.953125, y: 0.890625 }, - { x: 0.984375, y: 0.890625 }, - { x: 0.984375, y: 0.890625 }, - { x: 0.015625, y: 0.921875 }, - { x: 0.015625, y: 0.921875 }, - { x: 0.046875, y: 0.921875 }, - { x: 0.046875, y: 0.921875 }, - { x: 0.078125, y: 0.921875 }, - { x: 0.078125, y: 0.921875 }, - { x: 0.109375, y: 0.921875 }, - { x: 0.109375, y: 0.921875 }, - { x: 0.140625, y: 0.921875 }, - { x: 0.140625, y: 0.921875 }, - { x: 0.171875, y: 0.921875 }, - { x: 0.171875, y: 0.921875 }, - { x: 0.203125, y: 0.921875 }, - { x: 0.203125, y: 0.921875 }, - { x: 0.234375, y: 0.921875 }, - { x: 0.234375, y: 0.921875 }, - { x: 0.265625, y: 0.921875 }, - { x: 0.265625, y: 0.921875 }, - { x: 0.296875, y: 0.921875 }, - { x: 0.296875, y: 0.921875 }, - { x: 0.328125, y: 0.921875 }, - { x: 0.328125, y: 0.921875 }, - { x: 0.359375, y: 0.921875 }, - { x: 0.359375, y: 0.921875 }, - { x: 0.390625, y: 0.921875 }, - { x: 0.390625, y: 0.921875 }, - { x: 0.421875, y: 0.921875 }, - { x: 0.421875, y: 0.921875 }, - { x: 0.453125, y: 0.921875 }, - { x: 0.453125, y: 0.921875 }, - { x: 0.484375, y: 0.921875 }, - { x: 0.484375, y: 0.921875 }, - { x: 0.515625, y: 0.921875 }, - { x: 0.515625, y: 0.921875 }, - { x: 0.546875, y: 0.921875 }, - { x: 0.546875, y: 0.921875 }, - { x: 0.578125, y: 0.921875 }, - { x: 0.578125, y: 0.921875 }, - { x: 0.609375, y: 0.921875 }, - { x: 0.609375, y: 0.921875 }, - { x: 0.640625, y: 0.921875 }, - { x: 0.640625, y: 0.921875 }, - { x: 0.671875, y: 0.921875 }, - { x: 0.671875, y: 0.921875 }, - { x: 0.703125, y: 0.921875 }, - { x: 0.703125, y: 0.921875 }, - { x: 0.734375, y: 0.921875 }, - { x: 0.734375, y: 0.921875 }, - { x: 0.765625, y: 0.921875 }, - { x: 0.765625, y: 0.921875 }, - { x: 0.796875, y: 0.921875 }, - { x: 0.796875, y: 0.921875 }, - { x: 0.828125, y: 0.921875 }, - { x: 0.828125, y: 0.921875 }, - { x: 0.859375, y: 0.921875 }, - { x: 0.859375, y: 0.921875 }, - { x: 0.890625, y: 0.921875 }, - { x: 0.890625, y: 0.921875 }, - { x: 0.921875, y: 0.921875 }, - { x: 0.921875, y: 0.921875 }, - { x: 0.953125, y: 0.921875 }, - { x: 0.953125, y: 0.921875 }, - { x: 0.984375, y: 0.921875 }, - { x: 0.984375, y: 0.921875 }, - { x: 0.015625, y: 0.953125 }, - { x: 0.015625, y: 0.953125 }, - { x: 0.046875, y: 0.953125 }, - { x: 0.046875, y: 0.953125 }, - { x: 0.078125, y: 0.953125 }, - { x: 0.078125, y: 0.953125 }, - { x: 0.109375, y: 0.953125 }, - { x: 0.109375, y: 0.953125 }, - { x: 0.140625, y: 0.953125 }, - { x: 0.140625, y: 0.953125 }, - { x: 0.171875, y: 0.953125 }, - { x: 0.171875, y: 0.953125 }, - { x: 0.203125, y: 0.953125 }, - { x: 0.203125, y: 0.953125 }, - { x: 0.234375, y: 0.953125 }, - { x: 0.234375, y: 0.953125 }, - { x: 0.265625, y: 0.953125 }, - { x: 0.265625, y: 0.953125 }, - { x: 0.296875, y: 0.953125 }, - { x: 0.296875, y: 0.953125 }, - { x: 0.328125, y: 0.953125 }, - { x: 0.328125, y: 0.953125 }, - { x: 0.359375, y: 0.953125 }, - { x: 0.359375, y: 0.953125 }, - { x: 0.390625, y: 0.953125 }, - { x: 0.390625, y: 0.953125 }, - { x: 0.421875, y: 0.953125 }, - { x: 0.421875, y: 0.953125 }, - { x: 0.453125, y: 0.953125 }, - { x: 0.453125, y: 0.953125 }, - { x: 0.484375, y: 0.953125 }, - { x: 0.484375, y: 0.953125 }, - { x: 0.515625, y: 0.953125 }, - { x: 0.515625, y: 0.953125 }, - { x: 0.546875, y: 0.953125 }, - { x: 0.546875, y: 0.953125 }, - { x: 0.578125, y: 0.953125 }, - { x: 0.578125, y: 0.953125 }, - { x: 0.609375, y: 0.953125 }, - { x: 0.609375, y: 0.953125 }, - { x: 0.640625, y: 0.953125 }, - { x: 0.640625, y: 0.953125 }, - { x: 0.671875, y: 0.953125 }, - { x: 0.671875, y: 0.953125 }, - { x: 0.703125, y: 0.953125 }, - { x: 0.703125, y: 0.953125 }, - { x: 0.734375, y: 0.953125 }, - { x: 0.734375, y: 0.953125 }, - { x: 0.765625, y: 0.953125 }, - { x: 0.765625, y: 0.953125 }, - { x: 0.796875, y: 0.953125 }, - { x: 0.796875, y: 0.953125 }, - { x: 0.828125, y: 0.953125 }, - { x: 0.828125, y: 0.953125 }, - { x: 0.859375, y: 0.953125 }, - { x: 0.859375, y: 0.953125 }, - { x: 0.890625, y: 0.953125 }, - { x: 0.890625, y: 0.953125 }, - { x: 0.921875, y: 0.953125 }, - { x: 0.921875, y: 0.953125 }, - { x: 0.953125, y: 0.953125 }, - { x: 0.953125, y: 0.953125 }, - { x: 0.984375, y: 0.953125 }, - { x: 0.984375, y: 0.953125 }, - { x: 0.015625, y: 0.984375 }, - { x: 0.015625, y: 0.984375 }, - { x: 0.046875, y: 0.984375 }, - { x: 0.046875, y: 0.984375 }, - { x: 0.078125, y: 0.984375 }, - { x: 0.078125, y: 0.984375 }, - { x: 0.109375, y: 0.984375 }, - { x: 0.109375, y: 0.984375 }, - { x: 0.140625, y: 0.984375 }, - { x: 0.140625, y: 0.984375 }, - { x: 0.171875, y: 0.984375 }, - { x: 0.171875, y: 0.984375 }, - { x: 0.203125, y: 0.984375 }, - { x: 0.203125, y: 0.984375 }, - { x: 0.234375, y: 0.984375 }, - { x: 0.234375, y: 0.984375 }, - { x: 0.265625, y: 0.984375 }, - { x: 0.265625, y: 0.984375 }, - { x: 0.296875, y: 0.984375 }, - { x: 0.296875, y: 0.984375 }, - { x: 0.328125, y: 0.984375 }, - { x: 0.328125, y: 0.984375 }, - { x: 0.359375, y: 0.984375 }, - { x: 0.359375, y: 0.984375 }, - { x: 0.390625, y: 0.984375 }, - { x: 0.390625, y: 0.984375 }, - { x: 0.421875, y: 0.984375 }, - { x: 0.421875, y: 0.984375 }, - { x: 0.453125, y: 0.984375 }, - { x: 0.453125, y: 0.984375 }, - { x: 0.484375, y: 0.984375 }, - { x: 0.484375, y: 0.984375 }, - { x: 0.515625, y: 0.984375 }, - { x: 0.515625, y: 0.984375 }, - { x: 0.546875, y: 0.984375 }, - { x: 0.546875, y: 0.984375 }, - { x: 0.578125, y: 0.984375 }, - { x: 0.578125, y: 0.984375 }, - { x: 0.609375, y: 0.984375 }, - { x: 0.609375, y: 0.984375 }, - { x: 0.640625, y: 0.984375 }, - { x: 0.640625, y: 0.984375 }, - { x: 0.671875, y: 0.984375 }, - { x: 0.671875, y: 0.984375 }, - { x: 0.703125, y: 0.984375 }, - { x: 0.703125, y: 0.984375 }, - { x: 0.734375, y: 0.984375 }, - { x: 0.734375, y: 0.984375 }, - { x: 0.765625, y: 0.984375 }, - { x: 0.765625, y: 0.984375 }, - { x: 0.796875, y: 0.984375 }, - { x: 0.796875, y: 0.984375 }, - { x: 0.828125, y: 0.984375 }, - { x: 0.828125, y: 0.984375 }, - { x: 0.859375, y: 0.984375 }, - { x: 0.859375, y: 0.984375 }, - { x: 0.890625, y: 0.984375 }, - { x: 0.890625, y: 0.984375 }, - { x: 0.921875, y: 0.984375 }, - { x: 0.921875, y: 0.984375 }, - { x: 0.953125, y: 0.984375 }, - { x: 0.953125, y: 0.984375 }, - { x: 0.984375, y: 0.984375 }, - { x: 0.984375, y: 0.984375 }, - { x: 0.03125, y: 0.03125 }, - { x: 0.03125, y: 0.03125 }, - { x: 0.09375, y: 0.03125 }, - { x: 0.09375, y: 0.03125 }, - { x: 0.15625, y: 0.03125 }, - { x: 0.15625, y: 0.03125 }, - { x: 0.21875, y: 0.03125 }, - { x: 0.21875, y: 0.03125 }, - { x: 0.28125, y: 0.03125 }, - { x: 0.28125, y: 0.03125 }, - { x: 0.34375, y: 0.03125 }, - { x: 0.34375, y: 0.03125 }, - { x: 0.40625, y: 0.03125 }, - { x: 0.40625, y: 0.03125 }, - { x: 0.46875, y: 0.03125 }, - { x: 0.46875, y: 0.03125 }, - { x: 0.53125, y: 0.03125 }, - { x: 0.53125, y: 0.03125 }, - { x: 0.59375, y: 0.03125 }, - { x: 0.59375, y: 0.03125 }, - { x: 0.65625, y: 0.03125 }, - { x: 0.65625, y: 0.03125 }, - { x: 0.71875, y: 0.03125 }, - { x: 0.71875, y: 0.03125 }, - { x: 0.78125, y: 0.03125 }, - { x: 0.78125, y: 0.03125 }, - { x: 0.84375, y: 0.03125 }, - { x: 0.84375, y: 0.03125 }, - { x: 0.90625, y: 0.03125 }, - { x: 0.90625, y: 0.03125 }, - { x: 0.96875, y: 0.03125 }, - { x: 0.96875, y: 0.03125 }, - { x: 0.03125, y: 0.09375 }, - { x: 0.03125, y: 0.09375 }, - { x: 0.09375, y: 0.09375 }, - { x: 0.09375, y: 0.09375 }, - { x: 0.15625, y: 0.09375 }, - { x: 0.15625, y: 0.09375 }, - { x: 0.21875, y: 0.09375 }, - { x: 0.21875, y: 0.09375 }, - { x: 0.28125, y: 0.09375 }, - { x: 0.28125, y: 0.09375 }, - { x: 0.34375, y: 0.09375 }, - { x: 0.34375, y: 0.09375 }, - { x: 0.40625, y: 0.09375 }, - { x: 0.40625, y: 0.09375 }, - { x: 0.46875, y: 0.09375 }, - { x: 0.46875, y: 0.09375 }, - { x: 0.53125, y: 0.09375 }, - { x: 0.53125, y: 0.09375 }, - { x: 0.59375, y: 0.09375 }, - { x: 0.59375, y: 0.09375 }, - { x: 0.65625, y: 0.09375 }, - { x: 0.65625, y: 0.09375 }, - { x: 0.71875, y: 0.09375 }, - { x: 0.71875, y: 0.09375 }, - { x: 0.78125, y: 0.09375 }, - { x: 0.78125, y: 0.09375 }, - { x: 0.84375, y: 0.09375 }, - { x: 0.84375, y: 0.09375 }, - { x: 0.90625, y: 0.09375 }, - { x: 0.90625, y: 0.09375 }, - { x: 0.96875, y: 0.09375 }, - { x: 0.96875, y: 0.09375 }, - { x: 0.03125, y: 0.15625 }, - { x: 0.03125, y: 0.15625 }, - { x: 0.09375, y: 0.15625 }, - { x: 0.09375, y: 0.15625 }, - { x: 0.15625, y: 0.15625 }, - { x: 0.15625, y: 0.15625 }, - { x: 0.21875, y: 0.15625 }, - { x: 0.21875, y: 0.15625 }, - { x: 0.28125, y: 0.15625 }, - { x: 0.28125, y: 0.15625 }, - { x: 0.34375, y: 0.15625 }, - { x: 0.34375, y: 0.15625 }, - { x: 0.40625, y: 0.15625 }, - { x: 0.40625, y: 0.15625 }, - { x: 0.46875, y: 0.15625 }, - { x: 0.46875, y: 0.15625 }, - { x: 0.53125, y: 0.15625 }, - { x: 0.53125, y: 0.15625 }, - { x: 0.59375, y: 0.15625 }, - { x: 0.59375, y: 0.15625 }, - { x: 0.65625, y: 0.15625 }, - { x: 0.65625, y: 0.15625 }, - { x: 0.71875, y: 0.15625 }, - { x: 0.71875, y: 0.15625 }, - { x: 0.78125, y: 0.15625 }, - { x: 0.78125, y: 0.15625 }, - { x: 0.84375, y: 0.15625 }, - { x: 0.84375, y: 0.15625 }, - { x: 0.90625, y: 0.15625 }, - { x: 0.90625, y: 0.15625 }, - { x: 0.96875, y: 0.15625 }, - { x: 0.96875, y: 0.15625 }, - { x: 0.03125, y: 0.21875 }, - { x: 0.03125, y: 0.21875 }, - { x: 0.09375, y: 0.21875 }, - { x: 0.09375, y: 0.21875 }, - { x: 0.15625, y: 0.21875 }, - { x: 0.15625, y: 0.21875 }, - { x: 0.21875, y: 0.21875 }, - { x: 0.21875, y: 0.21875 }, - { x: 0.28125, y: 0.21875 }, - { x: 0.28125, y: 0.21875 }, - { x: 0.34375, y: 0.21875 }, - { x: 0.34375, y: 0.21875 }, - { x: 0.40625, y: 0.21875 }, - { x: 0.40625, y: 0.21875 }, - { x: 0.46875, y: 0.21875 }, - { x: 0.46875, y: 0.21875 }, - { x: 0.53125, y: 0.21875 }, - { x: 0.53125, y: 0.21875 }, - { x: 0.59375, y: 0.21875 }, - { x: 0.59375, y: 0.21875 }, - { x: 0.65625, y: 0.21875 }, - { x: 0.65625, y: 0.21875 }, - { x: 0.71875, y: 0.21875 }, - { x: 0.71875, y: 0.21875 }, - { x: 0.78125, y: 0.21875 }, - { x: 0.78125, y: 0.21875 }, - { x: 0.84375, y: 0.21875 }, - { x: 0.84375, y: 0.21875 }, - { x: 0.90625, y: 0.21875 }, - { x: 0.90625, y: 0.21875 }, - { x: 0.96875, y: 0.21875 }, - { x: 0.96875, y: 0.21875 }, - { x: 0.03125, y: 0.28125 }, - { x: 0.03125, y: 0.28125 }, - { x: 0.09375, y: 0.28125 }, - { x: 0.09375, y: 0.28125 }, - { x: 0.15625, y: 0.28125 }, - { x: 0.15625, y: 0.28125 }, - { x: 0.21875, y: 0.28125 }, - { x: 0.21875, y: 0.28125 }, - { x: 0.28125, y: 0.28125 }, - { x: 0.28125, y: 0.28125 }, - { x: 0.34375, y: 0.28125 }, - { x: 0.34375, y: 0.28125 }, - { x: 0.40625, y: 0.28125 }, - { x: 0.40625, y: 0.28125 }, - { x: 0.46875, y: 0.28125 }, - { x: 0.46875, y: 0.28125 }, - { x: 0.53125, y: 0.28125 }, - { x: 0.53125, y: 0.28125 }, - { x: 0.59375, y: 0.28125 }, - { x: 0.59375, y: 0.28125 }, - { x: 0.65625, y: 0.28125 }, - { x: 0.65625, y: 0.28125 }, - { x: 0.71875, y: 0.28125 }, - { x: 0.71875, y: 0.28125 }, - { x: 0.78125, y: 0.28125 }, - { x: 0.78125, y: 0.28125 }, - { x: 0.84375, y: 0.28125 }, - { x: 0.84375, y: 0.28125 }, - { x: 0.90625, y: 0.28125 }, - { x: 0.90625, y: 0.28125 }, - { x: 0.96875, y: 0.28125 }, - { x: 0.96875, y: 0.28125 }, - { x: 0.03125, y: 0.34375 }, - { x: 0.03125, y: 0.34375 }, - { x: 0.09375, y: 0.34375 }, - { x: 0.09375, y: 0.34375 }, - { x: 0.15625, y: 0.34375 }, - { x: 0.15625, y: 0.34375 }, - { x: 0.21875, y: 0.34375 }, - { x: 0.21875, y: 0.34375 }, - { x: 0.28125, y: 0.34375 }, - { x: 0.28125, y: 0.34375 }, - { x: 0.34375, y: 0.34375 }, - { x: 0.34375, y: 0.34375 }, - { x: 0.40625, y: 0.34375 }, - { x: 0.40625, y: 0.34375 }, - { x: 0.46875, y: 0.34375 }, - { x: 0.46875, y: 0.34375 }, - { x: 0.53125, y: 0.34375 }, - { x: 0.53125, y: 0.34375 }, - { x: 0.59375, y: 0.34375 }, - { x: 0.59375, y: 0.34375 }, - { x: 0.65625, y: 0.34375 }, - { x: 0.65625, y: 0.34375 }, - { x: 0.71875, y: 0.34375 }, - { x: 0.71875, y: 0.34375 }, - { x: 0.78125, y: 0.34375 }, - { x: 0.78125, y: 0.34375 }, - { x: 0.84375, y: 0.34375 }, - { x: 0.84375, y: 0.34375 }, - { x: 0.90625, y: 0.34375 }, - { x: 0.90625, y: 0.34375 }, - { x: 0.96875, y: 0.34375 }, - { x: 0.96875, y: 0.34375 }, - { x: 0.03125, y: 0.40625 }, - { x: 0.03125, y: 0.40625 }, - { x: 0.09375, y: 0.40625 }, - { x: 0.09375, y: 0.40625 }, - { x: 0.15625, y: 0.40625 }, - { x: 0.15625, y: 0.40625 }, - { x: 0.21875, y: 0.40625 }, - { x: 0.21875, y: 0.40625 }, - { x: 0.28125, y: 0.40625 }, - { x: 0.28125, y: 0.40625 }, - { x: 0.34375, y: 0.40625 }, - { x: 0.34375, y: 0.40625 }, - { x: 0.40625, y: 0.40625 }, - { x: 0.40625, y: 0.40625 }, - { x: 0.46875, y: 0.40625 }, - { x: 0.46875, y: 0.40625 }, - { x: 0.53125, y: 0.40625 }, - { x: 0.53125, y: 0.40625 }, - { x: 0.59375, y: 0.40625 }, - { x: 0.59375, y: 0.40625 }, - { x: 0.65625, y: 0.40625 }, - { x: 0.65625, y: 0.40625 }, - { x: 0.71875, y: 0.40625 }, - { x: 0.71875, y: 0.40625 }, - { x: 0.78125, y: 0.40625 }, - { x: 0.78125, y: 0.40625 }, - { x: 0.84375, y: 0.40625 }, - { x: 0.84375, y: 0.40625 }, - { x: 0.90625, y: 0.40625 }, - { x: 0.90625, y: 0.40625 }, - { x: 0.96875, y: 0.40625 }, - { x: 0.96875, y: 0.40625 }, - { x: 0.03125, y: 0.46875 }, - { x: 0.03125, y: 0.46875 }, - { x: 0.09375, y: 0.46875 }, - { x: 0.09375, y: 0.46875 }, - { x: 0.15625, y: 0.46875 }, - { x: 0.15625, y: 0.46875 }, - { x: 0.21875, y: 0.46875 }, - { x: 0.21875, y: 0.46875 }, - { x: 0.28125, y: 0.46875 }, - { x: 0.28125, y: 0.46875 }, - { x: 0.34375, y: 0.46875 }, - { x: 0.34375, y: 0.46875 }, - { x: 0.40625, y: 0.46875 }, - { x: 0.40625, y: 0.46875 }, - { x: 0.46875, y: 0.46875 }, - { x: 0.46875, y: 0.46875 }, - { x: 0.53125, y: 0.46875 }, - { x: 0.53125, y: 0.46875 }, - { x: 0.59375, y: 0.46875 }, - { x: 0.59375, y: 0.46875 }, - { x: 0.65625, y: 0.46875 }, - { x: 0.65625, y: 0.46875 }, - { x: 0.71875, y: 0.46875 }, - { x: 0.71875, y: 0.46875 }, - { x: 0.78125, y: 0.46875 }, - { x: 0.78125, y: 0.46875 }, - { x: 0.84375, y: 0.46875 }, - { x: 0.84375, y: 0.46875 }, - { x: 0.90625, y: 0.46875 }, - { x: 0.90625, y: 0.46875 }, - { x: 0.96875, y: 0.46875 }, - { x: 0.96875, y: 0.46875 }, - { x: 0.03125, y: 0.53125 }, - { x: 0.03125, y: 0.53125 }, - { x: 0.09375, y: 0.53125 }, - { x: 0.09375, y: 0.53125 }, - { x: 0.15625, y: 0.53125 }, - { x: 0.15625, y: 0.53125 }, - { x: 0.21875, y: 0.53125 }, - { x: 0.21875, y: 0.53125 }, - { x: 0.28125, y: 0.53125 }, - { x: 0.28125, y: 0.53125 }, - { x: 0.34375, y: 0.53125 }, - { x: 0.34375, y: 0.53125 }, - { x: 0.40625, y: 0.53125 }, - { x: 0.40625, y: 0.53125 }, - { x: 0.46875, y: 0.53125 }, - { x: 0.46875, y: 0.53125 }, - { x: 0.53125, y: 0.53125 }, - { x: 0.53125, y: 0.53125 }, - { x: 0.59375, y: 0.53125 }, - { x: 0.59375, y: 0.53125 }, - { x: 0.65625, y: 0.53125 }, - { x: 0.65625, y: 0.53125 }, - { x: 0.71875, y: 0.53125 }, - { x: 0.71875, y: 0.53125 }, - { x: 0.78125, y: 0.53125 }, - { x: 0.78125, y: 0.53125 }, - { x: 0.84375, y: 0.53125 }, - { x: 0.84375, y: 0.53125 }, - { x: 0.90625, y: 0.53125 }, - { x: 0.90625, y: 0.53125 }, - { x: 0.96875, y: 0.53125 }, - { x: 0.96875, y: 0.53125 }, - { x: 0.03125, y: 0.59375 }, - { x: 0.03125, y: 0.59375 }, - { x: 0.09375, y: 0.59375 }, - { x: 0.09375, y: 0.59375 }, - { x: 0.15625, y: 0.59375 }, - { x: 0.15625, y: 0.59375 }, - { x: 0.21875, y: 0.59375 }, - { x: 0.21875, y: 0.59375 }, - { x: 0.28125, y: 0.59375 }, - { x: 0.28125, y: 0.59375 }, - { x: 0.34375, y: 0.59375 }, - { x: 0.34375, y: 0.59375 }, - { x: 0.40625, y: 0.59375 }, - { x: 0.40625, y: 0.59375 }, - { x: 0.46875, y: 0.59375 }, - { x: 0.46875, y: 0.59375 }, - { x: 0.53125, y: 0.59375 }, - { x: 0.53125, y: 0.59375 }, - { x: 0.59375, y: 0.59375 }, - { x: 0.59375, y: 0.59375 }, - { x: 0.65625, y: 0.59375 }, - { x: 0.65625, y: 0.59375 }, - { x: 0.71875, y: 0.59375 }, - { x: 0.71875, y: 0.59375 }, - { x: 0.78125, y: 0.59375 }, - { x: 0.78125, y: 0.59375 }, - { x: 0.84375, y: 0.59375 }, - { x: 0.84375, y: 0.59375 }, - { x: 0.90625, y: 0.59375 }, - { x: 0.90625, y: 0.59375 }, - { x: 0.96875, y: 0.59375 }, - { x: 0.96875, y: 0.59375 }, - { x: 0.03125, y: 0.65625 }, - { x: 0.03125, y: 0.65625 }, - { x: 0.09375, y: 0.65625 }, - { x: 0.09375, y: 0.65625 }, - { x: 0.15625, y: 0.65625 }, - { x: 0.15625, y: 0.65625 }, - { x: 0.21875, y: 0.65625 }, - { x: 0.21875, y: 0.65625 }, - { x: 0.28125, y: 0.65625 }, - { x: 0.28125, y: 0.65625 }, - { x: 0.34375, y: 0.65625 }, - { x: 0.34375, y: 0.65625 }, - { x: 0.40625, y: 0.65625 }, - { x: 0.40625, y: 0.65625 }, - { x: 0.46875, y: 0.65625 }, - { x: 0.46875, y: 0.65625 }, - { x: 0.53125, y: 0.65625 }, - { x: 0.53125, y: 0.65625 }, - { x: 0.59375, y: 0.65625 }, - { x: 0.59375, y: 0.65625 }, - { x: 0.65625, y: 0.65625 }, - { x: 0.65625, y: 0.65625 }, - { x: 0.71875, y: 0.65625 }, - { x: 0.71875, y: 0.65625 }, - { x: 0.78125, y: 0.65625 }, - { x: 0.78125, y: 0.65625 }, - { x: 0.84375, y: 0.65625 }, - { x: 0.84375, y: 0.65625 }, - { x: 0.90625, y: 0.65625 }, - { x: 0.90625, y: 0.65625 }, - { x: 0.96875, y: 0.65625 }, - { x: 0.96875, y: 0.65625 }, - { x: 0.03125, y: 0.71875 }, - { x: 0.03125, y: 0.71875 }, - { x: 0.09375, y: 0.71875 }, - { x: 0.09375, y: 0.71875 }, - { x: 0.15625, y: 0.71875 }, - { x: 0.15625, y: 0.71875 }, - { x: 0.21875, y: 0.71875 }, - { x: 0.21875, y: 0.71875 }, - { x: 0.28125, y: 0.71875 }, - { x: 0.28125, y: 0.71875 }, - { x: 0.34375, y: 0.71875 }, - { x: 0.34375, y: 0.71875 }, - { x: 0.40625, y: 0.71875 }, - { x: 0.40625, y: 0.71875 }, - { x: 0.46875, y: 0.71875 }, - { x: 0.46875, y: 0.71875 }, - { x: 0.53125, y: 0.71875 }, - { x: 0.53125, y: 0.71875 }, - { x: 0.59375, y: 0.71875 }, - { x: 0.59375, y: 0.71875 }, - { x: 0.65625, y: 0.71875 }, - { x: 0.65625, y: 0.71875 }, - { x: 0.71875, y: 0.71875 }, - { x: 0.71875, y: 0.71875 }, - { x: 0.78125, y: 0.71875 }, - { x: 0.78125, y: 0.71875 }, - { x: 0.84375, y: 0.71875 }, - { x: 0.84375, y: 0.71875 }, - { x: 0.90625, y: 0.71875 }, - { x: 0.90625, y: 0.71875 }, - { x: 0.96875, y: 0.71875 }, - { x: 0.96875, y: 0.71875 }, - { x: 0.03125, y: 0.78125 }, - { x: 0.03125, y: 0.78125 }, - { x: 0.09375, y: 0.78125 }, - { x: 0.09375, y: 0.78125 }, - { x: 0.15625, y: 0.78125 }, - { x: 0.15625, y: 0.78125 }, - { x: 0.21875, y: 0.78125 }, - { x: 0.21875, y: 0.78125 }, - { x: 0.28125, y: 0.78125 }, - { x: 0.28125, y: 0.78125 }, - { x: 0.34375, y: 0.78125 }, - { x: 0.34375, y: 0.78125 }, - { x: 0.40625, y: 0.78125 }, - { x: 0.40625, y: 0.78125 }, - { x: 0.46875, y: 0.78125 }, - { x: 0.46875, y: 0.78125 }, - { x: 0.53125, y: 0.78125 }, - { x: 0.53125, y: 0.78125 }, - { x: 0.59375, y: 0.78125 }, - { x: 0.59375, y: 0.78125 }, - { x: 0.65625, y: 0.78125 }, - { x: 0.65625, y: 0.78125 }, - { x: 0.71875, y: 0.78125 }, - { x: 0.71875, y: 0.78125 }, - { x: 0.78125, y: 0.78125 }, - { x: 0.78125, y: 0.78125 }, - { x: 0.84375, y: 0.78125 }, - { x: 0.84375, y: 0.78125 }, - { x: 0.90625, y: 0.78125 }, - { x: 0.90625, y: 0.78125 }, - { x: 0.96875, y: 0.78125 }, - { x: 0.96875, y: 0.78125 }, - { x: 0.03125, y: 0.84375 }, - { x: 0.03125, y: 0.84375 }, - { x: 0.09375, y: 0.84375 }, - { x: 0.09375, y: 0.84375 }, - { x: 0.15625, y: 0.84375 }, - { x: 0.15625, y: 0.84375 }, - { x: 0.21875, y: 0.84375 }, - { x: 0.21875, y: 0.84375 }, - { x: 0.28125, y: 0.84375 }, - { x: 0.28125, y: 0.84375 }, - { x: 0.34375, y: 0.84375 }, - { x: 0.34375, y: 0.84375 }, - { x: 0.40625, y: 0.84375 }, - { x: 0.40625, y: 0.84375 }, - { x: 0.46875, y: 0.84375 }, - { x: 0.46875, y: 0.84375 }, - { x: 0.53125, y: 0.84375 }, - { x: 0.53125, y: 0.84375 }, - { x: 0.59375, y: 0.84375 }, - { x: 0.59375, y: 0.84375 }, - { x: 0.65625, y: 0.84375 }, - { x: 0.65625, y: 0.84375 }, - { x: 0.71875, y: 0.84375 }, - { x: 0.71875, y: 0.84375 }, - { x: 0.78125, y: 0.84375 }, - { x: 0.78125, y: 0.84375 }, - { x: 0.84375, y: 0.84375 }, - { x: 0.84375, y: 0.84375 }, - { x: 0.90625, y: 0.84375 }, - { x: 0.90625, y: 0.84375 }, - { x: 0.96875, y: 0.84375 }, - { x: 0.96875, y: 0.84375 }, - { x: 0.03125, y: 0.90625 }, - { x: 0.03125, y: 0.90625 }, - { x: 0.09375, y: 0.90625 }, - { x: 0.09375, y: 0.90625 }, - { x: 0.15625, y: 0.90625 }, - { x: 0.15625, y: 0.90625 }, - { x: 0.21875, y: 0.90625 }, - { x: 0.21875, y: 0.90625 }, - { x: 0.28125, y: 0.90625 }, - { x: 0.28125, y: 0.90625 }, - { x: 0.34375, y: 0.90625 }, - { x: 0.34375, y: 0.90625 }, - { x: 0.40625, y: 0.90625 }, - { x: 0.40625, y: 0.90625 }, - { x: 0.46875, y: 0.90625 }, - { x: 0.46875, y: 0.90625 }, - { x: 0.53125, y: 0.90625 }, - { x: 0.53125, y: 0.90625 }, - { x: 0.59375, y: 0.90625 }, - { x: 0.59375, y: 0.90625 }, - { x: 0.65625, y: 0.90625 }, - { x: 0.65625, y: 0.90625 }, - { x: 0.71875, y: 0.90625 }, - { x: 0.71875, y: 0.90625 }, - { x: 0.78125, y: 0.90625 }, - { x: 0.78125, y: 0.90625 }, - { x: 0.84375, y: 0.90625 }, - { x: 0.84375, y: 0.90625 }, - { x: 0.90625, y: 0.90625 }, - { x: 0.90625, y: 0.90625 }, - { x: 0.96875, y: 0.90625 }, - { x: 0.96875, y: 0.90625 }, - { x: 0.03125, y: 0.96875 }, - { x: 0.03125, y: 0.96875 }, - { x: 0.09375, y: 0.96875 }, - { x: 0.09375, y: 0.96875 }, - { x: 0.15625, y: 0.96875 }, - { x: 0.15625, y: 0.96875 }, - { x: 0.21875, y: 0.96875 }, - { x: 0.21875, y: 0.96875 }, - { x: 0.28125, y: 0.96875 }, - { x: 0.28125, y: 0.96875 }, - { x: 0.34375, y: 0.96875 }, - { x: 0.34375, y: 0.96875 }, - { x: 0.40625, y: 0.96875 }, - { x: 0.40625, y: 0.96875 }, - { x: 0.46875, y: 0.96875 }, - { x: 0.46875, y: 0.96875 }, - { x: 0.53125, y: 0.96875 }, - { x: 0.53125, y: 0.96875 }, - { x: 0.59375, y: 0.96875 }, - { x: 0.59375, y: 0.96875 }, - { x: 0.65625, y: 0.96875 }, - { x: 0.65625, y: 0.96875 }, - { x: 0.71875, y: 0.96875 }, - { x: 0.71875, y: 0.96875 }, - { x: 0.78125, y: 0.96875 }, - { x: 0.78125, y: 0.96875 }, - { x: 0.84375, y: 0.96875 }, - { x: 0.84375, y: 0.96875 }, - { x: 0.90625, y: 0.96875 }, - { x: 0.90625, y: 0.96875 }, - { x: 0.96875, y: 0.96875 }, - { x: 0.96875, y: 0.96875 }, - { x: 0.0625, y: 0.0625 }, - { x: 0.0625, y: 0.0625 }, - { x: 0.0625, y: 0.0625 }, - { x: 0.0625, y: 0.0625 }, - { x: 0.0625, y: 0.0625 }, - { x: 0.0625, y: 0.0625 }, - { x: 0.1875, y: 0.0625 }, - { x: 0.1875, y: 0.0625 }, - { x: 0.1875, y: 0.0625 }, - { x: 0.1875, y: 0.0625 }, - { x: 0.1875, y: 0.0625 }, - { x: 0.1875, y: 0.0625 }, - { x: 0.3125, y: 0.0625 }, - { x: 0.3125, y: 0.0625 }, - { x: 0.3125, y: 0.0625 }, - { x: 0.3125, y: 0.0625 }, - { x: 0.3125, y: 0.0625 }, - { x: 0.3125, y: 0.0625 }, - { x: 0.4375, y: 0.0625 }, - { x: 0.4375, y: 0.0625 }, - { x: 0.4375, y: 0.0625 }, - { x: 0.4375, y: 0.0625 }, - { x: 0.4375, y: 0.0625 }, - { x: 0.4375, y: 0.0625 }, - { x: 0.5625, y: 0.0625 }, - { x: 0.5625, y: 0.0625 }, - { x: 0.5625, y: 0.0625 }, - { x: 0.5625, y: 0.0625 }, - { x: 0.5625, y: 0.0625 }, - { x: 0.5625, y: 0.0625 }, - { x: 0.6875, y: 0.0625 }, - { x: 0.6875, y: 0.0625 }, - { x: 0.6875, y: 0.0625 }, - { x: 0.6875, y: 0.0625 }, - { x: 0.6875, y: 0.0625 }, - { x: 0.6875, y: 0.0625 }, - { x: 0.8125, y: 0.0625 }, - { x: 0.8125, y: 0.0625 }, - { x: 0.8125, y: 0.0625 }, - { x: 0.8125, y: 0.0625 }, - { x: 0.8125, y: 0.0625 }, - { x: 0.8125, y: 0.0625 }, - { x: 0.9375, y: 0.0625 }, - { x: 0.9375, y: 0.0625 }, - { x: 0.9375, y: 0.0625 }, - { x: 0.9375, y: 0.0625 }, - { x: 0.9375, y: 0.0625 }, - { x: 0.9375, y: 0.0625 }, - { x: 0.0625, y: 0.1875 }, - { x: 0.0625, y: 0.1875 }, - { x: 0.0625, y: 0.1875 }, - { x: 0.0625, y: 0.1875 }, - { x: 0.0625, y: 0.1875 }, - { x: 0.0625, y: 0.1875 }, - { x: 0.1875, y: 0.1875 }, - { x: 0.1875, y: 0.1875 }, - { x: 0.1875, y: 0.1875 }, - { x: 0.1875, y: 0.1875 }, - { x: 0.1875, y: 0.1875 }, - { x: 0.1875, y: 0.1875 }, - { x: 0.3125, y: 0.1875 }, - { x: 0.3125, y: 0.1875 }, - { x: 0.3125, y: 0.1875 }, - { x: 0.3125, y: 0.1875 }, - { x: 0.3125, y: 0.1875 }, - { x: 0.3125, y: 0.1875 }, - { x: 0.4375, y: 0.1875 }, - { x: 0.4375, y: 0.1875 }, - { x: 0.4375, y: 0.1875 }, - { x: 0.4375, y: 0.1875 }, - { x: 0.4375, y: 0.1875 }, - { x: 0.4375, y: 0.1875 }, - { x: 0.5625, y: 0.1875 }, - { x: 0.5625, y: 0.1875 }, - { x: 0.5625, y: 0.1875 }, - { x: 0.5625, y: 0.1875 }, - { x: 0.5625, y: 0.1875 }, - { x: 0.5625, y: 0.1875 }, - { x: 0.6875, y: 0.1875 }, - { x: 0.6875, y: 0.1875 }, - { x: 0.6875, y: 0.1875 }, - { x: 0.6875, y: 0.1875 }, - { x: 0.6875, y: 0.1875 }, - { x: 0.6875, y: 0.1875 }, - { x: 0.8125, y: 0.1875 }, - { x: 0.8125, y: 0.1875 }, - { x: 0.8125, y: 0.1875 }, - { x: 0.8125, y: 0.1875 }, - { x: 0.8125, y: 0.1875 }, - { x: 0.8125, y: 0.1875 }, - { x: 0.9375, y: 0.1875 }, - { x: 0.9375, y: 0.1875 }, - { x: 0.9375, y: 0.1875 }, - { x: 0.9375, y: 0.1875 }, - { x: 0.9375, y: 0.1875 }, - { x: 0.9375, y: 0.1875 }, - { x: 0.0625, y: 0.3125 }, - { x: 0.0625, y: 0.3125 }, - { x: 0.0625, y: 0.3125 }, - { x: 0.0625, y: 0.3125 }, - { x: 0.0625, y: 0.3125 }, - { x: 0.0625, y: 0.3125 }, - { x: 0.1875, y: 0.3125 }, - { x: 0.1875, y: 0.3125 }, - { x: 0.1875, y: 0.3125 }, - { x: 0.1875, y: 0.3125 }, - { x: 0.1875, y: 0.3125 }, - { x: 0.1875, y: 0.3125 }, - { x: 0.3125, y: 0.3125 }, - { x: 0.3125, y: 0.3125 }, - { x: 0.3125, y: 0.3125 }, - { x: 0.3125, y: 0.3125 }, - { x: 0.3125, y: 0.3125 }, - { x: 0.3125, y: 0.3125 }, - { x: 0.4375, y: 0.3125 }, - { x: 0.4375, y: 0.3125 }, - { x: 0.4375, y: 0.3125 }, - { x: 0.4375, y: 0.3125 }, - { x: 0.4375, y: 0.3125 }, - { x: 0.4375, y: 0.3125 }, - { x: 0.5625, y: 0.3125 }, - { x: 0.5625, y: 0.3125 }, - { x: 0.5625, y: 0.3125 }, - { x: 0.5625, y: 0.3125 }, - { x: 0.5625, y: 0.3125 }, - { x: 0.5625, y: 0.3125 }, - { x: 0.6875, y: 0.3125 }, - { x: 0.6875, y: 0.3125 }, - { x: 0.6875, y: 0.3125 }, - { x: 0.6875, y: 0.3125 }, - { x: 0.6875, y: 0.3125 }, - { x: 0.6875, y: 0.3125 }, - { x: 0.8125, y: 0.3125 }, - { x: 0.8125, y: 0.3125 }, - { x: 0.8125, y: 0.3125 }, - { x: 0.8125, y: 0.3125 }, - { x: 0.8125, y: 0.3125 }, - { x: 0.8125, y: 0.3125 }, - { x: 0.9375, y: 0.3125 }, - { x: 0.9375, y: 0.3125 }, - { x: 0.9375, y: 0.3125 }, - { x: 0.9375, y: 0.3125 }, - { x: 0.9375, y: 0.3125 }, - { x: 0.9375, y: 0.3125 }, - { x: 0.0625, y: 0.4375 }, - { x: 0.0625, y: 0.4375 }, - { x: 0.0625, y: 0.4375 }, - { x: 0.0625, y: 0.4375 }, - { x: 0.0625, y: 0.4375 }, - { x: 0.0625, y: 0.4375 }, - { x: 0.1875, y: 0.4375 }, - { x: 0.1875, y: 0.4375 }, - { x: 0.1875, y: 0.4375 }, - { x: 0.1875, y: 0.4375 }, - { x: 0.1875, y: 0.4375 }, - { x: 0.1875, y: 0.4375 }, - { x: 0.3125, y: 0.4375 }, - { x: 0.3125, y: 0.4375 }, - { x: 0.3125, y: 0.4375 }, - { x: 0.3125, y: 0.4375 }, - { x: 0.3125, y: 0.4375 }, - { x: 0.3125, y: 0.4375 }, - { x: 0.4375, y: 0.4375 }, - { x: 0.4375, y: 0.4375 }, - { x: 0.4375, y: 0.4375 }, - { x: 0.4375, y: 0.4375 }, - { x: 0.4375, y: 0.4375 }, - { x: 0.4375, y: 0.4375 }, - { x: 0.5625, y: 0.4375 }, - { x: 0.5625, y: 0.4375 }, - { x: 0.5625, y: 0.4375 }, - { x: 0.5625, y: 0.4375 }, - { x: 0.5625, y: 0.4375 }, - { x: 0.5625, y: 0.4375 }, - { x: 0.6875, y: 0.4375 }, - { x: 0.6875, y: 0.4375 }, - { x: 0.6875, y: 0.4375 }, - { x: 0.6875, y: 0.4375 }, - { x: 0.6875, y: 0.4375 }, - { x: 0.6875, y: 0.4375 }, - { x: 0.8125, y: 0.4375 }, - { x: 0.8125, y: 0.4375 }, - { x: 0.8125, y: 0.4375 }, - { x: 0.8125, y: 0.4375 }, - { x: 0.8125, y: 0.4375 }, - { x: 0.8125, y: 0.4375 }, - { x: 0.9375, y: 0.4375 }, - { x: 0.9375, y: 0.4375 }, - { x: 0.9375, y: 0.4375 }, - { x: 0.9375, y: 0.4375 }, - { x: 0.9375, y: 0.4375 }, - { x: 0.9375, y: 0.4375 }, - { x: 0.0625, y: 0.5625 }, - { x: 0.0625, y: 0.5625 }, - { x: 0.0625, y: 0.5625 }, - { x: 0.0625, y: 0.5625 }, - { x: 0.0625, y: 0.5625 }, - { x: 0.0625, y: 0.5625 }, - { x: 0.1875, y: 0.5625 }, - { x: 0.1875, y: 0.5625 }, - { x: 0.1875, y: 0.5625 }, - { x: 0.1875, y: 0.5625 }, - { x: 0.1875, y: 0.5625 }, - { x: 0.1875, y: 0.5625 }, - { x: 0.3125, y: 0.5625 }, - { x: 0.3125, y: 0.5625 }, - { x: 0.3125, y: 0.5625 }, - { x: 0.3125, y: 0.5625 }, - { x: 0.3125, y: 0.5625 }, - { x: 0.3125, y: 0.5625 }, - { x: 0.4375, y: 0.5625 }, - { x: 0.4375, y: 0.5625 }, - { x: 0.4375, y: 0.5625 }, - { x: 0.4375, y: 0.5625 }, - { x: 0.4375, y: 0.5625 }, - { x: 0.4375, y: 0.5625 }, - { x: 0.5625, y: 0.5625 }, - { x: 0.5625, y: 0.5625 }, - { x: 0.5625, y: 0.5625 }, - { x: 0.5625, y: 0.5625 }, - { x: 0.5625, y: 0.5625 }, - { x: 0.5625, y: 0.5625 }, - { x: 0.6875, y: 0.5625 }, - { x: 0.6875, y: 0.5625 }, - { x: 0.6875, y: 0.5625 }, - { x: 0.6875, y: 0.5625 }, - { x: 0.6875, y: 0.5625 }, - { x: 0.6875, y: 0.5625 }, - { x: 0.8125, y: 0.5625 }, - { x: 0.8125, y: 0.5625 }, - { x: 0.8125, y: 0.5625 }, - { x: 0.8125, y: 0.5625 }, - { x: 0.8125, y: 0.5625 }, - { x: 0.8125, y: 0.5625 }, - { x: 0.9375, y: 0.5625 }, - { x: 0.9375, y: 0.5625 }, - { x: 0.9375, y: 0.5625 }, - { x: 0.9375, y: 0.5625 }, - { x: 0.9375, y: 0.5625 }, - { x: 0.9375, y: 0.5625 }, - { x: 0.0625, y: 0.6875 }, - { x: 0.0625, y: 0.6875 }, - { x: 0.0625, y: 0.6875 }, - { x: 0.0625, y: 0.6875 }, - { x: 0.0625, y: 0.6875 }, - { x: 0.0625, y: 0.6875 }, - { x: 0.1875, y: 0.6875 }, - { x: 0.1875, y: 0.6875 }, - { x: 0.1875, y: 0.6875 }, - { x: 0.1875, y: 0.6875 }, - { x: 0.1875, y: 0.6875 }, - { x: 0.1875, y: 0.6875 }, - { x: 0.3125, y: 0.6875 }, - { x: 0.3125, y: 0.6875 }, - { x: 0.3125, y: 0.6875 }, - { x: 0.3125, y: 0.6875 }, - { x: 0.3125, y: 0.6875 }, - { x: 0.3125, y: 0.6875 }, - { x: 0.4375, y: 0.6875 }, - { x: 0.4375, y: 0.6875 }, - { x: 0.4375, y: 0.6875 }, - { x: 0.4375, y: 0.6875 }, - { x: 0.4375, y: 0.6875 }, - { x: 0.4375, y: 0.6875 }, - { x: 0.5625, y: 0.6875 }, - { x: 0.5625, y: 0.6875 }, - { x: 0.5625, y: 0.6875 }, - { x: 0.5625, y: 0.6875 }, - { x: 0.5625, y: 0.6875 }, - { x: 0.5625, y: 0.6875 }, - { x: 0.6875, y: 0.6875 }, - { x: 0.6875, y: 0.6875 }, - { x: 0.6875, y: 0.6875 }, - { x: 0.6875, y: 0.6875 }, - { x: 0.6875, y: 0.6875 }, - { x: 0.6875, y: 0.6875 }, - { x: 0.8125, y: 0.6875 }, - { x: 0.8125, y: 0.6875 }, - { x: 0.8125, y: 0.6875 }, - { x: 0.8125, y: 0.6875 }, - { x: 0.8125, y: 0.6875 }, - { x: 0.8125, y: 0.6875 }, - { x: 0.9375, y: 0.6875 }, - { x: 0.9375, y: 0.6875 }, - { x: 0.9375, y: 0.6875 }, - { x: 0.9375, y: 0.6875 }, - { x: 0.9375, y: 0.6875 }, - { x: 0.9375, y: 0.6875 }, - { x: 0.0625, y: 0.8125 }, - { x: 0.0625, y: 0.8125 }, - { x: 0.0625, y: 0.8125 }, - { x: 0.0625, y: 0.8125 }, - { x: 0.0625, y: 0.8125 }, - { x: 0.0625, y: 0.8125 }, - { x: 0.1875, y: 0.8125 }, - { x: 0.1875, y: 0.8125 }, - { x: 0.1875, y: 0.8125 }, - { x: 0.1875, y: 0.8125 }, - { x: 0.1875, y: 0.8125 }, - { x: 0.1875, y: 0.8125 }, - { x: 0.3125, y: 0.8125 }, - { x: 0.3125, y: 0.8125 }, - { x: 0.3125, y: 0.8125 }, - { x: 0.3125, y: 0.8125 }, - { x: 0.3125, y: 0.8125 }, - { x: 0.3125, y: 0.8125 }, - { x: 0.4375, y: 0.8125 }, - { x: 0.4375, y: 0.8125 }, - { x: 0.4375, y: 0.8125 }, - { x: 0.4375, y: 0.8125 }, - { x: 0.4375, y: 0.8125 }, - { x: 0.4375, y: 0.8125 }, - { x: 0.5625, y: 0.8125 }, - { x: 0.5625, y: 0.8125 }, - { x: 0.5625, y: 0.8125 }, - { x: 0.5625, y: 0.8125 }, - { x: 0.5625, y: 0.8125 }, - { x: 0.5625, y: 0.8125 }, - { x: 0.6875, y: 0.8125 }, - { x: 0.6875, y: 0.8125 }, - { x: 0.6875, y: 0.8125 }, - { x: 0.6875, y: 0.8125 }, - { x: 0.6875, y: 0.8125 }, - { x: 0.6875, y: 0.8125 }, - { x: 0.8125, y: 0.8125 }, - { x: 0.8125, y: 0.8125 }, - { x: 0.8125, y: 0.8125 }, - { x: 0.8125, y: 0.8125 }, - { x: 0.8125, y: 0.8125 }, - { x: 0.8125, y: 0.8125 }, - { x: 0.9375, y: 0.8125 }, - { x: 0.9375, y: 0.8125 }, - { x: 0.9375, y: 0.8125 }, - { x: 0.9375, y: 0.8125 }, - { x: 0.9375, y: 0.8125 }, - { x: 0.9375, y: 0.8125 }, - { x: 0.0625, y: 0.9375 }, - { x: 0.0625, y: 0.9375 }, - { x: 0.0625, y: 0.9375 }, - { x: 0.0625, y: 0.9375 }, - { x: 0.0625, y: 0.9375 }, - { x: 0.0625, y: 0.9375 }, - { x: 0.1875, y: 0.9375 }, - { x: 0.1875, y: 0.9375 }, - { x: 0.1875, y: 0.9375 }, - { x: 0.1875, y: 0.9375 }, - { x: 0.1875, y: 0.9375 }, - { x: 0.1875, y: 0.9375 }, - { x: 0.3125, y: 0.9375 }, - { x: 0.3125, y: 0.9375 }, - { x: 0.3125, y: 0.9375 }, - { x: 0.3125, y: 0.9375 }, - { x: 0.3125, y: 0.9375 }, - { x: 0.3125, y: 0.9375 }, - { x: 0.4375, y: 0.9375 }, - { x: 0.4375, y: 0.9375 }, - { x: 0.4375, y: 0.9375 }, - { x: 0.4375, y: 0.9375 }, - { x: 0.4375, y: 0.9375 }, - { x: 0.4375, y: 0.9375 }, - { x: 0.5625, y: 0.9375 }, - { x: 0.5625, y: 0.9375 }, - { x: 0.5625, y: 0.9375 }, - { x: 0.5625, y: 0.9375 }, - { x: 0.5625, y: 0.9375 }, - { x: 0.5625, y: 0.9375 }, - { x: 0.6875, y: 0.9375 }, - { x: 0.6875, y: 0.9375 }, - { x: 0.6875, y: 0.9375 }, - { x: 0.6875, y: 0.9375 }, - { x: 0.6875, y: 0.9375 }, - { x: 0.6875, y: 0.9375 }, - { x: 0.8125, y: 0.9375 }, - { x: 0.8125, y: 0.9375 }, - { x: 0.8125, y: 0.9375 }, - { x: 0.8125, y: 0.9375 }, - { x: 0.8125, y: 0.9375 }, - { x: 0.8125, y: 0.9375 }, - { x: 0.9375, y: 0.9375 }, - { x: 0.9375, y: 0.9375 }, - { x: 0.9375, y: 0.9375 }, - { x: 0.9375, y: 0.9375 }, - { x: 0.9375, y: 0.9375 }, - { x: 0.9375, y: 0.9375 } -]; - -// src/hand/handposedetector.ts -var HandDetector = class { - constructor(model21) { - __publicField(this, "model"); - __publicField(this, "anchors"); - __publicField(this, "anchorsTensor"); - __publicField(this, "inputSize"); - __publicField(this, "inputSizeTensor"); - __publicField(this, "doubleInputSizeTensor"); - var _a, _b, _c, _d; - this.model = model21; - this.anchors = anchors2.map((anchor) => [anchor.x, anchor.y]); - this.anchorsTensor = tf19.tensor2d(this.anchors); - this.inputSize = ((_d = (_c = (_b = (_a = this == null ? void 0 : this.model) == null ? void 0 : _a.inputs) == null ? void 0 : _b[0]) == null ? void 0 : _c.shape) == null ? void 0 : _d[2]) || 0; - this.inputSizeTensor = tf19.tensor1d([this.inputSize, this.inputSize]); - this.doubleInputSizeTensor = tf19.tensor1d([this.inputSize * 2, this.inputSize * 2]); - } - normalizeBoxes(boxes) { - const t2 = {}; - t2.boxOffsets = tf19.slice(boxes, [0, 0], [-1, 2]); - t2.boxSizes = tf19.slice(boxes, [0, 2], [-1, 2]); - t2.div = tf19.div(t2.boxOffsets, this.inputSizeTensor); - t2.boxCenterPoints = tf19.add(t2.div, this.anchorsTensor); - t2.halfBoxSizes = tf19.div(t2.boxSizes, this.doubleInputSizeTensor); - t2.sub = tf19.sub(t2.boxCenterPoints, t2.halfBoxSizes); - t2.startPoints = tf19.mul(t2.sub, this.inputSizeTensor); - t2.add = tf19.add(t2.boxCenterPoints, t2.halfBoxSizes); - t2.endPoints = tf19.mul(t2.add, this.inputSizeTensor); - const res = tf19.concat2d([t2.startPoints, t2.endPoints], 1); - Object.keys(t2).forEach((tensor6) => tf19.dispose(t2[tensor6])); - return res; - } - normalizeLandmarks(rawPalmLandmarks, index2) { - const t2 = {}; - t2.reshape = tf19.reshape(rawPalmLandmarks, [-1, 7, 2]); - t2.div = tf19.div(t2.reshape, this.inputSizeTensor); - t2.landmarks = tf19.add(t2.div, this.anchors[index2] ? this.anchors[index2] : 0); - const res = tf19.mul(t2.landmarks, this.inputSizeTensor); - Object.keys(t2).forEach((tensor6) => tf19.dispose(t2[tensor6])); - return res; - } - async predict(input, config3) { - var _a; - const t2 = {}; - t2.resize = tf19.image.resizeBilinear(input, [this.inputSize, this.inputSize]); - t2.div = tf19.div(t2.resize, constants.tf127); - t2.image = tf19.sub(t2.div, constants.tf1); - t2.batched = this.model.execute(t2.image); - t2.predictions = tf19.squeeze(t2.batched); - t2.slice = tf19.slice(t2.predictions, [0, 0], [-1, 1]); - t2.sigmoid = tf19.sigmoid(t2.slice); - t2.scores = tf19.squeeze(t2.sigmoid); - const scores = await t2.scores.data(); - t2.boxes = tf19.slice(t2.predictions, [0, 1], [-1, 4]); - t2.norm = this.normalizeBoxes(t2.boxes); - t2.nms = await tf19.image.nonMaxSuppressionAsync(t2.norm, t2.scores, 3 * (((_a = config3.hand) == null ? void 0 : _a.maxDetected) || 1), config3.hand.iouThreshold, config3.hand.minConfidence); - const nms = await t2.nms.array(); - const hands = []; - for (const index2 of nms) { - const p = {}; - p.box = tf19.slice(t2.norm, [index2, 0], [1, -1]); - p.slice = tf19.slice(t2.predictions, [index2, 5], [1, 14]); - p.norm = this.normalizeLandmarks(p.slice, index2); - p.palmLandmarks = tf19.reshape(p.norm, [-1, 2]); - const box = await p.box.data(); - const startPoint = box.slice(0, 2); - const endPoint = box.slice(2, 4); - const palmLandmarks = await p.palmLandmarks.array(); - const hand3 = { startPoint, endPoint, palmLandmarks, confidence: scores[index2] }; - const scaled = scaleBoxCoordinates2(hand3, [(input.shape[2] || 1) / this.inputSize, (input.shape[1] || 0) / this.inputSize]); - hands.push(scaled); - Object.keys(p).forEach((tensor6) => tf19.dispose(p[tensor6])); - } - Object.keys(t2).forEach((tensor6) => tf19.dispose(t2[tensor6])); - return hands; - } -}; - -// src/hand/handposepipeline.ts -var tf20 = __toESM(require_tfjs_esm()); -var palmBoxEnlargeFactor = 5; -var handBoxEnlargeFactor = 1.65; -var palmLandmarkIds = [0, 5, 9, 13, 17, 1, 2]; -var palmLandmarksPalmBase = 0; -var palmLandmarksMiddleFingerBase = 2; -var lastTime8 = 0; -var HandPipeline = class { - constructor(handDetector, handPoseModel2) { - __publicField(this, "handDetector"); - __publicField(this, "handPoseModel"); - __publicField(this, "inputSize"); - __publicField(this, "storedBoxes"); - __publicField(this, "skipped"); - __publicField(this, "detectedHands"); - var _a, _b, _c; - this.handDetector = handDetector; - this.handPoseModel = handPoseModel2; - this.inputSize = ((_c = (_b = (_a = this.handPoseModel) == null ? void 0 : _a.inputs) == null ? void 0 : _b[0].shape) == null ? void 0 : _c[2]) || 0; - this.storedBoxes = []; - this.skipped = Number.MAX_SAFE_INTEGER; - this.detectedHands = 0; - } - calculateLandmarksBoundingBox(landmarks) { - const xs = landmarks.map((d) => d[0]); - const ys = landmarks.map((d) => d[1]); - const startPoint = [Math.min(...xs), Math.min(...ys)]; - const endPoint = [Math.max(...xs), Math.max(...ys)]; - return { startPoint, endPoint }; - } - getBoxForPalmLandmarks(palmLandmarks, rotationMatrix) { - const rotatedPalmLandmarks = palmLandmarks.map((coord) => rotatePoint2([...coord, 1], rotationMatrix)); - const boxAroundPalm = this.calculateLandmarksBoundingBox(rotatedPalmLandmarks); - return enlargeBox2(squarifyBox2(boxAroundPalm), palmBoxEnlargeFactor); - } - getBoxForHandLandmarks(landmarks) { - const boundingBox = this.calculateLandmarksBoundingBox(landmarks); - const boxAroundHand = enlargeBox2(squarifyBox2(boundingBox), handBoxEnlargeFactor); - boxAroundHand.palmLandmarks = []; - for (let i = 0; i < palmLandmarkIds.length; i++) { - boxAroundHand.palmLandmarks.push(landmarks[palmLandmarkIds[i]].slice(0, 2)); - } - return boxAroundHand; - } - transformRawCoords(rawCoords, box2, angle, rotationMatrix) { - const boxSize = getBoxSize2(box2); - const scaleFactor = [boxSize[0] / this.inputSize, boxSize[1] / this.inputSize, (boxSize[0] + boxSize[1]) / this.inputSize / 2]; - const coordsScaled = rawCoords.map((coord) => [ - scaleFactor[0] * (coord[0] - this.inputSize / 2), - scaleFactor[1] * (coord[1] - this.inputSize / 2), - scaleFactor[2] * coord[2] - ]); - const coordsRotationMatrix = buildRotationMatrix2(angle, [0, 0]); - const coordsRotated = coordsScaled.map((coord) => { - const rotated = rotatePoint2(coord, coordsRotationMatrix); - return [...rotated, coord[2]]; - }); - const inverseRotationMatrix = invertTransformMatrix2(rotationMatrix); - const boxCenter = [...getBoxCenter2(box2), 1]; - const originalBoxCenter = [ - dot2(boxCenter, inverseRotationMatrix[0]), - dot2(boxCenter, inverseRotationMatrix[1]) - ]; - return coordsRotated.map((coord) => [ - Math.trunc(coord[0] + originalBoxCenter[0]), - Math.trunc(coord[1] + originalBoxCenter[1]), - Math.trunc(coord[2]) - ]); - } - async estimateHands(image27, config3) { - let useFreshBox = false; - let boxes; - const skipTime = (config3.hand.skipTime || 0) > now() - lastTime8; - const skipFrame = this.skipped < (config3.hand.skipFrames || 0); - if (config3.skipAllowed && skipTime && skipFrame) { - boxes = await this.handDetector.predict(image27, config3); - this.skipped = 0; - } - if (config3.skipAllowed) - this.skipped++; - if (boxes && boxes.length > 0 && (boxes.length !== this.detectedHands && this.detectedHands !== config3.hand.maxDetected || !config3.hand.landmarks)) { - this.detectedHands = 0; - this.storedBoxes = [...boxes]; - if (this.storedBoxes.length > 0) - useFreshBox = true; - } - const hands = []; - for (let i = 0; i < this.storedBoxes.length; i++) { - const currentBox = this.storedBoxes[i]; - if (!currentBox) - continue; - if (config3.hand.landmarks) { - const angle = config3.hand.rotation ? computeRotation2(currentBox.palmLandmarks[palmLandmarksPalmBase], currentBox.palmLandmarks[palmLandmarksMiddleFingerBase]) : 0; - const palmCenter = getBoxCenter2(currentBox); - const palmCenterNormalized = [palmCenter[0] / image27.shape[2], palmCenter[1] / image27.shape[1]]; - const rotatedImage = config3.hand.rotation && env.kernels.includes("rotatewithoffset") ? tf20.image.rotateWithOffset(image27, angle, 0, palmCenterNormalized) : image27.clone(); - const rotationMatrix = buildRotationMatrix2(-angle, palmCenter); - const newBox = useFreshBox ? this.getBoxForPalmLandmarks(currentBox.palmLandmarks, rotationMatrix) : currentBox; - const croppedInput = cutBoxFromImageAndResize(newBox, rotatedImage, [this.inputSize, this.inputSize]); - const handImage = tf20.div(croppedInput, constants.tf255); - tf20.dispose(croppedInput); - tf20.dispose(rotatedImage); - const [confidenceT, keypoints] = this.handPoseModel.execute(handImage); - lastTime8 = now(); - tf20.dispose(handImage); - const confidence = (await confidenceT.data())[0]; - tf20.dispose(confidenceT); - if (confidence >= config3.hand.minConfidence / 4) { - const keypointsReshaped = tf20.reshape(keypoints, [-1, 3]); - const rawCoords = await keypointsReshaped.array(); - tf20.dispose(keypoints); - tf20.dispose(keypointsReshaped); - const coords = this.transformRawCoords(rawCoords, newBox, angle, rotationMatrix); - const nextBoundingBox = this.getBoxForHandLandmarks(coords); - this.storedBoxes[i] = { ...nextBoundingBox, confidence }; - const result = { - landmarks: coords, - confidence, - boxConfidence: currentBox.confidence, - fingerConfidence: confidence, - box: { topLeft: nextBoundingBox.startPoint, bottomRight: nextBoundingBox.endPoint } - }; - hands.push(result); - } else { - this.storedBoxes[i] = null; - } - tf20.dispose(keypoints); - } else { - const enlarged = enlargeBox2(squarifyBox2(currentBox), handBoxEnlargeFactor); - const result = { - confidence: currentBox.confidence, - boxConfidence: currentBox.confidence, - fingerConfidence: 0, - box: { topLeft: enlarged.startPoint, bottomRight: enlarged.endPoint }, - landmarks: [] - }; - hands.push(result); - } - } - this.storedBoxes = this.storedBoxes.filter((a) => a !== null); - this.detectedHands = hands.length; - if (hands.length > config3.hand.maxDetected) - hands.length = config3.hand.maxDetected; - return hands; - } -}; - -// src/hand/fingerdef.ts -var Finger = { - thumb: 0, - index: 1, - middle: 2, - ring: 3, - pinky: 4, - all: [0, 1, 2, 3, 4], - nameMapping: { 0: "thumb", 1: "index", 2: "middle", 3: "ring", 4: "pinky" }, - pointsMapping: { - 0: [[0, 1], [1, 2], [2, 3], [3, 4]], - 1: [[0, 5], [5, 6], [6, 7], [7, 8]], - 2: [[0, 9], [9, 10], [10, 11], [11, 12]], - 3: [[0, 13], [13, 14], [14, 15], [15, 16]], - 4: [[0, 17], [17, 18], [18, 19], [19, 20]] - }, - getName: (value) => Finger.nameMapping[value], - getPoints: (value) => Finger.pointsMapping[value] -}; -var FingerCurl = { - none: 0, - half: 1, - full: 2, - nameMapping: { 0: "none", 1: "half", 2: "full" }, - getName: (value) => FingerCurl.nameMapping[value] -}; -var FingerDirection = { - verticalUp: 0, - verticalDown: 1, - horizontalLeft: 2, - horizontalRight: 3, - diagonalUpRight: 4, - diagonalUpLeft: 5, - diagonalDownRight: 6, - diagonalDownLeft: 7, - nameMapping: { 0: "verticalUp", 1: "verticalDown", 2: "horizontalLeft", 3: "horizontalRight", 4: "diagonalUpRight", 5: "diagonalUpLeft", 6: "diagonalDownRight", 7: "diagonalDownLeft" }, - getName: (value) => FingerDirection.nameMapping[value] -}; -var FingerGesture = class { - constructor(name) { - __publicField(this, "name"); - __publicField(this, "curls"); - __publicField(this, "directions"); - __publicField(this, "weights"); - __publicField(this, "weightsRelative"); - this.name = name; - this.curls = {}; - this.directions = {}; - this.weights = [1, 1, 1, 1, 1]; - this.weightsRelative = [1, 1, 1, 1, 1]; - } - curl(finger, curl, confidence) { - if (typeof this.curls[finger] === "undefined") - this.curls[finger] = []; - this.curls[finger].push([curl, confidence]); - } - direction(finger, position, confidence) { - if (!this.directions[finger]) - this.directions[finger] = []; - this.directions[finger].push([position, confidence]); - } - weight(finger, weight) { - this.weights[finger] = weight; - const total = this.weights.reduce((a, b) => a + b, 0); - this.weightsRelative = this.weights.map((el) => el * 5 / total); - } - matchAgainst(detectedCurls, detectedDirections) { - let confidence = 0; - for (const fingerIdx in detectedCurls) { - const detectedCurl = detectedCurls[fingerIdx]; - const expectedCurls = this.curls[fingerIdx]; - if (typeof expectedCurls === "undefined") { - confidence += this.weightsRelative[fingerIdx]; - continue; - } - for (const [expectedCurl, score] of expectedCurls) { - if (detectedCurl === expectedCurl) { - confidence += score * this.weightsRelative[fingerIdx]; - break; - } - } - } - for (const fingerIdx in detectedDirections) { - const detectedDirection = detectedDirections[fingerIdx]; - const expectedDirections = this.directions[fingerIdx]; - if (typeof expectedDirections === "undefined") { - confidence += this.weightsRelative[fingerIdx]; - continue; - } - for (const [expectedDirection, score] of expectedDirections) { - if (detectedDirection === expectedDirection) { - confidence += score * this.weightsRelative[fingerIdx]; - break; - } - } - } - return confidence / 10; - } -}; - -// src/hand/fingergesture.ts -var { thumb, index, middle, ring, pinky } = Finger; -var { none, half, full } = FingerCurl; -var { verticalUp, verticalDown, horizontalLeft, horizontalRight, diagonalUpRight, diagonalUpLeft, diagonalDownRight, diagonalDownLeft } = FingerDirection; -var ThumbsUp = new FingerGesture("thumbs up"); -ThumbsUp.curl(thumb, none, 1); -ThumbsUp.direction(thumb, verticalUp, 1); -ThumbsUp.direction(thumb, diagonalUpLeft, 0.25); -ThumbsUp.direction(thumb, diagonalUpRight, 0.25); -for (const finger of [Finger.index, Finger.middle, Finger.ring, Finger.pinky]) { - ThumbsUp.curl(finger, full, 1); - ThumbsUp.direction(finger, horizontalLeft, 1); - ThumbsUp.direction(finger, horizontalRight, 1); -} -var Victory = new FingerGesture("victory"); -Victory.curl(thumb, half, 0.5); -Victory.curl(thumb, none, 0.5); -Victory.direction(thumb, verticalUp, 1); -Victory.direction(thumb, diagonalUpLeft, 1); -Victory.curl(index, none, 1); -Victory.direction(index, verticalUp, 0.75); -Victory.direction(index, diagonalUpLeft, 1); -Victory.curl(middle, none, 1); -Victory.direction(middle, verticalUp, 1); -Victory.direction(middle, diagonalUpLeft, 0.75); -Victory.curl(ring, full, 1); -Victory.direction(ring, verticalUp, 0.2); -Victory.direction(ring, diagonalUpLeft, 1); -Victory.direction(ring, horizontalLeft, 0.2); -Victory.curl(pinky, full, 1); -Victory.direction(pinky, verticalUp, 0.2); -Victory.direction(pinky, diagonalUpLeft, 1); -Victory.direction(pinky, horizontalLeft, 0.2); -Victory.weight(index, 2); -Victory.weight(middle, 2); -var Point = new FingerGesture("point"); -Point.curl(thumb, full, 1); -Point.curl(index, none, 0.5); -Point.curl(middle, full, 0.5); -Point.curl(ring, full, 0.5); -Point.curl(pinky, full, 0.5); -Point.weight(index, 2); -Point.weight(middle, 2); -var MiddleFinger = new FingerGesture("middle finger"); -MiddleFinger.curl(thumb, none, 1); -MiddleFinger.curl(index, full, 0.5); -MiddleFinger.curl(middle, full, 0.5); -MiddleFinger.curl(ring, full, 0.5); -MiddleFinger.curl(pinky, full, 0.5); -MiddleFinger.weight(index, 2); -MiddleFinger.weight(middle, 2); -var OpenPalm = new FingerGesture("open palm"); -OpenPalm.curl(thumb, none, 0.75); -OpenPalm.curl(index, none, 0.75); -OpenPalm.curl(middle, none, 0.75); -OpenPalm.curl(ring, none, 0.75); -OpenPalm.curl(pinky, none, 0.75); -var fingergesture_default = [ThumbsUp, Victory, Point, MiddleFinger, OpenPalm]; - -// src/hand/fingerpose.ts -var minConfidence = 0.7; -var options2 = { - HALF_CURL_START_LIMIT: 60, - NO_CURL_START_LIMIT: 130, - DISTANCE_VOTE_POWER: 1.1, - SINGLE_ANGLE_VOTE_POWER: 0.9, - TOTAL_ANGLE_VOTE_POWER: 1.6 -}; -function calculateSlope(point1x, point1y, point2x, point2y) { - const value = (point1y - point2y) / (point1x - point2x); - let slope = Math.atan(value) * 180 / Math.PI; - if (slope <= 0) - slope = -slope; - else if (slope > 0) - slope = 180 - slope; - return slope; -} -function getSlopes(point1, point2) { - if (!point1 || !point2) - return [0, 0]; - const slopeXY = calculateSlope(point1[0], point1[1], point2[0], point2[1]); - if (point1.length === 2) - return slopeXY; - const slopeYZ = calculateSlope(point1[1], point1[2], point2[1], point2[2]); - return [slopeXY, slopeYZ]; -} -function angleOrientationAt(angle, weightageAt = 1) { - let isVertical = 0; - let isDiagonal = 0; - let isHorizontal = 0; - if (angle >= 75 && angle <= 105) - isVertical = 1 * weightageAt; - else if (angle >= 25 && angle <= 155) - isDiagonal = 1 * weightageAt; - else - isHorizontal = 1 * weightageAt; - return [isVertical, isDiagonal, isHorizontal]; -} -function estimateFingerCurl(startPoint, midPoint, endPoint) { - const start_mid_x_dist = startPoint[0] - midPoint[0]; - const start_end_x_dist = startPoint[0] - endPoint[0]; - const mid_end_x_dist = midPoint[0] - endPoint[0]; - const start_mid_y_dist = startPoint[1] - midPoint[1]; - const start_end_y_dist = startPoint[1] - endPoint[1]; - const mid_end_y_dist = midPoint[1] - endPoint[1]; - const start_mid_z_dist = startPoint[2] - midPoint[2]; - const start_end_z_dist = startPoint[2] - endPoint[2]; - const mid_end_z_dist = midPoint[2] - endPoint[2]; - const start_mid_dist = Math.sqrt(start_mid_x_dist * start_mid_x_dist + start_mid_y_dist * start_mid_y_dist + start_mid_z_dist * start_mid_z_dist); - const start_end_dist = Math.sqrt(start_end_x_dist * start_end_x_dist + start_end_y_dist * start_end_y_dist + start_end_z_dist * start_end_z_dist); - const mid_end_dist = Math.sqrt(mid_end_x_dist * mid_end_x_dist + mid_end_y_dist * mid_end_y_dist + mid_end_z_dist * mid_end_z_dist); - let cos_in = (mid_end_dist * mid_end_dist + start_mid_dist * start_mid_dist - start_end_dist * start_end_dist) / (2 * mid_end_dist * start_mid_dist); - if (cos_in > 1) - cos_in = 1; - else if (cos_in < -1) - cos_in = -1; - let angleOfCurve = Math.acos(cos_in); - angleOfCurve = 57.2958 * angleOfCurve % 180; - let fingerCurl; - if (angleOfCurve > options2.NO_CURL_START_LIMIT) - fingerCurl = FingerCurl.none; - else if (angleOfCurve > options2.HALF_CURL_START_LIMIT) - fingerCurl = FingerCurl.half; - else - fingerCurl = FingerCurl.full; - return fingerCurl; -} -function estimateHorizontalDirection(start_end_x_dist, start_mid_x_dist, mid_end_x_dist, max_dist_x) { - let estimatedDirection; - if (max_dist_x === Math.abs(start_end_x_dist)) { - if (start_end_x_dist > 0) - estimatedDirection = FingerDirection.horizontalLeft; - else - estimatedDirection = FingerDirection.horizontalRight; - } else if (max_dist_x === Math.abs(start_mid_x_dist)) { - if (start_mid_x_dist > 0) - estimatedDirection = FingerDirection.horizontalLeft; - else - estimatedDirection = FingerDirection.horizontalRight; - } else { - if (mid_end_x_dist > 0) - estimatedDirection = FingerDirection.horizontalLeft; - else - estimatedDirection = FingerDirection.horizontalRight; - } - return estimatedDirection; -} -function estimateVerticalDirection(start_end_y_dist, start_mid_y_dist, mid_end_y_dist, max_dist_y) { - let estimatedDirection; - if (max_dist_y === Math.abs(start_end_y_dist)) { - if (start_end_y_dist < 0) - estimatedDirection = FingerDirection.verticalDown; - else - estimatedDirection = FingerDirection.verticalUp; - } else if (max_dist_y === Math.abs(start_mid_y_dist)) { - if (start_mid_y_dist < 0) - estimatedDirection = FingerDirection.verticalDown; - else - estimatedDirection = FingerDirection.verticalUp; - } else { - if (mid_end_y_dist < 0) - estimatedDirection = FingerDirection.verticalDown; - else - estimatedDirection = FingerDirection.verticalUp; - } - return estimatedDirection; -} -function estimateDiagonalDirection(start_end_y_dist, start_mid_y_dist, mid_end_y_dist, max_dist_y, start_end_x_dist, start_mid_x_dist, mid_end_x_dist, max_dist_x) { - let estimatedDirection; - const reqd_vertical_direction = estimateVerticalDirection(start_end_y_dist, start_mid_y_dist, mid_end_y_dist, max_dist_y); - const reqd_horizontal_direction = estimateHorizontalDirection(start_end_x_dist, start_mid_x_dist, mid_end_x_dist, max_dist_x); - if (reqd_vertical_direction === FingerDirection.verticalUp) { - if (reqd_horizontal_direction === FingerDirection.horizontalLeft) - estimatedDirection = FingerDirection.diagonalUpLeft; - else - estimatedDirection = FingerDirection.diagonalUpRight; - } else { - if (reqd_horizontal_direction === FingerDirection.horizontalLeft) - estimatedDirection = FingerDirection.diagonalDownLeft; - else - estimatedDirection = FingerDirection.diagonalDownRight; - } - return estimatedDirection; -} -function calculateFingerDirection(startPoint, midPoint, endPoint, fingerSlopes) { - const start_mid_x_dist = startPoint[0] - midPoint[0]; - const start_end_x_dist = startPoint[0] - endPoint[0]; - const mid_end_x_dist = midPoint[0] - endPoint[0]; - const start_mid_y_dist = startPoint[1] - midPoint[1]; - const start_end_y_dist = startPoint[1] - endPoint[1]; - const mid_end_y_dist = midPoint[1] - endPoint[1]; - const max_dist_x = Math.max(Math.abs(start_mid_x_dist), Math.abs(start_end_x_dist), Math.abs(mid_end_x_dist)); - const max_dist_y = Math.max(Math.abs(start_mid_y_dist), Math.abs(start_end_y_dist), Math.abs(mid_end_y_dist)); - let voteVertical = 0; - let voteDiagonal = 0; - let voteHorizontal = 0; - const start_end_x_y_dist_ratio = max_dist_y / (max_dist_x + 1e-5); - if (start_end_x_y_dist_ratio > 1.5) - voteVertical += options2.DISTANCE_VOTE_POWER; - else if (start_end_x_y_dist_ratio > 0.66) - voteDiagonal += options2.DISTANCE_VOTE_POWER; - else - voteHorizontal += options2.DISTANCE_VOTE_POWER; - const start_mid_dist = Math.sqrt(start_mid_x_dist * start_mid_x_dist + start_mid_y_dist * start_mid_y_dist); - const start_end_dist = Math.sqrt(start_end_x_dist * start_end_x_dist + start_end_y_dist * start_end_y_dist); - const mid_end_dist = Math.sqrt(mid_end_x_dist * mid_end_x_dist + mid_end_y_dist * mid_end_y_dist); - const max_dist = Math.max(start_mid_dist, start_end_dist, mid_end_dist); - let calc_start_point_x = startPoint[0]; - let calc_start_point_y = startPoint[1]; - let calc_end_point_x = endPoint[0]; - let calc_end_point_y = endPoint[1]; - if (max_dist === start_mid_dist) { - calc_end_point_x = endPoint[0]; - calc_end_point_y = endPoint[1]; - } else if (max_dist === mid_end_dist) { - calc_start_point_x = midPoint[0]; - calc_start_point_y = midPoint[1]; - } - const calcStartPoint = [calc_start_point_x, calc_start_point_y]; - const calcEndPoint = [calc_end_point_x, calc_end_point_y]; - const totalAngle = getSlopes(calcStartPoint, calcEndPoint); - const votes = angleOrientationAt(totalAngle, options2.TOTAL_ANGLE_VOTE_POWER); - voteVertical += votes[0]; - voteDiagonal += votes[1]; - voteHorizontal += votes[2]; - for (const fingerSlope of fingerSlopes) { - const fingerVotes = angleOrientationAt(fingerSlope, options2.SINGLE_ANGLE_VOTE_POWER); - voteVertical += fingerVotes[0]; - voteDiagonal += fingerVotes[1]; - voteHorizontal += fingerVotes[2]; - } - let estimatedDirection; - if (voteVertical === Math.max(voteVertical, voteDiagonal, voteHorizontal)) { - estimatedDirection = estimateVerticalDirection(start_end_y_dist, start_mid_y_dist, mid_end_y_dist, max_dist_y); - } else if (voteHorizontal === Math.max(voteDiagonal, voteHorizontal)) { - estimatedDirection = estimateHorizontalDirection(start_end_x_dist, start_mid_x_dist, mid_end_x_dist, max_dist_x); - } else { - estimatedDirection = estimateDiagonalDirection(start_end_y_dist, start_mid_y_dist, mid_end_y_dist, max_dist_y, start_end_x_dist, start_mid_x_dist, mid_end_x_dist, max_dist_x); - } - return estimatedDirection; -} -function estimate(landmarks) { - const slopesXY = []; - const slopesYZ = []; - const fingerCurls = []; - const fingerDirections = []; - if (!landmarks) - return { curls: fingerCurls, directions: fingerDirections }; - for (const finger of Finger.all) { - const points = Finger.getPoints(finger); - const slopeAtXY = []; - const slopeAtYZ = []; - for (const point2 of points) { - const point1 = landmarks[point2[0]]; - const point22 = landmarks[point2[1]]; - const slopes = getSlopes(point1, point22); - const slopeXY = slopes[0]; - const slopeYZ = slopes[1]; - slopeAtXY.push(slopeXY); - slopeAtYZ.push(slopeYZ); - } - slopesXY.push(slopeAtXY); - slopesYZ.push(slopeAtYZ); - } - for (const finger of Finger.all) { - const pointIndexAt = finger === Finger.thumb ? 1 : 0; - const fingerPointsAt = Finger.getPoints(finger); - const startPoint = landmarks[fingerPointsAt[pointIndexAt][0]]; - const midPoint = landmarks[fingerPointsAt[pointIndexAt + 1][1]]; - const endPoint = landmarks[fingerPointsAt[3][1]]; - const fingerCurled = estimateFingerCurl(startPoint, midPoint, endPoint); - const fingerPosition = calculateFingerDirection(startPoint, midPoint, endPoint, slopesXY[finger].slice(pointIndexAt)); - fingerCurls[finger] = fingerCurled; - fingerDirections[finger] = fingerPosition; - } - return { curls: fingerCurls, directions: fingerDirections }; -} -function analyze(keypoints) { - if (!keypoints || keypoints.length === 0) - return null; - const estimatorRes = estimate(keypoints); - const landmarks = {}; - for (const fingerIdx of Finger.all) { - landmarks[Finger.getName(fingerIdx)] = { - curl: FingerCurl.getName(estimatorRes.curls[fingerIdx]), - direction: FingerDirection.getName(estimatorRes.directions[fingerIdx]) - }; - } - return landmarks; -} -function match(keypoints) { - const poses = []; - if (!keypoints || keypoints.length === 0) - return poses; - const estimatorRes = estimate(keypoints); - for (const gesture2 of fingergesture_default) { - const confidence = gesture2.matchAgainst(estimatorRes.curls, estimatorRes.directions); - if (confidence >= minConfidence) - poses.push({ name: gesture2.name, confidence }); - } - return poses; -} - -// src/hand/handpose.ts -var meshAnnotations2 = { - thumb: [1, 2, 3, 4], - index: [5, 6, 7, 8], - middle: [9, 10, 11, 12], - ring: [13, 14, 15, 16], - pinky: [17, 18, 19, 20], - palm: [0] -}; -var handDetectorModel; -var handPoseModel; -var handPipeline; -async function predict9(input, config3) { - const predictions = await handPipeline.estimateHands(input, config3); - if (!predictions) - return []; - const hands = []; - for (let i = 0; i < predictions.length; i++) { - const annotations2 = {}; - if (predictions[i].landmarks) { - for (const key of Object.keys(meshAnnotations2)) { - annotations2[key] = meshAnnotations2[key].map((index2) => predictions[i].landmarks[index2]); - } - } - const keypoints = predictions[i].landmarks; - let box = [Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER, 0, 0]; - let boxRaw = [0, 0, 0, 0]; - if (keypoints && keypoints.length > 0) { - for (const pt of keypoints) { - if (pt[0] < box[0]) - box[0] = pt[0]; - if (pt[1] < box[1]) - box[1] = pt[1]; - if (pt[0] > box[2]) - box[2] = pt[0]; - if (pt[1] > box[3]) - box[3] = pt[1]; - } - box[2] -= box[0]; - box[3] -= box[1]; - boxRaw = [box[0] / (input.shape[2] || 0), box[1] / (input.shape[1] || 0), box[2] / (input.shape[2] || 0), box[3] / (input.shape[1] || 0)]; - } else { - box = predictions[i].box ? [ - Math.trunc(Math.max(0, predictions[i].box.topLeft[0])), - Math.trunc(Math.max(0, predictions[i].box.topLeft[1])), - Math.trunc(Math.min(input.shape[2] || 0, predictions[i].box.bottomRight[0]) - Math.max(0, predictions[i].box.topLeft[0])), - Math.trunc(Math.min(input.shape[1] || 0, predictions[i].box.bottomRight[1]) - Math.max(0, predictions[i].box.topLeft[1])) - ] : [0, 0, 0, 0]; - boxRaw = [ - predictions[i].box.topLeft[0] / (input.shape[2] || 0), - predictions[i].box.topLeft[1] / (input.shape[1] || 0), - (predictions[i].box.bottomRight[0] - predictions[i].box.topLeft[0]) / (input.shape[2] || 0), - (predictions[i].box.bottomRight[1] - predictions[i].box.topLeft[1]) / (input.shape[1] || 0) - ]; - } - const landmarks = analyze(keypoints); - hands.push({ - id: i, - score: Math.round(100 * predictions[i].confidence) / 100, - boxScore: Math.round(100 * predictions[i].boxConfidence) / 100, - fingerScore: Math.round(100 * predictions[i].fingerConfidence) / 100, - label: "hand", - box, - boxRaw, - keypoints, - annotations: annotations2, - landmarks - }); - } - return hands; -} -async function load10(config3) { - var _a, _b; - if (env.initial) { - handDetectorModel = null; - handPoseModel = null; - } - if (!handDetectorModel || !handPoseModel) { - [handDetectorModel, handPoseModel] = await Promise.all([ - config3.hand.enabled ? loadModel((_a = config3.hand.detector) == null ? void 0 : _a.modelPath) : null, - config3.hand.landmarks ? loadModel((_b = config3.hand.skeleton) == null ? void 0 : _b.modelPath) : null - ]); - } else { - if (config3.debug) - log("cached model:", handDetectorModel["modelUrl"]); - if (config3.debug) - log("cached model:", handPoseModel["modelUrl"]); - } - const handDetector = handDetectorModel ? new HandDetector(handDetectorModel) : void 0; - if (handDetector && handPoseModel) - handPipeline = new HandPipeline(handDetector, handPoseModel); - return [handDetectorModel, handPoseModel]; -} - -// src/hand/handtrack.ts -var tf21 = __toESM(require_tfjs_esm()); -var models3 = [null, null]; -var modelOutputNodes = ["StatefulPartitionedCall/Postprocessor/Slice", "StatefulPartitionedCall/Postprocessor/ExpandDims_1"]; -var inputSize7 = [[0, 0], [0, 0]]; -var classes = ["hand", "fist", "pinch", "point", "face", "tip", "pinchtip"]; -var faceIndex = 4; -var boxExpandFact = 1.6; -var maxDetectorResolution = 512; -var detectorExpandFact = 1.4; -var skipped8 = Number.MAX_SAFE_INTEGER; -var lastTime9 = 0; -var outputSize = [0, 0]; -var cache4 = { - boxes: [], - hands: [] -}; -var fingerMap = { - thumb: [1, 2, 3, 4], - index: [5, 6, 7, 8], - middle: [9, 10, 11, 12], - ring: [13, 14, 15, 16], - pinky: [17, 18, 19, 20], - base: [0], - palm: [0, 17, 13, 9, 5, 1, 0] -}; -async function loadDetect2(config3) { - var _a; - if (env.initial) - models3[0] = null; - if (!models3[0]) { - fakeOps(["tensorlistreserve", "enter", "tensorlistfromtensor", "merge", "loopcond", "switch", "exit", "tensorliststack", "nextiteration", "tensorlistsetitem", "tensorlistgetitem", "reciprocal", "shape", "split", "where"], config3); - models3[0] = await loadModel((_a = config3.hand.detector) == null ? void 0 : _a.modelPath); - const inputs = models3[0]["executor"] ? Object.values(models3[0].modelSignature["inputs"]) : void 0; - inputSize7[0][0] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[1].size) : 0; - inputSize7[0][1] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : 0; - } else if (config3.debug) - log("cached model:", models3[0]["modelUrl"]); - return models3[0]; -} -async function loadSkeleton(config3) { - var _a; - if (env.initial) - models3[1] = null; - if (!models3[1]) { - models3[1] = await loadModel((_a = config3.hand.skeleton) == null ? void 0 : _a.modelPath); - const inputs = models3[1]["executor"] ? Object.values(models3[1].modelSignature["inputs"]) : void 0; - inputSize7[1][0] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[1].size) : 0; - inputSize7[1][1] = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : 0; - } else if (config3.debug) - log("cached model:", models3[1]["modelUrl"]); - return models3[1]; -} -async function detectHands(input, config3) { - const hands = []; - if (!input || !models3[0]) - return hands; - const t2 = {}; - const ratio2 = (input.shape[2] || 1) / (input.shape[1] || 1); - const height = Math.min(Math.round((input.shape[1] || 0) / 8) * 8, maxDetectorResolution); - const width = Math.round(height * ratio2 / 8) * 8; - t2.resize = tf21.image.resizeBilinear(input, [height, width]); - t2.cast = tf21.cast(t2.resize, "int32"); - [t2.rawScores, t2.rawBoxes] = await models3[0].executeAsync(t2.cast, modelOutputNodes); - t2.boxes = tf21.squeeze(t2.rawBoxes, [0, 2]); - t2.scores = tf21.squeeze(t2.rawScores, [0]); - const classScores = tf21.unstack(t2.scores, 1); - tf21.dispose(classScores[faceIndex]); - classScores.splice(faceIndex, 1); - t2.filtered = tf21.stack(classScores, 1); - tf21.dispose(classScores); - t2.max = tf21.max(t2.filtered, 1); - t2.argmax = tf21.argMax(t2.filtered, 1); - let id = 0; - t2.nms = await tf21.image.nonMaxSuppressionAsync(t2.boxes, t2.max, (config3.hand.maxDetected || 0) + 1, config3.hand.iouThreshold || 0, config3.hand.minConfidence || 1); - const nms = await t2.nms.data(); - const scores = await t2.max.data(); - const classNum = await t2.argmax.data(); - for (const nmsIndex of Array.from(nms)) { - const boxSlice = tf21.slice(t2.boxes, nmsIndex, 1); - const boxYX = await boxSlice.data(); - tf21.dispose(boxSlice); - const boxData = [boxYX[1], boxYX[0], boxYX[3] - boxYX[1], boxYX[2] - boxYX[0]]; - const boxRaw = scale(boxData, detectorExpandFact); - const boxFull = [Math.trunc(boxData[0] * outputSize[0]), Math.trunc(boxData[1] * outputSize[1]), Math.trunc(boxData[2] * outputSize[0]), Math.trunc(boxData[3] * outputSize[1])]; - const score = scores[nmsIndex]; - const label = classes[classNum[nmsIndex]]; - const hand3 = { id: id++, score, box: boxFull, boxRaw, label }; - hands.push(hand3); - } - Object.keys(t2).forEach((tensor6) => tf21.dispose(t2[tensor6])); - hands.sort((a, b) => b.score - a.score); - if (hands.length > (config3.hand.maxDetected || 1)) - hands.length = config3.hand.maxDetected || 1; - return hands; -} -async function detectFingers(input, h, config3) { - const hand3 = { - id: h.id, - score: Math.round(100 * h.score) / 100, - boxScore: Math.round(100 * h.score) / 100, - fingerScore: 0, - box: h.box, - boxRaw: h.boxRaw, - label: h.label, - keypoints: [], - landmarks: {}, - annotations: {} - }; - if (input && models3[1] && config3.hand.landmarks && h.score > (config3.hand.minConfidence || 0)) { - const t2 = {}; - const boxCrop = [h.boxRaw[1], h.boxRaw[0], h.boxRaw[3] + h.boxRaw[1], h.boxRaw[2] + h.boxRaw[0]]; - t2.crop = tf21.image.cropAndResize(input, [boxCrop], [0], [inputSize7[1][0], inputSize7[1][1]], "bilinear"); - t2.div = tf21.div(t2.crop, constants.tf255); - [t2.score, t2.keypoints] = models3[1].execute(t2.div, ["Identity_1", "Identity"]); - const rawScore = (await t2.score.data())[0]; - const score = (100 - Math.trunc(100 / (1 + Math.exp(rawScore)))) / 100; - if (score >= (config3.hand.minConfidence || 0)) { - hand3.fingerScore = score; - t2.reshaped = tf21.reshape(t2.keypoints, [-1, 3]); - const coordsData = await t2.reshaped.array(); - const coordsRaw = coordsData.map((kpt4) => [kpt4[0] / inputSize7[1][1], kpt4[1] / inputSize7[1][0], kpt4[2] || 0]); - const coordsNorm = coordsRaw.map((kpt4) => [kpt4[0] * h.boxRaw[2], kpt4[1] * h.boxRaw[3], kpt4[2] || 0]); - hand3.keypoints = coordsNorm.map((kpt4) => [outputSize[0] * (kpt4[0] + h.boxRaw[0]), outputSize[1] * (kpt4[1] + h.boxRaw[1]), kpt4[2] || 0]); - hand3.landmarks = analyze(hand3.keypoints); - for (const key of Object.keys(fingerMap)) { - hand3.annotations[key] = fingerMap[key].map((index2) => hand3.landmarks && hand3.keypoints[index2] ? hand3.keypoints[index2] : null); - } - } - Object.keys(t2).forEach((tensor6) => tf21.dispose(t2[tensor6])); - } - return hand3; -} -async function predict10(input, config3) { - var _a, _b; - if (!((_a = models3[0]) == null ? void 0 : _a["executor"]) || !((_b = models3[1]) == null ? void 0 : _b["executor"]) || !models3[0].inputs[0].shape || !models3[1].inputs[0].shape) - return []; - outputSize = [input.shape[2] || 0, input.shape[1] || 0]; - skipped8++; - const skipTime = (config3.hand.skipTime || 0) > now() - lastTime9; - const skipFrame = skipped8 < (config3.hand.skipFrames || 0); - if (config3.skipAllowed && skipTime && skipFrame) { - return cache4.hands; - } - return new Promise(async (resolve) => { - const skipTimeExtended = 3 * (config3.hand.skipTime || 0) > now() - lastTime9; - const skipFrameExtended = skipped8 < 3 * (config3.hand.skipFrames || 0); - if (config3.skipAllowed && cache4.hands.length === config3.hand.maxDetected) { - cache4.hands = await Promise.all(cache4.boxes.map((handBox) => detectFingers(input, handBox, config3))); - } else if (config3.skipAllowed && skipTimeExtended && skipFrameExtended && cache4.hands.length > 0) { - cache4.hands = await Promise.all(cache4.boxes.map((handBox) => detectFingers(input, handBox, config3))); - } else { - cache4.boxes = await detectHands(input, config3); - lastTime9 = now(); - cache4.hands = await Promise.all(cache4.boxes.map((handBox) => detectFingers(input, handBox, config3))); - skipped8 = 0; - } - const oldCache = [...cache4.boxes]; - cache4.boxes.length = 0; - if (config3.cacheSensitivity > 0) { - for (let i = 0; i < cache4.hands.length; i++) { - const boxKpt = square(cache4.hands[i].keypoints, outputSize); - if (boxKpt.box[2] / (input.shape[2] || 1) > 0.05 && boxKpt.box[3] / (input.shape[1] || 1) > 0.05 && cache4.hands[i].fingerScore && cache4.hands[i].fingerScore > (config3.hand.minConfidence || 0)) { - const boxScale = scale(boxKpt.box, boxExpandFact); - const boxScaleRaw = scale(boxKpt.boxRaw, boxExpandFact); - cache4.boxes.push({ ...oldCache[i], box: boxScale, boxRaw: boxScaleRaw }); - } - } - } - for (let i = 0; i < cache4.hands.length; i++) { - const bbox = calc(cache4.hands[i].keypoints, outputSize); - cache4.hands[i].box = bbox.box; - cache4.hands[i].boxRaw = bbox.boxRaw; - } - resolve(cache4.hands); - }); -} - -// src/face/insightface.ts -var tf22 = __toESM(require_tfjs_esm()); -var model10; -var last6 = []; -var lastCount5 = 0; -var lastTime10 = 0; -var skipped9 = Number.MAX_SAFE_INTEGER; -async function load11(config3) { - if (env.initial) - model10 = null; - if (!model10) - model10 = await loadModel(config3.face["insightface"].modelPath); - else if (config3.debug) - log("cached model:", model10["modelUrl"]); - return model10; -} -async function predict11(input, config3, idx, count2) { - var _a, _b; - if (!(model10 == null ? void 0 : model10["executor"])) - return []; - const skipFrame = skipped9 < (((_a = config3.face["insightface"]) == null ? void 0 : _a.skipFrames) || 0); - const skipTime = (((_b = config3.face["insightface"]) == null ? void 0 : _b.skipTime) || 0) > now() - lastTime10; - if (config3.skipAllowed && skipTime && skipFrame && lastCount5 === count2 && last6[idx]) { - skipped9++; - return last6[idx]; - } - return new Promise(async (resolve) => { - var _a2; - let data = []; - if (((_a2 = config3.face["insightface"]) == null ? void 0 : _a2.enabled) && (model10 == null ? void 0 : model10.inputs[0].shape)) { - const t2 = {}; - t2.crop = tf22.image.resizeBilinear(input, [model10.inputs[0].shape[2], model10.inputs[0].shape[1]], false); - t2.data = model10.execute(t2.crop); - const output = await t2.data.data(); - data = Array.from(output); - Object.keys(t2).forEach((tensor6) => tf22.dispose(t2[tensor6])); - } - last6[idx] = data; - lastCount5 = count2; - lastTime10 = now(); - resolve(data); - }); -} - -// src/face/liveness.ts -var tf23 = __toESM(require_tfjs_esm()); -var model11; -var cached2 = []; -var skipped10 = Number.MAX_SAFE_INTEGER; -var lastCount6 = 0; -var lastTime11 = 0; -async function load12(config3) { - var _a; - if (env.initial) - model11 = null; - if (!model11) - model11 = await loadModel((_a = config3.face.liveness) == null ? void 0 : _a.modelPath); - else if (config3.debug) - log("cached model:", model11["modelUrl"]); - return model11; -} -async function predict12(image27, config3, idx, count2) { - var _a, _b; - if (!(model11 == null ? void 0 : model11["executor"])) - return 0; - const skipTime = (((_a = config3.face.liveness) == null ? void 0 : _a.skipTime) || 0) > now() - lastTime11; - const skipFrame = skipped10 < (((_b = config3.face.liveness) == null ? void 0 : _b.skipFrames) || 0); - if (config3.skipAllowed && skipTime && skipFrame && lastCount6 === count2 && cached2[idx]) { - skipped10++; - return cached2[idx]; - } - skipped10 = 0; - return new Promise(async (resolve) => { - const resize = tf23.image.resizeBilinear(image27, [(model11 == null ? void 0 : model11.inputs[0].shape) ? model11.inputs[0].shape[2] : 0, (model11 == null ? void 0 : model11.inputs[0].shape) ? model11.inputs[0].shape[1] : 0], false); - const res = model11 == null ? void 0 : model11.execute(resize); - const num = (await res.data())[0]; - cached2[idx] = Math.round(100 * num) / 100; - lastCount6 = count2; - lastTime11 = now(); - tf23.dispose([resize, res]); - resolve(cached2[idx]); - }); -} - -// src/segmentation/meet.ts -var tf24 = __toESM(require_tfjs_esm()); -var model12; -async function load13(config3) { - if (!model12 || env.initial) - model12 = await loadModel(config3.segmentation.modelPath); - else if (config3.debug) - log("cached model:", model12["modelUrl"]); - return model12; -} -async function predict13(input, config3) { - var _a; - if (!model12) - model12 = await load13(config3); - if (!(model12 == null ? void 0 : model12["executor"]) || !((_a = model12 == null ? void 0 : model12.inputs) == null ? void 0 : _a[0].shape)) - return null; - const t2 = {}; - t2.resize = tf24.image.resizeBilinear(input, [model12.inputs[0].shape ? model12.inputs[0].shape[1] : 0, model12.inputs[0].shape ? model12.inputs[0].shape[2] : 0], false); - t2.norm = tf24.div(t2.resize, constants.tf255); - t2.res = model12.execute(t2.norm); - t2.squeeze = tf24.squeeze(t2.res, 0); - [t2.bgRaw, t2.fgRaw] = tf24.unstack(t2.squeeze, 2); - t2.fg = tf24.softmax(t2.fgRaw); - t2.mul = tf24.mul(t2.fg, constants.tf255); - t2.expand = tf24.expandDims(t2.mul, 2); - t2.output = tf24.image.resizeBilinear(t2.expand, [input.shape[1], input.shape[2]]); - let rgba; - switch (config3.segmentation.mode || "default") { - case "default": - t2.input = tf24.squeeze(input); - t2.concat = tf24.concat([t2.input, t2.output], -1); - rgba = tf24.cast(t2.concat, "int32"); - break; - case "alpha": - rgba = tf24.cast(t2.output, "int32"); - break; - default: - rgba = tf24.tensor(0); - } - Object.keys(t2).forEach((tensor6) => tf24.dispose(t2[tensor6])); - return rgba; -} - -// src/face/mobilefacenet.ts -var tf25 = __toESM(require_tfjs_esm()); -var model13; -var last7 = []; -var lastCount7 = 0; -var lastTime12 = 0; -var skipped11 = Number.MAX_SAFE_INTEGER; -async function load14(config3) { - var _a; - if (env.initial) - model13 = null; - if (!model13) - model13 = await loadModel((_a = config3.face["mobilefacenet"]) == null ? void 0 : _a.modelPath); - else if (config3.debug) - log("cached model:", model13["modelUrl"]); - return model13; -} -async function predict14(input, config3, idx, count2) { - var _a, _b; - if (!(model13 == null ? void 0 : model13["executor"])) - return []; - const skipFrame = skipped11 < (((_a = config3.face["mobilefacenet"]) == null ? void 0 : _a.skipFrames) || 0); - const skipTime = (((_b = config3.face["mobilefacenet"]) == null ? void 0 : _b.skipTime) || 0) > now() - lastTime12; - if (config3.skipAllowed && skipTime && skipFrame && lastCount7 === count2 && last7[idx]) { - skipped11++; - return last7[idx]; - } - return new Promise(async (resolve) => { - var _a2; - let data = []; - if (((_a2 = config3.face["mobilefacenet"]) == null ? void 0 : _a2.enabled) && (model13 == null ? void 0 : model13.inputs[0].shape)) { - const t2 = {}; - t2.crop = tf25.image.resizeBilinear(input, [model13.inputs[0].shape[2], model13.inputs[0].shape[1]], false); - t2.data = model13.execute(t2.crop); - const output = await t2.data.data(); - data = Array.from(output); - Object.keys(t2).forEach((tensor6) => tf25.dispose(t2[tensor6])); - } - last7[idx] = data; - lastCount7 = count2; - lastTime12 = now(); - resolve(data); - }); -} - -// src/body/movenet.ts -var tf27 = __toESM(require_tfjs_esm()); - -// src/body/movenetcoords.ts -var movenetcoords_exports = {}; -__export(movenetcoords_exports, { - connected: () => connected3, - horizontal: () => horizontal, - kpt: () => kpt3, - relative: () => relative, - vertical: () => vertical -}); -var kpt3 = [ - "nose", - "leftEye", - "rightEye", - "leftEar", - "rightEar", - "leftShoulder", - "rightShoulder", - "leftElbow", - "rightElbow", - "leftWrist", - "rightWrist", - "leftHip", - "rightHip", - "leftKnee", - "rightKnee", - "leftAnkle", - "rightAnkle" -]; -var horizontal = [ - ["leftEye", "rightEye"], - ["leftEar", "rightEar"], - ["leftShoulder", "rightShoulder"], - ["leftElbow", "rightElbow"], - ["leftWrist", "rightWrist"], - ["leftHip", "rightHip"], - ["leftKnee", "rightKnee"], - ["leftAnkle", "rightAnkle"] -]; -var vertical = [ - ["leftKnee", "leftShoulder"], - ["rightKnee", "rightShoulder"], - ["leftAnkle", "leftKnee"], - ["rightAnkle", "rightKnee"] -]; -var relative = [ - [["leftHip", "rightHip"], ["leftShoulder", "rightShoulder"]], - [["leftElbow", "rightElbow"], ["leftShoulder", "rightShoulder"]] -]; -var connected3 = { - leftLeg: ["leftHip", "leftKnee", "leftAnkle"], - rightLeg: ["rightHip", "rightKnee", "rightAnkle"], - torso: ["leftShoulder", "rightShoulder", "rightHip", "leftHip", "leftShoulder"], - leftArm: ["leftShoulder", "leftElbow", "leftWrist"], - rightArm: ["rightShoulder", "rightElbow", "rightWrist"], - head: [] -}; - -// src/body/movenetfix.ts -var tf26 = __toESM(require_tfjs_esm()); -var maxJitter = 5e-3; -var cache5 = { - keypoints: [], - padding: [[0, 0], [0, 0], [0, 0], [0, 0]] -}; -function bodyParts(body4) { - for (const pair of horizontal) { - const left = body4.keypoints.findIndex((kp) => kp.part === pair[0]); - const right = body4.keypoints.findIndex((kp) => kp.part === pair[1]); - if (body4.keypoints[left] && body4.keypoints[right]) { - if (body4.keypoints[left].position[0] < body4.keypoints[right].position[0]) { - const tmp = body4.keypoints[left]; - body4.keypoints[left] = body4.keypoints[right]; - body4.keypoints[right] = tmp; - } - } - } - for (const pair of vertical) { - const lower = body4.keypoints.findIndex((kp) => kp && kp.part === pair[0]); - const higher = body4.keypoints.findIndex((kp) => kp && kp.part === pair[1]); - if (body4.keypoints[lower] && body4.keypoints[higher]) { - if (body4.keypoints[lower].position[1] < body4.keypoints[higher].position[1]) { - body4.keypoints.splice(lower, 1); - } - } - } - for (const [pair, compare2] of relative) { - const left = body4.keypoints.findIndex((kp) => kp && kp.part === pair[0]); - const right = body4.keypoints.findIndex((kp) => kp && kp.part === pair[1]); - const leftTo = body4.keypoints.findIndex((kp) => kp && kp.part === compare2[0]); - const rightTo = body4.keypoints.findIndex((kp) => kp && kp.part === compare2[1]); - if (!body4.keypoints[leftTo] || !body4.keypoints[rightTo]) - continue; - const distanceLeft = body4.keypoints[left] ? [ - Math.abs(body4.keypoints[leftTo].position[0] - body4.keypoints[left].position[0]), - Math.abs(body4.keypoints[rightTo].position[0] - body4.keypoints[left].position[0]) - ] : [0, 0]; - const distanceRight = body4.keypoints[right] ? [ - Math.abs(body4.keypoints[rightTo].position[0] - body4.keypoints[right].position[0]), - Math.abs(body4.keypoints[leftTo].position[0] - body4.keypoints[right].position[0]) - ] : [0, 0]; - if (distanceLeft[0] > distanceLeft[1] || distanceRight[0] > distanceRight[1]) { - const tmp = body4.keypoints[left]; - body4.keypoints[left] = body4.keypoints[right]; - body4.keypoints[right] = tmp; - } - } -} -function jitter(keypoints) { - for (let i = 0; i < keypoints.length; i++) { - if (keypoints[i] && cache5.keypoints[i]) { - const diff = [Math.abs(keypoints[i].positionRaw[0] - cache5.keypoints[i].positionRaw[0]), Math.abs(keypoints[i].positionRaw[1] - cache5.keypoints[i].positionRaw[1])]; - if (diff[0] < maxJitter && diff[1] < maxJitter) { - keypoints[i] = cache5.keypoints[i]; - } else { - cache5.keypoints[i] = keypoints[i]; - } - } else { - cache5.keypoints[i] = keypoints[i]; - } - } - return keypoints; -} -function padInput(input, inputSize10) { - var _a, _b; - const t2 = {}; - if (!((_a = input == null ? void 0 : input.shape) == null ? void 0 : _a[1]) || !((_b = input == null ? void 0 : input.shape) == null ? void 0 : _b[2])) - return input; - cache5.padding = [ - [0, 0], - [input.shape[2] > input.shape[1] ? Math.trunc((input.shape[2] - input.shape[1]) / 2) : 0, input.shape[2] > input.shape[1] ? Math.trunc((input.shape[2] - input.shape[1]) / 2) : 0], - [input.shape[1] > input.shape[2] ? Math.trunc((input.shape[1] - input.shape[2]) / 2) : 0, input.shape[1] > input.shape[2] ? Math.trunc((input.shape[1] - input.shape[2]) / 2) : 0], - [0, 0] - ]; - t2.pad = tf26.pad(input, cache5.padding); - t2.resize = tf26.image.resizeBilinear(t2.pad, [inputSize10, inputSize10]); - const final = tf26.cast(t2.resize, "int32"); - Object.keys(t2).forEach((tensor6) => tf26.dispose(t2[tensor6])); - return final; -} -function rescaleBody(body4, outputSize2) { - body4.keypoints = body4.keypoints.filter((kpt4) => kpt4 == null ? void 0 : kpt4.position); - for (const kpt4 of body4.keypoints) { - kpt4.position = [ - kpt4.position[0] * (outputSize2[0] + cache5.padding[2][0] + cache5.padding[2][1]) / outputSize2[0] - cache5.padding[2][0], - kpt4.position[1] * (outputSize2[1] + cache5.padding[1][0] + cache5.padding[1][1]) / outputSize2[1] - cache5.padding[1][0] - ]; - kpt4.positionRaw = [ - kpt4.position[0] / outputSize2[0], - kpt4.position[1] / outputSize2[1] - ]; - } - const rescaledBoxes = calc(body4.keypoints.map((pt) => pt.position), outputSize2); - body4.box = rescaledBoxes.box; - body4.boxRaw = rescaledBoxes.boxRaw; - return body4; -} - -// src/body/movenet.ts -var model14; -var inputSize8 = 0; -var skipped12 = Number.MAX_SAFE_INTEGER; -var cache6 = { - boxes: [], - bodies: [], - last: 0 -}; -async function load15(config3) { - var _a; - if (env.initial) - model14 = null; - if (!model14) { - fakeOps(["size"], config3); - model14 = await loadModel(config3.body.modelPath); - } else if (config3.debug) - log("cached model:", model14["modelUrl"]); - inputSize8 = (model14 == null ? void 0 : model14["executor"]) && ((_a = model14 == null ? void 0 : model14.inputs) == null ? void 0 : _a[0].shape) ? model14.inputs[0].shape[2] : 0; - if (inputSize8 < 64) - inputSize8 = 256; - return model14; -} -function parseSinglePose(res, config3, image27) { - const kpt4 = res[0][0]; - const keypoints = []; - let score = 0; - for (let id = 0; id < kpt4.length; id++) { - score = kpt4[id][2]; - if (score > config3.body.minConfidence) { - const positionRaw = [kpt4[id][1], kpt4[id][0]]; - keypoints.push({ - score: Math.round(100 * score) / 100, - part: kpt3[id], - positionRaw, - position: [ - Math.round((image27.shape[2] || 0) * positionRaw[0]), - Math.round((image27.shape[1] || 0) * positionRaw[1]) - ] - }); - } - } - score = keypoints.reduce((prev, curr) => curr.score > prev ? curr.score : prev, 0); - const bodies = []; - const newBox = calc(keypoints.map((pt) => pt.position), [image27.shape[2], image27.shape[1]]); - const annotations2 = {}; - for (const [name, indexes] of Object.entries(connected3)) { - const pt = []; - for (let i = 0; i < indexes.length - 1; i++) { - const pt0 = keypoints.find((kp) => kp.part === indexes[i]); - const pt1 = keypoints.find((kp) => kp.part === indexes[i + 1]); - if (pt0 && pt1 && pt0.score > (config3.body.minConfidence || 0) && pt1.score > (config3.body.minConfidence || 0)) - pt.push([pt0.position, pt1.position]); - } - annotations2[name] = pt; - } - const body4 = { id: 0, score, box: newBox.box, boxRaw: newBox.boxRaw, keypoints, annotations: annotations2 }; - bodyParts(body4); - bodies.push(body4); - return bodies; -} -function parseMultiPose(res, config3, image27) { - const bodies = []; - for (let id = 0; id < res[0].length; id++) { - const kpt4 = res[0][id]; - const totalScore = Math.round(100 * kpt4[51 + 4]) / 100; - if (totalScore > config3.body.minConfidence) { - const keypoints = []; - for (let i = 0; i < 17; i++) { - const score = kpt4[3 * i + 2]; - if (score > config3.body.minConfidence) { - const positionRaw = [kpt4[3 * i + 1], kpt4[3 * i + 0]]; - keypoints.push({ - part: kpt3[i], - score: Math.round(100 * score) / 100, - positionRaw, - position: [Math.round((image27.shape[2] || 0) * positionRaw[0]), Math.round((image27.shape[1] || 0) * positionRaw[1])] - }); - } - } - const newBox = calc(keypoints.map((pt) => pt.position), [image27.shape[2], image27.shape[1]]); - const annotations2 = {}; - for (const [name, indexes] of Object.entries(connected3)) { - const pt = []; - for (let i = 0; i < indexes.length - 1; i++) { - const pt0 = keypoints.find((kp) => kp.part === indexes[i]); - const pt1 = keypoints.find((kp) => kp.part === indexes[i + 1]); - if (pt0 && pt1 && pt0.score > (config3.body.minConfidence || 0) && pt1.score > (config3.body.minConfidence || 0)) - pt.push([pt0.position, pt1.position]); - } - annotations2[name] = pt; - } - const body4 = { id, score: totalScore, box: newBox.box, boxRaw: newBox.boxRaw, keypoints: [...keypoints], annotations: annotations2 }; - bodyParts(body4); - bodies.push(body4); - } - } - bodies.sort((a, b) => b.score - a.score); - if (bodies.length > config3.body.maxDetected) - bodies.length = config3.body.maxDetected; - return bodies; -} -async function predict15(input, config3) { - var _a; - if (!(model14 == null ? void 0 : model14["executor"]) || !((_a = model14 == null ? void 0 : model14.inputs) == null ? void 0 : _a[0].shape)) - return []; - if (!config3.skipAllowed) - cache6.boxes.length = 0; - skipped12++; - const skipTime = (config3.body.skipTime || 0) > now() - cache6.last; - const skipFrame = skipped12 < (config3.body.skipFrames || 0); - if (config3.skipAllowed && skipTime && skipFrame) { - return cache6.bodies; - } - return new Promise(async (resolve) => { - const t2 = {}; - skipped12 = 0; - t2.input = padInput(input, inputSize8); - t2.res = model14 == null ? void 0 : model14.execute(t2.input); - cache6.last = now(); - const res = await t2.res.array(); - cache6.bodies = t2.res.shape[2] === 17 ? parseSinglePose(res, config3, input) : parseMultiPose(res, config3, input); - for (const body4 of cache6.bodies) { - rescaleBody(body4, [input.shape[2] || 1, input.shape[1] || 1]); - jitter(body4.keypoints); - } - Object.keys(t2).forEach((tensor6) => tf27.dispose(t2[tensor6])); - resolve(cache6.bodies); - }); -} - -// src/object/nanodet.ts -var tf28 = __toESM(require_tfjs_esm()); -var model15; -var last8 = []; -var lastTime13 = 0; -var skipped13 = Number.MAX_SAFE_INTEGER; -var inputSize9 = 0; -var scaleBox = 2.5; -async function load16(config3) { - if (!model15 || env.initial) { - model15 = await loadModel(config3.object.modelPath); - const inputs = (model15 == null ? void 0 : model15["executor"]) ? Object.values(model15.modelSignature["inputs"]) : void 0; - inputSize9 = Array.isArray(inputs) ? parseInt(inputs[0].tensorShape.dim[2].size) : 416; - } else if (config3.debug) - log("cached model:", model15["modelUrl"]); - return model15; -} -async function process4(res, outputShape, config3) { - let id = 0; - let results = []; - const size2 = inputSize9; - for (const strideSize of [1, 2, 4]) { - const baseSize = strideSize * 13; - const scoresT = tf28.squeeze(res.find((a) => a.shape[1] === baseSize ** 2 && (a.shape[2] || 0) === labels.length)); - const scores = await scoresT.array(); - const featuresT = tf28.squeeze(res.find((a) => a.shape[1] === baseSize ** 2 && (a.shape[2] || 0) < labels.length)); - const boxesMaxT = featuresT.reshape([-1, 4, featuresT.shape[1] / 4]); - const boxIdxT = boxesMaxT.argMax(2); - const boxIdx = await boxIdxT.array(); - for (let i = 0; i < scoresT.shape[0]; i++) { - for (let j = 0; j < scoresT.shape[1]; j++) { - const score = scores[i][j]; - if (score > (config3.object.minConfidence || 0) && j !== 61) { - const cx = (0.5 + Math.trunc(i % baseSize)) / baseSize; - const cy = (0.5 + Math.trunc(i / baseSize)) / baseSize; - const boxOffset = boxIdx[i].map((a) => a * (baseSize / strideSize / size2)); - const [x, y] = [ - cx - scaleBox / strideSize * boxOffset[0], - cy - scaleBox / strideSize * boxOffset[1] - ]; - const [w, h] = [ - cx + scaleBox / strideSize * boxOffset[2] - x, - cy + scaleBox / strideSize * boxOffset[3] - y - ]; - let boxRaw = [x, y, w, h]; - boxRaw = boxRaw.map((a) => Math.max(0, Math.min(a, 1))); - const box = [ - boxRaw[0] * outputShape[0], - boxRaw[1] * outputShape[1], - boxRaw[2] * outputShape[0], - boxRaw[3] * outputShape[1] - ]; - const result = { - id: id++, - score: Math.round(100 * score) / 100, - class: j + 1, - label: labels[j].label, - box: box.map((a) => Math.trunc(a)), - boxRaw - }; - results.push(result); - } - } - } - tf28.dispose([scoresT, featuresT, boxesMaxT, boxIdxT]); - } - const nmsBoxes = results.map((a) => [a.boxRaw[1], a.boxRaw[0], a.boxRaw[3], a.boxRaw[2]]); - const nmsScores = results.map((a) => a.score); - let nmsIdx = []; - if (nmsBoxes && nmsBoxes.length > 0) { - const nms = await tf28.image.nonMaxSuppressionAsync(nmsBoxes, nmsScores, config3.object.maxDetected, config3.object.iouThreshold, config3.object.minConfidence); - nmsIdx = await nms.data(); - tf28.dispose(nms); - } - results = results.filter((_val, idx) => nmsIdx.includes(idx)).sort((a, b) => b.score - a.score); - return results; -} -async function predict16(image27, config3) { - if (!(model15 == null ? void 0 : model15["executor"])) - return []; - const skipTime = (config3.object.skipTime || 0) > now() - lastTime13; - const skipFrame = skipped13 < (config3.object.skipFrames || 0); - if (config3.skipAllowed && skipTime && skipFrame && last8.length > 0) { - skipped13++; - return last8; - } - skipped13 = 0; - if (!env.kernels.includes("mod") || !env.kernels.includes("sparsetodense")) - return last8; - return new Promise(async (resolve) => { - const outputSize2 = [image27.shape[2] || 0, image27.shape[1] || 0]; - const resizeT = tf28.image.resizeBilinear(image27, [inputSize9, inputSize9], false); - const normT = tf28.div(resizeT, constants.tf255); - const transposeT = tf28.transpose(normT, [0, 3, 1, 2]); - let objectT; - if (config3.object.enabled) - objectT = model15.execute(transposeT); - lastTime13 = now(); - const obj = await process4(objectT, outputSize2, config3); - last8 = obj; - tf28.dispose([resizeT, normT, transposeT, ...objectT]); - resolve(obj); - }); -} - -// src/body/posenet.ts -var tf29 = __toESM(require_tfjs_esm()); - -// src/body/posenetutils.ts -var partNames = [ - "nose", - "leftEye", - "rightEye", - "leftEar", - "rightEar", - "leftShoulder", - "rightShoulder", - "leftElbow", - "rightElbow", - "leftWrist", - "rightWrist", - "leftHip", - "rightHip", - "leftKnee", - "rightKnee", - "leftAnkle", - "rightAnkle" -]; -var count = partNames.length; -var partIds = partNames.reduce((result, jointName, i) => { - result[jointName] = i; - return result; -}, {}); -var connectedPartNames = [ - ["leftHip", "leftShoulder"], - ["leftElbow", "leftShoulder"], - ["leftElbow", "leftWrist"], - ["leftHip", "leftKnee"], - ["leftKnee", "leftAnkle"], - ["rightHip", "rightShoulder"], - ["rightElbow", "rightShoulder"], - ["rightElbow", "rightWrist"], - ["rightHip", "rightKnee"], - ["rightKnee", "rightAnkle"], - ["leftShoulder", "rightShoulder"], - ["leftHip", "rightHip"] -]; -var connectedPartIndices = connectedPartNames.map(([jointNameA, jointNameB]) => [partIds[jointNameA], partIds[jointNameB]]); -var poseChain = [ - ["nose", "leftEye"], - ["leftEye", "leftEar"], - ["nose", "rightEye"], - ["rightEye", "rightEar"], - ["nose", "leftShoulder"], - ["leftShoulder", "leftElbow"], - ["leftElbow", "leftWrist"], - ["leftShoulder", "leftHip"], - ["leftHip", "leftKnee"], - ["leftKnee", "leftAnkle"], - ["nose", "rightShoulder"], - ["rightShoulder", "rightElbow"], - ["rightElbow", "rightWrist"], - ["rightShoulder", "rightHip"], - ["rightHip", "rightKnee"], - ["rightKnee", "rightAnkle"] -]; -function getBoundingBox(keypoints) { - const coord = keypoints.reduce(({ maxX, maxY, minX, minY }, { position: { x, y } }) => ({ - maxX: Math.max(maxX, x), - maxY: Math.max(maxY, y), - minX: Math.min(minX, x), - minY: Math.min(minY, y) - }), { - maxX: Number.NEGATIVE_INFINITY, - maxY: Number.NEGATIVE_INFINITY, - minX: Number.POSITIVE_INFINITY, - minY: Number.POSITIVE_INFINITY - }); - return [coord.minX, coord.minY, coord.maxX - coord.minX, coord.maxY - coord.minY]; -} -function scalePoses(poses, [height, width], [inputResolutionHeight, inputResolutionWidth]) { - const scaleY = height / inputResolutionHeight; - const scaleX = width / inputResolutionWidth; - const scalePose = (pose, i) => ({ - id: i, - score: pose.score, - boxRaw: [pose.box[0] / inputResolutionWidth, pose.box[1] / inputResolutionHeight, pose.box[2] / inputResolutionWidth, pose.box[3] / inputResolutionHeight], - box: [Math.trunc(pose.box[0] * scaleX), Math.trunc(pose.box[1] * scaleY), Math.trunc(pose.box[2] * scaleX), Math.trunc(pose.box[3] * scaleY)], - keypoints: pose.keypoints.map(({ score, part, position }) => ({ - score, - part, - position: [Math.trunc(position.x * scaleX), Math.trunc(position.y * scaleY)], - positionRaw: [position.x / inputResolutionHeight, position.y / inputResolutionHeight] - })), - annotations: {} - }); - const scaledPoses = poses.map((pose, i) => scalePose(pose, i)); - return scaledPoses; -} -var MaxHeap = class { - constructor(maxSize2, getElementValue) { - __publicField(this, "priorityQueue"); - __publicField(this, "numberOfElements"); - __publicField(this, "getElementValue"); - this.priorityQueue = new Array(maxSize2); - this.numberOfElements = -1; - this.getElementValue = getElementValue; - } - enqueue(x) { - this.priorityQueue[++this.numberOfElements] = x; - this.swim(this.numberOfElements); - } - dequeue() { - const max4 = this.priorityQueue[0]; - this.exchange(0, this.numberOfElements--); - this.sink(0); - this.priorityQueue[this.numberOfElements + 1] = null; - return max4; - } - empty() { - return this.numberOfElements === -1; - } - size() { - return this.numberOfElements + 1; - } - all() { - return this.priorityQueue.slice(0, this.numberOfElements + 1); - } - max() { - return this.priorityQueue[0]; - } - swim(k) { - while (k > 0 && this.less(Math.floor(k / 2), k)) { - this.exchange(k, Math.floor(k / 2)); - k = Math.floor(k / 2); - } - } - sink(k) { - while (2 * k <= this.numberOfElements) { - let j = 2 * k; - if (j < this.numberOfElements && this.less(j, j + 1)) - j++; - if (!this.less(k, j)) - break; - this.exchange(k, j); - k = j; - } - } - getValueAt(i) { - return this.getElementValue(this.priorityQueue[i]); - } - less(i, j) { - return this.getValueAt(i) < this.getValueAt(j); - } - exchange(i, j) { - const t2 = this.priorityQueue[i]; - this.priorityQueue[i] = this.priorityQueue[j]; - this.priorityQueue[j] = t2; - } -}; -function getOffsetPoint(y, x, keypoint, offsets) { - return { - y: offsets.get(y, x, keypoint), - x: offsets.get(y, x, keypoint + count) - }; -} -function getImageCoords(part, outputStride2, offsets) { - const { heatmapY, heatmapX, id: keypoint } = part; - const { y, x } = getOffsetPoint(heatmapY, heatmapX, keypoint, offsets); - return { - x: part.heatmapX * outputStride2 + x, - y: part.heatmapY * outputStride2 + y - }; -} -function clamp(a, min2, max4) { - if (a < min2) - return min2; - if (a > max4) - return max4; - return a; -} -function squaredDistance(y1, x1, y2, x2) { - const dy = y2 - y1; - const dx = x2 - x1; - return dy * dy + dx * dx; -} -function addVectors(a, b) { - return { x: a.x + b.x, y: a.y + b.y }; -} - -// src/body/posenet.ts -var model16; -var poseNetOutputs = ["MobilenetV1/offset_2/BiasAdd", "MobilenetV1/heatmap_2/BiasAdd", "MobilenetV1/displacement_fwd_2/BiasAdd", "MobilenetV1/displacement_bwd_2/BiasAdd"]; -var localMaximumRadius = 1; -var outputStride = 16; -var squaredNmsRadius = 50 ** 2; -function traverse(edgeId, sourceKeypoint, targetId, scores, offsets, displacements, offsetRefineStep = 2) { - const getDisplacement = (point2) => ({ - y: displacements.get(point2.y, point2.x, edgeId), - x: displacements.get(point2.y, point2.x, displacements.shape[2] / 2 + edgeId) - }); - const getStridedIndexNearPoint = (point2, height2, width2) => ({ - y: clamp(Math.round(point2.y / outputStride), 0, height2 - 1), - x: clamp(Math.round(point2.x / outputStride), 0, width2 - 1) - }); - const [height, width] = scores.shape; - const sourceKeypointIndices = getStridedIndexNearPoint(sourceKeypoint.position, height, width); - const displacement = getDisplacement(sourceKeypointIndices); - const displacedPoint = addVectors(sourceKeypoint.position, displacement); - let targetKeypoint = displacedPoint; - for (let i = 0; i < offsetRefineStep; i++) { - const targetKeypointIndices = getStridedIndexNearPoint(targetKeypoint, height, width); - const offsetPoint = getOffsetPoint(targetKeypointIndices.y, targetKeypointIndices.x, targetId, offsets); - targetKeypoint = addVectors( - { x: targetKeypointIndices.x * outputStride, y: targetKeypointIndices.y * outputStride }, - { x: offsetPoint.x, y: offsetPoint.y } - ); - } - const targetKeyPointIndices = getStridedIndexNearPoint(targetKeypoint, height, width); - const score = scores.get(targetKeyPointIndices.y, targetKeyPointIndices.x, targetId); - return { position: targetKeypoint, part: partNames[targetId], score }; -} -function decodePose(root, scores, offsets, displacementsFwd, displacementsBwd) { - const tuples = poseChain.map(([parentJoinName, childJoinName]) => [partIds[parentJoinName], partIds[childJoinName]]); - const edgesFwd = tuples.map(([, childJointId]) => childJointId); - const edgesBwd = tuples.map(([parentJointId]) => parentJointId); - const numParts = scores.shape[2]; - const numEdges = edgesFwd.length; - const keypoints = new Array(numParts); - const rootPoint = getImageCoords(root.part, outputStride, offsets); - keypoints[root.part.id] = { - score: root.score, - part: partNames[root.part.id], - position: rootPoint - }; - for (let edge = numEdges - 1; edge >= 0; --edge) { - const sourceId = edgesFwd[edge]; - const targetId = edgesBwd[edge]; - if (keypoints[sourceId] && !keypoints[targetId]) { - keypoints[targetId] = traverse(edge, keypoints[sourceId], targetId, scores, offsets, displacementsBwd); - } - } - for (let edge = 0; edge < numEdges; ++edge) { - const sourceId = edgesBwd[edge]; - const targetId = edgesFwd[edge]; - if (keypoints[sourceId] && !keypoints[targetId]) { - keypoints[targetId] = traverse(edge, keypoints[sourceId], targetId, scores, offsets, displacementsFwd); - } - } - return keypoints; -} -function scoreIsMaximumInLocalWindow(keypointId, score, heatmapY, heatmapX, scores) { - const [height, width] = scores.shape; - let localMaximum = true; - const yStart = Math.max(heatmapY - localMaximumRadius, 0); - const yEnd = Math.min(heatmapY + localMaximumRadius + 1, height); - for (let yCurrent = yStart; yCurrent < yEnd; ++yCurrent) { - const xStart = Math.max(heatmapX - localMaximumRadius, 0); - const xEnd = Math.min(heatmapX + localMaximumRadius + 1, width); - for (let xCurrent = xStart; xCurrent < xEnd; ++xCurrent) { - if (scores.get(yCurrent, xCurrent, keypointId) > score) { - localMaximum = false; - break; - } - } - if (!localMaximum) - break; - } - return localMaximum; -} -function buildPartWithScoreQueue(minConfidence2, scores) { - const [height, width, numKeypoints] = scores.shape; - const queue = new MaxHeap(height * width * numKeypoints, ({ score }) => score); - for (let heatmapY = 0; heatmapY < height; ++heatmapY) { - for (let heatmapX = 0; heatmapX < width; ++heatmapX) { - for (let keypointId = 0; keypointId < numKeypoints; ++keypointId) { - const score = scores.get(heatmapY, heatmapX, keypointId); - if (score < minConfidence2) - continue; - if (scoreIsMaximumInLocalWindow(keypointId, score, heatmapY, heatmapX, scores)) - queue.enqueue({ score, part: { heatmapY, heatmapX, id: keypointId } }); - } - } - } - return queue; -} -function withinRadius(poses, { x, y }, keypointId) { - return poses.some(({ keypoints }) => { - var _a; - const correspondingKeypoint = (_a = keypoints[keypointId]) == null ? void 0 : _a.position; - if (!correspondingKeypoint) - return false; - return squaredDistance(y, x, correspondingKeypoint.y, correspondingKeypoint.x) <= squaredNmsRadius; - }); -} -function getInstanceScore(existingPoses, keypoints) { - const notOverlappedKeypointScores = keypoints.reduce((result, { position, score }, keypointId) => { - if (!withinRadius(existingPoses, position, keypointId)) - result += score; - return result; - }, 0); - return notOverlappedKeypointScores / keypoints.length; -} -function decode(offsets, scores, displacementsFwd, displacementsBwd, maxDetected, minConfidence2) { - const poses = []; - const queue = buildPartWithScoreQueue(minConfidence2, scores); - while (poses.length < maxDetected && !queue.empty()) { - const root = queue.dequeue(); - const rootImageCoords = getImageCoords(root.part, outputStride, offsets); - if (withinRadius(poses, rootImageCoords, root.part.id)) - continue; - let keypoints = decodePose(root, scores, offsets, displacementsFwd, displacementsBwd); - keypoints = keypoints.filter((a) => a.score > minConfidence2); - const score = getInstanceScore(poses, keypoints); - const box = getBoundingBox(keypoints); - if (score > minConfidence2) - poses.push({ keypoints, box, score: Math.round(100 * score) / 100 }); - } - return poses; -} -async function predict17(input, config3) { - if (!(model16 == null ? void 0 : model16["executor"])) - return []; - const res = tf29.tidy(() => { - if (!model16.inputs[0].shape) - return []; - const resized = tf29.image.resizeBilinear(input, [model16.inputs[0].shape[2], model16.inputs[0].shape[1]]); - const normalized = tf29.sub(tf29.div(tf29.cast(resized, "float32"), 127.5), 1); - const results = model16.execute(normalized, poseNetOutputs); - const results3d = results.map((y) => tf29.squeeze(y, [0])); - results3d[1] = tf29.sigmoid(results3d[1]); - return results3d; - }); - const buffers = await Promise.all(res.map((tensor6) => tensor6.buffer())); - for (const t2 of res) - tf29.dispose(t2); - const decoded = decode(buffers[0], buffers[1], buffers[2], buffers[3], config3.body.maxDetected, config3.body.minConfidence); - if (!model16.inputs[0].shape) - return []; - const scaled = scalePoses(decoded, [input.shape[1], input.shape[2]], [model16.inputs[0].shape[2], model16.inputs[0].shape[1]]); - return scaled; -} -async function load17(config3) { - if (!model16 || env.initial) - model16 = await loadModel(config3.body.modelPath); - else if (config3.debug) - log("cached model:", model16["modelUrl"]); - return model16; -} - -// src/segmentation/rvm.ts -var tf30 = __toESM(require_tfjs_esm()); -var model17; -var outputNodes2 = ["fgr", "pha", "r1o", "r2o", "r3o", "r4o"]; -var t = {}; -var ratio = 0; -function init2(config3) { - tf30.dispose([t.r1i, t.r2i, t.r3i, t.r4i, t.downsample_ratio]); - t.r1i = tf30.tensor(0); - t.r2i = tf30.tensor(0); - t.r3i = tf30.tensor(0); - t.r4i = tf30.tensor(0); - ratio = config3.segmentation.ratio || 0.5; - t.downsample_ratio = tf30.tensor(ratio); -} -async function load18(config3) { - if (!model17 || env.initial) - model17 = await loadModel(config3.segmentation.modelPath); - else if (config3.debug) - log("cached model:", model17["modelUrl"]); - init2(config3); - return model17; -} -var normalize = (r) => tf30.tidy(() => { - const squeeze14 = tf30.squeeze(r, [0]); - const mul15 = tf30.mul(squeeze14, constants.tf255); - const cast8 = tf30.cast(mul15, "int32"); - return cast8; -}); -function getRGBA(fgr, pha) { - const rgb2 = fgr ? normalize(fgr) : tf30.fill([pha.shape[1] || 0, pha.shape[2] || 0, 3], 255, "int32"); - const a = pha ? normalize(pha) : tf30.fill([fgr.shape[1] || 0, fgr.shape[2] || 0, 1], 255, "int32"); - const rgba = tf30.concat([rgb2, a], -1); - tf30.dispose([rgb2, a]); - return rgba; -} -function getState(state) { - return tf30.tidy(() => { - const r = {}; - r.unstack = tf30.unstack(state, -1); - r.concat = tf30.concat(r.unstack, 1); - r.split = tf30.split(r.concat, 4, 1); - r.stack = tf30.concat(r.split, 2); - r.squeeze = tf30.squeeze(r.stack, [0]); - r.expand = tf30.expandDims(r.squeeze, -1); - r.add = tf30.add(r.expand, 1); - r.mul = tf30.mul(r.add, 127.5); - r.cast = tf30.cast(r.mul, "int32"); - r.tile = tf30.tile(r.cast, [1, 1, 3]); - r.alpha = tf30.fill([r.tile.shape[0] || 0, r.tile.shape[1] || 0, 1], 255, "int32"); - return tf30.concat([r.tile, r.alpha], -1); - }); -} -async function predict18(input, config3) { - if (!model17) - model17 = await load18(config3); - if (!(model17 == null ? void 0 : model17["executor"])) - return null; - t.src = tf30.div(input, 255); - if (ratio !== config3.segmentation.ratio) - init2(config3); - const [fgr, pha, r1o, r2o, r3o, r4o] = await model17.executeAsync(t, outputNodes2); - let rgba; - switch (config3.segmentation.mode || "default") { - case "default": - rgba = getRGBA(fgr, pha); - break; - case "alpha": - rgba = getRGBA(null, pha); - break; - case "foreground": - rgba = getRGBA(fgr, null); - break; - case "state": - rgba = getState(r1o); - break; - default: - rgba = tf30.tensor(0); - } - tf30.dispose([t.src, fgr, pha, t.r1i, t.r2i, t.r3i, t.r4i]); - [t.r1i, t.r2i, t.r3i, t.r4i] = [r1o, r2o, r3o, r4o]; - return rgba; -} - -// src/segmentation/selfie.ts -var tf31 = __toESM(require_tfjs_esm()); -var model18; -async function load19(config3) { - if (!model18 || env.initial) - model18 = await loadModel(config3.segmentation.modelPath); - else if (config3.debug) - log("cached model:", model18["modelUrl"]); - return model18; -} -async function predict19(input, config3) { - var _a; - if (!model18) - model18 = await load19(config3); - if (!(model18 == null ? void 0 : model18["executor"]) || !((_a = model18 == null ? void 0 : model18.inputs) == null ? void 0 : _a[0].shape)) - return null; - const t2 = {}; - t2.resize = tf31.image.resizeBilinear(input, [model18.inputs[0].shape ? model18.inputs[0].shape[1] : 0, model18.inputs[0].shape ? model18.inputs[0].shape[2] : 0], false); - t2.norm = tf31.div(t2.resize, constants.tf255); - t2.res = model18.execute(t2.norm); - t2.squeeze = tf31.squeeze(t2.res, 0); - t2.alpha = tf31.image.resizeBilinear(t2.squeeze, [input.shape[1], input.shape[2]]); - t2.mul = tf31.mul(t2.alpha, constants.tf255); - let rgba; - switch (config3.segmentation.mode || "default") { - case "default": - t2.input = tf31.squeeze(input); - t2.concat = tf31.concat([t2.input, t2.mul], -1); - rgba = tf31.cast(t2.concat, "int32"); - break; - case "alpha": - rgba = tf31.cast(t2.mul, "int32"); - break; - default: - rgba = tf31.tensor(0); - } - Object.keys(t2).forEach((tensor6) => tf31.dispose(t2[tensor6])); - return rgba; -} - -// src/gear/ssrnet-age.ts -var tf32 = __toESM(require_tfjs_esm()); -var model19; -var last9 = []; -var lastCount8 = 0; -var lastTime14 = 0; -var skipped14 = Number.MAX_SAFE_INTEGER; -async function load20(config3) { - if (env.initial) - model19 = null; - if (!model19) - model19 = await loadModel(config3.face["ssrnet"].modelPathAge); - else if (config3.debug) - log("cached model:", model19["modelUrl"]); - return model19; -} -async function predict20(image27, config3, idx, count2) { - var _a, _b, _c, _d; - if (!model19) - return { age: 0 }; - const skipFrame = skipped14 < (((_a = config3.face["ssrnet"]) == null ? void 0 : _a.skipFrames) || 0); - const skipTime = (((_b = config3.face["ssrnet"]) == null ? void 0 : _b.skipTime) || 0) > now() - lastTime14; - if (config3.skipAllowed && skipFrame && skipTime && lastCount8 === count2 && ((_c = last9[idx]) == null ? void 0 : _c.age) && ((_d = last9[idx]) == null ? void 0 : _d.age) > 0) { - skipped14++; - return last9[idx]; - } - skipped14 = 0; - return new Promise(async (resolve) => { - var _a2; - if (!(model19 == null ? void 0 : model19.inputs) || !model19.inputs[0] || !model19.inputs[0].shape) - return; - const t2 = {}; - t2.resize = tf32.image.resizeBilinear(image27, [model19.inputs[0].shape[2], model19.inputs[0].shape[1]], false); - t2.enhance = tf32.mul(t2.resize, constants.tf255); - const obj = { age: 0 }; - if ((_a2 = config3.face["ssrnet"]) == null ? void 0 : _a2.enabled) - t2.age = model19.execute(t2.enhance); - if (t2.age) { - const data = await t2.age.data(); - obj.age = Math.trunc(10 * data[0]) / 10; - } - Object.keys(t2).forEach((tensor6) => tf32.dispose(t2[tensor6])); - last9[idx] = obj; - lastCount8 = count2; - lastTime14 = now(); - resolve(obj); - }); -} - -// src/gear/ssrnet-gender.ts -var tf33 = __toESM(require_tfjs_esm()); -var model20; -var last10 = []; -var lastCount9 = 0; -var lastTime15 = 0; -var skipped15 = Number.MAX_SAFE_INTEGER; -var rgb = [0.2989, 0.587, 0.114]; -async function load21(config3) { - var _a; - if (env.initial) - model20 = null; - if (!model20) - model20 = await loadModel((_a = config3.face["ssrnet"]) == null ? void 0 : _a.modelPathGender); - else if (config3.debug) - log("cached model:", model20["modelUrl"]); - return model20; -} -async function predict21(image27, config3, idx, count2) { - var _a, _b, _c, _d; - if (!model20) - return { gender: "unknown", genderScore: 0 }; - const skipFrame = skipped15 < (((_a = config3.face["ssrnet"]) == null ? void 0 : _a.skipFrames) || 0); - const skipTime = (((_b = config3.face["ssrnet"]) == null ? void 0 : _b.skipTime) || 0) > now() - lastTime15; - if (config3.skipAllowed && skipFrame && skipTime && lastCount9 === count2 && ((_c = last10[idx]) == null ? void 0 : _c.gender) && ((_d = last10[idx]) == null ? void 0 : _d.genderScore) > 0) { - skipped15++; - return last10[idx]; - } - skipped15 = 0; - return new Promise(async (resolve) => { - var _a2; - if (!(model20 == null ? void 0 : model20.inputs[0].shape)) - return; - const t2 = {}; - t2.resize = tf33.image.resizeBilinear(image27, [model20.inputs[0].shape[2], model20.inputs[0].shape[1]], false); - t2.enhance = tf33.tidy(() => { - const [red, green, blue] = tf33.split(t2.resize, 3, 3); - const redNorm = tf33.mul(red, rgb[0]); - const greenNorm = tf33.mul(green, rgb[1]); - const blueNorm = tf33.mul(blue, rgb[2]); - const grayscale = tf33.addN([redNorm, greenNorm, blueNorm]); - const normalize2 = tf33.mul(tf33.sub(grayscale, constants.tf05), 2); - return normalize2; - }); - const obj = { gender: "unknown", genderScore: 0 }; - if ((_a2 = config3.face["ssrnet"]) == null ? void 0 : _a2.enabled) - t2.gender = model20.execute(t2.enhance); - const data = await t2.gender.data(); - obj.gender = data[0] > data[1] ? "female" : "male"; - obj.genderScore = data[0] > data[1] ? Math.trunc(100 * data[0]) / 100 : Math.trunc(100 * data[1]) / 100; - Object.keys(t2).forEach((tensor6) => tf33.dispose(t2[tensor6])); - last10[idx] = obj; - lastCount9 = count2; - lastTime15 = now(); - resolve(obj); - }); -} - -// src/models.ts -var Models = class { - constructor() { - __publicField(this, "ssrnetage", null); - __publicField(this, "gear", null); - __publicField(this, "blazeposedetect", null); - __publicField(this, "blazepose", null); - __publicField(this, "centernet", null); - __publicField(this, "efficientpose", null); - __publicField(this, "mobilefacenet", null); - __publicField(this, "insightface", null); - __publicField(this, "emotion", null); - __publicField(this, "facedetect", null); - __publicField(this, "faceiris", null); - __publicField(this, "facemesh", null); - __publicField(this, "faceres", null); - __publicField(this, "ssrnetgender", null); - __publicField(this, "handpose", null); - __publicField(this, "handskeleton", null); - __publicField(this, "handtrack", null); - __publicField(this, "liveness", null); - __publicField(this, "meet", null); - __publicField(this, "movenet", null); - __publicField(this, "nanodet", null); - __publicField(this, "posenet", null); - __publicField(this, "selfie", null); - __publicField(this, "rvm", null); - __publicField(this, "antispoof", null); - } -}; -var instance; -var getModelStats = (currentInstance) => { - if (currentInstance) - instance = currentInstance; - if (!instance) - log("instance not registred"); - let totalSizeFromManifest = 0; - let totalSizeWeights = 0; - let totalSizeLoading = 0; - for (const m of Object.values(modelStats)) { - totalSizeFromManifest += m.sizeFromManifest; - totalSizeWeights += m.sizeLoadedWeights; - totalSizeLoading += m.sizeDesired; - } - const percentageLoaded = totalSizeLoading > 0 ? totalSizeWeights / totalSizeLoading : 0; - return { - numLoadedModels: Object.values(modelStats).length, - numDefinedModels: Object.keys(instance.models).length, - percentageLoaded, - totalSizeFromManifest, - totalSizeWeights, - totalSizeLoading, - totalSizeEnabled: void 0, - modelStats: Object.values(modelStats) - }; -}; -function reset2(currentInstance) { - if (currentInstance) - instance = currentInstance; - for (const model21 of Object.keys(instance.models)) - instance.models[model21] = null; -} -async function load22(currentInstance) { - var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C; - if (currentInstance) - instance = currentInstance; - if (!instance) - log("instance not registred"); - if (env.initial) - reset2(instance); - if (instance.config.hand.enabled) { - if (!instance.models.handpose && ((_b = (_a = instance.config.hand.detector) == null ? void 0 : _a.modelPath) == null ? void 0 : _b.includes("handdetect"))) { - [instance.models.handpose, instance.models.handskeleton] = await load10(instance.config); - } - if (!instance.models.handskeleton && instance.config.hand.landmarks && ((_d = (_c = instance.config.hand.detector) == null ? void 0 : _c.modelPath) == null ? void 0 : _d.includes("handdetect"))) { - [instance.models.handpose, instance.models.handskeleton] = await load10(instance.config); - } - } - if (instance.config.body.enabled && !instance.models.blazepose && ((_e = instance.config.body.modelPath) == null ? void 0 : _e.includes("blazepose"))) - instance.models.blazepose = loadPose(instance.config); - if (instance.config.body.enabled && !instance.models.blazeposedetect && instance.config.body["detector"] && instance.config.body["detector"].modelPath) - instance.models.blazeposedetect = loadDetect(instance.config); - if (instance.config.body.enabled && !instance.models.efficientpose && ((_f = instance.config.body.modelPath) == null ? void 0 : _f.includes("efficientpose"))) - instance.models.efficientpose = load4(instance.config); - if (instance.config.body.enabled && !instance.models.movenet && ((_g = instance.config.body.modelPath) == null ? void 0 : _g.includes("movenet"))) - instance.models.movenet = load15(instance.config); - if (instance.config.body.enabled && !instance.models.posenet && ((_h = instance.config.body.modelPath) == null ? void 0 : _h.includes("posenet"))) - instance.models.posenet = load17(instance.config); - if (instance.config.face.enabled && !instance.models.facedetect) - instance.models.facedetect = load2(instance.config); - if (instance.config.face.enabled && ((_i = instance.config.face.antispoof) == null ? void 0 : _i.enabled) && !instance.models.antispoof) - instance.models.antispoof = load(instance.config); - if (instance.config.face.enabled && ((_j = instance.config.face.liveness) == null ? void 0 : _j.enabled) && !instance.models.liveness) - instance.models.liveness = load12(instance.config); - if (instance.config.face.enabled && ((_k = instance.config.face.description) == null ? void 0 : _k.enabled) && !instance.models.faceres) - instance.models.faceres = load8(instance.config); - if (instance.config.face.enabled && ((_l = instance.config.face.emotion) == null ? void 0 : _l.enabled) && !instance.models.emotion) - instance.models.emotion = load5(instance.config); - if (instance.config.face.enabled && ((_m = instance.config.face.iris) == null ? void 0 : _m.enabled) && !((_n = instance.config.face.attention) == null ? void 0 : _n.enabled) && !instance.models.faceiris) - instance.models.faceiris = load6(instance.config); - if (instance.config.face.enabled && ((_o = instance.config.face.mesh) == null ? void 0 : _o.enabled) && !instance.models.facemesh) - instance.models.facemesh = load7(instance.config); - if (instance.config.face.enabled && ((_p = instance.config.face["gear"]) == null ? void 0 : _p.enabled) && !instance.models.gear) - instance.models.gear = load9(instance.config); - if (instance.config.face.enabled && ((_q = instance.config.face["ssrnet"]) == null ? void 0 : _q.enabled) && !instance.models.ssrnetage) - instance.models.ssrnetage = load20(instance.config); - if (instance.config.face.enabled && ((_r = instance.config.face["ssrnet"]) == null ? void 0 : _r.enabled) && !instance.models.ssrnetgender) - instance.models.ssrnetgender = load21(instance.config); - if (instance.config.face.enabled && ((_s = instance.config.face["mobilefacenet"]) == null ? void 0 : _s.enabled) && !instance.models.mobilefacenet) - instance.models.mobilefacenet = load14(instance.config); - if (instance.config.face.enabled && ((_t = instance.config.face["insightface"]) == null ? void 0 : _t.enabled) && !instance.models.insightface) - instance.models.insightface = load11(instance.config); - if (instance.config.hand.enabled && !instance.models.handtrack && ((_v = (_u = instance.config.hand.detector) == null ? void 0 : _u.modelPath) == null ? void 0 : _v.includes("handtrack"))) - instance.models.handtrack = loadDetect2(instance.config); - if (instance.config.hand.enabled && instance.config.hand.landmarks && !instance.models.handskeleton && ((_x = (_w = instance.config.hand.detector) == null ? void 0 : _w.modelPath) == null ? void 0 : _x.includes("handtrack"))) - instance.models.handskeleton = loadSkeleton(instance.config); - if (instance.config.object.enabled && !instance.models.centernet && ((_y = instance.config.object.modelPath) == null ? void 0 : _y.includes("centernet"))) - instance.models.centernet = load3(instance.config); - if (instance.config.object.enabled && !instance.models.nanodet && ((_z = instance.config.object.modelPath) == null ? void 0 : _z.includes("nanodet"))) - instance.models.nanodet = load16(instance.config); - if (instance.config.segmentation.enabled && !instance.models.selfie && ((_A = instance.config.segmentation.modelPath) == null ? void 0 : _A.includes("selfie"))) - instance.models.selfie = load19(instance.config); - if (instance.config.segmentation.enabled && !instance.models.meet && ((_B = instance.config.segmentation.modelPath) == null ? void 0 : _B.includes("meet"))) - instance.models.meet = load13(instance.config); - if (instance.config.segmentation.enabled && !instance.models.rvm && ((_C = instance.config.segmentation.modelPath) == null ? void 0 : _C.includes("rvm"))) - instance.models.rvm = load18(instance.config); - for await (const model21 of Object.keys(instance.models)) { - if (instance.models[model21] && typeof instance.models[model21] !== "undefined") { - instance.models[model21] = await instance.models[model21]; - } - } -} -function validateModel(currentInstance, model21, name) { - var _a, _b; - if (!model21) - return null; - if (currentInstance) - instance = currentInstance; - if (!instance) - log("instance not registred"); - if (!((_a = instance == null ? void 0 : instance.config) == null ? void 0 : _a.validateModels)) - return null; - const simpleOps = ["const", "placeholder", "noop", "pad", "squeeze", "add", "sub", "mul", "div"]; - const ignoreOps = ["biasadd", "fusedbatchnormv3", "matmul", "switch", "shape", "merge", "split", "broadcastto"]; - const ops = []; - const missing = []; - const url = model21["modelUrl"]; - const executor = model21["executor"]; - if ((_b = executor == null ? void 0 : executor.graph) == null ? void 0 : _b.nodes) { - for (const kernel of Object.values(executor.graph.nodes)) { - const op = kernel.op.toLowerCase(); - if (!ops.includes(op)) - ops.push(op); - } - } else { - if (!executor && instance.config.debug) { - log("model not loaded", name); - } - } - for (const op of ops) { - if (!simpleOps.includes(op) && !ignoreOps.includes(op) && !instance.env.kernels.includes(op) && !instance.env.kernels.includes(op.replace("_", "")) && !instance.env.kernels.includes(op.replace("native", "")) && !instance.env.kernels.includes(op.replace("v2", ""))) { - missing.push(op); - } - } - if (instance.config.debug && missing.length > 0) - log("model validation failed:", name, missing); - return missing.length > 0 ? { name, missing, ops, url } : null; -} -function validate2(currentInstance) { - if (currentInstance) - instance = currentInstance; - if (!instance) - log("instance not registred"); - const missing = []; - for (const defined of Object.keys(currentInstance.models)) { - const model21 = currentInstance.models[defined]; - if (!model21) - continue; - const res = validateModel(currentInstance, model21, defined); - if (res) - missing.push(res); - } - return missing; -} - -// src/tfjs/humangl.ts -var config2 = { - name: "humangl", - priority: 999, - canvas: null, - gl: null, - extensions: [], - webGLattr: { - alpha: false, - antialias: false, - premultipliedAlpha: false, - preserveDrawingBuffer: false, - depth: false, - stencil: false, - failIfMajorPerformanceCaveat: false, - desynchronized: true - } -}; -function extensions() { - const gl = config2.gl; - if (!gl) - return; - config2.extensions = gl.getSupportedExtensions(); -} -function register(instance2) { - var _a; - if (instance2.config.backend !== "humangl") - return; - if (config2.name in tf34.engine().registry && !((_a = config2 == null ? void 0 : config2.gl) == null ? void 0 : _a.getParameter(config2.gl.VERSION))) { - log("humangl error: backend invalid context"); - reset2(instance2); - } - if (!tf34.findBackend(config2.name)) { - try { - config2.canvas = canvas(100, 100); - } catch (err) { - log("humangl error: cannot create canvas:", err); - return; - } - try { - config2.gl = config2.canvas.getContext("webgl2", config2.webGLattr); - if (!config2.gl) { - log("humangl error: cannot get webgl context"); - return; - } - const glv2 = config2.gl.getParameter(config2.gl.VERSION).includes("2.0"); - if (!glv2) { - log("backend override: using fallback webgl backend as webgl 2.0 is not detected"); - instance2.config.backend = "webgl"; - return; - } - if (config2.canvas) { - config2.canvas.addEventListener("webglcontextlost", (e) => { - log("humangl error:", e.type); - log("possible browser memory leak using webgl or conflict with multiple backend registrations"); - instance2.emit("error"); - throw new Error("backend error: webgl context lost"); - }); - config2.canvas.addEventListener("webglcontextrestored", (e) => { - log("humangl error: context restored:", e); - }); - config2.canvas.addEventListener("webglcontextcreationerror", (e) => { - log("humangl error: context create:", e); - }); - } - } catch (err) { - log("humangl error: cannot get webgl context:", err); - return; - } - try { - tf34.setWebGLContext(2, config2.gl); - } catch (err) { - log("humangl error: cannot set webgl context:", err); - return; - } - try { - const ctx = new tf34.GPGPUContext(config2.gl); - tf34.registerBackend(config2.name, () => new tf34.MathBackendWebGL(ctx), config2.priority); - } catch (err) { - log("humangl error: cannot register webgl backend:", err); - return; - } - try { - const kernels = tf34.getKernelsForBackend("webgl"); - kernels.forEach((kernelConfig) => { - const newKernelConfig = { ...kernelConfig, backendName: config2.name }; - tf34.registerKernel(newKernelConfig); - }); - } catch (err) { - log("humangl error: cannot update webgl backend registration:", err); - return; - } - try { - if (tf34.env().flagRegistry.WEBGL_VERSION) - tf34.env().set("WEBGL_VERSION", 2); - } catch (err) { - log("humangl error: cannot set WebGL backend flags:", err); - return; - } - extensions(); - const current = tf34.backend().getGPGPUContext ? tf34.backend().getGPGPUContext().gl : null; - if (current) { - if (instance2.config.debug) - log("humangl backend registered:", { webgl: current.getParameter(current.VERSION), renderer: current.getParameter(current.RENDERER) }); - } else { - log("humangl error: no current gl context:", current, config2.gl); - } - } -} - -// src/tfjs/backend.ts -var tf35 = __toESM(require_tfjs_esm()); -function registerCustomOps(config3) { - const newKernels = []; - if (!env.kernels.includes("mod")) { - const kernelMod = { - kernelName: "Mod", - backendName: tf35.getBackend(), - kernelFunc: (op) => tf35.tidy(() => tf35.sub(op.inputs.a, tf35.mul(tf35.div(op.inputs.a, op.inputs.b), op.inputs.b))) - }; - tf35.registerKernel(kernelMod); - env.kernels.push("mod"); - newKernels.push("mod"); - } - if (!env.kernels.includes("floormod")) { - const kernelFloorMod = { - kernelName: "FloorMod", - backendName: tf35.getBackend(), - kernelFunc: (op) => tf35.tidy(() => tf35.add(tf35.mul(tf35.floorDiv(op.inputs.a / op.inputs.b), op.inputs.b), tf35.mod(op.inputs.a, op.inputs.b))) - }; - tf35.registerKernel(kernelFloorMod); - env.kernels.push("floormod"); - newKernels.push("floormod"); - } - if (!env.kernels.includes("rotatewithoffset") && config3.softwareKernels) { - const kernelRotateWithOffset = { - kernelName: "RotateWithOffset", - backendName: tf35.getBackend(), - kernelFunc: (op) => tf35.tidy(() => { - const backend4 = tf35.getBackend(); - tf35.setBackend("cpu"); - const t2 = tf35.image.rotateWithOffset(op.inputs.image, op.attrs.radians, op.attrs.fillValue, op.attrs.center); - tf35.setBackend(backend4); - return t2; - }) - }; - tf35.registerKernel(kernelRotateWithOffset); - env.kernels.push("rotatewithoffset"); - newKernels.push("rotatewithoffset"); - } - if (newKernels.length > 0 && config3.debug) - log("registered kernels:", newKernels); -} -var defaultFlags = {}; -async function check(instance2, force = false) { - instance2.state = "backend"; - if (force || env.initial || instance2.config.backend && instance2.config.backend.length > 0 && tf35.getBackend() !== instance2.config.backend) { - const timeStamp = now(); - if (instance2.config.backend && instance2.config.backend.length > 0) { - if (typeof window === "undefined" && typeof WorkerGlobalScope !== "undefined" && instance2.config.debug) { - if (instance2.config.debug) - log("running inside web worker"); - } - if (env.browser && instance2.config.backend === "tensorflow") { - if (instance2.config.debug) - log("override: backend set to tensorflow while running in browser"); - instance2.config.backend = "webgl"; - } - if (env.node && (instance2.config.backend === "webgl" || instance2.config.backend === "humangl")) { - if (instance2.config.debug) - log(`override: backend set to ${instance2.config.backend} while running in nodejs`); - instance2.config.backend = "tensorflow"; - } - if (env.browser && instance2.config.backend === "webgpu") { - if (typeof navigator === "undefined" || typeof navigator.gpu === "undefined") { - log("override: backend set to webgpu but browser does not support webgpu"); - instance2.config.backend = "webgl"; - } else { - const adapter = await navigator.gpu.requestAdapter(); - if (instance2.config.debug) - log("enumerated webgpu adapter:", adapter); - if (!adapter) { - log("override: backend set to webgpu but browser reports no available gpu"); - instance2.config.backend = "webgl"; - } else { - const adapterInfo = "requestAdapterInfo" in adapter ? await adapter.requestAdapterInfo() : void 0; - log("webgpu adapter info:", adapterInfo); - } - } - } - let available = Object.keys(tf35.engine().registryFactory); - if (instance2.config.backend === "humangl" && !available.includes("humangl")) { - register(instance2); - available = Object.keys(tf35.engine().registryFactory); - } - if (instance2.config.debug) - log("available backends:", available); - if (!available.includes(instance2.config.backend)) { - log(`error: backend ${instance2.config.backend} not found in registry`); - instance2.config.backend = env.node ? "tensorflow" : "webgl"; - if (instance2.config.debug) - log(`override: setting backend ${instance2.config.backend}`); - } - if (instance2.config.debug) - log("setting backend:", [instance2.config.backend]); - if (instance2.config.backend === "wasm") { - if (tf35.env().flagRegistry.CANVAS2D_WILL_READ_FREQUENTLY) - tf35.env().set("CANVAS2D_WILL_READ_FREQUENTLY", true); - if (instance2.config.debug) - log("wasm path:", instance2.config.wasmPath); - if (typeof tf35.setWasmPaths !== "undefined") - tf35.setWasmPaths(instance2.config.wasmPath, instance2.config.wasmPlatformFetch); - else - throw new Error("backend error: attempting to use wasm backend but wasm path is not set"); - let mt = false; - let simd = false; - try { - mt = await tf35.env().getAsync("WASM_HAS_MULTITHREAD_SUPPORT"); - simd = await tf35.env().getAsync("WASM_HAS_SIMD_SUPPORT"); - if (instance2.config.debug) - log(`wasm execution: ${simd ? "simd" : "no simd"} ${mt ? "multithreaded" : "singlethreaded"}`); - if (instance2.config.debug && !simd) - log("warning: wasm simd support is not enabled"); - } catch (e) { - log("wasm detection failed"); - } - } - try { - await tf35.setBackend(instance2.config.backend); - await tf35.ready(); - } catch (err) { - log("error: cannot set backend:", instance2.config.backend, err); - return false; - } - if (instance2.config.debug) - defaultFlags = JSON.parse(JSON.stringify(tf35.env().flags)); - } - if (tf35.getBackend() === "humangl" || tf35.getBackend() === "webgl") { - if (tf35.env().flagRegistry.WEBGL_USE_SHAPES_UNIFORMS) - tf35.env().set("WEBGL_USE_SHAPES_UNIFORMS", true); - if (tf35.env().flagRegistry.WEBGL_EXP_CONV) - tf35.env().set("WEBGL_EXP_CONV", true); - if (instance2.config.debug && typeof instance2.config.deallocate !== "undefined" && instance2.config.deallocate) { - log("changing webgl: WEBGL_DELETE_TEXTURE_THRESHOLD:", true); - tf35.env().set("WEBGL_DELETE_TEXTURE_THRESHOLD", 0); - } - } - if (tf35.getBackend() === "webgpu") { - } - if (instance2.config.debug) { - const newFlags = tf35.env().flags; - const updatedFlags = {}; - for (const key of Object.keys(newFlags)) { - if (defaultFlags[key] === newFlags[key]) - continue; - updatedFlags[key] = newFlags[key]; - } - if (instance2.config.debug && Object.keys(updatedFlags).length > 0) - log("backend:", tf35.getBackend(), "flags:", updatedFlags); - } - if (instance2.config.flags && Object.keys(instance2.config.flags).length > 0) { - if (instance2.config.debug) - log("flags:", instance2.config["flags"]); - for (const [key, val] of Object.entries(instance2.config.flags)) { - tf35.env().set(key, val); - } - } - tf35.enableProdMode(); - init(); - instance2.performance.initBackend = Math.trunc(now() - timeStamp); - instance2.config.backend = tf35.getBackend(); - await env.updateBackend(); - registerCustomOps(instance2.config); - env.initial = false; - } - return true; -} -function fakeOps(kernelNames, config3) { - for (const kernelName of kernelNames) { - const kernelConfig = { - kernelName, - backendName: config3.backend, - kernelFunc: () => { - if (config3.debug) - log("kernelFunc", kernelName, config3.backend); - } - }; - tf35.registerKernel(kernelConfig); - } - env.kernels = tf35.getKernelsForBackend(tf35.getBackend()).map((kernel) => kernel.kernelName.toLowerCase()); -} - -// src/draw/draw.ts -var draw_exports = {}; -__export(draw_exports, { - all: () => all, - body: () => body, - canvas: () => canvas2, - face: () => face, - gesture: () => gesture, - hand: () => hand, - object: () => object, - options: () => options3, - person: () => person -}); - -// src/draw/primitives.ts -var getCanvasContext = (input) => { - if (!input) - log("draw error: invalid canvas"); - else if (!input.getContext) - log("draw error: canvas context not defined"); - else { - const ctx = input.getContext("2d"); - if (!ctx) - log("draw error: cannot get canvas context"); - else - return ctx; - } - return null; -}; -var rad2deg = (theta) => Math.round(theta * 180 / Math.PI); -var colorDepth = (z, opt2) => { - if (!opt2.useDepth || typeof z === "undefined") - return opt2.color; - const rgb2 = Uint8ClampedArray.from([127 + 2 * z, 127 - 2 * z, 255]); - return `rgba(${rgb2[0]}, ${rgb2[1]}, ${rgb2[2]}, ${opt2.alpha})`; -}; -function point(ctx, x, y, z, localOptions) { - ctx.fillStyle = colorDepth(z, localOptions); - ctx.beginPath(); - ctx.arc(x, y, localOptions.pointSize, 0, 2 * Math.PI); - ctx.fill(); -} -function rect(ctx, x, y, width, height, localOptions) { - ctx.beginPath(); - ctx.lineWidth = localOptions.lineWidth; - if (localOptions.useCurves) { - const cx = (x + x + width) / 2; - const cy = (y + y + height) / 2; - ctx.ellipse(cx, cy, width / 2, height / 2, 0, 0, 2 * Math.PI); - } else { - ctx.moveTo(x + localOptions.roundRect, y); - ctx.lineTo(x + width - localOptions.roundRect, y); - ctx.quadraticCurveTo(x + width, y, x + width, y + localOptions.roundRect); - ctx.lineTo(x + width, y + height - localOptions.roundRect); - ctx.quadraticCurveTo(x + width, y + height, x + width - localOptions.roundRect, y + height); - ctx.lineTo(x + localOptions.roundRect, y + height); - ctx.quadraticCurveTo(x, y + height, x, y + height - localOptions.roundRect); - ctx.lineTo(x, y + localOptions.roundRect); - ctx.quadraticCurveTo(x, y, x + localOptions.roundRect, y); - ctx.closePath(); - } - ctx.stroke(); -} -function lines(ctx, points, localOptions) { - if (points.length < 2) - return; - ctx.beginPath(); - ctx.moveTo(points[0][0], points[0][1]); - for (const pt of points) { - ctx.strokeStyle = colorDepth(pt[2] || 0, localOptions); - ctx.lineTo(Math.trunc(pt[0]), Math.trunc(pt[1])); - } - ctx.stroke(); - if (localOptions.fillPolygons) { - ctx.closePath(); - ctx.fill(); - } -} -function curves(ctx, points, localOptions) { - if (points.length < 2) - return; - ctx.lineWidth = localOptions.lineWidth; - if (!localOptions.useCurves || points.length <= 2) { - lines(ctx, points, localOptions); - return; - } - ctx.moveTo(points[0][0], points[0][1]); - for (let i = 0; i < points.length - 2; i++) { - const xc = (points[i][0] + points[i + 1][0]) / 2; - const yc = (points[i][1] + points[i + 1][1]) / 2; - ctx.quadraticCurveTo(points[i][0], points[i][1], xc, yc); - } - ctx.quadraticCurveTo(points[points.length - 2][0], points[points.length - 2][1], points[points.length - 1][0], points[points.length - 1][1]); - ctx.stroke(); - if (localOptions.fillPolygons) { - ctx.closePath(); - ctx.fill(); - } -} -function arrow(ctx, from, to, radius = 5) { - let angle; - let x; - let y; - ctx.beginPath(); - ctx.moveTo(from[0], from[1]); - ctx.lineTo(to[0], to[1]); - angle = Math.atan2(to[1] - from[1], to[0] - from[0]); - x = radius * Math.cos(angle) + to[0]; - y = radius * Math.sin(angle) + to[1]; - ctx.moveTo(x, y); - angle += 1 / 3 * (2 * Math.PI); - x = radius * Math.cos(angle) + to[0]; - y = radius * Math.sin(angle) + to[1]; - ctx.lineTo(x, y); - angle += 1 / 3 * (2 * Math.PI); - x = radius * Math.cos(angle) + to[0]; - y = radius * Math.sin(angle) + to[1]; - ctx.lineTo(x, y); - ctx.closePath(); - ctx.stroke(); - ctx.fill(); -} - -// src/draw/options.ts -var options3 = { - color: "rgba(173, 216, 230, 0.6)", - labelColor: "rgba(173, 216, 230, 1)", - shadowColor: "black", - alpha: 0.5, - font: 'small-caps 16px "Segoe UI"', - lineHeight: 18, - lineWidth: 4, - pointSize: 2, - roundRect: 8, - drawPoints: false, - drawLabels: true, - drawBoxes: true, - drawAttention: true, - drawGestures: true, - drawPolygons: true, - drawGaze: true, - fillPolygons: false, - useDepth: true, - useCurves: false -}; - -// src/draw/face.ts -var opt; -function drawLabels(f, ctx) { - var _a, _b; - if (opt.drawLabels) { - const labels2 = []; - labels2.push(`face: ${Math.trunc(100 * f.score)}%`); - if (f.genderScore) - labels2.push(`${f.gender || ""} ${Math.trunc(100 * f.genderScore)}%`); - if (f.age) - labels2.push(`age: ${f.age || ""}`); - if (f.iris) - labels2.push(`distance: ${f.iris}`); - if (f.real) - labels2.push(`real: ${Math.trunc(100 * f.real)}%`); - if (f.live) - labels2.push(`live: ${Math.trunc(100 * f.live)}%`); - if (f.emotion && f.emotion.length > 0) { - const emotion2 = f.emotion.map((a) => `${Math.trunc(100 * a.score)}% ${a.emotion}`); - if (emotion2.length > 3) - emotion2.length = 3; - labels2.push(emotion2.join(" ")); - } - if (((_a = f.rotation) == null ? void 0 : _a.angle) && ((_b = f.rotation) == null ? void 0 : _b.gaze)) { - if (f.rotation.angle.roll) - labels2.push(`roll: ${rad2deg(f.rotation.angle.roll)}\xB0 yaw:${rad2deg(f.rotation.angle.yaw)}\xB0 pitch:${rad2deg(f.rotation.angle.pitch)}\xB0`); - if (f.rotation.gaze.bearing) - labels2.push(`gaze: ${rad2deg(f.rotation.gaze.bearing)}\xB0`); - } - if (labels2.length === 0) - labels2.push("face"); - ctx.fillStyle = opt.color; - for (let i = labels2.length - 1; i >= 0; i--) { - const x = Math.max(f.box[0], 0); - const y = i * opt.lineHeight + f.box[1]; - if (opt.shadowColor && opt.shadowColor !== "") { - ctx.fillStyle = opt.shadowColor; - ctx.fillText(labels2[i], x + 5, y + 16); - } - ctx.fillStyle = opt.labelColor; - ctx.fillText(labels2[i], x + 4, y + 15); - } - } -} -function drawIrisElipse(f, ctx) { - var _a, _b, _c, _d; - if (((_a = f.annotations) == null ? void 0 : _a.leftEyeIris) && ((_b = f.annotations) == null ? void 0 : _b.leftEyeIris[0])) { - ctx.strokeStyle = opt.useDepth ? "rgba(255, 200, 255, 0.3)" : opt.color; - ctx.beginPath(); - const sizeX = Math.abs(f.annotations.leftEyeIris[3][0] - f.annotations.leftEyeIris[1][0]) / 2; - const sizeY = Math.abs(f.annotations.leftEyeIris[4][1] - f.annotations.leftEyeIris[2][1]) / 2; - ctx.ellipse(f.annotations.leftEyeIris[0][0], f.annotations.leftEyeIris[0][1], sizeX, sizeY, 0, 0, 2 * Math.PI); - ctx.stroke(); - if (opt.fillPolygons) { - ctx.fillStyle = opt.useDepth ? "rgba(255, 255, 200, 0.3)" : opt.color; - ctx.fill(); - } - } - if (((_c = f.annotations) == null ? void 0 : _c.rightEyeIris) && ((_d = f.annotations) == null ? void 0 : _d.rightEyeIris[0])) { - ctx.strokeStyle = opt.useDepth ? "rgba(255, 200, 255, 0.3)" : opt.color; - ctx.beginPath(); - const sizeX = Math.abs(f.annotations.rightEyeIris[3][0] - f.annotations.rightEyeIris[1][0]) / 2; - const sizeY = Math.abs(f.annotations.rightEyeIris[4][1] - f.annotations.rightEyeIris[2][1]) / 2; - ctx.ellipse(f.annotations.rightEyeIris[0][0], f.annotations.rightEyeIris[0][1], sizeX, sizeY, 0, 0, 2 * Math.PI); - ctx.stroke(); - if (opt.fillPolygons) { - ctx.fillStyle = opt.useDepth ? "rgba(255, 255, 200, 0.3)" : opt.color; - ctx.fill(); - } - } -} -function drawGazeSpheres(f, ctx) { - var _a; - if (opt.drawGaze && ((_a = f.rotation) == null ? void 0 : _a.angle) && typeof Path2D !== "undefined") { - ctx.strokeStyle = "pink"; - const valX = f.box[0] + f.box[2] / 2 - f.box[3] * rad2deg(f.rotation.angle.yaw) / 90; - const valY = f.box[1] + f.box[3] / 2 + f.box[2] * rad2deg(f.rotation.angle.pitch) / 90; - const pathV = new Path2D(` - M ${f.box[0] + f.box[2] / 2} ${f.box[1]} +`;var qt=(e,t,n)=>{let o=new RegExp("\\b"+t+" \\w+ (\\w+)","ig");e.replace(o,(r,s)=>(n[s]=0,r))},Ut=class{constructor(t,n,o){R(this,"uniform",{});R(this,"attribute",{});R(this,"gl");R(this,"id");R(this,"compile",(t,n)=>{let o=this.gl.createShader(n);return o?(this.gl.shaderSource(o,t),this.gl.compileShader(o),this.gl.getShaderParameter(o,this.gl.COMPILE_STATUS)?o:(h(`filter: gl compile failed: ${this.gl.getShaderInfoLog(o)||"unknown"}`),null)):(h("filter: could not create shader"),null)});this.gl=t;let r=this.compile(n,this.gl.VERTEX_SHADER),s=this.compile(o,this.gl.FRAGMENT_SHADER);if(this.id=this.gl.createProgram(),!(!r||!s)){if(!this.id){h("filter: could not create webgl program");return}if(this.gl.attachShader(this.id,r),this.gl.attachShader(this.id,s),this.gl.linkProgram(this.id),!this.gl.getProgramParameter(this.id,this.gl.LINK_STATUS)){h(`filter: gl link failed: ${this.gl.getProgramInfoLog(this.id)||"unknown"}`);return}this.gl.useProgram(this.id),qt(n,"attribute",this.attribute);for(let A in this.attribute)this.attribute[A]=this.gl.getAttribLocation(this.id,A);qt(n,"uniform",this.uniform),qt(o,"uniform",this.uniform);for(let A in this.uniform)this.uniform[A]=this.gl.getUniformLocation(this.id,A)}}};function H1(){let e=0,t=null,n=!1,o=-1,r=[null,null],s=[],A=null,a=null,l=$0(100,100),c={},x={INTERMEDIATE:1},i=l.getContext("webgl");if(!i){h("filter: cannot get webgl context");return}this.gl=i;function f(T,y){if(!(T===l.width&&y===l.height)){if(l.width=T,l.height=y,!A){let b=new Float32Array([-1,-1,0,1,1,-1,1,1,-1,1,0,0,-1,1,0,0,1,-1,1,1,1,1,1,0]);A=i.createBuffer(),i.bindBuffer(i.ARRAY_BUFFER,A),i.bufferData(i.ARRAY_BUFFER,b,i.STATIC_DRAW),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0)}i.viewport(0,0,l.width,l.height),r=[null,null]}}function d(T,y){let b=i.createFramebuffer();i.bindFramebuffer(i.FRAMEBUFFER,b);let z=i.createRenderbuffer();i.bindRenderbuffer(i.RENDERBUFFER,z);let w=i.createTexture();return i.bindTexture(i.TEXTURE_2D,w),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,T,y,0,i.RGBA,i.UNSIGNED_BYTE,null),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),i.framebufferTexture2D(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,w,0),i.bindTexture(i.TEXTURE_2D,null),i.bindFramebuffer(i.FRAMEBUFFER,null),{fbo:b,texture:w}}function m(T){return r[T]=r[T]||d(l.width,l.height),r[T]}function p(T=0){if(!a)return;let y=null,b=null,z=!1;e===0?y=t:y=m(o).texture||null,e++,n&&!(T&x.INTERMEDIATE)?(b=null,z=e%2===0):(o=(o+1)%2,b=m(o).fbo||null),i.bindTexture(i.TEXTURE_2D,y),i.bindFramebuffer(i.FRAMEBUFFER,b),i.uniform1f(a.uniform.flipY,z?-1:1),i.drawArrays(i.TRIANGLES,0,6)}function g(T){if(c[T])return a=c[T],i.useProgram((a?a.id:null)||null),a;if(a=new Ut(i,C1,T),!a)return h("filter: could not get webgl program"),null;let y=Float32Array.BYTES_PER_ELEMENT,b=4*y;return i.enableVertexAttribArray(a.attribute.pos),i.vertexAttribPointer(a.attribute.pos,2,i.FLOAT,!1,b,0*y),i.enableVertexAttribArray(a.attribute.uv),i.vertexAttribPointer(a.attribute.uv,2,i.FLOAT,!1,b,2*y),c[T]=a,a}let v={colorMatrix:T=>{let y=new Float32Array(T);y[4]/=255,y[9]/=255,y[14]/=255,y[19]/=255;let b=y[18]===1&&y[3]===0&&y[8]===0&&y[13]===0&&y[15]===0&&y[16]===0&&y[17]===0&&y[19]===0?W1:L1,z=g(b);!z||(i.uniform1fv(z.uniform.m,y),p())},brightness:T=>{let y=(T||0)+1;v.colorMatrix([y,0,0,0,0,0,y,0,0,0,0,0,y,0,0,0,0,0,1,0])},saturation:T=>{let y=(T||0)*2/3+1,b=(y-1)*-.5;v.colorMatrix([y,b,b,0,0,b,y,b,0,0,b,b,y,0,0,0,0,0,1,0])},desaturate:()=>{v.saturation(-1)},contrast:T=>{let y=(T||0)+1,b=-128*(y-1);v.colorMatrix([y,0,0,0,b,0,y,0,0,b,0,0,y,0,b,0,0,0,1,0])},negative:()=>{v.contrast(-2)},hue:T=>{T=(T||0)/180*Math.PI;let y=Math.cos(T),b=Math.sin(T),z=.213,w=.715,O=.072;v.colorMatrix([z+y*(1-z)+b*-z,w+y*-w+b*-w,O+y*-O+b*(1-O),0,0,z+y*-z+b*.143,w+y*(1-w)+b*.14,O+y*-O+b*-.283,0,0,z+y*-z+b*-(1-z),w+y*-w+b*w,O+y*(1-O)+b*O,0,0,0,0,0,1,0])},desaturateLuminance:()=>{v.colorMatrix([.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,0,0,0,1,0])},sepia:()=>{v.colorMatrix([.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0])},brownie:()=>{v.colorMatrix([.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0])},vintagePinhole:()=>{v.colorMatrix([.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0])},kodachrome:()=>{v.colorMatrix([1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0])},technicolor:()=>{v.colorMatrix([1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0])},polaroid:()=>{v.colorMatrix([1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0])},shiftToBGR:()=>{v.colorMatrix([0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0])},convolution:T=>{let y=new Float32Array(T),b=1/l.width,z=1/l.height,w=g(B1);!w||(i.uniform1fv(w.uniform.m,y),i.uniform2f(w.uniform.px,b,z),p())},detectEdges:()=>{v.convolution.call(this,[0,1,0,1,-4,1,0,1,0])},sobelX:()=>{v.convolution.call(this,[-1,0,1,-2,0,2,-1,0,1])},sobelY:()=>{v.convolution.call(this,[-1,-2,-1,0,0,0,1,2,1])},sharpen:T=>{let y=T||1;v.convolution.call(this,[0,-1*y,0,-1*y,1+4*y,-1*y,0,-1*y,0])},emboss:T=>{let y=T||1;v.convolution.call(this,[-2*y,-1*y,0,-1*y,1,1*y,0,1*y,2*y])},blur:T=>{let y=T/7/l.width,b=T/7/l.height,z=g(G1);!z||(i.uniform2f(z.uniform.px,0,b),p(x.INTERMEDIATE),i.uniform2f(z.uniform.px,y,0),p())},pixelate:T=>{let y=T/l.width,b=T/l.height,z=g(F1);!z||(i.uniform2f(z.uniform.size,y,b),p())}};this.add=function(T){let y=Array.prototype.slice.call(arguments,1),b=v[T];s.push({func:b,args:y})},this.reset=function(){s=[]},this.get=function(){return s},this.apply=function(T){f(T.width,T.height),e=0,t||(t=i.createTexture()),i.bindTexture(i.TEXTURE_2D,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.NEAREST),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,T);for(let y=0;yd.data())),A=.99*Math.max(s[0][0],s[1][0],s[2][0]),a=[Y.sub(n[0],o[0]),Y.sub(n[1],o[1]),Y.sub(n[2],o[2])],l=[Y.sub(r[0],o[0]),Y.sub(r[1],o[1]),Y.sub(r[2],o[2])],c=[Y.div(A,l[0]),Y.div(A,l[1]),Y.div(A,l[2])],x=[Y.mul(a[0],c[0]),Y.mul(a[1],c[1]),Y.mul(a[2],c[2])],i=Y.stack([x[0],x[1],x[2]],2),f=Y.reshape(i,[1,t.shape[0],t.shape[1],3]);return Y.dispose([...n,...o,...r,...a,...l,...c,...x,i,t]),f}var Y2=3840,g0=null,M0=null,a2=null,_,U0={inputSum:0,cacheDiff:1,sumMethod:0,inputTensor:void 0};function Yt(){U0.inputSum=0,U0.cacheDiff=1,U0.sumMethod=0,U0.inputTensor=void 0}function $0(e,t){let n;if(k.browser)if(k.worker){if(typeof OffscreenCanvas=="undefined")throw new Error("canvas error: attempted to run in web worker but OffscreenCanvas is not supported");n=new OffscreenCanvas(e,t)}else{if(typeof document=="undefined")throw new Error("canvas error: attempted to run in browser but DOM is not defined");n=document.createElement("canvas"),n.width=e,n.height=t}else typeof k.Canvas!="undefined"?n=new k.Canvas(e,t):typeof globalThis.Canvas!="undefined"&&(n=new globalThis.Canvas(e,t));return n}function K2(e,t){let n=t||$0(e.width,e.height);return n.getContext("2d").drawImage(e,0,0),n}async function J2(e,t,n=!0){var f,d;if(!e)return t.debug&&h("input error: input is missing"),{tensor:null,canvas:null};if(!(e instanceof I.Tensor)&&!(typeof Image!="undefined"&&e instanceof Image)&&!(typeof k.Canvas!="undefined"&&e instanceof k.Canvas)&&!(typeof globalThis.Canvas!="undefined"&&e instanceof globalThis.Canvas)&&!(typeof ImageData!="undefined"&&e instanceof ImageData)&&!(typeof ImageBitmap!="undefined"&&e instanceof ImageBitmap)&&!(typeof HTMLImageElement!="undefined"&&e instanceof HTMLImageElement)&&!(typeof HTMLMediaElement!="undefined"&&e instanceof HTMLMediaElement)&&!(typeof HTMLVideoElement!="undefined"&&e instanceof HTMLVideoElement)&&!(typeof HTMLCanvasElement!="undefined"&&e instanceof HTMLCanvasElement)&&!(typeof OffscreenCanvas!="undefined"&&e instanceof OffscreenCanvas))throw new Error("input error: type is not recognized");if(e instanceof I.Tensor){let m=null;if(e.isDisposedInternal)throw new Error("input error: attempted to use tensor but it is disposed");if(!e.shape)throw new Error("input error: attempted to use tensor without a shape");if(e.shape.length===3){if(e.shape[2]===3)m=I.expandDims(e,0);else if(e.shape[2]===4){let p=I.slice3d(e,[0,0,0],[-1,-1,3]);m=I.expandDims(p,0),I.dispose(p)}}else e.shape.length===4&&(e.shape[3]===3?m=I.clone(e):e.shape[3]===4&&(m=I.slice4d(e,[0,0,0,0],[-1,-1,-1,3])));if(m==null||m.shape.length!==4||m.shape[0]!==1||m.shape[3]!==3)throw new Error(`input error: attempted to use tensor with unrecognized shape: ${e.shape.toString()}`);if(m.dtype==="int32"){let p=I.cast(m,"float32");I.dispose(m),m=p}return{tensor:m,canvas:t.filter.return?M0:null}}if(typeof e.readyState!="undefined"&&e.readyState<=2)return t.debug&&h("input stream is not ready"),{tensor:null,canvas:g0};let o=e.naturalWidth||e.videoWidth||e.width||e.shape&&e.shape[1]>0,r=e.naturalHeight||e.videoHeight||e.height||e.shape&&e.shape[2]>0;if(!o||!r)return t.debug&&h("cannot determine input dimensions"),{tensor:null,canvas:g0};let s=o,A=r;if(s>Y2&&(s=Y2,A=Math.trunc(s*r/o)),A>Y2&&(A=Y2,s=Math.trunc(A*o/r)),(((f=t.filter)==null?void 0:f.width)||0)>0?s=t.filter.width:(((d=t.filter)==null?void 0:d.height)||0)>0&&(s=o*((t.filter.height||0)/r)),(t.filter.height||0)>0?A=t.filter.height:(t.filter.width||0)>0&&(A=r*((t.filter.width||0)/o)),!s||!A)throw new Error("input error: cannot determine dimension");(!g0||g0.width!==s||g0.height!==A)&&(g0=$0(s,A));let a=g0.getContext("2d");if(typeof ImageData!="undefined"&&e instanceof ImageData?a.putImageData(e,0,0):t.filter.flip&&typeof a.translate!="undefined"?(a.translate(o,0),a.scale(-1,1),a.drawImage(e,0,0,o,r,0,0,g0.width,g0.height),a.setTransform(1,0,0,1,0,0)):a.drawImage(e,0,0,o,r,0,0,g0.width,g0.height),(!M0||g0.width!==M0.width||g0.height!==M0.height)&&(M0=$0(g0.width,g0.height)),t.filter.enabled&&k.webgl.supported?(_||(_=k.browser?new H1:null),k.filter=!!_,_!=null&&_.add?(_.reset(),t.filter.brightness!==0&&_.add("brightness",t.filter.brightness),t.filter.contrast!==0&&_.add("contrast",t.filter.contrast),t.filter.sharpness!==0&&_.add("sharpen",t.filter.sharpness),t.filter.blur!==0&&_.add("blur",t.filter.blur),t.filter.saturation!==0&&_.add("saturation",t.filter.saturation),t.filter.hue!==0&&_.add("hue",t.filter.hue),t.filter.negative&&_.add("negative"),t.filter.sepia&&_.add("sepia"),t.filter.vintage&&_.add("brownie"),t.filter.sepia&&_.add("sepia"),t.filter.kodachrome&&_.add("kodachrome"),t.filter.technicolor&&_.add("technicolor"),t.filter.polaroid&&_.add("polaroid"),t.filter.pixelate!==0&&_.add("pixelate",t.filter.pixelate),_.get()>0?M0=_.apply(g0):M0=_.draw(g0)):(t.debug&&h("input process error: cannot initialize filters"),k.webgl.supported=!1,t.filter.enabled=!1,K2(g0,M0))):(K2(g0,M0),_&&(_=null),k.filter=!!_),!n)return{tensor:null,canvas:M0};if(!M0)throw new Error("canvas error: cannot create output");let l,c=3;if(typeof ImageData!="undefined"&&e instanceof ImageData||e.data&&e.width&&e.height)if(k.browser&&I.browser)l=I.browser?I.browser.fromPixels(e):null;else{c=e.data.length/e.height/e.width;let m=new Uint8Array(e.data.buffer);l=I.tensor(m,[e.height,e.width,c],"int32")}else if((!a2||M0.width!==a2.width||M0.height!==a2.height)&&(a2=$0(M0.width,M0.height)),I.browser&&k.browser)t.backend==="webgl"||t.backend==="humangl"||t.backend==="webgpu"?l=I.browser.fromPixels(M0):(a2=K2(M0),l=I.browser.fromPixels(a2));else{let g=K2(M0).getContext("2d").getImageData(0,0,s,A);c=g.data.length/s/A;let v=new Uint8Array(g.data.buffer);l=I.tensor(v,[s,A,c])}if(c===4){let m=I.slice3d(l,[0,0,0],[-1,-1,3]);I.dispose(l),l=m}if(!l)throw new Error("input error: cannot create tensor");let x=I.cast(l,"float32"),i=t.filter.equalization?await U2(x):I.expandDims(x,0);return I.dispose([l,x]),{tensor:i,canvas:t.filter.return?M0:null}}async function V1(e,t){let n=!1;if(e.cacheSensitivity===0||!t.shape||t.shape.length!==4||t.shape[1]>2048||t.shape[2]>2048)return n;if(!U0.inputTensor)U0.inputTensor=I.clone(t);else if(U0.inputTensor.shape[1]!==t.shape[1]||U0.inputTensor.shape[2]!==t.shape[2])I.dispose(U0.inputTensor),U0.inputTensor=I.clone(t);else{let o={};o.diff=I.sub(t,U0.inputTensor),o.squared=I.mul(o.diff,o.diff),o.sum=I.sum(o.squared);let s=(await o.sum.data())[0]/(t.shape[1]||1)/(t.shape[2]||1)/255/3;I.dispose([U0.inputTensor,o.diff,o.squared,o.sum]),U0.inputTensor=I.clone(t),n=s<=(e.cacheSensitivity||0)}return n}async function D1(e,t,n){let o={};if(!t||!n||t.shape.length!==4||t.shape.length!==n.shape.length)return e.debug||h("invalid input tensor or tensor shapes do not match:",t.shape,n.shape),0;if(t.shape[0]!==1||n.shape[0]!==1||t.shape[3]!==3||n.shape[3]!==3)return e.debug||h("input tensors must be of shape [1, height, width, 3]:",t.shape,n.shape),0;o.input1=I.clone(t),o.input2=t.shape[1]!==n.shape[1]||t.shape[2]!==n.shape[2]?I.image.resizeBilinear(n,[t.shape[1],t.shape[2]]):I.clone(n),o.diff=I.sub(o.input1,o.input2),o.squared=I.mul(o.diff,o.diff),o.sum=I.sum(o.squared);let s=(await o.sum.data())[0]/(t.shape[1]||1)/(t.shape[2]||1)/255/3;return I.dispose([o.input1,o.input2,o.diff,o.squared,o.sum]),s}var N2=class{constructor(){R(this,"browser");R(this,"node");R(this,"worker");R(this,"platform","");R(this,"agent","");R(this,"backends",[]);R(this,"initial");R(this,"filter");R(this,"tfjs");R(this,"offscreen");R(this,"perfadd",!1);R(this,"tensorflow",{version:void 0,gpu:void 0});R(this,"wasm",{supported:void 0,backend:void 0,simd:void 0,multithread:void 0});R(this,"webgl",{supported:void 0,backend:void 0,version:void 0,renderer:void 0});R(this,"webgpu",{supported:void 0,backend:void 0,adapter:void 0});R(this,"cpu",{model:void 0,flags:[]});R(this,"kernels",[]);R(this,"Canvas");R(this,"Image");R(this,"ImageData");if(this.browser=typeof navigator!="undefined",this.node=typeof process!="undefined"&&typeof process.versions!="undefined"&&typeof process.versions.node!="undefined",this.tfjs={version:y0.version["tfjs-core"]},this.offscreen=typeof OffscreenCanvas!="undefined",this.initial=!0,this.worker=this.browser&&this.offscreen?typeof WorkerGlobalScope!="undefined":void 0,typeof navigator!="undefined"){let t=navigator.userAgent.match(/\(([^()]+)\)/g);if(t!=null&&t[0]){let n=t[0].match(/\(([^()]+)\)/g);this.platform=n!=null&&n[0]?n[0].replace(/\(|\)/g,""):"",this.agent=navigator.userAgent.replace(t[0],""),this.platform[1]&&(this.agent=this.agent.replace(t[1],"")),this.agent=this.agent.replace(/ /g," ")}}else typeof process!="undefined"&&(this.platform=`${process.platform} ${process.arch}`,this.agent=`NodeJS ${process.version}`)}async updateBackend(){this.backends=Object.keys(y0.engine().registryFactory),this.tensorflow={version:y0.backend().binding?y0.backend().binding.TF_Version:void 0,gpu:y0.backend().binding?y0.backend().binding.isUsingGpuDevice():void 0},this.wasm.supported=typeof WebAssembly!="undefined",this.wasm.backend=this.backends.includes("wasm"),this.wasm.supported&&this.wasm.backend&&y0.getBackend()==="wasm"&&(this.wasm.simd=y0.env().get("WASM_HAS_SIMD_SUPPORT"),this.wasm.multithread=y0.env().get("WASM_HAS_MULTITHREAD_SUPPORT"));let t=$0(100,100),n=t?t.getContext("webgl2"):void 0;if(this.webgl.supported=typeof n!="undefined",this.webgl.backend=this.backends.includes("webgl"),this.webgl.supported&&this.webgl.backend&&(y0.getBackend()==="webgl"||y0.getBackend()==="humangl")){let o=y0.backend().gpgpu!=="undefined"?await y0.backend().getGPGPUContext().gl:null;o&&(this.webgl.version=o.getParameter(o.VERSION),this.webgl.renderer=o.getParameter(o.RENDERER))}this.webgpu.supported=this.browser&&typeof navigator.gpu!="undefined",this.webgpu.backend=this.backends.includes("webgpu");try{if(this.webgpu.supported){let o=await navigator.gpu.requestAdapter();this.webgpu.adapter=o?o.name:void 0}}catch(o){this.webgpu.supported=!1}try{this.kernels=y0.getKernelsForBackend(y0.getBackend()).map(o=>o.kernelName.toLowerCase())}catch(o){}}updateCPU(){let t={model:"",flags:[]};this.node&&this.platform.startsWith("linux"),this.cpu?this.cpu=t:Object.defineProperty(this,"cpu",{value:t})}},k=new N2;var _2=class{constructor(){R(this,"config");R(this,"element");R(this,"stream");R(this,"start",async t=>{if(t!=null&&t.debug&&(this.config.debug=t==null?void 0:t.debug),t!=null&&t.crop&&(this.config.crop=t==null?void 0:t.crop),t!=null&&t.mode&&(this.config.mode=t==null?void 0:t.mode),t!=null&&t.width&&(this.config.width=t==null?void 0:t.width),t!=null&&t.height&&(this.config.height=t==null?void 0:t.height),t!=null&&t.element)if(typeof t.element=="string"){let r=document.getElementById(t.element);if(r&&r instanceof HTMLVideoElement)this.element=r;else{this.config.debug&&h("webcam","cannot get dom element",t.element);return}}else if(t.element instanceof HTMLVideoElement)this.element=t.element;else{this.config.debug&&h("webcam","unknown dom element",t.element);return}else this.element=document.createElement("video");let n={audio:!1,video:{facingMode:this.config.mode==="front"?"user":"environment",resizeMode:this.config.crop?"crop-and-scale":"none",width:{ideal:this.config.width>0?this.config.width:window.innerWidth},height:{ideal:this.config.height>0?this.config.height:window.innerHeight}}};if(this.element.addEventListener("play",()=>{this.config.debug&&h("webcam","play")}),this.element.addEventListener("pause",()=>{this.config.debug&&h("webcam","pause")}),this.element.addEventListener("click",async()=>{!this.element||!this.stream||(this.element.paused?await this.element.play():this.element.pause())}),!(navigator!=null&&navigator.mediaDevices)){this.config.debug&&h("webcam","no devices");return}try{this.stream=await navigator.mediaDevices.getUserMedia(n)}catch(r){h("webcam",r);return}if(!this.stream){this.config.debug&&h("webcam","no stream");return}this.element.srcObject=this.stream,await new Promise(r=>{this.element?this.element.onloadeddata=()=>r(!0):r(!1)}),await this.element.play(),this.config.debug&&h("webcam",{width:this.width,height:this.height,label:this.label,stream:this.stream,track:this.track,settings:this.settings,constraints:this.constraints,capabilities:this.capabilities})});R(this,"pause",()=>{this.element&&this.element.pause()});R(this,"play",async()=>{this.element&&await this.element.play()});R(this,"stop",()=>{this.config.debug&&h("webcam","stop"),this.track&&this.track.stop()});this.config={element:void 0,debug:!0,mode:"front",crop:!1,width:0,height:0}}get track(){if(!!this.stream)return this.stream.getVideoTracks()[0]}get capabilities(){if(!!this.track)return this.track.getCapabilities?this.track.getCapabilities():void 0}get constraints(){if(!!this.track)return this.track.getConstraints?this.track.getConstraints():void 0}get settings(){if(!this.stream)return;let t=this.stream.getVideoTracks()[0];return t.getSettings?t.getSettings():void 0}get label(){return this.track?this.track.label:""}get paused(){var t;return((t=this.element)==null?void 0:t.paused)||!1}get width(){var t;return((t=this.element)==null?void 0:t.videoWidth)||0}get height(){var t;return((t=this.element)==null?void 0:t.videoHeight)||0}};var i2=D(V());var Kt={};we(Kt,{age:()=>lr,"anti-spoofing":()=>Vr,antispoof:()=>Qo,blazeface:()=>_o,"blazeface-back":()=>cr,"blazeface-front":()=>dr,"blazepose-detect":()=>Hr,"blazepose-detector2d":()=>xr,"blazepose-detector3d":()=>yr,"blazepose-full":()=>fr,"blazepose-heavy":()=>mr,"blazepose-lite":()=>pr,default:()=>ts,efficientpose:()=>ur,"efficientpose-i-lite":()=>Dr,"efficientpose-ii-lite":()=>Zr,"efficientpose-iv":()=>Xr,emotion:()=>$o,faceboxes:()=>hr,facemesh:()=>er,"facemesh-attention":()=>gr,"facemesh-attention-alt":()=>br,"facemesh-detection-full":()=>Mr,"facemesh-detection-short":()=>Tr,"facemesh-orig":()=>vr,faceres:()=>tr,"faceres-deep":()=>Pr,gear:()=>Rr,gender:()=>wr,"gender-ssrnet-imdb":()=>kr,handdetect:()=>Er,"handlandmark-full":()=>nr,"handlandmark-lite":()=>zr,"handlandmark-sparse":()=>Sr,handskeleton:()=>jr,handtrack:()=>or,"insightface-efficientnet-b0":()=>qr,"insightface-ghostnet-strides1":()=>Ur,"insightface-ghostnet-strides2":()=>Yr,"insightface-mobilenet-emore":()=>Kr,"insightface-mobilenet-swish":()=>Jr,iris:()=>rr,liveness:()=>sr,"mb3-centernet":()=>Ar,meet:()=>Nr,mobileface:()=>Or,mobilefacenet:()=>Ir,models:()=>ar,"movenet-lightning":()=>ir,"movenet-multipose":()=>Cr,"movenet-thunder":()=>Lr,nanodet:()=>Wr,"nanodet-e":()=>Qr,"nanodet-g":()=>_r,"nanodet-m":()=>$r,"nanodet-t":()=>es,posenet:()=>Fr,rvm:()=>Gr,selfie:()=>Br});var Qo=853098,_o=538928,$o=820516,er=1477958,tr=6978814,nr=5431368,or=2964837,rr=2599092,sr=592976,Ar=4030290,ar=0,ir=4650216,lr=161240,cr=538928,dr=402048,xr=7499400,yr=5928856,fr=6338290,mr=27501554,pr=2725490,ur=5651240,hr=2013002,br=2387598,gr=2382414,Mr=1026192,Tr=201268,vr=2955780,Pr=13957620,Rr=1498916,kr=161236,wr=201808,Er=3515612,zr=2023432,Sr=5286322,jr=5502280,Nr=372228,Or=2183192,Ir=5171976,Cr=9448838,Lr=12477112,Wr=7574558,Fr=5032780,Gr=3739355,Br=212886,Hr=5928804,Vr=853098,Dr=2269064,Zr=5651240,Xr=25643252,qr=13013224,Ur=8093408,Yr=8049584,Kr=6938536,Jr=12168584,Qr=12319156,_r=7574558,$r=1887474,es=5294216,ts={antispoof:Qo,blazeface:_o,emotion:$o,facemesh:er,faceres:tr,"handlandmark-full":nr,handtrack:or,iris:rr,liveness:sr,"mb3-centernet":Ar,models:ar,"movenet-lightning":ir,age:lr,"blazeface-back":cr,"blazeface-front":dr,"blazepose-detector2d":xr,"blazepose-detector3d":yr,"blazepose-full":fr,"blazepose-heavy":mr,"blazepose-lite":pr,efficientpose:ur,faceboxes:hr,"facemesh-attention-alt":br,"facemesh-attention":gr,"facemesh-detection-full":Mr,"facemesh-detection-short":Tr,"facemesh-orig":vr,"faceres-deep":Pr,gear:Rr,"gender-ssrnet-imdb":kr,gender:wr,handdetect:Er,"handlandmark-lite":zr,"handlandmark-sparse":Sr,handskeleton:jr,meet:Nr,mobileface:Or,mobilefacenet:Ir,"movenet-multipose":Cr,"movenet-thunder":Lr,nanodet:Wr,posenet:Fr,rvm:Gr,selfie:Br,"blazepose-detect":Hr,"anti-spoofing":Vr,"efficientpose-i-lite":Dr,"efficientpose-ii-lite":Zr,"efficientpose-iv":Xr,"insightface-efficientnet-b0":qr,"insightface-ghostnet-strides1":Ur,"insightface-ghostnet-strides2":Yr,"insightface-mobilenet-emore":Kr,"insightface-mobilenet-swish":Jr,"nanodet-e":Qr,"nanodet-g":_r,"nanodet-m":$r,"nanodet-t":es};var j0={cacheModels:!0,cacheSupported:!0,verbose:!0,debug:!1,modelBasePath:""},ee={};async function ns(e,t){return j0.debug&&h("load model fetch:",e,t),fetch(e,t)}function Z1(e){j0.cacheModels=e.cacheModels,j0.verbose=e.debug,j0.modelBasePath=e.modelBasePath}async function C(e){var c,x,i,f;let t=N1(j0.modelBasePath,e||"");t.toLowerCase().endsWith(".json")||(t+=".json");let n=t.includes("/")?t.split("/"):t.split("\\"),o=n[n.length-1].replace(".json",""),r="indexeddb://"+o;ee[o]={name:o,sizeFromManifest:0,sizeLoadedWeights:0,sizeDesired:Kt[o],inCache:!1},j0.cacheSupported=typeof indexedDB!="undefined";let s={};try{s=j0.cacheSupported&&j0.cacheModels?await i2.io.listModels():{}}catch(d){j0.cacheSupported=!1}ee[o].inCache=j0.cacheSupported&&j0.cacheModels&&Object.keys(s).includes(r);let A=typeof fetch=="undefined"?{}:{fetchFunc:(d,m)=>ns(d,m)},a=new i2.GraphModel(ee[o].inCache?r:t,A),l=!1;try{a.findIOHandler(),j0.debug&&h("model load handler:",a.handler)}catch(d){h("error finding model i/o handler:",t,d)}try{let d=await((c=a.handler)==null?void 0:c.load())||null;ee[o].sizeFromManifest=((x=d==null?void 0:d.weightData)==null?void 0:x.byteLength)||0,d?a.loadSync(d):a=await i2.loadGraphModel(ee[o].inCache?r:t,A),ee[o].sizeLoadedWeights=((f=(i=a.artifacts)==null?void 0:i.weightData)==null?void 0:f.byteLength)||0,j0.verbose&&h("load:",{model:o,url:a.modelUrl,bytes:ee[o].sizeLoadedWeights}),l=!0}catch(d){h("error loading model:",t,d)}if(l&&j0.cacheModels&&j0.cacheSupported&&!ee[o].inCache)try{let d=await a.save(r);j0.debug&&h("model saved:",r,d)}catch(d){h("error saving model:",t,d)}return a}var se=D(V());var Jt="2.11.1";var d0=D(V());var g2={};we(g2,{Models:()=>V2,getModelStats:()=>x1,load:()=>y1,reset:()=>Wt,validate:()=>Gt,validateModel:()=>Ft});var et=D(V());var h0,$2=[],Qt=Number.MAX_SAFE_INTEGER,X1=0,q1=0;async function U1(e){var t;return k.initial&&(h0=null),h0?e.debug&&h("cached model:",h0.modelUrl):h0=await C((t=e.face.antispoof)==null?void 0:t.modelPath),h0}async function _t(e,t,n,o){var A,a;if(!h0||!(h0!=null&&h0.executor))return 0;let r=(((A=t.face.antispoof)==null?void 0:A.skipTime)||0)>M()-q1,s=Qt<(((a=t.face.antispoof)==null?void 0:a.skipFrames)||0);return t.skipAllowed&&r&&s&&X1===o&&$2[n]?(Qt++,$2[n]):(Qt=0,new Promise(async l=>{let c=et.image.resizeBilinear(e,[h0!=null&&h0.inputs[0].shape?h0.inputs[0].shape[2]:0,h0!=null&&h0.inputs[0].shape?h0.inputs[0].shape[1]:0],!1),x=h0==null?void 0:h0.execute(c),i=(await x.data())[0];$2[n]=Math.round(100*i)/100,X1=o,q1=M(),et.dispose([c,x]),l($2[n])}))}var L=D(V());var he=D(V());var te={silhouette:[10,338,297,332,284,251,389,356,454,323,361,288,397,365,379,378,400,377,152,148,176,149,150,136,172,58,132,93,234,127,162,21,54,103,67,109],lipsUpperOuter:[185,40,39,37,0,267,269,270,409],lipsLowerOuter:[61,146,91,181,84,17,314,405,321,375,291],lipsUpperInner:[191,80,81,82,13,312,311,310,415],lipsLowerInner:[78,95,88,178,87,14,317,402,318,324,308],lipsLowerSemiOuter:[76,77,90,180,85,16,315,404,320,307,306],lipsUpperSemiOuter:[184,74,73,72,11,302,303,304,408],lipsLowerSemiInner:[62,96,89,179,86,15,316,403,319,325,292],lipsUpperSemiInner:[183,42,41,38,12,268,271,272,407],rightEyeUpper0:[246,161,160,159,158,157,173],rightEyeLower0:[33,7,163,144,145,153,154,155,133],rightEyeUpper1:[247,30,29,27,28,56,190],rightEyeLower1:[130,25,110,24,23,22,26,112,243],rightEyeUpper2:[113,225,224,223,222,221,189],rightEyeLower2:[226,31,228,229,230,231,232,233,244],rightEyeLower3:[143,111,117,118,119,120,121,128,245],rightEyebrowUpper:[156,70,63,105,66,107,55,193],rightEyebrowLower:[35,124,46,53,52,65],rightEyeIris:[473,474,475,476,477],leftEyeUpper0:[466,388,387,386,385,384,398],leftEyeLower0:[263,249,390,373,374,380,381,382,362],leftEyeUpper1:[467,260,259,257,258,286,414],leftEyeLower1:[359,255,339,254,253,252,256,341,463],leftEyeUpper2:[342,445,444,443,442,441,413],leftEyeLower2:[446,261,448,449,450,451,452,453,464],leftEyeLower3:[372,340,346,347,348,349,350,357,465],leftEyebrowUpper:[383,300,293,334,296,336,285,417],leftEyebrowLower:[265,353,276,283,282,295],leftEyeIris:[468,469,470,471,472],midwayBetweenEyes:[168],noseTip:[1],noseBottom:[2],noseRightCorner:[98],noseLeftCorner:[327],rightCheek:[205],leftCheek:[425]},$t={count:468,mouth:13,symmetryLine:[13,te.midwayBetweenEyes[0]]},qe={leftEye:0,rightEye:1,nose:2,mouth:3,leftEar:4,rightEar:5,symmetryLine:[3,2]},e5=[{key:"EyeUpper0",indices:[9,10,11,12,13,14,15]},{key:"EyeUpper1",indices:[25,26,27,28,29,30,31]},{key:"EyeUpper2",indices:[41,42,43,44,45,46,47]},{key:"EyeLower0",indices:[0,1,2,3,4,5,6,7,8]},{key:"EyeLower1",indices:[16,17,18,19,20,21,22,23,24]},{key:"EyeLower2",indices:[32,33,34,35,36,37,38,39,40]},{key:"EyeLower3",indices:[54,55,56,57,58,59,60,61,62]},{key:"EyebrowUpper",indices:[63,64,65,66,67,68,69,70]},{key:"EyebrowLower",indices:[48,49,50,51,52,53]}],O2=[[.499976992607117,.652534008026123],[.500025987625122,.547487020492554],[.499974012374878,.602371990680695],[.482113003730774,.471979022026062],[.500150978565216,.527155995368958],[.499909996986389,.498252987861633],[.499523013830185,.40106201171875],[.289712011814117,.380764007568359],[.499954998493195,.312398016452789],[.499987006187439,.269918978214264],[.500023007392883,.107050001621246],[.500023007392883,.666234016418457],[.5000159740448,.679224014282227],[.500023007392883,.692348003387451],[.499976992607117,.695277988910675],[.499976992607117,.70593398809433],[.499976992607117,.719385027885437],[.499976992607117,.737019002437592],[.499967992305756,.781370997428894],[.499816000461578,.562981009483337],[.473773002624512,.573909997940063],[.104906998574734,.254140973091125],[.365929991006851,.409575998783112],[.338757991790771,.41302502155304],[.311120003461838,.409460008144379],[.274657994508743,.389131009578705],[.393361985683441,.403706014156342],[.345234006643295,.344011008739471],[.370094001293182,.346076011657715],[.319321990013123,.347265005111694],[.297903001308441,.353591024875641],[.24779200553894,.410809993743896],[.396889001131058,.842755019664764],[.280097991228104,.375599980354309],[.106310002505779,.399955987930298],[.2099249958992,.391353011131287],[.355807989835739,.534406006336212],[.471751004457474,.65040397644043],[.474155008792877,.680191993713379],[.439785003662109,.657229006290436],[.414617002010345,.66654098033905],[.450374007225037,.680860996246338],[.428770989179611,.682690978050232],[.374971002340317,.727805018424988],[.486716985702515,.547628998756409],[.485300987958908,.527395009994507],[.257764995098114,.314490020275116],[.401223003864288,.455172002315521],[.429818987846375,.548614978790283],[.421351999044418,.533740997314453],[.276895999908447,.532056987285614],[.483370006084442,.499586999416351],[.33721199631691,.282882988452911],[.296391993761063,.293242990970612],[.169294998049736,.193813979625702],[.447580009698868,.302609980106354],[.392390012741089,.353887975215912],[.354490011930466,.696784019470215],[.067304998636246,.730105042457581],[.442739009857178,.572826027870178],[.457098007202148,.584792017936707],[.381974011659622,.694710969924927],[.392388999462128,.694203019142151],[.277076005935669,.271932005882263],[.422551989555359,.563233017921448],[.385919004678726,.281364023685455],[.383103013038635,.255840003490448],[.331431001424789,.119714021682739],[.229923993349075,.232002973556519],[.364500999450684,.189113974571228],[.229622006416321,.299540996551514],[.173287004232407,.278747975826263],[.472878992557526,.666198015213013],[.446828007698059,.668527007102966],[.422762006521225,.673889994621277],[.445307999849319,.580065965652466],[.388103008270264,.693961024284363],[.403039008378983,.706539988517761],[.403629004955292,.693953037261963],[.460041999816895,.557139039039612],[.431158006191254,.692366003990173],[.452181994915009,.692366003990173],[.475387006998062,.692366003990173],[.465828001499176,.779190003871918],[.472328990697861,.736225962638855],[.473087012767792,.717857003211975],[.473122000694275,.704625964164734],[.473033010959625,.695277988910675],[.427942007780075,.695277988910675],[.426479011774063,.703539967536926],[.423162013292313,.711845993995667],[.4183090031147,.720062971115112],[.390094995498657,.639572978019714],[.013953999616206,.560034036636353],[.499913990497589,.58014702796936],[.413199990987778,.69539999961853],[.409626007080078,.701822996139526],[.468080013990402,.601534962654114],[.422728985548019,.585985004901886],[.463079988956451,.593783974647522],[.37211999297142,.47341400384903],[.334562003612518,.496073007583618],[.411671012639999,.546965003013611],[.242175996303558,.14767599105835],[.290776997804642,.201445996761322],[.327338010072708,.256527006626129],[.399509996175766,.748921036720276],[.441727995872498,.261676013469696],[.429764986038208,.187834024429321],[.412198007106781,.108901023864746],[.288955003023148,.398952007293701],[.218936994671822,.435410976409912],[.41278201341629,.398970007896423],[.257135003805161,.355440020561218],[.427684992551804,.437960982322693],[.448339998722076,.536936044692993],[.178560003638268,.45755398273468],[.247308000922203,.457193970680237],[.286267012357712,.467674970626831],[.332827985286713,.460712015628815],[.368755996227264,.447206974029541],[.398963987827301,.432654976844788],[.476410001516342,.405806005001068],[.189241006970406,.523923993110657],[.228962004184723,.348950982093811],[.490725994110107,.562400996685028],[.404670000076294,.485132992267609],[.019469000399113,.401564002037048],[.426243007183075,.420431017875671],[.396993011236191,.548797011375427],[.266469985246658,.376977026462555],[.439121007919312,.51895797252655],[.032313998788595,.644356966018677],[.419054001569748,.387154996395111],[.462783008813858,.505746960639954],[.238978996872902,.779744982719421],[.198220998048782,.831938028335571],[.107550002634525,.540755033493042],[.183610007166862,.740257024765015],[.134409993886948,.333683013916016],[.385764002799988,.883153975009918],[.490967005491257,.579378008842468],[.382384985685349,.508572995662689],[.174399003386497,.397670984268188],[.318785011768341,.39623498916626],[.343364000320435,.400596976280212],[.396100014448166,.710216999053955],[.187885001301765,.588537991046906],[.430987000465393,.944064974784851],[.318993002176285,.898285031318665],[.266247987747192,.869701027870178],[.500023007392883,.190576016902924],[.499976992607117,.954452991485596],[.366169989109039,.398822009563446],[.393207013607025,.39553701877594],[.410373002290726,.391080021858215],[.194993004202843,.342101991176605],[.388664990663528,.362284004688263],[.365961998701096,.355970978736877],[.343364000320435,.355356991291046],[.318785011768341,.35834002494812],[.301414996385574,.363156020641327],[.058132998645306,.319076001644135],[.301414996385574,.387449026107788],[.499987989664078,.618434011936188],[.415838003158569,.624195992946625],[.445681989192963,.566076993942261],[.465844005346298,.620640993118286],[.49992299079895,.351523995399475],[.288718998432159,.819945991039276],[.335278987884521,.852819979190826],[.440512001514435,.902418971061707],[.128294005990028,.791940987110138],[.408771991729736,.373893976211548],[.455606997013092,.451801002025604],[.499877005815506,.908990025520325],[.375436991453171,.924192011356354],[.11421000212431,.615022003650665],[.448662012815475,.695277988910675],[.4480200111866,.704632043838501],[.447111994028091,.715808033943176],[.444831997156143,.730794012546539],[.430011987686157,.766808986663818],[.406787008047104,.685672998428345],[.400738000869751,.681069016456604],[.392399996519089,.677703022956848],[.367855995893478,.663918972015381],[.247923001646996,.601333022117615],[.452769994735718,.420849978923798],[.43639200925827,.359887003898621],[.416164010763168,.368713974952698],[.413385987281799,.692366003990173],[.228018000721931,.683571994304657],[.468268007040024,.352671027183533],[.411361992359161,.804327011108398],[.499989002943039,.469825029373169],[.479153990745544,.442654013633728],[.499974012374878,.439637005329132],[.432112008333206,.493588984012604],[.499886006116867,.866917014122009],[.49991300702095,.821729004383087],[.456548988819122,.819200992584229],[.344549000263214,.745438992977142],[.37890899181366,.574010014533997],[.374292999505997,.780184984207153],[.319687992334366,.570737957954407],[.357154995203018,.604269981384277],[.295284003019333,.621580958366394],[.447750002145767,.862477004528046],[.410986006259918,.508723020553589],[.31395098567009,.775308012962341],[.354128003120422,.812552988529205],[.324548006057739,.703992962837219],[.189096003770828,.646299958229065],[.279776990413666,.71465802192688],[.1338230073452,.682700991630554],[.336768001317978,.644733011722565],[.429883986711502,.466521978378296],[.455527991056442,.548622965812683],[.437114000320435,.558896005153656],[.467287987470627,.529924988746643],[.414712011814117,.335219979286194],[.37704598903656,.322777986526489],[.344107985496521,.320150971412659],[.312875986099243,.32233202457428],[.283526003360748,.333190023899078],[.241245999932289,.382785975933075],[.102986000478268,.468762993812561],[.267612010240555,.424560010433197],[.297879010438919,.433175981044769],[.333433985710144,.433878004550934],[.366427004337311,.426115989685059],[.396012008190155,.416696012020111],[.420121014118195,.41022801399231],[.007561000064015,.480777025222778],[.432949006557465,.569517970085144],[.458638995885849,.479089021682739],[.473466008901596,.545744001865387],[.476087987422943,.563830018043518],[.468472003936768,.555056989192963],[.433990985155106,.582361996173859],[.483518004417419,.562983989715576],[.482482999563217,.57784903049469],[.42645001411438,.389798998832703],[.438998997211456,.39649498462677],[.450067013502121,.400434017181396],[.289712011814117,.368252992630005],[.276670008897781,.363372981548309],[.517862021923065,.471948027610779],[.710287988185883,.380764007568359],[.526226997375488,.573909997940063],[.895093023777008,.254140973091125],[.634069979190826,.409575998783112],[.661242008209229,.41302502155304],[.688880026340485,.409460008144379],[.725341975688934,.389131009578705],[.606630027294159,.40370500087738],[.654766023159027,.344011008739471],[.629905998706818,.346076011657715],[.680678009986877,.347265005111694],[.702096998691559,.353591024875641],[.75221198797226,.410804986953735],[.602918028831482,.842862963676453],[.719901978969574,.375599980354309],[.893692970275879,.399959981441498],[.790081977844238,.391354024410248],[.643998026847839,.534487962722778],[.528249025344849,.65040397644043],[.525849997997284,.680191040039062],[.560214996337891,.657229006290436],[.585384011268616,.66654098033905],[.549625992774963,.680860996246338],[.57122802734375,.682691991329193],[.624852001667023,.72809898853302],[.513050019741058,.547281980514526],[.51509702205658,.527251958847046],[.742246985435486,.314507007598877],[.598631024360657,.454979002475739],[.570338010787964,.548575043678284],[.578631997108459,.533622980117798],[.723087012767792,.532054007053375],[.516445994377136,.499638974666595],[.662801027297974,.282917976379395],[.70362401008606,.293271005153656],[.830704987049103,.193813979625702],[.552385985851288,.302568018436432],[.607609987258911,.353887975215912],[.645429015159607,.696707010269165],[.932694971561432,.730105042457581],[.557260990142822,.572826027870178],[.542901992797852,.584792017936707],[.6180260181427,.694710969924927],[.607590973377228,.694203019142151],[.722943007946014,.271963000297546],[.577413976192474,.563166975975037],[.614082992076874,.281386971473694],[.616907000541687,.255886018276215],[.668509006500244,.119913995265961],[.770092010498047,.232020974159241],[.635536015033722,.189248979091644],[.77039098739624,.299556016921997],[.826722025871277,.278755009174347],[.527121007442474,.666198015213013],[.553171992301941,.668527007102966],[.577238023281097,.673889994621277],[.554691970348358,.580065965652466],[.611896991729736,.693961024284363],[.59696102142334,.706539988517761],[.596370995044708,.693953037261963],[.539958000183105,.557139039039612],[.568841993808746,.692366003990173],[.547818005084991,.692366003990173],[.52461302280426,.692366003990173],[.534089982509613,.779141008853912],[.527670979499817,.736225962638855],[.526912987232208,.717857003211975],[.526877999305725,.704625964164734],[.526966989040375,.695277988910675],[.572058022022247,.695277988910675],[.573521018028259,.703539967536926],[.57683801651001,.711845993995667],[.581691026687622,.720062971115112],[.609944999217987,.639909982681274],[.986046016216278,.560034036636353],[.5867999792099,.69539999961853],[.590372025966644,.701822996139526],[.531915009021759,.601536989212036],[.577268004417419,.585934996604919],[.536915004253387,.593786001205444],[.627542972564697,.473352015018463],[.665585994720459,.495950996875763],[.588353991508484,.546862006187439],[.757824003696442,.14767599105835],[.709249973297119,.201507985591888],[.672684013843536,.256581008434296],[.600408971309662,.74900496006012],[.55826598405838,.261672019958496],[.570303976535797,.187870979309082],[.588165998458862,.109044015407562],[.711045026779175,.398952007293701],[.781069993972778,.435405015945435],[.587247014045715,.398931980133057],[.742869973182678,.355445981025696],[.572156012058258,.437651991844177],[.55186802148819,.536570012569427],[.821442008018494,.457556009292603],[.752701997756958,.457181990146637],[.71375697851181,.467626988887787],[.66711300611496,.460672974586487],[.631101012229919,.447153985500336],[.6008620262146,.432473003864288],[.523481011390686,.405627012252808],[.810747981071472,.523926019668579],[.771045982837677,.348959028720856],[.509127020835876,.562718033790588],[.595292985439301,.485023975372314],[.980530977249146,.401564002037048],[.573499977588654,.420000016689301],[.602994978427887,.548687994480133],[.733529984951019,.376977026462555],[.560611009597778,.519016981124878],[.967685997486115,.644356966018677],[.580985009670258,.387160003185272],[.537728011608124,.505385041236877],[.760966002941132,.779752969741821],[.801778972148895,.831938028335571],[.892440974712372,.54076099395752],[.816350996494293,.740260004997253],[.865594983100891,.333687007427216],[.614073991775513,.883246004581451],[.508952975273132,.579437971115112],[.617941975593567,.508316040039062],[.825608015060425,.397674977779388],[.681214988231659,.39623498916626],[.656635999679565,.400596976280212],[.603900015354156,.710216999053955],[.81208598613739,.588539004325867],[.56801301240921,.944564998149872],[.681007981300354,.898285031318665],[.733752012252808,.869701027870178],[.633830010890961,.398822009563446],[.606792986392975,.39553701877594],[.589659988880157,.391062021255493],[.805015981197357,.342108011245728],[.611334979534149,.362284004688263],[.634037971496582,.355970978736877],[.656635999679565,.355356991291046],[.681214988231659,.35834002494812],[.698584973812103,.363156020641327],[.941866993904114,.319076001644135],[.698584973812103,.387449026107788],[.584177017211914,.624107003211975],[.554318010807037,.566076993942261],[.534153997898102,.62064003944397],[.711217999458313,.819975018501282],[.664629995822906,.852871000766754],[.559099972248077,.902631998062134],[.871706008911133,.791940987110138],[.591234028339386,.373893976211548],[.544341027736664,.451583981513977],[.624562978744507,.924192011356354],[.88577002286911,.615028977394104],[.551338016986847,.695277988910675],[.551980018615723,.704632043838501],[.552887976169586,.715808033943176],[.555167973041534,.730794012546539],[.569944024085999,.767035007476807],[.593203008174896,.685675978660583],[.599261999130249,.681069016456604],[.607599973678589,.677703022956848],[.631937980651855,.663500010967255],[.752032995223999,.601315021514893],[.547226011753082,.420395016670227],[.563543975353241,.359827995300293],[.583841025829315,.368713974952698],[.586614012718201,.692366003990173],[.771915018558502,.683578014373779],[.531597018241882,.352482974529266],[.588370978832245,.804440975189209],[.52079701423645,.442565023899078],[.567984998226166,.493479013442993],[.543282985687256,.819254994392395],[.655317008495331,.745514988899231],[.621008992195129,.574018001556396],[.625559985637665,.78031200170517],[.680198013782501,.570719003677368],[.64276397228241,.604337990283966],[.704662978649139,.621529996395111],[.552012026309967,.862591981887817],[.589071989059448,.508637011051178],[.685944974422455,.775357007980347],[.645735025405884,.812640011310577],[.675342977046967,.703978002071381],[.810858011245728,.646304965019226],[.72012197971344,.714666962623596],[.866151988506317,.682704985141754],[.663187026977539,.644596993923187],[.570082008838654,.466325998306274],[.544561982154846,.548375964164734],[.562758982181549,.558784961700439],[.531987011432648,.530140042304993],[.585271000862122,.335177004337311],[.622952997684479,.32277899980545],[.655896008014679,.320163011550903],[.687132000923157,.322345972061157],[.716481983661652,.333200991153717],[.758756995201111,.382786989212036],[.897013008594513,.468769013881683],[.732392013072968,.424547016620636],[.70211398601532,.433162987232208],[.66652500629425,.433866024017334],[.633504986763,.426087975502014],[.603875994682312,.416586995124817],[.579657971858978,.409945011138916],[.992439985275269,.480777025222778],[.567192018032074,.569419980049133],[.54136598110199,.478899002075195],[.526564002037048,.546118021011353],[.523913025856018,.563830018043518],[.531529009342194,.555056989192963],[.566035985946655,.582329034805298],[.51631098985672,.563053965568542],[.5174720287323,.577877044677734],[.573594987392426,.389806985855103],[.560697972774506,.395331978797913],[.549755990505219,.399751007556915],[.710287988185883,.368252992630005],[.723330020904541,.363372981548309]],Ue=[127,34,139,11,0,37,232,231,120,72,37,39,128,121,47,232,121,128,104,69,67,175,171,148,157,154,155,118,50,101,73,39,40,9,151,108,48,115,131,194,204,211,74,40,185,80,42,183,40,92,186,230,229,118,202,212,214,83,18,17,76,61,146,160,29,30,56,157,173,106,204,194,135,214,192,203,165,98,21,71,68,51,45,4,144,24,23,77,146,91,205,50,187,201,200,18,91,106,182,90,91,181,85,84,17,206,203,36,148,171,140,92,40,39,193,189,244,159,158,28,247,246,161,236,3,196,54,68,104,193,168,8,117,228,31,189,193,55,98,97,99,126,47,100,166,79,218,155,154,26,209,49,131,135,136,150,47,126,217,223,52,53,45,51,134,211,170,140,67,69,108,43,106,91,230,119,120,226,130,247,63,53,52,238,20,242,46,70,156,78,62,96,46,53,63,143,34,227,173,155,133,123,117,111,44,125,19,236,134,51,216,206,205,154,153,22,39,37,167,200,201,208,36,142,100,57,212,202,20,60,99,28,158,157,35,226,113,160,159,27,204,202,210,113,225,46,43,202,204,62,76,77,137,123,116,41,38,72,203,129,142,64,98,240,49,102,64,41,73,74,212,216,207,42,74,184,169,170,211,170,149,176,105,66,69,122,6,168,123,147,187,96,77,90,65,55,107,89,90,180,101,100,120,63,105,104,93,137,227,15,86,85,129,102,49,14,87,86,55,8,9,100,47,121,145,23,22,88,89,179,6,122,196,88,95,96,138,172,136,215,58,172,115,48,219,42,80,81,195,3,51,43,146,61,171,175,199,81,82,38,53,46,225,144,163,110,246,33,7,52,65,66,229,228,117,34,127,234,107,108,69,109,108,151,48,64,235,62,78,191,129,209,126,111,35,143,163,161,246,117,123,50,222,65,52,19,125,141,221,55,65,3,195,197,25,7,33,220,237,44,70,71,139,122,193,245,247,130,33,71,21,162,153,158,159,170,169,150,188,174,196,216,186,92,144,160,161,2,97,167,141,125,241,164,167,37,72,38,12,145,159,160,38,82,13,63,68,71,226,35,111,158,153,154,101,50,205,206,92,165,209,198,217,165,167,97,220,115,218,133,112,243,239,238,241,214,135,169,190,173,133,171,208,32,125,44,237,86,87,178,85,86,179,84,85,180,83,84,181,201,83,182,137,93,132,76,62,183,61,76,184,57,61,185,212,57,186,214,207,187,34,143,156,79,239,237,123,137,177,44,1,4,201,194,32,64,102,129,213,215,138,59,166,219,242,99,97,2,94,141,75,59,235,24,110,228,25,130,226,23,24,229,22,23,230,26,22,231,112,26,232,189,190,243,221,56,190,28,56,221,27,28,222,29,27,223,30,29,224,247,30,225,238,79,20,166,59,75,60,75,240,147,177,215,20,79,166,187,147,213,112,233,244,233,128,245,128,114,188,114,217,174,131,115,220,217,198,236,198,131,134,177,132,58,143,35,124,110,163,7,228,110,25,356,389,368,11,302,267,452,350,349,302,303,269,357,343,277,452,453,357,333,332,297,175,152,377,384,398,382,347,348,330,303,304,270,9,336,337,278,279,360,418,262,431,304,408,409,310,415,407,270,409,410,450,348,347,422,430,434,313,314,17,306,307,375,387,388,260,286,414,398,335,406,418,364,367,416,423,358,327,251,284,298,281,5,4,373,374,253,307,320,321,425,427,411,421,313,18,321,405,406,320,404,405,315,16,17,426,425,266,377,400,369,322,391,269,417,465,464,386,257,258,466,260,388,456,399,419,284,332,333,417,285,8,346,340,261,413,441,285,327,460,328,355,371,329,392,439,438,382,341,256,429,420,360,364,394,379,277,343,437,443,444,283,275,440,363,431,262,369,297,338,337,273,375,321,450,451,349,446,342,467,293,334,282,458,461,462,276,353,383,308,324,325,276,300,293,372,345,447,382,398,362,352,345,340,274,1,19,456,248,281,436,427,425,381,256,252,269,391,393,200,199,428,266,330,329,287,273,422,250,462,328,258,286,384,265,353,342,387,259,257,424,431,430,342,353,276,273,335,424,292,325,307,366,447,345,271,303,302,423,266,371,294,455,460,279,278,294,271,272,304,432,434,427,272,407,408,394,430,431,395,369,400,334,333,299,351,417,168,352,280,411,325,319,320,295,296,336,319,403,404,330,348,349,293,298,333,323,454,447,15,16,315,358,429,279,14,15,316,285,336,9,329,349,350,374,380,252,318,402,403,6,197,419,318,319,325,367,364,365,435,367,397,344,438,439,272,271,311,195,5,281,273,287,291,396,428,199,311,271,268,283,444,445,373,254,339,263,466,249,282,334,296,449,347,346,264,447,454,336,296,299,338,10,151,278,439,455,292,407,415,358,371,355,340,345,372,390,249,466,346,347,280,442,443,282,19,94,370,441,442,295,248,419,197,263,255,359,440,275,274,300,383,368,351,412,465,263,467,466,301,368,389,380,374,386,395,378,379,412,351,419,436,426,322,373,390,388,2,164,393,370,462,461,164,0,267,302,11,12,374,373,387,268,12,13,293,300,301,446,261,340,385,384,381,330,266,425,426,423,391,429,355,437,391,327,326,440,457,438,341,382,362,459,457,461,434,430,394,414,463,362,396,369,262,354,461,457,316,403,402,315,404,403,314,405,404,313,406,405,421,418,406,366,401,361,306,408,407,291,409,408,287,410,409,432,436,410,434,416,411,264,368,383,309,438,457,352,376,401,274,275,4,421,428,262,294,327,358,433,416,367,289,455,439,462,370,326,2,326,370,305,460,455,254,449,448,255,261,446,253,450,449,252,451,450,256,452,451,341,453,452,413,464,463,441,413,414,258,442,441,257,443,442,259,444,443,260,445,444,467,342,445,459,458,250,289,392,290,290,328,460,376,433,435,250,290,392,411,416,433,341,463,464,453,464,465,357,465,412,343,412,399,360,363,440,437,399,456,420,456,363,401,435,288,372,383,353,339,255,249,448,261,255,133,243,190,133,155,112,33,246,247,33,130,25,398,384,286,362,398,414,362,463,341,263,359,467,263,249,255,466,467,260,75,60,166,238,239,79,162,127,139,72,11,37,121,232,120,73,72,39,114,128,47,233,232,128,103,104,67,152,175,148,173,157,155,119,118,101,74,73,40,107,9,108,49,48,131,32,194,211,184,74,185,191,80,183,185,40,186,119,230,118,210,202,214,84,83,17,77,76,146,161,160,30,190,56,173,182,106,194,138,135,192,129,203,98,54,21,68,5,51,4,145,144,23,90,77,91,207,205,187,83,201,18,181,91,182,180,90,181,16,85,17,205,206,36,176,148,140,165,92,39,245,193,244,27,159,28,30,247,161,174,236,196,103,54,104,55,193,8,111,117,31,221,189,55,240,98,99,142,126,100,219,166,218,112,155,26,198,209,131,169,135,150,114,47,217,224,223,53,220,45,134,32,211,140,109,67,108,146,43,91,231,230,120,113,226,247,105,63,52,241,238,242,124,46,156,95,78,96,70,46,63,116,143,227,116,123,111,1,44,19,3,236,51,207,216,205,26,154,22,165,39,167,199,200,208,101,36,100,43,57,202,242,20,99,56,28,157,124,35,113,29,160,27,211,204,210,124,113,46,106,43,204,96,62,77,227,137,116,73,41,72,36,203,142,235,64,240,48,49,64,42,41,74,214,212,207,183,42,184,210,169,211,140,170,176,104,105,69,193,122,168,50,123,187,89,96,90,66,65,107,179,89,180,119,101,120,68,63,104,234,93,227,16,15,85,209,129,49,15,14,86,107,55,9,120,100,121,153,145,22,178,88,179,197,6,196,89,88,96,135,138,136,138,215,172,218,115,219,41,42,81,5,195,51,57,43,61,208,171,199,41,81,38,224,53,225,24,144,110,105,52,66,118,229,117,227,34,234,66,107,69,10,109,151,219,48,235,183,62,191,142,129,126,116,111,143,7,163,246,118,117,50,223,222,52,94,19,141,222,221,65,196,3,197,45,220,44,156,70,139,188,122,245,139,71,162,145,153,159,149,170,150,122,188,196,206,216,92,163,144,161,164,2,167,242,141,241,0,164,37,11,72,12,144,145,160,12,38,13,70,63,71,31,226,111,157,158,154,36,101,205,203,206,165,126,209,217,98,165,97,237,220,218,237,239,241,210,214,169,140,171,32,241,125,237,179,86,178,180,85,179,181,84,180,182,83,181,194,201,182,177,137,132,184,76,183,185,61,184,186,57,185,216,212,186,192,214,187,139,34,156,218,79,237,147,123,177,45,44,4,208,201,32,98,64,129,192,213,138,235,59,219,141,242,97,97,2,141,240,75,235,229,24,228,31,25,226,230,23,229,231,22,230,232,26,231,233,112,232,244,189,243,189,221,190,222,28,221,223,27,222,224,29,223,225,30,224,113,247,225,99,60,240,213,147,215,60,20,166,192,187,213,243,112,244,244,233,245,245,128,188,188,114,174,134,131,220,174,217,236,236,198,134,215,177,58,156,143,124,25,110,7,31,228,25,264,356,368,0,11,267,451,452,349,267,302,269,350,357,277,350,452,357,299,333,297,396,175,377,381,384,382,280,347,330,269,303,270,151,9,337,344,278,360,424,418,431,270,304,409,272,310,407,322,270,410,449,450,347,432,422,434,18,313,17,291,306,375,259,387,260,424,335,418,434,364,416,391,423,327,301,251,298,275,281,4,254,373,253,375,307,321,280,425,411,200,421,18,335,321,406,321,320,405,314,315,17,423,426,266,396,377,369,270,322,269,413,417,464,385,386,258,248,456,419,298,284,333,168,417,8,448,346,261,417,413,285,326,327,328,277,355,329,309,392,438,381,382,256,279,429,360,365,364,379,355,277,437,282,443,283,281,275,363,395,431,369,299,297,337,335,273,321,348,450,349,359,446,467,283,293,282,250,458,462,300,276,383,292,308,325,283,276,293,264,372,447,346,352,340,354,274,19,363,456,281,426,436,425,380,381,252,267,269,393,421,200,428,371,266,329,432,287,422,290,250,328,385,258,384,446,265,342,386,387,257,422,424,430,445,342,276,422,273,424,306,292,307,352,366,345,268,271,302,358,423,371,327,294,460,331,279,294,303,271,304,436,432,427,304,272,408,395,394,431,378,395,400,296,334,299,6,351,168,376,352,411,307,325,320,285,295,336,320,319,404,329,330,349,334,293,333,366,323,447,316,15,315,331,358,279,317,14,316,8,285,9,277,329,350,253,374,252,319,318,403,351,6,419,324,318,325,397,367,365,288,435,397,278,344,439,310,272,311,248,195,281,375,273,291,175,396,199,312,311,268,276,283,445,390,373,339,295,282,296,448,449,346,356,264,454,337,336,299,337,338,151,294,278,455,308,292,415,429,358,355,265,340,372,388,390,466,352,346,280,295,442,282,354,19,370,285,441,295,195,248,197,457,440,274,301,300,368,417,351,465,251,301,389,385,380,386,394,395,379,399,412,419,410,436,322,387,373,388,326,2,393,354,370,461,393,164,267,268,302,12,386,374,387,312,268,13,298,293,301,265,446,340,380,385,381,280,330,425,322,426,391,420,429,437,393,391,326,344,440,438,458,459,461,364,434,394,428,396,262,274,354,457,317,316,402,316,315,403,315,314,404,314,313,405,313,421,406,323,366,361,292,306,407,306,291,408,291,287,409,287,432,410,427,434,411,372,264,383,459,309,457,366,352,401,1,274,4,418,421,262,331,294,358,435,433,367,392,289,439,328,462,326,94,2,370,289,305,455,339,254,448,359,255,446,254,253,449,253,252,450,252,256,451,256,341,452,414,413,463,286,441,414,286,258,441,258,257,442,257,259,443,259,260,444,260,467,445,309,459,250,305,289,290,305,290,460,401,376,435,309,250,392,376,411,433,453,341,464,357,453,465,343,357,412,437,343,399,344,360,440,420,437,456,360,420,363,361,401,288,265,372,353,390,339,249,339,448,255];var ss=[127,234,132,58,172,150,149,148,152,377,378,379,397,288,361,454,356,70,63,105,66,107,336,296,334,293,300,168,6,195,4,98,97,2,326,327,33,160,158,133,153,144,362,385,387,263,373,380,57,40,37,0,267,270,287,321,314,17,84,91,78,81,13,311,308,402,14,178],As=[33,133,362,263,1,62,308,159,145,386,374,6,102,331,2,13,14,70,105,107,336,334,300,54,10,284,50,280,234,454,58,288,152],as=[33,133,362,263,1,78,308],Ta=ss.map(e=>O2[e]),va=As.map(e=>O2[e]),Pa=as.map(e=>O2[e]);function ze(e){let t=e.map(n=>n[0]);return t.push(e[e.length-1][1]),t}var is=[[61,146],[146,91],[91,181],[181,84],[84,17],[17,314],[314,405],[405,321],[321,375],[375,291],[61,185],[185,40],[40,39],[39,37],[37,0],[0,267],[267,269],[269,270],[270,409],[409,291],[78,95],[95,88],[88,178],[178,87],[87,14],[14,317],[317,402],[402,318],[318,324],[324,308],[78,191],[191,80],[80,81],[81,82],[82,13],[13,312],[312,311],[311,310],[310,415],[415,308]],ls=[[263,249],[249,390],[390,373],[373,374],[374,380],[380,381],[381,382],[382,362],[263,466],[466,388],[388,387],[387,386],[386,385],[385,384],[384,398],[398,362]],cs=[[276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]],ds=[[474,475],[475,476],[476,477],[477,474]],xs=[[33,7],[7,163],[163,144],[144,145],[145,153],[153,154],[154,155],[155,133],[33,246],[246,161],[161,160],[160,159],[159,158],[158,157],[157,173],[173,133]],ys=[[46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]],fs=[[469,470],[470,471],[471,472],[472,469]],ms=[[10,338],[338,297],[297,332],[332,284],[284,251],[251,389],[389,356],[356,454],[454,323],[323,361],[361,288],[288,397],[397,365],[365,379],[379,378],[378,400],[400,377],[377,152],[152,148],[148,176],[176,149],[149,150],[150,136],[136,172],[172,58],[58,132],[132,93],[93,234],[234,127],[127,162],[162,21],[21,54],[54,103],[103,67],[67,109],[109,10]],Ra={lips:ze(is),leftEye:ze(ls),leftEyebrow:ze(cs),leftIris:ze(ds),rightEye:ze(xs),rightEyebrow:ze(ys),rightIris:ze(fs),faceOval:ze(ms)};var Se=D(V()),W={tf255:255,tf1:1,tf2:2,tf05:.5,tf127:127.5,rgb:[.2989,.587,.114]};function K1(){W.tf255=Se.scalar(255,"float32"),W.tf1=Se.scalar(1,"float32"),W.tf2=Se.scalar(2,"float32"),W.tf05=Se.scalar(.5,"float32"),W.tf127=Se.scalar(127.5,"float32"),W.rgb=Se.tensor1d([.2989,.587,.114],"float32")}var l2=e=>[Math.abs(e.endPoint[0]-e.startPoint[0]),Math.abs(e.endPoint[1]-e.startPoint[1])],tt=e=>[e.startPoint[0]+(e.endPoint[0]-e.startPoint[0])/2,e.startPoint[1]+(e.endPoint[1]-e.startPoint[1])/2,1],nt=(e,t)=>e?[Math.trunc(Math.max(0,e.startPoint[0])),Math.trunc(Math.max(0,e.startPoint[1])),Math.trunc(Math.min(t.shape[2]||0,e.endPoint[0])-Math.max(0,e.startPoint[0])),Math.trunc(Math.min(t.shape[1]||0,e.endPoint[1])-Math.max(0,e.startPoint[1]))]:[0,0,0,0],ot=(e,t)=>e?[e.startPoint[0]/(t.shape[2]||0),e.startPoint[1]/(t.shape[1]||0),(e.endPoint[0]-e.startPoint[0])/(t.shape[2]||0),(e.endPoint[1]-e.startPoint[1])/(t.shape[1]||0)]:[0,0,0,0],_1=(e,t)=>{let n=[e.startPoint[0]*t[0],e.startPoint[1]*t[1]],o=[e.endPoint[0]*t[0],e.endPoint[1]*t[1]];return{startPoint:n,endPoint:o,landmarks:e.landmarks,confidence:e.confidence}},n5=(e,t,n)=>{let o=t.shape[1],r=t.shape[2],s=[e.startPoint[1]/o,e.startPoint[0]/r,e.endPoint[1]/o,e.endPoint[0]/r],A=he.image.cropAndResize(t,[s],[0],n),a=he.div(A,W.tf255);return he.dispose(A),a},rt=(e,t)=>{let n=tt(e),o=l2(e),r=[t*o[0]/2,t*o[1]/2];return{startPoint:[n[0]-r[0],n[1]-r[1]],endPoint:[n[0]+r[0],n[1]+r[1]],landmarks:e.landmarks,confidence:e.confidence}},st=e=>{let t=tt(e),n=l2(e),o=Math.max(...n)/2;return{startPoint:[Math.round(t[0]-o),Math.round(t[1]-o)],endPoint:[Math.round(t[0]+o),Math.round(t[1]+o)],landmarks:e.landmarks,confidence:e.confidence}},$1=e=>{let t=e.map(o=>o[0]),n=e.map(o=>o[1]);return{startPoint:[Math.min(...t),Math.min(...n)],endPoint:[Math.max(...t),Math.max(...n)],landmarks:e}},o5=[[1,0,0],[0,1,0],[0,0,1]],us=e=>e-2*Math.PI*Math.floor((e+Math.PI)/(2*Math.PI)),hs=(e,t)=>us(Math.PI/2-Math.atan2(-(t[1]-e[1]),t[0]-e[0]));var J1=(e,t)=>[[1,0,e],[0,1,t],[0,0,1]],Ye=(e,t)=>{let n=0;for(let o=0;o{let n=[];for(let o=0;o{let n=[],o=e.length;for(let r=0;r{let n=Math.cos(e),o=Math.sin(e),r=[[n,-o,0],[o,n,0],[0,0,1]],s=J1(t[0],t[1]),A=Q1(s,r),a=J1(-t[0],-t[1]);return Q1(A,a)},gs=e=>{let t=[[e[0][0],e[1][0]],[e[0][1],e[1][1]]],n=[e[0][2],e[1][2]],o=[-Ye(t[0],n),-Ye(t[1],n)];return[t[0].concat(o[0]),t[1].concat(o[1]),[0,0,1]]},Ms=(e,t)=>[Ye(e,t[0]),Ye(e,t[1])];function t3(e){let t=e===192?{strides:[4],anchors:[1]}:{strides:[e/16,e/8],anchors:[2,6]},n=[];for(let o=0;o[s[0]/r*(d[0]-r/2),s[1]/r*(d[1]-r/2),d[2]||0]),a=n&&n!==0&&Math.abs(n)>.2,l=a?e3(n,[0,0]):o5,c=a?A.map(d=>[...Ms(d,l),d[2]]):A,x=a?gs(o):o5,i=tt(t),f=[Ye(i,x[0]),Ye(i,x[1])];return c.map(d=>[Math.trunc(d[0]+f[0]),Math.trunc(d[1]+f[1]),Math.trunc(d[2]||0)])}function o3(e,t,n,o){let r=t.landmarks.length>=$t.count?$t.symmetryLine:qe.symmetryLine,s=0,A=o5,a;if(e&&k.kernels.includes("rotatewithoffset"))if(s=hs(t.landmarks[r[0]],t.landmarks[r[1]]),s&&s!==0&&Math.abs(s)>.2){let c=tt(t),x=[c[0]/n.shape[2],c[1]/n.shape[1]],i=he.image.rotateWithOffset(n,s,0,x);A=e3(-s,c),a=n5(t,i,[o,o]),he.dispose(i)}else a=n5(t,n,[o,o]);else a=n5(t,n,[o,o]);return[s,A,a]}var Ts=e=>{let t=e.map(o=>o[0]),n=e.map(o=>o[1]);return[Math.min(...t)+(Math.max(...t)-Math.min(...t))/2,Math.min(...n)+(Math.max(...n)-Math.min(...n))/2]},r3=(e,t)=>{let n=Ts(e),o=l2(t);return{startPoint:[n[0]-o[0]/2,n[1]-o[1]/2],endPoint:[n[0]+o[0]/2,n[1]+o[1]/2]}};var s3=6,vs=1.4,Ae,A3=null,je=0,I2=null,c2=()=>je;async function a3(e){var t;return k.initial&&(Ae=null),Ae?e.debug&&h("cached model:",Ae.modelUrl):Ae=await C((t=e.face.detector)==null?void 0:t.modelPath),je=Ae.executor&&Ae.inputs[0].shape?Ae.inputs[0].shape[2]:256,I2=L.scalar(je,"int32"),A3=L.tensor2d(t3(je)),Ae}function Ps(e){let t={};t.boxStarts=L.slice(e,[0,1],[-1,2]),t.centers=L.add(t.boxStarts,A3),t.boxSizes=L.slice(e,[0,3],[-1,2]),t.boxSizesNormalized=L.div(t.boxSizes,I2),t.centersNormalized=L.div(t.centers,I2),t.halfBoxSize=L.div(t.boxSizesNormalized,W.tf2),t.starts=L.sub(t.centersNormalized,t.halfBoxSize),t.ends=L.add(t.centersNormalized,t.halfBoxSize),t.startNormalized=L.mul(t.starts,I2),t.endNormalized=L.mul(t.ends,I2);let n=L.concat2d([t.startNormalized,t.endNormalized],1);return Object.keys(t).forEach(o=>L.dispose(t[o])),n}async function i3(e,t){var a,l,c,x;if(!e||e.isDisposedInternal||e.shape.length!==4||e.shape[1]<1||e.shape[2]<1)return[];let n={};n.resized=L.image.resizeBilinear(e,[je,je]),n.div=L.div(n.resized,W.tf127),n.normalized=L.sub(n.div,W.tf05);let o=Ae==null?void 0:Ae.execute(n.normalized);if(Array.isArray(o)&&o.length>2){let i=o.sort((f,d)=>f.size-d.size);n.concat384=L.concat([i[0],i[2]],2),n.concat512=L.concat([i[1],i[3]],2),n.concat=L.concat([n.concat512,n.concat384],1),n.batch=L.squeeze(n.concat,0)}else Array.isArray(o)?n.batch=L.squeeze(o[0]):n.batch=L.squeeze(o);L.dispose(o),n.boxes=Ps(n.batch),n.logits=L.slice(n.batch,[0,0],[-1,1]),n.sigmoid=L.sigmoid(n.logits),n.scores=L.squeeze(n.sigmoid),n.nms=await L.image.nonMaxSuppressionAsync(n.boxes,n.scores,((a=t.face.detector)==null?void 0:a.maxDetected)||0,((l=t.face.detector)==null?void 0:l.iouThreshold)||0,((c=t.face.detector)==null?void 0:c.minConfidence)||0);let r=await n.nms.array(),s=[],A=await n.scores.data();for(let i=0;i(((x=t.face.detector)==null?void 0:x.minConfidence)||0)){let d={};d.bbox=L.slice(n.boxes,[r[i],0],[1,-1]),d.slice=L.slice(n.batch,[r[i],s3-1],[1,-1]),d.squeeze=L.squeeze(d.slice),d.landmarks=L.reshape(d.squeeze,[s3,-1]);let m=await d.bbox.data(),p={startPoint:[m[0],m[1]],endPoint:[m[2],m[3]],landmarks:await d.landmarks.array(),confidence:f},g=_1(p,[(e.shape[2]||0)/je,(e.shape[1]||0)/je]),v=rt(g,t.face.scale||vs),T=st(v);s.push(T),Object.keys(d).forEach(y=>L.dispose(d[y]))}}return Object.keys(n).forEach(i=>L.dispose(n[i])),s}var F0=D(V());var At={};we(At,{connected:()=>A5,kpt:()=>s5});var s5=["nose","leftEyeInside","leftEye","leftEyeOutside","rightEyeInside","rightEye","rightEyeOutside","leftEar","rightEar","leftMouth","rightMouth","leftShoulder","rightShoulder","leftElbow","rightElbow","leftWrist","rightWrist","leftPinky","rightPinky","leftIndex","rightIndex","leftThumb","rightThumb","leftHip","rightHip","leftKnee","rightKnee","leftAnkle","rightAnkle","leftHeel","rightHeel","leftFoot","rightFoot","bodyCenter","bodyTop","leftPalm","leftHand","rightPalm","rightHand"],A5={shoulders:["leftShoulder","rightShoulder"],hips:["rightHip","leftHip"],mouth:["leftMouth","rightMouth"],leftLegUpper:["leftHip","leftKnee"],leftLegLower:["leftKnee","leftAnkle"],leftFoot:["leftAnkle","leftHeel","leftFoot"],leftTorso:["leftShoulder","leftHip"],leftArmUpper:["leftShoulder","leftElbow"],leftArmLower:["leftElbow","leftWrist"],leftHand:["leftWrist","leftPalm"],leftHandPinky:["leftPalm","leftPinky"],leftHandIndex:["leftPalm","leftIndex"],leftHandThumb:["leftPalm","leftThumb"],leftEyeOutline:["leftEyeInside","leftEyeOutside"],rightLegUpper:["rightHip","rightKnee"],rightLegLower:["rightKnee","rightAnkle"],rightFoot:["rightAnkle","rightHeel","rightFoot"],rightTorso:["rightShoulder","rightHip"],rightArmUpper:["rightShoulder","rightElbow"],rightArmLower:["rightElbow","rightWrist"],rightHand:["rightWrist","rightPalm"],rightHandPinky:["rightPalm","rightPinky"],rightHandIndex:["rightPalm","rightIndex"],rightHandThumb:["rightPalm","rightThumb"],rightEyeOutline:["rightEyeInside","rightEyeOutside"]};var W0=D(V()),c3=224,Rs,ks=5,at=[8,16,32,32,32];function d3(){let e=[],t=0;for(;tn.x)),y:W0.tensor1d(e.map(n=>n.y))}}function be(e,t=[1,1]){let n=[e.map(a=>a[0]),e.map(a=>a[1])],o=[Math.min(...n[0]),Math.min(...n[1])],r=[Math.max(...n[0]),Math.max(...n[1])],s=[o[0],o[1],r[0]-o[0],r[1]-o[1]],A=[s[0]/t[0],s[1]/t[1],s[2]/t[0],s[3]/t[1]];return{box:s,boxRaw:A}}function x3(e,t=[1,1]){let n=[e.map(c=>c[0]),e.map(c=>c[1])],o=[Math.min(...n[0]),Math.min(...n[1])],r=[Math.max(...n[0]),Math.max(...n[1])],s=[(o[0]+r[0])/2,(o[1]+r[1])/2],A=Math.max(s[0]-o[0],s[1]-o[1],-s[0]+r[0],-s[1]+r[1]),a=[Math.trunc(s[0]-A),Math.trunc(s[1]-A),Math.trunc(2*A),Math.trunc(2*A)],l=[a[0]/t[0],a[1]/t[1],a[2]/t[0],a[3]/t[1]];return{box:a,boxRaw:l}}function it(e,t){let n=[e[2]*t,e[3]*t];return[e[0]-(n[0]-e[2])/2,e[1]-(n[1]-e[3])/2,n[0],n[1]]}var m3={initial:!0},R0={detector:null,landmarks:null},d2={detector:[224,224],landmarks:[256,256]},a5=Number.MAX_SAFE_INTEGER,Es={landmarks:["ld_3d","activation_segmentation","activation_heatmap","world_3d","output_poseflag"],detector:[]},ct=null,C2,Ne=[[0,0],[0,0],[0,0],[0,0]],y3=0,f3=e=>1-1/(1+Math.exp(e));async function p3(e){var t;if(m3.initial&&(R0.detector=null),!R0.detector&&e.body.detector&&e.body.detector.modelPath){R0.detector=await C(e.body.detector.modelPath);let n=(t=R0.detector)!=null&&t.executor?Object.values(R0.detector.modelSignature.inputs):void 0;d2.detector[0]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[1].size):0,d2.detector[1]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[2].size):0}else e.debug&&R0.detector&&h("cached model:",R0.detector.modelUrl);return d3(),R0.detector}async function u3(e){var t;if(m3.initial&&(R0.landmarks=null),R0.landmarks)e.debug&&h("cached model:",R0.landmarks.modelUrl);else{R0.landmarks=await C(e.body.modelPath);let n=(t=R0.landmarks)!=null&&t.executor?Object.values(R0.landmarks.modelSignature.inputs):void 0;d2.landmarks[0]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[1].size):0,d2.landmarks[1]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[2].size):0}return R0.landmarks}function zs(e,t){var r,s;let n={};if(!((r=e==null?void 0:e.shape)!=null&&r[1])||!((s=e==null?void 0:e.shape)!=null&&s[2]))return e;let o;if(C2&&(n.cropped=F0.image.cropAndResize(e,[C2],[0],[e.shape[1],e.shape[2]])),e.shape[1]!==e.shape[2]){let A=[e.shape[2]>e.shape[1]?Math.trunc((e.shape[2]-e.shape[1])/2):0,e.shape[2]>e.shape[1]?Math.trunc((e.shape[2]-e.shape[1])/2):0],a=[e.shape[1]>e.shape[2]?Math.trunc((e.shape[1]-e.shape[2])/2):0,e.shape[1]>e.shape[2]?Math.trunc((e.shape[1]-e.shape[2])/2):0];Ne=[[0,0],A,a,[0,0]],n.pad=F0.pad(n.cropped||e,Ne),n.resize=F0.image.resizeBilinear(n.pad,[t,t]),o=F0.div(n.resize,W.tf255)}else e.shape[1]!==t?(n.resize=F0.image.resizeBilinear(n.cropped||e,[t,t]),o=F0.div(n.resize,W.tf255)):o=F0.div(n.cropped||e,W.tf255);return Object.keys(n).forEach(A=>F0.dispose(n[A])),o}function Ss(e,t){for(let n of e)n.position=[Math.trunc(n.position[0]*(t[0]+Ne[2][0]+Ne[2][1])/t[0]-Ne[2][0]),Math.trunc(n.position[1]*(t[1]+Ne[1][0]+Ne[1][1])/t[1]-Ne[1][0]),n.position[2]],n.positionRaw=[n.position[0]/t[0],n.position[1]/t[1],2*n.position[2]/(t[0]+t[1])];if(C2)for(let n of e)n.positionRaw=[n.positionRaw[0]+C2[1],n.positionRaw[1]+C2[0],n.positionRaw[2]],n.position=[Math.trunc(n.positionRaw[0]*t[0]),Math.trunc(n.positionRaw[1]*t[1]),n.positionRaw[2]];return e}function js(e){let t=e.find(a=>a.part==="leftPalm"),n=e.find(a=>a.part==="leftWrist"),o=e.find(a=>a.part==="leftIndex");t.position[2]=((n.position[2]||0)+(o.position[2]||0))/2;let r=e.find(a=>a.part==="rightPalm"),s=e.find(a=>a.part==="rightWrist"),A=e.find(a=>a.part==="rightIndex");r.position[2]=((s.position[2]||0)+(A.position[2]||0))/2}async function Ns(e,t,n){var m,p;if(!((m=R0.landmarks)!=null&&m.executor))return null;let o={};[o.ld,o.segmentation,o.heatmap,o.world,o.poseflag]=(p=R0.landmarks)==null?void 0:p.execute(e,Es.landmarks);let r=(await o.poseflag.data())[0],s=await o.ld.data(),A=await o.world.data();Object.keys(o).forEach(g=>F0.dispose(o[g]));let a=[],l=5;for(let g=0;gg.position),i=be(x,[n[0],n[1]]),f={};for(let[g,v]of Object.entries(A5)){let T=[];for(let y=0;yw.part===v[y]),z=c.find(w=>w.part===v[y+1]);b&&z&&T.push([b.position,z.position])}f[g]=T}return{id:0,score:Math.trunc(100*r)/100,box:i.box,boxRaw:i.boxRaw,keypoints:c,annotations:f}}async function i5(e,t){let n=[e.shape[2]||0,e.shape[1]||0],o=(t.body.skipTime||0)>M()-y3,r=a5<(t.body.skipFrames||0);if(t.skipAllowed&&o&&r&&ct!==null)a5++;else{let s={};s.landmarks=zs(e,256),ct=await Ns(s.landmarks,t,n),Object.keys(s).forEach(A=>F0.dispose(s[A])),y3=M(),a5=0}return ct?[ct]:[]}var N0=D(V());var x2=[{class:1,label:"person"},{class:2,label:"bicycle"},{class:3,label:"car"},{class:4,label:"motorcycle"},{class:5,label:"airplane"},{class:6,label:"bus"},{class:7,label:"train"},{class:8,label:"truck"},{class:9,label:"boat"},{class:10,label:"traffic light"},{class:11,label:"fire hydrant"},{class:12,label:"stop sign"},{class:13,label:"parking meter"},{class:14,label:"bench"},{class:15,label:"bird"},{class:16,label:"cat"},{class:17,label:"dog"},{class:18,label:"horse"},{class:19,label:"sheep"},{class:20,label:"cow"},{class:21,label:"elephant"},{class:22,label:"bear"},{class:23,label:"zebra"},{class:24,label:"giraffe"},{class:25,label:"backpack"},{class:26,label:"umbrella"},{class:27,label:"handbag"},{class:28,label:"tie"},{class:29,label:"suitcase"},{class:30,label:"frisbee"},{class:31,label:"skis"},{class:32,label:"snowboard"},{class:33,label:"sports ball"},{class:34,label:"kite"},{class:35,label:"baseball bat"},{class:36,label:"baseball glove"},{class:37,label:"skateboard"},{class:38,label:"surfboard"},{class:39,label:"tennis racket"},{class:40,label:"bottle"},{class:41,label:"wine glass"},{class:42,label:"cup"},{class:43,label:"fork"},{class:44,label:"knife"},{class:45,label:"spoon"},{class:46,label:"bowl"},{class:47,label:"banana"},{class:48,label:"apple"},{class:49,label:"sandwich"},{class:50,label:"orange"},{class:51,label:"broccoli"},{class:52,label:"carrot"},{class:53,label:"hot dog"},{class:54,label:"pizza"},{class:55,label:"donut"},{class:56,label:"cake"},{class:57,label:"chair"},{class:58,label:"couch"},{class:59,label:"potted plant"},{class:60,label:"bed"},{class:61,label:"dining table"},{class:62,label:"toilet"},{class:63,label:"tv"},{class:64,label:"laptop"},{class:65,label:"mouse"},{class:66,label:"remote"},{class:67,label:"keyboard"},{class:68,label:"cell phone"},{class:69,label:"microwave"},{class:70,label:"oven"},{class:71,label:"toaster"},{class:72,label:"sink"},{class:73,label:"refrigerator"},{class:74,label:"book"},{class:75,label:"clock"},{class:76,label:"vase"},{class:77,label:"scissors"},{class:78,label:"teddy bear"},{class:79,label:"hair drier"},{class:80,label:"toothbrush"}];var L0,Ke=0,l5=[],b3=0,c5=Number.MAX_SAFE_INTEGER;async function g3(e){if(k.initial&&(L0=null),L0)e.debug&&h("cached model:",L0.modelUrl);else{L0=await C(e.object.modelPath);let t=L0!=null&&L0.executor?Object.values(L0.modelSignature.inputs):void 0;Ke=Array.isArray(t)?parseInt(t[0].tensorShape.dim[2].size):0}return L0}async function Os(e,t,n){if(!e)return[];let o={},r=[],s=await e.array();o.squeeze=N0.squeeze(e);let A=N0.split(o.squeeze,6,1);o.stack=N0.stack([A[1],A[0],A[3],A[2]],1),o.boxes=N0.squeeze(o.stack),o.scores=N0.squeeze(A[4]),o.classes=N0.squeeze(A[5]),N0.dispose([e,...A]),o.nms=await N0.image.nonMaxSuppressionAsync(o.boxes,o.scores,n.object.maxDetected,n.object.iouThreshold,n.object.minConfidence||0);let a=await o.nms.data(),l=0;for(let c of Array.from(a)){let x=Math.trunc(100*s[0][c][4])/100,i=s[0][c][5];if(Number.isNaN(i))continue;let f=x2[i].label,[d,m]=[s[0][c][0]/Ke,s[0][c][1]/Ke],p=[d,m,s[0][c][2]/Ke-d,s[0][c][3]/Ke-m],g=[Math.trunc(p[0]*t[0]),Math.trunc(p[1]*t[1]),Math.trunc(p[2]*t[0]),Math.trunc(p[3]*t[1])];r.push({id:l++,score:x,class:i,label:f,box:g,boxRaw:p})}return Object.keys(o).forEach(c=>N0.dispose(o[c])),r}async function d5(e,t){if(!(L0!=null&&L0.executor))return[];let n=(t.object.skipTime||0)>M()-b3,o=c5<(t.object.skipFrames||0);return t.skipAllowed&&n&&o&&l5.length>0?(c5++,l5):(c5=0,new Promise(async r=>{let s=[e.shape[2]||0,e.shape[1]||0],A=N0.image.resizeBilinear(e,[Ke,Ke]),a=t.object.enabled?L0==null?void 0:L0.execute(A,["tower_0/detections"]):null;b3=M(),N0.dispose(A);let l=await Os(a,s,t);l5=l,r(l)}))}var J=D(V());var dt={};we(dt,{connected:()=>y5,kpt:()=>x5});var x5=["head","neck","rightShoulder","rightElbow","rightWrist","chest","leftShoulder","leftElbow","leftWrist","bodyCenter","rightHip","rightKnee","rightAnkle","leftHip","leftKnee","leftAnkle"],y5={leftLeg:["leftHip","leftKnee","leftAnkle"],rightLeg:["rightHip","rightKnee","rightAnkle"],torso:["leftShoulder","rightShoulder","rightHip","leftHip","leftShoulder"],leftArm:["leftShoulder","leftElbow","leftWrist"],rightArm:["rightShoulder","rightElbow","rightWrist"],head:[]};var b0,T3=0,O0={id:0,keypoints:[],box:[0,0,0,0],boxRaw:[0,0,0,0],score:0,annotations:{}},f5=Number.MAX_SAFE_INTEGER;async function v3(e){return k.initial&&(b0=null),b0?e.debug&&h("cached model:",b0.modelUrl):b0=await C(e.body.modelPath),b0}async function Is(e,t){let[n,o]=e.shape,r=J.reshape(e,[o*n]),s=J.max(r,0),A=(await s.data())[0];if(A>t){let a=J.argMax(r,0),l=J.mod(a,n),c=(await l.data())[0],x=J.div(a,n),i=(await x.data())[0];return J.dispose([r,s,a,l,x]),[c,i,A]}return J.dispose([r,s]),[0,0,A]}async function m5(e,t){if(!(b0!=null&&b0.executor))return[];let n=(t.body.skipTime||0)>M()-T3,o=f5<(t.body.skipFrames||0);return t.skipAllowed&&n&&o&&Object.keys(O0.keypoints).length>0?(f5++,[O0]):(f5=0,new Promise(async r=>{let s=J.tidy(()=>{if(!(b0!=null&&b0.inputs[0].shape))return null;let i=J.image.resizeBilinear(e,[b0.inputs[0].shape[2],b0.inputs[0].shape[1]],!1),f=J.mul(i,W.tf2);return J.sub(f,W.tf1)}),A;if(t.body.enabled&&(A=b0==null?void 0:b0.execute(s)),T3=M(),J.dispose(s),A){O0.keypoints.length=0;let i=J.squeeze(A);J.dispose(A);let f=J.unstack(i,2);J.dispose(i);for(let d=0;d(t.body.minConfidence||0)&&O0.keypoints.push({score:Math.round(100*g)/100,part:x5[d],positionRaw:[m/b0.inputs[0].shape[2],p/b0.inputs[0].shape[1]],position:[Math.round(e.shape[2]*m/b0.inputs[0].shape[2]),Math.round(e.shape[1]*p/b0.inputs[0].shape[1])]})}f.forEach(d=>J.dispose(d))}O0.score=O0.keypoints.reduce((i,f)=>f.score>i?f.score:i,0);let a=O0.keypoints.map(i=>i.position[0]),l=O0.keypoints.map(i=>i.position[1]);O0.box=[Math.min(...a),Math.min(...l),Math.max(...a)-Math.min(...a),Math.max(...l)-Math.min(...l)];let c=O0.keypoints.map(i=>i.positionRaw[0]),x=O0.keypoints.map(i=>i.positionRaw[1]);O0.boxRaw=[Math.min(...c),Math.min(...x),Math.max(...c)-Math.min(...c),Math.max(...x)-Math.min(...x)];for(let[i,f]of Object.entries(y5)){let d=[];for(let m=0;mv.part===f[m]),g=O0.keypoints.find(v=>v.part===f[m+1]);p&&g&&p.score>(t.body.minConfidence||0)&&g.score>(t.body.minConfidence||0)&&d.push([p.position,g.position])}O0.annotations[i]=d}r([O0])}))}var ae=D(V());var Cs=["angry","disgust","fear","happy","sad","surprise","neutral"],Y0,xt=[],R3=0,k3=0,p5=Number.MAX_SAFE_INTEGER;async function w3(e){var t;return k.initial&&(Y0=null),Y0?e.debug&&h("cached model:",Y0.modelUrl):Y0=await C((t=e.face.emotion)==null?void 0:t.modelPath),Y0}async function u5(e,t,n,o){var A,a;if(!Y0)return[];let r=p5<(((A=t.face.emotion)==null?void 0:A.skipFrames)||0),s=(((a=t.face.emotion)==null?void 0:a.skipTime)||0)>M()-k3;return t.skipAllowed&&s&&r&&R3===o&&xt[n]&&xt[n].length>0?(p5++,xt[n]):(p5=0,new Promise(async l=>{var x;let c=[];if((x=t.face.emotion)!=null&&x.enabled){let i={},f=Y0!=null&&Y0.inputs[0].shape?Y0.inputs[0].shape[2]:0;i.resize=ae.image.resizeBilinear(e,[f,f],!1),i.channels=ae.mul(i.resize,W.rgb),i.grayscale=ae.sum(i.channels,3,!0),i.grayscaleSub=ae.sub(i.grayscale,W.tf05),i.grayscaleMul=ae.mul(i.grayscaleSub,W.tf2),i.emotion=Y0==null?void 0:Y0.execute(i.grayscaleMul),k3=M();let d=await i.emotion.data();for(let m=0;m(t.face.emotion.minConfidence||0)&&c.push({score:Math.min(.99,Math.trunc(100*d[m])/100),emotion:Cs[m]});c.sort((m,p)=>p.score-m.score),Object.keys(i).forEach(m=>ae.dispose(i[m]))}xt[n]=c,R3=o,l(c)}))}var Ce=D(V());var ie=D(V());var G0,Oe=0,Ls=2.3,h5=te.leftEyeLower0,b5=te.rightEyeLower0,y2={leftBounds:[h5[0],h5[h5.length-1]],rightBounds:[b5[0],b5[b5.length-1]]},f2={upperCenter:3,lowerCenter:4,index:71,numCoordinates:76};async function N3(e){var t,n;return k.initial&&(G0=null),G0?e.debug&&h("cached model:",G0.modelUrl):G0=await C((t=e.face.iris)==null?void 0:t.modelPath),Oe=(G0==null?void 0:G0.executor)&&((n=G0.inputs)==null?void 0:n[0].shape)?G0.inputs[0].shape[2]:0,Oe===-1&&(Oe=64),G0}function yt(e,t,n,o){for(let r=0;r{let t=e[y2.leftBounds[0]][2],n=e[y2.rightBounds[0]][2];return t-n},z3=(e,t,n,o,r,s=!1)=>{let A=st(rt($1([e[n],e[o]]),Ls)),a=l2(A),l=ie.image.cropAndResize(t,[[A.startPoint[1]/r,A.startPoint[0]/r,A.endPoint[1]/r,A.endPoint[0]/r]],[0],[Oe,Oe]);if(s&&k.kernels.includes("flipleftright")){let c=ie.image.flipLeftRight(l);ie.dispose(l),l=c}return{box:A,boxSize:a,crop:l}},S3=(e,t,n,o=!1)=>{let r=[];for(let s=0;s{let o=e[te[`${n}EyeUpper0`][f2.upperCenter]][2],r=e[te[`${n}EyeLower0`][f2.lowerCenter]][2],s=(o+r)/2;return t.map((A,a)=>{let l=s;return a===2?l=o:a===4&&(l=r),[A[0],A[1],l]})};async function O3(e,t,n){if(!(G0!=null&&G0.executor))return e;let{box:o,boxSize:r,crop:s}=z3(e,t,y2.leftBounds[0],y2.leftBounds[1],n,!0),{box:A,boxSize:a,crop:l}=z3(e,t,y2.rightBounds[0],y2.rightBounds[1],n,!0),c=ie.concat([s,l]);ie.dispose(s),ie.dispose(l);let x=G0.execute(c);ie.dispose(c);let i=await x.data();ie.dispose(x);let f=i.slice(0,f2.numCoordinates*3),{rawCoords:d,iris:m}=S3(f,o,r,!0),p=i.slice(f2.numCoordinates*3),{rawCoords:g,iris:v}=S3(p,A,a,!1),T=Ws(e);Math.abs(T)<30?(yt(e,d,"left",null),yt(e,g,"right",null)):T<1?yt(e,d,"left",["EyeUpper0","EyeLower0"]):yt(e,g,"right",["EyeUpper0","EyeLower0"]);let y=j3(e,m,"left"),b=j3(e,v,"right");return e.concat(y).concat(b)}var Fs=[[61,146],[146,91],[91,181],[181,84],[84,17],[17,314],[314,405],[405,321],[321,375],[375,291],[61,185],[185,40],[40,39],[39,37],[37,0],[0,267],[267,269],[269,270],[270,409],[409,291],[78,95],[95,88],[88,178],[178,87],[87,14],[14,317],[317,402],[402,318],[318,324],[324,308],[78,191],[191,80],[80,81],[81,82],[82,13],[13,312],[312,311],[311,310],[310,415],[415,308]],Gs=[[263,249],[249,390],[390,373],[373,374],[374,380],[380,381],[381,382],[382,362],[263,466],[466,388],[388,387],[387,386],[386,385],[385,384],[384,398],[398,362]],Bs=[[276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]],Hs=[[474,475],[475,476],[476,477],[477,474]],Vs=[[33,7],[7,163],[163,144],[144,145],[145,153],[153,154],[154,155],[155,133],[33,246],[246,161],[161,160],[160,159],[159,158],[158,157],[157,173],[173,133]],Ds=[[46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]],Zs=[[469,470],[470,471],[471,472],[472,469]],Xs=[[10,338],[338,297],[297,332],[332,284],[284,251],[251,389],[389,356],[356,454],[454,323],[323,361],[361,288],[288,397],[397,365],[365,379],[379,378],[378,400],[400,377],[377,152],[152,148],[148,176],[176,149],[149,150],[150,136],[136,172],[172,58],[58,132],[132,93],[93,234],[234,127],[127,162],[162,21],[21,54],[54,103],[103,67],[67,109],[109,10]];function Ie(e){let t=e.map(n=>n[0]);return t.push(e[e.length-1][1]),t}var qs={lips:Ie(Fs),leftEye:Ie(Gs),leftEyebrow:Ie(Bs),leftIris:Ie(Hs),rightEye:Ie(Vs),rightEyebrow:Ie(Ds),rightIris:Ie(Zs),faceOval:Ie(Xs)},Us=Object.entries(qs).map(([e,t])=>t.map(n=>[n,e])).flat(),Qa=new Map(Us),L2=[61,146,91,181,84,17,314,405,321,375,291,185,40,39,37,0,267,269,270,409,78,95,88,178,87,14,317,402,318,324,308,191,80,81,82,13,312,311,310,415,76,77,90,180,85,16,315,404,320,307,306,184,74,73,72,11,302,303,304,408,62,96,89,179,86,15,316,403,319,325,292,183,42,41,38,12,268,271,272,407],Je=[33,7,163,144,145,153,154,155,133,246,161,160,159,158,157,173,130,25,110,24,23,22,26,112,243,247,30,29,27,28,56,190,226,31,228,229,230,231,232,233,244,113,225,224,223,222,221,189,35,124,46,53,52,65,143,111,117,118,119,120,121,128,245,156,70,63,105,66,107,55,193],Qe=[263,249,390,373,374,380,381,382,362,466,388,387,386,385,384,398,359,255,339,254,253,252,256,341,463,467,260,259,257,258,286,414,446,261,448,449,450,451,452,453,464,342,445,444,443,442,441,413,265,353,276,283,282,295,372,340,346,347,348,349,350,357,465,383,300,293,334,296,336,285,417];async function L3(e,t){var s,A,a,l,c,x,i,f,d,m;let n={lips:await((A=(s=t.filter(p=>p.size===160))==null?void 0:s[0])==null?void 0:A.data()),irisL:await((l=(a=t.filter(p=>p.size===10))==null?void 0:a[0])==null?void 0:l.data()),eyeL:await((x=(c=t.filter(p=>p.size===142))==null?void 0:c[0])==null?void 0:x.data()),irisR:await((f=(i=t.filter(p=>p.size===10))==null?void 0:i[1])==null?void 0:f.data()),eyeR:await((m=(d=t.filter(p=>p.size===142))==null?void 0:d[1])==null?void 0:m.data())};for(let p of Object.values(n))if(!p)return e;let o=Je.reduce((p,g)=>p+=e[g][2],0)/Je.length;for(let p=0;pp+=e[g][2],0)/Qe.length;for(let p=0;pM()-fe.timestamp,o=fe.skipped<(((c=t.face.detector)==null?void 0:c.skipFrames)||0);!t.skipAllowed||!n||!o||fe.boxes.length===0?(fe.boxes=await i3(e,t),fe.timestamp=M(),fe.skipped=0):fe.skipped++;let r=[],s=[],A=0,a=W2;for(let T=0;TZ.shape[Z.shape.length-1]===1).data();if(w.faceScore=Math.round(100*t0[0])/100,w.faceScore<(((m=t.face.detector)==null?void 0:m.minConfidence)||1)){if(y.confidence=w.faceScore,t.face.mesh.keepInvalid){w.box=nt(y,e),w.boxRaw=ot(y,e),w.score=w.boxScore,w.mesh=y.landmarks.map(Z=>[(y.startPoint[0]+y.endPoint[0])/2+(y.endPoint[0]+y.startPoint[0])*Z[0]/c2(),(y.startPoint[1]+y.endPoint[1])/2+(y.endPoint[1]+y.startPoint[1])*Z[1]/c2()]),w.meshRaw=w.mesh.map(Z=>[Z[0]/(e.shape[2]||1),Z[1]/(e.shape[1]||1),(Z[2]||0)/a]);for(let Z of Object.keys(qe))w.annotations[Z]=[w.mesh[qe[Z]]]}}else{let Z=O.find(G=>G.shape[G.shape.length-1]===1404),U=Ce.reshape(Z,[-1,3]),r0=await U.array();Ce.dispose(U),(p=t.face.attention)!=null&&p.enabled?r0=await L3(r0,O):(g=t.face.iris)!=null&&g.enabled&&(r0=await O3(r0,w.tensor,W2)),w.mesh=n3(r0,y,b,z,W2),w.meshRaw=w.mesh.map(G=>[G[0]/(e.shape[2]||0),G[1]/(e.shape[1]||0),(G[2]||0)/a]);for(let G of Object.keys(te))w.annotations[G]=te[G].map(P0=>w.mesh[P0]);w.score=w.faceScore;let P={...r3(w.mesh,y),confidence:y.confidence,landmarks:y.landmarks};w.box=nt(P,e),w.boxRaw=ot(P,e),s.push(P)}Ce.dispose(O)}else{w.box=nt(y,e),w.boxRaw=ot(y,e),w.score=w.boxScore,w.mesh=y.landmarks.map(O=>[(y.startPoint[0]+y.endPoint[0])/2+(y.endPoint[0]+y.startPoint[0])*O[0]/c2(),(y.startPoint[1]+y.endPoint[1])/2+(y.endPoint[1]+y.startPoint[1])*O[1]/c2()]),w.meshRaw=w.mesh.map(O=>[O[0]/(e.shape[2]||0),O[1]/(e.shape[1]||0),(O[2]||0)/a]);for(let O of Object.keys(qe))w.annotations[O]=[w.mesh[qe[O]]]}w.score>(((v=t.face.detector)==null?void 0:v.minConfidence)||1)?r.push(w):Ce.dispose(w.tensor)}return fe.boxes=s,r}async function F3(e){var t,n,o,r,s,A;return k.initial&&(n0=null),((t=e.face.attention)==null?void 0:t.enabled)&&(n0==null?void 0:n0.signature)&&Object.keys(((n=n0==null?void 0:n0.signature)==null?void 0:n.outputs)||{}).length<6&&(n0=null),n0?e.debug&&h("cached model:",n0.modelUrl):(o=e.face.attention)!=null&&o.enabled?n0=await C(e.face.attention.modelPath):n0=await C((r=e.face.mesh)==null?void 0:r.modelPath),W2=n0.executor&&((s=n0==null?void 0:n0.inputs)==null?void 0:s[0].shape)?(A=n0==null?void 0:n0.inputs)==null?void 0:A[0].shape[2]:256,n0}var G3=Ue,B3=O2;var le=D(V());var k0,Le=[],H3=0,V3=0,M5=Number.MAX_SAFE_INTEGER;async function D3(e){var t;return k.initial&&(k0=null),k0?e.debug&&h("cached model:",k0.modelUrl):k0=await C((t=e.face.description)==null?void 0:t.modelPath),k0}function T5(e){let t=e.image||e.tensor||e;if(!(k0!=null&&k0.inputs[0].shape))return t;let n=le.image.resizeBilinear(t,[k0.inputs[0].shape[2],k0.inputs[0].shape[1]],!1),o=le.mul(n,W.tf255);return le.dispose(n),o}async function v5(e,t,n,o){var a,l,c,x;let r={age:0,gender:"unknown",genderScore:0,descriptor:[]};if(!(k0!=null&&k0.executor))return r;let s=M5<(((a=t.face.description)==null?void 0:a.skipFrames)||0),A=(((l=t.face.description)==null?void 0:l.skipTime)||0)>M()-H3;return t.skipAllowed&&s&&A&&V3===o&&((c=Le==null?void 0:Le[n])==null?void 0:c.age)>0&&((x=Le==null?void 0:Le[n])==null?void 0:x.genderScore)>0?(M5++,Le[n]):(M5=0,new Promise(async i=>{var f;if((f=t.face.description)!=null&&f.enabled){let d=T5(e),m=k0==null?void 0:k0.execute(d);H3=M(),le.dispose(d);let g=await m.find(q=>q.shape[1]===1).data(),v=Math.trunc(200*Math.abs(g[0]-.5))/100;v>(t.face.description.minConfidence||0)&&(r.gender=g[0]<=.5?"female":"male",r.genderScore=Math.min(.99,v));let T=le.argMax(m.find(q=>q.shape[1]===100),1),y=(await T.data())[0];le.dispose(T);let z=await m.find(q=>q.shape[1]===100).data();r.age=Math.round(z[y-1]>z[y+1]?10*y-100*z[y-1]:10*y+100*z[y+1])/10,(Number.isNaN(g[0])||Number.isNaN(z[0]))&&h("faceres error:",{model:k0,result:m});let w=m.find(q=>q.shape[1]===1024),O=w?await w.data():[];r.descriptor=Array.from(O),m.forEach(q=>le.dispose(q))}Le[n]=r,V3=o,i(r)}))}var ft=D(V());var ne,R5=[],Ks=["white","black","asian","indian","other"],Js=[15,23,28,35.5,45.5,55.5,65],Z3=0,X3=0,k5=Number.MAX_SAFE_INTEGER;async function q3(e){var t;return k.initial&&(ne=null),ne?e.debug&&h("cached model:",ne.modelUrl):ne=await C((t=e.face.gear)==null?void 0:t.modelPath),ne}async function w5(e,t,n,o){var A,a;if(!ne)return{age:0,gender:"unknown",genderScore:0,race:[]};let r=k5<(((A=t.face.gear)==null?void 0:A.skipFrames)||0),s=(((a=t.face.gear)==null?void 0:a.skipTime)||0)>M()-X3;return t.skipAllowed&&s&&r&&Z3===o&&R5[n]?(k5++,R5[n]):(k5=0,new Promise(async l=>{var v,T;if(!(ne!=null&&ne.inputs[0].shape))return;let c={},x=[[0,.1,.9,.9]];c.resize=ft.image.cropAndResize(e,x,[0],[ne.inputs[0].shape[2],ne.inputs[0].shape[1]]);let i={age:0,gender:"unknown",genderScore:0,race:[]};(v=t.face.gear)!=null&&v.enabled&&([c.age,c.gender,c.race]=ne.execute(c.resize,["age_output","gender_output","race_output"]));let f=await c.gender.data();i.gender=f[0]>f[1]?"male":"female",i.genderScore=Math.round(100*(f[0]>f[1]?f[0]:f[1]))/100;let d=await c.race.data();for(let y=0;y(((T=t.face.gear)==null?void 0:T.minConfidence)||.2)&&i.race.push({score:Math.round(100*d[y])/100,race:Ks[y]});i.race.sort((y,b)=>b.score-y.score);let p=Array.from(await c.age.data()).map((y,b)=>[Js[b],y]).sort((y,b)=>b[1]-y[1]),g=p[0][0];for(let y=1;yft.dispose(c[y])),R5[n]=i,Z3=o,X3=M(),l(i)}))}var F=D(V());var J3=D(V());function mt(e){return[Math.abs(e.endPoint[0]-e.startPoint[0]),Math.abs(e.endPoint[1]-e.startPoint[1])]}function F2(e){return[e.startPoint[0]+(e.endPoint[0]-e.startPoint[0])/2,e.startPoint[1]+(e.endPoint[1]-e.startPoint[1])/2]}function Q3(e,t,n){let o=t.shape[1],r=t.shape[2],s=[[e.startPoint[1]/o,e.startPoint[0]/r,e.endPoint[1]/o,e.endPoint[0]/r]];return J3.image.cropAndResize(t,s,[0],n)}function _3(e,t){let n=[e.startPoint[0]*t[0],e.startPoint[1]*t[1]],o=[e.endPoint[0]*t[0],e.endPoint[1]*t[1]],r=e.palmLandmarks.map(s=>[s[0]*t[0],s[1]*t[1]]);return{startPoint:n,endPoint:o,palmLandmarks:r,confidence:e.confidence}}function pt(e,t=1.5){let n=F2(e),o=mt(e),r=[t*o[0]/2,t*o[1]/2],s=[n[0]-r[0],n[1]-r[1]],A=[n[0]+r[0],n[1]+r[1]];return{startPoint:s,endPoint:A,palmLandmarks:e.palmLandmarks}}function ut(e){let t=F2(e),n=mt(e),r=Math.max(...n)/2,s=[t[0]-r,t[1]-r],A=[t[0]+r,t[1]+r];return{startPoint:s,endPoint:A,palmLandmarks:e.palmLandmarks}}function Qs(e){return e-2*Math.PI*Math.floor((e+Math.PI)/(2*Math.PI))}function $3(e,t){let n=Math.PI/2-Math.atan2(-(t[1]-e[1]),t[0]-e[0]);return Qs(n)}var Y3=(e,t)=>[[1,0,e],[0,1,t],[0,0,1]];function We(e,t){let n=0;for(let o=0;o[A.x,A.y]),this.anchorsTensor=F.tensor2d(this.anchors),this.inputSize=((s=(r=(o=(n=this==null?void 0:this.model)==null?void 0:n.inputs)==null?void 0:o[0])==null?void 0:r.shape)==null?void 0:s[2])||0,this.inputSizeTensor=F.tensor1d([this.inputSize,this.inputSize]),this.doubleInputSizeTensor=F.tensor1d([this.inputSize*2,this.inputSize*2])}normalizeBoxes(t){let n={};n.boxOffsets=F.slice(t,[0,0],[-1,2]),n.boxSizes=F.slice(t,[0,2],[-1,2]),n.div=F.div(n.boxOffsets,this.inputSizeTensor),n.boxCenterPoints=F.add(n.div,this.anchorsTensor),n.halfBoxSizes=F.div(n.boxSizes,this.doubleInputSizeTensor),n.sub=F.sub(n.boxCenterPoints,n.halfBoxSizes),n.startPoints=F.mul(n.sub,this.inputSizeTensor),n.add=F.add(n.boxCenterPoints,n.halfBoxSizes),n.endPoints=F.mul(n.add,this.inputSizeTensor);let o=F.concat2d([n.startPoints,n.endPoints],1);return Object.keys(n).forEach(r=>F.dispose(n[r])),o}normalizeLandmarks(t,n){let o={};o.reshape=F.reshape(t,[-1,7,2]),o.div=F.div(o.reshape,this.inputSizeTensor),o.landmarks=F.add(o.div,this.anchors[n]?this.anchors[n]:0);let r=F.mul(o.landmarks,this.inputSizeTensor);return Object.keys(o).forEach(s=>F.dispose(o[s])),r}async predict(t,n){var a;let o={};o.resize=F.image.resizeBilinear(t,[this.inputSize,this.inputSize]),o.div=F.div(o.resize,W.tf127),o.image=F.sub(o.div,W.tf1),o.batched=this.model.execute(o.image),o.predictions=F.squeeze(o.batched),o.slice=F.slice(o.predictions,[0,0],[-1,1]),o.sigmoid=F.sigmoid(o.slice),o.scores=F.squeeze(o.sigmoid);let r=await o.scores.data();o.boxes=F.slice(o.predictions,[0,1],[-1,4]),o.norm=this.normalizeBoxes(o.boxes),o.nms=await F.image.nonMaxSuppressionAsync(o.norm,o.scores,3*(((a=n.hand)==null?void 0:a.maxDetected)||1),n.hand.iouThreshold,n.hand.minConfidence);let s=await o.nms.array(),A=[];for(let l of s){let c={};c.box=F.slice(o.norm,[l,0],[1,-1]),c.slice=F.slice(o.predictions,[l,5],[1,14]),c.norm=this.normalizeLandmarks(c.slice,l),c.palmLandmarks=F.reshape(c.norm,[-1,2]);let x=await c.box.data(),i=x.slice(0,2),f=x.slice(2,4),d=await c.palmLandmarks.array(),m={startPoint:i,endPoint:f,palmLandmarks:d,confidence:r[l]},p=_3(m,[(t.shape[2]||1)/this.inputSize,(t.shape[1]||0)/this.inputSize]);A.push(p),Object.keys(c).forEach(g=>F.dispose(c[g]))}return Object.keys(o).forEach(l=>F.dispose(o[l])),A}};var B0=D(V());var tA=5,on=1.65,rn=[0,5,9,13,17,1,2],nA=0,oA=2,sn=0,bt=class{constructor(t,n){R(this,"handDetector");R(this,"handPoseModel");R(this,"inputSize");R(this,"storedBoxes");R(this,"skipped");R(this,"detectedHands");var o,r,s;this.handDetector=t,this.handPoseModel=n,this.inputSize=((s=(r=(o=this.handPoseModel)==null?void 0:o.inputs)==null?void 0:r[0].shape)==null?void 0:s[2])||0,this.storedBoxes=[],this.skipped=Number.MAX_SAFE_INTEGER,this.detectedHands=0}calculateLandmarksBoundingBox(t){let n=t.map(A=>A[0]),o=t.map(A=>A[1]),r=[Math.min(...n),Math.min(...o)],s=[Math.max(...n),Math.max(...o)];return{startPoint:r,endPoint:s}}getBoxForPalmLandmarks(t,n){let o=t.map(s=>z5([...s,1],n)),r=this.calculateLandmarksBoundingBox(o);return pt(ut(r),tA)}getBoxForHandLandmarks(t){let n=this.calculateLandmarksBoundingBox(t),o=pt(ut(n),on);o.palmLandmarks=[];for(let r=0;r[A[0]*(d[0]-this.inputSize/2),A[1]*(d[1]-this.inputSize/2),A[2]*d[2]]),l=E5(o,[0,0]),c=a.map(d=>[...z5(d,l),d[2]]),x=en(r),i=[...F2(n),1],f=[We(i,x[0]),We(i,x[1])];return c.map(d=>[Math.trunc(d[0]+f[0]),Math.trunc(d[1]+f[1]),Math.trunc(d[2])])}async estimateHands(t,n){let o=!1,r,s=(n.hand.skipTime||0)>M()-sn,A=this.skipped<(n.hand.skipFrames||0);n.skipAllowed&&s&&A&&(r=await this.handDetector.predict(t,n),this.skipped=0),n.skipAllowed&&this.skipped++,r&&r.length>0&&(r.length!==this.detectedHands&&this.detectedHands!==n.hand.maxDetected||!n.hand.landmarks)&&(this.detectedHands=0,this.storedBoxes=[...r],this.storedBoxes.length>0&&(o=!0));let a=[];for(let l=0;l=n.hand.minConfidence/4){let z=B0.reshape(y,[-1,3]),w=await z.array();B0.dispose(y),B0.dispose(z);let O=this.transformRawCoords(w,p,x,m),q=this.getBoxForHandLandmarks(O);this.storedBoxes[l]={...q,confidence:b};let t0={landmarks:O,confidence:b,boxConfidence:c.confidence,fingerConfidence:b,box:{topLeft:q.startPoint,bottomRight:q.endPoint}};a.push(t0)}else this.storedBoxes[l]=null;B0.dispose(y)}else{let x=pt(ut(c),on),i={confidence:c.confidence,boxConfidence:c.confidence,fingerConfidence:0,box:{topLeft:x.startPoint,bottomRight:x.endPoint},landmarks:[]};a.push(i)}}return this.storedBoxes=this.storedBoxes.filter(l=>l!==null),this.detectedHands=a.length,a.length>n.hand.maxDetected&&(a.length=n.hand.maxDetected),a}};var I0={thumb:0,index:1,middle:2,ring:3,pinky:4,all:[0,1,2,3,4],nameMapping:{0:"thumb",1:"index",2:"middle",3:"ring",4:"pinky"},pointsMapping:{0:[[0,1],[1,2],[2,3],[3,4]],1:[[0,5],[5,6],[6,7],[7,8]],2:[[0,9],[9,10],[10,11],[11,12]],3:[[0,13],[13,14],[14,15],[15,16]],4:[[0,17],[17,18],[18,19],[19,20]]},getName:e=>I0.nameMapping[e],getPoints:e=>I0.pointsMapping[e]},Ge={none:0,half:1,full:2,nameMapping:{0:"none",1:"half",2:"full"},getName:e=>Ge.nameMapping[e]},A0={verticalUp:0,verticalDown:1,horizontalLeft:2,horizontalRight:3,diagonalUpRight:4,diagonalUpLeft:5,diagonalDownRight:6,diagonalDownLeft:7,nameMapping:{0:"verticalUp",1:"verticalDown",2:"horizontalLeft",3:"horizontalRight",4:"diagonalUpRight",5:"diagonalUpLeft",6:"diagonalDownRight",7:"diagonalDownLeft"},getName:e=>A0.nameMapping[e]},Fe=class{constructor(t){R(this,"name");R(this,"curls");R(this,"directions");R(this,"weights");R(this,"weightsRelative");this.name=t,this.curls={},this.directions={},this.weights=[1,1,1,1,1],this.weightsRelative=[1,1,1,1,1]}curl(t,n,o){typeof this.curls[t]=="undefined"&&(this.curls[t]=[]),this.curls[t].push([n,o])}direction(t,n,o){this.directions[t]||(this.directions[t]=[]),this.directions[t].push([n,o])}weight(t,n){this.weights[t]=n;let o=this.weights.reduce((r,s)=>r+s,0);this.weightsRelative=this.weights.map(r=>r*5/o)}matchAgainst(t,n){let o=0;for(let r in t){let s=t[r],A=this.curls[r];if(typeof A=="undefined"){o+=this.weightsRelative[r];continue}for(let[a,l]of A)if(s===a){o+=l*this.weightsRelative[r];break}}for(let r in n){let s=n[r],A=this.directions[r];if(typeof A=="undefined"){o+=this.weightsRelative[r];continue}for(let[a,l]of A)if(s===a){o+=l*this.weightsRelative[r];break}}return o/10}};var{thumb:ce,index:ge,middle:Me,ring:_e,pinky:$e}=I0,{none:de,half:sA,full:xe}=Ge,{verticalUp:m2,verticalDown:h7,horizontalLeft:S5,horizontalRight:AA,diagonalUpRight:aA,diagonalUpLeft:p2,diagonalDownRight:b7,diagonalDownLeft:g7}=A0,Be=new Fe("thumbs up");Be.curl(ce,de,1);Be.direction(ce,m2,1);Be.direction(ce,p2,.25);Be.direction(ce,aA,.25);for(let e of[I0.index,I0.middle,I0.ring,I0.pinky])Be.curl(e,xe,1),Be.direction(e,S5,1),Be.direction(e,AA,1);var f0=new Fe("victory");f0.curl(ce,sA,.5);f0.curl(ce,de,.5);f0.direction(ce,m2,1);f0.direction(ce,p2,1);f0.curl(ge,de,1);f0.direction(ge,m2,.75);f0.direction(ge,p2,1);f0.curl(Me,de,1);f0.direction(Me,m2,1);f0.direction(Me,p2,.75);f0.curl(_e,xe,1);f0.direction(_e,m2,.2);f0.direction(_e,p2,1);f0.direction(_e,S5,.2);f0.curl($e,xe,1);f0.direction($e,m2,.2);f0.direction($e,p2,1);f0.direction($e,S5,.2);f0.weight(ge,2);f0.weight(Me,2);var He=new Fe("point");He.curl(ce,xe,1);He.curl(ge,de,.5);He.curl(Me,xe,.5);He.curl(_e,xe,.5);He.curl($e,xe,.5);He.weight(ge,2);He.weight(Me,2);var Ve=new Fe("middle finger");Ve.curl(ce,de,1);Ve.curl(ge,xe,.5);Ve.curl(Me,xe,.5);Ve.curl(_e,xe,.5);Ve.curl($e,xe,.5);Ve.weight(ge,2);Ve.weight(Me,2);var u2=new Fe("open palm");u2.curl(ce,de,.75);u2.curl(ge,de,.75);u2.curl(Me,de,.75);u2.curl(_e,de,.75);u2.curl($e,de,.75);var An=[Be,f0,He,Ve,u2];var iA=.7,e2={HALF_CURL_START_LIMIT:60,NO_CURL_START_LIMIT:130,DISTANCE_VOTE_POWER:1.1,SINGLE_ANGLE_VOTE_POWER:.9,TOTAL_ANGLE_VOTE_POWER:1.6};function an(e,t,n,o){let r=(t-o)/(e-n),s=Math.atan(r)*180/Math.PI;return s<=0?s=-s:s>0&&(s=180-s),s}function cn(e,t){if(!e||!t)return[0,0];let n=an(e[0],e[1],t[0],t[1]);if(e.length===2)return n;let o=an(e[1],e[2],t[1],t[2]);return[n,o]}function ln(e,t=1){let n=0,o=0,r=0;return e>=75&&e<=105?n=1*t:e>=25&&e<=155?o=1*t:r=1*t,[n,o,r]}function lA(e,t,n){let o=e[0]-t[0],r=e[0]-n[0],s=t[0]-n[0],A=e[1]-t[1],a=e[1]-n[1],l=t[1]-n[1],c=e[2]-t[2],x=e[2]-n[2],i=t[2]-n[2],f=Math.sqrt(o*o+A*A+c*c),d=Math.sqrt(r*r+a*a+x*x),m=Math.sqrt(s*s+l*l+i*i),p=(m*m+f*f-d*d)/(2*m*f);p>1?p=1:p<-1&&(p=-1);let g=Math.acos(p);g=57.2958*g%180;let v;return g>e2.NO_CURL_START_LIMIT?v=Ge.none:g>e2.HALF_CURL_START_LIMIT?v=Ge.half:v=Ge.full,v}function dn(e,t,n,o){let r;return o===Math.abs(e)?e>0?r=A0.horizontalLeft:r=A0.horizontalRight:o===Math.abs(t)?t>0?r=A0.horizontalLeft:r=A0.horizontalRight:n>0?r=A0.horizontalLeft:r=A0.horizontalRight,r}function xn(e,t,n,o){let r;return o===Math.abs(e)?e<0?r=A0.verticalDown:r=A0.verticalUp:o===Math.abs(t)?t<0?r=A0.verticalDown:r=A0.verticalUp:n<0?r=A0.verticalDown:r=A0.verticalUp,r}function cA(e,t,n,o,r,s,A,a){let l,c=xn(e,t,n,o),x=dn(r,s,A,a);return c===A0.verticalUp?x===A0.horizontalLeft?l=A0.diagonalUpLeft:l=A0.diagonalUpRight:x===A0.horizontalLeft?l=A0.diagonalDownLeft:l=A0.diagonalDownRight,l}function dA(e,t,n,o){let r=e[0]-t[0],s=e[0]-n[0],A=t[0]-n[0],a=e[1]-t[1],l=e[1]-n[1],c=t[1]-n[1],x=Math.max(Math.abs(r),Math.abs(s),Math.abs(A)),i=Math.max(Math.abs(a),Math.abs(l),Math.abs(c)),f=0,d=0,m=0,p=i/(x+1e-5);p>1.5?f+=e2.DISTANCE_VOTE_POWER:p>.66?d+=e2.DISTANCE_VOTE_POWER:m+=e2.DISTANCE_VOTE_POWER;let g=Math.sqrt(r*r+a*a),v=Math.sqrt(s*s+l*l),T=Math.sqrt(A*A+c*c),y=Math.max(g,v,T),b=e[0],z=e[1],w=n[0],O=n[1];y===g?(w=n[0],O=n[1]):y===T&&(b=t[0],z=t[1]);let Z=cn([b,z],[w,O]),U=ln(Z,e2.TOTAL_ANGLE_VOTE_POWER);f+=U[0],d+=U[1],m+=U[2];for(let P of o){let G=ln(P,e2.SINGLE_ANGLE_VOTE_POWER);f+=G[0],d+=G[1],m+=G[2]}let r0;return f===Math.max(f,d,m)?r0=xn(l,a,c,i):m===Math.max(d,m)?r0=dn(s,r,A,x):r0=cA(l,a,c,i,s,r,A,x),r0}function yn(e){let t=[],n=[],o=[],r=[];if(!e)return{curls:o,directions:r};for(let s of I0.all){let A=I0.getPoints(s),a=[],l=[];for(let c of A){let x=e[c[0]],i=e[c[1]],f=cn(x,i),d=f[0],m=f[1];a.push(d),l.push(m)}t.push(a),n.push(l)}for(let s of I0.all){let A=s===I0.thumb?1:0,a=I0.getPoints(s),l=e[a[A][0]],c=e[a[A+1][1]],x=e[a[3][1]],i=lA(l,c,x),f=dA(l,c,x,t[s].slice(A));o[s]=i,r[s]=f}return{curls:o,directions:r}}function gt(e){if(!e||e.length===0)return null;let t=yn(e),n={};for(let o of I0.all)n[I0.getName(o)]={curl:Ge.getName(t.curls[o]),direction:A0.getName(t.directions[o])};return n}function fn(e){let t=[];if(!e||e.length===0)return t;let n=yn(e);for(let o of An){let r=o.matchAgainst(n.curls,n.directions);r>=iA&&t.push({name:o.name,confidence:r})}return t}var mn={thumb:[1,2,3,4],index:[5,6,7,8],middle:[9,10,11,12],ring:[13,14,15,16],pinky:[17,18,19,20],palm:[0]},t2,n2,pn;async function N5(e,t){let n=await pn.estimateHands(e,t);if(!n)return[];let o=[];for(let r=0;rn[r].landmarks[i]);let A=n[r].landmarks,a=[Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,0,0],l=[0,0,0,0];if(A&&A.length>0){for(let x of A)x[0]a[2]&&(a[2]=x[0]),x[1]>a[3]&&(a[3]=x[1]);a[2]-=a[0],a[3]-=a[1],l=[a[0]/(e.shape[2]||0),a[1]/(e.shape[1]||0),a[2]/(e.shape[2]||0),a[3]/(e.shape[1]||0)]}else a=n[r].box?[Math.trunc(Math.max(0,n[r].box.topLeft[0])),Math.trunc(Math.max(0,n[r].box.topLeft[1])),Math.trunc(Math.min(e.shape[2]||0,n[r].box.bottomRight[0])-Math.max(0,n[r].box.topLeft[0])),Math.trunc(Math.min(e.shape[1]||0,n[r].box.bottomRight[1])-Math.max(0,n[r].box.topLeft[1]))]:[0,0,0,0],l=[n[r].box.topLeft[0]/(e.shape[2]||0),n[r].box.topLeft[1]/(e.shape[1]||0),(n[r].box.bottomRight[0]-n[r].box.topLeft[0])/(e.shape[2]||0),(n[r].box.bottomRight[1]-n[r].box.topLeft[1])/(e.shape[1]||0)];let c=gt(A);o.push({id:r,score:Math.round(100*n[r].confidence)/100,boxScore:Math.round(100*n[r].boxConfidence)/100,fingerScore:Math.round(100*n[r].fingerConfidence)/100,label:"hand",box:a,boxRaw:l,keypoints:A,annotations:s,landmarks:c})}return o}async function O5(e){var n,o;k.initial&&(t2=null,n2=null),!t2||!n2?[t2,n2]=await Promise.all([e.hand.enabled?C((n=e.hand.detector)==null?void 0:n.modelPath):null,e.hand.landmarks?C((o=e.hand.skeleton)==null?void 0:o.modelPath):null]):(e.debug&&h("cached model:",t2.modelUrl),e.debug&&h("cached model:",n2.modelUrl));let t=t2?new ht(t2):void 0;return t&&n2&&(pn=new bt(t,n2)),[t2,n2]}var Q=D(V());var c0=[null,null],xA=["StatefulPartitionedCall/Postprocessor/Slice","StatefulPartitionedCall/Postprocessor/ExpandDims_1"],De=[[0,0],[0,0]],yA=["hand","fist","pinch","point","face","tip","pinchtip"],hn=4,bn=1.6,fA=512,mA=1.4,Mt=Number.MAX_SAFE_INTEGER,I5=0,Te=[0,0],l0={boxes:[],hands:[]},gn={thumb:[1,2,3,4],index:[5,6,7,8],middle:[9,10,11,12],ring:[13,14,15,16],pinky:[17,18,19,20],base:[0],palm:[0,17,13,9,5,1,0]};async function Mn(e){var t;if(k.initial&&(c0[0]=null),c0[0])e.debug&&h("cached model:",c0[0].modelUrl);else{Tt(["tensorlistreserve","enter","tensorlistfromtensor","merge","loopcond","switch","exit","tensorliststack","nextiteration","tensorlistsetitem","tensorlistgetitem","reciprocal","shape","split","where"],e),c0[0]=await C((t=e.hand.detector)==null?void 0:t.modelPath);let n=c0[0].executor?Object.values(c0[0].modelSignature.inputs):void 0;De[0][0]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[1].size):0,De[0][1]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[2].size):0}return c0[0]}async function Tn(e){var t;if(k.initial&&(c0[1]=null),c0[1])e.debug&&h("cached model:",c0[1].modelUrl);else{c0[1]=await C((t=e.hand.skeleton)==null?void 0:t.modelPath);let n=c0[1].executor?Object.values(c0[1].modelSignature.inputs):void 0;De[1][0]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[1].size):0,De[1][1]=Array.isArray(n)?parseInt(n[0].tensorShape.dim[2].size):0}return c0[1]}async function pA(e,t){let n=[];if(!e||!c0[0])return n;let o={},r=(e.shape[2]||1)/(e.shape[1]||1),s=Math.min(Math.round((e.shape[1]||0)/8)*8,fA),A=Math.round(s*r/8)*8;o.resize=Q.image.resizeBilinear(e,[s,A]),o.cast=Q.cast(o.resize,"int32"),[o.rawScores,o.rawBoxes]=await c0[0].executeAsync(o.cast,xA),o.boxes=Q.squeeze(o.rawBoxes,[0,2]),o.scores=Q.squeeze(o.rawScores,[0]);let a=Q.unstack(o.scores,1);Q.dispose(a[hn]),a.splice(hn,1),o.filtered=Q.stack(a,1),Q.dispose(a),o.max=Q.max(o.filtered,1),o.argmax=Q.argMax(o.filtered,1);let l=0;o.nms=await Q.image.nonMaxSuppressionAsync(o.boxes,o.max,(t.hand.maxDetected||0)+1,t.hand.iouThreshold||0,t.hand.minConfidence||1);let c=await o.nms.data(),x=await o.max.data(),i=await o.argmax.data();for(let f of Array.from(c)){let d=Q.slice(o.boxes,f,1),m=await d.data();Q.dispose(d);let p=[m[1],m[0],m[3]-m[1],m[2]-m[0]],g=it(p,mA),v=[Math.trunc(p[0]*Te[0]),Math.trunc(p[1]*Te[1]),Math.trunc(p[2]*Te[0]),Math.trunc(p[3]*Te[1])],T=x[f],y=yA[i[f]],b={id:l++,score:T,box:v,boxRaw:g,label:y};n.push(b)}return Object.keys(o).forEach(f=>Q.dispose(o[f])),n.sort((f,d)=>d.score-f.score),n.length>(t.hand.maxDetected||1)&&(n.length=t.hand.maxDetected||1),n}async function C5(e,t,n){let o={id:t.id,score:Math.round(100*t.score)/100,boxScore:Math.round(100*t.score)/100,fingerScore:0,box:t.box,boxRaw:t.boxRaw,label:t.label,keypoints:[],landmarks:{},annotations:{}};if(e&&c0[1]&&n.hand.landmarks&&t.score>(n.hand.minConfidence||0)){let r={},s=[t.boxRaw[1],t.boxRaw[0],t.boxRaw[3]+t.boxRaw[1],t.boxRaw[2]+t.boxRaw[0]];r.crop=Q.image.cropAndResize(e,[s],[0],[De[1][0],De[1][1]],"bilinear"),r.div=Q.div(r.crop,W.tf255),[r.score,r.keypoints]=c0[1].execute(r.div,["Identity_1","Identity"]);let A=(await r.score.data())[0],a=(100-Math.trunc(100/(1+Math.exp(A))))/100;if(a>=(n.hand.minConfidence||0)){o.fingerScore=a,r.reshaped=Q.reshape(r.keypoints,[-1,3]);let x=(await r.reshaped.array()).map(i=>[i[0]/De[1][1],i[1]/De[1][0],i[2]||0]).map(i=>[i[0]*t.boxRaw[2],i[1]*t.boxRaw[3],i[2]||0]);o.keypoints=x.map(i=>[Te[0]*(i[0]+t.boxRaw[0]),Te[1]*(i[1]+t.boxRaw[1]),i[2]||0]),o.landmarks=gt(o.keypoints);for(let i of Object.keys(gn))o.annotations[i]=gn[i].map(f=>o.landmarks&&o.keypoints[f]?o.keypoints[f]:null)}Object.keys(r).forEach(l=>Q.dispose(r[l]))}return o}async function L5(e,t){var r,s;if(!((r=c0[0])!=null&&r.executor)||!((s=c0[1])!=null&&s.executor)||!c0[0].inputs[0].shape||!c0[1].inputs[0].shape)return[];Te=[e.shape[2]||0,e.shape[1]||0],Mt++;let n=(t.hand.skipTime||0)>M()-I5,o=Mt<(t.hand.skipFrames||0);return t.skipAllowed&&n&&o?l0.hands:new Promise(async A=>{let a=3*(t.hand.skipTime||0)>M()-I5,l=Mt<3*(t.hand.skipFrames||0);t.skipAllowed&&l0.hands.length===t.hand.maxDetected?l0.hands=await Promise.all(l0.boxes.map(x=>C5(e,x,t))):t.skipAllowed&&a&&l&&l0.hands.length>0?l0.hands=await Promise.all(l0.boxes.map(x=>C5(e,x,t))):(l0.boxes=await pA(e,t),I5=M(),l0.hands=await Promise.all(l0.boxes.map(x=>C5(e,x,t))),Mt=0);let c=[...l0.boxes];if(l0.boxes.length=0,t.cacheSensitivity>0)for(let x=0;x.05&&i.box[3]/(e.shape[1]||1)>.05&&l0.hands[x].fingerScore&&l0.hands[x].fingerScore>(t.hand.minConfidence||0)){let f=it(i.box,bn),d=it(i.boxRaw,bn);l0.boxes.push({...c[x],box:f,boxRaw:d})}}for(let x=0;xM()-Rn;return t.skipAllowed&&s&&r&&Pn===o&&W5[n]?(kn++,W5[n]):new Promise(async l=>{var x;let c=[];if(((x=t.face.insightface)==null?void 0:x.enabled)&&(H0==null?void 0:H0.inputs[0].shape)){let i={};i.crop=vt.image.resizeBilinear(e,[H0.inputs[0].shape[2],H0.inputs[0].shape[1]],!1),i.data=H0.execute(i.crop);let f=await i.data.data();c=Array.from(f),Object.keys(i).forEach(d=>vt.dispose(i[d]))}W5[n]=c,Pn=o,Rn=M(),l(c)})}var Rt=D(V());var T0,Pt=[],G5=Number.MAX_SAFE_INTEGER,zn=0,Sn=0;async function jn(e){var t;return k.initial&&(T0=null),T0?e.debug&&h("cached model:",T0.modelUrl):T0=await C((t=e.face.liveness)==null?void 0:t.modelPath),T0}async function B5(e,t,n,o){var A,a;if(!(T0!=null&&T0.executor))return 0;let r=(((A=t.face.liveness)==null?void 0:A.skipTime)||0)>M()-Sn,s=G5<(((a=t.face.liveness)==null?void 0:a.skipFrames)||0);return t.skipAllowed&&r&&s&&zn===o&&Pt[n]?(G5++,Pt[n]):(G5=0,new Promise(async l=>{let c=Rt.image.resizeBilinear(e,[T0!=null&&T0.inputs[0].shape?T0.inputs[0].shape[2]:0,T0!=null&&T0.inputs[0].shape?T0.inputs[0].shape[1]:0],!1),x=T0==null?void 0:T0.execute(c),i=(await x.data())[0];Pt[n]=Math.round(100*i)/100,zn=o,Sn=M(),Rt.dispose([c,x]),l(Pt[n])}))}var o0=D(V());var w0;async function H5(e){return!w0||k.initial?w0=await C(e.segmentation.modelPath):e.debug&&h("cached model:",w0.modelUrl),w0}async function On(e,t){var r;if(w0||(w0=await H5(t)),!(w0!=null&&w0.executor)||!((r=w0==null?void 0:w0.inputs)!=null&&r[0].shape))return null;let n={};n.resize=o0.image.resizeBilinear(e,[w0.inputs[0].shape?w0.inputs[0].shape[1]:0,w0.inputs[0].shape?w0.inputs[0].shape[2]:0],!1),n.norm=o0.div(n.resize,W.tf255),n.res=w0.execute(n.norm),n.squeeze=o0.squeeze(n.res,0),[n.bgRaw,n.fgRaw]=o0.unstack(n.squeeze,2),n.fg=o0.softmax(n.fgRaw),n.mul=o0.mul(n.fg,W.tf255),n.expand=o0.expandDims(n.mul,2),n.output=o0.image.resizeBilinear(n.expand,[e.shape[1],e.shape[2]]);let o;switch(t.segmentation.mode||"default"){case"default":n.input=o0.squeeze(e),n.concat=o0.concat([n.input,n.output],-1),o=o0.cast(n.concat,"int32");break;case"alpha":o=o0.cast(n.output,"int32");break;default:o=o0.tensor(0)}return Object.keys(n).forEach(s=>o0.dispose(n[s])),o}var kt=D(V());var V0,V5=[],Cn=0,Ln=0,Wn=Number.MAX_SAFE_INTEGER;async function Fn(e){var t;return k.initial&&(V0=null),V0?e.debug&&h("cached model:",V0.modelUrl):V0=await C((t=e.face.mobilefacenet)==null?void 0:t.modelPath),V0}async function D5(e,t,n,o){var A,a;if(!(V0!=null&&V0.executor))return[];let r=Wn<(((A=t.face.mobilefacenet)==null?void 0:A.skipFrames)||0),s=(((a=t.face.mobilefacenet)==null?void 0:a.skipTime)||0)>M()-Ln;return t.skipAllowed&&s&&r&&Cn===o&&V5[n]?(Wn++,V5[n]):new Promise(async l=>{var x;let c=[];if(((x=t.face.mobilefacenet)==null?void 0:x.enabled)&&(V0==null?void 0:V0.inputs[0].shape)){let i={};i.crop=kt.image.resizeBilinear(e,[V0.inputs[0].shape[2],V0.inputs[0].shape[1]],!1),i.data=V0.execute(i.crop);let f=await i.data.data();c=Array.from(f),Object.keys(i).forEach(d=>kt.dispose(i[d]))}V5[n]=c,Cn=o,Ln=M(),l(c)})}var Zn=D(V());var G2={};we(G2,{connected:()=>Et,horizontal:()=>Z5,kpt:()=>wt,relative:()=>q5,vertical:()=>X5});var wt=["nose","leftEye","rightEye","leftEar","rightEar","leftShoulder","rightShoulder","leftElbow","rightElbow","leftWrist","rightWrist","leftHip","rightHip","leftKnee","rightKnee","leftAnkle","rightAnkle"],Z5=[["leftEye","rightEye"],["leftEar","rightEar"],["leftShoulder","rightShoulder"],["leftElbow","rightElbow"],["leftWrist","rightWrist"],["leftHip","rightHip"],["leftKnee","rightKnee"],["leftAnkle","rightAnkle"]],X5=[["leftKnee","leftShoulder"],["rightKnee","rightShoulder"],["leftAnkle","leftKnee"],["rightAnkle","rightKnee"]],q5=[[["leftHip","rightHip"],["leftShoulder","rightShoulder"]],[["leftElbow","rightElbow"],["leftShoulder","rightShoulder"]]],Et={leftLeg:["leftHip","leftKnee","leftAnkle"],rightLeg:["rightHip","rightKnee","rightAnkle"],torso:["leftShoulder","rightShoulder","rightHip","leftHip","leftShoulder"],leftArm:["leftShoulder","leftElbow","leftWrist"],rightArm:["rightShoulder","rightElbow","rightWrist"],head:[]};var Ze=D(V()),Bn=.005,D0={keypoints:[],padding:[[0,0],[0,0],[0,0],[0,0]]};function U5(e){for(let t of Z5){let n=e.keypoints.findIndex(r=>r.part===t[0]),o=e.keypoints.findIndex(r=>r.part===t[1]);if(e.keypoints[n]&&e.keypoints[o]&&e.keypoints[n].position[0]r&&r.part===t[0]),o=e.keypoints.findIndex(r=>r&&r.part===t[1]);e.keypoints[n]&&e.keypoints[o]&&e.keypoints[n].position[1]c&&c.part===t[0]),r=e.keypoints.findIndex(c=>c&&c.part===t[1]),s=e.keypoints.findIndex(c=>c&&c.part===n[0]),A=e.keypoints.findIndex(c=>c&&c.part===n[1]);if(!e.keypoints[s]||!e.keypoints[A])continue;let a=e.keypoints[o]?[Math.abs(e.keypoints[s].position[0]-e.keypoints[o].position[0]),Math.abs(e.keypoints[A].position[0]-e.keypoints[o].position[0])]:[0,0],l=e.keypoints[r]?[Math.abs(e.keypoints[A].position[0]-e.keypoints[r].position[0]),Math.abs(e.keypoints[s].position[0]-e.keypoints[r].position[0])]:[0,0];if(a[0]>a[1]||l[0]>l[1]){let c=e.keypoints[o];e.keypoints[o]=e.keypoints[r],e.keypoints[r]=c}}}function Hn(e){for(let t=0;te.shape[1]?Math.trunc((e.shape[2]-e.shape[1])/2):0,e.shape[2]>e.shape[1]?Math.trunc((e.shape[2]-e.shape[1])/2):0],[e.shape[1]>e.shape[2]?Math.trunc((e.shape[1]-e.shape[2])/2):0,e.shape[1]>e.shape[2]?Math.trunc((e.shape[1]-e.shape[2])/2):0],[0,0]],n.pad=Ze.pad(e,D0.padding),n.resize=Ze.image.resizeBilinear(n.pad,[t,t]);let o=Ze.cast(n.resize,"int32");return Object.keys(n).forEach(A=>Ze.dispose(n[A])),o}function Dn(e,t){e.keypoints=e.keypoints.filter(o=>o==null?void 0:o.position);for(let o of e.keypoints)o.position=[o.position[0]*(t[0]+D0.padding[2][0]+D0.padding[2][1])/t[0]-D0.padding[2][0],o.position[1]*(t[1]+D0.padding[1][0]+D0.padding[1][1])/t[1]-D0.padding[1][0]],o.positionRaw=[o.position[0]/t[0],o.position[1]/t[1]];let n=be(e.keypoints.map(o=>o.position),t);return e.box=n.box,e.boxRaw=n.boxRaw,e}var m0,zt=0,Y5=Number.MAX_SAFE_INTEGER,o2={boxes:[],bodies:[],last:0};async function Xn(e){var t;return k.initial&&(m0=null),m0?e.debug&&h("cached model:",m0.modelUrl):(Tt(["size"],e),m0=await C(e.body.modelPath)),zt=(m0==null?void 0:m0.executor)&&((t=m0==null?void 0:m0.inputs)==null?void 0:t[0].shape)?m0.inputs[0].shape[2]:0,zt<64&&(zt=256),m0}function hA(e,t,n){let o=e[0][0],r=[],s=0;for(let x=0;xt.body.minConfidence){let i=[o[x][1],o[x][0]];r.push({score:Math.round(100*s)/100,part:wt[x],positionRaw:i,position:[Math.round((n.shape[2]||0)*i[0]),Math.round((n.shape[1]||0)*i[1])]})}s=r.reduce((x,i)=>i.score>x?i.score:x,0);let A=[],a=be(r.map(x=>x.position),[n.shape[2],n.shape[1]]),l={};for(let[x,i]of Object.entries(Et)){let f=[];for(let d=0;dg.part===i[d]),p=r.find(g=>g.part===i[d+1]);m&&p&&m.score>(t.body.minConfidence||0)&&p.score>(t.body.minConfidence||0)&&f.push([m.position,p.position])}l[x]=f}let c={id:0,score:s,box:a.box,boxRaw:a.boxRaw,keypoints:r,annotations:l};return U5(c),A.push(c),A}function bA(e,t,n){let o=[];for(let r=0;rt.body.minConfidence){let a=[];for(let i=0;i<17;i++){let f=s[3*i+2];if(f>t.body.minConfidence){let d=[s[3*i+1],s[3*i+0]];a.push({part:wt[i],score:Math.round(100*f)/100,positionRaw:d,position:[Math.round((n.shape[2]||0)*d[0]),Math.round((n.shape[1]||0)*d[1])]})}}let l=be(a.map(i=>i.position),[n.shape[2],n.shape[1]]),c={};for(let[i,f]of Object.entries(Et)){let d=[];for(let m=0;mv.part===f[m]),g=a.find(v=>v.part===f[m+1]);p&&g&&p.score>(t.body.minConfidence||0)&&g.score>(t.body.minConfidence||0)&&d.push([p.position,g.position])}c[i]=d}let x={id:r,score:A,box:l.box,boxRaw:l.boxRaw,keypoints:[...a],annotations:c};U5(x),o.push(x)}}return o.sort((r,s)=>s.score-r.score),o.length>t.body.maxDetected&&(o.length=t.body.maxDetected),o}async function K5(e,t){var r;if(!(m0!=null&&m0.executor)||!((r=m0==null?void 0:m0.inputs)!=null&&r[0].shape))return[];t.skipAllowed||(o2.boxes.length=0),Y5++;let n=(t.body.skipTime||0)>M()-o2.last,o=Y5<(t.body.skipFrames||0);return t.skipAllowed&&n&&o?o2.bodies:new Promise(async s=>{let A={};Y5=0,A.input=Vn(e,zt),A.res=m0==null?void 0:m0.execute(A.input),o2.last=M();let a=await A.res.array();o2.bodies=A.res.shape[2]===17?hA(a,t,e):bA(a,t,e);for(let l of o2.bodies)Dn(l,[e.shape[2]||1,e.shape[1]||1]),Hn(l.keypoints);Object.keys(A).forEach(l=>Zn.dispose(A[l])),s(o2.bodies)})}var Z0=D(V());var oe,St=[],Un=0,J5=Number.MAX_SAFE_INTEGER,Nt=0,jt=2.5;async function Yn(e){if(!oe||k.initial){oe=await C(e.object.modelPath);let t=oe!=null&&oe.executor?Object.values(oe.modelSignature.inputs):void 0;Nt=Array.isArray(t)?parseInt(t[0].tensorShape.dim[2].size):416}else e.debug&&h("cached model:",oe.modelUrl);return oe}async function gA(e,t,n){let o=0,r=[],s=Nt;for(let c of[1,2,4]){let x=c*13,i=Z0.squeeze(e.find(v=>v.shape[1]===x**2&&(v.shape[2]||0)===x2.length)),f=await i.array(),d=Z0.squeeze(e.find(v=>v.shape[1]===x**2&&(v.shape[2]||0)(n.object.minConfidence||0)&&T!==61){let b=(.5+Math.trunc(v%x))/x,z=(.5+Math.trunc(v/x))/x,w=g[v].map(G=>G*(x/c/s)),[O,q]=[b-jt/c*w[0],z-jt/c*w[1]],[t0,Z]=[b+jt/c*w[2]-O,z+jt/c*w[3]-q],U=[O,q,t0,Z];U=U.map(G=>Math.max(0,Math.min(G,1)));let r0=[U[0]*t[0],U[1]*t[1],U[2]*t[0],U[3]*t[1]],P={id:o++,score:Math.round(100*y)/100,class:T+1,label:x2[T].label,box:r0.map(G=>Math.trunc(G)),boxRaw:U};r.push(P)}}Z0.dispose([i,d,m,p])}let A=r.map(c=>[c.boxRaw[1],c.boxRaw[0],c.boxRaw[3],c.boxRaw[2]]),a=r.map(c=>c.score),l=[];if(A&&A.length>0){let c=await Z0.image.nonMaxSuppressionAsync(A,a,n.object.maxDetected,n.object.iouThreshold,n.object.minConfidence);l=await c.data(),Z0.dispose(c)}return r=r.filter((c,x)=>l.includes(x)).sort((c,x)=>x.score-c.score),r}async function Q5(e,t){if(!(oe!=null&&oe.executor))return[];let n=(t.object.skipTime||0)>M()-Un,o=J5<(t.object.skipFrames||0);return t.skipAllowed&&n&&o&&St.length>0?(J5++,St):(J5=0,!k.kernels.includes("mod")||!k.kernels.includes("sparsetodense")?St:new Promise(async r=>{let s=[e.shape[2]||0,e.shape[1]||0],A=Z0.image.resizeBilinear(e,[Nt,Nt],!1),a=Z0.div(A,W.tf255),l=Z0.transpose(a,[0,3,1,2]),c;t.object.enabled&&(c=oe.execute(l)),Un=M();let x=await gA(c,s,t);St=x,Z0.dispose([A,a,l,...c]),r(x)}))}var C0=D(V());var H2=["nose","leftEye","rightEye","leftEar","rightEar","leftShoulder","rightShoulder","leftElbow","rightElbow","leftWrist","rightWrist","leftHip","rightHip","leftKnee","rightKnee","leftAnkle","rightAnkle"],MA=H2.length,B2=H2.reduce((e,t,n)=>(e[t]=n,e),{}),TA=[["leftHip","leftShoulder"],["leftElbow","leftShoulder"],["leftElbow","leftWrist"],["leftHip","leftKnee"],["leftKnee","leftAnkle"],["rightHip","rightShoulder"],["rightElbow","rightShoulder"],["rightElbow","rightWrist"],["rightHip","rightKnee"],["rightKnee","rightAnkle"],["leftShoulder","rightShoulder"],["leftHip","rightHip"]],e4=TA.map(([e,t])=>[B2[e],B2[t]]),Jn=[["nose","leftEye"],["leftEye","leftEar"],["nose","rightEye"],["rightEye","rightEar"],["nose","leftShoulder"],["leftShoulder","leftElbow"],["leftElbow","leftWrist"],["leftShoulder","leftHip"],["leftHip","leftKnee"],["leftKnee","leftAnkle"],["nose","rightShoulder"],["rightShoulder","rightElbow"],["rightElbow","rightWrist"],["rightShoulder","rightHip"],["rightHip","rightKnee"],["rightKnee","rightAnkle"]];function Qn(e){let t=e.reduce(({maxX:n,maxY:o,minX:r,minY:s},{position:{x:A,y:a}})=>({maxX:Math.max(n,A),maxY:Math.max(o,a),minX:Math.min(r,A),minY:Math.min(s,a)}),{maxX:Number.NEGATIVE_INFINITY,maxY:Number.NEGATIVE_INFINITY,minX:Number.POSITIVE_INFINITY,minY:Number.POSITIVE_INFINITY});return[t.minX,t.minY,t.maxX-t.minX,t.maxY-t.minY]}function _n(e,[t,n],[o,r]){let s=t/o,A=n/r,a=(c,x)=>({id:x,score:c.score,boxRaw:[c.box[0]/r,c.box[1]/o,c.box[2]/r,c.box[3]/o],box:[Math.trunc(c.box[0]*A),Math.trunc(c.box[1]*s),Math.trunc(c.box[2]*A),Math.trunc(c.box[3]*s)],keypoints:c.keypoints.map(({score:i,part:f,position:d})=>({score:i,part:f,position:[Math.trunc(d.x*A),Math.trunc(d.y*s)],positionRaw:[d.x/o,d.y/o]})),annotations:{}});return e.map((c,x)=>a(c,x))}var Ot=class{constructor(t,n){R(this,"priorityQueue");R(this,"numberOfElements");R(this,"getElementValue");this.priorityQueue=new Array(t),this.numberOfElements=-1,this.getElementValue=n}enqueue(t){this.priorityQueue[++this.numberOfElements]=t,this.swim(this.numberOfElements)}dequeue(){let t=this.priorityQueue[0];return this.exchange(0,this.numberOfElements--),this.sink(0),this.priorityQueue[this.numberOfElements+1]=null,t}empty(){return this.numberOfElements===-1}size(){return this.numberOfElements+1}all(){return this.priorityQueue.slice(0,this.numberOfElements+1)}max(){return this.priorityQueue[0]}swim(t){for(;t>0&&this.less(Math.floor(t/2),t);)this.exchange(t,Math.floor(t/2)),t=Math.floor(t/2)}sink(t){for(;2*t<=this.numberOfElements;){let n=2*t;if(nn?n:e}function $n(e,t,n,o){let r=n-e,s=o-t;return r*r+s*s}function t1(e,t){return{x:e.x+t.x,y:e.y+t.y}}var X0,PA=["MobilenetV1/offset_2/BiasAdd","MobilenetV1/heatmap_2/BiasAdd","MobilenetV1/displacement_fwd_2/BiasAdd","MobilenetV1/displacement_bwd_2/BiasAdd"],It=1,h2=16,RA=50**2;function eo(e,t,n,o,r,s,A=2){let a=v=>({y:s.get(v.y,v.x,e),x:s.get(v.y,v.x,s.shape[2]/2+e)}),l=(v,T,y)=>({y:e1(Math.round(v.y/h2),0,T-1),x:e1(Math.round(v.x/h2),0,y-1)}),[c,x]=o.shape,i=l(t.position,c,x),f=a(i),m=t1(t.position,f);for(let v=0;v[B2[f],B2[d]]),A=s.map(([,f])=>f),a=s.map(([f])=>f),l=t.shape[2],c=A.length,x=new Array(l),i=$5(e.part,h2,n);x[e.part.id]={score:e.score,part:H2[e.part.id],position:i};for(let f=c-1;f>=0;--f){let d=A[f],m=a[f];x[d]&&!x[m]&&(x[m]=eo(f,x[d],m,t,n,r))}for(let f=0;ft){a=!1;break}if(!a)break}return a}function EA(e,t){let[n,o,r]=t.shape,s=new Ot(n*o*r,({score:A})=>A);for(let A=0;A{var A;let s=(A=r[o])==null?void 0:A.position;return s?$n(n,t,s.y,s.x)<=RA:!1})}function zA(e,t){return t.reduce((o,{position:r,score:s},A)=>(to(e,r,A)||(o+=s),o),0)/t.length}function SA(e,t,n,o,r,s){let A=[],a=EA(s,t);for(;A.lengthd.score>s);let i=zA(A,x),f=Qn(x);i>s&&A.push({keypoints:x,box:f,score:Math.round(100*i)/100})}return A}async function n1(e,t){if(!(X0!=null&&X0.executor))return[];let n=C0.tidy(()=>{if(!X0.inputs[0].shape)return[];let A=C0.image.resizeBilinear(e,[X0.inputs[0].shape[2],X0.inputs[0].shape[1]]),a=C0.sub(C0.div(C0.cast(A,"float32"),127.5),1),c=X0.execute(a,PA).map(x=>C0.squeeze(x,[0]));return c[1]=C0.sigmoid(c[1]),c}),o=await Promise.all(n.map(A=>A.buffer()));for(let A of n)C0.dispose(A);let r=SA(o[0],o[1],o[2],o[3],t.body.maxDetected,t.body.minConfidence);return X0.inputs[0].shape?_n(r,[e.shape[1],e.shape[2]],[X0.inputs[0].shape[2],X0.inputs[0].shape[1]]):[]}async function no(e){return!X0||k.initial?X0=await C(e.body.modelPath):e.debug&&h("cached model:",X0.modelUrl),X0}var B=D(V());var me,jA=["fgr","pha","r1o","r2o","r3o","r4o"],p0={},r1=0;function so(e){B.dispose([p0.r1i,p0.r2i,p0.r3i,p0.r4i,p0.downsample_ratio]),p0.r1i=B.tensor(0),p0.r2i=B.tensor(0),p0.r3i=B.tensor(0),p0.r4i=B.tensor(0),r1=e.segmentation.ratio||.5,p0.downsample_ratio=B.tensor(r1)}async function s1(e){return!me||k.initial?me=await C(e.segmentation.modelPath):e.debug&&h("cached model:",me.modelUrl),so(e),me}var ro=e=>B.tidy(()=>{let t=B.squeeze(e,[0]),n=B.mul(t,W.tf255);return B.cast(n,"int32")});function o1(e,t){let n=e?ro(e):B.fill([t.shape[1]||0,t.shape[2]||0,3],255,"int32"),o=t?ro(t):B.fill([e.shape[1]||0,e.shape[2]||0,1],255,"int32"),r=B.concat([n,o],-1);return B.dispose([n,o]),r}function NA(e){return B.tidy(()=>{let t={};return t.unstack=B.unstack(e,-1),t.concat=B.concat(t.unstack,1),t.split=B.split(t.concat,4,1),t.stack=B.concat(t.split,2),t.squeeze=B.squeeze(t.stack,[0]),t.expand=B.expandDims(t.squeeze,-1),t.add=B.add(t.expand,1),t.mul=B.mul(t.add,127.5),t.cast=B.cast(t.mul,"int32"),t.tile=B.tile(t.cast,[1,1,3]),t.alpha=B.fill([t.tile.shape[0]||0,t.tile.shape[1]||0,1],255,"int32"),B.concat([t.tile,t.alpha],-1)})}async function Ao(e,t){if(me||(me=await s1(t)),!(me!=null&&me.executor))return null;p0.src=B.div(e,255),r1!==t.segmentation.ratio&&so(t);let[n,o,r,s,A,a]=await me.executeAsync(p0,jA),l;switch(t.segmentation.mode||"default"){case"default":l=o1(n,o);break;case"alpha":l=o1(null,o);break;case"foreground":l=o1(n,null);break;case"state":l=NA(r);break;default:l=B.tensor(0)}return B.dispose([p0.src,n,o,p0.r1i,p0.r2i,p0.r3i,p0.r4i]),[p0.r1i,p0.r2i,p0.r3i,p0.r4i]=[r,s,A,a],l}var v0=D(V());var E0;async function A1(e){return!E0||k.initial?E0=await C(e.segmentation.modelPath):e.debug&&h("cached model:",E0.modelUrl),E0}async function io(e,t){var r;if(E0||(E0=await A1(t)),!(E0!=null&&E0.executor)||!((r=E0==null?void 0:E0.inputs)!=null&&r[0].shape))return null;let n={};n.resize=v0.image.resizeBilinear(e,[E0.inputs[0].shape?E0.inputs[0].shape[1]:0,E0.inputs[0].shape?E0.inputs[0].shape[2]:0],!1),n.norm=v0.div(n.resize,W.tf255),n.res=E0.execute(n.norm),n.squeeze=v0.squeeze(n.res,0),n.alpha=v0.image.resizeBilinear(n.squeeze,[e.shape[1],e.shape[2]]),n.mul=v0.mul(n.alpha,W.tf255);let o;switch(t.segmentation.mode||"default"){case"default":n.input=v0.squeeze(e),n.concat=v0.concat([n.input,n.mul],-1),o=v0.cast(n.concat,"int32");break;case"alpha":o=v0.cast(n.mul,"int32");break;default:o=v0.tensor(0)}return Object.keys(n).forEach(s=>v0.dispose(n[s])),o}var b2=D(V());var q0,Ct=[],co=0,xo=0,a1=Number.MAX_SAFE_INTEGER;async function yo(e){return k.initial&&(q0=null),q0?e.debug&&h("cached model:",q0.modelUrl):q0=await C(e.face.ssrnet.modelPathAge),q0}async function i1(e,t,n,o){var A,a,l,c;if(!q0)return{age:0};let r=a1<(((A=t.face.ssrnet)==null?void 0:A.skipFrames)||0),s=(((a=t.face.ssrnet)==null?void 0:a.skipTime)||0)>M()-xo;return t.skipAllowed&&r&&s&&co===o&&((l=Ct[n])==null?void 0:l.age)&&((c=Ct[n])==null?void 0:c.age)>0?(a1++,Ct[n]):(a1=0,new Promise(async x=>{var d;if(!(q0!=null&&q0.inputs)||!q0.inputs[0]||!q0.inputs[0].shape)return;let i={};i.resize=b2.image.resizeBilinear(e,[q0.inputs[0].shape[2],q0.inputs[0].shape[1]],!1),i.enhance=b2.mul(i.resize,W.tf255);let f={age:0};if((d=t.face.ssrnet)!=null&&d.enabled&&(i.age=q0.execute(i.enhance)),i.age){let m=await i.age.data();f.age=Math.trunc(10*m[0])/10}Object.keys(i).forEach(m=>b2.dispose(i[m])),Ct[n]=f,co=o,xo=M(),x(f)}))}var z0=D(V());var re,Lt=[],mo=0,po=0,l1=Number.MAX_SAFE_INTEGER,c1=[.2989,.587,.114];async function uo(e){var t;return k.initial&&(re=null),re?e.debug&&h("cached model:",re.modelUrl):re=await C((t=e.face.ssrnet)==null?void 0:t.modelPathGender),re}async function d1(e,t,n,o){var A,a,l,c;if(!re)return{gender:"unknown",genderScore:0};let r=l1<(((A=t.face.ssrnet)==null?void 0:A.skipFrames)||0),s=(((a=t.face.ssrnet)==null?void 0:a.skipTime)||0)>M()-po;return t.skipAllowed&&r&&s&&mo===o&&((l=Lt[n])==null?void 0:l.gender)&&((c=Lt[n])==null?void 0:c.genderScore)>0?(l1++,Lt[n]):(l1=0,new Promise(async x=>{var m;if(!(re!=null&&re.inputs[0].shape))return;let i={};i.resize=z0.image.resizeBilinear(e,[re.inputs[0].shape[2],re.inputs[0].shape[1]],!1),i.enhance=z0.tidy(()=>{let[p,g,v]=z0.split(i.resize,3,3),T=z0.mul(p,c1[0]),y=z0.mul(g,c1[1]),b=z0.mul(v,c1[2]),z=z0.addN([T,y,b]);return z0.mul(z0.sub(z,W.tf05),2)});let f={gender:"unknown",genderScore:0};(m=t.face.ssrnet)!=null&&m.enabled&&(i.gender=re.execute(i.enhance));let d=await i.gender.data();f.gender=d[0]>d[1]?"female":"male",f.genderScore=d[0]>d[1]?Math.trunc(100*d[0])/100:Math.trunc(100*d[1])/100,Object.keys(i).forEach(p=>z0.dispose(i[p])),Lt[n]=f,mo=o,po=M(),x(f)}))}var V2=class{constructor(){R(this,"ssrnetage",null);R(this,"gear",null);R(this,"blazeposedetect",null);R(this,"blazepose",null);R(this,"centernet",null);R(this,"efficientpose",null);R(this,"mobilefacenet",null);R(this,"insightface",null);R(this,"emotion",null);R(this,"facedetect",null);R(this,"faceiris",null);R(this,"facemesh",null);R(this,"faceres",null);R(this,"ssrnetgender",null);R(this,"handpose",null);R(this,"handskeleton",null);R(this,"handtrack",null);R(this,"liveness",null);R(this,"meet",null);R(this,"movenet",null);R(this,"nanodet",null);R(this,"posenet",null);R(this,"selfie",null);R(this,"rvm",null);R(this,"antispoof",null)}},u,x1=e=>{e&&(u=e),u||h("instance not registred");let t=0,n=0,o=0;for(let s of Object.values(ee))t+=s.sizeFromManifest,n+=s.sizeLoadedWeights,o+=s.sizeDesired;let r=o>0?n/o:0;return{numLoadedModels:Object.values(ee).length,numDefinedModels:Object.keys(u.models).length,percentageLoaded:r,totalSizeFromManifest:t,totalSizeWeights:n,totalSizeLoading:o,totalSizeEnabled:void 0,modelStats:Object.values(ee)}};function Wt(e){e&&(u=e);for(let t of Object.keys(u.models))u.models[t]=null}async function y1(e){var t,n,o,r,s,A,a,l,c,x,i,f,d,m,p,g,v,T,y,b,z,w,O,q,t0,Z,U,r0,P;e&&(u=e),u||h("instance not registred"),k.initial&&Wt(u),u.config.hand.enabled&&(!u.models.handpose&&((n=(t=u.config.hand.detector)==null?void 0:t.modelPath)==null?void 0:n.includes("handdetect"))&&([u.models.handpose,u.models.handskeleton]=await O5(u.config)),!u.models.handskeleton&&u.config.hand.landmarks&&((r=(o=u.config.hand.detector)==null?void 0:o.modelPath)==null?void 0:r.includes("handdetect"))&&([u.models.handpose,u.models.handskeleton]=await O5(u.config))),u.config.body.enabled&&!u.models.blazepose&&((s=u.config.body.modelPath)==null?void 0:s.includes("blazepose"))&&(u.models.blazepose=u3(u.config)),u.config.body.enabled&&!u.models.blazeposedetect&&u.config.body.detector&&u.config.body.detector.modelPath&&(u.models.blazeposedetect=p3(u.config)),u.config.body.enabled&&!u.models.efficientpose&&((A=u.config.body.modelPath)==null?void 0:A.includes("efficientpose"))&&(u.models.efficientpose=v3(u.config)),u.config.body.enabled&&!u.models.movenet&&((a=u.config.body.modelPath)==null?void 0:a.includes("movenet"))&&(u.models.movenet=Xn(u.config)),u.config.body.enabled&&!u.models.posenet&&((l=u.config.body.modelPath)==null?void 0:l.includes("posenet"))&&(u.models.posenet=no(u.config)),u.config.face.enabled&&!u.models.facedetect&&(u.models.facedetect=a3(u.config)),u.config.face.enabled&&((c=u.config.face.antispoof)==null?void 0:c.enabled)&&!u.models.antispoof&&(u.models.antispoof=U1(u.config)),u.config.face.enabled&&((x=u.config.face.liveness)==null?void 0:x.enabled)&&!u.models.liveness&&(u.models.liveness=jn(u.config)),u.config.face.enabled&&((i=u.config.face.description)==null?void 0:i.enabled)&&!u.models.faceres&&(u.models.faceres=D3(u.config)),u.config.face.enabled&&((f=u.config.face.emotion)==null?void 0:f.enabled)&&!u.models.emotion&&(u.models.emotion=w3(u.config)),u.config.face.enabled&&((d=u.config.face.iris)==null?void 0:d.enabled)&&!((m=u.config.face.attention)!=null&&m.enabled)&&!u.models.faceiris&&(u.models.faceiris=N3(u.config)),u.config.face.enabled&&((p=u.config.face.mesh)==null?void 0:p.enabled)&&!u.models.facemesh&&(u.models.facemesh=F3(u.config)),u.config.face.enabled&&((g=u.config.face.gear)==null?void 0:g.enabled)&&!u.models.gear&&(u.models.gear=q3(u.config)),u.config.face.enabled&&((v=u.config.face.ssrnet)==null?void 0:v.enabled)&&!u.models.ssrnetage&&(u.models.ssrnetage=yo(u.config)),u.config.face.enabled&&((T=u.config.face.ssrnet)==null?void 0:T.enabled)&&!u.models.ssrnetgender&&(u.models.ssrnetgender=uo(u.config)),u.config.face.enabled&&((y=u.config.face.mobilefacenet)==null?void 0:y.enabled)&&!u.models.mobilefacenet&&(u.models.mobilefacenet=Fn(u.config)),u.config.face.enabled&&((b=u.config.face.insightface)==null?void 0:b.enabled)&&!u.models.insightface&&(u.models.insightface=wn(u.config)),u.config.hand.enabled&&!u.models.handtrack&&((w=(z=u.config.hand.detector)==null?void 0:z.modelPath)==null?void 0:w.includes("handtrack"))&&(u.models.handtrack=Mn(u.config)),u.config.hand.enabled&&u.config.hand.landmarks&&!u.models.handskeleton&&((q=(O=u.config.hand.detector)==null?void 0:O.modelPath)==null?void 0:q.includes("handtrack"))&&(u.models.handskeleton=Tn(u.config)),u.config.object.enabled&&!u.models.centernet&&((t0=u.config.object.modelPath)==null?void 0:t0.includes("centernet"))&&(u.models.centernet=g3(u.config)),u.config.object.enabled&&!u.models.nanodet&&((Z=u.config.object.modelPath)==null?void 0:Z.includes("nanodet"))&&(u.models.nanodet=Yn(u.config)),u.config.segmentation.enabled&&!u.models.selfie&&((U=u.config.segmentation.modelPath)==null?void 0:U.includes("selfie"))&&(u.models.selfie=A1(u.config)),u.config.segmentation.enabled&&!u.models.meet&&((r0=u.config.segmentation.modelPath)==null?void 0:r0.includes("meet"))&&(u.models.meet=H5(u.config)),u.config.segmentation.enabled&&!u.models.rvm&&((P=u.config.segmentation.modelPath)==null?void 0:P.includes("rvm"))&&(u.models.rvm=s1(u.config));for await(let G of Object.keys(u.models))u.models[G]&&typeof u.models[G]!="undefined"&&(u.models[G]=await u.models[G])}function Ft(e,t,n){var c,x;if(!t||(e&&(u=e),u||h("instance not registred"),!((c=u==null?void 0:u.config)!=null&&c.validateModels)))return null;let o=["const","placeholder","noop","pad","squeeze","add","sub","mul","div"],r=["biasadd","fusedbatchnormv3","matmul","switch","shape","merge","split","broadcastto"],s=[],A=[],a=t.modelUrl,l=t.executor;if((x=l==null?void 0:l.graph)!=null&&x.nodes)for(let i of Object.values(l.graph.nodes)){let f=i.op.toLowerCase();s.includes(f)||s.push(f)}else!l&&u.config.debug&&h("model not loaded",n);for(let i of s)!o.includes(i)&&!r.includes(i)&&!u.env.kernels.includes(i)&&!u.env.kernels.includes(i.replace("_",""))&&!u.env.kernels.includes(i.replace("native",""))&&!u.env.kernels.includes(i.replace("v2",""))&&A.push(i);return u.config.debug&&A.length>0&&h("model validation failed:",n,A),A.length>0?{name:n,missing:A,ops:s,url:a}:null}function Gt(e){e&&(u=e),u||h("instance not registred");let t=[];for(let n of Object.keys(e.models)){let o=e.models[n];if(!o)continue;let r=Ft(e,o,n);r&&t.push(r)}return t}var $={name:"humangl",priority:999,canvas:null,gl:null,extensions:[],webGLattr:{alpha:!1,antialias:!1,premultipliedAlpha:!1,preserveDrawingBuffer:!1,depth:!1,stencil:!1,failIfMajorPerformanceCaveat:!1,desynchronized:!0}};function OA(){let e=$.gl;!e||($.extensions=e.getSupportedExtensions())}function bo(e){var t;if(e.config.backend==="humangl"&&($.name in d0.engine().registry&&!((t=$==null?void 0:$.gl)!=null&&t.getParameter($.gl.VERSION))&&(h("humangl error: backend invalid context"),Wt(e)),!d0.findBackend($.name))){try{$.canvas=$0(100,100)}catch(o){h("humangl error: cannot create canvas:",o);return}try{if($.gl=$.canvas.getContext("webgl2",$.webGLattr),!$.gl){h("humangl error: cannot get webgl context");return}if(!$.gl.getParameter($.gl.VERSION).includes("2.0")){h("backend override: using fallback webgl backend as webgl 2.0 is not detected"),e.config.backend="webgl";return}$.canvas&&($.canvas.addEventListener("webglcontextlost",r=>{throw h("humangl error:",r.type),h("possible browser memory leak using webgl or conflict with multiple backend registrations"),e.emit("error"),new Error("backend error: webgl context lost")}),$.canvas.addEventListener("webglcontextrestored",r=>{h("humangl error: context restored:",r)}),$.canvas.addEventListener("webglcontextcreationerror",r=>{h("humangl error: context create:",r)}))}catch(o){h("humangl error: cannot get webgl context:",o);return}try{d0.setWebGLContext(2,$.gl)}catch(o){h("humangl error: cannot set webgl context:",o);return}try{let o=new d0.GPGPUContext($.gl);d0.registerBackend($.name,()=>new d0.MathBackendWebGL(o),$.priority)}catch(o){h("humangl error: cannot register webgl backend:",o);return}try{d0.getKernelsForBackend("webgl").forEach(r=>{let s={...r,backendName:$.name};d0.registerKernel(s)})}catch(o){h("humangl error: cannot update webgl backend registration:",o);return}try{d0.env().flagRegistry.WEBGL_VERSION&&d0.env().set("WEBGL_VERSION",2)}catch(o){h("humangl error: cannot set WebGL backend flags:",o);return}OA();let n=d0.backend().getGPGPUContext?d0.backend().getGPGPUContext().gl:null;n?e.config.debug&&h("humangl backend registered:",{webgl:n.getParameter(n.VERSION),renderer:n.getParameter(n.RENDERER)}):h("humangl error: no current gl context:",n,$.gl)}}var S=D(V());function IA(e){let t=[];if(!k.kernels.includes("mod")){let n={kernelName:"Mod",backendName:S.getBackend(),kernelFunc:o=>S.tidy(()=>S.sub(o.inputs.a,S.mul(S.div(o.inputs.a,o.inputs.b),o.inputs.b)))};S.registerKernel(n),k.kernels.push("mod"),t.push("mod")}if(!k.kernels.includes("floormod")){let n={kernelName:"FloorMod",backendName:S.getBackend(),kernelFunc:o=>S.tidy(()=>S.add(S.mul(S.floorDiv(o.inputs.a/o.inputs.b),o.inputs.b),S.mod(o.inputs.a,o.inputs.b)))};S.registerKernel(n),k.kernels.push("floormod"),t.push("floormod")}if(!k.kernels.includes("rotatewithoffset")&&e.softwareKernels){let n={kernelName:"RotateWithOffset",backendName:S.getBackend(),kernelFunc:o=>S.tidy(()=>{let r=S.getBackend();S.setBackend("cpu");let s=S.image.rotateWithOffset(o.inputs.image,o.attrs.radians,o.attrs.fillValue,o.attrs.center);return S.setBackend(r),s})};S.registerKernel(n),k.kernels.push("rotatewithoffset"),t.push("rotatewithoffset")}t.length>0&&e.debug&&h("registered kernels:",t)}var Mo={};async function D2(e,t=!1){if(e.state="backend",t||k.initial||e.config.backend&&e.config.backend.length>0&&S.getBackend()!==e.config.backend){let n=M();if(e.config.backend&&e.config.backend.length>0){if(typeof window=="undefined"&&typeof WorkerGlobalScope!="undefined"&&e.config.debug&&e.config.debug&&h("running inside web worker"),k.browser&&e.config.backend==="tensorflow"&&(e.config.debug&&h("override: backend set to tensorflow while running in browser"),e.config.backend="webgl"),k.node&&(e.config.backend==="webgl"||e.config.backend==="humangl")&&(e.config.debug&&h(`override: backend set to ${e.config.backend} while running in nodejs`),e.config.backend="tensorflow"),k.browser&&e.config.backend==="webgpu")if(typeof navigator=="undefined"||typeof navigator.gpu=="undefined")h("override: backend set to webgpu but browser does not support webgpu"),e.config.backend="webgl";else{let r=await navigator.gpu.requestAdapter();if(e.config.debug&&h("enumerated webgpu adapter:",r),!r)h("override: backend set to webgpu but browser reports no available gpu"),e.config.backend="webgl";else{let s="requestAdapterInfo"in r?await r.requestAdapterInfo():void 0;h("webgpu adapter info:",s)}}let o=Object.keys(S.engine().registryFactory);if(e.config.backend==="humangl"&&!o.includes("humangl")&&(bo(e),o=Object.keys(S.engine().registryFactory)),e.config.debug&&h("available backends:",o),o.includes(e.config.backend)||(h(`error: backend ${e.config.backend} not found in registry`),e.config.backend=k.node?"tensorflow":"webgl",e.config.debug&&h(`override: setting backend ${e.config.backend}`)),e.config.debug&&h("setting backend:",[e.config.backend]),e.config.backend==="wasm"){if(S.env().flagRegistry.CANVAS2D_WILL_READ_FREQUENTLY&&S.env().set("CANVAS2D_WILL_READ_FREQUENTLY",!0),e.config.debug&&h("wasm path:",e.config.wasmPath),typeof S.setWasmPaths!="undefined")S.setWasmPaths(e.config.wasmPath,e.config.wasmPlatformFetch);else throw new Error("backend error: attempting to use wasm backend but wasm path is not set");let r=!1,s=!1;try{r=await S.env().getAsync("WASM_HAS_MULTITHREAD_SUPPORT"),s=await S.env().getAsync("WASM_HAS_SIMD_SUPPORT"),e.config.debug&&h(`wasm execution: ${s?"simd":"no simd"} ${r?"multithreaded":"singlethreaded"}`),e.config.debug&&!s&&h("warning: wasm simd support is not enabled")}catch(A){h("wasm detection failed")}}try{await S.setBackend(e.config.backend),await S.ready()}catch(r){return h("error: cannot set backend:",e.config.backend,r),!1}e.config.debug&&(Mo=JSON.parse(JSON.stringify(S.env().flags)))}if((S.getBackend()==="humangl"||S.getBackend()==="webgl")&&(S.env().flagRegistry.WEBGL_USE_SHAPES_UNIFORMS&&S.env().set("WEBGL_USE_SHAPES_UNIFORMS",!0),S.env().flagRegistry.WEBGL_EXP_CONV&&S.env().set("WEBGL_EXP_CONV",!0),e.config.debug&&typeof e.config.deallocate!="undefined"&&e.config.deallocate&&(h("changing webgl: WEBGL_DELETE_TEXTURE_THRESHOLD:",!0),S.env().set("WEBGL_DELETE_TEXTURE_THRESHOLD",0))),S.getBackend(),e.config.debug){let o=S.env().flags,r={};for(let s of Object.keys(o))Mo[s]!==o[s]&&(r[s]=o[s]);e.config.debug&&Object.keys(r).length>0&&h("backend:",S.getBackend(),"flags:",r)}if(e.config.flags&&Object.keys(e.config.flags).length>0){e.config.debug&&h("flags:",e.config.flags);for(let[o,r]of Object.entries(e.config.flags))S.env().set(o,r)}S.enableProdMode(),K1(),e.performance.initBackend=Math.trunc(M()-n),e.config.backend=S.getBackend(),await k.updateBackend(),IA(e.config),k.initial=!1}return!0}function Tt(e,t){for(let n of e){let o={kernelName:n,backendName:t.backend,kernelFunc:()=>{t.debug&&h("kernelFunc",n,t.backend)}};S.registerKernel(o)}k.kernels=S.getKernelsForBackend(S.getBackend()).map(n=>n.kernelName.toLowerCase())}var g1={};we(g1,{all:()=>b1,body:()=>T2,canvas:()=>h1,face:()=>M2,gesture:()=>R2,hand:()=>v2,object:()=>P2,options:()=>S0,person:()=>u1});var K0=e=>{if(!e)h("draw error: invalid canvas");else if(!e.getContext)h("draw error: canvas context not defined");else{let t=e.getContext("2d");if(!t)h("draw error: cannot get canvas context");else return t}return null},r2=e=>Math.round(e*180/Math.PI),ve=(e,t)=>{if(!t.useDepth||typeof e=="undefined")return t.color;let n=Uint8ClampedArray.from([127+2*e,127-2*e,255]);return`rgba(${n[0]}, ${n[1]}, ${n[2]}, ${t.alpha})`};function Pe(e,t,n,o,r){e.fillStyle=ve(o,r),e.beginPath(),e.arc(t,n,r.pointSize,0,2*Math.PI),e.fill()}function pe(e,t,n,o,r,s){if(e.beginPath(),e.lineWidth=s.lineWidth,s.useCurves){let A=(t+t+o)/2,a=(n+n+r)/2;e.ellipse(A,a,o/2,r/2,0,0,2*Math.PI)}else e.moveTo(t+s.roundRect,n),e.lineTo(t+o-s.roundRect,n),e.quadraticCurveTo(t+o,n,t+o,n+s.roundRect),e.lineTo(t+o,n+r-s.roundRect),e.quadraticCurveTo(t+o,n+r,t+o-s.roundRect,n+r),e.lineTo(t+s.roundRect,n+r),e.quadraticCurveTo(t,n+r,t,n+r-s.roundRect),e.lineTo(t,n+s.roundRect),e.quadraticCurveTo(t,n,t+s.roundRect,n),e.closePath();e.stroke()}function f1(e,t,n){if(!(t.length<2)){e.beginPath(),e.moveTo(t[0][0],t[0][1]);for(let o of t)e.strokeStyle=ve(o[2]||0,n),e.lineTo(Math.trunc(o[0]),Math.trunc(o[1]));e.stroke(),n.fillPolygons&&(e.closePath(),e.fill())}}function vo(e,t,n){if(!(t.length<2)){if(e.lineWidth=n.lineWidth,!n.useCurves||t.length<=2){f1(e,t,n);return}e.moveTo(t[0][0],t[0][1]);for(let o=0;o0){let s=e.emotion.map(A=>`${Math.trunc(100*A.score)}% ${A.emotion}`);s.length>3&&(s.length=3),r.push(s.join(" "))}((n=e.rotation)==null?void 0:n.angle)&&((o=e.rotation)==null?void 0:o.gaze)&&(e.rotation.angle.roll&&r.push(`roll: ${r2(e.rotation.angle.roll)}\xB0 yaw:${r2(e.rotation.angle.yaw)}\xB0 pitch:${r2(e.rotation.angle.pitch)}\xB0`),e.rotation.gaze.bearing&&r.push(`gaze: ${r2(e.rotation.gaze.bearing)}\xB0`)),r.length===0&&r.push("face"),t.fillStyle=K.color;for(let s=r.length-1;s>=0;s--){let A=Math.max(e.box[0],0),a=s*K.lineHeight+e.box[1];K.shadowColor&&K.shadowColor!==""&&(t.fillStyle=K.shadowColor,t.fillText(r[s],A+5,a+16)),t.fillStyle=K.labelColor,t.fillText(r[s],A+4,a+15)}}}function LA(e,t){var n,o,r,s;if(((n=e.annotations)==null?void 0:n.leftEyeIris)&&((o=e.annotations)==null?void 0:o.leftEyeIris[0])){t.strokeStyle=K.useDepth?"rgba(255, 200, 255, 0.3)":K.color,t.beginPath();let A=Math.abs(e.annotations.leftEyeIris[3][0]-e.annotations.leftEyeIris[1][0])/2,a=Math.abs(e.annotations.leftEyeIris[4][1]-e.annotations.leftEyeIris[2][1])/2;t.ellipse(e.annotations.leftEyeIris[0][0],e.annotations.leftEyeIris[0][1],A,a,0,0,2*Math.PI),t.stroke(),K.fillPolygons&&(t.fillStyle=K.useDepth?"rgba(255, 255, 200, 0.3)":K.color,t.fill())}if(((r=e.annotations)==null?void 0:r.rightEyeIris)&&((s=e.annotations)==null?void 0:s.rightEyeIris[0])){t.strokeStyle=K.useDepth?"rgba(255, 200, 255, 0.3)":K.color,t.beginPath();let A=Math.abs(e.annotations.rightEyeIris[3][0]-e.annotations.rightEyeIris[1][0])/2,a=Math.abs(e.annotations.rightEyeIris[4][1]-e.annotations.rightEyeIris[2][1])/2;t.ellipse(e.annotations.rightEyeIris[0][0],e.annotations.rightEyeIris[0][1],A,a,0,0,2*Math.PI),t.stroke(),K.fillPolygons&&(t.fillStyle=K.useDepth?"rgba(255, 255, 200, 0.3)":K.color,t.fill())}}function WA(e,t){var n;if(K.drawGaze&&((n=e.rotation)==null?void 0:n.angle)&&typeof Path2D!="undefined"){t.strokeStyle="pink";let o=e.box[0]+e.box[2]/2-e.box[3]*r2(e.rotation.angle.yaw)/90,r=e.box[1]+e.box[3]/2+e.box[2]*r2(e.rotation.angle.pitch)/90,s=new Path2D(` + M ${e.box[0]+e.box[2]/2} ${e.box[1]} C - ${valX} ${f.box[1]}, - ${valX} ${f.box[1] + f.box[3]}, - ${f.box[0] + f.box[2] / 2} ${f.box[1] + f.box[3]} - `); - const pathH = new Path2D(` - M ${f.box[0]} ${f.box[1] + f.box[3] / 2} + ${o} ${e.box[1]}, + ${o} ${e.box[1]+e.box[3]}, + ${e.box[0]+e.box[2]/2} ${e.box[1]+e.box[3]} + `),A=new Path2D(` + M ${e.box[0]} ${e.box[1]+e.box[3]/2} C - ${f.box[0]} ${valY}, - ${f.box[0] + f.box[2]} ${valY}, - ${f.box[0] + f.box[2]} ${f.box[1] + f.box[3] / 2} - `); - ctx.stroke(pathH); - ctx.stroke(pathV); - } -} -function drawGazeArrows(f, ctx) { - var _a; - if (opt.drawGaze && ((_a = f.rotation) == null ? void 0 : _a.gaze.strength) && f.rotation.gaze.bearing && f.annotations.leftEyeIris && f.annotations.rightEyeIris && f.annotations.leftEyeIris[0] && f.annotations.rightEyeIris[0]) { - ctx.strokeStyle = "pink"; - ctx.fillStyle = "pink"; - const leftGaze = [ - f.annotations.leftEyeIris[0][0] + Math.sin(f.rotation.gaze.bearing) * f.rotation.gaze.strength * f.box[3], - f.annotations.leftEyeIris[0][1] + Math.cos(f.rotation.gaze.bearing) * f.rotation.gaze.strength * f.box[2] - ]; - arrow(ctx, [f.annotations.leftEyeIris[0][0], f.annotations.leftEyeIris[0][1]], [leftGaze[0], leftGaze[1]], 4); - const rightGaze = [ - f.annotations.rightEyeIris[0][0] + Math.sin(f.rotation.gaze.bearing) * f.rotation.gaze.strength * f.box[3], - f.annotations.rightEyeIris[0][1] + Math.cos(f.rotation.gaze.bearing) * f.rotation.gaze.strength * f.box[2] - ]; - arrow(ctx, [f.annotations.rightEyeIris[0][0], f.annotations.rightEyeIris[0][1]], [rightGaze[0], rightGaze[1]], 4); - } -} -function drawFacePolygons(f, ctx) { - if (opt.drawPolygons && f.mesh.length >= 468) { - ctx.lineWidth = 1; - for (let i = 0; i < TRI468.length / 3; i++) { - const points = [TRI468[i * 3 + 0], TRI468[i * 3 + 1], TRI468[i * 3 + 2]].map((index2) => f.mesh[index2]); - lines(ctx, points, opt); - } - drawIrisElipse(f, ctx); - } -} -function drawFacePoints(f, ctx) { - if (opt.drawPoints && f.mesh.length >= 468) { - for (let i = 0; i < f.mesh.length; i++) { - point(ctx, f.mesh[i][0], f.mesh[i][1], f.mesh[i][2], opt); - if (opt.drawAttention) { - if (LANDMARKS_REFINEMENT_LIPS_CONFIG.includes(i)) - point(ctx, f.mesh[i][0], f.mesh[i][1], f.mesh[i][2] + 127, opt); - if (LANDMARKS_REFINEMENT_LEFT_EYE_CONFIG.includes(i)) - point(ctx, f.mesh[i][0], f.mesh[i][1], f.mesh[i][2] - 127, opt); - if (LANDMARKS_REFINEMENT_RIGHT_EYE_CONFIG.includes(i)) - point(ctx, f.mesh[i][0], f.mesh[i][1], f.mesh[i][2] - 127, opt); - } - } - } -} -function drawFaceBoxes(f, ctx) { - if (opt.drawBoxes) { - rect(ctx, f.box[0], f.box[1], f.box[2], f.box[3], opt); - } -} -function face(inCanvas2, result, drawOptions) { - opt = mergeDeep(options3, drawOptions); - if (!result || !inCanvas2) - return; - const ctx = getCanvasContext(inCanvas2); - if (!ctx) - return; - ctx.font = opt.font; - ctx.strokeStyle = opt.color; - ctx.fillStyle = opt.color; - for (const f of result) { - drawFaceBoxes(f, ctx); - drawLabels(f, ctx); - if (f.mesh && f.mesh.length > 0) { - drawFacePoints(f, ctx); - drawFacePolygons(f, ctx); - drawGazeSpheres(f, ctx); - drawGazeArrows(f, ctx); - } - } -} - -// src/draw/body.ts -function body(inCanvas2, result, drawOptions) { - const localOptions = mergeDeep(options3, drawOptions); - if (!result || !inCanvas2) - return; - const ctx = getCanvasContext(inCanvas2); - if (!ctx) - return; - ctx.lineJoin = "round"; - for (let i = 0; i < result.length; i++) { - ctx.strokeStyle = localOptions.color; - ctx.fillStyle = localOptions.color; - ctx.lineWidth = localOptions.lineWidth; - ctx.font = localOptions.font; - if (localOptions.drawBoxes && result[i].box && result[i].box.length === 4) { - rect(ctx, result[i].box[0], result[i].box[1], result[i].box[2], result[i].box[3], localOptions); - if (localOptions.drawLabels) { - if (localOptions.shadowColor && localOptions.shadowColor !== "") { - ctx.fillStyle = localOptions.shadowColor; - ctx.fillText(`body ${100 * result[i].score}%`, result[i].box[0] + 3, 1 + result[i].box[1] + localOptions.lineHeight, result[i].box[2]); - } - ctx.fillStyle = localOptions.labelColor; - ctx.fillText(`body ${100 * result[i].score}%`, result[i].box[0] + 2, 0 + result[i].box[1] + localOptions.lineHeight, result[i].box[2]); - } - } - if (localOptions.drawPoints && result[i].keypoints) { - for (let pt = 0; pt < result[i].keypoints.length; pt++) { - if (!result[i].keypoints[pt].score || result[i].keypoints[pt].score === 0) - continue; - ctx.fillStyle = colorDepth(result[i].keypoints[pt].position[2], localOptions); - point(ctx, result[i].keypoints[pt].position[0], result[i].keypoints[pt].position[1], 0, localOptions); - } - } - if (localOptions.drawLabels && result[i].keypoints) { - ctx.font = localOptions.font; - for (const pt of result[i].keypoints) { - if (!pt.score || pt.score === 0) - continue; - ctx.fillStyle = colorDepth(pt.position[2], localOptions); - ctx.fillText(`${pt.part} ${Math.trunc(100 * pt.score)}%`, pt.position[0] + 4, pt.position[1] + 4); - } - } - if (localOptions.drawPolygons && result[i].keypoints && result[i].annotations) { - for (const part of Object.values(result[i].annotations)) { - for (const connected4 of part) - curves(ctx, connected4, localOptions); - } - } - } -} - -// src/draw/hand.ts -function hand(inCanvas2, result, drawOptions) { - const localOptions = mergeDeep(options3, drawOptions); - if (!result || !inCanvas2) - return; - const ctx = getCanvasContext(inCanvas2); - if (!ctx) - return; - ctx.lineJoin = "round"; - ctx.font = localOptions.font; - for (const h of result) { - if (localOptions.drawBoxes) { - ctx.strokeStyle = localOptions.color; - ctx.fillStyle = localOptions.color; - rect(ctx, h.box[0], h.box[1], h.box[2], h.box[3], localOptions); - if (localOptions.drawLabels) { - if (localOptions.shadowColor && localOptions.shadowColor !== "") { - ctx.fillStyle = localOptions.shadowColor; - ctx.fillText(`hand:${Math.trunc(100 * h.score)}%`, h.box[0] + 3, 1 + h.box[1] + localOptions.lineHeight, h.box[2]); - } - ctx.fillStyle = localOptions.labelColor; - ctx.fillText(`hand:${Math.trunc(100 * h.score)}%`, h.box[0] + 2, 0 + h.box[1] + localOptions.lineHeight, h.box[2]); - } - ctx.stroke(); - } - if (localOptions.drawPoints) { - if (h.keypoints && h.keypoints.length > 0) { - for (const pt of h.keypoints) { - ctx.fillStyle = colorDepth(pt[2], localOptions); - point(ctx, pt[0], pt[1], 0, localOptions); - } - } - } - if (localOptions.drawLabels && h.annotations) { - const addHandLabel = (part, title) => { - if (!part || part.length === 0 || !part[0]) - return; - const z = part[part.length - 1][2] || -256; - ctx.fillStyle = colorDepth(z, localOptions); - ctx.fillText(title, part[part.length - 1][0] + 4, part[part.length - 1][1] + 4); - }; - ctx.font = localOptions.font; - addHandLabel(h.annotations.index, "index"); - addHandLabel(h.annotations.middle, "middle"); - addHandLabel(h.annotations.ring, "ring"); - addHandLabel(h.annotations.pinky, "pinky"); - addHandLabel(h.annotations.thumb, "thumb"); - addHandLabel(h.annotations.palm, "palm"); - } - if (localOptions.drawPolygons && h.annotations) { - const addHandLine = (part) => { - if (!part || part.length === 0 || !part[0]) - return; - for (let i = 0; i < part.length; i++) { - ctx.beginPath(); - const z = part[i][2] || 0; - ctx.strokeStyle = colorDepth(i * z, localOptions); - ctx.moveTo(part[i > 0 ? i - 1 : 0][0], part[i > 0 ? i - 1 : 0][1]); - ctx.lineTo(part[i][0], part[i][1]); - ctx.stroke(); - } - }; - ctx.lineWidth = localOptions.lineWidth; - addHandLine(h.annotations.index); - addHandLine(h.annotations.middle); - addHandLine(h.annotations.ring); - addHandLine(h.annotations.pinky); - addHandLine(h.annotations.thumb); - } - } -} - -// src/draw/object.ts -function object(inCanvas2, result, drawOptions) { - const localOptions = mergeDeep(options3, drawOptions); - if (!result || !inCanvas2) - return; - const ctx = getCanvasContext(inCanvas2); - if (!ctx) - return; - ctx.lineJoin = "round"; - ctx.font = localOptions.font; - for (const h of result) { - if (localOptions.drawBoxes) { - ctx.strokeStyle = localOptions.color; - ctx.fillStyle = localOptions.color; - rect(ctx, h.box[0], h.box[1], h.box[2], h.box[3], localOptions); - if (localOptions.drawLabels) { - const label = `${h.label} ${Math.round(100 * h.score)}%`; - if (localOptions.shadowColor && localOptions.shadowColor !== "") { - ctx.fillStyle = localOptions.shadowColor; - ctx.fillText(label, h.box[0] + 3, 1 + h.box[1] + localOptions.lineHeight, h.box[2]); - } - ctx.fillStyle = localOptions.labelColor; - ctx.fillText(label, h.box[0] + 2, 0 + h.box[1] + localOptions.lineHeight, h.box[2]); - } - ctx.stroke(); - } - } -} - -// src/draw/gesture.ts -function gesture(inCanvas2, result, drawOptions) { - const localOptions = mergeDeep(options3, drawOptions); - if (!result || !inCanvas2) - return; - if (localOptions.drawGestures) { - const ctx = getCanvasContext(inCanvas2); - if (!ctx) - return; - ctx.font = localOptions.font; - ctx.fillStyle = localOptions.color; - let i = 1; - for (let j = 0; j < result.length; j++) { - let where = []; - let what = []; - [where, what] = Object.entries(result[j]); - if (what.length > 1 && what[1].length > 0) { - const who = where[1] > 0 ? `#${where[1]}` : ""; - const label = `${where[0]} ${who}: ${what[1]}`; - if (localOptions.shadowColor && localOptions.shadowColor !== "") { - ctx.fillStyle = localOptions.shadowColor; - ctx.fillText(label, 8, 2 + i * localOptions.lineHeight); - } - ctx.fillStyle = localOptions.labelColor; - ctx.fillText(label, 6, 0 + i * localOptions.lineHeight); - i += 1; - } - } - } -} - -// src/draw/draw.ts -var drawTime = 0; -function person(inCanvas2, result, drawOptions) { - const localOptions = mergeDeep(options3, drawOptions); - if (!result || !inCanvas2) - return; - const ctx = getCanvasContext(inCanvas2); - if (!ctx) - return; - ctx.lineJoin = "round"; - ctx.font = localOptions.font; - for (let i = 0; i < result.length; i++) { - if (localOptions.drawBoxes) { - ctx.strokeStyle = localOptions.color; - ctx.fillStyle = localOptions.color; - rect(ctx, result[i].box[0], result[i].box[1], result[i].box[2], result[i].box[3], localOptions); - if (localOptions.drawLabels) { - const label = `person #${i}`; - if (localOptions.shadowColor && localOptions.shadowColor !== "") { - ctx.fillStyle = localOptions.shadowColor; - ctx.fillText(label, result[i].box[0] + 3, 1 + result[i].box[1] + localOptions.lineHeight, result[i].box[2]); - } - ctx.fillStyle = localOptions.labelColor; - ctx.fillText(label, result[i].box[0] + 2, 0 + result[i].box[1] + localOptions.lineHeight, result[i].box[2]); - } - ctx.stroke(); - } - } -} -function canvas2(input, output) { - if (!input || !output) - return; - const ctx = getCanvasContext(output); - if (!ctx) - return; - ctx.drawImage(input, 0, 0); -} -async function all(inCanvas2, result, drawOptions) { - if (!(result == null ? void 0 : result.performance) || !inCanvas2) - return null; - const timeStamp = now(); - const localOptions = mergeDeep(options3, drawOptions); - const promise = Promise.all([ - face(inCanvas2, result.face, localOptions), - body(inCanvas2, result.body, localOptions), - hand(inCanvas2, result.hand, localOptions), - object(inCanvas2, result.object, localOptions), - gesture(inCanvas2, result.gesture, localOptions) - ]); - drawTime = env.perfadd ? drawTime + Math.round(now() - timeStamp) : Math.round(now() - timeStamp); - result.performance.draw = drawTime; - return promise; -} - -// src/face/face.ts -var tf37 = __toESM(require_tfjs_esm()); - -// src/face/mask.ts -var tf36 = __toESM(require_tfjs_esm()); -var expandFact = 0.1; -var alpha = 0.5; -function insidePoly(x, y, polygon) { - let inside = false; - let j = polygon.length - 1; - for (let i = 0; i < polygon.length; j = i++) { - if (polygon[i].y > y !== polygon[j].y > y && x < (polygon[j].x - polygon[i].x) * (y - polygon[i].y) / (polygon[j].y - polygon[i].y) + polygon[i].x) - inside = !inside; - } - return inside; -} -async function mask(face4) { - if (!face4.tensor) - return face4.tensor; - if (!face4.mesh || face4.mesh.length < 100) - return face4.tensor; - const width = face4.tensor.shape[2] || 0; - const height = face4.tensor.shape[1] || 0; - const buffer = await face4.tensor.buffer(); - let silhouette = []; - for (const pt of meshAnnotations.silhouette) - silhouette.push({ x: (face4.mesh[pt][0] - face4.box[0]) / face4.box[2], y: (face4.mesh[pt][1] - face4.box[1]) / face4.box[3] }); - if (expandFact && expandFact > 0) - silhouette = silhouette.map((pt) => ({ x: pt.x > 0.5 ? pt.x + expandFact : pt.x - expandFact, y: pt.y > 0.5 ? pt.y + expandFact : pt.y - expandFact })); - for (let x = 0; x < width; x++) { - for (let y = 0; y < height; y++) { - const inside = insidePoly(x / width, y / width, silhouette); - if (!inside) { - buffer.set(alpha * buffer.get(0, y, x, 0), 0, y, x, 0); - buffer.set(alpha * buffer.get(0, y, x, 1), 0, y, x, 1); - buffer.set(alpha * buffer.get(0, y, x, 2), 0, y, x, 2); - } - } - } - const output = buffer.toTensor(); - tf36.dispose(buffer); - return output; -} - -// src/face/angles.ts -var calculateGaze = (face4) => { - const radians = (pt1, pt2) => Math.atan2(pt1[1] - pt2[1], pt1[0] - pt2[0]); - if (!face4.annotations.rightEyeIris || !face4.annotations.leftEyeIris) - return { bearing: 0, strength: 0 }; - const offsetIris = [0, -0.1]; - const eyeRatio = 1; - const left = (face4.mesh[33][2] || 0) > (face4.mesh[263][2] || 0); - const irisCenter = left ? face4.mesh[473] : face4.mesh[468]; - const eyeCenter = left ? [(face4.mesh[133][0] + face4.mesh[33][0]) / 2, (face4.mesh[133][1] + face4.mesh[33][1]) / 2] : [(face4.mesh[263][0] + face4.mesh[362][0]) / 2, (face4.mesh[263][1] + face4.mesh[362][1]) / 2]; - const eyeSize = left ? [face4.mesh[133][0] - face4.mesh[33][0], face4.mesh[23][1] - face4.mesh[27][1]] : [face4.mesh[263][0] - face4.mesh[362][0], face4.mesh[253][1] - face4.mesh[257][1]]; - const eyeDiff = [ - (eyeCenter[0] - irisCenter[0]) / eyeSize[0] - offsetIris[0], - eyeRatio * (irisCenter[1] - eyeCenter[1]) / eyeSize[1] - offsetIris[1] - ]; - let strength = Math.sqrt(eyeDiff[0] * eyeDiff[0] + eyeDiff[1] * eyeDiff[1]); - strength = Math.min(strength, face4.boxRaw[2] / 2, face4.boxRaw[3] / 2); - const bearing = (radians([0, 0], eyeDiff) + Math.PI / 2) % Math.PI; - return { bearing, strength }; -}; -var calculateFaceAngle = (face4, imageSize) => { - const normalize2 = (v) => { - const length = Math.sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]); - v[0] /= length; - v[1] /= length; - v[2] /= length; - return v; - }; - const subVectors = (a, b) => { - const x = a[0] - b[0]; - const y = a[1] - b[1]; - const z = a[2] - b[2]; - return [x, y, z]; - }; - const crossVectors = (a, b) => { - const x = a[1] * b[2] - a[2] * b[1]; - const y = a[2] * b[0] - a[0] * b[2]; - const z = a[0] * b[1] - a[1] * b[0]; - return [x, y, z]; - }; - const rotationMatrixToEulerAngle = (r) => { - const [r00, _r01, _r02, r10, r11, r12, r20, r21, r22] = r; - let thetaX; - let thetaY; - let thetaZ; - if (r10 < 1) { - if (r10 > -1) { - thetaZ = Math.asin(r10); - thetaY = Math.atan2(-r20, r00); - thetaX = Math.atan2(-r12, r11); - } else { - thetaZ = -Math.PI / 2; - thetaY = -Math.atan2(r21, r22); - thetaX = 0; - } - } else { - thetaZ = Math.PI / 2; - thetaY = Math.atan2(r21, r22); - thetaX = 0; - } - if (Number.isNaN(thetaX)) - thetaX = 0; - if (Number.isNaN(thetaY)) - thetaY = 0; - if (Number.isNaN(thetaZ)) - thetaZ = 0; - return { pitch: 2 * -thetaX, yaw: 2 * -thetaY, roll: 2 * -thetaZ }; - }; - const mesh = face4.meshRaw; - if (!mesh || mesh.length < 300) - return { angle: { pitch: 0, yaw: 0, roll: 0 }, matrix: [1, 0, 0, 0, 1, 0, 0, 0, 1], gaze: { bearing: 0, strength: 0 } }; - const size2 = Math.max(face4.boxRaw[2] * imageSize[0], face4.boxRaw[3] * imageSize[1]) / 1.5; - const pts = [mesh[10], mesh[152], mesh[234], mesh[454]].map((pt) => [pt[0] * imageSize[0] / size2, pt[1] * imageSize[1] / size2, pt[2]]); - const yAxis = normalize2(subVectors(pts[1], pts[0])); - let xAxis = normalize2(subVectors(pts[3], pts[2])); - const zAxis = normalize2(crossVectors(xAxis, yAxis)); - xAxis = crossVectors(yAxis, zAxis); - const matrix = [ - xAxis[0], - xAxis[1], - xAxis[2], - yAxis[0], - yAxis[1], - yAxis[2], - zAxis[0], - zAxis[1], - zAxis[2] - ]; - const angle = rotationMatrixToEulerAngle(matrix); - const gaze = mesh.length === 478 ? calculateGaze(face4) : { bearing: 0, strength: 0 }; - return { angle, matrix, gaze }; -}; - -// src/face/face.ts -var detectFace = async (instance2, input) => { - var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C; - let timeStamp = now(); - let ageRes; - let gearRes; - let genderRes; - let emotionRes; - let mobilefacenetRes; - let insightfaceRes; - let antispoofRes; - let livenessRes; - let descRes; - const faceRes = []; - instance2.state = "run:face"; - const faces = await predict6(input, instance2.config); - instance2.performance.face = env.perfadd ? (instance2.performance.face || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - if (!input.shape || input.shape.length !== 4) - return []; - if (!faces) - return []; - for (let i = 0; i < faces.length; i++) { - instance2.analyze("Get Face"); - if (!faces[i].tensor || faces[i].tensor.isDisposedInternal) { - log("Face object is disposed:", faces[i].tensor); - continue; - } - if ((_a = instance2.config.face.detector) == null ? void 0 : _a.mask) { - const masked = await mask(faces[i]); - tf37.dispose(faces[i].tensor); - if (masked) - faces[i].tensor = masked; - } - const rotation = faces[i].mesh && faces[i].mesh.length > 200 ? calculateFaceAngle(faces[i], [input.shape[2], input.shape[1]]) : null; - instance2.analyze("Start Emotion:"); - if (instance2.config.async) { - emotionRes = ((_b = instance2.config.face.emotion) == null ? void 0 : _b.enabled) ? predict5(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : []; - } else { - instance2.state = "run:emotion"; - timeStamp = now(); - emotionRes = ((_c = instance2.config.face.emotion) == null ? void 0 : _c.enabled) ? await predict5(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : []; - instance2.performance.emotion = env.perfadd ? (instance2.performance.emotion || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - } - instance2.analyze("End Emotion:"); - instance2.analyze("Start AntiSpoof:"); - if (instance2.config.async) { - antispoofRes = ((_d = instance2.config.face.antispoof) == null ? void 0 : _d.enabled) ? predict(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : 0; - } else { - instance2.state = "run:antispoof"; - timeStamp = now(); - antispoofRes = ((_e = instance2.config.face.antispoof) == null ? void 0 : _e.enabled) ? await predict(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : 0; - instance2.performance.antispoof = env.perfadd ? (instance2.performance.antispoof || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - } - instance2.analyze("End AntiSpoof:"); - instance2.analyze("Start Liveness:"); - if (instance2.config.async) { - livenessRes = ((_f = instance2.config.face.liveness) == null ? void 0 : _f.enabled) ? predict12(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : 0; - } else { - instance2.state = "run:liveness"; - timeStamp = now(); - livenessRes = ((_g = instance2.config.face.liveness) == null ? void 0 : _g.enabled) ? await predict12(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : 0; - instance2.performance.liveness = env.perfadd ? (instance2.performance.antispoof || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - } - instance2.analyze("End Liveness:"); - instance2.analyze("Start GEAR:"); - if (instance2.config.async) { - gearRes = ((_h = instance2.config.face.gear) == null ? void 0 : _h.enabled) ? predict8(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : null; - } else { - instance2.state = "run:gear"; - timeStamp = now(); - gearRes = ((_i = instance2.config.face.gear) == null ? void 0 : _i.enabled) ? await predict8(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : null; - instance2.performance.gear = Math.trunc(now() - timeStamp); - } - instance2.analyze("End GEAR:"); - instance2.analyze("Start SSRNet:"); - if (instance2.config.async) { - ageRes = ((_j = instance2.config.face["ssrnet"]) == null ? void 0 : _j.enabled) ? predict20(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : null; - genderRes = ((_k = instance2.config.face["ssrnet"]) == null ? void 0 : _k.enabled) ? predict21(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : null; - } else { - instance2.state = "run:ssrnet"; - timeStamp = now(); - ageRes = ((_l = instance2.config.face["ssrnet"]) == null ? void 0 : _l.enabled) ? await predict20(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : null; - genderRes = ((_m = instance2.config.face["ssrnet"]) == null ? void 0 : _m.enabled) ? await predict21(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : null; - instance2.performance.ssrnet = Math.trunc(now() - timeStamp); - } - instance2.analyze("End SSRNet:"); - instance2.analyze("Start MobileFaceNet:"); - if (instance2.config.async) { - mobilefacenetRes = ((_n = instance2.config.face["mobilefacenet"]) == null ? void 0 : _n.enabled) ? predict14(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : null; - } else { - instance2.state = "run:mobilefacenet"; - timeStamp = now(); - mobilefacenetRes = ((_o = instance2.config.face["mobilefacenet"]) == null ? void 0 : _o.enabled) ? await predict14(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : null; - instance2.performance.mobilefacenet = Math.trunc(now() - timeStamp); - } - instance2.analyze("End MobileFaceNet:"); - instance2.analyze("Start InsightFace:"); - if (instance2.config.async) { - insightfaceRes = ((_p = instance2.config.face["insightface"]) == null ? void 0 : _p.enabled) ? predict11(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : null; - } else { - instance2.state = "run:mobilefacenet"; - timeStamp = now(); - insightfaceRes = ((_q = instance2.config.face["insightface"]) == null ? void 0 : _q.enabled) ? await predict11(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length) : null; - instance2.performance.mobilefacenet = Math.trunc(now() - timeStamp); - } - instance2.analyze("End InsightFace:"); - instance2.analyze("Start Description:"); - if (instance2.config.async) { - descRes = predict7(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length); - } else { - instance2.state = "run:description"; - timeStamp = now(); - descRes = await predict7(faces[i].tensor || tf37.tensor([]), instance2.config, i, faces.length); - instance2.performance.description = env.perfadd ? (instance2.performance.description || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - } - instance2.analyze("End Description:"); - if (instance2.config.async) { - [ageRes, genderRes, emotionRes, mobilefacenetRes, insightfaceRes, descRes, gearRes, antispoofRes, livenessRes] = await Promise.all([ageRes, genderRes, emotionRes, mobilefacenetRes, insightfaceRes, descRes, gearRes, antispoofRes, livenessRes]); - } - instance2.analyze("Finish Face:"); - if (((_r = instance2.config.face["ssrnet"]) == null ? void 0 : _r.enabled) && ageRes && genderRes) { - descRes = { - ...descRes, - age: ageRes.age, - gender: genderRes.gender, - genderScore: genderRes.genderScore - }; - } - if (((_s = instance2.config.face.gear) == null ? void 0 : _s.enabled) && gearRes) { - descRes = { - ...descRes, - age: gearRes.age, - gender: gearRes.gender, - genderScore: gearRes.genderScore, - race: gearRes.race - }; - } - if (((_t = instance2.config.face["mobilefacenet"]) == null ? void 0 : _t.enabled) && mobilefacenetRes) { - descRes.descriptor = mobilefacenetRes; - } - if (((_u = instance2.config.face["insightface"]) == null ? void 0 : _u.enabled) && insightfaceRes) { - descRes.descriptor = insightfaceRes; - } - if (!((_v = instance2.config.face.iris) == null ? void 0 : _v.enabled)) { - } - const irisSize = ((_y = (_x = (_w = faces[i]) == null ? void 0 : _w.annotations) == null ? void 0 : _x.leftEyeIris) == null ? void 0 : _y[0]) && ((_B = (_A = (_z = faces[i]) == null ? void 0 : _z.annotations) == null ? void 0 : _A.rightEyeIris) == null ? void 0 : _B[0]) && faces[i].annotations.leftEyeIris.length > 0 && faces[i].annotations.rightEyeIris.length > 0 && faces[i].annotations.leftEyeIris[0] !== null && faces[i].annotations.rightEyeIris[0] !== null ? Math.max(Math.abs(faces[i].annotations.leftEyeIris[3][0] - faces[i].annotations.leftEyeIris[1][0]), Math.abs(faces[i].annotations.rightEyeIris[4][1] - faces[i].annotations.rightEyeIris[2][1])) / input.shape[2] : 0; - const tensor6 = ((_C = instance2.config.face.detector) == null ? void 0 : _C.return) ? tf37.squeeze(faces[i].tensor) : null; - tf37.dispose(faces[i].tensor); - if (faces[i].tensor) - delete faces[i].tensor; - const res = { - ...faces[i], - id: i - }; - if (descRes.age) - res.age = descRes.age; - if (descRes.gender) - res.gender = descRes.gender; - if (descRes.genderScore) - res.genderScore = descRes.genderScore; - if (descRes.descriptor) - res.embedding = descRes.descriptor; - if (descRes.race) - res.race = descRes.race; - if (emotionRes) - res.emotion = emotionRes; - if (antispoofRes) - res.real = antispoofRes; - if (livenessRes) - res.live = livenessRes; - if (irisSize && irisSize !== 0) - res.iris = Math.trunc(500 / irisSize / 11.7) / 100; - if (rotation) - res.rotation = rotation; - if (tensor6) - res.tensor = tensor6; - faceRes.push(res); - instance2.analyze("End Face"); - } - instance2.analyze("End FaceMesh:"); - if (instance2.config.async) { - if (instance2.performance.face) - delete instance2.performance.face; - if (instance2.performance.age) - delete instance2.performance.age; - if (instance2.performance.gender) - delete instance2.performance.gender; - if (instance2.performance.emotion) - delete instance2.performance.emotion; - } - return faceRes; -}; - -// src/gesture/gesture.ts -var body2 = (res) => { - if (!res) - return []; - const gestures = []; - for (let i = 0; i < res.length; i++) { - const leftWrist = res[i].keypoints.find((a) => a.part === "leftWrist"); - const rightWrist = res[i].keypoints.find((a) => a.part === "rightWrist"); - const nose = res[i].keypoints.find((a) => a.part === "nose"); - if (nose && leftWrist && rightWrist && leftWrist.position[1] < nose.position[1] && rightWrist.position[1] < nose.position[1]) - gestures.push({ body: i, gesture: "i give up" }); - else if (nose && leftWrist && leftWrist.position[1] < nose.position[1]) - gestures.push({ body: i, gesture: "raise left hand" }); - else if (nose && rightWrist && rightWrist.position[1] < nose.position[1]) - gestures.push({ body: i, gesture: "raise right hand" }); - const leftShoulder = res[i].keypoints.find((a) => a.part === "leftShoulder"); - const rightShoulder = res[i].keypoints.find((a) => a.part === "rightShoulder"); - if (leftShoulder && rightShoulder && Math.abs(leftShoulder.positionRaw[1] - rightShoulder.positionRaw[1]) > 0.1) { - gestures.push({ body: i, gesture: `leaning ${leftShoulder.position[1] > rightShoulder.position[1] ? "left" : "right"}` }); - } - } - return gestures; -}; -var face2 = (res) => { - if (!res) - return []; - const gestures = []; - for (let i = 0; i < res.length; i++) { - if (res[i].mesh && res[i].mesh.length > 450) { - const zDiff = (res[i].mesh[33][2] || 0) - (res[i].mesh[263][2] || 0); - const xDiff = res[i].mesh[33][0] - res[i].mesh[263][0]; - if (Math.abs(zDiff / xDiff) <= 0.15) - gestures.push({ face: i, gesture: "facing center" }); - else - gestures.push({ face: i, gesture: `facing ${zDiff < 0 ? "left" : "right"}` }); - const openLeft = Math.abs(res[i].mesh[374][1] - res[i].mesh[386][1]) / Math.abs(res[i].mesh[443][1] - res[i].mesh[450][1]); - if (openLeft < 0.2) - gestures.push({ face: i, gesture: "blink left eye" }); - const openRight = Math.abs(res[i].mesh[145][1] - res[i].mesh[159][1]) / Math.abs(res[i].mesh[223][1] - res[i].mesh[230][1]); - if (openRight < 0.2) - gestures.push({ face: i, gesture: "blink right eye" }); - const mouthOpen = Math.min(100, 500 * Math.abs(res[i].mesh[13][1] - res[i].mesh[14][1]) / Math.abs(res[i].mesh[10][1] - res[i].mesh[152][1])); - if (mouthOpen > 10) - gestures.push({ face: i, gesture: `mouth ${Math.trunc(mouthOpen)}% open` }); - const chinDepth = res[i].mesh[152][2] || 0; - if (Math.abs(chinDepth) > 10) - gestures.push({ face: i, gesture: `head ${chinDepth < 0 ? "up" : "down"}` }); - } - } - return gestures; -}; -var iris2 = (res) => { - var _a, _b, _c, _d; - if (!res) - return []; - const gestures = []; - for (let i = 0; i < res.length; i++) { - if (!((_b = (_a = res[i].annotations) == null ? void 0 : _a.leftEyeIris) == null ? void 0 : _b[0]) || !((_d = (_c = res[i].annotations) == null ? void 0 : _c.rightEyeIris) == null ? void 0 : _d[0])) - continue; - const sizeXLeft = res[i].annotations.leftEyeIris[3][0] - res[i].annotations.leftEyeIris[1][0]; - const sizeYLeft = res[i].annotations.leftEyeIris[4][1] - res[i].annotations.leftEyeIris[2][1]; - const areaLeft = Math.abs(sizeXLeft * sizeYLeft); - const sizeXRight = res[i].annotations.rightEyeIris[3][0] - res[i].annotations.rightEyeIris[1][0]; - const sizeYRight = res[i].annotations.rightEyeIris[4][1] - res[i].annotations.rightEyeIris[2][1]; - const areaRight = Math.abs(sizeXRight * sizeYRight); - let center = false; - const difference = Math.abs(areaLeft - areaRight) / Math.max(areaLeft, areaRight); - if (difference < 0.25) { - center = true; - gestures.push({ iris: i, gesture: "facing center" }); - } - const leftIrisCenterX = Math.abs(res[i].mesh[263][0] - res[i].annotations.leftEyeIris[0][0]) / res[i].box[2]; - const rightIrisCenterX = Math.abs(res[i].mesh[33][0] - res[i].annotations.rightEyeIris[0][0]) / res[i].box[2]; - if (leftIrisCenterX > 0.06 || rightIrisCenterX > 0.06) - center = false; - if (leftIrisCenterX > rightIrisCenterX) { - if (leftIrisCenterX > 0.05) - gestures.push({ iris: i, gesture: "looking right" }); - } else { - if (rightIrisCenterX > 0.05) - gestures.push({ iris: i, gesture: "looking left" }); - } - const rightIrisCenterY = Math.abs(res[i].mesh[145][1] - res[i].annotations.rightEyeIris[0][1]) / res[i].box[3]; - const leftIrisCenterY = Math.abs(res[i].mesh[374][1] - res[i].annotations.leftEyeIris[0][1]) / res[i].box[3]; - if (leftIrisCenterY < 0.01 || rightIrisCenterY < 0.01 || leftIrisCenterY > 0.022 || rightIrisCenterY > 0.022) - center = false; - if (leftIrisCenterY < 0.01 || rightIrisCenterY < 0.01) - gestures.push({ iris: i, gesture: "looking down" }); - if (leftIrisCenterY > 0.022 || rightIrisCenterY > 0.022) - gestures.push({ iris: i, gesture: "looking up" }); - if (center) - gestures.push({ iris: i, gesture: "looking center" }); - } - return gestures; -}; -var hand2 = (res) => { - if (!res) - return []; - const gestures = []; - for (let i = 0; i < res.length; i++) { - const fingers = []; - if (res[i].annotations) { - for (const [finger, pos] of Object.entries(res[i].annotations)) { - if (finger !== "palmBase" && Array.isArray(pos) && pos[0]) - fingers.push({ name: finger.toLowerCase(), position: pos[0] }); - } - } - if (fingers && fingers.length > 0) { - const closest = fingers.reduce((best, a) => (best.position[2] || 0) < (a.position[2] || 0) ? best : a); - gestures.push({ hand: i, gesture: `${closest.name} forward` }); - const highest = fingers.reduce((best, a) => best.position[1] < a.position[1] ? best : a); - gestures.push({ hand: i, gesture: `${highest.name} up` }); - } - if (res[i].keypoints) { - const poses = match(res[i].keypoints); - for (const pose of poses) - gestures.push({ hand: i, gesture: pose.name }); - } - } - return gestures; -}; - -// src/util/interpolate.ts -var bufferedResult = { face: [], body: [], hand: [], gesture: [], object: [], persons: [], performance: {}, timestamp: 0, error: null }; -var interpolateTime = 0; -function calc2(newResult, config3) { - var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w; - const t0 = now(); - if (!newResult) - return { face: [], body: [], hand: [], gesture: [], object: [], persons: [], performance: {}, timestamp: 0, error: null }; - const elapsed = Date.now() - newResult.timestamp; - const bufferedFactor = elapsed < 1e3 ? 8 - Math.log(elapsed + 1) : 1; - if (newResult.canvas) - bufferedResult.canvas = newResult.canvas; - if (newResult.error) - bufferedResult.error = newResult.error; - if (!bufferedResult.body || newResult.body.length !== bufferedResult.body.length) { - bufferedResult.body = JSON.parse(JSON.stringify(newResult.body)); - } else { - for (let i = 0; i < newResult.body.length; i++) { - const box = newResult.body[i].box.map((newBoxCoord, j) => ((bufferedFactor - 1) * bufferedResult.body[i].box[j] + newBoxCoord) / bufferedFactor); - const boxRaw = newResult.body[i].boxRaw.map((newBoxCoord, j) => ((bufferedFactor - 1) * bufferedResult.body[i].boxRaw[j] + newBoxCoord) / bufferedFactor); - const keypoints = newResult.body[i].keypoints.map((newKpt, j) => { - var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2; - return { - score: newKpt.score, - part: newKpt.part, - position: [ - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].position[0] || 0) + (newKpt.position[0] || 0)) / bufferedFactor : newKpt.position[0], - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].position[1] || 0) + (newKpt.position[1] || 0)) / bufferedFactor : newKpt.position[1], - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].position[2] || 0) + (newKpt.position[2] || 0)) / bufferedFactor : newKpt.position[2] - ], - positionRaw: [ - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].positionRaw[0] || 0) + (newKpt.positionRaw[0] || 0)) / bufferedFactor : newKpt.positionRaw[0], - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].positionRaw[1] || 0) + (newKpt.positionRaw[1] || 0)) / bufferedFactor : newKpt.positionRaw[1], - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (bufferedResult.body[i].keypoints[j].positionRaw[2] || 0) + (newKpt.positionRaw[2] || 0)) / bufferedFactor : newKpt.positionRaw[2] - ], - distance: [ - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (((_a2 = bufferedResult.body[i].keypoints[j].distance) == null ? void 0 : _a2[0]) || 0) + (((_b2 = newKpt.distance) == null ? void 0 : _b2[0]) || 0)) / bufferedFactor : (_c2 = newKpt.distance) == null ? void 0 : _c2[0], - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (((_d2 = bufferedResult.body[i].keypoints[j].distance) == null ? void 0 : _d2[1]) || 0) + (((_e2 = newKpt.distance) == null ? void 0 : _e2[1]) || 0)) / bufferedFactor : (_f2 = newKpt.distance) == null ? void 0 : _f2[1], - bufferedResult.body[i].keypoints[j] ? ((bufferedFactor - 1) * (((_g2 = bufferedResult.body[i].keypoints[j].distance) == null ? void 0 : _g2[2]) || 0) + (((_h2 = newKpt.distance) == null ? void 0 : _h2[2]) || 0)) / bufferedFactor : (_i2 = newKpt.distance) == null ? void 0 : _i2[2] - ] - }; - }); - const annotations2 = {}; - let coords = { connected: {} }; - if ((_a = config3.body.modelPath) == null ? void 0 : _a.includes("efficientpose")) - coords = efficientposecoords_exports; - else if ((_b = config3.body.modelPath) == null ? void 0 : _b.includes("blazepose")) - coords = blazeposecoords_exports; - else if ((_c = config3.body.modelPath) == null ? void 0 : _c.includes("movenet")) - coords = movenetcoords_exports; - for (const [name, indexes] of Object.entries(coords.connected)) { - const pt = []; - for (let j = 0; j < indexes.length - 1; j++) { - const pt0 = keypoints.find((kp) => kp.part === indexes[j]); - const pt1 = keypoints.find((kp) => kp.part === indexes[j + 1]); - if (pt0 && pt1) - pt.push([pt0.position, pt1.position]); - } - annotations2[name] = pt; - } - bufferedResult.body[i] = { ...newResult.body[i], box, boxRaw, keypoints, annotations: annotations2 }; - } - } - if (!bufferedResult.hand || newResult.hand.length !== bufferedResult.hand.length) { - bufferedResult.hand = JSON.parse(JSON.stringify(newResult.hand)); - } else { - for (let i = 0; i < newResult.hand.length; i++) { - const box = newResult.hand[i].box.map((b, j) => ((bufferedFactor - 1) * bufferedResult.hand[i].box[j] + b) / bufferedFactor); - const boxRaw = newResult.hand[i].boxRaw.map((b, j) => ((bufferedFactor - 1) * bufferedResult.hand[i].boxRaw[j] + b) / bufferedFactor); - if (bufferedResult.hand[i].keypoints.length !== newResult.hand[i].keypoints.length) - bufferedResult.hand[i].keypoints = newResult.hand[i].keypoints; - const keypoints = newResult.hand[i].keypoints && newResult.hand[i].keypoints.length > 0 ? newResult.hand[i].keypoints.map((landmark, j) => landmark.map((coord, k) => ((bufferedFactor - 1) * (bufferedResult.hand[i].keypoints[j][k] || 1) + (coord || 0)) / bufferedFactor)) : []; - let annotations2 = {}; - if (Object.keys(bufferedResult.hand[i].annotations).length !== Object.keys(newResult.hand[i].annotations).length) { - bufferedResult.hand[i].annotations = newResult.hand[i].annotations; - annotations2 = bufferedResult.hand[i].annotations; - } else if (newResult.hand[i].annotations) { - for (const key of Object.keys(newResult.hand[i].annotations)) { - annotations2[key] = ((_f = (_e = (_d = newResult.hand[i]) == null ? void 0 : _d.annotations) == null ? void 0 : _e[key]) == null ? void 0 : _f[0]) ? newResult.hand[i].annotations[key].map((val, j) => val.map((coord, k) => ((bufferedFactor - 1) * bufferedResult.hand[i].annotations[key][j][k] + coord) / bufferedFactor)) : null; - } - } - bufferedResult.hand[i] = { ...newResult.hand[i], box, boxRaw, keypoints, annotations: annotations2 }; - } - } - if (!bufferedResult.face || newResult.face.length !== bufferedResult.face.length) { - bufferedResult.face = JSON.parse(JSON.stringify(newResult.face)); - } else { - for (let i = 0; i < newResult.face.length; i++) { - const box = newResult.face[i].box.map((b, j) => ((bufferedFactor - 1) * bufferedResult.face[i].box[j] + b) / bufferedFactor); - const boxRaw = newResult.face[i].boxRaw.map((b, j) => ((bufferedFactor - 1) * bufferedResult.face[i].boxRaw[j] + b) / bufferedFactor); - if (newResult.face[i].rotation) { - const rotation = { matrix: [0, 0, 0, 0, 0, 0, 0, 0, 0], angle: { roll: 0, yaw: 0, pitch: 0 }, gaze: { bearing: 0, strength: 0 } }; - rotation.matrix = (_g = newResult.face[i].rotation) == null ? void 0 : _g.matrix; - rotation.angle = { - roll: ((bufferedFactor - 1) * (((_i = (_h = bufferedResult.face[i].rotation) == null ? void 0 : _h.angle) == null ? void 0 : _i.roll) || 0) + (((_k = (_j = newResult.face[i].rotation) == null ? void 0 : _j.angle) == null ? void 0 : _k.roll) || 0)) / bufferedFactor, - yaw: ((bufferedFactor - 1) * (((_m = (_l = bufferedResult.face[i].rotation) == null ? void 0 : _l.angle) == null ? void 0 : _m.yaw) || 0) + (((_o = (_n = newResult.face[i].rotation) == null ? void 0 : _n.angle) == null ? void 0 : _o.yaw) || 0)) / bufferedFactor, - pitch: ((bufferedFactor - 1) * (((_q = (_p = bufferedResult.face[i].rotation) == null ? void 0 : _p.angle) == null ? void 0 : _q.pitch) || 0) + (((_s = (_r = newResult.face[i].rotation) == null ? void 0 : _r.angle) == null ? void 0 : _s.pitch) || 0)) / bufferedFactor - }; - rotation.gaze = { - bearing: ((bufferedFactor - 1) * (((_t = bufferedResult.face[i].rotation) == null ? void 0 : _t.gaze.bearing) || 0) + (((_u = newResult.face[i].rotation) == null ? void 0 : _u.gaze.bearing) || 0)) / bufferedFactor, - strength: ((bufferedFactor - 1) * (((_v = bufferedResult.face[i].rotation) == null ? void 0 : _v.gaze.strength) || 0) + (((_w = newResult.face[i].rotation) == null ? void 0 : _w.gaze.strength) || 0)) / bufferedFactor - }; - bufferedResult.face[i] = { ...newResult.face[i], rotation, box, boxRaw }; - } else { - bufferedResult.face[i] = { ...newResult.face[i], box, boxRaw }; - } - } - } - if (!bufferedResult.object || newResult.object.length !== bufferedResult.object.length) { - bufferedResult.object = JSON.parse(JSON.stringify(newResult.object)); - } else { - for (let i = 0; i < newResult.object.length; i++) { - const box = newResult.object[i].box.map((b, j) => ((bufferedFactor - 1) * bufferedResult.object[i].box[j] + b) / bufferedFactor); - const boxRaw = newResult.object[i].boxRaw.map((b, j) => ((bufferedFactor - 1) * bufferedResult.object[i].boxRaw[j] + b) / bufferedFactor); - bufferedResult.object[i] = { ...newResult.object[i], box, boxRaw }; - } - } - if (newResult.persons) { - const newPersons = newResult.persons; - if (!bufferedResult.persons || newPersons.length !== bufferedResult.persons.length) { - bufferedResult.persons = JSON.parse(JSON.stringify(newPersons)); - } else { - for (let i = 0; i < newPersons.length; i++) { - bufferedResult.persons[i].box = newPersons[i].box.map((box, j) => ((bufferedFactor - 1) * bufferedResult.persons[i].box[j] + box) / bufferedFactor); - } - } - } - if (newResult.gesture) - bufferedResult.gesture = newResult.gesture; - const t1 = now(); - interpolateTime = env.perfadd ? interpolateTime + Math.round(t1 - t0) : Math.round(t1 - t0); - if (newResult.performance) - bufferedResult.performance = { ...newResult.performance, interpolate: interpolateTime }; - return bufferedResult; -} - -// src/face/match.ts -var match_exports = {}; -__export(match_exports, { - distance: () => distance, - match: () => match2, - similarity: () => similarity -}); -function distance(descriptor1, descriptor2, options4 = { order: 2, multiplier: 25 }) { - if (!descriptor1 || !descriptor1) - return Number.MAX_SAFE_INTEGER; - let sum3 = 0; - for (let i = 0; i < descriptor1.length; i++) { - const diff = !options4.order || options4.order === 2 ? descriptor1[i] - descriptor2[i] : Math.abs(descriptor1[i] - descriptor2[i]); - sum3 += !options4.order || options4.order === 2 ? diff * diff : diff ** options4.order; - } - return (options4.multiplier || 20) * sum3; -} -var normalizeDistance = (dist, order, min2, max4) => { - if (dist === 0) - return 1; - const root = order === 2 ? Math.sqrt(dist) : dist ** (1 / order); - const norm = (1 - root / 100 - min2) / (max4 - min2); - const clamp2 = Math.max(Math.min(norm, 1), 0); - return clamp2; -}; -function similarity(descriptor1, descriptor2, options4 = { order: 2, multiplier: 25, min: 0.2, max: 0.8 }) { - const dist = distance(descriptor1, descriptor2, options4); - return normalizeDistance(dist, options4.order || 2, options4.min || 0, options4.max || 1); -} -function match2(descriptor, descriptors, options4 = { order: 2, multiplier: 25, threshold: 0, min: 0.2, max: 0.8 }) { - if (!Array.isArray(descriptor) || !Array.isArray(descriptors) || descriptor.length < 64 || descriptors.length === 0) { - return { index: -1, distance: Number.POSITIVE_INFINITY, similarity: 0 }; - } - let lowestDistance = Number.MAX_SAFE_INTEGER; - let index2 = -1; - for (let i = 0; i < descriptors.length; i++) { - const res = descriptors[i].length === descriptor.length ? distance(descriptor, descriptors[i], options4) : Number.MAX_SAFE_INTEGER; - if (res < lowestDistance) { - lowestDistance = res; - index2 = i; - } - if (lowestDistance < (options4.threshold || 0)) - break; - } - const normalizedSimilarity = normalizeDistance(lowestDistance, options4.order || 2, options4.min || 0, options4.max || 1); - return { index: index2, distance: lowestDistance, similarity: normalizedSimilarity }; -} - -// src/util/persons.ts -function join2(faces, bodies, hands, gestures, shape) { - var _a, _b, _c, _d, _e, _f; - let id = 0; - const persons = []; - for (const face4 of faces) { - const person2 = { id: id++, face: face4, body: null, hands: { left: null, right: null }, gestures: [], box: [0, 0, 0, 0] }; - for (const body4 of bodies) { - if (face4.box[0] > body4.box[0] && face4.box[0] < body4.box[0] + body4.box[2] && face4.box[1] + face4.box[3] > body4.box[1] && face4.box[1] + face4.box[3] < body4.box[1] + body4.box[3]) { - person2.body = body4; - } - } - if (person2.body) { - for (const hand3 of hands) { - if (hand3.box[0] + hand3.box[2] > person2.body.box[0] && hand3.box[0] + hand3.box[2] < person2.body.box[0] + person2.body.box[2] && hand3.box[1] + hand3.box[3] > person2.body.box[1] && hand3.box[1] + hand3.box[3] < person2.body.box[1] + person2.body.box[3]) { - if (person2.hands) - person2.hands.left = hand3; - } - if (hand3.box[0] < person2.body.box[0] + person2.body.box[2] && hand3.box[0] > person2.body.box[0] && hand3.box[1] + hand3.box[3] > person2.body.box[1] && hand3.box[1] + hand3.box[3] < person2.body.box[1] + person2.body.box[3]) { - if (person2.hands) - person2.hands.right = hand3; - } - } - } - for (const gesture2 of gestures) { - if (gesture2["face"] !== void 0 && gesture2["face"] === face4.id) - person2.gestures.push(gesture2); - else if (gesture2["iris"] !== void 0 && gesture2["iris"] === face4.id) - person2.gestures.push(gesture2); - else if (gesture2["body"] !== void 0 && gesture2["body"] === ((_a = person2.body) == null ? void 0 : _a.id)) - person2.gestures.push(gesture2); - else if (gesture2["hand"] !== void 0 && gesture2["hand"] === ((_b = person2.hands.left) == null ? void 0 : _b.id)) - person2.gestures.push(gesture2); - else if (gesture2["hand"] !== void 0 && gesture2["hand"] === ((_c = person2.hands.right) == null ? void 0 : _c.id)) - person2.gestures.push(gesture2); - } - const x = []; - const y = []; - const extractXY = (box) => { - if (box && box.length === 4) { - x.push(box[0], box[0] + box[2]); - y.push(box[1], box[1] + box[3]); - } - }; - extractXY(person2.face.box); - extractXY((_d = person2.body) == null ? void 0 : _d.box); - extractXY((_e = person2.hands.left) == null ? void 0 : _e.box); - extractXY((_f = person2.hands.right) == null ? void 0 : _f.box); - const minX = Math.min(...x); - const minY = Math.min(...y); - person2.box = [minX, minY, Math.max(...x) - minX, Math.max(...y) - minY]; - if ((shape == null ? void 0 : shape[1]) && (shape == null ? void 0 : shape[2])) - person2.boxRaw = [person2.box[0] / shape[2], person2.box[1] / shape[1], person2.box[2] / shape[2], person2.box[3] / shape[1]]; - persons.push(person2); - } - return persons; -} - -// src/sample.ts -var face3 = ` + ${e.box[0]} ${r}, + ${e.box[0]+e.box[2]} ${r}, + ${e.box[0]+e.box[2]} ${e.box[1]+e.box[3]/2} + `);t.stroke(A),t.stroke(s)}}function FA(e,t){var n;if(K.drawGaze&&((n=e.rotation)==null?void 0:n.gaze.strength)&&e.rotation.gaze.bearing&&e.annotations.leftEyeIris&&e.annotations.rightEyeIris&&e.annotations.leftEyeIris[0]&&e.annotations.rightEyeIris[0]){t.strokeStyle="pink",t.fillStyle="pink";let o=[e.annotations.leftEyeIris[0][0]+Math.sin(e.rotation.gaze.bearing)*e.rotation.gaze.strength*e.box[3],e.annotations.leftEyeIris[0][1]+Math.cos(e.rotation.gaze.bearing)*e.rotation.gaze.strength*e.box[2]];m1(t,[e.annotations.leftEyeIris[0][0],e.annotations.leftEyeIris[0][1]],[o[0],o[1]],4);let r=[e.annotations.rightEyeIris[0][0]+Math.sin(e.rotation.gaze.bearing)*e.rotation.gaze.strength*e.box[3],e.annotations.rightEyeIris[0][1]+Math.cos(e.rotation.gaze.bearing)*e.rotation.gaze.strength*e.box[2]];m1(t,[e.annotations.rightEyeIris[0][0],e.annotations.rightEyeIris[0][1]],[r[0],r[1]],4)}}function GA(e,t){if(K.drawPolygons&&e.mesh.length>=468){t.lineWidth=1;for(let n=0;ne.mesh[r]);f1(t,o,K)}LA(e,t)}}function BA(e,t){if(K.drawPoints&&e.mesh.length>=468)for(let n=0;n0&&(BA(r,o),GA(r,o),WA(r,o),FA(r,o))}}function T2(e,t,n){let o=s0(S0,n);if(!t||!e)return;let r=K0(e);if(!!r){r.lineJoin="round";for(let s=0;s0)for(let A of s.keypoints)r.fillStyle=ve(A[2],o),Pe(r,A[0],A[1],0,o);if(o.drawLabels&&s.annotations){let A=(a,l)=>{if(!a||a.length===0||!a[0])return;let c=a[a.length-1][2]||-256;r.fillStyle=ve(c,o),r.fillText(l,a[a.length-1][0]+4,a[a.length-1][1]+4)};r.font=o.font,A(s.annotations.index,"index"),A(s.annotations.middle,"middle"),A(s.annotations.ring,"ring"),A(s.annotations.pinky,"pinky"),A(s.annotations.thumb,"thumb"),A(s.annotations.palm,"palm")}if(o.drawPolygons&&s.annotations){let A=a=>{if(!(!a||a.length===0||!a[0]))for(let l=0;l0?l-1:0][0],a[l>0?l-1:0][1]),r.lineTo(a[l][0],a[l][1]),r.stroke()}};r.lineWidth=o.lineWidth,A(s.annotations.index),A(s.annotations.middle),A(s.annotations.ring),A(s.annotations.pinky),A(s.annotations.thumb)}}}}function P2(e,t,n){let o=s0(S0,n);if(!t||!e)return;let r=K0(e);if(!!r){r.lineJoin="round",r.font=o.font;for(let s of t)if(o.drawBoxes){if(r.strokeStyle=o.color,r.fillStyle=o.color,pe(r,s.box[0],s.box[1],s.box[2],s.box[3],o),o.drawLabels){let A=`${s.label} ${Math.round(100*s.score)}%`;o.shadowColor&&o.shadowColor!==""&&(r.fillStyle=o.shadowColor,r.fillText(A,s.box[0]+3,1+s.box[1]+o.lineHeight,s.box[2])),r.fillStyle=o.labelColor,r.fillText(A,s.box[0]+2,0+s.box[1]+o.lineHeight,s.box[2])}r.stroke()}}}function R2(e,t,n){let o=s0(S0,n);if(!(!t||!e)&&o.drawGestures){let r=K0(e);if(!r)return;r.font=o.font,r.fillStyle=o.color;let s=1;for(let A=0;A1&&l[1].length>0){let c=a[1]>0?`#${a[1]}`:"",x=`${a[0]} ${c}: ${l[1]}`;o.shadowColor&&o.shadowColor!==""&&(r.fillStyle=o.shadowColor,r.fillText(x,8,2+s*o.lineHeight)),r.fillStyle=o.labelColor,r.fillText(x,6,0+s*o.lineHeight),s+=1}}}}var p1=0;function u1(e,t,n){let o=s0(S0,n);if(!t||!e)return;let r=K0(e);if(!!r){r.lineJoin="round",r.font=o.font;for(let s=0;st!=n[r].y>t&&e<(n[r].x-n[s].x)*(t-n[s].y)/(n[r].y-n[s].y)+n[s].x&&(o=!o);return o}async function Ro(e){if(!e.tensor||!e.mesh||e.mesh.length<100)return e.tensor;let t=e.tensor.shape[2]||0,n=e.tensor.shape[1]||0,o=await e.tensor.buffer(),r=[];for(let A of te.silhouette)r.push({x:(e.mesh[A][0]-e.box[0])/e.box[2],y:(e.mesh[A][1]-e.box[1])/e.box[3]});k2&&k2>0&&(r=r.map(A=>({x:A.x>.5?A.x+k2:A.x-k2,y:A.y>.5?A.y+k2:A.y-k2})));for(let A=0;A{let t=(i,f)=>Math.atan2(i[1]-f[1],i[0]-f[0]);if(!e.annotations.rightEyeIris||!e.annotations.leftEyeIris)return{bearing:0,strength:0};let n=[0,-.1],o=1,r=(e.mesh[33][2]||0)>(e.mesh[263][2]||0),s=r?e.mesh[473]:e.mesh[468],A=r?[(e.mesh[133][0]+e.mesh[33][0])/2,(e.mesh[133][1]+e.mesh[33][1])/2]:[(e.mesh[263][0]+e.mesh[362][0])/2,(e.mesh[263][1]+e.mesh[362][1])/2],a=r?[e.mesh[133][0]-e.mesh[33][0],e.mesh[23][1]-e.mesh[27][1]]:[e.mesh[263][0]-e.mesh[362][0],e.mesh[253][1]-e.mesh[257][1]],l=[(A[0]-s[0])/a[0]-n[0],o*(s[1]-A[1])/a[1]-n[1]],c=Math.sqrt(l[0]*l[0]+l[1]*l[1]);return c=Math.min(c,e.boxRaw[2]/2,e.boxRaw[3]/2),{bearing:(t([0,0],l)+Math.PI/2)%Math.PI,strength:c}},ko=(e,t)=>{let n=p=>{let g=Math.sqrt(p[0]*p[0]+p[1]*p[1]+p[2]*p[2]);return p[0]/=g,p[1]/=g,p[2]/=g,p},o=(p,g)=>{let v=p[0]-g[0],T=p[1]-g[1],y=p[2]-g[2];return[v,T,y]},r=(p,g)=>{let v=p[1]*g[2]-p[2]*g[1],T=p[2]*g[0]-p[0]*g[2],y=p[0]*g[1]-p[1]*g[0];return[v,T,y]},s=p=>{let[g,v,T,y,b,z,w,O,q]=p,t0,Z,U;return y<1?y>-1?(U=Math.asin(y),Z=Math.atan2(-w,g),t0=Math.atan2(-z,b)):(U=-Math.PI/2,Z=-Math.atan2(O,q),t0=0):(U=Math.PI/2,Z=Math.atan2(O,q),t0=0),Number.isNaN(t0)&&(t0=0),Number.isNaN(Z)&&(Z=0),Number.isNaN(U)&&(U=0),{pitch:2*-t0,yaw:2*-Z,roll:2*-U}},A=e.meshRaw;if(!A||A.length<300)return{angle:{pitch:0,yaw:0,roll:0},matrix:[1,0,0,0,1,0,0,0,1],gaze:{bearing:0,strength:0}};let a=Math.max(e.boxRaw[2]*t[0],e.boxRaw[3]*t[1])/1.5,l=[A[10],A[152],A[234],A[454]].map(p=>[p[0]*t[0]/a,p[1]*t[1]/a,p[2]]),c=n(o(l[1],l[0])),x=n(o(l[3],l[2])),i=n(r(x,c));x=r(c,i);let f=[x[0],x[1],x[2],c[0],c[1],c[2],i[0],i[1],i[2]],d=s(f),m=A.length===478?ZA(e):{bearing:0,strength:0};return{angle:d,matrix:f,gaze:m}};var T1=async(e,t)=>{var m,p,g,v,T,y,b,z,w,O,q,t0,Z,U,r0,P,G,P0,e0,u0,x0,H,X,J0,Q0,Re,ke,ue,E2;let n=M(),o,r,s,A,a,l,c,x,i,f=[];e.state="run:face";let d=await W3(t,e.config);if(e.performance.face=k.perfadd?(e.performance.face||0)+Math.trunc(M()-n):Math.trunc(M()-n),!t.shape||t.shape.length!==4)return[];if(!d)return[];for(let E=0;E200?ko(d[E],[t.shape[2],t.shape[1]]):null;e.analyze("Start Emotion:"),e.config.async?A=(p=e.config.face.emotion)!=null&&p.enabled?u5(d[E].tensor||a0.tensor([]),e.config,E,d.length):[]:(e.state="run:emotion",n=M(),A=(g=e.config.face.emotion)!=null&&g.enabled?await u5(d[E].tensor||a0.tensor([]),e.config,E,d.length):[],e.performance.emotion=k.perfadd?(e.performance.emotion||0)+Math.trunc(M()-n):Math.trunc(M()-n)),e.analyze("End Emotion:"),e.analyze("Start AntiSpoof:"),e.config.async?c=(v=e.config.face.antispoof)!=null&&v.enabled?_t(d[E].tensor||a0.tensor([]),e.config,E,d.length):0:(e.state="run:antispoof",n=M(),c=(T=e.config.face.antispoof)!=null&&T.enabled?await _t(d[E].tensor||a0.tensor([]),e.config,E,d.length):0,e.performance.antispoof=k.perfadd?(e.performance.antispoof||0)+Math.trunc(M()-n):Math.trunc(M()-n)),e.analyze("End AntiSpoof:"),e.analyze("Start Liveness:"),e.config.async?x=(y=e.config.face.liveness)!=null&&y.enabled?B5(d[E].tensor||a0.tensor([]),e.config,E,d.length):0:(e.state="run:liveness",n=M(),x=(b=e.config.face.liveness)!=null&&b.enabled?await B5(d[E].tensor||a0.tensor([]),e.config,E,d.length):0,e.performance.liveness=k.perfadd?(e.performance.antispoof||0)+Math.trunc(M()-n):Math.trunc(M()-n)),e.analyze("End Liveness:"),e.analyze("Start GEAR:"),e.config.async?r=(z=e.config.face.gear)!=null&&z.enabled?w5(d[E].tensor||a0.tensor([]),e.config,E,d.length):null:(e.state="run:gear",n=M(),r=(w=e.config.face.gear)!=null&&w.enabled?await w5(d[E].tensor||a0.tensor([]),e.config,E,d.length):null,e.performance.gear=Math.trunc(M()-n)),e.analyze("End GEAR:"),e.analyze("Start SSRNet:"),e.config.async?(o=(O=e.config.face.ssrnet)!=null&&O.enabled?i1(d[E].tensor||a0.tensor([]),e.config,E,d.length):null,s=(q=e.config.face.ssrnet)!=null&&q.enabled?d1(d[E].tensor||a0.tensor([]),e.config,E,d.length):null):(e.state="run:ssrnet",n=M(),o=(t0=e.config.face.ssrnet)!=null&&t0.enabled?await i1(d[E].tensor||a0.tensor([]),e.config,E,d.length):null,s=(Z=e.config.face.ssrnet)!=null&&Z.enabled?await d1(d[E].tensor||a0.tensor([]),e.config,E,d.length):null,e.performance.ssrnet=Math.trunc(M()-n)),e.analyze("End SSRNet:"),e.analyze("Start MobileFaceNet:"),e.config.async?a=(U=e.config.face.mobilefacenet)!=null&&U.enabled?D5(d[E].tensor||a0.tensor([]),e.config,E,d.length):null:(e.state="run:mobilefacenet",n=M(),a=(r0=e.config.face.mobilefacenet)!=null&&r0.enabled?await D5(d[E].tensor||a0.tensor([]),e.config,E,d.length):null,e.performance.mobilefacenet=Math.trunc(M()-n)),e.analyze("End MobileFaceNet:"),e.analyze("Start InsightFace:"),e.config.async?l=(P=e.config.face.insightface)!=null&&P.enabled?F5(d[E].tensor||a0.tensor([]),e.config,E,d.length):null:(e.state="run:mobilefacenet",n=M(),l=(G=e.config.face.insightface)!=null&&G.enabled?await F5(d[E].tensor||a0.tensor([]),e.config,E,d.length):null,e.performance.mobilefacenet=Math.trunc(M()-n)),e.analyze("End InsightFace:"),e.analyze("Start Description:"),e.config.async?i=v5(d[E].tensor||a0.tensor([]),e.config,E,d.length):(e.state="run:description",n=M(),i=await v5(d[E].tensor||a0.tensor([]),e.config,E,d.length),e.performance.description=k.perfadd?(e.performance.description||0)+Math.trunc(M()-n):Math.trunc(M()-n)),e.analyze("End Description:"),e.config.async&&([o,s,A,a,l,i,r,c,x]=await Promise.all([o,s,A,a,l,i,r,c,x])),e.analyze("Finish Face:"),((P0=e.config.face.ssrnet)==null?void 0:P0.enabled)&&o&&s&&(i={...i,age:o.age,gender:s.gender,genderScore:s.genderScore}),((e0=e.config.face.gear)==null?void 0:e0.enabled)&&r&&(i={...i,age:r.age,gender:r.gender,genderScore:r.genderScore,race:r.race}),((u0=e.config.face.mobilefacenet)==null?void 0:u0.enabled)&&a&&(i.descriptor=a),((x0=e.config.face.insightface)==null?void 0:x0.enabled)&&l&&(i.descriptor=l),(H=e.config.face.iris)!=null&&H.enabled;let s2=((Q0=(J0=(X=d[E])==null?void 0:X.annotations)==null?void 0:J0.leftEyeIris)==null?void 0:Q0[0])&&((ue=(ke=(Re=d[E])==null?void 0:Re.annotations)==null?void 0:ke.rightEyeIris)==null?void 0:ue[0])&&d[E].annotations.leftEyeIris.length>0&&d[E].annotations.rightEyeIris.length>0&&d[E].annotations.leftEyeIris[0]!==null&&d[E].annotations.rightEyeIris[0]!==null?Math.max(Math.abs(d[E].annotations.leftEyeIris[3][0]-d[E].annotations.leftEyeIris[1][0]),Math.abs(d[E].annotations.rightEyeIris[4][1]-d[E].annotations.rightEyeIris[2][1]))/t.shape[2]:0,E1=(E2=e.config.face.detector)!=null&&E2.return?a0.squeeze(d[E].tensor):null;a0.dispose(d[E].tensor),d[E].tensor&&delete d[E].tensor;let _0={...d[E],id:E};i.age&&(_0.age=i.age),i.gender&&(_0.gender=i.gender),i.genderScore&&(_0.genderScore=i.genderScore),i.descriptor&&(_0.embedding=i.descriptor),i.race&&(_0.race=i.race),A&&(_0.emotion=A),c&&(_0.real=c),x&&(_0.live=x),s2&&s2!==0&&(_0.iris=Math.trunc(500/s2/11.7)/100),z2&&(_0.rotation=z2),E1&&(_0.tensor=E1),f.push(_0),e.analyze("End Face")}return e.analyze("End FaceMesh:"),e.config.async&&(e.performance.face&&delete e.performance.face,e.performance.age&&delete e.performance.age,e.performance.gender&&delete e.performance.gender,e.performance.emotion&&delete e.performance.emotion),f};var wo=e=>{if(!e)return[];let t=[];for(let n=0;nl.part==="leftWrist"),r=e[n].keypoints.find(l=>l.part==="rightWrist"),s=e[n].keypoints.find(l=>l.part==="nose");s&&o&&r&&o.position[1]l.part==="leftShoulder"),a=e[n].keypoints.find(l=>l.part==="rightShoulder");A&&a&&Math.abs(A.positionRaw[1]-a.positionRaw[1])>.1&&t.push({body:n,gesture:`leaning ${A.position[1]>a.position[1]?"left":"right"}`})}return t},Eo=e=>{if(!e)return[];let t=[];for(let n=0;n450){let o=(e[n].mesh[33][2]||0)-(e[n].mesh[263][2]||0),r=e[n].mesh[33][0]-e[n].mesh[263][0];Math.abs(o/r)<=.15?t.push({face:n,gesture:"facing center"}):t.push({face:n,gesture:`facing ${o<0?"left":"right"}`}),Math.abs(e[n].mesh[374][1]-e[n].mesh[386][1])/Math.abs(e[n].mesh[443][1]-e[n].mesh[450][1])<.2&&t.push({face:n,gesture:"blink left eye"}),Math.abs(e[n].mesh[145][1]-e[n].mesh[159][1])/Math.abs(e[n].mesh[223][1]-e[n].mesh[230][1])<.2&&t.push({face:n,gesture:"blink right eye"});let a=Math.min(100,500*Math.abs(e[n].mesh[13][1]-e[n].mesh[14][1])/Math.abs(e[n].mesh[10][1]-e[n].mesh[152][1]));a>10&&t.push({face:n,gesture:`mouth ${Math.trunc(a)}% open`});let l=e[n].mesh[152][2]||0;Math.abs(l)>10&&t.push({face:n,gesture:`head ${l<0?"up":"down"}`})}return t},zo=e=>{var n,o,r,s;if(!e)return[];let t=[];for(let A=0;A.06||g>.06)&&(d=!1),p>g?p>.05&&t.push({iris:A,gesture:"looking right"}):g>.05&&t.push({iris:A,gesture:"looking left"});let v=Math.abs(e[A].mesh[145][1]-e[A].annotations.rightEyeIris[0][1])/e[A].box[3],T=Math.abs(e[A].mesh[374][1]-e[A].annotations.leftEyeIris[0][1])/e[A].box[3];(T<.01||v<.01||T>.022||v>.022)&&(d=!1),(T<.01||v<.01)&&t.push({iris:A,gesture:"looking down"}),(T>.022||v>.022)&&t.push({iris:A,gesture:"looking up"}),d&&t.push({iris:A,gesture:"looking center"})}return t},So=e=>{if(!e)return[];let t=[];for(let n=0;n0){let r=o.reduce((A,a)=>(A.position[2]||0)<(a.position[2]||0)?A:a);t.push({hand:n,gesture:`${r.name} forward`});let s=o.reduce((A,a)=>A.position[1]((r-1)*j.body[P].box[X]+H)/r),P0=e.body[P].boxRaw.map((H,X)=>((r-1)*j.body[P].boxRaw[X]+H)/r),e0=e.body[P].keypoints.map((H,X)=>{var J0,Q0,Re,ke,ue,E2,E,z2,s2;return{score:H.score,part:H.part,position:[j.body[P].keypoints[X]?((r-1)*(j.body[P].keypoints[X].position[0]||0)+(H.position[0]||0))/r:H.position[0],j.body[P].keypoints[X]?((r-1)*(j.body[P].keypoints[X].position[1]||0)+(H.position[1]||0))/r:H.position[1],j.body[P].keypoints[X]?((r-1)*(j.body[P].keypoints[X].position[2]||0)+(H.position[2]||0))/r:H.position[2]],positionRaw:[j.body[P].keypoints[X]?((r-1)*(j.body[P].keypoints[X].positionRaw[0]||0)+(H.positionRaw[0]||0))/r:H.positionRaw[0],j.body[P].keypoints[X]?((r-1)*(j.body[P].keypoints[X].positionRaw[1]||0)+(H.positionRaw[1]||0))/r:H.positionRaw[1],j.body[P].keypoints[X]?((r-1)*(j.body[P].keypoints[X].positionRaw[2]||0)+(H.positionRaw[2]||0))/r:H.positionRaw[2]],distance:[j.body[P].keypoints[X]?((r-1)*(((J0=j.body[P].keypoints[X].distance)==null?void 0:J0[0])||0)+(((Q0=H.distance)==null?void 0:Q0[0])||0))/r:(Re=H.distance)==null?void 0:Re[0],j.body[P].keypoints[X]?((r-1)*(((ke=j.body[P].keypoints[X].distance)==null?void 0:ke[1])||0)+(((ue=H.distance)==null?void 0:ue[1])||0))/r:(E2=H.distance)==null?void 0:E2[1],j.body[P].keypoints[X]?((r-1)*(((E=j.body[P].keypoints[X].distance)==null?void 0:E[2])||0)+(((z2=H.distance)==null?void 0:z2[2])||0))/r:(s2=H.distance)==null?void 0:s2[2]]}}),u0={},x0={connected:{}};(A=t.body.modelPath)!=null&&A.includes("efficientpose")?x0=dt:(a=t.body.modelPath)!=null&&a.includes("blazepose")?x0=At:(l=t.body.modelPath)!=null&&l.includes("movenet")&&(x0=G2);for(let[H,X]of Object.entries(x0.connected)){let J0=[];for(let Q0=0;Q0ue.part===X[Q0]),ke=e0.find(ue=>ue.part===X[Q0+1]);Re&&ke&&J0.push([Re.position,ke.position])}u0[H]=J0}j.body[P]={...e.body[P],box:G,boxRaw:P0,keypoints:e0,annotations:u0}}if(!j.hand||e.hand.length!==j.hand.length)j.hand=JSON.parse(JSON.stringify(e.hand));else for(let P=0;P((r-1)*j.hand[P].box[H]+x0)/r),P0=e.hand[P].boxRaw.map((x0,H)=>((r-1)*j.hand[P].boxRaw[H]+x0)/r);j.hand[P].keypoints.length!==e.hand[P].keypoints.length&&(j.hand[P].keypoints=e.hand[P].keypoints);let e0=e.hand[P].keypoints&&e.hand[P].keypoints.length>0?e.hand[P].keypoints.map((x0,H)=>x0.map((X,J0)=>((r-1)*(j.hand[P].keypoints[H][J0]||1)+(X||0))/r)):[],u0={};if(Object.keys(j.hand[P].annotations).length!==Object.keys(e.hand[P].annotations).length)j.hand[P].annotations=e.hand[P].annotations,u0=j.hand[P].annotations;else if(e.hand[P].annotations)for(let x0 of Object.keys(e.hand[P].annotations))u0[x0]=(i=(x=(c=e.hand[P])==null?void 0:c.annotations)==null?void 0:x[x0])!=null&&i[0]?e.hand[P].annotations[x0].map((H,X)=>H.map((J0,Q0)=>((r-1)*j.hand[P].annotations[x0][X][Q0]+J0)/r)):null;j.hand[P]={...e.hand[P],box:G,boxRaw:P0,keypoints:e0,annotations:u0}}if(!j.face||e.face.length!==j.face.length)j.face=JSON.parse(JSON.stringify(e.face));else for(let P=0;P((r-1)*j.face[P].box[u0]+e0)/r),P0=e.face[P].boxRaw.map((e0,u0)=>((r-1)*j.face[P].boxRaw[u0]+e0)/r);if(e.face[P].rotation){let e0={matrix:[0,0,0,0,0,0,0,0,0],angle:{roll:0,yaw:0,pitch:0},gaze:{bearing:0,strength:0}};e0.matrix=(f=e.face[P].rotation)==null?void 0:f.matrix,e0.angle={roll:((r-1)*(((m=(d=j.face[P].rotation)==null?void 0:d.angle)==null?void 0:m.roll)||0)+(((g=(p=e.face[P].rotation)==null?void 0:p.angle)==null?void 0:g.roll)||0))/r,yaw:((r-1)*(((T=(v=j.face[P].rotation)==null?void 0:v.angle)==null?void 0:T.yaw)||0)+(((b=(y=e.face[P].rotation)==null?void 0:y.angle)==null?void 0:b.yaw)||0))/r,pitch:((r-1)*(((w=(z=j.face[P].rotation)==null?void 0:z.angle)==null?void 0:w.pitch)||0)+(((q=(O=e.face[P].rotation)==null?void 0:O.angle)==null?void 0:q.pitch)||0))/r},e0.gaze={bearing:((r-1)*(((t0=j.face[P].rotation)==null?void 0:t0.gaze.bearing)||0)+(((Z=e.face[P].rotation)==null?void 0:Z.gaze.bearing)||0))/r,strength:((r-1)*(((U=j.face[P].rotation)==null?void 0:U.gaze.strength)||0)+(((r0=e.face[P].rotation)==null?void 0:r0.gaze.strength)||0))/r},j.face[P]={...e.face[P],rotation:e0,box:G,boxRaw:P0}}else j.face[P]={...e.face[P],box:G,boxRaw:P0}}if(!j.object||e.object.length!==j.object.length)j.object=JSON.parse(JSON.stringify(e.object));else for(let P=0;P((r-1)*j.object[P].box[u0]+e0)/r),P0=e.object[P].boxRaw.map((e0,u0)=>((r-1)*j.object[P].boxRaw[u0]+e0)/r);j.object[P]={...e.object[P],box:G,boxRaw:P0}}if(e.persons){let P=e.persons;if(!j.persons||P.length!==j.persons.length)j.persons=JSON.parse(JSON.stringify(P));else for(let G=0;G((r-1)*j.persons[G].box[e0]+P0)/r)}e.gesture&&(j.gesture=e.gesture);let s=M();return v1=k.perfadd?v1+Math.round(s-n):Math.round(s-n),e.performance&&(j.performance={...e.performance,interpolate:v1}),j}var k1={};we(k1,{distance:()=>Z2,match:()=>R1,similarity:()=>P1});function Z2(e,t,n={order:2,multiplier:25}){if(!e||!e)return Number.MAX_SAFE_INTEGER;let o=0;for(let r=0;r{if(e===0)return 1;let r=t===2?Math.sqrt(e):e**(1/t),s=(1-r/100-n)/(o-n);return Math.max(Math.min(s,1),0)};function P1(e,t,n={order:2,multiplier:25,min:.2,max:.8}){let o=Z2(e,t,n);return No(o,n.order||2,n.min||0,n.max||1)}function R1(e,t,n={order:2,multiplier:25,threshold:0,min:.2,max:.8}){if(!Array.isArray(e)||!Array.isArray(t)||e.length<64||t.length===0)return{index:-1,distance:Number.POSITIVE_INFINITY,similarity:0};let o=Number.MAX_SAFE_INTEGER,r=-1;for(let A=0;Ab.box[0]&&d.box[0]b.box[1]&&d.box[1]+d.box[3]m.body.box[0]&&b.box[0]+b.box[2]m.body.box[1]&&b.box[1]+b.box[3]m.body.box[0]&&b.box[1]+b.box[3]>m.body.box[1]&&b.box[1]+b.box[3]{b&&b.length===4&&(p.push(b[0],b[0]+b[2]),g.push(b[1],b[1]+b[3]))};v(m.face.box),v((x=m.body)==null?void 0:x.box),v((i=m.hands.left)==null?void 0:i.box),v((f=m.hands.right)==null?void 0:f.box);let T=Math.min(...p),y=Math.min(...g);m.box=[T,y,Math.max(...p)-T,Math.max(...g)-y],(r==null?void 0:r[1])&&(r==null?void 0:r[2])&&(m.boxRaw=[m.box[0]/r[2],m.box[1]/r[1],m.box[2]/r[2],m.box[3]/r[1]]),A.push(m)}return A}var Bt=` /9j/4AAQSkZJRgABAQEAYABgAAD/4QBoRXhpZgAATU0AKgAAAAgABAEaAAUAAAABAAAAPgEbAAUA AAABAAAARgEoAAMAAAABAAIAAAExAAIAAAARAAAATgAAAAAAAABgAAAAAQAAAGAAAAABcGFpbnQu bmV0IDQuMi4xMwAA/9sAQwAGBAUGBQQGBgUGBwcGCAoQCgoJCQoUDg8MEBcUGBgXFBYWGh0lHxob @@ -13985,8 +259,7 @@ PQ4GJ+ashuK0MhWaoWcA0AaOmASMK7jRNPWYBmHyiuepO2x10qfcv6vYxCzYqoGK4HVYVTJrmb5l c6oaM5TUJ8EgGsG4kLNUHT0M64OaqMMikSRsuKbnFMRLG3zVehOaGNE445NNlnVFpDMu6uie9Vo1 8z5mOAOST2pDK91cNN+5tsrH3PrW54a06KxT7fdrlh/q1Pc+tJ6IUdZGvHPLezMcnBOWbsPap5r3 ylFtbdT1xUWNWzU0/Zbwlgfmx8zGsHWtRHmMqE59aAMyNifvHPc1f0gtPdqkY5JosJHeNci2tktY -euPnNY+oXWZEVJNrZ9aun8SIq/CzodHuriIokhDIR1ronbKZr0o6o8ipoz//2Q==`; -var body3 = ` +euPnNY+oXWZEVJNrZ9aun8SIq/CzodHuriIokhDIR1ronbKZr0o6o8ipoz//2Q==`,Ht=` /9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAsICAoIBwsKCQoNDAsNERwSEQ8PESIZGhQcKSQrKigk JyctMkA3LTA9MCcnOEw5PUNFSElIKzZPVU5GVEBHSEX/2wBDAQwNDREPESESEiFFLicuRUVFRUVF RUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUVFRUX/wAARCASwBLADASIA @@ -14554,580 +827,4 @@ AAAAAAJAAAAAAAAAAAAAABAJEAAAAAAAAAAAAAAAIEoBKAAAAAAAAAAAAAAABAlAAAAAAAIAAAAA BAkBAkBAkBAlACEgMZjdjbFW8bWrEx8YWANb6Fp+bfwab+vLDKMFK9qxH5L0bAr8OPRPKz2AY7J2 SbAjYZAI2E7AIEgIEgIEgMdkSy2NgY7MdlmyNoBXsxmFuyNgVTVjNV3KjlBRNTlXTVHKCrlIqt5T lBhEMohlFerLlBjEMohMVTEARDKCITsAk2AEgAAAkAAAAAAAAAAAAAAAAAAAAAAAASAAAAAAAAD/ -2Q==`; - -// src/warmup.ts -var tf38 = __toESM(require_tfjs_esm()); -async function warmupBitmap(instance2) { - const b64toBlob = (base64, type = "application/octet-stream") => fetch(`data:${type};base64,${base64}`).then((res2) => res2.blob()); - let blob; - let res; - switch (instance2.config.warmup) { - case "face": - blob = await b64toBlob(face3); - break; - case "body": - case "full": - blob = await b64toBlob(body3); - break; - default: - blob = null; - } - if (blob) { - const bitmap = await createImageBitmap(blob); - res = await instance2.detect(bitmap, instance2.config); - bitmap.close(); - } - return res; -} -async function warmupCanvas(instance2) { - return new Promise((resolve) => { - let src; - switch (instance2.config.warmup) { - case "face": - src = "data:image/jpeg;base64," + face3; - break; - case "full": - case "body": - src = "data:image/jpeg;base64," + body3; - break; - default: - src = ""; - } - let img; - if (typeof Image !== "undefined") - img = new Image(); - else if (env.Image) - img = new env.Image(); - else - return; - img.onload = async () => { - const canvas3 = canvas(img.naturalWidth, img.naturalHeight); - if (!canvas3) { - log("Warmup: Canvas not found"); - resolve(void 0); - } else { - const ctx = canvas3.getContext("2d"); - if (ctx) - ctx.drawImage(img, 0, 0); - const tensor6 = await instance2.image(canvas3); - const res = tensor6.tensor ? await instance2.detect(tensor6.tensor, instance2.config) : void 0; - resolve(res); - } - }; - if (src) - img.src = src; - else - resolve(void 0); - }); -} -async function warmupNode(instance2) { - const atob = (str) => Buffer.from(str, "base64"); - let img; - if (instance2.config.warmup === "face") - img = atob(face3); - else - img = atob(body3); - let res; - if ("node" in tf38 && tf38.getBackend() === "tensorflow") { - const data = tf38["node"].decodeJpeg(img); - const expanded = tf38.expandDims(data, 0); - instance2.tf.dispose(data); - res = await instance2.detect(expanded, instance2.config); - instance2.tf.dispose(expanded); - } else { - if (instance2.config.debug) - log("Warmup tfjs-node not loaded"); - } - return res; -} -async function runInference(instance2) { - let res; - if (typeof createImageBitmap === "function") - res = await warmupBitmap(instance2); - else if (typeof Image !== "undefined" || env.Canvas !== void 0) - res = await warmupCanvas(instance2); - else - res = await warmupNode(instance2); - return res; -} -async function runCompile(instance2) { - var _a, _b, _c, _d; - if (!tf38.env().flagRegistry.ENGINE_COMPILE_ONLY) - return; - const backendType = tf38.getBackend(); - const webGLBackend = tf38.backend(); - if (backendType !== "webgl" && backendType !== "humangl" || !(webGLBackend == null ? void 0 : webGLBackend.checkCompileCompletion)) { - return; - } - tf38.env().set("ENGINE_COMPILE_ONLY", true); - const numTensorsStart = tf38.engine().state.numTensors; - const compiledModels = []; - for (const [modelName, model21] of Object.entries(instance2.models).filter(([key, val]) => key !== null && val !== null)) { - const shape = ((_b = (_a = model21.inputs) == null ? void 0 : _a[0]) == null ? void 0 : _b.shape) ? [...model21.inputs[0].shape] : [1, 64, 64, 3]; - const dtype = ((_d = (_c = model21.inputs) == null ? void 0 : _c[0]) == null ? void 0 : _d.dtype) ? model21.inputs[0].dtype : "float32"; - for (let dim = 0; dim < shape.length; dim++) { - if (shape[dim] === -1) - shape[dim] = dim === 0 ? 1 : 64; - } - const tensor6 = tf38.zeros(shape, dtype); - try { - const res = model21.execute(tensor6); - compiledModels.push(modelName); - if (Array.isArray(res)) - res.forEach((t2) => tf38.dispose(t2)); - else - tf38.dispose(res); - } catch (e) { - if (instance2.config.debug) - log("compile fail model:", modelName); - } - tf38.dispose(tensor6); - } - const kernels = await webGLBackend.checkCompileCompletionAsync(); - webGLBackend.getUniformLocations(); - if (instance2.config.debug) - log("compile pass:", { models: compiledModels, kernels: kernels.length }); - tf38.env().set("ENGINE_COMPILE_ONLY", false); - const numTensorsEnd = tf38.engine().state.numTensors; - if (numTensorsEnd - numTensorsStart > 0) - log("tensor leak:", numTensorsEnd - numTensorsStart); -} -async function warmup(instance2, userConfig) { - await check(instance2, false); - const t0 = now(); - instance2.state = "warmup"; - if (userConfig) - instance2.config = mergeDeep(instance2.config, userConfig); - if (!instance2.config.warmup || instance2.config.warmup.length === 0 || instance2.config.warmup === "none") { - return { face: [], body: [], hand: [], gesture: [], object: [], performance: instance2.performance, timestamp: now(), persons: [], error: null }; - } - return new Promise(async (resolve) => { - await models_exports2.load(instance2); - await runCompile(instance2); - const res = await runInference(instance2); - const t1 = now(); - if (instance2.config.debug) - log("warmup", instance2.config.warmup, Math.round(t1 - t0), "ms"); - instance2.emit("warmup"); - resolve(res); - }); -} - -// src/human.ts -var _numTensors, _analyzeMemoryLeaks, _checkSanity, _sanity, _loops; -var Human2 = class { - constructor(userConfig) { - __publicField(this, "version"); - __publicField(this, "config"); - __publicField(this, "result"); - __publicField(this, "state"); - __publicField(this, "process"); - __publicField(this, "tf"); - __publicField(this, "env"); - __publicField(this, "draw"); - __publicField(this, "models"); - __publicField(this, "events"); - __publicField(this, "faceTriangulation"); - __publicField(this, "faceUVMap"); - __publicField(this, "performance"); - __privateAdd(this, _numTensors, void 0); - __privateAdd(this, _analyzeMemoryLeaks, void 0); - __privateAdd(this, _checkSanity, void 0); - __publicField(this, "gl"); - __publicField(this, "analyze", (...msg) => { - if (!__privateGet(this, _analyzeMemoryLeaks)) - return; - const currentTensors = this.tf.engine().state.numTensors; - const previousTensors = __privateGet(this, _numTensors); - __privateSet(this, _numTensors, currentTensors); - const leaked = currentTensors - previousTensors; - if (leaked !== 0) - log(...msg, leaked); - }); - __privateAdd(this, _sanity, (input) => { - if (!__privateGet(this, _checkSanity)) - return null; - if (!input) - return "input is not defined"; - if (this.env.node && !(input instanceof tf39.Tensor)) - return "input must be a tensor"; - try { - this.tf.getBackend(); - } catch (e) { - return "backend not loaded"; - } - return null; - }); - __publicField(this, "similarity", similarity); - __publicField(this, "distance", distance); - __publicField(this, "match", match2); - __publicField(this, "webcam", new WebCam()); - __publicField(this, "emit", (event) => { - var _a; - if ((_a = this.events) == null ? void 0 : _a.dispatchEvent) - this.events.dispatchEvent(new Event(event)); - }); - __privateAdd(this, _loops, {}); - this.env = env; - const tfVersion = (tf39.version.tfjs || tf39.version_core).replace(/-(.*)/, ""); - config.wasmPath = `https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm@${tfVersion}/dist/`; - config.modelBasePath = env.browser ? "../models/" : "file://models/"; - config.backend = env.browser ? "webgl" : "tensorflow"; - this.version = version2; - Object.defineProperty(this, "version", { value: version2 }); - this.config = JSON.parse(JSON.stringify(config)); - Object.seal(this.config); - this.config.cacheModels = typeof indexedDB !== "undefined"; - if (userConfig) - this.config = mergeDeep(this.config, userConfig); - setModelLoadOptions(this.config); - this.tf = tf39; - this.state = "idle"; - __privateSet(this, _numTensors, 0); - __privateSet(this, _analyzeMemoryLeaks, false); - __privateSet(this, _checkSanity, false); - this.performance = {}; - this.events = typeof EventTarget !== "undefined" ? new EventTarget() : void 0; - this.models = new Models(); - this.draw = { - options: options3, - canvas: (input, output) => canvas2(input, output), - face: (output, result, options4) => face(output, result, options4), - body: (output, result, options4) => body(output, result, options4), - hand: (output, result, options4) => hand(output, result, options4), - gesture: (output, result, options4) => gesture(output, result, options4), - object: (output, result, options4) => object(output, result, options4), - person: (output, result, options4) => person(output, result, options4), - all: (output, result, options4) => all(output, result, options4) - }; - this.result = { face: [], body: [], hand: [], gesture: [], object: [], performance: {}, timestamp: 0, persons: [], error: null }; - this.process = { tensor: null, canvas: null }; - this.faceTriangulation = triangulation; - this.faceUVMap = uvmap; - this.gl = config2; - validateModel(this, null, ""); - this.emit("create"); - if (this.config.debug || this.env.browser) - log(`version: ${this.version}`); - if (this.config.debug) - log(`tfjs version: ${this.tf.version["tfjs-core"]}`); - const envTemp = JSON.parse(JSON.stringify(this.env)); - delete envTemp.kernels; - delete envTemp.initial; - delete envTemp.perfadd; - if (this.config.debug) - log("environment:", envTemp); - } - reset() { - const currentBackend = this.config.backend; - this.config = JSON.parse(JSON.stringify(config)); - this.config.backend = currentBackend; - reset(); - env.initial = true; - } - validate(userConfig) { - const msgs = validate(config, userConfig || this.config); - if (msgs.length === 0) - this.config = mergeDeep(this.config, userConfig); - return msgs; - } - check() { - return validate2(this); - } - now() { - return now(); - } - image(input, getTensor = true) { - return process2(input, this.config, getTensor); - } - async segmentation(input, userConfig) { - var _a, _b, _c; - if (userConfig) - this.config = mergeDeep(this.config, userConfig); - if (!this.config.segmentation.enabled) - return null; - const processed = await process2(input, this.config); - if (!processed.tensor) - return null; - let tensor6 = null; - if ((_a = this.config.segmentation.modelPath) == null ? void 0 : _a.includes("rvm")) - tensor6 = await predict18(processed.tensor, this.config); - if ((_b = this.config.segmentation.modelPath) == null ? void 0 : _b.includes("meet")) - tensor6 = await predict13(processed.tensor, this.config); - if ((_c = this.config.segmentation.modelPath) == null ? void 0 : _c.includes("selfie")) - tensor6 = await predict19(processed.tensor, this.config); - tf39.dispose(processed.tensor); - return tensor6; - } - enhance(input) { - return enhance(input); - } - compare(firstImageTensor, secondImageTensor) { - return compare(this.config, firstImageTensor, secondImageTensor); - } - async init() { - await check(this, true); - await this.tf.ready(); - reset(); - } - async load(userConfig) { - this.state = "load"; - const timeStamp = now(); - const count2 = Object.values(this.models).filter((model21) => model21).length; - if (userConfig) - this.config = mergeDeep(this.config, userConfig); - if (this.env.initial) { - if (!await check(this, false)) - log("error: backend check failed"); - await tf39.ready(); - if (this.env.browser) { - if (this.config.debug) - log("configuration:", this.config); - if (this.config.debug) - log("tf flags:", this.tf.ENV.flags); - } - } - await load22(this); - if (this.env.initial && this.config.debug) - log("tf engine state:", this.tf.engine().state.numBytes, "bytes", this.tf.engine().state.numTensors, "tensors"); - this.env.initial = false; - const loaded = Object.values(this.models).filter((model21) => model21).length; - if (loaded !== count2) { - validate2(this); - this.emit("load"); - } - const current = Math.trunc(now() - timeStamp); - if (current > (this.performance.loadModels || 0)) - this.performance.loadModels = this.env.perfadd ? (this.performance.loadModels || 0) + current : current; - } - next(result = this.result) { - return calc2(result, this.config); - } - getModelStats() { - return getModelStats(this); - } - async warmup(userConfig) { - const t0 = now(); - const res = await warmup(this, userConfig); - const t1 = now(); - this.performance.warmup = Math.trunc(t1 - t0); - return res; - } - async profile(input, userConfig) { - const profile = await this.tf.profile(() => this.detect(input, userConfig)); - const kernels = {}; - let total = 0; - for (const kernel of profile.kernels) { - if (kernels[kernel.name]) - kernels[kernel.name] += kernel.kernelTimeMs; - else - kernels[kernel.name] = kernel.kernelTimeMs; - total += kernel.kernelTimeMs; - } - const kernelArr = []; - Object.entries(kernels).forEach((key) => kernelArr.push({ kernel: key[0], time: key[1], perc: 0 })); - for (const kernel of kernelArr) { - kernel.perc = Math.round(1e3 * kernel.time / total) / 1e3; - kernel.time = Math.round(1e3 * kernel.time) / 1e3; - } - kernelArr.sort((a, b) => b.time - a.time); - kernelArr.length = 20; - return kernelArr; - } - async detect(input, userConfig) { - this.state = "detect"; - return new Promise(async (resolve) => { - var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u; - this.state = "config"; - let timeStamp; - this.config = mergeDeep(this.config, userConfig); - this.state = "check"; - const error = __privateGet(this, _sanity).call(this, input); - if (error) { - log(error, input); - this.emit("error"); - resolve({ face: [], body: [], hand: [], gesture: [], object: [], performance: this.performance, timestamp: now(), persons: [], error }); - } - const timeStart = now(); - await this.load(); - timeStamp = now(); - this.state = "image"; - const img = await process2(input, this.config); - this.process = img; - this.performance.inputProcess = this.env.perfadd ? (this.performance.inputProcess || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - this.analyze("Get Image:"); - if (!img.tensor) { - if (this.config.debug) - log("could not convert input to tensor"); - this.emit("error"); - resolve({ face: [], body: [], hand: [], gesture: [], object: [], performance: this.performance, timestamp: now(), persons: [], error: "could not convert input to tensor" }); - return; - } - this.emit("image"); - timeStamp = now(); - this.config.skipAllowed = await skip(this.config, img.tensor); - if (!this.performance.totalFrames) - this.performance.totalFrames = 0; - if (!this.performance.cachedFrames) - this.performance.cachedFrames = 0; - this.performance.totalFrames++; - if (this.config.skipAllowed) - this.performance.cachedFrames++; - this.performance.cacheCheck = this.env.perfadd ? (this.performance.cacheCheck || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - this.analyze("Check Changed:"); - let faceRes = []; - let bodyRes = []; - let handRes = []; - let objectRes = []; - this.state = "detect:face"; - if (this.config.async) { - faceRes = this.config.face.enabled ? detectFace(this, img.tensor) : []; - if (this.performance.face) - delete this.performance.face; - } else { - timeStamp = now(); - faceRes = this.config.face.enabled ? await detectFace(this, img.tensor) : []; - this.performance.face = this.env.perfadd ? (this.performance.face || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - } - if (this.config.async && (this.config.body.maxDetected === -1 || this.config.hand.maxDetected === -1)) - faceRes = await faceRes; - this.analyze("Start Body:"); - this.state = "detect:body"; - const bodyConfig = this.config.body.maxDetected === -1 ? mergeDeep(this.config, { body: { maxDetected: this.config.face.enabled ? 1 * faceRes.length : 1 } }) : this.config; - if (this.config.async) { - if ((_a = this.config.body.modelPath) == null ? void 0 : _a.includes("posenet")) - bodyRes = this.config.body.enabled ? predict17(img.tensor, bodyConfig) : []; - else if ((_b = this.config.body.modelPath) == null ? void 0 : _b.includes("blazepose")) - bodyRes = this.config.body.enabled ? predict2(img.tensor, bodyConfig) : []; - else if ((_c = this.config.body.modelPath) == null ? void 0 : _c.includes("efficientpose")) - bodyRes = this.config.body.enabled ? predict4(img.tensor, bodyConfig) : []; - else if ((_d = this.config.body.modelPath) == null ? void 0 : _d.includes("movenet")) - bodyRes = this.config.body.enabled ? predict15(img.tensor, bodyConfig) : []; - if (this.performance.body) - delete this.performance.body; - } else { - timeStamp = now(); - if ((_e = this.config.body.modelPath) == null ? void 0 : _e.includes("posenet")) - bodyRes = this.config.body.enabled ? await predict17(img.tensor, bodyConfig) : []; - else if ((_f = this.config.body.modelPath) == null ? void 0 : _f.includes("blazepose")) - bodyRes = this.config.body.enabled ? await predict2(img.tensor, bodyConfig) : []; - else if ((_g = this.config.body.modelPath) == null ? void 0 : _g.includes("efficientpose")) - bodyRes = this.config.body.enabled ? await predict4(img.tensor, bodyConfig) : []; - else if ((_h = this.config.body.modelPath) == null ? void 0 : _h.includes("movenet")) - bodyRes = this.config.body.enabled ? await predict15(img.tensor, bodyConfig) : []; - this.performance.body = this.env.perfadd ? (this.performance.body || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - } - this.analyze("End Body:"); - this.analyze("Start Hand:"); - this.state = "detect:hand"; - const handConfig = this.config.hand.maxDetected === -1 ? mergeDeep(this.config, { hand: { maxDetected: this.config.face.enabled ? 2 * faceRes.length : 1 } }) : this.config; - if (this.config.async) { - if ((_j = (_i = this.config.hand.detector) == null ? void 0 : _i.modelPath) == null ? void 0 : _j.includes("handdetect")) - handRes = this.config.hand.enabled ? predict9(img.tensor, handConfig) : []; - else if ((_l = (_k = this.config.hand.detector) == null ? void 0 : _k.modelPath) == null ? void 0 : _l.includes("handtrack")) - handRes = this.config.hand.enabled ? predict10(img.tensor, handConfig) : []; - if (this.performance.hand) - delete this.performance.hand; - } else { - timeStamp = now(); - if ((_n = (_m = this.config.hand.detector) == null ? void 0 : _m.modelPath) == null ? void 0 : _n.includes("handdetect")) - handRes = this.config.hand.enabled ? await predict9(img.tensor, handConfig) : []; - else if ((_p = (_o = this.config.hand.detector) == null ? void 0 : _o.modelPath) == null ? void 0 : _p.includes("handtrack")) - handRes = this.config.hand.enabled ? await predict10(img.tensor, handConfig) : []; - this.performance.hand = this.env.perfadd ? (this.performance.hand || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - } - this.analyze("End Hand:"); - this.analyze("Start Object:"); - this.state = "detect:object"; - if (this.config.async) { - if ((_q = this.config.object.modelPath) == null ? void 0 : _q.includes("nanodet")) - objectRes = this.config.object.enabled ? predict16(img.tensor, this.config) : []; - else if ((_r = this.config.object.modelPath) == null ? void 0 : _r.includes("centernet")) - objectRes = this.config.object.enabled ? predict3(img.tensor, this.config) : []; - if (this.performance.object) - delete this.performance.object; - } else { - timeStamp = now(); - if ((_s = this.config.object.modelPath) == null ? void 0 : _s.includes("nanodet")) - objectRes = this.config.object.enabled ? await predict16(img.tensor, this.config) : []; - else if ((_t = this.config.object.modelPath) == null ? void 0 : _t.includes("centernet")) - objectRes = this.config.object.enabled ? await predict3(img.tensor, this.config) : []; - this.performance.object = this.env.perfadd ? (this.performance.object || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - } - this.analyze("End Object:"); - this.state = "detect:await"; - if (this.config.async) - [faceRes, bodyRes, handRes, objectRes] = await Promise.all([faceRes, bodyRes, handRes, objectRes]); - this.state = "detect:gesture"; - let gestureRes = []; - if (this.config.gesture.enabled) { - timeStamp = now(); - gestureRes = [...face2(faceRes), ...body2(bodyRes), ...hand2(handRes), ...iris2(faceRes)]; - if (!this.config.async) - this.performance.gesture = this.env.perfadd ? (this.performance.gesture || 0) + Math.trunc(now() - timeStamp) : Math.trunc(now() - timeStamp); - else if (this.performance.gesture) - delete this.performance.gesture; - } - this.performance.total = this.env.perfadd ? (this.performance.total || 0) + Math.trunc(now() - timeStart) : Math.trunc(now() - timeStart); - const shape = ((_u = this.process.tensor) == null ? void 0 : _u.shape) || []; - this.result = { - face: faceRes, - body: bodyRes, - hand: handRes, - gesture: gestureRes, - object: objectRes, - performance: this.performance, - canvas: this.process.canvas, - timestamp: Date.now(), - error: null, - get persons() { - return join2(faceRes, bodyRes, handRes, gestureRes, shape); - } - }; - tf39.dispose(img.tensor); - this.emit("detect"); - this.state = "idle"; - resolve(this.result); - }); - } - async sleep(ms) { - return new Promise((resolve) => { - setTimeout(resolve, ms); - }); - } - async video(element, run = true, delay = 0) { - if (run) { - if (!__privateGet(this, _loops)[element.id]) { - if (this.config.debug) - log("video start", element.id); - __privateGet(this, _loops)[element.id] = true; - } - if (!element.paused && __privateGet(this, _loops)[element.id] && element.readyState >= 2) - await this.detect(element); - if (delay > 0) - await this.sleep(delay); - if (__privateGet(this, _loops)[element.id]) - requestAnimationFrame(() => this.video(element, run, delay)); - } else { - if (this.config.debug) - log("video stop", element.id); - __privateGet(this, _loops)[element.id] = false; - } - } -}; -_numTensors = new WeakMap(); -_analyzeMemoryLeaks = new WeakMap(); -_checkSanity = new WeakMap(); -_sanity = new WeakMap(); -_loops = new WeakMap(); -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - Env, - Human, - defaults, - draw, - env, - match, - models -}); +2Q==`;var i0=D(V());async function JA(e){let t=(r,s="application/octet-stream")=>fetch(`data:${s};base64,${r}`).then(A=>A.blob()),n,o;switch(e.config.warmup){case"face":n=await t(Bt);break;case"body":case"full":n=await t(Ht);break;default:n=null}if(n){let r=await createImageBitmap(n);o=await e.detect(r,e.config),r.close()}return o}async function QA(e){return new Promise(t=>{let n;switch(e.config.warmup){case"face":n="data:image/jpeg;base64,"+Bt;break;case"full":case"body":n="data:image/jpeg;base64,"+Ht;break;default:n=""}let o;if(typeof Image!="undefined")o=new Image;else if(k.Image)o=new k.Image;else return;o.onload=async()=>{let r=$0(o.naturalWidth,o.naturalHeight);if(!r)h("Warmup: Canvas not found"),t(void 0);else{let s=r.getContext("2d");s&&s.drawImage(o,0,0);let A=await e.image(r),a=A.tensor?await e.detect(A.tensor,e.config):void 0;t(a)}},n?o.src=n:t(void 0)})}async function _A(e){let t=r=>Buffer.from(r,"base64"),n;e.config.warmup==="face"?n=t(Bt):n=t(Ht);let o;if("node"in i0&&i0.getBackend()==="tensorflow"){let r=i0.node.decodeJpeg(n),s=i0.expandDims(r,0);e.tf.dispose(r),o=await e.detect(s,e.config),e.tf.dispose(s)}else e.config.debug&&h("Warmup tfjs-node not loaded");return o}async function $A(e){let t;return typeof createImageBitmap=="function"?t=await JA(e):typeof Image!="undefined"||k.Canvas!==void 0?t=await QA(e):t=await _A(e),t}async function ea(e){var a,l,c,x;if(!i0.env().flagRegistry.ENGINE_COMPILE_ONLY)return;let t=i0.getBackend(),n=i0.backend();if(t!=="webgl"&&t!=="humangl"||!(n!=null&&n.checkCompileCompletion))return;i0.env().set("ENGINE_COMPILE_ONLY",!0);let o=i0.engine().state.numTensors,r=[];for(let[i,f]of Object.entries(e.models).filter(([d,m])=>d!==null&&m!==null)){let d=(l=(a=f.inputs)==null?void 0:a[0])!=null&&l.shape?[...f.inputs[0].shape]:[1,64,64,3],m=(x=(c=f.inputs)==null?void 0:c[0])!=null&&x.dtype?f.inputs[0].dtype:"float32";for(let g=0;gi0.dispose(v)):i0.dispose(g)}catch(g){e.config.debug&&h("compile fail model:",i)}i0.dispose(p)}let s=await n.checkCompileCompletionAsync();n.getUniformLocations(),e.config.debug&&h("compile pass:",{models:r,kernels:s.length}),i0.env().set("ENGINE_COMPILE_ONLY",!1);let A=i0.engine().state.numTensors;A-o>0&&h("tensor leak:",A-o)}async function Io(e,t){await D2(e,!1);let n=M();return e.state="warmup",t&&(e.config=s0(e.config,t)),!e.config.warmup||e.config.warmup.length===0||e.config.warmup==="none"?{face:[],body:[],hand:[],gesture:[],object:[],performance:e.performance,timestamp:M(),persons:[],error:null}:new Promise(async o=>{await g2.load(e),await ea(e);let r=await $A(e),s=M();e.config.debug&&h("warmup",e.config.warmup,Math.round(s-n),"ms"),e.emit("warmup"),o(r)})}var w2,X2,q2,Vt,Xe,w1=class{constructor(t){R(this,"version");R(this,"config");R(this,"result");R(this,"state");R(this,"process");R(this,"tf");R(this,"env");R(this,"draw");R(this,"models");R(this,"events");R(this,"faceTriangulation");R(this,"faceUVMap");R(this,"performance");A2(this,w2,void 0);A2(this,X2,void 0);A2(this,q2,void 0);R(this,"gl");R(this,"analyze",(...t)=>{if(!ye(this,X2))return;let n=this.tf.engine().state.numTensors,o=ye(this,w2);j2(this,w2,n);let r=n-o;r!==0&&h(...t,r)});A2(this,Vt,t=>{if(!ye(this,q2))return null;if(!t)return"input is not defined";if(this.env.node&&!(t instanceof se.Tensor))return"input must be a tensor";try{this.tf.getBackend()}catch(n){return"backend not loaded"}return null});R(this,"similarity",P1);R(this,"distance",Z2);R(this,"match",R1);R(this,"webcam",new _2);R(this,"emit",t=>{var n;(n=this.events)!=null&&n.dispatchEvent&&this.events.dispatchEvent(new Event(t))});A2(this,Xe,{});this.env=k;let n=(se.version.tfjs||se.version_core).replace(/-(.*)/,"");Ee.wasmPath=`https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm@${n}/dist/`,Ee.modelBasePath=k.browser?"../models/":"file://models/",Ee.backend=k.browser?"webgl":"tensorflow",this.version=Jt,Object.defineProperty(this,"version",{value:Jt}),this.config=JSON.parse(JSON.stringify(Ee)),Object.seal(this.config),this.config.cacheModels=typeof indexedDB!="undefined",t&&(this.config=s0(this.config,t)),Z1(this.config),this.tf=se,this.state="idle",j2(this,w2,0),j2(this,X2,!1),j2(this,q2,!1),this.performance={},this.events=typeof EventTarget!="undefined"?new EventTarget:void 0,this.models=new V2,this.draw={options:S0,canvas:(r,s)=>h1(r,s),face:(r,s,A)=>M2(r,s,A),body:(r,s,A)=>T2(r,s,A),hand:(r,s,A)=>v2(r,s,A),gesture:(r,s,A)=>R2(r,s,A),object:(r,s,A)=>P2(r,s,A),person:(r,s,A)=>u1(r,s,A),all:(r,s,A)=>b1(r,s,A)},this.result={face:[],body:[],hand:[],gesture:[],object:[],performance:{},timestamp:0,persons:[],error:null},this.process={tensor:null,canvas:null},this.faceTriangulation=G3,this.faceUVMap=B3,this.gl=$,Ft(this,null,""),this.emit("create"),(this.config.debug||this.env.browser)&&h(`version: ${this.version}`),this.config.debug&&h(`tfjs version: ${this.tf.version["tfjs-core"]}`);let o=JSON.parse(JSON.stringify(this.env));delete o.kernels,delete o.initial,delete o.perfadd,this.config.debug&&h("environment:",o)}reset(){let t=this.config.backend;this.config=JSON.parse(JSON.stringify(Ee)),this.config.backend=t,Yt(),k.initial=!0}validate(t){let n=Dt(Ee,t||this.config);return n.length===0&&(this.config=s0(this.config,t)),n}check(){return Gt(this)}now(){return M()}image(t,n=!0){return J2(t,this.config,n)}async segmentation(t,n){var s,A,a;if(n&&(this.config=s0(this.config,n)),!this.config.segmentation.enabled)return null;let o=await J2(t,this.config);if(!o.tensor)return null;let r=null;return(s=this.config.segmentation.modelPath)!=null&&s.includes("rvm")&&(r=await Ao(o.tensor,this.config)),(A=this.config.segmentation.modelPath)!=null&&A.includes("meet")&&(r=await On(o.tensor,this.config)),(a=this.config.segmentation.modelPath)!=null&&a.includes("selfie")&&(r=await io(o.tensor,this.config)),se.dispose(o.tensor),r}enhance(t){return T5(t)}compare(t,n){return D1(this.config,t,n)}async init(){await D2(this,!0),await this.tf.ready(),Yt()}async load(t){this.state="load";let n=M(),o=Object.values(this.models).filter(A=>A).length;t&&(this.config=s0(this.config,t)),this.env.initial&&(await D2(this,!1)||h("error: backend check failed"),await se.ready(),this.env.browser&&(this.config.debug&&h("configuration:",this.config),this.config.debug&&h("tf flags:",this.tf.ENV.flags))),await y1(this),this.env.initial&&this.config.debug&&h("tf engine state:",this.tf.engine().state.numBytes,"bytes",this.tf.engine().state.numTensors,"tensors"),this.env.initial=!1,Object.values(this.models).filter(A=>A).length!==o&&(Gt(this),this.emit("load"));let s=Math.trunc(M()-n);s>(this.performance.loadModels||0)&&(this.performance.loadModels=this.env.perfadd?(this.performance.loadModels||0)+s:s)}next(t=this.result){return jo(t,this.config)}getModelStats(){return x1(this)}async warmup(t){let n=M(),o=await Io(this,t),r=M();return this.performance.warmup=Math.trunc(r-n),o}async profile(t,n){let o=await this.tf.profile(()=>this.detect(t,n)),r={},s=0;for(let a of o.kernels)r[a.name]?r[a.name]+=a.kernelTimeMs:r[a.name]=a.kernelTimeMs,s+=a.kernelTimeMs;let A=[];Object.entries(r).forEach(a=>A.push({kernel:a[0],time:a[1],perc:0}));for(let a of A)a.perc=Math.round(1e3*a.time/s)/1e3,a.time=Math.round(1e3*a.time)/1e3;return A.sort((a,l)=>l.time-a.time),A.length=20,A}async detect(t,n){return this.state="detect",new Promise(async o=>{var g,v,T,y,b,z,w,O,q,t0,Z,U,r0,P,G,P0,e0,u0,x0,H,X;this.state="config";let r;this.config=s0(this.config,n),this.state="check";let s=ye(this,Vt).call(this,t);s&&(h(s,t),this.emit("error"),o({face:[],body:[],hand:[],gesture:[],object:[],performance:this.performance,timestamp:M(),persons:[],error:s}));let A=M();await this.load(),r=M(),this.state="image";let a=await J2(t,this.config);if(this.process=a,this.performance.inputProcess=this.env.perfadd?(this.performance.inputProcess||0)+Math.trunc(M()-r):Math.trunc(M()-r),this.analyze("Get Image:"),!a.tensor){this.config.debug&&h("could not convert input to tensor"),this.emit("error"),o({face:[],body:[],hand:[],gesture:[],object:[],performance:this.performance,timestamp:M(),persons:[],error:"could not convert input to tensor"});return}this.emit("image"),r=M(),this.config.skipAllowed=await V1(this.config,a.tensor),this.performance.totalFrames||(this.performance.totalFrames=0),this.performance.cachedFrames||(this.performance.cachedFrames=0),this.performance.totalFrames++,this.config.skipAllowed&&this.performance.cachedFrames++,this.performance.cacheCheck=this.env.perfadd?(this.performance.cacheCheck||0)+Math.trunc(M()-r):Math.trunc(M()-r),this.analyze("Check Changed:");let l=[],c=[],x=[],i=[];this.state="detect:face",this.config.async?(l=this.config.face.enabled?T1(this,a.tensor):[],this.performance.face&&delete this.performance.face):(r=M(),l=this.config.face.enabled?await T1(this,a.tensor):[],this.performance.face=this.env.perfadd?(this.performance.face||0)+Math.trunc(M()-r):Math.trunc(M()-r)),this.config.async&&(this.config.body.maxDetected===-1||this.config.hand.maxDetected===-1)&&(l=await l),this.analyze("Start Body:"),this.state="detect:body";let f=this.config.body.maxDetected===-1?s0(this.config,{body:{maxDetected:this.config.face.enabled?1*l.length:1}}):this.config;this.config.async?((g=this.config.body.modelPath)!=null&&g.includes("posenet")?c=this.config.body.enabled?n1(a.tensor,f):[]:(v=this.config.body.modelPath)!=null&&v.includes("blazepose")?c=this.config.body.enabled?i5(a.tensor,f):[]:(T=this.config.body.modelPath)!=null&&T.includes("efficientpose")?c=this.config.body.enabled?m5(a.tensor,f):[]:(y=this.config.body.modelPath)!=null&&y.includes("movenet")&&(c=this.config.body.enabled?K5(a.tensor,f):[]),this.performance.body&&delete this.performance.body):(r=M(),(b=this.config.body.modelPath)!=null&&b.includes("posenet")?c=this.config.body.enabled?await n1(a.tensor,f):[]:(z=this.config.body.modelPath)!=null&&z.includes("blazepose")?c=this.config.body.enabled?await i5(a.tensor,f):[]:(w=this.config.body.modelPath)!=null&&w.includes("efficientpose")?c=this.config.body.enabled?await m5(a.tensor,f):[]:(O=this.config.body.modelPath)!=null&&O.includes("movenet")&&(c=this.config.body.enabled?await K5(a.tensor,f):[]),this.performance.body=this.env.perfadd?(this.performance.body||0)+Math.trunc(M()-r):Math.trunc(M()-r)),this.analyze("End Body:"),this.analyze("Start Hand:"),this.state="detect:hand";let d=this.config.hand.maxDetected===-1?s0(this.config,{hand:{maxDetected:this.config.face.enabled?2*l.length:1}}):this.config;this.config.async?((t0=(q=this.config.hand.detector)==null?void 0:q.modelPath)!=null&&t0.includes("handdetect")?x=this.config.hand.enabled?N5(a.tensor,d):[]:(U=(Z=this.config.hand.detector)==null?void 0:Z.modelPath)!=null&&U.includes("handtrack")&&(x=this.config.hand.enabled?L5(a.tensor,d):[]),this.performance.hand&&delete this.performance.hand):(r=M(),(P=(r0=this.config.hand.detector)==null?void 0:r0.modelPath)!=null&&P.includes("handdetect")?x=this.config.hand.enabled?await N5(a.tensor,d):[]:(P0=(G=this.config.hand.detector)==null?void 0:G.modelPath)!=null&&P0.includes("handtrack")&&(x=this.config.hand.enabled?await L5(a.tensor,d):[]),this.performance.hand=this.env.perfadd?(this.performance.hand||0)+Math.trunc(M()-r):Math.trunc(M()-r)),this.analyze("End Hand:"),this.analyze("Start Object:"),this.state="detect:object",this.config.async?((e0=this.config.object.modelPath)!=null&&e0.includes("nanodet")?i=this.config.object.enabled?Q5(a.tensor,this.config):[]:(u0=this.config.object.modelPath)!=null&&u0.includes("centernet")&&(i=this.config.object.enabled?d5(a.tensor,this.config):[]),this.performance.object&&delete this.performance.object):(r=M(),(x0=this.config.object.modelPath)!=null&&x0.includes("nanodet")?i=this.config.object.enabled?await Q5(a.tensor,this.config):[]:(H=this.config.object.modelPath)!=null&&H.includes("centernet")&&(i=this.config.object.enabled?await d5(a.tensor,this.config):[]),this.performance.object=this.env.perfadd?(this.performance.object||0)+Math.trunc(M()-r):Math.trunc(M()-r)),this.analyze("End Object:"),this.state="detect:await",this.config.async&&([l,c,x,i]=await Promise.all([l,c,x,i])),this.state="detect:gesture";let m=[];this.config.gesture.enabled&&(r=M(),m=[...Eo(l),...wo(c),...So(x),...zo(l)],this.config.async?this.performance.gesture&&delete this.performance.gesture:this.performance.gesture=this.env.perfadd?(this.performance.gesture||0)+Math.trunc(M()-r):Math.trunc(M()-r)),this.performance.total=this.env.perfadd?(this.performance.total||0)+Math.trunc(M()-A):Math.trunc(M()-A);let p=((X=this.process.tensor)==null?void 0:X.shape)||[];this.result={face:l,body:c,hand:x,gesture:m,object:i,performance:this.performance,canvas:this.process.canvas,timestamp:Date.now(),error:null,get persons(){return Oo(l,c,x,m,p)}},se.dispose(a.tensor),this.emit("detect"),this.state="idle",o(this.result)})}async sleep(t){return new Promise(n=>{setTimeout(n,t)})}async video(t,n=!0,o=0){n?(ye(this,Xe)[t.id]||(this.config.debug&&h("video start",t.id),ye(this,Xe)[t.id]=!0),!t.paused&&ye(this,Xe)[t.id]&&t.readyState>=2&&await this.detect(t),o>0&&await this.sleep(o),ye(this,Xe)[t.id]&&requestAnimationFrame(()=>this.video(t,n,o))):(this.config.debug&&h("video stop",t.id),ye(this,Xe)[t.id]=!1)}};w2=new WeakMap,X2=new WeakMap,q2=new WeakMap,Vt=new WeakMap,Xe=new WeakMap;0&&(module.exports={Env,Human,defaults,draw,env,match,models}); diff --git a/dist/tfjs.esm.js b/dist/tfjs.esm.js index 44d200bcb..a1a089c5d 100644 --- a/dist/tfjs.esm.js +++ b/dist/tfjs.esm.js @@ -10,7 +10,14 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; -var __commonJS = (cb, mod4) => function __require() { +var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { + get: (a, b) => (typeof require !== "undefined" ? require : a)[b] +}) : x)(function(x) { + if (typeof require !== "undefined") + return require.apply(this, arguments); + throw new Error('Dynamic require of "' + x + '" is not supported'); +}); +var __commonJS = (cb, mod4) => function __require2() { return mod4 || (0, cb[__getOwnPropNames(cb)[0]])((mod4 = { exports: {} }).exports, mod4), mod4.exports; }; var __export = (target, all5) => { @@ -324,7 +331,7 @@ var require_long = __commonJS({ 167, 11 ])), {}).exports; - } catch (e) { + } catch (e2) { } function Long2(low, high, unsigned) { this.low = low | 0; @@ -411,8 +418,8 @@ var require_long = __commonJS({ } var radixToPower = fromNumber(pow_dbl(radix, 8)); var result = ZERO; - for (var i = 0; i < str.length; i += 8) { - var size = Math.min(8, str.length - i), value = parseInt(str.substring(i, i + size), radix); + for (var i2 = 0; i2 < str.length; i2 += 8) { + var size = Math.min(8, str.length - i2), value = parseInt(str.substring(i2, i2 + size), radix); if (size < 8) { var power = fromNumber(pow_dbl(radix, size)); result = result.mul(power).add(fromNumber(value)); @@ -897,10 +904,10 @@ var require_alea = __commonJS({ function Alea(seed) { var me = this, mash = Mash(); me.next = function() { - var t = 2091639 * me.s0 + me.c * 23283064365386963e-26; + var t2 = 2091639 * me.s0 + me.c * 23283064365386963e-26; me.s0 = me.s1; me.s1 = me.s2; - return me.s2 = t - (me.c = t | 0); + return me.s2 = t2 - (me.c = t2 | 0); }; me.c = 1; me.s0 = mash(" "); @@ -920,12 +927,12 @@ var require_alea = __commonJS({ } mash = null; } - function copy(f, t) { - t.c = f.c; - t.s0 = f.s0; - t.s1 = f.s1; - t.s2 = f.s2; - return t; + function copy(f, t2) { + t2.c = f.c; + t2.s0 = f.s0; + t2.s1 = f.s1; + t2.s2 = f.s2; + return t2; } function impl(seed, opts) { var xg = new Alea(seed), state = opts && opts.state, prng = xg.next; @@ -946,20 +953,20 @@ var require_alea = __commonJS({ return prng; } function Mash() { - var n = 4022871197; + var n2 = 4022871197; var mash = function(data) { data = String(data); - for (var i = 0; i < data.length; i++) { - n += data.charCodeAt(i); - var h = 0.02519603282416938 * n; - n = h >>> 0; - h -= n; - h *= n; - n = h >>> 0; - h -= n; - n += h * 4294967296; + for (var i2 = 0; i2 < data.length; i2++) { + n2 += data.charCodeAt(i2); + var h = 0.02519603282416938 * n2; + n2 = h >>> 0; + h -= n2; + h *= n2; + n2 = h >>> 0; + h -= n2; + n2 += h * 4294967296; } - return (n >>> 0) * 23283064365386963e-26; + return (n2 >>> 0) * 23283064365386963e-26; }; return mash; } @@ -991,11 +998,11 @@ var require_xor128 = __commonJS({ me.z = 0; me.w = 0; me.next = function() { - var t = me.x ^ me.x << 11; + var t2 = me.x ^ me.x << 11; me.x = me.y; me.y = me.z; me.z = me.w; - return me.w ^= me.w >>> 19 ^ t ^ t >>> 8; + return me.w ^= me.w >>> 19 ^ t2 ^ t2 >>> 8; }; if (seed === (seed | 0)) { me.x = seed; @@ -1007,12 +1014,12 @@ var require_xor128 = __commonJS({ me.next(); } } - function copy(f, t) { - t.x = f.x; - t.y = f.y; - t.z = f.z; - t.w = f.w; - return t; + function copy(f, t2) { + t2.x = f.x; + t2.y = f.y; + t2.z = f.z; + t2.w = f.w; + return t2; } function impl(seed, opts) { var xg = new XorGen(seed), state = opts && opts.state, prng = function() { @@ -1059,12 +1066,12 @@ var require_xorwow = __commonJS({ function XorGen(seed) { var me = this, strseed = ""; me.next = function() { - var t = me.x ^ me.x >>> 2; + var t2 = me.x ^ me.x >>> 2; me.x = me.y; me.y = me.z; me.z = me.w; me.w = me.v; - return (me.d = me.d + 362437 | 0) + (me.v = me.v ^ me.v << 4 ^ (t ^ t << 1)) | 0; + return (me.d = me.d + 362437 | 0) + (me.v = me.v ^ me.v << 4 ^ (t2 ^ t2 << 1)) | 0; }; me.x = 0; me.y = 0; @@ -1084,14 +1091,14 @@ var require_xorwow = __commonJS({ me.next(); } } - function copy(f, t) { - t.x = f.x; - t.y = f.y; - t.z = f.z; - t.w = f.w; - t.v = f.v; - t.d = f.d; - return t; + function copy(f, t2) { + t2.x = f.x; + t2.y = f.y; + t2.z = f.z; + t2.w = f.w; + t2.v = f.v; + t2.d = f.d; + return t2; } function impl(seed, opts) { var xg = new XorGen(seed), state = opts && opts.state, prng = function() { @@ -1138,21 +1145,21 @@ var require_xorshift7 = __commonJS({ function XorGen(seed) { var me = this; me.next = function() { - var X = me.x, i = me.i, t, v, w; - t = X[i]; - t ^= t >>> 7; - v = t ^ t << 24; - t = X[i + 1 & 7]; - v ^= t ^ t >>> 10; - t = X[i + 3 & 7]; - v ^= t ^ t >>> 3; - t = X[i + 4 & 7]; - v ^= t ^ t << 7; - t = X[i + 7 & 7]; - t = t ^ t << 13; - v ^= t ^ t << 9; - X[i] = v; - me.i = i + 1 & 7; + var X = me.x, i2 = me.i, t2, v, w; + t2 = X[i2]; + t2 ^= t2 >>> 7; + v = t2 ^ t2 << 24; + t2 = X[i2 + 1 & 7]; + v ^= t2 ^ t2 >>> 10; + t2 = X[i2 + 3 & 7]; + v ^= t2 ^ t2 >>> 3; + t2 = X[i2 + 4 & 7]; + v ^= t2 ^ t2 << 7; + t2 = X[i2 + 7 & 7]; + t2 = t2 ^ t2 << 13; + v ^= t2 ^ t2 << 9; + X[i2] = v; + me.i = i2 + 1 & 7; return v; }; function init2(me2, seed2) { @@ -1181,10 +1188,10 @@ var require_xorshift7 = __commonJS({ } init2(me, seed); } - function copy(f, t) { - t.x = f.x.slice(); - t.i = f.i; - return t; + function copy(f, t2) { + t2.x = f.x.slice(); + t2.i = f.i; + return t2; } function impl(seed, opts) { if (seed == null) @@ -1233,20 +1240,20 @@ var require_xor4096 = __commonJS({ function XorGen(seed) { var me = this; me.next = function() { - var w = me.w, X = me.X, i = me.i, t, v; + var w = me.w, X = me.X, i2 = me.i, t2, v; me.w = w = w + 1640531527 | 0; - v = X[i + 34 & 127]; - t = X[i = i + 1 & 127]; + v = X[i2 + 34 & 127]; + t2 = X[i2 = i2 + 1 & 127]; v ^= v << 13; - t ^= t << 17; + t2 ^= t2 << 17; v ^= v >>> 15; - t ^= t >>> 12; - v = X[i] = v ^ t; - me.i = i; + t2 ^= t2 >>> 12; + v = X[i2] = v ^ t2; + me.i = i2; return v + (w ^ w >>> 16) | 0; }; function init2(me2, seed2) { - var t, v, i, j, w, X = [], limit = 128; + var t2, v, i2, j, w, X = [], limit = 128; if (seed2 === (seed2 | 0)) { v = seed2; seed2 = null; @@ -1255,7 +1262,7 @@ var require_xor4096 = __commonJS({ v = 0; limit = Math.max(limit, seed2.length); } - for (i = 0, j = -32; j < limit; ++j) { + for (i2 = 0, j = -32; j < limit; ++j) { if (seed2) v ^= seed2.charCodeAt((j + 32) % seed2.length); if (j === 0) @@ -1266,34 +1273,34 @@ var require_xor4096 = __commonJS({ v ^= v >>> 13; if (j >= 0) { w = w + 1640531527 | 0; - t = X[j & 127] ^= v + w; - i = 0 == t ? i + 1 : 0; + t2 = X[j & 127] ^= v + w; + i2 = 0 == t2 ? i2 + 1 : 0; } } - if (i >= 128) { + if (i2 >= 128) { X[(seed2 && seed2.length || 0) & 127] = -1; } - i = 127; + i2 = 127; for (j = 4 * 128; j > 0; --j) { - v = X[i + 34 & 127]; - t = X[i = i + 1 & 127]; + v = X[i2 + 34 & 127]; + t2 = X[i2 = i2 + 1 & 127]; v ^= v << 13; - t ^= t << 17; + t2 ^= t2 << 17; v ^= v >>> 15; - t ^= t >>> 12; - X[i] = v ^ t; + t2 ^= t2 >>> 12; + X[i2] = v ^ t2; } me2.w = w; me2.X = X; - me2.i = i; + me2.i = i2; } init2(me, seed); } - function copy(f, t) { - t.i = f.i; - t.w = f.w; - t.X = f.X.slice(); - return t; + function copy(f, t2) { + t2.i = f.i; + t2.w = f.w; + t2.X = f.X.slice(); + return t2; } ; function impl(seed, opts) { @@ -1368,12 +1375,12 @@ var require_tychei = __commonJS({ me.next(); } } - function copy(f, t) { - t.a = f.a; - t.b = f.b; - t.c = f.c; - t.d = f.d; - return t; + function copy(f, t2) { + t2.a = f.a; + t2.b = f.b; + t2.c = f.c; + t2.d = f.d; + return t2; } ; function impl(seed, opts) { @@ -1434,18 +1441,18 @@ var require_seedrandom = __commonJS({ ), key); var arc4 = new ARC4(key); var prng = function() { - var n = arc4.g(chunks), d = startdenom, x = 0; - while (n < significance) { - n = (n + x) * width; + var n2 = arc4.g(chunks), d = startdenom, x = 0; + while (n2 < significance) { + n2 = (n2 + x) * width; d *= width; x = arc4.g(1); } - while (n >= overflow) { - n /= 2; + while (n2 >= overflow) { + n2 /= 2; d /= 2; x >>>= 1; } - return (n + x) / d; + return (n2 + x) / d; }; prng.int32 = function() { return arc4.g(4) | 0; @@ -1477,33 +1484,33 @@ var require_seedrandom = __commonJS({ ); } function ARC4(key) { - var t, keylen = key.length, me = this, i = 0, j = me.i = me.j = 0, s = me.S = []; + var t2, keylen = key.length, me = this, i2 = 0, j = me.i = me.j = 0, s2 = me.S = []; if (!keylen) { key = [keylen++]; } - while (i < width) { - s[i] = i++; + while (i2 < width) { + s2[i2] = i2++; } - for (i = 0; i < width; i++) { - s[i] = s[j = mask & j + key[i % keylen] + (t = s[i])]; - s[j] = t; + for (i2 = 0; i2 < width; i2++) { + s2[i2] = s2[j = mask & j + key[i2 % keylen] + (t2 = s2[i2])]; + s2[j] = t2; } (me.g = function(count2) { - var t2, r = 0, i2 = me.i, j2 = me.j, s2 = me.S; + var t3, r2 = 0, i3 = me.i, j2 = me.j, s3 = me.S; while (count2--) { - t2 = s2[i2 = mask & i2 + 1]; - r = r * width + s2[mask & (s2[i2] = s2[j2 = mask & j2 + t2]) + (s2[j2] = t2)]; + t3 = s3[i3 = mask & i3 + 1]; + r2 = r2 * width + s3[mask & (s3[i3] = s3[j2 = mask & j2 + t3]) + (s3[j2] = t3)]; } - me.i = i2; + me.i = i3; me.j = j2; - return r; + return r2; })(width); } - function copy(f, t) { - t.i = f.i; - t.j = f.j; - t.S = f.S.slice(); - return t; + function copy(f, t2) { + t2.i = f.i; + t2.j = f.j; + t2.S = f.S.slice(); + return t2; } ; function flatten4(obj, depth) { @@ -1512,7 +1519,7 @@ var require_seedrandom = __commonJS({ for (prop in obj) { try { result.push(flatten4(obj[prop], depth - 1)); - } catch (e) { + } catch (e2) { } } } @@ -1535,7 +1542,7 @@ var require_seedrandom = __commonJS({ (global2.crypto || global2.msCrypto).getRandomValues(out); } return tostring(out); - } catch (e) { + } catch (e2) { var browser = global2.navigator, plugins = browser && browser.plugins; return [+new Date(), global2, plugins, global2.screen, tostring(pool3)]; } @@ -1621,9 +1628,9 @@ var require_os = __commonJS({ } }); -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm-threaded-simd.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm-threaded-simd.js var require_tfjs_backend_wasm_threaded_simd = __commonJS({ - "node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm-threaded-simd.js"(exports, module) { + "node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm-threaded-simd.js"(exports, module) { var WasmBackendModuleThreadedSimd2 = (() => { var _scriptDir = typeof document !== "undefined" && document.currentScript ? document.currentScript.src : void 0; if (typeof __filename !== "undefined") @@ -1648,17 +1655,17 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ } return HEAP16; } - function GROWABLE_HEAP_U16() { + function GROWABLE_HEAP_I32() { if (wasmMemory.buffer != buffer2) { updateGlobalBufferAndViews(wasmMemory.buffer); } - return HEAPU16; + return HEAP32; } - function GROWABLE_HEAP_I32() { + function GROWABLE_HEAP_U32() { if (wasmMemory.buffer != buffer2) { updateGlobalBufferAndViews(wasmMemory.buffer); } - return HEAP32; + return HEAPU32; } function GROWABLE_HEAP_F32() { if (wasmMemory.buffer != buffer2) { @@ -1672,7 +1679,7 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ } return HEAPF64; } - var Module = typeof WasmBackendModuleThreadedSimd3 !== "undefined" ? WasmBackendModuleThreadedSimd3 : {}; + var Module = typeof WasmBackendModuleThreadedSimd3 != "undefined" ? WasmBackendModuleThreadedSimd3 : {}; var readyPromiseResolve, readyPromiseReject; Module["ready"] = new Promise(function(resolve, reject) { readyPromiseResolve = resolve; @@ -1688,9 +1695,9 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ var quit_ = (status, toThrow) => { throw toThrow; }; - var ENVIRONMENT_IS_WEB = typeof window === "object"; - var ENVIRONMENT_IS_WORKER = typeof importScripts === "function"; - var ENVIRONMENT_IS_NODE = typeof process === "object" && typeof process.versions === "object" && typeof process.versions.node === "string"; + var ENVIRONMENT_IS_WEB = typeof window == "object"; + var ENVIRONMENT_IS_WORKER = typeof importScripts == "function"; + var ENVIRONMENT_IS_NODE = typeof process == "object" && typeof process.versions == "object" && typeof process.versions.node == "string"; var ENVIRONMENT_IS_PTHREAD = Module["ENVIRONMENT_IS_PTHREAD"] || false; var scriptDirectory = ""; function locateFile(path) { @@ -1700,29 +1707,24 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ return scriptDirectory + path; } var read_, readAsync, readBinary, setWindowTitle; - function logExceptionOnExit(e) { - if (e instanceof ExitStatus) + function logExceptionOnExit(e2) { + if (e2 instanceof ExitStatus) return; - let toLog = e; + let toLog = e2; err("exiting due to exception: " + toLog); } - var fs; - var nodePath; - var requireNodeFS; if (ENVIRONMENT_IS_NODE) { if (ENVIRONMENT_IS_WORKER) { scriptDirectory = require_path().dirname(scriptDirectory) + "/"; } else { scriptDirectory = __dirname + "/"; } - requireNodeFS = () => { - if (!nodePath) { - fs = require_fs(); - nodePath = require_path(); - } - }; - read_ = function shell_read(filename, binary) { - requireNodeFS(); + var fs, nodePath; + if (typeof __require === "function") { + fs = require_fs(); + nodePath = require_path(); + } + read_ = (filename, binary) => { filename = nodePath["normalize"](filename); return fs.readFileSync(filename, binary ? void 0 : "utf8"); }; @@ -1734,7 +1736,6 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ return ret; }; readAsync = (filename, onload, onerror) => { - requireNodeFS(); filename = nodePath["normalize"](filename); fs.readFile(filename, function(err2, data) { if (err2) @@ -1769,15 +1770,15 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ let nodeWorkerThreads; try { nodeWorkerThreads = require_worker_threads(); - } catch (e) { + } catch (e2) { console.error('The "worker_threads" module is not supported in this node.js build - perhaps a newer version is needed?'); - throw e; + throw e2; } global.Worker = nodeWorkerThreads.Worker; } else if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) { if (ENVIRONMENT_IS_WORKER) { scriptDirectory = self.location.href; - } else if (typeof document !== "undefined" && document.currentScript) { + } else if (typeof document != "undefined" && document.currentScript) { scriptDirectory = document.currentScript.src; } if (typeof _scriptDir !== "undefined" && _scriptDir) { @@ -1823,14 +1824,13 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ } else { } if (ENVIRONMENT_IS_NODE) { - if (typeof performance === "undefined") { + if (typeof performance == "undefined") { global.performance = require_perf_hooks().performance; } } var defaultPrint = console.log.bind(console); var defaultPrintErr = console.warn.bind(console); if (ENVIRONMENT_IS_NODE) { - requireNodeFS(); defaultPrint = (str) => fs.writeSync(1, str + "\n"); defaultPrintErr = (str) => fs.writeSync(2, str + "\n"); } @@ -1845,71 +1845,6 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ if (Module["quit"]) quit_ = Module["quit"]; var POINTER_SIZE = 4; - function warnOnce(text) { - if (!warnOnce.shown) - warnOnce.shown = {}; - if (!warnOnce.shown[text]) { - warnOnce.shown[text] = 1; - err(text); - } - } - function convertJsFunctionToWasm(func2, sig) { - if (typeof WebAssembly.Function === "function") { - var typeNames = { "i": "i32", "j": "i64", "f": "f32", "d": "f64" }; - var type = { parameters: [], results: sig[0] == "v" ? [] : [typeNames[sig[0]]] }; - for (var i = 1; i < sig.length; ++i) { - type.parameters.push(typeNames[sig[i]]); - } - return new WebAssembly.Function(type, func2); - } - var typeSection = [1, 0, 1, 96]; - var sigRet = sig.slice(0, 1); - var sigParam = sig.slice(1); - var typeCodes = { "i": 127, "j": 126, "f": 125, "d": 124 }; - typeSection.push(sigParam.length); - for (var i = 0; i < sigParam.length; ++i) { - typeSection.push(typeCodes[sigParam[i]]); - } - if (sigRet == "v") { - typeSection.push(0); - } else { - typeSection = typeSection.concat([1, typeCodes[sigRet]]); - } - typeSection[1] = typeSection.length - 2; - var bytes = new Uint8Array([0, 97, 115, 109, 1, 0, 0, 0].concat(typeSection, [2, 7, 1, 1, 101, 1, 102, 0, 0, 7, 5, 1, 1, 102, 0, 0])); - var module2 = new WebAssembly.Module(bytes); - var instance = new WebAssembly.Instance(module2, { "e": { "f": func2 } }); - var wrappedFunc = instance.exports["f"]; - return wrappedFunc; - } - var freeTableIndexes = []; - var functionsInTableMap; - function getEmptyTableSlot() { - if (freeTableIndexes.length) { - return freeTableIndexes.pop(); - } - try { - wasmTable.grow(1); - } catch (err2) { - if (!(err2 instanceof RangeError)) { - throw err2; - } - throw "Unable to grow wasm table. Set ALLOW_TABLE_GROWTH."; - } - return wasmTable.length - 1; - } - function updateTableMap(offset, count2) { - for (var i = offset; i < offset + count2; i++) { - var item = getWasmTableEntry(i); - if (item) { - functionsInTableMap.set(item, i); - } - } - } - var tempRet0 = 0; - var setTempRet0 = (value) => { - tempRet0 = value; - }; var Atomics_load = Atomics.load; var Atomics_store = Atomics.store; var Atomics_compareExchange = Atomics.compareExchange; @@ -1917,7 +1852,7 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ if (Module["wasmBinary"]) wasmBinary = Module["wasmBinary"]; var noExitRuntime = Module["noExitRuntime"] || true; - if (typeof WebAssembly !== "object") { + if (typeof WebAssembly != "object") { abort("no native wasm support detected"); } var wasmMemory; @@ -1929,111 +1864,38 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ abort(text); } } - function getCFunc(ident) { - var func2 = Module["_" + ident]; - return func2; - } - function ccall(ident, returnType, argTypes, args, opts) { - var toC = { "string": function(str) { - var ret2 = 0; - if (str !== null && str !== void 0 && str !== 0) { - var len = (str.length << 2) + 1; - ret2 = stackAlloc(len); - stringToUTF8(str, ret2, len); - } - return ret2; - }, "array": function(arr) { - var ret2 = stackAlloc(arr.length); - writeArrayToMemory(arr, ret2); - return ret2; - } }; - function convertReturnValue(ret2) { - if (returnType === "string") - return UTF8ToString(ret2); - if (returnType === "boolean") - return Boolean(ret2); - return ret2; - } - var func2 = getCFunc(ident); - var cArgs = []; - var stack2 = 0; - if (args) { - for (var i = 0; i < args.length; i++) { - var converter = toC[argTypes[i]]; - if (converter) { - if (stack2 === 0) - stack2 = stackSave(); - cArgs[i] = converter(args[i]); - } else { - cArgs[i] = args[i]; - } - } - } - var ret = func2.apply(null, cArgs); - function onDone(ret2) { - if (stack2 !== 0) - stackRestore(stack2); - return convertReturnValue(ret2); - } - ret = onDone(ret); - return ret; - } - function cwrap(ident, returnType, argTypes, opts) { - argTypes = argTypes || []; - var numericArgs = argTypes.every(function(type) { - return type === "number"; - }); - var numericRet = returnType !== "string"; - if (numericRet && numericArgs && !opts) { - return getCFunc(ident); - } - return function() { - return ccall(ident, returnType, argTypes, arguments, opts); - }; - } - var ALLOC_STACK = 1; - function TextDecoderWrapper(encoding) { - var textDecoder = new TextDecoder(encoding); - this.decode = (data) => { - if (data.buffer instanceof SharedArrayBuffer) { - data = new Uint8Array(data); - } - return textDecoder.decode.call(textDecoder, data); - }; - } - var UTF8Decoder = typeof TextDecoder !== "undefined" ? new TextDecoderWrapper("utf8") : void 0; - function UTF8ArrayToString(heap, idx, maxBytesToRead) { + var UTF8Decoder = typeof TextDecoder != "undefined" ? new TextDecoder("utf8") : void 0; + function UTF8ArrayToString(heapOrArray, idx, maxBytesToRead) { var endIdx = idx + maxBytesToRead; var endPtr = idx; - while (heap[endPtr] && !(endPtr >= endIdx)) + while (heapOrArray[endPtr] && !(endPtr >= endIdx)) ++endPtr; - if (endPtr - idx > 16 && heap.subarray && UTF8Decoder) { - return UTF8Decoder.decode(heap.subarray(idx, endPtr)); - } else { - var str = ""; - while (idx < endPtr) { - var u0 = heap[idx++]; - if (!(u0 & 128)) { - str += String.fromCharCode(u0); - continue; - } - var u1 = heap[idx++] & 63; - if ((u0 & 224) == 192) { - str += String.fromCharCode((u0 & 31) << 6 | u1); - continue; - } - var u2 = heap[idx++] & 63; - if ((u0 & 240) == 224) { - u0 = (u0 & 15) << 12 | u1 << 6 | u2; - } else { - u0 = (u0 & 7) << 18 | u1 << 12 | u2 << 6 | heap[idx++] & 63; - } - if (u0 < 65536) { - str += String.fromCharCode(u0); - } else { - var ch = u0 - 65536; - str += String.fromCharCode(55296 | ch >> 10, 56320 | ch & 1023); - } + if (endPtr - idx > 16 && heapOrArray.buffer && UTF8Decoder) { + return UTF8Decoder.decode(heapOrArray.buffer instanceof SharedArrayBuffer ? heapOrArray.slice(idx, endPtr) : heapOrArray.subarray(idx, endPtr)); + } + var str = ""; + while (idx < endPtr) { + var u0 = heapOrArray[idx++]; + if (!(u0 & 128)) { + str += String.fromCharCode(u0); + continue; + } + var u1 = heapOrArray[idx++] & 63; + if ((u0 & 224) == 192) { + str += String.fromCharCode((u0 & 31) << 6 | u1); + continue; + } + var u2 = heapOrArray[idx++] & 63; + if ((u0 & 240) == 224) { + u0 = (u0 & 15) << 12 | u1 << 6 | u2; + } else { + u0 = (u0 & 7) << 18 | u1 << 12 | u2 << 6 | heapOrArray[idx++] & 63; + } + if (u0 < 65536) { + str += String.fromCharCode(u0); + } else { + var ch = u0 - 65536; + str += String.fromCharCode(55296 | ch >> 10, 56320 | ch & 1023); } } return str; @@ -2046,10 +1908,10 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ return 0; var startIdx = outIdx; var endIdx = outIdx + maxBytesToWrite - 1; - for (var i = 0; i < str.length; ++i) { - var u = str.charCodeAt(i); + for (var i2 = 0; i2 < str.length; ++i2) { + var u = str.charCodeAt(i2); if (u >= 55296 && u <= 57343) { - var u1 = str.charCodeAt(++i); + var u1 = str.charCodeAt(++i2); u = 65536 + ((u & 1023) << 10) | u1 & 1023; } if (u <= 127) { @@ -2082,40 +1944,6 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ function stringToUTF8(str, outPtr, maxBytesToWrite) { return stringToUTF8Array(str, GROWABLE_HEAP_U8(), outPtr, maxBytesToWrite); } - function lengthBytesUTF8(str) { - var len = 0; - for (var i = 0; i < str.length; ++i) { - var u = str.charCodeAt(i); - if (u >= 55296 && u <= 57343) - u = 65536 + ((u & 1023) << 10) | str.charCodeAt(++i) & 1023; - if (u <= 127) - ++len; - else if (u <= 2047) - len += 2; - else if (u <= 65535) - len += 3; - else - len += 4; - } - return len; - } - var UTF16Decoder = typeof TextDecoder !== "undefined" ? new TextDecoderWrapper("utf-16le") : void 0; - function writeArrayToMemory(array2, buffer3) { - GROWABLE_HEAP_I8().set(array2, buffer3); - } - function writeAsciiToMemory(str, buffer3, dontAddNull) { - for (var i = 0; i < str.length; ++i) { - GROWABLE_HEAP_I8()[buffer3++ >> 0] = str.charCodeAt(i); - } - if (!dontAddNull) - GROWABLE_HEAP_I8()[buffer3 >> 0] = 0; - } - function alignUp(x, multiple) { - if (x % multiple > 0) { - x += multiple - x % multiple; - } - return x; - } var buffer2, HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32, HEAPF32, HEAPF64; if (ENVIRONMENT_IS_PTHREAD) { buffer2 = Module["buffer"]; @@ -2157,13 +1985,10 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ var wasmTable; var __ATPRERUN__ = []; var __ATINIT__ = []; - var __ATEXIT__ = []; var __ATPOSTRUN__ = []; var runtimeInitialized = false; - var runtimeExited = false; - var runtimeKeepaliveCounter = 0; function keepRuntimeAlive() { - return noExitRuntime || runtimeKeepaliveCounter > 0; + return noExitRuntime; } function preRun() { if (Module["preRun"]) { @@ -2181,12 +2006,6 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ return; callRuntimeCallbacks(__ATINIT__); } - function exitRuntime() { - if (ENVIRONMENT_IS_PTHREAD) - return; - PThread.terminateAllThreads(); - runtimeExited = true; - } function postRun() { if (ENVIRONMENT_IS_PTHREAD) return; @@ -2234,8 +2053,6 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ } } } - Module["preloadedImages"] = {}; - Module["preloadedAudios"] = {}; function abort(what) { if (ENVIRONMENT_IS_PTHREAD) { postMessage({ "cmd": "onAbort", "arg": what }); @@ -2248,10 +2065,10 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ err(what); ABORT = true; EXITSTATUS = 1; - what += ". Build with -s ASSERTIONS=1 for more info."; - var e = new WebAssembly.RuntimeError(what); - readyPromiseReject(e); - throw e; + what += ". Build with -sASSERTIONS for more info."; + var e2 = new WebAssembly.RuntimeError(what); + readyPromiseReject(e2); + throw e2; } var dataURIPrefix = "data:application/octet-stream;base64,"; function isDataURI(filename) { @@ -2272,16 +2089,15 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ } if (readBinary) { return readBinary(file); - } else { - throw "both async and sync fetching of the wasm failed"; } + throw "both async and sync fetching of the wasm failed"; } catch (err2) { abort(err2); } } function getBinaryPromise() { if (!wasmBinary && (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER)) { - if (typeof fetch === "function" && !isFileURI(wasmBinaryFile)) { + if (typeof fetch == "function" && !isFileURI(wasmBinaryFile)) { return fetch(wasmBinaryFile, { credentials: "same-origin" }).then(function(response) { if (!response["ok"]) { throw "failed to load wasm binary file at '" + wasmBinaryFile + "'"; @@ -2309,7 +2125,7 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ function receiveInstance(instance, module2) { var exports3 = instance.exports; Module["asm"] = exports3; - registerTlsInit(Module["asm"]["emscripten_tls_init"]); + registerTLSInit(Module["asm"]["_emscripten_tls_init"]); wasmTable = Module["asm"]["__indirect_function_table"]; addOnInit(Module["asm"]["__wasm_call_ctors"]); wasmModule = module2; @@ -2340,7 +2156,7 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ }); } function instantiateAsync() { - if (!wasmBinary && typeof WebAssembly.instantiateStreaming === "function" && !isDataURI(wasmBinaryFile) && !isFileURI(wasmBinaryFile) && typeof fetch === "function") { + if (!wasmBinary && typeof WebAssembly.instantiateStreaming == "function" && !isDataURI(wasmBinaryFile) && !isFileURI(wasmBinaryFile) && !ENVIRONMENT_IS_NODE && typeof fetch == "function") { return fetch(wasmBinaryFile, { credentials: "same-origin" }).then(function(response) { var result = WebAssembly.instantiateStreaming(response, info); return result.then(receiveInstantiationResult, function(reason) { @@ -2357,9 +2173,9 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ try { var exports2 = Module["instantiateWasm"](info, receiveInstance); return exports2; - } catch (e) { - err("Module.instantiateWasm callback failed with error: " + e); - return false; + } catch (e2) { + err("Module.instantiateWasm callback failed with error: " + e2); + readyPromiseReject(e2); } } instantiateAsync().catch(readyPromiseReject); @@ -2368,72 +2184,86 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ var tempDouble; var tempI64; var ASM_CONSTS = {}; - function callRuntimeCallbacks(callbacks2) { - while (callbacks2.length > 0) { - var callback = callbacks2.shift(); - if (typeof callback == "function") { - callback(Module); - continue; - } - var func2 = callback.func; - if (typeof func2 === "number") { - if (callback.arg === void 0) { - getWasmTableEntry(func2)(); - } else { - getWasmTableEntry(func2)(callback.arg); - } - } else { - func2(callback.arg === void 0 ? null : callback.arg); - } - } - } - function withStackSave(f) { - var stack2 = stackSave(); - var ret = f(); - stackRestore(stack2); - return ret; - } - function demangle(func2) { - return func2; - } - function demangleAll(text) { - var regex = /\b_Z[\w\d_]+/g; - return text.replace(regex, function(x) { - var y = demangle(x); - return x === y ? x : y + " [" + x + "]"; - }); + function ExitStatus(status) { + this.name = "ExitStatus"; + this.message = "Program terminated with exit(" + status + ")"; + this.status = status; } function killThread(pthread_ptr) { - GROWABLE_HEAP_I32()[pthread_ptr >> 2] = 0; - var pthread = PThread.pthreads[pthread_ptr]; + var worker = PThread.pthreads[pthread_ptr]; delete PThread.pthreads[pthread_ptr]; - pthread.worker.terminate(); + worker.terminate(); __emscripten_thread_free_data(pthread_ptr); - PThread.runningWorkers.splice(PThread.runningWorkers.indexOf(pthread.worker), 1); - pthread.worker.pthread = void 0; + PThread.runningWorkers.splice(PThread.runningWorkers.indexOf(worker), 1); + worker.pthread_ptr = 0; } function cancelThread(pthread_ptr) { - var pthread = PThread.pthreads[pthread_ptr]; - pthread.worker.postMessage({ "cmd": "cancel" }); + var worker = PThread.pthreads[pthread_ptr]; + worker.postMessage({ "cmd": "cancel" }); } function cleanupThread(pthread_ptr) { - var pthread = PThread.pthreads[pthread_ptr]; - if (pthread) { - GROWABLE_HEAP_I32()[pthread_ptr >> 2] = 0; - var worker = pthread.worker; - PThread.returnWorkerToPool(worker); + var worker = PThread.pthreads[pthread_ptr]; + assert3(worker); + PThread.returnWorkerToPool(worker); + } + function spawnThread(threadParams) { + var worker = PThread.getNewWorker(); + if (!worker) { + return 6; + } + PThread.runningWorkers.push(worker); + PThread.pthreads[threadParams.pthread_ptr] = worker; + worker.pthread_ptr = threadParams.pthread_ptr; + var msg = { "cmd": "run", "start_routine": threadParams.startRoutine, "arg": threadParams.arg, "pthread_ptr": threadParams.pthread_ptr }; + worker.runPthread = () => { + msg.time = performance.now(); + worker.postMessage(msg, threadParams.transferList); + }; + if (worker.loaded) { + worker.runPthread(); + delete worker.runPthread; + } + return 0; + } + var SYSCALLS = { varargs: void 0, get: function() { + SYSCALLS.varargs += 4; + var ret = GROWABLE_HEAP_I32()[SYSCALLS.varargs - 4 >> 2]; + return ret; + }, getStr: function(ptr) { + var ret = UTF8ToString(ptr); + return ret; + } }; + function _proc_exit(code) { + if (ENVIRONMENT_IS_PTHREAD) + return _emscripten_proxy_to_main_thread_js(1, 1, code); + EXITSTATUS = code; + if (!keepRuntimeAlive()) { + PThread.terminateAllThreads(); + if (Module["onExit"]) + Module["onExit"](code); + ABORT = true; } + quit_(code, new ExitStatus(code)); } - function _exit(status) { - exit(status); + function exitJS(status, implicit) { + EXITSTATUS = status; + if (!implicit) { + if (ENVIRONMENT_IS_PTHREAD) { + exitOnMainThread(status); + throw "unwind"; + } else { + } + } + _proc_exit(status); } - function handleException(e) { - if (e instanceof ExitStatus || e == "unwind") { + var _exit = exitJS; + function handleException(e2) { + if (e2 instanceof ExitStatus || e2 == "unwind") { return EXITSTATUS; } - quit_(1, e); + quit_(1, e2); } - var PThread = { unusedWorkers: [], runningWorkers: [], tlsInitFunctions: [], init: function() { + var PThread = { unusedWorkers: [], runningWorkers: [], tlsInitFunctions: [], pthreads: {}, init: function() { if (ENVIRONMENT_IS_PTHREAD) { PThread.initWorker(); } else { @@ -2441,63 +2271,49 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ } }, initMainThread: function() { var pthreadPoolSize = 8; - for (var i = 0; i < pthreadPoolSize; ++i) { + while (pthreadPoolSize--) { PThread.allocateUnusedWorker(); } }, initWorker: function() { noExitRuntime = false; - }, pthreads: {}, setExitStatus: function(status) { + }, setExitStatus: function(status) { EXITSTATUS = status; }, terminateAllThreads: function() { - for (var t in PThread.pthreads) { - var pthread = PThread.pthreads[t]; - if (pthread && pthread.worker) { - PThread.returnWorkerToPool(pthread.worker); - } + for (var worker of Object.values(PThread.pthreads)) { + PThread.returnWorkerToPool(worker); } - for (var i = 0; i < PThread.unusedWorkers.length; ++i) { - var worker = PThread.unusedWorkers[i]; + for (var worker of PThread.unusedWorkers) { worker.terminate(); } PThread.unusedWorkers = []; }, returnWorkerToPool: function(worker) { - PThread.runWithoutMainThreadQueuedCalls(function() { - delete PThread.pthreads[worker.pthread.threadInfoStruct]; - PThread.unusedWorkers.push(worker); - PThread.runningWorkers.splice(PThread.runningWorkers.indexOf(worker), 1); - __emscripten_thread_free_data(worker.pthread.threadInfoStruct); - worker.pthread = void 0; - }); - }, runWithoutMainThreadQueuedCalls: function(func2) { - GROWABLE_HEAP_I32()[__emscripten_allow_main_runtime_queued_calls >> 2] = 0; - try { - func2(); - } finally { - GROWABLE_HEAP_I32()[__emscripten_allow_main_runtime_queued_calls >> 2] = 1; - } + var pthread_ptr = worker.pthread_ptr; + delete PThread.pthreads[pthread_ptr]; + PThread.unusedWorkers.push(worker); + PThread.runningWorkers.splice(PThread.runningWorkers.indexOf(worker), 1); + worker.pthread_ptr = 0; + __emscripten_thread_free_data(pthread_ptr); }, receiveObjectTransfer: function(data) { - }, threadInit: function() { - for (var i in PThread.tlsInitFunctions) { - PThread.tlsInitFunctions[i](); - } + }, threadInitTLS: function() { + PThread.tlsInitFunctions.forEach((f) => f()); }, loadWasmModuleToWorker: function(worker, onFinishedLoading) { - worker.onmessage = (e) => { - var d = e["data"]; + worker.onmessage = (e2) => { + var d = e2["data"]; var cmd = d["cmd"]; - if (worker.pthread) - PThread.currentProxiedOperationCallerThread = worker.pthread.threadInfoStruct; + if (worker.pthread_ptr) + PThread.currentProxiedOperationCallerThread = worker.pthread_ptr; if (d["targetThread"] && d["targetThread"] != _pthread_self()) { - var thread = PThread.pthreads[d.targetThread]; - if (thread) { - thread.worker.postMessage(d, d["transferList"]); + var targetWorker = PThread.pthreads[d.targetThread]; + if (targetWorker) { + targetWorker.postMessage(d, d["transferList"]); } else { err('Internal error! Worker sent a message "' + cmd + '" to target pthread ' + d["targetThread"] + ", but that thread no longer exists!"); } PThread.currentProxiedOperationCallerThread = void 0; return; } - if (cmd === "processQueuedMainThreadWork") { - _emscripten_main_thread_process_queued_calls(); + if (cmd === "processProxyingQueue") { + executeNotifiedProxyingQueue(d["queue"]); } else if (cmd === "spawnThread") { spawnThread(d); } else if (cmd === "cleanupThread") { @@ -2526,22 +2342,22 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ if (Module["onAbort"]) { Module["onAbort"](d["arg"]); } - } else { + } else if (cmd) { err("worker sent an unknown command " + cmd); } PThread.currentProxiedOperationCallerThread = void 0; }; - worker.onerror = (e) => { + worker.onerror = (e2) => { var message = "worker sent an error!"; - err(message + " " + e.filename + ":" + e.lineno + ": " + e.message); - throw e; + err(message + " " + e2.filename + ":" + e2.lineno + ": " + e2.message); + throw e2; }; if (ENVIRONMENT_IS_NODE) { worker.on("message", function(data) { worker.onmessage({ data }); }); - worker.on("error", function(e) { - worker.onerror(e); + worker.on("error", function(e2) { + worker.onerror(e2); }); worker.on("detachedExit", function() { }); @@ -2557,6 +2373,28 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ } return PThread.unusedWorkers.pop(); } }; + Module["PThread"] = PThread; + function callRuntimeCallbacks(callbacks2) { + while (callbacks2.length > 0) { + callbacks2.shift()(Module); + } + } + function withStackSave(f) { + var stack2 = stackSave(); + var ret = f(); + stackRestore(stack2); + return ret; + } + function demangle(func2) { + return func2; + } + function demangleAll(text) { + var regex = /\b_Z[\w\d_]+/g; + return text.replace(regex, function(x) { + var y = demangle(x); + return x === y ? x : y + " [" + x + "]"; + }); + } function establishStackSpace() { var pthread_ptr = _pthread_self(); var stackTop = GROWABLE_HEAP_I32()[pthread_ptr + 44 >> 2]; @@ -2568,11 +2406,11 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ Module["establishStackSpace"] = establishStackSpace; function exitOnMainThread(returnCode) { if (ENVIRONMENT_IS_PTHREAD) - return _emscripten_proxy_to_main_thread_js(1, 0, returnCode); + return _emscripten_proxy_to_main_thread_js(2, 0, returnCode); try { _exit(returnCode); - } catch (e) { - handleException(e); + } catch (e2) { + handleException(e2); } } var wasmTableMirror = []; @@ -2586,7 +2424,12 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ return func2; } function invokeEntryPoint(ptr, arg) { - return getWasmTableEntry(ptr)(arg); + var result = getWasmTableEntry(ptr)(arg); + if (keepRuntimeAlive()) { + PThread.setExitStatus(result); + } else { + __emscripten_thread_exit(result); + } } Module["invokeEntryPoint"] = invokeEntryPoint; function jsStackTrace() { @@ -2594,8 +2437,8 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ if (!error.stack) { try { throw new Error(); - } catch (e) { - error = e; + } catch (e2) { + error = e2; } if (!error.stack) { return "(no stack trace available)"; @@ -2603,48 +2446,15 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ } return error.stack.toString(); } - function registerTlsInit(tlsInitFunc, moduleExports, metadata) { + function registerTLSInit(tlsInitFunc) { PThread.tlsInitFunctions.push(tlsInitFunc); } - function setWasmTableEntry(idx, func2) { - wasmTable.set(idx, func2); - wasmTableMirror[idx] = func2; - } - var _emscripten_get_now; - if (ENVIRONMENT_IS_NODE) { - _emscripten_get_now = () => { - var t = process["hrtime"](); - return t[0] * 1e3 + t[1] / 1e6; - }; - } else if (ENVIRONMENT_IS_PTHREAD) { - _emscripten_get_now = () => performance.now() - Module["__performance_now_clock_drift"]; - } else - _emscripten_get_now = () => performance.now(); - var _emscripten_get_now_is_monotonic = true; - function setErrNo(value) { - GROWABLE_HEAP_I32()[___errno_location() >> 2] = value; - return value; - } - function _clock_gettime(clk_id, tp) { - var now2; - if (clk_id === 0) { - now2 = Date.now(); - } else if ((clk_id === 1 || clk_id === 4) && _emscripten_get_now_is_monotonic) { - now2 = _emscripten_get_now(); - } else { - setErrNo(28); - return -1; - } - GROWABLE_HEAP_I32()[tp >> 2] = now2 / 1e3 | 0; - GROWABLE_HEAP_I32()[tp + 4 >> 2] = now2 % 1e3 * 1e3 * 1e3 | 0; - return 0; - } - function ___clock_gettime(a0, a12) { - return _clock_gettime(a0, a12); + function writeArrayToMemory(array2, buffer3) { + GROWABLE_HEAP_I8().set(array2, buffer3); } function ___emscripten_init_main_thread_js(tb) { __emscripten_thread_init(tb, !ENVIRONMENT_IS_WORKER, 1, !ENVIRONMENT_IS_WEB); - PThread.threadInit(); + PThread.threadInitTLS(); } function ___emscripten_thread_cleanup(thread) { if (!ENVIRONMENT_IS_PTHREAD) @@ -2652,38 +2462,24 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ else postMessage({ "cmd": "cleanupThread", "thread": thread }); } - function spawnThread(threadParams) { - var worker = PThread.getNewWorker(); - if (!worker) { - return 6; - } - PThread.runningWorkers.push(worker); - var pthread = PThread.pthreads[threadParams.pthread_ptr] = { worker, threadInfoStruct: threadParams.pthread_ptr }; - worker.pthread = pthread; - var msg = { "cmd": "run", "start_routine": threadParams.startRoutine, "arg": threadParams.arg, "threadInfoStruct": threadParams.pthread_ptr }; - worker.runPthread = () => { - msg.time = performance.now(); - worker.postMessage(msg, threadParams.transferList); - }; - if (worker.loaded) { - worker.runPthread(); - delete worker.runPthread; - } - return 0; + function pthreadCreateProxied(pthread_ptr, attr, startRoutine, arg) { + if (ENVIRONMENT_IS_PTHREAD) + return _emscripten_proxy_to_main_thread_js(3, 1, pthread_ptr, attr, startRoutine, arg); + return ___pthread_create_js(pthread_ptr, attr, startRoutine, arg); } - function ___pthread_create_js(pthread_ptr, attr, start_routine, arg) { - if (typeof SharedArrayBuffer === "undefined") { + function ___pthread_create_js(pthread_ptr, attr, startRoutine, arg) { + if (typeof SharedArrayBuffer == "undefined") { err("Current environment does not support SharedArrayBuffer, pthreads are not available!"); return 6; } var transferList = []; var error = 0; if (ENVIRONMENT_IS_PTHREAD && (transferList.length === 0 || error)) { - return _emscripten_sync_run_in_main_thread_4(687865856, pthread_ptr, attr, start_routine, arg); + return pthreadCreateProxied(pthread_ptr, attr, startRoutine, arg); } if (error) return error; - var threadParams = { startRoutine: start_routine, pthread_ptr, arg, transferList }; + var threadParams = { startRoutine, pthread_ptr, arg, transferList }; if (ENVIRONMENT_IS_PTHREAD) { threadParams.cmd = "spawnThread"; postMessage(threadParams, transferList); @@ -2694,24 +2490,48 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ function __emscripten_default_pthread_stack_size() { return 2097152; } - function __emscripten_notify_thread_queue(targetThreadId, mainThreadId) { - if (targetThreadId == mainThreadId) { - postMessage({ "cmd": "processQueuedMainThreadWork" }); + var nowIsMonotonic = true; + function __emscripten_get_now_is_monotonic() { + return nowIsMonotonic; + } + function executeNotifiedProxyingQueue(queue) { + Atomics.store(GROWABLE_HEAP_I32(), queue >> 2, 1); + if (_pthread_self()) { + __emscripten_proxy_execute_task_queue(queue); + } + Atomics.compareExchange(GROWABLE_HEAP_I32(), queue >> 2, 1, 0); + } + Module["executeNotifiedProxyingQueue"] = executeNotifiedProxyingQueue; + function __emscripten_notify_task_queue(targetThreadId, currThreadId, mainThreadId, queue) { + if (targetThreadId == currThreadId) { + setTimeout(() => executeNotifiedProxyingQueue(queue)); } else if (ENVIRONMENT_IS_PTHREAD) { - postMessage({ "targetThread": targetThreadId, "cmd": "processThreadQueue" }); + postMessage({ "targetThread": targetThreadId, "cmd": "processProxyingQueue", "queue": queue }); } else { - var pthread = PThread.pthreads[targetThreadId]; - var worker = pthread && pthread.worker; + var worker = PThread.pthreads[targetThreadId]; if (!worker) { return; } - worker.postMessage({ "cmd": "processThreadQueue" }); + worker.postMessage({ "cmd": "processProxyingQueue", "queue": queue }); } return 1; } + function __emscripten_set_offscreencanvas_size(target, width, height) { + return -1; + } function _abort() { abort(""); } + function warnOnce(text) { + if (!warnOnce.shown) + warnOnce.shown = {}; + if (!warnOnce.shown[text]) { + warnOnce.shown[text] = 1; + if (ENVIRONMENT_IS_NODE) + text = "warning: " + text; + err(text); + } + } function _emscripten_check_blocking_allowed() { if (ENVIRONMENT_IS_NODE) return; @@ -2719,9 +2539,25 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ return; warnOnce("Blocking on the main thread is very dangerous, see https://emscripten.org/docs/porting/pthreads.html#blocking-on-the-main-browser-thread"); } - function _emscripten_get_heap_max() { + function _emscripten_date_now() { + return Date.now(); + } + function getHeapMax() { return 2147483648; } + function _emscripten_get_heap_max() { + return getHeapMax(); + } + var _emscripten_get_now; + if (ENVIRONMENT_IS_NODE) { + _emscripten_get_now = () => { + var t2 = process["hrtime"](); + return t2[0] * 1e3 + t2[1] / 1e6; + }; + } else if (ENVIRONMENT_IS_PTHREAD) { + _emscripten_get_now = () => performance.now() - Module["__performance_now_clock_drift"]; + } else + _emscripten_get_now = () => performance.now(); function _emscripten_memcpy_big(dest, src, num) { GROWABLE_HEAP_U8().copyWithin(dest, src, src + num); } @@ -2733,13 +2569,13 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ function _emscripten_proxy_to_main_thread_js(index, sync) { var numCallArgs = arguments.length - 2; var outerArgs = arguments; - return withStackSave(function() { + return withStackSave(() => { var serializedNumCallArgs = numCallArgs; var args = stackAlloc(serializedNumCallArgs * 8); var b = args >> 3; - for (var i = 0; i < numCallArgs; i++) { - var arg = outerArgs[2 + i]; - GROWABLE_HEAP_F64()[b + i] = arg; + for (var i2 = 0; i2 < numCallArgs; i2++) { + var arg = outerArgs[2 + i2]; + GROWABLE_HEAP_F64()[b + i2] = arg; } return _emscripten_run_in_main_runtime_thread_js(index, serializedNumCallArgs, args, sync); }); @@ -2748,8 +2584,8 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ function _emscripten_receive_on_main_thread_js(index, numCallArgs, args) { _emscripten_receive_on_main_thread_js_callArgs.length = numCallArgs; var b = args >> 3; - for (var i = 0; i < numCallArgs; i++) { - _emscripten_receive_on_main_thread_js_callArgs[i] = GROWABLE_HEAP_F64()[b + i]; + for (var i2 = 0; i2 < numCallArgs; i2++) { + _emscripten_receive_on_main_thread_js_callArgs[i2] = GROWABLE_HEAP_F64()[b + i2]; } var isEmAsmConst = index < 0; var func2 = !isEmAsmConst ? proxiedFunctionTable[index] : ASM_CONSTS[-index - 1]; @@ -2760,7 +2596,7 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ wasmMemory.grow(size - buffer2.byteLength + 65535 >>> 16); updateGlobalBufferAndViews(wasmMemory.buffer); return 1; - } catch (e) { + } catch (e2) { } } function _emscripten_resize_heap(requestedSize) { @@ -2769,10 +2605,11 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ if (requestedSize <= oldSize) { return false; } - var maxHeapSize = _emscripten_get_heap_max(); + var maxHeapSize = getHeapMax(); if (requestedSize > maxHeapSize) { return false; } + let alignUp = (x, multiple) => x + (multiple - x % multiple) % multiple; for (var cutDown = 1; cutDown <= 4; cutDown *= 2) { var overGrownHeapSize = oldSize * (1 + 0.2 / cutDown); overGrownHeapSize = Math.min(overGrownHeapSize, requestedSize + 100663296); @@ -2784,387 +2621,109 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ } return false; } - var JSEvents = { inEventHandler: 0, removeAllEventListeners: function() { - for (var i = JSEvents.eventHandlers.length - 1; i >= 0; --i) { - JSEvents._removeHandler(i); - } - JSEvents.eventHandlers = []; - JSEvents.deferredCalls = []; - }, registerRemoveEventListeners: function() { - if (!JSEvents.removeEventListenersRegistered) { - __ATEXIT__.push(JSEvents.removeAllEventListeners); - JSEvents.removeEventListenersRegistered = true; - } - }, deferredCalls: [], deferCall: function(targetFunction, precedence, argsList) { - function arraysHaveEqualContent(arrA, arrB) { - if (arrA.length != arrB.length) - return false; - for (var i2 in arrA) { - if (arrA[i2] != arrB[i2]) - return false; - } - return true; - } - for (var i in JSEvents.deferredCalls) { - var call = JSEvents.deferredCalls[i]; - if (call.targetFunction == targetFunction && arraysHaveEqualContent(call.argsList, argsList)) { - return; - } - } - JSEvents.deferredCalls.push({ targetFunction, precedence, argsList }); - JSEvents.deferredCalls.sort(function(x, y) { - return x.precedence < y.precedence; - }); - }, removeDeferredCalls: function(targetFunction) { - for (var i = 0; i < JSEvents.deferredCalls.length; ++i) { - if (JSEvents.deferredCalls[i].targetFunction == targetFunction) { - JSEvents.deferredCalls.splice(i, 1); - --i; - } - } - }, canPerformEventHandlerRequests: function() { - return JSEvents.inEventHandler && JSEvents.currentEventHandler.allowsDeferredCalls; - }, runDeferredCalls: function() { - if (!JSEvents.canPerformEventHandlerRequests()) { - return; - } - for (var i = 0; i < JSEvents.deferredCalls.length; ++i) { - var call = JSEvents.deferredCalls[i]; - JSEvents.deferredCalls.splice(i, 1); - --i; - call.targetFunction.apply(null, call.argsList); - } - }, eventHandlers: [], removeAllHandlersOnTarget: function(target, eventTypeString) { - for (var i = 0; i < JSEvents.eventHandlers.length; ++i) { - if (JSEvents.eventHandlers[i].target == target && (!eventTypeString || eventTypeString == JSEvents.eventHandlers[i].eventTypeString)) { - JSEvents._removeHandler(i--); - } - } - }, _removeHandler: function(i) { - var h = JSEvents.eventHandlers[i]; - h.target.removeEventListener(h.eventTypeString, h.eventListenerFunc, h.useCapture); - JSEvents.eventHandlers.splice(i, 1); - }, registerOrRemoveHandler: function(eventHandler) { - var jsEventHandler = function jsEventHandler2(event) { - ++JSEvents.inEventHandler; - JSEvents.currentEventHandler = eventHandler; - JSEvents.runDeferredCalls(); - eventHandler.handlerFunc(event); - JSEvents.runDeferredCalls(); - --JSEvents.inEventHandler; - }; - if (eventHandler.callbackfunc) { - eventHandler.eventListenerFunc = jsEventHandler; - eventHandler.target.addEventListener(eventHandler.eventTypeString, jsEventHandler, eventHandler.useCapture); - JSEvents.eventHandlers.push(eventHandler); - JSEvents.registerRemoveEventListeners(); - } else { - for (var i = 0; i < JSEvents.eventHandlers.length; ++i) { - if (JSEvents.eventHandlers[i].target == eventHandler.target && JSEvents.eventHandlers[i].eventTypeString == eventHandler.eventTypeString) { - JSEvents._removeHandler(i--); - } - } - } - }, queueEventHandlerOnThread_iiii: function(targetThread, eventHandlerFunc, eventTypeId, eventData, userData) { - withStackSave(function() { - var varargs = stackAlloc(12); - GROWABLE_HEAP_I32()[varargs >> 2] = eventTypeId; - GROWABLE_HEAP_I32()[varargs + 4 >> 2] = eventData; - GROWABLE_HEAP_I32()[varargs + 8 >> 2] = userData; - _emscripten_dispatch_to_thread_(targetThread, 637534208, eventHandlerFunc, eventData, varargs); - }); - }, getTargetThreadForEventCallback: function(targetThread) { - switch (targetThread) { - case 1: - return 0; - case 2: - return PThread.currentProxiedOperationCallerThread; - default: - return targetThread; - } - }, getNodeNameForTarget: function(target) { - if (!target) - return ""; - if (target == window) - return "#window"; - if (target == screen) - return "#screen"; - return target && target.nodeName ? target.nodeName : ""; - }, fullscreenEnabled: function() { - return document.fullscreenEnabled || document.webkitFullscreenEnabled; - } }; - function stringToNewUTF8(jsString) { - var length = lengthBytesUTF8(jsString) + 1; - var cString = _malloc(length); - stringToUTF8(jsString, cString, length); - return cString; - } - function _emscripten_set_offscreencanvas_size_on_target_thread_js(targetThread, targetCanvas, width, height) { - withStackSave(function() { - var varargs = stackAlloc(12); - var targetCanvasPtr = 0; - if (targetCanvas) { - targetCanvasPtr = stringToNewUTF8(targetCanvas); - } - GROWABLE_HEAP_I32()[varargs >> 2] = targetCanvasPtr; - GROWABLE_HEAP_I32()[varargs + 4 >> 2] = width; - GROWABLE_HEAP_I32()[varargs + 8 >> 2] = height; - _emscripten_dispatch_to_thread_(targetThread, 657457152, 0, targetCanvasPtr, varargs); - }); - } - function _emscripten_set_offscreencanvas_size_on_target_thread(targetThread, targetCanvas, width, height) { - targetCanvas = targetCanvas ? UTF8ToString(targetCanvas) : ""; - _emscripten_set_offscreencanvas_size_on_target_thread_js(targetThread, targetCanvas, width, height); - } - function maybeCStringToJsString(cString) { - return cString > 2 ? UTF8ToString(cString) : cString; - } - var specialHTMLTargets = [0, typeof document !== "undefined" ? document : 0, typeof window !== "undefined" ? window : 0]; - function findEventTarget(target) { - target = maybeCStringToJsString(target); - var domElement = specialHTMLTargets[target] || (typeof document !== "undefined" ? document.querySelector(target) : void 0); - return domElement; - } - function findCanvasEventTarget(target) { - return findEventTarget(target); - } - function _emscripten_set_canvas_element_size_calling_thread(target, width, height) { - var canvas = findCanvasEventTarget(target); - if (!canvas) - return -4; - if (canvas.canvasSharedPtr) { - GROWABLE_HEAP_I32()[canvas.canvasSharedPtr >> 2] = width; - GROWABLE_HEAP_I32()[canvas.canvasSharedPtr + 4 >> 2] = height; - } - if (canvas.offscreenCanvas || !canvas.controlTransferredOffscreen) { - if (canvas.offscreenCanvas) - canvas = canvas.offscreenCanvas; - var autoResizeViewport = false; - if (canvas.GLctxObject && canvas.GLctxObject.GLctx) { - var prevViewport = canvas.GLctxObject.GLctx.getParameter(2978); - autoResizeViewport = prevViewport[0] === 0 && prevViewport[1] === 0 && prevViewport[2] === canvas.width && prevViewport[3] === canvas.height; - } - canvas.width = width; - canvas.height = height; - if (autoResizeViewport) { - canvas.GLctxObject.GLctx.viewport(0, 0, width, height); - } - } else if (canvas.canvasSharedPtr) { - var targetThread = GROWABLE_HEAP_I32()[canvas.canvasSharedPtr + 8 >> 2]; - _emscripten_set_offscreencanvas_size_on_target_thread(targetThread, target, width, height); - return 1; - } else { - return -4; - } - return 0; - } - function _emscripten_set_canvas_element_size_main_thread(target, width, height) { - if (ENVIRONMENT_IS_PTHREAD) - return _emscripten_proxy_to_main_thread_js(2, 1, target, width, height); - return _emscripten_set_canvas_element_size_calling_thread(target, width, height); - } - function _emscripten_set_canvas_element_size(target, width, height) { - var canvas = findCanvasEventTarget(target); - if (canvas) { - return _emscripten_set_canvas_element_size_calling_thread(target, width, height); - } else { - return _emscripten_set_canvas_element_size_main_thread(target, width, height); - } - } function _emscripten_unwind_to_js_event_loop() { throw "unwind"; } - function __webgl_enable_ANGLE_instanced_arrays(ctx) { - var ext = ctx.getExtension("ANGLE_instanced_arrays"); - if (ext) { - ctx["vertexAttribDivisor"] = function(index, divisor) { - ext["vertexAttribDivisorANGLE"](index, divisor); - }; - ctx["drawArraysInstanced"] = function(mode, first, count2, primcount) { - ext["drawArraysInstancedANGLE"](mode, first, count2, primcount); - }; - ctx["drawElementsInstanced"] = function(mode, count2, type, indices, primcount) { - ext["drawElementsInstancedANGLE"](mode, count2, type, indices, primcount); - }; - return 1; - } - } - function __webgl_enable_OES_vertex_array_object(ctx) { - var ext = ctx.getExtension("OES_vertex_array_object"); - if (ext) { - ctx["createVertexArray"] = function() { - return ext["createVertexArrayOES"](); - }; - ctx["deleteVertexArray"] = function(vao) { - ext["deleteVertexArrayOES"](vao); - }; - ctx["bindVertexArray"] = function(vao) { - ext["bindVertexArrayOES"](vao); - }; - ctx["isVertexArray"] = function(vao) { - return ext["isVertexArrayOES"](vao); - }; - return 1; - } - } - function __webgl_enable_WEBGL_draw_buffers(ctx) { - var ext = ctx.getExtension("WEBGL_draw_buffers"); - if (ext) { - ctx["drawBuffers"] = function(n, bufs) { - ext["drawBuffersWEBGL"](n, bufs); - }; - return 1; - } - } - function __webgl_enable_WEBGL_multi_draw(ctx) { - return !!(ctx.multiDrawWebgl = ctx.getExtension("WEBGL_multi_draw")); - } - var GL = { counter: 1, buffers: [], programs: [], framebuffers: [], renderbuffers: [], textures: [], shaders: [], vaos: [], contexts: {}, offscreenCanvases: {}, queries: [], stringCache: {}, unpackAlignment: 4, recordError: function recordError(errorCode) { - if (!GL.lastError) { - GL.lastError = errorCode; - } - }, getNewId: function(table) { - var ret = GL.counter++; - for (var i = table.length; i < ret; i++) { - table[i] = null; - } - return ret; - }, getSource: function(shader, count2, string2, length) { - var source = ""; - for (var i = 0; i < count2; ++i) { - var len = length ? GROWABLE_HEAP_I32()[length + i * 4 >> 2] : -1; - source += UTF8ToString(GROWABLE_HEAP_I32()[string2 + i * 4 >> 2], len < 0 ? void 0 : len); - } - return source; - }, createContext: function(canvas, webGLContextAttributes) { - if (!canvas.getContextSafariWebGL2Fixed) { - canvas.getContextSafariWebGL2Fixed = canvas.getContext; - canvas.getContext = function(ver, attrs) { - var gl = canvas.getContextSafariWebGL2Fixed(ver, attrs); - return ver == "webgl" == gl instanceof WebGLRenderingContext ? gl : null; - }; - } - var ctx = canvas.getContext("webgl", webGLContextAttributes); - if (!ctx) - return 0; - var handle = GL.registerContext(ctx, webGLContextAttributes); - return handle; - }, registerContext: function(ctx, webGLContextAttributes) { - var handle = _malloc(8); - GROWABLE_HEAP_I32()[handle + 4 >> 2] = _pthread_self(); - var context = { handle, attributes: webGLContextAttributes, version: webGLContextAttributes.majorVersion, GLctx: ctx }; - if (ctx.canvas) - ctx.canvas.GLctxObject = context; - GL.contexts[handle] = context; - if (typeof webGLContextAttributes.enableExtensionsByDefault === "undefined" || webGLContextAttributes.enableExtensionsByDefault) { - GL.initExtensions(context); - } - return handle; - }, makeContextCurrent: function(contextHandle) { - GL.currentContext = GL.contexts[contextHandle]; - Module.ctx = GLctx = GL.currentContext && GL.currentContext.GLctx; - return !(contextHandle && !GLctx); - }, getContext: function(contextHandle) { - return GL.contexts[contextHandle]; - }, deleteContext: function(contextHandle) { - if (GL.currentContext === GL.contexts[contextHandle]) - GL.currentContext = null; - if (typeof JSEvents === "object") - JSEvents.removeAllHandlersOnTarget(GL.contexts[contextHandle].GLctx.canvas); - if (GL.contexts[contextHandle] && GL.contexts[contextHandle].GLctx.canvas) - GL.contexts[contextHandle].GLctx.canvas.GLctxObject = void 0; - _free(GL.contexts[contextHandle].handle); - GL.contexts[contextHandle] = null; - }, initExtensions: function(context) { - if (!context) - context = GL.currentContext; - if (context.initExtensionsDone) - return; - context.initExtensionsDone = true; - var GLctx2 = context.GLctx; - __webgl_enable_ANGLE_instanced_arrays(GLctx2); - __webgl_enable_OES_vertex_array_object(GLctx2); - __webgl_enable_WEBGL_draw_buffers(GLctx2); - { - GLctx2.disjointTimerQueryExt = GLctx2.getExtension("EXT_disjoint_timer_query"); - } - __webgl_enable_WEBGL_multi_draw(GLctx2); - var exts = GLctx2.getSupportedExtensions() || []; - exts.forEach(function(ext) { - if (!ext.includes("lose_context") && !ext.includes("debug")) { - GLctx2.getExtension(ext); - } - }); - } }; - var __emscripten_webgl_power_preferences = ["default", "low-power", "high-performance"]; - function _emscripten_webgl_do_create_context(target, attributes) { - var a = attributes >> 2; - var powerPreference = GROWABLE_HEAP_I32()[a + (24 >> 2)]; - var contextAttributes = { "alpha": !!GROWABLE_HEAP_I32()[a + (0 >> 2)], "depth": !!GROWABLE_HEAP_I32()[a + (4 >> 2)], "stencil": !!GROWABLE_HEAP_I32()[a + (8 >> 2)], "antialias": !!GROWABLE_HEAP_I32()[a + (12 >> 2)], "premultipliedAlpha": !!GROWABLE_HEAP_I32()[a + (16 >> 2)], "preserveDrawingBuffer": !!GROWABLE_HEAP_I32()[a + (20 >> 2)], "powerPreference": __emscripten_webgl_power_preferences[powerPreference], "failIfMajorPerformanceCaveat": !!GROWABLE_HEAP_I32()[a + (28 >> 2)], majorVersion: GROWABLE_HEAP_I32()[a + (32 >> 2)], minorVersion: GROWABLE_HEAP_I32()[a + (36 >> 2)], enableExtensionsByDefault: GROWABLE_HEAP_I32()[a + (40 >> 2)], explicitSwapControl: GROWABLE_HEAP_I32()[a + (44 >> 2)], proxyContextToMainThread: GROWABLE_HEAP_I32()[a + (48 >> 2)], renderViaOffscreenBackBuffer: GROWABLE_HEAP_I32()[a + (52 >> 2)] }; - var canvas = findCanvasEventTarget(target); - if (!canvas) { - return 0; - } - if (contextAttributes.explicitSwapControl) { - return 0; - } - var contextHandle = GL.createContext(canvas, contextAttributes); - return contextHandle; + function _fd_close(fd) { + if (ENVIRONMENT_IS_PTHREAD) + return _emscripten_proxy_to_main_thread_js(4, 1, fd); + return 52; } - function _emscripten_webgl_create_context(a0, a12) { - return _emscripten_webgl_do_create_context(a0, a12); + function _fd_seek(fd, offset_low, offset_high, whence, newOffset) { + if (ENVIRONMENT_IS_PTHREAD) + return _emscripten_proxy_to_main_thread_js(5, 1, fd, offset_low, offset_high, whence, newOffset); + return 70; } - var SYSCALLS = { mappings: {}, buffers: [null, [], []], printChar: function(stream, curr) { - var buffer3 = SYSCALLS.buffers[stream]; + var printCharBuffers = [null, [], []]; + function printChar(stream, curr) { + var buffer3 = printCharBuffers[stream]; if (curr === 0 || curr === 10) { (stream === 1 ? out : err)(UTF8ArrayToString(buffer3, 0)); buffer3.length = 0; } else { buffer3.push(curr); } - }, varargs: void 0, get: function() { - SYSCALLS.varargs += 4; - var ret = GROWABLE_HEAP_I32()[SYSCALLS.varargs - 4 >> 2]; - return ret; - }, getStr: function(ptr) { - var ret = UTF8ToString(ptr); - return ret; - }, get64: function(low, high) { - return low; - } }; - function _fd_close(fd) { - if (ENVIRONMENT_IS_PTHREAD) - return _emscripten_proxy_to_main_thread_js(3, 1, fd); - return 0; - } - function _fd_seek(fd, offset_low, offset_high, whence, newOffset) { - if (ENVIRONMENT_IS_PTHREAD) - return _emscripten_proxy_to_main_thread_js(4, 1, fd, offset_low, offset_high, whence, newOffset); } function _fd_write(fd, iov, iovcnt, pnum) { if (ENVIRONMENT_IS_PTHREAD) - return _emscripten_proxy_to_main_thread_js(5, 1, fd, iov, iovcnt, pnum); + return _emscripten_proxy_to_main_thread_js(6, 1, fd, iov, iovcnt, pnum); var num = 0; - for (var i = 0; i < iovcnt; i++) { - var ptr = GROWABLE_HEAP_I32()[iov >> 2]; - var len = GROWABLE_HEAP_I32()[iov + 4 >> 2]; + for (var i2 = 0; i2 < iovcnt; i2++) { + var ptr = GROWABLE_HEAP_U32()[iov >> 2]; + var len = GROWABLE_HEAP_U32()[iov + 4 >> 2]; iov += 8; for (var j = 0; j < len; j++) { - SYSCALLS.printChar(fd, GROWABLE_HEAP_U8()[ptr + j]); + printChar(fd, GROWABLE_HEAP_U8()[ptr + j]); } num += len; } - GROWABLE_HEAP_I32()[pnum >> 2] = num; + GROWABLE_HEAP_U32()[pnum >> 2] = num; return 0; } - function _setTempRet0(val) { - setTempRet0(val); + function getCFunc(ident) { + var func2 = Module["_" + ident]; + return func2; + } + function ccall(ident, returnType, argTypes, args, opts) { + var toC = { "string": (str) => { + var ret2 = 0; + if (str !== null && str !== void 0 && str !== 0) { + var len = (str.length << 2) + 1; + ret2 = stackAlloc(len); + stringToUTF8(str, ret2, len); + } + return ret2; + }, "array": (arr) => { + var ret2 = stackAlloc(arr.length); + writeArrayToMemory(arr, ret2); + return ret2; + } }; + function convertReturnValue(ret2) { + if (returnType === "string") { + return UTF8ToString(ret2); + } + if (returnType === "boolean") + return Boolean(ret2); + return ret2; + } + var func2 = getCFunc(ident); + var cArgs = []; + var stack2 = 0; + if (args) { + for (var i2 = 0; i2 < args.length; i2++) { + var converter = toC[argTypes[i2]]; + if (converter) { + if (stack2 === 0) + stack2 = stackSave(); + cArgs[i2] = converter(args[i2]); + } else { + cArgs[i2] = args[i2]; + } + } + } + var ret = func2.apply(null, cArgs); + function onDone(ret2) { + if (stack2 !== 0) + stackRestore(stack2); + return convertReturnValue(ret2); + } + ret = onDone(ret); + return ret; + } + function cwrap(ident, returnType, argTypes, opts) { + argTypes = argTypes || []; + var numericArgs = argTypes.every((type) => type === "number" || type === "boolean"); + var numericRet = returnType !== "string"; + if (numericRet && numericArgs && !opts) { + return getCFunc(ident); + } + return function() { + return ccall(ident, returnType, argTypes, arguments, opts); + }; } PThread.init(); - var GLctx; - var proxiedFunctionTable = [null, exitOnMainThread, _emscripten_set_canvas_element_size_main_thread, _fd_close, _fd_seek, _fd_write]; - var ASSERTIONS = false; - var asmLibraryArg = { "__clock_gettime": ___clock_gettime, "__emscripten_init_main_thread_js": ___emscripten_init_main_thread_js, "__emscripten_thread_cleanup": ___emscripten_thread_cleanup, "__pthread_create_js": ___pthread_create_js, "_emscripten_default_pthread_stack_size": __emscripten_default_pthread_stack_size, "_emscripten_notify_thread_queue": __emscripten_notify_thread_queue, "abort": _abort, "emscripten_check_blocking_allowed": _emscripten_check_blocking_allowed, "emscripten_get_heap_max": _emscripten_get_heap_max, "emscripten_get_now": _emscripten_get_now, "emscripten_memcpy_big": _emscripten_memcpy_big, "emscripten_num_logical_cores": _emscripten_num_logical_cores, "emscripten_receive_on_main_thread_js": _emscripten_receive_on_main_thread_js, "emscripten_resize_heap": _emscripten_resize_heap, "emscripten_set_canvas_element_size": _emscripten_set_canvas_element_size, "emscripten_unwind_to_js_event_loop": _emscripten_unwind_to_js_event_loop, "emscripten_webgl_create_context": _emscripten_webgl_create_context, "exit": _exit, "fd_close": _fd_close, "fd_seek": _fd_seek, "fd_write": _fd_write, "memory": wasmMemory || Module["wasmMemory"], "setTempRet0": _setTempRet0 }; + var proxiedFunctionTable = [null, _proc_exit, exitOnMainThread, pthreadCreateProxied, _fd_close, _fd_seek, _fd_write]; + var asmLibraryArg = { "__emscripten_init_main_thread_js": ___emscripten_init_main_thread_js, "__emscripten_thread_cleanup": ___emscripten_thread_cleanup, "__pthread_create_js": ___pthread_create_js, "_emscripten_default_pthread_stack_size": __emscripten_default_pthread_stack_size, "_emscripten_get_now_is_monotonic": __emscripten_get_now_is_monotonic, "_emscripten_notify_task_queue": __emscripten_notify_task_queue, "_emscripten_set_offscreencanvas_size": __emscripten_set_offscreencanvas_size, "abort": _abort, "emscripten_check_blocking_allowed": _emscripten_check_blocking_allowed, "emscripten_date_now": _emscripten_date_now, "emscripten_get_heap_max": _emscripten_get_heap_max, "emscripten_get_now": _emscripten_get_now, "emscripten_memcpy_big": _emscripten_memcpy_big, "emscripten_num_logical_cores": _emscripten_num_logical_cores, "emscripten_receive_on_main_thread_js": _emscripten_receive_on_main_thread_js, "emscripten_resize_heap": _emscripten_resize_heap, "emscripten_unwind_to_js_event_loop": _emscripten_unwind_to_js_event_loop, "exit": _exit, "fd_close": _fd_close, "fd_seek": _fd_seek, "fd_write": _fd_write, "memory": wasmMemory || Module["wasmMemory"] }; var asm = createWasm(); var ___wasm_call_ctors = Module["___wasm_call_ctors"] = function() { return (___wasm_call_ctors = Module["___wasm_call_ctors"] = Module["asm"]["__wasm_call_ctors"]).apply(null, arguments); @@ -3460,51 +3019,42 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ var _free = Module["_free"] = function() { return (_free = Module["_free"] = Module["asm"]["free"]).apply(null, arguments); }; - var _emscripten_tls_init = Module["_emscripten_tls_init"] = function() { - return (_emscripten_tls_init = Module["_emscripten_tls_init"] = Module["asm"]["emscripten_tls_init"]).apply(null, arguments); - }; - var ___errno_location = Module["___errno_location"] = function() { - return (___errno_location = Module["___errno_location"] = Module["asm"]["__errno_location"]).apply(null, arguments); + var __emscripten_tls_init = Module["__emscripten_tls_init"] = function() { + return (__emscripten_tls_init = Module["__emscripten_tls_init"] = Module["asm"]["_emscripten_tls_init"]).apply(null, arguments); }; var _pthread_self = Module["_pthread_self"] = function() { return (_pthread_self = Module["_pthread_self"] = Module["asm"]["pthread_self"]).apply(null, arguments); }; - var _emscripten_main_thread_process_queued_calls = Module["_emscripten_main_thread_process_queued_calls"] = function() { - return (_emscripten_main_thread_process_queued_calls = Module["_emscripten_main_thread_process_queued_calls"] = Module["asm"]["emscripten_main_thread_process_queued_calls"]).apply(null, arguments); - }; - var __emscripten_thread_crashed = Module["__emscripten_thread_crashed"] = function() { - return (__emscripten_thread_crashed = Module["__emscripten_thread_crashed"] = Module["asm"]["_emscripten_thread_crashed"]).apply(null, arguments); + var ___errno_location = Module["___errno_location"] = function() { + return (___errno_location = Module["___errno_location"] = Module["asm"]["__errno_location"]).apply(null, arguments); }; var __emscripten_thread_init = Module["__emscripten_thread_init"] = function() { return (__emscripten_thread_init = Module["__emscripten_thread_init"] = Module["asm"]["_emscripten_thread_init"]).apply(null, arguments); }; - var _emscripten_current_thread_process_queued_calls = Module["_emscripten_current_thread_process_queued_calls"] = function() { - return (_emscripten_current_thread_process_queued_calls = Module["_emscripten_current_thread_process_queued_calls"] = Module["asm"]["emscripten_current_thread_process_queued_calls"]).apply(null, arguments); + var __emscripten_thread_crashed = Module["__emscripten_thread_crashed"] = function() { + return (__emscripten_thread_crashed = Module["__emscripten_thread_crashed"] = Module["asm"]["_emscripten_thread_crashed"]).apply(null, arguments); + }; + var _emscripten_main_thread_process_queued_calls = Module["_emscripten_main_thread_process_queued_calls"] = function() { + return (_emscripten_main_thread_process_queued_calls = Module["_emscripten_main_thread_process_queued_calls"] = Module["asm"]["emscripten_main_thread_process_queued_calls"]).apply(null, arguments); }; var _emscripten_main_browser_thread_id = Module["_emscripten_main_browser_thread_id"] = function() { return (_emscripten_main_browser_thread_id = Module["_emscripten_main_browser_thread_id"] = Module["asm"]["emscripten_main_browser_thread_id"]).apply(null, arguments); }; - var _emscripten_sync_run_in_main_thread_2 = Module["_emscripten_sync_run_in_main_thread_2"] = function() { - return (_emscripten_sync_run_in_main_thread_2 = Module["_emscripten_sync_run_in_main_thread_2"] = Module["asm"]["emscripten_sync_run_in_main_thread_2"]).apply(null, arguments); - }; - var _emscripten_sync_run_in_main_thread_4 = Module["_emscripten_sync_run_in_main_thread_4"] = function() { - return (_emscripten_sync_run_in_main_thread_4 = Module["_emscripten_sync_run_in_main_thread_4"] = Module["asm"]["emscripten_sync_run_in_main_thread_4"]).apply(null, arguments); - }; var _emscripten_run_in_main_runtime_thread_js = Module["_emscripten_run_in_main_runtime_thread_js"] = function() { return (_emscripten_run_in_main_runtime_thread_js = Module["_emscripten_run_in_main_runtime_thread_js"] = Module["asm"]["emscripten_run_in_main_runtime_thread_js"]).apply(null, arguments); }; var _emscripten_dispatch_to_thread_ = Module["_emscripten_dispatch_to_thread_"] = function() { return (_emscripten_dispatch_to_thread_ = Module["_emscripten_dispatch_to_thread_"] = Module["asm"]["emscripten_dispatch_to_thread_"]).apply(null, arguments); }; + var __emscripten_proxy_execute_task_queue = Module["__emscripten_proxy_execute_task_queue"] = function() { + return (__emscripten_proxy_execute_task_queue = Module["__emscripten_proxy_execute_task_queue"] = Module["asm"]["_emscripten_proxy_execute_task_queue"]).apply(null, arguments); + }; var __emscripten_thread_free_data = Module["__emscripten_thread_free_data"] = function() { return (__emscripten_thread_free_data = Module["__emscripten_thread_free_data"] = Module["asm"]["_emscripten_thread_free_data"]).apply(null, arguments); }; var __emscripten_thread_exit = Module["__emscripten_thread_exit"] = function() { return (__emscripten_thread_exit = Module["__emscripten_thread_exit"] = Module["asm"]["_emscripten_thread_exit"]).apply(null, arguments); }; - var _memalign = Module["_memalign"] = function() { - return (_memalign = Module["_memalign"] = Module["asm"]["memalign"]).apply(null, arguments); - }; var _emscripten_stack_set_limits = Module["_emscripten_stack_set_limits"] = function() { return (_emscripten_stack_set_limits = Module["_emscripten_stack_set_limits"] = Module["asm"]["emscripten_stack_set_limits"]).apply(null, arguments); }; @@ -3523,19 +3073,12 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ var dynCall_jiji = Module["dynCall_jiji"] = function() { return (dynCall_jiji = Module["dynCall_jiji"] = Module["asm"]["dynCall_jiji"]).apply(null, arguments); }; - var __emscripten_allow_main_runtime_queued_calls = Module["__emscripten_allow_main_runtime_queued_calls"] = 21672; - Module["cwrap"] = cwrap; Module["keepRuntimeAlive"] = keepRuntimeAlive; - Module["PThread"] = PThread; - Module["PThread"] = PThread; Module["wasmMemory"] = wasmMemory; + Module["cwrap"] = cwrap; Module["ExitStatus"] = ExitStatus; + Module["PThread"] = PThread; var calledRun; - function ExitStatus(status) { - this.name = "ExitStatus"; - this.message = "Program terminated with exit(" + status + ")"; - this.status = status; - } dependenciesFulfilled = function runCaller() { if (!calledRun) run(); @@ -3582,32 +3125,6 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ doRun(); } } - Module["run"] = run; - function exit(status, implicit) { - EXITSTATUS = status; - if (!implicit) { - if (ENVIRONMENT_IS_PTHREAD) { - exitOnMainThread(status); - throw "unwind"; - } else { - } - } - if (keepRuntimeAlive()) { - } else { - exitRuntime(); - } - procExit(status); - } - function procExit(code) { - EXITSTATUS = code; - if (!keepRuntimeAlive()) { - PThread.terminateAllThreads(); - if (Module["onExit"]) - Module["onExit"](code); - ABORT = true; - } - quit_(code, new ExitStatus(code)); - } if (Module["preInit"]) { if (typeof Module["preInit"] == "function") Module["preInit"] = [Module["preInit"]]; @@ -3658,24 +3175,24 @@ var require_tfjs_backend_wasm_threaded_simd = __commonJS({ } }); -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm-threaded-simd.worker.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm-threaded-simd.worker.js var require_tfjs_backend_wasm_threaded_simd_worker = __commonJS({ - "node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm-threaded-simd.worker.js"(exports, module) { - module.exports.wasmWorkerContents = `"use strict";var Module={};var ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof process.versions==="object"&&typeof process.versions.node==="string";if(ENVIRONMENT_IS_NODE){var nodeWorkerThreads=require("worker_threads");var parentPort=nodeWorkerThreads.parentPort;parentPort.on("message",function(data){onmessage({data:data})});var fs=require("fs");Object.assign(global,{self:global,require:require,Module:Module,location:{href:__filename},Worker:nodeWorkerThreads.Worker,importScripts:function(f){(0,eval)(fs.readFileSync(f,"utf8"))},postMessage:function(msg){parentPort.postMessage(msg)},performance:global.performance||{now:function(){return Date.now()}}})}function threadPrintErr(){var text=Array.prototype.slice.call(arguments).join(" ");if(ENVIRONMENT_IS_NODE){fs.writeSync(2,text+" -");return}console.error(text)}function threadAlert(){var text=Array.prototype.slice.call(arguments).join(" ");postMessage({cmd:"alert",text:text,threadId:Module["_pthread_self"]()})}var err=threadPrintErr;self.alert=threadAlert;Module["instantiateWasm"]=((info,receiveInstance)=>{var instance=new WebAssembly.Instance(Module["wasmModule"],info);receiveInstance(instance);Module["wasmModule"]=null;return instance.exports});self.onmessage=(e=>{try{if(e.data.cmd==="load"){Module["wasmModule"]=e.data.wasmModule;Module["wasmMemory"]=e.data.wasmMemory;Module["buffer"]=Module["wasmMemory"].buffer;Module["ENVIRONMENT_IS_PTHREAD"]=true;if(typeof e.data.urlOrBlob==="string"){importScripts(e.data.urlOrBlob)}else{var objectUrl=URL.createObjectURL(e.data.urlOrBlob);importScripts(objectUrl);URL.revokeObjectURL(objectUrl)}WasmBackendModuleThreadedSimd(Module).then(function(instance){Module=instance})}else if(e.data.cmd==="run"){Module["__performance_now_clock_drift"]=performance.now()-e.data.time;Module["__emscripten_thread_init"](e.data.threadInfoStruct,0,0,1);Module["establishStackSpace"]();Module["PThread"].receiveObjectTransfer(e.data);Module["PThread"].threadInit();try{var result=Module["invokeEntryPoint"](e.data.start_routine,e.data.arg);if(Module["keepRuntimeAlive"]()){Module["PThread"].setExitStatus(result)}else{Module["__emscripten_thread_exit"](result)}}catch(ex){if(ex!="unwind"){if(ex instanceof Module["ExitStatus"]){if(Module["keepRuntimeAlive"]()){}else{Module["__emscripten_thread_exit"](ex.status)}}else{throw ex}}}}else if(e.data.cmd==="cancel"){if(Module["_pthread_self"]()){Module["__emscripten_thread_exit"](-1)}}else if(e.data.target==="setimmediate"){}else if(e.data.cmd==="processThreadQueue"){if(Module["_pthread_self"]()){Module["_emscripten_current_thread_process_queued_calls"]()}}else if(e.data.cmd==="processProxyingQueue"){if(Module["_pthread_self"]()){Module["_emscripten_proxy_execute_queue"](e.data.queue)}}else{err("worker.js received unknown command "+e.data.cmd);err(e.data)}}catch(ex){err("worker.js onmessage() captured an uncaught exception: "+ex);if(ex&&ex.stack)err(ex.stack);if(Module["__emscripten_thread_crashed"]){Module["__emscripten_thread_crashed"]()}throw ex}});`; + "node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm-threaded-simd.worker.js"(exports, module) { + module.exports.wasmWorkerContents = `"use strict";var Module={};var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string";if(ENVIRONMENT_IS_NODE){var nodeWorkerThreads=require("worker_threads");var parentPort=nodeWorkerThreads.parentPort;parentPort.on("message",data=>onmessage({data:data}));var fs=require("fs");Object.assign(global,{self:global,require:require,Module:Module,location:{href:__filename},Worker:nodeWorkerThreads.Worker,importScripts:function(f){(0,eval)(fs.readFileSync(f,"utf8"))},postMessage:function(msg){parentPort.postMessage(msg)},performance:global.performance||{now:function(){return Date.now()}}})}var initializedJS=false;var pendingNotifiedProxyingQueues=[];function threadPrintErr(){var text=Array.prototype.slice.call(arguments).join(" ");if(ENVIRONMENT_IS_NODE){fs.writeSync(2,text+" +");return}console.error(text)}function threadAlert(){var text=Array.prototype.slice.call(arguments).join(" ");postMessage({cmd:"alert",text:text,threadId:Module["_pthread_self"]()})}var err=threadPrintErr;self.alert=threadAlert;Module["instantiateWasm"]=(info,receiveInstance)=>{var instance=new WebAssembly.Instance(Module["wasmModule"],info);receiveInstance(instance);Module["wasmModule"]=null;return instance.exports};self.onunhandledrejection=e=>{throw e.reason??e};self.onmessage=e=>{try{if(e.data.cmd==="load"){Module["wasmModule"]=e.data.wasmModule;Module["wasmMemory"]=e.data.wasmMemory;Module["buffer"]=Module["wasmMemory"].buffer;Module["ENVIRONMENT_IS_PTHREAD"]=true;if(typeof e.data.urlOrBlob=="string"){importScripts(e.data.urlOrBlob)}else{var objectUrl=URL.createObjectURL(e.data.urlOrBlob);importScripts(objectUrl);URL.revokeObjectURL(objectUrl)}WasmBackendModuleThreadedSimd(Module).then(function(instance){Module=instance})}else if(e.data.cmd==="run"){Module["__performance_now_clock_drift"]=performance.now()-e.data.time;Module["__emscripten_thread_init"](e.data.pthread_ptr,0,0,1);Module["establishStackSpace"]();Module["PThread"].receiveObjectTransfer(e.data);Module["PThread"].threadInitTLS();if(!initializedJS){pendingNotifiedProxyingQueues.forEach(queue=>{Module["executeNotifiedProxyingQueue"](queue)});pendingNotifiedProxyingQueues=[];initializedJS=true}try{Module["invokeEntryPoint"](e.data.start_routine,e.data.arg)}catch(ex){if(ex!="unwind"){if(ex instanceof Module["ExitStatus"]){if(Module["keepRuntimeAlive"]()){}else{Module["__emscripten_thread_exit"](ex.status)}}else{throw ex}}}}else if(e.data.cmd==="cancel"){if(Module["_pthread_self"]()){Module["__emscripten_thread_exit"](-1)}}else if(e.data.target==="setimmediate"){}else if(e.data.cmd==="processProxyingQueue"){if(initializedJS){Module["executeNotifiedProxyingQueue"](e.data.queue)}else{pendingNotifiedProxyingQueues.push(e.data.queue)}}else if(e.data.cmd){err("worker.js received unknown command "+e.data.cmd);err(e.data)}}catch(ex){if(Module["__emscripten_thread_crashed"]){Module["__emscripten_thread_crashed"]()}throw ex}};`; } }); -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm.js var require_tfjs_backend_wasm = __commonJS({ - "node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm.js"(exports, module) { + "node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/wasm-out/tfjs-backend-wasm.js"(exports, module) { var WasmBackendModule2 = (() => { var _scriptDir = typeof document !== "undefined" && document.currentScript ? document.currentScript.src : void 0; if (typeof __filename !== "undefined") _scriptDir = _scriptDir || __filename; return function(WasmBackendModule3) { WasmBackendModule3 = WasmBackendModule3 || {}; - var Module = typeof WasmBackendModule3 !== "undefined" ? WasmBackendModule3 : {}; + var Module = typeof WasmBackendModule3 != "undefined" ? WasmBackendModule3 : {}; var readyPromiseResolve, readyPromiseReject; Module["ready"] = new Promise(function(resolve, reject) { readyPromiseResolve = resolve; @@ -3691,9 +3208,9 @@ var require_tfjs_backend_wasm = __commonJS({ var quit_ = (status, toThrow) => { throw toThrow; }; - var ENVIRONMENT_IS_WEB = typeof window === "object"; - var ENVIRONMENT_IS_WORKER = typeof importScripts === "function"; - var ENVIRONMENT_IS_NODE = typeof process === "object" && typeof process.versions === "object" && typeof process.versions.node === "string"; + var ENVIRONMENT_IS_WEB = typeof window == "object"; + var ENVIRONMENT_IS_WORKER = typeof importScripts == "function"; + var ENVIRONMENT_IS_NODE = typeof process == "object" && typeof process.versions == "object" && typeof process.versions.node == "string"; var scriptDirectory = ""; function locateFile(path) { if (Module["locateFile"]) { @@ -3702,29 +3219,24 @@ var require_tfjs_backend_wasm = __commonJS({ return scriptDirectory + path; } var read_, readAsync, readBinary, setWindowTitle; - function logExceptionOnExit(e) { - if (e instanceof ExitStatus) + function logExceptionOnExit(e2) { + if (e2 instanceof ExitStatus) return; - let toLog = e; + let toLog = e2; err("exiting due to exception: " + toLog); } - var fs; - var nodePath; - var requireNodeFS; if (ENVIRONMENT_IS_NODE) { if (ENVIRONMENT_IS_WORKER) { scriptDirectory = require_path().dirname(scriptDirectory) + "/"; } else { scriptDirectory = __dirname + "/"; } - requireNodeFS = () => { - if (!nodePath) { - fs = require_fs(); - nodePath = require_path(); - } - }; - read_ = function shell_read(filename, binary) { - requireNodeFS(); + var fs, nodePath; + if (typeof __require === "function") { + fs = require_fs(); + nodePath = require_path(); + } + read_ = (filename, binary) => { filename = nodePath["normalize"](filename); return fs.readFileSync(filename, binary ? void 0 : "utf8"); }; @@ -3736,7 +3248,6 @@ var require_tfjs_backend_wasm = __commonJS({ return ret; }; readAsync = (filename, onload, onerror) => { - requireNodeFS(); filename = nodePath["normalize"](filename); fs.readFile(filename, function(err2, data) { if (err2) @@ -3771,7 +3282,7 @@ var require_tfjs_backend_wasm = __commonJS({ } else if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) { if (ENVIRONMENT_IS_WORKER) { scriptDirectory = self.location.href; - } else if (typeof document !== "undefined" && document.currentScript) { + } else if (typeof document != "undefined" && document.currentScript) { scriptDirectory = document.currentScript.src; } if (_scriptDir) { @@ -3827,76 +3338,11 @@ var require_tfjs_backend_wasm = __commonJS({ if (Module["quit"]) quit_ = Module["quit"]; var POINTER_SIZE = 4; - function warnOnce(text) { - if (!warnOnce.shown) - warnOnce.shown = {}; - if (!warnOnce.shown[text]) { - warnOnce.shown[text] = 1; - err(text); - } - } - function convertJsFunctionToWasm(func2, sig) { - if (typeof WebAssembly.Function === "function") { - var typeNames = { "i": "i32", "j": "i64", "f": "f32", "d": "f64" }; - var type = { parameters: [], results: sig[0] == "v" ? [] : [typeNames[sig[0]]] }; - for (var i = 1; i < sig.length; ++i) { - type.parameters.push(typeNames[sig[i]]); - } - return new WebAssembly.Function(type, func2); - } - var typeSection = [1, 0, 1, 96]; - var sigRet = sig.slice(0, 1); - var sigParam = sig.slice(1); - var typeCodes = { "i": 127, "j": 126, "f": 125, "d": 124 }; - typeSection.push(sigParam.length); - for (var i = 0; i < sigParam.length; ++i) { - typeSection.push(typeCodes[sigParam[i]]); - } - if (sigRet == "v") { - typeSection.push(0); - } else { - typeSection = typeSection.concat([1, typeCodes[sigRet]]); - } - typeSection[1] = typeSection.length - 2; - var bytes = new Uint8Array([0, 97, 115, 109, 1, 0, 0, 0].concat(typeSection, [2, 7, 1, 1, 101, 1, 102, 0, 0, 7, 5, 1, 1, 102, 0, 0])); - var module2 = new WebAssembly.Module(bytes); - var instance = new WebAssembly.Instance(module2, { "e": { "f": func2 } }); - var wrappedFunc = instance.exports["f"]; - return wrappedFunc; - } - var freeTableIndexes = []; - var functionsInTableMap; - function getEmptyTableSlot() { - if (freeTableIndexes.length) { - return freeTableIndexes.pop(); - } - try { - wasmTable.grow(1); - } catch (err2) { - if (!(err2 instanceof RangeError)) { - throw err2; - } - throw "Unable to grow wasm table. Set ALLOW_TABLE_GROWTH."; - } - return wasmTable.length - 1; - } - function updateTableMap(offset, count2) { - for (var i = offset; i < offset + count2; i++) { - var item = getWasmTableEntry(i); - if (item) { - functionsInTableMap.set(item, i); - } - } - } - var tempRet0 = 0; - var setTempRet0 = (value) => { - tempRet0 = value; - }; var wasmBinary; if (Module["wasmBinary"]) wasmBinary = Module["wasmBinary"]; var noExitRuntime = Module["noExitRuntime"] || true; - if (typeof WebAssembly !== "object") { + if (typeof WebAssembly != "object") { abort("no native wasm support detected"); } var wasmMemory; @@ -3907,102 +3353,38 @@ var require_tfjs_backend_wasm = __commonJS({ abort(text); } } - function getCFunc(ident) { - var func2 = Module["_" + ident]; - return func2; - } - function ccall(ident, returnType, argTypes, args, opts) { - var toC = { "string": function(str) { - var ret2 = 0; - if (str !== null && str !== void 0 && str !== 0) { - var len = (str.length << 2) + 1; - ret2 = stackAlloc(len); - stringToUTF8(str, ret2, len); - } - return ret2; - }, "array": function(arr) { - var ret2 = stackAlloc(arr.length); - writeArrayToMemory(arr, ret2); - return ret2; - } }; - function convertReturnValue(ret2) { - if (returnType === "string") - return UTF8ToString(ret2); - if (returnType === "boolean") - return Boolean(ret2); - return ret2; - } - var func2 = getCFunc(ident); - var cArgs = []; - var stack2 = 0; - if (args) { - for (var i = 0; i < args.length; i++) { - var converter = toC[argTypes[i]]; - if (converter) { - if (stack2 === 0) - stack2 = stackSave(); - cArgs[i] = converter(args[i]); - } else { - cArgs[i] = args[i]; - } - } - } - var ret = func2.apply(null, cArgs); - function onDone(ret2) { - if (stack2 !== 0) - stackRestore(stack2); - return convertReturnValue(ret2); - } - ret = onDone(ret); - return ret; - } - function cwrap(ident, returnType, argTypes, opts) { - argTypes = argTypes || []; - var numericArgs = argTypes.every(function(type) { - return type === "number"; - }); - var numericRet = returnType !== "string"; - if (numericRet && numericArgs && !opts) { - return getCFunc(ident); - } - return function() { - return ccall(ident, returnType, argTypes, arguments, opts); - }; - } - var ALLOC_STACK = 1; - var UTF8Decoder = typeof TextDecoder !== "undefined" ? new TextDecoder("utf8") : void 0; - function UTF8ArrayToString(heap, idx, maxBytesToRead) { + var UTF8Decoder = typeof TextDecoder != "undefined" ? new TextDecoder("utf8") : void 0; + function UTF8ArrayToString(heapOrArray, idx, maxBytesToRead) { var endIdx = idx + maxBytesToRead; var endPtr = idx; - while (heap[endPtr] && !(endPtr >= endIdx)) + while (heapOrArray[endPtr] && !(endPtr >= endIdx)) ++endPtr; - if (endPtr - idx > 16 && heap.subarray && UTF8Decoder) { - return UTF8Decoder.decode(heap.subarray(idx, endPtr)); - } else { - var str = ""; - while (idx < endPtr) { - var u0 = heap[idx++]; - if (!(u0 & 128)) { - str += String.fromCharCode(u0); - continue; - } - var u1 = heap[idx++] & 63; - if ((u0 & 224) == 192) { - str += String.fromCharCode((u0 & 31) << 6 | u1); - continue; - } - var u2 = heap[idx++] & 63; - if ((u0 & 240) == 224) { - u0 = (u0 & 15) << 12 | u1 << 6 | u2; - } else { - u0 = (u0 & 7) << 18 | u1 << 12 | u2 << 6 | heap[idx++] & 63; - } - if (u0 < 65536) { - str += String.fromCharCode(u0); - } else { - var ch = u0 - 65536; - str += String.fromCharCode(55296 | ch >> 10, 56320 | ch & 1023); - } + if (endPtr - idx > 16 && heapOrArray.buffer && UTF8Decoder) { + return UTF8Decoder.decode(heapOrArray.subarray(idx, endPtr)); + } + var str = ""; + while (idx < endPtr) { + var u0 = heapOrArray[idx++]; + if (!(u0 & 128)) { + str += String.fromCharCode(u0); + continue; + } + var u1 = heapOrArray[idx++] & 63; + if ((u0 & 224) == 192) { + str += String.fromCharCode((u0 & 31) << 6 | u1); + continue; + } + var u2 = heapOrArray[idx++] & 63; + if ((u0 & 240) == 224) { + u0 = (u0 & 15) << 12 | u1 << 6 | u2; + } else { + u0 = (u0 & 7) << 18 | u1 << 12 | u2 << 6 | heapOrArray[idx++] & 63; + } + if (u0 < 65536) { + str += String.fromCharCode(u0); + } else { + var ch = u0 - 65536; + str += String.fromCharCode(55296 | ch >> 10, 56320 | ch & 1023); } } return str; @@ -4015,10 +3397,10 @@ var require_tfjs_backend_wasm = __commonJS({ return 0; var startIdx = outIdx; var endIdx = outIdx + maxBytesToWrite - 1; - for (var i = 0; i < str.length; ++i) { - var u = str.charCodeAt(i); + for (var i2 = 0; i2 < str.length; ++i2) { + var u = str.charCodeAt(i2); if (u >= 55296 && u <= 57343) { - var u1 = str.charCodeAt(++i); + var u1 = str.charCodeAt(++i2); u = 65536 + ((u & 1023) << 10) | u1 & 1023; } if (u <= 127) { @@ -4051,40 +3433,6 @@ var require_tfjs_backend_wasm = __commonJS({ function stringToUTF8(str, outPtr, maxBytesToWrite) { return stringToUTF8Array(str, HEAPU8, outPtr, maxBytesToWrite); } - function lengthBytesUTF8(str) { - var len = 0; - for (var i = 0; i < str.length; ++i) { - var u = str.charCodeAt(i); - if (u >= 55296 && u <= 57343) - u = 65536 + ((u & 1023) << 10) | str.charCodeAt(++i) & 1023; - if (u <= 127) - ++len; - else if (u <= 2047) - len += 2; - else if (u <= 65535) - len += 3; - else - len += 4; - } - return len; - } - var UTF16Decoder = typeof TextDecoder !== "undefined" ? new TextDecoder("utf-16le") : void 0; - function writeArrayToMemory(array2, buffer3) { - HEAP8.set(array2, buffer3); - } - function writeAsciiToMemory(str, buffer3, dontAddNull) { - for (var i = 0; i < str.length; ++i) { - HEAP8[buffer3++ >> 0] = str.charCodeAt(i); - } - if (!dontAddNull) - HEAP8[buffer3 >> 0] = 0; - } - function alignUp(x, multiple) { - if (x % multiple > 0) { - x += multiple - x % multiple; - } - return x; - } var buffer2, HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32, HEAPF32, HEAPF64; function updateGlobalBufferAndViews(buf) { buffer2 = buf; @@ -4103,10 +3451,8 @@ var require_tfjs_backend_wasm = __commonJS({ var __ATINIT__ = []; var __ATPOSTRUN__ = []; var runtimeInitialized = false; - var runtimeExited = false; - var runtimeKeepaliveCounter = 0; function keepRuntimeAlive() { - return noExitRuntime || runtimeKeepaliveCounter > 0; + return noExitRuntime; } function preRun() { if (Module["preRun"]) { @@ -4122,9 +3468,6 @@ var require_tfjs_backend_wasm = __commonJS({ runtimeInitialized = true; callRuntimeCallbacks(__ATINIT__); } - function exitRuntime() { - runtimeExited = true; - } function postRun() { if (Module["postRun"]) { if (typeof Module["postRun"] == "function") @@ -4170,8 +3513,6 @@ var require_tfjs_backend_wasm = __commonJS({ } } } - Module["preloadedImages"] = {}; - Module["preloadedAudios"] = {}; function abort(what) { { if (Module["onAbort"]) { @@ -4182,10 +3523,10 @@ var require_tfjs_backend_wasm = __commonJS({ err(what); ABORT = true; EXITSTATUS = 1; - what += ". Build with -s ASSERTIONS=1 for more info."; - var e = new WebAssembly.RuntimeError(what); - readyPromiseReject(e); - throw e; + what += ". Build with -sASSERTIONS for more info."; + var e2 = new WebAssembly.RuntimeError(what); + readyPromiseReject(e2); + throw e2; } var dataURIPrefix = "data:application/octet-stream;base64,"; function isDataURI(filename) { @@ -4206,16 +3547,15 @@ var require_tfjs_backend_wasm = __commonJS({ } if (readBinary) { return readBinary(file); - } else { - throw "both async and sync fetching of the wasm failed"; } + throw "both async and sync fetching of the wasm failed"; } catch (err2) { abort(err2); } } function getBinaryPromise() { if (!wasmBinary && (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER)) { - if (typeof fetch === "function" && !isFileURI(wasmBinaryFile)) { + if (typeof fetch == "function" && !isFileURI(wasmBinaryFile)) { return fetch(wasmBinaryFile, { credentials: "same-origin" }).then(function(response) { if (!response["ok"]) { throw "failed to load wasm binary file at '" + wasmBinaryFile + "'"; @@ -4264,7 +3604,7 @@ var require_tfjs_backend_wasm = __commonJS({ }); } function instantiateAsync() { - if (!wasmBinary && typeof WebAssembly.instantiateStreaming === "function" && !isDataURI(wasmBinaryFile) && !isFileURI(wasmBinaryFile) && typeof fetch === "function") { + if (!wasmBinary && typeof WebAssembly.instantiateStreaming == "function" && !isDataURI(wasmBinaryFile) && !isFileURI(wasmBinaryFile) && !ENVIRONMENT_IS_NODE && typeof fetch == "function") { return fetch(wasmBinaryFile, { credentials: "same-origin" }).then(function(response) { var result = WebAssembly.instantiateStreaming(response, info); return result.then(receiveInstantiationResult, function(reason) { @@ -4281,9 +3621,9 @@ var require_tfjs_backend_wasm = __commonJS({ try { var exports2 = Module["instantiateWasm"](info, receiveInstance); return exports2; - } catch (e) { - err("Module.instantiateWasm callback failed with error: " + e); - return false; + } catch (e2) { + err("Module.instantiateWasm callback failed with error: " + e2); + readyPromiseReject(e2); } } instantiateAsync().catch(readyPromiseReject); @@ -4291,23 +3631,14 @@ var require_tfjs_backend_wasm = __commonJS({ } var tempDouble; var tempI64; + function ExitStatus(status) { + this.name = "ExitStatus"; + this.message = "Program terminated with exit(" + status + ")"; + this.status = status; + } function callRuntimeCallbacks(callbacks2) { while (callbacks2.length > 0) { - var callback = callbacks2.shift(); - if (typeof callback == "function") { - callback(Module); - continue; - } - var func2 = callback.func; - if (typeof func2 === "number") { - if (callback.arg === void 0) { - getWasmTableEntry(func2)(); - } else { - getWasmTableEntry(func2)(callback.arg); - } - } else { - func2(callback.arg === void 0 ? null : callback.arg); - } + callbacks2.shift()(Module); } } function demangle(func2) { @@ -4320,23 +3651,13 @@ var require_tfjs_backend_wasm = __commonJS({ return x === y ? x : y + " [" + x + "]"; }); } - var wasmTableMirror = []; - function getWasmTableEntry(funcPtr) { - var func2 = wasmTableMirror[funcPtr]; - if (!func2) { - if (funcPtr >= wasmTableMirror.length) - wasmTableMirror.length = funcPtr + 1; - wasmTableMirror[funcPtr] = func2 = wasmTable.get(funcPtr); - } - return func2; - } function jsStackTrace() { var error = new Error(); if (!error.stack) { try { throw new Error(); - } catch (e) { - error = e; + } catch (e2) { + error = e2; } if (!error.stack) { return "(no stack trace available)"; @@ -4344,16 +3665,18 @@ var require_tfjs_backend_wasm = __commonJS({ } return error.stack.toString(); } - function setWasmTableEntry(idx, func2) { - wasmTable.set(idx, func2); - wasmTableMirror[idx] = func2; + function writeArrayToMemory(array2, buffer3) { + HEAP8.set(array2, buffer3); } function _abort() { abort(""); } - function _emscripten_get_heap_max() { + function getHeapMax() { return 2147483648; } + function _emscripten_get_heap_max() { + return getHeapMax(); + } function _emscripten_memcpy_big(dest, src, num) { HEAPU8.copyWithin(dest, src, src + num); } @@ -4362,16 +3685,17 @@ var require_tfjs_backend_wasm = __commonJS({ wasmMemory.grow(size - buffer2.byteLength + 65535 >>> 16); updateGlobalBufferAndViews(wasmMemory.buffer); return 1; - } catch (e) { + } catch (e2) { } } function _emscripten_resize_heap(requestedSize) { var oldSize = HEAPU8.length; requestedSize = requestedSize >>> 0; - var maxHeapSize = _emscripten_get_heap_max(); + var maxHeapSize = getHeapMax(); if (requestedSize > maxHeapSize) { return false; } + let alignUp = (x, multiple) => x + (multiple - x % multiple) % multiple; for (var cutDown = 1; cutDown <= 4; cutDown *= 2) { var overGrownHeapSize = oldSize * (1 + 0.2 / cutDown); overGrownHeapSize = Math.min(overGrownHeapSize, requestedSize + 100663296); @@ -4383,48 +3707,106 @@ var require_tfjs_backend_wasm = __commonJS({ } return false; } - var SYSCALLS = { mappings: {}, buffers: [null, [], []], printChar: function(stream, curr) { - var buffer3 = SYSCALLS.buffers[stream]; - if (curr === 0 || curr === 10) { - (stream === 1 ? out : err)(UTF8ArrayToString(buffer3, 0)); - buffer3.length = 0; - } else { - buffer3.push(curr); - } - }, varargs: void 0, get: function() { + var SYSCALLS = { varargs: void 0, get: function() { SYSCALLS.varargs += 4; var ret = HEAP32[SYSCALLS.varargs - 4 >> 2]; return ret; }, getStr: function(ptr) { var ret = UTF8ToString(ptr); return ret; - }, get64: function(low, high) { - return low; } }; function _fd_close(fd) { - return 0; + return 52; } function _fd_seek(fd, offset_low, offset_high, whence, newOffset) { + return 70; + } + var printCharBuffers = [null, [], []]; + function printChar(stream, curr) { + var buffer3 = printCharBuffers[stream]; + if (curr === 0 || curr === 10) { + (stream === 1 ? out : err)(UTF8ArrayToString(buffer3, 0)); + buffer3.length = 0; + } else { + buffer3.push(curr); + } } function _fd_write(fd, iov, iovcnt, pnum) { var num = 0; - for (var i = 0; i < iovcnt; i++) { - var ptr = HEAP32[iov >> 2]; - var len = HEAP32[iov + 4 >> 2]; + for (var i2 = 0; i2 < iovcnt; i2++) { + var ptr = HEAPU32[iov >> 2]; + var len = HEAPU32[iov + 4 >> 2]; iov += 8; for (var j = 0; j < len; j++) { - SYSCALLS.printChar(fd, HEAPU8[ptr + j]); + printChar(fd, HEAPU8[ptr + j]); } num += len; } - HEAP32[pnum >> 2] = num; + HEAPU32[pnum >> 2] = num; return 0; } - function _setTempRet0(val) { - setTempRet0(val); + function getCFunc(ident) { + var func2 = Module["_" + ident]; + return func2; + } + function ccall(ident, returnType, argTypes, args, opts) { + var toC = { "string": (str) => { + var ret2 = 0; + if (str !== null && str !== void 0 && str !== 0) { + var len = (str.length << 2) + 1; + ret2 = stackAlloc(len); + stringToUTF8(str, ret2, len); + } + return ret2; + }, "array": (arr) => { + var ret2 = stackAlloc(arr.length); + writeArrayToMemory(arr, ret2); + return ret2; + } }; + function convertReturnValue(ret2) { + if (returnType === "string") { + return UTF8ToString(ret2); + } + if (returnType === "boolean") + return Boolean(ret2); + return ret2; + } + var func2 = getCFunc(ident); + var cArgs = []; + var stack2 = 0; + if (args) { + for (var i2 = 0; i2 < args.length; i2++) { + var converter = toC[argTypes[i2]]; + if (converter) { + if (stack2 === 0) + stack2 = stackSave(); + cArgs[i2] = converter(args[i2]); + } else { + cArgs[i2] = args[i2]; + } + } + } + var ret = func2.apply(null, cArgs); + function onDone(ret2) { + if (stack2 !== 0) + stackRestore(stack2); + return convertReturnValue(ret2); + } + ret = onDone(ret); + return ret; + } + function cwrap(ident, returnType, argTypes, opts) { + argTypes = argTypes || []; + var numericArgs = argTypes.every((type) => type === "number" || type === "boolean"); + var numericRet = returnType !== "string"; + if (numericRet && numericArgs && !opts) { + return getCFunc(ident); + } + return function() { + return ccall(ident, returnType, argTypes, arguments, opts); + }; } - var ASSERTIONS = false; - var asmLibraryArg = { "abort": _abort, "emscripten_get_heap_max": _emscripten_get_heap_max, "emscripten_memcpy_big": _emscripten_memcpy_big, "emscripten_resize_heap": _emscripten_resize_heap, "fd_close": _fd_close, "fd_seek": _fd_seek, "fd_write": _fd_write, "setTempRet0": _setTempRet0 }; + var asmLibraryArg = { "abort": _abort, "emscripten_get_heap_max": _emscripten_get_heap_max, "emscripten_memcpy_big": _emscripten_memcpy_big, "emscripten_resize_heap": _emscripten_resize_heap, "fd_close": _fd_close, "fd_seek": _fd_seek, "fd_write": _fd_write }; var asm = createWasm(); var ___wasm_call_ctors = Module["___wasm_call_ctors"] = function() { return (___wasm_call_ctors = Module["___wasm_call_ctors"] = Module["asm"]["__wasm_call_ctors"]).apply(null, arguments); @@ -4723,9 +4105,6 @@ var require_tfjs_backend_wasm = __commonJS({ var ___errno_location = Module["___errno_location"] = function() { return (___errno_location = Module["___errno_location"] = Module["asm"]["__errno_location"]).apply(null, arguments); }; - var _emscripten_main_thread_process_queued_calls = Module["_emscripten_main_thread_process_queued_calls"] = function() { - return (_emscripten_main_thread_process_queued_calls = Module["_emscripten_main_thread_process_queued_calls"] = Module["asm"]["emscripten_main_thread_process_queued_calls"]).apply(null, arguments); - }; var stackSave = Module["stackSave"] = function() { return (stackSave = Module["stackSave"] = Module["asm"]["stackSave"]).apply(null, arguments); }; @@ -4743,11 +4122,6 @@ var require_tfjs_backend_wasm = __commonJS({ }; Module["cwrap"] = cwrap; var calledRun; - function ExitStatus(status) { - this.name = "ExitStatus"; - this.message = "Program terminated with exit(" + status + ")"; - this.status = status; - } dependenciesFulfilled = function runCaller() { if (!calledRun) run(); @@ -4788,16 +4162,6 @@ var require_tfjs_backend_wasm = __commonJS({ doRun(); } } - Module["run"] = run; - function procExit(code) { - EXITSTATUS = code; - if (!keepRuntimeAlive()) { - if (Module["onExit"]) - Module["onExit"](code); - ABORT = true; - } - quit_(code, new ExitStatus(code)); - } if (Module["preInit"]) { if (typeof Module["preInit"] == "function") Module["preInit"] = [Module["preInit"]]; @@ -4848,7 +4212,7 @@ var require_tfjs_backend_wasm = __commonJS({ } }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/backends/backend.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/backends/backend.js var EPSILON_FLOAT32 = 1e-7; var EPSILON_FLOAT16 = 1e-4; var DataStorage = class { @@ -4930,7 +4294,7 @@ function notYetImplemented(kernelName) { throw new Error(`'${kernelName}' not yet implemented or not found in the registry. This kernel may not be supported by the tfjs backend you have chosen`); } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/util_base.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/util_base.js function shuffle(array2) { let counter = array2.length; let index = 0; @@ -4966,19 +4330,19 @@ function swap(object, left, right) { } function sum(arr) { let sum7 = 0; - for (let i = 0; i < arr.length; i++) { - sum7 += arr[i]; + for (let i2 = 0; i2 < arr.length; i2++) { + sum7 += arr[i2]; } return sum7; } function randUniform(a, b) { - const r = Math.random(); - return b * r + (1 - r) * a; + const r2 = Math.random(); + return b * r2 + (1 - r2) * a; } function distSquared(a, b) { let result = 0; - for (let i = 0; i < a.length; i++) { - const diff = Number(a[i]) - Number(b[i]); + for (let i2 = 0; i2 < a.length; i2++) { + const diff = Number(a[i2]) - Number(b[i2]); result += diff * diff; } return result; @@ -4999,8 +4363,8 @@ function flatten(arr, result = [], skipTypedArray = false) { result = []; } if (Array.isArray(arr) || isTypedArray(arr) && !skipTypedArray) { - for (let i = 0; i < arr.length; ++i) { - flatten(arr[i], result, skipTypedArray); + for (let i2 = 0; i2 < arr.length; ++i2) { + flatten(arr[i2], result, skipTypedArray); } } else { result.push(arr); @@ -5012,8 +4376,8 @@ function sizeFromShape(shape) { return 1; } let size = shape[0]; - for (let i = 1; i < shape.length; i++) { - size *= shape[i]; + for (let i2 = 1; i2 < shape.length; i2++) { + size *= shape[i2]; } return size; } @@ -5030,8 +4394,8 @@ function arraysEqual(n1, n2) { if (n1.length !== n2.length) { return false; } - for (let i = 0; i < n1.length; i++) { - if (n1[i] !== n2[i]) { + for (let i2 = 0; i2 < n1.length; i2++) { + if (n1[i2] !== n2[i2]) { return false; } } @@ -5057,10 +4421,10 @@ function sizeToSquarishShape(size) { const width = Math.ceil(Math.sqrt(size)); return [width, Math.ceil(size / width)]; } -function createShuffledIndices(n) { - const shuffledIndices = new Uint32Array(n); - for (let i = 0; i < n; ++i) { - shuffledIndices[i] = i; +function createShuffledIndices(n2) { + const shuffledIndices = new Uint32Array(n2); + for (let i2 = 0; i2 < n2; ++i2) { + shuffledIndices[i2] = i2; } shuffle(shuffledIndices); return shuffledIndices; @@ -5071,7 +4435,7 @@ function rightPad(a, size) { } return a + " ".repeat(size - a.length); } -function repeatedTry(checkFn, delayFn = (counter) => 0, maxCounter) { +function repeatedTry(checkFn, delayFn = (counter) => 0, maxCounter, scheduleFn = setTimeout) { return new Promise((resolve, reject) => { let tryCount = 0; const tryFn = () => { @@ -5085,7 +4449,7 @@ function repeatedTry(checkFn, delayFn = (counter) => 0, maxCounter) { reject(); return; } - setTimeout(tryFn, nextBackoff); + scheduleFn(tryFn, nextBackoff); }; tryFn(); }); @@ -5093,16 +4457,16 @@ function repeatedTry(checkFn, delayFn = (counter) => 0, maxCounter) { function inferFromImplicitShape(shape, size) { let shapeProd = 1; let implicitIdx = -1; - for (let i = 0; i < shape.length; ++i) { - if (shape[i] >= 0) { - shapeProd *= shape[i]; - } else if (shape[i] === -1) { + for (let i2 = 0; i2 < shape.length; ++i2) { + if (shape[i2] >= 0) { + shapeProd *= shape[i2]; + } else if (shape[i2] === -1) { if (implicitIdx !== -1) { - throw Error(`Shapes can only have 1 implicit size. Found -1 at dim ${implicitIdx} and dim ${i}`); + throw Error(`Shapes can only have 1 implicit size. Found -1 at dim ${implicitIdx} and dim ${i2}`); } - implicitIdx = i; - } else if (shape[i] < 0) { - throw Error(`Shapes can not be < 0. Found ${shape[i]} at dim ${i}`); + implicitIdx = i2; + } else if (shape[i2] < 0) { + throw Error(`Shapes can not be < 0. Found ${shape[i2]} at dim ${i2}`); } } if (implicitIdx === -1) { @@ -5123,7 +4487,7 @@ function inferFromImplicitShape(shape, size) { } function parseAxisParam(axis, shape) { const rank = shape.length; - axis = axis == null ? shape.map((s, i) => i) : [].concat(axis); + axis = axis == null ? shape.map((s2, i2) => i2) : [].concat(axis); assert(axis.every((ax) => ax >= -rank && ax < rank), () => `All values in axis param must be in range [-${rank}, ${rank}) but got axis ${axis}`); assert(axis.every((ax) => isInt(ax)), () => `All values in axis param must be integers but got axis ${axis}`); return axis.map((a) => a < 0 ? rank + a : a); @@ -5134,22 +4498,22 @@ function squeezeShape(shape, axis) { const isEmptyArray = axis != null && Array.isArray(axis) && axis.length === 0; const axes = axis == null || isEmptyArray ? null : parseAxisParam(axis, shape).sort(); let j = 0; - for (let i = 0; i < shape.length; ++i) { + for (let i2 = 0; i2 < shape.length; ++i2) { if (axes != null) { - if (axes[j] === i && shape[i] !== 1) { - throw new Error(`Can't squeeze axis ${i} since its dim '${shape[i]}' is not 1`); + if (axes[j] === i2 && shape[i2] !== 1) { + throw new Error(`Can't squeeze axis ${i2} since its dim '${shape[i2]}' is not 1`); } - if ((axes[j] == null || axes[j] > i) && shape[i] === 1) { - newShape.push(shape[i]); - keptDims.push(i); + if ((axes[j] == null || axes[j] > i2) && shape[i2] === 1) { + newShape.push(shape[i2]); + keptDims.push(i2); } - if (axes[j] <= i) { + if (axes[j] <= i2) { j++; } } - if (shape[i] !== 1) { - newShape.push(shape[i]); - keptDims.push(i); + if (shape[i2] !== 1) { + newShape.push(shape[i2]); + keptDims.push(i2); } } return { newShape, keptDims }; @@ -5183,8 +4547,8 @@ function getArrayFromDType(dtype, size) { return values; } function checkConversionForErrors(vals, dtype) { - for (let i = 0; i < vals.length; i++) { - const num = vals[i]; + for (let i2 = 0; i2 < vals.length; i2++) { + const num = vals[i2]; if (isNaN(num) || !isFinite(num)) { throw Error(`A tensor of type ${dtype} being uploaded contains ${num}.`); } @@ -5260,9 +4624,9 @@ function isFunction(f) { return !!(f && f.constructor && f.call && f.apply); } function nearestDivisor(size, start) { - for (let i = start; i < size; ++i) { - if (size % i === 0) { - return i; + for (let i2 = start; i2 < size; ++i2) { + if (size % i2 === 0) { + return i2; } } return size; @@ -5274,8 +4638,8 @@ function computeStrides(shape) { } const strides = new Array(rank - 1); strides[rank - 2] = shape[rank - 1]; - for (let i = rank - 3; i >= 0; --i) { - strides[i] = strides[i + 1] * shape[i + 1]; + for (let i2 = rank - 3; i2 >= 0; --i2) { + strides[i2] = strides[i2 + 1] * shape[i2 + 1]; } return strides; } @@ -5283,15 +4647,15 @@ function createNestedArray(offset, shape, a, isComplex = false) { const ret = new Array(); if (shape.length === 1) { const d = shape[0] * (isComplex ? 2 : 1); - for (let i = 0; i < d; i++) { - ret[i] = a[offset + i]; + for (let i2 = 0; i2 < d; i2++) { + ret[i2] = a[offset + i2]; } } else { const d = shape[0]; const rest = shape.slice(1); const len = rest.reduce((acc, c) => acc * c) * (isComplex ? 2 : 1); - for (let i = 0; i < d; i++) { - ret[i] = createNestedArray(offset + i * len, rest, a, isComplex); + for (let i2 = 0; i2 < d; i2++) { + ret[i2] = createNestedArray(offset + i2 * len, rest, a, isComplex); } } return ret; @@ -5311,8 +4675,8 @@ function toNestedArray(shape, a, isComplex = false) { } function makeOnesTypedArray(size, dtype) { const array2 = makeZerosTypedArray(size, dtype); - for (let i = 0; i < array2.length; i++) { - array2[i] = 1; + for (let i2 = 0; i2 < array2.length; i2++) { + array2[i2] = 1; } return array2; } @@ -5351,8 +4715,8 @@ function locToIndex(locs, rank, strides) { return locs[0]; } let index = locs[locs.length - 1]; - for (let i = 0; i < locs.length - 1; ++i) { - index += strides[i] * locs[i]; + for (let i2 = 0; i2 < locs.length - 1; ++i2) { + index += strides[i2] * locs[i2]; } return index; } @@ -5363,9 +4727,9 @@ function indexToLoc(index, rank, strides) { return [index]; } const locs = new Array(rank); - for (let i = 0; i < locs.length - 1; ++i) { - locs[i] = Math.floor(index / strides[i]); - index -= locs[i] * strides[i]; + for (let i2 = 0; i2 < locs.length - 1; ++i2) { + locs[i2] = Math.floor(index / strides[i2]); + index -= locs[i2] * strides[i2]; } locs[locs.length - 1] = index; return locs; @@ -5374,7 +4738,7 @@ function isPromise(object) { return object && object.then && typeof object.then === "function"; } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/environment.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/environment.js var TENSORFLOWJS_FLAGS_PREFIX = "tfjsflags"; var Environment = class { constructor(global2) { @@ -5473,9 +4837,9 @@ var Environment = class { }; function getQueryParams(queryString) { const params = {}; - queryString.replace(/[?&]([^=?&]+)(?:=([^&]*))?/g, (s, ...t) => { - decodeParam(params, t[0], t[1]); - return t.join("="); + queryString.replace(/[?&]([^=?&]+)(?:=([^&]*))?/g, (s2, ...t2) => { + decodeParam(params, t2[0], t2[1]); + return t2.join("="); }); return params; } @@ -5499,7 +4863,7 @@ function setEnvironmentGlobal(environment) { ENV = environment; } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/global_util.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/global_util.js var globalNameSpace; function getGlobalNamespace() { if (globalNameSpace == null) { @@ -5537,7 +4901,7 @@ function getGlobal(key, init2) { } } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/kernel_names.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/kernel_names.js var Abs = "Abs"; var Acos = "Acos"; var Acosh = "Acosh"; @@ -5653,6 +5017,7 @@ var Pool = "Pool"; var Pow = "Pow"; var Prelu = "Prelu"; var Prod = "Prod"; +var RaggedGather = "RaggedGather"; var RaggedTensorToTensor = "RaggedTensorToTensor"; var Range = "Range"; var Real = "Real"; @@ -5712,7 +5077,7 @@ var _FusedMatMul = "_FusedMatMul"; var FusedConv2D = "FusedConv2D"; var FusedDepthwiseConv2D = "FusedDepthwiseConv2D"; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/log.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/log.js function warn(...msg) { if (!(env().getBool("IS_TEST") || env().getBool("PROD"))) { console.warn(...msg); @@ -5724,7 +5089,7 @@ function log(...msg) { } } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/kernel_registry.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/kernel_registry.js var kernelRegistry = getGlobal("kernelRegistry", () => /* @__PURE__ */ new Map()); var gradRegistry = getGlobal("gradRegistry", () => /* @__PURE__ */ new Map()); function getKernel(kernelName, backendName) { @@ -5791,7 +5156,7 @@ function makeKey(kernelName, backendName) { return `${backendName}_${kernelName}`; } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/util.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/util.js var util_exports = {}; __export(util_exports, { arraysEqual: () => arraysEqual, @@ -5851,7 +5216,7 @@ __export(util_exports, { toTypedArray: () => toTypedArray }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/hash_util.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/hash_util.js var LongExports = __toESM(require_long()); var Long = LongExports.default || LongExports; function hexToLong(hex) { @@ -5863,15 +5228,15 @@ var k2 = hexToLong("9ae16a3b2f90404f"); function shiftMix(val) { return val.xor(val.shru(47)); } -function fetch2(s, offset, numBytes) { - const bytes = s.slice(offset, offset + numBytes); +function fetch2(s2, offset, numBytes) { + const bytes = s2.slice(offset, offset + numBytes); return Long.fromBytes(Array.from(bytes), true, true); } -function fetch64(s, offset) { - return fetch2(s, offset, 8); +function fetch64(s2, offset) { + return fetch2(s2, offset, 8); } -function fetch32(s, offset) { - return fetch2(s, offset, 4); +function fetch32(s2, offset) { + return fetch2(s2, offset, 4); } function rotate64(val, shift) { return shift === 0 ? val : val.shru(shift).or(val.shl(64 - shift)); @@ -5893,83 +5258,83 @@ function weakHashLen32WithSeeds(w, x, y, z, a, b) { b = b.add(rotate64(a, 44)); return [a.add(z), b.add(c)]; } -function weakHashLen32WithSeedsStr(s, offset, a, b) { - return weakHashLen32WithSeeds(fetch64(s, offset), fetch64(s, offset + 8), fetch64(s, offset + 16), fetch64(s, offset + 24), a, b); +function weakHashLen32WithSeedsStr(s2, offset, a, b) { + return weakHashLen32WithSeeds(fetch64(s2, offset), fetch64(s2, offset + 8), fetch64(s2, offset + 16), fetch64(s2, offset + 24), a, b); } -function hashLen0to16(s, len = s.length) { +function hashLen0to16(s2, len = s2.length) { if (len >= 8) { const mul2 = k2.add(len * 2); - const a = fetch64(s, 0).add(k2); - const b = fetch64(s, len - 8); + const a = fetch64(s2, 0).add(k2); + const b = fetch64(s2, len - 8); const c = rotate64(b, 37).mul(mul2).add(a); const d = rotate64(a, 25).add(b).mul(mul2); return hashLen16(c, d, mul2); } if (len >= 4) { const mul2 = k2.add(len * 2); - const a = fetch32(s, 0); - return hashLen16(a.shl(3).add(len), fetch32(s, len - 4), mul2); + const a = fetch32(s2, 0); + return hashLen16(a.shl(3).add(len), fetch32(s2, len - 4), mul2); } if (len > 0) { - const a = s[0]; - const b = s[len >> 1]; - const c = s[len - 1]; + const a = s2[0]; + const b = s2[len >> 1]; + const c = s2[len - 1]; const y = a + (b << 8); const z = len + (c << 2); return shiftMix(k2.mul(y).xor(k0.mul(z))).mul(k2); } return k2; } -function hashLen17to32(s, len = s.length) { +function hashLen17to32(s2, len = s2.length) { const mul2 = k2.add(len * 2); - const a = fetch64(s, 0).mul(k1); - const b = fetch64(s, 8); - const c = fetch64(s, len - 8).mul(mul2); - const d = fetch64(s, len - 16).mul(k2); + const a = fetch64(s2, 0).mul(k1); + const b = fetch64(s2, 8); + const c = fetch64(s2, len - 8).mul(mul2); + const d = fetch64(s2, len - 16).mul(k2); return hashLen16(rotate64(a.add(b), 43).add(rotate64(c, 30)).add(d), a.add(rotate64(b.add(k2), 18)).add(c), mul2); } -function hashLen33to64(s, len = s.length) { +function hashLen33to64(s2, len = s2.length) { const mul2 = k2.add(len * 2); - const a = fetch64(s, 0).mul(k2); - const b = fetch64(s, 8); - const c = fetch64(s, len - 8).mul(mul2); - const d = fetch64(s, len - 16).mul(k2); + const a = fetch64(s2, 0).mul(k2); + const b = fetch64(s2, 8); + const c = fetch64(s2, len - 8).mul(mul2); + const d = fetch64(s2, len - 16).mul(k2); const y = rotate64(a.add(b), 43).add(rotate64(c, 30)).add(d); const z = hashLen16(y, a.add(rotate64(b.add(k2), 18)).add(c), mul2); - const e = fetch64(s, 16).mul(mul2); - const f = fetch64(s, 24); - const g = y.add(fetch64(s, len - 32)).mul(mul2); - const h = z.add(fetch64(s, len - 24)).mul(mul2); - return hashLen16(rotate64(e.add(f), 43).add(rotate64(g, 30)).add(h), e.add(rotate64(f.add(a), 18)).add(g), mul2); + const e2 = fetch64(s2, 16).mul(mul2); + const f = fetch64(s2, 24); + const g = y.add(fetch64(s2, len - 32)).mul(mul2); + const h = z.add(fetch64(s2, len - 24)).mul(mul2); + return hashLen16(rotate64(e2.add(f), 43).add(rotate64(g, 30)).add(h), e2.add(rotate64(f.add(a), 18)).add(g), mul2); } -function fingerPrint64(s, len = s.length) { +function fingerPrint64(s2, len = s2.length) { const seed = Long.fromNumber(81, true); if (len <= 32) { if (len <= 16) { - return hashLen0to16(s, len); + return hashLen0to16(s2, len); } else { - return hashLen17to32(s, len); + return hashLen17to32(s2, len); } } else if (len <= 64) { - return hashLen33to64(s, len); + return hashLen33to64(s2, len); } let x = seed; let y = seed.mul(k1).add(113); let z = shiftMix(y.mul(k2).add(113)).mul(k2); let v = [Long.UZERO, Long.UZERO]; let w = [Long.UZERO, Long.UZERO]; - x = x.mul(k2).add(fetch64(s, 0)); + x = x.mul(k2).add(fetch64(s2, 0)); let offset = 0; const end = (len - 1 >> 6) * 64; const last64 = end + (len - 1 & 63) - 63; do { - x = rotate64(x.add(y).add(v[0]).add(fetch64(s, offset + 8)), 37).mul(k1); - y = rotate64(y.add(v[1]).add(fetch64(s, offset + 48)), 42).mul(k1); + x = rotate64(x.add(y).add(v[0]).add(fetch64(s2, offset + 8)), 37).mul(k1); + y = rotate64(y.add(v[1]).add(fetch64(s2, offset + 48)), 42).mul(k1); x = x.xor(w[1]); - y = y.add(v[0]).add(fetch64(s, offset + 40)); + y = y.add(v[0]).add(fetch64(s2, offset + 40)); z = rotate64(z.add(w[0]), 33).mul(k1); - v = weakHashLen32WithSeedsStr(s, offset, v[1].mul(k1), x.add(w[0])); - w = weakHashLen32WithSeedsStr(s, offset + 32, z.add(w[1]), y.add(fetch64(s, offset + 16))); + v = weakHashLen32WithSeedsStr(s2, offset, v[1].mul(k1), x.add(w[0])); + w = weakHashLen32WithSeedsStr(s2, offset + 32, z.add(w[1]), y.add(fetch64(s2, offset + 16))); [z, x] = [x, z]; offset += 64; } while (offset !== end); @@ -5978,18 +5343,18 @@ function fingerPrint64(s, len = s.length) { w[0] = w[0].add(len - 1 & 63); v[0] = v[0].add(w[0]); w[0] = w[0].add(v[0]); - x = rotate64(x.add(y).add(v[0]).add(fetch64(s, offset + 8)), 37).mul(mul2); - y = rotate64(y.add(v[1]).add(fetch64(s, offset + 48)), 42).mul(mul2); + x = rotate64(x.add(y).add(v[0]).add(fetch64(s2, offset + 8)), 37).mul(mul2); + y = rotate64(y.add(v[1]).add(fetch64(s2, offset + 48)), 42).mul(mul2); x = x.xor(w[1].mul(9)); - y = y.add(v[0].mul(9).add(fetch64(s, offset + 40))); + y = y.add(v[0].mul(9).add(fetch64(s2, offset + 40))); z = rotate64(z.add(w[0]), 33).mul(mul2); - v = weakHashLen32WithSeedsStr(s, offset, v[1].mul(mul2), x.add(w[0])); - w = weakHashLen32WithSeedsStr(s, offset + 32, z.add(w[1]), y.add(fetch64(s, offset + 16))); + v = weakHashLen32WithSeedsStr(s2, offset, v[1].mul(mul2), x.add(w[0])); + w = weakHashLen32WithSeedsStr(s2, offset + 32, z.add(w[1]), y.add(fetch64(s2, offset + 16))); [z, x] = [x, z]; return hashLen16(hashLen16(v[0], w[0], mul2).add(shiftMix(y).mul(k0)).add(z), hashLen16(v[1], w[1], mul2).add(x), mul2); } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/util.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/util.js function createScalarValue(value, dtype) { if (dtype === "string") { return encodeString(value); @@ -6018,9 +5383,9 @@ function toTypedArray(a, dtype) { return new Int32Array(a); } else if (dtype === "bool") { const bool = new Uint8Array(a.length); - for (let i = 0; i < bool.length; ++i) { - if (Math.round(a[i]) !== 0) { - bool[i] = 1; + for (let i2 = 0; i2 < bool.length; ++i2) { + if (Math.round(a[i2]) !== 0) { + bool[i2] = 1; } } return bool; @@ -6034,16 +5399,16 @@ function now() { function fetch3(path, requestInits) { return env().platform.fetch(path, requestInits); } -function encodeString(s, encoding = "utf-8") { +function encodeString(s2, encoding = "utf-8") { encoding = encoding || "utf-8"; - return env().platform.encode(s, encoding); + return env().platform.encode(s2, encoding); } function decodeString(bytes, encoding = "utf-8") { encoding = encoding || "utf-8"; return env().platform.decode(bytes, encoding); } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/profiler.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/profiler.js var Profiler = class { constructor(backendTimer, logger) { this.backendTimer = backendTimer; @@ -6069,8 +5434,8 @@ var Profiler = class { timer = Promise.resolve({ kernelMs: now() - start }); } if (env().getBool("CHECK_COMPUTATION_FOR_ERRORS")) { - for (let i = 0; i < outputs.length; i++) { - const output = outputs[i]; + for (let i2 = 0; i2 < outputs.length; i2++) { + const output = outputs[i2]; output.data().then((tensorVals) => { checkComputationForErrors(tensorVals, output.dtype, kernelName); }); @@ -6098,8 +5463,8 @@ function checkComputationForErrors(vals, dtype, kernelName) { if (dtype !== "float32") { return false; } - for (let i = 0; i < vals.length; i++) { - const num = vals[i]; + for (let i2 = 0; i2 < vals.length; i2++) { + const num = vals[i2]; if (isNaN(num) || !isFinite(num)) { console.warn(`Found ${num} in the result of '${kernelName}'`); return true; @@ -6127,15 +5492,15 @@ var Logger = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/tape.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/tape.js function getFilteredNodesXToY(tape, xs, y) { const tensorsFromX = {}; const nodesFromX = {}; - for (let i = 0; i < xs.length; i++) { - tensorsFromX[xs[i].id] = true; + for (let i2 = 0; i2 < xs.length; i2++) { + tensorsFromX[xs[i2].id] = true; } - for (let i = 0; i < tape.length; i++) { - const node = tape[i]; + for (let i2 = 0; i2 < tape.length; i2++) { + const node = tape[i2]; const nodeInputs = node.inputs; for (const inputName in nodeInputs) { const input2 = nodeInputs[inputName]; @@ -6156,8 +5521,8 @@ function getFilteredNodesXToY(tape, xs, y) { const tensorsLeadToY = {}; tensorsLeadToY[y.id] = true; const nodesToY = {}; - for (let i = tape.length - 1; i >= 0; i--) { - const node = tape[i]; + for (let i2 = tape.length - 1; i2 >= 0; i2--) { + const node = tape[i2]; const nodeInputs = node.inputs; for (let j = 0; j < node.outputs.length; j++) { if (tensorsLeadToY[node.outputs[j].id]) { @@ -6170,8 +5535,8 @@ function getFilteredNodesXToY(tape, xs, y) { } } const filteredTape = []; - for (let i = 0; i < tape.length; i++) { - const node = tape[i]; + for (let i2 = 0; i2 < tape.length; i2++) { + const node = tape[i2]; if (nodesFromX[node.id] && nodesToY[node.id]) { const prunedInputs = {}; for (const inputName in node.inputs) { @@ -6189,8 +5554,8 @@ function getFilteredNodesXToY(tape, xs, y) { return filteredTape; } function backpropagateGradients(tensorAccumulatedGradientMap, filteredTape, tidy2, add5) { - for (let i = filteredTape.length - 1; i >= 0; i--) { - const node = filteredTape[i]; + for (let i2 = filteredTape.length - 1; i2 >= 0; i2--) { + const node = filteredTape[i2]; const dys = []; node.outputs.forEach((o) => { const gradTensor = tensorAccumulatedGradientMap[o.id]; @@ -6227,7 +5592,7 @@ function backpropagateGradients(tensorAccumulatedGradientMap, filteredTape, tidy } } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/tensor_format.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/tensor_format.js var FORMAT_LIMIT_NUM_VALS = 20; var FORMAT_NUM_FIRST_LAST_VALS = 3; var FORMAT_NUM_SIG_DIGITS = 7; @@ -6243,17 +5608,17 @@ function tensorToString(vals, shape, dtype, verbose) { lines.push(` shape: [${shape}]`); lines.push(` values:`); } - lines.push(valsLines.map((l) => " " + l).join("\n")); + lines.push(valsLines.map((l3) => " " + l3).join("\n")); return lines.join("\n"); } function computeMaxSizePerColumn(vals, shape, dtype, strides) { - const n = sizeFromShape(shape); + const n2 = sizeFromShape(shape); const numCols = strides[strides.length - 1]; const padPerCol = new Array(numCols).fill(0); const rank = shape.length; const valuesOrTuples = dtype === "complex64" ? createComplexTuples(vals) : vals; if (rank > 1) { - for (let row = 0; row < n / numCols; row++) { + for (let row = 0; row < n2 / numCols; row++) { const offset = row * numCols; for (let j = 0; j < numCols; j++) { padPerCol[j] = Math.max(padPerCol[j], valToString(valuesOrTuples[offset + j], 0, dtype).length); @@ -6302,12 +5667,12 @@ function subTensorToString(vals, shape, dtype, strides, padPerCol, isLast = true lastVals = createComplexTuples(lastVals); } return [ - "[" + firstVals.map((x, i) => valToString(x, padPerCol[i], dtype)).join(", ") + ", ..., " + lastVals.map((x, i) => valToString(x, padPerCol[size - FORMAT_NUM_FIRST_LAST_VALS + i], dtype)).join(", ") + "]" + "[" + firstVals.map((x, i2) => valToString(x, padPerCol[i2], dtype)).join(", ") + ", ..., " + lastVals.map((x, i2) => valToString(x, padPerCol[size - FORMAT_NUM_FIRST_LAST_VALS + i2], dtype)).join(", ") + "]" ]; } const displayVals = dtype === "complex64" ? createComplexTuples(vals) : Array.from(vals); return [ - "[" + displayVals.map((x, i) => valToString(x, padPerCol[i], dtype)).join(", ") + "]" + "[" + displayVals.map((x, i2) => valToString(x, padPerCol[i2], dtype)).join(", ") + "]" ]; } const subshape = shape.slice(1); @@ -6315,31 +5680,31 @@ function subTensorToString(vals, shape, dtype, strides, padPerCol, isLast = true const stride = strides[0] * storagePerElement; const lines = []; if (size > FORMAT_LIMIT_NUM_VALS) { - for (let i = 0; i < FORMAT_NUM_FIRST_LAST_VALS; i++) { - const start = i * stride; + for (let i2 = 0; i2 < FORMAT_NUM_FIRST_LAST_VALS; i2++) { + const start = i2 * stride; const end = start + stride; lines.push(...subTensorToString(vals.slice(start, end), subshape, dtype, substrides, padPerCol, false)); } lines.push("..."); - for (let i = size - FORMAT_NUM_FIRST_LAST_VALS; i < size; i++) { - const start = i * stride; + for (let i2 = size - FORMAT_NUM_FIRST_LAST_VALS; i2 < size; i2++) { + const start = i2 * stride; const end = start + stride; - lines.push(...subTensorToString(vals.slice(start, end), subshape, dtype, substrides, padPerCol, i === size - 1)); + lines.push(...subTensorToString(vals.slice(start, end), subshape, dtype, substrides, padPerCol, i2 === size - 1)); } } else { - for (let i = 0; i < size; i++) { - const start = i * stride; + for (let i2 = 0; i2 < size; i2++) { + const start = i2 * stride; const end = start + stride; - lines.push(...subTensorToString(vals.slice(start, end), subshape, dtype, substrides, padPerCol, i === size - 1)); + lines.push(...subTensorToString(vals.slice(start, end), subshape, dtype, substrides, padPerCol, i2 === size - 1)); } } const sep = rank === 2 ? "," : ""; lines[0] = "[" + lines[0] + sep; - for (let i = 1; i < lines.length - 1; i++) { - lines[i] = " " + lines[i] + sep; + for (let i2 = 1; i2 < lines.length - 1; i2++) { + lines[i2] = " " + lines[i2] + sep; } let newLineSep = ",\n"; - for (let i = 2; i < rank; i++) { + for (let i2 = 2; i2 < rank; i2++) { newLineSep += "\n"; } lines[lines.length - 1] = " " + lines[lines.length - 1] + "]" + (isLast ? "" : newLineSep); @@ -6347,21 +5712,21 @@ function subTensorToString(vals, shape, dtype, strides, padPerCol, isLast = true } function createComplexTuples(vals) { const complexTuples = []; - for (let i = 0; i < vals.length; i += 2) { - complexTuples.push([vals[i], vals[i + 1]]); + for (let i2 = 0; i2 < vals.length; i2 += 2) { + complexTuples.push([vals[i2], vals[i2 + 1]]); } return complexTuples; } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/tensor.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/tensor.js var TensorBuffer = class { constructor(shape, dtype, values) { this.dtype = dtype; this.shape = shape.slice(); this.size = sizeFromShape(shape); if (values != null) { - const n = values.length; - assert(n === this.size, () => `Length of values '${n}' does not match the size inferred by the shape '${this.size}'.`); + const n2 = values.length; + assert(n2 === this.size, () => `Length of values '${n2}' does not match the size inferred by the shape '${this.size}'.`); } if (dtype === "complex64") { throw new Error(`complex64 dtype TensorBuffers are not supported. Please create a TensorBuffer for the real and imaginary parts separately and call tf.complex(real, imag).`); @@ -6381,17 +5746,17 @@ var TensorBuffer = class { if (locs.length === 0) { locs = [0]; } - let i = 0; + let i2 = 0; for (const loc of locs) { - if (loc < 0 || loc >= this.shape[i]) { + if (loc < 0 || loc >= this.shape[i2]) { const msg = `Requested out of range element at ${locs}. Buffer shape=${this.shape}`; throw new Error(msg); } - i++; + i2++; } let index = locs[locs.length - 1]; - for (let i2 = 0; i2 < locs.length - 1; ++i2) { - index += this.strides[i2] * locs[i2]; + for (let i3 = 0; i3 < locs.length - 1; ++i3) { + index += this.strides[i3] * locs[i3]; } return this.values[index]; } @@ -6402,8 +5767,8 @@ var TensorBuffer = class { return locs[0]; } let index = locs[locs.length - 1]; - for (let i = 0; i < locs.length - 1; ++i) { - index += this.strides[i] * locs[i]; + for (let i2 = 0; i2 < locs.length - 1; ++i2) { + index += this.strides[i2] * locs[i2]; } return index; } @@ -6414,9 +5779,9 @@ var TensorBuffer = class { return [index]; } const locs = new Array(this.shape.length); - for (let i = 0; i < locs.length - 1; ++i) { - locs[i] = Math.floor(index / this.strides[i]); - index -= locs[i] * this.strides[i]; + for (let i2 = 0; i2 < locs.length - 1; ++i2) { + locs[i2] = Math.floor(index / this.strides[i2]); + index -= locs[i2] * this.strides[i2]; } locs[locs.length - 1] = index; return locs; @@ -6581,7 +5946,7 @@ Object.defineProperty(Variable, Symbol.hasInstance, { } }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/tensor_util.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/tensor_util.js var tensor_util_exports = {}; __export(tensor_util_exports, { assertTypesMatch: () => assertTypesMatch, @@ -6590,7 +5955,7 @@ __export(tensor_util_exports, { makeTypesMatch: () => makeTypesMatch }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/types.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/types.js var Rank; (function(Rank2) { Rank2["R0"] = "R0"; @@ -6648,7 +6013,7 @@ function sumOutType(type) { return upcastType(type, "int32"); } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/tensor_util.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/tensor_util.js function makeTypesMatch(a, b) { if (a.dtype === b.dtype) { return [a, b]; @@ -6692,7 +6057,7 @@ function isIterable(obj) { return Array.isArray(obj) || typeof obj === "object"; } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/engine.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/engine.js function isRegisteredKernelInvocation(kernelInvocation) { return kernelInvocation.kernelName != null; } @@ -6745,8 +6110,8 @@ var Engine = class { return; } const sortedBackends = this.getSortedBackends(); - for (let i = 0; i < sortedBackends.length; i++) { - const backendName = sortedBackends[i]; + for (let i2 = 0; i2 < sortedBackends.length; i2++) { + const backendName = sortedBackends[i2]; const success = await this.initializeBackend(backendName).success; if (success) { await this.setBackend(backendName); @@ -6898,8 +6263,8 @@ var Engine = class { } initializeBackendsAndReturnBest() { const sortedBackends = this.getSortedBackends(); - for (let i = 0; i < sortedBackends.length; i++) { - const backendName = sortedBackends[i]; + for (let i2 = 0; i2 < sortedBackends.length; i2++) { + const backendName = sortedBackends[i2]; const { success, asyncInit } = this.initializeBackend(backendName); if (asyncInit || success) { return { name: backendName, asyncInit }; @@ -7116,7 +6481,7 @@ var Engine = class { } else { inputTensorsToSave = inputsToSave.map((inputName) => inputs[inputName]); } - const outputTensorsToSave = outputs.filter((_, i) => outputsToSave[i]); + const outputTensorsToSave = outputs.filter((_, i2) => outputsToSave[i2]); return inputTensorsToSave.concat(outputTensorsToSave); } return []; @@ -7132,15 +6497,15 @@ var Engine = class { backendVals = values.map((d) => encodeString(d)); } const dataId = backend2.write(backendVals, shape, dtype); - const t = new Tensor(shape, dtype, dataId, this.nextTensorId()); - this.trackTensor(t, backend2); + const t2 = new Tensor(shape, dtype, dataId, this.nextTensorId()); + this.trackTensor(t2, backend2); if (dtype === "string") { const info = this.state.tensorInfo.get(dataId); const newBytes = bytesFromStringArray(backendVals); this.state.numBytes += newBytes - info.bytes; info.bytes = newBytes; } - return t; + return t2; } makeTensorFromDataId(dataId, shape, dtype, backend2) { dtype = dtype || "float32"; @@ -7149,9 +6514,9 @@ var Engine = class { } makeTensorFromTensorInfo(tensorInfo, backend2) { const { dataId, shape, dtype } = tensorInfo; - const t = new Tensor(shape, dtype, dataId, this.nextTensorId()); - this.trackTensor(t, backend2); - return t; + const t2 = new Tensor(shape, dtype, dataId, this.nextTensorId()); + this.trackTensor(t2, backend2); + return t2; } makeVariable(initialValue, trainable = true, name, dtype) { name = name || this.nextVariableId().toString(); @@ -7270,9 +6635,9 @@ var Engine = class { } if (gradientsFunc != null) { tapeNode.gradient = (dys) => { - dys = dys.map((dy, i) => { + dys = dys.map((dy, i2) => { if (dy == null) { - const output = outputs[i]; + const output = outputs[i2]; const vals = makeZerosTypedArray(output.size, output.dtype); return this.makeTensor(vals, output.shape, output.dtype); } @@ -7310,9 +6675,9 @@ var Engine = class { } endScope(result) { const tensorsToTrackInParent = getTensorsInContainer(result); - const tensorsToTrackInParentSet = new Set(tensorsToTrackInParent.map((t) => t.id)); - for (let i = 0; i < this.state.activeScope.track.length; i++) { - const tensor2 = this.state.activeScope.track[i]; + const tensorsToTrackInParentSet = new Set(tensorsToTrackInParent.map((t2) => t2.id)); + for (let i2 = 0; i2 < this.state.activeScope.track.length; i2++) { + const tensor2 = this.state.activeScope.track[i2]; if (!tensor2.kept && !tensorsToTrackInParentSet.has(tensor2.id)) { tensor2.dispose(); } @@ -7360,11 +6725,11 @@ var Engine = class { customGrad(f) { assert(isFunction(f), () => "The f passed in customGrad(f) must be a function."); return (...inputs) => { - assert(inputs.every((t) => t instanceof Tensor), () => "The args passed in customGrad(f)(x1, x2,...) must all be tensors"); + assert(inputs.every((t2) => t2 instanceof Tensor), () => "The args passed in customGrad(f)(x1, x2,...) must all be tensors"); let res; const inputMap = {}; - inputs.forEach((input2, i) => { - inputMap[i] = input2; + inputs.forEach((input2, i2) => { + inputMap[i2] = input2; }); const forwardFunc = (_, save) => { res = f(...[...inputs, save]); @@ -7376,10 +6741,10 @@ var Engine = class { const gradRes = res.gradFunc(dy, saved); const grads2 = Array.isArray(gradRes) ? gradRes : [gradRes]; assert(grads2.length === inputs.length, () => "The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function that returns the same number of tensors as inputs passed to f(...)."); - assert(grads2.every((t) => t instanceof Tensor), () => "The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function that returns a list of only tensors."); + assert(grads2.every((t2) => t2 instanceof Tensor), () => "The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function that returns a list of only tensors."); const gradMap = {}; - grads2.forEach((grad2, i) => { - gradMap[i] = () => grad2; + grads2.forEach((grad2, i2) => { + gradMap[i2] = () => grad2; }); return gradMap; }; @@ -7455,7 +6820,7 @@ function add(a, b) { return ENGINE.runKernel(Add, inputs); } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/device_util.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/device_util.js var device_util_exports = {}; __export(device_util_exports, { isBrowser: () => isBrowser, @@ -7493,7 +6858,7 @@ function isBrowser() { return typeof window !== "undefined" && window.document != null || typeof WorkerGlobalScope !== "undefined"; } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/flags.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/flags.js var ENV2 = env(); ENV2.registerFlag("DEBUG", () => false, (debugValue) => { if (debugValue) { @@ -7511,8 +6876,9 @@ ENV2.registerFlag("CHECK_COMPUTATION_FOR_ERRORS", () => true); ENV2.registerFlag("WRAP_TO_IMAGEBITMAP", () => false); ENV2.registerFlag("ENGINE_COMPILE_ONLY", () => false); ENV2.registerFlag("CANVAS2D_WILL_READ_FREQUENTLY_FOR_GPU", () => false); +ENV2.registerFlag("USE_SETTIMEOUTCUSTOM", () => false); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/tensor_util_env.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/tensor_util_env.js function inferShape(val, dtype) { let firstElem = val; if (isTypedArray(val)) { @@ -7540,8 +6906,8 @@ function deepAssertShapeConsistency(val, shape, indices) { assert(shape.length > 0, () => `Element arr[${indices.join("][")}] should be a primitive, but is an array of ${val.length} elements`); assert(val.length === shape[0], () => `Element arr[${indices.join("][")}] should have ${shape[0]} elements, but has ${val.length} elements`); const subShape = shape.slice(1); - for (let i = 0; i < val.length; ++i) { - deepAssertShapeConsistency(val[i], subShape, indices.concat(i)); + for (let i2 = 0; i2 < val.length; ++i2) { + deepAssertShapeConsistency(val[i2], subShape, indices.concat(i2)); } } function assertDtype(expectedDtype, actualDType, argName, functionName) { @@ -7582,10 +6948,10 @@ function convertToTensorArray(arg, argName, functionName, parseAsDtype = "numeri throw new Error(`Argument ${argName} passed to ${functionName} must be a \`Tensor[]\` or \`TensorLike[]\``); } const tensors = arg; - return tensors.map((t, i) => convertToTensor(t, `${argName}[${i}]`, functionName, parseAsDtype)); + return tensors.map((t2, i2) => convertToTensor(t2, `${argName}[${i2}]`, functionName, parseAsDtype)); } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/operation.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/operation.js var OP_SCOPE_SUFFIX = "__op"; function op(f) { const keys = Object.keys(f); @@ -7616,7 +6982,7 @@ function op(f) { return f2; } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/complex.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/complex.js function complex_(real5, imag5) { const $real = convertToTensor(real5, "real", "complex"); const $imag = convertToTensor(imag5, "imag", "complex"); @@ -7626,7 +6992,7 @@ function complex_(real5, imag5) { } var complex = op({ complex_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/tensor_ops_util.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/tensor_ops_util.js function makeTensor(values, shape, inferredShape, dtype) { if (dtype == null) { dtype = inferDtype(values); @@ -7642,10 +7008,10 @@ function makeTensor(values, shape, inferredShape, dtype) { const providedSize = sizeFromShape(shape); const inferredSize = sizeFromShape(inferredShape); assert(providedSize === inferredSize, () => `Based on the provided shape, [${shape}], the tensor should have ${providedSize} values but has ${inferredSize}`); - for (let i = 0; i < inferredShape.length; ++i) { - const inferred = inferredShape[i]; - const flatDimsDontMatch = i === inferredShape.length - 1 ? inferred !== sizeFromShape(shape.slice(i)) : true; - assert(inferredShape[i] === shape[i] || !flatDimsDontMatch, () => `Error creating a new Tensor. Inferred shape (${inferredShape}) does not match the provided shape (${shape}). `); + for (let i2 = 0; i2 < inferredShape.length; ++i2) { + const inferred = inferredShape[i2]; + const flatDimsDontMatch = i2 === inferredShape.length - 1 ? inferred !== sizeFromShape(shape.slice(i2)) : true; + assert(inferredShape[i2] === shape[i2] || !flatDimsDontMatch, () => `Error creating a new Tensor. Inferred shape (${inferredShape}) does not match the provided shape (${shape}). `); } } if (!isTypedArray(values) && !Array.isArray(values)) { @@ -7656,13 +7022,13 @@ function makeTensor(values, shape, inferredShape, dtype) { return ENGINE.makeTensor(values, shape, dtype); } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/tensor.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/tensor.js function tensor(values, shape, dtype) { const inferredShape = inferShape(values, dtype); return makeTensor(values, shape, inferredShape, dtype); } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/io/types.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/io/types.js var DTYPE_VALUE_SIZE_MAP = { "float32": 4, "float16": 2, @@ -7673,27 +7039,27 @@ var DTYPE_VALUE_SIZE_MAP = { "complex64": 8 }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/io/io_utils.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/io/io_utils.js var NUM_BYTES_STRING_LENGTH = 4; async function encodeWeights(tensors, group) { const specs = []; const dataPromises = []; const names = Array.isArray(tensors) ? tensors.map((tensor2) => tensor2.name) : Object.keys(tensors); - for (let i = 0; i < names.length; ++i) { - const name = names[i]; - const t = Array.isArray(tensors) ? tensors[i].tensor : tensors[name]; - if (t.dtype !== "float32" && t.dtype !== "int32" && t.dtype !== "bool" && t.dtype !== "string" && t.dtype !== "complex64") { - throw new Error(`Unsupported dtype in weight '${name}': ${t.dtype}`); - } - const spec = { name, shape: t.shape, dtype: t.dtype }; - if (t.dtype === "string") { + for (let i2 = 0; i2 < names.length; ++i2) { + const name = names[i2]; + const t2 = Array.isArray(tensors) ? tensors[i2].tensor : tensors[name]; + if (t2.dtype !== "float32" && t2.dtype !== "int32" && t2.dtype !== "bool" && t2.dtype !== "string" && t2.dtype !== "complex64") { + throw new Error(`Unsupported dtype in weight '${name}': ${t2.dtype}`); + } + const spec = { name, shape: t2.shape, dtype: t2.dtype }; + if (t2.dtype === "string") { const utf8bytes = new Promise(async (resolve) => { - const vals = await t.bytes(); + const vals = await t2.bytes(); const totalNumBytes = vals.reduce((p2, c) => p2 + c.length, 0) + NUM_BYTES_STRING_LENGTH * vals.length; const bytes = new Uint8Array(totalNumBytes); let offset = 0; - for (let i2 = 0; i2 < vals.length; i2++) { - const val = vals[i2]; + for (let i3 = 0; i3 < vals.length; i3++) { + const val = vals[i3]; const bytesOfLength = new Uint8Array(new Uint32Array([val.length]).buffer); bytes.set(bytesOfLength, offset); offset += NUM_BYTES_STRING_LENGTH; @@ -7704,7 +7070,7 @@ async function encodeWeights(tensors, group) { }); dataPromises.push(utf8bytes); } else { - dataPromises.push(t.data()); + dataPromises.push(t2.data()); } if (group != null) { spec.group = group; @@ -7743,9 +7109,9 @@ function decodeWeights(buffer2, specs) { if (dtype === "float32") { if (quantization.dtype === "uint8" || quantization.dtype === "uint16") { values = new Float32Array(quantizedArray.length); - for (let i = 0; i < quantizedArray.length; i++) { - const v = quantizedArray[i]; - values[i] = v * quantization.scale + quantization.min; + for (let i2 = 0; i2 < quantizedArray.length; i2++) { + const v = quantizedArray[i2]; + values[i2] = v * quantization.scale + quantization.min; } } else if (quantization.dtype === "float16") { if (float16Decode === void 0) { @@ -7760,9 +7126,9 @@ function decodeWeights(buffer2, specs) { throw new Error(`Unsupported quantization type ${quantization.dtype} for weight type int32.`); } values = new Int32Array(quantizedArray.length); - for (let i = 0; i < quantizedArray.length; i++) { - const v = quantizedArray[i]; - values[i] = Math.round(v * quantization.scale + quantization.min); + for (let i2 = 0; i2 < quantizedArray.length; i2++) { + const v = quantizedArray[i2]; + values[i2] = Math.round(v * quantization.scale + quantization.min); } } else { throw new Error(`Unsupported dtype in weight '${name}': ${dtype}`); @@ -7771,7 +7137,7 @@ function decodeWeights(buffer2, specs) { } else if (dtype === "string") { const size2 = sizeFromShape(spec.shape); values = []; - for (let i = 0; i < size2; i++) { + for (let i2 = 0; i2 < size2; i2++) { const byteLength = new Uint32Array(buffer2.slice(offset, offset + NUM_BYTES_STRING_LENGTH))[0]; offset += NUM_BYTES_STRING_LENGTH; const bytes = new Uint8Array(buffer2.slice(offset, offset + byteLength)); @@ -7791,9 +7157,9 @@ function decodeWeights(buffer2, specs) { values = new Float32Array(byteBuffer); const real5 = new Float32Array(values.length / 2); const image2 = new Float32Array(values.length / 2); - for (let i = 0; i < real5.length; i++) { - real5[i] = values[i * 2]; - image2[i] = values[i * 2 + 1]; + for (let i2 = 0; i2 < real5.length; i2++) { + real5[i2] = values[i2 * 2]; + image2[i2] = values[i2 * 2 + 1]; } const realTensor = tensor(real5, shape, "float32"); const imageTensor = tensor(image2, shape, "float32"); @@ -7844,21 +7210,21 @@ function arrayBufferToBase64String(buffer2) { return Buffer.from(buffer2).toString("base64"); } const buf = new Uint8Array(buffer2); - let s = ""; - for (let i = 0, l = buf.length; i < l; i++) { - s += String.fromCharCode(buf[i]); + let s2 = ""; + for (let i2 = 0, l3 = buf.length; i2 < l3; i2++) { + s2 += String.fromCharCode(buf[i2]); } - return btoa(s); + return btoa(s2); } function base64StringToArrayBuffer(str) { if (useNodeBuffer) { const buf = Buffer.from(str, "base64"); return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); } - const s = atob(str); - const buffer2 = new Uint8Array(s.length); - for (let i = 0; i < s.length; ++i) { - buffer2.set([s.charCodeAt(i)], i); + const s2 = atob(str); + const buffer2 = new Uint8Array(s2.length); + for (let i2 = 0; i2 < s2.length; ++i2) { + buffer2.set([s2.charCodeAt(i2)], i2); } return buffer2.buffer; } @@ -7909,7 +7275,7 @@ function getModelJSONForModelArtifacts(artifacts, manifest) { } return result; } -async function getModelArtifactsForJSON(modelJSON, loadWeights2) { +function getModelArtifactsForJSONSync(modelJSON, weightSpecs, weightData) { const modelArtifacts = { modelTopology: modelJSON.modelTopology, format: modelJSON.format, @@ -7920,7 +7286,12 @@ async function getModelArtifactsForJSON(modelJSON, loadWeights2) { modelArtifacts.trainingConfig = modelJSON.trainingConfig; } if (modelJSON.weightsManifest != null) { - const [weightSpecs, weightData] = await loadWeights2(modelJSON.weightsManifest); + if (!weightSpecs) { + throw new Error("modelJSON has weightsManifest but weightSpecs is null"); + } + if (!weightData) { + throw new Error("modelJSON has weightsManifest but weightData is null"); + } modelArtifacts.weightSpecs = weightSpecs; modelArtifacts.weightData = weightData; } @@ -7935,6 +7306,14 @@ async function getModelArtifactsForJSON(modelJSON, loadWeights2) { } return modelArtifacts; } +async function getModelArtifactsForJSON(modelJSON, loadWeights2) { + let weightSpecs; + let weightData; + if (modelJSON.weightsManifest != null) { + [weightSpecs, weightData] = await loadWeights2(modelJSON.weightsManifest); + } + return getModelArtifactsForJSONSync(modelJSON, weightSpecs, weightData); +} function getModelArtifactsInfoForJSON(modelArtifacts) { if (modelArtifacts.modelTopology instanceof ArrayBuffer) { throw new Error("Expected JSON model topology, received ArrayBuffer."); @@ -7947,25 +7326,32 @@ function getModelArtifactsInfoForJSON(modelArtifacts) { weightDataBytes: modelArtifacts.weightData == null ? 0 : modelArtifacts.weightData.byteLength }; } +function getWeightSpecs(weightsManifest) { + const weightSpecs = []; + for (const entry of weightsManifest) { + weightSpecs.push(...entry.weights); + } + return weightSpecs; +} function computeFloat16MantisaTable() { - const convertMantissa = (i) => { - let m = i << 13; - let e = 0; + const convertMantissa = (i2) => { + let m = i2 << 13; + let e2 = 0; while ((m & 8388608) === 0) { - e -= 8388608; + e2 -= 8388608; m <<= 1; } m &= ~8388608; - e += 947912704; - return m | e; + e2 += 947912704; + return m | e2; }; const mantisaTable = new Uint32Array(2048); mantisaTable[0] = 0; - for (let i = 1; i < 1024; i++) { - mantisaTable[i] = convertMantissa(i); + for (let i2 = 1; i2 < 1024; i2++) { + mantisaTable[i2] = convertMantissa(i2); } - for (let i = 1024; i < 2048; i++) { - mantisaTable[i] = 939524096 + (i - 1024 << 13); + for (let i2 = 1024; i2 < 2048; i2++) { + mantisaTable[i2] = 939524096 + (i2 - 1024 << 13); } return mantisaTable; } @@ -7975,18 +7361,18 @@ function computeFloat16ExponentTable() { exponentTable[31] = 1199570944; exponentTable[32] = 2147483648; exponentTable[63] = 3347054592; - for (let i = 1; i < 31; i++) { - exponentTable[i] = i << 23; + for (let i2 = 1; i2 < 31; i2++) { + exponentTable[i2] = i2 << 23; } - for (let i = 33; i < 63; i++) { - exponentTable[i] = 2147483648 + (i - 32 << 23); + for (let i2 = 33; i2 < 63; i2++) { + exponentTable[i2] = 2147483648 + (i2 - 32 << 23); } return exponentTable; } function computeFloat16OffsetTable() { const offsetTable = new Uint32Array(64); - for (let i = 0; i < 64; i++) { - offsetTable[i] = 1024; + for (let i2 = 0; i2 < 64; i2++) { + offsetTable[i2] = 1024; } offsetTable[0] = offsetTable[32] = 0; return offsetTable; @@ -8007,7 +7393,7 @@ function getFloat16Decoder() { }; } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/io/router_registry.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/io/router_registry.js var IORouterRegistry = class { constructor() { this.saveRouters = []; @@ -8048,7 +7434,7 @@ var registerLoadRouter = (loudRouter) => IORouterRegistry.registerLoadRouter(lou var getSaveHandlers = (url) => IORouterRegistry.getSaveHandlers(url); var getLoadHandlers = (url, loadOptions) => IORouterRegistry.getLoadHandlers(url, loadOptions); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/io/indexed_db.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/io/indexed_db.js var DATABASE_NAME = "tensorflowjs"; var DATABASE_VERSION = 1; var MODEL_STORE_NAME = "models_store"; @@ -8252,7 +7638,7 @@ var BrowserIndexedDBManager = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/io/local_storage.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/io/local_storage.js var PATH_SEPARATOR = "/"; var PATH_PREFIX = "tensorflowjs_models"; var INFO_SUFFIX = "info"; @@ -8398,8 +7784,8 @@ var BrowserLocalStorageManager = class { const out = {}; const prefix = PATH_PREFIX + PATH_SEPARATOR; const suffix = PATH_SEPARATOR + INFO_SUFFIX; - for (let i = 0; i < this.LS.length; ++i) { - const key = this.LS.key(i); + for (let i2 = 0; i2 < this.LS.length; ++i2) { + const key = this.LS.key(i2); if (key.startsWith(prefix) && key.endsWith(suffix)) { const modelPath = getModelPathFromKey(key); out[modelPath] = JSON.parse(this.LS.getItem(key)); @@ -8419,7 +7805,7 @@ var BrowserLocalStorageManager = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/io/model_management.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/io/model_management.js var URL_SCHEME_SUFFIX = "://"; var ModelStoreManagerRegistry = class { constructor() { @@ -8510,8 +7896,14 @@ async function moveModel(sourceURL, destURL) { return cloneModelInternal(sourceURL, destURL, deleteSource); } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/platforms/platform_browser.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/platforms/platform_browser.js var PlatformBrowser = class { + constructor() { + this.messageName = "setTimeoutCustom"; + this.functionRefs = []; + this.handledMessageCount = 0; + this.hasEventListener = false; + } fetch(path, init2) { return fetch(path, init2); } @@ -8530,6 +7922,31 @@ var PlatformBrowser = class { decode(bytes, encoding) { return new TextDecoder(encoding).decode(bytes); } + setTimeoutCustom(functionRef, delay) { + if (!window || !env().getBool("USE_SETTIMEOUTCUSTOM")) { + setTimeout(functionRef, delay); + return; + } + this.functionRefs.push(functionRef); + setTimeout(() => { + window.postMessage({ name: this.messageName, index: this.functionRefs.length - 1 }, "*"); + }, delay); + if (!this.hasEventListener) { + this.hasEventListener = true; + window.addEventListener("message", (event) => { + if (event.source === window && event.data.name === this.messageName) { + event.stopPropagation(); + const functionRef2 = this.functionRefs[event.data.index]; + functionRef2(); + this.handledMessageCount++; + if (this.handledMessageCount === this.functionRefs.length) { + this.functionRefs = []; + this.handledMessageCount = 0; + } + } + }, true); + } + } }; if (env().get("IS_BROWSER")) { env().setPlatform("browser", new PlatformBrowser()); @@ -8543,7 +7960,7 @@ if (env().get("IS_BROWSER")) { } } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/platforms/platform_node.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/platforms/platform_node.js var getNodeFetch = { importFetch: () => require_browser() }; @@ -8583,14 +8000,14 @@ if (env().get("IS_NODE") && !env().get("IS_BROWSER")) { env().setPlatform("node", new PlatformNode()); } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/buffer.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/buffer.js function buffer(shape, dtype = "float32", values) { dtype = dtype || "float32"; assertNonNegativeIntegerDimensions(shape); return new TensorBuffer(shape, dtype, values); } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/cast.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/cast.js function cast_(x, dtype) { const $x = convertToTensor(x, "x", "cast"); if (!isValidDtype(dtype)) { @@ -8605,7 +8022,7 @@ function cast_(x, dtype) { } var cast = op({ cast_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/clone.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/clone.js function clone_(x) { const $x = convertToTensor(x, "x", "clone", "string_or_numeric"); const inputs = { x: $x }; @@ -8613,12 +8030,12 @@ function clone_(x) { } var clone = op({ clone_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/print.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/print.js function print(x, verbose = false) { console.log(x.toString(verbose)); } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/base_side_effects.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/base_side_effects.js getOrMakeEngine(); var opHandler2 = { buffer, @@ -8628,7 +8045,7 @@ var opHandler2 = { }; setOpHandler(opHandler2); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/io/io.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/io/io.js var io_exports = {}; __export(io_exports, { browserFiles: () => browserFiles, @@ -8641,8 +8058,10 @@ __export(io_exports, { fromMemorySync: () => fromMemorySync, getLoadHandlers: () => getLoadHandlers, getModelArtifactsForJSON: () => getModelArtifactsForJSON, + getModelArtifactsForJSONSync: () => getModelArtifactsForJSONSync, getModelArtifactsInfoForJSON: () => getModelArtifactsInfoForJSON, getSaveHandlers: () => getSaveHandlers, + getWeightSpecs: () => getWeightSpecs, http: () => http, isHTTPScheme: () => isHTTPScheme, listModels: () => listModels, @@ -8656,7 +8075,7 @@ __export(io_exports, { withSaveHandlerSync: () => withSaveHandlerSync }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/io/browser_files.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/io/browser_files.js var DEFAULT_FILE_NAME_PREFIX = "model"; var DEFAULT_JSON_EXTENSION_NAME = ".json"; var DEFAULT_WEIGHT_DATA_EXTENSION_NAME = ".weights.bin"; @@ -8805,7 +8224,7 @@ function browserFiles(files) { return new BrowserFiles(files); } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/io/progress.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/io/progress.js function monitorPromisesProgress(promises, onProgress, startFraction, endFraction) { checkPromises(promises); startFraction = startFraction == null ? 0 : startFraction; @@ -8831,7 +8250,7 @@ function monitorPromisesProgress(promises, onProgress, startFraction, endFractio return Promise.all(promises.map(registerMonitor)); } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/io/weights_loader.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/io/weights_loader.js async function loadWeightsAsArrayBuffer(fetchURLs, loadOptions) { if (loadOptions == null) { loadOptions = {}; @@ -8889,19 +8308,19 @@ function weightsLoaderFactory(fetchWeightsFunction) { }); }); if (!weightsFound.every((found) => found)) { - const weightsNotFound = weightNames.filter((_, i) => !weightsFound[i]); + const weightsNotFound = weightNames.filter((_, i2) => !weightsFound[i2]); throw new Error(`Could not find weights in manifest with names: ${weightsNotFound.join(", ")}. Manifest JSON has weights with names: ${allManifestWeightNames.join(", ")}.`); } - const groupIndicesToFetch = groupIndicesToFetchMap.reduce((accumulator, shouldFetch, i) => { + const groupIndicesToFetch = groupIndicesToFetchMap.reduce((accumulator, shouldFetch, i2) => { if (shouldFetch) { - accumulator.push(i); + accumulator.push(i2); } return accumulator; }, []); const fetchUrls = []; - groupIndicesToFetch.forEach((i) => { - manifest[i].paths.forEach((filepath) => { + groupIndicesToFetch.forEach((i2) => { + manifest[i2].paths.forEach((filepath) => { const fetchUrl = filePathPrefix + (!filePathPrefix.endsWith("/") ? "/" : "") + filepath; fetchUrls.push(fetchUrl); }); @@ -8909,21 +8328,21 @@ Manifest JSON has weights with names: ${allManifestWeightNames.join(", ")}.`); const buffers = await fetchWeightsFunction(fetchUrls); const weightsTensorMap = {}; let bufferIndexOffset = 0; - groupIndicesToFetch.forEach((i) => { - const numBuffers = manifest[i].paths.length; + groupIndicesToFetch.forEach((i2) => { + const numBuffers = manifest[i2].paths.length; let groupBytes = 0; - for (let i2 = 0; i2 < numBuffers; i2++) { - groupBytes += buffers[bufferIndexOffset + i2].byteLength; + for (let i3 = 0; i3 < numBuffers; i3++) { + groupBytes += buffers[bufferIndexOffset + i3].byteLength; } const groupBuffer = new ArrayBuffer(groupBytes); const groupByteBuffer = new Uint8Array(groupBuffer); let groupBufferOffset = 0; - for (let i2 = 0; i2 < numBuffers; i2++) { - const buffer2 = new Uint8Array(buffers[bufferIndexOffset + i2]); + for (let i3 = 0; i3 < numBuffers; i3++) { + const buffer2 = new Uint8Array(buffers[bufferIndexOffset + i3]); groupByteBuffer.set(buffer2, groupBufferOffset); groupBufferOffset += buffer2.byteLength; } - const weightsEntries = groupWeightsToFetch[i]; + const weightsEntries = groupWeightsToFetch[i2]; weightsEntries.forEach((weightsEntry) => { const byteBuffer = groupBuffer.slice(weightsEntry.groupOffset, weightsEntry.groupOffset + weightsEntry.sizeBytes); const nameToTensorMap = decodeWeights(byteBuffer, [weightsEntry.manifestEntry]); @@ -8937,7 +8356,7 @@ Manifest JSON has weights with names: ${allManifestWeightNames.join(", ")}.`); }; } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/io/http.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/io/http.js var OCTET_STREAM_MIME_TYPE = "application/octet-stream"; var JSON_TYPE = "application/json"; var HTTPRequest = class { @@ -8998,7 +8417,7 @@ var HTTPRequest = class { let modelJSON; try { modelJSON = await modelConfigRequest.json(); - } catch (e) { + } catch (e2) { let message = `Failed to parse model JSON of response from ${this.path}.`; if (this.path.endsWith(".pb")) { message += " Your path contains a .pb file extension. Support for .pb models have been removed in TensorFlow.js 1.0 in favor of .json models. You can re-convert your Python TensorFlow model using the TensorFlow.js 1.0 conversion scripts or you can convert your.pb models with the 'pb2json'NPM script in the tensorflow/tfjs-converter repository."; @@ -9018,10 +8437,7 @@ var HTTPRequest = class { const weightPath = Array.isArray(this.path) ? this.path[1] : this.path; const [prefix, suffix] = parseUrl(weightPath); const pathPrefix = this.weightPathPrefix || prefix; - const weightSpecs = []; - for (const entry of weightsManifest) { - weightSpecs.push(...entry.weights); - } + const weightSpecs = getWeightSpecs(weightsManifest); const fetchURLs = []; const urlPromises = []; for (const weightsGroup of weightsManifest) { @@ -9080,7 +8496,7 @@ function browserHTTPRequest(path, loadOptions) { return http(path, loadOptions); } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/io/passthrough.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/io/passthrough.js var PassthroughLoader = class { constructor(modelArtifacts) { this.modelArtifacts = modelArtifacts; @@ -9137,13 +8553,13 @@ function withSaveHandlerSync(saveHandler) { return new PassthroughSaver(saveHandler); } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/math.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/math.js var math_exports = {}; __export(math_exports, { confusionMatrix: () => confusionMatrix }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/mat_mul.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/mat_mul.js function matMul_(a, b, transposeA = false, transposeB = false) { let $a = convertToTensor(a, "a", "matMul"); let $b = convertToTensor(b, "b", "matMul"); @@ -9154,7 +8570,7 @@ function matMul_(a, b, transposeA = false, transposeB = false) { } var matMul = op({ matMul_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/one_hot.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/one_hot.js function oneHot_(indices, depth, onValue = 1, offValue = 0, dtype = "int32") { if (depth < 2) { throw new Error(`Error in oneHot: depth must be >=2, but it is ${depth}`); @@ -9166,7 +8582,7 @@ function oneHot_(indices, depth, onValue = 1, offValue = 0, dtype = "int32") { } var oneHot = op({ oneHot_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/globals.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/globals.js function enableProdMode() { env().set("PROD", true); } @@ -9236,7 +8652,7 @@ function setPlatform(platformName, platform) { env().setPlatform(platformName, platform); } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/imag.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/imag.js function imag_(input2) { const $input = convertToTensor(input2, "input", "imag"); const inputs = { input: $input }; @@ -9244,7 +8660,7 @@ function imag_(input2) { } var imag = op({ imag_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/neg.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/neg.js function neg_(x) { const $x = convertToTensor(x, "x", "neg"); const inputs = { x: $x }; @@ -9252,7 +8668,7 @@ function neg_(x) { } var neg = op({ neg_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/real.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/real.js function real_(input2) { const $input = convertToTensor(input2, "input", "real"); const inputs = { input: $input }; @@ -9260,11 +8676,11 @@ function real_(input2) { } var real = op({ real_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/transpose.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/transpose.js function transpose_(x, perm, conjugate) { const $x = convertToTensor(x, "x", "transpose"); if (perm == null) { - perm = $x.shape.map((s, i) => i).reverse(); + perm = $x.shape.map((s2, i2) => i2).reverse(); } assert($x.rank === perm.length, () => `Error in transpose: rank of input ${$x.rank} must match length of perm ${perm}.`); perm.forEach((axis) => { @@ -9291,7 +8707,7 @@ function transpose_(x, perm, conjugate) { } var transpose = op({ transpose_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/confusion_matrix.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/confusion_matrix.js function confusionMatrix_(labels, predictions, numClasses) { const $labels = convertToTensor(labels, "labels", "confusionMatrix"); const $predictions = convertToTensor(predictions, "predictions", "confusionMatrix"); @@ -9308,7 +8724,7 @@ function confusionMatrix_(labels, predictions, numClasses) { } var confusionMatrix = op({ confusionMatrix_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/broadcast_util.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/broadcast_util.js var broadcast_util_exports = {}; __export(broadcast_util_exports, { assertAndGetBroadcastShape: () => assertAndGetBroadcastShape, @@ -9318,10 +8734,10 @@ __export(broadcast_util_exports, { function getBroadcastDims(inShape, outShape) { const inRank = inShape.length; const dims = []; - for (let i = 0; i < inRank; i++) { - const dim = inRank - 1 - i; + for (let i2 = 0; i2 < inRank; i2++) { + const dim = inRank - 1 - i2; const a = inShape[dim] || 1; - const b = outShape[outShape.length - 1 - i] || 1; + const b = outShape[outShape.length - 1 - i2] || 1; if (b > 1 && a === 1) { dims.unshift(dim); } @@ -9330,9 +8746,9 @@ function getBroadcastDims(inShape, outShape) { } function getReductionAxes(inShape, outShape) { const result = []; - for (let i = 0; i < outShape.length; i++) { - const inDim = inShape[inShape.length - i - 1]; - const outAxis = outShape.length - i - 1; + for (let i2 = 0; i2 < outShape.length; i2++) { + const inDim = inShape[inShape.length - i2 - 1]; + const outAxis = outShape.length - i2 - 1; const outDim = outShape[outAxis]; if (inDim == null || inDim === 1 && outDim > 1) { result.unshift(outAxis); @@ -9342,13 +8758,13 @@ function getReductionAxes(inShape, outShape) { } function assertAndGetBroadcastShape(shapeA, shapeB) { const result = []; - const l = Math.max(shapeA.length, shapeB.length); - for (let i = 0; i < l; i++) { - let a = shapeA[shapeA.length - i - 1]; + const l3 = Math.max(shapeA.length, shapeB.length); + for (let i2 = 0; i2 < l3; i2++) { + let a = shapeA[shapeA.length - i2 - 1]; if (a == null) { a = 1; } - let b = shapeB[shapeB.length - i - 1]; + let b = shapeB[shapeB.length - i2 - 1]; if (b == null) { b = 1; } @@ -9366,7 +8782,7 @@ function assertAndGetBroadcastShape(shapeA, shapeB) { return result; } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/browser.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/browser.js var browser_exports = {}; __export(browser_exports, { fromPixels: () => fromPixels, @@ -9374,7 +8790,7 @@ __export(browser_exports, { toPixels: () => toPixels }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/tensor3d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/tensor3d.js function tensor3d(values, shape, dtype) { assertNonNull(values); if (shape != null && shape.length !== 3) { @@ -9390,7 +8806,7 @@ function tensor3d(values, shape, dtype) { return makeTensor(values, shape, inferredShape, dtype); } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/browser.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/browser.js var fromPixels2DContext; function fromPixels_(pixels, numChannels = 3) { if (numChannels > 4) { @@ -9458,9 +8874,9 @@ function fromPixels_(pixels, numChannels = 3) { } else { const numPixels = width * height; values = new Int32Array(numPixels * numChannels); - for (let i = 0; i < numPixels; i++) { + for (let i2 = 0; i2 < numPixels; i2++) { for (let channel = 0; channel < numChannels; ++channel) { - values[i * numChannels + channel] = vals[i * 4 + channel]; + values[i2 * numChannels + channel] = vals[i2 * 4 + channel]; } } } @@ -9485,7 +8901,7 @@ async function fromPixelsAsync(pixels, numChannels = 3) { let imageBitmap; try { imageBitmap = await createImageBitmap(pixels, { premultiplyAlpha: "none" }); - } catch (e) { + } catch (e2) { imageBitmap = null; } if (imageBitmap != null && imageBitmap.width === pixels.width && imageBitmap.height === pixels.height) { @@ -9519,10 +8935,10 @@ async function toPixels(img, canvas) { const data = await $img.data(); const multiplier = $img.dtype === "float32" ? 255 : 1; const bytes = new Uint8ClampedArray(width * height * 4); - for (let i = 0; i < height * width; ++i) { + for (let i2 = 0; i2 < height * width; ++i2) { const rgba = [0, 0, 0, 255]; for (let d = 0; d < depth; d++) { - const value = data[i * depth + d]; + const value = data[i2 * depth + d]; if ($img.dtype === "float32") { if (value < 0 || value > 1) { throw new Error(`Tensor values for a float32 Tensor must be in the range [0 - 1] but encountered ${value}.`); @@ -9540,7 +8956,7 @@ async function toPixels(img, canvas) { rgba[d] = value * multiplier; } } - const j = i * 4; + const j = i2 * 4; bytes[j + 0] = Math.round(rgba[0]); bytes[j + 1] = Math.round(rgba[1]); bytes[j + 2] = Math.round(rgba[2]); @@ -9560,7 +8976,7 @@ async function toPixels(img, canvas) { } var fromPixels = op({ fromPixels_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/gather_nd_util.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/gather_nd_util.js var gather_nd_util_exports = {}; __export(gather_nd_util_exports, { prepareAndValidate: () => prepareAndValidate @@ -9586,16 +9002,16 @@ function prepareAndValidate(tensor2, indices) { const indicesShape = indices.shape; const sliceRank = indicesShape[indicesShape.length - 1]; let nResult = 1; - for (let i = 0; i < indicesShape.length - 1; ++i) { - nResult *= indicesShape[i]; + for (let i2 = 0; i2 < indicesShape.length - 1; ++i2) { + nResult *= indicesShape[i2]; } const inputShape = tensor2.shape; const resultShape = indicesShape.slice(); resultShape.pop(); let sliceSize = 1; - for (let i = sliceRank; i < tensorRank; ++i) { - sliceSize *= inputShape[i]; - resultShape.push(inputShape[i]); + for (let i2 = sliceRank; i2 < tensorRank; ++i2) { + sliceSize *= inputShape[i2]; + resultShape.push(inputShape[i2]); } const strides = [ ...computeStrides(tensor2.shape).map((stride) => stride / sliceSize), @@ -9604,7 +9020,7 @@ function prepareAndValidate(tensor2, indices) { return [resultShape, nResult, sliceSize, strides]; } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/scatter_nd_util.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/scatter_nd_util.js var scatter_nd_util_exports = {}; __export(scatter_nd_util_exports, { calculateShapes: () => calculateShapes, @@ -9663,8 +9079,8 @@ function calculateShapes(updates, indices, shape) { const sliceRank = indicesRank > 1 ? indices.shape[indicesRank - 1] : 1; const totalNd = shape.length; let sliceSize = 1; - for (let i = sliceRank; i < totalNd; ++i) { - sliceSize *= shape[i]; + for (let i2 = sliceRank; i2 < totalNd; ++i2) { + sliceSize *= shape[i2]; } const safeSliceDim = sliceRank < 1 ? 1 : sliceRank; const numUpdates = sizeFromShape(indices.shape) / safeSliceDim; @@ -9673,7 +9089,7 @@ function calculateShapes(updates, indices, shape) { return { sliceRank, numUpdates, sliceSize, strides, outputSize }; } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/slice_util.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/slice_util.js var slice_util_exports = {}; __export(slice_util_exports, { assertParamsValid: () => assertParamsValid, @@ -9697,8 +9113,8 @@ function assertParamsValid(input2, begin, size) { const inputRank = input2.shape.length; assert(inputRank === begin.length, () => `Error in slice${inputRank}D: Length of begin ${begin} must match the rank of the array (${inputRank}).`); assert(inputRank === size.length, () => `Error in slice${inputRank}D: Length of size ${size} must match the rank of the array (${inputRank}).`); - for (let i = 0; i < inputRank; ++i) { - assert(begin[i] + size[i] <= input2.shape[i], () => `Error in slice${inputRank}D: begin[${i}] + size[${i}] (${begin[i] + size[i]}) would overflow input.shape[${i}] (${input2.shape[i]})`); + for (let i2 = 0; i2 < inputRank; ++i2) { + assert(begin[i2] + size[i2] <= input2.shape[i2], () => `Error in slice${inputRank}D: begin[${i2}] + size[${i2}] (${begin[i2] + size[i2]}) would overflow input.shape[${i2}] (${input2.shape[i2]})`); } } function maskToAxes(mask) { @@ -9722,11 +9138,11 @@ function computeOutShape(begin, end, strides) { } function stridesWithElidedDims(strides, ellipsisInsertionIndex, numElidedAxes, inputShape) { const newStrides = [...strides]; - for (let i = newStrides.length; i < inputShape.length; i++) { + for (let i2 = newStrides.length; i2 < inputShape.length; i2++) { newStrides.push(1); } - for (let i = 0; i < numElidedAxes; i++) { - if (i === 0) { + for (let i2 = 0; i2 < numElidedAxes; i2++) { + if (i2 === 0) { newStrides[ellipsisInsertionIndex] = 1; } else { newStrides.splice(ellipsisInsertionIndex, 0, 1); @@ -9743,8 +9159,8 @@ function unnormalizeAxis(ellipsisInsertionIndex, numElidedAxes, normalizedAxis) } function getElidedAxes(numElidedAxes, ellipsisInsertionIndex) { const elidedAxes = []; - for (let i = 0; i < numElidedAxes; i++) { - elidedAxes.push(ellipsisInsertionIndex + i); + for (let i2 = 0; i2 < numElidedAxes; i2++) { + elidedAxes.push(ellipsisInsertionIndex + i2); } return elidedAxes; } @@ -9802,12 +9218,12 @@ function stopIndicesWithElidedDims(endMask, ellipsisInsertionIndex, numElidedAxe newIndices[axis] = originalValue; } } - for (let i = 0; i < newIndices.length; i++) { - const axisSize = inputShape[i]; - if (newIndices[i] < 0) { - newIndices[i] += axisSize; + for (let i2 = 0; i2 < newIndices.length; i2++) { + const axisSize = inputShape[i2]; + if (newIndices[i2] < 0) { + newIndices[i2] += axisSize; } - newIndices[i] = clamp(0, newIndices[i], inputShape[i]); + newIndices[i2] = clamp(0, newIndices[i2], inputShape[i2]); } return newIndices; } @@ -9858,14 +9274,14 @@ function stopForAxis(endMask, stopIndices, strides, inputShape, axis, ellipsisMa } function isSliceContinous(shape, begin, size) { let firstNonOneAxis = size.length; - for (let i = 0; i < size.length; i++) { - if (size[i] > 1) { - firstNonOneAxis = i; + for (let i2 = 0; i2 < size.length; i2++) { + if (size[i2] > 1) { + firstNonOneAxis = i2; break; } } - for (let i = firstNonOneAxis + 1; i < size.length; i++) { - if (begin[i] > 0 || size[i] !== shape[i]) { + for (let i2 = firstNonOneAxis + 1; i2 < size.length; i2++) { + if (begin[i2] > 0 || size[i2] !== shape[i2]) { return false; } } @@ -9873,8 +9289,8 @@ function isSliceContinous(shape, begin, size) { } function computeFlatOffset(begin, strides) { let flatOffset = begin.length > 0 ? begin[begin.length - 1] : 1; - for (let i = 0; i < begin.length - 1; i++) { - flatOffset += begin[i] * strides[i]; + for (let i2 = 0; i2 < begin.length - 1; i2++) { + flatOffset += begin[i2] * strides[i2]; } return flatOffset; } @@ -9901,12 +9317,12 @@ function parseSliceParams(x, begin, size) { } else { size_ = size; } - size_ = size_.map((d, i) => { + size_ = size_.map((d, i2) => { if (d >= 0) { return d; } else { - assert(d === -1, () => `Negative size values should be exactly -1 but got ${d} for the slice() size at index ${i}.`); - return x.shape[i] - begin_[i]; + assert(d === -1, () => `Negative size values should be exactly -1 but got ${d} for the slice() size at index ${i2}.`); + return x.shape[i2] - begin_[i2]; } }); return [begin_, size_]; @@ -9935,11 +9351,11 @@ function sliceInfo(xShape, begin, end, strides, beginMask, endMask, ellipsisMask newAxisMask, shrinkAxisMask }; - for (let i = 0; i < sparseSpec.dims; i++) { - if (ellipsisSeen && (1 << i & newAxisMask) !== 0) { + for (let i2 = 0; i2 < sparseSpec.dims; i2++) { + if (ellipsisSeen && (1 << i2 & newAxisMask) !== 0) { sparseSpec.numAddAxisAfterEllipsis++; } - if (1 << i & ellipsisMask) { + if (1 << i2 & ellipsisMask) { ellipsisSeen = true; } } @@ -9960,56 +9376,56 @@ function sliceInfo(xShape, begin, end, strides, beginMask, endMask, ellipsisMask let isSimpleSlice = true; const processingShape = []; const finalShape = []; - for (let i = 0; i < xShape.length; ++i) { - if (denseSpec.strides[i] === 0) { - throw Error(`strides[${i}] must be non-zero`); + for (let i2 = 0; i2 < xShape.length; ++i2) { + if (denseSpec.strides[i2] === 0) { + throw Error(`strides[${i2}] must be non-zero`); } - const shrinkI = !!(denseSpec.shrinkAxisMask & 1 << i); - const dimI = xShape[i]; + const shrinkI = !!(denseSpec.shrinkAxisMask & 1 << i2); + const dimI = xShape[i2]; if (dimI === -1) { processingShape.push(shrinkI ? 1 : -1); continue; } - const masks = [denseSpec.beginMask & 1 << i, denseSpec.endMask & 1 << i]; + const masks = [denseSpec.beginMask & 1 << i2, denseSpec.endMask & 1 << i2]; const validRange = [ - denseSpec.strides[i] > 0 ? 0 : -1, - denseSpec.strides[i] > 0 ? dimI : dimI - 1 + denseSpec.strides[i2] > 0 ? 0 : -1, + denseSpec.strides[i2] > 0 ? dimI : dimI - 1 ]; - if (shrinkI && denseSpec.strides[i] <= 0) { + if (shrinkI && denseSpec.strides[i2] <= 0) { throw Error("only stride 1 allowed on non-range indexing."); } - isSimpleSlice = isSimpleSlice && denseSpec.strides[i] === 1; - const beginAndEndMasked = !!(denseSpec.beginMask & 1 << i && denseSpec.endMask & 1 << i); + isSimpleSlice = isSimpleSlice && denseSpec.strides[i2] === 1; + const beginAndEndMasked = !!(denseSpec.beginMask & 1 << i2 && denseSpec.endMask & 1 << i2); if (denseSpec.beginValid && denseSpec.endValid) { if (shrinkI) { - const xFwd = denseSpec.begin[i] < 0 ? dimI + denseSpec.begin[i] : denseSpec.begin[i]; - denseSpec.begin[i] = xFwd; - denseSpec.end[i] = denseSpec.begin[i] + 1; + const xFwd = denseSpec.begin[i2] < 0 ? dimI + denseSpec.begin[i2] : denseSpec.begin[i2]; + denseSpec.begin[i2] = xFwd; + denseSpec.end[i2] = denseSpec.begin[i2] + 1; if (xFwd < 0 || xFwd >= dimI) { - throw Error(`slice index ${denseSpec.begin[i]} of dimension ${i} out of bounds.`); + throw Error(`slice index ${denseSpec.begin[i2]} of dimension ${i2} out of bounds.`); } } else { - denseSpec.begin[i] = canonical(denseSpec.begin[i], 0, denseSpec.strides[i], dimI, masks, validRange); - denseSpec.end[i] = canonical(denseSpec.end[i], 1, denseSpec.strides[i], dimI, masks, validRange); + denseSpec.begin[i2] = canonical(denseSpec.begin[i2], 0, denseSpec.strides[i2], dimI, masks, validRange); + denseSpec.end[i2] = canonical(denseSpec.end[i2], 1, denseSpec.strides[i2], dimI, masks, validRange); } - const takeAllInDimension = denseSpec.strides[i] === 1 && denseSpec.begin[i] === 0 && denseSpec.end[i] === dimI; + const takeAllInDimension = denseSpec.strides[i2] === 1 && denseSpec.begin[i2] === 0 && denseSpec.end[i2] === dimI; isIdentity = isIdentity && takeAllInDimension; - sliceDim0 = sliceDim0 && (i === 0 && denseSpec.strides[i] === 1 || takeAllInDimension); + sliceDim0 = sliceDim0 && (i2 === 0 && denseSpec.strides[i2] === 1 || takeAllInDimension); } else { - isIdentity = isIdentity && (denseSpec.strides[i] === 1 && beginAndEndMasked); - sliceDim0 = sliceDim0 && (i === 0 && denseSpec.strides[i] === 1 || beginAndEndMasked); + isIdentity = isIdentity && (denseSpec.strides[i2] === 1 && beginAndEndMasked); + sliceDim0 = sliceDim0 && (i2 === 0 && denseSpec.strides[i2] === 1 || beginAndEndMasked); } let intervalLength; let knownInterval = false; if (denseSpec.beginValid && denseSpec.endValid) { - intervalLength = denseSpec.end[i] - denseSpec.begin[i]; + intervalLength = denseSpec.end[i2] - denseSpec.begin[i2]; knownInterval = true; } else if (shrinkI) { intervalLength = 1; knownInterval = true; } else if (beginAndEndMasked) { if (dimI >= 0) { - if (denseSpec.strides[i] < 0) { + if (denseSpec.strides[i2] < 0) { intervalLength = -dimI; } else { intervalLength = dimI; @@ -10019,10 +9435,10 @@ function sliceInfo(xShape, begin, end, strides, beginMask, endMask, ellipsisMask } if (knownInterval) { let sizeI; - if (intervalLength === 0 || intervalLength < 0 !== denseSpec.strides[i] < 0) { + if (intervalLength === 0 || intervalLength < 0 !== denseSpec.strides[i2] < 0) { sizeI = 0; } else { - sizeI = Math.trunc(intervalLength / denseSpec.strides[i]) + (intervalLength % denseSpec.strides[i] !== 0 ? 1 : 0); + sizeI = Math.trunc(intervalLength / denseSpec.strides[i2]) + (intervalLength % denseSpec.strides[i2] !== 0 ? 1 : 0); } processingShape.push(sizeI); } else { @@ -10037,7 +9453,7 @@ function sliceInfo(xShape, begin, end, strides, beginMask, endMask, ellipsisMask finalShape.push(1); } } - const finalShapeSparse = finalShape.filter((dim, i) => denseSpec.finalShapeGatherIndices[i] !== NEW_AXIS); + const finalShapeSparse = finalShape.filter((dim, i2) => denseSpec.finalShapeGatherIndices[i2] !== NEW_AXIS); return { finalShapeSparse, finalShape, @@ -10062,9 +9478,9 @@ function buildDenseSpec(sparse2, dense2) { dense2.finalShapeGatherIndices = []; dense2.finalShapeGatherIndicesSparse = []; dense2.inputShapeGatherIndicesSparse = new Array(dense2.dims); - for (let i = 0; i < sparse2.dims; i++) { - if (1 << i & sparse2.ellipsisMask) { - const nextIndex = Math.min(dense2.dims - (sparse2.dims - i) + 1 + sparse2.numAddAxisAfterEllipsis, dense2.dims); + for (let i2 = 0; i2 < sparse2.dims; i2++) { + if (1 << i2 & sparse2.ellipsisMask) { + const nextIndex = Math.min(dense2.dims - (sparse2.dims - i2) + 1 + sparse2.numAddAxisAfterEllipsis, dense2.dims); for (; fullIndex < nextIndex; fullIndex++) { dense2.begin[fullIndex] = 0; dense2.end[fullIndex] = 0; @@ -10073,9 +9489,9 @@ function buildDenseSpec(sparse2, dense2) { dense2.endMask |= 1 << fullIndex; dense2.finalShapeGatherIndices.push(fullIndex); dense2.finalShapeGatherIndicesSparse.push(-1); - dense2.inputShapeGatherIndicesSparse[fullIndex] = i; + dense2.inputShapeGatherIndicesSparse[fullIndex] = i2; } - } else if (1 << i & sparse2.newAxisMask) { + } else if (1 << i2 & sparse2.newAxisMask) { dense2.finalShapeGatherIndices.push(NEW_AXIS); dense2.finalShapeGatherIndicesSparse.push(-1); } else { @@ -10083,27 +9499,27 @@ function buildDenseSpec(sparse2, dense2) { throw Error(`Index out of range using input dim ${fullIndex}; input has only ${dense2.dims} dims, ${dense2.begin.length}.`); } if (sparse2.begin != null) { - dense2.begin[fullIndex] = sparse2.begin[i]; + dense2.begin[fullIndex] = sparse2.begin[i2]; } if (sparse2.end != null) { - dense2.end[fullIndex] = sparse2.end[i]; + dense2.end[fullIndex] = sparse2.end[i2]; } - dense2.strides[fullIndex] = sparse2.strides[i]; - if (sparse2.beginMask & 1 << i) { + dense2.strides[fullIndex] = sparse2.strides[i2]; + if (sparse2.beginMask & 1 << i2) { dense2.beginMask |= 1 << fullIndex; } - if (sparse2.endMask & 1 << i) { + if (sparse2.endMask & 1 << i2) { dense2.endMask |= 1 << fullIndex; } - if (sparse2.shrinkAxisMask & 1 << i) { + if (sparse2.shrinkAxisMask & 1 << i2) { dense2.finalShapeGatherIndices.push(SHRINK_AXIS); dense2.finalShapeGatherIndicesSparse.push(-1); dense2.shrinkAxisMask |= 1 << fullIndex; } else { dense2.finalShapeGatherIndices.push(fullIndex); - dense2.finalShapeGatherIndicesSparse.push(i); + dense2.finalShapeGatherIndicesSparse.push(i2); } - dense2.inputShapeGatherIndicesSparse[fullIndex] = i; + dense2.inputShapeGatherIndicesSparse[fullIndex] = i2; fullIndex++; } } @@ -10117,7 +9533,7 @@ function canonical(x, c, strideI, dimI, masks, validRange) { } } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/serialization.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/serialization.js var serialization_exports = {}; __export(serialization_exports, { Serializable: () => Serializable, @@ -10153,7 +9569,7 @@ function registerClass(cls) { SerializationMap.register(cls); } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/test_util.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/test_util.js var test_util_exports = {}; __export(test_util_exports, { TEST_EPSILON_FLOAT16: () => TEST_EPSILON_FLOAT16, @@ -10208,11 +9624,11 @@ function expectArraysPredicate(actual, expected, predicate) { Actual: ${actualFlat}. Expected: ${expectedFlat}.`); } - for (let i = 0; i < expectedFlat.length; ++i) { - const a = actualFlat[i]; - const e = expectedFlat[i]; - if (!predicate(a, e)) { - throw new Error(`Arrays differ: actual[${i}] = ${a}, expected[${i}] = ${e}. + for (let i2 = 0; i2 < expectedFlat.length; ++i2) { + const a = actualFlat[i2]; + const e2 = expectedFlat[i2]; + if (!predicate(a, e2)) { + throw new Error(`Arrays differ: actual[${i2}] = ${a}, expected[${i2}] = ${e2}. Actual: ${actualFlat}. Expected: ${expectedFlat}.`); } @@ -10234,30 +9650,30 @@ function expectArraysEqual(actual, expected) { } return expectArraysPredicate(actual, expected, (a, b) => areClose(a, b, 0)); } -function expectNumbersClose(a, e, epsilon3) { +function expectNumbersClose(a, e2, epsilon3) { if (epsilon3 == null) { epsilon3 = testEpsilon(); } - if (!areClose(a, e, epsilon3)) { - throw new Error(`Numbers differ: actual === ${a}, expected === ${e}`); + if (!areClose(a, e2, epsilon3)) { + throw new Error(`Numbers differ: actual === ${a}, expected === ${e2}`); } if (typeof expect !== "undefined") { expect().nothing(); } } -function areClose(a, e, epsilon3) { - if (!isFinite(a) && !isFinite(e)) { +function areClose(a, e2, epsilon3) { + if (!isFinite(a) && !isFinite(e2)) { return true; } - if (isNaN(a) || isNaN(e) || Math.abs(a - e) > epsilon3) { + if (isNaN(a) || isNaN(e2) || Math.abs(a - e2) > epsilon3) { return false; } return true; } function expectValuesInRange(actual, low, high) { - for (let i = 0; i < actual.length; i++) { - if (actual[i] < low || actual[i] > high) { - throw new Error(`Value out of range:${actual[i]} low: ${low}, high: ${high}`); + for (let i2 = 0; i2 < actual.length; i2++) { + if (actual[i2] < low || actual[i2] > high) { + throw new Error(`Value out of range:${actual[i2]} low: ${low}, high: ${high}`); } } } @@ -10267,19 +9683,19 @@ function expectArrayBuffersEqual(actual, expected) { if (actualArray.length !== expectedArray.length) { throw new Error(`Expected ArrayBuffer to be of length ${expectedArray.length}, but it was ${actualArray.length}`); } - for (let i = 0; i < expectedArray.length; i++) { - if (actualArray[i] !== expectedArray[i]) { - throw new Error(`Expected ArrayBuffer value at ${i} to be ${expectedArray[i]} but got ${actualArray[i]} instead`); + for (let i2 = 0; i2 < expectedArray.length; i2++) { + if (actualArray[i2] !== expectedArray[i2]) { + throw new Error(`Expected ArrayBuffer value at ${i2} to be ${expectedArray[i2]} but got ${actualArray[i2]} instead`); } } } function encodeStrings(a) { - for (let i = 0; i < a.length; i++) { - const val = a[i]; + for (let i2 = 0; i2 < a.length; i2++) { + const val = a[i2]; if (Array.isArray(val)) { encodeStrings(val); } else { - a[i] = encodeString(val); + a[i2] = encodeString(val); } } return a; @@ -10310,10 +9726,10 @@ async function play(video) { } } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/version.js -var version = "3.20.0"; +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/version.js +var version = "3.21.0"; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/add.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/add.js function add_(a, b) { let $a = convertToTensor(a, "a", "add"); let $b = convertToTensor(b, "b", "add"); @@ -10323,7 +9739,7 @@ function add_(a, b) { } var add2 = op({ add_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/floorDiv.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/floorDiv.js function floorDiv_(a, b) { let $a = convertToTensor(a, "a", "floorDiv"); let $b = convertToTensor(b, "b", "floorDiv"); @@ -10333,7 +9749,7 @@ function floorDiv_(a, b) { } var floorDiv = op({ floorDiv_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/div.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/div.js function div_(a, b) { let $a = convertToTensor(a, "a", "div"); let $b = convertToTensor(b, "b", "div"); @@ -10347,7 +9763,7 @@ function div_(a, b) { } var div = op({ div_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/mul.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/mul.js function mul_(a, b) { let $a = convertToTensor(a, "a", "mul"); let $b = convertToTensor(b, "b", "mul"); @@ -10357,7 +9773,7 @@ function mul_(a, b) { } var mul = op({ mul_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/abs.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/abs.js function abs_(x) { const $x = convertToTensor(x, "x", "abs"); if ($x.dtype === "complex64") { @@ -10370,7 +9786,7 @@ function abs_(x) { } var abs = op({ abs_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/acos.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/acos.js function acos_(x) { const $x = convertToTensor(x, "x", "acos"); const inputs = { x: $x }; @@ -10378,7 +9794,7 @@ function acos_(x) { } var acos = op({ acos_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/acosh.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/acosh.js function acosh_(x) { const $x = convertToTensor(x, "x", "acosh"); const inputs = { x: $x }; @@ -10386,19 +9802,19 @@ function acosh_(x) { } var acosh = op({ acosh_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/add_n.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/add_n.js function addN_(tensors) { assert(Array.isArray(tensors), () => "The argument passed to tf.addN() must be a list of tensors"); assert(tensors.length >= 1, () => `Must pass at least one tensor to tf.addN(), but got ${tensors.length}`); - const $tensors = tensors.map((t, i) => convertToTensor(t, `tensors${i}`, "addN")); + const $tensors = tensors.map((t2, i2) => convertToTensor(t2, `tensors${i2}`, "addN")); const firstTensor = $tensors[0]; - $tensors.forEach((t) => { - if (t.dtype !== firstTensor.dtype) { + $tensors.forEach((t2) => { + if (t2.dtype !== firstTensor.dtype) { throw new Error("All tensors passed to tf.addN() must have the same dtype"); } }); - $tensors.forEach((t) => { - if (!arraysEqual(t.shape, firstTensor.shape)) { + $tensors.forEach((t2) => { + if (!arraysEqual(t2.shape, firstTensor.shape)) { throw new Error("All tensors passed to tf.addN() must have the same shape"); } }); @@ -10407,7 +9823,7 @@ function addN_(tensors) { } var addN = op({ addN_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/all.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/all.js function all_(x, axis = null, keepDims = false) { const $x = convertToTensor(x, "x", "all", "bool"); const inputs = { x: $x }; @@ -10416,7 +9832,7 @@ function all_(x, axis = null, keepDims = false) { } var all = op({ all_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/any.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/any.js function any_(x, axis = null, keepDims = false) { const $x = convertToTensor(x, "x", "any", "bool"); const inputs = { x: $x }; @@ -10425,7 +9841,7 @@ function any_(x, axis = null, keepDims = false) { } var any = op({ any_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/arg_max.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/arg_max.js function argMax_(x, axis = 0) { const $x = convertToTensor(x, "x", "argMax"); const inputs = { x: $x }; @@ -10434,7 +9850,7 @@ function argMax_(x, axis = 0) { } var argMax = op({ argMax_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/arg_min.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/arg_min.js function argMin_(x, axis = 0) { const $x = convertToTensor(x, "x", "argMin"); const inputs = { x: $x }; @@ -10443,7 +9859,7 @@ function argMin_(x, axis = 0) { } var argMin = op({ argMin_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/asin.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/asin.js function asin_(x) { const $x = convertToTensor(x, "x", "asin"); const inputs = { x: $x }; @@ -10451,7 +9867,7 @@ function asin_(x) { } var asin = op({ asin_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/asinh.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/asinh.js function asinh_(x) { const $x = convertToTensor(x, "x", "asinh"); const inputs = { x: $x }; @@ -10459,7 +9875,7 @@ function asinh_(x) { } var asinh = op({ asinh_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/atan.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/atan.js function atan_(x) { const $x = convertToTensor(x, "x", "atan"); const inputs = { x: $x }; @@ -10467,7 +9883,7 @@ function atan_(x) { } var atan = op({ atan_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/atan2.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/atan2.js function atan2_(a, b) { let $a = convertToTensor(a, "a", "atan2"); let $b = convertToTensor(b, "b", "atan2"); @@ -10477,7 +9893,7 @@ function atan2_(a, b) { } var atan2 = op({ atan2_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/atanh.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/atanh.js function atanh_(x) { const $x = convertToTensor(x, "x", "atanh"); const inputs = { x: $x }; @@ -10485,7 +9901,7 @@ function atanh_(x) { } var atanh = op({ atanh_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/conv_util.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/conv_util.js function computeDilation2DInfo(inputShape, filterShape, strides, pad3, dataFormat = "NHWC", dilations) { const inputChannels = inputShape[3]; const $filterShape = [...filterShape, inputChannels]; @@ -10799,7 +10215,7 @@ function checkPadOnDimRoundingMode(opDesc, pad3, dimRoundingMode) { } } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/reshape.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/reshape.js function reshape_(x, shape) { const $x = convertToTensor(x, "x", "reshape", "string_or_numeric"); const inputs = { x: $x }; @@ -10808,7 +10224,7 @@ function reshape_(x, shape) { } var reshape = op({ reshape_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/avg_pool.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/avg_pool.js function avgPool_(x, filterSize, strides, pad3, dimRoundingMode) { const $x = convertToTensor(x, "x", "avgPool", "float32"); const dilations = 1; @@ -10832,7 +10248,7 @@ function avgPool_(x, filterSize, strides, pad3, dimRoundingMode) { } var avgPool = op({ avgPool_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/avg_pool_3d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/avg_pool_3d.js function avgPool3d_(x, filterSize, strides, pad3, dimRoundingMode, dataFormat = "NDHWC") { const $x = convertToTensor(x, "x", "avgPool3d", "float32"); let x5D = $x; @@ -10855,7 +10271,7 @@ function avgPool3d_(x, filterSize, strides, pad3, dimRoundingMode, dataFormat = } var avgPool3d = op({ avgPool3d_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/concat.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/concat.js function concat_(tensors, axis = 0) { assert(tensors.length >= 1, () => "Pass at least one tensor to concat"); const $tensors = convertToTensorArray(tensors, "tensors", "concat", "string_or_numeric"); @@ -10876,7 +10292,7 @@ function concat_(tensors, axis = 0) { } var concat = op({ concat_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/sigmoid.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/sigmoid.js function sigmoid_(x) { const $x = convertToTensor(x, "x", "sigmoid", "float32"); const inputs = { x: $x }; @@ -10884,7 +10300,7 @@ function sigmoid_(x) { } var sigmoid = op({ sigmoid_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/slice.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/slice.js function slice_(x, begin, size) { const $x = convertToTensor(x, "x", "slice", "string_or_numeric"); if ($x.rank === 0) { @@ -10896,7 +10312,7 @@ function slice_(x, begin, size) { } var slice = op({ slice_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/tanh.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/tanh.js function tanh_(x) { const $x = convertToTensor(x, "x", "tanh", "float32"); const inputs = { x: $x }; @@ -10904,7 +10320,7 @@ function tanh_(x) { } var tanh2 = op({ tanh_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/basic_lstm_cell.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/basic_lstm_cell.js function basicLSTMCell_(forgetBias, lstmKernel, lstmBias, data, c, h) { const $forgetBias = convertToTensor(forgetBias, "forgetBias", "basicLSTMCell"); const $lstmKernel = convertToTensor(lstmKernel, "lstmKernel", "basicLSTMCell"); @@ -10918,17 +10334,17 @@ function basicLSTMCell_(forgetBias, lstmKernel, lstmBias, data, c, h) { const batchSize = res.shape[0]; const sliceCols = res.shape[1] / 4; const sliceSize = [batchSize, sliceCols]; - const i = slice(res, [0, 0], sliceSize); + const i2 = slice(res, [0, 0], sliceSize); const j = slice(res, [0, sliceCols], sliceSize); const f = slice(res, [0, sliceCols * 2], sliceSize); const o = slice(res, [0, sliceCols * 3], sliceSize); - const newC = add2(mul(sigmoid(i), tanh2(j)), mul($c, sigmoid(add2($forgetBias, f)))); + const newC = add2(mul(sigmoid(i2), tanh2(j)), mul($c, sigmoid(add2($forgetBias, f)))); const newH = mul(tanh2(newC), sigmoid(o)); return [newC, newH]; } var basicLSTMCell = op({ basicLSTMCell_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/batch_to_space_nd.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/batch_to_space_nd.js function batchToSpaceND_(x, blockShape, crops) { const $x = convertToTensor(x, "x", "batchToSpaceND"); const prod6 = blockShape.reduce((a, b) => a * b); @@ -10941,7 +10357,7 @@ function batchToSpaceND_(x, blockShape, crops) { } var batchToSpaceND = op({ batchToSpaceND_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/batchnorm_util.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/batchnorm_util.js function xAs4D(x) { let x4D; if (x.rank === 0 || x.rank === 1) { @@ -10956,7 +10372,7 @@ function xAs4D(x) { return x4D; } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/batchnorm.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/batchnorm.js function batchNorm_(x, mean5, variance, offset, scale2, varianceEpsilon) { if (varianceEpsilon == null) { varianceEpsilon = 1e-3; @@ -10989,7 +10405,7 @@ function batchNorm_(x, mean5, variance, offset, scale2, varianceEpsilon) { } var batchNorm = op({ batchNorm_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/batchnorm2d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/batchnorm2d.js function batchNorm2d_(x, mean5, variance, offset, scale2, varianceEpsilon) { const $x = convertToTensor(x, "x", "batchNorm"); const $mean = convertToTensor(mean5, "mean", "batchNorm"); @@ -11015,7 +10431,7 @@ function batchNorm2d_(x, mean5, variance, offset, scale2, varianceEpsilon) { } var batchNorm2d = op({ batchNorm2d_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/batchnorm3d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/batchnorm3d.js function batchNorm3d_(x, mean5, variance, offset, scale2, varianceEpsilon) { const $x = convertToTensor(x, "x", "batchNorm"); const $mean = convertToTensor(mean5, "mean", "batchNorm"); @@ -11041,7 +10457,7 @@ function batchNorm3d_(x, mean5, variance, offset, scale2, varianceEpsilon) { } var batchNorm3d = op({ batchNorm3d_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/batchnorm4d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/batchnorm4d.js function batchNorm4d_(x, mean5, variance, offset, scale2, varianceEpsilon) { const $x = convertToTensor(x, "x", "batchNorm"); const $mean = convertToTensor(mean5, "mean", "batchNorm"); @@ -11067,7 +10483,7 @@ function batchNorm4d_(x, mean5, variance, offset, scale2, varianceEpsilon) { } var batchNorm4d = op({ batchNorm4d_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/bincount.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/bincount.js function bincount_(x, weights, size) { const $x = convertToTensor(x, "x", "bincount"); const $weights = convertToTensor(weights, "weights", "bincount"); @@ -11080,7 +10496,7 @@ function bincount_(x, weights, size) { } var bincount = op({ bincount_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/broadcast_args.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/broadcast_args.js function broadcastArgs_(s0, s1) { const shape1Input = convertToTensor(s0, "s0", "broadcastArgs", "int32"); const shape2Input = convertToTensor(s1, "s1", "broadcastArgs", "int32"); @@ -11095,7 +10511,7 @@ function broadcastArgs_(s0, s1) { } var broadcastArgs = op({ broadcastArgs_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/broadcast_to.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/broadcast_to.js function broadcastTo_(x, shape) { let input2 = convertToTensor(x, "broadcastTo", "x"); const xShape = input2.shape; @@ -11114,14 +10530,14 @@ function broadcastTo_(x, shape) { } const inputShape = input2.shape; const reps = Array.from(shape); - for (let i = shape.length - 1; i >= 0; i--) { - if (inputShape[i] === shape[i]) { - reps[i] = 1; - } else if (input2.shape[i] !== 1) { + for (let i2 = shape.length - 1; i2 >= 0; i2--) { + if (inputShape[i2] === shape[i2]) { + reps[i2] = 1; + } else if (input2.shape[i2] !== 1) { throw new Error(`broadcastTo(): [${xShape}] cannot be broadcast to [${shape}].`); } } - const axes = reps.map((n, i) => n > 1 ? i : -1).filter((i) => i >= 0); + const axes = reps.map((n2, i2) => n2 > 1 ? i2 : -1).filter((i2) => i2 >= 0); if (axes.length === 0) { return clone(input2); } @@ -11131,7 +10547,7 @@ function broadcastTo_(x, shape) { } var broadcastTo = op({ broadcastTo_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/ceil.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/ceil.js function ceil_(x) { const $x = convertToTensor(x, "x", "ceil", "float32"); const inputs = { x: $x }; @@ -11139,41 +10555,50 @@ function ceil_(x) { } var ceil = op({ ceil_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/clip_by_value.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/fill.js +function fill(shape, value, dtype) { + const attrs = { shape, value, dtype }; + return ENGINE.runKernel(Fill, {}, attrs); +} + +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/clip_by_value.js function clipByValue_(x, clipValueMin, clipValueMax) { const $x = convertToTensor(x, "x", "clipByValue"); assert(clipValueMin <= clipValueMax, () => `Error in clip: min (${clipValueMin}) must be less than or equal to max (${clipValueMax}).`); + if (clipValueMin === clipValueMax) { + return fill($x.shape, clipValueMin, $x.dtype); + } const inputs = { x: $x }; const attrs = { clipValueMin, clipValueMax }; return ENGINE.runKernel(ClipByValue, inputs, attrs); } var clipByValue = op({ clipByValue_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/concat_1d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/concat_1d.js function concat1d_(tensors) { return concat(tensors, 0); } var concat1d = op({ concat1d_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/concat_2d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/concat_2d.js function concat2d_(tensors, axis) { return concat(tensors, axis); } var concat2d = op({ concat2d_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/concat_3d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/concat_3d.js function concat3d_(tensors, axis) { return concat(tensors, axis); } var concat3d = op({ concat3d_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/concat_4d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/concat_4d.js function concat4d_(tensors, axis) { return concat(tensors, axis); } var concat4d = op({ concat4d_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/conv2d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/conv2d.js function conv2d_(x, filter, strides, pad3, dataFormat = "NHWC", dilations = [1, 1], dimRoundingMode) { const $x = convertToTensor(x, "x", "conv2d", "float32"); const $filter = convertToTensor(filter, "filter", "conv2d", "float32"); @@ -11199,7 +10624,7 @@ function conv2d_(x, filter, strides, pad3, dataFormat = "NHWC", dilations = [1, } var conv2d = op({ conv2d_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/conv1d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/conv1d.js function conv1d_(x, filter, stride, pad3, dataFormat = "NWC", dilation = 1, dimRoundingMode) { const $x = convertToTensor(x, "x", "conv1d"); const $filter = convertToTensor(filter, "filter", "conv1d"); @@ -11228,7 +10653,7 @@ function conv1d_(x, filter, stride, pad3, dataFormat = "NWC", dilation = 1, dimR } var conv1d = op({ conv1d_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/conv2d_backprop_input.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/conv2d_backprop_input.js function conv2DBackpropInput_(xShape, dy, filter, strides, pad3, dataFormat = "NHWC", dimRoundingMode) { assert(xShape.length === dy.rank, () => `Length of inShape (${xShape.length}) and rank of dy (${dy.rank}) must match`); let xShape4D = xShape; @@ -11257,7 +10682,7 @@ function conv2DBackpropInput_(xShape, dy, filter, strides, pad3, dataFormat = "N } var conv2DBackpropInput = op({ conv2DBackpropInput_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/conv2d_transpose.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/conv2d_transpose.js function conv2dTranspose_(x, filter, outputShape, strides, pad3, dimRoundingMode) { const $x = convertToTensor(x, "x", "conv2dTranspose"); const $filter = convertToTensor(filter, "filter", "conv2dTranspose"); @@ -11265,7 +10690,7 @@ function conv2dTranspose_(x, filter, outputShape, strides, pad3, dimRoundingMode } var conv2dTranspose = op({ conv2dTranspose_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/conv3d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/conv3d.js function conv3d_(x, filter, strides, pad3, dataFormat = "NDHWC", dilations = [1, 1, 1]) { const $x = convertToTensor(x, "x", "conv3d"); const $filter = convertToTensor(filter, "filter", "conv3d"); @@ -11290,7 +10715,7 @@ function conv3d_(x, filter, strides, pad3, dataFormat = "NDHWC", dilations = [1, } var conv3d = op({ conv3d_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/conv3d_backprop_input.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/conv3d_backprop_input.js function conv3DBackpropInput_(xShape, dy, filter, strides, pad3) { assert(xShape.length === dy.rank, () => `Length of inShape (${xShape.length}) and rank of dy (${dy.rank}) must match`); let xShape5D = xShape; @@ -11318,7 +10743,7 @@ function conv3DBackpropInput_(xShape, dy, filter, strides, pad3) { } var conv3DBackpropInput = op({ conv3DBackpropInput_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/conv3d_transpose.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/conv3d_transpose.js function conv3dTranspose_(x, filter, outputShape, strides, pad3) { const $x = convertToTensor(x, "x", "conv3dTranspose"); const $filter = convertToTensor(filter, "filter", "conv3dTranspose"); @@ -11326,7 +10751,7 @@ function conv3dTranspose_(x, filter, outputShape, strides, pad3) { } var conv3dTranspose = op({ conv3dTranspose_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/cos.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/cos.js function cos_(x) { const $x = convertToTensor(x, "x", "cos", "float32"); const inputs = { x: $x }; @@ -11334,7 +10759,7 @@ function cos_(x) { } var cos = op({ cos_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/cosh.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/cosh.js function cosh_(x) { const $x = convertToTensor(x, "x", "cosh", "float32"); const inputs = { x: $x }; @@ -11342,7 +10767,7 @@ function cosh_(x) { } var cosh = op({ cosh_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/cumprod.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/cumprod.js function cumprod_(x, axis = 0, exclusive = false, reverse5 = false) { const $x = convertToTensor(x, "x", "cumprod"); const inputs = { x: $x }; @@ -11351,7 +10776,7 @@ function cumprod_(x, axis = 0, exclusive = false, reverse5 = false) { } var cumprod = op({ cumprod_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/cumsum.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/cumsum.js function cumsum_(x, axis = 0, exclusive = false, reverse5 = false) { const $x = convertToTensor(x, "x", "cumsum"); const inputs = { x: $x }; @@ -11360,7 +10785,7 @@ function cumsum_(x, axis = 0, exclusive = false, reverse5 = false) { } var cumsum = op({ cumsum_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/dense_bincount.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/dense_bincount.js function denseBincount_(x, weights, size, binaryOutput = false) { const $x = convertToTensor(x, "x", "denseBincount"); const $weights = convertToTensor(weights, "weights", "denseBincount"); @@ -11374,7 +10799,7 @@ function denseBincount_(x, weights, size, binaryOutput = false) { } var denseBincount = op({ denseBincount_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/depth_to_space.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/depth_to_space.js function depthToSpace_(x, blockSize, dataFormat = "NHWC") { const $x = convertToTensor(x, "x", "depthToSpace", "float32"); const inputHeight = dataFormat === "NHWC" ? $x.shape[1] : $x.shape[2]; @@ -11394,7 +10819,7 @@ function depthToSpace_(x, blockSize, dataFormat = "NHWC") { } var depthToSpace = op({ depthToSpace_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/depthwise_conv2d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/depthwise_conv2d.js function depthwiseConv2d_(x, filter, strides, pad3, dataFormat = "NHWC", dilations = [1, 1], dimRoundingMode) { const $x = convertToTensor(x, "x", "depthwiseConv2d", "float32"); const $filter = convertToTensor(filter, "filter", "depthwiseConv2d", "float32"); @@ -11419,7 +10844,7 @@ function depthwiseConv2d_(x, filter, strides, pad3, dataFormat = "NHWC", dilatio } var depthwiseConv2d = op({ depthwiseConv2d_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/diag.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/diag.js function diag_(x) { const $x = convertToTensor(x, "x", "diag"); const inputs = { x: $x }; @@ -11427,7 +10852,7 @@ function diag_(x) { } var diag = op({ diag_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/dilation2d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/dilation2d.js function dilation2d_(x, filter, strides, pad3, dilations = [1, 1], dataFormat = "NHWC") { const $x = convertToTensor(x, "x", "dilation2d"); const $filter = convertToTensor(filter, "filter", "dilation2d"); @@ -11450,7 +10875,7 @@ function dilation2d_(x, filter, strides, pad3, dilations = [1, 1], dataFormat = } var dilation2d = op({ dilation2d_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/equal.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/equal.js function equal_(a, b) { let $a = convertToTensor(a, "a", "equal", "string_or_numeric"); let $b = convertToTensor(b, "b", "equal", "string_or_numeric"); @@ -11461,7 +10886,7 @@ function equal_(a, b) { } var equal = op({ equal_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/where.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/where.js function where_(condition, a, b) { const $a = convertToTensor(a, "a", "where"); const $b = convertToTensor(b, "b", "where"); @@ -11479,7 +10904,7 @@ function where_(condition, a, b) { } var where = op({ where_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/zeros_like.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/zeros_like.js function zerosLike_(x) { const $x = convertToTensor(x, "x", "zerosLike"); const inputs = { x: $x }; @@ -11487,7 +10912,7 @@ function zerosLike_(x) { } var zerosLike = op({ zerosLike_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/div_no_nan.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/div_no_nan.js function divNoNan_(a, b) { let $a = convertToTensor(a, "a", "div"); let $b = convertToTensor(b, "b", "div"); @@ -11499,7 +10924,7 @@ function divNoNan_(a, b) { } var divNoNan = op({ divNoNan_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/dot.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/dot.js function dot_(t1, t2) { const $t1 = convertToTensor(t1, "t1", "dot"); const $t2 = convertToTensor(t2, "t2", "dot"); @@ -11529,15 +10954,15 @@ function dot_(t1, t2) { } var dot = op({ dot_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/einsum.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/einsum.js function einsum_(equation, ...tensors) { - const $tensors = tensors.map((t, i) => convertToTensor(t, `tensors${i}`, "einsum")); + const $tensors = tensors.map((t2, i2) => convertToTensor(t2, `tensors${i2}`, "einsum")); const attrs = { equation }; return ENGINE.runKernel(Einsum, $tensors, attrs); } var einsum = op({ einsum_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/elu.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/elu.js function elu_(x) { const $x = convertToTensor(x, "x", "elu", "float32"); const inputs = { x: $x }; @@ -11545,7 +10970,7 @@ function elu_(x) { } var elu = op({ elu_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/erf.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/erf.js function erf_(x) { let $x = convertToTensor(x, "x", "erf"); assert($x.dtype === "int32" || $x.dtype === "float32", () => "Input dtype must be `int32` or `float32`."); @@ -11557,10 +10982,10 @@ function erf_(x) { } var erf = op({ erf_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/axis_util.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/axis_util.js function axesAreInnerMostDims(axes, rank) { - for (let i = 0; i < axes.length; ++i) { - if (axes[axes.length - i - 1] !== rank - 1 - i) { + for (let i2 = 0; i2 < axes.length; ++i2) { + if (axes[axes.length - i2 - 1] !== rank - 1 - i2) { return false; } } @@ -11603,26 +11028,26 @@ function getAxesPermutation(axes, rank) { return null; } const result = []; - for (let i = 0; i < rank; ++i) { - if (axes.indexOf(i) === -1) { - result.push(i); + for (let i2 = 0; i2 < rank; ++i2) { + if (axes.indexOf(i2) === -1) { + result.push(i2); } } axes.forEach((axis) => result.push(axis)); return result; } function getUndoAxesPermutation(axes) { - return axes.map((axis, i) => [i, axis]).sort((a, b) => a[1] - b[1]).map((x) => x[0]); + return axes.map((axis, i2) => [i2, axis]).sort((a, b) => a[1] - b[1]).map((x) => x[0]); } function getInnerMostAxes(numAxes, rank) { const res = []; - for (let i = rank - numAxes; i < rank; ++i) { - res.push(i); + for (let i2 = rank - numAxes; i2 < rank; ++i2) { + res.push(i2); } return res; } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/max.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/max.js function max_(x, axis = null, keepDims = false) { const $x = convertToTensor(x, "x", "max"); const inputs = { x: $x }; @@ -11631,7 +11056,7 @@ function max_(x, axis = null, keepDims = false) { } var max = op({ max_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/min.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/min.js function min_(x, axis = null, keepDims = false) { const $x = convertToTensor(x, "x", "min"); const inputs = { x: $x }; @@ -11640,7 +11065,7 @@ function min_(x, axis = null, keepDims = false) { } var min = op({ min_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/pow.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/pow.js function pow_(base, exp5) { let $base = convertToTensor(base, "base", "pow"); let $exp = convertToTensor(exp5, "exp", "pow"); @@ -11650,7 +11075,7 @@ function pow_(base, exp5) { } var pow = op({ pow_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/scalar.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/scalar.js function scalar(value, dtype) { if ((isTypedArray(value) && dtype !== "string" || Array.isArray(value)) && dtype !== "complex64") { throw new Error("Error creating a new Scalar: value must be a primitive (number|boolean|string)"); @@ -11663,7 +11088,7 @@ function scalar(value, dtype) { return makeTensor(value, shape, inferredShape, dtype); } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/sqrt.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/sqrt.js function sqrt_(x) { const $x = convertToTensor(x, "x", "sqrt", "float32"); const inputs = { x: $x }; @@ -11671,7 +11096,7 @@ function sqrt_(x) { } var sqrt = op({ sqrt_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/square.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/square.js function square_(x) { const $x = convertToTensor(x, "x", "square"); const attrs = {}; @@ -11679,7 +11104,7 @@ function square_(x) { } var square = op({ square_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/sum.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/sum.js function sum_(x, axis = null, keepDims = false) { let $x = convertToTensor(x, "x", "sum"); if ($x.dtype === "bool") { @@ -11691,7 +11116,7 @@ function sum_(x, axis = null, keepDims = false) { } var sum2 = op({ sum_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/norm.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/norm.js function norm_(x, ord = "euclidean", axis = null, keepDims = false) { x = convertToTensor(x, "x", "norm"); const norm2 = normImpl(x, ord, axis); @@ -11743,13 +11168,13 @@ function normImpl(x, p2, axis = null) { } var norm = op({ norm_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/euclidean_norm.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/euclidean_norm.js function euclideanNorm_(x, axis = null, keepDims = false) { return norm(x, "euclidean", axis, keepDims); } var euclideanNorm = op({ euclideanNorm_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/exp.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/exp.js function exp_(x) { const $x = convertToTensor(x, "x", "exp"); const inputs = { x: $x }; @@ -11757,7 +11182,7 @@ function exp_(x) { } var exp = op({ exp_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/expand_dims.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/expand_dims.js function expandDims_(x, axis = 0) { const $x = convertToTensor(x, "x", "expandDims", "string_or_numeric"); assert(axis <= $x.rank, () => "Axis must be <= rank of the tensor"); @@ -11767,7 +11192,7 @@ function expandDims_(x, axis = 0) { } var expandDims = op({ expandDims_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/expm1.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/expm1.js function expm1_(x) { const $x = convertToTensor(x, "x", "expm1"); const inputs = { x: $x }; @@ -11775,7 +11200,7 @@ function expm1_(x) { } var expm1 = op({ expm1_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/tile.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/tile.js function tile_(x, reps) { const $x = convertToTensor(x, "x", "tile", "string_or_numeric"); assert($x.rank === reps.length, () => `Error in transpose: rank of input ${$x.rank} must match length of reps ${reps}.`); @@ -11785,15 +11210,15 @@ function tile_(x, reps) { } var tile = op({ tile_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/eye.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/eye.js function eye_(numRows, numColumns, batchShape, dtype = "float32") { if (numColumns == null) { numColumns = numRows; } const buff = buffer([numRows, numColumns], dtype); - const n = numRows <= numColumns ? numRows : numColumns; - for (let i = 0; i < n; ++i) { - buff.set(1, i, i); + const n2 = numRows <= numColumns ? numRows : numColumns; + for (let i2 = 0; i2 < n2; ++i2) { + buff.set(1, i2, i2); } const out = reshape(buff.toTensor(), [numRows, numColumns]); if (batchShape == null) { @@ -11818,13 +11243,7 @@ function eye_(numRows, numColumns, batchShape, dtype = "float32") { } var eye = op({ eye_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/fill.js -function fill(shape, value, dtype) { - const attrs = { shape, value, dtype }; - return ENGINE.runKernel(Fill, {}, attrs); -} - -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/floor.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/floor.js function floor_(x) { const $x = convertToTensor(x, "x", "floor", "float32"); const inputs = { x: $x }; @@ -11832,7 +11251,7 @@ function floor_(x) { } var floor = op({ floor_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/gather.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/gather.js function gather_(x, indices, axis = 0, batchDims = 0) { const $x = convertToTensor(x, "x", "gather"); const $indices = convertToTensor(indices, "indices", "gather", "int32"); @@ -11842,7 +11261,7 @@ function gather_(x, indices, axis = 0, batchDims = 0) { } var gather = op({ gather_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/greater.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/greater.js function greater_(a, b) { let $a = convertToTensor(a, "a", "greater", "string_or_numeric"); let $b = convertToTensor(b, "b", "greater", "string_or_numeric"); @@ -11853,7 +11272,7 @@ function greater_(a, b) { } var greater = op({ greater_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/greater_equal.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/greater_equal.js function greaterEqual_(a, b) { let $a = convertToTensor(a, "a", "greaterEqual", "string_or_numeric"); let $b = convertToTensor(b, "b", "greaterEqual", "string_or_numeric"); @@ -11864,7 +11283,7 @@ function greaterEqual_(a, b) { } var greaterEqual = op({ greaterEqual_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/is_finite.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/is_finite.js function isFinite_(x) { const $x = convertToTensor(x, "x", "isFinite"); const inputs = { x: $x }; @@ -11872,7 +11291,7 @@ function isFinite_(x) { } var isFinite2 = op({ isFinite_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/is_inf.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/is_inf.js function isInf_(x) { const $x = convertToTensor(x, "x", "isInf"); const inputs = { x: $x }; @@ -11880,7 +11299,7 @@ function isInf_(x) { } var isInf = op({ isInf_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/is_nan.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/is_nan.js function isNaN_(x) { const $x = convertToTensor(x, "x", "isNaN"); const inputs = { x: $x }; @@ -11888,7 +11307,7 @@ function isNaN_(x) { } var isNaN2 = op({ isNaN_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/leaky_relu.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/leaky_relu.js function leakyRelu_(x, alpha = 0.2) { const $x = convertToTensor(x, "x", "leakyRelu"); const inputs = { x: $x }; @@ -11897,7 +11316,7 @@ function leakyRelu_(x, alpha = 0.2) { } var leakyRelu = op({ leakyRelu_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/less.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/less.js function less_(a, b) { let $a = convertToTensor(a, "a", "less", "string_or_numeric"); let $b = convertToTensor(b, "b", "less", "string_or_numeric"); @@ -11908,7 +11327,7 @@ function less_(a, b) { } var less = op({ less_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/less_equal.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/less_equal.js function lessEqual_(a, b) { let $a = convertToTensor(a, "a", "lessEqual", "string_or_numeric"); let $b = convertToTensor(b, "b", "lessEqual", "string_or_numeric"); @@ -11919,7 +11338,7 @@ function lessEqual_(a, b) { } var lessEqual = op({ lessEqual_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/linspace.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/linspace.js function linspace(start, stop, num) { if (num <= 0) { throw new Error("The number of values should be positive."); @@ -11928,7 +11347,7 @@ function linspace(start, stop, num) { return ENGINE.runKernel(LinSpace, {}, attrs); } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/local_response_normalization.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/local_response_normalization.js function localResponseNormalization_(x, depthRadius = 5, bias = 1, alpha = 1, beta = 0.5) { const $x = convertToTensor(x, "x", "localResponseNormalization"); assert($x.rank === 4 || $x.rank === 3, () => `Error in localResponseNormalization: x must be rank 3 or 4 but got @@ -11951,7 +11370,7 @@ function localResponseNormalization_(x, depthRadius = 5, bias = 1, alpha = 1, be } var localResponseNormalization = op({ localResponseNormalization_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/log.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/log.js function log_(x) { const $x = convertToTensor(x, "x", "log", "float32"); const inputs = { x: $x }; @@ -11959,7 +11378,7 @@ function log_(x) { } var log2 = op({ log_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/log1p.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/log1p.js function log1p_(x) { const $x = convertToTensor(x, "x", "log1p"); const inputs = { x: $x }; @@ -11967,7 +11386,7 @@ function log1p_(x) { } var log1p = op({ log1p_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients.js function grad(f) { assert(isFunction(f), () => "The f passed in grad(f) must be a function"); return (x, dy) => { @@ -12041,9 +11460,9 @@ function variableGrads(f, varList) { assert(grads2.some((g) => g != null), () => "Cannot find a connection between any variable and the result of the loss function y=f(x). Please make sure the operations that use variables are inside the function f passed to minimize()."); assert(value.rank === 0, () => `The f passed in variableGrads(f) must return a scalar, but it returned a rank-${value.rank} tensor`); const namedGrads = {}; - varList.forEach((v, i) => { - if (grads2[i] != null) { - namedGrads[v.name] = grads2[i]; + varList.forEach((v, i2) => { + if (grads2[i2] != null) { + namedGrads[v.name] = grads2[i2]; } }); if (specifiedNonTrainable != null) { @@ -12062,7 +11481,7 @@ function checkGrads(grads2) { } } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/softplus.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/softplus.js function softplus_(x) { const $x = convertToTensor(x, "x", "softplus"); const inputs = { x: $x }; @@ -12070,7 +11489,7 @@ function softplus_(x) { } var softplus = op({ softplus_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/log_sigmoid.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/log_sigmoid.js function logSigmoid_(x) { const $x = convertToTensor(x, "x", "logSigmoid"); const customOp = customGrad((x2) => { @@ -12085,7 +11504,7 @@ function logSigmoid_(x) { } var logSigmoid = op({ logSigmoid_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/sub.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/sub.js function sub_(a, b) { let $a = convertToTensor(a, "a", "sub"); let $b = convertToTensor(b, "b", "sub"); @@ -12095,7 +11514,7 @@ function sub_(a, b) { } var sub = op({ sub_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/log_softmax.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/log_softmax.js function logSoftmax_(logits, axis = -1) { const $logits = convertToTensor(logits, "logits", "logSoftmax"); if (axis === -1) { @@ -12122,7 +11541,7 @@ function logSoftmax_(logits, axis = -1) { } var logSoftmax = op({ logSoftmax_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/log_sum_exp.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/log_sum_exp.js function logSumExp_(x, axis = null, keepDims = false) { const $x = convertToTensor(x, "x", "logSumExp"); const axes = parseAxisParam(axis, $x.shape); @@ -12140,7 +11559,7 @@ function logSumExp_(x, axis = null, keepDims = false) { } var logSumExp = op({ logSumExp_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/logical_and.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/logical_and.js function logicalAnd_(a, b) { const $a = convertToTensor(a, "a", "logicalAnd", "bool"); const $b = convertToTensor(b, "b", "logicalAnd", "bool"); @@ -12150,7 +11569,7 @@ function logicalAnd_(a, b) { } var logicalAnd = op({ logicalAnd_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/logical_not.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/logical_not.js function logicalNot_(x) { const $x = convertToTensor(x, "x", "logicalNot", "bool"); const inputs = { x: $x }; @@ -12158,7 +11577,7 @@ function logicalNot_(x) { } var logicalNot = op({ logicalNot_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/logical_or.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/logical_or.js function logicalOr_(a, b) { const $a = convertToTensor(a, "a", "logicalOr", "bool"); const $b = convertToTensor(b, "b", "logicalOr", "bool"); @@ -12168,7 +11587,7 @@ function logicalOr_(a, b) { } var logicalOr = op({ logicalOr_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/logical_xor.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/logical_xor.js function logicalXor_(a, b) { const $a = convertToTensor(a, "a", "logicalXor", "bool"); const $b = convertToTensor(b, "b", "logicalXor", "bool"); @@ -12177,7 +11596,7 @@ function logicalXor_(a, b) { } var logicalXor = op({ logicalXor_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/search_sorted.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/search_sorted.js var INT32_MAX = 2147483648; function searchSorted_(sortedSequence, values, side = "left") { const $sortedSequence = convertToTensor(sortedSequence, "sortedSequence", "searchSorted"); @@ -12207,12 +11626,12 @@ function searchSorted_(sortedSequence, values, side = "left") { } var searchSorted = op({ searchSorted_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/lower_bound.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/lower_bound.js function lowerBound(sortedSequence, values) { return searchSorted(sortedSequence, values, "left"); } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/max_pool.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/max_pool.js function maxPool_(x, filterSize, strides, pad3, dimRoundingMode) { const $x = convertToTensor(x, "x", "maxPool"); const dilations = 1; @@ -12235,7 +11654,7 @@ function maxPool_(x, filterSize, strides, pad3, dimRoundingMode) { } var maxPool = op({ maxPool_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/max_pool_3d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/max_pool_3d.js function maxPool3d_(x, filterSize = [1, 1, 1], strides, pad3, dimRoundingMode, dataFormat = "NDHWC") { const $x = convertToTensor(x, "x", "maxPool3d"); let x5D = $x; @@ -12257,7 +11676,7 @@ function maxPool3d_(x, filterSize = [1, 1, 1], strides, pad3, dimRoundingMode, d } var maxPool3d = op({ maxPool3d_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/max_pool_with_argmax.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/max_pool_with_argmax.js function maxPoolWithArgmax_(x, filterSize, strides, pad3, includeBatchInIndex = false) { const $x = convertToTensor(x, "x", "maxPoolWithArgmax"); const inputs = { x: $x }; @@ -12267,7 +11686,7 @@ function maxPoolWithArgmax_(x, filterSize, strides, pad3, includeBatchInIndex = } var maxPoolWithArgmax = op({ maxPoolWithArgmax_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/maximum.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/maximum.js function maximum_(a, b) { let $a = convertToTensor(a, "a", "maximum"); let $b = convertToTensor(b, "b", "maximum"); @@ -12282,7 +11701,7 @@ function maximum_(a, b) { } var maximum = op({ maximum_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/mean.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/mean.js function mean_(x, axis = null, keepDims = false) { const $x = convertToTensor(x, "x", "mean"); const inputs = { x: $x }; @@ -12291,7 +11710,7 @@ function mean_(x, axis = null, keepDims = false) { } var mean = op({ mean_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/zeros.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/zeros.js function zeros(shape, dtype = "float32") { if (dtype === "complex64") { const real5 = zeros(shape, "float32"); @@ -12302,7 +11721,7 @@ function zeros(shape, dtype = "float32") { return ENGINE.makeTensor(values, shape, dtype); } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/ones.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/ones.js function ones2(shape, dtype = "float32") { if (dtype === "complex64") { const real5 = ones2(shape, "float32"); @@ -12313,7 +11732,7 @@ function ones2(shape, dtype = "float32") { return ENGINE.makeTensor(values, shape, dtype); } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/meshgrid.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/meshgrid.js function meshgrid(x, y, { indexing = "xy" } = {}) { if (indexing !== "xy" && indexing !== "ij") { throw new TypeError(`${indexing} is not a valid third argument to meshgrid`); @@ -12344,7 +11763,7 @@ function meshgrid(x, y, { indexing = "xy" } = {}) { ]; } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/minimum.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/minimum.js function minimum_(a, b) { let $a = convertToTensor(a, "a", "minimum"); let $b = convertToTensor(b, "b", "minimum"); @@ -12359,7 +11778,7 @@ function minimum_(a, b) { } var minimum = op({ minimum_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/mirror_pad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/mirror_pad.js function mirrorPad_(x, paddings, mode) { assert(mode === "reflect" || mode === "symmetric", () => `Invalid mode. Mode must be either reflect or symmetric. Got ${mode}.`); const $x = convertToTensor(x, "x", "mirrorPad"); @@ -12368,9 +11787,9 @@ function mirrorPad_(x, paddings, mode) { } assert(paddings.length === $x.rank, () => `Padding doesn't match input. Must be ${$x.rank}. Got ${paddings.length}.`); const shapeOffset = mode === "reflect" ? 1 : 0; - for (let i = 0; i < $x.rank; i++) { - assert(paddings[i].length === 2, () => `Invalid number of paddings. Must be length of 2 each.`); - assert(paddings[i][0] >= 0 && paddings[i][0] <= $x.shape[i] - shapeOffset && paddings[i][1] >= 0 && paddings[i][1] <= $x.shape[i] - shapeOffset, () => `Padding in dimension ${i} cannot be greater than or equal to ${$x.shape[i] - shapeOffset} or less than 0 for input of shape ${$x.shape}`); + for (let i2 = 0; i2 < $x.rank; i2++) { + assert(paddings[i2].length === 2, () => `Invalid number of paddings. Must be length of 2 each.`); + assert(paddings[i2][0] >= 0 && paddings[i2][0] <= $x.shape[i2] - shapeOffset && paddings[i2][1] >= 0 && paddings[i2][1] <= $x.shape[i2] - shapeOffset, () => `Padding in dimension ${i2} cannot be greater than or equal to ${$x.shape[i2] - shapeOffset} or less than 0 for input of shape ${$x.shape}`); } const attrs = { paddings, mode }; const inputs = { x: $x }; @@ -12378,7 +11797,7 @@ function mirrorPad_(x, paddings, mode) { } var mirrorPad = op({ mirrorPad_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/mod.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/mod.js function mod_(a, b) { let $a = convertToTensor(a, "a", "mod"); let $b = convertToTensor(b, "b", "mod"); @@ -12388,7 +11807,7 @@ function mod_(a, b) { } var mod = op({ mod_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/moments.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/moments.js function moments_(x, axis = null, keepDims = false) { x = convertToTensor(x, "x", "moments"); const axes = parseAxisParam(axis, x.shape); @@ -12403,30 +11822,30 @@ function moments_(x, axis = null, keepDims = false) { } var moments = op({ moments_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/multi_rnn_cell.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/multi_rnn_cell.js function multiRNNCell_(lstmCells, data, c, h) { const $data = convertToTensor(data, "data", "multiRNNCell"); const $c = convertToTensorArray(c, "c", "multiRNNCell"); const $h = convertToTensorArray(h, "h", "multiRNNCell"); let input2 = $data; const newStates = []; - for (let i = 0; i < lstmCells.length; i++) { - const output = lstmCells[i](input2, $c[i], $h[i]); + for (let i2 = 0; i2 < lstmCells.length; i2++) { + const output = lstmCells[i2](input2, $c[i2], $h[i2]); newStates.push(output[0]); newStates.push(output[1]); input2 = output[1]; } const newC = []; const newH = []; - for (let i = 0; i < newStates.length; i += 2) { - newC.push(newStates[i]); - newH.push(newStates[i + 1]); + for (let i2 = 0; i2 < newStates.length; i2 += 2) { + newC.push(newStates[i2]); + newH.push(newStates[i2 + 1]); } return [newC, newH]; } var multiRNNCell = op({ multiRNNCell_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/multinomial.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/multinomial.js function multinomial_(logits, numSamples, seed, normalized = false) { const $logits = convertToTensor(logits, "logits", "multinomial"); const numOutcomes = $logits.size; @@ -12446,7 +11865,7 @@ function multinomial_(logits, numSamples, seed, normalized = false) { } var multinomial = op({ multinomial_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/not_equal.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/not_equal.js function notEqual_(a, b) { let $a = convertToTensor(a, "a", "notEqual", "string_or_numeric"); let $b = convertToTensor(b, "b", "notEqual", "string_or_numeric"); @@ -12457,7 +11876,7 @@ function notEqual_(a, b) { } var notEqual = op({ notEqual_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/ones_like.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/ones_like.js function onesLike_(x) { const $x = convertToTensor(x, "x", "onesLike"); const inputs = { x: $x }; @@ -12465,7 +11884,7 @@ function onesLike_(x) { } var onesLike = op({ onesLike_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/outer_product.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/outer_product.js function outerProduct_(v1, v2) { const $v1 = convertToTensor(v1, "v1", "outerProduct"); const $v2 = convertToTensor(v2, "v2", "outerProduct"); @@ -12476,7 +11895,7 @@ function outerProduct_(v1, v2) { } var outerProduct = op({ outerProduct_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/pad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/pad.js function pad_(x, paddings, constantValue = 0) { const $x = convertToTensor(x, "x", "pad"); if ($x.rank === 0) { @@ -12488,42 +11907,42 @@ function pad_(x, paddings, constantValue = 0) { } var pad = op({ pad_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/pad1d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/pad1d.js function pad1d_(x, paddings, constantValue = 0) { assert(paddings.length === 2, () => "Invalid number of paddings. Must be length of 2."); return pad(x, [paddings], constantValue); } var pad1d = op({ pad1d_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/pad2d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/pad2d.js function pad2d_(x, paddings, constantValue = 0) { assert(paddings.length === 2 && paddings[0].length === 2 && paddings[1].length === 2, () => "Invalid number of paddings. Must be length of 2 each."); return pad(x, paddings, constantValue); } var pad2d = op({ pad2d_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/pad3d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/pad3d.js function pad3d_(x, paddings, constantValue = 0) { assert(paddings.length === 3 && paddings[0].length === 2 && paddings[1].length === 2 && paddings[2].length === 2, () => "Invalid number of paddings. Must be length of 2 each."); return pad(x, paddings, constantValue); } var pad3d = op({ pad3d_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/pad4d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/pad4d.js function pad4d_(x, paddings, constantValue = 0) { assert(paddings.length === 4 && paddings[0].length === 2 && paddings[1].length === 2 && paddings[2].length === 2 && paddings[3].length === 2, () => "Invalid number of paddings. Must be length of 2 each."); return pad(x, paddings, constantValue); } var pad4d = op({ pad4d_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/space_to_batch_nd.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/space_to_batch_nd.js function spaceToBatchND_(x, blockShape, paddings) { const $x = convertToTensor(x, "x", "spaceToBatchND"); assert($x.rank >= 1 + blockShape.length, () => `input rank ${$x.rank} should be > than [blockShape] ${blockShape.length}`); assert(paddings.length === blockShape.length, () => `paddings.shape[0] ${paddings.length} must be equal to [blockShape] ${blockShape.length}`); - assert($x.shape.reduce((a, b, i) => { - if (i > 0 && i <= blockShape.length) { - return a && (b + paddings[i - 1][0] + paddings[i - 1][1]) % blockShape[i - 1] === 0; + assert($x.shape.reduce((a, b, i2) => { + if (i2 > 0 && i2 <= blockShape.length) { + return a && (b + paddings[i2 - 1][0] + paddings[i2 - 1][1]) % blockShape[i2 - 1] === 0; } return a; }, true), () => `input spatial dimensions ${$x.shape.slice(1)} with paddings ${paddings.toString()} must be divisible by blockShapes ${blockShape.toString()}`); @@ -12533,7 +11952,7 @@ function spaceToBatchND_(x, blockShape, paddings) { } var spaceToBatchND = op({ spaceToBatchND_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/pool.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/pool.js function pool_(input2, windowShape, poolingType, pad3, dilations, strides, dimRoundingMode) { if (dilations == null) { dilations = [1, 1]; @@ -12576,26 +11995,26 @@ function requiredSpaceToBatchPaddings(inputShape, blockShape, basePadding) { const padStart = basePadding.map((b) => b[0]); const origPadEnd = basePadding.map((b) => b[1]); const fullInputShape = inputShape.concat(padStart, origPadEnd); - const padEndExtra = blockShape.map((b, i) => (b - fullInputShape[i] % b) % b); - const padEnd = origPadEnd.map((s, i) => s + padEndExtra[i]); - const paddings = blockShape.map((_, i) => [padStart[i], padEnd[i]]); - const crops = blockShape.map((_, i) => [0, padEndExtra[i]]); + const padEndExtra = blockShape.map((b, i2) => (b - fullInputShape[i2] % b) % b); + const padEnd = origPadEnd.map((s2, i2) => s2 + padEndExtra[i2]); + const paddings = blockShape.map((_, i2) => [padStart[i2], padEnd[i2]]); + const crops = blockShape.map((_, i2) => [0, padEndExtra[i2]]); return [paddings, crops]; } function withSpaceToBatchBasePaddings(filterShape, dilation) { - const dilatedFilterShape = filterShape.map((s, i) => { - return s + (s - 1) * (dilation[i] - 1); + const dilatedFilterShape = filterShape.map((s2, i2) => { + return s2 + (s2 - 1) * (dilation[i2] - 1); }); - const padExtraShape = dilatedFilterShape.map((s) => s - 1); - const padExtraStart = padExtraShape.map((s) => Math.floor(s / 2)); - const padExtraEnd = padExtraShape.map((s, i) => s - padExtraStart[i]); - return padExtraShape.map((_, i) => { - return [padExtraStart[i], padExtraEnd[i]]; + const padExtraShape = dilatedFilterShape.map((s2) => s2 - 1); + const padExtraStart = padExtraShape.map((s2) => Math.floor(s2 / 2)); + const padExtraEnd = padExtraShape.map((s2, i2) => s2 - padExtraStart[i2]); + return padExtraShape.map((_, i2) => { + return [padExtraStart[i2], padExtraEnd[i2]]; }); } var pool = op({ pool_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/prelu.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/prelu.js function prelu_(x, alpha) { const $x = convertToTensor(x, "x", "prelu"); const $alpha = convertToTensor(alpha, "alpha", "prelu"); @@ -12604,7 +12023,7 @@ function prelu_(x, alpha) { } var prelu = op({ prelu_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/prod.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/prod.js function prod_(x, axis = null, keepDims = false) { let $x = convertToTensor(x, "x", "prod"); if ($x.dtype === "bool") { @@ -12616,12 +12035,31 @@ function prod_(x, axis = null, keepDims = false) { } var prod = op({ prod_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/ragged_tensor_to_tensor.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/ragged_gather.js +function raggedGather_(paramsNestedSplits, paramsDenseValues, indices, outputRaggedRank) { + const $paramsNestedSplits = paramsNestedSplits.map((t2, i2) => convertToTensor(t2, `tensors${i2}`, "raggedGather", "int32")); + const $paramsDenseValues = convertToTensor(paramsDenseValues, "paramsDenseValues", "raggedGather"); + const $indices = convertToTensor(indices, "indices", "raggedGather", "int32"); + const inputs = { + paramsNestedSplits: $paramsNestedSplits, + paramsDenseValues: $paramsDenseValues, + indices: $indices + }; + const attrs = { outputRaggedRank }; + const result = ENGINE.runKernel(RaggedGather, inputs, attrs); + return { + outputNestedSplits: result.slice(0, result.length - 1), + outputDenseValues: result[result.length - 1] + }; +} +var raggedGather = op({ raggedGather_ }); + +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/ragged_tensor_to_tensor.js function raggedTensorToTensor_(shape, values, defaultValue, rowPartitionTensors, rowPartitionTypes) { const $shape = convertToTensor(shape, "shape", "raggedTensorToTensor", "int32"); const $values = convertToTensor(values, "values", "raggedTensorToTensor"); const $defaultValue = convertToTensor(defaultValue, "defaultValue", "raggedTensorToTensor", $values.dtype); - const $rowPartitionTensors = rowPartitionTensors.map((t, i) => convertToTensor(t, `tensors${i}`, "raggedTensorToTensor", "int32")); + const $rowPartitionTensors = rowPartitionTensors.map((t2, i2) => convertToTensor(t2, `tensors${i2}`, "raggedTensorToTensor", "int32")); const inputs = { shape: $shape, values: $values, @@ -12633,7 +12071,7 @@ function raggedTensorToTensor_(shape, values, defaultValue, rowPartitionTensors, } var raggedTensorToTensor = op({ raggedTensorToTensor_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/rand.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/rand.js function rand_(shape, randFunction, dtype) { const size = sizeFromShape(shape); let values = null; @@ -12646,14 +12084,14 @@ function rand_(shape, randFunction, dtype) { } else { throw new Error(`Unknown data type ${dtype}`); } - for (let i = 0; i < size; i++) { - values[i] = randFunction(); + for (let i2 = 0; i2 < size; i2++) { + values[i2] = randFunction(); } return ENGINE.makeTensor(values, shape, dtype); } var rand = op({ rand_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/rand_util.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/rand_util.js var seedrandom = __toESM(require_seedrandom2()); var MPRandGauss = class { constructor(mean5, stdDeviation, dtype, truncated, seed) { @@ -12678,13 +12116,13 @@ var MPRandGauss = class { let resultX, resultY; let isValid = false; while (!isValid) { - let v1, v2, s; + let v1, v2, s2; do { v1 = 2 * this.random() - 1; v2 = 2 * this.random() - 1; - s = v1 * v1 + v2 * v2; - } while (s >= 1 || s === 0); - const mul2 = Math.sqrt(-2 * Math.log(s) / s); + s2 = v1 * v1 + v2 * v2; + } while (s2 >= 1 || s2 === 0); + const mul2 = Math.sqrt(-2 * Math.log(s2) / s2); resultX = this.mean + this.stdDev * v1 * mul2; resultY = this.mean + this.stdDev * v2 * mul2; if (!this.truncated || this.isValidTruncated(resultX)) { @@ -12778,7 +12216,7 @@ var UniformRandom = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/random_gamma.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/random_gamma.js function randomGamma_(shape, alpha, beta = 1, dtype = "float32", seed) { if (beta == null) { beta = 1; @@ -12791,28 +12229,28 @@ function randomGamma_(shape, alpha, beta = 1, dtype = "float32", seed) { } const rgamma = new RandGamma(alpha, beta, dtype, seed); const res = buffer(shape, dtype); - for (let i = 0; i < res.values.length; i++) { - res.values[i] = rgamma.nextValue(); + for (let i2 = 0; i2 < res.values.length; i2++) { + res.values[i2] = rgamma.nextValue(); } return res.toTensor(); } var randomGamma = op({ randomGamma_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/random_normal.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/random_normal.js function randomNormal_(shape, mean5 = 0, stdDev = 1, dtype, seed) { if (dtype != null && dtype === "bool") { throw new Error(`Unsupported data type ${dtype}`); } const randGauss = new MPRandGauss(mean5, stdDev, dtype, false, seed); const res = buffer(shape, dtype); - for (let i = 0; i < res.values.length; i++) { - res.values[i] = randGauss.nextValue(); + for (let i2 = 0; i2 < res.values.length; i2++) { + res.values[i2] = randGauss.nextValue(); } return res.toTensor(); } var randomNormal = op({ randomNormal_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/random_standard_normal.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/random_standard_normal.js function randomStandardNormal_(shape, dtype, seed) { if (dtype != null && dtype === "bool") { throw new Error(`Unsupported data type ${dtype}`); @@ -12821,18 +12259,18 @@ function randomStandardNormal_(shape, dtype, seed) { } var randomStandardNormal = op({ randomStandardNormal_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/random_uniform.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/random_uniform.js function randomUniform_(shape, minval = 0, maxval = 1, dtype = "float32", seed) { const res = buffer(shape, dtype); const random = new UniformRandom(minval, maxval, null, seed); - for (let i = 0; i < res.values.length; i++) { - res.values[i] = random.nextValue(); + for (let i2 = 0; i2 < res.values.length; i2++) { + res.values[i2] = random.nextValue(); } return res.toTensor(); } var randomUniform = op({ randomUniform_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/range.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/range.js function range(start, stop, step5 = 1, dtype = "float32") { if (step5 === 0) { throw new Error("Cannot have a step of zero"); @@ -12841,7 +12279,7 @@ function range(start, stop, step5 = 1, dtype = "float32") { return ENGINE.runKernel(Range, {}, attrs); } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/reciprocal.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/reciprocal.js function reciprocal_(x) { const $x = convertToTensor(x, "x", "reciprocal"); const inputs = { x: $x }; @@ -12849,7 +12287,7 @@ function reciprocal_(x) { } var reciprocal = op({ reciprocal_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/relu.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/relu.js function relu_(x) { const $x = convertToTensor(x, "x", "relu"); const inputs = { x: $x }; @@ -12857,7 +12295,7 @@ function relu_(x) { } var relu = op({ relu_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/relu6.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/relu6.js function relu6_(x) { const $x = convertToTensor(x, "x", "relu6"); const inputs = { x: $x }; @@ -12865,7 +12303,7 @@ function relu6_(x) { } var relu6 = op({ relu6_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/reverse.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/reverse.js function reverse_(x, axis) { const $x = convertToTensor(x, "x", "reverse"); const inputs = { x: $x }; @@ -12874,7 +12312,7 @@ function reverse_(x, axis) { } var reverse = op({ reverse_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/reverse_1d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/reverse_1d.js function reverse1d_(x) { const $x = convertToTensor(x, "x", "reverse"); assert($x.rank === 1, () => `Error in reverse1D: x must be rank 1 but got rank ${$x.rank}.`); @@ -12882,7 +12320,7 @@ function reverse1d_(x) { } var reverse1d = op({ reverse1d_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/reverse_2d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/reverse_2d.js function reverse2d_(x, axis) { const $x = convertToTensor(x, "x", "reverse"); assert($x.rank === 2, () => `Error in reverse2D: x must be rank 2 but got rank ${$x.rank}.`); @@ -12890,7 +12328,7 @@ function reverse2d_(x, axis) { } var reverse2d = op({ reverse2d_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/reverse_3d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/reverse_3d.js function reverse3d_(x, axis) { const $x = convertToTensor(x, "x", "reverse"); assert($x.rank === 3, () => `Error in reverse3D: x must be rank 3 but got rank ${$x.rank}.`); @@ -12898,7 +12336,7 @@ function reverse3d_(x, axis) { } var reverse3d = op({ reverse3d_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/reverse_4d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/reverse_4d.js function reverse4d_(x, axis) { const $x = convertToTensor(x, "x", "reverse"); assert($x.rank === 4, () => `Error in reverse4D: x must be rank 4 but got rank ${$x.rank}.`); @@ -12906,7 +12344,7 @@ function reverse4d_(x, axis) { } var reverse4d = op({ reverse4d_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/round.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/round.js function round_(x) { const $x = convertToTensor(x, "x", "round"); const inputs = { x: $x }; @@ -12914,7 +12352,7 @@ function round_(x) { } var round2 = op({ round_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/rsqrt.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/rsqrt.js function rsqrt_(x) { const $x = convertToTensor(x, "x", "rsqrt", "float32"); const inputs = { x: $x }; @@ -12922,7 +12360,7 @@ function rsqrt_(x) { } var rsqrt = op({ rsqrt_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/selu.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/selu.js function selu_(x) { const $x = convertToTensor(x, "x", "selu"); const inputs = { x: $x }; @@ -12930,7 +12368,7 @@ function selu_(x) { } var selu = op({ selu_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/separable_conv2d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/separable_conv2d.js function separableConv2d_(x, depthwiseFilter, pointwiseFilter, strides, pad3, dilation = [1, 1], dataFormat = "NHWC") { const $x = convertToTensor(x, "x", "separableConv2d"); const $depthwiseFilter = convertToTensor(depthwiseFilter, "depthwiseFilter", "separableConv2d"); @@ -12962,7 +12400,7 @@ function separableConv2d_(x, depthwiseFilter, pointwiseFilter, strides, pad3, di } var separableConv2d = op({ separableConv2d_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/setdiff1d_async.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/setdiff1d_async.js async function setdiff1dAsync_(x, y) { const $x = convertToTensor(x, "x", "setdiff1d"); const $y = convertToTensor(y, "y", "setdiff1d"); @@ -12973,17 +12411,17 @@ async function setdiff1dAsync_(x, y) { const yVals = await $y.data(); const ySet = new Set(yVals); let outputSize = 0; - for (let i = 0; i < xVals.length; i++) { - if (!ySet.has(xVals[i])) { + for (let i2 = 0; i2 < xVals.length; i2++) { + if (!ySet.has(xVals[i2])) { outputSize++; } } const buffer2 = new TensorBuffer([outputSize], $x.dtype); const indices = new TensorBuffer([outputSize], "int32"); - for (let i = 0, p2 = 0; i < xVals.length; i++) { - if (!ySet.has(xVals[i])) { - buffer2.values[p2] = xVals[i]; - indices.values[p2] = i; + for (let i2 = 0, p2 = 0; i2 < xVals.length; i2++) { + if (!ySet.has(xVals[i2])) { + buffer2.values[p2] = xVals[i2]; + indices.values[p2] = i2; p2++; } } @@ -12991,7 +12429,7 @@ async function setdiff1dAsync_(x, y) { } var setdiff1dAsync = setdiff1dAsync_; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/sign.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/sign.js function sign_(x) { const $x = convertToTensor(x, "x", "sign"); const inputs = { x: $x }; @@ -12999,7 +12437,7 @@ function sign_(x) { } var sign = op({ sign_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/sin.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/sin.js function sin_(x) { const $x = convertToTensor(x, "x", "sin", "float32"); const inputs = { x: $x }; @@ -13007,7 +12445,7 @@ function sin_(x) { } var sin = op({ sin_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/sinh.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/sinh.js function sinh_(x) { const $x = convertToTensor(x, "x", "sinh"); const inputs = { x: $x }; @@ -13015,7 +12453,7 @@ function sinh_(x) { } var sinh = op({ sinh_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/slice1d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/slice1d.js function slice1d_(x, begin, size) { const $x = convertToTensor(x, "x", "slice1d"); assert($x.rank === 1, () => `slice1d expects a rank-1 tensor, but got a rank-${$x.rank} tensor`); @@ -13023,7 +12461,7 @@ function slice1d_(x, begin, size) { } var slice1d = op({ slice1d_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/slice2d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/slice2d.js function slice2d_(x, begin, size) { const $x = convertToTensor(x, "x", "slice2d"); assert($x.rank === 2, () => `slice2d expects a rank-2 tensor, but got a rank-${$x.rank} tensor`); @@ -13031,7 +12469,7 @@ function slice2d_(x, begin, size) { } var slice2d = op({ slice2d_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/slice3d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/slice3d.js function slice3d_(x, begin, size) { const $x = convertToTensor(x, "x", "slice3d"); assert($x.rank === 3, () => `slice3d expects a rank-3 tensor, but got a rank-${$x.rank} tensor`); @@ -13039,7 +12477,7 @@ function slice3d_(x, begin, size) { } var slice3d = op({ slice3d_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/slice4d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/slice4d.js function slice4d_(x, begin, size) { const $x = convertToTensor(x, "x", "slice4d"); assert($x.rank === 4, () => `slice4d expects a rank-4 tensor, but got a rank-${$x.rank} tensor`); @@ -13047,7 +12485,7 @@ function slice4d_(x, begin, size) { } var slice4d = op({ slice4d_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/softmax.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/softmax.js function softmax_(logits, dim = -1) { const $logits = convertToTensor(logits, "logits", "softmax", "float32"); if (dim === -1) { @@ -13062,7 +12500,7 @@ function softmax_(logits, dim = -1) { } var softmax = op({ softmax_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/spectral/fft.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/spectral/fft.js function fft_(input2) { assert(input2.dtype === "complex64", () => `The dtype for tf.spectral.fft() must be complex64 but got ${input2.dtype}.`); const inputs = { input: input2 }; @@ -13070,7 +12508,7 @@ function fft_(input2) { } var fft = op({ fft_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/spectral/ifft.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/spectral/ifft.js function ifft_(input2) { assert(input2.dtype === "complex64", () => `The dtype for tf.spectral.ifft() must be complex64 but got ${input2.dtype}.`); const inputs = { input: input2 }; @@ -13078,7 +12516,7 @@ function ifft_(input2) { } var ifft = op({ ifft_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/spectral/irfft.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/spectral/irfft.js function irfft_(input2) { const innerDimensionSize = input2.shape[input2.shape.length - 1]; const batch = input2.size / innerDimensionSize; @@ -13092,9 +12530,9 @@ function irfft_(input2) { const imagInput = reshape(imag(input2), [batch, innerDimensionSize]); const realConjugate = reverse(slice(realInput, [0, 1], [batch, innerDimensionSize - 2]), 1); const imagConjugate = mul(reverse(slice(imagInput, [0, 1], [batch, innerDimensionSize - 2]), 1), scalar(-1)); - const r = concat([realInput, realConjugate], 1); - const i = concat([imagInput, imagConjugate], 1); - const complexInput = reshape(complex(r, i), [outputShape[0], outputShape[1]]); + const r2 = concat([realInput, realConjugate], 1); + const i2 = concat([imagInput, imagConjugate], 1); + const complexInput = reshape(complex(r2, i2), [outputShape[0], outputShape[1]]); ret = ifft(complexInput); } ret = real(ret); @@ -13108,7 +12546,7 @@ function irfft_(input2) { } var irfft = op({ irfft_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/split.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/split.js function split_(x, numOrSizeSplits, axis = 0) { const $x = convertToTensor(x, "x", "split"); const inputs = { x: $x }; @@ -13117,7 +12555,7 @@ function split_(x, numOrSizeSplits, axis = 0) { } var split = op({ split_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/spectral/rfft.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/spectral/rfft.js function rfft_(input2, fftLength) { assert(input2.dtype === "float32", () => `The dtype for rfft() must be real value but got ${input2.dtype}`); let innerDimensionSize = input2.shape[input2.shape.length - 1]; @@ -13151,7 +12589,7 @@ function rfft_(input2, fftLength) { } var rfft = op({ rfft_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/squared_difference.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/squared_difference.js function squaredDifference_(a, b) { let $a = convertToTensor(a, "a", "squaredDifference"); let $b = convertToTensor(b, "b", "squaredDifference"); @@ -13163,14 +12601,14 @@ function squaredDifference_(a, b) { } var squaredDifference = op({ squaredDifference_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/squeeze.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/squeeze.js function squeeze_(x, axis) { const $x = convertToTensor(x, "x", "squeeze", "string_or_numeric"); return reshape($x, squeezeShape($x.shape, axis).newShape); } var squeeze = op({ squeeze_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/stack.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/stack.js function stack_(tensors, axis = 0) { const $tensors = convertToTensorArray(tensors, "tensors", "stack", "string_or_numeric"); assert($tensors.length >= 1, () => "Pass at least one tensor to tf.stack"); @@ -13183,7 +12621,7 @@ function stack_(tensors, axis = 0) { } var stack = op({ stack_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/step.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/step.js function step_(x, alpha = 0) { const $x = convertToTensor(x, "x", "step"); const inputs = { x: $x }; @@ -13192,7 +12630,7 @@ function step_(x, alpha = 0) { } var step = op({ step_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/strided_slice.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/strided_slice.js function stridedSlice_(x, begin, end, strides, beginMask = 0, endMask = 0, ellipsisMask = 0, newAxisMask = 0, shrinkAxisMask = 0) { const $x = convertToTensor(x, "x", "stridedSlice", "string_or_numeric"); const inputs = { x: $x }; @@ -13210,7 +12648,7 @@ function stridedSlice_(x, begin, end, strides, beginMask = 0, endMask = 0, ellip } var stridedSlice = op({ stridedSlice_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/tan.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/tan.js function tan_(x) { const $x = convertToTensor(x, "x", "tan", "float32"); const inputs = { x: $x }; @@ -13218,7 +12656,7 @@ function tan_(x) { } var tan = op({ tan_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/tensor1d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/tensor1d.js function tensor1d(values, dtype) { assertNonNull(values); const inferredShape = inferShape(values, dtype); @@ -13229,7 +12667,7 @@ function tensor1d(values, dtype) { return makeTensor(values, shape, inferredShape, dtype); } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/tensor2d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/tensor2d.js function tensor2d(values, shape, dtype) { assertNonNull(values); if (shape != null && shape.length !== 2) { @@ -13245,7 +12683,7 @@ function tensor2d(values, shape, dtype) { return makeTensor(values, shape, inferredShape, dtype); } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/tensor4d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/tensor4d.js function tensor4d(values, shape, dtype) { assertNonNull(values); if (shape != null && shape.length !== 4) { @@ -13261,7 +12699,7 @@ function tensor4d(values, shape, dtype) { return makeTensor(values, shape, inferredShape, dtype); } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/tensor5d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/tensor5d.js function tensor5d(values, shape, dtype) { assertNonNull(values); if (shape != null && shape.length !== 5) { @@ -13277,7 +12715,7 @@ function tensor5d(values, shape, dtype) { return makeTensor(values, shape, inferredShape, dtype); } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/tensor6d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/tensor6d.js function tensor6d(values, shape, dtype) { assertNonNull(values); if (shape != null && shape.length !== 6) { @@ -13294,7 +12732,7 @@ function tensor6d(values, shape, dtype) { return makeTensor(values, shape, inferredShape, dtype); } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/topk.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/topk.js function topk_(x, k = 1, sorted = true) { const $x = convertToTensor(x, "x", "topk"); if ($x.rank === 0) { @@ -13314,21 +12752,21 @@ function topk_(x, k = 1, sorted = true) { } var topk = op({ topk_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/truncated_normal.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/truncated_normal.js function truncatedNormal_(shape, mean5 = 0, stdDev = 1, dtype, seed) { if (dtype != null && dtype === "bool") { throw new Error(`Unsupported data type $ { dtype }`); } const randGauss = new MPRandGauss(mean5, stdDev, dtype, true, seed); const res = buffer(shape, dtype); - for (let i = 0; i < res.values.length; i++) { - res.values[i] = randGauss.nextValue(); + for (let i2 = 0; i2 < res.values.length; i2++) { + res.values[i2] = randGauss.nextValue(); } return res.toTensor(); } var truncatedNormal = op({ truncatedNormal_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/unique.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/unique.js function unique_(x, axis = 0) { const $x = convertToTensor(x, "x", "unique", "string_or_numeric"); assert($x.rank > 0, () => "The input tensor must be at least 1D"); @@ -13339,7 +12777,7 @@ function unique_(x, axis = 0) { } var unique = op({ unique_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/unsorted_segment_sum.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/unsorted_segment_sum.js function unsortedSegmentSum_(x, segmentIds, numSegments) { const $x = convertToTensor(x, "x", "unsortedSegmentSum"); const $segmentIds = convertToTensor(segmentIds, "segmentIds", "unsortedSegmentSum", "int32"); @@ -13350,7 +12788,7 @@ function unsortedSegmentSum_(x, segmentIds, numSegments) { } var unsortedSegmentSum = op({ unsortedSegmentSum_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/unstack.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/unstack.js function unstack_(x, axis = 0) { const $x = convertToTensor(x, "x", "unstack", "string_or_numeric"); assert(axis >= -$x.shape.length && axis < $x.shape.length, () => `Axis = ${axis} is not in [-${$x.shape.length}, ${$x.shape.length})`); @@ -13360,35 +12798,35 @@ function unstack_(x, axis = 0) { } var unstack = op({ unstack_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/upper_bound.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/upper_bound.js function upperBound(sortedSequence, values) { return searchSorted(sortedSequence, values, "right"); } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/variable.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/variable.js function variable(initialValue, trainable = true, name, dtype) { return ENGINE.makeVariable(initialValue, trainable, name, dtype); } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/backends/where_impl.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/backends/where_impl.js function whereImpl(condShape, condVals) { const indices = []; - for (let i = 0; i < condVals.length; i++) { - if (condVals[i]) { - indices.push(i); + for (let i2 = 0; i2 < condVals.length; i2++) { + if (condVals[i2]) { + indices.push(i2); } } const inBuffer = buffer(condShape, "int32"); const out = buffer([indices.length, condShape.length], "int32"); - for (let i = 0; i < indices.length; i++) { - const loc = inBuffer.indexToLoc(indices[i]); - const offset = i * condShape.length; + for (let i2 = 0; i2 < indices.length; i2++) { + const loc = inBuffer.indexToLoc(indices[i2]); + const offset = i2 * condShape.length; out.values.set(loc, offset); } return out.toTensor(); } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/where_async.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/where_async.js async function whereAsync_(condition) { const $condition = convertToTensor(condition, "condition", "whereAsync", "bool"); const vals = await $condition.data(); @@ -13400,7 +12838,7 @@ async function whereAsync_(condition) { } var whereAsync = whereAsync_; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/boolean_mask.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/boolean_mask.js async function booleanMaskAsync_(tensor2, mask, axis) { const $tensor = convertToTensor(tensor2, "tensor", "boolMask"); const $mask = convertToTensor(mask, "mask", "boolMask", "bool"); @@ -13410,8 +12848,8 @@ async function booleanMaskAsync_(tensor2, mask, axis) { assert(maskDim > 0, () => "mask cannot be scalar"); assertShapesMatch(tensorShape.slice(axisFrom, axisFrom + maskDim), $mask.shape, `mask's shape must match the first K dimensions of tensor's shape,`); let leadingSize = 1; - for (let i = axisFrom; i < axisFrom + maskDim; i++) { - leadingSize *= tensorShape[i]; + for (let i2 = axisFrom; i2 < axisFrom + maskDim; i2++) { + leadingSize *= tensorShape[i2]; } const targetTensorShape = tensorShape.slice(0, axisFrom).concat([leadingSize], tensorShape.slice(axisFrom + maskDim)); const reshapedTensor = reshape($tensor, targetTensorShape); @@ -13433,7 +12871,7 @@ async function booleanMaskAsync_(tensor2, mask, axis) { } var booleanMaskAsync = booleanMaskAsync_; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/moving_average.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/moving_average.js function movingAverage_(v, x, decay, step5, zeroDebias = true) { const $v = convertToTensor(v, "v", "movingAverage"); const $x = convertToTensor(x, "x", "movingAverage"); @@ -13452,7 +12890,7 @@ function movingAverage_(v, x, decay, step5, zeroDebias = true) { } var movingAverage = op({ movingAverage_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/scatter_nd.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/scatter_nd.js function scatterND_(indices, updates, shape) { const $indices = convertToTensor(indices, "indices", "scatterND", "int32"); const $updates = convertToTensor(updates, "updates", "scatterND"); @@ -13463,7 +12901,7 @@ function scatterND_(indices, updates, shape) { } var scatterND = op({ scatterND_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/sparse_to_dense_util.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/sparse_to_dense_util.js function validateInput2(sparseIndices, sparseValues, outputShape, defaultValues) { if (sparseIndices.dtype !== "int32") { throw new Error(`tf.sparseToDense() expects the indices to be int32 type, but the dtype was ${sparseIndices.dtype}.`); @@ -13485,7 +12923,7 @@ function validateInput2(sparseIndices, sparseValues, outputShape, defaultValues) } } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/sparse_to_dense.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/sparse_to_dense.js function sparseToDense_(sparseIndices, sparseValues, outputShape, defaultValue = 0) { const $sparseIndices = convertToTensor(sparseIndices, "sparseIndices", "sparseToDense", "int32"); const $sparseValues = convertToTensor(sparseValues, "sparseValues", "sparseToDense", "string_or_numeric"); @@ -13501,7 +12939,7 @@ function sparseToDense_(sparseIndices, sparseValues, outputShape, defaultValue = } var sparseToDense = op({ sparseToDense_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/gather_nd.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/gather_nd.js function gatherND_(x, indices) { const $indices = convertToTensor(indices, "indices", "gatherND", "int32"); const $x = convertToTensor(x, "x", "gatherND", "string_or_numeric"); @@ -13510,7 +12948,7 @@ function gatherND_(x, indices) { } var gatherND = op({ gatherND_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/dropout_util.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/dropout_util.js function getNoiseShape(x, noiseShape) { if (noiseShape == null) { return x.shape.slice(); @@ -13520,11 +12958,11 @@ function getNoiseShape(x, noiseShape) { } if (x.shape.length === noiseShape.length) { const newDimension = []; - for (let i = 0; i < x.shape.length; i++) { - if (noiseShape[i] == null && x.shape[i] != null) { - newDimension.push(x.shape[i]); + for (let i2 = 0; i2 < x.shape.length; i2++) { + if (noiseShape[i2] == null && x.shape[i2] != null) { + newDimension.push(x.shape[i2]); } else { - newDimension.push(noiseShape[i]); + newDimension.push(noiseShape[i2]); } } return newDimension; @@ -13532,7 +12970,7 @@ function getNoiseShape(x, noiseShape) { return noiseShape; } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/dropout.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/dropout.js function dropout_(x, rate, noiseShape, seed) { const $x = convertToTensor(x, "x", "dropout"); assert($x.dtype === "float32", () => `x has to be a floating point tensor since it's going to be scaled, but got a ${$x.dtype} tensor instead.`); @@ -13547,21 +12985,21 @@ function dropout_(x, rate, noiseShape, seed) { } var dropout = op({ dropout_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/signal_ops_util.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/signal_ops_util.js function enclosingPowerOfTwo(value) { return Math.floor(Math.pow(2, Math.ceil(Math.log(value) / Math.log(2)))); } function cosineWindow(windowLength, a, b) { const even = 1 - windowLength % 2; const newValues = new Float32Array(windowLength); - for (let i = 0; i < windowLength; ++i) { - const cosArg = 2 * Math.PI * i / (windowLength + even - 1); - newValues[i] = a - b * Math.cos(cosArg); + for (let i2 = 0; i2 < windowLength; ++i2) { + const cosArg = 2 * Math.PI * i2 / (windowLength + even - 1); + newValues[i2] = a - b * Math.cos(cosArg); } return tensor1d(newValues, "float32"); } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/in_top_k.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/in_top_k.js async function inTopKAsync_(predictions, targets, k = 1) { const $predictions = convertToTensor(predictions, "predictions", "inTopK"); const $targets = convertToTensor(targets, "targets", "inTopK"); @@ -13578,13 +13016,13 @@ async function inTopKAsync_(predictions, targets, k = 1) { const offset = b * size; const vals = predictionsVals.subarray(offset, offset + size); const valAndInd = []; - for (let i = 0; i < vals.length; i++) { - valAndInd.push({ value: vals[i], index: i }); + for (let i2 = 0; i2 < vals.length; i2++) { + valAndInd.push({ value: vals[i2], index: i2 }); } valAndInd.sort((a, b2) => b2.value - a.value); precision3[b] = 0; - for (let i = 0; i < k; i++) { - if (valAndInd[i].index === targetsVals[b]) { + for (let i2 = 0; i2 < k; i2++) { + if (valAndInd[i2].index === targetsVals[b]) { precision3[b] = 1; break; } @@ -13600,7 +13038,7 @@ async function inTopKAsync_(predictions, targets, k = 1) { } var inTopKAsync = inTopKAsync_; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/fused_ops.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/fused_ops.js var fused_ops_exports = {}; __export(fused_ops_exports, { conv2d: () => conv2d2, @@ -13608,7 +13046,7 @@ __export(fused_ops_exports, { matMul: () => matMul2 }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/conv2d_backprop_filter.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/conv2d_backprop_filter.js function conv2DBackpropFilter_(x, dy, filterShape, strides, pad3, dataFormat = "NHWC", dimRoundingMode) { let x4D = x; if (x.rank === 3) { @@ -13632,7 +13070,7 @@ function conv2DBackpropFilter_(x, dy, filterShape, strides, pad3, dataFormat = " } var conv2DBackpropFilter = op({ conv2DBackpropFilter_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/fused_util.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/fused_util.js function getFusedDyActivation(dy, y, activation2) { if (activation2 == null || activation2 === "linear") { return dy; @@ -13673,7 +13111,7 @@ var shouldFuse = (gradientDepth, activation2) => { return !gradientMode || activation2 === "linear"; }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/fused/conv2d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/fused/conv2d.js function fusedConv2d_({ x, filter, strides, pad: pad3, dataFormat = "NHWC", dilations = [1, 1], dimRoundingMode, bias, activation: activation2 = "linear", preluActivationWeights, leakyreluAlpha }) { activation2 = activation2 || "linear"; if (shouldFuse(ENGINE.state.gradientDepth, activation2) === false) { @@ -13719,7 +13157,7 @@ function fusedConv2d_({ x, filter, strides, pad: pad3, dataFormat = "NHWC", dila } else if (alphaShape.length === 3) { try { assertAndGetBroadcastShape(alphaShape, convInfo.outShape); - } catch (e) { + } catch (e2) { const errMsg = `Error in fused conv2d: PReLU activation weights (${alphaShape}) is not compatible with the output shape of the conv2d (${convInfo.outShape}).`; throw Error(errMsg); } @@ -13779,7 +13217,7 @@ function fusedConv2d_({ x, filter, strides, pad: pad3, dataFormat = "NHWC", dila } var conv2d2 = op({ fusedConv2d_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/depthwise_conv2d_native_backprop_filter.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/depthwise_conv2d_native_backprop_filter.js function depthwiseConv2dNativeBackpropFilter_(x, dy, filterShape, strides, pad3, dilations = [1, 1], dimRoundingMode) { let x4D = x; if (x.rank === 3) { @@ -13795,7 +13233,7 @@ function depthwiseConv2dNativeBackpropFilter_(x, dy, filterShape, strides, pad3, } var depthwiseConv2dNativeBackpropFilter = op({ depthwiseConv2dNativeBackpropFilter_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/depthwise_conv2d_native_backprop_input.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/depthwise_conv2d_native_backprop_input.js function depthwiseConv2dNativeBackpropInput_(xShape, dy, filter, strides, pad3, dilations = [1, 1], dimRoundingMode) { let dy4D = dy; let reshapedTo4D = false; @@ -13813,7 +13251,7 @@ function depthwiseConv2dNativeBackpropInput_(xShape, dy, filter, strides, pad3, } var depthwiseConv2dNativeBackpropInput = op({ depthwiseConv2dNativeBackpropInput_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/fused/depthwise_conv2d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/fused/depthwise_conv2d.js function fusedDepthwiseConv2d_({ x, filter, strides, pad: pad3, dataFormat = "NHWC", dilations = [1, 1], dimRoundingMode, bias, activation: activation2 = "linear", preluActivationWeights, leakyreluAlpha }) { if (shouldFuse(ENGINE.state.gradientDepth, activation2) === false) { let result = depthwiseConv2d(x, filter, strides, pad3, dataFormat, dilations, dimRoundingMode); @@ -13900,7 +13338,7 @@ function fusedDepthwiseConv2d_({ x, filter, strides, pad: pad3, dataFormat = "NH } var depthwiseConv2d2 = op({ fusedDepthwiseConv2d_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/fused/mat_mul.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/fused/mat_mul.js function fusedMatMul_({ a, b, transposeA = false, transposeB = false, bias, activation: activation2 = "linear", preluActivationWeights, leakyreluAlpha = 0.2 }) { if (shouldFuse(ENGINE.state.gradientDepth, activation2) === false) { let result = matMul(a, b, transposeA, transposeB); @@ -13985,19 +13423,19 @@ function fusedMatMul_({ a, b, transposeA = false, transposeB = false, bias, acti } var matMul2 = op({ fusedMatMul_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/signal/hamming_window.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/signal/hamming_window.js function hammingWindow_(windowLength) { return cosineWindow(windowLength, 0.54, 0.46); } var hammingWindow = op({ hammingWindow_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/signal/hann_window.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/signal/hann_window.js function hannWindow_(windowLength) { return cosineWindow(windowLength, 0.5, 0.5); } var hannWindow = op({ hannWindow_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/signal/frame.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/signal/frame.js function frame_(signal2, frameLength, frameStep, padEnd = false, padValue = 0) { let start = 0; const output = []; @@ -14023,7 +13461,7 @@ function frame_(signal2, frameLength, frameStep, padEnd = false, padValue = 0) { } var frame = op({ frame_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/signal/stft.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/signal/stft.js function stft_(signal2, frameLength, frameStep, fftLength, windowFn = hannWindow) { if (fftLength == null) { fftLength = enclosingPowerOfTwo(frameLength); @@ -14034,7 +13472,7 @@ function stft_(signal2, frameLength, frameStep, fftLength, windowFn = hannWindow } var stft = op({ stft_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/crop_and_resize.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/crop_and_resize.js function cropAndResize_(image2, boxes, boxInd, cropSize, method = "bilinear", extrapolationValue = 0) { const $image = convertToTensor(image2, "image", "cropAndResize"); const $boxes = convertToTensor(boxes, "boxes", "cropAndResize", "float32"); @@ -14053,7 +13491,7 @@ function cropAndResize_(image2, boxes, boxInd, cropSize, method = "bilinear", ex } var cropAndResize = op({ cropAndResize_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/flip_left_right.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/flip_left_right.js function flipLeftRight_(image2) { const $image = convertToTensor(image2, "image", "flipLeftRight", "float32"); assert($image.rank === 4, () => `Error in flipLeftRight: image must be rank 4,but got rank ${$image.rank}.`); @@ -14063,7 +13501,7 @@ function flipLeftRight_(image2) { } var flipLeftRight = op({ flipLeftRight_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/grayscale_to_rgb.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/grayscale_to_rgb.js function grayscaleToRGB_(image2) { const $image = convertToTensor(image2, "image", "grayscaleToRGB"); const lastDimsIdx = $image.rank - 1; @@ -14077,7 +13515,7 @@ function grayscaleToRGB_(image2) { } var grayscaleToRGB = op({ grayscaleToRGB_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/rotate_with_offset.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/rotate_with_offset.js function rotateWithOffset_(image2, radians, fillValue = 0, center = 0.5) { const $image = convertToTensor(image2, "image", "rotateWithOffset", "float32"); assert($image.rank === 4, () => `Error in rotateWithOffset: image must be rank 4,but got rank ${$image.rank}.`); @@ -14088,7 +13526,7 @@ function rotateWithOffset_(image2, radians, fillValue = 0, center = 0.5) { } var rotateWithOffset = op({ rotateWithOffset_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/nonmax_util.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/nonmax_util.js function nonMaxSuppSanityCheck(boxes, scores, maxOutputSize, iouThreshold, scoreThreshold, softNmsSigma) { if (iouThreshold == null) { iouThreshold = 0.5; @@ -14110,7 +13548,7 @@ function nonMaxSuppSanityCheck(boxes, scores, maxOutputSize, iouThreshold, score return { maxOutputSize, iouThreshold, scoreThreshold, softNmsSigma }; } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/non_max_suppression.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/non_max_suppression.js function nonMaxSuppression_(boxes, scores, maxOutputSize, iouThreshold = 0.5, scoreThreshold = Number.NEGATIVE_INFINITY) { const $boxes = convertToTensor(boxes, "boxes", "nonMaxSuppression", "float32"); const $scores = convertToTensor(scores, "scores", "nonMaxSuppression", "float32"); @@ -14123,7 +13561,7 @@ function nonMaxSuppression_(boxes, scores, maxOutputSize, iouThreshold = 0.5, sc } var nonMaxSuppression = op({ nonMaxSuppression_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/backends/non_max_suppression_util.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/backends/non_max_suppression_util.js function binaryInsert(arr, element, comparator) { const index = binarySearch(arr, element, comparator); const insertionPoint = index < 0 ? -(index + 1) : index; @@ -14153,7 +13591,7 @@ function binarySearch_(arr, target, comparator) { return found ? left : -left - 1; } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/backends/non_max_suppression_impl.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/backends/non_max_suppression_impl.js function nonMaxSuppressionV3Impl(boxes, scores, maxOutputSize, iouThreshold, scoreThreshold) { return nonMaxSuppressionImpl_(boxes, scores, maxOutputSize, iouThreshold, scoreThreshold, 0); } @@ -14175,9 +13613,9 @@ function nonMaxSuppressionV5Impl(boxes, scores, maxOutputSize, iouThreshold, sco } function nonMaxSuppressionImpl_(boxes, scores, maxOutputSize, iouThreshold, scoreThreshold, softNmsSigma, returnScoresTensor = false, padToMaxOutputSize = false, returnValidOutputs = false) { const candidates = []; - for (let i = 0; i < scores.length; i++) { - if (scores[i] > scoreThreshold) { - candidates.push({ score: scores[i], boxIndex: i, suppressBeginIndex: 0 }); + for (let i2 = 0; i2 < scores.length; i2++) { + if (scores[i2] > scoreThreshold) { + candidates.push({ score: scores[i2], boxIndex: i2, suppressBeginIndex: 0 }); } } candidates.sort(ascendingComparator); @@ -14227,8 +13665,8 @@ function nonMaxSuppressionImpl_(boxes, scores, maxOutputSize, iouThreshold, scor } return result; } -function intersectionOverUnion(boxes, i, j) { - const iCoord = boxes.subarray(i * 4, i * 4 + 4); +function intersectionOverUnion(boxes, i2, j) { + const iCoord = boxes.subarray(i2 * 4, i2 * 4 + 4); const jCoord = boxes.subarray(j * 4, j * 4 + 4); const yminI = Math.min(iCoord[0], iCoord[2]); const xminI = Math.min(iCoord[1], iCoord[3]); @@ -14258,7 +13696,7 @@ function ascendingComparator(c1, c2) { return c1.score - c2.score || c1.score === c2.score && c2.boxIndex - c1.boxIndex; } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/non_max_suppression_async.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/non_max_suppression_async.js async function nonMaxSuppressionAsync_(boxes, scores, maxOutputSize, iouThreshold = 0.5, scoreThreshold = Number.NEGATIVE_INFINITY) { const $boxes = convertToTensor(boxes, "boxes", "nonMaxSuppressionAsync"); const $scores = convertToTensor(scores, "scores", "nonMaxSuppressionAsync"); @@ -14280,7 +13718,7 @@ async function nonMaxSuppressionAsync_(boxes, scores, maxOutputSize, iouThreshol } var nonMaxSuppressionAsync = nonMaxSuppressionAsync_; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/non_max_suppression_with_score.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/non_max_suppression_with_score.js function nonMaxSuppressionWithScore_(boxes, scores, maxOutputSize, iouThreshold = 0.5, scoreThreshold = Number.NEGATIVE_INFINITY, softNmsSigma = 0) { const $boxes = convertToTensor(boxes, "boxes", "nonMaxSuppression"); const $scores = convertToTensor(scores, "scores", "nonMaxSuppression"); @@ -14296,7 +13734,7 @@ function nonMaxSuppressionWithScore_(boxes, scores, maxOutputSize, iouThreshold } var nonMaxSuppressionWithScore = op({ nonMaxSuppressionWithScore_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/non_max_suppression_with_score_async.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/non_max_suppression_with_score_async.js async function nonMaxSuppressionWithScoreAsync_(boxes, scores, maxOutputSize, iouThreshold = 0.5, scoreThreshold = Number.NEGATIVE_INFINITY, softNmsSigma = 0) { const $boxes = convertToTensor(boxes, "boxes", "nonMaxSuppressionAsync"); const $scores = convertToTensor(scores, "scores", "nonMaxSuppressionAsync"); @@ -14322,7 +13760,7 @@ async function nonMaxSuppressionWithScoreAsync_(boxes, scores, maxOutputSize, io } var nonMaxSuppressionWithScoreAsync = nonMaxSuppressionWithScoreAsync_; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/non_max_suppression_padded.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/non_max_suppression_padded.js function nonMaxSuppressionPadded_(boxes, scores, maxOutputSize, iouThreshold = 0.5, scoreThreshold = Number.NEGATIVE_INFINITY, padToMaxOutputSize = false) { const $boxes = convertToTensor(boxes, "boxes", "nonMaxSuppression"); const $scores = convertToTensor(scores, "scores", "nonMaxSuppression"); @@ -14342,7 +13780,7 @@ function nonMaxSuppressionPadded_(boxes, scores, maxOutputSize, iouThreshold = 0 } var nonMaxSuppressionPadded = op({ nonMaxSuppressionPadded_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/non_max_suppression_padded_async.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/non_max_suppression_padded_async.js async function nonMaxSuppressionPaddedAsync_(boxes, scores, maxOutputSize, iouThreshold = 0.5, scoreThreshold = Number.NEGATIVE_INFINITY, padToMaxOutputSize = false) { const $boxes = convertToTensor(boxes, "boxes", "nonMaxSuppressionAsync"); const $scores = convertToTensor(scores, "scores", "nonMaxSuppressionAsync"); @@ -14365,7 +13803,7 @@ async function nonMaxSuppressionPaddedAsync_(boxes, scores, maxOutputSize, iouTh } var nonMaxSuppressionPaddedAsync = nonMaxSuppressionPaddedAsync_; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/resize_bilinear.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/resize_bilinear.js function resizeBilinear_(images, size, alignCorners = false, halfPixelCenters = false) { const $images = convertToTensor(images, "images", "resizeBilinear"); assert($images.rank === 3 || $images.rank === 4, () => `Error in resizeBilinear: x must be rank 3 or 4, but got rank ${$images.rank}.`); @@ -14388,7 +13826,7 @@ function resizeBilinear_(images, size, alignCorners = false, halfPixelCenters = } var resizeBilinear = op({ resizeBilinear_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/resize_nearest_neighbor.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/resize_nearest_neighbor.js function resizeNearestNeighbor_(images, size, alignCorners = false, halfPixelCenters = false) { const $images = convertToTensor(images, "images", "resizeNearestNeighbor"); assert($images.rank === 3 || $images.rank === 4, () => `Error in resizeNearestNeighbor: x must be rank 3 or 4, but got rank ${$images.rank}.`); @@ -14412,7 +13850,7 @@ function resizeNearestNeighbor_(images, size, alignCorners = false, halfPixelCen } var resizeNearestNeighbor = op({ resizeNearestNeighbor_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/threshold.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/threshold.js function threshold_(image2, method = "binary", inverted = false, threshValue = 0.5) { const $image = convertToTensor(image2, "image", "threshold"); const RED_INTENCITY_COEF = 0.2989; @@ -14420,14 +13858,14 @@ function threshold_(image2, method = "binary", inverted = false, threshValue = 0 const BLUE_INTENCITY_COEF = 0.114; const totalPixelsInImage = $image.shape[0] * $image.shape[1]; let $threshold = mul(tensor1d([threshValue]), 255); - let r, g, b, grayscale; + let r2, g, b, grayscale; assert($image.rank === 3, () => `Error in threshold: image must be rank 3,but got rank ${$image.rank}.`); assert($image.shape[2] === 3 || $image.shape[2] === 1, () => `Error in threshold: image color channel must be equal to 3 or 1but got ${$image.shape[2]}.`); assert($image.dtype === "int32" || $image.dtype === "float32", () => `Error in dtype: image dtype must be int32 or float32,but got dtype ${$image.dtype}.`); assert(method === "otsu" || method === "binary", () => `Method must be binary or otsu, but was ${method}`); if ($image.shape[2] === 3) { - [r, g, b] = split($image, [1, 1, 1], -1); - const $r = mul(r, RED_INTENCITY_COEF); + [r2, g, b] = split($image, [1, 1, 1], -1); + const $r = mul(r2, RED_INTENCITY_COEF); const $g = mul(g, GREEN_INTENCITY_COEF); const $b = mul(b, BLUE_INTENCITY_COEF); grayscale = add2(add2($r, $g), $b); @@ -14470,7 +13908,7 @@ function otsu(histogram, total) { } var threshold = op({ threshold_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/transform.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/image/transform.js function transform_(image2, transforms, interpolation = "nearest", fillMode = "constant", fillValue = 0, outputShape) { const $image = convertToTensor(image2, "image", "transform", "float32"); const $transforms = convertToTensor(transforms, "transforms", "transform", "float32"); @@ -14483,7 +13921,7 @@ function transform_(image2, transforms, interpolation = "nearest", fillMode = "c } var transform = op({ transform_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/linalg/band_part.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/linalg/band_part.js function bandPart_(a, numLower, numUpper) { assert(numLower % 1 === 0, () => `bandPart(): numLower must be an integer, got ${numLower}.`); assert(numUpper % 1 === 0, () => `bandPart(): numUpper must be an integer, got ${numUpper}.`); @@ -14503,24 +13941,24 @@ function bandPart_(a, numLower, numUpper) { if (numUpper < 0) { numUpper = N; } - const i = reshape(range(0, M, 1, "int32"), [-1, 1]); + const i2 = reshape(range(0, M, 1, "int32"), [-1, 1]); const j = range(0, N, 1, "int32"); - const ij = sub(i, j); + const ij = sub(i2, j); const inBand = logicalAnd(lessEqual(ij, scalar(+numLower, "int32")), greaterEqual(ij, scalar(-numUpper, "int32"))); const zero = zeros([M, N], $a.dtype); return reshape(stack(unstack(reshape($a, [-1, M, N])).map((mat) => where(inBand, mat, zero))), shape); } var bandPart = op({ bandPart_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/linalg/gram_schmidt.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/linalg/gram_schmidt.js function gramSchmidt_(xs) { let inputIsTensor2D; if (Array.isArray(xs)) { inputIsTensor2D = false; assert(xs != null && xs.length > 0, () => "Gram-Schmidt process: input must not be null, undefined, or empty"); const dim = xs[0].shape[0]; - for (let i = 1; i < xs.length; ++i) { - assert(xs[i].shape[0] === dim, () => `Gram-Schmidt: Non-unique lengths found in the input vectors: (${xs[i].shape[0]} vs. ${dim})`); + for (let i2 = 1; i2 < xs.length; ++i2) { + assert(xs[i2].shape[0] === dim, () => `Gram-Schmidt: Non-unique lengths found in the input vectors: (${xs[i2].shape[0]} vs. ${dim})`); } } else { inputIsTensor2D = true; @@ -14529,11 +13967,11 @@ function gramSchmidt_(xs) { assert(xs.length <= xs[0].shape[0], () => `Gram-Schmidt: Number of vectors (${xs.length}) exceeds number of dimensions (${xs[0].shape[0]}).`); const ys = []; const xs1d = xs; - for (let i = 0; i < xs.length; ++i) { + for (let i2 = 0; i2 < xs.length; ++i2) { ys.push(ENGINE.tidy(() => { - let x = xs1d[i]; - if (i > 0) { - for (let j = 0; j < i; ++j) { + let x = xs1d[i2]; + if (i2 > 0) { + for (let j = 0; j < i2; ++j) { const proj = mul(sum2(mul(ys[j], x)), ys[j]); x = sub(x, proj); } @@ -14549,7 +13987,7 @@ function gramSchmidt_(xs) { } var gramSchmidt = op({ gramSchmidt_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/linalg/qr.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/linalg/qr.js function qr_(x, fullMatrices = false) { assert(x.rank >= 2, () => `qr() requires input tensor to have a rank >= 2, but got rank ${x.rank}`); if (x.rank === 2) { @@ -14569,30 +14007,30 @@ function qr_(x, fullMatrices = false) { r2ds.push(r2d); }); const q = reshape(stack(q2ds, 0), x.shape); - const r = reshape(stack(r2ds, 0), x.shape); - return [q, r]; + const r2 = reshape(stack(r2ds, 0), x.shape); + return [q, r2]; } } function qr2d(x, fullMatrices = false) { return ENGINE.tidy(() => { assert(x.shape.length === 2, () => `qr2d() requires a 2D Tensor, but got a ${x.shape.length}D Tensor.`); const m = x.shape[0]; - const n = x.shape[1]; + const n2 = x.shape[1]; let q = eye(m); - let r = clone(x); + let r2 = clone(x); const one2D = tensor2d([[1]], [1, 1]); let w = clone(one2D); - const iters = m >= n ? n : m; + const iters = m >= n2 ? n2 : m; for (let j = 0; j < iters; ++j) { - const rTemp = r; + const rTemp = r2; const wTemp = w; const qTemp = q; - [w, r, q] = ENGINE.tidy(() => { - const rjEnd1 = slice(r, [j, j], [m - j, 1]); + [w, r2, q] = ENGINE.tidy(() => { + const rjEnd1 = slice(r2, [j, j], [m - j, 1]); const normX = norm(rjEnd1); - const rjj = slice(r, [j, j], [1, 1]); - const s = where(greater(rjj, 0), tensor2d([[-1]]), tensor2d([[1]])); - const u1 = sub(rjj, mul(s, normX)); + const rjj = slice(r2, [j, j], [1, 1]); + const s2 = where(greater(rjj, 0), tensor2d([[-1]]), tensor2d([[1]])); + const u1 = sub(rjj, mul(s2, normX)); const wPre = div(rjEnd1, u1); if (wPre.shape[0] === 1) { w = clone(one2D); @@ -14602,15 +14040,15 @@ function qr2d(x, fullMatrices = false) { slice(wPre, [1, 0], [wPre.shape[0] - 1, wPre.shape[1]]) ], 0); } - const tau = neg(div(matMul(s, u1), normX)); - const rjEndAll = slice(r, [j, 0], [m - j, n]); + const tau = neg(div(matMul(s2, u1), normX)); + const rjEndAll = slice(r2, [j, 0], [m - j, n2]); const tauTimesW = mul(tau, w); const wT = transpose(w); if (j === 0) { - r = sub(rjEndAll, matMul(tauTimesW, matMul(wT, rjEndAll))); + r2 = sub(rjEndAll, matMul(tauTimesW, matMul(wT, rjEndAll))); } else { const rTimesTau = sub(rjEndAll, matMul(tauTimesW, matMul(wT, rjEndAll))); - r = concat([slice(r, [0, 0], [j, n]), rTimesTau], 0); + r2 = concat([slice(r2, [0, 0], [j, n2]), rTimesTau], 0); } const tawTimesWT = transpose(tauTimesW); const qAllJEnd = slice(q, [0, j], [m, q.shape[1] - j]); @@ -14620,20 +14058,20 @@ function qr2d(x, fullMatrices = false) { const qTimesTau = sub(qAllJEnd, matMul(matMul(qAllJEnd, w), tawTimesWT)); q = concat([slice(q, [0, 0], [m, j]), qTimesTau], 1); } - return [w, r, q]; + return [w, r2, q]; }); dispose([rTemp, wTemp, qTemp]); } - if (!fullMatrices && m > n) { - q = slice(q, [0, 0], [m, n]); - r = slice(r, [0, 0], [n, n]); + if (!fullMatrices && m > n2) { + q = slice(q, [0, 0], [m, n2]); + r2 = slice(r2, [0, 0], [n2, n2]); } - return [q, r]; + return [q, r2]; }); } var qr = op({ qr_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/loss_ops_utils.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/loss_ops_utils.js var Reduction; (function(Reduction2) { Reduction2[Reduction2["NONE"] = 0] = "NONE"; @@ -14642,7 +14080,7 @@ var Reduction; Reduction2[Reduction2["SUM_BY_NONZERO_WEIGHTS"] = 3] = "SUM_BY_NONZERO_WEIGHTS"; })(Reduction || (Reduction = {})); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/losses/compute_weighted_loss.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/losses/compute_weighted_loss.js function computeWeightedLoss_(losses2, weights, reduction = Reduction.SUM_BY_NONZERO_WEIGHTS) { const $losses = convertToTensor(losses2, "losses", "computeWeightedLoss"); let $weights = null; @@ -14678,7 +14116,7 @@ function computeWeightedLoss_(losses2, weights, reduction = Reduction.SUM_BY_NON } var computeWeightedLoss = op({ computeWeightedLoss_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/losses/absolute_difference.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/losses/absolute_difference.js function absoluteDifference_(labels, predictions, weights, reduction = Reduction.SUM_BY_NONZERO_WEIGHTS) { const $labels = convertToTensor(labels, "labels", "absoluteDifference"); const $predictions = convertToTensor(predictions, "predictions", "absoluteDifference"); @@ -14692,7 +14130,7 @@ function absoluteDifference_(labels, predictions, weights, reduction = Reduction } var absoluteDifference = op({ absoluteDifference_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/losses/cosine_distance.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/losses/cosine_distance.js function cosineDistance_(labels, predictions, axis, weights, reduction = Reduction.SUM_BY_NONZERO_WEIGHTS) { const $labels = convertToTensor(labels, "labels", "cosineDistance"); const $predictions = convertToTensor(predictions, "predictions", "cosineDistance"); @@ -14707,7 +14145,7 @@ function cosineDistance_(labels, predictions, axis, weights, reduction = Reducti } var cosineDistance = op({ cosineDistance_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/losses/hinge_loss.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/losses/hinge_loss.js function hingeLoss_(labels, predictions, weights, reduction = Reduction.SUM_BY_NONZERO_WEIGHTS) { let $labels = convertToTensor(labels, "labels", "hingeLoss"); const $predictions = convertToTensor(predictions, "predictions", "hingeLoss"); @@ -14723,7 +14161,7 @@ function hingeLoss_(labels, predictions, weights, reduction = Reduction.SUM_BY_N } var hingeLoss = op({ hingeLoss_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/losses/huber_loss.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/losses/huber_loss.js function huberLoss_(labels, predictions, weights, delta = 1, reduction = Reduction.SUM_BY_NONZERO_WEIGHTS) { const $labels = convertToTensor(labels, "labels", "huberLoss"); const $predictions = convertToTensor(predictions, "predictions", "huberLoss"); @@ -14741,7 +14179,7 @@ function huberLoss_(labels, predictions, weights, delta = 1, reduction = Reducti } var huberLoss = op({ huberLoss_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/losses/log_loss.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/losses/log_loss.js function logLoss_(labels, predictions, weights, epsilon3 = 1e-7, reduction = Reduction.SUM_BY_NONZERO_WEIGHTS) { const $labels = convertToTensor(labels, "labels", "logLoss"); const $predictions = convertToTensor(predictions, "predictions", "logLoss"); @@ -14759,7 +14197,7 @@ function logLoss_(labels, predictions, weights, epsilon3 = 1e-7, reduction = Red } var logLoss = op({ logLoss_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/losses/mean_squared_error.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/losses/mean_squared_error.js function meanSquaredError_(labels, predictions, weights, reduction = Reduction.SUM_BY_NONZERO_WEIGHTS) { const $labels = convertToTensor(labels, "labels", "meanSquaredError"); const $predictions = convertToTensor(predictions, "predictions", "meanSquaredError"); @@ -14773,7 +14211,7 @@ function meanSquaredError_(labels, predictions, weights, reduction = Reduction.S } var meanSquaredError = op({ meanSquaredError_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/losses/sigmoid_cross_entropy.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/losses/sigmoid_cross_entropy.js function sigmoidCrossEntropyWithLogits_(labels, logits) { const $labels = convertToTensor(labels, "labels", "sigmoidCrossEntropyWithLogits"); const $logits = convertToTensor(logits, "logits", "sigmoidCrossEntropyWithLogits"); @@ -14802,7 +14240,7 @@ function sigmoidCrossEntropy_(multiClassLabels, logits, weights, labelSmoothing } var sigmoidCrossEntropy = op({ sigmoidCrossEntropy_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/losses/softmax_cross_entropy.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/losses/softmax_cross_entropy.js function softmaxCrossEntropyWithLogits_(labels, logits, dim = -1) { if (dim === -1) { dim = logits.rank - 1; @@ -14848,7 +14286,7 @@ function softmaxCrossEntropy_(onehotLabels, logits, weights, labelSmoothing = 0, } var softmaxCrossEntropy = op({ softmaxCrossEntropy_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/sparse/sparse_fill_empty_rows.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/sparse/sparse_fill_empty_rows.js function sparseFillEmptyRows_(indices, values, denseShape, defaultValue) { const $indices = convertToTensor(indices, "indices", "sparseFillEmptyRows", "int32"); const $values = convertToTensor(values, "values", "sparseFillEmptyRows"); @@ -14883,7 +14321,7 @@ function sparseFillEmptyRows_(indices, values, denseShape, defaultValue) { } var sparseFillEmptyRows = op({ sparseFillEmptyRows_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/sparse/sparse_reshape.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/sparse/sparse_reshape.js function sparseReshape_(inputIndices, inputShape, newShape) { const $inputIndices = convertToTensor(inputIndices, "inputIndices", "sparseReshape", "int32"); const $inputShape = convertToTensor(inputShape, "inputShape", "sparseReshape", "int32"); @@ -14908,7 +14346,7 @@ function sparseReshape_(inputIndices, inputShape, newShape) { } var sparseReshape = op({ sparseReshape_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/sparse/sparse_segment_mean.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/sparse/sparse_segment_mean.js function sparseSegmentMean_(data, indices, segmentIds) { const $data = convertToTensor(data, "data", "sparseSegmentMean"); const $indices = convertToTensor(indices, "indices", "sparseSegmentMean", "int32"); @@ -14933,7 +14371,7 @@ function sparseSegmentMean_(data, indices, segmentIds) { } var sparseSegmentMean = op({ sparseSegmentMean_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/sparse/sparse_segment_sum.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/sparse/sparse_segment_sum.js function sparseSegmentSum_(data, indices, segmentIds) { const $data = convertToTensor(data, "data", "sparseSegmentSum"); const $indices = convertToTensor(indices, "indices", "sparseSegmentSum", "int32"); @@ -14958,7 +14396,7 @@ function sparseSegmentSum_(data, indices, segmentIds) { } var sparseSegmentSum = op({ sparseSegmentSum_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/string/string_n_grams.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/string/string_n_grams.js function stringNGrams_(data, dataSplits, separator, nGramWidths, leftPad, rightPad2, padWidth, preserveShortSequences) { const $data = convertToTensor(data, "data", "stringNGrams", "string"); if ($data.dtype !== "string") { @@ -14985,7 +14423,7 @@ function stringNGrams_(data, dataSplits, separator, nGramWidths, leftPad, rightP } var stringNGrams = op({ stringNGrams_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/string/string_split.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/string/string_split.js function stringSplit_(input2, delimiter, skipEmpty = true) { const $input = convertToTensor(input2, "input", "stringSplit", "string"); const $delimiter = convertToTensor(delimiter, "delimiter", "stringSplit", "string"); @@ -15002,7 +14440,7 @@ function stringSplit_(input2, delimiter, skipEmpty = true) { } var stringSplit = op({ stringSplit_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/string/string_to_hash_bucket_fast.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/string/string_to_hash_bucket_fast.js function stringToHashBucketFast_(input2, numBuckets) { const $input = convertToTensor(input2, "input", "stringToHashBucketFast", "string"); const attrs = { numBuckets }; @@ -15014,7 +14452,7 @@ function stringToHashBucketFast_(input2, numBuckets) { } var stringToHashBucketFast = op({ stringToHashBucketFast_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/ops.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/ops.js var spectral = { fft, ifft, @@ -15071,7 +14509,7 @@ var string = { stringToHashBucketFast }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/optimizers/optimizer.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/optimizers/optimizer.js var Optimizer = class extends Serializable { minimize(f, returnCost = false, varList) { const { value, grads: grads2 } = this.computeGradients(f, varList); @@ -15132,7 +14570,7 @@ Object.defineProperty(Optimizer, Symbol.hasInstance, { } }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/optimizers/adadelta_optimizer.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/optimizers/adadelta_optimizer.js var AdadeltaOptimizer = class extends Optimizer { constructor(learningRate, rho, epsilon3 = null) { super(); @@ -15147,27 +14585,27 @@ var AdadeltaOptimizer = class extends Optimizer { } applyGradients(variableGradients) { const variableNames = Array.isArray(variableGradients) ? variableGradients.map((item) => item.name) : Object.keys(variableGradients); - variableNames.forEach((name, i) => { + variableNames.forEach((name, i2) => { const value = ENGINE.registeredVariables[name]; const trainable = false; - if (this.accumulatedGrads[i] == null) { - this.accumulatedGrads[i] = { + if (this.accumulatedGrads[i2] == null) { + this.accumulatedGrads[i2] = { originalName: `${name}/accum_grad`, variable: tidy(() => zerosLike(value).variable(trainable)) }; } - if (this.accumulatedUpdates[i] == null) { - this.accumulatedUpdates[i] = { + if (this.accumulatedUpdates[i2] == null) { + this.accumulatedUpdates[i2] = { originalName: `${name}/accum_var`, variable: tidy(() => zerosLike(value).variable(trainable)) }; } - const gradient = Array.isArray(variableGradients) ? variableGradients[i].tensor : variableGradients[name]; + const gradient = Array.isArray(variableGradients) ? variableGradients[i2].tensor : variableGradients[name]; if (gradient == null) { return; } - const accumulatedGrad = this.accumulatedGrads[i].variable; - const accumulatedUpdate = this.accumulatedUpdates[i].variable; + const accumulatedGrad = this.accumulatedGrads[i2].variable; + const accumulatedUpdate = this.accumulatedUpdates[i2].variable; tidy(() => { const newAccumulatedGrad = add2(mul(accumulatedGrad, this.rho), mul(square(gradient), 1 - this.rho)); const updates = mul(div(sqrt(add2(accumulatedUpdate, this.epsilon)), sqrt(add2(accumulatedGrad, this.epsilon))), gradient); @@ -15217,7 +14655,7 @@ var AdadeltaOptimizer = class extends Optimizer { AdadeltaOptimizer.className = "Adadelta"; registerClass(AdadeltaOptimizer); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/optimizers/adagrad_optimizer.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/optimizers/adagrad_optimizer.js var AdagradOptimizer = class extends Optimizer { constructor(learningRate, initialAccumulatorValue = 0.1) { super(); @@ -15227,20 +14665,20 @@ var AdagradOptimizer = class extends Optimizer { } applyGradients(variableGradients) { const variableNames = Array.isArray(variableGradients) ? variableGradients.map((item) => item.name) : Object.keys(variableGradients); - variableNames.forEach((name, i) => { + variableNames.forEach((name, i2) => { const value = ENGINE.registeredVariables[name]; - if (this.accumulatedGrads[i] == null) { + if (this.accumulatedGrads[i2] == null) { const trainable = false; - this.accumulatedGrads[i] = { + this.accumulatedGrads[i2] = { originalName: `${name}/accumulator`, variable: tidy(() => fill(value.shape, this.initialAccumulatorValue).variable(trainable)) }; } - const gradient = Array.isArray(variableGradients) ? variableGradients[i].tensor : variableGradients[name]; + const gradient = Array.isArray(variableGradients) ? variableGradients[i2].tensor : variableGradients[name]; if (gradient == null) { return; } - const accumulatedGrad = this.accumulatedGrads[i].variable; + const accumulatedGrad = this.accumulatedGrads[i2].variable; tidy(() => { const newAccumulatedGrad = add2(accumulatedGrad, square(gradient)); accumulatedGrad.assign(newAccumulatedGrad); @@ -15276,7 +14714,7 @@ var AdagradOptimizer = class extends Optimizer { AdagradOptimizer.className = "Adagrad"; registerClass(AdagradOptimizer); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/optimizers/adam_optimizer.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/optimizers/adam_optimizer.js var AdamOptimizer = class extends Optimizer { constructor(learningRate, beta1, beta2, epsilon3 = null) { super(); @@ -15299,27 +14737,27 @@ var AdamOptimizer = class extends Optimizer { tidy(() => { const oneMinusAccBeta1 = sub(1, this.accBeta1); const oneMinusAccBeta2 = sub(1, this.accBeta2); - varNames.forEach((name, i) => { + varNames.forEach((name, i2) => { const value = ENGINE.registeredVariables[name]; const trainable = false; - if (this.accumulatedFirstMoment[i] == null) { - this.accumulatedFirstMoment[i] = { + if (this.accumulatedFirstMoment[i2] == null) { + this.accumulatedFirstMoment[i2] = { originalName: `${name}/m`, variable: tidy(() => zerosLike(value).variable(trainable)) }; } - if (this.accumulatedSecondMoment[i] == null) { - this.accumulatedSecondMoment[i] = { + if (this.accumulatedSecondMoment[i2] == null) { + this.accumulatedSecondMoment[i2] = { originalName: `${name}/v`, variable: tidy(() => zerosLike(value).variable(trainable)) }; } - const gradient = Array.isArray(variableGradients) ? variableGradients[i].tensor : variableGradients[name]; + const gradient = Array.isArray(variableGradients) ? variableGradients[i2].tensor : variableGradients[name]; if (gradient == null) { return; } - const firstMoment = this.accumulatedFirstMoment[i].variable; - const secondMoment = this.accumulatedSecondMoment[i].variable; + const firstMoment = this.accumulatedFirstMoment[i2].variable; + const secondMoment = this.accumulatedSecondMoment[i2].variable; const newFirstMoment = add2(mul(firstMoment, this.beta1), mul(gradient, 1 - this.beta1)); const newSecondMoment = add2(mul(secondMoment, this.beta2), mul(square(gradient), 1 - this.beta2)); const biasCorrectedFirstMoment = div(newFirstMoment, oneMinusAccBeta1); @@ -15380,7 +14818,7 @@ var AdamOptimizer = class extends Optimizer { AdamOptimizer.className = "Adam"; registerClass(AdamOptimizer); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/optimizers/adamax_optimizer.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/optimizers/adamax_optimizer.js var AdamaxOptimizer = class extends Optimizer { constructor(learningRate, beta1, beta2, epsilon3 = null, decay = 0) { super(); @@ -15404,27 +14842,27 @@ var AdamaxOptimizer = class extends Optimizer { tidy(() => { const oneMinusAccBeta1 = sub(1, this.accBeta1); const lr = div(-this.learningRate, add2(mul(this.iteration, this.decay), 1)); - variableNames.forEach((name, i) => { + variableNames.forEach((name, i2) => { const value = ENGINE.registeredVariables[name]; const trainable = false; - if (this.accumulatedFirstMoment[i] == null) { - this.accumulatedFirstMoment[i] = { + if (this.accumulatedFirstMoment[i2] == null) { + this.accumulatedFirstMoment[i2] = { originalName: `${name}/m`, variable: zerosLike(value).variable(trainable) }; } - if (this.accumulatedWeightedInfNorm[i] == null) { - this.accumulatedWeightedInfNorm[i] = { + if (this.accumulatedWeightedInfNorm[i2] == null) { + this.accumulatedWeightedInfNorm[i2] = { originalName: `${name}/v`, variable: zerosLike(value).variable(trainable) }; } - const gradient = Array.isArray(variableGradients) ? variableGradients[i].tensor : variableGradients[name]; + const gradient = Array.isArray(variableGradients) ? variableGradients[i2].tensor : variableGradients[name]; if (gradient == null) { return; } - const firstMoment = this.accumulatedFirstMoment[i].variable; - const weightedInfNorm = this.accumulatedWeightedInfNorm[i].variable; + const firstMoment = this.accumulatedFirstMoment[i2].variable; + const weightedInfNorm = this.accumulatedWeightedInfNorm[i2].variable; const newFirstMoment = add2(mul(firstMoment, this.beta1), mul(gradient, 1 - this.beta1)); const ut0 = mul(weightedInfNorm, this.beta2); const ut1 = abs(gradient); @@ -15471,7 +14909,7 @@ var AdamaxOptimizer = class extends Optimizer { AdamaxOptimizer.className = "Adamax"; registerClass(AdamaxOptimizer); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/optimizers/sgd_optimizer.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/optimizers/sgd_optimizer.js var SGDOptimizer = class extends Optimizer { constructor(learningRate) { super(); @@ -15480,8 +14918,8 @@ var SGDOptimizer = class extends Optimizer { } applyGradients(variableGradients) { const varNames = Array.isArray(variableGradients) ? variableGradients.map((v) => v.name) : Object.keys(variableGradients); - varNames.forEach((name, i) => { - const gradient = Array.isArray(variableGradients) ? variableGradients[i].tensor : variableGradients[name]; + varNames.forEach((name, i2) => { + const gradient = Array.isArray(variableGradients) ? variableGradients[i2].tensor : variableGradients[name]; if (gradient == null) { return; } @@ -15522,7 +14960,7 @@ var SGDOptimizer = class extends Optimizer { SGDOptimizer.className = "SGD"; registerClass(SGDOptimizer); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/optimizers/momentum_optimizer.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/optimizers/momentum_optimizer.js var MomentumOptimizer = class extends SGDOptimizer { constructor(learningRate, momentum, useNesterov = false) { super(learningRate); @@ -15534,17 +14972,17 @@ var MomentumOptimizer = class extends SGDOptimizer { } applyGradients(variableGradients) { const variableNames = Array.isArray(variableGradients) ? variableGradients.map((item) => item.name) : Object.keys(variableGradients); - variableNames.forEach((name, i) => { + variableNames.forEach((name, i2) => { const value = ENGINE.registeredVariables[name]; - if (this.accumulations[i] == null) { + if (this.accumulations[i2] == null) { const trainable = false; - this.accumulations[i] = { + this.accumulations[i2] = { originalName: `${name}/momentum`, variable: tidy(() => zerosLike(value).variable(trainable)) }; } - const accumulation = this.accumulations[i].variable; - const gradient = Array.isArray(variableGradients) ? variableGradients[i].tensor : variableGradients[name]; + const accumulation = this.accumulations[i2].variable; + const gradient = Array.isArray(variableGradients) ? variableGradients[i2].tensor : variableGradients[name]; if (gradient == null) { return; } @@ -15593,7 +15031,7 @@ var MomentumOptimizer = class extends SGDOptimizer { MomentumOptimizer.className = "Momentum"; registerClass(MomentumOptimizer); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/optimizers/rmsprop_optimizer.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/optimizers/rmsprop_optimizer.js var RMSPropOptimizer = class extends Optimizer { constructor(learningRate, decay = 0.9, momentum = 0, epsilon3 = null, centered = false) { super(); @@ -15614,37 +15052,37 @@ var RMSPropOptimizer = class extends Optimizer { } applyGradients(variableGradients) { const variableNames = Array.isArray(variableGradients) ? variableGradients.map((item) => item.name) : Object.keys(variableGradients); - variableNames.forEach((name, i) => { + variableNames.forEach((name, i2) => { const value = ENGINE.registeredVariables[name]; const trainable = false; - if (this.accumulatedMeanSquares[i] == null) { - this.accumulatedMeanSquares[i] = { + if (this.accumulatedMeanSquares[i2] == null) { + this.accumulatedMeanSquares[i2] = { originalName: `${name}/rms`, variable: tidy(() => zerosLike(value).variable(trainable)) }; } - if (this.accumulatedMoments[i] == null) { - this.accumulatedMoments[i] = { + if (this.accumulatedMoments[i2] == null) { + this.accumulatedMoments[i2] = { originalName: `${name}/momentum`, variable: tidy(() => zerosLike(value).variable(trainable)) }; } - if (this.accumulatedMeanGrads[i] == null && this.centered) { - this.accumulatedMeanGrads[i] = { + if (this.accumulatedMeanGrads[i2] == null && this.centered) { + this.accumulatedMeanGrads[i2] = { originalName: `${name}/mg`, variable: tidy(() => zerosLike(value).variable(trainable)) }; } - const gradient = Array.isArray(variableGradients) ? variableGradients[i].tensor : variableGradients[name]; + const gradient = Array.isArray(variableGradients) ? variableGradients[i2].tensor : variableGradients[name]; if (gradient == null) { return; } - const accumulatedMeanSquare = this.accumulatedMeanSquares[i].variable; - const accumulatedMoments = this.accumulatedMoments[i].variable; + const accumulatedMeanSquare = this.accumulatedMeanSquares[i2].variable; + const accumulatedMoments = this.accumulatedMoments[i2].variable; tidy(() => { const newAccumulatedMeanSquare = add2(mul(accumulatedMeanSquare, this.decay), mul(square(gradient), 1 - this.decay)); if (this.centered) { - const accumulatedMeanGrad = this.accumulatedMeanGrads[i].variable; + const accumulatedMeanGrad = this.accumulatedMeanGrads[i2].variable; const newAccumulatedMeanGrad = add2(mul(accumulatedMeanGrad, this.decay), mul(gradient, 1 - this.decay)); const gradContribution = div(mul(gradient, this.learningRate), sqrt(sub(newAccumulatedMeanSquare, add2(square(newAccumulatedMeanGrad), this.epsilon)))); const newAccumulatedMoments = add2(mul(accumulatedMoments, this.momentum), gradContribution); @@ -15718,7 +15156,7 @@ var RMSPropOptimizer = class extends Optimizer { RMSPropOptimizer.className = "RMSProp"; registerClass(RMSPropOptimizer); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/optimizers/optimizer_constructors.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/optimizers/optimizer_constructors.js var OptimizerConstructors = class { static sgd(learningRate) { return new SGDOptimizer(learningRate); @@ -15743,7 +15181,7 @@ var OptimizerConstructors = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/train.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/train.js var train = { sgd: OptimizerConstructors.sgd, momentum: OptimizerConstructors.momentum, @@ -15754,7 +15192,7 @@ var train = { adam: OptimizerConstructors.adam }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/browser_util.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/browser_util.js var delayCallback = (() => { if (typeof requestAnimationFrame !== "undefined") { return requestAnimationFrame; @@ -15767,7 +15205,7 @@ function nextFrame() { return new Promise((resolve) => delayCallback(() => resolve())); } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/backends/backend_util.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/backends/backend_util.js var backend_util_exports = {}; __export(backend_util_exports, { ERF_A1: () => ERF_A1, @@ -15857,29 +15295,29 @@ __export(backend_util_exports, { warn: () => warn }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/concat_util.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/concat_util.js function assertParamsConsistent(shapes, axis) { const rank = shapes[0].length; - shapes.forEach((shape, i) => { - assert(shape.length === rank, () => `Error in concat${rank}D: rank of tensors[${i}] must be the same as the rank of the rest (${rank})`); + shapes.forEach((shape, i2) => { + assert(shape.length === rank, () => `Error in concat${rank}D: rank of tensors[${i2}] must be the same as the rank of the rest (${rank})`); }); assert(axis >= 0 && axis < rank, () => `Error in concat${rank}D: axis must be between 0 and ${rank - 1}.`); const firstShape = shapes[0]; - shapes.forEach((shape, i) => { - for (let r = 0; r < rank; r++) { - assert(r === axis || shape[r] === firstShape[r], () => `Error in concat${rank}D: Shape of tensors[${i}] (${shape}) does not match the shape of the rest (${firstShape}) along the non-concatenated axis ${i}.`); + shapes.forEach((shape, i2) => { + for (let r2 = 0; r2 < rank; r2++) { + assert(r2 === axis || shape[r2] === firstShape[r2], () => `Error in concat${rank}D: Shape of tensors[${i2}] (${shape}) does not match the shape of the rest (${firstShape}) along the non-concatenated axis ${i2}.`); } }); } function computeOutShape2(shapes, axis) { const outputShape = shapes[0].slice(); - for (let i = 1; i < shapes.length; i++) { - outputShape[axis] += shapes[i][axis]; + for (let i2 = 1; i2 < shapes.length; i2++) { + outputShape[axis] += shapes[i2][axis]; } return outputShape; } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/ragged_to_dense_util.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/ragged_to_dense_util.js var RowPartitionType; (function(RowPartitionType3) { RowPartitionType3[RowPartitionType3["FIRST_DIM_SIZE"] = 0] = "FIRST_DIM_SIZE"; @@ -15907,14 +15345,14 @@ function combineRaggedTensorToTensorShapes(raggedRank, shape, valueShape) { if (raggedRank + valueShape.length !== outputShape.length) { throw new Error(`rt input.shape and shape=${shape} are incompatible: rt input.rank = ${raggedRank + valueShape.length}, but shape.rank = ${outputShape.length}`); } - for (let i = 1; i < valueShape.length; ++i) { - const valueDim = valueShape[i]; - const outputShapeDimIndex = outputShape[outputShape.length - valueShape.length + i]; + for (let i2 = 1; i2 < valueShape.length; ++i2) { + const valueDim = valueShape[i2]; + const outputShapeDimIndex = outputShape[outputShape.length - valueShape.length + i2]; const outputShapeDim = outputShape[outputShapeDimIndex]; if (valueDim >= 0) { if (outputShapeDim >= 0) { if (outputShapeDim !== valueDim) { - throw new Error(`rt input.shape and shape=${shape} are incompatible: rt input.shape[${i + raggedRank}] = ${valueDim} but shape[${i + raggedRank}] = ${outputShapeDim}`); + throw new Error(`rt input.shape and shape=${shape} are incompatible: rt input.shape[${i2 + raggedRank}] = ${valueDim} but shape[${i2 + raggedRank}] = ${outputShapeDim}`); } } else { outputShape[outputShapeDimIndex] = valueDim; @@ -15960,16 +15398,16 @@ function validateDefaultValueShape(defaultValueShape, valueShape) { if (defaultNDims >= valuesNDims) { throw new Error(`defaultValue.shape=${defaultValueShape} and ragged tensor flatValues.shape=${valueShape}, are incompatible: defaultValue.rank = ${defaultNDims} must be less than ragged tensor input flatValues.rank = ${valuesNDims})`); } - for (let i = 0; i < Math.min(defaultNDims, valuesNDims - 1); ++i) { - const defaultDim = defaultValueShape[i]; - const valueDim = valueShape[i + 1]; + for (let i2 = 0; i2 < Math.min(defaultNDims, valuesNDims - 1); ++i2) { + const defaultDim = defaultValueShape[i2]; + const valueDim = valueShape[i2 + 1]; if (defaultDim >= 0 && valueDim >= 0 && defaultDim !== 1 && defaultDim !== valueDim) { - throw new Error(`defaultValue.shape=${defaultValueShape}, and ragged tensor input flatValues.shape=${valueShape} are incompatible: defaultValue.shape[${i - defaultValueShape.length}] = ${defaultDim} but ragged tensor input.flatValues.shape[${i - defaultValueShape.length}] = ${valueDim}`); + throw new Error(`defaultValue.shape=${defaultValueShape}, and ragged tensor input flatValues.shape=${valueShape} are incompatible: defaultValue.shape[${i2 - defaultValueShape.length}] = ${defaultDim} but ragged tensor input.flatValues.shape[${i2 - defaultValueShape.length}] = ${valueDim}`); } } } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/reduce_util.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/reduce_util.js var PARALLELIZE_THRESHOLD = 30; function computeOptimalWindowSize(inSize) { if (inSize <= PARALLELIZE_THRESHOLD) { @@ -15978,14 +15416,14 @@ function computeOptimalWindowSize(inSize) { return nearestDivisor(inSize, Math.floor(Math.sqrt(inSize))); } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/rotate_util.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/rotate_util.js function getImageCenter(center, imageHeight, imageWidth) { const centerX = imageWidth * (typeof center === "number" ? center : center[0]); const centerY = imageHeight * (typeof center === "number" ? center : center[1]); return [centerX, centerY]; } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/array_ops_util.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/array_ops_util.js function getReshaped(inputShape, blockShape, prod6, batchToSpace = true) { let reshaped = []; if (batchToSpace) { @@ -15995,8 +15433,8 @@ function getReshaped(inputShape, blockShape, prod6, batchToSpace = true) { } else { reshaped = reshaped.concat(inputShape[0]); const spatialLength = blockShape.length; - for (let i = 0; i < spatialLength; ++i) { - reshaped = reshaped.concat([inputShape[i + 1] / blockShape[i], blockShape[i]]); + for (let i2 = 0; i2 < spatialLength; ++i2) { + reshaped = reshaped.concat([inputShape[i2 + 1] / blockShape[i2], blockShape[i2]]); } reshaped = reshaped.concat(inputShape.slice(spatialLength + 1)); } @@ -16006,22 +15444,22 @@ function getPermuted(reshapedRank, blockShapeRank, batchToSpace = true) { const permuted = []; if (batchToSpace) { permuted.push(blockShapeRank); - for (let i = blockShapeRank + 1; i < reshapedRank; ++i) { - if (i <= 2 * blockShapeRank) { - permuted.push(i); - permuted.push(i - (blockShapeRank + 1)); + for (let i2 = blockShapeRank + 1; i2 < reshapedRank; ++i2) { + if (i2 <= 2 * blockShapeRank) { + permuted.push(i2); + permuted.push(i2 - (blockShapeRank + 1)); } else { - permuted.push(i); + permuted.push(i2); } } } else { const permutedBeforeBatch = []; const permutedAfterBatch = []; - for (let i = 1; i < reshapedRank; ++i) { - if (i >= blockShapeRank * 2 + 1 || i % 2 === 1) { - permutedAfterBatch.push(i); + for (let i2 = 1; i2 < reshapedRank; ++i2) { + if (i2 >= blockShapeRank * 2 + 1 || i2 % 2 === 1) { + permutedAfterBatch.push(i2); } else { - permutedBeforeBatch.push(i); + permutedBeforeBatch.push(i2); } } permuted.push(...permutedBeforeBatch); @@ -16037,39 +15475,39 @@ function getReshapedPermuted(inputShape, blockShape, prod6, batchToSpace = true) } else { reshapedPermuted.push(inputShape[0] * prod6); } - for (let i = 1; i < inputShape.length; ++i) { - if (i <= blockShape.length) { + for (let i2 = 1; i2 < inputShape.length; ++i2) { + if (i2 <= blockShape.length) { if (batchToSpace) { - reshapedPermuted.push(blockShape[i - 1] * inputShape[i]); + reshapedPermuted.push(blockShape[i2 - 1] * inputShape[i2]); } else { - reshapedPermuted.push(inputShape[i] / blockShape[i - 1]); + reshapedPermuted.push(inputShape[i2] / blockShape[i2 - 1]); } } else { - reshapedPermuted.push(inputShape[i]); + reshapedPermuted.push(inputShape[i2]); } } return reshapedPermuted; } function getSliceBeginCoords(crops, blockShape) { const sliceBeginCoords = [0]; - for (let i = 0; i < blockShape; ++i) { - sliceBeginCoords.push(crops[i][0]); + for (let i2 = 0; i2 < blockShape; ++i2) { + sliceBeginCoords.push(crops[i2][0]); } return sliceBeginCoords; } function getSliceSize(uncroppedShape, crops, blockShape) { const sliceSize = uncroppedShape.slice(0, 1); - for (let i = 0; i < blockShape; ++i) { - sliceSize.push(uncroppedShape[i + 1] - crops[i][0] - crops[i][1]); + for (let i2 = 0; i2 < blockShape; ++i2) { + sliceSize.push(uncroppedShape[i2 + 1] - crops[i2][0] - crops[i2][1]); } return sliceSize; } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/selu_util.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/selu_util.js var SELU_SCALEALPHA = 1.7580993408473768; var SELU_SCALE = 1.0507009873554805; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/erf_util.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/erf_util.js var ERF_P = 0.3275911; var ERF_A1 = 0.254829592; var ERF_A2 = -0.284496736; @@ -16077,24 +15515,24 @@ var ERF_A3 = 1.421413741; var ERF_A4 = -1.453152027; var ERF_A5 = 1.061405429; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/backends/complex_util.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/backends/complex_util.js function mergeRealAndImagArrays(real5, imag5) { if (real5.length !== imag5.length) { throw new Error(`Cannot merge real and imag arrays of different lengths. real:${real5.length}, imag: ${imag5.length}.`); } const result = new Float32Array(real5.length * 2); - for (let i = 0; i < result.length; i += 2) { - result[i] = real5[i / 2]; - result[i + 1] = imag5[i / 2]; + for (let i2 = 0; i2 < result.length; i2 += 2) { + result[i2] = real5[i2 / 2]; + result[i2 + 1] = imag5[i2 / 2]; } return result; } function splitRealAndImagArrays(complex5) { const real5 = new Float32Array(complex5.length / 2); const imag5 = new Float32Array(complex5.length / 2); - for (let i = 0; i < complex5.length; i += 2) { - real5[i / 2] = complex5[i]; - imag5[i / 2] = complex5[i + 1]; + for (let i2 = 0; i2 < complex5.length; i2 += 2) { + real5[i2 / 2] = complex5[i2]; + imag5[i2 / 2] = complex5[i2 + 1]; } return { real: real5, imag: imag5 }; } @@ -16102,9 +15540,9 @@ function complexWithEvenIndex(complex5) { const len = Math.ceil(complex5.length / 4); const real5 = new Float32Array(len); const imag5 = new Float32Array(len); - for (let i = 0; i < complex5.length; i += 4) { - real5[Math.floor(i / 4)] = complex5[i]; - imag5[Math.floor(i / 4)] = complex5[i + 1]; + for (let i2 = 0; i2 < complex5.length; i2 += 4) { + real5[Math.floor(i2 / 4)] = complex5[i2]; + imag5[Math.floor(i2 / 4)] = complex5[i2 + 1]; } return { real: real5, imag: imag5 }; } @@ -16112,9 +15550,9 @@ function complexWithOddIndex(complex5) { const len = Math.floor(complex5.length / 4); const real5 = new Float32Array(len); const imag5 = new Float32Array(len); - for (let i = 2; i < complex5.length; i += 4) { - real5[Math.floor(i / 4)] = complex5[i]; - imag5[Math.floor(i / 4)] = complex5[i + 1]; + for (let i2 = 2; i2 < complex5.length; i2 += 4) { + real5[Math.floor(i2 / 4)] = complex5[i2]; + imag5[Math.floor(i2 / 4)] = complex5[i2 + 1]; } return { real: real5, imag: imag5 }; } @@ -16127,24 +15565,24 @@ function assignToTypedArray(data, real5, imag5, index) { data[index * 2] = real5; data[index * 2 + 1] = imag5; } -function exponents(n, inverse) { - const real5 = new Float32Array(n / 2); - const imag5 = new Float32Array(n / 2); - for (let i = 0; i < Math.ceil(n / 2); i++) { - const x = (inverse ? 2 : -2) * Math.PI * (i / n); - real5[i] = Math.cos(x); - imag5[i] = Math.sin(x); +function exponents(n2, inverse) { + const real5 = new Float32Array(n2 / 2); + const imag5 = new Float32Array(n2 / 2); + for (let i2 = 0; i2 < Math.ceil(n2 / 2); i2++) { + const x = (inverse ? 2 : -2) * Math.PI * (i2 / n2); + real5[i2] = Math.cos(x); + imag5[i2] = Math.sin(x); } return { real: real5, imag: imag5 }; } -function exponent(k, n, inverse) { - const x = (inverse ? 2 : -2) * Math.PI * (k / n); +function exponent(k, n2, inverse) { + const x = (inverse ? 2 : -2) * Math.PI * (k / n2); const real5 = Math.cos(x); const imag5 = Math.sin(x); return { real: real5, imag: imag5 }; } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/backends/einsum_util.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/backends/einsum_util.js var ARROW = "->"; var ARROW_REGEX = /->/g; var COMMA = ","; @@ -16168,8 +15606,8 @@ function decodeEinsumEquation(equation, numTensors) { throw new Error("Support for more than 2 input tensors is not implemented yet."); } const allDims = []; - for (let i = 0; i < outputString.length; ++i) { - const dimName = outputString[i]; + for (let i2 = 0; i2 < outputString.length; ++i2) { + const dimName = outputString[i2]; if (!inputTerms.some((inputTerm) => inputTerm.indexOf(dimName) !== -1)) { throw new Error(`Output subscripts contain the label ${dimName} not present in the input subscripts.`); } @@ -16177,40 +15615,40 @@ function decodeEinsumEquation(equation, numTensors) { allDims.push(dimName); } } - for (let i = 0; i < inputString.length; ++i) { - const dimName = inputString[i]; + for (let i2 = 0; i2 < inputString.length; ++i2) { + const dimName = inputString[i2]; if (allDims.indexOf(dimName) === -1 && dimName !== COMMA) { allDims.push(dimName); } } const idDims = new Array(inputTerms.length); - for (let i = 0; i < numInputs; ++i) { - if (new Set(inputTerms[i].split("")).size !== inputTerms[i].length) { - throw new Error(`Found duplicate axes in input component ${inputTerms[i]}. Support for duplicate axes in input is not implemented yet.`); + for (let i2 = 0; i2 < numInputs; ++i2) { + if (new Set(inputTerms[i2].split("")).size !== inputTerms[i2].length) { + throw new Error(`Found duplicate axes in input component ${inputTerms[i2]}. Support for duplicate axes in input is not implemented yet.`); } - idDims[i] = []; - for (let j = 0; j < inputTerms[i].length; ++j) { - idDims[i].push(allDims.indexOf(inputTerms[i][j])); + idDims[i2] = []; + for (let j = 0; j < inputTerms[i2].length; ++j) { + idDims[i2].push(allDims.indexOf(inputTerms[i2][j])); } } const numDims = allDims.length; const numOutDims = outputString.length; const summedDims = []; - for (let i = numOutDims; i < numDims; ++i) { - summedDims.push(i); + for (let i2 = numOutDims; i2 < numDims; ++i2) { + summedDims.push(i2); } return { allDims, summedDims, idDims }; } function getEinsumPermutation(nDims, idDims) { let permutationIndices = new Array(nDims); permutationIndices.fill(-1); - for (let i = 0; i < idDims.length; ++i) { - permutationIndices[idDims[i]] = i; + for (let i2 = 0; i2 < idDims.length; ++i2) { + permutationIndices[idDims[i2]] = i2; } const expandDims7 = []; - for (let i = 0; i < nDims; ++i) { - if (permutationIndices[i] === -1) { - expandDims7.push(i); + for (let i2 = 0; i2 < nDims; ++i2) { + if (permutationIndices[i2] === -1) { + expandDims7.push(i2); } } permutationIndices = permutationIndices.filter((d) => d !== -1); @@ -16218,13 +15656,13 @@ function getEinsumPermutation(nDims, idDims) { } function checkEinsumDimSizes(nDims, idDims, tensors) { const dimSizes = new Array(nDims); - for (let i = 0; i < tensors.length; ++i) { - const shape = tensors[i].shape; - for (let j = 0; j < idDims[i].length; ++j) { - if (dimSizes[idDims[i][j]] === void 0) { - dimSizes[idDims[i][j]] = shape[j]; + for (let i2 = 0; i2 < tensors.length; ++i2) { + const shape = tensors[i2].shape; + for (let j = 0; j < idDims[i2].length; ++j) { + if (dimSizes[idDims[i2][j]] === void 0) { + dimSizes[idDims[i2][j]] = shape[j]; } else { - assert(dimSizes[idDims[i][j]] === shape[j], () => `Expected dimension ${dimSizes[idDims[i][j]]} at axis ${j} of input shaped ${JSON.stringify(shape)}, but got dimension ${shape[j]}`); + assert(dimSizes[idDims[i2][j]] === shape[j], () => `Expected dimension ${dimSizes[idDims[i2][j]]} at axis ${j} of input shaped ${JSON.stringify(shape)}, but got dimension ${shape[j]}`); } } } @@ -16237,16 +15675,16 @@ function getEinsumComputePath(summedDims, idDims) { path.push(-1); } nSteps = summedDims.length + 1; - for (let i = 0; i < nSteps; ++i) { + for (let i2 = 0; i2 < nSteps; ++i2) { steps.push([]); } const computedTermIndices = []; - for (let i = 0; i < path.length; ++i) { - const summedDim = path[i]; + for (let i2 = 0; i2 < path.length; ++i2) { + const summedDim = path[i2]; const termIndices = findTermsWithDim(idDims, summedDim); for (const termIndex of termIndices) { if (computedTermIndices.indexOf(termIndex) === -1) { - steps[i].push(termIndex); + steps[i2].push(termIndex); computedTermIndices.push(termIndex); } } @@ -16258,15 +15696,15 @@ function isIdentityPermutation(perm) { } function findTermsWithDim(idDims, dim) { const termIndices = []; - for (let i = 0; i < idDims.length; ++i) { - if (idDims[i].length === 0 || idDims[i].indexOf(dim) !== -1 || dim === -1) { - termIndices.push(i); + for (let i2 = 0; i2 < idDims.length; ++i2) { + if (idDims[i2].length === 0 || idDims[i2].indexOf(dim) !== -1 || dim === -1) { + termIndices.push(i2); } } return termIndices; } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/split_util.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/split_util.js function prepareSplitSize(x, numOrSizeSplits, axis = 0) { let splitSizes = []; if (typeof numOrSizeSplits === "number") { @@ -16291,7 +15729,7 @@ function prepareSplitSize(x, numOrSizeSplits, axis = 0) { return splitSizes; } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/sparse/sparse_fill_empty_rows_util.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/sparse/sparse_fill_empty_rows_util.js function getSparseFillEmptyRowsIndicesDenseShapeMismatch(indicesLength) { return `Received SparseTensor with denseShape[0] = 0 but indices.shape[0] = ${indicesLength}`; @@ -16303,7 +15741,7 @@ function getSparseFillEmptyRowsOutOfRangeIndexErrorMessage(index, value, limit) return `indices(${index}, 0) is invalid: ${value} >= ${limit}`; } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/sparse/sparse_reshape_util.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/sparse/sparse_reshape_util.js function getSparseReshapeMultipleNegativeOneOutputDimErrorMessage(dim1, dim2) { return `only one output dimension may be -1, not both ${dim1} and ${dim2}`; } @@ -16325,7 +15763,7 @@ function getSparseReshapeInputOutputMismatchErrorMessage(inputShape, outputShape return `Input to reshape is a tensor with ${inputSize} dense values, but the requested shape has ${outputSize}. inputShape=${inputShape} outputShape=${outputShape}`; } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/sparse/sparse_segment_reduction_util.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/sparse/sparse_segment_reduction_util.js function getSparseSegmentReductionNegativeSegmentIdsErrorMessage() { return `segment ids must be >= 0`; } @@ -16339,7 +15777,7 @@ function getSparseSegmentReductionIndicesOutOfRangeErrorMessage(index, indexValu return `Bad: indices[${index}] == ${indexValue} out of range [0, ${inputRows})`; } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/segment_util.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/segment_util.js var segment_util_exports = {}; __export(segment_util_exports, { collectGatherOpShapeInfo: () => collectGatherOpShapeInfo, @@ -16394,9 +15832,9 @@ function collectGatherOpShapeInfo(x, indices, axis, batchDims) { if (axis < batchDims) { throw new Error(`batchDims (${batchDims}) must be less than or equal to axis (${axis}).`); } - for (let i = 0; i < batchDims; ++i) { - if (x.shape[i] !== indices.shape[i]) { - throw new Error(`x.shape[${i}]: ${x.shape[i]} should be equal to indices.shape[${i}]: ${indices.shape[i]}.`); + for (let i2 = 0; i2 < batchDims; ++i2) { + if (x.shape[i2] !== indices.shape[i2]) { + throw new Error(`x.shape[${i2}]: ${x.shape[i2]} should be equal to indices.shape[${i2}]: ${indices.shape[i2]}.`); } } const dimSize = x.shape[axis]; @@ -16404,25 +15842,25 @@ function collectGatherOpShapeInfo(x, indices, axis, batchDims) { let batchSize = 1; let outerSize = 1; let sliceSize = 1; - for (let i = 0; i < batchDims; ++i) { - outputShape.push(x.shape[i]); - batchSize *= x.shape[i]; + for (let i2 = 0; i2 < batchDims; ++i2) { + outputShape.push(x.shape[i2]); + batchSize *= x.shape[i2]; } - for (let i = batchDims; i < axis; i++) { - outputShape.push(x.shape[i]); - outerSize *= x.shape[i]; + for (let i2 = batchDims; i2 < axis; i2++) { + outputShape.push(x.shape[i2]); + outerSize *= x.shape[i2]; } - for (let i = batchDims; i < indicesRank; i++) { - outputShape.push(indices.shape[i]); + for (let i2 = batchDims; i2 < indicesRank; i2++) { + outputShape.push(indices.shape[i2]); } - for (let i = axis + 1; i < xRank; i++) { - outputShape.push(x.shape[i]); - sliceSize *= x.shape[i]; + for (let i2 = axis + 1; i2 < xRank; i2++) { + outputShape.push(x.shape[i2]); + sliceSize *= x.shape[i2]; } return { batchSize, sliceSize, outerSize, dimSize, outputShape }; } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/backends/backend_util.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/backends/backend_util.js function fromUint8ToStringArray(vals) { try { return vals.map((val) => decodeString(val)); @@ -16431,10 +15869,10 @@ function fromUint8ToStringArray(vals) { } } function fromStringArrayToUint8(strings) { - return strings.map((s) => encodeString(s)); + return strings.map((s2) => encodeString(s2)); } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/backends/kernel_impls.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/backends/kernel_impls.js var kernel_impls_exports = {}; __export(kernel_impls_exports, { nonMaxSuppressionV3Impl: () => nonMaxSuppressionV3Impl, @@ -16443,7 +15881,7 @@ __export(kernel_impls_exports, { whereImpl: () => whereImpl }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Abs_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Abs_grad.js var absGradConfig = { kernelName: Abs, inputsToSave: ["x"], @@ -16453,7 +15891,7 @@ var absGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Acos_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Acos_grad.js var acosGradConfig = { kernelName: Acos, inputsToSave: ["x"], @@ -16469,7 +15907,7 @@ var acosGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Acosh_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Acosh_grad.js var acoshGradConfig = { kernelName: Acosh, inputsToSave: ["x"], @@ -16484,7 +15922,7 @@ var acoshGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Add_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Add_grad.js var addGradConfig = { kernelName: Add, inputsToSave: ["a", "b"], @@ -16511,20 +15949,20 @@ var addGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/AddN_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/AddN_grad.js var addNGradConfig = { kernelName: AddN, saveAllInputs: true, gradFunc: (dy, saved) => { const ders = {}; - saved.forEach((_, i) => { - ders[i] = () => dy.clone(); + saved.forEach((_, i2) => { + ders[i2] = () => dy.clone(); }); return ders; } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/ArgMax_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/ArgMax_grad.js var argMaxGradConfig = { kernelName: ArgMax, inputsToSave: ["x"], @@ -16534,7 +15972,7 @@ var argMaxGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/ArgMin_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/ArgMin_grad.js var argMinGradConfig = { kernelName: ArgMin, inputsToSave: ["x"], @@ -16544,7 +15982,7 @@ var argMinGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Asin_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Asin_grad.js var asinGradConfig = { kernelName: Asin, inputsToSave: ["x"], @@ -16554,7 +15992,7 @@ var asinGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Asinh_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Asinh_grad.js var asinhGradConfig = { kernelName: Asinh, inputsToSave: ["x"], @@ -16569,7 +16007,7 @@ var asinhGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Atan2_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Atan2_grad.js var atan2GradConfig = { kernelName: Atan2, inputsToSave: ["a", "b"], @@ -16598,7 +16036,7 @@ var atan2GradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Atan_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Atan_grad.js var atanGradConfig = { kernelName: Atan, inputsToSave: ["x"], @@ -16608,7 +16046,7 @@ var atanGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Atanh_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Atanh_grad.js var atanhGradConfig = { kernelName: Atanh, inputsToSave: ["x"], @@ -16618,7 +16056,7 @@ var atanhGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/avg_pool_3d_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/avg_pool_3d_grad.js function avgPool3dGrad_(dy, input2, filterSize, strides, pad3, dimRoundingMode) { const $dy = convertToTensor(dy, "dy", "avgPool3dGrad"); const $input = convertToTensor(input2, "input", "avgPool3dGrad"); @@ -16649,7 +16087,7 @@ function avgPool3dGrad_(dy, input2, filterSize, strides, pad3, dimRoundingMode) } var avgPool3dGrad = op({ avgPool3dGrad_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/AvgPool3D_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/AvgPool3D_grad.js var avgPool3DGradConfig = { kernelName: AvgPool3D, inputsToSave: ["x"], @@ -16662,7 +16100,7 @@ var avgPool3DGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/avg_pool_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/avg_pool_grad.js function avgPoolGrad_(dy, input2, filterSize, strides, pad3) { const $dy = convertToTensor(dy, "dy", "avgPoolGrad"); const $input = convertToTensor(input2, "input", "avgPoolGrad"); @@ -16687,7 +16125,7 @@ function avgPoolGrad_(dy, input2, filterSize, strides, pad3) { } var avgPoolGrad = op({ avgPoolGrad_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/AvgPool_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/AvgPool_grad.js var avgPoolGradConfig = { kernelName: AvgPool, inputsToSave: ["x"], @@ -16698,7 +16136,7 @@ var avgPoolGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/BatchMatMul_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/BatchMatMul_grad.js var batchMatMulGradConfig = { kernelName: BatchMatMul, inputsToSave: ["a", "b"], @@ -16729,7 +16167,7 @@ var batchMatMulGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/BatchToSpaceND_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/BatchToSpaceND_grad.js var batchToSpaceNDGradConfig = { kernelName: BatchToSpaceND, gradFunc: (dy, saved, attrs) => { @@ -16738,7 +16176,7 @@ var batchToSpaceNDGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/BroadcastTo_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/BroadcastTo_grad.js var broadcastToGradConfig = { kernelName: BroadcastTo, gradFunc: (dy, saved, attrs) => { @@ -16746,24 +16184,24 @@ var broadcastToGradConfig = { const inputShape = broadCastToAttrs.inputShape; const outputShape = broadCastToAttrs.shape; const reps = Array.from(outputShape); - for (let i = inputShape.length - 1; i >= 0; i--) { - if (inputShape[i] === outputShape[i]) { - reps[i] = 1; - } else if (inputShape[i] !== 1) { + for (let i2 = inputShape.length - 1; i2 >= 0; i2--) { + if (inputShape[i2] === outputShape[i2]) { + reps[i2] = 1; + } else if (inputShape[i2] !== 1) { throw new Error(`broadcastTo(): [${inputShape}] cannot be broadcast to [${outputShape}].`); } } const axes = []; - for (let i = 0; i < reps.length; i++) { - if (reps[i] > 1) { - axes.push(i); + for (let i2 = 0; i2 < reps.length; i2++) { + if (reps[i2] > 1) { + axes.push(i2); } } return { x: () => sum2(dy, axes, true) }; } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Cast_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Cast_grad.js var castGradConfig = { kernelName: Cast, gradFunc: (dy) => { @@ -16771,7 +16209,7 @@ var castGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Ceil_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Ceil_grad.js var ceilGradConfig = { kernelName: Ceil, gradFunc: (dy) => { @@ -16779,7 +16217,7 @@ var ceilGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/ClipByValue_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/ClipByValue_grad.js var clipByValueGradConfig = { kernelName: ClipByValue, inputsToSave: ["x"], @@ -16792,28 +16230,28 @@ var clipByValueGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/ComplexAbs_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/ComplexAbs_grad.js var complexAbsGradConfig = { kernelName: ComplexAbs, inputsToSave: ["x"], gradFunc: absGradConfig.gradFunc }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Concat_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Concat_grad.js var concatGradConfig = { kernelName: Concat, saveAllInputs: true, gradFunc: (dy, saved, attrs) => { - const shapes = saved.map((t) => t.shape); + const shapes = saved.map((t2) => t2.shape); const { axis } = attrs; const $axis = parseAxisParam(axis, saved[0].shape)[0]; - const sizeSplits = shapes.map((s) => s[$axis]); + const sizeSplits = shapes.map((s2) => s2[$axis]); const derTensors = split(dy, sizeSplits, $axis); - return derTensors.map((t) => () => t); + return derTensors.map((t2) => () => t2); } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Conv2D_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Conv2D_grad.js var conv2DGradConfig = { kernelName: Conv2D, inputsToSave: ["x", "filter"], @@ -16828,7 +16266,7 @@ var conv2DGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Conv2DBackpropInput_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Conv2DBackpropInput_grad.js var conv2DBackpropInputGradConfig = { kernelName: Conv2DBackpropInput, inputsToSave: ["dy", "filter"], @@ -16842,7 +16280,7 @@ var conv2DBackpropInputGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/conv3d_backprop_filter.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/conv3d_backprop_filter.js function conv3DBackpropFilter_(x, dy, filterShape, strides, pad3) { let x5D = x; if (x.rank === 4) { @@ -16863,7 +16301,7 @@ function conv3DBackpropFilter_(x, dy, filterShape, strides, pad3) { } var conv3DBackpropFilter = op({ conv3DBackpropFilter_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Conv3D_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Conv3D_grad.js var conv3DGradConfig = { kernelName: Conv3D, inputsToSave: ["x", "filter"], @@ -16878,7 +16316,7 @@ var conv3DGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Cos_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Cos_grad.js var cosGradConfig = { kernelName: Cos, inputsToSave: ["x"], @@ -16888,7 +16326,7 @@ var cosGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Cosh_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Cosh_grad.js var coshGradConfig = { kernelName: Cosh, inputsToSave: ["x"], @@ -16898,7 +16336,7 @@ var coshGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Cumsum_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Cumsum_grad.js var cumsumGradConfig = { kernelName: Cumsum, inputsToSave: ["x"], @@ -16918,7 +16356,7 @@ var cumsumGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/DepthwiseConv2dNative_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/DepthwiseConv2dNative_grad.js var depthwiseConv2dNativeGradConfig = { kernelName: DepthwiseConv2dNative, inputsToSave: ["x", "filter"], @@ -16939,7 +16377,7 @@ var depthwiseConv2dNativeGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Dilation2D_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Dilation2D_grad.js var dilation2dGradConfig = { kernelName: Dilation2D, inputsToSave: ["x", "filter"], @@ -16954,7 +16392,7 @@ var dilation2dGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Elu_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Elu_grad.js var eluGradConfig = { kernelName: Elu, outputsToSave: [true], @@ -16965,7 +16403,7 @@ var eluGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Erf_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Erf_grad.js var erfGradConfig = { kernelName: Erf, inputsToSave: ["x"], @@ -16976,7 +16414,7 @@ var erfGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Exp_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Exp_grad.js var expGradConfig = { kernelName: Exp, outputsToSave: [true], @@ -16986,7 +16424,7 @@ var expGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/ExpandDims_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/ExpandDims_grad.js var expandDimsGradConfig = { kernelName: ExpandDims, inputsToSave: ["input"], @@ -16996,7 +16434,7 @@ var expandDimsGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Expm1_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Expm1_grad.js var expm1GradConfig = { kernelName: Expm1, inputsToSave: ["x"], @@ -17006,7 +16444,7 @@ var expm1GradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Floor_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Floor_grad.js var floorGradConfig = { kernelName: Floor, gradFunc: (dy) => { @@ -17014,7 +16452,7 @@ var floorGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/FloorDiv_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/FloorDiv_grad.js var floorDivGradConfig = { kernelName: FloorDiv, inputsToSave: ["a", "b"], @@ -17042,7 +16480,7 @@ var floorDivGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/FusedBatchNorm_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/FusedBatchNorm_grad.js var fusedBatchNormGradConfig = { kernelName: FusedBatchNorm, inputsToSave: ["x", "mean", "variance", "scale"], @@ -17053,8 +16491,8 @@ var fusedBatchNormGradConfig = { const reductionAxes = getReductionAxes(mean5.shape, x.shape); const tileShape = []; if (mean5.rank === 1) { - for (let i = 0; i < x.shape.length - 1; ++i) { - tileShape.push(x.shape[i]); + for (let i2 = 0; i2 < x.shape.length - 1; ++i2) { + tileShape.push(x.shape[i2]); } tileShape.push(1); } @@ -17108,7 +16546,7 @@ var fusedBatchNormGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/GatherV2_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/GatherV2_grad.js var gatherGradConfig = { kernelName: GatherV2, inputsToSave: ["x", "indices"], @@ -17140,22 +16578,22 @@ var gatherGradConfig = { }; function arrayRange(start, stop) { const result = []; - for (let i = start; i < stop; ++i) { - result.push(i); + for (let i2 = start; i2 < stop; ++i2) { + result.push(i2); } return result; } function arrayConcat(arrays) { const result = []; - for (let i = 0; i < arrays.length; ++i) { - for (let j = 0; j < arrays[i].length; ++j) { - result.push(arrays[i][j]); + for (let i2 = 0; i2 < arrays.length; ++i2) { + for (let j = 0; j < arrays[i2].length; ++j) { + result.push(arrays[i2][j]); } } return result; } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/GreaterEqual_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/GreaterEqual_grad.js var greaterEqualGradConfig = { kernelName: GreaterEqual, inputsToSave: ["a", "b"], @@ -17165,7 +16603,7 @@ var greaterEqualGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Identity_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Identity_grad.js var identityGradConfig = { kernelName: Identity, gradFunc: (dy) => { @@ -17173,7 +16611,7 @@ var identityGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/IsFinite_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/IsFinite_grad.js var isFiniteGradConfig = { kernelName: IsFinite, gradFunc: (dy) => { @@ -17181,7 +16619,7 @@ var isFiniteGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/IsInf_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/IsInf_grad.js var isInfGradConfig = { kernelName: IsInf, gradFunc: (dy) => { @@ -17189,7 +16627,7 @@ var isInfGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/IsNan_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/IsNan_grad.js var isNanGradConfig = { kernelName: IsNan, gradFunc: (dy) => { @@ -17197,7 +16635,7 @@ var isNanGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/LeakyRelu_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/LeakyRelu_grad.js var leakyReluGradConfig = { kernelName: LeakyRelu, inputsToSave: ["x"], @@ -17209,7 +16647,7 @@ var leakyReluGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Log1p_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Log1p_grad.js var log1pGradConfig = { kernelName: Log1p, inputsToSave: ["x"], @@ -17219,7 +16657,7 @@ var log1pGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Log_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Log_grad.js var logGradConfig = { kernelName: Log, inputsToSave: ["x"], @@ -17229,7 +16667,7 @@ var logGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/LogSoftmax_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/LogSoftmax_grad.js var logSoftmaxGradConfig = { kernelName: LogSoftmax, inputsToSave: [], @@ -17247,7 +16685,7 @@ var logSoftmaxGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/local_response_normalization_backprop.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/local_response_normalization_backprop.js function localResponseNormalizationBackprop_(x, y, dy, depthRadius = 5, bias = 1, alpha = 1, beta = 0.5) { const inputs = { x, y, dy }; const attrs = { depthRadius, bias, alpha, beta }; @@ -17255,7 +16693,7 @@ function localResponseNormalizationBackprop_(x, y, dy, depthRadius = 5, bias = 1 } var localResponseNormalizationBackprop = op({ localResponseNormalizationBackprop_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/LRN_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/LRN_grad.js var lrnGradConfig = { kernelName: LRN, inputsToSave: ["x"], @@ -17269,7 +16707,7 @@ var lrnGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/min_max_grad_util.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/min_max_grad_util.js function gradForMinAndMax(dy, y, xOrig, origAxes) { if (y.rank < xOrig.rank) { y = reshape(y, expandShapeToKeepDim(y.shape, origAxes)); @@ -17285,7 +16723,7 @@ function gradForMinAndMax(dy, y, xOrig, origAxes) { }; } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Max_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Max_grad.js var maxGradConfig = { kernelName: Max, inputsToSave: ["x"], @@ -17305,7 +16743,7 @@ var maxGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Maximum_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Maximum_grad.js var maximumGradConfig = { kernelName: Maximum, inputsToSave: ["a", "b"], @@ -17317,7 +16755,7 @@ var maximumGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/max_pool_3d_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/max_pool_3d_grad.js function maxPool3dGrad_(dy, input2, output, filterSize, strides, pad3, dimRoundingMode) { const $dy = convertToTensor(dy, "dy", "maxPool3dGrad"); const $input = convertToTensor(input2, "input", "maxPool3dGrad"); @@ -17358,7 +16796,7 @@ function maxPool3dGrad_(dy, input2, output, filterSize, strides, pad3, dimRoundi } var maxPool3dGrad = op({ maxPool3dGrad_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/MaxPool3D_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/MaxPool3D_grad.js var maxPool3DGradConfig = { kernelName: MaxPool3D, inputsToSave: ["x"], @@ -17372,7 +16810,7 @@ var maxPool3DGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/max_pool_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/max_pool_grad.js function maxPoolGrad_(dy, input2, output, filterSize, strides, pad3, dimRoundingMode) { const $dy = convertToTensor(dy, "dy", "maxPoolGrad"); const $input = convertToTensor(input2, "input", "maxPoolGrad"); @@ -17387,7 +16825,7 @@ function maxPoolGrad_(dy, input2, output, filterSize, strides, pad3, dimRounding } var maxPoolGrad = op({ maxPoolGrad_ }); -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/MaxPool_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/MaxPool_grad.js var maxPoolGradConfig = { kernelName: MaxPool, inputsToSave: ["x"], @@ -17401,7 +16839,7 @@ var maxPoolGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Mean_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Mean_grad.js var meanGradConfig = { kernelName: Mean, inputsToSave: ["x"], @@ -17425,7 +16863,7 @@ var meanGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Min_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Min_grad.js var minGradConfig = { kernelName: Min, inputsToSave: ["x"], @@ -17444,7 +16882,7 @@ var minGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Minimum_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Minimum_grad.js var minimumGradConfig = { kernelName: Minimum, inputsToSave: ["a", "b"], @@ -17456,7 +16894,7 @@ var minimumGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/MirrorPad_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/MirrorPad_grad.js var mirrorPadGradConfig = { kernelName: MirrorPad, inputsToSave: ["x"], @@ -17468,7 +16906,7 @@ var mirrorPadGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Mod_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Mod_grad.js var modGradConfig = { kernelName: Mod, inputsToSave: ["a", "b"], @@ -17494,7 +16932,7 @@ var modGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Multiply_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Multiply_grad.js var multiplyGradConfig = { kernelName: Multiply, inputsToSave: ["a", "b"], @@ -17521,7 +16959,7 @@ var multiplyGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Neg_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Neg_grad.js var negGradConfig = { kernelName: Neg, gradFunc: (dy) => { @@ -17529,7 +16967,7 @@ var negGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/OneHot_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/OneHot_grad.js var oneHotGradConfig = { kernelName: OneHot, inputsToSave: ["indices"], @@ -17539,7 +16977,7 @@ var oneHotGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/OnesLike_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/OnesLike_grad.js var onesLikeGradConfig = { kernelName: OnesLike, gradFunc: (dy) => { @@ -17547,18 +16985,18 @@ var onesLikeGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Pack_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Pack_grad.js var packGradConfig = { kernelName: Pack, saveAllInputs: true, gradFunc: (dy, saved, attrs) => { const { axis } = attrs; const derTensors = unstack(dy, axis); - return derTensors.map((t) => () => t); + return derTensors.map((t2) => () => t2); } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/PadV2_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/PadV2_grad.js var padV2GradConfig = { kernelName: PadV2, inputsToSave: ["x"], @@ -17570,7 +17008,7 @@ var padV2GradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Pow_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Pow_grad.js var powGradConfig = { kernelName: Pow, inputsToSave: ["a", "b"], @@ -17603,7 +17041,7 @@ var powGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Prelu_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Prelu_grad.js var preluGradConfig = { kernelName: Prelu, inputsToSave: ["x", "alpha"], @@ -17624,7 +17062,7 @@ var preluGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Prod_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Prod_grad.js function prodGradFn_(x, dy, axis) { const expandedYShape = x.shape.slice(); expandedYShape[axis] = 1; @@ -17663,7 +17101,7 @@ var prodGradConfig = { const { axis } = attrs; let axisArr = []; if (axis === void 0 || axis === null) { - axisArr = x.shape.map((_, i) => i); + axisArr = x.shape.map((_, i2) => i2); } else if (typeof axis === "number") { axisArr = [axis]; } else { @@ -17673,7 +17111,7 @@ var prodGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/RealDiv_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/RealDiv_grad.js var divGradConfig = { kernelName: RealDiv, inputsToSave: ["a", "b"], @@ -17701,7 +17139,7 @@ var divGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Reciprocal_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Reciprocal_grad.js var reciprocalGradConfig = { kernelName: Reciprocal, inputsToSave: ["x"], @@ -17711,7 +17149,7 @@ var reciprocalGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Relu6_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Relu6_grad.js var relu6GradConfig = { kernelName: Relu6, inputsToSave: ["x"], @@ -17722,7 +17160,7 @@ var relu6GradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Relu_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Relu_grad.js var reluGradConfig = { kernelName: Relu, inputsToSave: ["x"], @@ -17732,7 +17170,7 @@ var reluGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Reshape_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Reshape_grad.js var reshapeGradConfig = { kernelName: Reshape, inputsToSave: ["x"], @@ -17742,7 +17180,7 @@ var reshapeGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/ResizeBilinear_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/ResizeBilinear_grad.js var resizeBilinearGradConfig = { kernelName: ResizeBilinear, inputsToSave: ["images"], @@ -17754,7 +17192,7 @@ var resizeBilinearGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/ResizeNearestNeighbor_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/ResizeNearestNeighbor_grad.js var resizeNearestNeighborGradConfig = { kernelName: ResizeNearestNeighbor, inputsToSave: ["images"], @@ -17766,7 +17204,7 @@ var resizeNearestNeighborGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Reverse_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Reverse_grad.js var reverseGradConfig = { kernelName: Reverse, gradFunc: (dy, saved, attrs) => { @@ -17776,7 +17214,7 @@ var reverseGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Round_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Round_grad.js var roundGradConfig = { kernelName: Round, gradFunc: (dy) => { @@ -17784,7 +17222,7 @@ var roundGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Rsqrt_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Rsqrt_grad.js var rsqrtGradConfig = { kernelName: Rsqrt, inputsToSave: ["x"], @@ -17794,7 +17232,7 @@ var rsqrtGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Select_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Select_grad.js var selectGradConfig = { kernelName: Select, inputsToSave: ["condition"], @@ -17808,7 +17246,7 @@ var selectGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Selu_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Selu_grad.js var seluGradConfig = { kernelName: Selu, inputsToSave: ["x"], @@ -17827,7 +17265,7 @@ var seluGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Sigmoid_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Sigmoid_grad.js var sigmoidGradConfig = { kernelName: Sigmoid, outputsToSave: [true], @@ -17837,7 +17275,7 @@ var sigmoidGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Sign_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Sign_grad.js var signGradConfig = { kernelName: Sign, gradFunc: (dy) => { @@ -17845,7 +17283,7 @@ var signGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Sin_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Sin_grad.js var sinGradConfig = { kernelName: Sin, inputsToSave: ["x"], @@ -17855,7 +17293,7 @@ var sinGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Sinh_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Sinh_grad.js var sinhGradConfig = { kernelName: Sinh, inputsToSave: ["x"], @@ -17865,7 +17303,7 @@ var sinhGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Slice_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Slice_grad.js var sliceGradConfig = { kernelName: Slice, inputsToSave: ["x"], @@ -17875,14 +17313,14 @@ var sliceGradConfig = { const inputShape = x.shape; const [begin_, size_] = parseSliceParams(x, begin, size); const paddings = []; - for (let i = 0; i < dy.rank; i++) { - paddings.push([begin_[i], inputShape[i] - begin_[i] - size_[i]]); + for (let i2 = 0; i2 < dy.rank; i2++) { + paddings.push([begin_[i2], inputShape[i2] - begin_[i2] - size_[i2]]); } return { x: () => pad(dy, paddings) }; } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Softmax_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Softmax_grad.js var softmaxGradConfig = { kernelName: Softmax, outputsToSave: [true], @@ -17897,7 +17335,7 @@ var softmaxGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Softplus_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Softplus_grad.js var softplusGradConfig = { kernelName: Softplus, inputsToSave: ["x"], @@ -17907,7 +17345,7 @@ var softplusGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/SpaceToBatchND_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/SpaceToBatchND_grad.js var spaceToBatchNDGradConfig = { kernelName: SpaceToBatchND, gradFunc: (dy, saved, attrs) => { @@ -17916,7 +17354,7 @@ var spaceToBatchNDGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/SplitV_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/SplitV_grad.js var splitVGradConfig = { kernelName: SplitV, gradFunc: (dy, saved, attrs) => { @@ -17925,7 +17363,7 @@ var splitVGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Sqrt_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Sqrt_grad.js var sqrtGradConfig = { kernelName: Sqrt, inputsToSave: ["x"], @@ -17935,7 +17373,7 @@ var sqrtGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Square_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Square_grad.js var squareGradConfig = { kernelName: Square, inputsToSave: ["x"], @@ -17945,7 +17383,7 @@ var squareGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/SquaredDifference_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/SquaredDifference_grad.js var squaredDifferenceGradConfig = { kernelName: SquaredDifference, inputsToSave: ["a", "b"], @@ -17958,7 +17396,7 @@ var squaredDifferenceGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Step_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Step_grad.js var stepGradConfig = { kernelName: Step, gradFunc: (dy) => { @@ -17966,7 +17404,7 @@ var stepGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Sub_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Sub_grad.js var subGradConfig = { kernelName: Sub, inputsToSave: ["a", "b"], @@ -17993,7 +17431,7 @@ var subGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Sum_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Sum_grad.js var sumGradConfig = { kernelName: Sum, inputsToSave: ["x"], @@ -18011,7 +17449,7 @@ var sumGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Tan_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Tan_grad.js var tanGradConfig = { kernelName: Tan, inputsToSave: ["x"], @@ -18021,7 +17459,7 @@ var tanGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Tanh_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Tanh_grad.js var tanhGradConfig = { kernelName: Tanh, outputsToSave: [true], @@ -18031,7 +17469,7 @@ var tanhGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Tile_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Tile_grad.js var tileGradConfig = { kernelName: Tile, inputsToSave: ["x"], @@ -18041,36 +17479,36 @@ var tileGradConfig = { const derX = () => { let xGrad = zerosLike(x); if (x.rank === 1) { - for (let i = 0; i < reps[0]; ++i) { - xGrad = add2(xGrad, slice(dy, [i * x.shape[0]], [x.shape[0]])); + for (let i2 = 0; i2 < reps[0]; ++i2) { + xGrad = add2(xGrad, slice(dy, [i2 * x.shape[0]], [x.shape[0]])); } } else if (x.rank === 2) { - for (let i = 0; i < reps[0]; ++i) { + for (let i2 = 0; i2 < reps[0]; ++i2) { for (let j = 0; j < reps[1]; ++j) { - xGrad = add2(xGrad, slice(dy, [i * x.shape[0], j * x.shape[1]], [ + xGrad = add2(xGrad, slice(dy, [i2 * x.shape[0], j * x.shape[1]], [ x.shape[0], x.shape[1] ])); } } } else if (x.rank === 3) { - for (let i = 0; i < reps[0]; ++i) { + for (let i2 = 0; i2 < reps[0]; ++i2) { for (let j = 0; j < reps[1]; ++j) { for (let k = 0; k < reps[2]; ++k) { - xGrad = add2(xGrad, slice(dy, [i * x.shape[0], j * x.shape[1], k * x.shape[2]], [x.shape[0], x.shape[1], x.shape[2]])); + xGrad = add2(xGrad, slice(dy, [i2 * x.shape[0], j * x.shape[1], k * x.shape[2]], [x.shape[0], x.shape[1], x.shape[2]])); } } } } else if (x.rank === 4) { - for (let i = 0; i < reps[0]; ++i) { + for (let i2 = 0; i2 < reps[0]; ++i2) { for (let j = 0; j < reps[1]; ++j) { for (let k = 0; k < reps[2]; ++k) { - for (let l = 0; l < reps[3]; ++l) { + for (let l3 = 0; l3 < reps[3]; ++l3) { xGrad = add2(xGrad, slice(dy, [ - i * x.shape[0], + i2 * x.shape[0], j * x.shape[1], k * x.shape[2], - l * x.shape[3] + l3 * x.shape[3] ], [x.shape[0], x.shape[1], x.shape[2], x.shape[3]])); } } @@ -18085,7 +17523,7 @@ var tileGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Transpose_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Transpose_grad.js var transposeGradConfig = { kernelName: Transpose, gradFunc: (dy, saved, attrs) => { @@ -18096,7 +17534,7 @@ var transposeGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Unpack_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/Unpack_grad.js var unpackGradConfig = { kernelName: Unpack, gradFunc: (dy, saved, attrs) => { @@ -18106,7 +17544,7 @@ var unpackGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/UnsortedSegmentSum_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/UnsortedSegmentSum_grad.js var unsortedSegmentSumGradConfig = { kernelName: UnsortedSegmentSum, inputsToSave: ["segmentIds"], @@ -18123,15 +17561,15 @@ function gatherDropNegatives(x, indices) { const gathered = gather(x, zeroClippedIndices); let isPositive = greaterEqual(indices, scalar(0, "int32")); const numIters = gathered.rank - isPositive.rank; - for (let i = 0; i < numIters; ++i) { - isPositive = expandDims(isPositive, i + 1); + for (let i2 = 0; i2 < numIters; ++i2) { + isPositive = expandDims(isPositive, i2 + 1); } isPositive = logicalAnd(isPositive, ones2(gathered.shape, "bool")); const zeroSlice = zerosLike(gathered); return where(isPositive, gathered, zeroSlice); } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/gradients/ZerosLike_grad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/gradients/ZerosLike_grad.js var zerosLikeGradConfig = { kernelName: ZerosLike, gradFunc: (dy) => { @@ -18139,7 +17577,7 @@ var zerosLikeGradConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/register_all_gradients.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/register_all_gradients.js var gradConfigs = [ absGradConfig, acosGradConfig, @@ -18251,170 +17689,170 @@ for (const gradientConfig of gradConfigs) { registerGradient(gradientConfig); } -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/abs.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/abs.js getGlobalTensorClass().prototype.abs = function() { this.throwIfDisposed(); return abs(this); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/acos.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/acos.js getGlobalTensorClass().prototype.acos = function() { this.throwIfDisposed(); return acos(this); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/acosh.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/acosh.js getGlobalTensorClass().prototype.acosh = function() { this.throwIfDisposed(); return acosh(this); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/add.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/add.js getGlobalTensorClass().prototype.add = function(b) { this.throwIfDisposed(); return add2(this, b); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/all.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/all.js getGlobalTensorClass().prototype.all = function(axis, keepDims) { this.throwIfDisposed(); return all(this, axis, keepDims); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/any.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/any.js getGlobalTensorClass().prototype.any = function(axis, keepDims) { this.throwIfDisposed(); return any(this, axis, keepDims); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/arg_max.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/arg_max.js getGlobalTensorClass().prototype.argMax = function(axis) { this.throwIfDisposed(); return argMax(this, axis); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/arg_min.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/arg_min.js getGlobalTensorClass().prototype.argMin = function(axis) { this.throwIfDisposed(); return argMin(this, axis); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as_scalar.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as_scalar.js getGlobalTensorClass().prototype.asScalar = function() { this.throwIfDisposed(); assert(this.size === 1, () => "The array must have only 1 element."); return reshape(this, []); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as_type.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as_type.js getGlobalTensorClass().prototype.asType = function(dtype) { this.throwIfDisposed(); return cast(this, dtype); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as1d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as1d.js getGlobalTensorClass().prototype.as1D = function() { this.throwIfDisposed(); return reshape(this, [this.size]); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as2d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as2d.js getGlobalTensorClass().prototype.as2D = function(rows, columns) { this.throwIfDisposed(); return reshape(this, [rows, columns]); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as3d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as3d.js getGlobalTensorClass().prototype.as3D = function(rows, columns, depth) { this.throwIfDisposed(); return reshape(this, [rows, columns, depth]); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as4d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as4d.js getGlobalTensorClass().prototype.as4D = function(rows, columns, depth, depth2) { this.throwIfDisposed(); return reshape(this, [rows, columns, depth, depth2]); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as5d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as5d.js getGlobalTensorClass().prototype.as5D = function(rows, columns, depth, depth2, depth3) { this.throwIfDisposed(); return reshape(this, [rows, columns, depth, depth2, depth3]); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/asin.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/asin.js getGlobalTensorClass().prototype.asin = function() { this.throwIfDisposed(); return asin(this); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/asinh.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/asinh.js getGlobalTensorClass().prototype.asinh = function() { this.throwIfDisposed(); return asinh(this); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/atan.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/atan.js getGlobalTensorClass().prototype.atan = function() { this.throwIfDisposed(); return atan(this); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/atan2.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/atan2.js getGlobalTensorClass().prototype.atan2 = function(b) { this.throwIfDisposed(); return atan2(this, b); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/atanh.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/atanh.js getGlobalTensorClass().prototype.atanh = function() { this.throwIfDisposed(); return atanh(this); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/avg_pool.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/avg_pool.js getGlobalTensorClass().prototype.avgPool = function(filterSize, strides, pad3, dimRoundingMode) { this.throwIfDisposed(); return avgPool(this, filterSize, strides, pad3, dimRoundingMode); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/batch_to_space_nd.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/batch_to_space_nd.js getGlobalTensorClass().prototype.batchToSpaceND = function(blockShape, crops) { this.throwIfDisposed(); return batchToSpaceND(this, blockShape, crops); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/batchnorm.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/batchnorm.js getGlobalTensorClass().prototype.batchNorm = function(mean5, variance, offset, scale2, varianceEpsilon) { this.throwIfDisposed(); return batchNorm(this, mean5, variance, offset, scale2, varianceEpsilon); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/broadcast_to.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/broadcast_to.js getGlobalTensorClass().prototype.broadcastTo = function(shape) { this.throwIfDisposed(); return broadcastTo(this, shape); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/cast.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/cast.js getGlobalTensorClass().prototype.cast = function(dtype) { this.throwIfDisposed(); return cast(this, dtype); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/ceil.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/ceil.js getGlobalTensorClass().prototype.ceil = function() { this.throwIfDisposed(); return ceil(this); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/clip_by_value.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/clip_by_value.js getGlobalTensorClass().prototype.clipByValue = function(min7, max7) { this.throwIfDisposed(); return clipByValue(this, min7, max7); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/concat.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/concat.js getGlobalTensorClass().prototype.concat = function(x, axis) { this.throwIfDisposed(); if (x instanceof Tensor) { @@ -18423,662 +17861,662 @@ getGlobalTensorClass().prototype.concat = function(x, axis) { return concat([this, ...x], axis); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/conv1d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/conv1d.js getGlobalTensorClass().prototype.conv1d = function(filter, stride, pad3, dataFormat, dilation, dimRoundingMode) { this.throwIfDisposed(); return conv1d(this, filter, stride, pad3, dataFormat, dilation, dimRoundingMode); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/conv2d_transpose.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/conv2d_transpose.js getGlobalTensorClass().prototype.conv2dTranspose = function(filter, outputShape, strides, pad3, dimRoundingMode) { this.throwIfDisposed(); return conv2dTranspose(this, filter, outputShape, strides, pad3, dimRoundingMode); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/conv2d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/conv2d.js getGlobalTensorClass().prototype.conv2d = function(filter, strides, pad3, dataFormat, dilations, dimRoundingMode) { this.throwIfDisposed(); return conv2d(this, filter, strides, pad3, dataFormat, dilations, dimRoundingMode); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/cos.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/cos.js getGlobalTensorClass().prototype.cos = function() { this.throwIfDisposed(); return cos(this); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/cosh.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/cosh.js getGlobalTensorClass().prototype.cosh = function() { this.throwIfDisposed(); return cosh(this); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/cumprod.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/cumprod.js getGlobalTensorClass().prototype.cumprod = function(axis, exclusive, reverse5) { this.throwIfDisposed(); return cumprod(this, axis, exclusive, reverse5); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/cumsum.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/cumsum.js getGlobalTensorClass().prototype.cumsum = function(axis, exclusive, reverse5) { this.throwIfDisposed(); return cumsum(this, axis, exclusive, reverse5); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/depth_to_space.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/depth_to_space.js getGlobalTensorClass().prototype.depthToSpace = function(blockSize, dataFormat) { this.throwIfDisposed(); return depthToSpace(this, blockSize, dataFormat); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/depthwise_conv2d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/depthwise_conv2d.js getGlobalTensorClass().prototype.depthwiseConv2d = function(filter, strides, pad3, dataFormat, dilations, dimRoundingMode) { this.throwIfDisposed(); return depthwiseConv2d(this, filter, strides, pad3, dataFormat, dilations, dimRoundingMode); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/dilation2d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/dilation2d.js getGlobalTensorClass().prototype.dilation2d = function(filter, strides, pad3, dilations, dataFormat) { this.throwIfDisposed(); return dilation2d(this, filter, strides, pad3, dilations, dataFormat); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/div_no_nan.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/div_no_nan.js getGlobalTensorClass().prototype.divNoNan = function(b) { this.throwIfDisposed(); return divNoNan(this, b); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/div.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/div.js getGlobalTensorClass().prototype.div = function(b) { this.throwIfDisposed(); return div(this, b); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/dot.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/dot.js getGlobalTensorClass().prototype.dot = function(b) { this.throwIfDisposed(); return dot(this, b); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/elu.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/elu.js getGlobalTensorClass().prototype.elu = function() { this.throwIfDisposed(); return elu(this); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/equal.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/equal.js getGlobalTensorClass().prototype.equal = function(b) { this.throwIfDisposed(); return equal(this, b); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/erf.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/erf.js getGlobalTensorClass().prototype.erf = function() { this.throwIfDisposed(); return erf(this); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/euclidean_norm.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/euclidean_norm.js getGlobalTensorClass().prototype.euclideanNorm = function(axis, keepDims) { this.throwIfDisposed(); return euclideanNorm(this, axis, keepDims); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/exp.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/exp.js getGlobalTensorClass().prototype.exp = function() { this.throwIfDisposed(); return exp(this); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/expand_dims.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/expand_dims.js getGlobalTensorClass().prototype.expandDims = function(axis) { this.throwIfDisposed(); return expandDims(this, axis); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/expm1.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/expm1.js getGlobalTensorClass().prototype.expm1 = function() { this.throwIfDisposed(); return expm1(this); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/fft.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/fft.js getGlobalTensorClass().prototype.fft = function() { this.throwIfDisposed(); return fft(this); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/flatten.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/flatten.js getGlobalTensorClass().prototype.flatten = function() { this.throwIfDisposed(); return reshape(this, [this.size]); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/floor.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/floor.js getGlobalTensorClass().prototype.floor = function() { this.throwIfDisposed(); return floor(this); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/floorDiv.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/floorDiv.js getGlobalTensorClass().prototype.floorDiv = function(b) { this.throwIfDisposed(); return floorDiv(this, b); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/gather.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/gather.js getGlobalTensorClass().prototype.gather = function(indices, axis) { this.throwIfDisposed(); return gather(this, indices, axis); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/greater_equal.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/greater_equal.js getGlobalTensorClass().prototype.greaterEqual = function(b) { this.throwIfDisposed(); return greaterEqual(this, b); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/greater.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/greater.js getGlobalTensorClass().prototype.greater = function(b) { this.throwIfDisposed(); return greater(this, b); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/ifft.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/ifft.js getGlobalTensorClass().prototype.ifft = function() { this.throwIfDisposed(); return ifft(this); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/irfft.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/irfft.js getGlobalTensorClass().prototype.irfft = function() { this.throwIfDisposed(); return irfft(this); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/is_finite.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/is_finite.js getGlobalTensorClass().prototype.isFinite = function() { this.throwIfDisposed(); return isFinite2(this); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/is_inf.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/is_inf.js getGlobalTensorClass().prototype.isInf = function() { this.throwIfDisposed(); return isInf(this); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/is_nan.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/is_nan.js getGlobalTensorClass().prototype.isNaN = function() { this.throwIfDisposed(); return isNaN2(this); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/leaky_relu.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/leaky_relu.js getGlobalTensorClass().prototype.leakyRelu = function(alpha) { this.throwIfDisposed(); return leakyRelu(this, alpha); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/less_equal.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/less_equal.js getGlobalTensorClass().prototype.lessEqual = function(b) { this.throwIfDisposed(); return lessEqual(this, b); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/less.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/less.js getGlobalTensorClass().prototype.less = function(b) { this.throwIfDisposed(); return less(this, b); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/local_response_normalization.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/local_response_normalization.js getGlobalTensorClass().prototype.localResponseNormalization = function(depthRadius, bias, alpha, beta) { this.throwIfDisposed(); return localResponseNormalization(this, depthRadius, bias, alpha, beta); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/log_sigmoid.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/log_sigmoid.js getGlobalTensorClass().prototype.logSigmoid = function() { this.throwIfDisposed(); return logSigmoid(this); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/log_softmax.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/log_softmax.js getGlobalTensorClass().prototype.logSoftmax = function(axis) { this.throwIfDisposed(); return logSoftmax(this, axis); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/log_sum_exp.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/log_sum_exp.js getGlobalTensorClass().prototype.logSumExp = function(axis, keepDims) { this.throwIfDisposed(); return logSumExp(this, axis, keepDims); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/log.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/log.js getGlobalTensorClass().prototype.log = function() { this.throwIfDisposed(); return log2(this); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/log1p.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/log1p.js getGlobalTensorClass().prototype.log1p = function() { this.throwIfDisposed(); return log1p(this); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/logical_and.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/logical_and.js getGlobalTensorClass().prototype.logicalAnd = function(b) { this.throwIfDisposed(); return logicalAnd(this, b); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/logical_not.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/logical_not.js getGlobalTensorClass().prototype.logicalNot = function() { this.throwIfDisposed(); return logicalNot(this); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/logical_or.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/logical_or.js getGlobalTensorClass().prototype.logicalOr = function(b) { this.throwIfDisposed(); return logicalOr(this, b); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/logical_xor.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/logical_xor.js getGlobalTensorClass().prototype.logicalXor = function(b) { this.throwIfDisposed(); return logicalXor(this, b); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/mat_mul.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/mat_mul.js getGlobalTensorClass().prototype.matMul = function(b, transposeA, transposeB) { this.throwIfDisposed(); return matMul(this, b, transposeA, transposeB); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/max_pool.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/max_pool.js getGlobalTensorClass().prototype.maxPool = function(filterSize, strides, pad3, dimRoundingMode) { this.throwIfDisposed(); return maxPool(this, filterSize, strides, pad3, dimRoundingMode); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/max.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/max.js getGlobalTensorClass().prototype.max = function(axis, keepDims) { this.throwIfDisposed(); return max(this, axis, keepDims); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/maximum.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/maximum.js getGlobalTensorClass().prototype.maximum = function(b) { this.throwIfDisposed(); return maximum(this, b); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/mean.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/mean.js getGlobalTensorClass().prototype.mean = function(axis, keepDims) { this.throwIfDisposed(); return mean(this, axis, keepDims); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/min.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/min.js getGlobalTensorClass().prototype.min = function(axis, keepDims) { this.throwIfDisposed(); return min(this, axis, keepDims); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/minimum.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/minimum.js getGlobalTensorClass().prototype.minimum = function(b) { this.throwIfDisposed(); return minimum(this, b); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/mirror_pad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/mirror_pad.js getGlobalTensorClass().prototype.mirrorPad = function(paddings, mode) { this.throwIfDisposed(); return mirrorPad(this, paddings, mode); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/mod.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/mod.js getGlobalTensorClass().prototype.mod = function(b) { this.throwIfDisposed(); return mod(this, b); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/mul.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/mul.js getGlobalTensorClass().prototype.mul = function(b) { this.throwIfDisposed(); return mul(this, b); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/neg.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/neg.js getGlobalTensorClass().prototype.neg = function() { this.throwIfDisposed(); return neg(this); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/norm.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/norm.js getGlobalTensorClass().prototype.norm = function(ord, axis, keepDims) { this.throwIfDisposed(); return norm(this, ord, axis, keepDims); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/not_equal.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/not_equal.js getGlobalTensorClass().prototype.notEqual = function(b) { this.throwIfDisposed(); return notEqual(this, b); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/one_hot.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/one_hot.js getGlobalTensorClass().prototype.oneHot = function(depth, onValue = 1, offValue = 0) { this.throwIfDisposed(); return oneHot(this, depth, onValue, offValue); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/ones_like.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/ones_like.js getGlobalTensorClass().prototype.onesLike = function() { this.throwIfDisposed(); return onesLike(this); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/pad.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/pad.js getGlobalTensorClass().prototype.pad = function(paddings, constantValue) { this.throwIfDisposed(); return pad(this, paddings, constantValue); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/pool.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/pool.js getGlobalTensorClass().prototype.pool = function(windowShape, poolingType, padding, dilationRate, strides, dimRoundingMode) { this.throwIfDisposed(); return pool(this, windowShape, poolingType, padding, dilationRate, strides, dimRoundingMode); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/pow.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/pow.js getGlobalTensorClass().prototype.pow = function(exp5) { this.throwIfDisposed(); return pow(this, exp5); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/prelu.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/prelu.js getGlobalTensorClass().prototype.prelu = function(alpha) { this.throwIfDisposed(); return prelu(this, alpha); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/prod.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/prod.js getGlobalTensorClass().prototype.prod = function(axis, keepDims) { this.throwIfDisposed(); return prod(this, axis, keepDims); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/reciprocal.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/reciprocal.js getGlobalTensorClass().prototype.reciprocal = function() { this.throwIfDisposed(); return reciprocal(this); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/relu.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/relu.js getGlobalTensorClass().prototype.relu = function() { this.throwIfDisposed(); return relu(this); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/relu6.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/relu6.js getGlobalTensorClass().prototype.relu6 = function() { this.throwIfDisposed(); return relu6(this); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/reshape_as.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/reshape_as.js getGlobalTensorClass().prototype.reshapeAs = function(x) { this.throwIfDisposed(); return reshape(this, x.shape); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/reshape.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/reshape.js getGlobalTensorClass().prototype.reshape = function(shape) { this.throwIfDisposed(); return reshape(this, shape); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/resize_bilinear.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/resize_bilinear.js getGlobalTensorClass().prototype.resizeBilinear = function(newShape2D, alignCorners, halfPixelCenters) { this.throwIfDisposed(); return resizeBilinear(this, newShape2D, alignCorners, halfPixelCenters); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/resize_nearest_neighbor.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/resize_nearest_neighbor.js getGlobalTensorClass().prototype.resizeNearestNeighbor = function(newShape2D, alignCorners, halfFloatCenters) { this.throwIfDisposed(); return resizeNearestNeighbor(this, newShape2D, alignCorners, halfFloatCenters); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/reverse.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/reverse.js getGlobalTensorClass().prototype.reverse = function(axis) { this.throwIfDisposed(); return reverse(this, axis); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/rfft.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/rfft.js getGlobalTensorClass().prototype.rfft = function() { this.throwIfDisposed(); return rfft(this); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/round.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/round.js getGlobalTensorClass().prototype.round = function() { this.throwIfDisposed(); return round2(this); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/rsqrt.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/rsqrt.js getGlobalTensorClass().prototype.rsqrt = function() { this.throwIfDisposed(); return rsqrt(this); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/selu.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/selu.js getGlobalTensorClass().prototype.selu = function() { this.throwIfDisposed(); return selu(this); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/separable_conv2d.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/separable_conv2d.js getGlobalTensorClass().prototype.separableConv2d = function(depthwiseFilter, pointwiseFilter, strides, pad3, dilation, dataFormat) { this.throwIfDisposed(); return separableConv2d(this, depthwiseFilter, pointwiseFilter, strides, pad3, dilation, dataFormat); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sigmoid.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sigmoid.js getGlobalTensorClass().prototype.sigmoid = function() { this.throwIfDisposed(); return sigmoid(this); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sign.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sign.js getGlobalTensorClass().prototype.sign = function() { this.throwIfDisposed(); return sign(this); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sin.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sin.js getGlobalTensorClass().prototype.sin = function() { this.throwIfDisposed(); return sin(this); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sinh.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sinh.js getGlobalTensorClass().prototype.sinh = function() { this.throwIfDisposed(); return sinh(this); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/slice.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/slice.js getGlobalTensorClass().prototype.slice = function(begin, size) { this.throwIfDisposed(); return slice(this, begin, size); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/softmax.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/softmax.js getGlobalTensorClass().prototype.softmax = function(dim) { this.throwIfDisposed(); return softmax(this, dim); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/softplus.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/softplus.js getGlobalTensorClass().prototype.softplus = function() { this.throwIfDisposed(); return softplus(this); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/space_to_batch_nd.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/space_to_batch_nd.js getGlobalTensorClass().prototype.spaceToBatchND = function(blockShape, paddings) { this.throwIfDisposed(); return spaceToBatchND(this, blockShape, paddings); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/split.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/split.js getGlobalTensorClass().prototype.split = function(numOrSizeSplits, axis) { this.throwIfDisposed(); return split(this, numOrSizeSplits, axis); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sqrt.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sqrt.js getGlobalTensorClass().prototype.sqrt = function() { this.throwIfDisposed(); return sqrt(this); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/square.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/square.js getGlobalTensorClass().prototype.square = function() { this.throwIfDisposed(); return square(this); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/squared_difference.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/squared_difference.js getGlobalTensorClass().prototype.squaredDifference = function(b) { this.throwIfDisposed(); return squaredDifference(this, b); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/squeeze.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/squeeze.js getGlobalTensorClass().prototype.squeeze = function(axis) { this.throwIfDisposed(); return squeeze(this, axis); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/stack.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/stack.js getGlobalTensorClass().prototype.stack = function(x, axis) { this.throwIfDisposed(); const tensorsToBeStacked = x instanceof Tensor ? [this, x] : [this, ...x]; return stack(tensorsToBeStacked, axis); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/step.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/step.js getGlobalTensorClass().prototype.step = function(alpha) { this.throwIfDisposed(); return step(this, alpha); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/strided_slice.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/strided_slice.js getGlobalTensorClass().prototype.stridedSlice = function(begin, end, strides, beginMask, endMask, ellipsisMask, newAxisMask, shrinkAxisMask) { this.throwIfDisposed(); return stridedSlice(this, begin, end, strides, beginMask, endMask, ellipsisMask, newAxisMask, shrinkAxisMask); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sub.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sub.js getGlobalTensorClass().prototype.sub = function(b) { this.throwIfDisposed(); return sub(this, b); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sum.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sum.js getGlobalTensorClass().prototype.sum = function(axis, keepDims) { this.throwIfDisposed(); return sum2(this, axis, keepDims); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/tan.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/tan.js getGlobalTensorClass().prototype.tan = function() { this.throwIfDisposed(); return tan(this); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/tanh.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/tanh.js getGlobalTensorClass().prototype.tanh = function() { this.throwIfDisposed(); return tanh2(this); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/tile.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/tile.js getGlobalTensorClass().prototype.tile = function(reps) { this.throwIfDisposed(); return tile(this, reps); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/to_bool.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/to_bool.js getGlobalTensorClass().prototype.toBool = function() { this.throwIfDisposed(); return cast(this, "bool"); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/to_float.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/to_float.js getGlobalTensorClass().prototype.toFloat = function() { this.throwIfDisposed(); return cast(this, "float32"); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/to_int.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/to_int.js getGlobalTensorClass().prototype.toInt = function() { this.throwIfDisposed(); return cast(this, "int32"); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/topk.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/topk.js getGlobalTensorClass().prototype.topk = function(k, sorted) { this.throwIfDisposed(); return topk(this, k, sorted); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/transpose.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/transpose.js getGlobalTensorClass().prototype.transpose = function(perm) { this.throwIfDisposed(); return transpose(this, perm); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/unique.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/unique.js getGlobalTensorClass().prototype.unique = function(axis) { this.throwIfDisposed(); return unique(this, axis); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/unsorted_segment_sum.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/unsorted_segment_sum.js getGlobalTensorClass().prototype.unsortedSegmentSum = function(segmentIds, numSegments) { this.throwIfDisposed(); return unsortedSegmentSum(this, segmentIds, numSegments); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/unstack.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/unstack.js getGlobalTensorClass().prototype.unstack = function(axis) { this.throwIfDisposed(); return unstack(this, axis); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/where.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/where.js getGlobalTensorClass().prototype.where = function(condition, x) { this.throwIfDisposed(); return where(condition, this, x); }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/zeros_like.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/zeros_like.js getGlobalTensorClass().prototype.zerosLike = function() { this.throwIfDisposed(); return zerosLike(this); }; -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/errors.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/errors.js var AttributeError = class extends Error { constructor(message) { super(message); @@ -19110,7 +18548,7 @@ var AssertionError = class extends Error { } }; -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/utils/executor_utils.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/utils/executor_utils.js var LruCache = class { constructor(maxEntries) { this.maxEntries = maxEntries || 100; @@ -19142,7 +18580,7 @@ var LruCache = class { throw new Error(`The maxEntries of LRU caches must be at least 0, but got ${maxEntries}.`); } if (this.maxEntries > maxEntries) { - for (let i = 0; i < this.maxEntries - maxEntries; i++) { + for (let i2 = 0; i2 < this.maxEntries - maxEntries; i2++) { const keyToDelete = this.cache.keys().next().value; this.cache.delete(keyToDelete); } @@ -19151,11 +18589,11 @@ var LruCache = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/utils/generic_utils.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/utils/generic_utils.js function pyListRepeat(value, numValues) { if (Array.isArray(value)) { let newArray = []; - for (let i = 0; i < numValues; i++) { + for (let i2 = 0; i2 < numValues; i2++) { newArray = newArray.concat(value); } return newArray; @@ -19343,12 +18781,12 @@ function checkStringTypeUnionValue(values, label, value) { function checkArrayTypeAndLength(x, expectedType, minLength = 0, maxLength = Infinity) { assert2(minLength >= 0); assert2(maxLength >= minLength); - return Array.isArray(x) && x.length >= minLength && x.length <= maxLength && x.every((e) => typeof e === expectedType); + return Array.isArray(x) && x.length >= minLength && x.length <= maxLength && x.every((e2) => typeof e2 === expectedType); } function assertPositiveInteger(value, name) { if (Array.isArray(value)) { util_exports.assert(value.length > 0, () => `${name} is unexpectedly an empty array.`); - value.forEach((v, i) => assertPositiveInteger(v, `element ${i + 1} of ${name}`)); + value.forEach((v, i2) => assertPositiveInteger(v, `element ${i2 + 1} of ${name}`)); } else { util_exports.assert(Number.isInteger(value) && value > 0, () => `Expected ${name} to be a positive integer, but got ${formatAsFriendlyString(value)}.`); } @@ -19391,7 +18829,7 @@ function mapActivationToFusedKernel(activationName) { return null; } -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/backend/state.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/backend/state.js var _nextUniqueTensorId = 0; function getNextUniqueTensorId() { return _nextUniqueTensorId++; @@ -19405,14 +18843,14 @@ function getUid(prefix = "") { return prefix + _uidPrefixes[prefix].toString(); } -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/keras_format/common.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/keras_format/common.js var VALID_DATA_FORMAT_VALUES = ["channelsFirst", "channelsLast"]; var VALID_INTERPOLATION_FORMAT_VALUES = ["nearest", "bilinear"]; var VALID_PADDING_MODE_VALUES = ["valid", "same", "causal"]; var VALID_POOL_MODE_VALUES = ["max", "avg"]; var VALID_BIDIRECTIONAL_MERGE_MODES = ["sum", "mul", "concat", "ave"]; -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/common.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/common.js var nameMap = /* @__PURE__ */ new Map(); function checkDataFormat(value) { checkStringTypeUnionValue(VALID_DATA_FORMAT_VALUES, "DataFormat", value); @@ -19434,9 +18872,9 @@ function nameScope(name, fn) { const val = fn(); _nameScopeStack.pop(); return val; - } catch (e) { + } catch (e2) { _nameScopeStack.pop(); - throw e; + throw e2; } } function currentNameScopePrefix() { @@ -19474,7 +18912,7 @@ function isValidTensorName(name) { return !!name.match(tensorNameRegex); } -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/utils/math_utils.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/utils/math_utils.js function isInteger(x) { return x === parseInt(x.toString(), 10); } @@ -19486,8 +18924,8 @@ function arrayProd(array2, begin, end) { end = array2.length; } let prod6 = 1; - for (let i = begin; i < end; ++i) { - prod6 *= array2[i]; + for (let i2 = begin; i2 < end; ++i2) { + prod6 *= array2[i2]; } return prod6; } @@ -19496,8 +18934,8 @@ function min2(array2) { return Number.NaN; } let min7 = Number.POSITIVE_INFINITY; - for (let i = 0; i < array2.length; i++) { - const value = array2[i]; + for (let i2 = 0; i2 < array2.length; i2++) { + const value = array2[i2]; if (value < min7) { min7 = value; } @@ -19509,8 +18947,8 @@ function max2(array2) { return Number.NaN; } let max7 = Number.NEGATIVE_INFINITY; - for (let i = 0; i < array2.length; i++) { - const value = array2[i]; + for (let i2 = 0; i2 < array2.length; i2++) { + const value = array2[i2]; if (value > max7) { max7 = value; } @@ -19522,13 +18960,13 @@ function range2(begin, end) { throw new ValueError(`end (${end}) < begin (${begin}) is forbidden.`); } const out = []; - for (let i = begin; i < end; ++i) { - out.push(i); + for (let i2 = begin; i2 < end; ++i2) { + out.push(i2); } return out; } -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/backend/common.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/backend/common.js var _epsilon; function epsilon() { if (_epsilon == null) { @@ -19540,7 +18978,7 @@ function imageDataFormat() { return "channelsLast"; } -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/backend/tfjs_backend.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/backend/tfjs_backend.js function cast2(x, dtype) { return cast(x, dtype); } @@ -19552,13 +18990,13 @@ function expandDims2(x, axis = -1) { outShape.splice(axis, 0, 1); return reshape(x, outShape); } -function repeat(x, n) { +function repeat(x, n2) { return tidy(() => { if (x.shape.length !== 2) { throw new ValueError(`repeat() expects a rank-2 tensor, but received a rank-${x.shape.length} tensor.`); } const y = expandDims2(x, 1); - return tile2(y, [1, n, 1]); + return tile2(y, [1, n2, 1]); }); } function flatten2(x) { @@ -19693,14 +19131,14 @@ function concatAlongFirstAxis(a, b) { throw new ValueError(`concatAlongFirstAxis() received an unsupported tensor rank: ${a.rank}`); } } -function tile2(x, n) { - if (!Array.isArray(n)) { - n = [n]; +function tile2(x, n2) { + if (!Array.isArray(n2)) { + n2 = [n2]; } - if (x.rank !== n.length) { - throw new ValueError(`The length of input n (${n.length}) does not match the number of dimensions in input x (${x.rank})`); + if (x.rank !== n2.length) { + throw new ValueError(`The length of input n (${n2.length}) does not match the number of dimensions in input x (${x.rank})`); } - return tile(x, n); + return tile(x, n2); } function randomNormal2(shape, mean5 = 0, stddev = 1, dtype, seed) { return randomNormal(shape, mean5, stddev, dtype, seed); @@ -19735,13 +19173,13 @@ function dot2(a, b, activation2, bias) { const bLastDim = bShape.pop(); const ySecondLastDim = bShape.pop(); const yOtherDims = [...bShape, bLastDim]; - const perm = Array.from({ length: b.rank }, (_, i) => { - if (i === 0) { + const perm = Array.from({ length: b.rank }, (_, i2) => { + if (i2 === 0) { return b.rank - 2; - } else if (i <= b.rank - 2) { - return i - 1; + } else if (i2 <= b.rank - 2) { + return i2 - 1; } - return i; + return i2; }); b = reshape(transpose(b, perm), [ySecondLastDim, -1]); const outputShape = [...aFirstDims, ...yOtherDims]; @@ -19853,11 +19291,11 @@ function inTrainPhase(x, alt, training = false) { return training ? x() : alt(); } -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/keras_format/initializer_config.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/keras_format/initializer_config.js var VALID_FAN_MODE_VALUES = ["fanIn", "fanOut", "fanAvg"]; var VALID_DISTRIBUTION_VALUES = ["normal", "uniform", "truncatedNormal"]; -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/initializers.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/initializers.js function checkFanMode(value) { checkStringTypeUnionValue(VALID_FAN_MODE_VALUES, "FanMode", value); } @@ -20239,7 +19677,7 @@ function getInitializer(identifier) { } } -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/utils/types_utils.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/utils/types_utils.js function isArrayOfShapes(x) { return Array.isArray(x) && Array.isArray(x[0]); } @@ -20277,7 +19715,7 @@ function getExactlyOneShape(shapes) { } } -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/utils/variable_utils.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/utils/variable_utils.js function countParamsInWeights(weights) { let count2 = 0; for (const weight of weights) { @@ -20290,7 +19728,7 @@ function countParamsInWeights(weights) { return count2; } -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/variables.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/variables.js var DEFAULT_VARIABLE_NAME_PREFIX = "Variable"; var LayerVariable = class { constructor(val, dtype = "float32", name = DEFAULT_VARIABLE_NAME_PREFIX, trainable = true, constraint = null) { @@ -20351,7 +19789,7 @@ function batchSetValue(variablesAndValues) { }); } -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/engine/topology.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/engine/topology.js var InputSpec = class { constructor(args) { this.dtype = args.dtype; @@ -20611,9 +20049,9 @@ var Layer = class extends serialization_exports.Serializable { } } if (spec.shape != null) { - for (let i = 0; i < spec.shape.length; ++i) { - const specDim = spec.shape[i]; - const dim = x.shape[i]; + for (let i2 = 0; i2 < spec.shape.length; ++i2) { + const specDim = spec.shape[i2]; + const dim = x.shape[i2]; if (specDim != null && dim != null) { if (specDim !== dim) { throw new ValueError(`Input ${inputIndex} is incompatible with layer ${this.name}: expected shape=${spec.shape}, found shape=${x.shape}.`); @@ -20717,8 +20155,8 @@ var Layer = class extends serialization_exports.Serializable { console.warn(`The rank of the input tensor provided (shape: ${JSON.stringify(inputShape)}) does not match that of the batchInputShape (${JSON.stringify(this.batchInputShape)}) of the layer ${this.name}`); } else { let dimMismatch = false; - this.batchInputShape.forEach((dimension, i) => { - if (dimension != null && inputShape[i] != null && inputShape[i] !== dimension) { + this.batchInputShape.forEach((dimension, i2) => { + if (dimension != null && inputShape[i2] != null && inputShape[i2] !== dimension) { dimMismatch = true; } }); @@ -20772,10 +20210,10 @@ var Layer = class extends serialization_exports.Serializable { } const weightValueTuples = []; const paramValues = batchGetValue(params); - for (let i = 0; i < paramValues.length; ++i) { - const pv = paramValues[i]; - const p2 = params[i]; - const w = weights[i]; + for (let i2 = 0; i2 < paramValues.length; ++i2) { + const pv = paramValues[i2]; + const p2 = params[i2]; + const w = weights[i2]; if (!util_exports.arraysEqual(pv.shape, w.shape)) { throw new ValueError(`Layer weight shape ${pv.shape} not compatible with provided weight shape ${w.shape}`); } @@ -20870,10 +20308,10 @@ var Layer = class extends serialization_exports.Serializable { inputShapes, outputShapes }, kwargs); - for (let i = 0; i < outputTensors.length; i++) { - outputTensors[i].sourceLayer = this; - outputTensors[i].nodeIndex = this.inboundNodes.length - 1; - outputTensors[i].tensorIndex = i; + for (let i2 = 0; i2 < outputTensors.length; i2++) { + outputTensors[i2].sourceLayer = this; + outputTensors[i2].nodeIndex = this.inboundNodes.length - 1; + outputTensors[i2].tensorIndex = i2; } } getConfig() { @@ -20934,10 +20372,10 @@ function getSourceInputs(tensor2, layer, nodeIndex) { return node.inputTensors; } else { const sourceTensors = []; - for (let i = 0; i < node.inboundLayers.length; i++) { - const x = node.inputTensors[i]; - const layer2 = node.inboundLayers[i]; - const nodeIndex2 = node.nodeIndices[i]; + for (let i2 = 0; i2 < node.inboundLayers.length; i2++) { + const x = node.inputTensors[i2]; + const layer2 = node.inboundLayers[i2]; + const nodeIndex2 = node.nodeIndices[i2]; const previousSources = getSourceInputs(x, layer2, nodeIndex2); for (const x2 of previousSources) { if (sourceTensors.indexOf(x2) === -1) { @@ -20950,7 +20388,7 @@ function getSourceInputs(tensor2, layer, nodeIndex) { } } -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/engine/input_layer.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/engine/input_layer.js var InputLayer = class extends Layer { constructor(args) { super({ @@ -21043,7 +20481,7 @@ function Input(config) { return outputs[0]; } -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/engine/executor.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/engine/executor.js function assertFeedCompatibility(key, val) { if (key.dtype == null || key.dtype === val.dtype) { return val; @@ -21146,7 +20584,7 @@ function execute(fetches, feedDict, kwargs, probe) { const training = kwargs == null ? false : kwargs["training"]; const arrayFetches = Array.isArray(fetches); const fetchArray = arrayFetches ? fetches : [fetches]; - const outputNames = fetchArray.map((t) => t.name); + const outputNames = fetchArray.map((t2) => t2.name); const finalOutputs = []; const feedNames = feedDict.names(); for (const outputName of outputNames) { @@ -21175,7 +20613,7 @@ function execute(fetches, feedDict, kwargs, probe) { Object.assign(recipientCounts, cachedRecipientCounts.get(fetchAndFeedKey)); } const internalFeedDict = new FeedDict(feedDict); - for (let i = 0; i < sorted.length; ++i) { + for (let i2 = 0; i2 < sorted.length; ++i2) { if (probe != null) { const numTensors = memory().numTensors; if (numTensors > probe.maxNumTensors) { @@ -21185,7 +20623,7 @@ function execute(fetches, feedDict, kwargs, probe) { probe.minNumTensors = numTensors; } } - const symbolic = sorted[i]; + const symbolic = sorted[i2]; const srcLayer = symbolic.sourceLayer; if (srcLayer instanceof InputLayer) { continue; @@ -21220,13 +20658,13 @@ function execute(fetches, feedDict, kwargs, probe) { } const layerOutputs = getNodeOutputs(symbolic); const outputSymbolicTensors = Array.isArray(layerOutputs) ? layerOutputs : [layerOutputs]; - for (let i2 = 0; i2 < outputSymbolicTensors.length; ++i2) { - if (!internalFeedDict.hasKey(outputSymbolicTensors[i2])) { - internalFeedDict.add(outputSymbolicTensors[i2], outputTensors[i2], Array.isArray(outputMask) ? outputMask[0] : outputMask); + for (let i3 = 0; i3 < outputSymbolicTensors.length; ++i3) { + if (!internalFeedDict.hasKey(outputSymbolicTensors[i3])) { + internalFeedDict.add(outputSymbolicTensors[i3], outputTensors[i3], Array.isArray(outputMask) ? outputMask[0] : outputMask); } - const index = outputNames.indexOf(outputSymbolicTensors[i2].name); + const index = outputNames.indexOf(outputSymbolicTensors[i3].name); if (index !== -1) { - finalOutputs[index] = outputTensors[i2]; + finalOutputs[index] = outputTensors[i3]; } } if (!training) { @@ -21320,10 +20758,10 @@ function getNodeOutputs(fetch4) { layerOutputs = fetch4.sourceLayer.output; } else { let nodeIndex = null; - for (let i = 0; i < fetch4.sourceLayer.inboundNodes.length; ++i) { - for (const outputTensor of fetch4.sourceLayer.inboundNodes[i].outputTensors) { + for (let i2 = 0; i2 < fetch4.sourceLayer.inboundNodes.length; ++i2) { + for (const outputTensor of fetch4.sourceLayer.inboundNodes[i2].outputTensors) { if (outputTensor.id === fetch4.id) { - nodeIndex = i; + nodeIndex = i2; break; } } @@ -21333,11 +20771,11 @@ function getNodeOutputs(fetch4) { return layerOutputs; } -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/flags_layers.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/flags_layers.js var ENV3 = env(); ENV3.registerFlag("TOPOLOGICAL_SORT_CACHE_MAX_ENTRIES", () => 100, updateCacheMaxEntries); -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/exports_constraints.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/exports_constraints.js var exports_constraints_exports = {}; __export(exports_constraints_exports, { maxNorm: () => maxNorm, @@ -21346,7 +20784,7 @@ __export(exports_constraints_exports, { unitNorm: () => unitNorm }); -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/constraints.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/constraints.js function calcL2Norms(w, axis) { return tidy(() => sqrt(sum2(mul(w, w), axis, true))); } @@ -21455,7 +20893,7 @@ function getConstraint(identifier) { } } -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/exports_constraints.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/exports_constraints.js function maxNorm(args) { return new MaxNorm(args); } @@ -21469,7 +20907,7 @@ function minMaxNorm(config) { return new MinMaxNorm(config); } -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/exports_initializers.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/exports_initializers.js var exports_initializers_exports = {}; __export(exports_initializers_exports, { constant: () => constant, @@ -21534,7 +20972,7 @@ function orthogonal(args) { return new Orthogonal(args); } -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/exports_layers.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/exports_layers.js var exports_layers_exports = {}; __export(exports_layers_exports, { Layer: () => Layer, @@ -21600,6 +21038,7 @@ __export(exports_layers_exports, { prelu: () => prelu2, reLU: () => reLU, repeatVector: () => repeatVector, + rescaling: () => rescaling, reshape: () => reshape2, rnn: () => rnn2, separableConv2d: () => separableConv2d2, @@ -21614,7 +21053,7 @@ __export(exports_layers_exports, { zeroPadding2d: () => zeroPadding2d }); -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/logs.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/logs.js async function resolveScalarsInLogs(logs) { if (logs == null) { return; @@ -21633,8 +21072,8 @@ async function resolveScalarsInLogs(logs) { } if (promises.length > 0) { const values = await Promise.all(promises); - for (let i = 0; i < values.length; ++i) { - logs[keys[i]] = values[i][0]; + for (let i2 = 0; i2 < values.length; ++i2) { + logs[keys[i2]] = values[i2][0]; } dispose(scalarsToDispose); } @@ -21651,7 +21090,7 @@ function disposeTensorsInLogs(logs) { } } -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/base_callbacks.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/base_callbacks.js var ModelLoggingVerbosity; (function(ModelLoggingVerbosity2) { ModelLoggingVerbosity2[ModelLoggingVerbosity2["SILENT"] = 0] = "SILENT"; @@ -21829,20 +21268,20 @@ var History = class extends BaseCallback { const indices = []; for (const key in this.history) { const valueArray = this.history[key]; - for (let i = 0; i < valueArray.length; ++i) { - if (typeof valueArray[i] !== "number") { - const valueScalar = valueArray[i]; + for (let i2 = 0; i2 < valueArray.length; ++i2) { + if (typeof valueArray[i2] !== "number") { + const valueScalar = valueArray[i2]; promises.push(valueScalar.data()); keys.push(key); - indices.push(i); + indices.push(i2); } } } const values = await Promise.all(promises); - for (let n = 0; n < values.length; ++n) { - const tensorToDispose = this.history[keys[n]][indices[n]]; + for (let n2 = 0; n2 < values.length; ++n2) { + const tensorToDispose = this.history[keys[n2]][indices[n2]]; tensorToDispose.dispose(); - this.history[keys[n]][indices[n]] = values[n][0]; + this.history[keys[n2]][indices[n2]] = values[n2][0]; } } }; @@ -22002,12 +21441,12 @@ function configureCallbacks(callbacks2, verbose, epochs, initialEpoch, numTrainS return { callbackList, history }; } -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/layers/serialization.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/layers/serialization.js function deserialize(config, customObjects = {}, fastWeightInit = false) { return deserializeKerasObject(config, serialization_exports.SerializationMap.getMap().classNameMap, customObjects, "layer", fastWeightInit); } -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/losses.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/losses.js function l2Normalize(x, axis) { return tidy(() => { if (x.dtype !== "float32") { @@ -22160,7 +21599,7 @@ function get(identifierOrFn) { } } -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/metrics.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/metrics.js function binaryAccuracy(yTrue, yPred) { return tidy(() => { const threshold3 = mul(0.5, onesLike(yPred)); @@ -22275,7 +21714,7 @@ function getLossOrMetricName(fn) { } } -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/optimizers.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/optimizers.js function getOptimizer(identifier) { const optimizerMap = { "Adagrad": () => train.adagrad(0.01), @@ -22297,7 +21736,7 @@ function getOptimizer(identifier) { throw new ValueError(`Unknown Optimizer ${identifier}`); } -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/user_defined_metadata.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/user_defined_metadata.js var MAX_USER_DEFINED_METADATA_SERIALIZED_LENGTH = 1 * 1024 * 1024; function checkUserDefinedMetadata(userDefinedMetadata, modelName, checkSize = false) { if (userDefinedMetadata == null || typeof userDefinedMetadata !== "object" || Object.getPrototypeOf(userDefinedMetadata) !== Object.prototype || !plainObjectCheck(userDefinedMetadata)) { @@ -22343,7 +21782,7 @@ function plainObjectCheck(x) { } } -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/utils/layer_utils.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/utils/layer_utils.js function printSummary(model2, lineLength, positions, printFn = console.log) { const sequentialLike = isModelSequentialLike(model2); const toDisplay = ["Layer (type)", "Input Shape", "Output shape", "Param #"]; @@ -22369,13 +21808,13 @@ function printSummary(model2, lineLength, positions, printFn = console.log) { printRow(toDisplay, positions, printFn); printFn("=".repeat(lineLength)); const layers = model2.layers; - for (let i = 0; i < layers.length; ++i) { + for (let i2 = 0; i2 < layers.length; ++i2) { if (sequentialLike) { - printLayerSummary(layers[i], positions, printFn); + printLayerSummary(layers[i2], positions, printFn); } else { - printLayerSummaryWithConnections(layers[i], positions, relevantNodes, printFn); + printLayerSummaryWithConnections(layers[i2], positions, relevantNodes, printFn); } - printFn((i === layers.length - 1 ? "=" : "_").repeat(lineLength)); + printFn((i2 === layers.length - 1 ? "=" : "_").repeat(lineLength)); } model2.checkTrainableWeightsConsistency(); const trainableCount = countTrainableParams(model2); @@ -22430,13 +21869,13 @@ function isModelSequentialLike(model2) { } function printRow(fields, positions, printFn = console.log) { let line = ""; - for (let i = 0; i < fields.length; ++i) { - if (i > 0) { + for (let i2 = 0; i2 < fields.length; ++i2) { + if (i2 > 0) { line = line.slice(0, line.length - 1) + " "; } - line += fields[i]; - line = line.slice(0, positions[i]); - line += " ".repeat(positions[i] - line.length); + line += fields[i2]; + line = line.slice(0, positions[i2]); + line += " ".repeat(positions[i2] - line.length); } printFn(line); } @@ -22481,10 +21920,10 @@ function printLayerSummaryWithConnections(layer, positions, relevantNodes, print if (relevantNodes != null && relevantNodes.length > 0 && relevantNodes.indexOf(node) === -1) { continue; } - for (let i = 0; i < node.inboundLayers.length; ++i) { - const inboundLayer = node.inboundLayers[i].name; - const inboundLayerIndex = node.nodeIndices[i]; - const inboundTensorIndex = node.tensorIndices[i]; + for (let i2 = 0; i2 < node.inboundLayers.length; ++i2) { + const inboundLayer = node.inboundLayers[i2].name; + const inboundLayerIndex = node.nodeIndices[i2]; + const inboundTensorIndex = node.tensorIndices[i2]; connections.push(`${inboundLayer}[${inboundLayerIndex}][${inboundTensorIndex}]`); } } @@ -22499,12 +21938,12 @@ function printLayerSummaryWithConnections(layer, positions, relevantNodes, print firstConnection ]; printRow(fields, positions, printFn); - for (let i = 1; i < connections.length; ++i) { - printRow(["", "", "", "", connections[i]], positions, printFn); + for (let i2 = 1; i2 < connections.length; ++i2) { + printRow(["", "", "", "", connections[i2]], positions, printFn); } } -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/utils/serialization_utils.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/utils/serialization_utils.js function isArrayItemInputOrOutputName(key, index, value) { return (key === "inboundNodes" || key === "outputLayers" || key === "inputLayers") && index === 0 && typeof value === "string"; } @@ -22518,9 +21957,9 @@ function convertPythonicToTs(pythonicConfig, key) { } else if (pythonicConfig instanceof Array) { const tsArray = []; const arrayLength = pythonicConfig.length; - for (let i = 0; i < arrayLength; ++i) { - const item = pythonicConfig[i]; - if (isArrayItemInputOrOutputName(key, i, item)) { + for (let i2 = 0; i2 < arrayLength; ++i2) { + const item = pythonicConfig[i2]; + if (isArrayItemInputOrOutputName(key, i2, item)) { tsArray.push(item); } else { tsArray.push(convertPythonicToTs(item, key)); @@ -22551,9 +21990,9 @@ function convertTsToPythonic(tsConfig, key) { } else if (tsConfig instanceof Array) { const pyArray = []; const arrayLength = tsConfig.length; - for (let i = 0; i < arrayLength; ++i) { - const item = tsConfig[i]; - if (isArrayItemInputOrOutputName(key, i, item)) { + for (let i2 = 0; i2 < arrayLength; ++i2) { + const item = tsConfig[i2]; + if (isArrayItemInputOrOutputName(key, i2, item)) { pyArray.push(item); } else { pyArray.push(convertTsToPythonic(item, key)); @@ -22575,10 +22014,10 @@ function convertTsToPythonic(tsConfig, key) { } } -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/version.js -var version2 = "3.20.0"; +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/version.js +var version2 = "3.21.0"; -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/engine/container.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/engine/container.js var Container = class extends Layer { constructor(args) { super({}); @@ -22637,10 +22076,10 @@ var Container = class extends Layer { this.feedInputShapes = []; this.feedInputNames = []; this.feedOutputNames = []; - for (let i = 0; i < this.inputLayers.length; i++) { - const layer = this.inputLayers[i]; + for (let i2 = 0; i2 < this.inputLayers.length; i2++) { + const layer = this.inputLayers[i2]; if (!(layer instanceof InputLayer)) { - throw new TypeError(`Input layers to a LayersModel must be InputLayer objects. Received inputs: ${args.inputs}. Input ${i} (0-based) originates from layer type ${layer.getClassName()}.`); + throw new TypeError(`Input layers to a LayersModel must be InputLayer objects. Received inputs: ${args.inputs}. Input ${i2} (0-based) originates from layer type ${layer.getClassName()}.`); } this.inputNames.push(layer.name); this.feedInputShapes.push(layer.batchInputShape); @@ -22678,11 +22117,11 @@ var Container = class extends Layer { nodesInProgress2.push(node); } const numInboundLayers = node.inboundLayers.length; - for (let i = 0; i < numInboundLayers; i++) { - const x = node.inputTensors[i]; - const layer2 = node.inboundLayers[i]; - const nodeIndex2 = node.nodeIndices[i]; - const tensorIndex2 = node.tensorIndices[i]; + for (let i2 = 0; i2 < numInboundLayers; i2++) { + const x = node.inputTensors[i2]; + const layer2 = node.inboundLayers[i2]; + const nodeIndex2 = node.nodeIndices[i2]; + const tensorIndex2 = node.tensorIndices[i2]; buildMapOfGraph(x, finishedNodes2, nodesInProgress2, layer2, nodeIndex2, tensorIndex2); } finishedNodes2.push(node); @@ -22708,9 +22147,9 @@ var Container = class extends Layer { layersDepths[node.outboundLayer.id] = depth; layerIDToLayer[node.outboundLayer.id] = node.outboundLayer; nodesDepths[node.id] = depth; - for (let i = 0; i < node.inboundLayers.length; i++) { - const inboundLayer = node.inboundLayers[i]; - const nodeIndex = node.nodeIndices[i]; + for (let i2 = 0; i2 < node.inboundLayers.length; i2++) { + const inboundLayer = node.inboundLayers[i2]; + const nodeIndex = node.nodeIndices[i2]; const inboundNode = inboundLayer.inboundNodes[nodeIndex]; const previousDepth2 = nodesDepths[inboundNode.id] == null ? 0 : nodesDepths[inboundNode.id]; nodesDepths[inboundNode.id] = Math.max(depth + 1, previousDepth2); @@ -22913,8 +22352,8 @@ var Container = class extends Layer { return tidy(() => { inputs = toList(inputs); const feedDict = new FeedDict(); - for (let i = 0; i < this.inputs.length; ++i) { - feedDict.add(this.inputs[i], inputs[i]); + for (let i2 = 0; i2 < this.inputs.length; ++i2) { + feedDict.add(this.inputs[i2], inputs[i2]); } return execute(this.outputs, feedDict, kwargs); }); @@ -22937,9 +22376,9 @@ var Container = class extends Layer { throw new ValueError(`Invalid inputShape argument ${inputShape}: model has ${this.inputLayers.length} tensor inputs.`); } const layersToOutputShapes = {}; - for (let i = 0; i < inputShapes.length; i++) { - const layer = this.inputLayers[i]; - const inputShape2 = inputShapes[i]; + for (let i2 = 0; i2 < inputShapes.length; i2++) { + const layer = this.inputLayers[i2]; + const inputShape2 = inputShapes[i2]; const shapeKey = layer.name + "_0_0"; layersToOutputShapes[shapeKey] = inputShape2; } @@ -22973,15 +22412,15 @@ var Container = class extends Layer { } const outputShapes = []; const outputShapeKeys = []; - for (let i = 0; i < this.outputLayers.length; i++) { - const layer = this.outputLayers[i]; - const nodeIndex = this.outputLayersNodeIndices[i]; - const tensorIndex = this.outputLayersTensorIndices[i]; + for (let i2 = 0; i2 < this.outputLayers.length; i2++) { + const layer = this.outputLayers[i2]; + const nodeIndex = this.outputLayersNodeIndices[i2]; + const tensorIndex = this.outputLayersTensorIndices[i2]; const shapeKey = `${layer.name}_${nodeIndex}_${tensorIndex}`; outputShapeKeys.push(shapeKey); } - for (let i = 0; i < outputShapeKeys.length; i++) { - const key = outputShapeKeys[i]; + for (let i2 = 0; i2 < outputShapeKeys.length; i2++) { + const key = outputShapeKeys[i2]; assert2(key in layersToOutputShapes); outputShapes.push(layersToOutputShapes[key]); } @@ -22992,10 +22431,10 @@ var Container = class extends Layer { masks = pyListRepeat(null, inputs.length); } const tensorMap = {}; - for (let i = 0; i < this.inputs.length; ++i) { - const x = this.inputs[i]; - const y = inputs[i]; - const mask = masks[i]; + for (let i2 = 0; i2 < this.inputs.length; ++i2) { + const x = this.inputs[i2]; + const y = inputs[i2]; + const mask = masks[i2]; tensorMap[x.id] = [y, mask]; } const depthKeys = Object.keys(this.nodesByDepth).map((x) => parseInt(x, 10)).sort(reverseNumberCompare); @@ -23041,10 +22480,10 @@ var Container = class extends Layer { if (layer.activityRegularizer) { throw new NotImplementedError("LayersModel invocation with concrete Tensor value(s) in the presence of activity regularizer(s) is not supported yet."); } - for (let i = 0; i < referenceOutputTensors.length; ++i) { - const x = referenceOutputTensors[i]; - const y = outputTensors2[i]; - const mask = outputMasks2[i]; + for (let i2 = 0; i2 < referenceOutputTensors.length; ++i2) { + const x = referenceOutputTensors[i2]; + const y = outputTensors2[i2]; + const mask = outputMasks2[i2]; tensorMap[x.id] = [y, mask]; } } @@ -23134,10 +22573,10 @@ var Container = class extends Layer { } if (node.inboundLayers.length > 0) { const nodeData = []; - for (let i = 0; i < node.inboundLayers.length; i++) { - const inboundLayer = node.inboundLayers[i]; - const nodeIndex = node.nodeIndices[i]; - const tensorIndex = node.tensorIndices[i]; + for (let i2 = 0; i2 < node.inboundLayers.length; i2++) { + const inboundLayer = node.inboundLayers[i2]; + const nodeIndex = node.nodeIndices[i2]; + const tensorIndex = node.tensorIndices[i2]; const nodeKey2 = Container.nodeKey(inboundLayer, nodeIndex); let newNodeIndex = nodeConversionMap[nodeKey2]; if (newNodeIndex == null) { @@ -23158,9 +22597,9 @@ var Container = class extends Layer { } config["layers"] = layerConfigs; const modelInputs = []; - for (let i = 0; i < this.inputLayers.length; i++) { - const layer = this.inputLayers[i]; - const nodeIndex = this.inputLayersNodeIndices[i]; + for (let i2 = 0; i2 < this.inputLayers.length; i2++) { + const layer = this.inputLayers[i2]; + const nodeIndex = this.inputLayersNodeIndices[i2]; const nodeKey = Container.nodeKey(layer, nodeIndex); if (!this.containerNodes.has(nodeKey)) { continue; @@ -23169,14 +22608,14 @@ var Container = class extends Layer { if (newNodeIndex === null || newNodeIndex === void 0) { newNodeIndex = 0; } - const tensorIndex = this.inputLayersTensorIndices[i]; + const tensorIndex = this.inputLayersTensorIndices[i2]; modelInputs.push([layer.name, newNodeIndex, tensorIndex]); } config["inputLayers"] = modelInputs; const modelOutputs = []; - for (let i = 0; i < this.outputLayers.length; i++) { - const layer = this.outputLayers[i]; - const nodeIndex = this.outputLayersNodeIndices[i]; + for (let i2 = 0; i2 < this.outputLayers.length; i2++) { + const layer = this.outputLayers[i2]; + const nodeIndex = this.outputLayersNodeIndices[i2]; const nodeKey = Container.nodeKey(layer, nodeIndex); if (!this.containerNodes.has(nodeKey)) { continue; @@ -23185,7 +22624,7 @@ var Container = class extends Layer { if (newNodeIndex === null || newNodeIndex === void 0) { newNodeIndex = 0; } - const tensorIndex = this.outputLayersTensorIndices[i]; + const tensorIndex = this.outputLayersTensorIndices[i2]; modelOutputs.push([layer.name, newNodeIndex, tensorIndex]); } config["outputLayers"] = modelOutputs; @@ -23301,7 +22740,7 @@ var Container = class extends Layer { } }; -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/engine/training_utils.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/engine/training_utils.js function standardizeSampleOrClassWeights(xWeight, outputNames, weightType) { const numOutputs = outputNames.length; if (xWeight == null || Array.isArray(xWeight) && xWeight.length === 0) { @@ -23378,7 +22817,7 @@ function computeWeightedLoss2(losses2, sampleWeights) { return mul(losses2, sampleWeights); } -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/engine/training_dataset.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/engine/training_dataset.js var DEFAULT_VALIDATION_BATCH_SIZE = 32; function standardizeDataIteratorOutput(model2, iteratorOut) { let xs; @@ -23454,7 +22893,7 @@ async function fitDataset(model2, dataset, args) { const outLabels = model2.getDedupedMetricsNames(); let callbackMetrics; if (doValidation) { - callbackMetrics = outLabels.slice().concat(outLabels.map((n) => "val_" + n)); + callbackMetrics = outLabels.slice().concat(outLabels.map((n2) => "val_" + n2)); } else { callbackMetrics = outLabels.slice(); } @@ -23500,16 +22939,16 @@ async function fitDataset(model2, dataset, args) { const sampleWeights = []; if (args.classWeight != null) { const standardClassWeights = standardizeClassWeights(args.classWeight, model2.outputNames); - for (let i = 0; i < standardClassWeights.length; ++i) { - sampleWeights.push(await standardizeWeights(ys[i], null, standardClassWeights[i])); + for (let i2 = 0; i2 < standardClassWeights.length; ++i2) { + sampleWeights.push(await standardizeWeights(ys[i2], null, standardClassWeights[i2])); } } const ins = xs.concat(ys).concat(sampleWeights); const outs = trainFunction(ins); dispose(ins); - for (let i = 0; i < outLabels.length; ++i) { - const label = outLabels[i]; - const out = outs[i]; + for (let i2 = 0; i2 < outLabels.length; ++i2) { + const label = outLabels[i2]; + const out = outs[i2]; batchLogs[label] = out; keep(out); } @@ -23529,8 +22968,8 @@ async function fitDataset(model2, dataset, args) { verbose: 0 })); } - for (let i = 0; i < model2.metricsNames.length; ++i) { - epochLogs[`val_${model2.metricsNames[i]}`] = valOuts[i]; + for (let i2 = 0; i2 < model2.metricsNames.length; ++i2) { + epochLogs[`val_${model2.metricsNames[i2]}`] = valOuts[i2]; } } break; @@ -23588,15 +23027,15 @@ async function evaluateDataset(model2, dataset, args) { const batchOuts = tidy(() => f(xsAndYs)); dispose(xsAndYs); if (batch === 0) { - for (let i = 0; i < batchOuts.length; ++i) { + for (let i2 = 0; i2 < batchOuts.length; ++i2) { outs.push(scalar(0)); } } const batchSize = xsAndYs[0].shape[0]; - for (let i = 0; i < batchOuts.length; ++i) { - const batchOut = batchOuts[i]; - const oldScalar = outs[i]; - outs[i] = tidy(() => add2(outs[i], mul(batchSize, batchOut))); + for (let i2 = 0; i2 < batchOuts.length; ++i2) { + const batchOut = batchOuts[i2]; + const oldScalar = outs[i2]; + outs[i2] = tidy(() => add2(outs[i2], mul(batchSize, batchOut))); if (batch > 0) { dispose(oldScalar); } @@ -23614,15 +23053,15 @@ async function evaluateDataset(model2, dataset, args) { break; } } - for (let i = 0; i < outs.length; ++i) { - const oldScalar = outs[i]; - outs[i] = div(outs[i], numExamples); + for (let i2 = 0; i2 < outs.length; ++i2) { + const oldScalar = outs[i2]; + outs[i2] = div(outs[i2], numExamples); dispose(oldScalar); } return singletonOrArray(outs); } -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/engine/training_tensors.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/engine/training_tensors.js function checkBatchSize(batchSize) { util_exports.assert(batchSize > 0 && Number.isInteger(batchSize), () => `batchSize is required to be a positive integer, but got ${batchSize}`); } @@ -23720,18 +23159,18 @@ async function fitLoop(model2, f, ins, outLabels, batchSize, epochs, verbose, ca batchLogs["size"] = batchEnd - batchStart; const insBatch = sliceArraysByIndices(ins, batchIds); const outs = f(insBatch); - for (let i = 0; i < outLabels.length; ++i) { - const label = outLabels[i]; - const out = outs[i]; + for (let i2 = 0; i2 < outLabels.length; ++i2) { + const label = outLabels[i2]; + const out = outs[i2]; batchLogs[label] = out; keep(out); } if (batchIndex === batches.length - 1) { if (doValidation) { const valOuts = model2.testLoop(valF, valIns, batchSize); - for (let i = 0; i < outLabels.length; ++i) { - const label = outLabels[i]; - const out = valOuts[i]; + for (let i2 = 0; i2 < outLabels.length; ++i2) { + const label = outLabels[i2]; + const out = valOuts[i2]; keep(out); epochLogs["val_" + label] = out; } @@ -23817,7 +23256,7 @@ async function fitTensors(model2, x, y, args = {}) { if (doValidation) { model2.makeTestFunction(); valFunction = model2.testFunction; - callbackMetrics = outLabels.slice().concat(outLabels.map((n) => "val_" + n)); + callbackMetrics = outLabels.slice().concat(outLabels.map((n2) => "val_" + n2)); } else { valFunction = null; valIns = []; @@ -23844,8 +23283,8 @@ function ensureTensorsRank2OrHigher(tensors) { if (tensors instanceof Tensor) { tensors = [tensors]; } - for (let i = 0; i < tensors.length; ++i) { - const tensor2 = tensors[i]; + for (let i2 = 0; i2 < tensors.length; ++i2) { + const tensor2 = tensors[i2]; if (tensor2.rank === 1) { outs.push(expandDims2(tensor2, 1)); } else if (tensor2.rank === 0) { @@ -23864,7 +23303,7 @@ function disposeNewTensors(tensors, refTensors) { if (refTensors instanceof Tensor) { oldTensorIds.push(refTensors.id); } else if (Array.isArray(refTensors)) { - refTensors.forEach((t) => oldTensorIds.push(t.id)); + refTensors.forEach((t2) => oldTensorIds.push(t2.id)); } else if (refTensors != null) { for (const name in refTensors) { const oldTensor = refTensors[name]; @@ -23877,9 +23316,9 @@ function disposeNewTensors(tensors, refTensors) { tensorsToDispose.push(tensors); } } else if (Array.isArray(tensors)) { - tensors.forEach((t) => { - if (oldTensorIds.indexOf(t.id) === -1) { - tensorsToDispose.push(t); + tensors.forEach((t2) => { + if (oldTensorIds.indexOf(t2.id) === -1) { + tensorsToDispose.push(t2); } }); } else if (tensors != null) { @@ -23890,14 +23329,14 @@ function disposeNewTensors(tensors, refTensors) { } } } - tensorsToDispose.forEach((t) => { - if (!t.isDisposed) { - t.dispose(); + tensorsToDispose.forEach((t2) => { + if (!t2.isDisposed) { + t2.dispose(); } }); } -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/engine/training.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/engine/training.js function isDataTensor(x) { return x instanceof Tensor; } @@ -23957,22 +23396,22 @@ function standardizeInputData(data, names, shapes, checkBatchAxis = true, except } arrays = ensureTensorsRank2OrHigher(arrays); if (shapes != null) { - for (let i = 0; i < names.length; ++i) { - if (shapes[i] == null) { + for (let i2 = 0; i2 < names.length; ++i2) { + if (shapes[i2] == null) { continue; } - const array2 = arrays[i]; - if (array2.shape.length !== shapes[i].length) { - throw new ValueError(`Error when checking ${exceptionPrefix}: expected ${names[i]} to have ${shapes[i].length} dimension(s). but got array with shape ${array2.shape}`); + const array2 = arrays[i2]; + if (array2.shape.length !== shapes[i2].length) { + throw new ValueError(`Error when checking ${exceptionPrefix}: expected ${names[i2]} to have ${shapes[i2].length} dimension(s). but got array with shape ${array2.shape}`); } - for (let j = 0; j < shapes[i].length; ++j) { + for (let j = 0; j < shapes[i2].length; ++j) { if (j === 0 && !checkBatchAxis) { continue; } const dim = array2.shape[j]; - const refDim = shapes[i][j]; + const refDim = shapes[i2][j]; if (refDim != null && refDim >= 0 && dim !== refDim) { - throw new ValueError(`${exceptionPrefix} expected a batch of elements where each example has shape [${shapes[i].slice(1, shapes[i].length)}] (i.e.,tensor shape [*,${shapes[i].slice(1, shapes[i].length)}]) but the ${exceptionPrefix} received an input with ${array2.shape[0]} examples, each with shape [${array2.shape.slice(1, array2.shape.length)}] (tensor shape [${array2.shape}])`); + throw new ValueError(`${exceptionPrefix} expected a batch of elements where each example has shape [${shapes[i2].slice(1, shapes[i2].length)}] (i.e.,tensor shape [*,${shapes[i2].slice(1, shapes[i2].length)}]) but the ${exceptionPrefix} received an input with ${array2.shape[0]} examples, each with shape [${array2.shape.slice(1, array2.shape.length)}] (tensor shape [${array2.shape}])`); } } } @@ -24000,10 +23439,10 @@ function checkLossAndTargetCompatibility(targets, lossFns, outputShapes) { binaryCrossentropy, categoricalCrossentropy ]; - for (let i = 0; i < targets.length; ++i) { - const y = targets[i]; - const loss = lossFns[i]; - const shape = outputShapes[i]; + for (let i2 = 0; i2 < targets.length; ++i2) { + const y = targets[i2]; + const loss = lossFns[i2]; + const shape = outputShapes[i2]; if (loss == null) { continue; } @@ -24039,23 +23478,23 @@ function checkInputData(data, names, shapes, checkBatchAxis = true, exceptionPre arrays = [data]; } if (shapes != null) { - for (let i = 0; i < names.length; ++i) { - if (shapes[i] == null) { + for (let i2 = 0; i2 < names.length; ++i2) { + if (shapes[i2] == null) { continue; } - const array2 = arrays[i]; - if (array2.shape.length !== shapes[i].length) { - throw new ValueError(`Error when checking ${exceptionPrefix}: expected ${names[i]} to have ${shapes[i].length} dimension(s), but got array with shape ${JSON.stringify(array2.shape)}`); + const array2 = arrays[i2]; + if (array2.shape.length !== shapes[i2].length) { + throw new ValueError(`Error when checking ${exceptionPrefix}: expected ${names[i2]} to have ${shapes[i2].length} dimension(s), but got array with shape ${JSON.stringify(array2.shape)}`); } - for (let j = 0; j < shapes[i].length; ++j) { + for (let j = 0; j < shapes[i2].length; ++j) { if (j === 0 && !checkBatchAxis) { continue; } const dim = array2.shape[j]; - const refDim = shapes[i][j]; + const refDim = shapes[i2][j]; if (refDim != null) { if (refDim !== dim) { - throw new ValueError(`Error when checking ${exceptionPrefix}: expected ${names[i]} to have shape ${JSON.stringify(shapes[i])} but got array with shape ${JSON.stringify(array2.shape)}.`); + throw new ValueError(`Error when checking ${exceptionPrefix}: expected ${names[i2]} to have shape ${JSON.stringify(shapes[i2])} but got array with shape ${JSON.stringify(array2.shape)}.`); } } } @@ -24134,7 +23573,7 @@ var LayersModel = class extends Container { throw new ValueError(`When passing an Array as loss, it should have one entry per model output. The model has ${this.outputs.length} output(s), but you passed loss=${args.loss}.`); } const theLosses = args.loss; - lossFunctions = theLosses.map((l) => get(l)); + lossFunctions = theLosses.map((l3) => get(l3)); } else { const lossFunction = get(args.loss); this.outputs.forEach((_) => { @@ -24145,26 +23584,26 @@ var LayersModel = class extends Container { this.feedOutputNames = []; this.feedOutputShapes = []; this.feedLossFns = []; - for (let i = 0; i < this.outputs.length; ++i) { - const shape = this.internalOutputShapes[i]; - const name = this.outputNames[i]; + for (let i2 = 0; i2 < this.outputs.length; ++i2) { + const shape = this.internalOutputShapes[i2]; + const name = this.outputNames[i2]; this.feedOutputNames.push(name); this.feedOutputShapes.push(shape); - this.feedLossFns.push(this.lossFunctions[i]); + this.feedLossFns.push(this.lossFunctions[i2]); } const skipTargetIndices = []; this.metrics = args.metrics; this.metricsNames = ["loss"]; this.metricsTensors = []; nameScope("loss", () => { - for (let i = 0; i < this.outputs.length; ++i) { - if (skipTargetIndices.indexOf(i) !== -1) { + for (let i2 = 0; i2 < this.outputs.length; ++i2) { + if (skipTargetIndices.indexOf(i2) !== -1) { continue; } - const weightedLoss = this.lossFunctions[i]; + const weightedLoss = this.lossFunctions[i2]; if (this.outputs.length > 1) { - this.metricsTensors.push([weightedLoss, i]); - this.metricsNames.push(this.outputNames[i] + "_loss"); + this.metricsTensors.push([weightedLoss, i2]); + this.metricsNames.push(this.outputNames[i2] + "_loss"); } } }); @@ -24177,11 +23616,11 @@ var LayersModel = class extends Container { this.metricsTensors.push([metricTensor, outputIndex]); }; nameScope("metric", () => { - for (let i = 0; i < this.outputs.length; ++i) { - if (skipTargetIndices.indexOf(i) !== -1) { + for (let i2 = 0; i2 < this.outputs.length; ++i2) { + if (skipTargetIndices.indexOf(i2) !== -1) { continue; } - const outputMetrics = nestedMetrics[i]; + const outputMetrics = nestedMetrics[i2]; const handleMetrics = (metrics) => { const metricNamePrefix = ""; let metricName; @@ -24189,14 +23628,14 @@ var LayersModel = class extends Container { let weightedMetricFn; for (const metric of metrics) { if (typeof metric === "string" && ["accuracy", "acc", "crossentropy", "ce"].indexOf(metric) !== -1) { - const outputShape = this.internalOutputShapes[i]; - if (outputShape[outputShape.length - 1] === 1 || this.lossFunctions[i] === binaryCrossentropy) { + const outputShape = this.internalOutputShapes[i2]; + if (outputShape[outputShape.length - 1] === 1 || this.lossFunctions[i2] === binaryCrossentropy) { if (["accuracy", "acc"].indexOf(metric) !== -1) { accFn = binaryAccuracy; } else if (["crossentropy", "ce"].indexOf(metric) !== -1) { accFn = binaryCrossentropy2; } - } else if (this.lossFunctions[i] === sparseCategoricalCrossentropy) { + } else if (this.lossFunctions[i2] === sparseCategoricalCrossentropy) { if (["accuracy", "acc"].indexOf(metric) !== -1) { accFn = sparseCategoricalAccuracy; } else if (["crossentropy", "ce"].indexOf(metric) !== -1) { @@ -24226,7 +23665,7 @@ var LayersModel = class extends Container { nameScope(metricName, () => { metricResult = weightedMetricFn; }); - appendMetric(i, metricName, metricResult); + appendMetric(i2, metricName, metricResult); } }; handleMetrics(outputMetrics); @@ -24295,8 +23734,8 @@ var LayersModel = class extends Container { if (inputs.length !== this.inputs.length) { throw new ValueError(`The number of inputs provided (${inputs.length}) does not match the number of inputs of this model (${this.inputs.length}).`); } - for (let i = 0; i < this.inputs.length; ++i) { - feedDict.add(this.inputs[i], inputs[i]); + for (let i2 = 0; i2 < this.inputs.length; ++i2) { + feedDict.add(this.inputs[i2], inputs[i2]); } } else { for (const input2 of this.inputs) { @@ -24316,10 +23755,10 @@ var LayersModel = class extends Container { for (const layer of this.layers) { const layerOutputs = Array.isArray(layer.output) ? layer.output : [layer.output]; const layerOutputNames = layerOutputs.map((output) => output.name); - for (let i = 0; i < symbolicTensorNames.length; ++i) { - const index = layerOutputNames.indexOf(symbolicTensorNames[i]); + for (let i2 = 0; i2 < symbolicTensorNames.length; ++i2) { + const index = layerOutputNames.indexOf(symbolicTensorNames[i2]); if (index !== -1) { - outputSymbolicTensors[i] = layerOutputs[index]; + outputSymbolicTensors[i2] = layerOutputs[index]; outputsRemaining--; } if (outputsRemaining === 0) { @@ -24332,9 +23771,9 @@ var LayersModel = class extends Container { } if (outputsRemaining > 0) { const remainingNames = []; - outputSymbolicTensors.forEach((tensor2, i) => { + outputSymbolicTensors.forEach((tensor2, i2) => { if (tensor2 == null) { - remainingNames.push(symbolicTensorNames[i]); + remainingNames.push(symbolicTensorNames[i2]); } }); throw new ValueError(`Cannot find SymbolicTensors for output name(s): ${JSON.stringify(remainingNames)}`); @@ -24356,8 +23795,8 @@ var LayersModel = class extends Container { const insBatch = sliceArrays(ins, batchStart, batchEnd); const feeds = []; if (Array.isArray(insBatch)) { - for (let i = 0; i < insBatch.length; ++i) { - feeds.push({ key: this.inputs[i], value: insBatch[i] }); + for (let i2 = 0; i2 < insBatch.length; ++i2) { + feeds.push({ key: this.inputs[i2], value: insBatch[i2] }); } } else { feeds.push({ key: this.inputs[0], value: insBatch }); @@ -24365,7 +23804,7 @@ var LayersModel = class extends Container { const feedDict = new FeedDict(feeds); return execute(this.outputs, feedDict); }); - batchOuts.forEach((batchOut, i) => outsBatches[i].push(batchOut)); + batchOuts.forEach((batchOut, i2) => outsBatches[i2].push(batchOut)); } return singletonOrArray(outsBatches.map((batches2) => concat(batches2, 0))); }); @@ -24391,9 +23830,9 @@ var LayersModel = class extends Container { throw new RuntimeError("You must compile a model before training/testing. Use LayersModel.compile(modelCompileArgs)."); } const outputShapes = []; - for (let i = 0; i < this.feedOutputShapes.length; ++i) { - const outputShape = this.feedOutputShapes[i]; - const lossFn = this.feedLossFns[i]; + for (let i2 = 0; i2 < this.feedOutputShapes.length; ++i2) { + const outputShape = this.feedOutputShapes[i2]; + const lossFn = this.feedLossFns[i2]; if (lossFn === sparseCategoricalCrossentropy) { outputShapes.push(outputShape.slice(0, outputShape.length - 1).concat([1])); } else { @@ -24420,8 +23859,8 @@ var LayersModel = class extends Container { if (classWeight != null) { const classWeights = standardizeClassWeights(classWeight, this.outputNames); standardSampleWeights = []; - for (let i = 0; i < classWeights.length; ++i) { - standardSampleWeights.push(await standardizeWeights(standardYs[i], null, classWeights[i])); + for (let i2 = 0; i2 < classWeights.length; ++i2) { + standardSampleWeights.push(await standardizeWeights(standardYs[i2], null, classWeights[i2])); } } return [standardXs, standardYs, standardSampleWeights]; @@ -24445,17 +23884,17 @@ var LayersModel = class extends Container { const insBatch = sliceArraysByIndices(ins, batchIds); const batchOuts = f(insBatch); if (batchIndex === 0) { - for (let i = 0; i < batchOuts.length; ++i) { + for (let i2 = 0; i2 < batchOuts.length; ++i2) { outs.push(scalar(0)); } } - for (let i = 0; i < batchOuts.length; ++i) { - const batchOut = batchOuts[i]; - outs[i] = add2(outs[i], mul(batchEnd - batchStart, batchOut)); + for (let i2 = 0; i2 < batchOuts.length; ++i2) { + const batchOut = batchOuts[i2]; + outs[i2] = add2(outs[i2], mul(batchEnd - batchStart, batchOut)); } } - for (let i = 0; i < outs.length; ++i) { - outs[i] = div(outs[i], numSamples); + for (let i2 = 0; i2 < outs.length; ++i2) { + outs[i2] = div(outs[i2], numSamples); } } return outs; @@ -24464,11 +23903,11 @@ var LayersModel = class extends Container { getDedupedMetricsNames() { const outLabels = this.metricsNames; const dedupedOutLabels = []; - for (let i = 0; i < outLabels.length; ++i) { - const label = outLabels[i]; + for (let i2 = 0; i2 < outLabels.length; ++i2) { + const label = outLabels[i2]; let newLabel = label; if (count(outLabels, label) > 1) { - const dupIndex = count(outLabels.slice(0, i), label); + const dupIndex = count(outLabels.slice(0, i2), label); newLabel += `_${dupIndex}`; } dedupedOutLabels.push(newLabel); @@ -24484,33 +23923,33 @@ var LayersModel = class extends Container { const metricsValues = []; const totalLossFunction = () => { const feeds = []; - for (let i = 0; i < this.inputs.length; ++i) { - feeds.push({ key: this.inputs[i], value: inputs[i] }); + for (let i2 = 0; i2 < this.inputs.length; ++i2) { + feeds.push({ key: this.inputs[i2], value: inputs[i2] }); } const feedDict = new FeedDict(feeds); const outputs = execute(this.outputs, feedDict, { "training": true }); let totalLoss; - for (let i = 0; i < this.lossFunctions.length; ++i) { - const lossFunction = this.lossFunctions[i]; - let loss = lossFunction(targets[i], outputs[i]); - if (sampleWeights[i] != null) { - loss = computeWeightedLoss2(loss, sampleWeights[i]); + for (let i2 = 0; i2 < this.lossFunctions.length; ++i2) { + const lossFunction = this.lossFunctions[i2]; + let loss = lossFunction(targets[i2], outputs[i2]); + if (sampleWeights[i2] != null) { + loss = computeWeightedLoss2(loss, sampleWeights[i2]); } const meanLoss = mean(loss); lossValues.push(meanLoss); - if (i === 0) { + if (i2 === 0) { totalLoss = loss; } else { totalLoss = add2(totalLoss, loss); } } - for (let i = 0; i < this.metricsTensors.length; ++i) { + for (let i2 = 0; i2 < this.metricsTensors.length; ++i2) { let weightedMetric; - if (this.outputs.length > 1 && i < this.outputs.length) { - weightedMetric = lossValues[i]; + if (this.outputs.length > 1 && i2 < this.outputs.length) { + weightedMetric = lossValues[i2]; } else { - const metric = this.metricsTensors[i][0]; - const outputIndex = this.metricsTensors[i][1]; + const metric = this.metricsTensors[i2][0]; + const outputIndex = this.metricsTensors[i2][1]; weightedMetric = mean(metric(targets[outputIndex], outputs[outputIndex])); } keep(weightedMetric); @@ -24536,24 +23975,24 @@ var LayersModel = class extends Container { const inputs = data.slice(0, this.inputs.length); const targets = data.slice(this.inputs.length, this.inputs.length + this.outputs.length); const feeds = []; - for (let i = 0; i < this.inputs.length; ++i) { - feeds.push({ key: this.inputs[i], value: inputs[i] }); + for (let i2 = 0; i2 < this.inputs.length; ++i2) { + feeds.push({ key: this.inputs[i2], value: inputs[i2] }); } const feedDict = new FeedDict(feeds); const outputs = execute(this.outputs, feedDict); - for (let i = 0; i < this.lossFunctions.length; ++i) { - const lossFunction = this.lossFunctions[i]; - const loss = mean(lossFunction(targets[i], outputs[i])); - if (i === 0) { + for (let i2 = 0; i2 < this.lossFunctions.length; ++i2) { + const lossFunction = this.lossFunctions[i2]; + const loss = mean(lossFunction(targets[i2], outputs[i2])); + if (i2 === 0) { totalLoss = loss; } else { totalLoss = add2(totalLoss, loss); } valOutputs.push(totalLoss); } - for (let i = 0; i < this.metricsTensors.length; ++i) { - const metric = this.metricsTensors[i][0]; - const outputIndex = this.metricsTensors[i][1]; + for (let i2 = 0; i2 < this.metricsTensors.length; ++i2) { + const metric = this.metricsTensors[i2][0]; + const outputIndex = this.metricsTensors[i2][1]; const meanMetric = mean(metric(targets[outputIndex], outputs[outputIndex])); valOutputs.push(meanMetric); } @@ -24588,11 +24027,11 @@ var LayersModel = class extends Container { const trainableOnly = config != null && config.trainableOnly; const weights = trainableOnly ? this.trainableWeights : this.weights; const weightValues = this.getWeights(trainableOnly); - for (let i = 0; i < weights.length; ++i) { - if (trainableOnly && !weights[i].trainable) { + for (let i2 = 0; i2 < weights.length; ++i2) { + if (trainableOnly && !weights[i2].trainable) { continue; } - namedWeights.push({ name: weights[i].originalName, tensor: weightValues[i] }); + namedWeights.push({ name: weights[i2].originalName, tensor: weightValues[i2] }); } return namedWeights; } @@ -24757,7 +24196,7 @@ var Functional = class extends LayersModel { Functional.className = "Functional"; serialization_exports.registerClass(Functional); -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/models.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/models.js async function modelFromJSON(modelAndWeightsConfig, customObjects) { if (!("modelTopology" in modelAndWeightsConfig)) { modelAndWeightsConfig = { modelTopology: modelAndWeightsConfig }; @@ -25101,7 +24540,7 @@ var Sequential = class extends LayersModel { Sequential.className = "Sequential"; serialization_exports.registerClass(Sequential); -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/exports.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/exports.js function model(args) { return new LayersModel(args); } @@ -25121,7 +24560,7 @@ function registerCallbackConstructor(verbosityLevel, callbackConstructor) { CallbackConstructorRegistry.registerCallbackConstructor(verbosityLevel, callbackConstructor); } -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/activations.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/activations.js var Activation = class extends serialization_exports.Serializable { getConfig() { return {}; @@ -25250,7 +24689,7 @@ function getActivation(identifier) { } } -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/regularizers.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/regularizers.js function assertObjectArgs(args) { if (args != null && typeof args !== "object") { throw new Error(`Argument to L1L2 regularizer's constructor is expected to be an object, but received: ${args}`); @@ -25320,7 +24759,7 @@ function getRegularizer(identifier) { } } -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/layers/advanced_activations.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/layers/advanced_activations.js var ReLU = class extends Layer { constructor(args) { super(args == null ? {} : args); @@ -25399,15 +24838,15 @@ var PReLU = class extends Layer { inputShape = getExactlyOneShape(inputShape); const paramShape = inputShape.slice(1); if (this.sharedAxes != null) { - for (const i of this.sharedAxes) { - paramShape[i - 1] = 1; + for (const i2 of this.sharedAxes) { + paramShape[i2 - 1] = 1; } } this.alpha = this.addWeight("alpha", paramShape, "float32", this.alphaInitializer, this.alphaRegularizer, true, this.alphaConstraint); const axes = {}; if (this.sharedAxes != null) { - for (let i = 1; i < inputShape.length; ++i) { - axes[i] = inputShape[i]; + for (let i2 = 1; i2 < inputShape.length; ++i2) { + axes[i2] = inputShape[i2]; } } this.inputSpec = [new InputSpec({ @@ -25514,18 +24953,18 @@ var Softmax3 = class extends Layer { Softmax3.className = "Softmax"; serialization_exports.registerClass(Softmax3); -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/utils/conv_utils.js -function normalizeArray(value, n, name) { +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/utils/conv_utils.js +function normalizeArray(value, n2, name) { if (typeof value === "number") { - return pyListRepeat(value, n); + return pyListRepeat(value, n2); } else { - if (value.length !== n) { - throw new ValueError(`The ${name} argument must be an integer or tuple of ${n} integers. Received: ${value.length} elements.`); + if (value.length !== n2) { + throw new ValueError(`The ${name} argument must be an integer or tuple of ${n2} integers. Received: ${value.length} elements.`); } - for (let i = 0; i < n; ++i) { - const singleValue = value[i]; + for (let i2 = 0; i2 < n2; ++i2) { + const singleValue = value[i2]; if (!isInteger(singleValue)) { - throw new ValueError(`The ${name} argument must be an integer or tuple of ${n} integers. Received: ${JSON.stringify(value)} including a non-integer number ${singleValue}`); + throw new ValueError(`The ${name} argument must be an integer or tuple of ${n2} integers. Received: ${JSON.stringify(value)} including a non-integer number ${singleValue}`); } } return value; @@ -25558,7 +24997,7 @@ function deconvLength(dimSize, strideSize, kernelSize, padding) { return dimSize; } -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/layers/convolutional.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/layers/convolutional.js function preprocessConv2DInput(x, dataFormat) { return tidy(() => { checkDataFormat(dataFormat); @@ -25786,8 +25225,8 @@ var Conv = class extends BaseConv { inputShape = getExactlyOneShape(inputShape); const newSpace = []; const space = this.dataFormat === "channelsLast" ? inputShape.slice(1, inputShape.length - 1) : inputShape.slice(2); - for (let i = 0; i < space.length; ++i) { - const newDim = convOutputLength(space[i], this.kernelSize[i], this.padding, this.strides[i], typeof this.dilationRate === "number" ? this.dilationRate : this.dilationRate[i]); + for (let i2 = 0; i2 < space.length; ++i2) { + const newDim = convOutputLength(space[i2], this.kernelSize[i2], this.padding, this.strides[i2], typeof this.dilationRate === "number" ? this.dilationRate : this.dilationRate[i2]); newSpace.push(newDim); } let outputShape = [inputShape[0]]; @@ -26104,7 +25543,7 @@ var SeparableConv = class extends Conv { const inputDim = inputShape[channelAxis]; const depthwiseKernelShape = this.kernelSize.concat([inputDim, this.depthMultiplier]); const pointwiseKernelShape = []; - for (let i = 0; i < this.rank; ++i) { + for (let i2 = 0; i2 < this.rank; ++i2) { pointwiseKernelShape.push(1); } pointwiseKernelShape.push(inputDim * this.depthMultiplier, this.filters); @@ -26293,7 +25732,7 @@ var UpSampling2D = class extends Layer { UpSampling2D.className = "UpSampling2D"; serialization_exports.registerClass(UpSampling2D); -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/layers/convolutional_depthwise.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/layers/convolutional_depthwise.js function depthwiseConv2d3(x, depthwiseKernel, strides = [1, 1], padding = "valid", dataFormat, dilationRate) { return tidy(() => { if (dataFormat == null) { @@ -26385,7 +25824,7 @@ var DepthwiseConv2D = class extends BaseConv { DepthwiseConv2D.className = "DepthwiseConv2D"; serialization_exports.registerClass(DepthwiseConv2D); -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/layers/recurrent.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/layers/recurrent.js function standardizeArgs(inputs, initialState, constants, numConstants) { if (Array.isArray(inputs)) { if (initialState != null || constants != null) { @@ -26447,19 +25886,19 @@ function rnn(stepFunction, inputs, initialStates, goBackwards = false, mask, con if (mask != null) { perStepMasks = unstack(mask); } - for (let t = 0; t < timeSteps; ++t) { - const currentInput = perStepInputs[t]; + for (let t2 = 0; t2 < timeSteps; ++t2) { + const currentInput = perStepInputs[t2]; const stepOutputs = tidy(() => stepFunction(currentInput, states)); if (mask == null) { lastOutput = stepOutputs[0]; states = stepOutputs[1]; } else { const maskedOutputs = tidy(() => { - const stepMask = perStepMasks[t]; + const stepMask = perStepMasks[t2]; const negStepMask = sub(onesLike(stepMask), stepMask); const output = add2(mul(stepOutputs[0], stepMask), mul(states[0], negStepMask)); - const newStates = states.map((state, i) => { - return add2(mul(stepOutputs[1][i], stepMask), mul(state, negStepMask)); + const newStates = states.map((state, i2) => { + return add2(mul(stepOutputs[1][i2], stepMask), mul(state, negStepMask)); }); return { output, newStates }; }); @@ -26549,7 +25988,7 @@ var RNN = class extends Layer { } const outputMask = this.returnSequences ? mask : null; if (this.returnState) { - const stateMask = this.states.map((s) => null); + const stateMask = this.states.map((s2) => null); return [outputMask].concat(stateMask); } else { return outputMask; @@ -26560,7 +25999,7 @@ var RNN = class extends Layer { if (this.states_ == null) { const numStates = Array.isArray(this.cell.stateSize) ? this.cell.stateSize.length : 1; const output = []; - for (let i = 0; i < numStates; ++i) { + for (let i2 = 0; i2 < numStates; ++i2) { output.push(null); } return output; @@ -26568,8 +26007,8 @@ var RNN = class extends Layer { return this.states_; } } - set states(s) { - this.states_ = s; + set states(s2) { + this.states_ = s2; } build(inputShape) { const constantShape = null; @@ -27013,7 +26452,7 @@ var GRUCell = class extends RNNCell { const dpMask = this.dropoutMask; const recDpMask = this.recurrentDropoutMask; let z; - let r; + let r2; let hh; if (0 < this.dropout && this.dropout < 1) { inputs = mul(inputs, dpMask[0]); @@ -27031,8 +26470,8 @@ var GRUCell = class extends RNNCell { const [xZ, xR, xH] = split(matrixX, 3, matrixX.rank - 1); const [recurrentZ, recurrentR] = split(matrixInner, 2, matrixInner.rank - 1); z = this.recurrentActivation.apply(add2(xZ, recurrentZ)); - r = this.recurrentActivation.apply(add2(xR, recurrentR)); - const recurrentH = dot2(mul(r, hTMinus1), rk2); + r2 = this.recurrentActivation.apply(add2(xR, recurrentR)); + const recurrentH = dot2(mul(r2, hTMinus1), rk2); hh = this.activation.apply(add2(xH, recurrentH)); const h = add2(mul(z, hTMinus1), mul(add2(1, neg(z)), hh)); return [h, h]; @@ -27190,7 +26629,7 @@ var LSTMCell = class extends RNNCell { } const dpMask = this.dropoutMask; const recDpMask = this.recurrentDropoutMask; - let i; + let i2; let f; let c; let o; @@ -27206,9 +26645,9 @@ var LSTMCell = class extends RNNCell { z = biasAdd(z, this.bias.read()); } const [z0, z1, z2, z3] = split(z, 4, z.rank - 1); - i = this.recurrentActivation.apply(z0); + i2 = this.recurrentActivation.apply(z0); f = this.recurrentActivation.apply(z1); - c = add2(mul(f, cTMinus1), mul(i, this.activation.apply(z2))); + c = add2(mul(f, cTMinus1), mul(i2, this.activation.apply(z2))); o = this.recurrentActivation.apply(z3); const h = mul(o, this.activation.apply(c)); return [h, h, c]; @@ -27305,10 +26744,10 @@ var StackedRNNCells = class extends RNNCell { nestedStates.reverse(); const newNestedStates = []; let callInputs; - for (let i = 0; i < this.cells.length; ++i) { - const cell = this.cells[i]; - states = nestedStates[i]; - if (i === 0) { + for (let i2 = 0; i2 < this.cells.length; ++i2) { + const cell = this.cells[i2]; + states = nestedStates[i2]; + if (i2 === 0) { callInputs = [inputs[0]].concat(states); } else { callInputs = [callInputs[0]].concat(states); @@ -27329,8 +26768,8 @@ var StackedRNNCells = class extends RNNCell { } inputShape = inputShape; let outputDim; - this.cells.forEach((cell, i) => { - nameScope(`RNNCell_${i}`, () => { + this.cells.forEach((cell, i2) => { + nameScope(`RNNCell_${i2}`, () => { cell.build(inputShape); if (Array.isArray(cell.stateSize)) { outputDim = cell.stateSize[0]; @@ -27397,8 +26836,8 @@ var StackedRNNCells = class extends RNNCell { for (const cell of this.cells) { const numParams = cell.weights.length; const inputWeights = weights.splice(numParams); - for (let i = 0; i < cell.weights.length; ++i) { - tuples.push([cell.weights[i], inputWeights[i]]); + for (let i2 = 0; i2 < cell.weights.length; ++i2) { + tuples.push([cell.weights[i2], inputWeights[i2]]); } } batchSetValue(tuples); @@ -27417,18 +26856,18 @@ function generateDropoutMask(args) { return masks.map((m) => keep(m.clone())); } -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/layers/convolutional_recurrent.js -var __rest = function(s, e) { - var t = {}; - for (var p2 in s) - if (Object.prototype.hasOwnProperty.call(s, p2) && e.indexOf(p2) < 0) - t[p2] = s[p2]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p2 = Object.getOwnPropertySymbols(s); i < p2.length; i++) { - if (e.indexOf(p2[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p2[i])) - t[p2[i]] = s[p2[i]]; +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/layers/convolutional_recurrent.js +var __rest = function(s2, e2) { + var t2 = {}; + for (var p2 in s2) + if (Object.prototype.hasOwnProperty.call(s2, p2) && e2.indexOf(p2) < 0) + t2[p2] = s2[p2]; + if (s2 != null && typeof Object.getOwnPropertySymbols === "function") + for (var i2 = 0, p2 = Object.getOwnPropertySymbols(s2); i2 < p2.length; i2++) { + if (e2.indexOf(p2[i2]) < 0 && Object.prototype.propertyIsEnumerable.call(s2, p2[i2])) + t2[p2[i2]] = s2[p2[i2]]; } - return t; + return t2; }; var ConvRNN2D = class extends RNN { constructor(args) { @@ -27657,9 +27096,9 @@ var ConvLSTM2DCell = class extends LSTMCell { hF = this.recurrentConv(hF, recKernelF); hC = this.recurrentConv(hC, recKernelC); hO = this.recurrentConv(hO, recKernelO); - const i = this.recurrentActivation.apply(add2(xI, hI)); + const i2 = this.recurrentActivation.apply(add2(xI, hI)); const f = this.recurrentActivation.apply(add2(xF, hF)); - const c = add2(mul(f, cTMinus1), mul(i, this.activation.apply(add2(xC, hC)))); + const c = add2(mul(f, cTMinus1), mul(i2, this.activation.apply(add2(xC, hC)))); const h = mul(this.recurrentActivation.apply(add2(xO, hO)), this.activation.apply(c)); return [h, h, c]; }); @@ -27702,7 +27141,7 @@ var ConvLSTM2D = class extends ConvRNN2D { ConvLSTM2D.className = "ConvLSTM2D"; serialization_exports.registerClass(ConvLSTM2D); -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/layers/core.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/layers/core.js var Dropout = class extends Layer { constructor(args) { super(args); @@ -27717,8 +27156,8 @@ var Dropout = class extends Layer { } const inputShape = input2.shape; const noiseShape = []; - for (let i = 0; i < this.noiseShape.length; ++i) { - noiseShape.push(this.noiseShape[i] == null ? inputShape[i] : this.noiseShape[i]); + for (let i2 = 0; i2 < this.noiseShape.length; ++i2) { + noiseShape.push(this.noiseShape[i2] == null ? inputShape[i2] : this.noiseShape[i2]); } return noiseShape; } @@ -27875,8 +27314,8 @@ var Flatten = class extends Layer { let input2 = getExactlyOneTensor(inputs); if (this.dataFormat === "channelsFirst" && input2.rank > 1) { const permutation = [0]; - for (let i = 2; i < input2.rank; ++i) { - permutation.push(i); + for (let i2 = 2; i2 < input2.rank; ++i2) { + permutation.push(i2); } permutation.push(1); input2 = transpose(input2, permutation); @@ -27948,9 +27387,9 @@ var Reshape2 = class extends Layer { constructor(args) { super(args); this.targetShape = args.targetShape; - for (let i = 0; i < this.targetShape.length; ++i) { - if (this.isUnknown(this.targetShape[i])) { - this.targetShape[i] = null; + for (let i2 = 0; i2 < this.targetShape.length; ++i2) { + if (this.isUnknown(this.targetShape[i2])) { + this.targetShape[i2] = null; } } } @@ -27962,11 +27401,11 @@ var Reshape2 = class extends Layer { const finalShape = outputShape.slice(); let known = 1; let unknown = null; - for (let i = 0; i < finalShape.length; ++i) { - const dim = finalShape[i]; + for (let i2 = 0; i2 < finalShape.length; ++i2) { + const dim = finalShape[i2]; if (this.isUnknown(dim)) { if (unknown === null) { - unknown = i; + unknown = i2; } else { throw new ValueError("Can only specifiy one unknown dimension."); } @@ -27987,8 +27426,8 @@ var Reshape2 = class extends Layer { } computeOutputShape(inputShape) { let anyUnknownDims = false; - for (let i = 0; i < inputShape.length; ++i) { - if (this.isUnknown(inputShape[i])) { + for (let i2 = 0; i2 < inputShape.length; ++i2) { + if (this.isUnknown(inputShape[i2])) { anyUnknownDims = true; break; } @@ -28039,8 +27478,8 @@ var Permute = class extends Layer { computeOutputShape(inputShape) { inputShape = getExactlyOneShape(inputShape); const outputShape = inputShape.slice(); - this.dims.forEach((dim, i) => { - outputShape[i + 1] = inputShape[dim]; + this.dims.forEach((dim, i2) => { + outputShape[i2 + 1] = inputShape[dim]; }); return outputShape; } @@ -28097,7 +27536,7 @@ var Masking = class extends Layer { Masking.className = "Masking"; serialization_exports.registerClass(Masking); -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/layers/embeddings.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/layers/embeddings.js var Embedding = class extends Layer { constructor(args) { super(args); @@ -28151,16 +27590,16 @@ var Embedding = class extends Layer { if (inLens.length !== inputShape.length - 1) { throw new ValueError(`"inputLength" is ${this.inputLength}, but received input shape has shape ${inputShape}`); } else { - let i = 0; + let i2 = 0; for (let k = 0; k < inLens.length; ++k) { const s1 = inLens[k]; const s2 = inputShape[k + 1]; if (s1 != null && s2 != null && s1 !== s2) { throw new ValueError(`"inputLength" is ${this.inputLength}, but received input shape has shape ${inputShape}`); } else if (s1 == null) { - inLens[i] = s2; + inLens[i2] = s2; } - i++; + i2++; } } return [inputShape[0], ...inLens, this.outputDim]; @@ -28195,7 +27634,7 @@ var Embedding = class extends Layer { Embedding.className = "Embedding"; serialization_exports.registerClass(Embedding); -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/layers/merge.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/layers/merge.js var Merge = class extends Layer { constructor(args) { super(args || {}); @@ -28214,19 +27653,19 @@ var Merge = class extends Layer { } const outputShape = shape1.slice(0, shape1.length - shape2.length); for (let k = 0; k < shape2.length; ++k) { - const i = shape1[shape1.length - shape2.length + k]; + const i2 = shape1[shape1.length - shape2.length + k]; const j = shape2[k]; - if (i == null || j == null || i < 0 || j < 0) { + if (i2 == null || j == null || i2 < 0 || j < 0) { outputShape.push(null); - } else if (i === 1) { + } else if (i2 === 1) { outputShape.push(j); } else if (j === 1) { - outputShape.push(i); + outputShape.push(i2); } else { - if (i !== j) { + if (i2 !== j) { throw new ValueError("Operands could not be broadcast together with shapes " + JSON.stringify(shape1) + " " + JSON.stringify(shape2)); } - outputShape.push(i); + outputShape.push(i2); } } return outputShape; @@ -28250,8 +27689,8 @@ var Merge = class extends Layer { throw new ValueError(`Can not merge tensors with different batch sizes. Got tensors with shapes: ${JSON.stringify(inputShape)}.`); } let outputShape = inputShape[0] == null ? null : inputShape[0].slice(1); - for (let i = 1; i < inputShape.length; ++i) { - const shape = inputShape[i] == null ? null : inputShape[i].slice(1); + for (let i2 = 1; i2 < inputShape.length; ++i2) { + const shape = inputShape[i2] == null ? null : inputShape[i2].slice(1); outputShape = this.computeElementwiseOpOutputShape(outputShape, shape); } const allRanks = inputShape.map((shape) => shape.length); @@ -28327,8 +27766,8 @@ var Merge = class extends Layer { } else { outputShape = inputShape[0].slice(1); } - for (let i = 1; i < inputShape.length; ++i) { - const shape = inputShape[i] == null ? null : inputShape[i].slice(1); + for (let i2 = 1; i2 < inputShape.length; ++i2) { + const shape = inputShape[i2] == null ? null : inputShape[i2].slice(1); outputShape = this.computeElementwiseOpOutputShape(outputShape, shape); } let batchSizes = []; @@ -28364,8 +27803,8 @@ var Merge = class extends Layer { } mask = mask.map((m) => m == null ? m : expandDims(m, 0)); let output = mask[0]; - for (let i = 1; i < mask.length - 1; ++i) { - output = logicalAnd(output, mask[i]); + for (let i2 = 1; i2 < mask.length - 1; ++i2) { + output = logicalAnd(output, mask[i2]); } return output; }); @@ -28378,8 +27817,8 @@ var Add2 = class extends Merge { mergeFunction(inputs) { return tidy(() => { let output = inputs[0].clone(); - for (let i = 1; i < inputs.length; ++i) { - output = add2(output, inputs[i]); + for (let i2 = 1; i2 < inputs.length; ++i2) { + output = add2(output, inputs[i2]); } return output; }); @@ -28394,8 +27833,8 @@ var Multiply2 = class extends Merge { mergeFunction(inputs) { return tidy(() => { let output = inputs[0].clone(); - for (let i = 1; i < inputs.length; ++i) { - output = mul(output, inputs[i]); + for (let i2 = 1; i2 < inputs.length; ++i2) { + output = mul(output, inputs[i2]); } return output; }); @@ -28410,8 +27849,8 @@ var Average = class extends Merge { mergeFunction(inputs) { return tidy(() => { let output = inputs[0].clone(); - for (let i = 1; i < inputs.length; ++i) { - output = add2(output, inputs[i]); + for (let i2 = 1; i2 < inputs.length; ++i2) { + output = add2(output, inputs[i2]); } return mul(1 / inputs.length, output); }); @@ -28426,8 +27865,8 @@ var Maximum2 = class extends Merge { mergeFunction(inputs) { return tidy(() => { let output = inputs[0]; - for (let i = 1; i < inputs.length; ++i) { - output = maximum(output, inputs[i]); + for (let i2 = 1; i2 < inputs.length; ++i2) { + output = maximum(output, inputs[i2]); } return output; }); @@ -28442,8 +27881,8 @@ var Minimum2 = class extends Merge { mergeFunction(inputs) { return tidy(() => { let output = inputs[0]; - for (let i = 1; i < inputs.length; ++i) { - output = minimum(output, inputs[i]); + for (let i2 = 1; i2 < inputs.length; ++i2) { + output = minimum(output, inputs[i2]); } return output; }); @@ -28478,8 +27917,8 @@ var Concatenate = class extends Merge { return; } const shapeSet = []; - for (let i = 0; i < inputShape.length; ++i) { - const shapeWithoutConcatAxis = inputShape[i].slice(); + for (let i2 = 0; i2 < inputShape.length; ++i2) { + const shapeWithoutConcatAxis = inputShape[i2].slice(); shapeWithoutConcatAxis.splice(this.axis, 1); let exists = false; for (const shape of shapeSet) { @@ -28542,13 +27981,13 @@ var Concatenate = class extends Merge { return null; } const outputMasks = []; - for (let i = 0; i < inputs.length; ++i) { - if (mask[i] == null) { - outputMasks.push(cast(onesLike(inputs[i]), "bool")); - } else if (mask[i].rank < inputs[i].rank) { - outputMasks.push(expandDims(mask[i], -1)); + for (let i2 = 0; i2 < inputs.length; ++i2) { + if (mask[i2] == null) { + outputMasks.push(cast(onesLike(inputs[i2]), "bool")); + } else if (mask[i2].rank < inputs[i2].rank) { + outputMasks.push(expandDims(mask[i2], -1)); } else { - outputMasks.push(mask[i]); + outputMasks.push(mask[i2]); } } const concatenatedMasks = concat(outputMasks, this.axis); @@ -28595,14 +28034,14 @@ function batchDot(x, y, axes) { if (xNDim > yNDim) { diff = xNDim - yNDim; const diffShape = []; - for (let i = 0; i < diff; ++i) { + for (let i2 = 0; i2 < diff; ++i2) { diffShape.push(1); } y = reshape(y, y.shape.concat(diffShape)); } else if (yNDim > xNDim) { diff = yNDim - xNDim; const diffShape = []; - for (let i = 0; i < diff; ++i) { + for (let i2 = 0; i2 < diff; ++i2) { diffShape.push(1); } x = reshape(x, x.shape.concat(diffShape)); @@ -28629,8 +28068,8 @@ function batchDot(x, y, axes) { idx = xNDim - 1; } const squeezeAxes = []; - for (let i = idx; i < idx + diff; ++i) { - squeezeAxes.push(i); + for (let i2 = idx; i2 < idx + diff; ++i2) { + squeezeAxes.push(i2); } out = squeeze(out, squeezeAxes); } @@ -28673,7 +28112,7 @@ var Dot = class extends Merge { interpretAxis(this.axes, x2.shape.length) ]; } else { - axes = this.axes.map((axis, i) => interpretAxis(axis, inputs[i].shape.length)); + axes = this.axes.map((axis, i2) => interpretAxis(axis, inputs[i2].shape.length)); } if (this.normalize) { x1 = l2Normalize(x1, axes[0]); @@ -28726,7 +28165,7 @@ var Dot = class extends Merge { Dot.className = "Dot"; serialization_exports.registerClass(Dot); -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/layers/noise.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/layers/noise.js var GaussianNoise = class extends Layer { constructor(args) { super(args); @@ -28830,7 +28269,7 @@ var AlphaDropout = class extends Layer { AlphaDropout.className = "AlphaDropout"; serialization_exports.registerClass(AlphaDropout); -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/layers/normalization.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/layers/normalization.js function batchNormalization(x, mean5, variance, beta, gamma, epsilon3 = 1e-3) { let out; if (x.rank === 2) { @@ -29024,9 +28463,9 @@ var LayerNormalization = class extends Layer { if (typeof this.axis === "number") { this.axis = [this.axis]; } - for (let i = 0; i < this.axis.length; ++i) { - if (this.axis[i] < 0) { - this.axis[i] += nDims; + for (let i2 = 0; i2 < this.axis.length; ++i2) { + if (this.axis[i2] < 0) { + this.axis[i2] += nDims; } } for (const axis of this.axis) { @@ -29073,13 +28512,13 @@ var LayerNormalization = class extends Layer { let offset = this.center ? broadcast(this.beta.read()) : null; const momentsTiling = []; const scaleOffsetTiling = []; - for (let i = 0; i < nDims; ++i) { - if (this.axis.indexOf(i) !== -1) { - momentsTiling.push(inputShape[i]); + for (let i2 = 0; i2 < nDims; ++i2) { + if (this.axis.indexOf(i2) !== -1) { + momentsTiling.push(inputShape[i2]); scaleOffsetTiling.push(1); } else { momentsTiling.push(1); - scaleOffsetTiling.push(inputShape[i]); + scaleOffsetTiling.push(inputShape[i2]); } } mean5 = tile(mean5, momentsTiling); @@ -29112,7 +28551,7 @@ var LayerNormalization = class extends Layer { LayerNormalization.className = "LayerNormalization"; serialization_exports.registerClass(LayerNormalization); -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/layers/padding.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/layers/padding.js function spatial2dPadding(x, padding, dataFormat) { return tidy(() => { if (x.rank !== 4) { @@ -29221,7 +28660,7 @@ var ZeroPadding2D = class extends Layer { ZeroPadding2D.className = "ZeroPadding2D"; serialization_exports.registerClass(ZeroPadding2D); -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/layers/pooling.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/layers/pooling.js function pool2d(x, poolSize, strides, padding, dataFormat, poolMode) { return tidy(() => { checkDataFormat(dataFormat); @@ -29619,7 +29058,7 @@ var GlobalMaxPooling2D = class extends GlobalPooling2D { GlobalMaxPooling2D.className = "GlobalMaxPooling2D"; serialization_exports.registerClass(GlobalMaxPooling2D); -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/layers/wrappers.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/layers/wrappers.js var Wrapper = class extends Layer { constructor(args) { super(args); @@ -29988,7 +29427,40 @@ var Bidirectional = class extends Wrapper { Bidirectional.className = "Bidirectional"; serialization_exports.registerClass(Bidirectional); -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/exports_layers.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/layers/preprocessing/image_preprocessing.js +var Rescaling = class extends Layer { + constructor(args) { + super(args); + this.scale = args.scale; + if (args.offset) { + this.offset = args.offset; + } else { + this.offset = 0; + } + } + getConfig() { + const config = { + "scale": this.scale, + "offset": this.offset + }; + const baseConfig = super.getConfig(); + Object.assign(config, baseConfig); + return config; + } + call(inputs, kwargs) { + return tidy(() => { + inputs = getExactlyOneTensor(inputs); + if (inputs.dtype !== "float32") { + inputs = cast2(inputs, "float32"); + } + return add2(mul(inputs, this.scale), this.offset); + }); + } +}; +Rescaling.className = "Rescaling"; +serialization_exports.registerClass(Rescaling); + +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/exports_layers.js function inputLayer(args) { return new InputLayer(args); } @@ -30194,8 +29666,11 @@ function alphaDropout(args) { function masking(args) { return new Masking(args); } +function rescaling(args) { + return new Rescaling(args); +} -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/exports_metrics.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/exports_metrics.js var exports_metrics_exports = {}; __export(exports_metrics_exports, { MAPE: () => MAPE2, @@ -30260,13 +29735,13 @@ function mse2(yTrue, yPred) { return meanSquaredError2(yTrue, yPred); } -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/exports_models.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/exports_models.js var exports_models_exports = {}; __export(exports_models_exports, { modelFromJSON: () => modelFromJSON }); -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/exports_regularizers.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/exports_regularizers.js var exports_regularizers_exports = {}; __export(exports_regularizers_exports, { l1: () => l12, @@ -30283,7 +29758,7 @@ function l22(config) { return l2(config); } -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/dist/callbacks.js +// node_modules/.pnpm/@tensorflow+tfjs-layers@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-layers/dist/callbacks.js var Callback = class extends BaseCallback { constructor() { super(...arguments); @@ -30383,7 +29858,7 @@ function earlyStopping(args) { } var callbacks = { earlyStopping }; -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/flags.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/flags.js var ENV4 = env(); ENV4.registerFlag("KEEP_INTERMEDIATE_TENSORS", () => false, (debugValue) => { if (debugValue) { @@ -30391,7 +29866,7 @@ ENV4.registerFlag("KEEP_INTERMEDIATE_TENSORS", () => false, (debugValue) => { } }); -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/data/compiled_api.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/data/compiled_api.js var DataType; (function(DataType2) { DataType2[DataType2["DT_INVALID"] = 0] = "DT_INVALID"; @@ -30452,7 +29927,7 @@ var SaverDef; })(CheckpointFormatVersion = SaverDef2.CheckpointFormatVersion || (SaverDef2.CheckpointFormatVersion = {})); })(SaverDef || (SaverDef = {})); -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/custom_op/register.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/custom_op/register.js var CUSTOM_OPS = {}; function registerOp(name, opFunc) { const opMapper = { @@ -30471,7 +29946,7 @@ function deregisterOp(name) { delete CUSTOM_OPS[name]; } -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/utils.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/utils.js function getParamValue(paramName, node, tensorMap, context, resourceManager) { const inputParam = node.inputParams[paramName]; if (inputParam && inputParam.inputIndexStart !== void 0) { @@ -30533,9 +30008,9 @@ function getPadding(node, tensorMap, context) { if (pad3 === "explicit") { pad3 = getParamValue("explicitPaddings", node, tensorMap, context); const explicitPadding = [[0, 0], [0, 0], [0, 0], [0, 0]]; - for (let i = 0; i < 4; i++) { - explicitPadding[i][0] = pad3[i * 2]; - explicitPadding[i][1] = pad3[i * 2 + 1]; + for (let i2 = 0; i2 < 4; i2++) { + explicitPadding[i2][0] = pad3[i2 * 2]; + explicitPadding[i2][1] = pad3[i2 * 2 + 1]; } return explicitPadding; } @@ -30545,7 +30020,7 @@ function cloneTensor(tensor2) { return tensor2.kept ? tensor2 : clone(tensor2); } -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/arithmetic.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/arithmetic.js var arithmetic_exports = {}; __export(arithmetic_exports, { json: () => json @@ -30931,7 +30406,7 @@ var json = [ } ]; -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/basic_math.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/basic_math.js var basic_math_exports = {}; __export(basic_math_exports, { json: () => json2 @@ -31810,7 +31285,7 @@ var json2 = [ } ]; -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/control.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/control.js var control_exports = {}; __export(control_exports, { json: () => json3 @@ -32680,7 +32155,7 @@ var json3 = [ } ]; -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/convolution.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/convolution.js var convolution_exports = {}; __export(convolution_exports, { json: () => json4 @@ -33375,7 +32850,7 @@ var json4 = [ } ]; -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/creation.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/creation.js var creation_exports = {}; __export(creation_exports, { json: () => json5 @@ -33749,7 +33224,7 @@ var json5 = [ } ]; -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/dynamic.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/dynamic.js var dynamic_exports = {}; __export(dynamic_exports, { json: () => json6 @@ -33943,7 +33418,7 @@ var json6 = [ } ]; -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/evaluation.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/evaluation.js var evaluation_exports = {}; __export(evaluation_exports, { json: () => json7 @@ -34033,7 +33508,7 @@ var json7 = [ } ]; -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/graph.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/graph.js var graph_exports = {}; __export(graph_exports, { json: () => json8 @@ -34237,7 +33712,7 @@ var json8 = [ } ]; -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/hash_table.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/hash_table.js var hash_table_exports = {}; __export(hash_table_exports, { json: () => json9 @@ -34461,7 +33936,7 @@ var json9 = [ } ]; -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/image.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/image.js var image_exports = {}; __export(image_exports, { json: () => json10 @@ -34613,7 +34088,7 @@ var json10 = [ } ]; -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/logical.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/logical.js var logical_exports = {}; __export(logical_exports, { json: () => json11 @@ -34890,7 +34365,7 @@ var json11 = [ } ]; -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/matrices.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/matrices.js var matrices_exports = {}; __export(matrices_exports, { json: () => json12 @@ -35125,7 +34600,7 @@ var json12 = [ } ]; -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/normalization.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/normalization.js var normalization_exports = {}; __export(normalization_exports, { json: () => json13 @@ -35386,7 +34861,7 @@ var json13 = [ } ]; -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/reduction.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/reduction.js var reduction_exports = {}; __export(reduction_exports, { json: () => json14 @@ -35692,7 +35167,7 @@ var json14 = [ } ]; -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/slice_join.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/slice_join.js var slice_join_exports = {}; __export(slice_join_exports, { json: () => json15 @@ -36096,7 +35571,7 @@ var json15 = [ } ]; -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/sparse.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/sparse.js var sparse_exports = {}; __export(sparse_exports, { json: () => json16 @@ -36201,7 +35676,7 @@ var json16 = [ } ]; -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/spectral.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/spectral.js var spectral_exports = {}; __export(spectral_exports, { json: () => json17 @@ -36265,7 +35740,7 @@ var json17 = [ } ]; -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/string.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/string.js var string_exports = {}; __export(string_exports, { json: () => json18 @@ -36371,7 +35846,7 @@ var json18 = [ } ]; -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/transformation.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/op_list/transformation.js var transformation_exports = {}; __export(transformation_exports, { json: () => json19 @@ -36622,7 +36097,7 @@ var json19 = [ } ]; -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/operation_mapper.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/operation_mapper.js var OperationMapper = class { static get Instance() { return this._instance || (this._instance = new this()); @@ -36946,8 +36421,8 @@ function decodeBase64(text) { throw new Error("Unable to decode base64 in this environment. Missing built-in atob() or Buffer()"); } } -function parseStringParam(s, keepCase) { - const value = Array.isArray(s) ? String.fromCharCode.apply(null, s) : decodeBase64(s); +function parseStringParam(s2, keepCase) { + const value = Array.isArray(s2) ? String.fromCharCode.apply(null, s2) : decodeBase64(s2); return keepCase ? value : value.toLowerCase(); } function getStringParam(attrs, name, def, keepCase = false) { @@ -37059,7 +36534,7 @@ function getBoolArrayParam(attrs, name, def) { return def; } -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/custom_op/node_value_impl.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/custom_op/node_value_impl.js var NodeValueImpl = class { constructor(node, tensorMap, context) { this.node = node; @@ -37119,7 +36594,7 @@ var NodeValueImpl = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/dist/ops/ops_for_converter.js +// node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/ops/ops_for_converter.js var ops_for_converter_exports = {}; __export(ops_for_converter_exports, { OP_SCOPE_SUFFIX: () => OP_SCOPE_SUFFIX, @@ -37258,6 +36733,7 @@ __export(ops_for_converter_exports, { prelu: () => prelu, print: () => print, prod: () => prod, + raggedGather: () => raggedGather, raggedTensorToTensor: () => raggedTensorToTensor, rand: () => rand, randomGamma: () => randomGamma, @@ -37335,7 +36811,7 @@ __export(ops_for_converter_exports, { zerosLike: () => zerosLike }); -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/arithmetic_executor.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/arithmetic_executor.js var executeOp = (node, tensorMap, context, ops = ops_for_converter_exports) => { switch (node.op) { case "BiasAdd": @@ -37381,7 +36857,7 @@ var executeOp = (node, tensorMap, context, ops = ops_for_converter_exports) => { } }; -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/basic_math_executor.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/basic_math_executor.js var executeOp2 = (node, tensorMap, context, ops = ops_for_converter_exports) => { switch (node.op) { case "Abs": @@ -37484,15 +36960,15 @@ var executeOp2 = (node, tensorMap, context, ops = ops_for_converter_exports) => } }; -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/executor/tensor_utils.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/executor/tensor_utils.js function assertShapesMatchAllowUndefinedSize(shapeA, shapeB, errorMessagePrefix = "") { if (typeof shapeA === "number" || typeof shapeB === "number") { return; } util_exports.assert(shapeA.length === shapeB.length, () => errorMessagePrefix + ` Shapes ${shapeA} and ${shapeB} must match`); - for (let i = 0; i < shapeA.length; i++) { - const dim0 = shapeA[i]; - const dim1 = shapeB[i]; + for (let i2 = 0; i2 < shapeA.length; i2++) { + const dim0 = shapeA[i2]; + const dim1 = shapeB[i2]; util_exports.assert(dim0 < 0 || dim1 < 0 || dim0 === dim1, () => errorMessagePrefix + ` Shapes ${shapeA} and ${shapeB} must match`); } } @@ -37529,18 +37005,18 @@ function mergeElementShape(elementShapeA, elementShapeB) { throw new Error(`Incompatible ranks during merge: ${elementShapeA} vs. ${elementShapeB}`); } const result = []; - for (let i = 0; i < elementShapeA.length; ++i) { - const dim0 = elementShapeA[i]; - const dim1 = elementShapeB[i]; + for (let i2 = 0; i2 < elementShapeA.length; ++i2) { + const dim0 = elementShapeA[i2]; + const dim1 = elementShapeB[i2]; if (dim0 >= 0 && dim1 >= 0 && dim0 !== dim1) { throw new Error(`Incompatible shape during merge: ${elementShapeA} vs. ${elementShapeB}`); } - result[i] = dim0 >= 0 ? dim0 : dim1; + result[i2] = dim0 >= 0 ? dim0 : dim1; } return result; } -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/executor/tensor_array.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/executor/tensor_array.js var TensorArray = class { constructor(name, dtype, maxSize, elementShape, identicalElementShapes, dynamicSize, clearAfterRead) { this.name = name; @@ -37601,7 +37077,7 @@ var TensorArray = class { if (index < 0 || !this.dynamicSize && index >= this.maxSize) { throw new Error(`Tried to write to index ${index}, but array is not resizeable and size is: ${this.maxSize}`); } - const t = this.tensors[index] || {}; + const t2 = this.tensors[index] || {}; if (tensor2.dtype !== this.dtype) { throw new Error(`TensorArray ${this.name}: Could not write to TensorArray index ${index}, because the value dtype is ${tensor2.dtype}, but TensorArray dtype is ${this.dtype}.`); @@ -37610,22 +37086,22 @@ var TensorArray = class { this.elementShape = tensor2.shape; } assertShapesMatchAllowUndefinedSize(this.elementShape, tensor2.shape, `TensorArray ${this.name}: Could not write to TensorArray index ${index}.`); - if (t.read) { + if (t2.read) { throw new Error(`TensorArray ${this.name}: Could not write to TensorArray index ${index}, because it has already been read.`); } - if (t.written) { + if (t2.written) { throw new Error(`TensorArray ${this.name}: Could not write to TensorArray index ${index}, because it has already been written.`); } - t.tensor = tensor2; + t2.tensor = tensor2; keep(tensor2); - t.written = true; - this.tensors[index] = t; + t2.written = true; + this.tensors[index] = t2; } writeMany(indices, tensors) { if (indices.length !== tensors.length) { throw new Error(`TensorArray ${this.name}: could not write multiple tensors,because the index size: ${indices.length} is not the same as tensors size: ${tensors.length}.`); } - indices.forEach((i, index) => this.write(i, tensors[index])); + indices.forEach((i2, index) => this.write(i2, tensors[index])); } gather(indices, dtype) { if (!!dtype && dtype !== this.dtype) { @@ -37633,8 +37109,8 @@ var TensorArray = class { } if (!indices) { indices = []; - for (let i = 0; i < this.size(); i++) { - indices.push(i); + for (let i2 = 0; i2 < this.size(); i2++) { + indices.push(i2); } } else { indices = indices.slice(0, this.size()); @@ -37654,8 +37130,8 @@ var TensorArray = class { return tensor([], [0].concat(this.elementShape)); } const indices = []; - for (let i = 0; i < this.size(); i++) { - indices.push(i); + for (let i2 = 0; i2 < this.size(); i2++) { + indices.push(i2); } const tensors = this.readMany(indices); assertShapesMatchAllowUndefinedSize(this.elementShape, tensors[0].shape, `TensorArray shape mismatch: tensor array shape (${this.elementShape}) vs first tensor shape (${tensors[0].shape})`); @@ -37695,23 +37171,23 @@ var TensorArray = class { const tensors = []; tidy(() => { tensor2 = reshape(tensor2, [1, totalLength, elementPerRow]); - for (let i = 0; i < length.length; ++i) { - const previousLength = i === 0 ? 0 : cumulativeLengths[i - 1]; + for (let i2 = 0; i2 < length.length; ++i2) { + const previousLength = i2 === 0 ? 0 : cumulativeLengths[i2 - 1]; const indices2 = [0, previousLength, 0]; - const sizes = [1, length[i], elementPerRow]; - tensors[i] = reshape(slice(tensor2, indices2, sizes), this.elementShape); + const sizes = [1, length[i2], elementPerRow]; + tensors[i2] = reshape(slice(tensor2, indices2, sizes), this.elementShape); } return tensors; }); const indices = []; - for (let i = 0; i < length.length; i++) { - indices[i] = i; + for (let i2 = 0; i2 < length.length; i2++) { + indices[i2] = i2; } this.writeMany(indices, tensors); } }; -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/executor/tensor_list.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/executor/tensor_list.js var TensorList = class { constructor(tensors, elementShape, elementDtype, maxNumElements = -1) { this.tensors = tensors; @@ -37795,8 +37271,8 @@ var TensorList = class { } const destTensorList = new TensorList([], this.elementShape, this.elementDtype, this.maxNumElements); destTensorList.tensors.length = size; - for (let i = 0; i < Math.min(this.tensors.length, size); ++i) { - destTensorList.tensors[i] = this.tensors[i]; + for (let i2 = 0; i2 < Math.min(this.tensors.length, size); ++i2) { + destTensorList.tensors[i2] = this.tensors[i2]; } return destTensorList; } @@ -37839,7 +37315,7 @@ var TensorList = class { return tensor([], [0].concat(outputElementShape)); } return tidy(() => { - const tensors = indices.map((i) => reshape(this.tensors[i], outputElementShape)); + const tensors = indices.map((i2) => reshape(this.tensors[i2], outputElementShape)); return stack(tensors, 0); }); } @@ -37853,7 +37329,7 @@ var TensorList = class { return tensor([], [0].concat(outputElementShape)); } return tidy(() => { - const tensors = this.tensors.map((t) => reshape(t, outputElementShape)); + const tensors = this.tensors.map((t2) => reshape(t2, outputElementShape)); return concat(tensors, 0); }); } @@ -37906,23 +37382,23 @@ function split2(tensor2, length, elementShape) { const tensors = tidy(() => { const tensors2 = []; tensor2 = reshape(tensor2, [1, totalLength, elementPerRow]); - for (let i = 0; i < length.length; ++i) { - const previousLength = i === 0 ? 0 : cumulativeLengths[i - 1]; + for (let i2 = 0; i2 < length.length; ++i2) { + const previousLength = i2 === 0 ? 0 : cumulativeLengths[i2 - 1]; const indices = [0, previousLength, 0]; - const sizes = [1, length[i], elementPerRow]; - tensors2[i] = reshape(slice(tensor2, indices, sizes), outputElementShape); + const sizes = [1, length[i2], elementPerRow]; + tensors2[i2] = reshape(slice(tensor2, indices, sizes), outputElementShape); } tensor2.dispose(); return tensors2; }); const list = new TensorList([], elementShape, tensor2.dtype, length.length); - for (let i = 0; i < tensors.length; i++) { - list.setItem(i, tensors[i]); + for (let i2 = 0; i2 < tensors.length; i2++) { + list.setItem(i2, tensors[i2]); } return list; } -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/control_executor.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/control_executor.js var executeOp3 = async (node, tensorMap, context) => { switch (node.op) { case "If": @@ -38187,7 +37663,7 @@ var executeOp3 = async (node, tensorMap, context) => { } }; -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/convolution_executor.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/convolution_executor.js function fusedConvAndDepthWiseParams(node, tensorMap, context) { const [extraOp, activationFunc] = getParamValue("fusedOps", node, tensorMap, context); const isBiasAdd = extraOp === "biasadd"; @@ -38342,7 +37818,7 @@ var executeOp4 = (node, tensorMap, context, ops = ops_for_converter_exports) => } }; -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/creation_executor.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/creation_executor.js var executeOp5 = (node, tensorMap, context, ops = ops_for_converter_exports) => { switch (node.op) { case "Fill": { @@ -38412,7 +37888,7 @@ var executeOp5 = (node, tensorMap, context, ops = ops_for_converter_exports) => } }; -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/dynamic_executor.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/dynamic_executor.js function nmsParams(node, tensorMap, context) { const boxes = getParamValue("boxes", node, tensorMap, context); const scores = getParamValue("scores", node, tensorMap, context); @@ -38461,7 +37937,7 @@ var executeOp6 = async (node, tensorMap, context, resourceManager, ops = ops_for } }; -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/evaluation_executor.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/evaluation_executor.js var executeOp7 = (node, tensorMap, context, ops = ops_for_converter_exports) => { switch (node.op) { case "LowerBound": { @@ -38497,7 +37973,7 @@ var executeOp7 = (node, tensorMap, context, ops = ops_for_converter_exports) => } }; -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/graph_executor.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/graph_executor.js var executeOp8 = (node, tensorMap, context, ops = ops_for_converter_exports) => { switch (node.op) { case "Const": { @@ -38515,14 +37991,14 @@ var executeOp8 = (node, tensorMap, context, ops = ops_for_converter_exports) => return [cloneTensor(data2)]; } case "IdentityN": - return getParamValue("x", node, tensorMap, context).map((t) => cloneTensor(t)); + return getParamValue("x", node, tensorMap, context).map((t2) => cloneTensor(t2)); case "Snapshot": const snapshot = getParamValue("x", node, tensorMap, context); return [cloneTensor(snapshot)]; case "Shape": return [ops.tensor1d(getParamValue("x", node, tensorMap, context).shape, "int32")]; case "ShapeN": - return getParamValue("x", node, tensorMap, context).map((t) => ops.tensor1d(t.shape)); + return getParamValue("x", node, tensorMap, context).map((t2) => ops.tensor1d(t2.shape)); case "Size": return [ops.scalar(getParamValue("x", node, tensorMap, context).size, "int32")]; case "Rank": @@ -38536,8 +38012,8 @@ var executeOp8 = (node, tensorMap, context, ops = ops_for_converter_exports) => const summarize = getParamValue("summarize", node, tensorMap, context); console.warn("The graph has a tf.print() operation,usually used for debugging, which slows down performance."); console.log(message); - for (let i = 0; i < data.length; i++) { - console.log(Array.prototype.slice.call(data[i].dataSync()).slice(0, summarize)); + for (let i2 = 0; i2 < data.length; i2++) { + console.log(Array.prototype.slice.call(data[i2].dataSync()).slice(0, summarize)); } return [input2]; default: @@ -38545,7 +38021,7 @@ var executeOp8 = (node, tensorMap, context, ops = ops_for_converter_exports) => } }; -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/executor/hash_table.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/executor/hash_table.js var HashTable = class { constructor(keyDType, valueDType) { this.keyDType = keyDType; @@ -38578,9 +38054,9 @@ var HashTable = class { const keysLength = $keys.length; const valuesLength = $values.length; util_exports.assert(keysLength === valuesLength, () => `The number of elements doesn't match, keys has ${keysLength} elements, the values has ${valuesLength} elements.`); - for (let i = 0; i < keysLength; i++) { - const key = $keys[i]; - const value = $values[i]; + for (let i2 = 0; i2 < keysLength; i2++) { + const key = $keys[i2]; + const value = $values[i2]; keep(value); this.tensorMap.set(key, value); } @@ -38592,8 +38068,8 @@ var HashTable = class { const $keys = await keys.data(); return tidy(() => { const result = []; - for (let i = 0; i < $keys.length; i++) { - const key = $keys[i]; + for (let i2 = 0; i2 < $keys.length; i2++) { + const key = $keys[i2]; const value = this.findWithDefault(key, defaultValue); result.push(value); } @@ -38614,7 +38090,7 @@ var HashTable = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/hash_table_executor.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/hash_table_executor.js var executeOp9 = async (node, tensorMap, context, resourceManager) => { switch (node.op) { case "HashTable": @@ -38652,7 +38128,7 @@ var executeOp9 = async (node, tensorMap, context, resourceManager) => { } }; -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/image_executor.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/image_executor.js var executeOp10 = (node, tensorMap, context, ops = ops_for_converter_exports) => { switch (node.op) { case "ResizeBilinear": { @@ -38692,7 +38168,7 @@ var executeOp10 = (node, tensorMap, context, ops = ops_for_converter_exports) => } }; -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/logical_executor.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/logical_executor.js var executeOp11 = (node, tensorMap, context, ops = ops_for_converter_exports) => { switch (node.op) { case "Equal": { @@ -38731,7 +38207,7 @@ var executeOp11 = (node, tensorMap, context, ops = ops_for_converter_exports) => } }; -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/matrices_executor.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/matrices_executor.js var executeOp12 = (node, tensorMap, context, ops = ops_for_converter_exports) => { switch (node.op) { case "BatchMatMul": @@ -38772,7 +38248,7 @@ var executeOp12 = (node, tensorMap, context, ops = ops_for_converter_exports) => } }; -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/normalization_executor.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/normalization_executor.js var executeOp13 = (node, tensorMap, context, ops = ops_for_converter_exports) => { switch (node.op) { case "EuclideanNorm": @@ -38801,7 +38277,7 @@ var executeOp13 = (node, tensorMap, context, ops = ops_for_converter_exports) => } }; -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/reduction_executor.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/reduction_executor.js var executeOp14 = (node, tensorMap, context, ops = ops_for_converter_exports) => { switch (node.op) { case "Max": { @@ -38876,15 +38352,15 @@ var executeOp14 = (node, tensorMap, context, ops = ops_for_converter_exports) => } }; -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/slice_join_executor.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/slice_join_executor.js var executeOp15 = (node, tensorMap, context, ops = ops_for_converter_exports) => { switch (node.op) { case "ConcatV2": case "Concat": { - const n = getParamValue("n", node, tensorMap, context); + const n2 = getParamValue("n", node, tensorMap, context); const axis = getParamValue("axis", node, tensorMap, context); let inputs = getParamValue("tensors", node, tensorMap, context); - inputs = inputs.slice(0, n); + inputs = inputs.slice(0, n2); return [ops.concat(inputs, axis)]; } case "Gather": { @@ -38902,9 +38378,9 @@ var executeOp15 = (node, tensorMap, context, ops = ops_for_converter_exports) => case "Reverse": { const dims = getParamValue("dims", node, tensorMap, context); const axis = []; - for (let i = 0; i < dims.length; i++) { - if (dims[i]) { - axis.push(i); + for (let i2 = 0; i2 < dims.length; i2++) { + if (dims[i2]) { + axis.push(i2); } } const input2 = getParamValue("x", node, tensorMap, context); @@ -38987,7 +38463,7 @@ var executeOp15 = (node, tensorMap, context, ops = ops_for_converter_exports) => } }; -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/sparse_executor.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/sparse_executor.js var executeOp16 = (node, tensorMap, context, ops = ops_for_converter_exports) => { switch (node.op) { case "SparseFillEmptyRows": { @@ -39016,7 +38492,7 @@ var executeOp16 = (node, tensorMap, context, ops = ops_for_converter_exports) => } }; -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/spectral_executor.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/spectral_executor.js var executeOp17 = (node, tensorMap, context, ops = ops_for_converter_exports) => { switch (node.op) { case "FFT": { @@ -39036,7 +38512,7 @@ var executeOp17 = (node, tensorMap, context, ops = ops_for_converter_exports) => } }; -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/string_executor.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/string_executor.js var executeOp18 = (node, tensorMap, context, ops = ops_for_converter_exports) => { switch (node.op) { case "StringNGrams": { @@ -39056,7 +38532,7 @@ var executeOp18 = (node, tensorMap, context, ops = ops_for_converter_exports) => } }; -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/transformation_executor.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/executors/transformation_executor.js var executeOp19 = (node, tensorMap, context, ops = ops_for_converter_exports) => { switch (node.op) { case "Cast": { @@ -39106,7 +38582,7 @@ var executeOp19 = (node, tensorMap, context, ops = ops_for_converter_exports) => } }; -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/operations/operation_executor.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/operations/operation_executor.js function executeOp20(node, tensorMap, context, resourceManager, tidy2 = tidy) { const value = ((node2, tensorMap2, context2) => { switch (node2.category) { @@ -39165,7 +38641,7 @@ function executeOp20(node, tensorMap, context, resourceManager, tidy2 = tidy) { return [].concat(value); } -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/executor/execution_context.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/executor/execution_context.js var ExecutionContext = class { constructor(weightMap = {}, tensorArrayMap = {}, tensorListMap = {}, functionMap = {}) { this.weightMap = weightMap; @@ -39197,8 +38673,8 @@ var ExecutionContext = class { } generateCurrentContextIds() { const names = []; - for (let i = 0; i < this.contexts.length - 1; i++) { - const contexts2 = this.contexts.slice(0, this.contexts.length - i); + for (let i2 = 0; i2 < this.contexts.length - 1; i2++) { + const contexts2 = this.contexts.slice(0, this.contexts.length - i2); names.push(this.contextIdforContexts(contexts2)); } names.push(""); @@ -39262,7 +38738,7 @@ var ExecutionContext = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/executor/model_analysis.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/executor/model_analysis.js function getExecutionSubgraph(inputs, outputs, weightMap, initNodes) { const usedNodes = /* @__PURE__ */ new Set(); const missingInputs = []; @@ -39382,7 +38858,7 @@ function isHashTable(node) { return HASH_TABLE_OPS.indexOf(node.op) >= 0; } -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/executor/graph_executor.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/executor/graph_executor.js var GraphExecutor = class { constructor(graph, parent) { this.graph = graph; @@ -39467,7 +38943,7 @@ var GraphExecutor = class { throw new Error(`This execution contains the node '${dynamicNode.name}', which has the dynamic op '${dynamicNode.op}'. Please use model.executeAsync() instead. Alternatively, to avoid the dynamic ops, specify the inputs [${syncInputs}]`); } if (missingInputs.length > 0) { - const outNames = outputs.map((n) => n.name); + const outNames = outputs.map((n2) => n2.name); const inNames = Object.keys(inputs); throw new Error(`Cannot compute the outputs [${outNames}] from the provided inputs [${inNames}]. Missing the following inputs: [${missingInputs}]`); } @@ -39506,8 +38982,8 @@ var GraphExecutor = class { }); const tensorsToKeep = this.getFrozenTensorIds(tensorsMap); const intermediateTensorConsumerCount = {}; - for (let i = 0; i < orderedNodes.length; i++) { - const node = orderedNodes[i]; + for (let i2 = 0; i2 < orderedNodes.length; i2++) { + const node = orderedNodes[i2]; if (!tensorsMap[node.name]) { const tensors = executeOp20(node, tensorsMap, context, this._resourceManager); if (util_exports.isPromise(tensors)) { @@ -39607,14 +39083,14 @@ var GraphExecutor = class { } try { this.keepTensorForDebug = env().getBool("KEEP_INTERMEDIATE_TENSORS"); - } catch (e) { - console.warn(e.message); + } catch (e2) { + console.warn(e2.message); } this.resetIntermediateTensors(); const context = new ExecutionContext(this.weightMap, tensorArrayMap, tensorListMap, this.functionExecutorMap); this.tensorsMap = await this.executeWithControlFlow(inputs, context, outputs, isFunctionExecution); const results = outputs.map((name) => getTensor(name, this.tensorsMap, context)); - const outputIds = results.map((t) => t.id); + const outputIds = results.map((t2) => t2.id); const inputIds = Object.keys(inputs).map((name) => inputs[name].id); this.keepIds = /* @__PURE__ */ new Set([...outputIds, ...inputIds, ...this.weightIds]); if (!this.keepTensorForDebug) { @@ -39691,12 +39167,12 @@ var GraphExecutor = class { } const currentContext = context.currentContext; if (util_exports.isPromise(tensors)) { - promises.push(tensors.then((t) => { - tensorMap[nodeName] = t; + promises.push(tensors.then((t2) => { + tensorMap[nodeName] = t2; context.currentContext = currentContext; this.checkTensorForDisposal(nodeName, item.node, tensorMap, context, tensorsToKeep, outputNames, intermediateTensorConsumerCount); this.processChildNodes(item.node, stack2, context, tensorMap, added, usedNodes); - return t; + return t2; })); } else { tensorMap[nodeName] = tensors; @@ -39788,7 +39264,7 @@ var GraphExecutor = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/executor/resource_manager.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/executor/resource_manager.js var ResourceManager = class { constructor(hashTableNameToHandle = {}, hashTableMap = {}) { this.hashTableNameToHandle = hashTableNameToHandle; @@ -39816,7 +39292,7 @@ var ResourceManager = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/executor/graph_model.js +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/executor/graph_model.js var TFHUB_SEARCH_PARAM = "?tfjs-format=file"; var DEFAULT_MODEL_NAME = "model.json"; var GraphModel = class { @@ -39932,7 +39408,7 @@ var GraphModel = class { if (this.structuredOutputKeys) { const outputTensorsArray = outputTensors instanceof Tensor ? [outputTensors] : outputTensors; const outputTensorMap = {}; - outputTensorsArray.forEach((outputTensor, i) => outputTensorMap[this.structuredOutputKeys[i]] = outputTensor); + outputTensorsArray.forEach((outputTensor, i2) => outputTensorMap[this.structuredOutputKeys[i2]] = outputTensor); return outputTensorMap; } return outputTensors; @@ -39945,8 +39421,8 @@ var GraphModel = class { if (inputs.length !== this.inputNodes.length) { throw new Error(`Input tensor count mismatch,the graph model has ${this.inputNodes.length} placeholders, while there are ${inputs.length} input tensors.`); } - return this.inputNodes.reduce((map, inputName, i) => { - map[inputName] = inputs[i]; + return this.inputNodes.reduce((map, inputName, i2) => { + map[inputName] = inputs[i2]; return map; }, {}); } @@ -40002,12 +39478,34 @@ async function loadGraphModel(modelUrl, options = {}, tfio = io_exports) { } function loadGraphModelSync(modelSource) { if (modelSource == null) { - throw new Error("modelUrl in loadGraphModelSync() cannot be null. Please provide a url or an IOHandler that loads the model"); - } - if (!modelSource.load) { - throw new Error(`modelUrl IO Handler ${modelSource} has no load function`); + throw new Error("modelUrl in loadGraphModelSync() cannot be null. Please provide model artifacts or an IOHandler that loads the model"); + } + let ioHandler; + if (modelSource instanceof Array) { + const [modelJSON, weights] = modelSource; + if (!modelJSON) { + throw new Error("modelJSON must be the first element of the array"); + } + if (!weights || !(weights instanceof ArrayBuffer)) { + throw new Error("An ArrayBuffer of weights must be the second element of the array"); + } + if (!("modelTopology" in modelJSON)) { + throw new Error("Model JSON is missing 'modelTopology'"); + } + if (!("weightsManifest" in modelJSON)) { + throw new Error("Model JSON is missing 'weightsManifest'"); + } + const weightSpecs = io_exports.getWeightSpecs(modelJSON.weightsManifest); + const modelArtifacts = io_exports.getModelArtifactsForJSONSync(modelJSON, weightSpecs, weights); + ioHandler = io_exports.fromMemorySync(modelArtifacts); + } else if ("load" in modelSource) { + ioHandler = modelSource; + } else if ("modelTopology" in modelSource && "weightSpecs" in modelSource && "weightData" in modelSource) { + ioHandler = io_exports.fromMemorySync(modelSource); + } else { + throw new Error("Unknown model format"); } - const model2 = new GraphModel(modelSource); + const model2 = new GraphModel(ioHandler); model2.load(); return model2; } @@ -40018,10 +39516,10 @@ function getTFHubUrl(modelUrl) { return `${modelUrl}${DEFAULT_MODEL_NAME}${TFHUB_SEARCH_PARAM}`; } -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/dist/version.js -var version3 = "3.20.0"; +// node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/version.js +var version3 = "3.21.0"; -// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/index.js +// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/index.js var dist_exports2 = {}; __export(dist_exports2, { CSVDataset: () => CSVDataset, @@ -40039,13 +39537,13 @@ __export(dist_exports2, { zip: () => zip }); -// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/dataset.js +// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/dataset.js var seedrandom3 = __toESM(require_seedrandom2()); -// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/iterators/lazy_iterator.js +// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/iterators/lazy_iterator.js var seedrandom2 = __toESM(require_seedrandom2()); -// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/util/deep_map.js +// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/util/deep_map.js function deepMap(input2, mapFn) { return deepMapInternal(input2, mapFn); } @@ -40154,7 +39652,7 @@ function isPrimitive(value) { return value === null || typeof value !== "object" && typeof value !== "function"; } -// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/util/deep_clone.js +// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/util/deep_clone.js function deepClone(container) { return deepMap(container, cloneIfTensor); } @@ -40168,7 +39666,7 @@ function cloneIfTensor(item) { } } -// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/util/ring_buffer.js +// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/util/ring_buffer.js var RingBuffer = class { constructor(capacity) { this.capacity = capacity; @@ -40262,7 +39760,7 @@ var RingBuffer = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/util/growing_ring_buffer.js +// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/util/growing_ring_buffer.js var GrowingRingBuffer = class extends RingBuffer { constructor() { super(GrowingRingBuffer.INITIAL_CAPACITY); @@ -40286,8 +39784,8 @@ var GrowingRingBuffer = class extends RingBuffer { const newCapacity = this.capacity * 2; const newData = new Array(newCapacity); const len = this.length(); - for (let i = 0; i < len; i++) { - newData[i] = this.get(this.wrap(this.begin + i)); + for (let i2 = 0; i2 < len; i2++) { + newData[i2] = this.get(this.wrap(this.begin + i2)); } this.data = newData; this.capacity = newCapacity; @@ -40298,7 +39796,7 @@ var GrowingRingBuffer = class extends RingBuffer { }; GrowingRingBuffer.INITIAL_CAPACITY = 32; -// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/iterators/lazy_iterator.js +// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/iterators/lazy_iterator.js function iteratorFromItems(items) { return new ArrayIterator(items); } @@ -40430,9 +39928,9 @@ var FunctionCallIterator = class extends LazyIterator { async next() { try { return this.nextFn(); - } catch (e) { - e.message = `Error thrown while iterating through a dataset: ${e.message}`; - throw e; + } catch (e2) { + e2.message = `Error thrown while iterating through a dataset: ${e2.message}`; + throw e2; } } }; @@ -40567,9 +40065,9 @@ var MapIterator = class extends LazyIterator { const inputTensors = tensor_util_exports.getTensorsInContainer(item.value); const mapped = this.transform(item.value); const outputTensors = tensor_util_exports.getTensorsInContainer(mapped); - for (const t of inputTensors) { - if (!tensor_util_exports.isTensorInList(t, outputTensors)) { - t.dispose(); + for (const t2 of inputTensors) { + if (!tensor_util_exports.isTensorInList(t2, outputTensors)) { + t2.dispose(); } } return { value: mapped, done: false }; @@ -40594,8 +40092,8 @@ var ErrorHandlingLazyIterator = class extends LazyIterator { while (true) { try { return await this.upstream.next(); - } catch (e) { - if (!this.handler(e)) { + } catch (e2) { + if (!this.handler(e2)) { return { value: null, done: true }; } } @@ -40619,9 +40117,9 @@ var AsyncMapIterator = class extends LazyIterator { const inputTensors = tensor_util_exports.getTensorsInContainer(item.value); const mapped = await this.transform(item.value); const outputTensors = tensor_util_exports.getTensorsInContainer(mapped); - for (const t of inputTensors) { - if (!tensor_util_exports.isTensorInList(t, outputTensors)) { - t.dispose(); + for (const t2 of inputTensors) { + if (!tensor_util_exports.isTensorInList(t2, outputTensors)) { + t2.dispose(); } } return { value: mapped, done: false }; @@ -40664,9 +40162,9 @@ var FlatmapIterator = class extends OneToManyIterator { const mappedArray = this.transform(item.value); const outputTensors = tensor_util_exports.getTensorsInContainer(mappedArray); this.outputQueue.pushAll(mappedArray); - for (const t of inputTensors) { - if (!tensor_util_exports.isTensorInList(t, outputTensors)) { - t.dispose(); + for (const t2 of inputTensors) { + if (!tensor_util_exports.isTensorInList(t2, outputTensors)) { + t2.dispose(); } } return true; @@ -40827,7 +40325,7 @@ var ShuffleIterator = class extends PrefetchIterator { } }; -// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/dataset.js +// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/dataset.js var Dataset = class { constructor() { this.size = null; @@ -40987,8 +40485,8 @@ function zip(datasets) { } let size; if (Array.isArray(datasets)) { - for (let i = 0; i < datasets.length; i++) { - size = size == null ? datasets[i].size : Math.min(size, datasets[i].size); + for (let i2 = 0; i2 < datasets.length; i2++) { + size = size == null ? datasets[i2].size : Math.min(size, datasets[i2].size); } } else if (datasets instanceof Object) { for (const ds in datasets) { @@ -41030,7 +40528,7 @@ function batchConcat(arrays) { } } -// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/datasets/text_line_dataset.js +// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/datasets/text_line_dataset.js var TextLineDataset = class extends Dataset { constructor(input2) { super(); @@ -41049,7 +40547,7 @@ var TextLineDataset = class extends Dataset { } }; -// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/datasets/csv_dataset.js +// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/datasets/csv_dataset.js var CODE_QUOTE = '"'; var STATE_OUT = Symbol("out"); var STATE_FIELD = Symbol("field"); @@ -41143,13 +40641,13 @@ var CSVDataset = class extends Dataset { const values = this.parseRow(line); const features = {}; const labels = {}; - for (let i = 0; i < this.fullColumnNames.length; i++) { - const key = this.fullColumnNames[i]; + for (let i2 = 0; i2 < this.fullColumnNames.length; i2++) { + const key = this.fullColumnNames[i2]; const config = this.columnConfigs ? this.columnConfigs[key] : null; if (this.configuredColumnsOnly && !config) { continue; } else { - const value = values[i]; + const value = values[i2]; let parsedValue = null; if (value === "") { if (config && config.default !== void 0) { @@ -41206,16 +40704,16 @@ var CSVDataset = class extends Dataset { let readOffset = 0; const readLength = line.length; let currentState = STATE_OUT; - for (let i = 0; i < readLength; i++) { + for (let i2 = 0; i2 < readLength; i2++) { switch (currentState) { case STATE_OUT: - switch (line.charAt(i)) { + switch (line.charAt(i2)) { case CODE_QUOTE: - readOffset = i + 1; + readOffset = i2 + 1; currentState = STATE_QUOTE; break; case this.delimiter: - readOffset = i + 1; + readOffset = i2 + 1; if (this.delimiter === " " && this.delimWhitespace) { break; } @@ -41224,22 +40722,22 @@ var CSVDataset = class extends Dataset { break; default: currentState = STATE_FIELD; - readOffset = i; + readOffset = i2; break; } break; case STATE_FIELD: - switch (line.charAt(i)) { + switch (line.charAt(i2)) { case this.delimiter: - result.push(line.substring(readOffset, i)); + result.push(line.substring(readOffset, i2)); currentState = STATE_OUT; - readOffset = i + 1; + readOffset = i2 + 1; break; default: } break; case STATE_QUOTE: - switch (line.charAt(i)) { + switch (line.charAt(i2)) { case CODE_QUOTE: currentState = STATE_QUOTE_AFTER_QUOTE; break; @@ -41247,11 +40745,11 @@ var CSVDataset = class extends Dataset { } break; case STATE_QUOTE_AFTER_QUOTE: - switch (line.charAt(i)) { + switch (line.charAt(i2)) { case this.delimiter: - result.push(line.substring(readOffset, i - 1)); + result.push(line.substring(readOffset, i2 - 1)); currentState = STATE_OUT; - readOffset = i + 1; + readOffset = i2 + 1; break; case CODE_QUOTE: currentState = STATE_QUOTE; @@ -41262,7 +40760,7 @@ var CSVDataset = class extends Dataset { } break; case STATE_WITHIN_QUOTE_IN_QUOTE: - switch (line.charAt(i)) { + switch (line.charAt(i2)) { case CODE_QUOTE: currentState = STATE_QUOTE; break; @@ -41284,7 +40782,7 @@ var CSVDataset = class extends Dataset { } }; -// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/iterators/microphone_iterator.js +// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/iterators/microphone_iterator.js var MicrophoneIterator = class extends LazyIterator { constructor(microphoneConfig) { super(); @@ -41323,8 +40821,8 @@ var MicrophoneIterator = class extends LazyIterator { audio: this.audioTrackConstraints == null ? true : this.audioTrackConstraints, video: false }); - } catch (e) { - throw new Error(`Error thrown while initializing video stream: ${e.message}`); + } catch (e2) { + throw new Error(`Error thrown while initializing video stream: ${e2.message}`); } if (!this.stream) { throw new Error("Could not obtain audio from microphone."); @@ -41411,7 +40909,7 @@ var MicrophoneIterator = class extends LazyIterator { flattenQueue(queue) { const frameSize = queue[0].length; const freqData = new Float32Array(queue.length * frameSize); - queue.forEach((data, i) => freqData.set(data, i * frameSize)); + queue.forEach((data, i2) => freqData.set(data, i2 * frameSize)); return freqData; } getTensorFromAudioDataArray(freqData, shape) { @@ -41421,7 +40919,7 @@ var MicrophoneIterator = class extends LazyIterator { } }; -// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/iterators/webcam_iterator.js +// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/iterators/webcam_iterator.js var WebcamIterator = class extends LazyIterator { constructor(webcamVideoElement, webcamConfig) { super(); @@ -41478,9 +40976,9 @@ var WebcamIterator = class extends LazyIterator { height: this.webcamVideoElement.height } }); - } catch (e) { - e.message = `Error thrown while initializing video stream: ${e.message}`; - throw e; + } catch (e2) { + e2.message = `Error thrown while initializing video stream: ${e2.message}`; + throw e2; } if (!this.stream) { throw new Error("Could not obtain video from webcam."); @@ -41506,14 +41004,14 @@ var WebcamIterator = class extends LazyIterator { let img; try { img = browser_exports.fromPixels(this.webcamVideoElement); - } catch (e) { - throw new Error(`Error thrown converting video to pixels: ${JSON.stringify(e)}`); + } catch (e2) { + throw new Error(`Error thrown converting video to pixels: ${JSON.stringify(e2)}`); } if (this.resize) { try { return { value: this.cropAndResizeFrame(img), done: false }; - } catch (e) { - throw new Error(`Error thrown cropping the video: ${e.message}`); + } catch (e2) { + throw new Error(`Error thrown cropping the video: ${e2.message}`); } finally { img.dispose(); } @@ -41555,11 +41053,11 @@ var WebcamIterator = class extends LazyIterator { } }; -// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/datasource.js +// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/datasource.js var DataSource = class { }; -// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/iterators/string_iterator.js +// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/iterators/string_iterator.js var StringIterator = class extends LazyIterator { split(separator) { return new SplitIterator(this, separator); @@ -41608,7 +41106,7 @@ var SplitIteratorImpl = class extends OneToManyIterator { } }; -// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/iterators/byte_chunk_iterator.js +// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/iterators/byte_chunk_iterator.js var ByteChunkIterator = class extends LazyIterator { decodeUTF8() { return new Utf8Iterator(this); @@ -41660,7 +41158,7 @@ var Utf8IteratorImpl = class extends OneToManyIterator { } }; -// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/iterators/file_chunk_iterator.js +// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/iterators/file_chunk_iterator.js var FileChunkIterator = class extends ByteChunkIterator { constructor(file, options = {}) { super(); @@ -41708,7 +41206,7 @@ var FileChunkIterator = class extends ByteChunkIterator { } }; -// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/iterators/url_chunk_iterator.js +// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/iterators/url_chunk_iterator.js async function urlChunkIterator(url, options = {}, fetchFunc) { let urlString; let requestInit; @@ -41741,12 +41239,12 @@ var getRequestInitFromRequest = (request) => { return init2; }; -// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/util/source_util.js +// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/util/source_util.js function isLocalPath(source) { return typeof source === "string" && source.slice(0, 7) === "file://"; } -// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/sources/file_data_source.js +// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/sources/file_data_source.js var FileDataSource = class extends DataSource { constructor(input2, options = {}) { super(); @@ -41762,7 +41260,7 @@ var FileDataSource = class extends DataSource { } }; -// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/sources/url_data_source.js +// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/sources/url_data_source.js var URLDataSource = class extends DataSource { constructor(url, fileOptions = {}) { super(); @@ -41778,7 +41276,7 @@ var URLDataSource = class extends DataSource { } }; -// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/readers.js +// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/readers.js function csv(source, csvConfig = {}) { return new CSVDataset(new URLDataSource(source), csvConfig); } @@ -41799,22 +41297,22 @@ async function microphone(microphoneConfig) { return MicrophoneIterator.create(microphoneConfig); } -// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/dist/version.js -var version4 = "3.20.0"; +// node_modules/.pnpm/@tensorflow+tfjs-data@3.21.0_5g5qgh2bedza5bmf2zfn7wcrmu/node_modules/@tensorflow/tfjs-data/dist/version.js +var version4 = "3.21.0"; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/cpu_util.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/cpu_util.js function assertNotComplex(tensor2, opName) { if (!Array.isArray(tensor2)) { tensor2 = [tensor2]; } - tensor2.forEach((t) => { - if (t != null) { - util_exports.assert(t.dtype !== "complex64", () => `${opName} does not support complex64 tensors in the CPU backend.`); + tensor2.forEach((t2) => { + if (t2 != null) { + util_exports.assert(t2.dtype !== "complex64", () => `${opName} does not support complex64 tensors in the CPU backend.`); } }); } -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/backend_cpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/backend_cpu.js var whereImpl2 = kernel_impls_exports.whereImpl; var MathBackendCPU = class extends KernelBackend { constructor() { @@ -41882,17 +41380,17 @@ var MathBackendCPU = class extends KernelBackend { } return this.data.get(dataId).values; } - bufferSync(t) { - const data = this.readSync(t.dataId); - if (t.dtype === "string") { + bufferSync(t2) { + const data = this.readSync(t2.dataId); + if (t2.dtype === "string") { try { const strings = data.map((d) => util_exports.decodeString(d)); - return buffer(t.shape, t.dtype, strings); + return buffer(t2.shape, t2.dtype, strings); } catch (_a) { throw new Error("Failed to decode encoded string bytes into utf-8"); } } - return buffer(t.shape, t.dtype, data); + return buffer(t2.shape, t2.dtype, data); } makeOutput(values, shape, dtype) { return engine().makeTensorFromTensorInfo(this.makeTensorInfo(shape, dtype, values), this); @@ -41943,7 +41441,7 @@ var MathBackendCPU = class extends KernelBackend { }; MathBackendCPU.nextDataId = 0; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/shared.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/shared.js var shared_exports = {}; __export(shared_exports, { addImpl: () => addImpl, @@ -41971,6 +41469,7 @@ __export(shared_exports, { negImpl: () => negImpl, notEqualImpl: () => notEqualImpl, prodImpl: () => prodImpl, + raggedGatherImpl: () => raggedGatherImpl, raggedTensorToTensorImpl: () => raggedTensorToTensorImpl, rangeImpl: () => rangeImpl, rsqrtImpl: () => rsqrtImpl, @@ -41994,11 +41493,11 @@ __export(shared_exports, { uniqueImpl: () => uniqueImpl }); -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Abs.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Abs.js function simpleAbsImpl(vals) { const resultValues = new Float32Array(vals.length); - for (let i = 0; i < vals.length; ++i) { - resultValues[i] = Math.abs(vals[i]); + for (let i2 = 0; i2 < vals.length; ++i2) { + resultValues[i2] = Math.abs(vals[i2]); } return resultValues; } @@ -42017,7 +41516,7 @@ var absConfig = { kernelFunc: abs2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/utils/binary_impl.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/utils/binary_impl.js function createSimpleBinaryKernelImpl(op2) { return (aShape, bShape, aVals, bVals, dtype) => { const newShape = backend_util_exports.assertAndGetBroadcastShape(aShape, bShape); @@ -42032,26 +41531,26 @@ function createSimpleBinaryKernelImpl(op2) { const aBroadcastDims = backend_util_exports.getBroadcastDims(aShape, newShape); const bBroadcastDims = backend_util_exports.getBroadcastDims(bShape, newShape); if (aBroadcastDims.length + bBroadcastDims.length === 0) { - for (let i = 0; i < result.length; ++i) { - result[i] = op2(aVals[i % aVals.length], bVals[i % bVals.length]); + for (let i2 = 0; i2 < result.length; ++i2) { + result[i2] = op2(aVals[i2 % aVals.length], bVals[i2 % bVals.length]); } } else { - for (let i = 0; i < result.length; ++i) { - const loc = util_exports.indexToLoc(i, resultRank, resultStrides); + for (let i2 = 0; i2 < result.length; ++i2) { + const loc = util_exports.indexToLoc(i2, resultRank, resultStrides); const aLoc = loc.slice(-aRank); aBroadcastDims.forEach((d) => aLoc[d] = 0); const aIndex = util_exports.locToIndex(aLoc, aRank, aStrides); const bLoc = loc.slice(-bRank); bBroadcastDims.forEach((d) => bLoc[d] = 0); const bIndex = util_exports.locToIndex(bLoc, bRank, bStrides); - result[i] = op2(aVals[aIndex], bVals[bIndex]); + result[i2] = op2(aVals[aIndex], bVals[bIndex]); } } return [result, newShape]; }; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Complex.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Complex.js function complex2(args) { const { inputs, backend: backend2 } = args; const { real: real5, imag: imag5 } = inputs; @@ -42071,7 +41570,7 @@ var complexConfig = { kernelFunc: complex2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/utils/zeros_impl.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/utils/zeros_impl.js function zeros3(backend2, shape, dtype = "float32") { if (dtype === "complex64") { const real5 = zeros3(backend2, shape, "float32"); @@ -42082,7 +41581,7 @@ function zeros3(backend2, shape, dtype = "float32") { return backend2.makeTensorInfo(shape, dtype, values); } -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Identity.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Identity.js function identity2(args) { const { inputs, backend: backend2 } = args; const { x } = inputs; @@ -42095,7 +41594,7 @@ var identityConfig = { kernelFunc: identity2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Real.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Real.js function real2(args) { const { inputs, backend: backend2 } = args; const { input: input2 } = inputs; @@ -42109,7 +41608,7 @@ var realConfig = { kernelFunc: real2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Cast.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Cast.js function castImpl(values, shape, inputType, dtype) { if (dtype === "int32") { const resultValues = Int32Array.from(values); @@ -42157,7 +41656,7 @@ var castConfig = { kernelFunc: cast3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/utils/binary_utils.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/utils/binary_utils.js function binaryKernelFunc(name, simpleImpl, complexImpl, dtype) { if (complexImpl == null) { return ({ inputs, backend: backend2 }) => { @@ -42224,16 +41723,16 @@ function createComplexBinaryKernelImpl(op2) { const bRank = bShape.length; const bStrides = util_exports.computeStrides(bShape); if (aBroadcastDims.length + bBroadcastDims.length === 0) { - for (let i = 0; i < resultRealVals.length; i++) { - const aIdx = i % aVals.length; - const bIdx = i % bVals.length; + for (let i2 = 0; i2 < resultRealVals.length; i2++) { + const aIdx = i2 % aVals.length; + const bIdx = i2 % bVals.length; const result = op2(aVals[aIdx * 2], aVals[aIdx * 2 + 1], bVals[bIdx * 2], bVals[bIdx * 2 + 1]); - resultRealVals[i] = result.real; - resultImagVals[i] = result.imag; + resultRealVals[i2] = result.real; + resultImagVals[i2] = result.imag; } } else { - for (let i = 0; i < resultRealVals.length; i++) { - const loc = util_exports.indexToLoc(i, resultRank, resultStrides); + for (let i2 = 0; i2 < resultRealVals.length; i2++) { + const loc = util_exports.indexToLoc(i2, resultRank, resultStrides); const aLoc = loc.slice(-aRank); aBroadcastDims.forEach((d) => aLoc[d] = 0); const aIndex = util_exports.locToIndex(aLoc, aRank, aStrides); @@ -42241,15 +41740,15 @@ function createComplexBinaryKernelImpl(op2) { bBroadcastDims.forEach((d) => bLoc[d] = 0); const bIndex = util_exports.locToIndex(bLoc, bRank, bStrides); const opResult = op2(aVals[aIndex * 2], aVals[aIndex * 2 + 1], bVals[bIndex * 2], bVals[bIndex * 2 + 1]); - resultRealVals[i] = opResult.real; - resultImagVals[i] = opResult.imag; + resultRealVals[i2] = opResult.real; + resultImagVals[i2] = opResult.imag; } } return [resultRealVals, resultImagVals, resultShape]; }; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Add.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Add.js var addImpl = createSimpleBinaryKernelImpl((a, b) => a + b); var addComplexImpl = createComplexBinaryKernelImpl((aReal, aImag, bReal, bImag) => { return { real: aReal + bReal, imag: aImag + bImag }; @@ -42261,12 +41760,12 @@ var addConfig = { kernelFunc: add4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Bincount_impl.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Bincount_impl.js function bincountImpl(xVals, weightsVals, weightsDtype, weightsShape, size) { const weightsSize = util_exports.sizeFromShape(weightsShape); const outVals = util_exports.makeZerosTypedArray(size, weightsDtype); - for (let i = 0; i < xVals.length; i++) { - const value = xVals[i]; + for (let i2 = 0; i2 < xVals.length; i2++) { + const value = xVals[i2]; if (value < 0) { throw new Error("Input x must be non-negative!"); } @@ -42274,7 +41773,7 @@ function bincountImpl(xVals, weightsVals, weightsDtype, weightsShape, size) { continue; } if (weightsSize > 0) { - outVals[value] += weightsVals[i]; + outVals[value] += weightsVals[i2]; } else { outVals[value] += 1; } @@ -42285,9 +41784,9 @@ function bincountReduceImpl(xBuf, weightsBuf, size, binaryOutput = false) { const numRows = xBuf.shape[0]; const numCols = xBuf.shape[1]; const outBuf = buffer([numRows, size], weightsBuf.dtype); - for (let i = 0; i < numRows; i++) { + for (let i2 = 0; i2 < numRows; i2++) { for (let j = 0; j < numCols; j++) { - const value = xBuf.get(i, j); + const value = xBuf.get(i2, j); if (value < 0) { throw new Error("Input x must be non-negative!"); } @@ -42295,12 +41794,12 @@ function bincountReduceImpl(xBuf, weightsBuf, size, binaryOutput = false) { continue; } if (binaryOutput) { - outBuf.set(1, i, value); + outBuf.set(1, i2, value); } else { if (weightsBuf.size > 0) { - outBuf.set(outBuf.get(i, value) + weightsBuf.get(i, j), i, value); + outBuf.set(outBuf.get(i2, value) + weightsBuf.get(i2, j), i2, value); } else { - outBuf.set(outBuf.get(i, value) + 1, i, value); + outBuf.set(outBuf.get(i2, value) + 1, i2, value); } } } @@ -42308,18 +41807,18 @@ function bincountReduceImpl(xBuf, weightsBuf, size, binaryOutput = false) { return outBuf; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/utils/unary_impl.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/utils/unary_impl.js function createSimpleUnaryImpl(op2) { return (values, dtype, attrs) => { const newValues = util_exports.getTypedArrayFromDType(dtype, values.length); - for (let i = 0; i < values.length; ++i) { - newValues[i] = op2(values[i], attrs); + for (let i2 = 0; i2 < values.length; ++i2) { + newValues[i2] = op2(values[i2], attrs); } return newValues; }; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/utils/unary_utils.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/utils/unary_utils.js function unaryKernelFunc(name, op2, dtype) { return ({ inputs, attrs, backend: backend2 }) => { const { x } = inputs; @@ -42332,8 +41831,8 @@ function unaryKernelFunc(name, op2, dtype) { const xSize = util_exports.sizeFromShape(x.shape); const $dtype = dtype || x.dtype; const newValues = util_exports.getArrayFromDType($dtype, xSize); - for (let i = 0; i < xSize; ++i) { - newValues[i] = op2(values[i], attrs); + for (let i2 = 0; i2 < xSize; ++i2) { + newValues[i2] = op2(values[i2], attrs); } return cpuBackend.makeTensorInfo(x.shape, $dtype, newValues); }; @@ -42353,7 +41852,7 @@ function unaryKernelFuncFromImpl(name, unaryImpl, dtype) { }; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Ceil.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Ceil.js var ceilImpl = createSimpleUnaryImpl((xi) => Math.ceil(xi)); var ceil2 = unaryKernelFuncFromImpl(Ceil, ceilImpl); var ceilConfig = { @@ -42362,7 +41861,7 @@ var ceilConfig = { kernelFunc: ceil2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Concat_impl.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Concat_impl.js function concatImpl(inputs, outShape, dtype, simplyConcat) { const outVals = util_exports.getArrayFromDType(dtype, util_exports.sizeFromShape(outShape)); if (simplyConcat && dtype !== "string") { @@ -42389,7 +41888,7 @@ function concatImpl(inputs, outShape, dtype, simplyConcat) { return outVals; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Equal.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Equal.js var equalImpl = createSimpleBinaryKernelImpl((a, b) => a === b ? 1 : 0); var equal2 = binaryKernelFunc(Equal, equalImpl, null, "bool"); var equalConfig = { @@ -42398,7 +41897,7 @@ var equalConfig = { kernelFunc: equal2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Exp.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Exp.js var expImpl = createSimpleUnaryImpl((xi) => Math.exp(xi)); var exp2 = unaryKernelFuncFromImpl(Exp, expImpl, "float32"); var expConfig = { @@ -42407,7 +41906,7 @@ var expConfig = { kernelFunc: exp2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Expm1.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Expm1.js var expm1Impl = createSimpleUnaryImpl((xi) => Math.expm1(xi)); var expm12 = unaryKernelFuncFromImpl(Expm1, expm1Impl); var expm1Config = { @@ -42416,7 +41915,7 @@ var expm1Config = { kernelFunc: expm12 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Floor.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Floor.js var floorImpl = createSimpleUnaryImpl((xi) => Math.floor(xi)); var floor2 = unaryKernelFuncFromImpl(Floor, floorImpl); var floorConfig = { @@ -42425,14 +41924,14 @@ var floorConfig = { kernelFunc: floor2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/GatherNd_Impl.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/GatherNd_Impl.js function gatherNdImpl(indicesData, paramsBuf, dtype, numSlices, sliceRank, sliceSize, strides, paramsShape, paramsSize) { const outBuf = buffer([numSlices, sliceSize], dtype); - for (let i = 0; i < numSlices; i++) { + for (let i2 = 0; i2 < numSlices; i2++) { const index = []; let flattenIndex = 0; for (let j = 0; j < sliceRank; j++) { - const dim = indicesData[i * sliceRank + j]; + const dim = indicesData[i2 * sliceRank + j]; flattenIndex += dim * strides[j]; index.push(dim); } @@ -42440,17 +41939,17 @@ function gatherNdImpl(indicesData, paramsBuf, dtype, numSlices, sliceRank, slice throw new Error(`Invalid indices: ${index} does not index into ${paramsShape}`); } for (let k = 0; k < sliceSize; k++) { - outBuf.values[i * sliceSize + k] = paramsBuf.get(...paramsBuf.indexToLoc(flattenIndex * sliceSize + k)); + outBuf.values[i2 * sliceSize + k] = paramsBuf.get(...paramsBuf.indexToLoc(flattenIndex * sliceSize + k)); } } return outBuf; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/GatherV2_impl.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/GatherV2_impl.js function gatherV2Impl(xBuf, indicesBuf, flattenOutputShape) { const outBuf = buffer(flattenOutputShape, xBuf.dtype); - for (let i = 0; i < outBuf.size; ++i) { - const newLoc = outBuf.indexToLoc(i); + for (let i2 = 0; i2 < outBuf.size; ++i2) { + const newLoc = outBuf.indexToLoc(i2); const originalLoc = newLoc.slice(); const batchIdx = originalLoc[0]; const indicesIdx = originalLoc[2]; @@ -42458,13 +41957,13 @@ function gatherV2Impl(xBuf, indicesBuf, flattenOutputShape) { originalLoc[2] = indicesBuf.values[indicesIndex]; const originalIndex = xBuf.locToIndex(originalLoc); if (0 <= originalIndex && originalIndex < xBuf.values.length) { - outBuf.values[i] = xBuf.values[originalIndex]; + outBuf.values[i2] = xBuf.values[originalIndex]; } } return outBuf; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Greater.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Greater.js var greaterImpl = createSimpleBinaryKernelImpl((a, b) => a > b ? 1 : 0); var greater3 = binaryKernelFunc(Greater, greaterImpl, null, "bool"); var greaterConfig = { @@ -42473,7 +41972,7 @@ var greaterConfig = { kernelFunc: greater3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/GreaterEqual.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/GreaterEqual.js var greaterEqualImpl = createSimpleBinaryKernelImpl((a, b) => a >= b ? 1 : 0); var greaterEqual2 = binaryKernelFunc(GreaterEqual, greaterEqualImpl, null, "bool"); var greaterEqualConfig = { @@ -42482,7 +41981,7 @@ var greaterEqualConfig = { kernelFunc: greaterEqual2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Less.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Less.js var lessImpl = createSimpleBinaryKernelImpl((a, b) => a < b ? 1 : 0); var less3 = binaryKernelFunc(Less, lessImpl, null, "bool"); var lessConfig = { @@ -42491,7 +41990,7 @@ var lessConfig = { kernelFunc: less3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/LessEqual.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/LessEqual.js var lessEqualImpl = createSimpleBinaryKernelImpl((a, b) => a <= b ? 1 : 0); var lessEqual2 = binaryKernelFunc(LessEqual, lessEqualImpl, null, "bool"); var lessEqualConfig = { @@ -42500,18 +41999,18 @@ var lessEqualConfig = { kernelFunc: lessEqual2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/LinSpace_impl.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/LinSpace_impl.js function linSpaceImpl(start, stop, num) { const step5 = (stop - start) / (num - 1); const values = util_exports.makeZerosTypedArray(num, "float32"); values[0] = start; - for (let i = 1; i < values.length; i++) { - values[i] = values[i - 1] + step5; + for (let i2 = 1; i2 < values.length; i2++) { + values[i2] = values[i2 - 1] + step5; } return values; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Log.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Log.js var logImpl = createSimpleUnaryImpl((xi) => Math.log(xi)); var log3 = unaryKernelFuncFromImpl(Log, logImpl); var logConfig = { @@ -42520,11 +42019,11 @@ var logConfig = { kernelFunc: log3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Max_impl.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Max_impl.js function maxImpl(aVals, reduceSize, outShape, dtype) { const vals = util_exports.getTypedArrayFromDType(dtype, util_exports.sizeFromShape(outShape)); - for (let i = 0; i < vals.length; ++i) { - const offset = i * reduceSize; + for (let i2 = 0; i2 < vals.length; ++i2) { + const offset = i2 * reduceSize; let max7 = aVals[offset]; for (let j = 0; j < reduceSize; ++j) { const value = aVals[offset + j]; @@ -42532,12 +42031,12 @@ function maxImpl(aVals, reduceSize, outShape, dtype) { max7 = value; } } - vals[i] = max7; + vals[i2] = max7; } return vals; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Maximum.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Maximum.js var maximumImpl = createSimpleBinaryKernelImpl((aValue, bValue) => Math.max(aValue, bValue)); var maximum3 = binaryKernelFunc(Maximum, maximumImpl); var maximumConfig = { @@ -42546,7 +42045,7 @@ var maximumConfig = { kernelFunc: maximum3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Minimum.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Minimum.js var minimumImpl = createSimpleBinaryKernelImpl((aValue, bValue) => Math.min(aValue, bValue)); var minimum3 = binaryKernelFunc(Minimum, minimumImpl); var minimumConfig = { @@ -42555,7 +42054,7 @@ var minimumConfig = { kernelFunc: minimum3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Multiply.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Multiply.js var multiplyImpl = createSimpleBinaryKernelImpl((aValue, bValue) => aValue * bValue); var multiplyComplexImpl = createComplexBinaryKernelImpl((aReal, aImag, bReal, bImag) => { return { @@ -42570,7 +42069,7 @@ var multiplyConfig = { kernelFunc: multiply2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Neg.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Neg.js function negImpl(xVals, xShape, xDtype) { const minusOne = util_exports.createScalarValue(-1, xDtype); return multiplyImpl([], xShape, minusOne, xVals, xDtype); @@ -42589,7 +42088,7 @@ var negConfig = { kernelFunc: neg2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/NotEqual.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/NotEqual.js var notEqualImpl = createSimpleBinaryKernelImpl((a, b) => a !== b ? 1 : 0); var notEqual2 = binaryKernelFunc(NotEqual, notEqualImpl, null, "bool"); var notEqualConfig = { @@ -42598,26 +42097,26 @@ var notEqualConfig = { kernelFunc: notEqual2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Transpose_impl.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Transpose_impl.js function transposeImpl(xVals, xShape, dtype, perm, newShape) { const xRank = xShape.length; const xSize = util_exports.sizeFromShape(xShape); const xStrides = util_exports.computeStrides(xShape); const newStrides = util_exports.computeStrides(newShape); const result = util_exports.getTypedArrayFromDType(dtype, util_exports.sizeFromShape(newShape)); - for (let i = 0; i < xSize; ++i) { - const loc = util_exports.indexToLoc(i, xRank, xStrides); + for (let i2 = 0; i2 < xSize; ++i2) { + const loc = util_exports.indexToLoc(i2, xRank, xStrides); const newLoc = new Array(loc.length); - for (let i2 = 0; i2 < newLoc.length; i2++) { - newLoc[i2] = loc[perm[i2]]; + for (let i3 = 0; i3 < newLoc.length; i3++) { + newLoc[i3] = loc[perm[i3]]; } const newIndex = util_exports.locToIndex(newLoc, xRank, newStrides); - result[newIndex] = xVals[i]; + result[newIndex] = xVals[i2]; } return result; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Transpose.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Transpose.js function transpose2(args) { const { inputs, attrs, backend: backend2 } = args; const { x } = inputs; @@ -42625,8 +42124,8 @@ function transpose2(args) { assertNotComplex(x, "transpose"); const xRank = x.shape.length; const newShape = new Array(xRank); - for (let i = 0; i < newShape.length; i++) { - newShape[i] = x.shape[perm[i]]; + for (let i2 = 0; i2 < newShape.length; i2++) { + newShape[i2] = x.shape[perm[i2]]; } const values = backend2.data.get(x.dataId).values; const result = transposeImpl(values, x.shape, x.dtype, perm, newShape); @@ -42639,19 +42138,19 @@ var transposeConfig = { kernelFunc: transpose2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Prod.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Prod.js function prodImpl(xShape, xDtype, xVals, reductionAxes) { const [outShape, reduceShape] = backend_util_exports.computeOutAndReduceShapes(xShape, reductionAxes); const outDtype = upcastType(xDtype, "int32"); const outVals = util_exports.makeZerosTypedArray(util_exports.sizeFromShape(outShape), outDtype); const reduceSize = util_exports.sizeFromShape(reduceShape); - for (let i = 0; i < outVals.length; ++i) { - const offset = i * reduceSize; + for (let i2 = 0; i2 < outVals.length; ++i2) { + const offset = i2 * reduceSize; let prod6 = 1; for (let j = 0; j < reduceSize; ++j) { prod6 *= xVals[offset + j]; } - outVals[i] = prod6; + outVals[i2] = prod6; } return { outVals, outShape, outDtype }; } @@ -42677,7 +42176,7 @@ function prod2(args) { if (keepDims) { resultShape = backend_util_exports.expandShapeToKeepDim(outShape, axes); } - intermediateTensorInfos.forEach((t) => backend2.disposeIntermediateTensorInfo(t)); + intermediateTensorInfos.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2)); return backend2.makeTensorInfo(resultShape, outDtype, outVals); } var prodConfig = { @@ -42686,7 +42185,134 @@ var prodConfig = { kernelFunc: prod2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/RaggedTensorToTensor_impl.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/RaggedGather_impl.js +function validateIndices(indices, indicesShape, numParams) { + indices.forEach((index, i2) => { + if (index < 0 || index >= numParams) { + const locString = util_exports.indexToLoc(i2, indicesShape.length, util_exports.computeStrides(indicesShape)).join(","); + throw new Error(`indices[${locString}] = ${index} is not in [0, ${numParams})`); + } + }); +} +function validateSplits(paramsNestedSplits, numParamsDenseValues) { + for (let dim = 0; dim < paramsNestedSplits.length; ++dim) { + const splits = paramsNestedSplits[dim]; + const lastSplit = dim === paramsNestedSplits.length - 1 ? numParamsDenseValues : paramsNestedSplits[dim + 1].length; + if (splits.length === 0) { + throw new Error("Ragged splits may not be empty"); + } + if (splits[0] < 0) { + throw new Error("Ragged splits must be non-negative"); + } + if (splits[splits.length - 1] > lastSplit) { + throw new Error("Ragged splits must not point past values"); + } + for (let i2 = 1; i2 < splits.length; ++i2) { + if (splits[i2 - 1] > splits[i2]) { + throw new Error("Ragged splits must be sorted in ascending order"); + } + } + } +} +function makeSplits(indices, indicesShape, paramsNestedSplits, numParamsDenseValues) { + const valueSlices = []; + let numValues = 0; + const numSplits = indicesShape.length - 1 + paramsNestedSplits.length; + const outSplits = new Array(numSplits).fill(null).map(() => [0]); + validateSplits(paramsNestedSplits, numParamsDenseValues); + let nrows = 1; + for (let dim = 0; dim < indicesShape.length - 1; ++dim) { + nrows *= indicesShape[dim]; + const rowLength = indicesShape[dim + 1]; + for (let i2 = 1; i2 < nrows + 1; ++i2) { + outSplits[dim].push(i2 * rowLength); + } + } + for (let i2 = 0; i2 < indices.length; ++i2) { + let start = indices[i2]; + let limit = indices[i2] + 1; + for (let dim = 0; dim < paramsNestedSplits.length; ++dim) { + const splits = paramsNestedSplits[dim]; + const outDim = dim + indicesShape.length - 1; + if (outDim >= 0) { + const outSplitsOutDim = outSplits[outDim]; + const delta = outSplitsOutDim[outSplitsOutDim.length - 1] - splits[start]; + for (let j = start; j < limit; ++j) { + outSplits[outDim].push(splits[j + 1] + delta); + } + } + start = splits[start]; + limit = splits[limit]; + } + if (limit !== start) { + valueSlices.push([start, limit]); + numValues += limit - start; + } + } + return { outSplits, valueSlices, numValues }; +} +function getSplits(outSplits) { + const splitsOut = []; + for (let i2 = 0; i2 < outSplits.length; ++i2) { + const numSplits = outSplits[i2].length; + const splits = util_exports.getArrayFromDType("int32", numSplits); + splitsOut.push(splits); + outSplits[i2].forEach((value, j) => splits[j] = value); + } + return splitsOut; +} +function computeFlatOuterDims(orig, numOutDims) { + const outDims = orig.slice(0, numOutDims); + while (outDims.length < numOutDims) { + outDims.push(1); + } + for (let inDim = numOutDims; inDim < orig.length; inDim++) { + outDims[numOutDims - 1] *= orig[inDim]; + } + return outDims; +} +function writeValueSlices(paramsDenseValues, paramsDenseValuesShape, valueSlices, valueSize, values, valuesShape) { + const denseM = computeFlatOuterDims(paramsDenseValuesShape, 2)[1]; + const valuesM = computeFlatOuterDims(valuesShape, 2)[1]; + let outPos = 0; + for (const slice6 of valueSlices) { + for (let i2 = slice6[0]; i2 < slice6[1]; ++i2) { + for (let j = 0; j < valueSize; ++j) { + values[outPos * valuesM + j] = paramsDenseValues[i2 * denseM + j]; + } + ++outPos; + } + } +} +function getValues(paramsDenseValues, paramsDenseValuesShape, paramsDenseValuesDType, valueSlices, numValues) { + const valuesShape = paramsDenseValuesShape.slice(); + valuesShape[0] = numValues; + const valuesOut = util_exports.getArrayFromDType(paramsDenseValuesDType, util_exports.sizeFromShape(valuesShape)); + const numElements = paramsDenseValues.length; + const valueSize = numElements === 0 ? 0 : numElements / paramsDenseValuesShape[0]; + writeValueSlices(paramsDenseValues, paramsDenseValuesShape, valueSlices, valueSize, valuesOut, valuesShape); + return [valuesOut, valuesShape]; +} +function raggedGatherImpl(paramsNestedSplits, paramsNestedSplitsShapes, paramsDenseValues, paramsDenseValuesShape, paramsDenseValuesDType, indices, indicesShape, outputRaggedRank) { + if (paramsNestedSplits.length === 0) { + throw new Error("paramsNestedSplits must be non empty"); + } + if (paramsNestedSplitsShapes[0].length === 0) { + throw new Error("Split tensors must not be scalars"); + } + const numParams = paramsNestedSplitsShapes[0][0] - 1; + validateIndices(indices, indicesShape, numParams); + if (paramsDenseValuesShape.length === 0) { + throw new Error("params.rank must be nonzero"); + } + const numParamsDenseValues = paramsDenseValuesShape[0]; + const { outSplits, valueSlices, numValues } = makeSplits(indices, indicesShape, paramsNestedSplits, numParamsDenseValues); + const outputNestedSplits = getSplits(outSplits); + const outputDenseValues = getValues(paramsDenseValues, paramsDenseValuesShape, paramsDenseValuesDType, valueSlices, numValues); + return [outputNestedSplits, outputDenseValues[0], outputDenseValues[1]]; +} + +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/RaggedTensorToTensor_impl.js var RowPartitionType2 = backend_util_exports.RowPartitionType; var RaggedTensorToTensorOp = class { constructor(shape, shapeShape, values, valuesShape, valuesDType, defaultValue, defaultValueShape, rowPartitionValues, rowPartitionValuesShapes, rowPartitionTypeStrings) { @@ -42733,8 +42359,8 @@ var RaggedTensorToTensorOp = class { return 0; } let maxWidth = 0; - for (let i = 0; i < tensorLength - 1; ++i) { - const currentWidth = rowSplit[i + 1] - rowSplit[i]; + for (let i2 = 0; i2 < tensorLength - 1; ++i2) { + const currentWidth = rowSplit[i2 + 1] - rowSplit[i2]; if (currentWidth > maxWidth) { maxWidth = currentWidth; } @@ -42749,24 +42375,24 @@ var RaggedTensorToTensorOp = class { let firstEqualIndex = 0; let firstEqualIndexValue = valueRowIds[0]; let maxWidth = 0; - for (let i = 1; i < indexLength; ++i) { - const value = valueRowIds[i]; + for (let i2 = 1; i2 < indexLength; ++i2) { + const value = valueRowIds[i2]; if (value !== firstEqualIndexValue) { firstEqualIndexValue = value; - maxWidth = Math.max(i - firstEqualIndex, maxWidth); - firstEqualIndex = i; + maxWidth = Math.max(i2 - firstEqualIndex, maxWidth); + firstEqualIndex = i2; } } return Math.max(indexLength - firstEqualIndex, maxWidth); } - tensorShapeFromTensor(t, tShape, isPartial = true) { + tensorShapeFromTensor(t2, tShape, isPartial = true) { if (tShape.length === 0) { - if (t[0] === -1) { + if (t2[0] === -1) { return []; } throw new Error(`The only valid scalar shape tensor is the fully unknown shape specified as -1.`); } - return makeShape(t, isPartial); + return makeShape(t2, isPartial); } calculateOutputSize(firstDim) { const valueShape = this.valuesShape; @@ -42778,9 +42404,9 @@ var RaggedTensorToTensorOp = class { if (result[0] < 0) { result[0] = firstDim; } - for (let i = 1; i <= this.raggedRank; ++i) { - if (result[i] < 0) { - result[i] = this.getMaxWidth(i); + for (let i2 = 1; i2 <= this.raggedRank; ++i2) { + if (result[i2] < 0) { + result[i2] = this.getMaxWidth(i2); } } return result; @@ -42789,10 +42415,10 @@ var RaggedTensorToTensorOp = class { const minDimension = Math.min(firstDimension, firstDimensionOutput); const result = []; let currentOutputIndex = 0; - for (let i = 0; i < minDimension; ++i, currentOutputIndex += outputIndexMultiplier) { + for (let i2 = 0; i2 < minDimension; ++i2, currentOutputIndex += outputIndexMultiplier) { result.push(currentOutputIndex); } - for (let i = minDimension; i < firstDimension; ++i) { + for (let i2 = minDimension; i2 < firstDimension; ++i2) { result.push(-1); } util_exports.assert(result.length === firstDimension, () => "Final length of result must be equal to firstDimension."); @@ -42801,10 +42427,10 @@ var RaggedTensorToTensorOp = class { calculateOutputIndexRowSplit(rowSplit, parentOutputIndex, outputIndexMultiplier, outputSize) { const rowSplitSize = rowSplit.length; const result = []; - for (let i = 0; i < rowSplitSize - 1; ++i) { - const rowLength = rowSplit[i + 1] - rowSplit[i]; + for (let i2 = 0; i2 < rowSplitSize - 1; ++i2) { + const rowLength = rowSplit[i2 + 1] - rowSplit[i2]; let realLength = Math.min(outputSize, rowLength); - let parentOutputIndexCurrent = parentOutputIndex[i]; + let parentOutputIndexCurrent = parentOutputIndex[i2]; if (parentOutputIndexCurrent === -1) { realLength = 0; } @@ -42834,8 +42460,8 @@ var RaggedTensorToTensorOp = class { } let currentOutputIndex = parentOutputIndex[currentValueRowId]; result.push(currentOutputIndex); - for (let i = 1; i < indexSize; ++i) { - const nextValueRowId = valueRowIds[i]; + for (let i2 = 1; i2 < indexSize; ++i2) { + const nextValueRowId = valueRowIds[i2]; if (nextValueRowId === currentValueRowId) { if (currentOutputIndex >= 0) { ++currentOutputColumn; @@ -42901,16 +42527,16 @@ var RaggedTensorToTensorOp = class { const outputSize = this.calculateOutputSize(firstDimension); const multiplier = new Array(this.raggedRank + 1); multiplier[multiplier.length - 1] = 1; - for (let i = multiplier.length - 2; i >= 0; --i) { - multiplier[i] = multiplier[i + 1] * outputSize[i + 1]; + for (let i2 = multiplier.length - 2; i2 >= 0; --i2) { + multiplier[i2] = multiplier[i2 + 1] * outputSize[i2 + 1]; } const outputShape = makeShape(outputSize, false); const outputTensor = util_exports.getArrayFromDType(this.valuesDType, util_exports.sizeFromShape(outputShape)); const fullSize = multiplier[0] * outputSize[0]; if (fullSize > 0) { let outputIndex = this.calculateFirstParentOutputIndex(firstDimension, multiplier[0], outputSize[0]); - for (let i = 1; i <= this.raggedRank; ++i) { - const newOutputIndex = this.calculateOutputIndex(i - 1, outputIndex, multiplier[i], outputSize[i]); + for (let i2 = 1; i2 <= this.raggedRank; ++i2) { + const newOutputIndex = this.calculateOutputIndex(i2 - 1, outputIndex, multiplier[i2], outputSize[i2]); outputIndex = newOutputIndex; } this.setOutput(this.raggedRank, outputIndex, outputTensor, outputShape); @@ -42979,8 +42605,8 @@ var RaggedTensorToTensorOp = class { } }; function copyArray(dst, src, size) { - for (let i = 0; i < size; i++) { - dst[i] = src[i]; + for (let i2 = 0; i2 < size; i2++) { + dst[i2] = src[i2]; } } function makeShape(shape, isPartial) { @@ -43003,7 +42629,7 @@ function raggedTensorToTensorImpl(shape, shapesShape, values, valuesShape, value return new RaggedTensorToTensorOp(shape, shapesShape, values, valuesShape, valuesDType, defaultValue, defaultValueShape, rowPartitionValues, rowPartitionValuesShapes, rowPartitionTypes).compute(); } -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Range_impl.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Range_impl.js function rangeImpl(start, stop, step5, dtype) { const sameStartStop = start === stop; const increasingRangeNegativeStep = start < stop && step5 < 0; @@ -43017,13 +42643,13 @@ function rangeImpl(start, stop, step5, dtype) { step5 = -1; } values[0] = start; - for (let i = 1; i < values.length; i++) { - values[i] = values[i - 1] + step5; + for (let i2 = 1; i2 < values.length; i2++) { + values[i2] = values[i2 - 1] + step5; } return values; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Rsqrt.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Rsqrt.js var rsqrtImpl = createSimpleUnaryImpl((xi) => 1 / Math.sqrt(xi)); var rsqrt2 = unaryKernelFuncFromImpl(Rsqrt, rsqrtImpl); var rsqrtConfig = { @@ -43032,7 +42658,7 @@ var rsqrtConfig = { kernelFunc: rsqrt2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Scatter_impl.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Scatter_impl.js function scatterImpl(indices, updates, shape, outputSize, sliceSize, numUpdates, sliceRank, strides, defaultValue, sumDupeIndices) { const flattenShape = [outputSize / sliceSize, sliceSize]; const indicesData = indices.values; @@ -43048,11 +42674,11 @@ function scatterImpl(indices, updates, shape, outputSize, sliceSize, numUpdates, } else if (typeof defaultValue === "boolean") { outBuf.values.fill(+defaultValue); } - for (let i = 0; i < numUpdates; i++) { + for (let i2 = 0; i2 < numUpdates; i2++) { const index = []; let flattenIndex = 0; for (let j = 0; j < sliceRank; j++) { - const dim = indicesData[i * sliceRank + j]; + const dim = indicesData[i2 * sliceRank + j]; index.push(dim); flattenIndex += dim * strides[j]; } @@ -43061,16 +42687,16 @@ function scatterImpl(indices, updates, shape, outputSize, sliceSize, numUpdates, } for (let k = 0; k < sliceSize; k++) { if (sumDupeIndices) { - outBuf.values[flattenIndex * sliceSize + k] += updatesData[i * sliceSize + k]; + outBuf.values[flattenIndex * sliceSize + k] += updatesData[i2 * sliceSize + k]; } else { - outBuf.values[flattenIndex * sliceSize + k] = updates.rank === 0 ? updatesData[0] : updatesData[i * sliceSize + k]; + outBuf.values[flattenIndex * sliceSize + k] = updates.rank === 0 ? updatesData[0] : updatesData[i2 * sliceSize + k]; } } } return outBuf; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Sigmoid.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Sigmoid.js var sigmoidImpl = createSimpleUnaryImpl((xi) => 1 / (1 + Math.exp(-xi))); var sigmoid2 = unaryKernelFunc(Sigmoid, (xi) => 1 / (1 + Math.exp(-xi))); var sigmoidConfig = { @@ -43079,7 +42705,7 @@ var sigmoidConfig = { kernelFunc: sigmoid2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Slice.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Slice.js function sliceImpl(vals, begin, size, shape, dtype) { const isContinous = slice_util_exports.isSliceContinous(shape, begin, size); const length = util_exports.sizeFromShape(size); @@ -43094,8 +42720,8 @@ function sliceImpl(vals, begin, size, shape, dtype) { const decodedData = dtype === "string" ? backend_util_exports.fromUint8ToStringArray(vals) : vals; const inBuf = buffer(shape, dtype, decodedData); const outBuf = buffer(size, dtype); - for (let i = 0; i < outBuf.size; ++i) { - const outLoc = outBuf.indexToLoc(i); + for (let i2 = 0; i2 < outBuf.size; ++i2) { + const outLoc = outBuf.indexToLoc(i2); const inLoc = outLoc.map((idx, j) => idx + begin[j]); outBuf.set(inBuf.get(...inLoc), ...outLoc); } @@ -43121,7 +42747,7 @@ var sliceConfig = { kernelFunc: slice2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SparseFillEmptyRows_impl.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SparseFillEmptyRows_impl.js function sparseFillEmptyRowsImpl(indices, indicesShape, indicesDType, values, valuesDType, denseShape, defaultValue) { const indicesCount = indicesShape[0]; const denseRows = denseShape[0]; @@ -43145,13 +42771,13 @@ function sparseFillEmptyRowsImpl(indices, indicesShape, indicesDType, values, va let rowsAreOrdered = true; let lastIndicesRow = 0; const csrOffset = new Array(denseRows).fill(0); - for (let i = 0; i < indicesCount; ++i) { - const row = indices[i * rank]; + for (let i2 = 0; i2 < indicesCount; ++i2) { + const row = indices[i2 * rank]; if (row < 0) { - throw new Error(backend_util_exports.getSparseFillEmptyRowsNegativeIndexErrorMessage(i, row)); + throw new Error(backend_util_exports.getSparseFillEmptyRowsNegativeIndexErrorMessage(i2, row)); } if (row >= denseRows) { - throw new Error(backend_util_exports.getSparseFillEmptyRowsOutOfRangeIndexErrorMessage(i, row, denseRows)); + throw new Error(backend_util_exports.getSparseFillEmptyRowsOutOfRangeIndexErrorMessage(i2, row, denseRows)); } ++csrOffset[row]; rowsAreOrdered = rowsAreOrdered && row >= lastIndicesRow; @@ -43170,8 +42796,8 @@ function sparseFillEmptyRowsImpl(indices, indicesShape, indicesDType, values, va if (allRowsFull && rowsAreOrdered) { const outputIndices = indices; const outputValues = values; - for (let i = 0; i < indicesCount; ++i) { - reverseIndexMap[i] = i; + for (let i2 = 0; i2 < indicesCount; ++i2) { + reverseIndexMap[i2] = i2; } return [ outputIndices, @@ -43185,16 +42811,16 @@ function sparseFillEmptyRowsImpl(indices, indicesShape, indicesDType, values, va const outputIndices = util_exports.getArrayFromDType(indicesDType, fullIndicesCount * rank); const outputValues = util_exports.getArrayFromDType(valuesDType, fullIndicesCount); const filledCount = new Array(denseRows).fill(0); - for (let i = 0; i < indicesCount; ++i) { - const row = indices[i * rank]; + for (let i2 = 0; i2 < indicesCount; ++i2) { + const row = indices[i2 * rank]; const offset = filledCount[row]; const outputI = (row === 0 ? 0 : csrOffset[row - 1]) + offset; filledCount[row]++; for (let j = 0; j < rank; ++j) { - outputIndices[outputI * rank + j] = indices[i * rank + j]; + outputIndices[outputI * rank + j] = indices[i2 * rank + j]; } - outputValues[outputI] = values[i]; - reverseIndexMap[i] = outputI; + outputValues[outputI] = values[i2]; + reverseIndexMap[i2] = outputI; } for (let row = 0; row < denseRows; ++row) { const rowCount = filledCount[row]; @@ -43217,7 +42843,7 @@ function sparseFillEmptyRowsImpl(indices, indicesShape, indicesDType, values, va } } -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SparseReshape_impl.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SparseReshape_impl.js function sparseReshapeImpl(inputIndices, inputIndicesShape, inputDType, inputShape, targetShape) { const denseSize = util_exports.sizeFromShape(inputShape); const nnz = inputIndicesShape[0]; @@ -43271,20 +42897,20 @@ function sparseReshapeImpl(inputIndices, inputIndicesShape, inputDType, inputSha } } const newIndices = util_exports.getArrayFromDType(inputDType, nnz * outputRank); - for (let i = 0; i < nnz; ++i) { + for (let i2 = 0; i2 < nnz; ++i2) { let id = 0; for (let j = 0; j < inputRank; ++j) { - id += inputIndices[i * inputRank + j] * inputStrides[j]; + id += inputIndices[i2 * inputRank + j] * inputStrides[j]; } for (let j = 0; j < outputRank; ++j) { - newIndices[i * outputRank + j] = Math.trunc(id / outputStrides[j]); + newIndices[i2 * outputRank + j] = Math.trunc(id / outputStrides[j]); id %= outputStrides[j]; } } return [newIndices, [nnz, outputRank], outputShape]; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SparseSegmentReduction_impl.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SparseSegmentReduction_impl.js function sparseSegmentReductionImpl(input2, inputShape, inputDType, indices, segmentIds, isMean = false, defaultValue = 0) { const numIndices = indices.length; const inputFlat = [inputShape[0], input2.length / inputShape[0]]; @@ -43328,10 +42954,10 @@ function sparseSegmentReductionImpl(input2, inputShape, inputDType, indices, seg if (outIndex > uninitializedIndex) { output.fill(defaultValue, uninitializedIndex * numCol, outIndex * numCol); } - for (let i = start; i < end; ++i) { - const index = indices[i]; + for (let i2 = start; i2 < end; ++i2) { + const index = indices[i2]; if (index < 0 || index >= inputFlat[0]) { - throw new Error(backend_util_exports.getSparseSegmentReductionIndicesOutOfRangeErrorMessage(i, indices[i], inputFlat[0])); + throw new Error(backend_util_exports.getSparseSegmentReductionIndicesOutOfRangeErrorMessage(i2, indices[i2], inputFlat[0])); } for (let j = 0; j < numCol; j++) { output[outIndex * numCol + j] += input2[index * numCol + j]; @@ -43356,7 +42982,7 @@ function sparseSegmentReductionImpl(input2, inputShape, inputDType, indices, seg return [output, outputShape]; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Sqrt.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Sqrt.js var sqrtImpl = createSimpleUnaryImpl((xi) => Math.sqrt(xi)); var sqrt2 = unaryKernelFunc(Sqrt, (xi) => Math.sqrt(xi)); var sqrtConfig = { @@ -43365,7 +42991,7 @@ var sqrtConfig = { kernelFunc: sqrt2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SquaredDifference.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SquaredDifference.js var squaredDifferenceImpl = createSimpleBinaryKernelImpl((a, b) => { const diff = a - b; return diff * diff; @@ -43377,11 +43003,11 @@ var squaredDifferenceConfig = { kernelFunc: squaredDifference2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/StridedSlice_impl.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/StridedSlice_impl.js function stridedSliceImpl(outShape, xBuf, strides, begin) { const outBuf = buffer(outShape, xBuf.dtype); - for (let i = 0; i < outBuf.size; i++) { - const loc = outBuf.indexToLoc(i); + for (let i2 = 0; i2 < outBuf.size; i2++) { + const loc = outBuf.indexToLoc(i2); const newLoc = new Array(loc.length); for (let j = 0; j < newLoc.length; j++) { newLoc[j] = loc[j] * strides[j] + begin[j]; @@ -43391,7 +43017,7 @@ function stridedSliceImpl(outShape, xBuf, strides, begin) { return outBuf; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/StringNGrams_impl.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/StringNGrams_impl.js var StringNGramsOp = class { constructor(separator, nGramWidths, leftPad, rightPad2, padWidth, preserveShortSequences) { this.separator = util_exports.encodeString(separator); @@ -43417,8 +43043,8 @@ var StringNGramsOp = class { const dataStartIndex = splitIndex + (leftPadding > 0 ? 0 : nGramIndex - padWidth); let nGramSize = 0; nGramSize += leftPadding * this.leftPad.length; - for (let n = 0; n < numTokens; ++n) { - nGramSize += data[dataStartIndex + n].length; + for (let n2 = 0; n2 < numTokens; ++n2) { + nGramSize += data[dataStartIndex + n2].length; } nGramSize += rightPadding * this.rightPad.length; const numSeparators = leftPadding + rightPadding + numTokens - 1; @@ -43427,22 +43053,22 @@ var StringNGramsOp = class { const nGram = output[outputStartIndex + nGramIndex]; let nextNGramIndex = 0; const appendToNGram = (str) => str.forEach((value) => nGram[nextNGramIndex++] = value); - for (let n = 0; n < leftPadding; ++n) { + for (let n2 = 0; n2 < leftPadding; ++n2) { appendToNGram(this.leftPad); appendToNGram(this.separator); } - for (let n = 0; n < numTokens - 1; ++n) { - appendToNGram(data[dataStartIndex + n]); + for (let n2 = 0; n2 < numTokens - 1; ++n2) { + appendToNGram(data[dataStartIndex + n2]); appendToNGram(this.separator); } if (numTokens > 0) { appendToNGram(data[dataStartIndex + numTokens - 1]); - for (let n = 0; n < rightPadding; ++n) { + for (let n2 = 0; n2 < rightPadding; ++n2) { appendToNGram(this.separator); appendToNGram(this.rightPad); } } else { - for (let n = 0; n < rightPadding - 1; ++n) { + for (let n2 = 0; n2 < rightPadding - 1; ++n2) { appendToNGram(this.rightPad); appendToNGram(this.separator); } @@ -43458,13 +43084,13 @@ var StringNGramsOp = class { if (prevSplit !== 0) { throw new Error(`First split value must be 0, got ${prevSplit}`); } - for (let i = 1; i < splitsSize; ++i) { - let validSplits = splits[i] >= prevSplit; - validSplits = validSplits && splits[i] <= inputDataSize; + for (let i2 = 1; i2 < splitsSize; ++i2) { + let validSplits = splits[i2] >= prevSplit; + validSplits = validSplits && splits[i2] <= inputDataSize; if (!validSplits) { - throw new Error(`Invalid split value ${splits[i]}, must be in [${prevSplit}, ${inputDataSize}]`); + throw new Error(`Invalid split value ${splits[i2]}, must be in [${prevSplit}, ${inputDataSize}]`); } - prevSplit = splits[i]; + prevSplit = splits[i2]; } if (prevSplit !== inputDataSize) { throw new Error(`Last split value must be data size. Expected ${inputDataSize}, got ${prevSplit}`); @@ -43474,14 +43100,14 @@ var StringNGramsOp = class { const nGramsSplits = util_exports.getArrayFromDType("int32", splitsSize); if (inputDataSize === 0 || splitsSize === 0) { const empty = new Array(inputDataSize); - for (let i = 0; i <= numBatchItems; ++i) { - nGramsSplits[i] = 0; + for (let i2 = 0; i2 <= numBatchItems; ++i2) { + nGramsSplits[i2] = 0; } return [empty, nGramsSplits]; } nGramsSplits[0] = 0; - for (let i = 1; i <= numBatchItems; ++i) { - const length = splits[i] - splits[i - 1]; + for (let i2 = 1; i2 <= numBatchItems; ++i2) { + const length = splits[i2] - splits[i2 - 1]; let numNGrams = 0; this.nGramWidths.forEach((nGramWidth) => { numNGrams += this.getNumNGrams(length, nGramWidth); @@ -43489,20 +43115,20 @@ var StringNGramsOp = class { if (this.preserveShort && length > 0 && numNGrams === 0) { numNGrams = 1; } - nGramsSplits[i] = nGramsSplits[i - 1] + numNGrams; + nGramsSplits[i2] = nGramsSplits[i2 - 1] + numNGrams; } const nGrams = new Array(nGramsSplits[numBatchItems]); - for (let i = 0; i < numBatchItems; ++i) { - const splitIndex = splits[i]; - let outputStartIdx = nGramsSplits[i]; + for (let i2 = 0; i2 < numBatchItems; ++i2) { + const splitIndex = splits[i2]; + let outputStartIdx = nGramsSplits[i2]; this.nGramWidths.forEach((nGramWidth) => { - const length = splits[i + 1] - splits[i]; + const length = splits[i2 + 1] - splits[i2]; const numNGrams = this.getNumNGrams(length, nGramWidth); this.createNGrams(data, splitIndex, nGrams, outputStartIdx, numNGrams, nGramWidth); outputStartIdx += numNGrams; }); - if (this.preserveShort && outputStartIdx === nGramsSplits[i]) { - const dataLength = splits[i + 1] - splits[i]; + if (this.preserveShort && outputStartIdx === nGramsSplits[i2]) { + const dataLength = splits[i2 + 1] - splits[i2]; if (dataLength === 0) { continue; } @@ -43518,14 +43144,14 @@ function stringNGramsImpl(data, dataSplits, separator, nGramWidths, leftPad, rig return new StringNGramsOp(separator, nGramWidths, leftPad, rightPad2, padWidth, preserveShortSequences).compute(data, dataSplits); } -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/StringSplit_impl.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/StringSplit_impl.js function split3(str, delimiters, skipEmpty, result) { if (!str.length) { return; } if (delimiters.length === 0) { - for (let i = 0; i < str.length; ++i) { - result.push(str.subarray(i, i + 1)); + for (let i2 = 0; i2 < str.length; ++i2) { + result.push(str.subarray(i2, i2 + 1)); } return; } @@ -43546,13 +43172,13 @@ function split3(str, delimiters, skipEmpty, result) { return; } let tokenStart = 0; - for (let i = 0; i < str.length + 1; i++) { - if (i === str.length || delimiters.indexOf(str[i]) !== -1) { - const token = str.subarray(tokenStart, i); + for (let i2 = 0; i2 < str.length + 1; i2++) { + if (i2 === str.length || delimiters.indexOf(str[i2]) !== -1) { + const token = str.subarray(tokenStart, i2); if (!skipEmpty || token.length !== 0) { result.push(token); } - tokenStart = i + 1; + tokenStart = i2 + 1; } } } @@ -43562,11 +43188,11 @@ function stringSplitImpl(input2, delimiter, skipEmpty) { let outputSize = 0; let maxNumEntries = 0; const numIndices = new Array(batchSize); - for (let i = 0; i < batchSize; ++i) { + for (let i2 = 0; i2 < batchSize; ++i2) { const prevTokensLength = tokens.length; - split3(input2[i], delimiter, skipEmpty, tokens); + split3(input2[i2], delimiter, skipEmpty, tokens); const nEntries = tokens.length - prevTokensLength; - numIndices[i] = nEntries; + numIndices[i2] = nEntries; outputSize += nEntries; maxNumEntries = Math.max(maxNumEntries, nEntries); } @@ -43574,9 +43200,9 @@ function stringSplitImpl(input2, delimiter, skipEmpty) { const values = new Array(outputSize); const shape = [batchSize, maxNumEntries]; let c = 0; - for (let i = 0; i < batchSize; ++i) { - for (let j = 0; j < numIndices[i]; ++j) { - indices[c * 2] = i; + for (let i2 = 0; i2 < batchSize; ++i2) { + for (let j = 0; j < numIndices[i2]; ++j) { + indices[c * 2] = i2; indices[c * 2 + 1] = j; values[c] = tokens[c]; ++c; @@ -43585,16 +43211,16 @@ function stringSplitImpl(input2, delimiter, skipEmpty) { return [indices, values, shape]; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/StringToHashBucketFast_impl.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/StringToHashBucketFast_impl.js function stringToHashBucketFastImpl(input2, numBuckets) { const output = util_exports.getArrayFromDType("int32", input2.length); - for (let i = 0; i < input2.length; ++i) { - output[i] = util_exports.fingerPrint64(input2[i]).modulo(numBuckets).getLowBitsUnsigned(); + for (let i2 = 0; i2 < input2.length; ++i2) { + output[i2] = util_exports.fingerPrint64(input2[i2]).modulo(numBuckets).getLowBitsUnsigned(); } return output; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Sub.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Sub.js var subImpl = createSimpleBinaryKernelImpl((aValue, bValue) => aValue - bValue); var subComplexImpl = createComplexBinaryKernelImpl((aReal, aImag, bReal, bImag) => { return { real: aReal - bReal, imag: aImag - bImag }; @@ -43606,26 +43232,26 @@ var subConfig = { kernelFunc: sub2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Tile_impl.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Tile_impl.js function tileImpl(xBuf, reps) { const newShape = new Array(xBuf.rank); - for (let i = 0; i < newShape.length; i++) { - newShape[i] = xBuf.shape[i] * reps[i]; + for (let i2 = 0; i2 < newShape.length; i2++) { + newShape[i2] = xBuf.shape[i2] * reps[i2]; } const result = buffer(newShape, xBuf.dtype); - for (let i = 0; i < result.values.length; ++i) { - const newLoc = result.indexToLoc(i); + for (let i2 = 0; i2 < result.values.length; ++i2) { + const newLoc = result.indexToLoc(i2); const originalLoc = new Array(xBuf.rank); for (let j = 0; j < originalLoc.length; j++) { originalLoc[j] = newLoc[j] % xBuf.shape[j]; } const originalIndex = xBuf.locToIndex(originalLoc); - result.values[i] = xBuf.values[originalIndex]; + result.values[i2] = xBuf.values[originalIndex]; } return result; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/TopK_impl.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/TopK_impl.js var comparePair = (a, b) => { const valueDiff = b.value - a.value; return valueDiff === 0 ? a.index - b.index : valueDiff; @@ -43633,34 +43259,34 @@ var comparePair = (a, b) => { function select(array2, k, left = 0, right = array2.length - 1) { while (right > left) { if (right - left > 600) { - const n = right - left + 1; - const i2 = k - left + 1; - const z = Math.log(n); - const s = 0.5 * Math.exp(2 * z / 3); - const sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * Math.sign(i2 - n / 2); - const newLeft = Math.max(left, Math.floor(k - i2 * s / n + sd)); - const newRight = Math.min(right, Math.floor(k + (n - i2) * s / n + sd)); + const n2 = right - left + 1; + const i3 = k - left + 1; + const z = Math.log(n2); + const s2 = 0.5 * Math.exp(2 * z / 3); + const sd = 0.5 * Math.sqrt(z * s2 * (n2 - s2) / n2) * Math.sign(i3 - n2 / 2); + const newLeft = Math.max(left, Math.floor(k - i3 * s2 / n2 + sd)); + const newRight = Math.min(right, Math.floor(k + (n2 - i3) * s2 / n2 + sd)); select(array2, k, newLeft, newRight); } - const t = array2[k]; - let i = left; + const t2 = array2[k]; + let i2 = left; let j = right; util_exports.swap(array2, left, k); - if (comparePair(array2[right], t) > 0) { + if (comparePair(array2[right], t2) > 0) { util_exports.swap(array2, left, right); } - while (i < j) { - util_exports.swap(array2, i, j); - i++; + while (i2 < j) { + util_exports.swap(array2, i2, j); + i2++; j--; - while (comparePair(array2[i], t) < 0) { - i = i + 1; + while (comparePair(array2[i2], t2) < 0) { + i2 = i2 + 1; } - while (comparePair(array2[j], t) > 0) { + while (comparePair(array2[j], t2) > 0) { j = j - 1; } } - if (comparePair(array2[left], t) === 0) { + if (comparePair(array2[left], t2) === 0) { util_exports.swap(array2, left, j); } else { j = j + 1; @@ -43694,9 +43320,9 @@ function topKImpl(x, xShape, xDtype, k, sorted) { const outOffset = b * k; const topKVals = allTopKVals.subarray(outOffset, outOffset + k); const topKIndices = allTopKIndices.subarray(outOffset, outOffset + k); - for (let i = 0; i < k; i++) { - topKVals[i] = valAndInd[i].value; - topKIndices[i] = valAndInd[i].index; + for (let i2 = 0; i2 < k; i2++) { + topKVals[i2] = valAndInd[i2].value; + topKIndices[i2] = valAndInd[i2].index; } } const outputShape = xShape.slice(); @@ -43707,51 +43333,51 @@ function topKImpl(x, xShape, xDtype, k, sorted) { ]; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Unique_impl.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Unique_impl.js function uniqueImpl(values, axis, shape, dtype) { const $axis = util_exports.parseAxisParam(axis, shape)[0]; const newShape = [1, shape[0], 1]; - for (let i = 0; i < $axis; i++) { - newShape[0] *= shape[i]; + for (let i2 = 0; i2 < $axis; i2++) { + newShape[0] *= shape[i2]; } newShape[1] = shape[$axis]; - for (let i = $axis + 1; i < shape.length; i++) { - newShape[2] *= shape[i]; + for (let i2 = $axis + 1; i2 < shape.length; i2++) { + newShape[2] *= shape[i2]; } const uniqueElements = {}; const indices = new Int32Array(shape[$axis]); const inputBuffer = new TensorBuffer(newShape, dtype, values); const uniqueIndices = []; const is1DTensor = newShape[0] === 1 && newShape[2] === 1; - for (let i = 0; i < shape[$axis]; i++) { + for (let i2 = 0; i2 < shape[$axis]; i2++) { let element; if (is1DTensor) { - element = values[i].toString(); + element = values[i2].toString(); } else { const axisValues = []; for (let m = 0; m < newShape[0]; m++) { - for (let n = 0; n < newShape[2]; n++) { - axisValues.push(inputBuffer.get(m, i, n)); + for (let n2 = 0; n2 < newShape[2]; n2++) { + axisValues.push(inputBuffer.get(m, i2, n2)); } } element = axisValues.join(","); } if (uniqueElements[element] !== void 0) { - indices[i] = uniqueElements[element]; + indices[i2] = uniqueElements[element]; } else { const uniqueIndex = Object.keys(uniqueElements).length; uniqueElements[element] = uniqueIndex; - indices[i] = uniqueIndex; - uniqueIndices.push(i); + indices[i2] = uniqueIndex; + uniqueIndices.push(i2); } } const outputTmpShape = newShape.slice(); outputTmpShape[1] = Object.keys(uniqueElements).length; const outputBuffer = new TensorBuffer(outputTmpShape, dtype); - uniqueIndices.forEach((uniqueElementIndex, i) => { + uniqueIndices.forEach((uniqueElementIndex, i2) => { for (let m = 0; m < newShape[0]; m++) { - for (let n = 0; n < newShape[2]; n++) { - outputBuffer.set(inputBuffer.get(m, uniqueElementIndex, n), m, i, n); + for (let n2 = 0; n2 < newShape[2]; n2++) { + outputBuffer.set(inputBuffer.get(m, uniqueElementIndex, n2), m, i2, n2); } } }); @@ -43764,10 +43390,10 @@ function uniqueImpl(values, axis, shape, dtype) { }; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/base.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/base.js registerBackend("cpu", () => new MathBackendCPU(), 1); -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Elu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Elu.js var elu4 = unaryKernelFunc(Elu, (xi) => xi >= 0 ? xi : Math.exp(xi) - 1); var eluConfig = { kernelName: Elu, @@ -43775,7 +43401,7 @@ var eluConfig = { kernelFunc: elu4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/LeakyRelu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/LeakyRelu.js function leakyRelu2(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -43784,8 +43410,8 @@ function leakyRelu2(args) { const xSize = util_exports.sizeFromShape(x.shape); const xVals = backend2.data.get(x.dataId).values; const outVals = util_exports.getTypedArrayFromDType("float32", xSize); - for (let i = 0; i < xVals.length; i++) { - outVals[i] = xVals[i] < 0 ? alpha * xVals[i] : xVals[i]; + for (let i2 = 0; i2 < xVals.length; i2++) { + outVals[i2] = xVals[i2] < 0 ? alpha * xVals[i2] : xVals[i2]; } return backend2.makeTensorInfo(x.shape, "float32", outVals); } @@ -43795,7 +43421,7 @@ var leakyReluConfig = { kernelFunc: leakyRelu2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Prelu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Prelu.js var preluImpl = createSimpleBinaryKernelImpl((xValue, aValue) => xValue < 0 ? aValue * xValue : xValue); function prelu3(args) { const { inputs, backend: backend2 } = args; @@ -43812,7 +43438,7 @@ var preluConfig = { kernelFunc: prelu3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Relu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Relu.js var relu2 = unaryKernelFunc(Relu, (xi) => Math.max(0, xi)); var reluConfig = { kernelName: Relu, @@ -43820,7 +43446,7 @@ var reluConfig = { kernelFunc: relu2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Relu6.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Relu6.js var relu62 = unaryKernelFunc(Relu6, (xi) => Math.min(Math.max(0, xi), 6)); var relu6Config = { kernelName: Relu6, @@ -43828,7 +43454,7 @@ var relu6Config = { kernelFunc: relu62 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/utils/fused_utils.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/utils/fused_utils.js function applyActivation2(backend2, x, activation2, preluActivationWeights, leakyreluAlpha) { if (activation2 === "linear") { return identity2({ inputs: { x }, backend: backend2 }); @@ -43848,7 +43474,7 @@ function applyActivation2(backend2, x, activation2, preluActivationWeights, leak throw new Error(`Activation ${activation2} has not been implemented for the CPU backend.`); } -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Reshape.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Reshape.js function reshape3(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -43873,7 +43499,7 @@ var reshapeConfig = { kernelFunc: reshape3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/BatchMatMul.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/BatchMatMul.js function batchMatMul(args) { const { inputs, backend: backend2, attrs } = args; const { a, b } = inputs; @@ -43917,17 +43543,17 @@ function batchMatMul(args) { const iBlock = Math.min(i0 + blockSize, leftDim); const jBlock = Math.min(j0 + blockSize, rightDim); const kBlock = Math.min(k02 + blockSize, sharedDim); - for (let i = i0; i < iBlock; i++) { + for (let i2 = i0; i2 < iBlock; i2++) { for (let j = j0; j < jBlock; j++) { let sum7 = 0; for (let k = k02; k < kBlock; k++) { const batchOffsetA = Math.min(bi, batchDimA - 1) * aBatch; const batchOffsetB = Math.min(bi, batchDimB - 1) * bBatch; - const aVal = a3dValues[batchOffsetA + i * aOuterStep + k * aInnerStep]; + const aVal = a3dValues[batchOffsetA + i2 * aOuterStep + k * aInnerStep]; const bVal = b3dValues[k * bInnerStep + j * bOuterStep + batchOffsetB]; sum7 += aVal * bVal; } - resVals[bi * size + (i * rightDim + j)] += sum7; + resVals[bi * size + (i2 * rightDim + j)] += sum7; } } } @@ -43944,7 +43570,7 @@ var batchMatMulConfig = { kernelFunc: batchMatMul }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/_FusedMatMul.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/_FusedMatMul.js function _fusedMatMul(args) { const { inputs, backend: backend2, attrs } = args; const { a, b, bias, preluActivationWeights } = inputs; @@ -43965,8 +43591,8 @@ function _fusedMatMul(args) { intermediates.push(current); current = activationRes; } - for (const i of intermediates) { - backend2.disposeIntermediateTensorInfo(i); + for (const i2 of intermediates) { + backend2.disposeIntermediateTensorInfo(i2); } return current; } @@ -43976,7 +43602,7 @@ var _fusedMatMulConfig = { kernelFunc: _fusedMatMul }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Acos.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Acos.js var acos2 = unaryKernelFunc(Acos, (xi) => Math.acos(xi)); var acosConfig = { kernelName: Acos, @@ -43984,7 +43610,7 @@ var acosConfig = { kernelFunc: acos2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Acosh.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Acosh.js var acosh2 = unaryKernelFunc(Acosh, (xi) => Math.acosh(xi)); var acoshConfig = { kernelName: Acosh, @@ -43992,16 +43618,16 @@ var acoshConfig = { kernelFunc: acosh2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/AddN.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/AddN.js function addN2(args) { const { inputs, backend: backend2 } = args; const tensors = inputs; assertNotComplex(inputs, "addN"); - const vals = tensors.map((t) => backend2.data.get(t.dataId).values); + const vals = tensors.map((t2) => backend2.data.get(t2.dataId).values); const outBuf = buffer(tensors[0].shape, tensors[0].dtype); const outVals = outBuf.values; - for (let i = 0; i < tensors.length; i++) { - const currVals = vals[i]; + for (let i2 = 0; i2 < tensors.length; i2++) { + const currVals = vals[i2]; for (let j = 0; j < outVals.length; j++) { outVals[j] += currVals[j]; } @@ -44014,7 +43640,7 @@ var addNConfig = { kernelFunc: addN2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/All.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/All.js function all2(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -44033,14 +43659,14 @@ function all2(args) { const reduceSize = util_exports.sizeFromShape(reduceShape); const vals = util_exports.makeZerosTypedArray(util_exports.sizeFromShape(outShape), $x.dtype); const aVals = backend2.data.get($x.dataId).values; - for (let i = 0; i < vals.length; ++i) { - const offset = i * reduceSize; + for (let i2 = 0; i2 < vals.length; ++i2) { + const offset = i2 * reduceSize; let all5 = aVals[offset]; for (let j = 0; j < reduceSize; ++j) { const value = aVals[offset + j]; all5 = all5 && value; } - vals[i] = all5; + vals[i2] = all5; } if (permutedAxes != null) { backend2.disposeIntermediateTensorInfo($x); @@ -44060,7 +43686,7 @@ var allConfig = { kernelFunc: all2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Any.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Any.js function any2(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -44079,14 +43705,14 @@ function any2(args) { const reduceSize = util_exports.sizeFromShape(reduceShape); const vals = util_exports.makeZerosTypedArray(util_exports.sizeFromShape(outShape), $x.dtype); const aVals = backend2.data.get($x.dataId).values; - for (let i = 0; i < vals.length; ++i) { - const offset = i * reduceSize; + for (let i2 = 0; i2 < vals.length; ++i2) { + const offset = i2 * reduceSize; let anyVal = aVals[offset]; for (let j = 0; j < reduceSize; ++j) { const value = aVals[offset + j]; anyVal = anyVal || value; } - vals[i] = anyVal; + vals[i2] = anyVal; } if (permutedAxes != null) { backend2.disposeIntermediateTensorInfo($x); @@ -44106,7 +43732,7 @@ var anyConfig = { kernelFunc: any2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ArgMax.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ArgMax.js function argMax2(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -44128,8 +43754,8 @@ function argMax2(args) { const vals = util_exports.makeZerosTypedArray(outSize, "int32"); const reduceSize = util_exports.sizeFromShape(reduceShape); const aVals = backend2.data.get($x.dataId).values; - for (let i = 0; i < vals.length; ++i) { - const offset = i * reduceSize; + for (let i2 = 0; i2 < vals.length; ++i2) { + const offset = i2 * reduceSize; let max7 = aVals[offset]; let maxIndex = 0; for (let j = 0; j < reduceSize; ++j) { @@ -44139,9 +43765,9 @@ function argMax2(args) { maxIndex = j; } } - vals[i] = maxIndex; + vals[i2] = maxIndex; } - intermediateTensorInfos.forEach((t) => backend2.disposeIntermediateTensorInfo(t)); + intermediateTensorInfos.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2)); return backend2.makeTensorInfo(outShape, "int32", vals); } var argMaxConfig = { @@ -44150,7 +43776,7 @@ var argMaxConfig = { kernelFunc: argMax2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ArgMin.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ArgMin.js function argMin2(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -44172,8 +43798,8 @@ function argMin2(args) { const vals = util_exports.makeZerosTypedArray(outSize, "int32"); const reduceSize = util_exports.sizeFromShape(reduceShape); const aVals = backend2.data.get($x.dataId).values; - for (let i = 0; i < vals.length; ++i) { - const offset = i * reduceSize; + for (let i2 = 0; i2 < vals.length; ++i2) { + const offset = i2 * reduceSize; let min7 = aVals[offset]; let minIndex = 0; for (let j = 0; j < reduceSize; ++j) { @@ -44183,9 +43809,9 @@ function argMin2(args) { minIndex = j; } } - vals[i] = minIndex; + vals[i2] = minIndex; } - intermediateTensorInfos.forEach((t) => backend2.disposeIntermediateTensorInfo(t)); + intermediateTensorInfos.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2)); return backend2.makeTensorInfo(outShape, "int32", vals); } var argMinConfig = { @@ -44194,7 +43820,7 @@ var argMinConfig = { kernelFunc: argMin2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Asin.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Asin.js var asin2 = unaryKernelFunc(Asin, (xi) => Math.asin(xi)); var asinConfig = { kernelName: Asin, @@ -44202,7 +43828,7 @@ var asinConfig = { kernelFunc: asin2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Asinh.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Asinh.js var asinh2 = unaryKernelFunc(Asinh, (xi) => Math.asinh(xi)); var asinhConfig = { kernelName: Asinh, @@ -44210,7 +43836,7 @@ var asinhConfig = { kernelFunc: asinh2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Atan.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Atan.js var atan3 = unaryKernelFunc(Atan, (xi) => Math.atan(xi)); var atanConfig = { kernelName: Atan, @@ -44218,7 +43844,7 @@ var atanConfig = { kernelFunc: atan3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Atan2.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Atan2.js var atan2Impl = createSimpleBinaryKernelImpl((aValue, bValue) => Math.atan2(aValue, bValue)); var atan22 = binaryKernelFunc(Atan2, atan2Impl); var atan2Config = { @@ -44227,7 +43853,7 @@ var atan2Config = { kernelFunc: atan22 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Atanh.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Atanh.js var atanh2 = unaryKernelFunc(Atanh, (xi) => Math.atanh(xi)); var atanhConfig = { kernelName: Atanh, @@ -44235,7 +43861,7 @@ var atanhConfig = { kernelFunc: atanh2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/utils/pool_utils.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/utils/pool_utils.js function pool2(xValues, xShape, dtype, strides, convInfo, poolType) { const strideHeight = convInfo.strideHeight; const strideWidth = convInfo.strideWidth; @@ -44489,7 +44115,7 @@ function maxPool3dPositions(xBuf, convInfo) { return maxPositions; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/AvgPool.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/AvgPool.js function avgPool2(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -44515,7 +44141,7 @@ var avgPoolConfig = { kernelFunc: avgPool2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/AvgPool3D.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/AvgPool3D.js function avgPool3D(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -44532,7 +44158,7 @@ var avgPool3DConfig = { kernelFunc: avgPool3D }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/AvgPool3DGrad.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/AvgPool3DGrad.js function avgPool3DGrad(args) { const { inputs, backend: backend2, attrs } = args; const { dy, input: input2 } = inputs; @@ -44600,7 +44226,7 @@ var avgPool3DGradConfig2 = { kernelFunc: avgPool3DGrad }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/AvgPoolGrad.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/AvgPoolGrad.js function avgPoolGrad2(args) { const { inputs, backend: backend2, attrs } = args; const { dy, input: input2 } = inputs; @@ -44656,7 +44282,7 @@ var avgPoolGradConfig2 = { kernelFunc: avgPoolGrad2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/BatchNorm.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/BatchNorm.js function batchNorm2(args) { const { inputs, backend: backend2, attrs } = args; const { x, scale: scale2, offset, mean: mean5, variance } = inputs; @@ -44682,8 +44308,8 @@ function batchNorm2(args) { let mi = 0; let si = 0; let vi = 0; - for (let i = 0; i < xVals.length; ++i) { - outVals[i] = offVals[offi++] + (xVals[i] - mVals[mi++]) * sVals[si++] / Math.sqrt(varVals[vi++] + varianceEpsilon); + for (let i2 = 0; i2 < xVals.length; ++i2) { + outVals[i2] = offVals[offi++] + (xVals[i2] - mVals[mi++]) * sVals[si++] / Math.sqrt(varVals[vi++] + varianceEpsilon); if (offi >= offValsLength) { offi = 0; } @@ -44705,7 +44331,7 @@ var batchNormConfig = { kernelFunc: batchNorm2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/BatchToSpaceND.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/BatchToSpaceND.js function batchToSpaceND2(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -44736,7 +44362,7 @@ var batchToSpaceNDConfig = { kernelFunc: batchToSpaceND2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Bincount.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Bincount.js function bincount2(args) { const { inputs, backend: backend2, attrs } = args; const { x, weights } = inputs; @@ -44752,7 +44378,7 @@ var bincountConfig = { kernelFunc: bincount2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/BroadcastArgs.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/BroadcastArgs.js function broadcastArgs2(args) { const { inputs, backend: backend2 } = args; const { s0, s1 } = inputs; @@ -44767,7 +44393,7 @@ var broadcastArgsConfig = { kernelFunc: broadcastArgs2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ClipByValue.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ClipByValue.js var clipByValue2 = unaryKernelFunc(ClipByValue, (xi, attrs) => { const clipAttrs = attrs; if (xi > clipAttrs.clipValueMax) { @@ -44781,7 +44407,7 @@ var clipByValueConfig = { kernelFunc: clipByValue2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ComplexAbs.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ComplexAbs.js var complexAbs = (args) => { const { x } = args.inputs; const cpuBackend = args.backend; @@ -44791,10 +44417,10 @@ var complexAbs = (args) => { const imag5 = complexVals.complexTensorInfos.imag; const realVals = cpuBackend.data.get(real5.dataId).values; const imagVals = cpuBackend.data.get(imag5.dataId).values; - for (let i = 0; i < realVals.length; i++) { - const real6 = realVals[i]; - const imag6 = imagVals[i]; - resultValues[i] = Math.hypot(real6, imag6); + for (let i2 = 0; i2 < realVals.length; i2++) { + const real6 = realVals[i2]; + const imag6 = imagVals[i2]; + resultValues[i2] = Math.hypot(real6, imag6); } return cpuBackend.makeOutput(resultValues, x.shape, "float32"); }; @@ -44804,7 +44430,7 @@ var complexAbsConfig = { kernelFunc: complexAbs }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Imag.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Imag.js function imag2(args) { const { inputs, backend: backend2 } = args; const { input: input2 } = inputs; @@ -44818,47 +44444,47 @@ var imagConfig = { kernelFunc: imag2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Concat.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Concat.js function concat2(args) { const { inputs, backend: backend2, attrs } = args; const { axis } = attrs; const $axis = util_exports.parseAxisParam(axis, inputs[0].shape)[0]; - let outShape = backend_util_exports.computeOutShape(inputs.map((t) => t.shape), $axis); + const shapes = inputs.map((t2) => t2.shape); + backend_util_exports.assertParamsConsistent(shapes, $axis); + let outShape = backend_util_exports.computeOutShape(inputs.map((t2) => t2.shape), $axis); if (util_exports.sizeFromShape(outShape) === 0) { return backend2.makeTensorInfo(outShape, inputs[0].dtype, []); } - const $inputs = inputs.filter((t) => util_exports.sizeFromShape(t.shape) > 0); + const $inputs = inputs.filter((t2) => util_exports.sizeFromShape(t2.shape) > 0); if ($inputs.length === 1) { return identity2({ inputs: { x: $inputs[0] }, backend: backend2 }); } - const shapes = $inputs.map((t) => t.shape); - backend_util_exports.assertParamsConsistent(shapes, $axis); if ($inputs[0].dtype === "complex64") { - const reals = $inputs.map((t) => real2({ inputs: { input: t }, backend: backend2 })); - const imags = $inputs.map((t) => imag2({ inputs: { input: t }, backend: backend2 })); + const reals = $inputs.map((t2) => real2({ inputs: { input: t2 }, backend: backend2 })); + const imags = $inputs.map((t2) => imag2({ inputs: { input: t2 }, backend: backend2 })); const realConcated = concat2({ inputs: reals, backend: backend2, attrs: { axis: $axis } }); const imagConcated = concat2({ inputs: imags, backend: backend2, attrs: { axis: $axis } }); const result = complex2({ inputs: { real: realConcated, imag: imagConcated }, backend: backend2 }); - reals.forEach((r) => backend2.disposeIntermediateTensorInfo(r)); - imags.forEach((i) => backend2.disposeIntermediateTensorInfo(i)); + reals.forEach((r2) => backend2.disposeIntermediateTensorInfo(r2)); + imags.forEach((i2) => backend2.disposeIntermediateTensorInfo(i2)); backend2.disposeIntermediateTensorInfo(realConcated); backend2.disposeIntermediateTensorInfo(imagConcated); return result; } - const inputs2D = $inputs.map((t) => { - const innerSize = util_exports.sizeFromShape(t.shape.slice($axis)); + const inputs2D = $inputs.map((t2) => { + const innerSize = util_exports.sizeFromShape(t2.shape.slice($axis)); const shape = [-1, innerSize]; - return reshape3({ inputs: { x: t }, backend: backend2, attrs: { shape } }); + return reshape3({ inputs: { x: t2 }, backend: backend2, attrs: { shape } }); }); - const inputsValShapes = inputs2D.map((t) => { - return { vals: backend2.data.get(t.dataId).values, shape: t.shape }; + const inputsValShapes = inputs2D.map((t2) => { + return { vals: backend2.data.get(t2.dataId).values, shape: t2.shape }; }); - outShape = backend_util_exports.computeOutShape(inputs2D.map((t) => t.shape), 1); + outShape = backend_util_exports.computeOutShape(inputs2D.map((t2) => t2.shape), 1); const simplyConcat = inputs2D[0].shape[0] === 1; const outVals = concatImpl(inputsValShapes, outShape, inputs[0].dtype, simplyConcat); - const finalOutShape = backend_util_exports.computeOutShape($inputs.map((t) => t.shape), $axis); + const finalOutShape = backend_util_exports.computeOutShape($inputs.map((t2) => t2.shape), $axis); const outInfo = backend2.makeTensorInfo(finalOutShape, inputs[0].dtype, outVals); - inputs2D.forEach((t) => backend2.disposeIntermediateTensorInfo(t)); + inputs2D.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2)); return outInfo; } var concatConfig = { @@ -44867,7 +44493,7 @@ var concatConfig = { kernelFunc: concat2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Conv2D.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Conv2D.js function conv2D(args) { const { inputs, backend: backend2, attrs } = args; const { x, filter } = inputs; @@ -44940,7 +44566,7 @@ var conv2DConfig = { kernelFunc: conv2D }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Conv2DBackpropFilter.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Conv2DBackpropFilter.js function conv2DBackpropFilter2(args) { const { inputs, backend: backend2, attrs } = args; const { x, dy } = inputs; @@ -44992,7 +44618,7 @@ var conv2DBackpropFilterConfig = { kernelFunc: conv2DBackpropFilter2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Conv2DBackpropInput.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Conv2DBackpropInput.js function conv2DBackpropInput2(args) { const { inputs, backend: backend2, attrs } = args; const { dy, filter } = inputs; @@ -45058,7 +44684,7 @@ var conv2DBackpropInputConfig = { kernelFunc: conv2DBackpropInput2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Conv3D.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Conv3D.js function conv3D(args) { const { inputs, backend: backend2, attrs } = args; const { x, filter } = inputs; @@ -45131,7 +44757,7 @@ var conv3DConfig = { kernelFunc: conv3D }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Conv3DBackpropFilterV2.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Conv3DBackpropFilterV2.js function conv3DBackpropFilterV2(args) { const { inputs, backend: backend2, attrs } = args; const { x, dy } = inputs; @@ -45206,7 +44832,7 @@ var conv3DBackpropFilterV2Config = { kernelFunc: conv3DBackpropFilterV2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Conv3DBackpropInputV2.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Conv3DBackpropInputV2.js function conv3DBackpropInputV2(args) { const { inputs, backend: backend2, attrs } = args; const { dy, filter } = inputs; @@ -45271,7 +44897,7 @@ var conv3DBackpropInputV2Config = { kernelFunc: conv3DBackpropInputV2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Cos.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Cos.js var cos2 = unaryKernelFunc(Cos, (xi) => Math.cos(xi)); var cosConfig = { kernelName: Cos, @@ -45279,7 +44905,7 @@ var cosConfig = { kernelFunc: cos2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Cosh.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Cosh.js var cosh2 = unaryKernelFunc(Cosh, (xi) => Math.cosh(xi)); var coshConfig = { kernelName: Cosh, @@ -45287,7 +44913,7 @@ var coshConfig = { kernelFunc: cosh2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/CropAndResize.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/CropAndResize.js function cropAndResize2(args) { const { inputs, backend: backend2, attrs } = args; const { image: image2, boxes, boxInd } = inputs; @@ -45384,7 +45010,7 @@ var cropAndResizeConfig = { kernelFunc: cropAndResize2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Cumprod.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Cumprod.js function cumprod2(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -45403,14 +45029,14 @@ function cumprod2(args) { const vals = util_exports.makeOnesTypedArray(util_exports.sizeFromShape($x.shape), resultDtype); const aVals = backend2.data.get($x.dataId).values; const finalDim = $x.shape[$x.shape.length - 1]; - const indexAdjuster = reverse5 ? (i, j) => i + finalDim - j - 1 : (i, j) => i + j; - for (let i = 0; i < aVals.length; i += finalDim) { + const indexAdjuster = reverse5 ? (i2, j) => i2 + finalDim - j - 1 : (i2, j) => i2 + j; + for (let i2 = 0; i2 < aVals.length; i2 += finalDim) { for (let j = 0; j < finalDim; j++) { - const idx = indexAdjuster(i, j); + const idx = indexAdjuster(i2, j); if (j === 0) { vals[idx] = exclusive ? 1 : aVals[idx]; } else { - const prevIdx = indexAdjuster(i, j - 1); + const prevIdx = indexAdjuster(i2, j - 1); vals[idx] = exclusive ? aVals[prevIdx] * vals[prevIdx] : aVals[idx] * vals[prevIdx]; } } @@ -45431,7 +45057,7 @@ var cumprodConfig = { kernelFunc: cumprod2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Cumsum.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Cumsum.js function cumsum2(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -45450,14 +45076,14 @@ function cumsum2(args) { const vals = util_exports.makeZerosTypedArray(util_exports.sizeFromShape($x.shape), resultDtype); const aVals = backend2.data.get($x.dataId).values; const finalDim = $x.shape[$x.shape.length - 1]; - const indexAdjuster = reverse5 ? (i, j) => i + finalDim - j - 1 : (i, j) => i + j; - for (let i = 0; i < aVals.length; i += finalDim) { + const indexAdjuster = reverse5 ? (i2, j) => i2 + finalDim - j - 1 : (i2, j) => i2 + j; + for (let i2 = 0; i2 < aVals.length; i2 += finalDim) { for (let j = 0; j < finalDim; j++) { - const idx = indexAdjuster(i, j); + const idx = indexAdjuster(i2, j); if (j === 0) { vals[idx] = exclusive ? 0 : aVals[idx]; } else { - const prevIdx = indexAdjuster(i, j - 1); + const prevIdx = indexAdjuster(i2, j - 1); vals[idx] = exclusive ? aVals[prevIdx] + vals[prevIdx] : aVals[idx] + vals[prevIdx]; } } @@ -45478,7 +45104,7 @@ var cumsumConfig = { kernelFunc: cumsum2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/DenseBincount.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/DenseBincount.js function denseBincount2(args) { const { inputs, backend: backend2, attrs } = args; const { x, weights } = inputs; @@ -45502,7 +45128,7 @@ var denseBincountConfig = { kernelFunc: denseBincount2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/DepthToSpace.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/DepthToSpace.js function depthToSpace2(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -45542,7 +45168,7 @@ var depthToSpaceConfig = { kernelFunc: depthToSpace2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/DepthwiseConv2dNative.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/DepthwiseConv2dNative.js function depthwiseConv2dNative(args) { const { inputs, backend: backend2, attrs } = args; const { x, filter } = inputs; @@ -45610,7 +45236,7 @@ var depthwiseConv2dNativeConfig = { kernelFunc: depthwiseConv2dNative }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/DepthwiseConv2dNativeBackpropFilter.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/DepthwiseConv2dNativeBackpropFilter.js function depthwiseConv2dNativeBackpropFilter2(args) { const { inputs, backend: backend2, attrs } = args; const { x, dy } = inputs; @@ -45657,7 +45283,7 @@ var depthwiseConv2dNativeBackpropFilterConfig = { kernelFunc: depthwiseConv2dNativeBackpropFilter2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/DepthwiseConv2dNativeBackpropInput.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/DepthwiseConv2dNativeBackpropInput.js function depthwiseConv2dNativeBackpropInput2(args) { const { inputs, backend: backend2, attrs } = args; const { dy, filter } = inputs; @@ -45715,7 +45341,7 @@ var depthwiseConv2dNativeBackpropInputConfig = { kernelFunc: depthwiseConv2dNativeBackpropInput2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Diag.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Diag.js function diag2(args) { const { inputs, backend: backend2 } = args; const { x } = inputs; @@ -45723,8 +45349,8 @@ function diag2(args) { const xVals = backend2.data.get(x.dataId).values; const outBuf = buffer([xSize, xSize], x.dtype); const vals = outBuf.values; - for (let i = 0; i < xVals.length; i++) { - vals[i * xSize + i] = xVals[i]; + for (let i2 = 0; i2 < xVals.length; i2++) { + vals[i2 * xSize + i2] = xVals[i2]; } const outShape = [...x.shape, ...x.shape]; return backend2.makeTensorInfo(outShape, outBuf.dtype, outBuf.values); @@ -45735,7 +45361,7 @@ var diagConfig = { kernelFunc: diag2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Dilation2D.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Dilation2D.js var dilation2DConfig = { kernelName: Dilation2D, backendName: "cpu", @@ -45785,7 +45411,7 @@ var dilation2DConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Dilation2DBackpropFilter.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Dilation2DBackpropFilter.js var dilation2DBackpropFilterConfig = { kernelName: Dilation2DBackpropFilter, backendName: "cpu", @@ -45834,7 +45460,7 @@ var dilation2DBackpropFilterConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Dilation2DBackpropInput.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Dilation2DBackpropInput.js var dilation2DBackpropInputConfig = { kernelName: Dilation2DBackpropInput, backendName: "cpu", @@ -45883,7 +45509,7 @@ var dilation2DBackpropInputConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Sum.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Sum.js function sum3(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -45911,13 +45537,13 @@ function sum3(args) { const reduceSize = util_exports.sizeFromShape(reduceShape); const vals = backend2.data.get(result.dataId).values; const aVals = backend2.data.get(permutedX.dataId).values; - for (let i = 0; i < vals.length; ++i) { - const offset = i * reduceSize; + for (let i2 = 0; i2 < vals.length; ++i2) { + const offset = i2 * reduceSize; let sum7 = 0; for (let j = 0; j < reduceSize; ++j) { sum7 += aVals[offset + j]; } - vals[i] = sum7; + vals[i2] = sum7; } if (keepDims) { const newShape = backend_util_exports.expandShapeToKeepDim(result.shape, axes); @@ -45937,7 +45563,7 @@ var sumConfig = { kernelFunc: sum3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Einsum.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Einsum.js function einsum2(args) { const { inputs, backend: backend2, attrs } = args; const { equation } = attrs; @@ -45949,8 +45575,8 @@ function einsum2(args) { let out = null; let numDimsRemaining = allDims.length; const tensorsToDispose = []; - for (let i = 0; i < nSteps; ++i) { - for (const idTerm of steps[i]) { + for (let i2 = 0; i2 < nSteps; ++i2) { + for (const idTerm of steps[i2]) { const { permutationIndices: perm, expandDims: dimsToExpand } = backend_util_exports.getEinsumPermutation(numDimsRemaining, idDims[idTerm]); let x; if (backend_util_exports.isIdentityPermutation(perm)) { @@ -45974,13 +45600,13 @@ function einsum2(args) { tensorsToDispose.push(out); } } - if (i < nSteps - 1) { - if (path[i] >= 0) { + if (i2 < nSteps - 1) { + if (path[i2] >= 0) { out = sum3({ inputs: { x: out }, backend: backend2, attrs: { - axis: path[i] - (allDims.length - numDimsRemaining), + axis: path[i2] - (allDims.length - numDimsRemaining), keepDims: false } }); @@ -46003,7 +45629,7 @@ var einsumConfig = { kernelFunc: einsum2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/EluGrad.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/EluGrad.js function eluGrad(args) { const { inputs, backend: backend2 } = args; const { dy, y } = inputs; @@ -46011,12 +45637,12 @@ function eluGrad(args) { const resultValues = new Float32Array(util_exports.sizeFromShape(y.shape)); const values = backend2.data.get(y.dataId).values; const dyValues = backend2.data.get(dy.dataId).values; - for (let i = 0; i < values.length; ++i) { - const v = values[i]; + for (let i2 = 0; i2 < values.length; ++i2) { + const v = values[i2]; if (v >= 1) { - resultValues[i] = dyValues[i]; + resultValues[i2] = dyValues[i2]; } else { - resultValues[i] = dyValues[i] * (v + 1); + resultValues[i2] = dyValues[i2] * (v + 1); } } return backend2.makeTensorInfo(y.shape, "float32", resultValues); @@ -46027,7 +45653,7 @@ var eluGradConfig2 = { kernelFunc: eluGrad }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Erf.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Erf.js var p = backend_util_exports.ERF_P; var a1 = backend_util_exports.ERF_A1; var a2 = backend_util_exports.ERF_A2; @@ -46037,8 +45663,8 @@ var a5 = backend_util_exports.ERF_A5; var erf2 = unaryKernelFunc(Erf, (xi) => { const sign4 = Math.sign(xi); const v = Math.abs(xi); - const t = 1 / (1 + p * v); - return sign4 * (1 - ((((a5 * t + a4) * t + a3) * t + a2) * t + a1) * t * Math.exp(-v * v)); + const t2 = 1 / (1 + p * v); + return sign4 * (1 - ((((a5 * t2 + a4) * t2 + a3) * t2 + a2) * t2 + a1) * t2 * Math.exp(-v * v)); }); var erfConfig = { kernelName: Erf, @@ -46046,7 +45672,7 @@ var erfConfig = { kernelFunc: erf2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ExpandDims.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ExpandDims.js function expandDims3(args) { const { inputs, backend: backend2, attrs } = args; const { input: input2 } = inputs; @@ -46067,7 +45693,7 @@ var expandDimsConfig = { kernelFunc: expandDims3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/RealDiv.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/RealDiv.js var realDivImpl = createSimpleBinaryKernelImpl((a, b) => a / b); var div2 = binaryKernelFunc(RealDiv, realDivImpl); var realDivConfig = { @@ -46076,7 +45702,7 @@ var realDivConfig = { kernelFunc: div2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/utils/fft_utils.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/utils/fft_utils.js function fftBatch(input2, inverse, cpuBackend) { const inputShape = input2.shape; const batch = inputShape[0]; @@ -46089,17 +45715,17 @@ function fftBatch(input2, inverse, cpuBackend) { const resultReal = util_exports.getTypedArrayFromDType("float32", resultSize); const resultImag = util_exports.getTypedArrayFromDType("float32", resultSize); for (let b = 0; b < batch; b++) { - const r = slice2({ + const r2 = slice2({ inputs: { x: real2D }, backend: cpuBackend, attrs: { begin: [b, 0], size: [1, innerDim] } }); - const i = slice2({ + const i2 = slice2({ inputs: { x: imag2D }, backend: cpuBackend, attrs: { begin: [b, 0], size: [1, innerDim] } }); - const input3 = complex2({ inputs: { real: r, imag: i }, backend: cpuBackend }); + const input3 = complex2({ inputs: { real: r2, imag: i2 }, backend: cpuBackend }); const { real: real5, imag: imag5 } = fftImpl(input3, inverse, cpuBackend); const res = backend_util_exports.mergeRealAndImagArrays(real5, imag5); for (let d = 0; d < innerDim; d++) { @@ -46107,8 +45733,8 @@ function fftBatch(input2, inverse, cpuBackend) { resultReal[b * innerDim + d] = c.real; resultImag[b * innerDim + d] = c.imag; } - cpuBackend.disposeIntermediateTensorInfo(r); - cpuBackend.disposeIntermediateTensorInfo(i); + cpuBackend.disposeIntermediateTensorInfo(r2); + cpuBackend.disposeIntermediateTensorInfo(i2); cpuBackend.disposeIntermediateTensorInfo(input3); } const $realInfo = cpuBackend.makeTensorInfo(resultShape, "float32", resultReal); @@ -46190,10 +45816,10 @@ function fftRadix2(realVals, imagVals, size, inverse, cpuBackend) { const $oddRealInfo = cpuBackend.makeTensorInfo($oddShape, "float32", $oddRealVals); const $oddImagInfo = cpuBackend.makeTensorInfo($oddShape, "float32", $oddImagVals); const $oddTensorInfo = complex2({ inputs: { real: $oddRealInfo, imag: $oddImagInfo }, backend: cpuBackend }); - const e = backend_util_exports.exponents(size, inverse); - const eShape = [e.real.length]; - const eRealInfo = cpuBackend.makeTensorInfo(eShape, "float32", e.real); - const eImagInfo = cpuBackend.makeTensorInfo(eShape, "float32", e.imag); + const e2 = backend_util_exports.exponents(size, inverse); + const eShape = [e2.real.length]; + const eRealInfo = cpuBackend.makeTensorInfo(eShape, "float32", e2.real); + const eImagInfo = cpuBackend.makeTensorInfo(eShape, "float32", e2.imag); const complexInfo = complex2({ inputs: { real: eRealInfo, imag: eImagInfo }, backend: cpuBackend }); const exponentInfo = multiply2({ inputs: { a: complexInfo, b: $oddTensorInfo }, backend: cpuBackend }); const addPart = add4({ @@ -46248,25 +45874,25 @@ function fftRadix2(realVals, imagVals, size, inverse, cpuBackend) { } function fourierTransformByMatmul(data, size, inverse) { const ret = new Float32Array(size * 2); - for (let r = 0; r < size; r++) { + for (let r2 = 0; r2 < size; r2++) { let real5 = 0; let imag5 = 0; for (let c = 0; c < size; c++) { - const e = backend_util_exports.exponent(r * c, size, inverse); + const e2 = backend_util_exports.exponent(r2 * c, size, inverse); const term = backend_util_exports.getComplexWithIndex(data, c); - real5 += term.real * e.real - term.imag * e.imag; - imag5 += term.real * e.imag + term.imag * e.real; + real5 += term.real * e2.real - term.imag * e2.imag; + imag5 += term.real * e2.imag + term.imag * e2.real; } if (inverse) { real5 /= size; imag5 /= size; } - backend_util_exports.assignToTypedArray(ret, real5, imag5, r); + backend_util_exports.assignToTypedArray(ret, real5, imag5, r2); } return ret; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/FFT.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/FFT.js function fft2(args) { const { inputs, backend: backend2 } = args; const { input: input2 } = inputs; @@ -46290,7 +45916,7 @@ var fftConfig = { kernelFunc: fft2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Fill.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Fill.js function fill2(args) { const { backend: backend2, attrs } = args; const { shape, value, dtype } = attrs; @@ -46312,7 +45938,7 @@ function fillValues(values, value, dtype) { } } -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/FlipLeftRight.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/FlipLeftRight.js var flipLeftRightConfig = { kernelName: FlipLeftRight, backendName: "cpu", @@ -46347,7 +45973,7 @@ var flipLeftRightConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/FloorDiv.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/FloorDiv.js var floorDivImpl = createSimpleBinaryKernelImpl((a, b) => Math.floor(a / b)); var floorDiv2 = binaryKernelFunc(FloorDiv, floorDivImpl, null, "int32"); var floorDivConfig = { @@ -46356,7 +45982,7 @@ var floorDivConfig = { kernelFunc: floorDiv2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/FusedConv2D.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/FusedConv2D.js function fusedConv2D(args) { const { inputs, backend: backend2, attrs } = args; const { x, filter, bias, preluActivationWeights } = inputs; @@ -46400,7 +46026,7 @@ var fusedConv2DConfig = { kernelFunc: fusedConv2D }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/FusedDepthwiseConv2D.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/FusedDepthwiseConv2D.js function fusedDepthwiseConv2D(args) { const { inputs, backend: backend2, attrs } = args; const { x, filter, bias, preluActivationWeights } = inputs; @@ -46428,7 +46054,7 @@ var fusedDepthwiseConv2DConfig = { kernelFunc: fusedDepthwiseConv2D }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/GatherNd.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/GatherNd.js function gatherNd(args) { const { inputs, backend: backend2 } = args; const { params, indices } = inputs; @@ -46450,7 +46076,7 @@ var gatherNdConfig = { kernelFunc: gatherNd }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/GatherV2.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/GatherV2.js function gatherV2(args) { const { inputs, backend: backend2, attrs } = args; const { x, indices } = inputs; @@ -46459,8 +46085,8 @@ function gatherV2(args) { const parsedAxis = util_exports.parseAxisParam(axis, x.shape)[0]; const indicesVals = backend2.data.get(indices.dataId).values; const axisDim = x.shape[parsedAxis]; - for (let i = 0; i < indicesVals.length; ++i) { - const index = indicesVals[i]; + for (let i2 = 0; i2 < indicesVals.length; ++i2) { + const index = indicesVals[i2]; util_exports.assert(index <= axisDim - 1 && index >= 0, () => `GatherV2: the index value ${index} is not in [0, ${axisDim - 1}]`); } let $batchDims = batchDims; @@ -46505,7 +46131,7 @@ var gatherV2Config = { kernelFunc: gatherV2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/IFFT.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/IFFT.js function ifft2(args) { const { inputs, backend: backend2 } = args; const { input: input2 } = inputs; @@ -46529,7 +46155,7 @@ var ifftConfig = { kernelFunc: ifft2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/IsFinite.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/IsFinite.js var isFinite3 = unaryKernelFunc(IsFinite, (xi) => Number.isFinite(xi) ? 1 : 0, "bool"); var isFiniteConfig = { kernelName: IsFinite, @@ -46537,7 +46163,7 @@ var isFiniteConfig = { kernelFunc: isFinite3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/IsInf.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/IsInf.js var isInf2 = unaryKernelFunc(IsInf, (xi) => Math.abs(xi) === Infinity ? 1 : 0, "bool"); var isInfConfig = { kernelName: IsInf, @@ -46545,7 +46171,7 @@ var isInfConfig = { kernelFunc: isInf2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/IsNaN.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/IsNaN.js var isNaN3 = unaryKernelFunc(IsNan, (xi) => Number.isNaN(xi) ? 1 : 0, "bool"); var isNaNConfig = { kernelName: IsNan, @@ -46553,7 +46179,7 @@ var isNaNConfig = { kernelFunc: isNaN3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/LinSpace.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/LinSpace.js function linSpace(args) { const { backend: backend2, attrs } = args; const { start, stop, num } = attrs; @@ -46566,7 +46192,7 @@ var linSpaceConfig = { kernelFunc: linSpace }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Log1p.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Log1p.js var log1p2 = unaryKernelFunc(Log1p, (xi) => Math.log1p(xi)); var log1pConfig = { kernelName: Log1p, @@ -46574,7 +46200,7 @@ var log1pConfig = { kernelFunc: log1p2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/LogicalAnd.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/LogicalAnd.js var logicalAndImpl = createSimpleBinaryKernelImpl((a, b) => a && b); var logicalAnd2 = binaryKernelFunc(LogicalAnd, logicalAndImpl, null, "bool"); var logicalAndConfig = { @@ -46583,7 +46209,7 @@ var logicalAndConfig = { kernelFunc: logicalAnd2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/LogicalNot.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/LogicalNot.js var logicalNot2 = unaryKernelFunc(LogicalNot, (xi) => xi ? 0 : 1, "bool"); var logicalNotConfig = { kernelName: LogicalNot, @@ -46591,7 +46217,7 @@ var logicalNotConfig = { kernelFunc: logicalNot2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/LogicalOr.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/LogicalOr.js var logicalOrImpl = createSimpleBinaryKernelImpl((a, b) => a || b); var logicalOr2 = binaryKernelFunc(LogicalOr, logicalOrImpl, null, "bool"); var logicalOrConfig = { @@ -46600,7 +46226,7 @@ var logicalOrConfig = { kernelFunc: logicalOr2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/LRN.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/LRN.js function lRN(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -46635,7 +46261,7 @@ var LRNConfig = { kernelFunc: lRN }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/LRNGrad.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/LRNGrad.js function lRNGrad(args) { const { inputs, backend: backend2, attrs } = args; const { x, y, dy } = inputs; @@ -46674,7 +46300,7 @@ var LRNGradConfig = { kernelFunc: lRNGrad }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Max.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Max.js function max3(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -46688,8 +46314,8 @@ function max3(args) { let xVals = cpuBackend.data.get(x.dataId).values; if (permutedAxes != null) { const newShape = new Array(xRank); - for (let i = 0; i < newShape.length; i++) { - newShape[i] = xShape[permutedAxes[i]]; + for (let i2 = 0; i2 < newShape.length; i2++) { + newShape[i2] = xShape[permutedAxes[i2]]; } xVals = transposeImpl(xVals, xShape, x.dtype, permutedAxes, newShape); axes = backend_util_exports.getInnerMostAxes(axes.length, xRank); @@ -46714,7 +46340,7 @@ var maxConfig = { kernelFunc: max3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/MaxPool.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/MaxPool.js function maxPool2(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -46740,7 +46366,7 @@ var maxPoolConfig = { kernelFunc: maxPool2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/MaxPool3D.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/MaxPool3D.js function maxPool3D(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -46757,7 +46383,7 @@ var maxPool3DConfig = { kernelFunc: maxPool3D }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/MaxPool3DGrad.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/MaxPool3DGrad.js function maxPool3DGrad(args) { const { inputs, backend: backend2, attrs } = args; const { dy, input: input2 } = inputs; @@ -46829,7 +46455,7 @@ var maxPool3DGradConfig2 = { kernelFunc: maxPool3DGrad }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/MaxPoolGrad.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/MaxPoolGrad.js function maxPoolGrad2(args) { const { inputs, backend: backend2, attrs } = args; const { dy, input: input2, output } = inputs; @@ -46890,7 +46516,7 @@ var maxPoolGradConfig2 = { kernelFunc: maxPoolGrad2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/MaxPoolWithArgmax_impl.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/MaxPoolWithArgmax_impl.js function maxPoolWithArgmaxImpl(xValues, xShape, dtype, includeBatchInIndex, convInfo) { const strides = util_exports.computeStrides(xShape); const maxPools = pool2(xValues, xShape, dtype, strides, convInfo, "max"); @@ -46898,7 +46524,7 @@ function maxPoolWithArgmaxImpl(xValues, xShape, dtype, includeBatchInIndex, conv return [maxPools.values, maxPositions.values]; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/MaxPoolWithArgmax.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/MaxPoolWithArgmax.js var maxPoolWithArgmaxConfig = { kernelName: MaxPoolWithArgmax, backendName: "cpu", @@ -46919,7 +46545,7 @@ var maxPoolWithArgmaxConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Mean.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Mean.js function mean2(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -46936,7 +46562,7 @@ function mean2(args) { const res = div2({ inputs: { a: $x, b: reduceSizeScalar }, backend: backend2 }); toDispose.push(res); const result = sum3({ inputs: { x: res }, backend: backend2, attrs: { axis, keepDims } }); - toDispose.forEach((t) => backend2.disposeIntermediateTensorInfo(t)); + toDispose.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2)); return result; } var meanConfig = { @@ -46945,7 +46571,7 @@ var meanConfig = { kernelFunc: mean2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Min.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Min.js function min3(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -46964,8 +46590,8 @@ function min3(args) { const reduceSize = util_exports.sizeFromShape(reduceShape); const vals = util_exports.makeZerosTypedArray(util_exports.sizeFromShape(outShape), $x.dtype); const aVals = backend2.data.get($x.dataId).values; - for (let i = 0; i < vals.length; ++i) { - const offset = i * reduceSize; + for (let i2 = 0; i2 < vals.length; ++i2) { + const offset = i2 * reduceSize; let min7 = aVals[offset]; for (let j = 0; j < reduceSize; ++j) { const value = aVals[offset + j]; @@ -46973,7 +46599,7 @@ function min3(args) { min7 = value; } } - vals[i] = min7; + vals[i2] = min7; } if (permutedAxes != null) { backend2.disposeIntermediateTensorInfo($x); @@ -46993,15 +46619,15 @@ var minConfig = { kernelFunc: min3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/MirrorPad.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/MirrorPad.js function mirrorPad2(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; const { paddings, mode } = attrs; assertNotComplex(x, "mirrorPad"); - const outShape = paddings.map((p2, i) => p2[0] + x.shape[i] + p2[1]); + const outShape = paddings.map((p2, i2) => p2[0] + x.shape[i2] + p2[1]); const start = paddings.map((p2) => p2[0]); - const end = paddings.map((p2, i) => p2[0] + x.shape[i]); + const end = paddings.map((p2, i2) => p2[0] + x.shape[i2]); const offset = mode === "reflect" ? 0 : 1; const xVals = backend2.data.get(x.dataId).values; const xRank = x.shape.length; @@ -47010,18 +46636,18 @@ function mirrorPad2(args) { const resultRank = outShape.length; const resultStrides = util_exports.computeStrides(outShape); const resVals = util_exports.getTypedArrayFromDType(x.dtype, resultSize); - for (let i = 0; i < resultSize; i++) { - let coords3 = util_exports.indexToLoc(i, resultRank, resultStrides); - for (let i2 = 0; i2 < resultRank; i2++) { - if (coords3[i2] < start[i2]) { - coords3[i2] = start[i2] * 2 - coords3[i2] - offset; - } else if (coords3[i2] >= end[i2]) { - coords3[i2] = (end[i2] - 1) * 2 - coords3[i2] + offset; + for (let i2 = 0; i2 < resultSize; i2++) { + let coords3 = util_exports.indexToLoc(i2, resultRank, resultStrides); + for (let i3 = 0; i3 < resultRank; i3++) { + if (coords3[i3] < start[i3]) { + coords3[i3] = start[i3] * 2 - coords3[i3] - offset; + } else if (coords3[i3] >= end[i3]) { + coords3[i3] = (end[i3] - 1) * 2 - coords3[i3] + offset; } } - coords3 = coords3.map((c, i2) => c - start[i2]); + coords3 = coords3.map((c, i3) => c - start[i3]); const inIndex = util_exports.locToIndex(coords3, xRank, xStrides); - resVals[i] = xVals[inIndex]; + resVals[i2] = xVals[inIndex]; } const outId = backend2.write(resVals, outShape, x.dtype); return { dataId: outId, shape: outShape, dtype: x.dtype }; @@ -47032,7 +46658,7 @@ var mirrorPadConfig = { kernelFunc: mirrorPad2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Mod.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Mod.js var modImpl = createSimpleBinaryKernelImpl((aValue, bValue) => { const rem = aValue % bValue; if (aValue < 0 && bValue < 0 || aValue >= 0 && bValue >= 0) { @@ -47048,10 +46674,10 @@ var modConfig = { kernelFunc: mod2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Multinomial.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Multinomial.js var seedrandom4 = __toESM(require_seedrandom2()); -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Softmax.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Softmax.js function softmax3(args) { const { inputs, backend: backend2, attrs } = args; const { logits } = inputs; @@ -47091,7 +46717,7 @@ var softmaxConfig = { kernelFunc: softmax3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Multinomial.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Multinomial.js function multinomial2(args) { const { inputs, backend: backend2, attrs } = args; const { logits } = inputs; @@ -47113,10 +46739,10 @@ function multinomial2(args) { const random = seedrandom4.alea(seed.toString()); const outOffset = b * numSamples; for (let sampleId = 0; sampleId < numSamples; ++sampleId) { - const r = random(); + const r2 = random(); resVals[outOffset + sampleId] = cdf.length; for (let event = 0; event < cdf.length; event++) { - if (r < cdf[event]) { + if (r2 < cdf[event]) { resVals[outOffset + sampleId] = event; break; } @@ -47134,7 +46760,7 @@ var multinomialConfig = { kernelFunc: multinomial2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/NonMaxSuppressionV3.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/NonMaxSuppressionV3.js var nonMaxSuppressionV3Impl2 = kernel_impls_exports.nonMaxSuppressionV3Impl; function nonMaxSuppressionV3(args) { const { inputs, backend: backend2, attrs } = args; @@ -47152,7 +46778,7 @@ var nonMaxSuppressionV3Config = { kernelFunc: nonMaxSuppressionV3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/NonMaxSuppressionV4.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/NonMaxSuppressionV4.js var nonMaxSuppressionV4Impl2 = kernel_impls_exports.nonMaxSuppressionV4Impl; function nonMaxSuppressionV4(args) { const { inputs, backend: backend2, attrs } = args; @@ -47173,7 +46799,7 @@ var nonMaxSuppressionV4Config = { kernelFunc: nonMaxSuppressionV4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/NonMaxSuppressionV5.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/NonMaxSuppressionV5.js var nonMaxSuppressionV5Impl2 = kernel_impls_exports.nonMaxSuppressionV5Impl; function nonMaxSuppressionV5(args) { const { inputs, backend: backend2, attrs } = args; @@ -47198,7 +46824,7 @@ var nonMaxSuppressionV5Config = { kernelFunc: nonMaxSuppressionV5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/OneHot.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/OneHot.js function oneHot2(args) { const { inputs, backend: backend2, attrs } = args; const { indices } = inputs; @@ -47221,7 +46847,7 @@ var oneHotConfig = { kernelFunc: oneHot2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ZerosLike.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ZerosLike.js function zerosLike2(args) { const { inputs, backend: backend2 } = args; const { x } = inputs; @@ -47229,14 +46855,14 @@ function zerosLike2(args) { throw new Error("zerosLike is not supported for string tensors"); } else if (x.dtype === "complex64") { const realPart = real2({ inputs: { input: x }, backend: backend2 }); - const r = zerosLike2({ inputs: { x: realPart }, backend: backend2 }); + const r2 = zerosLike2({ inputs: { x: realPart }, backend: backend2 }); const imagPart = imag2({ inputs: { input: x }, backend: backend2 }); - const i = zerosLike2({ inputs: { x: imagPart }, backend: backend2 }); - const result = complex2({ inputs: { real: r, imag: i }, backend: backend2 }); + const i2 = zerosLike2({ inputs: { x: imagPart }, backend: backend2 }); + const result = complex2({ inputs: { real: r2, imag: i2 }, backend: backend2 }); backend2.disposeIntermediateTensorInfo(realPart); - backend2.disposeIntermediateTensorInfo(r); + backend2.disposeIntermediateTensorInfo(r2); backend2.disposeIntermediateTensorInfo(imagPart); - backend2.disposeIntermediateTensorInfo(i); + backend2.disposeIntermediateTensorInfo(i2); return result; } else { return fill2({ backend: backend2, attrs: { shape: x.shape, value: 0, dtype: x.dtype } }); @@ -47248,7 +46874,7 @@ var zerosLikeConfig = { kernelFunc: zerosLike2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/OnesLike.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/OnesLike.js function onesLike2(args) { const { inputs, backend: backend2 } = args; const { x } = inputs; @@ -47256,14 +46882,14 @@ function onesLike2(args) { throw new Error("onesLike is not supported for string tensors"); } else if (x.dtype === "complex64") { const realPart = real2({ inputs: { input: x }, backend: backend2 }); - const r = onesLike2({ inputs: { x: realPart }, backend: backend2 }); + const r2 = onesLike2({ inputs: { x: realPart }, backend: backend2 }); const imagPart = imag2({ inputs: { input: x }, backend: backend2 }); - const i = zerosLike2({ inputs: { x: imagPart }, backend: backend2 }); - const result = complex2({ inputs: { real: r, imag: i }, backend: backend2 }); + const i2 = zerosLike2({ inputs: { x: imagPart }, backend: backend2 }); + const result = complex2({ inputs: { real: r2, imag: i2 }, backend: backend2 }); backend2.disposeIntermediateTensorInfo(realPart); - backend2.disposeIntermediateTensorInfo(r); + backend2.disposeIntermediateTensorInfo(r2); backend2.disposeIntermediateTensorInfo(imagPart); - backend2.disposeIntermediateTensorInfo(i); + backend2.disposeIntermediateTensorInfo(i2); return result; } else { return fill2({ backend: backend2, attrs: { shape: x.shape, value: 1, dtype: x.dtype } }); @@ -47275,7 +46901,7 @@ var onesLikeConfig = { kernelFunc: onesLike2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Pack.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Pack.js function pack(args) { const { inputs, backend: backend2, attrs } = args; const { axis } = attrs; @@ -47284,18 +46910,18 @@ function pack(args) { } const shape = inputs[0].shape; const dtype = inputs[0].dtype; - inputs.forEach((t) => { - util_exports.assertShapesMatch(shape, t.shape, "All tensors passed to stack must have matching shapes"); - util_exports.assert(dtype === t.dtype, () => "All tensors passed to stack must have matching dtypes"); + inputs.forEach((t2) => { + util_exports.assertShapesMatch(shape, t2.shape, "All tensors passed to stack must have matching shapes"); + util_exports.assert(dtype === t2.dtype, () => "All tensors passed to stack must have matching dtypes"); }); const intermediateTensorInfos = []; - const expandedTensors = inputs.map((t) => { - const expandedT = expandDims3({ inputs: { input: t }, backend: backend2, attrs: { dim: axis } }); + const expandedTensors = inputs.map((t2) => { + const expandedT = expandDims3({ inputs: { input: t2 }, backend: backend2, attrs: { dim: axis } }); intermediateTensorInfos.push(expandedT); return expandedT; }); const result = concat2({ inputs: expandedTensors, backend: backend2, attrs: { axis } }); - intermediateTensorInfos.forEach((t) => backend2.disposeIntermediateTensorInfo(t)); + intermediateTensorInfos.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2)); return result; } var packConfig = { @@ -47304,13 +46930,13 @@ var packConfig = { kernelFunc: pack }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/PadV2.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/PadV2.js function padV2(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; const { paddings, constantValue } = attrs; assertNotComplex(x, "pad"); - const outShape = paddings.map((p2, i) => p2[0] + x.shape[i] + p2[1]); + const outShape = paddings.map((p2, i2) => p2[0] + x.shape[i2] + p2[1]); const start = paddings.map((p2) => p2[0]); const xVals = backend2.data.get(x.dataId).values; const xSize = util_exports.sizeFromShape(x.shape); @@ -47323,11 +46949,11 @@ function padV2(args) { if (constantValue !== 0) { resVals.fill(constantValue); } - for (let i = 0; i < xSize; i++) { - const coords3 = util_exports.indexToLoc(i, xRank, xStrides); - const outCoords = coords3.map((c, i2) => c + start[i2]); + for (let i2 = 0; i2 < xSize; i2++) { + const coords3 = util_exports.indexToLoc(i2, xRank, xStrides); + const outCoords = coords3.map((c, i3) => c + start[i3]); const outIndex = util_exports.locToIndex(outCoords, resultRank, resultStrides); - resVals[outIndex] = xVals[i]; + resVals[outIndex] = xVals[i2]; } const outId = backend2.write(resVals, outShape, x.dtype); return { dataId: outId, shape: outShape, dtype: x.dtype }; @@ -47338,7 +46964,7 @@ var padV2Config = { kernelFunc: padV2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Pow.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Pow.js var powImpl = createSimpleBinaryKernelImpl((a, b) => Math.pow(a, b)); var pow2 = binaryKernelFunc(Pow, powImpl); var powConfig = { @@ -47347,7 +46973,27 @@ var powConfig = { kernelFunc: pow2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/RaggedTensorToTensor.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/RaggedGather.js +function raggedGather2(args) { + const { inputs, backend: backend2, attrs } = args; + const { paramsNestedSplits, paramsDenseValues, indices } = inputs; + const { outputRaggedRank } = attrs; + const $paramsNestedSplits = paramsNestedSplits.map((t2) => backend2.data.get(t2.dataId).values); + const $paramsNestedSplitsShapes = paramsNestedSplits.map((t2) => t2.shape); + const $paramsDenseValues = backend2.data.get(paramsDenseValues.dataId).values; + const $indices = backend2.data.get(indices.dataId).values; + const [outputNestedSplits, outputDenseValues, outputDenseValuesShape] = raggedGatherImpl($paramsNestedSplits, $paramsNestedSplitsShapes, $paramsDenseValues, paramsDenseValues.shape, paramsDenseValues.dtype, $indices, indices.shape, outputRaggedRank); + const outputNestedSplitsTensors = outputNestedSplits.map((splits) => backend2.makeTensorInfo([splits.length], "int32", splits)); + const outputDenseValuesTensor = backend2.makeTensorInfo(outputDenseValuesShape, paramsDenseValues.dtype, outputDenseValues); + return outputNestedSplitsTensors.concat([outputDenseValuesTensor]); +} +var raggedGatherConfig = { + kernelName: RaggedGather, + backendName: "cpu", + kernelFunc: raggedGather2 +}; + +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/RaggedTensorToTensor.js function raggedTensorToTensor2(args) { const { inputs, backend: backend2, attrs } = args; const { shape, values, defaultValue, rowPartitionTensors } = inputs; @@ -47355,8 +47001,8 @@ function raggedTensorToTensor2(args) { const $shape = backend2.data.get(shape.dataId).values; const $values = backend2.data.get(values.dataId).values; const $defaultValue = backend2.data.get(defaultValue.dataId).values; - const $rowPartitionValues = rowPartitionTensors.map((t) => backend2.data.get(t.dataId).values); - const rowPartitionValuesShapes = rowPartitionTensors.map((t) => t.shape); + const $rowPartitionValues = rowPartitionTensors.map((t2) => backend2.data.get(t2.dataId).values); + const rowPartitionValuesShapes = rowPartitionTensors.map((t2) => t2.shape); const [outputShape, output] = raggedTensorToTensorImpl($shape, shape.shape, $values, values.shape, values.dtype, $defaultValue, defaultValue.shape, $rowPartitionValues, rowPartitionValuesShapes, rowPartitionTypes); return backend2.makeTensorInfo(outputShape, values.dtype, output); } @@ -47366,7 +47012,7 @@ var raggedTensorToTensorConfig = { kernelFunc: raggedTensorToTensor2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Range.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Range.js function range3(args) { const { backend: backend2, attrs } = args; const { start, stop, dtype, step: step5 } = attrs; @@ -47379,7 +47025,7 @@ var rangeConfig = { kernelFunc: range3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Reciprocal.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Reciprocal.js var reciprocal2 = unaryKernelFunc(Reciprocal, (xi) => 1 / xi); var reciprocalConfig = { kernelName: Reciprocal, @@ -47387,7 +47033,7 @@ var reciprocalConfig = { kernelFunc: reciprocal2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ResizeBilinear.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ResizeBilinear.js function resizeBilinear2(args) { const { inputs, backend: backend2, attrs } = args; const { images } = inputs; @@ -47410,12 +47056,12 @@ function resizeBilinear2(args) { const effectiveRowSizeRatio = effectiveInputSize[0] / effectiveOutputSize[0]; const effectiveColSizeRatio = effectiveInputSize[1] / effectiveOutputSize[1]; for (let b = 0; b < batch; b++) { - for (let r = 0; r < newHeight; r++) { + for (let r2 = 0; r2 < newHeight; r2++) { let sourceFracRow; if (halfPixelCenters) { - sourceFracRow = effectiveRowSizeRatio * (r + 0.5) - 0.5; + sourceFracRow = effectiveRowSizeRatio * (r2 + 0.5) - 0.5; } else { - sourceFracRow = effectiveRowSizeRatio * r; + sourceFracRow = effectiveRowSizeRatio * r2; } const sourceRowFloor = Math.max(0, Math.floor(sourceFracRow)); const rowFrac = sourceFracRow - sourceRowFloor; @@ -47457,7 +47103,7 @@ var resizeBilinearConfig = { kernelFunc: resizeBilinear2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ResizeBilinearGrad.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ResizeBilinearGrad.js function resizeBilinearGrad(args) { const { inputs, backend: backend2, attrs } = args; const { images, dy } = inputs; @@ -47481,8 +47127,8 @@ function resizeBilinearGrad(args) { let offset = 0; for (let b = 0; b < batch; b++) { const bOffset = b * imagesStrides[0]; - for (let r = 0; r < yHeight; r++) { - const dxR = r * heightScale; + for (let r2 = 0; r2 < yHeight; r2++) { + const dxR = r2 * heightScale; const topDxRIndex = Math.floor(dxR); const bottomDxRIndex = Math.min(Math.ceil(dxR), xHeight - 1); const topDxROffset = bOffset + topDxRIndex * imagesStrides[1]; @@ -47521,7 +47167,7 @@ var resizeBilinearGradConfig2 = { kernelFunc: resizeBilinearGrad }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ResizeNearestNeighbor.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ResizeNearestNeighbor.js function resizeNearestNeighbor2(args) { const { inputs, backend: backend2, attrs } = args; const { images } = inputs; @@ -47545,8 +47191,8 @@ function resizeNearestNeighbor2(args) { let outputOffset = 0; for (let b = 0; b < batch; b++) { const batchOffset = b * imagesStrides[0]; - for (let r = 0; r < newHeight; r++) { - const sourceFracRow = halfPixelCenters ? effectiveRowSizeRatio * (r + 0.5) : effectiveRowSizeRatio * r; + for (let r2 = 0; r2 < newHeight; r2++) { + const sourceFracRow = halfPixelCenters ? effectiveRowSizeRatio * (r2 + 0.5) : effectiveRowSizeRatio * r2; let sourceNearestRow = Math.min(oldHeight - 1, alignCorners ? Math.round(sourceFracRow) : Math.floor(sourceFracRow)); if (halfPixelCenters) { sourceNearestRow = Math.max(0, sourceNearestRow); @@ -47574,7 +47220,7 @@ var resizeNearestNeighborConfig = { kernelFunc: resizeNearestNeighbor2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ResizeNearestNeighborGrad.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ResizeNearestNeighborGrad.js function resizeNearestNeighborGrad(args) { const { inputs, backend: backend2, attrs } = args; const { images, dy } = inputs; @@ -47602,9 +47248,9 @@ function resizeNearestNeighborGrad(args) { const winWidth = Math.ceil(invWidthScale) * 2 + 2; for (let b = 0; b < batch; b++) { const batchOffset = b * imagesStrides[0]; - for (let r = 0; r < xHeight; r++) { - const rowOffset = batchOffset + r * imagesStrides[1]; - const startRLerp = Math.floor(r * invHeightScale); + for (let r2 = 0; r2 < xHeight; r2++) { + const rowOffset = batchOffset + r2 * imagesStrides[1]; + const startRLerp = Math.floor(r2 * invHeightScale); const startDyR = Math.floor(startRLerp - winHeight / 2); for (let c = 0; c < xWidth; c++) { const colOffset = rowOffset + c * imagesStrides[2]; @@ -47620,7 +47266,7 @@ function resizeNearestNeighborGrad(args) { const dyROffset = batchOffset + dyR * dyStrides[1]; const sourceFracRow = dyR * heightScale; const sourceNearestRow = Math.min(xHeight - 1, alignCorners ? Math.round(sourceFracRow) : Math.floor(sourceFracRow)); - if (r !== sourceNearestRow) { + if (r2 !== sourceNearestRow) { continue; } for (let dyCIndex = 0; dyCIndex < winWidth; dyCIndex++) { @@ -47649,7 +47295,7 @@ var resizeNearestNeighborGradConfig2 = { kernelFunc: resizeNearestNeighborGrad }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Reverse.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Reverse.js function reverse2(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -47662,8 +47308,8 @@ function reverse2(args) { } const outBuf = new TensorBuffer(x.shape, x.dtype); const xBuf = backend2.bufferSync(x); - for (let i = 0; i < outBuf.size; i++) { - const outLoc = outBuf.indexToLoc(i); + for (let i2 = 0; i2 < outBuf.size; i2++) { + const outLoc = outBuf.indexToLoc(i2); const inLoc = outLoc.slice(); $dims.forEach((d) => inLoc[d] = x.shape[d] - 1 - inLoc[d]); outBuf.set(xBuf.get(...inLoc), ...outLoc); @@ -47676,7 +47322,7 @@ var reverseConfig = { kernelFunc: reverse2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/RotateWithOffset.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/RotateWithOffset.js var rotateWithOffsetConfig = { kernelName: RotateWithOffset, backendName: "cpu", @@ -47730,7 +47376,7 @@ var rotateWithOffsetConfig = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Round.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Round.js var round3 = unaryKernelFunc(Round, (xi) => { const base = Math.floor(xi); if (xi - base < 0.5) { @@ -47751,7 +47397,7 @@ var roundConfig = { kernelFunc: round3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ScatterNd.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/ScatterNd.js function scatterNd(args) { const { inputs, backend: backend2, attrs } = args; const { indices, updates } = inputs; @@ -47769,7 +47415,7 @@ var scatterNdConfig = { kernelFunc: scatterNd }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SearchSorted_impl.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SearchSorted_impl.js function lowerBound2(array2, value) { let left = 0; let right = array2.length; @@ -47803,14 +47449,14 @@ function searchSortedImpl(sortedInputs, values, batchSize, numInputs, numValues, for (let b = 0; b < batchSize; ++b) { const sortedInputsSlice = sortedInputs.slice(b * numInputs, (b + 1) * numInputs); const outputOffset = b * numValues; - for (let i = 0; i < numValues; ++i) { - output[outputOffset + i] = side === "left" ? lowerBound2(sortedInputsSlice, values[i + outputOffset]) : upperBound2(sortedInputsSlice, values[i + outputOffset]); + for (let i2 = 0; i2 < numValues; ++i2) { + output[outputOffset + i2] = side === "left" ? lowerBound2(sortedInputsSlice, values[i2 + outputOffset]) : upperBound2(sortedInputsSlice, values[i2 + outputOffset]); } } return output; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SearchSorted.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SearchSorted.js function searchSorted2(args) { const { inputs, backend: backend2, attrs } = args; const { sortedSequence, values } = inputs; @@ -47826,29 +47472,29 @@ var searchSortedConfig = { kernelFunc: searchSorted2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Select.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Select.js function select2(args) { const { inputs, backend: backend2 } = args; - const { condition, t, e } = inputs; - assertNotComplex([condition, t, e], "select"); + const { condition, t: t2, e: e2 } = inputs; + assertNotComplex([condition, t2, e2], "select"); const conditionRank = condition.shape.length; const values = backend2.data.get(condition.dataId).values; - const tValues = backend2.data.get(t.dataId).values; - const eValues = backend2.data.get(e.dataId).values; - const resultDtype = upcastType(t.dtype, e.dtype); - const newValues = util_exports.makeZerosTypedArray(util_exports.sizeFromShape(t.shape), resultDtype); + const tValues = backend2.data.get(t2.dataId).values; + const eValues = backend2.data.get(e2.dataId).values; + const resultDtype = upcastType(t2.dtype, e2.dtype); + const newValues = util_exports.makeZerosTypedArray(util_exports.sizeFromShape(t2.shape), resultDtype); let index = 0; - const offset = conditionRank === 0 || conditionRank > 1 || t.shape.length === 1 ? 1 : util_exports.sizeFromShape(t.shape.slice(1)); - for (let i = 0; i < values.length; i++) { + const offset = conditionRank === 0 || conditionRank > 1 || t2.shape.length === 1 ? 1 : util_exports.sizeFromShape(t2.shape.slice(1)); + for (let i2 = 0; i2 < values.length; i2++) { for (let j = 0; j < offset; j++) { - if (values[i] === 1) { - newValues[index++] = tValues[i]; + if (values[i2] === 1) { + newValues[index++] = tValues[i2]; } else { - newValues[index++] = eValues[i]; + newValues[index++] = eValues[i2]; } } } - return backend2.makeTensorInfo(t.shape, resultDtype, newValues); + return backend2.makeTensorInfo(t2.shape, resultDtype, newValues); } var selectConfig = { kernelName: Select, @@ -47856,7 +47502,7 @@ var selectConfig = { kernelFunc: select2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Selu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Selu.js var scaleAlpha = backend_util_exports.SELU_SCALEALPHA; var scale = backend_util_exports.SELU_SCALE; var selu2 = unaryKernelFunc(Selu, (xi) => { @@ -47872,7 +47518,7 @@ var seluConfig = { kernelFunc: selu2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Sign.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Sign.js var sign2 = unaryKernelFunc(Sign, (xi) => { if (xi < 0) { return -1; @@ -47888,7 +47534,7 @@ var signConfig = { kernelFunc: sign2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Sin.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Sin.js var sin2 = unaryKernelFunc(Sin, (xi) => Math.sin(xi)); var sinConfig = { kernelName: Sin, @@ -47896,7 +47542,7 @@ var sinConfig = { kernelFunc: sin2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Sinh.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Sinh.js var sinh2 = unaryKernelFunc(Sinh, (xi) => Math.sinh(xi)); var sinhConfig = { kernelName: Sinh, @@ -47904,7 +47550,7 @@ var sinhConfig = { kernelFunc: sinh2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Softplus.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Softplus.js var epsilon2 = 11920928955078125e-23; var threshold2 = Math.log(epsilon2) + 2; var softplus2 = unaryKernelFunc(Softplus, (xi) => { @@ -47927,7 +47573,7 @@ var softplusConfig = { kernelFunc: softplus2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SpaceToBatchND.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SpaceToBatchND.js function spaceToBatchND2(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -47936,7 +47582,7 @@ function spaceToBatchND2(args) { const prod6 = util_exports.sizeFromShape(blockShape); const completePaddings = [[0, 0]]; completePaddings.push(...paddings); - for (let i = 1 + blockShape.length; i < x.shape.length; ++i) { + for (let i2 = 1 + blockShape.length; i2 < x.shape.length; ++i2) { completePaddings.push([0, 0]); } const paddedX = padV2Config.kernelFunc({ @@ -47967,7 +47613,7 @@ var spaceToBatchNDConfig = { kernelFunc: spaceToBatchND2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SparseFillEmptyRows.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SparseFillEmptyRows.js function sparseFillEmptyRows2(args) { const { inputs, backend: backend2 } = args; const { indices, values, denseShape, defaultValue } = inputs; @@ -48005,7 +47651,7 @@ var sparseFillEmptyRowsConfig = { kernelFunc: sparseFillEmptyRows2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SparseReshape.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SparseReshape.js function sparseReshape2(args) { const { inputs, backend: backend2 } = args; const { inputIndices, inputShape, newShape } = inputs; @@ -48035,7 +47681,7 @@ var sparseReshapeConfig = { kernelFunc: sparseReshape2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SparseSegmentMean.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SparseSegmentMean.js function sparseSegmentMean2(args) { const { inputs, backend: backend2 } = args; const { data, indices, segmentIds } = inputs; @@ -48065,7 +47711,7 @@ var sparseSegmentMeanConfig = { kernelFunc: sparseSegmentMean2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SparseSegmentSum.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SparseSegmentSum.js function sparseSegmentSum2(args) { const { inputs, backend: backend2 } = args; const { data, indices, segmentIds } = inputs; @@ -48095,7 +47741,7 @@ var sparseSegmentSumConfig = { kernelFunc: sparseSegmentSum2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SparseToDense.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SparseToDense.js function sparseToDense2(args) { const { inputs, backend: backend2, attrs } = args; const { sparseIndices, sparseValues, defaultValue } = inputs; @@ -48140,7 +47786,7 @@ var sparseToDenseConfig = { kernelFunc: sparseToDense2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SplitV.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/SplitV.js function splitV(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -48149,11 +47795,11 @@ function splitV(args) { const splitSizes = backend_util_exports.prepareSplitSize(x, numOrSizeSplits, $axis); const begin = new Array(x.shape.length).fill(0); const size = x.shape.slice(); - return splitSizes.map((s) => { + return splitSizes.map((s2) => { const sliceSize = [...size]; - sliceSize[$axis] = s; + sliceSize[$axis] = s2; const sliceT = slice2({ inputs: { x }, backend: backend2, attrs: { begin, size: sliceSize } }); - begin[$axis] += s; + begin[$axis] += s2; return sliceT; }); } @@ -48163,7 +47809,7 @@ var splitVConfig = { kernelFunc: splitV }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Square.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Square.js var squareConfig = { kernelName: Square, backendName: "cpu", @@ -48173,16 +47819,16 @@ var squareConfig = { assertNotComplex(x, "square"); const values = cpuBackend.data.get(x.dataId).values; const newValues = new Float32Array(values.length); - for (let i = 0; i < values.length; ++i) { - const value = values[i]; - newValues[i] = value * value; + for (let i2 = 0; i2 < values.length; ++i2) { + const value = values[i2]; + newValues[i2] = value * value; } const dataId = cpuBackend.write(newValues, x.shape, x.dtype); return { dataId, shape: x.shape, dtype: x.dtype }; } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Step.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Step.js var step2 = unaryKernelFunc(Step, (xi, attrs) => { const stepAttrs = attrs; if (isNaN(xi)) { @@ -48197,7 +47843,7 @@ var stepConfig = { kernelFunc: step2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/StridedSlice.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/StridedSlice.js function stridedSlice2(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -48226,7 +47872,7 @@ var stridedSliceConfig = { kernelFunc: stridedSlice2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/StringNGrams.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/StringNGrams.js function stringNGrams2(args) { const { inputs, backend: backend2, attrs } = args; const { separator, nGramWidths, leftPad, rightPad: rightPad2, padWidth, preserveShortSequences } = attrs; @@ -48245,7 +47891,7 @@ var stringNGramsConfig = { kernelFunc: stringNGrams2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/StringSplit.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/StringSplit.js function stringSplit2(args) { const { inputs, backend: backend2, attrs } = args; const { skipEmpty } = attrs; @@ -48275,7 +47921,7 @@ var stringSplitConfig = { kernelFunc: stringSplit2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/StringToHashBucketFast.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/StringToHashBucketFast.js function stringToHashBucketFast2(args) { const { inputs, backend: backend2, attrs } = args; const { numBuckets } = attrs; @@ -48296,7 +47942,7 @@ var stringToHashBucketFastConfig = { kernelFunc: stringToHashBucketFast2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Tan.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Tan.js var tan2 = unaryKernelFunc(Tan, (xi) => Math.tan(xi)); var tanConfig = { kernelName: Tan, @@ -48304,7 +47950,7 @@ var tanConfig = { kernelFunc: tan2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Tanh.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Tanh.js var tanh3 = unaryKernelFunc(Tanh, (xi) => Math.tanh(xi)); var tanhConfig = { kernelName: Tanh, @@ -48312,7 +47958,7 @@ var tanhConfig = { kernelFunc: tanh3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Tile.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Tile.js function tile3(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -48327,7 +47973,7 @@ var tileConfig = { kernelFunc: tile3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/TopK.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/TopK.js function topK(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -48346,7 +47992,7 @@ var topKConfig = { kernelFunc: topK }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Transform.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Transform.js function transform2(args) { const { inputs, attrs, backend: backend2 } = args; const { image: image2, transforms } = inputs; @@ -48491,7 +48137,7 @@ function bilinearInterpolation(imageVals, imageHeight, imageWidth, batchStride, return (yCeil - y) * valueYFloor + (y - yFloor) * valueYCeil; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Unique.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Unique.js function unique3(args) { const { inputs, attrs, backend: backend2 } = args; const { axis } = attrs; @@ -48510,7 +48156,7 @@ var uniqueConfig = { kernelFunc: unique3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Unpack.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/Unpack.js function unpack(args) { const { inputs, backend: backend2, attrs } = args; const { value } = inputs; @@ -48522,19 +48168,19 @@ function unpack(args) { const num = value.shape[axis]; const outShape = new Array(valueRank - 1); let outIndex = 0; - for (let i = 0; i < valueRank; i++) { - if (i !== axis) { - outShape[outIndex++] = value.shape[i]; + for (let i2 = 0; i2 < valueRank; i2++) { + if (i2 !== axis) { + outShape[outIndex++] = value.shape[i2]; } } const begin = new Array(valueRank).fill(0); const size = value.shape.slice(); size[axis] = 1; const res = new Array(num); - for (let i = 0; i < res.length; i++) { - begin[axis] = i; + for (let i2 = 0; i2 < res.length; i2++) { + begin[axis] = i2; const tempRes = slice2({ inputs: { x: value }, backend: backend2, attrs: { begin, size } }); - res[i] = reshape3({ inputs: { x: tempRes }, backend: backend2, attrs: { shape: outShape } }); + res[i2] = reshape3({ inputs: { x: tempRes }, backend: backend2, attrs: { shape: outShape } }); backend2.disposeIntermediateTensorInfo(tempRes); } return res; @@ -48545,7 +48191,7 @@ var unpackConfig = { kernelFunc: unpack }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/UnsortedSegmentSum.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/kernels/UnsortedSegmentSum.js function unsortedSegmentSum2(args) { const { inputs, backend: backend2, attrs } = args; const { x, segmentIds } = inputs; @@ -48557,13 +48203,13 @@ function unsortedSegmentSum2(args) { const intermediates = []; const numIters = xRank - segmentIdsRank; let $segmentIds = segmentIds; - for (let i = 0; i < numIters; ++i) { - const expanded = expandDims3({ inputs: { input: $segmentIds }, backend: backend2, attrs: { dim: i + 1 } }); + for (let i2 = 0; i2 < numIters; ++i2) { + const expanded = expandDims3({ inputs: { input: $segmentIds }, backend: backend2, attrs: { dim: i2 + 1 } }); $segmentIds = expanded; intermediates.push(expanded); } - for (let i = 0; i < numSegments; ++i) { - const scalarValue = util_exports.createScalarValue(i, "int32"); + for (let i2 = 0; i2 < numSegments; ++i2) { + const scalarValue = util_exports.createScalarValue(i2, "int32"); const segmentId = backend2.makeTensorInfo([], "int32", scalarValue); const mask = equal2({ inputs: { a: segmentId, b: $segmentIds }, backend: backend2 }); const maskCasted = cast3({ inputs: { x: mask }, backend: backend2, attrs: { dtype: "float32" } }); @@ -48577,7 +48223,7 @@ function unsortedSegmentSum2(args) { intermediates.push(sumTensorInfo); } const result = pack({ inputs: res, backend: backend2, attrs: { axis: 0 } }); - intermediates.forEach((t) => backend2.disposeIntermediateTensorInfo(t)); + intermediates.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2)); return result; } var unsortedSegmentSumConfig = { @@ -48586,7 +48232,7 @@ var unsortedSegmentSumConfig = { kernelFunc: unsortedSegmentSum2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-cpu/dist/register_all_kernels.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-cpu@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-cpu/dist/register_all_kernels.js var kernelConfigs = [ _fusedMatMulConfig, absConfig, @@ -48700,6 +48346,7 @@ var kernelConfigs = [ powConfig, preluConfig, prodConfig, + raggedGatherConfig, raggedTensorToTensorConfig, rangeConfig, realConfig, @@ -48759,7 +48406,7 @@ for (const kernelConfig of kernelConfigs) { registerKernel(kernelConfig); } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/webgl_util.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/webgl_util.js var webgl_util_exports = {}; __export(webgl_util_exports, { assertNotComplex: () => assertNotComplex2, @@ -48807,7 +48454,7 @@ __export(webgl_util_exports, { validateTextureSize: () => validateTextureSize }); -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/canvas_util.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/canvas_util.js var contexts = {}; var WEBGL_ATTRIBUTES = { alpha: false, @@ -48874,7 +48521,7 @@ function getWebGLRenderingContext(webGLVersion, customCanvas) { return canvas.getContext("webgl2", WEBGL_ATTRIBUTES); } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/tex_util.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/tex_util.js var PackingScheme; (function(PackingScheme2) { PackingScheme2[PackingScheme2["DENSE"] = 0] = "DENSE"; @@ -48965,7 +48612,7 @@ function getTextureConfig(gl, textureHalfFloatExtension) { }; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/webgl_util.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/webgl_util.js function callAndCheck(gl, func2) { const returnValue = func2(); if (env().getBool("DEBUG")) { @@ -49046,8 +48693,8 @@ function logShaderSourceAndInfoLog(shaderSource, shaderInfoLog) { const pad3 = shaderLines.length.toString().length + 2; const linesWithLineNumbers = shaderLines.map((line, lineNumber2) => util_exports.rightPad((lineNumber2 + 1).toString(), pad3) + line); let maxLineLength = 0; - for (let i = 0; i < linesWithLineNumbers.length; i++) { - maxLineLength = Math.max(linesWithLineNumbers[i].length, maxLineLength); + for (let i2 = 0; i2 < linesWithLineNumbers.length; i2++) { + maxLineLength = Math.max(linesWithLineNumbers[i2].length, maxLineLength); } const beforeErrorLines = linesWithLineNumbers.slice(0, lineNumber - 1); const errorLine = linesWithLineNumbers.slice(lineNumber - 1, lineNumber); @@ -49213,9 +48860,14 @@ function getShapeAs3D(shape) { } function getTextureShapeFromLogicalShape(logShape, isPacked = false) { let maxTexSize = env().getNumber("WEBGL_MAX_TEXTURE_SIZE"); + let maxSizeForNarrowTex = env().getNumber("WEBGL_MAX_SIZE_FOR_NARROW_TEXTURE"); + if (maxSizeForNarrowTex === Infinity && env().getBool("WEBGL_AUTO_SQUARIFY_NARROW_TEXTURE_SHAPE")) { + maxSizeForNarrowTex = maxTexSize / 2; + } if (isPacked) { maxTexSize = maxTexSize * 2; - logShape = logShape.map((d, i) => i >= logShape.length - 2 ? util_exports.nearestLargerEven(logShape[i]) : logShape[i]); + maxSizeForNarrowTex = maxSizeForNarrowTex * 2; + logShape = logShape.map((d, i2) => i2 >= logShape.length - 2 ? util_exports.nearestLargerEven(logShape[i2]) : logShape[i2]); if (logShape.length === 1) { logShape = [2, logShape[0]]; } @@ -49225,19 +48877,22 @@ function getTextureShapeFromLogicalShape(logShape, isPacked = false) { logShape = squeezeResult.newShape; } let size = util_exports.sizeFromShape(logShape); + let textureShape = null; if (logShape.length <= 1 && size <= maxTexSize) { - return [1, size]; + textureShape = [1, size]; } else if (logShape.length === 2 && logShape[0] <= maxTexSize && logShape[1] <= maxTexSize) { - return logShape; + textureShape = logShape; } else if (logShape.length === 3 && logShape[0] * logShape[1] <= maxTexSize && logShape[2] <= maxTexSize) { - return [logShape[0] * logShape[1], logShape[2]]; + textureShape = [logShape[0] * logShape[1], logShape[2]]; } else if (logShape.length === 3 && logShape[0] <= maxTexSize && logShape[1] * logShape[2] <= maxTexSize) { - return [logShape[0], logShape[1] * logShape[2]]; + textureShape = [logShape[0], logShape[1] * logShape[2]]; } else if (logShape.length === 4 && logShape[0] * logShape[1] * logShape[2] <= maxTexSize && logShape[3] <= maxTexSize) { - return [logShape[0] * logShape[1] * logShape[2], logShape[3]]; + textureShape = [logShape[0] * logShape[1] * logShape[2], logShape[3]]; } else if (logShape.length === 4 && logShape[0] <= maxTexSize && logShape[1] * logShape[2] * logShape[3] <= maxTexSize) { - return [logShape[0], logShape[1] * logShape[2] * logShape[3]]; - } else { + textureShape = [logShape[0], logShape[1] * logShape[2] * logShape[3]]; + } + const isLongNarrowTex = textureShape != null && Math.max(...textureShape) > maxSizeForNarrowTex && Math.min(...textureShape) <= (isPacked ? 2 : 1) && Math.min(...textureShape) > 0; + if (textureShape == null || isLongNarrowTex) { if (isPacked) { const batchDim = getBatchDim(logShape); let rows = 2, cols = 2; @@ -49245,13 +48900,15 @@ function getTextureShapeFromLogicalShape(logShape, isPacked = false) { [rows, cols] = getRowsCols(logShape); } size = batchDim * (rows / 2) * (cols / 2); - return util_exports.sizeToSquarishShape(size).map((d) => d * 2); + textureShape = util_exports.sizeToSquarishShape(size).map((d) => d * 2); + } else { + textureShape = util_exports.sizeToSquarishShape(size); } - return util_exports.sizeToSquarishShape(size); } + return textureShape; } -function isEven(n) { - return n % 2 === 0; +function isEven(n2) { + return n2 % 2 === 0; } function isReshapeFree(shape1, shape2) { shape1 = shape1.slice(-2); @@ -49324,8 +48981,8 @@ function isWebGLVersionEnabled(webGLVersion) { if (gl != null) { return true; } - } catch (e) { - console.log("Error when getting WebGL context: ", e); + } catch (e2) { + console.log("Error when getting WebGL context: ", e2); return false; } return false; @@ -49419,14 +49076,14 @@ function assertNotComplex2(tensor2, opName) { if (!Array.isArray(tensor2)) { tensor2 = [tensor2]; } - tensor2.forEach((t) => { - if (t != null) { - util_exports.assert(t.dtype !== "complex64", () => `${opName} does not support complex64 tensors in the WebGL backend.`); + tensor2.forEach((t2) => { + if (t2 != null) { + util_exports.assert(t2.dtype !== "complex64", () => `${opName} does not support complex64 tensors in the WebGL backend.`); } }); } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/flags_webgl.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/flags_webgl.js var ENV5 = env(); ENV5.registerFlag("HAS_WEBGL", () => ENV5.getNumber("WEBGL_VERSION") > 0); ENV5.registerFlag("WEBGL_VERSION", () => { @@ -49492,10 +49149,13 @@ ENV5.registerFlag("TOPK_LAST_DIM_CPU_HANDOFF_SIZE_THRESHOLD", () => 1e5); ENV5.registerFlag("TOPK_K_CPU_HANDOFF_THRESHOLD", () => 128); ENV5.registerFlag("WEBGL_EXP_CONV", () => false); ENV5.registerFlag("SOFTWARE_WEBGL_ENABLED", () => ENV5.getBool("IS_TEST")); +ENV5.registerFlag("WEBGL_MAX_SIZE_FOR_NARROW_TEXTURE", () => Infinity); +ENV5.registerFlag("WEBGL_AUTO_SQUARIFY_NARROW_TEXTURE_SHAPE", () => false); +ENV5.registerFlag("WEBGL2_ISNAN_CUSTOM", () => false); -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/glsl_version.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/glsl_version.js function getGlslDifferences() { - let version10; + let version9; let attribute; let varyingVs; let varyingFs; @@ -49506,14 +49166,14 @@ function getGlslDifferences() { let defineSpecialInf; let defineRound; if (env().getNumber("WEBGL_VERSION") === 2) { - version10 = "#version 300 es"; + version9 = "#version 300 es"; attribute = "in"; varyingVs = "out"; varyingFs = "in"; texture2D = "texture"; output = "outputColor"; defineOutput = "out vec4 outputColor;"; - defineSpecialNaN = ` + defineSpecialNaN = env().getBool("WEBGL2_ISNAN_CUSTOM") ? ` bool isnan_custom(float val) { uint floatToUint = floatBitsToUint(val); return (floatToUint & 0x7fffffffu) > 0x7f800000u; @@ -49525,7 +49185,7 @@ function getGlslDifferences() { } #define isnan(value) isnan_custom(value) - `; + ` : ""; defineSpecialInf = ``; defineRound = ` #define round(value) newRound(value) @@ -49538,7 +49198,7 @@ function getGlslDifferences() { } `; } else { - version10 = ""; + version9 = ""; attribute = "attribute"; varyingVs = "varying"; varyingFs = "varying"; @@ -49575,7 +49235,7 @@ function getGlslDifferences() { `; } return { - version: version10, + version: version9, attribute, varyingVs, varyingFs, @@ -49588,20 +49248,20 @@ function getGlslDifferences() { }; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/shader_compiler_util.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/shader_compiler_util.js function getLogicalCoordinatesFromFlatIndex(coords3, shape, index = "index") { const strides = util_exports.computeStrides(shape); - return strides.map((stride, i) => { - const line1 = `int ${coords3[i]} = ${index} / ${stride}`; - const line2 = i === strides.length - 1 ? `int ${coords3[i + 1]} = ${index} - ${coords3[i]} * ${stride}` : `index -= ${coords3[i]} * ${stride}`; + return strides.map((stride, i2) => { + const line1 = `int ${coords3[i2]} = ${index} / ${stride}`; + const line2 = i2 === strides.length - 1 ? `int ${coords3[i2 + 1]} = ${index} - ${coords3[i2]} * ${stride}` : `index -= ${coords3[i2]} * ${stride}`; return `${line1}; ${line2};`; }).join(""); } function getOutputLogicalCoordinatesFromFlatIndexByUniform(coords3, shape, index = "index") { const strides = util_exports.computeStrides(shape); - return strides.map((_, i) => { - const line1 = `int ${coords3[i]} = ${index} / outShapeStrides[${i}]`; - const line2 = i === strides.length - 1 ? `int ${coords3[i + 1]} = ${index} - ${coords3[i]} * outShapeStrides[${i}]` : `index -= ${coords3[i]} * outShapeStrides[${i}]`; + return strides.map((_, i2) => { + const line1 = `int ${coords3[i2]} = ${index} / outShapeStrides[${i2}]`; + const line2 = i2 === strides.length - 1 ? `int ${coords3[i2 + 1]} = ${index} - ${coords3[i2]} * outShapeStrides[${i2}]` : `index -= ${coords3[i2]} * outShapeStrides[${i2}]`; return `${line1}; ${line2};`; }).join(""); } @@ -49610,17 +49270,17 @@ function symbolicallyComputeStrides(indicesArr, variableName) { const shape = indicesArr.map((d) => `${variableName}[${d}]`); const strides = new Array(numCoords - 1); strides[numCoords - 2] = shape[numCoords - 1]; - for (let i = numCoords - 3; i >= 0; --i) { - strides[i] = `(${strides[i + 1]} * ${shape[i + 1]})`; + for (let i2 = numCoords - 3; i2 >= 0; --i2) { + strides[i2] = `(${strides[i2 + 1]} * ${shape[i2 + 1]})`; } return strides; } function getLogicalCoordinatesFromFlatIndexByUniform(coords3, variableName, index = "index") { - const indicesArray = coords3.map((_, i) => i); + const indicesArray = coords3.map((_, i2) => i2); const strides = symbolicallyComputeStrides(indicesArray, variableName); - return strides.map((_, i) => { - const line1 = `int ${coords3[i]} = ${index} / ${strides[i]}`; - const line2 = i === strides.length - 1 ? `int ${coords3[i + 1]} = ${index} - ${coords3[i]} * ${strides[i]}` : `index -= ${coords3[i]} * ${strides[i]}`; + return strides.map((_, i2) => { + const line1 = `int ${coords3[i2]} = ${index} / ${strides[i2]}`; + const line2 = i2 === strides.length - 1 ? `int ${coords3[i2 + 1]} = ${index} - ${coords3[i2]} * ${strides[i2]}` : `index -= ${coords3[i2]} * ${strides[i2]}`; return `${line1}; ${line2};`; }).join(""); } @@ -49680,7 +49340,7 @@ var ENCODE_FLOAT_SNIPPET = ` } `; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/shader_compiler.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/shader_compiler.js var { getBroadcastDims: getBroadcastDims2 } = backend_util_exports; function makeShader(inputsInfo, outputShape, program) { const prefixSnippets = []; @@ -50793,7 +50453,7 @@ function getSampler3D(inputInfo, enableShapeUniforms) { // Explicitly use integer operations as dot() only works on floats. int stride0 = ${texName}Shape[1] * ${texName}Shape[2]; int stride1 = ${texName}Shape[2]; - int index = row * ${stride0} + col * ${stride1} + depth + ${offset}; + int index = row * stride0 + col * stride1 + depth + ${offset}; vec2 uv = uvFromFlat(${texName}TexShape[0], ${texName}TexShape[1], index); return sampleTexture(${texName}, uv); } @@ -51151,7 +50811,7 @@ function getPackedSamplerAtOutputCoords(inputInfo, outShapeInfo) { if (outRank < 2 && inRank > 0) { unpackedCoordsSnippet = "coords"; } else { - unpackedCoordsSnippet = inputInfo.shapeInfo.logicalShape.map((s, i) => `coords.${fields[i + rankDiff]}`).join(", "); + unpackedCoordsSnippet = inputInfo.shapeInfo.logicalShape.map((s2, i2) => `coords.${fields[i2 + rankDiff]}`).join(", "); } let output = `return outputValue;`; const inSize = util_exports.sizeFromShape(inputInfo.shapeInfo.logicalShape); @@ -51223,7 +50883,7 @@ function getSamplerAtOutputCoords(inputInfo, outShapeInfo) { if (outRank < 2 && inRank > 0) { unpackedCoordsSnippet = "coords"; } else { - unpackedCoordsSnippet = inputInfo.shapeInfo.logicalShape.map((s, i) => `coords.${fields[i + rankDiff]}`).join(", "); + unpackedCoordsSnippet = inputInfo.shapeInfo.logicalShape.map((s2, i2) => `coords.${fields[i2 + rankDiff]}`).join(", "); } return ` float ${funcName}() { @@ -51268,9 +50928,9 @@ function getSqueezedParams(params, keptDims) { return keptDims.map((d) => params[d]).join(", "); } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/gpgpu_math.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/gpgpu_math.js function compileProgram(gpgpu, program, inputs, output) { - const inputInfos = inputs.map((input2, i) => { + const inputInfos = inputs.map((input2, i2) => { const shapeInfo = { logicalShape: input2.shape, texShape: input2.isUniform ? null : input2.texData.texShape, @@ -51281,7 +50941,7 @@ function compileProgram(gpgpu, program, inputs, output) { if (input2.texData != null && input2.texData.slice != null && input2.texData.slice.flatOffset > 0) { shapeInfo.flatOffset = input2.texData.slice.flatOffset; } - return { name: program.variableNames[i], shapeInfo }; + return { name: program.variableNames[i2], shapeInfo }; }); const inShapeInfos = inputInfos.map((x) => x.shapeInfo); const outShapeInfo = { @@ -51338,8 +50998,8 @@ function getUniformLocations(gpgpu, program, webGLProgram) { infLoc = gpgpu.getUniformLocation(webGLProgram, "INFINITY", false); } const shouldThrow = false; - for (let i = 0; i < program.variableNames.length; i++) { - const varName = program.variableNames[i]; + for (let i2 = 0; i2 < program.variableNames.length; i2++) { + const varName = program.variableNames[i2]; uniformLocations[varName] = gpgpu.getUniformLocation(webGLProgram, varName, shouldThrow); uniformLocations[`offset${varName}`] = gpgpu.getUniformLocation(webGLProgram, `offset${varName}`, shouldThrow); if (program.enableShapeUniforms) { @@ -51353,8 +51013,8 @@ function getUniformLocations(gpgpu, program, webGLProgram) { outTexShapeLocation = gpgpu.getUniformLocation(webGLProgram, "outTexShape", shouldThrow); } if (program.customUniforms) { - program.customUniforms.forEach((d, i) => { - customUniformLocations[i] = gpgpu.getUniformLocation(webGLProgram, d.name, shouldThrow); + program.customUniforms.forEach((d, i2) => { + customUniformLocations[i2] = gpgpu.getUniformLocation(webGLProgram, d.name, shouldThrow); }); } return { @@ -51373,17 +51033,17 @@ function validateBinaryAndProgram(shapeInfos, inputs) { if (shapeInfos.length !== inputs.length) { throw Error(`Binary was compiled with ${shapeInfos.length} inputs, but was executed with ${inputs.length} inputs`); } - shapeInfos.forEach((s, i) => { - const shapeA = s.logicalShape; - const input2 = inputs[i]; + shapeInfos.forEach((s2, i2) => { + const shapeA = s2.logicalShape; + const input2 = inputs[i2]; const shapeB = input2.shape; if (!util_exports.arraysEqual(shapeA, shapeB)) { throw Error(`Binary was compiled with different shapes than the current args. Shapes ${shapeA} and ${shapeB} must match`); } - if (s.isUniform && input2.isUniform) { + if (s2.isUniform && input2.isUniform) { return; } - const texShapeA = s.texShape; + const texShapeA = s2.texShape; const texShapeB = input2.isUniform ? null : input2.texData.texShape; if (!util_exports.arraysEqual(texShapeA, texShapeB)) { throw Error(`Binary was compiled with different texture shapes than the current args. Shape ${texShapeA} and ${texShapeB} must match`); @@ -51411,8 +51071,8 @@ function runProgram(gpgpu, binary, inputs, output, customUniformValues) { if (binary.nanLoc !== null) { gpgpu.gl.uniform1f(binary.nanLoc, NaN); } - inputs.forEach((input2, i) => { - const varName = binary.program.variableNames[i]; + inputs.forEach((input2, i2) => { + const varName = binary.program.variableNames[i2]; const varLoc = binary.uniformLocations[varName]; const varOffsetLoc = binary.uniformLocations[`offset${varName}`]; const varShapeLoc = binary.inShapesLocations[`${varName}Shape`]; @@ -51457,7 +51117,7 @@ function runProgram(gpgpu, binary, inputs, output, customUniformValues) { if (input2.texData.slice != null && varOffsetLoc != null) { gpgpu.gl.uniform1i(varOffsetLoc, input2.texData.slice.flatOffset); } - gpgpu.setInputMatrixTexture(input2.texData.texture.texture, varLoc, i); + gpgpu.setInputMatrixTexture(input2.texData.texture.texture, varLoc, i2); }); const outShapeLoc = binary.outShapeLocation; if (outShapeLoc) { @@ -51498,9 +51158,9 @@ function runProgram(gpgpu, binary, inputs, output, customUniformValues) { gpgpu.gl.uniform2i(binary.outTexShapeLocation, output.texData.texShape[0], output.texData.texShape[1]); } if (binary.program.customUniforms && customUniformValues) { - binary.program.customUniforms.forEach((d, i) => { - const customLoc = binary.customUniformLocations[i]; - const customValue = customUniformValues[i]; + binary.program.customUniforms.forEach((d, i2) => { + const customLoc = binary.customUniformLocations[i2]; + const customValue = customUniformValues[i2]; if (d.type === "float") { gpgpu.gl.uniform1fv(customLoc, customValue); } else if (d.type === "vec2") { @@ -51562,7 +51222,7 @@ function useShapeUniforms(rank) { return env().getBool("WEBGL_USE_SHAPES_UNIFORMS") && rank <= 4; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/decode_matrix_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/decode_matrix_gpu.js var DecodeMatrixProgram = class { constructor(outputShape) { this.variableNames = ["A"]; @@ -51597,7 +51257,7 @@ var DecodeMatrixProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/decode_matrix_packed_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/decode_matrix_packed_gpu.js var DecodeMatrixPackedProgram = class { constructor(outputShape) { this.variableNames = ["A"]; @@ -51632,7 +51292,7 @@ var DecodeMatrixPackedProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/encode_float_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/encode_float_gpu.js var EncodeFloatProgram = class { constructor(outputShape) { this.variableNames = ["A"]; @@ -51650,7 +51310,7 @@ var EncodeFloatProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/encode_float_packed_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/encode_float_packed_gpu.js var EncodeFloatPackedProgram = class { constructor(outputShape) { this.variableNames = ["A"]; @@ -51671,7 +51331,7 @@ var EncodeFloatPackedProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/encode_matrix_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/encode_matrix_gpu.js var EncodeMatrixProgram = class { constructor(outputShape, inputIsUnsignedByte = false) { this.variableNames = ["A"]; @@ -51717,7 +51377,7 @@ var EncodeMatrixProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/encode_matrix_packed_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/encode_matrix_packed_gpu.js var EncodeMatrixPackedProgram = class { constructor(outputShape, inputIsUnsignedByte = false) { this.variableNames = ["A"]; @@ -51786,7 +51446,7 @@ var EncodeMatrixPackedProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/gpgpu_util.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/gpgpu_util.js var gpgpu_util_exports = {}; __export(gpgpu_util_exports, { bindVertexProgramAttributeStreams: () => bindVertexProgramAttributeStreams, @@ -51970,7 +51630,7 @@ function downloadMatrixFromPackedOutputTexture(gl, physicalRows, physicalCols) { return packedRGBA; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/gpgpu_context.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/gpgpu_context.js var GPGPUContext = class { constructor(gl) { this.outputTexture = null; @@ -52290,8 +51950,8 @@ var GPGPUContext = class { } pollItems() { const index = linearSearchLastTrue(this.itemsToPoll.map((x) => x.isDoneFn)); - for (let i = 0; i <= index; ++i) { - const { resolveFn } = this.itemsToPoll[i]; + for (let i2 = 0; i2 <= index; ++i2) { + const { resolveFn } = this.itemsToPoll[i2]; resolveFn(); } this.itemsToPoll = this.itemsToPoll.slice(index + 1); @@ -52301,10 +51961,14 @@ var GPGPUContext = class { if (this.itemsToPoll.length > 1) { return; } + let scheduleFn = void 0; + if ("setTimeoutCustom" in env().platform) { + scheduleFn = env().platform.setTimeoutCustom.bind(env().platform); + } util_exports.repeatedTry(() => { this.pollItems(); return this.itemsToPoll.length === 0; - }); + }, () => 0, null, scheduleFn); } bindTextureToFrameBuffer(texture) { this.throwIfDisposed(); @@ -52356,20 +52020,20 @@ var GPGPUContext = class { } }; function linearSearchLastTrue(arr) { - let i = 0; - for (; i < arr.length; ++i) { - const isDone = arr[i](); + let i2 = 0; + for (; i2 < arr.length; ++i2) { + const isDone = arr[i2](); if (!isDone) { break; } } - return i - 1; + return i2 - 1; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernel_utils/shared.js -var { addImpl: addImplCPU, bincountImpl: bincountImplCPU, bincountReduceImpl: bincountReduceImplCPU, castImpl: castImplCPU, ceilImpl: ceilImplCPU, concatImpl: concatImplCPU, equalImpl: equalImplCPU, expImpl: expImplCPU, expm1Impl: expm1ImplCPU, floorImpl: floorImplCPU, gatherNdImpl: gatherNdImplCPU, gatherV2Impl: gatherV2ImplCPU, greaterImpl: greaterImplCPU, greaterEqualImpl: greaterEqualImplCPU, lessImpl: lessImplCPU, lessEqualImpl: lessEqualImplCPU, linSpaceImpl: linSpaceImplCPU, logImpl: logImplCPU, maxImpl: maxImplCPU, maximumImpl: maximumImplCPU, minimumImpl: minimumImplCPU, multiplyImpl: multiplyImplCPU, negImpl: negImplCPU, notEqualImpl: notEqualImplCPU, prodImpl: prodImplCPU, raggedTensorToTensorImpl: raggedTensorToTensorImplCPU, rangeImpl: rangeImplCPU, rsqrtImpl: rsqrtImplCPU, scatterImpl: scatterImplCPU, sigmoidImpl: sigmoidImplCPU, simpleAbsImpl: simpleAbsImplCPU, sliceImpl: sliceImplCPU, sparseFillEmptyRowsImpl: sparseFillEmptyRowsImplCPU, sparseReshapeImpl: sparseReshapeImplCPU, sparseSegmentReductionImpl: sparseSegmentReductionImplCPU, sqrtImpl: sqrtImplCPU, stridedSliceImpl: stridedSliceImplCPU, stringNGramsImpl: stringNGramsImplCPU, stringSplitImpl: stringSplitImplCPU, stringToHashBucketFastImpl: stringToHashBucketFastImplCPU, subImpl: subImplCPU, tileImpl: tileImplCPU, topKImpl: topKImplCPU, transposeImpl: transposeImplCPU, uniqueImpl: uniqueImplCPU } = shared_exports; +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernel_utils/shared.js +var { addImpl: addImplCPU, bincountImpl: bincountImplCPU, bincountReduceImpl: bincountReduceImplCPU, castImpl: castImplCPU, ceilImpl: ceilImplCPU, concatImpl: concatImplCPU, equalImpl: equalImplCPU, expImpl: expImplCPU, expm1Impl: expm1ImplCPU, floorImpl: floorImplCPU, gatherNdImpl: gatherNdImplCPU, gatherV2Impl: gatherV2ImplCPU, greaterImpl: greaterImplCPU, greaterEqualImpl: greaterEqualImplCPU, lessImpl: lessImplCPU, lessEqualImpl: lessEqualImplCPU, linSpaceImpl: linSpaceImplCPU, logImpl: logImplCPU, maxImpl: maxImplCPU, maximumImpl: maximumImplCPU, minimumImpl: minimumImplCPU, multiplyImpl: multiplyImplCPU, negImpl: negImplCPU, notEqualImpl: notEqualImplCPU, prodImpl: prodImplCPU, raggedGatherImpl: raggedGatherImplCPU, raggedTensorToTensorImpl: raggedTensorToTensorImplCPU, rangeImpl: rangeImplCPU, rsqrtImpl: rsqrtImplCPU, scatterImpl: scatterImplCPU, sigmoidImpl: sigmoidImplCPU, simpleAbsImpl: simpleAbsImplCPU, sliceImpl: sliceImplCPU, sparseFillEmptyRowsImpl: sparseFillEmptyRowsImplCPU, sparseReshapeImpl: sparseReshapeImplCPU, sparseSegmentReductionImpl: sparseSegmentReductionImplCPU, sqrtImpl: sqrtImplCPU, stridedSliceImpl: stridedSliceImplCPU, stringNGramsImpl: stringNGramsImplCPU, stringSplitImpl: stringSplitImplCPU, stringToHashBucketFastImpl: stringToHashBucketFastImplCPU, subImpl: subImplCPU, tileImpl: tileImplCPU, topKImpl: topKImplCPU, transposeImpl: transposeImplCPU, uniqueImpl: uniqueImplCPU } = shared_exports; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/packing_util.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/packing_util.js function getVecChannels(name, rank) { return ["x", "y", "z", "w", "u", "v"].slice(0, rank).map((d) => `${name}.${d}`); } @@ -52384,16 +52048,16 @@ function getSourceCoords(rank, dims) { return "rc"; } let coords3 = ""; - for (let i = 0; i < rank; i++) { - coords3 += dims[i]; - if (i < rank - 1) { + for (let i2 = 0; i2 < rank; i2++) { + coords3 += dims[i2]; + if (i2 < rank - 1) { coords3 += ","; } } return coords3; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/pack_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/pack_gpu.js var PackProgram = class { constructor(outputShape) { this.variableNames = ["A"]; @@ -52447,9 +52111,9 @@ var PackProgram = class { return `rc > ${this.enableShapeUniforms ? "outShape" : this.outputShape[0]}`; } let cond = ""; - for (let i = this.rank - 2; i < this.rank; i++) { - cond += `${dims[i]} >= ${this.enableShapeUniforms ? `outShape[${i}]` : this.outputShape[i]}`; - if (i < this.rank - 1) { + for (let i2 = this.rank - 2; i2 < this.rank; i2++) { + cond += `${dims[i2]} >= ${this.enableShapeUniforms ? `outShape[${i2}]` : this.outputShape[i2]}`; + if (i2 < this.rank - 1) { cond += "||"; } } @@ -52485,7 +52149,7 @@ var PackProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/reshape_packed_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/reshape_packed_gpu.js var ReshapePackedProgram = class { constructor(outputShape, inputShape) { this.variableNames = ["A"]; @@ -52495,25 +52159,25 @@ var ReshapePackedProgram = class { this.outputShape = outputShape; this.enableShapeUniforms = useShapeUniforms(this.outputShape.length); let mainLoop = ``; - for (let i = 0; i < 4; i++) { + for (let i2 = 0; i2 < 4; i2++) { let thisRC = `thisRC = rc;`; - if (i % 2 === 1) { + if (i2 % 2 === 1) { thisRC += `thisRC.z += 1;`; } - if (i > 1) { + if (i2 > 1) { thisRC += `thisRC.y += 1;`; } mainLoop += ` ${thisRC} - ${i > 0 ? `if(thisRC.y < rows && thisRC.z < cols){` : ""} + ${i2 > 0 ? `if(thisRC.y < rows && thisRC.z < cols){` : ""} int flatIndex = getFlatIndex(thisRC); ivec3 inputRC = inputCoordsFromReshapedOutCoords(flatIndex); vec2 inputRCInnerDims = vec2(float(inputRC.y),float(inputRC.z)); - result[${i}] = + result[${i2}] = getChannel(getA(inputRC.x, inputRC.y, inputRC.z), inputRCInnerDims); - ${i > 0 ? "}" : ""} + ${i2 > 0 ? "}" : ""} `; } this.userCode = ` @@ -52546,7 +52210,7 @@ function getReshapedInputCoords(shape, enableShapeUniforms) { `; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/texture_manager.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/texture_manager.js var TextureManager = class { constructor(gpgpu) { this.gpgpu = gpgpu; @@ -52739,7 +52403,7 @@ function getKeyFromTextureShape(shapeRowsCol, physicalTexType, isPacked) { return `${shapeRowsCol[0]}_${shapeRowsCol[1]}_${physicalTexType}_${isPacked}`; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/unaryop_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/unaryop_gpu.js var UnaryOpProgram = class { constructor(aShape, opSnippet) { this.variableNames = ["A"]; @@ -52772,7 +52436,7 @@ var RELU6 = CHECK_NAN_SNIPPET + ` var CLONE = "return x;"; var SIGMOID = `return 1.0 / (1.0 + exp(-1.0 * x));`; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/unaryop_packed_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/unaryop_packed_gpu.js var LINEAR2 = `return x;`; var ELU3 = ` vec4 result; @@ -52829,7 +52493,7 @@ var UnaryOpPackedProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/unpack_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/unpack_gpu.js var UnpackProgram = class { constructor(outputShape) { this.variableNames = ["A"]; @@ -52854,7 +52518,7 @@ var UnpackProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/backend_webgl.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/backend_webgl.js var whereImpl3 = kernel_impls_exports.whereImpl; var EPSILON_FLOAT322 = 1e-7; var EPSILON_FLOAT162 = 1e-4; @@ -53100,24 +52764,24 @@ var MathBackendWebGL = class extends KernelBackend { const tmpData = this.texData.get(tmpTarget.dataId); return Object.assign({ tensorRef }, tmpData.texture); } - bufferSync(t) { - const data = this.readSync(t.dataId); - if (t.dtype === "string") { + bufferSync(t2) { + const data = this.readSync(t2.dataId); + if (t2.dtype === "string") { try { const strings = data.map((d) => util_exports.decodeString(d)); - return buffer(t.shape, t.dtype, strings); + return buffer(t2.shape, t2.dtype, strings); } catch (_a) { throw new Error("Failed to decode encoded string bytes into utf-8"); } } - return buffer(t.shape, t.dtype, data); + return buffer(t2.shape, t2.dtype, data); } checkNumericalProblems(values) { if (values == null) { return; } - for (let i = 0; i < values.length; i++) { - const num = values[i]; + for (let i2 = 0; i2 < values.length; i2++) { + const num = values[i2]; if (!canBeRepresented(num)) { if (env().getBool("WEBGL_RENDER_FLOAT32_CAPABLE")) { throw Error(`The value ${num} cannot be represented with your current settings. Consider enabling float32 rendering: 'tf.env().set('WEBGL_RENDER_FLOAT32_ENABLED', true);'`); @@ -53176,7 +52840,7 @@ var MathBackendWebGL = class extends KernelBackend { if (env().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE") > 0) { const kernelMs = await Promise.all(flattenedActiveTimerQueries); res["kernelMs"] = util_exports.sum(kernelMs); - res["getExtraProfileInfo"] = () => kernelMs.map((d, i) => ({ name: flattenedActiveTimerNames[i], ms: d })).map((d) => `${d.name}: ${d.ms}`).join(", "); + res["getExtraProfileInfo"] = () => kernelMs.map((d, i2) => ({ name: flattenedActiveTimerNames[i2], ms: d })).map((d) => `${d.name}: ${d.ms}`).join(", "); } else { res["kernelMs"] = { error: "WebGL query timers are not supported in this environment." @@ -53656,8 +53320,8 @@ function float32ToTypedArray(a, dtype) { return a; } else if (dtype === "int32" || dtype === "bool") { const result = dtype === "int32" ? new Int32Array(a.length) : new Uint8Array(a.length); - for (let i = 0; i < result.length; ++i) { - result[i] = Math.round(a[i]); + for (let i2 = 0; i2 < result.length; ++i2) { + result[i2] = Math.round(a[i2]); } return result; } else { @@ -53665,21 +53329,21 @@ function float32ToTypedArray(a, dtype) { } } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/version.js -var version6 = "3.20.0"; +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/version.js +var version6 = "3.21.0"; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/webgl.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/webgl.js function forceHalfFloat() { env().set("WEBGL_FORCE_F16_TEXTURES", true); } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/base.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/base.js if (device_util_exports.isBrowser()) { registerBackend("webgl", () => new MathBackendWebGL(), 2); } var webgl = { forceHalfFloat }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/binaryop_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/binaryop_gpu.js var CHECK_NAN_SNIPPET2 = ` if (isnan(a)) return a; if (isnan(b)) return b; @@ -53703,12 +53367,12 @@ var BinaryOpProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/binaryop_packed_gpu.js -var CHECK_NAN_SNIPPET3 = ` - result.r = isNaN.r > 0. ? NAN : result.r; - result.g = isNaN.g > 0. ? NAN : result.g; - result.b = isNaN.b > 0. ? NAN : result.b; - result.a = isNaN.a > 0. ? NAN : result.a; +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/binaryop_packed_gpu.js +var CHECK_NAN_SNIPPET_PACKED = ` + result.r = isNaN.r ? NAN : result.r; + result.g = isNaN.g ? NAN : result.g; + result.b = isNaN.b ? NAN : result.b; + result.a = isNaN.a ? NAN : result.a; `; var BinaryOpPackedProgram = class { constructor(op2, aShape, bShape, checkOutOfBounds = false) { @@ -53790,7 +53454,7 @@ var BinaryOpPackedProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Identity.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Identity.js function identity3(args) { const { inputs, backend: backend2 } = args; const { x } = inputs; @@ -53803,7 +53467,7 @@ var identityConfig2 = { kernelFunc: identity3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Complex.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Complex.js function complex3(args) { const { inputs, backend: backend2 } = args; const { real: real5, imag: imag5 } = inputs; @@ -53820,7 +53484,7 @@ var complexConfig2 = { kernelFunc: complex3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/LeakyRelu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/LeakyRelu.js var LEAKYRELU = `return (a < 0.) ? b * a : a;`; var LEAKYRELU_PACKED = ` vec4 aLessThanZero = vec4(lessThan(a, vec4(0.))); @@ -53842,7 +53506,7 @@ var leakyReluConfig2 = { kernelFunc: leakyRelu3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Prelu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Prelu.js var PRELU = `return (a < 0.) ? b * a : a;`; var PRELU_PACKED = ` vec4 aLessThanZero = vec4(lessThan(a, vec4(0.))); @@ -53860,18 +53524,8 @@ var preluConfig2 = { kernelFunc: prelu4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernel_utils/kernel_funcs_utils.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernel_utils/kernel_funcs_utils.js var CHECK_NAN_SNIPPET_UNARY = `if (isnan(x)) return x;`; -var CHECK_NAN_SNIPPET_BINARY = ` - if (isnan(a)) return a; - if (isnan(b)) return b; -`; -var CHECK_NAN_SNIPPET_BINARY_PACKED = ` - result.r = isNaN.r > 0. ? NAN : result.r; - result.g = isNaN.g > 0. ? NAN : result.g; - result.b = isNaN.b > 0. ? NAN : result.b; - result.a = isNaN.a > 0. ? NAN : result.a; -`; function unaryKernelFunc2({ opSnippet, packedOpSnippet, cpuKernelImpl, dtype }) { return ({ inputs, backend: backend2 }) => { const { x } = inputs; @@ -53984,7 +53638,7 @@ function mapActivationToShaderProgram(activation2, packed = false) { throw new Error(`Activation ${activation2} has not been implemented for the WebGL backend.`); } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/mulmat_packed_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/mulmat_packed_gpu.js var MatMulPackedProgram = class { constructor(aShape, bShape, outputShape, transposeA = false, transposeB = false, addBias = false, activation2 = null, hasPreluActivation = false, hasLeakyreluActivation = false) { this.variableNames = ["matrixA", "matrixB"]; @@ -54069,7 +53723,7 @@ var MatMulPackedProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/binaryop_complex_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/binaryop_complex_gpu.js var COMPLEX_MULTIPLY = { REAL: "return areal * breal - aimag * bimag;", IMAG: "return areal * bimag + aimag * breal;" @@ -54095,7 +53749,7 @@ var BinaryOpComplexProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Multiply.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Multiply.js var MUL = "return a * b;"; function multiply3(args) { const { inputs, backend: backend2 } = args; @@ -54158,7 +53812,7 @@ var multiplyConfig2 = { kernelFunc: multiply3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernel_utils/reshape.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernel_utils/reshape.js function packedReshape(input2, afterShape, backend2) { const input3DShape = [ getBatchDim(input2.shape), @@ -54180,7 +53834,7 @@ function packedReshape(input2, afterShape, backend2) { return { dataId: output.dataId, shape: afterShape, dtype: output.dtype }; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Reshape.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Reshape.js function reshape4(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -54203,7 +53857,7 @@ var reshapeConfig2 = { kernelFunc: reshape4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/mean_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/mean_gpu.js var MeanProgram = class { constructor(reduceInfo, divisor) { this.variableNames = ["x"]; @@ -54277,7 +53931,7 @@ var MeanProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/reduce_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/reduce_gpu.js var ReduceProgram = class { constructor(reduceInfo, reduceType) { this.variableNames = ["x"]; @@ -54417,7 +54071,7 @@ var ReduceProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernel_utils/reduce.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernel_utils/reduce.js function getReductionStages(inShape) { const stages = []; while (stages.length === 0 || stages[stages.length - 1].outSize !== 1) { @@ -54434,12 +54088,12 @@ function getReductionStages(inShape) { function reduce(x, dtype, reductionType, backend2) { const reductionStages = getReductionStages(x.shape); let result = x; - for (let i = 0; i < reductionStages.length; i++) { - const { inSize, windowSize, outSize } = reductionStages[i]; + for (let i2 = 0; i2 < reductionStages.length; i2++) { + const { inSize, windowSize, outSize } = reductionStages[i2]; let program; let previousResult; if (reductionType === "mean") { - program = i === 0 ? new MeanProgram({ windowSize, inSize, batchSize: x.shape[0], outSize }, inSize) : new MeanProgram({ windowSize, inSize, batchSize: x.shape[0], outSize }); + program = i2 === 0 ? new MeanProgram({ windowSize, inSize, batchSize: x.shape[0], outSize }, inSize) : new MeanProgram({ windowSize, inSize, batchSize: x.shape[0], outSize }); } else { program = new ReduceProgram({ windowSize, inSize, batchSize: x.shape[0], outSize }, reductionType); } @@ -54452,13 +54106,13 @@ function reduce(x, dtype, reductionType, backend2) { return result; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/transpose_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/transpose_gpu.js var TransposeProgram = class { constructor(aShape, newDim) { this.variableNames = ["A"]; const outputShape = new Array(aShape.length); - for (let i = 0; i < outputShape.length; i++) { - outputShape[i] = aShape[newDim[i]]; + for (let i2 = 0; i2 < outputShape.length; i2++) { + outputShape[i2] = aShape[newDim[i2]]; } this.outputShape = outputShape; this.rank = outputShape.length; @@ -54479,21 +54133,21 @@ function getSwitchedCoords(newDim) { } const originalOrder = ["resRC.x", "resRC.y", "resRC.z", "resRC.w", "resRC.u", "resRC.v"]; const switchedCoords = new Array(rank); - for (let i = 0; i < newDim.length; i++) { - switchedCoords[newDim[i]] = originalOrder[i]; + for (let i2 = 0; i2 < newDim.length; i2++) { + switchedCoords[newDim[i2]] = originalOrder[i2]; } return switchedCoords.join(); } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/transpose_packed_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/transpose_packed_gpu.js var TransposePackedProgram = class { constructor(aShape, newDim) { this.variableNames = ["A"]; this.packedInputs = true; this.packedOutput = true; const outputShape = new Array(aShape.length); - for (let i = 0; i < outputShape.length; i++) { - outputShape[i] = aShape[newDim[i]]; + for (let i2 = 0; i2 < outputShape.length; i2++) { + outputShape[i2] = aShape[newDim[i2]]; } this.outputShape = outputShape; this.rank = outputShape.length; @@ -54503,8 +54157,8 @@ var TransposePackedProgram = class { const dtype = getCoordsDataType(this.rank); const outputOrder = getVecChannels("rc", this.rank); const switchedOrder = new Array(this.rank); - for (let i = 0; i < newDim.length; i++) { - switchedOrder[newDim[i]] = outputOrder[i]; + for (let i2 = 0; i2 < newDim.length; i2++) { + switchedOrder[newDim[i2]] = outputOrder[i2]; } const innerDims = `vec2(${switchedOrder.slice(-2).join()})`; const nextColumn = `++${outputOrder[this.rank - 1]} < ${outputShape[this.rank - 1]}`; @@ -54530,13 +54184,13 @@ var TransposePackedProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Transpose_impl.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Transpose_impl.js function transposeImpl2(x, perm, backend2) { const program = env().getBool("WEBGL_PACK_ARRAY_OPERATIONS") ? new TransposePackedProgram(x.shape, perm) : new TransposeProgram(x.shape, perm); return backend2.runWebGLProgram(program, [x], x.dtype); } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Sum_impl.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Sum_impl.js function sumImpl(x, axis, keepDims, backend2) { const reductionIndices = axis; const xRank = x.shape.length; @@ -54570,7 +54224,7 @@ function sumImpl(x, axis, keepDims, backend2) { return out; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Sum.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Sum.js function sum4(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -54583,7 +54237,7 @@ var sumConfig2 = { kernelFunc: sum4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Transpose.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Transpose.js function transpose3(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -54591,8 +54245,8 @@ function transpose3(args) { const webglBackend = backend2; const xRank = x.shape.length; const newShape = new Array(xRank); - for (let i = 0; i < newShape.length; i++) { - newShape[i] = x.shape[perm[i]]; + for (let i2 = 0; i2 < newShape.length; i2++) { + newShape[i2] = x.shape[perm[i2]]; } let out; if (webglBackend.shouldExecuteOnCPU([x])) { @@ -54613,7 +54267,7 @@ var transposeConfig2 = { kernelFunc: transpose3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/BatchMatMul_impl.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/BatchMatMul_impl.js var MATMUL_SHARED_DIM_THRESHOLD = 1e3; function batchMatMulImpl({ a, b, transposeA, transposeB, backend: backend2, bias = null, preluActivationWeights = null, leakyreluAlpha = 0, activation: activation2 = null }) { const aRank = a.shape.length; @@ -54696,13 +54350,13 @@ function batchMatMulImpl({ a, b, transposeA, transposeB, backend: backend2, bias } const outReshaped = reshape4({ inputs: { x: out }, backend: backend2, attrs: { shape: outShape } }); intermediates.push(out); - for (const i of intermediates) { - backend2.disposeIntermediateTensorInfo(i); + for (const i2 of intermediates) { + backend2.disposeIntermediateTensorInfo(i2); } return outReshaped; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/_FusedMatMul.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/_FusedMatMul.js function _fusedMatMul2(args) { const { inputs, backend: backend2, attrs } = args; const { a, b, bias, preluActivationWeights } = inputs; @@ -54725,7 +54379,7 @@ var _fusedMatMulConfig2 = { kernelFunc: _fusedMatMul2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Abs.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Abs.js var ABS2 = `return abs(x);`; function abs3(args) { const { inputs, backend: backend2 } = args; @@ -54749,7 +54403,7 @@ var absConfig2 = { kernelFunc: abs3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Acos.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Acos.js var ACOS = CHECK_NAN_SNIPPET + ` if (abs(x) > 1.) { return NAN; @@ -54763,7 +54417,7 @@ var acosConfig2 = { kernelFunc: acos3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Acosh.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Acosh.js var ACOSH = CHECK_NAN_SNIPPET + ` if (x < 1.0) return NAN; return log(x + sqrt(x * x - 1.0));`; @@ -54774,7 +54428,7 @@ var acoshConfig2 = { kernelFunc: acosh3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Add.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Add.js var ADD = "return a + b;"; var addKernelFunc = binaryKernelFunc2({ opSnippet: ADD, @@ -54788,12 +54442,12 @@ var addConfig2 = { kernelFunc: addKernelFunc }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/addn_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/addn_gpu.js var AddNProgram = class { constructor(outputShape, shapes) { this.outputShape = []; this.outputShape = outputShape; - this.variableNames = shapes.map((_, i) => `T${i}`); + this.variableNames = shapes.map((_, i2) => `T${i2}`); const snippets = []; this.variableNames.forEach((variable2) => { snippets.push(`float v${variable2} = get${variable2}AtOutCoords();`); @@ -54812,14 +54466,14 @@ var AddNProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/addn_packed_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/addn_packed_gpu.js var AddNPackedProgram = class { constructor(outputShape, shapes) { this.outputShape = []; this.packedInputs = true; this.packedOutput = true; this.outputShape = outputShape; - this.variableNames = shapes.map((_, i) => `T${i}`); + this.variableNames = shapes.map((_, i2) => `T${i2}`); const snippets = []; this.variableNames.forEach((variable2) => { snippets.push(`vec4 v${variable2} = get${variable2}AtOutCoords();`); @@ -54838,7 +54492,7 @@ var AddNPackedProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/AddN.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/AddN.js function addN3(args) { const { inputs, backend: backend2 } = args; const tensors = inputs; @@ -54851,8 +54505,8 @@ function addN3(args) { const rightSide = addN3({ inputs: tensors.slice(midIndex), backend: backend2 }); return addN3({ inputs: [leftSide, rightSide], backend: backend2 }); } - const dtype = tensors.map((t) => t.dtype).reduce((d1, d2) => upcastType(d1, d2)); - const shapes = tensors.map((t) => t.shape); + const dtype = tensors.map((t2) => t2.dtype).reduce((d1, d2) => upcastType(d1, d2)); + const shapes = tensors.map((t2) => t2.shape); const usePackedOp = env().getBool("WEBGL_PACK"); const program = usePackedOp ? new AddNPackedProgram(tensors[0].shape, shapes) : new AddNProgram(tensors[0].shape, shapes); return backend2.runWebGLProgram(program, tensors, dtype); @@ -54863,7 +54517,7 @@ var addNConfig2 = { kernelFunc: addN3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/All.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/All.js function all3(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -54902,7 +54556,7 @@ var allConfig2 = { kernelFunc: all3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Any.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Any.js function any3(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -54941,7 +54595,7 @@ var anyConfig2 = { kernelFunc: any3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/argminmax_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/argminmax_gpu.js var ArgMinMaxProgram = class { constructor(reduceInfo, op2, firstPass) { this.variableNames = ["A"]; @@ -54976,7 +54630,7 @@ var ArgMinMaxProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/argminmax_packed_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/argminmax_packed_gpu.js var ArgMinMaxPackedProgram = class { constructor(shape, windowSize, op2, firstPass) { this.variableNames = ["A"]; @@ -55083,7 +54737,7 @@ var ArgMinMaxPackedProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernel_utils/arg_min_max.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernel_utils/arg_min_max.js function argReduce(backend2, x, reduceType, bestIndicesA = null) { let batchSize = x.shape[0]; let inSize = x.shape[1]; @@ -55139,13 +54793,13 @@ function argMinMaxReduce(backend2, x, axis, reduceType) { const reduced = argReduce(backend2, a2D, reduceType); intermediateTensorInfos.push(reduced); const reshaped = reshape4({ inputs: { x: reduced }, backend: backend2, attrs: { shape: outShape } }); - intermediateTensorInfos.forEach((t) => backend2.disposeIntermediateTensorInfo(t)); + intermediateTensorInfos.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2)); return reshaped; } return argReducePacked(backend2, x, reduceType); } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ArgMax.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ArgMax.js function argMax3(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -55161,7 +54815,7 @@ function argMax3(args) { } backend_util_exports.assertAxesAreInnerMostDims("argMax", [axes[0]], $x.shape.length); const out = argMinMaxReduce(backend2, $x, axes[0], "max"); - intermediateTensorInfos.forEach((t) => backend2.disposeIntermediateTensorInfo(t)); + intermediateTensorInfos.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2)); return out; } var argMaxConfig2 = { @@ -55170,7 +54824,7 @@ var argMaxConfig2 = { kernelFunc: argMax3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ArgMin.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ArgMin.js function argMin3(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -55186,7 +54840,7 @@ function argMin3(args) { } backend_util_exports.assertAxesAreInnerMostDims("argMin", [axes[0]], $x.shape.length); const out = argMinMaxReduce(backend2, $x, axes[0], "min"); - intermediateTensorInfos.forEach((t) => backend2.disposeIntermediateTensorInfo(t)); + intermediateTensorInfos.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2)); return out; } var argMinConfig2 = { @@ -55195,7 +54849,7 @@ var argMinConfig2 = { kernelFunc: argMin3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Asin.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Asin.js var ASIN = CHECK_NAN_SNIPPET + ` if (abs(x) > 1.) { return NAN; @@ -55209,7 +54863,7 @@ var asinConfig2 = { kernelFunc: asin3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Asinh.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Asinh.js var ASINH = CHECK_NAN_SNIPPET + `return log(x + sqrt(x * x + 1.0));`; var asinh3 = unaryKernelFunc2({ opSnippet: ASINH }); var asinhConfig2 = { @@ -55218,7 +54872,7 @@ var asinhConfig2 = { kernelFunc: asinh3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Atan.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Atan.js var ATAN = CHECK_NAN_SNIPPET + ` return atan(x); `; @@ -55229,14 +54883,16 @@ var atanConfig2 = { kernelFunc: atan4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Atan2.js -var ATAN2 = CHECK_NAN_SNIPPET_BINARY + ` +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Atan2.js +var ATAN2 = CHECK_NAN_SNIPPET2 + ` return atan(a, b); `; var ATAN2_PACKED = ` vec4 result = atan(a, b); - vec4 isNaN = min(vec4(isnan(a)) + vec4(isnan(b)), vec4(1.0)); - ` + CHECK_NAN_SNIPPET_BINARY_PACKED + ` + bvec4 isNaNA = isnan(a); + bvec4 isNaNB = isnan(b); + bvec4 isNaN = bvec4(isNaNA.x || isNaNB.x, isNaNA.y || isNaNB.y, isNaNA.z || isNaNB.z, isNaNA.w || isNaNB.w); + ` + CHECK_NAN_SNIPPET_PACKED + ` return result; `; var atan23 = binaryKernelFunc2({ opSnippet: ATAN2, packedOpSnippet: ATAN2_PACKED }); @@ -55246,7 +54902,7 @@ var atan2Config2 = { kernelFunc: atan23 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Atanh.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Atanh.js var ATANH = CHECK_NAN_SNIPPET + ` if ((x < -1.0) || (x > 1.0)) return NAN; return (log(1.0 + x) - log(1.0 - x)) / 2.0;`; @@ -55257,7 +54913,7 @@ var atanhConfig2 = { kernelFunc: atanh3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/pool_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/pool_gpu.js var Pool2DProgram = class { constructor(convInfo, poolType, computePositions, flattenPositions = false, includeBatchInIndex = false) { this.variableNames = ["x"]; @@ -55643,7 +55299,7 @@ var Pool3DProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/AvgPool.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/AvgPool.js function avgPool3(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -55664,7 +55320,7 @@ var avgPoolConfig2 = { kernelFunc: avgPool3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/AvgPool3D.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/AvgPool3D.js function avgPool3D2(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -55680,7 +55336,7 @@ var avgPool3DConfig2 = { kernelFunc: avgPool3D2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/avg_pool_backprop_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/avg_pool_backprop_gpu.js var AvgPool2DBackpropProgram = class { constructor(convInfo) { this.variableNames = ["dy"]; @@ -55821,7 +55477,7 @@ var AvgPool3DBackpropProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/AvgPool3DGrad.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/AvgPool3DGrad.js function avgPool3DGrad2(args) { const { inputs, backend: backend2, attrs } = args; const { dy, input: input2 } = inputs; @@ -55838,7 +55494,7 @@ var avgPool3DGradConfig3 = { kernelFunc: avgPool3DGrad2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/AvgPoolGrad.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/AvgPoolGrad.js function avgPoolGrad3(args) { const { inputs, backend: backend2, attrs } = args; const { dy, input: input2 } = inputs; @@ -55855,7 +55511,7 @@ var avgPoolGradConfig3 = { kernelFunc: avgPoolGrad3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/BatchMatMul.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/BatchMatMul.js function batchMatMul2(args) { const { inputs, backend: backend2, attrs } = args; const { a, b } = inputs; @@ -55868,7 +55524,7 @@ var batchMatMulConfig2 = { kernelFunc: batchMatMul2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/batchnorm_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/batchnorm_gpu.js var BatchNormProgram = class { constructor(xShape, meanShape, varianceShape, offsetShape, scaleShape, varianceEpsilon) { this.outputShape = []; @@ -55902,7 +55558,7 @@ var BatchNormProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/batchnorm_packed_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/batchnorm_packed_gpu.js var BatchNormPackedProgram = class { constructor(xShape, meanShape, varianceShape, offsetShape, scaleShape, varianceEpsilon) { this.packedInputs = true; @@ -55940,7 +55596,7 @@ var BatchNormPackedProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/BatchNorm.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/BatchNorm.js var batchNorm3 = ({ inputs, backend: backend2, attrs }) => { const { x, mean: mean5, variance, offset, scale: scale2 } = inputs; util_exports.assert(mean5.shape.length === variance.shape.length, () => "Batch normalization gradient requires mean and variance to have equal ranks."); @@ -55971,7 +55627,7 @@ var batchNormConfig2 = { kernelFunc: batchNorm3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/slice_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/slice_gpu.js var SliceProgram = class { constructor(destSize) { this.variableNames = ["source"]; @@ -55981,8 +55637,8 @@ var SliceProgram = class { this.customUniforms = [{ name: "start", arrayIndex: this.rank, type: "int" }]; const sourceCoords = getCoords(this.rank); let body; - const coordSum = destSize.map((_, i) => { - return `sourceLoc.${coords[i]} = start[${i}] + coords.${coords[i]};`; + const coordSum = destSize.map((_, i2) => { + return `sourceLoc.${coords[i2]} = start[${i2}] + coords.${coords[i2]};`; }); body = ` ${dtype} sourceLoc; @@ -56008,7 +55664,7 @@ function getCoords(rank) { } } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/slice_packed_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/slice_packed_gpu.js var SlicePackedProgram = class { constructor(destSize) { this.variableNames = ["source"]; @@ -56042,7 +55698,7 @@ var SlicePackedProgram = class { } `; const sourceLocSetup = this.rank <= 4 ? `sourceLoc = coords + - ${dtype}(${destSize.map((_, i) => `start[${i}]`).join()});` : destSize.map((_, i) => `${sourceLoc[i]} = ${coords3[i]} + start[${i}];`).join("\n"); + ${dtype}(${destSize.map((_, i2) => `start[${i2}]`).join()});` : destSize.map((_, i2) => `${sourceLoc[i2]} = ${coords3[i2]} + start[${i2}];`).join("\n"); this.userCode = ` void main() { ${dtype} coords = getOutputCoords(); @@ -56057,11 +55713,11 @@ var SlicePackedProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Slice.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Slice.js function shallowSlice(x, begin, size, backend2) { const xTexData = backend2.texData.get(x.dataId); - const t = backend2.makeTensorInfo(size, x.dtype); - const newTexData = backend2.texData.get(t.dataId); + const t2 = backend2.makeTensorInfo(size, x.dtype); + const newTexData = backend2.texData.get(t2.dataId); Object.assign(newTexData, xTexData); newTexData.refCount = 1; newTexData.shape = size; @@ -56076,7 +55732,7 @@ function shallowSlice(x, begin, size, backend2) { }; const refCount = backend2.dataRefCount.get(newTexData.slice.origDataId) || 1; backend2.dataRefCount.set(newTexData.slice.origDataId, refCount + 1); - return t; + return t2; } function slice3(args) { const { inputs, backend: backend2, attrs } = args; @@ -56108,7 +55764,7 @@ var sliceConfig2 = { kernelFunc: slice3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/BatchToSpaceND.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/BatchToSpaceND.js var batchToSpaceND3 = (args) => { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -56136,7 +55792,7 @@ var batchToSpaceND3 = (args) => { toDispose.push(reshapedIntermediate); toDispose.push(transposedIntermediate); toDispose.push(reshapedIntermediate2); - toDispose.forEach((t) => backend2.disposeIntermediateTensorInfo(t)); + toDispose.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2)); return sliced; }; var batchToSpaceNDConfig2 = { @@ -56145,7 +55801,7 @@ var batchToSpaceNDConfig2 = { kernelFunc: batchToSpaceND3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Bincount.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Bincount.js function bincount3(args) { const { inputs, backend: backend2, attrs } = args; const { x, weights } = inputs; @@ -56161,7 +55817,7 @@ var bincountConfig2 = { kernelFunc: bincount3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/BroadcastArgs.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/BroadcastArgs.js function broadcastArgs3(args) { const { inputs, backend: backend2 } = args; const { s0, s1 } = inputs; @@ -56176,7 +55832,7 @@ var broadcastArgsConfig2 = { kernelFunc: broadcastArgs3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/NotEqual.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/NotEqual.js var NOT_EQUAL = `return float(a != b);`; var notEqual3 = binaryKernelFunc2({ opSnippet: NOT_EQUAL, cpuKernelImpl: notEqualImplCPU, dtype: "bool" }); var notEqualConfig2 = { @@ -56185,7 +55841,7 @@ var notEqualConfig2 = { kernelFunc: notEqual3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Real.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Real.js function real3(args) { const { inputs, backend: backend2 } = args; const { input: input2 } = inputs; @@ -56198,7 +55854,7 @@ var realConfig2 = { kernelFunc: real3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernel_utils/int.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernel_utils/int.js var TO_INT = `return float(int(x));`; function int(input2, backend2) { const program = new UnaryOpProgram(input2.shape, TO_INT); @@ -56206,7 +55862,7 @@ function int(input2, backend2) { return { dataId: output.dataId, shape: output.shape, dtype: output.dtype }; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Cast.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Cast.js function cast4(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -56255,7 +55911,7 @@ var castConfig2 = { kernelFunc: cast4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Ceil.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Ceil.js var CEIL = `return ceil(x);`; var ceil3 = unaryKernelFunc2({ opSnippet: CEIL, packedOpSnippet: CEIL, cpuKernelImpl: ceilImplCPU }); var ceilConfig2 = { @@ -56264,7 +55920,7 @@ var ceilConfig2 = { kernelFunc: ceil3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/clip_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/clip_gpu.js var ClipProgram = class { constructor(aShape) { this.variableNames = ["A"]; @@ -56288,7 +55944,7 @@ var ClipProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/clip_packed_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/clip_packed_gpu.js var ClipPackedProgram = class { constructor(aShape) { this.variableNames = ["A"]; @@ -56314,7 +55970,7 @@ var ClipPackedProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ClipByValue.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ClipByValue.js function clipByValue3(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -56334,7 +55990,7 @@ var clipByValueConfig2 = { kernelFunc: clipByValue3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/complex_abs_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/complex_abs_gpu.js var ComplexAbsProgram = class { constructor(shape) { this.variableNames = ["real", "imag"]; @@ -56356,7 +56012,7 @@ var ComplexAbsProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ComplexAbs.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ComplexAbs.js function makeComplexComponentTensorInfo(complexTensor, complexPart) { return { dataId: complexPart.dataId, @@ -56381,21 +56037,21 @@ var complexAbsConfig2 = { kernelFunc: complexAbs2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/concat_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/concat_gpu.js var ConcatProgram = class { constructor(shapes) { this.outputShape = []; this.outputShape = backend_util_exports.computeOutShape(shapes, 1); - this.variableNames = shapes.map((_, i) => `T${i}`); + this.variableNames = shapes.map((_, i2) => `T${i2}`); const offsets = new Array(shapes.length - 1); offsets[0] = shapes[0][1]; - for (let i = 1; i < offsets.length; i++) { - offsets[i] = offsets[i - 1] + shapes[i][1]; + for (let i2 = 1; i2 < offsets.length; i2++) { + offsets[i2] = offsets[i2 - 1] + shapes[i2][1]; } const snippets = [`if (yC < ${offsets[0]}) setOutput(getT0(yR, yC));`]; - for (let i = 1; i < offsets.length; i++) { - const shift = offsets[i - 1]; - snippets.push(`else if (yC < ${offsets[i]}) setOutput(getT${i}(yR, yC-${shift}));`); + for (let i2 = 1; i2 < offsets.length; i2++) { + const shift = offsets[i2 - 1]; + snippets.push(`else if (yC < ${offsets[i2]}) setOutput(getT${i2}(yR, yC-${shift}));`); } const lastIndex = offsets.length; const lastShift = offsets[offsets.length - 1]; @@ -56412,7 +56068,7 @@ var ConcatProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/concat_packed_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/concat_packed_gpu.js var ConcatPackedProgram = class { constructor(shapes, axis) { this.packedInputs = true; @@ -56424,11 +56080,11 @@ var ConcatPackedProgram = class { const dtype = getCoordsDataType(rank); const coords3 = getChannels("coords", rank); const channels = ["x", "y", "z", "w", "u", "v"].slice(0, rank); - this.variableNames = shapes.map((_, i) => `T${i}`); + this.variableNames = shapes.map((_, i2) => `T${i2}`); const offsets = new Array(shapes.length - 1); offsets[0] = shapes[0][axis]; - for (let i = 1; i < offsets.length; i++) { - offsets[i] = offsets[i - 1] + shapes[i][axis]; + for (let i2 = 1; i2 < offsets.length; i2++) { + offsets[i2] = offsets[i2 - 1] + shapes[i2][axis]; } const channel = channels[axis]; const lastChannels = channels.slice(-2); @@ -56437,12 +56093,12 @@ var ConcatPackedProgram = class { return getChannel( getT0(${allChannels}), vec2(${lastChannels.join()})); }`; - for (let i = 1; i < offsets.length; i++) { - const shift2 = offsets[i - 1]; + for (let i2 = 1; i2 < offsets.length; i2++) { + const shift2 = offsets[i2 - 1]; getValueSnippet += ` - if (${channel} < ${offsets[i]} && ${channel} >= ${offsets[i - 1]}) { + if (${channel} < ${offsets[i2]} && ${channel} >= ${offsets[i2 - 1]}) { return getChannel( - getT${i}(${shiftedChannels(channels, channel, shift2)}), + getT${i2}(${shiftedChannels(channels, channel, shift2)}), vec2(${shiftedChannels(lastChannels, channel, shift2)})); }`; } @@ -56493,7 +56149,7 @@ function shiftedChannels(channels, channel, shift) { return res.join(); } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Imag.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Imag.js function imag3(args) { const { inputs, backend: backend2 } = args; const { input: input2 } = inputs; @@ -56506,17 +56162,17 @@ var imagConfig2 = { kernelFunc: imag3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Concat_impl.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Concat_impl.js function concatImpl2(inputs, axis, backend2) { const dtype = inputs[0].dtype; if (dtype === "complex64") { - const reals = inputs.map((t) => real3({ inputs: { input: t }, backend: backend2 })); - const imags = inputs.map((t) => imag3({ inputs: { input: t }, backend: backend2 })); + const reals = inputs.map((t2) => real3({ inputs: { input: t2 }, backend: backend2 })); + const imags = inputs.map((t2) => imag3({ inputs: { input: t2 }, backend: backend2 })); const realConcated = concatImpl2(reals, axis, backend2); const imagConcated = concatImpl2(imags, axis, backend2); const result2 = complex3({ inputs: { real: realConcated, imag: imagConcated }, backend: backend2 }); - reals.forEach((r) => backend2.disposeIntermediateTensorInfo(r)); - imags.forEach((i) => backend2.disposeIntermediateTensorInfo(i)); + reals.forEach((r2) => backend2.disposeIntermediateTensorInfo(r2)); + imags.forEach((i2) => backend2.disposeIntermediateTensorInfo(i2)); backend2.disposeIntermediateTensorInfo(realConcated); backend2.disposeIntermediateTensorInfo(imagConcated); return result2; @@ -56526,49 +56182,49 @@ function concatImpl2(inputs, axis, backend2) { runOnCpu = true; } if (runOnCpu) { - const tensors2D2 = inputs.map((t) => { - const innerSize = util_exports.sizeFromShape(t.shape.slice(axis)); + const tensors2D2 = inputs.map((t2) => { + const innerSize = util_exports.sizeFromShape(t2.shape.slice(axis)); const shape = [-1, innerSize]; - return reshape4({ inputs: { x: t }, backend: backend2, attrs: { shape } }); + return reshape4({ inputs: { x: t2 }, backend: backend2, attrs: { shape } }); }); - const inputsValShapes = tensors2D2.map((t) => { - return { vals: backend2.readSync(t.dataId), shape: t.shape }; + const inputsValShapes = tensors2D2.map((t2) => { + return { vals: backend2.readSync(t2.dataId), shape: t2.shape }; }); - const outShape2 = backend_util_exports.computeOutShape(tensors2D2.map((t) => t.shape), 1); + const outShape2 = backend_util_exports.computeOutShape(tensors2D2.map((t2) => t2.shape), 1); const simplyConcat = tensors2D2[0].shape[0] === 1; const outVals = concatImplCPU(inputsValShapes, outShape2, dtype, simplyConcat); - const finalOutShape = backend_util_exports.computeOutShape(inputs.map((t) => t.shape), axis); + const finalOutShape = backend_util_exports.computeOutShape(inputs.map((t2) => t2.shape), axis); const outInfo = backend2.makeTensorInfo(finalOutShape, dtype, outVals); - tensors2D2.forEach((t) => backend2.disposeIntermediateTensorInfo(t)); + tensors2D2.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2)); return outInfo; } const maxTexturesInShader = env().getNumber("WEBGL_MAX_TEXTURES_IN_SHADER"); if (inputs.length > maxTexturesInShader) { const reducedInputs = []; - for (let i = 0; i < inputs.length; i += maxTexturesInShader) { - const subArray = inputs.slice(i, i + maxTexturesInShader); + for (let i2 = 0; i2 < inputs.length; i2 += maxTexturesInShader) { + const subArray = inputs.slice(i2, i2 + maxTexturesInShader); reducedInputs.push(concatImpl2(subArray, axis, backend2)); } const result2 = concatImpl2(reducedInputs, axis, backend2); - for (const i of reducedInputs) { - backend2.disposeIntermediateTensorInfo(i); + for (const i2 of reducedInputs) { + backend2.disposeIntermediateTensorInfo(i2); } return result2; } if (env().getBool("WEBGL_PACK_ARRAY_OPERATIONS") && inputs[0].shape.length > 1) { - const program2 = new ConcatPackedProgram(inputs.map((t) => t.shape), axis); + const program2 = new ConcatPackedProgram(inputs.map((t2) => t2.shape), axis); return backend2.runWebGLProgram(program2, inputs, dtype); } const { tensors2D, outShape } = computeTensors2D(inputs, axis, backend2); - const program = new ConcatProgram(tensors2D.map((t) => t.shape)); + const program = new ConcatProgram(tensors2D.map((t2) => t2.shape)); const result = backend2.runWebGLProgram(program, tensors2D, dtype); - tensors2D.forEach((r) => backend2.disposeIntermediateTensorInfo(r)); + tensors2D.forEach((r2) => backend2.disposeIntermediateTensorInfo(r2)); const reshapedResult = reshape4({ inputs: { x: result }, attrs: { shape: outShape }, backend: backend2 }); backend2.disposeIntermediateTensorInfo(result); return reshapedResult; } function computeTensors2D(inputs, axis, backend2) { - const outShape = backend_util_exports.computeOutShape(inputs.map((t) => t.shape), axis); + const outShape = backend_util_exports.computeOutShape(inputs.map((t2) => t2.shape), axis); const tensors2D = inputs.map((x) => reshape4({ inputs: { x }, attrs: { shape: [-1, util_exports.sizeFromShape(x.shape.slice(axis))] }, @@ -56577,21 +56233,21 @@ function computeTensors2D(inputs, axis, backend2) { return { tensors2D, outShape }; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Concat.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Concat.js function concat3(args) { const { inputs, backend: backend2, attrs } = args; const { axis } = attrs; const $axis = util_exports.parseAxisParam(axis, inputs[0].shape)[0]; - const outShape = backend_util_exports.computeOutShape(inputs.map((t) => t.shape), $axis); + const shapes = inputs.map((t2) => t2.shape); + backend_util_exports.assertParamsConsistent(shapes, $axis); + const outShape = backend_util_exports.computeOutShape(inputs.map((t2) => t2.shape), $axis); if (util_exports.sizeFromShape(outShape) === 0) { return backend2.makeTensorInfo(outShape, inputs[0].dtype, []); } - const $inputs = inputs.filter((t) => util_exports.sizeFromShape(t.shape) > 0); + const $inputs = inputs.filter((t2) => util_exports.sizeFromShape(t2.shape) > 0); if ($inputs.length === 1) { return identity3({ inputs: { x: $inputs[0] }, backend: backend2 }); } - const shapes = $inputs.map((t) => t.shape); - backend_util_exports.assertParamsConsistent(shapes, $axis); return concatImpl2($inputs, $axis, backend2); } var concatConfig2 = { @@ -56600,7 +56256,7 @@ var concatConfig2 = { kernelFunc: concat3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/conv_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/conv_gpu.js var Conv2DProgram = class { constructor(convInfo, addBias = false, activation2 = null, hasPreluActivationWeights = false, hasLeakyreluAlpha = false) { this.variableNames = ["x", "W"]; @@ -56887,7 +56543,7 @@ var Conv3DProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/conv_packed_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/conv_packed_gpu.js var Conv2DPackedProgram = class { constructor(convInfo, addBias = false, activation2 = null, hasPreluActivation = false, hasLeakyReluAlpha = false) { this.variableNames = ["x", "W"]; @@ -57195,7 +56851,7 @@ var Conv2DPackedProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/im2col_packed_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/im2col_packed_gpu.js var Im2ColPackedProgram = class { constructor(outputShape, convInfo) { this.variableNames = ["A"]; @@ -57275,7 +56931,7 @@ var Im2ColPackedProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Conv2D_impl.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Conv2D_impl.js function getShapeForBatchMatMul(shape, isChannelsLast) { const length = shape.length; if (length >= 3) { @@ -57390,8 +57046,8 @@ function conv2dByMatMul({ x, filter, convInfo, backend: backend2, bias = null, p intermediates.push(filterReshaped); intermediates.push(result); } - for (const i of intermediates) { - backend2.disposeIntermediateTensorInfo(i); + for (const i2 of intermediates) { + backend2.disposeIntermediateTensorInfo(i2); } return out; } @@ -57462,13 +57118,13 @@ function conv2dWithIm2Row({ x, filter, convInfo, backend: backend2, bias = null, const product = backend2.runWebGLProgram(matmulProgram, inputs, "float32"); const out = reshape4({ inputs: { x: product }, backend: backend2, attrs: { shape: convInfo.outShape } }); intermediates.push(product); - for (const i of intermediates) { - backend2.disposeIntermediateTensorInfo(i); + for (const i2 of intermediates) { + backend2.disposeIntermediateTensorInfo(i2); } return out; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Conv2D.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Conv2D.js function conv2d4(args) { const { inputs, backend: backend2, attrs } = args; const { x, filter } = inputs; @@ -57503,7 +57159,7 @@ var conv2DConfig2 = { kernelFunc: conv2d4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/conv_backprop_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/conv_backprop_gpu.js var Conv2DDerFilterProgram = class { constructor(convInfo) { this.variableNames = ["x", "dy"]; @@ -57757,7 +57413,7 @@ var Conv3DDerInputProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Conv2DBackpropFilter.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Conv2DBackpropFilter.js function conv2DBackpropFilter3(args) { const { inputs, backend: backend2, attrs } = args; const { x, dy } = inputs; @@ -57773,7 +57429,7 @@ var conv2DBackpropFilterConfig2 = { kernelFunc: conv2DBackpropFilter3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Conv2DBackpropInput.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Conv2DBackpropInput.js function conv2DBackpropInput3(args) { const { inputs, backend: backend2, attrs } = args; const { dy, filter } = inputs; @@ -57789,7 +57445,7 @@ var conv2DBackpropInputConfig2 = { kernelFunc: conv2DBackpropInput3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Conv3D.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Conv3D.js function conv3D2(args) { const { inputs, backend: backend2, attrs } = args; const { x, filter } = inputs; @@ -57804,7 +57460,7 @@ var conv3DConfig2 = { kernelFunc: conv3D2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Conv3DBackpropFilterV2.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Conv3DBackpropFilterV2.js function conv3DBackpropFilterV22(args) { const { inputs, backend: backend2, attrs } = args; const { x, dy } = inputs; @@ -57819,7 +57475,7 @@ var conv3DBackpropFilterV2Config2 = { kernelFunc: conv3DBackpropFilterV22 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Conv3DBackpropInputV2.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Conv3DBackpropInputV2.js function conv3DBackpropInput2(args) { const { inputs, backend: backend2, attrs } = args; const { dy, filter } = inputs; @@ -57834,7 +57490,7 @@ var conv3DBackpropInputConfig = { kernelFunc: conv3DBackpropInput2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Cos.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Cos.js var COS = CHECK_NAN_SNIPPET_UNARY + ` return cos(x); `; @@ -57845,7 +57501,7 @@ var cosConfig2 = { kernelFunc: cos3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Cosh.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Cosh.js var COSH = ` float e2x = exp(-x); return (e2x + 1.0 / e2x) / 2.0; @@ -57857,7 +57513,7 @@ var coshConfig2 = { kernelFunc: cosh3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/crop_and_resize_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/crop_and_resize_gpu.js var CropAndResizeProgram = class { constructor(imageShape, boxShape, cropSize, method, extrapolationValue) { this.variableNames = ["Image", "Boxes", "BoxInd"]; @@ -57951,7 +57607,7 @@ var CropAndResizeProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/CropAndResize.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/CropAndResize.js var cropAndResize3 = (args) => { const { inputs, backend: backend2, attrs } = args; const { image: image2, boxes, boxInd } = inputs; @@ -57965,7 +57621,7 @@ var cropAndResizeConfig2 = { kernelFunc: cropAndResize3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/cum_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/cum_gpu.js var CumOpType; (function(CumOpType3) { CumOpType3["Prod"] = "*"; @@ -58033,7 +57689,7 @@ function getFinalCoord(rank, name, op2) { } } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Cum_impl.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Cum_impl.js function cumImpl(op2, x, backend2, axis, exclusive, reverse5) { const xRank = x.shape.length; const permutation = backend_util_exports.getAxesPermutation([axis], xRank); @@ -58047,9 +57703,9 @@ function cumImpl(op2, x, backend2, axis, exclusive, reverse5) { } const size = permutedX.shape[permutedAxis]; let result = identity3({ inputs: { x: permutedX }, backend: backend2 }); - for (let i = 0; i <= Math.ceil(Math.log2(size)) - 1; i++) { + for (let i2 = 0; i2 <= Math.ceil(Math.log2(size)) - 1; i2++) { const program = new CumProgram(op2, permutedX.shape, false, reverse5); - const customValues = [[i]]; + const customValues = [[i2]]; const prevResult = result; result = backend2.runWebGLProgram(program, [result], result.dtype, customValues); backend2.disposeIntermediateTensorInfo(prevResult); @@ -58070,7 +57726,7 @@ function cumImpl(op2, x, backend2, axis, exclusive, reverse5) { return result; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Cumprod.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Cumprod.js function cumprod3(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -58083,7 +57739,7 @@ var cumprodConfig2 = { kernelFunc: cumprod3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Cumsum.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Cumsum.js function cumsum3(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -58096,7 +57752,7 @@ var cumsumConfig2 = { kernelFunc: cumsum3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/DenseBincount.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/DenseBincount.js function denseBincount3(args) { const { inputs, backend: backend2, attrs } = args; const { x, weights } = inputs; @@ -58120,7 +57776,7 @@ var denseBincountConfig2 = { kernelFunc: denseBincount3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/depth_to_space_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/depth_to_space_gpu.js var DepthToSpaceProgram = class { constructor(outputShape, blockSize, dataFormat) { this.variableNames = ["x"]; @@ -58186,7 +57842,7 @@ var DepthToSpaceProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/DepthToSpace.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/DepthToSpace.js function depthToSpace3(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -58208,7 +57864,7 @@ var depthToSpaceConfig2 = { kernelFunc: depthToSpace3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/conv_gpu_depthwise.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/conv_gpu_depthwise.js var DepthwiseConv2DProgram = class { constructor(convInfo, addBias = false, activation2 = null, hasPreluActivation = false, hasLeakyReluAlpha = false) { this.variableNames = ["x", "W"]; @@ -58301,7 +57957,7 @@ var DepthwiseConv2DProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/conv_packed_gpu_depthwise.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/conv_packed_gpu_depthwise.js var DepthwiseConvPacked2DProgram = class { constructor(convInfo, addBias = false, activation2 = null, hasPreluActivation = false, hasLeakyReluAlpha = false) { this.variableNames = ["x", "W"]; @@ -58602,7 +58258,7 @@ var DepthwiseConvPacked2DProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/DepthwiseConv2dNative.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/DepthwiseConv2dNative.js function depthwiseConv2dNative2(args) { const { inputs, backend: backend2, attrs } = args; const { x, filter } = inputs; @@ -58633,7 +58289,7 @@ var depthwiseConv2dNativeConfig2 = { kernelFunc: depthwiseConv2dNative2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/conv_backprop_gpu_depthwise.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/conv_backprop_gpu_depthwise.js var DepthwiseConv2DDerFilterProgram = class { constructor(convInfo) { this.variableNames = ["x", "dy"]; @@ -58741,7 +58397,7 @@ var DepthwiseConv2DDerInputProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/DepthwiseConv2dNativeBackpropFilter.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/DepthwiseConv2dNativeBackpropFilter.js function depthwiseConv2dNativeBackpropFilter3(args) { const { inputs, backend: backend2, attrs } = args; const { x, dy } = inputs; @@ -58756,7 +58412,7 @@ var depthwiseConv2dNativeBackpropFilterConfig2 = { kernelFunc: depthwiseConv2dNativeBackpropFilter3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/DepthwiseConv2dNativeBackpropInput.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/DepthwiseConv2dNativeBackpropInput.js function depthwiseConv2dNativeBackpropInput3(args) { const { inputs, backend: backend2, attrs } = args; const { dy, filter } = inputs; @@ -58771,7 +58427,7 @@ var depthwiseConv2dNativeBackpropInputConfig2 = { kernelFunc: depthwiseConv2dNativeBackpropInput3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/diag_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/diag_gpu.js var DiagProgram = class { constructor(size) { this.variableNames = ["X"]; @@ -58786,7 +58442,7 @@ var DiagProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Diag.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Diag.js function diag3(args) { const { inputs, backend: backend2 } = args; const { x } = inputs; @@ -58806,7 +58462,7 @@ var diagConfig2 = { kernelFunc: diag3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/dilation_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/dilation_gpu.js var Dilation2DProgram = class { constructor(convInfo) { this.variableNames = ["x", "W"]; @@ -58855,7 +58511,7 @@ var Dilation2DProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Dilation2D.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Dilation2D.js function dilation2D(args) { const { inputs, backend: backend2, attrs } = args; const { x, filter } = inputs; @@ -58874,7 +58530,7 @@ var dilation2DConfig2 = { kernelFunc: dilation2D }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Einsum.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Einsum.js function einsum3(args) { const { inputs, backend: backend2, attrs } = args; const { equation } = attrs; @@ -58886,8 +58542,8 @@ function einsum3(args) { let out = null; let numDimsRemaining = allDims.length; const tensorsToDispose = []; - for (let i = 0; i < nSteps; ++i) { - for (const idTerm of steps[i]) { + for (let i2 = 0; i2 < nSteps; ++i2) { + for (const idTerm of steps[i2]) { const { permutationIndices: perm, expandDims: dimsToExpand } = backend_util_exports.getEinsumPermutation(numDimsRemaining, idDims[idTerm]); let x; if (backend_util_exports.isIdentityPermutation(perm)) { @@ -58911,13 +58567,13 @@ function einsum3(args) { tensorsToDispose.push(out); } } - if (i < nSteps - 1) { - if (path[i] >= 0) { + if (i2 < nSteps - 1) { + if (path[i2] >= 0) { out = sum4({ inputs: { x: out }, backend: backend2, attrs: { - axis: path[i] - (allDims.length - numDimsRemaining), + axis: path[i2] - (allDims.length - numDimsRemaining), keepDims: false } }); @@ -58940,7 +58596,7 @@ var einsumConfig2 = { kernelFunc: einsum3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Elu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Elu.js var ELU4 = `return (x >= 0.0) ? x : (exp(x) - 1.0);`; var ELU_PACKED = ` vec4 result; @@ -58959,7 +58615,7 @@ var eluConfig2 = { kernelFunc: elu5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/EluGrad.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/EluGrad.js var ELU_DER = `return (b >= 1.0) ? a : a * (b + 1.0);`; var ELU_DER_PACKED = ` vec4 bGTEZero = vec4(greaterThanEqual(b, vec4(0.))); @@ -58977,7 +58633,7 @@ var eluGradConfig3 = { kernelFunc: eluGrad2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Equal.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Equal.js var PACKED_EQUAL = ` return vec4(equal(a, b)); `; @@ -58994,7 +58650,7 @@ var equalConfig2 = { kernelFunc: equal3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Erf.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Erf.js var ERF = ` // Error function is calculated approximately with elementary function. // See "Handbook of Mathematical Functions with Formulas, @@ -59018,7 +58674,7 @@ var erfConfig2 = { kernelFunc: erf3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Exp.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Exp.js var EXP = CHECK_NAN_SNIPPET_UNARY + ` return exp(x); `; @@ -59044,7 +58700,7 @@ var expConfig2 = { kernelFunc: exp3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ExpandDims.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ExpandDims.js function expandDims4(args) { const { inputs, attrs, backend: backend2 } = args; const { dim } = attrs; @@ -59065,7 +58721,7 @@ var expandDimsConfig2 = { kernelFunc: expandDims4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Expm1.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Expm1.js var EXPM1 = `return exp(x) - 1.0;`; var expm13 = unaryKernelFunc2({ opSnippet: EXPM1, packedOpSnippet: EXPM1, cpuKernelImpl: expm1ImplCPU }); var expm1Config2 = { @@ -59074,7 +58730,7 @@ var expm1Config2 = { kernelFunc: expm13 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/fft_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/fft_gpu.js var FFTProgram = class { constructor(component, inputShape, inverse) { this.variableNames = ["real", "imag"]; @@ -59127,7 +58783,7 @@ var FFTProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/FFT_impl.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/FFT_impl.js function fftImpl2(x, inverse, backend2) { const xData = backend2.texData.get(x.dataId); const inputSize = util_exports.sizeFromShape(x.shape); @@ -59160,7 +58816,7 @@ function fftImpl2(x, inverse, backend2) { return complexOutputReshaped; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/FFT.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/FFT.js function fft3(args) { const { inputs, backend: backend2 } = args; const { input: input2 } = inputs; @@ -59172,7 +58828,7 @@ var fftConfig2 = { kernelFunc: fft3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/fill_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/fill_gpu.js var FillProgram = class { constructor(shape, value) { this.outputShape = []; @@ -59188,7 +58844,7 @@ var FillProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Fill.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Fill.js function fill3(args) { const { backend: backend2, attrs } = args; const { shape, value } = attrs; @@ -59210,7 +58866,7 @@ var fillConfig2 = { kernelFunc: fill3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/flip_left_right_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/flip_left_right_gpu.js var FlipLeftRightProgram = class { constructor(imageShape) { this.variableNames = ["Image"]; @@ -59235,7 +58891,7 @@ var FlipLeftRightProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/FlipLeftRight.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/FlipLeftRight.js var flipLeftRightConfig2 = { kernelName: FlipLeftRight, backendName: "webgl", @@ -59248,7 +58904,7 @@ var flipLeftRightConfig2 = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Floor.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Floor.js var FLOOR = `return floor(x);`; var floor3 = unaryKernelFunc2({ opSnippet: FLOOR, packedOpSnippet: FLOOR, cpuKernelImpl: floorImplCPU }); var floorConfig2 = { @@ -59257,7 +58913,7 @@ var floorConfig2 = { kernelFunc: floor3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/FloorDiv.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/FloorDiv.js var INT_DIV = ` float s = sign(a) * sign(b); int ia = round(a); @@ -59298,7 +58954,7 @@ var floorDivConfig2 = { kernelFunc: floorDiv3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/FromPixels_utils/from_pixels_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/FromPixels_utils/from_pixels_gpu.js var FromPixelsProgram = class { constructor(outputShape) { this.variableNames = ["A"]; @@ -59331,7 +58987,7 @@ var FromPixelsProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/FromPixels_utils/from_pixels_packed_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/FromPixels_utils/from_pixels_packed_gpu.js var FromPixelsPackedProgram = class { constructor(outputShape) { this.variableNames = ["A"]; @@ -59378,7 +59034,7 @@ var FromPixelsPackedProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/FromPixels.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/FromPixels.js var fromPixelsConfig = { kernelName: FromPixels, backendName: "webgl", @@ -59418,7 +59074,7 @@ function fromPixels2(args) { return res; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/FusedConv2D.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/FusedConv2D.js function fusedConv2d(args) { const { inputs, backend: backend2, attrs } = args; const { x, filter, bias, preluActivationWeights } = inputs; @@ -59498,7 +59154,7 @@ function fusedConv2d(args) { } const outReshaped = reshape4({ inputs: { x: out }, backend: backend2, attrs: { shape: convInfo.outShape } }); intermediates.push(out); - intermediates.forEach((t) => backend2.disposeIntermediateTensorInfo(t)); + intermediates.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2)); return outReshaped; } var fusedConv2DConfig2 = { @@ -59507,7 +59163,7 @@ var fusedConv2DConfig2 = { kernelFunc: fusedConv2d }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/FusedDepthwiseConv2D.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/FusedDepthwiseConv2D.js function fusedDepthwiseConv2D2(args) { const { inputs, backend: backend2, attrs } = args; const { x, filter, bias, preluActivationWeights } = inputs; @@ -59549,7 +59205,7 @@ function fusedDepthwiseConv2D2(args) { [convInfo.inHeight, convInfo.inWidth] ]; const result = backend2.runWebGLProgram(program, programInputs, "float32", customValues); - intermediates.forEach((t) => backend2.disposeIntermediateTensorInfo(t)); + intermediates.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2)); return result; } var fusedDepthwiseConv2DConfig2 = { @@ -59558,7 +59214,7 @@ var fusedDepthwiseConv2DConfig2 = { kernelFunc: fusedDepthwiseConv2D2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/gather_nd_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/gather_nd_gpu.js var GatherNDProgram = class { constructor(sliceDim, strides, shape, paramsShape) { this.sliceDim = sliceDim; @@ -59566,31 +59222,31 @@ var GatherNDProgram = class { this.paramsShape = paramsShape; this.variableNames = ["x", "indices"]; this.outputShape = shape; - const stridesType = getCoordsDataType(strides.length); const dtype = getCoordsDataType(shape.length); - const strideString = this.sliceDim > 1 ? "strides[j]" : "strides"; - const paramsShapeType = getCoordsDataType(paramsShape.length); - const paramsShapeString = paramsShape.length > 1 ? "paramsShape[j]" : "paramsShape"; + let mainLoop = ` + int index;`; + for (let j = 0; j < this.sliceDim; j++) { + mainLoop += ` + index = round(getIndices(coords[0], ${j})); + out_of_bounds = out_of_bounds || index < 0; + out_of_bounds = out_of_bounds || index >= ${this.paramsShape[j]}; + flattenIndex += index * ${this.strides[j]};`; + } this.userCode = ` - ${stridesType} strides = ${stridesType}(${this.strides}); - ${paramsShapeType} paramsShape = ${paramsShapeType}(${this.paramsShape}); void main() { ${dtype} coords = getOutputCoords(); int flattenIndex = 0; bool out_of_bounds = false; - for (int j = 0; j < ${this.sliceDim}; j++) { - int index = round(getIndices(coords[0], j)); - out_of_bounds = out_of_bounds || index < 0; - out_of_bounds = out_of_bounds || index >= ${paramsShapeString}; - flattenIndex += index * ${strideString}; - } + + ${mainLoop} + setOutput(out_of_bounds ? 0.0 : getX(flattenIndex, coords[1])); } `; } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/GatherNd.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/GatherNd.js function gatherNd2(args) { const { inputs, backend: backend2 } = args; const { params, indices } = inputs; @@ -59624,7 +59280,7 @@ var gatherNdConfig2 = { kernelFunc: gatherNd2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/gather_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/gather_gpu.js var GatherProgram = class { constructor(aShape, outputShape) { this.variableNames = ["A", "indices"]; @@ -59645,17 +59301,17 @@ var GatherProgram = class { function getSourceCoords2(aShape, axis) { const currentCoords = ["resRC.x", "resRC.y", "resRC.z", "resRC.w"]; const sourceCoords = []; - for (let i = 0; i < aShape.length; i++) { - if (i === 2) { + for (let i2 = 0; i2 < aShape.length; i2++) { + if (i2 === 2) { sourceCoords.push("index"); } else { - sourceCoords.push(`${currentCoords[i]}`); + sourceCoords.push(`${currentCoords[i2]}`); } } return sourceCoords.join(); } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/GatherV2.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/GatherV2.js function gatherV22(args) { const { inputs, backend: backend2, attrs } = args; const { x, indices } = inputs; @@ -59664,8 +59320,8 @@ function gatherV22(args) { if (env().get("DEBUG")) { const indicesVals = backend2.readSync(indices.dataId); const axisDim = x.shape[parsedAxis]; - for (let i = 0; i < indicesVals.length; ++i) { - const index = indicesVals[i]; + for (let i2 = 0; i2 < indicesVals.length; ++i2) { + const index = indicesVals[i2]; util_exports.assert(index <= axisDim - 1 && index >= 0, () => `GatherV2: the index value ${index} is not in [0, ${axisDim - 1}]`); } } @@ -59701,14 +59357,14 @@ function gatherV22(args) { const indicesBuf = backend2.bufferSync(flattenIndex); const xBuf = backend2.bufferSync(flattenX); const outBuf = gatherV2ImplCPU(xBuf, indicesBuf, flattenOutputShape); - toDispose.forEach((t) => backend2.disposeIntermediateTensorInfo(t)); + toDispose.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2)); return backend2.makeTensorInfo(shapeInfo.outputShape, outBuf.dtype, outBuf.values); } const program = new GatherProgram(flattenX.shape, flattenOutputShape); const res = backend2.runWebGLProgram(program, [flattenX, flattenIndex], flattenX.dtype); toDispose.push(res); const reshaped = reshape4({ inputs: { x: res }, backend: backend2, attrs: { shape: shapeInfo.outputShape } }); - toDispose.forEach((t) => backend2.disposeIntermediateTensorInfo(t)); + toDispose.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2)); return reshaped; } var gatherV2Config2 = { @@ -59717,7 +59373,7 @@ var gatherV2Config2 = { kernelFunc: gatherV22 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Greater.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Greater.js var GREATER = `return float(a > b);`; var GREATER_PACKED = ` return vec4(greaterThan(a, b)); @@ -59734,7 +59390,7 @@ var greaterConfig2 = { kernelFunc: greater4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/GreaterEqual.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/GreaterEqual.js var GREATER_EQUAL = `return float(a >= b);`; var GREATER_EQUAL_PACKED = ` return vec4(greaterThanEqual(a, b)); @@ -59751,7 +59407,7 @@ var greaterEqualConfig2 = { kernelFunc: greaterEqual3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/IFFT.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/IFFT.js function ifft3(args) { const { inputs, backend: backend2 } = args; const { input: input2 } = inputs; @@ -59763,7 +59419,7 @@ var ifftConfig2 = { kernelFunc: ifft3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/IsFinite.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/IsFinite.js var IS_FINITE = `return float(!isnan(x) && !isinf(x));`; var isFinite4 = unaryKernelFunc2({ opSnippet: IS_FINITE, dtype: "bool" }); var isFiniteConfig2 = { @@ -59772,7 +59428,7 @@ var isFiniteConfig2 = { kernelFunc: isFinite4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/IsInf.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/IsInf.js var IS_INF = `return float(isinf(x));`; var isInf3 = unaryKernelFunc2({ opSnippet: IS_INF, dtype: "bool" }); var isInfConfig2 = { @@ -59781,7 +59437,7 @@ var isInfConfig2 = { kernelFunc: isInf3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/IsNaN.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/IsNaN.js var IS_NAN = `return float(isnan(x));`; var isNaN4 = unaryKernelFunc2({ opSnippet: IS_NAN, dtype: "bool" }); var isNaNConfig2 = { @@ -59790,7 +59446,7 @@ var isNaNConfig2 = { kernelFunc: isNaN4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Less.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Less.js var LESS = `return float(a < b);`; var LESS_PACKED = ` return vec4(lessThan(a, b)); @@ -59807,7 +59463,7 @@ var lessConfig2 = { kernelFunc: less4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/LessEqual.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/LessEqual.js var LESS_EQUAL = `return float(a <= b);`; var LESS_EQUAL_PACKED = ` return vec4(lessThanEqual(a, b)); @@ -59824,7 +59480,7 @@ var lessEqualConfig2 = { kernelFunc: lessEqual3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/LinSpace.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/LinSpace.js function linSpace2(args) { const { backend: backend2, attrs } = args; const { start, stop, num } = attrs; @@ -59837,7 +59493,7 @@ var linSpaceConfig2 = { kernelFunc: linSpace2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Log.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Log.js var LOG = CHECK_NAN_SNIPPET_UNARY + ` return x < 0.0 ? 0./0. : log(x); `; @@ -59857,7 +59513,7 @@ var logConfig2 = { kernelFunc: log4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Log1p.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Log1p.js var LOG1P = CHECK_NAN_SNIPPET_UNARY + ` return log(1.0 + x); `; @@ -59868,7 +59524,7 @@ var log1pConfig2 = { kernelFunc: log1p3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/LogicalAnd.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/LogicalAnd.js var LOGICAL_AND = `return float(a >= 1.0 && b >= 1.0);`; var LOGICAL_AND_PACKED = ` return vec4( @@ -59886,7 +59542,7 @@ var logicalAndConfig2 = { kernelFunc: logicalAnd3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/LogicalNot.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/LogicalNot.js var LOGICAL_NOT = `return float(!(x >= 1.0));`; var logicalNot3 = unaryKernelFunc2({ opSnippet: LOGICAL_NOT }); var logicalNotConfig2 = { @@ -59895,7 +59551,7 @@ var logicalNotConfig2 = { kernelFunc: logicalNot3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/LogicalOr.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/LogicalOr.js var LOGICAL_OR = `return float(a >= 1.0 || b >= 1.0);`; var LOGICAL_OR_PACKED = ` return min( @@ -59910,7 +59566,7 @@ var logicalOrConfig2 = { kernelFunc: logicalOr3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/lrn_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/lrn_gpu.js var LRNProgram = class { constructor(xShape, radius, bias, alpha, beta) { this.variableNames = ["x"]; @@ -59950,7 +59606,7 @@ var LRNProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/lrn_packed_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/lrn_packed_gpu.js var LRNPackedProgram = class { constructor(xShape, radius, bias, alpha, beta) { this.variableNames = ["x"]; @@ -60035,7 +59691,7 @@ var LRNPackedProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/LRN.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/LRN.js var lrn = (args) => { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -60049,7 +59705,7 @@ var LRNConfig2 = { kernelFunc: lrn }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/lrn_grad_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/lrn_grad_gpu.js var LRNGradProgram = class { constructor(inputShape, depthRadius, bias, alpha, beta) { this.variableNames = ["inputImage", "outputImage", "dy"]; @@ -60119,7 +59775,7 @@ var LRNGradProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/LRNGrad.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/LRNGrad.js var lrnGrad = (args) => { const { inputs, backend: backend2, attrs } = args; const { x, y, dy } = inputs; @@ -60133,7 +59789,7 @@ var LRNGradConfig2 = { kernelFunc: lrnGrad }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Max_impl.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Max_impl.js function maxImpl2(x, reduceShape, outShape, backend2) { const inSize = util_exports.sizeFromShape(reduceShape); const xSize = util_exports.sizeFromShape(x.shape); @@ -60146,7 +59802,7 @@ function maxImpl2(x, reduceShape, outShape, backend2) { return reshapedOutput; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Max.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Max.js function max4(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -60163,8 +59819,8 @@ function max4(args) { const xTexData = backend2.texData.get(maxInput.dataId); const values = xTexData.values; const newShape = new Array(xRank); - for (let i = 0; i < newShape.length; i++) { - newShape[i] = x.shape[permutedAxes[i]]; + for (let i2 = 0; i2 < newShape.length; i2++) { + newShape[i2] = x.shape[permutedAxes[i2]]; } const maxInputValues = transposeImplCPU(values, x.shape, x.dtype, permutedAxes, newShape); maxInput = backend2.makeTensorInfo(newShape, x.dtype); @@ -60203,14 +59859,16 @@ var maxConfig2 = { kernelFunc: max4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Maximum.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Maximum.js var MAXIMUM = CHECK_NAN_SNIPPET2 + ` return max(a, b); `; var MAXIMUM_PACKED = ` vec4 result = vec4(max(a, b)); - vec4 isNaN = min(vec4(isnan(a)) + vec4(isnan(b)), vec4(1.0)); - ` + CHECK_NAN_SNIPPET3 + ` + bvec4 isNaNA = isnan(a); + bvec4 isNaNB = isnan(b); + bvec4 isNaN = bvec4(isNaNA.x || isNaNB.x, isNaNA.y || isNaNB.y, isNaNA.z || isNaNB.z, isNaNA.w || isNaNB.w); + ` + CHECK_NAN_SNIPPET_PACKED + ` return result; `; var maximum4 = binaryKernelFunc2({ @@ -60224,7 +59882,7 @@ var maximumConfig2 = { kernelFunc: maximum4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/MaxPool.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/MaxPool.js function maxPool3(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -60245,7 +59903,7 @@ var maxPoolConfig2 = { kernelFunc: maxPool3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/MaxPool3D.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/MaxPool3D.js function maxPool3d2(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -60261,7 +59919,7 @@ var maxPool3DConfig2 = { kernelFunc: maxPool3d2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/max_pool_backprop_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/max_pool_backprop_gpu.js var MaxPool2DBackpropProgram = class { constructor(convInfo) { this.variableNames = ["dy", "maxPos"]; @@ -60408,7 +60066,7 @@ var MaxPool3DBackpropProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/MaxPool3DGrad.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/MaxPool3DGrad.js function maxPool3DGrad2(args) { const { inputs, backend: backend2, attrs } = args; const { dy, input: input2 } = inputs; @@ -60429,7 +60087,7 @@ var maxPool3DGradConfig3 = { kernelFunc: maxPool3DGrad2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/MaxPoolGrad.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/MaxPoolGrad.js function maxPoolGrad3(args) { const { inputs, backend: backend2, attrs } = args; const { dy, input: input2, output } = inputs; @@ -60451,7 +60109,7 @@ var maxPoolGradConfig3 = { kernelFunc: maxPoolGrad3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/MaxPoolWithArgmax_impl.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/MaxPoolWithArgmax_impl.js function maxPoolWithArgmaxImpl2(x, includeBatchInIndex, convInfo, backend2) { let program = new Pool2DProgram(convInfo, "max", false); const poolOutput = backend2.runWebGLProgram(program, [x], "float32"); @@ -60460,7 +60118,7 @@ function maxPoolWithArgmaxImpl2(x, includeBatchInIndex, convInfo, backend2) { return [poolOutput, indexOutput]; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/MaxPoolWithArgmax.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/MaxPoolWithArgmax.js var maxPoolWithArgmaxConfig2 = { kernelName: MaxPoolWithArgmax, backendName: "webgl", @@ -60477,7 +60135,7 @@ var maxPoolWithArgmaxConfig2 = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Mean_impl.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Mean_impl.js function meanImpl(x, reduceShape, outShape, backend2) { const inSize = util_exports.sizeFromShape(reduceShape); const xSize = util_exports.sizeFromShape(x.shape); @@ -60490,7 +60148,7 @@ function meanImpl(x, reduceShape, outShape, backend2) { return reshapedOutput; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Mean.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Mean.js var meanConfig2 = { kernelName: Mean, backendName: "webgl", @@ -60511,8 +60169,8 @@ var meanConfig2 = { const xTexData = webglBackend.texData.get(meanInput.dataId); const values = xTexData.values; const newShape = new Array(xRank); - for (let i = 0; i < newShape.length; i++) { - newShape[i] = x.shape[permutedAxes[i]]; + for (let i2 = 0; i2 < newShape.length; i2++) { + newShape[i2] = x.shape[permutedAxes[i2]]; } const meanInputValues = transposeImplCPU(values, x.shape, x.dtype, permutedAxes, newShape); meanInput = webglBackend.makeTensorInfo(newShape, x.dtype); @@ -60531,14 +60189,14 @@ var meanConfig2 = { outShape = backend_util_exports.expandShapeToKeepDim(meanOutShape, origAxes); } const out = meanImpl(meanInput, reduceShape, outShape, webglBackend); - for (const i of intermediates) { - webglBackend.disposeIntermediateTensorInfo(i); + for (const i2 of intermediates) { + webglBackend.disposeIntermediateTensorInfo(i2); } return out; } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Min.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Min.js function min4(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -60577,14 +60235,16 @@ var minConfig2 = { kernelFunc: min4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Minimum.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Minimum.js var MINIMUM = CHECK_NAN_SNIPPET2 + ` return min(a, b); `; var MINIMUM_PACKED = ` vec4 result = vec4(min(a, b)); - vec4 isNaN = min(vec4(isnan(a)) + vec4(isnan(b)), vec4(1.0)); - ` + CHECK_NAN_SNIPPET3 + ` + bvec4 isNaNA = isnan(a); + bvec4 isNaNB = isnan(b); + bvec4 isNaN = bvec4(isNaNA.x || isNaNB.x, isNaNA.y || isNaNB.y, isNaNA.z || isNaNB.z, isNaNA.w || isNaNB.w); + ` + CHECK_NAN_SNIPPET_PACKED + ` return result; `; var minimum4 = binaryKernelFunc2({ @@ -60598,15 +60258,15 @@ var minimumConfig2 = { kernelFunc: minimum4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/mirror_pad_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/mirror_pad_gpu.js var MirrorPadProgram = class { constructor(xShape, paddings, mode) { this.variableNames = ["x"]; - this.outputShape = paddings.map((p2, i) => p2[0] + xShape[i] + p2[1]); + this.outputShape = paddings.map((p2, i2) => p2[0] + xShape[i2] + p2[1]); const rank = xShape.length; const dtype = getCoordsDataType(rank); const start = paddings.map((p2) => p2[0]).join(","); - const end = paddings.map((p2, i) => p2[0] + xShape[i]).join(","); + const end = paddings.map((p2, i2) => p2[0] + xShape[i2]).join(","); const unpackedCoords = ["coords[0]", "coords[1]", "coords[2]", "coords[3]"].slice(0, rank); const offset = mode === "reflect" ? 0 : 1; if (rank === 1) { @@ -60646,17 +60306,17 @@ var MirrorPadProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/mirror_pad_packed_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/mirror_pad_packed_gpu.js var MirrorPadPackedProgram = class { constructor(xShape, paddings, mode) { this.variableNames = ["x"]; this.packedInputs = true; this.packedOutput = true; - this.outputShape = paddings.map((p2, i) => p2[0] + xShape[i] + p2[1]); + this.outputShape = paddings.map((p2, i2) => p2[0] + xShape[i2] + p2[1]); const rank = xShape.length; const dtype = getCoordsDataType(rank); const start = paddings.map((p2) => p2[0]).join(","); - const end = paddings.map((p2, i) => p2[0] + xShape[i]).join(","); + const end = paddings.map((p2, i2) => p2[0] + xShape[i2]).join(","); const coords3 = getChannels("rc", rank); const source = getChannels("source", rank); const cLimit = `${coords3[rank - 1]} < ${this.outputShape[rank - 1]}`; @@ -60730,7 +60390,7 @@ var MirrorPadPackedProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/MirrorPad.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/MirrorPad.js var mirrorPadKernelFunc = ({ inputs, backend: backend2, attrs }) => { const { x } = inputs; const { paddings, mode } = attrs; @@ -60744,13 +60404,13 @@ var mirrorPadConfig2 = { kernelFunc: mirrorPadKernelFunc }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Mod.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Mod.js var MOD = `if (b == 0.0) return NAN; return mod(a, b);`; var MOD_PACKED = ` vec4 result = mod(a, b); - vec4 isNaN = vec4(equal(b, vec4(0.0))); - ` + CHECK_NAN_SNIPPET3 + ` + bvec4 isNaN = equal(b, vec4(0.0)); + ` + CHECK_NAN_SNIPPET_PACKED + ` return result; `; var mod3 = binaryKernelFunc2({ @@ -60763,7 +60423,7 @@ var modConfig2 = { kernelFunc: mod3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/multinomial_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/multinomial_gpu.js var MultinomialProgram = class { constructor(batchSize, numOutcomes, numSamples) { this.variableNames = ["probs"]; @@ -60793,7 +60453,7 @@ var MultinomialProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/RealDiv.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/RealDiv.js var DIV = ` if (a == b) { return 1.0; @@ -60825,7 +60485,7 @@ var realDivConfig2 = { kernelFunc: realDiv }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Sub.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Sub.js var SUB = "return a - b;"; var sub3 = binaryKernelFunc2({ opSnippet: SUB, @@ -60839,7 +60499,7 @@ var subConfig2 = { kernelFunc: sub3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Softmax.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Softmax.js function softmax4(args) { const { inputs, backend: backend2, attrs } = args; const { logits } = inputs; @@ -60871,7 +60531,7 @@ var softmaxConfig2 = { kernelFunc: softmax4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Multinomial.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Multinomial.js function multinomial3(args) { const { inputs, backend: backend2, attrs } = args; const { logits } = inputs; @@ -60893,7 +60553,7 @@ var multinomialConfig2 = { kernelFunc: multinomial3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Neg.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Neg.js var NEG = CHECK_NAN_SNIPPET + ` return -x; `; @@ -60930,7 +60590,7 @@ var negConfig2 = { kernelFunc: neg3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/NonMaxSuppressionV3.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/NonMaxSuppressionV3.js var nonMaxSuppressionV3Impl3 = kernel_impls_exports.nonMaxSuppressionV3Impl; function nonMaxSuppressionV32(args) { backend_util_exports.warn("tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead"); @@ -60948,7 +60608,7 @@ var nonMaxSuppressionV3Config2 = { kernelFunc: nonMaxSuppressionV32 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/NonMaxSuppressionV4.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/NonMaxSuppressionV4.js var nonMaxSuppressionV4Impl3 = kernel_impls_exports.nonMaxSuppressionV4Impl; function nonMaxSuppressionV42(args) { backend_util_exports.warn("tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead"); @@ -60969,7 +60629,7 @@ var nonMaxSuppressionV4Config2 = { kernelFunc: nonMaxSuppressionV42 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/NonMaxSuppressionV5.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/NonMaxSuppressionV5.js var nonMaxSuppressionV5Impl3 = kernel_impls_exports.nonMaxSuppressionV5Impl; function nonMaxSuppressionV52(args) { backend_util_exports.warn("tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead"); @@ -60994,7 +60654,7 @@ var nonMaxSuppressionV5Config2 = { kernelFunc: nonMaxSuppressionV52 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/onehot_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/onehot_gpu.js var OneHotProgram = class { constructor(numIndices, depth, onValue, offValue) { this.variableNames = ["indices"]; @@ -61010,7 +60670,7 @@ var OneHotProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/OneHot.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/OneHot.js var oneHot3 = (args) => { const { inputs, backend: backend2, attrs } = args; const { indices } = inputs; @@ -61031,20 +60691,20 @@ var oneHotConfig2 = { kernelFunc: oneHot3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ZerosLike.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ZerosLike.js function zerosLike3(args) { const { inputs, backend: backend2 } = args; const { x } = inputs; if (x.dtype === "complex64") { const realPart = real3({ inputs: { input: x }, backend: backend2 }); - const r = zerosLike3({ inputs: { x: realPart }, backend: backend2 }); + const r2 = zerosLike3({ inputs: { x: realPart }, backend: backend2 }); const imagPart = imag3({ inputs: { input: x }, backend: backend2 }); - const i = zerosLike3({ inputs: { x: imagPart }, backend: backend2 }); - const result = complex3({ inputs: { real: r, imag: i }, backend: backend2 }); + const i2 = zerosLike3({ inputs: { x: imagPart }, backend: backend2 }); + const result = complex3({ inputs: { real: r2, imag: i2 }, backend: backend2 }); backend2.disposeIntermediateTensorInfo(realPart); - backend2.disposeIntermediateTensorInfo(r); + backend2.disposeIntermediateTensorInfo(r2); backend2.disposeIntermediateTensorInfo(imagPart); - backend2.disposeIntermediateTensorInfo(i); + backend2.disposeIntermediateTensorInfo(i2); return result; } else { return fill3({ @@ -61063,7 +60723,7 @@ var zerosLikeConfig2 = { kernelFunc: zerosLike3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/OnesLike.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/OnesLike.js function onesLike3(args) { const { inputs, backend: backend2 } = args; const { x } = inputs; @@ -61071,14 +60731,14 @@ function onesLike3(args) { throw new Error("onesLike is not supported under string dtype"); } else if (x.dtype === "complex64") { const realPart = real3({ inputs: { input: x }, backend: backend2 }); - const r = onesLike3({ inputs: { x: realPart }, backend: backend2 }); + const r2 = onesLike3({ inputs: { x: realPart }, backend: backend2 }); const imagPart = imag3({ inputs: { input: x }, backend: backend2 }); - const i = zerosLike3({ inputs: { x: imagPart }, backend: backend2 }); - const result = complex3({ inputs: { real: r, imag: i }, backend: backend2 }); + const i2 = zerosLike3({ inputs: { x: imagPart }, backend: backend2 }); + const result = complex3({ inputs: { real: r2, imag: i2 }, backend: backend2 }); backend2.disposeIntermediateTensorInfo(realPart); - backend2.disposeIntermediateTensorInfo(r); + backend2.disposeIntermediateTensorInfo(r2); backend2.disposeIntermediateTensorInfo(imagPart); - backend2.disposeIntermediateTensorInfo(i); + backend2.disposeIntermediateTensorInfo(i2); return result; } else { return fill3({ attrs: { shape: x.shape, dtype: x.dtype, value: 1 }, backend: backend2 }); @@ -61090,7 +60750,7 @@ var onesLikeConfig2 = { kernelFunc: onesLike3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Pack.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Pack.js function pack2(args) { const { inputs, backend: backend2, attrs } = args; const { axis } = attrs; @@ -61099,18 +60759,18 @@ function pack2(args) { } const shape = inputs[0].shape; const dtype = inputs[0].dtype; - inputs.forEach((t) => { - util_exports.assertShapesMatch(shape, t.shape, "All tensors passed to stack must have matching shapes"); - util_exports.assert(dtype === t.dtype, () => "All tensors passed to stack must have matching dtypes"); + inputs.forEach((t2) => { + util_exports.assertShapesMatch(shape, t2.shape, "All tensors passed to stack must have matching shapes"); + util_exports.assert(dtype === t2.dtype, () => "All tensors passed to stack must have matching dtypes"); }); const intermediateTensorInfos = []; - const expandedTensors = inputs.map((t) => { - const expandedT = expandDims4({ inputs: { input: t }, backend: backend2, attrs: { dim: axis } }); + const expandedTensors = inputs.map((t2) => { + const expandedT = expandDims4({ inputs: { input: t2 }, backend: backend2, attrs: { dim: axis } }); intermediateTensorInfos.push(expandedT); return expandedT; }); const result = concat3({ inputs: expandedTensors, backend: backend2, attrs: { axis } }); - intermediateTensorInfos.forEach((t) => backend2.disposeIntermediateTensorInfo(t)); + intermediateTensorInfos.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2)); return result; } var packConfig2 = { @@ -61119,16 +60779,16 @@ var packConfig2 = { kernelFunc: pack2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/pad_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/pad_gpu.js var PadProgram = class { constructor(xShape, paddings, constantValue) { this.variableNames = ["x"]; this.customUniforms = [{ name: "value", type: "float" }]; - this.outputShape = paddings.map((p2, i) => p2[0] + xShape[i] + p2[1]); + this.outputShape = paddings.map((p2, i2) => p2[0] + xShape[i2] + p2[1]); const rank = xShape.length; const type = getCoordsDataType(rank); const start = paddings.map((p2) => p2[0]).join(","); - const end = paddings.map((p2, i) => p2[0] + xShape[i]).join(","); + const end = paddings.map((p2, i2) => p2[0] + xShape[i2]).join(","); const unpackedCoords = ["coords[0]", "coords[1]", "coords[2]", "coords[3]"].slice(0, rank); if (rank === 1) { this.userCode = ` @@ -61163,18 +60823,18 @@ var PadProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/pad_packed_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/pad_packed_gpu.js var PadPackedProgram = class { constructor(xShape, paddings, constantValue) { this.variableNames = ["x"]; this.packedInputs = true; this.packedOutput = true; this.customUniforms = [{ name: "value", type: "float" }]; - this.outputShape = paddings.map((p2, i) => p2[0] + xShape[i] + p2[1]); + this.outputShape = paddings.map((p2, i2) => p2[0] + xShape[i2] + p2[1]); const rank = xShape.length; const dtype = getCoordsDataType(rank); const start = paddings.map((p2) => p2[0]).join(","); - const end = paddings.map((p2, i) => p2[0] + xShape[i]).join(","); + const end = paddings.map((p2, i2) => p2[0] + xShape[i2]).join(","); const coords3 = getChannels("rc", rank); const source = getChannels("source", rank); const cLimit = `${coords3[rank - 1]} < ${this.outputShape[rank - 1]}`; @@ -61193,14 +60853,14 @@ var PadPackedProgram = class { ]; const paddingArea = rank === 1 ? "rc < start || rc >= end" : "any(lessThan(rc, start)) || any(greaterThanEqual(rc, end))"; let mainLoop = ""; - for (let i = 0, j = rank === 1 ? 2 : 4; i < j; i++) { + for (let i2 = 0, j = rank === 1 ? 2 : 4; i2 < j; i2++) { mainLoop += ` - ${componentSetup[i]} + ${componentSetup[i2]} if (${paddingArea}) { - result[${i}] = float(value); + result[${i2}] = float(value); } else { ${dtype} source = rc - start; - result[${i}] = getChannel(getX(${source.join()}), ${innerDims}); + result[${i2}] = getChannel(getX(${source.join()}), ${innerDims}); } `; } @@ -61219,13 +60879,13 @@ var PadPackedProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/PadV2.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/PadV2.js var padV22 = (args) => { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; const { paddings, constantValue } = attrs; if (util_exports.sizeFromShape(x.shape) === 0) { - const outputShape = paddings.map((p2, i) => p2[0] + x.shape[i] + p2[1]); + const outputShape = paddings.map((p2, i2) => p2[0] + x.shape[i2] + p2[1]); return fill3({ backend: backend2, attrs: { shape: outputShape, value: constantValue, dtype: x.dtype } @@ -61241,7 +60901,7 @@ var padV2Config2 = { kernelFunc: padV22 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Pow.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Pow.js var POW = ` if(a < 0.0 && floor(b) < b){ return NAN; @@ -61265,8 +60925,10 @@ var POW_PACKED = ` result.b = isExpZero.b ? 1.0 : result.b; result.a = isExpZero.a ? 1.0 : result.a; - vec4 isNaN = vec4(lessThan(a, vec4(0.0))) * vec4(lessThan(floor(b), b)); - ` + CHECK_NAN_SNIPPET3 + ` + bvec4 isNaN1 = lessThan(a, vec4(0.0)); + bvec4 isNaN2 = lessThan(floor(b), b); + bvec4 isNaN = bvec4(isNaN1.x && isNaN2.x, isNaN1.y && isNaN2.y, isNaN1.z && isNaN2.z, isNaN1.w && isNaN2.w); + ` + CHECK_NAN_SNIPPET_PACKED + ` return result; `; var pow3 = binaryKernelFunc2({ opSnippet: POW, packedOpSnippet: POW_PACKED }); @@ -61276,7 +60938,7 @@ var powConfig2 = { kernelFunc: pow3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Prod.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Prod.js function prod3(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -61313,7 +60975,7 @@ function prod3(args) { const newShape = backend_util_exports.expandShapeToKeepDim(res.shape, origAxes); res = reshape4({ inputs: { x: res }, backend: backend2, attrs: { shape: newShape } }); } - toDispose.forEach((t) => backend2.disposeIntermediateTensorInfo(t)); + toDispose.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2)); return res; } var prodConfig2 = { @@ -61322,7 +60984,27 @@ var prodConfig2 = { kernelFunc: prod3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/RaggedTensorToTensor.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/RaggedGather.js +function raggedGather3(args) { + const { inputs, backend: backend2, attrs } = args; + const { paramsNestedSplits, paramsDenseValues, indices } = inputs; + const { outputRaggedRank } = attrs; + const $paramsNestedSplits = paramsNestedSplits.map((t2) => backend2.readSync(t2.dataId)); + const $paramsNestedSplitsShapes = paramsNestedSplits.map((t2) => t2.shape); + const $paramsDenseValues = backend2.readSync(paramsDenseValues.dataId); + const $indices = backend2.readSync(indices.dataId); + const [outputNestedSplits, outputDenseValues, outputDenseValuesShape] = raggedGatherImplCPU($paramsNestedSplits, $paramsNestedSplitsShapes, $paramsDenseValues, paramsDenseValues.shape, paramsDenseValues.dtype, $indices, indices.shape, outputRaggedRank); + const outputNestedSplitsTensors = outputNestedSplits.map((splits) => backend2.makeTensorInfo([splits.length], "int32", splits)); + const outputDenseValuesTensor = backend2.makeTensorInfo(outputDenseValuesShape, paramsDenseValues.dtype, outputDenseValues); + return outputNestedSplitsTensors.concat([outputDenseValuesTensor]); +} +var raggedGatherConfig2 = { + kernelName: RaggedGather, + backendName: "webgl", + kernelFunc: raggedGather3 +}; + +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/RaggedTensorToTensor.js function raggedTensorToTensor3(args) { const { inputs, backend: backend2, attrs } = args; const { shape, values, defaultValue, rowPartitionTensors } = inputs; @@ -61330,8 +61012,8 @@ function raggedTensorToTensor3(args) { const $shape = backend2.readSync(shape.dataId); const $values = backend2.readSync(values.dataId); const $defaultValue = backend2.readSync(defaultValue.dataId); - const $rowPartitionValues = rowPartitionTensors.map((t) => backend2.readSync(t.dataId)); - const rowPartitionValuesShapes = rowPartitionTensors.map((t) => t.shape); + const $rowPartitionValues = rowPartitionTensors.map((t2) => backend2.readSync(t2.dataId)); + const rowPartitionValuesShapes = rowPartitionTensors.map((t2) => t2.shape); const [outputShape, output] = raggedTensorToTensorImplCPU($shape, shape.shape, $values, values.shape, values.dtype, $defaultValue, defaultValue.shape, $rowPartitionValues, rowPartitionValuesShapes, rowPartitionTypes); return backend2.makeTensorInfo(outputShape, values.dtype, output); } @@ -61341,7 +61023,7 @@ var raggedTensorToTensorConfig2 = { kernelFunc: raggedTensorToTensor3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Range.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Range.js var range4 = (args) => { const { backend: backend2, attrs } = args; const { start, stop, step: step5, dtype } = attrs; @@ -61354,7 +61036,7 @@ var rangeConfig2 = { kernelFunc: range4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Reciprocal.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Reciprocal.js var RECIPROCAL = `return 1.0 / x;`; var reciprocal3 = unaryKernelFunc2({ opSnippet: RECIPROCAL }); var reciprocalConfig2 = { @@ -61363,7 +61045,7 @@ var reciprocalConfig2 = { kernelFunc: reciprocal3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Relu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Relu.js var RELU3 = CHECK_NAN_SNIPPET + ` return (x < 0.0) ? 0.0 : x; `; @@ -61385,7 +61067,7 @@ var reluConfig2 = { kernelFunc: relu3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Relu6.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Relu6.js var RELU63 = CHECK_NAN_SNIPPET + ` return (x < 0.0) ? 0.0 : min(6.0, x); `; @@ -61407,7 +61089,7 @@ var relu6Config2 = { kernelFunc: relu63 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/resize_bilinear_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/resize_bilinear_gpu.js var ResizeBilinearProgram = class { constructor(inputShape, newHeight, newWidth, alignCorners, halfPixelCenters) { this.variableNames = ["A"]; @@ -61465,7 +61147,7 @@ var ResizeBilinearProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/resize_bilinear_packed_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/resize_bilinear_packed_gpu.js var ResizeBilinearPackedProgram = class { constructor(inputShape, newHeight, newWidth, alignCorners, halfPixelCenters) { this.variableNames = ["A"]; @@ -61569,7 +61251,7 @@ var ResizeBilinearPackedProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ResizeBilinear.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ResizeBilinear.js function resizeBilinear3(args) { const { inputs, backend: backend2, attrs } = args; const { images } = inputs; @@ -61584,7 +61266,7 @@ var resizeBilinearConfig2 = { kernelFunc: resizeBilinear3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/resize_bilinear_backprop_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/resize_bilinear_backprop_gpu.js var ResizeBilinearBackpropProgram = class { constructor(dyShape, inputShape, alignCorners) { this.variableNames = ["dy"]; @@ -61691,7 +61373,7 @@ var ResizeBilinearBackpropProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ResizeBilinearGrad.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ResizeBilinearGrad.js function resizeBilinearGrad2(args) { const { inputs, backend: backend2, attrs } = args; const { images, dy } = inputs; @@ -61705,7 +61387,7 @@ var resizeBilinearGradConfig3 = { kernelFunc: resizeBilinearGrad2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/resize_nearest_neighbor_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/resize_nearest_neighbor_gpu.js var ResizeNearestNeighborProgram = class { constructor(inputShape, newHeight, newWidth, alignCorners, halfPixelCenters) { this.variableNames = ["A"]; @@ -61753,7 +61435,7 @@ var ResizeNearestNeighborProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/resize_nearest_neighbor_packed_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/resize_nearest_neighbor_packed_gpu.js var ResizeNearestNeighborPackedProgram = class { constructor(inputShape, newHeight, newWidth, alignCorners, halfPixelCenters) { this.variableNames = ["A"]; @@ -61822,7 +61504,7 @@ var ResizeNearestNeighborPackedProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ResizeNearestNeighbor.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ResizeNearestNeighbor.js function resizeNearestNeighbor3(args) { const { inputs, backend: backend2, attrs } = args; const { images } = inputs; @@ -61837,7 +61519,7 @@ var resizeNearestNeighborConfig2 = { kernelFunc: resizeNearestNeighbor3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/resize_nearest_neighbor_backprop_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/resize_nearest_neighbor_backprop_gpu.js var ResizeNearestNeigborBackpropProgram = class { constructor(dyShape, inputShape, alignCorners) { this.variableNames = ["dy"]; @@ -61933,7 +61615,7 @@ var ResizeNearestNeigborBackpropProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ResizeNearestNeighborGrad.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ResizeNearestNeighborGrad.js function resizeNearestNeighborGrad2(args) { const { inputs, backend: backend2, attrs } = args; const { images, dy } = inputs; @@ -61947,7 +61629,7 @@ var resizeNearestNeighborGradConfig3 = { kernelFunc: resizeNearestNeighborGrad2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/reverse_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/reverse_gpu.js var ReverseProgram = class { constructor(xShape, axis) { this.variableNames = ["x"]; @@ -61965,13 +61647,13 @@ var ReverseProgram = class { `; return; } - const getInCoord = (i) => { - if (axis.indexOf(i) !== -1 && xShape[i] !== 1) { - return `${xShape[i]} - coords[${i}] - 1`; + const getInCoord = (i2) => { + if (axis.indexOf(i2) !== -1 && xShape[i2] !== 1) { + return `${xShape[i2]} - coords[${i2}] - 1`; } - return `coords[${i}]`; + return `coords[${i2}]`; }; - const inCoords = xShape.map((_, i) => getInCoord(i)).join(","); + const inCoords = xShape.map((_, i2) => getInCoord(i2)).join(","); const type = getCoordsDataType(rank); this.userCode = ` void main() { @@ -61982,7 +61664,7 @@ var ReverseProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/reverse_packed_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/reverse_packed_gpu.js var ReversePackedProgram = class { constructor(xShape, axis) { this.variableNames = ["x"]; @@ -62047,22 +61729,22 @@ var ReversePackedProgram = class { return getChannel(channels2); } function getChannel(channels2) { - const inCoordsArray = xShape.map((_, i) => getInCoord(i, channels2)); + const inCoordsArray = xShape.map((_, i2) => getInCoord(i2, channels2)); const inCoords = inCoordsArray.join(","); const innerDims = inCoordsArray.slice(-2).join(","); return `getChannel(getX(${inCoords}), vec2(${innerDims}))`; } - function getInCoord(i, channels1) { - if (axis.indexOf(i) !== -1 && xShape[i] !== 1) { - return `${xShape[i]} - ${channels1[i]} - 1`; + function getInCoord(i2, channels1) { + if (axis.indexOf(i2) !== -1 && xShape[i2] !== 1) { + return `${xShape[i2]} - ${channels1[i2]} - 1`; } else { - return `${channels1[i]}`; + return `${channels1[i2]}`; } } } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Reverse.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Reverse.js function reverse3(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -62081,7 +61763,7 @@ var reverseConfig2 = { kernelFunc: reverse3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/rotate_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/rotate_gpu.js var RotateProgram = class { constructor(imageShape, fillValue) { this.variableNames = ["Image"]; @@ -62119,7 +61801,7 @@ var RotateProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/RotateWithOffset.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/RotateWithOffset.js var rotateWithOffsetConfig2 = { kernelName: RotateWithOffset, backendName: "webgl", @@ -62135,7 +61817,7 @@ var rotateWithOffsetConfig2 = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Round.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Round.js var ROUND = ` // OpenGL ES does not support round function. // The algorithm is based on banker's rounding. @@ -62159,7 +61841,7 @@ var roundConfig2 = { kernelFunc: round4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Rsqrt.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Rsqrt.js var RSQRT = `return inversesqrt(x);`; var rsqrt3 = unaryKernelFunc2({ opSnippet: RSQRT, cpuKernelImpl: rsqrtImplCPU }); var rsqrtConfig2 = { @@ -62168,7 +61850,7 @@ var rsqrtConfig2 = { kernelFunc: rsqrt3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/scatter_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/scatter_gpu.js var ScatterProgram = class { constructor(updateSize, sliceDim, indicesRank, updatesRank, strides, shape, summingDupeIndex = true) { this.variableNames = ["updates", "indices", "defaultValue"]; @@ -62214,7 +61896,7 @@ var ScatterProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ScatterNd.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/ScatterNd.js function scatterNd2(args) { const { inputs, backend: backend2, attrs } = args; const { indices, updates } = inputs; @@ -62242,7 +61924,7 @@ var scatterNdConfig2 = { kernelFunc: scatterNd2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/search_sorted_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/search_sorted_gpu.js var SearchSortedProgram = class { constructor(batchSize, numInputs, numValues, side) { this.variableNames = ["sortedSequence", "values"]; @@ -62281,7 +61963,7 @@ var SearchSortedProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/SearchSorted.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/SearchSorted.js function searchSorted3(args) { const { inputs, backend: backend2, attrs } = args; const { sortedSequence, values } = inputs; @@ -62296,7 +61978,7 @@ var searchSortedConfig2 = { kernelFunc: searchSorted3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/select_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/select_gpu.js var SelectProgram = class { constructor(cRank, shape, rank) { this.variableNames = ["c", "a", "b"]; @@ -62313,10 +61995,10 @@ var SelectProgram = class { const currentCoords = ["resRC.x", "resRC.y", "resRC.z", "resRC.w"]; const cCoordVars = []; const abCoordVars = []; - for (let i = 0; i < shape.length; i++) { - abCoordVars.push(`${currentCoords[i]}`); - if (i < cRank) { - cCoordVars.push(`${currentCoords[i]}`); + for (let i2 = 0; i2 < shape.length; i2++) { + abCoordVars.push(`${currentCoords[i2]}`); + if (i2 < cRank) { + cCoordVars.push(`${currentCoords[i2]}`); } } cCoords = cCoordVars.join(); @@ -62337,12 +62019,12 @@ var SelectProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Select.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Select.js function select3(args) { const { inputs, backend: backend2 } = args; - const { condition, t, e } = inputs; - const program = new SelectProgram(condition.shape.length, t.shape, t.shape.length); - return backend2.runWebGLProgram(program, [condition, t, e], upcastType(t.dtype, e.dtype)); + const { condition, t: t2, e: e2 } = inputs; + const program = new SelectProgram(condition.shape.length, t2.shape, t2.shape.length); + return backend2.runWebGLProgram(program, [condition, t2, e2], upcastType(t2.dtype, e2.dtype)); } var selectConfig2 = { kernelName: Select, @@ -62350,7 +62032,7 @@ var selectConfig2 = { kernelFunc: select3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Selu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Selu.js var SELU = ` // Stable and Attracting Fixed Point (0, 1) for Normalized Weights. // see: https://arxiv.org/abs/1706.02515 @@ -62365,7 +62047,7 @@ var seluConfig2 = { kernelFunc: selu3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Sigmoid.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Sigmoid.js var SIGMOID3 = CHECK_NAN_SNIPPET_UNARY + ` return 1.0 / (1.0 + exp(-1.0 * x)); `; @@ -62391,7 +62073,7 @@ var sigmoidConfig2 = { kernelFunc: sigmoid3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Sign.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Sign.js var SIGN = ` if (isnan(x)) { return 0.0; } return sign(x); @@ -62403,7 +62085,7 @@ var signConfig2 = { kernelFunc: sign3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Sin.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Sin.js var SIN = CHECK_NAN_SNIPPET_UNARY + ` return sin(x); `; @@ -62414,7 +62096,7 @@ var sinConfig2 = { kernelFunc: sin3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Sinh.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Sinh.js var SINH = ` float e2x = exp(x); return (e2x - 1.0 / e2x) / 2.0; @@ -62426,7 +62108,7 @@ var sinhConfig2 = { kernelFunc: sinh3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Softplus.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Softplus.js var SOFTPLUS = ` float epsilon = 1.1920928955078125e-7; float threshold = log(epsilon) + 2.0; @@ -62455,7 +62137,7 @@ var softplusConfig2 = { kernelFunc: softplus3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/SpaceToBatchND.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/SpaceToBatchND.js var spaceToBatchND3 = (args) => { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -62464,7 +62146,7 @@ var spaceToBatchND3 = (args) => { const prod6 = blockShape.reduce((a, b) => a * b); const completePaddings = [[0, 0]]; completePaddings.push(...paddings); - for (let i = 1 + blockShape.length; i < x.shape.length; ++i) { + for (let i2 = 1 + blockShape.length; i2 < x.shape.length; ++i2) { completePaddings.push([0, 0]); } const toDispose = []; @@ -62486,7 +62168,7 @@ var spaceToBatchND3 = (args) => { toDispose.push(paddedX); toDispose.push(reshapedPaddedX); toDispose.push(paddedXT); - toDispose.forEach((t) => backend2.disposeIntermediateTensorInfo(t)); + toDispose.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2)); return result; }; var spaceToBatchNDConfig2 = { @@ -62495,7 +62177,7 @@ var spaceToBatchNDConfig2 = { kernelFunc: spaceToBatchND3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/SparseFillEmptyRows.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/SparseFillEmptyRows.js function sparseFillEmptyRows3(args) { const { inputs, backend: backend2 } = args; const { indices, values, denseShape, defaultValue } = inputs; @@ -62533,7 +62215,7 @@ var sparseFillEmptyRowsConfig2 = { kernelFunc: sparseFillEmptyRows3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/SparseReshape.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/SparseReshape.js function sparseReshape3(args) { const { inputs, backend: backend2 } = args; const { inputIndices, inputShape, newShape } = inputs; @@ -62561,7 +62243,7 @@ var sparseReshapeConfig2 = { kernelFunc: sparseReshape3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/SparseSegmentMean.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/SparseSegmentMean.js function sparseSegmentMean3(args) { const { inputs, backend: backend2 } = args; const { data, indices, segmentIds } = inputs; @@ -62588,7 +62270,7 @@ var sparseSegmentMeanConfig2 = { kernelFunc: sparseSegmentMean3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/SparseSegmentSum.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/SparseSegmentSum.js function sparseSegmentSum3(args) { const { inputs, backend: backend2 } = args; const { data, indices, segmentIds } = inputs; @@ -62615,7 +62297,7 @@ var sparseSegmentSumConfig2 = { kernelFunc: sparseSegmentSum3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/SparseToDense.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/SparseToDense.js function sparseToDense3(args) { const { inputs, backend: backend2, attrs } = args; const { sparseIndices, sparseValues, defaultValue } = inputs; @@ -62641,7 +62323,7 @@ var sparseToDenseConfig2 = { kernelFunc: sparseToDense3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/SplitV.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/SplitV.js function splitV2(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -62651,11 +62333,11 @@ function splitV2(args) { const xRank = x.shape.length; const begin = new Array(xRank).fill(0); const size = x.shape.slice(); - return splitSizes.map((s) => { + return splitSizes.map((s2) => { const sliceSize = [...size]; - sliceSize[$axis] = s; + sliceSize[$axis] = s2; const sliceT = slice3({ inputs: { x }, backend: backend2, attrs: { begin, size: sliceSize } }); - begin[$axis] += s; + begin[$axis] += s2; return sliceT; }); } @@ -62665,7 +62347,7 @@ var splitVConfig2 = { kernelFunc: splitV2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Sqrt.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Sqrt.js var SQRT = `return sqrt(x);`; var sqrt3 = unaryKernelFunc2({ opSnippet: SQRT, packedOpSnippet: SQRT, cpuKernelImpl: sqrtImplCPU }); var sqrtConfig2 = { @@ -62674,7 +62356,7 @@ var sqrtConfig2 = { kernelFunc: sqrt3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Square.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Square.js var SQUARE = `return x * x;`; var square3 = unaryKernelFunc2({ opSnippet: SQUARE }); var squareConfig2 = { @@ -62683,7 +62365,7 @@ var squareConfig2 = { kernelFunc: square3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/SquaredDifference.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/SquaredDifference.js var SQUARED_DIFFERENCE = "return (a - b) * (a - b);"; var squaredDifference3 = binaryKernelFunc2({ opSnippet: SQUARED_DIFFERENCE, packedOpSnippet: SQUARED_DIFFERENCE }); var squaredDifferenceConfig2 = { @@ -62692,7 +62374,7 @@ var squaredDifferenceConfig2 = { kernelFunc: squaredDifference3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Step.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Step.js function step3({ inputs, attrs, backend: backend2 }) { const { x } = inputs; const opSnippet = CHECK_NAN_SNIPPET + ` @@ -62707,7 +62389,7 @@ var stepConfig2 = { kernelFunc: step3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/strided_slice_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/strided_slice_gpu.js var StridedSliceProgram = class { constructor(begin, strides, size) { this.variableNames = ["x"]; @@ -62720,9 +62402,9 @@ var StridedSliceProgram = class { newCoords = "coords * strides + begin"; } else { let outputAxis = 0; - newCoords = size.map((_, i) => { + newCoords = size.map((_, i2) => { outputAxis++; - return size.length === 1 ? `coords * strides[${i}] + begin[${i}]` : `coords[${outputAxis - 1}] * strides[${i}] + begin[${i}]`; + return size.length === 1 ? `coords * strides[${i2}] + begin[${i2}]` : `coords[${outputAxis - 1}] * strides[${i2}] + begin[${i2}]`; }).join(","); } this.userCode = ` @@ -62737,7 +62419,7 @@ var StridedSliceProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/StridedSlice.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/StridedSlice.js function stridedSlice3(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -62774,7 +62456,7 @@ var stridedSliceConfig2 = { kernelFunc: stridedSlice3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/StringNGrams.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/StringNGrams.js function stringNGrams3(args) { const { inputs, backend: backend2, attrs } = args; const { separator, nGramWidths, leftPad, rightPad: rightPad2, padWidth, preserveShortSequences } = attrs; @@ -62793,7 +62475,7 @@ var stringNGramsConfig2 = { kernelFunc: stringNGrams3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/StringSplit.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/StringSplit.js function stringSplit3(args) { const { inputs, backend: backend2, attrs } = args; const { skipEmpty } = attrs; @@ -62823,7 +62505,7 @@ var stringSplitConfig2 = { kernelFunc: stringSplit3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/StringToHashBucketFast.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/StringToHashBucketFast.js function stringToHashBucketFast3(args) { const { inputs, backend: backend2, attrs } = args; const { numBuckets } = attrs; @@ -62844,7 +62526,7 @@ var stringToHashBucketFastConfig2 = { kernelFunc: stringToHashBucketFast3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Tan.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Tan.js var TAN = `return tan(x);`; var tan3 = unaryKernelFunc2({ opSnippet: TAN }); var tanConfig2 = { @@ -62853,7 +62535,7 @@ var tanConfig2 = { kernelFunc: tan3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Tanh.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Tanh.js var TANH = ` float e2x = exp(-2.0 * abs(x)); return sign(x) * (1.0 - e2x) / (1.0 + e2x); @@ -62865,13 +62547,13 @@ var tanhConfig2 = { kernelFunc: tanh4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/tile_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/tile_gpu.js var TileProgram = class { constructor(aShape, reps) { this.variableNames = ["A"]; const outputShape = new Array(aShape.length); - for (let i = 0; i < outputShape.length; i++) { - outputShape[i] = aShape[i] * reps[i]; + for (let i2 = 0; i2 < outputShape.length; i2++) { + outputShape[i2] = aShape[i2] * reps[i2]; } this.outputShape = outputShape; this.rank = outputShape.length; @@ -62895,13 +62577,13 @@ function getSourceCoords3(aShape) { } const currentCoords = ["resRC.x", "resRC.y", "resRC.z", "resRC.w", "resRC.u"]; const sourceCoords = []; - for (let i = 0; i < aShape.length; i++) { - sourceCoords.push(`imod(${currentCoords[i]}, ${aShape[i]})`); + for (let i2 = 0; i2 < aShape.length; i2++) { + sourceCoords.push(`imod(${currentCoords[i2]}, ${aShape[i2]})`); } return sourceCoords.join(); } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Tile.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Tile.js function tile4(params) { const { inputs, backend: backend2, attrs } = params; const { x } = inputs; @@ -62923,7 +62605,7 @@ var tileConfig2 = { kernelFunc: tile4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/top_k_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/top_k_gpu.js var SwapProgram = class { constructor(shape) { this.variableNames = ["x", "indices"]; @@ -63025,7 +62707,7 @@ var MergeProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/TopK.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/TopK.js function disposeIntermediateTensorInfoOrNull(backend2, tensorInfo) { if (tensorInfo !== null) { backend2.disposeIntermediateTensorInfo(tensorInfo); @@ -63130,7 +62812,7 @@ var topKConfig2 = { kernelFunc: topK2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/transform_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/transform_gpu.js var TransformProgram = class { constructor(imageHeight, imageWidth, interpolation, fillMode, fillValue, outShape) { this.variableNames = ["Image", "Transforms"]; @@ -63270,7 +62952,7 @@ var TransformProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Transform.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Transform.js function transform3(args) { const { inputs, backend: backend2, attrs } = args; const { image: image2, transforms } = inputs; @@ -63292,7 +62974,7 @@ var transformConfig2 = { kernelFunc: transform3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Unique.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Unique.js function unique4(args) { const { inputs, attrs, backend: backend2 } = args; const { axis } = attrs; @@ -63312,7 +62994,7 @@ var uniqueConfig2 = { kernelFunc: unique4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Unpack.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/Unpack.js function unpack2(args) { const { inputs, backend: backend2, attrs } = args; const { value } = inputs; @@ -63325,9 +63007,9 @@ function unpack2(args) { const num = value.shape[axis]; const outShape = new Array(xRank - 1); let outIndex = 0; - for (let i = 0; i < xRank; i++) { - if (i !== axis) { - outShape[outIndex++] = x.shape[i]; + for (let i2 = 0; i2 < xRank; i2++) { + if (i2 !== axis) { + outShape[outIndex++] = x.shape[i2]; } } const toDispose = []; @@ -63335,14 +63017,14 @@ function unpack2(args) { const size = x.shape.slice(); size[axis] = 1; const res = new Array(num); - for (let i = 0; i < res.length; i++) { - begin[axis] = i; + for (let i2 = 0; i2 < res.length; i2++) { + begin[axis] = i2; const sliced = slice3({ inputs: { x }, backend: backend2, attrs: { begin, size } }); const reshaped = reshape4({ inputs: { x: sliced }, backend: backend2, attrs: { shape: outShape } }); - res[i] = reshaped; + res[i2] = reshaped; toDispose.push(sliced); } - toDispose.forEach((t) => backend2.disposeIntermediateTensorInfo(t)); + toDispose.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2)); return res; } var unpackConfig2 = { @@ -63351,7 +63033,7 @@ var unpackConfig2 = { kernelFunc: unpack2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/segment_gpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/segment_gpu.js var SegmentOpProgram = class { constructor(segOpInfo, segOpType) { this.variableNames = ["x", "segmentIds"]; @@ -63484,7 +63166,7 @@ var SegmentOpProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/UnsortedSegmentSum.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/kernels/UnsortedSegmentSum.js function unsortedSegmentSum3(args) { const { inputs, backend: backend2, attrs } = args; const { x, segmentIds } = inputs; @@ -63537,7 +63219,7 @@ function unsortedSegmentSum3(args) { const perm = backend_util_exports.getUndoAxesPermutation(permutation); result = transpose3({ inputs: { x: result }, backend: backend2, attrs: { perm } }); } - toDispose.forEach((t) => backend2.disposeIntermediateTensorInfo(t)); + toDispose.forEach((t2) => backend2.disposeIntermediateTensorInfo(t2)); return result; } var unsortedSegmentSumConfig2 = { @@ -63546,7 +63228,7 @@ var unsortedSegmentSumConfig2 = { kernelFunc: unsortedSegmentSum3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/dist/register_all_kernels.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgl/dist/register_all_kernels.js var kernelConfigs2 = [ _fusedMatMulConfig2, absConfig2, @@ -63659,6 +63341,7 @@ var kernelConfigs2 = [ powConfig2, preluConfig2, prodConfig2, + raggedGatherConfig2, raggedTensorToTensorConfig2, rangeConfig2, realConfig2, @@ -63718,7 +63401,7 @@ for (const kernelConfig of kernelConfigs2) { registerKernel(kernelConfig); } -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/types.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/types.js var CppDType; (function(CppDType2) { CppDType2[CppDType2["float32"] = 0] = "float32"; @@ -63738,7 +63421,7 @@ var FusableActivation; FusableActivation2[FusableActivation2["elu"] = 6] = "elu"; })(FusableActivation || (FusableActivation = {})); -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/_FusedMatMul.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/_FusedMatMul.js var wasmFusedMatMul; function setup(backend2) { wasmFusedMatMul = backend2.wasm.cwrap(_FusedMatMul, null, [ @@ -63796,7 +63479,7 @@ var _fusedMatMulConfig3 = { kernelFunc: fusedBatchMatMul }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/unary_kernel.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/unary_kernel.js function createUnaryKernelConfig(kernelName, outType) { let wasmFunc9; function setupFunc3(backend2) { @@ -63820,10 +63503,10 @@ function createUnaryKernelConfig(kernelName, outType) { return { kernelName, backendName: "wasm", setupFunc: setupFunc3, kernelFunc: kernelFunc3 }; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Abs.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Abs.js var absConfig3 = createUnaryKernelConfig(Abs); -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/binary_kernel.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/binary_kernel.js function createBinaryKernelConfig(kernelName, supportsFullBroadcast19, dtype) { let wasmFunc9; function setupFunc3(backend2) { @@ -63859,11 +63542,11 @@ function createBinaryKernelConfig(kernelName, supportsFullBroadcast19, dtype) { return { kernelName, backendName: "wasm", setupFunc: setupFunc3, kernelFunc: kernelFunc3 }; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Add.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Add.js var supportsFullBroadcast = true; var addConfig3 = createBinaryKernelConfig(Add, supportsFullBroadcast); -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/AddN.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/AddN.js var wasmFunc; function setupFunc(backend2) { wasmFunc = backend2.wasm.cwrap(AddN, null, [ @@ -63892,7 +63575,7 @@ var addNConfig3 = { kernelFunc: addn }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Identity.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Identity.js function identity4(args) { const { inputs: { x }, backend: backend2 } = args; const out = backend2.makeOutput(x.shape, x.dtype); @@ -63907,7 +63590,7 @@ var identityConfig3 = { kernelFunc: identity4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Transpose.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Transpose.js var wasmTranspose; function setup2(backend2) { wasmTranspose = backend2.wasm.cwrap(Transpose, null, [ @@ -63924,8 +63607,8 @@ function transpose4(args) { const { inputs, backend: backend2, attrs } = args; const [reducedShape, perm] = removeOneSizeDims(inputs.x.shape, attrs.perm); let permIsNoOp = true; - for (let i = 0; i < perm.length; i++) { - if (perm[i] !== i) { + for (let i2 = 0; i2 < perm.length; i2++) { + if (perm[i2] !== i2) { permIsNoOp = false; } } @@ -63950,30 +63633,30 @@ function transpose4(args) { } function computeOutShape4(inShape, perm) { const outShape = new Array(inShape.length); - for (let i = 0; i < outShape.length; i++) { - outShape[i] = inShape[perm[i]]; + for (let i2 = 0; i2 < outShape.length; i2++) { + outShape[i2] = inShape[perm[i2]]; } return outShape; } function removeOneSizeDims(shape, perm) { const newShape = []; const newPerm = []; - for (let i = 0; i < shape.length; ++i) { - if (shape[i] !== 1) { - newShape.push(shape[i]); + for (let i2 = 0; i2 < shape.length; ++i2) { + if (shape[i2] !== 1) { + newShape.push(shape[i2]); } - if (shape[perm[i]] !== 1) { - newPerm.push(perm[i]); + if (shape[perm[i2]] !== 1) { + newPerm.push(perm[i2]); } } - for (let i = 0; i < newPerm.length; ++i) { + for (let i2 = 0; i2 < newPerm.length; ++i2) { let minValIdx = -1; for (let j = 0; j < newPerm.length; ++j) { - if (newPerm[j] >= i && (minValIdx === -1 || newPerm[minValIdx] > newPerm[j])) { + if (newPerm[j] >= i2 && (minValIdx === -1 || newPerm[minValIdx] > newPerm[j])) { minValIdx = j; } } - newPerm[minValIdx] = i; + newPerm[minValIdx] = i2; } return [newShape, newPerm]; } @@ -63984,7 +63667,7 @@ var transposeConfig3 = { setupFunc: setup2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/kernel_utils.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/kernel_utils.js function permuteAxesAndTranspose(x, axis, backend2) { const xShape = x.shape; const xRank = x.shape.length; @@ -63995,8 +63678,8 @@ function permuteAxesAndTranspose(x, axis, backend2) { let inputWasTransposed = false; if (permutedAxes != null) { const newShape = new Array(xRank); - for (let i = 0; i < newShape.length; i++) { - newShape[i] = xShape[permutedAxes[i]]; + for (let i2 = 0; i2 < newShape.length; i2++) { + newShape[i2] = xShape[permutedAxes[i2]]; } axes = backend_util_exports.getInnerMostAxes(axes.length, xRank); xTransposed = transpose4({ inputs: { x }, attrs: { perm: permutedAxes }, backend: backend2 }); @@ -64009,7 +63692,7 @@ function permuteAxesAndTranspose(x, axis, backend2) { return { transposed: xTransposed, originalAxes, axes, inputWasTransposed }; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/All.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/All.js var wasmAll; function setup3(backend2) { wasmAll = backend2.wasm.cwrap(All, null, ["number, number, number"]); @@ -64052,7 +63735,7 @@ var allConfig3 = { kernelFunc: all4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Any.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Any.js var wasmAny; function setup4(backend2) { wasmAny = backend2.wasm.cwrap(Any, null, ["number, number, number"]); @@ -64095,7 +63778,7 @@ var anyConfig3 = { kernelFunc: any4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/ArgMax.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/ArgMax.js var wasmFunc2; function setup5(backend2) { wasmFunc2 = backend2.wasm.cwrap(ArgMax, null, [ @@ -64139,7 +63822,7 @@ var argMaxConfig3 = { setupFunc: setup5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/AvgPool.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/AvgPool.js var wasmAvgPool; function setup6(backend2) { wasmAvgPool = backend2.wasm.cwrap(AvgPool, null, [ @@ -64192,7 +63875,7 @@ var avgPoolConfig3 = { kernelFunc: avgPool4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Reshape.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Reshape.js function reshape5(args) { const { inputs, attrs } = args; const { x } = inputs; @@ -64209,7 +63892,7 @@ var reshapeConfig3 = { kernelFunc: reshape5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/BatchMatMul.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/BatchMatMul.js var wasmBatchMatMul; function setup7(backend2) { wasmBatchMatMul = backend2.wasm.cwrap(BatchMatMul, null, [ @@ -64270,7 +63953,7 @@ var batchMatMulConfig3 = { kernelFunc: batchMatMul3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Slice.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Slice.js function slice4(args) { const { inputs: { x }, attrs: { begin, size }, backend: backend2 } = args; const [begin_, size_] = slice_util_exports.parseSliceParams(x, begin, size); @@ -64313,8 +63996,8 @@ function slice2d2(xVals, xStride, outVals, begin, size) { const beginI = begin[0]; const beginJ = begin[1]; const endI = beginI + size[0]; - for (let i = beginI; i < endI; i++) { - const xOffset = i * xStride + beginJ; + for (let i2 = beginI; i2 < endI; i2++) { + const xOffset = i2 * xStride + beginJ; outVals.set(xVals.subarray(xOffset, xOffset + size[1]), outOffset); outOffset += size[1]; } @@ -64326,9 +64009,9 @@ function slice3d2(xVals, xStride1, xStride2, outVals, begin, size) { const beginK = begin[2]; const endI = beginI + size[0]; const endJ = beginJ + size[1]; - for (let i = beginI; i < endI; i++) { + for (let i2 = beginI; i2 < endI; i2++) { for (let j = beginJ; j < endJ; j++) { - const xOffset = i * xStride1 + j * xStride2 + beginK; + const xOffset = i2 * xStride1 + j * xStride2 + beginK; outVals.set(xVals.subarray(xOffset, xOffset + size[2]), outOffset); outOffset += size[2]; } @@ -64343,10 +64026,10 @@ function slice4d2(xVals, xStride1, xStride2, xStride3, outVals, begin, size) { const endJ = beginJ + size[1]; const endK = beginK + size[2]; const beginL = begin[3]; - for (let i = beginI; i < endI; i++) { + for (let i2 = beginI; i2 < endI; i2++) { for (let j = beginJ; j < endJ; j++) { for (let k = beginK; k < endK; k++) { - const xOffset = i * xStride1 + j * xStride2 + k * xStride3 + beginL; + const xOffset = i2 * xStride1 + j * xStride2 + k * xStride3 + beginL; outVals.set(xVals.subarray(xOffset, xOffset + size[3]), outOffset); outOffset += size[3]; } @@ -64359,7 +64042,7 @@ var sliceConfig3 = { kernelFunc: slice4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/BatchToSpaceND.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/BatchToSpaceND.js function batchToSpaceND4(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -64389,7 +64072,7 @@ var batchToSpaceNDConfig3 = { kernelFunc: batchToSpaceND4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Cast.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Cast.js function cast5(args) { const { inputs: { x }, attrs: { dtype }, backend: backend2 } = args; const out = backend2.makeOutput(x.shape, dtype); @@ -64404,10 +64087,10 @@ var castConfig3 = { kernelFunc: cast5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Ceil.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Ceil.js var ceilConfig3 = createUnaryKernelConfig(Ceil); -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/ClipByValue.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/ClipByValue.js var wasmClip; function setup8(backend2) { wasmClip = backend2.wasm.cwrap(ClipByValue, null, [ @@ -64434,12 +64117,14 @@ var clipByValueConfig3 = { kernelFunc: clip }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Concat.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Concat.js function concat4(args) { const { inputs, backend: backend2 } = args; const axis = util_exports.parseAxisParam(args.attrs.axis, inputs[0].shape)[0]; - let outShape = backend_util_exports.computeOutShape(inputs.map((t) => t.shape), axis); - const $inputs = inputs.filter((t) => util_exports.sizeFromShape(t.shape) > 0); + const shapes = inputs.map((t2) => t2.shape); + backend_util_exports.assertParamsConsistent(shapes, axis); + let outShape = backend_util_exports.computeOutShape(inputs.map((t2) => t2.shape), axis); + const $inputs = inputs.filter((t2) => util_exports.sizeFromShape(t2.shape) > 0); if ($inputs.length === 1) { return identity4({ inputs: { x: $inputs[0] }, backend: backend2 }); } @@ -64447,25 +64132,23 @@ function concat4(args) { if (util_exports.sizeFromShape(outShape) === 0) { return out; } - const shapes = $inputs.map((t) => t.shape); - backend_util_exports.assertParamsConsistent(shapes, axis); if ($inputs[0].dtype === "string") { - const inputs2D = $inputs.map((t) => { - const innerSize = util_exports.sizeFromShape(t.shape.slice(axis)); + const inputs2D = $inputs.map((t2) => { + const innerSize = util_exports.sizeFromShape(t2.shape.slice(axis)); const shape = [-1, innerSize]; - return reshape5({ inputs: { x: t }, backend: backend2, attrs: { shape } }); + return reshape5({ inputs: { x: t2 }, backend: backend2, attrs: { shape } }); }); - const inputsValShapes = inputs2D.map((t) => { - return { vals: backend2.readSync(t.dataId), shape: t.shape }; + const inputsValShapes = inputs2D.map((t2) => { + return { vals: backend2.readSync(t2.dataId), shape: t2.shape }; }); - outShape = backend_util_exports.computeOutShape(inputs2D.map((t) => t.shape), 1); + outShape = backend_util_exports.computeOutShape(inputs2D.map((t2) => t2.shape), 1); const simplyConcat = inputs2D[0].shape[0] === 1; const outVals2 = concatImpl(inputsValShapes, outShape, inputs[0].dtype, simplyConcat); - const finalOutShape = backend_util_exports.computeOutShape($inputs.map((t) => t.shape), axis); + const finalOutShape = backend_util_exports.computeOutShape($inputs.map((t2) => t2.shape), axis); out.shape = finalOutShape; const outData = backend2.dataIdMap.get(out.dataId); outData.stringBytes = backend_util_exports.fromStringArrayToUint8(outVals2); - inputs2D.forEach((t) => backend2.disposeData(t.dataId)); + inputs2D.forEach((t2) => backend2.disposeData(t2.dataId)); return out; } const batchDim = util_exports.sizeFromShape($inputs[0].shape.slice(0, axis)); @@ -64479,10 +64162,10 @@ function concat4(args) { const outVals = backend2.typedArrayFromHeap(out); for (let b = 0; b < batchDim; b++) { let outOffset = b * sumInnerDims; - for (let i = 0; i < inVals.length; i++) { - const innerDim = innerDims[i]; + for (let i2 = 0; i2 < inVals.length; i2++) { + const innerDim = innerDims[i2]; const inOffset = b * innerDim; - const vals = inVals[i].subarray(inOffset, inOffset + innerDim); + const vals = inVals[i2].subarray(inOffset, inOffset + innerDim); outVals.set(vals, outOffset); outOffset += innerDim; } @@ -64495,7 +64178,7 @@ var concatConfig3 = { kernelFunc: concat4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Conv2D.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Conv2D.js var wasmConv2d; function setup9(backend2) { wasmConv2d = backend2.wasm.cwrap(Conv2D, null, [ @@ -64556,7 +64239,7 @@ var conv2DConfig3 = { kernelFunc: conv2d5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Conv2DBackpropInput.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Conv2DBackpropInput.js var wasmConv2DBackpropInput; function setup10(backend2) { wasmConv2DBackpropInput = backend2.wasm.cwrap(Conv2DBackpropInput, null, [ @@ -64625,13 +64308,13 @@ var conv2DBackpropInputConfig3 = { kernelFunc: conv2DBackpropInput4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Cos.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Cos.js var cosConfig3 = createUnaryKernelConfig(Cos); -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Cosh.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Cosh.js var coshConfig3 = createUnaryKernelConfig(Cosh); -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/CropAndResize.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/CropAndResize.js var InterpolationMethod; (function(InterpolationMethod2) { InterpolationMethod2[InterpolationMethod2["bilinear"] = 0] = "bilinear"; @@ -64684,7 +64367,7 @@ var cropAndResizeConfig3 = { kernelFunc: cropAndResize4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Cumprod.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Cumprod.js var wasmCumprod; function setup12(backend2) { wasmCumprod = backend2.wasm.cwrap(Cumprod, null, [ @@ -64730,7 +64413,7 @@ var cumprodConfig3 = { kernelFunc: cumprod4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Cumsum.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Cumsum.js var wasmCumsum; function setup13(backend2) { wasmCumsum = backend2.wasm.cwrap(Cumsum, null, [ @@ -64776,7 +64459,7 @@ var cumsumConfig3 = { kernelFunc: cumsum4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/DepthToSpace.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/DepthToSpace.js var wasmDepthToSpace; function setup14(backend2) { wasmDepthToSpace = backend2.wasm.cwrap(DepthToSpace, null, [ @@ -64821,7 +64504,7 @@ var depthToSpaceConfig3 = { kernelFunc: depthToSpace4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/DepthwiseConv2dNative.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/DepthwiseConv2dNative.js var wasmDepthwiseConv2d; function setup15(backend2) { wasmDepthwiseConv2d = backend2.wasm.cwrap(DepthwiseConv2dNative, null, [ @@ -64882,17 +64565,17 @@ var depthwiseConv2dNativeConfig3 = { kernelFunc: depthwiseConv2d5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Elu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Elu.js var eluConfig3 = createUnaryKernelConfig(Elu); -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Equal.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Equal.js var supportsFullBroadcast2 = false; var equalConfig3 = createBinaryKernelConfig(Equal, supportsFullBroadcast2, "bool"); -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Exp.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Exp.js var expConfig3 = createUnaryKernelConfig(Exp, "float32"); -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/ExpandDims.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/ExpandDims.js function expandDims5(args) { const { inputs, attrs, backend: backend2 } = args; const { input: input2 } = inputs; @@ -64913,7 +64596,7 @@ var expandDimsConfig3 = { kernelFunc: expandDims5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Fill.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Fill.js function fill4(args) { const { attrs: { shape, value, dtype }, backend: backend2 } = args; const out = backend2.makeOutput(shape, dtype); @@ -64927,7 +64610,7 @@ var fillConfig3 = { kernelFunc: fill4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/FlipLeftRight.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/FlipLeftRight.js var wasmFlipLeftRight; function setup16(backend2) { wasmFlipLeftRight = backend2.wasm.cwrap(FlipLeftRight, null, [ @@ -64956,14 +64639,14 @@ var flipLeftRightConfig3 = { setupFunc: setup16 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Floor.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Floor.js var floorConfig3 = createUnaryKernelConfig(Floor); -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/FloorDiv.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/FloorDiv.js var supportsFullBroadcast3 = false; var floorDivConfig3 = createBinaryKernelConfig(FloorDiv, supportsFullBroadcast3); -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/FusedBatchNorm.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/FusedBatchNorm.js var wasmBatchNorm; function setup17(backend2) { wasmBatchNorm = backend2.wasm.cwrap(FusedBatchNorm, null, ["number", "number", "number", "number", "number", "number", "number"]); @@ -64992,7 +64675,7 @@ var fusedBatchNormConfig = { kernelFunc: fusedBatchNorm }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/FusedConv2D.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/FusedConv2D.js var wasmFusedConv2d; function setup18(backend2) { wasmFusedConv2d = backend2.wasm.cwrap(FusedConv2D, null, [ @@ -65075,7 +64758,7 @@ var fusedConv2DConfig3 = { kernelFunc: fusedConv2d2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/FusedDepthwiseConv2D.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/FusedDepthwiseConv2D.js var wasmFusedDepthwiseConv2d; function setup19(backend2) { wasmFusedDepthwiseConv2d = backend2.wasm.cwrap(FusedDepthwiseConv2D, null, [ @@ -65158,7 +64841,7 @@ var fusedDepthwiseConv2DConfig3 = { kernelFunc: fusedDepthwiseConv2d }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/GatherNd.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/GatherNd.js var wasmGatherNd; function setup20(backend2) { wasmGatherNd = backend2.wasm.cwrap(GatherNd, null, [ @@ -65198,7 +64881,7 @@ var gatherNdConfig3 = { kernelFunc: gatherNd3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/GatherV2.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/GatherV2.js var wasmGather; function setup21(backend2) { wasmGather = backend2.wasm.cwrap("Gather", null, [ @@ -65219,8 +64902,8 @@ function gatherV23(args) { const parsedAxis = util_exports.parseAxisParam(axis, x.shape)[0]; const indicesVals = backend2.readSync(indices.dataId); const axisDim = x.shape[parsedAxis]; - for (let i = 0; i < indicesVals.length; ++i) { - const index = indicesVals[i]; + for (let i2 = 0; i2 < indicesVals.length; ++i2) { + const index = indicesVals[i2]; util_exports.assert(index <= axisDim - 1 && index >= 0, () => `GatherV2: the index value ${index} is not in [0, ${axisDim - 1}]`); } const shapeInfo = backend_util_exports.segment_util.collectGatherOpShapeInfo(x, indices, parsedAxis, batchDims); @@ -65273,15 +64956,15 @@ var gatherV2Config3 = { kernelFunc: gatherV23 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Greater.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Greater.js var supportsFullBroadcast4 = false; var greaterConfig3 = createBinaryKernelConfig(Greater, supportsFullBroadcast4, "bool"); -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/GreaterEqual.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/GreaterEqual.js var supportsFullBroadcast5 = false; var greaterEqualConfig3 = createBinaryKernelConfig(GreaterEqual, supportsFullBroadcast5, "bool"); -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/LeakyRelu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/LeakyRelu.js var wasmFunc3; function setupFunc2(backend2) { wasmFunc3 = backend2.wasm.cwrap(LeakyRelu, null, [ @@ -65308,33 +64991,33 @@ var leakyReluConfig3 = { kernelFunc: leakyRelu4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Less.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Less.js var supportsFullBroadcast6 = false; var lessConfig3 = createBinaryKernelConfig(Less, supportsFullBroadcast6, "bool"); -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/LessEqual.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/LessEqual.js var supportsFullBroadcast7 = false; var lessEqualConfig3 = createBinaryKernelConfig(LessEqual, supportsFullBroadcast7, "bool"); -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Log.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Log.js var logConfig3 = createUnaryKernelConfig(Log); -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/LogicalAnd.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/LogicalAnd.js var supportsFullBroadcast8 = false; var logicalAndConfig3 = createBinaryKernelConfig(LogicalAnd, supportsFullBroadcast8, "bool"); -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/LogicalNot.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/LogicalNot.js var logicalNotConfig3 = createUnaryKernelConfig(LogicalNot); -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/LogicalOr.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/LogicalOr.js var supportsFullBroadcast9 = false; var logicalOrConfig3 = createBinaryKernelConfig(LogicalOr, supportsFullBroadcast9, "bool"); -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/LogicalXor.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/LogicalXor.js var supportsFullBroadcast10 = false; var logicalXorConfig = createBinaryKernelConfig(LogicalXor, supportsFullBroadcast10, "bool"); -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Max.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Max.js var wasmMax; function setup22(backend2) { wasmMax = backend2.wasm.cwrap(Max, null, [ @@ -65382,11 +65065,11 @@ var maxConfig3 = { kernelFunc: max5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Maximum.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Maximum.js var supportsFullBroadcast11 = false; var maximumConfig3 = createBinaryKernelConfig(Maximum, supportsFullBroadcast11); -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/MaxPool.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/MaxPool.js var wasmMaxPool; function setup23(backend2) { wasmMaxPool = backend2.wasm.cwrap(MaxPool, null, [ @@ -65443,7 +65126,7 @@ var maxPoolConfig3 = { kernelFunc: maxPool4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Mean.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Mean.js var wasmMean; function setup24(backend2) { wasmMean = backend2.wasm.cwrap(Mean, null, ["number, number, number"]); @@ -65497,7 +65180,7 @@ var meanConfig3 = { kernelFunc: mean3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Min.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Min.js var wasmMin; function setup25(backend2) { wasmMin = backend2.wasm.cwrap(Min, null, [ @@ -65547,11 +65230,11 @@ var minConfig3 = { kernelFunc: min5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Minimum.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Minimum.js var supportsFullBroadcast12 = false; var minimumConfig3 = createBinaryKernelConfig(Minimum, supportsFullBroadcast12); -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/MirrorPad.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/MirrorPad.js var MirrorPaddingMode; (function(MirrorPaddingMode2) { MirrorPaddingMode2[MirrorPaddingMode2["reflect"] = 0] = "reflect"; @@ -65572,7 +65255,7 @@ function setup26(backend2) { } function mirrorPad3(args) { const { inputs: { x }, backend: backend2, attrs: { paddings, mode } } = args; - const outShape = paddings.map((p2, i) => p2[0] + x.shape[i] + p2[1]); + const outShape = paddings.map((p2, i2) => p2[0] + x.shape[i2] + p2[1]); const xId = backend2.dataIdMap.get(x.dataId).id; const out = backend2.makeOutput(outShape, x.dtype); const outId = backend2.dataIdMap.get(out.dataId).id; @@ -65591,14 +65274,14 @@ var mirrorPadConfig3 = { setupFunc: setup26 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Multiply.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Multiply.js var supportsFullBroadcast13 = true; var multiplyConfig3 = createBinaryKernelConfig(Multiply, supportsFullBroadcast13); -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Neg.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Neg.js var negConfig3 = createUnaryKernelConfig(Neg); -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/NonMaxSuppression_util.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/NonMaxSuppression_util.js function parseResultStruct(backend2, resOffset) { const result = new Int32Array(backend2.wasm.HEAPU8.buffer, resOffset, 4); const pSelectedIndices = result[0]; @@ -65609,7 +65292,7 @@ function parseResultStruct(backend2, resOffset) { return { pSelectedIndices, selectedSize, pSelectedScores, pValidOutputs }; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/NonMaxSuppressionV3.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/NonMaxSuppressionV3.js var wasmFunc4; function setup27(backend2) { wasmFunc4 = backend2.wasm.cwrap( @@ -65644,7 +65327,7 @@ var nonMaxSuppressionV3Config3 = { kernelFunc }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/NonMaxSuppressionV4.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/NonMaxSuppressionV4.js var wasmFunc5; function setup28(backend2) { wasmFunc5 = backend2.wasm.cwrap( @@ -65680,7 +65363,7 @@ var nonMaxSuppressionV4Config3 = { kernelFunc: nonMaxSuppressionV43 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/NonMaxSuppressionV5.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/NonMaxSuppressionV5.js var wasmFunc6; function setup29(backend2) { wasmFunc6 = backend2.wasm.cwrap( @@ -65716,11 +65399,11 @@ var nonMaxSuppressionV5Config3 = { kernelFunc: kernelFunc2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/NotEqual.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/NotEqual.js var supportsFullBroadcast14 = false; var notEqualConfig3 = createBinaryKernelConfig(NotEqual, supportsFullBroadcast14, "bool"); -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/OneHot.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/OneHot.js var wasmOneHot; function setup30(backend2) { wasmOneHot = backend2.wasm.cwrap(OneHot, null, [ @@ -65749,7 +65432,7 @@ var oneHotConfig3 = { kernelFunc: oneHot4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/OnesLike.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/OnesLike.js function onesLike4(args) { const { inputs: { x }, backend: backend2 } = args; const out = backend2.makeOutput(x.shape, x.dtype); @@ -65763,7 +65446,7 @@ var onesLikeConfig3 = { kernelFunc: onesLike4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Pack.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Pack.js function pack3(args) { const { inputs, backend: backend2, attrs } = args; const { axis } = attrs; @@ -65772,18 +65455,18 @@ function pack3(args) { } const shape = inputs[0].shape; const dtype = inputs[0].dtype; - inputs.forEach((t) => { - util_exports.assertShapesMatch(shape, t.shape, "All tensors passed to stack must have matching shapes"); - util_exports.assert(dtype === t.dtype, () => "All tensors passed to stack must have matching dtypes"); + inputs.forEach((t2) => { + util_exports.assertShapesMatch(shape, t2.shape, "All tensors passed to stack must have matching shapes"); + util_exports.assert(dtype === t2.dtype, () => "All tensors passed to stack must have matching dtypes"); }); const intermediateTensorInfos = []; - const expandedTensors = inputs.map((t) => { - const expandedT = expandDims5({ inputs: { input: t }, backend: backend2, attrs: { dim: axis } }); + const expandedTensors = inputs.map((t2) => { + const expandedT = expandDims5({ inputs: { input: t2 }, backend: backend2, attrs: { dim: axis } }); intermediateTensorInfos.push(expandedT); return expandedT; }); const result = concat4({ inputs: expandedTensors, backend: backend2, attrs: { axis } }); - intermediateTensorInfos.forEach((t) => backend2.disposeData(t.dataId)); + intermediateTensorInfos.forEach((t2) => backend2.disposeData(t2.dataId)); return result; } var packConfig3 = { @@ -65792,7 +65475,7 @@ var packConfig3 = { kernelFunc: pack3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/PadV2.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/PadV2.js var wasmPadV2; function setup31(backend2) { wasmPadV2 = backend2.wasm.cwrap(PadV2, null, [ @@ -65808,7 +65491,7 @@ function setup31(backend2) { } function pad2(args) { const { inputs: { x }, backend: backend2, attrs: { paddings, constantValue } } = args; - const outShape = paddings.map((p2, i) => p2[0] + x.shape[i] + p2[1]); + const outShape = paddings.map((p2, i2) => p2[0] + x.shape[i2] + p2[1]); if (util_exports.sizeFromShape(x.shape) === 0) { return fill4({ backend: backend2, @@ -65834,11 +65517,11 @@ var padV2Config3 = { setupFunc: setup31 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Pow.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Pow.js var supportsFullBroadcast15 = false; var powConfig3 = createBinaryKernelConfig(Pow, supportsFullBroadcast15); -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Prelu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Prelu.js var wasmPrelu; function setup32(backend2) { wasmPrelu = backend2.wasm.cwrap(Prelu, null, [ @@ -65874,7 +65557,7 @@ var preluConfig3 = { kernelFunc: prelu5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Prod.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Prod.js var wasmProd; function setup33(backend2) { wasmProd = backend2.wasm.cwrap(Prod, null, [ @@ -65925,7 +65608,7 @@ var prodConfig3 = { kernelFunc: prod4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Range.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Range.js var range5 = (args) => { const { backend: backend2, attrs } = args; const { start, stop, step: step5, dtype } = attrs; @@ -65941,17 +65624,17 @@ var rangeConfig3 = { kernelFunc: range5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/RealDiv.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/RealDiv.js var supportsFullBroadcast16 = true; var realDivConfig3 = createBinaryKernelConfig(RealDiv, supportsFullBroadcast16); -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Relu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Relu.js var reluConfig3 = createUnaryKernelConfig(Relu); -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Relu6.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Relu6.js var relu6Config3 = createUnaryKernelConfig(Relu6); -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/ResizeBilinear.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/ResizeBilinear.js var wasmResizeBilinear; function setup34(backend2) { wasmResizeBilinear = backend2.wasm.cwrap(ResizeBilinear, null, [ @@ -65999,7 +65682,7 @@ var resizeBilinearConfig3 = { kernelFunc: resizeBilinear4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/ResizeNearestNeighbor.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/ResizeNearestNeighbor.js var wasmResizeNearestNeighbor; function setup35(backend2) { wasmResizeNearestNeighbor = backend2.wasm.cwrap(ResizeNearestNeighbor, null, [ @@ -66051,7 +65734,7 @@ var resizeNearestNeighborConfig3 = { kernelFunc: resizeNearestNeighbor4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Reverse.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Reverse.js var wasmReverse; function setup36(backend2) { wasmReverse = backend2.wasm.cwrap(Reverse, null, [ @@ -66088,7 +65771,7 @@ var reverseConfig3 = { setupFunc: setup36 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/RotateWithOffset.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/RotateWithOffset.js var wasmRotate; function setup37(backend2) { wasmRotate = backend2.wasm.cwrap(RotateWithOffset, null, [ @@ -66128,13 +65811,13 @@ var rotateWithOffsetConfig3 = { setupFunc: setup37 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Round.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Round.js var roundConfig3 = createUnaryKernelConfig(Round); -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Rsqrt.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Rsqrt.js var rsqrtConfig3 = createUnaryKernelConfig(Rsqrt); -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/ScatterNd.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/ScatterNd.js var wasmScatterNd; function setup38(backend2) { wasmScatterNd = backend2.wasm.cwrap(ScatterNd, null, [ @@ -66174,7 +65857,7 @@ var scatterNdConfig3 = { kernelFunc: scatterNd3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Select.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Select.js var wasmSelect; function setup39(backend2) { wasmSelect = backend2.wasm.cwrap("SelectV2", null, [ @@ -66187,15 +65870,15 @@ function setup39(backend2) { } function select4(args) { const { inputs, backend: backend2 } = args; - const { condition, t, e } = inputs; + const { condition, t: t2, e: e2 } = inputs; const conditionId = backend2.dataIdMap.get(condition.dataId).id; - const tId = backend2.dataIdMap.get(t.dataId).id; - const eId = backend2.dataIdMap.get(e.dataId).id; - const out = backend2.makeOutput(t.shape, t.dtype); + const tId = backend2.dataIdMap.get(t2.dataId).id; + const eId = backend2.dataIdMap.get(e2.dataId).id; + const out = backend2.makeOutput(t2.shape, t2.dtype); const outId = backend2.dataIdMap.get(out.dataId).id; const cRank = condition.shape.length; - const tRank = t.shape.length; - const offset = cRank === 0 || cRank > 1 || tRank === 1 ? 1 : util_exports.sizeFromShape(t.shape.slice(1)); + const tRank = t2.shape.length; + const offset = cRank === 0 || cRank > 1 || tRank === 1 ? 1 : util_exports.sizeFromShape(t2.shape.slice(1)); wasmSelect(conditionId, tId, eId, offset, outId); return out; } @@ -66206,7 +65889,7 @@ var selectConfig3 = { setupFunc: setup39 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Sigmoid.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Sigmoid.js var wasmFunc7; function setup40(backend2) { wasmFunc7 = backend2.wasm.cwrap(Sigmoid, null, ["number", "number"]); @@ -66229,10 +65912,10 @@ var sigmoidConfig3 = { kernelFunc: sigmoid4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Sin.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Sin.js var sinConfig3 = createUnaryKernelConfig(Sin); -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Softmax.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Softmax.js var wasmFunc8; function setup41(backend2) { wasmFunc8 = backend2.wasm.cwrap(Softmax, null, [ @@ -66262,7 +65945,7 @@ var softmaxConfig3 = { kernelFunc: softmax5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/SpaceToBatchND.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/SpaceToBatchND.js function spaceToBatchND4(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -66270,7 +65953,7 @@ function spaceToBatchND4(args) { const prod6 = util_exports.sizeFromShape(blockShape); const completePaddings = [[0, 0]]; completePaddings.push(...paddings); - for (let i = 1 + blockShape.length; i < x.shape.length; ++i) { + for (let i2 = 1 + blockShape.length; i2 < x.shape.length; ++i2) { completePaddings.push([0, 0]); } const paddedX = padV2Config3.kernelFunc({ @@ -66301,7 +65984,7 @@ var spaceToBatchNDConfig3 = { kernelFunc: spaceToBatchND4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/SparseFillEmptyRows.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/SparseFillEmptyRows.js var wasmSparseFillEmptyRows; function setup42(backend2) { wasmSparseFillEmptyRows = backend2.wasm.cwrap("SparseFillEmptyRows", "number", [ @@ -66390,7 +66073,7 @@ var sparseFillEmptyRowsConfig3 = { kernelFunc: sparseFillEmptyRows4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/SparseReshape.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/SparseReshape.js var wasmSparseReshape; function setup43(backend2) { wasmSparseReshape = backend2.wasm.cwrap(SparseReshape, null, [ @@ -66471,7 +66154,7 @@ var sparseReshapeConfig3 = { kernelFunc: sparseReshape4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/SparseSegmentReduction.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/SparseSegmentReduction.js var wasmSparseSegmentReduction; function setup44(backend2) { wasmSparseSegmentReduction = backend2.wasm.cwrap("SparseSegmentReduction", null, [ @@ -66534,7 +66217,7 @@ function sparseSegmentReduction(args, isMean) { return output; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/SparseSegmentMean.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/SparseSegmentMean.js function sparseSegmentMean4(args) { return sparseSegmentReduction(args, true); } @@ -66545,7 +66228,7 @@ var sparseSegmentMeanConfig3 = { kernelFunc: sparseSegmentMean4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/SparseSegmentSum.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/SparseSegmentSum.js function sparseSegmentSum4(args) { return sparseSegmentReduction(args, false); } @@ -66556,7 +66239,7 @@ var sparseSegmentSumConfig3 = { kernelFunc: sparseSegmentSum4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/SplitV.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/SplitV.js function splitV3(args) { const { inputs, attrs, backend: backend2 } = args; const { x } = inputs; @@ -66565,11 +66248,11 @@ function splitV3(args) { const splitSizes = backend_util_exports.prepareSplitSize(x, numOrSizeSplits, $axis); const begin = new Array(x.shape.length).fill(0); const size = x.shape.slice(); - return splitSizes.map((s) => { + return splitSizes.map((s2) => { const xSliceSize = [...size]; - xSliceSize[$axis] = s; + xSliceSize[$axis] = s2; const xSlice = slice4({ inputs: { x }, attrs: { begin, size: xSliceSize }, backend: backend2 }); - begin[$axis] += s; + begin[$axis] += s2; return xSlice; }); } @@ -66579,17 +66262,17 @@ var splitVConfig3 = { kernelFunc: splitV3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Sqrt.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Sqrt.js var sqrtConfig3 = createUnaryKernelConfig(Sqrt); -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Square.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Square.js var squareConfig3 = createUnaryKernelConfig(Square); -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/SquaredDifference.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/SquaredDifference.js var supportsFullBroadcast17 = true; var squaredDifferenceConfig3 = createBinaryKernelConfig(SquaredDifference, supportsFullBroadcast17); -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Step.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Step.js var wasmStep; function setup45(backend2) { wasmStep = backend2.wasm.cwrap(Step, null, [ @@ -66616,7 +66299,7 @@ var stepConfig3 = { kernelFunc: step4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/StridedSlice.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/StridedSlice.js var wasmStridedSlice; function setup46(backend2) { wasmStridedSlice = backend2.wasm.cwrap(StridedSlice, null, [ @@ -66669,7 +66352,7 @@ var stridedSliceConfig3 = { kernelFunc: stridedSlice4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/StringNGrams.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/StringNGrams.js function stringNGrams4(args) { const { backend: backend2, inputs, attrs } = args; const { data, dataSplits } = inputs; @@ -66691,7 +66374,7 @@ var stringNGramsConfig3 = { kernelFunc: stringNGrams4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/StringSplit.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/StringSplit.js function stringSplit4(args) { const { backend: backend2, inputs, attrs } = args; const { input: input2, delimiter } = inputs; @@ -66717,7 +66400,7 @@ var stringSplitConfig3 = { kernelFunc: stringSplit4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/StringToHashBucketFast.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/StringToHashBucketFast.js function stringToHashBucketFast4(args) { const { backend: backend2, inputs, attrs } = args; const { input: input2 } = inputs; @@ -66735,11 +66418,11 @@ var stringToHashBucketFastConfig3 = { kernelFunc: stringToHashBucketFast4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Sub.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Sub.js var supportsFullBroadcast18 = true; var subConfig3 = createBinaryKernelConfig(Sub, supportsFullBroadcast18); -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Sum.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Sum.js var wasmSum; function setup47(backend2) { wasmSum = backend2.wasm.cwrap(Sum, null, [ @@ -66790,13 +66473,13 @@ var sumConfig3 = { kernelFunc: sum5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Tan.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Tan.js var tanConfig3 = createUnaryKernelConfig(Tan); -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Tanh.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Tanh.js var tanhConfig3 = createUnaryKernelConfig(Tanh); -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Tile.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Tile.js var wasmTile; function setup48(backend2) { wasmTile = backend2.wasm.cwrap(Tile, null, [ @@ -66814,8 +66497,8 @@ function tile5(args) { const xId = backend2.dataIdMap.get(x.dataId).id; const { reps } = attrs; const newShape = new Array(x.shape.length); - for (let i = 0; i < newShape.length; i++) { - newShape[i] = x.shape[i] * reps[i]; + for (let i2 = 0; i2 < newShape.length; i2++) { + newShape[i2] = x.shape[i2] * reps[i2]; } const xShapeBytes = new Uint8Array(new Int32Array(x.shape).buffer); const newShapeBytes = new Uint8Array(new Int32Array(newShape).buffer); @@ -66831,7 +66514,7 @@ var tileConfig3 = { kernelFunc: tile5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/TopK.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/TopK.js var wasmTopK; function setup49(backend2) { wasmTopK = backend2.wasm.cwrap(TopK, null, [ @@ -66866,7 +66549,7 @@ var topKConfig3 = { kernelFunc: topk2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Transform.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Transform.js var wasmTransform; function setup50(backend2) { wasmTransform = backend2.wasm.cwrap(Transform, null, [ @@ -66938,7 +66621,7 @@ var transformConfig3 = { kernelFunc: transform4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Unpack.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/Unpack.js function unpack3(args) { const { inputs, backend: backend2, attrs } = args; const { value } = inputs; @@ -66950,18 +66633,18 @@ function unpack3(args) { const rank = value.shape.length; const outShape = new Array(rank - 1); let outIndex = 0; - for (let i = 0; i < rank; i++) { - if (i !== axis) { - outShape[outIndex++] = value.shape[i]; + for (let i2 = 0; i2 < rank; i2++) { + if (i2 !== axis) { + outShape[outIndex++] = value.shape[i2]; } } const outs = new Array(numOutputs); const begin = new Array(rank).fill(0); const size = value.shape.slice(); size[axis] = 1; - for (let i = 0; i < outs.length; i++) { - begin[axis] = i; - outs[i] = slice4({ inputs: { x: value }, attrs: { begin, size }, backend: backend2 }); + for (let i2 = 0; i2 < outs.length; i2++) { + begin[axis] = i2; + outs[i2] = slice4({ inputs: { x: value }, attrs: { begin, size }, backend: backend2 }); } return outs.map(({ dataId, dtype }) => ({ dataId, dtype, shape: outShape })); } @@ -66971,7 +66654,7 @@ var unpackConfig3 = { kernelFunc: unpack3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/ZerosLike.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/kernels/ZerosLike.js function zerosLike4(args) { const { inputs: { x }, backend: backend2 } = args; const out = backend2.makeOutput(x.shape, x.dtype); @@ -66985,7 +66668,7 @@ var zerosLikeConfig3 = { kernelFunc: zerosLike4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/register_all_kernels.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/register_all_kernels.js var kernelConfigs3 = [ _fusedMatMulConfig3, absConfig3, @@ -67100,42 +66783,45 @@ for (const kernelConfig of kernelConfigs3) { registerKernel(kernelConfig); } -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/flags_wasm.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/flags_wasm.js var ENV6 = env(); -ENV6.registerFlag( - "WASM_HAS_SIMD_SUPPORT", - async () => WebAssembly.validate(new Uint8Array([ - 0, - 97, - 115, - 109, - 1, - 0, - 0, - 0, - 1, - 4, - 1, - 96, - 0, - 0, - 3, - 2, - 1, - 0, - 10, - 9, - 1, - 7, - 0, - 65, - 0, - 253, - 15, - 26, - 11 - ])) -); +ENV6.registerFlag("WASM_HAS_SIMD_SUPPORT", async () => { + try { + return WebAssembly.validate(new Uint8Array([ + 0, + 97, + 115, + 109, + 1, + 0, + 0, + 0, + 1, + 4, + 1, + 96, + 0, + 0, + 3, + 2, + 1, + 0, + 10, + 9, + 1, + 7, + 0, + 65, + 0, + 253, + 15, + 26, + 11 + ])); + } catch (e2) { + return false; + } +}); ENV6.registerFlag("WASM_HAS_MULTITHREAD_SUPPORT", async () => { if (ENV6.get("IS_NODE")) { return false; @@ -67181,12 +66867,12 @@ ENV6.registerFlag("WASM_HAS_MULTITHREAD_SUPPORT", async () => { 26, 11 ])); - } catch (e) { + } catch (e2) { return false; } }); -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/backend_wasm.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/backend_wasm.js var wasmFactoryThreadedSimd_import = __toESM(require_tfjs_backend_wasm_threaded_simd()); var import_tfjs_backend_wasm_threaded_simd_worker = __toESM(require_tfjs_backend_wasm_threaded_simd_worker()); var wasmFactory_import = __toESM(require_tfjs_backend_wasm()); @@ -67468,17 +67154,17 @@ function getThreadsCount() { return actualThreadsCount; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/version.js -var version8 = "3.20.0"; +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/version.js +var version8 = "3.21.0"; -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/dist/base.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-wasm/dist/base.js var WASM_PRIORITY = 2; registerBackend("wasm", async () => { const { wasm } = await init(); return new BackendWasm(wasm); }, WASM_PRIORITY); -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/flags_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/flags_webgpu.js var ENV7 = env(); ENV7.registerFlag("WEBGPU_DEFERRED_SUBMIT_BATCH_SIZE", () => 15); ENV7.registerFlag("WEBGPU_CPU_FORWARD", () => true); @@ -67488,8 +67174,21 @@ ENV7.registerFlag("WEBGPU_USE_LOW_POWER_GPU", () => false); ENV7.registerFlag("WEBGPU_CPU_HANDOFF_SIZE_THRESHOLD", () => 1e3); ENV7.registerFlag("WEBGPU_USE_PROFILE_TOOL", () => false); ENV7.registerFlag("WEBGPU_IMPORT_EXTERNAL_TEXTURE", () => true); +ENV7.registerFlag("WEBGPU_USE_NAIVE_CONV2D_DEBUG", () => false); + +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/adapter_info.js +var AdapterInfo = class { + constructor(adapterInfo) { + if (adapterInfo) { + this.vendor = adapterInfo.vendor; + } + } + isIntel() { + return this.vendor === "intel"; + } +}; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/buffer_manager.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/buffer_manager.js var BufferManager = class { constructor(device) { this.device = device; @@ -67578,7 +67277,7 @@ function getBufferKey(size, usage) { return `${size}_${usage}`; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/texture_manager.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/texture_manager.js var TextureManager2 = class { constructor(device) { this.device = device; @@ -67673,7 +67372,7 @@ function getBytesPerElement(format) { } } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/shader_util.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/shader_util.js function symbolicallyComputeStrides2(indicesArr, variableName) { if (Math.max(...indicesArr) > 3) { throw new Error("Cannot symbolically compute strides for rank > 4 tensor."); @@ -67682,13 +67381,13 @@ function symbolicallyComputeStrides2(indicesArr, variableName) { const shape = indicesArr.map((d) => `${variableName}[${d}]`); const strides = new Array(numCoords - 1); strides[numCoords - 2] = shape[numCoords - 1]; - for (let i = numCoords - 3; i >= 0; --i) { - strides[i] = `(${strides[i + 1]} * ${shape[i + 1]})`; + for (let i2 = numCoords - 3; i2 >= 0; --i2) { + strides[i2] = `(${strides[i2 + 1]} * ${shape[i2 + 1]})`; } return strides; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/webgpu_program.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/webgpu_program.js var compileProgram2 = (device, program, inputsData, output) => { const outputData = { dtype: output.dtype, shape: output.shape }; const source = makeShader2(inputsData, outputData, program); @@ -67821,8 +67520,8 @@ function makeShader2(inputInfo, outputData, program) { ].join("\n"); } let uniformDeclaration = "struct Uniforms { NAN : f32, "; - program.variableNames.forEach((x, i) => { - const perDataType = getCoordsDataType2(inputInfo[i].shape.length); + program.variableNames.forEach((x, i2) => { + const perDataType = getCoordsDataType2(inputInfo[i2].shape.length); uniformDeclaration += `${x.charAt(0).toLowerCase() + x.slice(1)}Shape : ${perDataType}, `; }); const outputDataType = getCoordsDataType2(outputData.shape.length); @@ -67849,9 +67548,9 @@ function makeShader2(inputInfo, outputData, program) { @group(0) @binding(0) var result: array<${mapToWgslTypes(outputData.dtype, program.isVec4)}>; `); } - program.variableNames.forEach((x, i) => { + program.variableNames.forEach((x, i2) => { prefixSnippets.push(` - @group(0) @binding(${1 + i}) var ${x}: array<${program.variableTypes ? program.variableTypes[i] : mapToWgslTypes(inputInfo[i].dtype, program.isVec4)}>; + @group(0) @binding(${1 + i2}) var ${x}: array<${program.variableTypes ? program.variableTypes[i2] : mapToWgslTypes(inputInfo[i2].dtype, program.isVec4)}>; `); }); if (uniformDeclaration !== "") { @@ -67870,7 +67569,7 @@ function makeShader2(inputInfo, outputData, program) { if (!program.atomic) { sources.push(setOutputSnippet(outputData.shape, outputData.dtype, program.isVec4)); } - const inputSnippet = inputInfo.map((x, i) => getInputSnippet(x, outputData.shape, program.variableTypes ? program.variableTypes[i] === "vec4" : program.isVec4, program.dispatchLayout.x.length === outputData.shape.length)).join("\n"); + const inputSnippet = inputInfo.map((x, i2) => getInputSnippet(x, outputData.shape, program.variableTypes ? program.variableTypes[i2] === "vec4" : program.isVec4, program.dispatchLayout.x.length === outputData.shape.length)).join("\n"); sources.push(inputSnippet); sources.push(program.getUserCode()); const source = sources.join("\n"); @@ -67956,8 +67655,8 @@ function getCoordsFromIndexSnippet(shape) { const strides = util_exports.computeStrides(shape); const dtype = getCoordsDataType2(rank); const coords3 = []; - for (let i = 0; i < rank; i++) { - coords3.push(`d${i}`); + for (let i2 = 0; i2 < rank; i2++) { + coords3.push(`d${i2}`); } if (strides.length === 1) { return ` fn getCoordsFromIndex(index : i32) -> vec2 { @@ -67966,9 +67665,9 @@ function getCoordsFromIndexSnippet(shape) { }`; } let snippet; - snippet = "var index2 = index;" + strides.map((_, i) => { - const line1 = `let ${coords3[i]} = index2 / uniforms.outShapeStrides.${getCoordsXYZ(i)}`; - const line2 = i === strides.length - 1 ? `let ${coords3[i + 1]} = index2 - ${coords3[i]} * uniforms.outShapeStrides.${getCoordsXYZ(i)}` : `index2 = index2 - ${coords3[i]} * uniforms.outShapeStrides.${getCoordsXYZ(i)}`; + snippet = "var index2 = index;" + strides.map((_, i2) => { + const line1 = `let ${coords3[i2]} = index2 / uniforms.outShapeStrides.${getCoordsXYZ(i2)}`; + const line2 = i2 === strides.length - 1 ? `let ${coords3[i2 + 1]} = index2 - ${coords3[i2]} * uniforms.outShapeStrides.${getCoordsXYZ(i2)}` : `index2 = index2 - ${coords3[i2]} * uniforms.outShapeStrides.${getCoordsXYZ(i2)}`; return `${line1}; ${line2};`; }).join(""); return ` @@ -68086,7 +67785,7 @@ function getInputByOutputSnippet(inputInfo, outShape, isVec4, isFlatDispatchLayo } else { if (outRank > 1) { const coordsType = getCoordsDataType2(inRank); - const coordsValues = inputInfo.shape.map((s, i) => `coords.${getCoordsXYZ(i + rankDiff)}`).join(", "); + const coordsValues = inputInfo.shape.map((s2, i2) => `coords.${getCoordsXYZ(i2 + rankDiff)}`).join(", "); unpackedCoordsSnippet = `${coordsType}(${coordsValues})`; } else { unpackedCoordsSnippet = "coords"; @@ -68134,6 +67833,10 @@ function getInputSnippet(inputInfo, outShape, isVec4, isFlatDispatchLayout) { function getOutputCoordsSnippet(outShape, dispatchLayout) { const { x, y = [], z = [] } = dispatchLayout; const outRank = outShape.length; + const rank = x.length + y.length + z.length; + if (rank !== outRank) { + return ""; + } if (x.length === outRank) { const dtype2 = getCoordsDataType2(outRank); const snippet2 = `fn getOutputCoords() -> ${dtype2}{ @@ -68145,31 +67848,29 @@ function getOutputCoordsSnippet(outShape, dispatchLayout) { } let gatherDimensionsStr = ""; const dims = [x, y, z]; - let rank = 0; - for (let i = 0; i < dims.length; i++) { - const arr = dims[i]; + for (let i2 = 0; i2 < dims.length; i2++) { + const arr = dims[i2]; if (arr.length === 0) { continue; } - rank += arr.length; if (arr.length === 1) { - gatherDimensionsStr += `let d${arr[0]} = i32(globalId[${i}]);`; + gatherDimensionsStr += `let d${arr[0]} = i32(globalId[${i2}]);`; } else { const strides = symbolicallyComputeStrides2(arr, "uniforms.outShape"); - gatherDimensionsStr += `var index${i} = i32(globalId[${i}]);`; + gatherDimensionsStr += `var index${i2} = i32(globalId[${i2}]);`; for (let j = 0; j < strides.length; j++) { - gatherDimensionsStr += `let d${arr[j]} = index${i} / ${strides[j]};`; + gatherDimensionsStr += `let d${arr[j]} = index${i2} / ${strides[j]};`; if (j === strides.length - 1) { - gatherDimensionsStr += `let d${arr[j + 1]} = index${i} - d${arr[j]} * ${strides[j]};`; + gatherDimensionsStr += `let d${arr[j + 1]} = index${i2} - d${arr[j]} * ${strides[j]};`; } else { - gatherDimensionsStr += `index${i} = index${i} - d${arr[j]} * ${strides[j]};`; + gatherDimensionsStr += `index${i2} = index${i2} - d${arr[j]} * ${strides[j]};`; } } } } const dimensions = []; - for (let i = 0; i < rank; i++) { - dimensions.push(`d${i}`); + for (let i2 = 0; i2 < rank; i2++) { + dimensions.push(`d${i2}`); } const dtype = getCoordsDataType2(rank); let snippet = `fn getOutputCoords() -> ${dtype} { @@ -68317,7 +68018,7 @@ function insertAlignment(uniformShader) { return uniformShader; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/webgpu_util.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/webgpu_util.js var webgpu_util_exports = {}; __export(webgpu_util_exports, { ArrayBufferToTypedArray: () => ArrayBufferToTypedArray, @@ -68333,8 +68034,8 @@ __export(webgpu_util_exports, { }); var arrayProduct = (arr) => { let product = 1; - for (let i = 0; i < arr.length; i++) { - product *= arr[i]; + for (let i2 = 0; i2 < arr.length; i2++) { + product *= arr[i2]; } return product; }; @@ -68394,7 +68095,7 @@ function computeWorkPerThreadForConv2d(layout, outputShape, isVec4 = false) { return [2, 2, 1]; } function flatDispatchLayout(shape) { - return { x: shape.map((d, i) => i) }; + return { x: shape.map((d, i2) => i2) }; } function GPUBytesPerElement(dtype) { if (dtype === "float32" || dtype === "int32" || dtype === "bool" || dtype === "string") { @@ -68428,7 +68129,7 @@ var MatMulProgramType; MatMulProgramType2[MatMulProgramType2["MatMulMax"] = 4] = "MatMulMax"; })(MatMulProgramType || (MatMulProgramType = {})); -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/backend_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/backend_webgpu.js var CPU_HANDOFF_SIZE_THRESHOLD2 = env().getNumber("WEBGPU_CPU_HANDOFF_SIZE_THRESHOLD"); var reshapeDispatch = (device, program) => { const MAX_COMPUTE_PER_DIMENSION_DISPATCH_SIZE = device.limits.maxComputeWorkgroupsPerDimension; @@ -68448,7 +68149,7 @@ var reshapeDispatch = (device, program) => { } }; var WebGPUBackend = class extends KernelBackend { - constructor(device) { + constructor(device, adapterInfo) { super(); this.commandQueueOwnedIds = /* @__PURE__ */ new WeakSet(); this.dispatchNumberInEncoder = 0; @@ -68467,6 +68168,7 @@ var WebGPUBackend = class extends KernelBackend { this.currentCommandEncoder = null; this.currentComputePass = null; this.supportTimeQuery = device.features.has("timestamp-query"); + this.adapterInfo = new AdapterInfo(adapterInfo); this.bufferManager = new BufferManager(this.device); this.textureManager = new TextureManager2(this.device); this.tensorMap = new DataStorage(this, engine()); @@ -68694,17 +68396,17 @@ var WebGPUBackend = class extends KernelBackend { tensorData.resourceInfo = { size, usage: this.defaultGpuBufferUsage(), buffer: buffer2 }; return { tensorRef, buffer: buffer2, bufSize: size }; } - bufferSync(t) { - const data = this.readSync(t.dataId); - if (t.dtype === "string") { + bufferSync(t2) { + const data = this.readSync(t2.dataId); + if (t2.dtype === "string") { try { const strings = data.map((d) => util_exports.decodeString(d)); - return buffer(t.shape, t.dtype, strings); + return buffer(t2.shape, t2.dtype, strings); } catch (_a) { throw new Error("Failed to decode encoded string bytes into utf-8"); } } - return buffer(t.shape, t.dtype, data); + return buffer(t2.shape, t2.dtype, data); } async time(f) { if (!this.supportTimeQuery) { @@ -68735,7 +68437,7 @@ var WebGPUBackend = class extends KernelBackend { }; const kernelMs = await Promise.all(flattenedActiveTimerQueries); res["kernelMs"] = util_exports.sum(kernelMs); - res["getExtraProfileInfo"] = () => kernelMs.map((d, i) => ({ name: flattenedActiveTimerNames[i], ms: d })).map((d) => `${d.name}: ${d.ms}`).join(", "); + res["getExtraProfileInfo"] = () => kernelMs.map((d, i2) => ({ name: flattenedActiveTimerNames[i2], ms: d })).map((d) => `${d.name}: ${d.ms}`).join(", "); this.uploadWaitMs = 0; this.downloadWaitMs = 0; return res; @@ -68838,8 +68540,8 @@ var WebGPUBackend = class extends KernelBackend { currentOffset += d.data.length * 4; }); const arrayBuffer = new ArrayBuffer(currentOffset); - programUniform.forEach((d, i) => { - const offset = offsets[i]; + programUniform.forEach((d, i2) => { + const offset = offsets[i2]; if (d.type === "int32") { new Int32Array(arrayBuffer, offset, d.data.length).set(d.data); } else if (d.type === "uint32") { @@ -68884,7 +68586,7 @@ var WebGPUBackend = class extends KernelBackend { programUniform.push({ type: uniformsType, data: [program.isVec4 ? size / 4 : size] }); } } - const inputsData = inputs.map((input2, i) => { + const inputsData = inputs.map((input2, i2) => { if (input2.dtype === "complex64") { throw new Error(`GPGPUProgram does not support complex64 input. For complex64 dtypes, please separate the program into real and imaginary parts.`); } @@ -68892,7 +68594,7 @@ var WebGPUBackend = class extends KernelBackend { return { dtype: this.tensorMap.get(input2.dataId).dtype, shape: input2.shape, - name: program.variableNames[i] + name: program.variableNames[i2] }; }); const key = makeShaderKey2(program, bufferShapes, inputsData, output); @@ -68908,12 +68610,12 @@ var WebGPUBackend = class extends KernelBackend { } const bindings = [ this.tensorToBinding(output), - ...inputs.map((t) => this.tensorToBinding(t)), + ...inputs.map((t2) => this.tensorToBinding(t2)), this.makeUniforms(programUniform) ]; const bindGroup = this.device.createBindGroup({ layout: pipeline.getBindGroupLayout(0), - entries: bindings.map((b, i) => ({ binding: i, resource: b })) + entries: bindings.map((b, i2) => ({ binding: i2, resource: b })) }); this.ensureCommandEncoderReady(); const pass = this.getComputePass(); @@ -68980,7 +68682,7 @@ var WebGPUBackend = class extends KernelBackend { }; WebGPUBackend.nextDataId = 0; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/base.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/base.js if (isWebGPUSupported()) { registerBackend("webgpu", async () => { env().set("CHECK_COMPUTATION_FOR_ERRORS", false); @@ -69000,11 +68702,12 @@ if (isWebGPUSupported()) { deviceDescriptor.requiredFeatures = ["timestamp-query"]; } const device = await adapter.requestDevice(deviceDescriptor); - return new WebGPUBackend(device); + const adapterInfo = await adapter.requestAdapterInfo(); + return new WebGPUBackend(device, adapterInfo); }, 3); } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/binary_op_util.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/binary_op_util.js var BinaryOpType; (function(BinaryOpType2) { BinaryOpType2[BinaryOpType2["MUL"] = 0] = "MUL"; @@ -69028,7 +68731,7 @@ var BinaryOpType; BinaryOpType2[BinaryOpType2["COMPLEX_MULTIPLY_REAL"] = 18] = "COMPLEX_MULTIPLY_REAL"; BinaryOpType2[BinaryOpType2["COMPLEX_MULTIPLY_IMAG"] = 19] = "COMPLEX_MULTIPLY_IMAG"; })(BinaryOpType || (BinaryOpType = {})); -var CHECK_NAN_SNIPPET4 = ` +var CHECK_NAN_SNIPPET3 = ` if (isnan(a)) { return a; } if (isnan(b)) { return b; } `; @@ -69143,7 +68846,7 @@ var POW_VEC4 = ` if (isExpZero.a) { resultTemp.a = 1.0; } - let isNaN = a < vec4(0.0) & floor(b) < b; + let isNaN = (a < vec4(0.0)) & (floor(b) < b); let valueForNaN = uniforms.NAN; ${CHECK_NAN_SNIPPET_VEC4_INNER} return resultTemp; @@ -69154,7 +68857,7 @@ var PRELU_VEC4 = ` return (aLessThanZero * (b * a)) + ((vec4(1.0) - aLessThanZero) * a); `; function getBinaryWithNanString(op2, useVec4, valueForNaN = "uniforms.NAN") { - const checkNanSnippet = useVec4 ? CHECK_NAN_SNIPPET_VEC4 : CHECK_NAN_SNIPPET4; + const checkNanSnippet = useVec4 ? CHECK_NAN_SNIPPET_VEC4 : CHECK_NAN_SNIPPET3; return useVec4 ? ` let valueForNaN = ${valueForNaN}; var resultTemp = vec4(${op2}(a, b)); @@ -69211,7 +68914,7 @@ function getBinaryOpString(type, useVec4) { } } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/unary_op_util.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/unary_op_util.js var UnaryOpType; (function(UnaryOpType2) { UnaryOpType2[UnaryOpType2["ABS"] = 0] = "ABS"; @@ -69269,7 +68972,7 @@ var EXP2 = `return exp(a);`; var FLOOR2 = `return floor(a);`; var IS_NAN2 = `return f32(isnan(a));`; var LINEAR3 = `return a;`; -var LOG2 = `if (a < 0.0) { return 1.0/0.0; } +var LOG2 = `if (a < 0.0) { return uniforms.NAN; } return log(a);`; var LOGICAL_NOT2 = `return f32(!(a >= 1.0));`; var NEG2 = `return -a;`; @@ -69356,7 +69059,7 @@ function getUnaryOpString(type, useVec4) { } } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/activation_util.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/activation_util.js var typeSnippet = (component) => { switch (component) { case 1: @@ -69417,21 +69120,15 @@ function biasActivationSnippet(hasBias, activation2) { `; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/matmul_packed_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/matmul_packed_webgpu.js function matMulReadFnSource(batchAEqualOne, batchBEqualOne, transposeA, transposeB, fitAOuter = false, fitBOuter = false, fitInner = false, component = 1) { util_exports.assert(transposeA && component === 1 || !transposeA, () => `transposeA ${transposeA} is not compatible with component size ${component}`); const sampleA = ` let batch = ${batchAEqualOne ? "0" : "batchIn"}; - let batchASize = uniforms.aShape[1] * uniforms.aShape[2]; - ${transposeA ? `value = A[(batch * batchASize + col * uniforms.aShape[2] + row) / ${component}];` : `value = A[(batch * batchASize + row * uniforms.aShape[2] + col) / ${component}];`} + ${transposeA ? `value = getA(batch, col, row);` : `value = getA(batch, row, col);`} `; - let sampleB; - if (transposeB === false) { - sampleB = `value = B[(batch * batchBSize + row * uniforms.bShape[2] + col) / ${component}];`; - } else { - sampleB = `value = B[(batch * batchBSize + col * uniforms.bShape[2] + row) / ${component}];`; - } + const sampleB = transposeB ? `value = getB(batch, col, row);` : `value = getB(batch, row, col);`; return ` fn mm_readA(batchIn: i32, row: i32, colIn: i32) -> ${typeSnippet(component)} { var value = ${typeSnippet(component)}(0.0); @@ -69448,7 +69145,6 @@ function matMulReadFnSource(batchAEqualOne, batchBEqualOne, transposeA, transpos fn mm_readB(batchIn: i32, row: i32, colIn: i32) -> ${typeSnippet(component)} { let col = colIn * ${component}; let batch = ${batchBEqualOne ? "0" : "batchIn"}; - let batchBSize = uniforms.bShape[1] * uniforms.bShape[2]; var value = ${typeSnippet(component)}(0.0); ${sampleB} return value; @@ -69606,7 +69302,7 @@ var writeDataToSubASnippet = (transpose6) => { var readDataFromSubASnippet = (transposeA) => { return transposeA ? "let ACached = mm_Asub[k][tileRow + innerRow];" : "let ACached = mm_Asub[tileRow + innerRow][k];"; }; -function makeMatMulPackedSource(workPerThread, workGroupSize, transposeA = false, tileInner = 32, splitK = false, splitedDimInner = 32) { +function makeMatMulPackedSource(workPerThread, workGroupSize, transposeA = false, tileInner = 32, splitK = false, splitedDimInner = 32, sequentialAccessByThreads = false) { const tileAOuter = workPerThread[1] * workGroupSize[1]; const tileBOuter = workPerThread[0] * workGroupSize[0]; const tileAWidth = transposeA ? tileAOuter : tileInner; @@ -69615,64 +69311,26 @@ function makeMatMulPackedSource(workPerThread, workGroupSize, transposeA = false const rowPerThreadA = tileAHight / workGroupSize[1]; const colPerThreadA = tileAWidth / workGroupSize[0]; const rowPerThreadB = tileInner / workGroupSize[1]; - return ` - var mm_Asub : array, ${tileAHight}>; - var mm_Bsub : array, ${tileInner}>; - const RowPerThread = ${workPerThread[1]}; - const ColPerThread = ${workPerThread[0]}; - const TileInner = ${tileInner}; - - @compute @workgroup_size(workGroupSizeX, workGroupSizeY, workGroupSizeZ) - fn _start(@builtin(local_invocation_id) LocalId : vec3, - @builtin(global_invocation_id) GlobalId : vec3, - @builtin(num_workgroups) NumWorkgroups: vec3, - @builtin(workgroup_id) workgroupId: vec3) { - localId = LocalId; - globalId = GlobalId; - numWorkgroups = NumWorkgroups; - - let tileRow = i32(localId.y) * RowPerThread; - let tileCol = i32(localId.x) * ColPerThread; - - let globalRow = i32(globalId.y) * RowPerThread; - let globalCol = i32(globalId.x) * ColPerThread; - let batch = ${splitK ? "0" : "i32(globalId.z)"}; + const matmulSnippet = sequentialAccessByThreads ? ` + let localRow = i32(localId.y); + let localCol = i32(localId.x); let globalRowStart = i32(workgroupId.y) * ${tileAOuter}; + let globalColStart = i32(workgroupId.x) * ${tileBOuter}; - let numTiles = ${splitK ? `${Math.ceil(splitedDimInner / tileInner)}` : "(uniforms.dimInner - 1) / TileInner + 1"}; - var kStart = ${splitK ? `i32(globalId.z) * ${splitedDimInner}` : "0"}; - - var acc : array, RowPerThread>; - - // Without this initialization strange values show up in acc. - for (var innerRow = 0; innerRow < RowPerThread; innerRow = innerRow + 1) { - for (var innerCol = 0; innerCol < ColPerThread; innerCol = innerCol + 1) { - acc[innerRow][innerCol] = 0.0; - } - } - - let tileRowA = i32(localId.y) * ${rowPerThreadA}; - let tileColA = i32(localId.x) * ${colPerThreadA}; - let tileRowB = i32(localId.y) * ${rowPerThreadB}; // Loop over shared dimension. for (var t = 0; t < numTiles; t = t + 1) { // Load one tile of A into local memory. - for (var innerRow = 0; innerRow < ${rowPerThreadA}; innerRow = innerRow + 1) { - for (var innerCol = 0; innerCol < ${colPerThreadA}; innerCol = innerCol + 1) { - let inputRow = tileRowA + innerRow; - let inputCol = tileColA + innerCol; + for (var inputRow = localRow; inputRow < ${tileAHight}; inputRow = inputRow + ${workGroupSize[1]}) { + for (var inputCol = localCol; inputCol < ${tileAWidth}; inputCol = inputCol + ${workGroupSize[0]}) { ${writeDataToSubASnippet(transposeA)} } } - // Load one tile of B into local memory. - for (var innerRow = 0; innerRow < ${rowPerThreadB}; innerRow = innerRow + 1) { - for (var innerCol = 0; innerCol < ColPerThread; innerCol = innerCol + 1) { - let inputRow = tileRowB + innerRow; - let inputCol = tileCol + innerCol; + for (var inputRow = localRow; inputRow < ${tileInner}; inputRow = inputRow + ${workGroupSize[1]}) { + for (var inputCol = localCol; inputCol < ${tileBOuter}; inputCol = inputCol + ${workGroupSize[0]}) { mm_Bsub[inputRow][inputCol] = mm_readB(batch, kStart + inputRow, - globalCol + innerCol); + globalColStart + inputCol); } } kStart = kStart + TileInner; @@ -69682,26 +69340,114 @@ function makeMatMulPackedSource(workPerThread, workGroupSize, transposeA = false var BCached : array; for (var k = 0; k < TileInner; k = k + 1) { for (var inner = 0; inner < ColPerThread; inner = inner + 1) { - BCached[inner] = mm_Bsub[k][tileCol + inner]; + BCached[inner] = mm_Bsub[k][localCol + inner * ${workGroupSize[0]}]; } - for (var innerRow = 0; innerRow < RowPerThread; innerRow = innerRow + 1) { - ${readDataFromSubASnippet(transposeA)} + let ACached = ${transposeA ? `mm_Asub[k][localRow + innerRow * ${workGroupSize[1]}];` : `mm_Asub[localRow + innerRow * ${workGroupSize[1]}][k];`} for (var innerCol = 0; innerCol < ColPerThread; innerCol = innerCol + 1) { - acc[innerRow][innerCol] = acc[innerRow][innerCol] + ACached * BCached[innerCol]; + acc[innerRow][innerCol] = acc[innerRow][innerCol] + + ACached * BCached[innerCol]; } } } - workgroupBarrier(); } + for (var innerRow = 0; innerRow < RowPerThread; innerRow = innerRow + 1) { + let gRow = globalRowStart + localRow + innerRow * ${workGroupSize[1]}; + for (var innerCol = 0; innerCol < ColPerThread; innerCol = innerCol + 1) { + let gCol = globalColStart + localCol + innerCol * ${workGroupSize[0]}; + mm_write(batch, gRow, gCol, acc[innerRow][innerCol]); + } + } + ` : ` + let tileRow = i32(localId.y) * RowPerThread; + let tileCol = i32(localId.x) * ColPerThread; + + let globalRow = i32(globalId.y) * RowPerThread; + let globalCol = i32(globalId.x) * ColPerThread; + let globalRowStart = i32(workgroupId.y) * ${tileAOuter}; + + let tileRowA = i32(localId.y) * ${rowPerThreadA}; + let tileColA = i32(localId.x) * ${colPerThreadA}; + let tileRowB = i32(localId.y) * ${rowPerThreadB}; + // Loop over shared dimension. + for (var t = 0; t < numTiles; t = t + 1) { + // Load one tile of A into local memory. + for (var innerRow = 0; innerRow < ${rowPerThreadA}; innerRow = innerRow + 1) { + for (var innerCol = 0; innerCol < ${colPerThreadA}; innerCol = innerCol + 1) { + let inputRow = tileRowA + innerRow; + let inputCol = tileColA + innerCol; + ${writeDataToSubASnippet(transposeA)} + } + } + + // Load one tile of B into local memory. + for (var innerRow = 0; innerRow < ${rowPerThreadB}; innerRow = innerRow + 1) { + for (var innerCol = 0; innerCol < ColPerThread; innerCol = innerCol + 1) { + let inputRow = tileRowB + innerRow; + let inputCol = tileCol + innerCol; + mm_Bsub[inputRow][inputCol] = mm_readB(batch, + kStart + inputRow, + globalCol + innerCol); + } + } + kStart = kStart + TileInner; + workgroupBarrier(); + + // Compute acc values for a single thread. + var BCached : array; + for (var k = 0; k < TileInner; k = k + 1) { + for (var inner = 0; inner < ColPerThread; inner = inner + 1) { + BCached[inner] = mm_Bsub[k][tileCol + inner]; + } + + for (var innerRow = 0; innerRow < RowPerThread; innerRow = innerRow + 1) { + ${readDataFromSubASnippet(transposeA)} + for (var innerCol = 0; innerCol < ColPerThread; innerCol = innerCol + 1) { + acc[innerRow][innerCol] = acc[innerRow][innerCol] + ACached * BCached[innerCol]; + } + } + } + + workgroupBarrier(); + } + + for (var innerRow = 0; innerRow < RowPerThread; innerRow = innerRow + 1) { + for (var innerCol = 0; innerCol < ColPerThread; innerCol = innerCol + 1) { + mm_write(batch, globalRow + innerRow, globalCol + innerCol, + acc[innerRow][innerCol]); + } + } + `; + return ` + var mm_Asub : array, ${tileAHight}>; + var mm_Bsub : array, ${tileInner}>; + const RowPerThread = ${workPerThread[1]}; + const ColPerThread = ${workPerThread[0]}; + const TileInner = ${tileInner}; + + @compute @workgroup_size(workGroupSizeX, workGroupSizeY, workGroupSizeZ) + fn _start(@builtin(local_invocation_id) LocalId : vec3, + @builtin(global_invocation_id) GlobalId : vec3, + @builtin(num_workgroups) NumWorkgroups: vec3, + @builtin(workgroup_id) workgroupId: vec3) { + localId = LocalId; + globalId = GlobalId; + numWorkgroups = NumWorkgroups; + let batch = ${splitK ? "0" : "i32(globalId.z)"}; + let numTiles = ${splitK ? `${Math.ceil(splitedDimInner / tileInner)}` : "(uniforms.dimInner - 1) / TileInner + 1"}; + var kStart = ${splitK ? `i32(globalId.z) * ${splitedDimInner}` : "0"}; + + var acc : array, RowPerThread>; + + // Without this initialization strange values show up in acc. for (var innerRow = 0; innerRow < RowPerThread; innerRow = innerRow + 1) { for (var innerCol = 0; innerCol < ColPerThread; innerCol = innerCol + 1) { - mm_write(batch, globalRow + innerRow, globalCol + innerCol, - acc[innerRow][innerCol]); + acc[innerRow][innerCol] = 0.0; } } + ${matmulSnippet} } `; } @@ -69761,7 +69507,7 @@ function makeVectorMatrixProductSource(workGroupSize, transposeA = false) { `; } var MatMulPackedProgram2 = class { - constructor(aShape, outputShape, batchAEqualOne, batchBEqualOne, transposeA = false, transposeB = false, bias = null, activation2 = null, preluActivationWeights = null) { + constructor(aShape, outputShape, batchAEqualOne, batchBEqualOne, transposeA = false, transposeB = false, bias = null, activation2 = null, preluActivationWeights = null, sequentialAccessByThreads = false) { this.variableNames = ["A", "B"]; this.uniforms = `dimAOuter : i32, dimBOuter : i32, dimInner : i32,`; this.outputShape = outputShape; @@ -69786,6 +69532,7 @@ var MatMulPackedProgram2 = class { if (hasPreluActivationWeights) { this.variableNames.push("preluActivationWeights"); } + this.sequentialAccessByThreads = sequentialAccessByThreads; this.transposeA = transposeA; this.transposeB = transposeB; this.addBias = addBias; @@ -69794,7 +69541,7 @@ var MatMulPackedProgram2 = class { this.batchAEqualOne = batchAEqualOne; this.batchBEqualOne = batchBEqualOne; [this.fitAOuter, this.fitBOuter, this.fitInner] = this.getShapeFit(outputShape[1], outputShape[2], dimInner); - this.shaderKey = `matMulPacked_${this.elementsPerThread}_${transposeA}_${transposeB}_${this.activation}_${this.fitAOuter}_${this.fitBOuter}_${this.fitInner}_${this.isVec4}_${this.isVectorA}_${this.batchAEqualOne}_${this.batchBEqualOne}`; + this.shaderKey = `matMulPacked_${this.elementsPerThread}_${transposeA}_${transposeB}_${this.activation}_${this.fitAOuter}_${this.fitBOuter}_${this.fitInner}_${this.isVec4}_${this.isVectorA}_${this.batchAEqualOne}_${this.batchBEqualOne}_${this.sequentialAccessByThreads}`; } getShapeFit(dimAOuter, dimBOuter, dimInner) { const tileAOuter = this.workGroupSize[1] * this.elementsPerThread[1]; @@ -69813,13 +69560,13 @@ var MatMulPackedProgram2 = class { const userCode = ` ${activationFnSnippet(this.activation, this.hasPreluActivationWeights, this.isVec4)} ${matMulReadWriteFnSource(this.addBias, this.activation, this.batchAEqualOne, this.batchBEqualOne, false, this.transposeB, this.fitAOuter, this.fitBOuter, this.fitInner, this.isVec4 ? 4 : 1)} - ${this.isVec4 ? makeMatMulPackedVec4Source(this.elementsPerThread, this.workGroupSize, this.transposeA, this.tileInner, false, null, this.isVectorA) : this.isVectorA ? makeVectorMatrixProductSource(this.workGroupSize, this.transposeA) : makeMatMulPackedSource(this.elementsPerThread, this.workGroupSize, this.transposeA, this.tileInner)} + ${this.isVec4 ? makeMatMulPackedVec4Source(this.elementsPerThread, this.workGroupSize, this.transposeA, this.tileInner, false, null, this.isVectorA) : this.isVectorA ? makeVectorMatrixProductSource(this.workGroupSize, this.transposeA) : makeMatMulPackedSource(this.elementsPerThread, this.workGroupSize, this.transposeA, this.tileInner, false, null, this.sequentialAccessByThreads)} `; return userCode; } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/matmul_reduce_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/matmul_reduce_webgpu.js function makeMatMulReduceSource() { return ` var sumValues : array; @@ -69889,7 +69636,7 @@ var MatMulReduceProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/matmul_small_output_size_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/matmul_small_output_size_webgpu.js function makeMatMulSmallOutputSizeSource(workGroupSize) { const tileAOuter = workGroupSize[1]; const tileBOuter = workGroupSize[0]; @@ -69985,7 +69732,7 @@ var MatMulSmallOutputSizeProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/matmul_splitK_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/matmul_splitK_webgpu.js var MatMulSplitKProgram = class { constructor(outputShape, dimInner, batchAEqualOne, batchBEqualOne, transposeA = false, transposeB = false) { this.variableNames = ["A", "B"]; @@ -70089,7 +69836,7 @@ var BiasActivationProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/fill_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/fill_webgpu.js var FillProgram2 = class { constructor(shape) { this.variableNames = []; @@ -70114,7 +69861,7 @@ var FillProgram2 = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Fill.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Fill.js function fill5(args) { const { backend: backend2, attrs } = args; const { shape, value } = attrs; @@ -70136,7 +69883,7 @@ var fillConfig4 = { kernelFunc: fill5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Reshape.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Reshape.js function reshape6(args) { const { inputs, attrs } = args; const { x } = inputs; @@ -70154,7 +69901,7 @@ var reshapeConfig4 = { kernelFunc: reshape6 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/BatchMatMul_impl.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/BatchMatMul_impl.js function batchMatMulImpl2({ a, b, transposeA, transposeB, backend: backend2, bias = null, preluActivationWeights = null, leakyreluAlpha = 0, activation: activation2 = null }) { const aRank = a.shape.length; const bRank = b.shape.length; @@ -70224,8 +69971,8 @@ function batchMatMulImpl2({ a, b, transposeA, transposeB, backend: backend2, bia intermediates.push(out); const outReshaped2 = reshape6({ inputs: { x: outActivated }, backend: backend2, attrs: { shape: outShape } }); intermediates.push(outActivated); - for (const i of intermediates) { - backend2.disposeData(i.dataId); + for (const i2 of intermediates) { + backend2.disposeData(i2.dataId); } return outReshaped2; } @@ -70235,7 +69982,8 @@ function batchMatMulImpl2({ a, b, transposeA, transposeB, backend: backend2, bia program = new MatMulSmallOutputSizeProgram(a3dShape, b3dShape, outputShape, transposeA, transposeB, bias, activation2, preluActivationWeights); break; case MatMulProgramType.MatMulPackedProgram: - program = new MatMulPackedProgram2(a3dShape, outputShape, batchAEqualOne, batchBEqualOne, transposeA, transposeB, bias, activation2, preluActivationWeights); + const sequentialAccessByThreads = backend2.adapterInfo.isIntel(); + program = new MatMulPackedProgram2(a3dShape, outputShape, batchAEqualOne, batchBEqualOne, transposeA, transposeB, bias, activation2, preluActivationWeights, sequentialAccessByThreads); break; default: throw new Error(`Unsupported MatMulProgramType ${matmulProgramType}.`); @@ -70253,13 +70001,13 @@ function batchMatMulImpl2({ a, b, transposeA, transposeB, backend: backend2, bia out = backend2.runWebGPUProgram(program, inputs, a.dtype, dimensions, out); const outReshaped = reshape6({ inputs: { x: out }, backend: backend2, attrs: { shape: outShape } }); intermediates.push(out); - for (const i of intermediates) { - backend2.disposeData(i.dataId); + for (const i2 of intermediates) { + backend2.disposeData(i2.dataId); } return outReshaped; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/_FusedMatMul.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/_FusedMatMul.js function _fusedMatMul3(args) { const { inputs, backend: backend2, attrs } = args; const { a, b, bias, preluActivationWeights } = inputs; @@ -70282,7 +70030,7 @@ var _fusedMatMulConfig4 = { kernelFunc: _fusedMatMul3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/binary_op_complex_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/binary_op_complex_webgpu.js var BinaryOpComplexProgram2 = class { constructor(op2, aShape, bShape) { this.variableNames = ["AReal", "AImag", "BReal", "BImag"]; @@ -70316,7 +70064,7 @@ var BinaryOpComplexProgram2 = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/binary_op_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/binary_op_webgpu.js var BinaryOpProgram2 = class { constructor(op2, aShape, bShape) { this.size = true; @@ -70324,21 +70072,15 @@ var BinaryOpProgram2 = class { this.outputShape = backend_util_exports.assertAndGetBroadcastShape(aShape, bShape); this.dispatchLayout = flatDispatchLayout(this.outputShape); this.op = op2; - this.useSharedMemoryWithA = aShape.length === 1 && bShape.length > 1 && aShape[0] < 1024; - this.useSharedMemoryWithB = bShape.length === 1 && aShape.length > 1 && bShape[0] < 1024; + this.useSharedMemoryWithA = aShape.length <= 1 && bShape.length > 1 && aShape[0] < 128; + this.useSharedMemoryWithB = bShape.length <= 1 && aShape.length > 1 && bShape[0] < 128; if (this.useSharedMemoryWithA || this.useSharedMemoryWithB) { this.isVec4 = false; this.lastDimensionSize = this.useSharedMemoryWithB ? bShape[0] : aShape[0]; this.shaderKey = `binary_${this.type}_${op2}_${this.lastDimensionSize}_${this.useSharedMemoryWithB}`; this.type = "shared"; this.workGroupSize = [256, 1, 1]; - if (this.lastDimensionSize < 256) { - this.workPerThread = 1; - } else if (this.lastDimensionSize < 512) { - this.workPerThread = 2; - } else { - this.workPerThread = 4; - } + this.workPerThread = 1; } else { if (util_exports.arraysEqual(aShape, bShape) && util_exports.sizeFromShape(aShape) % 4 === 0) { this.isVec4 = true; @@ -70356,44 +70098,38 @@ var BinaryOpProgram2 = class { } getUserCode() { let userCode; + const dType = this.isVec4 ? "vec4" : "f32"; + const opFnStr = ` + fn binaryOperation(a : ${dType}, b : ${dType}) -> ${dType} { + ${getBinaryOpString(this.op, this.isVec4)} + }; + `; if (this.type === "shared") { const sharedIndexSnippet = this.lastDimensionSize > 1 ? `coords[${this.outputShape.length - 1}]` : "0"; - const accessDataSnippet = this.useSharedMemoryWithB ? `let a = getAByOutputCoords(coords); + const accessDataSnippet = this.useSharedMemoryWithB ? `let a = getAByOutputIndex(index); let b = sharedBuf[${sharedIndexSnippet}];` : `let a = sharedBuf[${sharedIndexSnippet}]; - let b = getBByOutputCoords(coords);`; - const opStr = getBinaryOpString(this.op, this.isVec4); + let b = getBByOutputIndex(index);`; userCode = ` - fn binaryOperation(a : f32, b : f32) -> f32 { - ${opStr} - } + ${opFnStr} var sharedBuf : array; ${getMainHeaderString("index")} { - // Fill in the shared memory buffer. Here we need a loop to make sure - // that all data in A|B are uploaded when |sharedMemorySize| is larger - // than work group size. - for(var localIndex = i32(localId.x); localIndex < ${this.lastDimensionSize}; localIndex = localIndex + ${this.workGroupSize[0]}) { + // Fill in the shared memory buffer. + let localIndex = i32(localId.x); + if(localIndex < ${this.lastDimensionSize}) { sharedBuf[localIndex] = f32(${this.useSharedMemoryWithB ? "B" : "A"}[localIndex]); } workgroupBarrier(); - for(var i = 0; i < ${this.workPerThread}; i = i + 1) { - let flatIndex = index * ${this.workPerThread} + i; - if(flatIndex < uniforms.size) { - let coords = getCoordsFromIndex(flatIndex); - - ${accessDataSnippet} - setOutputAtIndex(flatIndex, binaryOperation(a, b)); - } + if(index < uniforms.size) { + let coords = getCoordsFromIndex(index); + ${accessDataSnippet} + setOutputAtIndex(index, binaryOperation(a, b)); } } `; } else { - const dType = this.type === "vec4" ? "vec4" : "f32"; - const opStr = getBinaryOpString(this.op, this.isVec4); userCode = ` - fn binaryOperation(a : ${dType}, b : ${dType}) -> ${dType} { - ${opStr} - } + ${opFnStr} ${getMainHeaderString("index")} { if (index < uniforms.size) { let a = getAByOutputIndex(index); @@ -70407,7 +70143,7 @@ var BinaryOpProgram2 = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Identity.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Identity.js function identity5(args) { const { inputs } = args; const { x } = inputs; @@ -70420,7 +70156,7 @@ var identityConfig4 = { kernelFunc: identity5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Complex.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Complex.js function complex4(args) { const { inputs, backend: backend2 } = args; const { real: real5, imag: imag5 } = inputs; @@ -70437,7 +70173,7 @@ var complexConfig3 = { kernelFunc: complex4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/unary_op_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/unary_op_webgpu.js var UnaryOpProgram2 = class { constructor(outputShape, op2) { this.variableNames = ["A"]; @@ -70465,7 +70201,7 @@ var UnaryOpProgram2 = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernel_utils/kernel_funcs_utils.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernel_utils/kernel_funcs_utils.js function unaryKernelFunc3({ opType, cpuKernelImpl, dtype }) { return ({ inputs, backend: backend2 }) => { const { x } = inputs; @@ -70554,10 +70290,10 @@ function binaryKernelFunc3({ opType, cpuKernelImpl, supportsComplex = false, dty }; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernel_utils/shared.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernel_utils/shared.js var { addImpl: addImplCPU2, castImpl: castImplCPU2, ceilImpl: ceilImplCPU2, concatImpl: concatImplCPU2, equalImpl: equalImplCPU2, expImpl: expImplCPU2, expm1Impl: expm1ImplCPU2, floorImpl: floorImplCPU2, gatherNdImpl: gatherNdImplCPU2, gatherV2Impl: gatherV2ImplCPU2, greaterEqualImpl: greaterEqualImplCPU2, greaterImpl: greaterImplCPU2, lessEqualImpl: lessEqualImplCPU2, lessImpl: lessImplCPU2, logImpl: logImplCPU2, maxImpl: maxImplCPU2, maximumImpl: maximumImplCPU2, minimumImpl: minimumImplCPU2, multiplyImpl: multiplyImplCPU2, negImpl: negImplCPU2, notEqualImpl: notEqualImplCPU2, prodImpl: prodImplCPU2, rangeImpl: rangeImplCPU2, rsqrtImpl: rsqrtImplCPU2, scatterImpl: scatterImplCPU2, simpleAbsImpl: simpleAbsImplCPU2, sliceImpl: sliceImplCPU2, stridedSliceImpl: stridedSliceImplCPU2, stringNGramsImpl: stringNGramsImplCPU2, subImpl: subImplCPU2, tileImpl: tileImplCPU2, topKImpl: topKImplCPU2, transposeImpl: transposeImplCPU2, uniqueImpl: uniqueImplCPU2 } = shared_exports; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Abs.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Abs.js var abs4 = unaryKernelFunc3({ opType: UnaryOpType.ABS, cpuKernelImpl: simpleAbsImplCPU2 }); var absConfig4 = { kernelName: Abs, @@ -70565,7 +70301,7 @@ var absConfig4 = { kernelFunc: abs4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Add.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Add.js var addKernelFunc2 = binaryKernelFunc3({ opType: BinaryOpType.ADD, cpuKernelImpl: addImplCPU2, supportsComplex: true }); var addConfig4 = { kernelName: Add, @@ -70573,14 +70309,14 @@ var addConfig4 = { kernelFunc: addKernelFunc2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/addn_packed_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/addn_packed_webgpu.js var AddNPackedProgram2 = class { constructor(shapes) { - this.workPerThread = 4; + this.workPerThread = 1; this.workGroupSize = [64, 1, 1]; this.size = true; this.outputShape = shapes[0]; - this.variableNames = shapes.map((_, i) => `T${i}`); + this.variableNames = shapes.map((_, i2) => `T${i2}`); this.dispatchLayout = flatDispatchLayout(this.outputShape); this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize, [this.workPerThread, 1, 1]); this.shaderKey = "addN"; @@ -70609,15 +70345,15 @@ var AddNPackedProgram2 = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/AddN.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/AddN.js function addN4(args) { const { inputs, backend: backend2 } = args; const tensors = inputs; if (tensors.length === 1) { return identity5({ inputs: { x: tensors[0] }, backend: backend2 }); } - const dtype = tensors.map((t) => t.dtype).reduce((d1, d2) => upcastType(d1, d2)); - const shapes = tensors.map((t) => t.shape); + const dtype = tensors.map((t2) => t2.dtype).reduce((d1, d2) => upcastType(d1, d2)); + const shapes = tensors.map((t2) => t2.shape); const program = new AddNPackedProgram2(shapes); return backend2.runWebGPUProgram(program, tensors, dtype); } @@ -70627,7 +70363,7 @@ var addNConfig4 = { kernelFunc: addN4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/argminmax_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/argminmax_webgpu.js var ArgMinMaxProgram2 = class { constructor(inputShape, axis, reduceType) { this.workGroupSize = [64, 1, 1]; @@ -70664,8 +70400,8 @@ var ArgMinMaxProgram2 = class { snippet += "outputCoords,"; } } else { - for (let i = 0; i < this.outputShape.length; i++) { - snippet += `outputCoords.${getCoordsXYZ(i)},`; + for (let i2 = 0; i2 < this.outputShape.length; i2++) { + snippet += `outputCoords.${getCoordsXYZ(i2)},`; } } return snippet; @@ -70747,14 +70483,14 @@ var ArgMinMaxProgram2 = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/transpose_shared_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/transpose_shared_webgpu.js var TransposeSharedProgram = class { constructor(aShape, newDim) { this.variableNames = ["A"]; this.workGroupSize = [16, 16, 1]; const outputShape = new Array(aShape.length); - for (let i = 0; i < outputShape.length; i++) { - outputShape[i] = aShape[newDim[i]]; + for (let i2 = 0; i2 < outputShape.length; i2++) { + outputShape[i2] = aShape[newDim[i2]]; } this.outputShape = outputShape; this.dispatchLayout = { x: [0], y: [1] }; @@ -70789,16 +70525,16 @@ var TransposeSharedProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/transpose_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/transpose_webgpu.js var TransposeProgram2 = class { constructor(aShape, newDim) { this.variableNames = ["A"]; - this.workPerThread = 4; + this.workPerThread = 1; this.workGroupSize = [64, 1, 1]; this.size = true; const outputShape = new Array(aShape.length); - for (let i = 0; i < outputShape.length; i++) { - outputShape[i] = aShape[newDim[i]]; + for (let i2 = 0; i2 < outputShape.length; i2++) { + outputShape[i2] = aShape[newDim[i2]]; } this.outputShape = outputShape; this.dispatchLayout = flatDispatchLayout(this.outputShape); @@ -70830,13 +70566,13 @@ function getSwitchedCoords2(newDim) { throw Error(`Transpose for rank ${rank} is not yet supported`); } const switchedCoords = new Array(rank); - for (let i = 0; i < newDim.length; i++) { - switchedCoords[newDim[i]] = `resRC.${getCoordsXYZ(i)}`; + for (let i2 = 0; i2 < newDim.length; i2++) { + switchedCoords[newDim[i2]] = `resRC.${getCoordsXYZ(i2)}`; } return switchedCoords.join(); } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Transpose.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Transpose.js function transpose5(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -70844,8 +70580,8 @@ function transpose5(args) { const webgpuBackend = backend2; const xRank = x.shape.length; const newShape = new Array(xRank); - for (let i = 0; i < newShape.length; i++) { - newShape[i] = x.shape[perm[i]]; + for (let i2 = 0; i2 < newShape.length; i2++) { + newShape[i2] = x.shape[perm[i2]]; } if (backend2.shouldExecuteOnCPU([x])) { const xData = webgpuBackend.tensorMap.get(x.dataId); @@ -70866,7 +70602,7 @@ var transposeConfig4 = { kernelFunc: transpose5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/ArgMax.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/ArgMax.js function argMax4(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -70884,7 +70620,7 @@ function argMax4(args) { const program = new ArgMinMaxProgram2($x.shape, axes[0], "max"); const uniformData = [{ type: "float32", data: [Number.NEGATIVE_INFINITY] }]; const out = backend2.runWebGPUProgram(program, [$x], "int32", uniformData); - intermediateTensorInfos.forEach((t) => backend2.disposeData(t.dataId)); + intermediateTensorInfos.forEach((t2) => backend2.disposeData(t2.dataId)); return out; } var argMaxConfig4 = { @@ -70893,7 +70629,7 @@ var argMaxConfig4 = { kernelFunc: argMax4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/ArgMin.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/ArgMin.js function argMin4(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -70911,7 +70647,7 @@ function argMin4(args) { const program = new ArgMinMaxProgram2($x.shape, axes[0], "min"); const uniformData = [{ type: "float32", data: [Number.POSITIVE_INFINITY] }]; const out = backend2.runWebGPUProgram(program, [$x], "int32", uniformData); - intermediateTensorInfos.forEach((t) => backend2.disposeData(t.dataId)); + intermediateTensorInfos.forEach((t2) => backend2.disposeData(t2.dataId)); return out; } var argMinConfig3 = { @@ -70920,7 +70656,7 @@ var argMinConfig3 = { kernelFunc: argMin4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Atan2.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Atan2.js var atan24 = binaryKernelFunc3({ opType: BinaryOpType.ATAN2 }); var atan2Config3 = { kernelName: Atan2, @@ -70928,7 +70664,7 @@ var atan2Config3 = { kernelFunc: atan24 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/pool2d_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/pool2d_webgpu.js var Pool2DProgram2 = class { constructor(convInfo, poolType) { this.variableNames = ["x"]; @@ -70988,7 +70724,7 @@ var Pool2DProgram2 = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/pool_filtersizeone_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/pool_filtersizeone_webgpu.js var PoolWithFilterSizeEqualsOneProgram = class { constructor(convInfo) { this.variableNames = ["x"]; @@ -71021,7 +70757,7 @@ var PoolWithFilterSizeEqualsOneProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/reduce_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/reduce_webgpu.js var ReduceProgram2 = class { constructor(reduceInfo, reduceType) { this.workGroupSize = [64, 1, 1]; @@ -71103,7 +70839,7 @@ var ReduceProgram2 = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernel_utils/reduce.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernel_utils/reduce.js function reduce2(x, axis, keepDims, reduceType, backend2) { const xRank = x.shape.length; const toDispose = []; @@ -71151,11 +70887,11 @@ function reduce2(x, axis, keepDims, reduceType, backend2) { toDispose.push(reduced); res = reshape6({ inputs: { x: reduced }, attrs: { shape: resOutShape }, backend: backend2 }); } - toDispose.forEach((t) => backend2.disposeData(t.dataId)); + toDispose.forEach((t2) => backend2.disposeData(t2.dataId)); return res; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Max.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Max.js function max6(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -71168,7 +70904,7 @@ var maxConfig4 = { kernelFunc: max6 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Mean.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Mean.js function mean4(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -71181,7 +70917,7 @@ var meanConfig4 = { kernelFunc: mean4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Pool_impl.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Pool_impl.js function poolImpl(x, convInfo, poolType, backend2) { if (convInfo.filterWidth === 1 && convInfo.filterHeight === 1 && util_exports.arraysEqual(convInfo.inShape, convInfo.outShape)) { return identity5({ inputs: { x }, backend: backend2 }); @@ -71236,7 +70972,7 @@ function poolImpl(x, convInfo, poolType, backend2) { return backend2.runWebGPUProgram(program, [x], x.dtype, dimensions); } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/AvgPool.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/AvgPool.js function avgPool5(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -71251,7 +70987,7 @@ var avgPoolConfig4 = { kernelFunc: avgPool5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/BatchMatMul.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/BatchMatMul.js function batchMatMul4(args) { const { inputs, backend: backend2, attrs } = args; const { a, b } = inputs; @@ -71264,7 +71000,7 @@ var batchMatMulConfig4 = { kernelFunc: batchMatMul4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/slice_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/slice_webgpu.js var SliceProgram2 = class { constructor(start, destSize) { this.variableNames = ["source"]; @@ -71284,12 +71020,12 @@ var SliceProgram2 = class { const sourceCoords = getCoords3(this.rank); let coordSum; if (this.start.length === 1) { - coordSum = this.outputShape.map((_, i) => { + coordSum = this.outputShape.map((_, i2) => { return `sourceLoc = uniforms.start + coords;`; }); } else { - coordSum = this.outputShape.map((_, i) => { - return `sourceLoc.${coords2[i]} = uniforms.start.${getCoordsXYZ(i)} + coords.${coords2[i]};`; + coordSum = this.outputShape.map((_, i2) => { + return `sourceLoc.${coords2[i2]} = uniforms.start.${getCoordsXYZ(i2)} + coords.${coords2[i2]};`; }); } const userCode = ` @@ -71316,7 +71052,7 @@ function getCoords3(rank) { } } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Slice.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Slice.js function slice5(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -71341,7 +71077,7 @@ var sliceConfig4 = { kernelFunc: slice5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/BatchToSpaceND.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/BatchToSpaceND.js var batchToSpaceND5 = (args) => { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -71369,7 +71105,7 @@ var batchToSpaceND5 = (args) => { toDispose.push(reshapedIntermediate); toDispose.push(transposedIntermediate); toDispose.push(reshapedIntermediate2); - toDispose.forEach((t) => backend2.disposeData(t.dataId)); + toDispose.forEach((t2) => backend2.disposeData(t2.dataId)); return sliced; }; var batchToSpaceNDConfig4 = { @@ -71378,7 +71114,7 @@ var batchToSpaceNDConfig4 = { kernelFunc: batchToSpaceND5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/NotEqual.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/NotEqual.js var notEqual4 = binaryKernelFunc3({ opType: BinaryOpType.NOT_EQUAL, dtype: "bool", @@ -71390,7 +71126,7 @@ var notEqualConfig4 = { kernelFunc: notEqual4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Real.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Real.js function real4(args) { const { inputs, backend: backend2 } = args; const { input: input2 } = inputs; @@ -71403,14 +71139,14 @@ var realConfig3 = { kernelFunc: real4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernel_utils/int.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernel_utils/int.js function int2(input2, backend2) { const program = new UnaryOpProgram2(input2.shape, UnaryOpType.TO_INT); const output = backend2.runWebGPUProgram(program, [input2], "int32"); return { dataId: output.dataId, shape: output.shape, dtype: output.dtype }; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Cast.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Cast.js function cast6(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -71459,7 +71195,7 @@ var castConfig4 = { kernelFunc: cast6 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Ceil.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Ceil.js var ceil4 = unaryKernelFunc3({ opType: UnaryOpType.CEIL, cpuKernelImpl: ceilImplCPU2 }); var ceilConfig4 = { kernelName: Ceil, @@ -71467,7 +71203,7 @@ var ceilConfig4 = { kernelFunc: ceil4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/clip_vec4_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/clip_vec4_webgpu.js var ClipVec4Program = class { constructor(outputShape) { this.variableNames = ["A"]; @@ -71503,7 +71239,7 @@ var ClipVec4Program = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/clip_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/clip_webgpu.js var ClipProgram2 = class { constructor(outputShape) { this.variableNames = ["A"]; @@ -71532,7 +71268,7 @@ var ClipProgram2 = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/ClipByValue.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/ClipByValue.js function clipByValue4(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -71555,20 +71291,20 @@ var clipByValueConfig4 = { kernelFunc: clipByValue4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/concat_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/concat_webgpu.js var ConcatProgram2 = class { constructor(shapes) { this.uniforms = ""; - this.workPerThread = 4; + this.workPerThread = 1; this.workGroupSize = [64, 1, 1]; this.size = true; this.outputShape = backend_util_exports.computeOutShape(shapes, 1); - this.variableNames = shapes.map((_, i) => `T${i}`); + this.variableNames = shapes.map((_, i2) => `T${i2}`); this.dispatchLayout = flatDispatchLayout(this.outputShape); this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize, [this.workPerThread, 1, 1]); this.offsetLength = shapes.length - 1; - for (let i = 0; i < this.offsetLength; i++) { - this.uniforms += `offset${i} : i32,`; + for (let i2 = 0; i2 < this.offsetLength; i2++) { + this.uniforms += `offset${i2} : i32,`; } this.shaderKey = "concat"; } @@ -71576,8 +71312,8 @@ var ConcatProgram2 = class { const snippets = []; if (this.offsetLength > 0) { snippets.push(`if (yC < uniforms.offset0){ setOutputAtCoords(coords.x, coords.y, getT0(yR, yC)); }`); - for (let i = 1; i < this.offsetLength; i++) { - snippets.push(`else if (yC < uniforms.offset${[i]}){ setOutputAtCoords(coords.x, coords.y, getT${i}(yR, yC - uniforms.offset${i - 1})); }`); + for (let i2 = 1; i2 < this.offsetLength; i2++) { + snippets.push(`else if (yC < uniforms.offset${[i2]}){ setOutputAtCoords(coords.x, coords.y, getT${i2}(yR, yC - uniforms.offset${i2 - 1})); }`); } const lastIndex = this.offsetLength; const lastShiftIndex = this.offsetLength - 1; @@ -71603,7 +71339,7 @@ var ConcatProgram2 = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Imag.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Imag.js function imag4(args) { const { inputs, backend: backend2 } = args; const { input: input2 } = inputs; @@ -71616,17 +71352,17 @@ var imagConfig3 = { kernelFunc: imag4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Concat_impl.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Concat_impl.js function concatImpl3(inputs, axis, backend2) { const dtype = inputs[0].dtype; if (dtype === "complex64") { - const reals = inputs.map((t) => real4({ inputs: { input: t }, backend: backend2 })); - const imags = inputs.map((t) => imag4({ inputs: { input: t }, backend: backend2 })); + const reals = inputs.map((t2) => real4({ inputs: { input: t2 }, backend: backend2 })); + const imags = inputs.map((t2) => imag4({ inputs: { input: t2 }, backend: backend2 })); const realConcated = concatImpl3(reals, axis, backend2); const imagConcated = concatImpl3(imags, axis, backend2); const result = complex4({ inputs: { real: realConcated, imag: imagConcated }, backend: backend2 }); - reals.forEach((r) => backend2.disposeData(r.dataId)); - imags.forEach((i) => backend2.disposeData(i.dataId)); + reals.forEach((r2) => backend2.disposeData(r2.dataId)); + imags.forEach((i2) => backend2.disposeData(i2.dataId)); backend2.disposeData(realConcated.dataId); backend2.disposeData(imagConcated.dataId); return result; @@ -71636,84 +71372,84 @@ function concatImpl3(inputs, axis, backend2) { runOnCpu = true; } if (runOnCpu) { - const tensors2D2 = inputs.map((t) => { - const innerSize = util_exports.sizeFromShape(t.shape.slice(axis)); + const tensors2D2 = inputs.map((t2) => { + const innerSize = util_exports.sizeFromShape(t2.shape.slice(axis)); const shape = [-1, innerSize]; - return reshape6({ inputs: { x: t }, backend: backend2, attrs: { shape } }); + return reshape6({ inputs: { x: t2 }, backend: backend2, attrs: { shape } }); }); - const inputsValShapes = tensors2D2.map((t) => { - return { vals: backend2.readSync(t.dataId), shape: t.shape }; + const inputsValShapes = tensors2D2.map((t2) => { + return { vals: backend2.readSync(t2.dataId), shape: t2.shape }; }); - const outShape2 = backend_util_exports.computeOutShape(tensors2D2.map((t) => t.shape), 1); + const outShape2 = backend_util_exports.computeOutShape(tensors2D2.map((t2) => t2.shape), 1); const simplyConcat = tensors2D2[0].shape[0] === 1; const outVals = concatImplCPU2(inputsValShapes, outShape2, dtype, simplyConcat); - const finalOutShape = backend_util_exports.computeOutShape(inputs.map((t) => t.shape), axis); + const finalOutShape = backend_util_exports.computeOutShape(inputs.map((t2) => t2.shape), axis); const outInfo = backend2.makeTensorInfo(finalOutShape, dtype, outVals); - tensors2D2.forEach((t) => backend2.disposeData(t.dataId)); + tensors2D2.forEach((t2) => backend2.disposeData(t2.dataId)); return outInfo; } const maxInputNum = backend2.device.limits.maxStorageBuffersPerShaderStage - 1; if (inputs.length > maxInputNum) { const reducedInputs = []; - for (let i = 0; i < inputs.length; i += maxInputNum) { - const subArray = inputs.slice(i, i + maxInputNum); + for (let i2 = 0; i2 < inputs.length; i2 += maxInputNum) { + const subArray = inputs.slice(i2, i2 + maxInputNum); reducedInputs.push(concatImpl3(subArray, axis, backend2)); } const result = concatImpl3(reducedInputs, axis, backend2); - for (const i of reducedInputs) { - backend2.disposeData(i.dataId); + for (const i2 of reducedInputs) { + backend2.disposeData(i2.dataId); } return result; } const { tensors2D, outShape } = computeTensors2D2(inputs, axis, backend2); - const shapes = tensors2D.map((t) => t.shape); + const shapes = tensors2D.map((t2) => t2.shape); const program = new ConcatProgram2(shapes); const uniformData = []; const offsets = new Array(shapes.length - 1); if (offsets.length > 0) { offsets[0] = shapes[0][1]; uniformData.push({ type: "int32", data: [offsets[0]] }); - for (let i = 1; i < offsets.length; i++) { - offsets[i] = offsets[i - 1] + shapes[i][1]; - uniformData.push({ type: "int32", data: [offsets[i]] }); + for (let i2 = 1; i2 < offsets.length; i2++) { + offsets[i2] = offsets[i2 - 1] + shapes[i2][1]; + uniformData.push({ type: "int32", data: [offsets[i2]] }); } } const res = backend2.runWebGPUProgram(program, tensors2D, tensors2D[0].dtype, uniformData); - tensors2D.forEach((r) => backend2.disposeData(r.dataId)); + tensors2D.forEach((r2) => backend2.disposeData(r2.dataId)); const reshapedResult = reshape6({ inputs: { x: res }, backend: backend2, attrs: { shape: outShape } }); backend2.disposeData(res.dataId); return reshapedResult; } function computeTensors2D2(inputs, axis, backend2) { - const outShape = backend_util_exports.computeOutShape(inputs.map((t) => t.shape), axis); - const tensors2D = inputs.map((t) => reshape6({ - inputs: { x: t }, + const outShape = backend_util_exports.computeOutShape(inputs.map((t2) => t2.shape), axis); + const tensors2D = inputs.map((t2) => reshape6({ + inputs: { x: t2 }, backend: backend2, attrs: { shape: [ - util_exports.sizeFromShape(t.shape.slice(0, axis)), - util_exports.sizeFromShape(t.shape.slice(axis)) + util_exports.sizeFromShape(t2.shape.slice(0, axis)), + util_exports.sizeFromShape(t2.shape.slice(axis)) ] } })); return { tensors2D, outShape }; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Concat.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Concat.js function concat5(args) { const { inputs, backend: backend2, attrs } = args; const { axis } = attrs; const $axis = util_exports.parseAxisParam(axis, inputs[0].shape)[0]; - const outShape = backend_util_exports.computeOutShape(inputs.map((t) => t.shape), $axis); + const shapes = inputs.map((t2) => t2.shape); + backend_util_exports.assertParamsConsistent(shapes, $axis); + const outShape = backend_util_exports.computeOutShape(inputs.map((t2) => t2.shape), $axis); if (util_exports.sizeFromShape(outShape) === 0) { return backend2.makeTensorInfo(outShape, inputs[0].dtype, []); } - const $inputs = inputs.filter((t) => util_exports.sizeFromShape(t.shape) > 0); + const $inputs = inputs.filter((t2) => util_exports.sizeFromShape(t2.shape) > 0); if ($inputs.length === 1) { return identity5({ inputs: { x: $inputs[0] }, backend: backend2 }); } - const shapes = $inputs.map((t) => t.shape); - backend_util_exports.assertParamsConsistent(shapes, $axis); return concatImpl3($inputs, $axis, backend2); } var concatConfig4 = { @@ -71722,7 +71458,7 @@ var concatConfig4 = { kernelFunc: concat5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/conv2d_mm_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/conv2d_mm_webgpu.js function conv2dCommonSnippet(isChannelsLast, fitAOuter, fitBOuter, fitInner, addBias = false, activation2 = null, hasPreluActivationWeights = false, innerElementSizeX = 4, innerElementSizeW = 4, innerElementSize = 4) { const getXSnippet = (innerElementSize2) => { switch (innerElementSize2) { @@ -71831,7 +71567,7 @@ function conv2dCommonSnippet(isChannelsLast, fitAOuter, fitBOuter, fitInner, add return userCode; } var Conv2DMMProgram = class { - constructor(convInfo, dimAOuter, dimBOuter, dimInner, addBias = false, activation2 = null, hasPreluActivationWeights = false) { + constructor(convInfo, dimAOuter, dimBOuter, dimInner, addBias = false, activation2 = null, hasPreluActivationWeights = false, sequentialAccessByThreads = false) { this.variableNames = ["x", "W"]; this.uniforms = `filterDims : vec2, pad : vec2, stride : vec2, dilation : vec2, dimAOuter : i32, dimBOuter : i32, dimInner : i32,`; this.outputShape = convInfo.outShape; @@ -71866,6 +71602,7 @@ var Conv2DMMProgram = class { this.variableNames.push("preluActivationWeights"); } } + this.sequentialAccessByThreads = sequentialAccessByThreads; this.addBias = addBias; this.activation = activation2; this.hasPreluActivationWeights = hasPreluActivationWeights; @@ -71875,10 +71612,10 @@ var Conv2DMMProgram = class { this.fitAOuter = dimAOuter % this.tileAOuter === 0; this.fitBOuter = dimBOuter % this.tileBOuter === 0; this.fitInner = dimInner % this.tileInner === 0; - this.shaderKey = `conv2DMM_${this.elementsPerThread}_${this.activation}}_${this.fitAOuter}_${this.fitBOuter}_${this.fitInner}_${this.isVec4}_${this.innerElementSize}_${this.isChannelsLast}`; + this.shaderKey = `conv2DMM_${this.elementsPerThread}_${this.activation}}_${this.fitAOuter}_${this.fitBOuter}_${this.fitInner}_${this.isVec4}_${this.innerElementSize}_${this.isChannelsLast}_${this.sequentialAccessByThreads}`; } getUserCode() { - const matMulSource = this.isVec4 ? makeMatMulPackedVec4Source(this.elementsPerThread, this.workGroupSize, !this.isChannelsLast, this.tileInner) : makeMatMulPackedSource(this.elementsPerThread, this.workGroupSize, !this.isChannelsLast, this.tileInner); + const matMulSource = this.isVec4 ? makeMatMulPackedVec4Source(this.elementsPerThread, this.workGroupSize, !this.isChannelsLast, this.tileInner) : makeMatMulPackedSource(this.elementsPerThread, this.workGroupSize, !this.isChannelsLast, this.tileInner, false, null, this.sequentialAccessByThreads); const elementsSize = this.isVec4 ? [this.innerElementSize, 4, 4] : [1, 1, 1]; const userCode = ` ${conv2dCommonSnippet(this.isChannelsLast, this.fitAOuter, this.fitBOuter, this.fitInner, this.addBias, this.activation, this.hasPreluActivationWeights, elementsSize[0], elementsSize[1], elementsSize[2])} @@ -71888,7 +71625,80 @@ var Conv2DMMProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Conv2D_impl.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/conv2d_naive_webgpu.js +var Conv2DNaiveProgram = class { + constructor(convInfo, addBias = false, activation2 = null, hasPreluActivationWeights = false) { + this.variableNames = ["x", "W"]; + this.uniforms = "filterDims: vec2, pad: vec2, stride: vec2, dilation: vec2,"; + this.workGroupSize = [4, 4, 8]; + this.outputShape = convInfo.outShape; + this.isChannelsLast = convInfo.dataFormat === "channelsLast"; + this.dispatchLayout = this.isChannelsLast ? { x: [2], y: [1], z: [0, 3] } : { x: [3], y: [2], z: [0, 1] }; + this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize); + this.addBias = addBias; + this.activation = activation2; + this.hasPreluActivationWeights = hasPreluActivationWeights; + if (addBias) { + this.variableNames.push("bias"); + } + if (hasPreluActivationWeights) { + this.variableNames.push("preluActivationWeights"); + } + this.shaderKey = `conv2dnaive_${this.activation}_${this.isChannelsLast}`; + } + getUserCode() { + const userCode = ` + ${activationFnSnippet(this.activation, this.hasPreluActivationWeights, false, 4)} + fn readInp(batch : i32, row : i32, col : i32, chan : i32) -> f32{ + let coords = vec4(batch, row, col, chan); + if (coordsInBounds4D(coords, uniforms.xShape)) { + return getX(batch, row, col, chan); + } else { + return 0.0; + } + } + fn readFilt(row : i32, col : i32, xChannel : i32, outChannel : i32) -> f32{ + let coords = vec4(row, col, xChannel, outChannel); + if(coordsInBounds4D(coords, uniforms.wShape)) { + return getW(row, col, xChannel, outChannel); + } else { + return 0.0; + } + } + fn writeResult(batch : i32, row : i32, col : i32, chan : i32, valueIn : f32) { + let coords = ${this.isChannelsLast ? `vec4(batch, row, col, chan);` : `vec4(batch, chan, row, col);`} + if (coordsInBounds4D(coords, uniforms.outShape)) { + var value = valueIn; + ${biasActivationSnippet(this.addBias, this.activation)} + setOutputAtCoords(coords.x, coords.y, coords.z, coords.w, value); + } + } + ${getMainHeaderString("index")} { + let coords = getOutputCoords(); + let batch = coords[0]; + let outChannel = ${this.isChannelsLast ? `coords[3];` : `coords[1];`} + let outRow = ${this.isChannelsLast ? `coords[1];` : `coords[2];`} + let outCol = ${this.isChannelsLast ? `coords[2];` : `coords[3];`} + var acc : f32 = 0.0; + for (var row = 0; row < uniforms.filterDims[0]; row = row + 1) { + for (var col = 0; col < uniforms.filterDims[1]; col = col + 1) { + let xRow = outRow * uniforms.stride[0] + uniforms.dilation[0] * row - uniforms.pad[0]; + let xCol = outCol * uniforms.stride[1] + uniforms.dilation[1] * col - uniforms.pad[1]; + for (var xChannel = 0; xChannel < ${this.isChannelsLast ? `uniforms.xShape[3];` : `uniforms.xShape[1];`} xChannel = xChannel + 1) { + ${this.isChannelsLast ? `let v = readInp(batch, xRow, xCol, xChannel);` : `let v = readInp(batch, xChannel, xRow, xCol);`} + let f = readFilt(row, col, xChannel, outChannel); + acc = acc + v * f; + } + } + } + writeResult(batch, outRow, outCol, outChannel, acc); + } + `; + return userCode; + } +}; + +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Conv2D_impl.js function getShapeForBatchMatMul2(shape, isChannelsLast) { const length = shape.length; if (length >= 3) { @@ -71982,8 +71792,8 @@ function conv2dByMatMul2({ x, filter, convInfo, backend: backend2, bias = null, }); const out = reshape6({ inputs: { x: result }, backend: backend2, attrs: { shape: convInfo.outShape } }); intermediates.push(result); - for (const i of intermediates) { - backend2.disposeData(i.dataId); + for (const i2 of intermediates) { + backend2.disposeData(i2.dataId); } return out; } @@ -71992,7 +71802,8 @@ function conv2DImpl({ x, filter, convInfo, backend: backend2, bias = null, prelu const hasPreluActivationWeights = preluActivationWeights != null; const isChannelsLast = convInfo.dataFormat === "channelsLast"; const sameSize = isChannelsLast && convInfo.filterHeight === convInfo.inHeight && convInfo.filterWidth === convInfo.inWidth && convInfo.padInfo.type === "VALID"; - if (sameSize || convInfo.filterHeight === 1 && convInfo.filterWidth === 1 && convInfo.dilationHeight === 1 && convInfo.dilationWidth === 1 && convInfo.strideHeight === 1 && convInfo.strideWidth === 1 && (convInfo.padInfo.type === "SAME" || convInfo.padInfo.type === "VALID")) { + const useNaiveConv2d = env().getBool("WEBGPU_USE_NAIVE_CONV2D_DEBUG"); + if (!useNaiveConv2d && (sameSize || convInfo.filterHeight === 1 && convInfo.filterWidth === 1 && convInfo.dilationHeight === 1 && convInfo.dilationWidth === 1 && convInfo.strideHeight === 1 && convInfo.strideWidth === 1 && (convInfo.padInfo.type === "SAME" || convInfo.padInfo.type === "VALID"))) { return conv2dByMatMul2({ x, filter, @@ -72004,20 +71815,24 @@ function conv2DImpl({ x, filter, convInfo, backend: backend2, bias = null, prelu leakyreluAlpha }); } - const dimAOuter = isChannelsLast ? convInfo.outHeight * convInfo.outWidth : convInfo.outChannels; - const dimBOuter = isChannelsLast ? convInfo.outChannels : convInfo.outHeight * convInfo.outWidth; - const dimInner = convInfo.filterHeight * convInfo.filterWidth * convInfo.inChannels; + let program; const padInfo = [convInfo.padInfo.top, convInfo.padInfo.left]; const dimensions = [ { type: "int32", data: [convInfo.filterHeight, convInfo.filterWidth] }, { type: "int32", data: [...padInfo] }, { type: "int32", data: [convInfo.strideHeight, convInfo.strideWidth] }, - { type: "int32", data: [convInfo.dilationHeight, convInfo.dilationWidth] }, - { type: "int32", data: [dimAOuter] }, - { type: "int32", data: [dimBOuter] }, - { type: "int32", data: [dimInner] } + { type: "int32", data: [convInfo.dilationHeight, convInfo.dilationWidth] } ]; - const program = new Conv2DMMProgram(convInfo, dimAOuter, dimBOuter, dimInner, hasBias, activation2, hasPreluActivationWeights); + if (useNaiveConv2d) { + program = new Conv2DNaiveProgram(convInfo, hasBias, activation2, hasPreluActivationWeights); + } else { + const dimAOuter = isChannelsLast ? convInfo.outHeight * convInfo.outWidth : convInfo.outChannels; + const dimBOuter = isChannelsLast ? convInfo.outChannels : convInfo.outHeight * convInfo.outWidth; + const dimInner = convInfo.filterHeight * convInfo.filterWidth * convInfo.inChannels; + dimensions.push({ type: "int32", data: [dimAOuter] }, { type: "int32", data: [dimBOuter] }, { type: "int32", data: [dimInner] }); + const sequentialAccessByThreads = backend2.adapterInfo.isIntel(); + program = new Conv2DMMProgram(convInfo, dimAOuter, dimBOuter, dimInner, hasBias, activation2, hasPreluActivationWeights, sequentialAccessByThreads); + } const intermediates = []; const inputVar = [x, filter]; if (hasBias) { @@ -72043,13 +71858,13 @@ function conv2DImpl({ x, filter, convInfo, backend: backend2, bias = null, prelu program.uniforms += " alpha : f32,"; } const out = backend2.runWebGPUProgram(program, inputVar, x.dtype, dimensions); - for (const i of intermediates) { - backend2.disposeData(i.dataId); + for (const i2 of intermediates) { + backend2.disposeData(i2.dataId); } return out; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Conv2D.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Conv2D.js function conv2d6(args) { const { inputs, attrs, backend: backend2 } = args; const { x, filter } = inputs; @@ -72064,7 +71879,7 @@ var conv2DConfig4 = { kernelFunc: conv2d6 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/conv_backprop_mm_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/conv_backprop_mm_webgpu.js function conv2dTransposeCommonSnippet(innerElementSize = 4) { const getWSnippet = (innerElementSize2) => { switch (innerElementSize2) { @@ -72170,7 +71985,7 @@ var Conv2DDerInputMMProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/conv_backprop_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/conv_backprop_webgpu.js var Conv2DDerInputProgram2 = class { constructor(convInfo) { this.variableNames = ["dy", "W"]; @@ -72194,7 +72009,7 @@ var Conv2DDerInputProgram2 = class { let batch = coords[0]; let d1 = coords[${channelDim}]; - let dyCorner = vec2(coords[${rowDim}]), coords[${colDim}]) - uniforms.pads; + let dyCorner = vec2(coords[${rowDim}], coords[${colDim}]) - uniforms.pads; let dyRCorner = dyCorner.x; let dyCCorner = dyCorner.y; @@ -72208,7 +72023,7 @@ var Conv2DDerInputProgram2 = class { wRPerm < 0) { continue; } - let idyR = dyR; + let idyR = i32(dyR); for (var wC = 0; wC < uniforms.filterDims.y; wC = wC + 1) { let dyC = (f32(dyCCorner) + f32(wC)) / f32(uniforms.stride.y); @@ -72217,7 +72032,7 @@ var Conv2DDerInputProgram2 = class { fract(dyC) > 0.0 || wCPerm < 0) { continue; } - let idyC = dyC; + let idyC = i32(dyC); for (var d2 = 0; d2 < uniforms.outBackprop[3]; d2 = d2 + 1) { if (${this.isChannelsLast}) { @@ -72240,7 +72055,7 @@ var Conv2DDerInputProgram2 = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Conv2DBackpropInput.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Conv2DBackpropInput.js function conv2DBackpropInput5(args) { const { inputs, backend: backend2, attrs } = args; const { dy, filter } = inputs; @@ -72268,12 +72083,12 @@ function conv2DBackpropInput5(args) { } ]; let program; - if (env().getBool("WEBGPU_USE_NAIVE_CONV2D_TRANSPOSE")) { + if (env().getBool("WEBGPU_USE_NAIVE_CONV2D_TRANSPOSE") || convInfo.filterHeight <= 2 && convInfo.filterWidth <= 2 && convInfo.outChannels <= 16 && convInfo.inChannels === 1) { program = new Conv2DDerInputProgram2(convInfo); } else { program = new Conv2DDerInputMMProgram(convInfo); - const dimAOuter = convInfo.inShape[1] * convInfo.inShape[2]; - const dimBOuter = convInfo.inShape[3]; + const dimAOuter = convInfo.inHeight * convInfo.inWidth; + const dimBOuter = convInfo.inChannels; const dimInner = convInfo.filterHeight * convInfo.filterWidth * convInfo.outChannels; dimensions.push({ type: "uint32", data: [dimAOuter] }, { type: "uint32", data: [dimBOuter] }, { type: "uint32", data: [dimInner] }); } @@ -72285,7 +72100,7 @@ var conv2DBackpropInputConfig4 = { kernelFunc: conv2DBackpropInput5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Cos.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Cos.js var cos4 = unaryKernelFunc3({ opType: UnaryOpType.COS }); var cosConfig4 = { kernelName: Cos, @@ -72293,7 +72108,7 @@ var cosConfig4 = { kernelFunc: cos4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Cosh.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Cosh.js var cosh4 = unaryKernelFunc3({ opType: UnaryOpType.COSH }); var coshConfig4 = { kernelName: Cosh, @@ -72301,7 +72116,7 @@ var coshConfig4 = { kernelFunc: cosh4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/crop_and_resize_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/crop_and_resize_webgpu.js var CropAndResizeProgram2 = class { constructor(channnel, boxShape, cropSize, method) { this.variableNames = ["Image", "Boxes", "BoxInd"]; @@ -72398,7 +72213,7 @@ var CropAndResizeProgram2 = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/CropAndResize.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/CropAndResize.js var cropAndResize5 = (args) => { const { inputs, backend: backend2, attrs } = args; const { image: image2, boxes, boxInd } = inputs; @@ -72413,7 +72228,7 @@ var cropAndResizeConfig4 = { kernelFunc: cropAndResize5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/cum_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/cum_webgpu.js var CumOpType2; (function(CumOpType3) { CumOpType3["Prod"] = "*"; @@ -72494,7 +72309,7 @@ function getFinalCoord2(rank, name, op2) { } } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Cum_impl.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Cum_impl.js function cumImpl2(op2, x, backend2, axis, exclusive, reverse5) { const xRank = x.shape.length; const permutation = backend_util_exports.getAxesPermutation([axis], xRank); @@ -72508,10 +72323,10 @@ function cumImpl2(op2, x, backend2, axis, exclusive, reverse5) { } const size = permutedX.shape[permutedAxis]; let result = identity5({ inputs: { x: permutedX }, backend: backend2 }); - for (let i = 0; i <= Math.ceil(Math.log2(size)) - 1; i++) { + for (let i2 = 0; i2 <= Math.ceil(Math.log2(size)) - 1; i2++) { const program = new CumProgram2(op2, permutedX.shape, false, reverse5); const prevResult = result; - const uniformData = [{ type: "float32", data: [i] }]; + const uniformData = [{ type: "float32", data: [i2] }]; result = backend2.runWebGPUProgram(program, [result], result.dtype, uniformData); backend2.disposeData(prevResult.dataId); } @@ -72532,7 +72347,7 @@ function cumImpl2(op2, x, backend2, axis, exclusive, reverse5) { return result; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Cumprod.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Cumprod.js function cumprod5(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -72545,7 +72360,7 @@ var cumprodConfig4 = { kernelFunc: cumprod5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Cumsum.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Cumsum.js function cumsum5(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -72558,7 +72373,7 @@ var cumsumConfig4 = { kernelFunc: cumsum5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/depth_to_space_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/depth_to_space_webgpu.js var DepthToSpaceProgram2 = class { constructor(outputShape, dataFormat) { this.variableNames = ["x"]; @@ -72632,7 +72447,7 @@ var DepthToSpaceProgram2 = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/DepthToSpace.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/DepthToSpace.js function depthToSpace5(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -72657,7 +72472,7 @@ var depthToSpaceConfig4 = { kernelFunc: depthToSpace5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/depthwise_conv2d_nchw_shared_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/depthwise_conv2d_nchw_shared_webgpu.js var DepthwiseConv2DNCHWSharedProgram = class { constructor(outputShape, filterHeight, filterWidth, addBias = false, activation2 = null, hasPreluActivation = false) { this.variableNames = ["x", "W"]; @@ -72759,16 +72574,17 @@ var DepthwiseConv2DNCHWSharedProgram = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/depthwise_conv2d_vec4_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/depthwise_conv2d_vec4_webgpu.js var DepthwiseConv2DVec4Program = class { constructor(convInfo, addBias = false, activation2 = null, hasPreluActivation = false) { this.variableNames = ["x", "W"]; this.uniforms = "pad : vec2, inDims : vec2,"; this.workGroupSize = [4, 4, 4]; + this.workPerThread = 4; this.isVec4 = true; this.outputShape = convInfo.outShape; this.dispatchLayout = { x: [3], y: [2], z: [0, 1] }; - this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize, [4, 4, 1]); + this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize, [4, this.workPerThread, 1]); util_exports.assert(convInfo.dataFormat === "channelsLast", () => "TODO: NCHW is unimplemented"); if (addBias) { this.variableNames.push("bias"); @@ -72780,54 +72596,55 @@ var DepthwiseConv2DVec4Program = class { this.addBias = addBias; this.activation = activation2; this.hasPreluActivation = hasPreluActivation; - this.shaderKey = `depthwiseVec4_${activation2}_${this.convInfo.filterHeight}_${this.convInfo.filterWidth}`; + this.shaderKey = `depthwiseVec4_${activation2}_${this.convInfo.filterHeight}_${this.convInfo.filterWidth}_${this.convInfo.strideHeight}_${this.convInfo.strideWidth}_${this.workPerThread}`; } getUserCode() { - const xNumber = 4 + this.convInfo.filterWidth - 1; + const xNumber = (this.workPerThread - 1) * this.convInfo.strideWidth + this.convInfo.filterWidth; const userCode = ` ${activationFnSnippet(this.activation, this.hasPreluActivation, true, 4)} fn readX(batch : i32, row : i32, col : i32, channel : i32) -> vec4 { var value = vec4(0.0); - if (row >=0 && row < uniforms.inDims[0] && col >=0 && col < uniforms.inDims[1]) - { + if (col >=0 && col < uniforms.inDims[1]) { value = getX(batch, row, col, channel); } return value; } + + const strideHeight = ${this.convInfo.strideHeight}; + const strideWidth = ${this.convInfo.strideWidth}; ${getWorkGroupSizeString()} fn _start(@builtin(global_invocation_id) globalId: vec3) { let batch = i32(globalId.z) / uniforms.outShape[1]; let r = i32(globalId.z) % uniforms.outShape[1]; - let c = i32(globalId.y) * 4; + let c = i32(globalId.y) * ${this.workPerThread}; let d1 = i32(globalId.x) * 4; - let xRCCorner = vec2(r, c) - uniforms.pad; + let xRCCorner = vec2(r, c) * vec2(strideHeight, strideWidth) - uniforms.pad; let xRCorner = xRCCorner.x; let xCCorner = xRCCorner.y; var xVals : array, ${xNumber}>; - var dotProd : array, 4>; - dotProd[0] = vec4(0.0); - dotProd[1] = vec4(0.0); - dotProd[2] = vec4(0.0); - dotProd[3] = vec4(0.0); + var dotProd : array, ${this.workPerThread}>; + for (var i = 0; i < ${this.workPerThread}; i++) { + dotProd[i] = vec4(0.0); + } // Use constant instead of uniform can give better performance. for (var wR = 0; wR < ${this.convInfo.filterHeight}; wR = wR + 1) { let xR = xRCorner + wR; - for (var i = 0; i < ${xNumber}; i++) - { - xVals[i] = readX(batch, xR, xCCorner + i, d1); - } - for (var wC = 0; wC < ${this.convInfo.filterWidth}; wC = wC + 1) { - let wValue = getW(wR, wC, d1, 0); - dotProd[0] = dotProd[0] + xVals[0 + wC] * wValue; - dotProd[1] = dotProd[1] + xVals[1 + wC] * wValue; - dotProd[2] = dotProd[2] + xVals[2 + wC] * wValue; - dotProd[3] = dotProd[3] + xVals[3 + wC] * wValue; + if (xR >=0 && xR < uniforms.inDims[0]) { + for (var i = 0; i < ${xNumber}; i++) { + xVals[i] = readX(batch, xR, xCCorner + i, d1); + } + for (var wC = 0; wC < ${this.convInfo.filterWidth}; wC = wC + 1) { + let wValue = getW(wR, wC, d1, 0); + for (var i = 0; i < ${this.workPerThread}; i++) { + dotProd[i] = fma(xVals[i * strideWidth + wC], wValue, dotProd[i]); + } + } } } - for (var i = 0; i < 4; i = i + 1) { + for (var i = 0; i < ${this.workPerThread}; i = i + 1) { let coords = vec4(batch, r, c + i, d1); if (coordsInBounds4D(coords, uniforms.outShape)) { var value = dotProd[i]; @@ -72841,7 +72658,7 @@ var DepthwiseConv2DVec4Program = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/depthwise_conv2d_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/depthwise_conv2d_webgpu.js var DepthwiseConv2DProgram2 = class { constructor(convInfo, addBias = false, activation2 = null, hasPreluActivation = false) { this.variableNames = ["x", "W"]; @@ -72937,7 +72754,7 @@ var DepthwiseConv2DProgram2 = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/DepthwiseConv2dNative.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/DepthwiseConv2dNative.js function depthwiseConv2dNative3(args) { const { inputs, backend: backend2, attrs } = args; const { x, filter } = inputs; @@ -72956,7 +72773,7 @@ function depthwiseConv2dNative3(args) { let program; if (!isChannelsLast && convInfo.inHeight > 16 && convInfo.inWidth > 16 && convInfo.strideHeight === 1 && convInfo.strideWidth === 1 && convInfo.dilationWidth === 1 && convInfo.dilationHeight === 1 && convInfo.inChannels === convInfo.outChannels) { program = new DepthwiseConv2DNCHWSharedProgram(convInfo.outShape, convInfo.filterHeight, convInfo.filterWidth); - } else if (isChannelsLast && convInfo.inHeight > 4 && convInfo.inWidth > 4 && convInfo.strideHeight === 1 && convInfo.strideWidth === 1 && convInfo.inChannels === convInfo.outChannels && convInfo.dilationHeight === 1 && convInfo.dilationWidth === 1 && convInfo.inChannels % 4 === 0) { + } else if (isChannelsLast && convInfo.inHeight > 4 && convInfo.inWidth > 4 && convInfo.strideWidth <= 2 && convInfo.inChannels === convInfo.outChannels && convInfo.dilationHeight === 1 && convInfo.dilationWidth === 1 && convInfo.inChannels % 4 === 0) { program = new DepthwiseConv2DVec4Program(convInfo); } else { program = new DepthwiseConv2DProgram2(convInfo); @@ -72973,7 +72790,7 @@ var depthwiseConv2dNativeConfig4 = { kernelFunc: depthwiseConv2dNative3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Multiply.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Multiply.js var multiplyKernelFunc = binaryKernelFunc3({ opType: BinaryOpType.MUL, cpuKernelImpl: multiplyImplCPU2, @@ -72985,7 +72802,7 @@ var multiplyConfig4 = { kernelFunc: multiplyKernelFunc }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Sum.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Sum.js function sum6(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -72998,7 +72815,7 @@ var sumConfig4 = { kernelFunc: sum6 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Einsum.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Einsum.js function einsum4(args) { const { inputs, backend: backend2, attrs } = args; const { equation } = attrs; @@ -73010,8 +72827,8 @@ function einsum4(args) { let out = null; let numDimsRemaining = allDims.length; const tensorsToDispose = []; - for (let i = 0; i < nSteps; ++i) { - for (const idTerm of steps[i]) { + for (let i2 = 0; i2 < nSteps; ++i2) { + for (const idTerm of steps[i2]) { const { permutationIndices: perm, expandDims: dimsToExpand } = backend_util_exports.getEinsumPermutation(numDimsRemaining, idDims[idTerm]); let x; if (backend_util_exports.isIdentityPermutation(perm)) { @@ -73035,13 +72852,13 @@ function einsum4(args) { tensorsToDispose.push(out); } } - if (i < nSteps - 1) { - if (path[i] >= 0) { + if (i2 < nSteps - 1) { + if (path[i2] >= 0) { out = sum6({ inputs: { x: out }, backend: backend2, attrs: { - axis: path[i] - (allDims.length - numDimsRemaining), + axis: path[i2] - (allDims.length - numDimsRemaining), keepDims: false } }); @@ -73064,7 +72881,7 @@ var einsumConfig3 = { kernelFunc: einsum4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Elu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Elu.js var elu6 = unaryKernelFunc3({ opType: UnaryOpType.ELU }); var eluConfig4 = { kernelName: Elu, @@ -73072,7 +72889,7 @@ var eluConfig4 = { kernelFunc: elu6 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Equal.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Equal.js var equal4 = binaryKernelFunc3({ opType: BinaryOpType.EQUAL, dtype: "bool", cpuKernelImpl: equalImplCPU2 }); var equalConfig4 = { kernelName: Equal, @@ -73080,7 +72897,7 @@ var equalConfig4 = { kernelFunc: equal4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Exp.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Exp.js var exp4 = unaryKernelFunc3({ opType: UnaryOpType.EXP, cpuKernelImpl: expImplCPU2, @@ -73092,7 +72909,7 @@ var expConfig4 = { kernelFunc: exp4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/ExpandDims.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/ExpandDims.js function expandDims6(args) { const { inputs, attrs, backend: backend2 } = args; const { dim } = attrs; @@ -73113,7 +72930,7 @@ var expandDimsConfig4 = { kernelFunc: expandDims6 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Expm1.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Expm1.js var expm14 = unaryKernelFunc3({ opType: UnaryOpType.EXPM1, cpuKernelImpl: expm1ImplCPU2 }); var expm1Config3 = { kernelName: Expm1, @@ -73121,7 +72938,7 @@ var expm1Config3 = { kernelFunc: expm14 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/flip_left_right_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/flip_left_right_webgpu.js var FlipLeftRightProgram2 = class { constructor(imageShape) { this.outputShape = []; @@ -73148,7 +72965,7 @@ var FlipLeftRightProgram2 = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/FlipLeftRight.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/FlipLeftRight.js var flipLeftRightConfig4 = { kernelName: FlipLeftRight, backendName: "webgpu", @@ -73161,7 +72978,7 @@ var flipLeftRightConfig4 = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Floor.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Floor.js var floor4 = unaryKernelFunc3({ opType: UnaryOpType.FLOOR, cpuKernelImpl: floorImplCPU2 }); var floorConfig4 = { kernelName: Floor, @@ -73169,7 +72986,7 @@ var floorConfig4 = { kernelFunc: floor4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/FloorDiv.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/FloorDiv.js var floorDiv4 = binaryKernelFunc3({ opType: BinaryOpType.INT_DIV, dtype: "int32" }); var floorDivConfig4 = { kernelName: FloorDiv, @@ -73177,7 +72994,7 @@ var floorDivConfig4 = { kernelFunc: floorDiv4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/from_pixels_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/from_pixels_webgpu.js var FromPixelsProgram2 = class { constructor(outputShape, numChannels, importVideo = false) { this.isFromPixels = true; @@ -73209,7 +73026,7 @@ var FromPixelsProgram2 = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/FromPixels.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/FromPixels.js var fromPixelsConfig2 = { kernelName: FromPixels, backendName: "webgpu", @@ -73234,7 +73051,7 @@ function fromPixels3(args) { pixels.videoHeight ] : [pixels.width, pixels.height]; const outputShape = [height, width, numChannels]; - const importVideo = env().getBool("WEBGPU_IMPORT_EXTERNAL_TEXTURE") && isVideo; + const importVideo = false; const isVideoOrImage = isVideo || isImage; if (isImageBitmap || isCanvas || isVideoOrImage) { let textureInfo; @@ -73290,9 +73107,9 @@ function fromPixels3(args) { pixelArray = new Uint8Array(pixels.width * pixels.height * numChannels); const dataLength = imageData.length; let j = 0; - for (let i = 0; i < dataLength; i++) { - if (i % 4 < numChannels) { - pixelArray[j++] = imageData[i]; + for (let i2 = 0; i2 < dataLength; i2++) { + if (i2 % 4 < numChannels) { + pixelArray[j++] = imageData[i2]; } } } @@ -73301,7 +73118,7 @@ function fromPixels3(args) { return output; } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/batchnorm_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/batchnorm_webgpu.js var BatchNormProgram2 = class { constructor(xShape, meanShape, varianceShape, offsetShape, scaleShape) { this.uniforms = "varianceEpsilon : f32,"; @@ -73352,7 +73169,7 @@ var BatchNormProgram2 = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/FusedBatchNorm.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/FusedBatchNorm.js var fusedBatchNormConfig2 = { kernelName: FusedBatchNorm, backendName: "webgpu", @@ -73377,7 +73194,7 @@ var fusedBatchNormConfig2 = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/FusedConv2D.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/FusedConv2D.js function fusedConv2d3(args) { const { inputs, backend: backend2, attrs } = args; const { x, filter, bias, preluActivationWeights } = inputs; @@ -73401,7 +73218,7 @@ var fusedConv2DConfig4 = { kernelFunc: fusedConv2d3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/FusedDepthwiseConv2D.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/FusedDepthwiseConv2D.js function fusedDepthwiseConv2D3(args) { const { inputs, backend: backend2, attrs } = args; const { x, filter, bias, preluActivationWeights } = inputs; @@ -73426,7 +73243,7 @@ function fusedDepthwiseConv2D3(args) { { type: "int32", data: [convInfo.inHeight, convInfo.inWidth] } ]; let program; - if (convInfo.inHeight > 4 && convInfo.inWidth > 4 && convInfo.strideHeight === 1 && convInfo.strideWidth === 1 && convInfo.inChannels === convInfo.outChannels && convInfo.dilationHeight === 1 && convInfo.dilationWidth === 1 && convInfo.inChannels % 4 === 0) { + if (convInfo.inHeight > 4 && convInfo.inWidth > 4 && convInfo.strideWidth <= 2 && convInfo.inChannels === convInfo.outChannels && convInfo.dilationHeight === 1 && convInfo.dilationWidth === 1 && convInfo.inChannels % 4 === 0) { program = new DepthwiseConv2DVec4Program(convInfo, hasBias, activation2, hasPreluActivationWeights); } else { program = new DepthwiseConv2DProgram2(convInfo, hasBias, activation2, hasPreluActivationWeights); @@ -73448,7 +73265,7 @@ var fusedDepthwiseConv2DConfig4 = { kernelFunc: fusedDepthwiseConv2D3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/gather_nd_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/gather_nd_webgpu.js var GatherNDProgram2 = class { constructor(sliceDim, shape) { this.variableNames = ["A", "indices"]; @@ -73487,7 +73304,7 @@ var GatherNDProgram2 = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/GatherNd.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/GatherNd.js function gatherNd4(args) { const { inputs, backend: backend2 } = args; const { params, indices } = inputs; @@ -73522,7 +73339,7 @@ var gatherNdConfig4 = { kernelFunc: gatherNd4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/gather_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/gather_webgpu.js var GatherProgram2 = class { constructor(aShape, outputShape) { this.variableNames = ["A", "indices"]; @@ -73553,17 +73370,17 @@ var GatherProgram2 = class { function getSourceCoords4(aShape) { const currentCoords = ["resRC.x", "resRC.y", "resRC.z", "resRC.w"]; const sourceCoords = []; - for (let i = 0; i < aShape.length; i++) { - if (i === 2) { + for (let i2 = 0; i2 < aShape.length; i2++) { + if (i2 === 2) { sourceCoords.push("indexZ"); } else { - sourceCoords.push(`${currentCoords[i]}`); + sourceCoords.push(`${currentCoords[i2]}`); } } return sourceCoords.join(); } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/GatherV2.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/GatherV2.js function gatherV24(args) { const { inputs, backend: backend2, attrs } = args; const { x, indices } = inputs; @@ -73605,14 +73422,14 @@ function gatherV24(args) { const xValues = xBufferInfo.values; const xBuf = buffer(flattenX.shape, flattenX.dtype, xValues); const outBuf = gatherV2ImplCPU2(xBuf, indicesBuf, flattenOutputShape); - toDispose.forEach((t) => backend2.disposeData(t.dataId)); + toDispose.forEach((t2) => backend2.disposeData(t2.dataId)); return backend2.makeTensorInfo(shapeInfo.outputShape, outBuf.dtype, outBuf.values); } const program = new GatherProgram2(flattenX.shape, flattenOutputShape); const res = backend2.runWebGPUProgram(program, [flattenX, flattenIndex], flattenX.dtype); toDispose.push(res); const reshaped = reshape6({ inputs: { x: res }, backend: backend2, attrs: { shape: shapeInfo.outputShape } }); - toDispose.forEach((t) => backend2.disposeData(t.dataId)); + toDispose.forEach((t2) => backend2.disposeData(t2.dataId)); return reshaped; } var gatherV2Config4 = { @@ -73621,7 +73438,7 @@ var gatherV2Config4 = { kernelFunc: gatherV24 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Greater.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Greater.js var greater5 = binaryKernelFunc3({ opType: BinaryOpType.GREATER, cpuKernelImpl: greaterImplCPU2, @@ -73633,7 +73450,7 @@ var greaterConfig4 = { kernelFunc: greater5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/GreaterEqual.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/GreaterEqual.js var greaterEqual4 = binaryKernelFunc3({ opType: BinaryOpType.GREATER_EQUAL, dtype: "bool", @@ -73645,7 +73462,7 @@ var greaterEqualConfig4 = { kernelFunc: greaterEqual4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/IsNaN.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/IsNaN.js var isNaN5 = unaryKernelFunc3({ opType: UnaryOpType.IS_NAN, dtype: "bool" }); var isNaNConfig3 = { kernelName: IsNan, @@ -73653,7 +73470,7 @@ var isNaNConfig3 = { kernelFunc: isNaN5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/LeakyRelu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/LeakyRelu.js function leakyRelu5(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -73669,7 +73486,7 @@ var leakyReluConfig4 = { kernelFunc: leakyRelu5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Less.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Less.js var less5 = binaryKernelFunc3({ opType: BinaryOpType.LESS, dtype: "bool", cpuKernelImpl: lessImplCPU2 }); var lessConfig4 = { kernelName: Less, @@ -73677,7 +73494,7 @@ var lessConfig4 = { kernelFunc: less5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/LessEqual.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/LessEqual.js var lessEqual4 = binaryKernelFunc3({ opType: BinaryOpType.LESS_EQUAL, dtype: "bool", @@ -73689,7 +73506,7 @@ var lessEqualConfig4 = { kernelFunc: lessEqual4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Log.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Log.js var log5 = unaryKernelFunc3({ opType: UnaryOpType.LOG, cpuKernelImpl: logImplCPU2 }); var logConfig4 = { kernelName: Log, @@ -73697,7 +73514,7 @@ var logConfig4 = { kernelFunc: log5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/LogicalAnd.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/LogicalAnd.js var logicalAnd4 = binaryKernelFunc3({ opType: BinaryOpType.LOGICAL_AND, dtype: "bool" }); var logicalAndConfig4 = { kernelName: LogicalAnd, @@ -73705,7 +73522,7 @@ var logicalAndConfig4 = { kernelFunc: logicalAnd4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/LogicalNot.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/LogicalNot.js var logicalNot4 = unaryKernelFunc3({ opType: UnaryOpType.LOGICAL_NOT }); var logicalNotConfig4 = { kernelName: LogicalNot, @@ -73713,7 +73530,7 @@ var logicalNotConfig4 = { kernelFunc: logicalNot4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Maximum.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Maximum.js var maximum5 = binaryKernelFunc3({ opType: BinaryOpType.MAX, cpuKernelImpl: maximumImplCPU2 @@ -73724,7 +73541,7 @@ var maximumConfig4 = { kernelFunc: maximum5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/MaxPool.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/MaxPool.js function maxPool5(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -73739,7 +73556,7 @@ var maxPoolConfig4 = { kernelFunc: maxPool5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Min.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Min.js function min6(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -73752,7 +73569,7 @@ var minConfig4 = { kernelFunc: min6 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Minimum.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Minimum.js var minimum5 = binaryKernelFunc3({ opType: BinaryOpType.MIN, cpuKernelImpl: minimumImplCPU2 @@ -73763,27 +73580,27 @@ var minimumConfig4 = { kernelFunc: minimum5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/mirror_pad_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/mirror_pad_webgpu.js var MirrorPadProgram2 = class { constructor(xShape, paddings, mode) { this.uniforms = ""; this.variableNames = ["x"]; this.workGroupSize = [64, 1, 1]; this.size = true; - this.outputShape = paddings.map((p2, i) => p2[0] + xShape[i] + p2[1]); + this.outputShape = paddings.map((p2, i2) => p2[0] + xShape[i2] + p2[1]); this.dispatchLayout = flatDispatchLayout(this.outputShape); this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize); this.xShape = xShape; - paddings.map((_, i) => { - this.uniforms += ` pad${i} : vec2,`; + paddings.map((_, i2) => { + this.uniforms += ` pad${i2} : vec2,`; }); this.offset = mode === "reflect" ? 0 : 1; this.shaderKey = `mirrorPad_${mode}`; } getUserCode() { const rank = this.xShape.length; - const start = this.xShape.map((_, i) => `uniforms.pad${i}[0]`).join(","); - const end = this.xShape.map((_, i) => `uniforms.pad${i}[0] + uniforms.xShape${rank > 1 ? `[${i}]` : ""}`).join(","); + const start = this.xShape.map((_, i2) => `uniforms.pad${i2}[0]`).join(","); + const end = this.xShape.map((_, i2) => `uniforms.pad${i2}[0] + uniforms.xShape${rank > 1 ? `[${i2}]` : ""}`).join(","); const shaderStart = rank === 1 ? "start" : "start[i]"; const shaderEnd = rank === 1 ? "end" : "end[i]"; const shaderOutC = rank === 1 ? "outC" : "outC[i]"; @@ -73810,7 +73627,7 @@ var MirrorPadProgram2 = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/MirrorPad.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/MirrorPad.js var mirrorPadConfig4 = { kernelName: MirrorPad, backendName: "webgpu", @@ -73827,7 +73644,7 @@ var mirrorPadConfig4 = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Neg.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Neg.js function neg4(args) { const { inputs, backend: backend2 } = args; const { x } = inputs; @@ -73845,7 +73662,7 @@ var negConfig4 = { kernelFunc: neg4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/NonMaxSuppressionV3.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/NonMaxSuppressionV3.js function nonMaxSuppressionV33(args) { console.warn("tf.nonMaxSuppression() in webgpu locks the UI thread. Call tf.nonMaxSuppressionAsync() instead"); const { inputs, backend: backend2, attrs } = args; @@ -73862,7 +73679,7 @@ var nonMaxSuppressionV3Config4 = { kernelFunc: nonMaxSuppressionV33 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/NonMaxSuppressionV5.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/NonMaxSuppressionV5.js function nonMaxSuppressionV53(args) { console.warn("tf.nonMaxSuppression() in webgpu locks the UI thread. Call tf.nonMaxSuppressionAsync() instead"); const { inputs, backend: backend2, attrs } = args; @@ -73886,20 +73703,20 @@ var nonMaxSuppressionV5Config4 = { kernelFunc: nonMaxSuppressionV53 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/ZerosLike.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/ZerosLike.js function zerosLike5(args) { const { inputs, backend: backend2 } = args; const { x } = inputs; if (x.dtype === "complex64") { const realPart = real4({ inputs: { input: x }, backend: backend2 }); - const r = zerosLike5({ inputs: { x: realPart }, backend: backend2 }); + const r2 = zerosLike5({ inputs: { x: realPart }, backend: backend2 }); const imagPart = imag4({ inputs: { input: x }, backend: backend2 }); - const i = zerosLike5({ inputs: { x: imagPart }, backend: backend2 }); - const result = complex4({ inputs: { real: r, imag: i }, backend: backend2 }); + const i2 = zerosLike5({ inputs: { x: imagPart }, backend: backend2 }); + const result = complex4({ inputs: { real: r2, imag: i2 }, backend: backend2 }); backend2.disposeData(realPart.dataId); - backend2.disposeData(r.dataId); + backend2.disposeData(r2.dataId); backend2.disposeData(imagPart.dataId); - backend2.disposeData(i.dataId); + backend2.disposeData(i2.dataId); return result; } else { return fill5({ @@ -73918,7 +73735,7 @@ var zerosLikeConfig4 = { kernelFunc: zerosLike5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/OnesLike.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/OnesLike.js function onesLike5(args) { const { inputs, backend: backend2 } = args; const { x } = inputs; @@ -73926,14 +73743,14 @@ function onesLike5(args) { throw new Error("onesLike is not supported under string dtype"); } else if (x.dtype === "complex64") { const realPart = real4({ inputs: { input: x }, backend: backend2 }); - const r = onesLike5({ inputs: { x: realPart }, backend: backend2 }); + const r2 = onesLike5({ inputs: { x: realPart }, backend: backend2 }); const imagPart = imag4({ inputs: { input: x }, backend: backend2 }); - const i = zerosLike5({ inputs: { x: imagPart }, backend: backend2 }); - const result = complex4({ inputs: { real: r, imag: i }, backend: backend2 }); + const i2 = zerosLike5({ inputs: { x: imagPart }, backend: backend2 }); + const result = complex4({ inputs: { real: r2, imag: i2 }, backend: backend2 }); backend2.disposeData(realPart.dataId); - backend2.disposeData(r.dataId); + backend2.disposeData(r2.dataId); backend2.disposeData(imagPart.dataId); - backend2.disposeData(i.dataId); + backend2.disposeData(i2.dataId); return result; } else { return fill5({ attrs: { shape: x.shape, dtype: x.dtype, value: 1 }, backend: backend2 }); @@ -73945,7 +73762,7 @@ var onesLikeConfig4 = { kernelFunc: onesLike5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Pack.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Pack.js function pack4(args) { const { inputs, backend: backend2, attrs } = args; const { axis } = attrs; @@ -73954,18 +73771,18 @@ function pack4(args) { } const shape = inputs[0].shape; const dtype = inputs[0].dtype; - inputs.forEach((t) => { - util_exports.assertShapesMatch(shape, t.shape, "All tensors passed to stack must have matching shapes"); - util_exports.assert(dtype === t.dtype, () => "All tensors passed to stack must have matching dtypes"); + inputs.forEach((t2) => { + util_exports.assertShapesMatch(shape, t2.shape, "All tensors passed to stack must have matching shapes"); + util_exports.assert(dtype === t2.dtype, () => "All tensors passed to stack must have matching dtypes"); }); const intermediateTensorInfos = []; - const expandedTensors = inputs.map((t) => { - const expandedT = expandDims6({ inputs: { input: t }, backend: backend2, attrs: { dim: axis } }); + const expandedTensors = inputs.map((t2) => { + const expandedT = expandDims6({ inputs: { input: t2 }, backend: backend2, attrs: { dim: axis } }); intermediateTensorInfos.push(expandedT); return expandedT; }); const result = concat5({ inputs: expandedTensors, backend: backend2, attrs: { axis } }); - intermediateTensorInfos.forEach((t) => backend2.disposeData(t.dataId)); + intermediateTensorInfos.forEach((t2) => backend2.disposeData(t2.dataId)); return result; } var packConfig4 = { @@ -73974,18 +73791,18 @@ var packConfig4 = { kernelFunc: pack4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/pad_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/pad_webgpu.js var PadProgram2 = class { constructor(xShape, paddings) { this.variableNames = ["x"]; this.uniforms = "constantValue : f32,"; this.workGroupSize = [64, 1, 1]; this.size = true; - this.outputShape = paddings.map((p2, i) => p2[0] + xShape[i] + p2[1]); + this.outputShape = paddings.map((p2, i2) => p2[0] + xShape[i2] + p2[1]); this.dispatchLayout = flatDispatchLayout(this.outputShape); this.dispatch = computeDispatch(this.dispatchLayout, this.outputShape, this.workGroupSize); - paddings.map((_, i) => { - this.uniforms += ` pad${i} : vec2,`; + paddings.map((_, i2) => { + this.uniforms += ` pad${i2} : vec2,`; }); this.xShape = xShape; this.shaderKey = "pad"; @@ -73993,8 +73810,8 @@ var PadProgram2 = class { getUserCode() { const rank = this.xShape.length; const type = getCoordsDataType2(rank); - const start = this.xShape.map((_, i) => `uniforms.pad${i}[0]`).join(","); - const end = this.xShape.map((_, i) => `uniforms.pad${i}[0] + uniforms.xShape${rank > 1 ? `[${i}]` : ""}`).join(","); + const start = this.xShape.map((_, i2) => `uniforms.pad${i2}[0]`).join(","); + const end = this.xShape.map((_, i2) => `uniforms.pad${i2}[0] + uniforms.xShape${rank > 1 ? `[${i2}]` : ""}`).join(","); const startValue = rank > 1 ? `${type}(${start})` : `${start}`; const endValue = rank > 1 ? `${type}(${end})` : `${end}`; const leftPadCondition = rank > 1 ? `any(outC < start)` : `outC < start`; @@ -74020,7 +73837,7 @@ var PadProgram2 = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/PadV2.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/PadV2.js var padV23 = (args) => { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -74029,7 +73846,7 @@ var padV23 = (args) => { return identity5({ inputs: { x }, backend: backend2 }); } if (util_exports.sizeFromShape(x.shape) === 0) { - const outputShape = paddings.map((p2, i) => p2[0] + x.shape[i] + p2[1]); + const outputShape = paddings.map((p2, i2) => p2[0] + x.shape[i2] + p2[1]); return fill5({ backend: backend2, attrs: { shape: outputShape, value: constantValue, dtype: x.dtype } @@ -74046,7 +73863,7 @@ var padV2Config4 = { kernelFunc: padV23 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Pow.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Pow.js var pow4 = binaryKernelFunc3({ opType: BinaryOpType.POW }); @@ -74056,7 +73873,7 @@ var powConfig4 = { kernelFunc: pow4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Prelu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Prelu.js function prelu6(args) { const { inputs, backend: backend2 } = args; const { x, alpha } = inputs; @@ -74069,7 +73886,7 @@ var preluConfig4 = { kernelFunc: prelu6 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Prod.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Prod.js function prod5(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -74082,7 +73899,7 @@ var prodConfig4 = { kernelFunc: prod5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Range.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Range.js var range6 = (args) => { const { backend: backend2, attrs } = args; const { start, stop, step: step5, dtype } = attrs; @@ -74095,7 +73912,7 @@ var rangeConfig4 = { kernelFunc: range6 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/RealDiv.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/RealDiv.js var realDiv2 = binaryKernelFunc3({ opType: BinaryOpType.DIV }); var realDivConfig4 = { kernelName: RealDiv, @@ -74103,7 +73920,7 @@ var realDivConfig4 = { kernelFunc: realDiv2 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Reciprocal.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Reciprocal.js var reciprocal4 = unaryKernelFunc3({ opType: UnaryOpType.RECIPROCAL }); var reciprocalConfig3 = { kernelName: Reciprocal, @@ -74111,7 +73928,7 @@ var reciprocalConfig3 = { kernelFunc: reciprocal4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Relu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Relu.js var relu4 = unaryKernelFunc3({ opType: UnaryOpType.RELU }); var reluConfig4 = { kernelName: Relu, @@ -74119,7 +73936,7 @@ var reluConfig4 = { kernelFunc: relu4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Relu6.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Relu6.js var relu64 = unaryKernelFunc3({ opType: UnaryOpType.RELU6 }); var relu6Config4 = { kernelName: Relu6, @@ -74127,7 +73944,7 @@ var relu6Config4 = { kernelFunc: relu64 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/resize_bilinear_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/resize_bilinear_webgpu.js var ResizeBilinearProgram2 = class { constructor(inputShape, newHeight, newWidth) { this.variableNames = ["x"]; @@ -74188,7 +74005,7 @@ var ResizeBilinearProgram2 = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/ResizeBilinear.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/ResizeBilinear.js function resizeBilinear5(args) { const { inputs, backend: backend2, attrs } = args; const { images } = inputs; @@ -74210,7 +74027,7 @@ var resizeBilinearConfig4 = { kernelFunc: resizeBilinear5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/resize_nearest_neighbor_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/resize_nearest_neighbor_webgpu.js var ResizeNearestNeighborProgram2 = class { constructor(inputShape, newHeight, newWidth, halfPixelCenters) { this.variableNames = ["x"]; @@ -74266,7 +74083,7 @@ var ResizeNearestNeighborProgram2 = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/ResizeNearestNeighbor.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/ResizeNearestNeighbor.js function resizeNearestNeighbor5(args) { const { inputs, backend: backend2, attrs } = args; const { images } = inputs; @@ -74288,7 +74105,7 @@ var resizeNearestNeighborConfig4 = { kernelFunc: resizeNearestNeighbor5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/rotate_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/rotate_webgpu.js var RotateProgram2 = class { constructor(imageShape, fillValue) { this.outputShape = []; @@ -74338,7 +74155,7 @@ var RotateProgram2 = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/RotateWithOffset.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/RotateWithOffset.js var rotateWithOffsetConfig4 = { kernelName: RotateWithOffset, backendName: "webgpu", @@ -74364,7 +74181,7 @@ var rotateWithOffsetConfig4 = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Rsqrt.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Rsqrt.js var rsqrt4 = unaryKernelFunc3({ opType: UnaryOpType.RSQRT, cpuKernelImpl: rsqrtImplCPU2 }); var rsqrtConfig4 = { kernelName: Rsqrt, @@ -74372,7 +74189,7 @@ var rsqrtConfig4 = { kernelFunc: rsqrt4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/scatter_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/scatter_webgpu.js var ScatterProgram2 = class { constructor(flattenXShape, sliceDim, indicesRank, updatesRank, strides, shape, outputDtype, sumDupeIndices = true) { this.variableNames = ["updates", "indices"]; @@ -74470,7 +74287,7 @@ var ScatterProgram2 = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/ScatterNd.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/ScatterNd.js function scatterNd4(args) { const { inputs, backend: backend2, attrs } = args; const { indices, updates } = inputs; @@ -74504,7 +74321,7 @@ var scatterNdConfig4 = { kernelFunc: scatterNd4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/select_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/select_webgpu.js var SelectProgram2 = class { constructor(cRank, shape, rank) { this.variableNames = ["c", "a", "b"]; @@ -74530,10 +74347,10 @@ var SelectProgram2 = class { const currentCoords = ["resRC.x", "resRC.y", "resRC.z", "resRC.w"]; const cCoordVars = []; const abCoordVars = []; - for (let i = 0; i < this.outputShape.length; i++) { - abCoordVars.push(`${currentCoords[i]}`); - if (i < this.cRank) { - cCoordVars.push(`${currentCoords[i]}`); + for (let i2 = 0; i2 < this.outputShape.length; i2++) { + abCoordVars.push(`${currentCoords[i2]}`); + if (i2 < this.cRank) { + cCoordVars.push(`${currentCoords[i2]}`); } } cCoords = cCoordVars.join(); @@ -74556,12 +74373,12 @@ var SelectProgram2 = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Select.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Select.js function select5(args) { const { inputs, backend: backend2 } = args; - const { condition, t, e } = inputs; - const program = new SelectProgram2(condition.shape.length, t.shape, t.shape.length); - return backend2.runWebGPUProgram(program, [condition, t, e], upcastType(t.dtype, e.dtype)); + const { condition, t: t2, e: e2 } = inputs; + const program = new SelectProgram2(condition.shape.length, t2.shape, t2.shape.length); + return backend2.runWebGPUProgram(program, [condition, t2, e2], upcastType(t2.dtype, e2.dtype)); } var selectConfig4 = { kernelName: Select, @@ -74569,7 +74386,7 @@ var selectConfig4 = { kernelFunc: select5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Sigmoid.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Sigmoid.js var sigmoid5 = unaryKernelFunc3({ opType: UnaryOpType.SIGMOID }); var sigmoidConfig4 = { kernelName: Sigmoid, @@ -74577,7 +74394,7 @@ var sigmoidConfig4 = { kernelFunc: sigmoid5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Sin.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Sin.js var sin4 = unaryKernelFunc3({ opType: UnaryOpType.SIN }); var sinConfig4 = { kernelName: Sin, @@ -74585,7 +74402,7 @@ var sinConfig4 = { kernelFunc: sin4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Sinh.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Sinh.js var sinh4 = unaryKernelFunc3({ opType: UnaryOpType.SINH }); var sinhConfig3 = { kernelName: Sinh, @@ -74593,7 +74410,7 @@ var sinhConfig3 = { kernelFunc: sinh4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Sub.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Sub.js var sub4 = binaryKernelFunc3({ opType: BinaryOpType.SUB, cpuKernelImpl: subImplCPU2, supportsComplex: true }); var subConfig4 = { kernelName: Sub, @@ -74601,7 +74418,7 @@ var subConfig4 = { kernelFunc: sub4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Softmax.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Softmax.js function softmax6(args) { const { inputs, backend: backend2, attrs } = args; const { logits } = inputs; @@ -74633,7 +74450,7 @@ var softmaxConfig4 = { kernelFunc: softmax6 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/SpaceToBatchND.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/SpaceToBatchND.js var spaceToBatchND5 = (args) => { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -74642,7 +74459,7 @@ var spaceToBatchND5 = (args) => { const prod6 = blockShape.reduce((a, b) => a * b); const completePaddings = [[0, 0]]; completePaddings.push(...paddings); - for (let i = 1 + blockShape.length; i < x.shape.length; ++i) { + for (let i2 = 1 + blockShape.length; i2 < x.shape.length; ++i2) { completePaddings.push([0, 0]); } const toDispose = []; @@ -74664,7 +74481,7 @@ var spaceToBatchND5 = (args) => { toDispose.push(paddedX); toDispose.push(reshapedPaddedX); toDispose.push(paddedXT); - toDispose.forEach((t) => backend2.disposeData(t.dataId)); + toDispose.forEach((t2) => backend2.disposeData(t2.dataId)); return result; }; var spaceToBatchNDConfig4 = { @@ -74673,15 +74490,15 @@ var spaceToBatchNDConfig4 = { kernelFunc: spaceToBatchND5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/tile_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/tile_webgpu.js var TileProgram2 = class { constructor(aShape, reps) { this.variableNames = ["A"]; this.workGroupSize = [64, 1, 1]; this.size = true; const outputShape = new Array(aShape.length); - for (let i = 0; i < outputShape.length; i++) { - outputShape[i] = aShape[i] * reps[i]; + for (let i2 = 0; i2 < outputShape.length; i2++) { + outputShape[i2] = aShape[i2] * reps[i2]; } this.outputShape = outputShape; this.dispatchLayout = flatDispatchLayout(this.outputShape); @@ -74711,13 +74528,13 @@ function getSourceCoords5(rank, uniformPrefix = "") { } const currentCoords = ["resRC.x", "resRC.y", "resRC.z", "resRC.w"]; const sourceCoords = []; - for (let i = 0; i < rank; i++) { - sourceCoords.push(`(${currentCoords[i]} % ${uniformPrefix}aShape[${i}])`); + for (let i2 = 0; i2 < rank; i2++) { + sourceCoords.push(`(${currentCoords[i2]} % ${uniformPrefix}aShape[${i2}])`); } return sourceCoords.join(); } -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Tile.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Tile.js function tile6(params) { const { inputs, backend: backend2, attrs } = params; const { x } = inputs; @@ -74739,7 +74556,7 @@ var tileConfig4 = { kernelFunc: tile6 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/SparseToDense.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/SparseToDense.js function sparseToDense4(args) { const { inputs, backend: backend2, attrs } = args; const { sparseIndices, sparseValues, defaultValue } = inputs; @@ -74811,7 +74628,7 @@ var sparseToDenseConfig3 = { kernelFunc: sparseToDense4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/SplitV.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/SplitV.js function splitV4(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -74821,11 +74638,11 @@ function splitV4(args) { const xRank = x.shape.length; const begin = new Array(xRank).fill(0); const size = x.shape.slice(); - return splitSizes.map((s) => { + return splitSizes.map((s2) => { const sliceSize = [...size]; - sliceSize[$axis] = s; + sliceSize[$axis] = s2; const sliceT = slice5({ inputs: { x }, backend: backend2, attrs: { begin, size: sliceSize } }); - begin[$axis] += s; + begin[$axis] += s2; return sliceT; }); } @@ -74835,7 +74652,7 @@ var splitVConfig4 = { kernelFunc: splitV4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Sqrt.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Sqrt.js var sqrt4 = unaryKernelFunc3({ opType: UnaryOpType.SQRT }); var sqrtConfig4 = { kernelName: Sqrt, @@ -74843,7 +74660,7 @@ var sqrtConfig4 = { kernelFunc: sqrt4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Square.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Square.js var squareConfig4 = { kernelName: Square, backendName: "webgpu", @@ -74855,7 +74672,7 @@ var squareConfig4 = { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/SquaredDifference.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/SquaredDifference.js var squaredDifference4 = binaryKernelFunc3({ opType: BinaryOpType.SQUARED_DIFFERENCE }); @@ -74865,7 +74682,7 @@ var squaredDifferenceConfig4 = { kernelFunc: squaredDifference4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/strided_slice_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/strided_slice_webgpu.js var StridedSliceProgram2 = class { constructor(destSize) { this.variableNames = ["x"]; @@ -74886,9 +74703,9 @@ var StridedSliceProgram2 = class { newCoords = "coords * uniforms.strides + uniforms.begin"; } else { let outputAxis = 0; - newCoords = this.outputShape.map((_, i) => { + newCoords = this.outputShape.map((_, i2) => { outputAxis++; - return this.outputShape.length === 1 ? `coords * uniforms.strides[${i}] + uniforms.begin[${i}]` : `coords[${outputAxis - 1}] * uniforms.strides[${i}] + uniforms.begin[${i}]`; + return this.outputShape.length === 1 ? `coords * uniforms.strides[${i2}] + uniforms.begin[${i2}]` : `coords[${outputAxis - 1}] * uniforms.strides[${i2}] + uniforms.begin[${i2}]`; }).join(","); } const userCode = ` @@ -74903,7 +74720,7 @@ var StridedSliceProgram2 = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/StridedSlice.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/StridedSlice.js function stridedSlice5(args) { const { inputs, backend: backend2, attrs } = args; const { x } = inputs; @@ -74941,7 +74758,7 @@ var stridedSliceConfig4 = { kernelFunc: stridedSlice5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/StringNGrams.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/StringNGrams.js function stringNGrams5(args) { const { inputs, backend: backend2, attrs } = args; const { separator, nGramWidths, leftPad, rightPad: rightPad2, padWidth, preserveShortSequences } = attrs; @@ -74960,7 +74777,7 @@ var stringNGramsConfig4 = { kernelFunc: stringNGrams5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Tanh.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Tanh.js var tanh5 = unaryKernelFunc3({ opType: UnaryOpType.TANH }); var tanhConfig4 = { kernelName: Tanh, @@ -74968,7 +74785,7 @@ var tanhConfig4 = { kernelFunc: tanh5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/top_k_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/top_k_webgpu.js var SwapProgram2 = class { constructor(shape) { this.variableNames = ["x", "indices"]; @@ -75129,7 +74946,7 @@ var MergeProgram2 = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/TopK.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/TopK.js function disposeIntermediateTensorInfoOrNull2(backend2, tensorInfo) { if (tensorInfo !== null) { backend2.disposeData(tensorInfo.dataId); @@ -75236,7 +75053,7 @@ var topKConfig4 = { kernelFunc: topK3 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/transform_webgpu.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/transform_webgpu.js var TransformProgram2 = class { constructor(outShape) { this.variableNames = ["Image", "Transforms"]; @@ -75370,7 +75187,7 @@ var TransformProgram2 = class { } }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Transform.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Transform.js function transform5(args) { const { inputs, backend: backend2, attrs } = args; const { image: image2, transforms } = inputs; @@ -75416,7 +75233,7 @@ var transformConfig4 = { kernelFunc: transform5 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Unpack.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/kernels/Unpack.js function unpack4(args) { const { inputs, backend: backend2, attrs } = args; const { value } = inputs; @@ -75429,9 +75246,9 @@ function unpack4(args) { const num = value.shape[axis]; const outShape = new Array(xRank - 1); let outIndex = 0; - for (let i = 0; i < xRank; i++) { - if (i !== axis) { - outShape[outIndex++] = x.shape[i]; + for (let i2 = 0; i2 < xRank; i2++) { + if (i2 !== axis) { + outShape[outIndex++] = x.shape[i2]; } } const toDispose = []; @@ -75439,14 +75256,14 @@ function unpack4(args) { const size = x.shape.slice(); size[axis] = 1; const res = new Array(num); - for (let i = 0; i < res.length; i++) { - begin[axis] = i; + for (let i2 = 0; i2 < res.length; i2++) { + begin[axis] = i2; const sliced = slice5({ inputs: { x }, backend: backend2, attrs: { begin, size } }); const reshaped = reshape6({ inputs: { x: sliced }, backend: backend2, attrs: { shape: outShape } }); - res[i] = reshaped; + res[i2] = reshaped; toDispose.push(sliced); } - toDispose.forEach((t) => backend2.disposeData(t.dataId)); + toDispose.forEach((t2) => backend2.disposeData(t2.dataId)); return res; } var unpackConfig4 = { @@ -75455,7 +75272,7 @@ var unpackConfig4 = { kernelFunc: unpack4 }; -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.13_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgpu/dist/register_all_kernels.js +// node_modules/.pnpm/@tensorflow+tfjs-backend-webgpu@0.0.1-alpha.14_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-backend-webgpu/dist/register_all_kernels.js var kernelConfigs4 = [ _fusedMatMulConfig4, absConfig4, @@ -75567,22 +75384,14 @@ for (const kernelConfig of kernelConfigs4) { } // dist/tfjs.version.js -var version9 = "3.20.0"; -var version22 = "3.20.0"; -var version32 = "3.20.0"; -var version42 = "3.20.0"; -var version52 = "3.20.0"; -var version62 = "3.20.0"; -var version72 = "3.20.0"; -var version82 = { - tfjs: version9, - "tfjs-core": version22, - "tfjs-data": version32, - "tfjs-layers": version42, - "tfjs-converter": version52, - "tfjs-backend-webgl": version62, - "tfjs-backend-wasm": version72 -}; +var e = "3.21.0"; +var s = "3.21.0"; +var t = "3.21.0"; +var i = "3.21.0"; +var n = "3.21.0"; +var r = "3.21.0"; +var l = "3.21.0"; +var V = { tfjs: e, "tfjs-core": s, "tfjs-data": t, "tfjs-layers": i, "tfjs-converter": n, "tfjs-backend-webgl": r, "tfjs-backend-wasm": l }; export { Abs, Acos, @@ -75727,6 +75536,7 @@ export { Prod, RMSPropOptimizer, RNN, + RaggedGather, RaggedTensorToTensor, Range, Rank, @@ -75974,6 +75784,7 @@ export { print, prod, profile, + raggedGather, raggedTensorToTensor, rand, randomGamma, @@ -76076,7 +75887,7 @@ export { valueAndGrads, variable, variableGrads, - version82 as version, + V as version, version3 as version_converter, version as version_core, version2 as version_layers, diff --git a/dist/tfjs.version.js b/dist/tfjs.version.js index 567c36c81..8107ba220 100644 --- a/dist/tfjs.version.js +++ b/dist/tfjs.version.js @@ -4,38 +4,4 @@ author: ' */ - -// node_modules/.pnpm/@tensorflow+tfjs@3.20.0_seedrandom@3.0.5/node_modules/@tensorflow/tfjs/package.json -var version = "3.20.0"; - -// node_modules/.pnpm/@tensorflow+tfjs-core@3.20.0/node_modules/@tensorflow/tfjs-core/package.json -var version2 = "3.20.0"; - -// node_modules/.pnpm/@tensorflow+tfjs-data@3.20.0_k7dauiu3y265wd6lcplf62oi7i/node_modules/@tensorflow/tfjs-data/package.json -var version3 = "3.20.0"; - -// node_modules/.pnpm/@tensorflow+tfjs-layers@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-layers/package.json -var version4 = "3.20.0"; - -// node_modules/.pnpm/@tensorflow+tfjs-converter@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-converter/package.json -var version5 = "3.20.0"; - -// node_modules/.pnpm/@tensorflow+tfjs-backend-webgl@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-webgl/package.json -var version6 = "3.20.0"; - -// node_modules/.pnpm/@tensorflow+tfjs-backend-wasm@3.20.0_au2niqrxqvhsnv4oetlud656gy/node_modules/@tensorflow/tfjs-backend-wasm/package.json -var version7 = "3.20.0"; - -// tfjs/tf-version.ts -var version8 = { - tfjs: version, - "tfjs-core": version2, - "tfjs-data": version3, - "tfjs-layers": version4, - "tfjs-converter": version5, - "tfjs-backend-webgl": version6, - "tfjs-backend-wasm": version7 -}; -export { - version8 as version -}; +var e="3.21.0";var s="3.21.0";var t="3.21.0";var i="3.21.0";var n="3.21.0";var r="3.21.0";var l="3.21.0";var V={tfjs:e,"tfjs-core":s,"tfjs-data":t,"tfjs-layers":i,"tfjs-converter":n,"tfjs-backend-webgl":r,"tfjs-backend-wasm":l};export{V as version}; diff --git a/models/models.json b/models/models.json index 5c2247a88..051fd98ee 100644 --- a/models/models.json +++ b/models/models.json @@ -11,7 +11,6 @@ "mb3-centernet": 4030290, "models": 0, "movenet-lightning": 4650216, - "selfie": 212886, "age": 161240, "blazeface-back": 538928, "blazeface-front": 402048, @@ -42,6 +41,8 @@ "movenet-thunder": 12477112, "nanodet": 7574558, "posenet": 5032780, + "rvm": 3739355, + "selfie": 212886, "blazepose-detect": 5928804, "anti-spoofing": 853098, "efficientpose-i-lite": 2269064, diff --git a/test/build.log b/test/build.log index f7faa44eb..f1767ee9d 100644 --- a/test/build.log +++ b/test/build.log @@ -1,2727 +1,40 @@ -2022-09-30 10:10:34 DATA:  Build {"name":"@vladmandic/human","version":"2.11.0"} -2022-09-30 10:10:34 INFO:  Application: {"name":"@vladmandic/human","version":"2.11.0"} -2022-09-30 10:10:34 INFO:  Environment: {"profile":"production","config":".build.json","package":"package.json","tsconfig":true,"eslintrc":true,"git":true} -2022-09-30 10:10:34 INFO:  Toolchain: {"build":"0.7.14","esbuild":"0.15.10","typescript":"4.8.4","typedoc":"0.23.15","eslint":"8.24.0"} -2022-09-30 10:10:34 INFO:  Build: {"profile":"production","steps":["clean","compile","typings","typedoc","lint","changelog"]} -2022-09-30 10:10:34 STATE: Clean: {"locations":["dist/*","types/lib/*","typedoc/*"]} -2022-09-30 10:10:34 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":608} -2022-09-30 10:10:35 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":76,"inputBytes":665243,"outputBytes":312739} -2022-09-30 10:10:35 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":612} -2022-09-30 10:10:35 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":76,"inputBytes":665247,"outputBytes":312743} -2022-09-30 10:10:35 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":664} -2022-09-30 10:10:35 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":76,"inputBytes":665299,"outputBytes":312793} -2022-09-30 10:10:35 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":358} -2022-09-30 10:10:35 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":1088,"outputBytes":583} -2022-09-30 10:10:35 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":76,"inputBytes":665218,"outputBytes":311543} -2022-09-30 10:10:35 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":1344,"outputBytes":2821914} -2022-09-30 10:10:35 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":76,"inputBytes":3486549,"outputBytes":1691871} -2022-09-30 10:10:35 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":76,"inputBytes":3486549,"outputBytes":3116005} -2022-09-30 10:10:39 STATE: Typings: {"input":"src/human.ts","output":"types/lib","files":15} -2022-09-30 10:10:41 STATE: TypeDoc: {"input":"src/human.ts","output":"typedoc","objects":75,"generated":true} -2022-09-30 10:10:41 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":2632} -2022-09-30 10:10:41 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":9175} -2022-09-30 10:10:52 STATE: Lint: {"locations":["*.json","src/**/*.ts","test/**/*.js","demo/**/*.js"],"files":111,"errors":0,"warnings":0} -2022-09-30 10:10:52 STATE: ChangeLog: {"repository":"https://github.com/vladmandic/human","branch":"main","output":"CHANGELOG.md"} -2022-09-30 10:10:52 STATE: Copy: {"input":"tfjs/tfjs.esm.d.ts"} -2022-09-30 10:10:52 INFO:  Done... -2022-09-30 10:10:53 STATE: API-Extractor: {"succeeeded":true,"errors":0,"warnings":193} -2022-09-30 10:10:53 STATE: Filter: {"input":"types/human.d.ts"} -2022-09-30 10:10:53 STATE: Link: {"input":"types/human.d.ts"} -2022-09-30 10:10:53 INFO:  Analyze models: {"folders":8,"result":"models/models.json"} -2022-09-30 10:10:53 STATE: Models {"folder":"./models","models":13} -2022-09-30 10:10:53 STATE: Models {"folder":"../human-models/models","models":42} -2022-09-30 10:10:53 STATE: Models {"folder":"../blazepose/model/","models":4} -2022-09-30 10:10:53 STATE: Models {"folder":"../anti-spoofing/model","models":1} -2022-09-30 10:10:53 STATE: Models {"folder":"../efficientpose/models","models":3} -2022-09-30 10:10:53 STATE: Models {"folder":"../insightface/models","models":5} -2022-09-30 10:10:53 STATE: Models {"folder":"../movenet/models","models":3} -2022-09-30 10:10:53 STATE: Models {"folder":"../nanodet/models","models":4} -2022-09-30 10:10:53 STATE: Models: {"count":57,"totalSize":383017442} -2022-09-30 10:10:53 INFO:  Human Build complete... {"logFile":"test/build.log"} -2022-10-02 11:25:38 INFO:  @vladmandic/human version 2.11.0 -2022-10-02 11:25:38 INFO:  User: vlado Platform: linux Arch: x64 Node: v18.10.0 -2022-10-02 11:25:38 INFO:  Application: {"name":"@vladmandic/human","version":"2.11.0"} -2022-10-02 11:25:38 INFO:  Environment: {"profile":"development","config":".build.json","package":"package.json","tsconfig":true,"eslintrc":true,"git":true} -2022-10-02 11:25:38 INFO:  Toolchain: {"build":"0.7.14","esbuild":"0.15.10","typescript":"4.8.4","typedoc":"0.23.15","eslint":"8.24.0"} -2022-10-02 11:25:38 INFO:  Build: {"profile":"development","steps":["serve","watch","compile"]} -2022-10-02 11:25:38 STATE: WebServer: {"ssl":false,"port":10030,"root":"."} -2022-10-02 11:25:38 STATE: WebServer: {"ssl":true,"port":10031,"root":".","sslKey":"node_modules/@vladmandic/build/cert/https.key","sslCrt":"node_modules/@vladmandic/build/cert/https.crt"} -2022-10-02 11:25:38 STATE: Watch: {"locations":["src/**/*","tfjs/**/*","demo/**/*.ts"]} -2022-10-02 11:25:38 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 11:25:38 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":76,"inputBytes":665733,"outputBytes":497798} -2022-10-02 11:25:38 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 11:25:38 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":76,"inputBytes":665753,"outputBytes":497814} -2022-10-02 11:25:38 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 11:25:38 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":76,"inputBytes":665840,"outputBytes":497905} -2022-10-02 11:25:38 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 11:25:38 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 11:25:38 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":76,"inputBytes":665491,"outputBytes":499938} -2022-10-02 11:25:38 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2425,"outputBytes":2818325} -2022-10-02 11:25:39 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":76,"inputBytes":3482960,"outputBytes":1691871} -2022-10-02 11:25:39 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":76,"inputBytes":3482960,"outputBytes":3111433} -2022-10-02 11:25:39 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 11:25:39 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 11:25:39 INFO:  Listening... -2022-10-02 11:26:07 INFO:  Watch: {"event":"modify","input":"tfjs/tf-custom.ts"} -2022-10-02 11:26:07 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 11:26:07 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":76,"inputBytes":665733,"outputBytes":497798} -2022-10-02 11:26:07 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 11:26:07 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":76,"inputBytes":665753,"outputBytes":497814} -2022-10-02 11:26:07 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 11:26:08 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":76,"inputBytes":665840,"outputBytes":497905} -2022-10-02 11:26:08 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 11:26:08 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 11:26:08 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":76,"inputBytes":665491,"outputBytes":499938} -2022-10-02 11:26:08 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":7,"inputBytes":2355,"outputBytes":4775595} -2022-10-02 11:26:08 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":76,"inputBytes":5440230,"outputBytes":2707132} -2022-10-02 11:26:08 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":76,"inputBytes":5440230,"outputBytes":5124678} -2022-10-02 11:26:08 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 11:26:08 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 11:27:24 INFO:  Watch: {"event":"modify","input":"tfjs/tf-custom.ts"} -2022-10-02 11:27:24 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 11:27:24 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":76,"inputBytes":665733,"outputBytes":497798} -2022-10-02 11:27:24 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 11:27:24 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":76,"inputBytes":665753,"outputBytes":497814} -2022-10-02 11:27:24 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 11:27:24 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":76,"inputBytes":665840,"outputBytes":497905} -2022-10-02 11:27:24 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 11:27:24 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 11:27:24 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":76,"inputBytes":665491,"outputBytes":499938} -2022-10-02 11:27:24 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":7,"inputBytes":2373,"outputBytes":3814901} -2022-10-02 11:27:24 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":76,"inputBytes":4479536,"outputBytes":2705394} -2022-10-02 11:27:24 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":76,"inputBytes":4479536,"outputBytes":4152507} -2022-10-02 11:27:24 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 11:27:24 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 11:27:49 INFO:  Watch: {"event":"modify","input":"tfjs/tf-custom.ts"} -2022-10-02 11:27:49 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 11:27:49 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":76,"inputBytes":665733,"outputBytes":497798} -2022-10-02 11:27:49 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 11:27:49 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":76,"inputBytes":665753,"outputBytes":497814} -2022-10-02 11:27:49 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 11:27:49 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":76,"inputBytes":665840,"outputBytes":497905} -2022-10-02 11:27:49 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 11:27:49 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 11:27:49 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":76,"inputBytes":665491,"outputBytes":499938} -2022-10-02 11:27:49 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 11:27:49 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":76,"inputBytes":3482960,"outputBytes":1691871} -2022-10-02 11:27:49 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":76,"inputBytes":3482960,"outputBytes":3111433} -2022-10-02 11:27:49 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 11:27:49 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 11:29:38 INFO:  Watch: {"event":"add","input":"src/segmentation/selfie.ts"} -2022-10-02 11:29:38 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 11:29:38 ERROR: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts"} {"errors":[{"id":"","location":{"column":30,"file":"src/human.ts","length":29,"line":38,"lineText":"import * as segmentation from './segmentation/segmentation';","namespace":"","suggestion":""},"notes":[],"pluginName":"","text":"Could not resolve \"./segmentation/segmentation\""},{"id":"","location":{"column":30,"file":"src/models.ts","length":29,"line":27,"lineText":"import * as segmentation from './segmentation/segmentation';","namespace":"","suggestion":""},"notes":[],"pluginName":"","text":"Could not resolve \"./segmentation/segmentation\""}]} -2022-10-02 11:29:38 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 11:29:38 ERROR: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts"} {"errors":[{"id":"","location":{"column":30,"file":"src/human.ts","length":29,"line":38,"lineText":"import * as segmentation from './segmentation/segmentation';","namespace":"","suggestion":""},"notes":[],"pluginName":"","text":"Could not resolve \"./segmentation/segmentation\""},{"id":"","location":{"column":30,"file":"src/models.ts","length":29,"line":27,"lineText":"import * as segmentation from './segmentation/segmentation';","namespace":"","suggestion":""},"notes":[],"pluginName":"","text":"Could not resolve \"./segmentation/segmentation\""}]} -2022-10-02 11:29:38 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 11:29:38 ERROR: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts"} {"errors":[{"id":"","location":{"column":30,"file":"src/human.ts","length":29,"line":38,"lineText":"import * as segmentation from './segmentation/segmentation';","namespace":"","suggestion":""},"notes":[],"pluginName":"","text":"Could not resolve \"./segmentation/segmentation\""},{"id":"","location":{"column":30,"file":"src/models.ts","length":29,"line":27,"lineText":"import * as segmentation from './segmentation/segmentation';","namespace":"","suggestion":""},"notes":[],"pluginName":"","text":"Could not resolve \"./segmentation/segmentation\""}]} -2022-10-02 11:29:38 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 11:29:38 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 11:29:38 ERROR: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts"} {"errors":[{"id":"","location":{"column":30,"file":"src/human.ts","length":29,"line":38,"lineText":"import * as segmentation from './segmentation/segmentation';","namespace":"","suggestion":""},"notes":[],"pluginName":"","text":"Could not resolve \"./segmentation/segmentation\""},{"id":"","location":{"column":30,"file":"src/models.ts","length":29,"line":27,"lineText":"import * as segmentation from './segmentation/segmentation';","namespace":"","suggestion":""},"notes":[],"pluginName":"","text":"Could not resolve \"./segmentation/segmentation\""}]} -2022-10-02 11:29:38 INFO:  Watch: {"event":"remove","input":"src/segmentation/segmentation.ts","skip":true} -2022-10-02 11:29:38 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 11:29:38 ERROR: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts"} {"errors":[{"id":"","location":{"column":30,"file":"src/human.ts","length":29,"line":38,"lineText":"import * as segmentation from './segmentation/segmentation';","namespace":"","suggestion":""},"notes":[],"pluginName":"","text":"Could not resolve \"./segmentation/segmentation\""},{"id":"","location":{"column":30,"file":"src/models.ts","length":29,"line":27,"lineText":"import * as segmentation from './segmentation/segmentation';","namespace":"","suggestion":""},"notes":[],"pluginName":"","text":"Could not resolve \"./segmentation/segmentation\""}]} -2022-10-02 11:29:38 ERROR: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts"} {"errors":[{"id":"","location":{"column":30,"file":"src/human.ts","length":29,"line":38,"lineText":"import * as segmentation from './segmentation/segmentation';","namespace":"","suggestion":""},"notes":[],"pluginName":"","text":"Could not resolve \"./segmentation/segmentation\""},{"id":"","location":{"column":30,"file":"src/models.ts","length":29,"line":27,"lineText":"import * as segmentation from './segmentation/segmentation';","namespace":"","suggestion":""},"notes":[],"pluginName":"","text":"Could not resolve \"./segmentation/segmentation\""}]} -2022-10-02 11:29:38 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 11:29:38 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 11:29:42 INFO:  Watch: {"event":"modify","input":"src/human.ts"} -2022-10-02 11:29:42 INFO:  Watch: {"event":"modify","input":"src/models.ts","skip":true} -2022-10-02 11:29:42 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 11:29:42 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":76,"inputBytes":665721,"outputBytes":497792} -2022-10-02 11:29:42 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 11:29:42 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":76,"inputBytes":665741,"outputBytes":497808} -2022-10-02 11:29:42 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 11:29:42 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":76,"inputBytes":665828,"outputBytes":497899} -2022-10-02 11:29:42 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 11:29:42 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 11:29:42 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":76,"inputBytes":665479,"outputBytes":499932} -2022-10-02 11:29:43 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 11:29:43 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":76,"inputBytes":3482948,"outputBytes":1691871} -2022-10-02 11:29:43 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":76,"inputBytes":3482948,"outputBytes":3111427} -2022-10-02 11:29:43 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 11:29:43 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 11:30:30 INFO:  Watch: {"event":"add","input":"src/segmentation/rvm.ts"} -2022-10-02 11:30:30 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 11:30:30 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":76,"inputBytes":665721,"outputBytes":497792} -2022-10-02 11:30:30 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 11:30:30 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":76,"inputBytes":665741,"outputBytes":497808} -2022-10-02 11:30:30 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 11:30:30 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":76,"inputBytes":665828,"outputBytes":497899} -2022-10-02 11:30:30 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 11:30:30 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 11:30:30 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":76,"inputBytes":665479,"outputBytes":499932} -2022-10-02 11:30:30 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 11:30:30 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":76,"inputBytes":3482948,"outputBytes":1691871} -2022-10-02 11:30:30 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":76,"inputBytes":3482948,"outputBytes":3111427} -2022-10-02 11:30:30 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 11:30:30 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 11:41:33 INFO:  Watch: {"event":"modify","input":"src/segmentation/rvm.ts"} -2022-10-02 11:41:33 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 11:41:33 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":76,"inputBytes":665721,"outputBytes":497792} -2022-10-02 11:41:33 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 11:41:33 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":76,"inputBytes":665741,"outputBytes":497808} -2022-10-02 11:41:33 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 11:41:33 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":76,"inputBytes":665828,"outputBytes":497899} -2022-10-02 11:41:33 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 11:41:33 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 11:41:33 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":76,"inputBytes":665479,"outputBytes":499932} -2022-10-02 11:41:33 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 11:41:33 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":76,"inputBytes":3482948,"outputBytes":1691871} -2022-10-02 11:41:33 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":76,"inputBytes":3482948,"outputBytes":3111427} -2022-10-02 11:41:33 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 11:41:33 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 11:45:04 INFO:  Watch: {"event":"modify","input":"src/config.ts"} -2022-10-02 11:45:04 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 11:45:04 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":76,"inputBytes":666058,"outputBytes":497829} -2022-10-02 11:45:04 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 11:45:04 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":76,"inputBytes":666078,"outputBytes":497845} -2022-10-02 11:45:04 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 11:45:04 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":76,"inputBytes":666165,"outputBytes":497936} -2022-10-02 11:45:04 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 11:45:04 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 11:45:04 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":76,"inputBytes":665816,"outputBytes":499969} -2022-10-02 11:45:04 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 11:45:04 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":76,"inputBytes":3483285,"outputBytes":1691895} -2022-10-02 11:45:04 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":76,"inputBytes":3483285,"outputBytes":3111464} -2022-10-02 11:45:04 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 11:45:04 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 11:45:04 INFO:  Watch: {"event":"modify","input":"src/segmentation/rvm.ts","skip":true} -2022-10-02 11:47:38 INFO:  Watch: {"event":"modify","input":"src/models.ts"} -2022-10-02 11:47:38 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 11:47:38 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":77,"inputBytes":670227,"outputBytes":499295} -2022-10-02 11:47:38 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 11:47:38 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":77,"inputBytes":670247,"outputBytes":499311} -2022-10-02 11:47:38 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 11:47:38 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":77,"inputBytes":670334,"outputBytes":499402} -2022-10-02 11:47:38 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 11:47:38 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 11:47:38 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":77,"inputBytes":669985,"outputBytes":501525} -2022-10-02 11:47:39 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 11:47:39 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":77,"inputBytes":3487454,"outputBytes":1692604} -2022-10-02 11:47:39 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":77,"inputBytes":3487454,"outputBytes":3113388} -2022-10-02 11:47:39 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 11:47:39 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 11:59:15 INFO:  Watch: {"event":"modify","input":"src/segmentation/rvm.ts"} -2022-10-02 11:59:15 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 11:59:15 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":77,"inputBytes":670341,"outputBytes":499295} -2022-10-02 11:59:15 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 11:59:15 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":77,"inputBytes":670361,"outputBytes":499311} -2022-10-02 11:59:15 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 11:59:15 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":77,"inputBytes":670448,"outputBytes":499402} -2022-10-02 11:59:15 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 11:59:15 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 11:59:15 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":77,"inputBytes":670099,"outputBytes":501525} -2022-10-02 11:59:15 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 11:59:15 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":77,"inputBytes":3487568,"outputBytes":1692604} -2022-10-02 11:59:15 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":77,"inputBytes":3487568,"outputBytes":3113388} -2022-10-02 11:59:15 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 11:59:15 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 12:01:18 INFO:  Watch: {"event":"modify","input":"src/human.ts"} -2022-10-02 12:01:18 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 12:01:18 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":77,"inputBytes":670710,"outputBytes":498522} -2022-10-02 12:01:18 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 12:01:18 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":77,"inputBytes":670730,"outputBytes":498538} -2022-10-02 12:01:18 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 12:01:18 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":77,"inputBytes":670817,"outputBytes":498629} -2022-10-02 12:01:18 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 12:01:18 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 12:01:18 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":77,"inputBytes":670468,"outputBytes":500872} -2022-10-02 12:01:18 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 12:01:18 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":77,"inputBytes":3487937,"outputBytes":1692232} -2022-10-02 12:01:18 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":77,"inputBytes":3487937,"outputBytes":3112544} -2022-10-02 12:01:18 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 12:01:18 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 12:02:38 INFO:  Watch: {"event":"add","input":"src/segmentation/selfie copy.ts"} -2022-10-02 12:02:38 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 12:02:38 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":77,"inputBytes":670710,"outputBytes":498522} -2022-10-02 12:02:38 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 12:02:38 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":77,"inputBytes":670730,"outputBytes":498538} -2022-10-02 12:02:38 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 12:02:38 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":77,"inputBytes":670817,"outputBytes":498629} -2022-10-02 12:02:38 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 12:02:38 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 12:02:38 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":77,"inputBytes":670468,"outputBytes":500872} -2022-10-02 12:02:38 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 12:02:38 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":77,"inputBytes":3487937,"outputBytes":1692232} -2022-10-02 12:02:39 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":77,"inputBytes":3487937,"outputBytes":3112544} -2022-10-02 12:02:39 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 12:02:39 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 12:06:01 INFO:  Watch: {"event":"add","input":"src/segmentation/meet.ts"} -2022-10-02 12:06:01 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 12:06:01 ERROR: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts"} {"errors":[{"id":"","location":{"column":24,"file":"src/human.ts","length":23,"line":39,"lineText":"import * as selfie from './segmentation/selfie';","namespace":"","suggestion":""},"notes":[],"pluginName":"","text":"Could not resolve \"./segmentation/selfie\""},{"id":"","location":{"column":24,"file":"src/models.ts","length":23,"line":26,"lineText":"import * as selfie from './segmentation/selfie';","namespace":"","suggestion":""},"notes":[],"pluginName":"","text":"Could not resolve \"./segmentation/selfie\""}]} -2022-10-02 12:06:01 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 12:06:01 ERROR: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts"} {"errors":[{"id":"","location":{"column":24,"file":"src/human.ts","length":23,"line":39,"lineText":"import * as selfie from './segmentation/selfie';","namespace":"","suggestion":""},"notes":[],"pluginName":"","text":"Could not resolve \"./segmentation/selfie\""},{"id":"","location":{"column":24,"file":"src/models.ts","length":23,"line":26,"lineText":"import * as selfie from './segmentation/selfie';","namespace":"","suggestion":""},"notes":[],"pluginName":"","text":"Could not resolve \"./segmentation/selfie\""}]} -2022-10-02 12:06:01 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 12:06:01 ERROR: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts"} {"errors":[{"id":"","location":{"column":24,"file":"src/human.ts","length":23,"line":39,"lineText":"import * as selfie from './segmentation/selfie';","namespace":"","suggestion":""},"notes":[],"pluginName":"","text":"Could not resolve \"./segmentation/selfie\""},{"id":"","location":{"column":24,"file":"src/models.ts","length":23,"line":26,"lineText":"import * as selfie from './segmentation/selfie';","namespace":"","suggestion":""},"notes":[],"pluginName":"","text":"Could not resolve \"./segmentation/selfie\""}]} -2022-10-02 12:06:01 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 12:06:01 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 12:06:01 ERROR: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts"} {"errors":[{"id":"","location":{"column":24,"file":"src/human.ts","length":23,"line":39,"lineText":"import * as selfie from './segmentation/selfie';","namespace":"","suggestion":""},"notes":[],"pluginName":"","text":"Could not resolve \"./segmentation/selfie\""},{"id":"","location":{"column":24,"file":"src/models.ts","length":23,"line":26,"lineText":"import * as selfie from './segmentation/selfie';","namespace":"","suggestion":""},"notes":[],"pluginName":"","text":"Could not resolve \"./segmentation/selfie\""}]} -2022-10-02 12:06:01 INFO:  Watch: {"event":"remove","input":"src/segmentation/selfie.ts","skip":true} -2022-10-02 12:06:02 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 12:06:02 ERROR: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts"} {"errors":[{"id":"","location":{"column":24,"file":"src/human.ts","length":23,"line":39,"lineText":"import * as selfie from './segmentation/selfie';","namespace":"","suggestion":""},"notes":[],"pluginName":"","text":"Could not resolve \"./segmentation/selfie\""},{"id":"","location":{"column":24,"file":"src/models.ts","length":23,"line":26,"lineText":"import * as selfie from './segmentation/selfie';","namespace":"","suggestion":""},"notes":[],"pluginName":"","text":"Could not resolve \"./segmentation/selfie\""}]} -2022-10-02 12:06:02 ERROR: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts"} {"errors":[{"id":"","location":{"column":24,"file":"src/human.ts","length":23,"line":39,"lineText":"import * as selfie from './segmentation/selfie';","namespace":"","suggestion":""},"notes":[],"pluginName":"","text":"Could not resolve \"./segmentation/selfie\""},{"id":"","location":{"column":24,"file":"src/models.ts","length":23,"line":26,"lineText":"import * as selfie from './segmentation/selfie';","namespace":"","suggestion":""},"notes":[],"pluginName":"","text":"Could not resolve \"./segmentation/selfie\""}]} -2022-10-02 12:06:02 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 12:06:02 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 12:06:08 INFO:  Watch: {"event":"add","input":"src/segmentation/selfie.ts"} -2022-10-02 12:06:09 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 12:06:09 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":77,"inputBytes":670710,"outputBytes":498522} -2022-10-02 12:06:09 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 12:06:09 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":77,"inputBytes":670730,"outputBytes":498538} -2022-10-02 12:06:09 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 12:06:09 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":77,"inputBytes":670817,"outputBytes":498629} -2022-10-02 12:06:09 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 12:06:09 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 12:06:09 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":77,"inputBytes":670468,"outputBytes":500872} -2022-10-02 12:06:09 INFO:  Watch: {"event":"remove","input":"src/segmentation/selfie copy.ts","skip":true} -2022-10-02 12:06:09 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 12:06:09 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":77,"inputBytes":3487937,"outputBytes":1692232} -2022-10-02 12:06:09 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":77,"inputBytes":3487937,"outputBytes":3112544} -2022-10-02 12:06:09 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 12:06:09 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 12:07:06 INFO:  Watch: {"event":"modify","input":"src/models.ts"} -2022-10-02 12:07:06 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 12:07:06 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":676126,"outputBytes":498859} -2022-10-02 12:07:06 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 12:07:06 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":676146,"outputBytes":498875} -2022-10-02 12:07:06 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 12:07:06 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":676233,"outputBytes":498966} -2022-10-02 12:07:06 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 12:07:06 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 12:07:06 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":675884,"outputBytes":501169} -2022-10-02 12:07:06 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 12:07:06 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3493353,"outputBytes":1692385} -2022-10-02 12:07:06 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3493353,"outputBytes":3112842} -2022-10-02 12:07:06 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 12:07:06 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 12:07:14 INFO:  Watch: {"event":"modify","input":"src/models.ts"} -2022-10-02 12:07:14 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 12:07:14 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":676126,"outputBytes":498859} -2022-10-02 12:07:14 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 12:07:14 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":676146,"outputBytes":498875} -2022-10-02 12:07:14 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 12:07:14 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":676233,"outputBytes":498966} -2022-10-02 12:07:14 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 12:07:14 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 12:07:14 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":675884,"outputBytes":501169} -2022-10-02 12:07:14 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 12:07:14 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3493353,"outputBytes":1692385} -2022-10-02 12:07:14 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3493353,"outputBytes":3112842} -2022-10-02 12:07:14 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 12:07:14 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 12:09:46 INFO:  Watch: {"event":"modify","input":"src/human.ts"} -2022-10-02 12:09:46 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 12:09:46 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":676400,"outputBytes":499161} -2022-10-02 12:09:46 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 12:09:46 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":676420,"outputBytes":499177} -2022-10-02 12:09:46 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 12:09:46 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":676507,"outputBytes":499268} -2022-10-02 12:09:46 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 12:09:46 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 12:09:46 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":676158,"outputBytes":501471} -2022-10-02 12:09:46 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 12:09:46 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3493627,"outputBytes":1692589} -2022-10-02 12:09:46 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3493627,"outputBytes":3113144} -2022-10-02 12:09:46 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 12:09:46 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 12:09:51 INFO:  Watch: {"event":"modify","input":"src/segmentation/meet.ts"} -2022-10-02 12:09:51 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 12:09:51 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":672478,"outputBytes":499670} -2022-10-02 12:09:51 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 12:09:51 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":672498,"outputBytes":499686} -2022-10-02 12:09:51 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 12:09:51 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":672585,"outputBytes":499777} -2022-10-02 12:09:51 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 12:09:51 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 12:09:51 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":672236,"outputBytes":502028} -2022-10-02 12:09:51 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 12:09:52 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3489705,"outputBytes":1692891} -2022-10-02 12:09:52 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3489705,"outputBytes":3113637} -2022-10-02 12:09:52 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 12:09:52 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 12:09:52 INFO:  Watch: {"event":"modify","input":"src/segmentation/selfie.ts","skip":true} -2022-10-02 12:09:55 INFO:  Watch: {"event":"modify","input":"src/segmentation/selfie.ts"} -2022-10-02 12:09:55 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 12:09:55 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673328,"outputBytes":500409} -2022-10-02 12:09:55 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 12:09:55 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673348,"outputBytes":500425} -2022-10-02 12:09:55 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 12:09:55 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673435,"outputBytes":500516} -2022-10-02 12:09:55 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 12:09:55 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 12:09:55 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":673086,"outputBytes":502875} -2022-10-02 12:09:55 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 12:09:55 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490555,"outputBytes":1693319} -2022-10-02 12:09:55 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490555,"outputBytes":3114335} -2022-10-02 12:09:55 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 12:09:55 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 12:12:33 INFO:  Watch: {"event":"modify","input":"src/human.ts"} -2022-10-02 12:12:33 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 12:12:33 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673328,"outputBytes":500414} -2022-10-02 12:12:33 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 12:12:33 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673348,"outputBytes":500430} -2022-10-02 12:12:33 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 12:12:33 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673435,"outputBytes":500521} -2022-10-02 12:12:33 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 12:12:33 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 12:12:33 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":673086,"outputBytes":502880} -2022-10-02 12:12:33 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 12:12:33 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490555,"outputBytes":1693319} -2022-10-02 12:12:33 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490555,"outputBytes":3114340} -2022-10-02 12:12:33 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 12:12:33 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 12:15:02 INFO:  Watch: {"event":"modify","input":"src/config.ts"} -2022-10-02 12:15:02 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 12:15:02 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673179,"outputBytes":500401} -2022-10-02 12:15:02 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 12:15:02 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673199,"outputBytes":500417} -2022-10-02 12:15:02 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 12:15:02 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673286,"outputBytes":500508} -2022-10-02 12:15:02 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 12:15:02 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 12:15:02 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":672937,"outputBytes":502867} -2022-10-02 12:15:02 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 12:15:02 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490406,"outputBytes":1693312} -2022-10-02 12:15:02 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490406,"outputBytes":3114327} -2022-10-02 12:15:02 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 12:15:02 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 12:15:16 INFO:  Watch: {"event":"modify","input":"src/config.ts"} -2022-10-02 12:15:16 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 12:15:16 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673219,"outputBytes":500401} -2022-10-02 12:15:16 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 12:15:16 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673239,"outputBytes":500417} -2022-10-02 12:15:16 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 12:15:17 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673326,"outputBytes":500508} -2022-10-02 12:15:17 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 12:15:17 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 12:15:17 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":672977,"outputBytes":502867} -2022-10-02 12:15:17 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 12:15:17 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490446,"outputBytes":1693312} -2022-10-02 12:15:17 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490446,"outputBytes":3114327} -2022-10-02 12:15:17 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 12:15:17 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 12:16:24 INFO:  Watch: {"event":"add","input":"demo/segmentation/index.ts"} -2022-10-02 12:16:24 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 12:16:24 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673219,"outputBytes":500401} -2022-10-02 12:16:24 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 12:16:25 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673239,"outputBytes":500417} -2022-10-02 12:16:25 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 12:16:25 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673326,"outputBytes":500508} -2022-10-02 12:16:25 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 12:16:25 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 12:16:25 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":672977,"outputBytes":502867} -2022-10-02 12:16:25 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 12:16:25 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490446,"outputBytes":1693312} -2022-10-02 12:16:25 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490446,"outputBytes":3114327} -2022-10-02 12:16:25 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 12:16:25 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 12:17:13 INFO:  Watch: {"event":"remove","input":"demo/segmentation/index.ts"} -2022-10-02 12:17:13 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 12:17:13 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673219,"outputBytes":500401} -2022-10-02 12:17:13 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 12:17:13 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673239,"outputBytes":500417} -2022-10-02 12:17:13 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 12:17:13 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673326,"outputBytes":500508} -2022-10-02 12:17:13 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 12:17:13 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 12:17:13 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":672977,"outputBytes":502867} -2022-10-02 12:17:13 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 12:17:13 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490446,"outputBytes":1693312} -2022-10-02 12:17:14 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490446,"outputBytes":3114327} -2022-10-02 12:17:14 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 12:17:14 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 12:27:12 INFO:  @vladmandic/human version 2.11.0 -2022-10-02 12:27:12 INFO:  User: vlado Platform: linux Arch: x64 Node: v18.10.0 -2022-10-02 12:27:12 INFO:  Application: {"name":"@vladmandic/human","version":"2.11.0"} -2022-10-02 12:27:12 INFO:  Environment: {"profile":"development","config":".build.json","package":"package.json","tsconfig":true,"eslintrc":true,"git":true} -2022-10-02 12:27:12 INFO:  Toolchain: {"build":"0.7.14","esbuild":"0.15.10","typescript":"4.8.4","typedoc":"0.23.15","eslint":"8.24.0"} -2022-10-02 12:27:12 INFO:  Build: {"profile":"development","steps":["serve","watch","compile"]} -2022-10-02 12:27:12 STATE: WebServer: {"ssl":false,"port":10030,"root":"."} -2022-10-02 12:27:12 STATE: WebServer: {"ssl":true,"port":10031,"root":".","sslKey":"node_modules/@vladmandic/build/cert/https.key","sslCrt":"node_modules/@vladmandic/build/cert/https.crt"} -2022-10-02 12:27:12 STATE: Watch: {"locations":["src/**/*","tfjs/**/*","demo/**/*.ts"]} -2022-10-02 12:27:12 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 12:27:12 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673219,"outputBytes":500401} -2022-10-02 12:27:12 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 12:27:12 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673239,"outputBytes":500417} -2022-10-02 12:27:12 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 12:27:12 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673326,"outputBytes":500508} -2022-10-02 12:27:12 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 12:27:12 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 12:27:12 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":672977,"outputBytes":502867} -2022-10-02 12:27:12 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 12:27:12 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490446,"outputBytes":1693312} -2022-10-02 12:27:12 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490446,"outputBytes":3114327} -2022-10-02 12:27:12 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 12:27:12 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 12:27:12 INFO:  Listening... -2022-10-02 12:28:11 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3194,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 12:28:11 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4495,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 12:28:11 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 12:28:11 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/index.webmanifest","remote":"::1"} -2022-10-02 12:28:36 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3208,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 12:28:36 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4495,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 12:28:36 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114327,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 12:28:37 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5622869,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 12:28:37 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 12:28:37 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 12:28:37 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/index.webmanifest","remote":"::1"} -2022-10-02 12:30:50 INFO:  Watch: {"event":"modify","input":"src/human.ts"} -2022-10-02 12:30:50 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 12:30:50 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673254,"outputBytes":500436} -2022-10-02 12:30:50 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 12:30:50 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673274,"outputBytes":500452} -2022-10-02 12:30:50 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 12:30:51 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673361,"outputBytes":500543} -2022-10-02 12:30:51 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 12:30:51 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 12:30:51 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":673012,"outputBytes":502902} -2022-10-02 12:30:51 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 12:30:51 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490481,"outputBytes":1693334} -2022-10-02 12:30:51 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490481,"outputBytes":3114362} -2022-10-02 12:30:51 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 12:30:51 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 12:30:53 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 12:30:53 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4495,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 12:30:53 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114362,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 12:30:53 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5622931,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 12:30:53 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 12:30:53 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 12:30:53 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 12:30:53 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 12:31:48 INFO:  Watch: {"event":"modify","input":"src/models.ts"} -2022-10-02 12:31:48 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 12:31:48 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673251,"outputBytes":500433} -2022-10-02 12:31:48 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 12:31:48 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673271,"outputBytes":500449} -2022-10-02 12:31:48 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 12:31:48 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673358,"outputBytes":500540} -2022-10-02 12:31:48 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 12:31:48 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 12:31:48 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":673009,"outputBytes":502899} -2022-10-02 12:31:48 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 12:31:48 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490478,"outputBytes":1693331} -2022-10-02 12:31:49 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490478,"outputBytes":3114359} -2022-10-02 12:31:49 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 12:31:49 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 12:31:59 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 12:31:59 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4495,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 12:31:59 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114359,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 12:31:59 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5622928,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 12:31:59 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 12:31:59 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 12:31:59 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 12:31:59 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 12:33:14 INFO:  Watch: {"event":"modify","input":"src/human.ts"} -2022-10-02 12:33:14 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 12:33:14 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673216,"outputBytes":500398} -2022-10-02 12:33:14 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 12:33:14 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673236,"outputBytes":500414} -2022-10-02 12:33:14 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 12:33:14 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673323,"outputBytes":500505} -2022-10-02 12:33:14 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 12:33:14 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 12:33:14 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":672974,"outputBytes":502864} -2022-10-02 12:33:14 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 12:33:14 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490443,"outputBytes":1693309} -2022-10-02 12:33:15 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490443,"outputBytes":3114324} -2022-10-02 12:33:15 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 12:33:15 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 12:34:07 INFO:  Watch: {"event":"modify","input":"src/models.ts"} -2022-10-02 12:34:07 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 12:34:07 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673270,"outputBytes":500452} -2022-10-02 12:34:07 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 12:34:07 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673290,"outputBytes":500468} -2022-10-02 12:34:07 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 12:34:07 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673377,"outputBytes":500559} -2022-10-02 12:34:07 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 12:34:07 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 12:34:07 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":673028,"outputBytes":502918} -2022-10-02 12:34:07 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 12:34:07 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490497,"outputBytes":1693352} -2022-10-02 12:34:07 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490497,"outputBytes":3114378} -2022-10-02 12:34:07 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 12:34:07 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 12:34:35 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 12:34:35 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4518,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 12:34:35 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114378,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 12:34:35 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5622957,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 12:34:35 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 12:34:35 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 12:34:35 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 12:34:36 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 12:35:44 INFO:  Watch: {"event":"modify","input":"src/models.ts"} -2022-10-02 12:35:44 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 12:35:44 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673324,"outputBytes":500506} -2022-10-02 12:35:44 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 12:35:44 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673344,"outputBytes":500522} -2022-10-02 12:35:44 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 12:35:44 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673431,"outputBytes":500613} -2022-10-02 12:35:44 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 12:35:44 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 12:35:44 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":673082,"outputBytes":502972} -2022-10-02 12:35:45 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 12:35:45 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490551,"outputBytes":1693395} -2022-10-02 12:35:45 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490551,"outputBytes":3114432} -2022-10-02 12:35:45 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 12:35:45 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 12:35:47 INFO:  Watch: {"event":"modify","input":"src/models.ts"} -2022-10-02 12:35:47 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 12:35:47 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673324,"outputBytes":500506} -2022-10-02 12:35:47 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 12:35:47 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673344,"outputBytes":500522} -2022-10-02 12:35:47 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 12:35:47 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673431,"outputBytes":500613} -2022-10-02 12:35:47 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 12:35:47 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 12:35:47 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":673082,"outputBytes":502972} -2022-10-02 12:35:47 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 12:35:47 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490551,"outputBytes":1693395} -2022-10-02 12:35:47 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490551,"outputBytes":3114432} -2022-10-02 12:35:47 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 12:35:47 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 12:35:49 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 12:35:49 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4518,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 12:35:49 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114432,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 12:35:49 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5623048,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 12:35:49 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 12:35:49 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 12:35:49 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 12:35:49 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 12:36:01 INFO:  Watch: {"event":"modify","input":"src/models.ts"} -2022-10-02 12:36:01 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 12:36:01 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673294,"outputBytes":500476} -2022-10-02 12:36:01 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 12:36:01 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673314,"outputBytes":500492} -2022-10-02 12:36:01 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 12:36:01 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673401,"outputBytes":500583} -2022-10-02 12:36:01 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 12:36:01 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 12:36:01 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":673052,"outputBytes":502942} -2022-10-02 12:36:01 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 12:36:01 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490521,"outputBytes":1693373} -2022-10-02 12:36:01 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490521,"outputBytes":3114402} -2022-10-02 12:36:01 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 12:36:01 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 12:36:02 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 12:36:02 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4518,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 12:36:02 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114402,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 12:36:02 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5623003,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 12:36:02 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 12:36:02 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 12:36:02 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 12:36:02 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 12:36:32 INFO:  Watch: {"event":"modify","input":"src/segmentation/rvm.ts"} -2022-10-02 12:36:32 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 12:36:32 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673318,"outputBytes":500500} -2022-10-02 12:36:32 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 12:36:32 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673338,"outputBytes":500516} -2022-10-02 12:36:32 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 12:36:32 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673425,"outputBytes":500607} -2022-10-02 12:36:32 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 12:36:32 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 12:36:32 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":673076,"outputBytes":502966} -2022-10-02 12:36:32 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 12:36:32 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490545,"outputBytes":1693395} -2022-10-02 12:36:32 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490545,"outputBytes":3114426} -2022-10-02 12:36:32 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 12:36:32 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 12:36:38 INFO:  Watch: {"event":"modify","input":"src/segmentation/rvm.ts"} -2022-10-02 12:36:38 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 12:36:38 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673349,"outputBytes":500533} -2022-10-02 12:36:38 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 12:36:38 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673369,"outputBytes":500549} -2022-10-02 12:36:38 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 12:36:38 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673456,"outputBytes":500640} -2022-10-02 12:36:38 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 12:36:38 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 12:36:38 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":673107,"outputBytes":502999} -2022-10-02 12:36:38 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 12:36:38 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490576,"outputBytes":1693419} -2022-10-02 12:36:39 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490576,"outputBytes":3114459} -2022-10-02 12:36:39 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 12:36:39 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 12:36:47 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 12:36:47 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4518,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 12:36:47 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114459,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 12:36:47 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5623108,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 12:36:47 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 12:36:47 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 12:36:47 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 12:36:47 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 12:37:15 INFO:  Watch: {"event":"modify","input":"src/models.ts"} -2022-10-02 12:37:15 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 12:37:15 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673367,"outputBytes":500551} -2022-10-02 12:37:15 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 12:37:15 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673387,"outputBytes":500567} -2022-10-02 12:37:15 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 12:37:15 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673474,"outputBytes":500658} -2022-10-02 12:37:15 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 12:37:15 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 12:37:15 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":673125,"outputBytes":503017} -2022-10-02 12:37:16 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 12:37:16 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490594,"outputBytes":1693437} -2022-10-02 12:37:16 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490594,"outputBytes":3114477} -2022-10-02 12:37:16 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 12:37:16 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 12:37:18 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 12:37:18 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4518,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 12:37:18 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114477,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 12:37:18 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5623126,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 12:37:18 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 12:37:18 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 12:37:18 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 12:37:18 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/json","size":613890,"url":"/models/rvm.json","remote":"::1"} -2022-10-02 12:37:18 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 12:37:18 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":3739355,"url":"/models/rvm.bin","remote":"::1"} -2022-10-02 12:38:07 INFO:  Watch: {"event":"modify","input":"src/segmentation/rvm.ts"} -2022-10-02 12:38:07 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 12:38:07 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673314,"outputBytes":500449} -2022-10-02 12:38:07 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 12:38:07 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673334,"outputBytes":500465} -2022-10-02 12:38:07 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 12:38:07 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673421,"outputBytes":500556} -2022-10-02 12:38:07 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 12:38:07 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 12:38:07 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":673072,"outputBytes":502903} -2022-10-02 12:38:07 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 12:38:07 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490541,"outputBytes":1693382} -2022-10-02 12:38:08 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490541,"outputBytes":3114380} -2022-10-02 12:38:08 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 12:38:08 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 12:38:11 INFO:  Watch: {"event":"modify","input":"src/segmentation/rvm.ts"} -2022-10-02 12:38:11 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 12:38:11 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673306,"outputBytes":500441} -2022-10-02 12:38:11 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 12:38:11 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673326,"outputBytes":500457} -2022-10-02 12:38:11 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 12:38:12 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673413,"outputBytes":500548} -2022-10-02 12:38:12 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 12:38:12 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 12:38:12 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":673064,"outputBytes":502895} -2022-10-02 12:38:12 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 12:38:12 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490533,"outputBytes":1693375} -2022-10-02 12:38:12 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490533,"outputBytes":3114372} -2022-10-02 12:38:12 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 12:38:12 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 12:38:14 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 12:38:14 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4518,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 12:38:14 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114372,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 12:38:14 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5622979,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 12:38:14 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 12:38:14 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 12:38:14 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 12:38:14 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 12:38:49 INFO:  Watch: {"event":"modify","input":"src/models.ts"} -2022-10-02 12:38:49 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 12:38:49 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673228,"outputBytes":500363} -2022-10-02 12:38:49 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 12:38:49 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673248,"outputBytes":500379} -2022-10-02 12:38:49 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 12:38:49 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673335,"outputBytes":500470} -2022-10-02 12:38:49 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 12:38:49 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 12:38:49 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":672986,"outputBytes":502817} -2022-10-02 12:38:50 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 12:38:50 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490455,"outputBytes":1693311} -2022-10-02 12:38:50 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490455,"outputBytes":3114294} -2022-10-02 12:38:50 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 12:38:50 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 12:39:23 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 12:39:23 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4532,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 12:39:23 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114294,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 12:39:23 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5622842,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 12:39:23 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 12:39:23 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 12:39:23 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 12:39:23 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 12:40:28 INFO:  Watch: {"event":"modify","input":"src/models.ts"} -2022-10-02 12:40:28 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 12:40:28 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673164,"outputBytes":500333} -2022-10-02 12:40:28 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 12:40:28 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673184,"outputBytes":500349} -2022-10-02 12:40:28 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 12:40:28 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673271,"outputBytes":500440} -2022-10-02 12:40:28 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 12:40:28 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 12:40:28 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":672922,"outputBytes":502787} -2022-10-02 12:40:28 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 12:40:28 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490391,"outputBytes":1693287} -2022-10-02 12:40:28 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490391,"outputBytes":3114264} -2022-10-02 12:40:28 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 12:40:28 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 12:41:26 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 12:41:26 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4532,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 12:41:26 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114264,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 12:41:26 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5622758,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 12:41:26 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 12:41:26 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 12:41:26 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 12:41:26 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 12:42:50 INFO:  Watch: {"event":"modify","input":"src/warmup.ts"} -2022-10-02 12:42:50 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 12:42:50 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673191,"outputBytes":500369} -2022-10-02 12:42:50 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 12:42:50 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673211,"outputBytes":500385} -2022-10-02 12:42:50 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 12:42:50 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673298,"outputBytes":500476} -2022-10-02 12:42:50 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 12:42:50 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 12:42:50 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":672949,"outputBytes":502823} -2022-10-02 12:42:50 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 12:42:50 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490418,"outputBytes":1693303} -2022-10-02 12:42:50 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490418,"outputBytes":3114300} -2022-10-02 12:42:50 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 12:42:50 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 12:43:02 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 12:43:02 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4532,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 12:43:02 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114300,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 12:43:02 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5622806,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 12:43:02 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 12:43:02 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 12:43:02 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 12:43:02 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 12:43:47 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 12:43:47 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4535,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 12:43:47 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114300,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 12:43:47 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 12:43:47 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 12:43:47 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 12:43:47 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 12:44:59 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 12:44:59 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4561,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 12:44:59 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114300,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 12:44:59 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 12:44:59 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 12:44:59 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 12:44:59 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 12:48:41 INFO:  Watch: {"event":"modify","input":"src/segmentation/rvm.ts"} -2022-10-02 12:48:41 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 12:48:41 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673234,"outputBytes":500413} -2022-10-02 12:48:41 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 12:48:41 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673254,"outputBytes":500429} -2022-10-02 12:48:41 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 12:48:41 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673341,"outputBytes":500520} -2022-10-02 12:48:41 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 12:48:41 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 12:48:41 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":672992,"outputBytes":502867} -2022-10-02 12:48:41 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 12:48:41 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490461,"outputBytes":1693334} -2022-10-02 12:48:41 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490461,"outputBytes":3114344} -2022-10-02 12:48:41 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 12:48:41 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 12:48:43 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 12:48:43 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4610,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 12:48:43 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114344,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 12:48:43 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5622882,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 12:48:43 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 12:48:43 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 12:48:43 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 12:48:43 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 12:49:13 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 12:49:13 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4610,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 12:49:13 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114344,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 12:49:13 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 12:49:13 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 12:49:13 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 12:49:13 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 12:49:58 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 12:49:58 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4610,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 12:49:58 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114344,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 12:49:58 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 12:49:58 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 12:49:58 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 12:49:58 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 12:50:21 INFO:  Watch: {"event":"modify","input":"src/segmentation/rvm.ts"} -2022-10-02 12:50:21 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 12:50:21 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673191,"outputBytes":500369} -2022-10-02 12:50:21 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 12:50:21 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673211,"outputBytes":500385} -2022-10-02 12:50:21 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 12:50:21 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673298,"outputBytes":500476} -2022-10-02 12:50:21 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 12:50:21 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 12:50:21 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":672949,"outputBytes":502823} -2022-10-02 12:50:21 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 12:50:22 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490418,"outputBytes":1693303} -2022-10-02 12:50:22 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490418,"outputBytes":3114300} -2022-10-02 12:50:22 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 12:50:22 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 12:50:36 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 12:50:36 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4636,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 12:50:36 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114300,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 12:50:36 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 12:50:36 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 12:50:36 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 12:50:36 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 12:51:34 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 12:51:34 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4639,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 12:51:34 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114300,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 12:51:34 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 12:51:34 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 12:51:34 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 12:51:34 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 12:52:08 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 12:52:08 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4640,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 12:52:08 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114300,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 12:52:08 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 12:52:08 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 12:52:08 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 12:52:08 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 12:52:46 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 12:52:46 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4628,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 12:52:46 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114300,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 12:52:47 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 12:52:47 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 12:52:47 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 12:52:47 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 12:53:43 INFO:  Watch: {"event":"modify","input":"src/segmentation/rvm.ts"} -2022-10-02 12:53:43 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 12:53:43 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673206,"outputBytes":500384} -2022-10-02 12:53:43 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 12:53:43 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673226,"outputBytes":500400} -2022-10-02 12:53:43 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 12:53:43 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673313,"outputBytes":500491} -2022-10-02 12:53:43 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 12:53:43 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 12:53:43 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":672964,"outputBytes":502838} -2022-10-02 12:53:44 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 12:53:44 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490433,"outputBytes":1693314} -2022-10-02 12:53:44 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490433,"outputBytes":3114315} -2022-10-02 12:53:44 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 12:53:44 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 12:53:58 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 12:53:58 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4610,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 12:53:58 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114315,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 12:53:58 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5622837,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 12:53:58 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 12:53:58 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 12:53:58 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 12:53:58 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 12:54:24 INFO:  Watch: {"event":"modify","input":"src/segmentation/rvm.ts"} -2022-10-02 12:54:24 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 12:54:24 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673237,"outputBytes":500415} -2022-10-02 12:54:24 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 12:54:24 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673257,"outputBytes":500431} -2022-10-02 12:54:24 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 12:54:24 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673344,"outputBytes":500522} -2022-10-02 12:54:24 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 12:54:24 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 12:54:24 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":672995,"outputBytes":502869} -2022-10-02 12:54:24 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 12:54:24 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490464,"outputBytes":1693344} -2022-10-02 12:54:24 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490464,"outputBytes":3114346} -2022-10-02 12:54:24 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 12:54:24 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 12:54:27 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 12:54:27 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4610,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 12:54:27 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114346,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 12:54:27 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5622896,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 12:54:27 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 12:54:27 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 12:54:27 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 12:54:27 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 12:54:45 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":1953,"url":"/demo/typescript/index.html","remote":"::1"} -2022-10-02 12:54:45 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3814,"url":"/demo/typescript/index.js","remote":"::1"} -2022-10-02 12:54:45 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"font/woff2","size":181500,"url":"/assets/lato-light.woff2","remote":"::1"} -2022-10-02 12:54:45 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114346,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 12:54:45 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 12:54:45 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 12:55:03 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 12:55:03 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4610,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 12:55:03 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114346,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 12:55:03 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 12:55:03 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 12:55:03 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 12:55:21 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 12:55:21 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4610,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 12:55:21 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114346,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 12:55:22 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 12:55:22 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 12:55:22 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 12:55:22 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 12:55:59 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 12:55:59 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4610,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 12:55:59 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114346,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 12:55:59 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 12:55:59 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 12:55:59 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 12:55:59 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 12:55:59 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/json","size":613890,"url":"/models/rvm.json","remote":"::1"} -2022-10-02 12:55:59 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":3739355,"url":"/models/rvm.bin","remote":"::1"} -2022-10-02 12:56:16 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 12:56:16 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5622896,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 12:56:53 INFO:  Watch: {"event":"modify","input":"src/segmentation/rvm.ts"} -2022-10-02 12:56:53 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 12:56:53 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673191,"outputBytes":500369} -2022-10-02 12:56:53 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 12:56:53 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673211,"outputBytes":500385} -2022-10-02 12:56:53 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 12:56:53 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673298,"outputBytes":500476} -2022-10-02 12:56:53 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 12:56:53 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 12:56:53 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":672949,"outputBytes":502823} -2022-10-02 12:56:53 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 12:56:53 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490418,"outputBytes":1693303} -2022-10-02 12:56:53 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490418,"outputBytes":3114300} -2022-10-02 12:56:53 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 12:56:53 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 12:57:22 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 12:57:22 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4613,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 12:57:22 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114300,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 12:57:22 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5622806,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 12:57:22 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 12:57:22 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 12:57:22 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 12:57:22 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 12:58:04 INFO:  Watch: {"event":"modify","input":"src/segmentation/selfie.ts"} -2022-10-02 12:58:04 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 12:58:04 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673213,"outputBytes":500392} -2022-10-02 12:58:04 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 12:58:04 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673233,"outputBytes":500408} -2022-10-02 12:58:04 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 12:58:04 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673320,"outputBytes":500499} -2022-10-02 12:58:04 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 12:58:04 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 12:58:04 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":672971,"outputBytes":502846} -2022-10-02 12:58:04 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 12:58:04 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490440,"outputBytes":1693322} -2022-10-02 12:58:05 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490440,"outputBytes":3114323} -2022-10-02 12:58:05 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 12:58:05 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 12:58:20 INFO:  Watch: {"event":"modify","input":"src/segmentation/selfie.ts"} -2022-10-02 12:58:20 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 12:58:20 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673223,"outputBytes":500403} -2022-10-02 12:58:20 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 12:58:20 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673243,"outputBytes":500419} -2022-10-02 12:58:20 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 12:58:20 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673330,"outputBytes":500510} -2022-10-02 12:58:20 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 12:58:20 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 12:58:20 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":672981,"outputBytes":502857} -2022-10-02 12:58:20 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 12:58:20 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490450,"outputBytes":1693331} -2022-10-02 12:58:20 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490450,"outputBytes":3114334} -2022-10-02 12:58:20 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 12:58:20 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 12:59:15 INFO:  Watch: {"event":"modify","input":"src/segmentation/rvm.ts"} -2022-10-02 12:59:15 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 12:59:15 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673282,"outputBytes":500415} -2022-10-02 12:59:15 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 12:59:15 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673302,"outputBytes":500431} -2022-10-02 12:59:15 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 12:59:15 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673389,"outputBytes":500522} -2022-10-02 12:59:15 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 12:59:15 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 12:59:15 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":673040,"outputBytes":502869} -2022-10-02 12:59:15 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 12:59:16 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490509,"outputBytes":1693336} -2022-10-02 12:59:16 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490509,"outputBytes":3114346} -2022-10-02 12:59:16 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 12:59:16 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 12:59:22 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 12:59:22 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4613,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 12:59:22 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114346,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 12:59:22 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5622942,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 12:59:22 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 12:59:22 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 12:59:22 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 12:59:22 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 13:00:59 INFO:  Watch: {"event":"modify","input":"src/segmentation/meet.ts"} -2022-10-02 13:00:59 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:00:59 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673676,"outputBytes":500645} -2022-10-02 13:00:59 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:00:59 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673696,"outputBytes":500661} -2022-10-02 13:00:59 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:00:59 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673783,"outputBytes":500752} -2022-10-02 13:00:59 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:00:59 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:00:59 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":673434,"outputBytes":503159} -2022-10-02 13:00:59 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:01:00 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490903,"outputBytes":1693462} -2022-10-02 13:01:00 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490903,"outputBytes":3114551} -2022-10-02 13:01:00 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:01:00 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:01:00 INFO:  Watch: {"event":"modify","input":"src/segmentation/selfie.ts","skip":true} -2022-10-02 13:01:11 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 13:01:11 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4613,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 13:01:11 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114551,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 13:01:11 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5623625,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 13:01:11 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 13:01:11 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 13:01:11 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 13:01:11 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 13:01:30 INFO:  Watch: {"event":"modify","input":"src/segmentation/selfie.ts"} -2022-10-02 13:01:30 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:01:30 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673250,"outputBytes":500381} -2022-10-02 13:01:30 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:01:30 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673270,"outputBytes":500397} -2022-10-02 13:01:30 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:01:30 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673357,"outputBytes":500488} -2022-10-02 13:01:30 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:01:30 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:01:30 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":673008,"outputBytes":502835} -2022-10-02 13:01:30 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:01:30 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490477,"outputBytes":1693308} -2022-10-02 13:01:30 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490477,"outputBytes":3114312} -2022-10-02 13:01:30 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:01:30 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:01:48 INFO:  Watch: {"event":"modify","input":"src/segmentation/selfie.ts"} -2022-10-02 13:01:48 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:01:48 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673250,"outputBytes":500381} -2022-10-02 13:01:48 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:01:48 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673270,"outputBytes":500397} -2022-10-02 13:01:48 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:01:48 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673357,"outputBytes":500488} -2022-10-02 13:01:48 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:01:48 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:01:48 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":673008,"outputBytes":502835} -2022-10-02 13:01:48 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:01:48 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490477,"outputBytes":1693308} -2022-10-02 13:01:49 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490477,"outputBytes":3114312} -2022-10-02 13:01:49 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:01:49 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:01:51 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 13:01:51 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4613,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 13:01:51 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114312,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 13:01:51 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5622871,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 13:01:52 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 13:01:52 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 13:01:52 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 13:01:52 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 13:02:26 INFO:  Watch: {"event":"modify","input":"src/segmentation/selfie.ts"} -2022-10-02 13:02:26 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:02:26 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673311,"outputBytes":500448} -2022-10-02 13:02:26 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:02:26 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673331,"outputBytes":500464} -2022-10-02 13:02:26 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:02:26 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673418,"outputBytes":500555} -2022-10-02 13:02:26 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:02:26 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:02:26 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":673069,"outputBytes":502914} -2022-10-02 13:02:26 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:02:26 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490538,"outputBytes":1693352} -2022-10-02 13:02:26 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490538,"outputBytes":3114374} -2022-10-02 13:02:26 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:02:26 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:02:28 INFO:  Watch: {"event":"modify","input":"src/segmentation/meet.ts"} -2022-10-02 13:02:28 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:02:28 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673372,"outputBytes":500515} -2022-10-02 13:02:28 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:02:28 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673392,"outputBytes":500531} -2022-10-02 13:02:28 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:02:28 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673479,"outputBytes":500622} -2022-10-02 13:02:28 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:02:28 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:02:28 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":673130,"outputBytes":502993} -2022-10-02 13:02:29 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:02:29 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490599,"outputBytes":1693428} -2022-10-02 13:02:29 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490599,"outputBytes":3114436} -2022-10-02 13:02:29 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:02:29 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:03:56 INFO:  Watch: {"event":"modify","input":"src/segmentation/selfie.ts"} -2022-10-02 13:03:56 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:03:56 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673393,"outputBytes":500536} -2022-10-02 13:03:56 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:03:56 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673413,"outputBytes":500552} -2022-10-02 13:03:56 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:03:56 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673500,"outputBytes":500643} -2022-10-02 13:03:56 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:03:56 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:03:56 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":673151,"outputBytes":503014} -2022-10-02 13:03:56 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:03:56 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490620,"outputBytes":1693443} -2022-10-02 13:03:56 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490620,"outputBytes":3114457} -2022-10-02 13:03:56 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:03:56 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:03:57 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 13:03:57 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4613,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 13:03:57 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114457,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 13:03:57 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5623188,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 13:03:57 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 13:03:57 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 13:03:57 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 13:03:57 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 13:04:23 INFO:  Watch: {"event":"modify","input":"src/segmentation/selfie.ts"} -2022-10-02 13:04:23 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:04:23 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673412,"outputBytes":500555} -2022-10-02 13:04:23 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:04:23 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673432,"outputBytes":500571} -2022-10-02 13:04:23 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:04:23 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673519,"outputBytes":500662} -2022-10-02 13:04:23 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:04:23 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:04:23 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":673170,"outputBytes":503033} -2022-10-02 13:04:23 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:04:23 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490639,"outputBytes":1693457} -2022-10-02 13:04:24 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490639,"outputBytes":3114477} -2022-10-02 13:04:24 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:04:24 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:04:24 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 13:04:24 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4613,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 13:04:24 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114477,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 13:04:24 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5623223,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 13:04:25 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 13:04:25 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 13:04:25 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 13:04:25 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 13:05:53 INFO:  Watch: {"event":"modify","input":"src/segmentation/selfie.ts"} -2022-10-02 13:05:53 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:05:53 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673460,"outputBytes":500608} -2022-10-02 13:05:53 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:05:53 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673480,"outputBytes":500624} -2022-10-02 13:05:53 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:05:53 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673567,"outputBytes":500715} -2022-10-02 13:05:53 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:05:53 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:05:53 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":673218,"outputBytes":503098} -2022-10-02 13:05:53 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:05:54 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490687,"outputBytes":1693491} -2022-10-02 13:05:54 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490687,"outputBytes":3114525} -2022-10-02 13:05:54 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:05:54 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:05:55 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 13:05:55 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4613,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 13:05:55 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114525,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 13:05:55 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5623336,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 13:05:55 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 13:05:55 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 13:05:55 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 13:05:55 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 13:06:23 INFO:  Watch: {"event":"modify","input":"src/segmentation/selfie.ts"} -2022-10-02 13:06:23 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:06:23 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673506,"outputBytes":500656} -2022-10-02 13:06:23 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:06:23 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673526,"outputBytes":500672} -2022-10-02 13:06:23 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:06:23 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673613,"outputBytes":500763} -2022-10-02 13:06:23 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:06:23 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:06:23 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":673264,"outputBytes":503146} -2022-10-02 13:06:23 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:06:23 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490733,"outputBytes":1693533} -2022-10-02 13:06:24 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490733,"outputBytes":3114573} -2022-10-02 13:06:24 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:06:24 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:06:27 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 13:06:27 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4613,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 13:06:27 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114573,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 13:06:27 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5623431,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 13:06:27 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 13:06:27 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 13:06:27 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 13:06:27 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 13:06:45 INFO:  Watch: {"event":"modify","input":"src/segmentation/selfie.ts"} -2022-10-02 13:06:45 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:06:45 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673500,"outputBytes":500648} -2022-10-02 13:06:45 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:06:45 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673520,"outputBytes":500664} -2022-10-02 13:06:45 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:06:45 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673607,"outputBytes":500755} -2022-10-02 13:06:45 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:06:45 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:06:45 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":673258,"outputBytes":503138} -2022-10-02 13:06:45 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:06:45 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490727,"outputBytes":1693519} -2022-10-02 13:06:46 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490727,"outputBytes":3114567} -2022-10-02 13:06:46 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:06:46 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:06:46 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 13:06:46 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4613,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 13:06:46 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114567,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 13:06:47 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5623415,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 13:06:47 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 13:06:47 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 13:06:47 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 13:06:47 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 13:07:34 INFO:  Watch: {"event":"modify","input":"src/segmentation/selfie.ts"} -2022-10-02 13:07:34 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:07:34 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673535,"outputBytes":500688} -2022-10-02 13:07:34 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:07:34 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673555,"outputBytes":500704} -2022-10-02 13:07:34 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:07:34 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673642,"outputBytes":500795} -2022-10-02 13:07:34 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:07:34 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:07:35 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":673293,"outputBytes":503190} -2022-10-02 13:07:35 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:07:35 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490762,"outputBytes":1693545} -2022-10-02 13:07:35 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490762,"outputBytes":3114601} -2022-10-02 13:07:35 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:07:35 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:07:42 INFO:  Watch: {"event":"modify","input":"src/segmentation/selfie.ts"} -2022-10-02 13:07:42 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:07:42 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673522,"outputBytes":500675} -2022-10-02 13:07:42 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:07:42 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673542,"outputBytes":500691} -2022-10-02 13:07:42 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:07:42 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673629,"outputBytes":500782} -2022-10-02 13:07:42 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:07:42 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:07:42 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":673280,"outputBytes":503177} -2022-10-02 13:07:42 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:07:42 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490749,"outputBytes":1693537} -2022-10-02 13:07:42 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490749,"outputBytes":3114587} -2022-10-02 13:07:42 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:07:43 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:07:46 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 13:07:46 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4613,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 13:07:46 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114587,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 13:07:46 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5623470,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 13:07:46 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 13:07:46 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 13:07:46 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 13:07:46 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 13:08:13 INFO:  Watch: {"event":"modify","input":"src/segmentation/selfie.ts"} -2022-10-02 13:08:13 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:08:13 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673522,"outputBytes":500675} -2022-10-02 13:08:13 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:08:13 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673542,"outputBytes":500691} -2022-10-02 13:08:13 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:08:13 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673629,"outputBytes":500782} -2022-10-02 13:08:13 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:08:13 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:08:13 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":673280,"outputBytes":503177} -2022-10-02 13:08:13 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:08:13 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490749,"outputBytes":1693537} -2022-10-02 13:08:13 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490749,"outputBytes":3114587} -2022-10-02 13:08:13 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:08:13 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:08:14 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 13:08:14 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4613,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 13:08:14 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114587,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 13:08:15 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5623470,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 13:08:15 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 13:08:15 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 13:08:15 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 13:08:15 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 13:08:45 INFO:  Watch: {"event":"modify","input":"src/segmentation/selfie.ts"} -2022-10-02 13:08:45 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:08:45 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673522,"outputBytes":500675} -2022-10-02 13:08:45 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:08:45 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673542,"outputBytes":500691} -2022-10-02 13:08:45 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:08:45 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673629,"outputBytes":500782} -2022-10-02 13:08:45 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:08:45 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:08:45 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":673280,"outputBytes":503177} -2022-10-02 13:08:45 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:08:45 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490749,"outputBytes":1693537} -2022-10-02 13:08:46 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490749,"outputBytes":3114587} -2022-10-02 13:08:46 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:08:46 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:08:55 INFO:  Watch: {"event":"modify","input":"src/segmentation/selfie.ts"} -2022-10-02 13:08:55 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:08:55 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673545,"outputBytes":500700} -2022-10-02 13:08:55 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:08:55 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673565,"outputBytes":500716} -2022-10-02 13:08:55 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:08:55 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673652,"outputBytes":500807} -2022-10-02 13:08:55 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:08:55 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:08:55 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":673303,"outputBytes":503202} -2022-10-02 13:08:55 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:08:55 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490772,"outputBytes":1693556} -2022-10-02 13:08:55 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490772,"outputBytes":3114612} -2022-10-02 13:08:55 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:08:55 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:09:11 INFO:  Watch: {"event":"modify","input":"src/segmentation/selfie.ts"} -2022-10-02 13:09:11 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:09:11 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673545,"outputBytes":500700} -2022-10-02 13:09:11 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:09:11 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673565,"outputBytes":500716} -2022-10-02 13:09:11 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:09:11 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673652,"outputBytes":500807} -2022-10-02 13:09:11 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:09:11 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:09:11 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":673303,"outputBytes":503202} -2022-10-02 13:09:11 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:09:12 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490772,"outputBytes":1693556} -2022-10-02 13:09:12 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490772,"outputBytes":3114612} -2022-10-02 13:09:12 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:09:12 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:09:21 INFO:  Watch: {"event":"modify","input":"src/segmentation/selfie.ts"} -2022-10-02 13:09:21 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:09:21 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673545,"outputBytes":500700} -2022-10-02 13:09:21 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:09:21 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673565,"outputBytes":500716} -2022-10-02 13:09:21 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:09:21 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673652,"outputBytes":500807} -2022-10-02 13:09:21 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:09:21 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:09:21 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":673303,"outputBytes":503202} -2022-10-02 13:09:21 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:09:21 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490772,"outputBytes":1693556} -2022-10-02 13:09:21 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490772,"outputBytes":3114612} -2022-10-02 13:09:21 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:09:21 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:09:23 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 13:09:23 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4613,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 13:09:23 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114612,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 13:09:23 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5623514,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 13:09:23 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 13:09:23 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 13:09:23 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 13:09:23 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 13:10:22 INFO:  Watch: {"event":"modify","input":"src/segmentation/selfie.ts"} -2022-10-02 13:10:22 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:10:22 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673586,"outputBytes":500745} -2022-10-02 13:10:22 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:10:22 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673606,"outputBytes":500761} -2022-10-02 13:10:22 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:10:22 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673693,"outputBytes":500852} -2022-10-02 13:10:22 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:10:22 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:10:22 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":673344,"outputBytes":503259} -2022-10-02 13:10:22 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:10:22 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490813,"outputBytes":1693586} -2022-10-02 13:10:22 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490813,"outputBytes":3114652} -2022-10-02 13:10:22 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:10:22 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:10:32 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 13:10:32 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4613,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 13:10:32 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114652,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 13:10:32 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5623599,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 13:10:32 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 13:10:32 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 13:10:32 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 13:10:32 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 13:11:18 INFO:  Watch: {"event":"modify","input":"src/segmentation/selfie.ts"} -2022-10-02 13:11:18 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:11:18 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673628,"outputBytes":500791} -2022-10-02 13:11:18 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:11:18 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673648,"outputBytes":500807} -2022-10-02 13:11:18 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:11:18 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673735,"outputBytes":500898} -2022-10-02 13:11:18 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:11:18 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:11:18 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":673386,"outputBytes":503317} -2022-10-02 13:11:18 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:11:18 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490855,"outputBytes":1693610} -2022-10-02 13:11:18 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490855,"outputBytes":3114693} -2022-10-02 13:11:18 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:11:18 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:11:24 INFO:  Watch: {"event":"modify","input":"src/segmentation/selfie.ts"} -2022-10-02 13:11:24 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:11:24 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673533,"outputBytes":500692} -2022-10-02 13:11:24 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:11:24 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673553,"outputBytes":500708} -2022-10-02 13:11:24 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:11:24 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673640,"outputBytes":500799} -2022-10-02 13:11:24 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:11:24 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:11:24 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":673291,"outputBytes":503218} -2022-10-02 13:11:24 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:11:24 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3490760,"outputBytes":1693529} -2022-10-02 13:11:25 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3490760,"outputBytes":3114594} -2022-10-02 13:11:25 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:11:25 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:11:26 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 13:11:26 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4613,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 13:11:26 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114594,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 13:11:26 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5623498,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 13:11:26 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 13:11:26 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 13:11:26 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 13:11:26 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 13:14:37 INFO:  Watch: {"event":"modify","input":"src/segmentation/selfie.ts"} -2022-10-02 13:14:37 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:14:37 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673836,"outputBytes":500926} -2022-10-02 13:14:37 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:14:37 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673856,"outputBytes":500942} -2022-10-02 13:14:37 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:14:37 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673943,"outputBytes":501033} -2022-10-02 13:14:37 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:14:37 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:14:37 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":673594,"outputBytes":503476} -2022-10-02 13:14:37 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:14:37 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3491063,"outputBytes":1693646} -2022-10-02 13:14:37 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3491063,"outputBytes":3114818} -2022-10-02 13:14:37 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:14:37 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:14:49 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 13:14:49 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4613,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 13:14:49 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114818,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 13:14:49 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5623966,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 13:14:50 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 13:14:50 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 13:14:50 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 13:14:50 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 13:15:35 INFO:  Watch: {"event":"modify","input":"src/segmentation/selfie.ts"} -2022-10-02 13:15:35 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:15:35 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":673823,"outputBytes":500913} -2022-10-02 13:15:35 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:15:35 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":673843,"outputBytes":500929} -2022-10-02 13:15:35 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:15:35 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":673930,"outputBytes":501020} -2022-10-02 13:15:35 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:15:35 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:15:35 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":673581,"outputBytes":503463} -2022-10-02 13:15:35 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:15:36 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3491050,"outputBytes":1693644} -2022-10-02 13:15:36 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3491050,"outputBytes":3114805} -2022-10-02 13:15:36 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:15:36 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:15:47 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 13:15:47 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4613,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 13:15:47 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114805,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 13:15:47 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5623948,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 13:15:47 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 13:15:47 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 13:15:47 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 13:15:47 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 13:16:22 INFO:  Watch: {"event":"modify","input":"src/segmentation/selfie.ts"} -2022-10-02 13:16:22 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:16:22 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669447,"outputBytes":500913} -2022-10-02 13:16:22 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:16:22 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669467,"outputBytes":500929} -2022-10-02 13:16:22 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:16:22 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669554,"outputBytes":501020} -2022-10-02 13:16:22 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:16:22 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:16:22 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669205,"outputBytes":503463} -2022-10-02 13:16:22 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:16:23 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486674,"outputBytes":1693644} -2022-10-02 13:16:23 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486674,"outputBytes":3114805} -2022-10-02 13:16:23 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:16:23 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:16:49 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 13:16:49 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4611,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 13:16:49 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114805,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 13:16:49 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5619498,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 13:16:49 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 13:16:49 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 13:16:49 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 13:16:49 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 13:16:49 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/models/meet.json","remote":"::1"} -2022-10-02 13:17:10 INFO:  @vladmandic/human version 2.11.0 -2022-10-02 13:17:10 INFO:  User: vlado Platform: linux Arch: x64 Node: v18.10.0 -2022-10-02 13:17:10 INFO:  Application: {"name":"@vladmandic/human","version":"2.11.0"} -2022-10-02 13:17:10 INFO:  Environment: {"profile":"development","config":".build.json","package":"package.json","tsconfig":true,"eslintrc":true,"git":true} -2022-10-02 13:17:10 INFO:  Toolchain: {"build":"0.7.14","esbuild":"0.15.10","typescript":"4.8.4","typedoc":"0.23.15","eslint":"8.24.0"} -2022-10-02 13:17:10 INFO:  Build: {"profile":"development","steps":["serve","watch","compile"]} -2022-10-02 13:17:10 STATE: WebServer: {"ssl":false,"port":10030,"root":"."} -2022-10-02 13:17:10 STATE: WebServer: {"ssl":true,"port":10031,"root":".","sslKey":"node_modules/@vladmandic/build/cert/https.key","sslCrt":"node_modules/@vladmandic/build/cert/https.crt"} -2022-10-02 13:17:10 STATE: Watch: {"locations":["src/**/*","tfjs/**/*","demo/**/*.ts"]} -2022-10-02 13:17:10 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:17:10 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669447,"outputBytes":500913} -2022-10-02 13:17:10 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:17:10 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669467,"outputBytes":500929} -2022-10-02 13:17:10 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:17:10 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669554,"outputBytes":501020} -2022-10-02 13:17:10 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:17:10 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:17:10 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669205,"outputBytes":503463} -2022-10-02 13:17:10 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:17:10 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486674,"outputBytes":1693644} -2022-10-02 13:17:10 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486674,"outputBytes":3114805} -2022-10-02 13:17:10 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:17:10 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:17:10 INFO:  Listening... -2022-10-02 13:17:12 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 13:17:12 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4611,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 13:17:12 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114805,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 13:17:12 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5619498,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 13:17:12 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 13:17:12 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 13:17:12 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 13:17:12 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/json","size":95501,"url":"/models/meet.json","remote":"::1"} -2022-10-02 13:17:12 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 13:17:12 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/models/meet.bin","remote":"::1"} -2022-10-02 13:17:23 INFO:  @vladmandic/human version 2.11.0 -2022-10-02 13:17:23 INFO:  User: vlado Platform: linux Arch: x64 Node: v18.10.0 -2022-10-02 13:17:23 INFO:  Application: {"name":"@vladmandic/human","version":"2.11.0"} -2022-10-02 13:17:23 INFO:  Environment: {"profile":"development","config":".build.json","package":"package.json","tsconfig":true,"eslintrc":true,"git":true} -2022-10-02 13:17:23 INFO:  Toolchain: {"build":"0.7.14","esbuild":"0.15.10","typescript":"4.8.4","typedoc":"0.23.15","eslint":"8.24.0"} -2022-10-02 13:17:23 INFO:  Build: {"profile":"development","steps":["serve","watch","compile"]} -2022-10-02 13:17:23 STATE: WebServer: {"ssl":false,"port":10030,"root":"."} -2022-10-02 13:17:23 STATE: WebServer: {"ssl":true,"port":10031,"root":".","sslKey":"node_modules/@vladmandic/build/cert/https.key","sslCrt":"node_modules/@vladmandic/build/cert/https.crt"} -2022-10-02 13:17:23 STATE: Watch: {"locations":["src/**/*","tfjs/**/*","demo/**/*.ts"]} -2022-10-02 13:17:23 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:17:23 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669447,"outputBytes":500913} -2022-10-02 13:17:23 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:17:23 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669467,"outputBytes":500929} -2022-10-02 13:17:23 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:17:23 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669554,"outputBytes":501020} -2022-10-02 13:17:23 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:17:23 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:17:23 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669205,"outputBytes":503463} -2022-10-02 13:17:24 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:17:24 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486674,"outputBytes":1693644} -2022-10-02 13:17:24 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486674,"outputBytes":3114805} -2022-10-02 13:17:24 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:17:24 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:17:24 INFO:  Listening... -2022-10-02 13:17:25 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 13:17:25 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4611,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 13:17:25 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114805,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 13:17:25 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5619498,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 13:17:25 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 13:17:25 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 13:17:25 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 13:17:25 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/json","size":95501,"url":"/models/meet.json","remote":"::1"} -2022-10-02 13:17:25 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 13:17:25 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":372228,"url":"/models/meet.bin","remote":"::1"} -2022-10-02 13:18:00 INFO:  Watch: {"event":"modify","input":"src/segmentation/meet.ts"} -2022-10-02 13:18:00 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:18:01 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669475,"outputBytes":500942} -2022-10-02 13:18:01 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:18:01 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669495,"outputBytes":500958} -2022-10-02 13:18:01 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:18:01 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669582,"outputBytes":501049} -2022-10-02 13:18:01 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:18:01 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:18:01 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669233,"outputBytes":503492} -2022-10-02 13:18:01 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:18:01 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486702,"outputBytes":1693669} -2022-10-02 13:18:01 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486702,"outputBytes":3114834} -2022-10-02 13:18:01 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:18:01 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:18:03 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 13:18:03 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4611,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 13:18:03 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114834,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 13:18:03 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5619559,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 13:18:03 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 13:18:03 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 13:18:03 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 13:18:03 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 13:18:57 INFO:  Watch: {"event":"modify","input":"src/segmentation/meet.ts"} -2022-10-02 13:18:57 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:18:57 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669489,"outputBytes":500913} -2022-10-02 13:18:57 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:18:57 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669509,"outputBytes":500929} -2022-10-02 13:18:57 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:18:57 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669596,"outputBytes":501020} -2022-10-02 13:18:57 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:18:57 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:18:57 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669247,"outputBytes":503451} -2022-10-02 13:18:57 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:18:57 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486716,"outputBytes":1693655} -2022-10-02 13:18:57 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486716,"outputBytes":3114810} -2022-10-02 13:18:57 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:18:57 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:19:20 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 13:19:20 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4611,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 13:19:20 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114810,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 13:19:21 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5619551,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 13:19:21 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 13:19:21 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 13:19:21 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 13:19:21 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 13:19:32 INFO:  Watch: {"event":"modify","input":"src/segmentation/meet.ts"} -2022-10-02 13:19:32 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:19:32 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669489,"outputBytes":500913} -2022-10-02 13:19:32 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:19:32 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669509,"outputBytes":500929} -2022-10-02 13:19:32 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:19:32 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669596,"outputBytes":501020} -2022-10-02 13:19:32 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:19:32 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:19:32 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669247,"outputBytes":503451} -2022-10-02 13:19:32 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:19:32 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486716,"outputBytes":1693655} -2022-10-02 13:19:32 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486716,"outputBytes":3114810} -2022-10-02 13:19:32 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:19:32 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:19:33 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 13:19:33 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4611,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 13:19:33 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114810,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 13:19:33 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5619551,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 13:19:33 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 13:19:33 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 13:19:33 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 13:19:33 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 13:20:54 INFO:  Watch: {"event":"modify","input":"src/segmentation/meet.ts"} -2022-10-02 13:20:54 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:20:54 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669541,"outputBytes":500768} -2022-10-02 13:20:54 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:20:54 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669561,"outputBytes":500784} -2022-10-02 13:20:54 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:20:54 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669648,"outputBytes":500875} -2022-10-02 13:20:54 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:20:54 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:20:54 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669299,"outputBytes":503270} -2022-10-02 13:20:54 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:20:54 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486768,"outputBytes":1693572} -2022-10-02 13:20:55 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486768,"outputBytes":3114678} -2022-10-02 13:20:55 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:20:55 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:20:59 INFO:  Watch: {"event":"modify","input":"src/segmentation/meet.ts"} -2022-10-02 13:20:59 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:20:59 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669539,"outputBytes":500768} -2022-10-02 13:20:59 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:20:59 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669559,"outputBytes":500784} -2022-10-02 13:20:59 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:20:59 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669646,"outputBytes":500875} -2022-10-02 13:20:59 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:20:59 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:20:59 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669297,"outputBytes":503270} -2022-10-02 13:20:59 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:20:59 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486766,"outputBytes":1693572} -2022-10-02 13:21:00 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486766,"outputBytes":3114678} -2022-10-02 13:21:00 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:21:00 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:21:01 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 13:21:02 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4611,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 13:21:02 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114678,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 13:21:02 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5619419,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 13:21:02 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 13:21:02 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 13:21:02 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 13:21:02 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 13:21:15 INFO:  Watch: {"event":"modify","input":"src/segmentation/meet.ts"} -2022-10-02 13:21:15 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:21:15 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669547,"outputBytes":500776} -2022-10-02 13:21:15 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:21:15 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669567,"outputBytes":500792} -2022-10-02 13:21:15 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:21:15 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669654,"outputBytes":500883} -2022-10-02 13:21:15 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:21:15 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:21:15 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669305,"outputBytes":503278} -2022-10-02 13:21:15 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:21:15 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486774,"outputBytes":1693580} -2022-10-02 13:21:15 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486774,"outputBytes":3114686} -2022-10-02 13:21:15 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:21:15 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:21:16 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 13:21:16 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4611,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 13:21:16 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114686,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 13:21:16 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5619438,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 13:21:16 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 13:21:16 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 13:21:16 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 13:21:16 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 13:21:50 INFO:  Watch: {"event":"modify","input":"src/segmentation/meet.ts"} -2022-10-02 13:21:50 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:21:50 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669557,"outputBytes":500786} -2022-10-02 13:21:50 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:21:50 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669577,"outputBytes":500802} -2022-10-02 13:21:50 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:21:50 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669664,"outputBytes":500893} -2022-10-02 13:21:50 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:21:50 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:21:50 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669315,"outputBytes":503288} -2022-10-02 13:21:50 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:21:50 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486784,"outputBytes":1693590} -2022-10-02 13:21:50 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486784,"outputBytes":3114696} -2022-10-02 13:21:50 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:21:50 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:21:53 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 13:21:53 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4611,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 13:21:53 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114696,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 13:21:53 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5619458,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 13:21:54 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 13:21:54 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 13:21:54 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 13:21:54 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 13:23:16 INFO:  Watch: {"event":"modify","input":"src/segmentation/meet.ts"} -2022-10-02 13:23:16 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:23:16 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669562,"outputBytes":500738} -2022-10-02 13:23:16 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:23:16 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669582,"outputBytes":500754} -2022-10-02 13:23:16 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:23:16 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669669,"outputBytes":500845} -2022-10-02 13:23:16 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:23:16 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:23:16 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669320,"outputBytes":503228} -2022-10-02 13:23:17 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:23:17 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486789,"outputBytes":1693563} -2022-10-02 13:23:17 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486789,"outputBytes":3114653} -2022-10-02 13:23:17 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:23:17 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:23:18 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 13:23:18 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4611,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 13:23:18 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114653,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 13:23:18 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5619415,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 13:23:18 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 13:23:18 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 13:23:18 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 13:23:18 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 13:26:27 INFO:  Watch: {"event":"modify","input":"src/segmentation/meet.ts"} -2022-10-02 13:26:27 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:26:27 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669628,"outputBytes":500812} -2022-10-02 13:26:27 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:26:27 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669648,"outputBytes":500828} -2022-10-02 13:26:27 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:26:27 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669735,"outputBytes":500919} -2022-10-02 13:26:27 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:26:27 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:26:27 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669386,"outputBytes":503326} -2022-10-02 13:26:28 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:26:28 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486855,"outputBytes":1693603} -2022-10-02 13:26:28 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486855,"outputBytes":3114717} -2022-10-02 13:26:28 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:26:28 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:26:30 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 13:26:30 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4611,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 13:26:30 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114717,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 13:26:30 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5619559,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 13:26:30 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 13:26:30 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 13:26:30 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 13:26:30 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 13:26:51 INFO:  Watch: {"event":"modify","input":"src/segmentation/meet.ts"} -2022-10-02 13:26:51 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:26:51 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669623,"outputBytes":500860} -2022-10-02 13:26:51 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:26:51 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669643,"outputBytes":500876} -2022-10-02 13:26:51 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:26:51 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669730,"outputBytes":500967} -2022-10-02 13:26:51 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:26:51 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:26:51 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669381,"outputBytes":503386} -2022-10-02 13:26:51 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:26:51 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486850,"outputBytes":1693630} -2022-10-02 13:26:51 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486850,"outputBytes":3114760} -2022-10-02 13:26:51 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:26:51 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:26:57 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 13:26:57 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4611,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 13:26:57 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114760,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 13:26:57 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5619602,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 13:26:57 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 13:26:57 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 13:26:57 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 13:26:58 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 13:27:17 INFO:  Watch: {"event":"modify","input":"src/segmentation/meet.ts"} -2022-10-02 13:27:17 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:27:17 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669623,"outputBytes":500860} -2022-10-02 13:27:17 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:27:17 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669643,"outputBytes":500876} -2022-10-02 13:27:17 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:27:17 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669730,"outputBytes":500967} -2022-10-02 13:27:17 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:27:17 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:27:17 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669381,"outputBytes":503386} -2022-10-02 13:27:17 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:27:17 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486850,"outputBytes":1693630} -2022-10-02 13:27:18 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486850,"outputBytes":3114760} -2022-10-02 13:27:18 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:27:18 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:27:22 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 13:27:22 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4611,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 13:27:22 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114760,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 13:27:22 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5619602,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 13:27:22 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 13:27:22 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 13:27:22 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 13:27:22 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 13:28:18 INFO:  Watch: {"event":"modify","input":"src/segmentation/meet.ts"} -2022-10-02 13:28:18 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:28:18 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669702,"outputBytes":500947} -2022-10-02 13:28:18 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:28:18 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669722,"outputBytes":500963} -2022-10-02 13:28:18 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:28:18 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669809,"outputBytes":501054} -2022-10-02 13:28:18 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:28:18 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:28:18 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669460,"outputBytes":503497} -2022-10-02 13:28:18 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:28:18 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486929,"outputBytes":1693680} -2022-10-02 13:28:18 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486929,"outputBytes":3114837} -2022-10-02 13:28:18 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:28:18 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:28:25 INFO:  Watch: {"event":"modify","input":"src/segmentation/meet.ts"} -2022-10-02 13:28:25 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:28:25 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669596,"outputBytes":500879} -2022-10-02 13:28:25 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:28:25 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669616,"outputBytes":500895} -2022-10-02 13:28:25 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:28:25 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669703,"outputBytes":500986} -2022-10-02 13:28:25 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:28:25 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:28:25 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669354,"outputBytes":503429} -2022-10-02 13:28:25 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:28:25 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486823,"outputBytes":1693620} -2022-10-02 13:28:25 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486823,"outputBytes":3114769} -2022-10-02 13:28:25 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:28:25 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:29:16 INFO:  Watch: {"event":"modify","input":"src/segmentation/meet.ts"} -2022-10-02 13:29:16 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:29:16 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669647,"outputBytes":500932} -2022-10-02 13:29:16 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:29:16 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669667,"outputBytes":500948} -2022-10-02 13:29:16 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:29:16 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669754,"outputBytes":501039} -2022-10-02 13:29:16 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:29:16 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:29:16 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669405,"outputBytes":503494} -2022-10-02 13:29:16 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:29:16 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486874,"outputBytes":1693655} -2022-10-02 13:29:16 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486874,"outputBytes":3114819} -2022-10-02 13:29:16 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:29:16 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:29:17 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 13:29:17 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4611,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 13:29:17 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114819,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 13:29:18 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5619690,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 13:29:18 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 13:29:18 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 13:29:18 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 13:29:18 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 13:30:11 INFO:  Watch: {"event":"modify","input":"src/segmentation/meet.ts"} -2022-10-02 13:30:11 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:30:11 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669651,"outputBytes":500936} -2022-10-02 13:30:11 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:30:11 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669671,"outputBytes":500952} -2022-10-02 13:30:11 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:30:11 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669758,"outputBytes":501043} -2022-10-02 13:30:11 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:30:11 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:30:11 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669409,"outputBytes":503498} -2022-10-02 13:30:11 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:30:11 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486878,"outputBytes":1693659} -2022-10-02 13:30:11 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486878,"outputBytes":3114823} -2022-10-02 13:30:11 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:30:11 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:30:24 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 13:30:25 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4611,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 13:30:25 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114823,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 13:30:25 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5619694,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 13:30:25 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 13:30:25 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 13:30:25 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 13:30:25 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 13:30:47 INFO:  Watch: {"event":"modify","input":"src/segmentation/meet.ts"} -2022-10-02 13:30:47 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:30:47 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669639,"outputBytes":500924} -2022-10-02 13:30:47 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:30:47 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669659,"outputBytes":500940} -2022-10-02 13:30:47 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:30:47 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669746,"outputBytes":501031} -2022-10-02 13:30:47 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:30:47 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:30:47 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669397,"outputBytes":503486} -2022-10-02 13:30:47 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:30:47 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486866,"outputBytes":1693654} -2022-10-02 13:30:48 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486866,"outputBytes":3114811} -2022-10-02 13:30:48 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:30:48 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:30:49 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 13:30:49 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4611,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 13:30:49 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114811,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 13:30:49 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5619677,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 13:30:49 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 13:30:49 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 13:30:49 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 13:30:49 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 13:31:00 INFO:  Watch: {"event":"modify","input":"src/segmentation/meet.ts"} -2022-10-02 13:31:00 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:31:00 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669651,"outputBytes":500936} -2022-10-02 13:31:00 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:31:00 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669671,"outputBytes":500952} -2022-10-02 13:31:00 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:31:00 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669758,"outputBytes":501043} -2022-10-02 13:31:00 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:31:00 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:31:00 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669409,"outputBytes":503498} -2022-10-02 13:31:00 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:31:00 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486878,"outputBytes":1693659} -2022-10-02 13:31:00 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486878,"outputBytes":3114823} -2022-10-02 13:31:00 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:31:00 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:31:05 INFO:  Watch: {"event":"modify","input":"src/segmentation/meet.ts"} -2022-10-02 13:31:05 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:31:05 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669637,"outputBytes":500922} -2022-10-02 13:31:05 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:31:05 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669657,"outputBytes":500938} -2022-10-02 13:31:05 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:31:05 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669744,"outputBytes":501029} -2022-10-02 13:31:05 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:31:05 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:31:05 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669395,"outputBytes":503484} -2022-10-02 13:31:05 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:31:05 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486864,"outputBytes":1693652} -2022-10-02 13:31:05 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486864,"outputBytes":3114809} -2022-10-02 13:31:05 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:31:05 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:31:06 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 13:31:06 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4611,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 13:31:06 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114809,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 13:31:06 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5619675,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 13:31:06 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 13:31:06 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 13:31:06 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 13:31:06 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 13:31:12 INFO:  Watch: {"event":"modify","input":"src/segmentation/meet.ts"} -2022-10-02 13:31:12 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:31:12 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669637,"outputBytes":500922} -2022-10-02 13:31:12 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:31:12 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669657,"outputBytes":500938} -2022-10-02 13:31:12 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:31:12 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669744,"outputBytes":501029} -2022-10-02 13:31:12 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:31:12 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:31:12 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669395,"outputBytes":503484} -2022-10-02 13:31:12 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:31:12 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486864,"outputBytes":1693652} -2022-10-02 13:31:13 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486864,"outputBytes":3114809} -2022-10-02 13:31:13 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:31:13 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:31:14 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 13:31:14 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4611,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 13:31:14 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114809,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 13:31:14 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5619675,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 13:31:14 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 13:31:14 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 13:31:14 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 13:31:14 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 13:31:46 INFO:  Watch: {"event":"modify","input":"src/segmentation/meet.ts"} -2022-10-02 13:31:46 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:31:46 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669651,"outputBytes":500936} -2022-10-02 13:31:46 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:31:46 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669671,"outputBytes":500952} -2022-10-02 13:31:46 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:31:46 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669758,"outputBytes":501043} -2022-10-02 13:31:46 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:31:46 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:31:46 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669409,"outputBytes":503498} -2022-10-02 13:31:46 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:31:46 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486878,"outputBytes":1693659} -2022-10-02 13:31:46 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486878,"outputBytes":3114823} -2022-10-02 13:31:46 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:31:46 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:31:55 INFO:  Watch: {"event":"modify","input":"src/segmentation/meet.ts"} -2022-10-02 13:31:55 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:31:55 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669651,"outputBytes":500936} -2022-10-02 13:31:55 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:31:55 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669671,"outputBytes":500952} -2022-10-02 13:31:55 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:31:55 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669758,"outputBytes":501043} -2022-10-02 13:31:55 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:31:55 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:31:55 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669409,"outputBytes":503498} -2022-10-02 13:31:56 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:31:56 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486878,"outputBytes":1693659} -2022-10-02 13:31:56 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486878,"outputBytes":3114823} -2022-10-02 13:31:56 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:31:56 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:32:00 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 13:32:00 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4611,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 13:32:00 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3114823,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 13:32:00 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5619694,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 13:32:00 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 13:32:00 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 13:32:00 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 13:32:00 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 13:32:09 INFO:  Watch: {"event":"modify","input":"src/segmentation/meet.ts"} -2022-10-02 13:32:09 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:32:09 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669651,"outputBytes":500936} -2022-10-02 13:32:09 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:32:09 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669671,"outputBytes":500952} -2022-10-02 13:32:09 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:32:09 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669758,"outputBytes":501043} -2022-10-02 13:32:09 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:32:09 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:32:09 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669409,"outputBytes":503498} -2022-10-02 13:32:09 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:32:09 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486878,"outputBytes":1693659} -2022-10-02 13:32:09 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486878,"outputBytes":3114823} -2022-10-02 13:32:09 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:32:09 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:33:38 INFO:  Watch: {"event":"modify","input":"src/segmentation/meet.ts"} -2022-10-02 13:33:38 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:33:38 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669652,"outputBytes":501214} -2022-10-02 13:33:38 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:33:38 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669672,"outputBytes":501230} -2022-10-02 13:33:38 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:33:38 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669759,"outputBytes":501321} -2022-10-02 13:33:38 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:33:38 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:33:38 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669410,"outputBytes":503812} -2022-10-02 13:33:38 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:33:38 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486879,"outputBytes":1693809} -2022-10-02 13:33:38 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486879,"outputBytes":3115087} -2022-10-02 13:33:38 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:33:38 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:33:41 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 13:33:41 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4611,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 13:33:41 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3115087,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 13:33:41 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5619911,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 13:33:41 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 13:33:41 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 13:33:41 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 13:33:41 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 13:36:31 INFO:  Watch: {"event":"modify","input":"src/draw/draw.ts"} -2022-10-02 13:36:31 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:36:31 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669660,"outputBytes":501214} -2022-10-02 13:36:31 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:36:31 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669680,"outputBytes":501230} -2022-10-02 13:36:31 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:36:31 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669767,"outputBytes":501321} -2022-10-02 13:36:31 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:36:31 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:36:31 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669418,"outputBytes":503812} -2022-10-02 13:36:31 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:36:31 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486887,"outputBytes":1693809} -2022-10-02 13:36:31 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486887,"outputBytes":3115087} -2022-10-02 13:36:31 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:36:31 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:37:02 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3211,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 13:37:02 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4596,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 13:37:02 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3115087,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 13:37:02 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5619919,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 13:37:02 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 13:37:02 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/demo/favicon.ico","remote":"::1"} -2022-10-02 13:37:02 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 13:37:02 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 13:39:46 INFO:  Watch: {"event":"modify","input":"src/human.ts"} -2022-10-02 13:39:46 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:39:47 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669069,"outputBytes":501214} -2022-10-02 13:39:47 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:39:47 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669089,"outputBytes":501230} -2022-10-02 13:39:47 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:39:47 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669176,"outputBytes":501321} -2022-10-02 13:39:47 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:39:47 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:39:47 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":668827,"outputBytes":503812} -2022-10-02 13:39:47 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:39:47 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486296,"outputBytes":1693809} -2022-10-02 13:39:47 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486296,"outputBytes":3115087} -2022-10-02 13:39:47 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:39:47 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:39:57 INFO:  Watch: {"event":"modify","input":"src/human.ts"} -2022-10-02 13:39:57 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:39:57 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669069,"outputBytes":501214} -2022-10-02 13:39:57 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:39:57 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669089,"outputBytes":501230} -2022-10-02 13:39:57 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:39:57 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669176,"outputBytes":501321} -2022-10-02 13:39:57 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:39:57 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:39:57 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":668827,"outputBytes":503812} -2022-10-02 13:39:57 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:39:57 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486296,"outputBytes":1693809} -2022-10-02 13:39:57 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486296,"outputBytes":3115087} -2022-10-02 13:39:57 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:39:57 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 13:42:48 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":301,"url":"/demo/","redirect":"/demo/index.html","remote":"::1"} -2022-10-02 13:42:48 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":7842,"url":"/demo/index.html","remote":"::1"} -2022-10-02 13:42:48 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/css","size":107884,"url":"/demo/icons.css","remote":"::1"} -2022-10-02 13:42:48 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":45999,"url":"/demo/index.js","remote":"::1"} -2022-10-02 13:42:48 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"font/woff2","size":181500,"url":"/assets/lato-light.woff2","remote":"::1"} -2022-10-02 13:42:48 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3115087,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 13:42:48 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":14308,"url":"/demo/helpers/menu.js","remote":"::1"} -2022-10-02 13:42:48 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":10535,"url":"/demo/helpers/gl-bench.js","remote":"::1"} -2022-10-02 13:42:48 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3397,"url":"/demo/helpers/webrtc.js","remote":"::1"} -2022-10-02 13:42:48 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":5689,"url":"/demo/helpers/jsonview.js","remote":"::1"} -2022-10-02 13:42:48 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5619323,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 13:42:48 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 13:42:48 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/x-icon","size":261950,"url":"/favicon.ico","remote":"::1"} -2022-10-02 13:42:48 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 13:42:48 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4033,"url":"/demo/index-pwa.js","remote":"::1"} -2022-10-02 13:43:02 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":1809,"url":"/demo/index-worker.js","remote":"::1"} -2022-10-02 13:43:02 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":1693809,"url":"/dist/human.js","remote":"::1"} -2022-10-02 13:51:54 INFO:  Watch: {"event":"modify","input":"src/config.ts"} -2022-10-02 13:51:54 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 13:51:54 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669066,"outputBytes":501211} -2022-10-02 13:51:54 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 13:51:54 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669086,"outputBytes":501227} -2022-10-02 13:51:54 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 13:51:54 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669173,"outputBytes":501318} -2022-10-02 13:51:54 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 13:51:54 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 13:51:54 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":668824,"outputBytes":503809} -2022-10-02 13:51:55 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 13:51:55 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486293,"outputBytes":1693806} -2022-10-02 13:51:55 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486293,"outputBytes":3115084} -2022-10-02 13:51:55 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 13:51:55 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 14:03:01 INFO:  @vladmandic/human version 2.11.0 -2022-10-02 14:03:01 INFO:  User: vlado Platform: linux Arch: x64 Node: v18.10.0 -2022-10-02 14:03:01 INFO:  Application: {"name":"@vladmandic/human","version":"2.11.0"} -2022-10-02 14:03:01 INFO:  Environment: {"profile":"development","config":".build.json","package":"package.json","tsconfig":true,"eslintrc":true,"git":true} -2022-10-02 14:03:01 INFO:  Toolchain: {"build":"0.7.14","esbuild":"0.15.10","typescript":"4.8.4","typedoc":"0.23.15","eslint":"8.24.0"} -2022-10-02 14:03:01 INFO:  Build: {"profile":"development","steps":["serve","watch","compile"]} -2022-10-02 14:03:01 STATE: WebServer: {"ssl":false,"port":10030,"root":"."} -2022-10-02 14:03:01 STATE: WebServer: {"ssl":true,"port":10031,"root":".","sslKey":"node_modules/@vladmandic/build/cert/https.key","sslCrt":"node_modules/@vladmandic/build/cert/https.crt"} -2022-10-02 14:03:01 STATE: Watch: {"locations":["src/**/*","tfjs/**/*","demo/**/*.ts"]} -2022-10-02 14:03:01 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 14:03:01 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669066,"outputBytes":501211} -2022-10-02 14:03:01 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 14:03:01 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669086,"outputBytes":501227} -2022-10-02 14:03:01 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 14:03:01 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669173,"outputBytes":501318} -2022-10-02 14:03:01 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 14:03:01 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 14:03:01 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":668824,"outputBytes":503809} -2022-10-02 14:03:01 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 14:03:01 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486293,"outputBytes":1693806} -2022-10-02 14:03:01 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486293,"outputBytes":3115084} -2022-10-02 14:03:01 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 14:03:01 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 14:03:01 INFO:  Listening... -2022-10-02 14:04:37 INFO:  Watch: {"event":"modify","input":"src/draw/draw.ts"} -2022-10-02 14:04:37 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 14:04:37 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669058,"outputBytes":501211} -2022-10-02 14:04:37 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 14:04:37 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669078,"outputBytes":501227} -2022-10-02 14:04:37 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 14:04:37 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669165,"outputBytes":501318} -2022-10-02 14:04:37 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 14:04:37 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 14:04:38 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":668816,"outputBytes":503809} -2022-10-02 14:04:38 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 14:04:38 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486285,"outputBytes":1693806} -2022-10-02 14:04:38 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486285,"outputBytes":3115084} -2022-10-02 14:04:38 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 14:04:38 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 14:11:56 INFO:  Watch: {"event":"modify","input":"src/models.ts"} -2022-10-02 14:11:56 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 14:11:56 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669107,"outputBytes":501262} -2022-10-02 14:11:56 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 14:11:56 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669127,"outputBytes":501278} -2022-10-02 14:11:56 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 14:11:56 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669214,"outputBytes":501369} -2022-10-02 14:11:56 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 14:11:56 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 14:11:56 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":668865,"outputBytes":503860} -2022-10-02 14:11:56 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 14:11:57 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486334,"outputBytes":1693843} -2022-10-02 14:11:57 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486334,"outputBytes":3115135} -2022-10-02 14:11:57 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 14:11:57 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 14:12:01 INFO:  Watch: {"event":"modify","input":"src/models.ts"} -2022-10-02 14:12:02 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 14:12:02 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669108,"outputBytes":501289} -2022-10-02 14:12:02 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 14:12:02 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669128,"outputBytes":501305} -2022-10-02 14:12:02 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 14:12:02 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669215,"outputBytes":501396} -2022-10-02 14:12:02 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 14:12:02 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 14:12:02 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":668866,"outputBytes":503887} -2022-10-02 14:12:02 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 14:12:02 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486335,"outputBytes":1693858} -2022-10-02 14:12:02 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486335,"outputBytes":3115162} -2022-10-02 14:12:02 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 14:12:02 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 14:13:03 INFO:  Watch: {"event":"modify","input":"src/human.ts"} -2022-10-02 14:13:03 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 14:13:03 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669111,"outputBytes":501254} -2022-10-02 14:13:03 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 14:13:03 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669131,"outputBytes":501270} -2022-10-02 14:13:03 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 14:13:03 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669218,"outputBytes":501361} -2022-10-02 14:13:03 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 14:13:03 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 14:13:04 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":668869,"outputBytes":503852} -2022-10-02 14:13:04 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 14:13:04 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486338,"outputBytes":1693841} -2022-10-02 14:13:04 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486338,"outputBytes":3115127} -2022-10-02 14:13:04 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 14:13:04 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 14:13:09 INFO:  Watch: {"event":"modify","input":"src/human.ts"} -2022-10-02 14:13:09 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 14:13:09 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669108,"outputBytes":501289} -2022-10-02 14:13:09 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 14:13:09 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669128,"outputBytes":501305} -2022-10-02 14:13:09 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 14:13:10 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669215,"outputBytes":501396} -2022-10-02 14:13:10 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 14:13:10 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 14:13:10 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":668866,"outputBytes":503887} -2022-10-02 14:13:10 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 14:13:10 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486335,"outputBytes":1693858} -2022-10-02 14:13:10 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486335,"outputBytes":3115162} -2022-10-02 14:13:10 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 14:13:10 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 14:13:24 INFO:  Watch: {"event":"modify","input":"src/tfjs/load.ts"} -2022-10-02 14:13:24 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 14:13:24 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669108,"outputBytes":501289} -2022-10-02 14:13:24 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 14:13:24 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669128,"outputBytes":501305} -2022-10-02 14:13:24 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 14:13:24 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669215,"outputBytes":501396} -2022-10-02 14:13:24 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 14:13:24 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 14:13:24 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":668866,"outputBytes":503887} -2022-10-02 14:13:24 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 14:13:24 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486335,"outputBytes":1693858} -2022-10-02 14:13:24 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486335,"outputBytes":3115162} -2022-10-02 14:13:24 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 14:13:24 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 14:13:35 INFO:  Watch: {"event":"modify","input":"src/tfjs/load.ts"} -2022-10-02 14:13:35 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 14:13:35 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669111,"outputBytes":501235} -2022-10-02 14:13:35 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 14:13:35 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669131,"outputBytes":501251} -2022-10-02 14:13:35 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 14:13:35 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669218,"outputBytes":501342} -2022-10-02 14:13:35 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 14:13:35 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 14:13:35 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":668869,"outputBytes":503833} -2022-10-02 14:13:36 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 14:13:36 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486338,"outputBytes":1693836} -2022-10-02 14:13:36 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486338,"outputBytes":3115108} -2022-10-02 14:13:36 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 14:13:36 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 14:13:58 INFO:  Watch: {"event":"modify","input":"src/tfjs/load.ts"} -2022-10-02 14:13:58 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 14:13:58 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669111,"outputBytes":501235} -2022-10-02 14:13:58 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 14:13:58 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669131,"outputBytes":501251} -2022-10-02 14:13:58 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 14:13:58 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669218,"outputBytes":501342} -2022-10-02 14:13:58 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 14:13:58 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 14:13:58 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":668869,"outputBytes":503833} -2022-10-02 14:13:58 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 14:13:58 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486338,"outputBytes":1693836} -2022-10-02 14:13:59 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486338,"outputBytes":3115108} -2022-10-02 14:13:59 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 14:13:59 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 14:14:36 INFO:  Watch: {"event":"modify","input":"src/tfjs/load.ts"} -2022-10-02 14:14:36 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 14:14:36 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669114,"outputBytes":501231} -2022-10-02 14:14:36 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 14:14:36 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669134,"outputBytes":501247} -2022-10-02 14:14:36 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 14:14:36 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669221,"outputBytes":501338} -2022-10-02 14:14:36 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 14:14:36 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 14:14:36 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":668872,"outputBytes":503824} -2022-10-02 14:14:36 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 14:14:36 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486341,"outputBytes":1693836} -2022-10-02 14:14:36 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486341,"outputBytes":3115099} -2022-10-02 14:14:36 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 14:14:36 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 14:17:51 INFO:  Watch: {"event":"modify","input":"src/models.ts"} -2022-10-02 14:17:51 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 14:17:52 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669064,"outputBytes":501153} -2022-10-02 14:17:52 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 14:17:52 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669084,"outputBytes":501169} -2022-10-02 14:17:52 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 14:17:52 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669171,"outputBytes":501260} -2022-10-02 14:17:52 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 14:17:52 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 14:17:52 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":668822,"outputBytes":503746} -2022-10-02 14:17:52 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 14:17:52 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486291,"outputBytes":1693784} -2022-10-02 14:17:52 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486291,"outputBytes":3115021} -2022-10-02 14:17:52 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 14:17:52 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 14:18:04 INFO:  Watch: {"event":"modify","input":"src/models.ts"} -2022-10-02 14:18:04 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 14:18:04 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669114,"outputBytes":501231} -2022-10-02 14:18:04 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 14:18:04 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669134,"outputBytes":501247} -2022-10-02 14:18:04 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 14:18:04 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669221,"outputBytes":501338} -2022-10-02 14:18:04 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 14:18:04 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 14:18:04 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":668872,"outputBytes":503824} -2022-10-02 14:18:04 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 14:18:04 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486341,"outputBytes":1693836} -2022-10-02 14:18:04 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486341,"outputBytes":3115099} -2022-10-02 14:18:04 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 14:18:04 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 14:18:04 INFO:  Watch: {"event":"modify","input":"src/models.ts","skip":true} -2022-10-02 14:18:23 INFO:  Watch: {"event":"modify","input":"src/models.ts"} -2022-10-02 14:18:23 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 14:18:23 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669064,"outputBytes":501153} -2022-10-02 14:18:23 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 14:18:23 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669084,"outputBytes":501169} -2022-10-02 14:18:23 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 14:18:23 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669171,"outputBytes":501260} -2022-10-02 14:18:23 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 14:18:23 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 14:18:23 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":668822,"outputBytes":503746} -2022-10-02 14:18:24 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 14:18:24 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486291,"outputBytes":1693784} -2022-10-02 14:18:24 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486291,"outputBytes":3115021} -2022-10-02 14:18:24 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 14:18:24 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 14:18:44 INFO:  Watch: {"event":"modify","input":"src/models.ts"} -2022-10-02 14:18:44 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 14:18:44 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669114,"outputBytes":501231} -2022-10-02 14:18:44 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 14:18:44 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669134,"outputBytes":501247} -2022-10-02 14:18:44 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 14:18:44 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669221,"outputBytes":501338} -2022-10-02 14:18:44 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 14:18:44 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 14:18:44 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":668872,"outputBytes":503824} -2022-10-02 14:18:44 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 14:18:44 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486341,"outputBytes":1693836} -2022-10-02 14:18:44 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486341,"outputBytes":3115099} -2022-10-02 14:18:44 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 14:18:44 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 14:18:46 INFO:  Watch: {"event":"modify","input":"src/models.ts"} -2022-10-02 14:18:46 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 14:18:46 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669064,"outputBytes":501153} -2022-10-02 14:18:46 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 14:18:46 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669084,"outputBytes":501169} -2022-10-02 14:18:46 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 14:18:46 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669171,"outputBytes":501260} -2022-10-02 14:18:46 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 14:18:46 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 14:18:46 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":668822,"outputBytes":503746} -2022-10-02 14:18:46 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 14:18:46 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486291,"outputBytes":1693784} -2022-10-02 14:18:46 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486291,"outputBytes":3115021} -2022-10-02 14:18:46 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 14:18:46 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 14:20:02 INFO:  Watch: {"event":"modify","input":"src/human.ts"} -2022-10-02 14:20:02 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 14:20:02 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669064,"outputBytes":501153} -2022-10-02 14:20:02 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 14:20:02 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669084,"outputBytes":501169} -2022-10-02 14:20:02 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 14:20:02 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669171,"outputBytes":501260} -2022-10-02 14:20:02 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 14:20:02 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 14:20:02 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":668822,"outputBytes":503746} -2022-10-02 14:20:02 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 14:20:02 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486291,"outputBytes":1693784} -2022-10-02 14:20:02 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486291,"outputBytes":3115021} -2022-10-02 14:20:02 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 14:20:02 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 14:22:21 INFO:  Watch: {"event":"modify","input":"src/models.ts"} -2022-10-02 14:22:21 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 14:22:21 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669116,"outputBytes":501205} -2022-10-02 14:22:21 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 14:22:21 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669136,"outputBytes":501221} -2022-10-02 14:22:21 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 14:22:21 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669223,"outputBytes":501312} -2022-10-02 14:22:21 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 14:22:21 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 14:22:21 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":668874,"outputBytes":503798} -2022-10-02 14:22:22 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 14:22:22 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486343,"outputBytes":1693831} -2022-10-02 14:22:22 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486343,"outputBytes":3115073} -2022-10-02 14:22:22 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 14:22:22 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 14:35:02 INFO:  Watch: {"event":"modify","input":"src/human.ts"} -2022-10-02 14:35:02 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 14:35:02 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669226,"outputBytes":501293} -2022-10-02 14:35:02 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 14:35:02 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669246,"outputBytes":501309} -2022-10-02 14:35:02 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 14:35:02 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669333,"outputBytes":501400} -2022-10-02 14:35:02 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 14:35:02 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 14:35:02 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":668984,"outputBytes":503886} -2022-10-02 14:35:02 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 14:35:02 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486453,"outputBytes":1693868} -2022-10-02 14:35:02 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486453,"outputBytes":3115161} -2022-10-02 14:35:02 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 14:35:02 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 14:35:19 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/html","size":3198,"url":"/demo/segmentation/index.html","remote":"::1"} -2022-10-02 14:35:19 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":4664,"url":"/demo/segmentation/index.js","remote":"::1"} -2022-10-02 14:35:19 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"text/javascript","size":3115161,"url":"/dist/human.esm.js","remote":"::1"} -2022-10-02 14:35:20 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/octet-stream","size":5619485,"url":"/dist/human.esm.js.map","remote":"::1"} -2022-10-02 14:35:20 WARN:  HTTPS: {"method":"GET","ver":"2.0","status":404,"url":"/demo/assets/rijeka.mp4","remote":"::1"} -2022-10-02 14:35:20 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"application/manifest+json","size":304,"url":"/demo/manifest.webmanifest","remote":"::1"} -2022-10-02 14:35:20 DATA:  HTTPS: {"method":"GET","ver":"2.0","status":200,"mime":"image/png","size":142790,"url":"/assets/icon.png","remote":"::1"} -2022-10-02 14:39:29 INFO:  Watch: {"event":"modify","input":"src/human.ts"} -2022-10-02 14:39:29 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 14:39:29 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669282,"outputBytes":501355} -2022-10-02 14:39:29 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 14:39:29 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669302,"outputBytes":501371} -2022-10-02 14:39:29 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 14:39:29 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669389,"outputBytes":501462} -2022-10-02 14:39:29 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 14:39:29 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 14:39:29 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669040,"outputBytes":503948} -2022-10-02 14:39:29 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 14:39:30 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486509,"outputBytes":1693917} -2022-10-02 14:39:30 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486509,"outputBytes":3115223} -2022-10-02 14:39:30 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 14:39:30 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 14:41:35 INFO:  Watch: {"event":"modify","input":"src/human.ts"} -2022-10-02 14:41:35 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 14:41:35 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669469,"outputBytes":501548} -2022-10-02 14:41:35 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 14:41:35 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669489,"outputBytes":501564} -2022-10-02 14:41:35 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 14:41:35 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669576,"outputBytes":501655} -2022-10-02 14:41:35 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 14:41:35 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 14:41:35 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669227,"outputBytes":504141} -2022-10-02 14:41:35 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 14:41:35 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486696,"outputBytes":1694026} -2022-10-02 14:41:35 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486696,"outputBytes":3115416} -2022-10-02 14:41:35 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 14:41:35 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 14:43:45 INFO:  Watch: {"event":"modify","input":"src/human.ts"} -2022-10-02 14:43:45 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 14:43:45 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669568,"outputBytes":501647} -2022-10-02 14:43:45 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 14:43:45 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669588,"outputBytes":501663} -2022-10-02 14:43:45 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 14:43:45 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669675,"outputBytes":501754} -2022-10-02 14:43:45 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 14:43:45 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 14:43:45 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669326,"outputBytes":504240} -2022-10-02 14:43:45 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 14:43:45 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486795,"outputBytes":1694105} -2022-10-02 14:43:45 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486795,"outputBytes":3115515} -2022-10-02 14:43:45 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 14:43:45 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 14:44:29 INFO:  Watch: {"event":"modify","input":"src/segmentation/rvm.ts"} -2022-10-02 14:44:29 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 14:44:29 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669602,"outputBytes":501690} -2022-10-02 14:44:29 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 14:44:29 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669622,"outputBytes":501706} -2022-10-02 14:44:29 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 14:44:29 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669709,"outputBytes":501797} -2022-10-02 14:44:29 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 14:44:29 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 14:44:29 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669360,"outputBytes":504283} -2022-10-02 14:44:29 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 14:44:29 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486829,"outputBytes":1694121} -2022-10-02 14:44:29 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486829,"outputBytes":3115558} -2022-10-02 14:44:29 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 14:44:29 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 14:44:32 INFO:  Watch: {"event":"modify","input":"src/segmentation/meet.ts"} -2022-10-02 14:44:32 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 14:44:32 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669709,"outputBytes":501860} -2022-10-02 14:44:32 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 14:44:32 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669729,"outputBytes":501876} -2022-10-02 14:44:32 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 14:44:32 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669816,"outputBytes":501967} -2022-10-02 14:44:32 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 14:44:32 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 14:44:32 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669467,"outputBytes":504453} -2022-10-02 14:44:32 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 14:44:32 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486936,"outputBytes":1694219} -2022-10-02 14:44:33 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486936,"outputBytes":3115728} -2022-10-02 14:44:33 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 14:44:33 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 14:45:01 INFO:  Watch: {"event":"modify","input":"src/segmentation/meet.ts"} -2022-10-02 14:45:01 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 14:45:01 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669716,"outputBytes":501860} -2022-10-02 14:45:01 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 14:45:01 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669736,"outputBytes":501876} -2022-10-02 14:45:01 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 14:45:01 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669823,"outputBytes":501967} -2022-10-02 14:45:01 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 14:45:01 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 14:45:01 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669474,"outputBytes":504453} -2022-10-02 14:45:01 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 14:45:01 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486943,"outputBytes":1694219} -2022-10-02 14:45:02 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486943,"outputBytes":3115728} -2022-10-02 14:45:02 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 14:45:02 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 14:45:03 INFO:  Watch: {"event":"modify","input":"src/segmentation/selfie.ts","skip":true} -2022-10-02 14:45:24 INFO:  Watch: {"event":"modify","input":"src/human.ts"} -2022-10-02 14:45:24 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 14:45:24 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669544,"outputBytes":501738} -2022-10-02 14:45:24 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 14:45:24 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669564,"outputBytes":501754} -2022-10-02 14:45:24 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 14:45:24 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669651,"outputBytes":501845} -2022-10-02 14:45:24 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 14:45:24 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 14:45:25 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669302,"outputBytes":504331} -2022-10-02 14:45:25 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 14:45:25 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486771,"outputBytes":1694129} -2022-10-02 14:45:25 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486771,"outputBytes":3115606} -2022-10-02 14:45:25 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 14:45:25 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 14:45:36 INFO:  Watch: {"event":"modify","input":"src/segmentation/rvm.ts"} -2022-10-02 14:45:36 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 14:45:36 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669544,"outputBytes":501738} -2022-10-02 14:45:36 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 14:45:36 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669564,"outputBytes":501754} -2022-10-02 14:45:36 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 14:45:36 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669651,"outputBytes":501845} -2022-10-02 14:45:36 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 14:45:36 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 14:45:36 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669302,"outputBytes":504331} -2022-10-02 14:45:36 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 14:45:36 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486771,"outputBytes":1694129} -2022-10-02 14:45:36 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486771,"outputBytes":3115606} -2022-10-02 14:45:36 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 14:45:36 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 14:46:18 INFO:  Watch: {"event":"modify","input":"src/segmentation/rvm.ts"} -2022-10-02 14:46:18 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 14:46:18 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669637,"outputBytes":501860} -2022-10-02 14:46:18 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 14:46:18 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669657,"outputBytes":501876} -2022-10-02 14:46:18 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 14:46:18 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669744,"outputBytes":501967} -2022-10-02 14:46:18 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 14:46:18 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 14:46:18 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669395,"outputBytes":504453} -2022-10-02 14:46:19 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 14:46:19 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486864,"outputBytes":1694222} -2022-10-02 14:46:19 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486864,"outputBytes":3115728} -2022-10-02 14:46:19 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 14:46:19 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 14:46:46 INFO:  Watch: {"event":"modify","input":"src/segmentation/meet.ts"} -2022-10-02 14:46:46 INFO:  Watch: {"event":"modify","input":"src/segmentation/rvm.ts","skip":true} -2022-10-02 14:46:46 INFO:  Watch: {"event":"modify","input":"src/segmentation/selfie.ts","skip":true} -2022-10-02 14:46:47 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 14:46:47 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669661,"outputBytes":501890} -2022-10-02 14:46:47 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 14:46:47 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669681,"outputBytes":501906} -2022-10-02 14:46:47 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 14:46:47 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669768,"outputBytes":501997} -2022-10-02 14:46:47 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 14:46:47 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 14:46:47 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669419,"outputBytes":504483} -2022-10-02 14:46:47 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 14:46:47 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486888,"outputBytes":1694237} -2022-10-02 14:46:47 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486888,"outputBytes":3115758} -2022-10-02 14:46:47 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 14:46:47 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 14:47:19 INFO:  Watch: {"event":"modify","input":"src/segmentation/rvm.ts"} -2022-10-02 14:47:19 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 14:47:19 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669721,"outputBytes":501950} -2022-10-02 14:47:19 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 14:47:19 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669741,"outputBytes":501966} -2022-10-02 14:47:19 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 14:47:19 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669828,"outputBytes":502057} -2022-10-02 14:47:19 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 14:47:19 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 14:47:19 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669479,"outputBytes":504543} -2022-10-02 14:47:19 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 14:47:19 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486948,"outputBytes":1694287} -2022-10-02 14:47:20 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486948,"outputBytes":3115818} -2022-10-02 14:47:20 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 14:47:20 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 14:48:12 INFO:  @vladmandic/human version 2.11.0 -2022-10-02 14:48:12 INFO:  User: vlado Platform: linux Arch: x64 Node: v18.10.0 -2022-10-02 14:48:12 INFO:  Application: {"name":"@vladmandic/human","version":"2.11.0"} -2022-10-02 14:48:12 INFO:  Environment: {"profile":"development","config":".build.json","package":"package.json","tsconfig":true,"eslintrc":true,"git":true} -2022-10-02 14:48:12 INFO:  Toolchain: {"build":"0.7.14","esbuild":"0.15.10","typescript":"4.8.4","typedoc":"0.23.15","eslint":"8.24.0"} -2022-10-02 14:48:12 INFO:  Build: {"profile":"development","steps":["serve","watch","compile"]} -2022-10-02 14:48:12 STATE: WebServer: {"ssl":false,"port":10030,"root":"."} -2022-10-02 14:48:12 STATE: WebServer: {"ssl":true,"port":10031,"root":".","sslKey":"node_modules/@vladmandic/build/cert/https.key","sslCrt":"node_modules/@vladmandic/build/cert/https.crt"} -2022-10-02 14:48:12 STATE: Watch: {"locations":["src/**/*","tfjs/**/*","demo/**/*.ts"]} -2022-10-02 14:48:12 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 14:48:12 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669721,"outputBytes":501950} -2022-10-02 14:48:12 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 14:48:12 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669741,"outputBytes":501966} -2022-10-02 14:48:12 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 14:48:12 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669828,"outputBytes":502057} -2022-10-02 14:48:12 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 14:48:12 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 14:48:12 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669479,"outputBytes":504543} -2022-10-02 14:48:12 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 14:48:12 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486948,"outputBytes":1694287} -2022-10-02 14:48:13 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486948,"outputBytes":3115818} -2022-10-02 14:48:13 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 14:48:13 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 14:48:13 INFO:  Listening... -2022-10-02 14:51:42 INFO:  Watch: {"event":"modify","input":"src/human.ts"} -2022-10-02 14:51:42 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 14:51:42 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669721,"outputBytes":501950} -2022-10-02 14:51:42 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 14:51:42 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669741,"outputBytes":501966} -2022-10-02 14:51:42 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 14:51:42 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669828,"outputBytes":502057} -2022-10-02 14:51:42 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 14:51:42 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 14:51:42 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669479,"outputBytes":504543} -2022-10-02 14:51:42 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 14:51:42 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486948,"outputBytes":1694287} -2022-10-02 14:51:42 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486948,"outputBytes":3115818} -2022-10-02 14:51:42 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 14:51:42 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 14:52:09 INFO:  Watch: {"event":"modify","input":"src/human.ts"} -2022-10-02 14:52:09 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 14:52:09 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669830,"outputBytes":502091} -2022-10-02 14:52:09 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 14:52:09 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669850,"outputBytes":502107} -2022-10-02 14:52:09 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 14:52:09 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669937,"outputBytes":502198} -2022-10-02 14:52:09 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 14:52:09 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 14:52:09 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669588,"outputBytes":504684} -2022-10-02 14:52:09 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 14:52:09 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3487057,"outputBytes":1694396} -2022-10-02 14:52:10 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3487057,"outputBytes":3115959} -2022-10-02 14:52:10 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 14:52:10 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 14:53:27 INFO:  Watch: {"event":"modify","input":"src/segmentation/rvm.ts"} -2022-10-02 14:53:27 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 14:53:27 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669885,"outputBytes":502146} -2022-10-02 14:53:27 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 14:53:27 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669905,"outputBytes":502162} -2022-10-02 14:53:27 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 14:53:27 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669992,"outputBytes":502253} -2022-10-02 14:53:27 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 14:53:27 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 14:53:27 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669643,"outputBytes":504739} -2022-10-02 14:53:27 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 14:53:27 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3487112,"outputBytes":1694445} -2022-10-02 14:53:28 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3487112,"outputBytes":3116014} -2022-10-02 14:53:28 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 14:53:28 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 14:54:13 INFO:  Watch: {"event":"modify","input":"src/human.ts"} -2022-10-02 14:54:13 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 14:54:13 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669946,"outputBytes":502207} -2022-10-02 14:54:13 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 14:54:13 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669966,"outputBytes":502223} -2022-10-02 14:54:13 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 14:54:13 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":670053,"outputBytes":502314} -2022-10-02 14:54:13 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 14:54:13 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 14:54:13 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669704,"outputBytes":504800} -2022-10-02 14:54:13 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 14:54:14 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3487173,"outputBytes":1694501} -2022-10-02 14:54:14 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3487173,"outputBytes":3116075} -2022-10-02 14:54:14 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 14:54:14 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 14:58:24 INFO:  Watch: {"event":"modify","input":"src/segmentation/rvm.ts"} -2022-10-02 14:58:24 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 14:58:24 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669880,"outputBytes":502111} -2022-10-02 14:58:24 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 14:58:24 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669900,"outputBytes":502127} -2022-10-02 14:58:24 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 14:58:24 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669987,"outputBytes":502218} -2022-10-02 14:58:24 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 14:58:24 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 14:58:24 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669638,"outputBytes":504704} -2022-10-02 14:58:24 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 14:58:24 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3487107,"outputBytes":1694443} -2022-10-02 14:58:24 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3487107,"outputBytes":3115979} -2022-10-02 14:58:24 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 14:58:24 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 14:58:36 INFO:  Watch: {"event":"modify","input":"src/segmentation/rvm.ts"} -2022-10-02 14:58:36 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 14:58:36 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669897,"outputBytes":502156} -2022-10-02 14:58:36 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 14:58:36 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669917,"outputBytes":502172} -2022-10-02 14:58:36 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 14:58:36 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":670004,"outputBytes":502263} -2022-10-02 14:58:36 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 14:58:36 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 14:58:36 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669655,"outputBytes":504749} -2022-10-02 14:58:36 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 14:58:36 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3487124,"outputBytes":1694471} -2022-10-02 14:58:36 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3487124,"outputBytes":3116024} -2022-10-02 14:58:36 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 14:58:36 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 14:59:08 INFO:  Watch: {"event":"modify","input":"src/segmentation/rvm.ts"} -2022-10-02 14:59:08 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 14:59:08 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669944,"outputBytes":502231} -2022-10-02 14:59:08 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 14:59:08 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669964,"outputBytes":502247} -2022-10-02 14:59:08 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 14:59:08 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":670051,"outputBytes":502338} -2022-10-02 14:59:08 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 14:59:08 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 14:59:08 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669702,"outputBytes":504824} -2022-10-02 14:59:08 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 14:59:08 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3487171,"outputBytes":1694519} -2022-10-02 14:59:08 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3487171,"outputBytes":3116099} -2022-10-02 14:59:08 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 14:59:08 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} -2022-10-02 15:03:07 INFO:  Watch: {"event":"modify","input":"src/segmentation/rvm.ts"} -2022-10-02 15:03:07 INFO:  Watch: {"event":"modify","input":"src/human.ts","skip":true} -2022-10-02 15:03:07 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":1098} -2022-10-02 15:03:07 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669502,"outputBytes":501672} -2022-10-02 15:03:07 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":1118} -2022-10-02 15:03:07 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669522,"outputBytes":501688} -2022-10-02 15:03:07 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":1205} -2022-10-02 15:03:07 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669609,"outputBytes":501779} -2022-10-02 15:03:07 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":1439} -2022-10-02 15:03:07 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":2169,"outputBytes":856} -2022-10-02 15:03:07 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669260,"outputBytes":504265} -2022-10-02 15:03:07 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":2346,"outputBytes":2818325} -2022-10-02 15:03:07 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3486729,"outputBytes":1694086} -2022-10-02 15:03:07 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3486729,"outputBytes":3115540} -2022-10-02 15:03:07 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5841,"outputBytes":3814} -2022-10-02 15:03:07 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":13538} +2022-10-09 14:32:18 DATA:  Build {"name":"@vladmandic/human","version":"2.11.1"} +2022-10-09 14:32:18 INFO:  Application: {"name":"@vladmandic/human","version":"2.11.1"} +2022-10-09 14:32:18 INFO:  Environment: {"profile":"production","config":".build.json","package":"package.json","tsconfig":true,"eslintrc":true,"git":true} +2022-10-09 14:32:18 INFO:  Toolchain: {"build":"0.7.14","esbuild":"0.15.10","typescript":"4.8.4","typedoc":"0.23.15","eslint":"8.25.0"} +2022-10-09 14:32:18 INFO:  Build: {"profile":"production","steps":["clean","compile","typings","typedoc","lint","changelog"]} +2022-10-09 14:32:18 STATE: Clean: {"locations":["dist/*","types/lib/*","typedoc/*"]} +2022-10-09 14:32:18 STATE: Compile: {"name":"tfjs/nodejs/cpu","format":"cjs","platform":"node","input":"tfjs/tf-node.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":159,"outputBytes":608} +2022-10-09 14:32:18 STATE: Compile: {"name":"human/nodejs/cpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node.js","files":78,"inputBytes":669029,"outputBytes":315176} +2022-10-09 14:32:18 STATE: Compile: {"name":"tfjs/nodejs/gpu","format":"cjs","platform":"node","input":"tfjs/tf-node-gpu.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":167,"outputBytes":612} +2022-10-09 14:32:18 STATE: Compile: {"name":"human/nodejs/gpu","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-gpu.js","files":78,"inputBytes":669033,"outputBytes":315180} +2022-10-09 14:32:18 STATE: Compile: {"name":"tfjs/nodejs/wasm","format":"cjs","platform":"node","input":"tfjs/tf-node-wasm.ts","output":"dist/tfjs.esm.js","files":1,"inputBytes":206,"outputBytes":664} +2022-10-09 14:32:18 STATE: Compile: {"name":"human/nodejs/wasm","format":"cjs","platform":"node","input":"src/human.ts","output":"dist/human.node-wasm.js","files":78,"inputBytes":669085,"outputBytes":315230} +2022-10-09 14:32:18 STATE: Compile: {"name":"tfjs/browser/version","format":"esm","platform":"browser","input":"tfjs/tf-version.ts","output":"dist/tfjs.version.js","files":1,"inputBytes":1125,"outputBytes":358} +2022-10-09 14:32:18 STATE: Compile: {"name":"tfjs/browser/esm/nobundle","format":"esm","platform":"browser","input":"tfjs/tf-browser.ts","output":"dist/tfjs.esm.js","files":2,"inputBytes":1088,"outputBytes":583} +2022-10-09 14:32:18 STATE: Compile: {"name":"human/browser/esm/nobundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm-nobundle.js","files":78,"inputBytes":669004,"outputBytes":313912} +2022-10-09 14:32:18 STATE: Compile: {"name":"tfjs/browser/esm/custom","format":"esm","platform":"browser","input":"tfjs/tf-custom.ts","output":"dist/tfjs.esm.js","files":11,"inputBytes":1265,"outputBytes":2814441} +2022-10-09 14:32:18 STATE: Compile: {"name":"human/browser/iife/bundle","format":"iife","platform":"browser","input":"src/human.ts","output":"dist/human.js","files":78,"inputBytes":3482862,"outputBytes":1693611} +2022-10-09 14:32:18 STATE: Compile: {"name":"human/browser/esm/bundle","format":"esm","platform":"browser","input":"src/human.ts","output":"dist/human.esm.js","files":78,"inputBytes":3482862,"outputBytes":3111620} +2022-10-09 14:32:23 STATE: Typings: {"input":"src/human.ts","output":"types/lib","files":15} +2022-10-09 14:32:25 STATE: TypeDoc: {"input":"src/human.ts","output":"typedoc","objects":76,"generated":true} +2022-10-09 14:32:25 STATE: Compile: {"name":"demo/typescript","format":"esm","platform":"browser","input":"demo/typescript/index.ts","output":"demo/typescript/index.js","files":1,"inputBytes":5684,"outputBytes":2632} +2022-10-09 14:32:25 STATE: Compile: {"name":"demo/faceid","format":"esm","platform":"browser","input":"demo/faceid/index.ts","output":"demo/faceid/index.js","files":2,"inputBytes":17155,"outputBytes":9175} +2022-10-09 14:32:35 STATE: Lint: {"locations":["*.json","src/**/*.ts","test/**/*.js","demo/**/*.js"],"files":114,"errors":0,"warnings":0} +2022-10-09 14:32:35 STATE: ChangeLog: {"repository":"https://github.com/vladmandic/human","branch":"main","output":"CHANGELOG.md"} +2022-10-09 14:32:35 STATE: Copy: {"input":"tfjs/tfjs.esm.d.ts"} +2022-10-09 14:32:35 INFO:  Done... +2022-10-09 14:32:36 STATE: API-Extractor: {"succeeeded":true,"errors":0,"warnings":197} +2022-10-09 14:32:36 STATE: Filter: {"input":"types/human.d.ts"} +2022-10-09 14:32:36 STATE: Link: {"input":"types/human.d.ts"} +2022-10-09 14:32:36 INFO:  Analyze models: {"folders":8,"result":"models/models.json"} +2022-10-09 14:32:36 STATE: Models {"folder":"./models","models":12} +2022-10-09 14:32:36 STATE: Models {"folder":"../human-models/models","models":43} +2022-10-09 14:32:36 STATE: Models {"folder":"../blazepose/model/","models":4} +2022-10-09 14:32:36 STATE: Models {"folder":"../anti-spoofing/model","models":1} +2022-10-09 14:32:36 STATE: Models {"folder":"../efficientpose/models","models":3} +2022-10-09 14:32:36 STATE: Models {"folder":"../insightface/models","models":5} +2022-10-09 14:32:36 STATE: Models {"folder":"../movenet/models","models":3} +2022-10-09 14:32:36 STATE: Models {"folder":"../nanodet/models","models":4} +2022-10-09 14:32:36 STATE: Models: {"count":58,"totalSize":386543911} +2022-10-09 14:32:36 INFO:  Human Build complete... {"logFile":"test/build.log"} diff --git a/test/test-backend-node-wasm.js b/test/test-backend-node-wasm.js index da4cc623d..b93e93a98 100644 --- a/test/test-backend-node-wasm.js +++ b/test/test-backend-node-wasm.js @@ -3,7 +3,7 @@ const tf = require('@tensorflow/tfjs'); // wasm backend requires tfjs to be load const wasm = require('@tensorflow/tfjs-backend-wasm'); // wasm backend does not get auto-loaded in nodejs const { Canvas, Image } = require('canvas'); // eslint-disable-line node/no-extraneous-require, node/no-missing-require const H = require('../dist/human.node-wasm.js'); -const test = require('./test-node-main.js').test; +const test = require('./test-node-main.js'); H.env.Canvas = Canvas; // requires monkey-patch as wasm does not have tf.browser namespace H.env.Image = Image; // requires monkey-patch as wasm does not have tf.browser namespace @@ -35,12 +35,16 @@ const config = { }; async function main() { - wasm.setWasmPaths(config.wasmPath); - await tf.setBackend('wasm'); + wasm.setWasmPaths(config.wasmPath, true); + const ok = await tf.setBackend('wasm'); + if (!ok) { + test.log('error', 'failed: setwasmpath', config.wasmPath); + return; + } await tf.ready(); H.env.updateBackend(); log.info(H.env.wasm, config.wasmPath); - test(H.Human, config); + test.test(H.Human, config); } if (require.main === module) main(); diff --git a/test/test-node-main.js b/test/test-node-main.js index 23c228f57..1612da7e8 100644 --- a/test/test-node-main.js +++ b/test/test-node-main.js @@ -572,3 +572,4 @@ async function test(Human, inputConfig) { } exports.test = test; +exports.log = log; diff --git a/test/test.log b/test/test.log index b6f57b2e2..76fcdffc3 100644 --- a/test/test.log +++ b/test/test.log @@ -1,999 +1,1000 @@ -2022-10-02 15:05:46 INFO:  @vladmandic/human version 2.11.0 -2022-10-02 15:05:46 INFO:  User: vlado Platform: linux Arch: x64 Node: v18.10.0 -2022-10-02 15:05:46 INFO:  demos: [{"cmd":"../demo/nodejs/node.js","args":[]},{"cmd":"../demo/nodejs/node-simple.js","args":[]},{"cmd":"../demo/nodejs/node-fetch.js","args":[]},{"cmd":"../demo/nodejs/node-event.js","args":["samples/in/ai-body.jpg"]},{"cmd":"../demo/nodejs/node-similarity.js","args":["samples/in/ai-face.jpg","samples/in/ai-upper.jpg"]},{"cmd":"../demo/nodejs/node-canvas.js","args":["samples/in/ai-body.jpg","samples/out/ai-body.jpg"]},{"cmd":"../demo/nodejs/process-folder.js","args":["samples"]},{"cmd":"../demo/multithread/node-multiprocess.js","args":[]},{"cmd":"../demo/facematch/node-match.js","args":[]}] -2022-10-02 15:05:46 INFO:  {"cmd":"../demo/nodejs/node.js","args":[]} start -2022-10-02 15:05:47 INFO:  {"cmd":"../demo/nodejs/node-simple.js","args":[]} start -2022-10-02 15:05:47 INFO:  {"cmd":"../demo/nodejs/node-fetch.js","args":[]} start -2022-10-02 15:05:50 INFO:  {"cmd":"../demo/nodejs/node-event.js","args":["samples/in/ai-body.jpg"]} start -2022-10-02 15:05:50 INFO:  {"cmd":"../demo/nodejs/node-similarity.js","args":["samples/in/ai-face.jpg","samples/in/ai-upper.jpg"]} start -2022-10-02 15:05:51 INFO:  {"cmd":"../demo/nodejs/node-canvas.js","args":["samples/in/ai-body.jpg","samples/out/ai-body.jpg"]} start -2022-10-02 15:05:52 INFO:  {"cmd":"../demo/nodejs/process-folder.js","args":["samples"]} start -2022-10-02 15:05:53 INFO:  {"cmd":"../demo/multithread/node-multiprocess.js","args":[]} start -2022-10-02 15:06:03 INFO:  {"cmd":"../demo/facematch/node-match.js","args":[]} start -2022-10-02 15:06:05 INFO:  tests: ["test-node-load.js","test-node-gear.js","test-backend-node.js","test-backend-node-gpu.js","test-backend-node-wasm.js"] -2022-10-02 15:06:05 INFO:  -2022-10-02 15:06:05 INFO:  test-node-load.js start -2022-10-02 15:06:05 INFO:  test-node-load.js load start {"human":"2.11.0","tf":"3.20.0","progress":0} -2022-10-02 15:06:05 DATA:  test-node-load.js load interval {"elapsed":0,"progress":0} -2022-10-02 15:06:05 DATA:  test-node-load.js load interval {"elapsed":10,"progress":0} -2022-10-02 15:06:05 DATA:  test-node-load.js load interval {"elapsed":21,"progress":0.05339166087267679} -2022-10-02 15:06:05 DATA:  test-node-load.js load interval {"elapsed":64,"progress":0.5125946867158943} -2022-10-02 15:06:05 STATE: test-node-load.js passed {"progress":1} -2022-10-02 15:06:05 INFO:  test-node-load.js load final {"progress":1} -2022-10-02 15:06:05 DATA:  test-node-load.js load interval {"elapsed":348,"progress":1} -2022-10-02 15:06:05 INFO:  -2022-10-02 15:06:05 INFO:  test-node-gear.js start -2022-10-02 15:06:05 DATA:  test-node-gear.js input: ["samples/in/ai-face.jpg"] -2022-10-02 15:06:06 STATE: test-node-gear.js passed: gear faceres samples/in/ai-face.jpg -2022-10-02 15:06:06 DATA:  test-node-gear.js results {"face":0,"model":"faceres","image":"samples/in/ai-face.jpg","age":23.5,"gender":"female","genderScore":0.92} -2022-10-02 15:06:06 STATE: test-node-gear.js passed: gear gear samples/in/ai-face.jpg -2022-10-02 15:06:06 DATA:  test-node-gear.js results {"face":0,"model":"gear","image":"samples/in/ai-face.jpg","age":23.3,"gender":"female","genderScore":0.51,"race":[{"score":0.93,"race":"white"}]} -2022-10-02 15:06:07 STATE: test-node-gear.js passed: gear ssrnet samples/in/ai-face.jpg -2022-10-02 15:06:07 DATA:  test-node-gear.js results {"face":0,"model":"ssrnet","image":"samples/in/ai-face.jpg","age":23.4,"gender":"female","genderScore":0.99} -2022-10-02 15:06:07 INFO:  -2022-10-02 15:06:07 INFO:  test-backend-node.js start -2022-10-02 15:06:07 INFO:  test-backend-node.js test: configuration validation -2022-10-02 15:06:07 STATE: test-backend-node.js passed: configuration default validation [] -2022-10-02 15:06:07 STATE: test-backend-node.js passed: configuration invalid validation [{"reason":"unknown property","where":"config.invalid = true"}] -2022-10-02 15:06:07 INFO:  test-backend-node.js test: model load -2022-10-02 15:06:07 STATE: test-backend-node.js passed: models loaded 25 11 [{"name":"ssrnetage","loaded":false,"url":null},{"name":"gear","loaded":false,"url":null},{"name":"blazeposedetect","loaded":false,"url":null},{"name":"blazepose","loaded":false,"url":null},{"name":"centernet","loaded":true,"url":"file://models/mb3-centernet.json"},{"name":"efficientpose","loaded":false,"url":null},{"name":"mobilefacenet","loaded":false,"url":null},{"name":"insightface","loaded":false,"url":null},{"name":"emotion","loaded":true,"url":"file://models/emotion.json"},{"name":"facedetect","loaded":true,"url":"file://models/blazeface.json"},{"name":"faceiris","loaded":true,"url":"file://models/iris.json"},{"name":"facemesh","loaded":true,"url":"file://models/facemesh.json"},{"name":"faceres","loaded":true,"url":"file://models/faceres.json"},{"name":"ssrnetgender","loaded":false,"url":null},{"name":"handpose","loaded":false,"url":null},{"name":"handskeleton","loaded":true,"url":"file://models/handlandmark-full.json"},{"name":"handtrack","loaded":true,"url":"file://models/handtrack.json"},{"name":"liveness","loaded":true,"url":"file://models/liveness.json"},{"name":"meet","loaded":false,"url":null},{"name":"movenet","loaded":true,"url":"file://models/movenet-lightning.json"},{"name":"nanodet","loaded":false,"url":null},{"name":"posenet","loaded":false,"url":null},{"name":"selfie","loaded":false,"url":null},{"name":"rvm","loaded":false,"url":null},{"name":"antispoof","loaded":true,"url":"file://models/antispoof.json"}] -2022-10-02 15:06:07 INFO:  test-backend-node.js memory: {"memory":{"unreliable":true,"numTensors":1785,"numDataBuffers":1785,"numBytes":63247332}} -2022-10-02 15:06:07 INFO:  test-backend-node.js state: {"state":{"registeredVariables":{},"nextTapeNodeId":0,"numBytes":63247332,"numTensors":1785,"numStringTensors":0,"numDataBuffers":1785,"gradientDepth":0,"kernelDepth":0,"scopeStack":[],"numDataMovesStack":[],"nextScopeId":0,"tensorInfo":{},"profiling":false,"activeProfile":{"newBytes":0,"newTensors":0,"peakBytes":0,"kernels":[],"result":null,"kernelNames":[]}}} -2022-10-02 15:06:07 INFO:  test-backend-node.js test: warmup -2022-10-02 15:06:07 STATE: test-backend-node.js passed: create human -2022-10-02 15:06:07 INFO:  test-backend-node.js human version: 2.11.0 -2022-10-02 15:06:07 INFO:  test-backend-node.js platform: linux x64 agent: NodeJS v18.10.0 -2022-10-02 15:06:07 INFO:  test-backend-node.js tfjs version: 3.20.0 -2022-10-02 15:06:07 INFO:  test-backend-node.js env: {"browser":false,"node":true,"platform":"linux x64","agent":"NodeJS v18.10.0","backends":["cpu","tensorflow"],"initial":false,"tfjs":{"version":"3.20.0"},"offscreen":false,"perfadd":false,"tensorflow":{"version":"2.7.3-dev20220521","gpu":false},"wasm":{"supported":true,"backend":false},"webgl":{"supported":false,"backend":false},"webgpu":{"supported":false,"backend":false},"cpu":{"flags":[]},"kernels":169} -2022-10-02 15:06:07 STATE: test-backend-node.js passed: set backend: tensorflow -2022-10-02 15:06:07 STATE: test-backend-node.js tensors 1785 -2022-10-02 15:06:07 STATE: test-backend-node.js passed: load models -2022-10-02 15:06:07 STATE: test-backend-node.js result: defined models: 25 loaded models: 11 -2022-10-02 15:06:07 STATE: test-backend-node.js passed: warmup: none default -2022-10-02 15:06:07 DATA:  test-backend-node.js result: face: 0 body: 0 hand: 0 gesture: 0 object: 0 person: 0 {} {} {} -2022-10-02 15:06:07 DATA:  test-backend-node.js result: performance: load: null total: null -2022-10-02 15:06:07 STATE: test-backend-node.js passed: warmup none result match -2022-10-02 15:06:07 STATE: test-backend-node.js event: image -2022-10-02 15:06:07 STATE: test-backend-node.js event: detect -2022-10-02 15:06:07 STATE: test-backend-node.js event: warmup -2022-10-02 15:06:07 STATE: test-backend-node.js passed: warmup: face default -2022-10-02 15:06:07 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 1 gesture: 7 object: 1 person: 1 {"score":1,"age":23.5,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.42,"keypoints":4} -2022-10-02 15:06:07 DATA:  test-backend-node.js result: performance: load: null total: 368 -2022-10-02 15:06:07 STATE: test-backend-node.js passed: warmup face result match -2022-10-02 15:06:07 STATE: test-backend-node.js event: image -2022-10-02 15:06:07 STATE: test-backend-node.js event: detect -2022-10-02 15:06:07 STATE: test-backend-node.js event: warmup -2022-10-02 15:06:07 STATE: test-backend-node.js passed: warmup: body default -2022-10-02 15:06:07 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 1 gesture: 7 object: 1 person: 1 {"score":1,"age":23.7,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2022-10-02 15:06:07 DATA:  test-backend-node.js result: performance: load: null total: 242 -2022-10-02 15:06:07 STATE: test-backend-node.js passed: warmup body result match -2022-10-02 15:06:07 STATE: test-backend-node.js details: {"face":{"boxScore":0.92,"faceScore":1,"age":23.7,"gender":"female","genderScore":0.97},"emotion":[{"score":0.63,"emotion":"angry"},{"score":0.22,"emotion":"fear"}],"body":{"score":0.92,"keypoints":17},"hand":{"boxScore":0.52,"fingerScore":0.73,"keypoints":21},"gestures":[{"face":0,"gesture":"facing right"},{"face":0,"gesture":"mouth 10% open"},{"hand":0,"gesture":"pinky forward"},{"hand":0,"gesture":"palm up"},{"hand":0,"gesture":"open palm"},{"iris":0,"gesture":"looking left"},{"iris":0,"gesture":"looking up"}]} -2022-10-02 15:06:07 INFO:  test-backend-node.js test: details verification -2022-10-02 15:06:07 STATE: test-backend-node.js start default -2022-10-02 15:06:08 STATE: test-backend-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} -2022-10-02 15:06:08 STATE: test-backend-node.js event: image -2022-10-02 15:06:08 STATE: test-backend-node.js event: detect -2022-10-02 15:06:08 STATE: test-backend-node.js passed: detect: samples/in/ai-body.jpg default -2022-10-02 15:06:08 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 1 gesture: 7 object: 1 person: 1 {"score":1,"age":23.7,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2022-10-02 15:06:08 DATA:  test-backend-node.js result: performance: load: null total: 230 -2022-10-02 15:06:08 STATE: test-backend-node.js passed: details face length 1 -2022-10-02 15:06:08 STATE: test-backend-node.js passed: details face score 1 0.93 1 -2022-10-02 15:06:08 STATE: test-backend-node.js passed: details face age/gender 23.7 female 0.97 85.47 -2022-10-02 15:06:08 STATE: test-backend-node.js passed: details face arrays 4 478 1024 -2022-10-02 15:06:08 STATE: test-backend-node.js passed: details face emotion 2 {"score":0.59,"emotion":"angry"} -2022-10-02 15:06:08 STATE: test-backend-node.js passed: details face anti-spoofing 0.79 -2022-10-02 15:06:08 STATE: test-backend-node.js passed: details face liveness 0.83 -2022-10-02 15:06:08 STATE: test-backend-node.js passed: details body length 1 -2022-10-02 15:06:08 STATE: test-backend-node.js passed: details body 0.92 17 6 -2022-10-02 15:06:08 STATE: test-backend-node.js passed: details hand length 1 -2022-10-02 15:06:08 STATE: test-backend-node.js passed: details hand 0.51 0.73 point -2022-10-02 15:06:08 STATE: test-backend-node.js passed: details hand arrays 21 5 7 -2022-10-02 15:06:08 STATE: test-backend-node.js passed: details gesture length 7 -2022-10-02 15:06:08 STATE: test-backend-node.js passed: details gesture first {"face":0,"gesture":"facing right"} -2022-10-02 15:06:08 STATE: test-backend-node.js passed: details object length 1 -2022-10-02 15:06:08 STATE: test-backend-node.js passed: details object 0.72 person -2022-10-02 15:06:08 STATE: test-backend-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,4] {"checksum":1371996928} -2022-10-02 15:06:08 STATE: test-backend-node.js event: image -2022-10-02 15:06:08 STATE: test-backend-node.js event: detect -2022-10-02 15:06:08 STATE: test-backend-node.js passed: tensor shape: [1,1200,1200,4] dtype: float32 -2022-10-02 15:06:08 STATE: test-backend-node.js passed: load image: samples/in/ai-body.jpg [1200,1200,4] {"checksum":1371996928} -2022-10-02 15:06:08 STATE: test-backend-node.js event: image -2022-10-02 15:06:09 STATE: test-backend-node.js event: detect -2022-10-02 15:06:09 STATE: test-backend-node.js passed: tensor shape: [1200,1200,4] dtype: float32 -2022-10-02 15:06:09 STATE: test-backend-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} -2022-10-02 15:06:09 STATE: test-backend-node.js event: image -2022-10-02 15:06:09 STATE: test-backend-node.js event: detect -2022-10-02 15:06:09 STATE: test-backend-node.js passed: tensor shape: [1,1200,1200,3] dtype: float32 -2022-10-02 15:06:09 STATE: test-backend-node.js passed: load image: samples/in/ai-body.jpg [1200,1200,3] {"checksum":1004796864} -2022-10-02 15:06:09 STATE: test-backend-node.js event: image -2022-10-02 15:06:09 STATE: test-backend-node.js event: detect -2022-10-02 15:06:09 STATE: test-backend-node.js passed: tensor shape: [1200,1200,3] dtype: float32 -2022-10-02 15:06:10 STATE: test-backend-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,4] {"checksum":1371996871} -2022-10-02 15:06:10 STATE: test-backend-node.js event: image -2022-10-02 15:06:10 STATE: test-backend-node.js event: detect -2022-10-02 15:06:10 STATE: test-backend-node.js passed: tensor shape: [1,1200,1200,4] dtype: int32 -2022-10-02 15:06:10 INFO:  test-backend-node.js test default -2022-10-02 15:06:10 STATE: test-backend-node.js start async -2022-10-02 15:06:10 STATE: test-backend-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} -2022-10-02 15:06:10 STATE: test-backend-node.js event: image -2022-10-02 15:06:10 STATE: test-backend-node.js event: detect -2022-10-02 15:06:10 STATE: test-backend-node.js passed: detect: samples/in/ai-body.jpg async -2022-10-02 15:06:10 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 1 gesture: 7 object: 1 person: 1 {"score":1,"age":23.7,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2022-10-02 15:06:10 DATA:  test-backend-node.js result: performance: load: null total: 212 -2022-10-02 15:06:10 STATE: test-backend-node.js passed: default result face match 1 female 0.97 -2022-10-02 15:06:10 INFO:  test-backend-node.js test sync -2022-10-02 15:06:10 STATE: test-backend-node.js start sync -2022-10-02 15:06:10 STATE: test-backend-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} -2022-10-02 15:06:10 STATE: test-backend-node.js event: image -2022-10-02 15:06:11 STATE: test-backend-node.js event: detect -2022-10-02 15:06:11 STATE: test-backend-node.js passed: detect: samples/in/ai-body.jpg sync -2022-10-02 15:06:11 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 1 gesture: 7 object: 1 person: 1 {"score":1,"age":23.7,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2022-10-02 15:06:11 DATA:  test-backend-node.js result: performance: load: null total: 206 -2022-10-02 15:06:11 STATE: test-backend-node.js passed: default sync 1 female 0.97 -2022-10-02 15:06:11 INFO:  test-backend-node.js test: image process -2022-10-02 15:06:11 STATE: test-backend-node.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} -2022-10-02 15:06:11 STATE: test-backend-node.js passed: image input null [1,256,256,3] -2022-10-02 15:06:11 INFO:  test-backend-node.js test: image null -2022-10-02 15:06:11 STATE: test-backend-node.js passed: invalid input could not convert input to tensor -2022-10-02 15:06:11 INFO:  test-backend-node.js test face similarity -2022-10-02 15:06:11 STATE: test-backend-node.js start face similarity -2022-10-02 15:06:11 STATE: test-backend-node.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} -2022-10-02 15:06:11 STATE: test-backend-node.js event: image -2022-10-02 15:06:11 STATE: test-backend-node.js event: detect -2022-10-02 15:06:11 STATE: test-backend-node.js passed: detect: samples/in/ai-face.jpg face similarity -2022-10-02 15:06:11 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 1 gesture: 6 object: 1 person: 1 {"score":1,"age":23.5,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.47,"keypoints":3} -2022-10-02 15:06:11 DATA:  test-backend-node.js result: performance: load: null total: 204 -2022-10-02 15:06:11 STATE: test-backend-node.js start face similarity -2022-10-02 15:06:11 STATE: test-backend-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} -2022-10-02 15:06:11 STATE: test-backend-node.js event: image -2022-10-02 15:06:11 STATE: test-backend-node.js event: detect -2022-10-02 15:06:11 STATE: test-backend-node.js passed: detect: samples/in/ai-body.jpg face similarity -2022-10-02 15:06:11 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 1 gesture: 7 object: 1 person: 1 {"score":1,"age":23.7,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2022-10-02 15:06:11 DATA:  test-backend-node.js result: performance: load: null total: 216 -2022-10-02 15:06:11 STATE: test-backend-node.js start face similarity -2022-10-02 15:06:11 STATE: test-backend-node.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289024} -2022-10-02 15:06:11 STATE: test-backend-node.js event: image -2022-10-02 15:06:11 STATE: test-backend-node.js event: detect -2022-10-02 15:06:11 STATE: test-backend-node.js passed: detect: samples/in/ai-upper.jpg face similarity -2022-10-02 15:06:11 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 1 person: 1 {"score":1,"age":23.5,"gender":"female"} {"score":0.71,"class":"person"} {"score":0.75,"keypoints":7} -2022-10-02 15:06:11 DATA:  test-backend-node.js result: performance: load: null total: 197 -2022-10-02 15:06:11 STATE: test-backend-node.js passed: face descriptor -2022-10-02 15:06:11 STATE: test-backend-node.js passed: face similarity {"similarity":[1,0.44727452329649126,0.5567935850640406],"descriptors":[1024,1024,1024]} -2022-10-02 15:06:11 INFO:  test-backend-node.js test object -2022-10-02 15:06:11 STATE: test-backend-node.js start object -2022-10-02 15:06:12 STATE: test-backend-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} -2022-10-02 15:06:12 STATE: test-backend-node.js event: image -2022-10-02 15:06:12 STATE: test-backend-node.js event: detect -2022-10-02 15:06:12 STATE: test-backend-node.js passed: detect: samples/in/ai-body.jpg object -2022-10-02 15:06:12 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 1 gesture: 7 object: 1 person: 1 {"score":1,"age":23.7,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2022-10-02 15:06:12 DATA:  test-backend-node.js result: performance: load: null total: 208 -2022-10-02 15:06:12 STATE: test-backend-node.js passed: centernet -2022-10-02 15:06:12 STATE: test-backend-node.js start object -2022-10-02 15:06:13 STATE: test-backend-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} -2022-10-02 15:06:13 STATE: test-backend-node.js event: image -2022-10-02 15:06:13 STATE: test-backend-node.js event: detect -2022-10-02 15:06:13 STATE: test-backend-node.js passed: detect: samples/in/ai-body.jpg object -2022-10-02 15:06:13 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 1 gesture: 7 object: 3 person: 1 {"score":1,"age":23.7,"gender":"female"} {"score":0.86,"class":"person"} {"score":0.92,"keypoints":17} -2022-10-02 15:06:13 DATA:  test-backend-node.js result: performance: load: null total: 219 -2022-10-02 15:06:13 STATE: test-backend-node.js passed: nanodet -2022-10-02 15:06:13 INFO:  test-backend-node.js test sensitive -2022-10-02 15:06:13 STATE: test-backend-node.js start sensitive -2022-10-02 15:06:13 STATE: test-backend-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} -2022-10-02 15:06:13 STATE: test-backend-node.js event: image -2022-10-02 15:06:13 STATE: test-backend-node.js event: detect -2022-10-02 15:06:13 STATE: test-backend-node.js passed: detect: samples/in/ai-body.jpg sensitive -2022-10-02 15:06:13 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 2 gesture: 9 object: 0 person: 1 {"score":1,"age":23.7,"gender":"female"} {} {"score":0.92,"keypoints":17} -2022-10-02 15:06:13 DATA:  test-backend-node.js result: performance: load: null total: 190 -2022-10-02 15:06:13 STATE: test-backend-node.js passed: sensitive result match -2022-10-02 15:06:13 STATE: test-backend-node.js passed: sensitive face result match -2022-10-02 15:06:13 STATE: test-backend-node.js passed: sensitive face emotion result [{"score":0.59,"emotion":"angry"},{"score":0.29,"emotion":"fear"}] -2022-10-02 15:06:13 STATE: test-backend-node.js passed: sensitive body result match -2022-10-02 15:06:13 STATE: test-backend-node.js passed: sensitive hand result match -2022-10-02 15:06:13 INFO:  test-backend-node.js test body -2022-10-02 15:06:13 STATE: test-backend-node.js start blazepose -2022-10-02 15:06:15 STATE: test-backend-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} -2022-10-02 15:06:15 STATE: test-backend-node.js event: image -2022-10-02 15:06:15 STATE: test-backend-node.js event: detect -2022-10-02 15:06:15 STATE: test-backend-node.js passed: detect: samples/in/ai-body.jpg blazepose -2022-10-02 15:06:15 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 2 gesture: 9 object: 0 person: 1 {"score":1,"age":23.7,"gender":"female"} {} {"score":0.99,"keypoints":39} -2022-10-02 15:06:15 DATA:  test-backend-node.js result: performance: load: null total: 229 -2022-10-02 15:06:15 STATE: test-backend-node.js passed: blazepose -2022-10-02 15:06:15 STATE: test-backend-node.js start efficientpose -2022-10-02 15:06:16 STATE: test-backend-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} -2022-10-02 15:06:16 STATE: test-backend-node.js event: image -2022-10-02 15:06:16 STATE: test-backend-node.js event: detect -2022-10-02 15:06:16 STATE: test-backend-node.js passed: detect: samples/in/ai-body.jpg efficientpose -2022-10-02 15:06:16 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 2 gesture: 9 object: 0 person: 1 {"score":1,"age":23.7,"gender":"female"} {} {"score":0.75,"keypoints":13} -2022-10-02 15:06:16 DATA:  test-backend-node.js result: performance: load: null total: 251 -2022-10-02 15:06:16 STATE: test-backend-node.js passed: efficientpose -2022-10-02 15:06:16 STATE: test-backend-node.js start posenet -2022-10-02 15:06:17 STATE: test-backend-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} -2022-10-02 15:06:17 STATE: test-backend-node.js event: image -2022-10-02 15:06:17 STATE: test-backend-node.js event: detect -2022-10-02 15:06:17 STATE: test-backend-node.js passed: detect: samples/in/ai-body.jpg posenet -2022-10-02 15:06:17 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 2 gesture: 9 object: 0 person: 1 {"score":1,"age":23.7,"gender":"female"} {} {"score":0.96,"keypoints":16} -2022-10-02 15:06:17 DATA:  test-backend-node.js result: performance: load: null total: 170 -2022-10-02 15:06:17 STATE: test-backend-node.js passed: posenet -2022-10-02 15:06:17 STATE: test-backend-node.js start movenet -2022-10-02 15:06:17 STATE: test-backend-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} -2022-10-02 15:06:17 STATE: test-backend-node.js event: image -2022-10-02 15:06:17 STATE: test-backend-node.js event: detect -2022-10-02 15:06:17 STATE: test-backend-node.js passed: detect: samples/in/ai-body.jpg movenet -2022-10-02 15:06:17 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 2 gesture: 9 object: 0 person: 1 {"score":1,"age":23.7,"gender":"female"} {} {"score":0.92,"keypoints":17} -2022-10-02 15:06:17 DATA:  test-backend-node.js result: performance: load: null total: 179 -2022-10-02 15:06:17 STATE: test-backend-node.js passed: movenet -2022-10-02 15:06:17 INFO:  test-backend-node.js test face matching -2022-10-02 15:06:17 STATE: test-backend-node.js passed: face database 40 -2022-10-02 15:06:17 STATE: test-backend-node.js passed: face match {"first":{"index":4,"similarity":0.7827852615252829}} {"second":{"index":4,"similarity":0.5002052633015844}} {"third":{"index":4,"similarity":0.5401587887998899}} -2022-10-02 15:06:17 INFO:  test-backend-node.js test face similarity alternative -2022-10-02 15:06:17 STATE: test-backend-node.js start face embeddings -2022-10-02 15:06:18 STATE: test-backend-node.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} -2022-10-02 15:06:18 STATE: test-backend-node.js event: image -2022-10-02 15:06:18 STATE: test-backend-node.js event: detect -2022-10-02 15:06:18 STATE: test-backend-node.js passed: detect: samples/in/ai-face.jpg face embeddings -2022-10-02 15:06:18 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 2 gesture: 8 object: 0 person: 1 {"score":1,"age":23.5,"gender":"female"} {} {"score":0.47,"keypoints":3} -2022-10-02 15:06:18 DATA:  test-backend-node.js result: performance: load: null total: 185 -2022-10-02 15:06:18 STATE: test-backend-node.js passed: mobilefacenet {"embedding":192} -2022-10-02 15:06:18 STATE: test-backend-node.js start face embeddings -2022-10-02 15:06:19 STATE: test-backend-node.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} -2022-10-02 15:06:19 STATE: test-backend-node.js event: image -2022-10-02 15:06:19 STATE: test-backend-node.js event: detect -2022-10-02 15:06:19 STATE: test-backend-node.js passed: detect: samples/in/ai-face.jpg face embeddings -2022-10-02 15:06:19 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 2 gesture: 8 object: 0 person: 1 {"score":1,"age":23.5,"gender":"female"} {} {"score":0.47,"keypoints":3} -2022-10-02 15:06:19 DATA:  test-backend-node.js result: performance: load: null total: 193 -2022-10-02 15:06:19 STATE: test-backend-node.js passed: insightface {"embedding":512} -2022-10-02 15:06:19 INFO:  test-backend-node.js test face attention -2022-10-02 15:06:19 STATE: test-backend-node.js start face attention -2022-10-02 15:06:19 STATE: test-backend-node.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} -2022-10-02 15:06:19 STATE: test-backend-node.js event: image -2022-10-02 15:06:19 STATE: test-backend-node.js event: detect -2022-10-02 15:06:19 STATE: test-backend-node.js passed: detect: samples/in/ai-face.jpg face attention -2022-10-02 15:06:19 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 2 gesture: 8 object: 0 person: 1 {"score":1,"age":23.5,"gender":"female"} {} {"score":0.47,"keypoints":3} -2022-10-02 15:06:19 DATA:  test-backend-node.js result: performance: load: null total: 185 -2022-10-02 15:06:19 STATE: test-backend-node.js passed: face attention -2022-10-02 15:06:19 INFO:  test-backend-node.js test detectors -2022-10-02 15:06:19 STATE: test-backend-node.js start detectors -2022-10-02 15:06:19 STATE: test-backend-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} -2022-10-02 15:06:19 STATE: test-backend-node.js event: image -2022-10-02 15:06:20 STATE: test-backend-node.js event: detect -2022-10-02 15:06:20 STATE: test-backend-node.js passed: detect: samples/in/ai-body.jpg detectors -2022-10-02 15:06:20 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 0 person: 1 {"score":0.93,"gender":"unknown"} {} {"score":0.92,"keypoints":17} -2022-10-02 15:06:20 DATA:  test-backend-node.js result: performance: load: null total: 131 -2022-10-02 15:06:20 STATE: test-backend-node.js passed: detector result face match -2022-10-02 15:06:20 STATE: test-backend-node.js passed: detector result hand match -2022-10-02 15:06:20 INFO:  test-backend-node.js test: multi-instance -2022-10-02 15:06:20 STATE: test-backend-node.js start multi instance -2022-10-02 15:06:20 STATE: test-backend-node.js event: image -2022-10-02 15:06:20 STATE: test-backend-node.js event: detect -2022-10-02 15:06:20 STATE: test-backend-node.js passed: detect: random multi instance -2022-10-02 15:06:20 DATA:  test-backend-node.js result: face: 0 body: 1 hand: 0 gesture: 0 object: 0 person: 0 {} {} {"score":0,"keypoints":0} -2022-10-02 15:06:20 DATA:  test-backend-node.js result: performance: load: null total: 88 -2022-10-02 15:06:20 INFO:  test-backend-node.js test: first instance -2022-10-02 15:06:20 STATE: test-backend-node.js start multi instance -2022-10-02 15:06:20 STATE: test-backend-node.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289024} -2022-10-02 15:06:20 STATE: test-backend-node.js passed: detect: samples/in/ai-upper.jpg multi instance -2022-10-02 15:06:20 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 0 person: 1 {"score":0.96,"gender":"unknown"} {} {"score":0.75,"keypoints":7} -2022-10-02 15:06:20 DATA:  test-backend-node.js result: performance: load: null total: 107 -2022-10-02 15:06:20 INFO:  test-backend-node.js test: second instance -2022-10-02 15:06:20 STATE: test-backend-node.js start multi instance -2022-10-02 15:06:20 STATE: test-backend-node.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289024} -2022-10-02 15:06:20 STATE: test-backend-node.js passed: detect: samples/in/ai-upper.jpg multi instance -2022-10-02 15:06:20 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 0 person: 1 {"score":0.96,"gender":"unknown"} {} {"score":0.75,"keypoints":7} -2022-10-02 15:06:20 DATA:  test-backend-node.js result: performance: load: null total: 94 -2022-10-02 15:06:20 INFO:  test-backend-node.js test: concurrent -2022-10-02 15:06:20 STATE: test-backend-node.js start concurrent -2022-10-02 15:06:20 STATE: test-backend-node.js start concurrent -2022-10-02 15:06:20 STATE: test-backend-node.js start concurrent -2022-10-02 15:06:20 STATE: test-backend-node.js start concurrent -2022-10-02 15:06:20 STATE: test-backend-node.js start concurrent -2022-10-02 15:06:20 STATE: test-backend-node.js start concurrent -2022-10-02 15:06:20 STATE: test-backend-node.js start concurrent -2022-10-02 15:06:20 STATE: test-backend-node.js start concurrent -2022-10-02 15:06:20 STATE: test-backend-node.js start concurrent -2022-10-02 15:06:20 STATE: test-backend-node.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} -2022-10-02 15:06:20 STATE: test-backend-node.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} -2022-10-02 15:06:20 STATE: test-backend-node.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} -2022-10-02 15:06:20 STATE: test-backend-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} -2022-10-02 15:06:20 STATE: test-backend-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} -2022-10-02 15:06:21 STATE: test-backend-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} -2022-10-02 15:06:21 STATE: test-backend-node.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289024} -2022-10-02 15:06:21 STATE: test-backend-node.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289024} -2022-10-02 15:06:21 STATE: test-backend-node.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289024} -2022-10-02 15:06:21 STATE: test-backend-node.js event: image -2022-10-02 15:06:21 STATE: test-backend-node.js event: image -2022-10-02 15:06:21 STATE: test-backend-node.js event: image -2022-10-02 15:06:22 STATE: test-backend-node.js event: detect -2022-10-02 15:06:22 STATE: test-backend-node.js passed: detect: samples/in/ai-upper.jpg concurrent -2022-10-02 15:06:22 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 0 person: 1 {"score":0.96,"gender":"unknown"} {} {"score":0.75,"keypoints":7} -2022-10-02 15:06:22 DATA:  test-backend-node.js result: performance: load: null total: 846 -2022-10-02 15:06:22 STATE: test-backend-node.js passed: detect: samples/in/ai-upper.jpg concurrent -2022-10-02 15:06:22 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 0 person: 1 {"score":0.96,"gender":"unknown"} {} {"score":0.75,"keypoints":7} -2022-10-02 15:06:22 DATA:  test-backend-node.js result: performance: load: null total: 847 -2022-10-02 15:06:22 STATE: test-backend-node.js passed: detect: samples/in/ai-upper.jpg concurrent -2022-10-02 15:06:22 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 0 person: 1 {"score":0.96,"gender":"unknown"} {} {"score":0.75,"keypoints":7} -2022-10-02 15:06:22 DATA:  test-backend-node.js result: performance: load: null total: 847 -2022-10-02 15:06:22 STATE: test-backend-node.js event: detect -2022-10-02 15:06:22 STATE: test-backend-node.js event: detect -2022-10-02 15:06:22 STATE: test-backend-node.js passed: detect: samples/in/ai-face.jpg concurrent -2022-10-02 15:06:22 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 0 person: 1 {"score":0.91,"gender":"unknown"} {} {"score":0.47,"keypoints":3} -2022-10-02 15:06:22 DATA:  test-backend-node.js result: performance: load: null total: 847 -2022-10-02 15:06:22 STATE: test-backend-node.js passed: detect: samples/in/ai-face.jpg concurrent -2022-10-02 15:06:22 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 0 person: 1 {"score":0.91,"gender":"unknown"} {} {"score":0.47,"keypoints":3} -2022-10-02 15:06:22 DATA:  test-backend-node.js result: performance: load: null total: 847 -2022-10-02 15:06:22 STATE: test-backend-node.js passed: detect: samples/in/ai-face.jpg concurrent -2022-10-02 15:06:22 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 0 person: 1 {"score":0.91,"gender":"unknown"} {} {"score":0.47,"keypoints":3} -2022-10-02 15:06:22 DATA:  test-backend-node.js result: performance: load: null total: 847 -2022-10-02 15:06:22 STATE: test-backend-node.js passed: detect: samples/in/ai-body.jpg concurrent -2022-10-02 15:06:22 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 0 person: 1 {"score":0.93,"gender":"unknown"} {} {"score":0.92,"keypoints":17} -2022-10-02 15:06:22 DATA:  test-backend-node.js result: performance: load: null total: 847 -2022-10-02 15:06:22 STATE: test-backend-node.js passed: detect: samples/in/ai-body.jpg concurrent -2022-10-02 15:06:22 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 0 person: 1 {"score":0.93,"gender":"unknown"} {} {"score":0.92,"keypoints":17} -2022-10-02 15:06:22 DATA:  test-backend-node.js result: performance: load: null total: 847 -2022-10-02 15:06:22 STATE: test-backend-node.js passed: detect: samples/in/ai-body.jpg concurrent -2022-10-02 15:06:22 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 0 person: 1 {"score":0.93,"gender":"unknown"} {} {"score":0.92,"keypoints":17} -2022-10-02 15:06:22 DATA:  test-backend-node.js result: performance: load: null total: 847 -2022-10-02 15:06:22 INFO:  test-backend-node.js test: monkey-patch -2022-10-02 15:06:22 STATE: test-backend-node.js event: image -2022-10-02 15:06:22 STATE: test-backend-node.js event: detect -2022-10-02 15:06:22 STATE: test-backend-node.js passed: monkey patch -2022-10-02 15:06:22 STATE: test-backend-node.js passed: segmentation [262144] -2022-10-02 15:06:22 STATE: test-backend-node.js passeed: equal usage -2022-10-02 15:06:22 INFO:  test-backend-node.js test: input compare -2022-10-02 15:06:22 STATE: test-backend-node.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} -2022-10-02 15:06:22 STATE: test-backend-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} -2022-10-02 15:06:22 STATE: test-backend-node.js passed: image compare 0 23.275441687091504 -2022-10-02 15:06:22 INFO:  test-backend-node.js events: {"image":29,"detect":29,"warmup":2} -2022-10-02 15:06:22 INFO:  test-backend-node.js tensors 4441 -2022-10-02 15:06:22 INFO:  test-backend-node.js test complete: 15609 ms -2022-10-02 15:06:22 INFO:  -2022-10-02 15:06:22 INFO:  test-backend-node-gpu.js start -2022-10-02 15:06:23 INFO:  test-backend-node-gpu.js test: configuration validation -2022-10-02 15:06:23 STATE: test-backend-node-gpu.js passed: configuration default validation [] -2022-10-02 15:06:23 STATE: test-backend-node-gpu.js passed: configuration invalid validation [{"reason":"unknown property","where":"config.invalid = true"}] -2022-10-02 15:06:23 INFO:  test-backend-node-gpu.js test: model load -2022-10-02 15:06:23 STATE: test-backend-node-gpu.js passed: models loaded 25 11 [{"name":"ssrnetage","loaded":false,"url":null},{"name":"gear","loaded":false,"url":null},{"name":"blazeposedetect","loaded":false,"url":null},{"name":"blazepose","loaded":false,"url":null},{"name":"centernet","loaded":true,"url":"file://models/mb3-centernet.json"},{"name":"efficientpose","loaded":false,"url":null},{"name":"mobilefacenet","loaded":false,"url":null},{"name":"insightface","loaded":false,"url":null},{"name":"emotion","loaded":true,"url":"file://models/emotion.json"},{"name":"facedetect","loaded":true,"url":"file://models/blazeface.json"},{"name":"faceiris","loaded":true,"url":"file://models/iris.json"},{"name":"facemesh","loaded":true,"url":"file://models/facemesh.json"},{"name":"faceres","loaded":true,"url":"file://models/faceres.json"},{"name":"ssrnetgender","loaded":false,"url":null},{"name":"handpose","loaded":false,"url":null},{"name":"handskeleton","loaded":true,"url":"file://models/handlandmark-full.json"},{"name":"handtrack","loaded":true,"url":"file://models/handtrack.json"},{"name":"liveness","loaded":true,"url":"file://models/liveness.json"},{"name":"meet","loaded":false,"url":null},{"name":"movenet","loaded":true,"url":"file://models/movenet-lightning.json"},{"name":"nanodet","loaded":false,"url":null},{"name":"posenet","loaded":false,"url":null},{"name":"selfie","loaded":false,"url":null},{"name":"rvm","loaded":false,"url":null},{"name":"antispoof","loaded":true,"url":"file://models/antispoof.json"}] -2022-10-02 15:06:23 INFO:  test-backend-node-gpu.js memory: {"memory":{"unreliable":true,"numTensors":1785,"numDataBuffers":1785,"numBytes":63247332}} -2022-10-02 15:06:23 INFO:  test-backend-node-gpu.js state: {"state":{"registeredVariables":{},"nextTapeNodeId":0,"numBytes":63247332,"numTensors":1785,"numStringTensors":0,"numDataBuffers":1785,"gradientDepth":0,"kernelDepth":0,"scopeStack":[],"numDataMovesStack":[],"nextScopeId":0,"tensorInfo":{},"profiling":false,"activeProfile":{"newBytes":0,"newTensors":0,"peakBytes":0,"kernels":[],"result":null,"kernelNames":[]}}} -2022-10-02 15:06:23 INFO:  test-backend-node-gpu.js test: warmup -2022-10-02 15:06:23 STATE: test-backend-node-gpu.js passed: create human -2022-10-02 15:06:23 INFO:  test-backend-node-gpu.js human version: 2.11.0 -2022-10-02 15:06:23 INFO:  test-backend-node-gpu.js platform: linux x64 agent: NodeJS v18.10.0 -2022-10-02 15:06:23 INFO:  test-backend-node-gpu.js tfjs version: 3.20.0 -2022-10-02 15:06:23 INFO:  test-backend-node-gpu.js env: {"browser":false,"node":true,"platform":"linux x64","agent":"NodeJS v18.10.0","backends":["cpu","tensorflow"],"initial":false,"tfjs":{"version":"3.20.0"},"offscreen":false,"perfadd":false,"tensorflow":{"version":"2.7.3-dev20220521","gpu":true},"wasm":{"supported":true,"backend":false},"webgl":{"supported":false,"backend":false},"webgpu":{"supported":false,"backend":false},"cpu":{"flags":[]},"kernels":169} -2022-10-02 15:06:23 STATE: test-backend-node-gpu.js passed: set backend: tensorflow -2022-10-02 15:06:23 STATE: test-backend-node-gpu.js tensors 1785 -2022-10-02 15:06:23 STATE: test-backend-node-gpu.js passed: load models -2022-10-02 15:06:23 STATE: test-backend-node-gpu.js result: defined models: 25 loaded models: 11 -2022-10-02 15:06:23 STATE: test-backend-node-gpu.js passed: warmup: none default -2022-10-02 15:06:23 DATA:  test-backend-node-gpu.js result: face: 0 body: 0 hand: 0 gesture: 0 object: 0 person: 0 {} {} {} -2022-10-02 15:06:23 DATA:  test-backend-node-gpu.js result: performance: load: null total: null -2022-10-02 15:06:23 STATE: test-backend-node-gpu.js passed: warmup none result match -2022-10-02 15:06:23 STATE: test-backend-node-gpu.js event: image -2022-10-02 15:06:25 STATE: test-backend-node-gpu.js event: detect -2022-10-02 15:06:25 STATE: test-backend-node-gpu.js event: warmup -2022-10-02 15:06:25 STATE: test-backend-node-gpu.js passed: warmup: face default -2022-10-02 15:06:25 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 7 object: 1 person: 1 {"score":1,"age":23.5,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.42,"keypoints":4} -2022-10-02 15:06:25 DATA:  test-backend-node-gpu.js result: performance: load: null total: 1937 -2022-10-02 15:06:25 STATE: test-backend-node-gpu.js passed: warmup face result match -2022-10-02 15:06:25 STATE: test-backend-node-gpu.js event: image -2022-10-02 15:06:26 STATE: test-backend-node-gpu.js event: detect -2022-10-02 15:06:26 STATE: test-backend-node-gpu.js event: warmup -2022-10-02 15:06:26 STATE: test-backend-node-gpu.js passed: warmup: body default -2022-10-02 15:06:26 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 7 object: 1 person: 1 {"score":1,"age":23.7,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2022-10-02 15:06:26 DATA:  test-backend-node-gpu.js result: performance: load: null total: 198 -2022-10-02 15:06:26 STATE: test-backend-node-gpu.js passed: warmup body result match -2022-10-02 15:06:26 STATE: test-backend-node-gpu.js details: {"face":{"boxScore":0.92,"faceScore":1,"age":23.7,"gender":"female","genderScore":0.97},"emotion":[{"score":0.63,"emotion":"angry"},{"score":0.22,"emotion":"fear"}],"body":{"score":0.92,"keypoints":17},"hand":{"boxScore":0.52,"fingerScore":0.73,"keypoints":21},"gestures":[{"face":0,"gesture":"facing right"},{"face":0,"gesture":"mouth 10% open"},{"hand":0,"gesture":"pinky forward"},{"hand":0,"gesture":"palm up"},{"hand":0,"gesture":"open palm"},{"iris":0,"gesture":"looking left"},{"iris":0,"gesture":"looking up"}]} -2022-10-02 15:06:26 INFO:  test-backend-node-gpu.js test: details verification -2022-10-02 15:06:26 STATE: test-backend-node-gpu.js start default -2022-10-02 15:06:26 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796928} -2022-10-02 15:06:26 STATE: test-backend-node-gpu.js event: image -2022-10-02 15:06:26 STATE: test-backend-node-gpu.js event: detect -2022-10-02 15:06:26 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-body.jpg default -2022-10-02 15:06:26 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 7 object: 1 person: 1 {"score":1,"age":23.7,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2022-10-02 15:06:26 DATA:  test-backend-node-gpu.js result: performance: load: null total: 186 -2022-10-02 15:06:26 STATE: test-backend-node-gpu.js passed: details face length 1 -2022-10-02 15:06:26 STATE: test-backend-node-gpu.js passed: details face score 1 0.93 1 -2022-10-02 15:06:26 STATE: test-backend-node-gpu.js passed: details face age/gender 23.7 female 0.97 85.47 -2022-10-02 15:06:26 STATE: test-backend-node-gpu.js passed: details face arrays 4 478 1024 -2022-10-02 15:06:26 STATE: test-backend-node-gpu.js passed: details face emotion 2 {"score":0.59,"emotion":"angry"} -2022-10-02 15:06:26 STATE: test-backend-node-gpu.js passed: details face anti-spoofing 0.79 -2022-10-02 15:06:26 STATE: test-backend-node-gpu.js passed: details face liveness 0.83 -2022-10-02 15:06:26 STATE: test-backend-node-gpu.js passed: details body length 1 -2022-10-02 15:06:26 STATE: test-backend-node-gpu.js passed: details body 0.92 17 6 -2022-10-02 15:06:26 STATE: test-backend-node-gpu.js passed: details hand length 1 -2022-10-02 15:06:26 STATE: test-backend-node-gpu.js passed: details hand 0.51 0.73 point -2022-10-02 15:06:26 STATE: test-backend-node-gpu.js passed: details hand arrays 21 5 7 -2022-10-02 15:06:26 STATE: test-backend-node-gpu.js passed: details gesture length 7 -2022-10-02 15:06:26 STATE: test-backend-node-gpu.js passed: details gesture first {"face":0,"gesture":"facing right"} -2022-10-02 15:06:26 STATE: test-backend-node-gpu.js passed: details object length 1 -2022-10-02 15:06:26 STATE: test-backend-node-gpu.js passed: details object 0.72 person -2022-10-02 15:06:26 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,4] {"checksum":1371996928} -2022-10-02 15:06:26 STATE: test-backend-node-gpu.js event: image -2022-10-02 15:06:26 STATE: test-backend-node-gpu.js event: detect -2022-10-02 15:06:26 STATE: test-backend-node-gpu.js passed: tensor shape: [1,1200,1200,4] dtype: float32 -2022-10-02 15:06:27 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-body.jpg [1200,1200,4] {"checksum":1371996928} -2022-10-02 15:06:27 STATE: test-backend-node-gpu.js event: image -2022-10-02 15:06:27 STATE: test-backend-node-gpu.js event: detect -2022-10-02 15:06:27 STATE: test-backend-node-gpu.js passed: tensor shape: [1200,1200,4] dtype: float32 -2022-10-02 15:06:27 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796928} -2022-10-02 15:06:27 STATE: test-backend-node-gpu.js event: image -2022-10-02 15:06:27 STATE: test-backend-node-gpu.js event: detect -2022-10-02 15:06:27 STATE: test-backend-node-gpu.js passed: tensor shape: [1,1200,1200,3] dtype: float32 -2022-10-02 15:06:27 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-body.jpg [1200,1200,3] {"checksum":1004796928} -2022-10-02 15:06:27 STATE: test-backend-node-gpu.js event: image -2022-10-02 15:06:27 STATE: test-backend-node-gpu.js event: detect -2022-10-02 15:06:27 STATE: test-backend-node-gpu.js passed: tensor shape: [1200,1200,3] dtype: float32 -2022-10-02 15:06:28 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,4] {"checksum":1371996871} -2022-10-02 15:06:28 STATE: test-backend-node-gpu.js event: image -2022-10-02 15:06:28 STATE: test-backend-node-gpu.js event: detect -2022-10-02 15:06:28 STATE: test-backend-node-gpu.js passed: tensor shape: [1,1200,1200,4] dtype: int32 -2022-10-02 15:06:28 INFO:  test-backend-node-gpu.js test default -2022-10-02 15:06:28 STATE: test-backend-node-gpu.js start async -2022-10-02 15:06:28 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796928} -2022-10-02 15:06:28 STATE: test-backend-node-gpu.js event: image -2022-10-02 15:06:28 STATE: test-backend-node-gpu.js event: detect -2022-10-02 15:06:28 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-body.jpg async -2022-10-02 15:06:28 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 7 object: 1 person: 1 {"score":1,"age":23.7,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2022-10-02 15:06:28 DATA:  test-backend-node-gpu.js result: performance: load: null total: 132 -2022-10-02 15:06:28 STATE: test-backend-node-gpu.js passed: default result face match 1 female 0.97 -2022-10-02 15:06:28 INFO:  test-backend-node-gpu.js test sync -2022-10-02 15:06:28 STATE: test-backend-node-gpu.js start sync -2022-10-02 15:06:28 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796928} -2022-10-02 15:06:28 STATE: test-backend-node-gpu.js event: image -2022-10-02 15:06:28 STATE: test-backend-node-gpu.js event: detect -2022-10-02 15:06:28 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-body.jpg sync -2022-10-02 15:06:28 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 7 object: 1 person: 1 {"score":1,"age":23.7,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2022-10-02 15:06:28 DATA:  test-backend-node-gpu.js result: performance: load: null total: 157 -2022-10-02 15:06:28 STATE: test-backend-node-gpu.js passed: default sync 1 female 0.97 -2022-10-02 15:06:28 INFO:  test-backend-node-gpu.js test: image process -2022-10-02 15:06:28 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} -2022-10-02 15:06:28 STATE: test-backend-node-gpu.js passed: image input null [1,256,256,3] -2022-10-02 15:06:28 INFO:  test-backend-node-gpu.js test: image null -2022-10-02 15:06:28 STATE: test-backend-node-gpu.js passed: invalid input could not convert input to tensor -2022-10-02 15:06:28 INFO:  test-backend-node-gpu.js test face similarity -2022-10-02 15:06:28 STATE: test-backend-node-gpu.js start face similarity -2022-10-02 15:06:28 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} -2022-10-02 15:06:28 STATE: test-backend-node-gpu.js event: image -2022-10-02 15:06:29 STATE: test-backend-node-gpu.js event: detect -2022-10-02 15:06:29 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-face.jpg face similarity -2022-10-02 15:06:29 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 6 object: 1 person: 1 {"score":1,"age":23.5,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.47,"keypoints":3} -2022-10-02 15:06:29 DATA:  test-backend-node-gpu.js result: performance: load: null total: 144 -2022-10-02 15:06:29 STATE: test-backend-node-gpu.js start face similarity -2022-10-02 15:06:29 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796928} -2022-10-02 15:06:29 STATE: test-backend-node-gpu.js event: image -2022-10-02 15:06:29 STATE: test-backend-node-gpu.js event: detect -2022-10-02 15:06:29 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-body.jpg face similarity -2022-10-02 15:06:29 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 7 object: 1 person: 1 {"score":1,"age":23.7,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2022-10-02 15:06:29 DATA:  test-backend-node-gpu.js result: performance: load: null total: 144 -2022-10-02 15:06:29 STATE: test-backend-node-gpu.js start face similarity -2022-10-02 15:06:29 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289056} -2022-10-02 15:06:29 STATE: test-backend-node-gpu.js event: image -2022-10-02 15:06:29 STATE: test-backend-node-gpu.js event: detect -2022-10-02 15:06:29 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-upper.jpg face similarity -2022-10-02 15:06:29 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 1 person: 1 {"score":1,"age":23.5,"gender":"female"} {"score":0.71,"class":"person"} {"score":0.75,"keypoints":7} -2022-10-02 15:06:29 DATA:  test-backend-node-gpu.js result: performance: load: null total: 121 -2022-10-02 15:06:29 STATE: test-backend-node-gpu.js passed: face descriptor -2022-10-02 15:06:29 STATE: test-backend-node-gpu.js passed: face similarity {"similarity":[1,0.447238756461232,0.556914029877052],"descriptors":[1024,1024,1024]} -2022-10-02 15:06:29 INFO:  test-backend-node-gpu.js test object -2022-10-02 15:06:29 STATE: test-backend-node-gpu.js start object -2022-10-02 15:06:29 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796928} -2022-10-02 15:06:29 STATE: test-backend-node-gpu.js event: image -2022-10-02 15:06:29 STATE: test-backend-node-gpu.js event: detect -2022-10-02 15:06:29 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-body.jpg object -2022-10-02 15:06:29 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 7 object: 1 person: 1 {"score":1,"age":23.7,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2022-10-02 15:06:29 DATA:  test-backend-node-gpu.js result: performance: load: null total: 121 -2022-10-02 15:06:29 STATE: test-backend-node-gpu.js passed: centernet -2022-10-02 15:06:29 STATE: test-backend-node-gpu.js start object -2022-10-02 15:06:30 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796928} -2022-10-02 15:06:30 STATE: test-backend-node-gpu.js event: image -2022-10-02 15:06:31 STATE: test-backend-node-gpu.js event: detect -2022-10-02 15:06:31 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-body.jpg object -2022-10-02 15:06:31 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 7 object: 3 person: 1 {"score":1,"age":23.7,"gender":"female"} {"score":0.86,"class":"person"} {"score":0.92,"keypoints":17} -2022-10-02 15:06:31 DATA:  test-backend-node-gpu.js result: performance: load: null total: 632 -2022-10-02 15:06:31 STATE: test-backend-node-gpu.js passed: nanodet -2022-10-02 15:06:31 INFO:  test-backend-node-gpu.js test sensitive -2022-10-02 15:06:31 STATE: test-backend-node-gpu.js start sensitive -2022-10-02 15:06:31 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796928} -2022-10-02 15:06:31 STATE: test-backend-node-gpu.js event: image -2022-10-02 15:06:31 STATE: test-backend-node-gpu.js event: detect -2022-10-02 15:06:31 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-body.jpg sensitive -2022-10-02 15:06:31 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 2 gesture: 9 object: 0 person: 1 {"score":1,"age":23.7,"gender":"female"} {} {"score":0.92,"keypoints":17} -2022-10-02 15:06:31 DATA:  test-backend-node-gpu.js result: performance: load: null total: 110 -2022-10-02 15:06:31 STATE: test-backend-node-gpu.js passed: sensitive result match -2022-10-02 15:06:31 STATE: test-backend-node-gpu.js passed: sensitive face result match -2022-10-02 15:06:31 STATE: test-backend-node-gpu.js passed: sensitive face emotion result [{"score":0.59,"emotion":"angry"},{"score":0.29,"emotion":"fear"}] -2022-10-02 15:06:31 STATE: test-backend-node-gpu.js passed: sensitive body result match -2022-10-02 15:06:31 STATE: test-backend-node-gpu.js passed: sensitive hand result match -2022-10-02 15:06:31 INFO:  test-backend-node-gpu.js test body -2022-10-02 15:06:31 STATE: test-backend-node-gpu.js start blazepose -2022-10-02 15:06:33 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796928} -2022-10-02 15:06:33 STATE: test-backend-node-gpu.js event: image -2022-10-02 15:06:33 STATE: test-backend-node-gpu.js event: detect -2022-10-02 15:06:33 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-body.jpg blazepose -2022-10-02 15:06:33 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 2 gesture: 9 object: 0 person: 1 {"score":1,"age":23.7,"gender":"female"} {} {"score":0.99,"keypoints":39} -2022-10-02 15:06:33 DATA:  test-backend-node-gpu.js result: performance: load: null total: 288 -2022-10-02 15:06:33 STATE: test-backend-node-gpu.js passed: blazepose -2022-10-02 15:06:33 STATE: test-backend-node-gpu.js start efficientpose -2022-10-02 15:06:34 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796928} -2022-10-02 15:06:34 STATE: test-backend-node-gpu.js event: image -2022-10-02 15:06:34 STATE: test-backend-node-gpu.js event: detect -2022-10-02 15:06:34 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-body.jpg efficientpose -2022-10-02 15:06:34 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 2 gesture: 9 object: 0 person: 1 {"score":1,"age":23.7,"gender":"female"} {} {"score":0.75,"keypoints":13} -2022-10-02 15:06:34 DATA:  test-backend-node-gpu.js result: performance: load: null total: 643 -2022-10-02 15:06:34 STATE: test-backend-node-gpu.js passed: efficientpose -2022-10-02 15:06:34 STATE: test-backend-node-gpu.js start posenet -2022-10-02 15:06:35 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796928} -2022-10-02 15:06:35 STATE: test-backend-node-gpu.js event: image -2022-10-02 15:06:35 STATE: test-backend-node-gpu.js event: detect -2022-10-02 15:06:35 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-body.jpg posenet -2022-10-02 15:06:35 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 2 gesture: 9 object: 0 person: 1 {"score":1,"age":23.7,"gender":"female"} {} {"score":0.96,"keypoints":16} -2022-10-02 15:06:35 DATA:  test-backend-node-gpu.js result: performance: load: null total: 135 -2022-10-02 15:06:35 STATE: test-backend-node-gpu.js passed: posenet -2022-10-02 15:06:35 STATE: test-backend-node-gpu.js start movenet -2022-10-02 15:06:35 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796928} -2022-10-02 15:06:35 STATE: test-backend-node-gpu.js event: image -2022-10-02 15:06:35 STATE: test-backend-node-gpu.js event: detect -2022-10-02 15:06:35 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-body.jpg movenet -2022-10-02 15:06:35 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 2 gesture: 9 object: 0 person: 1 {"score":1,"age":23.7,"gender":"female"} {} {"score":0.92,"keypoints":17} -2022-10-02 15:06:35 DATA:  test-backend-node-gpu.js result: performance: load: null total: 111 -2022-10-02 15:06:35 STATE: test-backend-node-gpu.js passed: movenet -2022-10-02 15:06:35 INFO:  test-backend-node-gpu.js test face matching -2022-10-02 15:06:35 STATE: test-backend-node-gpu.js passed: face database 40 -2022-10-02 15:06:35 STATE: test-backend-node-gpu.js passed: face match {"first":{"index":4,"similarity":0.7828184453007331}} {"second":{"index":4,"similarity":0.5001334216773398}} {"third":{"index":4,"similarity":0.5403054967489764}} -2022-10-02 15:06:35 INFO:  test-backend-node-gpu.js test face similarity alternative -2022-10-02 15:06:35 STATE: test-backend-node-gpu.js start face embeddings -2022-10-02 15:06:35 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} -2022-10-02 15:06:35 STATE: test-backend-node-gpu.js event: image -2022-10-02 15:06:36 STATE: test-backend-node-gpu.js event: detect -2022-10-02 15:06:36 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-face.jpg face embeddings -2022-10-02 15:06:36 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 2 gesture: 8 object: 0 person: 1 {"score":1,"age":23.5,"gender":"female"} {} {"score":0.47,"keypoints":3} -2022-10-02 15:06:36 DATA:  test-backend-node-gpu.js result: performance: load: null total: 152 -2022-10-02 15:06:36 STATE: test-backend-node-gpu.js passed: mobilefacenet {"embedding":192} -2022-10-02 15:06:36 STATE: test-backend-node-gpu.js start face embeddings -2022-10-02 15:06:36 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} -2022-10-02 15:06:36 STATE: test-backend-node-gpu.js event: image -2022-10-02 15:06:36 STATE: test-backend-node-gpu.js event: detect -2022-10-02 15:06:36 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-face.jpg face embeddings -2022-10-02 15:06:36 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 2 gesture: 8 object: 0 person: 1 {"score":1,"age":23.5,"gender":"female"} {} {"score":0.47,"keypoints":3} -2022-10-02 15:06:36 DATA:  test-backend-node-gpu.js result: performance: load: null total: 186 -2022-10-02 15:06:36 STATE: test-backend-node-gpu.js passed: insightface {"embedding":512} -2022-10-02 15:06:36 INFO:  test-backend-node-gpu.js test face attention -2022-10-02 15:06:36 STATE: test-backend-node-gpu.js start face attention -2022-10-02 15:06:37 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} -2022-10-02 15:06:37 STATE: test-backend-node-gpu.js event: image -2022-10-02 15:06:37 STATE: test-backend-node-gpu.js event: detect -2022-10-02 15:06:37 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-face.jpg face attention -2022-10-02 15:06:37 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 2 gesture: 8 object: 0 person: 1 {"score":1,"age":23.5,"gender":"female"} {} {"score":0.47,"keypoints":3} -2022-10-02 15:06:37 DATA:  test-backend-node-gpu.js result: performance: load: null total: 245 -2022-10-02 15:06:37 STATE: test-backend-node-gpu.js passed: face attention -2022-10-02 15:06:37 INFO:  test-backend-node-gpu.js test detectors -2022-10-02 15:06:37 STATE: test-backend-node-gpu.js start detectors -2022-10-02 15:06:37 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796928} -2022-10-02 15:06:37 STATE: test-backend-node-gpu.js event: image -2022-10-02 15:06:37 STATE: test-backend-node-gpu.js event: detect -2022-10-02 15:06:37 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-body.jpg detectors -2022-10-02 15:06:37 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 0 person: 1 {"score":0.93,"gender":"unknown"} {} {"score":0.92,"keypoints":17} -2022-10-02 15:06:37 DATA:  test-backend-node-gpu.js result: performance: load: null total: 105 -2022-10-02 15:06:37 STATE: test-backend-node-gpu.js passed: detector result face match -2022-10-02 15:06:37 STATE: test-backend-node-gpu.js passed: detector result hand match -2022-10-02 15:06:37 INFO:  test-backend-node-gpu.js test: multi-instance -2022-10-02 15:06:37 STATE: test-backend-node-gpu.js start multi instance -2022-10-02 15:06:37 STATE: test-backend-node-gpu.js event: image -2022-10-02 15:06:37 STATE: test-backend-node-gpu.js event: detect -2022-10-02 15:06:37 STATE: test-backend-node-gpu.js passed: detect: random multi instance -2022-10-02 15:06:37 DATA:  test-backend-node-gpu.js result: face: 0 body: 1 hand: 0 gesture: 0 object: 0 person: 0 {} {} {"score":0,"keypoints":0} -2022-10-02 15:06:37 DATA:  test-backend-node-gpu.js result: performance: load: null total: 61 -2022-10-02 15:06:37 INFO:  test-backend-node-gpu.js test: first instance -2022-10-02 15:06:37 STATE: test-backend-node-gpu.js start multi instance -2022-10-02 15:06:37 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289056} -2022-10-02 15:06:37 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-upper.jpg multi instance -2022-10-02 15:06:37 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 0 person: 1 {"score":0.96,"gender":"unknown"} {} {"score":0.75,"keypoints":7} -2022-10-02 15:06:37 DATA:  test-backend-node-gpu.js result: performance: load: null total: 89 -2022-10-02 15:06:37 INFO:  test-backend-node-gpu.js test: second instance -2022-10-02 15:06:37 STATE: test-backend-node-gpu.js start multi instance -2022-10-02 15:06:38 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289056} -2022-10-02 15:06:38 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-upper.jpg multi instance -2022-10-02 15:06:38 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 0 person: 1 {"score":0.96,"gender":"unknown"} {} {"score":0.75,"keypoints":7} -2022-10-02 15:06:38 DATA:  test-backend-node-gpu.js result: performance: load: null total: 76 -2022-10-02 15:06:38 INFO:  test-backend-node-gpu.js test: concurrent -2022-10-02 15:06:38 STATE: test-backend-node-gpu.js start concurrent -2022-10-02 15:06:38 STATE: test-backend-node-gpu.js start concurrent -2022-10-02 15:06:38 STATE: test-backend-node-gpu.js start concurrent -2022-10-02 15:06:38 STATE: test-backend-node-gpu.js start concurrent -2022-10-02 15:06:38 STATE: test-backend-node-gpu.js start concurrent -2022-10-02 15:06:38 STATE: test-backend-node-gpu.js start concurrent -2022-10-02 15:06:38 STATE: test-backend-node-gpu.js start concurrent -2022-10-02 15:06:38 STATE: test-backend-node-gpu.js start concurrent -2022-10-02 15:06:38 STATE: test-backend-node-gpu.js start concurrent -2022-10-02 15:06:38 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} -2022-10-02 15:06:38 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} -2022-10-02 15:06:38 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} -2022-10-02 15:06:38 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796928} -2022-10-02 15:06:38 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796928} -2022-10-02 15:06:38 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796928} -2022-10-02 15:06:38 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289056} -2022-10-02 15:06:38 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289056} -2022-10-02 15:06:38 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289056} -2022-10-02 15:06:38 STATE: test-backend-node-gpu.js event: image -2022-10-02 15:06:38 STATE: test-backend-node-gpu.js event: image -2022-10-02 15:06:38 STATE: test-backend-node-gpu.js event: image -2022-10-02 15:06:39 STATE: test-backend-node-gpu.js event: detect -2022-10-02 15:06:39 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-upper.jpg concurrent -2022-10-02 15:06:39 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 0 person: 1 {"score":0.96,"gender":"unknown"} {} {"score":0.75,"keypoints":7} -2022-10-02 15:06:39 DATA:  test-backend-node-gpu.js result: performance: load: null total: 606 -2022-10-02 15:06:39 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-upper.jpg concurrent -2022-10-02 15:06:39 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 0 person: 1 {"score":0.96,"gender":"unknown"} {} {"score":0.75,"keypoints":7} -2022-10-02 15:06:39 DATA:  test-backend-node-gpu.js result: performance: load: null total: 606 -2022-10-02 15:06:39 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-upper.jpg concurrent -2022-10-02 15:06:39 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 0 person: 1 {"score":0.96,"gender":"unknown"} {} {"score":0.75,"keypoints":7} -2022-10-02 15:06:39 DATA:  test-backend-node-gpu.js result: performance: load: null total: 606 -2022-10-02 15:06:39 STATE: test-backend-node-gpu.js event: detect -2022-10-02 15:06:39 STATE: test-backend-node-gpu.js event: detect -2022-10-02 15:06:39 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-face.jpg concurrent -2022-10-02 15:06:39 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 0 person: 1 {"score":0.91,"gender":"unknown"} {} {"score":0.47,"keypoints":3} -2022-10-02 15:06:39 DATA:  test-backend-node-gpu.js result: performance: load: null total: 606 -2022-10-02 15:06:39 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-face.jpg concurrent -2022-10-02 15:06:39 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 0 person: 1 {"score":0.91,"gender":"unknown"} {} {"score":0.47,"keypoints":3} -2022-10-02 15:06:39 DATA:  test-backend-node-gpu.js result: performance: load: null total: 606 -2022-10-02 15:06:39 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-face.jpg concurrent -2022-10-02 15:06:39 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 0 person: 1 {"score":0.91,"gender":"unknown"} {} {"score":0.47,"keypoints":3} -2022-10-02 15:06:39 DATA:  test-backend-node-gpu.js result: performance: load: null total: 606 -2022-10-02 15:06:39 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-body.jpg concurrent -2022-10-02 15:06:39 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 0 person: 1 {"score":0.93,"gender":"unknown"} {} {"score":0.92,"keypoints":17} -2022-10-02 15:06:39 DATA:  test-backend-node-gpu.js result: performance: load: null total: 606 -2022-10-02 15:06:39 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-body.jpg concurrent -2022-10-02 15:06:39 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 0 person: 1 {"score":0.93,"gender":"unknown"} {} {"score":0.92,"keypoints":17} -2022-10-02 15:06:39 DATA:  test-backend-node-gpu.js result: performance: load: null total: 606 -2022-10-02 15:06:39 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-body.jpg concurrent -2022-10-02 15:06:39 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 0 person: 1 {"score":0.93,"gender":"unknown"} {} {"score":0.92,"keypoints":17} -2022-10-02 15:06:39 DATA:  test-backend-node-gpu.js result: performance: load: null total: 606 -2022-10-02 15:06:39 INFO:  test-backend-node-gpu.js test: monkey-patch -2022-10-02 15:06:39 STATE: test-backend-node-gpu.js event: image -2022-10-02 15:06:39 STATE: test-backend-node-gpu.js event: detect -2022-10-02 15:06:39 STATE: test-backend-node-gpu.js passed: monkey patch -2022-10-02 15:06:40 STATE: test-backend-node-gpu.js passed: segmentation [262144] -2022-10-02 15:06:40 STATE: test-backend-node-gpu.js passeed: equal usage -2022-10-02 15:06:40 INFO:  test-backend-node-gpu.js test: input compare -2022-10-02 15:06:40 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} -2022-10-02 15:06:40 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796928} -2022-10-02 15:06:40 STATE: test-backend-node-gpu.js passed: image compare 0 23.275441687091504 -2022-10-02 15:06:40 INFO:  test-backend-node-gpu.js events: {"image":29,"detect":29,"warmup":2} -2022-10-02 15:06:40 INFO:  test-backend-node-gpu.js tensors 4441 -2022-10-02 15:06:40 INFO:  test-backend-node-gpu.js test complete: 16755 ms -2022-10-02 15:06:40 INFO:  -2022-10-02 15:06:40 INFO:  test-backend-node-wasm.js start -2022-10-02 15:06:40 DATA:  test-backend-node-wasm.js stdout: 2022-10-02 15:06:40 INFO:  { supported: true, backend: true, simd: true, multithread: false } https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm@3.20.0/dist/ -2022-10-02 15:06:41 STATE: test-backend-node-wasm.js passed: model server: https://vladmandic.github.io/human-models/models/ -2022-10-02 15:06:41 INFO:  test-backend-node-wasm.js test: configuration validation -2022-10-02 15:06:41 STATE: test-backend-node-wasm.js passed: configuration default validation [] -2022-10-02 15:06:41 STATE: test-backend-node-wasm.js passed: configuration invalid validation [{"reason":"unknown property","where":"config.invalid = true"}] -2022-10-02 15:06:41 INFO:  test-backend-node-wasm.js test: model load -2022-10-02 15:06:43 STATE: test-backend-node-wasm.js passed: models loaded 25 11 [{"name":"ssrnetage","loaded":false,"url":null},{"name":"gear","loaded":false,"url":null},{"name":"blazeposedetect","loaded":false,"url":null},{"name":"blazepose","loaded":false,"url":null},{"name":"centernet","loaded":true,"url":"https://vladmandic.github.io/human-models/models/mb3-centernet.json"},{"name":"efficientpose","loaded":false,"url":null},{"name":"mobilefacenet","loaded":false,"url":null},{"name":"insightface","loaded":false,"url":null},{"name":"emotion","loaded":true,"url":"https://vladmandic.github.io/human-models/models/emotion.json"},{"name":"facedetect","loaded":true,"url":"https://vladmandic.github.io/human-models/models/blazeface.json"},{"name":"faceiris","loaded":true,"url":"https://vladmandic.github.io/human-models/models/iris.json"},{"name":"facemesh","loaded":true,"url":"https://vladmandic.github.io/human-models/models/facemesh.json"},{"name":"faceres","loaded":true,"url":"https://vladmandic.github.io/human-models/models/faceres.json"},{"name":"ssrnetgender","loaded":false,"url":null},{"name":"handpose","loaded":false,"url":null},{"name":"handskeleton","loaded":true,"url":"https://vladmandic.github.io/human-models/models/handlandmark-full.json"},{"name":"handtrack","loaded":true,"url":"https://vladmandic.github.io/human-models/models/handtrack.json"},{"name":"liveness","loaded":true,"url":"https://vladmandic.github.io/human-models/models/liveness.json"},{"name":"meet","loaded":false,"url":null},{"name":"movenet","loaded":true,"url":"https://vladmandic.github.io/human-models/models/movenet-lightning.json"},{"name":"nanodet","loaded":false,"url":null},{"name":"posenet","loaded":false,"url":null},{"name":"selfie","loaded":false,"url":null},{"name":"rvm","loaded":false,"url":null},{"name":"antispoof","loaded":true,"url":"https://vladmandic.github.io/human-models/models/antispoof.json"}] -2022-10-02 15:06:43 INFO:  test-backend-node-wasm.js memory: {"memory":{"unreliable":false,"numTensors":1785,"numDataBuffers":1785,"numBytes":63247332}} -2022-10-02 15:06:43 INFO:  test-backend-node-wasm.js state: {"state":{"registeredVariables":{},"nextTapeNodeId":0,"numBytes":63247332,"numTensors":1785,"numStringTensors":0,"numDataBuffers":1785,"gradientDepth":0,"kernelDepth":0,"scopeStack":[],"numDataMovesStack":[],"nextScopeId":0,"tensorInfo":{},"profiling":false,"activeProfile":{"newBytes":0,"newTensors":0,"peakBytes":0,"kernels":[],"result":null,"kernelNames":[]}}} -2022-10-02 15:06:43 INFO:  test-backend-node-wasm.js test: warmup -2022-10-02 15:06:43 STATE: test-backend-node-wasm.js passed: create human -2022-10-02 15:06:43 INFO:  test-backend-node-wasm.js human version: 2.11.0 -2022-10-02 15:06:43 INFO:  test-backend-node-wasm.js platform: linux x64 agent: NodeJS v18.10.0 -2022-10-02 15:06:43 INFO:  test-backend-node-wasm.js tfjs version: 3.20.0 -2022-10-02 15:06:43 INFO:  test-backend-node-wasm.js env: {"browser":false,"node":true,"platform":"linux x64","agent":"NodeJS v18.10.0","backends":["cpu","wasm"],"initial":false,"tfjs":{"version":"3.20.0"},"offscreen":false,"perfadd":false,"tensorflow":{},"wasm":{"supported":true,"backend":true,"simd":true,"multithread":false},"webgl":{"supported":false,"backend":false},"webgpu":{"supported":false,"backend":false},"cpu":{"flags":[]},"kernels":126} -2022-10-02 15:06:43 STATE: test-backend-node-wasm.js passed: set backend: wasm -2022-10-02 15:06:43 STATE: test-backend-node-wasm.js tensors 1785 -2022-10-02 15:06:43 STATE: test-backend-node-wasm.js passed: load models -2022-10-02 15:06:43 STATE: test-backend-node-wasm.js result: defined models: 25 loaded models: 11 -2022-10-02 15:06:43 STATE: test-backend-node-wasm.js passed: warmup: none default -2022-10-02 15:06:43 DATA:  test-backend-node-wasm.js result: face: 0 body: 0 hand: 0 gesture: 0 object: 0 person: 0 {} {} {} -2022-10-02 15:06:43 DATA:  test-backend-node-wasm.js result: performance: load: null total: null -2022-10-02 15:06:43 STATE: test-backend-node-wasm.js passed: warmup none result match -2022-10-02 15:06:43 STATE: test-backend-node-wasm.js event: image -2022-10-02 15:06:43 STATE: test-backend-node-wasm.js event: detect -2022-10-02 15:06:43 STATE: test-backend-node-wasm.js event: warmup -2022-10-02 15:06:43 STATE: test-backend-node-wasm.js passed: warmup: face default -2022-10-02 15:06:43 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 6 object: 1 person: 1 {"score":1,"age":23.5,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.47,"keypoints":3} -2022-10-02 15:06:43 DATA:  test-backend-node-wasm.js result: performance: load: null total: 565 -2022-10-02 15:06:43 STATE: test-backend-node-wasm.js passed: warmup face result match -2022-10-02 15:06:43 STATE: test-backend-node-wasm.js event: image -2022-10-02 15:06:44 STATE: test-backend-node-wasm.js event: detect -2022-10-02 15:06:44 STATE: test-backend-node-wasm.js event: warmup -2022-10-02 15:06:44 STATE: test-backend-node-wasm.js passed: warmup: body default -2022-10-02 15:06:44 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 7 object: 1 person: 1 {"score":1,"age":23.7,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2022-10-02 15:06:44 DATA:  test-backend-node-wasm.js result: performance: load: null total: 354 -2022-10-02 15:06:44 STATE: test-backend-node-wasm.js passed: warmup body result match -2022-10-02 15:06:44 STATE: test-backend-node-wasm.js details: {"face":{"boxScore":0.93,"faceScore":1,"age":23.7,"gender":"female","genderScore":0.97},"emotion":[{"score":0.59,"emotion":"angry"},{"score":0.29,"emotion":"fear"}],"body":{"score":0.92,"keypoints":17},"hand":{"boxScore":0.51,"fingerScore":0.73,"keypoints":21},"gestures":[{"face":0,"gesture":"facing right"},{"face":0,"gesture":"mouth 21% open"},{"hand":0,"gesture":"pinky forward"},{"hand":0,"gesture":"palm up"},{"hand":0,"gesture":"open palm"},{"iris":0,"gesture":"looking left"},{"iris":0,"gesture":"looking up"}]} -2022-10-02 15:06:44 INFO:  test-backend-node-wasm.js test: details verification -2022-10-02 15:06:44 STATE: test-backend-node-wasm.js start default -2022-10-02 15:06:44 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} -2022-10-02 15:06:44 STATE: test-backend-node-wasm.js event: image -2022-10-02 15:06:44 STATE: test-backend-node-wasm.js event: detect -2022-10-02 15:06:44 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-body.jpg default -2022-10-02 15:06:44 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 7 object: 1 person: 1 {"score":1,"age":23.7,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2022-10-02 15:06:44 DATA:  test-backend-node-wasm.js result: performance: load: null total: 336 -2022-10-02 15:06:44 STATE: test-backend-node-wasm.js passed: details face length 1 -2022-10-02 15:06:44 STATE: test-backend-node-wasm.js passed: details face score 1 0.93 1 -2022-10-02 15:06:44 STATE: test-backend-node-wasm.js passed: details face age/gender 23.7 female 0.97 85.47 -2022-10-02 15:06:44 STATE: test-backend-node-wasm.js passed: details face arrays 4 478 1024 -2022-10-02 15:06:44 STATE: test-backend-node-wasm.js passed: details face emotion 2 {"score":0.59,"emotion":"angry"} -2022-10-02 15:06:44 STATE: test-backend-node-wasm.js passed: details face anti-spoofing 0.79 -2022-10-02 15:06:44 STATE: test-backend-node-wasm.js passed: details face liveness 0.83 -2022-10-02 15:06:44 STATE: test-backend-node-wasm.js passed: details body length 1 -2022-10-02 15:06:44 STATE: test-backend-node-wasm.js passed: details body 0.92 17 6 -2022-10-02 15:06:44 STATE: test-backend-node-wasm.js passed: details hand length 1 -2022-10-02 15:06:44 STATE: test-backend-node-wasm.js passed: details hand 0.51 0.73 point -2022-10-02 15:06:44 STATE: test-backend-node-wasm.js passed: details hand arrays 21 5 7 -2022-10-02 15:06:44 STATE: test-backend-node-wasm.js passed: details gesture length 7 -2022-10-02 15:06:44 STATE: test-backend-node-wasm.js passed: details gesture first {"face":0,"gesture":"facing right"} -2022-10-02 15:06:44 STATE: test-backend-node-wasm.js passed: details object length 1 -2022-10-02 15:06:44 STATE: test-backend-node-wasm.js passed: details object 0.72 person -2022-10-02 15:06:44 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,4] {"checksum":1413675264} -2022-10-02 15:06:44 STATE: test-backend-node-wasm.js event: image -2022-10-02 15:06:45 STATE: test-backend-node-wasm.js event: detect -2022-10-02 15:06:45 STATE: test-backend-node-wasm.js passed: tensor shape: [1,1200,1200,4] dtype: float32 -2022-10-02 15:06:45 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-body.jpg [1200,1200,4] {"checksum":1413675264} -2022-10-02 15:06:45 STATE: test-backend-node-wasm.js event: image -2022-10-02 15:06:45 STATE: test-backend-node-wasm.js event: detect -2022-10-02 15:06:45 STATE: test-backend-node-wasm.js passed: tensor shape: [1200,1200,4] dtype: float32 -2022-10-02 15:06:45 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} -2022-10-02 15:06:45 STATE: test-backend-node-wasm.js event: image -2022-10-02 15:06:46 STATE: test-backend-node-wasm.js event: detect -2022-10-02 15:06:46 STATE: test-backend-node-wasm.js passed: tensor shape: [1,1200,1200,3] dtype: float32 -2022-10-02 15:06:46 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-body.jpg [1200,1200,3] {"checksum":1038921856} -2022-10-02 15:06:46 STATE: test-backend-node-wasm.js event: image -2022-10-02 15:06:46 STATE: test-backend-node-wasm.js event: detect -2022-10-02 15:06:46 STATE: test-backend-node-wasm.js passed: tensor shape: [1200,1200,3] dtype: float32 -2022-10-02 15:06:46 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,4] {"checksum":1371996871} -2022-10-02 15:06:46 STATE: test-backend-node-wasm.js event: image -2022-10-02 15:06:47 STATE: test-backend-node-wasm.js event: detect -2022-10-02 15:06:47 STATE: test-backend-node-wasm.js passed: tensor shape: [1,1200,1200,4] dtype: int32 -2022-10-02 15:06:47 INFO:  test-backend-node-wasm.js test default -2022-10-02 15:06:47 STATE: test-backend-node-wasm.js start async -2022-10-02 15:06:47 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} -2022-10-02 15:06:47 STATE: test-backend-node-wasm.js event: image -2022-10-02 15:06:47 STATE: test-backend-node-wasm.js event: detect -2022-10-02 15:06:47 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-body.jpg async -2022-10-02 15:06:47 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 8 object: 1 person: 1 {"score":1,"age":29.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2022-10-02 15:06:47 DATA:  test-backend-node-wasm.js result: performance: load: null total: 309 -2022-10-02 15:06:47 STATE: test-backend-node-wasm.js passed: default result face match 1 female 0.97 -2022-10-02 15:06:47 INFO:  test-backend-node-wasm.js test sync -2022-10-02 15:06:47 STATE: test-backend-node-wasm.js start sync -2022-10-02 15:06:48 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} -2022-10-02 15:06:48 STATE: test-backend-node-wasm.js event: image -2022-10-02 15:06:48 STATE: test-backend-node-wasm.js event: detect -2022-10-02 15:06:48 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-body.jpg sync -2022-10-02 15:06:48 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 8 object: 1 person: 1 {"score":1,"age":29.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2022-10-02 15:06:48 DATA:  test-backend-node-wasm.js result: performance: load: null total: 326 -2022-10-02 15:06:48 STATE: test-backend-node-wasm.js passed: default sync 1 female 0.97 -2022-10-02 15:06:48 INFO:  test-backend-node-wasm.js test: image process -2022-10-02 15:06:48 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34697856} -2022-10-02 15:06:48 STATE: test-backend-node-wasm.js passed: image input null [1,256,256,3] -2022-10-02 15:06:48 INFO:  test-backend-node-wasm.js test: image null -2022-10-02 15:06:48 STATE: test-backend-node-wasm.js passed: invalid input could not convert input to tensor -2022-10-02 15:06:48 INFO:  test-backend-node-wasm.js test face similarity -2022-10-02 15:06:48 STATE: test-backend-node-wasm.js start face similarity -2022-10-02 15:06:48 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34697856} -2022-10-02 15:06:48 STATE: test-backend-node-wasm.js event: image -2022-10-02 15:06:48 STATE: test-backend-node-wasm.js event: detect -2022-10-02 15:06:48 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-face.jpg face similarity -2022-10-02 15:06:48 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 6 object: 1 person: 1 {"score":1,"age":23.5,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.47,"keypoints":3} -2022-10-02 15:06:48 DATA:  test-backend-node-wasm.js result: performance: load: null total: 299 -2022-10-02 15:06:48 STATE: test-backend-node-wasm.js start face similarity -2022-10-02 15:06:48 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} -2022-10-02 15:06:48 STATE: test-backend-node-wasm.js event: image -2022-10-02 15:06:49 STATE: test-backend-node-wasm.js event: detect -2022-10-02 15:06:49 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-body.jpg face similarity -2022-10-02 15:06:49 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 8 object: 1 person: 1 {"score":1,"age":29.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2022-10-02 15:06:49 DATA:  test-backend-node-wasm.js result: performance: load: null total: 329 -2022-10-02 15:06:49 STATE: test-backend-node-wasm.js start face similarity -2022-10-02 15:06:49 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151155104} -2022-10-02 15:06:49 STATE: test-backend-node-wasm.js event: image -2022-10-02 15:06:49 STATE: test-backend-node-wasm.js event: detect -2022-10-02 15:06:49 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-upper.jpg face similarity -2022-10-02 15:06:49 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 1 person: 1 {"score":1,"age":23.5,"gender":"female"} {"score":0.71,"class":"person"} {"score":0.75,"keypoints":7} -2022-10-02 15:06:49 DATA:  test-backend-node-wasm.js result: performance: load: null total: 295 -2022-10-02 15:06:49 STATE: test-backend-node-wasm.js passed: face descriptor -2022-10-02 15:06:49 STATE: test-backend-node-wasm.js passed: face similarity {"similarity":[1,0.5266119940661309,0.4858842904087851],"descriptors":[1024,1024,1024]} -2022-10-02 15:06:49 INFO:  test-backend-node-wasm.js test object -2022-10-02 15:06:49 STATE: test-backend-node-wasm.js start object -2022-10-02 15:06:49 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} -2022-10-02 15:06:49 STATE: test-backend-node-wasm.js event: image -2022-10-02 15:06:50 STATE: test-backend-node-wasm.js event: detect -2022-10-02 15:06:50 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-body.jpg object -2022-10-02 15:06:50 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 8 object: 1 person: 1 {"score":1,"age":29.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2022-10-02 15:06:50 DATA:  test-backend-node-wasm.js result: performance: load: null total: 349 -2022-10-02 15:06:50 STATE: test-backend-node-wasm.js passed: centernet -2022-10-02 15:06:50 STATE: test-backend-node-wasm.js start object -2022-10-02 15:06:51 WARN:  test-backend-node-wasm.js missing kernel ops {"title":"object","model":"nanodet","url":"https://vladmandic.github.io/human-models/models/nanodet.json","missing":["sparsetodense"],"backkend":"wasm"} -2022-10-02 15:06:52 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} -2022-10-02 15:06:52 STATE: test-backend-node-wasm.js event: image -2022-10-02 15:06:52 STATE: test-backend-node-wasm.js event: detect -2022-10-02 15:06:52 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-body.jpg object -2022-10-02 15:06:52 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 8 object: 0 person: 1 {"score":1,"age":29.6,"gender":"female"} {} {"score":0.92,"keypoints":17} -2022-10-02 15:06:52 DATA:  test-backend-node-wasm.js result: performance: load: null total: 226 -2022-10-02 15:06:52 ERROR: test-backend-node-wasm.js failed: nanodet [] -2022-10-02 15:06:52 INFO:  test-backend-node-wasm.js test sensitive -2022-10-02 15:06:52 STATE: test-backend-node-wasm.js start sensitive -2022-10-02 15:06:52 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} -2022-10-02 15:06:52 STATE: test-backend-node-wasm.js event: image -2022-10-02 15:06:52 STATE: test-backend-node-wasm.js event: detect -2022-10-02 15:06:52 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-body.jpg sensitive -2022-10-02 15:06:52 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 2 gesture: 10 object: 0 person: 1 {"score":1,"age":29.6,"gender":"female"} {} {"score":0.92,"keypoints":17} -2022-10-02 15:06:52 DATA:  test-backend-node-wasm.js result: performance: load: null total: 241 -2022-10-02 15:06:52 STATE: test-backend-node-wasm.js passed: sensitive result match -2022-10-02 15:06:52 STATE: test-backend-node-wasm.js passed: sensitive face result match -2022-10-02 15:06:52 STATE: test-backend-node-wasm.js passed: sensitive face emotion result [{"score":0.46,"emotion":"neutral"},{"score":0.24,"emotion":"fear"},{"score":0.17,"emotion":"sad"}] -2022-10-02 15:06:52 STATE: test-backend-node-wasm.js passed: sensitive body result match -2022-10-02 15:06:52 STATE: test-backend-node-wasm.js passed: sensitive hand result match -2022-10-02 15:06:52 INFO:  test-backend-node-wasm.js test body -2022-10-02 15:06:52 STATE: test-backend-node-wasm.js start blazepose -2022-10-02 15:06:55 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} -2022-10-02 15:06:55 STATE: test-backend-node-wasm.js event: image -2022-10-02 15:06:56 STATE: test-backend-node-wasm.js event: detect -2022-10-02 15:06:56 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-body.jpg blazepose -2022-10-02 15:06:56 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 2 gesture: 10 object: 0 person: 1 {"score":1,"age":29.6,"gender":"female"} {} {"score":0.99,"keypoints":39} -2022-10-02 15:06:56 DATA:  test-backend-node-wasm.js result: performance: load: null total: 378 -2022-10-02 15:06:56 STATE: test-backend-node-wasm.js passed: blazepose -2022-10-02 15:06:56 STATE: test-backend-node-wasm.js start efficientpose -2022-10-02 15:06:57 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} -2022-10-02 15:06:57 STATE: test-backend-node-wasm.js event: image -2022-10-02 15:06:57 STATE: test-backend-node-wasm.js event: detect -2022-10-02 15:06:57 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-body.jpg efficientpose -2022-10-02 15:06:57 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 2 gesture: 10 object: 0 person: 1 {"score":1,"age":29.6,"gender":"female"} {} {"score":0.75,"keypoints":13} -2022-10-02 15:06:57 DATA:  test-backend-node-wasm.js result: performance: load: null total: 636 -2022-10-02 15:06:57 STATE: test-backend-node-wasm.js passed: efficientpose -2022-10-02 15:06:57 STATE: test-backend-node-wasm.js start posenet -2022-10-02 15:06:58 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} -2022-10-02 15:06:58 STATE: test-backend-node-wasm.js event: image -2022-10-02 15:06:58 STATE: test-backend-node-wasm.js event: detect -2022-10-02 15:06:58 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-body.jpg posenet -2022-10-02 15:06:58 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 2 gesture: 10 object: 0 person: 1 {"score":1,"age":29.6,"gender":"female"} {} {"score":0.96,"keypoints":16} -2022-10-02 15:06:58 DATA:  test-backend-node-wasm.js result: performance: load: null total: 287 -2022-10-02 15:06:58 STATE: test-backend-node-wasm.js passed: posenet -2022-10-02 15:06:58 STATE: test-backend-node-wasm.js start movenet -2022-10-02 15:06:58 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} -2022-10-02 15:06:58 STATE: test-backend-node-wasm.js event: image -2022-10-02 15:06:59 STATE: test-backend-node-wasm.js event: detect -2022-10-02 15:06:59 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-body.jpg movenet -2022-10-02 15:06:59 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 2 gesture: 10 object: 0 person: 1 {"score":1,"age":29.6,"gender":"female"} {} {"score":0.92,"keypoints":17} -2022-10-02 15:06:59 DATA:  test-backend-node-wasm.js result: performance: load: null total: 235 -2022-10-02 15:06:59 STATE: test-backend-node-wasm.js passed: movenet -2022-10-02 15:06:59 INFO:  test-backend-node-wasm.js test face matching -2022-10-02 15:06:59 STATE: test-backend-node-wasm.js passed: face database 40 -2022-10-02 15:06:59 STATE: test-backend-node-wasm.js passed: face match {"first":{"index":4,"similarity":0.7827852754786533}} {"second":{"index":4,"similarity":0.5660821189104794}} {"third":{"index":4,"similarity":0.45074189882665594}} -2022-10-02 15:06:59 INFO:  test-backend-node-wasm.js test face similarity alternative -2022-10-02 15:06:59 STATE: test-backend-node-wasm.js start face embeddings -2022-10-02 15:06:59 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34697856} -2022-10-02 15:06:59 STATE: test-backend-node-wasm.js event: image -2022-10-02 15:06:59 STATE: test-backend-node-wasm.js event: detect -2022-10-02 15:06:59 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-face.jpg face embeddings -2022-10-02 15:06:59 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 2 gesture: 8 object: 0 person: 1 {"score":1,"age":23.5,"gender":"female"} {} {"score":0.47,"keypoints":3} -2022-10-02 15:06:59 DATA:  test-backend-node-wasm.js result: performance: load: null total: 237 -2022-10-02 15:06:59 STATE: test-backend-node-wasm.js passed: mobilefacenet {"embedding":192} -2022-10-02 15:06:59 STATE: test-backend-node-wasm.js start face embeddings -2022-10-02 15:07:00 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34697856} -2022-10-02 15:07:00 STATE: test-backend-node-wasm.js event: image -2022-10-02 15:07:01 STATE: test-backend-node-wasm.js event: detect -2022-10-02 15:07:01 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-face.jpg face embeddings -2022-10-02 15:07:01 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 2 gesture: 8 object: 0 person: 1 {"score":1,"age":23.5,"gender":"female"} {} {"score":0.47,"keypoints":3} -2022-10-02 15:07:01 DATA:  test-backend-node-wasm.js result: performance: load: null total: 296 -2022-10-02 15:07:01 STATE: test-backend-node-wasm.js passed: insightface {"embedding":512} -2022-10-02 15:07:01 INFO:  test-backend-node-wasm.js test face attention -2022-10-02 15:07:01 STATE: test-backend-node-wasm.js start face attention -2022-10-02 15:07:01 WARN:  test-backend-node-wasm.js missing kernel ops {"title":"face attention","model":"facemesh","url":"https://vladmandic.github.io/human-models/models/facemesh-attention.json","missing":["atan2"],"backkend":"wasm"} -2022-10-02 15:07:01 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34697856} -2022-10-02 15:07:01 STATE: test-backend-node-wasm.js event: image -2022-10-02 15:07:01 STATE: test-backend-node-wasm.js event: detect -2022-10-02 15:07:01 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-face.jpg face attention -2022-10-02 15:07:01 DATA:  test-backend-node-wasm.js result: face: 0 body: 1 hand: 1 gesture: 2 object: 0 person: 0 {} {} {"score":0.47,"keypoints":3} -2022-10-02 15:07:01 DATA:  test-backend-node-wasm.js result: performance: load: null total: 127 -2022-10-02 15:07:01 ERROR: test-backend-node-wasm.js failed: face attention {"annotations":0} -2022-10-02 15:07:01 INFO:  test-backend-node-wasm.js test detectors -2022-10-02 15:07:01 STATE: test-backend-node-wasm.js start detectors -2022-10-02 15:07:01 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} -2022-10-02 15:07:01 STATE: test-backend-node-wasm.js event: image -2022-10-02 15:07:01 STATE: test-backend-node-wasm.js event: detect -2022-10-02 15:07:01 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-body.jpg detectors -2022-10-02 15:07:01 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 0 person: 1 {"score":0.93,"gender":"unknown"} {} {"score":0.92,"keypoints":17} -2022-10-02 15:07:01 DATA:  test-backend-node-wasm.js result: performance: load: null total: 117 -2022-10-02 15:07:01 STATE: test-backend-node-wasm.js passed: detector result face match -2022-10-02 15:07:01 STATE: test-backend-node-wasm.js passed: detector result hand match -2022-10-02 15:07:01 INFO:  test-backend-node-wasm.js test: multi-instance -2022-10-02 15:07:01 STATE: test-backend-node-wasm.js start multi instance -2022-10-02 15:07:02 STATE: test-backend-node-wasm.js event: image -2022-10-02 15:07:02 STATE: test-backend-node-wasm.js event: detect -2022-10-02 15:07:02 STATE: test-backend-node-wasm.js passed: detect: random multi instance -2022-10-02 15:07:02 DATA:  test-backend-node-wasm.js result: face: 0 body: 1 hand: 0 gesture: 0 object: 0 person: 0 {} {} {"score":0,"keypoints":0} -2022-10-02 15:07:02 DATA:  test-backend-node-wasm.js result: performance: load: null total: 93 -2022-10-02 15:07:02 INFO:  test-backend-node-wasm.js test: first instance -2022-10-02 15:07:02 STATE: test-backend-node-wasm.js start multi instance -2022-10-02 15:07:02 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151155104} -2022-10-02 15:07:02 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-upper.jpg multi instance -2022-10-02 15:07:02 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 0 person: 1 {"score":0.96,"gender":"unknown"} {} {"score":0.75,"keypoints":7} -2022-10-02 15:07:02 DATA:  test-backend-node-wasm.js result: performance: load: null total: 106 -2022-10-02 15:07:02 INFO:  test-backend-node-wasm.js test: second instance -2022-10-02 15:07:02 STATE: test-backend-node-wasm.js start multi instance -2022-10-02 15:07:02 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151155104} -2022-10-02 15:07:02 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-upper.jpg multi instance -2022-10-02 15:07:02 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 0 person: 1 {"score":0.96,"gender":"unknown"} {} {"score":0.75,"keypoints":7} -2022-10-02 15:07:02 DATA:  test-backend-node-wasm.js result: performance: load: null total: 106 -2022-10-02 15:07:02 INFO:  test-backend-node-wasm.js test: concurrent -2022-10-02 15:07:02 STATE: test-backend-node-wasm.js start concurrent -2022-10-02 15:07:02 STATE: test-backend-node-wasm.js start concurrent -2022-10-02 15:07:02 STATE: test-backend-node-wasm.js start concurrent -2022-10-02 15:07:02 STATE: test-backend-node-wasm.js start concurrent -2022-10-02 15:07:02 STATE: test-backend-node-wasm.js start concurrent -2022-10-02 15:07:02 STATE: test-backend-node-wasm.js start concurrent -2022-10-02 15:07:02 STATE: test-backend-node-wasm.js start concurrent -2022-10-02 15:07:02 STATE: test-backend-node-wasm.js start concurrent -2022-10-02 15:07:02 STATE: test-backend-node-wasm.js start concurrent -2022-10-02 15:07:02 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34697856} -2022-10-02 15:07:02 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34697856} -2022-10-02 15:07:02 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34697856} -2022-10-02 15:07:02 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} -2022-10-02 15:07:02 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} -2022-10-02 15:07:03 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} -2022-10-02 15:07:03 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151155104} -2022-10-02 15:07:03 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151155104} -2022-10-02 15:07:03 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151155104} -2022-10-02 15:07:03 STATE: test-backend-node-wasm.js event: image -2022-10-02 15:07:03 STATE: test-backend-node-wasm.js event: image -2022-10-02 15:07:03 STATE: test-backend-node-wasm.js event: image -2022-10-02 15:07:04 STATE: test-backend-node-wasm.js event: detect -2022-10-02 15:07:04 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-upper.jpg concurrent -2022-10-02 15:07:04 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 0 person: 1 {"score":0.96,"gender":"unknown"} {} {"score":0.75,"keypoints":7} -2022-10-02 15:07:04 DATA:  test-backend-node-wasm.js result: performance: load: null total: 947 -2022-10-02 15:07:04 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-upper.jpg concurrent -2022-10-02 15:07:04 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 0 person: 1 {"score":0.96,"gender":"unknown"} {} {"score":0.75,"keypoints":7} -2022-10-02 15:07:04 DATA:  test-backend-node-wasm.js result: performance: load: null total: 947 -2022-10-02 15:07:04 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-upper.jpg concurrent -2022-10-02 15:07:04 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 0 person: 1 {"score":0.96,"gender":"unknown"} {} {"score":0.75,"keypoints":7} -2022-10-02 15:07:04 DATA:  test-backend-node-wasm.js result: performance: load: null total: 947 -2022-10-02 15:07:04 STATE: test-backend-node-wasm.js event: detect -2022-10-02 15:07:04 STATE: test-backend-node-wasm.js event: detect -2022-10-02 15:07:04 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-face.jpg concurrent -2022-10-02 15:07:04 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 0 person: 1 {"score":0.91,"gender":"unknown"} {} {"score":0.47,"keypoints":3} -2022-10-02 15:07:04 DATA:  test-backend-node-wasm.js result: performance: load: null total: 948 -2022-10-02 15:07:04 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-face.jpg concurrent -2022-10-02 15:07:04 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 0 person: 1 {"score":0.91,"gender":"unknown"} {} {"score":0.47,"keypoints":3} -2022-10-02 15:07:04 DATA:  test-backend-node-wasm.js result: performance: load: null total: 948 -2022-10-02 15:07:04 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-face.jpg concurrent -2022-10-02 15:07:04 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 0 person: 1 {"score":0.91,"gender":"unknown"} {} {"score":0.47,"keypoints":3} -2022-10-02 15:07:04 DATA:  test-backend-node-wasm.js result: performance: load: null total: 948 -2022-10-02 15:07:04 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-body.jpg concurrent -2022-10-02 15:07:04 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 0 person: 1 {"score":0.93,"gender":"unknown"} {} {"score":0.92,"keypoints":17} -2022-10-02 15:07:04 DATA:  test-backend-node-wasm.js result: performance: load: null total: 948 -2022-10-02 15:07:04 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-body.jpg concurrent -2022-10-02 15:07:04 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 0 person: 1 {"score":0.93,"gender":"unknown"} {} {"score":0.92,"keypoints":17} -2022-10-02 15:07:04 DATA:  test-backend-node-wasm.js result: performance: load: null total: 948 -2022-10-02 15:07:04 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-body.jpg concurrent -2022-10-02 15:07:04 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 0 person: 1 {"score":0.93,"gender":"unknown"} {} {"score":0.92,"keypoints":17} -2022-10-02 15:07:04 DATA:  test-backend-node-wasm.js result: performance: load: null total: 948 -2022-10-02 15:07:04 INFO:  test-backend-node-wasm.js test: monkey-patch -2022-10-02 15:07:04 STATE: test-backend-node-wasm.js event: image -2022-10-02 15:07:04 STATE: test-backend-node-wasm.js event: detect -2022-10-02 15:07:04 STATE: test-backend-node-wasm.js passed: monkey patch -2022-10-02 15:07:04 STATE: test-backend-node-wasm.js passed: segmentation [262144] -2022-10-02 15:07:04 STATE: test-backend-node-wasm.js passeed: equal usage -2022-10-02 15:07:04 INFO:  test-backend-node-wasm.js test: input compare -2022-10-02 15:07:05 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34697856} -2022-10-02 15:07:05 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} -2022-10-02 15:07:05 STATE: test-backend-node-wasm.js passed: image compare 0 23.280073018790848 -2022-10-02 15:07:05 INFO:  test-backend-node-wasm.js events: {"image":29,"detect":29,"warmup":2} -2022-10-02 15:07:05 INFO:  test-backend-node-wasm.js tensors 4443 -2022-10-02 15:07:05 INFO:  test-backend-node-wasm.js test complete: 24175 ms -2022-10-02 15:07:05 STATE: all tests complete -2022-10-02 15:07:05 INFO:  status {"test":"../demo/nodejs/node.js","passed":1,"failed":0} -2022-10-02 15:07:05 INFO:  status {"test":"../demo/nodejs/node-simple.js","passed":1,"failed":0} -2022-10-02 15:07:05 INFO:  status {"test":"../demo/nodejs/node-fetch.js","passed":1,"failed":0} -2022-10-02 15:07:05 INFO:  status {"test":"../demo/nodejs/node-event.js","passed":1,"failed":0} -2022-10-02 15:07:05 INFO:  status {"test":"../demo/nodejs/node-similarity.js","passed":1,"failed":0} -2022-10-02 15:07:05 INFO:  status {"test":"../demo/nodejs/node-canvas.js","passed":1,"failed":0} -2022-10-02 15:07:05 INFO:  status {"test":"../demo/nodejs/process-folder.js","passed":1,"failed":0} -2022-10-02 15:07:05 INFO:  status {"test":"../demo/multithread/node-multiprocess.js","passed":1,"failed":0} -2022-10-02 15:07:05 INFO:  status {"test":"../demo/facematch/node-match.js","passed":1,"failed":0} -2022-10-02 15:07:05 INFO:  status {"test":"test-node-load.js","passed":1,"failed":0} -2022-10-02 15:07:05 INFO:  status {"test":"test-node-gear.js","passed":3,"failed":0} -2022-10-02 15:07:05 INFO:  status {"test":"test-backend-node.js","passed":125,"failed":0} -2022-10-02 15:07:05 INFO:  status {"test":"test-backend-node-gpu.js","passed":125,"failed":0} -2022-10-02 15:07:05 INFO:  status {"test":"test-backend-node-wasm.js","passed":124,"failed":2} -2022-10-02 15:07:05 INFO:  failures {"count":2} -2022-10-02 15:07:05 WARN:  failed {"test":"test-backend-node-wasm.js","message":["error",["failed: nanodet",[]]]} -2022-10-02 15:07:05 WARN:  failed {"test":"test-backend-node-wasm.js","message":["error",["failed: face attention",{"annotations":0}]]} +2022-10-09 14:33:03 INFO:  @vladmandic/human version 2.11.1 +2022-10-09 14:33:03 INFO:  User: vlado Platform: linux Arch: x64 Node: v18.10.0 +2022-10-09 14:33:03 INFO:  demos: [{"cmd":"../demo/nodejs/node.js","args":[]},{"cmd":"../demo/nodejs/node-simple.js","args":[]},{"cmd":"../demo/nodejs/node-fetch.js","args":[]},{"cmd":"../demo/nodejs/node-event.js","args":["samples/in/ai-body.jpg"]},{"cmd":"../demo/nodejs/node-similarity.js","args":["samples/in/ai-face.jpg","samples/in/ai-upper.jpg"]},{"cmd":"../demo/nodejs/node-canvas.js","args":["samples/in/ai-body.jpg","samples/out/ai-body.jpg"]},{"cmd":"../demo/nodejs/process-folder.js","args":["samples"]},{"cmd":"../demo/multithread/node-multiprocess.js","args":[]},{"cmd":"../demo/facematch/node-match.js","args":[]}] +2022-10-09 14:33:03 INFO:  {"cmd":"../demo/nodejs/node.js","args":[]} start +2022-10-09 14:33:04 INFO:  {"cmd":"../demo/nodejs/node-simple.js","args":[]} start +2022-10-09 14:33:05 INFO:  {"cmd":"../demo/nodejs/node-fetch.js","args":[]} start +2022-10-09 14:33:08 INFO:  {"cmd":"../demo/nodejs/node-event.js","args":["samples/in/ai-body.jpg"]} start +2022-10-09 14:33:08 INFO:  {"cmd":"../demo/nodejs/node-similarity.js","args":["samples/in/ai-face.jpg","samples/in/ai-upper.jpg"]} start +2022-10-09 14:33:09 INFO:  {"cmd":"../demo/nodejs/node-canvas.js","args":["samples/in/ai-body.jpg","samples/out/ai-body.jpg"]} start +2022-10-09 14:33:10 INFO:  {"cmd":"../demo/nodejs/process-folder.js","args":["samples"]} start +2022-10-09 14:33:11 INFO:  {"cmd":"../demo/multithread/node-multiprocess.js","args":[]} start +2022-10-09 14:33:23 INFO:  {"cmd":"../demo/facematch/node-match.js","args":[]} start +2022-10-09 14:33:25 INFO:  tests: ["test-node-load.js","test-node-gear.js","test-backend-node.js","test-backend-node-gpu.js","test-backend-node-wasm.js"] +2022-10-09 14:33:25 INFO:  +2022-10-09 14:33:25 INFO:  test-node-load.js start +2022-10-09 14:33:25 INFO:  test-node-load.js load start {"human":"2.11.1","tf":"3.21.0","progress":0} +2022-10-09 14:33:25 DATA:  test-node-load.js load interval {"elapsed":0,"progress":0} +2022-10-09 14:33:25 DATA:  test-node-load.js load interval {"elapsed":12,"progress":0} +2022-10-09 14:33:25 DATA:  test-node-load.js load interval {"elapsed":26,"progress":0.11143791531203556} +2022-10-09 14:33:25 DATA:  test-node-load.js load interval {"elapsed":65,"progress":0.5125946867158943} +2022-10-09 14:33:25 DATA:  test-node-load.js load interval {"elapsed":84,"progress":0.7259096583739463} +2022-10-09 14:33:25 STATE: test-node-load.js passed {"progress":1} +2022-10-09 14:33:25 INFO:  test-node-load.js load final {"progress":1} +2022-10-09 14:33:26 DATA:  test-node-load.js load interval {"elapsed":454,"progress":1} +2022-10-09 14:33:26 INFO:  +2022-10-09 14:33:26 INFO:  test-node-gear.js start +2022-10-09 14:33:26 DATA:  test-node-gear.js input: ["samples/in/ai-face.jpg"] +2022-10-09 14:33:27 STATE: test-node-gear.js passed: gear faceres samples/in/ai-face.jpg +2022-10-09 14:33:27 DATA:  test-node-gear.js results {"face":0,"model":"faceres","image":"samples/in/ai-face.jpg","age":23.5,"gender":"female","genderScore":0.92} +2022-10-09 14:33:27 STATE: test-node-gear.js passed: gear gear samples/in/ai-face.jpg +2022-10-09 14:33:27 DATA:  test-node-gear.js results {"face":0,"model":"gear","image":"samples/in/ai-face.jpg","age":23.3,"gender":"female","genderScore":0.51,"race":[{"score":0.93,"race":"white"}]} +2022-10-09 14:33:27 STATE: test-node-gear.js passed: gear ssrnet samples/in/ai-face.jpg +2022-10-09 14:33:27 DATA:  test-node-gear.js results {"face":0,"model":"ssrnet","image":"samples/in/ai-face.jpg","age":23.4,"gender":"female","genderScore":0.99} +2022-10-09 14:33:27 INFO:  +2022-10-09 14:33:27 INFO:  test-backend-node.js start +2022-10-09 14:33:27 INFO:  test-backend-node.js test: configuration validation +2022-10-09 14:33:27 STATE: test-backend-node.js passed: configuration default validation [] +2022-10-09 14:33:27 STATE: test-backend-node.js passed: configuration invalid validation [{"reason":"unknown property","where":"config.invalid = true"}] +2022-10-09 14:33:27 INFO:  test-backend-node.js test: model load +2022-10-09 14:33:28 STATE: test-backend-node.js passed: models loaded 25 11 [{"name":"ssrnetage","loaded":false,"url":null},{"name":"gear","loaded":false,"url":null},{"name":"blazeposedetect","loaded":false,"url":null},{"name":"blazepose","loaded":false,"url":null},{"name":"centernet","loaded":true,"url":"file://models/mb3-centernet.json"},{"name":"efficientpose","loaded":false,"url":null},{"name":"mobilefacenet","loaded":false,"url":null},{"name":"insightface","loaded":false,"url":null},{"name":"emotion","loaded":true,"url":"file://models/emotion.json"},{"name":"facedetect","loaded":true,"url":"file://models/blazeface.json"},{"name":"faceiris","loaded":true,"url":"file://models/iris.json"},{"name":"facemesh","loaded":true,"url":"file://models/facemesh.json"},{"name":"faceres","loaded":true,"url":"file://models/faceres.json"},{"name":"ssrnetgender","loaded":false,"url":null},{"name":"handpose","loaded":false,"url":null},{"name":"handskeleton","loaded":true,"url":"file://models/handlandmark-full.json"},{"name":"handtrack","loaded":true,"url":"file://models/handtrack.json"},{"name":"liveness","loaded":true,"url":"file://models/liveness.json"},{"name":"meet","loaded":false,"url":null},{"name":"movenet","loaded":true,"url":"file://models/movenet-lightning.json"},{"name":"nanodet","loaded":false,"url":null},{"name":"posenet","loaded":false,"url":null},{"name":"selfie","loaded":false,"url":null},{"name":"rvm","loaded":false,"url":null},{"name":"antispoof","loaded":true,"url":"file://models/antispoof.json"}] +2022-10-09 14:33:28 INFO:  test-backend-node.js memory: {"memory":{"unreliable":true,"numTensors":1785,"numDataBuffers":1785,"numBytes":63247332}} +2022-10-09 14:33:28 INFO:  test-backend-node.js state: {"state":{"registeredVariables":{},"nextTapeNodeId":0,"numBytes":63247332,"numTensors":1785,"numStringTensors":0,"numDataBuffers":1785,"gradientDepth":0,"kernelDepth":0,"scopeStack":[],"numDataMovesStack":[],"nextScopeId":0,"tensorInfo":{},"profiling":false,"activeProfile":{"newBytes":0,"newTensors":0,"peakBytes":0,"kernels":[],"result":null,"kernelNames":[]}}} +2022-10-09 14:33:28 INFO:  test-backend-node.js test: warmup +2022-10-09 14:33:28 STATE: test-backend-node.js passed: create human +2022-10-09 14:33:28 INFO:  test-backend-node.js human version: 2.11.1 +2022-10-09 14:33:28 INFO:  test-backend-node.js platform: linux x64 agent: NodeJS v18.10.0 +2022-10-09 14:33:28 INFO:  test-backend-node.js tfjs version: 3.21.0 +2022-10-09 14:33:28 INFO:  test-backend-node.js env: {"browser":false,"node":true,"platform":"linux x64","agent":"NodeJS v18.10.0","backends":["cpu","tensorflow"],"initial":false,"tfjs":{"version":"3.21.0"},"offscreen":false,"perfadd":false,"tensorflow":{"version":"2.9.1","gpu":false},"wasm":{"supported":true,"backend":false},"webgl":{"supported":false,"backend":false},"webgpu":{"supported":false,"backend":false},"cpu":{"flags":[]},"kernels":169} +2022-10-09 14:33:28 STATE: test-backend-node.js passed: set backend: tensorflow +2022-10-09 14:33:28 STATE: test-backend-node.js tensors 1785 +2022-10-09 14:33:28 STATE: test-backend-node.js passed: load models +2022-10-09 14:33:28 STATE: test-backend-node.js result: defined models: 25 loaded models: 11 +2022-10-09 14:33:28 STATE: test-backend-node.js passed: warmup: none default +2022-10-09 14:33:28 DATA:  test-backend-node.js result: face: 0 body: 0 hand: 0 gesture: 0 object: 0 person: 0 {} {} {} +2022-10-09 14:33:28 DATA:  test-backend-node.js result: performance: load: null total: null +2022-10-09 14:33:28 STATE: test-backend-node.js passed: warmup none result match +2022-10-09 14:33:28 STATE: test-backend-node.js event: image +2022-10-09 14:33:28 STATE: test-backend-node.js event: detect +2022-10-09 14:33:28 STATE: test-backend-node.js event: warmup +2022-10-09 14:33:28 STATE: test-backend-node.js passed: warmup: face default +2022-10-09 14:33:28 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 1 gesture: 7 object: 1 person: 1 {"score":1,"age":23.5,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.42,"keypoints":4} +2022-10-09 14:33:28 DATA:  test-backend-node.js result: performance: load: null total: 432 +2022-10-09 14:33:28 STATE: test-backend-node.js passed: warmup face result match +2022-10-09 14:33:28 STATE: test-backend-node.js event: image +2022-10-09 14:33:28 STATE: test-backend-node.js event: detect +2022-10-09 14:33:28 STATE: test-backend-node.js event: warmup +2022-10-09 14:33:28 STATE: test-backend-node.js passed: warmup: body default +2022-10-09 14:33:28 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 1 gesture: 7 object: 1 person: 1 {"score":1,"age":23.7,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2022-10-09 14:33:28 DATA:  test-backend-node.js result: performance: load: null total: 346 +2022-10-09 14:33:28 STATE: test-backend-node.js passed: warmup body result match +2022-10-09 14:33:28 STATE: test-backend-node.js details: {"face":{"boxScore":0.92,"faceScore":1,"age":23.7,"gender":"female","genderScore":0.97},"emotion":[{"score":0.63,"emotion":"angry"},{"score":0.22,"emotion":"fear"}],"body":{"score":0.92,"keypoints":17},"hand":{"boxScore":0.52,"fingerScore":0.73,"keypoints":21},"gestures":[{"face":0,"gesture":"facing right"},{"face":0,"gesture":"mouth 10% open"},{"hand":0,"gesture":"pinky forward"},{"hand":0,"gesture":"palm up"},{"hand":0,"gesture":"open palm"},{"iris":0,"gesture":"looking left"},{"iris":0,"gesture":"looking up"}]} +2022-10-09 14:33:28 INFO:  test-backend-node.js test: details verification +2022-10-09 14:33:28 STATE: test-backend-node.js start default +2022-10-09 14:33:29 STATE: test-backend-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} +2022-10-09 14:33:29 STATE: test-backend-node.js event: image +2022-10-09 14:33:29 STATE: test-backend-node.js event: detect +2022-10-09 14:33:29 STATE: test-backend-node.js passed: detect: samples/in/ai-body.jpg default +2022-10-09 14:33:29 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 1 gesture: 7 object: 1 person: 1 {"score":1,"age":23.7,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2022-10-09 14:33:29 DATA:  test-backend-node.js result: performance: load: null total: 331 +2022-10-09 14:33:29 STATE: test-backend-node.js passed: details face length 1 +2022-10-09 14:33:29 STATE: test-backend-node.js passed: details face score 1 0.93 1 +2022-10-09 14:33:29 STATE: test-backend-node.js passed: details face age/gender 23.7 female 0.97 85.47 +2022-10-09 14:33:29 STATE: test-backend-node.js passed: details face arrays 4 478 1024 +2022-10-09 14:33:29 STATE: test-backend-node.js passed: details face emotion 2 {"score":0.59,"emotion":"angry"} +2022-10-09 14:33:29 STATE: test-backend-node.js passed: details face anti-spoofing 0.79 +2022-10-09 14:33:29 STATE: test-backend-node.js passed: details face liveness 0.83 +2022-10-09 14:33:29 STATE: test-backend-node.js passed: details body length 1 +2022-10-09 14:33:29 STATE: test-backend-node.js passed: details body 0.92 17 6 +2022-10-09 14:33:29 STATE: test-backend-node.js passed: details hand length 1 +2022-10-09 14:33:29 STATE: test-backend-node.js passed: details hand 0.51 0.73 point +2022-10-09 14:33:29 STATE: test-backend-node.js passed: details hand arrays 21 5 7 +2022-10-09 14:33:29 STATE: test-backend-node.js passed: details gesture length 7 +2022-10-09 14:33:29 STATE: test-backend-node.js passed: details gesture first {"face":0,"gesture":"facing right"} +2022-10-09 14:33:29 STATE: test-backend-node.js passed: details object length 1 +2022-10-09 14:33:29 STATE: test-backend-node.js passed: details object 0.72 person +2022-10-09 14:33:29 STATE: test-backend-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,4] {"checksum":1371996928} +2022-10-09 14:33:29 STATE: test-backend-node.js event: image +2022-10-09 14:33:29 STATE: test-backend-node.js event: detect +2022-10-09 14:33:29 STATE: test-backend-node.js passed: tensor shape: [1,1200,1200,4] dtype: float32 +2022-10-09 14:33:30 STATE: test-backend-node.js passed: load image: samples/in/ai-body.jpg [1200,1200,4] {"checksum":1371996928} +2022-10-09 14:33:30 STATE: test-backend-node.js event: image +2022-10-09 14:33:30 STATE: test-backend-node.js event: detect +2022-10-09 14:33:30 STATE: test-backend-node.js passed: tensor shape: [1200,1200,4] dtype: float32 +2022-10-09 14:33:30 STATE: test-backend-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} +2022-10-09 14:33:30 STATE: test-backend-node.js event: image +2022-10-09 14:33:30 STATE: test-backend-node.js event: detect +2022-10-09 14:33:30 STATE: test-backend-node.js passed: tensor shape: [1,1200,1200,3] dtype: float32 +2022-10-09 14:33:31 STATE: test-backend-node.js passed: load image: samples/in/ai-body.jpg [1200,1200,3] {"checksum":1004796864} +2022-10-09 14:33:31 STATE: test-backend-node.js event: image +2022-10-09 14:33:31 STATE: test-backend-node.js event: detect +2022-10-09 14:33:31 STATE: test-backend-node.js passed: tensor shape: [1200,1200,3] dtype: float32 +2022-10-09 14:33:31 STATE: test-backend-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,4] {"checksum":1371996871} +2022-10-09 14:33:31 STATE: test-backend-node.js event: image +2022-10-09 14:33:31 STATE: test-backend-node.js event: detect +2022-10-09 14:33:31 STATE: test-backend-node.js passed: tensor shape: [1,1200,1200,4] dtype: int32 +2022-10-09 14:33:31 INFO:  test-backend-node.js test default +2022-10-09 14:33:31 STATE: test-backend-node.js start async +2022-10-09 14:33:32 STATE: test-backend-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} +2022-10-09 14:33:32 STATE: test-backend-node.js event: image +2022-10-09 14:33:32 STATE: test-backend-node.js event: detect +2022-10-09 14:33:32 STATE: test-backend-node.js passed: detect: samples/in/ai-body.jpg async +2022-10-09 14:33:32 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 1 gesture: 7 object: 1 person: 1 {"score":1,"age":23.7,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2022-10-09 14:33:32 DATA:  test-backend-node.js result: performance: load: null total: 304 +2022-10-09 14:33:32 STATE: test-backend-node.js passed: default result face match 1 female 0.97 +2022-10-09 14:33:32 INFO:  test-backend-node.js test sync +2022-10-09 14:33:32 STATE: test-backend-node.js start sync +2022-10-09 14:33:32 STATE: test-backend-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} +2022-10-09 14:33:32 STATE: test-backend-node.js event: image +2022-10-09 14:33:32 STATE: test-backend-node.js event: detect +2022-10-09 14:33:32 STATE: test-backend-node.js passed: detect: samples/in/ai-body.jpg sync +2022-10-09 14:33:32 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 1 gesture: 7 object: 1 person: 1 {"score":1,"age":23.7,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2022-10-09 14:33:32 DATA:  test-backend-node.js result: performance: load: null total: 306 +2022-10-09 14:33:32 STATE: test-backend-node.js passed: default sync 1 female 0.97 +2022-10-09 14:33:32 INFO:  test-backend-node.js test: image process +2022-10-09 14:33:32 STATE: test-backend-node.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} +2022-10-09 14:33:32 STATE: test-backend-node.js passed: image input null [1,256,256,3] +2022-10-09 14:33:32 INFO:  test-backend-node.js test: image null +2022-10-09 14:33:32 STATE: test-backend-node.js passed: invalid input could not convert input to tensor +2022-10-09 14:33:32 INFO:  test-backend-node.js test face similarity +2022-10-09 14:33:32 STATE: test-backend-node.js start face similarity +2022-10-09 14:33:32 STATE: test-backend-node.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} +2022-10-09 14:33:32 STATE: test-backend-node.js event: image +2022-10-09 14:33:33 STATE: test-backend-node.js event: detect +2022-10-09 14:33:33 STATE: test-backend-node.js passed: detect: samples/in/ai-face.jpg face similarity +2022-10-09 14:33:33 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 1 gesture: 6 object: 1 person: 1 {"score":1,"age":23.5,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.47,"keypoints":3} +2022-10-09 14:33:33 DATA:  test-backend-node.js result: performance: load: null total: 299 +2022-10-09 14:33:33 STATE: test-backend-node.js start face similarity +2022-10-09 14:33:33 STATE: test-backend-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} +2022-10-09 14:33:33 STATE: test-backend-node.js event: image +2022-10-09 14:33:33 STATE: test-backend-node.js event: detect +2022-10-09 14:33:33 STATE: test-backend-node.js passed: detect: samples/in/ai-body.jpg face similarity +2022-10-09 14:33:33 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 1 gesture: 7 object: 1 person: 1 {"score":1,"age":23.7,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2022-10-09 14:33:33 DATA:  test-backend-node.js result: performance: load: null total: 310 +2022-10-09 14:33:33 STATE: test-backend-node.js start face similarity +2022-10-09 14:33:33 STATE: test-backend-node.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289024} +2022-10-09 14:33:33 STATE: test-backend-node.js event: image +2022-10-09 14:33:33 STATE: test-backend-node.js event: detect +2022-10-09 14:33:33 STATE: test-backend-node.js passed: detect: samples/in/ai-upper.jpg face similarity +2022-10-09 14:33:33 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 1 person: 1 {"score":1,"age":23.5,"gender":"female"} {"score":0.71,"class":"person"} {"score":0.75,"keypoints":7} +2022-10-09 14:33:33 DATA:  test-backend-node.js result: performance: load: null total: 271 +2022-10-09 14:33:33 STATE: test-backend-node.js passed: face descriptor +2022-10-09 14:33:34 STATE: test-backend-node.js passed: face similarity {"similarity":[1,0.44727441595492046,0.556793560189727],"descriptors":[1024,1024,1024]} +2022-10-09 14:33:34 INFO:  test-backend-node.js test object +2022-10-09 14:33:34 STATE: test-backend-node.js start object +2022-10-09 14:33:34 STATE: test-backend-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} +2022-10-09 14:33:34 STATE: test-backend-node.js event: image +2022-10-09 14:33:34 STATE: test-backend-node.js event: detect +2022-10-09 14:33:34 STATE: test-backend-node.js passed: detect: samples/in/ai-body.jpg object +2022-10-09 14:33:34 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 1 gesture: 7 object: 1 person: 1 {"score":1,"age":23.7,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2022-10-09 14:33:34 DATA:  test-backend-node.js result: performance: load: null total: 300 +2022-10-09 14:33:34 STATE: test-backend-node.js passed: centernet +2022-10-09 14:33:34 STATE: test-backend-node.js start object +2022-10-09 14:33:35 STATE: test-backend-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} +2022-10-09 14:33:35 STATE: test-backend-node.js event: image +2022-10-09 14:33:35 STATE: test-backend-node.js event: detect +2022-10-09 14:33:35 STATE: test-backend-node.js passed: detect: samples/in/ai-body.jpg object +2022-10-09 14:33:35 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 1 gesture: 7 object: 3 person: 1 {"score":1,"age":23.7,"gender":"female"} {"score":0.86,"class":"person"} {"score":0.92,"keypoints":17} +2022-10-09 14:33:35 DATA:  test-backend-node.js result: performance: load: null total: 307 +2022-10-09 14:33:35 STATE: test-backend-node.js passed: nanodet +2022-10-09 14:33:35 INFO:  test-backend-node.js test sensitive +2022-10-09 14:33:35 STATE: test-backend-node.js start sensitive +2022-10-09 14:33:36 STATE: test-backend-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} +2022-10-09 14:33:36 STATE: test-backend-node.js event: image +2022-10-09 14:33:36 STATE: test-backend-node.js event: detect +2022-10-09 14:33:36 STATE: test-backend-node.js passed: detect: samples/in/ai-body.jpg sensitive +2022-10-09 14:33:36 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 2 gesture: 9 object: 0 person: 1 {"score":1,"age":23.7,"gender":"female"} {} {"score":0.92,"keypoints":17} +2022-10-09 14:33:36 DATA:  test-backend-node.js result: performance: load: null total: 261 +2022-10-09 14:33:36 STATE: test-backend-node.js passed: sensitive result match +2022-10-09 14:33:36 STATE: test-backend-node.js passed: sensitive face result match +2022-10-09 14:33:36 STATE: test-backend-node.js passed: sensitive face emotion result [{"score":0.59,"emotion":"angry"},{"score":0.29,"emotion":"fear"}] +2022-10-09 14:33:36 STATE: test-backend-node.js passed: sensitive body result match +2022-10-09 14:33:36 STATE: test-backend-node.js passed: sensitive hand result match +2022-10-09 14:33:36 INFO:  test-backend-node.js test body +2022-10-09 14:33:36 STATE: test-backend-node.js start blazepose +2022-10-09 14:33:38 STATE: test-backend-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} +2022-10-09 14:33:38 STATE: test-backend-node.js event: image +2022-10-09 14:33:39 STATE: test-backend-node.js event: detect +2022-10-09 14:33:39 STATE: test-backend-node.js passed: detect: samples/in/ai-body.jpg blazepose +2022-10-09 14:33:39 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 2 gesture: 9 object: 0 person: 1 {"score":1,"age":23.7,"gender":"female"} {} {"score":0.99,"keypoints":39} +2022-10-09 14:33:39 DATA:  test-backend-node.js result: performance: load: null total: 338 +2022-10-09 14:33:39 STATE: test-backend-node.js passed: blazepose +2022-10-09 14:33:39 STATE: test-backend-node.js start efficientpose +2022-10-09 14:33:39 STATE: test-backend-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} +2022-10-09 14:33:39 STATE: test-backend-node.js event: image +2022-10-09 14:33:40 STATE: test-backend-node.js event: detect +2022-10-09 14:33:40 STATE: test-backend-node.js passed: detect: samples/in/ai-body.jpg efficientpose +2022-10-09 14:33:40 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 2 gesture: 9 object: 0 person: 1 {"score":1,"age":23.7,"gender":"female"} {} {"score":0.75,"keypoints":13} +2022-10-09 14:33:40 DATA:  test-backend-node.js result: performance: load: null total: 321 +2022-10-09 14:33:40 STATE: test-backend-node.js passed: efficientpose +2022-10-09 14:33:40 STATE: test-backend-node.js start posenet +2022-10-09 14:33:40 STATE: test-backend-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} +2022-10-09 14:33:40 STATE: test-backend-node.js event: image +2022-10-09 14:33:41 STATE: test-backend-node.js event: detect +2022-10-09 14:33:41 STATE: test-backend-node.js passed: detect: samples/in/ai-body.jpg posenet +2022-10-09 14:33:41 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 2 gesture: 9 object: 0 person: 1 {"score":1,"age":23.7,"gender":"female"} {} {"score":0.96,"keypoints":16} +2022-10-09 14:33:41 DATA:  test-backend-node.js result: performance: load: null total: 254 +2022-10-09 14:33:41 STATE: test-backend-node.js passed: posenet +2022-10-09 14:33:41 STATE: test-backend-node.js start movenet +2022-10-09 14:33:41 STATE: test-backend-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} +2022-10-09 14:33:41 STATE: test-backend-node.js event: image +2022-10-09 14:33:41 STATE: test-backend-node.js event: detect +2022-10-09 14:33:41 STATE: test-backend-node.js passed: detect: samples/in/ai-body.jpg movenet +2022-10-09 14:33:41 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 2 gesture: 9 object: 0 person: 1 {"score":1,"age":23.7,"gender":"female"} {} {"score":0.92,"keypoints":17} +2022-10-09 14:33:41 DATA:  test-backend-node.js result: performance: load: null total: 256 +2022-10-09 14:33:41 STATE: test-backend-node.js passed: movenet +2022-10-09 14:33:41 INFO:  test-backend-node.js test face matching +2022-10-09 14:33:41 STATE: test-backend-node.js passed: face database 40 +2022-10-09 14:33:41 STATE: test-backend-node.js passed: face match {"first":{"index":4,"similarity":0.7827852251220577}} {"second":{"index":4,"similarity":0.5002052057057577}} {"third":{"index":4,"similarity":0.5401588464054732}} +2022-10-09 14:33:41 INFO:  test-backend-node.js test face similarity alternative +2022-10-09 14:33:41 STATE: test-backend-node.js start face embeddings +2022-10-09 14:33:41 STATE: test-backend-node.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} +2022-10-09 14:33:41 STATE: test-backend-node.js event: image +2022-10-09 14:33:42 STATE: test-backend-node.js event: detect +2022-10-09 14:33:42 STATE: test-backend-node.js passed: detect: samples/in/ai-face.jpg face embeddings +2022-10-09 14:33:42 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 2 gesture: 8 object: 0 person: 1 {"score":1,"age":23.5,"gender":"female"} {} {"score":0.47,"keypoints":3} +2022-10-09 14:33:42 DATA:  test-backend-node.js result: performance: load: null total: 294 +2022-10-09 14:33:42 STATE: test-backend-node.js passed: mobilefacenet {"embedding":192} +2022-10-09 14:33:42 STATE: test-backend-node.js start face embeddings +2022-10-09 14:33:42 STATE: test-backend-node.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} +2022-10-09 14:33:42 STATE: test-backend-node.js event: image +2022-10-09 14:33:43 STATE: test-backend-node.js event: detect +2022-10-09 14:33:43 STATE: test-backend-node.js passed: detect: samples/in/ai-face.jpg face embeddings +2022-10-09 14:33:43 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 2 gesture: 8 object: 0 person: 1 {"score":1,"age":23.5,"gender":"female"} {} {"score":0.47,"keypoints":3} +2022-10-09 14:33:43 DATA:  test-backend-node.js result: performance: load: null total: 318 +2022-10-09 14:33:43 STATE: test-backend-node.js passed: insightface {"embedding":512} +2022-10-09 14:33:43 INFO:  test-backend-node.js test face attention +2022-10-09 14:33:43 STATE: test-backend-node.js start face attention +2022-10-09 14:33:43 STATE: test-backend-node.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} +2022-10-09 14:33:43 STATE: test-backend-node.js event: image +2022-10-09 14:33:43 STATE: test-backend-node.js event: detect +2022-10-09 14:33:43 STATE: test-backend-node.js passed: detect: samples/in/ai-face.jpg face attention +2022-10-09 14:33:43 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 2 gesture: 8 object: 0 person: 1 {"score":1,"age":23.5,"gender":"female"} {} {"score":0.47,"keypoints":3} +2022-10-09 14:33:43 DATA:  test-backend-node.js result: performance: load: null total: 294 +2022-10-09 14:33:43 STATE: test-backend-node.js passed: face attention +2022-10-09 14:33:43 INFO:  test-backend-node.js test detectors +2022-10-09 14:33:43 STATE: test-backend-node.js start detectors +2022-10-09 14:33:44 STATE: test-backend-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} +2022-10-09 14:33:44 STATE: test-backend-node.js event: image +2022-10-09 14:33:44 STATE: test-backend-node.js event: detect +2022-10-09 14:33:44 STATE: test-backend-node.js passed: detect: samples/in/ai-body.jpg detectors +2022-10-09 14:33:44 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 0 person: 1 {"score":0.93,"gender":"unknown"} {} {"score":0.92,"keypoints":17} +2022-10-09 14:33:44 DATA:  test-backend-node.js result: performance: load: null total: 195 +2022-10-09 14:33:44 STATE: test-backend-node.js passed: detector result face match +2022-10-09 14:33:44 STATE: test-backend-node.js passed: detector result hand match +2022-10-09 14:33:44 INFO:  test-backend-node.js test: multi-instance +2022-10-09 14:33:44 STATE: test-backend-node.js start multi instance +2022-10-09 14:33:44 STATE: test-backend-node.js event: image +2022-10-09 14:33:44 STATE: test-backend-node.js event: detect +2022-10-09 14:33:44 STATE: test-backend-node.js passed: detect: random multi instance +2022-10-09 14:33:44 DATA:  test-backend-node.js result: face: 0 body: 1 hand: 0 gesture: 0 object: 0 person: 0 {} {} {"score":0,"keypoints":0} +2022-10-09 14:33:44 DATA:  test-backend-node.js result: performance: load: null total: 136 +2022-10-09 14:33:44 INFO:  test-backend-node.js test: first instance +2022-10-09 14:33:44 STATE: test-backend-node.js start multi instance +2022-10-09 14:33:44 STATE: test-backend-node.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289024} +2022-10-09 14:33:44 STATE: test-backend-node.js passed: detect: samples/in/ai-upper.jpg multi instance +2022-10-09 14:33:44 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 0 person: 1 {"score":0.96,"gender":"unknown"} {} {"score":0.75,"keypoints":7} +2022-10-09 14:33:44 DATA:  test-backend-node.js result: performance: load: null total: 159 +2022-10-09 14:33:44 INFO:  test-backend-node.js test: second instance +2022-10-09 14:33:44 STATE: test-backend-node.js start multi instance +2022-10-09 14:33:44 STATE: test-backend-node.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289024} +2022-10-09 14:33:44 STATE: test-backend-node.js passed: detect: samples/in/ai-upper.jpg multi instance +2022-10-09 14:33:44 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 0 person: 1 {"score":0.96,"gender":"unknown"} {} {"score":0.75,"keypoints":7} +2022-10-09 14:33:44 DATA:  test-backend-node.js result: performance: load: null total: 151 +2022-10-09 14:33:44 INFO:  test-backend-node.js test: concurrent +2022-10-09 14:33:44 STATE: test-backend-node.js start concurrent +2022-10-09 14:33:44 STATE: test-backend-node.js start concurrent +2022-10-09 14:33:44 STATE: test-backend-node.js start concurrent +2022-10-09 14:33:44 STATE: test-backend-node.js start concurrent +2022-10-09 14:33:44 STATE: test-backend-node.js start concurrent +2022-10-09 14:33:44 STATE: test-backend-node.js start concurrent +2022-10-09 14:33:44 STATE: test-backend-node.js start concurrent +2022-10-09 14:33:44 STATE: test-backend-node.js start concurrent +2022-10-09 14:33:44 STATE: test-backend-node.js start concurrent +2022-10-09 14:33:44 STATE: test-backend-node.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} +2022-10-09 14:33:44 STATE: test-backend-node.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} +2022-10-09 14:33:44 STATE: test-backend-node.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} +2022-10-09 14:33:45 STATE: test-backend-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} +2022-10-09 14:33:45 STATE: test-backend-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} +2022-10-09 14:33:45 STATE: test-backend-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} +2022-10-09 14:33:45 STATE: test-backend-node.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289024} +2022-10-09 14:33:45 STATE: test-backend-node.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289024} +2022-10-09 14:33:45 STATE: test-backend-node.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289024} +2022-10-09 14:33:45 STATE: test-backend-node.js event: image +2022-10-09 14:33:45 STATE: test-backend-node.js event: image +2022-10-09 14:33:45 STATE: test-backend-node.js event: image +2022-10-09 14:33:46 STATE: test-backend-node.js event: detect +2022-10-09 14:33:46 STATE: test-backend-node.js passed: detect: samples/in/ai-upper.jpg concurrent +2022-10-09 14:33:46 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 0 person: 1 {"score":0.96,"gender":"unknown"} {} {"score":0.75,"keypoints":7} +2022-10-09 14:33:46 DATA:  test-backend-node.js result: performance: load: null total: 1272 +2022-10-09 14:33:46 STATE: test-backend-node.js passed: detect: samples/in/ai-upper.jpg concurrent +2022-10-09 14:33:46 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 0 person: 1 {"score":0.96,"gender":"unknown"} {} {"score":0.75,"keypoints":7} +2022-10-09 14:33:46 DATA:  test-backend-node.js result: performance: load: null total: 1272 +2022-10-09 14:33:46 STATE: test-backend-node.js passed: detect: samples/in/ai-upper.jpg concurrent +2022-10-09 14:33:46 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 0 person: 1 {"score":0.96,"gender":"unknown"} {} {"score":0.75,"keypoints":7} +2022-10-09 14:33:46 DATA:  test-backend-node.js result: performance: load: null total: 1272 +2022-10-09 14:33:46 STATE: test-backend-node.js event: detect +2022-10-09 14:33:46 STATE: test-backend-node.js event: detect +2022-10-09 14:33:46 STATE: test-backend-node.js passed: detect: samples/in/ai-face.jpg concurrent +2022-10-09 14:33:46 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 0 person: 1 {"score":0.91,"gender":"unknown"} {} {"score":0.47,"keypoints":3} +2022-10-09 14:33:46 DATA:  test-backend-node.js result: performance: load: null total: 1273 +2022-10-09 14:33:46 STATE: test-backend-node.js passed: detect: samples/in/ai-face.jpg concurrent +2022-10-09 14:33:46 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 0 person: 1 {"score":0.91,"gender":"unknown"} {} {"score":0.47,"keypoints":3} +2022-10-09 14:33:46 DATA:  test-backend-node.js result: performance: load: null total: 1273 +2022-10-09 14:33:46 STATE: test-backend-node.js passed: detect: samples/in/ai-face.jpg concurrent +2022-10-09 14:33:46 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 0 person: 1 {"score":0.91,"gender":"unknown"} {} {"score":0.47,"keypoints":3} +2022-10-09 14:33:46 DATA:  test-backend-node.js result: performance: load: null total: 1273 +2022-10-09 14:33:46 STATE: test-backend-node.js passed: detect: samples/in/ai-body.jpg concurrent +2022-10-09 14:33:46 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 0 person: 1 {"score":0.93,"gender":"unknown"} {} {"score":0.92,"keypoints":17} +2022-10-09 14:33:46 DATA:  test-backend-node.js result: performance: load: null total: 1273 +2022-10-09 14:33:46 STATE: test-backend-node.js passed: detect: samples/in/ai-body.jpg concurrent +2022-10-09 14:33:46 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 0 person: 1 {"score":0.93,"gender":"unknown"} {} {"score":0.92,"keypoints":17} +2022-10-09 14:33:46 DATA:  test-backend-node.js result: performance: load: null total: 1273 +2022-10-09 14:33:46 STATE: test-backend-node.js passed: detect: samples/in/ai-body.jpg concurrent +2022-10-09 14:33:46 DATA:  test-backend-node.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 0 person: 1 {"score":0.93,"gender":"unknown"} {} {"score":0.92,"keypoints":17} +2022-10-09 14:33:46 DATA:  test-backend-node.js result: performance: load: null total: 1273 +2022-10-09 14:33:46 INFO:  test-backend-node.js test: monkey-patch +2022-10-09 14:33:46 STATE: test-backend-node.js event: image +2022-10-09 14:33:47 STATE: test-backend-node.js event: detect +2022-10-09 14:33:47 STATE: test-backend-node.js passed: monkey patch +2022-10-09 14:33:47 STATE: test-backend-node.js passed: segmentation [262144] +2022-10-09 14:33:47 STATE: test-backend-node.js passeed: equal usage +2022-10-09 14:33:47 INFO:  test-backend-node.js test: input compare +2022-10-09 14:33:47 STATE: test-backend-node.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} +2022-10-09 14:33:47 STATE: test-backend-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} +2022-10-09 14:33:47 STATE: test-backend-node.js passed: image compare 0 23.275441687091504 +2022-10-09 14:33:47 INFO:  test-backend-node.js events: {"image":29,"detect":29,"warmup":2} +2022-10-09 14:33:47 INFO:  test-backend-node.js tensors 4441 +2022-10-09 14:33:47 INFO:  test-backend-node.js test complete: 19672 ms +2022-10-09 14:33:47 INFO:  +2022-10-09 14:33:47 INFO:  test-backend-node-gpu.js start +2022-10-09 14:33:48 INFO:  test-backend-node-gpu.js test: configuration validation +2022-10-09 14:33:48 STATE: test-backend-node-gpu.js passed: configuration default validation [] +2022-10-09 14:33:48 STATE: test-backend-node-gpu.js passed: configuration invalid validation [{"reason":"unknown property","where":"config.invalid = true"}] +2022-10-09 14:33:48 INFO:  test-backend-node-gpu.js test: model load +2022-10-09 14:33:48 STATE: test-backend-node-gpu.js passed: models loaded 25 11 [{"name":"ssrnetage","loaded":false,"url":null},{"name":"gear","loaded":false,"url":null},{"name":"blazeposedetect","loaded":false,"url":null},{"name":"blazepose","loaded":false,"url":null},{"name":"centernet","loaded":true,"url":"file://models/mb3-centernet.json"},{"name":"efficientpose","loaded":false,"url":null},{"name":"mobilefacenet","loaded":false,"url":null},{"name":"insightface","loaded":false,"url":null},{"name":"emotion","loaded":true,"url":"file://models/emotion.json"},{"name":"facedetect","loaded":true,"url":"file://models/blazeface.json"},{"name":"faceiris","loaded":true,"url":"file://models/iris.json"},{"name":"facemesh","loaded":true,"url":"file://models/facemesh.json"},{"name":"faceres","loaded":true,"url":"file://models/faceres.json"},{"name":"ssrnetgender","loaded":false,"url":null},{"name":"handpose","loaded":false,"url":null},{"name":"handskeleton","loaded":true,"url":"file://models/handlandmark-full.json"},{"name":"handtrack","loaded":true,"url":"file://models/handtrack.json"},{"name":"liveness","loaded":true,"url":"file://models/liveness.json"},{"name":"meet","loaded":false,"url":null},{"name":"movenet","loaded":true,"url":"file://models/movenet-lightning.json"},{"name":"nanodet","loaded":false,"url":null},{"name":"posenet","loaded":false,"url":null},{"name":"selfie","loaded":false,"url":null},{"name":"rvm","loaded":false,"url":null},{"name":"antispoof","loaded":true,"url":"file://models/antispoof.json"}] +2022-10-09 14:33:48 INFO:  test-backend-node-gpu.js memory: {"memory":{"unreliable":true,"numTensors":1785,"numDataBuffers":1785,"numBytes":63247332}} +2022-10-09 14:33:48 INFO:  test-backend-node-gpu.js state: {"state":{"registeredVariables":{},"nextTapeNodeId":0,"numBytes":63247332,"numTensors":1785,"numStringTensors":0,"numDataBuffers":1785,"gradientDepth":0,"kernelDepth":0,"scopeStack":[],"numDataMovesStack":[],"nextScopeId":0,"tensorInfo":{},"profiling":false,"activeProfile":{"newBytes":0,"newTensors":0,"peakBytes":0,"kernels":[],"result":null,"kernelNames":[]}}} +2022-10-09 14:33:48 INFO:  test-backend-node-gpu.js test: warmup +2022-10-09 14:33:48 STATE: test-backend-node-gpu.js passed: create human +2022-10-09 14:33:48 INFO:  test-backend-node-gpu.js human version: 2.11.1 +2022-10-09 14:33:48 INFO:  test-backend-node-gpu.js platform: linux x64 agent: NodeJS v18.10.0 +2022-10-09 14:33:48 INFO:  test-backend-node-gpu.js tfjs version: 3.21.0 +2022-10-09 14:33:48 INFO:  test-backend-node-gpu.js env: {"browser":false,"node":true,"platform":"linux x64","agent":"NodeJS v18.10.0","backends":["cpu","tensorflow"],"initial":false,"tfjs":{"version":"3.21.0"},"offscreen":false,"perfadd":false,"tensorflow":{"version":"2.9.1","gpu":true},"wasm":{"supported":true,"backend":false},"webgl":{"supported":false,"backend":false},"webgpu":{"supported":false,"backend":false},"cpu":{"flags":[]},"kernels":169} +2022-10-09 14:33:48 STATE: test-backend-node-gpu.js passed: set backend: tensorflow +2022-10-09 14:33:48 STATE: test-backend-node-gpu.js tensors 1785 +2022-10-09 14:33:48 STATE: test-backend-node-gpu.js passed: load models +2022-10-09 14:33:48 STATE: test-backend-node-gpu.js result: defined models: 25 loaded models: 11 +2022-10-09 14:33:48 STATE: test-backend-node-gpu.js passed: warmup: none default +2022-10-09 14:33:48 DATA:  test-backend-node-gpu.js result: face: 0 body: 0 hand: 0 gesture: 0 object: 0 person: 0 {} {} {} +2022-10-09 14:33:48 DATA:  test-backend-node-gpu.js result: performance: load: null total: null +2022-10-09 14:33:48 STATE: test-backend-node-gpu.js passed: warmup none result match +2022-10-09 14:33:49 STATE: test-backend-node-gpu.js event: image +2022-10-09 14:33:51 STATE: test-backend-node-gpu.js event: detect +2022-10-09 14:33:51 STATE: test-backend-node-gpu.js event: warmup +2022-10-09 14:33:51 STATE: test-backend-node-gpu.js passed: warmup: face default +2022-10-09 14:33:51 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 7 object: 1 person: 1 {"score":1,"age":23.5,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.42,"keypoints":4} +2022-10-09 14:33:51 DATA:  test-backend-node-gpu.js result: performance: load: null total: 2662 +2022-10-09 14:33:51 STATE: test-backend-node-gpu.js passed: warmup face result match +2022-10-09 14:33:51 STATE: test-backend-node-gpu.js event: image +2022-10-09 14:33:51 STATE: test-backend-node-gpu.js event: detect +2022-10-09 14:33:51 STATE: test-backend-node-gpu.js event: warmup +2022-10-09 14:33:51 STATE: test-backend-node-gpu.js passed: warmup: body default +2022-10-09 14:33:51 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 7 object: 1 person: 1 {"score":1,"age":23.7,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2022-10-09 14:33:51 DATA:  test-backend-node-gpu.js result: performance: load: null total: 193 +2022-10-09 14:33:51 STATE: test-backend-node-gpu.js passed: warmup body result match +2022-10-09 14:33:51 STATE: test-backend-node-gpu.js details: {"face":{"boxScore":0.92,"faceScore":1,"age":23.7,"gender":"female","genderScore":0.97},"emotion":[{"score":0.63,"emotion":"angry"},{"score":0.22,"emotion":"fear"}],"body":{"score":0.92,"keypoints":17},"hand":{"boxScore":0.52,"fingerScore":0.73,"keypoints":21},"gestures":[{"face":0,"gesture":"facing right"},{"face":0,"gesture":"mouth 10% open"},{"hand":0,"gesture":"pinky forward"},{"hand":0,"gesture":"palm up"},{"hand":0,"gesture":"open palm"},{"iris":0,"gesture":"looking left"},{"iris":0,"gesture":"looking up"}]} +2022-10-09 14:33:51 INFO:  test-backend-node-gpu.js test: details verification +2022-10-09 14:33:51 STATE: test-backend-node-gpu.js start default +2022-10-09 14:33:52 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796928} +2022-10-09 14:33:52 STATE: test-backend-node-gpu.js event: image +2022-10-09 14:33:52 STATE: test-backend-node-gpu.js event: detect +2022-10-09 14:33:52 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-body.jpg default +2022-10-09 14:33:52 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 7 object: 1 person: 1 {"score":1,"age":23.7,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2022-10-09 14:33:52 DATA:  test-backend-node-gpu.js result: performance: load: null total: 179 +2022-10-09 14:33:52 STATE: test-backend-node-gpu.js passed: details face length 1 +2022-10-09 14:33:52 STATE: test-backend-node-gpu.js passed: details face score 1 0.93 1 +2022-10-09 14:33:52 STATE: test-backend-node-gpu.js passed: details face age/gender 23.7 female 0.97 85.47 +2022-10-09 14:33:52 STATE: test-backend-node-gpu.js passed: details face arrays 4 478 1024 +2022-10-09 14:33:52 STATE: test-backend-node-gpu.js passed: details face emotion 2 {"score":0.59,"emotion":"angry"} +2022-10-09 14:33:52 STATE: test-backend-node-gpu.js passed: details face anti-spoofing 0.79 +2022-10-09 14:33:52 STATE: test-backend-node-gpu.js passed: details face liveness 0.83 +2022-10-09 14:33:52 STATE: test-backend-node-gpu.js passed: details body length 1 +2022-10-09 14:33:52 STATE: test-backend-node-gpu.js passed: details body 0.92 17 6 +2022-10-09 14:33:52 STATE: test-backend-node-gpu.js passed: details hand length 1 +2022-10-09 14:33:52 STATE: test-backend-node-gpu.js passed: details hand 0.51 0.73 point +2022-10-09 14:33:52 STATE: test-backend-node-gpu.js passed: details hand arrays 21 5 7 +2022-10-09 14:33:52 STATE: test-backend-node-gpu.js passed: details gesture length 7 +2022-10-09 14:33:52 STATE: test-backend-node-gpu.js passed: details gesture first {"face":0,"gesture":"facing right"} +2022-10-09 14:33:52 STATE: test-backend-node-gpu.js passed: details object length 1 +2022-10-09 14:33:52 STATE: test-backend-node-gpu.js passed: details object 0.72 person +2022-10-09 14:33:52 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,4] {"checksum":1371996928} +2022-10-09 14:33:52 STATE: test-backend-node-gpu.js event: image +2022-10-09 14:33:52 STATE: test-backend-node-gpu.js event: detect +2022-10-09 14:33:52 STATE: test-backend-node-gpu.js passed: tensor shape: [1,1200,1200,4] dtype: float32 +2022-10-09 14:33:52 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-body.jpg [1200,1200,4] {"checksum":1371996928} +2022-10-09 14:33:52 STATE: test-backend-node-gpu.js event: image +2022-10-09 14:33:52 STATE: test-backend-node-gpu.js event: detect +2022-10-09 14:33:52 STATE: test-backend-node-gpu.js passed: tensor shape: [1200,1200,4] dtype: float32 +2022-10-09 14:33:53 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796928} +2022-10-09 14:33:53 STATE: test-backend-node-gpu.js event: image +2022-10-09 14:33:53 STATE: test-backend-node-gpu.js event: detect +2022-10-09 14:33:53 STATE: test-backend-node-gpu.js passed: tensor shape: [1,1200,1200,3] dtype: float32 +2022-10-09 14:33:53 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-body.jpg [1200,1200,3] {"checksum":1004796928} +2022-10-09 14:33:53 STATE: test-backend-node-gpu.js event: image +2022-10-09 14:33:53 STATE: test-backend-node-gpu.js event: detect +2022-10-09 14:33:53 STATE: test-backend-node-gpu.js passed: tensor shape: [1200,1200,3] dtype: float32 +2022-10-09 14:33:53 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,4] {"checksum":1371996871} +2022-10-09 14:33:53 STATE: test-backend-node-gpu.js event: image +2022-10-09 14:33:54 STATE: test-backend-node-gpu.js event: detect +2022-10-09 14:33:54 STATE: test-backend-node-gpu.js passed: tensor shape: [1,1200,1200,4] dtype: int32 +2022-10-09 14:33:54 INFO:  test-backend-node-gpu.js test default +2022-10-09 14:33:54 STATE: test-backend-node-gpu.js start async +2022-10-09 14:33:54 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796928} +2022-10-09 14:33:54 STATE: test-backend-node-gpu.js event: image +2022-10-09 14:33:54 STATE: test-backend-node-gpu.js event: detect +2022-10-09 14:33:54 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-body.jpg async +2022-10-09 14:33:54 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 7 object: 1 person: 1 {"score":1,"age":23.7,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2022-10-09 14:33:54 DATA:  test-backend-node-gpu.js result: performance: load: null total: 154 +2022-10-09 14:33:54 STATE: test-backend-node-gpu.js passed: default result face match 1 female 0.97 +2022-10-09 14:33:54 INFO:  test-backend-node-gpu.js test sync +2022-10-09 14:33:54 STATE: test-backend-node-gpu.js start sync +2022-10-09 14:33:54 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796928} +2022-10-09 14:33:54 STATE: test-backend-node-gpu.js event: image +2022-10-09 14:33:54 STATE: test-backend-node-gpu.js event: detect +2022-10-09 14:33:54 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-body.jpg sync +2022-10-09 14:33:54 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 7 object: 1 person: 1 {"score":1,"age":23.7,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2022-10-09 14:33:54 DATA:  test-backend-node-gpu.js result: performance: load: null total: 183 +2022-10-09 14:33:54 STATE: test-backend-node-gpu.js passed: default sync 1 female 0.97 +2022-10-09 14:33:54 INFO:  test-backend-node-gpu.js test: image process +2022-10-09 14:33:54 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} +2022-10-09 14:33:54 STATE: test-backend-node-gpu.js passed: image input null [1,256,256,3] +2022-10-09 14:33:54 INFO:  test-backend-node-gpu.js test: image null +2022-10-09 14:33:54 STATE: test-backend-node-gpu.js passed: invalid input could not convert input to tensor +2022-10-09 14:33:54 INFO:  test-backend-node-gpu.js test face similarity +2022-10-09 14:33:54 STATE: test-backend-node-gpu.js start face similarity +2022-10-09 14:33:54 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} +2022-10-09 14:33:54 STATE: test-backend-node-gpu.js event: image +2022-10-09 14:33:54 STATE: test-backend-node-gpu.js event: detect +2022-10-09 14:33:54 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-face.jpg face similarity +2022-10-09 14:33:54 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 6 object: 1 person: 1 {"score":1,"age":23.5,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.47,"keypoints":3} +2022-10-09 14:33:54 DATA:  test-backend-node-gpu.js result: performance: load: null total: 166 +2022-10-09 14:33:54 STATE: test-backend-node-gpu.js start face similarity +2022-10-09 14:33:55 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796928} +2022-10-09 14:33:55 STATE: test-backend-node-gpu.js event: image +2022-10-09 14:33:55 STATE: test-backend-node-gpu.js event: detect +2022-10-09 14:33:55 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-body.jpg face similarity +2022-10-09 14:33:55 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 7 object: 1 person: 1 {"score":1,"age":23.7,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2022-10-09 14:33:55 DATA:  test-backend-node-gpu.js result: performance: load: null total: 145 +2022-10-09 14:33:55 STATE: test-backend-node-gpu.js start face similarity +2022-10-09 14:33:55 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289056} +2022-10-09 14:33:55 STATE: test-backend-node-gpu.js event: image +2022-10-09 14:33:55 STATE: test-backend-node-gpu.js event: detect +2022-10-09 14:33:55 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-upper.jpg face similarity +2022-10-09 14:33:55 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 1 person: 1 {"score":1,"age":23.5,"gender":"female"} {"score":0.71,"class":"person"} {"score":0.75,"keypoints":7} +2022-10-09 14:33:55 DATA:  test-backend-node-gpu.js result: performance: load: null total: 156 +2022-10-09 14:33:55 STATE: test-backend-node-gpu.js passed: face descriptor +2022-10-09 14:33:55 STATE: test-backend-node-gpu.js passed: face similarity {"similarity":[1,0.4475002983522097,0.5570879556505012],"descriptors":[1024,1024,1024]} +2022-10-09 14:33:55 INFO:  test-backend-node-gpu.js test object +2022-10-09 14:33:55 STATE: test-backend-node-gpu.js start object +2022-10-09 14:33:55 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796928} +2022-10-09 14:33:55 STATE: test-backend-node-gpu.js event: image +2022-10-09 14:33:55 STATE: test-backend-node-gpu.js event: detect +2022-10-09 14:33:55 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-body.jpg object +2022-10-09 14:33:55 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 7 object: 1 person: 1 {"score":1,"age":23.7,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2022-10-09 14:33:55 DATA:  test-backend-node-gpu.js result: performance: load: null total: 189 +2022-10-09 14:33:55 STATE: test-backend-node-gpu.js passed: centernet +2022-10-09 14:33:55 STATE: test-backend-node-gpu.js start object +2022-10-09 14:33:56 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796928} +2022-10-09 14:33:56 STATE: test-backend-node-gpu.js event: image +2022-10-09 14:33:57 STATE: test-backend-node-gpu.js event: detect +2022-10-09 14:33:57 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-body.jpg object +2022-10-09 14:33:57 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 7 object: 3 person: 1 {"score":1,"age":23.7,"gender":"female"} {"score":0.86,"class":"person"} {"score":0.92,"keypoints":17} +2022-10-09 14:33:57 DATA:  test-backend-node-gpu.js result: performance: load: null total: 579 +2022-10-09 14:33:57 STATE: test-backend-node-gpu.js passed: nanodet +2022-10-09 14:33:57 INFO:  test-backend-node-gpu.js test sensitive +2022-10-09 14:33:57 STATE: test-backend-node-gpu.js start sensitive +2022-10-09 14:33:57 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796928} +2022-10-09 14:33:57 STATE: test-backend-node-gpu.js event: image +2022-10-09 14:33:57 STATE: test-backend-node-gpu.js event: detect +2022-10-09 14:33:57 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-body.jpg sensitive +2022-10-09 14:33:57 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 2 gesture: 9 object: 0 person: 1 {"score":1,"age":23.7,"gender":"female"} {} {"score":0.92,"keypoints":17} +2022-10-09 14:33:57 DATA:  test-backend-node-gpu.js result: performance: load: null total: 142 +2022-10-09 14:33:57 STATE: test-backend-node-gpu.js passed: sensitive result match +2022-10-09 14:33:57 STATE: test-backend-node-gpu.js passed: sensitive face result match +2022-10-09 14:33:57 STATE: test-backend-node-gpu.js passed: sensitive face emotion result [{"score":0.59,"emotion":"angry"},{"score":0.29,"emotion":"fear"}] +2022-10-09 14:33:57 STATE: test-backend-node-gpu.js passed: sensitive body result match +2022-10-09 14:33:57 STATE: test-backend-node-gpu.js passed: sensitive hand result match +2022-10-09 14:33:57 INFO:  test-backend-node-gpu.js test body +2022-10-09 14:33:57 STATE: test-backend-node-gpu.js start blazepose +2022-10-09 14:33:59 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796928} +2022-10-09 14:33:59 STATE: test-backend-node-gpu.js event: image +2022-10-09 14:34:00 STATE: test-backend-node-gpu.js event: detect +2022-10-09 14:34:00 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-body.jpg blazepose +2022-10-09 14:34:00 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 2 gesture: 9 object: 0 person: 1 {"score":1,"age":23.7,"gender":"female"} {} {"score":0.99,"keypoints":39} +2022-10-09 14:34:00 DATA:  test-backend-node-gpu.js result: performance: load: null total: 267 +2022-10-09 14:34:00 STATE: test-backend-node-gpu.js passed: blazepose +2022-10-09 14:34:00 STATE: test-backend-node-gpu.js start efficientpose +2022-10-09 14:34:00 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796928} +2022-10-09 14:34:00 STATE: test-backend-node-gpu.js event: image +2022-10-09 14:34:01 STATE: test-backend-node-gpu.js event: detect +2022-10-09 14:34:01 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-body.jpg efficientpose +2022-10-09 14:34:01 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 2 gesture: 9 object: 0 person: 1 {"score":1,"age":23.7,"gender":"female"} {} {"score":0.75,"keypoints":13} +2022-10-09 14:34:01 DATA:  test-backend-node-gpu.js result: performance: load: null total: 1092 +2022-10-09 14:34:01 STATE: test-backend-node-gpu.js passed: efficientpose +2022-10-09 14:34:01 STATE: test-backend-node-gpu.js start posenet +2022-10-09 14:34:02 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796928} +2022-10-09 14:34:02 STATE: test-backend-node-gpu.js event: image +2022-10-09 14:34:02 STATE: test-backend-node-gpu.js event: detect +2022-10-09 14:34:02 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-body.jpg posenet +2022-10-09 14:34:02 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 2 gesture: 9 object: 0 person: 1 {"score":1,"age":23.7,"gender":"female"} {} {"score":0.96,"keypoints":16} +2022-10-09 14:34:02 DATA:  test-backend-node-gpu.js result: performance: load: null total: 138 +2022-10-09 14:34:02 STATE: test-backend-node-gpu.js passed: posenet +2022-10-09 14:34:02 STATE: test-backend-node-gpu.js start movenet +2022-10-09 14:34:02 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796928} +2022-10-09 14:34:02 STATE: test-backend-node-gpu.js event: image +2022-10-09 14:34:02 STATE: test-backend-node-gpu.js event: detect +2022-10-09 14:34:02 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-body.jpg movenet +2022-10-09 14:34:02 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 2 gesture: 9 object: 0 person: 1 {"score":1,"age":23.7,"gender":"female"} {} {"score":0.92,"keypoints":17} +2022-10-09 14:34:02 DATA:  test-backend-node-gpu.js result: performance: load: null total: 143 +2022-10-09 14:34:02 STATE: test-backend-node-gpu.js passed: movenet +2022-10-09 14:34:02 INFO:  test-backend-node-gpu.js test face matching +2022-10-09 14:34:02 STATE: test-backend-node-gpu.js passed: face database 40 +2022-10-09 14:34:02 STATE: test-backend-node-gpu.js passed: face match {"first":{"index":4,"similarity":0.7829338043932047}} {"second":{"index":4,"similarity":0.5002928781584631}} {"third":{"index":4,"similarity":0.5402934771672516}} +2022-10-09 14:34:02 INFO:  test-backend-node-gpu.js test face similarity alternative +2022-10-09 14:34:02 STATE: test-backend-node-gpu.js start face embeddings +2022-10-09 14:34:03 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} +2022-10-09 14:34:03 STATE: test-backend-node-gpu.js event: image +2022-10-09 14:34:03 STATE: test-backend-node-gpu.js event: detect +2022-10-09 14:34:03 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-face.jpg face embeddings +2022-10-09 14:34:03 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 2 gesture: 8 object: 0 person: 1 {"score":1,"age":23.5,"gender":"female"} {} {"score":0.47,"keypoints":3} +2022-10-09 14:34:03 DATA:  test-backend-node-gpu.js result: performance: load: null total: 174 +2022-10-09 14:34:03 STATE: test-backend-node-gpu.js passed: mobilefacenet {"embedding":192} +2022-10-09 14:34:03 STATE: test-backend-node-gpu.js start face embeddings +2022-10-09 14:34:04 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} +2022-10-09 14:34:04 STATE: test-backend-node-gpu.js event: image +2022-10-09 14:34:04 STATE: test-backend-node-gpu.js event: detect +2022-10-09 14:34:04 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-face.jpg face embeddings +2022-10-09 14:34:04 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 2 gesture: 8 object: 0 person: 1 {"score":1,"age":23.5,"gender":"female"} {} {"score":0.47,"keypoints":3} +2022-10-09 14:34:04 DATA:  test-backend-node-gpu.js result: performance: load: null total: 230 +2022-10-09 14:34:04 STATE: test-backend-node-gpu.js passed: insightface {"embedding":512} +2022-10-09 14:34:04 INFO:  test-backend-node-gpu.js test face attention +2022-10-09 14:34:04 STATE: test-backend-node-gpu.js start face attention +2022-10-09 14:34:04 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} +2022-10-09 14:34:04 STATE: test-backend-node-gpu.js event: image +2022-10-09 14:34:05 STATE: test-backend-node-gpu.js event: detect +2022-10-09 14:34:05 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-face.jpg face attention +2022-10-09 14:34:05 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 2 gesture: 8 object: 0 person: 1 {"score":1,"age":23.5,"gender":"female"} {} {"score":0.47,"keypoints":3} +2022-10-09 14:34:05 DATA:  test-backend-node-gpu.js result: performance: load: null total: 274 +2022-10-09 14:34:05 STATE: test-backend-node-gpu.js passed: face attention +2022-10-09 14:34:05 INFO:  test-backend-node-gpu.js test detectors +2022-10-09 14:34:05 STATE: test-backend-node-gpu.js start detectors +2022-10-09 14:34:05 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796928} +2022-10-09 14:34:05 STATE: test-backend-node-gpu.js event: image +2022-10-09 14:34:05 STATE: test-backend-node-gpu.js event: detect +2022-10-09 14:34:05 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-body.jpg detectors +2022-10-09 14:34:05 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 0 person: 1 {"score":0.93,"gender":"unknown"} {} {"score":0.92,"keypoints":17} +2022-10-09 14:34:05 DATA:  test-backend-node-gpu.js result: performance: load: null total: 117 +2022-10-09 14:34:05 STATE: test-backend-node-gpu.js passed: detector result face match +2022-10-09 14:34:05 STATE: test-backend-node-gpu.js passed: detector result hand match +2022-10-09 14:34:05 INFO:  test-backend-node-gpu.js test: multi-instance +2022-10-09 14:34:05 STATE: test-backend-node-gpu.js start multi instance +2022-10-09 14:34:05 STATE: test-backend-node-gpu.js event: image +2022-10-09 14:34:05 STATE: test-backend-node-gpu.js event: detect +2022-10-09 14:34:05 STATE: test-backend-node-gpu.js passed: detect: random multi instance +2022-10-09 14:34:05 DATA:  test-backend-node-gpu.js result: face: 0 body: 1 hand: 0 gesture: 0 object: 0 person: 0 {} {} {"score":0,"keypoints":0} +2022-10-09 14:34:05 DATA:  test-backend-node-gpu.js result: performance: load: null total: 59 +2022-10-09 14:34:05 INFO:  test-backend-node-gpu.js test: first instance +2022-10-09 14:34:05 STATE: test-backend-node-gpu.js start multi instance +2022-10-09 14:34:05 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289056} +2022-10-09 14:34:05 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-upper.jpg multi instance +2022-10-09 14:34:05 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 0 person: 1 {"score":0.96,"gender":"unknown"} {} {"score":0.75,"keypoints":7} +2022-10-09 14:34:05 DATA:  test-backend-node-gpu.js result: performance: load: null total: 95 +2022-10-09 14:34:05 INFO:  test-backend-node-gpu.js test: second instance +2022-10-09 14:34:05 STATE: test-backend-node-gpu.js start multi instance +2022-10-09 14:34:05 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289056} +2022-10-09 14:34:05 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-upper.jpg multi instance +2022-10-09 14:34:05 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 0 person: 1 {"score":0.96,"gender":"unknown"} {} {"score":0.75,"keypoints":7} +2022-10-09 14:34:05 DATA:  test-backend-node-gpu.js result: performance: load: null total: 81 +2022-10-09 14:34:05 INFO:  test-backend-node-gpu.js test: concurrent +2022-10-09 14:34:05 STATE: test-backend-node-gpu.js start concurrent +2022-10-09 14:34:05 STATE: test-backend-node-gpu.js start concurrent +2022-10-09 14:34:05 STATE: test-backend-node-gpu.js start concurrent +2022-10-09 14:34:05 STATE: test-backend-node-gpu.js start concurrent +2022-10-09 14:34:05 STATE: test-backend-node-gpu.js start concurrent +2022-10-09 14:34:05 STATE: test-backend-node-gpu.js start concurrent +2022-10-09 14:34:05 STATE: test-backend-node-gpu.js start concurrent +2022-10-09 14:34:05 STATE: test-backend-node-gpu.js start concurrent +2022-10-09 14:34:05 STATE: test-backend-node-gpu.js start concurrent +2022-10-09 14:34:05 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} +2022-10-09 14:34:05 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} +2022-10-09 14:34:05 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} +2022-10-09 14:34:06 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796928} +2022-10-09 14:34:06 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796928} +2022-10-09 14:34:06 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796928} +2022-10-09 14:34:06 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289056} +2022-10-09 14:34:06 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289056} +2022-10-09 14:34:06 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289056} +2022-10-09 14:34:06 STATE: test-backend-node-gpu.js event: image +2022-10-09 14:34:06 STATE: test-backend-node-gpu.js event: image +2022-10-09 14:34:06 STATE: test-backend-node-gpu.js event: image +2022-10-09 14:34:07 STATE: test-backend-node-gpu.js event: detect +2022-10-09 14:34:07 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-upper.jpg concurrent +2022-10-09 14:34:07 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 0 person: 1 {"score":0.96,"gender":"unknown"} {} {"score":0.75,"keypoints":7} +2022-10-09 14:34:07 DATA:  test-backend-node-gpu.js result: performance: load: null total: 687 +2022-10-09 14:34:07 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-upper.jpg concurrent +2022-10-09 14:34:07 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 0 person: 1 {"score":0.96,"gender":"unknown"} {} {"score":0.75,"keypoints":7} +2022-10-09 14:34:07 DATA:  test-backend-node-gpu.js result: performance: load: null total: 687 +2022-10-09 14:34:07 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-upper.jpg concurrent +2022-10-09 14:34:07 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 0 person: 1 {"score":0.96,"gender":"unknown"} {} {"score":0.75,"keypoints":7} +2022-10-09 14:34:07 DATA:  test-backend-node-gpu.js result: performance: load: null total: 687 +2022-10-09 14:34:07 STATE: test-backend-node-gpu.js event: detect +2022-10-09 14:34:07 STATE: test-backend-node-gpu.js event: detect +2022-10-09 14:34:07 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-face.jpg concurrent +2022-10-09 14:34:07 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 0 person: 1 {"score":0.91,"gender":"unknown"} {} {"score":0.47,"keypoints":3} +2022-10-09 14:34:07 DATA:  test-backend-node-gpu.js result: performance: load: null total: 687 +2022-10-09 14:34:07 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-face.jpg concurrent +2022-10-09 14:34:07 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 0 person: 1 {"score":0.91,"gender":"unknown"} {} {"score":0.47,"keypoints":3} +2022-10-09 14:34:07 DATA:  test-backend-node-gpu.js result: performance: load: null total: 687 +2022-10-09 14:34:07 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-face.jpg concurrent +2022-10-09 14:34:07 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 0 person: 1 {"score":0.91,"gender":"unknown"} {} {"score":0.47,"keypoints":3} +2022-10-09 14:34:07 DATA:  test-backend-node-gpu.js result: performance: load: null total: 687 +2022-10-09 14:34:07 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-body.jpg concurrent +2022-10-09 14:34:07 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 0 person: 1 {"score":0.93,"gender":"unknown"} {} {"score":0.92,"keypoints":17} +2022-10-09 14:34:07 DATA:  test-backend-node-gpu.js result: performance: load: null total: 687 +2022-10-09 14:34:07 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-body.jpg concurrent +2022-10-09 14:34:07 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 0 person: 1 {"score":0.93,"gender":"unknown"} {} {"score":0.92,"keypoints":17} +2022-10-09 14:34:07 DATA:  test-backend-node-gpu.js result: performance: load: null total: 687 +2022-10-09 14:34:07 STATE: test-backend-node-gpu.js passed: detect: samples/in/ai-body.jpg concurrent +2022-10-09 14:34:07 DATA:  test-backend-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 0 person: 1 {"score":0.93,"gender":"unknown"} {} {"score":0.92,"keypoints":17} +2022-10-09 14:34:07 DATA:  test-backend-node-gpu.js result: performance: load: null total: 687 +2022-10-09 14:34:07 INFO:  test-backend-node-gpu.js test: monkey-patch +2022-10-09 14:34:07 STATE: test-backend-node-gpu.js event: image +2022-10-09 14:34:07 STATE: test-backend-node-gpu.js event: detect +2022-10-09 14:34:07 STATE: test-backend-node-gpu.js passed: monkey patch +2022-10-09 14:34:07 STATE: test-backend-node-gpu.js passed: segmentation [262144] +2022-10-09 14:34:07 STATE: test-backend-node-gpu.js passeed: equal usage +2022-10-09 14:34:07 INFO:  test-backend-node-gpu.js test: input compare +2022-10-09 14:34:07 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} +2022-10-09 14:34:08 STATE: test-backend-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796928} +2022-10-09 14:34:08 STATE: test-backend-node-gpu.js passed: image compare 0 23.275441687091504 +2022-10-09 14:34:08 INFO:  test-backend-node-gpu.js events: {"image":29,"detect":29,"warmup":2} +2022-10-09 14:34:08 INFO:  test-backend-node-gpu.js tensors 4441 +2022-10-09 14:34:08 INFO:  test-backend-node-gpu.js test complete: 19475 ms +2022-10-09 14:34:09 INFO:  +2022-10-09 14:34:09 INFO:  test-backend-node-wasm.js start +2022-10-09 14:34:09 DATA:  test-backend-node-wasm.js stdout: 2022-10-09 14:34:09 INFO:  { supported: true, backend: true, simd: true, multithread: false } https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm@3.21.0/dist/ +2022-10-09 14:34:09 STATE: test-backend-node-wasm.js passed: model server: https://vladmandic.github.io/human-models/models/ +2022-10-09 14:34:09 INFO:  test-backend-node-wasm.js test: configuration validation +2022-10-09 14:34:09 STATE: test-backend-node-wasm.js passed: configuration default validation [] +2022-10-09 14:34:09 STATE: test-backend-node-wasm.js passed: configuration invalid validation [{"reason":"unknown property","where":"config.invalid = true"}] +2022-10-09 14:34:09 INFO:  test-backend-node-wasm.js test: model load +2022-10-09 14:34:12 STATE: test-backend-node-wasm.js passed: models loaded 25 11 [{"name":"ssrnetage","loaded":false,"url":null},{"name":"gear","loaded":false,"url":null},{"name":"blazeposedetect","loaded":false,"url":null},{"name":"blazepose","loaded":false,"url":null},{"name":"centernet","loaded":true,"url":"https://vladmandic.github.io/human-models/models/mb3-centernet.json"},{"name":"efficientpose","loaded":false,"url":null},{"name":"mobilefacenet","loaded":false,"url":null},{"name":"insightface","loaded":false,"url":null},{"name":"emotion","loaded":true,"url":"https://vladmandic.github.io/human-models/models/emotion.json"},{"name":"facedetect","loaded":true,"url":"https://vladmandic.github.io/human-models/models/blazeface.json"},{"name":"faceiris","loaded":true,"url":"https://vladmandic.github.io/human-models/models/iris.json"},{"name":"facemesh","loaded":true,"url":"https://vladmandic.github.io/human-models/models/facemesh.json"},{"name":"faceres","loaded":true,"url":"https://vladmandic.github.io/human-models/models/faceres.json"},{"name":"ssrnetgender","loaded":false,"url":null},{"name":"handpose","loaded":false,"url":null},{"name":"handskeleton","loaded":true,"url":"https://vladmandic.github.io/human-models/models/handlandmark-full.json"},{"name":"handtrack","loaded":true,"url":"https://vladmandic.github.io/human-models/models/handtrack.json"},{"name":"liveness","loaded":true,"url":"https://vladmandic.github.io/human-models/models/liveness.json"},{"name":"meet","loaded":false,"url":null},{"name":"movenet","loaded":true,"url":"https://vladmandic.github.io/human-models/models/movenet-lightning.json"},{"name":"nanodet","loaded":false,"url":null},{"name":"posenet","loaded":false,"url":null},{"name":"selfie","loaded":false,"url":null},{"name":"rvm","loaded":false,"url":null},{"name":"antispoof","loaded":true,"url":"https://vladmandic.github.io/human-models/models/antispoof.json"}] +2022-10-09 14:34:12 INFO:  test-backend-node-wasm.js memory: {"memory":{"unreliable":false,"numTensors":1785,"numDataBuffers":1785,"numBytes":63247332}} +2022-10-09 14:34:12 INFO:  test-backend-node-wasm.js state: {"state":{"registeredVariables":{},"nextTapeNodeId":0,"numBytes":63247332,"numTensors":1785,"numStringTensors":0,"numDataBuffers":1785,"gradientDepth":0,"kernelDepth":0,"scopeStack":[],"numDataMovesStack":[],"nextScopeId":0,"tensorInfo":{},"profiling":false,"activeProfile":{"newBytes":0,"newTensors":0,"peakBytes":0,"kernels":[],"result":null,"kernelNames":[]}}} +2022-10-09 14:34:12 INFO:  test-backend-node-wasm.js test: warmup +2022-10-09 14:34:12 STATE: test-backend-node-wasm.js passed: create human +2022-10-09 14:34:12 INFO:  test-backend-node-wasm.js human version: 2.11.1 +2022-10-09 14:34:12 INFO:  test-backend-node-wasm.js platform: linux x64 agent: NodeJS v18.10.0 +2022-10-09 14:34:12 INFO:  test-backend-node-wasm.js tfjs version: 3.21.0 +2022-10-09 14:34:12 INFO:  test-backend-node-wasm.js env: {"browser":false,"node":true,"platform":"linux x64","agent":"NodeJS v18.10.0","backends":["cpu","wasm"],"initial":false,"tfjs":{"version":"3.21.0"},"offscreen":false,"perfadd":false,"tensorflow":{},"wasm":{"supported":true,"backend":true,"simd":true,"multithread":false},"webgl":{"supported":false,"backend":false},"webgpu":{"supported":false,"backend":false},"cpu":{"flags":[]},"kernels":126} +2022-10-09 14:34:12 STATE: test-backend-node-wasm.js passed: set backend: wasm +2022-10-09 14:34:12 STATE: test-backend-node-wasm.js tensors 1785 +2022-10-09 14:34:12 STATE: test-backend-node-wasm.js passed: load models +2022-10-09 14:34:12 STATE: test-backend-node-wasm.js result: defined models: 25 loaded models: 11 +2022-10-09 14:34:12 STATE: test-backend-node-wasm.js passed: warmup: none default +2022-10-09 14:34:12 DATA:  test-backend-node-wasm.js result: face: 0 body: 0 hand: 0 gesture: 0 object: 0 person: 0 {} {} {} +2022-10-09 14:34:12 DATA:  test-backend-node-wasm.js result: performance: load: null total: null +2022-10-09 14:34:12 STATE: test-backend-node-wasm.js passed: warmup none result match +2022-10-09 14:34:12 STATE: test-backend-node-wasm.js event: image +2022-10-09 14:34:12 STATE: test-backend-node-wasm.js event: detect +2022-10-09 14:34:12 STATE: test-backend-node-wasm.js event: warmup +2022-10-09 14:34:12 STATE: test-backend-node-wasm.js passed: warmup: face default +2022-10-09 14:34:12 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 6 object: 1 person: 1 {"score":1,"age":23.5,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.47,"keypoints":3} +2022-10-09 14:34:12 DATA:  test-backend-node-wasm.js result: performance: load: null total: 519 +2022-10-09 14:34:12 STATE: test-backend-node-wasm.js passed: warmup face result match +2022-10-09 14:34:12 STATE: test-backend-node-wasm.js event: image +2022-10-09 14:34:13 STATE: test-backend-node-wasm.js event: detect +2022-10-09 14:34:13 STATE: test-backend-node-wasm.js event: warmup +2022-10-09 14:34:13 STATE: test-backend-node-wasm.js passed: warmup: body default +2022-10-09 14:34:13 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 7 object: 1 person: 1 {"score":1,"age":23.7,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2022-10-09 14:34:13 DATA:  test-backend-node-wasm.js result: performance: load: null total: 358 +2022-10-09 14:34:13 STATE: test-backend-node-wasm.js passed: warmup body result match +2022-10-09 14:34:13 STATE: test-backend-node-wasm.js details: {"face":{"boxScore":0.93,"faceScore":1,"age":23.7,"gender":"female","genderScore":0.97},"emotion":[{"score":0.59,"emotion":"angry"},{"score":0.29,"emotion":"fear"}],"body":{"score":0.92,"keypoints":17},"hand":{"boxScore":0.51,"fingerScore":0.73,"keypoints":21},"gestures":[{"face":0,"gesture":"facing right"},{"face":0,"gesture":"mouth 21% open"},{"hand":0,"gesture":"pinky forward"},{"hand":0,"gesture":"palm up"},{"hand":0,"gesture":"open palm"},{"iris":0,"gesture":"looking left"},{"iris":0,"gesture":"looking up"}]} +2022-10-09 14:34:13 INFO:  test-backend-node-wasm.js test: details verification +2022-10-09 14:34:13 STATE: test-backend-node-wasm.js start default +2022-10-09 14:34:13 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} +2022-10-09 14:34:13 STATE: test-backend-node-wasm.js event: image +2022-10-09 14:34:13 STATE: test-backend-node-wasm.js event: detect +2022-10-09 14:34:13 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-body.jpg default +2022-10-09 14:34:13 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 7 object: 1 person: 1 {"score":1,"age":23.7,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2022-10-09 14:34:13 DATA:  test-backend-node-wasm.js result: performance: load: null total: 314 +2022-10-09 14:34:13 STATE: test-backend-node-wasm.js passed: details face length 1 +2022-10-09 14:34:13 STATE: test-backend-node-wasm.js passed: details face score 1 0.93 1 +2022-10-09 14:34:13 STATE: test-backend-node-wasm.js passed: details face age/gender 23.7 female 0.97 85.47 +2022-10-09 14:34:13 STATE: test-backend-node-wasm.js passed: details face arrays 4 478 1024 +2022-10-09 14:34:13 STATE: test-backend-node-wasm.js passed: details face emotion 2 {"score":0.59,"emotion":"angry"} +2022-10-09 14:34:13 STATE: test-backend-node-wasm.js passed: details face anti-spoofing 0.79 +2022-10-09 14:34:13 STATE: test-backend-node-wasm.js passed: details face liveness 0.83 +2022-10-09 14:34:13 STATE: test-backend-node-wasm.js passed: details body length 1 +2022-10-09 14:34:13 STATE: test-backend-node-wasm.js passed: details body 0.92 17 6 +2022-10-09 14:34:13 STATE: test-backend-node-wasm.js passed: details hand length 1 +2022-10-09 14:34:13 STATE: test-backend-node-wasm.js passed: details hand 0.51 0.73 point +2022-10-09 14:34:13 STATE: test-backend-node-wasm.js passed: details hand arrays 21 5 7 +2022-10-09 14:34:13 STATE: test-backend-node-wasm.js passed: details gesture length 7 +2022-10-09 14:34:13 STATE: test-backend-node-wasm.js passed: details gesture first {"face":0,"gesture":"facing right"} +2022-10-09 14:34:13 STATE: test-backend-node-wasm.js passed: details object length 1 +2022-10-09 14:34:13 STATE: test-backend-node-wasm.js passed: details object 0.72 person +2022-10-09 14:34:14 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,4] {"checksum":1413675264} +2022-10-09 14:34:14 STATE: test-backend-node-wasm.js event: image +2022-10-09 14:34:14 STATE: test-backend-node-wasm.js event: detect +2022-10-09 14:34:14 STATE: test-backend-node-wasm.js passed: tensor shape: [1,1200,1200,4] dtype: float32 +2022-10-09 14:34:14 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-body.jpg [1200,1200,4] {"checksum":1413675264} +2022-10-09 14:34:14 STATE: test-backend-node-wasm.js event: image +2022-10-09 14:34:14 STATE: test-backend-node-wasm.js event: detect +2022-10-09 14:34:14 STATE: test-backend-node-wasm.js passed: tensor shape: [1200,1200,4] dtype: float32 +2022-10-09 14:34:15 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} +2022-10-09 14:34:15 STATE: test-backend-node-wasm.js event: image +2022-10-09 14:34:15 STATE: test-backend-node-wasm.js event: detect +2022-10-09 14:34:15 STATE: test-backend-node-wasm.js passed: tensor shape: [1,1200,1200,3] dtype: float32 +2022-10-09 14:34:15 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-body.jpg [1200,1200,3] {"checksum":1038921856} +2022-10-09 14:34:15 STATE: test-backend-node-wasm.js event: image +2022-10-09 14:34:16 STATE: test-backend-node-wasm.js event: detect +2022-10-09 14:34:16 STATE: test-backend-node-wasm.js passed: tensor shape: [1200,1200,3] dtype: float32 +2022-10-09 14:34:16 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,4] {"checksum":1371996871} +2022-10-09 14:34:16 STATE: test-backend-node-wasm.js event: image +2022-10-09 14:34:16 STATE: test-backend-node-wasm.js event: detect +2022-10-09 14:34:16 STATE: test-backend-node-wasm.js passed: tensor shape: [1,1200,1200,4] dtype: int32 +2022-10-09 14:34:16 INFO:  test-backend-node-wasm.js test default +2022-10-09 14:34:16 STATE: test-backend-node-wasm.js start async +2022-10-09 14:34:16 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} +2022-10-09 14:34:16 STATE: test-backend-node-wasm.js event: image +2022-10-09 14:34:17 STATE: test-backend-node-wasm.js event: detect +2022-10-09 14:34:17 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-body.jpg async +2022-10-09 14:34:17 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 8 object: 1 person: 1 {"score":1,"age":29.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2022-10-09 14:34:17 DATA:  test-backend-node-wasm.js result: performance: load: null total: 311 +2022-10-09 14:34:17 STATE: test-backend-node-wasm.js passed: default result face match 1 female 0.97 +2022-10-09 14:34:17 INFO:  test-backend-node-wasm.js test sync +2022-10-09 14:34:17 STATE: test-backend-node-wasm.js start sync +2022-10-09 14:34:17 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} +2022-10-09 14:34:17 STATE: test-backend-node-wasm.js event: image +2022-10-09 14:34:17 STATE: test-backend-node-wasm.js event: detect +2022-10-09 14:34:17 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-body.jpg sync +2022-10-09 14:34:17 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 8 object: 1 person: 1 {"score":1,"age":29.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2022-10-09 14:34:17 DATA:  test-backend-node-wasm.js result: performance: load: null total: 322 +2022-10-09 14:34:17 STATE: test-backend-node-wasm.js passed: default sync 1 female 0.97 +2022-10-09 14:34:17 INFO:  test-backend-node-wasm.js test: image process +2022-10-09 14:34:17 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34697856} +2022-10-09 14:34:17 STATE: test-backend-node-wasm.js passed: image input null [1,256,256,3] +2022-10-09 14:34:17 INFO:  test-backend-node-wasm.js test: image null +2022-10-09 14:34:17 STATE: test-backend-node-wasm.js passed: invalid input could not convert input to tensor +2022-10-09 14:34:17 INFO:  test-backend-node-wasm.js test face similarity +2022-10-09 14:34:17 STATE: test-backend-node-wasm.js start face similarity +2022-10-09 14:34:17 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34697856} +2022-10-09 14:34:17 STATE: test-backend-node-wasm.js event: image +2022-10-09 14:34:17 STATE: test-backend-node-wasm.js event: detect +2022-10-09 14:34:17 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-face.jpg face similarity +2022-10-09 14:34:17 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 6 object: 1 person: 1 {"score":1,"age":23.5,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.47,"keypoints":3} +2022-10-09 14:34:17 DATA:  test-backend-node-wasm.js result: performance: load: null total: 287 +2022-10-09 14:34:17 STATE: test-backend-node-wasm.js start face similarity +2022-10-09 14:34:18 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} +2022-10-09 14:34:18 STATE: test-backend-node-wasm.js event: image +2022-10-09 14:34:18 STATE: test-backend-node-wasm.js event: detect +2022-10-09 14:34:18 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-body.jpg face similarity +2022-10-09 14:34:18 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 8 object: 1 person: 1 {"score":1,"age":29.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2022-10-09 14:34:18 DATA:  test-backend-node-wasm.js result: performance: load: null total: 311 +2022-10-09 14:34:18 STATE: test-backend-node-wasm.js start face similarity +2022-10-09 14:34:18 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151155104} +2022-10-09 14:34:18 STATE: test-backend-node-wasm.js event: image +2022-10-09 14:34:18 STATE: test-backend-node-wasm.js event: detect +2022-10-09 14:34:18 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-upper.jpg face similarity +2022-10-09 14:34:18 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 1 person: 1 {"score":1,"age":23.5,"gender":"female"} {"score":0.71,"class":"person"} {"score":0.75,"keypoints":7} +2022-10-09 14:34:18 DATA:  test-backend-node-wasm.js result: performance: load: null total: 283 +2022-10-09 14:34:18 STATE: test-backend-node-wasm.js passed: face descriptor +2022-10-09 14:34:18 STATE: test-backend-node-wasm.js passed: face similarity {"similarity":[1,0.5266119940661309,0.4858842904087851],"descriptors":[1024,1024,1024]} +2022-10-09 14:34:18 INFO:  test-backend-node-wasm.js test object +2022-10-09 14:34:18 STATE: test-backend-node-wasm.js start object +2022-10-09 14:34:18 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} +2022-10-09 14:34:18 STATE: test-backend-node-wasm.js event: image +2022-10-09 14:34:19 STATE: test-backend-node-wasm.js event: detect +2022-10-09 14:34:19 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-body.jpg object +2022-10-09 14:34:19 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 8 object: 1 person: 1 {"score":1,"age":29.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2022-10-09 14:34:19 DATA:  test-backend-node-wasm.js result: performance: load: null total: 305 +2022-10-09 14:34:19 STATE: test-backend-node-wasm.js passed: centernet +2022-10-09 14:34:19 STATE: test-backend-node-wasm.js start object +2022-10-09 14:34:20 WARN:  test-backend-node-wasm.js missing kernel ops {"title":"object","model":"nanodet","url":"https://vladmandic.github.io/human-models/models/nanodet.json","missing":["sparsetodense"],"backkend":"wasm"} +2022-10-09 14:34:20 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} +2022-10-09 14:34:20 STATE: test-backend-node-wasm.js event: image +2022-10-09 14:34:20 STATE: test-backend-node-wasm.js event: detect +2022-10-09 14:34:20 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-body.jpg object +2022-10-09 14:34:20 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 8 object: 0 person: 1 {"score":1,"age":29.6,"gender":"female"} {} {"score":0.92,"keypoints":17} +2022-10-09 14:34:20 DATA:  test-backend-node-wasm.js result: performance: load: null total: 222 +2022-10-09 14:34:20 ERROR: test-backend-node-wasm.js failed: nanodet [] +2022-10-09 14:34:20 INFO:  test-backend-node-wasm.js test sensitive +2022-10-09 14:34:20 STATE: test-backend-node-wasm.js start sensitive +2022-10-09 14:34:20 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} +2022-10-09 14:34:20 STATE: test-backend-node-wasm.js event: image +2022-10-09 14:34:21 STATE: test-backend-node-wasm.js event: detect +2022-10-09 14:34:21 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-body.jpg sensitive +2022-10-09 14:34:21 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 2 gesture: 10 object: 0 person: 1 {"score":1,"age":29.6,"gender":"female"} {} {"score":0.92,"keypoints":17} +2022-10-09 14:34:21 DATA:  test-backend-node-wasm.js result: performance: load: null total: 237 +2022-10-09 14:34:21 STATE: test-backend-node-wasm.js passed: sensitive result match +2022-10-09 14:34:21 STATE: test-backend-node-wasm.js passed: sensitive face result match +2022-10-09 14:34:21 STATE: test-backend-node-wasm.js passed: sensitive face emotion result [{"score":0.46,"emotion":"neutral"},{"score":0.24,"emotion":"fear"},{"score":0.17,"emotion":"sad"}] +2022-10-09 14:34:21 STATE: test-backend-node-wasm.js passed: sensitive body result match +2022-10-09 14:34:21 STATE: test-backend-node-wasm.js passed: sensitive hand result match +2022-10-09 14:34:21 INFO:  test-backend-node-wasm.js test body +2022-10-09 14:34:21 STATE: test-backend-node-wasm.js start blazepose +2022-10-09 14:34:24 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} +2022-10-09 14:34:24 STATE: test-backend-node-wasm.js event: image +2022-10-09 14:34:24 STATE: test-backend-node-wasm.js event: detect +2022-10-09 14:34:24 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-body.jpg blazepose +2022-10-09 14:34:24 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 2 gesture: 10 object: 0 person: 1 {"score":1,"age":29.6,"gender":"female"} {} {"score":0.99,"keypoints":39} +2022-10-09 14:34:24 DATA:  test-backend-node-wasm.js result: performance: load: null total: 391 +2022-10-09 14:34:24 STATE: test-backend-node-wasm.js passed: blazepose +2022-10-09 14:34:24 STATE: test-backend-node-wasm.js start efficientpose +2022-10-09 14:34:25 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} +2022-10-09 14:34:25 STATE: test-backend-node-wasm.js event: image +2022-10-09 14:34:26 STATE: test-backend-node-wasm.js event: detect +2022-10-09 14:34:26 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-body.jpg efficientpose +2022-10-09 14:34:26 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 2 gesture: 10 object: 0 person: 1 {"score":1,"age":29.6,"gender":"female"} {} {"score":0.75,"keypoints":13} +2022-10-09 14:34:26 DATA:  test-backend-node-wasm.js result: performance: load: null total: 647 +2022-10-09 14:34:26 STATE: test-backend-node-wasm.js passed: efficientpose +2022-10-09 14:34:26 STATE: test-backend-node-wasm.js start posenet +2022-10-09 14:34:27 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} +2022-10-09 14:34:27 STATE: test-backend-node-wasm.js event: image +2022-10-09 14:34:27 STATE: test-backend-node-wasm.js event: detect +2022-10-09 14:34:27 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-body.jpg posenet +2022-10-09 14:34:27 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 2 gesture: 10 object: 0 person: 1 {"score":1,"age":29.6,"gender":"female"} {} {"score":0.96,"keypoints":16} +2022-10-09 14:34:27 DATA:  test-backend-node-wasm.js result: performance: load: null total: 286 +2022-10-09 14:34:27 STATE: test-backend-node-wasm.js passed: posenet +2022-10-09 14:34:27 STATE: test-backend-node-wasm.js start movenet +2022-10-09 14:34:27 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} +2022-10-09 14:34:27 STATE: test-backend-node-wasm.js event: image +2022-10-09 14:34:27 STATE: test-backend-node-wasm.js event: detect +2022-10-09 14:34:27 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-body.jpg movenet +2022-10-09 14:34:27 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 2 gesture: 10 object: 0 person: 1 {"score":1,"age":29.6,"gender":"female"} {} {"score":0.92,"keypoints":17} +2022-10-09 14:34:27 DATA:  test-backend-node-wasm.js result: performance: load: null total: 247 +2022-10-09 14:34:27 STATE: test-backend-node-wasm.js passed: movenet +2022-10-09 14:34:27 INFO:  test-backend-node-wasm.js test face matching +2022-10-09 14:34:27 STATE: test-backend-node-wasm.js passed: face database 40 +2022-10-09 14:34:27 STATE: test-backend-node-wasm.js passed: face match {"first":{"index":4,"similarity":0.7827852754786533}} {"second":{"index":4,"similarity":0.5660821189104794}} {"third":{"index":4,"similarity":0.45074189882665594}} +2022-10-09 14:34:27 INFO:  test-backend-node-wasm.js test face similarity alternative +2022-10-09 14:34:27 STATE: test-backend-node-wasm.js start face embeddings +2022-10-09 14:34:28 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34697856} +2022-10-09 14:34:28 STATE: test-backend-node-wasm.js event: image +2022-10-09 14:34:28 STATE: test-backend-node-wasm.js event: detect +2022-10-09 14:34:28 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-face.jpg face embeddings +2022-10-09 14:34:28 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 2 gesture: 8 object: 0 person: 1 {"score":1,"age":23.5,"gender":"female"} {} {"score":0.47,"keypoints":3} +2022-10-09 14:34:28 DATA:  test-backend-node-wasm.js result: performance: load: null total: 232 +2022-10-09 14:34:28 STATE: test-backend-node-wasm.js passed: mobilefacenet {"embedding":192} +2022-10-09 14:34:28 STATE: test-backend-node-wasm.js start face embeddings +2022-10-09 14:34:29 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34697856} +2022-10-09 14:34:29 STATE: test-backend-node-wasm.js event: image +2022-10-09 14:34:30 STATE: test-backend-node-wasm.js event: detect +2022-10-09 14:34:30 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-face.jpg face embeddings +2022-10-09 14:34:30 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 2 gesture: 8 object: 0 person: 1 {"score":1,"age":23.5,"gender":"female"} {} {"score":0.47,"keypoints":3} +2022-10-09 14:34:30 DATA:  test-backend-node-wasm.js result: performance: load: null total: 284 +2022-10-09 14:34:30 STATE: test-backend-node-wasm.js passed: insightface {"embedding":512} +2022-10-09 14:34:30 INFO:  test-backend-node-wasm.js test face attention +2022-10-09 14:34:30 STATE: test-backend-node-wasm.js start face attention +2022-10-09 14:34:30 WARN:  test-backend-node-wasm.js missing kernel ops {"title":"face attention","model":"facemesh","url":"https://vladmandic.github.io/human-models/models/facemesh-attention.json","missing":["atan2"],"backkend":"wasm"} +2022-10-09 14:34:30 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34697856} +2022-10-09 14:34:30 STATE: test-backend-node-wasm.js event: image +2022-10-09 14:34:30 STATE: test-backend-node-wasm.js event: detect +2022-10-09 14:34:30 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-face.jpg face attention +2022-10-09 14:34:30 DATA:  test-backend-node-wasm.js result: face: 0 body: 1 hand: 1 gesture: 2 object: 0 person: 0 {} {} {"score":0.47,"keypoints":3} +2022-10-09 14:34:30 DATA:  test-backend-node-wasm.js result: performance: load: null total: 116 +2022-10-09 14:34:30 ERROR: test-backend-node-wasm.js failed: face attention {"annotations":0} +2022-10-09 14:34:30 INFO:  test-backend-node-wasm.js test detectors +2022-10-09 14:34:30 STATE: test-backend-node-wasm.js start detectors +2022-10-09 14:34:30 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} +2022-10-09 14:34:30 STATE: test-backend-node-wasm.js event: image +2022-10-09 14:34:30 STATE: test-backend-node-wasm.js event: detect +2022-10-09 14:34:30 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-body.jpg detectors +2022-10-09 14:34:30 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 0 person: 1 {"score":0.93,"gender":"unknown"} {} {"score":0.92,"keypoints":17} +2022-10-09 14:34:30 DATA:  test-backend-node-wasm.js result: performance: load: null total: 123 +2022-10-09 14:34:30 STATE: test-backend-node-wasm.js passed: detector result face match +2022-10-09 14:34:30 STATE: test-backend-node-wasm.js passed: detector result hand match +2022-10-09 14:34:30 INFO:  test-backend-node-wasm.js test: multi-instance +2022-10-09 14:34:30 STATE: test-backend-node-wasm.js start multi instance +2022-10-09 14:34:30 STATE: test-backend-node-wasm.js event: image +2022-10-09 14:34:30 STATE: test-backend-node-wasm.js event: detect +2022-10-09 14:34:30 STATE: test-backend-node-wasm.js passed: detect: random multi instance +2022-10-09 14:34:30 DATA:  test-backend-node-wasm.js result: face: 0 body: 1 hand: 0 gesture: 0 object: 0 person: 0 {} {} {"score":0,"keypoints":0} +2022-10-09 14:34:30 DATA:  test-backend-node-wasm.js result: performance: load: null total: 96 +2022-10-09 14:34:30 INFO:  test-backend-node-wasm.js test: first instance +2022-10-09 14:34:30 STATE: test-backend-node-wasm.js start multi instance +2022-10-09 14:34:31 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151155104} +2022-10-09 14:34:31 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-upper.jpg multi instance +2022-10-09 14:34:31 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 0 person: 1 {"score":0.96,"gender":"unknown"} {} {"score":0.75,"keypoints":7} +2022-10-09 14:34:31 DATA:  test-backend-node-wasm.js result: performance: load: null total: 110 +2022-10-09 14:34:31 INFO:  test-backend-node-wasm.js test: second instance +2022-10-09 14:34:31 STATE: test-backend-node-wasm.js start multi instance +2022-10-09 14:34:31 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151155104} +2022-10-09 14:34:31 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-upper.jpg multi instance +2022-10-09 14:34:31 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 0 person: 1 {"score":0.96,"gender":"unknown"} {} {"score":0.75,"keypoints":7} +2022-10-09 14:34:31 DATA:  test-backend-node-wasm.js result: performance: load: null total: 108 +2022-10-09 14:34:31 INFO:  test-backend-node-wasm.js test: concurrent +2022-10-09 14:34:31 STATE: test-backend-node-wasm.js start concurrent +2022-10-09 14:34:31 STATE: test-backend-node-wasm.js start concurrent +2022-10-09 14:34:31 STATE: test-backend-node-wasm.js start concurrent +2022-10-09 14:34:31 STATE: test-backend-node-wasm.js start concurrent +2022-10-09 14:34:31 STATE: test-backend-node-wasm.js start concurrent +2022-10-09 14:34:31 STATE: test-backend-node-wasm.js start concurrent +2022-10-09 14:34:31 STATE: test-backend-node-wasm.js start concurrent +2022-10-09 14:34:31 STATE: test-backend-node-wasm.js start concurrent +2022-10-09 14:34:31 STATE: test-backend-node-wasm.js start concurrent +2022-10-09 14:34:31 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34697856} +2022-10-09 14:34:31 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34697856} +2022-10-09 14:34:31 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34697856} +2022-10-09 14:34:31 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} +2022-10-09 14:34:31 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} +2022-10-09 14:34:32 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} +2022-10-09 14:34:32 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151155104} +2022-10-09 14:34:32 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151155104} +2022-10-09 14:34:32 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151155104} +2022-10-09 14:34:32 STATE: test-backend-node-wasm.js event: image +2022-10-09 14:34:32 STATE: test-backend-node-wasm.js event: image +2022-10-09 14:34:32 STATE: test-backend-node-wasm.js event: image +2022-10-09 14:34:33 STATE: test-backend-node-wasm.js event: detect +2022-10-09 14:34:33 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-upper.jpg concurrent +2022-10-09 14:34:33 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 0 person: 1 {"score":0.96,"gender":"unknown"} {} {"score":0.75,"keypoints":7} +2022-10-09 14:34:33 DATA:  test-backend-node-wasm.js result: performance: load: null total: 910 +2022-10-09 14:34:33 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-upper.jpg concurrent +2022-10-09 14:34:33 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 0 person: 1 {"score":0.96,"gender":"unknown"} {} {"score":0.75,"keypoints":7} +2022-10-09 14:34:33 DATA:  test-backend-node-wasm.js result: performance: load: null total: 910 +2022-10-09 14:34:33 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-upper.jpg concurrent +2022-10-09 14:34:33 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 0 person: 1 {"score":0.96,"gender":"unknown"} {} {"score":0.75,"keypoints":7} +2022-10-09 14:34:33 DATA:  test-backend-node-wasm.js result: performance: load: null total: 910 +2022-10-09 14:34:33 STATE: test-backend-node-wasm.js event: detect +2022-10-09 14:34:33 STATE: test-backend-node-wasm.js event: detect +2022-10-09 14:34:33 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-face.jpg concurrent +2022-10-09 14:34:33 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 0 person: 1 {"score":0.91,"gender":"unknown"} {} {"score":0.47,"keypoints":3} +2022-10-09 14:34:33 DATA:  test-backend-node-wasm.js result: performance: load: null total: 910 +2022-10-09 14:34:33 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-face.jpg concurrent +2022-10-09 14:34:33 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 0 person: 1 {"score":0.91,"gender":"unknown"} {} {"score":0.47,"keypoints":3} +2022-10-09 14:34:33 DATA:  test-backend-node-wasm.js result: performance: load: null total: 910 +2022-10-09 14:34:33 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-face.jpg concurrent +2022-10-09 14:34:33 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 0 person: 1 {"score":0.91,"gender":"unknown"} {} {"score":0.47,"keypoints":3} +2022-10-09 14:34:33 DATA:  test-backend-node-wasm.js result: performance: load: null total: 910 +2022-10-09 14:34:33 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-body.jpg concurrent +2022-10-09 14:34:33 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 0 person: 1 {"score":0.93,"gender":"unknown"} {} {"score":0.92,"keypoints":17} +2022-10-09 14:34:33 DATA:  test-backend-node-wasm.js result: performance: load: null total: 910 +2022-10-09 14:34:33 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-body.jpg concurrent +2022-10-09 14:34:33 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 0 person: 1 {"score":0.93,"gender":"unknown"} {} {"score":0.92,"keypoints":17} +2022-10-09 14:34:33 DATA:  test-backend-node-wasm.js result: performance: load: null total: 910 +2022-10-09 14:34:33 STATE: test-backend-node-wasm.js passed: detect: samples/in/ai-body.jpg concurrent +2022-10-09 14:34:33 DATA:  test-backend-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 0 person: 1 {"score":0.93,"gender":"unknown"} {} {"score":0.92,"keypoints":17} +2022-10-09 14:34:33 DATA:  test-backend-node-wasm.js result: performance: load: null total: 910 +2022-10-09 14:34:33 INFO:  test-backend-node-wasm.js test: monkey-patch +2022-10-09 14:34:33 STATE: test-backend-node-wasm.js event: image +2022-10-09 14:34:33 STATE: test-backend-node-wasm.js event: detect +2022-10-09 14:34:33 STATE: test-backend-node-wasm.js passed: monkey patch +2022-10-09 14:34:33 STATE: test-backend-node-wasm.js passed: segmentation [262144] +2022-10-09 14:34:33 STATE: test-backend-node-wasm.js passeed: equal usage +2022-10-09 14:34:33 INFO:  test-backend-node-wasm.js test: input compare +2022-10-09 14:34:33 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34697856} +2022-10-09 14:34:33 STATE: test-backend-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} +2022-10-09 14:34:34 STATE: test-backend-node-wasm.js passed: image compare 0 23.280073018790848 +2022-10-09 14:34:34 INFO:  test-backend-node-wasm.js events: {"image":29,"detect":29,"warmup":2} +2022-10-09 14:34:34 INFO:  test-backend-node-wasm.js tensors 4443 +2022-10-09 14:34:34 INFO:  test-backend-node-wasm.js test complete: 24541 ms +2022-10-09 14:34:34 STATE: all tests complete +2022-10-09 14:34:34 INFO:  status {"test":"../demo/nodejs/node.js","passed":1,"failed":0} +2022-10-09 14:34:34 INFO:  status {"test":"../demo/nodejs/node-simple.js","passed":1,"failed":0} +2022-10-09 14:34:34 INFO:  status {"test":"../demo/nodejs/node-fetch.js","passed":1,"failed":0} +2022-10-09 14:34:34 INFO:  status {"test":"../demo/nodejs/node-event.js","passed":1,"failed":0} +2022-10-09 14:34:34 INFO:  status {"test":"../demo/nodejs/node-similarity.js","passed":1,"failed":0} +2022-10-09 14:34:34 INFO:  status {"test":"../demo/nodejs/node-canvas.js","passed":1,"failed":0} +2022-10-09 14:34:34 INFO:  status {"test":"../demo/nodejs/process-folder.js","passed":1,"failed":0} +2022-10-09 14:34:34 INFO:  status {"test":"../demo/multithread/node-multiprocess.js","passed":1,"failed":0} +2022-10-09 14:34:34 INFO:  status {"test":"../demo/facematch/node-match.js","passed":1,"failed":0} +2022-10-09 14:34:34 INFO:  status {"test":"test-node-load.js","passed":1,"failed":0} +2022-10-09 14:34:34 INFO:  status {"test":"test-node-gear.js","passed":3,"failed":0} +2022-10-09 14:34:34 INFO:  status {"test":"test-backend-node.js","passed":125,"failed":0} +2022-10-09 14:34:34 INFO:  status {"test":"test-backend-node-gpu.js","passed":125,"failed":0} +2022-10-09 14:34:34 INFO:  status {"test":"test-backend-node-wasm.js","passed":124,"failed":2} +2022-10-09 14:34:34 INFO:  failures {"count":2} +2022-10-09 14:34:34 WARN:  failed {"test":"test-backend-node-wasm.js","message":["error",["failed: nanodet",[]]]} +2022-10-09 14:34:34 WARN:  failed {"test":"test-backend-node-wasm.js","message":["error",["failed: face attention",{"annotations":0}]]} diff --git a/tsconfig.json b/tsconfig.json index 81afeb82d..bbde1847e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -52,7 +52,7 @@ "tabSize": 2 }, "exclude": ["node_modules/", "types/", "dist/**/*.js"], - "include": ["src", "tfjs/*.ts", "types/human.d.ts", "test/**/*.ts", "demo/**/*.ts", "demo/segmentation/index.js", "demo/index.js"], + "include": ["src", "tfjs/*.ts", "types/human.d.ts", "test/**/*.ts", "demo/**/*.ts"], "typedocOptions": { "externalPattern": ["node_modules/", "tfjs/"] } diff --git a/typedoc/assets/search.js b/typedoc/assets/search.js index 0788c78e5..72d67939b 100644 --- a/typedoc/assets/search.js +++ b/typedoc/assets/search.js @@ -1 +1 @@ -window.searchData = JSON.parse("{\"kinds\":{\"4\":\"Namespace\",\"8\":\"Enumeration\",\"16\":\"Enumeration Member\",\"32\":\"Variable\",\"64\":\"Function\",\"128\":\"Class\",\"256\":\"Interface\",\"512\":\"Constructor\",\"1024\":\"Property\",\"2048\":\"Method\",\"65536\":\"Type literal\",\"262144\":\"Accessor\",\"4194304\":\"Type alias\",\"8388608\":\"Reference\"},\"rows\":[{\"kind\":128,\"name\":\"Human\",\"url\":\"classes/Human.html\",\"classes\":\"tsd-kind-class\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/Human.html#constructor\",\"classes\":\"tsd-kind-constructor tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":1024,\"name\":\"version\",\"url\":\"classes/Human.html#version\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":1024,\"name\":\"config\",\"url\":\"classes/Human.html#config\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":1024,\"name\":\"result\",\"url\":\"classes/Human.html#result\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":1024,\"name\":\"state\",\"url\":\"classes/Human.html#state\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":1024,\"name\":\"process\",\"url\":\"classes/Human.html#process\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Human.html#__type-22\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":1024,\"name\":\"tensor\",\"url\":\"classes/Human.html#__type-22.tensor\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Human.__type\"},{\"kind\":1024,\"name\":\"canvas\",\"url\":\"classes/Human.html#__type-22.canvas-1\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Human.__type\"},{\"kind\":1024,\"name\":\"tf\",\"url\":\"classes/Human.html#tf\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":1024,\"name\":\"env\",\"url\":\"classes/Human.html#env\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":1024,\"name\":\"draw\",\"url\":\"classes/Human.html#draw\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Human.html#__type-2\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":1024,\"name\":\"canvas\",\"url\":\"classes/Human.html#__type-2.canvas\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Human.__type\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Human.html#__type-2.__type-7\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-literal\",\"parent\":\"Human.__type\"},{\"kind\":1024,\"name\":\"face\",\"url\":\"classes/Human.html#__type-2.face\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Human.__type\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Human.html#__type-2.__type-9\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-literal\",\"parent\":\"Human.__type\"},{\"kind\":1024,\"name\":\"body\",\"url\":\"classes/Human.html#__type-2.body\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Human.__type\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Human.html#__type-2.__type-5\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-literal\",\"parent\":\"Human.__type\"},{\"kind\":1024,\"name\":\"hand\",\"url\":\"classes/Human.html#__type-2.hand\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Human.__type\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Human.html#__type-2.__type-13\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-literal\",\"parent\":\"Human.__type\"},{\"kind\":1024,\"name\":\"gesture\",\"url\":\"classes/Human.html#__type-2.gesture\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Human.__type\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Human.html#__type-2.__type-11\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-literal\",\"parent\":\"Human.__type\"},{\"kind\":1024,\"name\":\"object\",\"url\":\"classes/Human.html#__type-2.object\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Human.__type\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Human.html#__type-2.__type-15\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-literal\",\"parent\":\"Human.__type\"},{\"kind\":1024,\"name\":\"person\",\"url\":\"classes/Human.html#__type-2.person\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Human.__type\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Human.html#__type-2.__type-17\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-literal\",\"parent\":\"Human.__type\"},{\"kind\":1024,\"name\":\"all\",\"url\":\"classes/Human.html#__type-2.all\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Human.__type\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Human.html#__type-2.__type-3\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-literal\",\"parent\":\"Human.__type\"},{\"kind\":1024,\"name\":\"options\",\"url\":\"classes/Human.html#__type-2.options\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Human.__type\"},{\"kind\":1024,\"name\":\"events\",\"url\":\"classes/Human.html#events\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":1024,\"name\":\"faceTriangulation\",\"url\":\"classes/Human.html#faceTriangulation\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":1024,\"name\":\"faceUVMap\",\"url\":\"classes/Human.html#faceUVMap\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":1024,\"name\":\"performance\",\"url\":\"classes/Human.html#performance\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":1024,\"name\":\"gl\",\"url\":\"classes/Human.html#gl\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":2048,\"name\":\"analyze\",\"url\":\"classes/Human.html#analyze\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":2048,\"name\":\"reset\",\"url\":\"classes/Human.html#reset\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":2048,\"name\":\"validate\",\"url\":\"classes/Human.html#validate\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":2048,\"name\":\"check\",\"url\":\"classes/Human.html#check\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":1024,\"name\":\"similarity\",\"url\":\"classes/Human.html#similarity-1\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Human.html#__type-23\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":1024,\"name\":\"distance\",\"url\":\"classes/Human.html#distance\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Human.html#__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":1024,\"name\":\"match\",\"url\":\"classes/Human.html#match\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Human.html#__type-19\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Human.html#__type-19.__type-20.__type-21\",\"classes\":\"tsd-kind-type-literal\",\"parent\":\"Human.__type.__type\"},{\"kind\":1024,\"name\":\"index\",\"url\":\"classes/Human.html#__type-19.__type-20.__type-21.index\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Human.__type.__type.__type\"},{\"kind\":1024,\"name\":\"distance\",\"url\":\"classes/Human.html#__type-19.__type-20.__type-21.distance-1\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Human.__type.__type.__type\"},{\"kind\":1024,\"name\":\"similarity\",\"url\":\"classes/Human.html#__type-19.__type-20.__type-21.similarity\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Human.__type.__type.__type\"},{\"kind\":2048,\"name\":\"now\",\"url\":\"classes/Human.html#now\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":2048,\"name\":\"image\",\"url\":\"classes/Human.html#image\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":2048,\"name\":\"segmentation\",\"url\":\"classes/Human.html#segmentation\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":2048,\"name\":\"enhance\",\"url\":\"classes/Human.html#enhance\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":2048,\"name\":\"compare\",\"url\":\"classes/Human.html#compare\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":2048,\"name\":\"init\",\"url\":\"classes/Human.html#init\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":1024,\"name\":\"webcam\",\"url\":\"classes/Human.html#webcam\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":2048,\"name\":\"load\",\"url\":\"classes/Human.html#load\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":2048,\"name\":\"emit\",\"url\":\"classes/Human.html#emit\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":2048,\"name\":\"next\",\"url\":\"classes/Human.html#next\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":2048,\"name\":\"getModelStats\",\"url\":\"classes/Human.html#getModelStats\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":2048,\"name\":\"warmup\",\"url\":\"classes/Human.html#warmup\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":2048,\"name\":\"profile\",\"url\":\"classes/Human.html#profile\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":2048,\"name\":\"detect\",\"url\":\"classes/Human.html#detect\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":2048,\"name\":\"sleep\",\"url\":\"classes/Human.html#sleep\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":2048,\"name\":\"video\",\"url\":\"classes/Human.html#video\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":8388608,\"name\":\"default\",\"url\":\"index.html#default\",\"classes\":\"tsd-kind-reference\"},{\"kind\":4,\"name\":\"match\",\"url\":\"modules/match.html\",\"classes\":\"tsd-kind-namespace\"},{\"kind\":64,\"name\":\"distance\",\"url\":\"functions/match.distance.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"match\"},{\"kind\":64,\"name\":\"similarity\",\"url\":\"functions/match.similarity.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"match\"},{\"kind\":64,\"name\":\"match\",\"url\":\"functions/match.match.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"match\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"functions/match.match.html#match.__type\",\"classes\":\"tsd-kind-type-literal\",\"parent\":\"match.match.match\"},{\"kind\":1024,\"name\":\"index\",\"url\":\"functions/match.match.html#match.__type.index\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"match.match.match.__type\"},{\"kind\":1024,\"name\":\"distance\",\"url\":\"functions/match.match.html#match.__type.distance\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"match.match.match.__type\"},{\"kind\":1024,\"name\":\"similarity\",\"url\":\"functions/match.match.html#match.__type.similarity\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"match.match.match.__type\"},{\"kind\":4194304,\"name\":\"Descriptor\",\"url\":\"types/match.Descriptor.html\",\"classes\":\"tsd-kind-type-alias tsd-parent-kind-namespace\",\"parent\":\"match\"},{\"kind\":4194304,\"name\":\"MatchOptions\",\"url\":\"types/match.MatchOptions.html\",\"classes\":\"tsd-kind-type-alias tsd-parent-kind-namespace\",\"parent\":\"match\"},{\"kind\":4,\"name\":\"draw\",\"url\":\"modules/draw.html\",\"classes\":\"tsd-kind-namespace\"},{\"kind\":64,\"name\":\"person\",\"url\":\"functions/draw.person.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"draw\"},{\"kind\":64,\"name\":\"canvas\",\"url\":\"functions/draw.canvas.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"draw\"},{\"kind\":64,\"name\":\"all\",\"url\":\"functions/draw.all.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"draw\"},{\"kind\":32,\"name\":\"options\",\"url\":\"variables/draw.options.html\",\"classes\":\"tsd-kind-variable tsd-parent-kind-namespace\",\"parent\":\"draw\"},{\"kind\":8388608,\"name\":\"face\",\"url\":\"modules/draw.html#face\",\"classes\":\"tsd-kind-reference tsd-parent-kind-namespace\",\"parent\":\"draw\"},{\"kind\":8388608,\"name\":\"body\",\"url\":\"modules/draw.html#body\",\"classes\":\"tsd-kind-reference tsd-parent-kind-namespace\",\"parent\":\"draw\"},{\"kind\":8388608,\"name\":\"hand\",\"url\":\"modules/draw.html#hand\",\"classes\":\"tsd-kind-reference tsd-parent-kind-namespace\",\"parent\":\"draw\"},{\"kind\":8388608,\"name\":\"object\",\"url\":\"modules/draw.html#object\",\"classes\":\"tsd-kind-reference tsd-parent-kind-namespace\",\"parent\":\"draw\"},{\"kind\":8388608,\"name\":\"gesture\",\"url\":\"modules/draw.html#gesture\",\"classes\":\"tsd-kind-reference tsd-parent-kind-namespace\",\"parent\":\"draw\"},{\"kind\":4,\"name\":\"models\",\"url\":\"modules/models.html\",\"classes\":\"tsd-kind-namespace\"},{\"kind\":64,\"name\":\"reset\",\"url\":\"functions/models.reset.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"models\"},{\"kind\":64,\"name\":\"load\",\"url\":\"functions/models.load.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"models\"},{\"kind\":64,\"name\":\"validateModel\",\"url\":\"functions/models.validateModel.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"models\"},{\"kind\":64,\"name\":\"validate\",\"url\":\"functions/models.validate.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"models\"},{\"kind\":128,\"name\":\"Models\",\"url\":\"classes/models.Models.html\",\"classes\":\"tsd-kind-class tsd-parent-kind-namespace\",\"parent\":\"models\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/models.Models.html#constructor\",\"classes\":\"tsd-kind-constructor tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"ssrnetage\",\"url\":\"classes/models.Models.html#ssrnetage\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"gear\",\"url\":\"classes/models.Models.html#gear\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"blazeposedetect\",\"url\":\"classes/models.Models.html#blazeposedetect\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"blazepose\",\"url\":\"classes/models.Models.html#blazepose\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"centernet\",\"url\":\"classes/models.Models.html#centernet\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"efficientpose\",\"url\":\"classes/models.Models.html#efficientpose\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"mobilefacenet\",\"url\":\"classes/models.Models.html#mobilefacenet\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"insightface\",\"url\":\"classes/models.Models.html#insightface\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"emotion\",\"url\":\"classes/models.Models.html#emotion\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"facedetect\",\"url\":\"classes/models.Models.html#facedetect\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"faceiris\",\"url\":\"classes/models.Models.html#faceiris\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"facemesh\",\"url\":\"classes/models.Models.html#facemesh\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"faceres\",\"url\":\"classes/models.Models.html#faceres\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"ssrnetgender\",\"url\":\"classes/models.Models.html#ssrnetgender\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"handpose\",\"url\":\"classes/models.Models.html#handpose\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"handskeleton\",\"url\":\"classes/models.Models.html#handskeleton\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"handtrack\",\"url\":\"classes/models.Models.html#handtrack\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"liveness\",\"url\":\"classes/models.Models.html#liveness\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"movenet\",\"url\":\"classes/models.Models.html#movenet\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"nanodet\",\"url\":\"classes/models.Models.html#nanodet\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"posenet\",\"url\":\"classes/models.Models.html#posenet\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"segmentation\",\"url\":\"classes/models.Models.html#segmentation\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"antispoof\",\"url\":\"classes/models.Models.html#antispoof\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":256,\"name\":\"ModelStats\",\"url\":\"interfaces/models.ModelStats.html\",\"classes\":\"tsd-kind-interface tsd-parent-kind-namespace\",\"parent\":\"models\"},{\"kind\":1024,\"name\":\"numLoadedModels\",\"url\":\"interfaces/models.ModelStats.html#numLoadedModels\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"models.ModelStats\"},{\"kind\":1024,\"name\":\"numEnabledModels\",\"url\":\"interfaces/models.ModelStats.html#numEnabledModels\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"models.ModelStats\"},{\"kind\":1024,\"name\":\"numDefinedModels\",\"url\":\"interfaces/models.ModelStats.html#numDefinedModels\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"models.ModelStats\"},{\"kind\":1024,\"name\":\"percentageLoaded\",\"url\":\"interfaces/models.ModelStats.html#percentageLoaded\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"models.ModelStats\"},{\"kind\":1024,\"name\":\"totalSizeFromManifest\",\"url\":\"interfaces/models.ModelStats.html#totalSizeFromManifest\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"models.ModelStats\"},{\"kind\":1024,\"name\":\"totalSizeWeights\",\"url\":\"interfaces/models.ModelStats.html#totalSizeWeights\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"models.ModelStats\"},{\"kind\":1024,\"name\":\"totalSizeLoading\",\"url\":\"interfaces/models.ModelStats.html#totalSizeLoading\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"models.ModelStats\"},{\"kind\":1024,\"name\":\"totalSizeEnabled\",\"url\":\"interfaces/models.ModelStats.html#totalSizeEnabled\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"models.ModelStats\"},{\"kind\":1024,\"name\":\"modelStats\",\"url\":\"interfaces/models.ModelStats.html#modelStats\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"models.ModelStats\"},{\"kind\":64,\"name\":\"getModelStats\",\"url\":\"functions/models.getModelStats.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"models\"},{\"kind\":256,\"name\":\"KernelOps\",\"url\":\"interfaces/models.KernelOps.html\",\"classes\":\"tsd-kind-interface tsd-parent-kind-namespace\",\"parent\":\"models\"},{\"kind\":1024,\"name\":\"name\",\"url\":\"interfaces/models.KernelOps.html#name\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"models.KernelOps\"},{\"kind\":1024,\"name\":\"url\",\"url\":\"interfaces/models.KernelOps.html#url\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"models.KernelOps\"},{\"kind\":1024,\"name\":\"missing\",\"url\":\"interfaces/models.KernelOps.html#missing\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"models.KernelOps\"},{\"kind\":1024,\"name\":\"ops\",\"url\":\"interfaces/models.KernelOps.html#ops\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"models.KernelOps\"},{\"kind\":128,\"name\":\"Tensor\",\"url\":\"classes/Tensor-1.html\",\"classes\":\"tsd-kind-class\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/Tensor-1.html#constructor\",\"classes\":\"tsd-kind-constructor tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":1024,\"name\":\"id\",\"url\":\"classes/Tensor-1.html#id\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":1024,\"name\":\"dataId\",\"url\":\"classes/Tensor-1.html#dataId\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":1024,\"name\":\"shape\",\"url\":\"classes/Tensor-1.html#shape\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":1024,\"name\":\"size\",\"url\":\"classes/Tensor-1.html#size\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":1024,\"name\":\"dtype\",\"url\":\"classes/Tensor-1.html#dtype\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":1024,\"name\":\"rankType\",\"url\":\"classes/Tensor-1.html#rankType\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":1024,\"name\":\"kept\",\"url\":\"classes/Tensor-1.html#kept\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":1024,\"name\":\"scopeId\",\"url\":\"classes/Tensor-1.html#scopeId\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":1024,\"name\":\"strides\",\"url\":\"classes/Tensor-1.html#strides\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":1024,\"name\":\"rank\",\"url\":\"classes/Tensor-1.html#rank\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"buffer\",\"url\":\"classes/Tensor-1.html#buffer\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"bufferSync\",\"url\":\"classes/Tensor-1.html#bufferSync\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"array\",\"url\":\"classes/Tensor-1.html#array\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"arraySync\",\"url\":\"classes/Tensor-1.html#arraySync\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"data\",\"url\":\"classes/Tensor-1.html#data\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"dataToGPU\",\"url\":\"classes/Tensor-1.html#dataToGPU\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"dataSync\",\"url\":\"classes/Tensor-1.html#dataSync\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"bytes\",\"url\":\"classes/Tensor-1.html#bytes\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"dispose\",\"url\":\"classes/Tensor-1.html#dispose\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":1024,\"name\":\"isDisposed\",\"url\":\"classes/Tensor-1.html#isDisposed\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"throwIfDisposed\",\"url\":\"classes/Tensor-1.html#throwIfDisposed\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"print\",\"url\":\"classes/Tensor-1.html#print\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"clone\",\"url\":\"classes/Tensor-1.html#clone\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"toString\",\"url\":\"classes/Tensor-1.html#toString\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"variable\",\"url\":\"classes/Tensor-1.html#variable\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"abs\",\"url\":\"classes/Tensor-1.html#abs\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"acos\",\"url\":\"classes/Tensor-1.html#acos\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"acosh\",\"url\":\"classes/Tensor-1.html#acosh\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"add\",\"url\":\"classes/Tensor-1.html#add\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"all\",\"url\":\"classes/Tensor-1.html#all\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"any\",\"url\":\"classes/Tensor-1.html#any\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"argMax\",\"url\":\"classes/Tensor-1.html#argMax\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"argMin\",\"url\":\"classes/Tensor-1.html#argMin\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"asScalar\",\"url\":\"classes/Tensor-1.html#asScalar\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"asType\",\"url\":\"classes/Tensor-1.html#asType\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"as1D\",\"url\":\"classes/Tensor-1.html#as1D\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"as2D\",\"url\":\"classes/Tensor-1.html#as2D\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"as3D\",\"url\":\"classes/Tensor-1.html#as3D\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"as4D\",\"url\":\"classes/Tensor-1.html#as4D\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"as5D\",\"url\":\"classes/Tensor-1.html#as5D\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"asin\",\"url\":\"classes/Tensor-1.html#asin\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"asinh\",\"url\":\"classes/Tensor-1.html#asinh\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"atan\",\"url\":\"classes/Tensor-1.html#atan\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"atan2\",\"url\":\"classes/Tensor-1.html#atan2\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"atanh\",\"url\":\"classes/Tensor-1.html#atanh\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"avgPool\",\"url\":\"classes/Tensor-1.html#avgPool\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"batchToSpaceND\",\"url\":\"classes/Tensor-1.html#batchToSpaceND\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"batchNorm\",\"url\":\"classes/Tensor-1.html#batchNorm\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"broadcastTo\",\"url\":\"classes/Tensor-1.html#broadcastTo\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"cast\",\"url\":\"classes/Tensor-1.html#cast\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"ceil\",\"url\":\"classes/Tensor-1.html#ceil\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"clipByValue\",\"url\":\"classes/Tensor-1.html#clipByValue\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"concat\",\"url\":\"classes/Tensor-1.html#concat\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"conv1d\",\"url\":\"classes/Tensor-1.html#conv1d\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"conv2dTranspose\",\"url\":\"classes/Tensor-1.html#conv2dTranspose\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"conv2d\",\"url\":\"classes/Tensor-1.html#conv2d\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"cos\",\"url\":\"classes/Tensor-1.html#cos\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"cosh\",\"url\":\"classes/Tensor-1.html#cosh\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"cumprod\",\"url\":\"classes/Tensor-1.html#cumprod\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"cumsum\",\"url\":\"classes/Tensor-1.html#cumsum\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"depthToSpace\",\"url\":\"classes/Tensor-1.html#depthToSpace\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"depthwiseConv2d\",\"url\":\"classes/Tensor-1.html#depthwiseConv2d\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"dilation2d\",\"url\":\"classes/Tensor-1.html#dilation2d\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"divNoNan\",\"url\":\"classes/Tensor-1.html#divNoNan\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"div\",\"url\":\"classes/Tensor-1.html#div\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"dot\",\"url\":\"classes/Tensor-1.html#dot\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"elu\",\"url\":\"classes/Tensor-1.html#elu\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"equal\",\"url\":\"classes/Tensor-1.html#equal\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"erf\",\"url\":\"classes/Tensor-1.html#erf\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"euclideanNorm\",\"url\":\"classes/Tensor-1.html#euclideanNorm\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"exp\",\"url\":\"classes/Tensor-1.html#exp\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"expandDims\",\"url\":\"classes/Tensor-1.html#expandDims\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"expm1\",\"url\":\"classes/Tensor-1.html#expm1\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"fft\",\"url\":\"classes/Tensor-1.html#fft\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"flatten\",\"url\":\"classes/Tensor-1.html#flatten\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"floor\",\"url\":\"classes/Tensor-1.html#floor\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"floorDiv\",\"url\":\"classes/Tensor-1.html#floorDiv\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"gather\",\"url\":\"classes/Tensor-1.html#gather\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"greaterEqual\",\"url\":\"classes/Tensor-1.html#greaterEqual\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"greater\",\"url\":\"classes/Tensor-1.html#greater\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"ifft\",\"url\":\"classes/Tensor-1.html#ifft\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"irfft\",\"url\":\"classes/Tensor-1.html#irfft\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"isFinite\",\"url\":\"classes/Tensor-1.html#isFinite\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"isInf\",\"url\":\"classes/Tensor-1.html#isInf\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"isNaN\",\"url\":\"classes/Tensor-1.html#isNaN\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"leakyRelu\",\"url\":\"classes/Tensor-1.html#leakyRelu\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"lessEqual\",\"url\":\"classes/Tensor-1.html#lessEqual\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"less\",\"url\":\"classes/Tensor-1.html#less\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"localResponseNormalization\",\"url\":\"classes/Tensor-1.html#localResponseNormalization\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"logSigmoid\",\"url\":\"classes/Tensor-1.html#logSigmoid\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"logSoftmax\",\"url\":\"classes/Tensor-1.html#logSoftmax\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"logSumExp\",\"url\":\"classes/Tensor-1.html#logSumExp\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"log\",\"url\":\"classes/Tensor-1.html#log\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"log1p\",\"url\":\"classes/Tensor-1.html#log1p\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"logicalAnd\",\"url\":\"classes/Tensor-1.html#logicalAnd\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"logicalNot\",\"url\":\"classes/Tensor-1.html#logicalNot\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"logicalOr\",\"url\":\"classes/Tensor-1.html#logicalOr\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"logicalXor\",\"url\":\"classes/Tensor-1.html#logicalXor\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"matMul\",\"url\":\"classes/Tensor-1.html#matMul\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"maxPool\",\"url\":\"classes/Tensor-1.html#maxPool\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"max\",\"url\":\"classes/Tensor-1.html#max\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"maximum\",\"url\":\"classes/Tensor-1.html#maximum\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"mean\",\"url\":\"classes/Tensor-1.html#mean\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"min\",\"url\":\"classes/Tensor-1.html#min\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"minimum\",\"url\":\"classes/Tensor-1.html#minimum\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"mirrorPad\",\"url\":\"classes/Tensor-1.html#mirrorPad\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"mod\",\"url\":\"classes/Tensor-1.html#mod\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"mul\",\"url\":\"classes/Tensor-1.html#mul\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"neg\",\"url\":\"classes/Tensor-1.html#neg\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"norm\",\"url\":\"classes/Tensor-1.html#norm\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"notEqual\",\"url\":\"classes/Tensor-1.html#notEqual\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"oneHot\",\"url\":\"classes/Tensor-1.html#oneHot\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"onesLike\",\"url\":\"classes/Tensor-1.html#onesLike\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"pad\",\"url\":\"classes/Tensor-1.html#pad\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"pool\",\"url\":\"classes/Tensor-1.html#pool\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"pow\",\"url\":\"classes/Tensor-1.html#pow\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"prelu\",\"url\":\"classes/Tensor-1.html#prelu\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"prod\",\"url\":\"classes/Tensor-1.html#prod\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"reciprocal\",\"url\":\"classes/Tensor-1.html#reciprocal\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"relu\",\"url\":\"classes/Tensor-1.html#relu\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"relu6\",\"url\":\"classes/Tensor-1.html#relu6\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"reshapeAs\",\"url\":\"classes/Tensor-1.html#reshapeAs\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"reshape\",\"url\":\"classes/Tensor-1.html#reshape\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"resizeBilinear\",\"url\":\"classes/Tensor-1.html#resizeBilinear\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"resizeNearestNeighbor\",\"url\":\"classes/Tensor-1.html#resizeNearestNeighbor\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"reverse\",\"url\":\"classes/Tensor-1.html#reverse\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"rfft\",\"url\":\"classes/Tensor-1.html#rfft\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"round\",\"url\":\"classes/Tensor-1.html#round\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"rsqrt\",\"url\":\"classes/Tensor-1.html#rsqrt\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"selu\",\"url\":\"classes/Tensor-1.html#selu\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"separableConv2d\",\"url\":\"classes/Tensor-1.html#separableConv2d\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"sigmoid\",\"url\":\"classes/Tensor-1.html#sigmoid\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"sign\",\"url\":\"classes/Tensor-1.html#sign\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"sin\",\"url\":\"classes/Tensor-1.html#sin\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"sinh\",\"url\":\"classes/Tensor-1.html#sinh\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"slice\",\"url\":\"classes/Tensor-1.html#slice\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"softmax\",\"url\":\"classes/Tensor-1.html#softmax\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"softplus\",\"url\":\"classes/Tensor-1.html#softplus\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"spaceToBatchND\",\"url\":\"classes/Tensor-1.html#spaceToBatchND\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"split\",\"url\":\"classes/Tensor-1.html#split\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"sqrt\",\"url\":\"classes/Tensor-1.html#sqrt\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"square\",\"url\":\"classes/Tensor-1.html#square\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"squaredDifference\",\"url\":\"classes/Tensor-1.html#squaredDifference\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"squeeze\",\"url\":\"classes/Tensor-1.html#squeeze\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"stack\",\"url\":\"classes/Tensor-1.html#stack\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"step\",\"url\":\"classes/Tensor-1.html#step\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"stridedSlice\",\"url\":\"classes/Tensor-1.html#stridedSlice\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"sub\",\"url\":\"classes/Tensor-1.html#sub\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"sum\",\"url\":\"classes/Tensor-1.html#sum\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"tan\",\"url\":\"classes/Tensor-1.html#tan\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"tanh\",\"url\":\"classes/Tensor-1.html#tanh\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"tile\",\"url\":\"classes/Tensor-1.html#tile\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"toBool\",\"url\":\"classes/Tensor-1.html#toBool\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"toFloat\",\"url\":\"classes/Tensor-1.html#toFloat\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"toInt\",\"url\":\"classes/Tensor-1.html#toInt\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"topk\",\"url\":\"classes/Tensor-1.html#topk\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Tensor-1.html#topk.topk-1.__type\",\"classes\":\"tsd-kind-type-literal\",\"parent\":\"Tensor.topk.topk\"},{\"kind\":1024,\"name\":\"values\",\"url\":\"classes/Tensor-1.html#topk.topk-1.__type.values\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Tensor.topk.topk.__type\"},{\"kind\":1024,\"name\":\"indices\",\"url\":\"classes/Tensor-1.html#topk.topk-1.__type.indices\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Tensor.topk.topk.__type\"},{\"kind\":2048,\"name\":\"transpose\",\"url\":\"classes/Tensor-1.html#transpose\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"unique\",\"url\":\"classes/Tensor-1.html#unique\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Tensor-1.html#unique.unique-1.__type-1\",\"classes\":\"tsd-kind-type-literal\",\"parent\":\"Tensor.unique.unique\"},{\"kind\":1024,\"name\":\"values\",\"url\":\"classes/Tensor-1.html#unique.unique-1.__type-1.values-1\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Tensor.unique.unique.__type\"},{\"kind\":1024,\"name\":\"indices\",\"url\":\"classes/Tensor-1.html#unique.unique-1.__type-1.indices-1\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Tensor.unique.unique.__type\"},{\"kind\":2048,\"name\":\"unsortedSegmentSum\",\"url\":\"classes/Tensor-1.html#unsortedSegmentSum\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"unstack\",\"url\":\"classes/Tensor-1.html#unstack\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"where\",\"url\":\"classes/Tensor-1.html#where\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"zerosLike\",\"url\":\"classes/Tensor-1.html#zerosLike\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":4,\"name\":\"Tensor\",\"url\":\"modules/Tensor.html\",\"classes\":\"tsd-kind-namespace\"},{\"kind\":4194304,\"name\":\"TensorLike\",\"url\":\"types/TensorLike.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":128,\"name\":\"GraphModel\",\"url\":\"classes/GraphModel.html\",\"classes\":\"tsd-kind-class\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/GraphModel.html#constructor\",\"classes\":\"tsd-kind-constructor tsd-parent-kind-class\",\"parent\":\"GraphModel\"},{\"kind\":1024,\"name\":\"modelVersion\",\"url\":\"classes/GraphModel.html#modelVersion\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"GraphModel\"},{\"kind\":1024,\"name\":\"inputNodes\",\"url\":\"classes/GraphModel.html#inputNodes\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"GraphModel\"},{\"kind\":1024,\"name\":\"outputNodes\",\"url\":\"classes/GraphModel.html#outputNodes\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"GraphModel\"},{\"kind\":1024,\"name\":\"inputs\",\"url\":\"classes/GraphModel.html#inputs\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"GraphModel\"},{\"kind\":1024,\"name\":\"outputs\",\"url\":\"classes/GraphModel.html#outputs\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"GraphModel\"},{\"kind\":1024,\"name\":\"weights\",\"url\":\"classes/GraphModel.html#weights\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"GraphModel\"},{\"kind\":1024,\"name\":\"metadata\",\"url\":\"classes/GraphModel.html#metadata\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"GraphModel\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/GraphModel.html#__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-class\",\"parent\":\"GraphModel\"},{\"kind\":1024,\"name\":\"modelSignature\",\"url\":\"classes/GraphModel.html#modelSignature\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"GraphModel\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/GraphModel.html#__type-1\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-class\",\"parent\":\"GraphModel\"},{\"kind\":1024,\"name\":\"modelStructuredOutputKeys\",\"url\":\"classes/GraphModel.html#modelStructuredOutputKeys\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"GraphModel\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/GraphModel.html#__type-2\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-class\",\"parent\":\"GraphModel\"},{\"kind\":2048,\"name\":\"load\",\"url\":\"classes/GraphModel.html#load\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"GraphModel\"},{\"kind\":2048,\"name\":\"loadSync\",\"url\":\"classes/GraphModel.html#loadSync\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"GraphModel\"},{\"kind\":2048,\"name\":\"save\",\"url\":\"classes/GraphModel.html#save\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"GraphModel\"},{\"kind\":2048,\"name\":\"predict\",\"url\":\"classes/GraphModel.html#predict\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"GraphModel\"},{\"kind\":2048,\"name\":\"execute\",\"url\":\"classes/GraphModel.html#execute\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"GraphModel\"},{\"kind\":2048,\"name\":\"executeAsync\",\"url\":\"classes/GraphModel.html#executeAsync\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"GraphModel\"},{\"kind\":2048,\"name\":\"getIntermediateTensors\",\"url\":\"classes/GraphModel.html#getIntermediateTensors\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"GraphModel\"},{\"kind\":2048,\"name\":\"disposeIntermediateTensors\",\"url\":\"classes/GraphModel.html#disposeIntermediateTensors\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"GraphModel\"},{\"kind\":2048,\"name\":\"dispose\",\"url\":\"classes/GraphModel.html#dispose\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"GraphModel\"},{\"kind\":8,\"name\":\"Rank\",\"url\":\"enums/Rank.html\",\"classes\":\"tsd-kind-enum\"},{\"kind\":16,\"name\":\"R0\",\"url\":\"enums/Rank.html#R0\",\"classes\":\"tsd-kind-enum-member tsd-parent-kind-enum\",\"parent\":\"Rank\"},{\"kind\":16,\"name\":\"R1\",\"url\":\"enums/Rank.html#R1\",\"classes\":\"tsd-kind-enum-member tsd-parent-kind-enum\",\"parent\":\"Rank\"},{\"kind\":16,\"name\":\"R2\",\"url\":\"enums/Rank.html#R2\",\"classes\":\"tsd-kind-enum-member tsd-parent-kind-enum\",\"parent\":\"Rank\"},{\"kind\":16,\"name\":\"R3\",\"url\":\"enums/Rank.html#R3\",\"classes\":\"tsd-kind-enum-member tsd-parent-kind-enum\",\"parent\":\"Rank\"},{\"kind\":16,\"name\":\"R4\",\"url\":\"enums/Rank.html#R4\",\"classes\":\"tsd-kind-enum-member tsd-parent-kind-enum\",\"parent\":\"Rank\"},{\"kind\":16,\"name\":\"R5\",\"url\":\"enums/Rank.html#R5\",\"classes\":\"tsd-kind-enum-member tsd-parent-kind-enum\",\"parent\":\"Rank\"},{\"kind\":16,\"name\":\"R6\",\"url\":\"enums/Rank.html#R6\",\"classes\":\"tsd-kind-enum-member tsd-parent-kind-enum\",\"parent\":\"Rank\"},{\"kind\":256,\"name\":\"DrawOptions\",\"url\":\"interfaces/DrawOptions.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"color\",\"url\":\"interfaces/DrawOptions.html#color\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"DrawOptions\"},{\"kind\":1024,\"name\":\"alpha\",\"url\":\"interfaces/DrawOptions.html#alpha\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"DrawOptions\"},{\"kind\":1024,\"name\":\"labelColor\",\"url\":\"interfaces/DrawOptions.html#labelColor\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"DrawOptions\"},{\"kind\":1024,\"name\":\"shadowColor\",\"url\":\"interfaces/DrawOptions.html#shadowColor\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"DrawOptions\"},{\"kind\":1024,\"name\":\"font\",\"url\":\"interfaces/DrawOptions.html#font\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"DrawOptions\"},{\"kind\":1024,\"name\":\"lineHeight\",\"url\":\"interfaces/DrawOptions.html#lineHeight\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"DrawOptions\"},{\"kind\":1024,\"name\":\"lineWidth\",\"url\":\"interfaces/DrawOptions.html#lineWidth\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"DrawOptions\"},{\"kind\":1024,\"name\":\"pointSize\",\"url\":\"interfaces/DrawOptions.html#pointSize\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"DrawOptions\"},{\"kind\":1024,\"name\":\"roundRect\",\"url\":\"interfaces/DrawOptions.html#roundRect\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"DrawOptions\"},{\"kind\":1024,\"name\":\"drawPoints\",\"url\":\"interfaces/DrawOptions.html#drawPoints\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"DrawOptions\"},{\"kind\":1024,\"name\":\"drawLabels\",\"url\":\"interfaces/DrawOptions.html#drawLabels\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"DrawOptions\"},{\"kind\":1024,\"name\":\"drawAttention\",\"url\":\"interfaces/DrawOptions.html#drawAttention\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"DrawOptions\"},{\"kind\":1024,\"name\":\"drawGestures\",\"url\":\"interfaces/DrawOptions.html#drawGestures\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"DrawOptions\"},{\"kind\":1024,\"name\":\"drawBoxes\",\"url\":\"interfaces/DrawOptions.html#drawBoxes\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"DrawOptions\"},{\"kind\":1024,\"name\":\"drawPolygons\",\"url\":\"interfaces/DrawOptions.html#drawPolygons\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"DrawOptions\"},{\"kind\":1024,\"name\":\"drawGaze\",\"url\":\"interfaces/DrawOptions.html#drawGaze\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"DrawOptions\"},{\"kind\":1024,\"name\":\"fillPolygons\",\"url\":\"interfaces/DrawOptions.html#fillPolygons\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"DrawOptions\"},{\"kind\":1024,\"name\":\"useDepth\",\"url\":\"interfaces/DrawOptions.html#useDepth\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"DrawOptions\"},{\"kind\":1024,\"name\":\"useCurves\",\"url\":\"interfaces/DrawOptions.html#useCurves\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"DrawOptions\"},{\"kind\":4194304,\"name\":\"Box\",\"url\":\"types/Box.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"Point\",\"url\":\"types/Point.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":32,\"name\":\"env\",\"url\":\"variables/env-1.html\",\"classes\":\"tsd-kind-variable\"},{\"kind\":128,\"name\":\"Env\",\"url\":\"classes/Env.html\",\"classes\":\"tsd-kind-class\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/Env.html#constructor\",\"classes\":\"tsd-kind-constructor tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":1024,\"name\":\"browser\",\"url\":\"classes/Env.html#browser\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":1024,\"name\":\"node\",\"url\":\"classes/Env.html#node\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":1024,\"name\":\"worker\",\"url\":\"classes/Env.html#worker\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":1024,\"name\":\"platform\",\"url\":\"classes/Env.html#platform\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":1024,\"name\":\"agent\",\"url\":\"classes/Env.html#agent\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":1024,\"name\":\"backends\",\"url\":\"classes/Env.html#backends\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":1024,\"name\":\"initial\",\"url\":\"classes/Env.html#initial\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":1024,\"name\":\"filter\",\"url\":\"classes/Env.html#filter\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":1024,\"name\":\"tfjs\",\"url\":\"classes/Env.html#tfjs\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Env.html#__type-2\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":1024,\"name\":\"version\",\"url\":\"classes/Env.html#__type-2.version-1\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Env.__type\"},{\"kind\":1024,\"name\":\"offscreen\",\"url\":\"classes/Env.html#offscreen\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":1024,\"name\":\"perfadd\",\"url\":\"classes/Env.html#perfadd\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":1024,\"name\":\"tensorflow\",\"url\":\"classes/Env.html#tensorflow\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Env.html#__type-1\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":1024,\"name\":\"version\",\"url\":\"classes/Env.html#__type-1.version\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Env.__type\"},{\"kind\":1024,\"name\":\"gpu\",\"url\":\"classes/Env.html#__type-1.gpu\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Env.__type\"},{\"kind\":1024,\"name\":\"wasm\",\"url\":\"classes/Env.html#wasm\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Env.html#__type-3\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":1024,\"name\":\"supported\",\"url\":\"classes/Env.html#__type-3.supported\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Env.__type\"},{\"kind\":1024,\"name\":\"backend\",\"url\":\"classes/Env.html#__type-3.backend\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Env.__type\"},{\"kind\":1024,\"name\":\"simd\",\"url\":\"classes/Env.html#__type-3.simd\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Env.__type\"},{\"kind\":1024,\"name\":\"multithread\",\"url\":\"classes/Env.html#__type-3.multithread\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Env.__type\"},{\"kind\":1024,\"name\":\"webgl\",\"url\":\"classes/Env.html#webgl\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Env.html#__type-4\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":1024,\"name\":\"supported\",\"url\":\"classes/Env.html#__type-4.supported-1\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Env.__type\"},{\"kind\":1024,\"name\":\"backend\",\"url\":\"classes/Env.html#__type-4.backend-1\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Env.__type\"},{\"kind\":1024,\"name\":\"version\",\"url\":\"classes/Env.html#__type-4.version-2\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Env.__type\"},{\"kind\":1024,\"name\":\"renderer\",\"url\":\"classes/Env.html#__type-4.renderer\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Env.__type\"},{\"kind\":1024,\"name\":\"webgpu\",\"url\":\"classes/Env.html#webgpu\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Env.html#__type-5\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":1024,\"name\":\"supported\",\"url\":\"classes/Env.html#__type-5.supported-2\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Env.__type\"},{\"kind\":1024,\"name\":\"backend\",\"url\":\"classes/Env.html#__type-5.backend-2\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Env.__type\"},{\"kind\":1024,\"name\":\"adapter\",\"url\":\"classes/Env.html#__type-5.adapter\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Env.__type\"},{\"kind\":1024,\"name\":\"cpu\",\"url\":\"classes/Env.html#cpu\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Env.html#__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":1024,\"name\":\"model\",\"url\":\"classes/Env.html#__type.model\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Env.__type\"},{\"kind\":1024,\"name\":\"flags\",\"url\":\"classes/Env.html#__type.flags\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Env.__type\"},{\"kind\":1024,\"name\":\"kernels\",\"url\":\"classes/Env.html#kernels\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":1024,\"name\":\"Canvas\",\"url\":\"classes/Env.html#Canvas\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":1024,\"name\":\"Image\",\"url\":\"classes/Env.html#Image\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":1024,\"name\":\"ImageData\",\"url\":\"classes/Env.html#ImageData\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":2048,\"name\":\"updateBackend\",\"url\":\"classes/Env.html#updateBackend\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":2048,\"name\":\"updateCPU\",\"url\":\"classes/Env.html#updateCPU\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":4194304,\"name\":\"FaceGesture\",\"url\":\"types/FaceGesture.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"BodyGesture\",\"url\":\"types/BodyGesture.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"HandGesture\",\"url\":\"types/HandGesture.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"IrisGesture\",\"url\":\"types/IrisGesture.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"Emotion\",\"url\":\"types/Emotion.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"Finger\",\"url\":\"types/Finger.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"FingerCurl\",\"url\":\"types/FingerCurl.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"FingerDirection\",\"url\":\"types/FingerDirection.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"HandType\",\"url\":\"types/HandType.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"Gender\",\"url\":\"types/Gender.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"Race\",\"url\":\"types/Race.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"FaceLandmark\",\"url\":\"types/FaceLandmark.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"BodyLandmark\",\"url\":\"types/BodyLandmark.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"BodyAnnotation\",\"url\":\"types/BodyAnnotation.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"ObjectType\",\"url\":\"types/ObjectType.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":128,\"name\":\"WebCam\",\"url\":\"classes/WebCam.html\",\"classes\":\"tsd-kind-class\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/WebCam.html#constructor\",\"classes\":\"tsd-kind-constructor tsd-parent-kind-class\",\"parent\":\"WebCam\"},{\"kind\":1024,\"name\":\"config\",\"url\":\"classes/WebCam.html#config\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"WebCam\"},{\"kind\":1024,\"name\":\"element\",\"url\":\"classes/WebCam.html#element\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"WebCam\"},{\"kind\":1024,\"name\":\"stream\",\"url\":\"classes/WebCam.html#stream\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"WebCam\"},{\"kind\":262144,\"name\":\"track\",\"url\":\"classes/WebCam.html#track\",\"classes\":\"tsd-kind-accessor tsd-parent-kind-class\",\"parent\":\"WebCam\"},{\"kind\":262144,\"name\":\"capabilities\",\"url\":\"classes/WebCam.html#capabilities\",\"classes\":\"tsd-kind-accessor tsd-parent-kind-class\",\"parent\":\"WebCam\"},{\"kind\":262144,\"name\":\"constraints\",\"url\":\"classes/WebCam.html#constraints\",\"classes\":\"tsd-kind-accessor tsd-parent-kind-class\",\"parent\":\"WebCam\"},{\"kind\":262144,\"name\":\"settings\",\"url\":\"classes/WebCam.html#settings\",\"classes\":\"tsd-kind-accessor tsd-parent-kind-class\",\"parent\":\"WebCam\"},{\"kind\":262144,\"name\":\"label\",\"url\":\"classes/WebCam.html#label\",\"classes\":\"tsd-kind-accessor tsd-parent-kind-class\",\"parent\":\"WebCam\"},{\"kind\":262144,\"name\":\"paused\",\"url\":\"classes/WebCam.html#paused\",\"classes\":\"tsd-kind-accessor tsd-parent-kind-class\",\"parent\":\"WebCam\"},{\"kind\":262144,\"name\":\"width\",\"url\":\"classes/WebCam.html#width\",\"classes\":\"tsd-kind-accessor tsd-parent-kind-class\",\"parent\":\"WebCam\"},{\"kind\":262144,\"name\":\"height\",\"url\":\"classes/WebCam.html#height\",\"classes\":\"tsd-kind-accessor tsd-parent-kind-class\",\"parent\":\"WebCam\"},{\"kind\":2048,\"name\":\"start\",\"url\":\"classes/WebCam.html#start\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"WebCam\"},{\"kind\":2048,\"name\":\"pause\",\"url\":\"classes/WebCam.html#pause\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"WebCam\"},{\"kind\":2048,\"name\":\"play\",\"url\":\"classes/WebCam.html#play\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"WebCam\"},{\"kind\":2048,\"name\":\"stop\",\"url\":\"classes/WebCam.html#stop\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"WebCam\"},{\"kind\":256,\"name\":\"WebCamConfig\",\"url\":\"interfaces/WebCamConfig.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"element\",\"url\":\"interfaces/WebCamConfig.html#element\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"WebCamConfig\"},{\"kind\":1024,\"name\":\"debug\",\"url\":\"interfaces/WebCamConfig.html#debug\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"WebCamConfig\"},{\"kind\":1024,\"name\":\"mode\",\"url\":\"interfaces/WebCamConfig.html#mode\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"WebCamConfig\"},{\"kind\":1024,\"name\":\"crop\",\"url\":\"interfaces/WebCamConfig.html#crop\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"WebCamConfig\"},{\"kind\":1024,\"name\":\"width\",\"url\":\"interfaces/WebCamConfig.html#width\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"WebCamConfig\"},{\"kind\":1024,\"name\":\"height\",\"url\":\"interfaces/WebCamConfig.html#height\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"WebCamConfig\"},{\"kind\":256,\"name\":\"ModelInfo\",\"url\":\"interfaces/ModelInfo.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"name\",\"url\":\"interfaces/ModelInfo.html#name\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"ModelInfo\"},{\"kind\":1024,\"name\":\"inCache\",\"url\":\"interfaces/ModelInfo.html#inCache\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"ModelInfo\"},{\"kind\":1024,\"name\":\"sizeDesired\",\"url\":\"interfaces/ModelInfo.html#sizeDesired\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"ModelInfo\"},{\"kind\":1024,\"name\":\"sizeFromManifest\",\"url\":\"interfaces/ModelInfo.html#sizeFromManifest\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"ModelInfo\"},{\"kind\":1024,\"name\":\"sizeLoadedWeights\",\"url\":\"interfaces/ModelInfo.html#sizeLoadedWeights\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"ModelInfo\"},{\"kind\":4194304,\"name\":\"Events\",\"url\":\"types/Events.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"AnyCanvas\",\"url\":\"types/AnyCanvas.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"AnyImage\",\"url\":\"types/AnyImage.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"AnyVideo\",\"url\":\"types/AnyVideo.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"ImageObjects\",\"url\":\"types/ImageObjects.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"ExternalCanvas\",\"url\":\"types/ExternalCanvas.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"Input\",\"url\":\"types/Input.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":256,\"name\":\"GenericConfig\",\"url\":\"interfaces/GenericConfig.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"enabled\",\"url\":\"interfaces/GenericConfig.html#enabled\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"GenericConfig\"},{\"kind\":1024,\"name\":\"modelPath\",\"url\":\"interfaces/GenericConfig.html#modelPath\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"GenericConfig\"},{\"kind\":1024,\"name\":\"skipFrames\",\"url\":\"interfaces/GenericConfig.html#skipFrames\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"GenericConfig\"},{\"kind\":1024,\"name\":\"skipTime\",\"url\":\"interfaces/GenericConfig.html#skipTime\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"GenericConfig\"},{\"kind\":256,\"name\":\"FaceDetectorConfig\",\"url\":\"interfaces/FaceDetectorConfig.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"rotation\",\"url\":\"interfaces/FaceDetectorConfig.html#rotation\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceDetectorConfig\"},{\"kind\":1024,\"name\":\"maxDetected\",\"url\":\"interfaces/FaceDetectorConfig.html#maxDetected\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceDetectorConfig\"},{\"kind\":1024,\"name\":\"minConfidence\",\"url\":\"interfaces/FaceDetectorConfig.html#minConfidence\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceDetectorConfig\"},{\"kind\":1024,\"name\":\"iouThreshold\",\"url\":\"interfaces/FaceDetectorConfig.html#iouThreshold\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceDetectorConfig\"},{\"kind\":1024,\"name\":\"mask\",\"url\":\"interfaces/FaceDetectorConfig.html#mask\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceDetectorConfig\"},{\"kind\":1024,\"name\":\"return\",\"url\":\"interfaces/FaceDetectorConfig.html#return\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceDetectorConfig\"},{\"kind\":1024,\"name\":\"enabled\",\"url\":\"interfaces/FaceDetectorConfig.html#enabled\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceDetectorConfig\"},{\"kind\":1024,\"name\":\"modelPath\",\"url\":\"interfaces/FaceDetectorConfig.html#modelPath\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceDetectorConfig\"},{\"kind\":1024,\"name\":\"skipFrames\",\"url\":\"interfaces/FaceDetectorConfig.html#skipFrames\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceDetectorConfig\"},{\"kind\":1024,\"name\":\"skipTime\",\"url\":\"interfaces/FaceDetectorConfig.html#skipTime\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceDetectorConfig\"},{\"kind\":256,\"name\":\"FaceMeshConfig\",\"url\":\"interfaces/FaceMeshConfig.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"keepInvalid\",\"url\":\"interfaces/FaceMeshConfig.html#keepInvalid\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceMeshConfig\"},{\"kind\":1024,\"name\":\"enabled\",\"url\":\"interfaces/FaceMeshConfig.html#enabled\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceMeshConfig\"},{\"kind\":1024,\"name\":\"modelPath\",\"url\":\"interfaces/FaceMeshConfig.html#modelPath\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceMeshConfig\"},{\"kind\":1024,\"name\":\"skipFrames\",\"url\":\"interfaces/FaceMeshConfig.html#skipFrames\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceMeshConfig\"},{\"kind\":1024,\"name\":\"skipTime\",\"url\":\"interfaces/FaceMeshConfig.html#skipTime\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceMeshConfig\"},{\"kind\":256,\"name\":\"FaceIrisConfig\",\"url\":\"interfaces/FaceIrisConfig.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"enabled\",\"url\":\"interfaces/FaceIrisConfig.html#enabled\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceIrisConfig\"},{\"kind\":1024,\"name\":\"modelPath\",\"url\":\"interfaces/FaceIrisConfig.html#modelPath\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceIrisConfig\"},{\"kind\":1024,\"name\":\"skipFrames\",\"url\":\"interfaces/FaceIrisConfig.html#skipFrames\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceIrisConfig\"},{\"kind\":1024,\"name\":\"skipTime\",\"url\":\"interfaces/FaceIrisConfig.html#skipTime\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceIrisConfig\"},{\"kind\":256,\"name\":\"FaceAttentionConfig\",\"url\":\"interfaces/FaceAttentionConfig.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"enabled\",\"url\":\"interfaces/FaceAttentionConfig.html#enabled\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceAttentionConfig\"},{\"kind\":1024,\"name\":\"modelPath\",\"url\":\"interfaces/FaceAttentionConfig.html#modelPath\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceAttentionConfig\"},{\"kind\":1024,\"name\":\"skipFrames\",\"url\":\"interfaces/FaceAttentionConfig.html#skipFrames\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceAttentionConfig\"},{\"kind\":1024,\"name\":\"skipTime\",\"url\":\"interfaces/FaceAttentionConfig.html#skipTime\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceAttentionConfig\"},{\"kind\":256,\"name\":\"FaceDescriptionConfig\",\"url\":\"interfaces/FaceDescriptionConfig.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"minConfidence\",\"url\":\"interfaces/FaceDescriptionConfig.html#minConfidence\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceDescriptionConfig\"},{\"kind\":1024,\"name\":\"enabled\",\"url\":\"interfaces/FaceDescriptionConfig.html#enabled\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceDescriptionConfig\"},{\"kind\":1024,\"name\":\"modelPath\",\"url\":\"interfaces/FaceDescriptionConfig.html#modelPath\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceDescriptionConfig\"},{\"kind\":1024,\"name\":\"skipFrames\",\"url\":\"interfaces/FaceDescriptionConfig.html#skipFrames\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceDescriptionConfig\"},{\"kind\":1024,\"name\":\"skipTime\",\"url\":\"interfaces/FaceDescriptionConfig.html#skipTime\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceDescriptionConfig\"},{\"kind\":256,\"name\":\"FaceEmotionConfig\",\"url\":\"interfaces/FaceEmotionConfig.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"minConfidence\",\"url\":\"interfaces/FaceEmotionConfig.html#minConfidence\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceEmotionConfig\"},{\"kind\":1024,\"name\":\"enabled\",\"url\":\"interfaces/FaceEmotionConfig.html#enabled\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceEmotionConfig\"},{\"kind\":1024,\"name\":\"modelPath\",\"url\":\"interfaces/FaceEmotionConfig.html#modelPath\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceEmotionConfig\"},{\"kind\":1024,\"name\":\"skipFrames\",\"url\":\"interfaces/FaceEmotionConfig.html#skipFrames\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceEmotionConfig\"},{\"kind\":1024,\"name\":\"skipTime\",\"url\":\"interfaces/FaceEmotionConfig.html#skipTime\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceEmotionConfig\"},{\"kind\":256,\"name\":\"FaceAntiSpoofConfig\",\"url\":\"interfaces/FaceAntiSpoofConfig.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"enabled\",\"url\":\"interfaces/FaceAntiSpoofConfig.html#enabled\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceAntiSpoofConfig\"},{\"kind\":1024,\"name\":\"modelPath\",\"url\":\"interfaces/FaceAntiSpoofConfig.html#modelPath\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceAntiSpoofConfig\"},{\"kind\":1024,\"name\":\"skipFrames\",\"url\":\"interfaces/FaceAntiSpoofConfig.html#skipFrames\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceAntiSpoofConfig\"},{\"kind\":1024,\"name\":\"skipTime\",\"url\":\"interfaces/FaceAntiSpoofConfig.html#skipTime\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceAntiSpoofConfig\"},{\"kind\":256,\"name\":\"FaceLivenessConfig\",\"url\":\"interfaces/FaceLivenessConfig.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"enabled\",\"url\":\"interfaces/FaceLivenessConfig.html#enabled\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceLivenessConfig\"},{\"kind\":1024,\"name\":\"modelPath\",\"url\":\"interfaces/FaceLivenessConfig.html#modelPath\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceLivenessConfig\"},{\"kind\":1024,\"name\":\"skipFrames\",\"url\":\"interfaces/FaceLivenessConfig.html#skipFrames\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceLivenessConfig\"},{\"kind\":1024,\"name\":\"skipTime\",\"url\":\"interfaces/FaceLivenessConfig.html#skipTime\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceLivenessConfig\"},{\"kind\":256,\"name\":\"FaceGearConfig\",\"url\":\"interfaces/FaceGearConfig.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"minConfidence\",\"url\":\"interfaces/FaceGearConfig.html#minConfidence\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceGearConfig\"},{\"kind\":1024,\"name\":\"enabled\",\"url\":\"interfaces/FaceGearConfig.html#enabled\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceGearConfig\"},{\"kind\":1024,\"name\":\"modelPath\",\"url\":\"interfaces/FaceGearConfig.html#modelPath\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceGearConfig\"},{\"kind\":1024,\"name\":\"skipFrames\",\"url\":\"interfaces/FaceGearConfig.html#skipFrames\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceGearConfig\"},{\"kind\":1024,\"name\":\"skipTime\",\"url\":\"interfaces/FaceGearConfig.html#skipTime\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceGearConfig\"},{\"kind\":256,\"name\":\"FaceConfig\",\"url\":\"interfaces/FaceConfig.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"detector\",\"url\":\"interfaces/FaceConfig.html#detector\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceConfig\"},{\"kind\":1024,\"name\":\"mesh\",\"url\":\"interfaces/FaceConfig.html#mesh\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceConfig\"},{\"kind\":1024,\"name\":\"attention\",\"url\":\"interfaces/FaceConfig.html#attention\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceConfig\"},{\"kind\":1024,\"name\":\"iris\",\"url\":\"interfaces/FaceConfig.html#iris\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceConfig\"},{\"kind\":1024,\"name\":\"description\",\"url\":\"interfaces/FaceConfig.html#description\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceConfig\"},{\"kind\":1024,\"name\":\"emotion\",\"url\":\"interfaces/FaceConfig.html#emotion\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceConfig\"},{\"kind\":1024,\"name\":\"antispoof\",\"url\":\"interfaces/FaceConfig.html#antispoof\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceConfig\"},{\"kind\":1024,\"name\":\"liveness\",\"url\":\"interfaces/FaceConfig.html#liveness\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceConfig\"},{\"kind\":1024,\"name\":\"gear\",\"url\":\"interfaces/FaceConfig.html#gear\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceConfig\"},{\"kind\":1024,\"name\":\"enabled\",\"url\":\"interfaces/FaceConfig.html#enabled\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceConfig\"},{\"kind\":1024,\"name\":\"modelPath\",\"url\":\"interfaces/FaceConfig.html#modelPath\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceConfig\"},{\"kind\":1024,\"name\":\"skipFrames\",\"url\":\"interfaces/FaceConfig.html#skipFrames\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceConfig\"},{\"kind\":1024,\"name\":\"skipTime\",\"url\":\"interfaces/FaceConfig.html#skipTime\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceConfig\"},{\"kind\":256,\"name\":\"BodyConfig\",\"url\":\"interfaces/BodyConfig.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"maxDetected\",\"url\":\"interfaces/BodyConfig.html#maxDetected\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"BodyConfig\"},{\"kind\":1024,\"name\":\"minConfidence\",\"url\":\"interfaces/BodyConfig.html#minConfidence\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"BodyConfig\"},{\"kind\":1024,\"name\":\"enabled\",\"url\":\"interfaces/BodyConfig.html#enabled\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"BodyConfig\"},{\"kind\":1024,\"name\":\"modelPath\",\"url\":\"interfaces/BodyConfig.html#modelPath\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"BodyConfig\"},{\"kind\":1024,\"name\":\"skipFrames\",\"url\":\"interfaces/BodyConfig.html#skipFrames\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"BodyConfig\"},{\"kind\":1024,\"name\":\"skipTime\",\"url\":\"interfaces/BodyConfig.html#skipTime\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"BodyConfig\"},{\"kind\":256,\"name\":\"HandConfig\",\"url\":\"interfaces/HandConfig.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"rotation\",\"url\":\"interfaces/HandConfig.html#rotation\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"HandConfig\"},{\"kind\":1024,\"name\":\"minConfidence\",\"url\":\"interfaces/HandConfig.html#minConfidence\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"HandConfig\"},{\"kind\":1024,\"name\":\"iouThreshold\",\"url\":\"interfaces/HandConfig.html#iouThreshold\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"HandConfig\"},{\"kind\":1024,\"name\":\"maxDetected\",\"url\":\"interfaces/HandConfig.html#maxDetected\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"HandConfig\"},{\"kind\":1024,\"name\":\"landmarks\",\"url\":\"interfaces/HandConfig.html#landmarks\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"HandConfig\"},{\"kind\":1024,\"name\":\"detector\",\"url\":\"interfaces/HandConfig.html#detector\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"HandConfig\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"interfaces/HandConfig.html#__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-interface\",\"parent\":\"HandConfig\"},{\"kind\":1024,\"name\":\"modelPath\",\"url\":\"interfaces/HandConfig.html#__type.modelPath\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"HandConfig.__type\"},{\"kind\":1024,\"name\":\"skeleton\",\"url\":\"interfaces/HandConfig.html#skeleton\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"HandConfig\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"interfaces/HandConfig.html#__type-1\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-interface\",\"parent\":\"HandConfig\"},{\"kind\":1024,\"name\":\"modelPath\",\"url\":\"interfaces/HandConfig.html#__type-1.modelPath-2\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"HandConfig.__type\"},{\"kind\":1024,\"name\":\"enabled\",\"url\":\"interfaces/HandConfig.html#enabled\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"HandConfig\"},{\"kind\":1024,\"name\":\"modelPath\",\"url\":\"interfaces/HandConfig.html#modelPath-1\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"HandConfig\"},{\"kind\":1024,\"name\":\"skipFrames\",\"url\":\"interfaces/HandConfig.html#skipFrames\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"HandConfig\"},{\"kind\":1024,\"name\":\"skipTime\",\"url\":\"interfaces/HandConfig.html#skipTime\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"HandConfig\"},{\"kind\":256,\"name\":\"ObjectConfig\",\"url\":\"interfaces/ObjectConfig.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"minConfidence\",\"url\":\"interfaces/ObjectConfig.html#minConfidence\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"ObjectConfig\"},{\"kind\":1024,\"name\":\"iouThreshold\",\"url\":\"interfaces/ObjectConfig.html#iouThreshold\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"ObjectConfig\"},{\"kind\":1024,\"name\":\"maxDetected\",\"url\":\"interfaces/ObjectConfig.html#maxDetected\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"ObjectConfig\"},{\"kind\":1024,\"name\":\"enabled\",\"url\":\"interfaces/ObjectConfig.html#enabled\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"ObjectConfig\"},{\"kind\":1024,\"name\":\"modelPath\",\"url\":\"interfaces/ObjectConfig.html#modelPath\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"ObjectConfig\"},{\"kind\":1024,\"name\":\"skipFrames\",\"url\":\"interfaces/ObjectConfig.html#skipFrames\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"ObjectConfig\"},{\"kind\":1024,\"name\":\"skipTime\",\"url\":\"interfaces/ObjectConfig.html#skipTime\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"ObjectConfig\"},{\"kind\":256,\"name\":\"SegmentationConfig\",\"url\":\"interfaces/SegmentationConfig.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"blur\",\"url\":\"interfaces/SegmentationConfig.html#blur\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"SegmentationConfig\"},{\"kind\":1024,\"name\":\"enabled\",\"url\":\"interfaces/SegmentationConfig.html#enabled\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"SegmentationConfig\"},{\"kind\":1024,\"name\":\"modelPath\",\"url\":\"interfaces/SegmentationConfig.html#modelPath\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"SegmentationConfig\"},{\"kind\":1024,\"name\":\"skipFrames\",\"url\":\"interfaces/SegmentationConfig.html#skipFrames\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"SegmentationConfig\"},{\"kind\":1024,\"name\":\"skipTime\",\"url\":\"interfaces/SegmentationConfig.html#skipTime\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"SegmentationConfig\"},{\"kind\":256,\"name\":\"FilterConfig\",\"url\":\"interfaces/FilterConfig.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"enabled\",\"url\":\"interfaces/FilterConfig.html#enabled\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FilterConfig\"},{\"kind\":1024,\"name\":\"equalization\",\"url\":\"interfaces/FilterConfig.html#equalization\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FilterConfig\"},{\"kind\":1024,\"name\":\"width\",\"url\":\"interfaces/FilterConfig.html#width\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FilterConfig\"},{\"kind\":1024,\"name\":\"height\",\"url\":\"interfaces/FilterConfig.html#height\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FilterConfig\"},{\"kind\":1024,\"name\":\"return\",\"url\":\"interfaces/FilterConfig.html#return\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FilterConfig\"},{\"kind\":1024,\"name\":\"flip\",\"url\":\"interfaces/FilterConfig.html#flip\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FilterConfig\"},{\"kind\":1024,\"name\":\"brightness\",\"url\":\"interfaces/FilterConfig.html#brightness\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FilterConfig\"},{\"kind\":1024,\"name\":\"contrast\",\"url\":\"interfaces/FilterConfig.html#contrast\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FilterConfig\"},{\"kind\":1024,\"name\":\"sharpness\",\"url\":\"interfaces/FilterConfig.html#sharpness\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FilterConfig\"},{\"kind\":1024,\"name\":\"blur\",\"url\":\"interfaces/FilterConfig.html#blur\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FilterConfig\"},{\"kind\":1024,\"name\":\"saturation\",\"url\":\"interfaces/FilterConfig.html#saturation\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FilterConfig\"},{\"kind\":1024,\"name\":\"hue\",\"url\":\"interfaces/FilterConfig.html#hue\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FilterConfig\"},{\"kind\":1024,\"name\":\"negative\",\"url\":\"interfaces/FilterConfig.html#negative\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FilterConfig\"},{\"kind\":1024,\"name\":\"sepia\",\"url\":\"interfaces/FilterConfig.html#sepia\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FilterConfig\"},{\"kind\":1024,\"name\":\"vintage\",\"url\":\"interfaces/FilterConfig.html#vintage\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FilterConfig\"},{\"kind\":1024,\"name\":\"kodachrome\",\"url\":\"interfaces/FilterConfig.html#kodachrome\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FilterConfig\"},{\"kind\":1024,\"name\":\"technicolor\",\"url\":\"interfaces/FilterConfig.html#technicolor\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FilterConfig\"},{\"kind\":1024,\"name\":\"polaroid\",\"url\":\"interfaces/FilterConfig.html#polaroid\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FilterConfig\"},{\"kind\":1024,\"name\":\"pixelate\",\"url\":\"interfaces/FilterConfig.html#pixelate\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FilterConfig\"},{\"kind\":256,\"name\":\"GestureConfig\",\"url\":\"interfaces/GestureConfig.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"enabled\",\"url\":\"interfaces/GestureConfig.html#enabled\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"GestureConfig\"},{\"kind\":4194304,\"name\":\"BackendEnum\",\"url\":\"types/BackendEnum.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"WarmupEnum\",\"url\":\"types/WarmupEnum.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":256,\"name\":\"Config\",\"url\":\"interfaces/Config.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"backend\",\"url\":\"interfaces/Config.html#backend\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Config\"},{\"kind\":1024,\"name\":\"wasmPath\",\"url\":\"interfaces/Config.html#wasmPath\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Config\"},{\"kind\":1024,\"name\":\"wasmPlatformFetch\",\"url\":\"interfaces/Config.html#wasmPlatformFetch\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Config\"},{\"kind\":1024,\"name\":\"debug\",\"url\":\"interfaces/Config.html#debug\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Config\"},{\"kind\":1024,\"name\":\"async\",\"url\":\"interfaces/Config.html#async\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Config\"},{\"kind\":1024,\"name\":\"warmup\",\"url\":\"interfaces/Config.html#warmup\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Config\"},{\"kind\":1024,\"name\":\"modelBasePath\",\"url\":\"interfaces/Config.html#modelBasePath\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Config\"},{\"kind\":1024,\"name\":\"cacheModels\",\"url\":\"interfaces/Config.html#cacheModels\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Config\"},{\"kind\":1024,\"name\":\"validateModels\",\"url\":\"interfaces/Config.html#validateModels\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Config\"},{\"kind\":1024,\"name\":\"cacheSensitivity\",\"url\":\"interfaces/Config.html#cacheSensitivity\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Config\"},{\"kind\":1024,\"name\":\"flags\",\"url\":\"interfaces/Config.html#flags\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Config\"},{\"kind\":1024,\"name\":\"softwareKernels\",\"url\":\"interfaces/Config.html#softwareKernels\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Config\"},{\"kind\":1024,\"name\":\"deallocate\",\"url\":\"interfaces/Config.html#deallocate\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Config\"},{\"kind\":1024,\"name\":\"skipAllowed\",\"url\":\"interfaces/Config.html#skipAllowed\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Config\"},{\"kind\":1024,\"name\":\"filter\",\"url\":\"interfaces/Config.html#filter\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Config\"},{\"kind\":1024,\"name\":\"gesture\",\"url\":\"interfaces/Config.html#gesture\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Config\"},{\"kind\":1024,\"name\":\"face\",\"url\":\"interfaces/Config.html#face\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Config\"},{\"kind\":1024,\"name\":\"body\",\"url\":\"interfaces/Config.html#body\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Config\"},{\"kind\":1024,\"name\":\"hand\",\"url\":\"interfaces/Config.html#hand\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Config\"},{\"kind\":1024,\"name\":\"object\",\"url\":\"interfaces/Config.html#object\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Config\"},{\"kind\":1024,\"name\":\"segmentation\",\"url\":\"interfaces/Config.html#segmentation\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Config\"},{\"kind\":32,\"name\":\"defaults\",\"url\":\"variables/defaults.html\",\"classes\":\"tsd-kind-variable\"},{\"kind\":256,\"name\":\"FaceResult\",\"url\":\"interfaces/FaceResult.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"id\",\"url\":\"interfaces/FaceResult.html#id\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceResult\"},{\"kind\":1024,\"name\":\"score\",\"url\":\"interfaces/FaceResult.html#score\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceResult\"},{\"kind\":1024,\"name\":\"boxScore\",\"url\":\"interfaces/FaceResult.html#boxScore\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceResult\"},{\"kind\":1024,\"name\":\"faceScore\",\"url\":\"interfaces/FaceResult.html#faceScore\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceResult\"},{\"kind\":1024,\"name\":\"box\",\"url\":\"interfaces/FaceResult.html#box\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceResult\"},{\"kind\":1024,\"name\":\"boxRaw\",\"url\":\"interfaces/FaceResult.html#boxRaw\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceResult\"},{\"kind\":1024,\"name\":\"mesh\",\"url\":\"interfaces/FaceResult.html#mesh\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceResult\"},{\"kind\":1024,\"name\":\"meshRaw\",\"url\":\"interfaces/FaceResult.html#meshRaw\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceResult\"},{\"kind\":1024,\"name\":\"annotations\",\"url\":\"interfaces/FaceResult.html#annotations\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceResult\"},{\"kind\":1024,\"name\":\"age\",\"url\":\"interfaces/FaceResult.html#age\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceResult\"},{\"kind\":1024,\"name\":\"gender\",\"url\":\"interfaces/FaceResult.html#gender\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceResult\"},{\"kind\":1024,\"name\":\"genderScore\",\"url\":\"interfaces/FaceResult.html#genderScore\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceResult\"},{\"kind\":1024,\"name\":\"emotion\",\"url\":\"interfaces/FaceResult.html#emotion\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceResult\"},{\"kind\":1024,\"name\":\"race\",\"url\":\"interfaces/FaceResult.html#race\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceResult\"},{\"kind\":1024,\"name\":\"embedding\",\"url\":\"interfaces/FaceResult.html#embedding\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceResult\"},{\"kind\":1024,\"name\":\"iris\",\"url\":\"interfaces/FaceResult.html#iris\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceResult\"},{\"kind\":1024,\"name\":\"real\",\"url\":\"interfaces/FaceResult.html#real\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceResult\"},{\"kind\":1024,\"name\":\"live\",\"url\":\"interfaces/FaceResult.html#live\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceResult\"},{\"kind\":1024,\"name\":\"rotation\",\"url\":\"interfaces/FaceResult.html#rotation\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceResult\"},{\"kind\":1024,\"name\":\"tensor\",\"url\":\"interfaces/FaceResult.html#tensor\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceResult\"},{\"kind\":4194304,\"name\":\"BodyLandmarkPoseNet\",\"url\":\"types/BodyLandmarkPoseNet.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"BodyLandmarkMoveNet\",\"url\":\"types/BodyLandmarkMoveNet.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"BodyLandmarkEfficientNet\",\"url\":\"types/BodyLandmarkEfficientNet.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"BodyLandmarkBlazePose\",\"url\":\"types/BodyLandmarkBlazePose.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"BodyAnnotationBlazePose\",\"url\":\"types/BodyAnnotationBlazePose.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"BodyAnnotationEfficientPose\",\"url\":\"types/BodyAnnotationEfficientPose.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":256,\"name\":\"BodyKeypoint\",\"url\":\"interfaces/BodyKeypoint.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"part\",\"url\":\"interfaces/BodyKeypoint.html#part\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"BodyKeypoint\"},{\"kind\":1024,\"name\":\"position\",\"url\":\"interfaces/BodyKeypoint.html#position\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"BodyKeypoint\"},{\"kind\":1024,\"name\":\"positionRaw\",\"url\":\"interfaces/BodyKeypoint.html#positionRaw\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"BodyKeypoint\"},{\"kind\":1024,\"name\":\"distance\",\"url\":\"interfaces/BodyKeypoint.html#distance\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"BodyKeypoint\"},{\"kind\":1024,\"name\":\"score\",\"url\":\"interfaces/BodyKeypoint.html#score\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"BodyKeypoint\"},{\"kind\":256,\"name\":\"BodyResult\",\"url\":\"interfaces/BodyResult.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"id\",\"url\":\"interfaces/BodyResult.html#id\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"BodyResult\"},{\"kind\":1024,\"name\":\"score\",\"url\":\"interfaces/BodyResult.html#score\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"BodyResult\"},{\"kind\":1024,\"name\":\"box\",\"url\":\"interfaces/BodyResult.html#box\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"BodyResult\"},{\"kind\":1024,\"name\":\"boxRaw\",\"url\":\"interfaces/BodyResult.html#boxRaw\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"BodyResult\"},{\"kind\":1024,\"name\":\"keypoints\",\"url\":\"interfaces/BodyResult.html#keypoints\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"BodyResult\"},{\"kind\":1024,\"name\":\"annotations\",\"url\":\"interfaces/BodyResult.html#annotations\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"BodyResult\"},{\"kind\":256,\"name\":\"HandResult\",\"url\":\"interfaces/HandResult.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"id\",\"url\":\"interfaces/HandResult.html#id\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"HandResult\"},{\"kind\":1024,\"name\":\"score\",\"url\":\"interfaces/HandResult.html#score\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"HandResult\"},{\"kind\":1024,\"name\":\"boxScore\",\"url\":\"interfaces/HandResult.html#boxScore\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"HandResult\"},{\"kind\":1024,\"name\":\"fingerScore\",\"url\":\"interfaces/HandResult.html#fingerScore\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"HandResult\"},{\"kind\":1024,\"name\":\"box\",\"url\":\"interfaces/HandResult.html#box\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"HandResult\"},{\"kind\":1024,\"name\":\"boxRaw\",\"url\":\"interfaces/HandResult.html#boxRaw\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"HandResult\"},{\"kind\":1024,\"name\":\"keypoints\",\"url\":\"interfaces/HandResult.html#keypoints\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"HandResult\"},{\"kind\":1024,\"name\":\"label\",\"url\":\"interfaces/HandResult.html#label\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"HandResult\"},{\"kind\":1024,\"name\":\"annotations\",\"url\":\"interfaces/HandResult.html#annotations\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"HandResult\"},{\"kind\":1024,\"name\":\"landmarks\",\"url\":\"interfaces/HandResult.html#landmarks\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"HandResult\"},{\"kind\":256,\"name\":\"ObjectResult\",\"url\":\"interfaces/ObjectResult.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"id\",\"url\":\"interfaces/ObjectResult.html#id\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"ObjectResult\"},{\"kind\":1024,\"name\":\"score\",\"url\":\"interfaces/ObjectResult.html#score\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"ObjectResult\"},{\"kind\":1024,\"name\":\"class\",\"url\":\"interfaces/ObjectResult.html#class\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"ObjectResult\"},{\"kind\":1024,\"name\":\"label\",\"url\":\"interfaces/ObjectResult.html#label\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"ObjectResult\"},{\"kind\":1024,\"name\":\"box\",\"url\":\"interfaces/ObjectResult.html#box\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"ObjectResult\"},{\"kind\":1024,\"name\":\"boxRaw\",\"url\":\"interfaces/ObjectResult.html#boxRaw\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"ObjectResult\"},{\"kind\":4194304,\"name\":\"GestureResult\",\"url\":\"types/GestureResult.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":256,\"name\":\"PersonResult\",\"url\":\"interfaces/PersonResult.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"id\",\"url\":\"interfaces/PersonResult.html#id\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"PersonResult\"},{\"kind\":1024,\"name\":\"face\",\"url\":\"interfaces/PersonResult.html#face\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"PersonResult\"},{\"kind\":1024,\"name\":\"body\",\"url\":\"interfaces/PersonResult.html#body\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"PersonResult\"},{\"kind\":1024,\"name\":\"hands\",\"url\":\"interfaces/PersonResult.html#hands\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"PersonResult\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"interfaces/PersonResult.html#__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-interface\",\"parent\":\"PersonResult\"},{\"kind\":1024,\"name\":\"left\",\"url\":\"interfaces/PersonResult.html#__type.left\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"PersonResult.__type\"},{\"kind\":1024,\"name\":\"right\",\"url\":\"interfaces/PersonResult.html#__type.right\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"PersonResult.__type\"},{\"kind\":1024,\"name\":\"gestures\",\"url\":\"interfaces/PersonResult.html#gestures\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"PersonResult\"},{\"kind\":1024,\"name\":\"box\",\"url\":\"interfaces/PersonResult.html#box\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"PersonResult\"},{\"kind\":1024,\"name\":\"boxRaw\",\"url\":\"interfaces/PersonResult.html#boxRaw\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"PersonResult\"},{\"kind\":256,\"name\":\"Result\",\"url\":\"interfaces/Result.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"face\",\"url\":\"interfaces/Result.html#face\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Result\"},{\"kind\":1024,\"name\":\"body\",\"url\":\"interfaces/Result.html#body\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Result\"},{\"kind\":1024,\"name\":\"hand\",\"url\":\"interfaces/Result.html#hand\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Result\"},{\"kind\":1024,\"name\":\"gesture\",\"url\":\"interfaces/Result.html#gesture\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Result\"},{\"kind\":1024,\"name\":\"object\",\"url\":\"interfaces/Result.html#object\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Result\"},{\"kind\":1024,\"name\":\"performance\",\"url\":\"interfaces/Result.html#performance\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Result\"},{\"kind\":1024,\"name\":\"canvas\",\"url\":\"interfaces/Result.html#canvas\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Result\"},{\"kind\":1024,\"name\":\"timestamp\",\"url\":\"interfaces/Result.html#timestamp\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Result\"},{\"kind\":1024,\"name\":\"persons\",\"url\":\"interfaces/Result.html#persons\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Result\"},{\"kind\":1024,\"name\":\"error\",\"url\":\"interfaces/Result.html#error\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Result\"}],\"index\":{\"version\":\"2.3.9\",\"fields\":[\"name\",\"comment\"],\"fieldVectors\":[[\"name/0\",[0,61.413]],[\"comment/0\",[]],[\"name/1\",[1,46.75]],[\"comment/1\",[]],[\"name/2\",[2,50.427]],[\"comment/2\",[]],[\"name/3\",[3,52.94]],[\"comment/3\",[]],[\"name/4\",[4,56.305]],[\"comment/4\",[]],[\"name/5\",[5,61.413]],[\"comment/5\",[]],[\"name/6\",[6,61.413]],[\"comment/6\",[]],[\"name/7\",[7,31.624]],[\"comment/7\",[]],[\"name/8\",[8,50.427]],[\"comment/8\",[]],[\"name/9\",[9,48.42]],[\"comment/9\",[]],[\"name/10\",[10,61.413]],[\"comment/10\",[]],[\"name/11\",[11,52.94]],[\"comment/11\",[]],[\"name/12\",[12,56.305]],[\"comment/12\",[]],[\"name/13\",[7,31.624]],[\"comment/13\",[]],[\"name/14\",[9,48.42]],[\"comment/14\",[]],[\"name/15\",[7,31.624]],[\"comment/15\",[]],[\"name/16\",[13,48.42]],[\"comment/16\",[]],[\"name/17\",[7,31.624]],[\"comment/17\",[]],[\"name/18\",[14,48.42]],[\"comment/18\",[]],[\"name/19\",[7,31.624]],[\"comment/19\",[]],[\"name/20\",[15,50.427]],[\"comment/20\",[]],[\"name/21\",[7,31.624]],[\"comment/21\",[]],[\"name/22\",[16,50.427]],[\"comment/22\",[]],[\"name/23\",[7,31.624]],[\"comment/23\",[]],[\"name/24\",[17,50.427]],[\"comment/24\",[]],[\"name/25\",[7,31.624]],[\"comment/25\",[]],[\"name/26\",[18,56.305]],[\"comment/26\",[]],[\"name/27\",[7,31.624]],[\"comment/27\",[]],[\"name/28\",[19,52.94]],[\"comment/28\",[]],[\"name/29\",[7,31.624]],[\"comment/29\",[]],[\"name/30\",[20,56.305]],[\"comment/30\",[]],[\"name/31\",[21,56.305]],[\"comment/31\",[]],[\"name/32\",[22,61.413]],[\"comment/32\",[]],[\"name/33\",[23,61.413]],[\"comment/33\",[]],[\"name/34\",[24,56.305]],[\"comment/34\",[]],[\"name/35\",[25,61.413]],[\"comment/35\",[]],[\"name/36\",[26,61.413]],[\"comment/36\",[]],[\"name/37\",[27,56.305]],[\"comment/37\",[]],[\"name/38\",[28,56.305]],[\"comment/38\",[]],[\"name/39\",[29,61.413]],[\"comment/39\",[]],[\"name/40\",[30,50.427]],[\"comment/40\",[]],[\"name/41\",[7,31.624]],[\"comment/41\",[]],[\"name/42\",[31,48.42]],[\"comment/42\",[]],[\"name/43\",[7,31.624]],[\"comment/43\",[]],[\"name/44\",[32,52.94]],[\"comment/44\",[]],[\"name/45\",[7,31.624]],[\"comment/45\",[]],[\"name/46\",[7,31.624]],[\"comment/46\",[]],[\"name/47\",[33,56.305]],[\"comment/47\",[]],[\"name/48\",[31,48.42]],[\"comment/48\",[]],[\"name/49\",[30,50.427]],[\"comment/49\",[]],[\"name/50\",[34,61.413]],[\"comment/50\",[]],[\"name/51\",[35,56.305]],[\"comment/51\",[]],[\"name/52\",[36,52.94]],[\"comment/52\",[]],[\"name/53\",[37,61.413]],[\"comment/53\",[]],[\"name/54\",[38,61.413]],[\"comment/54\",[]],[\"name/55\",[39,61.413]],[\"comment/55\",[]],[\"name/56\",[40,56.305]],[\"comment/56\",[]],[\"name/57\",[41,52.94]],[\"comment/57\",[]],[\"name/58\",[42,61.413]],[\"comment/58\",[]],[\"name/59\",[43,61.413]],[\"comment/59\",[]],[\"name/60\",[44,56.305]],[\"comment/60\",[]],[\"name/61\",[45,56.305]],[\"comment/61\",[]],[\"name/62\",[46,61.413]],[\"comment/62\",[]],[\"name/63\",[47,61.413]],[\"comment/63\",[]],[\"name/64\",[48,61.413]],[\"comment/64\",[]],[\"name/65\",[49,61.413]],[\"comment/65\",[]],[\"name/66\",[50,61.413]],[\"comment/66\",[]],[\"name/67\",[32,52.94]],[\"comment/67\",[]],[\"name/68\",[31,48.42]],[\"comment/68\",[]],[\"name/69\",[30,50.427]],[\"comment/69\",[]],[\"name/70\",[32,52.94]],[\"comment/70\",[]],[\"name/71\",[7,31.624]],[\"comment/71\",[]],[\"name/72\",[33,56.305]],[\"comment/72\",[]],[\"name/73\",[31,48.42]],[\"comment/73\",[]],[\"name/74\",[30,50.427]],[\"comment/74\",[]],[\"name/75\",[51,61.413]],[\"comment/75\",[]],[\"name/76\",[52,61.413]],[\"comment/76\",[]],[\"name/77\",[12,56.305]],[\"comment/77\",[]],[\"name/78\",[18,56.305]],[\"comment/78\",[]],[\"name/79\",[9,48.42]],[\"comment/79\",[]],[\"name/80\",[19,52.94]],[\"comment/80\",[]],[\"name/81\",[20,56.305]],[\"comment/81\",[]],[\"name/82\",[13,48.42]],[\"comment/82\",[]],[\"name/83\",[14,48.42]],[\"comment/83\",[]],[\"name/84\",[15,50.427]],[\"comment/84\",[]],[\"name/85\",[17,50.427]],[\"comment/85\",[]],[\"name/86\",[16,50.427]],[\"comment/86\",[]],[\"name/87\",[53,56.305]],[\"comment/87\",[]],[\"name/88\",[27,56.305]],[\"comment/88\",[]],[\"name/89\",[41,52.94]],[\"comment/89\",[]],[\"name/90\",[54,61.413]],[\"comment/90\",[]],[\"name/91\",[28,56.305]],[\"comment/91\",[]],[\"name/92\",[53,56.305]],[\"comment/92\",[]],[\"name/93\",[1,46.75]],[\"comment/93\",[]],[\"name/94\",[55,61.413]],[\"comment/94\",[]],[\"name/95\",[56,56.305]],[\"comment/95\",[]],[\"name/96\",[57,61.413]],[\"comment/96\",[]],[\"name/97\",[58,61.413]],[\"comment/97\",[]],[\"name/98\",[59,61.413]],[\"comment/98\",[]],[\"name/99\",[60,61.413]],[\"comment/99\",[]],[\"name/100\",[61,61.413]],[\"comment/100\",[]],[\"name/101\",[62,61.413]],[\"comment/101\",[]],[\"name/102\",[63,50.427]],[\"comment/102\",[]],[\"name/103\",[64,61.413]],[\"comment/103\",[]],[\"name/104\",[65,61.413]],[\"comment/104\",[]],[\"name/105\",[66,61.413]],[\"comment/105\",[]],[\"name/106\",[67,61.413]],[\"comment/106\",[]],[\"name/107\",[68,61.413]],[\"comment/107\",[]],[\"name/108\",[69,61.413]],[\"comment/108\",[]],[\"name/109\",[70,61.413]],[\"comment/109\",[]],[\"name/110\",[71,61.413]],[\"comment/110\",[]],[\"name/111\",[72,56.305]],[\"comment/111\",[]],[\"name/112\",[73,61.413]],[\"comment/112\",[]],[\"name/113\",[74,61.413]],[\"comment/113\",[]],[\"name/114\",[75,61.413]],[\"comment/114\",[]],[\"name/115\",[36,52.94]],[\"comment/115\",[]],[\"name/116\",[76,56.305]],[\"comment/116\",[]],[\"name/117\",[77,56.305]],[\"comment/117\",[]],[\"name/118\",[78,61.413]],[\"comment/118\",[]],[\"name/119\",[79,61.413]],[\"comment/119\",[]],[\"name/120\",[80,61.413]],[\"comment/120\",[]],[\"name/121\",[81,61.413]],[\"comment/121\",[]],[\"name/122\",[82,61.413]],[\"comment/122\",[]],[\"name/123\",[83,61.413]],[\"comment/123\",[]],[\"name/124\",[84,61.413]],[\"comment/124\",[]],[\"name/125\",[85,61.413]],[\"comment/125\",[]],[\"name/126\",[77,56.305]],[\"comment/126\",[]],[\"name/127\",[44,56.305]],[\"comment/127\",[]],[\"name/128\",[86,61.413]],[\"comment/128\",[]],[\"name/129\",[87,56.305]],[\"comment/129\",[]],[\"name/130\",[88,61.413]],[\"comment/130\",[]],[\"name/131\",[89,61.413]],[\"comment/131\",[]],[\"name/132\",[90,61.413]],[\"comment/132\",[]],[\"name/133\",[8,50.427]],[\"comment/133\",[]],[\"name/134\",[1,46.75]],[\"comment/134\",[]],[\"name/135\",[91,46.75]],[\"comment/135\",[]],[\"name/136\",[92,61.413]],[\"comment/136\",[]],[\"name/137\",[93,61.413]],[\"comment/137\",[]],[\"name/138\",[94,61.413]],[\"comment/138\",[]],[\"name/139\",[95,61.413]],[\"comment/139\",[]],[\"name/140\",[96,61.413]],[\"comment/140\",[]],[\"name/141\",[97,61.413]],[\"comment/141\",[]],[\"name/142\",[98,61.413]],[\"comment/142\",[]],[\"name/143\",[99,61.413]],[\"comment/143\",[]],[\"name/144\",[100,56.305]],[\"comment/144\",[]],[\"name/145\",[101,61.413]],[\"comment/145\",[]],[\"name/146\",[102,61.413]],[\"comment/146\",[]],[\"name/147\",[103,61.413]],[\"comment/147\",[]],[\"name/148\",[104,61.413]],[\"comment/148\",[]],[\"name/149\",[105,61.413]],[\"comment/149\",[]],[\"name/150\",[106,61.413]],[\"comment/150\",[]],[\"name/151\",[107,61.413]],[\"comment/151\",[]],[\"name/152\",[108,61.413]],[\"comment/152\",[]],[\"name/153\",[109,56.305]],[\"comment/153\",[]],[\"name/154\",[110,61.413]],[\"comment/154\",[]],[\"name/155\",[111,61.413]],[\"comment/155\",[]],[\"name/156\",[112,61.413]],[\"comment/156\",[]],[\"name/157\",[113,61.413]],[\"comment/157\",[]],[\"name/158\",[114,61.413]],[\"comment/158\",[]],[\"name/159\",[115,61.413]],[\"comment/159\",[]],[\"name/160\",[116,61.413]],[\"comment/160\",[]],[\"name/161\",[117,61.413]],[\"comment/161\",[]],[\"name/162\",[118,61.413]],[\"comment/162\",[]],[\"name/163\",[119,61.413]],[\"comment/163\",[]],[\"name/164\",[19,52.94]],[\"comment/164\",[]],[\"name/165\",[120,61.413]],[\"comment/165\",[]],[\"name/166\",[121,61.413]],[\"comment/166\",[]],[\"name/167\",[122,61.413]],[\"comment/167\",[]],[\"name/168\",[123,61.413]],[\"comment/168\",[]],[\"name/169\",[124,61.413]],[\"comment/169\",[]],[\"name/170\",[125,61.413]],[\"comment/170\",[]],[\"name/171\",[126,61.413]],[\"comment/171\",[]],[\"name/172\",[127,61.413]],[\"comment/172\",[]],[\"name/173\",[128,61.413]],[\"comment/173\",[]],[\"name/174\",[129,61.413]],[\"comment/174\",[]],[\"name/175\",[130,61.413]],[\"comment/175\",[]],[\"name/176\",[131,61.413]],[\"comment/176\",[]],[\"name/177\",[132,61.413]],[\"comment/177\",[]],[\"name/178\",[133,61.413]],[\"comment/178\",[]],[\"name/179\",[134,61.413]],[\"comment/179\",[]],[\"name/180\",[135,61.413]],[\"comment/180\",[]],[\"name/181\",[136,61.413]],[\"comment/181\",[]],[\"name/182\",[137,61.413]],[\"comment/182\",[]],[\"name/183\",[138,61.413]],[\"comment/183\",[]],[\"name/184\",[139,61.413]],[\"comment/184\",[]],[\"name/185\",[140,61.413]],[\"comment/185\",[]],[\"name/186\",[141,61.413]],[\"comment/186\",[]],[\"name/187\",[142,61.413]],[\"comment/187\",[]],[\"name/188\",[143,61.413]],[\"comment/188\",[]],[\"name/189\",[144,61.413]],[\"comment/189\",[]],[\"name/190\",[145,61.413]],[\"comment/190\",[]],[\"name/191\",[146,61.413]],[\"comment/191\",[]],[\"name/192\",[147,61.413]],[\"comment/192\",[]],[\"name/193\",[148,61.413]],[\"comment/193\",[]],[\"name/194\",[149,61.413]],[\"comment/194\",[]],[\"name/195\",[150,61.413]],[\"comment/195\",[]],[\"name/196\",[151,61.413]],[\"comment/196\",[]],[\"name/197\",[152,61.413]],[\"comment/197\",[]],[\"name/198\",[153,61.413]],[\"comment/198\",[]],[\"name/199\",[154,61.413]],[\"comment/199\",[]],[\"name/200\",[155,61.413]],[\"comment/200\",[]],[\"name/201\",[156,61.413]],[\"comment/201\",[]],[\"name/202\",[157,61.413]],[\"comment/202\",[]],[\"name/203\",[158,61.413]],[\"comment/203\",[]],[\"name/204\",[159,61.413]],[\"comment/204\",[]],[\"name/205\",[160,61.413]],[\"comment/205\",[]],[\"name/206\",[161,61.413]],[\"comment/206\",[]],[\"name/207\",[162,61.413]],[\"comment/207\",[]],[\"name/208\",[163,61.413]],[\"comment/208\",[]],[\"name/209\",[164,61.413]],[\"comment/209\",[]],[\"name/210\",[165,61.413]],[\"comment/210\",[]],[\"name/211\",[166,61.413]],[\"comment/211\",[]],[\"name/212\",[167,61.413]],[\"comment/212\",[]],[\"name/213\",[168,61.413]],[\"comment/213\",[]],[\"name/214\",[169,61.413]],[\"comment/214\",[]],[\"name/215\",[170,61.413]],[\"comment/215\",[]],[\"name/216\",[171,61.413]],[\"comment/216\",[]],[\"name/217\",[172,61.413]],[\"comment/217\",[]],[\"name/218\",[173,61.413]],[\"comment/218\",[]],[\"name/219\",[174,61.413]],[\"comment/219\",[]],[\"name/220\",[175,61.413]],[\"comment/220\",[]],[\"name/221\",[176,61.413]],[\"comment/221\",[]],[\"name/222\",[177,61.413]],[\"comment/222\",[]],[\"name/223\",[178,61.413]],[\"comment/223\",[]],[\"name/224\",[179,61.413]],[\"comment/224\",[]],[\"name/225\",[180,61.413]],[\"comment/225\",[]],[\"name/226\",[181,61.413]],[\"comment/226\",[]],[\"name/227\",[182,61.413]],[\"comment/227\",[]],[\"name/228\",[183,61.413]],[\"comment/228\",[]],[\"name/229\",[184,61.413]],[\"comment/229\",[]],[\"name/230\",[185,61.413]],[\"comment/230\",[]],[\"name/231\",[186,61.413]],[\"comment/231\",[]],[\"name/232\",[187,61.413]],[\"comment/232\",[]],[\"name/233\",[188,61.413]],[\"comment/233\",[]],[\"name/234\",[189,61.413]],[\"comment/234\",[]],[\"name/235\",[190,61.413]],[\"comment/235\",[]],[\"name/236\",[191,61.413]],[\"comment/236\",[]],[\"name/237\",[192,61.413]],[\"comment/237\",[]],[\"name/238\",[193,61.413]],[\"comment/238\",[]],[\"name/239\",[194,61.413]],[\"comment/239\",[]],[\"name/240\",[195,61.413]],[\"comment/240\",[]],[\"name/241\",[196,61.413]],[\"comment/241\",[]],[\"name/242\",[197,61.413]],[\"comment/242\",[]],[\"name/243\",[198,61.413]],[\"comment/243\",[]],[\"name/244\",[199,61.413]],[\"comment/244\",[]],[\"name/245\",[200,61.413]],[\"comment/245\",[]],[\"name/246\",[201,61.413]],[\"comment/246\",[]],[\"name/247\",[202,61.413]],[\"comment/247\",[]],[\"name/248\",[203,61.413]],[\"comment/248\",[]],[\"name/249\",[204,61.413]],[\"comment/249\",[]],[\"name/250\",[205,61.413]],[\"comment/250\",[]],[\"name/251\",[206,61.413]],[\"comment/251\",[]],[\"name/252\",[207,61.413]],[\"comment/252\",[]],[\"name/253\",[208,61.413]],[\"comment/253\",[]],[\"name/254\",[209,61.413]],[\"comment/254\",[]],[\"name/255\",[210,61.413]],[\"comment/255\",[]],[\"name/256\",[211,61.413]],[\"comment/256\",[]],[\"name/257\",[212,61.413]],[\"comment/257\",[]],[\"name/258\",[213,61.413]],[\"comment/258\",[]],[\"name/259\",[214,61.413]],[\"comment/259\",[]],[\"name/260\",[215,61.413]],[\"comment/260\",[]],[\"name/261\",[216,61.413]],[\"comment/261\",[]],[\"name/262\",[217,61.413]],[\"comment/262\",[]],[\"name/263\",[218,61.413]],[\"comment/263\",[]],[\"name/264\",[219,61.413]],[\"comment/264\",[]],[\"name/265\",[220,61.413]],[\"comment/265\",[]],[\"name/266\",[221,61.413]],[\"comment/266\",[]],[\"name/267\",[222,61.413]],[\"comment/267\",[]],[\"name/268\",[223,61.413]],[\"comment/268\",[]],[\"name/269\",[224,61.413]],[\"comment/269\",[]],[\"name/270\",[225,61.413]],[\"comment/270\",[]],[\"name/271\",[226,61.413]],[\"comment/271\",[]],[\"name/272\",[227,61.413]],[\"comment/272\",[]],[\"name/273\",[228,61.413]],[\"comment/273\",[]],[\"name/274\",[229,61.413]],[\"comment/274\",[]],[\"name/275\",[230,61.413]],[\"comment/275\",[]],[\"name/276\",[231,61.413]],[\"comment/276\",[]],[\"name/277\",[232,61.413]],[\"comment/277\",[]],[\"name/278\",[233,61.413]],[\"comment/278\",[]],[\"name/279\",[234,61.413]],[\"comment/279\",[]],[\"name/280\",[235,61.413]],[\"comment/280\",[]],[\"name/281\",[236,61.413]],[\"comment/281\",[]],[\"name/282\",[237,61.413]],[\"comment/282\",[]],[\"name/283\",[238,61.413]],[\"comment/283\",[]],[\"name/284\",[239,61.413]],[\"comment/284\",[]],[\"name/285\",[240,61.413]],[\"comment/285\",[]],[\"name/286\",[241,61.413]],[\"comment/286\",[]],[\"name/287\",[242,61.413]],[\"comment/287\",[]],[\"name/288\",[243,61.413]],[\"comment/288\",[]],[\"name/289\",[244,61.413]],[\"comment/289\",[]],[\"name/290\",[245,61.413]],[\"comment/290\",[]],[\"name/291\",[7,31.624]],[\"comment/291\",[]],[\"name/292\",[246,56.305]],[\"comment/292\",[]],[\"name/293\",[247,56.305]],[\"comment/293\",[]],[\"name/294\",[248,61.413]],[\"comment/294\",[]],[\"name/295\",[249,61.413]],[\"comment/295\",[]],[\"name/296\",[7,31.624]],[\"comment/296\",[]],[\"name/297\",[246,56.305]],[\"comment/297\",[]],[\"name/298\",[247,56.305]],[\"comment/298\",[]],[\"name/299\",[250,61.413]],[\"comment/299\",[]],[\"name/300\",[251,61.413]],[\"comment/300\",[]],[\"name/301\",[252,61.413]],[\"comment/301\",[]],[\"name/302\",[253,61.413]],[\"comment/302\",[]],[\"name/303\",[8,50.427]],[\"comment/303\",[]],[\"name/304\",[254,61.413]],[\"comment/304\",[]],[\"name/305\",[255,61.413]],[\"comment/305\",[]],[\"name/306\",[1,46.75]],[\"comment/306\",[]],[\"name/307\",[256,61.413]],[\"comment/307\",[]],[\"name/308\",[257,61.413]],[\"comment/308\",[]],[\"name/309\",[258,61.413]],[\"comment/309\",[]],[\"name/310\",[259,61.413]],[\"comment/310\",[]],[\"name/311\",[260,61.413]],[\"comment/311\",[]],[\"name/312\",[261,61.413]],[\"comment/312\",[]],[\"name/313\",[262,61.413]],[\"comment/313\",[]],[\"name/314\",[7,31.624]],[\"comment/314\",[]],[\"name/315\",[263,61.413]],[\"comment/315\",[]],[\"name/316\",[7,31.624]],[\"comment/316\",[]],[\"name/317\",[264,61.413]],[\"comment/317\",[]],[\"name/318\",[7,31.624]],[\"comment/318\",[]],[\"name/319\",[41,52.94]],[\"comment/319\",[]],[\"name/320\",[265,61.413]],[\"comment/320\",[]],[\"name/321\",[266,61.413]],[\"comment/321\",[]],[\"name/322\",[267,61.413]],[\"comment/322\",[]],[\"name/323\",[268,61.413]],[\"comment/323\",[]],[\"name/324\",[269,61.413]],[\"comment/324\",[]],[\"name/325\",[270,61.413]],[\"comment/325\",[]],[\"name/326\",[271,61.413]],[\"comment/326\",[]],[\"name/327\",[109,56.305]],[\"comment/327\",[]],[\"name/328\",[100,56.305]],[\"comment/328\",[]],[\"name/329\",[272,61.413]],[\"comment/329\",[]],[\"name/330\",[273,61.413]],[\"comment/330\",[]],[\"name/331\",[274,61.413]],[\"comment/331\",[]],[\"name/332\",[275,61.413]],[\"comment/332\",[]],[\"name/333\",[276,61.413]],[\"comment/333\",[]],[\"name/334\",[277,61.413]],[\"comment/334\",[]],[\"name/335\",[278,61.413]],[\"comment/335\",[]],[\"name/336\",[279,61.413]],[\"comment/336\",[]],[\"name/337\",[280,61.413]],[\"comment/337\",[]],[\"name/338\",[281,61.413]],[\"comment/338\",[]],[\"name/339\",[282,61.413]],[\"comment/339\",[]],[\"name/340\",[283,61.413]],[\"comment/340\",[]],[\"name/341\",[284,61.413]],[\"comment/341\",[]],[\"name/342\",[285,61.413]],[\"comment/342\",[]],[\"name/343\",[286,61.413]],[\"comment/343\",[]],[\"name/344\",[287,61.413]],[\"comment/344\",[]],[\"name/345\",[288,61.413]],[\"comment/345\",[]],[\"name/346\",[289,61.413]],[\"comment/346\",[]],[\"name/347\",[290,61.413]],[\"comment/347\",[]],[\"name/348\",[291,61.413]],[\"comment/348\",[]],[\"name/349\",[292,61.413]],[\"comment/349\",[]],[\"name/350\",[293,61.413]],[\"comment/350\",[]],[\"name/351\",[294,61.413]],[\"comment/351\",[]],[\"name/352\",[295,61.413]],[\"comment/352\",[]],[\"name/353\",[296,61.413]],[\"comment/353\",[]],[\"name/354\",[297,61.413]],[\"comment/354\",[]],[\"name/355\",[298,61.413]],[\"comment/355\",[]],[\"name/356\",[299,46.75]],[\"comment/356\",[]],[\"name/357\",[300,61.413]],[\"comment/357\",[]],[\"name/358\",[11,52.94]],[\"comment/358\",[]],[\"name/359\",[11,52.94]],[\"comment/359\",[]],[\"name/360\",[1,46.75]],[\"comment/360\",[]],[\"name/361\",[301,61.413]],[\"comment/361\",[]],[\"name/362\",[302,61.413]],[\"comment/362\",[]],[\"name/363\",[303,61.413]],[\"comment/363\",[]],[\"name/364\",[304,61.413]],[\"comment/364\",[]],[\"name/365\",[305,61.413]],[\"comment/365\",[]],[\"name/366\",[306,61.413]],[\"comment/366\",[]],[\"name/367\",[307,61.413]],[\"comment/367\",[]],[\"name/368\",[308,56.305]],[\"comment/368\",[]],[\"name/369\",[309,61.413]],[\"comment/369\",[]],[\"name/370\",[7,31.624]],[\"comment/370\",[]],[\"name/371\",[2,50.427]],[\"comment/371\",[]],[\"name/372\",[310,61.413]],[\"comment/372\",[]],[\"name/373\",[311,61.413]],[\"comment/373\",[]],[\"name/374\",[312,61.413]],[\"comment/374\",[]],[\"name/375\",[7,31.624]],[\"comment/375\",[]],[\"name/376\",[2,50.427]],[\"comment/376\",[]],[\"name/377\",[313,61.413]],[\"comment/377\",[]],[\"name/378\",[314,61.413]],[\"comment/378\",[]],[\"name/379\",[7,31.624]],[\"comment/379\",[]],[\"name/380\",[315,52.94]],[\"comment/380\",[]],[\"name/381\",[316,50.427]],[\"comment/381\",[]],[\"name/382\",[317,61.413]],[\"comment/382\",[]],[\"name/383\",[318,61.413]],[\"comment/383\",[]],[\"name/384\",[319,61.413]],[\"comment/384\",[]],[\"name/385\",[7,31.624]],[\"comment/385\",[]],[\"name/386\",[315,52.94]],[\"comment/386\",[]],[\"name/387\",[316,50.427]],[\"comment/387\",[]],[\"name/388\",[2,50.427]],[\"comment/388\",[]],[\"name/389\",[320,61.413]],[\"comment/389\",[]],[\"name/390\",[321,61.413]],[\"comment/390\",[]],[\"name/391\",[7,31.624]],[\"comment/391\",[]],[\"name/392\",[315,52.94]],[\"comment/392\",[]],[\"name/393\",[316,50.427]],[\"comment/393\",[]],[\"name/394\",[322,61.413]],[\"comment/394\",[]],[\"name/395\",[323,61.413]],[\"comment/395\",[]],[\"name/396\",[7,31.624]],[\"comment/396\",[]],[\"name/397\",[324,61.413]],[\"comment/397\",[]],[\"name/398\",[325,56.305]],[\"comment/398\",[]],[\"name/399\",[326,61.413]],[\"comment/399\",[]],[\"name/400\",[9,48.42]],[\"comment/400\",[]],[\"name/401\",[35,56.305]],[\"comment/401\",[]],[\"name/402\",[327,61.413]],[\"comment/402\",[]],[\"name/403\",[328,61.413]],[\"comment/403\",[]],[\"name/404\",[329,61.413]],[\"comment/404\",[]],[\"name/405\",[330,61.413]],[\"comment/405\",[]],[\"name/406\",[331,61.413]],[\"comment/406\",[]],[\"name/407\",[332,61.413]],[\"comment/407\",[]],[\"name/408\",[333,61.413]],[\"comment/408\",[]],[\"name/409\",[63,50.427]],[\"comment/409\",[]],[\"name/410\",[334,61.413]],[\"comment/410\",[]],[\"name/411\",[335,61.413]],[\"comment/411\",[]],[\"name/412\",[336,61.413]],[\"comment/412\",[]],[\"name/413\",[337,61.413]],[\"comment/413\",[]],[\"name/414\",[338,56.305]],[\"comment/414\",[]],[\"name/415\",[339,56.305]],[\"comment/415\",[]],[\"name/416\",[340,61.413]],[\"comment/416\",[]],[\"name/417\",[341,61.413]],[\"comment/417\",[]],[\"name/418\",[342,61.413]],[\"comment/418\",[]],[\"name/419\",[343,61.413]],[\"comment/419\",[]],[\"name/420\",[40,56.305]],[\"comment/420\",[]],[\"name/421\",[1,46.75]],[\"comment/421\",[]],[\"name/422\",[3,52.94]],[\"comment/422\",[]],[\"name/423\",[344,56.305]],[\"comment/423\",[]],[\"name/424\",[345,61.413]],[\"comment/424\",[]],[\"name/425\",[346,61.413]],[\"comment/425\",[]],[\"name/426\",[347,61.413]],[\"comment/426\",[]],[\"name/427\",[348,61.413]],[\"comment/427\",[]],[\"name/428\",[349,61.413]],[\"comment/428\",[]],[\"name/429\",[350,52.94]],[\"comment/429\",[]],[\"name/430\",[351,61.413]],[\"comment/430\",[]],[\"name/431\",[352,52.94]],[\"comment/431\",[]],[\"name/432\",[353,52.94]],[\"comment/432\",[]],[\"name/433\",[354,61.413]],[\"comment/433\",[]],[\"name/434\",[355,61.413]],[\"comment/434\",[]],[\"name/435\",[356,61.413]],[\"comment/435\",[]],[\"name/436\",[357,61.413]],[\"comment/436\",[]],[\"name/437\",[358,61.413]],[\"comment/437\",[]],[\"name/438\",[344,56.305]],[\"comment/438\",[]],[\"name/439\",[359,56.305]],[\"comment/439\",[]],[\"name/440\",[360,61.413]],[\"comment/440\",[]],[\"name/441\",[361,61.413]],[\"comment/441\",[]],[\"name/442\",[352,52.94]],[\"comment/442\",[]],[\"name/443\",[353,52.94]],[\"comment/443\",[]],[\"name/444\",[362,61.413]],[\"comment/444\",[]],[\"name/445\",[87,56.305]],[\"comment/445\",[]],[\"name/446\",[363,61.413]],[\"comment/446\",[]],[\"name/447\",[364,61.413]],[\"comment/447\",[]],[\"name/448\",[365,61.413]],[\"comment/448\",[]],[\"name/449\",[366,61.413]],[\"comment/449\",[]],[\"name/450\",[21,56.305]],[\"comment/450\",[]],[\"name/451\",[367,61.413]],[\"comment/451\",[]],[\"name/452\",[368,61.413]],[\"comment/452\",[]],[\"name/453\",[369,61.413]],[\"comment/453\",[]],[\"name/454\",[370,61.413]],[\"comment/454\",[]],[\"name/455\",[371,61.413]],[\"comment/455\",[]],[\"name/456\",[372,61.413]],[\"comment/456\",[]],[\"name/457\",[373,61.413]],[\"comment/457\",[]],[\"name/458\",[374,36.846]],[\"comment/458\",[]],[\"name/459\",[375,36.846]],[\"comment/459\",[]],[\"name/460\",[376,38.059]],[\"comment/460\",[]],[\"name/461\",[377,38.059]],[\"comment/461\",[]],[\"name/462\",[378,61.413]],[\"comment/462\",[]],[\"name/463\",[379,52.94]],[\"comment/463\",[]],[\"name/464\",[380,50.427]],[\"comment/464\",[]],[\"name/465\",[381,45.319]],[\"comment/465\",[]],[\"name/466\",[382,52.94]],[\"comment/466\",[]],[\"name/467\",[383,61.413]],[\"comment/467\",[]],[\"name/468\",[384,56.305]],[\"comment/468\",[]],[\"name/469\",[374,36.846]],[\"comment/469\",[]],[\"name/470\",[375,36.846]],[\"comment/470\",[]],[\"name/471\",[376,38.059]],[\"comment/471\",[]],[\"name/472\",[377,38.059]],[\"comment/472\",[]],[\"name/473\",[385,61.413]],[\"comment/473\",[]],[\"name/474\",[386,61.413]],[\"comment/474\",[]],[\"name/475\",[374,36.846]],[\"comment/475\",[]],[\"name/476\",[375,36.846]],[\"comment/476\",[]],[\"name/477\",[376,38.059]],[\"comment/477\",[]],[\"name/478\",[377,38.059]],[\"comment/478\",[]],[\"name/479\",[387,61.413]],[\"comment/479\",[]],[\"name/480\",[374,36.846]],[\"comment/480\",[]],[\"name/481\",[375,36.846]],[\"comment/481\",[]],[\"name/482\",[376,38.059]],[\"comment/482\",[]],[\"name/483\",[377,38.059]],[\"comment/483\",[]],[\"name/484\",[388,61.413]],[\"comment/484\",[]],[\"name/485\",[374,36.846]],[\"comment/485\",[]],[\"name/486\",[375,36.846]],[\"comment/486\",[]],[\"name/487\",[376,38.059]],[\"comment/487\",[]],[\"name/488\",[377,38.059]],[\"comment/488\",[]],[\"name/489\",[389,61.413]],[\"comment/489\",[]],[\"name/490\",[381,45.319]],[\"comment/490\",[]],[\"name/491\",[374,36.846]],[\"comment/491\",[]],[\"name/492\",[375,36.846]],[\"comment/492\",[]],[\"name/493\",[376,38.059]],[\"comment/493\",[]],[\"name/494\",[377,38.059]],[\"comment/494\",[]],[\"name/495\",[390,61.413]],[\"comment/495\",[]],[\"name/496\",[381,45.319]],[\"comment/496\",[]],[\"name/497\",[374,36.846]],[\"comment/497\",[]],[\"name/498\",[375,36.846]],[\"comment/498\",[]],[\"name/499\",[376,38.059]],[\"comment/499\",[]],[\"name/500\",[377,38.059]],[\"comment/500\",[]],[\"name/501\",[391,61.413]],[\"comment/501\",[]],[\"name/502\",[374,36.846]],[\"comment/502\",[]],[\"name/503\",[375,36.846]],[\"comment/503\",[]],[\"name/504\",[376,38.059]],[\"comment/504\",[]],[\"name/505\",[377,38.059]],[\"comment/505\",[]],[\"name/506\",[392,61.413]],[\"comment/506\",[]],[\"name/507\",[374,36.846]],[\"comment/507\",[]],[\"name/508\",[375,36.846]],[\"comment/508\",[]],[\"name/509\",[376,38.059]],[\"comment/509\",[]],[\"name/510\",[377,38.059]],[\"comment/510\",[]],[\"name/511\",[393,61.413]],[\"comment/511\",[]],[\"name/512\",[381,45.319]],[\"comment/512\",[]],[\"name/513\",[374,36.846]],[\"comment/513\",[]],[\"name/514\",[375,36.846]],[\"comment/514\",[]],[\"name/515\",[376,38.059]],[\"comment/515\",[]],[\"name/516\",[377,38.059]],[\"comment/516\",[]],[\"name/517\",[394,61.413]],[\"comment/517\",[]],[\"name/518\",[395,56.305]],[\"comment/518\",[]],[\"name/519\",[396,56.305]],[\"comment/519\",[]],[\"name/520\",[397,61.413]],[\"comment/520\",[]],[\"name/521\",[398,56.305]],[\"comment/521\",[]],[\"name/522\",[399,61.413]],[\"comment/522\",[]],[\"name/523\",[63,50.427]],[\"comment/523\",[]],[\"name/524\",[76,56.305]],[\"comment/524\",[]],[\"name/525\",[72,56.305]],[\"comment/525\",[]],[\"name/526\",[56,56.305]],[\"comment/526\",[]],[\"name/527\",[374,36.846]],[\"comment/527\",[]],[\"name/528\",[375,36.846]],[\"comment/528\",[]],[\"name/529\",[376,38.059]],[\"comment/529\",[]],[\"name/530\",[377,38.059]],[\"comment/530\",[]],[\"name/531\",[400,61.413]],[\"comment/531\",[]],[\"name/532\",[380,50.427]],[\"comment/532\",[]],[\"name/533\",[381,45.319]],[\"comment/533\",[]],[\"name/534\",[374,36.846]],[\"comment/534\",[]],[\"name/535\",[375,36.846]],[\"comment/535\",[]],[\"name/536\",[376,38.059]],[\"comment/536\",[]],[\"name/537\",[377,38.059]],[\"comment/537\",[]],[\"name/538\",[401,61.413]],[\"comment/538\",[]],[\"name/539\",[379,52.94]],[\"comment/539\",[]],[\"name/540\",[381,45.319]],[\"comment/540\",[]],[\"name/541\",[382,52.94]],[\"comment/541\",[]],[\"name/542\",[380,50.427]],[\"comment/542\",[]],[\"name/543\",[402,56.305]],[\"comment/543\",[]],[\"name/544\",[395,56.305]],[\"comment/544\",[]],[\"name/545\",[7,31.624]],[\"comment/545\",[]],[\"name/546\",[375,36.846]],[\"comment/546\",[]],[\"name/547\",[403,61.413]],[\"comment/547\",[]],[\"name/548\",[7,31.624]],[\"comment/548\",[]],[\"name/549\",[375,36.846]],[\"comment/549\",[]],[\"name/550\",[374,36.846]],[\"comment/550\",[]],[\"name/551\",[375,36.846]],[\"comment/551\",[]],[\"name/552\",[376,38.059]],[\"comment/552\",[]],[\"name/553\",[377,38.059]],[\"comment/553\",[]],[\"name/554\",[404,61.413]],[\"comment/554\",[]],[\"name/555\",[381,45.319]],[\"comment/555\",[]],[\"name/556\",[382,52.94]],[\"comment/556\",[]],[\"name/557\",[380,50.427]],[\"comment/557\",[]],[\"name/558\",[374,36.846]],[\"comment/558\",[]],[\"name/559\",[375,36.846]],[\"comment/559\",[]],[\"name/560\",[376,38.059]],[\"comment/560\",[]],[\"name/561\",[377,38.059]],[\"comment/561\",[]],[\"name/562\",[405,61.413]],[\"comment/562\",[]],[\"name/563\",[406,56.305]],[\"comment/563\",[]],[\"name/564\",[374,36.846]],[\"comment/564\",[]],[\"name/565\",[375,36.846]],[\"comment/565\",[]],[\"name/566\",[376,38.059]],[\"comment/566\",[]],[\"name/567\",[377,38.059]],[\"comment/567\",[]],[\"name/568\",[407,61.413]],[\"comment/568\",[]],[\"name/569\",[374,36.846]],[\"comment/569\",[]],[\"name/570\",[408,61.413]],[\"comment/570\",[]],[\"name/571\",[352,52.94]],[\"comment/571\",[]],[\"name/572\",[353,52.94]],[\"comment/572\",[]],[\"name/573\",[384,56.305]],[\"comment/573\",[]],[\"name/574\",[409,61.413]],[\"comment/574\",[]],[\"name/575\",[410,61.413]],[\"comment/575\",[]],[\"name/576\",[411,61.413]],[\"comment/576\",[]],[\"name/577\",[412,61.413]],[\"comment/577\",[]],[\"name/578\",[406,56.305]],[\"comment/578\",[]],[\"name/579\",[413,61.413]],[\"comment/579\",[]],[\"name/580\",[414,61.413]],[\"comment/580\",[]],[\"name/581\",[415,61.413]],[\"comment/581\",[]],[\"name/582\",[416,61.413]],[\"comment/582\",[]],[\"name/583\",[417,61.413]],[\"comment/583\",[]],[\"name/584\",[418,61.413]],[\"comment/584\",[]],[\"name/585\",[419,61.413]],[\"comment/585\",[]],[\"name/586\",[420,61.413]],[\"comment/586\",[]],[\"name/587\",[421,61.413]],[\"comment/587\",[]],[\"name/588\",[422,61.413]],[\"comment/588\",[]],[\"name/589\",[374,36.846]],[\"comment/589\",[]],[\"name/590\",[423,61.413]],[\"comment/590\",[]],[\"name/591\",[424,61.413]],[\"comment/591\",[]],[\"name/592\",[3,52.94]],[\"comment/592\",[]],[\"name/593\",[316,50.427]],[\"comment/593\",[]],[\"name/594\",[425,61.413]],[\"comment/594\",[]],[\"name/595\",[426,61.413]],[\"comment/595\",[]],[\"name/596\",[359,56.305]],[\"comment/596\",[]],[\"name/597\",[427,61.413]],[\"comment/597\",[]],[\"name/598\",[45,56.305]],[\"comment/598\",[]],[\"name/599\",[428,61.413]],[\"comment/599\",[]],[\"name/600\",[429,61.413]],[\"comment/600\",[]],[\"name/601\",[430,61.413]],[\"comment/601\",[]],[\"name/602\",[431,61.413]],[\"comment/602\",[]],[\"name/603\",[325,56.305]],[\"comment/603\",[]],[\"name/604\",[432,61.413]],[\"comment/604\",[]],[\"name/605\",[433,61.413]],[\"comment/605\",[]],[\"name/606\",[434,61.413]],[\"comment/606\",[]],[\"name/607\",[308,56.305]],[\"comment/607\",[]],[\"name/608\",[16,50.427]],[\"comment/608\",[]],[\"name/609\",[13,48.42]],[\"comment/609\",[]],[\"name/610\",[14,48.42]],[\"comment/610\",[]],[\"name/611\",[15,50.427]],[\"comment/611\",[]],[\"name/612\",[17,50.427]],[\"comment/612\",[]],[\"name/613\",[36,52.94]],[\"comment/613\",[]],[\"name/614\",[435,61.413]],[\"comment/614\",[]],[\"name/615\",[436,61.413]],[\"comment/615\",[]],[\"name/616\",[91,46.75]],[\"comment/616\",[]],[\"name/617\",[437,48.42]],[\"comment/617\",[]],[\"name/618\",[438,56.305]],[\"comment/618\",[]],[\"name/619\",[439,61.413]],[\"comment/619\",[]],[\"name/620\",[299,46.75]],[\"comment/620\",[]],[\"name/621\",[440,48.42]],[\"comment/621\",[]],[\"name/622\",[396,56.305]],[\"comment/622\",[]],[\"name/623\",[441,61.413]],[\"comment/623\",[]],[\"name/624\",[442,52.94]],[\"comment/624\",[]],[\"name/625\",[443,61.413]],[\"comment/625\",[]],[\"name/626\",[338,56.305]],[\"comment/626\",[]],[\"name/627\",[444,61.413]],[\"comment/627\",[]],[\"name/628\",[63,50.427]],[\"comment/628\",[]],[\"name/629\",[339,56.305]],[\"comment/629\",[]],[\"name/630\",[445,61.413]],[\"comment/630\",[]],[\"name/631\",[398,56.305]],[\"comment/631\",[]],[\"name/632\",[446,61.413]],[\"comment/632\",[]],[\"name/633\",[447,61.413]],[\"comment/633\",[]],[\"name/634\",[379,52.94]],[\"comment/634\",[]],[\"name/635\",[8,50.427]],[\"comment/635\",[]],[\"name/636\",[448,61.413]],[\"comment/636\",[]],[\"name/637\",[449,61.413]],[\"comment/637\",[]],[\"name/638\",[450,61.413]],[\"comment/638\",[]],[\"name/639\",[451,61.413]],[\"comment/639\",[]],[\"name/640\",[452,61.413]],[\"comment/640\",[]],[\"name/641\",[453,61.413]],[\"comment/641\",[]],[\"name/642\",[454,61.413]],[\"comment/642\",[]],[\"name/643\",[455,61.413]],[\"comment/643\",[]],[\"name/644\",[456,61.413]],[\"comment/644\",[]],[\"name/645\",[457,61.413]],[\"comment/645\",[]],[\"name/646\",[31,48.42]],[\"comment/646\",[]],[\"name/647\",[437,48.42]],[\"comment/647\",[]],[\"name/648\",[458,61.413]],[\"comment/648\",[]],[\"name/649\",[91,46.75]],[\"comment/649\",[]],[\"name/650\",[437,48.42]],[\"comment/650\",[]],[\"name/651\",[299,46.75]],[\"comment/651\",[]],[\"name/652\",[440,48.42]],[\"comment/652\",[]],[\"name/653\",[459,56.305]],[\"comment/653\",[]],[\"name/654\",[442,52.94]],[\"comment/654\",[]],[\"name/655\",[460,61.413]],[\"comment/655\",[]],[\"name/656\",[91,46.75]],[\"comment/656\",[]],[\"name/657\",[437,48.42]],[\"comment/657\",[]],[\"name/658\",[438,56.305]],[\"comment/658\",[]],[\"name/659\",[461,61.413]],[\"comment/659\",[]],[\"name/660\",[299,46.75]],[\"comment/660\",[]],[\"name/661\",[440,48.42]],[\"comment/661\",[]],[\"name/662\",[459,56.305]],[\"comment/662\",[]],[\"name/663\",[350,52.94]],[\"comment/663\",[]],[\"name/664\",[442,52.94]],[\"comment/664\",[]],[\"name/665\",[402,56.305]],[\"comment/665\",[]],[\"name/666\",[462,61.413]],[\"comment/666\",[]],[\"name/667\",[91,46.75]],[\"comment/667\",[]],[\"name/668\",[437,48.42]],[\"comment/668\",[]],[\"name/669\",[463,61.413]],[\"comment/669\",[]],[\"name/670\",[350,52.94]],[\"comment/670\",[]],[\"name/671\",[299,46.75]],[\"comment/671\",[]],[\"name/672\",[440,48.42]],[\"comment/672\",[]],[\"name/673\",[464,61.413]],[\"comment/673\",[]],[\"name/674\",[465,61.413]],[\"comment/674\",[]],[\"name/675\",[91,46.75]],[\"comment/675\",[]],[\"name/676\",[13,48.42]],[\"comment/676\",[]],[\"name/677\",[14,48.42]],[\"comment/677\",[]],[\"name/678\",[466,61.413]],[\"comment/678\",[]],[\"name/679\",[7,31.624]],[\"comment/679\",[]],[\"name/680\",[467,61.413]],[\"comment/680\",[]],[\"name/681\",[468,61.413]],[\"comment/681\",[]],[\"name/682\",[469,61.413]],[\"comment/682\",[]],[\"name/683\",[299,46.75]],[\"comment/683\",[]],[\"name/684\",[440,48.42]],[\"comment/684\",[]],[\"name/685\",[4,56.305]],[\"comment/685\",[]],[\"name/686\",[13,48.42]],[\"comment/686\",[]],[\"name/687\",[14,48.42]],[\"comment/687\",[]],[\"name/688\",[15,50.427]],[\"comment/688\",[]],[\"name/689\",[16,50.427]],[\"comment/689\",[]],[\"name/690\",[17,50.427]],[\"comment/690\",[]],[\"name/691\",[24,56.305]],[\"comment/691\",[]],[\"name/692\",[9,48.42]],[\"comment/692\",[]],[\"name/693\",[470,61.413]],[\"comment/693\",[]],[\"name/694\",[471,61.413]],[\"comment/694\",[]],[\"name/695\",[472,61.413]],[\"comment/695\",[]]],\"invertedIndex\":[[\"__type\",{\"_index\":7,\"name\":{\"7\":{},\"13\":{},\"15\":{},\"17\":{},\"19\":{},\"21\":{},\"23\":{},\"25\":{},\"27\":{},\"29\":{},\"41\":{},\"43\":{},\"45\":{},\"46\":{},\"71\":{},\"291\":{},\"296\":{},\"314\":{},\"316\":{},\"318\":{},\"370\":{},\"375\":{},\"379\":{},\"385\":{},\"391\":{},\"396\":{},\"545\":{},\"548\":{},\"679\":{}},\"comment\":{}}],[\"abs\",{\"_index\":116,\"name\":{\"160\":{}},\"comment\":{}}],[\"acos\",{\"_index\":117,\"name\":{\"161\":{}},\"comment\":{}}],[\"acosh\",{\"_index\":118,\"name\":{\"162\":{}},\"comment\":{}}],[\"adapter\",{\"_index\":322,\"name\":{\"394\":{}},\"comment\":{}}],[\"add\",{\"_index\":119,\"name\":{\"163\":{}},\"comment\":{}}],[\"age\",{\"_index\":443,\"name\":{\"625\":{}},\"comment\":{}}],[\"agent\",{\"_index\":305,\"name\":{\"365\":{}},\"comment\":{}}],[\"all\",{\"_index\":19,\"name\":{\"28\":{},\"80\":{},\"164\":{}},\"comment\":{}}],[\"alpha\",{\"_index\":281,\"name\":{\"338\":{}},\"comment\":{}}],[\"analyze\",{\"_index\":26,\"name\":{\"36\":{}},\"comment\":{}}],[\"annotations\",{\"_index\":442,\"name\":{\"624\":{},\"654\":{},\"664\":{}},\"comment\":{}}],[\"antispoof\",{\"_index\":76,\"name\":{\"116\":{},\"524\":{}},\"comment\":{}}],[\"any\",{\"_index\":120,\"name\":{\"165\":{}},\"comment\":{}}],[\"anycanvas\",{\"_index\":367,\"name\":{\"451\":{}},\"comment\":{}}],[\"anyimage\",{\"_index\":368,\"name\":{\"452\":{}},\"comment\":{}}],[\"anyvideo\",{\"_index\":369,\"name\":{\"453\":{}},\"comment\":{}}],[\"argmax\",{\"_index\":121,\"name\":{\"166\":{}},\"comment\":{}}],[\"argmin\",{\"_index\":122,\"name\":{\"167\":{}},\"comment\":{}}],[\"array\",{\"_index\":103,\"name\":{\"147\":{}},\"comment\":{}}],[\"arraysync\",{\"_index\":104,\"name\":{\"148\":{}},\"comment\":{}}],[\"as1d\",{\"_index\":125,\"name\":{\"170\":{}},\"comment\":{}}],[\"as2d\",{\"_index\":126,\"name\":{\"171\":{}},\"comment\":{}}],[\"as3d\",{\"_index\":127,\"name\":{\"172\":{}},\"comment\":{}}],[\"as4d\",{\"_index\":128,\"name\":{\"173\":{}},\"comment\":{}}],[\"as5d\",{\"_index\":129,\"name\":{\"174\":{}},\"comment\":{}}],[\"asin\",{\"_index\":130,\"name\":{\"175\":{}},\"comment\":{}}],[\"asinh\",{\"_index\":131,\"name\":{\"176\":{}},\"comment\":{}}],[\"asscalar\",{\"_index\":123,\"name\":{\"168\":{}},\"comment\":{}}],[\"astype\",{\"_index\":124,\"name\":{\"169\":{}},\"comment\":{}}],[\"async\",{\"_index\":427,\"name\":{\"597\":{}},\"comment\":{}}],[\"atan\",{\"_index\":132,\"name\":{\"177\":{}},\"comment\":{}}],[\"atan2\",{\"_index\":133,\"name\":{\"178\":{}},\"comment\":{}}],[\"atanh\",{\"_index\":134,\"name\":{\"179\":{}},\"comment\":{}}],[\"attention\",{\"_index\":397,\"name\":{\"520\":{}},\"comment\":{}}],[\"avgpool\",{\"_index\":135,\"name\":{\"180\":{}},\"comment\":{}}],[\"backend\",{\"_index\":316,\"name\":{\"381\":{},\"387\":{},\"393\":{},\"593\":{}},\"comment\":{}}],[\"backendenum\",{\"_index\":423,\"name\":{\"590\":{}},\"comment\":{}}],[\"backends\",{\"_index\":306,\"name\":{\"366\":{}},\"comment\":{}}],[\"batchnorm\",{\"_index\":137,\"name\":{\"182\":{}},\"comment\":{}}],[\"batchtospacend\",{\"_index\":136,\"name\":{\"181\":{}},\"comment\":{}}],[\"blazepose\",{\"_index\":58,\"name\":{\"97\":{}},\"comment\":{}}],[\"blazeposedetect\",{\"_index\":57,\"name\":{\"96\":{}},\"comment\":{}}],[\"blur\",{\"_index\":406,\"name\":{\"563\":{},\"578\":{}},\"comment\":{}}],[\"body\",{\"_index\":14,\"name\":{\"18\":{},\"83\":{},\"610\":{},\"677\":{},\"687\":{}},\"comment\":{}}],[\"bodyannotation\",{\"_index\":342,\"name\":{\"418\":{}},\"comment\":{}}],[\"bodyannotationblazepose\",{\"_index\":452,\"name\":{\"640\":{}},\"comment\":{}}],[\"bodyannotationefficientpose\",{\"_index\":453,\"name\":{\"641\":{}},\"comment\":{}}],[\"bodyconfig\",{\"_index\":400,\"name\":{\"531\":{}},\"comment\":{}}],[\"bodygesture\",{\"_index\":331,\"name\":{\"406\":{}},\"comment\":{}}],[\"bodykeypoint\",{\"_index\":454,\"name\":{\"642\":{}},\"comment\":{}}],[\"bodylandmark\",{\"_index\":341,\"name\":{\"417\":{}},\"comment\":{}}],[\"bodylandmarkblazepose\",{\"_index\":451,\"name\":{\"639\":{}},\"comment\":{}}],[\"bodylandmarkefficientnet\",{\"_index\":450,\"name\":{\"638\":{}},\"comment\":{}}],[\"bodylandmarkmovenet\",{\"_index\":449,\"name\":{\"637\":{}},\"comment\":{}}],[\"bodylandmarkposenet\",{\"_index\":448,\"name\":{\"636\":{}},\"comment\":{}}],[\"bodyresult\",{\"_index\":458,\"name\":{\"648\":{}},\"comment\":{}}],[\"box\",{\"_index\":299,\"name\":{\"356\":{},\"620\":{},\"651\":{},\"660\":{},\"671\":{},\"683\":{}},\"comment\":{}}],[\"boxraw\",{\"_index\":440,\"name\":{\"621\":{},\"652\":{},\"661\":{},\"672\":{},\"684\":{}},\"comment\":{}}],[\"boxscore\",{\"_index\":438,\"name\":{\"618\":{},\"658\":{}},\"comment\":{}}],[\"brightness\",{\"_index\":410,\"name\":{\"575\":{}},\"comment\":{}}],[\"broadcastto\",{\"_index\":138,\"name\":{\"183\":{}},\"comment\":{}}],[\"browser\",{\"_index\":301,\"name\":{\"361\":{}},\"comment\":{}}],[\"buffer\",{\"_index\":101,\"name\":{\"145\":{}},\"comment\":{}}],[\"buffersync\",{\"_index\":102,\"name\":{\"146\":{}},\"comment\":{}}],[\"bytes\",{\"_index\":108,\"name\":{\"152\":{}},\"comment\":{}}],[\"cachemodels\",{\"_index\":429,\"name\":{\"600\":{}},\"comment\":{}}],[\"cachesensitivity\",{\"_index\":431,\"name\":{\"602\":{}},\"comment\":{}}],[\"canvas\",{\"_index\":9,\"name\":{\"9\":{},\"14\":{},\"79\":{},\"400\":{},\"692\":{}},\"comment\":{}}],[\"capabilities\",{\"_index\":347,\"name\":{\"426\":{}},\"comment\":{}}],[\"cast\",{\"_index\":139,\"name\":{\"184\":{}},\"comment\":{}}],[\"ceil\",{\"_index\":140,\"name\":{\"185\":{}},\"comment\":{}}],[\"centernet\",{\"_index\":59,\"name\":{\"98\":{}},\"comment\":{}}],[\"check\",{\"_index\":29,\"name\":{\"39\":{}},\"comment\":{}}],[\"class\",{\"_index\":463,\"name\":{\"669\":{}},\"comment\":{}}],[\"clipbyvalue\",{\"_index\":141,\"name\":{\"186\":{}},\"comment\":{}}],[\"clone\",{\"_index\":113,\"name\":{\"157\":{}},\"comment\":{}}],[\"color\",{\"_index\":280,\"name\":{\"337\":{}},\"comment\":{}}],[\"compare\",{\"_index\":38,\"name\":{\"54\":{}},\"comment\":{}}],[\"concat\",{\"_index\":142,\"name\":{\"187\":{}},\"comment\":{}}],[\"config\",{\"_index\":3,\"name\":{\"3\":{},\"422\":{},\"592\":{}},\"comment\":{}}],[\"constraints\",{\"_index\":348,\"name\":{\"427\":{}},\"comment\":{}}],[\"constructor\",{\"_index\":1,\"name\":{\"1\":{},\"93\":{},\"134\":{},\"306\":{},\"360\":{},\"421\":{}},\"comment\":{}}],[\"contrast\",{\"_index\":411,\"name\":{\"576\":{}},\"comment\":{}}],[\"conv1d\",{\"_index\":143,\"name\":{\"188\":{}},\"comment\":{}}],[\"conv2d\",{\"_index\":145,\"name\":{\"190\":{}},\"comment\":{}}],[\"conv2dtranspose\",{\"_index\":144,\"name\":{\"189\":{}},\"comment\":{}}],[\"cos\",{\"_index\":146,\"name\":{\"191\":{}},\"comment\":{}}],[\"cosh\",{\"_index\":147,\"name\":{\"192\":{}},\"comment\":{}}],[\"cpu\",{\"_index\":323,\"name\":{\"395\":{}},\"comment\":{}}],[\"crop\",{\"_index\":361,\"name\":{\"441\":{}},\"comment\":{}}],[\"cumprod\",{\"_index\":148,\"name\":{\"193\":{}},\"comment\":{}}],[\"cumsum\",{\"_index\":149,\"name\":{\"194\":{}},\"comment\":{}}],[\"data\",{\"_index\":105,\"name\":{\"149\":{}},\"comment\":{}}],[\"dataid\",{\"_index\":92,\"name\":{\"136\":{}},\"comment\":{}}],[\"datasync\",{\"_index\":107,\"name\":{\"151\":{}},\"comment\":{}}],[\"datatogpu\",{\"_index\":106,\"name\":{\"150\":{}},\"comment\":{}}],[\"deallocate\",{\"_index\":433,\"name\":{\"605\":{}},\"comment\":{}}],[\"debug\",{\"_index\":359,\"name\":{\"439\":{},\"596\":{}},\"comment\":{}}],[\"default\",{\"_index\":50,\"name\":{\"66\":{}},\"comment\":{}}],[\"defaults\",{\"_index\":435,\"name\":{\"614\":{}},\"comment\":{}}],[\"depthtospace\",{\"_index\":150,\"name\":{\"195\":{}},\"comment\":{}}],[\"depthwiseconv2d\",{\"_index\":151,\"name\":{\"196\":{}},\"comment\":{}}],[\"description\",{\"_index\":399,\"name\":{\"522\":{}},\"comment\":{}}],[\"descriptor\",{\"_index\":51,\"name\":{\"75\":{}},\"comment\":{}}],[\"detect\",{\"_index\":47,\"name\":{\"63\":{}},\"comment\":{}}],[\"detector\",{\"_index\":395,\"name\":{\"518\":{},\"544\":{}},\"comment\":{}}],[\"dilation2d\",{\"_index\":152,\"name\":{\"197\":{}},\"comment\":{}}],[\"dispose\",{\"_index\":109,\"name\":{\"153\":{},\"327\":{}},\"comment\":{}}],[\"disposeintermediatetensors\",{\"_index\":271,\"name\":{\"326\":{}},\"comment\":{}}],[\"distance\",{\"_index\":31,\"name\":{\"42\":{},\"48\":{},\"68\":{},\"73\":{},\"646\":{}},\"comment\":{}}],[\"div\",{\"_index\":154,\"name\":{\"199\":{}},\"comment\":{}}],[\"divnonan\",{\"_index\":153,\"name\":{\"198\":{}},\"comment\":{}}],[\"dot\",{\"_index\":155,\"name\":{\"200\":{}},\"comment\":{}}],[\"draw\",{\"_index\":12,\"name\":{\"12\":{},\"77\":{}},\"comment\":{}}],[\"drawattention\",{\"_index\":291,\"name\":{\"348\":{}},\"comment\":{}}],[\"drawboxes\",{\"_index\":293,\"name\":{\"350\":{}},\"comment\":{}}],[\"drawgaze\",{\"_index\":295,\"name\":{\"352\":{}},\"comment\":{}}],[\"drawgestures\",{\"_index\":292,\"name\":{\"349\":{}},\"comment\":{}}],[\"drawlabels\",{\"_index\":290,\"name\":{\"347\":{}},\"comment\":{}}],[\"drawoptions\",{\"_index\":279,\"name\":{\"336\":{}},\"comment\":{}}],[\"drawpoints\",{\"_index\":289,\"name\":{\"346\":{}},\"comment\":{}}],[\"drawpolygons\",{\"_index\":294,\"name\":{\"351\":{}},\"comment\":{}}],[\"dtype\",{\"_index\":95,\"name\":{\"139\":{}},\"comment\":{}}],[\"efficientpose\",{\"_index\":60,\"name\":{\"99\":{}},\"comment\":{}}],[\"element\",{\"_index\":344,\"name\":{\"423\":{},\"438\":{}},\"comment\":{}}],[\"elu\",{\"_index\":156,\"name\":{\"201\":{}},\"comment\":{}}],[\"embedding\",{\"_index\":445,\"name\":{\"630\":{}},\"comment\":{}}],[\"emit\",{\"_index\":42,\"name\":{\"58\":{}},\"comment\":{}}],[\"emotion\",{\"_index\":63,\"name\":{\"102\":{},\"409\":{},\"523\":{},\"628\":{}},\"comment\":{}}],[\"enabled\",{\"_index\":374,\"name\":{\"458\":{},\"469\":{},\"475\":{},\"480\":{},\"485\":{},\"491\":{},\"497\":{},\"502\":{},\"507\":{},\"513\":{},\"527\":{},\"534\":{},\"550\":{},\"558\":{},\"564\":{},\"569\":{},\"589\":{}},\"comment\":{}}],[\"enhance\",{\"_index\":37,\"name\":{\"53\":{}},\"comment\":{}}],[\"env\",{\"_index\":11,\"name\":{\"11\":{},\"358\":{},\"359\":{}},\"comment\":{}}],[\"equal\",{\"_index\":157,\"name\":{\"202\":{}},\"comment\":{}}],[\"equalization\",{\"_index\":408,\"name\":{\"570\":{}},\"comment\":{}}],[\"erf\",{\"_index\":158,\"name\":{\"203\":{}},\"comment\":{}}],[\"error\",{\"_index\":472,\"name\":{\"695\":{}},\"comment\":{}}],[\"euclideannorm\",{\"_index\":159,\"name\":{\"204\":{}},\"comment\":{}}],[\"events\",{\"_index\":21,\"name\":{\"31\":{},\"450\":{}},\"comment\":{}}],[\"execute\",{\"_index\":268,\"name\":{\"323\":{}},\"comment\":{}}],[\"executeasync\",{\"_index\":269,\"name\":{\"324\":{}},\"comment\":{}}],[\"exp\",{\"_index\":160,\"name\":{\"205\":{}},\"comment\":{}}],[\"expanddims\",{\"_index\":161,\"name\":{\"206\":{}},\"comment\":{}}],[\"expm1\",{\"_index\":162,\"name\":{\"207\":{}},\"comment\":{}}],[\"externalcanvas\",{\"_index\":371,\"name\":{\"455\":{}},\"comment\":{}}],[\"face\",{\"_index\":13,\"name\":{\"16\":{},\"82\":{},\"609\":{},\"676\":{},\"686\":{}},\"comment\":{}}],[\"faceantispoofconfig\",{\"_index\":391,\"name\":{\"501\":{}},\"comment\":{}}],[\"faceattentionconfig\",{\"_index\":388,\"name\":{\"484\":{}},\"comment\":{}}],[\"faceconfig\",{\"_index\":394,\"name\":{\"517\":{}},\"comment\":{}}],[\"facedescriptionconfig\",{\"_index\":389,\"name\":{\"489\":{}},\"comment\":{}}],[\"facedetect\",{\"_index\":64,\"name\":{\"103\":{}},\"comment\":{}}],[\"facedetectorconfig\",{\"_index\":378,\"name\":{\"462\":{}},\"comment\":{}}],[\"faceemotionconfig\",{\"_index\":390,\"name\":{\"495\":{}},\"comment\":{}}],[\"facegearconfig\",{\"_index\":393,\"name\":{\"511\":{}},\"comment\":{}}],[\"facegesture\",{\"_index\":330,\"name\":{\"405\":{}},\"comment\":{}}],[\"faceiris\",{\"_index\":65,\"name\":{\"104\":{}},\"comment\":{}}],[\"faceirisconfig\",{\"_index\":387,\"name\":{\"479\":{}},\"comment\":{}}],[\"facelandmark\",{\"_index\":340,\"name\":{\"416\":{}},\"comment\":{}}],[\"facelivenessconfig\",{\"_index\":392,\"name\":{\"506\":{}},\"comment\":{}}],[\"facemesh\",{\"_index\":66,\"name\":{\"105\":{}},\"comment\":{}}],[\"facemeshconfig\",{\"_index\":385,\"name\":{\"473\":{}},\"comment\":{}}],[\"faceres\",{\"_index\":67,\"name\":{\"106\":{}},\"comment\":{}}],[\"faceresult\",{\"_index\":436,\"name\":{\"615\":{}},\"comment\":{}}],[\"facescore\",{\"_index\":439,\"name\":{\"619\":{}},\"comment\":{}}],[\"facetriangulation\",{\"_index\":22,\"name\":{\"32\":{}},\"comment\":{}}],[\"faceuvmap\",{\"_index\":23,\"name\":{\"33\":{}},\"comment\":{}}],[\"fft\",{\"_index\":163,\"name\":{\"208\":{}},\"comment\":{}}],[\"fillpolygons\",{\"_index\":296,\"name\":{\"353\":{}},\"comment\":{}}],[\"filter\",{\"_index\":308,\"name\":{\"368\":{},\"607\":{}},\"comment\":{}}],[\"filterconfig\",{\"_index\":407,\"name\":{\"568\":{}},\"comment\":{}}],[\"finger\",{\"_index\":334,\"name\":{\"410\":{}},\"comment\":{}}],[\"fingercurl\",{\"_index\":335,\"name\":{\"411\":{}},\"comment\":{}}],[\"fingerdirection\",{\"_index\":336,\"name\":{\"412\":{}},\"comment\":{}}],[\"fingerscore\",{\"_index\":461,\"name\":{\"659\":{}},\"comment\":{}}],[\"flags\",{\"_index\":325,\"name\":{\"398\":{},\"603\":{}},\"comment\":{}}],[\"flatten\",{\"_index\":164,\"name\":{\"209\":{}},\"comment\":{}}],[\"flip\",{\"_index\":409,\"name\":{\"574\":{}},\"comment\":{}}],[\"floor\",{\"_index\":165,\"name\":{\"210\":{}},\"comment\":{}}],[\"floordiv\",{\"_index\":166,\"name\":{\"211\":{}},\"comment\":{}}],[\"font\",{\"_index\":284,\"name\":{\"341\":{}},\"comment\":{}}],[\"gather\",{\"_index\":167,\"name\":{\"212\":{}},\"comment\":{}}],[\"gear\",{\"_index\":56,\"name\":{\"95\":{},\"526\":{}},\"comment\":{}}],[\"gender\",{\"_index\":338,\"name\":{\"414\":{},\"626\":{}},\"comment\":{}}],[\"genderscore\",{\"_index\":444,\"name\":{\"627\":{}},\"comment\":{}}],[\"genericconfig\",{\"_index\":373,\"name\":{\"457\":{}},\"comment\":{}}],[\"gesture\",{\"_index\":16,\"name\":{\"22\":{},\"86\":{},\"608\":{},\"689\":{}},\"comment\":{}}],[\"gestureconfig\",{\"_index\":422,\"name\":{\"588\":{}},\"comment\":{}}],[\"gestureresult\",{\"_index\":464,\"name\":{\"673\":{}},\"comment\":{}}],[\"gestures\",{\"_index\":469,\"name\":{\"682\":{}},\"comment\":{}}],[\"getintermediatetensors\",{\"_index\":270,\"name\":{\"325\":{}},\"comment\":{}}],[\"getmodelstats\",{\"_index\":44,\"name\":{\"60\":{},\"127\":{}},\"comment\":{}}],[\"gl\",{\"_index\":25,\"name\":{\"35\":{}},\"comment\":{}}],[\"gpu\",{\"_index\":313,\"name\":{\"377\":{}},\"comment\":{}}],[\"graphmodel\",{\"_index\":255,\"name\":{\"305\":{}},\"comment\":{}}],[\"greater\",{\"_index\":169,\"name\":{\"214\":{}},\"comment\":{}}],[\"greaterequal\",{\"_index\":168,\"name\":{\"213\":{}},\"comment\":{}}],[\"hand\",{\"_index\":15,\"name\":{\"20\":{},\"84\":{},\"611\":{},\"688\":{}},\"comment\":{}}],[\"handconfig\",{\"_index\":401,\"name\":{\"538\":{}},\"comment\":{}}],[\"handgesture\",{\"_index\":332,\"name\":{\"407\":{}},\"comment\":{}}],[\"handpose\",{\"_index\":69,\"name\":{\"108\":{}},\"comment\":{}}],[\"handresult\",{\"_index\":460,\"name\":{\"655\":{}},\"comment\":{}}],[\"hands\",{\"_index\":466,\"name\":{\"678\":{}},\"comment\":{}}],[\"handskeleton\",{\"_index\":70,\"name\":{\"109\":{}},\"comment\":{}}],[\"handtrack\",{\"_index\":71,\"name\":{\"110\":{}},\"comment\":{}}],[\"handtype\",{\"_index\":337,\"name\":{\"413\":{}},\"comment\":{}}],[\"height\",{\"_index\":353,\"name\":{\"432\":{},\"443\":{},\"572\":{}},\"comment\":{}}],[\"hue\",{\"_index\":414,\"name\":{\"580\":{}},\"comment\":{}}],[\"human\",{\"_index\":0,\"name\":{\"0\":{}},\"comment\":{}}],[\"id\",{\"_index\":91,\"name\":{\"135\":{},\"616\":{},\"649\":{},\"656\":{},\"667\":{},\"675\":{}},\"comment\":{}}],[\"ifft\",{\"_index\":170,\"name\":{\"215\":{}},\"comment\":{}}],[\"image\",{\"_index\":35,\"name\":{\"51\":{},\"401\":{}},\"comment\":{}}],[\"imagedata\",{\"_index\":327,\"name\":{\"402\":{}},\"comment\":{}}],[\"imageobjects\",{\"_index\":370,\"name\":{\"454\":{}},\"comment\":{}}],[\"incache\",{\"_index\":363,\"name\":{\"446\":{}},\"comment\":{}}],[\"index\",{\"_index\":33,\"name\":{\"47\":{},\"72\":{}},\"comment\":{}}],[\"indices\",{\"_index\":247,\"name\":{\"293\":{},\"298\":{}},\"comment\":{}}],[\"init\",{\"_index\":39,\"name\":{\"55\":{}},\"comment\":{}}],[\"initial\",{\"_index\":307,\"name\":{\"367\":{}},\"comment\":{}}],[\"input\",{\"_index\":372,\"name\":{\"456\":{}},\"comment\":{}}],[\"inputnodes\",{\"_index\":257,\"name\":{\"308\":{}},\"comment\":{}}],[\"inputs\",{\"_index\":259,\"name\":{\"310\":{}},\"comment\":{}}],[\"insightface\",{\"_index\":62,\"name\":{\"101\":{}},\"comment\":{}}],[\"iouthreshold\",{\"_index\":382,\"name\":{\"466\":{},\"541\":{},\"556\":{}},\"comment\":{}}],[\"irfft\",{\"_index\":171,\"name\":{\"216\":{}},\"comment\":{}}],[\"iris\",{\"_index\":398,\"name\":{\"521\":{},\"631\":{}},\"comment\":{}}],[\"irisgesture\",{\"_index\":333,\"name\":{\"408\":{}},\"comment\":{}}],[\"isdisposed\",{\"_index\":110,\"name\":{\"154\":{}},\"comment\":{}}],[\"isfinite\",{\"_index\":172,\"name\":{\"217\":{}},\"comment\":{}}],[\"isinf\",{\"_index\":173,\"name\":{\"218\":{}},\"comment\":{}}],[\"isnan\",{\"_index\":174,\"name\":{\"219\":{}},\"comment\":{}}],[\"keepinvalid\",{\"_index\":386,\"name\":{\"474\":{}},\"comment\":{}}],[\"kept\",{\"_index\":97,\"name\":{\"141\":{}},\"comment\":{}}],[\"kernelops\",{\"_index\":86,\"name\":{\"128\":{}},\"comment\":{}}],[\"kernels\",{\"_index\":326,\"name\":{\"399\":{}},\"comment\":{}}],[\"keypoints\",{\"_index\":459,\"name\":{\"653\":{},\"662\":{}},\"comment\":{}}],[\"kodachrome\",{\"_index\":418,\"name\":{\"584\":{}},\"comment\":{}}],[\"label\",{\"_index\":350,\"name\":{\"429\":{},\"663\":{},\"670\":{}},\"comment\":{}}],[\"labelcolor\",{\"_index\":282,\"name\":{\"339\":{}},\"comment\":{}}],[\"landmarks\",{\"_index\":402,\"name\":{\"543\":{},\"665\":{}},\"comment\":{}}],[\"leakyrelu\",{\"_index\":175,\"name\":{\"220\":{}},\"comment\":{}}],[\"left\",{\"_index\":467,\"name\":{\"680\":{}},\"comment\":{}}],[\"less\",{\"_index\":177,\"name\":{\"222\":{}},\"comment\":{}}],[\"lessequal\",{\"_index\":176,\"name\":{\"221\":{}},\"comment\":{}}],[\"lineheight\",{\"_index\":285,\"name\":{\"342\":{}},\"comment\":{}}],[\"linewidth\",{\"_index\":286,\"name\":{\"343\":{}},\"comment\":{}}],[\"live\",{\"_index\":447,\"name\":{\"633\":{}},\"comment\":{}}],[\"liveness\",{\"_index\":72,\"name\":{\"111\":{},\"525\":{}},\"comment\":{}}],[\"load\",{\"_index\":41,\"name\":{\"57\":{},\"89\":{},\"319\":{}},\"comment\":{}}],[\"loadsync\",{\"_index\":265,\"name\":{\"320\":{}},\"comment\":{}}],[\"localresponsenormalization\",{\"_index\":178,\"name\":{\"223\":{}},\"comment\":{}}],[\"log\",{\"_index\":182,\"name\":{\"227\":{}},\"comment\":{}}],[\"log1p\",{\"_index\":183,\"name\":{\"228\":{}},\"comment\":{}}],[\"logicaland\",{\"_index\":184,\"name\":{\"229\":{}},\"comment\":{}}],[\"logicalnot\",{\"_index\":185,\"name\":{\"230\":{}},\"comment\":{}}],[\"logicalor\",{\"_index\":186,\"name\":{\"231\":{}},\"comment\":{}}],[\"logicalxor\",{\"_index\":187,\"name\":{\"232\":{}},\"comment\":{}}],[\"logsigmoid\",{\"_index\":179,\"name\":{\"224\":{}},\"comment\":{}}],[\"logsoftmax\",{\"_index\":180,\"name\":{\"225\":{}},\"comment\":{}}],[\"logsumexp\",{\"_index\":181,\"name\":{\"226\":{}},\"comment\":{}}],[\"mask\",{\"_index\":383,\"name\":{\"467\":{}},\"comment\":{}}],[\"match\",{\"_index\":32,\"name\":{\"44\":{},\"67\":{},\"70\":{}},\"comment\":{}}],[\"matchoptions\",{\"_index\":52,\"name\":{\"76\":{}},\"comment\":{}}],[\"matmul\",{\"_index\":188,\"name\":{\"233\":{}},\"comment\":{}}],[\"max\",{\"_index\":190,\"name\":{\"235\":{}},\"comment\":{}}],[\"maxdetected\",{\"_index\":380,\"name\":{\"464\":{},\"532\":{},\"542\":{},\"557\":{}},\"comment\":{}}],[\"maximum\",{\"_index\":191,\"name\":{\"236\":{}},\"comment\":{}}],[\"maxpool\",{\"_index\":189,\"name\":{\"234\":{}},\"comment\":{}}],[\"mean\",{\"_index\":192,\"name\":{\"237\":{}},\"comment\":{}}],[\"mesh\",{\"_index\":396,\"name\":{\"519\":{},\"622\":{}},\"comment\":{}}],[\"meshraw\",{\"_index\":441,\"name\":{\"623\":{}},\"comment\":{}}],[\"metadata\",{\"_index\":262,\"name\":{\"313\":{}},\"comment\":{}}],[\"min\",{\"_index\":193,\"name\":{\"238\":{}},\"comment\":{}}],[\"minconfidence\",{\"_index\":381,\"name\":{\"465\":{},\"490\":{},\"496\":{},\"512\":{},\"533\":{},\"540\":{},\"555\":{}},\"comment\":{}}],[\"minimum\",{\"_index\":194,\"name\":{\"239\":{}},\"comment\":{}}],[\"mirrorpad\",{\"_index\":195,\"name\":{\"240\":{}},\"comment\":{}}],[\"missing\",{\"_index\":89,\"name\":{\"131\":{}},\"comment\":{}}],[\"mobilefacenet\",{\"_index\":61,\"name\":{\"100\":{}},\"comment\":{}}],[\"mod\",{\"_index\":196,\"name\":{\"241\":{}},\"comment\":{}}],[\"mode\",{\"_index\":360,\"name\":{\"440\":{}},\"comment\":{}}],[\"model\",{\"_index\":324,\"name\":{\"397\":{}},\"comment\":{}}],[\"modelbasepath\",{\"_index\":428,\"name\":{\"599\":{}},\"comment\":{}}],[\"modelinfo\",{\"_index\":362,\"name\":{\"444\":{}},\"comment\":{}}],[\"modelpath\",{\"_index\":375,\"name\":{\"459\":{},\"470\":{},\"476\":{},\"481\":{},\"486\":{},\"492\":{},\"498\":{},\"503\":{},\"508\":{},\"514\":{},\"528\":{},\"535\":{},\"546\":{},\"549\":{},\"551\":{},\"559\":{},\"565\":{}},\"comment\":{}}],[\"models\",{\"_index\":53,\"name\":{\"87\":{},\"92\":{}},\"comment\":{}}],[\"modelsignature\",{\"_index\":263,\"name\":{\"315\":{}},\"comment\":{}}],[\"modelstats\",{\"_index\":77,\"name\":{\"117\":{},\"126\":{}},\"comment\":{}}],[\"modelstructuredoutputkeys\",{\"_index\":264,\"name\":{\"317\":{}},\"comment\":{}}],[\"modelversion\",{\"_index\":256,\"name\":{\"307\":{}},\"comment\":{}}],[\"movenet\",{\"_index\":73,\"name\":{\"112\":{}},\"comment\":{}}],[\"mul\",{\"_index\":197,\"name\":{\"242\":{}},\"comment\":{}}],[\"multithread\",{\"_index\":318,\"name\":{\"383\":{}},\"comment\":{}}],[\"name\",{\"_index\":87,\"name\":{\"129\":{},\"445\":{}},\"comment\":{}}],[\"nanodet\",{\"_index\":74,\"name\":{\"113\":{}},\"comment\":{}}],[\"neg\",{\"_index\":198,\"name\":{\"243\":{}},\"comment\":{}}],[\"negative\",{\"_index\":415,\"name\":{\"581\":{}},\"comment\":{}}],[\"next\",{\"_index\":43,\"name\":{\"59\":{}},\"comment\":{}}],[\"node\",{\"_index\":302,\"name\":{\"362\":{}},\"comment\":{}}],[\"norm\",{\"_index\":199,\"name\":{\"244\":{}},\"comment\":{}}],[\"notequal\",{\"_index\":200,\"name\":{\"245\":{}},\"comment\":{}}],[\"now\",{\"_index\":34,\"name\":{\"50\":{}},\"comment\":{}}],[\"numdefinedmodels\",{\"_index\":80,\"name\":{\"120\":{}},\"comment\":{}}],[\"numenabledmodels\",{\"_index\":79,\"name\":{\"119\":{}},\"comment\":{}}],[\"numloadedmodels\",{\"_index\":78,\"name\":{\"118\":{}},\"comment\":{}}],[\"object\",{\"_index\":17,\"name\":{\"24\":{},\"85\":{},\"612\":{},\"690\":{}},\"comment\":{}}],[\"objectconfig\",{\"_index\":404,\"name\":{\"554\":{}},\"comment\":{}}],[\"objectresult\",{\"_index\":462,\"name\":{\"666\":{}},\"comment\":{}}],[\"objecttype\",{\"_index\":343,\"name\":{\"419\":{}},\"comment\":{}}],[\"offscreen\",{\"_index\":310,\"name\":{\"372\":{}},\"comment\":{}}],[\"onehot\",{\"_index\":201,\"name\":{\"246\":{}},\"comment\":{}}],[\"oneslike\",{\"_index\":202,\"name\":{\"247\":{}},\"comment\":{}}],[\"ops\",{\"_index\":90,\"name\":{\"132\":{}},\"comment\":{}}],[\"options\",{\"_index\":20,\"name\":{\"30\":{},\"81\":{}},\"comment\":{}}],[\"outputnodes\",{\"_index\":258,\"name\":{\"309\":{}},\"comment\":{}}],[\"outputs\",{\"_index\":260,\"name\":{\"311\":{}},\"comment\":{}}],[\"pad\",{\"_index\":203,\"name\":{\"248\":{}},\"comment\":{}}],[\"part\",{\"_index\":455,\"name\":{\"643\":{}},\"comment\":{}}],[\"pause\",{\"_index\":355,\"name\":{\"434\":{}},\"comment\":{}}],[\"paused\",{\"_index\":351,\"name\":{\"430\":{}},\"comment\":{}}],[\"percentageloaded\",{\"_index\":81,\"name\":{\"121\":{}},\"comment\":{}}],[\"perfadd\",{\"_index\":311,\"name\":{\"373\":{}},\"comment\":{}}],[\"performance\",{\"_index\":24,\"name\":{\"34\":{},\"691\":{}},\"comment\":{}}],[\"person\",{\"_index\":18,\"name\":{\"26\":{},\"78\":{}},\"comment\":{}}],[\"personresult\",{\"_index\":465,\"name\":{\"674\":{}},\"comment\":{}}],[\"persons\",{\"_index\":471,\"name\":{\"694\":{}},\"comment\":{}}],[\"pixelate\",{\"_index\":421,\"name\":{\"587\":{}},\"comment\":{}}],[\"platform\",{\"_index\":304,\"name\":{\"364\":{}},\"comment\":{}}],[\"play\",{\"_index\":356,\"name\":{\"435\":{}},\"comment\":{}}],[\"point\",{\"_index\":300,\"name\":{\"357\":{}},\"comment\":{}}],[\"pointsize\",{\"_index\":287,\"name\":{\"344\":{}},\"comment\":{}}],[\"polaroid\",{\"_index\":420,\"name\":{\"586\":{}},\"comment\":{}}],[\"pool\",{\"_index\":204,\"name\":{\"249\":{}},\"comment\":{}}],[\"posenet\",{\"_index\":75,\"name\":{\"114\":{}},\"comment\":{}}],[\"position\",{\"_index\":456,\"name\":{\"644\":{}},\"comment\":{}}],[\"positionraw\",{\"_index\":457,\"name\":{\"645\":{}},\"comment\":{}}],[\"pow\",{\"_index\":205,\"name\":{\"250\":{}},\"comment\":{}}],[\"predict\",{\"_index\":267,\"name\":{\"322\":{}},\"comment\":{}}],[\"prelu\",{\"_index\":206,\"name\":{\"251\":{}},\"comment\":{}}],[\"print\",{\"_index\":112,\"name\":{\"156\":{}},\"comment\":{}}],[\"process\",{\"_index\":6,\"name\":{\"6\":{}},\"comment\":{}}],[\"prod\",{\"_index\":207,\"name\":{\"252\":{}},\"comment\":{}}],[\"profile\",{\"_index\":46,\"name\":{\"62\":{}},\"comment\":{}}],[\"r0\",{\"_index\":272,\"name\":{\"329\":{}},\"comment\":{}}],[\"r1\",{\"_index\":273,\"name\":{\"330\":{}},\"comment\":{}}],[\"r2\",{\"_index\":274,\"name\":{\"331\":{}},\"comment\":{}}],[\"r3\",{\"_index\":275,\"name\":{\"332\":{}},\"comment\":{}}],[\"r4\",{\"_index\":276,\"name\":{\"333\":{}},\"comment\":{}}],[\"r5\",{\"_index\":277,\"name\":{\"334\":{}},\"comment\":{}}],[\"r6\",{\"_index\":278,\"name\":{\"335\":{}},\"comment\":{}}],[\"race\",{\"_index\":339,\"name\":{\"415\":{},\"629\":{}},\"comment\":{}}],[\"rank\",{\"_index\":100,\"name\":{\"144\":{},\"328\":{}},\"comment\":{}}],[\"ranktype\",{\"_index\":96,\"name\":{\"140\":{}},\"comment\":{}}],[\"real\",{\"_index\":446,\"name\":{\"632\":{}},\"comment\":{}}],[\"reciprocal\",{\"_index\":208,\"name\":{\"253\":{}},\"comment\":{}}],[\"relu\",{\"_index\":209,\"name\":{\"254\":{}},\"comment\":{}}],[\"relu6\",{\"_index\":210,\"name\":{\"255\":{}},\"comment\":{}}],[\"renderer\",{\"_index\":320,\"name\":{\"389\":{}},\"comment\":{}}],[\"reset\",{\"_index\":27,\"name\":{\"37\":{},\"88\":{}},\"comment\":{}}],[\"reshape\",{\"_index\":212,\"name\":{\"257\":{}},\"comment\":{}}],[\"reshapeas\",{\"_index\":211,\"name\":{\"256\":{}},\"comment\":{}}],[\"resizebilinear\",{\"_index\":213,\"name\":{\"258\":{}},\"comment\":{}}],[\"resizenearestneighbor\",{\"_index\":214,\"name\":{\"259\":{}},\"comment\":{}}],[\"result\",{\"_index\":4,\"name\":{\"4\":{},\"685\":{}},\"comment\":{}}],[\"return\",{\"_index\":384,\"name\":{\"468\":{},\"573\":{}},\"comment\":{}}],[\"reverse\",{\"_index\":215,\"name\":{\"260\":{}},\"comment\":{}}],[\"rfft\",{\"_index\":216,\"name\":{\"261\":{}},\"comment\":{}}],[\"right\",{\"_index\":468,\"name\":{\"681\":{}},\"comment\":{}}],[\"rotation\",{\"_index\":379,\"name\":{\"463\":{},\"539\":{},\"634\":{}},\"comment\":{}}],[\"round\",{\"_index\":217,\"name\":{\"262\":{}},\"comment\":{}}],[\"roundrect\",{\"_index\":288,\"name\":{\"345\":{}},\"comment\":{}}],[\"rsqrt\",{\"_index\":218,\"name\":{\"263\":{}},\"comment\":{}}],[\"saturation\",{\"_index\":413,\"name\":{\"579\":{}},\"comment\":{}}],[\"save\",{\"_index\":266,\"name\":{\"321\":{}},\"comment\":{}}],[\"scopeid\",{\"_index\":98,\"name\":{\"142\":{}},\"comment\":{}}],[\"score\",{\"_index\":437,\"name\":{\"617\":{},\"647\":{},\"650\":{},\"657\":{},\"668\":{}},\"comment\":{}}],[\"segmentation\",{\"_index\":36,\"name\":{\"52\":{},\"115\":{},\"613\":{}},\"comment\":{}}],[\"segmentationconfig\",{\"_index\":405,\"name\":{\"562\":{}},\"comment\":{}}],[\"selu\",{\"_index\":219,\"name\":{\"264\":{}},\"comment\":{}}],[\"separableconv2d\",{\"_index\":220,\"name\":{\"265\":{}},\"comment\":{}}],[\"sepia\",{\"_index\":416,\"name\":{\"582\":{}},\"comment\":{}}],[\"settings\",{\"_index\":349,\"name\":{\"428\":{}},\"comment\":{}}],[\"shadowcolor\",{\"_index\":283,\"name\":{\"340\":{}},\"comment\":{}}],[\"shape\",{\"_index\":93,\"name\":{\"137\":{}},\"comment\":{}}],[\"sharpness\",{\"_index\":412,\"name\":{\"577\":{}},\"comment\":{}}],[\"sigmoid\",{\"_index\":221,\"name\":{\"266\":{}},\"comment\":{}}],[\"sign\",{\"_index\":222,\"name\":{\"267\":{}},\"comment\":{}}],[\"simd\",{\"_index\":317,\"name\":{\"382\":{}},\"comment\":{}}],[\"similarity\",{\"_index\":30,\"name\":{\"40\":{},\"49\":{},\"69\":{},\"74\":{}},\"comment\":{}}],[\"sin\",{\"_index\":223,\"name\":{\"268\":{}},\"comment\":{}}],[\"sinh\",{\"_index\":224,\"name\":{\"269\":{}},\"comment\":{}}],[\"size\",{\"_index\":94,\"name\":{\"138\":{}},\"comment\":{}}],[\"sizedesired\",{\"_index\":364,\"name\":{\"447\":{}},\"comment\":{}}],[\"sizefrommanifest\",{\"_index\":365,\"name\":{\"448\":{}},\"comment\":{}}],[\"sizeloadedweights\",{\"_index\":366,\"name\":{\"449\":{}},\"comment\":{}}],[\"skeleton\",{\"_index\":403,\"name\":{\"547\":{}},\"comment\":{}}],[\"skipallowed\",{\"_index\":434,\"name\":{\"606\":{}},\"comment\":{}}],[\"skipframes\",{\"_index\":376,\"name\":{\"460\":{},\"471\":{},\"477\":{},\"482\":{},\"487\":{},\"493\":{},\"499\":{},\"504\":{},\"509\":{},\"515\":{},\"529\":{},\"536\":{},\"552\":{},\"560\":{},\"566\":{}},\"comment\":{}}],[\"skiptime\",{\"_index\":377,\"name\":{\"461\":{},\"472\":{},\"478\":{},\"483\":{},\"488\":{},\"494\":{},\"500\":{},\"505\":{},\"510\":{},\"516\":{},\"530\":{},\"537\":{},\"553\":{},\"561\":{},\"567\":{}},\"comment\":{}}],[\"sleep\",{\"_index\":48,\"name\":{\"64\":{}},\"comment\":{}}],[\"slice\",{\"_index\":225,\"name\":{\"270\":{}},\"comment\":{}}],[\"softmax\",{\"_index\":226,\"name\":{\"271\":{}},\"comment\":{}}],[\"softplus\",{\"_index\":227,\"name\":{\"272\":{}},\"comment\":{}}],[\"softwarekernels\",{\"_index\":432,\"name\":{\"604\":{}},\"comment\":{}}],[\"spacetobatchnd\",{\"_index\":228,\"name\":{\"273\":{}},\"comment\":{}}],[\"split\",{\"_index\":229,\"name\":{\"274\":{}},\"comment\":{}}],[\"sqrt\",{\"_index\":230,\"name\":{\"275\":{}},\"comment\":{}}],[\"square\",{\"_index\":231,\"name\":{\"276\":{}},\"comment\":{}}],[\"squareddifference\",{\"_index\":232,\"name\":{\"277\":{}},\"comment\":{}}],[\"squeeze\",{\"_index\":233,\"name\":{\"278\":{}},\"comment\":{}}],[\"ssrnetage\",{\"_index\":55,\"name\":{\"94\":{}},\"comment\":{}}],[\"ssrnetgender\",{\"_index\":68,\"name\":{\"107\":{}},\"comment\":{}}],[\"stack\",{\"_index\":234,\"name\":{\"279\":{}},\"comment\":{}}],[\"start\",{\"_index\":354,\"name\":{\"433\":{}},\"comment\":{}}],[\"state\",{\"_index\":5,\"name\":{\"5\":{}},\"comment\":{}}],[\"step\",{\"_index\":235,\"name\":{\"280\":{}},\"comment\":{}}],[\"stop\",{\"_index\":357,\"name\":{\"436\":{}},\"comment\":{}}],[\"stream\",{\"_index\":345,\"name\":{\"424\":{}},\"comment\":{}}],[\"stridedslice\",{\"_index\":236,\"name\":{\"281\":{}},\"comment\":{}}],[\"strides\",{\"_index\":99,\"name\":{\"143\":{}},\"comment\":{}}],[\"sub\",{\"_index\":237,\"name\":{\"282\":{}},\"comment\":{}}],[\"sum\",{\"_index\":238,\"name\":{\"283\":{}},\"comment\":{}}],[\"supported\",{\"_index\":315,\"name\":{\"380\":{},\"386\":{},\"392\":{}},\"comment\":{}}],[\"tan\",{\"_index\":239,\"name\":{\"284\":{}},\"comment\":{}}],[\"tanh\",{\"_index\":240,\"name\":{\"285\":{}},\"comment\":{}}],[\"technicolor\",{\"_index\":419,\"name\":{\"585\":{}},\"comment\":{}}],[\"tensor\",{\"_index\":8,\"name\":{\"8\":{},\"133\":{},\"303\":{},\"635\":{}},\"comment\":{}}],[\"tensorflow\",{\"_index\":312,\"name\":{\"374\":{}},\"comment\":{}}],[\"tensorlike\",{\"_index\":254,\"name\":{\"304\":{}},\"comment\":{}}],[\"tf\",{\"_index\":10,\"name\":{\"10\":{}},\"comment\":{}}],[\"tfjs\",{\"_index\":309,\"name\":{\"369\":{}},\"comment\":{}}],[\"throwifdisposed\",{\"_index\":111,\"name\":{\"155\":{}},\"comment\":{}}],[\"tile\",{\"_index\":241,\"name\":{\"286\":{}},\"comment\":{}}],[\"timestamp\",{\"_index\":470,\"name\":{\"693\":{}},\"comment\":{}}],[\"tobool\",{\"_index\":242,\"name\":{\"287\":{}},\"comment\":{}}],[\"tofloat\",{\"_index\":243,\"name\":{\"288\":{}},\"comment\":{}}],[\"toint\",{\"_index\":244,\"name\":{\"289\":{}},\"comment\":{}}],[\"topk\",{\"_index\":245,\"name\":{\"290\":{}},\"comment\":{}}],[\"tostring\",{\"_index\":114,\"name\":{\"158\":{}},\"comment\":{}}],[\"totalsizeenabled\",{\"_index\":85,\"name\":{\"125\":{}},\"comment\":{}}],[\"totalsizefrommanifest\",{\"_index\":82,\"name\":{\"122\":{}},\"comment\":{}}],[\"totalsizeloading\",{\"_index\":84,\"name\":{\"124\":{}},\"comment\":{}}],[\"totalsizeweights\",{\"_index\":83,\"name\":{\"123\":{}},\"comment\":{}}],[\"track\",{\"_index\":346,\"name\":{\"425\":{}},\"comment\":{}}],[\"transpose\",{\"_index\":248,\"name\":{\"294\":{}},\"comment\":{}}],[\"unique\",{\"_index\":249,\"name\":{\"295\":{}},\"comment\":{}}],[\"unsortedsegmentsum\",{\"_index\":250,\"name\":{\"299\":{}},\"comment\":{}}],[\"unstack\",{\"_index\":251,\"name\":{\"300\":{}},\"comment\":{}}],[\"updatebackend\",{\"_index\":328,\"name\":{\"403\":{}},\"comment\":{}}],[\"updatecpu\",{\"_index\":329,\"name\":{\"404\":{}},\"comment\":{}}],[\"url\",{\"_index\":88,\"name\":{\"130\":{}},\"comment\":{}}],[\"usecurves\",{\"_index\":298,\"name\":{\"355\":{}},\"comment\":{}}],[\"usedepth\",{\"_index\":297,\"name\":{\"354\":{}},\"comment\":{}}],[\"validate\",{\"_index\":28,\"name\":{\"38\":{},\"91\":{}},\"comment\":{}}],[\"validatemodel\",{\"_index\":54,\"name\":{\"90\":{}},\"comment\":{}}],[\"validatemodels\",{\"_index\":430,\"name\":{\"601\":{}},\"comment\":{}}],[\"values\",{\"_index\":246,\"name\":{\"292\":{},\"297\":{}},\"comment\":{}}],[\"variable\",{\"_index\":115,\"name\":{\"159\":{}},\"comment\":{}}],[\"version\",{\"_index\":2,\"name\":{\"2\":{},\"371\":{},\"376\":{},\"388\":{}},\"comment\":{}}],[\"video\",{\"_index\":49,\"name\":{\"65\":{}},\"comment\":{}}],[\"vintage\",{\"_index\":417,\"name\":{\"583\":{}},\"comment\":{}}],[\"warmup\",{\"_index\":45,\"name\":{\"61\":{},\"598\":{}},\"comment\":{}}],[\"warmupenum\",{\"_index\":424,\"name\":{\"591\":{}},\"comment\":{}}],[\"wasm\",{\"_index\":314,\"name\":{\"378\":{}},\"comment\":{}}],[\"wasmpath\",{\"_index\":425,\"name\":{\"594\":{}},\"comment\":{}}],[\"wasmplatformfetch\",{\"_index\":426,\"name\":{\"595\":{}},\"comment\":{}}],[\"webcam\",{\"_index\":40,\"name\":{\"56\":{},\"420\":{}},\"comment\":{}}],[\"webcamconfig\",{\"_index\":358,\"name\":{\"437\":{}},\"comment\":{}}],[\"webgl\",{\"_index\":319,\"name\":{\"384\":{}},\"comment\":{}}],[\"webgpu\",{\"_index\":321,\"name\":{\"390\":{}},\"comment\":{}}],[\"weights\",{\"_index\":261,\"name\":{\"312\":{}},\"comment\":{}}],[\"where\",{\"_index\":252,\"name\":{\"301\":{}},\"comment\":{}}],[\"width\",{\"_index\":352,\"name\":{\"431\":{},\"442\":{},\"571\":{}},\"comment\":{}}],[\"worker\",{\"_index\":303,\"name\":{\"363\":{}},\"comment\":{}}],[\"zeroslike\",{\"_index\":253,\"name\":{\"302\":{}},\"comment\":{}}]],\"pipeline\":[]}}"); \ No newline at end of file +window.searchData = JSON.parse("{\"kinds\":{\"4\":\"Namespace\",\"8\":\"Enumeration\",\"16\":\"Enumeration Member\",\"32\":\"Variable\",\"64\":\"Function\",\"128\":\"Class\",\"256\":\"Interface\",\"512\":\"Constructor\",\"1024\":\"Property\",\"2048\":\"Method\",\"65536\":\"Type literal\",\"262144\":\"Accessor\",\"4194304\":\"Type alias\",\"8388608\":\"Reference\"},\"rows\":[{\"kind\":128,\"name\":\"Human\",\"url\":\"classes/Human.html\",\"classes\":\"tsd-kind-class\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/Human.html#constructor\",\"classes\":\"tsd-kind-constructor tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":1024,\"name\":\"version\",\"url\":\"classes/Human.html#version\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":1024,\"name\":\"config\",\"url\":\"classes/Human.html#config\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":1024,\"name\":\"result\",\"url\":\"classes/Human.html#result\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":1024,\"name\":\"state\",\"url\":\"classes/Human.html#state\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":1024,\"name\":\"process\",\"url\":\"classes/Human.html#process\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Human.html#__type-22\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":1024,\"name\":\"tensor\",\"url\":\"classes/Human.html#__type-22.tensor\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Human.__type\"},{\"kind\":1024,\"name\":\"canvas\",\"url\":\"classes/Human.html#__type-22.canvas-1\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Human.__type\"},{\"kind\":1024,\"name\":\"tf\",\"url\":\"classes/Human.html#tf\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":1024,\"name\":\"env\",\"url\":\"classes/Human.html#env\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":1024,\"name\":\"draw\",\"url\":\"classes/Human.html#draw\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Human.html#__type-2\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":1024,\"name\":\"canvas\",\"url\":\"classes/Human.html#__type-2.canvas\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Human.__type\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Human.html#__type-2.__type-7\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-literal\",\"parent\":\"Human.__type\"},{\"kind\":1024,\"name\":\"face\",\"url\":\"classes/Human.html#__type-2.face\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Human.__type\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Human.html#__type-2.__type-9\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-literal\",\"parent\":\"Human.__type\"},{\"kind\":1024,\"name\":\"body\",\"url\":\"classes/Human.html#__type-2.body\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Human.__type\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Human.html#__type-2.__type-5\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-literal\",\"parent\":\"Human.__type\"},{\"kind\":1024,\"name\":\"hand\",\"url\":\"classes/Human.html#__type-2.hand\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Human.__type\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Human.html#__type-2.__type-13\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-literal\",\"parent\":\"Human.__type\"},{\"kind\":1024,\"name\":\"gesture\",\"url\":\"classes/Human.html#__type-2.gesture\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Human.__type\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Human.html#__type-2.__type-11\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-literal\",\"parent\":\"Human.__type\"},{\"kind\":1024,\"name\":\"object\",\"url\":\"classes/Human.html#__type-2.object\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Human.__type\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Human.html#__type-2.__type-15\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-literal\",\"parent\":\"Human.__type\"},{\"kind\":1024,\"name\":\"person\",\"url\":\"classes/Human.html#__type-2.person\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Human.__type\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Human.html#__type-2.__type-17\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-literal\",\"parent\":\"Human.__type\"},{\"kind\":1024,\"name\":\"all\",\"url\":\"classes/Human.html#__type-2.all\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Human.__type\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Human.html#__type-2.__type-3\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-type-literal\",\"parent\":\"Human.__type\"},{\"kind\":1024,\"name\":\"options\",\"url\":\"classes/Human.html#__type-2.options\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Human.__type\"},{\"kind\":1024,\"name\":\"events\",\"url\":\"classes/Human.html#events\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":1024,\"name\":\"faceTriangulation\",\"url\":\"classes/Human.html#faceTriangulation\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":1024,\"name\":\"faceUVMap\",\"url\":\"classes/Human.html#faceUVMap\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":1024,\"name\":\"performance\",\"url\":\"classes/Human.html#performance\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":1024,\"name\":\"gl\",\"url\":\"classes/Human.html#gl\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":2048,\"name\":\"analyze\",\"url\":\"classes/Human.html#analyze\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":2048,\"name\":\"reset\",\"url\":\"classes/Human.html#reset\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":2048,\"name\":\"validate\",\"url\":\"classes/Human.html#validate\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":2048,\"name\":\"check\",\"url\":\"classes/Human.html#check\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":1024,\"name\":\"similarity\",\"url\":\"classes/Human.html#similarity-1\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Human.html#__type-23\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":1024,\"name\":\"distance\",\"url\":\"classes/Human.html#distance\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Human.html#__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":1024,\"name\":\"match\",\"url\":\"classes/Human.html#match\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Human.html#__type-19\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Human.html#__type-19.__type-20.__type-21\",\"classes\":\"tsd-kind-type-literal\",\"parent\":\"Human.__type.__type\"},{\"kind\":1024,\"name\":\"index\",\"url\":\"classes/Human.html#__type-19.__type-20.__type-21.index\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Human.__type.__type.__type\"},{\"kind\":1024,\"name\":\"distance\",\"url\":\"classes/Human.html#__type-19.__type-20.__type-21.distance-1\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Human.__type.__type.__type\"},{\"kind\":1024,\"name\":\"similarity\",\"url\":\"classes/Human.html#__type-19.__type-20.__type-21.similarity\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Human.__type.__type.__type\"},{\"kind\":2048,\"name\":\"now\",\"url\":\"classes/Human.html#now\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":2048,\"name\":\"image\",\"url\":\"classes/Human.html#image\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":2048,\"name\":\"segmentation\",\"url\":\"classes/Human.html#segmentation\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":2048,\"name\":\"enhance\",\"url\":\"classes/Human.html#enhance\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":2048,\"name\":\"compare\",\"url\":\"classes/Human.html#compare\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":2048,\"name\":\"init\",\"url\":\"classes/Human.html#init\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":1024,\"name\":\"webcam\",\"url\":\"classes/Human.html#webcam\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":2048,\"name\":\"load\",\"url\":\"classes/Human.html#load\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":2048,\"name\":\"emit\",\"url\":\"classes/Human.html#emit\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":2048,\"name\":\"next\",\"url\":\"classes/Human.html#next\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":2048,\"name\":\"getModelStats\",\"url\":\"classes/Human.html#getModelStats\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":2048,\"name\":\"warmup\",\"url\":\"classes/Human.html#warmup\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":2048,\"name\":\"profile\",\"url\":\"classes/Human.html#profile\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":2048,\"name\":\"detect\",\"url\":\"classes/Human.html#detect\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":2048,\"name\":\"sleep\",\"url\":\"classes/Human.html#sleep\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":2048,\"name\":\"video\",\"url\":\"classes/Human.html#video\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Human\"},{\"kind\":8388608,\"name\":\"default\",\"url\":\"index.html#default\",\"classes\":\"tsd-kind-reference\"},{\"kind\":4,\"name\":\"match\",\"url\":\"modules/match.html\",\"classes\":\"tsd-kind-namespace\"},{\"kind\":64,\"name\":\"distance\",\"url\":\"functions/match.distance.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"match\"},{\"kind\":64,\"name\":\"similarity\",\"url\":\"functions/match.similarity.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"match\"},{\"kind\":64,\"name\":\"match\",\"url\":\"functions/match.match.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"match\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"functions/match.match.html#match.__type\",\"classes\":\"tsd-kind-type-literal\",\"parent\":\"match.match.match\"},{\"kind\":1024,\"name\":\"index\",\"url\":\"functions/match.match.html#match.__type.index\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"match.match.match.__type\"},{\"kind\":1024,\"name\":\"distance\",\"url\":\"functions/match.match.html#match.__type.distance\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"match.match.match.__type\"},{\"kind\":1024,\"name\":\"similarity\",\"url\":\"functions/match.match.html#match.__type.similarity\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"match.match.match.__type\"},{\"kind\":4194304,\"name\":\"Descriptor\",\"url\":\"types/match.Descriptor.html\",\"classes\":\"tsd-kind-type-alias tsd-parent-kind-namespace\",\"parent\":\"match\"},{\"kind\":4194304,\"name\":\"MatchOptions\",\"url\":\"types/match.MatchOptions.html\",\"classes\":\"tsd-kind-type-alias tsd-parent-kind-namespace\",\"parent\":\"match\"},{\"kind\":4,\"name\":\"draw\",\"url\":\"modules/draw.html\",\"classes\":\"tsd-kind-namespace\"},{\"kind\":64,\"name\":\"person\",\"url\":\"functions/draw.person.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"draw\"},{\"kind\":64,\"name\":\"canvas\",\"url\":\"functions/draw.canvas.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"draw\"},{\"kind\":64,\"name\":\"all\",\"url\":\"functions/draw.all.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"draw\"},{\"kind\":32,\"name\":\"options\",\"url\":\"variables/draw.options.html\",\"classes\":\"tsd-kind-variable tsd-parent-kind-namespace\",\"parent\":\"draw\"},{\"kind\":8388608,\"name\":\"face\",\"url\":\"modules/draw.html#face\",\"classes\":\"tsd-kind-reference tsd-parent-kind-namespace\",\"parent\":\"draw\"},{\"kind\":8388608,\"name\":\"body\",\"url\":\"modules/draw.html#body\",\"classes\":\"tsd-kind-reference tsd-parent-kind-namespace\",\"parent\":\"draw\"},{\"kind\":8388608,\"name\":\"hand\",\"url\":\"modules/draw.html#hand\",\"classes\":\"tsd-kind-reference tsd-parent-kind-namespace\",\"parent\":\"draw\"},{\"kind\":8388608,\"name\":\"object\",\"url\":\"modules/draw.html#object\",\"classes\":\"tsd-kind-reference tsd-parent-kind-namespace\",\"parent\":\"draw\"},{\"kind\":8388608,\"name\":\"gesture\",\"url\":\"modules/draw.html#gesture\",\"classes\":\"tsd-kind-reference tsd-parent-kind-namespace\",\"parent\":\"draw\"},{\"kind\":4,\"name\":\"models\",\"url\":\"modules/models.html\",\"classes\":\"tsd-kind-namespace\"},{\"kind\":64,\"name\":\"reset\",\"url\":\"functions/models.reset.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"models\"},{\"kind\":64,\"name\":\"load\",\"url\":\"functions/models.load.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"models\"},{\"kind\":64,\"name\":\"validateModel\",\"url\":\"functions/models.validateModel.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"models\"},{\"kind\":64,\"name\":\"validate\",\"url\":\"functions/models.validate.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"models\"},{\"kind\":128,\"name\":\"Models\",\"url\":\"classes/models.Models.html\",\"classes\":\"tsd-kind-class tsd-parent-kind-namespace\",\"parent\":\"models\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/models.Models.html#constructor\",\"classes\":\"tsd-kind-constructor tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"ssrnetage\",\"url\":\"classes/models.Models.html#ssrnetage\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"gear\",\"url\":\"classes/models.Models.html#gear\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"blazeposedetect\",\"url\":\"classes/models.Models.html#blazeposedetect\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"blazepose\",\"url\":\"classes/models.Models.html#blazepose\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"centernet\",\"url\":\"classes/models.Models.html#centernet\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"efficientpose\",\"url\":\"classes/models.Models.html#efficientpose\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"mobilefacenet\",\"url\":\"classes/models.Models.html#mobilefacenet\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"insightface\",\"url\":\"classes/models.Models.html#insightface\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"emotion\",\"url\":\"classes/models.Models.html#emotion\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"facedetect\",\"url\":\"classes/models.Models.html#facedetect\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"faceiris\",\"url\":\"classes/models.Models.html#faceiris\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"facemesh\",\"url\":\"classes/models.Models.html#facemesh\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"faceres\",\"url\":\"classes/models.Models.html#faceres\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"ssrnetgender\",\"url\":\"classes/models.Models.html#ssrnetgender\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"handpose\",\"url\":\"classes/models.Models.html#handpose\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"handskeleton\",\"url\":\"classes/models.Models.html#handskeleton\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"handtrack\",\"url\":\"classes/models.Models.html#handtrack\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"liveness\",\"url\":\"classes/models.Models.html#liveness\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"meet\",\"url\":\"classes/models.Models.html#meet\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"movenet\",\"url\":\"classes/models.Models.html#movenet\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"nanodet\",\"url\":\"classes/models.Models.html#nanodet\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"posenet\",\"url\":\"classes/models.Models.html#posenet\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"selfie\",\"url\":\"classes/models.Models.html#selfie\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"rvm\",\"url\":\"classes/models.Models.html#rvm\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":1024,\"name\":\"antispoof\",\"url\":\"classes/models.Models.html#antispoof\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"models.Models\"},{\"kind\":256,\"name\":\"ModelStats\",\"url\":\"interfaces/models.ModelStats.html\",\"classes\":\"tsd-kind-interface tsd-parent-kind-namespace\",\"parent\":\"models\"},{\"kind\":1024,\"name\":\"numLoadedModels\",\"url\":\"interfaces/models.ModelStats.html#numLoadedModels\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"models.ModelStats\"},{\"kind\":1024,\"name\":\"numDefinedModels\",\"url\":\"interfaces/models.ModelStats.html#numDefinedModels\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"models.ModelStats\"},{\"kind\":1024,\"name\":\"percentageLoaded\",\"url\":\"interfaces/models.ModelStats.html#percentageLoaded\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"models.ModelStats\"},{\"kind\":1024,\"name\":\"totalSizeFromManifest\",\"url\":\"interfaces/models.ModelStats.html#totalSizeFromManifest\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"models.ModelStats\"},{\"kind\":1024,\"name\":\"totalSizeWeights\",\"url\":\"interfaces/models.ModelStats.html#totalSizeWeights\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"models.ModelStats\"},{\"kind\":1024,\"name\":\"totalSizeLoading\",\"url\":\"interfaces/models.ModelStats.html#totalSizeLoading\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"models.ModelStats\"},{\"kind\":1024,\"name\":\"totalSizeEnabled\",\"url\":\"interfaces/models.ModelStats.html#totalSizeEnabled\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"models.ModelStats\"},{\"kind\":1024,\"name\":\"modelStats\",\"url\":\"interfaces/models.ModelStats.html#modelStats\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"models.ModelStats\"},{\"kind\":64,\"name\":\"getModelStats\",\"url\":\"functions/models.getModelStats.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"models\"},{\"kind\":256,\"name\":\"KernelOps\",\"url\":\"interfaces/models.KernelOps.html\",\"classes\":\"tsd-kind-interface tsd-parent-kind-namespace\",\"parent\":\"models\"},{\"kind\":1024,\"name\":\"name\",\"url\":\"interfaces/models.KernelOps.html#name\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"models.KernelOps\"},{\"kind\":1024,\"name\":\"url\",\"url\":\"interfaces/models.KernelOps.html#url\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"models.KernelOps\"},{\"kind\":1024,\"name\":\"missing\",\"url\":\"interfaces/models.KernelOps.html#missing\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"models.KernelOps\"},{\"kind\":1024,\"name\":\"ops\",\"url\":\"interfaces/models.KernelOps.html#ops\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"models.KernelOps\"},{\"kind\":128,\"name\":\"Tensor\",\"url\":\"classes/Tensor-1.html\",\"classes\":\"tsd-kind-class\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/Tensor-1.html#constructor\",\"classes\":\"tsd-kind-constructor tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":1024,\"name\":\"id\",\"url\":\"classes/Tensor-1.html#id\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":1024,\"name\":\"dataId\",\"url\":\"classes/Tensor-1.html#dataId\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":1024,\"name\":\"shape\",\"url\":\"classes/Tensor-1.html#shape\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":1024,\"name\":\"size\",\"url\":\"classes/Tensor-1.html#size\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":1024,\"name\":\"dtype\",\"url\":\"classes/Tensor-1.html#dtype\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":1024,\"name\":\"rankType\",\"url\":\"classes/Tensor-1.html#rankType\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":1024,\"name\":\"kept\",\"url\":\"classes/Tensor-1.html#kept\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":1024,\"name\":\"scopeId\",\"url\":\"classes/Tensor-1.html#scopeId\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":1024,\"name\":\"strides\",\"url\":\"classes/Tensor-1.html#strides\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":1024,\"name\":\"rank\",\"url\":\"classes/Tensor-1.html#rank\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"buffer\",\"url\":\"classes/Tensor-1.html#buffer\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"bufferSync\",\"url\":\"classes/Tensor-1.html#bufferSync\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"array\",\"url\":\"classes/Tensor-1.html#array\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"arraySync\",\"url\":\"classes/Tensor-1.html#arraySync\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"data\",\"url\":\"classes/Tensor-1.html#data\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"dataToGPU\",\"url\":\"classes/Tensor-1.html#dataToGPU\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"dataSync\",\"url\":\"classes/Tensor-1.html#dataSync\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"bytes\",\"url\":\"classes/Tensor-1.html#bytes\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"dispose\",\"url\":\"classes/Tensor-1.html#dispose\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":1024,\"name\":\"isDisposed\",\"url\":\"classes/Tensor-1.html#isDisposed\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"throwIfDisposed\",\"url\":\"classes/Tensor-1.html#throwIfDisposed\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"print\",\"url\":\"classes/Tensor-1.html#print\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"clone\",\"url\":\"classes/Tensor-1.html#clone\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"toString\",\"url\":\"classes/Tensor-1.html#toString\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"variable\",\"url\":\"classes/Tensor-1.html#variable\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"abs\",\"url\":\"classes/Tensor-1.html#abs\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"acos\",\"url\":\"classes/Tensor-1.html#acos\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"acosh\",\"url\":\"classes/Tensor-1.html#acosh\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"add\",\"url\":\"classes/Tensor-1.html#add\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"all\",\"url\":\"classes/Tensor-1.html#all\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"any\",\"url\":\"classes/Tensor-1.html#any\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"argMax\",\"url\":\"classes/Tensor-1.html#argMax\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"argMin\",\"url\":\"classes/Tensor-1.html#argMin\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"asScalar\",\"url\":\"classes/Tensor-1.html#asScalar\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"asType\",\"url\":\"classes/Tensor-1.html#asType\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"as1D\",\"url\":\"classes/Tensor-1.html#as1D\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"as2D\",\"url\":\"classes/Tensor-1.html#as2D\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"as3D\",\"url\":\"classes/Tensor-1.html#as3D\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"as4D\",\"url\":\"classes/Tensor-1.html#as4D\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"as5D\",\"url\":\"classes/Tensor-1.html#as5D\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"asin\",\"url\":\"classes/Tensor-1.html#asin\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"asinh\",\"url\":\"classes/Tensor-1.html#asinh\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"atan\",\"url\":\"classes/Tensor-1.html#atan\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"atan2\",\"url\":\"classes/Tensor-1.html#atan2\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"atanh\",\"url\":\"classes/Tensor-1.html#atanh\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"avgPool\",\"url\":\"classes/Tensor-1.html#avgPool\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"batchToSpaceND\",\"url\":\"classes/Tensor-1.html#batchToSpaceND\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"batchNorm\",\"url\":\"classes/Tensor-1.html#batchNorm\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"broadcastTo\",\"url\":\"classes/Tensor-1.html#broadcastTo\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"cast\",\"url\":\"classes/Tensor-1.html#cast\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"ceil\",\"url\":\"classes/Tensor-1.html#ceil\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"clipByValue\",\"url\":\"classes/Tensor-1.html#clipByValue\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"concat\",\"url\":\"classes/Tensor-1.html#concat\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"conv1d\",\"url\":\"classes/Tensor-1.html#conv1d\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"conv2dTranspose\",\"url\":\"classes/Tensor-1.html#conv2dTranspose\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"conv2d\",\"url\":\"classes/Tensor-1.html#conv2d\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"cos\",\"url\":\"classes/Tensor-1.html#cos\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"cosh\",\"url\":\"classes/Tensor-1.html#cosh\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"cumprod\",\"url\":\"classes/Tensor-1.html#cumprod\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"cumsum\",\"url\":\"classes/Tensor-1.html#cumsum\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"depthToSpace\",\"url\":\"classes/Tensor-1.html#depthToSpace\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"depthwiseConv2d\",\"url\":\"classes/Tensor-1.html#depthwiseConv2d\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"dilation2d\",\"url\":\"classes/Tensor-1.html#dilation2d\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"divNoNan\",\"url\":\"classes/Tensor-1.html#divNoNan\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"div\",\"url\":\"classes/Tensor-1.html#div\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"dot\",\"url\":\"classes/Tensor-1.html#dot\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"elu\",\"url\":\"classes/Tensor-1.html#elu\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"equal\",\"url\":\"classes/Tensor-1.html#equal\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"erf\",\"url\":\"classes/Tensor-1.html#erf\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"euclideanNorm\",\"url\":\"classes/Tensor-1.html#euclideanNorm\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"exp\",\"url\":\"classes/Tensor-1.html#exp\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"expandDims\",\"url\":\"classes/Tensor-1.html#expandDims\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"expm1\",\"url\":\"classes/Tensor-1.html#expm1\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"fft\",\"url\":\"classes/Tensor-1.html#fft\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"flatten\",\"url\":\"classes/Tensor-1.html#flatten\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"floor\",\"url\":\"classes/Tensor-1.html#floor\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"floorDiv\",\"url\":\"classes/Tensor-1.html#floorDiv\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"gather\",\"url\":\"classes/Tensor-1.html#gather\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"greaterEqual\",\"url\":\"classes/Tensor-1.html#greaterEqual\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"greater\",\"url\":\"classes/Tensor-1.html#greater\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"ifft\",\"url\":\"classes/Tensor-1.html#ifft\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"irfft\",\"url\":\"classes/Tensor-1.html#irfft\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"isFinite\",\"url\":\"classes/Tensor-1.html#isFinite\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"isInf\",\"url\":\"classes/Tensor-1.html#isInf\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"isNaN\",\"url\":\"classes/Tensor-1.html#isNaN\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"leakyRelu\",\"url\":\"classes/Tensor-1.html#leakyRelu\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"lessEqual\",\"url\":\"classes/Tensor-1.html#lessEqual\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"less\",\"url\":\"classes/Tensor-1.html#less\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"localResponseNormalization\",\"url\":\"classes/Tensor-1.html#localResponseNormalization\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"logSigmoid\",\"url\":\"classes/Tensor-1.html#logSigmoid\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"logSoftmax\",\"url\":\"classes/Tensor-1.html#logSoftmax\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"logSumExp\",\"url\":\"classes/Tensor-1.html#logSumExp\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"log\",\"url\":\"classes/Tensor-1.html#log\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"log1p\",\"url\":\"classes/Tensor-1.html#log1p\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"logicalAnd\",\"url\":\"classes/Tensor-1.html#logicalAnd\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"logicalNot\",\"url\":\"classes/Tensor-1.html#logicalNot\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"logicalOr\",\"url\":\"classes/Tensor-1.html#logicalOr\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"logicalXor\",\"url\":\"classes/Tensor-1.html#logicalXor\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"matMul\",\"url\":\"classes/Tensor-1.html#matMul\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"maxPool\",\"url\":\"classes/Tensor-1.html#maxPool\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"max\",\"url\":\"classes/Tensor-1.html#max\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"maximum\",\"url\":\"classes/Tensor-1.html#maximum\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"mean\",\"url\":\"classes/Tensor-1.html#mean\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"min\",\"url\":\"classes/Tensor-1.html#min\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"minimum\",\"url\":\"classes/Tensor-1.html#minimum\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"mirrorPad\",\"url\":\"classes/Tensor-1.html#mirrorPad\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"mod\",\"url\":\"classes/Tensor-1.html#mod\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"mul\",\"url\":\"classes/Tensor-1.html#mul\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"neg\",\"url\":\"classes/Tensor-1.html#neg\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"norm\",\"url\":\"classes/Tensor-1.html#norm\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"notEqual\",\"url\":\"classes/Tensor-1.html#notEqual\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"oneHot\",\"url\":\"classes/Tensor-1.html#oneHot\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"onesLike\",\"url\":\"classes/Tensor-1.html#onesLike\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"pad\",\"url\":\"classes/Tensor-1.html#pad\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"pool\",\"url\":\"classes/Tensor-1.html#pool\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"pow\",\"url\":\"classes/Tensor-1.html#pow\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"prelu\",\"url\":\"classes/Tensor-1.html#prelu\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"prod\",\"url\":\"classes/Tensor-1.html#prod\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"reciprocal\",\"url\":\"classes/Tensor-1.html#reciprocal\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"relu\",\"url\":\"classes/Tensor-1.html#relu\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"relu6\",\"url\":\"classes/Tensor-1.html#relu6\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"reshapeAs\",\"url\":\"classes/Tensor-1.html#reshapeAs\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"reshape\",\"url\":\"classes/Tensor-1.html#reshape\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"resizeBilinear\",\"url\":\"classes/Tensor-1.html#resizeBilinear\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"resizeNearestNeighbor\",\"url\":\"classes/Tensor-1.html#resizeNearestNeighbor\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"reverse\",\"url\":\"classes/Tensor-1.html#reverse\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"rfft\",\"url\":\"classes/Tensor-1.html#rfft\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"round\",\"url\":\"classes/Tensor-1.html#round\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"rsqrt\",\"url\":\"classes/Tensor-1.html#rsqrt\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"selu\",\"url\":\"classes/Tensor-1.html#selu\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"separableConv2d\",\"url\":\"classes/Tensor-1.html#separableConv2d\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"sigmoid\",\"url\":\"classes/Tensor-1.html#sigmoid\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"sign\",\"url\":\"classes/Tensor-1.html#sign\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"sin\",\"url\":\"classes/Tensor-1.html#sin\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"sinh\",\"url\":\"classes/Tensor-1.html#sinh\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"slice\",\"url\":\"classes/Tensor-1.html#slice\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"softmax\",\"url\":\"classes/Tensor-1.html#softmax\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"softplus\",\"url\":\"classes/Tensor-1.html#softplus\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"spaceToBatchND\",\"url\":\"classes/Tensor-1.html#spaceToBatchND\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"split\",\"url\":\"classes/Tensor-1.html#split\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"sqrt\",\"url\":\"classes/Tensor-1.html#sqrt\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"square\",\"url\":\"classes/Tensor-1.html#square\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"squaredDifference\",\"url\":\"classes/Tensor-1.html#squaredDifference\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"squeeze\",\"url\":\"classes/Tensor-1.html#squeeze\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"stack\",\"url\":\"classes/Tensor-1.html#stack\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"step\",\"url\":\"classes/Tensor-1.html#step\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"stridedSlice\",\"url\":\"classes/Tensor-1.html#stridedSlice\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"sub\",\"url\":\"classes/Tensor-1.html#sub\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"sum\",\"url\":\"classes/Tensor-1.html#sum\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"tan\",\"url\":\"classes/Tensor-1.html#tan\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"tanh\",\"url\":\"classes/Tensor-1.html#tanh\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"tile\",\"url\":\"classes/Tensor-1.html#tile\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"toBool\",\"url\":\"classes/Tensor-1.html#toBool\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"toFloat\",\"url\":\"classes/Tensor-1.html#toFloat\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"toInt\",\"url\":\"classes/Tensor-1.html#toInt\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"topk\",\"url\":\"classes/Tensor-1.html#topk\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Tensor-1.html#topk.topk-1.__type\",\"classes\":\"tsd-kind-type-literal\",\"parent\":\"Tensor.topk.topk\"},{\"kind\":1024,\"name\":\"values\",\"url\":\"classes/Tensor-1.html#topk.topk-1.__type.values\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Tensor.topk.topk.__type\"},{\"kind\":1024,\"name\":\"indices\",\"url\":\"classes/Tensor-1.html#topk.topk-1.__type.indices\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Tensor.topk.topk.__type\"},{\"kind\":2048,\"name\":\"transpose\",\"url\":\"classes/Tensor-1.html#transpose\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"unique\",\"url\":\"classes/Tensor-1.html#unique\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Tensor-1.html#unique.unique-1.__type-1\",\"classes\":\"tsd-kind-type-literal\",\"parent\":\"Tensor.unique.unique\"},{\"kind\":1024,\"name\":\"values\",\"url\":\"classes/Tensor-1.html#unique.unique-1.__type-1.values-1\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Tensor.unique.unique.__type\"},{\"kind\":1024,\"name\":\"indices\",\"url\":\"classes/Tensor-1.html#unique.unique-1.__type-1.indices-1\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Tensor.unique.unique.__type\"},{\"kind\":2048,\"name\":\"unsortedSegmentSum\",\"url\":\"classes/Tensor-1.html#unsortedSegmentSum\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"unstack\",\"url\":\"classes/Tensor-1.html#unstack\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"where\",\"url\":\"classes/Tensor-1.html#where\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":2048,\"name\":\"zerosLike\",\"url\":\"classes/Tensor-1.html#zerosLike\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Tensor\"},{\"kind\":4,\"name\":\"Tensor\",\"url\":\"modules/Tensor.html\",\"classes\":\"tsd-kind-namespace\"},{\"kind\":4194304,\"name\":\"TensorLike\",\"url\":\"types/TensorLike.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":128,\"name\":\"GraphModel\",\"url\":\"classes/GraphModel.html\",\"classes\":\"tsd-kind-class\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/GraphModel.html#constructor\",\"classes\":\"tsd-kind-constructor tsd-parent-kind-class\",\"parent\":\"GraphModel\"},{\"kind\":1024,\"name\":\"modelVersion\",\"url\":\"classes/GraphModel.html#modelVersion\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"GraphModel\"},{\"kind\":1024,\"name\":\"inputNodes\",\"url\":\"classes/GraphModel.html#inputNodes\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"GraphModel\"},{\"kind\":1024,\"name\":\"outputNodes\",\"url\":\"classes/GraphModel.html#outputNodes\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"GraphModel\"},{\"kind\":1024,\"name\":\"inputs\",\"url\":\"classes/GraphModel.html#inputs\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"GraphModel\"},{\"kind\":1024,\"name\":\"outputs\",\"url\":\"classes/GraphModel.html#outputs\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"GraphModel\"},{\"kind\":1024,\"name\":\"weights\",\"url\":\"classes/GraphModel.html#weights\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"GraphModel\"},{\"kind\":1024,\"name\":\"metadata\",\"url\":\"classes/GraphModel.html#metadata\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"GraphModel\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/GraphModel.html#__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-class\",\"parent\":\"GraphModel\"},{\"kind\":1024,\"name\":\"modelSignature\",\"url\":\"classes/GraphModel.html#modelSignature\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"GraphModel\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/GraphModel.html#__type-1\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-class\",\"parent\":\"GraphModel\"},{\"kind\":1024,\"name\":\"modelStructuredOutputKeys\",\"url\":\"classes/GraphModel.html#modelStructuredOutputKeys\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"GraphModel\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/GraphModel.html#__type-2\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-class\",\"parent\":\"GraphModel\"},{\"kind\":2048,\"name\":\"load\",\"url\":\"classes/GraphModel.html#load\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"GraphModel\"},{\"kind\":2048,\"name\":\"loadSync\",\"url\":\"classes/GraphModel.html#loadSync\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"GraphModel\"},{\"kind\":2048,\"name\":\"save\",\"url\":\"classes/GraphModel.html#save\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"GraphModel\"},{\"kind\":2048,\"name\":\"predict\",\"url\":\"classes/GraphModel.html#predict\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"GraphModel\"},{\"kind\":2048,\"name\":\"execute\",\"url\":\"classes/GraphModel.html#execute\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"GraphModel\"},{\"kind\":2048,\"name\":\"executeAsync\",\"url\":\"classes/GraphModel.html#executeAsync\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"GraphModel\"},{\"kind\":2048,\"name\":\"getIntermediateTensors\",\"url\":\"classes/GraphModel.html#getIntermediateTensors\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"GraphModel\"},{\"kind\":2048,\"name\":\"disposeIntermediateTensors\",\"url\":\"classes/GraphModel.html#disposeIntermediateTensors\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"GraphModel\"},{\"kind\":2048,\"name\":\"dispose\",\"url\":\"classes/GraphModel.html#dispose\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"GraphModel\"},{\"kind\":8,\"name\":\"Rank\",\"url\":\"enums/Rank.html\",\"classes\":\"tsd-kind-enum\"},{\"kind\":16,\"name\":\"R0\",\"url\":\"enums/Rank.html#R0\",\"classes\":\"tsd-kind-enum-member tsd-parent-kind-enum\",\"parent\":\"Rank\"},{\"kind\":16,\"name\":\"R1\",\"url\":\"enums/Rank.html#R1\",\"classes\":\"tsd-kind-enum-member tsd-parent-kind-enum\",\"parent\":\"Rank\"},{\"kind\":16,\"name\":\"R2\",\"url\":\"enums/Rank.html#R2\",\"classes\":\"tsd-kind-enum-member tsd-parent-kind-enum\",\"parent\":\"Rank\"},{\"kind\":16,\"name\":\"R3\",\"url\":\"enums/Rank.html#R3\",\"classes\":\"tsd-kind-enum-member tsd-parent-kind-enum\",\"parent\":\"Rank\"},{\"kind\":16,\"name\":\"R4\",\"url\":\"enums/Rank.html#R4\",\"classes\":\"tsd-kind-enum-member tsd-parent-kind-enum\",\"parent\":\"Rank\"},{\"kind\":16,\"name\":\"R5\",\"url\":\"enums/Rank.html#R5\",\"classes\":\"tsd-kind-enum-member tsd-parent-kind-enum\",\"parent\":\"Rank\"},{\"kind\":16,\"name\":\"R6\",\"url\":\"enums/Rank.html#R6\",\"classes\":\"tsd-kind-enum-member tsd-parent-kind-enum\",\"parent\":\"Rank\"},{\"kind\":256,\"name\":\"DrawOptions\",\"url\":\"interfaces/DrawOptions.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"color\",\"url\":\"interfaces/DrawOptions.html#color\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"DrawOptions\"},{\"kind\":1024,\"name\":\"alpha\",\"url\":\"interfaces/DrawOptions.html#alpha\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"DrawOptions\"},{\"kind\":1024,\"name\":\"labelColor\",\"url\":\"interfaces/DrawOptions.html#labelColor\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"DrawOptions\"},{\"kind\":1024,\"name\":\"shadowColor\",\"url\":\"interfaces/DrawOptions.html#shadowColor\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"DrawOptions\"},{\"kind\":1024,\"name\":\"font\",\"url\":\"interfaces/DrawOptions.html#font\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"DrawOptions\"},{\"kind\":1024,\"name\":\"lineHeight\",\"url\":\"interfaces/DrawOptions.html#lineHeight\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"DrawOptions\"},{\"kind\":1024,\"name\":\"lineWidth\",\"url\":\"interfaces/DrawOptions.html#lineWidth\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"DrawOptions\"},{\"kind\":1024,\"name\":\"pointSize\",\"url\":\"interfaces/DrawOptions.html#pointSize\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"DrawOptions\"},{\"kind\":1024,\"name\":\"roundRect\",\"url\":\"interfaces/DrawOptions.html#roundRect\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"DrawOptions\"},{\"kind\":1024,\"name\":\"drawPoints\",\"url\":\"interfaces/DrawOptions.html#drawPoints\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"DrawOptions\"},{\"kind\":1024,\"name\":\"drawLabels\",\"url\":\"interfaces/DrawOptions.html#drawLabels\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"DrawOptions\"},{\"kind\":1024,\"name\":\"drawAttention\",\"url\":\"interfaces/DrawOptions.html#drawAttention\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"DrawOptions\"},{\"kind\":1024,\"name\":\"drawGestures\",\"url\":\"interfaces/DrawOptions.html#drawGestures\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"DrawOptions\"},{\"kind\":1024,\"name\":\"drawBoxes\",\"url\":\"interfaces/DrawOptions.html#drawBoxes\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"DrawOptions\"},{\"kind\":1024,\"name\":\"drawPolygons\",\"url\":\"interfaces/DrawOptions.html#drawPolygons\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"DrawOptions\"},{\"kind\":1024,\"name\":\"drawGaze\",\"url\":\"interfaces/DrawOptions.html#drawGaze\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"DrawOptions\"},{\"kind\":1024,\"name\":\"fillPolygons\",\"url\":\"interfaces/DrawOptions.html#fillPolygons\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"DrawOptions\"},{\"kind\":1024,\"name\":\"useDepth\",\"url\":\"interfaces/DrawOptions.html#useDepth\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"DrawOptions\"},{\"kind\":1024,\"name\":\"useCurves\",\"url\":\"interfaces/DrawOptions.html#useCurves\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"DrawOptions\"},{\"kind\":4194304,\"name\":\"Box\",\"url\":\"types/Box.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"Point\",\"url\":\"types/Point.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":32,\"name\":\"env\",\"url\":\"variables/env-1.html\",\"classes\":\"tsd-kind-variable\"},{\"kind\":128,\"name\":\"Env\",\"url\":\"classes/Env.html\",\"classes\":\"tsd-kind-class\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/Env.html#constructor\",\"classes\":\"tsd-kind-constructor tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":1024,\"name\":\"browser\",\"url\":\"classes/Env.html#browser\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":1024,\"name\":\"node\",\"url\":\"classes/Env.html#node\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":1024,\"name\":\"worker\",\"url\":\"classes/Env.html#worker\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":1024,\"name\":\"platform\",\"url\":\"classes/Env.html#platform\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":1024,\"name\":\"agent\",\"url\":\"classes/Env.html#agent\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":1024,\"name\":\"backends\",\"url\":\"classes/Env.html#backends\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":1024,\"name\":\"initial\",\"url\":\"classes/Env.html#initial\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":1024,\"name\":\"filter\",\"url\":\"classes/Env.html#filter\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":1024,\"name\":\"tfjs\",\"url\":\"classes/Env.html#tfjs\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Env.html#__type-2\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":1024,\"name\":\"version\",\"url\":\"classes/Env.html#__type-2.version-1\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Env.__type\"},{\"kind\":1024,\"name\":\"offscreen\",\"url\":\"classes/Env.html#offscreen\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":1024,\"name\":\"perfadd\",\"url\":\"classes/Env.html#perfadd\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":1024,\"name\":\"tensorflow\",\"url\":\"classes/Env.html#tensorflow\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Env.html#__type-1\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":1024,\"name\":\"version\",\"url\":\"classes/Env.html#__type-1.version\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Env.__type\"},{\"kind\":1024,\"name\":\"gpu\",\"url\":\"classes/Env.html#__type-1.gpu\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Env.__type\"},{\"kind\":1024,\"name\":\"wasm\",\"url\":\"classes/Env.html#wasm\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Env.html#__type-3\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":1024,\"name\":\"supported\",\"url\":\"classes/Env.html#__type-3.supported\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Env.__type\"},{\"kind\":1024,\"name\":\"backend\",\"url\":\"classes/Env.html#__type-3.backend\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Env.__type\"},{\"kind\":1024,\"name\":\"simd\",\"url\":\"classes/Env.html#__type-3.simd\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Env.__type\"},{\"kind\":1024,\"name\":\"multithread\",\"url\":\"classes/Env.html#__type-3.multithread\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Env.__type\"},{\"kind\":1024,\"name\":\"webgl\",\"url\":\"classes/Env.html#webgl\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Env.html#__type-4\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":1024,\"name\":\"supported\",\"url\":\"classes/Env.html#__type-4.supported-1\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Env.__type\"},{\"kind\":1024,\"name\":\"backend\",\"url\":\"classes/Env.html#__type-4.backend-1\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Env.__type\"},{\"kind\":1024,\"name\":\"version\",\"url\":\"classes/Env.html#__type-4.version-2\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Env.__type\"},{\"kind\":1024,\"name\":\"renderer\",\"url\":\"classes/Env.html#__type-4.renderer\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Env.__type\"},{\"kind\":1024,\"name\":\"webgpu\",\"url\":\"classes/Env.html#webgpu\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Env.html#__type-5\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":1024,\"name\":\"supported\",\"url\":\"classes/Env.html#__type-5.supported-2\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Env.__type\"},{\"kind\":1024,\"name\":\"backend\",\"url\":\"classes/Env.html#__type-5.backend-2\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Env.__type\"},{\"kind\":1024,\"name\":\"adapter\",\"url\":\"classes/Env.html#__type-5.adapter\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Env.__type\"},{\"kind\":1024,\"name\":\"cpu\",\"url\":\"classes/Env.html#cpu\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"classes/Env.html#__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":1024,\"name\":\"model\",\"url\":\"classes/Env.html#__type.model\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Env.__type\"},{\"kind\":1024,\"name\":\"flags\",\"url\":\"classes/Env.html#__type.flags\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"Env.__type\"},{\"kind\":1024,\"name\":\"kernels\",\"url\":\"classes/Env.html#kernels\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":1024,\"name\":\"Canvas\",\"url\":\"classes/Env.html#Canvas\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":1024,\"name\":\"Image\",\"url\":\"classes/Env.html#Image\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":1024,\"name\":\"ImageData\",\"url\":\"classes/Env.html#ImageData\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":2048,\"name\":\"updateBackend\",\"url\":\"classes/Env.html#updateBackend\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":2048,\"name\":\"updateCPU\",\"url\":\"classes/Env.html#updateCPU\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"Env\"},{\"kind\":4194304,\"name\":\"FaceGesture\",\"url\":\"types/FaceGesture.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"BodyGesture\",\"url\":\"types/BodyGesture.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"HandGesture\",\"url\":\"types/HandGesture.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"IrisGesture\",\"url\":\"types/IrisGesture.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"Emotion\",\"url\":\"types/Emotion.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"Finger\",\"url\":\"types/Finger.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"FingerCurl\",\"url\":\"types/FingerCurl.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"FingerDirection\",\"url\":\"types/FingerDirection.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"HandType\",\"url\":\"types/HandType.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"Gender\",\"url\":\"types/Gender.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"Race\",\"url\":\"types/Race.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"FaceLandmark\",\"url\":\"types/FaceLandmark.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"BodyLandmark\",\"url\":\"types/BodyLandmark.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"BodyAnnotation\",\"url\":\"types/BodyAnnotation.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"ObjectType\",\"url\":\"types/ObjectType.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":128,\"name\":\"WebCam\",\"url\":\"classes/WebCam.html\",\"classes\":\"tsd-kind-class\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/WebCam.html#constructor\",\"classes\":\"tsd-kind-constructor tsd-parent-kind-class\",\"parent\":\"WebCam\"},{\"kind\":1024,\"name\":\"config\",\"url\":\"classes/WebCam.html#config\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"WebCam\"},{\"kind\":1024,\"name\":\"element\",\"url\":\"classes/WebCam.html#element\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"WebCam\"},{\"kind\":1024,\"name\":\"stream\",\"url\":\"classes/WebCam.html#stream\",\"classes\":\"tsd-kind-property tsd-parent-kind-class\",\"parent\":\"WebCam\"},{\"kind\":262144,\"name\":\"track\",\"url\":\"classes/WebCam.html#track\",\"classes\":\"tsd-kind-accessor tsd-parent-kind-class\",\"parent\":\"WebCam\"},{\"kind\":262144,\"name\":\"capabilities\",\"url\":\"classes/WebCam.html#capabilities\",\"classes\":\"tsd-kind-accessor tsd-parent-kind-class\",\"parent\":\"WebCam\"},{\"kind\":262144,\"name\":\"constraints\",\"url\":\"classes/WebCam.html#constraints\",\"classes\":\"tsd-kind-accessor tsd-parent-kind-class\",\"parent\":\"WebCam\"},{\"kind\":262144,\"name\":\"settings\",\"url\":\"classes/WebCam.html#settings\",\"classes\":\"tsd-kind-accessor tsd-parent-kind-class\",\"parent\":\"WebCam\"},{\"kind\":262144,\"name\":\"label\",\"url\":\"classes/WebCam.html#label\",\"classes\":\"tsd-kind-accessor tsd-parent-kind-class\",\"parent\":\"WebCam\"},{\"kind\":262144,\"name\":\"paused\",\"url\":\"classes/WebCam.html#paused\",\"classes\":\"tsd-kind-accessor tsd-parent-kind-class\",\"parent\":\"WebCam\"},{\"kind\":262144,\"name\":\"width\",\"url\":\"classes/WebCam.html#width\",\"classes\":\"tsd-kind-accessor tsd-parent-kind-class\",\"parent\":\"WebCam\"},{\"kind\":262144,\"name\":\"height\",\"url\":\"classes/WebCam.html#height\",\"classes\":\"tsd-kind-accessor tsd-parent-kind-class\",\"parent\":\"WebCam\"},{\"kind\":2048,\"name\":\"start\",\"url\":\"classes/WebCam.html#start\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"WebCam\"},{\"kind\":2048,\"name\":\"pause\",\"url\":\"classes/WebCam.html#pause\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"WebCam\"},{\"kind\":2048,\"name\":\"play\",\"url\":\"classes/WebCam.html#play\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"WebCam\"},{\"kind\":2048,\"name\":\"stop\",\"url\":\"classes/WebCam.html#stop\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"WebCam\"},{\"kind\":256,\"name\":\"WebCamConfig\",\"url\":\"interfaces/WebCamConfig.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"element\",\"url\":\"interfaces/WebCamConfig.html#element\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"WebCamConfig\"},{\"kind\":1024,\"name\":\"debug\",\"url\":\"interfaces/WebCamConfig.html#debug\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"WebCamConfig\"},{\"kind\":1024,\"name\":\"mode\",\"url\":\"interfaces/WebCamConfig.html#mode\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"WebCamConfig\"},{\"kind\":1024,\"name\":\"crop\",\"url\":\"interfaces/WebCamConfig.html#crop\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"WebCamConfig\"},{\"kind\":1024,\"name\":\"width\",\"url\":\"interfaces/WebCamConfig.html#width\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"WebCamConfig\"},{\"kind\":1024,\"name\":\"height\",\"url\":\"interfaces/WebCamConfig.html#height\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"WebCamConfig\"},{\"kind\":256,\"name\":\"ModelInfo\",\"url\":\"interfaces/ModelInfo.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"name\",\"url\":\"interfaces/ModelInfo.html#name\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"ModelInfo\"},{\"kind\":1024,\"name\":\"inCache\",\"url\":\"interfaces/ModelInfo.html#inCache\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"ModelInfo\"},{\"kind\":1024,\"name\":\"sizeDesired\",\"url\":\"interfaces/ModelInfo.html#sizeDesired\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"ModelInfo\"},{\"kind\":1024,\"name\":\"sizeFromManifest\",\"url\":\"interfaces/ModelInfo.html#sizeFromManifest\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"ModelInfo\"},{\"kind\":1024,\"name\":\"sizeLoadedWeights\",\"url\":\"interfaces/ModelInfo.html#sizeLoadedWeights\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"ModelInfo\"},{\"kind\":4194304,\"name\":\"Events\",\"url\":\"types/Events.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"AnyCanvas\",\"url\":\"types/AnyCanvas.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"AnyImage\",\"url\":\"types/AnyImage.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"AnyVideo\",\"url\":\"types/AnyVideo.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"ImageObjects\",\"url\":\"types/ImageObjects.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"ExternalCanvas\",\"url\":\"types/ExternalCanvas.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"Input\",\"url\":\"types/Input.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"BackendEnum\",\"url\":\"types/BackendEnum.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"WarmupEnum\",\"url\":\"types/WarmupEnum.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"SegmentationEnum\",\"url\":\"types/SegmentationEnum.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":256,\"name\":\"GenericConfig\",\"url\":\"interfaces/GenericConfig.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"enabled\",\"url\":\"interfaces/GenericConfig.html#enabled\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"GenericConfig\"},{\"kind\":1024,\"name\":\"modelPath\",\"url\":\"interfaces/GenericConfig.html#modelPath\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"GenericConfig\"},{\"kind\":1024,\"name\":\"skipFrames\",\"url\":\"interfaces/GenericConfig.html#skipFrames\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"GenericConfig\"},{\"kind\":1024,\"name\":\"skipTime\",\"url\":\"interfaces/GenericConfig.html#skipTime\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"GenericConfig\"},{\"kind\":256,\"name\":\"FaceDetectorConfig\",\"url\":\"interfaces/FaceDetectorConfig.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"rotation\",\"url\":\"interfaces/FaceDetectorConfig.html#rotation\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceDetectorConfig\"},{\"kind\":1024,\"name\":\"maxDetected\",\"url\":\"interfaces/FaceDetectorConfig.html#maxDetected\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceDetectorConfig\"},{\"kind\":1024,\"name\":\"minConfidence\",\"url\":\"interfaces/FaceDetectorConfig.html#minConfidence\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceDetectorConfig\"},{\"kind\":1024,\"name\":\"iouThreshold\",\"url\":\"interfaces/FaceDetectorConfig.html#iouThreshold\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceDetectorConfig\"},{\"kind\":1024,\"name\":\"mask\",\"url\":\"interfaces/FaceDetectorConfig.html#mask\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceDetectorConfig\"},{\"kind\":1024,\"name\":\"return\",\"url\":\"interfaces/FaceDetectorConfig.html#return\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceDetectorConfig\"},{\"kind\":1024,\"name\":\"enabled\",\"url\":\"interfaces/FaceDetectorConfig.html#enabled\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceDetectorConfig\"},{\"kind\":1024,\"name\":\"modelPath\",\"url\":\"interfaces/FaceDetectorConfig.html#modelPath\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceDetectorConfig\"},{\"kind\":1024,\"name\":\"skipFrames\",\"url\":\"interfaces/FaceDetectorConfig.html#skipFrames\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceDetectorConfig\"},{\"kind\":1024,\"name\":\"skipTime\",\"url\":\"interfaces/FaceDetectorConfig.html#skipTime\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceDetectorConfig\"},{\"kind\":256,\"name\":\"FaceMeshConfig\",\"url\":\"interfaces/FaceMeshConfig.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"keepInvalid\",\"url\":\"interfaces/FaceMeshConfig.html#keepInvalid\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceMeshConfig\"},{\"kind\":1024,\"name\":\"enabled\",\"url\":\"interfaces/FaceMeshConfig.html#enabled\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceMeshConfig\"},{\"kind\":1024,\"name\":\"modelPath\",\"url\":\"interfaces/FaceMeshConfig.html#modelPath\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceMeshConfig\"},{\"kind\":1024,\"name\":\"skipFrames\",\"url\":\"interfaces/FaceMeshConfig.html#skipFrames\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceMeshConfig\"},{\"kind\":1024,\"name\":\"skipTime\",\"url\":\"interfaces/FaceMeshConfig.html#skipTime\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceMeshConfig\"},{\"kind\":256,\"name\":\"FaceIrisConfig\",\"url\":\"interfaces/FaceIrisConfig.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"enabled\",\"url\":\"interfaces/FaceIrisConfig.html#enabled\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceIrisConfig\"},{\"kind\":1024,\"name\":\"modelPath\",\"url\":\"interfaces/FaceIrisConfig.html#modelPath\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceIrisConfig\"},{\"kind\":1024,\"name\":\"skipFrames\",\"url\":\"interfaces/FaceIrisConfig.html#skipFrames\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceIrisConfig\"},{\"kind\":1024,\"name\":\"skipTime\",\"url\":\"interfaces/FaceIrisConfig.html#skipTime\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceIrisConfig\"},{\"kind\":256,\"name\":\"FaceAttentionConfig\",\"url\":\"interfaces/FaceAttentionConfig.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"enabled\",\"url\":\"interfaces/FaceAttentionConfig.html#enabled\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceAttentionConfig\"},{\"kind\":1024,\"name\":\"modelPath\",\"url\":\"interfaces/FaceAttentionConfig.html#modelPath\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceAttentionConfig\"},{\"kind\":1024,\"name\":\"skipFrames\",\"url\":\"interfaces/FaceAttentionConfig.html#skipFrames\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceAttentionConfig\"},{\"kind\":1024,\"name\":\"skipTime\",\"url\":\"interfaces/FaceAttentionConfig.html#skipTime\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceAttentionConfig\"},{\"kind\":256,\"name\":\"FaceDescriptionConfig\",\"url\":\"interfaces/FaceDescriptionConfig.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"minConfidence\",\"url\":\"interfaces/FaceDescriptionConfig.html#minConfidence\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceDescriptionConfig\"},{\"kind\":1024,\"name\":\"enabled\",\"url\":\"interfaces/FaceDescriptionConfig.html#enabled\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceDescriptionConfig\"},{\"kind\":1024,\"name\":\"modelPath\",\"url\":\"interfaces/FaceDescriptionConfig.html#modelPath\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceDescriptionConfig\"},{\"kind\":1024,\"name\":\"skipFrames\",\"url\":\"interfaces/FaceDescriptionConfig.html#skipFrames\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceDescriptionConfig\"},{\"kind\":1024,\"name\":\"skipTime\",\"url\":\"interfaces/FaceDescriptionConfig.html#skipTime\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceDescriptionConfig\"},{\"kind\":256,\"name\":\"FaceEmotionConfig\",\"url\":\"interfaces/FaceEmotionConfig.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"minConfidence\",\"url\":\"interfaces/FaceEmotionConfig.html#minConfidence\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceEmotionConfig\"},{\"kind\":1024,\"name\":\"enabled\",\"url\":\"interfaces/FaceEmotionConfig.html#enabled\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceEmotionConfig\"},{\"kind\":1024,\"name\":\"modelPath\",\"url\":\"interfaces/FaceEmotionConfig.html#modelPath\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceEmotionConfig\"},{\"kind\":1024,\"name\":\"skipFrames\",\"url\":\"interfaces/FaceEmotionConfig.html#skipFrames\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceEmotionConfig\"},{\"kind\":1024,\"name\":\"skipTime\",\"url\":\"interfaces/FaceEmotionConfig.html#skipTime\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceEmotionConfig\"},{\"kind\":256,\"name\":\"FaceAntiSpoofConfig\",\"url\":\"interfaces/FaceAntiSpoofConfig.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"enabled\",\"url\":\"interfaces/FaceAntiSpoofConfig.html#enabled\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceAntiSpoofConfig\"},{\"kind\":1024,\"name\":\"modelPath\",\"url\":\"interfaces/FaceAntiSpoofConfig.html#modelPath\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceAntiSpoofConfig\"},{\"kind\":1024,\"name\":\"skipFrames\",\"url\":\"interfaces/FaceAntiSpoofConfig.html#skipFrames\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceAntiSpoofConfig\"},{\"kind\":1024,\"name\":\"skipTime\",\"url\":\"interfaces/FaceAntiSpoofConfig.html#skipTime\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceAntiSpoofConfig\"},{\"kind\":256,\"name\":\"FaceLivenessConfig\",\"url\":\"interfaces/FaceLivenessConfig.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"enabled\",\"url\":\"interfaces/FaceLivenessConfig.html#enabled\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceLivenessConfig\"},{\"kind\":1024,\"name\":\"modelPath\",\"url\":\"interfaces/FaceLivenessConfig.html#modelPath\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceLivenessConfig\"},{\"kind\":1024,\"name\":\"skipFrames\",\"url\":\"interfaces/FaceLivenessConfig.html#skipFrames\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceLivenessConfig\"},{\"kind\":1024,\"name\":\"skipTime\",\"url\":\"interfaces/FaceLivenessConfig.html#skipTime\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceLivenessConfig\"},{\"kind\":256,\"name\":\"FaceGearConfig\",\"url\":\"interfaces/FaceGearConfig.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"minConfidence\",\"url\":\"interfaces/FaceGearConfig.html#minConfidence\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceGearConfig\"},{\"kind\":1024,\"name\":\"enabled\",\"url\":\"interfaces/FaceGearConfig.html#enabled\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceGearConfig\"},{\"kind\":1024,\"name\":\"modelPath\",\"url\":\"interfaces/FaceGearConfig.html#modelPath\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceGearConfig\"},{\"kind\":1024,\"name\":\"skipFrames\",\"url\":\"interfaces/FaceGearConfig.html#skipFrames\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceGearConfig\"},{\"kind\":1024,\"name\":\"skipTime\",\"url\":\"interfaces/FaceGearConfig.html#skipTime\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceGearConfig\"},{\"kind\":256,\"name\":\"FaceConfig\",\"url\":\"interfaces/FaceConfig.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"detector\",\"url\":\"interfaces/FaceConfig.html#detector\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceConfig\"},{\"kind\":1024,\"name\":\"mesh\",\"url\":\"interfaces/FaceConfig.html#mesh\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceConfig\"},{\"kind\":1024,\"name\":\"attention\",\"url\":\"interfaces/FaceConfig.html#attention\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceConfig\"},{\"kind\":1024,\"name\":\"iris\",\"url\":\"interfaces/FaceConfig.html#iris\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceConfig\"},{\"kind\":1024,\"name\":\"description\",\"url\":\"interfaces/FaceConfig.html#description\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceConfig\"},{\"kind\":1024,\"name\":\"emotion\",\"url\":\"interfaces/FaceConfig.html#emotion\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceConfig\"},{\"kind\":1024,\"name\":\"antispoof\",\"url\":\"interfaces/FaceConfig.html#antispoof\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceConfig\"},{\"kind\":1024,\"name\":\"liveness\",\"url\":\"interfaces/FaceConfig.html#liveness\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceConfig\"},{\"kind\":1024,\"name\":\"gear\",\"url\":\"interfaces/FaceConfig.html#gear\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceConfig\"},{\"kind\":1024,\"name\":\"enabled\",\"url\":\"interfaces/FaceConfig.html#enabled\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceConfig\"},{\"kind\":1024,\"name\":\"modelPath\",\"url\":\"interfaces/FaceConfig.html#modelPath\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceConfig\"},{\"kind\":1024,\"name\":\"skipFrames\",\"url\":\"interfaces/FaceConfig.html#skipFrames\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceConfig\"},{\"kind\":1024,\"name\":\"skipTime\",\"url\":\"interfaces/FaceConfig.html#skipTime\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"FaceConfig\"},{\"kind\":256,\"name\":\"BodyConfig\",\"url\":\"interfaces/BodyConfig.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"maxDetected\",\"url\":\"interfaces/BodyConfig.html#maxDetected\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"BodyConfig\"},{\"kind\":1024,\"name\":\"minConfidence\",\"url\":\"interfaces/BodyConfig.html#minConfidence\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"BodyConfig\"},{\"kind\":1024,\"name\":\"enabled\",\"url\":\"interfaces/BodyConfig.html#enabled\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"BodyConfig\"},{\"kind\":1024,\"name\":\"modelPath\",\"url\":\"interfaces/BodyConfig.html#modelPath\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"BodyConfig\"},{\"kind\":1024,\"name\":\"skipFrames\",\"url\":\"interfaces/BodyConfig.html#skipFrames\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"BodyConfig\"},{\"kind\":1024,\"name\":\"skipTime\",\"url\":\"interfaces/BodyConfig.html#skipTime\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"BodyConfig\"},{\"kind\":256,\"name\":\"HandConfig\",\"url\":\"interfaces/HandConfig.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"rotation\",\"url\":\"interfaces/HandConfig.html#rotation\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"HandConfig\"},{\"kind\":1024,\"name\":\"minConfidence\",\"url\":\"interfaces/HandConfig.html#minConfidence\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"HandConfig\"},{\"kind\":1024,\"name\":\"iouThreshold\",\"url\":\"interfaces/HandConfig.html#iouThreshold\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"HandConfig\"},{\"kind\":1024,\"name\":\"maxDetected\",\"url\":\"interfaces/HandConfig.html#maxDetected\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"HandConfig\"},{\"kind\":1024,\"name\":\"landmarks\",\"url\":\"interfaces/HandConfig.html#landmarks\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"HandConfig\"},{\"kind\":1024,\"name\":\"detector\",\"url\":\"interfaces/HandConfig.html#detector\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"HandConfig\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"interfaces/HandConfig.html#__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-interface\",\"parent\":\"HandConfig\"},{\"kind\":1024,\"name\":\"modelPath\",\"url\":\"interfaces/HandConfig.html#__type.modelPath\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"HandConfig.__type\"},{\"kind\":1024,\"name\":\"skeleton\",\"url\":\"interfaces/HandConfig.html#skeleton\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"HandConfig\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"interfaces/HandConfig.html#__type-1\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-interface\",\"parent\":\"HandConfig\"},{\"kind\":1024,\"name\":\"modelPath\",\"url\":\"interfaces/HandConfig.html#__type-1.modelPath-2\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"HandConfig.__type\"},{\"kind\":1024,\"name\":\"enabled\",\"url\":\"interfaces/HandConfig.html#enabled\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"HandConfig\"},{\"kind\":1024,\"name\":\"modelPath\",\"url\":\"interfaces/HandConfig.html#modelPath-1\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"HandConfig\"},{\"kind\":1024,\"name\":\"skipFrames\",\"url\":\"interfaces/HandConfig.html#skipFrames\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"HandConfig\"},{\"kind\":1024,\"name\":\"skipTime\",\"url\":\"interfaces/HandConfig.html#skipTime\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"HandConfig\"},{\"kind\":256,\"name\":\"ObjectConfig\",\"url\":\"interfaces/ObjectConfig.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"minConfidence\",\"url\":\"interfaces/ObjectConfig.html#minConfidence\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"ObjectConfig\"},{\"kind\":1024,\"name\":\"iouThreshold\",\"url\":\"interfaces/ObjectConfig.html#iouThreshold\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"ObjectConfig\"},{\"kind\":1024,\"name\":\"maxDetected\",\"url\":\"interfaces/ObjectConfig.html#maxDetected\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"ObjectConfig\"},{\"kind\":1024,\"name\":\"enabled\",\"url\":\"interfaces/ObjectConfig.html#enabled\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"ObjectConfig\"},{\"kind\":1024,\"name\":\"modelPath\",\"url\":\"interfaces/ObjectConfig.html#modelPath\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"ObjectConfig\"},{\"kind\":1024,\"name\":\"skipFrames\",\"url\":\"interfaces/ObjectConfig.html#skipFrames\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"ObjectConfig\"},{\"kind\":1024,\"name\":\"skipTime\",\"url\":\"interfaces/ObjectConfig.html#skipTime\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"ObjectConfig\"},{\"kind\":256,\"name\":\"SegmentationConfig\",\"url\":\"interfaces/SegmentationConfig.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"ratio\",\"url\":\"interfaces/SegmentationConfig.html#ratio\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"SegmentationConfig\"},{\"kind\":1024,\"name\":\"mode\",\"url\":\"interfaces/SegmentationConfig.html#mode\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"SegmentationConfig\"},{\"kind\":1024,\"name\":\"enabled\",\"url\":\"interfaces/SegmentationConfig.html#enabled\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"SegmentationConfig\"},{\"kind\":1024,\"name\":\"modelPath\",\"url\":\"interfaces/SegmentationConfig.html#modelPath\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"SegmentationConfig\"},{\"kind\":1024,\"name\":\"skipFrames\",\"url\":\"interfaces/SegmentationConfig.html#skipFrames\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"SegmentationConfig\"},{\"kind\":1024,\"name\":\"skipTime\",\"url\":\"interfaces/SegmentationConfig.html#skipTime\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited\",\"parent\":\"SegmentationConfig\"},{\"kind\":256,\"name\":\"FilterConfig\",\"url\":\"interfaces/FilterConfig.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"enabled\",\"url\":\"interfaces/FilterConfig.html#enabled\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FilterConfig\"},{\"kind\":1024,\"name\":\"equalization\",\"url\":\"interfaces/FilterConfig.html#equalization\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FilterConfig\"},{\"kind\":1024,\"name\":\"width\",\"url\":\"interfaces/FilterConfig.html#width\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FilterConfig\"},{\"kind\":1024,\"name\":\"height\",\"url\":\"interfaces/FilterConfig.html#height\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FilterConfig\"},{\"kind\":1024,\"name\":\"return\",\"url\":\"interfaces/FilterConfig.html#return\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FilterConfig\"},{\"kind\":1024,\"name\":\"flip\",\"url\":\"interfaces/FilterConfig.html#flip\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FilterConfig\"},{\"kind\":1024,\"name\":\"brightness\",\"url\":\"interfaces/FilterConfig.html#brightness\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FilterConfig\"},{\"kind\":1024,\"name\":\"contrast\",\"url\":\"interfaces/FilterConfig.html#contrast\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FilterConfig\"},{\"kind\":1024,\"name\":\"sharpness\",\"url\":\"interfaces/FilterConfig.html#sharpness\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FilterConfig\"},{\"kind\":1024,\"name\":\"blur\",\"url\":\"interfaces/FilterConfig.html#blur\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FilterConfig\"},{\"kind\":1024,\"name\":\"saturation\",\"url\":\"interfaces/FilterConfig.html#saturation\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FilterConfig\"},{\"kind\":1024,\"name\":\"hue\",\"url\":\"interfaces/FilterConfig.html#hue\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FilterConfig\"},{\"kind\":1024,\"name\":\"negative\",\"url\":\"interfaces/FilterConfig.html#negative\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FilterConfig\"},{\"kind\":1024,\"name\":\"sepia\",\"url\":\"interfaces/FilterConfig.html#sepia\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FilterConfig\"},{\"kind\":1024,\"name\":\"vintage\",\"url\":\"interfaces/FilterConfig.html#vintage\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FilterConfig\"},{\"kind\":1024,\"name\":\"kodachrome\",\"url\":\"interfaces/FilterConfig.html#kodachrome\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FilterConfig\"},{\"kind\":1024,\"name\":\"technicolor\",\"url\":\"interfaces/FilterConfig.html#technicolor\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FilterConfig\"},{\"kind\":1024,\"name\":\"polaroid\",\"url\":\"interfaces/FilterConfig.html#polaroid\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FilterConfig\"},{\"kind\":1024,\"name\":\"pixelate\",\"url\":\"interfaces/FilterConfig.html#pixelate\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FilterConfig\"},{\"kind\":256,\"name\":\"GestureConfig\",\"url\":\"interfaces/GestureConfig.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"enabled\",\"url\":\"interfaces/GestureConfig.html#enabled\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"GestureConfig\"},{\"kind\":256,\"name\":\"Config\",\"url\":\"interfaces/Config.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"backend\",\"url\":\"interfaces/Config.html#backend\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Config\"},{\"kind\":1024,\"name\":\"wasmPath\",\"url\":\"interfaces/Config.html#wasmPath\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Config\"},{\"kind\":1024,\"name\":\"wasmPlatformFetch\",\"url\":\"interfaces/Config.html#wasmPlatformFetch\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Config\"},{\"kind\":1024,\"name\":\"debug\",\"url\":\"interfaces/Config.html#debug\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Config\"},{\"kind\":1024,\"name\":\"async\",\"url\":\"interfaces/Config.html#async\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Config\"},{\"kind\":1024,\"name\":\"warmup\",\"url\":\"interfaces/Config.html#warmup\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Config\"},{\"kind\":1024,\"name\":\"modelBasePath\",\"url\":\"interfaces/Config.html#modelBasePath\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Config\"},{\"kind\":1024,\"name\":\"cacheModels\",\"url\":\"interfaces/Config.html#cacheModels\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Config\"},{\"kind\":1024,\"name\":\"validateModels\",\"url\":\"interfaces/Config.html#validateModels\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Config\"},{\"kind\":1024,\"name\":\"cacheSensitivity\",\"url\":\"interfaces/Config.html#cacheSensitivity\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Config\"},{\"kind\":1024,\"name\":\"flags\",\"url\":\"interfaces/Config.html#flags\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Config\"},{\"kind\":1024,\"name\":\"softwareKernels\",\"url\":\"interfaces/Config.html#softwareKernels\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Config\"},{\"kind\":1024,\"name\":\"deallocate\",\"url\":\"interfaces/Config.html#deallocate\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Config\"},{\"kind\":1024,\"name\":\"skipAllowed\",\"url\":\"interfaces/Config.html#skipAllowed\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Config\"},{\"kind\":1024,\"name\":\"filter\",\"url\":\"interfaces/Config.html#filter\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Config\"},{\"kind\":1024,\"name\":\"gesture\",\"url\":\"interfaces/Config.html#gesture\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Config\"},{\"kind\":1024,\"name\":\"face\",\"url\":\"interfaces/Config.html#face\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Config\"},{\"kind\":1024,\"name\":\"body\",\"url\":\"interfaces/Config.html#body\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Config\"},{\"kind\":1024,\"name\":\"hand\",\"url\":\"interfaces/Config.html#hand\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Config\"},{\"kind\":1024,\"name\":\"object\",\"url\":\"interfaces/Config.html#object\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Config\"},{\"kind\":1024,\"name\":\"segmentation\",\"url\":\"interfaces/Config.html#segmentation\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Config\"},{\"kind\":32,\"name\":\"defaults\",\"url\":\"variables/defaults.html\",\"classes\":\"tsd-kind-variable\"},{\"kind\":256,\"name\":\"FaceResult\",\"url\":\"interfaces/FaceResult.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"id\",\"url\":\"interfaces/FaceResult.html#id\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceResult\"},{\"kind\":1024,\"name\":\"score\",\"url\":\"interfaces/FaceResult.html#score\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceResult\"},{\"kind\":1024,\"name\":\"boxScore\",\"url\":\"interfaces/FaceResult.html#boxScore\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceResult\"},{\"kind\":1024,\"name\":\"faceScore\",\"url\":\"interfaces/FaceResult.html#faceScore\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceResult\"},{\"kind\":1024,\"name\":\"box\",\"url\":\"interfaces/FaceResult.html#box\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceResult\"},{\"kind\":1024,\"name\":\"boxRaw\",\"url\":\"interfaces/FaceResult.html#boxRaw\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceResult\"},{\"kind\":1024,\"name\":\"mesh\",\"url\":\"interfaces/FaceResult.html#mesh\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceResult\"},{\"kind\":1024,\"name\":\"meshRaw\",\"url\":\"interfaces/FaceResult.html#meshRaw\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceResult\"},{\"kind\":1024,\"name\":\"annotations\",\"url\":\"interfaces/FaceResult.html#annotations\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceResult\"},{\"kind\":1024,\"name\":\"age\",\"url\":\"interfaces/FaceResult.html#age\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceResult\"},{\"kind\":1024,\"name\":\"gender\",\"url\":\"interfaces/FaceResult.html#gender\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceResult\"},{\"kind\":1024,\"name\":\"genderScore\",\"url\":\"interfaces/FaceResult.html#genderScore\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceResult\"},{\"kind\":1024,\"name\":\"emotion\",\"url\":\"interfaces/FaceResult.html#emotion\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceResult\"},{\"kind\":1024,\"name\":\"race\",\"url\":\"interfaces/FaceResult.html#race\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceResult\"},{\"kind\":1024,\"name\":\"embedding\",\"url\":\"interfaces/FaceResult.html#embedding\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceResult\"},{\"kind\":1024,\"name\":\"iris\",\"url\":\"interfaces/FaceResult.html#iris\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceResult\"},{\"kind\":1024,\"name\":\"real\",\"url\":\"interfaces/FaceResult.html#real\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceResult\"},{\"kind\":1024,\"name\":\"live\",\"url\":\"interfaces/FaceResult.html#live\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceResult\"},{\"kind\":1024,\"name\":\"rotation\",\"url\":\"interfaces/FaceResult.html#rotation\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceResult\"},{\"kind\":1024,\"name\":\"tensor\",\"url\":\"interfaces/FaceResult.html#tensor\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"FaceResult\"},{\"kind\":4194304,\"name\":\"BodyLandmarkPoseNet\",\"url\":\"types/BodyLandmarkPoseNet.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"BodyLandmarkMoveNet\",\"url\":\"types/BodyLandmarkMoveNet.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"BodyLandmarkEfficientNet\",\"url\":\"types/BodyLandmarkEfficientNet.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"BodyLandmarkBlazePose\",\"url\":\"types/BodyLandmarkBlazePose.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"BodyAnnotationBlazePose\",\"url\":\"types/BodyAnnotationBlazePose.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"BodyAnnotationEfficientPose\",\"url\":\"types/BodyAnnotationEfficientPose.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":256,\"name\":\"BodyKeypoint\",\"url\":\"interfaces/BodyKeypoint.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"part\",\"url\":\"interfaces/BodyKeypoint.html#part\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"BodyKeypoint\"},{\"kind\":1024,\"name\":\"position\",\"url\":\"interfaces/BodyKeypoint.html#position\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"BodyKeypoint\"},{\"kind\":1024,\"name\":\"positionRaw\",\"url\":\"interfaces/BodyKeypoint.html#positionRaw\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"BodyKeypoint\"},{\"kind\":1024,\"name\":\"distance\",\"url\":\"interfaces/BodyKeypoint.html#distance\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"BodyKeypoint\"},{\"kind\":1024,\"name\":\"score\",\"url\":\"interfaces/BodyKeypoint.html#score\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"BodyKeypoint\"},{\"kind\":256,\"name\":\"BodyResult\",\"url\":\"interfaces/BodyResult.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"id\",\"url\":\"interfaces/BodyResult.html#id\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"BodyResult\"},{\"kind\":1024,\"name\":\"score\",\"url\":\"interfaces/BodyResult.html#score\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"BodyResult\"},{\"kind\":1024,\"name\":\"box\",\"url\":\"interfaces/BodyResult.html#box\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"BodyResult\"},{\"kind\":1024,\"name\":\"boxRaw\",\"url\":\"interfaces/BodyResult.html#boxRaw\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"BodyResult\"},{\"kind\":1024,\"name\":\"keypoints\",\"url\":\"interfaces/BodyResult.html#keypoints\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"BodyResult\"},{\"kind\":1024,\"name\":\"annotations\",\"url\":\"interfaces/BodyResult.html#annotations\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"BodyResult\"},{\"kind\":256,\"name\":\"HandResult\",\"url\":\"interfaces/HandResult.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"id\",\"url\":\"interfaces/HandResult.html#id\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"HandResult\"},{\"kind\":1024,\"name\":\"score\",\"url\":\"interfaces/HandResult.html#score\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"HandResult\"},{\"kind\":1024,\"name\":\"boxScore\",\"url\":\"interfaces/HandResult.html#boxScore\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"HandResult\"},{\"kind\":1024,\"name\":\"fingerScore\",\"url\":\"interfaces/HandResult.html#fingerScore\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"HandResult\"},{\"kind\":1024,\"name\":\"box\",\"url\":\"interfaces/HandResult.html#box\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"HandResult\"},{\"kind\":1024,\"name\":\"boxRaw\",\"url\":\"interfaces/HandResult.html#boxRaw\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"HandResult\"},{\"kind\":1024,\"name\":\"keypoints\",\"url\":\"interfaces/HandResult.html#keypoints\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"HandResult\"},{\"kind\":1024,\"name\":\"label\",\"url\":\"interfaces/HandResult.html#label\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"HandResult\"},{\"kind\":1024,\"name\":\"annotations\",\"url\":\"interfaces/HandResult.html#annotations\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"HandResult\"},{\"kind\":1024,\"name\":\"landmarks\",\"url\":\"interfaces/HandResult.html#landmarks\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"HandResult\"},{\"kind\":256,\"name\":\"ObjectResult\",\"url\":\"interfaces/ObjectResult.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"id\",\"url\":\"interfaces/ObjectResult.html#id\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"ObjectResult\"},{\"kind\":1024,\"name\":\"score\",\"url\":\"interfaces/ObjectResult.html#score\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"ObjectResult\"},{\"kind\":1024,\"name\":\"class\",\"url\":\"interfaces/ObjectResult.html#class\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"ObjectResult\"},{\"kind\":1024,\"name\":\"label\",\"url\":\"interfaces/ObjectResult.html#label\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"ObjectResult\"},{\"kind\":1024,\"name\":\"box\",\"url\":\"interfaces/ObjectResult.html#box\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"ObjectResult\"},{\"kind\":1024,\"name\":\"boxRaw\",\"url\":\"interfaces/ObjectResult.html#boxRaw\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"ObjectResult\"},{\"kind\":4194304,\"name\":\"GestureResult\",\"url\":\"types/GestureResult.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":256,\"name\":\"PersonResult\",\"url\":\"interfaces/PersonResult.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"id\",\"url\":\"interfaces/PersonResult.html#id\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"PersonResult\"},{\"kind\":1024,\"name\":\"face\",\"url\":\"interfaces/PersonResult.html#face\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"PersonResult\"},{\"kind\":1024,\"name\":\"body\",\"url\":\"interfaces/PersonResult.html#body\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"PersonResult\"},{\"kind\":1024,\"name\":\"hands\",\"url\":\"interfaces/PersonResult.html#hands\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"PersonResult\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"interfaces/PersonResult.html#__type\",\"classes\":\"tsd-kind-type-literal tsd-parent-kind-interface\",\"parent\":\"PersonResult\"},{\"kind\":1024,\"name\":\"left\",\"url\":\"interfaces/PersonResult.html#__type.left\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"PersonResult.__type\"},{\"kind\":1024,\"name\":\"right\",\"url\":\"interfaces/PersonResult.html#__type.right\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"PersonResult.__type\"},{\"kind\":1024,\"name\":\"gestures\",\"url\":\"interfaces/PersonResult.html#gestures\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"PersonResult\"},{\"kind\":1024,\"name\":\"box\",\"url\":\"interfaces/PersonResult.html#box\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"PersonResult\"},{\"kind\":1024,\"name\":\"boxRaw\",\"url\":\"interfaces/PersonResult.html#boxRaw\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"PersonResult\"},{\"kind\":256,\"name\":\"Result\",\"url\":\"interfaces/Result.html\",\"classes\":\"tsd-kind-interface\"},{\"kind\":1024,\"name\":\"face\",\"url\":\"interfaces/Result.html#face\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Result\"},{\"kind\":1024,\"name\":\"body\",\"url\":\"interfaces/Result.html#body\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Result\"},{\"kind\":1024,\"name\":\"hand\",\"url\":\"interfaces/Result.html#hand\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Result\"},{\"kind\":1024,\"name\":\"gesture\",\"url\":\"interfaces/Result.html#gesture\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Result\"},{\"kind\":1024,\"name\":\"object\",\"url\":\"interfaces/Result.html#object\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Result\"},{\"kind\":1024,\"name\":\"performance\",\"url\":\"interfaces/Result.html#performance\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Result\"},{\"kind\":1024,\"name\":\"canvas\",\"url\":\"interfaces/Result.html#canvas\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Result\"},{\"kind\":1024,\"name\":\"timestamp\",\"url\":\"interfaces/Result.html#timestamp\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Result\"},{\"kind\":1024,\"name\":\"persons\",\"url\":\"interfaces/Result.html#persons\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Result\"},{\"kind\":1024,\"name\":\"error\",\"url\":\"interfaces/Result.html#error\",\"classes\":\"tsd-kind-property tsd-parent-kind-interface\",\"parent\":\"Result\"}],\"index\":{\"version\":\"2.3.9\",\"fields\":[\"name\",\"comment\"],\"fieldVectors\":[[\"name/0\",[0,61.456]],[\"comment/0\",[]],[\"name/1\",[1,46.793]],[\"comment/1\",[]],[\"name/2\",[2,50.47]],[\"comment/2\",[]],[\"name/3\",[3,52.983]],[\"comment/3\",[]],[\"name/4\",[4,56.348]],[\"comment/4\",[]],[\"name/5\",[5,61.456]],[\"comment/5\",[]],[\"name/6\",[6,61.456]],[\"comment/6\",[]],[\"name/7\",[7,31.667]],[\"comment/7\",[]],[\"name/8\",[8,50.47]],[\"comment/8\",[]],[\"name/9\",[9,48.463]],[\"comment/9\",[]],[\"name/10\",[10,61.456]],[\"comment/10\",[]],[\"name/11\",[11,52.983]],[\"comment/11\",[]],[\"name/12\",[12,56.348]],[\"comment/12\",[]],[\"name/13\",[7,31.667]],[\"comment/13\",[]],[\"name/14\",[9,48.463]],[\"comment/14\",[]],[\"name/15\",[7,31.667]],[\"comment/15\",[]],[\"name/16\",[13,48.463]],[\"comment/16\",[]],[\"name/17\",[7,31.667]],[\"comment/17\",[]],[\"name/18\",[14,48.463]],[\"comment/18\",[]],[\"name/19\",[7,31.667]],[\"comment/19\",[]],[\"name/20\",[15,50.47]],[\"comment/20\",[]],[\"name/21\",[7,31.667]],[\"comment/21\",[]],[\"name/22\",[16,50.47]],[\"comment/22\",[]],[\"name/23\",[7,31.667]],[\"comment/23\",[]],[\"name/24\",[17,50.47]],[\"comment/24\",[]],[\"name/25\",[7,31.667]],[\"comment/25\",[]],[\"name/26\",[18,56.348]],[\"comment/26\",[]],[\"name/27\",[7,31.667]],[\"comment/27\",[]],[\"name/28\",[19,52.983]],[\"comment/28\",[]],[\"name/29\",[7,31.667]],[\"comment/29\",[]],[\"name/30\",[20,56.348]],[\"comment/30\",[]],[\"name/31\",[21,56.348]],[\"comment/31\",[]],[\"name/32\",[22,61.456]],[\"comment/32\",[]],[\"name/33\",[23,61.456]],[\"comment/33\",[]],[\"name/34\",[24,56.348]],[\"comment/34\",[]],[\"name/35\",[25,61.456]],[\"comment/35\",[]],[\"name/36\",[26,61.456]],[\"comment/36\",[]],[\"name/37\",[27,56.348]],[\"comment/37\",[]],[\"name/38\",[28,56.348]],[\"comment/38\",[]],[\"name/39\",[29,61.456]],[\"comment/39\",[]],[\"name/40\",[30,50.47]],[\"comment/40\",[]],[\"name/41\",[7,31.667]],[\"comment/41\",[]],[\"name/42\",[31,48.463]],[\"comment/42\",[]],[\"name/43\",[7,31.667]],[\"comment/43\",[]],[\"name/44\",[32,52.983]],[\"comment/44\",[]],[\"name/45\",[7,31.667]],[\"comment/45\",[]],[\"name/46\",[7,31.667]],[\"comment/46\",[]],[\"name/47\",[33,56.348]],[\"comment/47\",[]],[\"name/48\",[31,48.463]],[\"comment/48\",[]],[\"name/49\",[30,50.47]],[\"comment/49\",[]],[\"name/50\",[34,61.456]],[\"comment/50\",[]],[\"name/51\",[35,56.348]],[\"comment/51\",[]],[\"name/52\",[36,56.348]],[\"comment/52\",[]],[\"name/53\",[37,61.456]],[\"comment/53\",[]],[\"name/54\",[38,61.456]],[\"comment/54\",[]],[\"name/55\",[39,61.456]],[\"comment/55\",[]],[\"name/56\",[40,56.348]],[\"comment/56\",[]],[\"name/57\",[41,52.983]],[\"comment/57\",[]],[\"name/58\",[42,61.456]],[\"comment/58\",[]],[\"name/59\",[43,61.456]],[\"comment/59\",[]],[\"name/60\",[44,56.348]],[\"comment/60\",[]],[\"name/61\",[45,56.348]],[\"comment/61\",[]],[\"name/62\",[46,61.456]],[\"comment/62\",[]],[\"name/63\",[47,61.456]],[\"comment/63\",[]],[\"name/64\",[48,61.456]],[\"comment/64\",[]],[\"name/65\",[49,61.456]],[\"comment/65\",[]],[\"name/66\",[50,61.456]],[\"comment/66\",[]],[\"name/67\",[32,52.983]],[\"comment/67\",[]],[\"name/68\",[31,48.463]],[\"comment/68\",[]],[\"name/69\",[30,50.47]],[\"comment/69\",[]],[\"name/70\",[32,52.983]],[\"comment/70\",[]],[\"name/71\",[7,31.667]],[\"comment/71\",[]],[\"name/72\",[33,56.348]],[\"comment/72\",[]],[\"name/73\",[31,48.463]],[\"comment/73\",[]],[\"name/74\",[30,50.47]],[\"comment/74\",[]],[\"name/75\",[51,61.456]],[\"comment/75\",[]],[\"name/76\",[52,61.456]],[\"comment/76\",[]],[\"name/77\",[12,56.348]],[\"comment/77\",[]],[\"name/78\",[18,56.348]],[\"comment/78\",[]],[\"name/79\",[9,48.463]],[\"comment/79\",[]],[\"name/80\",[19,52.983]],[\"comment/80\",[]],[\"name/81\",[20,56.348]],[\"comment/81\",[]],[\"name/82\",[13,48.463]],[\"comment/82\",[]],[\"name/83\",[14,48.463]],[\"comment/83\",[]],[\"name/84\",[15,50.47]],[\"comment/84\",[]],[\"name/85\",[17,50.47]],[\"comment/85\",[]],[\"name/86\",[16,50.47]],[\"comment/86\",[]],[\"name/87\",[53,56.348]],[\"comment/87\",[]],[\"name/88\",[27,56.348]],[\"comment/88\",[]],[\"name/89\",[41,52.983]],[\"comment/89\",[]],[\"name/90\",[54,61.456]],[\"comment/90\",[]],[\"name/91\",[28,56.348]],[\"comment/91\",[]],[\"name/92\",[53,56.348]],[\"comment/92\",[]],[\"name/93\",[1,46.793]],[\"comment/93\",[]],[\"name/94\",[55,61.456]],[\"comment/94\",[]],[\"name/95\",[56,56.348]],[\"comment/95\",[]],[\"name/96\",[57,61.456]],[\"comment/96\",[]],[\"name/97\",[58,61.456]],[\"comment/97\",[]],[\"name/98\",[59,61.456]],[\"comment/98\",[]],[\"name/99\",[60,61.456]],[\"comment/99\",[]],[\"name/100\",[61,61.456]],[\"comment/100\",[]],[\"name/101\",[62,61.456]],[\"comment/101\",[]],[\"name/102\",[63,50.47]],[\"comment/102\",[]],[\"name/103\",[64,61.456]],[\"comment/103\",[]],[\"name/104\",[65,61.456]],[\"comment/104\",[]],[\"name/105\",[66,61.456]],[\"comment/105\",[]],[\"name/106\",[67,61.456]],[\"comment/106\",[]],[\"name/107\",[68,61.456]],[\"comment/107\",[]],[\"name/108\",[69,61.456]],[\"comment/108\",[]],[\"name/109\",[70,61.456]],[\"comment/109\",[]],[\"name/110\",[71,61.456]],[\"comment/110\",[]],[\"name/111\",[72,56.348]],[\"comment/111\",[]],[\"name/112\",[73,61.456]],[\"comment/112\",[]],[\"name/113\",[74,61.456]],[\"comment/113\",[]],[\"name/114\",[75,61.456]],[\"comment/114\",[]],[\"name/115\",[76,61.456]],[\"comment/115\",[]],[\"name/116\",[77,61.456]],[\"comment/116\",[]],[\"name/117\",[78,61.456]],[\"comment/117\",[]],[\"name/118\",[79,56.348]],[\"comment/118\",[]],[\"name/119\",[80,56.348]],[\"comment/119\",[]],[\"name/120\",[81,61.456]],[\"comment/120\",[]],[\"name/121\",[82,61.456]],[\"comment/121\",[]],[\"name/122\",[83,61.456]],[\"comment/122\",[]],[\"name/123\",[84,61.456]],[\"comment/123\",[]],[\"name/124\",[85,61.456]],[\"comment/124\",[]],[\"name/125\",[86,61.456]],[\"comment/125\",[]],[\"name/126\",[87,61.456]],[\"comment/126\",[]],[\"name/127\",[80,56.348]],[\"comment/127\",[]],[\"name/128\",[44,56.348]],[\"comment/128\",[]],[\"name/129\",[88,61.456]],[\"comment/129\",[]],[\"name/130\",[89,56.348]],[\"comment/130\",[]],[\"name/131\",[90,61.456]],[\"comment/131\",[]],[\"name/132\",[91,61.456]],[\"comment/132\",[]],[\"name/133\",[92,61.456]],[\"comment/133\",[]],[\"name/134\",[8,50.47]],[\"comment/134\",[]],[\"name/135\",[1,46.793]],[\"comment/135\",[]],[\"name/136\",[93,46.793]],[\"comment/136\",[]],[\"name/137\",[94,61.456]],[\"comment/137\",[]],[\"name/138\",[95,61.456]],[\"comment/138\",[]],[\"name/139\",[96,61.456]],[\"comment/139\",[]],[\"name/140\",[97,61.456]],[\"comment/140\",[]],[\"name/141\",[98,61.456]],[\"comment/141\",[]],[\"name/142\",[99,61.456]],[\"comment/142\",[]],[\"name/143\",[100,61.456]],[\"comment/143\",[]],[\"name/144\",[101,61.456]],[\"comment/144\",[]],[\"name/145\",[102,56.348]],[\"comment/145\",[]],[\"name/146\",[103,61.456]],[\"comment/146\",[]],[\"name/147\",[104,61.456]],[\"comment/147\",[]],[\"name/148\",[105,61.456]],[\"comment/148\",[]],[\"name/149\",[106,61.456]],[\"comment/149\",[]],[\"name/150\",[107,61.456]],[\"comment/150\",[]],[\"name/151\",[108,61.456]],[\"comment/151\",[]],[\"name/152\",[109,61.456]],[\"comment/152\",[]],[\"name/153\",[110,61.456]],[\"comment/153\",[]],[\"name/154\",[111,56.348]],[\"comment/154\",[]],[\"name/155\",[112,61.456]],[\"comment/155\",[]],[\"name/156\",[113,61.456]],[\"comment/156\",[]],[\"name/157\",[114,61.456]],[\"comment/157\",[]],[\"name/158\",[115,61.456]],[\"comment/158\",[]],[\"name/159\",[116,61.456]],[\"comment/159\",[]],[\"name/160\",[117,61.456]],[\"comment/160\",[]],[\"name/161\",[118,61.456]],[\"comment/161\",[]],[\"name/162\",[119,61.456]],[\"comment/162\",[]],[\"name/163\",[120,61.456]],[\"comment/163\",[]],[\"name/164\",[121,61.456]],[\"comment/164\",[]],[\"name/165\",[19,52.983]],[\"comment/165\",[]],[\"name/166\",[122,61.456]],[\"comment/166\",[]],[\"name/167\",[123,61.456]],[\"comment/167\",[]],[\"name/168\",[124,61.456]],[\"comment/168\",[]],[\"name/169\",[125,61.456]],[\"comment/169\",[]],[\"name/170\",[126,61.456]],[\"comment/170\",[]],[\"name/171\",[127,61.456]],[\"comment/171\",[]],[\"name/172\",[128,61.456]],[\"comment/172\",[]],[\"name/173\",[129,61.456]],[\"comment/173\",[]],[\"name/174\",[130,61.456]],[\"comment/174\",[]],[\"name/175\",[131,61.456]],[\"comment/175\",[]],[\"name/176\",[132,61.456]],[\"comment/176\",[]],[\"name/177\",[133,61.456]],[\"comment/177\",[]],[\"name/178\",[134,61.456]],[\"comment/178\",[]],[\"name/179\",[135,61.456]],[\"comment/179\",[]],[\"name/180\",[136,61.456]],[\"comment/180\",[]],[\"name/181\",[137,61.456]],[\"comment/181\",[]],[\"name/182\",[138,61.456]],[\"comment/182\",[]],[\"name/183\",[139,61.456]],[\"comment/183\",[]],[\"name/184\",[140,61.456]],[\"comment/184\",[]],[\"name/185\",[141,61.456]],[\"comment/185\",[]],[\"name/186\",[142,61.456]],[\"comment/186\",[]],[\"name/187\",[143,61.456]],[\"comment/187\",[]],[\"name/188\",[144,61.456]],[\"comment/188\",[]],[\"name/189\",[145,61.456]],[\"comment/189\",[]],[\"name/190\",[146,61.456]],[\"comment/190\",[]],[\"name/191\",[147,61.456]],[\"comment/191\",[]],[\"name/192\",[148,61.456]],[\"comment/192\",[]],[\"name/193\",[149,61.456]],[\"comment/193\",[]],[\"name/194\",[150,61.456]],[\"comment/194\",[]],[\"name/195\",[151,61.456]],[\"comment/195\",[]],[\"name/196\",[152,61.456]],[\"comment/196\",[]],[\"name/197\",[153,61.456]],[\"comment/197\",[]],[\"name/198\",[154,61.456]],[\"comment/198\",[]],[\"name/199\",[155,61.456]],[\"comment/199\",[]],[\"name/200\",[156,61.456]],[\"comment/200\",[]],[\"name/201\",[157,61.456]],[\"comment/201\",[]],[\"name/202\",[158,61.456]],[\"comment/202\",[]],[\"name/203\",[159,61.456]],[\"comment/203\",[]],[\"name/204\",[160,61.456]],[\"comment/204\",[]],[\"name/205\",[161,61.456]],[\"comment/205\",[]],[\"name/206\",[162,61.456]],[\"comment/206\",[]],[\"name/207\",[163,61.456]],[\"comment/207\",[]],[\"name/208\",[164,61.456]],[\"comment/208\",[]],[\"name/209\",[165,61.456]],[\"comment/209\",[]],[\"name/210\",[166,61.456]],[\"comment/210\",[]],[\"name/211\",[167,61.456]],[\"comment/211\",[]],[\"name/212\",[168,61.456]],[\"comment/212\",[]],[\"name/213\",[169,61.456]],[\"comment/213\",[]],[\"name/214\",[170,61.456]],[\"comment/214\",[]],[\"name/215\",[171,61.456]],[\"comment/215\",[]],[\"name/216\",[172,61.456]],[\"comment/216\",[]],[\"name/217\",[173,61.456]],[\"comment/217\",[]],[\"name/218\",[174,61.456]],[\"comment/218\",[]],[\"name/219\",[175,61.456]],[\"comment/219\",[]],[\"name/220\",[176,61.456]],[\"comment/220\",[]],[\"name/221\",[177,61.456]],[\"comment/221\",[]],[\"name/222\",[178,61.456]],[\"comment/222\",[]],[\"name/223\",[179,61.456]],[\"comment/223\",[]],[\"name/224\",[180,61.456]],[\"comment/224\",[]],[\"name/225\",[181,61.456]],[\"comment/225\",[]],[\"name/226\",[182,61.456]],[\"comment/226\",[]],[\"name/227\",[183,61.456]],[\"comment/227\",[]],[\"name/228\",[184,61.456]],[\"comment/228\",[]],[\"name/229\",[185,61.456]],[\"comment/229\",[]],[\"name/230\",[186,61.456]],[\"comment/230\",[]],[\"name/231\",[187,61.456]],[\"comment/231\",[]],[\"name/232\",[188,61.456]],[\"comment/232\",[]],[\"name/233\",[189,61.456]],[\"comment/233\",[]],[\"name/234\",[190,61.456]],[\"comment/234\",[]],[\"name/235\",[191,61.456]],[\"comment/235\",[]],[\"name/236\",[192,61.456]],[\"comment/236\",[]],[\"name/237\",[193,61.456]],[\"comment/237\",[]],[\"name/238\",[194,61.456]],[\"comment/238\",[]],[\"name/239\",[195,61.456]],[\"comment/239\",[]],[\"name/240\",[196,61.456]],[\"comment/240\",[]],[\"name/241\",[197,61.456]],[\"comment/241\",[]],[\"name/242\",[198,61.456]],[\"comment/242\",[]],[\"name/243\",[199,61.456]],[\"comment/243\",[]],[\"name/244\",[200,61.456]],[\"comment/244\",[]],[\"name/245\",[201,61.456]],[\"comment/245\",[]],[\"name/246\",[202,61.456]],[\"comment/246\",[]],[\"name/247\",[203,61.456]],[\"comment/247\",[]],[\"name/248\",[204,61.456]],[\"comment/248\",[]],[\"name/249\",[205,61.456]],[\"comment/249\",[]],[\"name/250\",[206,61.456]],[\"comment/250\",[]],[\"name/251\",[207,61.456]],[\"comment/251\",[]],[\"name/252\",[208,61.456]],[\"comment/252\",[]],[\"name/253\",[209,61.456]],[\"comment/253\",[]],[\"name/254\",[210,61.456]],[\"comment/254\",[]],[\"name/255\",[211,61.456]],[\"comment/255\",[]],[\"name/256\",[212,61.456]],[\"comment/256\",[]],[\"name/257\",[213,61.456]],[\"comment/257\",[]],[\"name/258\",[214,61.456]],[\"comment/258\",[]],[\"name/259\",[215,61.456]],[\"comment/259\",[]],[\"name/260\",[216,61.456]],[\"comment/260\",[]],[\"name/261\",[217,61.456]],[\"comment/261\",[]],[\"name/262\",[218,61.456]],[\"comment/262\",[]],[\"name/263\",[219,61.456]],[\"comment/263\",[]],[\"name/264\",[220,61.456]],[\"comment/264\",[]],[\"name/265\",[221,61.456]],[\"comment/265\",[]],[\"name/266\",[222,61.456]],[\"comment/266\",[]],[\"name/267\",[223,61.456]],[\"comment/267\",[]],[\"name/268\",[224,61.456]],[\"comment/268\",[]],[\"name/269\",[225,61.456]],[\"comment/269\",[]],[\"name/270\",[226,61.456]],[\"comment/270\",[]],[\"name/271\",[227,61.456]],[\"comment/271\",[]],[\"name/272\",[228,61.456]],[\"comment/272\",[]],[\"name/273\",[229,61.456]],[\"comment/273\",[]],[\"name/274\",[230,61.456]],[\"comment/274\",[]],[\"name/275\",[231,61.456]],[\"comment/275\",[]],[\"name/276\",[232,61.456]],[\"comment/276\",[]],[\"name/277\",[233,61.456]],[\"comment/277\",[]],[\"name/278\",[234,61.456]],[\"comment/278\",[]],[\"name/279\",[235,61.456]],[\"comment/279\",[]],[\"name/280\",[236,61.456]],[\"comment/280\",[]],[\"name/281\",[237,61.456]],[\"comment/281\",[]],[\"name/282\",[238,61.456]],[\"comment/282\",[]],[\"name/283\",[239,61.456]],[\"comment/283\",[]],[\"name/284\",[240,61.456]],[\"comment/284\",[]],[\"name/285\",[241,61.456]],[\"comment/285\",[]],[\"name/286\",[242,61.456]],[\"comment/286\",[]],[\"name/287\",[243,61.456]],[\"comment/287\",[]],[\"name/288\",[244,61.456]],[\"comment/288\",[]],[\"name/289\",[245,61.456]],[\"comment/289\",[]],[\"name/290\",[246,61.456]],[\"comment/290\",[]],[\"name/291\",[247,61.456]],[\"comment/291\",[]],[\"name/292\",[7,31.667]],[\"comment/292\",[]],[\"name/293\",[248,56.348]],[\"comment/293\",[]],[\"name/294\",[249,56.348]],[\"comment/294\",[]],[\"name/295\",[250,61.456]],[\"comment/295\",[]],[\"name/296\",[251,61.456]],[\"comment/296\",[]],[\"name/297\",[7,31.667]],[\"comment/297\",[]],[\"name/298\",[248,56.348]],[\"comment/298\",[]],[\"name/299\",[249,56.348]],[\"comment/299\",[]],[\"name/300\",[252,61.456]],[\"comment/300\",[]],[\"name/301\",[253,61.456]],[\"comment/301\",[]],[\"name/302\",[254,61.456]],[\"comment/302\",[]],[\"name/303\",[255,61.456]],[\"comment/303\",[]],[\"name/304\",[8,50.47]],[\"comment/304\",[]],[\"name/305\",[256,61.456]],[\"comment/305\",[]],[\"name/306\",[257,61.456]],[\"comment/306\",[]],[\"name/307\",[1,46.793]],[\"comment/307\",[]],[\"name/308\",[258,61.456]],[\"comment/308\",[]],[\"name/309\",[259,61.456]],[\"comment/309\",[]],[\"name/310\",[260,61.456]],[\"comment/310\",[]],[\"name/311\",[261,61.456]],[\"comment/311\",[]],[\"name/312\",[262,61.456]],[\"comment/312\",[]],[\"name/313\",[263,61.456]],[\"comment/313\",[]],[\"name/314\",[264,61.456]],[\"comment/314\",[]],[\"name/315\",[7,31.667]],[\"comment/315\",[]],[\"name/316\",[265,61.456]],[\"comment/316\",[]],[\"name/317\",[7,31.667]],[\"comment/317\",[]],[\"name/318\",[266,61.456]],[\"comment/318\",[]],[\"name/319\",[7,31.667]],[\"comment/319\",[]],[\"name/320\",[41,52.983]],[\"comment/320\",[]],[\"name/321\",[267,61.456]],[\"comment/321\",[]],[\"name/322\",[268,61.456]],[\"comment/322\",[]],[\"name/323\",[269,61.456]],[\"comment/323\",[]],[\"name/324\",[270,61.456]],[\"comment/324\",[]],[\"name/325\",[271,61.456]],[\"comment/325\",[]],[\"name/326\",[272,61.456]],[\"comment/326\",[]],[\"name/327\",[273,61.456]],[\"comment/327\",[]],[\"name/328\",[111,56.348]],[\"comment/328\",[]],[\"name/329\",[102,56.348]],[\"comment/329\",[]],[\"name/330\",[274,61.456]],[\"comment/330\",[]],[\"name/331\",[275,61.456]],[\"comment/331\",[]],[\"name/332\",[276,61.456]],[\"comment/332\",[]],[\"name/333\",[277,61.456]],[\"comment/333\",[]],[\"name/334\",[278,61.456]],[\"comment/334\",[]],[\"name/335\",[279,61.456]],[\"comment/335\",[]],[\"name/336\",[280,61.456]],[\"comment/336\",[]],[\"name/337\",[281,61.456]],[\"comment/337\",[]],[\"name/338\",[282,61.456]],[\"comment/338\",[]],[\"name/339\",[283,61.456]],[\"comment/339\",[]],[\"name/340\",[284,61.456]],[\"comment/340\",[]],[\"name/341\",[285,61.456]],[\"comment/341\",[]],[\"name/342\",[286,61.456]],[\"comment/342\",[]],[\"name/343\",[287,61.456]],[\"comment/343\",[]],[\"name/344\",[288,61.456]],[\"comment/344\",[]],[\"name/345\",[289,61.456]],[\"comment/345\",[]],[\"name/346\",[290,61.456]],[\"comment/346\",[]],[\"name/347\",[291,61.456]],[\"comment/347\",[]],[\"name/348\",[292,61.456]],[\"comment/348\",[]],[\"name/349\",[293,61.456]],[\"comment/349\",[]],[\"name/350\",[294,61.456]],[\"comment/350\",[]],[\"name/351\",[295,61.456]],[\"comment/351\",[]],[\"name/352\",[296,61.456]],[\"comment/352\",[]],[\"name/353\",[297,61.456]],[\"comment/353\",[]],[\"name/354\",[298,61.456]],[\"comment/354\",[]],[\"name/355\",[299,61.456]],[\"comment/355\",[]],[\"name/356\",[300,61.456]],[\"comment/356\",[]],[\"name/357\",[301,46.793]],[\"comment/357\",[]],[\"name/358\",[302,61.456]],[\"comment/358\",[]],[\"name/359\",[11,52.983]],[\"comment/359\",[]],[\"name/360\",[11,52.983]],[\"comment/360\",[]],[\"name/361\",[1,46.793]],[\"comment/361\",[]],[\"name/362\",[303,61.456]],[\"comment/362\",[]],[\"name/363\",[304,61.456]],[\"comment/363\",[]],[\"name/364\",[305,61.456]],[\"comment/364\",[]],[\"name/365\",[306,61.456]],[\"comment/365\",[]],[\"name/366\",[307,61.456]],[\"comment/366\",[]],[\"name/367\",[308,61.456]],[\"comment/367\",[]],[\"name/368\",[309,61.456]],[\"comment/368\",[]],[\"name/369\",[310,56.348]],[\"comment/369\",[]],[\"name/370\",[311,61.456]],[\"comment/370\",[]],[\"name/371\",[7,31.667]],[\"comment/371\",[]],[\"name/372\",[2,50.47]],[\"comment/372\",[]],[\"name/373\",[312,61.456]],[\"comment/373\",[]],[\"name/374\",[313,61.456]],[\"comment/374\",[]],[\"name/375\",[314,61.456]],[\"comment/375\",[]],[\"name/376\",[7,31.667]],[\"comment/376\",[]],[\"name/377\",[2,50.47]],[\"comment/377\",[]],[\"name/378\",[315,61.456]],[\"comment/378\",[]],[\"name/379\",[316,61.456]],[\"comment/379\",[]],[\"name/380\",[7,31.667]],[\"comment/380\",[]],[\"name/381\",[317,52.983]],[\"comment/381\",[]],[\"name/382\",[318,50.47]],[\"comment/382\",[]],[\"name/383\",[319,61.456]],[\"comment/383\",[]],[\"name/384\",[320,61.456]],[\"comment/384\",[]],[\"name/385\",[321,61.456]],[\"comment/385\",[]],[\"name/386\",[7,31.667]],[\"comment/386\",[]],[\"name/387\",[317,52.983]],[\"comment/387\",[]],[\"name/388\",[318,50.47]],[\"comment/388\",[]],[\"name/389\",[2,50.47]],[\"comment/389\",[]],[\"name/390\",[322,61.456]],[\"comment/390\",[]],[\"name/391\",[323,61.456]],[\"comment/391\",[]],[\"name/392\",[7,31.667]],[\"comment/392\",[]],[\"name/393\",[317,52.983]],[\"comment/393\",[]],[\"name/394\",[318,50.47]],[\"comment/394\",[]],[\"name/395\",[324,61.456]],[\"comment/395\",[]],[\"name/396\",[325,61.456]],[\"comment/396\",[]],[\"name/397\",[7,31.667]],[\"comment/397\",[]],[\"name/398\",[326,61.456]],[\"comment/398\",[]],[\"name/399\",[327,56.348]],[\"comment/399\",[]],[\"name/400\",[328,61.456]],[\"comment/400\",[]],[\"name/401\",[9,48.463]],[\"comment/401\",[]],[\"name/402\",[35,56.348]],[\"comment/402\",[]],[\"name/403\",[329,61.456]],[\"comment/403\",[]],[\"name/404\",[330,61.456]],[\"comment/404\",[]],[\"name/405\",[331,61.456]],[\"comment/405\",[]],[\"name/406\",[332,61.456]],[\"comment/406\",[]],[\"name/407\",[333,61.456]],[\"comment/407\",[]],[\"name/408\",[334,61.456]],[\"comment/408\",[]],[\"name/409\",[335,61.456]],[\"comment/409\",[]],[\"name/410\",[63,50.47]],[\"comment/410\",[]],[\"name/411\",[336,61.456]],[\"comment/411\",[]],[\"name/412\",[337,61.456]],[\"comment/412\",[]],[\"name/413\",[338,61.456]],[\"comment/413\",[]],[\"name/414\",[339,61.456]],[\"comment/414\",[]],[\"name/415\",[340,56.348]],[\"comment/415\",[]],[\"name/416\",[341,56.348]],[\"comment/416\",[]],[\"name/417\",[342,61.456]],[\"comment/417\",[]],[\"name/418\",[343,61.456]],[\"comment/418\",[]],[\"name/419\",[344,61.456]],[\"comment/419\",[]],[\"name/420\",[345,61.456]],[\"comment/420\",[]],[\"name/421\",[40,56.348]],[\"comment/421\",[]],[\"name/422\",[1,46.793]],[\"comment/422\",[]],[\"name/423\",[3,52.983]],[\"comment/423\",[]],[\"name/424\",[346,56.348]],[\"comment/424\",[]],[\"name/425\",[347,61.456]],[\"comment/425\",[]],[\"name/426\",[348,61.456]],[\"comment/426\",[]],[\"name/427\",[349,61.456]],[\"comment/427\",[]],[\"name/428\",[350,61.456]],[\"comment/428\",[]],[\"name/429\",[351,61.456]],[\"comment/429\",[]],[\"name/430\",[352,52.983]],[\"comment/430\",[]],[\"name/431\",[353,61.456]],[\"comment/431\",[]],[\"name/432\",[354,52.983]],[\"comment/432\",[]],[\"name/433\",[355,52.983]],[\"comment/433\",[]],[\"name/434\",[356,61.456]],[\"comment/434\",[]],[\"name/435\",[357,61.456]],[\"comment/435\",[]],[\"name/436\",[358,61.456]],[\"comment/436\",[]],[\"name/437\",[359,61.456]],[\"comment/437\",[]],[\"name/438\",[360,61.456]],[\"comment/438\",[]],[\"name/439\",[346,56.348]],[\"comment/439\",[]],[\"name/440\",[361,56.348]],[\"comment/440\",[]],[\"name/441\",[362,56.348]],[\"comment/441\",[]],[\"name/442\",[363,61.456]],[\"comment/442\",[]],[\"name/443\",[354,52.983]],[\"comment/443\",[]],[\"name/444\",[355,52.983]],[\"comment/444\",[]],[\"name/445\",[364,61.456]],[\"comment/445\",[]],[\"name/446\",[89,56.348]],[\"comment/446\",[]],[\"name/447\",[365,61.456]],[\"comment/447\",[]],[\"name/448\",[366,61.456]],[\"comment/448\",[]],[\"name/449\",[367,61.456]],[\"comment/449\",[]],[\"name/450\",[368,61.456]],[\"comment/450\",[]],[\"name/451\",[21,56.348]],[\"comment/451\",[]],[\"name/452\",[369,61.456]],[\"comment/452\",[]],[\"name/453\",[370,61.456]],[\"comment/453\",[]],[\"name/454\",[371,61.456]],[\"comment/454\",[]],[\"name/455\",[372,61.456]],[\"comment/455\",[]],[\"name/456\",[373,61.456]],[\"comment/456\",[]],[\"name/457\",[374,61.456]],[\"comment/457\",[]],[\"name/458\",[375,61.456]],[\"comment/458\",[]],[\"name/459\",[376,61.456]],[\"comment/459\",[]],[\"name/460\",[377,61.456]],[\"comment/460\",[]],[\"name/461\",[378,61.456]],[\"comment/461\",[]],[\"name/462\",[379,36.889]],[\"comment/462\",[]],[\"name/463\",[380,36.889]],[\"comment/463\",[]],[\"name/464\",[381,38.102]],[\"comment/464\",[]],[\"name/465\",[382,38.102]],[\"comment/465\",[]],[\"name/466\",[383,61.456]],[\"comment/466\",[]],[\"name/467\",[384,52.983]],[\"comment/467\",[]],[\"name/468\",[385,50.47]],[\"comment/468\",[]],[\"name/469\",[386,45.362]],[\"comment/469\",[]],[\"name/470\",[387,52.983]],[\"comment/470\",[]],[\"name/471\",[388,61.456]],[\"comment/471\",[]],[\"name/472\",[389,56.348]],[\"comment/472\",[]],[\"name/473\",[379,36.889]],[\"comment/473\",[]],[\"name/474\",[380,36.889]],[\"comment/474\",[]],[\"name/475\",[381,38.102]],[\"comment/475\",[]],[\"name/476\",[382,38.102]],[\"comment/476\",[]],[\"name/477\",[390,61.456]],[\"comment/477\",[]],[\"name/478\",[391,61.456]],[\"comment/478\",[]],[\"name/479\",[379,36.889]],[\"comment/479\",[]],[\"name/480\",[380,36.889]],[\"comment/480\",[]],[\"name/481\",[381,38.102]],[\"comment/481\",[]],[\"name/482\",[382,38.102]],[\"comment/482\",[]],[\"name/483\",[392,61.456]],[\"comment/483\",[]],[\"name/484\",[379,36.889]],[\"comment/484\",[]],[\"name/485\",[380,36.889]],[\"comment/485\",[]],[\"name/486\",[381,38.102]],[\"comment/486\",[]],[\"name/487\",[382,38.102]],[\"comment/487\",[]],[\"name/488\",[393,61.456]],[\"comment/488\",[]],[\"name/489\",[379,36.889]],[\"comment/489\",[]],[\"name/490\",[380,36.889]],[\"comment/490\",[]],[\"name/491\",[381,38.102]],[\"comment/491\",[]],[\"name/492\",[382,38.102]],[\"comment/492\",[]],[\"name/493\",[394,61.456]],[\"comment/493\",[]],[\"name/494\",[386,45.362]],[\"comment/494\",[]],[\"name/495\",[379,36.889]],[\"comment/495\",[]],[\"name/496\",[380,36.889]],[\"comment/496\",[]],[\"name/497\",[381,38.102]],[\"comment/497\",[]],[\"name/498\",[382,38.102]],[\"comment/498\",[]],[\"name/499\",[395,61.456]],[\"comment/499\",[]],[\"name/500\",[386,45.362]],[\"comment/500\",[]],[\"name/501\",[379,36.889]],[\"comment/501\",[]],[\"name/502\",[380,36.889]],[\"comment/502\",[]],[\"name/503\",[381,38.102]],[\"comment/503\",[]],[\"name/504\",[382,38.102]],[\"comment/504\",[]],[\"name/505\",[396,61.456]],[\"comment/505\",[]],[\"name/506\",[379,36.889]],[\"comment/506\",[]],[\"name/507\",[380,36.889]],[\"comment/507\",[]],[\"name/508\",[381,38.102]],[\"comment/508\",[]],[\"name/509\",[382,38.102]],[\"comment/509\",[]],[\"name/510\",[397,61.456]],[\"comment/510\",[]],[\"name/511\",[379,36.889]],[\"comment/511\",[]],[\"name/512\",[380,36.889]],[\"comment/512\",[]],[\"name/513\",[381,38.102]],[\"comment/513\",[]],[\"name/514\",[382,38.102]],[\"comment/514\",[]],[\"name/515\",[398,61.456]],[\"comment/515\",[]],[\"name/516\",[386,45.362]],[\"comment/516\",[]],[\"name/517\",[379,36.889]],[\"comment/517\",[]],[\"name/518\",[380,36.889]],[\"comment/518\",[]],[\"name/519\",[381,38.102]],[\"comment/519\",[]],[\"name/520\",[382,38.102]],[\"comment/520\",[]],[\"name/521\",[399,61.456]],[\"comment/521\",[]],[\"name/522\",[400,56.348]],[\"comment/522\",[]],[\"name/523\",[401,56.348]],[\"comment/523\",[]],[\"name/524\",[402,61.456]],[\"comment/524\",[]],[\"name/525\",[403,56.348]],[\"comment/525\",[]],[\"name/526\",[404,61.456]],[\"comment/526\",[]],[\"name/527\",[63,50.47]],[\"comment/527\",[]],[\"name/528\",[79,56.348]],[\"comment/528\",[]],[\"name/529\",[72,56.348]],[\"comment/529\",[]],[\"name/530\",[56,56.348]],[\"comment/530\",[]],[\"name/531\",[379,36.889]],[\"comment/531\",[]],[\"name/532\",[380,36.889]],[\"comment/532\",[]],[\"name/533\",[381,38.102]],[\"comment/533\",[]],[\"name/534\",[382,38.102]],[\"comment/534\",[]],[\"name/535\",[405,61.456]],[\"comment/535\",[]],[\"name/536\",[385,50.47]],[\"comment/536\",[]],[\"name/537\",[386,45.362]],[\"comment/537\",[]],[\"name/538\",[379,36.889]],[\"comment/538\",[]],[\"name/539\",[380,36.889]],[\"comment/539\",[]],[\"name/540\",[381,38.102]],[\"comment/540\",[]],[\"name/541\",[382,38.102]],[\"comment/541\",[]],[\"name/542\",[406,61.456]],[\"comment/542\",[]],[\"name/543\",[384,52.983]],[\"comment/543\",[]],[\"name/544\",[386,45.362]],[\"comment/544\",[]],[\"name/545\",[387,52.983]],[\"comment/545\",[]],[\"name/546\",[385,50.47]],[\"comment/546\",[]],[\"name/547\",[407,56.348]],[\"comment/547\",[]],[\"name/548\",[400,56.348]],[\"comment/548\",[]],[\"name/549\",[7,31.667]],[\"comment/549\",[]],[\"name/550\",[380,36.889]],[\"comment/550\",[]],[\"name/551\",[408,61.456]],[\"comment/551\",[]],[\"name/552\",[7,31.667]],[\"comment/552\",[]],[\"name/553\",[380,36.889]],[\"comment/553\",[]],[\"name/554\",[379,36.889]],[\"comment/554\",[]],[\"name/555\",[380,36.889]],[\"comment/555\",[]],[\"name/556\",[381,38.102]],[\"comment/556\",[]],[\"name/557\",[382,38.102]],[\"comment/557\",[]],[\"name/558\",[409,61.456]],[\"comment/558\",[]],[\"name/559\",[386,45.362]],[\"comment/559\",[]],[\"name/560\",[387,52.983]],[\"comment/560\",[]],[\"name/561\",[385,50.47]],[\"comment/561\",[]],[\"name/562\",[379,36.889]],[\"comment/562\",[]],[\"name/563\",[380,36.889]],[\"comment/563\",[]],[\"name/564\",[381,38.102]],[\"comment/564\",[]],[\"name/565\",[382,38.102]],[\"comment/565\",[]],[\"name/566\",[410,61.456]],[\"comment/566\",[]],[\"name/567\",[411,61.456]],[\"comment/567\",[]],[\"name/568\",[362,56.348]],[\"comment/568\",[]],[\"name/569\",[379,36.889]],[\"comment/569\",[]],[\"name/570\",[380,36.889]],[\"comment/570\",[]],[\"name/571\",[381,38.102]],[\"comment/571\",[]],[\"name/572\",[382,38.102]],[\"comment/572\",[]],[\"name/573\",[412,61.456]],[\"comment/573\",[]],[\"name/574\",[379,36.889]],[\"comment/574\",[]],[\"name/575\",[413,61.456]],[\"comment/575\",[]],[\"name/576\",[354,52.983]],[\"comment/576\",[]],[\"name/577\",[355,52.983]],[\"comment/577\",[]],[\"name/578\",[389,56.348]],[\"comment/578\",[]],[\"name/579\",[414,61.456]],[\"comment/579\",[]],[\"name/580\",[415,61.456]],[\"comment/580\",[]],[\"name/581\",[416,61.456]],[\"comment/581\",[]],[\"name/582\",[417,61.456]],[\"comment/582\",[]],[\"name/583\",[418,61.456]],[\"comment/583\",[]],[\"name/584\",[419,61.456]],[\"comment/584\",[]],[\"name/585\",[420,61.456]],[\"comment/585\",[]],[\"name/586\",[421,61.456]],[\"comment/586\",[]],[\"name/587\",[422,61.456]],[\"comment/587\",[]],[\"name/588\",[423,61.456]],[\"comment/588\",[]],[\"name/589\",[424,61.456]],[\"comment/589\",[]],[\"name/590\",[425,61.456]],[\"comment/590\",[]],[\"name/591\",[426,61.456]],[\"comment/591\",[]],[\"name/592\",[427,61.456]],[\"comment/592\",[]],[\"name/593\",[428,61.456]],[\"comment/593\",[]],[\"name/594\",[379,36.889]],[\"comment/594\",[]],[\"name/595\",[3,52.983]],[\"comment/595\",[]],[\"name/596\",[318,50.47]],[\"comment/596\",[]],[\"name/597\",[429,61.456]],[\"comment/597\",[]],[\"name/598\",[430,61.456]],[\"comment/598\",[]],[\"name/599\",[361,56.348]],[\"comment/599\",[]],[\"name/600\",[431,61.456]],[\"comment/600\",[]],[\"name/601\",[45,56.348]],[\"comment/601\",[]],[\"name/602\",[432,61.456]],[\"comment/602\",[]],[\"name/603\",[433,61.456]],[\"comment/603\",[]],[\"name/604\",[434,61.456]],[\"comment/604\",[]],[\"name/605\",[435,61.456]],[\"comment/605\",[]],[\"name/606\",[327,56.348]],[\"comment/606\",[]],[\"name/607\",[436,61.456]],[\"comment/607\",[]],[\"name/608\",[437,61.456]],[\"comment/608\",[]],[\"name/609\",[438,61.456]],[\"comment/609\",[]],[\"name/610\",[310,56.348]],[\"comment/610\",[]],[\"name/611\",[16,50.47]],[\"comment/611\",[]],[\"name/612\",[13,48.463]],[\"comment/612\",[]],[\"name/613\",[14,48.463]],[\"comment/613\",[]],[\"name/614\",[15,50.47]],[\"comment/614\",[]],[\"name/615\",[17,50.47]],[\"comment/615\",[]],[\"name/616\",[36,56.348]],[\"comment/616\",[]],[\"name/617\",[439,61.456]],[\"comment/617\",[]],[\"name/618\",[440,61.456]],[\"comment/618\",[]],[\"name/619\",[93,46.793]],[\"comment/619\",[]],[\"name/620\",[441,48.463]],[\"comment/620\",[]],[\"name/621\",[442,56.348]],[\"comment/621\",[]],[\"name/622\",[443,61.456]],[\"comment/622\",[]],[\"name/623\",[301,46.793]],[\"comment/623\",[]],[\"name/624\",[444,48.463]],[\"comment/624\",[]],[\"name/625\",[401,56.348]],[\"comment/625\",[]],[\"name/626\",[445,61.456]],[\"comment/626\",[]],[\"name/627\",[446,52.983]],[\"comment/627\",[]],[\"name/628\",[447,61.456]],[\"comment/628\",[]],[\"name/629\",[340,56.348]],[\"comment/629\",[]],[\"name/630\",[448,61.456]],[\"comment/630\",[]],[\"name/631\",[63,50.47]],[\"comment/631\",[]],[\"name/632\",[341,56.348]],[\"comment/632\",[]],[\"name/633\",[449,61.456]],[\"comment/633\",[]],[\"name/634\",[403,56.348]],[\"comment/634\",[]],[\"name/635\",[450,61.456]],[\"comment/635\",[]],[\"name/636\",[451,61.456]],[\"comment/636\",[]],[\"name/637\",[384,52.983]],[\"comment/637\",[]],[\"name/638\",[8,50.47]],[\"comment/638\",[]],[\"name/639\",[452,61.456]],[\"comment/639\",[]],[\"name/640\",[453,61.456]],[\"comment/640\",[]],[\"name/641\",[454,61.456]],[\"comment/641\",[]],[\"name/642\",[455,61.456]],[\"comment/642\",[]],[\"name/643\",[456,61.456]],[\"comment/643\",[]],[\"name/644\",[457,61.456]],[\"comment/644\",[]],[\"name/645\",[458,61.456]],[\"comment/645\",[]],[\"name/646\",[459,61.456]],[\"comment/646\",[]],[\"name/647\",[460,61.456]],[\"comment/647\",[]],[\"name/648\",[461,61.456]],[\"comment/648\",[]],[\"name/649\",[31,48.463]],[\"comment/649\",[]],[\"name/650\",[441,48.463]],[\"comment/650\",[]],[\"name/651\",[462,61.456]],[\"comment/651\",[]],[\"name/652\",[93,46.793]],[\"comment/652\",[]],[\"name/653\",[441,48.463]],[\"comment/653\",[]],[\"name/654\",[301,46.793]],[\"comment/654\",[]],[\"name/655\",[444,48.463]],[\"comment/655\",[]],[\"name/656\",[463,56.348]],[\"comment/656\",[]],[\"name/657\",[446,52.983]],[\"comment/657\",[]],[\"name/658\",[464,61.456]],[\"comment/658\",[]],[\"name/659\",[93,46.793]],[\"comment/659\",[]],[\"name/660\",[441,48.463]],[\"comment/660\",[]],[\"name/661\",[442,56.348]],[\"comment/661\",[]],[\"name/662\",[465,61.456]],[\"comment/662\",[]],[\"name/663\",[301,46.793]],[\"comment/663\",[]],[\"name/664\",[444,48.463]],[\"comment/664\",[]],[\"name/665\",[463,56.348]],[\"comment/665\",[]],[\"name/666\",[352,52.983]],[\"comment/666\",[]],[\"name/667\",[446,52.983]],[\"comment/667\",[]],[\"name/668\",[407,56.348]],[\"comment/668\",[]],[\"name/669\",[466,61.456]],[\"comment/669\",[]],[\"name/670\",[93,46.793]],[\"comment/670\",[]],[\"name/671\",[441,48.463]],[\"comment/671\",[]],[\"name/672\",[467,61.456]],[\"comment/672\",[]],[\"name/673\",[352,52.983]],[\"comment/673\",[]],[\"name/674\",[301,46.793]],[\"comment/674\",[]],[\"name/675\",[444,48.463]],[\"comment/675\",[]],[\"name/676\",[468,61.456]],[\"comment/676\",[]],[\"name/677\",[469,61.456]],[\"comment/677\",[]],[\"name/678\",[93,46.793]],[\"comment/678\",[]],[\"name/679\",[13,48.463]],[\"comment/679\",[]],[\"name/680\",[14,48.463]],[\"comment/680\",[]],[\"name/681\",[470,61.456]],[\"comment/681\",[]],[\"name/682\",[7,31.667]],[\"comment/682\",[]],[\"name/683\",[471,61.456]],[\"comment/683\",[]],[\"name/684\",[472,61.456]],[\"comment/684\",[]],[\"name/685\",[473,61.456]],[\"comment/685\",[]],[\"name/686\",[301,46.793]],[\"comment/686\",[]],[\"name/687\",[444,48.463]],[\"comment/687\",[]],[\"name/688\",[4,56.348]],[\"comment/688\",[]],[\"name/689\",[13,48.463]],[\"comment/689\",[]],[\"name/690\",[14,48.463]],[\"comment/690\",[]],[\"name/691\",[15,50.47]],[\"comment/691\",[]],[\"name/692\",[16,50.47]],[\"comment/692\",[]],[\"name/693\",[17,50.47]],[\"comment/693\",[]],[\"name/694\",[24,56.348]],[\"comment/694\",[]],[\"name/695\",[9,48.463]],[\"comment/695\",[]],[\"name/696\",[474,61.456]],[\"comment/696\",[]],[\"name/697\",[475,61.456]],[\"comment/697\",[]],[\"name/698\",[476,61.456]],[\"comment/698\",[]]],\"invertedIndex\":[[\"__type\",{\"_index\":7,\"name\":{\"7\":{},\"13\":{},\"15\":{},\"17\":{},\"19\":{},\"21\":{},\"23\":{},\"25\":{},\"27\":{},\"29\":{},\"41\":{},\"43\":{},\"45\":{},\"46\":{},\"71\":{},\"292\":{},\"297\":{},\"315\":{},\"317\":{},\"319\":{},\"371\":{},\"376\":{},\"380\":{},\"386\":{},\"392\":{},\"397\":{},\"549\":{},\"552\":{},\"682\":{}},\"comment\":{}}],[\"abs\",{\"_index\":118,\"name\":{\"161\":{}},\"comment\":{}}],[\"acos\",{\"_index\":119,\"name\":{\"162\":{}},\"comment\":{}}],[\"acosh\",{\"_index\":120,\"name\":{\"163\":{}},\"comment\":{}}],[\"adapter\",{\"_index\":324,\"name\":{\"395\":{}},\"comment\":{}}],[\"add\",{\"_index\":121,\"name\":{\"164\":{}},\"comment\":{}}],[\"age\",{\"_index\":447,\"name\":{\"628\":{}},\"comment\":{}}],[\"agent\",{\"_index\":307,\"name\":{\"366\":{}},\"comment\":{}}],[\"all\",{\"_index\":19,\"name\":{\"28\":{},\"80\":{},\"165\":{}},\"comment\":{}}],[\"alpha\",{\"_index\":283,\"name\":{\"339\":{}},\"comment\":{}}],[\"analyze\",{\"_index\":26,\"name\":{\"36\":{}},\"comment\":{}}],[\"annotations\",{\"_index\":446,\"name\":{\"627\":{},\"657\":{},\"667\":{}},\"comment\":{}}],[\"antispoof\",{\"_index\":79,\"name\":{\"118\":{},\"528\":{}},\"comment\":{}}],[\"any\",{\"_index\":122,\"name\":{\"166\":{}},\"comment\":{}}],[\"anycanvas\",{\"_index\":369,\"name\":{\"452\":{}},\"comment\":{}}],[\"anyimage\",{\"_index\":370,\"name\":{\"453\":{}},\"comment\":{}}],[\"anyvideo\",{\"_index\":371,\"name\":{\"454\":{}},\"comment\":{}}],[\"argmax\",{\"_index\":123,\"name\":{\"167\":{}},\"comment\":{}}],[\"argmin\",{\"_index\":124,\"name\":{\"168\":{}},\"comment\":{}}],[\"array\",{\"_index\":105,\"name\":{\"148\":{}},\"comment\":{}}],[\"arraysync\",{\"_index\":106,\"name\":{\"149\":{}},\"comment\":{}}],[\"as1d\",{\"_index\":127,\"name\":{\"171\":{}},\"comment\":{}}],[\"as2d\",{\"_index\":128,\"name\":{\"172\":{}},\"comment\":{}}],[\"as3d\",{\"_index\":129,\"name\":{\"173\":{}},\"comment\":{}}],[\"as4d\",{\"_index\":130,\"name\":{\"174\":{}},\"comment\":{}}],[\"as5d\",{\"_index\":131,\"name\":{\"175\":{}},\"comment\":{}}],[\"asin\",{\"_index\":132,\"name\":{\"176\":{}},\"comment\":{}}],[\"asinh\",{\"_index\":133,\"name\":{\"177\":{}},\"comment\":{}}],[\"asscalar\",{\"_index\":125,\"name\":{\"169\":{}},\"comment\":{}}],[\"astype\",{\"_index\":126,\"name\":{\"170\":{}},\"comment\":{}}],[\"async\",{\"_index\":431,\"name\":{\"600\":{}},\"comment\":{}}],[\"atan\",{\"_index\":134,\"name\":{\"178\":{}},\"comment\":{}}],[\"atan2\",{\"_index\":135,\"name\":{\"179\":{}},\"comment\":{}}],[\"atanh\",{\"_index\":136,\"name\":{\"180\":{}},\"comment\":{}}],[\"attention\",{\"_index\":402,\"name\":{\"524\":{}},\"comment\":{}}],[\"avgpool\",{\"_index\":137,\"name\":{\"181\":{}},\"comment\":{}}],[\"backend\",{\"_index\":318,\"name\":{\"382\":{},\"388\":{},\"394\":{},\"596\":{}},\"comment\":{}}],[\"backendenum\",{\"_index\":375,\"name\":{\"458\":{}},\"comment\":{}}],[\"backends\",{\"_index\":308,\"name\":{\"367\":{}},\"comment\":{}}],[\"batchnorm\",{\"_index\":139,\"name\":{\"183\":{}},\"comment\":{}}],[\"batchtospacend\",{\"_index\":138,\"name\":{\"182\":{}},\"comment\":{}}],[\"blazepose\",{\"_index\":58,\"name\":{\"97\":{}},\"comment\":{}}],[\"blazeposedetect\",{\"_index\":57,\"name\":{\"96\":{}},\"comment\":{}}],[\"blur\",{\"_index\":418,\"name\":{\"583\":{}},\"comment\":{}}],[\"body\",{\"_index\":14,\"name\":{\"18\":{},\"83\":{},\"613\":{},\"680\":{},\"690\":{}},\"comment\":{}}],[\"bodyannotation\",{\"_index\":344,\"name\":{\"419\":{}},\"comment\":{}}],[\"bodyannotationblazepose\",{\"_index\":456,\"name\":{\"643\":{}},\"comment\":{}}],[\"bodyannotationefficientpose\",{\"_index\":457,\"name\":{\"644\":{}},\"comment\":{}}],[\"bodyconfig\",{\"_index\":405,\"name\":{\"535\":{}},\"comment\":{}}],[\"bodygesture\",{\"_index\":333,\"name\":{\"407\":{}},\"comment\":{}}],[\"bodykeypoint\",{\"_index\":458,\"name\":{\"645\":{}},\"comment\":{}}],[\"bodylandmark\",{\"_index\":343,\"name\":{\"418\":{}},\"comment\":{}}],[\"bodylandmarkblazepose\",{\"_index\":455,\"name\":{\"642\":{}},\"comment\":{}}],[\"bodylandmarkefficientnet\",{\"_index\":454,\"name\":{\"641\":{}},\"comment\":{}}],[\"bodylandmarkmovenet\",{\"_index\":453,\"name\":{\"640\":{}},\"comment\":{}}],[\"bodylandmarkposenet\",{\"_index\":452,\"name\":{\"639\":{}},\"comment\":{}}],[\"bodyresult\",{\"_index\":462,\"name\":{\"651\":{}},\"comment\":{}}],[\"box\",{\"_index\":301,\"name\":{\"357\":{},\"623\":{},\"654\":{},\"663\":{},\"674\":{},\"686\":{}},\"comment\":{}}],[\"boxraw\",{\"_index\":444,\"name\":{\"624\":{},\"655\":{},\"664\":{},\"675\":{},\"687\":{}},\"comment\":{}}],[\"boxscore\",{\"_index\":442,\"name\":{\"621\":{},\"661\":{}},\"comment\":{}}],[\"brightness\",{\"_index\":415,\"name\":{\"580\":{}},\"comment\":{}}],[\"broadcastto\",{\"_index\":140,\"name\":{\"184\":{}},\"comment\":{}}],[\"browser\",{\"_index\":303,\"name\":{\"362\":{}},\"comment\":{}}],[\"buffer\",{\"_index\":103,\"name\":{\"146\":{}},\"comment\":{}}],[\"buffersync\",{\"_index\":104,\"name\":{\"147\":{}},\"comment\":{}}],[\"bytes\",{\"_index\":110,\"name\":{\"153\":{}},\"comment\":{}}],[\"cachemodels\",{\"_index\":433,\"name\":{\"603\":{}},\"comment\":{}}],[\"cachesensitivity\",{\"_index\":435,\"name\":{\"605\":{}},\"comment\":{}}],[\"canvas\",{\"_index\":9,\"name\":{\"9\":{},\"14\":{},\"79\":{},\"401\":{},\"695\":{}},\"comment\":{}}],[\"capabilities\",{\"_index\":349,\"name\":{\"427\":{}},\"comment\":{}}],[\"cast\",{\"_index\":141,\"name\":{\"185\":{}},\"comment\":{}}],[\"ceil\",{\"_index\":142,\"name\":{\"186\":{}},\"comment\":{}}],[\"centernet\",{\"_index\":59,\"name\":{\"98\":{}},\"comment\":{}}],[\"check\",{\"_index\":29,\"name\":{\"39\":{}},\"comment\":{}}],[\"class\",{\"_index\":467,\"name\":{\"672\":{}},\"comment\":{}}],[\"clipbyvalue\",{\"_index\":143,\"name\":{\"187\":{}},\"comment\":{}}],[\"clone\",{\"_index\":115,\"name\":{\"158\":{}},\"comment\":{}}],[\"color\",{\"_index\":282,\"name\":{\"338\":{}},\"comment\":{}}],[\"compare\",{\"_index\":38,\"name\":{\"54\":{}},\"comment\":{}}],[\"concat\",{\"_index\":144,\"name\":{\"188\":{}},\"comment\":{}}],[\"config\",{\"_index\":3,\"name\":{\"3\":{},\"423\":{},\"595\":{}},\"comment\":{}}],[\"constraints\",{\"_index\":350,\"name\":{\"428\":{}},\"comment\":{}}],[\"constructor\",{\"_index\":1,\"name\":{\"1\":{},\"93\":{},\"135\":{},\"307\":{},\"361\":{},\"422\":{}},\"comment\":{}}],[\"contrast\",{\"_index\":416,\"name\":{\"581\":{}},\"comment\":{}}],[\"conv1d\",{\"_index\":145,\"name\":{\"189\":{}},\"comment\":{}}],[\"conv2d\",{\"_index\":147,\"name\":{\"191\":{}},\"comment\":{}}],[\"conv2dtranspose\",{\"_index\":146,\"name\":{\"190\":{}},\"comment\":{}}],[\"cos\",{\"_index\":148,\"name\":{\"192\":{}},\"comment\":{}}],[\"cosh\",{\"_index\":149,\"name\":{\"193\":{}},\"comment\":{}}],[\"cpu\",{\"_index\":325,\"name\":{\"396\":{}},\"comment\":{}}],[\"crop\",{\"_index\":363,\"name\":{\"442\":{}},\"comment\":{}}],[\"cumprod\",{\"_index\":150,\"name\":{\"194\":{}},\"comment\":{}}],[\"cumsum\",{\"_index\":151,\"name\":{\"195\":{}},\"comment\":{}}],[\"data\",{\"_index\":107,\"name\":{\"150\":{}},\"comment\":{}}],[\"dataid\",{\"_index\":94,\"name\":{\"137\":{}},\"comment\":{}}],[\"datasync\",{\"_index\":109,\"name\":{\"152\":{}},\"comment\":{}}],[\"datatogpu\",{\"_index\":108,\"name\":{\"151\":{}},\"comment\":{}}],[\"deallocate\",{\"_index\":437,\"name\":{\"608\":{}},\"comment\":{}}],[\"debug\",{\"_index\":361,\"name\":{\"440\":{},\"599\":{}},\"comment\":{}}],[\"default\",{\"_index\":50,\"name\":{\"66\":{}},\"comment\":{}}],[\"defaults\",{\"_index\":439,\"name\":{\"617\":{}},\"comment\":{}}],[\"depthtospace\",{\"_index\":152,\"name\":{\"196\":{}},\"comment\":{}}],[\"depthwiseconv2d\",{\"_index\":153,\"name\":{\"197\":{}},\"comment\":{}}],[\"description\",{\"_index\":404,\"name\":{\"526\":{}},\"comment\":{}}],[\"descriptor\",{\"_index\":51,\"name\":{\"75\":{}},\"comment\":{}}],[\"detect\",{\"_index\":47,\"name\":{\"63\":{}},\"comment\":{}}],[\"detector\",{\"_index\":400,\"name\":{\"522\":{},\"548\":{}},\"comment\":{}}],[\"dilation2d\",{\"_index\":154,\"name\":{\"198\":{}},\"comment\":{}}],[\"dispose\",{\"_index\":111,\"name\":{\"154\":{},\"328\":{}},\"comment\":{}}],[\"disposeintermediatetensors\",{\"_index\":273,\"name\":{\"327\":{}},\"comment\":{}}],[\"distance\",{\"_index\":31,\"name\":{\"42\":{},\"48\":{},\"68\":{},\"73\":{},\"649\":{}},\"comment\":{}}],[\"div\",{\"_index\":156,\"name\":{\"200\":{}},\"comment\":{}}],[\"divnonan\",{\"_index\":155,\"name\":{\"199\":{}},\"comment\":{}}],[\"dot\",{\"_index\":157,\"name\":{\"201\":{}},\"comment\":{}}],[\"draw\",{\"_index\":12,\"name\":{\"12\":{},\"77\":{}},\"comment\":{}}],[\"drawattention\",{\"_index\":293,\"name\":{\"349\":{}},\"comment\":{}}],[\"drawboxes\",{\"_index\":295,\"name\":{\"351\":{}},\"comment\":{}}],[\"drawgaze\",{\"_index\":297,\"name\":{\"353\":{}},\"comment\":{}}],[\"drawgestures\",{\"_index\":294,\"name\":{\"350\":{}},\"comment\":{}}],[\"drawlabels\",{\"_index\":292,\"name\":{\"348\":{}},\"comment\":{}}],[\"drawoptions\",{\"_index\":281,\"name\":{\"337\":{}},\"comment\":{}}],[\"drawpoints\",{\"_index\":291,\"name\":{\"347\":{}},\"comment\":{}}],[\"drawpolygons\",{\"_index\":296,\"name\":{\"352\":{}},\"comment\":{}}],[\"dtype\",{\"_index\":97,\"name\":{\"140\":{}},\"comment\":{}}],[\"efficientpose\",{\"_index\":60,\"name\":{\"99\":{}},\"comment\":{}}],[\"element\",{\"_index\":346,\"name\":{\"424\":{},\"439\":{}},\"comment\":{}}],[\"elu\",{\"_index\":158,\"name\":{\"202\":{}},\"comment\":{}}],[\"embedding\",{\"_index\":449,\"name\":{\"633\":{}},\"comment\":{}}],[\"emit\",{\"_index\":42,\"name\":{\"58\":{}},\"comment\":{}}],[\"emotion\",{\"_index\":63,\"name\":{\"102\":{},\"410\":{},\"527\":{},\"631\":{}},\"comment\":{}}],[\"enabled\",{\"_index\":379,\"name\":{\"462\":{},\"473\":{},\"479\":{},\"484\":{},\"489\":{},\"495\":{},\"501\":{},\"506\":{},\"511\":{},\"517\":{},\"531\":{},\"538\":{},\"554\":{},\"562\":{},\"569\":{},\"574\":{},\"594\":{}},\"comment\":{}}],[\"enhance\",{\"_index\":37,\"name\":{\"53\":{}},\"comment\":{}}],[\"env\",{\"_index\":11,\"name\":{\"11\":{},\"359\":{},\"360\":{}},\"comment\":{}}],[\"equal\",{\"_index\":159,\"name\":{\"203\":{}},\"comment\":{}}],[\"equalization\",{\"_index\":413,\"name\":{\"575\":{}},\"comment\":{}}],[\"erf\",{\"_index\":160,\"name\":{\"204\":{}},\"comment\":{}}],[\"error\",{\"_index\":476,\"name\":{\"698\":{}},\"comment\":{}}],[\"euclideannorm\",{\"_index\":161,\"name\":{\"205\":{}},\"comment\":{}}],[\"events\",{\"_index\":21,\"name\":{\"31\":{},\"451\":{}},\"comment\":{}}],[\"execute\",{\"_index\":270,\"name\":{\"324\":{}},\"comment\":{}}],[\"executeasync\",{\"_index\":271,\"name\":{\"325\":{}},\"comment\":{}}],[\"exp\",{\"_index\":162,\"name\":{\"206\":{}},\"comment\":{}}],[\"expanddims\",{\"_index\":163,\"name\":{\"207\":{}},\"comment\":{}}],[\"expm1\",{\"_index\":164,\"name\":{\"208\":{}},\"comment\":{}}],[\"externalcanvas\",{\"_index\":373,\"name\":{\"456\":{}},\"comment\":{}}],[\"face\",{\"_index\":13,\"name\":{\"16\":{},\"82\":{},\"612\":{},\"679\":{},\"689\":{}},\"comment\":{}}],[\"faceantispoofconfig\",{\"_index\":396,\"name\":{\"505\":{}},\"comment\":{}}],[\"faceattentionconfig\",{\"_index\":393,\"name\":{\"488\":{}},\"comment\":{}}],[\"faceconfig\",{\"_index\":399,\"name\":{\"521\":{}},\"comment\":{}}],[\"facedescriptionconfig\",{\"_index\":394,\"name\":{\"493\":{}},\"comment\":{}}],[\"facedetect\",{\"_index\":64,\"name\":{\"103\":{}},\"comment\":{}}],[\"facedetectorconfig\",{\"_index\":383,\"name\":{\"466\":{}},\"comment\":{}}],[\"faceemotionconfig\",{\"_index\":395,\"name\":{\"499\":{}},\"comment\":{}}],[\"facegearconfig\",{\"_index\":398,\"name\":{\"515\":{}},\"comment\":{}}],[\"facegesture\",{\"_index\":332,\"name\":{\"406\":{}},\"comment\":{}}],[\"faceiris\",{\"_index\":65,\"name\":{\"104\":{}},\"comment\":{}}],[\"faceirisconfig\",{\"_index\":392,\"name\":{\"483\":{}},\"comment\":{}}],[\"facelandmark\",{\"_index\":342,\"name\":{\"417\":{}},\"comment\":{}}],[\"facelivenessconfig\",{\"_index\":397,\"name\":{\"510\":{}},\"comment\":{}}],[\"facemesh\",{\"_index\":66,\"name\":{\"105\":{}},\"comment\":{}}],[\"facemeshconfig\",{\"_index\":390,\"name\":{\"477\":{}},\"comment\":{}}],[\"faceres\",{\"_index\":67,\"name\":{\"106\":{}},\"comment\":{}}],[\"faceresult\",{\"_index\":440,\"name\":{\"618\":{}},\"comment\":{}}],[\"facescore\",{\"_index\":443,\"name\":{\"622\":{}},\"comment\":{}}],[\"facetriangulation\",{\"_index\":22,\"name\":{\"32\":{}},\"comment\":{}}],[\"faceuvmap\",{\"_index\":23,\"name\":{\"33\":{}},\"comment\":{}}],[\"fft\",{\"_index\":165,\"name\":{\"209\":{}},\"comment\":{}}],[\"fillpolygons\",{\"_index\":298,\"name\":{\"354\":{}},\"comment\":{}}],[\"filter\",{\"_index\":310,\"name\":{\"369\":{},\"610\":{}},\"comment\":{}}],[\"filterconfig\",{\"_index\":412,\"name\":{\"573\":{}},\"comment\":{}}],[\"finger\",{\"_index\":336,\"name\":{\"411\":{}},\"comment\":{}}],[\"fingercurl\",{\"_index\":337,\"name\":{\"412\":{}},\"comment\":{}}],[\"fingerdirection\",{\"_index\":338,\"name\":{\"413\":{}},\"comment\":{}}],[\"fingerscore\",{\"_index\":465,\"name\":{\"662\":{}},\"comment\":{}}],[\"flags\",{\"_index\":327,\"name\":{\"399\":{},\"606\":{}},\"comment\":{}}],[\"flatten\",{\"_index\":166,\"name\":{\"210\":{}},\"comment\":{}}],[\"flip\",{\"_index\":414,\"name\":{\"579\":{}},\"comment\":{}}],[\"floor\",{\"_index\":167,\"name\":{\"211\":{}},\"comment\":{}}],[\"floordiv\",{\"_index\":168,\"name\":{\"212\":{}},\"comment\":{}}],[\"font\",{\"_index\":286,\"name\":{\"342\":{}},\"comment\":{}}],[\"gather\",{\"_index\":169,\"name\":{\"213\":{}},\"comment\":{}}],[\"gear\",{\"_index\":56,\"name\":{\"95\":{},\"530\":{}},\"comment\":{}}],[\"gender\",{\"_index\":340,\"name\":{\"415\":{},\"629\":{}},\"comment\":{}}],[\"genderscore\",{\"_index\":448,\"name\":{\"630\":{}},\"comment\":{}}],[\"genericconfig\",{\"_index\":378,\"name\":{\"461\":{}},\"comment\":{}}],[\"gesture\",{\"_index\":16,\"name\":{\"22\":{},\"86\":{},\"611\":{},\"692\":{}},\"comment\":{}}],[\"gestureconfig\",{\"_index\":428,\"name\":{\"593\":{}},\"comment\":{}}],[\"gestureresult\",{\"_index\":468,\"name\":{\"676\":{}},\"comment\":{}}],[\"gestures\",{\"_index\":473,\"name\":{\"685\":{}},\"comment\":{}}],[\"getintermediatetensors\",{\"_index\":272,\"name\":{\"326\":{}},\"comment\":{}}],[\"getmodelstats\",{\"_index\":44,\"name\":{\"60\":{},\"128\":{}},\"comment\":{}}],[\"gl\",{\"_index\":25,\"name\":{\"35\":{}},\"comment\":{}}],[\"gpu\",{\"_index\":315,\"name\":{\"378\":{}},\"comment\":{}}],[\"graphmodel\",{\"_index\":257,\"name\":{\"306\":{}},\"comment\":{}}],[\"greater\",{\"_index\":171,\"name\":{\"215\":{}},\"comment\":{}}],[\"greaterequal\",{\"_index\":170,\"name\":{\"214\":{}},\"comment\":{}}],[\"hand\",{\"_index\":15,\"name\":{\"20\":{},\"84\":{},\"614\":{},\"691\":{}},\"comment\":{}}],[\"handconfig\",{\"_index\":406,\"name\":{\"542\":{}},\"comment\":{}}],[\"handgesture\",{\"_index\":334,\"name\":{\"408\":{}},\"comment\":{}}],[\"handpose\",{\"_index\":69,\"name\":{\"108\":{}},\"comment\":{}}],[\"handresult\",{\"_index\":464,\"name\":{\"658\":{}},\"comment\":{}}],[\"hands\",{\"_index\":470,\"name\":{\"681\":{}},\"comment\":{}}],[\"handskeleton\",{\"_index\":70,\"name\":{\"109\":{}},\"comment\":{}}],[\"handtrack\",{\"_index\":71,\"name\":{\"110\":{}},\"comment\":{}}],[\"handtype\",{\"_index\":339,\"name\":{\"414\":{}},\"comment\":{}}],[\"height\",{\"_index\":355,\"name\":{\"433\":{},\"444\":{},\"577\":{}},\"comment\":{}}],[\"hue\",{\"_index\":420,\"name\":{\"585\":{}},\"comment\":{}}],[\"human\",{\"_index\":0,\"name\":{\"0\":{}},\"comment\":{}}],[\"id\",{\"_index\":93,\"name\":{\"136\":{},\"619\":{},\"652\":{},\"659\":{},\"670\":{},\"678\":{}},\"comment\":{}}],[\"ifft\",{\"_index\":172,\"name\":{\"216\":{}},\"comment\":{}}],[\"image\",{\"_index\":35,\"name\":{\"51\":{},\"402\":{}},\"comment\":{}}],[\"imagedata\",{\"_index\":329,\"name\":{\"403\":{}},\"comment\":{}}],[\"imageobjects\",{\"_index\":372,\"name\":{\"455\":{}},\"comment\":{}}],[\"incache\",{\"_index\":365,\"name\":{\"447\":{}},\"comment\":{}}],[\"index\",{\"_index\":33,\"name\":{\"47\":{},\"72\":{}},\"comment\":{}}],[\"indices\",{\"_index\":249,\"name\":{\"294\":{},\"299\":{}},\"comment\":{}}],[\"init\",{\"_index\":39,\"name\":{\"55\":{}},\"comment\":{}}],[\"initial\",{\"_index\":309,\"name\":{\"368\":{}},\"comment\":{}}],[\"input\",{\"_index\":374,\"name\":{\"457\":{}},\"comment\":{}}],[\"inputnodes\",{\"_index\":259,\"name\":{\"309\":{}},\"comment\":{}}],[\"inputs\",{\"_index\":261,\"name\":{\"311\":{}},\"comment\":{}}],[\"insightface\",{\"_index\":62,\"name\":{\"101\":{}},\"comment\":{}}],[\"iouthreshold\",{\"_index\":387,\"name\":{\"470\":{},\"545\":{},\"560\":{}},\"comment\":{}}],[\"irfft\",{\"_index\":173,\"name\":{\"217\":{}},\"comment\":{}}],[\"iris\",{\"_index\":403,\"name\":{\"525\":{},\"634\":{}},\"comment\":{}}],[\"irisgesture\",{\"_index\":335,\"name\":{\"409\":{}},\"comment\":{}}],[\"isdisposed\",{\"_index\":112,\"name\":{\"155\":{}},\"comment\":{}}],[\"isfinite\",{\"_index\":174,\"name\":{\"218\":{}},\"comment\":{}}],[\"isinf\",{\"_index\":175,\"name\":{\"219\":{}},\"comment\":{}}],[\"isnan\",{\"_index\":176,\"name\":{\"220\":{}},\"comment\":{}}],[\"keepinvalid\",{\"_index\":391,\"name\":{\"478\":{}},\"comment\":{}}],[\"kept\",{\"_index\":99,\"name\":{\"142\":{}},\"comment\":{}}],[\"kernelops\",{\"_index\":88,\"name\":{\"129\":{}},\"comment\":{}}],[\"kernels\",{\"_index\":328,\"name\":{\"400\":{}},\"comment\":{}}],[\"keypoints\",{\"_index\":463,\"name\":{\"656\":{},\"665\":{}},\"comment\":{}}],[\"kodachrome\",{\"_index\":424,\"name\":{\"589\":{}},\"comment\":{}}],[\"label\",{\"_index\":352,\"name\":{\"430\":{},\"666\":{},\"673\":{}},\"comment\":{}}],[\"labelcolor\",{\"_index\":284,\"name\":{\"340\":{}},\"comment\":{}}],[\"landmarks\",{\"_index\":407,\"name\":{\"547\":{},\"668\":{}},\"comment\":{}}],[\"leakyrelu\",{\"_index\":177,\"name\":{\"221\":{}},\"comment\":{}}],[\"left\",{\"_index\":471,\"name\":{\"683\":{}},\"comment\":{}}],[\"less\",{\"_index\":179,\"name\":{\"223\":{}},\"comment\":{}}],[\"lessequal\",{\"_index\":178,\"name\":{\"222\":{}},\"comment\":{}}],[\"lineheight\",{\"_index\":287,\"name\":{\"343\":{}},\"comment\":{}}],[\"linewidth\",{\"_index\":288,\"name\":{\"344\":{}},\"comment\":{}}],[\"live\",{\"_index\":451,\"name\":{\"636\":{}},\"comment\":{}}],[\"liveness\",{\"_index\":72,\"name\":{\"111\":{},\"529\":{}},\"comment\":{}}],[\"load\",{\"_index\":41,\"name\":{\"57\":{},\"89\":{},\"320\":{}},\"comment\":{}}],[\"loadsync\",{\"_index\":267,\"name\":{\"321\":{}},\"comment\":{}}],[\"localresponsenormalization\",{\"_index\":180,\"name\":{\"224\":{}},\"comment\":{}}],[\"log\",{\"_index\":184,\"name\":{\"228\":{}},\"comment\":{}}],[\"log1p\",{\"_index\":185,\"name\":{\"229\":{}},\"comment\":{}}],[\"logicaland\",{\"_index\":186,\"name\":{\"230\":{}},\"comment\":{}}],[\"logicalnot\",{\"_index\":187,\"name\":{\"231\":{}},\"comment\":{}}],[\"logicalor\",{\"_index\":188,\"name\":{\"232\":{}},\"comment\":{}}],[\"logicalxor\",{\"_index\":189,\"name\":{\"233\":{}},\"comment\":{}}],[\"logsigmoid\",{\"_index\":181,\"name\":{\"225\":{}},\"comment\":{}}],[\"logsoftmax\",{\"_index\":182,\"name\":{\"226\":{}},\"comment\":{}}],[\"logsumexp\",{\"_index\":183,\"name\":{\"227\":{}},\"comment\":{}}],[\"mask\",{\"_index\":388,\"name\":{\"471\":{}},\"comment\":{}}],[\"match\",{\"_index\":32,\"name\":{\"44\":{},\"67\":{},\"70\":{}},\"comment\":{}}],[\"matchoptions\",{\"_index\":52,\"name\":{\"76\":{}},\"comment\":{}}],[\"matmul\",{\"_index\":190,\"name\":{\"234\":{}},\"comment\":{}}],[\"max\",{\"_index\":192,\"name\":{\"236\":{}},\"comment\":{}}],[\"maxdetected\",{\"_index\":385,\"name\":{\"468\":{},\"536\":{},\"546\":{},\"561\":{}},\"comment\":{}}],[\"maximum\",{\"_index\":193,\"name\":{\"237\":{}},\"comment\":{}}],[\"maxpool\",{\"_index\":191,\"name\":{\"235\":{}},\"comment\":{}}],[\"mean\",{\"_index\":194,\"name\":{\"238\":{}},\"comment\":{}}],[\"meet\",{\"_index\":73,\"name\":{\"112\":{}},\"comment\":{}}],[\"mesh\",{\"_index\":401,\"name\":{\"523\":{},\"625\":{}},\"comment\":{}}],[\"meshraw\",{\"_index\":445,\"name\":{\"626\":{}},\"comment\":{}}],[\"metadata\",{\"_index\":264,\"name\":{\"314\":{}},\"comment\":{}}],[\"min\",{\"_index\":195,\"name\":{\"239\":{}},\"comment\":{}}],[\"minconfidence\",{\"_index\":386,\"name\":{\"469\":{},\"494\":{},\"500\":{},\"516\":{},\"537\":{},\"544\":{},\"559\":{}},\"comment\":{}}],[\"minimum\",{\"_index\":196,\"name\":{\"240\":{}},\"comment\":{}}],[\"mirrorpad\",{\"_index\":197,\"name\":{\"241\":{}},\"comment\":{}}],[\"missing\",{\"_index\":91,\"name\":{\"132\":{}},\"comment\":{}}],[\"mobilefacenet\",{\"_index\":61,\"name\":{\"100\":{}},\"comment\":{}}],[\"mod\",{\"_index\":198,\"name\":{\"242\":{}},\"comment\":{}}],[\"mode\",{\"_index\":362,\"name\":{\"441\":{},\"568\":{}},\"comment\":{}}],[\"model\",{\"_index\":326,\"name\":{\"398\":{}},\"comment\":{}}],[\"modelbasepath\",{\"_index\":432,\"name\":{\"602\":{}},\"comment\":{}}],[\"modelinfo\",{\"_index\":364,\"name\":{\"445\":{}},\"comment\":{}}],[\"modelpath\",{\"_index\":380,\"name\":{\"463\":{},\"474\":{},\"480\":{},\"485\":{},\"490\":{},\"496\":{},\"502\":{},\"507\":{},\"512\":{},\"518\":{},\"532\":{},\"539\":{},\"550\":{},\"553\":{},\"555\":{},\"563\":{},\"570\":{}},\"comment\":{}}],[\"models\",{\"_index\":53,\"name\":{\"87\":{},\"92\":{}},\"comment\":{}}],[\"modelsignature\",{\"_index\":265,\"name\":{\"316\":{}},\"comment\":{}}],[\"modelstats\",{\"_index\":80,\"name\":{\"119\":{},\"127\":{}},\"comment\":{}}],[\"modelstructuredoutputkeys\",{\"_index\":266,\"name\":{\"318\":{}},\"comment\":{}}],[\"modelversion\",{\"_index\":258,\"name\":{\"308\":{}},\"comment\":{}}],[\"movenet\",{\"_index\":74,\"name\":{\"113\":{}},\"comment\":{}}],[\"mul\",{\"_index\":199,\"name\":{\"243\":{}},\"comment\":{}}],[\"multithread\",{\"_index\":320,\"name\":{\"384\":{}},\"comment\":{}}],[\"name\",{\"_index\":89,\"name\":{\"130\":{},\"446\":{}},\"comment\":{}}],[\"nanodet\",{\"_index\":75,\"name\":{\"114\":{}},\"comment\":{}}],[\"neg\",{\"_index\":200,\"name\":{\"244\":{}},\"comment\":{}}],[\"negative\",{\"_index\":421,\"name\":{\"586\":{}},\"comment\":{}}],[\"next\",{\"_index\":43,\"name\":{\"59\":{}},\"comment\":{}}],[\"node\",{\"_index\":304,\"name\":{\"363\":{}},\"comment\":{}}],[\"norm\",{\"_index\":201,\"name\":{\"245\":{}},\"comment\":{}}],[\"notequal\",{\"_index\":202,\"name\":{\"246\":{}},\"comment\":{}}],[\"now\",{\"_index\":34,\"name\":{\"50\":{}},\"comment\":{}}],[\"numdefinedmodels\",{\"_index\":82,\"name\":{\"121\":{}},\"comment\":{}}],[\"numloadedmodels\",{\"_index\":81,\"name\":{\"120\":{}},\"comment\":{}}],[\"object\",{\"_index\":17,\"name\":{\"24\":{},\"85\":{},\"615\":{},\"693\":{}},\"comment\":{}}],[\"objectconfig\",{\"_index\":409,\"name\":{\"558\":{}},\"comment\":{}}],[\"objectresult\",{\"_index\":466,\"name\":{\"669\":{}},\"comment\":{}}],[\"objecttype\",{\"_index\":345,\"name\":{\"420\":{}},\"comment\":{}}],[\"offscreen\",{\"_index\":312,\"name\":{\"373\":{}},\"comment\":{}}],[\"onehot\",{\"_index\":203,\"name\":{\"247\":{}},\"comment\":{}}],[\"oneslike\",{\"_index\":204,\"name\":{\"248\":{}},\"comment\":{}}],[\"ops\",{\"_index\":92,\"name\":{\"133\":{}},\"comment\":{}}],[\"options\",{\"_index\":20,\"name\":{\"30\":{},\"81\":{}},\"comment\":{}}],[\"outputnodes\",{\"_index\":260,\"name\":{\"310\":{}},\"comment\":{}}],[\"outputs\",{\"_index\":262,\"name\":{\"312\":{}},\"comment\":{}}],[\"pad\",{\"_index\":205,\"name\":{\"249\":{}},\"comment\":{}}],[\"part\",{\"_index\":459,\"name\":{\"646\":{}},\"comment\":{}}],[\"pause\",{\"_index\":357,\"name\":{\"435\":{}},\"comment\":{}}],[\"paused\",{\"_index\":353,\"name\":{\"431\":{}},\"comment\":{}}],[\"percentageloaded\",{\"_index\":83,\"name\":{\"122\":{}},\"comment\":{}}],[\"perfadd\",{\"_index\":313,\"name\":{\"374\":{}},\"comment\":{}}],[\"performance\",{\"_index\":24,\"name\":{\"34\":{},\"694\":{}},\"comment\":{}}],[\"person\",{\"_index\":18,\"name\":{\"26\":{},\"78\":{}},\"comment\":{}}],[\"personresult\",{\"_index\":469,\"name\":{\"677\":{}},\"comment\":{}}],[\"persons\",{\"_index\":475,\"name\":{\"697\":{}},\"comment\":{}}],[\"pixelate\",{\"_index\":427,\"name\":{\"592\":{}},\"comment\":{}}],[\"platform\",{\"_index\":306,\"name\":{\"365\":{}},\"comment\":{}}],[\"play\",{\"_index\":358,\"name\":{\"436\":{}},\"comment\":{}}],[\"point\",{\"_index\":302,\"name\":{\"358\":{}},\"comment\":{}}],[\"pointsize\",{\"_index\":289,\"name\":{\"345\":{}},\"comment\":{}}],[\"polaroid\",{\"_index\":426,\"name\":{\"591\":{}},\"comment\":{}}],[\"pool\",{\"_index\":206,\"name\":{\"250\":{}},\"comment\":{}}],[\"posenet\",{\"_index\":76,\"name\":{\"115\":{}},\"comment\":{}}],[\"position\",{\"_index\":460,\"name\":{\"647\":{}},\"comment\":{}}],[\"positionraw\",{\"_index\":461,\"name\":{\"648\":{}},\"comment\":{}}],[\"pow\",{\"_index\":207,\"name\":{\"251\":{}},\"comment\":{}}],[\"predict\",{\"_index\":269,\"name\":{\"323\":{}},\"comment\":{}}],[\"prelu\",{\"_index\":208,\"name\":{\"252\":{}},\"comment\":{}}],[\"print\",{\"_index\":114,\"name\":{\"157\":{}},\"comment\":{}}],[\"process\",{\"_index\":6,\"name\":{\"6\":{}},\"comment\":{}}],[\"prod\",{\"_index\":209,\"name\":{\"253\":{}},\"comment\":{}}],[\"profile\",{\"_index\":46,\"name\":{\"62\":{}},\"comment\":{}}],[\"r0\",{\"_index\":274,\"name\":{\"330\":{}},\"comment\":{}}],[\"r1\",{\"_index\":275,\"name\":{\"331\":{}},\"comment\":{}}],[\"r2\",{\"_index\":276,\"name\":{\"332\":{}},\"comment\":{}}],[\"r3\",{\"_index\":277,\"name\":{\"333\":{}},\"comment\":{}}],[\"r4\",{\"_index\":278,\"name\":{\"334\":{}},\"comment\":{}}],[\"r5\",{\"_index\":279,\"name\":{\"335\":{}},\"comment\":{}}],[\"r6\",{\"_index\":280,\"name\":{\"336\":{}},\"comment\":{}}],[\"race\",{\"_index\":341,\"name\":{\"416\":{},\"632\":{}},\"comment\":{}}],[\"rank\",{\"_index\":102,\"name\":{\"145\":{},\"329\":{}},\"comment\":{}}],[\"ranktype\",{\"_index\":98,\"name\":{\"141\":{}},\"comment\":{}}],[\"ratio\",{\"_index\":411,\"name\":{\"567\":{}},\"comment\":{}}],[\"real\",{\"_index\":450,\"name\":{\"635\":{}},\"comment\":{}}],[\"reciprocal\",{\"_index\":210,\"name\":{\"254\":{}},\"comment\":{}}],[\"relu\",{\"_index\":211,\"name\":{\"255\":{}},\"comment\":{}}],[\"relu6\",{\"_index\":212,\"name\":{\"256\":{}},\"comment\":{}}],[\"renderer\",{\"_index\":322,\"name\":{\"390\":{}},\"comment\":{}}],[\"reset\",{\"_index\":27,\"name\":{\"37\":{},\"88\":{}},\"comment\":{}}],[\"reshape\",{\"_index\":214,\"name\":{\"258\":{}},\"comment\":{}}],[\"reshapeas\",{\"_index\":213,\"name\":{\"257\":{}},\"comment\":{}}],[\"resizebilinear\",{\"_index\":215,\"name\":{\"259\":{}},\"comment\":{}}],[\"resizenearestneighbor\",{\"_index\":216,\"name\":{\"260\":{}},\"comment\":{}}],[\"result\",{\"_index\":4,\"name\":{\"4\":{},\"688\":{}},\"comment\":{}}],[\"return\",{\"_index\":389,\"name\":{\"472\":{},\"578\":{}},\"comment\":{}}],[\"reverse\",{\"_index\":217,\"name\":{\"261\":{}},\"comment\":{}}],[\"rfft\",{\"_index\":218,\"name\":{\"262\":{}},\"comment\":{}}],[\"right\",{\"_index\":472,\"name\":{\"684\":{}},\"comment\":{}}],[\"rotation\",{\"_index\":384,\"name\":{\"467\":{},\"543\":{},\"637\":{}},\"comment\":{}}],[\"round\",{\"_index\":219,\"name\":{\"263\":{}},\"comment\":{}}],[\"roundrect\",{\"_index\":290,\"name\":{\"346\":{}},\"comment\":{}}],[\"rsqrt\",{\"_index\":220,\"name\":{\"264\":{}},\"comment\":{}}],[\"rvm\",{\"_index\":78,\"name\":{\"117\":{}},\"comment\":{}}],[\"saturation\",{\"_index\":419,\"name\":{\"584\":{}},\"comment\":{}}],[\"save\",{\"_index\":268,\"name\":{\"322\":{}},\"comment\":{}}],[\"scopeid\",{\"_index\":100,\"name\":{\"143\":{}},\"comment\":{}}],[\"score\",{\"_index\":441,\"name\":{\"620\":{},\"650\":{},\"653\":{},\"660\":{},\"671\":{}},\"comment\":{}}],[\"segmentation\",{\"_index\":36,\"name\":{\"52\":{},\"616\":{}},\"comment\":{}}],[\"segmentationconfig\",{\"_index\":410,\"name\":{\"566\":{}},\"comment\":{}}],[\"segmentationenum\",{\"_index\":377,\"name\":{\"460\":{}},\"comment\":{}}],[\"selfie\",{\"_index\":77,\"name\":{\"116\":{}},\"comment\":{}}],[\"selu\",{\"_index\":221,\"name\":{\"265\":{}},\"comment\":{}}],[\"separableconv2d\",{\"_index\":222,\"name\":{\"266\":{}},\"comment\":{}}],[\"sepia\",{\"_index\":422,\"name\":{\"587\":{}},\"comment\":{}}],[\"settings\",{\"_index\":351,\"name\":{\"429\":{}},\"comment\":{}}],[\"shadowcolor\",{\"_index\":285,\"name\":{\"341\":{}},\"comment\":{}}],[\"shape\",{\"_index\":95,\"name\":{\"138\":{}},\"comment\":{}}],[\"sharpness\",{\"_index\":417,\"name\":{\"582\":{}},\"comment\":{}}],[\"sigmoid\",{\"_index\":223,\"name\":{\"267\":{}},\"comment\":{}}],[\"sign\",{\"_index\":224,\"name\":{\"268\":{}},\"comment\":{}}],[\"simd\",{\"_index\":319,\"name\":{\"383\":{}},\"comment\":{}}],[\"similarity\",{\"_index\":30,\"name\":{\"40\":{},\"49\":{},\"69\":{},\"74\":{}},\"comment\":{}}],[\"sin\",{\"_index\":225,\"name\":{\"269\":{}},\"comment\":{}}],[\"sinh\",{\"_index\":226,\"name\":{\"270\":{}},\"comment\":{}}],[\"size\",{\"_index\":96,\"name\":{\"139\":{}},\"comment\":{}}],[\"sizedesired\",{\"_index\":366,\"name\":{\"448\":{}},\"comment\":{}}],[\"sizefrommanifest\",{\"_index\":367,\"name\":{\"449\":{}},\"comment\":{}}],[\"sizeloadedweights\",{\"_index\":368,\"name\":{\"450\":{}},\"comment\":{}}],[\"skeleton\",{\"_index\":408,\"name\":{\"551\":{}},\"comment\":{}}],[\"skipallowed\",{\"_index\":438,\"name\":{\"609\":{}},\"comment\":{}}],[\"skipframes\",{\"_index\":381,\"name\":{\"464\":{},\"475\":{},\"481\":{},\"486\":{},\"491\":{},\"497\":{},\"503\":{},\"508\":{},\"513\":{},\"519\":{},\"533\":{},\"540\":{},\"556\":{},\"564\":{},\"571\":{}},\"comment\":{}}],[\"skiptime\",{\"_index\":382,\"name\":{\"465\":{},\"476\":{},\"482\":{},\"487\":{},\"492\":{},\"498\":{},\"504\":{},\"509\":{},\"514\":{},\"520\":{},\"534\":{},\"541\":{},\"557\":{},\"565\":{},\"572\":{}},\"comment\":{}}],[\"sleep\",{\"_index\":48,\"name\":{\"64\":{}},\"comment\":{}}],[\"slice\",{\"_index\":227,\"name\":{\"271\":{}},\"comment\":{}}],[\"softmax\",{\"_index\":228,\"name\":{\"272\":{}},\"comment\":{}}],[\"softplus\",{\"_index\":229,\"name\":{\"273\":{}},\"comment\":{}}],[\"softwarekernels\",{\"_index\":436,\"name\":{\"607\":{}},\"comment\":{}}],[\"spacetobatchnd\",{\"_index\":230,\"name\":{\"274\":{}},\"comment\":{}}],[\"split\",{\"_index\":231,\"name\":{\"275\":{}},\"comment\":{}}],[\"sqrt\",{\"_index\":232,\"name\":{\"276\":{}},\"comment\":{}}],[\"square\",{\"_index\":233,\"name\":{\"277\":{}},\"comment\":{}}],[\"squareddifference\",{\"_index\":234,\"name\":{\"278\":{}},\"comment\":{}}],[\"squeeze\",{\"_index\":235,\"name\":{\"279\":{}},\"comment\":{}}],[\"ssrnetage\",{\"_index\":55,\"name\":{\"94\":{}},\"comment\":{}}],[\"ssrnetgender\",{\"_index\":68,\"name\":{\"107\":{}},\"comment\":{}}],[\"stack\",{\"_index\":236,\"name\":{\"280\":{}},\"comment\":{}}],[\"start\",{\"_index\":356,\"name\":{\"434\":{}},\"comment\":{}}],[\"state\",{\"_index\":5,\"name\":{\"5\":{}},\"comment\":{}}],[\"step\",{\"_index\":237,\"name\":{\"281\":{}},\"comment\":{}}],[\"stop\",{\"_index\":359,\"name\":{\"437\":{}},\"comment\":{}}],[\"stream\",{\"_index\":347,\"name\":{\"425\":{}},\"comment\":{}}],[\"stridedslice\",{\"_index\":238,\"name\":{\"282\":{}},\"comment\":{}}],[\"strides\",{\"_index\":101,\"name\":{\"144\":{}},\"comment\":{}}],[\"sub\",{\"_index\":239,\"name\":{\"283\":{}},\"comment\":{}}],[\"sum\",{\"_index\":240,\"name\":{\"284\":{}},\"comment\":{}}],[\"supported\",{\"_index\":317,\"name\":{\"381\":{},\"387\":{},\"393\":{}},\"comment\":{}}],[\"tan\",{\"_index\":241,\"name\":{\"285\":{}},\"comment\":{}}],[\"tanh\",{\"_index\":242,\"name\":{\"286\":{}},\"comment\":{}}],[\"technicolor\",{\"_index\":425,\"name\":{\"590\":{}},\"comment\":{}}],[\"tensor\",{\"_index\":8,\"name\":{\"8\":{},\"134\":{},\"304\":{},\"638\":{}},\"comment\":{}}],[\"tensorflow\",{\"_index\":314,\"name\":{\"375\":{}},\"comment\":{}}],[\"tensorlike\",{\"_index\":256,\"name\":{\"305\":{}},\"comment\":{}}],[\"tf\",{\"_index\":10,\"name\":{\"10\":{}},\"comment\":{}}],[\"tfjs\",{\"_index\":311,\"name\":{\"370\":{}},\"comment\":{}}],[\"throwifdisposed\",{\"_index\":113,\"name\":{\"156\":{}},\"comment\":{}}],[\"tile\",{\"_index\":243,\"name\":{\"287\":{}},\"comment\":{}}],[\"timestamp\",{\"_index\":474,\"name\":{\"696\":{}},\"comment\":{}}],[\"tobool\",{\"_index\":244,\"name\":{\"288\":{}},\"comment\":{}}],[\"tofloat\",{\"_index\":245,\"name\":{\"289\":{}},\"comment\":{}}],[\"toint\",{\"_index\":246,\"name\":{\"290\":{}},\"comment\":{}}],[\"topk\",{\"_index\":247,\"name\":{\"291\":{}},\"comment\":{}}],[\"tostring\",{\"_index\":116,\"name\":{\"159\":{}},\"comment\":{}}],[\"totalsizeenabled\",{\"_index\":87,\"name\":{\"126\":{}},\"comment\":{}}],[\"totalsizefrommanifest\",{\"_index\":84,\"name\":{\"123\":{}},\"comment\":{}}],[\"totalsizeloading\",{\"_index\":86,\"name\":{\"125\":{}},\"comment\":{}}],[\"totalsizeweights\",{\"_index\":85,\"name\":{\"124\":{}},\"comment\":{}}],[\"track\",{\"_index\":348,\"name\":{\"426\":{}},\"comment\":{}}],[\"transpose\",{\"_index\":250,\"name\":{\"295\":{}},\"comment\":{}}],[\"unique\",{\"_index\":251,\"name\":{\"296\":{}},\"comment\":{}}],[\"unsortedsegmentsum\",{\"_index\":252,\"name\":{\"300\":{}},\"comment\":{}}],[\"unstack\",{\"_index\":253,\"name\":{\"301\":{}},\"comment\":{}}],[\"updatebackend\",{\"_index\":330,\"name\":{\"404\":{}},\"comment\":{}}],[\"updatecpu\",{\"_index\":331,\"name\":{\"405\":{}},\"comment\":{}}],[\"url\",{\"_index\":90,\"name\":{\"131\":{}},\"comment\":{}}],[\"usecurves\",{\"_index\":300,\"name\":{\"356\":{}},\"comment\":{}}],[\"usedepth\",{\"_index\":299,\"name\":{\"355\":{}},\"comment\":{}}],[\"validate\",{\"_index\":28,\"name\":{\"38\":{},\"91\":{}},\"comment\":{}}],[\"validatemodel\",{\"_index\":54,\"name\":{\"90\":{}},\"comment\":{}}],[\"validatemodels\",{\"_index\":434,\"name\":{\"604\":{}},\"comment\":{}}],[\"values\",{\"_index\":248,\"name\":{\"293\":{},\"298\":{}},\"comment\":{}}],[\"variable\",{\"_index\":117,\"name\":{\"160\":{}},\"comment\":{}}],[\"version\",{\"_index\":2,\"name\":{\"2\":{},\"372\":{},\"377\":{},\"389\":{}},\"comment\":{}}],[\"video\",{\"_index\":49,\"name\":{\"65\":{}},\"comment\":{}}],[\"vintage\",{\"_index\":423,\"name\":{\"588\":{}},\"comment\":{}}],[\"warmup\",{\"_index\":45,\"name\":{\"61\":{},\"601\":{}},\"comment\":{}}],[\"warmupenum\",{\"_index\":376,\"name\":{\"459\":{}},\"comment\":{}}],[\"wasm\",{\"_index\":316,\"name\":{\"379\":{}},\"comment\":{}}],[\"wasmpath\",{\"_index\":429,\"name\":{\"597\":{}},\"comment\":{}}],[\"wasmplatformfetch\",{\"_index\":430,\"name\":{\"598\":{}},\"comment\":{}}],[\"webcam\",{\"_index\":40,\"name\":{\"56\":{},\"421\":{}},\"comment\":{}}],[\"webcamconfig\",{\"_index\":360,\"name\":{\"438\":{}},\"comment\":{}}],[\"webgl\",{\"_index\":321,\"name\":{\"385\":{}},\"comment\":{}}],[\"webgpu\",{\"_index\":323,\"name\":{\"391\":{}},\"comment\":{}}],[\"weights\",{\"_index\":263,\"name\":{\"313\":{}},\"comment\":{}}],[\"where\",{\"_index\":254,\"name\":{\"302\":{}},\"comment\":{}}],[\"width\",{\"_index\":354,\"name\":{\"432\":{},\"443\":{},\"576\":{}},\"comment\":{}}],[\"worker\",{\"_index\":305,\"name\":{\"364\":{}},\"comment\":{}}],[\"zeroslike\",{\"_index\":255,\"name\":{\"303\":{}},\"comment\":{}}]],\"pipeline\":[]}}"); \ No newline at end of file diff --git a/typedoc/classes/Env.html b/typedoc/classes/Env.html index c53b3fb67..7f8fc83ae 100644 --- a/typedoc/classes/Env.html +++ b/typedoc/classes/Env.html @@ -1,16 +1,16 @@ -Env | @vladmandic/human - v2.11.0
+Env | @vladmandic/human - v2.11.1
+
  • The search index is not available
  • @vladmandic/human - v2.11.1
    @@ -299,7 +299,7 @@

    Theme

    • Preparing search index...
    • -
    • The search index is not available
    @vladmandic/human - v2.11.0
    +
  • The search index is not available
  • @vladmandic/human - v2.11.1
    @@ -35,7 +35,7 @@

    Implements

    • InferenceModel
    +
  • Defined in node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/executor/graph_model.d.ts:34
  • @@ -94,20 +94,20 @@
    Optional loadOptions: Optional tfio: __module

    Returns GraphModel<ModelURL>

    +
  • Defined in node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/executor/graph_model.d.ts:64
  • Properties

    inputNodes: string[]
    +
  • Defined in node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/executor/graph_model.d.ts:47
  • inputs: TensorInfo[]
    +
  • Defined in node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/executor/graph_model.d.ts:49
  • metadata: {}
    @@ -115,7 +115,7 @@
      +
    • Defined in node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/executor/graph_model.d.ts:52
    • modelSignature: {}
      @@ -123,7 +123,7 @@
        +
      • Defined in node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/executor/graph_model.d.ts:53
      • modelStructuredOutputKeys: {}
        @@ -131,28 +131,28 @@
          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/executor/graph_model.d.ts:54
        • modelVersion: string
          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/executor/graph_model.d.ts:46
        • outputNodes: string[]
          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/executor/graph_model.d.ts:48
        • outputs: TensorInfo[]
          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/executor/graph_model.d.ts:50
        • weights: NamedTensorsMap
          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/executor/graph_model.d.ts:51
        • Methods

          @@ -165,7 +165,7 @@
          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/executor/graph_model.d.ts:219
          • @@ -177,7 +177,7 @@

            Doc

            Returns void

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/executor/graph_model.d.ts:212
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/executor/graph_model.d.ts:181
        • Returns Promise<Tensor<Rank> | Tensor<Rank>[]>

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/executor/graph_model.d.ts:198
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/executor/graph_model.d.ts:205
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/executor/graph_model.d.ts:70
          • @@ -280,7 +280,7 @@

            Parameters

            artifacts: ModelArtifacts

          Returns boolean

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/executor/graph_model.d.ts:77
          • @@ -322,7 +322,7 @@
            Optional config: Returns Tensor<Rank> | Tensor<Rank>[] | NamedTensorMap
          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/executor/graph_model.d.ts:162
          • @@ -366,7 +366,7 @@
            Optional config: Returns Promise<SaveResult>
          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-converter@3.21.0_aipmo6igpprgzt4umpaa3m6sn4/node_modules/@tensorflow/tfjs-converter/dist/executor/graph_model.d.ts:122
        • +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -31,7 +31,7 @@

          Hierarchy

          • Human
          +
        • Defined in src/human.ts:59
        • @@ -101,7 +101,7 @@
          Optional userConfig:

          Returns Human

          +
        • Defined in src/human.ts:130
        • Properties

          @@ -113,7 +113,7 @@
          +
        • Defined in src/human.ts:66
        • distance: ((descriptor1: Descriptor, descriptor2: Descriptor, options?: MatchOptions) => number) = match.distance
          @@ -145,7 +145,7 @@
          options: Returns number
          +
        • Defined in src/human.ts:237
        • draw: { all: ((inCanvas: AnyCanvas, result: Result, drawOptions?: Partial<DrawOptions>) => Promise<null | [void, void, void, void, void]>); body: ((inCanvas: AnyCanvas, result: BodyResult[], drawOptions?: Partial<DrawOptions>) => void); canvas: ((input: AnyCanvas | HTMLImageElement | HTMLVideoElement, output: AnyCanvas) => void); face: ((inCanvas: AnyCanvas, result: FaceResult[], drawOptions?: Partial<DrawOptions>) => void); gesture: ((inCanvas: AnyCanvas, result: GestureResult[], drawOptions?: Partial<DrawOptions>) => void); hand: ((inCanvas: AnyCanvas, result: HandResult[], drawOptions?: Partial<DrawOptions>) => void); object: ((inCanvas: AnyCanvas, result: ObjectResult[], drawOptions?: Partial<DrawOptions>) => void); options: DrawOptions; person: ((inCanvas: AnyCanvas, result: PersonResult[], drawOptions?: Partial<DrawOptions>) => void) }
          @@ -312,14 +312,14 @@
          result: Optional drawOptions: Partial<DrawOptions>

          Returns void

          +
        • Defined in src/human.ts:96
        • env: Env

          Object containing environment information used for diagnostics

          +
        • Defined in src/human.ts:89
        • events: undefined | EventTarget
          @@ -335,28 +335,28 @@
          +
        • Defined in src/human.ts:113
        • faceTriangulation: number[]

          Reference face triangualtion array of 468 points, used for triangle references between points

          +
        • Defined in src/human.ts:115
        • faceUVMap: [number, number][]

          Refernce UV map of 468 values, used for 3D mapping of the face mesh

          +
        • Defined in src/human.ts:117
        • gl: Record<string, unknown>

          WebGL debug info

          +
        • Defined in src/human.ts:124
        • match: ((descriptor: Descriptor, descriptors: Descriptor[], options?: MatchOptions) => { distance: number; index: number; similarity: number }) = match.match
          @@ -399,14 +399,14 @@
          index:
          similarity: number
          +
        • Defined in src/human.ts:239
        • performance: Record<string, number>

          Performance object that contains values for all recently performed operations

          +
        • Defined in src/human.ts:119
        • process: { canvas: null | AnyCanvas; tensor: null | Tensor<Rank> }
          @@ -420,7 +420,7 @@
          canvas:
          tensor: null | Tensor<Rank>
          +
        • Defined in src/human.ts:80
        • result: Result
          @@ -430,7 +430,7 @@
          +
        • Defined in src/human.ts:71
        • similarity: ((descriptor1: Descriptor, descriptor2: Descriptor, options?: MatchOptions) => number) = match.similarity
          @@ -466,7 +466,7 @@
          options: Returns number
          +
        • Defined in src/human.ts:235
        • state: string
          @@ -477,7 +477,7 @@
          +
        • Defined in src/human.ts:77
        • tf: any
          @@ -488,21 +488,21 @@
          +
        • Defined in src/human.ts:86
        • version: string

          Current version of Human library in semver format

          +
        • Defined in src/human.ts:61
        • webcam: WebCam = ...

          WebCam helper methods

          +
        • Defined in src/human.ts:309
        • Methods

          @@ -519,7 +519,7 @@

          Parameters

          Rest ...msg: string[]

          Returns void

          +
        • Defined in src/human.ts:191
        • +
        • Defined in src/human.ts:230
        • Returns Promise<number>

          +
        • Defined in src/human.ts:291
          • @@ -582,7 +582,7 @@
            Optional userConfig:

          Returns Promise<Result>

          +
        • Defined in src/human.ts:411
          • @@ -597,7 +597,7 @@

            Parameters

            event: string

          Returns void

          +
        • Defined in src/human.ts:346
        • +
        • Defined in src/human.ts:280
        • +
        • Defined in src/human.ts:361
        • +
        • Defined in src/human.ts:252
        • +
        • Defined in src/human.ts:300
          • @@ -683,7 +683,7 @@
            Optional userConfig:

          Returns Promise<void>

          +
        • Defined in src/human.ts:316
          • @@ -703,7 +703,7 @@
            result:

          Returns Result

          +
        • Defined in src/human.ts:356
        • +
        • Defined in src/human.ts:242
        • Returns Promise<{ kernel: string; perc: number; time: number }[]>

          +
        • Defined in src/human.ts:381
        • +
        • Defined in src/human.ts:214
          • - +
          • -

            Segmentation method takes any input and returns processed canvas with body segmentation

            -
              -
            • Segmentation is not triggered as part of detect process
            • -
            +

            Segmentation method takes any input and returns RGBA tensor +Note: Segmentation is not triggered as part of detect process

            Parameters

            • input: Input
              -

              Input

              +

              Input +Returns tensor which contains image data in RGBA format

            • -
              Optional background: Input
              -

              Input

              -
                -
              • Optional parameter background is used to fill the background with specific input - Returns:
              • -
              • data as raw data array with per-pixel segmentation values
              • -
              • canvas as canvas which is input image filtered with segementation data and optionally merged with background image. canvas alpha values are set to segmentation values for easy merging
              • -
              • alpha as grayscale canvas that represents segmentation alpha values
              • -
              -
            -

            Returns Promise<{ alpha: null | AnyCanvas; canvas: null | AnyCanvas; data: number[] | Tensor<Rank> }>

          +

          Returns Promise<null | Tensor<Rank>>

          +
        • Defined in src/human.ts:262
          • @@ -792,7 +782,7 @@
            ms: number

          Returns Promise<void>

          +
        • Defined in src/human.ts:572
          • @@ -807,7 +797,7 @@

            Parameters

            Optional userConfig: Partial<Config>

          Returns { expected?: string; reason: string; where: string }[]

          +
        • Defined in src/human.ts:223
          • @@ -832,7 +822,7 @@
            delay: numberReturns Promise<void>
          +
        • Defined in src/human.ts:583
          • @@ -855,7 +845,7 @@
            Optional userConfig:

          Returns Promise<undefined | Result>

          +
        • Defined in src/human.ts:369
        • +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -34,145 +34,145 @@

          Hierarchy

          • Tensor
          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/tensor.d.ts:124
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/tensor.d.ts:139
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/abs.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/acos.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/acosh.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/add.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/all.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/any.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/arg_max.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/arg_min.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as_scalar.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as_type.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as1d.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as2d.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as3d.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as4d.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as5d.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/asin.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/asinh.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/atan.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/atan2.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/atanh.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/avg_pool.d.ts:21
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/batch_to_space_nd.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/batchnorm.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/broadcast_to.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/cast.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/ceil.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/clip_by_value.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/concat.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/conv1d.d.ts:5
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/conv2d_transpose.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/conv2d.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/cos.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/cosh.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/cumprod.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/cumsum.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/depth_to_space.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/depthwise_conv2d.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/dilation2d.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/div_no_nan.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/div.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/dot.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/elu.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/equal.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/erf.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/euclidean_norm.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/exp.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/expand_dims.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/expm1.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/fft.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/flatten.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/floor.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/floorDiv.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/gather.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/greater_equal.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/greater.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/ifft.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/irfft.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/is_finite.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/is_inf.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/is_nan.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/leaky_relu.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/less_equal.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/less.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/local_response_normalization.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/log_sigmoid.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/log_softmax.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/log_sum_exp.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/log.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/log1p.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/logical_and.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/logical_not.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/logical_or.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/logical_xor.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/mat_mul.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/max_pool.d.ts:21
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/max.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/maximum.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/mean.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/min.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/minimum.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/mirror_pad.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/mod.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/mul.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/neg.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/norm.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/not_equal.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/one_hot.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/ones_like.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/pad.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/pool.d.ts:21
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/pow.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/prelu.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/prod.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/reciprocal.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/relu.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/relu6.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/reshape_as.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/reshape.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/resize_bilinear.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/resize_nearest_neighbor.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/reverse.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/rfft.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/round.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/rsqrt.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/selu.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/separable_conv2d.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sigmoid.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sign.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sin.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sinh.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/slice.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/softmax.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/softplus.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/space_to_batch_nd.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/split.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sqrt.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/square.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/squared_difference.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/squeeze.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/stack.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/step.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/strided_slice.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sub.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sum.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/tan.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/tanh.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/tile.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/to_bool.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/to_float.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/to_int.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/topk.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/transpose.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/unique.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/unsorted_segment_sum.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/unstack.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/where.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/zeros_like.d.ts:20
        • @@ -375,7 +375,7 @@
          dataId: object
          id: number

          Returns Tensor<R>

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/tensor.d.ts:165
        • Properties

          @@ -385,66 +385,66 @@
          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/tensor.d.ts:146
        • dtype: keyof DataTypeMap

          The data type for the array.

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/tensor.d.ts:152
        • id: number

          Unique id of this tensor.

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/tensor.d.ts:141
        • isDisposed: boolean
          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/tensor.d.ts:252
        • kept: boolean

          Whether this tensor has been globally kept.

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/tensor.d.ts:156
        • rank: number
          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/tensor.d.ts:166
        • rankType: R

          The rank type for the array (see Rank enum).

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/tensor.d.ts:154
        • scopeId: number

          The id of the scope this tensor is being tracked in.

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/tensor.d.ts:158
        • shape: ShapeMap[R]

          The shape of the tensor.

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/tensor.d.ts:148
        • size: number

          Number of elements in the tensor.

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/tensor.d.ts:150
        • strides: number[]
          @@ -453,7 +453,7 @@
          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/tensor.d.ts:164
        • Methods

          @@ -473,7 +473,7 @@

          Parameters

          this: T

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/abs.d.ts:21
          • @@ -491,7 +491,7 @@

            Parameters

            this: T

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/acos.d.ts:21
          • @@ -509,7 +509,7 @@

            Parameters

            this: T

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/acosh.d.ts:21
        • Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/add.d.ts:21
          • @@ -549,7 +549,7 @@
            Optional axis: Optional keepDims: boolean

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/all.d.ts:5
          • @@ -571,7 +571,7 @@
            Optional axis: Optional keepDims: boolean

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/any.d.ts:5
          • @@ -589,7 +589,7 @@

            Parameters

            Optional axis: number

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/arg_max.d.ts:5
          • @@ -607,7 +607,7 @@

            Parameters

            Optional axis: number

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/arg_min.d.ts:5
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/tensor.d.ts:184
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/tensor.d.ts:191
          • @@ -644,7 +644,7 @@

            Type Parameters

            T extends Tensor<Rank, T>

          Returns Tensor1D

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as1d.d.ts:21
          • @@ -664,7 +664,7 @@
            rows: number
            columns: number

          Returns Tensor2D

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as2d.d.ts:21
          • @@ -686,7 +686,7 @@
            columns: number
            depth: number

          Returns Tensor3D

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as3d.d.ts:21
          • @@ -710,7 +710,7 @@
            depth: number
            depth2: number

          Returns Tensor4D

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as4d.d.ts:21
          • @@ -736,7 +736,7 @@
            depth2: number
            depth3: number

          Returns Tensor5D

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as5d.d.ts:21
          • @@ -749,7 +749,7 @@

            Type Parameters

            T extends Tensor<Rank, T>

          Returns Scalar

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as_scalar.d.ts:21
          • @@ -769,7 +769,7 @@
            this: Tdtype: keyof DataTypeMap

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as_type.d.ts:21
          • @@ -787,7 +787,7 @@

            Parameters

            this: T

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/asin.d.ts:21
          • @@ -805,7 +805,7 @@

            Parameters

            this: T

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/asinh.d.ts:21
          • @@ -823,7 +823,7 @@

            Parameters

            this: T

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/atan.d.ts:21
        • Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/atan2.d.ts:5
          • @@ -859,7 +859,7 @@

            Parameters

            this: T

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/atanh.d.ts:21
          • @@ -883,7 +883,7 @@
            pad: numberOptional dimRoundingMode: "round" | "floor" | "ceil"

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/avg_pool.d.ts:22
        • Returns Tensor<R>

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/batchnorm.d.ts:5
          • @@ -929,7 +929,7 @@
            blockShape: numbernumber[][]

          Returns Tensor<R>

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/batch_to_space_nd.d.ts:5
          • @@ -947,7 +947,7 @@

            Parameters

            shape: ShapeMap[R]

          Returns Tensor<R>

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/broadcast_to.d.ts:21
          • @@ -963,7 +963,7 @@

            Type Parameters

            D extends keyof DataTypeMap = "float32"

          Returns Promise<TensorBuffer<R, D>>

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/tensor.d.ts:172
          • @@ -979,7 +979,7 @@

            Type Parameters

            D extends keyof DataTypeMap = "float32"

          Returns TensorBuffer<R, D>

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/tensor.d.ts:177
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/tensor.d.ts:244
          • @@ -1007,7 +1007,7 @@

            Parameters

            dtype: keyof DataTypeMap

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/cast.d.ts:21
          • @@ -1025,7 +1025,7 @@

            Parameters

            this: T

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/ceil.d.ts:21
          • @@ -1045,7 +1045,7 @@
            min: number
            max: number

          Returns Tensor<Rank>

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/clip_by_value.d.ts:21
          • @@ -1066,7 +1066,7 @@

            Parameters

            this: T

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/tensor.d.ts:267
          • @@ -1086,7 +1086,7 @@
            tensors: TOptional axis: number

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/concat.d.ts:5
          • @@ -1114,7 +1114,7 @@
            Optional dilation: Optional dimRoundingMode: "round" | "floor" | "ceil"

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/conv1d.d.ts:6
          • @@ -1142,7 +1142,7 @@
            Optional dilations: Optional dimRoundingMode: "round" | "floor" | "ceil"

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/conv2d.d.ts:5
          • @@ -1168,7 +1168,7 @@
            pad: numberOptional dimRoundingMode: "round" | "floor" | "ceil"

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/conv2d_transpose.d.ts:5
          • @@ -1186,7 +1186,7 @@

            Parameters

            this: T

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/cos.d.ts:21
          • @@ -1204,7 +1204,7 @@

            Parameters

            this: T

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/cosh.d.ts:21
          • @@ -1226,7 +1226,7 @@
            Optional exclusive: Optional reverse: boolean

          Returns Tensor<R>

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/cumprod.d.ts:5
          • @@ -1248,7 +1248,7 @@
            Optional exclusive: Optional reverse: boolean

          Returns Tensor<R>

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/cumsum.d.ts:5
          • @@ -1265,7 +1265,7 @@

            Type Parameters

            D extends keyof DataTypeMap = NumericDataType

          Returns Promise<DataTypeMap[D]>

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/tensor.d.ts:198
          • @@ -1282,7 +1282,7 @@

            Type Parameters

            D extends keyof DataTypeMap = NumericDataType

          Returns DataTypeMap[D]

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/tensor.d.ts:242
        • Returns GPUData

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/tensor.d.ts:235
          • @@ -1333,7 +1333,7 @@
            blockSize: number
            dataFormat: "NHWC" | "NCHW"

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/depth_to_space.d.ts:5
          • @@ -1361,7 +1361,7 @@
            Optional dilations: Optional dimRoundingMode: "round" | "floor" | "ceil"

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/depthwise_conv2d.d.ts:5
          • @@ -1387,7 +1387,7 @@
            Optional dilations: Optional dataFormat: "NHWC"

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/dilation2d.d.ts:5
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/tensor.d.ts:250
        • Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/div.d.ts:21
        • Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/div_no_nan.d.ts:21
        • Returns Tensor<Rank>

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/dot.d.ts:5
          • @@ -1465,7 +1465,7 @@

            Type Parameters

            T extends Tensor<Rank, T>

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/elu.d.ts:5
        • Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/equal.d.ts:5
          • @@ -1501,7 +1501,7 @@

            Parameters

            this: T

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/erf.d.ts:21
          • @@ -1523,7 +1523,7 @@
            Optional axis: Optional keepDims: boolean

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/euclidean_norm.d.ts:21
          • @@ -1541,7 +1541,7 @@

            Parameters

            this: T

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/exp.d.ts:21
          • @@ -1559,7 +1559,7 @@

            Parameters

            Optional axis: number

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/expand_dims.d.ts:5
          • @@ -1577,7 +1577,7 @@

            Parameters

            this: T

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/expm1.d.ts:21
          • @@ -1595,7 +1595,7 @@

            Parameters

            this: Tensor<Rank>

          Returns Tensor<Rank>

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/fft.d.ts:21
          • @@ -1608,7 +1608,7 @@

            Type Parameters

            T extends Tensor<Rank, T>

          Returns Tensor1D

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/flatten.d.ts:21
          • @@ -1626,7 +1626,7 @@

            Parameters

            this: T

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/floor.d.ts:21
        • Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/floorDiv.d.ts:5
        • Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/gather.d.ts:21
        • Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/greater.d.ts:5
        • Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/greater_equal.d.ts:5
          • @@ -1720,7 +1720,7 @@

            Parameters

            this: Tensor<Rank>

          Returns Tensor<Rank>

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/ifft.d.ts:21
          • @@ -1738,7 +1738,7 @@

            Parameters

            this: Tensor<Rank>

          Returns Tensor<Rank>

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/irfft.d.ts:21
          • @@ -1756,7 +1756,7 @@

            Parameters

            this: T

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/is_finite.d.ts:21
          • @@ -1774,7 +1774,7 @@

            Parameters

            this: T

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/is_inf.d.ts:21
          • @@ -1792,7 +1792,7 @@

            Parameters

            this: T

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/is_nan.d.ts:21
          • @@ -1810,7 +1810,7 @@

            Parameters

            alpha: number

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/leaky_relu.d.ts:5
        • Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/less.d.ts:5
        • Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/less_equal.d.ts:5
          • @@ -1870,7 +1870,7 @@
            Optional alpha: Optional beta: number

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/local_response_normalization.d.ts:5
          • @@ -1888,7 +1888,7 @@

            Parameters

            this: T

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/log.d.ts:21
          • @@ -1906,7 +1906,7 @@

            Parameters

            this: T

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/log1p.d.ts:21
          • @@ -1924,7 +1924,7 @@

            Parameters

            this: T

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/log_sigmoid.d.ts:21
          • @@ -1944,7 +1944,7 @@
            this: TOptional axis: number

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/log_softmax.d.ts:21
          • @@ -1966,7 +1966,7 @@
            Optional axis: Optional keepDims: boolean

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/log_sum_exp.d.ts:5
        • Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/logical_and.d.ts:5
          • @@ -1997,7 +1997,7 @@

            Type Parameters

            T extends Tensor<Rank, T>

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/logical_not.d.ts:5
        • Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/logical_or.d.ts:5
        • Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/logical_xor.d.ts:5
          • @@ -2055,7 +2055,7 @@
            Optional transposeA: Optional transposeB: boolean

          Returns Tensor<Rank>

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/mat_mul.d.ts:5
          • @@ -2075,7 +2075,7 @@
            Optional axis: Optional keepDims: boolean

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/max.d.ts:21
          • @@ -2099,7 +2099,7 @@
            pad: numberOptional dimRoundingMode: "round" | "floor" | "ceil"

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/max_pool.d.ts:22
        • Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/maximum.d.ts:5
          • @@ -2137,7 +2137,7 @@
            Optional axis: Optional keepDims: boolean

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/mean.d.ts:5
          • @@ -2157,7 +2157,7 @@
            Optional axis: Optional keepDims: boolean

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/min.d.ts:21
        • Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/minimum.d.ts:5
          • @@ -2195,7 +2195,7 @@
            paddings: ["reflect" | "symmetric"

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/mirror_pad.d.ts:21
        • Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/mod.d.ts:5
        • Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/mul.d.ts:5
          • @@ -2249,7 +2249,7 @@

            Parameters

            this: T

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/neg.d.ts:21
          • @@ -2271,7 +2271,7 @@
            Optional axis: Optional keepDims: boolean

          Returns Tensor<Rank>

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/norm.d.ts:21
        • Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/not_equal.d.ts:5
          • @@ -2306,7 +2306,7 @@
            onValue: number
            offValue: number

          Returns Tensor<Rank>

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/one_hot.d.ts:21
          • @@ -2324,7 +2324,7 @@

            Parameters

            this: T

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/ones_like.d.ts:21
          • @@ -2344,7 +2344,7 @@
            paddings: [Optional constantValue: number

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/pad.d.ts:21
          • @@ -2372,7 +2372,7 @@
            Optional strides: Optional dimRoundingMode: "round" | "floor" | "ceil"

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/pool.d.ts:22
        • Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/pow.d.ts:5
          • @@ -2408,7 +2408,7 @@

            Parameters

            alpha: TensorLike | T

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/prelu.d.ts:5
          • @@ -2427,7 +2427,7 @@
            Optional verbose: Returns void
          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/tensor.d.ts:262
          • @@ -2449,7 +2449,7 @@
            Optional axis: Optional keepDims: boolean

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/prod.d.ts:5
          • @@ -2467,7 +2467,7 @@

            Parameters

            this: T

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/reciprocal.d.ts:21
          • @@ -2480,7 +2480,7 @@

            Type Parameters

            T extends Tensor<Rank, T>

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/relu.d.ts:5
          • @@ -2493,7 +2493,7 @@

            Type Parameters

            T extends Tensor<Rank, T>

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/relu6.d.ts:5
          • @@ -2511,7 +2511,7 @@

            Parameters

            shape: number[]

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/reshape.d.ts:5
          • @@ -2529,7 +2529,7 @@

            Parameters

            x: T

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/reshape_as.d.ts:21
          • @@ -2551,7 +2551,7 @@
            Optional alignCorners: Optional halfPixelCenters: boolean

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/resize_bilinear.d.ts:5
          • @@ -2573,7 +2573,7 @@
            Optional alignCorners: Optional halfFloatCenters: boolean

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/resize_nearest_neighbor.d.ts:5
          • @@ -2593,7 +2593,7 @@
            this: TOptional axis: number | number[]

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/reverse.d.ts:5
          • @@ -2611,7 +2611,7 @@

            Parameters

            this: Tensor<Rank>

          Returns Tensor<Rank>

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/rfft.d.ts:21
          • @@ -2629,7 +2629,7 @@

            Parameters

            this: T

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/round.d.ts:21
          • @@ -2647,7 +2647,7 @@

            Parameters

            this: T

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/rsqrt.d.ts:21
          • @@ -2660,7 +2660,7 @@

            Type Parameters

            T extends Tensor<Rank, T>

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/selu.d.ts:5
          • @@ -2688,7 +2688,7 @@
            Optional dilation: Optional dataFormat: "NHWC" | "NCHW"

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/separable_conv2d.d.ts:5
          • @@ -2706,7 +2706,7 @@

            Parameters

            this: T

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sigmoid.d.ts:21
          • @@ -2724,7 +2724,7 @@

            Parameters

            this: T

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sign.d.ts:21
          • @@ -2742,7 +2742,7 @@

            Parameters

            this: T

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sin.d.ts:21
          • @@ -2760,7 +2760,7 @@

            Parameters

            this: T

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sinh.d.ts:21
          • @@ -2782,7 +2782,7 @@
            begin: numberOptional size: number | number[]

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/slice.d.ts:21
          • @@ -2802,7 +2802,7 @@
            this: TOptional dim: number

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/softmax.d.ts:21
          • @@ -2820,7 +2820,7 @@

            Parameters

            this: T

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/softplus.d.ts:21
          • @@ -2840,7 +2840,7 @@
            blockShape: numbernumber[][]

          Returns Tensor<R>

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/space_to_batch_nd.d.ts:5
          • @@ -2860,7 +2860,7 @@
            numOrSizeSplits: numberOptional axis: number

          Returns T[]

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/split.d.ts:5
          • @@ -2878,7 +2878,7 @@

            Parameters

            this: T

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sqrt.d.ts:21
          • @@ -2896,7 +2896,7 @@

            Parameters

            this: T

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/square.d.ts:21
        • Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/squared_difference.d.ts:21
          • @@ -2932,7 +2932,7 @@

            Parameters

            Optional axis: number[]

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/squeeze.d.ts:5
        • Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/stack.d.ts:5
          • @@ -2972,7 +2972,7 @@
            this: TOptional alpha: number

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/step.d.ts:21
          • @@ -3006,7 +3006,7 @@
            Optional newAxisMask: Optional shrinkAxisMask: number

          Returns Tensor<Rank>

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/strided_slice.d.ts:21
        • Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sub.d.ts:5
          • @@ -3044,7 +3044,7 @@
            Optional axis: Optional keepDims: boolean

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sum.d.ts:5
          • @@ -3062,7 +3062,7 @@

            Parameters

            this: T

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/tan.d.ts:21
          • @@ -3080,7 +3080,7 @@

            Parameters

            this: T

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/tanh.d.ts:21
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/tensor.d.ts:253
          • @@ -3106,7 +3106,7 @@

            Parameters

            b: number[]

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/tile.d.ts:21
          • @@ -3124,7 +3124,7 @@

            Parameters

            this: T

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/to_bool.d.ts:21
          • @@ -3142,7 +3142,7 @@

            Parameters

            this: T

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/to_float.d.ts:21
          • @@ -3160,7 +3160,7 @@

            Parameters

            this: T

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/to_int.d.ts:21
          • @@ -3176,7 +3176,7 @@

            Parameters

            Optional verbose: boolean

          Returns string

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/tensor.d.ts:273
          • @@ -3203,7 +3203,7 @@
            indices:
            values: T
          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/topk.d.ts:21
          • @@ -3221,7 +3221,7 @@

            Parameters

            Optional perm: number[]

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/transpose.d.ts:21
          • @@ -3246,7 +3246,7 @@
            indices:
            values: T
          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/unique.d.ts:21
          • @@ -3268,7 +3268,7 @@
            segmentIds: Tensor1Dnumber

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/unsorted_segment_sum.d.ts:21
          • @@ -3286,7 +3286,7 @@

            Parameters

            Optional axis: number

          Returns T[]

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/unstack.d.ts:5
          • @@ -3303,7 +3303,7 @@
            Optional name: Optional dtype: keyof DataTypeMap

          Returns Variable<R>

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/tensor.d.ts:274
        • Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/where.d.ts:21
          • @@ -3341,7 +3341,7 @@

            Parameters

            this: T

          Returns T

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/zeros_like.d.ts:21
        • +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -230,7 +230,7 @@

          Theme

          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -78,117 +80,127 @@

          Properties

          antispoof: null | GraphModel<string | IOHandler> | Promise<GraphModel<string | IOHandler>> = null
          +
        • Defined in src/models.ts:65
        • blazepose: null | GraphModel<string | IOHandler> | Promise<GraphModel<string | IOHandler>> = null
          +
        • Defined in src/models.ts:44
        • blazeposedetect: null | GraphModel<string | IOHandler> | Promise<GraphModel<string | IOHandler>> = null
          +
        • Defined in src/models.ts:43
        • centernet: null | GraphModel<string | IOHandler> | Promise<GraphModel<string | IOHandler>> = null
          +
        • Defined in src/models.ts:45
        • efficientpose: null | GraphModel<string | IOHandler> | Promise<GraphModel<string | IOHandler>> = null
          +
        • Defined in src/models.ts:46
        • emotion: null | GraphModel<string | IOHandler> | Promise<GraphModel<string | IOHandler>> = null
          +
        • Defined in src/models.ts:49
        • facedetect: null | GraphModel<string | IOHandler> | Promise<GraphModel<string | IOHandler>> = null
          +
        • Defined in src/models.ts:50
        • faceiris: null | GraphModel<string | IOHandler> | Promise<GraphModel<string | IOHandler>> = null
          +
        • Defined in src/models.ts:51
        • facemesh: null | GraphModel<string | IOHandler> | Promise<GraphModel<string | IOHandler>> = null
          +
        • Defined in src/models.ts:52
        • faceres: null | GraphModel<string | IOHandler> | Promise<GraphModel<string | IOHandler>> = null
          +
        • Defined in src/models.ts:53
        • gear: null | GraphModel<string | IOHandler> | Promise<GraphModel<string | IOHandler>> = null
          +
        • Defined in src/models.ts:42
        • handpose: null | GraphModel<string | IOHandler> | Promise<GraphModel<string | IOHandler>> = null
          +
        • Defined in src/models.ts:55
        • handskeleton: null | GraphModel<string | IOHandler> | Promise<GraphModel<string | IOHandler>> = null
          +
        • Defined in src/models.ts:56
        • handtrack: null | GraphModel<string | IOHandler> | Promise<GraphModel<string | IOHandler>> = null
          +
        • Defined in src/models.ts:57
        • insightface: null | GraphModel<string | IOHandler> | Promise<GraphModel<string | IOHandler>> = null
          +
        • Defined in src/models.ts:48
        • liveness: null | GraphModel<string | IOHandler> | Promise<GraphModel<string | IOHandler>> = null
          +
        • Defined in src/models.ts:58
        • +
          + +
          meet: null | GraphModel<string | IOHandler> | Promise<GraphModel<string | IOHandler>> = null
          mobilefacenet: null | GraphModel<string | IOHandler> | Promise<GraphModel<string | IOHandler>> = null
          +
        • Defined in src/models.ts:47
        • movenet: null | GraphModel<string | IOHandler> | Promise<GraphModel<string | IOHandler>> = null
          +
        • Defined in src/models.ts:60
        • nanodet: null | GraphModel<string | IOHandler> | Promise<GraphModel<string | IOHandler>> = null
          +
        • Defined in src/models.ts:61
        • posenet: null | GraphModel<string | IOHandler> | Promise<GraphModel<string | IOHandler>> = null
          -
          - -
          segmentation: null | GraphModel<string | IOHandler> | Promise<GraphModel<string | IOHandler>> = null
          +
          + +
          rvm: null | GraphModel<string | IOHandler> | Promise<GraphModel<string | IOHandler>> = null
          +
        • Defined in src/models.ts:64
        • +
          + +
          selfie: null | GraphModel<string | IOHandler> | Promise<GraphModel<string | IOHandler>> = null
          ssrnetage: null | GraphModel<string | IOHandler> | Promise<GraphModel<string | IOHandler>> = null
          +
        • Defined in src/models.ts:41
        • ssrnetgender: null | GraphModel<string | IOHandler> | Promise<GraphModel<string | IOHandler>> = null
          +
        • Defined in src/models.ts:54
        • +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/types.d.ts:60
        • @@ -36,37 +36,37 @@

          Enumeration Members

          R0: "R0"
          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/types.d.ts:61
        • R1: "R1"
          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/types.d.ts:62
        • R2: "R2"
          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/types.d.ts:63
        • R3: "R3"
          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/types.d.ts:64
        • R4: "R4"
          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/types.d.ts:65
        • R5: "R5"
          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/types.d.ts:66
        • R6: "R6"
          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/types.d.ts:67
        • +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -48,7 +48,7 @@

          Theme

          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -46,7 +46,7 @@

          Theme

          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -48,7 +48,7 @@

          Theme

          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -56,7 +56,7 @@

          Theme

          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -67,7 +67,7 @@

          Theme

          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -60,7 +60,7 @@

          Theme

          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -25,7 +25,7 @@

          Parameters

          currentInstance: Human

          Returns ModelStats

          +
        • Defined in src/models.ts:82
        • +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -27,7 +27,7 @@

          Parameters

          currentInstance: Human

          Returns Promise<void>

          +
        • Defined in src/models.ts:113
        • +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -25,7 +25,7 @@

          Parameters

          currentInstance: Human

          Returns void

          +
        • Defined in src/models.ts:106
        • +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -25,7 +25,7 @@

          Parameters

          currentInstance: Human

          Returns { missing: string[]; name: string }[]

          +
        • Defined in src/models.ts:196
        • +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -29,7 +29,7 @@
          model: nullstring

          Returns KernelOps | null

          +
        • Defined in src/models.ts:160
        • +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          -

          @vladmandic/human - v2.11.0

          +

          @vladmandic/human - v2.11.1

          @@ -103,6 +103,7 @@

          Type Aliases

          ObjectType Point Race +SegmentationEnum TensorLike WarmupEnum
          @@ -131,7 +132,7 @@

          Theme

          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0 +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -23,7 +23,7 @@

          Hierarchy

          • BodyConfig
          +
        • Defined in src/config.ts:97
        • @@ -47,21 +47,21 @@
          +
        • Defined in src/config.ts:15
        • maxDetected: number

          maximum number of detected bodies

          +
        • Defined in src/config.ts:99
        • minConfidence: number

          minimum confidence for a detected body before results are discarded

          +
        • Defined in src/config.ts:101
        • modelPath: string
          @@ -69,7 +69,7 @@
          +
        • Defined in src/config.ts:17
        • skipFrames: number
          @@ -78,7 +78,7 @@
          +
        • Defined in src/config.ts:20
        • skipTime: number
          @@ -87,7 +87,7 @@
          +
        • Defined in src/config.ts:23
        • +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -88,7 +88,7 @@

          Theme

          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -96,7 +96,7 @@

          Theme

          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -23,7 +23,7 @@

          Hierarchy

          • Config
          +
        • Defined in src/config.ts:227
        • @@ -62,7 +62,7 @@
          +
        • Defined in src/config.ts:258
        • backend: BackendEnum
          @@ -75,14 +75,14 @@
          +
        • Defined in src/config.ts:234
        • body: Partial<BodyConfig>

          Body config BodyConfig

          +
        • Defined in src/config.ts:318
        • cacheModels: boolean
          @@ -90,7 +90,7 @@
          +
        • Defined in src/config.ts:278
        • cacheSensitivity: number
          @@ -102,14 +102,14 @@
          +
        • Defined in src/config.ts:292
        • deallocate: boolean

          Perform immediate garbage collection on deallocated tensors instead of caching them

          +
        • Defined in src/config.ts:303
        • debug: boolean
          @@ -117,42 +117,42 @@
          +
        • Defined in src/config.ts:252
        • face: Partial<FaceConfig>

          Face config FaceConfig

          +
        • Defined in src/config.ts:315
        • filter: Partial<FilterConfig>

          Filter config FilterConfig

          +
        • Defined in src/config.ts:309
        • flags: Record<string, unknown>

          Explicit flags passed to initialize TFJS

          +
        • Defined in src/config.ts:295
        • gesture: Partial<GestureConfig>

          Gesture config GestureConfig

          +
        • Defined in src/config.ts:312
        • hand: Partial<HandConfig>

          Hand config HandConfig

          +
        • Defined in src/config.ts:321
        • modelBasePath: string
          @@ -163,28 +163,28 @@
          +
        • Defined in src/config.ts:273
        • object: Partial<ObjectConfig>

          Object config ObjectConfig

          +
        • Defined in src/config.ts:324
        • segmentation: Partial<SegmentationConfig>

          Segmentation config SegmentationConfig

          +
        • Defined in src/config.ts:327
        • skipAllowed: boolean

          Internal Variable

          +
        • Defined in src/config.ts:306
        • softwareKernels: boolean
          @@ -192,7 +192,7 @@
          +
        • Defined in src/config.ts:300
        • validateModels: boolean
          @@ -201,7 +201,7 @@
          +
        • Defined in src/config.ts:284
        • warmup: WarmupEnum
          @@ -213,7 +213,7 @@
          +
        • Defined in src/config.ts:266
        • wasmPath: string
          @@ -221,7 +221,7 @@
          +
        • Defined in src/config.ts:240
        • wasmPlatformFetch: boolean
          @@ -229,7 +229,7 @@
          +
        • Defined in src/config.ts:246
        • +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -203,7 +203,7 @@

          Theme

          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -23,7 +23,7 @@

          Hierarchy

          • FaceAntiSpoofConfig
          +
        • Defined in src/config.ts:72
        • @@ -45,7 +45,7 @@
          +
        • Defined in src/config.ts:15
        • modelPath: string
          @@ -53,7 +53,7 @@
          +
        • Defined in src/config.ts:17
        • skipFrames: number
          @@ -62,7 +62,7 @@
          +
        • Defined in src/config.ts:20
        • skipTime: number
          @@ -71,7 +71,7 @@
          +
        • Defined in src/config.ts:23
        • +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -23,7 +23,7 @@

          Hierarchy

          • FaceAttentionConfig
          +
        • Defined in src/config.ts:55
        • @@ -45,7 +45,7 @@
          +
        • Defined in src/config.ts:15
        • modelPath: string
          @@ -53,7 +53,7 @@
          +
        • Defined in src/config.ts:17
        • skipFrames: number
          @@ -62,7 +62,7 @@
          +
        • Defined in src/config.ts:20
        • skipTime: number
          @@ -71,7 +71,7 @@
          +
        • Defined in src/config.ts:23
        • +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -23,7 +23,7 @@

          Hierarchy

          • FaceConfig
          +
        • Defined in src/config.ts:84
        • @@ -51,27 +51,27 @@

          Properties

          antispoof: Partial<FaceAntiSpoofConfig>
          +
        • Defined in src/config.ts:91
        • attention: Partial<FaceAttentionConfig>
          +
        • Defined in src/config.ts:87
        • description: Partial<FaceDescriptionConfig>
          +
        • Defined in src/config.ts:89
        • detector: Partial<FaceDetectorConfig>
          +
        • Defined in src/config.ts:85
        • emotion: Partial<FaceEmotionConfig>
          +
        • Defined in src/config.ts:90
        • enabled: boolean
          @@ -79,27 +79,27 @@
          +
        • Defined in src/config.ts:15
        • gear: Partial<FaceGearConfig>
          +
        • Defined in src/config.ts:93
        • iris: Partial<FaceIrisConfig>
          +
        • Defined in src/config.ts:88
        • liveness: Partial<FaceLivenessConfig>
          +
        • Defined in src/config.ts:92
        • mesh: Partial<FaceMeshConfig>
          +
        • Defined in src/config.ts:86
        • modelPath: string
          @@ -107,7 +107,7 @@
          +
        • Defined in src/config.ts:17
        • skipFrames: number
          @@ -116,7 +116,7 @@
          +
        • Defined in src/config.ts:20
        • skipTime: number
          @@ -125,7 +125,7 @@
          +
        • Defined in src/config.ts:23
        • +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -26,7 +26,7 @@

          Hierarchy

          • FaceDescriptionConfig
          +
        • Defined in src/config.ts:60
        • @@ -49,14 +49,14 @@
          +
        • Defined in src/config.ts:15
        • minConfidence: number

          minimum confidence for a detected face before results are discarded

          +
        • Defined in src/config.ts:62
        • modelPath: string
          @@ -64,7 +64,7 @@
          +
        • Defined in src/config.ts:17
        • skipFrames: number
          @@ -73,7 +73,7 @@
          +
        • Defined in src/config.ts:20
        • skipTime: number
          @@ -82,7 +82,7 @@
          +
        • Defined in src/config.ts:23
        • +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -23,7 +23,7 @@

          Hierarchy

          • FaceDetectorConfig
          +
        • Defined in src/config.ts:27
        • @@ -51,35 +51,35 @@
          +
        • Defined in src/config.ts:15
        • iouThreshold: number

          minimum overlap between two detected faces before one is discarded

          +
        • Defined in src/config.ts:37
        • mask: boolean

          should child models perform on masked image of a face

          +
        • Defined in src/config.ts:39
        • maxDetected: number

          maximum number of detected faces

          +
        • Defined in src/config.ts:33
        • minConfidence: number

          minimum confidence for a detected face before results are discarded

          +
        • Defined in src/config.ts:35
        • modelPath: string
          @@ -87,7 +87,7 @@
          +
        • Defined in src/config.ts:17
        • return: boolean
          @@ -95,7 +95,7 @@
          +
        • Defined in src/config.ts:42
        • rotation: boolean
          @@ -103,7 +103,7 @@
          +
        • Defined in src/config.ts:31
        • skipFrames: number
          @@ -112,7 +112,7 @@
          +
        • Defined in src/config.ts:20
        • skipTime: number
          @@ -121,7 +121,7 @@
          +
        • Defined in src/config.ts:23
        • +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -23,7 +23,7 @@

          Hierarchy

          • FaceEmotionConfig
          +
        • Defined in src/config.ts:66
        • @@ -46,14 +46,14 @@
          +
        • Defined in src/config.ts:15
        • minConfidence: number

          minimum confidence for a detected face before results are discarded

          +
        • Defined in src/config.ts:68
        • modelPath: string
          @@ -61,7 +61,7 @@
          +
        • Defined in src/config.ts:17
        • skipFrames: number
          @@ -70,7 +70,7 @@
          +
        • Defined in src/config.ts:20
        • skipTime: number
          @@ -79,7 +79,7 @@
          +
        • Defined in src/config.ts:23
        • +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -23,7 +23,7 @@

          Hierarchy

          • FaceGearConfig
          +
        • Defined in src/config.ts:78
        • @@ -46,14 +46,14 @@
          +
        • Defined in src/config.ts:15
        • minConfidence: number

          minimum confidence for a detected race before results are discarded

          +
        • Defined in src/config.ts:80
        • modelPath: string
          @@ -61,7 +61,7 @@
          +
        • Defined in src/config.ts:17
        • skipFrames: number
          @@ -70,7 +70,7 @@
          +
        • Defined in src/config.ts:20
        • skipTime: number
          @@ -79,7 +79,7 @@
          +
        • Defined in src/config.ts:23
        • +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -23,7 +23,7 @@

          Hierarchy

          • FaceIrisConfig
          +
        • Defined in src/config.ts:52
        • @@ -45,7 +45,7 @@
          +
        • Defined in src/config.ts:15
        • modelPath: string
          @@ -53,7 +53,7 @@
          +
        • Defined in src/config.ts:17
        • skipFrames: number
          @@ -62,7 +62,7 @@
          +
        • Defined in src/config.ts:20
        • skipTime: number
          @@ -71,7 +71,7 @@
          +
        • Defined in src/config.ts:23
        • +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -23,7 +23,7 @@

          Hierarchy

          • FaceLivenessConfig
          +
        • Defined in src/config.ts:75
        • @@ -45,7 +45,7 @@
          +
        • Defined in src/config.ts:15
        • modelPath: string
          @@ -53,7 +53,7 @@
          +
        • Defined in src/config.ts:17
        • skipFrames: number
          @@ -62,7 +62,7 @@
          +
        • Defined in src/config.ts:20
        • skipTime: number
          @@ -71,7 +71,7 @@
          +
        • Defined in src/config.ts:23
        • +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -23,7 +23,7 @@

          Hierarchy

          • FaceMeshConfig
          +
        • Defined in src/config.ts:46
        • @@ -46,14 +46,14 @@
          +
        • Defined in src/config.ts:15
        • keepInvalid: boolean

          Keep detected faces that cannot be verified using facemesh

          +
        • Defined in src/config.ts:48
        • modelPath: string
          @@ -61,7 +61,7 @@
          +
        • Defined in src/config.ts:17
        • skipFrames: number
          @@ -70,7 +70,7 @@
          +
        • Defined in src/config.ts:20
        • skipTime: number
          @@ -79,7 +79,7 @@
          +
        • Defined in src/config.ts:23
        • +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -212,7 +212,7 @@

          Theme

          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -25,7 +25,7 @@

          Hierarchy

          • FilterConfig
          +
        • Defined in src/config.ts:166
        • @@ -61,28 +61,28 @@
          +
        • Defined in src/config.ts:196
        • brightness: number

          range: -1 (darken) to 1 (lighten)

          +
        • Defined in src/config.ts:190
        • contrast: number

          range: -1 (reduce contrast) to 1 (increase contrast)

          +
        • Defined in src/config.ts:192
        • enabled: boolean

          are image filters enabled?

          +
        • Defined in src/config.ts:168
        • equalization: boolean
          @@ -92,14 +92,14 @@
          +
        • Defined in src/config.ts:172
        • flip: boolean

          flip input as mirror image

          +
        • Defined in src/config.ts:188
        • height: number
          @@ -111,84 +111,84 @@
          +
        • Defined in src/config.ts:184
        • hue: number

          range: 0 (no change) to 360 (hue rotation in degrees)

          +
        • Defined in src/config.ts:200
        • kodachrome: boolean

          image kodachrome colors

          +
        • Defined in src/config.ts:208
        • negative: boolean

          image negative

          +
        • Defined in src/config.ts:202
        • pixelate: number

          range: 0 (no pixelate) to N (number of pixels to pixelate)

          +
        • Defined in src/config.ts:214
        • polaroid: boolean

          image polaroid camera effect

          +
        • Defined in src/config.ts:212
        • return: boolean

          return processed canvas imagedata in result

          +
        • Defined in src/config.ts:186
        • saturation: number

          range: -1 (reduce saturation) to 1 (increase saturation)

          +
        • Defined in src/config.ts:198
        • sepia: boolean

          image sepia colors

          +
        • Defined in src/config.ts:204
        • sharpness: number

          range: 0 (no sharpening) to 1 (maximum sharpening)

          +
        • Defined in src/config.ts:194
        • technicolor: boolean

          image technicolor colors

          +
        • Defined in src/config.ts:210
        • vintage: boolean

          image vintage colors

          +
        • Defined in src/config.ts:206
        • width: number
          @@ -200,7 +200,7 @@
          +
        • Defined in src/config.ts:178
        • +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -36,7 +36,7 @@

          Hierarchy

        • ObjectConfig
        • SegmentationConfig
        • +
        • Defined in src/config.ts:13
        • @@ -57,14 +57,14 @@
          +
        • Defined in src/config.ts:15
        • modelPath: string

          path to model json file (relative to modelBasePath

          +
        • Defined in src/config.ts:17
        • skipFrames: number
          @@ -72,7 +72,7 @@
          +
        • Defined in src/config.ts:20
        • skipTime: number
          @@ -80,7 +80,7 @@
          +
        • Defined in src/config.ts:23
        • +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -21,7 +21,7 @@

          Hierarchy

          • GestureConfig
          +
        • Defined in src/config.ts:218
        • @@ -39,7 +39,7 @@
          +
        • Defined in src/config.ts:220
        • +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -23,7 +23,7 @@

          Hierarchy

          • HandConfig
          +
        • Defined in src/config.ts:118
        • @@ -56,7 +56,7 @@
          Optional modelPath

          path to hand detector model json

          +
        • Defined in src/config.ts:129
        • enabled: boolean
          @@ -64,35 +64,35 @@
          +
        • Defined in src/config.ts:15
        • iouThreshold: number

          minimum overlap between two detected hands before one is discarded

          +
        • Defined in src/config.ts:124
        • landmarks: boolean

          should hand landmarks be detected or just return detected hand box

          +
        • Defined in src/config.ts:128
        • maxDetected: number

          maximum number of detected hands

          +
        • Defined in src/config.ts:126
        • minConfidence: number

          minimum confidence for a detected hand before results are discarded

          +
        • Defined in src/config.ts:122
        • modelPath: string
          @@ -100,14 +100,14 @@
          +
        • Defined in src/config.ts:17
        • rotation: boolean

          should hand rotation correction be performed after hand detection?

          +
        • Defined in src/config.ts:120
        • skeleton: { modelPath?: string }
          @@ -119,7 +119,7 @@
          Optional modelPath

          path to hand skeleton model json

          +
        • Defined in src/config.ts:133
        • skipFrames: number
          @@ -128,7 +128,7 @@
          +
        • Defined in src/config.ts:20
        • skipTime: number
          @@ -137,7 +137,7 @@
          +
        • Defined in src/config.ts:23
        • +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -128,7 +128,7 @@

          Theme

          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -75,7 +75,7 @@

          Theme

          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -23,7 +23,7 @@

          Hierarchy

          • ObjectConfig
          +
        • Defined in src/config.ts:140
        • @@ -48,28 +48,28 @@
          +
        • Defined in src/config.ts:15
        • iouThreshold: number

          minimum overlap between two detected objects before one is discarded

          +
        • Defined in src/config.ts:144
        • maxDetected: number

          maximum number of detected objects

          +
        • Defined in src/config.ts:146
        • minConfidence: number

          minimum confidence for a detected objects before results are discarded

          +
        • Defined in src/config.ts:142
        • modelPath: string
          @@ -77,7 +77,7 @@
          +
        • Defined in src/config.ts:17
        • skipFrames: number
          @@ -86,7 +86,7 @@
          +
        • Defined in src/config.ts:20
        • skipTime: number
          @@ -95,7 +95,7 @@
          +
        • Defined in src/config.ts:23
        • +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -96,7 +96,7 @@

          Theme

          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -114,7 +114,7 @@

          Theme

          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -129,7 +129,7 @@

          Theme

          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -27,7 +27,7 @@

          Hierarchy

          • SegmentationConfig
          +
        • Defined in src/config.ts:155
        • @@ -35,29 +35,30 @@

          Properties

          -
          - -
          blur: number
          -

          blur segmentation output by pixels for more realistic image

          -
          - +
          enabled: boolean

          is module enabled?

          +
        • Defined in src/config.ts:15
        • +
          + + +

          possible rvm segmentation mode

          +
          modelPath: string
          @@ -65,7 +66,14 @@
          +
        • Defined in src/config.ts:17
        • +
          + +
          ratio: number
          +

          downsample ratio, adjust to reflect approximately how much of input is taken by body

          +
          skipFrames: number
          @@ -74,7 +82,7 @@
          +
        • Defined in src/config.ts:20
        • skipTime: number
          @@ -83,7 +91,7 @@
          +
        • Defined in src/config.ts:23
        • +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -101,7 +101,7 @@

          Theme

          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -19,7 +19,7 @@

          Hierarchy

          • KernelOps
          +
        • Defined in src/models.ts:158
        • @@ -38,22 +38,22 @@

          Properties

          missing: string[]
          +
        • Defined in src/models.ts:158
        • name: string
          +
        • Defined in src/models.ts:158
        • ops: string[]
          +
        • Defined in src/models.ts:158
        • url: string
          +
        • Defined in src/models.ts:158
        • +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -22,7 +22,7 @@

          Hierarchy

          • ModelStats
          +
        • Defined in src/models.ts:69
        • @@ -32,7 +32,6 @@
          modelStats numDefinedModels -numEnabledModels numLoadedModels percentageLoaded totalSizeEnabled @@ -46,47 +45,42 @@

          Properties

          modelStats: ModelInfo[]
          +
        • Defined in src/models.ts:77
        • numDefinedModels: number
          -
          - -
          numEnabledModels: undefined
          +
        • Defined in src/models.ts:71
        • numLoadedModels: number
          +
        • Defined in src/models.ts:70
        • percentageLoaded: number
          +
        • Defined in src/models.ts:72
        • totalSizeEnabled: undefined
          +
        • Defined in src/models.ts:76
        • totalSizeFromManifest: number
          +
        • Defined in src/models.ts:73
        • totalSizeLoading: number
          +
        • Defined in src/models.ts:75
        • totalSizeWeights: number
          +
        • Defined in src/models.ts:74
        • +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/tensor.d.ts:124
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/tensor.d.ts:139
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/abs.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/acos.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/acosh.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/add.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/all.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/any.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/arg_max.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/arg_min.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as_scalar.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as_type.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as1d.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as2d.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as3d.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as4d.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/as5d.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/asin.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/asinh.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/atan.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/atan2.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/atanh.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/avg_pool.d.ts:21
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/batch_to_space_nd.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/batchnorm.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/broadcast_to.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/cast.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/ceil.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/clip_by_value.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/concat.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/conv1d.d.ts:5
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/conv2d_transpose.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/conv2d.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/cos.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/cosh.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/cumprod.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/cumsum.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/depth_to_space.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/depthwise_conv2d.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/dilation2d.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/div_no_nan.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/div.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/dot.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/elu.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/equal.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/erf.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/euclidean_norm.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/exp.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/expand_dims.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/expm1.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/fft.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/flatten.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/floor.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/floorDiv.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/gather.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/greater_equal.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/greater.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/ifft.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/irfft.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/is_finite.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/is_inf.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/is_nan.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/leaky_relu.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/less_equal.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/less.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/local_response_normalization.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/log_sigmoid.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/log_softmax.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/log_sum_exp.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/log.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/log1p.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/logical_and.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/logical_not.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/logical_or.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/logical_xor.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/mat_mul.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/max_pool.d.ts:21
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/max.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/maximum.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/mean.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/min.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/minimum.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/mirror_pad.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/mod.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/mul.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/neg.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/norm.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/not_equal.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/one_hot.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/ones_like.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/pad.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/pool.d.ts:21
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/pow.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/prelu.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/prod.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/reciprocal.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/relu.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/relu6.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/reshape_as.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/reshape.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/resize_bilinear.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/resize_nearest_neighbor.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/reverse.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/rfft.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/round.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/rsqrt.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/selu.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/separable_conv2d.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sigmoid.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sign.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sin.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sinh.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/slice.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/softmax.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/softplus.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/space_to_batch_nd.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/split.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sqrt.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/square.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/squared_difference.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/squeeze.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/stack.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/step.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/strided_slice.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sub.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/sum.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/tan.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/tanh.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/tile.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/to_bool.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/to_float.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/to_int.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/topk.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/transpose.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/unique.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/unsorted_segment_sum.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/unstack.d.ts:4
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/where.d.ts:20
        • +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/public/chained_ops/zeros_like.d.ts:20
        • +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -69,7 +69,7 @@

          Theme

          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -48,7 +48,7 @@

          Theme

          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -54,7 +54,7 @@

          Theme

          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          AnyCanvas: HTMLCanvasElement | OffscreenCanvas
          @@ -34,7 +34,7 @@

          Theme

          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          AnyImage: HTMLImageElement | typeof Image
          @@ -34,7 +34,7 @@

          Theme

          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          AnyVideo: HTMLMediaElement | HTMLVideoElement
          @@ -34,7 +34,7 @@

          Theme

          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          BackendEnum: "" | "cpu" | "wasm" | "webgl" | "humangl" | "tensorflow" | "webgpu"

          Possible TensorFlow backends

          +
        • Defined in src/config.ts:4
        • +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          BodyAnnotationBlazePose: "leftLeg" | "rightLeg" | "torso" | "leftArm" | "rightArm" | "leftEye" | "rightEye" | "mouth"
          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          BodyAnnotationEfficientPose: "leftLeg" | "rightLeg" | "torso" | "leftArm" | "rightArm" | "head"
          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          BodyGesture: `leaning ${"left" | "right"}` | `raise ${"left" | "right"} hand` | "i give up"
          @@ -34,7 +34,7 @@

          Theme

          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          BodyLandmarkBlazePose: "nose" | "leftEyeInside" | "leftEye" | "leftEyeOutside" | "rightEyeInside" | "rightEye" | "rightEyeOutside" | "leftEar" | "rightEar" | "leftMouth" | "rightMouth" | "leftShoulder" | "rightShoulder" | "leftElbow" | "rightElbow" | "leftWrist" | "rightWrist" | "leftPinky" | "rightPinky" | "leftIndex" | "rightIndex" | "leftThumb" | "rightThumb" | "leftHip" | "rightHip" | "leftKnee" | "rightKnee" | "leftAnkle" | "rightAnkle" | "leftHeel" | "rightHeel" | "leftFoot" | "rightFoot" | "bodyCenter" | "bodyTop" | "leftPalm" | "leftHand" | "rightPalm" | "rightHand"
          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          BodyLandmarkEfficientNet: "head" | "neck" | "rightShoulder" | "rightElbow" | "rightWrist" | "chest" | "leftShoulder" | "leftElbow" | "leftWrist" | "bodyCenter" | "rightHip" | "rightKnee" | "rightAnkle" | "leftHip" | "leftKnee" | "leftAnkle"
          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          BodyLandmarkMoveNet: "nose" | "leftEye" | "rightEye" | "leftEar" | "rightEar" | "leftShoulder" | "rightShoulder" | "leftElbow" | "rightElbow" | "leftWrist" | "rightWrist" | "leftHip" | "rightHip" | "leftKnee" | "rightKnee" | "leftAnkle" | "rightAnkle"
          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          BodyLandmarkPoseNet: "nose" | "leftEye" | "rightEye" | "leftEar" | "rightEar" | "leftShoulder" | "rightShoulder" | "leftElbow" | "rightElbow" | "leftWrist" | "rightWrist" | "leftHip" | "rightHip" | "leftKnee" | "rightKnee" | "leftAnkle" | "rightAnkle"
          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          Box: [number, number, number, number]
          @@ -34,7 +34,7 @@

          Theme

          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          Emotion: "angry" | "disgust" | "fear" | "happy" | "sad" | "surprise" | "neutral"
          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          Events: "create" | "load" | "image" | "result" | "warmup" | "error"
          @@ -41,7 +41,7 @@

          Theme

          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          ExternalCanvas: typeof Canvas
          @@ -34,7 +34,7 @@

          Theme

          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          FaceGesture: `facing ${"left" | "center" | "right"}` | `blink ${"left" | "right"} eye` | `mouth ${number}% open` | `head ${"up" | "down"}`
          @@ -34,7 +34,7 @@

          Theme

          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          FaceLandmark: "leftEye" | "rightEye" | "nose" | "mouth" | "leftEar" | "rightEar" | "symmetryLine" | "silhouette" | "lipsUpperOuter" | "lipsLowerOuter" | "lipsUpperInner" | "lipsLowerInner" | "rightEyeUpper0" | "rightEyeLower0" | "rightEyeUpper1" | "rightEyeLower1" | "rightEyeUpper2" | "rightEyeLower2" | "rightEyeLower3" | "rightEyebrowUpper" | "rightEyebrowLower" | "rightEyeIris" | "leftEyeUpper0" | "leftEyeLower0" | "leftEyeUpper1" | "leftEyeLower1" | "leftEyeUpper2" | "leftEyeLower2" | "leftEyeLower3" | "leftEyebrowUpper" | "leftEyebrowLower" | "leftEyeIris" | "midwayBetweenEyes" | "noseTip" | "noseBottom" | "noseRightCorner" | "noseLeftCorner" | "rightCheek" | "leftCheek"
          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          Finger: "index" | "middle" | "pinky" | "ring" | "thumb" | "palm"
          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          FingerCurl: "none" | "half" | "full"
          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          FingerDirection: "verticalUp" | "verticalDown" | "horizontalLeft" | "horizontalRight" | "diagonalUpRight" | "diagonalUpLeft" | "diagonalDownRight" | "diagonalDownLeft"
          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          Gender: "male" | "female" | "unknown"
          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          GestureResult: { face: number; gesture: FaceGesture } | { gesture: IrisGesture; iris: number } | { body: number; gesture: BodyGesture } | { gesture: HandGesture; hand: number }
          @@ -39,7 +39,7 @@

          Theme

          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          HandGesture: `${"thumb" | "index" | "middle" | "ring" | "pinky"} forward` | `${"thumb" | "index" | "middle" | "ring" | "pinky"} up` | "victory" | "thumbs up"
          @@ -34,7 +34,7 @@

          Theme

          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          HandType: "hand" | "fist" | "pinch" | "point" | "face" | "tip" | "pinchtip"
          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          ImageObjects: ImageData | ImageBitmap
          @@ -34,7 +34,7 @@

          Theme

          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -34,7 +34,7 @@

          Theme

          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          IrisGesture: "facing center" | `looking ${"left" | "right" | "up" | "down"}` | "looking center"
          @@ -34,7 +34,7 @@

          Theme

          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          ObjectType: "person" | "bicycle" | "car" | "motorcycle" | "airplane" | "bus" | "train" | "truck" | "boat" | "traffic light" | "fire hydrant" | "stop sign" | "parking meter" | "bench" | "bird" | "cat" | "dog" | "horse" | "sheep" | "cow" | "elephant" | "bear" | "zebra" | "giraffe" | "backpack" | "umbrella" | "handbag" | "tie" | "suitcase" | "frisbee" | "skis" | "snowboard" | "sports ball" | "kite" | "baseball bat" | "baseball glove" | "skateboard" | "surfboard" | "tennis racket" | "bottle" | "wine glass" | "cup" | "fork" | "knife" | "spoon" | "bowl" | "banana" | "apple" | "sandwich" | "orange" | "broccoli" | "carrot" | "hot dog" | "pizza" | "donut" | "cake" | "chair" | "couch" | "potted plant" | "bed" | "dining table" | "toilet" | "tv" | "laptop" | "mouse" | "remote" | "keyboard" | "cell phone" | "microwave" | "oven" | "toaster" | "sink" | "refrigerator" | "book" | "clock" | "vase" | "scissors" | "teddy bear" | "hair drier" | "toothbrush"
          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          Point: [number, number, number?]
          @@ -34,7 +34,7 @@

          Theme

          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          Race: "white" | "black" | "asian" | "indian" | "other"
          +
            +
          • Preparing search index...
          • +
          • The search index is not available
          @vladmandic/human - v2.11.1
          +
          + +
          \ No newline at end of file diff --git a/typedoc/types/TensorLike.html b/typedoc/types/TensorLike.html index 625f18c46..1c5380b69 100644 --- a/typedoc/types/TensorLike.html +++ b/typedoc/types/TensorLike.html @@ -1,16 +1,16 @@ -TensorLike | @vladmandic/human - v2.11.0
          +TensorLike | @vladmandic/human - v2.11.1
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          TensorLike: TypedArray | number | boolean | string | RecursiveArray<number | number[] | TypedArray> | RecursiveArray<boolean> | RecursiveArray<string> | Uint8Array[]
          @@ -18,7 +18,7 @@

          Type alias TensorLike

          Docalias

          TypedArray|Array

          +
        • Defined in node_modules/.pnpm/@tensorflow+tfjs-core@3.21.0/node_modules/@tensorflow/tfjs-core/dist/types.d.ts:78
        • +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          WarmupEnum: "" | "none" | "face" | "full" | "body"

          Possible values for human.warmup

          +
        • Defined in src/config.ts:7
        • +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -35,7 +35,7 @@

          Theme

          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -33,7 +33,7 @@

          Theme

          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          defaults: Config = ...
          @@ -19,7 +19,7 @@

          Variable defaultsConst

          +
        • Defined in src/config.ts:331
        • +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          @@ -35,7 +35,7 @@

          Theme

          • Preparing search index...
          • -
          • The search index is not available
          @vladmandic/human - v2.11.0
          +
        • The search index is not available
        • @vladmandic/human - v2.11.1
          env: Env = ...